package o;

import com.google.android.gms.common.ConnectionResult;
import java.io.IOException;
import java.lang.reflect.Field;
import java.util.Arrays;
import java.util.List;
import sun.misc.Unsafe;

/* compiled from: r8-map-id-3b7cc9102578c509342fa2f0fabed2bfc72239cd258d579fc679bfcbc198b048 */
/* renamed from: o.nP, reason: case insensitive filesystem */
/* loaded from: classes.dex */
public final class C1951nP implements I40 {
    public static final int[] n = new int[0];

    /* renamed from: o, reason: collision with root package name */
    public static final Unsafe f649o = AbstractC0835bi0.i();
    public final int[] a;
    public final Object[] b;
    public final int c;
    public final int d;
    public final U e;
    public final boolean f;
    public final int[] g;
    public final int h;
    public final int i;
    public final C1288gS j;
    public final JL k;
    public final Qh0 l;
    public final CN m;

    public C1951nP(int[] iArr, Object[] objArr, int i, int i2, U u, int[] iArr2, int i3, int i4, C1288gS c1288gS, JL jl, Qh0 qh0, C2576tx c2576tx, CN cn) {
        this.a = iArr;
        this.b = objArr;
        this.c = i;
        this.d = i2;
        this.f = u instanceof DD;
        this.g = iArr2;
        this.h = i3;
        this.i = i4;
        this.j = c1288gS;
        this.k = jl;
        this.l = qh0;
        this.e = u;
        this.m = cn;
    }

    public static Field F(String str, Class cls) {
        try {
            return cls.getDeclaredField(str);
        } catch (NoSuchFieldException unused) {
            Field[] declaredFields = cls.getDeclaredFields();
            for (Field field : declaredFields) {
                if (str.equals(field.getName())) {
                    return field;
                }
            }
            throw new RuntimeException("Field " + str + " for " + cls.getName() + " not found. Known fields are " + Arrays.toString(declaredFields));
        }
    }

    public static int K(int i) {
        return (i & 267386880) >>> 20;
    }

    public static boolean p(Object obj) {
        if (obj == null) {
            return false;
        }
        if (obj instanceof DD) {
            return ((DD) obj).g();
        }
        return true;
    }

    /* JADX WARN: Removed duplicated region for block: B:120:0x025b  */
    /* JADX WARN: Removed duplicated region for block: B:121:0x025e  */
    /* JADX WARN: Removed duplicated region for block: B:124:0x0275  */
    /* JADX WARN: Removed duplicated region for block: B:125:0x0278  */
    /* JADX WARN: Removed duplicated region for block: B:162:0x0334  */
    /* JADX WARN: Removed duplicated region for block: B:177:0x037e  */
    /* JADX WARN: Removed duplicated region for block: B:183:0x0398  */
    /*
        Code decompiled incorrectly, please refer to instructions dump.
        To view partially-correct add '--show-bad-code' argument
    */
    public static o.C1951nP w(o.C1059e00 r34, o.C1288gS r35, o.JL r36, o.Qh0 r37, o.C2576tx r38, o.CN r39) {
        /*
            Method dump skipped, instructions count: 1019
            To view this dump add '--comments-level debug' option
        */
        throw new UnsupportedOperationException("Method not decompiled: o.C1951nP.w(o.e00, o.gS, o.JL, o.Qh0, o.tx, o.CN):o.nP");
    }

    public static long x(int i) {
        return i & 1048575;
    }

    public static int y(long j, Object obj) {
        return ((Integer) AbstractC0835bi0.c.h(j, obj)).intValue();
    }

    public static long z(long j, Object obj) {
        return ((Long) AbstractC0835bi0.c.h(j, obj)).longValue();
    }

    public final int A(int i) {
        if (i >= this.c && i <= this.d) {
            int[] iArr = this.a;
            int length = (iArr.length / 3) - 1;
            int i2 = 0;
            while (i2 <= length) {
                int i3 = (length + i2) >>> 1;
                int i4 = i3 * 3;
                int i5 = iArr[i4];
                if (i == i5) {
                    return i4;
                }
                if (i < i5) {
                    length = i3 - 1;
                } else {
                    i2 = i3 + 1;
                }
            }
        }
        return -1;
    }

