;;; TOOL: run-interp ;;; ARGS: --trace (module (func $fib (param $n i32) (result i32) get_local $n i32.const 1 i32.le_s if (result i32) i32.const 1 else get_local $n i32.const 1 i32.sub call $fib get_local $n i32.mul end) (func (export "main") (result i32) i32.const 3 call $fib)) (;; STDOUT ;;; >>> running export "main": #0. 100: V:0 | i32.const 3 #0. 108: V:1 | call $0 #1. 0: V:1 | local.get $1 #1. 8: V:2 | i32.const 1 #1. 16: V:3 | i32.le_s 3, 1 #1. 20: V:2 | br_unless @44, 0 #1. 44: V:1 | local.get $1 #1. 52: V:2 | i32.const 1 #1. 60: V:3 | i32.sub 3, 1 #1. 64: V:2 | call $0 #2. 0: V:2 | local.get $1 #2. 8: V:3 | i32.const 1 #2. 16: V:4 | i32.le_s 2, 1 #2. 20: V:3 | br_unless @44, 0 #2. 44: V:2 | local.get $1 #2. 52: V:3 | i32.const 1 #2. 60: V:4 | i32.sub 2, 1 #2. 64: V:3 | call $0 #3. 0: V:3 | local.get $1 #3. 8: V:4 | i32.const 1 #3. 16: V:5 | i32.le_s 1, 1 #3. 20: V:4 | br_unless @44, 1 #3. 28: V:3 | i32.const 1 #3. 36: V:4 | br @84 #3. 84: V:4 | drop_keep $1 $1 #3. 96: V:3 | return #2. 72: V:3 | local.get $2 #2. 80: V:4 | i32.mul 1, 2 #2. 84: V:3 | drop_keep $1 $1 #2. 96: V:2 | return #1. 72: V:2 | local.get $2 #1. 80: V:3 | i32.mul 2, 3 #1. 84: V:2 | drop_keep $1 $1 #1. 96: V:1 | return #0. 116: V:1 | return main() => i32:6 ;;; STDOUT ;;)