package r0;

import androidx.compose.ui.platform.c1;
import androidx.compose.ui.platform.y2;
import com.google.android.gms.maps.model.BitmapDescriptorFactory;
import com.google.firebase.crashlytics.internal.metadata.UserMetadata;
import e0.b;
import j2.g;
import l1.i;
import rm.n0;
import s1.h0;
import s1.u0;
import s1.v0;
import s1.w0;
import u1.a;
import y0.d4;
import y0.i2;
import y0.l2;
import y0.x2;

/* loaded from: classes.dex */
public abstract class a {

    /* JADX INFO: Access modifiers changed from: package-private */
    /* renamed from: r0.a$a, reason: collision with other inner class name */
    /* loaded from: classes.dex */
    public static final class C0793a extends kotlin.jvm.internal.v implements dn.p {

        /* renamed from: p, reason: collision with root package name */
        final /* synthetic */ i f34083p;

        /* renamed from: q, reason: collision with root package name */
        final /* synthetic */ l1.c f34084q;

        /* renamed from: r, reason: collision with root package name */
        final /* synthetic */ dn.p f34085r;

        /* renamed from: s, reason: collision with root package name */
        final /* synthetic */ int f34086s;

        /* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
        C0793a(i iVar, l1.c cVar, dn.p pVar, int i10) {
            super(2);
            this.f34083p = iVar;
            this.f34084q = cVar;
            this.f34085r = pVar;
            this.f34086s = i10;
        }

        public final void a(y0.m mVar, int i10) {
            a.a(this.f34083p, this.f34084q, this.f34085r, mVar, l2.a(this.f34086s | 1));
        }

        @Override // dn.p
        public /* bridge */ /* synthetic */ Object invoke(Object obj, Object obj2) {
            a((y0.m) obj, ((Number) obj2).intValue());
            return n0.f34904a;
        }
    }

    /* JADX INFO: Access modifiers changed from: package-private */
    /* loaded from: classes.dex */
    public static final class b extends kotlin.jvm.internal.v implements dn.p {

        /* renamed from: p, reason: collision with root package name */
        final /* synthetic */ y2 f34087p;

        /* renamed from: q, reason: collision with root package name */
        final /* synthetic */ long f34088q;

        /* renamed from: r, reason: collision with root package name */
        final /* synthetic */ boolean f34089r;

        /* renamed from: s, reason: collision with root package name */
        final /* synthetic */ l1.i f34090s;

        /* renamed from: t, reason: collision with root package name */
        final /* synthetic */ i f34091t;

        /* JADX INFO: Access modifiers changed from: package-private */
        /* renamed from: r0.a$b$a, reason: collision with other inner class name */
        /* loaded from: classes.dex */
        public static final class C0794a extends kotlin.jvm.internal.v implements dn.p {

            /* renamed from: p, reason: collision with root package name */
            final /* synthetic */ long f34092p;

            /* renamed from: q, reason: collision with root package name */
            final /* synthetic */ boolean f34093q;

            /* renamed from: r, reason: collision with root package name */
            final /* synthetic */ l1.i f34094r;

            /* renamed from: s, reason: collision with root package name */
            final /* synthetic */ i f34095s;

            /* JADX INFO: Access modifiers changed from: package-private */
            /* renamed from: r0.a$b$a$a, reason: collision with other inner class name */
            /* loaded from: classes.dex */
            public static final class C0795a extends kotlin.jvm.internal.v implements dn.a {

                /* renamed from: p, reason: collision with root package name */
                final /* synthetic */ i f34096p;

                /* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
                C0795a(i iVar) {
                    super(0);
                    this.f34096p = iVar;
                }

                @Override // dn.a
                public final Boolean invoke() {
                    return Boolean.valueOf(r1.h.c(this.f34096p.a()));
                }
            }

            /* JADX INFO: Access modifiers changed from: package-private */
            /* renamed from: r0.a$b$a$b, reason: collision with other inner class name */
            /* loaded from: classes.dex */
            public static final class C0796b extends kotlin.jvm.internal.v implements dn.a {

