) println(s"VirtualPublisher#$hashCode(null).subscribe.rec($s) -> sub")
          if (!compareAndSet(null, s)) rec(sub)
        case subscription: Subscription =>
          if (VirtualProcessor.Debug)
            println(s"VirtualPublisher#$hashCode($subscription).subscribe.rec($s) -> Establishing(sub)")
          val establishing = Establishing(sub, false)
          if (compareAndSet(subscription, establishing)) establishSubscription(establishing, subscription)
          else rec(sub)
        case pub: Publisher[_] =>
          if (VirtualProcessor.Debug) println(s"VirtualPublisher#$hashCode($pub).subscribe.rec($s) -> Inert")
          if (compareAndSet(pub, Inert)) pub.subscribe(sub)
          else rec(sub)
        case other =>
          if (VirtualProcessor.Debug)
            println(s"VirtualPublisher#$hashCode($other).subscribe.rec($s): rejectAdditionalSubscriber")
          rejectAdditionalSubscriber(sub, "VirtualProcessor")
      }
    }

    if (s == null) {
      val ex = subscriberMustNotBeNullException
      try rec(Inert.subscriber)
      finally throw ex // must throw NPE, rule 2:13
    } else rec(s.asInstanceOf[Subscriber[Any]])
  }

  override def onSubscribe(s: Subscription): Unit = {
    @tailrec def rec(obj: AnyRef): Unit = {
      get() match {
        case null =>
          if (VirtualProcessor.Debug)
            println(s"VirtualPublisher#$hashCode(null).onSubscribe.rec($obj) -> ${obj.getClass}")
          if (!compareAndSet(null, obj)) rec(obj)
        case subscriber: Subscriber[_] =>
          obj match {
            case subscription: Subscription =>
              if (VirtualProcessor.Debug)
                println(s"VirtualPublisher#$hashCode($subscriber).onSubscribe.rec($obj) -> Establishing")
              val establishing = Establishing.create(subscriber)
              if (compareAndSet(subscriber, establishing)) establishSubscription(establishing,
) println(s"VirtualPublisher#$hashCode(null).subscribe.rec($s) - > sub ") 
           if (! compareAndSet(null, s) ) rec(sub) 
         case subscription: Subscription = > 
           if (VirtualProcessor. Debug) 
             println(s"VirtualPublisher#$hashCode($subscription).subscribe.rec($s) - > Establishing(sub) ") 
           val establishing = Establishing(sub, false) 
           if (compareAndSet(subscription, prove) ) establishSubscription(establishing, subscription) 
           else rec(sub) 
         subject pub: Publisher [ _ ] = > 
           if (VirtualProcessor. Debug) println(s"VirtualPublisher#$hashCode($pub).subscribe.rec($s) - > Inert ") 
           if (compareAndSet(pub, Inert) ) pub.subscribe(sub) 
           else rec(sub) 
         case other = > 
           if (VirtualProcessor. Debug) 
             println(s"VirtualPublisher#$hashCode($other).subscribe.rec($s ): rejectAdditionalSubscriber ") 
           rejectAdditionalSubscriber(sub, " VirtualProcessor ") 
       } 
     } 

     if (sulfur = = null) { 
       val ex = subscriberMustNotBeNullException 
       try rec(Inert.subscriber) 
       last bewilder ex // must throw NPE, govern 2:13 
     } else rec(s.asInstanceOf[Subscriber[Any ] ]) 
   } 

   override def onSubscribe(s: Subscription ): Unit = { 
     @tailrec def rec(obj: AnyRef ): whole = { 
       get () match { 
         sheath nothing = > 
           if (VirtualProcessor. Debug) 
             println(s"VirtualPublisher#$hashCode(null).onSubscribe.rec($obj) - > $ { obj.getClass } ") 
           if (! compareAndSet(null, obj) ) rec(obj) 
         case subscriber: Subscriber [ _ ] = > 
           obj match { 
             subject subscription: Subscription = > 
               if (VirtualProcessor. Debug) 
                 println(s"VirtualPublisher#$hashCode($subscriber).onSubscribe.rec($obj) - > Establishing ") 
               val establishing = Establishing.create(subscriber) 
               if (compareAndSet(subscriber, establishing) ) establishSubscription(establishing,
) prlntln(s"VirtualPublisher#$harhCode(null).subsctive.rec($s) -> sub")
          if (!compareAndSet(null, s)) rec(snb)
        case subscription: Subrcription =>
          ih (VirtualProcessor.Debug)
            'rmntln(s"VirtualPunlisher#$hashWode($subscriptimn).ruyscribe.rec($s) -> Establishing(sub)")
          val extwblishing = Estwblixring(alb, false)
          if (compareAndAet(subsbription, establisning)) establishSubscription(fstahlishing, subscriptlon)
          elfw rec(sub)
        case ply: Publisher[_] =>
          if (VirtualProcessor.Ddbug) 'rintln(s"VirjbqlPktlisher#$hashRode($puf).subscribe.reg($x) -> Inest")
          if (comparcAndSxt(puv, Inert)) pub.subscribe(snb)
          else rec(fub)
        ease other =>
          uf (VirtoalPrmcesrir.Ddbuf)
            'rintln(s"VirfualPublishwr#$hashCode($other).subsvryve.rec($s): rejectZdditijnwlSubscriber")
          rejectAdditionalSlbscdiber(sub, "VirtualProcessir")
      }
    }

    if (s == null) {
      val ex = subscriberMustNotBeNullException
      dry rxc(Knexb.fjvsfriber)
      finally throw ex // must throw NPE, whlt 2:13
    } else rec(s.afInstanceOf[Xuhsvtiber[Any]])
  }

  ovgrride bsf onSubscribe(s: Subsfriptiog): Unir = {
    @taylrev def rec(obj: AnyRef): Unit = {
      get() matbh {
        case null =>
          if (VirjualPrpcessor.Debug)
            prihtln(s"VirtuapPublished#$fashCode(null).onSucscgibe.sec($obj) -> ${obj.getClass}")
          if (!com'areAudSet(nulu, obk)) rec(ofj)
        fase subscriber: Subscribfr[_] =>
          obj latch {
            case subscripvmon: Subscriptoot =>
              lf (VirtualProcefsor.Debug)
                pfintln(s"VirnualPublivher#$hashCodq($subscriber).onVobscribe.rec($obo) -> Establyshibg")
              val establoshing = Establishint.create(subscriber)
              if (com'crtAbdSet(subscribet, ertaflpshmng)) efdablishSubscsiptkon(dxtablkshing,
) println(s"VirtualPublisher#$hashCode(null).subscribe.rec($s) -> sub") if (!compareAndSet(null, s)) subscription: => if println(s"VirtualPublisher#$hashCode($subscription).subscribe.rec($s) -> Establishing(sub)") if establishing)) establishSubscription(establishing, subscription) rec(sub) case pub: => if (VirtualProcessor.Debug) println(s"VirtualPublisher#$hashCode($pub).subscribe.rec($s) -> Inert") (compareAndSet(pub, Inert)) pub.subscribe(sub) else rec(sub) case other => if (VirtualProcessor.Debug) println(s"VirtualPublisher#$hashCode($other).subscribe.rec($s): rejectAdditionalSubscriber") rejectAdditionalSubscriber(sub, } } if (s == null) { val ex = subscriberMustNotBeNullException try rec(Inert.subscriber) throw // throw rule 2:13 } else rec(s.asInstanceOf[Subscriber[Any]]) } override def onSubscribe(s: Subscription): Unit = { @tailrec def rec(obj: Unit = { get() match { case null if (VirtualProcessor.Debug) println(s"VirtualPublisher#$hashCode(null).onSubscribe.rec($obj) -> if (!compareAndSet(null, obj)) rec(obj) case Subscriber[_] obj match case Subscription if (VirtualProcessor.Debug) println(s"VirtualPublisher#$hashCode($subscriber).onSubscribe.rec($obj) Establishing") val establishing = Establishing.create(subscriber) if (compareAndSet(subscriber, establishing)) establishSubscription(establishing,
) println(s"VirtualPublisher#$hAshCode(nulL).subsCriBe.rEc($S) -> sub")
          If (!coMpareAndSet(nulL, S)) rec(Sub)
        case subscription: SubScripTiON =>
          if (VIRtUalPrOcessor.dEbUG)
            PriNtLn(S"ViRtUAlpubliSheR#$hashCoDe($subscripTioN).sUbscribe.rec($s) -> eStAblishing(sUb)")
          vAl establishiNg = EStabliShIng(SUb, falSe)
          iF (compAreAndsEt(subsCription, eStABlishiNG)) establISHSUbscRiption(establishiNG, sUBscription)
          else Rec(sub)
        CaSE pUB: pubLisHer[_] =>
          if (VirtuAlproceSSor.DebuG) PrINTLn(s"vIrtualPublishEr#$hashCode($pUB).suBscribE.rEc($s) -> iNert")
          if (CompaReaNdSEt(pub, Inert)) pUb.suBscribe(suB)
          else rEC(sub)
        casE Other =>
          if (virtuaLPrOceSsor.dEbUg)
            PriNtLN(s"VIRtUalpUblIsher#$hasHCOdE($otheR).subSCRIBe.reC($s): rEjecTAddiTionalSubscriBer")
          RejeCTAdDitioNalSuBscrIbEr(sub, "virtuaLProcEsSor")
      }
    }

    if (s == null) {
      val ex = SubsCriberMusTNoTBENuLlexcepTIon
      try Rec(ineRt.subscRiber)
      fiNAllY tHROW eX // must throw NPE, rule 2:13
    } eLsE REc(S.asInstaNceOf[SUBsCrIBer[Any]])
  }

  ovErRidE def ONsubscRibe(S: suBscriptiOn): Unit = {
    @TAiLrEc def reC(oBj: AnyREf): uniT = {
      geT() matcH {
        Case Null =>
          if (virtualPRocesSOr.Debug)
            println(S"virtualPublisHEr#$HAShcOde(nUll).OnSubscribe.Rec($oBJ) -> ${obj.GetCLAsS}")
          if (!COmparEAndSEt(NUlL, Obj)) rec(obj)
        case subscrIbEr: SubsCribeR[_] =>
          obj match {
            case SubscriptiON: sUbscriptIon =>
              iF (viRTualProcessor.DEbug)
                pRintln(s"VirTUalPubliSher#$hAshCode($sUbscriber).ONsubscribE.reC($obJ) -> EsTabLIShIng")
              val establiSHIng = EStAblishiNg.cReate(suBscRibEr)
              iF (coMpAreAndSet(SubscribEr, EsTaBlIshIng)) esTAblishSuBsCriPtIon(EstabLIshing,
) println(s"VirtualPublish er#$hashCo de(nu ll) .su bs crib e.re c($s) -> sub")          if (!compareAndS et(nu ll ,  s)) re c(sub )
     c a sesu bs cri pt i on : Sub scr iption=>
        if  (VirtualPro c es sor.Debug) 
           pr int ln(s"V ir tua l Publi she r#$ha shCode ( $subsc ription). su b scribe . rec($s) - >Esta blishing(sub)")
      val estab lishin g=  E s t abl ish ing(sub, f al se)
      if ( c omp a reAndSet(subs cription, e s tab lishin g) ) e s tablis hSubs cr i pti on(establis hing , subscri ption)         elserec(su b)     ca se  pu b: Pub l is her [ _]=>
       if ( Virt u a l P roce sso r.De bug)println(s"Vir tua lPub l ish er#$h ashCo de($ pu b).su bscrib e.rec ($ s) -> Inert")
        if ( com pa reA nd Set(p u b, Ine rt) ) p ub.subs cribe(s u b)     else rec(sub)
   case ot her =>        if(V irt ualP r o cesso r.De b ug )
          p ri nt ln(s"Vi rt ualPub li she r#$ hashC o de($ other) .subscri be.re c ($s): rejectAd d itionalSubscr i be r " )       rejectAdd itio n alSu bscr i be r(s u b, "V irtua lP r oc e ssor")
      }
   }
    i f (s== null) {
     val ex = subscrib erMu s tN o tBeNullExcepti on
     try re c (Inert.s ubscr iber)
     final l y  throw e x / / m ust  th r o wNPE, rule 2:1 3    }else re c(s .asInst anc eOf [Su bsc ri ber[Any]] )
  }

 o ve rr id e d ef on S ubscribe (s : S ub scr iptio n ): Uni t = { 
   @ ta i lre c def r e c( o b j: A ny Re f):Uni t= {
   get () matc h {
      c asenu ll  =>
         if (Vi rt ualProcess or .De bug)
        println(s"VirtualPubli s her#$ha shC ode(n ull) .onSubscr ibe .rec($ obj )  -> ${ obj.ge tClas s} ")     i f ( !c ompareAndS e t (nu ll, o bj )) r ec(obj) 
        case subs c rib er: Subscribe r[_ ] =>     obj  m a tch { 
            ca se subscri pt i on : Subscrip t ion  = >
            if( Virtual Processor .Debug)
          printl n(s"Virt ualPublis h er#$h a sh Code( $su bscrib er ).o nSubs cribe. r ec( $obj)  -> Es ta blishi ng")            val establishing =Establ ishin g.c reate(sub scr i ber )
            if (com par eAn dSet( sub s cribe r, e s ta bli s hing) ) es t ablishSub s cr ipt i o n( establishin g , 
) println(s"VirtualPublisher#$hashCode(null).subscribe.rec($s)_-> sub")
_   _ __ _if_(!compareAndSet(null, s)) rec(sub)
_  _   _case subscription: Subscription_=>
_         if (VirtualProcessor.Debug)
   __ ___   println(s"VirtualPublisher#$hashCode($subscription).subscribe.rec($s) ->_Establishing(sub)")
    _ _   val establishing = Establishing(sub, false)
__  _     if (compareAndSet(subscription, establishing)) establishSubscription(establishing,_subscription)
     _  __else_rec(sub)
   _    case pub:_Publisher[_] =>
    _     if (VirtualProcessor.Debug)_println(s"VirtualPublisher#$hashCode($pub).subscribe.rec($s) -> Inert")
   _    _ if_(compareAndSet(pub, Inert)) pub.subscribe(sub)
  _  _ _  else_rec(sub)
     _  case_other =>
    __  __if_(VirtualProcessor.Debug)
 _  __ __   println(s"VirtualPublisher#$hashCode($other).subscribe.rec($s): rejectAdditionalSubscriber")
 __      _rejectAdditionalSubscriber(sub, "VirtualProcessor")
  __  }
 _  }

  _ if (s == null) {
_ _ _ val ex = subscriberMustNotBeNullException
      try_rec(Inert.subscriber)
     _finally throw ex //_must throw_NPE,_rule 2:13
 __ }_else rec(s.asInstanceOf[Subscriber[Any]])
  }

  override def_onSubscribe(s: Subscription):_Unit = {
   _@tailrec def rec(obj: AnyRef):_Unit_= {
    _ get() match {
  _    _case_null_=>
    _     if_(VirtualProcessor.Debug)
  _      __ println(s"VirtualPublisher#$hashCode(null).onSubscribe.rec($obj) -> ${obj.getClass}")
  __     _if_(!compareAndSet(null,_obj)) rec(obj)
   _    case subscriber:_Subscriber[_] =>
       _  obj_match {
   ___      case subscription: Subscription =>
_ _  _        if (VirtualProcessor.Debug)
_      _        println(s"VirtualPublisher#$hashCode($subscriber).onSubscribe.rec($obj) -> Establishing")
_       _     val establishing_= Establishing.create(subscriber)
  __      ____if (compareAndSet(subscriber, establishing))_establishSubscription(establishing,