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

import com.google.android.gms.common.api.Api;
import com.google.crypto.tink.shaded.protobuf.h0;
import java.util.List;
import java.util.Map;

/* JADX INFO: Access modifiers changed from: package-private */
/* loaded from: classes3.dex */
public final class j implements c1 {

    /* renamed from: a, reason: collision with root package name */
    private final i f14374a;

    /* renamed from: b, reason: collision with root package name */
    private int f14375b;

    /* renamed from: c, reason: collision with root package name */
    private int f14376c;

    /* renamed from: d, reason: collision with root package name */
    private int f14377d = 0;

    private j(i iVar) {
        i iVar2 = (i) z.b(iVar, "input");
        this.f14374a = iVar2;
        iVar2.f14360d = this;
    }

    public static j O(i iVar) {
        j jVar = iVar.f14360d;
        return jVar != null ? jVar : new j(iVar);
    }

    private Object P(d1 d1Var, p pVar) {
        int i10 = this.f14376c;
        this.f14376c = p1.c(p1.a(this.f14375b), 4);
        try {
            Object f10 = d1Var.f();
            d1Var.j(f10, this, pVar);
            d1Var.b(f10);
            if (this.f14375b == this.f14376c) {
                return f10;
            }
            throw a0.g();
        } finally {
            this.f14376c = i10;
        }
    }

    private Object Q(d1 d1Var, p pVar) {
        int A = this.f14374a.A();
        i iVar = this.f14374a;
        if (iVar.f14357a >= iVar.f14358b) {
            throw a0.h();
        }
        int j10 = iVar.j(A);
        Object f10 = d1Var.f();
        this.f14374a.f14357a++;
        d1Var.j(f10, this, pVar);
        d1Var.b(f10);
        this.f14374a.a(0);
        r4.f14357a--;
        this.f14374a.i(j10);
        return f10;
    }

    private void S(int i10) {
        if (this.f14374a.d() != i10) {
            throw a0.j();
        }
    }

    private void T(int i10) {
        if (p1.b(this.f14375b) != i10) {
            throw a0.d();
        }
    }

    private void U(int i10) {
        if ((i10 & 3) != 0) {
            throw a0.g();
        }
    }

    private void V(int i10) {
        if ((i10 & 7) != 0) {
            throw a0.g();
        }
    }

    @Override // com.google.crypto.tink.shaded.protobuf.c1
    public void A(List list) {
        int z10;
        int z11;
        if (!(list instanceof v)) {
            int b10 = p1.b(this.f14375b);
            if (b10 == 2) {
                int A = this.f14374a.A();
                U(A);
                int d10 = this.f14374a.d() + A;
                do {
                    list.add(Float.valueOf(this.f14374a.q()));
                } while (this.f14374a.d() < d10);
                return;
            }
            if (b10 != 5) {
                throw a0.d();
            }
            do {
                list.add(Float.valueOf(this.f14374a.q()));
                if (this.f14374a.e()) {
                    return;
                } else {
                    z10 = this.f14374a.z();
                }
            } while (z10 == this.f14375b);
            this.f14377d = z10;
            return;
        }
        v vVar = (v) list;
        int b11 = p1.b(this.f14375b);
        if (b11 == 2) {
            int A2 = this.f14374a.A();
            U(A2);
            int d11 = this.f14374a.d() + A2;
            do {
                vVar.g(this.f14374a.q());
            } while (this.f14374a.d() < d11);
            return;
        }
        if (b11 != 5) {
            throw a0.d();
        }
        do {
            vVar.g(this.f14374a.q());
            if (this.f14374a.e()) {
                return;
            } else {
                z11 = this.f14374a.z();
            }
        } while (z11 == this.f14375b);
        this.f14377d = z11;
    }

    @Override // com.google.crypto.tink.shaded.protobuf.c1
    public int B() {
        T(0);
        return this.f14374a.r();
    }

    @Override // com.google.crypto.tink.shaded.protobuf.c1
    public boolean C() {
        int i10;
        if (this.f14374a.e() || (i10 = this.f14375b) == this.f14376c) {
            return false;
        }
        return this.f14374a.C(i10);
    }

