package o;

/* compiled from: r8-map-id-3b7cc9102578c509342fa2f0fabed2bfc72239cd258d579fc679bfcbc198b048 */
/* renamed from: o.Cr, reason: case insensitive filesystem */
/* loaded from: classes.dex */
public final class C0069Cr extends Ia0 {
    public static final Object h = new Object();
    public long c;
    public int d;
    public QQ e;
    public Object f;
    public int g;

    public C0069Cr(long j) {
        super(j);
        this.e = AbstractC1097eT.a;
        this.f = h;
    }

    @Override // o.Ia0
    public final void a(Ia0 ia0) {
        C0069Cr c0069Cr = (C0069Cr) ia0;
        this.e = c0069Cr.e;
        this.f = c0069Cr.f;
        this.g = c0069Cr.g;
    }

    @Override // o.Ia0
    public final Ia0 b(long j) {
        return new C0069Cr(j);
    }

    /* JADX WARN: Removed duplicated region for block: B:12:0x001c  */
    /*
        Code decompiled incorrectly, please refer to instructions dump.
        To view partially-correct add '--show-bad-code' argument
    */
    public final boolean c(o.C0095Dr r7, o.AbstractC2220q90 r8) {
        /*
            r6 = this;
            java.lang.Object r0 = o.AbstractC2884x90.c
            monitor-enter(r0)
            long r1 = r6.c     // Catch: java.lang.Throwable -> L1a
            long r3 = r8.g()     // Catch: java.lang.Throwable -> L1a
            int r1 = (r1 > r3 ? 1 : (r1 == r3 ? 0 : -1))
            r2 = 1
            r3 = 0
            if (r1 != 0) goto L1c
            int r1 = r6.d     // Catch: java.lang.Throwable -> L1a
            int r4 = r8.h()     // Catch: java.lang.Throwable -> L1a
            if (r1 == r4) goto L18
            goto L1c
        L18:
            r1 = r3
            goto L1d
        L1a:
            r7 = move-exception
            goto L47
        L1c:
            r1 = r2
        L1d:
            monitor-exit(r0)
            java.lang.Object r4 = r6.f
            java.lang.Object r5 = o.C0069Cr.h
            if (r4 == r5) goto L2f
            if (r1 == 0) goto L30
            int r4 = r6.g
            int r7 = r6.d(r7, r8)
            if (r4 != r7) goto L2f
            goto L30
        L2f:
            r2 = r3
        L30:
            if (r2 == 0) goto L46
            if (r1 == 0) goto L46
            monitor-enter(r0)
            long r3 = r8.g()     // Catch: java.lang.Throwable -> L43
            r6.c = r3     // Catch: java.lang.Throwable -> L43
            int r7 = r8.h()     // Catch: java.lang.Throwable -> L43
            r6.d = r7     // Catch: java.lang.Throwable -> L43
            monitor-exit(r0)
            return r2
        L43:
            r7 = move-exception
            monitor-exit(r0)
            throw r7
        L46:
            return r2
        L47:
            monitor-exit(r0)
            throw r7
        */
        throw new UnsupportedOperationException("Method not decompiled: o.C0069Cr.c(o.Dr, o.q90):boolean");
    }

    public final int d(C0095Dr c0095Dr, AbstractC2220q90 abstractC2220q90) throws Throwable {
        QQ qq;
        int iIdentityHashCode;
        long[] jArr;
        int i;
        long[] jArr2;
        int i2;
        int i3;
        Ia0 ia0G;
        synchronized (AbstractC2884x90.c) {
            qq = this.e;
        }
        int i4 = 7;
        if (qq.e == 0) {
            return 7;
        }
        C1479iR c1479iRD = AbstractC0752ap.D();
        Object[] objArr = c1479iRD.l;
        int i5 = c1479iRD.n;
        for (int i6 = 0; i6 < i5; i6++) {
            ((C0270Kk) objArr[i6]).b();
        }
        try {
            Object[] objArr2 = qq.b;
            int[] iArr = qq.c;
            long[] jArr3 = qq.a;
            int length = jArr3.length - 2;
            if (length >= 0) {
                iIdentityHashCode = 7;
                int i7 = 0;
                while (true) {
                    long j = jArr3[i7];
                    if ((((~j) << i4) & j & (-9187201950435737472L)) != -9187201950435737472L) {
                        int i8 = 8;
                        int i9 = 8 - ((~(i7 - length)) >>> 31);
                        int i10 = 0;
                        while (i10 < i9) {
                            if ((j & 255) < 128) {
                                int i11 = (i7 << 3) + i10;
                                Object obj = objArr2[i11];
                                i2 = i4;
                                int i12 = iArr[i11];
                                i3 = i8;
                                Ga0 ga0 = (Ga0) obj;
                                if (i12 != 1) {
                                    jArr2 = jArr3;
                                } else {
                                    if (ga0 instanceof C0095Dr) {
                                        try {
                                            C0095Dr c0095Dr2 = (C0095Dr) ga0;
                                            ia0G = c0095Dr2.g((C0069Cr) AbstractC2884x90.j(c0095Dr2.f88o, abstractC2220q90), abstractC2220q90, false, c0095Dr2.m);
                                        } catch (Throwable th) {
                                            th = th;
                                            Object[] objArr3 = c1479iRD.l;
                                            int i13 = c1479iRD.n;
                                            for (int i14 = 0; i14 < i13; i14++) {
                                                ((C0270Kk) objArr3[i14]).a();
                                            }
                                            throw th;
                                        }
                                    } else {
                                        ia0G = AbstractC2884x90.j(ga0.a(), abstractC2220q90);
                                    }
                                    jArr2 = jArr3;
                                    iIdentityHashCode = (((iIdentityHashCode * 31) + System.identityHashCode(ia0G)) * 31) + Long.hashCode(ia0G.a);
                                }
                            } else {
                                jArr2 = jArr3;
                                i2 = i4;
                                i3 = i8;
                            }
                            j >>= i3;
                            i10++;
                            i4 = i2;
                            jArr3 = jArr2;
                            i8 = i3;
                        }
                        jArr = jArr3;
                        i = i4;
                        if (i9 != i8) {
                            break;
                        }
                    } else {
                        jArr = jArr3;
                        i = i4;
                    }
                    if (i7 == length) {
                        i4 = iIdentityHashCode;
                        break;
                    }
                    i7++;
                    i4 = i;
                    jArr3 = jArr;
                }
            }
            iIdentityHashCode = i4;
            Object[] objArr4 = c1479iRD.l;
            int i15 = c1479iRD.n;
            for (int i16 = 0; i16 < i15; i16++) {
                ((C0270Kk) objArr4[i16]).a();
            }
            return iIdentityHashCode;
        } catch (Throwable th2) {
            th = th2;
        }
    }
}
