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

627 lines
23 KiB
Java

package com.google.android.gms.internal.vision;
import com.google.android.gms.internal.vision.zzfy;
import com.google.android.gms.internal.vision.zzfy.zza;
import java.io.IOException;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
import java.util.ArrayList;
import java.util.Collections;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;
/* loaded from: classes2.dex */
public abstract class zzfy<MessageType extends zzfy<MessageType, BuilderType>, BuilderType extends zza<MessageType, BuilderType>> extends zzec<MessageType, BuilderType> {
private static Map<Object, zzfy<?, ?>> zzwl = new ConcurrentHashMap();
protected zzip zzwj = zzip.zzhe();
private int zzwk = -1;
/* loaded from: classes2.dex */
public enum zzg {
public static final int zzwx = 1;
public static final int zzwy = 2;
public static final int zzwz = 3;
public static final int zzxa = 4;
public static final int zzxb = 5;
public static final int zzxc = 6;
public static final int zzxd = 7;
public static final int zzxf = 1;
public static final int zzxg = 2;
private static final int[] zzxe = {1, 2, 3, 4, 5, 6, 7};
private static final int[] zzxh = {1, 2};
public static final int zzxi = 1;
public static final int zzxj = 2;
private static final int[] zzxk = {1, 2};
public static int[] values$50KLMJ33DTMIUPRFDTJMOP9FE1P6UT3FC9QMCBQ7CLN6ASJ1EHIM8JB5EDPM2PR59HKN8P949LIN8Q3FCHA6UIBEEPNMMP9R0() {
return (int[]) zzxe.clone();
}
}
/* JADX INFO: Access modifiers changed from: protected */
public abstract Object zza(int i, Object obj, Object obj2);
/* loaded from: classes2.dex */
public static class zzc<MessageType extends zzd<MessageType, BuilderType>, BuilderType extends zzc<MessageType, BuilderType>> extends zza<MessageType, BuilderType> implements zzhh {
/* JADX INFO: Access modifiers changed from: protected */
public zzc(MessageType messagetype) {
super(messagetype);
}
/* JADX INFO: Access modifiers changed from: protected */
@Override // com.google.android.gms.internal.vision.zzfy.zza
public final void zzfc() {
if (this.zzwo) {
super.zzfc();
((zzd) this.zzwn).zzwp = (zzfp) ((zzd) this.zzwn).zzwp.clone();
}
}
@Override // com.google.android.gms.internal.vision.zzfy.zza
/* renamed from: zzfd */
public /* synthetic */ zzfy zzff() {
return (zzd) zzff();
}
@Override // com.google.android.gms.internal.vision.zzfy.zza, com.google.android.gms.internal.vision.zzhg
public /* synthetic */ zzhf zzff() {
if (this.zzwo) {
return (zzd) this.zzwn;
}
((zzd) this.zzwn).zzwp.zzci();
return (zzd) super.zzff();
}
}
/* loaded from: classes2.dex */
public static abstract class zzd<MessageType extends zzd<MessageType, BuilderType>, BuilderType extends zzc<MessageType, BuilderType>> extends zzfy<MessageType, BuilderType> implements zzhh {
protected zzfp<zze> zzwp = zzfp.zzep();
/* JADX WARN: Type inference failed for: r1v8, types: [Type, java.util.List, java.util.ArrayList] */
public final <Type> Type zzc(zzfi<MessageType, Type> zzfiVar) {
zzf zza = zzfy.zza(zzfiVar);
if (zza.zzwu != ((zzfy) zzfb())) {
throw new IllegalArgumentException("This extension is for a different message type. Please make sure that you are not suppressing any generics type warnings.");
}
Type type = (Type) this.zzwp.zza((zzfp<zze>) zza.zzww);
if (type == null) {
return zza.zzgq;
}
if (zza.zzww.zzws) {
if (zza.zzww.zzwr.zzho() != zzji.ENUM) {
return type;
}
?? r1 = (Type) new ArrayList();
Iterator it = ((List) type).iterator();
while (it.hasNext()) {
r1.add(zza.zzg(it.next()));
}
return r1;
}
return (Type) zza.zzg(type);
}
}
/* loaded from: classes2.dex */
public static final class zzb<T extends zzfy<T, ?>> extends zzee<T> {
private final T zzwm;
public zzb(T t) {
this.zzwm = t;
}
@Override // com.google.android.gms.internal.vision.zzhq
public final /* synthetic */ Object zza(zzez zzezVar, zzfk zzfkVar) throws zzgf {
return zzfy.zza(this.zzwm, zzezVar, zzfkVar);
}
}
public String toString() {
return zzhi.zza(this, super.toString());
}
public int hashCode() {
if (this.zzri != 0) {
return this.zzri;
}
this.zzri = zzhs.zzgl().zzs(this).hashCode(this);
return this.zzri;
}
/* loaded from: classes2.dex */
public static class zza<MessageType extends zzfy<MessageType, BuilderType>, BuilderType extends zza<MessageType, BuilderType>> extends zzed<MessageType, BuilderType> {
private final MessageType zzwm;
protected MessageType zzwn;
protected boolean zzwo = false;
/* JADX INFO: Access modifiers changed from: protected */
public zza(MessageType messagetype) {
this.zzwm = messagetype;
this.zzwn = (MessageType) messagetype.zza(zzg.zzxa, null, null);
}
/* JADX INFO: Access modifiers changed from: protected */
public void zzfc() {
if (this.zzwo) {
MessageType messagetype = (MessageType) this.zzwn.zza(zzg.zzxa, null, null);
zza(messagetype, this.zzwn);
this.zzwn = messagetype;
this.zzwo = false;
}
}
@Override // com.google.android.gms.internal.vision.zzhh
public final boolean isInitialized() {
return zzfy.zza(this.zzwn, false);
}
@Override // com.google.android.gms.internal.vision.zzhg
/* renamed from: zzfd, reason: merged with bridge method [inline-methods] */
public MessageType zzff() {
if (this.zzwo) {
return this.zzwn;
}
MessageType messagetype = this.zzwn;
zzhs.zzgl().zzs(messagetype).zze(messagetype);
this.zzwo = true;
return this.zzwn;
}
/* JADX WARN: Code restructure failed: missing block: B:11:0x0037, code lost:
if (r2 != false) goto L14;
*/
@Override // com.google.android.gms.internal.vision.zzhg
/* renamed from: zzfe, reason: merged with bridge method [inline-methods] */
/*
Code decompiled incorrectly, please refer to instructions dump.
To view partially-correct add '--show-bad-code' argument
*/
public final MessageType zzfg() {
/*
r5 = this;
com.google.android.gms.internal.vision.zzhf r0 = r5.zzff()
com.google.android.gms.internal.vision.zzfy r0 = (com.google.android.gms.internal.vision.zzfy) r0
java.lang.Boolean r1 = java.lang.Boolean.TRUE
boolean r1 = r1.booleanValue()
int r2 = com.google.android.gms.internal.vision.zzfy.zzg.zzwx
r3 = 0
java.lang.Object r2 = r0.zza(r2, r3, r3)
java.lang.Byte r2 = (java.lang.Byte) r2
byte r2 = r2.byteValue()
r4 = 1
if (r2 != r4) goto L1d
goto L39
L1d:
if (r2 == 0) goto L3a
com.google.android.gms.internal.vision.zzhs r2 = com.google.android.gms.internal.vision.zzhs.zzgl()
com.google.android.gms.internal.vision.zzhw r2 = r2.zzs(r0)
boolean r2 = r2.zzr(r0)
if (r1 == 0) goto L37
int r1 = com.google.android.gms.internal.vision.zzfy.zzg.zzwy
if (r2 == 0) goto L33
r4 = r0
goto L34
L33:
r4 = r3
L34:
r0.zza(r1, r4, r3)
L37:
if (r2 == 0) goto L3a
L39:
return r0
L3a:
com.google.android.gms.internal.vision.zzin r1 = new com.google.android.gms.internal.vision.zzin
r1.<init>(r0)
throw r1
*/
throw new UnsupportedOperationException("Method not decompiled: com.google.android.gms.internal.vision.zzfy.zza.zzfg():com.google.android.gms.internal.vision.zzfy");
}
@Override // com.google.android.gms.internal.vision.zzed
public final BuilderType zza(MessageType messagetype) {
zzfc();
zza(this.zzwn, messagetype);
return this;
}
private static void zza(MessageType messagetype, MessageType messagetype2) {
zzhs.zzgl().zzs(messagetype).zzc(messagetype, messagetype2);
}
@Override // com.google.android.gms.internal.vision.zzed
/* renamed from: zzcg */
public final /* synthetic */ zzed clone() {
return (zza) clone();
}
/* JADX WARN: Multi-variable type inference failed */
@Override // com.google.android.gms.internal.vision.zzed
public /* synthetic */ Object clone() throws CloneNotSupportedException {
zza zzaVar = (zza) this.zzwm.zza(zzg.zzxb, null, null);
zzaVar.zza((zza) zzff());
return zzaVar;
}
@Override // com.google.android.gms.internal.vision.zzhh
public final /* synthetic */ zzhf zzfb() {
return this.zzwm;
}
}
/* JADX INFO: Access modifiers changed from: package-private */
/* loaded from: classes2.dex */
public static final class zze implements zzfr<zze> {
final zzjd zzwr;
final zzgc<?> zzwq = null;
final int number = 202056002;
final boolean zzws = true;
final boolean zzwt = false;
zze(zzgc<?> zzgcVar, int i, zzjd zzjdVar, boolean z, boolean z2) {
this.zzwr = zzjdVar;
}
@Override // com.google.android.gms.internal.vision.zzfr
public final zzji zzet() {
return this.zzwr.zzho();
}
/* JADX WARN: Multi-variable type inference failed */
@Override // com.google.android.gms.internal.vision.zzfr
public final zzhg zza(zzhg zzhgVar, zzhf zzhfVar) {
return ((zza) zzhgVar).zza((zza) zzhfVar);
}
@Override // com.google.android.gms.internal.vision.zzfr
public final zzhm zza(zzhm zzhmVar, zzhm zzhmVar2) {
throw new UnsupportedOperationException();
}
@Override // java.lang.Comparable
public final /* synthetic */ int compareTo(Object obj) {
return this.number - ((zze) obj).number;
}
@Override // com.google.android.gms.internal.vision.zzfr
public final int zzr() {
return this.number;
}
@Override // com.google.android.gms.internal.vision.zzfr
public final boolean zzev() {
return this.zzwt;
}
@Override // com.google.android.gms.internal.vision.zzfr
public final boolean zzeu() {
return this.zzws;
}
@Override // com.google.android.gms.internal.vision.zzfr
public final zzjd zzes() {
return this.zzwr;
}
}
public boolean equals(Object obj) {
if (this == obj) {
return true;
}
if (((zzfy) zza(zzg.zzxc, (Object) null, (Object) null)).getClass().isInstance(obj)) {
return zzhs.zzgl().zzs(this).equals(this, (zzfy) obj);
}
return false;
}
/* loaded from: classes2.dex */
public static final class zzf<ContainingType extends zzhf, Type> extends zzfi<ContainingType, Type> {
final Type zzgq;
final ContainingType zzwu;
final zzhf zzwv;
final zze zzww;
zzf(ContainingType containingtype, Type type, zzhf zzhfVar, zze zzeVar, Class cls) {
if (containingtype == null) {
throw new IllegalArgumentException("Null containingTypeDefaultInstance");
}
if (zzeVar.zzwr == zzjd.zzace && zzhfVar == null) {
throw new IllegalArgumentException("Null messageDefaultInstance");
}
this.zzwu = containingtype;
this.zzgq = type;
this.zzwv = zzhfVar;
this.zzww = zzeVar;
}
final Object zzg(Object obj) {
return this.zzww.zzwr.zzho() == zzji.ENUM ? this.zzww.zzwq.zzf(((Integer) obj).intValue()) : obj;
}
}
@Override // com.google.android.gms.internal.vision.zzhh
public final boolean isInitialized() {
boolean booleanValue = Boolean.TRUE.booleanValue();
byte byteValue = ((Byte) zza(zzg.zzwx, (Object) null, (Object) null)).byteValue();
if (byteValue == 1) {
return true;
}
if (byteValue == 0) {
return false;
}
boolean zzr = zzhs.zzgl().zzs(this).zzr(this);
if (booleanValue) {
zza(zzg.zzwy, zzr ? this : null, (Object) null);
}
return zzr;
}
@Override // com.google.android.gms.internal.vision.zzhf
public final void zzb(zzfe zzfeVar) throws IOException {
zzhs.zzgl().zzf(getClass()).zza(this, zzfg.zza(zzfeVar));
}
@Override // com.google.android.gms.internal.vision.zzhf
public final int zzeq() {
if (this.zzwk == -1) {
this.zzwk = zzhs.zzgl().zzs(this).zzp(this);
}
return this.zzwk;
}
/* JADX INFO: Access modifiers changed from: package-private */
public static <T extends zzfy<?, ?>> T zzd(Class<T> cls) {
zzfy<?, ?> zzfyVar = zzwl.get(cls);
if (zzfyVar == null) {
try {
Class.forName(cls.getName(), true, cls.getClassLoader());
zzfyVar = zzwl.get(cls);
} catch (ClassNotFoundException e) {
throw new IllegalStateException("Class initialization cannot fail.", e);
}
}
if (zzfyVar == null) {
zzfyVar = (T) ((zzfy) zziu.zzh(cls)).zza(zzg.zzxc, (Object) null, (Object) null);
if (zzfyVar == null) {
throw new IllegalStateException();
}
zzwl.put(cls, zzfyVar);
}
return (T) zzfyVar;
}
/* JADX INFO: Access modifiers changed from: protected */
public static <T extends zzfy<?, ?>> void zza(Class<T> cls, T t) {
zzwl.put(cls, t);
}
/* JADX INFO: Access modifiers changed from: protected */
public static Object zza(zzhf zzhfVar, String str, Object[] objArr) {
return new zzhu(zzhfVar, str, objArr);
}
public static <ContainingType extends zzhf, Type> zzf<ContainingType, Type> zza(ContainingType containingtype, zzhf zzhfVar, zzgc<?> zzgcVar, int i, zzjd zzjdVar, boolean z, Class cls) {
return new zzf<>(containingtype, Collections.emptyList(), zzhfVar, new zze(null, 202056002, zzjdVar, true, false), cls);
}
/* JADX INFO: Access modifiers changed from: package-private */
public static Object zza(Method method, Object obj, Object... objArr) {
try {
return method.invoke(obj, objArr);
} catch (IllegalAccessException e) {
throw new RuntimeException("Couldn't use Java reflection to implement protocol message reflection.", e);
} catch (InvocationTargetException e2) {
Throwable cause = e2.getCause();
if (cause instanceof RuntimeException) {
throw ((RuntimeException) cause);
}
if (cause instanceof Error) {
throw ((Error) cause);
}
throw new RuntimeException("Unexpected exception thrown by generated accessor method.", cause);
}
}
/* JADX INFO: Access modifiers changed from: private */
public static <MessageType extends zzd<MessageType, BuilderType>, BuilderType extends zzc<MessageType, BuilderType>, T> zzf<MessageType, T> zza(zzfi<MessageType, T> zzfiVar) {
return (zzf) zzfiVar;
}
protected static final <T extends zzfy<T, ?>> boolean zza(T t, boolean z) {
byte byteValue = ((Byte) t.zza(zzg.zzwx, null, null)).byteValue();
if (byteValue == 1) {
return true;
}
if (byteValue == 0) {
return false;
}
return zzhs.zzgl().zzs(t).zzr(t);
}
/* JADX INFO: Access modifiers changed from: protected */
public static <E> zzge<E> zzey() {
return zzht.zzgm();
}
static <T extends zzfy<T, ?>> T zza(T t, zzez zzezVar, zzfk zzfkVar) throws zzgf {
T t2 = (T) t.zza(zzg.zzxa, null, null);
try {
zzhs.zzgl().zzs(t2).zza(t2, zzfc.zza(zzezVar), zzfkVar);
zzhs.zzgl().zzs(t2).zze(t2);
return t2;
} catch (IOException e) {
if (e.getCause() instanceof zzgf) {
throw ((zzgf) e.getCause());
}
throw new zzgf(e.getMessage()).zzg(t2);
} catch (RuntimeException e2) {
if (e2.getCause() instanceof zzgf) {
throw ((zzgf) e2.getCause());
}
throw e2;
}
}
private static <T extends zzfy<T, ?>> T zza(T t, byte[] bArr) throws zzgf {
T t2 = (T) t.zza(zzg.zzxa, null, null);
try {
zzhs.zzgl().zzs(t2).zza(t2, bArr, 0, bArr.length, new zzei());
zzhs.zzgl().zzs(t2).zze(t2);
if (t2.zzri == 0) {
return t2;
}
throw new RuntimeException();
} catch (IOException e) {
if (e.getCause() instanceof zzgf) {
throw ((zzgf) e.getCause());
}
throw new zzgf(e.getMessage()).zzg(t2);
} catch (IndexOutOfBoundsException unused) {
throw zzgf.zzfh().zzg(t2);
}
}
private static <T extends zzfy<T, ?>> T zza(T t, byte[] bArr, zzfk zzfkVar) throws zzgf {
zzez zzf2 = zzez.zzf(bArr);
T t2 = (T) zza(t, zzf2, zzfkVar);
try {
zzf2.zzak(0);
return t2;
} catch (zzgf e) {
throw e.zzg(t2);
}
}
/* JADX WARN: Code restructure failed: missing block: B:13:0x0037, code lost:
if (r0 != false) goto L19;
*/
/*
Code decompiled incorrectly, please refer to instructions dump.
To view partially-correct add '--show-bad-code' argument
*/
protected static <T extends com.google.android.gms.internal.vision.zzfy<T, ?>> T zzb(T r3, byte[] r4) throws com.google.android.gms.internal.vision.zzgf {
/*
com.google.android.gms.internal.vision.zzfy r3 = zza(r3, r4)
if (r3 == 0) goto L48
java.lang.Boolean r4 = java.lang.Boolean.TRUE
boolean r4 = r4.booleanValue()
int r0 = com.google.android.gms.internal.vision.zzfy.zzg.zzwx
r1 = 0
java.lang.Object r0 = r3.zza(r0, r1, r1)
java.lang.Byte r0 = (java.lang.Byte) r0
byte r0 = r0.byteValue()
r2 = 1
if (r0 != r2) goto L1d
goto L48
L1d:
if (r0 == 0) goto L3a
com.google.android.gms.internal.vision.zzhs r0 = com.google.android.gms.internal.vision.zzhs.zzgl()
com.google.android.gms.internal.vision.zzhw r0 = r0.zzs(r3)
boolean r0 = r0.zzr(r3)
if (r4 == 0) goto L37
int r4 = com.google.android.gms.internal.vision.zzfy.zzg.zzwy
if (r0 == 0) goto L33
r2 = r3
goto L34
L33:
r2 = r1
L34:
r3.zza(r4, r2, r1)
L37:
if (r0 == 0) goto L3a
goto L48
L3a:
com.google.android.gms.internal.vision.zzin r4 = new com.google.android.gms.internal.vision.zzin
r4.<init>(r3)
com.google.android.gms.internal.vision.zzgf r4 = r4.zzhc()
com.google.android.gms.internal.vision.zzgf r3 = r4.zzg(r3)
throw r3
L48:
return r3
*/
throw new UnsupportedOperationException("Method not decompiled: com.google.android.gms.internal.vision.zzfy.zzb(com.google.android.gms.internal.vision.zzfy, byte[]):com.google.android.gms.internal.vision.zzfy");
}
/* JADX INFO: Access modifiers changed from: protected */
/* JADX WARN: Code restructure failed: missing block: B:13:0x0037, code lost:
if (r4 != false) goto L19;
*/
/*
Code decompiled incorrectly, please refer to instructions dump.
To view partially-correct add '--show-bad-code' argument
*/
public static <T extends com.google.android.gms.internal.vision.zzfy<T, ?>> T zzb(T r2, byte[] r3, com.google.android.gms.internal.vision.zzfk r4) throws com.google.android.gms.internal.vision.zzgf {
/*
com.google.android.gms.internal.vision.zzfy r2 = zza(r2, r3, r4)
if (r2 == 0) goto L48
java.lang.Boolean r3 = java.lang.Boolean.TRUE
boolean r3 = r3.booleanValue()
int r4 = com.google.android.gms.internal.vision.zzfy.zzg.zzwx
r0 = 0
java.lang.Object r4 = r2.zza(r4, r0, r0)
java.lang.Byte r4 = (java.lang.Byte) r4
byte r4 = r4.byteValue()
r1 = 1
if (r4 != r1) goto L1d
goto L48
L1d:
if (r4 == 0) goto L3a
com.google.android.gms.internal.vision.zzhs r4 = com.google.android.gms.internal.vision.zzhs.zzgl()
com.google.android.gms.internal.vision.zzhw r4 = r4.zzs(r2)
boolean r4 = r4.zzr(r2)
if (r3 == 0) goto L37
int r3 = com.google.android.gms.internal.vision.zzfy.zzg.zzwy
if (r4 == 0) goto L33
r1 = r2
goto L34
L33:
r1 = r0
L34:
r2.zza(r3, r1, r0)
L37:
if (r4 == 0) goto L3a
goto L48
L3a:
com.google.android.gms.internal.vision.zzin r3 = new com.google.android.gms.internal.vision.zzin
r3.<init>(r2)
com.google.android.gms.internal.vision.zzgf r3 = r3.zzhc()
com.google.android.gms.internal.vision.zzgf r2 = r3.zzg(r2)
throw r2
L48:
return r2
*/
throw new UnsupportedOperationException("Method not decompiled: com.google.android.gms.internal.vision.zzfy.zzb(com.google.android.gms.internal.vision.zzfy, byte[], com.google.android.gms.internal.vision.zzfk):com.google.android.gms.internal.vision.zzfy");
}
@Override // com.google.android.gms.internal.vision.zzhf
public final /* synthetic */ zzhg zzez() {
zza zzaVar = (zza) zza(zzg.zzxb, (Object) null, (Object) null);
zzaVar.zza((zza) this);
return zzaVar;
}
@Override // com.google.android.gms.internal.vision.zzhf
public final /* synthetic */ zzhg zzfa() {
return (zza) zza(zzg.zzxb, (Object) null, (Object) null);
}
@Override // com.google.android.gms.internal.vision.zzhh
public final /* synthetic */ zzhf zzfb() {
return (zzfy) zza(zzg.zzxc, (Object) null, (Object) null);
}
@Override // com.google.android.gms.internal.vision.zzec
final void zzy(int i) {
this.zzwk = i;
}
@Override // com.google.android.gms.internal.vision.zzec
final int zzcf() {
return this.zzwk;
}
}