| (module |
| (type $none_=>_none (func)) |
| (type $i32_=>_none (func (param i32))) |
| (type $i32_=>_i32 (func (param i32) (result i32))) |
| (type $func.0 (func (param i32 i32))) |
| (import "env" "__handle_stack_overflow" (func $__handle_stack_overflow (param i32))) |
| (global $__stack_pointer (mut i32) (i32.const 66112)) |
| (global $__stack_base (mut i32) (i32.const 0)) |
| (global $__stack_limit (mut i32) (i32.const 0)) |
| (memory $0 2) |
| (export "memory" (memory $0)) |
| (export "__wasm_call_ctors" (func $__wasm_call_ctors)) |
| (export "stackRestore" (func $stackRestore)) |
| (export "stackAlloc" (func $stackAlloc)) |
| (export "main" (func $main)) |
| (export "__set_stack_limits" (func $__set_stack_limits)) |
| (func $__wasm_call_ctors |
| (nop) |
| ) |
| (func $stackRestore (param $0 i32) |
| (local $1 i32) |
| (if |
| (i32.or |
| (i32.gt_u |
| (local.tee $1 |
| (local.get $0) |
| ) |
| (global.get $__stack_base) |
| ) |
| (i32.lt_u |
| (local.get $1) |
| (global.get $__stack_limit) |
| ) |
| ) |
| (call $__handle_stack_overflow |
| (local.get $1) |
| ) |
| ) |
| (global.set $__stack_pointer |
| (local.get $1) |
| ) |
| ) |
| (func $stackAlloc (param $0 i32) (result i32) |
| (local $1 i32) |
| (local $2 i32) |
| (local $3 i32) |
| (block |
| (if |
| (i32.or |
| (i32.gt_u |
| (local.tee $3 |
| (local.tee $1 |
| (i32.and |
| (i32.sub |
| (global.get $__stack_pointer) |
| (local.get $0) |
| ) |
| (i32.const -16) |
| ) |
| ) |
| ) |
| (global.get $__stack_base) |
| ) |
| (i32.lt_u |
| (local.get $3) |
| (global.get $__stack_limit) |
| ) |
| ) |
| (call $__handle_stack_overflow |
| (local.get $3) |
| ) |
| ) |
| (global.set $__stack_pointer |
| (local.get $3) |
| ) |
| ) |
| (local.get $1) |
| ) |
| (func $main |
| (nop) |
| ) |
| (func $__set_stack_limits (param $0 i32) (param $1 i32) |
| (global.set $__stack_base |
| (local.get $0) |
| ) |
| (global.set $__stack_limit |
| (local.get $1) |
| ) |
| ) |
| ) |
| (; |
| --BEGIN METADATA -- |
| { |
| "declares": [ |
| "__handle_stack_overflow" |
| ], |
| "globalImports": [ |
| ], |
| "exports": [ |
| "__wasm_call_ctors", |
| "stackRestore", |
| "stackAlloc", |
| "main", |
| "__set_stack_limits" |
| ], |
| "namedGlobals": { |
| }, |
| "invokeFuncs": [ |
| ], |
| "mainReadsParams": 1, |
| "features": [ |
| ] |
| } |
| -- END METADATA -- |
| ;) |