package R1;

import G6.i;
import O1.G;
import O1.H;
import O6.l;
import O6.p;
import Q1.m;
import Q1.t;
import com.google.android.gms.internal.measurement.C1;

/* JADX INFO: loaded from: classes.dex */
public final class d implements H, t {

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

    public d(a aVar) {
        this.f6034a = aVar;
    }

    @Override // O1.InterfaceC0243t
    public final Object a(String str, l lVar, G6.c cVar) {
        g gVarH0 = this.f6034a.h0(str);
        try {
            Object objB = lVar.b(gVarH0);
            W3.b.j(gVarH0, null);
            return objB;
        } finally {
        }
    }

    @Override // O1.H
    public final Object b(i iVar) {
        return Boolean.valueOf(this.f6034a.f6027q.g0());
    }

    @Override // Q1.t
    public final X1.a c() {
        return this.f6034a;
    }

    @Override // O1.H
    public final Object d(G g8, p pVar, i iVar) {
        return e(g8, pVar, iVar);
    }

    /* JADX WARN: Removed duplicated region for block: B:41:0x0090  */
    /* JADX WARN: Removed duplicated region for block: B:7:0x0013  */
    /*
        Code decompiled incorrectly, please refer to instructions dump.
    */
    public final Object e(G g8, p pVar, G6.c cVar) throws Throwable {
        c cVar2;
        Throwable th;
        Y1.a aVar;
        d dVar;
        if (cVar instanceof c) {
            cVar2 = (c) cVar;
            int i = cVar2.f6033x;
            if ((i & Integer.MIN_VALUE) != 0) {
                cVar2.f6033x = i - Integer.MIN_VALUE;
            } else {
                cVar2 = new c(this, cVar);
            }
        }
        Object obj = cVar2.f6031v;
        Object obj2 = F6.a.f2580q;
        int i5 = cVar2.f6033x;
        if (i5 == 0) {
            C1.N(obj);
            Y1.a aVar2 = this.f6034a.f6027q;
            aVar2.g0();
            int iOrdinal = g8.ordinal();
            if (iOrdinal == 0) {
                aVar2.Z();
            } else if (iOrdinal == 1) {
                aVar2.J();
            } else {
                if (iOrdinal != 2) {
                    throw new A6.b();
                }
                aVar2.l();
            }
            try {
                Object mVar = new m(1, this);
                cVar2.f6029t = this;
                cVar2.f6030u = aVar2;
                cVar2.f6033x = 1;
                Object objK = pVar.k(mVar, cVar2);
                if (objK == obj2) {
                    return obj2;
                }
                obj = objK;
                aVar = aVar2;
                dVar = this;
            } catch (Throwable th2) {
                th = th2;
                aVar = aVar2;
                dVar = this;
                aVar.k();
                if (!aVar.g0()) {
                    dVar.getClass();
                }
                throw th;
            }
        } else {
            if (i5 != 1) {
                throw new IllegalStateException("call to 'resume' before 'invoke' with coroutine");
            }
            aVar = cVar2.f6030u;
            dVar = cVar2.f6029t;
            try {
                C1.N(obj);
            } catch (Throwable th3) {
                th = th3;
                aVar.k();
                if (!aVar.g0()) {
                }
                throw th;
            }
        }
        aVar.B();
        aVar.k();
        if (!aVar.g0()) {
            dVar.getClass();
        }
        return obj;
    }
}
