#### Factorial in Voodoo

section data

format:
string "%d\n\x00"

section functions
import printf
export main

fact:
function n
  ifle n 0
    return 1
  end if
  let m sub n 1
  set m call fact m
  return mul n m
end function

main:
function argc argv
  let n call fact 12
  call printf format n
  return 0
end function
