package defpackage;

import com.google.android.gms.internal.play_billing.zzfm;
import com.google.android.gms.internal.play_billing.zzgr;
import java.util.Arrays;

/* renamed from: ᵬʦ, reason: contains not printable characters */
/* loaded from: classes3.dex */
public final class C4013 {

    /* renamed from: ˏˋٴ, reason: contains not printable characters */
    public static final C4013 f15093 = new C4013(0, new int[0], new Object[0], false);

    /* renamed from: ˇʼʤˎ, reason: contains not printable characters */
    public boolean f15094;

    /* renamed from: ˏᵙ, reason: contains not printable characters */
    public Object[] f15095;

    /* renamed from: ᵥᵯˎ, reason: contains not printable characters */
    public int f15096;

    /* renamed from: ᵴᵳ, reason: contains not printable characters */
    public int[] f15097;

    /* renamed from: ᵻᵢﹳᵰ, reason: contains not printable characters */
    public int f15098 = -1;

    public C4013(int i, int[] iArr, Object[] objArr, boolean z) {
        this.f15096 = i;
        this.f15097 = iArr;
        this.f15095 = objArr;
        this.f15094 = z;
    }

    /* renamed from: ᵴᵳ, reason: contains not printable characters */
    public static C4013 m8853() {
        return new C4013(0, new int[8], new Object[8], true);
    }

    public final boolean equals(Object obj) {
        if (this == obj) {
            return true;
        }
        if (obj != null && (obj instanceof C4013)) {
            C4013 c4013 = (C4013) obj;
            int i = this.f15096;
            if (i == c4013.f15096) {
                int[] iArr = this.f15097;
                int[] iArr2 = c4013.f15097;
                int i2 = 0;
                while (true) {
                    if (i2 >= i) {
                        Object[] objArr = this.f15095;
                        Object[] objArr2 = c4013.f15095;
                        int i3 = this.f15096;
                        for (int i4 = 0; i4 < i3; i4++) {
                            if (objArr[i4].equals(objArr2[i4])) {
                            }
                        }
                        return true;
                    }
                    if (iArr[i2] != iArr2[i2]) {
                        break;
                    }
                    i2++;
                }
            }
        }
        return false;
    }

    public final int hashCode() {
        int i = this.f15096;
        int i2 = i + 527;
        int[] iArr = this.f15097;
        int iHashCode = 17;
        int i3 = 17;
        for (int i4 = 0; i4 < i; i4++) {
            i3 = (i3 * 31) + iArr[i4];
        }
        int i5 = ((i2 * 31) + i3) * 31;
        Object[] objArr = this.f15095;
        int i6 = this.f15096;
        for (int i7 = 0; i7 < i6; i7++) {
            iHashCode = (iHashCode * 31) + objArr[i7].hashCode();
        }
        return i5 + iHashCode;
    }

    /* renamed from: ˇʼʤˎ, reason: contains not printable characters */
    public final void m8854(int i) {
        int[] iArr = this.f15097;
        if (i > iArr.length) {
            int i2 = this.f15096;
            int i3 = (i2 / 2) + i2;
            if (i3 >= i) {
                i = i3;
            }
            if (i < 8) {
                i = 8;
            }
            this.f15097 = Arrays.copyOf(iArr, i);
            this.f15095 = Arrays.copyOf(this.f15095, i);
        }
    }

    /* renamed from: ˏᵙ, reason: contains not printable characters */
    public final void m8855(int i, Object obj) {
        if (!this.f15094) {
            C2585.m6504();
            return;
        }
        m8854(this.f15096 + 1);
        int[] iArr = this.f15097;
        int i2 = this.f15096;
        iArr[i2] = i;
        this.f15095[i2] = obj;
        this.f15096 = i2 + 1;
    }

    /* renamed from: ᵥᵯˎ, reason: contains not printable characters */
    public final int m8856() {
        int iM6604;
        int iM6605;
        int iM66042;
        int i = this.f15098;
        if (i != -1) {
            return i;
        }
        int iM10013 = 0;
        for (int i2 = 0; i2 < this.f15096; i2++) {
            int i3 = this.f15097[i2];
            int i4 = i3 >>> 3;
            int i5 = i3 & 7;
            if (i5 != 0) {
                if (i5 == 1) {
                    ((Long) this.f15095[i2]).getClass();
                    iM66042 = C2629.m6604(i4 << 3) + 8;
                } else if (i5 == 2) {
                    int i6 = i4 << 3;
                    AbstractC1608 abstractC1608 = (AbstractC1608) this.f15095[i2];
                    int iM66043 = C2629.m6604(i6);
                    int iMo2681 = abstractC1608.mo2681();
                    iM10013 = AbstractC4737.m10013(iMo2681, iMo2681, iM66043, iM10013);
                } else if (i5 == 3) {
                    int iM66044 = C2629.m6604(i4 << 3);
                    iM6604 = iM66044 + iM66044;
                    iM6605 = ((C4013) this.f15095[i2]).m8856();
                } else {
                    if (i5 != 5) {
                        C2707.m6713(new zzgr());
                        return 0;
                    }
                    ((Integer) this.f15095[i2]).getClass();
                    iM66042 = C2629.m6604(i4 << 3) + 4;
                }
                iM10013 = iM66042 + iM10013;
            } else {
                int i7 = i4 << 3;
                long jLongValue = ((Long) this.f15095[i2]).longValue();
                iM6604 = C2629.m6604(i7);
                iM6605 = C2629.m6605(jLongValue);
            }
            iM10013 = iM6605 + iM6604 + iM10013;
        }
        this.f15098 = iM10013;
        return iM10013;
    }

    /* renamed from: ᵻᵢﹳᵰ, reason: contains not printable characters */
    public final void m8857(C4457 c4457) throws zzfm {
        C2629 c2629 = (C2629) c4457.f16625;
        if (this.f15096 != 0) {
            for (int i = 0; i < this.f15096; i++) {
                int i2 = this.f15097[i];
                Object obj = this.f15095[i];
                int i3 = i2 & 7;
                int i4 = i2 >>> 3;
                if (i3 == 0) {
                    c2629.m6607(((Long) obj).longValue(), i4);
                } else if (i3 == 1) {
                    c2629.m6606(((Long) obj).longValue(), i4);
                } else if (i3 == 2) {
                    AbstractC1608 abstractC1608 = (AbstractC1608) obj;
                    c2629.m6616((i4 << 3) | 2);
                    c2629.m6616(abstractC1608.mo2681());
                    abstractC1608.mo2676(c2629);
                } else if (i3 == 3) {
                    c2629.m6611(i4, 3);
                    ((C4013) obj).m8857(c4457);
                    c2629.m6611(i4, 4);
                } else {
                    if (i3 != 5) {
                        C1260.m3814(new zzgr());
                        return;
                    }
                    c2629.m6610(i4, ((Integer) obj).intValue());
                }
            }
        }
    }
}
