package o; import java.util.Objects; import java.util.function.BiConsumer; import java.util.function.Function; import java.util.stream.Collector; /* renamed from: o.fTq, reason: case insensitive filesystem */ /* loaded from: classes6.dex */ public final class C13203fTq extends AbstractC13175fSw implements InterfaceC13204fTr { private AbstractC13163fSk b; private Collector c; public C13203fTq(AbstractC13163fSk abstractC13163fSk, Collector collector) { this.b = abstractC13163fSk; this.c = collector; } @Override // o.InterfaceC13204fTr public final AbstractC13163fSk b() { return new C13201fTo(this.b, this.c); } @Override // o.AbstractC13175fSw public final void e(InterfaceC13176fSx interfaceC13176fSx) { try { this.b.subscribe(new RVV(interfaceC13176fSx, this.c.supplier().get(), this.c.accumulator(), this.c.finisher())); } catch (Throwable th) { C13147fSI.c(th); EnumC13195fTi.c(th, interfaceC13176fSx); } } /* renamed from: o.fTq$RVV */ /* loaded from: classes6.dex */ static final class RVV implements InterfaceC13174fSv, fSJ { private A a; private BiConsumer b; private InterfaceC13176fSx c; private boolean d; private Function e; private fSJ g; RVV(InterfaceC13176fSx interfaceC13176fSx, A a, BiConsumer biConsumer, Function function) { this.c = interfaceC13176fSx; this.a = a; this.b = biConsumer; this.e = function; } @Override // o.InterfaceC13174fSv public final void onSubscribe(fSJ fsj) { if (EnumC13192fTf.d(this.g, fsj)) { this.g = fsj; this.c.onSubscribe(this); } } @Override // o.InterfaceC13174fSv public final void onNext(T t) { if (this.d) { return; } try { this.b.accept(this.a, t); } catch (Throwable th) { C13147fSI.c(th); this.g.dispose(); onError(th); } } @Override // o.InterfaceC13174fSv public final void onError(Throwable th) { if (this.d) { C13418fZu.c(th); return; } this.d = true; this.g = EnumC13192fTf.DISPOSED; this.a = null; this.c.onError(th); } @Override // o.InterfaceC13174fSv public final void onComplete() { if (this.d) { return; } this.d = true; this.g = EnumC13192fTf.DISPOSED; A a = this.a; this.a = null; try { this.c.e(Objects.requireNonNull(this.e.apply(a), "The finisher returned a null value")); } catch (Throwable th) { C13147fSI.c(th); this.c.onError(th); } } @Override // o.fSJ public final void dispose() { this.g.dispose(); this.g = EnumC13192fTf.DISPOSED; } @Override // o.fSJ public final boolean isDisposed() { return this.g == EnumC13192fTf.DISPOSED; } } }