Your best bet would be to trade the car if you are planning to get an e9x m3 IMHO
Here in Canada we pay tax only on sticker price less trade in value and that is a plus (don't know if it is the same in the US).
Selling to a friend is fine, provided he pays the same as trade in plus what you would save on tax when getting a new or used m3
As for what your car is worth, I would approach 3 different dealers and see what they offer as a trade in for your Porsche.
When you do see the three different dealers let them know you have your eye on there car, however on two other cars (comparably to the one you are looking at), also. This tends for the dealership to sharpen there pencile ... Remember they want your business.
Case in point in 2004 I traded my business car (a 1999 Mercedes M Class 350). I had the car appraised at Mercedes, BMW and Jaguar. Jaguar gave me the best deal so my new business car was then a Jaguar 3.0 X-Type.
So do some shopping around and don't appear anguish about it. Let them know there are other fish in the sea
in the end you come out on top.