// 
// Decompiled by Procyon v0.6.0
// 

package com.hypixel.fastutil.chars;

import com.hypixel.fastutil.util.SneakyThrow;
import java.util.concurrent.CountedCompleter;
import java.util.Set;
import it.unimi.dsi.fastutil.chars.CharCollection;
import java.util.Collection;
import java.lang.reflect.Array;
import java.util.Arrays;
import it.unimi.dsi.fastutil.objects.ObjectCollection;
import it.unimi.dsi.fastutil.objects.ObjectSpliterator;
import java.util.Spliterator;
import it.unimi.dsi.fastutil.chars.CharSpliterator;
import java.util.Enumeration;
import java.util.NoSuchElementException;
import it.unimi.dsi.fastutil.chars.CharIterator;
import java.util.concurrent.locks.LockSupport;
import java.io.Serializable;
import java.util.concurrent.locks.ReentrantLock;
import java.lang.reflect.Field;
import java.util.function.Predicate;
import java.util.function.ToIntFunction;
import java.util.function.ToLongFunction;
import java.util.function.ToDoubleFunction;
import java.util.function.Function;
import it.unimi.dsi.fastutil.chars.CharConsumer;
import java.util.function.IntBinaryOperator;
import java.util.function.LongBinaryOperator;
import java.util.function.DoubleBinaryOperator;
import java.util.concurrent.atomic.AtomicReference;
import java.util.function.Consumer;
import java.util.concurrent.ForkJoinPool;
import com.hypixel.fastutil.util.TLRUtil;
import it.unimi.dsi.fastutil.chars.CharSet;
import java.util.function.BiFunction;
import it.unimi.dsi.fastutil.objects.ObjectSet;
import com.hypixel.fastutil.FastCollection;
import it.unimi.dsi.fastutil.objects.ObjectIterator;
import java.util.Iterator;
import it.unimi.dsi.fastutil.chars.Char2ObjectMap;
import java.util.Map;
import sun.misc.Unsafe;

public class Char2ObjectConcurrentHashMap<V>
{
    protected static final long serialVersionUID = 7249069246763182397L;
    protected static final int MAXIMUM_CAPACITY = 1073741824;
    protected static final int DEFAULT_CAPACITY = 16;
    protected static final int MAX_ARRAY_SIZE = 2147483639;
    protected static final int DEFAULT_CONCURRENCY_LEVEL = 16;
    protected static final float LOAD_FACTOR = 0.75f;
    protected static final int TREEIFY_THRESHOLD = 8;
    protected static final int UNTREEIFY_THRESHOLD = 6;
    protected static final int MIN_TREEIFY_CAPACITY = 64;
    protected static final int MIN_TRANSFER_STRIDE = 16;
    protected static int RESIZE_STAMP_BITS;
    protected static final int MAX_RESIZERS;
    protected static final int RESIZE_STAMP_SHIFT;
    protected static final int MOVED = -1;
    protected static final int TREEBIN = -2;
    protected static final int RESERVED = -3;
    protected static final int HASH_BITS = Integer.MAX_VALUE;
    protected static final int NCPU;
    protected transient volatile Node<V>[] table;
    protected transient volatile Node<V>[] nextTable;
    protected transient volatile long baseCount;
    protected transient volatile int sizeCtl;
    protected transient volatile int transferIndex;
    protected transient volatile int cellsBusy;
    protected transient volatile CounterCell[] counterCells;
    protected transient KeySetView<V> keySet;
    protected transient ValuesView<V> values;
    protected transient EntrySetView<V> entrySet;
    protected final char EMPTY;
    protected static final Unsafe U;
    protected static final long SIZECTL;
    protected static final long TRANSFERINDEX;
    protected static final long BASECOUNT;
    protected static final long CELLSBUSY;
    protected static final long CELLVALUE;
    protected static final long ABASE;
    protected static final int ASHIFT;
    
    protected static final int spread(final int h) {
        return (h ^ h >>> 16) & Integer.MAX_VALUE;
    }
    
    protected static final int tableSizeFor(final int c) {
        int n = c - 1;
        n |= n >>> 1;
        n |= n >>> 2;
        n |= n >>> 4;
        n |= n >>> 8;
        n |= n >>> 16;
        return (n < 0) ? 1 : ((n >= 1073741824) ? 1073741824 : (n + 1));
    }
    
    protected static final <V> Node<V> tabAt(final Node<V>[] tab, final int i) {
        return (Node)Char2ObjectConcurrentHashMap.U.getObjectVolatile(tab, ((long)i << Char2ObjectConcurrentHashMap.ASHIFT) + Char2ObjectConcurrentHashMap.ABASE);
    }
    
    protected static final <V> boolean casTabAt(final Node<V>[] tab, final int i, final Node<V> c, final Node<V> v) {
        return Char2ObjectConcurrentHashMap.U.compareAndSwapObject(tab, ((long)i << Char2ObjectConcurrentHashMap.ASHIFT) + Char2ObjectConcurrentHashMap.ABASE, c, v);
    }
    
    protected static final <V> void setTabAt(final Node<V>[] tab, final int i, final Node<V> v) {
        Char2ObjectConcurrentHashMap.U.putObjectVolatile(tab, ((long)i << Char2ObjectConcurrentHashMap.ASHIFT) + Char2ObjectConcurrentHashMap.ABASE, v);
    }
    
    public Char2ObjectConcurrentHashMap() {
        this.EMPTY = '\uffff';
    }
    
    public Char2ObjectConcurrentHashMap(final boolean nonce, final char emptyValue) {
        this.EMPTY = emptyValue;
    }
    
    public Char2ObjectConcurrentHashMap(final int initialCapacity) {
        this(initialCapacity, true, '\uffff');
    }
    
    public Char2ObjectConcurrentHashMap(final int initialCapacity, final boolean nonce, final char emptyValue) {
        if (initialCapacity < 0) {
            throw new IllegalArgumentException();
        }
        final int cap = (initialCapacity >= 536870912) ? 1073741824 : tableSizeFor(initialCapacity + (initialCapacity >>> 1) + 1);
        this.sizeCtl = cap;
        this.EMPTY = emptyValue;
    }
    
    public Char2ObjectConcurrentHashMap(final Map<? extends Character, ? extends V> m, final char emptyValue) {
        this.sizeCtl = 16;
        this.EMPTY = emptyValue;
        this.putAll(m);
    }
    
    public Char2ObjectConcurrentHashMap(final Char2ObjectConcurrentHashMap<? extends V> m) {
        this.sizeCtl = 16;
        this.EMPTY = m.EMPTY;
        this.putAll(m);
    }
    
    public Char2ObjectConcurrentHashMap(final Char2ObjectMap<V> m) {
        this.sizeCtl = 16;
        this.EMPTY = '\uffff';
        this.putAll(m);
    }
    
    public Char2ObjectConcurrentHashMap(final Char2ObjectMap<V> m, final char emptyValue) {
        this.sizeCtl = 16;
        this.EMPTY = emptyValue;
        this.putAll(m);
    }
    
    public Char2ObjectConcurrentHashMap(final int initialCapacity, final float loadFactor) {
        this(initialCapacity, loadFactor, 1, '\uffff');
    }
    
    public Char2ObjectConcurrentHashMap(int initialCapacity, final float loadFactor, final int concurrencyLevel, final char emptyValue) {
        if (loadFactor <= 0.0f || initialCapacity < 0 || concurrencyLevel <= 0) {
            throw new IllegalArgumentException();
        }
        if (initialCapacity < concurrencyLevel) {
            initialCapacity = concurrencyLevel;
        }
        final long size = (long)(1.0 + initialCapacity / loadFactor);
        final int cap = (size >= 1073741824L) ? 1073741824 : tableSizeFor((int)size);
        this.sizeCtl = cap;
        this.EMPTY = emptyValue;
    }
    
    public int size() {
        final long n = this.sumCount();
        return (n < 0L) ? 0 : ((n > 2147483647L) ? Integer.MAX_VALUE : ((int)n));
    }
    
    public boolean isEmpty() {
        return this.sumCount() <= 0L;
    }
    
    public V get(final char key) {
        if (key == this.EMPTY) {
            throw new IllegalArgumentException("Key is EMPTY: " + this.EMPTY);
        }
        final int h = spread(Character.hashCode(key));
        final Node<V>[] tab;
        final int n;
        Node<V> e;
        if ((tab = this.table) != null && (n = tab.length) > 0 && (e = tabAt(tab, n - 1 & h)) != null) {
            final int eh;
            if ((eh = e.hash) == h) {
                final char ek;
                if ((ek = e.key) == key || (ek != this.EMPTY && key == ek)) {
                    return e.val;
                }
            }
            else if (eh < 0) {
                final Node<V> p;
                return ((p = e.find(h, key)) != null) ? p.val : null;
            }
            while ((e = e.next) != null) {
                final char ek;
                if (e.hash == h && ((ek = e.key) == key || (ek != this.EMPTY && key == ek))) {
                    return e.val;
                }
            }
        }
        return null;
    }
    
    public boolean containsKey(final char key) {
        return this.get(key) != null;
    }
    
    public boolean containsValue(final Object value) {
        if (value == null) {
            throw new NullPointerException();
        }
        Label_0413: {
            final Node<V>[] tt;
            if ((tt = this.table) != null) {
                Node<V>[] tab = tt;
                Node<V> next = null;
                TableStack<V> stack = null;
                TableStack<V> spare = null;
                int index = 0;
                int baseIndex = 0;
                final int baseLimit = tt.length;
                final int baseSize = tt.length;
            Label_0374_Outer:
                while (true) {
                    Node<V> p = null;
                    if ((p = next) != null) {
                        p = p.next;
                    }
                    while (true) {
                        while (p == null) {
                            final Node<V>[] t;
                            int n;
                            final int i;
                            if (baseIndex >= baseLimit || (t = tab) == null || (n = t.length) <= (i = index) || i < 0) {
                                next = null;
                                if (p == null) {
                                    break Label_0413;
                                }
                                final V v;
                                if ((v = p.val) == value || (v != null && value.equals(v))) {
                                    return true;
                                }
                                continue Label_0374_Outer;
                            }
                            else {
                                if ((p = tabAt(t, i)) != null && p.hash < 0) {
                                    if (p instanceof final ForwardingNode forwardingNode) {
                                        tab = (Node<V>[])forwardingNode.nextTable;
                                        p = null;
                                        TableStack<V> s = spare;
                                        if (s != null) {
                                            spare = s.next;
                                        }
                                        else {
                                            s = new TableStack<V>();
                                        }
                                        s.tab = t;
                                        s.length = n;
                                        s.index = i;
                                        s.next = stack;
                                        stack = s;
                                        continue Label_0374_Outer;
                                    }
                                    if (p instanceof final TreeBin treeBin) {
                                        p = (Node<V>)treeBin.first;
                                    }
                                    else {
                                        p = null;
                                    }
                                }
                                if (stack != null) {
                                    TableStack<V> s;
                                    int len;
                                    while ((s = stack) != null && (index += (len = s.length)) >= n) {
                                        n = len;
                                        index = s.index;
                                        tab = s.tab;
                                        s.tab = null;
                                        final TableStack<V> anext = s.next;
                                        s.next = spare;
                                        stack = anext;
                                        spare = s;
                                    }
                                    if (s != null || (index += baseSize) < n) {
                                        continue Label_0374_Outer;
                                    }
                                    index = ++baseIndex;
                                }
                                else {
                                    if ((index = i + baseSize) < n) {
                                        continue Label_0374_Outer;
                                    }
                                    index = ++baseIndex;
                                }
                            }
                        }
                        next = p;
                        continue;
                    }
                }
            }
        }
        return false;
    }
    
    public V put(final char key, final V value) {
        return this.putVal(key, value, false);
    }
    
    protected final V putVal(final char key, final V value, final boolean onlyIfAbsent) {
        if (key == this.EMPTY) {
            throw new IllegalArgumentException("Key is EMPTY: " + this.EMPTY);
        }
        if (value == null) {
            throw new NullPointerException();
        }
        final int hash = spread(Character.hashCode(key));
        int binCount = 0;
        Node<V>[] tab = this.table;
        while (true) {
            final int n;
            if (tab == null || (n = tab.length) == 0) {
                tab = this.initTable();
            }
            else {
                final int i;
                final Node<V> f;
                if ((f = tabAt(tab, i = (n - 1 & hash))) == null) {
                    if (casTabAt(tab, i, null, new Node<V>(this.EMPTY, hash, key, value, null))) {
                        break;
                    }
                    continue;
                }
                else {
                    final int fh;
                    if ((fh = f.hash) == -1) {
                        tab = this.helpTransfer(tab, f);
                    }
                    else {
                        V oldVal = null;
                        synchronized (f) {
                            Label_0338: {
                                if (tabAt(tab, i) == f) {
                                    if (fh >= 0) {
                                        binCount = 1;
                                        Node<V> e = f;
                                        char ek;
                                        while (e.hash != hash || ((ek = e.key) != key && (ek == this.EMPTY || key != ek))) {
                                            final Node<V> pred = e;
                                            if ((e = e.next) == null) {
                                                pred.next = (Node<V>)new Node<Object>(this.EMPTY, hash, key, (V)value, null);
                                                break Label_0338;
                                            }
                                            ++binCount;
                                        }
                                        oldVal = e.val;
                                        if (!onlyIfAbsent) {
                                            e.val = value;
                                        }
                                    }
                                    else if (f instanceof TreeBin) {
                                        binCount = 2;
                                        final Node<V> p;
                                        if ((p = ((TreeBin)f).putTreeVal(hash, key, value)) != null) {
                                            oldVal = p.val;
                                            if (!onlyIfAbsent) {
                                                p.val = value;
                                            }
                                        }
                                    }
                                }
                            }
                        }
                        if (binCount == 0) {
                            continue;
                        }
                        if (binCount >= 8) {
                            this.treeifyBin(tab, i);
                        }
                        if (oldVal != null) {
                            return oldVal;
                        }
                        break;
                    }
                }
            }
        }
        this.addCount(1L, binCount);
        return null;
    }
    
    public void putAll(final Map<? extends Character, ? extends V> m) {
        this.tryPresize(m.size());
        for (final Map.Entry<? extends Character, ? extends V> e : m.entrySet()) {
            this.putVal((char)e.getKey(), e.getValue(), false);
        }
    }
    
    public void putAll(final Char2ObjectConcurrentHashMap<? extends V> m) {
        this.tryPresize(m.size());
        for (final Char2ObjectMap.Entry<? extends V> e : m.char2ObjectEntrySet()) {
            this.putVal(e.getCharKey(), e.getValue(), false);
        }
    }
    
    public void putAll(final Char2ObjectMap<V> m) {
        this.tryPresize(m.size());
        for (final Char2ObjectMap.Entry<? extends V> next : m.char2ObjectEntrySet()) {
            this.putVal(next.getCharKey(), next.getValue(), false);
        }
    }
    
    public V remove(final char key) {
        return this.replaceNode(key, null, null);
    }
    
    @Deprecated
    public V remove(final Character key) {
        return this.replaceNode(key, null, null);
    }
    
    @Deprecated
    public V remove(final Object key) {
        return this.remove((Character)key);
    }
    
    protected final V replaceNode(final char key, final V value, final Object cv) {
        if (key == this.EMPTY) {
            throw new IllegalArgumentException("Key is EMPTY: " + this.EMPTY);
        }
        final int hash = spread(Character.hashCode(key));
        Node<V>[] tab = this.table;
        int n;
        while (tab != null && (n = tab.length) != 0) {
            final int i;
            final Node<V> f;
            if ((f = tabAt(tab, i = (n - 1 & hash))) == null) {
                break;
            }
            final int fh;
            if ((fh = f.hash) == -1) {
                tab = this.helpTransfer(tab, f);
            }
            else {
                V oldVal = null;
                boolean validated = false;
                synchronized (f) {
                    Label_0399: {
                        if (tabAt(tab, i) == f) {
                            if (fh >= 0) {
                                validated = true;
                                Node<V> e = f;
                                Node<V> pred = null;
                                char ek;
                                while (e.hash != hash || ((ek = e.key) != key && (ek == this.EMPTY || key != ek))) {
                                    pred = e;
                                    if ((e = e.next) == null) {
                                        break Label_0399;
                                    }
                                }
                                final V ev = e.val;
                                if (cv == null || cv == ev || (ev != null && cv.equals(ev))) {
                                    oldVal = ev;
                                    if (value != null) {
                                        e.val = value;
                                    }
                                    else if (pred != null) {
                                        pred.next = e.next;
                                    }
                                    else {
                                        setTabAt(tab, i, e.next);
                                    }
                                }
                            }
                            else if (f instanceof TreeBin) {
                                validated = true;
                                final TreeBin<V> t = (TreeBin)f;
                                final TreeNode<V> r;
                                final TreeNode<V> p;
                                if ((r = t.root) != null && (p = r.findTreeNode(hash, key, null)) != null) {
                                    final V pv = p.val;
                                    if (cv == null || cv == pv || (pv != null && cv.equals(pv))) {
                                        oldVal = pv;
                                        if (value != null) {
                                            p.val = value;
                                        }
                                        else if (t.removeTreeNode(p)) {
                                            setTabAt(tab, i, (Node<V>)this.untreeify((Node<V>)t.first));
                                        }
                                    }
                                }
                            }
                        }
                    }
                }
                if (!validated) {
                    continue;
                }
                if (oldVal != null) {
                    if (value == null) {
                        this.addCount(-1L, -1);
                    }
                    return oldVal;
                }
                break;
            }
        }
        return null;
    }
    
    public void clear() {
        long delta = 0L;
        int i = 0;
        Node<V>[] tab = this.table;
        while (tab != null && i < tab.length) {
            final Node<V> f = tabAt(tab, i);
            if (f == null) {
                ++i;
            }
            else {
                final int fh;
                if ((fh = f.hash) == -1) {
                    tab = this.helpTransfer(tab, f);
                    i = 0;
                }
                else {
                    synchronized (f) {
                        if (tabAt(tab, i) != f) {
                            continue;
                        }
                        final Object o = (fh >= 0) ? f : ((f instanceof TreeBin) ? ((TreeBin)f).first : null);
                        Node<V> p = f;
                        while (f != null) {
                            --delta;
                            p = f.next;
                        }
                        setTabAt(tab, i++, null);
                    }
                }
            }
        }
        if (delta != 0L) {
            this.addCount(delta, -1);
        }
    }
    
    public KeySetView<V> keySet() {
        final KeySetView<V> ks;
        return ((ks = this.keySet) != null) ? ks : (this.keySet = this.buildKeySetView());
    }
    
    protected KeySetView<V> buildKeySetView() {
        return new KeySetView<V>(this, null);
    }
    
    public FastCollection<V> values() {
        final ValuesView<V> vs;
        return ((vs = this.values) != null) ? vs : (this.values = this.buildValuesView());
    }
    
    protected ValuesView<V> buildValuesView() {
        return new ValuesView<V>(this);
    }
    
    public ObjectSet<Char2ObjectMap.Entry<V>> char2ObjectEntrySet() {
        final EntrySetView<V> es;
        return ((es = this.entrySet) != null) ? es : (this.entrySet = this.buildEntrySetView());
    }
    
    @Deprecated
    public ObjectSet<Map.Entry<Character, V>> entrySet() {
        return (ObjectSet<Map.Entry<Character, V>>)this.char2ObjectEntrySet();
    }
    
    protected EntrySetView<V> buildEntrySetView() {
        return new EntrySetView<V>(this);
    }
    
    @Override
    public int hashCode() {
        int h = 0;
        final Node<V>[] tt;
        if ((tt = this.table) != null) {
            Node<V>[] tab = tt;
            Node<V> next = null;
            TableStack<V> stack = null;
            TableStack<V> spare = null;
            int index = 0;
            int baseIndex = 0;
            final int baseLimit = tt.length;
            final int baseSize = tt.length;
        Label_0364_Outer:
            while (true) {
                Node<V> p = null;
                if ((p = next) != null) {
                    p = p.next;
                }
                while (true) {
                    while (p == null) {
                        final Node<V>[] t;
                        int n;
                        final int i;
                        if (baseIndex >= baseLimit || (t = tab) == null || (n = t.length) <= (i = index) || i < 0) {
                            next = null;
                            if (p == null) {
                                break Label_0364_Outer;
                            }
                            h += (Character.hashCode(p.key) ^ p.val.hashCode());
                            continue Label_0364_Outer;
                        }
                        else {
                            if ((p = tabAt(t, i)) != null && p.hash < 0) {
                                if (p instanceof final ForwardingNode forwardingNode) {
                                    tab = (Node<V>[])forwardingNode.nextTable;
                                    p = null;
                                    TableStack<V> s = spare;
                                    if (s != null) {
                                        spare = s.next;
                                    }
                                    else {
                                        s = new TableStack<V>();
                                    }
                                    s.tab = t;
                                    s.length = n;
                                    s.index = i;
                                    s.next = stack;
                                    stack = s;
                                    continue Label_0364_Outer;
                                }
                                if (p instanceof final TreeBin treeBin) {
                                    p = (Node<V>)treeBin.first;
                                }
                                else {
                                    p = null;
                                }
                            }
                            if (stack != null) {
                                TableStack<V> s;
                                int len;
                                while ((s = stack) != null && (index += (len = s.length)) >= n) {
                                    n = len;
                                    index = s.index;
                                    tab = s.tab;
                                    s.tab = null;
                                    final TableStack<V> anext = s.next;
                                    s.next = spare;
                                    stack = anext;
                                    spare = s;
                                }
                                if (s != null || (index += baseSize) < n) {
                                    continue Label_0364_Outer;
                                }
                                index = ++baseIndex;
                            }
                            else {
                                if ((index = i + baseSize) < n) {
                                    continue Label_0364_Outer;
                                }
                                index = ++baseIndex;
                            }
                        }
                    }
                    next = p;
                    continue;
                }
            }
        }
        return h;
    }
    
    @Override
    public String toString() {
        final Node<V>[] t;
        final int f = ((t = this.table) == null) ? 0 : t.length;
        final Traverser<V> it = new Traverser<V>(t, f, 0, f);
        final StringBuilder sb = new StringBuilder();
        sb.append('{');
        Node<V> p;
        if ((p = it.advance()) != null) {
            while (true) {
                final char k = p.key;
                final V v = p.val;
                sb.append(k);
                sb.append('=');
                sb.append((v == this) ? "(this Map)" : v);
                if ((p = it.advance()) == null) {
                    break;
                }
                sb.append(',').append(' ');
            }
        }
        return sb.append('}').toString();
    }
    
    @Override
    public boolean equals(final Object o) {
        if (o != this) {
            if (!(o instanceof Char2ObjectConcurrentHashMap)) {
                return false;
            }
            final Char2ObjectConcurrentHashMap<?> m = (Char2ObjectConcurrentHashMap<?>)o;
            final Node<V>[] t;
            final int f = ((t = this.table) == null) ? 0 : t.length;
            final Traverser<V> it = new Traverser<V>(t, f, 0, f);
            Node<V> p;
            while ((p = it.advance()) != null) {
                final V val = p.val;
                final Object v = m.get(p.key);
                if (v == null || (v != val && !v.equals(val))) {
                    return false;
                }
            }
            for (final Char2ObjectMap.Entry<?> e : m.char2ObjectEntrySet()) {
                final char mk;
                final Object mv;
                final Object v2;
                if ((mk = e.getCharKey()) == m.EMPTY || (mv = e.getValue()) == null || (v2 = this.get(mk)) == null || (mv != v2 && !mv.equals(v2))) {
                    return false;
                }
            }
        }
        return true;
    }
    
    public V putIfAbsent(final char key, final V value) {
        return this.putVal(key, value, true);
    }
    
    public boolean remove(final char key, final Object value) {
        if (key == this.EMPTY) {
            throw new IllegalArgumentException("Key is EMPTY: " + this.EMPTY);
        }
        return value != null && this.replaceNode(key, null, value) != null;
    }
    
    public boolean replace(final char key, final V oldValue, final V newValue) {
        if (key == this.EMPTY) {
            throw new IllegalArgumentException("Key is EMPTY: " + this.EMPTY);
        }
        if (oldValue == null || newValue == null) {
            throw new NullPointerException();
        }
        return this.replaceNode(key, newValue, oldValue) != null;
    }
    
    public V replace(final char key, final V value) {
        if (key == this.EMPTY) {
            throw new IllegalArgumentException("Key is EMPTY: " + this.EMPTY);
        }
        if (value == null) {
            throw new NullPointerException();
        }
        return this.replaceNode(key, value, null);
    }
    
    public V getOrDefault(final char key, final V defaultValue) {
        final V v;
        return ((v = this.get(key)) == null) ? defaultValue : v;
    }
    
    public int forEach(final CharObjConsumer<? super V> action) {
        if (action == null) {
            throw new NullPointerException();
        }
        int count = 0;
        final Node<V>[] tt;
        if ((tt = this.table) != null) {
            Node<V>[] tab = tt;
            Node<V> next = null;
            TableStack<V> stack = null;
            TableStack<V> spare = null;
            int index = 0;
            int baseIndex = 0;
            final int baseLimit = tt.length;
            final int baseSize = tt.length;
        Label_0380_Outer:
            while (true) {
                Node<V> p = null;
                if ((p = next) != null) {
                    p = p.next;
                }
                while (true) {
                    while (p == null) {
                        final Node<V>[] t;
                        int n;
                        final int i;
                        if (baseIndex >= baseLimit || (t = tab) == null || (n = t.length) <= (i = index) || i < 0) {
                            next = null;
                            if (p == null) {
                                break Label_0380_Outer;
                            }
                            action.accept(p.key, p.val);
                            ++count;
                            continue Label_0380_Outer;
                        }
                        else {
                            if ((p = tabAt(t, i)) != null && p.hash < 0) {
                                if (p instanceof final ForwardingNode forwardingNode) {
                                    tab = (Node<V>[])forwardingNode.nextTable;
                                    p = null;
                                    TableStack<V> s = spare;
                                    if (s != null) {
                                        spare = s.next;
                                    }
                                    else {
                                        s = new TableStack<V>();
                                    }
                                    s.tab = t;
                                    s.length = n;
                                    s.index = i;
                                    s.next = stack;
                                    stack = s;
                                    continue Label_0380_Outer;
                                }
                                if (p instanceof final TreeBin treeBin) {
                                    p = (Node<V>)treeBin.first;
                                }
                                else {
                                    p = null;
                                }
                            }
                            if (stack != null) {
                                TableStack<V> s;
                                int len;
                                while ((s = stack) != null && (index += (len = s.length)) >= n) {
                                    n = len;
                                    index = s.index;
                                    tab = s.tab;
                                    s.tab = null;
                                    final TableStack<V> anext = s.next;
                                    s.next = spare;
                                    stack = anext;
                                    spare = s;
                                }
                                if (s != null || (index += baseSize) < n) {
                                    continue Label_0380_Outer;
                                }
                                index = ++baseIndex;
                            }
                            else {
                                if ((index = i + baseSize) < n) {
                                    continue Label_0380_Outer;
                                }
                                index = ++baseIndex;
                            }
                        }
                    }
                    next = p;
                    continue;
                }
            }
        }
        return count;
    }
    
    public <X> int forEach(final CharBiObjConsumer<? super V, X> action, final X x) {
        if (action == null) {
            throw new NullPointerException();
        }
        int count = 0;
        final Node<V>[] tt;
        if ((tt = this.table) != null) {
            Node<V>[] tab = tt;
            Node<V> next = null;
            TableStack<V> stack = null;
            TableStack<V> spare = null;
            int index = 0;
            int baseIndex = 0;
            final int baseLimit = tt.length;
            final int baseSize = tt.length;
        Label_0384_Outer:
            while (true) {
                Node<V> p = null;
                if ((p = next) != null) {
                    p = p.next;
                }
                while (true) {
                    while (p == null) {
                        final Node<V>[] t;
                        int n;
                        final int i;
                        if (baseIndex >= baseLimit || (t = tab) == null || (n = t.length) <= (i = index) || i < 0) {
                            next = null;
                            if (p == null) {
                                break Label_0384_Outer;
                            }
                            action.accept(p.key, p.val, x);
                            ++count;
                            continue Label_0384_Outer;
                        }
                        else {
                            if ((p = tabAt(t, i)) != null && p.hash < 0) {
                                if (p instanceof final ForwardingNode forwardingNode) {
                                    tab = (Node<V>[])forwardingNode.nextTable;
                                    p = null;
                                    TableStack<V> s = spare;
                                    if (s != null) {
                                        spare = s.next;
                                    }
                                    else {
                                        s = new TableStack<V>();
                                    }
                                    s.tab = t;
                                    s.length = n;
                                    s.index = i;
                                    s.next = stack;
                                    stack = s;
                                    continue Label_0384_Outer;
                                }
                                if (p instanceof final TreeBin treeBin) {
                                    p = (Node<V>)treeBin.first;
                                }
                                else {
                                    p = null;
                                }
                            }
                            if (stack != null) {
                                TableStack<V> s;
                                int len;
                                while ((s = stack) != null && (index += (len = s.length)) >= n) {
                                    n = len;
                                    index = s.index;
                                    tab = s.tab;
                                    s.tab = null;
                                    final TableStack<V> anext = s.next;
                                    s.next = spare;
                                    stack = anext;
                                    spare = s;
                                }
                                if (s != null || (index += baseSize) < n) {
                                    continue Label_0384_Outer;
                                }
                                index = ++baseIndex;
                            }
                            else {
                                if ((index = i + baseSize) < n) {
                                    continue Label_0384_Outer;
                                }
                                index = ++baseIndex;
                            }
                        }
                    }
                    next = p;
                    continue;
                }
            }
        }
        return count;
    }
    
    public <X, Y> int forEach(final CharTriObjConsumer<? super V, X, Y> action, final X x, final Y y) {
        if (action == null) {
            throw new NullPointerException();
        }
        int count = 0;
        final Node<V>[] tt;
        if ((tt = this.table) != null) {
            Node<V>[] tab = tt;
            Node<V> next = null;
            TableStack<V> stack = null;
            TableStack<V> spare = null;
            int index = 0;
            int baseIndex = 0;
            final int baseLimit = tt.length;
            final int baseSize = tt.length;
        Label_0385_Outer:
            while (true) {
                Node<V> p = null;
                if ((p = next) != null) {
                    p = p.next;
                }
                while (true) {
                    while (p == null) {
                        final Node<V>[] t;
                        int n;
                        final int i;
                        if (baseIndex >= baseLimit || (t = tab) == null || (n = t.length) <= (i = index) || i < 0) {
                            next = null;
                            if (p == null) {
                                break Label_0385_Outer;
                            }
                            action.accept(p.key, p.val, x, y);
                            ++count;
                            continue Label_0385_Outer;
                        }
                        else {
                            if ((p = tabAt(t, i)) != null && p.hash < 0) {
                                if (p instanceof final ForwardingNode forwardingNode) {
                                    tab = (Node<V>[])forwardingNode.nextTable;
                                    p = null;
                                    TableStack<V> s = spare;
                                    if (s != null) {
                                        spare = s.next;
                                    }
                                    else {
                                        s = new TableStack<V>();
                                    }
                                    s.tab = t;
                                    s.length = n;
                                    s.index = i;
                                    s.next = stack;
                                    stack = s;
                                    continue Label_0385_Outer;
                                }
                                if (p instanceof final TreeBin treeBin) {
                                    p = (Node<V>)treeBin.first;
                                }
                                else {
                                    p = null;
                                }
                            }
                            if (stack != null) {
                                TableStack<V> s;
                                int len;
                                while ((s = stack) != null && (index += (len = s.length)) >= n) {
                                    n = len;
                                    index = s.index;
                                    tab = s.tab;
                                    s.tab = null;
                                    final TableStack<V> anext = s.next;
                                    s.next = spare;
                                    stack = anext;
                                    spare = s;
                                }
                                if (s != null || (index += baseSize) < n) {
                                    continue Label_0385_Outer;
                                }
                                index = ++baseIndex;
                            }
                            else {
                                if ((index = i + baseSize) < n) {
                                    continue Label_0385_Outer;
                                }
                                index = ++baseIndex;
                            }
                        }
                    }
                    next = p;
                    continue;
                }
            }
        }
        return count;
    }
    
    public int forEachWithByte(final CharObjByteConsumer<? super V> action, final byte ii) {
        if (action == null) {
            throw new NullPointerException();
        }
        int count = 0;
        final Node<V>[] tt;
        if ((tt = this.table) != null) {
            Node<V>[] tab = tt;
            Node<V> next = null;
            TableStack<V> stack = null;
            TableStack<V> spare = null;
            int index = 0;
            int baseIndex = 0;
            final int baseLimit = tt.length;
            final int baseSize = tt.length;
        Label_0384_Outer:
            while (true) {
                Node<V> p = null;
                if ((p = next) != null) {
                    p = p.next;
                }
                while (true) {
                    while (p == null) {
                        final Node<V>[] t;
                        int n;
                        final int i;
                        if (baseIndex >= baseLimit || (t = tab) == null || (n = t.length) <= (i = index) || i < 0) {
                            next = null;
                            if (p == null) {
                                break Label_0384_Outer;
                            }
                            action.accept(p.key, p.val, ii);
                            ++count;
                            continue Label_0384_Outer;
                        }
                        else {
                            if ((p = tabAt(t, i)) != null && p.hash < 0) {
                                if (p instanceof final ForwardingNode forwardingNode) {
                                    tab = (Node<V>[])forwardingNode.nextTable;
                                    p = null;
                                    TableStack<V> s = spare;
                                    if (s != null) {
                                        spare = s.next;
                                    }
                                    else {
                                        s = new TableStack<V>();
                                    }
                                    s.tab = t;
                                    s.length = n;
                                    s.index = i;
                                    s.next = stack;
                                    stack = s;
                                    continue Label_0384_Outer;
                                }
                                if (p instanceof final TreeBin treeBin) {
                                    p = (Node<V>)treeBin.first;
                                }
                                else {
                                    p = null;
                                }
                            }
                            if (stack != null) {
                                TableStack<V> s;
                                int len;
                                while ((s = stack) != null && (index += (len = s.length)) >= n) {
                                    n = len;
                                    index = s.index;
                                    tab = s.tab;
                                    s.tab = null;
                                    final TableStack<V> anext = s.next;
                                    s.next = spare;
                                    stack = anext;
                                    spare = s;
                                }
                                if (s != null || (index += baseSize) < n) {
                                    continue Label_0384_Outer;
                                }
                                index = ++baseIndex;
                            }
                            else {
                                if ((index = i + baseSize) < n) {
                                    continue Label_0384_Outer;
                                }
                                index = ++baseIndex;
                            }
                        }
                    }
                    next = p;
                    continue;
                }
            }
        }
        return count;
    }
    
