package o; /* renamed from: o.fWi, reason: case insensitive filesystem */ /* loaded from: classes6.dex */ public final class C13300fWi extends AbstractC13163fSk { private InterfaceC13189fTc a; private fSL, S> c; private fSQ d; public C13300fWi(InterfaceC13189fTc interfaceC13189fTc, fSL, S> fsl, fSQ fsq) { this.a = interfaceC13189fTc; this.c = fsl; this.d = fsq; } @Override // o.AbstractC13163fSk public final void subscribeActual(InterfaceC13174fSv 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> 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 implements InterfaceC13156fSd, fSJ { final fSL, S> a; volatile boolean b; final fSQ c; S d; boolean e; private InterfaceC13174fSv h; boolean i; RVV(InterfaceC13174fSv interfaceC13174fSv, fSL, S> fsl, fSQ 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; } } }