package com.google.android.recaptcha.internal;

import A4.d;
import C4.j;
import J4.e;
import V4.C;
import com.google.android.play.core.integrity.StandardIntegrityException;
import com.google.android.play.core.integrity.model.StandardIntegrityErrorCode;
import m3.AbstractC2467b;
import w4.C3137A;

/* JADX INFO: loaded from: classes3.dex */
final class zzac extends j implements e {
    Object zza;
    int zzb;
    final /* synthetic */ zzae zzc;
    final /* synthetic */ String zzd;

    /* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
    public zzac(zzae zzaeVar, String str, d dVar) {
        super(2, dVar);
        this.zzc = zzaeVar;
        this.zzd = str;
    }

    @Override // C4.a
    public final d create(Object obj, d dVar) {
        return new zzac(this.zzc, this.zzd, dVar);
    }

    @Override // J4.e
    public final /* bridge */ /* synthetic */ Object invoke(Object obj, Object obj2) {
        return ((zzac) create((C) obj, (d) obj2)).invokeSuspend(C3137A.f25453a);
    }

    /* JADX WARN: Code restructure failed: missing block: B:13:0x0039, code lost:
    
        if (r7 != r0) goto L14;
     */
    /* JADX WARN: Multi-variable type inference failed */
    /* JADX WARN: Type inference failed for: r1v0, types: [int] */
    /* JADX WARN: Type inference failed for: r1v10 */
    /* JADX WARN: Type inference failed for: r1v6, types: [com.google.android.recaptcha.internal.zzen] */
    /* JADX WARN: Type inference failed for: r1v9 */
    @Override // C4.a
    /*
        Code decompiled incorrectly, please refer to instructions dump.
    */
    public final Object invokeSuspend(Object obj) throws Throwable {
        zzy zzyVar;
        B4.a aVar = B4.a.f492a;
        zzen zzenVar = this.zzb;
        try {
        } catch (Exception e6) {
            zzenVar.zzb(new zzbd(zzbb.zzb, zzba.zzaa, e6.getMessage()));
            zzae zzaeVar = this.zzc;
            this.zza = zzaeVar;
            int i6 = 2;
            this.zzb = 2;
            if (e6 instanceof StandardIntegrityException) {
                int errorCode = ((StandardIntegrityException) e6).getErrorCode();
                if (errorCode == -100) {
                    i6 = 44;
                } else if (errorCode == -12) {
                    i6 = 39;
                } else if (errorCode == -3) {
                    i6 = 30;
                } else if (errorCode == -2) {
                    i6 = 29;
                } else if (errorCode != -1) {
                    switch (errorCode) {
                        case StandardIntegrityErrorCode.INTEGRITY_TOKEN_PROVIDER_INVALID /* -19 */:
                            i6 = 54;
                            break;
                        case StandardIntegrityErrorCode.CLIENT_TRANSIENT_ERROR /* -18 */:
                            i6 = 53;
                            break;
                        case -17:
                            i6 = 52;
                            break;
                        case -16:
                            i6 = 43;
                            break;
                        case -15:
                            i6 = 42;
                            break;
                        case -14:
                            i6 = 41;
                            break;
                        default:
                            switch (errorCode) {
                                case -9:
                                    i6 = 36;
                                    break;
                                case -8:
                                    i6 = 35;
                                    break;
                                case -7:
                                    i6 = 34;
                                    break;
                                case -6:
                                    i6 = 33;
                                    break;
                                case -5:
                                    i6 = 32;
                                    break;
                            }
                            break;
                    }
                } else {
                    i6 = 28;
                }
            } else {
                i6 = 45;
            }
            zztd zztdVarZzf = zzte.zzf();
            zztdVarZzf.zzq(i6);
            zztdVarZzf.zzr(15);
            obj = zztdVarZzf.zzk();
            if (obj != aVar) {
                zzyVar = zzaeVar;
            }
            return aVar;
        }
        if (zzenVar == 0) {
            AbstractC2467b.l(obj);
            zzen zzenVarZzb = zzz.zzb(this.zzc, this.zzd);
            zzae zzaeVar2 = this.zzc;
            zzan zzanVar = zzaeVar2.zzc;
            String str = zzaeVar2.zze;
            this.zza = zzenVarZzb;
            this.zzb = 1;
            obj = zzanVar.zzc(str, this);
            zzenVar = zzenVarZzb;
        } else {
            if (zzenVar != 1) {
                zzyVar = (zzy) this.zza;
                AbstractC2467b.l(obj);
                int iZza = zzyVar.zza();
                zztd zztdVar = (zztd) ((zzte) obj).zzr();
                zztdVar.zzf(zzyVar.zza());
                return new zzw(iZza, (zzte) zztdVar.zzk());
            }
            zzen zzenVar2 = (zzen) this.zza;
            AbstractC2467b.l(obj);
            zzenVar = zzenVar2;
        }
        zzenVar.zza();
        zzae zzaeVar3 = this.zzc;
        zztf zztfVarZzf = zzti.zzf();
        zztg zztgVarZzf = zzth.zzf();
        zztgVarZzf.zzw((String) obj);
        zztfVarZzf.zzf((zzth) zztgVarZzf.zzk());
        return zzz.zza(zzaeVar3, (zzti) zztfVarZzf.zzk());
    }
}