    @Override // com.google.crypto.tink.shaded.protobuf.c1
    public int D() {
        T(5);
        return this.f14374a.t();
    }

    @Override // com.google.crypto.tink.shaded.protobuf.c1
    public void E(List list) {
        int z10;
        if (p1.b(this.f14375b) != 2) {
            throw a0.d();
        }
        do {
            list.add(z());
            if (this.f14374a.e()) {
                return;
            } else {
                z10 = this.f14374a.z();
            }
        } while (z10 == this.f14375b);
        this.f14377d = z10;
    }

    @Override // com.google.crypto.tink.shaded.protobuf.c1
    public void F(List list) {
        int z10;
        int z11;
        if (!(list instanceof m)) {
            int b10 = p1.b(this.f14375b);
            if (b10 != 1) {
                if (b10 != 2) {
                    throw a0.d();
                }
                int A = this.f14374a.A();
                V(A);
                int d10 = this.f14374a.d() + A;
                do {
                    list.add(Double.valueOf(this.f14374a.m()));
                } while (this.f14374a.d() < d10);
                return;
            }
            do {
                list.add(Double.valueOf(this.f14374a.m()));
                if (this.f14374a.e()) {
                    return;
                } else {
                    z10 = this.f14374a.z();
                }
            } while (z10 == this.f14375b);
            this.f14377d = z10;
            return;
        }
        m mVar = (m) list;
        int b11 = p1.b(this.f14375b);
        if (b11 != 1) {
            if (b11 != 2) {
                throw a0.d();
            }
            int A2 = this.f14374a.A();
            V(A2);
            int d11 = this.f14374a.d() + A2;
            do {
                mVar.g(this.f14374a.m());
            } while (this.f14374a.d() < d11);
            return;
        }
        do {
            mVar.g(this.f14374a.m());
            if (this.f14374a.e()) {
                return;
            } else {
                z11 = this.f14374a.z();
            }
        } while (z11 == this.f14375b);
        this.f14377d = z11;
    }

    @Override // com.google.crypto.tink.shaded.protobuf.c1
    public long G() {
        T(0);
        return this.f14374a.s();
    }

    @Override // com.google.crypto.tink.shaded.protobuf.c1
    public String H() {
        T(2);
        return this.f14374a.y();
    }

    @Override // com.google.crypto.tink.shaded.protobuf.c1
    public void I(List list) {
        int z10;
        int z11;
        if (!(list instanceof f0)) {
            int b10 = p1.b(this.f14375b);
            if (b10 != 1) {
                if (b10 != 2) {
                    throw a0.d();
                }
                int A = this.f14374a.A();
                V(A);
                int d10 = this.f14374a.d() + A;
                do {
                    list.add(Long.valueOf(this.f14374a.p()));
                } while (this.f14374a.d() < d10);
                return;
            }
            do {
                list.add(Long.valueOf(this.f14374a.p()));
                if (this.f14374a.e()) {
                    return;
                } else {
                    z10 = this.f14374a.z();
                }
            } while (z10 == this.f14375b);
            this.f14377d = z10;
            return;
        }
        f0 f0Var = (f0) list;
        int b11 = p1.b(this.f14375b);
        if (b11 != 1) {
            if (b11 != 2) {
                throw a0.d();
            }
            int A2 = this.f14374a.A();
            V(A2);
            int d11 = this.f14374a.d() + A2;
            do {
                f0Var.g(this.f14374a.p());
            } while (this.f14374a.d() < d11);
            return;
        }
        do {
            f0Var.g(this.f14374a.p());
            if (this.f14374a.e()) {
                return;
            } else {
                z11 = this.f14374a.z();
            }
        } while (z11 == this.f14375b);
        this.f14377d = z11;
    }

    @Override // com.google.crypto.tink.shaded.protobuf.c1
    public void J(List list, d1 d1Var, p pVar) {
        int z10;
        if (p1.b(this.f14375b) != 2) {
            throw a0.d();
        }
        int i10 = this.f14375b;
        do {
            list.add(Q(d1Var, pVar));
            if (this.f14374a.e() || this.f14377d != 0) {
                return;
            } else {
                z10 = this.f14374a.z();
            }
        } while (z10 == i10);
        this.f14377d = z10;
    }