    public final void B(Object obj, long j, C2642ui c2642ui, I40 i40, C2481sx c2481sx) throws DI {
        int iZ;
        this.k.getClass();
        InterfaceC2323rI interfaceC2323rIA = JL.a(j, obj);
        AbstractC2071oh abstractC2071oh = (AbstractC2071oh) c2642ui.e;
        int i = c2642ui.b;
        if ((i & 7) != 3) {
            throw EI.b();
        }
        do {
            DD ddH = i40.h();
            c2642ui.h(ddH, i40, c2481sx);
            i40.c(ddH);
            ((C2625uZ) interfaceC2323rIA).add(ddH);
            if (abstractC2071oh.c() || c2642ui.d != 0) {
                return;
            } else {
                iZ = abstractC2071oh.z();
            }
        } while (iZ == i);
        c2642ui.d = iZ;
    }

    public final void C(Object obj, int i, C2642ui c2642ui, I40 i40, C2481sx c2481sx) throws EI {
        int iZ;
        this.k.getClass();
        InterfaceC2323rI interfaceC2323rIA = JL.a(i & 1048575, obj);
        AbstractC2071oh abstractC2071oh = (AbstractC2071oh) c2642ui.e;
        int i2 = c2642ui.b;
        if ((i2 & 7) != 2) {
            throw EI.b();
        }
        do {
            DD ddH = i40.h();
            c2642ui.i(ddH, i40, c2481sx);
            i40.c(ddH);
            ((C2625uZ) interfaceC2323rIA).add(ddH);
            if (abstractC2071oh.c() || c2642ui.d != 0) {
                return;
            } else {
                iZ = abstractC2071oh.z();
            }
        } while (iZ == i2);
        c2642ui.d = iZ;
    }

    public final void D(int i, Object obj, C2642ui c2642ui) throws DI {
        if ((536870912 & i) != 0) {
            c2642ui.C(2);
            AbstractC0835bi0.o(i & 1048575, obj, ((AbstractC2071oh) c2642ui.e).y());
        } else if (!this.f) {
            AbstractC0835bi0.o(i & 1048575, obj, c2642ui.k());
        } else {
            c2642ui.C(2);
            AbstractC0835bi0.o(i & 1048575, obj, ((AbstractC2071oh) c2642ui.e).x());
        }
    }

    public final void E(int i, Object obj, C2642ui c2642ui) throws DI {
        int i2 = 536870912 & i;
        JL jl = this.k;
        if (i2 != 0) {
            jl.getClass();
            c2642ui.y(JL.a(i & 1048575, obj), true);
        } else {
            jl.getClass();
            c2642ui.y(JL.a(i & 1048575, obj), false);
        }
    }

    public final void G(int i, Object obj) {
        int i2 = this.a[i + 2];
        long j = 1048575 & i2;
        if (j == 1048575) {
            return;
        }
        AbstractC0835bi0.m((1 << (i2 >>> 20)) | AbstractC0835bi0.c.f(j, obj), j, obj);
    }

    public final void H(int i, int i2, Object obj) {
        AbstractC0835bi0.m(i, this.a[i2 + 2] & 1048575, obj);
    }

    public final void I(Object obj, int i, U u) {
        f649o.putObject(obj, L(i) & 1048575, u);
        G(i, obj);
    }

    public final void J(Object obj, int i, int i2, U u) {
        f649o.putObject(obj, L(i2) & 1048575, u);
        H(i, i2, obj);
    }

    public final int L(int i) {
        return this.a[i + 1];
    }

    /* JADX WARN: Can't fix incorrect switch cases order, some code will duplicate */
    /* JADX WARN: Removed duplicated region for block: B:118:0x033b  */
    /* JADX WARN: Removed duplicated region for block: B:123:0x034a  */
    /* JADX WARN: Removed duplicated region for block: B:124:0x035c  */
    /* JADX WARN: Removed duplicated region for block: B:125:0x036d  */
    /* JADX WARN: Removed duplicated region for block: B:127:0x0376  */
    /* JADX WARN: Removed duplicated region for block: B:129:0x037f  */
    /* JADX WARN: Removed duplicated region for block: B:130:0x038c  */
    /* JADX WARN: Removed duplicated region for block: B:131:0x0398  */
    /* JADX WARN: Removed duplicated region for block: B:136:0x03b1  */
    /* JADX WARN: Removed duplicated region for block: B:137:0x03bf  */
    /* JADX WARN: Removed duplicated region for block: B:138:0x03c9  */
    /* JADX WARN: Removed duplicated region for block: B:142:0x03df  */
    /* JADX WARN: Removed duplicated region for block: B:143:0x03e7  */
    /* JADX WARN: Removed duplicated region for block: B:144:0x03ed  */
    /* JADX WARN: Removed duplicated region for block: B:145:0x03f4  */
    /* JADX WARN: Removed duplicated region for block: B:146:0x0400  */
    /* JADX WARN: Removed duplicated region for block: B:147:0x040b  */
    /* JADX WARN: Removed duplicated region for block: B:148:0x0416  */
    /* JADX WARN: Removed duplicated region for block: B:149:0x041d  */
    /* JADX WARN: Removed duplicated region for block: B:279:0x0344 A[SYNTHETIC] */
    /*
        Code decompiled incorrectly, please refer to instructions dump.
        To view partially-correct add '--show-bad-code' argument
    */
    public final void M(java.lang.Object r34, o.OD r35) throws java.io.IOException {
        /*
            Method dump skipped, instructions count: 2508
            To view this dump add '--comments-level debug' option
        */
        throw new UnsupportedOperationException("Method not decompiled: o.C1951nP.M(java.lang.Object, o.OD):void");
    }

