package x;

import V4.InterfaceC0765i0;
import java.util.concurrent.CancellationException;
import m3.AbstractC2467b;
import w4.C3137A;

/* JADX INFO: renamed from: x.i, reason: case insensitive filesystem */
/* JADX INFO: loaded from: classes.dex */
public final class C3168i extends C4.j implements J4.e {

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

    /* JADX INFO: renamed from: b, reason: collision with root package name */
    public /* synthetic */ Object f25822b;

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

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

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

    /* JADX INFO: renamed from: f, reason: collision with root package name */
    public final /* synthetic */ long f25826f;

    /* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
    public C3168i(C3171j c3171j, L1 l12, InterfaceC3153d interfaceC3153d, long j4, A4.d dVar) {
        super(2, dVar);
        this.f25823c = c3171j;
        this.f25824d = l12;
        this.f25825e = interfaceC3153d;
        this.f25826f = j4;
    }

    @Override // C4.a
    public final A4.d create(Object obj, A4.d dVar) {
        C3168i c3168i = new C3168i(this.f25823c, this.f25824d, this.f25825e, this.f25826f, dVar);
        c3168i.f25822b = obj;
        return c3168i;
    }

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

    @Override // C4.a
    public final Object invokeSuspend(Object obj) {
        B4.a aVar = B4.a.f492a;
        int i6 = this.f25821a;
        C3171j c3171j = this.f25823c;
        try {
            try {
                if (i6 == 0) {
                    AbstractC2467b.l(obj);
                    InterfaceC0765i0 interfaceC0765i0Q = V4.E.q(((V4.C) this.f25822b).getCoroutineContext());
                    c3171j.l = true;
                    C3167h1 c3167h1 = c3171j.f25835b;
                    v.z0 z0Var = v.z0.f24987a;
                    C3165h c3165h = new C3165h(this.f25824d, c3171j, this.f25825e, this.f25826f, interfaceC0765i0Q, null);
                    this.f25821a = 1;
                    if (c3167h1.f(z0Var, c3165h, this) == aVar) {
                        return aVar;
                    }
                } else {
                    if (i6 != 1) {
                        throw new IllegalStateException("call to 'resume' before 'invoke' with coroutine");
                    }
                    AbstractC2467b.l(obj);
                }
                c3171j.f25839f.b();
                c3171j.l = false;
                c3171j.f25839f.a(null);
                c3171j.f25840j = false;
                return C3137A.f25453a;
            } catch (CancellationException e6) {
                throw e6;
            }
        } catch (Throwable th) {
            c3171j.l = false;
            c3171j.f25839f.a(null);
            c3171j.f25840j = false;
            throw th;
        }
    }
}
