package E;

import F.j0;
import G0.z0;
import K.A0;
import K.C0463l;
import K.C0464l0;
import K.InterfaceC0458i0;
import K.U;
import M2.U0;
import M2.W;
import a0.I0;
import a3.m0;
import androidx.compose.runtime.DisposableEffectScope;
import androidx.compose.runtime.MutableState;
import androidx.compose.runtime.State;
import androidx.compose.runtime.collection.MutableVector;
import androidx.compose.runtime.internal.ComposableLambdaKt;
import androidx.media3.exoplayer.ExoPlayer;
import h3.AbstractC2097d0;
import h3.C2175q0;
import h3.C2209w;
import java.util.ArrayList;
import java.util.List;
import l2.C2449a;
import m3.C2481p;
import q.AbstractC2771e;
import q.C2757H;
import q.C2760K;
import q.C2769d;
import q.C2785l;
import q.C2789n;
import w4.C3137A;
import x.AbstractC3184n0;
import x.C3152c1;
import x.C3158e1;
import x.C3183n;
import x.EnumC3207z0;

/* JADX INFO: loaded from: classes.dex */
public final /* synthetic */ class z implements J4.c {

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

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

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

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

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

    public /* synthetic */ z(Object obj, Object obj2, Object obj3, Object obj4, int i6) {
        this.f1110a = i6;
        this.f1111b = obj;
        this.f1112c = obj2;
        this.f1113d = obj3;
        this.f1114e = obj4;
    }

    /* JADX WARN: Multi-variable type inference failed */
    /* JADX WARN: Removed duplicated region for block: B:12:0x0053  */
    @Override // J4.c
    /*
        Code decompiled incorrectly, please refer to instructions dump.
    */
    public final Object invoke(Object obj) {
        long jB;
        switch (this.f1110a) {
            case 0:
                j0 j0Var = (j0) obj;
                z0 z0Var = j0Var.f1304e;
                int iA = z0Var != null ? z0Var.a() : 0;
                int i6 = 0;
                for (int i7 = 0; i7 < iA; i7++) {
                    if (((r) this.f1114e).f1069q == EnumC3207z0.f25984a) {
                        z0 z0Var2 = j0Var.f1304e;
                        jB = 4294967295L & (z0Var2 != null ? z0Var2.b(i7) : 0L);
                    } else {
                        z0 z0Var3 = j0Var.f1304e;
                        jB = (z0Var3 != null ? z0Var3.b(i7) : 0L) >> 32;
                    }
                    i6 += (int) jB;
                }
                ArrayList arrayList = (ArrayList) this.f1111b;
                if (arrayList != null) {
                    arrayList.add(Integer.valueOf(i6));
                }
                kotlin.jvm.internal.A a6 = (kotlin.jvm.internal.A) this.f1112c;
                if (a6.f20113a != ((List) this.f1113d).size()) {
                    a6.f20113a++;
                }
                break;
            case 1:
                C0464l0 c0464l0 = (C0464l0) this.f1111b;
                if (c0464l0.b()) {
                    kotlin.jvm.internal.C c6 = new kotlin.jvm.internal.C();
                    C0463l c0463l = new C0463l(c0464l0.f3892d, c0464l0.f3909v, c6, 3);
                    Z0.z zVar = (Z0.z) this.f1112c;
                    Z0.t tVar = zVar.f9139a;
                    tVar.a((Z0.y) this.f1113d, (Z0.k) this.f1114e, c0463l, c0464l0.f3910w);
                    Z0.E e6 = new Z0.E(zVar, tVar);
                    zVar.f9140b.set(e6);
                    c6.f20115a = e6;
                    c0464l0.f3893e = e6;
                }
                break;
            case 2:
                n0.q focusProperties = (n0.q) obj;
                kotlin.jvm.internal.o.h(focusProperties, "$this$focusProperties");
                focusProperties.e((n0.x) this.f1111b);
                focusProperties.i((n0.x) this.f1112c);
                focusProperties.b((n0.x) this.f1113d);
                focusProperties.g((n0.x) this.f1114e);
                break;
            case 3:
                v LazyVerticalGrid = (v) obj;
                kotlin.jvm.internal.o.h(LazyVerticalGrid, "$this$LazyVerticalGrid");
                MutableState mutableState = (MutableState) this.f1111b;
                int iIntValue = ((Number) mutableState.getValue()).intValue();
                State state = (State) this.f1112c;
                int size = ((C2209w) state.getValue()).f18632b.size() - 1;
                if (size < 0) {
                    size = 0;
                }
                int iV = L4.a.v(iIntValue, 0, size);
                List list = ((C2209w) state.getValue()).f18632b;
                ((j) LazyVerticalGrid).s(list.size(), new U(14, new a5.t(6), list), new W(list, 12), ComposableLambdaKt.composableLambdaInstance(-1942245546, true, new h3.r(list, (J4.c) this.f1113d, mutableState, iV, (n0.x) this.f1114e)));
                if (((C2209w) state.getValue()).f18634d) {
                    v.c(LazyVerticalGrid, new I0(26), AbstractC2097d0.f17841a, 5);
                }
                break;
            case 4:
                InterfaceC0458i0 KeyboardActions = (InterfaceC0458i0) obj;
                kotlin.jvm.internal.o.h(KeyboardActions, "$this$KeyboardActions");
                String str = (String) ((MutableState) this.f1112c).getValue();
                Boolean bool = (Boolean) ((MutableState) this.f1113d).getValue();
                bool.booleanValue();
                ((J4.f) this.f1111b).invoke(str, bool, (String) ((MutableState) this.f1114e).getValue());
                break;
            case 5:
                D.A LazyRow = (D.A) obj;
                kotlin.jvm.internal.o.h(LazyRow, "$this$LazyRow");
                a5.t tVar2 = new a5.t(14);
                List list2 = (List) this.f1113d;
                ((D.l) LazyRow).t(list2.size(), new U(20, tVar2, list2), new W(list2, 17), ComposableLambdaKt.composableLambdaInstance(2039820996, true, new U0(list2, (n0.x) this.f1111b, (J4.c) this.f1112c, 5)));
                ((D.l) LazyRow).t(1, new C2175q0(12), D.z.f924a, ComposableLambdaKt.composableLambdaInstance(-1033040381, true, new m0((J4.a) this.f1114e, 1)));
                break;
            case 6:
                DisposableEffectScope DisposableEffect = (DisposableEffectScope) obj;
                kotlin.jvm.internal.o.h(DisposableEffect, "$this$DisposableEffect");
                C2481p c2481p = new C2481p((State) this.f1112c, (State) this.f1113d, (MutableState) this.f1114e);
                ExoPlayer exoPlayer = (ExoPlayer) this.f1111b;
                exoPlayer.addListener(c2481p);
                break;
            case 7:
                C2785l c2785l = (C2785l) obj;
                C2769d c2769d = (C2769d) this.f1111b;
                AbstractC2771e.q(c2785l, c2769d.f23286c);
                MutableState mutableState2 = c2785l.f23381e;
                Object objA = C2769d.a(c2769d, mutableState2.getValue());
                boolean zC = kotlin.jvm.internal.o.c(objA, mutableState2.getValue());
                J4.c cVar = (J4.c) this.f1113d;
                if (!zC) {
                    c2769d.f23286c.f23390b.setValue(objA);
                    ((C2789n) this.f1112c).f23390b.setValue(objA);
                    if (cVar != null) {
                        cVar.invoke(c2769d);
                    }
                    c2785l.a();
                    ((kotlin.jvm.internal.y) this.f1114e).f20130a = true;
                } else if (cVar != null) {
                    cVar.invoke(c2769d);
                }
                break;
            case 8:
                long jLongValue = ((Long) obj).longValue();
                State state2 = (State) ((MutableState) this.f1111b).getValue();
                long jLongValue2 = state2 != null ? ((Number) state2.getValue()).longValue() : jLongValue;
                C2760K c2760k = (C2760K) this.f1112c;
                long j4 = c2760k.f23193c;
                kotlin.jvm.internal.z zVar2 = (kotlin.jvm.internal.z) this.f1113d;
                V4.C c7 = (V4.C) this.f1114e;
                MutableVector mutableVector = c2760k.f23191a;
                if (j4 == Long.MIN_VALUE || zVar2.f20131a != AbstractC2771e.l(c7.getCoroutineContext())) {
                    c2760k.f23193c = jLongValue;
                    Object[] objArr = mutableVector.content;
                    int size2 = mutableVector.getSize();
                    for (int i8 = 0; i8 < size2; i8++) {
                        ((C2757H) objArr[i8]).f23178f = true;
                    }
                    zVar2.f20131a = AbstractC2771e.l(c7.getCoroutineContext());
                }
                float f6 = zVar2.f20131a;
                if (f6 == 0.0f) {
                    Object[] objArr2 = mutableVector.content;
                    int size3 = mutableVector.getSize();
                    for (int i9 = 0; i9 < size3; i9++) {
                        C2757H c2757h = (C2757H) objArr2[i9];
                        c2757h.f23175c.setValue(c2757h.f23176d.f23425c);
                        c2757h.f23178f = true;
                    }
                } else {
                    long j6 = (long) ((jLongValue2 - c2760k.f23193c) / f6);
                    Object[] objArr3 = mutableVector.content;
                    int size4 = mutableVector.getSize();
                    boolean z6 = true;
                    for (int i10 = 0; i10 < size4; i10++) {
                        C2757H c2757h2 = (C2757H) objArr3[i10];
                        if (!c2757h2.f23177e) {
                            c2757h2.f23180k.f23192b.setValue(Boolean.FALSE);
                            if (c2757h2.f23178f) {
                                c2757h2.f23178f = false;
                                c2757h2.f23179j = j6;
                            }
                            long j7 = j6 - c2757h2.f23179j;
                            c2757h2.f23175c.setValue(c2757h2.f23176d.f(j7));
                            c2757h2.f23177e = c2757h2.f23176d.e(j7);
                        }
                        if (!c2757h2.f23177e) {
                            z6 = false;
                        }
                    }
                    c2760k.f23194d.setValue(Boolean.valueOf(!z6));
                }
                break;
            case 9:
                C2785l c2785l2 = (C2785l) obj;
                float fFloatValue = ((Number) c2785l2.f23381e.getValue()).floatValue();
                kotlin.jvm.internal.z zVar3 = (kotlin.jvm.internal.z) this.f1111b;
                float f7 = fFloatValue - zVar3.f20131a;
                float fA = ((C3152c1) this.f1112c).a(f7);
                zVar3.f20131a = ((Number) c2785l2.f23381e.getValue()).floatValue();
                ((kotlin.jvm.internal.z) this.f1113d).f20131a = ((Number) c2785l2.f23377a.f23172b.invoke(c2785l2.f23382f)).floatValue();
                if (Math.abs(f7 - fA) > 0.5f) {
                    c2785l2.a();
                }
                ((C3183n) this.f1114e).getClass();
                break;
            default:
                C2785l c2785l3 = (C2785l) obj;
                float fFloatValue2 = ((Number) c2785l3.f23381e.getValue()).floatValue();
                kotlin.jvm.internal.z zVar4 = (kotlin.jvm.internal.z) this.f1111b;
                float f8 = fFloatValue2 - zVar4.f20131a;
                if (AbstractC3184n0.a(f8)) {
                    if (((Boolean) ((A0) this.f1114e).invoke(Float.valueOf(zVar4.f20131a))).booleanValue()) {
                    }
                } else if (AbstractC3184n0.a(f8 - ((C2449a) this.f1112c).c((C3158e1) this.f1113d, f8))) {
                    zVar4.f20131a += f8;
                    if (((Boolean) ((A0) this.f1114e).invoke(Float.valueOf(zVar4.f20131a))).booleanValue()) {
                        c2785l3.a();
                    }
                } else {
                    c2785l3.a();
                }
                break;
        }
        return C3137A.f25453a;
    }

    public /* synthetic */ z(ArrayList arrayList, kotlin.jvm.internal.A a6, List list, int i6, r rVar) {
        this.f1110a = 0;
        this.f1111b = arrayList;
        this.f1112c = a6;
        this.f1113d = list;
        this.f1114e = rVar;
    }

    public /* synthetic */ z(List list, n0.x xVar, J4.c cVar, J4.a aVar) {
        this.f1110a = 5;
        this.f1113d = list;
        this.f1111b = xVar;
        this.f1112c = cVar;
        this.f1114e = aVar;
    }
}
