package B;

import G0.InterfaceC0247b0;
import G0.InterfaceC0249c0;
import G0.InterfaceC0273s;
import G0.InterfaceC0274t;
import I0.InterfaceC0315y;
import h1.C2069a;
import i0.AbstractC2254r;

/* JADX INFO: renamed from: B.n, reason: case insensitive filesystem */
/* JADX INFO: loaded from: classes.dex */
public final class C0075n extends AbstractC2254r implements InterfaceC0315y {

    /* JADX INFO: renamed from: a, reason: collision with root package name */
    public float f344a;

    /* JADX INFO: renamed from: b, reason: collision with root package name */
    public boolean f345b;

    @Override // I0.InterfaceC0315y
    public final int maxIntrinsicHeight(InterfaceC0274t interfaceC0274t, InterfaceC0273s interfaceC0273s, int i6) {
        return i6 != Integer.MAX_VALUE ? Math.round(i6 / this.f344a) : interfaceC0273s.d(i6);
    }

    @Override // I0.InterfaceC0315y
    public final int maxIntrinsicWidth(InterfaceC0274t interfaceC0274t, InterfaceC0273s interfaceC0273s, int i6) {
        return i6 != Integer.MAX_VALUE ? Math.round(i6 * this.f344a) : interfaceC0273s.K(i6);
    }

    /* JADX WARN: Removed duplicated region for block: B:52:0x00bf  */
    @Override // I0.InterfaceC0315y
    /* JADX INFO: renamed from: measure-3p2s80s */
    /*
        Code decompiled incorrectly, please refer to instructions dump.
    */
    public final InterfaceC0247b0 mo0measure3p2s80s(InterfaceC0249c0 interfaceC0249c0, G0.Z z6, long j4) {
        long jT0;
        if (this.f345b) {
            jT0 = t0(j4, true);
            if (h1.l.a(jT0, 0L)) {
                jT0 = u0(j4, true);
                if (h1.l.a(jT0, 0L)) {
                    jT0 = v0(j4, true);
                    if (h1.l.a(jT0, 0L)) {
                        jT0 = w0(j4, true);
                        if (h1.l.a(jT0, 0L)) {
                            jT0 = t0(j4, false);
                            if (h1.l.a(jT0, 0L)) {
                                jT0 = u0(j4, false);
                                if (h1.l.a(jT0, 0L)) {
                                    jT0 = v0(j4, false);
                                    if (h1.l.a(jT0, 0L)) {
                                        jT0 = w0(j4, false);
                                        if (h1.l.a(jT0, 0L)) {
                                        }
                                    }
                                }
                            }
                        }
                    }
                }
            }
        } else {
            jT0 = u0(j4, true);
            if (h1.l.a(jT0, 0L)) {
                jT0 = t0(j4, true);
                if (h1.l.a(jT0, 0L)) {
                    jT0 = w0(j4, true);
                    if (h1.l.a(jT0, 0L)) {
                        jT0 = v0(j4, true);
                        if (h1.l.a(jT0, 0L)) {
                            jT0 = u0(j4, false);
                            if (h1.l.a(jT0, 0L)) {
                                jT0 = t0(j4, false);
                                if (h1.l.a(jT0, 0L)) {
                                    jT0 = w0(j4, false);
                                    if (h1.l.a(jT0, 0L)) {
                                        jT0 = v0(j4, false);
                                        if (h1.l.a(jT0, 0L)) {
                                            jT0 = 0;
                                        }
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
        if (!h1.l.a(jT0, 0L)) {
            int i6 = (int) (jT0 >> 32);
            int i7 = (int) (4294967295L & jT0);
            if (!((i6 >= 0) & (i7 >= 0))) {
                h1.i.a("width and height must be >= 0");
            }
            j4 = h1.b.h(i6, i6, i7, i7);
        }
        G0.q0 q0VarQ = z6.Q(j4);
        return interfaceC0249c0.e(q0VarQ.f1998a, q0VarQ.f1999b, x4.z.f26066a, new C0073m(q0VarQ, 0));
    }

    @Override // I0.InterfaceC0315y
    public final int minIntrinsicHeight(InterfaceC0274t interfaceC0274t, InterfaceC0273s interfaceC0273s, int i6) {
        return i6 != Integer.MAX_VALUE ? Math.round(i6 / this.f344a) : interfaceC0273s.j0(i6);
    }

    @Override // I0.InterfaceC0315y
    public final int minIntrinsicWidth(InterfaceC0274t interfaceC0274t, InterfaceC0273s interfaceC0273s, int i6) {
        return i6 != Integer.MAX_VALUE ? Math.round(i6 * this.f344a) : interfaceC0273s.G(i6);
    }

    public final long t0(long j4, boolean z6) {
        int iRound;
        int iG = C2069a.g(j4);
        if (iG == Integer.MAX_VALUE || (iRound = Math.round(iG * this.f344a)) <= 0) {
            return 0L;
        }
        if (!z6 || AbstractC0057e.s(iRound, iG, j4)) {
            return (((long) iRound) << 32) | (((long) iG) & 4294967295L);
        }
        return 0L;
    }

    public final long u0(long j4, boolean z6) {
        int iRound;
        int iH = C2069a.h(j4);
        if (iH == Integer.MAX_VALUE || (iRound = Math.round(iH / this.f344a)) <= 0) {
            return 0L;
        }
        if (!z6 || AbstractC0057e.s(iH, iRound, j4)) {
            return (((long) iH) << 32) | (((long) iRound) & 4294967295L);
        }
        return 0L;
    }

    public final long v0(long j4, boolean z6) {
        int i6 = C2069a.i(j4);
        int iRound = Math.round(i6 * this.f344a);
        if (iRound <= 0) {
            return 0L;
        }
        if (!z6 || AbstractC0057e.s(iRound, i6, j4)) {
            return (((long) iRound) << 32) | (((long) i6) & 4294967295L);
        }
        return 0L;
    }

    public final long w0(long j4, boolean z6) {
        int iJ = C2069a.j(j4);
        int iRound = Math.round(iJ / this.f344a);
        if (iRound <= 0) {
            return 0L;
        }
        if (!z6 || AbstractC0057e.s(iJ, iRound, j4)) {
            return (((long) iJ) << 32) | (((long) iRound) & 4294967295L);
        }
        return 0L;
    }
}
