#### Test tail calls

section data

section functions
import puts
export main

tailtest:
function n
  ifne 0 n
    set n sub n 1
    tail-call tailtest n
  else
    return 0
  end if
end function

main:
function argc argv
  call tailtest 1000000000
  return 0
end function