                /* renamed from: p, reason: collision with root package name */
                final /* synthetic */ i f34097p;

                /* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
                C0796b(i iVar) {
                    super(0);
                    this.f34097p = iVar;
                }

                @Override // dn.a
                public final Boolean invoke() {
                    return Boolean.valueOf(r1.h.c(this.f34097p.a()));
                }
            }

            /* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
            C0794a(long j10, boolean z10, l1.i iVar, i iVar2) {
                super(2);
                this.f34092p = j10;
                this.f34093q = z10;
                this.f34094r = iVar;
                this.f34095s = iVar2;
            }

            public final void a(y0.m mVar, int i10) {
                if ((i10 & 3) == 2 && mVar.v()) {
                    mVar.A();
                    return;
                }
                if (y0.p.H()) {
                    y0.p.Q(-1426434671, i10, -1, "androidx.compose.foundation.text.selection.SelectionHandle.<anonymous>.<anonymous> (AndroidSelectionHandles.android.kt:83)");
                }
                if (this.f34092p != 9205357640488583168L) {
                    mVar.S(-837727128);
                    b.e b10 = this.f34093q ? b.a.f16616a.b() : b.a.f16616a.a();
                    l1.i n10 = androidx.compose.foundation.layout.o.n(this.f34094r, c3.k.h(this.f34092p), c3.k.g(this.f34092p), BitmapDescriptorFactory.HUE_RED, BitmapDescriptorFactory.HUE_RED, 12, null);
                    i iVar = this.f34095s;
                    boolean z10 = this.f34093q;
                    h2.e0 b11 = e0.c0.b(b10, l1.c.f27332a.l(), mVar, 0);
                    int a10 = y0.j.a(mVar, 0);
                    y0.y D = mVar.D();
                    l1.i e10 = l1.h.e(mVar, n10);
                    g.a aVar = j2.g.f23616d;
                    dn.a a11 = aVar.a();
                    if (!(mVar.w() instanceof y0.f)) {
                        y0.j.c();
                    }
                    mVar.u();
                    if (mVar.n()) {
                        mVar.o(a11);
                    } else {
                        mVar.F();
                    }
                    y0.m a12 = d4.a(mVar);
                    d4.b(a12, b11, aVar.c());
                    d4.b(a12, D, aVar.e());
                    dn.p b12 = aVar.b();
                    if (a12.n() || !kotlin.jvm.internal.t.b(a12.f(), Integer.valueOf(a10))) {
                        a12.I(Integer.valueOf(a10));
                        a12.l(Integer.valueOf(a10), b12);
                    }
                    d4.b(a12, e10, aVar.d());
                    e0.f0 f0Var = e0.f0.f16652a;
                    i.a aVar2 = l1.i.f27362a;
                    boolean m10 = mVar.m(iVar);
                    Object f10 = mVar.f();
                    if (m10 || f10 == y0.m.f51621a.a()) {
                        f10 = new C0795a(iVar);
                        mVar.I(f10);
                    }
                    a.c(aVar2, (dn.a) f10, z10, mVar, 6);
                    mVar.O();
                    mVar.H();
                } else {
                    mVar.S(-836867312);
                    l1.i iVar2 = this.f34094r;
                    boolean m11 = mVar.m(this.f34095s);
                    i iVar3 = this.f34095s;
                    Object f11 = mVar.f();
                    if (m11 || f11 == y0.m.f51621a.a()) {
                        f11 = new C0796b(iVar3);
                        mVar.I(f11);
                    }
                    a.c(iVar2, (dn.a) f11, this.f34093q, mVar, 0);
                    mVar.H();
                }
                if (y0.p.H()) {
                    y0.p.P();
                }
            }

            @Override // dn.p
            public /* bridge */ /* synthetic */ Object invoke(Object obj, Object obj2) {
                a((y0.m) obj, ((Number) obj2).intValue());
                return n0.f34904a;
            }
        }

