package W5;

import Z6.InterfaceC0382w;
import c7.K;
import com.google.android.gms.internal.measurement.C1;
import java.util.Locale;
import y5.C1763h;

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

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

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

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

    /* JADX INFO: renamed from: x, reason: collision with root package name */
    public final /* synthetic */ String f7191x;

    /* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
    public z(A a3, String str, E6.d dVar) {
        super(2, dVar);
        this.f7190w = a3;
        this.f7191x = str;
    }

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

    /* JADX WARN: Code restructure failed: missing block: B:19:0x0070, code lost:
    
        if (r2.f(r1, r6) == r0) goto L20;
     */
    /* JADX WARN: Type inference failed for: r1v9, types: [java.lang.Object, java.util.List] */
    @Override // G6.a
    /*
        Code decompiled incorrectly, please refer to instructions dump.
    */
    public final Object p(Object obj) throws Throwable {
        Object objA;
        F6.a aVar = F6.a.f2580q;
        int i = this.f7189v;
        A a3 = this.f7190w;
        if (i == 0) {
            C1.N(obj);
            Locale locale = Locale.getDefault();
            P6.g.d(locale, "getDefault(...)");
            String upperCase = this.f7191x.toUpperCase(locale);
            P6.g.d(upperCase, "toUpperCase(...)");
            this.f7189v = 1;
            objA = a3.f7139d.a(upperCase, 1, 50, this);
            if (objA != aVar) {
            }
            return aVar;
        }
        if (i != 1) {
            if (i != 2) {
                throw new IllegalStateException("call to 'resume' before 'invoke' with coroutine");
            }
            C1.N(obj);
            return A6.n.f457a;
        }
        C1.N(obj);
        objA = ((A6.j) obj).f449q;
        if (!(objA instanceof A6.i)) {
            C1763h c1763h = new C1763h(new s(((k5.m) objA).f13982c));
            K k8 = a3.i;
            k8.getClass();
            k8.g(null, c1763h);
        }
        Throwable thA = A6.j.a(objA);
        if (thA != null) {
            this.f7188u = objA;
            this.f7189v = 2;
        }
        return A6.n.f457a;
    }
}