    @Override // com.google.crypto.tink.shaded.protobuf.c1
    public Object K(d1 d1Var, p pVar) {
        T(3);
        return P(d1Var, pVar);
    }

    @Override // com.google.crypto.tink.shaded.protobuf.c1
    public Object L(d1 d1Var, p pVar) {
        T(2);
        return Q(d1Var, pVar);
    }

    @Override // com.google.crypto.tink.shaded.protobuf.c1
    public void M(Map map, h0.a aVar, p pVar) {
        T(2);
        this.f14374a.j(this.f14374a.A());
        throw null;
    }

    @Override // com.google.crypto.tink.shaded.protobuf.c1
    public void N(List list, d1 d1Var, p pVar) {
        int z10;
        if (p1.b(this.f14375b) != 3) {
            throw a0.d();
        }
        int i10 = this.f14375b;
        do {
            list.add(P(d1Var, pVar));
            if (this.f14374a.e() || this.f14377d != 0) {
                return;
            } else {
                z10 = this.f14374a.z();
            }
        } while (z10 == i10);
        this.f14377d = z10;
    }

    public void R(List list, boolean z10) {
        int z11;
        int z12;
        if (p1.b(this.f14375b) != 2) {
            throw a0.d();
        }
        if (!(list instanceof d0) || z10) {
            do {
                list.add(z10 ? H() : v());
                if (this.f14374a.e()) {
                    return;
                } else {
                    z11 = this.f14374a.z();
                }
            } while (z11 == this.f14375b);
            this.f14377d = z11;
            return;
        }
        d0 d0Var = (d0) list;
        do {
            d0Var.x0(z());
            if (this.f14374a.e()) {
                return;
            } else {
                z12 = this.f14374a.z();
            }
        } while (z12 == this.f14375b);
        this.f14377d = z12;
    }

    @Override // com.google.crypto.tink.shaded.protobuf.c1
    public int a() {
        return this.f14375b;
    }

    @Override // com.google.crypto.tink.shaded.protobuf.c1
    public void b(List list) {
        int z10;
        int z11;
        if (!(list instanceof y)) {
            int b10 = p1.b(this.f14375b);
            if (b10 != 0) {
                if (b10 != 2) {
                    throw a0.d();
                }
                int d10 = this.f14374a.d() + this.f14374a.A();
                do {
                    list.add(Integer.valueOf(this.f14374a.v()));
                } while (this.f14374a.d() < d10);
                S(d10);
                return;
            }
            do {
                list.add(Integer.valueOf(this.f14374a.v()));
                if (this.f14374a.e()) {
                    return;
                } else {
                    z10 = this.f14374a.z();
                }
            } while (z10 == this.f14375b);
            this.f14377d = z10;
            return;
        }
        y yVar = (y) list;
        int b11 = p1.b(this.f14375b);
        if (b11 != 0) {
            if (b11 != 2) {
                throw a0.d();
            }
            int d11 = this.f14374a.d() + this.f14374a.A();
            do {
                yVar.A(this.f14374a.v());
            } while (this.f14374a.d() < d11);
            S(d11);
            return;
        }
        do {
            yVar.A(this.f14374a.v());
            if (this.f14374a.e()) {
                return;
            } else {
                z11 = this.f14374a.z();
            }
        } while (z11 == this.f14375b);
        this.f14377d = z11;
    }

    @Override // com.google.crypto.tink.shaded.protobuf.c1
    public long c() {
        T(0);
        return this.f14374a.B();
    }

    @Override // com.google.crypto.tink.shaded.protobuf.c1
    public long d() {
        T(1);
        return this.f14374a.p();
    }

