package com.google.android.gms.internal.gtm; import java.nio.ByteBuffer; import net.sf.scuba.smartcards.ISO7816; /* loaded from: classes2.dex */ final class zzuc extends zzub { @Override // com.google.android.gms.internal.gtm.zzub final int zzb(int i, byte[] bArr, int i2, int i3) { int zzg; int zzg2; while (i2 < i3 && bArr[i2] >= 0) { i2++; } if (i2 >= i3) { return 0; } while (i2 < i3) { int i4 = i2 + 1; byte b = bArr[i2]; if (b < 0) { if (b < -32) { if (i4 >= i3) { return b; } if (b >= -62) { i2 += 2; if (bArr[i4] > -65) { } } return -1; } if (b >= -16) { if (i4 < i3 - 2) { byte b2 = bArr[i4]; if (b2 <= -65 && (((b << 28) + (b2 + ISO7816.INS_MANAGE_CHANNEL)) >> 30) == 0 && bArr[i2 + 2] <= -65) { i4 = i2 + 4; if (bArr[i2 + 3] > -65) { } } return -1; } zzg = zztz.zzg(bArr, i4, i3); return zzg; } if (i4 < i3 - 1) { byte b3 = bArr[i4]; if (b3 <= -65 && ((b != -32 || b3 >= -96) && (b != -19 || b3 < -96))) { i4 = i2 + 3; if (bArr[i2 + 2] > -65) { } } return -1; } zzg2 = zztz.zzg(bArr, i4, i3); return zzg2; } i2 = i4; } return 0; } /* JADX INFO: Access modifiers changed from: package-private */ @Override // com.google.android.gms.internal.gtm.zzub public final String zzh(byte[] bArr, int i, int i2) throws zzrk { boolean zzd; boolean zzd2; boolean zze; boolean zzf; boolean zzd3; if ((i | i2 | ((bArr.length - i) - i2)) < 0) { throw new ArrayIndexOutOfBoundsException(String.format("buffer length=%d, index=%d, size=%d", Integer.valueOf(bArr.length), Integer.valueOf(i), Integer.valueOf(i2))); } int i3 = i + i2; char[] cArr = new char[i2]; int i4 = 0; while (i < i3) { byte b = bArr[i]; zzd3 = zzua.zzd(b); if (!zzd3) { break; } i++; zzua.zza(b, cArr, i4); i4++; } int i5 = i4; while (i < i3) { int i6 = i + 1; byte b2 = bArr[i]; zzd = zzua.zzd(b2); if (zzd) { zzua.zza(b2, cArr, i5); i5++; i = i6; while (i < i3) { byte b3 = bArr[i]; zzd2 = zzua.zzd(b3); if (zzd2) { i++; zzua.zza(b3, cArr, i5); i5++; } } } else { zze = zzua.zze(b2); if (!zze) { zzf = zzua.zzf(b2); if (zzf) { if (i6 < i3 - 1) { zzua.zza(b2, bArr[i6], bArr[i + 2], cArr, i5); i5++; i += 3; } else { throw zzrk.zzpw(); } } else if (i6 < i3 - 2) { zzua.zza(b2, bArr[i6], bArr[i + 2], bArr[i + 3], cArr, i5); i5 += 2; i += 4; } else { throw zzrk.zzpw(); } } else if (i6 < i3) { i += 2; zzua.zza(b2, bArr[i6], cArr, i5); i5++; } else { throw zzrk.zzpw(); } } } return new String(cArr, 0, i5); } /* JADX INFO: Access modifiers changed from: package-private */ /* JADX WARN: Code restructure failed: missing block: B:12:0x001d, code lost: return r10 + r0; */ @Override // com.google.android.gms.internal.gtm.zzub /* Code decompiled incorrectly, please refer to instructions dump. To view partially-correct add '--show-bad-code' argument */ public final int zzb(java.lang.CharSequence r8, byte[] r9, int r10, int r11) { /* Method dump skipped, instructions count: 257 To view this dump add '--comments-level debug' option */ throw new UnsupportedOperationException("Method not decompiled: com.google.android.gms.internal.gtm.zzuc.zzb(java.lang.CharSequence, byte[], int, int):int"); } /* JADX INFO: Access modifiers changed from: package-private */ @Override // com.google.android.gms.internal.gtm.zzub public final void zzb(CharSequence charSequence, ByteBuffer byteBuffer) { zzc(charSequence, byteBuffer); } }