package o;

import java.util.concurrent.atomic.AtomicReferenceArray;

/* compiled from: r8-map-id-3b7cc9102578c509342fa2f0fabed2bfc72239cd258d579fc679bfcbc198b048 */
/* renamed from: o.mh, reason: case insensitive filesystem */
/* loaded from: classes.dex */
public final class C1881mh extends AbstractC2591u50 {
    public final C1210ff e;
    public final /* synthetic */ AtomicReferenceArray f;

    public C1881mh(long j, C1881mh c1881mh, C1210ff c1210ff, int i) {
        super(j, c1881mh, i);
        this.e = c1210ff;
        this.f = new AtomicReferenceArray(AbstractC1402hf.b * 2);
    }

    @Override // o.AbstractC2591u50
    public final int g() {
        return AbstractC1402hf.b;
    }

    /* JADX WARN: Code restructure failed: missing block: B:34:0x0059, code lost:
    
        n(r5, null);
     */
    /* JADX WARN: Code restructure failed: missing block: B:35:0x005c, code lost:
    
        if (r0 == false) goto L60;
     */
    /* JADX WARN: Code restructure failed: missing block: B:36:0x005e, code lost:
    
        r2.getClass();
     */
    /* JADX WARN: Code restructure failed: missing block: B:37:0x0061, code lost:
    
        return;
     */
    /* JADX WARN: Code restructure failed: missing block: B:60:?, code lost:
    
        return;
     */
    @Override // o.AbstractC2591u50
    /*
        Code decompiled incorrectly, please refer to instructions dump.
        To view partially-correct add '--show-bad-code' argument
    */
    public final void h(int r5, o.InterfaceC2747vn r6) {
        /*
            r4 = this;
            int r6 = o.AbstractC1402hf.b
            if (r5 < r6) goto L6
            r0 = 1
            goto L7
        L6:
            r0 = 0
        L7:
            if (r0 == 0) goto La
            int r5 = r5 - r6
        La:
            int r6 = r5 * 2
            java.util.concurrent.atomic.AtomicReferenceArray r1 = r4.f
            r1.get(r6)
        L11:
            java.lang.Object r6 = r4.l(r5)
            boolean r1 = r6 instanceof o.Ik0
            o.ff r2 = r4.e
            r3 = 0
            if (r1 != 0) goto L62
            boolean r1 = r6 instanceof o.Jk0
            if (r1 == 0) goto L21
            goto L62
        L21:
            o.xq r1 = o.AbstractC1402hf.j
            if (r6 == r1) goto L59
            o.xq r1 = o.AbstractC1402hf.k
            if (r6 != r1) goto L2a
            goto L59
        L2a:
            o.xq r1 = o.AbstractC1402hf.g
            if (r6 == r1) goto L11
            o.xq r1 = o.AbstractC1402hf.f
            if (r6 != r1) goto L33
            goto L11
        L33:
            o.xq r5 = o.AbstractC1402hf.i
            if (r6 == r5) goto L7c
            o.xq r5 = o.AbstractC1402hf.d
            if (r6 != r5) goto L3c
            goto L7c
        L3c:
            o.xq r5 = o.AbstractC1402hf.l
            if (r6 != r5) goto L41
            goto L7c
        L41:
            java.lang.IllegalStateException r5 = new java.lang.IllegalStateException
            java.lang.StringBuilder r0 = new java.lang.StringBuilder
            java.lang.String r1 = "unexpected state: "
            r0.<init>(r1)
            r0.append(r6)
            java.lang.String r6 = r0.toString()
            java.lang.String r6 = r6.toString()
            r5.<init>(r6)
            throw r5
        L59:
            r4.n(r5, r3)
            if (r0 == 0) goto L7c
            r2.getClass()
            return
        L62:
            if (r0 == 0) goto L67
            o.xq r1 = o.AbstractC1402hf.j
            goto L69
        L67:
            o.xq r1 = o.AbstractC1402hf.k
        L69:
            boolean r6 = r4.k(r5, r6, r1)
            if (r6 == 0) goto L11
            r4.n(r5, r3)
            r6 = r0 ^ 1
            r4.m(r5, r6)
            if (r0 == 0) goto L7c
            r2.getClass()
        L7c:
            return
        */
        throw new UnsupportedOperationException("Method not decompiled: o.C1881mh.h(int, o.vn):void");
    }

    public final boolean k(int i, Object obj, Object obj2) {
        AtomicReferenceArray atomicReferenceArray;
        int i2 = (i * 2) + 1;
        do {
            atomicReferenceArray = this.f;
            if (atomicReferenceArray.compareAndSet(i2, obj, obj2)) {
                return true;
            }
        } while (atomicReferenceArray.get(i2) == obj);
        return false;
    }

    public final Object l(int i) {
        return this.f.get((i * 2) + 1);
    }

    public final void m(int i, boolean z) {
        if (z) {
            this.e.I((this.c * AbstractC1402hf.b) + i);
        }
        i();
    }

    public final void n(int i, Object obj) {
        this.f.set(i * 2, obj);
    }

    public final void o(int i, Object obj) {
        this.f.set((i * 2) + 1, obj);
    }
}