    @Override // com.google.crypto.tink.shaded.protobuf.c1
    public void e(List list) {
        int z10;
        int z11;
        if (!(list instanceof y)) {
            int b10 = p1.b(this.f14375b);
            if (b10 == 2) {
                int A = this.f14374a.A();
                U(A);
                int d10 = this.f14374a.d() + A;
                do {
                    list.add(Integer.valueOf(this.f14374a.t()));
                } while (this.f14374a.d() < d10);
                return;
            }
            if (b10 != 5) {
                throw a0.d();
            }
            do {
                list.add(Integer.valueOf(this.f14374a.t()));
                if (this.f14374a.e()) {
                    return;
                } else {
                    z10 = this.f14374a.z();
                }
            } while (z10 == this.f14375b);
            this.f14377d = z10;
            return;
        }
        y yVar = (y) list;
        int b11 = p1.b(this.f14375b);
        if (b11 == 2) {
            int A2 = this.f14374a.A();
            U(A2);
            int d11 = this.f14374a.d() + A2;
            do {
                yVar.A(this.f14374a.t());
            } while (this.f14374a.d() < d11);
            return;
        }
        if (b11 != 5) {
            throw a0.d();
        }
        do {
            yVar.A(this.f14374a.t());
            if (this.f14374a.e()) {
                return;
            } else {
                z11 = this.f14374a.z();
            }
        } while (z11 == this.f14375b);
        this.f14377d = z11;
    }

    @Override // com.google.crypto.tink.shaded.protobuf.c1
    public void f(List list) {
        int z10;
        int z11;
        if (!(list instanceof f0)) {
            int b10 = p1.b(this.f14375b);
            if (b10 != 0) {
                if (b10 != 2) {
                    throw a0.d();
                }
                int d10 = this.f14374a.d() + this.f14374a.A();
                do {
                    list.add(Long.valueOf(this.f14374a.w()));
                } while (this.f14374a.d() < d10);
                S(d10);
                return;
            }
            do {
                list.add(Long.valueOf(this.f14374a.w()));
                if (this.f14374a.e()) {
                    return;
                } else {
                    z10 = this.f14374a.z();
                }
            } while (z10 == this.f14375b);
            this.f14377d = z10;
            return;
        }
        f0 f0Var = (f0) list;
        int b11 = p1.b(this.f14375b);
        if (b11 != 0) {
            if (b11 != 2) {
                throw a0.d();
            }
            int d11 = this.f14374a.d() + this.f14374a.A();
            do {
                f0Var.g(this.f14374a.w());
            } while (this.f14374a.d() < d11);
            S(d11);
            return;
        }
        do {
            f0Var.g(this.f14374a.w());
            if (this.f14374a.e()) {
                return;
            } else {
                z11 = this.f14374a.z();
            }
        } while (z11 == this.f14375b);
        this.f14377d = z11;
    }

    @Override // com.google.crypto.tink.shaded.protobuf.c1
    public void g(List list) {
        int z10;
        int z11;
        if (!(list instanceof y)) {
            int b10 = p1.b(this.f14375b);
            if (b10 != 0) {
                if (b10 != 2) {
                    throw a0.d();
                }
                int d10 = this.f14374a.d() + this.f14374a.A();
                do {
                    list.add(Integer.valueOf(this.f14374a.A()));
                } while (this.f14374a.d() < d10);
                S(d10);
                return;
            }
            do {
                list.add(Integer.valueOf(this.f14374a.A()));
                if (this.f14374a.e()) {
                    return;
                } else {
                    z10 = this.f14374a.z();
                }
            } while (z10 == this.f14375b);
            this.f14377d = z10;
            return;
        }
        y yVar = (y) list;
        int b11 = p1.b(this.f14375b);
        if (b11 != 0) {
            if (b11 != 2) {
                throw a0.d();
            }
            int d11 = this.f14374a.d() + this.f14374a.A();
            do {
                yVar.A(this.f14374a.A());
            } while (this.f14374a.d() < d11);
            S(d11);
            return;
        }
        do {
            yVar.A(this.f14374a.A());
            if (this.f14374a.e()) {
                return;
            } else {
                z11 = this.f14374a.z();
            }
        } while (z11 == this.f14375b);
        this.f14377d = z11;
    }

