Yeah, on x86 the idiv instruction can generate both the divisor and modulo together, and if you do the computation close in the C code, the compiler will use this. So put this back the way it was please. (except for the parameter swap of course, which I assume is right).