Files
failnix/targets/wasm-tacle/test/duff/generated/default/duff.wat

173 lines
3.6 KiB
Plaintext

(module $duff.wasm
(type (;0;) (func (param i32 i32)))
(type (;1;) (func))
(type (;2;) (func (result i32)))
(import "__pragma" "loopbound" (func $__pragma_loopbound (type 0)))
(func $__wasm_apply_data_relocs (type 1))
(func $duff_main (type 1)
i32.const 0
i32.const 0
i32.load8_u offset=1024
i32.store8 offset=1136
i32.const 0
i32.const 0
i32.load offset=1025 align=1
i32.store offset=1137 align=1
i32.const 0
i32.const 0
i64.load offset=1029 align=1
i64.store offset=1141 align=1
i32.const 0
i32.const 0
i64.load offset=1037 align=1
i64.store offset=1149 align=1
i32.const 0
i32.const 0
i64.load offset=1045 align=1
i64.store offset=1157 align=1
i32.const 0
i32.const 0
i64.load offset=1053 align=1
i64.store offset=1165 align=1
i32.const 0
i32.const 0
i32.load offset=1061 align=1
i32.store offset=1173 align=1
i32.const 0
i32.const 0
i32.load16_u offset=1065 align=1
i32.store16 offset=1177 align=1)
(func $__original_main (type 2) (result i32)
(local i32 i32 i32)
global.get $__stack_pointer
i32.const 16
i32.sub
local.tee 0
global.set $__stack_pointer
i32.const 0
local.set 1
local.get 0
i32.const 0
i32.store8 offset=15
i32.const 100
i32.const 100
call $__pragma_loopbound
loop ;; label = @1
local.get 1
i32.const 1028
i32.add
i32.const 96
local.get 1
i32.sub
i32.store8
local.get 1
i32.const 1027
i32.add
i32.const 97
local.get 1
i32.sub
i32.store8
local.get 1
i32.const 1026
i32.add
i32.const 98
local.get 1
i32.sub
i32.store8
local.get 1
i32.const 1025
i32.add
i32.const 99
local.get 1
i32.sub
i32.store8
local.get 1
i32.const 1024
i32.add
i32.const 100
local.get 1
i32.sub
i32.store8
local.get 1
i32.const 5
i32.add
local.tee 1
i32.const 100
i32.ne
br_if 0 (;@1;)
end
i32.const 400
i32.const 400
call $__pragma_loopbound
i32.const -100
local.set 1
loop ;; label = @1
local.get 1
i32.const 1124
i32.add
local.tee 2
local.get 2
i32.load8_u
local.get 0
i32.load8_u offset=15
i32.xor
i32.store8
local.get 1
i32.const 1125
i32.add
local.tee 2
local.get 2
i32.load8_u
local.get 0
i32.load8_u offset=15
i32.xor
i32.store8
local.get 1
i32.const 1126
i32.add
local.tee 2
local.get 2
i32.load8_u
local.get 0
i32.load8_u offset=15
i32.xor
i32.store8
local.get 1
i32.const 1127
i32.add
local.tee 2
local.get 2
i32.load8_u
local.get 0
i32.load8_u offset=15
i32.xor
i32.store8
local.get 1
i32.const 4
i32.add
local.tee 1
br_if 0 (;@1;)
end
call $duff_main
i32.const 0
i32.load8_u offset=1164
local.set 1
local.get 0
i32.const 16
i32.add
global.set $__stack_pointer
local.get 1
i32.const 72
i32.ne)
(table (;0;) 1 1 funcref)
(memory (;0;) 1)
(global $__stack_pointer (mut i32) (i32.const 5344))
(global (;1;) i32 (i32.const 1236))
(global (;2;) i32 (i32.const 5344))
(export "memory" (memory 0))
(export "__wasm_apply_data_relocs" (func $__wasm_apply_data_relocs))
(export "entrypoint" (func $duff_main))
(export "main" (func $__original_main))
(export "__data_end" (global 1))
(export "__heap_base" (global 2)))