I've been doing some painstaking decompiling by hand and I've had some good ideas for
natural simplifications that we can make and be certain that these are 'the right thing to do'. But ultimately I'm reasonably convinced that the code they wrote used some labels (a lot less than the GE-editor's code.. or more since the GE-editor only uses 'return value loops'

).
A good example is this code, which is the remaining 'bad' control flow after I did a lot of work on a script. The natural thing to do is to make the whole thing into a
top loop with the
main loop nested in it. The only way to do this is to have a "if not A and not B and cycle counter <= X" test at the end of the
main loop, and then re-test each of these to determine whether to do the routine / sleep / do nothing before reaching the end of the
top loop, which surely isn't what they wrote.
Label TopReset Cycle Counter And Enable It
[...]
Label MainSleep
if A then
Label Routine [...]
if A then
Sleep
goto
Routine end
goto
Topif B then
Sleep
goto
Topif cycle counter > X then
goto
Topelse
goto
MainCan anyone see a nice version of this code?