See `try_for_loop_heuristic` macro in `llzk_backend/src/shared.rs`. The `Statement` that computes "step" should be at the end of the loop body per: https://github.com/Veridise/circom/blob/79951a4615ab306c43dd1ba8a1c152afe7b2fd07/program_structure/src/abstract_syntax_tree/ast_shortcuts.rs#L40-L50