    public int forEachWithShort(final CharObjShortConsumer<? super V> action, final short ii) {
        if (action == null) {
            throw new NullPointerException();
        }
        int count = 0;
        final Node<V>[] tt;
        if ((tt = this.table) != null) {
            Node<V>[] tab = tt;
            Node<V> next = null;
            TableStack<V> stack = null;
            TableStack<V> spare = null;
            int index = 0;
            int baseIndex = 0;
            final int baseLimit = tt.length;
            final int baseSize = tt.length;
        Label_0384_Outer:
            while (true) {
                Node<V> p = null;
                if ((p = next) != null) {
                    p = p.next;
                }
                while (true) {
                    while (p == null) {
                        final Node<V>[] t;
                        int n;
                        final int i;
                        if (baseIndex >= baseLimit || (t = tab) == null || (n = t.length) <= (i = index) || i < 0) {
                            next = null;
                            if (p == null) {
                                break Label_0384_Outer;
                            }
                            action.accept(p.key, p.val, ii);
                            ++count;
                            continue Label_0384_Outer;
                        }
                        else {
                            if ((p = tabAt(t, i)) != null && p.hash < 0) {
                                if (p instanceof final ForwardingNode forwardingNode) {
                                    tab = (Node<V>[])forwardingNode.nextTable;
                                    p = null;
                                    TableStack<V> s = spare;
                                    if (s != null) {
                                        spare = s.next;
                                    }
                                    else {
                                        s = new TableStack<V>();
                                    }
                                    s.tab = t;
                                    s.length = n;
                                    s.index = i;
                                    s.next = stack;
                                    stack = s;
                                    continue Label_0384_Outer;
                                }
                                if (p instanceof final TreeBin treeBin) {
                                    p = (Node<V>)treeBin.first;
                                }
                                else {
                                    p = null;
                                }
                            }
                            if (stack != null) {
                                TableStack<V> s;
                                int len;
                                while ((s = stack) != null && (index += (len = s.length)) >= n) {
                                    n = len;
                                    index = s.index;
                                    tab = s.tab;
                                    s.tab = null;
                                    final TableStack<V> anext = s.next;
                                    s.next = spare;
                                    stack = anext;
                                    spare = s;
                                }
                                if (s != null || (index += baseSize) < n) {
                                    continue Label_0384_Outer;
                                }
                                index = ++baseIndex;
                            }
                            else {
                                if ((index = i + baseSize) < n) {
                                    continue Label_0384_Outer;
                                }
                                index = ++baseIndex;
                            }
                        }
                    }
                    next = p;
                    continue;
                }
            }
        }
        return count;
    }
    
    public int forEachWithInt(final CharObjIntConsumer<? super V> action, final int ii) {
        if (action == null) {
            throw new NullPointerException();
        }
        int count = 0;
        final Node<V>[] tt;
        if ((tt = this.table) != null) {
            Node<V>[] tab = tt;
            Node<V> next = null;
            TableStack<V> stack = null;
            TableStack<V> spare = null;
            int index = 0;
            int baseIndex = 0;
            final int baseLimit = tt.length;
            final int baseSize = tt.length;
        Label_0384_Outer:
            while (true) {
                Node<V> p = null;
                if ((p = next) != null) {
                    p = p.next;
                }
                while (true) {
                    while (p == null) {
                        final Node<V>[] t;
                        int n;
                        final int i;
                        if (baseIndex >= baseLimit || (t = tab) == null || (n = t.length) <= (i = index) || i < 0) {
                            next = null;
                            if (p == null) {
                                break Label_0384_Outer;
                            }
                            action.accept(p.key, p.val, ii);
                            ++count;
                            continue Label_0384_Outer;
                        }
                        else {
                            if ((p = tabAt(t, i)) != null && p.hash < 0) {
                                if (p instanceof final ForwardingNode forwardingNode) {
                                    tab = (Node<V>[])forwardingNode.nextTable;
                                    p = null;
                                    TableStack<V> s = spare;
                                    if (s != null) {
                                        spare = s.next;
                                    }
                                    else {
                                        s = new TableStack<V>();
                                    }
                                    s.tab = t;
                                    s.length = n;
                                    s.index = i;
                                    s.next = stack;
                                    stack = s;
                                    continue Label_0384_Outer;
                                }
                                if (p instanceof final TreeBin treeBin) {
                                    p = (Node<V>)treeBin.first;
                                }
                                else {
                                    p = null;
                                }
                            }
                            if (stack != null) {
                                TableStack<V> s;
                                int len;
                                while ((s = stack) != null && (index += (len = s.length)) >= n) {
                                    n = len;
                                    index = s.index;
                                    tab = s.tab;
                                    s.tab = null;
                                    final TableStack<V> anext = s.next;
                                    s.next = spare;
                                    stack = anext;
                                    spare = s;
                                }
                                if (s != null || (index += baseSize) < n) {
                                    continue Label_0384_Outer;
                                }
                                index = ++baseIndex;
                            }
                            else {
                                if ((index = i + baseSize) < n) {
                                    continue Label_0384_Outer;
                                }
                                index = ++baseIndex;
                            }
                        }
                    }
                    next = p;
                    continue;
                }
            }
        }
        return count;
    }
    
    public int forEachWithLong(final CharObjLongConsumer<? super V> action, final long ii) {
        if (action == null) {
            throw new NullPointerException();
        }
        int count = 0;
        final Node<V>[] tt;
        if ((tt = this.table) != null) {
            Node<V>[] tab = tt;
            Node<V> next = null;
            TableStack<V> stack = null;
            TableStack<V> spare = null;
            int index = 0;
            int baseIndex = 0;
            final int baseLimit = tt.length;
            final int baseSize = tt.length;
        Label_0385_Outer:
            while (true) {
                Node<V> p = null;
                if ((p = next) != null) {
                    p = p.next;
                }
                while (true) {
                    while (p == null) {
                        final Node<V>[] t;
                        int n;
                        final int i;
                        if (baseIndex >= baseLimit || (t = tab) == null || (n = t.length) <= (i = index) || i < 0) {
                            next = null;
                            if (p == null) {
                                break Label_0385_Outer;
                            }
                            action.accept(p.key, p.val, ii);
                            ++count;
                            continue Label_0385_Outer;
                        }
                        else {
                            if ((p = tabAt(t, i)) != null && p.hash < 0) {
                                if (p instanceof final ForwardingNode forwardingNode) {
                                    tab = (Node<V>[])forwardingNode.nextTable;
                                    p = null;
                                    TableStack<V> s = spare;
                                    if (s != null) {
                                        spare = s.next;
                                    }
                                    else {
                                        s = new TableStack<V>();
                                    }
                                    s.tab = t;
                                    s.length = n;
                                    s.index = i;
                                    s.next = stack;
                                    stack = s;
                                    continue Label_0385_Outer;
                                }
                                if (p instanceof final TreeBin treeBin) {
                                    p = (Node<V>)treeBin.first;
                                }
                                else {
                                    p = null;
                                }
                            }
                            if (stack != null) {
                                TableStack<V> s;
                                int len;
                                while ((s = stack) != null && (index += (len = s.length)) >= n) {
                                    n = len;
                                    index = s.index;
                                    tab = s.tab;
                                    s.tab = null;
                                    final TableStack<V> anext = s.next;
                                    s.next = spare;
                                    stack = anext;
                                    spare = s;
                                }
                                if (s != null || (index += baseSize) < n) {
                                    continue Label_0385_Outer;
                                }
                                index = ++baseIndex;
                            }
                            else {
                                if ((index = i + baseSize) < n) {
                                    continue Label_0385_Outer;
                                }
                                index = ++baseIndex;
                            }
                        }
                    }
                    next = p;
                    continue;
                }
            }
        }
        return count;
    }
    
    public int forEachWithFloat(final CharObjFloatConsumer<? super V> action, final float ii) {
        if (action == null) {
            throw new NullPointerException();
        }
        int count = 0;
        final Node<V>[] tt;
        if ((tt = this.table) != null) {
            Node<V>[] tab = tt;
            Node<V> next = null;
            TableStack<V> stack = null;
            TableStack<V> spare = null;
            int index = 0;
            int baseIndex = 0;
            final int baseLimit = tt.length;
            final int baseSize = tt.length;
        Label_0384_Outer:
            while (true) {
                Node<V> p = null;
                if ((p = next) != null) {
                    p = p.next;
                }
                while (true) {
                    while (p == null) {
                        final Node<V>[] t;
                        int n;
                        final int i;
                        if (baseIndex >= baseLimit || (t = tab) == null || (n = t.length) <= (i = index) || i < 0) {
                            next = null;
                            if (p == null) {
                                break Label_0384_Outer;
                            }
                            action.accept(p.key, p.val, ii);
                            ++count;
                            continue Label_0384_Outer;
                        }
                        else {
                            if ((p = tabAt(t, i)) != null && p.hash < 0) {
                                if (p instanceof final ForwardingNode forwardingNode) {
                                    tab = (Node<V>[])forwardingNode.nextTable;
                                    p = null;
                                    TableStack<V> s = spare;
                                    if (s != null) {
                                        spare = s.next;
                                    }
                                    else {
                                        s = new TableStack<V>();
                                    }
                                    s.tab = t;
                                    s.length = n;
                                    s.index = i;
                                    s.next = stack;
                                    stack = s;
                                    continue Label_0384_Outer;
                                }
                                if (p instanceof final TreeBin treeBin) {
                                    p = (Node<V>)treeBin.first;
                                }
                                else {
                                    p = null;
                                }
                            }
                            if (stack != null) {
                                TableStack<V> s;
                                int len;
                                while ((s = stack) != null && (index += (len = s.length)) >= n) {
                                    n = len;
                                    index = s.index;
                                    tab = s.tab;
                                    s.tab = null;
                                    final TableStack<V> anext = s.next;
                                    s.next = spare;
                                    stack = anext;
                                    spare = s;
                                }
                                if (s != null || (index += baseSize) < n) {
                                    continue Label_0384_Outer;
                                }
                                index = ++baseIndex;
                            }
                            else {
                                if ((index = i + baseSize) < n) {
                                    continue Label_0384_Outer;
                                }
                                index = ++baseIndex;
                            }
                        }
                    }
                    next = p;
                    continue;
                }
            }
        }
        return count;
    }
    
    public int forEachWithDouble(final CharObjDoubleConsumer<? super V> action, final double ii) {
        if (action == null) {
            throw new NullPointerException();
        }
        int count = 0;
        final Node<V>[] tt;
        if ((tt = this.table) != null) {
            Node<V>[] tab = tt;
            Node<V> next = null;
            TableStack<V> stack = null;
            TableStack<V> spare = null;
            int index = 0;
            int baseIndex = 0;
            final int baseLimit = tt.length;
            final int baseSize = tt.length;
        Label_0385_Outer:
            while (true) {
                Node<V> p = null;
                if ((p = next) != null) {
                    p = p.next;
                }
                while (true) {
                    while (p == null) {
                        final Node<V>[] t;
                        int n;
                        final int i;
                        if (baseIndex >= baseLimit || (t = tab) == null || (n = t.length) <= (i = index) || i < 0) {
                            next = null;
                            if (p == null) {
                                break Label_0385_Outer;
                            }
                            action.accept(p.key, p.val, ii);
                            ++count;
                            continue Label_0385_Outer;
                        }
                        else {
                            if ((p = tabAt(t, i)) != null && p.hash < 0) {
                                if (p instanceof final ForwardingNode forwardingNode) {
                                    tab = (Node<V>[])forwardingNode.nextTable;
                                    p = null;
                                    TableStack<V> s = spare;
                                    if (s != null) {
                                        spare = s.next;
                                    }
                                    else {
                                        s = new TableStack<V>();
                                    }
                                    s.tab = t;
                                    s.length = n;
                                    s.index = i;
                                    s.next = stack;
                                    stack = s;
                                    continue Label_0385_Outer;
                                }
                                if (p instanceof final TreeBin treeBin) {
                                    p = (Node<V>)treeBin.first;
                                }
                                else {
                                    p = null;
                                }
                            }
                            if (stack != null) {
                                TableStack<V> s;
                                int len;
                                while ((s = stack) != null && (index += (len = s.length)) >= n) {
                                    n = len;
                                    index = s.index;
                                    tab = s.tab;
                                    s.tab = null;
                                    final TableStack<V> anext = s.next;
                                    s.next = spare;
                                    stack = anext;
                                    spare = s;
                                }
                                if (s != null || (index += baseSize) < n) {
                                    continue Label_0385_Outer;
                                }
                                index = ++baseIndex;
                            }
                            else {
                                if ((index = i + baseSize) < n) {
                                    continue Label_0385_Outer;
                                }
                                index = ++baseIndex;
                            }
                        }
                    }
                    next = p;
                    continue;
                }
            }
        }
        return count;
    }
    
    public <X> int forEachWithByte(final CharBiObjByteConsumer<? super V, X> action, final byte ii, final X x) {
        if (action == null) {
            throw new NullPointerException();
        }
        int count = 0;
        final Node<V>[] tt;
        if ((tt = this.table) != null) {
            Node<V>[] tab = tt;
            Node<V> next = null;
            TableStack<V> stack = null;
            TableStack<V> spare = null;
            int index = 0;
            int baseIndex = 0;
            final int baseLimit = tt.length;
            final int baseSize = tt.length;
        Label_0385_Outer:
            while (true) {
                Node<V> p = null;
                if ((p = next) != null) {
                    p = p.next;
                }
                while (true) {
                    while (p == null) {
                        final Node<V>[] t;
                        int n;
                        final int i;
                        if (baseIndex >= baseLimit || (t = tab) == null || (n = t.length) <= (i = index) || i < 0) {
                            next = null;
                            if (p == null) {
                                break Label_0385_Outer;
                            }
                            action.accept(p.key, p.val, ii, x);
                            ++count;
                            continue Label_0385_Outer;
                        }
                        else {
                            if ((p = tabAt(t, i)) != null && p.hash < 0) {
                                if (p instanceof final ForwardingNode forwardingNode) {
                                    tab = (Node<V>[])forwardingNode.nextTable;
                                    p = null;
                                    TableStack<V> s = spare;
                                    if (s != null) {
                                        spare = s.next;
                                    }
                                    else {
                                        s = new TableStack<V>();
                                    }
                                    s.tab = t;
                                    s.length = n;
                                    s.index = i;
                                    s.next = stack;
                                    stack = s;
                                    continue Label_0385_Outer;
                                }
                                if (p instanceof final TreeBin treeBin) {
                                    p = (Node<V>)treeBin.first;
                                }
                                else {
                                    p = null;
                                }
                            }
                            if (stack != null) {
                                TableStack<V> s;
                                int len;
                                while ((s = stack) != null && (index += (len = s.length)) >= n) {
                                    n = len;
                                    index = s.index;
                                    tab = s.tab;
                                    s.tab = null;
                                    final TableStack<V> anext = s.next;
                                    s.next = spare;
                                    stack = anext;
                                    spare = s;
                                }
                                if (s != null || (index += baseSize) < n) {
                                    continue Label_0385_Outer;
                                }
                                index = ++baseIndex;
                            }
                            else {
                                if ((index = i + baseSize) < n) {
                                    continue Label_0385_Outer;
                                }
                                index = ++baseIndex;
                            }
                        }
                    }
                    next = p;
                    continue;
                }
            }
        }
        return count;
    }
    
    public <X> int forEachWithShort(final CharBiObjShortConsumer<? super V, X> action, final short ii, final X x) {
        if (action == null) {
            throw new NullPointerException();
        }
        int count = 0;
        final Node<V>[] tt;
        if ((tt = this.table) != null) {
            Node<V>[] tab = tt;
            Node<V> next = null;
            TableStack<V> stack = null;
            TableStack<V> spare = null;
            int index = 0;
            int baseIndex = 0;
            final int baseLimit = tt.length;
            final int baseSize = tt.length;
        Label_0385_Outer:
            while (true) {
                Node<V> p = null;
                if ((p = next) != null) {
                    p = p.next;
                }
                while (true) {
                    while (p == null) {
                        final Node<V>[] t;
                        int n;
                        final int i;
                        if (baseIndex >= baseLimit || (t = tab) == null || (n = t.length) <= (i = index) || i < 0) {
                            next = null;
                            if (p == null) {
                                break Label_0385_Outer;
                            }
                            action.accept(p.key, p.val, ii, x);
                            ++count;
                            continue Label_0385_Outer;
                        }
                        else {
                            if ((p = tabAt(t, i)) != null && p.hash < 0) {
                                if (p instanceof final ForwardingNode forwardingNode) {
                                    tab = (Node<V>[])forwardingNode.nextTable;
                                    p = null;
                                    TableStack<V> s = spare;
                                    if (s != null) {
                                        spare = s.next;
                                    }
                                    else {
                                        s = new TableStack<V>();
                                    }
                                    s.tab = t;
                                    s.length = n;
                                    s.index = i;
                                    s.next = stack;
                                    stack = s;
                                    continue Label_0385_Outer;
                                }
                                if (p instanceof final TreeBin treeBin) {
                                    p = (Node<V>)treeBin.first;
                                }
                                else {
                                    p = null;
                                }
                            }
                            if (stack != null) {
                                TableStack<V> s;
                                int len;
                                while ((s = stack) != null && (index += (len = s.length)) >= n) {
                                    n = len;
                                    index = s.index;
                                    tab = s.tab;
                                    s.tab = null;
                                    final TableStack<V> anext = s.next;
                                    s.next = spare;
                                    stack = anext;
                                    spare = s;
                                }
                                if (s != null || (index += baseSize) < n) {
                                    continue Label_0385_Outer;
                                }
                                index = ++baseIndex;
                            }
                            else {
                                if ((index = i + baseSize) < n) {
                                    continue Label_0385_Outer;
                                }
                                index = ++baseIndex;
                            }
                        }
                    }
                    next = p;
                    continue;
                }
            }
        }
        return count;
    }
    
    public <X> int forEachWithInt(final CharBiObjIntConsumer<? super V, X> action, final int ii, final X x) {
        if (action == null) {
            throw new NullPointerException();
        }
        int count = 0;
        final Node<V>[] tt;
        if ((tt = this.table) != null) {
            Node<V>[] tab = tt;
            Node<V> next = null;
            TableStack<V> stack = null;
            TableStack<V> spare = null;
            int index = 0;
            int baseIndex = 0;
            final int baseLimit = tt.length;
            final int baseSize = tt.length;
        Label_0385_Outer:
            while (true) {
                Node<V> p = null;
                if ((p = next) != null) {
                    p = p.next;
                }
                while (true) {
                    while (p == null) {
                        final Node<V>[] t;
                        int n;
                        final int i;
                        if (baseIndex >= baseLimit || (t = tab) == null || (n = t.length) <= (i = index) || i < 0) {
                            next = null;
                            if (p == null) {
                                break Label_0385_Outer;
                            }
                            action.accept(p.key, p.val, ii, x);
                            ++count;
                            continue Label_0385_Outer;
                        }
                        else {
                            if ((p = tabAt(t, i)) != null && p.hash < 0) {
                                if (p instanceof final ForwardingNode forwardingNode) {
                                    tab = (Node<V>[])forwardingNode.nextTable;
                                    p = null;
                                    TableStack<V> s = spare;
                                    if (s != null) {
                                        spare = s.next;
                                    }
                                    else {
                                        s = new TableStack<V>();
                                    }
                                    s.tab = t;
                                    s.length = n;
                                    s.index = i;
                                    s.next = stack;
                                    stack = s;
                                    continue Label_0385_Outer;
                                }
                                if (p instanceof final TreeBin treeBin) {
                                    p = (Node<V>)treeBin.first;
                                }
                                else {
                                    p = null;
                                }
                            }
                            if (stack != null) {
                                TableStack<V> s;
                                int len;
                                while ((s = stack) != null && (index += (len = s.length)) >= n) {
                                    n = len;
                                    index = s.index;
                                    tab = s.tab;
                                    s.tab = null;
                                    final TableStack<V> anext = s.next;
                                    s.next = spare;
                                    stack = anext;
                                    spare = s;
                                }
                                if (s != null || (index += baseSize) < n) {
                                    continue Label_0385_Outer;
                                }
                                index = ++baseIndex;
                            }
                            else {
                                if ((index = i + baseSize) < n) {
                                    continue Label_0385_Outer;
                                }
                                index = ++baseIndex;
                            }
                        }
                    }
                    next = p;
                    continue;
                }
            }
        }
        return count;
    }
    
    public <X> int forEachWithLong(final CharBiObjLongConsumer<? super V, X> action, final long ii, final X x) {
        if (action == null) {
            throw new NullPointerException();
        }
        int count = 0;
        final Node<V>[] tt;
        if ((tt = this.table) != null) {
            Node<V>[] tab = tt;
            Node<V> next = null;
            TableStack<V> stack = null;
            TableStack<V> spare = null;
            int index = 0;
            int baseIndex = 0;
            final int baseLimit = tt.length;
            final int baseSize = tt.length;
        Label_0385_Outer:
            while (true) {
                Node<V> p = null;
                if ((p = next) != null) {
                    p = p.next;
                }
                while (true) {
                    while (p == null) {
                        final Node<V>[] t;
                        int n;
                        final int i;
                        if (baseIndex >= baseLimit || (t = tab) == null || (n = t.length) <= (i = index) || i < 0) {
                            next = null;
                            if (p == null) {
                                break Label_0385_Outer;
                            }
                            action.accept(p.key, p.val, ii, x);
                            ++count;
                            continue Label_0385_Outer;
                        }
                        else {
                            if ((p = tabAt(t, i)) != null && p.hash < 0) {
                                if (p instanceof final ForwardingNode forwardingNode) {
                                    tab = (Node<V>[])forwardingNode.nextTable;
                                    p = null;
                                    TableStack<V> s = spare;
                                    if (s != null) {
                                        spare = s.next;
                                    }
                                    else {
                                        s = new TableStack<V>();
                                    }
                                    s.tab = t;
                                    s.length = n;
                                    s.index = i;
                                    s.next = stack;
                                    stack = s;
                                    continue Label_0385_Outer;
                                }
                                if (p instanceof final TreeBin treeBin) {
                                    p = (Node<V>)treeBin.first;
                                }
                                else {
                                    p = null;
                                }
                            }
                            if (stack != null) {
                                TableStack<V> s;
                                int len;
                                while ((s = stack) != null && (index += (len = s.length)) >= n) {
                                    n = len;
                                    index = s.index;
                                    tab = s.tab;
                                    s.tab = null;
                                    final TableStack<V> anext = s.next;
                                    s.next = spare;
                                    stack = anext;
                                    spare = s;
                                }
                                if (s != null || (index += baseSize) < n) {
                                    continue Label_0385_Outer;
                                }
                                index = ++baseIndex;
                            }
                            else {
                                if ((index = i + baseSize) < n) {
                                    continue Label_0385_Outer;
                                }
                                index = ++baseIndex;
                            }
                        }
                    }
                    next = p;
                    continue;
                }
            }
        }
        return count;
    }
    
    public <X> int forEachWithFloat(final CharBiObjFloatConsumer<? super V, X> action, final float ii, final X x) {
        if (action == null) {
            throw new NullPointerException();
        }
        int count = 0;
        final Node<V>[] tt;
        if ((tt = this.table) != null) {
            Node<V>[] tab = tt;
            Node<V> next = null;
            TableStack<V> stack = null;
            TableStack<V> spare = null;
            int index = 0;
            int baseIndex = 0;
            final int baseLimit = tt.length;
            final int baseSize = tt.length;
        Label_0385_Outer:
            while (true) {
                Node<V> p = null;
                if ((p = next) != null) {
                    p = p.next;
                }
                while (true) {
                    while (p == null) {
                        final Node<V>[] t;
                        int n;
                        final int i;
                        if (baseIndex >= baseLimit || (t = tab) == null || (n = t.length) <= (i = index) || i < 0) {
                            next = null;
                            if (p == null) {
                                break Label_0385_Outer;
                            }
                            action.accept(p.key, p.val, ii, x);
                            ++count;
                            continue Label_0385_Outer;
                        }
                        else {
                            if ((p = tabAt(t, i)) != null && p.hash < 0) {
                                if (p instanceof final ForwardingNode forwardingNode) {
                                    tab = (Node<V>[])forwardingNode.nextTable;
                                    p = null;
                                    TableStack<V> s = spare;
                                    if (s != null) {
                                        spare = s.next;
                                    }
                                    else {
                                        s = new TableStack<V>();
                                    }
                                    s.tab = t;
                                    s.length = n;
                                    s.index = i;
                                    s.next = stack;
                                    stack = s;
                                    continue Label_0385_Outer;
                                }
                                if (p instanceof final TreeBin treeBin) {
                                    p = (Node<V>)treeBin.first;
                                }
                                else {
                                    p = null;
                                }
                            }
                            if (stack != null) {
                                TableStack<V> s;
                                int len;
                                while ((s = stack) != null && (index += (len = s.length)) >= n) {
                                    n = len;
                                    index = s.index;
                                    tab = s.tab;
                                    s.tab = null;
                                    final TableStack<V> anext = s.next;
                                    s.next = spare;
                                    stack = anext;
                                    spare = s;
                                }
                                if (s != null || (index += baseSize) < n) {
                                    continue Label_0385_Outer;
                                }
                                index = ++baseIndex;
                            }
                            else {
                                if ((index = i + baseSize) < n) {
                                    continue Label_0385_Outer;
                                }
                                index = ++baseIndex;
                            }
                        }
                    }
                    next = p;
                    continue;
                }
            }
        }
        return count;
    }
    
    public <X> int forEachWithDouble(final CharBiObjDoubleConsumer<? super V, X> action, final double ii, final X x) {
        if (action == null) {
            throw new NullPointerException();
        }
        int count = 0;
        final Node<V>[] tt;
        if ((tt = this.table) != null) {
            Node<V>[] tab = tt;
            Node<V> next = null;
            TableStack<V> stack = null;
            TableStack<V> spare = null;
            int index = 0;
            int baseIndex = 0;
            final int baseLimit = tt.length;
            final int baseSize = tt.length;
        Label_0385_Outer:
            while (true) {
                Node<V> p = null;
                if ((p = next) != null) {
                    p = p.next;
                }
                while (true) {
                    while (p == null) {
                        final Node<V>[] t;
                        int n;
                        final int i;
                        if (baseIndex >= baseLimit || (t = tab) == null || (n = t.length) <= (i = index) || i < 0) {
                            next = null;
                            if (p == null) {
                                break Label_0385_Outer;
                            }
                            action.accept(p.key, p.val, ii, x);
                            ++count;
                            continue Label_0385_Outer;
                        }
                        else {
                            if ((p = tabAt(t, i)) != null && p.hash < 0) {
                                if (p instanceof final ForwardingNode forwardingNode) {
                                    tab = (Node<V>[])forwardingNode.nextTable;
                                    p = null;
                                    TableStack<V> s = spare;
                                    if (s != null) {
                                        spare = s.next;
                                    }
                                    else {
                                        s = new TableStack<V>();
                                    }
                                    s.tab = t;
                                    s.length = n;
                                    s.index = i;
                                    s.next = stack;
                                    stack = s;
                                    continue Label_0385_Outer;
                                }
                                if (p instanceof final TreeBin treeBin) {
                                    p = (Node<V>)treeBin.first;
                                }
                                else {
                                    p = null;
                                }
                            }
                            if (stack != null) {
                                TableStack<V> s;
                                int len;
                                while ((s = stack) != null && (index += (len = s.length)) >= n) {
                                    n = len;
                                    index = s.index;
                                    tab = s.tab;
                                    s.tab = null;
                                    final TableStack<V> anext = s.next;
                                    s.next = spare;
                                    stack = anext;
                                    spare = s;
                                }
                                if (s != null || (index += baseSize) < n) {
                                    continue Label_0385_Outer;
                                }
                                index = ++baseIndex;
                            }
                            else {
                                if ((index = i + baseSize) < n) {
                                    continue Label_0385_Outer;
                                }
                                index = ++baseIndex;
                            }
                        }
                    }
                    next = p;
                    continue;
                }
            }
        }
        return count;
    }
    
    public void replaceAll(final Char2ObjectOperator<V> function) {
        if (function == null) {
            throw new NullPointerException();
        }
        Label_0455: {
            final Node<V>[] tt;
            if ((tt = this.table) != null) {
                Node<V>[] tab = tt;
                Node<V> next = null;
                TableStack<V> stack = null;
                TableStack<V> spare = null;
                int index = 0;
                int baseIndex = 0;
                final int baseLimit = tt.length;
                final int baseSize = tt.length;
            Label_0374_Outer:
                while (true) {
                    Node<V> p = null;
                    if ((p = next) != null) {
                        p = p.next;
                    }
                    while (true) {
                        while (p == null) {
                            final Node<V>[] t;
                            int n;
                            final int i;
                            if (baseIndex >= baseLimit || (t = tab) == null || (n = t.length) <= (i = index) || i < 0) {
                                next = null;
                                if (p == null) {
                                    break Label_0455;
                                }
                                V oldValue = p.val;
                                final char key = p.key;
                                while (true) {
                                    final V newValue = function.apply(key, oldValue);
                                    if (newValue == null) {
                                        throw new NullPointerException();
                                    }
                                    if (this.replaceNode(key, newValue, oldValue) == null && (oldValue = this.get(key)) != null) {
                                        continue Label_0374_Outer;
                                    }
                                    continue Label_0374_Outer;
                                }
                            }
                            else {
                                if ((p = tabAt(t, i)) != null && p.hash < 0) {
                                    if (p instanceof final ForwardingNode forwardingNode) {
                                        tab = (Node<V>[])forwardingNode.nextTable;
                                        p = null;
                                        TableStack<V> s = spare;
                                        if (s != null) {
                                            spare = s.next;
                                        }
                                        else {
                                            s = new TableStack<V>();
                                        }
                                        s.tab = t;
                                        s.length = n;
                                        s.index = i;
                                        s.next = stack;
                                        stack = s;
                                        continue Label_0374_Outer;
                                    }
                                    if (p instanceof final TreeBin treeBin) {
                                        p = (Node<V>)treeBin.first;
                                    }
                                    else {
                                        p = null;
                                    }
                                }
                                if (stack != null) {
                                    TableStack<V> s;
                                    int len;
                                    while ((s = stack) != null && (index += (len = s.length)) >= n) {
                                        n = len;
                                        index = s.index;
                                        tab = s.tab;
                                        s.tab = null;
                                        final TableStack<V> anext = s.next;
                                        s.next = spare;
                                        stack = anext;
                                        spare = s;
                                    }
                                    if (s != null || (index += baseSize) < n) {
                                        continue Label_0374_Outer;
                                    }
                                    index = ++baseIndex;
                                }
                                else {
                                    if ((index = i + baseSize) < n) {
                                        continue Label_0374_Outer;
                                    }
                                    index = ++baseIndex;
                                }
                            }
                        }
                        next = p;
                        continue;
                    }
                }
            }
        }
    }
    
    public V computeIfAbsent(final char key, final CharFunction<? extends V> mappingFunction) {
        if (key == this.EMPTY) {
            throw new IllegalArgumentException("Key is EMPTY: " + this.EMPTY);
        }
        if (mappingFunction == null) {
            throw new NullPointerException();
        }
        final int h = spread(Character.hashCode(key));
        V val = null;
        int binCount = 0;
        Node<V>[] tab = this.table;
        while (true) {
            final int n;
            if (tab == null || (n = tab.length) == 0) {
                tab = this.initTable();
            }
            else {
                final int i;
                final Node<V> f;
                if ((f = tabAt(tab, i = (n - 1 & h))) == null) {
                    final Node<V> r = new ReservationNode<V>(this.EMPTY);
                    synchronized (r) {
                        if (casTabAt(tab, i, null, r)) {
                            binCount = 1;
                            Node<V> node = null;
                            try {
                                if ((val = (V)mappingFunction.apply(key)) != null) {
                                    node = new Node<V>(this.EMPTY, h, key, val, null);
                                }
                            }
                            finally {
                                setTabAt(tab, i, node);
                            }
                        }
                    }
                    if (binCount != 0) {
                        break;
                    }
                    continue;
                }
                else {
                    final int fh;
                    if ((fh = f.hash) == -1) {
                        tab = this.helpTransfer(tab, f);
                    }
                    else {
                        boolean added = false;
                        synchronized (f) {
                            Label_0467: {
                                if (tabAt(tab, i) == f) {
                                    if (fh >= 0) {
                                        binCount = 1;
                                        Node<V> e = f;
                                        char ek;
                                        while (e.hash != h || ((ek = e.key) != key && (ek == this.EMPTY || key != ek))) {
                                            final Node<V> pred = e;
                                            if ((e = e.next) == null) {
                                                if ((val = (V)mappingFunction.apply(key)) != null) {
                                                    added = true;
                                                    pred.next = (Node<V>)new Node<Object>(this.EMPTY, h, key, (V)val, null);
                                                }
                                                break Label_0467;
                                            }
                                            ++binCount;
                                        }
                                        val = e.val;
                                    }
                                    else if (f instanceof TreeBin) {
                                        binCount = 2;
                                        final TreeBin<V> t = (TreeBin)f;
                                        final TreeNode<V> r2;
                                        final TreeNode<V> p;
                                        if ((r2 = t.root) != null && (p = r2.findTreeNode(h, key, null)) != null) {
                                            val = p.val;
                                        }
                                        else if ((val = (V)mappingFunction.apply(key)) != null) {
                                            added = true;
                                            t.putTreeVal(h, key, val);
                                        }
                                    }
                                }
                            }
                        }
                        if (binCount == 0) {
                            continue;
                        }
                        if (binCount >= 8) {
                            this.treeifyBin(tab, i);
                        }
                        if (!added) {
                            return val;
                        }
                        break;
                    }
                }
            }
        }
        if (val != null) {
            this.addCount(1L, binCount);
        }
        return val;
    }
    
    public V computeIfPresent(final char key, final CharObjFunction<? super V, ? extends V> remappingFunction) {
        if (key == this.EMPTY) {
            throw new IllegalArgumentException("Key is EMPTY: " + this.EMPTY);
        }
        if (remappingFunction == null) {
            throw new NullPointerException();
        }
        final int h = spread(Character.hashCode(key));
        V val = null;
        int delta = 0;
        int binCount = 0;
        Node<V>[] tab = this.table;
        while (true) {
            final int n;
            if (tab == null || (n = tab.length) == 0) {
                tab = this.initTable();
            }
            else {
                final int i;
                final Node<V> f;
                if ((f = tabAt(tab, i = (n - 1 & h))) == null) {
                    break;
                }
                final int fh;
                if ((fh = f.hash) == -1) {
                    tab = this.helpTransfer(tab, f);
                }
                else {
                    synchronized (f) {
                        Label_0394: {
                            if (tabAt(tab, i) == f) {
                                if (fh >= 0) {
                                    binCount = 1;
                                    Node<V> e = f;
                                    Node<V> pred = null;
                                    char ek;
                                    while (f.hash != h || ((ek = f.key) != key && (ek == this.EMPTY || key != ek))) {
                                        pred = f;
                                        if ((e = f.next) == null) {
                                            break Label_0394;
                                        }
                                        ++binCount;
                                    }
                                    val = (V)remappingFunction.apply(key, f.val);
                                    if (val != null) {
                                        f.val = val;
                                    }
                                    else {
                                        delta = -1;
                                        final Node<V> en = f.next;
                                        if (pred != null) {
                                            pred.next = en;
                                        }
                                        else {
                                            setTabAt(tab, i, en);
                                        }
                                    }
                                }
                                else if (f instanceof TreeBin) {
                                    binCount = 2;
                                    final TreeBin<V> t = (TreeBin)f;
                                    final TreeNode<V> r;
                                    final TreeNode<V> p;
                                    if ((r = t.root) != null && (p = r.findTreeNode(h, key, null)) != null) {
                                        val = (V)remappingFunction.apply(key, p.val);
                                        if (val != null) {
                                            p.val = val;
                                        }
                                        else {
                                            delta = -1;
                                            if (t.removeTreeNode(p)) {
                                                setTabAt(tab, i, (Node<V>)this.untreeify((Node<V>)t.first));
                                            }
                                        }
                                    }
                                }
                            }
                        }
                    }
                    if (binCount != 0) {
                        break;
                    }
                    continue;
                }
            }
        }
        if (delta != 0) {
            this.addCount(delta, binCount);
        }
        return val;
    }
    
