package p138.p395.p396;

import java.io.Serializable;
import java.util.AbstractMap;
import java.util.AbstractSet;
import java.util.Arrays;
import java.util.Comparator;
import java.util.ConcurrentModificationException;
import java.util.Iterator;
import java.util.Map;
import java.util.NoSuchElementException;
import java.util.Set;

/* JADX INFO: renamed from: ދ.ބ.֏.ޔ, reason: contains not printable characters */
/* JADX INFO: loaded from: classes.dex */
public final class C6498<K, V> extends AbstractMap<K, V> implements Serializable {

    /* JADX INFO: renamed from: ދ, reason: contains not printable characters */
    public static final Comparator<Comparable> f19229 = new C6499();

    /* JADX INFO: renamed from: މ, reason: contains not printable characters */
    public C6498<K, V>.C6501 f19236;

    /* JADX INFO: renamed from: ފ, reason: contains not printable characters */
    public C6498<K, V>.C6503 f19237;

    /* JADX INFO: renamed from: ކ, reason: contains not printable characters */
    public int f19233 = 0;

    /* JADX INFO: renamed from: އ, reason: contains not printable characters */
    public int f19234 = 0;

    /* JADX INFO: renamed from: ރ, reason: contains not printable characters */
    public Comparator<? super K> f19230 = f19229;

    /* JADX INFO: renamed from: ޅ, reason: contains not printable characters */
    public final C6506<K, V> f19232 = new C6506<>();

    /* JADX INFO: renamed from: ބ, reason: contains not printable characters */
    public C6506<K, V>[] f19231 = new C6506[16];

    /* JADX INFO: renamed from: ވ, reason: contains not printable characters */
    public int f19235 = 12;

    /* JADX INFO: renamed from: ދ.ބ.֏.ޔ$֏, reason: contains not printable characters */
    public class C6499 implements Comparator<Comparable> {
        @Override // java.util.Comparator
        public int compare(Comparable comparable, Comparable comparable2) {
            return comparable.compareTo(comparable2);
        }
    }

    /* JADX INFO: renamed from: ދ.ބ.֏.ޔ$ؠ, reason: contains not printable characters */
    public static final class C6500<K, V> {

        /* JADX INFO: renamed from: ֏, reason: contains not printable characters */
        public C6506<K, V> f19238;

        /* JADX INFO: renamed from: ؠ, reason: contains not printable characters */
        public int f19239;

        /* JADX INFO: renamed from: ހ, reason: contains not printable characters */
        public int f19240;

        /* JADX INFO: renamed from: ށ, reason: contains not printable characters */
        public int f19241;

        /* JADX INFO: renamed from: ֏, reason: contains not printable characters */
        public void m9742(int i) {
            this.f19239 = ((Integer.highestOneBit(i) * 2) - 1) - i;
            this.f19241 = 0;
            this.f19240 = 0;
            this.f19238 = null;
        }

        /* JADX INFO: renamed from: ֏, reason: contains not printable characters */
        public void m9743(C6506<K, V> c6506) {
            c6506.f19250 = null;
            c6506.f19248 = null;
            c6506.f19249 = null;
            c6506.f19256 = 1;
            int i = this.f19239;
            if (i > 0) {
                int i2 = this.f19241;
                if ((i2 & 1) == 0) {
                    this.f19241 = i2 + 1;
                    this.f19239 = i - 1;
                    this.f19240++;
                }
            }
            c6506.f19248 = this.f19238;
            this.f19238 = c6506;
            int i3 = this.f19241 + 1;
            this.f19241 = i3;
            int i4 = this.f19239;
            if (i4 > 0 && (i3 & 1) == 0) {
                this.f19241 = i3 + 1;
                this.f19239 = i4 - 1;
                this.f19240++;
            }
            int i5 = 4;
            while (true) {
                int i6 = i5 - 1;
                if ((this.f19241 & i6) != i6) {
                    return;
                }
                int i7 = this.f19240;
                if (i7 == 0) {
                    C6506<K, V> c65062 = this.f19238;
                    C6506<K, V> c65063 = c65062.f19248;
                    C6506<K, V> c65064 = c65063.f19248;
                    c65063.f19248 = c65064.f19248;
                    this.f19238 = c65063;
                    c65063.f19249 = c65064;
                    c65063.f19250 = c65062;
                    c65063.f19256 = c65062.f19256 + 1;
                    c65064.f19248 = c65063;
                    c65062.f19248 = c65063;
                } else if (i7 == 1) {
                    C6506<K, V> c65065 = this.f19238;
                    C6506<K, V> c65066 = c65065.f19248;
                    this.f19238 = c65066;
                    c65066.f19250 = c65065;
                    c65066.f19256 = c65065.f19256 + 1;
                    c65065.f19248 = c65066;
                    this.f19240 = 0;
                } else if (i7 == 2) {
                    this.f19240 = 0;
                }
                i5 *= 2;
            }
        }
    }

