;;; TOOL: run-interp
(module
  (func (export "call") (result i32)
    i32.const 1
    i64.const 2
    f32.const 3
    f64.const 4
    call $helper)

  (func $helper (param i32 i64 f32 f64) (result i32)
    local.get 1
    i32.wrap_i64
    local.get 0
    i32.add
    local.get 2
    i32.trunc_f32_s
    i32.add
    local.get 3
    i32.trunc_f64_s
    i32.add
    return)

  (func (export "fac10") (result i32)
    i32.const 10
    call $fac)


  (func $fac (param i32) (result i32)
    local.get 0
    i32.const 0
    i32.gt_s 
    if (result i32)
      local.get 0
      local.get 0
      i32.const 1
      i32.sub
      call $fac
      i32.mul
      return
    else
      i32.const 1
      return
    end) 
)
(;; STDOUT ;;;
call() => i32:10
fac10() => i32:3628800
;;; STDOUT ;;)
