@whitequark @aleksorsist @urja Exactly what I was getting at. It's solvable, but not trivial.
You'll probably need multiple replicated copies of the logic and some speculation or replication to handle multiple cases in parallel then figure out what happened the next cycle or something.