        /* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
        b(y2 y2Var, long j10, boolean z10, l1.i iVar, i iVar2) {
            super(2);
            this.f34087p = y2Var;
            this.f34088q = j10;
            this.f34089r = z10;
            this.f34090s = iVar;
            this.f34091t = iVar2;
        }

        public final void a(y0.m mVar, int i10) {
            if ((i10 & 3) == 2 && mVar.v()) {
                mVar.A();
                return;
            }
            if (y0.p.H()) {
                y0.p.Q(280174801, i10, -1, "androidx.compose.foundation.text.selection.SelectionHandle.<anonymous> (AndroidSelectionHandles.android.kt:82)");
            }
            y0.x.a(c1.q().d(this.f34087p), g1.c.e(-1426434671, true, new C0794a(this.f34088q, this.f34089r, this.f34090s, this.f34091t), mVar, 54), mVar, i2.f51577i | 48);
            if (y0.p.H()) {
                y0.p.P();
            }
        }

        @Override // dn.p
        public /* bridge */ /* synthetic */ Object invoke(Object obj, Object obj2) {
            a((y0.m) obj, ((Number) obj2).intValue());
            return n0.f34904a;
        }
    }

    /* JADX INFO: Access modifiers changed from: package-private */
    /* loaded from: classes.dex */
    public static final class c extends kotlin.jvm.internal.v implements dn.p {

        /* renamed from: p, reason: collision with root package name */
        final /* synthetic */ i f34098p;

        /* renamed from: q, reason: collision with root package name */
        final /* synthetic */ boolean f34099q;

        /* renamed from: r, reason: collision with root package name */
        final /* synthetic */ b3.i f34100r;

        /* renamed from: s, reason: collision with root package name */
        final /* synthetic */ boolean f34101s;

        /* renamed from: t, reason: collision with root package name */
        final /* synthetic */ long f34102t;

        /* renamed from: u, reason: collision with root package name */
        final /* synthetic */ l1.i f34103u;

        /* renamed from: v, reason: collision with root package name */
        final /* synthetic */ int f34104v;

        /* renamed from: w, reason: collision with root package name */
        final /* synthetic */ int f34105w;

        /* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
        c(i iVar, boolean z10, b3.i iVar2, boolean z11, long j10, l1.i iVar3, int i10, int i11) {
            super(2);
            this.f34098p = iVar;
            this.f34099q = z10;
            this.f34100r = iVar2;
            this.f34101s = z11;
            this.f34102t = j10;
            this.f34103u = iVar3;
            this.f34104v = i10;
            this.f34105w = i11;
        }

        public final void a(y0.m mVar, int i10) {
            a.b(this.f34098p, this.f34099q, this.f34100r, this.f34101s, this.f34102t, this.f34103u, mVar, l2.a(this.f34104v | 1), this.f34105w);
        }

        @Override // dn.p
        public /* bridge */ /* synthetic */ Object invoke(Object obj, Object obj2) {
            a((y0.m) obj, ((Number) obj2).intValue());
            return n0.f34904a;
        }
    }

    /* JADX INFO: Access modifiers changed from: package-private */
    /* loaded from: classes.dex */
    public static final class d extends kotlin.jvm.internal.v implements dn.l {

        /* renamed from: p, reason: collision with root package name */
        final /* synthetic */ i f34106p;

        /* renamed from: q, reason: collision with root package name */
        final /* synthetic */ boolean f34107q;

        /* renamed from: r, reason: collision with root package name */
        final /* synthetic */ boolean f34108r;

