// When I use __llmax() and __llmin() to saturate a value, I don't expect the
// order of input parameters to make a difference. But apparently they do.
//
// Can someone explain why a becomes 4294967286 in the first calculation and
// 0 (as expected) in the second?
volatile long long int a, b, c;
void main(void)
{
b = 10LL;
c = -1LL;
a = __llmax(__llmin(b*c, 100LL), 0LL);
//a = 4294967286
a = __llmax(0LL, __llmin(100LL, b*c));
//a = 0
}