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