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

618 lines
18 KiB
Java
Raw Permalink Normal View History

2024-07-27 18:17:47 +07:00
package com.google.android.gms.internal.vision;
import java.io.IOException;
import java.util.Iterator;
import java.util.List;
import java.util.RandomAccess;
/* loaded from: classes2.dex */
final class zzhy {
private static final Class<?> zzaaa = zzgs();
private static final zzio<?, ?> zzaab = zzk(false);
private static final zzio<?, ?> zzaac = zzk(true);
private static final zzio<?, ?> zzaad = new zziq();
public static void zzg(Class<?> cls) {
Class<?> cls2;
if (!zzfy.class.isAssignableFrom(cls) && (cls2 = zzaaa) != null && !cls2.isAssignableFrom(cls)) {
throw new IllegalArgumentException("Message classes must extend GeneratedMessage or GeneratedMessageLite");
}
}
public static void zza(int i, List<Double> list, zzjj zzjjVar, boolean z) throws IOException {
if (list == null || list.isEmpty()) {
return;
}
zzjjVar.zzg(i, list, z);
}
public static void zzb(int i, List<Float> list, zzjj zzjjVar, boolean z) throws IOException {
if (list == null || list.isEmpty()) {
return;
}
zzjjVar.zzf(i, list, z);
}
public static void zzc(int i, List<Long> list, zzjj zzjjVar, boolean z) throws IOException {
if (list == null || list.isEmpty()) {
return;
}
zzjjVar.zzc(i, list, z);
}
public static void zzd(int i, List<Long> list, zzjj zzjjVar, boolean z) throws IOException {
if (list == null || list.isEmpty()) {
return;
}
zzjjVar.zzd(i, list, z);
}
public static void zze(int i, List<Long> list, zzjj zzjjVar, boolean z) throws IOException {
if (list == null || list.isEmpty()) {
return;
}
zzjjVar.zzn(i, list, z);
}
public static void zzf(int i, List<Long> list, zzjj zzjjVar, boolean z) throws IOException {
if (list == null || list.isEmpty()) {
return;
}
zzjjVar.zze(i, list, z);
}
public static void zzg(int i, List<Long> list, zzjj zzjjVar, boolean z) throws IOException {
if (list == null || list.isEmpty()) {
return;
}
zzjjVar.zzl(i, list, z);
}
public static void zzh(int i, List<Integer> list, zzjj zzjjVar, boolean z) throws IOException {
if (list == null || list.isEmpty()) {
return;
}
zzjjVar.zza(i, list, z);
}
public static void zzi(int i, List<Integer> list, zzjj zzjjVar, boolean z) throws IOException {
if (list == null || list.isEmpty()) {
return;
}
zzjjVar.zzj(i, list, z);
}
public static void zzj(int i, List<Integer> list, zzjj zzjjVar, boolean z) throws IOException {
if (list == null || list.isEmpty()) {
return;
}
zzjjVar.zzm(i, list, z);
}
public static void zzk(int i, List<Integer> list, zzjj zzjjVar, boolean z) throws IOException {
if (list == null || list.isEmpty()) {
return;
}
zzjjVar.zzb(i, list, z);
}
public static void zzl(int i, List<Integer> list, zzjj zzjjVar, boolean z) throws IOException {
if (list == null || list.isEmpty()) {
return;
}
zzjjVar.zzk(i, list, z);
}
public static void zzm(int i, List<Integer> list, zzjj zzjjVar, boolean z) throws IOException {
if (list == null || list.isEmpty()) {
return;
}
zzjjVar.zzh(i, list, z);
}
public static void zzn(int i, List<Boolean> list, zzjj zzjjVar, boolean z) throws IOException {
if (list == null || list.isEmpty()) {
return;
}
zzjjVar.zzi(i, list, z);
}
public static void zza(int i, List<String> list, zzjj zzjjVar) throws IOException {
if (list == null || list.isEmpty()) {
return;
}
zzjjVar.zza(i, list);
}
public static void zzb(int i, List<zzeo> list, zzjj zzjjVar) throws IOException {
if (list == null || list.isEmpty()) {
return;
}
zzjjVar.zzb(i, list);
}
public static void zza(int i, List<?> list, zzjj zzjjVar, zzhw zzhwVar) throws IOException {
if (list == null || list.isEmpty()) {
return;
}
zzjjVar.zza(i, list, zzhwVar);
}
public static void zzb(int i, List<?> list, zzjj zzjjVar, zzhw zzhwVar) throws IOException {
if (list == null || list.isEmpty()) {
return;
}
zzjjVar.zzb(i, list, zzhwVar);
}
/* JADX INFO: Access modifiers changed from: package-private */
public static int zzq(List<Long> list) {
int size = list.size();
int i = 0;
if (size == 0) {
return 0;
}
if (list instanceof zzgt) {
zzgt zzgtVar = (zzgt) list;
for (int i2 = 0; i2 < size; i2++) {
i += zzfe.zzh(zzgtVar.getLong(i2));
}
} else {
for (int i3 = 0; i3 < size; i3++) {
i += zzfe.zzh(list.get(i3).longValue());
}
}
return i;
}
/* JADX INFO: Access modifiers changed from: package-private */
public static int zzo(int i, List<Long> list, boolean z) {
if (list.size() == 0) {
return 0;
}
return zzq(list) + (list.size() * zzfe.zzav(i));
}
/* JADX INFO: Access modifiers changed from: package-private */
public static int zzr(List<Long> list) {
int size = list.size();
int i = 0;
if (size == 0) {
return 0;
}
if (list instanceof zzgt) {
zzgt zzgtVar = (zzgt) list;
for (int i2 = 0; i2 < size; i2++) {
i += zzfe.zzi(zzgtVar.getLong(i2));
}
} else {
for (int i3 = 0; i3 < size; i3++) {
i += zzfe.zzi(list.get(i3).longValue());
}
}
return i;
}
/* JADX INFO: Access modifiers changed from: package-private */
public static int zzp(int i, List<Long> list, boolean z) {
int size = list.size();
if (size == 0) {
return 0;
}
return zzr(list) + (size * zzfe.zzav(i));
}
/* JADX INFO: Access modifiers changed from: package-private */
public static int zzs(List<Long> list) {
int size = list.size();
int i = 0;
if (size == 0) {
return 0;
}
if (list instanceof zzgt) {
zzgt zzgtVar = (zzgt) list;
for (int i2 = 0; i2 < size; i2++) {
i += zzfe.zzj(zzgtVar.getLong(i2));
}
} else {
for (int i3 = 0; i3 < size; i3++) {
i += zzfe.zzj(list.get(i3).longValue());
}
}
return i;
}
/* JADX INFO: Access modifiers changed from: package-private */
public static int zzq(int i, List<Long> list, boolean z) {
int size = list.size();
if (size == 0) {
return 0;
}
return zzs(list) + (size * zzfe.zzav(i));
}
/* JADX INFO: Access modifiers changed from: package-private */
public static int zzt(List<Integer> list) {
int size = list.size();
int i = 0;
if (size == 0) {
return 0;
}
if (list instanceof zzfz) {
zzfz zzfzVar = (zzfz) list;
for (int i2 = 0; i2 < size; i2++) {
i += zzfe.zzbb(zzfzVar.getInt(i2));
}
} else {
for (int i3 = 0; i3 < size; i3++) {
i += zzfe.zzbb(list.get(i3).intValue());
}
}
return i;
}
/* JADX INFO: Access modifiers changed from: package-private */
public static int zzr(int i, List<Integer> list, boolean z) {
int size = list.size();
if (size == 0) {
return 0;
}
return zzt(list) + (size * zzfe.zzav(i));
}
/* JADX INFO: Access modifiers changed from: package-private */
public static int zzu(List<Integer> list) {
int size = list.size();
int i = 0;
if (size == 0) {
return 0;
}
if (list instanceof zzfz) {
zzfz zzfzVar = (zzfz) list;
for (int i2 = 0; i2 < size; i2++) {
i += zzfe.zzaw(zzfzVar.getInt(i2));
}
} else {
for (int i3 = 0; i3 < size; i3++) {
i += zzfe.zzaw(list.get(i3).intValue());
}
}
return i;
}
/* JADX INFO: Access modifiers changed from: package-private */
public static int zzs(int i, List<Integer> list, boolean z) {
int size = list.size();
if (size == 0) {
return 0;
}
return zzu(list) + (size * zzfe.zzav(i));
}
/* JADX INFO: Access modifiers changed from: package-private */
public static int zzv(List<Integer> list) {
int size = list.size();
int i = 0;
if (size == 0) {
return 0;
}
if (list instanceof zzfz) {
zzfz zzfzVar = (zzfz) list;
for (int i2 = 0; i2 < size; i2++) {
i += zzfe.zzax(zzfzVar.getInt(i2));
}
} else {
for (int i3 = 0; i3 < size; i3++) {
i += zzfe.zzax(list.get(i3).intValue());
}
}
return i;
}
/* JADX INFO: Access modifiers changed from: package-private */
public static int zzt(int i, List<Integer> list, boolean z) {
int size = list.size();
if (size == 0) {
return 0;
}
return zzv(list) + (size * zzfe.zzav(i));
}
/* JADX INFO: Access modifiers changed from: package-private */
public static int zzw(List<Integer> list) {
int size = list.size();
int i = 0;
if (size == 0) {
return 0;
}
if (list instanceof zzfz) {
zzfz zzfzVar = (zzfz) list;
for (int i2 = 0; i2 < size; i2++) {
i += zzfe.zzay(zzfzVar.getInt(i2));
}
} else {
for (int i3 = 0; i3 < size; i3++) {
i += zzfe.zzay(list.get(i3).intValue());
}
}
return i;
}
/* JADX INFO: Access modifiers changed from: package-private */
public static int zzu(int i, List<Integer> list, boolean z) {
int size = list.size();
if (size == 0) {
return 0;
}
return zzw(list) + (size * zzfe.zzav(i));
}
/* JADX INFO: Access modifiers changed from: package-private */
public static int zzx(List<?> list) {
return list.size() << 2;
}
/* JADX INFO: Access modifiers changed from: package-private */
public static int zzv(int i, List<?> list, boolean z) {
int size = list.size();
if (size == 0) {
return 0;
}
return size * zzfe.zzl(i, 0);
}
/* JADX INFO: Access modifiers changed from: package-private */
public static int zzy(List<?> list) {
return list.size() << 3;
}
/* JADX INFO: Access modifiers changed from: package-private */
public static int zzw(int i, List<?> list, boolean z) {
int size = list.size();
if (size == 0) {
return 0;
}
return size * zzfe.zzg(i, 0L);
}
/* JADX INFO: Access modifiers changed from: package-private */
public static int zzz(List<?> list) {
return list.size();
}
/* JADX INFO: Access modifiers changed from: package-private */
public static int zzx(int i, List<?> list, boolean z) {
int size = list.size();
if (size == 0) {
return 0;
}
return size * zzfe.zzc(i, true);
}
/* JADX INFO: Access modifiers changed from: package-private */
public static int zzc(int i, List<?> list) {
int zzn;
int zzn2;
int size = list.size();
int i2 = 0;
if (size == 0) {
return 0;
}
int zzav = zzfe.zzav(i) * size;
if (list instanceof zzgo) {
zzgo zzgoVar = (zzgo) list;
while (i2 < size) {
Object raw = zzgoVar.getRaw(i2);
if (raw instanceof zzeo) {
zzn2 = zzfe.zzb((zzeo) raw);
} else {
zzn2 = zzfe.zzn((String) raw);
}
zzav += zzn2;
i2++;
}
} else {
while (i2 < size) {
Object obj = list.get(i2);
if (obj instanceof zzeo) {
zzn = zzfe.zzb((zzeo) obj);
} else {
zzn = zzfe.zzn((String) obj);
}
zzav += zzn;
i2++;
}
}
return zzav;
}
/* JADX INFO: Access modifiers changed from: package-private */
public static int zzc(int i, Object obj, zzhw zzhwVar) {
if (obj instanceof zzgm) {
return zzfe.zza(i, (zzgm) obj);
}
return zzfe.zzb(i, (zzhf) obj, zzhwVar);
}
/* JADX INFO: Access modifiers changed from: package-private */
public static int zzc(int i, List<?> list, zzhw zzhwVar) {
int zzb;
int size = list.size();
if (size == 0) {
return 0;
}
int zzav = zzfe.zzav(i) * size;
for (int i2 = 0; i2 < size; i2++) {
Object obj = list.get(i2);
if (obj instanceof zzgm) {
zzb = zzfe.zza((zzgm) obj);
} else {
zzb = zzfe.zzb((zzhf) obj, zzhwVar);
}
zzav += zzb;
}
return zzav;
}
/* JADX INFO: Access modifiers changed from: package-private */
public static int zzd(int i, List<zzeo> list) {
int size = list.size();
if (size == 0) {
return 0;
}
int zzav = size * zzfe.zzav(i);
for (int i2 = 0; i2 < list.size(); i2++) {
zzav += zzfe.zzb(list.get(i2));
}
return zzav;
}
/* JADX INFO: Access modifiers changed from: package-private */
public static int zzd(int i, List<zzhf> list, zzhw zzhwVar) {
int size = list.size();
if (size == 0) {
return 0;
}
int i2 = 0;
for (int i3 = 0; i3 < size; i3++) {
i2 += zzfe.zzc(i, list.get(i3), zzhwVar);
}
return i2;
}
private static zzio<?, ?> zzk(boolean z) {
try {
Class<?> zzgt = zzgt();
if (zzgt == null) {
return null;
}
return (zzio) zzgt.getConstructor(Boolean.TYPE).newInstance(Boolean.valueOf(z));
} catch (Throwable unused) {
return null;
}
}
private static Class<?> zzgs() {
try {
return Class.forName("com.google.protobuf.GeneratedMessage");
} catch (Throwable unused) {
return null;
}
}
private static Class<?> zzgt() {
try {
return Class.forName("com.google.protobuf.UnknownFieldSetSchema");
} catch (Throwable unused) {
return null;
}
}
/* JADX INFO: Access modifiers changed from: package-private */
public static boolean zzd(Object obj, Object obj2) {
if (obj != obj2) {
return obj != null && obj.equals(obj2);
}
return true;
}
/* JADX INFO: Access modifiers changed from: package-private */
public static <T> void zza(zzha zzhaVar, T t, T t2, long j) {
zziu.zza(t, j, zzhaVar.zzb(zziu.zzp(t, j), zziu.zzp(t2, j)));
}
/* JADX INFO: Access modifiers changed from: package-private */
public static <T, FT extends zzfr<FT>> void zza(zzfl<FT> zzflVar, T t, T t2) {
zzfp<FT> zzc = zzflVar.zzc(t2);
if (zzc.isEmpty()) {
return;
}
zzflVar.zzd(t).zza(zzc);
}
/* JADX INFO: Access modifiers changed from: package-private */
public static <T, UT, UB> void zza(zzio<UT, UB> zzioVar, T t, T t2) {
zzioVar.zze(t, zzioVar.zzg(zzioVar.zzt(t), zzioVar.zzt(t2)));
}
/* JADX INFO: Access modifiers changed from: package-private */
public static <UT, UB> UB zza(int i, List<Integer> list, zzgc<?> zzgcVar, UB ub, zzio<UT, UB> zzioVar) {
if (zzgcVar == null) {
return ub;
}
int size = list.size();
int i2 = 0;
for (int i3 = 0; i3 < size; i3++) {
int intValue = list.get(i3).intValue();
if (zzgcVar.zzf(intValue) != null) {
if (i3 != i2) {
list.set(i2, Integer.valueOf(intValue));
}
i2++;
} else {
ub = (UB) zza(i, intValue, ub, zzioVar);
}
}
if (i2 != size) {
list.subList(i2, size).clear();
}
return ub;
}
/* JADX INFO: Access modifiers changed from: package-private */
public static <UT, UB> UB zza(int i, List<Integer> list, zzgd zzgdVar, UB ub, zzio<UT, UB> zzioVar) {
if (zzgdVar == null) {
return ub;
}
if (list instanceof RandomAccess) {
int size = list.size();
int i2 = 0;
for (int i3 = 0; i3 < size; i3++) {
int intValue = list.get(i3).intValue();
if (zzgdVar.zzh(intValue)) {
if (i3 != i2) {
list.set(i2, Integer.valueOf(intValue));
}
i2++;
} else {
ub = (UB) zza(i, intValue, ub, zzioVar);
}
}
if (i2 != size) {
list.subList(i2, size).clear();
}
} else {
Iterator<Integer> it = list.iterator();
while (it.hasNext()) {
int intValue2 = it.next().intValue();
if (!zzgdVar.zzh(intValue2)) {
ub = (UB) zza(i, intValue2, ub, zzioVar);
it.remove();
}
}
}
return ub;
}
/* JADX INFO: Access modifiers changed from: package-private */
public static <UT, UB> UB zza(int i, int i2, UB ub, zzio<UT, UB> zzioVar) {
if (ub == null) {
ub = zzioVar.zzhd();
}
zzioVar.zza((zzio<UT, UB>) ub, i, i2);
return ub;
}
public static zzio<?, ?> zzgr() {
return zzaad;
}
public static zzio<?, ?> zzgq() {
return zzaac;
}
public static zzio<?, ?> zzgp() {
return zzaab;
}
}