countbits
interleave = 2 << (countbits(mask & (size - 1)) - 1);
static uint64_t countbits(uint64_t v);