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

/* JADX INFO: loaded from: classes2.dex */
public abstract class e1 {
    public abstract f1 a(Object obj);

    public abstract void b(Object obj);

    public final boolean c(int i10, z0 z0Var, Object obj) throws InvalidProtocolBufferException {
        m mVar = (m) z0Var;
        int i11 = mVar.f23940b;
        int i12 = i11 >>> 3;
        int i13 = i11 & 7;
        if (i13 == 0) {
            mVar.v(0);
            ((f1) obj).d(i12 << 3, Long.valueOf(mVar.f23939a.q()));
            return true;
        }
        if (i13 == 1) {
            mVar.v(1);
            ((f1) obj).d((i12 << 3) | 1, Long.valueOf(mVar.f23939a.n()));
            return true;
        }
        if (i13 == 2) {
            ((f1) obj).d((i12 << 3) | 2, mVar.e());
            return true;
        }
        if (i13 != 3) {
            if (i13 == 4) {
                if (i10 != 0) {
                    return false;
                }
                throw new InvalidProtocolBufferException("Protocol message end-group tag did not match expected tag.");
            }
            if (i13 != 5) {
                throw InvalidProtocolBufferException.d();
            }
            mVar.v(5);
            ((f1) obj).d(5 | (i12 << 3), Integer.valueOf(mVar.f23939a.m()));
            return true;
        }
        f1 f1VarC = f1.c();
        int i14 = i12 << 3;
        int i15 = i14 | 4;
        int i16 = i10 + 1;
        if (i16 >= 100) {
            throw new InvalidProtocolBufferException("Protocol message had too many levels of nesting.  May be malicious.  Use setRecursionLimit() to increase the recursion depth limit.");
        }
        while (mVar.a() != Integer.MAX_VALUE && c(i16, mVar, f1VarC)) {
        }
        if (i15 != mVar.f23940b) {
            throw new InvalidProtocolBufferException("Protocol message end-group tag did not match expected tag.");
        }
        if (f1VarC.f23902e) {
            f1VarC.f23902e = false;
        }
        ((f1) obj).d(i14 | 3, f1VarC);
        return true;
    }
}