    public V compute(final char key, final CharObjFunction<? super V, ? extends V> remappingFunction) {
        if (key == this.EMPTY) {
            throw new IllegalArgumentException("Key is EMPTY: " + this.EMPTY);
        }
        if (remappingFunction == null) {
            throw new NullPointerException();
        }
        final int h = spread(Character.hashCode(key));
        V val = null;
        int delta = 0;
        int binCount = 0;
        Node<V>[] tab = this.table;
        while (true) {
            final int n;
            if (tab == null || (n = tab.length) == 0) {
                tab = this.initTable();
            }
            else {
                final int i;
                final Node<V> f;
                if ((f = tabAt(tab, i = (n - 1 & h))) == null) {
                    final Node<V> r = new ReservationNode<V>(this.EMPTY);
                    synchronized (r) {
                        if (casTabAt(tab, i, null, r)) {
                            binCount = 1;
                            Node<V> node = null;
                            try {
                                if ((val = (V)remappingFunction.apply(key, null)) != null) {
                                    delta = 1;
                                    node = new Node<V>(this.EMPTY, h, key, val, null);
                                }
                            }
                            finally {
                                setTabAt(tab, i, node);
                            }
                        }
                    }
                    if (binCount != 0) {
                        break;
                    }
                    continue;
                }
                else {
                    final int fh;
                    if ((fh = f.hash) == -1) {
                        tab = this.helpTransfer(tab, f);
                    }
                    else {
                        synchronized (f) {
                            Label_0595: {
                                if (tabAt(tab, i) == f) {
                                    if (fh >= 0) {
                                        binCount = 1;
                                        Node<V> e = f;
                                        Node<V> pred = null;
                                        char ek;
                                        while (f.hash != h || ((ek = f.key) != key && (ek == this.EMPTY || key != ek))) {
                                            pred = f;
                                            if ((e = f.next) == null) {
                                                val = (V)remappingFunction.apply(key, null);
                                                if (val != null) {
                                                    delta = 1;
                                                    f.next = (Node<V>)new Node<Object>(this.EMPTY, h, key, (V)val, null);
                                                }
                                                break Label_0595;
                                            }
                                            ++binCount;
                                        }
                                        val = (V)remappingFunction.apply(key, f.val);
                                        if (val != null) {
                                            f.val = val;
                                        }
                                        else {
                                            delta = -1;
                                            final Node<V> en = f.next;
                                            if (pred != null) {
                                                pred.next = en;
                                            }
                                            else {
                                                setTabAt(tab, i, en);
                                            }
                                        }
                                    }
                                    else if (f instanceof TreeBin) {
                                        binCount = 1;
                                        final TreeBin<V> t = (TreeBin)f;
                                        final TreeNode<V> r2;
                                        TreeNode<V> p;
                                        if ((r2 = t.root) != null) {
                                            p = r2.findTreeNode(h, key, null);
                                        }
                                        else {
                                            p = null;
                                        }
                                        final V pv = (p == null) ? null : p.val;
                                        val = (V)remappingFunction.apply(key, pv);
                                        if (val != null) {
                                            if (p != null) {
                                                p.val = val;
                                            }
                                            else {
                                                delta = 1;
                                                t.putTreeVal(h, key, val);
                                            }
                                        }
                                        else if (p != null) {
                                            delta = -1;
                                            if (t.removeTreeNode(p)) {
                                                setTabAt(tab, i, (Node<V>)this.untreeify((Node<V>)t.first));
                                            }
                                        }
                                    }
                                }
                            }
                        }
                        if (binCount == 0) {
                            continue;
                        }
                        if (binCount >= 8) {
                            this.treeifyBin(tab, i);
                            break;
                        }
                        break;
                    }
                }
            }
        }
        if (delta != 0) {
            this.addCount(delta, binCount);
        }
        return val;
    }
    
    public V merge(final char key, final V value, final BiFunction<? super V, ? super V, ? extends V> remappingFunction) {
        if (key == this.EMPTY) {
            throw new IllegalArgumentException("Key is EMPTY: " + this.EMPTY);
        }
        if (value == null || remappingFunction == null) {
            throw new NullPointerException();
        }
        final int h = spread(Character.hashCode(key));
        V val = null;
        int delta = 0;
        int binCount = 0;
        Node<V>[] tab = this.table;
        while (true) {
            final int n;
            if (tab == null || (n = tab.length) == 0) {
                tab = this.initTable();
            }
            else {
                final int i;
                final Node<V> f;
                if ((f = tabAt(tab, i = (n - 1 & h))) == null) {
                    if (casTabAt(tab, i, null, new Node<V>(this.EMPTY, h, key, value, null))) {
                        delta = 1;
                        val = value;
                        break;
                    }
                    continue;
                }
                else {
                    final int fh;
                    if ((fh = f.hash) == -1) {
                        tab = this.helpTransfer(tab, f);
                    }
                    else {
                        synchronized (f) {
                            Label_0500: {
                                if (tabAt(tab, i) == f) {
                                    if (fh >= 0) {
                                        binCount = 1;
                                        Node<V> e = f;
                                        Node<V> pred = null;
                                        char ek;
                                        while (f.hash != h || ((ek = f.key) != key && (ek == this.EMPTY || key != ek))) {
                                            pred = f;
                                            if ((e = f.next) == null) {
                                                delta = 1;
                                                val = value;
                                                f.next = (Node<V>)new Node<Object>(this.EMPTY, h, key, (V)val, null);
                                                break Label_0500;
                                            }
                                            ++binCount;
                                        }
                                        val = (V)remappingFunction.apply((Object)f.val, (Object)value);
                                        if (val != null) {
                                            f.val = val;
                                        }
                                        else {
                                            delta = -1;
                                            final Node<V> en = f.next;
                                            if (pred != null) {
                                                pred.next = en;
                                            }
                                            else {
                                                setTabAt(tab, i, en);
                                            }
                                        }
                                    }
                                    else if (f instanceof TreeBin) {
                                        binCount = 2;
                                        final TreeBin<V> t = (TreeBin)f;
                                        final TreeNode<V> r = t.root;
                                        final TreeNode<V> p = (r == null) ? null : r.findTreeNode(h, key, null);
                                        val = ((p == null) ? value : remappingFunction.apply((Object)p.val, (Object)value));
                                        if (val != null) {
                                            if (p != null) {
                                                p.val = val;
                                            }
                                            else {
                                                delta = 1;
                                                t.putTreeVal(h, key, val);
                                            }
                                        }
                                        else if (p != null) {
                                            delta = -1;
                                            if (t.removeTreeNode(p)) {
                                                setTabAt(tab, i, (Node<V>)this.untreeify((Node<V>)t.first));
                                            }
                                        }
                                    }
                                }
                            }
                        }
                        if (binCount == 0) {
                            continue;
                        }
                        if (binCount >= 8) {
                            this.treeifyBin(tab, i);
                            break;
                        }
                        break;
                    }
                }
            }
        }
        if (delta != 0) {
            this.addCount(delta, binCount);
        }
        return val;
    }
    
    public long mappingCount() {
        final long n = this.sumCount();
        return (n < 0L) ? 0L : n;
    }
    
    public static CharSet newKeySet() {
        return new KeySetView<Object>(new Char2ObjectConcurrentHashMap<Object>(), Boolean.TRUE);
    }
    
    public static KeySetView<Boolean> newKeySet(final int initialCapacity) {
        return new KeySetView<Boolean>(new Char2ObjectConcurrentHashMap<Boolean>(initialCapacity), Boolean.TRUE);
    }
    
    public KeySetView<V> keySet(final V mappedValue) {
        if (mappedValue == null) {
            throw new NullPointerException();
        }
        return new KeySetView<V>(this, mappedValue);
    }
    
    protected static final int resizeStamp(final int n) {
        return Integer.numberOfLeadingZeros(n) | 1 << Char2ObjectConcurrentHashMap.RESIZE_STAMP_BITS - 1;
    }
    
    protected final Node<V>[] initTable() {
        Node<V>[] tab;
        while ((tab = this.table) == null || tab.length == 0) {
            int sc;
            if ((sc = this.sizeCtl) < 0) {
                Thread.yield();
            }
            else {
                if (Char2ObjectConcurrentHashMap.U.compareAndSwapInt(this, Char2ObjectConcurrentHashMap.SIZECTL, sc, -1)) {
                    try {
                        if ((tab = this.table) == null || tab.length == 0) {
                            final int n = (sc > 0) ? sc : 16;
                            final Node<V>[] nt = new Node[n];
                            tab = (this.table = nt);
                            sc = n - (n >>> 2);
                        }
                    }
                    finally {
                        this.sizeCtl = sc;
                    }
                    break;
                }
                continue;
            }
        }
        return tab;
    }
    
    protected final void addCount(final long x, final int check) {
        long s = 0L;
        Label_0120: {
            final CounterCell[] as;
            if ((as = this.counterCells) == null) {
                final Unsafe u = Char2ObjectConcurrentHashMap.U;
                final long basecount = Char2ObjectConcurrentHashMap.BASECOUNT;
                final long b = this.baseCount;
                if (u.compareAndSwapLong(this, basecount, b, s = b + x)) {
                    break Label_0120;
                }
            }
            boolean uncontended = true;
            final int m;
            final CounterCell a;
            final long v;
            if (as == null || (m = as.length - 1) < 0 || (a = as[TLRUtil.getProbe() & m]) == null || !(uncontended = Char2ObjectConcurrentHashMap.U.compareAndSwapLong(a, Char2ObjectConcurrentHashMap.CELLVALUE, v = a.value, v + x))) {
                this.fullAddCount(x, uncontended);
                return;
            }
            if (check <= 1) {
                return;
            }
            s = this.sumCount();
        }
        if (check >= 0) {
            int sc;
            Node<V>[] tab;
            int n;
            while (s >= (sc = this.sizeCtl) && (tab = this.table) != null && (n = tab.length) < 1073741824) {
                final int rs = resizeStamp(n);
                if (sc < 0) {
                    final Node<V>[] nt;
                    if (sc >>> Char2ObjectConcurrentHashMap.RESIZE_STAMP_SHIFT != rs || sc == rs + 1 || sc == rs + Char2ObjectConcurrentHashMap.MAX_RESIZERS || (nt = this.nextTable) == null) {
                        break;
                    }
                    if (this.transferIndex <= 0) {
                        break;
                    }
                    if (Char2ObjectConcurrentHashMap.U.compareAndSwapInt(this, Char2ObjectConcurrentHashMap.SIZECTL, sc, sc + 1)) {
                        this.transfer(tab, nt);
                    }
                }
                else if (Char2ObjectConcurrentHashMap.U.compareAndSwapInt(this, Char2ObjectConcurrentHashMap.SIZECTL, sc, (rs << Char2ObjectConcurrentHashMap.RESIZE_STAMP_SHIFT) + 2)) {
                    this.transfer(tab, null);
                }
                s = this.sumCount();
            }
        }
    }
    
    protected final Node<V>[] helpTransfer(final Node<V>[] tab, final Node<V> f) {
        final Node<V>[] nextTab;
        if (tab != null && f instanceof ForwardingNode && (nextTab = (Node<V>[])((ForwardingNode)f).nextTable) != null) {
            final int rs = resizeStamp(tab.length);
            int sc;
            while (nextTab == this.nextTable && this.table == tab && (sc = this.sizeCtl) < 0 && sc >>> Char2ObjectConcurrentHashMap.RESIZE_STAMP_SHIFT == rs && sc != rs + 1 && sc != rs + Char2ObjectConcurrentHashMap.MAX_RESIZERS) {
                if (this.transferIndex <= 0) {
                    break;
                }
                if (Char2ObjectConcurrentHashMap.U.compareAndSwapInt(this, Char2ObjectConcurrentHashMap.SIZECTL, sc, sc + 1)) {
                    this.transfer(tab, nextTab);
                    break;
                }
            }
            return nextTab;
        }
        return this.table;
    }
    
    protected final void tryPresize(final int size) {
        final int c = (size >= 536870912) ? 1073741824 : tableSizeFor(size + (size >>> 1) + 1);
        int sc;
        while ((sc = this.sizeCtl) >= 0) {
            final Node<V>[] tab = this.table;
            int n;
            if (tab == null || (n = tab.length) == 0) {
                n = ((sc > c) ? sc : c);
                if (!Char2ObjectConcurrentHashMap.U.compareAndSwapInt(this, Char2ObjectConcurrentHashMap.SIZECTL, sc, -1)) {
                    continue;
                }
                try {
                    if (this.table != tab) {
                        continue;
                    }
                    final Node<V>[] nt = new Node[n];
                    this.table = nt;
                    sc = n - (n >>> 2);
                }
                finally {
                    this.sizeCtl = sc;
                }
            }
            else {
                if (c <= sc) {
                    break;
                }
                if (n >= 1073741824) {
                    break;
                }
                if (tab != this.table) {
                    continue;
                }
                final int rs = resizeStamp(n);
                if (sc < 0) {
                    final Node<V>[] nt2;
                    if (sc >>> Char2ObjectConcurrentHashMap.RESIZE_STAMP_SHIFT != rs || sc == rs + 1 || sc == rs + Char2ObjectConcurrentHashMap.MAX_RESIZERS || (nt2 = this.nextTable) == null) {
                        break;
                    }
                    if (this.transferIndex <= 0) {
                        break;
                    }
                    if (!Char2ObjectConcurrentHashMap.U.compareAndSwapInt(this, Char2ObjectConcurrentHashMap.SIZECTL, sc, sc + 1)) {
                        continue;
                    }
                    this.transfer(tab, nt2);
                }
                else {
                    if (!Char2ObjectConcurrentHashMap.U.compareAndSwapInt(this, Char2ObjectConcurrentHashMap.SIZECTL, sc, (rs << Char2ObjectConcurrentHashMap.RESIZE_STAMP_SHIFT) + 2)) {
                        continue;
                    }
                    this.transfer(tab, null);
                }
            }
        }
    }
    
    protected final void transfer(final Node<V>[] tab, Node<V>[] nextTab) {
        final int n = tab.length;
        int stride;
        if ((stride = ((Char2ObjectConcurrentHashMap.NCPU > 1) ? ((n >>> 3) / Char2ObjectConcurrentHashMap.NCPU) : n)) < 16) {
            stride = 16;
        }
        if (nextTab == null) {
            try {
                final Node<V>[] nt = nextTab = new Node[n << 1];
            }
            catch (final Throwable ex) {
                this.sizeCtl = Integer.MAX_VALUE;
                return;
            }
            this.nextTable = nextTab;
            this.transferIndex = n;
        }
        final int nextn = nextTab.length;
        final ForwardingNode<V> fwd = new ForwardingNode<V>(this.EMPTY, nextTab);
        boolean advance = true;
        boolean finishing = false;
        int i = 0;
        int bound = 0;
        while (true) {
            if (advance) {
                if (--i >= bound || finishing) {
                    advance = false;
                }
                else {
                    final int nextIndex;
                    if ((nextIndex = this.transferIndex) <= 0) {
                        i = -1;
                        advance = false;
                    }
                    else {
                        final int expected;
                        final int nextBound;
                        if (!Char2ObjectConcurrentHashMap.U.compareAndSwapInt(this, Char2ObjectConcurrentHashMap.TRANSFERINDEX, expected, nextBound = (((expected = nextIndex) > stride) ? (nextIndex - stride) : 0))) {
                            continue;
                        }
                        bound = nextBound;
                        i = nextIndex - 1;
                        advance = false;
                    }
                }
            }
            else if (i < 0 || i >= n || i + n >= nextn) {
                if (finishing) {
                    this.nextTable = null;
                    this.table = nextTab;
                    this.sizeCtl = (n << 1) - (n >>> 1);
                    return;
                }
                final int sc;
                if (!Char2ObjectConcurrentHashMap.U.compareAndSwapInt(this, Char2ObjectConcurrentHashMap.SIZECTL, sc = this.sizeCtl, sc - 1)) {
                    continue;
                }
                if (sc - 2 != resizeStamp(n) << Char2ObjectConcurrentHashMap.RESIZE_STAMP_SHIFT) {
                    return;
                }
                advance = (finishing = true);
                i = n;
            }
            else {
                final Node<V> f;
                if ((f = tabAt(tab, i)) == null) {
                    advance = casTabAt(tab, i, null, fwd);
                }
                else {
                    final int fh;
                    if ((fh = f.hash) == -1) {
                        advance = true;
                    }
                    else {
                        synchronized (f) {
                            if (tabAt(tab, i) != f) {
                                continue;
                            }
                            if (fh >= 0) {
                                int runBit = fh & n;
                                Node<V> lastRun = f;
                                for (Node<V> p = f.next; p != null; p = p.next) {
                                    final int b = p.hash & n;
                                    if (b != runBit) {
                                        runBit = b;
                                        lastRun = p;
                                    }
                                }
                                if (runBit == 0) {
                                    final Node<V> ln = f;
                                    final Node<V> hn = null;
                                }
                                else {
                                    final Node<V> hn = f;
                                    final Node<V> ln = null;
                                }
                                Node<V> p = f;
                                while (f != f) {
                                    final int ph = f.hash;
                                    final char pk = f.key;
                                    final V pv = f.val;
                                    if ((ph & n) == 0x0) {
                                        final Node<V> ln = new Node<V>(this.EMPTY, ph, pk, pv, f);
                                    }
                                    else {
                                        final Node<V> hn = new Node<V>(this.EMPTY, ph, pk, pv, f);
                                    }
                                    p = f.next;
                                }
                                setTabAt(nextTab, i, f);
                                setTabAt(nextTab, i + n, f);
                                setTabAt(tab, i, fwd);
                                advance = true;
                            }
                            else {
                                if (!(f instanceof TreeBin)) {
                                    continue;
                                }
                                final TreeBin<V> t = (TreeBin)f;
                                TreeNode<V> lo = null;
                                TreeNode<V> loTail = null;
                                TreeNode<V> hi = null;
                                TreeNode<V> hiTail = null;
                                int lc = 0;
                                int hc = 0;
                                for (Node<V> e = t.first; e != null; e = e.next) {
                                    final int h = e.hash;
                                    final TreeNode<V> p2 = new TreeNode<V>(this.EMPTY, h, e.key, e.val, null, null);
                                    if ((h & n) == 0x0) {
                                        if ((p2.prev = loTail) == null) {
                                            lo = p2;
                                        }
                                        else {
                                            loTail.next = p2;
                                        }
                                        loTail = p2;
                                        ++lc;
                                    }
                                    else {
                                        if ((p2.prev = hiTail) == null) {
                                            hi = p2;
                                        }
                                        else {
                                            hiTail.next = p2;
                                        }
                                        hiTail = p2;
                                        ++hc;
                                    }
                                }
                                final Node<V> ln = (lc <= 6) ? this.untreeify(lo) : ((hc != 0) ? new TreeBin<V>(this.EMPTY, lo) : t);
                                final Node<V> hn = (hc <= 6) ? this.untreeify(hi) : ((lc != 0) ? new TreeBin<V>(this.EMPTY, hi) : t);
                                setTabAt(nextTab, i, ln);
                                setTabAt(nextTab, i + n, hn);
                                setTabAt(tab, i, fwd);
                                advance = true;
                            }
                        }
                    }
                }
            }
        }
    }
    
    protected final long sumCount() {
        final CounterCell[] as = this.counterCells;
        long sum = this.baseCount;
        if (as != null) {
            for (int i = 0; i < as.length; ++i) {
                final CounterCell a;
                if ((a = as[i]) != null) {
                    sum += a.value;
                }
            }
        }
        return sum;
    }
    
    protected final void fullAddCount(final long x, boolean wasUncontended) {
        int h;
        if ((h = TLRUtil.getProbe()) == 0) {
            TLRUtil.localInit();
            h = TLRUtil.getProbe();
            wasUncontended = true;
        }
        boolean collide = false;
        while (true) {
            final CounterCell[] as;
            final int n;
            if ((as = this.counterCells) != null && (n = as.length) > 0) {
                final CounterCell a;
                if ((a = as[n - 1 & h]) == null) {
                    if (this.cellsBusy == 0) {
                        final CounterCell r = new CounterCell(x);
                        if (this.cellsBusy == 0 && Char2ObjectConcurrentHashMap.U.compareAndSwapInt(this, Char2ObjectConcurrentHashMap.CELLSBUSY, 0, 1)) {
                            boolean created = false;
                            try {
                                final CounterCell[] rs;
                                final int m;
                                final int j;
                                if ((rs = this.counterCells) != null && (m = rs.length) > 0 && rs[j = (m - 1 & h)] == null) {
                                    rs[j] = r;
                                    created = true;
                                }
                            }
                            finally {
                                this.cellsBusy = 0;
                            }
                            if (created) {
                                break;
                            }
                            continue;
                        }
                    }
                    collide = false;
                }
                else if (!wasUncontended) {
                    wasUncontended = true;
                }
                else {
                    final long v;
                    if (Char2ObjectConcurrentHashMap.U.compareAndSwapLong(a, Char2ObjectConcurrentHashMap.CELLVALUE, v = a.value, v + x)) {
                        break;
                    }
                    if (this.counterCells != as || n >= Char2ObjectConcurrentHashMap.NCPU) {
                        collide = false;
                    }
                    else if (!collide) {
                        collide = true;
                    }
                    else if (this.cellsBusy == 0 && Char2ObjectConcurrentHashMap.U.compareAndSwapInt(this, Char2ObjectConcurrentHashMap.CELLSBUSY, 0, 1)) {
                        try {
                            if (this.counterCells == as) {
                                final CounterCell[] rs2 = new CounterCell[n << 1];
                                for (int i = 0; i < n; ++i) {
                                    rs2[i] = as[i];
                                }
                                this.counterCells = rs2;
                            }
                        }
                        finally {
                            this.cellsBusy = 0;
                        }
                        collide = false;
                        continue;
                    }
                }
                h = TLRUtil.advanceProbe(h);
            }
            else if (this.cellsBusy == 0 && this.counterCells == as && Char2ObjectConcurrentHashMap.U.compareAndSwapInt(this, Char2ObjectConcurrentHashMap.CELLSBUSY, 0, 1)) {
                boolean init = false;
                try {
                    if (this.counterCells == as) {
                        final CounterCell[] rs3 = new CounterCell[2];
                        rs3[h & 0x1] = new CounterCell(x);
                        this.counterCells = rs3;
                        init = true;
                    }
                }
                finally {
                    this.cellsBusy = 0;
                }
                if (init) {
                    break;
                }
                continue;
            }
            else {
                final long v;
                if (Char2ObjectConcurrentHashMap.U.compareAndSwapLong(this, Char2ObjectConcurrentHashMap.BASECOUNT, v = this.baseCount, v + x)) {
                    break;
                }
                continue;
            }
        }
    }
    
    protected final void treeifyBin(final Node<V>[] tab, final int index) {
        if (tab != null) {
            final int n;
            if ((n = tab.length) < 64) {
                this.tryPresize(n << 1);
            }
            else {
                final Node<V> b;
                if ((b = tabAt(tab, index)) != null && b.hash >= 0) {
                    synchronized (b) {
                        if (tabAt(tab, index) == b) {
                            TreeNode<V> hd = null;
                            TreeNode<V> tl = null;
                            for (Node<V> e = b; e != null; e = e.next) {
                                final TreeNode<V> p = new TreeNode<V>(this.EMPTY, e.hash, e.key, e.val, null, null);
                                if ((p.prev = tl) == null) {
                                    hd = p;
                                }
                                else {
                                    tl.next = p;
                                }
                                tl = p;
                            }
                            setTabAt(tab, index, new TreeBin<V>(this.EMPTY, hd));
                        }
                    }
                }
            }
        }
    }
    
    protected <V> Node<V> untreeify(final Node<V> b) {
        Node<V> hd = null;
        Node<V> tl = null;
        for (Node<V> q = b; q != null; q = q.next) {
            final Node<V> p = new Node<V>(this.EMPTY, q.hash, q.key, q.val, null);
            if (tl == null) {
                hd = p;
            }
            else {
                tl.next = p;
            }
            tl = p;
        }
        return hd;
    }
    
    protected final int batchFor(final long b) {
        long n;
        if (b == Long.MAX_VALUE || (n = this.sumCount()) <= 1L || n < b) {
            return 0;
        }
        final int sp = ForkJoinPool.getCommonPoolParallelism() << 2;
        return (b <= 0L || (n /= b) >= sp) ? sp : ((int)n);
    }
    
    public void forEach(final long parallelismThreshold, final CharObjConsumer<? super V> action) {
        if (action == null) {
            throw new NullPointerException();
        }
        new ForEachMappingTask(null, this.batchFor(parallelismThreshold), 0, 0, this.table, action).invoke();
    }
    
    public <U> void forEach(final long parallelismThreshold, final CharObjFunction<? super V, ? extends U> transformer, final Consumer<? super U> action) {
        if (transformer == null || action == null) {
            throw new NullPointerException();
        }
        new ForEachTransformedMappingTask(null, this.batchFor(parallelismThreshold), 0, 0, this.table, transformer, action).invoke();
    }
    
    public <U> U search(final long parallelismThreshold, final CharObjFunction<? super V, ? extends U> searchFunction) {
        if (searchFunction == null) {
            throw new NullPointerException();
        }
        return (U)new SearchMappingsTask(null, this.batchFor(parallelismThreshold), 0, 0, (Node<Object>[])this.table, (CharObjFunction<? super Object, ?>)searchFunction, new AtomicReference<Object>()).invoke();
    }
    
    public <U> U search(final CharObjFunction<? super V, ? extends U> searchFunction) {
        if (searchFunction == null) {
            throw new NullPointerException();
        }
        Label_0411: {
            final Node<V>[] tt;
            if ((tt = this.table) != null) {
                Node<V>[] tab = tt;
                Node<V> next = null;
                TableStack<V> stack = null;
                TableStack<V> spare = null;
                int index = 0;
                int baseIndex = 0;
                final int baseLimit = tt.length;
                final int baseSize = tt.length;
            Label_0374_Outer:
                while (true) {
                    Node<V> p = null;
                    if ((p = next) != null) {
                        p = p.next;
                    }
                    while (true) {
                        while (p == null) {
                            final Node<V>[] t;
                            int n;
                            final int i;
                            if (baseIndex >= baseLimit || (t = tab) == null || (n = t.length) <= (i = index) || i < 0) {
                                next = null;
                                if (p == null) {
                                    break Label_0411;
                                }
                                final U u = (U)searchFunction.apply(p.key, p.val);
                                if (u != null) {
                                    return u;
                                }
                                continue Label_0374_Outer;
                            }
                            else {
                                if ((p = tabAt(t, i)) != null && p.hash < 0) {
                                    if (p instanceof final ForwardingNode forwardingNode) {
                                        tab = (Node<V>[])forwardingNode.nextTable;
                                        p = null;
                                        TableStack<V> s = spare;
                                        if (s != null) {
                                            spare = s.next;
                                        }
                                        else {
                                            s = new TableStack<V>();
                                        }
                                        s.tab = t;
                                        s.length = n;
                                        s.index = i;
                                        s.next = stack;
                                        stack = s;
                                        continue Label_0374_Outer;
                                    }
                                    if (p instanceof final TreeBin treeBin) {
                                        p = (Node<V>)treeBin.first;
                                    }
                                    else {
                                        p = null;
                                    }
                                }
                                if (stack != null) {
                                    TableStack<V> s;
                                    int len;
                                    while ((s = stack) != null && (index += (len = s.length)) >= n) {
                                        n = len;
                                        index = s.index;
                                        tab = s.tab;
                                        s.tab = null;
                                        final TableStack<V> anext = s.next;
                                        s.next = spare;
                                        stack = anext;
                                        spare = s;
                                    }
                                    if (s != null || (index += baseSize) < n) {
                                        continue Label_0374_Outer;
                                    }
                                    index = ++baseIndex;
                                }
                                else {
                                    if ((index = i + baseSize) < n) {
                                        continue Label_0374_Outer;
                                    }
                                    index = ++baseIndex;
                                }
                            }
                        }
                        next = p;
                        continue;
                    }
                }
            }
        }
        return null;
    }
    
    public <U, X> U search(final CharBiObjFunction<? super V, X, ? extends U> searchFunction, final X x) {
        if (searchFunction == null) {
            throw new NullPointerException();
        }
        Label_0416: {
            final Node<V>[] tt;
            if ((tt = this.table) != null) {
                Node<V>[] tab = tt;
                Node<V> next = null;
                TableStack<V> stack = null;
                TableStack<V> spare = null;
                int index = 0;
                int baseIndex = 0;
                final int baseLimit = tt.length;
                final int baseSize = tt.length;
            Label_0378_Outer:
                while (true) {
                    Node<V> p = null;
                    if ((p = next) != null) {
                        p = p.next;
                    }
                    while (true) {
                        while (p == null) {
                            final Node<V>[] t;
                            int n;
                            final int i;
                            if (baseIndex >= baseLimit || (t = tab) == null || (n = t.length) <= (i = index) || i < 0) {
                                next = null;
                                if (p == null) {
                                    break Label_0416;
                                }
                                final U u = (U)searchFunction.apply(p.key, p.val, x);
                                if (u != null) {
                                    return u;
                                }
                                continue Label_0378_Outer;
                            }
                            else {
                                if ((p = tabAt(t, i)) != null && p.hash < 0) {
                                    if (p instanceof final ForwardingNode forwardingNode) {
                                        tab = (Node<V>[])forwardingNode.nextTable;
                                        p = null;
                                        TableStack<V> s = spare;
                                        if (s != null) {
                                            spare = s.next;
                                        }
                                        else {
                                            s = new TableStack<V>();
                                        }
                                        s.tab = t;
                                        s.length = n;
                                        s.index = i;
                                        s.next = stack;
                                        stack = s;
                                        continue Label_0378_Outer;
                                    }
                                    if (p instanceof final TreeBin treeBin) {
                                        p = (Node<V>)treeBin.first;
                                    }
                                    else {
                                        p = null;
                                    }
                                }
                                if (stack != null) {
                                    TableStack<V> s;
                                    int len;
                                    while ((s = stack) != null && (index += (len = s.length)) >= n) {
                                        n = len;
                                        index = s.index;
                                        tab = s.tab;
                                        s.tab = null;
                                        final TableStack<V> anext = s.next;
                                        s.next = spare;
                                        stack = anext;
                                        spare = s;
                                    }
                                    if (s != null || (index += baseSize) < n) {
                                        continue Label_0378_Outer;
                                    }
                                    index = ++baseIndex;
                                }
                                else {
                                    if ((index = i + baseSize) < n) {
                                        continue Label_0378_Outer;
                                    }
                                    index = ++baseIndex;
                                }
                            }
                        }
                        next = p;
                        continue;
                    }
                }
            }
        }
        return null;
    }
    
    public <U> U searchWithByte(final CharObjByteFunction<? super V, ? extends U> searchFunction, final byte x) {
        if (searchFunction == null) {
            throw new NullPointerException();
        }
        Label_0416: {
            final Node<V>[] tt;
            if ((tt = this.table) != null) {
                Node<V>[] tab = tt;
                Node<V> next = null;
                TableStack<V> stack = null;
                TableStack<V> spare = null;
                int index = 0;
                int baseIndex = 0;
                final int baseLimit = tt.length;
                final int baseSize = tt.length;
            Label_0378_Outer:
                while (true) {
                    Node<V> p = null;
                    if ((p = next) != null) {
                        p = p.next;
                    }
                    while (true) {
                        while (p == null) {
                            final Node<V>[] t;
                            int n;
                            final int i;
                            if (baseIndex >= baseLimit || (t = tab) == null || (n = t.length) <= (i = index) || i < 0) {
                                next = null;
                                if (p == null) {
                                    break Label_0416;
                                }
                                final U u = (U)searchFunction.apply(p.key, p.val, x);
                                if (u != null) {
                                    return u;
                                }
                                continue Label_0378_Outer;
                            }
                            else {
                                if ((p = tabAt(t, i)) != null && p.hash < 0) {
                                    if (p instanceof final ForwardingNode forwardingNode) {
                                        tab = (Node<V>[])forwardingNode.nextTable;
                                        p = null;
                                        TableStack<V> s = spare;
                                        if (s != null) {
                                            spare = s.next;
                                        }
                                        else {
                                            s = new TableStack<V>();
                                        }
                                        s.tab = t;
                                        s.length = n;
                                        s.index = i;
                                        s.next = stack;
                                        stack = s;
                                        continue Label_0378_Outer;
                                    }
                                    if (p instanceof final TreeBin treeBin) {
                                        p = (Node<V>)treeBin.first;
                                    }
                                    else {
                                        p = null;
                                    }
                                }
                                if (stack != null) {
                                    TableStack<V> s;
                                    int len;
                                    while ((s = stack) != null && (index += (len = s.length)) >= n) {
                                        n = len;
                                        index = s.index;
                                        tab = s.tab;
                                        s.tab = null;
                                        final TableStack<V> anext = s.next;
                                        s.next = spare;
                                        stack = anext;
                                        spare = s;
                                    }
                                    if (s != null || (index += baseSize) < n) {
                                        continue Label_0378_Outer;
                                    }
                                    index = ++baseIndex;
                                }
                                else {
                                    if ((index = i + baseSize) < n) {
                                        continue Label_0378_Outer;
                                    }
                                    index = ++baseIndex;
                                }
                            }
                        }
                        next = p;
                        continue;
                    }
                }
            }
        }
        return null;
    }
    
