package com.google.android.recaptcha.internal;

import androidx.media3.exoplayer.analytics.AnalyticsListener;

/* JADX INFO: loaded from: classes3.dex */
final class zzpt {
    public static /* bridge */ /* synthetic */ void zza(byte b5, byte b6, byte b7, byte b8, char[] cArr, int i6) throws zznn {
        if (!zze(b6)) {
            if ((((b6 + 112) + (b5 << 28)) >> 30) == 0 && !zze(b7) && !zze(b8)) {
                int i7 = ((b5 & 7) << 18) | ((b6 & 63) << 12) | ((b7 & 63) << 6) | (b8 & 63);
                cArr[i6] = (char) ((i7 >>> 10) + 55232);
                cArr[i6 + 1] = (char) ((i7 & AnalyticsListener.EVENT_DRM_KEYS_LOADED) + 56320);
                return;
            }
        }
        throw new zznn("Protocol message had invalid UTF-8.");
    }

    /* JADX WARN: Removed duplicated region for block: B:10:0x0013  */
    /* JADX WARN: Removed duplicated region for block: B:12:0x0016 A[PHI: r2
      0x0016: PHI (r2v3 byte) = (r2v2 byte), (r2v9 byte) binds: [B:9:0x0011, B:11:0x0015] A[DONT_GENERATE, DONT_INLINE]] */
    /* JADX WARN: Removed duplicated region for block: B:14:0x001c  */
    /*
        Code decompiled incorrectly, please refer to instructions dump.
    */
    public static /* bridge */ /* synthetic */ void zzb(byte b5, byte b6, byte b7, char[] cArr, int i6) throws zznn {
        if (!zze(b6)) {
            if (b5 != -32) {
                if (b5 != -19) {
                    if (!zze(b7)) {
                        cArr[i6] = (char) (((b5 & 15) << 12) | ((b6 & 63) << 6) | (b7 & 63));
                        return;
                    }
                } else if (b6 < -96) {
                    b5 = -19;
                    if (!zze(b7)) {
                    }
                }
            } else if (b6 >= -96) {
                b5 = -32;
                if (b5 != -19) {
                }
            }
        }
        throw new zznn("Protocol message had invalid UTF-8.");
    }

    public static /* bridge */ /* synthetic */ void zzc(byte b5, byte b6, char[] cArr, int i6) throws zznn {
        if (b5 < -62 || zze(b6)) {
            throw new zznn("Protocol message had invalid UTF-8.");
        }
        cArr[i6] = (char) (((b5 & 31) << 6) | (b6 & 63));
    }

    public static /* bridge */ /* synthetic */ boolean zzd(byte b5) {
        return b5 >= 0;
    }

    private static boolean zze(byte b5) {
        return b5 > -65;
    }
}
