package o;

/* compiled from: r8-map-id-3b7cc9102578c509342fa2f0fabed2bfc72239cd258d579fc679bfcbc198b048 */
/* loaded from: classes.dex */
public final class Y80 extends LP implements InterfaceC1851mK {
    public float A;
    public float B;
    public float C;
    public boolean D;
    public float z;

    /* JADX WARN: Removed duplicated region for block: B:23:0x0041  */
    /*
        Code decompiled incorrectly, please refer to instructions dump.
        To view partially-correct add '--show-bad-code' argument
    */
    public final long H0(o.InterfaceC2424sO r7) {
        /*
            r6 = this;
            float r0 = r6.B
            boolean r0 = java.lang.Float.isNaN(r0)
            r1 = 2147483647(0x7fffffff, float:NaN)
            r2 = 0
            if (r0 != 0) goto L16
            float r0 = r6.B
            int r0 = r7.N(r0)
            if (r0 >= 0) goto L17
            r0 = r2
            goto L17
        L16:
            r0 = r1
        L17:
            float r3 = r6.C
            boolean r3 = java.lang.Float.isNaN(r3)
            if (r3 != 0) goto L29
            float r3 = r6.C
            int r3 = r7.N(r3)
            if (r3 >= 0) goto L2a
            r3 = r2
            goto L2a
        L29:
            r3 = r1
        L2a:
            float r4 = r6.z
            boolean r4 = java.lang.Float.isNaN(r4)
            if (r4 != 0) goto L41
            float r4 = r6.z
            int r4 = r7.N(r4)
            if (r4 >= 0) goto L3b
            r4 = r2
        L3b:
            if (r4 <= r0) goto L3e
            r4 = r0
        L3e:
            if (r4 == r1) goto L41
            goto L42
        L41:
            r4 = r2
        L42:
            float r5 = r6.A
            boolean r5 = java.lang.Float.isNaN(r5)
            if (r5 != 0) goto L59
            float r5 = r6.A
            int r7 = r7.N(r5)
            if (r7 >= 0) goto L53
            r7 = r2
        L53:
            if (r7 <= r3) goto L56
            r7 = r3
        L56:
            if (r7 == r1) goto L59
            r2 = r7
        L59:
            long r0 = o.AbstractC0842bm.a(r4, r0, r2, r3)
            return r0
        */
        throw new UnsupportedOperationException("Method not decompiled: o.Y80.H0(o.sO):long");
    }

    @Override // o.InterfaceC1851mK
    public final InterfaceC2329rO a(InterfaceC2424sO interfaceC2424sO, InterfaceC1760lO interfaceC1760lO, long j) {
        int iJ;
        int iH;
        int i;
        int iG;
        long jA;
        long jH0 = H0(interfaceC2424sO);
        if (this.D) {
            jA = AbstractC0842bm.e(j, jH0);
        } else {
            if (Float.isNaN(this.z)) {
                iJ = C0634Yl.j(j);
                int iH2 = C0634Yl.h(jH0);
                if (iJ > iH2) {
                    iJ = iH2;
                }
            } else {
                iJ = C0634Yl.j(jH0);
            }
            if (Float.isNaN(this.B)) {
                iH = C0634Yl.h(j);
                int iJ2 = C0634Yl.j(jH0);
                if (iH < iJ2) {
                    iH = iJ2;
                }
            } else {
                iH = C0634Yl.h(jH0);
            }
            if (Float.isNaN(this.A)) {
                i = C0634Yl.i(j);
                int iG2 = C0634Yl.g(jH0);
                if (i > iG2) {
                    i = iG2;
                }
            } else {
                i = C0634Yl.i(jH0);
            }
            if (Float.isNaN(this.C)) {
                iG = C0634Yl.g(j);
                int i2 = C0634Yl.i(jH0);
                if (iG < i2) {
                    iG = i2;
                }
            } else {
                iG = C0634Yl.g(jH0);
            }
            jA = AbstractC0842bm.a(iJ, iH, i, iG);
        }
        VW vwC = interfaceC1760lO.c(jA);
        return interfaceC2424sO.H(vwC.l, vwC.m, C0358Nv.l, new C2198py(vwC, 2));
    }

    @Override // o.InterfaceC1851mK
    public final int b(YM ym, InterfaceC1760lO interfaceC1760lO, int i) {
        long jH0 = H0(ym);
        if (C0634Yl.e(jH0)) {
            return C0634Yl.g(jH0);
        }
        if (!this.D) {
            i = AbstractC0842bm.g(i, jH0);
        }
        return AbstractC0842bm.f(interfaceC1760lO.d(i), jH0);
    }

    @Override // o.InterfaceC1851mK
    public final int d(YM ym, InterfaceC1760lO interfaceC1760lO, int i) {
        long jH0 = H0(ym);
        if (C0634Yl.f(jH0)) {
            return C0634Yl.h(jH0);
        }
        if (!this.D) {
            i = AbstractC0842bm.f(i, jH0);
        }
        return AbstractC0842bm.g(interfaceC1760lO.U(i), jH0);
    }

    @Override // o.InterfaceC1851mK
    public final int h(YM ym, InterfaceC1760lO interfaceC1760lO, int i) {
        long jH0 = H0(ym);
        if (C0634Yl.e(jH0)) {
            return C0634Yl.g(jH0);
        }
        if (!this.D) {
            i = AbstractC0842bm.g(i, jH0);
        }
        return AbstractC0842bm.f(interfaceC1760lO.V(i), jH0);
    }

    @Override // o.InterfaceC1851mK
    public final int i(YM ym, InterfaceC1760lO interfaceC1760lO, int i) {
        long jH0 = H0(ym);
        if (C0634Yl.f(jH0)) {
            return C0634Yl.h(jH0);
        }
        if (!this.D) {
            i = AbstractC0842bm.f(i, jH0);
        }
        return AbstractC0842bm.g(interfaceC1760lO.O(i), jH0);
    }
}
