package a0;

import android.R;
import android.content.Context;
import android.content.res.ColorStateList;
import android.content.res.Configuration;
import android.content.res.TypedArray;
import androidx.compose.foundation.layout.o;
import androidx.compose.ui.platform.AndroidCompositionLocals_androidKt;
import androidx.compose.ui.window.r;
import com.google.android.gms.maps.model.BitmapDescriptorFactory;
import com.google.firebase.crashlytics.internal.metadata.UserMetadata;
import dn.l;
import dn.p;
import dn.q;
import e0.b;
import e0.c0;
import e0.f0;
import e0.t;
import h2.e0;
import j2.g;
import kotlin.jvm.internal.v;
import l1.c;
import rm.n0;
import s1.g0;
import s1.i0;
import y0.d4;
import y0.l2;
import y0.m;
import y0.x2;
import y0.y;

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

    /* renamed from: a, reason: collision with root package name */
    private static final r f74a = new r(true, false, false, false, 14, (kotlin.jvm.internal.k) null);

    /* renamed from: b, reason: collision with root package name */
    private static final a0.b f75b;

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

        /* renamed from: p, reason: collision with root package name */
        final /* synthetic */ a0.b f76p;

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

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

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

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

        /* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
        a(a0.b bVar, l1.i iVar, q qVar, int i10, int i11) {
            super(2);
            this.f76p = bVar;
            this.f77q = iVar;
            this.f78r = qVar;
            this.f79s = i10;
            this.f80t = i11;
        }

        public final void a(m mVar, int i10) {
            k.a(this.f76p, this.f77q, this.f78r, mVar, l2.a(this.f79s | 1), this.f80t);
        }

        @Override // dn.p
        public /* bridge */ /* synthetic */ Object invoke(Object obj, Object obj2) {
            a((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 v implements dn.a {

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

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

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

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

        /* renamed from: invoke, reason: collision with other method in class */
        public final void m3invoke() {
            if (this.f81p) {
                this.f82q.invoke();
            }
        }
    }

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

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

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

        /* renamed from: r, reason: collision with root package name */
        final /* synthetic */ a0.b f85r;

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

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

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

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

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

        /* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
        c(String str, boolean z10, a0.b bVar, l1.i iVar, q qVar, dn.a aVar, int i10, int i11) {
            super(2);
            this.f83p = str;
            this.f84q = z10;
            this.f85r = bVar;
            this.f86s = iVar;
            this.f87t = qVar;
            this.f88u = aVar;
            this.f89v = i10;
            this.f90w = i11;
        }

        public final void a(m mVar, int i10) {
            k.b(this.f83p, this.f84q, this.f85r, this.f86s, this.f87t, this.f88u, mVar, l2.a(this.f89v | 1), this.f90w);
        }

        @Override // dn.p
        public /* bridge */ /* synthetic */ Object invoke(Object obj, Object obj2) {
            a((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 v implements p {

        /* renamed from: p, reason: collision with root package name */
        final /* synthetic */ androidx.compose.ui.window.q f91p;

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

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

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

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

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

        /* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
        d(androidx.compose.ui.window.q qVar, dn.a aVar, l1.i iVar, l lVar, int i10, int i11) {
            super(2);
            this.f91p = qVar;
            this.f92q = aVar;
            this.f93r = iVar;
            this.f94s = lVar;
            this.f95t = i10;
            this.f96u = i11;
        }

        public final void a(m mVar, int i10) {
            k.d(this.f91p, this.f92q, this.f93r, this.f94s, mVar, l2.a(this.f95t | 1), this.f96u);
        }

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

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

        /* renamed from: p, reason: collision with root package name */
        final /* synthetic */ a0.b f97p;

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

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

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

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

            /* renamed from: q, reason: collision with root package name */
            final /* synthetic */ a0.b f101q;

            /* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
            a(l lVar, a0.b bVar) {
                super(3);
                this.f100p = lVar;
                this.f101q = bVar;
            }

            public final void a(e0.f fVar, m mVar, int i10) {
                if ((i10 & 17) == 16 && mVar.v()) {
                    mVar.A();
                    return;
                }
                if (y0.p.H()) {
                    y0.p.Q(1156688164, i10, -1, "androidx.compose.foundation.contextmenu.ContextMenuPopup.<anonymous>.<anonymous> (ContextMenuUi.android.kt:128)");
                }
                Object f10 = mVar.f();
                if (f10 == m.f51621a.a()) {
                    f10 = new g();
                    mVar.I(f10);
                }
                g gVar = (g) f10;
                l lVar = this.f100p;
                a0.b bVar = this.f101q;
                gVar.b();
                lVar.invoke(gVar);
                gVar.a(bVar, mVar, 0);
                if (y0.p.H()) {
                    y0.p.P();
                }
            }

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

        /* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
        e(a0.b bVar, l1.i iVar, l lVar) {
            super(2);
            this.f97p = bVar;
            this.f98q = iVar;
            this.f99r = lVar;
        }

        public final void a(m mVar, int i10) {
            if ((i10 & 3) == 2 && mVar.v()) {
                mVar.A();
                return;
            }
            if (y0.p.H()) {
                y0.p.Q(795909757, i10, -1, "androidx.compose.foundation.contextmenu.ContextMenuPopup.<anonymous> (ContextMenuUi.android.kt:127)");
            }
            a0.b bVar = this.f97p;
            k.a(bVar, this.f98q, g1.c.e(1156688164, true, new a(this.f99r, bVar), mVar, 54), mVar, 384, 0);
            if (y0.p.H()) {
                y0.p.P();
            }
        }

        @Override // dn.p
        public /* bridge */ /* synthetic */ Object invoke(Object obj, Object obj2) {
            a((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 v implements p {

        /* renamed from: p, reason: collision with root package name */
        final /* synthetic */ androidx.compose.ui.window.q f102p;

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

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

        /* renamed from: s, reason: collision with root package name */
        final /* synthetic */ a0.b f105s;

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

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

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

        /* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
        f(androidx.compose.ui.window.q qVar, dn.a aVar, l1.i iVar, a0.b bVar, l lVar, int i10, int i11) {
            super(2);
            this.f102p = qVar;
            this.f103q = aVar;
            this.f104r = iVar;
            this.f105s = bVar;
            this.f106t = lVar;
            this.f107u = i10;
            this.f108v = i11;
        }

        public final void a(m mVar, int i10) {
            k.c(this.f102p, this.f103q, this.f104r, this.f105s, this.f106t, mVar, l2.a(this.f107u | 1), this.f108v);
        }

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

    static {
        g0.a aVar = g0.f35254b;
        f75b = new a0.b(aVar.g(), aVar.a(), aVar.a(), g0.l(aVar.a(), 0.38f, BitmapDescriptorFactory.HUE_RED, BitmapDescriptorFactory.HUE_RED, BitmapDescriptorFactory.HUE_RED, 14, null), g0.l(aVar.a(), 0.38f, BitmapDescriptorFactory.HUE_RED, BitmapDescriptorFactory.HUE_RED, BitmapDescriptorFactory.HUE_RED, 14, null), null);
    }

    /* JADX WARN: Removed duplicated region for block: B:10:0x004b  */
    /* JADX WARN: Removed duplicated region for block: B:18:0x0176  */
    /* JADX WARN: Removed duplicated region for block: B:21:? A[RETURN, SYNTHETIC] */
    /* JADX WARN: Removed duplicated region for block: B:23:0x0073  */
    /* JADX WARN: Removed duplicated region for block: B:26:0x007d  */
    /* JADX WARN: Removed duplicated region for block: B:29:0x0103  */
    /* JADX WARN: Removed duplicated region for block: B:32:0x010f  */
    /* JADX WARN: Removed duplicated region for block: B:39:0x016d  */
    /* JADX WARN: Removed duplicated region for block: B:41:0x0113  */
    /* JADX WARN: Removed duplicated region for block: B:42:0x0076  */
    /* JADX WARN: Removed duplicated region for block: B:43:0x004e  */
    /*
        Code decompiled incorrectly, please refer to instructions dump.
    */
    public static final void a(a0.b bVar, l1.i iVar, q qVar, m mVar, int i10, int i11) {
        int i12;
        l1.i iVar2;
        l1.i iVar3;
        int a10;
        m a11;
        x2 y10;
        m r10 = mVar.r(-921259293);
        if ((i11 & 1) != 0) {
            i12 = i10 | 6;
        } else if ((i10 & 6) == 0) {
            i12 = (r10.R(bVar) ? 4 : 2) | i10;
        } else {
            i12 = i10;
        }
        int i13 = i11 & 2;
        if (i13 != 0) {
            i12 |= 48;
        } else if ((i10 & 48) == 0) {
            iVar2 = iVar;
            i12 |= r10.R(iVar2) ? 32 : 16;
            if ((i11 & 4) == 0) {
                i12 |= 384;
            } else if ((i10 & 384) == 0) {
                i12 |= r10.m(qVar) ? 256 : 128;
            }
            if ((i12 & 147) == 146 || !r10.v()) {
                iVar3 = i13 == 0 ? l1.i.f27362a : iVar2;
                if (y0.p.H()) {
                    y0.p.Q(-921259293, i12, -1, "androidx.compose.foundation.contextmenu.ContextMenuColumn (ContextMenuUi.android.kt:144)");
                }
                h hVar = h.f56a;
                l1.i d10 = androidx.compose.foundation.m.d(androidx.compose.foundation.layout.l.k(androidx.compose.foundation.layout.g.b(androidx.compose.foundation.b.d(p1.j.b(iVar3, hVar.h(), k0.g.c(hVar.c()), false, 0L, 0L, 28, null), bVar.a(), null, 2, null), t.Max), BitmapDescriptorFactory.HUE_RED, hVar.i(), 1, null), androidx.compose.foundation.m.a(0, r10, 0, 1), false, null, false, 14, null);
                int i14 = (i12 << 3) & 7168;
                int i15 = i14 >> 3;
                e0 a12 = e0.d.a(e0.b.f16607a.h(), l1.c.f27332a.k(), r10, (i15 & 112) | (i15 & 14));
                a10 = y0.j.a(r10, 0);
                y D = r10.D();
                l1.i e10 = l1.h.e(r10, d10);
                g.a aVar = j2.g.f23616d;
                dn.a a13 = aVar.a();
                if (!(r10.w() instanceof y0.f)) {
                    y0.j.c();
                }
                r10.u();
                if (r10.n()) {
                    r10.F();
                } else {
                    r10.o(a13);
                }
                a11 = d4.a(r10);
                d4.b(a11, a12, aVar.c());
                d4.b(a11, D, aVar.e());
                p b10 = aVar.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, aVar.d());
                qVar.invoke(e0.g.f16653a, r10, Integer.valueOf(((i14 >> 6) & 112) | 6));
                r10.O();
                if (y0.p.H()) {
                    y0.p.P();
                }
            } else {
                r10.A();
                iVar3 = iVar2;
            }
            y10 = r10.y();
            if (y10 == null) {
                y10.a(new a(bVar, iVar3, qVar, i10, i11));
                return;
            }
            return;
        }
        iVar2 = iVar;
        if ((i11 & 4) == 0) {
        }
        if ((i12 & 147) == 146) {
        }
        if (i13 == 0) {
        }
        if (y0.p.H()) {
        }
        h hVar2 = h.f56a;
        l1.i d102 = androidx.compose.foundation.m.d(androidx.compose.foundation.layout.l.k(androidx.compose.foundation.layout.g.b(androidx.compose.foundation.b.d(p1.j.b(iVar3, hVar2.h(), k0.g.c(hVar2.c()), false, 0L, 0L, 28, null), bVar.a(), null, 2, null), t.Max), BitmapDescriptorFactory.HUE_RED, hVar2.i(), 1, null), androidx.compose.foundation.m.a(0, r10, 0, 1), false, null, false, 14, null);
        int i142 = (i12 << 3) & 7168;
        int i152 = i142 >> 3;
        e0 a122 = e0.d.a(e0.b.f16607a.h(), l1.c.f27332a.k(), r10, (i152 & 112) | (i152 & 14));
        a10 = y0.j.a(r10, 0);
        y D2 = r10.D();
        l1.i e102 = l1.h.e(r10, d102);
        g.a aVar2 = j2.g.f23616d;
        dn.a a132 = aVar2.a();
        if (!(r10.w() instanceof y0.f)) {
        }
        r10.u();
        if (r10.n()) {
        }
        a11 = d4.a(r10);
        d4.b(a11, a122, aVar2.c());
        d4.b(a11, D2, aVar2.e());
        p b102 = aVar2.b();
        if (!a11.n()) {
        }
        a11.I(Integer.valueOf(a10));
        a11.l(Integer.valueOf(a10), b102);
        d4.b(a11, e102, aVar2.d());
        qVar.invoke(e0.g.f16653a, r10, Integer.valueOf(((i142 >> 6) & 112) | 6));
        r10.O();
        if (y0.p.H()) {
        }
        y10 = r10.y();
        if (y10 == null) {
        }
    }

    /* JADX WARN: Removed duplicated region for block: B:100:0x0080  */
    /* JADX WARN: Removed duplicated region for block: B:16:0x007d  */
    /* JADX WARN: Removed duplicated region for block: B:20:0x009d  */
    /* JADX WARN: Removed duplicated region for block: B:23:0x00b9  */
    /* JADX WARN: Removed duplicated region for block: B:28:0x02dc  */
    /* JADX WARN: Removed duplicated region for block: B:31:? A[RETURN, SYNTHETIC] */
    /* JADX WARN: Removed duplicated region for block: B:33:0x00c9  */
    /* JADX WARN: Removed duplicated region for block: B:35:0x00d2  */
    /* JADX WARN: Removed duplicated region for block: B:38:0x00d9  */
    /* JADX WARN: Removed duplicated region for block: B:41:0x00f7  */
    /* JADX WARN: Removed duplicated region for block: B:44:0x00ff  */
    /* JADX WARN: Removed duplicated region for block: B:47:0x0109  */
    /* JADX WARN: Removed duplicated region for block: B:51:0x0180  */
    /* JADX WARN: Removed duplicated region for block: B:54:0x018c  */
    /* JADX WARN: Removed duplicated region for block: B:57:0x01af  */
    /* JADX WARN: Removed duplicated region for block: B:61:0x01d6  */
    /* JADX WARN: Removed duplicated region for block: B:64:0x0293  */
    /* JADX WARN: Removed duplicated region for block: B:67:0x02d0  */
    /* JADX WARN: Removed duplicated region for block: B:69:0x0298  */
    /* JADX WARN: Removed duplicated region for block: B:70:0x01e1  */
    /* JADX WARN: Removed duplicated region for block: B:88:0x0190  */
    /* JADX WARN: Removed duplicated region for block: B:90:0x0101  */
    /* JADX WARN: Removed duplicated region for block: B:91:0x00f9  */
    /* JADX WARN: Removed duplicated region for block: B:92:0x00ce  */
    /* JADX WARN: Removed duplicated region for block: B:93:0x00a0  */
    /*
        Code decompiled incorrectly, please refer to instructions dump.
    */
    public static final void b(String str, boolean z10, a0.b bVar, l1.i iVar, q qVar, dn.a aVar, m mVar, int i10, int i11) {
        int i12;
        l1.i iVar2;
        int i13;
        q qVar2;
        int i14;
        boolean z11;
        Object f10;
        q qVar3;
        int a10;
        m a11;
        m mVar2;
        q qVar4;
        x2 y10;
        m r10 = mVar.r(791018367);
        if ((i11 & 1) != 0) {
            i12 = i10 | 6;
        } else if ((i10 & 6) == 0) {
            i12 = (r10.R(str) ? 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(bVar) ? 256 : 128;
        }
        int i15 = i11 & 8;
        if (i15 != 0) {
            i12 |= 3072;
        } else if ((i10 & 3072) == 0) {
            iVar2 = iVar;
            i12 |= r10.R(iVar2) ? 2048 : UserMetadata.MAX_ATTRIBUTE_SIZE;
            i13 = i11 & 16;
            if (i13 == 0) {
                i12 |= 24576;
            } else if ((i10 & 24576) == 0) {
                qVar2 = qVar;
                i12 |= r10.m(qVar2) ? 16384 : UserMetadata.MAX_INTERNAL_KEY_SIZE;
                if ((i11 & 32) != 0) {
                    i12 |= 196608;
                } else if ((i10 & 196608) == 0) {
                    i12 |= r10.m(aVar) ? 131072 : 65536;
                }
                i14 = i12;
                if ((74899 & i14) == 74898 || !r10.v()) {
                    l1.i iVar3 = i15 != 0 ? l1.i.f27362a : iVar2;
                    if (i13 != 0) {
                        qVar2 = null;
                    }
                    if (y0.p.H()) {
                        y0.p.Q(791018367, i14, -1, "androidx.compose.foundation.contextmenu.ContextMenuItem (ContextMenuUi.android.kt:181)");
                    }
                    h hVar = h.f56a;
                    c.InterfaceC0608c f11 = hVar.f();
                    b.f o10 = e0.b.f16607a.o(hVar.d());
                    z11 = ((i14 & 112) == 32) | ((458752 & i14) == 131072);
                    f10 = r10.f();
                    if (!z11 || f10 == m.f51621a.a()) {
                        f10 = new b(z10, aVar);
                        r10.I(f10);
                    }
                    qVar3 = qVar2;
                    l1.i k10 = androidx.compose.foundation.layout.l.k(o.q(o.h(androidx.compose.foundation.d.d(iVar3, z10, str, null, (dn.a) f10, 4, null), BitmapDescriptorFactory.HUE_RED, 1, null), hVar.b(), hVar.g(), hVar.a(), hVar.g()), hVar.d(), BitmapDescriptorFactory.HUE_RED, 2, null);
                    e0 b10 = c0.b(o10, f11, r10, 54);
                    a10 = y0.j.a(r10, 0);
                    y D = r10.D();
                    l1.i e10 = l1.h.e(r10, k10);
                    g.a aVar2 = j2.g.f23616d;
                    dn.a a12 = aVar2.a();
                    if (!(r10.w() instanceof y0.f)) {
                        y0.j.c();
                    }
                    r10.u();
                    if (r10.n()) {
                        r10.o(a12);
                    } else {
                        r10.F();
                    }
                    a11 = d4.a(r10);
                    d4.b(a11, b10, aVar2.c());
                    d4.b(a11, D, aVar2.e());
                    p b11 = aVar2.b();
                    if (!a11.n() || !kotlin.jvm.internal.t.b(a11.f(), Integer.valueOf(a10))) {
                        a11.I(Integer.valueOf(a10));
                        a11.l(Integer.valueOf(a10), b11);
                    }
                    d4.b(a11, e10, aVar2.d());
                    f0 f0Var = f0.f16652a;
                    if (qVar3 == null) {
                        r10.S(554568909);
                    } else {
                        r10.S(554568910);
                        l1.i n10 = o.n(l1.i.f27362a, hVar.e(), BitmapDescriptorFactory.HUE_RED, hVar.e(), hVar.e(), 2, null);
                        e0 h10 = androidx.compose.foundation.layout.b.h(l1.c.f27332a.o(), false);
                        int a13 = y0.j.a(r10, 0);
                        y D2 = r10.D();
                        l1.i e11 = l1.h.e(r10, n10);
                        dn.a a14 = aVar2.a();
                        if (!(r10.w() instanceof y0.f)) {
                            y0.j.c();
                        }
                        r10.u();
                        if (r10.n()) {
                            r10.o(a14);
                        } else {
                            r10.F();
                        }
                        m a15 = d4.a(r10);
                        d4.b(a15, h10, aVar2.c());
                        d4.b(a15, D2, aVar2.e());
                        p b12 = aVar2.b();
                        if (a15.n() || !kotlin.jvm.internal.t.b(a15.f(), Integer.valueOf(a13))) {
                            a15.I(Integer.valueOf(a13));
                            a15.l(Integer.valueOf(a13), b12);
                        }
                        d4.b(a15, e11, aVar2.d());
                        androidx.compose.foundation.layout.d dVar = androidx.compose.foundation.layout.d.f1828a;
                        qVar3.invoke(g0.h(z10 ? bVar.d() : bVar.b()), r10, 0);
                        r10.O();
                    }
                    r10.H();
                    mVar2 = r10;
                    l0.d.b(str, f0Var.a(l1.i.f27362a, 1.0f, true), hVar.j(z10 ? bVar.e() : bVar.c()), null, 0, false, 1, 0, null, mVar2, (i14 & 14) | 1572864, 440);
                    mVar2.O();
                    if (y0.p.H()) {
                        y0.p.P();
                    }
                    qVar4 = qVar3;
                    iVar2 = iVar3;
                } else {
                    r10.A();
                    qVar4 = qVar2;
                    mVar2 = r10;
                }
                y10 = mVar2.y();
                if (y10 != null) {
                    y10.a(new c(str, z10, bVar, iVar2, qVar4, aVar, i10, i11));
                    return;
                }
                return;
            }
            qVar2 = qVar;
            if ((i11 & 32) != 0) {
            }
            i14 = i12;
            if ((74899 & i14) == 74898) {
            }
            if (i15 != 0) {
            }
            if (i13 != 0) {
            }
            if (y0.p.H()) {
            }
            h hVar2 = h.f56a;
            c.InterfaceC0608c f112 = hVar2.f();
            b.f o102 = e0.b.f16607a.o(hVar2.d());
            z11 = ((i14 & 112) == 32) | ((458752 & i14) == 131072);
            f10 = r10.f();
            if (!z11) {
            }
            f10 = new b(z10, aVar);
            r10.I(f10);
            qVar3 = qVar2;
            l1.i k102 = androidx.compose.foundation.layout.l.k(o.q(o.h(androidx.compose.foundation.d.d(iVar3, z10, str, null, (dn.a) f10, 4, null), BitmapDescriptorFactory.HUE_RED, 1, null), hVar2.b(), hVar2.g(), hVar2.a(), hVar2.g()), hVar2.d(), BitmapDescriptorFactory.HUE_RED, 2, null);
            e0 b102 = c0.b(o102, f112, r10, 54);
            a10 = y0.j.a(r10, 0);
            y D3 = r10.D();
            l1.i e102 = l1.h.e(r10, k102);
            g.a aVar22 = j2.g.f23616d;
            dn.a a122 = aVar22.a();
            if (!(r10.w() instanceof y0.f)) {
            }
            r10.u();
            if (r10.n()) {
            }
            a11 = d4.a(r10);
            d4.b(a11, b102, aVar22.c());
            d4.b(a11, D3, aVar22.e());
            p b112 = aVar22.b();
            if (!a11.n()) {
            }
            a11.I(Integer.valueOf(a10));
            a11.l(Integer.valueOf(a10), b112);
            d4.b(a11, e102, aVar22.d());
            f0 f0Var2 = f0.f16652a;
            if (qVar3 == null) {
            }
            r10.H();
            mVar2 = r10;
            l0.d.b(str, f0Var2.a(l1.i.f27362a, 1.0f, true), hVar2.j(z10 ? bVar.e() : bVar.c()), null, 0, false, 1, 0, null, mVar2, (i14 & 14) | 1572864, 440);
            mVar2.O();
            if (y0.p.H()) {
            }
            qVar4 = qVar3;
            iVar2 = iVar3;
            y10 = mVar2.y();
            if (y10 != null) {
            }
        }
        iVar2 = iVar;
        i13 = i11 & 16;
        if (i13 == 0) {
        }
        qVar2 = qVar;
        if ((i11 & 32) != 0) {
        }
        i14 = i12;
        if ((74899 & i14) == 74898) {
        }
        if (i15 != 0) {
        }
        if (i13 != 0) {
        }
        if (y0.p.H()) {
        }
        h hVar22 = h.f56a;
        c.InterfaceC0608c f1122 = hVar22.f();
        b.f o1022 = e0.b.f16607a.o(hVar22.d());
        z11 = ((i14 & 112) == 32) | ((458752 & i14) == 131072);
        f10 = r10.f();
        if (!z11) {
        }
        f10 = new b(z10, aVar);
        r10.I(f10);
        qVar3 = qVar2;
        l1.i k1022 = androidx.compose.foundation.layout.l.k(o.q(o.h(androidx.compose.foundation.d.d(iVar3, z10, str, null, (dn.a) f10, 4, null), BitmapDescriptorFactory.HUE_RED, 1, null), hVar22.b(), hVar22.g(), hVar22.a(), hVar22.g()), hVar22.d(), BitmapDescriptorFactory.HUE_RED, 2, null);
        e0 b1022 = c0.b(o1022, f1122, r10, 54);
        a10 = y0.j.a(r10, 0);
        y D32 = r10.D();
        l1.i e1022 = l1.h.e(r10, k1022);
        g.a aVar222 = j2.g.f23616d;
        dn.a a1222 = aVar222.a();
        if (!(r10.w() instanceof y0.f)) {
        }
        r10.u();
        if (r10.n()) {
        }
        a11 = d4.a(r10);
        d4.b(a11, b1022, aVar222.c());
        d4.b(a11, D32, aVar222.e());
        p b1122 = aVar222.b();
        if (!a11.n()) {
        }
        a11.I(Integer.valueOf(a10));
        a11.l(Integer.valueOf(a10), b1122);
        d4.b(a11, e1022, aVar222.d());
        f0 f0Var22 = f0.f16652a;
        if (qVar3 == null) {
        }
        r10.H();
        mVar2 = r10;
        l0.d.b(str, f0Var22.a(l1.i.f27362a, 1.0f, true), hVar22.j(z10 ? bVar.e() : bVar.c()), null, 0, false, 1, 0, null, mVar2, (i14 & 14) | 1572864, 440);
        mVar2.O();
        if (y0.p.H()) {
        }
        qVar4 = qVar3;
        iVar2 = iVar3;
        y10 = mVar2.y();
        if (y10 != null) {
        }
    }

    /* JADX WARN: Removed duplicated region for block: B:13:0x0068  */
    /* JADX WARN: Removed duplicated region for block: B:16:0x007f  */
    /* JADX WARN: Removed duplicated region for block: B:24:0x00e9  */
    /* JADX WARN: Removed duplicated region for block: B:27:? A[RETURN, SYNTHETIC] */
    /* JADX WARN: Removed duplicated region for block: B:29:0x00a6  */
    /* JADX WARN: Removed duplicated region for block: B:32:0x00b1  */
    /* JADX WARN: Removed duplicated region for block: B:35:0x00df  */
    /* JADX WARN: Removed duplicated region for block: B:37:0x00aa  */
    /* JADX WARN: Removed duplicated region for block: B:38:0x0082  */
    /* JADX WARN: Removed duplicated region for block: B:45:0x006b  */
    /*
        Code decompiled incorrectly, please refer to instructions dump.
    */
    public static final void c(androidx.compose.ui.window.q qVar, dn.a aVar, l1.i iVar, a0.b bVar, l lVar, m mVar, int i10, int i11) {
        int i12;
        l1.i iVar2;
        l1.i iVar3;
        x2 y10;
        m r10 = mVar.r(1447189339);
        if ((i11 & 1) != 0) {
            i12 = i10 | 6;
        } else if ((i10 & 6) == 0) {
            i12 = (r10.R(qVar) ? 4 : 2) | i10;
        } else {
            i12 = i10;
        }
        if ((i11 & 2) != 0) {
            i12 |= 48;
        } else if ((i10 & 48) == 0) {
            i12 |= r10.m(aVar) ? 32 : 16;
        }
        int i13 = i11 & 4;
        if (i13 != 0) {
            i12 |= 384;
        } else if ((i10 & 384) == 0) {
            iVar2 = iVar;
            i12 |= r10.R(iVar2) ? 256 : 128;
            if ((i11 & 8) == 0) {
                i12 |= 3072;
            } else if ((i10 & 3072) == 0) {
                i12 |= r10.R(bVar) ? 2048 : UserMetadata.MAX_ATTRIBUTE_SIZE;
            }
            if ((i11 & 16) == 0) {
                i12 |= 24576;
            } else if ((i10 & 24576) == 0) {
                i12 |= r10.m(lVar) ? 16384 : UserMetadata.MAX_INTERNAL_KEY_SIZE;
            }
            if ((i12 & 9363) == 9362 || !r10.v()) {
                l1.i iVar4 = i13 == 0 ? l1.i.f27362a : iVar2;
                if (y0.p.H()) {
                    y0.p.Q(1447189339, i12, -1, "androidx.compose.foundation.contextmenu.ContextMenuPopup (ContextMenuUi.android.kt:121)");
                }
                androidx.compose.ui.window.b.a(qVar, aVar, f74a, g1.c.e(795909757, true, new e(bVar, iVar4, lVar), r10, 54), r10, (i12 & 14) | 3456 | (i12 & 112), 0);
                if (y0.p.H()) {
                    y0.p.P();
                }
                iVar3 = iVar4;
            } else {
                r10.A();
                iVar3 = iVar2;
            }
            y10 = r10.y();
            if (y10 == null) {
                y10.a(new f(qVar, aVar, iVar3, bVar, lVar, i10, i11));
                return;
            }
            return;
        }
        iVar2 = iVar;
        if ((i11 & 8) == 0) {
        }
        if ((i11 & 16) == 0) {
        }
        if ((i12 & 9363) == 9362) {
        }
        if (i13 == 0) {
        }
        if (y0.p.H()) {
        }
        androidx.compose.ui.window.b.a(qVar, aVar, f74a, g1.c.e(795909757, true, new e(bVar, iVar4, lVar), r10, 54), r10, (i12 & 14) | 3456 | (i12 & 112), 0);
        if (y0.p.H()) {
        }
        iVar3 = iVar4;
        y10 = r10.y();
        if (y10 == null) {
        }
    }

    public static final void d(androidx.compose.ui.window.q qVar, dn.a aVar, l1.i iVar, l lVar, m mVar, int i10, int i11) {
        int i12;
        m r10 = mVar.r(712057293);
        if ((i11 & 1) != 0) {
            i12 = i10 | 6;
        } else if ((i10 & 6) == 0) {
            i12 = (r10.R(qVar) ? 4 : 2) | i10;
        } else {
            i12 = i10;
        }
        if ((i11 & 2) != 0) {
            i12 |= 48;
        } else if ((i10 & 48) == 0) {
            i12 |= r10.m(aVar) ? 32 : 16;
        }
        int i13 = i11 & 4;
        if (i13 != 0) {
            i12 |= 384;
        } else if ((i10 & 384) == 0) {
            i12 |= r10.R(iVar) ? 256 : 128;
        }
        if ((i11 & 8) != 0) {
            i12 |= 3072;
        } else if ((i10 & 3072) == 0) {
            i12 |= r10.m(lVar) ? 2048 : UserMetadata.MAX_ATTRIBUTE_SIZE;
        }
        if ((i12 & 1171) == 1170 && r10.v()) {
            r10.A();
        } else {
            if (i13 != 0) {
                iVar = l1.i.f27362a;
            }
            if (y0.p.H()) {
                y0.p.Q(712057293, i12, -1, "androidx.compose.foundation.contextmenu.ContextMenuPopup (ContextMenuUi.android.kt:103)");
            }
            c(qVar, aVar, iVar, e(0, 0, r10, 0, 3), lVar, r10, (i12 & 14) | (i12 & 112) | (i12 & 896) | ((i12 << 3) & 57344), 0);
            if (y0.p.H()) {
                y0.p.P();
            }
        }
        l1.i iVar2 = iVar;
        x2 y10 = r10.y();
        if (y10 != null) {
            y10.a(new d(qVar, aVar, iVar2, lVar, i10, i11));
        }
    }

    public static final a0.b e(int i10, int i11, m mVar, int i12, int i13) {
        int i14 = (i13 & 1) != 0 ? R.style.Widget.PopupMenu : i10;
        int i15 = (i13 & 2) != 0 ? R.style.TextAppearance.Widget.PopupMenu.Large : i11;
        if (y0.p.H()) {
            y0.p.Q(1689505294, i12, -1, "androidx.compose.foundation.contextmenu.computeContextMenuColors (ContextMenuUi.android.kt:354)");
        }
        Context context = (Context) mVar.t(AndroidCompositionLocals_androidKt.g());
        boolean R = mVar.R((Configuration) mVar.t(AndroidCompositionLocals_androidKt.f())) | mVar.R(context);
        Object f10 = mVar.f();
        if (R || f10 == m.f51621a.a()) {
            a0.b bVar = f75b;
            long h10 = h(context, i14, R.attr.colorBackground, bVar.a());
            ColorStateList i16 = i(context, i15, R.attr.textColorPrimary);
            long g10 = g(i16, bVar.e());
            long f11 = f(i16, bVar.c());
            f10 = new a0.b(h10, g10, g10, f11, f11, null);
            mVar.I(f10);
        }
        a0.b bVar2 = (a0.b) f10;
        if (y0.p.H()) {
            y0.p.P();
        }
        return bVar2;
    }

    private static final long f(ColorStateList colorStateList, long j10) {
        int j11 = i0.j(j10);
        Integer valueOf = colorStateList != null ? Integer.valueOf(colorStateList.getColorForState(new int[]{-16842910}, j11)) : null;
        return (valueOf == null || valueOf.intValue() == j11) ? j10 : i0.b(valueOf.intValue());
    }

    private static final long g(ColorStateList colorStateList, long j10) {
        int j11 = i0.j(j10);
        Integer valueOf = colorStateList != null ? Integer.valueOf(colorStateList.getColorForState(new int[]{R.attr.state_enabled}, j11)) : null;
        return (valueOf == null || valueOf.intValue() == j11) ? j10 : i0.b(valueOf.intValue());
    }

    private static final long h(Context context, int i10, int i11, long j10) {
        TypedArray obtainStyledAttributes = context.obtainStyledAttributes(i10, new int[]{i11});
        int j11 = i0.j(j10);
        int color = obtainStyledAttributes.getColor(0, j11);
        obtainStyledAttributes.recycle();
        return color == j11 ? j10 : i0.b(color);
    }

    private static final ColorStateList i(Context context, int i10, int i11) {
        TypedArray obtainStyledAttributes = context.obtainStyledAttributes(i10, new int[]{i11});
        ColorStateList colorStateList = obtainStyledAttributes.getColorStateList(0);
        obtainStyledAttributes.recycle();
        return colorStateList;
    }
}