        /* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
        d(i iVar, boolean z10, boolean z11) {
            super(1);
            this.f34106p = iVar;
            this.f34107q = z10;
            this.f34108r = z11;
        }

        public final void a(o2.u uVar) {
            long a10 = this.f34106p.a();
            uVar.e(v.d(), new u(this.f34107q ? l0.m.SelectionStart : l0.m.SelectionEnd, a10, this.f34108r ? t.Left : t.Right, r1.h.c(a10), null));
        }

        @Override // dn.l
        public /* bridge */ /* synthetic */ Object invoke(Object obj) {
            a((o2.u) obj);
            return n0.f34904a;
        }
    }

    /* JADX INFO: Access modifiers changed from: package-private */
    /* loaded from: classes.dex */
    public static final class e extends kotlin.jvm.internal.v implements dn.p {

        /* renamed from: p, reason: collision with root package name */
        final /* synthetic */ l1.i f34109p;

        /* renamed from: q, reason: collision with root package name */
        final /* synthetic */ dn.a f34110q;

        /* renamed from: r, reason: collision with root package name */
        final /* synthetic */ boolean f34111r;

        /* renamed from: s, reason: collision with root package name */
        final /* synthetic */ int f34112s;

        /* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
        e(l1.i iVar, dn.a aVar, boolean z10, int i10) {
            super(2);
            this.f34109p = iVar;
            this.f34110q = aVar;
            this.f34111r = z10;
            this.f34112s = i10;
        }

        public final void a(y0.m mVar, int i10) {
            a.c(this.f34109p, this.f34110q, this.f34111r, mVar, l2.a(this.f34112s | 1));
        }

        @Override // dn.p
        public /* bridge */ /* synthetic */ Object invoke(Object obj, Object obj2) {
            a((y0.m) obj, ((Number) obj2).intValue());
            return n0.f34904a;
        }
    }

    /* JADX INFO: Access modifiers changed from: package-private */
    /* loaded from: classes.dex */
    public static final class f extends kotlin.jvm.internal.v implements dn.q {

        /* renamed from: p, reason: collision with root package name */
        final /* synthetic */ dn.a f34113p;

        /* renamed from: q, reason: collision with root package name */
        final /* synthetic */ boolean f34114q;

        /* JADX INFO: Access modifiers changed from: package-private */
        /* renamed from: r0.a$f$a, reason: collision with other inner class name */
        /* loaded from: classes.dex */
        public static final class C0797a extends kotlin.jvm.internal.v implements dn.l {

            /* renamed from: p, reason: collision with root package name */
            final /* synthetic */ long f34115p;

            /* renamed from: q, reason: collision with root package name */
            final /* synthetic */ dn.a f34116q;

            /* renamed from: r, reason: collision with root package name */
            final /* synthetic */ boolean f34117r;

            /* JADX INFO: Access modifiers changed from: package-private */
            /* renamed from: r0.a$f$a$a, reason: collision with other inner class name */
            /* loaded from: classes.dex */
            public static final class C0798a extends kotlin.jvm.internal.v implements dn.l {

                /* renamed from: p, reason: collision with root package name */
                final /* synthetic */ dn.a f34118p;

                /* renamed from: q, reason: collision with root package name */
                final /* synthetic */ boolean f34119q;

                /* renamed from: r, reason: collision with root package name */
                final /* synthetic */ u0 f34120r;

                /* renamed from: s, reason: collision with root package name */
                final /* synthetic */ s1.h0 f34121s;

