class IntPrefixBuffer extends PrefixBuffer implements IntConsumer {
            private final int[] buf = new int[BUF_SIZE];
            private int prevBufferLast;
    
            boolean init(Spliterator.OfInt source) {
                if (idx == 0) {
                    int i = 0;
                    while (i < BUF_SIZE && source.tryAdvance(this)) {
                        i++;
                    }
                    if (idx == 0) {
                        return false;
                    }
                    
                    int last = buf[idx - 1];
                    isFirst = isFirst || accRef.compareAndSet(Long.MAX_VALUE, last);
                    if (!isFirst) {
                        prevBufferLast = (int) accRef.getAndAccumulate(last, op);
                    }
                }
                return true;
            }
    
            void drainOne(IntConsumer action) {<FILL_FUNCTION_BODY>}
    
            void drainAll(IntConsumer action) {
                if (!isInit()) return;
                
                if (isFirst) {
                    for (int i = 0; i < idx; i++) {
                        action.accept(buf[i]);
                    }
                    isFirst = false;
                } else {
                    for (int i = 0; i < idx; i++) {
                        action.accept(localOp.applyAsInt(buf[i], prevBufferLast));
                    }
                }
                idx = 0;
            }
            
            @Override
            public void accept(int value) {
                if (idx == 0) {
                    buf[idx++] = value;
                } else {
                    int prev = buf[idx - 1];
                    buf[idx++] = localOp.applyAsInt(prev, value);
                }
            }
        }

                int value = buf[--idx];
                if (isFirst) {
                    action.accept(value);
                    if (idx == 0) {
                        isFirst = false;
                    }
                } else {
                    action.accept(localOp.applyAsInt(value, prevBufferLast));
                }
            
<methods>public non-sealed void <init>() <variables>