I would say go with the m5 i work for a bmw dealership and i see the M3 in shop for more repairs. M3's in usa tend to get beat on more than M5. M3 needs adjustment of valves every inspection one. Also M3 has more interior and exterior problems (door edge protectors/armrests/airducts/titan trim and more). If a E39 is in the shop whether it's a M5 or not it is in there for either routine maintenance or the usual rear window regulator. I could go on and on about what goes bad on e46. Not too much mechanical but trim parts. Also we have been replacing a few SMG's lately. But i must say BMW does warranty cars with no problem. Personally if ihad to choose it would be a E39 M5. I have driven both at work and at BMW ride and Drive and the M5 hands down.