package o; import java.util.NoSuchElementException; /* renamed from: o.fWz, reason: case insensitive filesystem */ /* loaded from: classes6.dex */ public final class C13317fWz extends AbstractC13175fSw { private T a; private InterfaceC13169fSq b; public C13317fWz(InterfaceC13169fSq interfaceC13169fSq, T t) { this.b = interfaceC13169fSq; this.a = t; } @Override // o.AbstractC13175fSw public final void e(InterfaceC13176fSx interfaceC13176fSx) { this.b.subscribe(new LWm(interfaceC13176fSx, this.a)); } /* renamed from: o.fWz$LWm */ /* loaded from: classes6.dex */ static final class LWm implements InterfaceC13174fSv, fSJ { private fSJ a; private InterfaceC13176fSx b; private T c; private T e; LWm(InterfaceC13176fSx interfaceC13176fSx, T t) { this.b = interfaceC13176fSx; this.e = t; } @Override // o.fSJ public final void dispose() { this.a.dispose(); this.a = EnumC13192fTf.DISPOSED; } @Override // o.fSJ public final boolean isDisposed() { return this.a == EnumC13192fTf.DISPOSED; } @Override // o.InterfaceC13174fSv public final void onSubscribe(fSJ fsj) { if (EnumC13192fTf.d(this.a, fsj)) { this.a = fsj; this.b.onSubscribe(this); } } @Override // o.InterfaceC13174fSv public final void onError(Throwable th) { this.a = EnumC13192fTf.DISPOSED; this.c = null; this.b.onError(th); } @Override // o.InterfaceC13174fSv public final void onComplete() { this.a = EnumC13192fTf.DISPOSED; T t = this.c; if (t != null) { this.c = null; this.b.e(t); return; } T t2 = this.e; if (t2 != null) { this.b.e(t2); } else { this.b.onError(new NoSuchElementException()); } } @Override // o.InterfaceC13174fSv public final void onNext(T t) { this.c = t; } } }