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: loaded from: classes.dex */
public final class V0 extends AbstractC2254r implements InterfaceC0315y {

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

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

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

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

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

    @Override // I0.InterfaceC0315y
    public final int maxIntrinsicHeight(InterfaceC0274t interfaceC0274t, InterfaceC0273s interfaceC0273s, int i6) {
        long jT0 = t0(interfaceC0274t);
        if (C2069a.e(jT0)) {
            return C2069a.g(jT0);
        }
        if (!this.f206e) {
            i6 = h1.b.g(i6, jT0);
        }
        return h1.b.f(interfaceC0273s.d(i6), jT0);
    }

    @Override // I0.InterfaceC0315y
    public final int maxIntrinsicWidth(InterfaceC0274t interfaceC0274t, InterfaceC0273s interfaceC0273s, int i6) {
        long jT0 = t0(interfaceC0274t);
        if (C2069a.f(jT0)) {
            return C2069a.h(jT0);
        }
        if (!this.f206e) {
            i6 = h1.b.f(i6, jT0);
        }
        return h1.b.g(interfaceC0273s.K(i6), jT0);
    }

    @Override // I0.InterfaceC0315y
    /* JADX INFO: renamed from: measure-3p2s80s */
    public final InterfaceC0247b0 mo0measure3p2s80s(InterfaceC0249c0 interfaceC0249c0, G0.Z z6, long j4) {
        int iJ;
        int iH;
        int i6;
        int iG;
        long jA;
        long jT0 = t0(interfaceC0249c0);
        if (this.f206e) {
            jA = h1.b.e(j4, jT0);
        } else {
            if (Float.isNaN(this.f202a)) {
                iJ = C2069a.j(j4);
                int iH2 = C2069a.h(jT0);
                if (iJ > iH2) {
                    iJ = iH2;
                }
            } else {
                iJ = C2069a.j(jT0);
            }
            if (Float.isNaN(this.f204c)) {
                iH = C2069a.h(j4);
                int iJ2 = C2069a.j(jT0);
                if (iH < iJ2) {
                    iH = iJ2;
                }
            } else {
                iH = C2069a.h(jT0);
            }
            if (Float.isNaN(this.f203b)) {
                i6 = C2069a.i(j4);
                int iG2 = C2069a.g(jT0);
                if (i6 > iG2) {
                    i6 = iG2;
                }
            } else {
                i6 = C2069a.i(jT0);
            }
            if (Float.isNaN(this.f205d)) {
                iG = C2069a.g(j4);
                int i7 = C2069a.i(jT0);
                if (iG < i7) {
                    iG = i7;
                }
            } else {
                iG = C2069a.g(jT0);
            }
            jA = h1.b.a(iJ, iH, i6, iG);
        }
        G0.q0 q0VarQ = z6.Q(jA);
        return interfaceC0249c0.e(q0VarQ.f1998a, q0VarQ.f1999b, x4.z.f26066a, new C0073m(q0VarQ, 4));
    }

    @Override // I0.InterfaceC0315y
    public final int minIntrinsicHeight(InterfaceC0274t interfaceC0274t, InterfaceC0273s interfaceC0273s, int i6) {
        long jT0 = t0(interfaceC0274t);
        if (C2069a.e(jT0)) {
            return C2069a.g(jT0);
        }
        if (!this.f206e) {
            i6 = h1.b.g(i6, jT0);
        }
        return h1.b.f(interfaceC0273s.j0(i6), jT0);
    }

    @Override // I0.InterfaceC0315y
    public final int minIntrinsicWidth(InterfaceC0274t interfaceC0274t, InterfaceC0273s interfaceC0273s, int i6) {
        long jT0 = t0(interfaceC0274t);
        if (C2069a.f(jT0)) {
            return C2069a.h(jT0);
        }
        if (!this.f206e) {
            i6 = h1.b.f(i6, jT0);
        }
        return h1.b.g(interfaceC0273s.G(i6), jT0);
    }

    /* JADX WARN: Removed duplicated region for block: B:23:0x0041  */
    /*
        Code decompiled incorrectly, please refer to instructions dump.
    */
    public final long t0(InterfaceC0274t interfaceC0274t) {
        int iG0;
        int iG02;
        int iG03;
        int i6 = 0;
        if (Float.isNaN(this.f204c)) {
            iG0 = Integer.MAX_VALUE;
        } else {
            iG0 = interfaceC0274t.g0(this.f204c);
            if (iG0 < 0) {
                iG0 = 0;
            }
        }
        if (Float.isNaN(this.f205d)) {
            iG02 = Integer.MAX_VALUE;
        } else {
            iG02 = interfaceC0274t.g0(this.f205d);
            if (iG02 < 0) {
                iG02 = 0;
            }
        }
        if (Float.isNaN(this.f202a)) {
            iG03 = 0;
        } else {
            iG03 = interfaceC0274t.g0(this.f202a);
            if (iG03 < 0) {
                iG03 = 0;
            }
            if (iG03 > iG0) {
                iG03 = iG0;
            }
            if (iG03 == Integer.MAX_VALUE) {
            }
        }
        if (!Float.isNaN(this.f203b)) {
            int iG04 = interfaceC0274t.g0(this.f203b);
            if (iG04 < 0) {
                iG04 = 0;
            }
            if (iG04 > iG02) {
                iG04 = iG02;
            }
            if (iG04 != Integer.MAX_VALUE) {
                i6 = iG04;
            }
        }
        return h1.b.a(iG03, iG0, i6, iG02);
    }
}
