133 lines
2.9 KiB
Plaintext
133 lines
2.9 KiB
Plaintext
(module $binarysearch.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 $binarysearch_main (type 1)
|
|
(local i32 i32 i32 i32 i32)
|
|
i32.const 1
|
|
i32.const 4
|
|
call $__pragma_loopbound
|
|
i32.const 14
|
|
local.set 0
|
|
i32.const 0
|
|
local.set 1
|
|
block ;; label = @1
|
|
loop ;; label = @2
|
|
block ;; label = @3
|
|
local.get 0
|
|
local.get 1
|
|
i32.add
|
|
i32.const 1
|
|
i32.shr_s
|
|
local.tee 2
|
|
i32.const 3
|
|
i32.shl
|
|
i32.const 1040
|
|
i32.add
|
|
local.tee 3
|
|
i32.load
|
|
local.tee 4
|
|
i32.const 8
|
|
i32.ne
|
|
br_if 0 (;@3;)
|
|
local.get 3
|
|
i32.load offset=4
|
|
local.set 3
|
|
br 2 (;@1;)
|
|
end
|
|
i32.const -1
|
|
local.set 3
|
|
local.get 1
|
|
local.get 2
|
|
i32.const 1
|
|
i32.add
|
|
local.get 4
|
|
i32.const 8
|
|
i32.gt_s
|
|
local.tee 4
|
|
select
|
|
local.tee 1
|
|
local.get 2
|
|
i32.const -1
|
|
i32.add
|
|
local.get 0
|
|
local.get 4
|
|
select
|
|
local.tee 0
|
|
i32.le_s
|
|
br_if 0 (;@2;)
|
|
end
|
|
end
|
|
i32.const 0
|
|
local.get 3
|
|
i32.store offset=1160)
|
|
(func $__original_main (type 2) (result i32)
|
|
(local i32 i32)
|
|
i32.const 0
|
|
i32.const 0
|
|
i32.store offset=1024
|
|
i32.const 15
|
|
i32.const 15
|
|
call $__pragma_loopbound
|
|
i32.const -120
|
|
local.set 0
|
|
loop ;; label = @1
|
|
i32.const 0
|
|
i32.const 0
|
|
i32.load offset=1024
|
|
i32.const 133
|
|
i32.mul
|
|
i32.const 81
|
|
i32.add
|
|
i32.const 8095
|
|
i32.rem_s
|
|
i32.store offset=1024
|
|
i32.const 0
|
|
i32.load offset=1024
|
|
local.set 1
|
|
i32.const 0
|
|
i32.const 0
|
|
i32.load offset=1024
|
|
i32.const 133
|
|
i32.mul
|
|
i32.const 81
|
|
i32.add
|
|
i32.const 8095
|
|
i32.rem_s
|
|
i32.store offset=1024
|
|
local.get 0
|
|
i32.const 1160
|
|
i32.add
|
|
local.get 1
|
|
i32.store
|
|
local.get 0
|
|
i32.const 1164
|
|
i32.add
|
|
i32.const 0
|
|
i32.load offset=1024
|
|
i32.store
|
|
local.get 0
|
|
i32.const 8
|
|
i32.add
|
|
local.tee 0
|
|
br_if 0 (;@1;)
|
|
end
|
|
call $binarysearch_main
|
|
i32.const 0
|
|
i32.load offset=1160
|
|
i32.const -1
|
|
i32.ne)
|
|
(table (;0;) 1 1 funcref)
|
|
(memory (;0;) 1)
|
|
(global $__stack_pointer (mut i32) (i32.const 5264))
|
|
(global (;1;) i32 (i32.const 1164))
|
|
(global (;2;) i32 (i32.const 5264))
|
|
(export "memory" (memory 0))
|
|
(export "__wasm_apply_data_relocs" (func $__wasm_apply_data_relocs))
|
|
(export "entrypoint" (func $binarysearch_main))
|
|
(export "main" (func $__original_main))
|
|
(export "__data_end" (global 1))
|
|
(export "__heap_base" (global 2)))
|