    @Override // com.google.crypto.tink.shaded.protobuf.c1
    public int h() {
        T(5);
        return this.f14374a.o();
    }

    @Override // com.google.crypto.tink.shaded.protobuf.c1
    public boolean i() {
        T(0);
        return this.f14374a.k();
    }

    @Override // com.google.crypto.tink.shaded.protobuf.c1
    public long j() {
        T(1);
        return this.f14374a.u();
    }

    @Override // com.google.crypto.tink.shaded.protobuf.c1
    public void k(List list) {
        int z10;
        int z11;
        if (!(list instanceof f0)) {
            int b10 = p1.b(this.f14375b);
            if (b10 != 0) {
                if (b10 != 2) {
                    throw a0.d();
                }
                int d10 = this.f14374a.d() + this.f14374a.A();
                do {
                    list.add(Long.valueOf(this.f14374a.B()));
                } while (this.f14374a.d() < d10);
                S(d10);
                return;
            }
            do {
                list.add(Long.valueOf(this.f14374a.B()));
                if (this.f14374a.e()) {
                    return;
                } else {
                    z10 = this.f14374a.z();
                }
            } while (z10 == this.f14375b);
            this.f14377d = z10;
            return;
        }
        f0 f0Var = (f0) list;
        int b11 = p1.b(this.f14375b);
        if (b11 != 0) {
            if (b11 != 2) {
                throw a0.d();
            }
            int d11 = this.f14374a.d() + this.f14374a.A();
            do {
                f0Var.g(this.f14374a.B());
            } while (this.f14374a.d() < d11);
            S(d11);
            return;
        }
        do {
            f0Var.g(this.f14374a.B());
            if (this.f14374a.e()) {
                return;
            } else {
                z11 = this.f14374a.z();
            }
        } while (z11 == this.f14375b);
        this.f14377d = z11;
    }

    @Override // com.google.crypto.tink.shaded.protobuf.c1
    public int l() {
        T(0);
        return this.f14374a.A();
    }

    @Override // com.google.crypto.tink.shaded.protobuf.c1
    public void m(List list) {
        int z10;
        int z11;
        if (!(list instanceof f0)) {
            int b10 = p1.b(this.f14375b);
            if (b10 != 0) {
                if (b10 != 2) {
                    throw a0.d();
                }
                int d10 = this.f14374a.d() + this.f14374a.A();
                do {
                    list.add(Long.valueOf(this.f14374a.s()));
                } while (this.f14374a.d() < d10);
                S(d10);
                return;
            }
            do {
                list.add(Long.valueOf(this.f14374a.s()));
                if (this.f14374a.e()) {
                    return;
                } else {
                    z10 = this.f14374a.z();
                }
            } while (z10 == this.f14375b);
            this.f14377d = z10;
            return;
        }
        f0 f0Var = (f0) list;
        int b11 = p1.b(this.f14375b);
        if (b11 != 0) {
            if (b11 != 2) {
                throw a0.d();
            }
            int d11 = this.f14374a.d() + this.f14374a.A();
            do {
                f0Var.g(this.f14374a.s());
            } while (this.f14374a.d() < d11);
            S(d11);
            return;
        }
        do {
            f0Var.g(this.f14374a.s());
            if (this.f14374a.e()) {
                return;
            } else {
                z11 = this.f14374a.z();
            }
        } while (z11 == this.f14375b);
        this.f14377d = z11;
    }

