package defpackage;

import androidx.media3.container.NalUnitUtil;
import androidx.media3.exoplayer.upstream.CmcdData;
import defpackage.cs;
import defpackage.l25;
import java.io.Serializable;
import java.util.Arrays;
import java.util.Collection;
import java.util.ConcurrentModificationException;
import java.util.Iterator;
import java.util.Map;
import java.util.NoSuchElementException;
import java.util.Set;
import kotlin.Metadata;

/* JADX INFO: loaded from: classes3.dex */
@Metadata(d1 = {"\u0000\u0018\n\u0002\u0018\u0002\n\u0002\b\u0002\n\u0002\u0010%\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\b\u0007\b\u0000\u0018\u0000*\u0004\b\u0000\u0010\u0001*\u0004\b\u0001\u0010\u00022\u000e\u0012\u0004\u0012\u00028\u0000\u0012\u0004\u0012\u00028\u00010\u00032\u00060\u0004j\u0002`\u0005:\u0006\u0006\u0007\b\t\n\u000b¨\u0006\f"}, d2 = {"Lcn5;", "K", "V", "", "Ljava/io/Serializable;", "Lkotlin/io/Serializable;", CmcdData.OBJECT_TYPE_AUDIO_ONLY, "d", "e", "f", "b", "c", "kotlin-stdlib"}, k = 1, mv = {2, 1, 0}, xi = NalUnitUtil.H265_NAL_UNIT_TYPE_UNSPECIFIED)
@vx8
public final class cn5<K, V> implements Map<K, V>, Serializable, l25 {
    public static final cn5 p;
    public Object[] a;
    public Object[] b;
    public int[] c;
    public int[] d;
    public int e;
    public int f;
    public int i;
    public int j;
    public int k;
    public en5 l;
    public fn5 m;
    public dn5 n;
    public boolean o;

    @Metadata(d1 = {"\u0000\u0010\n\u0002\u0018\u0002\n\u0002\u0010\u0000\n\u0002\u0010\b\n\u0002\b\u0006\b\u0080\u0003\u0018\u00002\u00020\u0001R\u0014\u0010\u0003\u001a\u00020\u00028\u0002X\u0082T¢\u0006\u0006\n\u0004\b\u0003\u0010\u0004R\u0014\u0010\u0005\u001a\u00020\u00028\u0002X\u0082T¢\u0006\u0006\n\u0004\b\u0005\u0010\u0004R\u0014\u0010\u0006\u001a\u00020\u00028\u0002X\u0082T¢\u0006\u0006\n\u0004\b\u0006\u0010\u0004R\u0014\u0010\u0007\u001a\u00020\u00028\u0002X\u0082T¢\u0006\u0006\n\u0004\b\u0007\u0010\u0004¨\u0006\b"}, d2 = {"Lcn5$a;", "", "", "MAGIC", "I", "INITIAL_CAPACITY", "INITIAL_MAX_PROBE_DISTANCE", "TOMBSTONE", "kotlin-stdlib"}, k = 1, mv = {2, 1, 0}, xi = NalUnitUtil.H265_NAL_UNIT_TYPE_UNSPECIFIED)
    public static final class a {
    }

    @Metadata(d1 = {"\u0000\u0016\n\u0002\u0018\u0002\n\u0002\b\u0002\n\u0002\u0018\u0002\n\u0002\u0010)\n\u0002\u0010'\n\u0000\b\u0000\u0018\u0000*\u0004\b\u0002\u0010\u0001*\u0004\b\u0003\u0010\u00022\u000e\u0012\u0004\u0012\u00028\u0002\u0012\u0004\u0012\u00028\u00030\u00032\u0014\u0012\u0010\u0012\u000e\u0012\u0004\u0012\u00028\u0002\u0012\u0004\u0012\u00028\u00030\u00050\u0004¨\u0006\u0006"}, d2 = {"Lcn5$b;", "K", "V", "Lcn5$d;", "", "", "kotlin-stdlib"}, k = 1, mv = {2, 1, 0}, xi = NalUnitUtil.H265_NAL_UNIT_TYPE_UNSPECIFIED)
    public static final class b<K, V> extends d<K, V> implements Iterator<Map.Entry<K, V>>, i25 {
        @Override // java.util.Iterator
        public final Object next() {
            a();
            int i = this.b;
            cn5 cn5Var = this.a;
            if (i >= cn5Var.f) {
                throw new NoSuchElementException();
            }
            this.b = i + 1;
            this.c = i;
            c cVar = new c(cn5Var, i);
            b();
            return cVar;
        }
    }