    public <U> U searchWithShort(final CharObjShortFunction<? super V, ? extends U> searchFunction, final short x) {
        if (searchFunction == null) {
            throw new NullPointerException();
        }
        Label_0416: {
            final Node<V>[] tt;
            if ((tt = this.table) != null) {
                Node<V>[] tab = tt;
                Node<V> next = null;
                TableStack<V> stack = null;
                TableStack<V> spare = null;
                int index = 0;
                int baseIndex = 0;
                final int baseLimit = tt.length;
                final int baseSize = tt.length;
            Label_0378_Outer:
                while (true) {
                    Node<V> p = null;
                    if ((p = next) != null) {
                        p = p.next;
                    }
                    while (true) {
                        while (p == null) {
                            final Node<V>[] t;
                            int n;
                            final int i;
                            if (baseIndex >= baseLimit || (t = tab) == null || (n = t.length) <= (i = index) || i < 0) {
                                next = null;
                                if (p == null) {
                                    break Label_0416;
                                }
                                final U u = (U)searchFunction.apply(p.key, p.val, x);
                                if (u != null) {
                                    return u;
                                }
                                continue Label_0378_Outer;
                            }
                            else {
                                if ((p = tabAt(t, i)) != null && p.hash < 0) {
                                    if (p instanceof final ForwardingNode forwardingNode) {
                                        tab = (Node<V>[])forwardingNode.nextTable;
                                        p = null;
                                        TableStack<V> s = spare;
                                        if (s != null) {
                                            spare = s.next;
                                        }
                                        else {
                                            s = new TableStack<V>();
                                        }
                                        s.tab = t;
                                        s.length = n;
                                        s.index = i;
                                        s.next = stack;
                                        stack = s;
                                        continue Label_0378_Outer;
                                    }
                                    if (p instanceof final TreeBin treeBin) {
                                        p = (Node<V>)treeBin.first;
                                    }
                                    else {
                                        p = null;
                                    }
                                }
                                if (stack != null) {
                                    TableStack<V> s;
                                    int len;
                                    while ((s = stack) != null && (index += (len = s.length)) >= n) {
                                        n = len;
                                        index = s.index;
                                        tab = s.tab;
                                        s.tab = null;
                                        final TableStack<V> anext = s.next;
                                        s.next = spare;
                                        stack = anext;
                                        spare = s;
                                    }
                                    if (s != null || (index += baseSize) < n) {
                                        continue Label_0378_Outer;
                                    }
                                    index = ++baseIndex;
                                }
                                else {
                                    if ((index = i + baseSize) < n) {
                                        continue Label_0378_Outer;
                                    }
                                    index = ++baseIndex;
                                }
                            }
                        }
                        next = p;
                        continue;
                    }
                }
            }
        }
        return null;
    }
    
    public <U> U searchWithInt(final CharObjIntFunction<? super V, ? extends U> searchFunction, final int x) {
        if (searchFunction == null) {
            throw new NullPointerException();
        }
        Label_0416: {
            final Node<V>[] tt;
            if ((tt = this.table) != null) {
                Node<V>[] tab = tt;
                Node<V> next = null;
                TableStack<V> stack = null;
                TableStack<V> spare = null;
                int index = 0;
                int baseIndex = 0;
                final int baseLimit = tt.length;
                final int baseSize = tt.length;
            Label_0378_Outer:
                while (true) {
                    Node<V> p = null;
                    if ((p = next) != null) {
                        p = p.next;
                    }
                    while (true) {
                        while (p == null) {
                            final Node<V>[] t;
                            int n;
                            final int i;
                            if (baseIndex >= baseLimit || (t = tab) == null || (n = t.length) <= (i = index) || i < 0) {
                                next = null;
                                if (p == null) {
                                    break Label_0416;
                                }
                                final U u = (U)searchFunction.apply(p.key, p.val, x);
                                if (u != null) {
                                    return u;
                                }
                                continue Label_0378_Outer;
                            }
                            else {
                                if ((p = tabAt(t, i)) != null && p.hash < 0) {
                                    if (p instanceof final ForwardingNode forwardingNode) {
                                        tab = (Node<V>[])forwardingNode.nextTable;
                                        p = null;
                                        TableStack<V> s = spare;
                                        if (s != null) {
                                            spare = s.next;
                                        }
                                        else {
                                            s = new TableStack<V>();
                                        }
                                        s.tab = t;
                                        s.length = n;
                                        s.index = i;
                                        s.next = stack;
                                        stack = s;
                                        continue Label_0378_Outer;
                                    }
                                    if (p instanceof final TreeBin treeBin) {
                                        p = (Node<V>)treeBin.first;
                                    }
                                    else {
                                        p = null;
                                    }
                                }
                                if (stack != null) {
                                    TableStack<V> s;
                                    int len;
                                    while ((s = stack) != null && (index += (len = s.length)) >= n) {
                                        n = len;
                                        index = s.index;
                                        tab = s.tab;
                                        s.tab = null;
                                        final TableStack<V> anext = s.next;
                                        s.next = spare;
                                        stack = anext;
                                        spare = s;
                                    }
                                    if (s != null || (index += baseSize) < n) {
                                        continue Label_0378_Outer;
                                    }
                                    index = ++baseIndex;
                                }
                                else {
                                    if ((index = i + baseSize) < n) {
                                        continue Label_0378_Outer;
                                    }
                                    index = ++baseIndex;
                                }
                            }
                        }
                        next = p;
                        continue;
                    }
                }
            }
        }
        return null;
    }
    
    public <U> U searchWithLong(final CharObjLongFunction<? super V, ? extends U> searchFunction, final long x) {
        if (searchFunction == null) {
            throw new NullPointerException();
        }
        Label_0420: {
            final Node<V>[] tt;
            if ((tt = this.table) != null) {
                Node<V>[] tab = tt;
                Node<V> next = null;
                TableStack<V> stack = null;
                TableStack<V> spare = null;
                int index = 0;
                int baseIndex = 0;
                final int baseLimit = tt.length;
                final int baseSize = tt.length;
            Label_0382_Outer:
                while (true) {
                    Node<V> p = null;
                    if ((p = next) != null) {
                        p = p.next;
                    }
                    while (true) {
                        while (p == null) {
                            final Node<V>[] t;
                            int n;
                            final int i;
                            if (baseIndex >= baseLimit || (t = tab) == null || (n = t.length) <= (i = index) || i < 0) {
                                next = null;
                                if (p == null) {
                                    break Label_0420;
                                }
                                final U u = (U)searchFunction.apply(p.key, p.val, x);
                                if (u != null) {
                                    return u;
                                }
                                continue Label_0382_Outer;
                            }
                            else {
                                if ((p = tabAt(t, i)) != null && p.hash < 0) {
                                    if (p instanceof final ForwardingNode forwardingNode) {
                                        tab = (Node<V>[])forwardingNode.nextTable;
                                        p = null;
                                        TableStack<V> s = spare;
                                        if (s != null) {
                                            spare = s.next;
                                        }
                                        else {
                                            s = new TableStack<V>();
                                        }
                                        s.tab = t;
                                        s.length = n;
                                        s.index = i;
                                        s.next = stack;
                                        stack = s;
                                        continue Label_0382_Outer;
                                    }
                                    if (p instanceof final TreeBin treeBin) {
                                        p = (Node<V>)treeBin.first;
                                    }
                                    else {
                                        p = null;
                                    }
                                }
                                if (stack != null) {
                                    TableStack<V> s;
                                    int len;
                                    while ((s = stack) != null && (index += (len = s.length)) >= n) {
                                        n = len;
                                        index = s.index;
                                        tab = s.tab;
                                        s.tab = null;
                                        final TableStack<V> anext = s.next;
                                        s.next = spare;
                                        stack = anext;
                                        spare = s;
                                    }
                                    if (s != null || (index += baseSize) < n) {
                                        continue Label_0382_Outer;
                                    }
                                    index = ++baseIndex;
                                }
                                else {
                                    if ((index = i + baseSize) < n) {
                                        continue Label_0382_Outer;
                                    }
                                    index = ++baseIndex;
                                }
                            }
                        }
                        next = p;
                        continue;
                    }
                }
            }
        }
        return null;
    }
    
    public <U> U searchWithFloat(final CharObjFloatFunction<? super V, ? extends U> searchFunction, final float x) {
        if (searchFunction == null) {
            throw new NullPointerException();
        }
        Label_0416: {
            final Node<V>[] tt;
            if ((tt = this.table) != null) {
                Node<V>[] tab = tt;
                Node<V> next = null;
                TableStack<V> stack = null;
                TableStack<V> spare = null;
                int index = 0;
                int baseIndex = 0;
                final int baseLimit = tt.length;
                final int baseSize = tt.length;
            Label_0378_Outer:
                while (true) {
                    Node<V> p = null;
                    if ((p = next) != null) {
                        p = p.next;
                    }
                    while (true) {
                        while (p == null) {
                            final Node<V>[] t;
                            int n;
                            final int i;
                            if (baseIndex >= baseLimit || (t = tab) == null || (n = t.length) <= (i = index) || i < 0) {
                                next = null;
                                if (p == null) {
                                    break Label_0416;
                                }
                                final U u = (U)searchFunction.apply(p.key, p.val, x);
                                if (u != null) {
                                    return u;
                                }
                                continue Label_0378_Outer;
                            }
                            else {
                                if ((p = tabAt(t, i)) != null && p.hash < 0) {
                                    if (p instanceof final ForwardingNode forwardingNode) {
                                        tab = (Node<V>[])forwardingNode.nextTable;
                                        p = null;
                                        TableStack<V> s = spare;
                                        if (s != null) {
                                            spare = s.next;
                                        }
                                        else {
                                            s = new TableStack<V>();
                                        }
                                        s.tab = t;
                                        s.length = n;
                                        s.index = i;
                                        s.next = stack;
                                        stack = s;
                                        continue Label_0378_Outer;
                                    }
                                    if (p instanceof final TreeBin treeBin) {
                                        p = (Node<V>)treeBin.first;
                                    }
                                    else {
                                        p = null;
                                    }
                                }
                                if (stack != null) {
                                    TableStack<V> s;
                                    int len;
                                    while ((s = stack) != null && (index += (len = s.length)) >= n) {
                                        n = len;
                                        index = s.index;
                                        tab = s.tab;
                                        s.tab = null;
                                        final TableStack<V> anext = s.next;
                                        s.next = spare;
                                        stack = anext;
                                        spare = s;
                                    }
                                    if (s != null || (index += baseSize) < n) {
                                        continue Label_0378_Outer;
                                    }
                                    index = ++baseIndex;
                                }
                                else {
                                    if ((index = i + baseSize) < n) {
                                        continue Label_0378_Outer;
                                    }
                                    index = ++baseIndex;
                                }
                            }
                        }
                        next = p;
                        continue;
                    }
                }
            }
        }
        return null;
    }
    
    public <U> U searchWithDouble(final CharObjDoubleFunction<? super V, ? extends U> searchFunction, final double x) {
        if (searchFunction == null) {
            throw new NullPointerException();
        }
        Label_0420: {
            final Node<V>[] tt;
            if ((tt = this.table) != null) {
                Node<V>[] tab = tt;
                Node<V> next = null;
                TableStack<V> stack = null;
                TableStack<V> spare = null;
                int index = 0;
                int baseIndex = 0;
                final int baseLimit = tt.length;
                final int baseSize = tt.length;
            Label_0382_Outer:
                while (true) {
                    Node<V> p = null;
                    if ((p = next) != null) {
                        p = p.next;
                    }
                    while (true) {
                        while (p == null) {
                            final Node<V>[] t;
                            int n;
                            final int i;
                            if (baseIndex >= baseLimit || (t = tab) == null || (n = t.length) <= (i = index) || i < 0) {
                                next = null;
                                if (p == null) {
                                    break Label_0420;
                                }
                                final U u = (U)searchFunction.apply(p.key, p.val, x);
                                if (u != null) {
                                    return u;
                                }
                                continue Label_0382_Outer;
                            }
                            else {
                                if ((p = tabAt(t, i)) != null && p.hash < 0) {
                                    if (p instanceof final ForwardingNode forwardingNode) {
                                        tab = (Node<V>[])forwardingNode.nextTable;
                                        p = null;
                                        TableStack<V> s = spare;
                                        if (s != null) {
                                            spare = s.next;
                                        }
                                        else {
                                            s = new TableStack<V>();
                                        }
                                        s.tab = t;
                                        s.length = n;
                                        s.index = i;
                                        s.next = stack;
                                        stack = s;
                                        continue Label_0382_Outer;
                                    }
                                    if (p instanceof final TreeBin treeBin) {
                                        p = (Node<V>)treeBin.first;
                                    }
                                    else {
                                        p = null;
                                    }
                                }
                                if (stack != null) {
                                    TableStack<V> s;
                                    int len;
                                    while ((s = stack) != null && (index += (len = s.length)) >= n) {
                                        n = len;
                                        index = s.index;
                                        tab = s.tab;
                                        s.tab = null;
                                        final TableStack<V> anext = s.next;
                                        s.next = spare;
                                        stack = anext;
                                        spare = s;
                                    }
                                    if (s != null || (index += baseSize) < n) {
                                        continue Label_0382_Outer;
                                    }
                                    index = ++baseIndex;
                                }
                                else {
                                    if ((index = i + baseSize) < n) {
                                        continue Label_0382_Outer;
                                    }
                                    index = ++baseIndex;
                                }
                            }
                        }
                        next = p;
                        continue;
                    }
                }
            }
        }
        return null;
    }
    
    public <U> U reduce(final long parallelismThreshold, final CharObjFunction<? super V, ? extends U> transformer, final BiFunction<? super U, ? super U, ? extends U> reducer) {
        if (transformer == null || reducer == null) {
            throw new NullPointerException();
        }
        return (U)new MapReduceMappingsTask(null, this.batchFor(parallelismThreshold), 0, 0, (Node<Object>[])this.table, null, (CharObjFunction<? super Object, ?>)transformer, (BiFunction<? super Object, ? super Object, ?>)reducer).invoke();
    }
    
    public <U> U reduce(final CharObjFunction<? super V, ? extends U> transformer, final BiFunction<? super U, ? super U, ? extends U> reducer) {
        if (transformer == null || reducer == null) {
            throw new NullPointerException();
        }
        final Node<V>[] tt;
        if ((tt = this.table) != null) {
            Node<V>[] tab = tt;
            Node<V> next = null;
            TableStack<V> stack = null;
            TableStack<V> spare = null;
            int index = 0;
            int baseIndex = 0;
            final int baseLimit = tt.length;
            final int baseSize = tt.length;
            U r = null;
        Label_0385_Outer:
            while (true) {
                Node<V> p = null;
                if ((p = next) != null) {
                    p = p.next;
                }
                while (true) {
                    while (p == null) {
                        final Node<V>[] t;
                        int n;
                        final int i;
                        if (baseIndex >= baseLimit || (t = tab) == null || (n = t.length) <= (i = index) || i < 0) {
                            next = null;
                            if (p == null) {
                                break Label_0385_Outer;
                            }
                            final U u;
                            if ((u = (U)transformer.apply(p.key, p.val)) != null) {
                                r = ((r == null) ? u : reducer.apply((Object)r, (Object)u));
                            }
                            continue Label_0385_Outer;
                        }
                        else {
                            if ((p = tabAt(t, i)) != null && p.hash < 0) {
                                if (p instanceof final ForwardingNode forwardingNode) {
                                    tab = (Node<V>[])forwardingNode.nextTable;
                                    p = null;
                                    TableStack<V> s = spare;
                                    if (s != null) {
                                        spare = s.next;
                                    }
                                    else {
                                        s = new TableStack<V>();
                                    }
                                    s.tab = t;
                                    s.length = n;
                                    s.index = i;
                                    s.next = stack;
                                    stack = s;
                                    continue Label_0385_Outer;
                                }
                                if (p instanceof final TreeBin treeBin) {
                                    p = (Node<V>)treeBin.first;
                                }
                                else {
                                    p = null;
                                }
                            }
                            if (stack != null) {
                                TableStack<V> s;
                                int len;
                                while ((s = stack) != null && (index += (len = s.length)) >= n) {
                                    n = len;
                                    index = s.index;
                                    tab = s.tab;
                                    s.tab = null;
                                    final TableStack<V> anext = s.next;
                                    s.next = spare;
                                    stack = anext;
                                    spare = s;
                                }
                                if (s != null || (index += baseSize) < n) {
                                    continue Label_0385_Outer;
                                }
                                index = ++baseIndex;
                            }
                            else {
                                if ((index = i + baseSize) < n) {
                                    continue Label_0385_Outer;
                                }
                                index = ++baseIndex;
                            }
                        }
                    }
                    next = p;
                    continue;
                }
            }
            return r;
        }
        return null;
    }
    
    public double reduceToDouble(final long parallelismThreshold, final ToDoubleCharObjFunction<? super V> transformer, final double basis, final DoubleBinaryOperator reducer) {
        if (transformer == null || reducer == null) {
            throw new NullPointerException();
        }
        return new MapReduceMappingsToDoubleTask(null, this.batchFor(parallelismThreshold), 0, 0, this.table, null, transformer, basis, reducer).invoke0();
    }
    
    public long reduceToLong(final long parallelismThreshold, final ToLongCharObjFunction<? super V> transformer, final long basis, final LongBinaryOperator reducer) {
        if (transformer == null || reducer == null) {
            throw new NullPointerException();
        }
        return new MapReduceMappingsToLongTask(null, this.batchFor(parallelismThreshold), 0, 0, this.table, null, transformer, basis, reducer).invoke0();
    }
    
    public int reduceToInt(final long parallelismThreshold, final ToIntCharObjFunction<? super V> transformer, final int basis, final IntBinaryOperator reducer) {
        if (transformer == null || reducer == null) {
            throw new NullPointerException();
        }
        return new MapReduceMappingsToIntTask(null, this.batchFor(parallelismThreshold), 0, 0, this.table, null, transformer, basis, reducer).invoke0();
    }
    
    public void forEachKey(final long parallelismThreshold, final CharConsumer action) {
        if (action == null) {
            throw new NullPointerException();
        }
        new ForEachKeyTask(null, this.batchFor(parallelismThreshold), 0, 0, this.table, action).invoke();
    }
    
    public <U> void forEachKey(final long parallelismThreshold, final CharFunction<? extends U> transformer, final Consumer<? super U> action) {
        if (transformer == null || action == null) {
            throw new NullPointerException();
        }
        new ForEachTransformedKeyTask(null, this.batchFor(parallelismThreshold), 0, 0, this.table, transformer, action).invoke();
    }
    
    public <U> U searchKeys(final long parallelismThreshold, final CharFunction<? extends U> searchFunction) {
        if (searchFunction == null) {
            throw new NullPointerException();
        }
        return (U)new SearchKeysTask(null, this.batchFor(parallelismThreshold), 0, 0, (Node<Object>[])this.table, searchFunction, new AtomicReference<Object>()).invoke();
    }
    
    public char reduceKeys(final long parallelismThreshold, final CharacterReduceTaskOperator reducer) {
        if (reducer == null) {
            throw new NullPointerException();
        }
        return new ReduceKeysTask(this.EMPTY, null, this.batchFor(parallelismThreshold), 0, 0, this.table, null, reducer).invoke0();
    }
    
    public <U> U reduceKeys(final long parallelismThreshold, final CharFunction<? extends U> transformer, final BiFunction<? super U, ? super U, ? extends U> reducer) {
        if (transformer == null || reducer == null) {
            throw new NullPointerException();
        }
        return (U)new MapReduceKeysTask(null, this.batchFor(parallelismThreshold), 0, 0, (Node<Object>[])this.table, null, transformer, (BiFunction<? super Object, ? super Object, ?>)reducer).invoke();
    }
    
    public double reduceKeysToDouble(final long parallelismThreshold, final CharToDoubleFunction transformer, final double basis, final DoubleBinaryOperator reducer) {
        if (transformer == null || reducer == null) {
            throw new NullPointerException();
        }
        return new MapReduceKeysToDoubleTask(null, this.batchFor(parallelismThreshold), 0, 0, this.table, null, transformer, basis, reducer).invoke0();
    }
    
    public long reduceKeysToLong(final long parallelismThreshold, final CharToLongFunction transformer, final long basis, final LongBinaryOperator reducer) {
        if (transformer == null || reducer == null) {
            throw new NullPointerException();
        }
        return new MapReduceKeysToLongTask(null, this.batchFor(parallelismThreshold), 0, 0, this.table, null, transformer, basis, reducer).invoke0();
    }
    
    public int reduceKeysToInt(final long parallelismThreshold, final CharToIntFunction transformer, final int basis, final IntBinaryOperator reducer) {
        if (transformer == null || reducer == null) {
            throw new NullPointerException();
        }
        return new MapReduceKeysToIntTask(null, this.batchFor(parallelismThreshold), 0, 0, this.table, null, transformer, basis, reducer).invoke0();
    }
    
    public void forEachValue(final long parallelismThreshold, final Consumer<? super V> action) {
        if (action == null) {
            throw new NullPointerException();
        }
        new ForEachValueTask(null, this.batchFor(parallelismThreshold), 0, 0, this.table, action).invoke();
    }
    
    public <U> void forEachValue(final long parallelismThreshold, final Function<? super V, ? extends U> transformer, final Consumer<? super U> action) {
        if (transformer == null || action == null) {
            throw new NullPointerException();
        }
        new ForEachTransformedValueTask(null, this.batchFor(parallelismThreshold), 0, 0, this.table, transformer, action).invoke();
    }
    
    public <U> U searchValues(final long parallelismThreshold, final Function<? super V, ? extends U> searchFunction) {
        if (searchFunction == null) {
            throw new NullPointerException();
        }
        return (U)new SearchValuesTask(null, this.batchFor(parallelismThreshold), 0, 0, (Node<Object>[])this.table, (Function<? super Object, ?>)searchFunction, new AtomicReference<Object>()).invoke();
    }
    
    public V reduceValues(final long parallelismThreshold, final BiFunction<? super V, ? super V, ? extends V> reducer) {
        if (reducer == null) {
            throw new NullPointerException();
        }
        return (V)new ReduceValuesTask(null, this.batchFor(parallelismThreshold), 0, 0, (Node<Object>[])this.table, null, (BiFunction<? super Object, ? super Object, ?>)reducer).invoke();
    }
    
    public <U> U reduceValues(final long parallelismThreshold, final Function<? super V, ? extends U> transformer, final BiFunction<? super U, ? super U, ? extends U> reducer) {
        if (transformer == null || reducer == null) {
            throw new NullPointerException();
        }
        return (U)new MapReduceValuesTask(null, this.batchFor(parallelismThreshold), 0, 0, (Node<Object>[])this.table, null, (Function<? super Object, ?>)transformer, (BiFunction<? super Object, ? super Object, ?>)reducer).invoke();
    }
    
    public double reduceValuesToDouble(final long parallelismThreshold, final ToDoubleFunction<? super V> transformer, final double basis, final DoubleBinaryOperator reducer) {
        if (transformer == null || reducer == null) {
            throw new NullPointerException();
        }
        return new MapReduceValuesToDoubleTask(null, this.batchFor(parallelismThreshold), 0, 0, this.table, null, transformer, basis, reducer).invoke0();
    }
    
    public long reduceValuesToLong(final long parallelismThreshold, final ToLongFunction<? super V> transformer, final long basis, final LongBinaryOperator reducer) {
        if (transformer == null || reducer == null) {
            throw new NullPointerException();
        }
        return new MapReduceValuesToLongTask(null, this.batchFor(parallelismThreshold), 0, 0, this.table, null, transformer, basis, reducer).invoke0();
    }
    
    public int reduceValuesToInt(final long parallelismThreshold, final ToIntFunction<? super V> transformer, final int basis, final IntBinaryOperator reducer) {
        if (transformer == null || reducer == null) {
            throw new NullPointerException();
        }
        return new MapReduceValuesToIntTask(null, this.batchFor(parallelismThreshold), 0, 0, this.table, null, transformer, basis, reducer).invoke0();
    }
    
    public void forEachEntry(final long parallelismThreshold, final Consumer<? super Entry<V>> action) {
        if (action == null) {
            throw new NullPointerException();
        }
        new ForEachEntryTask(null, this.batchFor(parallelismThreshold), 0, 0, this.table, action).invoke();
    }
    
    public <U> void forEachEntry(final long parallelismThreshold, final Function<Entry<V>, ? extends U> transformer, final Consumer<? super U> action) {
        if (transformer == null || action == null) {
            throw new NullPointerException();
        }
        new ForEachTransformedEntryTask(null, this.batchFor(parallelismThreshold), 0, 0, this.table, transformer, action).invoke();
    }
    
    public <U> U searchEntries(final long parallelismThreshold, final Function<Entry<V>, ? extends U> searchFunction) {
        if (searchFunction == null) {
            throw new NullPointerException();
        }
        return (U)new SearchEntriesTask(null, this.batchFor(parallelismThreshold), 0, 0, (Node<Object>[])this.table, (Function<Entry<Object>, ?>)searchFunction, new AtomicReference<Object>()).invoke();
    }
    
    public Entry<V> reduceEntries(final long parallelismThreshold, final BiFunction<Entry<V>, Entry<V>, ? extends Entry<V>> reducer) {
        if (reducer == null) {
            throw new NullPointerException();
        }
        return new ReduceEntriesTask(null, this.batchFor(parallelismThreshold), 0, 0, (Node<Object>[])this.table, null, (BiFunction<Entry<Object>, Entry<Object>, ? extends Entry<Object>>)reducer).invoke();
    }
    
    public <U> U reduceEntries(final long parallelismThreshold, final Function<Entry<V>, ? extends U> transformer, final BiFunction<? super U, ? super U, ? extends U> reducer) {
        if (transformer == null || reducer == null) {
            throw new NullPointerException();
        }
        return (U)new MapReduceEntriesTask(null, this.batchFor(parallelismThreshold), 0, 0, (Node<Object>[])this.table, null, (Function<Entry<Object>, ?>)transformer, (BiFunction<? super Object, ? super Object, ?>)reducer).invoke();
    }
    
    public double reduceEntriesToDouble(final long parallelismThreshold, final ToDoubleFunction<Entry<V>> transformer, final double basis, final DoubleBinaryOperator reducer) {
        if (transformer == null || reducer == null) {
            throw new NullPointerException();
        }
        return new MapReduceEntriesToDoubleTask(null, this.batchFor(parallelismThreshold), 0, 0, this.table, null, transformer, basis, reducer).invoke0();
    }
    
    public long reduceEntriesToLong(final long parallelismThreshold, final ToLongFunction<Entry<V>> transformer, final long basis, final LongBinaryOperator reducer) {
        if (transformer == null || reducer == null) {
            throw new NullPointerException();
        }
        return new MapReduceEntriesToLongTask(null, this.batchFor(parallelismThreshold), 0, 0, this.table, null, transformer, basis, reducer).invoke0();
    }
    
    public int reduceEntriesToInt(final long parallelismThreshold, final ToIntFunction<Entry<V>> transformer, final int basis, final IntBinaryOperator reducer) {
        if (transformer == null || reducer == null) {
            throw new NullPointerException();
        }
        return new MapReduceEntriesToIntTask(null, this.batchFor(parallelismThreshold), 0, 0, this.table, null, transformer, basis, reducer).invoke0();
    }
    
    public V valueMatching(final Predicate<V> predicate) {
        Node<V> next = null;
        TableStack<V> stack = null;
        TableStack<V> spare = null;
        int index = 0;
        int baseIndex = 0;
        Node<V>[] tab;
        final int baseSize;
        final int baseLimit = baseSize = (((tab = this.table) == null) ? 0 : tab.length);
        boolean b = false;
    Label_0042:
        while (next != null || !b) {
            b |= true;
            Node<V> e;
            if ((e = next) != null) {
                e = e.next;
            }
            while (e == null) {
                final Node<V>[] t;
                int n;
                final int i;
                if (baseIndex >= baseLimit || (t = tab) == null || (n = t.length) <= (i = index) || i < 0) {
                    next = null;
                    continue Label_0042;
                }
                if ((e = tabAt(t, i)) != null && e.hash < 0) {
                    if (e instanceof final ForwardingNode forwardingNode) {
                        tab = (Node<V>[])forwardingNode.nextTable;
                        e = null;
                        TableStack<V> s = spare;
                        if (s != null) {
                            spare = s.next;
                        }
                        else {
                            s = new TableStack<V>();
                        }
                        s.tab = t;
                        s.length = n;
                        s.index = i;
                        s.next = stack;
                        stack = s;
                        continue;
                    }
                    if (e instanceof final TreeBin treeBin) {
                        e = (Node<V>)treeBin.first;
                    }
                    else {
                        e = null;
                    }
                }
                if (stack != null) {
                    TableStack<V> s;
                    int len;
                    while ((s = stack) != null && (index += (len = s.length)) >= n) {
                        n = len;
                        index = s.index;
                        tab = s.tab;
                        s.tab = null;
                        final TableStack<V> next2 = s.next;
                        s.next = spare;
                        stack = next2;
                        spare = s;
                    }
                    if (s != null || (index += baseSize) < n) {
                        continue;
                    }
                    index = ++baseIndex;
                }
                else {
                    if ((index = i + baseSize) < n) {
                        continue;
                    }
                    index = ++baseIndex;
                }
            }
            final Node<V> node;
            next = (node = e);
            if (predicate.test(node.val)) {
                return e.val;
            }
        }
        return null;
    }
    
    static {
        Char2ObjectConcurrentHashMap.RESIZE_STAMP_BITS = 16;
        MAX_RESIZERS = (1 << 32 - Char2ObjectConcurrentHashMap.RESIZE_STAMP_BITS) - 1;
        RESIZE_STAMP_SHIFT = 32 - Char2ObjectConcurrentHashMap.RESIZE_STAMP_BITS;
        NCPU = Runtime.getRuntime().availableProcessors();
        try {
            final Field f = Unsafe.class.getDeclaredField("theUnsafe");
            f.setAccessible(true);
            U = (Unsafe)f.get(null);
            final Class<?> k = Char2ObjectConcurrentHashMap.class;
            SIZECTL = Char2ObjectConcurrentHashMap.U.objectFieldOffset(k.getDeclaredField("sizeCtl"));
            TRANSFERINDEX = Char2ObjectConcurrentHashMap.U.objectFieldOffset(k.getDeclaredField("transferIndex"));
            BASECOUNT = Char2ObjectConcurrentHashMap.U.objectFieldOffset(k.getDeclaredField("baseCount"));
            CELLSBUSY = Char2ObjectConcurrentHashMap.U.objectFieldOffset(k.getDeclaredField("cellsBusy"));
            final Class<?> ck = CounterCell.class;
            CELLVALUE = Char2ObjectConcurrentHashMap.U.objectFieldOffset(ck.getDeclaredField("value"));
            final Class<?> ak = Node[].class;
            ABASE = Char2ObjectConcurrentHashMap.U.arrayBaseOffset(ak);
            final int scale = Char2ObjectConcurrentHashMap.U.arrayIndexScale(ak);
            if ((scale & scale - 1) != 0x0) {
                throw new Error("data type scale not a power of two");
            }
            ASHIFT = 31 - Integer.numberOfLeadingZeros(scale);
        }
        catch (final Exception e) {
            throw new Error(e);
        }
    }
    
    protected static class Node<V> implements Entry<V>
    {
        public final char EMPTY;
        public final int hash;
        public final char key;
        public volatile V val;
        public volatile Node<V> next;
        
        public Node(final char empty, final int hash, final char key, final V val, final Node<V> next) {
            this.EMPTY = empty;
            this.hash = hash;
            this.key = key;
            this.val = val;
            this.next = next;
        }
        
        @Override
        public final boolean isEmpty() {
            return this.key == this.EMPTY;
        }
        
        @Override
        public final Character getKey() {
            return this.key;
        }
        
        @Override
        public final char getCharKey() {
            return this.key;
        }
        
        @Override
        public final V getValue() {
            return this.val;
        }
        
        @Override
        public final int hashCode() {
            return Character.hashCode(this.key) ^ this.val.hashCode();
        }
        
        @Override
        public final String toString() {
            if (this.isEmpty()) {
                return "EMPTY=" + String.valueOf(this.val);
            }
            return this.key + "=" + String.valueOf(this.val);
        }
        
        @Override
        public final V setValue(final V value) {
            throw new UnsupportedOperationException();
        }
        
        @Override
        public final boolean equals(final Object o) {
            final boolean empty = this.isEmpty();
            return o instanceof Entry && empty == ((Entry)o).isEmpty() && (empty || this.key == ((Entry)o).getCharKey()) && this.val.equals(((Entry)o).getValue());
        }
        
        protected Node<V> find(final int h, final char k) {
            Node<V> e = this;
            if (k != this.EMPTY) {
                char ek;
                while (e.hash != h || ((ek = e.key) != k && (ek == this.EMPTY || k != ek))) {
                    if ((e = e.next) == null) {
                        return null;
                    }
                }
                return e;
            }
            return null;
        }
    }
    
    protected static class Segment<V> extends ReentrantLock implements Serializable
    {
        public static final long serialVersionUID = 2249069246763182397L;
        public final float loadFactor;
        
        public Segment(final float lf) {
            this.loadFactor = lf;
        }
    }
    
    protected static final class ForwardingNode<V> extends Node<V>
    {
        public final Node<V>[] nextTable;
        
        public ForwardingNode(final char empty, final Node<V>[] tab) {
            super(empty, -1, empty, null, null);
            this.nextTable = tab;
        }
        
        @Override
        protected Node<V> find(final int h, final char k) {
            Node<V>[] tab = this.nextTable;
            int n;
            Node<V> e;
        Label_0005:
            while (k != this.EMPTY && tab != null && (n = tab.length) != 0 && (e = Char2ObjectConcurrentHashMap.tabAt(tab, n - 1 & h)) != null) {
                int eh;
                char ek;
                while ((eh = e.hash) != h || ((ek = e.key) != k && (ek == this.EMPTY || k != ek))) {
                    if (eh < 0) {
                        if (e instanceof final ForwardingNode forwardingNode) {
                            tab = forwardingNode.nextTable;
                            continue Label_0005;
                        }
                        return e.find(h, k);
                    }
                    else {
                        if ((e = e.next) == null) {
                            return null;
                        }
                        continue;
                    }
                }
                return e;
            }
            return null;
        }
    }
    
    protected static final class ReservationNode<V> extends Node<V>
    {
        public ReservationNode(final char empty) {
            super(empty, -3, empty, null, null);
        }
        
        @Override
        protected Node<V> find(final int h, final char k) {
            return null;
        }
    }
    
    protected static final class CounterCell
    {
        public volatile long value;
        
        public CounterCell(final long x) {
            this.value = x;
        }
    }
    
    protected static final class TreeNode<V> extends Node<V>
    {
        public TreeNode<V> parent;
        public TreeNode<V> left;
        public TreeNode<V> right;
        public TreeNode<V> prev;
        public boolean red;
        
        public TreeNode(final char empty, final int hash, final char key, final V val, final Node<V> next, final TreeNode<V> parent) {
            super(empty, hash, key, val, next);
            this.parent = parent;
        }
        
        @Override
        protected Node<V> find(final int h, final char k) {
            return this.findTreeNode(h, k, null);
        }
        
