package B0;

import C0.C0104e;
import G0.B0;
import G0.InterfaceC0279y;
import G0.M;
import G0.W;
import I0.H;
import I0.L;
import I0.U;
import J0.P0;
import J0.X;
import J0.Y;
import V4.E;
import Z0.B;
import android.content.Context;
import android.os.Trace;
import android.view.View;
import android.view.inputmethod.BaseInputConnection;
import android.view.inputmethod.InputMethodManager;
import androidx.compose.runtime.ReusableComposition;
import androidx.compose.runtime.State;
import androidx.navigation.C1134i;
import androidx.navigation.C1137l;
import java.io.File;
import java.util.ArrayList;
import java.util.List;
import kotlin.jvm.internal.o;
import kotlin.jvm.internal.p;
import l1.y;
import n.N;
import n3.C2619a;
import n3.C2620b;
import o0.C2632c;
import p.EnumC2649K;
import p5.G;
import q.A0;
import v0.O;
import w4.C3137A;

/* JADX INFO: loaded from: classes.dex */
public final class b extends p implements J4.a {

    /* JADX INFO: renamed from: a, reason: collision with root package name */
    public final /* synthetic */ int f411a;

    /* JADX INFO: renamed from: b, reason: collision with root package name */
    public final /* synthetic */ Object f412b;

    /* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
    public /* synthetic */ b(Object obj, int i6) {
        super(0);
        this.f411a = i6;
        this.f412b = obj;
    }

    /* JADX WARN: Removed duplicated region for block: B:80:0x0193  */
    @Override // J4.a
    /*
        Code decompiled incorrectly, please refer to instructions dump.
    */
    public final Object invoke() {
        ReusableComposition reusableComposition;
        InterfaceC0279y interfaceC0279y = null;
        boolean z6 = false;
        C3137A c3137a = C3137A.f25453a;
        Object obj = this.f412b;
        switch (this.f411a) {
            case 0:
                return ((e) obj).f422d;
            case 1:
                return ((j) obj).t0();
            case 2:
                M m6 = (M) obj;
                if (!((Boolean) m6.f1908g.getValue()).booleanValue() && (reusableComposition = m6.f1904c) != null) {
                    reusableComposition.deactivate();
                }
                return c3137a;
            case 3:
                W wA = ((B0) obj).a();
                H h5 = wA.f1936a;
                if (wA.f1948q != h5.m().size()) {
                    N n6 = wA.f1941f;
                    Object[] objArr = n6.f21383c;
                    long[] jArr = n6.f21381a;
                    int length = jArr.length - 2;
                    if (length >= 0) {
                        int i6 = 0;
                        while (true) {
                            long j4 = jArr[i6];
                            if ((((~j4) << 7) & j4 & (-9187201950435737472L)) != -9187201950435737472L) {
                                int i7 = 8 - ((~(i6 - length)) >>> 31);
                                for (int i8 = 0; i8 < i7; i8++) {
                                    if ((255 & j4) < 128) {
                                        ((M) objArr[(i6 << 3) + i8]).f1905d = true;
                                    }
                                    j4 >>= 8;
                                }
                                if (i7 == 8) {
                                    if (i6 != length) {
                                        i6++;
                                    }
                                }
                            }
                        }
                    }
                    if (h5.l != null) {
                        if (!h5.f2163K.f2217e) {
                            H.T(h5, false, 7);
                        }
                    } else if (!h5.o()) {
                        H.V(h5, false, 7);
                    }
                }
                return c3137a;
            case 4:
                L l = ((H) obj).f2163K;
                l.f2227p.f2301C = true;
                U u6 = l.f2228q;
                if (u6 != null) {
                    u6.f2281w = true;
                }
                return c3137a;
            case 5:
                E.i(((X) obj).f2966c, null);
                return c3137a;
            case 6:
                ((Y) obj).getClass();
                return c3137a;
            case 7:
                ((P0) obj).f2933a.f2902a.onContentEnteredComposition();
                return c3137a;
            case 8:
                R0.b bVar = (R0.b) obj;
                bVar.f6011g = null;
                Trace.beginSection("OnPositionedDispatch");
                try {
                    bVar.a();
                    return c3137a;
                } finally {
                    Trace.endSection();
                }
            case 9:
                File file = (File) ((C0104e) obj).invoke();
                String name = file.getName();
                o.g(name, "getName(...)");
                if (S4.p.i1('.', name, "").equals("preferences_pb")) {
                    String str = G.f23047b;
                    File absoluteFile = file.getAbsoluteFile();
                    o.g(absoluteFile, "file.absoluteFile");
                    return C1134i.p(absoluteFile);
                }
                throw new IllegalStateException(("File extension for file: " + file + " does not match required extension for Preferences file: preferences_pb").toString());
            case 10:
                Object systemService = ((View) ((C4.f) obj).f741b).getContext().getSystemService("input_method");
                o.f(systemService, "null cannot be cast to non-null type android.view.inputmethod.InputMethodManager");
                return (InputMethodManager) systemService;
            case 11:
                return new BaseInputConnection(((B) obj).f9053a, false);
            case 12:
                return W.a.O((Context) obj);
            case 13:
                List list = (List) ((State) obj).getValue();
                ArrayList arrayList = new ArrayList();
                for (Object obj2 : list) {
                    if (o.c(((C1137l) obj2).f12757b.f12639a, "composable")) {
                        arrayList.add(obj2);
                    }
                }
                return arrayList;
            case 14:
                return (C2632c) obj;
            case 15:
                y yVar = (y) obj;
                InterfaceC0279y parentLayoutCoordinates = yVar.getParentLayoutCoordinates();
                if (parentLayoutCoordinates != null && parentLayoutCoordinates.w()) {
                    interfaceC0279y = parentLayoutCoordinates;
                }
                if (interfaceC0279y != null && yVar.m1205getPopupContentSizebOM6tXw() != null) {
                    z6 = true;
                }
                return Boolean.valueOf(z6);
            case 16:
                ((n0.E) obj).v0();
                return c3137a;
            case 17:
                return new C2619a((C2620b) obj);
            case 18:
                A0 a02 = (A0) obj;
                Object objB = a02.f23134a.b();
                EnumC2649K enumC2649K = EnumC2649K.f22642c;
                if (objB == enumC2649K && a02.f23137d.getValue() == enumC2649K) {
                    z6 = true;
                }
                return Boolean.valueOf(z6);
            default:
                ((O) obj).f25070e.setValue(c3137a);
                return c3137a;
        }
    }
}
