package com.google.android.libraries.places.internal; /* JADX INFO: Access modifiers changed from: package-private */ /* loaded from: classes2.dex */ public final class zzahw { private static final zzaht zza; static { if (zzahs.zzx()) { zzahs.zzy(); } zza = new zzahu(); } /* JADX INFO: Access modifiers changed from: package-private */ public static /* synthetic */ int zza(byte[] bArr, int i, int i2) { int i3 = i2 - i; byte b = bArr[i - 1]; if (i3 != 0) { if (i3 == 1) { byte b2 = bArr[i]; if (b <= -12 && b2 <= -65) { return b ^ (b2 << 8); } } else if (i3 == 2) { byte b3 = bArr[i]; byte b4 = bArr[i + 1]; if (b <= -12 && b3 <= -65 && b4 <= -65) { return ((b3 << 8) ^ b) ^ (b4 << 16); } } else { throw new AssertionError(); } } else if (b <= -12) { return b; } return -1; } /* JADX INFO: Access modifiers changed from: package-private */ /* JADX WARN: Code restructure failed: missing block: B:12:0x00fd, code lost: return r9 + r0; */ /* Code decompiled incorrectly, please refer to instructions dump. To view partially-correct add '--show-bad-code' argument */ public static int zzb(java.lang.CharSequence r7, byte[] r8, int r9, int r10) { /* Method dump skipped, instructions count: 254 To view this dump add '--comments-level debug' option */ throw new UnsupportedOperationException("Method not decompiled: com.google.android.libraries.places.internal.zzahw.zzb(java.lang.CharSequence, byte[], int, int):int"); } /* JADX INFO: Access modifiers changed from: package-private */ public static int zzc(CharSequence charSequence) { int length = charSequence.length(); int i = 0; int i2 = 0; while (i2 < length && charSequence.charAt(i2) < 128) { i2++; } int i3 = length; while (true) { if (i2 >= length) { break; } char charAt = charSequence.charAt(i2); if (charAt < 2048) { i3 += (127 - charAt) >>> 31; i2++; } else { int length2 = charSequence.length(); while (i2 < length2) { char charAt2 = charSequence.charAt(i2); if (charAt2 < 2048) { i += (127 - charAt2) >>> 31; } else { i += 2; if (charAt2 >= 55296 && charAt2 <= 57343) { if (Character.codePointAt(charSequence, i2) < 65536) { throw new zzahv(i2, length2); } i2++; } } i2++; } i3 += i; } } if (i3 >= length) { return i3; } StringBuilder sb = new StringBuilder("UTF-8 length does not fit in int: "); sb.append(i3 + 4294967296L); throw new IllegalArgumentException(sb.toString()); } /* JADX INFO: Access modifiers changed from: package-private */ public static boolean zzd(byte[] bArr) { return zza.zzb(bArr, 0, bArr.length); } /* JADX INFO: Access modifiers changed from: package-private */ public static boolean zze(byte[] bArr, int i, int i2) { return zza.zzb(bArr, 0, i2); } }