        protected final TreeNode<V> findTreeNode(final int h, final char k, final Class<?> kc) {
            if (k != this.EMPTY) {
                TreeNode<V> p = this;
                do {
                    final TreeNode<V> pl = p.left;
                    final TreeNode<V> pr = p.right;
                    final int ph;
                    if ((ph = p.hash) > h) {
                        p = pl;
                    }
                    else if (ph < h) {
                        p = pr;
                    }
                    else {
                        final char pk;
                        if ((pk = p.key) == k || (pk != this.EMPTY && k == pk)) {
                            return p;
                        }
                        if (pl == null) {
                            p = pr;
                        }
                        else if (pr == null) {
                            p = pl;
                        }
                        else {
                            final int dir;
                            if ((dir = Character.compare(k, pk)) != 0) {
                                p = ((dir < 0) ? pl : pr);
                            }
                            else {
                                final TreeNode<V> q;
                                if ((q = pr.findTreeNode(h, k, kc)) != null) {
                                    return q;
                                }
                                p = pl;
                            }
                        }
                    }
                } while (p != null);
            }
            return null;
        }
    }
    
    protected static final class TreeBin<V> extends Node<V>
    {
        public TreeNode<V> root;
        public volatile TreeNode<V> first;
        public volatile Thread waiter;
        public volatile int lockState;
        public static final int WRITER = 1;
        public static final int WAITER = 2;
        public static final int READER = 4;
        protected static final Unsafe U;
        protected static final long LOCKSTATE;
        
        protected int tieBreakOrder(final char a, final char b) {
            final int comp = Character.compare(a, b);
            return (comp > 0) ? 1 : -1;
        }
        
        public TreeBin(final char empty, final TreeNode<V> b) {
            super(empty, -2, empty, null, null);
            this.first = b;
            TreeNode<V> r = null;
            TreeNode<V> next;
            for (TreeNode<V> x = b; x != null; x = next) {
                next = (TreeNode)x.next;
                final TreeNode<V> treeNode = x;
                final TreeNode<V> treeNode2 = x;
                final TreeNode<V> treeNode3 = null;
                treeNode2.right = (TreeNode<V>)treeNode3;
                treeNode.left = (TreeNode<V>)treeNode3;
                if (r == null) {
                    x.parent = null;
                    x.red = false;
                    r = x;
                }
                else {
                    final char k = x.key;
                    final int h = x.hash;
                    final Class<?> kc = null;
                    TreeNode<V> p = r;
                    int dir;
                    TreeNode<V> xp;
                    do {
                        final char pk = p.key;
                        final int ph;
                        if ((ph = p.hash) > h) {
                            dir = -1;
                        }
                        else if (ph < h) {
                            dir = 1;
                        }
                        else if ((dir = Character.compare(k, pk)) == 0) {
                            dir = this.tieBreakOrder(k, pk);
                        }
                        xp = p;
                    } while ((p = ((dir <= 0) ? p.left : p.right)) != null);
                    x.parent = xp;
                    if (dir <= 0) {
                        xp.left = x;
                    }
                    else {
                        xp.right = x;
                    }
                    r = this.balanceInsertion(r, x);
                }
            }
            this.root = r;
            assert this.checkInvariants(this.root);
        }
        
        protected final void lockRoot() {
            if (!TreeBin.U.compareAndSwapInt(this, TreeBin.LOCKSTATE, 0, 1)) {
                this.contendedLock();
            }
        }
        
        protected final void unlockRoot() {
            this.lockState = 0;
        }
        
        protected final void contendedLock() {
            boolean waiting = false;
            while (true) {
                final int s;
                if (((s = this.lockState) & 0xFFFFFFFD) == 0x0) {
                    if (TreeBin.U.compareAndSwapInt(this, TreeBin.LOCKSTATE, s, 1)) {
                        break;
                    }
                    continue;
                }
                else if ((s & 0x2) == 0x0) {
                    if (!TreeBin.U.compareAndSwapInt(this, TreeBin.LOCKSTATE, s, s | 0x2)) {
                        continue;
                    }
                    waiting = true;
                    this.waiter = Thread.currentThread();
                }
                else {
                    if (!waiting) {
                        continue;
                    }
                    LockSupport.park(this);
                }
            }
            if (waiting) {
                this.waiter = null;
            }
        }
        
        @Override
        protected final Node<V> find(final int h, final char k) {
            if (k != this.EMPTY) {
                Node<V> e = this.first;
                while (e != null) {
                    final int s;
                    if (((s = this.lockState) & 0x3) != 0x0) {
                        final char ek;
                        if (e.hash == h && ((ek = e.key) == k || (ek != this.EMPTY && k == ek))) {
                            return e;
                        }
                        e = e.next;
                    }
                    else {
                        if (TreeBin.U.compareAndSwapInt(this, TreeBin.LOCKSTATE, s, s + 4)) {
                            TreeNode<V> p;
                            try {
                                final TreeNode<V> r;
                                p = (((r = this.root) == null) ? null : r.findTreeNode(h, k, null));
                            }
                            finally {
                                final Thread w;
                                if (TreeBin.U.getAndAddInt(this, TreeBin.LOCKSTATE, -4) == 6 && (w = this.waiter) != null) {
                                    LockSupport.unpark(w);
                                }
                            }
                            return p;
                        }
                        continue;
                    }
                }
            }
            return null;
        }
        
        protected final TreeNode<V> putTreeVal(final int h, final char k, final V v) {
            final Class<?> kc = null;
            boolean searched = false;
            TreeNode<V> p = this.root;
            while (true) {
                while (p != null) {
                    final int ph;
                    int dir;
                    if ((ph = p.hash) > h) {
                        dir = -1;
                    }
                    else if (ph < h) {
                        dir = 1;
                    }
                    else {
                        final char pk;
                        if ((pk = p.key) == k || (pk != this.EMPTY && k == pk)) {
                            return p;
                        }
                        if ((dir = Character.compare(k, pk)) == 0) {
                            if (!searched) {
                                searched = true;
                                TreeNode<V> ch;
                                TreeNode<V> q;
                                if (((ch = p.left) != null && (q = ch.findTreeNode(h, k, kc)) != null) || ((ch = p.right) != null && (q = ch.findTreeNode(h, k, kc)) != null)) {
                                    return q;
                                }
                            }
                            dir = this.tieBreakOrder(k, pk);
                        }
                    }
                    final TreeNode<V> xp = p;
                    if ((p = ((dir <= 0) ? p.left : p.right)) == null) {
                        final TreeNode<V> f = this.first;
                        final TreeNode<V> x = this.first = new TreeNode<V>(this.EMPTY, h, k, v, f, xp);
                        if (f != null) {
                            f.prev = x;
                        }
                        if (dir <= 0) {
                            xp.left = x;
                        }
                        else {
                            xp.right = x;
                        }
                        if (!xp.red) {
                            x.red = true;
                        }
                        else {
                            this.lockRoot();
                            try {
                                this.root = this.balanceInsertion(this.root, x);
                            }
                            finally {
                                this.unlockRoot();
                            }
                        }
                        assert this.checkInvariants(this.root);
                        return null;
                    }
                }
                final TreeNode<V> treeNode = new TreeNode<V>(this.EMPTY, h, k, v, null, null);
                this.root = treeNode;
                this.first = treeNode;
                continue;
            }
        }
        
        protected final boolean removeTreeNode(final TreeNode<V> p) {
            final TreeNode<V> next = (TreeNode)p.next;
            final TreeNode<V> pred = p.prev;
            if (pred == null) {
                this.first = next;
            }
            else {
                pred.next = next;
            }
            if (next != null) {
                next.prev = pred;
            }
            if (this.first == null) {
                this.root = null;
                return true;
            }
            TreeNode<V> r;
            final TreeNode<V> rl;
            if ((r = this.root) == null || r.right == null || (rl = r.left) == null || rl.left == null) {
                return true;
            }
            this.lockRoot();
            try {
                final TreeNode<V> pl = p.left;
                final TreeNode<V> pr = p.right;
                TreeNode<V> replacement;
                if (pl != null && pr != null) {
                    TreeNode<V> s;
                    TreeNode<V> sl;
                    for (s = pr; (sl = s.left) != null; s = sl) {}
                    final boolean c = s.red;
                    s.red = p.red;
                    p.red = c;
                    final TreeNode<V> sr = s.right;
                    final TreeNode<V> pp = p.parent;
                    if (s == pr) {
                        p.parent = s;
                        s.right = p;
                    }
                    else {
                        final TreeNode<V> sp = s.parent;
                        if ((p.parent = sp) != null) {
                            if (s == sp.left) {
                                sp.left = p;
                            }
                            else {
                                sp.right = p;
                            }
                        }
                        if ((s.right = pr) != null) {
                            pr.parent = s;
                        }
                    }
                    p.left = null;
                    if ((p.right = sr) != null) {
                        sr.parent = p;
                    }
                    if ((s.left = pl) != null) {
                        pl.parent = s;
                    }
                    if ((s.parent = pp) == null) {
                        r = s;
                    }
                    else if (p == pp.left) {
                        pp.left = s;
                    }
                    else {
                        pp.right = s;
                    }
                    if (sr != null) {
                        replacement = sr;
                    }
                    else {
                        replacement = p;
                    }
                }
                else if (pl != null) {
                    replacement = pl;
                }
                else if (pr != null) {
                    replacement = pr;
                }
                else {
                    replacement = p;
                }
                if (replacement != p) {
                    final TreeNode<V> treeNode = replacement;
                    final TreeNode<V> parent = p.parent;
                    treeNode.parent = parent;
                    final TreeNode<V> pp2 = parent;
                    if (pp2 == null) {
                        r = replacement;
                    }
                    else if (p == pp2.left) {
                        pp2.left = replacement;
                    }
                    else {
                        pp2.right = replacement;
                    }
                    final TreeNode<V> left = null;
                    p.parent = (TreeNode<V>)left;
                    p.right = (TreeNode<V>)left;
                    p.left = (TreeNode<V>)left;
                }
                this.root = (p.red ? r : this.balanceDeletion(r, replacement));
                TreeNode<V> pp2;
                if (p == replacement && (pp2 = p.parent) != null) {
                    if (p == pp2.left) {
                        pp2.left = null;
                    }
                    else if (p == pp2.right) {
                        pp2.right = null;
                    }
                    p.parent = null;
                }
            }
            finally {
                this.unlockRoot();
            }
            assert this.checkInvariants(this.root);
            return false;
        }
        
        protected <V> TreeNode<V> rotateLeft(TreeNode<V> root, final TreeNode<V> p) {
            final TreeNode<V> r;
            if (p != null && (r = p.right) != null) {
                final TreeNode<V> left = r.left;
                p.right = left;
                final TreeNode<V> rl;
                if ((rl = left) != null) {
                    rl.parent = p;
                }
                final TreeNode<V> treeNode = r;
                final TreeNode<V> parent = p.parent;
                treeNode.parent = parent;
                final TreeNode<V> pp;
                if ((pp = parent) == null) {
                    (root = r).red = false;
                }
                else if (pp.left == p) {
                    pp.left = r;
                }
                else {
                    pp.right = r;
                }
                r.left = p;
                p.parent = r;
            }
            return root;
        }
        
        protected <V> TreeNode<V> rotateRight(TreeNode<V> root, final TreeNode<V> p) {
            final TreeNode<V> l;
            if (p != null && (l = p.left) != null) {
                final TreeNode<V> right = l.right;
                p.left = right;
                final TreeNode<V> lr;
                if ((lr = right) != null) {
                    lr.parent = p;
                }
                final TreeNode<V> treeNode = l;
                final TreeNode<V> parent = p.parent;
                treeNode.parent = parent;
                final TreeNode<V> pp;
                if ((pp = parent) == null) {
                    (root = l).red = false;
                }
                else if (pp.right == p) {
                    pp.right = l;
                }
                else {
                    pp.left = l;
                }
                l.right = p;
                p.parent = l;
            }
            return root;
        }
        
        protected <V> TreeNode<V> balanceInsertion(TreeNode<V> root, TreeNode<V> x) {
            x.red = true;
            TreeNode<V> xp;
            while ((xp = x.parent) != null) {
                TreeNode<V> xpp;
                if (!xp.red || (xpp = xp.parent) == null) {
                    return root;
                }
                final TreeNode<V> xppl;
                if (xp == (xppl = xpp.left)) {
                    final TreeNode<V> xppr;
                    if ((xppr = xpp.right) != null && xppr.red) {
                        xppr.red = false;
                        xp.red = false;
                        xpp.red = true;
                        x = xpp;
                    }
                    else {
                        if (x == xp.right) {
                            root = (TreeNode<V>)this.rotateLeft((TreeNode<Object>)root, (TreeNode<Object>)(x = xp));
                            xpp = (((xp = x.parent) == null) ? null : xp.parent);
                        }
                        if (xp == null) {
                            continue;
                        }
                        xp.red = false;
                        if (xpp == null) {
                            continue;
                        }
                        xpp.red = true;
                        root = (TreeNode<V>)this.rotateRight((TreeNode<Object>)root, (TreeNode<Object>)xpp);
                    }
                }
                else if (xppl != null && xppl.red) {
                    xppl.red = false;
                    xp.red = false;
                    xpp.red = true;
                    x = xpp;
                }
                else {
                    if (x == xp.left) {
                        root = (TreeNode<V>)this.rotateRight((TreeNode<Object>)root, (TreeNode<Object>)(x = xp));
                        xpp = (((xp = x.parent) == null) ? null : xp.parent);
                    }
                    if (xp == null) {
                        continue;
                    }
                    xp.red = false;
                    if (xpp == null) {
                        continue;
                    }
                    xpp.red = true;
                    root = (TreeNode<V>)this.rotateLeft((TreeNode<Object>)root, (TreeNode<Object>)xpp);
                }
            }
            x.red = false;
            return x;
        }
        
        protected <V> TreeNode<V> balanceDeletion(TreeNode<V> root, TreeNode<V> x) {
            while (x != null && x != root) {
                TreeNode<V> xp;
                if ((xp = x.parent) == null) {
                    x.red = false;
                    return x;
                }
                if (x.red) {
                    x.red = false;
                    return root;
                }
                TreeNode<V> xpl;
                if ((xpl = xp.left) == x) {
                    TreeNode<V> xpr;
                    if ((xpr = xp.right) != null && xpr.red) {
                        xpr.red = false;
                        xp.red = true;
                        root = (TreeNode<V>)this.rotateLeft((TreeNode<Object>)root, (TreeNode<Object>)xp);
                        xpr = (((xp = x.parent) == null) ? null : xp.right);
                    }
                    if (xpr == null) {
                        x = xp;
                    }
                    else {
                        final TreeNode<V> sl = xpr.left;
                        TreeNode<V> sr = xpr.right;
                        if ((sr == null || !sr.red) && (sl == null || !sl.red)) {
                            xpr.red = true;
                            x = xp;
                        }
                        else {
                            if (sr == null || !sr.red) {
                                if (sl != null) {
                                    sl.red = false;
                                }
                                xpr.red = true;
                                root = (TreeNode<V>)this.rotateRight((TreeNode<Object>)root, (TreeNode<Object>)xpr);
                                xpr = (((xp = x.parent) == null) ? null : xp.right);
                            }
                            if (xpr != null) {
                                xpr.red = (xp != null && xp.red);
                                if ((sr = xpr.right) != null) {
                                    sr.red = false;
                                }
                            }
                            if (xp != null) {
                                xp.red = false;
                                root = (TreeNode<V>)this.rotateLeft((TreeNode<Object>)root, (TreeNode<Object>)xp);
                            }
                            x = root;
                        }
                    }
                }
                else {
                    if (xpl != null && xpl.red) {
                        xpl.red = false;
                        xp.red = true;
                        root = (TreeNode<V>)this.rotateRight((TreeNode<Object>)root, (TreeNode<Object>)xp);
                        xpl = (((xp = x.parent) == null) ? null : xp.left);
                    }
                    if (xpl == null) {
                        x = xp;
                    }
                    else {
                        TreeNode<V> sl = xpl.left;
                        final TreeNode<V> sr = xpl.right;
                        if ((sl == null || !sl.red) && (sr == null || !sr.red)) {
                            xpl.red = true;
                            x = xp;
                        }
                        else {
                            if (sl == null || !sl.red) {
                                if (sr != null) {
                                    sr.red = false;
                                }
                                xpl.red = true;
                                root = (TreeNode<V>)this.rotateLeft((TreeNode<Object>)root, (TreeNode<Object>)xpl);
                                xpl = (((xp = x.parent) == null) ? null : xp.left);
                            }
                            if (xpl != null) {
                                xpl.red = (xp != null && xp.red);
                                if ((sl = xpl.left) != null) {
                                    sl.red = false;
                                }
                            }
                            if (xp != null) {
                                xp.red = false;
                                root = (TreeNode<V>)this.rotateRight((TreeNode<Object>)root, (TreeNode<Object>)xp);
                            }
                            x = root;
                        }
                    }
                }
            }
            return root;
        }
        
        protected <V> boolean checkInvariants(final TreeNode<V> t) {
            final TreeNode<V> tp = t.parent;
            final TreeNode<V> tl = t.left;
            final TreeNode<V> tr = t.right;
            final TreeNode<V> tb = t.prev;
            final TreeNode<V> tn = (TreeNode)t.next;
            return (tb == null || tb.next == t) && (tn == null || tn.prev == t) && (tp == null || t == tp.left || t == tp.right) && (tl == null || (tl.parent == t && tl.hash <= t.hash)) && (tr == null || (tr.parent == t && tr.hash >= t.hash)) && (!t.red || tl == null || !tl.red || tr == null || !tr.red) && (tl == null || this.checkInvariants((TreeNode<Object>)tl)) && (tr == null || this.checkInvariants((TreeNode<Object>)tr));
        }
        
        static {
            try {
                final Field f = Unsafe.class.getDeclaredField("theUnsafe");
                f.setAccessible(true);
                U = (Unsafe)f.get(null);
                final Class<?> k = TreeBin.class;
                LOCKSTATE = TreeBin.U.objectFieldOffset(k.getDeclaredField("lockState"));
            }
            catch (final Exception e) {
                throw new Error(e);
            }
        }
    }
    
    protected static final class TableStack<V>
    {
        public int length;
        public int index;
        public Node<V>[] tab;
        public TableStack<V> next;
        
        public TableStack() {
        }
    }
    
    protected static class Traverser<V>
    {
        public Node<V>[] tab;
        public Node<V> next;
        public TableStack<V> stack;
        public TableStack<V> spare;
        public int index;
        public int baseIndex;
        public int baseLimit;
        public final int baseSize;
        
        public Traverser(final Node<V>[] tab, final int size, final int index, final int limit) {
            this.tab = tab;
            this.baseSize = size;
            this.index = index;
            this.baseIndex = index;
            this.baseLimit = limit;
            this.next = null;
        }
        
        protected final Node<V> advance() {
            Node<V> e;
            if ((e = this.next) != null) {
                e = e.next;
            }
            while (e == null) {
                final Node<V>[] t;
                final int n;
                final int i;
                if (this.baseIndex >= this.baseLimit || (t = this.tab) == null || (n = t.length) <= (i = this.index) || i < 0) {
                    return this.next = null;
                }
                if ((e = Char2ObjectConcurrentHashMap.tabAt(t, i)) != null && e.hash < 0) {
                    if (e instanceof final ForwardingNode forwardingNode) {
                        this.tab = (Node<V>[])forwardingNode.nextTable;
                        e = null;
                        this.pushState(t, i, n);
                        continue;
                    }
                    if (e instanceof final TreeBin treeBin) {
                        e = (Node<V>)treeBin.first;
                    }
                    else {
                        e = null;
                    }
                }
                if (this.stack != null) {
                    this.recoverState(n);
                }
                else {
                    if ((this.index = i + this.baseSize) < n) {
                        continue;
                    }
                    this.index = ++this.baseIndex;
                }
            }
            return this.next = e;
        }
        
        protected void pushState(final Node<V>[] t, final int i, final int n) {
            TableStack<V> s = this.spare;
            if (s != null) {
                this.spare = s.next;
            }
            else {
                s = new TableStack<V>();
            }
            s.tab = t;
            s.length = n;
            s.index = i;
            s.next = this.stack;
            this.stack = s;
        }
        
        protected void recoverState(int n) {
            TableStack<V> s;
            int len;
            while ((s = this.stack) != null && (this.index += (len = s.length)) >= n) {
                n = len;
                this.index = s.index;
                this.tab = s.tab;
                s.tab = null;
                final TableStack<V> next = s.next;
                s.next = this.spare;
                this.stack = next;
                this.spare = s;
            }
            if (s == null && (this.index += this.baseSize) >= n) {
                this.index = ++this.baseIndex;
            }
        }
    }
    
    protected static class BaseIterator<V> extends Traverser<V>
    {
        public final Char2ObjectConcurrentHashMap<V> map;
        public Node<V> lastReturned;
        
        public BaseIterator(final Node<V>[] tab, final int size, final int index, final int limit, final Char2ObjectConcurrentHashMap<V> map) {
            super(tab, size, index, limit);
            this.map = map;
            this.advance();
        }
        
        public final boolean hasNext() {
            return this.next != null;
        }
        
        public final boolean hasMoreElements() {
            return this.next != null;
        }
        
        public final void remove() {
            final Node<V> p;
            if ((p = this.lastReturned) == null) {
                throw new IllegalStateException();
            }
            this.lastReturned = null;
            this.map.replaceNode(p.key, null, null);
        }
    }
    
    protected static final class KeyIterator<V> implements CharIterator
    {
        public Node<V>[] tab;
        public Node<V> next;
        public TableStack<V> stack;
        public TableStack<V> spare;
        public int index;
        public int baseIndex;
        public int baseLimit;
        public final int baseSize;
        public final Char2ObjectConcurrentHashMap<V> map;
        public Node<V> lastReturned;
        
        public KeyIterator(final Node<V>[] tab, final int size, final int index, final int limit, final Char2ObjectConcurrentHashMap<V> map) {
            this.tab = tab;
            this.baseSize = size;
            this.index = index;
            this.baseIndex = index;
            this.baseLimit = limit;
            this.next = null;
            this.map = map;
            this.advance();
        }
        
        protected final Node<V> advance() {
            Node<V> e;
            if ((e = this.next) != null) {
                e = e.next;
            }
            while (e == null) {
                final Node<V>[] t;
                final int n;
                final int i;
                if (this.baseIndex >= this.baseLimit || (t = this.tab) == null || (n = t.length) <= (i = this.index) || i < 0) {
                    return this.next = null;
                }
                if ((e = Char2ObjectConcurrentHashMap.tabAt(t, i)) != null && e.hash < 0) {
                    if (e instanceof final ForwardingNode forwardingNode) {
                        this.tab = (Node<V>[])forwardingNode.nextTable;
                        e = null;
                        this.pushState(t, i, n);
                        continue;
                    }
                    if (e instanceof final TreeBin treeBin) {
                        e = (Node<V>)treeBin.first;
                    }
                    else {
                        e = null;
                    }
                }
                if (this.stack != null) {
                    this.recoverState(n);
                }
                else {
                    if ((this.index = i + this.baseSize) < n) {
                        continue;
                    }
                    this.index = ++this.baseIndex;
                }
            }
            return this.next = e;
        }
        
        protected void pushState(final Node<V>[] t, final int i, final int n) {
            TableStack<V> s = this.spare;
            if (s != null) {
                this.spare = s.next;
            }
            else {
                s = new TableStack<V>();
            }
            s.tab = t;
            s.length = n;
            s.index = i;
            s.next = this.stack;
            this.stack = s;
        }
        
        protected void recoverState(int n) {
            TableStack<V> s;
            int len;
            while ((s = this.stack) != null && (this.index += (len = s.length)) >= n) {
                n = len;
                this.index = s.index;
                this.tab = s.tab;
                s.tab = null;
                final TableStack<V> next = s.next;
                s.next = this.spare;
                this.stack = next;
                this.spare = s;
            }
            if (s == null && (this.index += this.baseSize) >= n) {
                this.index = ++this.baseIndex;
            }
        }
        
        @Override
        public final boolean hasNext() {
            return this.next != null;
        }
        
        public final boolean hasMoreElements() {
            return this.next != null;
        }
        
        @Override
        public final void remove() {
            final Node<V> p;
            if ((p = this.lastReturned) == null) {
                throw new IllegalStateException();
            }
            this.lastReturned = null;
            this.map.replaceNode(p.key, null, null);
        }
        
        @Override
        public final char nextChar() {
            final Node<V> p;
            if ((p = this.next) == null) {
                throw new NoSuchElementException();
            }
            final char k = p.key;
            this.lastReturned = p;
            this.advance();
            return k;
        }
    }
    
    protected static final class ValueIterator<V> extends BaseIterator<V> implements ObjectIterator<V>, Enumeration<V>
    {
        public ValueIterator(final Node<V>[] tab, final int index, final int size, final int limit, final Char2ObjectConcurrentHashMap<V> map) {
            super(tab, index, size, limit, map);
        }
        
        @Override
        public final V next() {
            final Node<V> p;
            if ((p = this.next) == null) {
                throw new NoSuchElementException();
            }
            final V v = p.val;
            this.lastReturned = p;
            this.advance();
            return v;
        }
        
        @Override
        public final V nextElement() {
            return this.next();
        }
    }
    
    protected static final class EntryIterator<V> extends BaseIterator<V> implements ObjectIterator<Char2ObjectMap.Entry<V>>
    {
        public EntryIterator(final Node<V>[] tab, final int index, final int size, final int limit, final Char2ObjectConcurrentHashMap<V> map) {
            super(tab, index, size, limit, map);
        }
        
        @Override
        public final Entry<V> next() {
            final Node<V> p;
            if ((p = this.next) == null) {
                throw new NoSuchElementException();
            }
            final char k = p.key;
            final V v = p.val;
            this.lastReturned = p;
            this.advance();
            return new MapEntry<V>(p.isEmpty(), k, v, this.map);
        }
    }
    
    public interface Entry<V> extends Char2ObjectMap.Entry<V>
    {
        boolean isEmpty();
        
        @Deprecated
        Character getKey();
        
        char getCharKey();
        
        V getValue();
        
        int hashCode();
        
        String toString();
        
        boolean equals(final Object p0);
        
        V setValue(final V p0);
    }
    
    protected static final class MapEntry<V> implements Entry<V>
    {
        public final boolean empty;
        public final char key;
        public V val;
        public final Char2ObjectConcurrentHashMap<V> map;
        
        public MapEntry(final boolean empty, final char key, final V val, final Char2ObjectConcurrentHashMap<V> map) {
            this.empty = empty;
            this.key = key;
            this.val = val;
            this.map = map;
        }
        
        @Override
        public boolean isEmpty() {
            return this.empty;
        }
        
        @Override
        public Character getKey() {
            return this.key;
        }
        
        @Override
        public char getCharKey() {
            return this.key;
        }
        
        @Override
        public V getValue() {
            return this.val;
        }
        
        @Override
        public String toString() {
            if (this.empty) {
                return "EMPTY=" + String.valueOf(this.val);
            }
            return this.key + "=" + String.valueOf(this.val);
        }
        
        @Override
        public boolean equals(final Object o) {
            return this == o || (o instanceof Entry && this.empty == ((Entry)o).isEmpty() && (this.empty || this.key == ((Entry)o).getCharKey()) && this.val.equals(((Entry)o).getValue()));
        }
        
        @Override
        public int hashCode() {
            int result = this.empty ? 1 : 0;
            result = 31 * result + Character.hashCode(this.key);
            result = 31 * result + this.val.hashCode();
            return result;
        }
        
        @Override
        public V setValue(final V value) {
            if (value == null) {
                throw new NullPointerException();
            }
            final V v = this.val;
            this.val = value;
            this.map.put(this.key, value);
            return v;
        }
    }
    
    protected static final class KeySpliterator<V> extends Traverser<V> implements CharSpliterator
    {
        public long est;
        
        public KeySpliterator(final Node<V>[] tab, final int size, final int index, final int limit, final long est) {
            super(tab, size, index, limit);
            this.est = est;
        }
        
        @Override
        public CharSpliterator trySplit() {
            final int i = this.baseIndex;
            final int f;
            final int h;
            CharSpliterator charSpliterator;
            if ((h = i + (f = this.baseLimit) >>> 1) <= i) {
                charSpliterator = null;
            }
            else {
                final Node<V>[] tab;
                final int baseSize;
                final int n;
                charSpliterator = new KeySpliterator<Object>((Node<Object>[])tab, baseSize, n, f, this.est >>>= 1);
                tab = this.tab;
                baseSize = this.baseSize;
                n = h;
                this.baseLimit = n;
            }
            return charSpliterator;
        }
        
        @Override
        public boolean tryAdvance(final Consumer<? super Character> action) {
            if (action instanceof final CharConsumer charConsumer) {
                return this.tryAdvance(charConsumer);
            }
            return this.tryAdvance(value -> action.accept(value));
        }
        
        @Override
        public void forEachRemaining(final CharConsumer action) {
            if (action == null) {
                throw new NullPointerException();
            }
            Node<V> p;
            while ((p = this.advance()) != null) {
                action.accept(p.key);
            }
        }
        
        @Override
        public boolean tryAdvance(final CharConsumer action) {
            if (action == null) {
                throw new NullPointerException();
            }
            final Node<V> p;
            if ((p = this.advance()) == null) {
                return false;
            }
            action.accept(p.key);
            return true;
        }
        
        @Override
        public long estimateSize() {
            return this.est;
        }
        
        @Override
        public int characteristics() {
            return 4353;
        }
    }
    
    protected static final class ValueSpliterator<V> extends Traverser<V> implements ObjectSpliterator<V>
    {
        public long est;
        
        public ValueSpliterator(final Node<V>[] tab, final int size, final int index, final int limit, final long est) {
            super(tab, size, index, limit);
            this.est = est;
        }
        
        @Override
        public ObjectSpliterator<V> trySplit() {
            final int i = this.baseIndex;
            final int f;
            final int h;
            ObjectSpliterator<V> objectSpliterator;
            if ((h = i + (f = this.baseLimit) >>> 1) <= i) {
                objectSpliterator = null;
            }
            else {
                final Node<V>[] tab;
                final int baseSize;
                final int n;
                objectSpliterator = new ValueSpliterator((Node<Object>[])tab, baseSize, n, f, this.est >>>= 1);
                tab = this.tab;
                baseSize = this.baseSize;
                n = h;
                this.baseLimit = n;
            }
            return objectSpliterator;
        }
        
        @Override
        public void forEachRemaining(final Consumer<? super V> action) {
            if (action == null) {
                throw new NullPointerException();
            }
            Node<V> p;
            while ((p = this.advance()) != null) {
                action.accept(p.val);
            }
        }
        
        @Override
        public boolean tryAdvance(final Consumer<? super V> action) {
            if (action == null) {
                throw new NullPointerException();
            }
            final Node<V> p;
            if ((p = this.advance()) == null) {
                return false;
            }
            action.accept(p.val);
            return true;
        }
        
        @Override
        public long estimateSize() {
            return this.est;
        }
        
        @Override
        public int characteristics() {
            return 4352;
        }
    }
    
    protected static final class EntrySpliterator<V> extends Traverser<V> implements ObjectSpliterator<Char2ObjectMap.Entry<V>>
    {
        public final Char2ObjectConcurrentHashMap<V> map;
        public long est;
        
        public EntrySpliterator(final Node<V>[] tab, final int size, final int index, final int limit, final long est, final Char2ObjectConcurrentHashMap<V> map) {
            super(tab, size, index, limit);
            this.map = map;
            this.est = est;
        }
        
        @Override
        public ObjectSpliterator<Char2ObjectMap.Entry<V>> trySplit() {
            final int i = this.baseIndex;
            final int f;
            final int h;
            Object o;
            if ((h = i + (f = this.baseLimit) >>> 1) <= i) {
                o = null;
            }
            else {
                final Node<V>[] tab;
                final int baseSize;
                final int n;
                o = new EntrySpliterator<Object>((Node<Object>[])tab, baseSize, n, f, this.est >>>= 1, (Char2ObjectConcurrentHashMap<Object>)this.map);
                tab = this.tab;
                baseSize = this.baseSize;
                n = h;
                this.baseLimit = n;
            }
            return (ObjectSpliterator<Char2ObjectMap.Entry<V>>)o;
        }
        
        @Override
        public void forEachRemaining(final Consumer<? super Char2ObjectMap.Entry<V>> action) {
            if (action == null) {
                throw new NullPointerException();
            }
            Node<V> p;
            while ((p = this.advance()) != null) {
                action.accept((Object)new MapEntry(p.isEmpty(), p.key, (V)p.val, (Char2ObjectConcurrentHashMap<V>)this.map));
            }
        }
        
        @Override
        public boolean tryAdvance(final Consumer<? super Char2ObjectMap.Entry<V>> action) {
            if (action == null) {
                throw new NullPointerException();
            }
            final Node<V> p;
            if ((p = this.advance()) == null) {
                return false;
            }
            action.accept((Object)new MapEntry(p.isEmpty(), p.key, (V)p.val, (Char2ObjectConcurrentHashMap<V>)this.map));
            return true;
        }
        
        @Override
        public long estimateSize() {
            return this.est;
        }
        
        @Override
        public int characteristics() {
            return 4353;
        }
    }
    
    protected abstract static class CollectionView<K, E> implements ObjectCollection<E>, Serializable
    {
        public static final long serialVersionUID = 7249069246763182397L;
        public final Char2ObjectConcurrentHashMap<K> map;
        protected static final String oomeMsg = "Required array size too large";
        
        public CollectionView(final Char2ObjectConcurrentHashMap<K> map) {
            this.map = map;
        }
        
        public Char2ObjectConcurrentHashMap<K> getMap() {
            return this.map;
        }
        
        @Override
        public final void clear() {
            this.map.clear();
        }
        
        @Override
        public final int size() {
            return this.map.size();
        }
        
        @Override
        public final boolean isEmpty() {
            return this.map.isEmpty();
        }
        
        @Override
        public abstract ObjectIterator<E> iterator();
        
        @Override
        public abstract boolean contains(final Object p0);
        
        @Override
        public abstract boolean remove(final Object p0);
        
        @Override
        public final Object[] toArray() {
            final long sz = this.map.mappingCount();
            if (sz > 2147483639L) {
                throw new OutOfMemoryError("Required array size too large");
            }
            int n = (int)sz;
            Object[] r = new Object[n];
            int i = 0;
            for (final E e : this) {
                if (i == n) {
                    if (n >= 2147483639) {
                        throw new OutOfMemoryError("Required array size too large");
                    }
                    if (n >= 1073741819) {
                        n = 2147483639;
                    }
                    else {
                        n += (n >>> 1) + 1;
                    }
                    r = Arrays.copyOf(r, n);
                }
                r[i++] = e;
            }
            return (i == n) ? r : Arrays.copyOf(r, i);
        }
        
