305 lines
10 KiB
Java
305 lines
10 KiB
Java
package com.google.android.libraries.places.internal;
|
|
|
|
import java.util.Arrays;
|
|
|
|
/* loaded from: classes2.dex */
|
|
final class zzjr extends zzjb {
|
|
static final zzjb zza = new zzjr(null, new Object[0], 0);
|
|
final transient Object[] zzb;
|
|
private final transient Object zzc;
|
|
private final transient int zzd;
|
|
|
|
/* JADX INFO: Access modifiers changed from: package-private */
|
|
/* JADX WARN: Multi-variable type inference failed */
|
|
/* JADX WARN: Type inference failed for: r14v8 */
|
|
/* JADX WARN: Type inference failed for: r15v0 */
|
|
/* JADX WARN: Type inference failed for: r7v3, types: [int[], java.lang.Object] */
|
|
/* JADX WARN: Type inference failed for: r7v5 */
|
|
public static zzjr zzf(int i, Object[] objArr, zzja zzjaVar) {
|
|
int i2;
|
|
byte[] bArr;
|
|
int i3 = i;
|
|
Object[] objArr2 = objArr;
|
|
if (i3 == 0) {
|
|
return (zzjr) zza;
|
|
}
|
|
Object obj = null;
|
|
if (i3 == 1) {
|
|
zzin.zza(objArr2[0], objArr2[1]);
|
|
return new zzjr(null, objArr2, 1);
|
|
}
|
|
zzig.zzb(i3, objArr2.length >> 1, "index");
|
|
int max = Math.max(i3, 2);
|
|
if (max < 751619276) {
|
|
i2 = Integer.highestOneBit(max - 1);
|
|
do {
|
|
i2 += i2;
|
|
} while (i2 * 0.7d < max);
|
|
} else {
|
|
i2 = 1073741824;
|
|
zzig.zze(max < 1073741824, "collection too large");
|
|
}
|
|
if (i3 == 1) {
|
|
zzin.zza(objArr2[0], objArr2[1]);
|
|
} else {
|
|
int i4 = i2 - 1;
|
|
char c = 65535;
|
|
if (i2 <= 128) {
|
|
bArr = new byte[i2];
|
|
Arrays.fill(bArr, (byte) -1);
|
|
int i5 = 0;
|
|
for (int i6 = 0; i6 < i3; i6++) {
|
|
int i7 = i5 + i5;
|
|
int i8 = i6 + i6;
|
|
Object obj2 = objArr2[i8];
|
|
Object obj3 = objArr2[i8 ^ 1];
|
|
zzin.zza(obj2, obj3);
|
|
int zza2 = zziu.zza(obj2.hashCode());
|
|
while (true) {
|
|
int i9 = zza2 & i4;
|
|
int i10 = bArr[i9] & 255;
|
|
if (i10 != 255) {
|
|
if (obj2.equals(objArr2[i10])) {
|
|
int i11 = i10 ^ 1;
|
|
zziz zzizVar = new zziz(obj2, obj3, objArr2[i11]);
|
|
objArr2[i11] = obj3;
|
|
obj = zzizVar;
|
|
break;
|
|
}
|
|
zza2 = i9 + 1;
|
|
} else {
|
|
bArr[i9] = (byte) i7;
|
|
if (i5 < i6) {
|
|
objArr2[i7] = obj2;
|
|
objArr2[i7 ^ 1] = obj3;
|
|
}
|
|
i5++;
|
|
}
|
|
}
|
|
}
|
|
if (i5 != i3) {
|
|
obj = new Object[]{bArr, Integer.valueOf(i5), obj};
|
|
}
|
|
obj = bArr;
|
|
} else if (i2 <= 32768) {
|
|
bArr = new short[i2];
|
|
Arrays.fill(bArr, (short) -1);
|
|
int i12 = 0;
|
|
for (int i13 = 0; i13 < i3; i13++) {
|
|
int i14 = i12 + i12;
|
|
int i15 = i13 + i13;
|
|
Object obj4 = objArr2[i15];
|
|
Object obj5 = objArr2[i15 ^ 1];
|
|
zzin.zza(obj4, obj5);
|
|
int zza3 = zziu.zza(obj4.hashCode());
|
|
while (true) {
|
|
int i16 = zza3 & i4;
|
|
char c2 = (char) bArr[i16];
|
|
if (c2 != 65535) {
|
|
if (obj4.equals(objArr2[c2])) {
|
|
int i17 = c2 ^ 1;
|
|
zziz zzizVar2 = new zziz(obj4, obj5, objArr2[i17]);
|
|
objArr2[i17] = obj5;
|
|
obj = zzizVar2;
|
|
break;
|
|
}
|
|
zza3 = i16 + 1;
|
|
} else {
|
|
bArr[i16] = (short) i14;
|
|
if (i12 < i13) {
|
|
objArr2[i14] = obj4;
|
|
objArr2[i14 ^ 1] = obj5;
|
|
}
|
|
i12++;
|
|
}
|
|
}
|
|
}
|
|
if (i12 != i3) {
|
|
obj = new Object[]{bArr, Integer.valueOf(i12), obj};
|
|
}
|
|
obj = bArr;
|
|
} else {
|
|
bArr = new int[i2];
|
|
Arrays.fill((int[]) bArr, -1);
|
|
int i18 = 0;
|
|
int i19 = 0;
|
|
while (i18 < i3) {
|
|
int i20 = i19 + i19;
|
|
int i21 = i18 + i18;
|
|
Object obj6 = objArr2[i21];
|
|
Object obj7 = objArr2[i21 ^ 1];
|
|
zzin.zza(obj6, obj7);
|
|
int zza4 = zziu.zza(obj6.hashCode());
|
|
while (true) {
|
|
int i22 = zza4 & i4;
|
|
?? r15 = bArr[i22];
|
|
if (r15 != c) {
|
|
if (obj6.equals(objArr2[r15])) {
|
|
int i23 = r15 ^ 1;
|
|
zziz zzizVar3 = new zziz(obj6, obj7, objArr2[i23]);
|
|
objArr2[i23] = obj7;
|
|
obj = zzizVar3;
|
|
break;
|
|
}
|
|
zza4 = i22 + 1;
|
|
c = 65535;
|
|
} else {
|
|
bArr[i22] = i20;
|
|
if (i19 < i18) {
|
|
objArr2[i20] = obj6;
|
|
objArr2[i20 ^ 1] = obj7;
|
|
}
|
|
i19++;
|
|
}
|
|
}
|
|
i18++;
|
|
c = 65535;
|
|
}
|
|
if (i19 != i3) {
|
|
obj = new Object[]{bArr, Integer.valueOf(i19), obj};
|
|
}
|
|
obj = bArr;
|
|
}
|
|
}
|
|
if (obj instanceof Object[]) {
|
|
Object[] objArr3 = (Object[]) obj;
|
|
zzjaVar.zzc = (zziz) objArr3[2];
|
|
Object obj8 = objArr3[0];
|
|
int intValue = ((Integer) objArr3[1]).intValue();
|
|
objArr2 = Arrays.copyOf(objArr2, intValue + intValue);
|
|
obj = obj8;
|
|
i3 = intValue;
|
|
}
|
|
return new zzjr(obj, objArr2, i3);
|
|
}
|
|
|
|
/* JADX WARN: Removed duplicated region for block: B:11:0x0097 A[RETURN] */
|
|
/* JADX WARN: Removed duplicated region for block: B:9:0x0096 A[RETURN] */
|
|
@Override // com.google.android.libraries.places.internal.zzjb, java.util.Map
|
|
/*
|
|
Code decompiled incorrectly, please refer to instructions dump.
|
|
To view partially-correct add '--show-bad-code' argument
|
|
*/
|
|
public final java.lang.Object get(java.lang.Object r9) {
|
|
/*
|
|
r8 = this;
|
|
java.lang.Object r0 = r8.zzc
|
|
java.lang.Object[] r1 = r8.zzb
|
|
int r2 = r8.zzd
|
|
r3 = 0
|
|
if (r9 != 0) goto Lb
|
|
goto L93
|
|
Lb:
|
|
r4 = 1
|
|
if (r2 != r4) goto L1b
|
|
r0 = 0
|
|
r0 = r1[r0]
|
|
boolean r9 = r0.equals(r9)
|
|
if (r9 == 0) goto L93
|
|
r9 = r1[r4]
|
|
goto L94
|
|
L1b:
|
|
if (r0 == 0) goto L93
|
|
boolean r2 = r0 instanceof byte[]
|
|
if (r2 == 0) goto L46
|
|
byte[] r0 = (byte[]) r0
|
|
int r2 = r0.length
|
|
int r5 = r9.hashCode()
|
|
int r5 = com.google.android.libraries.places.internal.zziu.zza(r5)
|
|
L2c:
|
|
int r6 = r2 + (-1)
|
|
r5 = r5 & r6
|
|
r6 = r0[r5]
|
|
r7 = 255(0xff, float:3.57E-43)
|
|
r6 = r6 & r7
|
|
if (r6 == r7) goto L93
|
|
r7 = r1[r6]
|
|
boolean r7 = r9.equals(r7)
|
|
if (r7 == 0) goto L43
|
|
r9 = r6 ^ 1
|
|
r9 = r1[r9]
|
|
goto L94
|
|
L43:
|
|
int r5 = r5 + 1
|
|
goto L2c
|
|
L46:
|
|
boolean r2 = r0 instanceof short[]
|
|
if (r2 == 0) goto L70
|
|
short[] r0 = (short[]) r0
|
|
int r2 = r0.length
|
|
int r5 = r9.hashCode()
|
|
int r5 = com.google.android.libraries.places.internal.zziu.zza(r5)
|
|
L55:
|
|
int r6 = r2 + (-1)
|
|
r5 = r5 & r6
|
|
short r6 = r0[r5]
|
|
char r6 = (char) r6
|
|
r7 = 65535(0xffff, float:9.1834E-41)
|
|
if (r6 == r7) goto L93
|
|
r7 = r1[r6]
|
|
boolean r7 = r9.equals(r7)
|
|
if (r7 == 0) goto L6d
|
|
r9 = r6 ^ 1
|
|
r9 = r1[r9]
|
|
goto L94
|
|
L6d:
|
|
int r5 = r5 + 1
|
|
goto L55
|
|
L70:
|
|
int[] r0 = (int[]) r0
|
|
int r2 = r0.length
|
|
int r5 = r9.hashCode()
|
|
int r5 = com.google.android.libraries.places.internal.zziu.zza(r5)
|
|
L7b:
|
|
int r6 = r2 + (-1)
|
|
r5 = r5 & r6
|
|
r6 = r0[r5]
|
|
r7 = -1
|
|
if (r6 == r7) goto L93
|
|
r7 = r1[r6]
|
|
boolean r7 = r9.equals(r7)
|
|
if (r7 == 0) goto L90
|
|
r9 = r6 ^ 1
|
|
r9 = r1[r9]
|
|
goto L94
|
|
L90:
|
|
int r5 = r5 + 1
|
|
goto L7b
|
|
L93:
|
|
r9 = r3
|
|
L94:
|
|
if (r9 != 0) goto L97
|
|
return r3
|
|
L97:
|
|
return r9
|
|
*/
|
|
throw new UnsupportedOperationException("Method not decompiled: com.google.android.libraries.places.internal.zzjr.get(java.lang.Object):java.lang.Object");
|
|
}
|
|
|
|
@Override // com.google.android.libraries.places.internal.zzjb
|
|
final zziv zza() {
|
|
return new zzjq(this.zzb, 1, this.zzd);
|
|
}
|
|
|
|
@Override // com.google.android.libraries.places.internal.zzjb
|
|
final zzjc zzc() {
|
|
return new zzjo(this, this.zzb, 0, this.zzd);
|
|
}
|
|
|
|
@Override // com.google.android.libraries.places.internal.zzjb
|
|
final zzjc zzd() {
|
|
return new zzjp(this, new zzjq(this.zzb, 0, this.zzd));
|
|
}
|
|
|
|
@Override // java.util.Map
|
|
public final int size() {
|
|
return this.zzd;
|
|
}
|
|
|
|
private zzjr(Object obj, Object[] objArr, int i) {
|
|
this.zzc = obj;
|
|
this.zzb = objArr;
|
|
this.zzd = i;
|
|
}
|
|
}
|