    /* JADX WARN: Can't fix incorrect switch cases order, some code will duplicate */
    /* JADX WARN: Removed duplicated region for block: B:11:0x0025  */
    @Override // o.I40
    /*
        Code decompiled incorrectly, please refer to instructions dump.
        To view partially-correct add '--show-bad-code' argument
    */
    public final void a(java.lang.Object r11, java.lang.Object r12) {
        /*
            Method dump skipped, instructions count: 670
            To view this dump add '--comments-level debug' option
        */
        throw new UnsupportedOperationException("Method not decompiled: o.C1951nP.a(java.lang.Object, java.lang.Object):void");
    }

    /* JADX WARN: Removed duplicated region for block: B:13:0x003d  */
    @Override // o.I40
    /*
        Code decompiled incorrectly, please refer to instructions dump.
        To view partially-correct add '--show-bad-code' argument
    */
    public final boolean b(o.DD r12, o.DD r13) {
        /*
            Method dump skipped, instructions count: 660
            To view this dump add '--comments-level debug' option
        */
        throw new UnsupportedOperationException("Method not decompiled: o.C1951nP.b(o.DD, o.DD):boolean");
    }

    /* JADX WARN: Removed duplicated region for block: B:27:0x0080  */
    @Override // o.I40
    /*
        Code decompiled incorrectly, please refer to instructions dump.
        To view partially-correct add '--show-bad-code' argument
    */
    public final void c(java.lang.Object r10) {
        /*
            r9 = this;
            boolean r0 = p(r10)
            if (r0 != 0) goto L8
            goto La5
        L8:
            boolean r0 = r10 instanceof o.DD
            r1 = 0
            if (r0 == 0) goto L1b
            r0 = r10
            o.DD r0 = (o.DD) r0
            r2 = 2147483647(0x7fffffff, float:NaN)
            r0.k(r2)
            r0.memoizedHashCode = r1
            r0.h()
        L1b:
            int[] r0 = r9.a
            int r2 = r0.length
            r3 = r1
        L1f:
            if (r3 >= r2) goto L96
            int r4 = r9.L(r3)
            r5 = 1048575(0xfffff, float:1.469367E-39)
            r5 = r5 & r4
            long r5 = (long) r5
            int r4 = K(r4)
            r7 = 9
            if (r4 == r7) goto L80
            r7 = 60
            if (r4 == r7) goto L6a
            r7 = 68
            if (r4 == r7) goto L6a
            switch(r4) {
                case 17: goto L80;
                case 18: goto L54;
                case 19: goto L54;
                case 20: goto L54;
                case 21: goto L54;
                case 22: goto L54;
                case 23: goto L54;
                case 24: goto L54;
                case 25: goto L54;
                case 26: goto L54;
                case 27: goto L54;
                case 28: goto L54;
                case 29: goto L54;
                case 30: goto L54;
                case 31: goto L54;
                case 32: goto L54;
                case 33: goto L54;
                case 34: goto L54;
                case 35: goto L54;
                case 36: goto L54;
                case 37: goto L54;
                case 38: goto L54;
                case 39: goto L54;
                case 40: goto L54;
                case 41: goto L54;
                case 42: goto L54;
                case 43: goto L54;
                case 44: goto L54;
                case 45: goto L54;
                case 46: goto L54;
                case 47: goto L54;
                case 48: goto L54;
                case 49: goto L54;
                case 50: goto L3e;
                default: goto L3d;
            }
        L3d:
            goto L93
        L3e:
            sun.misc.Unsafe r4 = o.C1951nP.f649o
            java.lang.Object r7 = r4.getObject(r10, r5)
            if (r7 == 0) goto L93
            o.CN r8 = r9.m
            r8.getClass()
            r8 = r7
            o.BN r8 = (o.BN) r8
            r8.l = r1
            r4.putObject(r10, r5, r7)
            goto L93
        L54:
            o.JL r4 = r9.k
            r4.getClass()
            o.ai0 r4 = o.AbstractC0835bi0.c
            java.lang.Object r4 = r4.h(r5, r10)
            o.rI r4 = (o.InterfaceC2323rI) r4
            o.a0 r4 = (o.AbstractC0676a0) r4
            boolean r5 = r4.l
            if (r5 == 0) goto L93
            r4.l = r1
            goto L93
        L6a:
            r4 = r0[r3]
            boolean r4 = r9.q(r4, r3, r10)
            if (r4 == 0) goto L93
            o.I40 r4 = r9.m(r3)
            sun.misc.Unsafe r7 = o.C1951nP.f649o
            java.lang.Object r5 = r7.getObject(r10, r5)
            r4.c(r5)
            goto L93
        L80:
            boolean r4 = r9.n(r3, r10)
            if (r4 == 0) goto L93
            o.I40 r4 = r9.m(r3)
            sun.misc.Unsafe r7 = o.C1951nP.f649o
            java.lang.Object r5 = r7.getObject(r10, r5)
            r4.c(r5)
        L93:
            int r3 = r3 + 3
            goto L1f
        L96:
            o.Qh0 r0 = r9.l
            r0.getClass()
            o.DD r10 = (o.DD) r10
            o.Ph0 r10 = r10.unknownFields
            boolean r0 = r10.e
            if (r0 == 0) goto La5
            r10.e = r1
        La5:
            return
        */
        throw new UnsupportedOperationException("Method not decompiled: o.C1951nP.c(java.lang.Object):void");
    }

