static int dualLog(int i) { ret 32-Int.numberOfLeadingZeros(max(0, i-1)); }