package o;

import java.util.HashMap;
import java.util.Map;

/* compiled from: r8-map-id-3b7cc9102578c509342fa2f0fabed2bfc72239cd258d579fc679bfcbc198b048 */
/* renamed from: o.tK, reason: case insensitive filesystem */
/* loaded from: classes.dex */
public final class C2515tK {
    public final VW a;
    public boolean c;
    public boolean d;
    public boolean e;
    public InterfaceC3059z2 f;
    public final /* synthetic */ int h;
    public boolean b = true;
    public final HashMap g = new HashMap();

    /* JADX WARN: Multi-variable type inference failed */
    public C2515tK(InterfaceC3059z2 interfaceC3059z2, int i) {
        this.h = i;
        this.a = (VW) interfaceC3059z2;
    }

    /* JADX WARN: Type inference failed for: r12v5, types: [o.SC, o.aD] */
    /* JADX WARN: Type inference failed for: r3v5, types: [o.VW, o.z2] */
    public static final void a(C2515tK c2515tK, AbstractC2679v2 abstractC2679v2, int i, AbstractC2239qS abstractC2239qS) {
        HashMap map = c2515tK.g;
        float f = i;
        long jFloatToRawIntBits = Float.floatToRawIntBits(f) << 32;
        long jFloatToRawIntBits2 = Float.floatToRawIntBits(f) & 4294967295L;
        while (true) {
            long jK1 = jFloatToRawIntBits | jFloatToRawIntBits2;
            do {
                switch (c2515tK.h) {
                    case 0:
                        L20 l20 = AbstractC2239qS.U;
                        jK1 = abstractC2239qS.k1(jK1);
                        break;
                    default:
                        long j = abstractC2239qS.N0().A;
                        jK1 = C1765lT.e((Float.floatToRawIntBits((int) (j & 4294967295L)) & 4294967295L) | (Float.floatToRawIntBits((int) (j >> 32)) << 32), jK1);
                        break;
                }
                abstractC2239qS = abstractC2239qS.B;
                if (F3.c(abstractC2239qS, c2515tK.a.n())) {
                    int iRound = Math.round(abstractC2679v2 instanceof C1467iF ? Float.intBitsToFloat((int) (jK1 & 4294967295L)) : Float.intBitsToFloat((int) (jK1 >> 32)));
                    if (map.containsKey(abstractC2679v2)) {
                        int iIntValue = ((Number) GN.Y(abstractC2679v2, map)).intValue();
                        C1467iF c1467iF = AbstractC2964y2.a;
                        iRound = ((Number) abstractC2679v2.a.f(Integer.valueOf(iIntValue), Integer.valueOf(iRound))).intValue();
                    }
                    map.put(abstractC2679v2, Integer.valueOf(iRound));
                    return;
                }
            } while (!c2515tK.b(abstractC2239qS).containsKey(abstractC2679v2));
            float fC = c2515tK.c(abstractC2239qS, abstractC2679v2);
            long jFloatToRawIntBits3 = Float.floatToRawIntBits(fC);
            long jFloatToRawIntBits4 = Float.floatToRawIntBits(fC);
            jFloatToRawIntBits = jFloatToRawIntBits3 << 32;
            jFloatToRawIntBits2 = jFloatToRawIntBits4 & 4294967295L;
        }
    }

    public final Map b(AbstractC2239qS abstractC2239qS) {
        switch (this.h) {
            case 0:
                return abstractC2239qS.x0().a();
            default:
                return abstractC2239qS.N0().x0().a();
        }
    }

    public final int c(AbstractC2239qS abstractC2239qS, AbstractC2679v2 abstractC2679v2) {
        switch (this.h) {
            case 0:
                return abstractC2239qS.l0(abstractC2679v2);
            default:
                return abstractC2239qS.N0().l0(abstractC2679v2);
        }
    }

    public final boolean d() {
        return this.c || this.d || this.e;
    }

    public final boolean e() {
        h();
        return this.f != null;
    }

    /* JADX WARN: Type inference failed for: r0v1, types: [o.VW, o.z2] */
    public final void f() {
        this.b = true;
        ?? r0 = this.a;
        InterfaceC3059z2 interfaceC3059z2R = r0.r();
        if (interfaceC3059z2R == null) {
            return;
        }
        if (this.c) {
            interfaceC3059z2R.requestLayout();
        }
        if (this.d) {
            r0.R();
        }
        if (this.e) {
            r0.requestLayout();
        }
        interfaceC3059z2R.a().f();
    }

    /* JADX WARN: Type inference failed for: r2v1, types: [o.VW, o.z2] */
    public final void g() {
        HashMap map = this.g;
        map.clear();
        C2769w c2769w = new C2769w(2, this);
        ?? r2 = this.a;
        r2.j(c2769w);
        map.putAll(b(r2.n()));
        this.b = false;
    }

    /* JADX WARN: Removed duplicated region for block: B:13:0x0023  */
    /* JADX WARN: Type inference failed for: r1v0, types: [o.VW, o.z2] */
    /*
        Code decompiled incorrectly, please refer to instructions dump.
        To view partially-correct add '--show-bad-code' argument
    */
    public final void h() {
        /*
            r2 = this;
            boolean r0 = r2.d()
            o.VW r1 = r2.a
            if (r0 == 0) goto L9
            goto L51
        L9:
            o.z2 r0 = r1.r()
            if (r0 != 0) goto L10
            goto L53
        L10:
            o.tK r0 = r0.a()
            o.z2 r1 = r0.f
            if (r1 == 0) goto L23
            o.tK r0 = r1.a()
            boolean r0 = r0.d()
            if (r0 == 0) goto L23
            goto L51
        L23:
            o.z2 r0 = r2.f
            if (r0 == 0) goto L53
            o.tK r1 = r0.a()
            boolean r1 = r1.d()
            if (r1 == 0) goto L32
            goto L53
        L32:
            o.z2 r1 = r0.r()
            if (r1 == 0) goto L41
            o.tK r1 = r1.a()
            if (r1 == 0) goto L41
            r1.h()
        L41:
            o.z2 r0 = r0.r()
            if (r0 == 0) goto L50
            o.tK r0 = r0.a()
            if (r0 == 0) goto L50
            o.z2 r1 = r0.f
            goto L51
        L50:
            r1 = 0
        L51:
            r2.f = r1
        L53:
            return
        */
        throw new UnsupportedOperationException("Method not decompiled: o.C2515tK.h():void");
    }
}
