what-the-bank/sources/com/google/android/gms/internal/measurement/zzmc.java

214 lines
6.5 KiB
Java
Raw Permalink Normal View History

2024-07-27 18:17:47 +07:00
package com.google.android.gms.internal.measurement;
import java.io.IOException;
import java.util.Arrays;
/* loaded from: classes.dex */
public final class zzmc {
private static final zzmc zza = new zzmc(0, new int[0], new Object[0], false);
private int zzb;
private int[] zzc;
private Object[] zzd;
private int zze;
private boolean zzf;
private zzmc() {
this(0, new int[8], new Object[8], true);
}
/* JADX INFO: Access modifiers changed from: package-private */
public static zzmc zzd(zzmc zzmcVar, zzmc zzmcVar2) {
int i = zzmcVar.zzb + zzmcVar2.zzb;
int[] copyOf = Arrays.copyOf(zzmcVar.zzc, i);
System.arraycopy(zzmcVar2.zzc, 0, copyOf, zzmcVar.zzb, zzmcVar2.zzb);
Object[] copyOf2 = Arrays.copyOf(zzmcVar.zzd, i);
System.arraycopy(zzmcVar2.zzd, 0, copyOf2, zzmcVar.zzb, zzmcVar2.zzb);
return new zzmc(i, copyOf, copyOf2, true);
}
public final boolean equals(Object obj) {
if (this == obj) {
return true;
}
if (obj == null || !(obj instanceof zzmc)) {
return false;
}
zzmc zzmcVar = (zzmc) obj;
int i = this.zzb;
if (i == zzmcVar.zzb) {
int[] iArr = this.zzc;
int[] iArr2 = zzmcVar.zzc;
int i2 = 0;
while (true) {
if (i2 >= i) {
Object[] objArr = this.zzd;
Object[] objArr2 = zzmcVar.zzd;
int i3 = this.zzb;
for (int i4 = 0; i4 < i3; i4++) {
if (objArr[i4].equals(objArr2[i4])) {
}
}
return true;
}
if (iArr[i2] != iArr2[i2]) {
break;
}
i2++;
}
}
return false;
}
public final int hashCode() {
int i = this.zzb;
int[] iArr = this.zzc;
int i2 = 17;
int i3 = 17;
for (int i4 = 0; i4 < i; i4++) {
i3 = (i3 * 31) + iArr[i4];
}
Object[] objArr = this.zzd;
int i5 = this.zzb;
for (int i6 = 0; i6 < i5; i6++) {
i2 = (i2 * 31) + objArr[i6].hashCode();
}
return ((((i + 527) * 31) + i3) * 31) + i2;
}
public final int zza() {
int zzA;
int zzB;
int i;
int i2 = this.zze;
if (i2 != -1) {
return i2;
}
int i3 = 0;
for (int i4 = 0; i4 < this.zzb; i4++) {
int i5 = this.zzc[i4];
int i6 = i5 >>> 3;
int i7 = i5 & 7;
if (i7 != 0) {
if (i7 == 1) {
((Long) this.zzd[i4]).longValue();
i = zzje.zzA(i6 << 3) + 8;
} else if (i7 == 2) {
zzix zzixVar = (zzix) this.zzd[i4];
int zzA2 = zzje.zzA(i6 << 3);
int zzd = zzixVar.zzd();
i3 += zzA2 + zzje.zzA(zzd) + zzd;
} else if (i7 == 3) {
int zzz = zzje.zzz(i6);
zzA = zzz + zzz;
zzB = ((zzmc) this.zzd[i4]).zza();
} else if (i7 == 5) {
((Integer) this.zzd[i4]).intValue();
i = zzje.zzA(i6 << 3) + 4;
} else {
throw new IllegalStateException(zzkh.zza());
}
i3 += i;
} else {
long longValue = ((Long) this.zzd[i4]).longValue();
zzA = zzje.zzA(i6 << 3);
zzB = zzje.zzB(longValue);
}
i = zzA + zzB;
i3 += i;
}
this.zze = i3;
return i3;
}
public final int zzb() {
int i = this.zze;
if (i != -1) {
return i;
}
int i2 = 0;
for (int i3 = 0; i3 < this.zzb; i3++) {
int i4 = this.zzc[i3];
zzix zzixVar = (zzix) this.zzd[i3];
int zzA = zzje.zzA(8);
int zzd = zzixVar.zzd();
i2 += zzA + zzA + zzje.zzA(16) + zzje.zzA(i4 >>> 3) + zzje.zzA(24) + zzje.zzA(zzd) + zzd;
}
this.zze = i2;
return i2;
}
/* JADX INFO: Access modifiers changed from: package-private */
public final void zzg(StringBuilder sb, int i) {
for (int i2 = 0; i2 < this.zzb; i2++) {
zzle.zzb(sb, i, String.valueOf(this.zzc[i2] >>> 3), this.zzd[i2]);
}
}
/* JADX INFO: Access modifiers changed from: package-private */
public final void zzh(int i, Object obj) {
if (this.zzf) {
int i2 = this.zzb;
int[] iArr = this.zzc;
if (i2 == iArr.length) {
int i3 = i2 + (i2 < 4 ? 8 : i2 >> 1);
this.zzc = Arrays.copyOf(iArr, i3);
this.zzd = Arrays.copyOf(this.zzd, i3);
}
int[] iArr2 = this.zzc;
int i4 = this.zzb;
iArr2[i4] = i;
this.zzd[i4] = obj;
this.zzb = i4 + 1;
return;
}
throw new UnsupportedOperationException();
}
public final void zzi(zzjf zzjfVar) throws IOException {
if (this.zzb != 0) {
for (int i = 0; i < this.zzb; i++) {
int i2 = this.zzc[i];
Object obj = this.zzd[i];
int i3 = i2 >>> 3;
int i4 = i2 & 7;
if (i4 == 0) {
zzjfVar.zzt(i3, ((Long) obj).longValue());
} else if (i4 == 1) {
zzjfVar.zzm(i3, ((Long) obj).longValue());
} else if (i4 == 2) {
zzjfVar.zzd(i3, (zzix) obj);
} else if (i4 == 3) {
zzjfVar.zzE(i3);
((zzmc) obj).zzi(zzjfVar);
zzjfVar.zzh(i3);
} else if (i4 == 5) {
zzjfVar.zzk(i3, ((Integer) obj).intValue());
} else {
throw new RuntimeException(zzkh.zza());
}
}
}
}
public final void zzf() {
this.zzf = false;
}
/* JADX INFO: Access modifiers changed from: package-private */
public static zzmc zze() {
return new zzmc(0, new int[8], new Object[8], true);
}
public static zzmc zzc() {
return zza;
}
private zzmc(int i, int[] iArr, Object[] objArr, boolean z) {
this.zze = -1;
this.zzb = i;
this.zzc = iArr;
this.zzd = objArr;
this.zzf = z;
}
}