    /* JADX INFO: renamed from: ދ.ބ.֏.ޔ$ހ, reason: contains not printable characters */
    public final class C6501 extends AbstractSet<Map.Entry<K, V>> {

        /* JADX INFO: renamed from: ދ.ބ.֏.ޔ$ހ$֏, reason: contains not printable characters */
        public class C6502 extends C6498<K, V>.AbstractC6505<Map.Entry<K, V>> {
            public C6502(C6501 c6501) {
                super();
            }

            @Override // java.util.Iterator
            public Object next() {
                return m9744();
            }
        }

        public C6501() {
        }

        @Override // java.util.AbstractCollection, java.util.Collection, java.util.Set
        public void clear() {
            C6498.this.clear();
        }

        @Override // java.util.AbstractCollection, java.util.Collection, java.util.Set
        public boolean contains(Object obj) {
            return (obj instanceof Map.Entry) && C6498.this.m9735((Map.Entry<?, ?>) obj) != null;
        }

        @Override // java.util.AbstractCollection, java.util.Collection, java.lang.Iterable, java.util.Set
        public Iterator<Map.Entry<K, V>> iterator() {
            return new C6502(this);
        }

        @Override // java.util.AbstractCollection, java.util.Collection, java.util.Set
        public boolean remove(Object obj) {
            C6506<K, V> c6506M9735;
            if (!(obj instanceof Map.Entry) || (c6506M9735 = C6498.this.m9735((Map.Entry<?, ?>) obj)) == null) {
                return false;
            }
            C6498.this.m9741(c6506M9735, true);
            return true;
        }

        @Override // java.util.AbstractCollection, java.util.Collection, java.util.Set
        public int size() {
            return C6498.this.f19233;
        }
    }

    /* JADX INFO: renamed from: ދ.ބ.֏.ޔ$ށ, reason: contains not printable characters */
    public final class C6503 extends AbstractSet<K> {

        /* JADX INFO: renamed from: ދ.ބ.֏.ޔ$ށ$֏, reason: contains not printable characters */
        public class C6504 extends C6498<K, V>.AbstractC6505<K> {
            public C6504(C6503 c6503) {
                super();
            }

            @Override // java.util.Iterator
            public K next() {
                return m9744().f19253;
            }
        }

        public C6503() {
        }

        @Override // java.util.AbstractCollection, java.util.Collection, java.util.Set
        public void clear() {
            C6498.this.clear();
        }

        @Override // java.util.AbstractCollection, java.util.Collection, java.util.Set
        public boolean contains(Object obj) {
            return C6498.this.m9739(obj) != null;
        }

        @Override // java.util.AbstractCollection, java.util.Collection, java.lang.Iterable, java.util.Set
        public Iterator<K> iterator() {
            return new C6504(this);
        }

        @Override // java.util.AbstractCollection, java.util.Collection, java.util.Set
        public boolean remove(Object obj) {
            C6498 c6498 = C6498.this;
            C6506<K, V> c6506M9739 = c6498.m9739(obj);
            if (c6506M9739 != null) {
                c6498.m9741(c6506M9739, true);
            }
            return c6506M9739 != null;
        }

