package com.google.crypto.tink.shaded.protobuf;

import defpackage.AbstractC4613;
import defpackage.C1236;
import defpackage.C1379;
import defpackage.C1390;
import defpackage.C1418;
import defpackage.C4935;
import java.util.Arrays;

/* JADX INFO: renamed from: com.google.crypto.tink.shaded.protobuf.ᵶᵥᵝ, reason: contains not printable characters */
/* JADX INFO: loaded from: classes3.dex */
public final class C0026 {

    /* JADX INFO: renamed from: ᵻˈᵦʼ, reason: contains not printable characters */
    public static final C0026 f1104 = new C0026(0, new int[0], new Object[0], false);

    /* JADX INFO: renamed from: ʽˈˋ, reason: contains not printable characters */
    public int[] f1105;

    /* JADX INFO: renamed from: ːˏᵟᵯ, reason: contains not printable characters */
    public Object[] f1106;

    /* JADX INFO: renamed from: ᵨᵣ, reason: contains not printable characters */
    public boolean f1107;

    /* JADX INFO: renamed from: ᵲᵶᵳˈ, reason: contains not printable characters */
    public int f1108;

    /* JADX INFO: renamed from: ᵷᵺʾᵖ, reason: contains not printable characters */
    public int f1109 = -1;

    public C0026(int i, int[] iArr, Object[] objArr, boolean z) {
        this.f1108 = i;
        this.f1105 = iArr;
        this.f1106 = objArr;
        this.f1107 = z;
    }

    /* JADX INFO: renamed from: ːˏᵟᵯ, reason: contains not printable characters */
    public static C0026 m934() {
        return new C0026(0, new int[8], new Object[8], true);
    }

    public final boolean equals(Object obj) {
        if (this == obj) {
            return true;
        }
        if (obj == null || !(obj instanceof C0026)) {
            return false;
        }
        C0026 c0026 = (C0026) obj;
        int i = this.f1108;
        if (i == c0026.f1108) {
            int[] iArr = this.f1105;
            int[] iArr2 = c0026.f1105;
            int i2 = 0;
            while (true) {
                if (i2 >= i) {
                    Object[] objArr = this.f1106;
                    Object[] objArr2 = c0026.f1106;
                    int i3 = this.f1108;
                    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.f1108;
        int i2 = (527 + i) * 31;
        int[] iArr = this.f1105;
        int iHashCode = 17;
        int i3 = 17;
        for (int i4 = 0; i4 < i; i4++) {
            i3 = (i3 * 31) + iArr[i4];
        }
        int i5 = (i2 + i3) * 31;
        Object[] objArr = this.f1106;
        int i6 = this.f1108;
        for (int i7 = 0; i7 < i6; i7++) {
            iHashCode = (iHashCode * 31) + objArr[i7].hashCode();
        }
        return i5 + iHashCode;
    }

    /* JADX INFO: renamed from: ʽˈˋ, reason: contains not printable characters */
    public final int m935() {
        int iM3941;
        int iM3943;
        int iM39412;
        int i = this.f1109;
        if (i != -1) {
            return i;
        }
        int i2 = 0;
        for (int i3 = 0; i3 < this.f1108; i3++) {
            int i4 = this.f1105[i3];
            int i5 = i4 >>> 3;
            int i6 = i4 & 7;
            if (i6 != 0) {
                if (i6 == 1) {
                    ((Long) this.f1106[i3]).getClass();
                    iM39412 = C1379.m3941(i5) + 8;
                } else if (i6 == 2) {
                    iM39412 = C1379.m3942(i5, (AbstractC4613) this.f1106[i3]);
                } else if (i6 == 3) {
                    iM3941 = C1379.m3941(i5) * 2;
                    iM3943 = ((C0026) this.f1106[i3]).m935();
                } else {
                    if (i6 != 5) {
                        C1418.m4090(InvalidProtocolBufferException.m836());
                        return 0;
                    }
                    ((Integer) this.f1106[i3]).getClass();
                    iM39412 = C1379.m3941(i5) + 4;
                }
                i2 = iM39412 + i2;
            } else {
                long jLongValue = ((Long) this.f1106[i3]).longValue();
                iM3941 = C1379.m3941(i5);
                iM3943 = C1379.m3943(jLongValue);
            }
            i2 = iM3943 + iM3941 + i2;
        }
        this.f1109 = i2;
        return i2;
    }

    /* JADX INFO: renamed from: ᵨᵣ, reason: contains not printable characters */
    public final void m936(ᵟˑʽ r7) {
        if (this.f1108 == 0) {
            return;
        }
        r7.getClass();
        C1379 c1379 = (C1379) r7.ˌᴵ;
        for (int i = 0; i < this.f1108; i++) {
            int i2 = this.f1105[i];
            Object obj = this.f1106[i];
            int i3 = i2 >>> 3;
            int i4 = i2 & 7;
            if (i4 == 0) {
                c1379.m3946(((Long) obj).longValue(), i3);
            } else if (i4 == 1) {
                c1379.m3954(((Long) obj).longValue(), i3);
            } else if (i4 == 2) {
                AbstractC4613 abstractC4613 = (AbstractC4613) obj;
                c1379.m3952(i3, 2);
                c1379.m3947(abstractC4613.size());
                C1236 c1236 = (C1236) abstractC4613;
                c1379.m3958(c1236.f5209, c1236.mo3721(), c1236.size());
            } else if (i4 == 3) {
                c1379.m3952(i3, 3);
                ((C0026) obj).m936(r7);
                c1379.m3952(i3, 4);
            } else {
                if (i4 != 5) {
                    C4935.m10238(InvalidProtocolBufferException.m836());
                    return;
                }
                c1379.m3956(i3, ((Integer) obj).intValue());
            }
        }
    }

    /* JADX INFO: renamed from: ᵲᵶᵳˈ, reason: contains not printable characters */
    public final void m937(int i) {
        int[] iArr = this.f1105;
        if (i > iArr.length) {
            int i2 = this.f1108;
            int i3 = (i2 / 2) + i2;
            if (i3 >= i) {
                i = i3;
            }
            if (i < 8) {
                i = 8;
            }
            this.f1105 = Arrays.copyOf(iArr, i);
            this.f1106 = Arrays.copyOf(this.f1106, i);
        }
    }

    /* JADX INFO: renamed from: ᵷᵺʾᵖ, reason: contains not printable characters */
    public final void m938(int i, Object obj) {
        if (!this.f1107) {
            C1390.m3978();
            return;
        }
        m937(this.f1108 + 1);
        int[] iArr = this.f1105;
        int i2 = this.f1108;
        iArr[i2] = i;
        this.f1106[i2] = obj;
        this.f1108 = i2 + 1;
    }
}
