-- Deep tail-call elimination across all four engines. The VM uses
-- OP_TAILCALL (frame reuse); the Cranelift JIT/AOT backend emits
-- `return_call` with CallConv::Tail so the host stack does not grow.
-- Both self-recursion and mutual tail recursion are exercised.
count-down n:n>n;=n 0 0;count-down -n 1
-- Mutual tail recursion: ev tail-calls od tail-calls ev forever. Exercises
-- OP_TAILCALL's chunk_idx switch on the VM and cross-function `return_call`
-- on Cranelift.
ev n:n>n;=n 0 1;od -n 1
od n:n>n;=n 0 0;ev -n 1
main >n;count-down 200000
ev-200k >n;ev 200000
-- run: main
-- out: 0
-- run: ev-200k
-- out: 1