        @Override // java.util.AbstractCollection, java.util.Collection, java.util.Set
        public int size() {
            return C6498.this.f19233;
        }
    }

    /* JADX INFO: renamed from: ދ.ބ.֏.ޔ$ނ, reason: contains not printable characters */
    public abstract class AbstractC6505<T> implements Iterator<T> {

        /* JADX INFO: renamed from: ރ, reason: contains not printable characters */
        public C6506<K, V> f19244;

        /* JADX INFO: renamed from: ބ, reason: contains not printable characters */
        public C6506<K, V> f19245;

        /* JADX INFO: renamed from: ޅ, reason: contains not printable characters */
        public int f19246;

        public AbstractC6505() {
            C6498 c6498 = C6498.this;
            this.f19244 = c6498.f19232.f19251;
            this.f19245 = null;
            this.f19246 = c6498.f19234;
        }

        @Override // java.util.Iterator
        public final boolean hasNext() {
            return this.f19244 != C6498.this.f19232;
        }

        @Override // java.util.Iterator
        public final void remove() {
            C6506<K, V> c6506 = this.f19245;
            if (c6506 == null) {
                throw new IllegalStateException();
            }
            C6498.this.m9741(c6506, true);
            this.f19245 = null;
            this.f19246 = C6498.this.f19234;
        }

        /* JADX INFO: renamed from: ؠ, reason: contains not printable characters */
        public final C6506<K, V> m9744() {
            C6506<K, V> c6506 = this.f19244;
            C6498 c6498 = C6498.this;
            if (c6506 == c6498.f19232) {
                throw new NoSuchElementException();
            }
            if (c6498.f19234 != this.f19246) {
                throw new ConcurrentModificationException();
            }
            this.f19244 = c6506.f19251;
            this.f19245 = c6506;
            return c6506;
        }
    }

    /* JADX INFO: renamed from: ދ.ބ.֏.ޔ$ރ, reason: contains not printable characters */
    public static final class C6506<K, V> implements Map.Entry<K, V> {

        /* JADX INFO: renamed from: ރ, reason: contains not printable characters */
        public C6506<K, V> f19248;

        /* JADX INFO: renamed from: ބ, reason: contains not printable characters */
        public C6506<K, V> f19249;

        /* JADX INFO: renamed from: ޅ, reason: contains not printable characters */
        public C6506<K, V> f19250;

        /* JADX INFO: renamed from: ކ, reason: contains not printable characters */
        public C6506<K, V> f19251;

        /* JADX INFO: renamed from: އ, reason: contains not printable characters */
        public C6506<K, V> f19252;

        /* JADX INFO: renamed from: ވ, reason: contains not printable characters */
        public final K f19253;

        /* JADX INFO: renamed from: މ, reason: contains not printable characters */
        public final int f19254;

        /* JADX INFO: renamed from: ފ, reason: contains not printable characters */
        public V f19255;

        /* JADX INFO: renamed from: ދ, reason: contains not printable characters */
        public int f19256;

        public C6506() {
            this.f19253 = null;
            this.f19254 = -1;
            this.f19252 = this;
            this.f19251 = this;
        }

        public C6506(C6506<K, V> c6506, K k, int i, C6506<K, V> c65062, C6506<K, V> c65063) {
            this.f19248 = c6506;
            this.f19253 = k;
            this.f19254 = i;
            this.f19256 = 1;
            this.f19251 = c65062;
            this.f19252 = c65063;
            c65063.f19251 = this;
            c65062.f19252 = this;
        }

        @Override // java.util.Map.Entry
        public boolean equals(Object obj) {
            if (!(obj instanceof Map.Entry)) {
                return false;
            }
            Map.Entry entry = (Map.Entry) obj;
            K k = this.f19253;
            if (k == null) {
                if (entry.getKey() != null) {
                    return false;
                }
            } else if (!k.equals(entry.getKey())) {
                return false;
            }
            V v = this.f19255;
            if (v == null) {
                if (entry.getValue() != null) {
                    return false;
                }
            } else if (!v.equals(entry.getValue())) {
                return false;
            }
            return true;
        }