    @Metadata(d1 = {"\u0000\u000e\n\u0002\u0018\u0002\n\u0002\b\u0002\n\u0002\u0010'\n\u0000\b\u0000\u0018\u0000*\u0004\b\u0002\u0010\u0001*\u0004\b\u0003\u0010\u00022\u000e\u0012\u0004\u0012\u00028\u0002\u0012\u0004\u0012\u00028\u00030\u0003¨\u0006\u0004"}, d2 = {"Lcn5$c;", "K", "V", "", "kotlin-stdlib"}, k = 1, mv = {2, 1, 0}, xi = NalUnitUtil.H265_NAL_UNIT_TYPE_UNSPECIFIED)
    public static final class c<K, V> implements Map.Entry<K, V>, l25.a {
        public final cn5 a;
        public final int b;
        public final int c;

        public c(cn5 cn5Var, int i) {
            cr4.g(cn5Var, "map");
            this.a = cn5Var;
            this.b = i;
            this.c = cn5Var.j;
        }

        public final void a() {
            if (this.a.j != this.c) {
                throw new ConcurrentModificationException("The backing map has been modified after this entry was obtained.");
            }
        }

        @Override // java.util.Map.Entry
        public final boolean equals(Object obj) {
            if (!(obj instanceof Map.Entry)) {
                return false;
            }
            Map.Entry entry = (Map.Entry) obj;
            return cr4.b(entry.getKey(), getKey()) && cr4.b(entry.getValue(), getValue());
        }

        @Override // java.util.Map.Entry
        public final Object getKey() {
            a();
            return this.a.a[this.b];
        }

        @Override // java.util.Map.Entry
        public final Object getValue() {
            a();
            Object[] objArr = this.a.b;
            cr4.d(objArr);
            return objArr[this.b];
        }

        @Override // java.util.Map.Entry
        public final int hashCode() {
            Object key = getKey();
            int iHashCode = key != null ? key.hashCode() : 0;
            Object value = getValue();
            return iHashCode ^ (value != null ? value.hashCode() : 0);
        }

        @Override // java.util.Map.Entry
        public final Object setValue(Object obj) {
            a();
            cn5 cn5Var = this.a;
            cn5Var.c();
            Object[] objArr = cn5Var.b;
            if (objArr == null) {
                int length = cn5Var.a.length;
                if (length < 0) {
                    throw new IllegalArgumentException("capacity must be non-negative.");
                }
                objArr = new Object[length];
                cn5Var.b = objArr;
            }
            int i = this.b;
            Object obj2 = objArr[i];
            objArr[i] = obj;
            return obj2;
        }

        public final String toString() {
            StringBuilder sb = new StringBuilder();
            sb.append(getKey());
            sb.append('=');
            sb.append(getValue());
            return sb.toString();
        }
    }

    @Metadata(d1 = {"\u0000\u000e\n\u0002\u0018\u0002\n\u0002\b\u0002\n\u0002\u0010\u0000\n\u0000\b\u0010\u0018\u0000*\u0004\b\u0002\u0010\u0001*\u0004\b\u0003\u0010\u00022\u00020\u0003¨\u0006\u0004"}, d2 = {"Lcn5$d;", "K", "V", "", "kotlin-stdlib"}, k = 1, mv = {2, 1, 0}, xi = NalUnitUtil.H265_NAL_UNIT_TYPE_UNSPECIFIED)
    @vx8
    public static class d<K, V> {
        public final cn5 a;
        public int b;
        public int c;
        public int d;

        public d(cn5 cn5Var) {
            cr4.g(cn5Var, "map");
            this.a = cn5Var;
            this.c = -1;
            this.d = cn5Var.j;
            b();
        }

        public final void a() {
            if (this.a.j != this.d) {
                throw new ConcurrentModificationException();
            }
        }

        public final void b() {
            while (true) {
                int i = this.b;
                cn5 cn5Var = this.a;
                if (i >= cn5Var.f || cn5Var.c[i] >= 0) {
                    return;
                } else {
                    this.b = i + 1;
                }
            }
        }

        public final boolean hasNext() {
            return this.b < this.a.f;
        }

        public final void remove() {
            a();
            if (this.c == -1) {
                throw new IllegalStateException("Call next() before removing element from the iterator.");
            }
            cn5 cn5Var = this.a;
            cn5Var.c();
            cn5Var.l(this.c);
            this.c = -1;
            this.d = cn5Var.j;
        }
    }

