package androidx.compose.runtime;

import V4.C0772m;
import a.AbstractC0872a;
import m3.AbstractC2467b;

/* JADX INFO: loaded from: classes.dex */
final class ProduceStateScopeImpl<T> implements ProduceStateScope<T>, MutableState<T> {
    private final /* synthetic */ MutableState<T> $$delegate_0;
    private final A4.j coroutineContext;

    /* JADX INFO: renamed from: androidx.compose.runtime.ProduceStateScopeImpl$awaitDispose$1, reason: invalid class name */
    @C4.e(c = "androidx.compose.runtime.ProduceStateScopeImpl", f = "ProduceState.kt", l = {208}, m = "awaitDispose", v = 1)
    public static final class AnonymousClass1 extends C4.c {
        Object L$0;
        int label;
        /* synthetic */ Object result;
        final /* synthetic */ ProduceStateScopeImpl<T> this$0;

        /* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
        public AnonymousClass1(ProduceStateScopeImpl<T> produceStateScopeImpl, A4.d dVar) {
            super(dVar);
            this.this$0 = produceStateScopeImpl;
        }

        @Override // C4.a
        public final Object invokeSuspend(Object obj) {
            this.result = obj;
            this.label |= Integer.MIN_VALUE;
            return this.this$0.awaitDispose(null, this);
        }
    }

    public ProduceStateScopeImpl(MutableState<T> mutableState, A4.j jVar) {
        this.$$delegate_0 = mutableState;
        this.coroutineContext = jVar;
    }

    /* JADX WARN: Removed duplicated region for block: B:7:0x0013  */
    @Override // androidx.compose.runtime.ProduceStateScope
    /*
        Code decompiled incorrectly, please refer to instructions dump.
    */
    public Object awaitDispose(J4.a aVar, A4.d dVar) {
        AnonymousClass1 anonymousClass1;
        if (dVar instanceof AnonymousClass1) {
            anonymousClass1 = (AnonymousClass1) dVar;
            int i6 = anonymousClass1.label;
            if ((i6 & Integer.MIN_VALUE) != 0) {
                anonymousClass1.label = i6 - Integer.MIN_VALUE;
            } else {
                anonymousClass1 = new AnonymousClass1(this, dVar);
            }
        }
        Object obj = anonymousClass1.result;
        B4.a aVar2 = B4.a.f492a;
        int i7 = anonymousClass1.label;
        try {
            if (i7 == 0) {
                AbstractC2467b.l(obj);
                anonymousClass1.L$0 = aVar;
                anonymousClass1.label = 1;
                C0772m c0772m = new C0772m(1, AbstractC0872a.V(anonymousClass1));
                c0772m.s();
                if (c0772m.r() == aVar2) {
                    return aVar2;
                }
            } else {
                if (i7 != 1) {
                    throw new IllegalStateException("call to 'resume' before 'invoke' with coroutine");
                }
                aVar = (J4.a) anonymousClass1.L$0;
                AbstractC2467b.l(obj);
            }
            throw new E3.v();
        } catch (Throwable th) {
            aVar.invoke();
            throw th;
        }
    }

    @Override // androidx.compose.runtime.MutableState
    public T component1() {
        return this.$$delegate_0.component1();
    }

    @Override // androidx.compose.runtime.MutableState
    public J4.c component2() {
        return this.$$delegate_0.component2();
    }

    @Override // androidx.compose.runtime.ProduceStateScope, V4.C
    public A4.j getCoroutineContext() {
        return this.coroutineContext;
    }

    @Override // androidx.compose.runtime.MutableState, androidx.compose.runtime.State
    public T getValue() {
        return this.$$delegate_0.getValue();
    }

    @Override // androidx.compose.runtime.MutableState
    public void setValue(T t6) {
        this.$$delegate_0.setValue(t6);
    }
}
