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

144 lines
4.5 KiB
Java

package o;
/* renamed from: o.fWi, reason: case insensitive filesystem */
/* loaded from: classes6.dex */
public final class C13300fWi<T, S> extends AbstractC13163fSk<T> {
private InterfaceC13189fTc<S> a;
private fSL<S, InterfaceC13156fSd<T>, S> c;
private fSQ<? super S> d;
public C13300fWi(InterfaceC13189fTc<S> interfaceC13189fTc, fSL<S, InterfaceC13156fSd<T>, S> fsl, fSQ<? super S> fsq) {
this.a = interfaceC13189fTc;
this.c = fsl;
this.d = fsq;
}
@Override // o.AbstractC13163fSk
public final void subscribeActual(InterfaceC13174fSv<? super T> interfaceC13174fSv) {
try {
RVV rvv = new RVV(interfaceC13174fSv, this.c, this.d, this.a.d());
interfaceC13174fSv.onSubscribe(rvv);
S s = rvv.d;
if (!rvv.b) {
fSL<S, ? super InterfaceC13156fSd<T>, S> fsl = rvv.a;
while (!rvv.b) {
rvv.e = false;
try {
s = fsl.e(s, rvv);
if (rvv.i) {
rvv.b = true;
rvv.d = null;
try {
rvv.c.c(s);
return;
} catch (Throwable th) {
C13147fSI.c(th);
C13418fZu.c(th);
return;
}
}
} catch (Throwable th2) {
C13147fSI.c(th2);
rvv.d = null;
rvv.b = true;
rvv.c(th2);
try {
rvv.c.c(s);
return;
} catch (Throwable th3) {
C13147fSI.c(th3);
C13418fZu.c(th3);
return;
}
}
}
rvv.d = null;
try {
rvv.c.c(s);
return;
} catch (Throwable th4) {
C13147fSI.c(th4);
C13418fZu.c(th4);
return;
}
}
rvv.d = null;
try {
rvv.c.c(s);
} catch (Throwable th5) {
C13147fSI.c(th5);
C13418fZu.c(th5);
}
} catch (Throwable th6) {
C13147fSI.c(th6);
EnumC13195fTi.a(th6, interfaceC13174fSv);
}
}
/* renamed from: o.fWi$RVV */
/* loaded from: classes6.dex */
static final class RVV<T, S> implements InterfaceC13156fSd<T>, fSJ {
final fSL<S, ? super InterfaceC13156fSd<T>, S> a;
volatile boolean b;
final fSQ<? super S> c;
S d;
boolean e;
private InterfaceC13174fSv<? super T> h;
boolean i;
RVV(InterfaceC13174fSv<? super T> interfaceC13174fSv, fSL<S, ? super InterfaceC13156fSd<T>, S> fsl, fSQ<? super S> fsq, S s) {
this.h = interfaceC13174fSv;
this.a = fsl;
this.c = fsq;
this.d = s;
}
@Override // o.InterfaceC13156fSd
public final void e(T t) {
if (this.i) {
return;
}
if (this.e) {
c(new IllegalStateException("onNext already called in this generate turn"));
} else if (t == null) {
c(fYR.c("onNext called with a null value."));
} else {
this.e = true;
this.h.onNext(t);
}
}
@Override // o.InterfaceC13156fSd
public final void c(Throwable th) {
if (this.i) {
C13418fZu.c(th);
return;
}
if (th == null) {
th = fYR.c("onError called with a null Throwable.");
}
this.i = true;
this.h.onError(th);
}
@Override // o.InterfaceC13156fSd
public final void c() {
if (this.i) {
return;
}
this.i = true;
this.h.onComplete();
}
@Override // o.fSJ
public final boolean isDisposed() {
return this.b;
}
@Override // o.fSJ
public final void dispose() {
this.b = true;
}
}
}