    @Override // com.google.crypto.tink.shaded.protobuf.c1
    public void n(List list) {
        int z10;
        int z11;
        if (!(list instanceof f0)) {
            int b10 = p1.b(this.f14375b);
            if (b10 != 1) {
                if (b10 != 2) {
                    throw a0.d();
                }
                int A = this.f14374a.A();
                V(A);
                int d10 = this.f14374a.d() + A;
                do {
                    list.add(Long.valueOf(this.f14374a.u()));
                } while (this.f14374a.d() < d10);
                return;
            }
            do {
                list.add(Long.valueOf(this.f14374a.u()));
                if (this.f14374a.e()) {
                    return;
                } else {
                    z10 = this.f14374a.z();
                }
            } while (z10 == this.f14375b);
            this.f14377d = z10;
            return;
        }
        f0 f0Var = (f0) list;
        int b11 = p1.b(this.f14375b);
        if (b11 != 1) {
            if (b11 != 2) {
                throw a0.d();
            }
            int A2 = this.f14374a.A();
            V(A2);
            int d11 = this.f14374a.d() + A2;
            do {
                f0Var.g(this.f14374a.u());
            } while (this.f14374a.d() < d11);
            return;
        }
        do {
            f0Var.g(this.f14374a.u());
            if (this.f14374a.e()) {
                return;
            } else {
                z11 = this.f14374a.z();
            }
        } while (z11 == this.f14375b);
        this.f14377d = z11;
    }

    @Override // com.google.crypto.tink.shaded.protobuf.c1
    public void o(List list) {
        int z10;
        int z11;
        if (!(list instanceof y)) {
            int b10 = p1.b(this.f14375b);
            if (b10 != 0) {
                if (b10 != 2) {
                    throw a0.d();
                }
                int d10 = this.f14374a.d() + this.f14374a.A();
                do {
                    list.add(Integer.valueOf(this.f14374a.r()));
                } while (this.f14374a.d() < d10);
                S(d10);
                return;
            }
            do {
                list.add(Integer.valueOf(this.f14374a.r()));
                if (this.f14374a.e()) {
                    return;
                } else {
                    z10 = this.f14374a.z();
                }
            } while (z10 == this.f14375b);
            this.f14377d = z10;
            return;
        }
        y yVar = (y) list;
        int b11 = p1.b(this.f14375b);
        if (b11 != 0) {
            if (b11 != 2) {
                throw a0.d();
            }
            int d11 = this.f14374a.d() + this.f14374a.A();
            do {
                yVar.A(this.f14374a.r());
            } while (this.f14374a.d() < d11);
            S(d11);
            return;
        }
        do {
            yVar.A(this.f14374a.r());
            if (this.f14374a.e()) {
                return;
            } else {
                z11 = this.f14374a.z();
            }
        } while (z11 == this.f14375b);
        this.f14377d = z11;
    }

    @Override // com.google.crypto.tink.shaded.protobuf.c1
    public void p(List list) {
        int z10;
        int z11;
        if (!(list instanceof y)) {
            int b10 = p1.b(this.f14375b);
            if (b10 != 0) {
                if (b10 != 2) {
                    throw a0.d();
                }
                int d10 = this.f14374a.d() + this.f14374a.A();
                do {
                    list.add(Integer.valueOf(this.f14374a.n()));
                } while (this.f14374a.d() < d10);
                S(d10);
                return;
            }
            do {
                list.add(Integer.valueOf(this.f14374a.n()));
                if (this.f14374a.e()) {
                    return;
                } else {
                    z10 = this.f14374a.z();
                }
            } while (z10 == this.f14375b);
            this.f14377d = z10;
            return;
        }
        y yVar = (y) list;
        int b11 = p1.b(this.f14375b);
        if (b11 != 0) {
            if (b11 != 2) {
                throw a0.d();
            }
            int d11 = this.f14374a.d() + this.f14374a.A();
            do {
                yVar.A(this.f14374a.n());
            } while (this.f14374a.d() < d11);
            S(d11);
            return;
        }
        do {
            yVar.A(this.f14374a.n());
            if (this.f14374a.e()) {
                return;
            } else {
                z11 = this.f14374a.z();
            }
        } while (z11 == this.f14375b);
        this.f14377d = z11;
    }

    @Override // com.google.crypto.tink.shaded.protobuf.c1
    public int q() {
        T(0);
        return this.f14374a.n();
    }

