197 lines
6.3 KiB
Java
197 lines
6.3 KiB
Java
package o;
|
|
|
|
import java.util.concurrent.atomic.AtomicInteger;
|
|
|
|
/* renamed from: o.fXf, reason: case insensitive filesystem */
|
|
/* loaded from: classes6.dex */
|
|
public final class C13332fXf<T> extends AbstractC13163fSk<Boolean> {
|
|
private InterfaceC13169fSq<? extends T> a;
|
|
private fSN<? super T, ? super T> b;
|
|
private InterfaceC13169fSq<? extends T> d;
|
|
private int e;
|
|
|
|
public C13332fXf(InterfaceC13169fSq<? extends T> interfaceC13169fSq, InterfaceC13169fSq<? extends T> interfaceC13169fSq2, fSN<? super T, ? super T> fsn, int i) {
|
|
this.d = interfaceC13169fSq;
|
|
this.a = interfaceC13169fSq2;
|
|
this.b = fsn;
|
|
this.e = i;
|
|
}
|
|
|
|
@Override // o.AbstractC13163fSk
|
|
public final void subscribeActual(InterfaceC13174fSv<? super Boolean> interfaceC13174fSv) {
|
|
HBt hBt = new HBt(interfaceC13174fSv, this.e, this.d, this.a, this.b);
|
|
interfaceC13174fSv.onSubscribe(hBt);
|
|
Sts<T>[] stsArr = hBt.c;
|
|
hBt.a.subscribe(stsArr[0]);
|
|
hBt.e.subscribe(stsArr[1]);
|
|
}
|
|
|
|
/* renamed from: o.fXf$HBt */
|
|
/* loaded from: classes6.dex */
|
|
static final class HBt<T> extends AtomicInteger implements fSJ {
|
|
final InterfaceC13169fSq<? extends T> a;
|
|
final C13190fTd b;
|
|
final Sts<T>[] c;
|
|
private volatile boolean d;
|
|
final InterfaceC13169fSq<? extends T> e;
|
|
private InterfaceC13174fSv<? super Boolean> f;
|
|
private T g;
|
|
private fSN<? super T, ? super T> i;
|
|
private T j;
|
|
|
|
HBt(InterfaceC13174fSv<? super Boolean> interfaceC13174fSv, int i, InterfaceC13169fSq<? extends T> interfaceC13169fSq, InterfaceC13169fSq<? extends T> interfaceC13169fSq2, fSN<? super T, ? super T> fsn) {
|
|
this.f = interfaceC13174fSv;
|
|
this.a = interfaceC13169fSq;
|
|
this.e = interfaceC13169fSq2;
|
|
this.i = fsn;
|
|
this.c = r1;
|
|
Sts<T>[] stsArr = {new Sts<>(this, 0, i), new Sts<>(this, 1, i)};
|
|
this.b = new C13190fTd();
|
|
}
|
|
|
|
@Override // o.fSJ
|
|
public final void dispose() {
|
|
if (this.d) {
|
|
return;
|
|
}
|
|
this.d = true;
|
|
this.b.dispose();
|
|
if (getAndIncrement() == 0) {
|
|
Sts<T>[] stsArr = this.c;
|
|
stsArr[0].e.e();
|
|
stsArr[1].e.e();
|
|
}
|
|
}
|
|
|
|
final void b() {
|
|
Throwable th;
|
|
Throwable th2;
|
|
if (getAndIncrement() != 0) {
|
|
return;
|
|
}
|
|
Sts<T>[] stsArr = this.c;
|
|
Sts<T> sts = stsArr[0];
|
|
C13416fZs<T> c13416fZs = sts.e;
|
|
Sts<T> sts2 = stsArr[1];
|
|
C13416fZs<T> c13416fZs2 = sts2.e;
|
|
int i = 1;
|
|
while (!this.d) {
|
|
boolean z = sts.a;
|
|
if (z && (th2 = sts.b) != null) {
|
|
this.d = true;
|
|
c13416fZs.e();
|
|
c13416fZs2.e();
|
|
this.f.onError(th2);
|
|
return;
|
|
}
|
|
boolean z2 = sts2.a;
|
|
if (z2 && (th = sts2.b) != null) {
|
|
this.d = true;
|
|
c13416fZs.e();
|
|
c13416fZs2.e();
|
|
this.f.onError(th);
|
|
return;
|
|
}
|
|
if (this.j == null) {
|
|
this.j = c13416fZs.b();
|
|
}
|
|
boolean z3 = this.j == null;
|
|
if (this.g == null) {
|
|
this.g = c13416fZs2.b();
|
|
}
|
|
T t = this.g;
|
|
boolean z4 = t == null;
|
|
if (z && z2 && z3 && z4) {
|
|
this.f.onNext(Boolean.TRUE);
|
|
this.f.onComplete();
|
|
return;
|
|
}
|
|
if (z && z2 && z3 != z4) {
|
|
this.d = true;
|
|
c13416fZs.e();
|
|
c13416fZs2.e();
|
|
this.f.onNext(Boolean.FALSE);
|
|
this.f.onComplete();
|
|
return;
|
|
}
|
|
if (!z3 && !z4) {
|
|
try {
|
|
if (!this.i.d(this.j, t)) {
|
|
this.d = true;
|
|
c13416fZs.e();
|
|
c13416fZs2.e();
|
|
this.f.onNext(Boolean.FALSE);
|
|
this.f.onComplete();
|
|
return;
|
|
}
|
|
this.j = null;
|
|
this.g = null;
|
|
} catch (Throwable th3) {
|
|
C13147fSI.c(th3);
|
|
this.d = true;
|
|
c13416fZs.e();
|
|
c13416fZs2.e();
|
|
this.f.onError(th3);
|
|
return;
|
|
}
|
|
}
|
|
if (z3 || z4) {
|
|
i = addAndGet(-i);
|
|
if (i == 0) {
|
|
return;
|
|
}
|
|
}
|
|
}
|
|
c13416fZs.e();
|
|
c13416fZs2.e();
|
|
}
|
|
|
|
@Override // o.fSJ
|
|
public final boolean isDisposed() {
|
|
return this.d;
|
|
}
|
|
}
|
|
|
|
/* JADX INFO: Access modifiers changed from: package-private */
|
|
/* renamed from: o.fXf$Sts */
|
|
/* loaded from: classes6.dex */
|
|
public static final class Sts<T> implements InterfaceC13174fSv<T> {
|
|
volatile boolean a;
|
|
Throwable b;
|
|
private int c;
|
|
private HBt<T> d;
|
|
final C13416fZs<T> e;
|
|
|
|
Sts(HBt<T> hBt, int i, int i2) {
|
|
this.d = hBt;
|
|
this.c = i;
|
|
this.e = new C13416fZs<>(i2);
|
|
}
|
|
|
|
@Override // o.InterfaceC13174fSv
|
|
public final void onSubscribe(fSJ fsj) {
|
|
HBt<T> hBt = this.d;
|
|
hBt.b.e(this.c, fsj);
|
|
}
|
|
|
|
@Override // o.InterfaceC13174fSv
|
|
public final void onNext(T t) {
|
|
this.e.b(t);
|
|
this.d.b();
|
|
}
|
|
|
|
@Override // o.InterfaceC13174fSv
|
|
public final void onError(Throwable th) {
|
|
this.b = th;
|
|
this.a = true;
|
|
this.d.b();
|
|
}
|
|
|
|
@Override // o.InterfaceC13174fSv
|
|
public final void onComplete() {
|
|
this.a = true;
|
|
this.d.b();
|
|
}
|
|
}
|
|
}
|