package g2;

import F5.C0115b;
import Z6.AbstractC0385z;
import Z6.C0362b0;
import com.google.android.gms.internal.measurement.C1;
import p2.C1423m;

/* JADX INFO: renamed from: g2.d, reason: case insensitive filesystem */
/* JADX INFO: loaded from: classes.dex */
public final class C0976d {

    /* JADX INFO: renamed from: a, reason: collision with root package name */
    public final m f12893a;

    /* JADX INFO: renamed from: b, reason: collision with root package name */
    public final C1423m f12894b;

    /* JADX INFO: renamed from: c, reason: collision with root package name */
    public final i7.j f12895c;

    /* JADX INFO: renamed from: d, reason: collision with root package name */
    public final EnumC0981i f12896d;

    public C0976d(m mVar, C1423m c1423m, i7.j jVar, EnumC0981i enumC0981i) {
        this.f12893a = mVar;
        this.f12894b = c1423m;
        this.f12895c = jVar;
        this.f12896d = enumC0981i;
    }

    /* JADX WARN: Removed duplicated region for block: B:7:0x0013  */
    /*
        Code decompiled incorrectly, please refer to instructions dump.
    */
    public final Object a(G6.c cVar) throws Throwable {
        C0975c c0975c;
        i7.j jVar;
        C0976d c0976d;
        Object obj;
        Throwable th;
        if (cVar instanceof C0975c) {
            c0975c = (C0975c) cVar;
            int i = c0975c.f12892x;
            if ((i & Integer.MIN_VALUE) != 0) {
                c0975c.f12892x = i - Integer.MIN_VALUE;
            } else {
                c0975c = new C0975c(this, cVar);
            }
        }
        Object obj2 = c0975c.f12890v;
        F6.a aVar = F6.a.f2580q;
        int i5 = c0975c.f12892x;
        try {
            if (i5 == 0) {
                C1.N(obj2);
                c0975c.f12888t = this;
                jVar = this.f12895c;
                c0975c.f12889u = jVar;
                c0975c.f12892x = 1;
                if (jVar.c(c0975c) != aVar) {
                    c0976d = this;
                }
                return aVar;
            }
            if (i5 != 1) {
                if (i5 != 2) {
                    throw new IllegalStateException("call to 'resume' before 'invoke' with coroutine");
                }
                obj = (i7.f) c0975c.f12888t;
                try {
                    C1.N(obj2);
                    C0978f c0978f = (C0978f) obj2;
                    ((i7.i) obj).e();
                    return c0978f;
                } catch (Throwable th2) {
                    th = th2;
                    ((i7.i) obj).e();
                    throw th;
                }
            }
            i7.j jVar2 = c0975c.f12889u;
            c0976d = (C0976d) c0975c.f12888t;
            C1.N(obj2);
            jVar = jVar2;
            C0115b c0115b = new C0115b(11, c0976d);
            c0975c.f12888t = jVar;
            c0975c.f12889u = null;
            c0975c.f12892x = 2;
            Object objC = AbstractC0385z.C(E6.j.f2226q, new C0362b0(c0115b, null), c0975c);
            if (objC != aVar) {
                obj = jVar;
                obj2 = objC;
                C0978f c0978f2 = (C0978f) obj2;
                ((i7.i) obj).e();
                return c0978f2;
            }
            return aVar;
        } catch (Throwable th3) {
            obj = jVar;
            th = th3;
            ((i7.i) obj).e();
            throw th;
        }
    }
}