        @Override
        public final <T> T[] toArray(final T[] a) {
            final long sz = this.map.mappingCount();
            if (sz > 2147483639L) {
                throw new OutOfMemoryError("Required array size too large");
            }
            final int m = (int)sz;
            T[] r = (T[])((a.length >= m) ? a : ((Object[])Array.newInstance(a.getClass().getComponentType(), m)));
            int n = r.length;
            int i = 0;
            for (final E e : this) {
                if (i == n) {
                    if (n >= 2147483639) {
                        throw new OutOfMemoryError("Required array size too large");
                    }
                    if (n >= 1073741819) {
                        n = 2147483639;
                    }
                    else {
                        n += (n >>> 1) + 1;
                    }
                    r = Arrays.copyOf(r, n);
                }
                r[i++] = (T)e;
            }
            if (a == r && i < n) {
                r[i] = null;
                return r;
            }
            return (i == n) ? r : Arrays.copyOf(r, i);
        }
        
        @Override
        public final String toString() {
            final StringBuilder sb = new StringBuilder();
            sb.append('[');
            final Iterator<E> it = this.iterator();
            if (it.hasNext()) {
                while (true) {
                    final Object e = it.next();
                    sb.append((e == this) ? "(this Collection)" : e);
                    if (!it.hasNext()) {
                        break;
                    }
                    sb.append(',').append(' ');
                }
            }
            return sb.append(']').toString();
        }
        
        @Override
        public final boolean containsAll(final Collection<?> c) {
            if (c != this) {
                for (final Object e : c) {
                    if (e == null || !this.contains(e)) {
                        return false;
                    }
                }
            }
            return true;
        }
        
        @Override
        public final boolean removeAll(final Collection<?> c) {
            if (c == null) {
                throw new NullPointerException();
            }
            boolean modified = false;
            final Iterator<E> it = this.iterator();
            while (it.hasNext()) {
                if (c.contains(it.next())) {
                    it.remove();
                    modified = true;
                }
            }
            return modified;
        }
        
        @Override
        public final boolean retainAll(final Collection<?> c) {
            if (c == null) {
                throw new NullPointerException();
            }
            boolean modified = false;
            final Iterator<E> it = this.iterator();
            while (it.hasNext()) {
                if (!c.contains(it.next())) {
                    it.remove();
                    modified = true;
                }
            }
            return modified;
        }
    }
    
    public static class KeySetView<V> implements CharSet
    {
        public static final long serialVersionUID = 7249069246763182397L;
        public final Char2ObjectConcurrentHashMap<V> map;
        public final V value;
        
        public KeySetView(final Char2ObjectConcurrentHashMap<V> map, final V value) {
            this.map = map;
            this.value = value;
        }
        
        public V getMappedValue() {
            return this.value;
        }
        
        @Override
        public boolean contains(final char o) {
            return this.map.containsKey(o);
        }
        
        @Override
        public boolean remove(final char o) {
            return this.map.remove(o) != null;
        }
        
        @Override
        public CharIterator iterator() {
            final Char2ObjectConcurrentHashMap<V> m = this.map;
            final Node<V>[] t;
            final int f = ((t = m.table) == null) ? 0 : t.length;
            return new KeyIterator<Object>(t, f, 0, f, m);
        }
        
        @Override
        public boolean add(final char e) {
            final V v;
            if ((v = this.value) == null) {
                throw new UnsupportedOperationException();
            }
            return this.map.putVal(e, v, true) == null;
        }
        
        @Override
        public boolean addAll(final CharCollection c) {
            boolean added = false;
            final V v;
            if ((v = this.value) == null) {
                throw new UnsupportedOperationException();
            }
            final CharIterator iter = c.iterator();
            while (iter.hasNext()) {
                final char e = iter.nextChar();
                if (this.map.putVal(e, v, true) == null) {
                    added = true;
                }
            }
            return added;
        }
        
        @Override
        public int hashCode() {
            int h = 0;
            final CharIterator iter = this.iterator();
            while (iter.hasNext()) {
                h += Character.hashCode(iter.nextChar());
            }
            return h;
        }
        
        @Override
        public boolean equals(final Object o) {
            final CharSet c;
            return o instanceof CharSet && ((c = (CharSet)o) == this || (this.containsAll(c) && c.containsAll(this)));
        }
        
        public char getNoEntryValue() {
            return this.map.EMPTY;
        }
        
        @Override
        public int size() {
            return this.map.size();
        }
        
        @Override
        public boolean isEmpty() {
            return this.map.isEmpty();
        }
        
        @Override
        public Object[] toArray() {
            Object[] out;
            CharIterator iter;
            int i;
            for (out = new Character[this.size()], iter = this.iterator(), i = 0; i < out.length && iter.hasNext(); ++i) {
                out[i] = iter.nextChar();
            }
            if (out.length > i + 1) {
                out[i] = this.map.EMPTY;
            }
            return out;
        }
        
        @Override
        public Object[] toArray(final Object[] dest) {
            CharIterator iter;
            int i;
            for (iter = this.iterator(), i = 0; i < dest.length && iter.hasNext() && i <= dest.length; ++i) {
                dest[i] = iter.next();
            }
            if (dest.length > i + 1) {
                dest[i] = this.map.EMPTY;
            }
            return dest;
        }
        
        @Override
        public char[] toCharArray() {
            char[] out;
            CharIterator iter;
            int i;
            for (out = new char[this.size()], iter = this.iterator(), i = 0; i < out.length && iter.hasNext(); ++i) {
                out[i] = iter.next();
            }
            if (out.length > i + 1) {
                out[i] = this.map.EMPTY;
            }
            return out;
        }
        
        @Override
        public char[] toArray(final char[] dest) {
            CharIterator iter;
            int i;
            for (iter = this.iterator(), i = 0; i < dest.length && iter.hasNext() && i <= dest.length; ++i) {
                dest[i] = iter.next();
            }
            if (dest.length > i + 1) {
                dest[i] = this.map.EMPTY;
            }
            return dest;
        }
        
        @Override
        public char[] toCharArray(final char[] dest) {
            return this.toArray(dest);
        }
        
        @Override
        public boolean containsAll(final Collection<?> collection) {
            for (final Object element : collection) {
                if (!(element instanceof Long)) {
                    return false;
                }
                final char c = (char)element;
                if (!this.contains(c)) {
                    return false;
                }
            }
            return true;
        }
        
        @Override
        public boolean containsAll(final CharCollection collection) {
            for (final char element : collection) {
                if (!this.contains(element)) {
                    return false;
                }
            }
            return true;
        }
        
        public boolean containsAll(final char[] array) {
            int i = array.length;
            while (i-- > 0) {
                if (!this.contains(array[i])) {
                    return false;
                }
            }
            return true;
        }
        
        @Override
        public boolean addAll(final Collection<? extends Character> collection) {
            boolean changed = false;
            for (final Character element : collection) {
                final char e = element;
                if (this.add(e)) {
                    changed = true;
                }
            }
            return changed;
        }
        
        public boolean addAll(final char[] array) {
            boolean changed = false;
            int i = array.length;
            while (i-- > 0) {
                if (this.add(array[i])) {
                    changed = true;
                }
            }
            return changed;
        }
        
        @Override
        public boolean retainAll(final Collection<?> collection) {
            boolean modified = false;
            final CharIterator iter = this.iterator();
            while (iter.hasNext()) {
                if (!collection.contains(iter.next())) {
                    iter.remove();
                    modified = true;
                }
            }
            return modified;
        }
        
        @Override
        public boolean retainAll(final CharCollection collection) {
            if (this == collection) {
                return false;
            }
            boolean modified = false;
            final CharIterator iter = this.iterator();
            while (iter.hasNext()) {
                if (!collection.contains(iter.next())) {
                    iter.remove();
                    modified = true;
                }
            }
            return modified;
        }
        
        public boolean retainAll(final char[] array) {
            boolean modified = false;
            final CharIterator iter = this.iterator();
            while (iter.hasNext()) {
                if (Arrays.binarySearch(array, iter.next()) < 0) {
                    iter.remove();
                    modified = true;
                }
            }
            return modified;
        }
        
        @Override
        public boolean removeAll(final Collection<?> collection) {
            boolean changed = false;
            for (final Object element : collection) {
                if (element instanceof Character) {
                    final char c = (char)element;
                    if (!this.remove(c)) {
                        continue;
                    }
                    changed = true;
                }
            }
            return changed;
        }
        
        @Override
        public boolean removeAll(final CharCollection collection) {
            boolean changed = false;
            for (final char element : collection) {
                if (this.remove(element)) {
                    changed = true;
                }
            }
            return changed;
        }
        
        public boolean removeAll(final char[] array) {
            boolean changed = false;
            int i = array.length;
            while (i-- > 0) {
                if (this.remove(array[i])) {
                    changed = true;
                }
            }
            return changed;
        }
        
        @Override
        public void clear() {
            this.map.clear();
        }
        
        @Override
        public CharSpliterator spliterator() {
            final Char2ObjectConcurrentHashMap<V> m = this.map;
            final long n = m.sumCount();
            final Node<V>[] t;
            final int f = ((t = m.table) == null) ? 0 : t.length;
            return new KeySpliterator<Object>(t, f, 0, f, (n < 0L) ? 0L : n);
        }
    }
    
    protected static final class ValuesView<V> extends CollectionView<V, V> implements FastCollection<V>, Serializable
    {
        public static final long serialVersionUID = 2249069246763182397L;
        
        public ValuesView(final Char2ObjectConcurrentHashMap<V> map) {
            super(map);
        }
        
        @Override
        public final boolean contains(final Object o) {
            return this.map.containsValue(o);
        }
        
        @Override
        public final boolean remove(final Object o) {
            if (o != null) {
                final Iterator<V> it = this.iterator();
                while (it.hasNext()) {
                    if (o.equals(it.next())) {
                        it.remove();
                        return true;
                    }
                }
            }
            return false;
        }
        
        @Override
        public final ObjectIterator<V> iterator() {
            final Char2ObjectConcurrentHashMap<V> m = (Char2ObjectConcurrentHashMap<V>)this.map;
            final Node<V>[] t;
            final int f = ((t = m.table) == null) ? 0 : t.length;
            return new ValueIterator<V>(t, f, 0, f, m);
        }
        
        @Override
        public final boolean add(final V e) {
            throw new UnsupportedOperationException();
        }
        
        @Override
        public final boolean addAll(final Collection<? extends V> c) {
            throw new UnsupportedOperationException();
        }
        
        @Override
        public ObjectSpliterator<V> spliterator() {
            final Char2ObjectConcurrentHashMap<V> m = (Char2ObjectConcurrentHashMap<V>)this.map;
            final long n = m.sumCount();
            final Node<V>[] t;
            final int f = ((t = m.table) == null) ? 0 : t.length;
            return new ValueSpliterator<V>(t, f, 0, f, (n < 0L) ? 0L : n);
        }
        
        @Override
        public void forEach(final Consumer<? super V> action) {
            if (action == null) {
                throw new NullPointerException();
            }
            final Node<V>[] tt;
            if ((tt = (Node<V>[])this.map.table) != null) {
                Node<V>[] tab = tt;
                Node<V> next = null;
                TableStack<V> stack = null;
                TableStack<V> spare = null;
                int index = 0;
                int baseIndex = 0;
                final int baseLimit = tt.length;
                final int baseSize = tt.length;
            Label_0377_Outer:
                while (true) {
                    Node<V> p = null;
                    if ((p = next) != null) {
                        p = p.next;
                    }
                    while (true) {
                        while (p == null) {
                            final Node<V>[] t;
                            int n;
                            final int i;
                            if (baseIndex >= baseLimit || (t = tab) == null || (n = t.length) <= (i = index) || i < 0) {
                                next = null;
                                if (p == null) {
                                    break Label_0377_Outer;
                                }
                                action.accept(p.val);
                                continue Label_0377_Outer;
                            }
                            else {
                                if ((p = Char2ObjectConcurrentHashMap.tabAt(t, i)) != null && p.hash < 0) {
                                    if (p instanceof final ForwardingNode forwardingNode) {
                                        tab = (Node<V>[])forwardingNode.nextTable;
                                        p = null;
                                        TableStack<V> s = spare;
                                        if (s != null) {
                                            spare = s.next;
                                        }
                                        else {
                                            s = new TableStack<V>();
                                        }
                                        s.tab = t;
                                        s.length = n;
                                        s.index = i;
                                        s.next = stack;
                                        stack = s;
                                        continue Label_0377_Outer;
                                    }
                                    if (p instanceof final TreeBin treeBin) {
                                        p = (Node<V>)treeBin.first;
                                    }
                                    else {
                                        p = null;
                                    }
                                }
                                if (stack != null) {
                                    TableStack<V> s;
                                    int len;
                                    while ((s = stack) != null && (index += (len = s.length)) >= n) {
                                        n = len;
                                        index = s.index;
                                        tab = s.tab;
                                        s.tab = null;
                                        final TableStack<V> anext = s.next;
                                        s.next = spare;
                                        stack = anext;
                                        spare = s;
                                    }
                                    if (s != null || (index += baseSize) < n) {
                                        continue Label_0377_Outer;
                                    }
                                    index = ++baseIndex;
                                }
                                else {
                                    if ((index = i + baseSize) < n) {
                                        continue Label_0377_Outer;
                                    }
                                    index = ++baseIndex;
                                }
                            }
                        }
                        next = p;
                        continue;
                    }
                }
            }
        }
        
        @Override
        public <A, B, C, D> void forEach(final FastConsumerD9<? super V, A, B, C, D> consumer, final A a, final double d1, final double d2, final double d3, final double d4, final double d5, final double d6, final double d7, final double d8, final double d9, final B b, final C c, final D d) {
            if (consumer == null) {
                throw new NullPointerException();
            }
            final Node<V>[] tt;
            if ((tt = (Node<V>[])this.map.table) != null) {
                Node<V>[] tab = tt;
                Node<V> next = null;
                TableStack<V> stack = null;
                TableStack<V> spare = null;
                int index = 0;
                int baseIndex = 0;
                final int baseLimit = tt.length;
                final int baseSize = tt.length;
            Label_0385_Outer:
                while (true) {
                    Node<V> p = null;
                    if ((p = next) != null) {
                        p = p.next;
                    }
                    while (true) {
                        while (p == null) {
                            final Node<V>[] t;
                            int n;
                            final int i;
                            if (baseIndex >= baseLimit || (t = tab) == null || (n = t.length) <= (i = index) || i < 0) {
                                next = null;
                                if (p == null) {
                                    break Label_0385_Outer;
                                }
                                consumer.accept(p.val, a, d1, d2, d3, d4, d5, d6, d7, d8, d9, b, c, d);
                                continue Label_0385_Outer;
                            }
                            else {
                                if ((p = Char2ObjectConcurrentHashMap.tabAt(t, i)) != null && p.hash < 0) {
                                    if (p instanceof final ForwardingNode forwardingNode) {
                                        tab = (Node<V>[])forwardingNode.nextTable;
                                        p = null;
                                        TableStack<V> s = spare;
                                        if (s != null) {
                                            spare = s.next;
                                        }
                                        else {
                                            s = new TableStack<V>();
                                        }
                                        s.tab = t;
                                        s.length = n;
                                        s.index = i;
                                        s.next = stack;
                                        stack = s;
                                        continue Label_0385_Outer;
                                    }
                                    if (p instanceof final TreeBin treeBin) {
                                        p = (Node<V>)treeBin.first;
                                    }
                                    else {
                                        p = null;
                                    }
                                }
                                if (stack != null) {
                                    TableStack<V> s;
                                    int len;
                                    while ((s = stack) != null && (index += (len = s.length)) >= n) {
                                        n = len;
                                        index = s.index;
                                        tab = s.tab;
                                        s.tab = null;
                                        final TableStack<V> anext = s.next;
                                        s.next = spare;
                                        stack = anext;
                                        spare = s;
                                    }
                                    if (s != null || (index += baseSize) < n) {
                                        continue Label_0385_Outer;
                                    }
                                    index = ++baseIndex;
                                }
                                else {
                                    if ((index = i + baseSize) < n) {
                                        continue Label_0385_Outer;
                                    }
                                    index = ++baseIndex;
                                }
                            }
                        }
                        next = p;
                        continue;
                    }
                }
            }
        }
        
        @Override
        public <A, B, C, D> void forEach(final FastConsumerD6<? super V, A, B, C, D> consumer, final A a, final double d1, final double d2, final double d3, final double d4, final double d5, final double d6, final B b, final C c, final D d) {
            if (consumer == null) {
                throw new NullPointerException();
            }
            final Node<V>[] tt;
            if ((tt = (Node<V>[])this.map.table) != null) {
                Node<V>[] tab = tt;
                Node<V> next = null;
                TableStack<V> stack = null;
                TableStack<V> spare = null;
                int index = 0;
                int baseIndex = 0;
                final int baseLimit = tt.length;
                final int baseSize = tt.length;
            Label_0385_Outer:
                while (true) {
                    Node<V> p = null;
                    if ((p = next) != null) {
                        p = p.next;
                    }
                    while (true) {
                        while (p == null) {
                            final Node<V>[] t;
                            int n;
                            final int i;
                            if (baseIndex >= baseLimit || (t = tab) == null || (n = t.length) <= (i = index) || i < 0) {
                                next = null;
                                if (p == null) {
                                    break Label_0385_Outer;
                                }
                                consumer.accept(p.val, a, d1, d2, d3, d4, d5, d6, b, c, d);
                                continue Label_0385_Outer;
                            }
                            else {
                                if ((p = Char2ObjectConcurrentHashMap.tabAt(t, i)) != null && p.hash < 0) {
                                    if (p instanceof final ForwardingNode forwardingNode) {
                                        tab = (Node<V>[])forwardingNode.nextTable;
                                        p = null;
                                        TableStack<V> s = spare;
                                        if (s != null) {
                                            spare = s.next;
                                        }
                                        else {
                                            s = new TableStack<V>();
                                        }
                                        s.tab = t;
                                        s.length = n;
                                        s.index = i;
                                        s.next = stack;
                                        stack = s;
                                        continue Label_0385_Outer;
                                    }
                                    if (p instanceof final TreeBin treeBin) {
                                        p = (Node<V>)treeBin.first;
                                    }
                                    else {
                                        p = null;
                                    }
                                }
                                if (stack != null) {
                                    TableStack<V> s;
                                    int len;
                                    while ((s = stack) != null && (index += (len = s.length)) >= n) {
                                        n = len;
                                        index = s.index;
                                        tab = s.tab;
                                        s.tab = null;
                                        final TableStack<V> anext = s.next;
                                        s.next = spare;
                                        stack = anext;
                                        spare = s;
                                    }
                                    if (s != null || (index += baseSize) < n) {
                                        continue Label_0385_Outer;
                                    }
                                    index = ++baseIndex;
                                }
                                else {
                                    if ((index = i + baseSize) < n) {
                                        continue Label_0385_Outer;
                                    }
                                    index = ++baseIndex;
                                }
                            }
                        }
                        next = p;
                        continue;
                    }
                }
            }
        }
        
        @Override
        public void forEachWithFloat(final FastConsumerF<? super V> consumer, final float ii) {
            if (consumer == null) {
                throw new NullPointerException();
            }
            final Node<V>[] tt;
            if ((tt = (Node<V>[])this.map.table) != null) {
                Node<V>[] tab = tt;
                Node<V> next = null;
                TableStack<V> stack = null;
                TableStack<V> spare = null;
                int index = 0;
                int baseIndex = 0;
                final int baseLimit = tt.length;
                final int baseSize = tt.length;
            Label_0381_Outer:
                while (true) {
                    Node<V> p = null;
                    if ((p = next) != null) {
                        p = p.next;
                    }
                    while (true) {
                        while (p == null) {
                            final Node<V>[] t;
                            int n;
                            final int i;
                            if (baseIndex >= baseLimit || (t = tab) == null || (n = t.length) <= (i = index) || i < 0) {
                                next = null;
                                if (p == null) {
                                    break Label_0381_Outer;
                                }
                                consumer.accept(p.val, ii);
                                continue Label_0381_Outer;
                            }
                            else {
                                if ((p = Char2ObjectConcurrentHashMap.tabAt(t, i)) != null && p.hash < 0) {
                                    if (p instanceof final ForwardingNode forwardingNode) {
                                        tab = (Node<V>[])forwardingNode.nextTable;
                                        p = null;
                                        TableStack<V> s = spare;
                                        if (s != null) {
                                            spare = s.next;
                                        }
                                        else {
                                            s = new TableStack<V>();
                                        }
                                        s.tab = t;
                                        s.length = n;
                                        s.index = i;
                                        s.next = stack;
                                        stack = s;
                                        continue Label_0381_Outer;
                                    }
                                    if (p instanceof final TreeBin treeBin) {
                                        p = (Node<V>)treeBin.first;
                                    }
                                    else {
                                        p = null;
                                    }
                                }
                                if (stack != null) {
                                    TableStack<V> s;
                                    int len;
                                    while ((s = stack) != null && (index += (len = s.length)) >= n) {
                                        n = len;
                                        index = s.index;
                                        tab = s.tab;
                                        s.tab = null;
                                        final TableStack<V> anext = s.next;
                                        s.next = spare;
                                        stack = anext;
                                        spare = s;
                                    }
                                    if (s != null || (index += baseSize) < n) {
                                        continue Label_0381_Outer;
                                    }
                                    index = ++baseIndex;
                                }
                                else {
                                    if ((index = i + baseSize) < n) {
                                        continue Label_0381_Outer;
                                    }
                                    index = ++baseIndex;
                                }
                            }
                        }
                        next = p;
                        continue;
                    }
                }
            }
        }
        
        @Override
        public void forEachWithInt(final FastConsumerI<? super V> consumer, final int ii) {
            if (consumer == null) {
                throw new NullPointerException();
            }
            final Node<V>[] tt;
            if ((tt = (Node<V>[])this.map.table) != null) {
                Node<V>[] tab = tt;
                Node<V> next = null;
                TableStack<V> stack = null;
                TableStack<V> spare = null;
                int index = 0;
                int baseIndex = 0;
                final int baseLimit = tt.length;
                final int baseSize = tt.length;
            Label_0381_Outer:
                while (true) {
                    Node<V> p = null;
                    if ((p = next) != null) {
                        p = p.next;
                    }
                    while (true) {
                        while (p == null) {
                            final Node<V>[] t;
                            int n;
                            final int i;
                            if (baseIndex >= baseLimit || (t = tab) == null || (n = t.length) <= (i = index) || i < 0) {
                                next = null;
                                if (p == null) {
                                    break Label_0381_Outer;
                                }
                                consumer.accept(p.val, ii);
                                continue Label_0381_Outer;
                            }
                            else {
                                if ((p = Char2ObjectConcurrentHashMap.tabAt(t, i)) != null && p.hash < 0) {
                                    if (p instanceof final ForwardingNode forwardingNode) {
                                        tab = (Node<V>[])forwardingNode.nextTable;
                                        p = null;
                                        TableStack<V> s = spare;
                                        if (s != null) {
                                            spare = s.next;
                                        }
                                        else {
                                            s = new TableStack<V>();
                                        }
                                        s.tab = t;
                                        s.length = n;
                                        s.index = i;
                                        s.next = stack;
                                        stack = s;
                                        continue Label_0381_Outer;
                                    }
                                    if (p instanceof final TreeBin treeBin) {
                                        p = (Node<V>)treeBin.first;
                                    }
                                    else {
                                        p = null;
                                    }
                                }
                                if (stack != null) {
                                    TableStack<V> s;
                                    int len;
                                    while ((s = stack) != null && (index += (len = s.length)) >= n) {
                                        n = len;
                                        index = s.index;
                                        tab = s.tab;
                                        s.tab = null;
                                        final TableStack<V> anext = s.next;
                                        s.next = spare;
                                        stack = anext;
                                        spare = s;
                                    }
                                    if (s != null || (index += baseSize) < n) {
                                        continue Label_0381_Outer;
                                    }
                                    index = ++baseIndex;
                                }
                                else {
                                    if ((index = i + baseSize) < n) {
                                        continue Label_0381_Outer;
                                    }
                                    index = ++baseIndex;
                                }
                            }
                        }
                        next = p;
                        continue;
                    }
                }
            }
        }
        
        @Override
        public void forEachWithLong(final FastConsumerL<? super V> consumer, final long ii) {
            if (consumer == null) {
                throw new NullPointerException();
            }
            final Node<V>[] tt;
            if ((tt = (Node<V>[])this.map.table) != null) {
                Node<V>[] tab = tt;
                Node<V> next = null;
                TableStack<V> stack = null;
                TableStack<V> spare = null;
                int index = 0;
                int baseIndex = 0;
                final int baseLimit = tt.length;
                final int baseSize = tt.length;
            Label_0385_Outer:
                while (true) {
                    Node<V> p = null;
                    if ((p = next) != null) {
                        p = p.next;
                    }
                    while (true) {
                        while (p == null) {
                            final Node<V>[] t;
                            int n;
                            final int i;
                            if (baseIndex >= baseLimit || (t = tab) == null || (n = t.length) <= (i = index) || i < 0) {
                                next = null;
                                if (p == null) {
                                    break Label_0385_Outer;
                                }
                                consumer.accept(p.val, ii);
                                continue Label_0385_Outer;
                            }
                            else {
                                if ((p = Char2ObjectConcurrentHashMap.tabAt(t, i)) != null && p.hash < 0) {
                                    if (p instanceof final ForwardingNode forwardingNode) {
                                        tab = (Node<V>[])forwardingNode.nextTable;
                                        p = null;
                                        TableStack<V> s = spare;
                                        if (s != null) {
                                            spare = s.next;
                                        }
                                        else {
                                            s = new TableStack<V>();
                                        }
                                        s.tab = t;
                                        s.length = n;
                                        s.index = i;
                                        s.next = stack;
                                        stack = s;
                                        continue Label_0385_Outer;
                                    }
                                    if (p instanceof final TreeBin treeBin) {
                                        p = (Node<V>)treeBin.first;
                                    }
                                    else {
                                        p = null;
                                    }
                                }
                                if (stack != null) {
                                    TableStack<V> s;
                                    int len;
                                    while ((s = stack) != null && (index += (len = s.length)) >= n) {
                                        n = len;
                                        index = s.index;
                                        tab = s.tab;
                                        s.tab = null;
                                        final TableStack<V> anext = s.next;
                                        s.next = spare;
                                        stack = anext;
                                        spare = s;
                                    }
                                    if (s != null || (index += baseSize) < n) {
                                        continue Label_0385_Outer;
                                    }
                                    index = ++baseIndex;
                                }
                                else {
                                    if ((index = i + baseSize) < n) {
                                        continue Label_0385_Outer;
                                    }
                                    index = ++baseIndex;
                                }
                            }
                        }
                        next = p;
                        continue;
                    }
                }
            }
        }
    }
    
    protected static final class EntrySetView<V> extends CollectionView<V, Char2ObjectMap.Entry<V>> implements ObjectSet<Char2ObjectMap.Entry<V>>, Serializable
    {
        public static final long serialVersionUID = 2249069246763182397L;
        
        public EntrySetView(final Char2ObjectConcurrentHashMap<V> map) {
            super(map);
        }
        
        @Override
        public boolean contains(final Object o) {
            if (o instanceof Char2ObjectMap.Entry) {
                final Char2ObjectMap.Entry<?> e;
                final char k = (e = (Char2ObjectMap.Entry)o).getCharKey();
                if (!((Entry)o).isEmpty()) {
                    final Object r;
                    final Object v;
                    return (r = this.map.get(k)) != null && (v = e.getValue()) != null && (v == r || v.equals(r));
                }
            }
            return false;
        }
        
        @Override
        public boolean remove(final Object o) {
            if (o instanceof Char2ObjectMap.Entry) {
                final Char2ObjectMap.Entry<?> e;
                final char k = (e = (Char2ObjectMap.Entry)o).getCharKey();
                if (!((Entry)o).isEmpty()) {
                    final Object v;
                    return (v = e.getValue()) != null && this.map.remove(k, v);
                }
            }
            return false;
        }
        
        @Override
        public ObjectIterator<Char2ObjectMap.Entry<V>> iterator() {
            final Char2ObjectConcurrentHashMap<V> m = (Char2ObjectConcurrentHashMap<V>)this.map;
            final Node<V>[] t;
            final int f = ((t = m.table) == null) ? 0 : t.length;
            return new EntryIterator<V>(t, f, 0, f, m);
        }
        
        @Override
        public boolean add(final Char2ObjectMap.Entry<V> e) {
            return this.map.putVal(e.getCharKey(), (K)e.getValue(), false) == null;
        }
        
        @Override
        public boolean addAll(final Collection<? extends Char2ObjectMap.Entry<V>> c) {
            boolean added = false;
            for (final Char2ObjectMap.Entry<V> e : c) {
                if (this.add(e)) {
                    added = true;
                }
            }
            return added;
        }
        
        @Override
        public final int hashCode() {
            int h = 0;
            final Node<V>[] t;
            if ((t = (Node<V>[])this.map.table) != null) {
                final Traverser<V> it = new Traverser<V>(t, t.length, 0, t.length);
                Node<V> p;
                while ((p = it.advance()) != null) {
                    h += p.hashCode();
                }
            }
            return h;
        }
        
        @Override
        public final boolean equals(final Object o) {
            final Set<?> c;
            return o instanceof Set && ((c = (Set)o) == this || (this.containsAll(c) && c.containsAll(this)));
        }
        
        @Override
        public ObjectSpliterator<Char2ObjectMap.Entry<V>> spliterator() {
            final Char2ObjectConcurrentHashMap<V> m = (Char2ObjectConcurrentHashMap<V>)this.map;
            final long n = m.sumCount();
            final Node<V>[] t;
            final int f = ((t = m.table) == null) ? 0 : t.length;
            return new EntrySpliterator<V>(t, f, 0, f, (n < 0L) ? 0L : n, m);
        }
        
        @Override
        public void forEach(final Consumer<? super Char2ObjectMap.Entry<V>> action) {
            if (action == null) {
                throw new NullPointerException();
            }
            final Node<V>[] t;
            if ((t = (Node<V>[])this.map.table) != null) {
                final Traverser<V> it = new Traverser<V>(t, t.length, 0, t.length);
                Node<V> p;
                while ((p = it.advance()) != null) {
                    action.accept((Object)new MapEntry(p.isEmpty(), p.key, (V)p.val, (Char2ObjectConcurrentHashMap<V>)this.map));
                }
            }
        }
    }
    
    protected abstract static class BulkTask<V, R> extends CountedCompleter<R>
    {
        public Node<V>[] tab;
        public Node<V> next;
        public TableStack<V> stack;
        public TableStack<V> spare;
        public int index;
        public int baseIndex;
        public int baseLimit;
        public final int baseSize;
        public int batch;
        
        protected BulkTask(final BulkTask<V, ?> par, final int b, final int i, final int f, final Node<V>[] t) {
            super(par);
            this.batch = b;
            this.baseIndex = i;
            this.index = i;
            this.tab = t;
            if (t == null) {
                final int n = 0;
                this.baseLimit = n;
                this.baseSize = n;
            }
            else if (par == null) {
                final int length = t.length;
                this.baseLimit = length;
                this.baseSize = length;
            }
            else {
                this.baseLimit = f;
                this.baseSize = par.baseSize;
            }
        }
        
        protected final Node<V> advance() {
            Node<V> e;
            if ((e = this.next) != null) {
                e = e.next;
            }
            while (e == null) {
                final Node<V>[] t;
                final int n;
                final int i;
                if (this.baseIndex >= this.baseLimit || (t = this.tab) == null || (n = t.length) <= (i = this.index) || i < 0) {
                    return this.next = null;
                }
                if ((e = Char2ObjectConcurrentHashMap.tabAt(t, i)) != null && e.hash < 0) {
                    if (e instanceof final ForwardingNode forwardingNode) {
                        this.tab = (Node<V>[])forwardingNode.nextTable;
                        e = null;
                        this.pushState(t, i, n);
                        continue;
                    }
                    if (e instanceof final TreeBin treeBin) {
                        e = (Node<V>)treeBin.first;
                    }
                    else {
                        e = null;
                    }
                }
                if (this.stack != null) {
                    this.recoverState(n);
                }
                else {
                    if ((this.index = i + this.baseSize) < n) {
                        continue;
                    }
                    this.index = ++this.baseIndex;
                }
            }
            return this.next = e;
        }
        
        protected void pushState(final Node<V>[] t, final int i, final int n) {
            TableStack<V> s = this.spare;
            if (s != null) {
                this.spare = s.next;
            }
            else {
                s = new TableStack<V>();
            }
            s.tab = t;
            s.length = n;
            s.index = i;
            s.next = this.stack;
            this.stack = s;
        }
        
        protected void recoverState(int n) {
            TableStack<V> s;
            int len;
            while ((s = this.stack) != null && (this.index += (len = s.length)) >= n) {
                n = len;
                this.index = s.index;
                this.tab = s.tab;
                s.tab = null;
                final TableStack<V> next = s.next;
                s.next = this.spare;
                this.stack = next;
                this.spare = s;
            }
            if (s == null && (this.index += this.baseSize) >= n) {
                this.index = ++this.baseIndex;
            }
        }
    }
    
    protected abstract static class CharacterReturningBulkTask2<V> extends BulkTask<V, Character>
    {
        public char result;
        
        public CharacterReturningBulkTask2(final BulkTask<V, ?> par, final int b, final int i, final int f, final Node<V>[] t) {
            super(par, b, i, f, t);
        }
        
        protected char invoke0() {
            this.quietlyInvoke();
            final Throwable exc = this.getException();
            if (exc != null) {
                throw SneakyThrow.sneakyThrow(exc);
            }
            return this.result;
        }
    }
    
    protected abstract static class LongReturningBulkTask<V> extends BulkTask<V, Long>
    {
        public long result;
        
        public LongReturningBulkTask(final BulkTask<V, ?> par, final int b, final int i, final int f, final Node<V>[] t) {
            super(par, b, i, f, t);
        }
        
        protected long invoke0() {
            this.quietlyInvoke();
            final Throwable exc = this.getException();
            if (exc != null) {
                throw SneakyThrow.sneakyThrow(exc);
            }
            return this.result;
        }
    }
    
    protected abstract static class IntReturningBulkTask<V> extends BulkTask<V, Integer>
    {
        public int result;
        
        public IntReturningBulkTask(final BulkTask<V, ?> par, final int b, final int i, final int f, final Node<V>[] t) {
            super(par, b, i, f, t);
        }
        
        protected int invoke0() {
            this.quietlyInvoke();
            final Throwable exc = this.getException();
            if (exc != null) {
                throw SneakyThrow.sneakyThrow(exc);
            }
            return this.result;
        }
    }
    
    protected abstract static class DoubleReturningBulkTask<V> extends BulkTask<V, Double>
    {
        public double result;
        
        public DoubleReturningBulkTask(final BulkTask<V, ?> par, final int b, final int i, final int f, final Node<V>[] t) {
            super(par, b, i, f, t);
        }
        
        protected double invoke0() {
            this.quietlyInvoke();
            final Throwable exc = this.getException();
            if (exc != null) {
                throw SneakyThrow.sneakyThrow(exc);
            }
            return this.result;
        }
    }
    