        @Override // java.util.Map.Entry
        public K getKey() {
            return this.f19253;
        }

        @Override // java.util.Map.Entry
        public V getValue() {
            return this.f19255;
        }

        @Override // java.util.Map.Entry
        public int hashCode() {
            K k = this.f19253;
            int iHashCode = k == null ? 0 : k.hashCode();
            V v = this.f19255;
            return iHashCode ^ (v != null ? v.hashCode() : 0);
        }

        @Override // java.util.Map.Entry
        public V setValue(V v) {
            V v2 = this.f19255;
            this.f19255 = v;
            return v2;
        }

        public String toString() {
            return this.f19253 + "=" + this.f19255;
        }
    }

    @Override // java.util.AbstractMap, java.util.Map
    public void clear() {
        Arrays.fill(this.f19231, (Object) null);
        this.f19233 = 0;
        this.f19234++;
        C6506<K, V> c6506 = this.f19232;
        C6506<K, V> c65062 = c6506.f19251;
        while (c65062 != c6506) {
            C6506<K, V> c65063 = c65062.f19251;
            c65062.f19252 = null;
            c65062.f19251 = null;
            c65062 = c65063;
        }
        c6506.f19252 = c6506;
        c6506.f19251 = c6506;
    }

    @Override // java.util.AbstractMap, java.util.Map
    public boolean containsKey(Object obj) {
        return m9739(obj) != null;
    }

    @Override // java.util.AbstractMap, java.util.Map
    public Set<Map.Entry<K, V>> entrySet() {
        C6498<K, V>.C6501 c6501 = this.f19236;
        if (c6501 != null) {
            return c6501;
        }
        C6498<K, V>.C6501 c65012 = new C6501();
        this.f19236 = c65012;
        return c65012;
    }

    @Override // java.util.AbstractMap, java.util.Map
    public V get(Object obj) {
        C6506<K, V> c6506M9739 = m9739(obj);
        if (c6506M9739 != null) {
            return c6506M9739.f19255;
        }
        return null;
    }

    @Override // java.util.AbstractMap, java.util.Map
    public Set<K> keySet() {
        C6498<K, V>.C6503 c6503 = this.f19237;
        if (c6503 != null) {
            return c6503;
        }
        C6498<K, V>.C6503 c65032 = new C6503();
        this.f19237 = c65032;
        return c65032;
    }

    @Override // java.util.AbstractMap, java.util.Map
    public V put(K k, V v) {
        if (k == null) {
            throw new NullPointerException("key == null");
        }
        C6506<K, V> c6506M9734 = m9734((Object) k, true);
        V v2 = c6506M9734.f19255;
        c6506M9734.f19255 = v;
        return v2;
    }

    @Override // java.util.AbstractMap, java.util.Map
    public V remove(Object obj) {
        C6506<K, V> c6506M9739 = m9739(obj);
        if (c6506M9739 != null) {
            m9741(c6506M9739, true);
        }
        if (c6506M9739 != null) {
            return c6506M9739.f19255;
        }
        return null;
    }

    @Override // java.util.AbstractMap, java.util.Map
    public int size() {
        return this.f19233;
    }

