what-the-bank/sources/com/google/android/gms/internal/gtm/zzqt.java

485 lines
16 KiB
Java

package com.google.android.gms.internal.gtm;
import com.google.android.gms.internal.gtm.zzqv;
import java.io.IOException;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
/* loaded from: classes2.dex */
final class zzqt<FieldDescriptorType extends zzqv<FieldDescriptorType>> {
private static final zzqt zzaxq = new zzqt(true);
private boolean zzaut;
private boolean zzaxp = false;
final zztc<FieldDescriptorType, Object> zzaxo = zztc.zzbu(16);
private zzqt() {
}
private zzqt(boolean z) {
zzmi();
}
public final void zzmi() {
if (this.zzaut) {
return;
}
this.zzaxo.zzmi();
this.zzaut = true;
}
public final boolean equals(Object obj) {
if (this == obj) {
return true;
}
if (obj instanceof zzqt) {
return this.zzaxo.equals(((zzqt) obj).zzaxo);
}
return false;
}
public final int hashCode() {
return this.zzaxo.hashCode();
}
public final Iterator<Map.Entry<FieldDescriptorType, Object>> iterator() {
if (this.zzaxp) {
return new zzrq(this.zzaxo.entrySet().iterator());
}
return this.zzaxo.entrySet().iterator();
}
/* JADX INFO: Access modifiers changed from: package-private */
public final Iterator<Map.Entry<FieldDescriptorType, Object>> descendingIterator() {
if (this.zzaxp) {
return new zzrq(this.zzaxo.zzrc().iterator());
}
return this.zzaxo.zzrc().iterator();
}
private final Object zza(FieldDescriptorType fielddescriptortype) {
Object obj = this.zzaxo.get(fielddescriptortype);
return obj instanceof zzrn ? zzrn.zzpy() : obj;
}
private final void zza(FieldDescriptorType fielddescriptortype, Object obj) {
if (fielddescriptortype.zzoz()) {
if (!(obj instanceof List)) {
throw new IllegalArgumentException("Wrong object type used with protocol message reflection.");
}
ArrayList arrayList = new ArrayList();
arrayList.addAll((List) obj);
int size = arrayList.size();
int i = 0;
while (i < size) {
Object obj2 = arrayList.get(i);
i++;
zza(fielddescriptortype.zzox(), obj2);
}
obj = arrayList;
} else {
zza(fielddescriptortype.zzox(), obj);
}
if (obj instanceof zzrn) {
this.zzaxp = true;
}
this.zzaxo.zza((zztc<FieldDescriptorType, Object>) fielddescriptortype, (FieldDescriptorType) obj);
}
/* JADX WARN: Can't fix incorrect switch cases order, some code will duplicate */
/* JADX WARN: Failed to find 'out' block for switch in B:2:0x000f. Please report as an issue. */
/* JADX WARN: Removed duplicated region for block: B:24:? A[RETURN, SYNTHETIC] */
/*
Code decompiled incorrectly, please refer to instructions dump.
To view partially-correct add '--show-bad-code' argument
*/
private static void zza(com.google.android.gms.internal.gtm.zzug r1, java.lang.Object r2) {
/*
com.google.android.gms.internal.gtm.zzre.checkNotNull(r2)
int[] r0 = com.google.android.gms.internal.gtm.zzqu.zzaxr
com.google.android.gms.internal.gtm.zzul r1 = r1.zzrs()
int r1 = r1.ordinal()
r1 = r0[r1]
switch(r1) {
case 1: goto L3d;
case 2: goto L3a;
case 3: goto L37;
case 4: goto L34;
case 5: goto L31;
case 6: goto L2e;
case 7: goto L25;
case 8: goto L1c;
case 9: goto L13;
default: goto L12;
}
L12:
goto L42
L13:
boolean r1 = r2 instanceof com.google.android.gms.internal.gtm.zzsk
if (r1 != 0) goto L41
boolean r1 = r2 instanceof com.google.android.gms.internal.gtm.zzrn
if (r1 == 0) goto L42
goto L41
L1c:
boolean r1 = r2 instanceof java.lang.Integer
if (r1 != 0) goto L41
boolean r1 = r2 instanceof com.google.android.gms.internal.gtm.zzrf
if (r1 == 0) goto L42
goto L41
L25:
boolean r1 = r2 instanceof com.google.android.gms.internal.gtm.zzps
if (r1 != 0) goto L41
boolean r1 = r2 instanceof byte[]
if (r1 == 0) goto L42
goto L41
L2e:
boolean r1 = r2 instanceof java.lang.String
goto L3f
L31:
boolean r1 = r2 instanceof java.lang.Boolean
goto L3f
L34:
boolean r1 = r2 instanceof java.lang.Double
goto L3f
L37:
boolean r1 = r2 instanceof java.lang.Float
goto L3f
L3a:
boolean r1 = r2 instanceof java.lang.Long
goto L3f
L3d:
boolean r1 = r2 instanceof java.lang.Integer
L3f:
if (r1 == 0) goto L42
L41:
return
L42:
java.lang.IllegalArgumentException r1 = new java.lang.IllegalArgumentException
java.lang.String r2 = "Wrong object type used with protocol message reflection."
r1.<init>(r2)
throw r1
*/
throw new UnsupportedOperationException("Method not decompiled: com.google.android.gms.internal.gtm.zzqt.zza(com.google.android.gms.internal.gtm.zzug, java.lang.Object):void");
}
public final boolean isInitialized() {
for (int i = 0; i < this.zzaxo.zzra(); i++) {
if (!zzc(this.zzaxo.zzbv(i))) {
return false;
}
}
Iterator<Map.Entry<FieldDescriptorType, Object>> it = this.zzaxo.zzrb().iterator();
while (it.hasNext()) {
if (!zzc(it.next())) {
return false;
}
}
return true;
}
private static boolean zzc(Map.Entry<FieldDescriptorType, Object> entry) {
FieldDescriptorType key = entry.getKey();
if (key.zzoy() == zzul.MESSAGE) {
if (key.zzoz()) {
Iterator it = ((List) entry.getValue()).iterator();
while (it.hasNext()) {
if (!((zzsk) it.next()).isInitialized()) {
return false;
}
}
} else {
Object value = entry.getValue();
if (value instanceof zzsk) {
if (!((zzsk) value).isInitialized()) {
return false;
}
} else {
if (value instanceof zzrn) {
return true;
}
throw new IllegalArgumentException("Wrong object type used with protocol message reflection.");
}
}
}
return true;
}
public final void zza(zzqt<FieldDescriptorType> zzqtVar) {
for (int i = 0; i < zzqtVar.zzaxo.zzra(); i++) {
zzd(zzqtVar.zzaxo.zzbv(i));
}
Iterator<Map.Entry<FieldDescriptorType, Object>> it = zzqtVar.zzaxo.zzrb().iterator();
while (it.hasNext()) {
zzd(it.next());
}
}
private static Object zzu(Object obj) {
if (obj instanceof zzsq) {
return ((zzsq) obj).zzqo();
}
if (!(obj instanceof byte[])) {
return obj;
}
byte[] bArr = (byte[]) obj;
byte[] bArr2 = new byte[bArr.length];
System.arraycopy(bArr, 0, bArr2, 0, bArr.length);
return bArr2;
}
private final void zzd(Map.Entry<FieldDescriptorType, Object> entry) {
zzsk zzpm;
FieldDescriptorType key = entry.getKey();
Object value = entry.getValue();
if (value instanceof zzrn) {
value = zzrn.zzpy();
}
if (key.zzoz()) {
Object zza = zza((zzqt<FieldDescriptorType>) key);
if (zza == null) {
zza = new ArrayList();
}
Iterator it = ((List) value).iterator();
while (it.hasNext()) {
((List) zza).add(zzu(it.next()));
}
this.zzaxo.zza((zztc<FieldDescriptorType, Object>) key, (FieldDescriptorType) zza);
return;
}
if (key.zzoy() == zzul.MESSAGE) {
Object zza2 = zza((zzqt<FieldDescriptorType>) key);
if (zza2 == null) {
this.zzaxo.zza((zztc<FieldDescriptorType, Object>) key, (FieldDescriptorType) zzu(value));
return;
}
if (zza2 instanceof zzsq) {
zzpm = key.zza((zzsq) zza2, (zzsq) value);
} else {
zzpm = key.zza(((zzsk) zza2).zzpg(), (zzsk) value).zzpm();
}
this.zzaxo.zza((zztc<FieldDescriptorType, Object>) key, (FieldDescriptorType) zzpm);
return;
}
this.zzaxo.zza((zztc<FieldDescriptorType, Object>) key, (FieldDescriptorType) zzu(value));
}
/* JADX INFO: Access modifiers changed from: package-private */
public static void zza(zzqj zzqjVar, zzug zzugVar, int i, Object obj) throws IOException {
if (zzugVar == zzug.zzbfy) {
zzsk zzskVar = (zzsk) obj;
zzre.zzf(zzskVar);
zzqjVar.zzd(i, 3);
zzskVar.zzb(zzqjVar);
zzqjVar.zzd(i, 4);
return;
}
zzqjVar.zzd(i, zzugVar.zzrt());
switch (zzqu.zzaws[zzugVar.ordinal()]) {
case 1:
zzqjVar.zzb(((Double) obj).doubleValue());
return;
case 2:
zzqjVar.zza(((Float) obj).floatValue());
return;
case 3:
zzqjVar.zzp(((Long) obj).longValue());
return;
case 4:
zzqjVar.zzp(((Long) obj).longValue());
return;
case 5:
zzqjVar.zzax(((Integer) obj).intValue());
return;
case 6:
zzqjVar.zzr(((Long) obj).longValue());
return;
case 7:
zzqjVar.zzba(((Integer) obj).intValue());
return;
case 8:
zzqjVar.zzi(((Boolean) obj).booleanValue());
return;
case 9:
((zzsk) obj).zzb(zzqjVar);
return;
case 10:
zzqjVar.zzb((zzsk) obj);
return;
case 11:
if (obj instanceof zzps) {
zzqjVar.zza((zzps) obj);
return;
} else {
zzqjVar.zzcz((String) obj);
return;
}
case 12:
if (obj instanceof zzps) {
zzqjVar.zza((zzps) obj);
return;
} else {
byte[] bArr = (byte[]) obj;
zzqjVar.zze(bArr, 0, bArr.length);
return;
}
case 13:
zzqjVar.zzay(((Integer) obj).intValue());
return;
case 14:
zzqjVar.zzba(((Integer) obj).intValue());
return;
case 15:
zzqjVar.zzr(((Long) obj).longValue());
return;
case 16:
zzqjVar.zzaz(((Integer) obj).intValue());
return;
case 17:
zzqjVar.zzq(((Long) obj).longValue());
return;
case 18:
if (obj instanceof zzrf) {
zzqjVar.zzax(((zzrf) obj).zzc());
return;
} else {
zzqjVar.zzax(((Integer) obj).intValue());
return;
}
default:
return;
}
}
public final int zzow() {
int i = 0;
for (int i2 = 0; i2 < this.zzaxo.zzra(); i2++) {
i += zze(this.zzaxo.zzbv(i2));
}
Iterator<Map.Entry<FieldDescriptorType, Object>> it = this.zzaxo.zzrb().iterator();
while (it.hasNext()) {
i += zze(it.next());
}
return i;
}
private static int zze(Map.Entry<FieldDescriptorType, Object> entry) {
FieldDescriptorType key = entry.getKey();
Object value = entry.getValue();
if (key.zzoy() == zzul.MESSAGE && !key.zzoz() && !key.zzpa()) {
if (value instanceof zzrn) {
return zzqj.zzb(entry.getKey().zzc(), (zzrn) value);
}
return zzqj.zzd(entry.getKey().zzc(), (zzsk) value);
}
return zzb((zzqv<?>) key, value);
}
/* JADX INFO: Access modifiers changed from: package-private */
public static int zza(zzug zzugVar, int i, Object obj) {
int zzbb = zzqj.zzbb(i);
if (zzugVar == zzug.zzbfy) {
zzre.zzf((zzsk) obj);
zzbb <<= 1;
}
return zzbb + zzb(zzugVar, obj);
}
private static int zzb(zzug zzugVar, Object obj) {
switch (zzqu.zzaws[zzugVar.ordinal()]) {
case 1:
return zzqj.zzc(((Double) obj).doubleValue());
case 2:
return zzqj.zzb(((Float) obj).floatValue());
case 3:
return zzqj.zzs(((Long) obj).longValue());
case 4:
return zzqj.zzt(((Long) obj).longValue());
case 5:
return zzqj.zzbc(((Integer) obj).intValue());
case 6:
return zzqj.zzv(((Long) obj).longValue());
case 7:
return zzqj.zzbf(((Integer) obj).intValue());
case 8:
return zzqj.zzj(((Boolean) obj).booleanValue());
case 9:
return zzqj.zzd((zzsk) obj);
case 10:
if (obj instanceof zzrn) {
return zzqj.zza((zzrn) obj);
}
return zzqj.zzc((zzsk) obj);
case 11:
if (obj instanceof zzps) {
return zzqj.zzb((zzps) obj);
}
return zzqj.zzda((String) obj);
case 12:
if (obj instanceof zzps) {
return zzqj.zzb((zzps) obj);
}
return zzqj.zzh((byte[]) obj);
case 13:
return zzqj.zzbd(((Integer) obj).intValue());
case 14:
return zzqj.zzbg(((Integer) obj).intValue());
case 15:
return zzqj.zzw(((Long) obj).longValue());
case 16:
return zzqj.zzbe(((Integer) obj).intValue());
case 17:
return zzqj.zzu(((Long) obj).longValue());
case 18:
if (obj instanceof zzrf) {
return zzqj.zzbh(((zzrf) obj).zzc());
}
return zzqj.zzbh(((Integer) obj).intValue());
default:
throw new RuntimeException("There is no way to get here, but the compiler thinks otherwise.");
}
}
public static int zzb(zzqv<?> zzqvVar, Object obj) {
zzug zzox = zzqvVar.zzox();
int zzc = zzqvVar.zzc();
if (zzqvVar.zzoz()) {
int i = 0;
if (zzqvVar.zzpa()) {
Iterator it = ((List) obj).iterator();
while (it.hasNext()) {
i += zzb(zzox, it.next());
}
return zzqj.zzbb(zzc) + i + zzqj.zzbj(i);
}
Iterator it2 = ((List) obj).iterator();
while (it2.hasNext()) {
i += zza(zzox, zzc, it2.next());
}
return i;
}
return zza(zzox, zzc, obj);
}
public final /* synthetic */ Object clone() throws CloneNotSupportedException {
zzqt zzqtVar = new zzqt();
for (int i = 0; i < this.zzaxo.zzra(); i++) {
Map.Entry<FieldDescriptorType, Object> zzbv = this.zzaxo.zzbv(i);
zzqtVar.zza((zzqt) zzbv.getKey(), zzbv.getValue());
}
for (Map.Entry<FieldDescriptorType, Object> entry : this.zzaxo.zzrb()) {
zzqtVar.zza((zzqt) entry.getKey(), entry.getValue());
}
zzqtVar.zzaxp = this.zzaxp;
return zzqtVar;
}
public final boolean isImmutable() {
return this.zzaut;
}
public static <T extends zzqv<T>> zzqt<T> zzov() {
return zzaxq;
}
}