x < 0 && x == -x That is the issue right there really, doing x == -x will never be true because -x will overflow for INT_MIN.
Doing "((unsigned)x) == -(unsigned)x" should fix the issue. Note this is unrelated to Darwin or any processor really too. -- Pinski