package o; import java.util.Objects; import java.util.concurrent.atomic.AtomicReference; /* loaded from: classes6.dex */ public final class fXP extends fUX { private fSL a; private InterfaceC13169fSq b; public fXP(InterfaceC13169fSq interfaceC13169fSq, fSL fsl, InterfaceC13169fSq interfaceC13169fSq2) { super(interfaceC13169fSq); this.a = fsl; this.b = interfaceC13169fSq2; } @Override // o.AbstractC13163fSk public final void subscribeActual(InterfaceC13174fSv interfaceC13174fSv) { C13406fZi c13406fZi = new C13406fZi(interfaceC13174fSv); LWm lWm = new LWm(c13406fZi, this.a); c13406fZi.onSubscribe(lWm); this.b.subscribe(new HBt(this, lWm)); this.c.subscribe(lWm); } /* loaded from: classes6.dex */ static final class LWm extends AtomicReference implements InterfaceC13174fSv, fSJ { final AtomicReference a = new AtomicReference<>(); final AtomicReference c = new AtomicReference<>(); private fSL d; final InterfaceC13174fSv e; LWm(InterfaceC13174fSv interfaceC13174fSv, fSL fsl) { this.e = interfaceC13174fSv; this.d = fsl; } @Override // o.InterfaceC13174fSv public final void onSubscribe(fSJ fsj) { EnumC13192fTf.a(this.a, fsj); } @Override // o.InterfaceC13174fSv public final void onNext(T t) { U u = get(); if (u != null) { try { this.e.onNext(Objects.requireNonNull(this.d.e(t, u), "The combiner returned a null value")); } catch (Throwable th) { C13147fSI.c(th); dispose(); this.e.onError(th); } } } @Override // o.InterfaceC13174fSv public final void onError(Throwable th) { EnumC13192fTf.e(this.c); this.e.onError(th); } @Override // o.InterfaceC13174fSv public final void onComplete() { EnumC13192fTf.e(this.c); this.e.onComplete(); } @Override // o.fSJ public final void dispose() { EnumC13192fTf.e(this.a); EnumC13192fTf.e(this.c); } @Override // o.fSJ public final boolean isDisposed() { return EnumC13192fTf.c(this.a.get()); } } /* loaded from: classes6.dex */ final class HBt implements InterfaceC13174fSv { private final LWm a; private fXP b; @Override // o.InterfaceC13174fSv public final void onComplete() { } HBt(fXP fxp, LWm lWm) { this.b = fxp; this.a = lWm; } @Override // o.InterfaceC13174fSv public final void onSubscribe(fSJ fsj) { EnumC13192fTf.a(this.a.c, fsj); } @Override // o.InterfaceC13174fSv public final void onNext(U u) { this.a.lazySet(u); } @Override // o.InterfaceC13174fSv public final void onError(Throwable th) { LWm lWm = this.a; EnumC13192fTf.e(lWm.a); lWm.e.onError(th); } } }