package H5;

import Z6.InterfaceC0382w;
import com.google.android.gms.internal.measurement.C1;
import k5.C1104d;

/* JADX INFO: loaded from: classes.dex */
public final class w extends G6.i implements O6.p {

    /* JADX INFO: renamed from: u, reason: collision with root package name */
    public Object f3158u;

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

    /* JADX INFO: renamed from: w, reason: collision with root package name */
    public final /* synthetic */ B f3160w;

    /* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
    public w(B b8, E6.d dVar) {
        super(2, dVar);
        this.f3160w = b8;
    }

    @Override // O6.p
    public final Object k(Object obj, Object obj2) {
        return ((w) m((E6.d) obj2, (InterfaceC0382w) obj)).p(A6.n.f457a);
    }

    @Override // G6.a
    public final E6.d m(E6.d dVar, Object obj) {
        return new w(this.f3160w, dVar);
    }

    @Override // G6.a
    public final Object p(Object obj) throws Throwable {
        Object objX;
        F6.a aVar = F6.a.f2580q;
        int i = this.f3159v;
        B b8 = this.f3160w;
        if (i == 0) {
            C1.N(obj);
            C2.a aVar2 = b8.f3103f;
            this.f3159v = 1;
            objX = aVar2.x(false, this);
            if (objX != aVar) {
            }
            return aVar;
        }
        if (i != 1) {
            if (i != 2) {
                throw new IllegalStateException("call to 'resume' before 'invoke' with coroutine");
            }
            C1.N(obj);
            return null;
        }
        C1.N(obj);
        objX = ((A6.j) obj).f449q;
        if (!(objX instanceof A6.i)) {
            C1104d c1104d = (C1104d) objX;
            return new C0143b(c1104d.f13969a.f11086r, null, c1104d.f13970b, null);
        }
        Throwable thA = A6.j.a(objX);
        if (thA != null) {
            this.f3158u = objX;
            this.f3159v = 2;
            if (b8.f(thA, this) == aVar) {
                return aVar;
            }
        }
        return null;
    }
}
