package androidx.compose.runtime;

import V4.C;
import Y4.InterfaceC0843i;
import Y4.InterfaceC0844j;
import m3.AbstractC2467b;
import w4.C3137A;

/* JADX INFO: loaded from: classes.dex */
@C4.e(c = "androidx.compose.runtime.SnapshotStateKt__SnapshotFlowKt$collectAsState$1$1", f = "SnapshotFlow.kt", l = {68, 69}, m = "invokeSuspend", v = 1)
public final class SnapshotStateKt__SnapshotFlowKt$collectAsState$1$1 extends C4.j implements J4.e {
    final /* synthetic */ A4.j $context;
    final /* synthetic */ InterfaceC0843i $this_collectAsState;
    private /* synthetic */ Object L$0;
    int label;

    /* JADX INFO: renamed from: androidx.compose.runtime.SnapshotStateKt__SnapshotFlowKt$collectAsState$1$1$2, reason: invalid class name */
    @C4.e(c = "androidx.compose.runtime.SnapshotStateKt__SnapshotFlowKt$collectAsState$1$1$2", f = "SnapshotFlow.kt", l = {69}, m = "invokeSuspend", v = 1)
    public static final class AnonymousClass2 extends C4.j implements J4.e {
        final /* synthetic */ ProduceStateScope<R> $$this$produceState;
        final /* synthetic */ InterfaceC0843i $this_collectAsState;
        int label;

        /* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
        public AnonymousClass2(InterfaceC0843i interfaceC0843i, ProduceStateScope<R> produceStateScope, A4.d dVar) {
            super(2, dVar);
            this.$this_collectAsState = interfaceC0843i;
            this.$$this$produceState = produceStateScope;
        }

        @Override // C4.a
        public final A4.d create(Object obj, A4.d dVar) {
            return new AnonymousClass2(this.$this_collectAsState, this.$$this$produceState, dVar);
        }

        @Override // J4.e
        public final Object invoke(C c6, A4.d dVar) {
            return ((AnonymousClass2) create(c6, dVar)).invokeSuspend(C3137A.f25453a);
        }

        @Override // C4.a
        public final Object invokeSuspend(Object obj) {
            B4.a aVar = B4.a.f492a;
            int i6 = this.label;
            if (i6 == 0) {
                AbstractC2467b.l(obj);
                InterfaceC0843i interfaceC0843i = this.$this_collectAsState;
                final ProduceStateScope<R> produceStateScope = this.$$this$produceState;
                InterfaceC0844j interfaceC0844j = new InterfaceC0844j() { // from class: androidx.compose.runtime.SnapshotStateKt__SnapshotFlowKt.collectAsState.1.1.2.1
                    /* JADX WARN: Type inference incomplete: some casts might be missing */
                    @Override // Y4.InterfaceC0844j
                    public final Object emit(T t6, A4.d dVar) {
                        produceStateScope.setValue((R) t6);
                        return C3137A.f25453a;
                    }
                };
                this.label = 1;
                if (interfaceC0843i.collect(interfaceC0844j, this) == aVar) {
                    return aVar;
                }
            } else {
                if (i6 != 1) {
                    throw new IllegalStateException("call to 'resume' before 'invoke' with coroutine");
                }
                AbstractC2467b.l(obj);
            }
            return C3137A.f25453a;
        }
    }

    /* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
    public SnapshotStateKt__SnapshotFlowKt$collectAsState$1$1(A4.j jVar, InterfaceC0843i interfaceC0843i, A4.d dVar) {
        super(2, dVar);
        this.$context = jVar;
        this.$this_collectAsState = interfaceC0843i;
    }

    @Override // C4.a
    public final A4.d create(Object obj, A4.d dVar) {
        SnapshotStateKt__SnapshotFlowKt$collectAsState$1$1 snapshotStateKt__SnapshotFlowKt$collectAsState$1$1 = new SnapshotStateKt__SnapshotFlowKt$collectAsState$1$1(this.$context, this.$this_collectAsState, dVar);
        snapshotStateKt__SnapshotFlowKt$collectAsState$1$1.L$0 = obj;
        return snapshotStateKt__SnapshotFlowKt$collectAsState$1$1;
    }

    @Override // J4.e
    public final Object invoke(ProduceStateScope<R> produceStateScope, A4.d dVar) {
        return ((SnapshotStateKt__SnapshotFlowKt$collectAsState$1$1) create(produceStateScope, dVar)).invokeSuspend(C3137A.f25453a);
    }

    /* JADX WARN: Code restructure failed: missing block: B:13:0x0037, code lost:
    
        if (r1.collect(r2, r6) == r0) goto L17;
     */
    /* JADX WARN: Code restructure failed: missing block: B:16:0x004a, code lost:
    
        if (V4.E.H(r1, r3, r6) == r0) goto L17;
     */
    /* JADX WARN: Code restructure failed: missing block: B:17:0x004c, code lost:
    
        return r0;
     */
    @Override // C4.a
    /*
        Code decompiled incorrectly, please refer to instructions dump.
    */
    public final Object invokeSuspend(Object obj) {
        B4.a aVar = B4.a.f492a;
        int i6 = this.label;
        if (i6 == 0) {
            AbstractC2467b.l(obj);
            final ProduceStateScope produceStateScope = (ProduceStateScope) this.L$0;
            if (kotlin.jvm.internal.o.c(this.$context, A4.k.f106a)) {
                InterfaceC0843i interfaceC0843i = this.$this_collectAsState;
                InterfaceC0844j interfaceC0844j = new InterfaceC0844j() { // from class: androidx.compose.runtime.SnapshotStateKt__SnapshotFlowKt$collectAsState$1$1.1
                    /* JADX WARN: Type inference incomplete: some casts might be missing */
                    @Override // Y4.InterfaceC0844j
                    public final Object emit(T t6, A4.d dVar) {
                        produceStateScope.setValue((R) t6);
                        return C3137A.f25453a;
                    }
                };
                this.label = 1;
            } else {
                A4.j jVar = this.$context;
                AnonymousClass2 anonymousClass2 = new AnonymousClass2(this.$this_collectAsState, produceStateScope, null);
                this.label = 2;
            }
        } else {
            if (i6 != 1 && i6 != 2) {
                throw new IllegalStateException("call to 'resume' before 'invoke' with coroutine");
            }
            AbstractC2467b.l(obj);
        }
        return C3137A.f25453a;
    }
}
