Created
October 17, 2017 21:33
-
-
Save kripken/0fcefc901672f3ba91efefd8510bedad to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(module | |
(type $0 (func (param i32 i32 i32) (result i32))) | |
(type $1 (func (param i32) (result i32))) | |
(type $2 (func (result i32))) | |
(type $3 (func (param i32 i32) (result i32))) | |
(type $4 (func)) | |
(import "env" "___syscall146" (func $import$0 (param i32 i32) (result i32))) | |
(import "env" "memory" (memory $0 256 256)) | |
(import "env" "table" (table 6 6 anyfunc)) | |
(elem (i32.const 0) $4 $4 $4 $1) | |
(data (i32.const 1392) "hello, world!") | |
(export "_main" (func $5)) | |
(export "_malloc" (func $4)) | |
(func $0 (type $0) (param $var$0 i32) (param $var$1 i32) (param $var$2 i32) (result i32) | |
(i32.store | |
(i32.const 32) | |
(i32.const 1) | |
) | |
(i32.store | |
(i32.const 36) | |
(i32.sub | |
(i32.load | |
(i32.add | |
(get_local $var$0) | |
(i32.const 20) | |
) | |
) | |
(i32.const 1) | |
) | |
) | |
(i32.store | |
(i32.const 44) | |
(i32.const 1) | |
) | |
(i32.store | |
(i32.const 16) | |
(i32.const 1) | |
) | |
(i32.store | |
(i32.const 20) | |
(i32.const 32) | |
) | |
(i32.store | |
(i32.const 24) | |
(i32.const 2) | |
) | |
(drop | |
(call $import$0 | |
(i32.const 146) | |
(i32.const 16) | |
) | |
) | |
(i32.const 0) | |
) | |
(func $1 (type $0) (param $var$0 i32) (param $var$1 i32) (param $var$2 i32) (result i32) | |
(call $0 | |
(get_local $var$0) | |
(i32.const 0) | |
(i32.const 0) | |
) | |
) | |
(func $2 (type $4) | |
(local $var$0 i32) | |
(if | |
(block $label$1 (result i32) | |
(drop | |
(call $3 | |
(i32.const 1) | |
(i32.const 1392) | |
(block $label$2 (result i32) | |
(set_local $var$0 | |
(i32.const 1392) | |
) | |
(loop $label$3 | |
(br_if $label$3 | |
(i32.load8_s | |
(tee_local $var$0 | |
(i32.add | |
(get_local $var$0) | |
(i32.const 1) | |
) | |
) | |
) | |
) | |
) | |
(tee_local $var$0 | |
(i32.sub | |
(get_local $var$0) | |
(i32.const 1392) | |
) | |
) | |
) | |
) | |
) | |
(i32.store | |
(i32.const 1288) | |
(i32.add | |
(get_local $var$0) | |
(i32.const 1) | |
) | |
) | |
(i32.const 1) | |
) | |
(drop | |
(if (result i32) | |
(call_indirect $0 | |
(i32.const 1268) | |
(i32.const 0) | |
(i32.const 1) | |
(i32.const 3) | |
) | |
(i32.const 0) | |
(i32.const -1) | |
) | |
) | |
) | |
) | |
(func $3 (type $0) (param $var$0 i32) (param $var$1 i32) (param $var$2 i32) (result i32) | |
(local $var$3 i32) | |
(set_local $var$3 | |
(i32.add | |
(get_local $var$2) | |
(i32.const 1) | |
) | |
) | |
(loop $label$1 | |
(if | |
(i32.lt_s | |
(get_local $var$0) | |
(get_local $var$3) | |
) | |
(block | |
(i32.store8 | |
(get_local $var$0) | |
(i32.load8_s | |
(get_local $var$1) | |
) | |
) | |
(set_local $var$0 | |
(i32.add | |
(get_local $var$0) | |
(i32.const 1) | |
) | |
) | |
(set_local $var$1 | |
(i32.add | |
(get_local $var$1) | |
(i32.const 1) | |
) | |
) | |
(br $label$1) | |
) | |
) | |
) | |
(i32.const 1) | |
) | |
(func $4 (type $1) (param $var$0 i32) (result i32) | |
(i32.const 0) | |
) | |
(func $5 (type $2) (result i32) | |
(call $2) | |
(i32.const 0) | |
) | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment