package R;

import C4.j;
import m3.AbstractC2467b;
import w4.C3137A;

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

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

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

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

    /* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
    public c(d dVar, b bVar, A4.d dVar2) {
        super(1, dVar2);
        this.f5995b = dVar;
        this.f5996c = bVar;
    }

    @Override // C4.a
    public final A4.d create(A4.d dVar) {
        return new c(this.f5995b, this.f5996c, dVar);
    }

    @Override // J4.c
    public final Object invoke(Object obj) {
        return ((c) create((A4.d) obj)).invokeSuspend(C3137A.f25453a);
    }

    @Override // C4.a
    public final Object invokeSuspend(Object obj) {
        b bVar = this.f5996c;
        B4.a aVar = B4.a.f492a;
        int i6 = this.f5994a;
        C3137A c3137a = C3137A.f25453a;
        d dVar = this.f5995b;
        try {
            if (i6 == 0) {
                AbstractC2467b.l(obj);
                dVar.f5999c.setValue(bVar);
                this.f5994a = 1;
                Object objE = bVar.f5993b.e(this);
                if (objE != aVar) {
                    objE = c3137a;
                }
                if (objE == aVar) {
                    return aVar;
                }
            } else {
                if (i6 != 1) {
                    throw new IllegalStateException("call to 'resume' before 'invoke' with coroutine");
                }
                AbstractC2467b.l(obj);
            }
            return c3137a;
        } finally {
            dVar.f5999c.setValue(null);
        }
    }
}