                /* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
                C0798a(dn.a aVar, boolean z10, u0 u0Var, s1.h0 h0Var) {
                    super(1);
                    this.f34118p = aVar;
                    this.f34119q = z10;
                    this.f34120r = u0Var;
                    this.f34121s = h0Var;
                }

                public final void a(u1.c cVar) {
                    cVar.z1();
                    if (((Boolean) this.f34118p.invoke()).booleanValue()) {
                        if (!this.f34119q) {
                            u1.f.O(cVar, this.f34120r, 0L, BitmapDescriptorFactory.HUE_RED, null, this.f34121s, 0, 46, null);
                            return;
                        }
                        u0 u0Var = this.f34120r;
                        s1.h0 h0Var = this.f34121s;
                        long j12 = cVar.j1();
                        u1.d Q0 = cVar.Q0();
                        long b10 = Q0.b();
                        Q0.i().n();
                        try {
                            Q0.f().g(-1.0f, 1.0f, j12);
                            u1.f.O(cVar, u0Var, 0L, BitmapDescriptorFactory.HUE_RED, null, h0Var, 0, 46, null);
                        } finally {
                            Q0.i().x();
                            Q0.g(b10);
                        }
                    }
                }

                @Override // dn.l
                public /* bridge */ /* synthetic */ Object invoke(Object obj) {
                    a((u1.c) obj);
                    return n0.f34904a;
                }
            }

            /* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
            C0797a(long j10, dn.a aVar, boolean z10) {
                super(1);
                this.f34115p = j10;
                this.f34116q = aVar;
                this.f34117r = z10;
            }

            @Override // dn.l
            /* renamed from: a, reason: merged with bridge method [inline-methods] */
            public final p1.h invoke(p1.d dVar) {
                return dVar.q(new C0798a(this.f34116q, this.f34117r, a.d(dVar, r1.m.i(dVar.b()) / 2.0f), h0.a.b(s1.h0.f35270b, this.f34115p, 0, 2, null)));
            }
        }

        /* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
        f(dn.a aVar, boolean z10) {
            super(3);
            this.f34113p = aVar;
            this.f34114q = z10;
        }

        public final l1.i a(l1.i iVar, y0.m mVar, int i10) {
            mVar.S(-196777734);
            if (y0.p.H()) {
                y0.p.Q(-196777734, i10, -1, "androidx.compose.foundation.text.selection.drawSelectionHandle.<anonymous> (AndroidSelectionHandles.android.kt:134)");
            }
            long b10 = ((j0) mVar.t(k0.b())).b();
            boolean j10 = mVar.j(b10) | mVar.R(this.f34113p) | mVar.c(this.f34114q);
            dn.a aVar = this.f34113p;
            boolean z10 = this.f34114q;
            Object f10 = mVar.f();
            if (j10 || f10 == y0.m.f51621a.a()) {
                f10 = new C0797a(b10, aVar, z10);
                mVar.I(f10);
            }
            l1.i c10 = androidx.compose.ui.draw.b.c(iVar, (dn.l) f10);
            if (y0.p.H()) {
                y0.p.P();
            }
            mVar.H();
            return c10;
        }

        @Override // dn.q
        public /* bridge */ /* synthetic */ Object invoke(Object obj, Object obj2, Object obj3) {
            return a((l1.i) obj, (y0.m) obj2, ((Number) obj3).intValue());
        }
    }

    public static final void a(i iVar, l1.c cVar, dn.p pVar, y0.m mVar, int i10) {
        int i11;
        y0.m r10 = mVar.r(476043083);
        if ((i10 & 6) == 0) {
            i11 = ((i10 & 8) == 0 ? r10.R(iVar) : r10.m(iVar) ? 4 : 2) | i10;
        } else {
            i11 = i10;
        }
        if ((i10 & 48) == 0) {
            i11 |= r10.R(cVar) ? 32 : 16;
        }
        if ((i10 & 384) == 0) {
            i11 |= r10.m(pVar) ? 256 : 128;
        }
        if ((i11 & 147) == 146 && r10.v()) {
            r10.A();
        } else {
            if (y0.p.H()) {
                y0.p.Q(476043083, i11, -1, "androidx.compose.foundation.text.selection.HandlePopup (AndroidSelectionHandles.android.kt:247)");
            }
            boolean z10 = true;
            boolean z11 = (i11 & 112) == 32;
            if ((i11 & 14) != 4 && ((i11 & 8) == 0 || !r10.R(iVar))) {
                z10 = false;
            }
            boolean z12 = z11 | z10;
            Object f10 = r10.f();
            if (z12 || f10 == y0.m.f51621a.a()) {
                f10 = new g(cVar, iVar);
                r10.I(f10);
            }
            androidx.compose.ui.window.b.a((g) f10, null, new androidx.compose.ui.window.r(false, false, false, null, true, false, 15, null), pVar, r10, ((i11 << 3) & 7168) | 384, 2);
            if (y0.p.H()) {
                y0.p.P();
            }
        }
        x2 y10 = r10.y();
        if (y10 != null) {
            y10.a(new C0793a(iVar, cVar, pVar, i10));
        }
    }

