Skip to content

Instantly share code, notes, and snippets.

@lqd
Last active July 5, 2016 13:10
Show Gist options
  • Save lqd/a7d8da0b9d49b58ec4accf332a5b21e1 to your computer and use it in GitHub Desktop.
Save lqd/a7d8da0b9d49b58ec4accf332a5b21e1 to your computer and use it in GitHub Desktop.
This is a buggy wast (I think because of i32 stores of i64s) - but passed binaryen validation and is "correctly" (for the tested subset) interpreted (should print 0 and it does), both through the API. But binaryen-shell crashes if you try to use this file.
(module
(memory 1 1)
(start $__wasm_start)
(type $print_i32 (func (param i32)))
(type $rustfn-0-6 (func (param i32)))
(type $rustfn-0-2 (func))
(type $__wasm_start (func))
(type $rustfn-0-12 (func))
(type $rustfn-0-11 (func (param i32)))
(type $rustfn-0-50 (func (param i32) (result i32)))
(type $rustfn-0-169 (func (param i32 i32) (result i32)))
(type $rustfn-0-61 (func (param i32 i32) (result i32)))
(type $rustfn-0-153 (func (param i32 i32) (result i32)))
(type $rustfn-0-65 (func (param i32 i32) (result i32)))
(type $rustfn-0-106 (func (param i32 i32) (result i32)))
(type $rustfn-0-113 (func (param i32 i32) (result i32)))
(type $rustfn-0-120 (func (param i32 i32) (result i32)))
(type $rustfn-0-127 (func (param i32 i32) (result i32)))
(type $rustfn-0-138 (func (param i32 i32) (result i32)))
(type $rustfn-0-189 (func (param i32 i32) (result i32)))
(type $rustfn-0-173 (func (param i32 i32) (result i32)))
(type $rustfn-0-141 (func (param i32 i32) (result i32)))
(type $rustfn-0-145 (func (param i32 i32) (result i32)))
(type $rustfn-0-149 (func (param i32 i32) (result i32)))
(import $print_i32 "spectest" "print" (param i32))
(func $wasm::print_i32 (type $rustfn-0-6) (param $0 i32)
(local $1 i32)
(local $2 i32)
(local $3 i32)
(local $4 i32)
(local $5 i32)
(block
(set_local $4
(i32.load
(i32.const 0)
)
)
)
(block
(block
(block $bb0
(set_local $1
(get_local $0)
)
(set_local $3
(get_local $1)
)
(call_import $print_i32
(get_local $3)
)
(set_local $2
(i32.const -1)
)
)
)
(block
(block $bb1
(i32.store
(i32.const 0)
(get_local $4)
)
(return
(get_local $4)
)
)
)
)
)
(func $main (type $rustfn-0-2)
(local $0 i32)
(local $1 i32)
(local $2 i32)
(local $3 i32)
(local $4 i32)
(local $5 i32)
(local $6 i32)
(local $7 i32)
(local $8 i32)
(block
(set_local $8
(i32.load
(i32.const 0)
)
)
)
(block
(block
(block $bb0
(set_local $0
(i32.const 0)
)
(set_local $1
(i32.const 1)
)
(set_local $5
(get_local $0)
)
(set_local $6
(get_local $1)
)
(set_local $4
(i32.eq
(get_local $5)
(get_local $6)
)
)
(set_local $3
(get_local $4)
)
(call $wasm::print_i32
(get_local $3)
)
(set_local $2
(i32.const -1)
)
)
)
(block
(block $bb1
(i32.store
(i32.const 0)
(get_local $8)
)
(return
(get_local $7)
)
)
)
)
)
(func $__wasm_start (type $__wasm_start)
(i32.store
(i32.const 0)
(i32.const 65535)
)
(call $main)
)
(func $panic_fmt (type $rustfn-0-12)
(local $0 i32)
(local $1 i32)
(local $2 i32)
(block
(set_local $2
(i32.load
(i32.const 0)
)
)
)
(block
(block
(block $bb0
)
)
(loop $shape$2$break $shape$2$continue
(block $bb1
)
(block
(br $shape$2$continue)
)
)
)
)
(func $panic (type $rustfn-0-11) (param $0 i32)
(local $1 i32)
(local $2 i32)
(block
(set_local $1
(i32.load
(i32.const 0)
)
)
)
(block
(block $bb0
)
)
)
(func $Ordering::reverse (type $rustfn-0-50) (param $0 i32) (result i32)
(local $1 i32)
(local $2 i32)
(local $3 i32)
(local $4 i32)
(block
(set_local $3
(i32.load
(i32.const 0)
)
)
)
(block
(block
(block $bb0
(set_local $1
(get_local $0)
)
)
(block $shape$2$break
(block $switch$1$leave
(block $switch$1$case$3
(block $switch$1$case$4
(block $switch$1$default
(br_table $switch$1$case$3 $switch$1$case$4 $switch$1$default
(i32.load8_u
(get_local $1)
)
)
)
(block
(block
(block $bb1
(set_local $2
(i64.const 1)
)
)
(block
(br $shape$2$break)
)
)
)
(br $switch$1$leave)
)
(block
(block
(block $bb3
(set_local $2
(i64.const -1)
)
)
(block
(br $shape$2$break)
)
)
)
(br $switch$1$leave)
)
(block
(block
(block $bb2
(set_local $2
(i64.const 0)
)
)
(block
(br $shape$2$break)
)
)
)
(br $switch$1$leave)
)
)
)
(block
(block $bb4
(i32.store
(i32.const 0)
(get_local $3)
)
(return
(get_local $2)
)
)
)
)
)
(func $impls::_impl_Ord_for_i32_::cmp (type $rustfn-0-169) (param $0 i32) (param $1 i32) (result i32)
(local $2 i32)
(local $3 i32)
(local $4 i32)
(local $5 i32)
(local $6 i32)
(local $7 i32)
(local $8 i32)
(local $9 i32)
(local $10 i32)
(local $11 i32)
(local $12 i32)
(block
(set_local $10
(i32.load
(i32.const 0)
)
)
)
(block
(block
(block $bb0
(set_local $2
(get_local $0)
)
(set_local $3
(get_local $1)
)
(set_local $5
(get_local $2)
)
(set_local $6
(get_local $3)
)
(set_local $4
(i32.eq
(get_local $5)
(get_local $6)
)
)
)
(block $shape$2$break
(if
(get_local $4)
(block
(block $bb1
(set_local $10
(i64.const 0)
)
)
(block
(br $shape$2$break)
)
)
(block
(block $bb2
(set_local $8
(get_local $2)
)
(set_local $9
(get_local $3)
)
(set_local $7
(i32.lt_s
(get_local $8)
(get_local $9)
)
)
)
(block $shape$5$break
(if
(get_local $7)
(block
(block $bb3
(set_local $10
(i64.const -1)
)
)
(block
(br $shape$2$break)
)
)
(block
(block $bb4
(set_local $10
(i64.const 1)
)
)
(block
(br $shape$2$break)
)
)
)
)
)
)
)
)
(block
(block $bb5
(i32.store
(i32.const 0)
(get_local $10)
)
(return
(get_local $10)
)
)
)
)
)
(func $_Ordering_as_Ord_::cmp (type $rustfn-0-61) (param $0 i32) (param $1 i32) (result i32)
(local $2 i32)
(local $3 i32)
(local $4 i32)
(local $5 i32)
(local $6 i32)
(local $7 i32)
(local $8 i32)
(local $9 i32)
(local $10 i32)
(local $11 i32)
(local $12 i32)
(local $13 i32)
(block
(set_local $11
(i32.load
(i32.const 0)
)
)
)
(block
(block
(block $bb0
(set_local $2
(get_local $0)
)
(set_local $3
(get_local $1)
)
(set_local $6
(get_local $2)
)
(set_local $5
(i32.load8_u
(get_local $6)
)
)
(set_local $4
(get_local $5)
)
(set_local $10
(get_local $3)
)
(set_local $9
(i32.load8_u
(get_local $10)
)
)
(set_local $8
(get_local $9)
)
(set_local $7
(get_local $8)
)
(set_local $11
(call $impls::_impl_Ord_for_i32_::cmp
(get_local $4)
(get_local $7)
)
)
)
)
(block
(block $bb1
(i32.store
(i32.const 0)
(get_local $11)
)
(return
(get_local $11)
)
)
)
)
)
(func $impls::_impl_PartialOrd_for_i32_::partial_cmp (type $rustfn-0-153) (param $0 i32) (param $1 i32) (result i32)
(local $2 i32)
(local $3 i32)
(local $4 i32)
(local $5 i32)
(local $6 i32)
(local $7 i32)
(local $8 i32)
(local $9 i32)
(block
(set_local $7
(i32.load
(i32.const 0)
)
)
)
(block
(block
(block $bb0
(set_local $2
(get_local $0)
)
(set_local $3
(get_local $1)
)
(set_local $5
(get_local $2)
)
(set_local $6
(get_local $3)
)
(set_local $4
(call $impls::_impl_Ord_for_i32_::cmp
(get_local $5)
(get_local $6)
)
)
)
)
(block
(block $bb1
(set_local $7
(i32.store
(i32.const 0)
(i32.sub
(i32.load
(i32.const 0)
)
(i32.const 16)
)
)
)
(i32.store8
(i32.load
(i32.const 0)
)
(i32.const 1)
)
(i32.store offset=8
(i32.load
(i32.const 0)
)
(get_local $4)
)
(i32.store
(i32.const 0)
(get_local $7)
)
(return
(get_local $7)
)
)
)
)
)
(func $_Ordering_as_PartialOrd_::partial_cmp (type $rustfn-0-65) (param $0 i32) (param $1 i32) (result i32)
(local $2 i32)
(local $3 i32)
(local $4 i32)
(local $5 i32)
(local $6 i32)
(local $7 i32)
(local $8 i32)
(local $9 i32)
(local $10 i32)
(local $11 i32)
(local $12 i32)
(local $13 i32)
(block
(set_local $11
(i32.load
(i32.const 0)
)
)
)
(block
(block
(block $bb0
(set_local $2
(get_local $0)
)
(set_local $3
(get_local $1)
)
(set_local $6
(get_local $2)
)
(set_local $5
(i32.load8_u
(get_local $6)
)
)
(set_local $4
(get_local $5)
)
(set_local $10
(get_local $3)
)
(set_local $9
(i32.load8_u
(get_local $10)
)
)
(set_local $8
(get_local $9)
)
(set_local $7
(get_local $8)
)
(set_local $11
(call $impls::_impl_PartialOrd_for_i32_::partial_cmp
(get_local $4)
(get_local $7)
)
)
)
)
(block
(block $bb1
(i32.store
(i32.const 0)
(get_local $11)
)
(return
(get_local $11)
)
)
)
)
)
(func $impls::_impl_PartialEq_for_()_::eq (type $rustfn-0-106) (param $0 i32) (param $1 i32) (result i32)
(local $2 i32)
(local $3 i32)
(local $4 i32)
(local $5 i32)
(local $6 i32)
(block
(set_local $4
(i32.load
(i32.const 0)
)
)
)
(block
(block $bb0
(set_local $2
(get_local $0)
)
(set_local $3
(get_local $1)
)
(set_local $4
(i32.const 1)
)
(i32.store
(i32.const 0)
(get_local $4)
)
(return
(get_local $4)
)
)
)
)
(func $impls::_impl_PartialEq_for_()_::ne (type $rustfn-0-106) (param $0 i32) (param $1 i32) (result i32)
(local $2 i32)
(local $3 i32)
(local $4 i32)
(local $5 i32)
(local $6 i32)
(block
(set_local $4
(i32.load
(i32.const 0)
)
)
)
(block
(block $bb0
(set_local $2
(get_local $0)
)
(set_local $3
(get_local $1)
)
(set_local $4
(i32.const 0)
)
(i32.store
(i32.const 0)
(get_local $4)
)
(return
(get_local $4)
)
)
)
)
(func $impls::_impl_PartialEq_for_bool_::eq (type $rustfn-0-113) (param $0 i32) (param $1 i32) (result i32)
(local $2 i32)
(local $3 i32)
(local $4 i32)
(local $5 i32)
(local $6 i32)
(local $7 i32)
(local $8 i32)
(block
(set_local $6
(i32.load
(i32.const 0)
)
)
)
(block
(block $bb0
(set_local $2
(get_local $0)
)
(set_local $3
(get_local $1)
)
(set_local $4
(get_local $2)
)
(set_local $5
(get_local $3)
)
(set_local $6
(i32.eq
(get_local $4)
(get_local $5)
)
)
(i32.store
(i32.const 0)
(get_local $6)
)
(return
(get_local $6)
)
)
)
)
(func $impls::_impl_PartialEq_for_bool_::ne (type $rustfn-0-113) (param $0 i32) (param $1 i32) (result i32)
(local $2 i32)
(local $3 i32)
(local $4 i32)
(local $5 i32)
(local $6 i32)
(local $7 i32)
(local $8 i32)
(block
(set_local $6
(i32.load
(i32.const 0)
)
)
)
(block
(block $bb0
(set_local $2
(get_local $0)
)
(set_local $3
(get_local $1)
)
(set_local $4
(get_local $2)
)
(set_local $5
(get_local $3)
)
(set_local $6
(i32.ne
(get_local $4)
(get_local $5)
)
)
(i32.store
(i32.const 0)
(get_local $6)
)
(return
(get_local $6)
)
)
)
)
(func $impls::_impl_PartialEq_for_i32_::eq (type $rustfn-0-120) (param $0 i32) (param $1 i32) (result i32)
(local $2 i32)
(local $3 i32)
(local $4 i32)
(local $5 i32)
(local $6 i32)
(local $7 i32)
(local $8 i32)
(block
(set_local $6
(i32.load
(i32.const 0)
)
)
)
(block
(block $bb0
(set_local $2
(get_local $0)
)
(set_local $3
(get_local $1)
)
(set_local $4
(get_local $2)
)
(set_local $5
(get_local $3)
)
(set_local $6
(i32.eq
(get_local $4)
(get_local $5)
)
)
(i32.store
(i32.const 0)
(get_local $6)
)
(return
(get_local $6)
)
)
)
)
(func $impls::_impl_PartialEq_for_i32_::ne (type $rustfn-0-120) (param $0 i32) (param $1 i32) (result i32)
(local $2 i32)
(local $3 i32)
(local $4 i32)
(local $5 i32)
(local $6 i32)
(local $7 i32)
(local $8 i32)
(block
(set_local $6
(i32.load
(i32.const 0)
)
)
)
(block
(block $bb0
(set_local $2
(get_local $0)
)
(set_local $3
(get_local $1)
)
(set_local $4
(get_local $2)
)
(set_local $5
(get_local $3)
)
(set_local $6
(i32.ne
(get_local $4)
(get_local $5)
)
)
(i32.store
(i32.const 0)
(get_local $6)
)
(return
(get_local $6)
)
)
)
)
(func $impls::_impl_PartialEq_for_u8_::eq (type $rustfn-0-127) (param $0 i32) (param $1 i32) (result i32)
(local $2 i32)
(local $3 i32)
(local $4 i32)
(local $5 i32)
(local $6 i32)
(local $7 i32)
(local $8 i32)
(block
(set_local $6
(i32.load
(i32.const 0)
)
)
)
(block
(block $bb0
(set_local $2
(get_local $0)
)
(set_local $3
(get_local $1)
)
(set_local $4
(get_local $2)
)
(set_local $5
(get_local $3)
)
(set_local $6
(i32.eq
(get_local $4)
(get_local $5)
)
)
(i32.store
(i32.const 0)
(get_local $6)
)
(return
(get_local $6)
)
)
)
)
(func $impls::_impl_PartialEq_for_u8_::ne (type $rustfn-0-127) (param $0 i32) (param $1 i32) (result i32)
(local $2 i32)
(local $3 i32)
(local $4 i32)
(local $5 i32)
(local $6 i32)
(local $7 i32)
(local $8 i32)
(block
(set_local $6
(i32.load
(i32.const 0)
)
)
)
(block
(block $bb0
(set_local $2
(get_local $0)
)
(set_local $3
(get_local $1)
)
(set_local $4
(get_local $2)
)
(set_local $5
(get_local $3)
)
(set_local $6
(i32.ne
(get_local $4)
(get_local $5)
)
)
(i32.store
(i32.const 0)
(get_local $6)
)
(return
(get_local $6)
)
)
)
)
(func $impls::_impl_PartialOrd_for_()_::partial_cmp (type $rustfn-0-138) (param $0 i32) (param $1 i32) (result i32)
(local $2 i32)
(local $3 i32)
(local $4 i32)
(local $5 i32)
(local $6 i32)
(block
(set_local $4
(i32.load
(i32.const 0)
)
)
)
(block
(block $bb0
(set_local $2
(get_local $0)
)
(set_local $3
(i64.const 0)
)
(set_local $4
(i32.store
(i32.const 0)
(i32.sub
(i32.load
(i32.const 0)
)
(i32.const 16)
)
)
)
(i32.store8
(i32.load
(i32.const 0)
)
(i32.const 1)
)
(i32.store offset=8
(i32.load
(i32.const 0)
)
(get_local $3)
)
(i32.store
(i32.const 0)
(get_local $4)
)
(return
(get_local $4)
)
)
)
)
(func $impls::_impl_Ord_for_u8_::cmp (type $rustfn-0-189) (param $0 i32) (param $1 i32) (result i32)
(local $2 i32)
(local $3 i32)
(local $4 i32)
(local $5 i32)
(local $6 i32)
(local $7 i32)
(local $8 i32)
(local $9 i32)
(local $10 i32)
(local $11 i32)
(local $12 i32)
(block
(set_local $10
(i32.load
(i32.const 0)
)
)
)
(block
(block
(block $bb0
(set_local $2
(get_local $0)
)
(set_local $3
(get_local $1)
)
(set_local $5
(get_local $2)
)
(set_local $6
(get_local $3)
)
(set_local $4
(i32.eq
(get_local $5)
(get_local $6)
)
)
)
(block $shape$2$break
(if
(get_local $4)
(block
(block $bb1
(set_local $10
(i64.const 0)
)
)
(block
(br $shape$2$break)
)
)
(block
(block $bb2
(set_local $8
(get_local $2)
)
(set_local $9
(get_local $3)
)
(set_local $7
(i32.lt_s
(get_local $8)
(get_local $9)
)
)
)
(block $shape$5$break
(if
(get_local $7)
(block
(block $bb3
(set_local $10
(i64.const -1)
)
)
(block
(br $shape$2$break)
)
)
(block
(block $bb4
(set_local $10
(i64.const 1)
)
)
(block
(br $shape$2$break)
)
)
)
)
)
)
)
)
(block
(block $bb5
(i32.store
(i32.const 0)
(get_local $10)
)
(return
(get_local $10)
)
)
)
)
)
(func $impls::_impl_PartialOrd_for_u8_::partial_cmp (type $rustfn-0-173) (param $0 i32) (param $1 i32) (result i32)
(local $2 i32)
(local $3 i32)
(local $4 i32)
(local $5 i32)
(local $6 i32)
(local $7 i32)
(local $8 i32)
(local $9 i32)
(block
(set_local $7
(i32.load
(i32.const 0)
)
)
)
(block
(block
(block $bb0
(set_local $2
(get_local $0)
)
(set_local $3
(get_local $1)
)
(set_local $5
(get_local $2)
)
(set_local $6
(get_local $3)
)
(set_local $4
(call $impls::_impl_Ord_for_u8_::cmp
(get_local $5)
(get_local $6)
)
)
)
)
(block
(block $bb1
(set_local $7
(i32.store
(i32.const 0)
(i32.sub
(i32.load
(i32.const 0)
)
(i32.const 16)
)
)
)
(i32.store8
(i32.load
(i32.const 0)
)
(i32.const 1)
)
(i32.store offset=8
(i32.load
(i32.const 0)
)
(get_local $4)
)
(i32.store
(i32.const 0)
(get_local $7)
)
(return
(get_local $7)
)
)
)
)
)
(func $impls::_impl_PartialOrd_for_bool_::partial_cmp (type $rustfn-0-141) (param $0 i32) (param $1 i32) (result i32)
(local $2 i32)
(local $3 i32)
(local $4 i32)
(local $5 i32)
(local $6 i32)
(local $7 i32)
(local $8 i32)
(local $9 i32)
(local $10 i32)
(local $11 i32)
(local $12 i32)
(local $13 i32)
(block
(set_local $11
(i32.load
(i32.const 0)
)
)
)
(block
(block
(block $bb0
(set_local $2
(get_local $0)
)
(set_local $3
(get_local $1)
)
(set_local $6
(get_local $2)
)
(set_local $5
(get_local $6)
)
(set_local $4
(get_local $5)
)
(set_local $10
(get_local $3)
)
(set_local $9
(get_local $10)
)
(set_local $8
(get_local $9)
)
(set_local $7
(get_local $8)
)
(set_local $11
(call $impls::_impl_PartialOrd_for_u8_::partial_cmp
(get_local $4)
(get_local $7)
)
)
)
)
(block
(block $bb1
(i32.store
(i32.const 0)
(get_local $11)
)
(return
(get_local $11)
)
)
)
)
)
(func $impls::_impl_Ord_for_()_::cmp (type $rustfn-0-145) (param $0 i32) (param $1 i32) (result i32)
(local $2 i32)
(local $3 i32)
(local $4 i32)
(local $5 i32)
(local $6 i32)
(block
(set_local $4
(i32.load
(i32.const 0)
)
)
)
(block
(block $bb0
(set_local $2
(get_local $0)
)
(set_local $3
(get_local $1)
)
(set_local $4
(i64.const 0)
)
(i32.store
(i32.const 0)
(get_local $4)
)
(return
(get_local $4)
)
)
)
)
(func $impls::_impl_Ord_for_bool_::cmp (type $rustfn-0-149) (param $0 i32) (param $1 i32) (result i32)
(local $2 i32)
(local $3 i32)
(local $4 i32)
(local $5 i32)
(local $6 i32)
(local $7 i32)
(local $8 i32)
(local $9 i32)
(local $10 i32)
(local $11 i32)
(local $12 i32)
(local $13 i32)
(block
(set_local $11
(i32.load
(i32.const 0)
)
)
)
(block
(block
(block $bb0
(set_local $2
(get_local $0)
)
(set_local $3
(get_local $1)
)
(set_local $6
(get_local $2)
)
(set_local $5
(get_local $6)
)
(set_local $4
(get_local $5)
)
(set_local $10
(get_local $3)
)
(set_local $9
(get_local $10)
)
(set_local $8
(get_local $9)
)
(set_local $7
(get_local $8)
)
(set_local $11
(call $impls::_impl_Ord_for_u8_::cmp
(get_local $4)
(get_local $7)
)
)
)
)
(block
(block $bb1
(i32.store
(i32.const 0)
(get_local $11)
)
(return
(get_local $11)
)
)
)
)
)
(func $impls::_impl_PartialOrd_for_i32_::lt (type $rustfn-0-120) (param $0 i32) (param $1 i32) (result i32)
(local $2 i32)
(local $3 i32)
(local $4 i32)
(local $5 i32)
(local $6 i32)
(local $7 i32)
(local $8 i32)
(block
(set_local $6
(i32.load
(i32.const 0)
)
)
)
(block
(block $bb0
(set_local $2
(get_local $0)
)
(set_local $3
(get_local $1)
)
(set_local $4
(get_local $2)
)
(set_local $5
(get_local $3)
)
(set_local $6
(i32.lt_s
(get_local $4)
(get_local $5)
)
)
(i32.store
(i32.const 0)
(get_local $6)
)
(return
(get_local $6)
)
)
)
)
(func $impls::_impl_PartialOrd_for_i32_::le (type $rustfn-0-120) (param $0 i32) (param $1 i32) (result i32)
(local $2 i32)
(local $3 i32)
(local $4 i32)
(local $5 i32)
(local $6 i32)
(local $7 i32)
(local $8 i32)
(block
(set_local $6
(i32.load
(i32.const 0)
)
)
)
(block
(block $bb0
(set_local $2
(get_local $0)
)
(set_local $3
(get_local $1)
)
(set_local $4
(get_local $2)
)
(set_local $5
(get_local $3)
)
(set_local $6
(i32.le_s
(get_local $4)
(get_local $5)
)
)
(i32.store
(i32.const 0)
(get_local $6)
)
(return
(get_local $6)
)
)
)
)
(func $impls::_impl_PartialOrd_for_i32_::ge (type $rustfn-0-120) (param $0 i32) (param $1 i32) (result i32)
(local $2 i32)
(local $3 i32)
(local $4 i32)
(local $5 i32)
(local $6 i32)
(local $7 i32)
(local $8 i32)
(block
(set_local $6
(i32.load
(i32.const 0)
)
)
)
(block
(block $bb0
(set_local $2
(get_local $0)
)
(set_local $3
(get_local $1)
)
(set_local $4
(get_local $2)
)
(set_local $5
(get_local $3)
)
(set_local $6
(i32.ge_s
(get_local $4)
(get_local $5)
)
)
(i32.store
(i32.const 0)
(get_local $6)
)
(return
(get_local $6)
)
)
)
)
(func $impls::_impl_PartialOrd_for_i32_::gt (type $rustfn-0-120) (param $0 i32) (param $1 i32) (result i32)
(local $2 i32)
(local $3 i32)
(local $4 i32)
(local $5 i32)
(local $6 i32)
(local $7 i32)
(local $8 i32)
(block
(set_local $6
(i32.load
(i32.const 0)
)
)
)
(block
(block $bb0
(set_local $2
(get_local $0)
)
(set_local $3
(get_local $1)
)
(set_local $4
(get_local $2)
)
(set_local $5
(get_local $3)
)
(set_local $6
(i32.gt_s
(get_local $4)
(get_local $5)
)
)
(i32.store
(i32.const 0)
(get_local $6)
)
(return
(get_local $6)
)
)
)
)
(func $impls::_impl_PartialOrd_for_u8_::lt (type $rustfn-0-127) (param $0 i32) (param $1 i32) (result i32)
(local $2 i32)
(local $3 i32)
(local $4 i32)
(local $5 i32)
(local $6 i32)
(local $7 i32)
(local $8 i32)
(block
(set_local $6
(i32.load
(i32.const 0)
)
)
)
(block
(block $bb0
(set_local $2
(get_local $0)
)
(set_local $3
(get_local $1)
)
(set_local $4
(get_local $2)
)
(set_local $5
(get_local $3)
)
(set_local $6
(i32.lt_s
(get_local $4)
(get_local $5)
)
)
(i32.store
(i32.const 0)
(get_local $6)
)
(return
(get_local $6)
)
)
)
)
(func $impls::_impl_PartialOrd_for_u8_::le (type $rustfn-0-127) (param $0 i32) (param $1 i32) (result i32)
(local $2 i32)
(local $3 i32)
(local $4 i32)
(local $5 i32)
(local $6 i32)
(local $7 i32)
(local $8 i32)
(block
(set_local $6
(i32.load
(i32.const 0)
)
)
)
(block
(block $bb0
(set_local $2
(get_local $0)
)
(set_local $3
(get_local $1)
)
(set_local $4
(get_local $2)
)
(set_local $5
(get_local $3)
)
(set_local $6
(i32.le_s
(get_local $4)
(get_local $5)
)
)
(i32.store
(i32.const 0)
(get_local $6)
)
(return
(get_local $6)
)
)
)
)
(func $impls::_impl_PartialOrd_for_u8_::ge (type $rustfn-0-127) (param $0 i32) (param $1 i32) (result i32)
(local $2 i32)
(local $3 i32)
(local $4 i32)
(local $5 i32)
(local $6 i32)
(local $7 i32)
(local $8 i32)
(block
(set_local $6
(i32.load
(i32.const 0)
)
)
)
(block
(block $bb0
(set_local $2
(get_local $0)
)
(set_local $3
(get_local $1)
)
(set_local $4
(get_local $2)
)
(set_local $5
(get_local $3)
)
(set_local $6
(i32.ge_s
(get_local $4)
(get_local $5)
)
)
(i32.store
(i32.const 0)
(get_local $6)
)
(return
(get_local $6)
)
)
)
)
(func $impls::_impl_PartialOrd_for_u8_::gt (type $rustfn-0-127) (param $0 i32) (param $1 i32) (result i32)
(local $2 i32)
(local $3 i32)
(local $4 i32)
(local $5 i32)
(local $6 i32)
(local $7 i32)
(local $8 i32)
(block
(set_local $6
(i32.load
(i32.const 0)
)
)
)
(block
(block $bb0
(set_local $2
(get_local $0)
)
(set_local $3
(get_local $1)
)
(set_local $4
(get_local $2)
)
(set_local $5
(get_local $3)
)
(set_local $6
(i32.gt_s
(get_local $4)
(get_local $5)
)
)
(i32.store
(i32.const 0)
(get_local $6)
)
(return
(get_local $6)
)
)
)
)
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment