package o;

/* compiled from: r8-map-id-3b7cc9102578c509342fa2f0fabed2bfc72239cd258d579fc679bfcbc198b048 */
/* renamed from: o.rm, reason: case insensitive filesystem */
/* loaded from: classes.dex */
public final class C2365rm extends AbstractC2378rs0 implements InterfaceC1661kK, KP {
    public final I9 j;
    public final InterfaceC2584u2 k;
    public final InterfaceC2555tm l;
    public final float m = 1.0f;

    public C2365rm(I9 i9, InterfaceC2584u2 interfaceC2584u2, InterfaceC2555tm interfaceC2555tm) {
        this.j = i9;
        this.k = interfaceC2584u2;
        this.l = interfaceC2555tm;
    }

    public final long A0(long j) {
        float fJ;
        int i;
        float fJ2;
        boolean zF = C0634Yl.f(j);
        boolean zE = C0634Yl.e(j);
        if (!zF || !zE) {
            boolean z = C0634Yl.d(j) && C0634Yl.c(j);
            long jG = this.j.g();
            if (jG != 9205357640488583168L) {
                if (z && (zF || zE)) {
                    fJ = C0634Yl.h(j);
                    i = C0634Yl.g(j);
                } else {
                    float fD = T80.d(jG);
                    float fB = T80.b(jG);
                    if (Float.isInfinite(fD) || Float.isNaN(fD)) {
                        fJ = C0634Yl.j(j);
                    } else {
                        int i2 = AbstractC2548ti0.b;
                        fJ = AbstractC0940cn0.j(fD, C0634Yl.j(j), C0634Yl.h(j));
                    }
                    if (!Float.isInfinite(fB) && !Float.isNaN(fB)) {
                        int i3 = AbstractC2548ti0.b;
                        fJ2 = AbstractC0940cn0.j(fB, C0634Yl.i(j), C0634Yl.g(j));
                        long jZ0 = z0(C1884mi0.e(fJ, fJ2));
                        return C0634Yl.a(j, AbstractC0842bm.g(C2887xC.D(T80.d(jZ0)), j), 0, AbstractC0842bm.f(C2887xC.D(T80.b(jZ0)), j), 0, 10);
                    }
                    i = C0634Yl.i(j);
                }
                fJ2 = i;
                long jZ02 = z0(C1884mi0.e(fJ, fJ2));
                return C0634Yl.a(j, AbstractC0842bm.g(C2887xC.D(T80.d(jZ02)), j), 0, AbstractC0842bm.f(C2887xC.D(T80.b(jZ02)), j), 0, 10);
            }
            if (z) {
                return C0634Yl.a(j, C0634Yl.h(j), 0, C0634Yl.g(j), 0, 10);
            }
        }
        return j;
    }

    @Override // o.InterfaceC1661kK
    public final InterfaceC2329rO a(InterfaceC2424sO interfaceC2424sO, InterfaceC1760lO interfaceC1760lO, long j) {
        VW vwC = interfaceC1760lO.c(A0(j));
        return interfaceC2424sO.H(vwC.l, vwC.m, C0358Nv.l, new C0973d5(vwC, 3));
    }

    @Override // o.InterfaceC1661kK
    public final int b(YM ym, InterfaceC1760lO interfaceC1760lO, int i) {
        if (this.j.g() == 9205357640488583168L) {
            return interfaceC1760lO.d(i);
        }
        int iD = interfaceC1760lO.d(C0634Yl.h(A0(AbstractC0842bm.b(i, 0, 13))));
        return Math.max(C2887xC.D(T80.b(z0(C1884mi0.e(i, iD)))), iD);
    }

    @Override // o.InterfaceC1661kK
    public final int d(YM ym, InterfaceC1760lO interfaceC1760lO, int i) {
        if (this.j.g() == 9205357640488583168L) {
            return interfaceC1760lO.U(i);
        }
        int iU = interfaceC1760lO.U(C0634Yl.g(A0(AbstractC0842bm.b(0, i, 7))));
        return Math.max(C2887xC.D(T80.d(z0(C1884mi0.e(iU, i)))), iU);
    }

    public final boolean equals(Object obj) {
        if (this == obj) {
            return true;
        }
        if (!(obj instanceof C2365rm)) {
            return false;
        }
        C2365rm c2365rm = (C2365rm) obj;
        return F3.c(this.j, c2365rm.j) && F3.c(this.k, c2365rm.k) && F3.c(this.l, c2365rm.l) && Float.compare(this.m, c2365rm.m) == 0;
    }

    @Override // o.InterfaceC1661kK
    public final int h(YM ym, InterfaceC1760lO interfaceC1760lO, int i) {
        if (this.j.g() == 9205357640488583168L) {
            return interfaceC1760lO.V(i);
        }
        int iV = interfaceC1760lO.V(C0634Yl.h(A0(AbstractC0842bm.b(i, 0, 13))));
        return Math.max(C2887xC.D(T80.b(z0(C1884mi0.e(i, iV)))), iV);
    }

    public final int hashCode() {
        return AbstractC0126Ew.d(this.m, (this.l.hashCode() + ((this.k.hashCode() + (this.j.hashCode() * 31)) * 31)) * 31, 31);
    }

    @Override // o.InterfaceC1661kK
    public final int i(YM ym, InterfaceC1760lO interfaceC1760lO, int i) {
        if (this.j.g() == 9205357640488583168L) {
            return interfaceC1760lO.O(i);
        }
        int iO = interfaceC1760lO.O(C0634Yl.g(A0(AbstractC0842bm.b(0, i, 7))));
        return Math.max(C2887xC.D(T80.d(z0(C1884mi0.e(iO, i)))), iO);
    }

    public final String toString() {
        return "ContentPainterModifier(painter=" + this.j + ", alignment=" + this.k + ", contentScale=" + this.l + ", alpha=" + this.m + ", colorFilter=null)";
    }

    public final long z0(long j) {
        if (T80.e(j)) {
            return 0L;
        }
        long jG = this.j.g();
        if (jG == 9205357640488583168L) {
            return j;
        }
        float fD = T80.d(jG);
        if (Float.isInfinite(fD) || Float.isNaN(fD)) {
            fD = T80.d(j);
        }
        float fB = T80.b(jG);
        if (Float.isInfinite(fB) || Float.isNaN(fB)) {
            fB = T80.b(j);
        }
        long jE = C1884mi0.e(fD, fB);
        return AbstractC2378rs0.i0(jE, this.l.c(jE, j));
    }
}