    /* JADX WARN: Code restructure failed: missing block: B:40:0x00dc, code lost:
    
        if ((r27 & 16) != 0) goto L83;
     */
    /*
        Code decompiled incorrectly, please refer to instructions dump.
    */
    public static final void b(i iVar, boolean z10, b3.i iVar2, boolean z11, long j10, l1.i iVar3, y0.m mVar, int i10, int i11) {
        int i12;
        long j11;
        y0.m r10 = mVar.r(-843755800);
        if ((i11 & 1) != 0) {
            i12 = i10 | 6;
        } else if ((i10 & 6) == 0) {
            i12 = ((i10 & 8) == 0 ? r10.R(iVar) : r10.m(iVar) ? 4 : 2) | i10;
        } else {
            i12 = i10;
        }
        if ((i11 & 2) != 0) {
            i12 |= 48;
        } else if ((i10 & 48) == 0) {
            i12 |= r10.c(z10) ? 32 : 16;
        }
        if ((i11 & 4) != 0) {
            i12 |= 384;
        } else if ((i10 & 384) == 0) {
            i12 |= r10.R(iVar2) ? 256 : 128;
        }
        if ((i11 & 8) != 0) {
            i12 |= 3072;
        } else if ((i10 & 3072) == 0) {
            i12 |= r10.c(z11) ? 2048 : UserMetadata.MAX_ATTRIBUTE_SIZE;
        }
        if ((i10 & 24576) == 0) {
            j11 = j10;
            i12 |= ((i11 & 16) == 0 && r10.j(j11)) ? 16384 : UserMetadata.MAX_INTERNAL_KEY_SIZE;
        } else {
            j11 = j10;
        }
        if ((i11 & 32) != 0) {
            i12 |= 196608;
        } else if ((i10 & 196608) == 0) {
            i12 |= r10.R(iVar3) ? 131072 : 65536;
        }
        if ((74899 & i12) == 74898 && r10.v()) {
            r10.A();
        } else {
            r10.q();
            if ((i10 & 1) == 0 || r10.E()) {
                if ((i11 & 16) != 0) {
                    j11 = c3.k.f7419b.a();
                    i12 &= -57345;
                }
                long j12 = j11;
                r10.P();
                if (y0.p.H()) {
                    y0.p.Q(-843755800, i12, -1, "androidx.compose.foundation.text.selection.SelectionHandle (AndroidSelectionHandles.android.kt:64)");
                }
                boolean f10 = v.f(z10, iVar2, z11);
                l1.a aVar = l1.a.f27323a;
                l1.c d10 = f10 ? aVar.d() : aVar.c();
                int i13 = i12 & 14;
                boolean c10 = ((i12 & 112) == 32) | (i13 == 4 || ((i12 & 8) != 0 && r10.m(iVar))) | r10.c(f10);
                Object f11 = r10.f();
                if (c10 || f11 == y0.m.f51621a.a()) {
                    f11 = new d(iVar, z10, f10);
                    r10.I(f11);
                }
                a(iVar, d10, g1.c.e(280174801, true, new b((y2) r10.t(c1.q()), j12, f10, o2.l.d(iVar3, false, (dn.l) f11, 1, null), iVar), r10, 54), r10, i13 | 384);
                if (y0.p.H()) {
                    y0.p.P();
                }
                j11 = j12;
            } else {
                r10.A();
            }
        }
        x2 y10 = r10.y();
        if (y10 != null) {
            y10.a(new c(iVar, z10, iVar2, z11, j11, iVar3, i10, i11));
        }
    }

