package I0;

import G0.InterfaceC0245a0;
import J0.AbstractC0391w0;
import J0.j1;
import androidx.compose.runtime.CompositionLocalMap;
import androidx.compose.runtime.collection.MutableVector;
import androidx.media3.exoplayer.DecoderReuseEvaluation;
import i0.AbstractC2254r;
import i0.InterfaceC2255s;
import w4.C3137A;

/* JADX INFO: renamed from: I0.e, reason: case insensitive filesystem */
/* JADX INFO: loaded from: classes.dex */
public final class C0289e extends kotlin.jvm.internal.p implements J4.e {

    /* JADX INFO: renamed from: b, reason: collision with root package name */
    public static final C0289e f2354b = new C0289e(2, 0);

    /* JADX INFO: renamed from: c, reason: collision with root package name */
    public static final C0289e f2355c = new C0289e(2, 1);

    /* JADX INFO: renamed from: d, reason: collision with root package name */
    public static final C0289e f2356d = new C0289e(2, 2);

    /* JADX INFO: renamed from: e, reason: collision with root package name */
    public static final C0289e f2357e = new C0289e(2, 3);

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

    /* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
    public /* synthetic */ C0289e(int i6, int i7) {
        super(i6);
        this.f2358a = i7;
    }

    /* JADX WARN: Multi-variable type inference failed */
    /* JADX WARN: Type inference failed for: r1v9 */
    @Override // J4.e
    public final Object invoke(Object obj, Object obj2) {
        switch (this.f2358a) {
            case 0:
                ((Number) obj2).intValue();
                ((InterfaceC0295h) obj).getClass();
                break;
            case 1:
                ((H) ((InterfaceC0295h) obj)).c0((InterfaceC0245a0) obj2);
                break;
            case 2:
                ((H) ((InterfaceC0295h) obj)).d0((InterfaceC2255s) obj2);
                break;
            default:
                CompositionLocalMap compositionLocalMap = (CompositionLocalMap) obj2;
                H h5 = (H) ((InterfaceC0295h) obj);
                h5.f2158F = compositionLocalMap;
                h5.Z((h1.c) compositionLocalMap.get(AbstractC0391w0.f3100h));
                h1.m mVar = (h1.m) compositionLocalMap.get(AbstractC0391w0.f3105n);
                h1.m mVar2 = h5.f2156D;
                C0290e0 c0290e0 = h5.f2162J;
                if (mVar2 != mVar) {
                    h5.f2156D = mVar;
                    h5.C();
                    H hT = h5.t();
                    if (hT != null) {
                        hT.A();
                    }
                    h5.B();
                    for (AbstractC2254r child$ui = (AbstractC2254r) c0290e0.f2365g; child$ui != null; child$ui = child$ui.getChild$ui()) {
                        child$ui.onLayoutDirectionChange();
                    }
                }
                h5.e0((j1) compositionLocalMap.get(AbstractC0391w0.f3110s));
                if ((((AbstractC2254r) c0290e0.f2365g).getAggregateChildKindSet$ui() & DecoderReuseEvaluation.DISCARD_REASON_AUDIO_BYPASS_POSSIBLE) != 0) {
                    for (AbstractC2254r child$ui2 = (AbstractC2254r) c0290e0.f2365g; child$ui2 != null; child$ui2 = child$ui2.getChild$ui()) {
                        if ((child$ui2.getKindSet$ui() & DecoderReuseEvaluation.DISCARD_REASON_AUDIO_BYPASS_POSSIBLE) != 0) {
                            AbstractC2254r abstractC2254rE = child$ui2;
                            MutableVector mutableVector = null;
                            while (abstractC2254rE != 0) {
                                if (abstractC2254rE instanceof InterfaceC0297i) {
                                    AbstractC2254r node = ((AbstractC2254r) ((InterfaceC0297i) abstractC2254rE)).getNode();
                                    if (node.isAttached()) {
                                        AbstractC0302k0.d(node);
                                    } else {
                                        node.setUpdatedNodeAwaitingAttachForInvalidation$ui(true);
                                    }
                                } else if ((abstractC2254rE.getKindSet$ui() & DecoderReuseEvaluation.DISCARD_REASON_AUDIO_BYPASS_POSSIBLE) != 0 && (abstractC2254rE instanceof AbstractC0301k)) {
                                    AbstractC2254r child$ui3 = ((AbstractC0301k) abstractC2254rE).f2431b;
                                    int i6 = 0;
                                    abstractC2254rE = abstractC2254rE;
                                    while (child$ui3 != null) {
                                        if ((child$ui3.getKindSet$ui() & DecoderReuseEvaluation.DISCARD_REASON_AUDIO_BYPASS_POSSIBLE) != 0) {
                                            i6++;
                                            if (i6 == 1) {
                                                abstractC2254rE = child$ui3;
                                            } else {
                                                if (mutableVector == null) {
                                                    mutableVector = new MutableVector(new AbstractC2254r[16], 0);
                                                }
                                                if (abstractC2254rE != 0) {
                                                    mutableVector.add(abstractC2254rE);
                                                    abstractC2254rE = 0;
                                                }
                                                mutableVector.add(child$ui3);
                                            }
                                        }
                                        child$ui3 = child$ui3.getChild$ui();
                                        abstractC2254rE = abstractC2254rE;
                                    }
                                    if (i6 == 1) {
                                    }
                                }
                                abstractC2254rE = AbstractC0303l.e(mutableVector);
                            }
                        }
                        if ((child$ui2.getAggregateChildKindSet$ui() & DecoderReuseEvaluation.DISCARD_REASON_AUDIO_BYPASS_POSSIBLE) != 0) {
                        }
                    }
                }
                break;
        }
        return C3137A.f25453a;
    }
}
