package m0;

import G0.B;
import G0.InterfaceC0247b0;
import G0.InterfaceC0249c0;
import G0.InterfaceC0262j;
import G0.InterfaceC0273s;
import G0.InterfaceC0274t;
import G0.Z;
import G0.q0;
import G0.t0;
import I0.InterfaceC0305n;
import I0.InterfaceC0315y;
import I0.J;
import h1.C2069a;
import i0.AbstractC2254r;
import i0.InterfaceC2242f;
import p0.AbstractC2715v;
import r0.C2863b;
import r0.InterfaceC2864c;
import u0.AbstractC2959b;
import x4.z;

/* JADX INFO: loaded from: classes.dex */
public final class o extends AbstractC2254r implements InterfaceC0315y, InterfaceC0305n {

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

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

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

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

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

    /* JADX INFO: renamed from: f, reason: collision with root package name */
    public AbstractC2715v f20399f;

    public static boolean u0(long j4) {
        return !o0.e.a(j4, 9205357640488583168L) && (Float.floatToRawIntBits(Float.intBitsToFloat((int) (j4 & 4294967295L))) & Integer.MAX_VALUE) < 2139095040;
    }

    public static boolean v0(long j4) {
        return !o0.e.a(j4, 9205357640488583168L) && (Float.floatToRawIntBits(Float.intBitsToFloat((int) (j4 >> 32))) & Integer.MAX_VALUE) < 2139095040;
    }

    @Override // I0.InterfaceC0305n
    public final void draw(InterfaceC2864c interfaceC2864c) {
        long jMo288getIntrinsicSizeNHjbRc = this.f20394a.mo288getIntrinsicSizeNHjbRc();
        float fIntBitsToFloat = v0(jMo288getIntrinsicSizeNHjbRc) ? Float.intBitsToFloat((int) (jMo288getIntrinsicSizeNHjbRc >> 32)) : Float.intBitsToFloat((int) (((J) interfaceC2864c).f2210a.c() >> 32));
        long jFloatToRawIntBits = (((long) Float.floatToRawIntBits(u0(jMo288getIntrinsicSizeNHjbRc) ? Float.intBitsToFloat((int) (jMo288getIntrinsicSizeNHjbRc & 4294967295L)) : Float.intBitsToFloat((int) (((J) interfaceC2864c).f2210a.c() & 4294967295L)))) & 4294967295L) | (((long) Float.floatToRawIntBits(fIntBitsToFloat)) << 32);
        J j4 = (J) interfaceC2864c;
        C2863b c2863b = j4.f2210a;
        long jP = (Float.intBitsToFloat((int) (c2863b.c() >> 32)) == 0.0f || Float.intBitsToFloat((int) (c2863b.c() & 4294967295L)) == 0.0f) ? 0L : B.p(jFloatToRawIntBits, this.f20397d.a(jFloatToRawIntBits, c2863b.c()));
        long jA = this.f20396c.a((((long) Math.round(Float.intBitsToFloat((int) (jP >> 32)))) << 32) | (((long) Math.round(Float.intBitsToFloat((int) (jP & 4294967295L)))) & 4294967295L), (((long) Math.round(Float.intBitsToFloat((int) (c2863b.c() >> 32)))) << 32) | (((long) Math.round(Float.intBitsToFloat((int) (c2863b.c() & 4294967295L)))) & 4294967295L), j4.getLayoutDirection());
        float f6 = (int) (jA >> 32);
        float f7 = (int) (jA & 4294967295L);
        ((l2.c) c2863b.f23803b.f21850c).j(f6, f7);
        try {
            this.f20394a.m1218drawx_KDEd0(interfaceC2864c, jP, this.f20398e, this.f20399f);
            ((l2.c) c2863b.f23803b.f21850c).j(-f6, -f7);
            j4.b();
        } catch (Throwable th) {
            ((l2.c) c2863b.f23803b.f21850c).j(-f6, -f7);
            throw th;
        }
    }

    @Override // i0.AbstractC2254r
    public final boolean getShouldAutoInvalidate() {
        return false;
    }

    @Override // I0.InterfaceC0315y
    public final int maxIntrinsicHeight(InterfaceC0274t interfaceC0274t, InterfaceC0273s interfaceC0273s, int i6) {
        if (!t0()) {
            return interfaceC0273s.d(i6);
        }
        long jM1207modifyConstraintsZezNO4M = m1207modifyConstraintsZezNO4M(h1.b.b(i6, 0, 13));
        return Math.max(C2069a.i(jM1207modifyConstraintsZezNO4M), interfaceC0273s.d(i6));
    }

    @Override // I0.InterfaceC0315y
    public final int maxIntrinsicWidth(InterfaceC0274t interfaceC0274t, InterfaceC0273s interfaceC0273s, int i6) {
        if (!t0()) {
            return interfaceC0273s.K(i6);
        }
        long jM1207modifyConstraintsZezNO4M = m1207modifyConstraintsZezNO4M(h1.b.b(0, i6, 7));
        return Math.max(C2069a.j(jM1207modifyConstraintsZezNO4M), interfaceC0273s.K(i6));
    }