    protected static final class ForEachKeyTask<V> extends BulkTask<V, Void>
    {
        public final CharConsumer action;
        
        public ForEachKeyTask(final BulkTask<V, ?> p, final int b, final int i, final int f, final Node<V>[] t, final CharConsumer action) {
            super(p, b, i, f, t);
            this.action = action;
        }
        
        @Override
        public final void compute() {
            final CharConsumer action;
            if ((action = this.action) != null) {
                final int i = this.baseIndex;
                int f;
                int h;
                while (this.batch > 0 && (h = (f = this.baseLimit) + i >>> 1) > i) {
                    this.addToPendingCount(1);
                    final int n = this.batch >>> 1;
                    this.batch = n;
                    new ForEachKeyTask((BulkTask<Object, ?>)this, n, this.baseLimit = h, f, (Node<Object>[])this.tab, action).fork();
                }
                Node<V> p;
                while ((p = this.advance()) != null) {
                    action.accept(p.key);
                }
                this.propagateCompletion();
            }
        }
    }
    
    protected static final class ForEachValueTask<V> extends BulkTask<V, Void>
    {
        public final Consumer<? super V> action;
        
        public ForEachValueTask(final BulkTask<V, ?> p, final int b, final int i, final int f, final Node<V>[] t, final Consumer<? super V> action) {
            super(p, b, i, f, t);
            this.action = action;
        }
        
        @Override
        public final void compute() {
            final Consumer<? super V> action;
            if ((action = this.action) != null) {
                final int i = this.baseIndex;
                int f;
                int h;
                while (this.batch > 0 && (h = (f = this.baseLimit) + i >>> 1) > i) {
                    this.addToPendingCount(1);
                    final int n = this.batch >>> 1;
                    this.batch = n;
                    new ForEachValueTask((BulkTask<Object, ?>)this, n, this.baseLimit = h, f, (Node<Object>[])this.tab, (Consumer<? super Object>)action).fork();
                }
                Node<V> p;
                while ((p = this.advance()) != null) {
                    action.accept(p.val);
                }
                this.propagateCompletion();
            }
        }
    }
    
    protected static final class ForEachEntryTask<V> extends BulkTask<V, Void>
    {
        public final Consumer<? super Entry<V>> action;
        
        public ForEachEntryTask(final BulkTask<V, ?> p, final int b, final int i, final int f, final Node<V>[] t, final Consumer<? super Entry<V>> action) {
            super(p, b, i, f, t);
            this.action = action;
        }
        
        @Override
        public final void compute() {
            final Consumer<? super Entry<V>> action;
            if ((action = this.action) != null) {
                final int i = this.baseIndex;
                int f;
                int h;
                while (this.batch > 0 && (h = (f = this.baseLimit) + i >>> 1) > i) {
                    this.addToPendingCount(1);
                    final int n = this.batch >>> 1;
                    this.batch = n;
                    new ForEachEntryTask((BulkTask<Object, ?>)this, n, this.baseLimit = h, f, (Node<Object>[])this.tab, (Consumer<? super Entry<Object>>)action).fork();
                }
                Node<V> p;
                while ((p = this.advance()) != null) {
                    action.accept(p);
                }
                this.propagateCompletion();
            }
        }
    }
    
    protected static final class ForEachMappingTask<V> extends BulkTask<V, Void>
    {
        public final CharObjConsumer<? super V> action;
        
        public ForEachMappingTask(final BulkTask<V, ?> p, final int b, final int i, final int f, final Node<V>[] t, final CharObjConsumer<? super V> action) {
            super(p, b, i, f, t);
            this.action = action;
        }
        
        @Override
        public final void compute() {
            final CharObjConsumer<? super V> action;
            if ((action = this.action) != null) {
                final int i = this.baseIndex;
                int f;
                int h;
                while (this.batch > 0 && (h = (f = this.baseLimit) + i >>> 1) > i) {
                    this.addToPendingCount(1);
                    final int n = this.batch >>> 1;
                    this.batch = n;
                    new ForEachMappingTask((BulkTask<Object, ?>)this, n, this.baseLimit = h, f, (Node<Object>[])this.tab, (CharObjConsumer<? super Object>)action).fork();
                }
                Node<V> p;
                while ((p = this.advance()) != null) {
                    action.accept(p.key, p.val);
                }
                this.propagateCompletion();
            }
        }
    }
    
    protected static final class ForEachTransformedKeyTask<V, U> extends BulkTask<V, Void>
    {
        public final CharFunction<? extends U> transformer;
        public final Consumer<? super U> action;
        
        public ForEachTransformedKeyTask(final BulkTask<V, ?> p, final int b, final int i, final int f, final Node<V>[] t, final CharFunction<? extends U> transformer, final Consumer<? super U> action) {
            super(p, b, i, f, t);
            this.transformer = transformer;
            this.action = action;
        }
        
        @Override
        public final void compute() {
            final CharFunction<? extends U> transformer;
            final Consumer<? super U> action;
            if ((transformer = this.transformer) != null && (action = this.action) != null) {
                final int i = this.baseIndex;
                int f;
                int h;
                while (this.batch > 0 && (h = (f = this.baseLimit) + i >>> 1) > i) {
                    this.addToPendingCount(1);
                    final int n = this.batch >>> 1;
                    this.batch = n;
                    new ForEachTransformedKeyTask((BulkTask<Object, ?>)this, n, this.baseLimit = h, f, (Node<Object>[])this.tab, transformer, (Consumer<? super Object>)action).fork();
                }
                Node<V> p;
                while ((p = this.advance()) != null) {
                    final U u;
                    if ((u = (U)transformer.apply(p.key)) != null) {
                        action.accept(u);
                    }
                }
                this.propagateCompletion();
            }
        }
    }
    
    protected static final class ForEachTransformedValueTask<V, U> extends BulkTask<V, Void>
    {
        public final Function<? super V, ? extends U> transformer;
        public final Consumer<? super U> action;
        
        public ForEachTransformedValueTask(final BulkTask<V, ?> p, final int b, final int i, final int f, final Node<V>[] t, final Function<? super V, ? extends U> transformer, final Consumer<? super U> action) {
            super(p, b, i, f, t);
            this.transformer = transformer;
            this.action = action;
        }
        
        @Override
        public final void compute() {
            final Function<? super V, ? extends U> transformer;
            final Consumer<? super U> action;
            if ((transformer = this.transformer) != null && (action = this.action) != null) {
                final int i = this.baseIndex;
                int f;
                int h;
                while (this.batch > 0 && (h = (f = this.baseLimit) + i >>> 1) > i) {
                    this.addToPendingCount(1);
                    final int n = this.batch >>> 1;
                    this.batch = n;
                    new ForEachTransformedValueTask((BulkTask<Object, ?>)this, n, this.baseLimit = h, f, (Node<Object>[])this.tab, (Function<? super Object, ?>)transformer, (Consumer<? super Object>)action).fork();
                }
                Node<V> p;
                while ((p = this.advance()) != null) {
                    final U u;
                    if ((u = (U)transformer.apply(p.val)) != null) {
                        action.accept(u);
                    }
                }
                this.propagateCompletion();
            }
        }
    }
    
    protected static final class ForEachTransformedEntryTask<V, U> extends BulkTask<V, Void>
    {
        public final Function<Entry<V>, ? extends U> transformer;
        public final Consumer<? super U> action;
        
        public ForEachTransformedEntryTask(final BulkTask<V, ?> p, final int b, final int i, final int f, final Node<V>[] t, final Function<Entry<V>, ? extends U> transformer, final Consumer<? super U> action) {
            super(p, b, i, f, t);
            this.transformer = transformer;
            this.action = action;
        }
        
        @Override
        public final void compute() {
            final Function<Entry<V>, ? extends U> transformer;
            final Consumer<? super U> action;
            if ((transformer = this.transformer) != null && (action = this.action) != null) {
                final int i = this.baseIndex;
                int f;
                int h;
                while (this.batch > 0 && (h = (f = this.baseLimit) + i >>> 1) > i) {
                    this.addToPendingCount(1);
                    final int n = this.batch >>> 1;
                    this.batch = n;
                    new ForEachTransformedEntryTask((BulkTask<Object, ?>)this, n, this.baseLimit = h, f, (Node<Object>[])this.tab, (Function<Entry<Object>, ?>)transformer, (Consumer<? super Object>)action).fork();
                }
                Node<V> p;
                while ((p = this.advance()) != null) {
                    final U u;
                    if ((u = (U)transformer.apply(p)) != null) {
                        action.accept(u);
                    }
                }
                this.propagateCompletion();
            }
        }
    }
    
    protected static final class ForEachTransformedMappingTask<V, U> extends BulkTask<V, Void>
    {
        public final CharObjFunction<? super V, ? extends U> transformer;
        public final Consumer<? super U> action;
        
        public ForEachTransformedMappingTask(final BulkTask<V, ?> p, final int b, final int i, final int f, final Node<V>[] t, final CharObjFunction<? super V, ? extends U> transformer, final Consumer<? super U> action) {
            super(p, b, i, f, t);
            this.transformer = transformer;
            this.action = action;
        }
        
        @Override
        public final void compute() {
            final CharObjFunction<? super V, ? extends U> transformer;
            final Consumer<? super U> action;
            if ((transformer = this.transformer) != null && (action = this.action) != null) {
                final int i = this.baseIndex;
                int f;
                int h;
                while (this.batch > 0 && (h = (f = this.baseLimit) + i >>> 1) > i) {
                    this.addToPendingCount(1);
                    final int n = this.batch >>> 1;
                    this.batch = n;
                    new ForEachTransformedMappingTask((BulkTask<Object, ?>)this, n, this.baseLimit = h, f, (Node<Object>[])this.tab, (CharObjFunction<? super Object, ?>)transformer, (Consumer<? super Object>)action).fork();
                }
                Node<V> p;
                while ((p = this.advance()) != null) {
                    final U u;
                    if ((u = (U)transformer.apply(p.key, p.val)) != null) {
                        action.accept(u);
                    }
                }
                this.propagateCompletion();
            }
        }
    }
    
    protected static final class SearchKeysTask<V, U> extends BulkTask<V, U>
    {
        public final CharFunction<? extends U> searchFunction;
        public final AtomicReference<U> result;
        
        public SearchKeysTask(final BulkTask<V, ?> p, final int b, final int i, final int f, final Node<V>[] t, final CharFunction<? extends U> searchFunction, final AtomicReference<U> result) {
            super(p, b, i, f, t);
            this.searchFunction = searchFunction;
            this.result = result;
        }
        
        @Override
        public final U getRawResult() {
            return this.result.get();
        }
        
        @Override
        public final void compute() {
            final CharFunction<? extends U> searchFunction;
            final AtomicReference<U> result;
            if ((searchFunction = this.searchFunction) != null && (result = this.result) != null) {
                final int i = this.baseIndex;
                int f;
                int h;
                while (this.batch > 0 && (h = (f = this.baseLimit) + i >>> 1) > i) {
                    if (result.get() != null) {
                        return;
                    }
                    this.addToPendingCount(1);
                    final int n = this.batch >>> 1;
                    this.batch = n;
                    new SearchKeysTask((BulkTask<Object, ?>)this, n, this.baseLimit = h, f, (Node<Object>[])this.tab, searchFunction, (AtomicReference<Object>)result).fork();
                }
                while (result.get() == null) {
                    final Node<V> p;
                    if ((p = this.advance()) == null) {
                        this.propagateCompletion();
                        break;
                    }
                    final U u;
                    if ((u = (U)searchFunction.apply(p.key)) == null) {
                        continue;
                    }
                    if (result.compareAndSet(null, u)) {
                        this.quietlyCompleteRoot();
                        break;
                    }
                    break;
                }
            }
        }
    }
    
    protected static final class SearchValuesTask<V, U> extends BulkTask<V, U>
    {
        public final Function<? super V, ? extends U> searchFunction;
        public final AtomicReference<U> result;
        
        public SearchValuesTask(final BulkTask<V, ?> p, final int b, final int i, final int f, final Node<V>[] t, final Function<? super V, ? extends U> searchFunction, final AtomicReference<U> result) {
            super(p, b, i, f, t);
            this.searchFunction = searchFunction;
            this.result = result;
        }
        
        @Override
        public final U getRawResult() {
            return this.result.get();
        }
        
        @Override
        public final void compute() {
            final Function<? super V, ? extends U> searchFunction;
            final AtomicReference<U> result;
            if ((searchFunction = this.searchFunction) != null && (result = this.result) != null) {
                final int i = this.baseIndex;
                int f;
                int h;
                while (this.batch > 0 && (h = (f = this.baseLimit) + i >>> 1) > i) {
                    if (result.get() != null) {
                        return;
                    }
                    this.addToPendingCount(1);
                    final int n = this.batch >>> 1;
                    this.batch = n;
                    new SearchValuesTask((BulkTask<Object, ?>)this, n, this.baseLimit = h, f, (Node<Object>[])this.tab, (Function<? super Object, ?>)searchFunction, (AtomicReference<Object>)result).fork();
                }
                while (result.get() == null) {
                    final Node<V> p;
                    if ((p = this.advance()) == null) {
                        this.propagateCompletion();
                        break;
                    }
                    final U u;
                    if ((u = (U)searchFunction.apply(p.val)) == null) {
                        continue;
                    }
                    if (result.compareAndSet(null, u)) {
                        this.quietlyCompleteRoot();
                        break;
                    }
                    break;
                }
            }
        }
    }
    
    protected static final class SearchEntriesTask<V, U> extends BulkTask<V, U>
    {
        public final Function<Entry<V>, ? extends U> searchFunction;
        public final AtomicReference<U> result;
        
        public SearchEntriesTask(final BulkTask<V, ?> p, final int b, final int i, final int f, final Node<V>[] t, final Function<Entry<V>, ? extends U> searchFunction, final AtomicReference<U> result) {
            super(p, b, i, f, t);
            this.searchFunction = searchFunction;
            this.result = result;
        }
        
        @Override
        public final U getRawResult() {
            return this.result.get();
        }
        
        @Override
        public final void compute() {
            final Function<Entry<V>, ? extends U> searchFunction;
            final AtomicReference<U> result;
            if ((searchFunction = this.searchFunction) != null && (result = this.result) != null) {
                final int i = this.baseIndex;
                int f;
                int h;
                while (this.batch > 0 && (h = (f = this.baseLimit) + i >>> 1) > i) {
                    if (result.get() != null) {
                        return;
                    }
                    this.addToPendingCount(1);
                    final int n = this.batch >>> 1;
                    this.batch = n;
                    new SearchEntriesTask((BulkTask<Object, ?>)this, n, this.baseLimit = h, f, (Node<Object>[])this.tab, (Function<Entry<Object>, ?>)searchFunction, (AtomicReference<Object>)result).fork();
                }
                while (result.get() == null) {
                    final Node<V> p;
                    if ((p = this.advance()) == null) {
                        this.propagateCompletion();
                        break;
                    }
                    final U u;
                    if ((u = (U)searchFunction.apply(p)) != null) {
                        if (result.compareAndSet(null, u)) {
                            this.quietlyCompleteRoot();
                        }
                    }
                }
            }
        }
    }
    
    protected static final class SearchMappingsTask<V, U> extends BulkTask<V, U>
    {
        public final CharObjFunction<? super V, ? extends U> searchFunction;
        public final AtomicReference<U> result;
        
        public SearchMappingsTask(final BulkTask<V, ?> p, final int b, final int i, final int f, final Node<V>[] t, final CharObjFunction<? super V, ? extends U> searchFunction, final AtomicReference<U> result) {
            super(p, b, i, f, t);
            this.searchFunction = searchFunction;
            this.result = result;
        }
        
        @Override
        public final U getRawResult() {
            return this.result.get();
        }
        
        @Override
        public final void compute() {
            final CharObjFunction<? super V, ? extends U> searchFunction;
            final AtomicReference<U> result;
            if ((searchFunction = this.searchFunction) != null && (result = this.result) != null) {
                final int i = this.baseIndex;
                int f;
                int h;
                while (this.batch > 0 && (h = (f = this.baseLimit) + i >>> 1) > i) {
                    if (result.get() != null) {
                        return;
                    }
                    this.addToPendingCount(1);
                    final int n = this.batch >>> 1;
                    this.batch = n;
                    new SearchMappingsTask((BulkTask<Object, ?>)this, n, this.baseLimit = h, f, (Node<Object>[])this.tab, (CharObjFunction<? super Object, ?>)searchFunction, (AtomicReference<Object>)result).fork();
                }
                while (result.get() == null) {
                    final Node<V> p;
                    if ((p = this.advance()) == null) {
                        this.propagateCompletion();
                        break;
                    }
                    final U u;
                    if ((u = (U)searchFunction.apply(p.key, p.val)) == null) {
                        continue;
                    }
                    if (result.compareAndSet(null, u)) {
                        this.quietlyCompleteRoot();
                        break;
                    }
                    break;
                }
            }
        }
    }
    
    protected static final class ReduceKeysTask<V> extends CharacterReturningBulkTask2<V>
    {
        public final char EMPTY;
        public final CharacterReduceTaskOperator reducer;
        public ReduceKeysTask<V> rights;
        public ReduceKeysTask<V> nextRight;
        
        public ReduceKeysTask(final char EMPTY, final BulkTask<V, ?> p, final int b, final int i, final int f, final Node<V>[] t, final ReduceKeysTask<V> nextRight, final CharacterReduceTaskOperator reducer) {
            super(p, b, i, f, t);
            this.nextRight = nextRight;
            this.EMPTY = EMPTY;
            this.reducer = reducer;
        }
        
        @Override
        public final Character getRawResult() {
            throw new UnsupportedOperationException();
        }
        
        @Override
        public final void compute() {
            final CharacterReduceTaskOperator reducer;
            if ((reducer = this.reducer) != null) {
                final int i = this.baseIndex;
                int f;
                int h;
                while (this.batch > 0 && (h = (f = this.baseLimit) + i >>> 1) > i) {
                    this.addToPendingCount(1);
                    final char empty = this.EMPTY;
                    final int n = this.batch >>> 1;
                    this.batch = n;
                    (this.rights = new ReduceKeysTask<V>(empty, (BulkTask<Object, ?>)this, n, this.baseLimit = h, f, (Node<Object>[])this.tab, (ReduceKeysTask<Object>)this.rights, reducer)).fork();
                }
                boolean found = false;
                char r = this.EMPTY;
                Node<V> p;
                while ((p = (Node<V>)this.advance()) != null) {
                    final char u = p.key;
                    if (!found) {
                        found = true;
                        r = u;
                    }
                    else {
                        if (p.isEmpty()) {
                            continue;
                        }
                        found = true;
                        r = reducer.reduce(this.EMPTY, r, u);
                    }
                }
                this.result = r;
                for (CountedCompleter<?> c = this.firstComplete(); c != null; c = c.nextComplete()) {
                    final ReduceKeysTask<V> t = (ReduceKeysTask)c;
                    ReduceKeysTask<V> nextRight;
                    for (ReduceKeysTask<V> s = t.rights; s != null; s = nextRight) {
                        final char sr;
                        if ((sr = s.result) != this.EMPTY) {
                            final char tr;
                            t.result = (((tr = t.result) == this.EMPTY) ? sr : reducer.reduce(this.EMPTY, tr, sr));
                        }
                        final ReduceKeysTask<V> reduceKeysTask = t;
                        nextRight = s.nextRight;
                        reduceKeysTask.rights = nextRight;
                    }
                }
            }
        }
    }
    
    protected static final class ReduceValuesTask<V> extends BulkTask<V, V>
    {
        public final BiFunction<? super V, ? super V, ? extends V> reducer;
        public V result;
        public ReduceValuesTask<V> rights;
        public ReduceValuesTask<V> nextRight;
        
        public ReduceValuesTask(final BulkTask<V, ?> p, final int b, final int i, final int f, final Node<V>[] t, final ReduceValuesTask<V> nextRight, final BiFunction<? super V, ? super V, ? extends V> reducer) {
            super(p, b, i, f, t);
            this.nextRight = nextRight;
            this.reducer = reducer;
        }
        
        @Override
        public final V getRawResult() {
            return this.result;
        }
        
        @Override
        public final void compute() {
            final BiFunction<? super V, ? super V, ? extends V> reducer;
            if ((reducer = this.reducer) != null) {
                final int i = this.baseIndex;
                int f;
                int h;
                while (this.batch > 0 && (h = (f = this.baseLimit) + i >>> 1) > i) {
                    this.addToPendingCount(1);
                    final int n = this.batch >>> 1;
                    this.batch = n;
                    (this.rights = new ReduceValuesTask<V>((BulkTask<Object, ?>)this, n, this.baseLimit = h, f, (Node<Object>[])this.tab, (ReduceValuesTask<Object>)this.rights, (BiFunction<? super Object, ? super Object, ?>)reducer)).fork();
                }
                V r = null;
                Node<V> p;
                while ((p = this.advance()) != null) {
                    final V v = p.val;
                    r = ((r == null) ? v : reducer.apply((Object)r, (Object)v));
                }
                this.result = r;
                for (CountedCompleter<?> c = this.firstComplete(); c != null; c = c.nextComplete()) {
                    final ReduceValuesTask<V> t = (ReduceValuesTask)c;
                    ReduceValuesTask<V> nextRight;
                    for (ReduceValuesTask<V> s = t.rights; s != null; s = nextRight) {
                        final V sr;
                        if ((sr = s.result) != null) {
                            final V tr;
                            t.result = (((tr = t.result) == null) ? sr : reducer.apply((Object)tr, (Object)sr));
                        }
                        final ReduceValuesTask<V> reduceValuesTask = t;
                        nextRight = s.nextRight;
                        reduceValuesTask.rights = nextRight;
                    }
                }
            }
        }
    }
    
    protected static final class ReduceEntriesTask<V> extends BulkTask<V, Entry<V>>
    {
        public final BiFunction<Entry<V>, Entry<V>, ? extends Entry<V>> reducer;
        public Entry<V> result;
        public ReduceEntriesTask<V> rights;
        public ReduceEntriesTask<V> nextRight;
        
        public ReduceEntriesTask(final BulkTask<V, ?> p, final int b, final int i, final int f, final Node<V>[] t, final ReduceEntriesTask<V> nextRight, final BiFunction<Entry<V>, Entry<V>, ? extends Entry<V>> reducer) {
            super(p, b, i, f, t);
            this.nextRight = nextRight;
            this.reducer = reducer;
        }
        
        @Override
        public final Entry<V> getRawResult() {
            return this.result;
        }
        
        @Override
        public final void compute() {
            final BiFunction<Entry<V>, Entry<V>, ? extends Entry<V>> reducer;
            if ((reducer = this.reducer) != null) {
                final int i = this.baseIndex;
                int f;
                int h;
                while (this.batch > 0 && (h = (f = this.baseLimit) + i >>> 1) > i) {
                    this.addToPendingCount(1);
                    final int n = this.batch >>> 1;
                    this.batch = n;
                    (this.rights = new ReduceEntriesTask<V>((BulkTask<Object, ?>)this, n, this.baseLimit = h, f, (Node<Object>[])this.tab, (ReduceEntriesTask<Object>)this.rights, (BiFunction<Entry<Object>, Entry<Object>, ? extends Entry<Object>>)reducer)).fork();
                }
                Entry<V> r = null;
                Node<V> p;
                while ((p = this.advance()) != null) {
                    r = ((r == null) ? p : ((Entry)reducer.apply(r, p)));
                }
                this.result = r;
                for (CountedCompleter<?> c = this.firstComplete(); c != null; c = c.nextComplete()) {
                    final ReduceEntriesTask<V> t = (ReduceEntriesTask)c;
                    ReduceEntriesTask<V> nextRight;
                    for (ReduceEntriesTask<V> s = t.rights; s != null; s = nextRight) {
                        final Entry<V> sr;
                        if ((sr = s.result) != null) {
                            final Entry<V> tr;
                            t.result = (((tr = t.result) == null) ? sr : reducer.apply(tr, sr));
                        }
                        final ReduceEntriesTask<V> reduceEntriesTask = t;
                        nextRight = s.nextRight;
                        reduceEntriesTask.rights = nextRight;
                    }
                }
            }
        }
    }
    
    protected static final class MapReduceKeysTask<V, U> extends BulkTask<V, U>
    {
        public final CharFunction<? extends U> transformer;
        public final BiFunction<? super U, ? super U, ? extends U> reducer;
        public U result;
        public MapReduceKeysTask<V, U> rights;
        public MapReduceKeysTask<V, U> nextRight;
        
        public MapReduceKeysTask(final BulkTask<V, ?> p, final int b, final int i, final int f, final Node<V>[] t, final MapReduceKeysTask<V, U> nextRight, final CharFunction<? extends U> transformer, final BiFunction<? super U, ? super U, ? extends U> reducer) {
            super(p, b, i, f, t);
            this.nextRight = nextRight;
            this.transformer = transformer;
            this.reducer = reducer;
        }
        
        @Override
        public final U getRawResult() {
            return this.result;
        }
        
        @Override
        public final void compute() {
            final CharFunction<? extends U> transformer;
            final BiFunction<? super U, ? super U, ? extends U> reducer;
            if ((transformer = this.transformer) != null && (reducer = this.reducer) != null) {
                final int i = this.baseIndex;
                int f;
                int h;
                while (this.batch > 0 && (h = (f = this.baseLimit) + i >>> 1) > i) {
                    this.addToPendingCount(1);
                    final int n = this.batch >>> 1;
                    this.batch = n;
                    (this.rights = new MapReduceKeysTask<V, U>((BulkTask<Object, ?>)this, n, this.baseLimit = h, f, (Node<Object>[])this.tab, (MapReduceKeysTask<Object, Object>)this.rights, transformer, (BiFunction<? super Object, ? super Object, ?>)reducer)).fork();
                }
                U r = null;
                Node<V> p;
                while ((p = this.advance()) != null) {
                    final U u;
                    if ((u = (U)transformer.apply(p.key)) != null) {
                        r = ((r == null) ? u : reducer.apply((Object)r, (Object)u));
                    }
                }
                this.result = r;
                for (CountedCompleter<?> c = this.firstComplete(); c != null; c = c.nextComplete()) {
                    final MapReduceKeysTask<V, U> t = (MapReduceKeysTask)c;
                    MapReduceKeysTask<V, U> nextRight;
                    for (MapReduceKeysTask<V, U> s = t.rights; s != null; s = nextRight) {
                        final U sr;
                        if ((sr = s.result) != null) {
                            final U tr;
                            t.result = (((tr = t.result) == null) ? sr : reducer.apply((Object)tr, (Object)sr));
                        }
                        final MapReduceKeysTask<V, U> mapReduceKeysTask = t;
                        nextRight = s.nextRight;
                        mapReduceKeysTask.rights = nextRight;
                    }
                }
            }
        }
    }
    
    protected static final class MapReduceValuesTask<V, U> extends BulkTask<V, U>
    {
        public final Function<? super V, ? extends U> transformer;
        public final BiFunction<? super U, ? super U, ? extends U> reducer;
        public U result;
        public MapReduceValuesTask<V, U> rights;
        public MapReduceValuesTask<V, U> nextRight;
        
        public MapReduceValuesTask(final BulkTask<V, ?> p, final int b, final int i, final int f, final Node<V>[] t, final MapReduceValuesTask<V, U> nextRight, final Function<? super V, ? extends U> transformer, final BiFunction<? super U, ? super U, ? extends U> reducer) {
            super(p, b, i, f, t);
            this.nextRight = nextRight;
            this.transformer = transformer;
            this.reducer = reducer;
        }
        
        @Override
        public final U getRawResult() {
            return this.result;
        }
        
        @Override
        public final void compute() {
            final Function<? super V, ? extends U> transformer;
            final BiFunction<? super U, ? super U, ? extends U> reducer;
            if ((transformer = this.transformer) != null && (reducer = this.reducer) != null) {
                final int i = this.baseIndex;
                int f;
                int h;
                while (this.batch > 0 && (h = (f = this.baseLimit) + i >>> 1) > i) {
                    this.addToPendingCount(1);
                    final int n = this.batch >>> 1;
                    this.batch = n;
                    (this.rights = new MapReduceValuesTask<V, U>((BulkTask<Object, ?>)this, n, this.baseLimit = h, f, (Node<Object>[])this.tab, (MapReduceValuesTask<Object, Object>)this.rights, (Function<? super Object, ?>)transformer, (BiFunction<? super Object, ? super Object, ?>)reducer)).fork();
                }
                U r = null;
                Node<V> p;
                while ((p = this.advance()) != null) {
                    final U u;
                    if ((u = (U)transformer.apply(p.val)) != null) {
                        r = ((r == null) ? u : reducer.apply((Object)r, (Object)u));
                    }
                }
                this.result = r;
                for (CountedCompleter<?> c = this.firstComplete(); c != null; c = c.nextComplete()) {
                    final MapReduceValuesTask<V, U> t = (MapReduceValuesTask)c;
                    MapReduceValuesTask<V, U> nextRight;
                    for (MapReduceValuesTask<V, U> s = t.rights; s != null; s = nextRight) {
                        final U sr;
                        if ((sr = s.result) != null) {
                            final U tr;
                            t.result = (((tr = t.result) == null) ? sr : reducer.apply((Object)tr, (Object)sr));
                        }
                        final MapReduceValuesTask<V, U> mapReduceValuesTask = t;
                        nextRight = s.nextRight;
                        mapReduceValuesTask.rights = nextRight;
                    }
                }
            }
        }
    }
    
    protected static final class MapReduceEntriesTask<V, U> extends BulkTask<V, U>
    {
        public final Function<Entry<V>, ? extends U> transformer;
        public final BiFunction<? super U, ? super U, ? extends U> reducer;
        public U result;
        public MapReduceEntriesTask<V, U> rights;
        public MapReduceEntriesTask<V, U> nextRight;
        
        public MapReduceEntriesTask(final BulkTask<V, ?> p, final int b, final int i, final int f, final Node<V>[] t, final MapReduceEntriesTask<V, U> nextRight, final Function<Entry<V>, ? extends U> transformer, final BiFunction<? super U, ? super U, ? extends U> reducer) {
            super(p, b, i, f, t);
            this.nextRight = nextRight;
            this.transformer = transformer;
            this.reducer = reducer;
        }
        
        @Override
        public final U getRawResult() {
            return this.result;
        }
        
        @Override
        public final void compute() {
            final Function<Entry<V>, ? extends U> transformer;
            final BiFunction<? super U, ? super U, ? extends U> reducer;
            if ((transformer = this.transformer) != null && (reducer = this.reducer) != null) {
                final int i = this.baseIndex;
                int f;
                int h;
                while (this.batch > 0 && (h = (f = this.baseLimit) + i >>> 1) > i) {
                    this.addToPendingCount(1);
                    final int n = this.batch >>> 1;
                    this.batch = n;
                    (this.rights = new MapReduceEntriesTask<V, U>((BulkTask<Object, ?>)this, n, this.baseLimit = h, f, (Node<Object>[])this.tab, (MapReduceEntriesTask<Object, Object>)this.rights, (Function<Entry<Object>, ?>)transformer, (BiFunction<? super Object, ? super Object, ?>)reducer)).fork();
                }
                U r = null;
                Node<V> p;
                while ((p = this.advance()) != null) {
                    final U u;
                    if ((u = (U)transformer.apply(p)) != null) {
                        r = ((r == null) ? u : reducer.apply((Object)r, (Object)u));
                    }
                }
                this.result = r;
                for (CountedCompleter<?> c = this.firstComplete(); c != null; c = c.nextComplete()) {
                    final MapReduceEntriesTask<V, U> t = (MapReduceEntriesTask)c;
                    MapReduceEntriesTask<V, U> nextRight;
                    for (MapReduceEntriesTask<V, U> s = t.rights; s != null; s = nextRight) {
                        final U sr;
                        if ((sr = s.result) != null) {
                            final U tr;
                            t.result = (((tr = t.result) == null) ? sr : reducer.apply((Object)tr, (Object)sr));
                        }
                        final MapReduceEntriesTask<V, U> mapReduceEntriesTask = t;
                        nextRight = s.nextRight;
                        mapReduceEntriesTask.rights = nextRight;
                    }
                }
            }
        }
    }
    
    protected static final class MapReduceMappingsTask<V, U> extends BulkTask<V, U>
    {
        public final CharObjFunction<? super V, ? extends U> transformer;
        public final BiFunction<? super U, ? super U, ? extends U> reducer;
        public U result;
        public MapReduceMappingsTask<V, U> rights;
        public MapReduceMappingsTask<V, U> nextRight;
        
        public MapReduceMappingsTask(final BulkTask<V, ?> p, final int b, final int i, final int f, final Node<V>[] t, final MapReduceMappingsTask<V, U> nextRight, final CharObjFunction<? super V, ? extends U> transformer, final BiFunction<? super U, ? super U, ? extends U> reducer) {
            super(p, b, i, f, t);
            this.nextRight = nextRight;
            this.transformer = transformer;
            this.reducer = reducer;
        }
        
        @Override
        public final U getRawResult() {
            return this.result;
        }
        
        @Override
        public final void compute() {
            final CharObjFunction<? super V, ? extends U> transformer;
            final BiFunction<? super U, ? super U, ? extends U> reducer;
            if ((transformer = this.transformer) != null && (reducer = this.reducer) != null) {
                final int i = this.baseIndex;
                int f;
                int h;
                while (this.batch > 0 && (h = (f = this.baseLimit) + i >>> 1) > i) {
                    this.addToPendingCount(1);
                    final int n = this.batch >>> 1;
                    this.batch = n;
                    (this.rights = new MapReduceMappingsTask<V, U>((BulkTask<Object, ?>)this, n, this.baseLimit = h, f, (Node<Object>[])this.tab, (MapReduceMappingsTask<Object, Object>)this.rights, (CharObjFunction<? super Object, ?>)transformer, (BiFunction<? super Object, ? super Object, ?>)reducer)).fork();
                }
                U r = null;
                Node<V> p;
                while ((p = this.advance()) != null) {
                    final U u;
                    if ((u = (U)transformer.apply(p.key, p.val)) != null) {
                        r = ((r == null) ? u : reducer.apply((Object)r, (Object)u));
                    }
                }
                this.result = r;
                for (CountedCompleter<?> c = this.firstComplete(); c != null; c = c.nextComplete()) {
                    final MapReduceMappingsTask<V, U> t = (MapReduceMappingsTask)c;
                    MapReduceMappingsTask<V, U> nextRight;
                    for (MapReduceMappingsTask<V, U> s = t.rights; s != null; s = nextRight) {
                        final U sr;
                        if ((sr = s.result) != null) {
                            final U tr;
                            t.result = (((tr = t.result) == null) ? sr : reducer.apply((Object)tr, (Object)sr));
                        }
                        final MapReduceMappingsTask<V, U> mapReduceMappingsTask = t;
                        nextRight = s.nextRight;
                        mapReduceMappingsTask.rights = nextRight;
                    }
                }
            }
        }
    }
    
