int ilog2(int x) {
int hold;
hold = (x >> 1);
hold = x|hold;
hold = (x >> 2);
hold = x|hold;
hold = (x >> 4);
hold = x|hold;
hold = (x >> 8);
hold = x|hold;
hold = (x >> 16);
hold = x|hold;
hold = (x >> 32);
hold = x|hold;
x = hold;
return x +(~0x2 + 2);
}
After consulting with my psychic abilities, I can conclude that I have no psychic abilities, therefore, I cannot predict where your problem resides (if there is one).
Sorry for the sarcasm, but you need to specify your problems before we can help you.