    @Override // o.I40
    public final boolean d(Object obj) {
        int i;
        int i2;
        int i3;
        int i4 = 1048575;
        int i5 = 0;
        int i6 = 0;
        while (i6 < this.h) {
            int i7 = this.g[i6];
            int[] iArr = this.a;
            int i8 = iArr[i7];
            int iL = L(i7);
            int i9 = iArr[i7 + 2];
            int i10 = i9 & 1048575;
            int i11 = 1 << (i9 >>> 20);
            if (i10 != i4) {
                if (i10 != 1048575) {
                    i5 = f649o.getInt(obj, i10);
                }
                i2 = i7;
                i3 = i5;
                i = i10;
            } else {
                int i12 = i5;
                i = i4;
                i2 = i7;
                i3 = i12;
            }
            if ((268435456 & iL) == 0 || o(obj, i2, i, i3, i11)) {
                int iK = K(iL);
                if (iK == 9 || iK == 17) {
                    if (o(obj, i2, i, i3, i11)) {
                        if (!m(i2).d(AbstractC0835bi0.c.h(iL & 1048575, obj))) {
                        }
                    } else {
                        continue;
                    }
                    i6++;
                    i4 = i;
                    i5 = i3;
                } else {
                    if (iK != 27) {
                        if (iK == 60 || iK == 68) {
                            if (q(i8, i2, obj)) {
                                if (!m(i2).d(AbstractC0835bi0.c.h(iL & 1048575, obj))) {
                                }
                            } else {
                                continue;
                            }
                            i6++;
                            i4 = i;
                            i5 = i3;
                        } else if (iK != 49) {
                            if (iK != 50) {
                                continue;
                            } else {
                                Object objH = AbstractC0835bi0.c.h(iL & 1048575, obj);
                                this.m.getClass();
                                BN bn = (BN) objH;
                                if (bn.isEmpty()) {
                                    continue;
                                } else {
                                    if (((EnumC1129em0) ((AN) this.b[(i2 / 3) * 2]).a.n).l != EnumC1225fm0.t) {
                                        continue;
                                    } else {
                                        I40 i40A = null;
                                        for (Object obj2 : bn.values()) {
                                            if (i40A == null) {
                                                i40A = C2530tZ.c.a(obj2.getClass());
                                            }
                                            if (!i40A.d(obj2)) {
                                            }
                                        }
                                    }
                                }
                            }
                            i6++;
                            i4 = i;
                            i5 = i3;
                        }
                    }
                    List list = (List) AbstractC0835bi0.c.h(iL & 1048575, obj);
                    if (list.isEmpty()) {
                        continue;
                    } else {
                        I40 i40M = m(i2);
                        for (int i13 = 0; i13 < list.size(); i13++) {
                            if (i40M.d(list.get(i13))) {
                            }
                        }
                    }
                    i6++;
                    i4 = i;
                    i5 = i3;
                }
            }
            return false;
        }
        return true;
    }