    /* JADX INFO: renamed from: ֏, reason: contains not printable characters */
    public C6506<K, V> m9734(K k, boolean z) {
        C6506<K, V> c6506;
        int i;
        C6506<K, V> c65062;
        C6506<K, V> c65063;
        C6506<K, V> c65064;
        C6506<K, V> c65065;
        C6506<K, V> c65066;
        Comparator<? super K> comparator = this.f19230;
        C6506<K, V>[] c6506Arr = this.f19231;
        int iHashCode = k.hashCode();
        int i2 = iHashCode ^ ((iHashCode >>> 20) ^ (iHashCode >>> 12));
        int i3 = ((i2 >>> 7) ^ i2) ^ (i2 >>> 4);
        int length = i3 & (c6506Arr.length - 1);
        C6506<K, V> c65067 = c6506Arr[length];
        if (c65067 != null) {
            Comparable comparable = comparator == f19229 ? (Comparable) k : null;
            while (true) {
                int iCompareTo = comparable != null ? comparable.compareTo(c65067.f19253) : comparator.compare(k, c65067.f19253);
                if (iCompareTo == 0) {
                    return c65067;
                }
                C6506<K, V> c65068 = iCompareTo < 0 ? c65067.f19249 : c65067.f19250;
                if (c65068 == null) {
                    c6506 = c65067;
                    i = iCompareTo;
                    break;
                }
                c65067 = c65068;
            }
        } else {
            c6506 = c65067;
            i = 0;
        }
        if (!z) {
            return null;
        }
        C6506<K, V> c65069 = this.f19232;
        if (c6506 != null) {
            C6506<K, V> c650610 = new C6506<>(c6506, k, i3, c65069, c65069.f19252);
            if (i < 0) {
                c6506.f19249 = c650610;
            } else {
                c6506.f19250 = c650610;
            }
            m9738((C6506) c6506, true);
            c65062 = c650610;
        } else {
            if (comparator == f19229 && !(k instanceof Comparable)) {
                throw new ClassCastException(k.getClass().getName() + " is not Comparable");
            }
            c65062 = new C6506<>(c6506, k, i3, c65069, c65069.f19252);
            c6506Arr[length] = c65062;
        }
        int i4 = this.f19233;
        this.f19233 = i4 + 1;
        if (i4 > this.f19235) {
            C6506<K, V>[] c6506Arr2 = this.f19231;
            int length2 = c6506Arr2.length;
            int i5 = length2 * 2;
            C6506<K, V>[] c6506Arr3 = new C6506[i5];
            C6500 c6500 = new C6500();
            C6500 c65002 = new C6500();
            for (int i6 = 0; i6 < length2; i6++) {
                C6506<K, V> c650611 = c6506Arr2[i6];
                if (c650611 != null) {
                    C6506<K, V> c650612 = null;
                    for (C6506<K, V> c650613 = c650611; c650613 != null; c650613 = c650613.f19249) {
                        c650613.f19248 = c650612;
                        c650612 = c650613;
                    }
                    int i7 = 0;
                    int i8 = 0;
                    while (true) {
                        if (c650612 == null) {
                            c65063 = c650612;
                            c650612 = null;
                        } else {
                            c65063 = c650612.f19248;
                            c650612.f19248 = null;
                            for (C6506<K, V> c650614 = c650612.f19250; c650614 != null; c650614 = c650614.f19249) {
                                c650614.f19248 = c65063;
                                c65063 = c650614;
                            }
                        }
                        if (c650612 == null) {
                            break;
                        }
                        if ((c650612.f19254 & length2) == 0) {
                            i7++;
                        } else {
                            i8++;
                        }
                        c650612 = c65063;
                    }
                    c6500.m9742(i7);
                    c65002.m9742(i8);
                    C6506<K, V> c650615 = null;
                    while (c650611 != null) {
                        c650611.f19248 = c650615;
                        C6506<K, V> c650616 = c650611;
                        c650611 = c650611.f19249;
                        c650615 = c650616;
                    }
                    while (true) {
                        if (c650615 != null) {
                            C6506<K, V> c650617 = c650615.f19248;
                            c650615.f19248 = null;
                            C6506<K, V> c650618 = c650615.f19250;
                            while (true) {
                                C6506<K, V> c650619 = c650618;
                                c65064 = c650617;
                                c650617 = c650619;
                                if (c650617 == null) {
                                    break;
                                }
                                c650617.f19248 = c65064;
                                c650618 = c650617.f19249;
                            }
                        } else {
                            c65064 = c650615;
                            c650615 = null;
                        }
                        if (c650615 == null) {
                            break;
                        }
                        if ((c650615.f19254 & length2) == 0) {
                            c6500.m9743(c650615);
                        } else {
                            c65002.m9743(c650615);
                        }
                        c650615 = c65064;
                    }
                    if (i7 > 0) {
                        c65065 = c6500.f19238;
                        if (c65065.f19248 != null) {
                            throw new IllegalStateException();
                        }
                    } else {
                        c65065 = null;
                    }
                    c6506Arr3[i6] = c65065;
                    int i9 = i6 + length2;
                    if (i8 > 0) {
                        c65066 = c65002.f19238;
                        if (c65066.f19248 != null) {
                            throw new IllegalStateException();
                        }
                    } else {
                        c65066 = null;
                    }
                    c6506Arr3[i9] = c65066;
                }
            }
            this.f19231 = c6506Arr3;
            this.f19235 = (i5 / 4) + (i5 / 2);
        }
        this.f19234++;
        return c65062;
    }