    @Metadata(d1 = {"\u0000\u0012\n\u0002\u0018\u0002\n\u0002\b\u0002\n\u0002\u0018\u0002\n\u0002\u0010)\n\u0000\b\u0000\u0018\u0000*\u0004\b\u0002\u0010\u0001*\u0004\b\u0003\u0010\u00022\u000e\u0012\u0004\u0012\u00028\u0002\u0012\u0004\u0012\u00028\u00030\u00032\b\u0012\u0004\u0012\u00028\u00020\u0004¨\u0006\u0005"}, d2 = {"Lcn5$e;", "K", "V", "Lcn5$d;", "", "kotlin-stdlib"}, k = 1, mv = {2, 1, 0}, xi = NalUnitUtil.H265_NAL_UNIT_TYPE_UNSPECIFIED)
    public static final class e<K, V> extends d<K, V> implements Iterator<K>, i25 {
        @Override // java.util.Iterator
        public final Object next() {
            a();
            int i = this.b;
            cn5 cn5Var = this.a;
            if (i >= cn5Var.f) {
                throw new NoSuchElementException();
            }
            this.b = i + 1;
            this.c = i;
            Object obj = cn5Var.a[i];
            b();
            return obj;
        }
    }

    @Metadata(d1 = {"\u0000\u0012\n\u0002\u0018\u0002\n\u0002\b\u0002\n\u0002\u0018\u0002\n\u0002\u0010)\n\u0000\b\u0000\u0018\u0000*\u0004\b\u0002\u0010\u0001*\u0004\b\u0003\u0010\u00022\u000e\u0012\u0004\u0012\u00028\u0002\u0012\u0004\u0012\u00028\u00030\u00032\b\u0012\u0004\u0012\u00028\u00030\u0004¨\u0006\u0005"}, d2 = {"Lcn5$f;", "K", "V", "Lcn5$d;", "", "kotlin-stdlib"}, k = 1, mv = {2, 1, 0}, xi = NalUnitUtil.H265_NAL_UNIT_TYPE_UNSPECIFIED)
    public static final class f<K, V> extends d<K, V> implements Iterator<V>, i25 {
        @Override // java.util.Iterator
        public final Object next() {
            a();
            int i = this.b;
            cn5 cn5Var = this.a;
            if (i >= cn5Var.f) {
                throw new NoSuchElementException();
            }
            this.b = i + 1;
            this.c = i;
            Object[] objArr = cn5Var.b;
            cr4.d(objArr);
            Object obj = objArr[this.c];
            b();
            return obj;
        }
    }

    static {
        cn5 cn5Var = new cn5(0);
        cn5Var.o = true;
        p = cn5Var;
    }

    public cn5() {
        this(8);
    }

    public final int a(Object obj) {
        c();
        while (true) {
            int iJ = j(obj);
            int i = this.e * 2;
            int length = this.d.length / 2;
            if (i > length) {
                i = length;
            }
            int i2 = 0;
            while (true) {
                int[] iArr = this.d;
                int i3 = iArr[iJ];
                if (i3 <= 0) {
                    int i4 = this.f;
                    Object[] objArr = this.a;
                    if (i4 < objArr.length) {
                        int i5 = i4 + 1;
                        this.f = i5;
                        objArr[i4] = obj;
                        this.c[i4] = iJ;
                        iArr[iJ] = i5;
                        this.k++;
                        this.j++;
                        if (i2 > this.e) {
                            this.e = i2;
                        }
                        return i4;
                    }
                    g(1);
                } else {
                    if (cr4.b(this.a[i3 - 1], obj)) {
                        return -i3;
                    }
                    i2++;
                    if (i2 > i) {
                        k(this.d.length * 2);
                        break;
                    }
                    iJ = iJ == 0 ? this.d.length - 1 : iJ - 1;
                }
            }
        }
    }

    public final cn5 b() {
        c();
        this.o = true;
        if (this.k > 0) {
            return this;
        }
        cn5 cn5Var = p;
        cr4.e(cn5Var, "null cannot be cast to non-null type kotlin.collections.Map<K of kotlin.collections.builders.MapBuilder, V of kotlin.collections.builders.MapBuilder>");
        return cn5Var;
    }

    public final void c() {
        if (this.o) {
            throw new UnsupportedOperationException();
        }
    }

