package o; import io.reactivex.rxjava3.exceptions.MissingBackpressureException; import java.util.concurrent.atomic.AtomicLong; /* loaded from: classes.dex */ public final class fUG extends AbstractC13240fUs { public fUG(AbstractC13155fSc abstractC13155fSc) { super(abstractC13155fSc); } @Override // o.AbstractC13155fSc public final void c(InterfaceC15338gnn interfaceC15338gnn) { this.e.a((InterfaceC13158fSf) new LWm(interfaceC15338gnn)); } /* loaded from: classes6.dex */ static final class LWm extends AtomicLong implements InterfaceC13158fSf, InterfaceC15337gnm { private InterfaceC15337gnm a; private boolean b; private InterfaceC15338gnn e; LWm(InterfaceC15338gnn interfaceC15338gnn) { this.e = interfaceC15338gnn; } @Override // o.InterfaceC13158fSf, o.InterfaceC15338gnn public final void c(InterfaceC15337gnm interfaceC15337gnm) { if (fYC.e(this.a, interfaceC15337gnm)) { this.a = interfaceC15337gnm; this.e.c(this); interfaceC15337gnm.c(Long.MAX_VALUE); } } @Override // o.InterfaceC15338gnn public final void onNext(T t) { if (this.b) { return; } if (get() != 0) { this.e.onNext(t); fYK.b(this, 1L); } else { this.a.a(); onError(MissingBackpressureException.e()); } } @Override // o.InterfaceC15338gnn public final void onError(Throwable th) { if (this.b) { C13418fZu.c(th); } else { this.b = true; this.e.onError(th); } } @Override // o.InterfaceC15338gnn public final void onComplete() { if (this.b) { return; } this.b = true; this.e.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.a.a(); } } }