I think carmax will be out to get you also
One thing you have to understand is carmax and the dealership are out to make money
Which means screwing you over on your trade in.
Are you upside down really bad?
You could try to sale it privately then put the additional amount on a creditcard (if it's not to much)