At first glance it looked like a straight-forward question - of course I would take the M5 E39. It's one of my all time favorite BMWs.
But more I looked at the comparison more tempted I got to take the newer diesel 5-series. Because I couldn't afford to fuel a 5 liter V8. And the 535 is really the best of all worlds - fuel efficient, large, luxurious, good performance and it even looks more expensive than the E39 M5 that can be easily confused with 2,5k 520i wannabe M5's (M5 replica rims, stolen "M" badges, you know what I am talking about).
My heart goes for the M5 while my mind says 535d.