package androidx.datastore.preferences.protobuf;

import V.C0629x;
import com.google.protobuf.C1295a0;

/* JADX INFO: loaded from: classes.dex */
public final class i0 {
    public static h0 a(Object obj) {
        AbstractC1030t abstractC1030t = (AbstractC1030t) obj;
        h0 h0Var = abstractC1030t.unknownFields;
        if (h0Var != h0.f11393f) {
            return h0Var;
        }
        h0 h0Var2 = new h0(0, new int[8], new Object[8], true);
        abstractC1030t.unknownFields = h0Var2;
        return h0Var2;
    }

    public static boolean b(Object obj, C0629x c0629x) throws com.google.crypto.tink.shaded.protobuf.B, C1295a0, C1034x {
        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);
            ((h0) obj).c(i7 << 3, Long.valueOf(l.A()));
            return true;
        }
        if (i8 == 1) {
            c0629x.K(1);
            ((h0) obj).c((i7 << 3) | 1, Long.valueOf(l.x()));
            return true;
        }
        if (i8 == 2) {
            ((h0) obj).c((i7 << 3) | 2, c0629x.n());
            return true;
        }
        if (i8 != 3) {
            if (i8 == 4) {
                return false;
            }
            if (i8 != 5) {
                throw C1034x.b();
            }
            c0629x.K(5);
            ((h0) obj).c((i7 << 3) | 5, Integer.valueOf(l.w()));
            return true;
        }
        h0 h0Var = new h0(0, new int[8], new Object[8], true);
        int i9 = i7 << 3;
        int i10 = i9 | 4;
        while (c0629x.f() != Integer.MAX_VALUE && b(h0Var, c0629x)) {
        }
        if (i10 != c0629x.f7177b) {
            throw new C1034x("Protocol message end-group tag did not match expected tag.");
        }
        h0Var.f11398e = false;
        ((h0) obj).c(i9 | 3, h0Var);
        return true;
    }
}
