Judging by the files and their contents, this is actually a hardcoded gate-level simulator, which is very different in structure from the traditional loop-with-a-switch emulation that most people are probably expecting.
Advice for the author: if you use a netlist-based abstraction instead of hardcoding the circuit in code, you will be able to simplify the code, and make it much easier to modify and inspect.
Advice for the author: if you use a netlist-based abstraction instead of hardcoding the circuit in code, you will be able to simplify the code, and make it much easier to modify and inspect.