    @Override // o.I40
    public final void e(Object obj, OD od) throws IOException {
        od.getClass();
        M(obj, od);
    }

    /*  JADX ERROR: Type inference failed
        jadx.core.utils.exceptions.JadxOverflowException: Type inference error: updates count limit reached
        	at jadx.core.utils.ErrorsCounter.addError(ErrorsCounter.java:59)
        	at jadx.core.utils.ErrorsCounter.error(ErrorsCounter.java:31)
        	at jadx.core.dex.attributes.nodes.NotificationAttrNode.addError(NotificationAttrNode.java:19)
        	at jadx.core.dex.visitors.typeinference.TypeInferenceVisitor.visit(TypeInferenceVisitor.java:77)
        */
    @Override // o.I40
    public final void f(java.lang.Object r19, o.C2642ui r20, o.C2481sx r21) {
        /*
            Method dump skipped, instructions count: 1940
            To view this dump add '--comments-level debug' option
        */
        throw new UnsupportedOperationException("Method not decompiled: o.C1951nP.f(java.lang.Object, o.ui, o.sx):void");
    }

    /* JADX WARN: Removed duplicated region for block: B:128:0x0321  */
    /* JADX WARN: Removed duplicated region for block: B:133:0x0330  */
    /* JADX WARN: Removed duplicated region for block: B:134:0x0341  */
    /* JADX WARN: Removed duplicated region for block: B:135:0x0352  */
    /* JADX WARN: Removed duplicated region for block: B:137:0x035b  */
    /* JADX WARN: Removed duplicated region for block: B:139:0x0364  */
    /* JADX WARN: Removed duplicated region for block: B:140:0x0371  */
    /* JADX WARN: Removed duplicated region for block: B:141:0x037d  */
    /* JADX WARN: Removed duplicated region for block: B:146:0x0396  */
    /* JADX WARN: Removed duplicated region for block: B:147:0x03a4  */
    /* JADX WARN: Removed duplicated region for block: B:148:0x03ae  */
    /* JADX WARN: Removed duplicated region for block: B:152:0x03c4  */
    /* JADX WARN: Removed duplicated region for block: B:153:0x03cc  */
    /* JADX WARN: Removed duplicated region for block: B:154:0x03d2  */
    /* JADX WARN: Removed duplicated region for block: B:155:0x03d9  */
    /* JADX WARN: Removed duplicated region for block: B:156:0x03e5  */
    /* JADX WARN: Removed duplicated region for block: B:157:0x03f0  */
    /* JADX WARN: Removed duplicated region for block: B:158:0x03fb  */
    /* JADX WARN: Removed duplicated region for block: B:159:0x0402  */
    /* JADX WARN: Removed duplicated region for block: B:215:0x05f1 A[PHI: r23 r24
      0x05f1: PHI (r23v19 int) = 
      (r23v2 int)
      (r23v3 int)
      (r23v4 int)
      (r23v8 int)
      (r23v10 int)
      (r23v11 int)
      (r23v12 int)
      (r23v16 int)
      (r23v20 int)
     binds: [B:274:0x07a8, B:270:0x078a, B:266:0x076c, B:249:0x06ef, B:235:0x0686, B:231:0x066a, B:227:0x064e, B:220:0x0610, B:214:0x05ef] A[DONT_GENERATE, DONT_INLINE]
      0x05f1: PHI (r24v18 int) = 
      (r24v2 int)
      (r24v3 int)
      (r24v4 int)
      (r24v8 int)
      (r24v10 int)
      (r24v11 int)
      (r24v12 int)
      (r24v15 int)
      (r24v19 int)
     binds: [B:274:0x07a8, B:270:0x078a, B:266:0x076c, B:249:0x06ef, B:235:0x0686, B:231:0x066a, B:227:0x064e, B:220:0x0610, B:214:0x05ef] A[DONT_GENERATE, DONT_INLINE]] */
    /* JADX WARN: Removed duplicated region for block: B:350:0x032a A[SYNTHETIC] */
    @Override // o.I40
    /*
        Code decompiled incorrectly, please refer to instructions dump.
        To view partially-correct add '--show-bad-code' argument
    */
    public final int g(o.DD r30) {
        /*
            Method dump skipped, instructions count: 2626
            To view this dump add '--comments-level debug' option
        */
        throw new UnsupportedOperationException("Method not decompiled: o.C1951nP.g(o.DD):int");
    }