    @Override // java.util.Map
    public final void clear() {
        c();
        int i = this.f - 1;
        if (i >= 0) {
            int i2 = 0;
            while (true) {
                int[] iArr = this.c;
                int i3 = iArr[i2];
                if (i3 >= 0) {
                    this.d[i3] = 0;
                    iArr[i2] = -1;
                }
                if (i2 == i) {
                    break;
                } else {
                    i2++;
                }
            }
        }
        ab5.b(this.a, 0, this.f);
        Object[] objArr = this.b;
        if (objArr != null) {
            ab5.b(objArr, 0, this.f);
        }
        this.k = 0;
        this.f = 0;
        this.j++;
    }

    @Override // java.util.Map
    public final boolean containsKey(Object obj) {
        return h(obj) >= 0;
    }

    @Override // java.util.Map
    public final boolean containsValue(Object obj) {
        return i(obj) >= 0;
    }

    public final void d(boolean z) {
        int i;
        Object[] objArr = this.b;
        int i2 = 0;
        int i3 = 0;
        while (true) {
            i = this.f;
            if (i2 >= i) {
                break;
            }
            int[] iArr = this.c;
            int i4 = iArr[i2];
            if (i4 >= 0) {
                Object[] objArr2 = this.a;
                objArr2[i3] = objArr2[i2];
                if (objArr != null) {
                    objArr[i3] = objArr[i2];
                }
                if (z) {
                    iArr[i3] = i4;
                    this.d[i4] = i3 + 1;
                }
                i3++;
            }
            i2++;
        }
        ab5.b(this.a, i3, i);
        if (objArr != null) {
            ab5.b(objArr, i3, this.f);
        }
        this.f = i3;
    }

    public final boolean e(Collection collection) {
        cr4.g(collection, CmcdData.OBJECT_TYPE_MANIFEST);
        for (Object obj : collection) {
            if (obj != null) {
                try {
                    if (!f((Map.Entry) obj)) {
                    }
                } catch (ClassCastException unused) {
                }
            }
            return false;
        }
        return true;
    }

    @Override // java.util.Map
    public final Set entrySet() {
        dn5 dn5Var = this.n;
        if (dn5Var != null) {
            return dn5Var;
        }
        dn5 dn5Var2 = new dn5(this);
        this.n = dn5Var2;
        return dn5Var2;
    }

    @Override // java.util.Map
    public final boolean equals(Object obj) {
        if (obj == this) {
            return true;
        }
        if (!(obj instanceof Map)) {
            return false;
        }
        Map map = (Map) obj;
        return this.k == map.size() && e(map.entrySet());
    }

    public final boolean f(Map.Entry entry) {
        cr4.g(entry, "entry");
        int iH = h(entry.getKey());
        if (iH < 0) {
            return false;
        }
        Object[] objArr = this.b;
        cr4.d(objArr);
        return cr4.b(objArr[iH], entry.getValue());
    }

    public final void g(int i) {
        Object[] objArrCopyOf;
        Object[] objArr = this.a;
        int length = objArr.length;
        int i2 = this.f;
        int i3 = length - i2;
        int i4 = i2 - this.k;
        if (i3 < i && i3 + i4 >= i && i4 >= objArr.length / 4) {
            d(true);
            return;
        }
        int i5 = i2 + i;
        if (i5 < 0) {
            throw new OutOfMemoryError();
        }
        if (i5 > objArr.length) {
            int iE = cs.a.e(objArr.length, i5);
            Object[] objArr2 = this.a;
            cr4.g(objArr2, "<this>");
            Object[] objArrCopyOf2 = Arrays.copyOf(objArr2, iE);
            cr4.f(objArrCopyOf2, "copyOf(...)");
            this.a = objArrCopyOf2;
            Object[] objArr3 = this.b;
            if (objArr3 != null) {
                objArrCopyOf = Arrays.copyOf(objArr3, iE);
                cr4.f(objArrCopyOf, "copyOf(...)");
            } else {
                objArrCopyOf = null;
            }
            this.b = objArrCopyOf;
            int[] iArrCopyOf = Arrays.copyOf(this.c, iE);
            cr4.f(iArrCopyOf, "copyOf(...)");
            this.c = iArrCopyOf;
            int iHighestOneBit = Integer.highestOneBit((iE >= 1 ? iE : 1) * 3);
            if (iHighestOneBit > this.d.length) {
                k(iHighestOneBit);
            }
        }
    }

