what-the-bank/sources/o/fSC.java

286 lines
9.4 KiB
Java

package o;
import io.reactivex.rxjava3.exceptions.CompositeException;
import java.util.ArrayList;
/* loaded from: classes.dex */
public final class fSC implements fSJ, InterfaceC13145fSF {
private volatile boolean c;
private fYT<fSJ> e;
@Override // o.fSJ
public final void dispose() {
if (this.c) {
return;
}
synchronized (this) {
if (this.c) {
return;
}
this.c = true;
fYT<fSJ> fyt = this.e;
this.e = null;
a(fyt);
}
}
/* JADX WARN: Code restructure failed: missing block: B:13:0x0032, code lost:
if (r5.equals(r11) == false) goto L14;
*/
/* JADX WARN: Code restructure failed: missing block: B:14:0x0034, code lost:
r3 = (r3 + 1) & r2;
r5 = r1[r3];
*/
/* JADX WARN: Code restructure failed: missing block: B:15:0x0038, code lost:
if (r5 == null) goto L42;
*/
/* JADX WARN: Code restructure failed: missing block: B:17:0x003e, code lost:
if (r5.equals(r11) == false) goto L44;
*/
/* JADX WARN: Multi-variable type inference failed */
/* JADX WARN: Type inference failed for: r5v3, types: [T[], java.lang.Object[]] */
@Override // o.InterfaceC13145fSF
/*
Code decompiled incorrectly, please refer to instructions dump.
To view partially-correct add '--show-bad-code' argument
*/
public final boolean e(o.fSJ r11) {
/*
r10 = this;
java.lang.String r0 = "disposable is null"
java.util.Objects.requireNonNull(r11, r0)
boolean r0 = r10.c
if (r0 != 0) goto L8d
monitor-enter(r10)
boolean r0 = r10.c // Catch: java.lang.Throwable -> L8a
if (r0 != 0) goto L88
o.fYT<o.fSJ> r0 = r10.e // Catch: java.lang.Throwable -> L8a
if (r0 != 0) goto L19
o.fYT r0 = new o.fYT // Catch: java.lang.Throwable -> L8a
r0.<init>() // Catch: java.lang.Throwable -> L8a
r10.e = r0 // Catch: java.lang.Throwable -> L8a
L19:
T[] r1 = r0.a // Catch: java.lang.Throwable -> L8a
int r2 = r0.c // Catch: java.lang.Throwable -> L8a
int r3 = r11.hashCode() // Catch: java.lang.Throwable -> L8a
r4 = -1640531527(0xffffffff9e3779b9, float:-9.713111E-21)
int r3 = r3 * r4
int r5 = r3 >>> 16
r3 = r3 ^ r5
r3 = r3 & r2
r5 = r1[r3] // Catch: java.lang.Throwable -> L8a
r6 = 1
if (r5 == 0) goto L41
boolean r5 = r5.equals(r11) // Catch: java.lang.Throwable -> L8a
if (r5 != 0) goto L86
L34:
int r3 = r3 + r6
r3 = r3 & r2
r5 = r1[r3] // Catch: java.lang.Throwable -> L8a
if (r5 == 0) goto L41
boolean r5 = r5.equals(r11) // Catch: java.lang.Throwable -> L8a
if (r5 == 0) goto L34
goto L86
L41:
r1[r3] = r11 // Catch: java.lang.Throwable -> L8a
int r11 = r0.d // Catch: java.lang.Throwable -> L8a
int r11 = r11 + r6
r0.d = r11 // Catch: java.lang.Throwable -> L8a
int r1 = r0.b // Catch: java.lang.Throwable -> L8a
if (r11 < r1) goto L86
T[] r11 = r0.a // Catch: java.lang.Throwable -> L8a
int r1 = r11.length // Catch: java.lang.Throwable -> L8a
int r2 = r1 << 1
int r3 = r2 + (-1)
java.lang.Object[] r5 = new java.lang.Object[r2] // Catch: java.lang.Throwable -> L8a
java.lang.Object[] r5 = (java.lang.Object[]) r5 // Catch: java.lang.Throwable -> L8a
int r7 = r0.d // Catch: java.lang.Throwable -> L8a
L59:
if (r7 == 0) goto L7b
L5b:
int r1 = r1 + (-1)
r8 = r11[r1] // Catch: java.lang.Throwable -> L8a
if (r8 == 0) goto L5b
int r8 = r8.hashCode() // Catch: java.lang.Throwable -> L8a
int r8 = r8 * r4
int r9 = r8 >>> 16
r8 = r8 ^ r9
r8 = r8 & r3
r9 = r5[r8] // Catch: java.lang.Throwable -> L8a
if (r9 == 0) goto L74
L6e:
int r8 = r8 + r6
r8 = r8 & r3
r9 = r5[r8] // Catch: java.lang.Throwable -> L8a
if (r9 != 0) goto L6e
L74:
r9 = r11[r1] // Catch: java.lang.Throwable -> L8a
r5[r8] = r9 // Catch: java.lang.Throwable -> L8a
int r7 = r7 + (-1)
goto L59
L7b:
r0.c = r3 // Catch: java.lang.Throwable -> L8a
float r11 = (float) r2 // Catch: java.lang.Throwable -> L8a
float r1 = r0.e // Catch: java.lang.Throwable -> L8a
float r11 = r11 * r1
int r11 = (int) r11 // Catch: java.lang.Throwable -> L8a
r0.b = r11 // Catch: java.lang.Throwable -> L8a
r0.a = r5 // Catch: java.lang.Throwable -> L8a
L86:
monitor-exit(r10)
return r6
L88:
monitor-exit(r10)
goto L8d
L8a:
r11 = move-exception
monitor-exit(r10)
throw r11
L8d:
r11.dispose()
r11 = 0
return r11
*/
throw new UnsupportedOperationException("Method not decompiled: o.fSC.e(o.fSJ):boolean");
}
@Override // o.InterfaceC13145fSF
public final boolean c(fSJ fsj) {
if (!b(fsj)) {
return false;
}
fsj.dispose();
return true;
}
/* JADX WARN: Removed duplicated region for block: B:20:0x004b A[DONT_GENERATE] */
@Override // o.InterfaceC13145fSF
/*
Code decompiled incorrectly, please refer to instructions dump.
To view partially-correct add '--show-bad-code' argument
*/
public final boolean b(o.fSJ r8) {
/*
r7 = this;
java.lang.String r0 = "disposable is null"
java.util.Objects.requireNonNull(r8, r0)
boolean r0 = r7.c
r1 = 0
if (r0 == 0) goto Lb
return r1
Lb:
monitor-enter(r7)
boolean r0 = r7.c // Catch: java.lang.Throwable -> L4f
if (r0 == 0) goto L12
monitor-exit(r7)
return r1
L12:
o.fYT<o.fSJ> r0 = r7.e // Catch: java.lang.Throwable -> L4f
if (r0 == 0) goto L4d
T[] r2 = r0.a // Catch: java.lang.Throwable -> L4f
int r3 = r0.c // Catch: java.lang.Throwable -> L4f
int r4 = r8.hashCode() // Catch: java.lang.Throwable -> L4f
r5 = -1640531527(0xffffffff9e3779b9, float:-9.713111E-21)
int r4 = r4 * r5
int r5 = r4 >>> 16
r4 = r4 ^ r5
r4 = r4 & r3
r5 = r2[r4] // Catch: java.lang.Throwable -> L4f
if (r5 != 0) goto L2b
goto L4d
L2b:
boolean r5 = r5.equals(r8) // Catch: java.lang.Throwable -> L4f
r6 = 1
if (r5 == 0) goto L37
boolean r8 = r0.b(r4, r2, r3) // Catch: java.lang.Throwable -> L4f
goto L48
L37:
int r4 = r4 + r6
r4 = r4 & r3
r5 = r2[r4] // Catch: java.lang.Throwable -> L4f
if (r5 != 0) goto L3e
goto L4d
L3e:
boolean r5 = r5.equals(r8) // Catch: java.lang.Throwable -> L4f
if (r5 == 0) goto L37
boolean r8 = r0.b(r4, r2, r3) // Catch: java.lang.Throwable -> L4f
L48:
if (r8 != 0) goto L4b
goto L4d
L4b:
monitor-exit(r7)
return r6
L4d:
monitor-exit(r7)
return r1
L4f:
r8 = move-exception
monitor-exit(r7)
throw r8
*/
throw new UnsupportedOperationException("Method not decompiled: o.fSC.b(o.fSJ):boolean");
}
public final void c() {
if (this.c) {
return;
}
synchronized (this) {
if (this.c) {
return;
}
fYT<fSJ> fyt = this.e;
this.e = null;
a(fyt);
}
}
public final int e() {
if (this.c) {
return 0;
}
synchronized (this) {
if (this.c) {
return 0;
}
fYT<fSJ> fyt = this.e;
return fyt != null ? fyt.d : 0;
}
}
private static void a(fYT<fSJ> fyt) {
if (fyt == null) {
return;
}
ArrayList arrayList = null;
for (fSJ fsj : fyt.a) {
if (fsj instanceof fSJ) {
try {
fsj.dispose();
} catch (Throwable th) {
C13147fSI.c(th);
if (arrayList == null) {
arrayList = new ArrayList();
}
arrayList.add(th);
}
}
}
if (arrayList != null) {
if (arrayList.size() == 1) {
throw fYR.c((Throwable) arrayList.get(0));
}
throw new CompositeException(arrayList);
}
}
@Override // o.fSJ
public final boolean isDisposed() {
return this.c;
}
}