package o; import java.util.concurrent.atomic.AtomicReference; /* renamed from: o.fTX, reason: case insensitive filesystem */ /* loaded from: classes6.dex */ public final class C13186fTX extends AtomicReference implements InterfaceC13174fSv, fSJ { public volatile boolean a; public InterfaceC13414fZq b; private int c; private int d; private fTW e; public C13186fTX(fTW ftw, int i) { this.e = ftw; this.d = i; } @Override // o.InterfaceC13174fSv public final void onSubscribe(fSJ fsj) { InterfaceC13414fZq c13415fZr; if (EnumC13192fTf.a(this, fsj)) { if (fsj instanceof InterfaceC13412fZo) { InterfaceC13412fZo interfaceC13412fZo = (InterfaceC13412fZo) fsj; int b = interfaceC13412fZo.b(3); if (b == 1) { this.c = b; this.b = interfaceC13412fZo; this.a = true; this.e.d(this); return; } if (b == 2) { this.c = b; this.b = interfaceC13412fZo; return; } } int i = -this.d; if (i < 0) { c13415fZr = new C13416fZs<>(-i); } else { c13415fZr = new C13415fZr<>(i); } this.b = c13415fZr; } } @Override // o.InterfaceC13174fSv public final void onNext(T t) { if (this.c == 0) { this.e.d(this, t); } else { this.e.d(); } } @Override // o.InterfaceC13174fSv public final void onError(Throwable th) { this.e.c(this, th); } @Override // o.InterfaceC13174fSv public final void onComplete() { this.e.d(this); } @Override // o.fSJ public final void dispose() { EnumC13192fTf.e(this); } @Override // o.fSJ public final boolean isDisposed() { return EnumC13192fTf.c(get()); } }