package o; import java.util.NoSuchElementException; /* renamed from: o.fTB, reason: case insensitive filesystem */ /* loaded from: classes6.dex */ public final class C13180fTB extends fTC { private T b; private boolean e; public C13180fTB(boolean z, T t) { this.e = z; this.b = t; } @Override // o.InterfaceC13174fSv public final void onNext(T t) { if (this.c != null) { this.c = null; completeExceptionally(new IllegalArgumentException("Sequence contains more than one element!")); } else { this.c = t; } } @Override // o.InterfaceC13174fSv public final void onComplete() { if (isDone()) { return; } T t = this.c; this.c = null; this.a.lazySet(EnumC13192fTf.DISPOSED); if (t != null) { complete(t); } else if (this.e) { complete(this.b); } else { completeExceptionally(new NoSuchElementException()); } } }