81 lines
1.9 KiB
Plaintext
81 lines
1.9 KiB
Plaintext
(module $recursion.wasm
|
|
(type (;0;) (func))
|
|
(type (;1;) (func (param i32) (result i32)))
|
|
(type (;2;) (func (result i32)))
|
|
(func $__wasm_apply_data_relocs (type 0))
|
|
(func $recursion_fib (type 1) (param i32) (result i32)
|
|
(local i32)
|
|
i32.const 1
|
|
local.set 1
|
|
block ;; label = @1
|
|
local.get 0
|
|
i32.const 2
|
|
i32.lt_u
|
|
br_if 0 (;@1;)
|
|
i32.const 0
|
|
local.set 1
|
|
loop ;; label = @2
|
|
local.get 0
|
|
i32.const -1
|
|
i32.add
|
|
call $recursion_fib
|
|
local.get 1
|
|
i32.add
|
|
local.set 1
|
|
local.get 0
|
|
i32.const -2
|
|
i32.add
|
|
local.tee 0
|
|
i32.const 1
|
|
i32.gt_u
|
|
br_if 0 (;@2;)
|
|
end
|
|
local.get 1
|
|
i32.const 1
|
|
i32.add
|
|
local.set 1
|
|
end
|
|
local.get 1)
|
|
(func $recursion_main (type 0)
|
|
i32.const 0
|
|
i32.const 0
|
|
i32.load offset=1024
|
|
call $recursion_fib
|
|
i32.store offset=1028)
|
|
(func $__original_main (type 2) (result i32)
|
|
(local i32 i32)
|
|
global.get $__stack_pointer
|
|
i32.const 16
|
|
i32.sub
|
|
local.tee 0
|
|
global.set $__stack_pointer
|
|
local.get 0
|
|
i32.const 10
|
|
i32.store offset=12
|
|
i32.const 0
|
|
local.get 0
|
|
i32.load offset=12
|
|
i32.store offset=1024
|
|
call $recursion_main
|
|
i32.const 0
|
|
i32.load offset=1028
|
|
local.set 1
|
|
local.get 0
|
|
i32.const 16
|
|
i32.add
|
|
global.set $__stack_pointer
|
|
local.get 1
|
|
i32.const 89
|
|
i32.ne)
|
|
(table (;0;) 1 1 funcref)
|
|
(memory (;0;) 1)
|
|
(global $__stack_pointer (mut i32) (i32.const 5136))
|
|
(global (;1;) i32 (i32.const 1032))
|
|
(global (;2;) i32 (i32.const 5136))
|
|
(export "memory" (memory 0))
|
|
(export "__wasm_apply_data_relocs" (func $__wasm_apply_data_relocs))
|
|
(export "entrypoint" (func $recursion_main))
|
|
(export "main" (func $__original_main))
|
|
(export "__data_end" (global 1))
|
|
(export "__heap_base" (global 2)))
|