package androidx.compose.ui.window;

import android.graphics.Rect;
import android.view.View;
import android.view.ViewGroup;
import android.view.WindowManager;
import androidx.compose.ui.platform.AndroidCompositionLocals_androidKt;
import androidx.compose.ui.platform.c1;
import androidx.compose.ui.platform.o1;
import com.google.android.gms.maps.model.BitmapDescriptorFactory;
import com.google.firebase.crashlytics.internal.metadata.UserMetadata;
import h2.e0;
import h2.f0;
import h2.g0;
import h2.p0;
import j2.g;
import java.util.List;
import java.util.UUID;
import kotlin.jvm.internal.v;
import l1.i;
import o2.u;
import rm.n0;
import rm.y;
import y0.d4;
import y0.h2;
import y0.l0;
import y0.l2;
import y0.m;
import y0.m0;
import y0.n3;
import y0.x;
import y0.x2;
import y0.y3;

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

    /* renamed from: a */
    private static final h2 f2915a = x.d(null, a.f2916p, 1, null);

    /* loaded from: classes.dex */
    static final class a extends v implements dn.a {

        /* renamed from: p */
        public static final a f2916p = new a();

        a() {
            super(0);
        }

        @Override // dn.a
        public final String invoke() {
            return "DEFAULT_TEST_TAG";
        }
    }

    /* renamed from: androidx.compose.ui.window.b$b */
    /* loaded from: classes.dex */
    public static final class C0080b extends v implements dn.l {

        /* renamed from: p */
        final /* synthetic */ l f2917p;

        /* renamed from: q */
        final /* synthetic */ dn.a f2918q;

        /* renamed from: r */
        final /* synthetic */ r f2919r;

        /* renamed from: s */
        final /* synthetic */ String f2920s;

        /* renamed from: t */
        final /* synthetic */ c3.t f2921t;

        /* renamed from: androidx.compose.ui.window.b$b$a */
        /* loaded from: classes.dex */
        public static final class a implements l0 {

            /* renamed from: a */
            final /* synthetic */ l f2922a;

            public a(l lVar) {
                this.f2922a = lVar;
            }

            @Override // y0.l0
            public void a() {
                this.f2922a.e();
                this.f2922a.m();
            }
        }

        /* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
        C0080b(l lVar, dn.a aVar, r rVar, String str, c3.t tVar) {
            super(1);
            this.f2917p = lVar;
            this.f2918q = aVar;
            this.f2919r = rVar;
            this.f2920s = str;
            this.f2921t = tVar;
        }

        @Override // dn.l
        /* renamed from: a */
        public final l0 invoke(m0 m0Var) {
            this.f2917p.r();
            this.f2917p.t(this.f2918q, this.f2919r, this.f2920s, this.f2921t);
            return new a(this.f2917p);
        }
    }

    /* loaded from: classes.dex */
    public static final class c extends v implements dn.a {

        /* renamed from: p */
        final /* synthetic */ l f2923p;

        /* renamed from: q */
        final /* synthetic */ dn.a f2924q;

        /* renamed from: r */
        final /* synthetic */ r f2925r;

        /* renamed from: s */
        final /* synthetic */ String f2926s;

        /* renamed from: t */
        final /* synthetic */ c3.t f2927t;

        /* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
        c(l lVar, dn.a aVar, r rVar, String str, c3.t tVar) {
            super(0);
            this.f2923p = lVar;
            this.f2924q = aVar;
            this.f2925r = rVar;
            this.f2926s = str;
            this.f2927t = tVar;
        }

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

        /* renamed from: invoke */
        public final void m34invoke() {
            this.f2923p.t(this.f2924q, this.f2925r, this.f2926s, this.f2927t);
        }
    }

    /* loaded from: classes.dex */
    public static final class d extends v implements dn.l {

        /* renamed from: p */
        final /* synthetic */ l f2928p;

        /* renamed from: q */
        final /* synthetic */ q f2929q;

        /* loaded from: classes.dex */
        public static final class a implements l0 {
            @Override // y0.l0
            public void a() {
            }
        }

        /* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
        d(l lVar, q qVar) {
            super(1);
            this.f2928p = lVar;
            this.f2929q = qVar;
        }

        @Override // dn.l
        /* renamed from: a */
        public final l0 invoke(m0 m0Var) {
            this.f2928p.setPositionProvider(this.f2929q);
            this.f2928p.x();
            return new a();
        }
    }

    /* loaded from: classes.dex */
    public static final class e extends kotlin.coroutines.jvm.internal.l implements dn.p {

        /* renamed from: p */
        int f2930p;

        /* renamed from: q */
        private /* synthetic */ Object f2931q;

        /* renamed from: r */
        final /* synthetic */ l f2932r;

        /* loaded from: classes.dex */
        public static final class a extends v implements dn.l {

            /* renamed from: p */
            public static final a f2933p = new a();

            a() {
                super(1);
            }

            public final void a(long j10) {
            }

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

        /* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
        e(l lVar, vm.d dVar) {
            super(2, dVar);
            this.f2932r = lVar;
        }

        @Override // kotlin.coroutines.jvm.internal.a
        public final vm.d create(Object obj, vm.d dVar) {
            e eVar = new e(this.f2932r, dVar);
            eVar.f2931q = obj;
            return eVar;
        }

        /* JADX WARN: Removed duplicated region for block: B:12:0x003c  */
        /* JADX WARN: Removed duplicated region for block: B:8:0x0029  */
        /* JADX WARN: Unsupported multi-entry loop pattern (BACK_EDGE: B:9:0x0033 -> B:5:0x0036). Please report as a decompilation issue!!! */
        @Override // kotlin.coroutines.jvm.internal.a
        /*
            Code decompiled incorrectly, please refer to instructions dump.
        */
        public final Object invokeSuspend(Object obj) {
            Object f10;
            tp.m0 m0Var;
            f10 = wm.d.f();
            int i10 = this.f2930p;
            if (i10 == 0) {
                y.b(obj);
                m0Var = (tp.m0) this.f2931q;
                if (tp.n0.h(m0Var)) {
                }
            } else {
                if (i10 != 1) {
                    throw new IllegalStateException("call to 'resume' before 'invoke' with coroutine");
                }
                m0Var = (tp.m0) this.f2931q;
                y.b(obj);
                this.f2932r.p();
                if (tp.n0.h(m0Var)) {
                    a aVar = a.f2933p;
                    this.f2931q = m0Var;
                    this.f2930p = 1;
                    if (o1.a(aVar, this) == f10) {
                        return f10;
                    }
                    this.f2932r.p();
                    if (tp.n0.h(m0Var)) {
                        return n0.f34904a;
                    }
                }
            }
        }

        @Override // dn.p
        public final Object invoke(tp.m0 m0Var, vm.d dVar) {
            return ((e) create(m0Var, dVar)).invokeSuspend(n0.f34904a);
        }
    }

    /* loaded from: classes.dex */
    public static final class f extends v implements dn.l {

        /* renamed from: p */
        final /* synthetic */ l f2934p;

        /* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
        f(l lVar) {
            super(1);
            this.f2934p = lVar;
        }

        public final void a(h2.s sVar) {
            h2.s i02 = sVar.i0();
            kotlin.jvm.internal.t.d(i02);
            this.f2934p.v(i02);
        }

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

    /* loaded from: classes.dex */
    public static final class g implements e0 {

        /* renamed from: a */
        final /* synthetic */ l f2935a;

        /* renamed from: b */
        final /* synthetic */ c3.t f2936b;

        /* loaded from: classes.dex */
        static final class a extends v implements dn.l {

            /* renamed from: p */
            public static final a f2937p = new a();

            a() {
                super(1);
            }

            public final void a(p0.a aVar) {
            }

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

        g(l lVar, c3.t tVar) {
            this.f2935a = lVar;
            this.f2936b = tVar;
        }

        @Override // h2.e0
        public final f0 f(g0 g0Var, List list, long j10) {
            this.f2935a.setParentLayoutDirection(this.f2936b);
            return g0.j0(g0Var, 0, 0, null, a.f2937p, 4, null);
        }
    }

    /* loaded from: classes.dex */
    public static final class h extends v implements dn.p {

        /* renamed from: p */
        final /* synthetic */ q f2938p;

        /* renamed from: q */
        final /* synthetic */ dn.a f2939q;

        /* renamed from: r */
        final /* synthetic */ r f2940r;

        /* renamed from: s */
        final /* synthetic */ dn.p f2941s;

        /* renamed from: t */
        final /* synthetic */ int f2942t;

        /* renamed from: u */
        final /* synthetic */ int f2943u;

        /* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
        h(q qVar, dn.a aVar, r rVar, dn.p pVar, int i10, int i11) {
            super(2);
            this.f2938p = qVar;
            this.f2939q = aVar;
            this.f2940r = rVar;
            this.f2941s = pVar;
            this.f2942t = i10;
            this.f2943u = i11;
        }

        public final void a(y0.m mVar, int i10) {
            b.a(this.f2938p, this.f2939q, this.f2940r, this.f2941s, mVar, l2.a(this.f2942t | 1), this.f2943u);
        }

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

    /* loaded from: classes.dex */
    public static final class i extends v implements dn.a {

        /* renamed from: p */
        public static final i f2944p = new i();

        i() {
            super(0);
        }

        @Override // dn.a
        /* renamed from: a */
        public final UUID invoke() {
            return UUID.randomUUID();
        }
    }

    /* loaded from: classes.dex */
    public static final class j extends v implements dn.p {

        /* renamed from: p */
        final /* synthetic */ l f2945p;

        /* renamed from: q */
        final /* synthetic */ y3 f2946q;

        /* loaded from: classes.dex */
        public static final class a extends v implements dn.l {

            /* renamed from: p */
            public static final a f2947p = new a();

            a() {
                super(1);
            }

            public final void a(u uVar) {
                o2.s.N(uVar);
            }

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

        /* renamed from: androidx.compose.ui.window.b$j$b */
        /* loaded from: classes.dex */
        public static final class C0081b extends v implements dn.l {

            /* renamed from: p */
            final /* synthetic */ l f2948p;

            /* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
            C0081b(l lVar) {
                super(1);
                this.f2948p = lVar;
            }

            public final void a(long j10) {
                this.f2948p.m36setPopupContentSizefhxjrPA(c3.r.b(j10));
                this.f2948p.x();
            }

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

        /* loaded from: classes.dex */
        public static final class c extends v implements dn.p {

            /* renamed from: p */
            final /* synthetic */ y3 f2949p;

            /* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
            c(y3 y3Var) {
                super(2);
                this.f2949p = y3Var;
            }

            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(606497925, i10, -1, "androidx.compose.ui.window.Popup.<anonymous>.<anonymous>.<anonymous>.<anonymous> (AndroidPopup.android.kt:332)");
                }
                b.b(this.f2949p).invoke(mVar, 0);
                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) */
        j(l lVar, y3 y3Var) {
            super(2);
            this.f2945p = lVar;
            this.f2946q = y3Var;
        }

        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(1302892335, i10, -1, "androidx.compose.ui.window.Popup.<anonymous>.<anonymous>.<anonymous> (AndroidPopup.android.kt:321)");
            }
            l1.i d10 = o2.l.d(l1.i.f27362a, false, a.f2947p, 1, null);
            boolean m10 = mVar.m(this.f2945p);
            l lVar = this.f2945p;
            Object f10 = mVar.f();
            if (m10 || f10 == y0.m.f51621a.a()) {
                f10 = new C0081b(lVar);
                mVar.I(f10);
            }
            l1.i a10 = p1.a.a(androidx.compose.ui.layout.e.a(d10, (dn.l) f10), this.f2945p.getCanCalculatePosition() ? 1.0f : BitmapDescriptorFactory.HUE_RED);
            g1.a e10 = g1.c.e(606497925, true, new c(this.f2946q), mVar, 54);
            androidx.compose.ui.window.c cVar = androidx.compose.ui.window.c.f2950a;
            int a11 = y0.j.a(mVar, 0);
            y0.y D = mVar.D();
            l1.i e11 = l1.h.e(mVar, a10);
            g.a aVar = j2.g.f23616d;
            dn.a a12 = aVar.a();
            if (!(mVar.w() instanceof y0.f)) {
                y0.j.c();
            }
            mVar.u();
            if (mVar.n()) {
                mVar.o(a12);
            } else {
                mVar.F();
            }
            y0.m a13 = d4.a(mVar);
            d4.b(a13, cVar, aVar.c());
            d4.b(a13, D, aVar.e());
            dn.p b10 = aVar.b();
            if (a13.n() || !kotlin.jvm.internal.t.b(a13.f(), Integer.valueOf(a11))) {
                a13.I(Integer.valueOf(a11));
                a13.l(Integer.valueOf(a11), b10);
            }
            d4.b(a13, e11, aVar.d());
            e10.invoke(mVar, 6);
            mVar.O();
            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: Removed duplicated region for block: B:101:0x0178  */
    /* JADX WARN: Removed duplicated region for block: B:102:0x016e  */
    /* JADX WARN: Removed duplicated region for block: B:103:0x015a  */
    /* JADX WARN: Removed duplicated region for block: B:104:0x00aa  */
    /* JADX WARN: Removed duplicated region for block: B:105:0x0092  */
    /* JADX WARN: Removed duplicated region for block: B:106:0x0067  */
    /* JADX WARN: Removed duplicated region for block: B:10:0x0049  */
    /* JADX WARN: Removed duplicated region for block: B:113:0x004c  */
    /* JADX WARN: Removed duplicated region for block: B:14:0x0064  */
    /* JADX WARN: Removed duplicated region for block: B:17:0x007e  */
    /* JADX WARN: Removed duplicated region for block: B:22:0x02f3  */
    /* JADX WARN: Removed duplicated region for block: B:25:? A[RETURN, SYNTHETIC] */
    /* JADX WARN: Removed duplicated region for block: B:28:0x008f  */
    /* JADX WARN: Removed duplicated region for block: B:30:0x0096  */
    /* JADX WARN: Removed duplicated region for block: B:33:0x00b2  */
    /* JADX WARN: Removed duplicated region for block: B:36:0x011d  */
    /* JADX WARN: Removed duplicated region for block: B:39:0x016c  */
    /* JADX WARN: Removed duplicated region for block: B:42:0x0176  */
    /* JADX WARN: Removed duplicated region for block: B:45:0x018e  */
    /* JADX WARN: Removed duplicated region for block: B:49:0x01b4  */
    /* JADX WARN: Removed duplicated region for block: B:52:0x01ba  */
    /* JADX WARN: Removed duplicated region for block: B:55:0x01ce  */
    /* JADX WARN: Removed duplicated region for block: B:59:0x01f6  */
    /* JADX WARN: Removed duplicated region for block: B:62:0x0201  */
    /* JADX WARN: Removed duplicated region for block: B:66:0x021e  */
    /* JADX WARN: Removed duplicated region for block: B:70:0x023e  */
    /* JADX WARN: Removed duplicated region for block: B:74:0x0261  */
    /* JADX WARN: Removed duplicated region for block: B:78:0x028b  */
    /* JADX WARN: Removed duplicated region for block: B:81:0x0297  */
    /* JADX WARN: Removed duplicated region for block: B:84:0x02ba  */
    /* JADX WARN: Removed duplicated region for block: B:88:0x02e6  */
    /* JADX WARN: Removed duplicated region for block: B:91:0x029b  */
    /* JADX WARN: Removed duplicated region for block: B:96:0x01f8  */
    /* JADX WARN: Removed duplicated region for block: B:98:0x01bc  */
    /* JADX WARN: Removed duplicated region for block: B:99:0x01b6  */
    /*
        Code decompiled incorrectly, please refer to instructions dump.
    */
    public static final void a(q qVar, dn.a aVar, r rVar, dn.p pVar, y0.m mVar, int i10, int i11) {
        int i12;
        dn.a aVar2;
        int i13;
        r rVar2;
        int i14;
        dn.a aVar3;
        r rVar3;
        Object f10;
        m.a aVar4;
        String str;
        boolean z10;
        int i15;
        int i16;
        Object obj;
        boolean m10;
        Object f11;
        boolean m11;
        Object f12;
        boolean m12;
        Object f13;
        boolean m13;
        Object f14;
        boolean m14;
        Object f15;
        boolean m15;
        Object f16;
        int a10;
        y0.m a11;
        dn.a aVar5;
        r rVar4;
        x2 y10;
        y0.m r10 = mVar.r(-830247068);
        if ((i11 & 1) != 0) {
            i12 = i10 | 6;
        } else if ((i10 & 6) == 0) {
            i12 = (r10.R(qVar) ? 4 : 2) | i10;
        } else {
            i12 = i10;
        }
        int i17 = i11 & 2;
        if (i17 != 0) {
            i12 |= 48;
        } else if ((i10 & 48) == 0) {
            aVar2 = aVar;
            i12 |= r10.m(aVar2) ? 32 : 16;
            i13 = i11 & 4;
            if (i13 == 0) {
                i12 |= 384;
            } else if ((i10 & 384) == 0) {
                rVar2 = rVar;
                i12 |= r10.R(rVar2) ? 256 : 128;
                if ((i11 & 8) != 0) {
                    i12 |= 3072;
                } else if ((i10 & 3072) == 0) {
                    i12 |= r10.m(pVar) ? 2048 : UserMetadata.MAX_ATTRIBUTE_SIZE;
                }
                i14 = i12;
                if ((i14 & 1171) == 1170 || !r10.v()) {
                    aVar3 = i17 != 0 ? null : aVar2;
                    rVar3 = i13 != 0 ? new r(false, false, false, false, 15, (kotlin.jvm.internal.k) null) : rVar2;
                    if (y0.p.H()) {
                        y0.p.Q(-830247068, i14, -1, "androidx.compose.ui.window.Popup (AndroidPopup.android.kt:302)");
                    }
                    View view = (View) r10.t(AndroidCompositionLocals_androidKt.k());
                    c3.d dVar = (c3.d) r10.t(c1.d());
                    String str2 = (String) r10.t(f2915a);
                    c3.t tVar = (c3.t) r10.t(c1.j());
                    y0.r d10 = y0.j.d(r10, 0);
                    y3 o10 = n3.o(pVar, r10, (i14 >> 9) & 14);
                    UUID uuid = (UUID) i1.b.c(new Object[0], null, null, i.f2944p, r10, 3072, 6);
                    f10 = r10.f();
                    aVar4 = y0.m.f51621a;
                    if (f10 == aVar4.a()) {
                        str = str2;
                        i15 = i14;
                        i16 = 32;
                        l lVar = new l(aVar3, rVar3, str2, view, dVar, qVar, uuid, null, 128, null);
                        j jVar = new j(lVar, o10);
                        z10 = true;
                        lVar.q(d10, g1.c.c(1302892335, true, jVar));
                        r10.I(lVar);
                        obj = lVar;
                    } else {
                        str = str2;
                        z10 = true;
                        i15 = i14;
                        i16 = 32;
                        obj = f10;
                    }
                    l lVar2 = (l) obj;
                    int i18 = i15;
                    int i19 = i18 & 112;
                    int i20 = i18 & 896;
                    String str3 = str;
                    m10 = r10.m(lVar2) | (i19 == i16 ? z10 : false) | (i20 == 256 ? z10 : false) | r10.R(str3) | r10.R(tVar);
                    f11 = r10.f();
                    if (!m10 || f11 == aVar4.a()) {
                        f11 = new C0080b(lVar2, aVar3, rVar3, str3, tVar);
                        r10.I(f11);
                    }
                    y0.p0.a(lVar2, (dn.l) f11, r10, 0);
                    m11 = (i19 == i16 ? z10 : false) | r10.m(lVar2) | (i20 == 256 ? z10 : false) | r10.R(str3) | r10.R(tVar);
                    f12 = r10.f();
                    if (!m11 || f12 == aVar4.a()) {
                        f12 = new c(lVar2, aVar3, rVar3, str3, tVar);
                        r10.I(f12);
                    }
                    y0.p0.g((dn.a) f12, r10, 0);
                    int i21 = i18 & 14;
                    m12 = r10.m(lVar2) | (i21 == 4 ? z10 : false);
                    f13 = r10.f();
                    if (!m12 || f13 == aVar4.a()) {
                        f13 = new d(lVar2, qVar);
                        r10.I(f13);
                    }
                    y0.p0.a(qVar, (dn.l) f13, r10, i21);
                    m13 = r10.m(lVar2);
                    f14 = r10.f();
                    if (!m13 || f14 == aVar4.a()) {
                        f14 = new e(lVar2, null);
                        r10.I(f14);
                    }
                    y0.p0.d(lVar2, (dn.p) f14, r10, 0);
                    i.a aVar6 = l1.i.f27362a;
                    m14 = r10.m(lVar2);
                    f15 = r10.f();
                    if (!m14 || f15 == aVar4.a()) {
                        f15 = new f(lVar2);
                        r10.I(f15);
                    }
                    l1.i a12 = androidx.compose.ui.layout.c.a(aVar6, (dn.l) f15);
                    m15 = r10.m(lVar2) | r10.R(tVar);
                    f16 = r10.f();
                    if (!m15 || f16 == aVar4.a()) {
                        f16 = new g(lVar2, tVar);
                        r10.I(f16);
                    }
                    e0 e0Var = (e0) f16;
                    a10 = y0.j.a(r10, 0);
                    y0.y D = r10.D();
                    l1.i e10 = l1.h.e(r10, a12);
                    g.a aVar7 = j2.g.f23616d;
                    dn.a a13 = aVar7.a();
                    if (!(r10.w() instanceof y0.f)) {
                        y0.j.c();
                    }
                    r10.u();
                    if (r10.n()) {
                        r10.o(a13);
                    } else {
                        r10.F();
                    }
                    a11 = d4.a(r10);
                    d4.b(a11, e0Var, aVar7.c());
                    d4.b(a11, D, aVar7.e());
                    dn.p b10 = aVar7.b();
                    if (!a11.n() || !kotlin.jvm.internal.t.b(a11.f(), Integer.valueOf(a10))) {
                        a11.I(Integer.valueOf(a10));
                        a11.l(Integer.valueOf(a10), b10);
                    }
                    d4.b(a11, e10, aVar7.d());
                    r10.O();
                    if (y0.p.H()) {
                        y0.p.P();
                    }
                    aVar5 = aVar3;
                    rVar4 = rVar3;
                } else {
                    r10.A();
                    aVar5 = aVar2;
                    rVar4 = rVar2;
                }
                y10 = r10.y();
                if (y10 != null) {
                    y10.a(new h(qVar, aVar5, rVar4, pVar, i10, i11));
                    return;
                }
                return;
            }
            rVar2 = rVar;
            if ((i11 & 8) != 0) {
            }
            i14 = i12;
            if ((i14 & 1171) == 1170) {
            }
            if (i17 != 0) {
            }
            if (i13 != 0) {
            }
            if (y0.p.H()) {
            }
            View view2 = (View) r10.t(AndroidCompositionLocals_androidKt.k());
            c3.d dVar2 = (c3.d) r10.t(c1.d());
            String str22 = (String) r10.t(f2915a);
            c3.t tVar2 = (c3.t) r10.t(c1.j());
            y0.r d102 = y0.j.d(r10, 0);
            y3 o102 = n3.o(pVar, r10, (i14 >> 9) & 14);
            UUID uuid2 = (UUID) i1.b.c(new Object[0], null, null, i.f2944p, r10, 3072, 6);
            f10 = r10.f();
            aVar4 = y0.m.f51621a;
            if (f10 == aVar4.a()) {
            }
            l lVar22 = (l) obj;
            int i182 = i15;
            int i192 = i182 & 112;
            int i202 = i182 & 896;
            String str32 = str;
            m10 = r10.m(lVar22) | (i192 == i16 ? z10 : false) | (i202 == 256 ? z10 : false) | r10.R(str32) | r10.R(tVar2);
            f11 = r10.f();
            if (!m10) {
            }
            f11 = new C0080b(lVar22, aVar3, rVar3, str32, tVar2);
            r10.I(f11);
            y0.p0.a(lVar22, (dn.l) f11, r10, 0);
            m11 = (i192 == i16 ? z10 : false) | r10.m(lVar22) | (i202 == 256 ? z10 : false) | r10.R(str32) | r10.R(tVar2);
            f12 = r10.f();
            if (!m11) {
            }
            f12 = new c(lVar22, aVar3, rVar3, str32, tVar2);
            r10.I(f12);
            y0.p0.g((dn.a) f12, r10, 0);
            int i212 = i182 & 14;
            m12 = r10.m(lVar22) | (i212 == 4 ? z10 : false);
            f13 = r10.f();
            if (!m12) {
            }
            f13 = new d(lVar22, qVar);
            r10.I(f13);
            y0.p0.a(qVar, (dn.l) f13, r10, i212);
            m13 = r10.m(lVar22);
            f14 = r10.f();
            if (!m13) {
            }
            f14 = new e(lVar22, null);
            r10.I(f14);
            y0.p0.d(lVar22, (dn.p) f14, r10, 0);
            i.a aVar62 = l1.i.f27362a;
            m14 = r10.m(lVar22);
            f15 = r10.f();
            if (!m14) {
            }
            f15 = new f(lVar22);
            r10.I(f15);
            l1.i a122 = androidx.compose.ui.layout.c.a(aVar62, (dn.l) f15);
            m15 = r10.m(lVar22) | r10.R(tVar2);
            f16 = r10.f();
            if (!m15) {
            }
            f16 = new g(lVar22, tVar2);
            r10.I(f16);
            e0 e0Var2 = (e0) f16;
            a10 = y0.j.a(r10, 0);
            y0.y D2 = r10.D();
            l1.i e102 = l1.h.e(r10, a122);
            g.a aVar72 = j2.g.f23616d;
            dn.a a132 = aVar72.a();
            if (!(r10.w() instanceof y0.f)) {
            }
            r10.u();
            if (r10.n()) {
            }
            a11 = d4.a(r10);
            d4.b(a11, e0Var2, aVar72.c());
            d4.b(a11, D2, aVar72.e());
            dn.p b102 = aVar72.b();
            if (!a11.n()) {
            }
            a11.I(Integer.valueOf(a10));
            a11.l(Integer.valueOf(a10), b102);
            d4.b(a11, e102, aVar72.d());
            r10.O();
            if (y0.p.H()) {
            }
            aVar5 = aVar3;
            rVar4 = rVar3;
            y10 = r10.y();
            if (y10 != null) {
            }
        }
        aVar2 = aVar;
        i13 = i11 & 4;
        if (i13 == 0) {
        }
        rVar2 = rVar;
        if ((i11 & 8) != 0) {
        }
        i14 = i12;
        if ((i14 & 1171) == 1170) {
        }
        if (i17 != 0) {
        }
        if (i13 != 0) {
        }
        if (y0.p.H()) {
        }
        View view22 = (View) r10.t(AndroidCompositionLocals_androidKt.k());
        c3.d dVar22 = (c3.d) r10.t(c1.d());
        String str222 = (String) r10.t(f2915a);
        c3.t tVar22 = (c3.t) r10.t(c1.j());
        y0.r d1022 = y0.j.d(r10, 0);
        y3 o1022 = n3.o(pVar, r10, (i14 >> 9) & 14);
        UUID uuid22 = (UUID) i1.b.c(new Object[0], null, null, i.f2944p, r10, 3072, 6);
        f10 = r10.f();
        aVar4 = y0.m.f51621a;
        if (f10 == aVar4.a()) {
        }
        l lVar222 = (l) obj;
        int i1822 = i15;
        int i1922 = i1822 & 112;
        int i2022 = i1822 & 896;
        String str322 = str;
        m10 = r10.m(lVar222) | (i1922 == i16 ? z10 : false) | (i2022 == 256 ? z10 : false) | r10.R(str322) | r10.R(tVar22);
        f11 = r10.f();
        if (!m10) {
        }
        f11 = new C0080b(lVar222, aVar3, rVar3, str322, tVar22);
        r10.I(f11);
        y0.p0.a(lVar222, (dn.l) f11, r10, 0);
        m11 = (i1922 == i16 ? z10 : false) | r10.m(lVar222) | (i2022 == 256 ? z10 : false) | r10.R(str322) | r10.R(tVar22);
        f12 = r10.f();
        if (!m11) {
        }
        f12 = new c(lVar222, aVar3, rVar3, str322, tVar22);
        r10.I(f12);
        y0.p0.g((dn.a) f12, r10, 0);
        int i2122 = i1822 & 14;
        m12 = r10.m(lVar222) | (i2122 == 4 ? z10 : false);
        f13 = r10.f();
        if (!m12) {
        }
        f13 = new d(lVar222, qVar);
        r10.I(f13);
        y0.p0.a(qVar, (dn.l) f13, r10, i2122);
        m13 = r10.m(lVar222);
        f14 = r10.f();
        if (!m13) {
        }
        f14 = new e(lVar222, null);
        r10.I(f14);
        y0.p0.d(lVar222, (dn.p) f14, r10, 0);
        i.a aVar622 = l1.i.f27362a;
        m14 = r10.m(lVar222);
        f15 = r10.f();
        if (!m14) {
        }
        f15 = new f(lVar222);
        r10.I(f15);
        l1.i a1222 = androidx.compose.ui.layout.c.a(aVar622, (dn.l) f15);
        m15 = r10.m(lVar222) | r10.R(tVar22);
        f16 = r10.f();
        if (!m15) {
        }
        f16 = new g(lVar222, tVar22);
        r10.I(f16);
        e0 e0Var22 = (e0) f16;
        a10 = y0.j.a(r10, 0);
        y0.y D22 = r10.D();
        l1.i e1022 = l1.h.e(r10, a1222);
        g.a aVar722 = j2.g.f23616d;
        dn.a a1322 = aVar722.a();
        if (!(r10.w() instanceof y0.f)) {
        }
        r10.u();
        if (r10.n()) {
        }
        a11 = d4.a(r10);
        d4.b(a11, e0Var22, aVar722.c());
        d4.b(a11, D22, aVar722.e());
        dn.p b1022 = aVar722.b();
        if (!a11.n()) {
        }
        a11.I(Integer.valueOf(a10));
        a11.l(Integer.valueOf(a10), b1022);
        d4.b(a11, e1022, aVar722.d());
        r10.O();
        if (y0.p.H()) {
        }
        aVar5 = aVar3;
        rVar4 = rVar3;
        y10 = r10.y();
        if (y10 != null) {
        }
    }

    public static final dn.p b(y3 y3Var) {
        return (dn.p) y3Var.getValue();
    }

    public static final int g(boolean z10, s sVar, boolean z11) {
        int i10 = !z10 ? 262152 : 262144;
        if (sVar == s.SecureOn) {
            i10 |= UserMetadata.MAX_INTERNAL_KEY_SIZE;
        }
        return !z11 ? i10 | 512 : i10;
    }

    public static final int h(r rVar, boolean z10) {
        return (rVar.e() && z10) ? rVar.d() | UserMetadata.MAX_INTERNAL_KEY_SIZE : (!rVar.e() || z10) ? rVar.d() : rVar.d() & (-8193);
    }

    public static final boolean i(View view) {
        ViewGroup.LayoutParams layoutParams = view.getRootView().getLayoutParams();
        WindowManager.LayoutParams layoutParams2 = layoutParams instanceof WindowManager.LayoutParams ? (WindowManager.LayoutParams) layoutParams : null;
        return (layoutParams2 == null || (layoutParams2.flags & UserMetadata.MAX_INTERNAL_KEY_SIZE) == 0) ? false : true;
    }

    public static final c3.p j(Rect rect) {
        return new c3.p(rect.left, rect.top, rect.right, rect.bottom);
    }
}