    @Override // com.google.crypto.tink.shaded.protobuf.c1
    public void r(List list) {
        int z10;
        int z11;
        if (!(list instanceof y)) {
            int b10 = p1.b(this.f14375b);
            if (b10 == 2) {
                int A = this.f14374a.A();
                U(A);
                int d10 = this.f14374a.d() + A;
                do {
                    list.add(Integer.valueOf(this.f14374a.o()));
                } while (this.f14374a.d() < d10);
                return;
            }
            if (b10 != 5) {
                throw a0.d();
            }
            do {
                list.add(Integer.valueOf(this.f14374a.o()));
                if (this.f14374a.e()) {
                    return;
                } else {
                    z10 = this.f14374a.z();
                }
            } while (z10 == this.f14375b);
            this.f14377d = z10;
            return;
        }
        y yVar = (y) list;
        int b11 = p1.b(this.f14375b);
        if (b11 == 2) {
            int A2 = this.f14374a.A();
            U(A2);
            int d11 = this.f14374a.d() + A2;
            do {
                yVar.A(this.f14374a.o());
            } while (this.f14374a.d() < d11);
            return;
        }
        if (b11 != 5) {
            throw a0.d();
        }
        do {
            yVar.A(this.f14374a.o());
            if (this.f14374a.e()) {
                return;
            } else {
                z11 = this.f14374a.z();
            }
        } while (z11 == this.f14375b);
        this.f14377d = z11;
    }

    @Override // com.google.crypto.tink.shaded.protobuf.c1
    public double readDouble() {
        T(1);
        return this.f14374a.m();
    }

    @Override // com.google.crypto.tink.shaded.protobuf.c1
    public float readFloat() {
        T(5);
        return this.f14374a.q();
    }

    @Override // com.google.crypto.tink.shaded.protobuf.c1
    public int s() {
        T(0);
        return this.f14374a.v();
    }

    @Override // com.google.crypto.tink.shaded.protobuf.c1
    public long t() {
        T(0);
        return this.f14374a.w();
    }

    @Override // com.google.crypto.tink.shaded.protobuf.c1
    public void u(List list) {
        int z10;
        int z11;
        if (!(list instanceof f)) {
            int b10 = p1.b(this.f14375b);
            if (b10 != 0) {
                if (b10 != 2) {
                    throw a0.d();
                }
                int d10 = this.f14374a.d() + this.f14374a.A();
                do {
                    list.add(Boolean.valueOf(this.f14374a.k()));
                } while (this.f14374a.d() < d10);
                S(d10);
                return;
            }
            do {
                list.add(Boolean.valueOf(this.f14374a.k()));
                if (this.f14374a.e()) {
                    return;
                } else {
                    z10 = this.f14374a.z();
                }
            } while (z10 == this.f14375b);
            this.f14377d = z10;
            return;
        }
        f fVar = (f) list;
        int b11 = p1.b(this.f14375b);
        if (b11 != 0) {
            if (b11 != 2) {
                throw a0.d();
            }
            int d11 = this.f14374a.d() + this.f14374a.A();
            do {
                fVar.g(this.f14374a.k());
            } while (this.f14374a.d() < d11);
            S(d11);
            return;
        }
        do {
            fVar.g(this.f14374a.k());
            if (this.f14374a.e()) {
                return;
            } else {
                z11 = this.f14374a.z();
            }
        } while (z11 == this.f14375b);
        this.f14377d = z11;
    }

    @Override // com.google.crypto.tink.shaded.protobuf.c1
    public String v() {
        T(2);
        return this.f14374a.x();
    }

    @Override // com.google.crypto.tink.shaded.protobuf.c1
    public int w() {
        int i10 = this.f14377d;
        if (i10 != 0) {
            this.f14375b = i10;
            this.f14377d = 0;
        } else {
            this.f14375b = this.f14374a.z();
        }
        int i11 = this.f14375b;
        return (i11 == 0 || i11 == this.f14376c) ? Api.BaseClientBuilder.API_PRIORITY_OTHER : p1.a(i11);
    }

    @Override // com.google.crypto.tink.shaded.protobuf.c1
    public void x(List list) {
        R(list, false);
    }

    @Override // com.google.crypto.tink.shaded.protobuf.c1
    public void y(List list) {
        R(list, true);
    }

    @Override // com.google.crypto.tink.shaded.protobuf.c1
    public h z() {
        T(2);
        return this.f14374a.l();
    }
}