    @Override // java.util.Map
    public final Object get(Object obj) {
        int iH = h(obj);
        if (iH < 0) {
            return null;
        }
        Object[] objArr = this.b;
        cr4.d(objArr);
        return objArr[iH];
    }

    public final int h(Object obj) {
        int iJ = j(obj);
        int i = this.e;
        while (true) {
            int i2 = this.d[iJ];
            if (i2 == 0) {
                return -1;
            }
            if (i2 > 0) {
                int i3 = i2 - 1;
                if (cr4.b(this.a[i3], obj)) {
                    return i3;
                }
            }
            i--;
            if (i < 0) {
                return -1;
            }
            iJ = iJ == 0 ? this.d.length - 1 : iJ - 1;
        }
    }

    @Override // java.util.Map
    public final int hashCode() {
        b bVar = new b(this);
        int i = 0;
        while (bVar.hasNext()) {
            int i2 = bVar.b;
            cn5 cn5Var = bVar.a;
            if (i2 >= cn5Var.f) {
                throw new NoSuchElementException();
            }
            bVar.b = i2 + 1;
            bVar.c = i2;
            Object obj = cn5Var.a[i2];
            int iHashCode = obj != null ? obj.hashCode() : 0;
            Object[] objArr = cn5Var.b;
            cr4.d(objArr);
            Object obj2 = objArr[bVar.c];
            int iHashCode2 = obj2 != null ? obj2.hashCode() : 0;
            bVar.b();
            i += iHashCode ^ iHashCode2;
        }
        return i;
    }

    public final int i(Object obj) {
        int i = this.f;
        while (true) {
            i--;
            if (i < 0) {
                return -1;
            }
            if (this.c[i] >= 0) {
                Object[] objArr = this.b;
                cr4.d(objArr);
                if (cr4.b(objArr[i], obj)) {
                    return i;
                }
            }
        }
    }

    @Override // java.util.Map
    public final boolean isEmpty() {
        return this.k == 0;
    }

    public final int j(Object obj) {
        return ((obj != null ? obj.hashCode() : 0) * (-1640531527)) >>> this.i;
    }

    /* JADX WARN: Code restructure failed: missing block: B:11:0x0032, code lost:
    
        r3[r0] = r6;
        r5.c[r2] = r0;
        r2 = r6;
     */
    /*
        Code decompiled incorrectly, please refer to instructions dump.
    */
    public final void k(int i) {
        this.j++;
        int i2 = 0;
        if (this.f > this.k) {
            d(false);
        }
        this.d = new int[i];
        this.i = Integer.numberOfLeadingZeros(i) + 1;
        while (i2 < this.f) {
            int i3 = i2 + 1;
            int iJ = j(this.a[i2]);
            int i4 = this.e;
            while (true) {
                int[] iArr = this.d;
                if (iArr[iJ] == 0) {
                    break;
                }
                i4--;
                if (i4 < 0) {
                    throw new IllegalStateException("This cannot happen with fixed magic multiplier and grow-only hash array. Have object hashCodes changed?");
                }
                iJ = iJ == 0 ? iArr.length - 1 : iJ - 1;
            }
        }
    }

    @Override // java.util.Map
    public final Set keySet() {
        en5 en5Var = this.l;
        if (en5Var != null) {
            return en5Var;
        }
        en5 en5Var2 = new en5(this);
        this.l = en5Var2;
        return en5Var2;
    }

    /* JADX WARN: Removed duplicated region for block: B:32:0x0068 A[SYNTHETIC] */
    /* JADX WARN: Removed duplicated region for block: B:33:? A[LOOP:0: B:9:0x0024->B:33:?, LOOP_END, SYNTHETIC] */
    /*
        Code decompiled incorrectly, please refer to instructions dump.
    */
    public final void l(int i) {
        Object[] objArr = this.a;
        cr4.g(objArr, "<this>");
        objArr[i] = null;
        Object[] objArr2 = this.b;
        if (objArr2 != null) {
            objArr2[i] = null;
        }
        int length = this.c[i];
        int i2 = this.e * 2;
        int length2 = this.d.length / 2;
        if (i2 > length2) {
            i2 = length2;
        }
        int i3 = i2;
        int i4 = 0;
        int i5 = length;
        while (true) {
            length = length == 0 ? this.d.length - 1 : length - 1;
            i4++;
            if (i4 > this.e) {
                this.d[i5] = 0;
                break;
            }
            int[] iArr = this.d;
            int i6 = iArr[length];
            if (i6 == 0) {
                iArr[i5] = 0;
                break;
            }
            if (i6 < 0) {
                iArr[i5] = -1;
            } else {
                int i7 = i6 - 1;
                int iJ = j(this.a[i7]) - length;
                int[] iArr2 = this.d;
                if ((iJ & (iArr2.length - 1)) >= i4) {
                    iArr2[i5] = i6;
                    this.c[i7] = i5;
                }
                i3--;
                if (i3 >= 0) {
                    this.d[i5] = -1;
                    break;
                }
            }
            i5 = length;
            i4 = 0;
            i3--;
            if (i3 >= 0) {
            }
        }
        this.c[i] = -1;
        this.k--;
        this.j++;
    }

