what-the-bank/sources/com/google/android/gms/internal/vision/zzel.java

1441 lines
41 KiB
Java
Raw Permalink Normal View History

2024-07-27 18:17:47 +07:00
package com.google.android.gms.internal.vision;
import com.google.common.base.Ascii;
import com.google.common.primitives.UnsignedBytes;
import java.io.IOException;
import java.nio.ByteBuffer;
import java.util.List;
import java.util.Map;
/* loaded from: classes2.dex */
final class zzel extends zzej {
private final byte[] buffer;
private int limit;
private int pos;
private int tag;
private final boolean zzrs;
private final int zzrt;
private int zzru;
public zzel(ByteBuffer byteBuffer, boolean z) {
super(null);
this.zzrs = true;
this.buffer = byteBuffer.array();
int arrayOffset = byteBuffer.arrayOffset() + byteBuffer.position();
this.pos = arrayOffset;
this.zzrt = arrayOffset;
this.limit = byteBuffer.arrayOffset() + byteBuffer.limit();
}
@Override // com.google.android.gms.internal.vision.zzhv
public final int zzcn() throws IOException {
if (zzcm()) {
return Integer.MAX_VALUE;
}
int zzdd = zzdd();
this.tag = zzdd;
if (zzdd == this.zzru) {
return Integer.MAX_VALUE;
}
return zzdd >>> 3;
}
@Override // com.google.android.gms.internal.vision.zzhv
public final boolean zzco() throws IOException {
int i;
int i2;
if (zzcm() || (i = this.tag) == (i2 = this.zzru)) {
return false;
}
int i3 = i & 7;
if (i3 == 0) {
int i4 = this.limit;
int i5 = this.pos;
if (i4 - i5 >= 10) {
byte[] bArr = this.buffer;
int i6 = 0;
while (i6 < 10) {
int i7 = i5 + 1;
if (bArr[i5] >= 0) {
this.pos = i7;
break;
}
i6++;
i5 = i7;
}
}
for (int i8 = 0; i8 < 10; i8++) {
if (readByte() >= 0) {
return true;
}
}
throw zzgf.zzfj();
}
if (i3 == 1) {
zzz(8);
return true;
}
if (i3 == 2) {
zzz(zzdd());
return true;
}
if (i3 != 3) {
if (i3 == 5) {
zzz(4);
return true;
}
throw zzgf.zzfm();
}
this.zzru = ((i >>> 3) << 3) | 4;
while (zzcn() != Integer.MAX_VALUE && zzco()) {
}
if (this.tag != this.zzru) {
throw zzgf.zzfo();
}
this.zzru = i2;
return true;
}
@Override // com.google.android.gms.internal.vision.zzhv
public final double readDouble() throws IOException {
zzab(1);
return Double.longBitsToDouble(zzdh());
}
@Override // com.google.android.gms.internal.vision.zzhv
public final float readFloat() throws IOException {
zzab(5);
return Float.intBitsToFloat(zzdg());
}
@Override // com.google.android.gms.internal.vision.zzhv
public final long zzcp() throws IOException {
zzab(0);
return zzde();
}
@Override // com.google.android.gms.internal.vision.zzhv
public final long zzcq() throws IOException {
zzab(0);
return zzde();
}
@Override // com.google.android.gms.internal.vision.zzhv
public final int zzcr() throws IOException {
zzab(0);
return zzdd();
}
@Override // com.google.android.gms.internal.vision.zzhv
public final long zzcs() throws IOException {
zzab(1);
return zzdh();
}
@Override // com.google.android.gms.internal.vision.zzhv
public final int zzct() throws IOException {
zzab(5);
return zzdg();
}
@Override // com.google.android.gms.internal.vision.zzhv
public final boolean zzcu() throws IOException {
zzab(0);
return zzdd() != 0;
}
@Override // com.google.android.gms.internal.vision.zzhv
public final String readString() throws IOException {
return zzg(false);
}
@Override // com.google.android.gms.internal.vision.zzhv
public final String zzcv() throws IOException {
return zzg(true);
}
private final String zzg(boolean z) throws IOException {
zzab(2);
int zzdd = zzdd();
if (zzdd == 0) {
return "";
}
zzaa(zzdd);
if (z) {
byte[] bArr = this.buffer;
int i = this.pos;
if (!zziw.zzg(bArr, i, i + zzdd)) {
throw zzgf.zzfp();
}
}
String str = new String(this.buffer, this.pos, zzdd, zzga.UTF_8);
this.pos += zzdd;
return str;
}
@Override // com.google.android.gms.internal.vision.zzhv
public final <T> T zza(Class<T> cls, zzfk zzfkVar) throws IOException {
zzab(2);
return (T) zzb(zzhs.zzgl().zzf(cls), zzfkVar);
}
@Override // com.google.android.gms.internal.vision.zzhv
public final <T> T zza(zzhw<T> zzhwVar, zzfk zzfkVar) throws IOException {
zzab(2);
return (T) zzb(zzhwVar, zzfkVar);
}
private final <T> T zzb(zzhw<T> zzhwVar, zzfk zzfkVar) throws IOException {
int zzdd = zzdd();
zzaa(zzdd);
int i = this.limit;
int i2 = this.pos + zzdd;
this.limit = i2;
try {
T newInstance = zzhwVar.newInstance();
zzhwVar.zza(newInstance, this, zzfkVar);
zzhwVar.zze(newInstance);
if (this.pos == i2) {
return newInstance;
}
throw zzgf.zzfo();
} finally {
this.limit = i;
}
}
@Override // com.google.android.gms.internal.vision.zzhv
public final <T> T zzb(Class<T> cls, zzfk zzfkVar) throws IOException {
zzab(3);
return (T) zzd(zzhs.zzgl().zzf(cls), zzfkVar);
}
@Override // com.google.android.gms.internal.vision.zzhv
public final <T> T zzc(zzhw<T> zzhwVar, zzfk zzfkVar) throws IOException {
zzab(3);
return (T) zzd(zzhwVar, zzfkVar);
}
private final <T> T zzd(zzhw<T> zzhwVar, zzfk zzfkVar) throws IOException {
int i = this.zzru;
this.zzru = ((this.tag >>> 3) << 3) | 4;
try {
T newInstance = zzhwVar.newInstance();
zzhwVar.zza(newInstance, this, zzfkVar);
zzhwVar.zze(newInstance);
if (this.tag == this.zzru) {
return newInstance;
}
throw zzgf.zzfo();
} finally {
this.zzru = i;
}
}
@Override // com.google.android.gms.internal.vision.zzhv
public final zzeo zzcw() throws IOException {
zzeo zzb;
zzab(2);
int zzdd = zzdd();
if (zzdd == 0) {
return zzeo.zzrx;
}
zzaa(zzdd);
if (this.zzrs) {
zzb = zzeo.zzc(this.buffer, this.pos, zzdd);
} else {
zzb = zzeo.zzb(this.buffer, this.pos, zzdd);
}
this.pos += zzdd;
return zzb;
}
@Override // com.google.android.gms.internal.vision.zzhv
public final int zzcx() throws IOException {
zzab(0);
return zzdd();
}
@Override // com.google.android.gms.internal.vision.zzhv
public final int zzcy() throws IOException {
zzab(0);
return zzdd();
}
@Override // com.google.android.gms.internal.vision.zzhv
public final int zzcz() throws IOException {
zzab(5);
return zzdg();
}
@Override // com.google.android.gms.internal.vision.zzhv
public final long zzda() throws IOException {
zzab(1);
return zzdh();
}
@Override // com.google.android.gms.internal.vision.zzhv
public final int zzdb() throws IOException {
zzab(0);
return zzez.zzaq(zzdd());
}
@Override // com.google.android.gms.internal.vision.zzhv
public final long zzdc() throws IOException {
zzab(0);
return zzez.zzd(zzde());
}
@Override // com.google.android.gms.internal.vision.zzhv
public final void zza(List<Double> list) throws IOException {
int i;
int i2;
if (list instanceof zzfh) {
zzfh zzfhVar = (zzfh) list;
int i3 = this.tag & 7;
if (i3 != 1) {
if (i3 == 2) {
int zzdd = zzdd();
zzac(zzdd);
int i4 = this.pos;
while (this.pos < i4 + zzdd) {
zzfhVar.zzc(Double.longBitsToDouble(zzdj()));
}
return;
}
throw zzgf.zzfm();
}
do {
zzfhVar.zzc(readDouble());
if (zzcm()) {
return;
} else {
i2 = this.pos;
}
} while (zzdd() == this.tag);
this.pos = i2;
return;
}
int i5 = this.tag & 7;
if (i5 != 1) {
if (i5 == 2) {
int zzdd2 = zzdd();
zzac(zzdd2);
int i6 = this.pos;
while (this.pos < i6 + zzdd2) {
list.add(Double.valueOf(Double.longBitsToDouble(zzdj())));
}
return;
}
throw zzgf.zzfm();
}
do {
list.add(Double.valueOf(readDouble()));
if (zzcm()) {
return;
} else {
i = this.pos;
}
} while (zzdd() == this.tag);
this.pos = i;
}
@Override // com.google.android.gms.internal.vision.zzhv
public final void zzb(List<Float> list) throws IOException {
int i;
int i2;
if (!(list instanceof zzfv)) {
int i3 = this.tag & 7;
if (i3 == 2) {
int zzdd = zzdd();
zzad(zzdd);
int i4 = this.pos;
while (this.pos < i4 + zzdd) {
list.add(Float.valueOf(Float.intBitsToFloat(zzdi())));
}
return;
}
if (i3 != 5) {
throw zzgf.zzfm();
}
do {
list.add(Float.valueOf(readFloat()));
if (zzcm()) {
return;
} else {
i = this.pos;
}
} while (zzdd() == this.tag);
this.pos = i;
return;
}
zzfv zzfvVar = (zzfv) list;
int i5 = this.tag & 7;
if (i5 == 2) {
int zzdd2 = zzdd();
zzad(zzdd2);
int i6 = this.pos;
while (this.pos < i6 + zzdd2) {
zzfvVar.zzh(Float.intBitsToFloat(zzdi()));
}
return;
}
if (i5 != 5) {
throw zzgf.zzfm();
}
do {
zzfvVar.zzh(readFloat());
if (zzcm()) {
return;
} else {
i2 = this.pos;
}
} while (zzdd() == this.tag);
this.pos = i2;
}
@Override // com.google.android.gms.internal.vision.zzhv
public final void zzc(List<Long> list) throws IOException {
int i;
int i2;
if (list instanceof zzgt) {
zzgt zzgtVar = (zzgt) list;
int i3 = this.tag & 7;
if (i3 != 0) {
if (i3 == 2) {
int zzdd = this.pos + zzdd();
while (this.pos < zzdd) {
zzgtVar.zzp(zzde());
}
zzae(zzdd);
return;
}
throw zzgf.zzfm();
}
do {
zzgtVar.zzp(zzcp());
if (zzcm()) {
return;
} else {
i2 = this.pos;
}
} while (zzdd() == this.tag);
this.pos = i2;
return;
}
int i4 = this.tag & 7;
if (i4 != 0) {
if (i4 == 2) {
int zzdd2 = this.pos + zzdd();
while (this.pos < zzdd2) {
list.add(Long.valueOf(zzde()));
}
zzae(zzdd2);
return;
}
throw zzgf.zzfm();
}
do {
list.add(Long.valueOf(zzcp()));
if (zzcm()) {
return;
} else {
i = this.pos;
}
} while (zzdd() == this.tag);
this.pos = i;
}
@Override // com.google.android.gms.internal.vision.zzhv
public final void zzd(List<Long> list) throws IOException {
int i;
int i2;
if (list instanceof zzgt) {
zzgt zzgtVar = (zzgt) list;
int i3 = this.tag & 7;
if (i3 != 0) {
if (i3 == 2) {
int zzdd = this.pos + zzdd();
while (this.pos < zzdd) {
zzgtVar.zzp(zzde());
}
zzae(zzdd);
return;
}
throw zzgf.zzfm();
}
do {
zzgtVar.zzp(zzcq());
if (zzcm()) {
return;
} else {
i2 = this.pos;
}
} while (zzdd() == this.tag);
this.pos = i2;
return;
}
int i4 = this.tag & 7;
if (i4 != 0) {
if (i4 == 2) {
int zzdd2 = this.pos + zzdd();
while (this.pos < zzdd2) {
list.add(Long.valueOf(zzde()));
}
zzae(zzdd2);
return;
}
throw zzgf.zzfm();
}
do {
list.add(Long.valueOf(zzcq()));
if (zzcm()) {
return;
} else {
i = this.pos;
}
} while (zzdd() == this.tag);
this.pos = i;
}
@Override // com.google.android.gms.internal.vision.zzhv
public final void zze(List<Integer> list) throws IOException {
int i;
int i2;
if (list instanceof zzfz) {
zzfz zzfzVar = (zzfz) list;
int i3 = this.tag & 7;
if (i3 != 0) {
if (i3 == 2) {
int zzdd = this.pos + zzdd();
while (this.pos < zzdd) {
zzfzVar.zzbg(zzdd());
}
zzae(zzdd);
return;
}
throw zzgf.zzfm();
}
do {
zzfzVar.zzbg(zzcr());
if (zzcm()) {
return;
} else {
i2 = this.pos;
}
} while (zzdd() == this.tag);
this.pos = i2;
return;
}
int i4 = this.tag & 7;
if (i4 != 0) {
if (i4 == 2) {
int zzdd2 = this.pos + zzdd();
while (this.pos < zzdd2) {
list.add(Integer.valueOf(zzdd()));
}
zzae(zzdd2);
return;
}
throw zzgf.zzfm();
}
do {
list.add(Integer.valueOf(zzcr()));
if (zzcm()) {
return;
} else {
i = this.pos;
}
} while (zzdd() == this.tag);
this.pos = i;
}
@Override // com.google.android.gms.internal.vision.zzhv
public final void zzf(List<Long> list) throws IOException {
int i;
int i2;
if (list instanceof zzgt) {
zzgt zzgtVar = (zzgt) list;
int i3 = this.tag & 7;
if (i3 != 1) {
if (i3 == 2) {
int zzdd = zzdd();
zzac(zzdd);
int i4 = this.pos;
while (this.pos < i4 + zzdd) {
zzgtVar.zzp(zzdj());
}
return;
}
throw zzgf.zzfm();
}
do {
zzgtVar.zzp(zzcs());
if (zzcm()) {
return;
} else {
i2 = this.pos;
}
} while (zzdd() == this.tag);
this.pos = i2;
return;
}
int i5 = this.tag & 7;
if (i5 != 1) {
if (i5 == 2) {
int zzdd2 = zzdd();
zzac(zzdd2);
int i6 = this.pos;
while (this.pos < i6 + zzdd2) {
list.add(Long.valueOf(zzdj()));
}
return;
}
throw zzgf.zzfm();
}
do {
list.add(Long.valueOf(zzcs()));
if (zzcm()) {
return;
} else {
i = this.pos;
}
} while (zzdd() == this.tag);
this.pos = i;
}
@Override // com.google.android.gms.internal.vision.zzhv
public final void zzg(List<Integer> list) throws IOException {
int i;
int i2;
if (!(list instanceof zzfz)) {
int i3 = this.tag & 7;
if (i3 == 2) {
int zzdd = zzdd();
zzad(zzdd);
int i4 = this.pos;
while (this.pos < i4 + zzdd) {
list.add(Integer.valueOf(zzdi()));
}
return;
}
if (i3 != 5) {
throw zzgf.zzfm();
}
do {
list.add(Integer.valueOf(zzct()));
if (zzcm()) {
return;
} else {
i = this.pos;
}
} while (zzdd() == this.tag);
this.pos = i;
return;
}
zzfz zzfzVar = (zzfz) list;
int i5 = this.tag & 7;
if (i5 == 2) {
int zzdd2 = zzdd();
zzad(zzdd2);
int i6 = this.pos;
while (this.pos < i6 + zzdd2) {
zzfzVar.zzbg(zzdi());
}
return;
}
if (i5 != 5) {
throw zzgf.zzfm();
}
do {
zzfzVar.zzbg(zzct());
if (zzcm()) {
return;
} else {
i2 = this.pos;
}
} while (zzdd() == this.tag);
this.pos = i2;
}
@Override // com.google.android.gms.internal.vision.zzhv
public final void zzh(List<Boolean> list) throws IOException {
int i;
int i2;
if (list instanceof zzem) {
zzem zzemVar = (zzem) list;
int i3 = this.tag & 7;
if (i3 != 0) {
if (i3 == 2) {
int zzdd = this.pos + zzdd();
while (this.pos < zzdd) {
zzemVar.addBoolean(zzdd() != 0);
}
zzae(zzdd);
return;
}
throw zzgf.zzfm();
}
do {
zzemVar.addBoolean(zzcu());
if (zzcm()) {
return;
} else {
i2 = this.pos;
}
} while (zzdd() == this.tag);
this.pos = i2;
return;
}
int i4 = this.tag & 7;
if (i4 != 0) {
if (i4 == 2) {
int zzdd2 = this.pos + zzdd();
while (this.pos < zzdd2) {
list.add(Boolean.valueOf(zzdd() != 0));
}
zzae(zzdd2);
return;
}
throw zzgf.zzfm();
}
do {
list.add(Boolean.valueOf(zzcu()));
if (zzcm()) {
return;
} else {
i = this.pos;
}
} while (zzdd() == this.tag);
this.pos = i;
}
@Override // com.google.android.gms.internal.vision.zzhv
public final void readStringList(List<String> list) throws IOException {
zza(list, false);
}
@Override // com.google.android.gms.internal.vision.zzhv
public final void zzi(List<String> list) throws IOException {
zza(list, true);
}
private final void zza(List<String> list, boolean z) throws IOException {
int i;
int i2;
if ((this.tag & 7) != 2) {
throw zzgf.zzfm();
}
if ((list instanceof zzgo) && !z) {
zzgo zzgoVar = (zzgo) list;
do {
zzgoVar.zzc(zzcw());
if (zzcm()) {
return;
} else {
i2 = this.pos;
}
} while (zzdd() == this.tag);
this.pos = i2;
return;
}
do {
list.add(zzg(z));
if (zzcm()) {
return;
} else {
i = this.pos;
}
} while (zzdd() == this.tag);
this.pos = i;
}
/* JADX WARN: Multi-variable type inference failed */
@Override // com.google.android.gms.internal.vision.zzhv
public final <T> void zza(List<T> list, zzhw<T> zzhwVar, zzfk zzfkVar) throws IOException {
int i;
int i2 = this.tag;
if ((i2 & 7) != 2) {
throw zzgf.zzfm();
}
do {
list.add(zzb(zzhwVar, zzfkVar));
if (zzcm()) {
return;
} else {
i = this.pos;
}
} while (zzdd() == i2);
this.pos = i;
}
/* JADX WARN: Multi-variable type inference failed */
@Override // com.google.android.gms.internal.vision.zzhv
public final <T> void zzb(List<T> list, zzhw<T> zzhwVar, zzfk zzfkVar) throws IOException {
int i;
int i2 = this.tag;
if ((i2 & 7) != 3) {
throw zzgf.zzfm();
}
do {
list.add(zzd(zzhwVar, zzfkVar));
if (zzcm()) {
return;
} else {
i = this.pos;
}
} while (zzdd() == i2);
this.pos = i;
}
@Override // com.google.android.gms.internal.vision.zzhv
public final void zzj(List<zzeo> list) throws IOException {
int i;
if ((this.tag & 7) != 2) {
throw zzgf.zzfm();
}
do {
list.add(zzcw());
if (zzcm()) {
return;
} else {
i = this.pos;
}
} while (zzdd() == this.tag);
this.pos = i;
}
@Override // com.google.android.gms.internal.vision.zzhv
public final void zzk(List<Integer> list) throws IOException {
int i;
int i2;
if (list instanceof zzfz) {
zzfz zzfzVar = (zzfz) list;
int i3 = this.tag & 7;
if (i3 != 0) {
if (i3 == 2) {
int zzdd = zzdd();
int i4 = this.pos;
while (this.pos < i4 + zzdd) {
zzfzVar.zzbg(zzdd());
}
return;
}
throw zzgf.zzfm();
}
do {
zzfzVar.zzbg(zzcx());
if (zzcm()) {
return;
} else {
i2 = this.pos;
}
} while (zzdd() == this.tag);
this.pos = i2;
return;
}
int i5 = this.tag & 7;
if (i5 != 0) {
if (i5 == 2) {
int zzdd2 = zzdd();
int i6 = this.pos;
while (this.pos < i6 + zzdd2) {
list.add(Integer.valueOf(zzdd()));
}
return;
}
throw zzgf.zzfm();
}
do {
list.add(Integer.valueOf(zzcx()));
if (zzcm()) {
return;
} else {
i = this.pos;
}
} while (zzdd() == this.tag);
this.pos = i;
}
@Override // com.google.android.gms.internal.vision.zzhv
public final void zzl(List<Integer> list) throws IOException {
int i;
int i2;
if (list instanceof zzfz) {
zzfz zzfzVar = (zzfz) list;
int i3 = this.tag & 7;
if (i3 != 0) {
if (i3 == 2) {
int zzdd = zzdd();
int i4 = this.pos;
while (this.pos < i4 + zzdd) {
zzfzVar.zzbg(zzdd());
}
return;
}
throw zzgf.zzfm();
}
do {
zzfzVar.zzbg(zzcy());
if (zzcm()) {
return;
} else {
i2 = this.pos;
}
} while (zzdd() == this.tag);
this.pos = i2;
return;
}
int i5 = this.tag & 7;
if (i5 != 0) {
if (i5 == 2) {
int zzdd2 = zzdd();
int i6 = this.pos;
while (this.pos < i6 + zzdd2) {
list.add(Integer.valueOf(zzdd()));
}
return;
}
throw zzgf.zzfm();
}
do {
list.add(Integer.valueOf(zzcy()));
if (zzcm()) {
return;
} else {
i = this.pos;
}
} while (zzdd() == this.tag);
this.pos = i;
}
@Override // com.google.android.gms.internal.vision.zzhv
public final void zzm(List<Integer> list) throws IOException {
int i;
int i2;
if (!(list instanceof zzfz)) {
int i3 = this.tag & 7;
if (i3 == 2) {
int zzdd = zzdd();
zzad(zzdd);
int i4 = this.pos;
while (this.pos < i4 + zzdd) {
list.add(Integer.valueOf(zzdi()));
}
return;
}
if (i3 != 5) {
throw zzgf.zzfm();
}
do {
list.add(Integer.valueOf(zzcz()));
if (zzcm()) {
return;
} else {
i = this.pos;
}
} while (zzdd() == this.tag);
this.pos = i;
return;
}
zzfz zzfzVar = (zzfz) list;
int i5 = this.tag & 7;
if (i5 == 2) {
int zzdd2 = zzdd();
zzad(zzdd2);
int i6 = this.pos;
while (this.pos < i6 + zzdd2) {
zzfzVar.zzbg(zzdi());
}
return;
}
if (i5 != 5) {
throw zzgf.zzfm();
}
do {
zzfzVar.zzbg(zzcz());
if (zzcm()) {
return;
} else {
i2 = this.pos;
}
} while (zzdd() == this.tag);
this.pos = i2;
}
@Override // com.google.android.gms.internal.vision.zzhv
public final void zzn(List<Long> list) throws IOException {
int i;
int i2;
if (list instanceof zzgt) {
zzgt zzgtVar = (zzgt) list;
int i3 = this.tag & 7;
if (i3 != 1) {
if (i3 == 2) {
int zzdd = zzdd();
zzac(zzdd);
int i4 = this.pos;
while (this.pos < i4 + zzdd) {
zzgtVar.zzp(zzdj());
}
return;
}
throw zzgf.zzfm();
}
do {
zzgtVar.zzp(zzda());
if (zzcm()) {
return;
} else {
i2 = this.pos;
}
} while (zzdd() == this.tag);
this.pos = i2;
return;
}
int i5 = this.tag & 7;
if (i5 != 1) {
if (i5 == 2) {
int zzdd2 = zzdd();
zzac(zzdd2);
int i6 = this.pos;
while (this.pos < i6 + zzdd2) {
list.add(Long.valueOf(zzdj()));
}
return;
}
throw zzgf.zzfm();
}
do {
list.add(Long.valueOf(zzda()));
if (zzcm()) {
return;
} else {
i = this.pos;
}
} while (zzdd() == this.tag);
this.pos = i;
}
@Override // com.google.android.gms.internal.vision.zzhv
public final void zzo(List<Integer> list) throws IOException {
int i;
int i2;
if (list instanceof zzfz) {
zzfz zzfzVar = (zzfz) list;
int i3 = this.tag & 7;
if (i3 != 0) {
if (i3 == 2) {
int zzdd = zzdd();
int i4 = this.pos;
while (this.pos < i4 + zzdd) {
zzfzVar.zzbg(zzez.zzaq(zzdd()));
}
return;
}
throw zzgf.zzfm();
}
do {
zzfzVar.zzbg(zzdb());
if (zzcm()) {
return;
} else {
i2 = this.pos;
}
} while (zzdd() == this.tag);
this.pos = i2;
return;
}
int i5 = this.tag & 7;
if (i5 != 0) {
if (i5 == 2) {
int zzdd2 = zzdd();
int i6 = this.pos;
while (this.pos < i6 + zzdd2) {
list.add(Integer.valueOf(zzez.zzaq(zzdd())));
}
return;
}
throw zzgf.zzfm();
}
do {
list.add(Integer.valueOf(zzdb()));
if (zzcm()) {
return;
} else {
i = this.pos;
}
} while (zzdd() == this.tag);
this.pos = i;
}
@Override // com.google.android.gms.internal.vision.zzhv
public final void zzp(List<Long> list) throws IOException {
int i;
int i2;
if (list instanceof zzgt) {
zzgt zzgtVar = (zzgt) list;
int i3 = this.tag & 7;
if (i3 != 0) {
if (i3 == 2) {
int zzdd = zzdd();
int i4 = this.pos;
while (this.pos < i4 + zzdd) {
zzgtVar.zzp(zzez.zzd(zzde()));
}
return;
}
throw zzgf.zzfm();
}
do {
zzgtVar.zzp(zzdc());
if (zzcm()) {
return;
} else {
i2 = this.pos;
}
} while (zzdd() == this.tag);
this.pos = i2;
return;
}
int i5 = this.tag & 7;
if (i5 != 0) {
if (i5 == 2) {
int zzdd2 = zzdd();
int i6 = this.pos;
while (this.pos < i6 + zzdd2) {
list.add(Long.valueOf(zzez.zzd(zzde())));
}
return;
}
throw zzgf.zzfm();
}
do {
list.add(Long.valueOf(zzdc()));
if (zzcm()) {
return;
} else {
i = this.pos;
}
} while (zzdd() == this.tag);
this.pos = i;
}
/* JADX WARN: Multi-variable type inference failed */
@Override // com.google.android.gms.internal.vision.zzhv
public final <K, V> void zza(Map<K, V> map, zzgy<K, V> zzgyVar, zzfk zzfkVar) throws IOException {
zzab(2);
int zzdd = zzdd();
zzaa(zzdd);
int i = this.limit;
this.limit = this.pos + zzdd;
try {
Object obj = zzgyVar.zzyw;
Object obj2 = zzgyVar.zzgq;
while (true) {
int zzcn = zzcn();
if (zzcn == Integer.MAX_VALUE) {
map.put(obj, obj2);
return;
}
if (zzcn == 1) {
obj = zza(zzgyVar.zzyv, (Class<?>) null, (zzfk) null);
} else if (zzcn == 2) {
obj2 = zza(zzgyVar.zzyx, zzgyVar.zzgq.getClass(), zzfkVar);
} else {
try {
if (!zzco()) {
throw new zzgf("Unable to parse map entry.");
break;
}
} catch (zzgg unused) {
if (!zzco()) {
throw new zzgf("Unable to parse map entry.");
}
}
}
}
} finally {
this.limit = i;
}
}
private final Object zza(zzjd zzjdVar, Class<?> cls, zzfk zzfkVar) throws IOException {
switch (zzek.zzrr[zzjdVar.ordinal()]) {
case 1:
return Boolean.valueOf(zzcu());
case 2:
return zzcw();
case 3:
return Double.valueOf(readDouble());
case 4:
return Integer.valueOf(zzcy());
case 5:
return Integer.valueOf(zzct());
case 6:
return Long.valueOf(zzcs());
case 7:
return Float.valueOf(readFloat());
case 8:
return Integer.valueOf(zzcr());
case 9:
return Long.valueOf(zzcq());
case 10:
return zza(cls, zzfkVar);
case 11:
return Integer.valueOf(zzcz());
case 12:
return Long.valueOf(zzda());
case 13:
return Integer.valueOf(zzdb());
case 14:
return Long.valueOf(zzdc());
case 15:
return zzg(true);
case 16:
return Integer.valueOf(zzcx());
case 17:
return Long.valueOf(zzcp());
default:
throw new RuntimeException("unsupported field type.");
}
}
private final int zzdd() throws IOException {
int i;
int i2 = this.pos;
int i3 = this.limit;
if (i3 == i2) {
throw zzgf.zzfh();
}
byte[] bArr = this.buffer;
int i4 = i2 + 1;
byte b = bArr[i2];
if (b >= 0) {
this.pos = i4;
return b;
}
if (i3 - i4 < 9) {
return (int) zzdf();
}
int i5 = i2 + 2;
int i6 = (bArr[i4] << 7) ^ b;
if (i6 < 0) {
i = i6 ^ (-128);
} else {
int i7 = i2 + 3;
int i8 = (bArr[i5] << 14) ^ i6;
if (i8 >= 0) {
i = i8 ^ 16256;
} else {
int i9 = i2 + 4;
int i10 = i8 ^ (bArr[i7] << Ascii.NAK);
if (i10 < 0) {
i = (-2080896) ^ i10;
} else {
i7 = i2 + 5;
byte b2 = bArr[i9];
int i11 = (i10 ^ (b2 << 28)) ^ 266354560;
if (b2 < 0) {
i9 = i2 + 6;
if (bArr[i7] < 0) {
i7 = i2 + 7;
if (bArr[i9] < 0) {
i9 = i2 + 8;
if (bArr[i7] < 0) {
i7 = i2 + 9;
if (bArr[i9] < 0) {
if (bArr[i7] < 0) {
throw zzgf.zzfj();
}
i5 = i2 + 10;
i = i11;
}
}
}
}
i = i11;
}
i = i11;
}
i5 = i9;
}
i5 = i7;
}
this.pos = i5;
return i;
}
private final long zzde() throws IOException {
long j;
long j2;
long j3;
int i = this.pos;
int i2 = this.limit;
if (i2 == i) {
throw zzgf.zzfh();
}
byte[] bArr = this.buffer;
int i3 = i + 1;
byte b = bArr[i];
if (b >= 0) {
this.pos = i3;
return b;
}
if (i2 - i3 < 9) {
return zzdf();
}
int i4 = i + 2;
int i5 = (bArr[i3] << 7) ^ b;
if (i5 < 0) {
j = i5 ^ (-128);
} else {
int i6 = i + 3;
int i7 = (bArr[i4] << 14) ^ i5;
if (i7 >= 0) {
j = i7 ^ 16256;
i4 = i6;
} else {
int i8 = i + 4;
int i9 = i7 ^ (bArr[i6] << Ascii.NAK);
if (i9 < 0) {
long j4 = (-2080896) ^ i9;
i4 = i8;
j = j4;
} else {
long j5 = i9;
i4 = i + 5;
long j6 = j5 ^ (bArr[i8] << 28);
if (j6 >= 0) {
j3 = 266354560;
} else {
int i10 = i + 6;
long j7 = j6 ^ (bArr[i4] << 35);
if (j7 < 0) {
j2 = -34093383808L;
} else {
i4 = i + 7;
j6 = j7 ^ (bArr[i10] << 42);
if (j6 >= 0) {
j3 = 4363953127296L;
} else {
i10 = i + 8;
j7 = j6 ^ (bArr[i4] << 49);
if (j7 < 0) {
j2 = -558586000294016L;
} else {
i4 = i + 9;
long j8 = (j7 ^ (bArr[i10] << 56)) ^ 71499008037633920L;
if (j8 < 0) {
if (bArr[i4] < 0) {
throw zzgf.zzfj();
}
i4 = i + 10;
}
j = j8;
}
}
}
j = j7 ^ j2;
i4 = i10;
}
j = j6 ^ j3;
}
}
}
this.pos = i4;
return j;
}
private final long zzdf() throws IOException {
long j = 0;
for (int i = 0; i < 64; i += 7) {
j |= (r3 & Ascii.DEL) << i;
if ((readByte() & 128) == 0) {
return j;
}
}
throw zzgf.zzfj();
}
private final byte readByte() throws IOException {
int i = this.pos;
if (i == this.limit) {
throw zzgf.zzfh();
}
byte[] bArr = this.buffer;
this.pos = i + 1;
return bArr[i];
}
private final int zzdg() throws IOException {
zzaa(4);
return zzdi();
}
private final long zzdh() throws IOException {
zzaa(8);
return zzdj();
}
private final int zzdi() {
int i = this.pos;
byte[] bArr = this.buffer;
this.pos = i + 4;
return ((bArr[i + 3] & UnsignedBytes.MAX_VALUE) << 24) | (bArr[i] & UnsignedBytes.MAX_VALUE) | ((bArr[i + 1] & UnsignedBytes.MAX_VALUE) << 8) | ((bArr[i + 2] & UnsignedBytes.MAX_VALUE) << 16);
}
private final long zzdj() {
int i = this.pos;
byte[] bArr = this.buffer;
this.pos = i + 8;
return ((bArr[i + 7] & 255) << 56) | (bArr[i] & 255) | ((bArr[i + 1] & 255) << 8) | ((bArr[i + 2] & 255) << 16) | ((bArr[i + 3] & 255) << 24) | ((bArr[i + 4] & 255) << 32) | ((bArr[i + 5] & 255) << 40) | ((bArr[i + 6] & 255) << 48);
}
private final void zzz(int i) throws IOException {
zzaa(i);
this.pos += i;
}
private final void zzaa(int i) throws IOException {
if (i < 0 || i > this.limit - this.pos) {
throw zzgf.zzfh();
}
}
private final void zzab(int i) throws IOException {
if ((this.tag & 7) != i) {
throw zzgf.zzfm();
}
}
private final void zzac(int i) throws IOException {
zzaa(i);
if ((i & 7) != 0) {
throw zzgf.zzfo();
}
}
private final void zzad(int i) throws IOException {
zzaa(i);
if ((i & 3) != 0) {
throw zzgf.zzfo();
}
}
private final void zzae(int i) throws IOException {
if (this.pos != i) {
throw zzgf.zzfh();
}
}
@Override // com.google.android.gms.internal.vision.zzhv
public final int getTag() {
return this.tag;
}
private final boolean zzcm() {
return this.pos == this.limit;
}
}