    @Override // o.I40
    public final DD h() {
        this.j.getClass();
        return ((DD) this.e).i();
    }

    /* JADX WARN: Removed duplicated region for block: B:42:0x00e1 A[PHI: r3
      0x00e1: PHI (r3v32 int) = (r3v10 int), (r3v33 int) binds: [B:83:0x0216, B:41:0x00df] A[DONT_GENERATE, DONT_INLINE]] */
    @Override // o.I40
    /*
        Code decompiled incorrectly, please refer to instructions dump.
        To view partially-correct add '--show-bad-code' argument
    */
    public final int i(o.DD r12) {
        /*
            Method dump skipped, instructions count: 794
            To view this dump add '--comments-level debug' option
        */
        throw new UnsupportedOperationException("Method not decompiled: o.C1951nP.i(o.DD):int");
    }

    public final boolean j(DD dd, DD dd2, int i) {
        return n(i, dd) == n(i, dd2);
    }

    public final void k(int i, Object obj, Object obj2) {
        int i2 = this.a[i];
        if (AbstractC0835bi0.c.h(L(i) & 1048575, obj) == null) {
            return;
        }
        l(i);
    }

    public final void l(int i) {
        if (this.b[((i / 3) * 2) + 1] != null) {
            throw new ClassCastException();
        }
    }

    public final I40 m(int i) {
        int i2 = (i / 3) * 2;
        Object[] objArr = this.b;
        I40 i40 = (I40) objArr[i2];
        if (i40 != null) {
            return i40;
        }
        I40 i40A = C2530tZ.c.a((Class) objArr[i2 + 1]);
        objArr[i2] = i40A;
        return i40A;
    }

    public final boolean n(int i, Object obj) {
        int i2 = this.a[i + 2];
        long j = i2 & 1048575;
        if (j == 1048575) {
            int iL = L(i);
            long j2 = iL & 1048575;
            switch (K(iL)) {
                case 0:
                    if (Double.doubleToRawLongBits(AbstractC0835bi0.c.d(j2, obj)) == 0) {
                        return false;
                    }
                    break;
                case 1:
                    if (Float.floatToRawIntBits(AbstractC0835bi0.c.e(j2, obj)) == 0) {
                        return false;
                    }
                    break;
                case 2:
                    if (AbstractC0835bi0.c.g(j2, obj) == 0) {
                        return false;
                    }
                    break;
                case 3:
                    if (AbstractC0835bi0.c.g(j2, obj) == 0) {
                        return false;
                    }
                    break;
                case 4:
                    if (AbstractC0835bi0.c.f(j2, obj) == 0) {
                        return false;
                    }
                    break;
                case 5:
                    if (AbstractC0835bi0.c.g(j2, obj) == 0) {
                        return false;
                    }
                    break;
                case 6:
                    if (AbstractC0835bi0.c.f(j2, obj) == 0) {
                        return false;
                    }
                    break;
                case 7:
                    return AbstractC0835bi0.c.c(j2, obj);
                case 8:
                    Object objH = AbstractC0835bi0.c.h(j2, obj);
                    if (objH instanceof String) {
                        return !((String) objH).isEmpty();
                    }
                    if (objH instanceof AbstractC0161Gf) {
                        return !AbstractC0161Gf.m.equals(objH);
                    }
                    throw new IllegalArgumentException();
                case ConnectionResult.SERVICE_INVALID /* 9 */:
                    if (AbstractC0835bi0.c.h(j2, obj) == null) {
                        return false;
                    }
                    break;
                case 10:
                    return !AbstractC0161Gf.m.equals(AbstractC0835bi0.c.h(j2, obj));
                case ConnectionResult.LICENSE_CHECK_FAILED /* 11 */:
                    if (AbstractC0835bi0.c.f(j2, obj) == 0) {
                        return false;
                    }
                    break;
                case 12:
                    if (AbstractC0835bi0.c.f(j2, obj) == 0) {
                        return false;
                    }
                    break;
                case 13:
                    if (AbstractC0835bi0.c.f(j2, obj) == 0) {
                        return false;
                    }
                    break;
                case 14:
                    if (AbstractC0835bi0.c.g(j2, obj) == 0) {
                        return false;
                    }
                    break;
                case 15:
                    if (AbstractC0835bi0.c.f(j2, obj) == 0) {
                        return false;
                    }
                    break;
                case 16:
                    if (AbstractC0835bi0.c.g(j2, obj) == 0) {
                        return false;
                    }
                    break;
                case 17:
                    if (AbstractC0835bi0.c.h(j2, obj) == null) {
                        return false;
                    }
                    break;
                default:
                    throw new IllegalArgumentException();
            }
        } else if (((1 << (i2 >>> 20)) & AbstractC0835bi0.c.f(j, obj)) == 0) {
            return false;
        }
        return true;
    }