    /* JADX WARN: Removed duplicated region for block: B:14:0x0023  */
    /* JADX INFO: renamed from: ֏, reason: contains not printable characters */
    /*
        Code decompiled incorrectly, please refer to instructions dump.
    */
    public C6506<K, V> m9735(Map.Entry<?, ?> entry) {
        C6506<K, V> c6506M9739 = m9739(entry.getKey());
        boolean z = true;
        if (c6506M9739 == null) {
            z = false;
        } else {
            V v = c6506M9739.f19255;
            Object value = entry.getValue();
            if (!(v == value || (v != null && v.equals(value)))) {
            }
        }
        if (z) {
            return c6506M9739;
        }
        return null;
    }

    /* JADX INFO: renamed from: ֏, reason: contains not printable characters */
    public final void m9736(C6506<K, V> c6506) {
        C6506<K, V> c65062 = c6506.f19249;
        C6506<K, V> c65063 = c6506.f19250;
        C6506<K, V> c65064 = c65063.f19249;
        C6506<K, V> c65065 = c65063.f19250;
        c6506.f19250 = c65064;
        if (c65064 != null) {
            c65064.f19248 = c6506;
        }
        m9737(c6506, c65063);
        c65063.f19249 = c6506;
        c6506.f19248 = c65063;
        int iMax = Math.max(c65062 != null ? c65062.f19256 : 0, c65064 != null ? c65064.f19256 : 0) + 1;
        c6506.f19256 = iMax;
        c65063.f19256 = Math.max(iMax, c65065 != null ? c65065.f19256 : 0) + 1;
    }

    /* JADX INFO: renamed from: ֏, reason: contains not printable characters */
    public final void m9737(C6506<K, V> c6506, C6506<K, V> c65062) {
        C6506<K, V> c65063 = c6506.f19248;
        c6506.f19248 = null;
        if (c65062 != null) {
            c65062.f19248 = c65063;
        }
        if (c65063 == null) {
            int i = c6506.f19254;
            this.f19231[i & (r0.length - 1)] = c65062;
        } else if (c65063.f19249 == c6506) {
            c65063.f19249 = c65062;
        } else {
            c65063.f19250 = c65062;
        }
    }

    /* JADX INFO: renamed from: ֏, reason: contains not printable characters */
    public final void m9738(C6506<K, V> c6506, boolean z) {
        while (c6506 != null) {
            C6506<K, V> c65062 = c6506.f19249;
            C6506<K, V> c65063 = c6506.f19250;
            int i = c65062 != null ? c65062.f19256 : 0;
            int i2 = c65063 != null ? c65063.f19256 : 0;
            int i3 = i - i2;
            if (i3 == -2) {
                C6506<K, V> c65064 = c65063.f19249;
                C6506<K, V> c65065 = c65063.f19250;
                int i4 = (c65064 != null ? c65064.f19256 : 0) - (c65065 != null ? c65065.f19256 : 0);
                if (i4 == -1 || (i4 == 0 && !z)) {
                    m9736((C6506) c6506);
                } else {
                    m9740((C6506) c65063);
                    m9736((C6506) c6506);
                }
                if (z) {
                    return;
                }
            } else if (i3 == 2) {
                C6506<K, V> c65066 = c65062.f19249;
                C6506<K, V> c65067 = c65062.f19250;
                int i5 = (c65066 != null ? c65066.f19256 : 0) - (c65067 != null ? c65067.f19256 : 0);
                if (i5 == 1 || (i5 == 0 && !z)) {
                    m9740((C6506) c6506);
                } else {
                    m9736((C6506) c65062);
                    m9740((C6506) c6506);
                }
                if (z) {
                    return;
                }
            } else if (i3 == 0) {
                c6506.f19256 = i + 1;
                if (z) {
                    return;
                }
            } else {
                c6506.f19256 = Math.max(i, i2) + 1;
                if (!z) {
                    return;
                }
            }
            c6506 = c6506.f19248;
        }
    }

