A car like this technically can't be CPOed b/c of the amount of damage it sustained, which of course doesn't mean that this dealer wouldn't try to do it
Also, a lot of M3s at dealers aren't CPOed even though they could be. The market for them is soft and the dealer cost to CPO them is high. A lot of dealers that I see don't CPO them to keep the price down, then they can do it later if the buyer wants the warranty and is willing to pay for the reconditioning needed if there is any.
I 100% agree with the idea of returning the car and walking away. The car had significant damage and a suspect repair job, and there's a massive hit that you take on resale with a car like this. A lot of M3 buyers will cross a car that's been damaged so significantly right off the list regardless of asking price.
For the folks saying to get a warranty from the dealer, there's no way to get an extended BMW warranty on this car. It doesn't qualify as a CPO, and the OP isn't the original owner. The only option is a 3rd party warranty, and I would pass on that option and just take the cash and bank it for obvious reasons.