package androidx.lifecycle;

import b2.C1191c;
import m3.AbstractC2467b;
import w4.C3137A;

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

    /* JADX INFO: renamed from: a, reason: collision with root package name */
    public e5.a f12108a;

    /* JADX INFO: renamed from: b, reason: collision with root package name */
    public C1191c f12109b;

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

    /* JADX INFO: renamed from: d, reason: collision with root package name */
    public final /* synthetic */ e5.c f12111d;

    /* JADX INFO: renamed from: e, reason: collision with root package name */
    public final /* synthetic */ C1191c f12112e;

    /* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
    public M(e5.c cVar, C1191c c1191c, A4.d dVar) {
        super(2, dVar);
        this.f12111d = cVar;
        this.f12112e = c1191c;
    }

    @Override // C4.a
    public final A4.d create(Object obj, A4.d dVar) {
        return new M(this.f12111d, this.f12112e, dVar);
    }

    @Override // J4.e
    public final Object invoke(Object obj, Object obj2) {
        return ((M) create((V4.C) obj, (A4.d) obj2)).invokeSuspend(C3137A.f25453a);
    }

    @Override // C4.a
    public final Object invokeSuspend(Object obj) throws Throwable {
        C1191c c1191c;
        e5.a aVar;
        e5.a aVar2;
        Throwable th;
        e5.a aVar3;
        B4.a aVar4 = B4.a.f492a;
        int i6 = this.f12110c;
        try {
            if (i6 == 0) {
                AbstractC2467b.l(obj);
                e5.c cVar = this.f12111d;
                this.f12108a = cVar;
                c1191c = this.f12112e;
                this.f12109b = c1191c;
                this.f12110c = 1;
                Object objE = cVar.e(this);
                aVar = cVar;
                if (objE != aVar4) {
                }
                return aVar4;
            }
            if (i6 != 1) {
                if (i6 != 2) {
                    throw new IllegalStateException("call to 'resume' before 'invoke' with coroutine");
                }
                aVar2 = this.f12108a;
                try {
                    AbstractC2467b.l(obj);
                    aVar3 = aVar2;
                    ((e5.c) aVar3).g(null);
                    return C3137A.f25453a;
                } catch (Throwable th2) {
                    th = th2;
                    ((e5.c) aVar2).g(null);
                    throw th;
                }
            }
            c1191c = this.f12109b;
            e5.a aVar5 = this.f12108a;
            AbstractC2467b.l(obj);
            aVar = aVar5;
            L l = new L(c1191c, null);
            this.f12108a = aVar;
            this.f12109b = null;
            this.f12110c = 2;
            if (V4.E.k(l, this) != aVar4) {
                aVar3 = aVar;
                ((e5.c) aVar3).g(null);
                return C3137A.f25453a;
            }
            return aVar4;
        } catch (Throwable th3) {
            aVar2 = aVar;
            th = th3;
            ((e5.c) aVar2).g(null);
            throw th;
        }
    }
}
