private E removeElement(final E[] buffer, long index, final long mask) {
        final long offset = calcCircularRefElementOffset(index, mask);
        // load plain, element happens before it's index becomes visible
        final E e = lpRefElement(buffer, offset);
        // store ordered, make sure nulling out is visible. Producer is waiting for this value.
        soRefElement(buffer, offset, null);
        return e;
    }
NOTE: This class was automatically generated by org.jctools.queues.unpadded.JavaParsingUnpaddedQueueGenerator
which can found in the jctools-build module. The original source file is SpmcArrayQueue.java.
jctools-core/src/main/java/org/jctools/queues/unpadded/SpmcUnpaddedArrayQueue.java