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

import V.C0629x;
import androidx.datastore.preferences.protobuf.C1033w;
import com.google.protobuf.C1295a0;

/* JADX INFO: loaded from: classes3.dex */
public final class g0 {
    public static f0 a(Object obj) {
        AbstractC1274w abstractC1274w = (AbstractC1274w) obj;
        f0 f0Var = abstractC1274w.unknownFields;
        if (f0Var != f0.f13780f) {
            return f0Var;
        }
        f0 f0VarC = f0.c();
        abstractC1274w.unknownFields = f0VarC;
        return f0VarC;
    }

    public static boolean b(Object obj, C0629x c0629x) throws C1295a0, C, C1033w {
        int i6 = c0629x.f7177b;
        int i7 = i6 >>> 3;
        int i8 = i6 & 7;
        F1.L l = (F1.L) c0629x.f7180e;
        if (i8 == 0) {
            c0629x.K(0);
            ((f0) obj).d(i7 << 3, Long.valueOf(l.A()));
            return true;
        }
        if (i8 == 1) {
            c0629x.K(1);
            ((f0) obj).d((i7 << 3) | 1, Long.valueOf(l.x()));
            return true;
        }
        if (i8 == 2) {
            ((f0) obj).d((i7 << 3) | 2, c0629x.o());
            return true;
        }
        if (i8 != 3) {
            if (i8 == 4) {
                return false;
            }
            if (i8 != 5) {
                throw C.c();
            }
            c0629x.K(5);
            ((f0) obj).d((i7 << 3) | 5, Integer.valueOf(l.w()));
            return true;
        }
        f0 f0VarC = f0.c();
        int i9 = i7 << 3;
        int i10 = i9 | 4;
        while (c0629x.f() != Integer.MAX_VALUE && b(f0VarC, c0629x)) {
        }
        if (i10 != c0629x.f7177b) {
            throw new C("Protocol message end-group tag did not match expected tag.");
        }
        f0VarC.f13785e = false;
        ((f0) obj).d(i9 | 3, f0VarC);
        return true;
    }
}