    public final boolean o(Object obj, int i, int i2, int i3, int i4) {
        return i2 == 1048575 ? n(i, obj) : (i3 & i4) != 0;
    }

    public final boolean q(int i, int i2, Object obj) {
        return AbstractC0835bi0.c.f((long) (this.a[i2 + 2] & 1048575), obj) == i;
    }

    /* JADX WARN: Code restructure failed: missing block: B:32:0x009f, code lost:
    
        r10.put(r3, r4);
     */
    /* JADX WARN: Code restructure failed: missing block: B:33:0x00a2, code lost:
    
        r0.h(r1);
     */
    /* JADX WARN: Code restructure failed: missing block: B:34:0x00a5, code lost:
    
        return;
     */
    /*
        Code decompiled incorrectly, please refer to instructions dump.
        To view partially-correct add '--show-bad-code' argument
    */
    public final void r(java.lang.Object r9, int r10, java.lang.Object r11, o.C2481sx r12, o.C2642ui r13) throws o.DI {
        /*
            r8 = this;
            int r10 = r8.L(r10)
            r0 = 1048575(0xfffff, float:1.469367E-39)
            r10 = r10 & r0
            long r0 = (long) r10
            o.ai0 r10 = o.AbstractC0835bi0.c
            java.lang.Object r10 = r10.h(r0, r9)
            o.CN r2 = r8.m
            if (r10 != 0) goto L20
            r2.getClass()
            o.BN r10 = o.BN.m
            o.BN r10 = r10.b()
            o.AbstractC0835bi0.o(r0, r9, r10)
            goto L37
        L20:
            r2.getClass()
            r3 = r10
            o.BN r3 = (o.BN) r3
            boolean r3 = r3.l
            if (r3 != 0) goto L37
            o.BN r3 = o.BN.m
            o.BN r3 = r3.b()
            o.CN.a(r3, r10)
            o.AbstractC0835bi0.o(r0, r9, r3)
            r10 = r3
        L37:
            r2.getClass()
            o.BN r10 = (o.BN) r10
            o.AN r11 = (o.AN) r11
            o.zm0 r9 = r11.a
            r11 = 2
            r13.C(r11)
            java.lang.Object r0 = r13.e
            o.oh r0 = (o.AbstractC2071oh) r0
            int r1 = r0.A()
            int r1 = r0.j(r1)
            java.lang.Object r2 = r9.f831o
            java.lang.String r3 = ""
            r4 = r2
        L55:
            int r5 = r13.e()     // Catch: java.lang.Throwable -> L79
            r6 = 2147483647(0x7fffffff, float:NaN)
            if (r5 == r6) goto L9f
            boolean r6 = r0.c()     // Catch: java.lang.Throwable -> L79
            if (r6 == 0) goto L65
            goto L9f
        L65:
            r6 = 1
            java.lang.String r7 = "Unable to parse map entry."
            if (r5 == r6) goto L88
            if (r5 == r11) goto L7b
            boolean r5 = r13.D()     // Catch: java.lang.Throwable -> L79 o.DI -> L92
            if (r5 == 0) goto L73
            goto L55
        L73:
            o.EI r5 = new o.EI     // Catch: java.lang.Throwable -> L79 o.DI -> L92
            r5.<init>(r7)     // Catch: java.lang.Throwable -> L79 o.DI -> L92
            throw r5     // Catch: java.lang.Throwable -> L79 o.DI -> L92
        L79:
            r9 = move-exception
            goto La6
        L7b:
            java.lang.Object r5 = r9.n     // Catch: java.lang.Throwable -> L79 o.DI -> L92
            o.em0 r5 = (o.EnumC1129em0) r5     // Catch: java.lang.Throwable -> L79 o.DI -> L92
            java.lang.Class r6 = r2.getClass()     // Catch: java.lang.Throwable -> L79 o.DI -> L92
            java.lang.Object r4 = r13.o(r5, r6, r12)     // Catch: java.lang.Throwable -> L79 o.DI -> L92
            goto L55
        L88:
            java.lang.Object r5 = r9.m     // Catch: java.lang.Throwable -> L79 o.DI -> L92
            o.em0 r5 = (o.EnumC1129em0) r5     // Catch: java.lang.Throwable -> L79 o.DI -> L92
            r6 = 0
            java.lang.Object r3 = r13.o(r5, r6, r6)     // Catch: java.lang.Throwable -> L79 o.DI -> L92
            goto L55
        L92:
            boolean r5 = r13.D()     // Catch: java.lang.Throwable -> L79
            if (r5 == 0) goto L99
            goto L55
        L99:
            o.EI r9 = new o.EI     // Catch: java.lang.Throwable -> L79
            r9.<init>(r7)     // Catch: java.lang.Throwable -> L79
            throw r9     // Catch: java.lang.Throwable -> L79
        L9f:
            r10.put(r3, r4)     // Catch: java.lang.Throwable -> L79
            r0.h(r1)
            return
        La6:
            r0.h(r1)
            throw r9
        */
        throw new UnsupportedOperationException("Method not decompiled: o.C1951nP.r(java.lang.Object, int, java.lang.Object, o.sx, o.ui):void");
    }