    public static final void c(l1.i iVar, dn.a aVar, boolean z10, y0.m mVar, int i10) {
        int i11;
        y0.m r10 = mVar.r(2111672474);
        if ((i10 & 6) == 0) {
            i11 = (r10.R(iVar) ? 4 : 2) | i10;
        } else {
            i11 = i10;
        }
        if ((i10 & 48) == 0) {
            i11 |= r10.m(aVar) ? 32 : 16;
        }
        if ((i10 & 384) == 0) {
            i11 |= r10.c(z10) ? 256 : 128;
        }
        if ((i11 & 147) == 146 && r10.v()) {
            r10.A();
        } else {
            if (y0.p.H()) {
                y0.p.Q(2111672474, i11, -1, "androidx.compose.foundation.text.selection.SelectionHandleIcon (AndroidSelectionHandles.android.kt:122)");
            }
            e0.g0.a(e(androidx.compose.foundation.layout.o.p(iVar, v.c(), v.b()), aVar, z10), r10, 0);
            if (y0.p.H()) {
                y0.p.P();
            }
        }
        x2 y10 = r10.y();
        if (y10 != null) {
            y10.a(new e(iVar, aVar, z10, i10));
        }
    }

    public static final u0 d(p1.d dVar, float f10) {
        int ceil = ((int) Math.ceil(f10)) * 2;
        r0.f fVar = r0.f.f34150a;
        u0 c10 = fVar.c();
        s1.a0 a10 = fVar.a();
        u1.a b10 = fVar.b();
        if (c10 == null || a10 == null || ceil > c10.getWidth() || ceil > c10.getHeight()) {
            c10 = w0.b(ceil, ceil, v0.f35367b.a(), false, null, 24, null);
            fVar.f(c10);
            a10 = s1.c0.a(c10);
            fVar.d(a10);
        }
        u0 u0Var = c10;
        s1.a0 a0Var = a10;
        if (b10 == null) {
            b10 = new u1.a();
            fVar.e(b10);
        }
        u1.a aVar = b10;
        c3.t layoutDirection = dVar.getLayoutDirection();
        long a11 = r1.n.a(u0Var.getWidth(), u0Var.getHeight());
        a.C0873a C = aVar.C();
        c3.d a12 = C.a();
        c3.t b11 = C.b();
        s1.a0 c11 = C.c();
        long d10 = C.d();
        a.C0873a C2 = aVar.C();
        C2.j(dVar);
        C2.k(layoutDirection);
        C2.i(a0Var);
        C2.l(a11);
        a0Var.n();
        u1.f.Y0(aVar, s1.g0.f35254b.a(), 0L, aVar.b(), BitmapDescriptorFactory.HUE_RED, null, null, s1.u.f35333a.a(), 58, null);
        u1.f.Y0(aVar, s1.i0.d(4278190080L), r1.g.f34318b.c(), r1.n.a(f10, f10), BitmapDescriptorFactory.HUE_RED, null, null, 0, 120, null);
        u1.f.C0(aVar, s1.i0.d(4278190080L), f10, r1.h.a(f10, f10), BitmapDescriptorFactory.HUE_RED, null, null, 0, 120, null);
        a0Var.x();
        a.C0873a C3 = aVar.C();
        C3.j(a12);
        C3.k(b11);
        C3.i(c11);
        C3.l(d10);
        return u0Var;
    }

    public static final l1.i e(l1.i iVar, dn.a aVar, boolean z10) {
        return l1.h.c(iVar, null, new f(aVar, z10), 1, null);
    }
}