    /* JADX WARN: Multi-variable type inference failed */
    /* JADX INFO: renamed from: ؠ, reason: contains not printable characters */
    public C6506<K, V> m9739(Object obj) {
        if (obj == 0) {
            return null;
        }
        try {
            return m9734(obj, false);
        } catch (ClassCastException unused) {
            return null;
        }
    }

    /* JADX INFO: renamed from: ؠ, reason: contains not printable characters */
    public final void m9740(C6506<K, V> c6506) {
        C6506<K, V> c65062 = c6506.f19249;
        C6506<K, V> c65063 = c6506.f19250;
        C6506<K, V> c65064 = c65062.f19249;
        C6506<K, V> c65065 = c65062.f19250;
        c6506.f19249 = c65065;
        if (c65065 != null) {
            c65065.f19248 = c6506;
        }
        m9737(c6506, c65062);
        c65062.f19250 = c6506;
        c6506.f19248 = c65062;
        int iMax = Math.max(c65063 != null ? c65063.f19256 : 0, c65065 != null ? c65065.f19256 : 0) + 1;
        c6506.f19256 = iMax;
        c65062.f19256 = Math.max(iMax, c65064 != null ? c65064.f19256 : 0) + 1;
    }

    /* JADX INFO: renamed from: ؠ, reason: contains not printable characters */
    public void m9741(C6506<K, V> c6506, boolean z) {
        C6506<K, V> c65062;
        C6506<K, V> c65063;
        int i;
        if (z) {
            C6506<K, V> c65064 = c6506.f19252;
            c65064.f19251 = c6506.f19251;
            c6506.f19251.f19252 = c65064;
            c6506.f19252 = null;
            c6506.f19251 = null;
        }
        C6506<K, V> c65065 = c6506.f19249;
        C6506<K, V> c65066 = c6506.f19250;
        C6506<K, V> c65067 = c6506.f19248;
        int i2 = 0;
        if (c65065 == null || c65066 == null) {
            if (c65065 != null) {
                m9737(c6506, c65065);
                c6506.f19249 = null;
            } else if (c65066 != null) {
                m9737(c6506, c65066);
                c6506.f19250 = null;
            } else {
                m9737(c6506, (C6506) null);
            }
            m9738((C6506) c65067, false);
            this.f19233--;
            this.f19234++;
            return;
        }
        if (c65065.f19256 > c65066.f19256) {
            C6506<K, V> c65068 = c65065.f19250;
            while (true) {
                C6506<K, V> c65069 = c65068;
                c65063 = c65065;
                c65065 = c65069;
                if (c65065 == null) {
                    break;
                } else {
                    c65068 = c65065.f19250;
                }
            }
        } else {
            C6506<K, V> c650610 = c65066.f19249;
            while (true) {
                c65062 = c65066;
                c65066 = c650610;
                if (c65066 == null) {
                    break;
                } else {
                    c650610 = c65066.f19249;
                }
            }
            c65063 = c65062;
        }
        m9741(c65063, false);
        C6506<K, V> c650611 = c6506.f19249;
        if (c650611 != null) {
            i = c650611.f19256;
            c65063.f19249 = c650611;
            c650611.f19248 = c65063;
            c6506.f19249 = null;
        } else {
            i = 0;
        }
        C6506<K, V> c650612 = c6506.f19250;
        if (c650612 != null) {
            i2 = c650612.f19256;
            c65063.f19250 = c650612;
            c650612.f19248 = c65063;
            c6506.f19250 = null;
        }
        c65063.f19256 = Math.max(i, i2) + 1;
        m9737(c6506, c65063);
    }
}
