class USOfRef<T> extends UnknownSizeSpliterator<T, USOfRef<T>, Iterator<? extends T>> {
        Object[] array;

        USOfRef(Iterator<? extends T> iterator) {
            super(iterator);
        }

        USOfRef(Object[] array, int index, int fence) {
            super(index, fence);
            this.array = array;
        }

        @Override
        public Spliterator<T> trySplit() {
            Iterator<? extends T> i = it;
            if (i != null) {
                int n = getN();
                Object[] a = new Object[n];
                int j = 0;
                while (i.hasNext() && j < n) {
                    a[j++] = i.next();
                }
                fence = j;
                if (i.hasNext()) {
                    return correctSize(new USOfRef<>(a, 0, j));
                }
                it = null;
                array = a;
            }
            int lo = index, mid = (lo + fence) >>> 1;
            return (lo >= mid) ? null : correctSize(new USOfRef<>(array, lo, index = mid));
        }

        @Override
        public void forEachRemaining(Consumer<? super T> action) {<FILL_FUNCTION_BODY>}

        @Override
        public boolean tryAdvance(Consumer<? super T> action) {
            if (it != null) {
                if (it.hasNext()) {
                    action.accept(it.next());
                    return true;
                }
                it = null;
                index = fence;
            } else if (index < fence) {
                @SuppressWarnings("unchecked")
                T t = (T) array[index++];
                action.accept(t);
                return true;
            }
            est = 0;
            return false;
        }
    }

            if (it != null)
                it.forEachRemaining(action);
            else {
                Object[] a = array;
                int i = index, hi = fence;
                while (i < hi) {
                    @SuppressWarnings("unchecked")
                    T t = (T) a[i++];
                    action.accept(t);
                }
            }
            index = fence;
            est = 0;
        
<no_super_class>