package a0;

import G0.InterfaceC0247b0;
import G0.InterfaceC0249c0;
import I0.InterfaceC0315y;
import K.C0445c;
import h1.C2069a;
import i0.AbstractC2254r;
import q.C2769d;
import q.C2790n0;

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

    /* JADX INFO: renamed from: a, reason: collision with root package name */
    public z.l f10185a;

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

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

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

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

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

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

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

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

    /* JADX WARN: Multi-variable type inference failed */
    @Override // I0.InterfaceC0315y
    /* JADX INFO: renamed from: measure-3p2s80s */
    public final InterfaceC0247b0 mo0measure3p2s80s(InterfaceC0249c0 interfaceC0249c0, G0.Z z6, long j4) {
        float fY = interfaceC0249c0.Y(this.f10188d ? d0.F.f14565n : ((z6.d(C2069a.h(j4)) != 0 && z6.K(C2069a.g(j4)) != 0) || this.f10186b) ? e2.f9842a : e2.f9843b);
        C2769d c2769d = this.f10190f;
        int iFloatValue = (int) (c2769d != null ? ((Number) c2769d.d()).floatValue() : fY);
        if (!((iFloatValue >= 0) & (iFloatValue >= 0))) {
            h1.i.a("width and height must be >= 0");
        }
        G0.q0 q0VarQ = z6.Q(h1.b.h(iFloatValue, iFloatValue, iFloatValue, iFloatValue));
        float fY2 = interfaceC0249c0.Y((e2.f9845d - interfaceC0249c0.N(fY)) / 2.0f);
        float fY3 = interfaceC0249c0.Y((e2.f9844c - e2.f9842a) - e2.f9846e);
        boolean z7 = this.f10188d;
        if (z7 && this.f10186b) {
            fY2 = fY3 - interfaceC0249c0.Y(d0.F.f14570s);
        } else if (z7 && !this.f10186b) {
            fY2 = interfaceC0249c0.Y(d0.F.f14570s);
        } else if (this.f10186b) {
            fY2 = fY3;
        }
        C2769d c2769d2 = this.f10190f;
        if (!kotlin.jvm.internal.o.b(c2769d2 != null ? (Float) c2769d2.f23288e.getValue() : null, fY)) {
            V4.E.y(getCoroutineScope(), null, null, new o2(this, fY, null), 3);
        }
        C2769d c2769d3 = this.f10189e;
        if (!kotlin.jvm.internal.o.b(c2769d3 != null ? (Float) c2769d3.f23288e.getValue() : null, fY2)) {
            V4.E.y(getCoroutineScope(), null, null, new p2(this, fY2, null), 3);
        }
        if (Float.isNaN(this.f10192k) && Float.isNaN(this.f10191j)) {
            this.f10192k = fY;
            this.f10191j = fY2;
        }
        return interfaceC0249c0.e(iFloatValue, iFloatValue, x4.z.f26066a, new C0445c(q0VarQ, this, fY2));
    }

    @Override // i0.AbstractC2254r
    public final void onAttach() {
        V4.E.y(getCoroutineScope(), null, null, new q2(this, null), 3);
    }
}
