#include int uint64_bottomzeros_num(uint64_t x) { int result = 0; int j; for (j = 0;j < 64;++j) { if (1 & (x >> j)) break; ++result; } return result; }