package V2;

import android.content.Context;
import java.util.concurrent.CancellationException;
import m3.AbstractC2467b;
import org.json.JSONArray;
import w4.C3137A;

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

    /* JADX INFO: renamed from: a, reason: collision with root package name */
    public i3.J f7959a;

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

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

    /* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
    public C0697n(Context context, A4.d dVar) {
        super(2, dVar);
        this.f7961c = context;
    }

    @Override // C4.a
    public final A4.d create(Object obj, A4.d dVar) {
        return new C0697n(this.f7961c, dVar);
    }

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

    @Override // C4.a
    public final Object invokeSuspend(Object obj) {
        i3.J j4;
        Context context = this.f7961c;
        B4.a aVar = B4.a.f492a;
        int i6 = this.f7960b;
        C3137A c3137a = C3137A.f25453a;
        try {
        } catch (CancellationException e6) {
            throw e6;
        } catch (Exception unused) {
        }
        if (i6 == 0) {
            AbstractC2467b.l(obj);
            Y4.c0 c0Var = z3.f8212a;
            kotlin.jvm.internal.o.e(context);
            String strA = z3.a(context);
            if (strA == null) {
                strA = "main";
            }
            if (C0716s.p(C0716s.f8049a, context, strA)) {
                i3.J j6 = new i3.J(context);
                this.f7959a = j6;
                this.f7960b = 1;
                Object objI = j6.I(this);
                if (objI != aVar) {
                    j4 = j6;
                    obj = objI;
                }
            }
        } else {
            if (i6 != 1) {
                if (i6 != 2) {
                    throw new IllegalStateException("call to 'resume' before 'invoke' with coroutine");
                }
                AbstractC2467b.l(obj);
                return c3137a;
            }
            j4 = this.f7959a;
            AbstractC2467b.l(obj);
        }
        Y4.c0 c0Var2 = C0706p0.f7996a;
        C0706p0.j((JSONArray) obj);
        this.f7959a = null;
        this.f7960b = 2;
        return j4.H(this) == aVar ? aVar : c3137a;
    }
}