    @Override // I0.InterfaceC0315y
    /* JADX INFO: renamed from: measure-3p2s80s */
    public final InterfaceC0247b0 mo0measure3p2s80s(InterfaceC0249c0 interfaceC0249c0, Z z6, long j4) {
        q0 q0VarQ = z6.Q(m1207modifyConstraintsZezNO4M(j4));
        return interfaceC0249c0.e(q0VarQ.f1998a, q0VarQ.f1999b, z.f26066a, new t0(q0VarQ, 3));
    }

    @Override // I0.InterfaceC0315y
    public final int minIntrinsicHeight(InterfaceC0274t interfaceC0274t, InterfaceC0273s interfaceC0273s, int i6) {
        if (!t0()) {
            return interfaceC0273s.j0(i6);
        }
        long jM1207modifyConstraintsZezNO4M = m1207modifyConstraintsZezNO4M(h1.b.b(i6, 0, 13));
        return Math.max(C2069a.i(jM1207modifyConstraintsZezNO4M), interfaceC0273s.j0(i6));
    }

    @Override // I0.InterfaceC0315y
    public final int minIntrinsicWidth(InterfaceC0274t interfaceC0274t, InterfaceC0273s interfaceC0273s, int i6) {
        if (!t0()) {
            return interfaceC0273s.G(i6);
        }
        long jM1207modifyConstraintsZezNO4M = m1207modifyConstraintsZezNO4M(h1.b.b(0, i6, 7));
        return Math.max(C2069a.j(jM1207modifyConstraintsZezNO4M), interfaceC0273s.G(i6));
    }

    /* JADX INFO: renamed from: modifyConstraints-ZezNO4M, reason: not valid java name */
    public final long m1207modifyConstraintsZezNO4M(long j4) {
        boolean z6 = false;
        boolean z7 = C2069a.d(j4) && C2069a.c(j4);
        if (C2069a.f(j4) && C2069a.e(j4)) {
            z6 = true;
        }
        if ((!t0() && z7) || z6) {
            return C2069a.a(j4, C2069a.h(j4), 0, C2069a.g(j4), 0, 10);
        }
        long jMo288getIntrinsicSizeNHjbRc = this.f20394a.mo288getIntrinsicSizeNHjbRc();
        int iRound = v0(jMo288getIntrinsicSizeNHjbRc) ? Math.round(Float.intBitsToFloat((int) (jMo288getIntrinsicSizeNHjbRc >> 32))) : C2069a.j(j4);
        int iRound2 = u0(jMo288getIntrinsicSizeNHjbRc) ? Math.round(Float.intBitsToFloat((int) (jMo288getIntrinsicSizeNHjbRc & 4294967295L))) : C2069a.i(j4);
        long jFloatToRawIntBits = (((long) Float.floatToRawIntBits(h1.b.f(iRound2, j4))) & 4294967295L) | (((long) Float.floatToRawIntBits(h1.b.g(iRound, j4))) << 32);
        if (t0()) {
            long jFloatToRawIntBits2 = (((long) Float.floatToRawIntBits(!v0(this.f20394a.mo288getIntrinsicSizeNHjbRc()) ? Float.intBitsToFloat((int) (jFloatToRawIntBits >> 32)) : Float.intBitsToFloat((int) (this.f20394a.mo288getIntrinsicSizeNHjbRc() >> 32)))) << 32) | (((long) Float.floatToRawIntBits(!u0(this.f20394a.mo288getIntrinsicSizeNHjbRc()) ? Float.intBitsToFloat((int) (jFloatToRawIntBits & 4294967295L)) : Float.intBitsToFloat((int) (this.f20394a.mo288getIntrinsicSizeNHjbRc() & 4294967295L)))) & 4294967295L);
            jFloatToRawIntBits = (Float.intBitsToFloat((int) (jFloatToRawIntBits >> 32)) == 0.0f || Float.intBitsToFloat((int) (jFloatToRawIntBits & 4294967295L)) == 0.0f) ? 0L : B.p(jFloatToRawIntBits2, this.f20397d.a(jFloatToRawIntBits2, jFloatToRawIntBits));
        }
        return C2069a.a(j4, h1.b.g(Math.round(Float.intBitsToFloat((int) (jFloatToRawIntBits >> 32))), j4), 0, h1.b.f(Math.round(Float.intBitsToFloat((int) (jFloatToRawIntBits & 4294967295L))), j4), 0, 10);
    }

    public final boolean t0() {
        return this.f20395b && this.f20394a.mo288getIntrinsicSizeNHjbRc() != 9205357640488583168L;
    }

    public final String toString() {
        return "PainterModifier(painter=" + this.f20394a + ", sizeToIntrinsics=" + this.f20395b + ", alignment=" + this.f20396c + ", alpha=" + this.f20398e + ", colorFilter=" + this.f20399f + ')';
    }
}
