package O1;

import android.database.SQLException;
import com.google.android.gms.internal.measurement.C1;
import java.util.Set;

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

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

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

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

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

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

    @Override // G6.a
    public final E6.d m(E6.d dVar, Object obj) {
        L l8 = new L(this.f4960w, dVar);
        l8.f4959v = obj;
        return l8;
    }

    /* JADX WARN: Code restructure failed: missing block: B:18:0x0050, code lost:
    
        if (r8 == r0) goto L19;
     */
    @Override // G6.a
    /*
        Code decompiled incorrectly, please refer to instructions dump.
    */
    public final Object p(Object obj) throws Throwable {
        H h8;
        F6.a aVar = F6.a.f2580q;
        int i = this.f4958u;
        B6.v vVar = B6.v.f1034q;
        try {
            if (i == 0) {
                C1.N(obj);
                h8 = (H) this.f4959v;
                this.f4959v = h8;
                this.f4958u = 1;
                obj = h8.b(this);
                if (obj != aVar) {
                }
                return aVar;
            }
            if (i != 1) {
                if (i != 2) {
                    throw new IllegalStateException("call to 'resume' before 'invoke' with coroutine");
                }
                C1.N(obj);
                return (Set) obj;
            }
            h8 = (H) this.f4959v;
            C1.N(obj);
            if (!((Boolean) obj).booleanValue()) {
                G g8 = G.f4944r;
                K k8 = new K(this.f4960w, null);
                this.f4959v = null;
                this.f4958u = 2;
                obj = h8.d(g8, k8, this);
            }
        } catch (SQLException unused) {
        }
        return vVar;
    }
}