    public final void s(int i, Object obj, Object obj2) {
        if (n(i, obj2)) {
            long jL = L(i) & 1048575;
            Unsafe unsafe = f649o;
            Object object = unsafe.getObject(obj2, jL);
            if (object == null) {
                throw new IllegalStateException("Source subfield " + this.a[i] + " is present but null: " + obj2);
            }
            I40 i40M = m(i);
            if (!n(i, obj)) {
                if (p(object)) {
                    DD ddH = i40M.h();
                    i40M.a(ddH, object);
                    unsafe.putObject(obj, jL, ddH);
                } else {
                    unsafe.putObject(obj, jL, object);
                }
                G(i, obj);
                return;
            }
            Object object2 = unsafe.getObject(obj, jL);
            if (!p(object2)) {
                DD ddH2 = i40M.h();
                i40M.a(ddH2, object2);
                unsafe.putObject(obj, jL, ddH2);
                object2 = ddH2;
            }
            i40M.a(object2, object);
        }
    }

    public final void t(int i, Object obj, Object obj2) {
        int[] iArr = this.a;
        int i2 = iArr[i];
        if (q(i2, i, obj2)) {
            long jL = L(i) & 1048575;
            Unsafe unsafe = f649o;
            Object object = unsafe.getObject(obj2, jL);
            if (object == null) {
                throw new IllegalStateException("Source subfield " + iArr[i] + " is present but null: " + obj2);
            }
            I40 i40M = m(i);
            if (!q(i2, i, obj)) {
                if (p(object)) {
                    DD ddH = i40M.h();
                    i40M.a(ddH, object);
                    unsafe.putObject(obj, jL, ddH);
                } else {
                    unsafe.putObject(obj, jL, object);
                }
                H(i2, i, obj);
                return;
            }
            Object object2 = unsafe.getObject(obj, jL);
            if (!p(object2)) {
                DD ddH2 = i40M.h();
                i40M.a(ddH2, object2);
                unsafe.putObject(obj, jL, ddH2);
                object2 = ddH2;
            }
            i40M.a(object2, object);
        }
    }

    public final Object u(int i, Object obj) {
        I40 i40M = m(i);
        long jL = L(i) & 1048575;
        if (!n(i, obj)) {
            return i40M.h();
        }
        Object object = f649o.getObject(obj, jL);
        if (p(object)) {
            return object;
        }
        DD ddH = i40M.h();
        if (object != null) {
            i40M.a(ddH, object);
        }
        return ddH;
    }

    public final Object v(int i, int i2, Object obj) {
        I40 i40M = m(i2);
        if (!q(i, i2, obj)) {
            return i40M.h();
        }
        Object object = f649o.getObject(obj, L(i2) & 1048575);
        if (p(object)) {
            return object;
        }
        DD ddH = i40M.h();
        if (object != null) {
            i40M.a(ddH, object);
        }
        return ddH;
    }
}
