package defpackage;

import androidx.media3.container.NalUnitUtil;
import defpackage.n98;
import kotlin.Metadata;
import kotlin.coroutines.jvm.internal.ContinuationImpl;
import kotlin.coroutines.jvm.internal.DebugMetadata;
import kotlin.reflect.KClass;
import kotlin.reflect.KType;

/* JADX INFO: loaded from: classes3.dex */
@Metadata(k = 3, mv = {2, 1, 0}, xi = NalUnitUtil.H265_NAL_UNIT_TYPE_UNSPECIFIED)
@DebugMetadata(c = "io.github.jan.supabase.auth.AuthImpl", f = "AuthImpl.kt", i = {}, l = {606, 612}, m = "retrieveSSOUrl", n = {}, s = {})
final class kz extends ContinuationImpl {
    public /* synthetic */ Object a;
    public final /* synthetic */ b00 b;
    public int c;

    /* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
    public kz(b00 b00Var, ContinuationImpl continuationImpl) {
        super(continuationImpl);
        this.b = b00Var;
    }

    @Override // kotlin.coroutines.jvm.internal.BaseContinuationImpl
    public final Object invokeSuspend(Object obj) throws Throwable {
        kz kzVar;
        this.a = obj;
        int i = this.c | Integer.MIN_VALUE;
        this.c = i;
        if ((i & Integer.MIN_VALUE) != 0) {
            this.c = i - Integer.MIN_VALUE;
            kzVar = this;
        } else {
            kzVar = new kz(this.b, this);
        }
        Object objC = kzVar.a;
        ck1 ck1Var = ck1.a;
        int i2 = kzVar.c;
        KType kTypeA = null;
        if (i2 == 0) {
            s38.b(objC);
            throw null;
        }
        if (i2 == 1) {
            s38.b(objC);
            ua4 a = ((rd4) objC).getA();
            KClass orCreateKotlinClass = iw7.a.getOrCreateKotlinClass(n98.b.class);
            try {
                kTypeA = iw7.a(n98.b.class);
            } catch (Throwable unused) {
            }
            fz9 fz9Var = new fz9(orCreateKotlinClass, kTypeA);
            kzVar.c = 2;
            objC = a.c(fz9Var, kzVar);
            if (objC == ck1Var) {
                return ck1Var;
            }
        } else {
            if (i2 != 2) {
                throw new IllegalStateException("call to 'resume' before 'invoke' with coroutine");
            }
            s38.b(objC);
        }
        if (objC != null) {
            return (n98.b) objC;
        }
        throw new NullPointerException("null cannot be cast to non-null type io.github.jan.supabase.auth.providers.builtin.SSO.Result");
    }
}