    protected static final class MapReduceKeysToDoubleTask<V> extends DoubleReturningBulkTask<V>
    {
        public final CharToDoubleFunction transformer;
        public final DoubleBinaryOperator reducer;
        public final double basis;
        public MapReduceKeysToDoubleTask<V> rights;
        public MapReduceKeysToDoubleTask<V> nextRight;
        
        public MapReduceKeysToDoubleTask(final BulkTask<V, ?> p, final int b, final int i, final int f, final Node<V>[] t, final MapReduceKeysToDoubleTask<V> nextRight, final CharToDoubleFunction transformer, final double basis, final DoubleBinaryOperator reducer) {
            super(p, b, i, f, t);
            this.nextRight = nextRight;
            this.transformer = transformer;
            this.basis = basis;
            this.reducer = reducer;
        }
        
        @Override
        public final Double getRawResult() {
            throw new UnsupportedOperationException();
        }
        
        @Override
        public final void compute() {
            final CharToDoubleFunction transformer;
            final DoubleBinaryOperator reducer;
            if ((transformer = this.transformer) != null && (reducer = this.reducer) != null) {
                double r = this.basis;
                final int i = this.baseIndex;
                int f;
                int h;
                while (this.batch > 0 && (h = (f = this.baseLimit) + i >>> 1) > i) {
                    this.addToPendingCount(1);
                    final int n = this.batch >>> 1;
                    this.batch = n;
                    (this.rights = new MapReduceKeysToDoubleTask<V>((BulkTask<Object, ?>)this, n, this.baseLimit = h, f, (Node<Object>[])this.tab, (MapReduceKeysToDoubleTask<Object>)this.rights, transformer, r, reducer)).fork();
                }
                Node<V> p;
                while ((p = (Node<V>)this.advance()) != null) {
                    r = reducer.applyAsDouble(r, transformer.applyAsDouble(p.key));
                }
                this.result = r;
                for (CountedCompleter<?> c = this.firstComplete(); c != null; c = c.nextComplete()) {
                    final MapReduceKeysToDoubleTask<V> t = (MapReduceKeysToDoubleTask)c;
                    MapReduceKeysToDoubleTask<V> nextRight;
                    for (MapReduceKeysToDoubleTask<V> s = t.rights; s != null; s = nextRight) {
                        t.result = reducer.applyAsDouble(t.result, s.result);
                        final MapReduceKeysToDoubleTask<V> mapReduceKeysToDoubleTask = t;
                        nextRight = s.nextRight;
                        mapReduceKeysToDoubleTask.rights = nextRight;
                    }
                }
            }
        }
    }
    
    protected static final class MapReduceValuesToDoubleTask<V> extends DoubleReturningBulkTask<V>
    {
        public final ToDoubleFunction<? super V> transformer;
        public final DoubleBinaryOperator reducer;
        public final double basis;
        public MapReduceValuesToDoubleTask<V> rights;
        public MapReduceValuesToDoubleTask<V> nextRight;
        
        public MapReduceValuesToDoubleTask(final BulkTask<V, ?> p, final int b, final int i, final int f, final Node<V>[] t, final MapReduceValuesToDoubleTask<V> nextRight, final ToDoubleFunction<? super V> transformer, final double basis, final DoubleBinaryOperator reducer) {
            super(p, b, i, f, t);
            this.nextRight = nextRight;
            this.transformer = transformer;
            this.basis = basis;
            this.reducer = reducer;
        }
        
        @Override
        public final Double getRawResult() {
            throw new UnsupportedOperationException();
        }
        
        @Override
        public final void compute() {
            final ToDoubleFunction<? super V> transformer;
            final DoubleBinaryOperator reducer;
            if ((transformer = this.transformer) != null && (reducer = this.reducer) != null) {
                double r = this.basis;
                final int i = this.baseIndex;
                int f;
                int h;
                while (this.batch > 0 && (h = (f = this.baseLimit) + i >>> 1) > i) {
                    this.addToPendingCount(1);
                    final int n = this.batch >>> 1;
                    this.batch = n;
                    (this.rights = new MapReduceValuesToDoubleTask<V>((BulkTask<Object, ?>)this, n, this.baseLimit = h, f, (Node<Object>[])this.tab, (MapReduceValuesToDoubleTask<Object>)this.rights, (ToDoubleFunction<? super Object>)transformer, r, reducer)).fork();
                }
                Node<V> p;
                while ((p = (Node<V>)this.advance()) != null) {
                    r = reducer.applyAsDouble(r, transformer.applyAsDouble(p.val));
                }
                this.result = r;
                for (CountedCompleter<?> c = this.firstComplete(); c != null; c = c.nextComplete()) {
                    final MapReduceValuesToDoubleTask<V> t = (MapReduceValuesToDoubleTask)c;
                    MapReduceValuesToDoubleTask<V> nextRight;
                    for (MapReduceValuesToDoubleTask<V> s = t.rights; s != null; s = nextRight) {
                        t.result = reducer.applyAsDouble(t.result, s.result);
                        final MapReduceValuesToDoubleTask<V> mapReduceValuesToDoubleTask = t;
                        nextRight = s.nextRight;
                        mapReduceValuesToDoubleTask.rights = nextRight;
                    }
                }
            }
        }
    }
    
    protected static final class MapReduceEntriesToDoubleTask<V> extends DoubleReturningBulkTask<V>
    {
        public final ToDoubleFunction<Entry<V>> transformer;
        public final DoubleBinaryOperator reducer;
        public final double basis;
        public MapReduceEntriesToDoubleTask<V> rights;
        public MapReduceEntriesToDoubleTask<V> nextRight;
        
        public MapReduceEntriesToDoubleTask(final BulkTask<V, ?> p, final int b, final int i, final int f, final Node<V>[] t, final MapReduceEntriesToDoubleTask<V> nextRight, final ToDoubleFunction<Entry<V>> transformer, final double basis, final DoubleBinaryOperator reducer) {
            super(p, b, i, f, t);
            this.nextRight = nextRight;
            this.transformer = transformer;
            this.basis = basis;
            this.reducer = reducer;
        }
        
        @Override
        public final Double getRawResult() {
            throw new UnsupportedOperationException();
        }
        
        @Override
        public final void compute() {
            final ToDoubleFunction<Entry<V>> transformer;
            final DoubleBinaryOperator reducer;
            if ((transformer = this.transformer) != null && (reducer = this.reducer) != null) {
                double r = this.basis;
                final int i = this.baseIndex;
                int f;
                int h;
                while (this.batch > 0 && (h = (f = this.baseLimit) + i >>> 1) > i) {
                    this.addToPendingCount(1);
                    final int n = this.batch >>> 1;
                    this.batch = n;
                    (this.rights = new MapReduceEntriesToDoubleTask<V>((BulkTask<Object, ?>)this, n, this.baseLimit = h, f, (Node<Object>[])this.tab, (MapReduceEntriesToDoubleTask<Object>)this.rights, (ToDoubleFunction<Entry<Object>>)transformer, r, reducer)).fork();
                }
                Node<V> p;
                while ((p = (Node<V>)this.advance()) != null) {
                    r = reducer.applyAsDouble(r, transformer.applyAsDouble(p));
                }
                this.result = r;
                for (CountedCompleter<?> c = this.firstComplete(); c != null; c = c.nextComplete()) {
                    final MapReduceEntriesToDoubleTask<V> t = (MapReduceEntriesToDoubleTask)c;
                    MapReduceEntriesToDoubleTask<V> nextRight;
                    for (MapReduceEntriesToDoubleTask<V> s = t.rights; s != null; s = nextRight) {
                        t.result = reducer.applyAsDouble(t.result, s.result);
                        final MapReduceEntriesToDoubleTask<V> mapReduceEntriesToDoubleTask = t;
                        nextRight = s.nextRight;
                        mapReduceEntriesToDoubleTask.rights = nextRight;
                    }
                }
            }
        }
    }
    
    protected static final class MapReduceMappingsToDoubleTask<V> extends DoubleReturningBulkTask<V>
    {
        public final ToDoubleCharObjFunction<? super V> transformer;
        public final DoubleBinaryOperator reducer;
        public final double basis;
        public MapReduceMappingsToDoubleTask<V> rights;
        public MapReduceMappingsToDoubleTask<V> nextRight;
        
        public MapReduceMappingsToDoubleTask(final BulkTask<V, ?> p, final int b, final int i, final int f, final Node<V>[] t, final MapReduceMappingsToDoubleTask<V> nextRight, final ToDoubleCharObjFunction<? super V> transformer, final double basis, final DoubleBinaryOperator reducer) {
            super(p, b, i, f, t);
            this.nextRight = nextRight;
            this.transformer = transformer;
            this.basis = basis;
            this.reducer = reducer;
        }
        
        @Override
        public final Double getRawResult() {
            throw new UnsupportedOperationException();
        }
        
        @Override
        public final void compute() {
            final ToDoubleCharObjFunction<? super V> transformer;
            final DoubleBinaryOperator reducer;
            if ((transformer = this.transformer) != null && (reducer = this.reducer) != null) {
                double r = this.basis;
                final int i = this.baseIndex;
                int f;
                int h;
                while (this.batch > 0 && (h = (f = this.baseLimit) + i >>> 1) > i) {
                    this.addToPendingCount(1);
                    final int n = this.batch >>> 1;
                    this.batch = n;
                    (this.rights = new MapReduceMappingsToDoubleTask<V>((BulkTask<Object, ?>)this, n, this.baseLimit = h, f, (Node<Object>[])this.tab, (MapReduceMappingsToDoubleTask<Object>)this.rights, (ToDoubleCharObjFunction<? super Object>)transformer, r, reducer)).fork();
                }
                Node<V> p;
                while ((p = (Node<V>)this.advance()) != null) {
                    r = reducer.applyAsDouble(r, transformer.applyAsDouble(p.key, p.val));
                }
                this.result = r;
                for (CountedCompleter<?> c = this.firstComplete(); c != null; c = c.nextComplete()) {
                    final MapReduceMappingsToDoubleTask<V> t = (MapReduceMappingsToDoubleTask)c;
                    MapReduceMappingsToDoubleTask<V> nextRight;
                    for (MapReduceMappingsToDoubleTask<V> s = t.rights; s != null; s = nextRight) {
                        t.result = reducer.applyAsDouble(t.result, s.result);
                        final MapReduceMappingsToDoubleTask<V> mapReduceMappingsToDoubleTask = t;
                        nextRight = s.nextRight;
                        mapReduceMappingsToDoubleTask.rights = nextRight;
                    }
                }
            }
        }
    }
    
    protected static final class MapReduceKeysToLongTask<V> extends LongReturningBulkTask<V>
    {
        public final CharToLongFunction transformer;
        public final LongBinaryOperator reducer;
        public final long basis;
        public MapReduceKeysToLongTask<V> rights;
        public MapReduceKeysToLongTask<V> nextRight;
        
        public MapReduceKeysToLongTask(final BulkTask<V, ?> p, final int b, final int i, final int f, final Node<V>[] t, final MapReduceKeysToLongTask<V> nextRight, final CharToLongFunction transformer, final long basis, final LongBinaryOperator reducer) {
            super(p, b, i, f, t);
            this.nextRight = nextRight;
            this.transformer = transformer;
            this.basis = basis;
            this.reducer = reducer;
        }
        
        @Override
        public final Long getRawResult() {
            throw new UnsupportedOperationException();
        }
        
        @Override
        public final void compute() {
            final CharToLongFunction transformer;
            final LongBinaryOperator reducer;
            if ((transformer = this.transformer) != null && (reducer = this.reducer) != null) {
                long r = this.basis;
                final int i = this.baseIndex;
                int f;
                int h;
                while (this.batch > 0 && (h = (f = this.baseLimit) + i >>> 1) > i) {
                    this.addToPendingCount(1);
                    final int n = this.batch >>> 1;
                    this.batch = n;
                    (this.rights = new MapReduceKeysToLongTask<V>((BulkTask<Object, ?>)this, n, this.baseLimit = h, f, (Node<Object>[])this.tab, (MapReduceKeysToLongTask<Object>)this.rights, transformer, r, reducer)).fork();
                }
                Node<V> p;
                while ((p = (Node<V>)this.advance()) != null) {
                    r = reducer.applyAsLong(r, transformer.applyAsLong(p.key));
                }
                this.result = r;
                for (CountedCompleter<?> c = this.firstComplete(); c != null; c = c.nextComplete()) {
                    final MapReduceKeysToLongTask<V> t = (MapReduceKeysToLongTask)c;
                    MapReduceKeysToLongTask<V> nextRight;
                    for (MapReduceKeysToLongTask<V> s = t.rights; s != null; s = nextRight) {
                        t.result = reducer.applyAsLong(t.result, s.result);
                        final MapReduceKeysToLongTask<V> mapReduceKeysToLongTask = t;
                        nextRight = s.nextRight;
                        mapReduceKeysToLongTask.rights = nextRight;
                    }
                }
            }
        }
    }
    
    protected static final class MapReduceValuesToLongTask<V> extends LongReturningBulkTask<V>
    {
        public final ToLongFunction<? super V> transformer;
        public final LongBinaryOperator reducer;
        public final long basis;
        public MapReduceValuesToLongTask<V> rights;
        public MapReduceValuesToLongTask<V> nextRight;
        
        public MapReduceValuesToLongTask(final BulkTask<V, ?> p, final int b, final int i, final int f, final Node<V>[] t, final MapReduceValuesToLongTask<V> nextRight, final ToLongFunction<? super V> transformer, final long basis, final LongBinaryOperator reducer) {
            super(p, b, i, f, t);
            this.nextRight = nextRight;
            this.transformer = transformer;
            this.basis = basis;
            this.reducer = reducer;
        }
        
        @Override
        public final Long getRawResult() {
            throw new UnsupportedOperationException();
        }
        
        @Override
        public final void compute() {
            final ToLongFunction<? super V> transformer;
            final LongBinaryOperator reducer;
            if ((transformer = this.transformer) != null && (reducer = this.reducer) != null) {
                long r = this.basis;
                final int i = this.baseIndex;
                int f;
                int h;
                while (this.batch > 0 && (h = (f = this.baseLimit) + i >>> 1) > i) {
                    this.addToPendingCount(1);
                    final int n = this.batch >>> 1;
                    this.batch = n;
                    (this.rights = new MapReduceValuesToLongTask<V>((BulkTask<Object, ?>)this, n, this.baseLimit = h, f, (Node<Object>[])this.tab, (MapReduceValuesToLongTask<Object>)this.rights, (ToLongFunction<? super Object>)transformer, r, reducer)).fork();
                }
                Node<V> p;
                while ((p = (Node<V>)this.advance()) != null) {
                    r = reducer.applyAsLong(r, transformer.applyAsLong(p.val));
                }
                this.result = r;
                for (CountedCompleter<?> c = this.firstComplete(); c != null; c = c.nextComplete()) {
                    final MapReduceValuesToLongTask<V> t = (MapReduceValuesToLongTask)c;
                    MapReduceValuesToLongTask<V> nextRight;
                    for (MapReduceValuesToLongTask<V> s = t.rights; s != null; s = nextRight) {
                        t.result = reducer.applyAsLong(t.result, s.result);
                        final MapReduceValuesToLongTask<V> mapReduceValuesToLongTask = t;
                        nextRight = s.nextRight;
                        mapReduceValuesToLongTask.rights = nextRight;
                    }
                }
            }
        }
    }
    
    protected static final class MapReduceEntriesToLongTask<V> extends LongReturningBulkTask<V>
    {
        public final ToLongFunction<Entry<V>> transformer;
        public final LongBinaryOperator reducer;
        public final long basis;
        public MapReduceEntriesToLongTask<V> rights;
        public MapReduceEntriesToLongTask<V> nextRight;
        
        public MapReduceEntriesToLongTask(final BulkTask<V, ?> p, final int b, final int i, final int f, final Node<V>[] t, final MapReduceEntriesToLongTask<V> nextRight, final ToLongFunction<Entry<V>> transformer, final long basis, final LongBinaryOperator reducer) {
            super(p, b, i, f, t);
            this.nextRight = nextRight;
            this.transformer = transformer;
            this.basis = basis;
            this.reducer = reducer;
        }
        
        @Override
        public final Long getRawResult() {
            throw new UnsupportedOperationException();
        }
        
        @Override
        public final void compute() {
            final ToLongFunction<Entry<V>> transformer;
            final LongBinaryOperator reducer;
            if ((transformer = this.transformer) != null && (reducer = this.reducer) != null) {
                long r = this.basis;
                final int i = this.baseIndex;
                int f;
                int h;
                while (this.batch > 0 && (h = (f = this.baseLimit) + i >>> 1) > i) {
                    this.addToPendingCount(1);
                    final int n = this.batch >>> 1;
                    this.batch = n;
                    (this.rights = new MapReduceEntriesToLongTask<V>((BulkTask<Object, ?>)this, n, this.baseLimit = h, f, (Node<Object>[])this.tab, (MapReduceEntriesToLongTask<Object>)this.rights, (ToLongFunction<Entry<Object>>)transformer, r, reducer)).fork();
                }
                Node<V> p;
                while ((p = (Node<V>)this.advance()) != null) {
                    r = reducer.applyAsLong(r, transformer.applyAsLong(p));
                }
                this.result = r;
                for (CountedCompleter<?> c = this.firstComplete(); c != null; c = c.nextComplete()) {
                    final MapReduceEntriesToLongTask<V> t = (MapReduceEntriesToLongTask)c;
                    MapReduceEntriesToLongTask<V> nextRight;
                    for (MapReduceEntriesToLongTask<V> s = t.rights; s != null; s = nextRight) {
                        t.result = reducer.applyAsLong(t.result, s.result);
                        final MapReduceEntriesToLongTask<V> mapReduceEntriesToLongTask = t;
                        nextRight = s.nextRight;
                        mapReduceEntriesToLongTask.rights = nextRight;
                    }
                }
            }
        }
    }
    
    protected static final class MapReduceMappingsToLongTask<V> extends LongReturningBulkTask<V>
    {
        public final ToLongCharObjFunction<? super V> transformer;
        public final LongBinaryOperator reducer;
        public final long basis;
        public MapReduceMappingsToLongTask<V> rights;
        public MapReduceMappingsToLongTask<V> nextRight;
        
        public MapReduceMappingsToLongTask(final BulkTask<V, ?> p, final int b, final int i, final int f, final Node<V>[] t, final MapReduceMappingsToLongTask<V> nextRight, final ToLongCharObjFunction<? super V> transformer, final long basis, final LongBinaryOperator reducer) {
            super(p, b, i, f, t);
            this.nextRight = nextRight;
            this.transformer = transformer;
            this.basis = basis;
            this.reducer = reducer;
        }
        
        @Override
        public final Long getRawResult() {
            throw new UnsupportedOperationException();
        }
        
        @Override
        public final void compute() {
            final ToLongCharObjFunction<? super V> transformer;
            final LongBinaryOperator reducer;
            if ((transformer = this.transformer) != null && (reducer = this.reducer) != null) {
                long r = this.basis;
                final int i = this.baseIndex;
                int f;
                int h;
                while (this.batch > 0 && (h = (f = this.baseLimit) + i >>> 1) > i) {
                    this.addToPendingCount(1);
                    final int n = this.batch >>> 1;
                    this.batch = n;
                    (this.rights = new MapReduceMappingsToLongTask<V>((BulkTask<Object, ?>)this, n, this.baseLimit = h, f, (Node<Object>[])this.tab, (MapReduceMappingsToLongTask<Object>)this.rights, (ToLongCharObjFunction<? super Object>)transformer, r, reducer)).fork();
                }
                Node<V> p;
                while ((p = (Node<V>)this.advance()) != null) {
                    r = reducer.applyAsLong(r, transformer.applyAsLong(p.key, p.val));
                }
                this.result = r;
                for (CountedCompleter<?> c = this.firstComplete(); c != null; c = c.nextComplete()) {
                    final MapReduceMappingsToLongTask<V> t = (MapReduceMappingsToLongTask)c;
                    MapReduceMappingsToLongTask<V> nextRight;
                    for (MapReduceMappingsToLongTask<V> s = t.rights; s != null; s = nextRight) {
                        t.result = reducer.applyAsLong(t.result, s.result);
                        final MapReduceMappingsToLongTask<V> mapReduceMappingsToLongTask = t;
                        nextRight = s.nextRight;
                        mapReduceMappingsToLongTask.rights = nextRight;
                    }
                }
            }
        }
    }
    
    protected static final class MapReduceKeysToIntTask<V> extends IntReturningBulkTask<V>
    {
        public final CharToIntFunction transformer;
        public final IntBinaryOperator reducer;
        public final int basis;
        public MapReduceKeysToIntTask<V> rights;
        public MapReduceKeysToIntTask<V> nextRight;
        
        public MapReduceKeysToIntTask(final BulkTask<V, ?> p, final int b, final int i, final int f, final Node<V>[] t, final MapReduceKeysToIntTask<V> nextRight, final CharToIntFunction transformer, final int basis, final IntBinaryOperator reducer) {
            super(p, b, i, f, t);
            this.nextRight = nextRight;
            this.transformer = transformer;
            this.basis = basis;
            this.reducer = reducer;
        }
        
        @Override
        public final Integer getRawResult() {
            throw new UnsupportedOperationException();
        }
        
        @Override
        public final void compute() {
            final CharToIntFunction transformer;
            final IntBinaryOperator reducer;
            if ((transformer = this.transformer) != null && (reducer = this.reducer) != null) {
                int r = this.basis;
                final int i = this.baseIndex;
                int f;
                int h;
                while (this.batch > 0 && (h = (f = this.baseLimit) + i >>> 1) > i) {
                    this.addToPendingCount(1);
                    final int n = this.batch >>> 1;
                    this.batch = n;
                    (this.rights = new MapReduceKeysToIntTask<V>((BulkTask<Object, ?>)this, n, this.baseLimit = h, f, (Node<Object>[])this.tab, (MapReduceKeysToIntTask<Object>)this.rights, transformer, r, reducer)).fork();
                }
                Node<V> p;
                while ((p = (Node<V>)this.advance()) != null) {
                    r = reducer.applyAsInt(r, transformer.applyAsInt(p.key));
                }
                this.result = r;
                for (CountedCompleter<?> c = this.firstComplete(); c != null; c = c.nextComplete()) {
                    final MapReduceKeysToIntTask<V> t = (MapReduceKeysToIntTask)c;
                    MapReduceKeysToIntTask<V> nextRight;
                    for (MapReduceKeysToIntTask<V> s = t.rights; s != null; s = nextRight) {
                        t.result = reducer.applyAsInt(t.result, s.result);
                        final MapReduceKeysToIntTask<V> mapReduceKeysToIntTask = t;
                        nextRight = s.nextRight;
                        mapReduceKeysToIntTask.rights = nextRight;
                    }
                }
            }
        }
    }
    
    protected static final class MapReduceValuesToIntTask<V> extends IntReturningBulkTask<V>
    {
        public final ToIntFunction<? super V> transformer;
        public final IntBinaryOperator reducer;
        public final int basis;
        public MapReduceValuesToIntTask<V> rights;
        public MapReduceValuesToIntTask<V> nextRight;
        
        public MapReduceValuesToIntTask(final BulkTask<V, ?> p, final int b, final int i, final int f, final Node<V>[] t, final MapReduceValuesToIntTask<V> nextRight, final ToIntFunction<? super V> transformer, final int basis, final IntBinaryOperator reducer) {
            super(p, b, i, f, t);
            this.nextRight = nextRight;
            this.transformer = transformer;
            this.basis = basis;
            this.reducer = reducer;
        }
        
        @Override
        public final Integer getRawResult() {
            throw new UnsupportedOperationException();
        }
        
        @Override
        public final void compute() {
            final ToIntFunction<? super V> transformer;
            final IntBinaryOperator reducer;
            if ((transformer = this.transformer) != null && (reducer = this.reducer) != null) {
                int r = this.basis;
                final int i = this.baseIndex;
                int f;
                int h;
                while (this.batch > 0 && (h = (f = this.baseLimit) + i >>> 1) > i) {
                    this.addToPendingCount(1);
                    final int n = this.batch >>> 1;
                    this.batch = n;
                    (this.rights = new MapReduceValuesToIntTask<V>((BulkTask<Object, ?>)this, n, this.baseLimit = h, f, (Node<Object>[])this.tab, (MapReduceValuesToIntTask<Object>)this.rights, (ToIntFunction<? super Object>)transformer, r, reducer)).fork();
                }
                Node<V> p;
                while ((p = (Node<V>)this.advance()) != null) {
                    r = reducer.applyAsInt(r, transformer.applyAsInt(p.val));
                }
                this.result = r;
                for (CountedCompleter<?> c = this.firstComplete(); c != null; c = c.nextComplete()) {
                    final MapReduceValuesToIntTask<V> t = (MapReduceValuesToIntTask)c;
                    MapReduceValuesToIntTask<V> nextRight;
                    for (MapReduceValuesToIntTask<V> s = t.rights; s != null; s = nextRight) {
                        t.result = reducer.applyAsInt(t.result, s.result);
                        final MapReduceValuesToIntTask<V> mapReduceValuesToIntTask = t;
                        nextRight = s.nextRight;
                        mapReduceValuesToIntTask.rights = nextRight;
                    }
                }
            }
        }
    }
    
    protected static final class MapReduceEntriesToIntTask<V> extends IntReturningBulkTask<V>
    {
        public final ToIntFunction<Entry<V>> transformer;
        public final IntBinaryOperator reducer;
        public final int basis;
        public MapReduceEntriesToIntTask<V> rights;
        public MapReduceEntriesToIntTask<V> nextRight;
        
        public MapReduceEntriesToIntTask(final BulkTask<V, ?> p, final int b, final int i, final int f, final Node<V>[] t, final MapReduceEntriesToIntTask<V> nextRight, final ToIntFunction<Entry<V>> transformer, final int basis, final IntBinaryOperator reducer) {
            super(p, b, i, f, t);
            this.nextRight = nextRight;
            this.transformer = transformer;
            this.basis = basis;
            this.reducer = reducer;
        }
        
        @Override
        public final Integer getRawResult() {
            throw new UnsupportedOperationException();
        }
        
        @Override
        public final void compute() {
            final ToIntFunction<Entry<V>> transformer;
            final IntBinaryOperator reducer;
            if ((transformer = this.transformer) != null && (reducer = this.reducer) != null) {
                int r = this.basis;
                final int i = this.baseIndex;
                int f;
                int h;
                while (this.batch > 0 && (h = (f = this.baseLimit) + i >>> 1) > i) {
                    this.addToPendingCount(1);
                    final int n = this.batch >>> 1;
                    this.batch = n;
                    (this.rights = new MapReduceEntriesToIntTask<V>((BulkTask<Object, ?>)this, n, this.baseLimit = h, f, (Node<Object>[])this.tab, (MapReduceEntriesToIntTask<Object>)this.rights, (ToIntFunction<Entry<Object>>)transformer, r, reducer)).fork();
                }
                Node<V> p;
                while ((p = (Node<V>)this.advance()) != null) {
                    r = reducer.applyAsInt(r, transformer.applyAsInt(p));
                }
                this.result = r;
                for (CountedCompleter<?> c = this.firstComplete(); c != null; c = c.nextComplete()) {
                    final MapReduceEntriesToIntTask<V> t = (MapReduceEntriesToIntTask)c;
                    MapReduceEntriesToIntTask<V> nextRight;
                    for (MapReduceEntriesToIntTask<V> s = t.rights; s != null; s = nextRight) {
                        t.result = reducer.applyAsInt(t.result, s.result);
                        final MapReduceEntriesToIntTask<V> mapReduceEntriesToIntTask = t;
                        nextRight = s.nextRight;
                        mapReduceEntriesToIntTask.rights = nextRight;
                    }
                }
            }
        }
    }
    
    protected static final class MapReduceMappingsToIntTask<V> extends IntReturningBulkTask<V>
    {
        public final ToIntCharObjFunction<? super V> transformer;
        public final IntBinaryOperator reducer;
        public final int basis;
        public MapReduceMappingsToIntTask<V> rights;
        public MapReduceMappingsToIntTask<V> nextRight;
        
        public MapReduceMappingsToIntTask(final BulkTask<V, ?> p, final int b, final int i, final int f, final Node<V>[] t, final MapReduceMappingsToIntTask<V> nextRight, final ToIntCharObjFunction<? super V> transformer, final int basis, final IntBinaryOperator reducer) {
            super(p, b, i, f, t);
            this.nextRight = nextRight;
            this.transformer = transformer;
            this.basis = basis;
            this.reducer = reducer;
        }
        
        @Override
        public final Integer getRawResult() {
            throw new UnsupportedOperationException();
        }
        
        @Override
        public final void compute() {
            final ToIntCharObjFunction<? super V> transformer;
            final IntBinaryOperator reducer;
            if ((transformer = this.transformer) != null && (reducer = this.reducer) != null) {
                int r = this.basis;
                final int i = this.baseIndex;
                int f;
                int h;
                while (this.batch > 0 && (h = (f = this.baseLimit) + i >>> 1) > i) {
                    this.addToPendingCount(1);
                    final int n = this.batch >>> 1;
                    this.batch = n;
                    (this.rights = new MapReduceMappingsToIntTask<V>((BulkTask<Object, ?>)this, n, this.baseLimit = h, f, (Node<Object>[])this.tab, (MapReduceMappingsToIntTask<Object>)this.rights, (ToIntCharObjFunction<? super Object>)transformer, r, reducer)).fork();
                }
                Node<V> p;
                while ((p = (Node<V>)this.advance()) != null) {
                    r = reducer.applyAsInt(r, transformer.applyAsInt(p.key, p.val));
                }
                this.result = r;
                for (CountedCompleter<?> c = this.firstComplete(); c != null; c = c.nextComplete()) {
                    final MapReduceMappingsToIntTask<V> t = (MapReduceMappingsToIntTask)c;
                    MapReduceMappingsToIntTask<V> nextRight;
                    for (MapReduceMappingsToIntTask<V> s = t.rights; s != null; s = nextRight) {
                        t.result = reducer.applyAsInt(t.result, s.result);
                        final MapReduceMappingsToIntTask<V> mapReduceMappingsToIntTask = t;
                        nextRight = s.nextRight;
                        mapReduceMappingsToIntTask.rights = nextRight;
                    }
                }
            }
        }
    }
    
    @FunctionalInterface
    public interface CharObjConsumer<V>
    {
        void accept(final char p0, final V p1);
    }
    
    @FunctionalInterface
    public interface CharBiObjConsumer<V, X>
    {
        void accept(final char p0, final V p1, final X p2);
    }
    
    @FunctionalInterface
    public interface CharTriObjConsumer<V, X, Y>
    {
        void accept(final char p0, final V p1, final X p2, final Y p3);
    }
    
    @FunctionalInterface
    public interface CharObjByteConsumer<V>
    {
        void accept(final char p0, final V p1, final byte p2);
    }
    
    @FunctionalInterface
    public interface CharObjShortConsumer<V>
    {
        void accept(final char p0, final V p1, final short p2);
    }
    
    @FunctionalInterface
    public interface CharObjIntConsumer<V>
    {
        void accept(final char p0, final V p1, final int p2);
    }
    
    @FunctionalInterface
    public interface CharObjLongConsumer<V>
    {
        void accept(final char p0, final V p1, final long p2);
    }
    
    @FunctionalInterface
    public interface CharObjFloatConsumer<V>
    {
        void accept(final char p0, final V p1, final float p2);
    }
    
    @FunctionalInterface
    public interface CharObjDoubleConsumer<V>
    {
        void accept(final char p0, final V p1, final double p2);
    }
    
    @FunctionalInterface
    public interface CharBiObjByteConsumer<V, X>
    {
        void accept(final char p0, final V p1, final byte p2, final X p3);
    }
    
    @FunctionalInterface
    public interface CharBiObjShortConsumer<V, X>
    {
        void accept(final char p0, final V p1, final short p2, final X p3);
    }
    
    @FunctionalInterface
    public interface CharBiObjIntConsumer<V, X>
    {
        void accept(final char p0, final V p1, final int p2, final X p3);
    }
    
    @FunctionalInterface
    public interface CharBiObjLongConsumer<V, X>
    {
        void accept(final char p0, final V p1, final long p2, final X p3);
    }
    
    @FunctionalInterface
    public interface CharBiObjFloatConsumer<V, X>
    {
        void accept(final char p0, final V p1, final float p2, final X p3);
    }
    
    @FunctionalInterface
    public interface CharBiObjDoubleConsumer<V, X>
    {
        void accept(final char p0, final V p1, final double p2, final X p3);
    }
    
    @FunctionalInterface
    public interface CharFunction<R>
    {
        R apply(final char p0);
    }
    
    @FunctionalInterface
    public interface CharObjFunction<V, J>
    {
        J apply(final char p0, final V p1);
    }
    
    @FunctionalInterface
    public interface CharBiObjFunction<V, X, J>
    {
        J apply(final char p0, final V p1, final X p2);
    }
    
    @FunctionalInterface
    public interface CharObjByteFunction<V, J>
    {
        J apply(final char p0, final V p1, final byte p2);
    }
    
    @FunctionalInterface
    public interface CharObjShortFunction<V, J>
    {
        J apply(final char p0, final V p1, final short p2);
    }
    
    @FunctionalInterface
    public interface CharObjIntFunction<V, J>
    {
        J apply(final char p0, final V p1, final int p2);
    }
    
    @FunctionalInterface
    public interface CharObjLongFunction<V, J>
    {
        J apply(final char p0, final V p1, final long p2);
    }
    
    @FunctionalInterface
    public interface CharObjFloatFunction<V, J>
    {
        J apply(final char p0, final V p1, final float p2);
    }
    
    @FunctionalInterface
    public interface CharObjDoubleFunction<V, J>
    {
        J apply(final char p0, final V p1, final double p2);
    }
    
    @FunctionalInterface
    public interface ToDoubleCharObjFunction<V>
    {
        double applyAsDouble(final char p0, final V p1);
    }
    
    @FunctionalInterface
    public interface ToLongCharObjFunction<V>
    {
        long applyAsLong(final char p0, final V p1);
    }
    
    @FunctionalInterface
    public interface ToIntCharObjFunction<V>
    {
        int applyAsInt(final char p0, final V p1);
    }
    
    @FunctionalInterface
    public interface CharacterReduceTaskOperator
    {
        char reduce(final char p0, final char p1, final char p2);
    }
    
    @FunctionalInterface
    public interface CharToDoubleFunction
    {
        double applyAsDouble(final char p0);
    }
    
    @FunctionalInterface
    public interface CharToLongFunction
    {
        long applyAsLong(final char p0);
    }
    
    @FunctionalInterface
    public interface CharToIntFunction
    {
        int applyAsInt(final char p0);
    }
    
    @FunctionalInterface
    public interface ToCharFunction<T>
    {
        char applyAsChar(final T p0);
    }
}
