ifelse4.wat (905B)
1 (module 2 (func $add (param $lhs i32) (param $rhs i32) (result i32) 3 local.get $lhs 4 local.get $rhs 5 i32.add) 6 (func $sub (param $lhs i32) (param $rhs i32) (result i32) 7 local.get $lhs 8 local.get $rhs 9 i32.sub 10 ) 11 (func $start (result i32) 12 (local i32 i32) 13 i32.const 1 14 (if (result i32) 15 (then 16 i32.const 2 17 local.get 0 18 i32.sub 19 i32.const 0 20 i32.lt_s) 21 (else 22 unreachable)) 23 if 24 unreachable 25 end 26 i32.const 0 27 ) 28 29 (func $enter (result i32) 30 (local i32) 31 (call $start) 32 local.set 0 33 (call $start) 34 local.get 0 35 i32.ne 36 ) 37 38 (export "start" (func $start)) 39 (export "_start" (func $enter)) 40 (export "add" (func $add)) 41 (export "sub" (func $sub))) 42