#include static unsigned long reverse(unsigned long x) { unsigned long h = 0; int i = 0; for(h = i = 0; i < 32; i++) { h = (h << 1) + (x & 1); x >>= 1; } return h;}