    @Override // java.util.Map
    public final Object put(Object obj, Object obj2) {
        c();
        int iA = a(obj);
        Object[] objArr = this.b;
        if (objArr == null) {
            int length = this.a.length;
            if (length < 0) {
                throw new IllegalArgumentException("capacity must be non-negative.");
            }
            objArr = new Object[length];
            this.b = objArr;
        }
        if (iA >= 0) {
            objArr[iA] = obj2;
            return null;
        }
        int i = (-iA) - 1;
        Object obj3 = objArr[i];
        objArr[i] = obj2;
        return obj3;
    }

    @Override // java.util.Map
    public final void putAll(Map map) {
        cr4.g(map, "from");
        c();
        Set<Map.Entry<K, V>> setEntrySet = map.entrySet();
        if (setEntrySet.isEmpty()) {
            return;
        }
        g(setEntrySet.size());
        for (Map.Entry<K, V> entry : setEntrySet) {
            int iA = a(entry.getKey());
            Object[] objArr = this.b;
            if (objArr == null) {
                int length = this.a.length;
                if (length < 0) {
                    throw new IllegalArgumentException("capacity must be non-negative.");
                }
                objArr = new Object[length];
                this.b = objArr;
            }
            if (iA >= 0) {
                objArr[iA] = entry.getValue();
            } else {
                int i = (-iA) - 1;
                if (!cr4.b(entry.getValue(), objArr[i])) {
                    objArr[i] = entry.getValue();
                }
            }
        }
    }

    @Override // java.util.Map
    public final Object remove(Object obj) {
        c();
        int iH = h(obj);
        if (iH < 0) {
            return null;
        }
        Object[] objArr = this.b;
        cr4.d(objArr);
        Object obj2 = objArr[iH];
        l(iH);
        return obj2;
    }

    @Override // java.util.Map
    public final int size() {
        return this.k;
    }

    public final String toString() {
        StringBuilder sb = new StringBuilder((this.k * 3) + 2);
        sb.append("{");
        b bVar = new b(this);
        int i = 0;
        while (bVar.hasNext()) {
            if (i > 0) {
                sb.append(", ");
            }
            int i2 = bVar.b;
            cn5 cn5Var = bVar.a;
            if (i2 >= cn5Var.f) {
                throw new NoSuchElementException();
            }
            bVar.b = i2 + 1;
            bVar.c = i2;
            Object obj = cn5Var.a[i2];
            if (obj == cn5Var) {
                sb.append("(this Map)");
            } else {
                sb.append(obj);
            }
            sb.append('=');
            Object[] objArr = cn5Var.b;
            cr4.d(objArr);
            Object obj2 = objArr[bVar.c];
            if (obj2 == cn5Var) {
                sb.append("(this Map)");
            } else {
                sb.append(obj2);
            }
            bVar.b();
            i++;
        }
        sb.append("}");
        String string = sb.toString();
        cr4.f(string, "toString(...)");
        return string;
    }

    @Override // java.util.Map
    public final Collection values() {
        fn5 fn5Var = this.m;
        if (fn5Var != null) {
            return fn5Var;
        }
        fn5 fn5Var2 = new fn5(this);
        this.m = fn5Var2;
        return fn5Var2;
    }

    public cn5(int i) {
        if (i < 0) {
            throw new IllegalArgumentException("capacity must be non-negative.");
        }
        Object[] objArr = new Object[i];
        int[] iArr = new int[i];
        int iHighestOneBit = Integer.highestOneBit((i < 1 ? 1 : i) * 3);
        this.a = objArr;
        this.b = null;
        this.c = iArr;
        this.d = new int[iHighestOneBit];
        this.e = 2;
        this.f = 0;
        this.i = Integer.numberOfLeadingZeros(iHighestOneBit) + 1;
    }
}
