static inline uint64_t floor_log2(uint64_t x) { return 63 - __builtin_clzll(x); }
https://en.cppreference.com/w/cpp/header/bit