Check correctness
let mid' l h = l .&. h + unsafeShiftR (xor l h) 1