package defpackage;

import java.util.Arrays;

/* JADX INFO: renamed from: ᵼˈ, reason: contains not printable characters */
/* JADX INFO: loaded from: classes3.dex */
public final class C5267 implements Cloneable {

    /* JADX INFO: renamed from: ˌᴵ, reason: contains not printable characters */
    public /* synthetic */ int[] f19909;

    /* JADX INFO: renamed from: ᵔᵖᵹᵫ, reason: contains not printable characters */
    public /* synthetic */ int f19910;

    /* JADX INFO: renamed from: ᵜᵪʾ, reason: contains not printable characters */
    public /* synthetic */ Object[] f19911;

    public C5267() {
        int i;
        int i2 = 4;
        while (true) {
            i = 40;
            if (i2 >= 32) {
                break;
            }
            int i3 = (1 << i2) - 12;
            if (40 <= i3) {
                i = i3;
                break;
            }
            i2++;
        }
        int i4 = i / 4;
        this.f19909 = new int[i4];
        this.f19911 = new Object[i4];
    }

    public final String toString() {
        int i = this.f19910;
        if (i <= 0) {
            return "{}";
        }
        StringBuilder sb = new StringBuilder(i * 28);
        sb.append('{');
        int i2 = this.f19910;
        for (int i3 = 0; i3 < i2; i3++) {
            if (i3 > 0) {
                sb.append(", ");
            }
            if (i3 >= this.f19910 || i3 < 0) {
                throw new ArrayIndexOutOfBoundsException();
            }
            sb.append(this.f19909[i3]);
            sb.append('=');
            Object objM10866 = m10866(i3);
            if (objM10866 != this) {
                sb.append(objM10866);
            } else {
                sb.append("(this Map)");
            }
        }
        sb.append('}');
        return sb.toString();
    }

    /* JADX INFO: renamed from: ʽˈˋ, reason: contains not printable characters */
    public final void m10863(int i, Object obj) {
        int i2 = this.f19910;
        if (i2 != 0 && i <= this.f19909[i2 - 1]) {
            m10864(i, obj);
            return;
        }
        if (i2 >= this.f19909.length) {
            int i3 = (i2 + 1) * 4;
            int i4 = 4;
            while (true) {
                if (i4 >= 32) {
                    break;
                }
                int i5 = (1 << i4) - 12;
                if (i3 <= i5) {
                    i3 = i5;
                    break;
                }
                i4++;
            }
            int i6 = i3 / 4;
            this.f19909 = Arrays.copyOf(this.f19909, i6);
            this.f19911 = Arrays.copyOf(this.f19911, i6);
        }
        this.f19909[i2] = i;
        this.f19911[i2] = obj;
        this.f19910 = i2 + 1;
    }

    /* JADX INFO: renamed from: ᵨᵣ, reason: contains not printable characters */
    public final void m10864(int i, Object obj) {
        int i2 = ᵣˉ.ᵨᵣ(this.f19909, this.f19910, i);
        if (i2 >= 0) {
            this.f19911[i2] = obj;
            return;
        }
        int i3 = ~i2;
        int i4 = this.f19910;
        if (i3 < i4) {
            Object[] objArr = this.f19911;
            if (objArr[i3] == ˌᵨʽʙ.ᵜᵪʾ) {
                this.f19909[i3] = i;
                objArr[i3] = obj;
                return;
            }
        }
        if (i4 >= this.f19909.length) {
            int i5 = (i4 + 1) * 4;
            int i6 = 4;
            while (true) {
                if (i6 >= 32) {
                    break;
                }
                int i7 = (1 << i6) - 12;
                if (i5 <= i7) {
                    i5 = i7;
                    break;
                }
                i6++;
            }
            int i8 = i5 / 4;
            this.f19909 = Arrays.copyOf(this.f19909, i8);
            this.f19911 = Arrays.copyOf(this.f19911, i8);
        }
        int i9 = this.f19910;
        if (i9 - i3 != 0) {
            int[] iArr = this.f19909;
            int i10 = i3 + 1;
            AbstractC3761.m8421(i10, i3, i9, iArr, iArr);
            Object[] objArr2 = this.f19911;
            AbstractC3761.m8436(i10, i3, this.f19910, objArr2, objArr2);
        }
        this.f19909[i3] = i;
        this.f19911[i3] = obj;
        this.f19910++;
    }

    /* JADX INFO: renamed from: ᵷᵺʾᵖ, reason: contains not printable characters and merged with bridge method [inline-methods] */
    public final C5267 clone() {
        C5267 c5267 = (C5267) super.clone();
        c5267.f19909 = (int[]) this.f19909.clone();
        c5267.f19911 = (Object[]) this.f19911.clone();
        return c5267;
    }

    /* JADX INFO: renamed from: ᵻˈᵦʼ, reason: contains not printable characters */
    public final Object m10866(int i) {
        if (i >= this.f19910 || i < 0) {
            throw new ArrayIndexOutOfBoundsException();
        }
        return this.f19911[i];
    }
}
