public static int modifiedCalcCircularRefElementOffset(long index, long mask)
    {
        return (int) (index & mask) >> 1;
    }
This method assumes index is actually (index << 1) because lower bit is used for resize hence the >> 1
jctools-core/src/main/java/org/jctools/queues/atomic/AtomicQueueUtil.java