package o; import java.util.concurrent.atomic.AtomicLong; /* loaded from: classes.dex */ public final class fUC extends AbstractC13240fUs implements fSQ { private fSQ d; @Override // o.fSQ public final void c(T t) { } public fUC(AbstractC13155fSc abstractC13155fSc) { super(abstractC13155fSc); this.d = this; } @Override // o.AbstractC13155fSc public final void c(InterfaceC15338gnn interfaceC15338gnn) { this.e.a((InterfaceC13158fSf) new HBt(interfaceC15338gnn, this.d)); } /* loaded from: classes6.dex */ static final class HBt extends AtomicLong implements InterfaceC13158fSf, InterfaceC15337gnm { private fSQ a; private boolean c; private InterfaceC15338gnn d; private InterfaceC15337gnm e; HBt(InterfaceC15338gnn interfaceC15338gnn, fSQ fsq) { this.d = interfaceC15338gnn; this.a = fsq; } @Override // o.InterfaceC13158fSf, o.InterfaceC15338gnn public final void c(InterfaceC15337gnm interfaceC15337gnm) { if (fYC.e(this.e, interfaceC15337gnm)) { this.e = interfaceC15337gnm; this.d.c(this); interfaceC15337gnm.c(Long.MAX_VALUE); } } @Override // o.InterfaceC15338gnn public final void onNext(T t) { if (this.c) { return; } if (get() != 0) { this.d.onNext(t); fYK.b(this, 1L); return; } try { this.a.c(t); } catch (Throwable th) { C13147fSI.c(th); this.e.a(); onError(th); } } @Override // o.InterfaceC15338gnn public final void onError(Throwable th) { if (this.c) { C13418fZu.c(th); } else { this.c = true; this.d.onError(th); } } @Override // o.InterfaceC15338gnn public final void onComplete() { if (this.c) { return; } this.c = true; this.d.onComplete(); } @Override // o.InterfaceC15337gnm public final void c(long j) { if (fYC.e(j)) { fYK.c(this, j); } } @Override // o.InterfaceC15337gnm public final void a() { this.e.a(); } } }