package W;

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

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

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

    /* JADX INFO: renamed from: v, reason: collision with root package name */
    public final /* synthetic */ K f6913v;

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

    @Override // O6.p
    public final Object k(Object obj, Object obj2) {
        return ((E) 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 E(this.f6913v, dVar);
    }

    /* JADX WARN: Code restructure failed: missing block: B:21:0x0044, code lost:
    
        if (r6 == r0) goto L22;
     */
    @Override // G6.a
    /*
        Code decompiled incorrectly, please refer to instructions dump.
    */
    public final Object p(Object obj) throws Throwable {
        F6.a aVar = F6.a.f2580q;
        int i = this.f6912u;
        K k8 = this.f6913v;
        try {
            if (i == 0) {
                C1.N(obj);
                if (k8.f6942h.a() instanceof L) {
                    return k8.f6942h.a();
                }
                this.f6912u = 1;
                if (k8.i(this) != aVar) {
                }
                return aVar;
            }
            if (i != 1) {
                if (i != 2) {
                    throw new IllegalStateException("call to 'resume' before 'invoke' with coroutine");
                }
                C1.N(obj);
                return (V) obj;
            }
            C1.N(obj);
            this.f6912u = 2;
            obj = K.f(k8, false, this);
        } catch (Throwable th) {
            return new N(th, -1);
        }
    }
}
