package o; import java.util.Objects; import java.util.concurrent.atomic.AtomicReference; /* loaded from: classes6.dex */ public final class fWL extends fUX { private fSS, ? extends InterfaceC13169fSq> a; public fWL(InterfaceC13169fSq interfaceC13169fSq, fSS, ? extends InterfaceC13169fSq> fss) { super(interfaceC13169fSq); this.a = fss; } @Override // o.AbstractC13163fSk public final void subscribeActual(InterfaceC13174fSv interfaceC13174fSv) { C13389fZA d = C13389fZA.d(); try { InterfaceC13169fSq interfaceC13169fSq = (InterfaceC13169fSq) Objects.requireNonNull(this.a.a(d), "The selector returned a null ObservableSource"); Sts sts = new Sts(interfaceC13174fSv); interfaceC13169fSq.subscribe(sts); this.c.subscribe(new RVV(d, sts)); } catch (Throwable th) { C13147fSI.c(th); EnumC13195fTi.a(th, interfaceC13174fSv); } } /* loaded from: classes6.dex */ static final class RVV implements InterfaceC13174fSv { private AtomicReference a; private C13389fZA c; RVV(C13389fZA c13389fZA, AtomicReference atomicReference) { this.c = c13389fZA; this.a = atomicReference; } @Override // o.InterfaceC13174fSv public final void onSubscribe(fSJ fsj) { EnumC13192fTf.a(this.a, fsj); } @Override // o.InterfaceC13174fSv public final void onNext(T t) { this.c.onNext(t); } @Override // o.InterfaceC13174fSv public final void onError(Throwable th) { this.c.onError(th); } @Override // o.InterfaceC13174fSv public final void onComplete() { this.c.onComplete(); } } /* loaded from: classes6.dex */ static final class Sts extends AtomicReference implements InterfaceC13174fSv, fSJ { private InterfaceC13174fSv a; private fSJ b; Sts(InterfaceC13174fSv interfaceC13174fSv) { this.a = interfaceC13174fSv; } @Override // o.InterfaceC13174fSv public final void onSubscribe(fSJ fsj) { if (EnumC13192fTf.d(this.b, fsj)) { this.b = fsj; this.a.onSubscribe(this); } } @Override // o.InterfaceC13174fSv public final void onNext(R r) { this.a.onNext(r); } @Override // o.InterfaceC13174fSv public final void onError(Throwable th) { EnumC13192fTf.e(this); this.a.onError(th); } @Override // o.InterfaceC13174fSv public final void onComplete() { EnumC13192fTf.e(this); this.a.onComplete(); } @Override // o.fSJ public final void dispose() { this.b.dispose(); EnumC13192fTf.e(this); } @Override // o.fSJ public final boolean isDisposed() { return this.b.isDisposed(); } } }