package androidx.compose.runtime.snapshots;

import E3.v;
import I0.I0;
import K.C0474q0;
import T0.C0603n;
import X2.i;
import android.content.Context;
import android.graphics.Bitmap;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import androidx.compose.runtime.MutableIntState;
import androidx.media3.common.Format;
import androidx.media3.exoplayer.ExoPlayer;
import androidx.media3.ui.PlayerView;
import c0.C1217r;
import coil.disk.DiskLruCache;
import com.debridstream.tv.R;
import com.google.android.gms.location.LocationRequest;
import d3.I;
import d3.v2;
import i5.h;
import j$.time.LocalDate;
import java.io.IOException;
import java.util.List;
import java.util.Map;
import k5.C2434w;
import k5.S;
import k5.e0;
import kotlin.jvm.internal.C;
import kotlin.jvm.internal.g;
import kotlin.jvm.internal.o;
import l5.m;
import m3.AbstractC2467b;
import m3.AbstractC2486u;
import o0.C2631b;
import o0.C2632c;
import o0.C2633d;
import o4.f;
import p0.AbstractC2686D;
import p0.AbstractC2704j;
import p0.AbstractC2711q;
import p0.C2689G;
import p0.C2693K;
import p0.C2694L;
import p0.C2696b;
import p0.C2700f;
import p0.C2702h;
import p0.C2706l;
import p0.C2714u;
import p0.InterfaceC2687E;
import p0.InterfaceC2712s;
import p0.M;
import p0.N;
import p0.Q;
import p0.U;
import p0.Z;
import p5.G;
import p5.u;
import q.AbstractC2761L;
import q.H0;
import q.y0;
import r0.C2862a;
import r0.C2863b;
import r0.InterfaceC2864c;
import r0.InterfaceC2866e;
import v.AbstractC3058z;
import v.C2968B;
import v.C2974E;
import v.C3000R0;
import w4.C3137A;
import x.C3167h1;
import x4.AbstractC3235a;
import x4.AbstractC3241g;
import x4.AbstractC3251q;
import x4.y;

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

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

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

    public /* synthetic */ e(Object obj, int i6) {
        this.f11138a = i6;
        this.f11139b = obj;
    }

    /* JADX WARN: Multi-variable type inference failed */
    /* JADX WARN: Removed duplicated region for block: B:38:0x00d4  */
    /* JADX WARN: Removed duplicated region for block: B:85:0x024e  */
    /* JADX WARN: Removed duplicated region for block: B:98:0x02a1  */
    @Override // J4.c
    /*
        Code decompiled incorrectly, please refer to instructions dump.
    */
    public final Object invoke(Object obj) {
        int i6;
        C2706l c2706l;
        AbstractC2711q abstractC2711q;
        C2689G c2689g;
        boolean z6;
        C2706l c2706l2;
        C2863b c2863b;
        float f6;
        float f7;
        f fVar;
        long jF;
        boolean z7;
        switch (this.f11138a) {
            case 0:
                return SnapshotStateObserver.readObserver$lambda$0((SnapshotStateObserver) this.f11139b, obj);
            case 1:
                ((U) ((InterfaceC2687E) obj)).d(((Number) ((y0) this.f11139b).f23483m.getValue()).floatValue());
                return C3137A.f25453a;
            case 2:
                return DiskLruCache.newJournalWriter$lambda$3((DiskLruCache) this.f11139b, (IOException) obj);
            case 3:
                I i7 = (I) this.f11139b;
                Format format = (Format) obj;
                o.h(format, "format");
                if (i7.f15140a == null) {
                    i7.f15140a = format;
                }
                return C3137A.f25453a;
            case 4:
                i it = (i) obj;
                o.h(it, "it");
                LocalDate localDate = (LocalDate) this.f11139b;
                o.e(localDate);
                return Boolean.valueOf(v2.u0(it.f8596d, localDate));
            case 5:
                i5.a buildSerialDescriptor = (i5.a) obj;
                o.h(buildSerialDescriptor, "$this$buildSerialDescriptor");
                buildSerialDescriptor.a("type", e0.f20049b);
                buildSerialDescriptor.a("value", W.a.T("kotlinx.serialization.Polymorphic<" + ((g) ((g5.c) this.f11139b).f16602a).c() + '>', i5.i.f19098j, new i5.g[0]));
                buildSerialDescriptor.f19068b = y.f26065a;
                return C3137A.f25453a;
            case 6:
                return Boolean.valueOf(!o.c((Long) obj, (Long) this.f11139b));
            case 7:
                int iIntValue = ((Integer) obj).intValue();
                StringBuilder sb = new StringBuilder();
                h hVar = (h) this.f11139b;
                sb.append(hVar.f19092f[iIntValue]);
                sb.append(": ");
                sb.append(hVar.f19093g[iIntValue].a());
                return sb.toString();
            case 8:
                i5.a buildSerialDescriptor2 = (i5.a) obj;
                o.h(buildSerialDescriptor2, "$this$buildSerialDescriptor");
                List list = (List) ((C2434w) this.f11139b).f20106c;
                o.h(list, "<set-?>");
                buildSerialDescriptor2.f19068b = list;
                return C3137A.f25453a;
            case 9:
                int iIntValue2 = ((Integer) obj).intValue();
                StringBuilder sb2 = new StringBuilder();
                S s6 = (S) this.f11139b;
                sb2.append(s6.f20022e[iIntValue2]);
                sb2.append(": ");
                sb2.append(s6.i(iIntValue2).a());
                return sb2.toString();
            case 10:
                Context ctx = (Context) obj;
                o.h(ctx, "ctx");
                View viewInflate = LayoutInflater.from(ctx).inflate(R.layout.trailer_player_view, (ViewGroup) null);
                o.f(viewInflate, "null cannot be cast to non-null type androidx.media3.ui.PlayerView");
                PlayerView playerView = (PlayerView) viewInflate;
                playerView.setLayoutParams(new ViewGroup.LayoutParams(-1, -1));
                playerView.setPlayer((ExoPlayer) this.f11139b);
                playerView.setFocusable(false);
                playerView.setFocusableInTouchMode(false);
                playerView.setClickable(false);
                AbstractC2486u.b(playerView);
                return playerView;
            case 11:
                m node = (m) obj;
                o.h(node, "node");
                m5.o oVar = (m5.o) this.f11139b;
                oVar.L((String) AbstractC3251q.n0(oVar.f21257a), node);
                return C3137A.f25453a;
            case 12:
                G it2 = (G) obj;
                o.h(it2, "it");
                return ((u) this.f11139b).onPathResult(it2, "listRecursively");
            case 13:
                m0.d dVar = (m0.d) obj;
                C2974E c2974e = (C2974E) this.f11139b;
                if (dVar.a() * c2974e.f24713d < 0.0f || o0.e.c(dVar.f20378a.c()) <= 0.0f) {
                    return dVar.b(new H0(7));
                }
                float f8 = 2;
                final float fMin = Math.min(h1.f.c(c2974e.f24713d, 0.0f) ? 1.0f : (float) Math.ceil(dVar.a() * c2974e.f24713d), (float) Math.ceil(o0.e.c(dVar.f20378a.c()) / f8));
                final float f9 = fMin / f8;
                final long jFloatToRawIntBits = (((long) Float.floatToRawIntBits(f9)) << 32) | (((long) Float.floatToRawIntBits(f9)) & 4294967295L);
                final long jFloatToRawIntBits2 = (((long) Float.floatToRawIntBits(Float.intBitsToFloat((int) (dVar.f20378a.c() >> 32)) - fMin)) << 32) | (((long) Float.floatToRawIntBits(Float.intBitsToFloat((int) (dVar.f20378a.c() & 4294967295L)) - fMin)) & 4294967295L);
                float f10 = fMin * f8;
                boolean z8 = f10 > o0.e.c(dVar.f20378a.c());
                N nMo3createOutlinePq9zytI = c2974e.f24715f.mo3createOutlinePq9zytI(dVar.f20378a.c(), dVar.f20378a.getLayoutDirection(), dVar);
                if (!(nMo3createOutlinePq9zytI instanceof C2693K)) {
                    if (!(nMo3createOutlinePq9zytI instanceof M)) {
                        boolean z9 = z8;
                        if (!(nMo3createOutlinePq9zytI instanceof C2694L)) {
                            throw new v();
                        }
                        final AbstractC2711q abstractC2711q2 = c2974e.f24714e;
                        final long j4 = z9 ? 0L : jFloatToRawIntBits;
                        final long jC = z9 ? dVar.f20378a.c() : jFloatToRawIntBits2;
                        final r0.f iVar = z9 ? r0.h.f23808a : new r0.i(0, 0, fMin, 0.0f, 30);
                        return dVar.b(new J4.c() { // from class: v.C
                            @Override // J4.c
                            public final Object invoke(Object obj2) {
                                I0.J j6 = (I0.J) ((InterfaceC2864c) obj2);
                                j6.b();
                                InterfaceC2866e.E(j6, abstractC2711q2, j4, jC, 0.0f, iVar, LocationRequest.PRIORITY_LOW_POWER);
                                return C3137A.f25453a;
                            }
                        });
                    }
                    final AbstractC2711q abstractC2711q3 = c2974e.f24714e;
                    M m6 = (M) nMo3createOutlinePq9zytI;
                    boolean zF = AbstractC2467b.f(m6.f22857a);
                    C2633d c2633d = m6.f22857a;
                    if (zF) {
                        final r0.i iVar2 = new r0.i(0, 0, fMin, 0.0f, 30);
                        final long j6 = c2633d.f21795e;
                        final boolean z10 = z8;
                        return dVar.b(new J4.c() { // from class: v.D
                            @Override // J4.c
                            public final Object invoke(Object obj2) throws Throwable {
                                o4.f fVar2;
                                long j7;
                                I0.J j8 = (I0.J) ((InterfaceC2864c) obj2);
                                j8.b();
                                boolean z11 = z10;
                                AbstractC2711q abstractC2711q4 = abstractC2711q3;
                                long j9 = j6;
                                if (z11) {
                                    InterfaceC2866e.f(j8, abstractC2711q4, 0L, 0L, j9, null, 246);
                                } else {
                                    float fIntBitsToFloat = Float.intBitsToFloat((int) (j9 >> 32));
                                    float f11 = f9;
                                    if (fIntBitsToFloat < f11) {
                                        C2863b c2863b2 = j8.f2210a;
                                        float fIntBitsToFloat2 = Float.intBitsToFloat((int) (c2863b2.c() >> 32));
                                        float f12 = fMin;
                                        float f13 = fIntBitsToFloat2 - f12;
                                        float fIntBitsToFloat3 = Float.intBitsToFloat((int) (c2863b2.c() & 4294967295L)) - f12;
                                        o4.f fVar3 = c2863b2.f23803b;
                                        long jF2 = fVar3.f();
                                        fVar3.c().f();
                                        try {
                                            ((o4.f) ((l2.c) fVar3.f21850c).f20267b).c().o(f12, f12, f13, fIntBitsToFloat3, 0);
                                            fVar2 = fVar3;
                                            j7 = jF2;
                                            try {
                                                InterfaceC2866e.f(j8, abstractC2711q4, 0L, 0L, j9, null, 246);
                                                AbstractC2761L.o(fVar2, j7);
                                            } catch (Throwable th) {
                                                th = th;
                                                AbstractC2761L.o(fVar2, j7);
                                                throw th;
                                            }
                                        } catch (Throwable th2) {
                                            th = th2;
                                            fVar2 = fVar3;
                                            j7 = jF2;
                                        }
                                    } else {
                                        InterfaceC2866e.f(j8, abstractC2711q4, jFloatToRawIntBits, jFloatToRawIntBits2, AbstractC3058z.z(f11, j9), iVar2, 208);
                                    }
                                }
                                return C3137A.f25453a;
                            }
                        });
                    }
                    boolean z11 = z8;
                    if (c2974e.f24712c == null) {
                        c2974e.f24712c = new C2968B();
                    }
                    C2968B c2968b = c2974e.f24712c;
                    o.e(c2968b);
                    C2702h c2702h = c2968b.f24681d;
                    C2702h c2702h2 = c2702h;
                    if (c2702h == null) {
                        C2702h c2702hA = AbstractC2704j.a();
                        c2968b.f24681d = c2702hA;
                        c2702h2 = c2702hA;
                    }
                    c2702h2.h();
                    Q.b(c2702h2, c2633d);
                    if (!z11) {
                        Q qA = AbstractC2704j.a();
                        Q.b(qA, new C2633d(fMin, fMin, c2633d.b() - fMin, c2633d.a() - fMin, AbstractC3058z.z(fMin, c2633d.f21795e), AbstractC3058z.z(fMin, c2633d.f21796f), AbstractC3058z.z(fMin, c2633d.f21797g), AbstractC3058z.z(fMin, c2633d.f21798h)));
                        c2702h2.g(c2702h2, qA, 0);
                    }
                    return dVar.b(new C1217r(24, c2702h2, abstractC2711q3));
                }
                AbstractC2711q abstractC2711q4 = c2974e.f24714e;
                C2693K c2693k = (C2693K) nMo3createOutlinePq9zytI;
                if (z8) {
                    return dVar.b(new C1217r(25, c2693k, abstractC2711q4));
                }
                if (abstractC2711q4 instanceof Z) {
                    c2706l = new C2706l(C2714u.c(1.0f, ((Z) abstractC2711q4).f22898a), 5);
                    i6 = 1;
                } else {
                    i6 = 0;
                    c2706l = null;
                }
                C2632c c2632cE = c2693k.f22855a.e();
                if (c2974e.f24712c == null) {
                    c2974e.f24712c = new C2968B();
                }
                C2968B c2968b2 = c2974e.f24712c;
                o.e(c2968b2);
                C2702h c2702h3 = c2968b2.f24681d;
                C2702h c2702h4 = c2702h3;
                if (c2702h3 == null) {
                    C2702h c2702hA2 = AbstractC2704j.a();
                    c2968b2.f24681d = c2702hA2;
                    c2702h4 = c2702hA2;
                }
                c2702h4.h();
                Q.a(c2702h4, c2632cE);
                c2702h4.g(c2702h4, c2693k.f22855a, 0);
                C c6 = new C();
                float f11 = c2632cE.f21789c;
                float f12 = c2632cE.f21787a;
                int iCeil = (int) Math.ceil(f11 - f12);
                float f13 = c2632cE.f21790d;
                float f14 = c2632cE.f21788b;
                long jCeil = (((long) ((int) Math.ceil(f13 - f14))) & 4294967295L) | (((long) iCeil) << 32);
                C2968B c2968b3 = c2974e.f24712c;
                o.e(c2968b3);
                C2700f c2700fG = c2968b3.f24678a;
                C2696b c2696bA = c2968b3.f24679b;
                if (c2700fG != null) {
                    abstractC2711q = abstractC2711q4;
                    c2689g = new C2689G(c2700fG.a());
                } else {
                    abstractC2711q = abstractC2711q4;
                    c2689g = null;
                }
                if (c2689g != null && c2689g.f22849a == 0) {
                    z6 = true;
                } else {
                    C2689G c2689g2 = c2700fG != null ? new C2689G(c2700fG.a()) : null;
                    if (c2689g2 == null || i6 != c2689g2.f22849a) {
                        z6 = false;
                    }
                }
                try {
                    try {
                        if (c2700fG != null && c2696bA != null) {
                            c2706l2 = c2706l;
                            float fIntBitsToFloat = Float.intBitsToFloat((int) (dVar.f20378a.c() >> 32));
                            Bitmap bitmap = c2700fG.f22917a;
                            if (fIntBitsToFloat > bitmap.getWidth() || Float.intBitsToFloat((int) (dVar.f20378a.c() & 4294967295L)) > bitmap.getHeight() || !z6) {
                            }
                            c2863b = c2968b3.f24680c;
                            if (c2863b == null) {
                                c2863b = new C2863b();
                                c2968b3.f24680c = c2863b;
                            }
                            C2706l c2706l3 = c2706l2;
                            long jK = W0.e.K(jCeil);
                            h1.m layoutDirection = dVar.f20378a.getLayoutDirection();
                            C2862a c2862a = c2863b.f23802a;
                            C2863b c2863b2 = c2863b;
                            h1.c cVar = c2862a.f23798a;
                            h1.m mVar = c2862a.f23799b;
                            InterfaceC2712s interfaceC2712s = c2862a.f23800c;
                            C2702h c2702h5 = c2702h4;
                            long j7 = c2862a.f23801d;
                            c2862a.f23798a = dVar;
                            c2862a.f23799b = layoutDirection;
                            c2862a.f23800c = c2696bA;
                            c2862a.f23801d = jK;
                            c2696bA.f();
                            InterfaceC2866e.C(c2863b2, C2714u.f22935b, 0L, jK, 0.0f, 58);
                            f6 = -f12;
                            f7 = -f14;
                            fVar = c2863b2.f23803b;
                            ((l2.c) fVar.f21850c).j(f6, f7);
                            InterfaceC2866e.y(c2863b2, c2693k.f22855a, abstractC2711q, 0.0f, new r0.i(0, 0, f10, 0.0f, 30), 52);
                            float f15 = 1;
                            float fIntBitsToFloat2 = (Float.intBitsToFloat((int) (c2863b2.c() >> 32)) + f15) / Float.intBitsToFloat((int) (c2863b2.c() >> 32));
                            C2696b c2696b = c2696bA;
                            float fIntBitsToFloat3 = (Float.intBitsToFloat((int) (c2863b2.c() & 4294967295L)) + f15) / Float.intBitsToFloat((int) (c2863b2.c() & 4294967295L));
                            long jI0 = c2863b2.i0();
                            jF = fVar.f();
                            fVar.c().f();
                            ((l2.c) fVar.f21850c).i(fIntBitsToFloat2, fIntBitsToFloat3, jI0);
                            InterfaceC2866e.y(c2863b2, c2702h5, abstractC2711q, 0.0f, null, 28);
                            ((l2.c) fVar.f21850c).j(-f6, -f7);
                            c2696b.r();
                            c2862a.f23798a = cVar;
                            c2862a.f23799b = mVar;
                            c2862a.f23800c = interfaceC2712s;
                            c2862a.f23801d = j7;
                            c2700fG.f22917a.prepareToDraw();
                            c6.f20115a = c2700fG;
                            return dVar.b(new C0603n(c2632cE, c6, jCeil, c2706l3));
                        }
                        c2706l2 = c2706l;
                        ((l2.c) fVar.f21850c).i(fIntBitsToFloat2, fIntBitsToFloat3, jI0);
                        InterfaceC2866e.y(c2863b2, c2702h5, abstractC2711q, 0.0f, null, 28);
                        ((l2.c) fVar.f21850c).j(-f6, -f7);
                        c2696b.r();
                        c2862a.f23798a = cVar;
                        c2862a.f23799b = mVar;
                        c2862a.f23800c = interfaceC2712s;
                        c2862a.f23801d = j7;
                        c2700fG.f22917a.prepareToDraw();
                        c6.f20115a = c2700fG;
                        return dVar.b(new C0603n(c2632cE, c6, jCeil, c2706l3));
                    } finally {
                        fVar.c().r();
                        fVar.o(jF);
                    }
                    InterfaceC2866e.y(c2863b2, c2693k.f22855a, abstractC2711q, 0.0f, new r0.i(0, 0, f10, 0.0f, 30), 52);
                    float f152 = 1;
                    float fIntBitsToFloat22 = (Float.intBitsToFloat((int) (c2863b2.c() >> 32)) + f152) / Float.intBitsToFloat((int) (c2863b2.c() >> 32));
                    C2696b c2696b2 = c2696bA;
                    float fIntBitsToFloat32 = (Float.intBitsToFloat((int) (c2863b2.c() & 4294967295L)) + f152) / Float.intBitsToFloat((int) (c2863b2.c() & 4294967295L));
                    long jI02 = c2863b2.i0();
                    jF = fVar.f();
                    fVar.c().f();
                } catch (Throwable th) {
                    ((l2.c) fVar.f21850c).j(-f6, -f7);
                    throw th;
                }
                c2700fG = AbstractC2686D.g((int) (jCeil >> 32), (int) (jCeil & 4294967295L), i6);
                c2968b3.f24678a = c2700fG;
                c2696bA = AbstractC2686D.a(c2700fG);
                c2968b3.f24679b = c2696bA;
                c2863b = c2968b3.f24680c;
                if (c2863b == null) {
                }
                C2706l c2706l32 = c2706l2;
                long jK2 = W0.e.K(jCeil);
                h1.m layoutDirection2 = dVar.f20378a.getLayoutDirection();
                C2862a c2862a2 = c2863b.f23802a;
                C2863b c2863b22 = c2863b;
                h1.c cVar2 = c2862a2.f23798a;
                h1.m mVar2 = c2862a2.f23799b;
                InterfaceC2712s interfaceC2712s2 = c2862a2.f23800c;
                C2702h c2702h52 = c2702h4;
                long j72 = c2862a2.f23801d;
                c2862a2.f23798a = dVar;
                c2862a2.f23799b = layoutDirection2;
                c2862a2.f23800c = c2696bA;
                c2862a2.f23801d = jK2;
                c2696bA.f();
                InterfaceC2866e.C(c2863b22, C2714u.f22935b, 0L, jK2, 0.0f, 58);
                f6 = -f12;
                f7 = -f14;
                fVar = c2863b22.f23803b;
                ((l2.c) fVar.f21850c).j(f6, f7);
                break;
            case 14:
                I0 i02 = (I0) obj;
                kotlin.jvm.internal.y yVar = (kotlin.jvm.internal.y) this.f11139b;
                if (!yVar.f20130a) {
                    o.f(i02, "null cannot be cast to non-null type androidx.compose.foundation.gestures.ScrollableContainerNode");
                    z7 = ((x.H0) i02).f25592a;
                }
                yVar.f20130a = z7;
                return Boolean.valueOf(!z7);
            case 15:
                float fFloatValue = ((Float) obj).floatValue();
                C3000R0 c3000r0 = (C3000R0) this.f11139b;
                float intValue = c3000r0.f24767a.getIntValue() + fFloatValue + c3000r0.f24772f;
                float fU = L4.a.u(intValue, 0.0f, c3000r0.f24771e.getIntValue());
                boolean z12 = intValue == fU;
                MutableIntState mutableIntState = c3000r0.f24767a;
                float intValue2 = fU - mutableIntState.getIntValue();
                int iRound = Math.round(intValue2);
                mutableIntState.setIntValue(mutableIntState.getIntValue() + iRound);
                c3000r0.f24772f = intValue2 - iRound;
                if (!z12) {
                    fFloatValue = intValue2;
                }
                return Float.valueOf(fFloatValue);
            case 16:
                ((C0474q0) this.f11139b).invoke();
                return C3137A.f25453a;
            case 17:
                C3167h1 c3167h1 = (C3167h1) this.f11139b;
                return new C2631b(c3167h1.c(c3167h1.f25819k, ((C2631b) obj).f21785a, c3167h1.f25818j));
            case 18:
                return obj == ((AbstractC3235a) this.f11139b) ? "(this Collection)" : String.valueOf(obj);
            default:
                Map.Entry it3 = (Map.Entry) obj;
                o.h(it3, "it");
                AbstractC3241g abstractC3241g = (AbstractC3241g) this.f11139b;
                StringBuilder sb3 = new StringBuilder();
                Object key = it3.getKey();
                sb3.append(key == abstractC3241g ? "(this Map)" : String.valueOf(key));
                sb3.append('=');
                Object value = it3.getValue();
                sb3.append(value != abstractC3241g ? String.valueOf(value) : "(this Map)");
                return sb3.toString();
        }
    }
}
