summaryrefslogtreecommitdiff
path: root/test/passes/translate-to-fuzz.txt
diff options
context:
space:
mode:
Diffstat (limited to 'test/passes/translate-to-fuzz.txt')
-rw-r--r--test/passes/translate-to-fuzz.txt1126
1 files changed, 1126 insertions, 0 deletions
diff --git a/test/passes/translate-to-fuzz.txt b/test/passes/translate-to-fuzz.txt
new file mode 100644
index 000000000..daab102ad
--- /dev/null
+++ b/test/passes/translate-to-fuzz.txt
@@ -0,0 +1,1126 @@
+(module
+ (global $hangLimit (mut i32) (i32.const 25))
+ (memory $0 1 1)
+ (export "func_0" (func $func_0))
+ (export "func_1" (func $func_1))
+ (export "func_4" (func $func_4))
+ (export "func_5" (func $func_5))
+ (export "hangLimitInitializer" (func $hangLimitInitializer))
+ (func $func_0 (result i32)
+ (local $0 f32)
+ (local $1 i64)
+ (local $2 f32)
+ (block
+ (if
+ (i32.eqz
+ (get_global $hangLimit)
+ )
+ (return
+ (i32.const -118)
+ )
+ )
+ (set_global $hangLimit
+ (i32.sub
+ (get_global $hangLimit)
+ (i32.const 1)
+ )
+ )
+ )
+ (block $label$0 (result i32)
+ (if
+ (loop $label$1 (result i32)
+ (block
+ (if
+ (i32.eqz
+ (get_global $hangLimit)
+ )
+ (return
+ (i32.const 127)
+ )
+ )
+ (set_global $hangLimit
+ (i32.sub
+ (get_global $hangLimit)
+ (i32.const 1)
+ )
+ )
+ )
+ (select
+ (i64.ne
+ (if (result i64)
+ (i32.eqz
+ (loop $label$5 (result i32)
+ (block
+ (if
+ (i32.eqz
+ (get_global $hangLimit)
+ )
+ (return
+ (i32.const 190)
+ )
+ )
+ (set_global $hangLimit
+ (i32.sub
+ (get_global $hangLimit)
+ (i32.const 1)
+ )
+ )
+ )
+ (block $label$6 (result i32)
+ (i32.const 104)
+ )
+ )
+ )
+ (block $label$7 (result i64)
+ (return
+ (i32.const 387928603)
+ )
+ )
+ (block $label$8 (result i64)
+ (br $label$1)
+ )
+ )
+ (i64.const -1)
+ )
+ (br_if $label$0
+ (br_if $label$0
+ (i32.popcnt
+ (i32.const 75)
+ )
+ (i32.eqz
+ (select
+ (if (result i32)
+ (loop $label$9 (result i32)
+ (block
+ (if
+ (i32.eqz
+ (get_global $hangLimit)
+ )
+ (return
+ (i32.const 828535924)
+ )
+ )
+ (set_global $hangLimit
+ (i32.sub
+ (get_global $hangLimit)
+ (i32.const 1)
+ )
+ )
+ )
+ (block $label$10 (result i32)
+ (block $label$11
+ (set_local $1
+ (get_local $1)
+ )
+ )
+ (br $label$1)
+ )
+ )
+ (block $label$12 (result i32)
+ (i32.const 1767927669)
+ )
+ (block $label$13 (result i32)
+ (if (result i32)
+ (i32.const -32768)
+ (i32.const 127)
+ (i32.const 269491029)
+ )
+ )
+ )
+ (if (result i32)
+ (i32.eqz
+ (loop $label$14 (result i32)
+ (block
+ (if
+ (i32.eqz
+ (get_global $hangLimit)
+ )
+ (return
+ (i32.const -71)
+ )
+ )
+ (set_global $hangLimit
+ (i32.sub
+ (get_global $hangLimit)
+ (i32.const 1)
+ )
+ )
+ )
+ (block $label$15 (result i32)
+ (br $label$1)
+ )
+ )
+ )
+ (block $label$16 (result i32)
+ (br $label$1)
+ )
+ (i32.ge_u
+ (br_if $label$0
+ (i32.const -98)
+ (i32.const 65419)
+ )
+ (i32.load offset=22 align=1
+ (i32.and
+ (i32.const 0)
+ (i32.const 31)
+ )
+ )
+ )
+ )
+ (br_if $label$0
+ (i32.load offset=22
+ (i32.and
+ (i32.const -1)
+ (i32.const 31)
+ )
+ )
+ (i32.const 1561467741)
+ )
+ )
+ )
+ )
+ (i32.const 32767)
+ )
+ (br_if $label$0
+ (loop $label$2 (result i32)
+ (block
+ (if
+ (i32.eqz
+ (get_global $hangLimit)
+ )
+ (return
+ (i32.const 469762305)
+ )
+ )
+ (set_global $hangLimit
+ (i32.sub
+ (get_global $hangLimit)
+ (i32.const 1)
+ )
+ )
+ )
+ (block $label$3 (result i32)
+ (i32.popcnt
+ (select
+ (br_if $label$0
+ (i32.const 573448231)
+ (select
+ (i32.const 1917992040)
+ (i32.const -25)
+ (i32.const -105)
+ )
+ )
+ (i32.const 65535)
+ (br_if $label$3
+ (i32.lt_u
+ (select
+ (select
+ (br_if $label$3
+ (i32.const 188)
+ (i32.const 1)
+ )
+ (loop $label$4 (result i32)
+ (block
+ (if
+ (i32.eqz
+ (get_global $hangLimit)
+ )
+ (return
+ (i32.const 255)
+ )
+ )
+ (set_global $hangLimit
+ (i32.sub
+ (get_global $hangLimit)
+ (i32.const 1)
+ )
+ )
+ )
+ (i32.const 65448)
+ )
+ (i32.const 31021)
+ )
+ (i32.const 1562845246)
+ (i32.const 1)
+ )
+ (i32.const 2147483647)
+ )
+ (i32.const 127)
+ )
+ )
+ )
+ )
+ )
+ (i32.eqz
+ (i32.const -1)
+ )
+ )
+ )
+ )
+ (block $label$17
+ (if
+ (i32.eqz
+ (select
+ (i64.gt_s
+ (tee_local $1
+ (if (result i64)
+ (select
+ (select
+ (br_if $label$0
+ (i32.const 4)
+ (i32.const 1)
+ )
+ (br_if $label$0
+ (i32.const -120)
+ (i32.const 26)
+ )
+ (i32.const 32767)
+ )
+ (select
+ (i32.const 909534506)
+ (i32.const 6424)
+ (select
+ (i32.const -2147483648)
+ (i32.const -1)
+ (i32.const 32767)
+ )
+ )
+ (i32.const 1)
+ )
+ (block $label$19 (result i64)
+ (i64.extend_u/i32
+ (i32.const 255)
+ )
+ )
+ (block $label$20 (result i64)
+ (if (result i64)
+ (block $label$21 (result i32)
+ (block $label$22 (result i32)
+ (i32.const -42)
+ )
+ )
+ (i64.div_s
+ (i64.const -9223372036854775808)
+ (loop $label$23 (result i64)
+ (block
+ (if
+ (i32.eqz
+ (get_global $hangLimit)
+ )
+ (return
+ (i32.const -15)
+ )
+ )
+ (set_global $hangLimit
+ (i32.sub
+ (get_global $hangLimit)
+ (i32.const 1)
+ )
+ )
+ )
+ (get_local $1)
+ )
+ )
+ (if (result i64)
+ (select
+ (i32.const -20)
+ (i32.const 84)
+ (i32.const 706834235)
+ )
+ (block $label$24 (result i64)
+ (br $label$17)
+ )
+ (block $label$25 (result i64)
+ (return
+ (i32.const -44)
+ )
+ )
+ )
+ )
+ )
+ )
+ )
+ (i64.popcnt
+ (block $label$26 (result i64)
+ (br $label$17)
+ )
+ )
+ )
+ (i32.reinterpret/f32
+ (block $label$27 (result f32)
+ (return
+ (i32.const 1112421928)
+ )
+ )
+ )
+ (br_if $label$0
+ (i32.const 18)
+ (block $label$18 (result i32)
+ (br $label$17)
+ )
+ )
+ )
+ )
+ (block $label$28
+ (drop
+ (f32.const -2147483648)
+ )
+ )
+ (block $label$31
+ (drop
+ (block $label$32 (result f64)
+ (f64.const 3777575208023997706127184e35)
+ )
+ )
+ (nop)
+ )
+ )
+ )
+ (block $label$33
+ (loop $label$34
+ (block
+ (if
+ (i32.eqz
+ (get_global $hangLimit)
+ )
+ (return
+ (i32.const 73)
+ )
+ )
+ (set_global $hangLimit
+ (i32.sub
+ (get_global $hangLimit)
+ (i32.const 1)
+ )
+ )
+ )
+ (block $label$35
+ (loop $label$36
+ (block
+ (if
+ (i32.eqz
+ (get_global $hangLimit)
+ )
+ (return
+ (i32.const 155802894)
+ )
+ )
+ (set_global $hangLimit
+ (i32.sub
+ (get_global $hangLimit)
+ (i32.const 1)
+ )
+ )
+ )
+ (br_if $label$36
+ (i32.eqz
+ (block $label$37 (result i32)
+ (i32.const -1)
+ )
+ )
+ )
+ )
+ )
+ )
+ )
+ )
+ (set_local $1
+ (i64.trunc_s/f32
+ (f32.const 18446744073709551615)
+ )
+ )
+ (return
+ (i32.const -57)
+ )
+ )
+ )
+ (func $func_1 (param $0 i64) (param $1 i32) (result i64)
+ (block
+ (if
+ (i32.eqz
+ (get_global $hangLimit)
+ )
+ (return
+ (i64.const -40)
+ )
+ )
+ (set_global $hangLimit
+ (i32.sub
+ (get_global $hangLimit)
+ (i32.const 1)
+ )
+ )
+ )
+ (call $func_1
+ (tee_local $0
+ (i64.shl
+ (if (result i64)
+ (i32.eqz
+ (tee_local $1
+ (get_local $1)
+ )
+ )
+ (block $label$0 (result i64)
+ (return
+ (i64.const 18469)
+ )
+ )
+ (block $label$1 (result i64)
+ (return
+ (i64.const -1)
+ )
+ )
+ )
+ (tee_local $0
+ (tee_local $0
+ (block $label$2 (result i64)
+ (block $label$3 (result i64)
+ (return
+ (i64.const 127)
+ )
+ )
+ )
+ )
+ )
+ )
+ )
+ (get_local $1)
+ )
+ )
+ (func $func_2
+ (block
+ (if
+ (i32.eqz
+ (get_global $hangLimit)
+ )
+ (return)
+ )
+ (set_global $hangLimit
+ (i32.sub
+ (get_global $hangLimit)
+ (i32.const 1)
+ )
+ )
+ )
+ (if
+ (i32.eqz
+ (if (result i32)
+ (i32.const 5662)
+ (block $label$0 (result i32)
+ (return)
+ )
+ (block $label$1 (result i32)
+ (return)
+ )
+ )
+ )
+ (nop)
+ (if
+ (i32.const 508363275)
+ (block $label$2
+ (if
+ (i32.const -1)
+ (block $label$3
+ (nop)
+ (nop)
+ )
+ (block $label$4
+ (loop $label$5
+ (block
+ (if
+ (i32.eqz
+ (get_global $hangLimit)
+ )
+ (return)
+ )
+ (set_global $hangLimit
+ (i32.sub
+ (get_global $hangLimit)
+ (i32.const 1)
+ )
+ )
+ )
+ (block $label$6
+ (if
+ (i32.eqz
+ (i64.eqz
+ (block $label$7 (result i64)
+ (block $label$8 (result i64)
+ (loop $label$9 (result i64)
+ (block
+ (if
+ (i32.eqz
+ (get_global $hangLimit)
+ )
+ (return)
+ )
+ (set_global $hangLimit
+ (i32.sub
+ (get_global $hangLimit)
+ (i32.const 1)
+ )
+ )
+ )
+ (i64.const 5787412799727686208)
+ )
+ )
+ )
+ )
+ )
+ (block $label$10
+ (loop $label$11
+ (block
+ (if
+ (i32.eqz
+ (get_global $hangLimit)
+ )
+ (return)
+ )
+ (set_global $hangLimit
+ (i32.sub
+ (get_global $hangLimit)
+ (i32.const 1)
+ )
+ )
+ )
+ (block $label$12
+ (f64.store offset=4
+ (i32.and
+ (i32.const 48)
+ (i32.const 31)
+ )
+ (f64.const -nan:0xfffffffffffae)
+ )
+ )
+ )
+ )
+ (block $label$13
+ (block $label$14
+ (loop $label$15
+ (block
+ (if
+ (i32.eqz
+ (get_global $hangLimit)
+ )
+ (return)
+ )
+ (set_global $hangLimit
+ (i32.sub
+ (get_global $hangLimit)
+ (i32.const 1)
+ )
+ )
+ )
+ (block $label$16
+ (nop)
+ )
+ )
+ )
+ )
+ )
+ )
+ )
+ )
+ )
+ )
+ (block $label$17
+ (br_if $label$17
+ (i32.eqz
+ (if (result i32)
+ (if (result i32)
+ (select
+ (block $label$19 (result i32)
+ (i32.store offset=4 align=1
+ (i32.and
+ (block $label$20 (result i32)
+ (i32.const 19534)
+ )
+ (i32.const 31)
+ )
+ (br_if $label$19
+ (i32.const 488444703)
+ (i32.eqz
+ (i32.const -128)
+ )
+ )
+ )
+ (select
+ (i32.const -97)
+ (i32.const -2147483648)
+ (i32.const -125)
+ )
+ )
+ (if (result i32)
+ (block $label$21 (result i32)
+ (br $label$17)
+ )
+ (block $label$22 (result i32)
+ (i32.load16_u offset=22
+ (select
+ (loop $label$23 (result i32)
+ (block
+ (if
+ (i32.eqz
+ (get_global $hangLimit)
+ )
+ (return)
+ )
+ (set_global $hangLimit
+ (i32.sub
+ (get_global $hangLimit)
+ (i32.const 1)
+ )
+ )
+ )
+ (i32.const 15448)
+ )
+ (i32.rem_u
+ (i32.const 1026110509)
+ (i32.const 1)
+ )
+ (i32.const 97)
+ )
+ )
+ )
+ (block $label$24 (result i32)
+ (i32.trunc_u/f64
+ (call $deNan64
+ (select
+ (f64.const 6.013471909394168e-154)
+ (f64.const -nan:0xfffffffffffbb)
+ (call $func_0)
+ )
+ )
+ )
+ )
+ )
+ (block $label$18 (result i32)
+ (br_if $label$18
+ (i32.const -76)
+ (i32.eqz
+ (i32.clz
+ (i64.le_u
+ (i64.const 7)
+ (i64.const -30)
+ )
+ )
+ )
+ )
+ )
+ )
+ (i32.const -10)
+ (block $label$25 (result i32)
+ (loop $label$26 (result i32)
+ (block
+ (if
+ (i32.eqz
+ (get_global $hangLimit)
+ )
+ (return)
+ )
+ (set_global $hangLimit
+ (i32.sub
+ (get_global $hangLimit)
+ (i32.const 1)
+ )
+ )
+ )
+ (br_if $label$25
+ (i32.const 32767)
+ (i32.eqz
+ (i32.load offset=4 align=1
+ (i32.and
+ (i32.const 32767)
+ (i32.const 31)
+ )
+ )
+ )
+ )
+ )
+ )
+ )
+ (block $label$27 (result i32)
+ (br $label$17)
+ )
+ (block $label$28 (result i32)
+ (i32.const -124)
+ )
+ )
+ )
+ )
+ (block $label$29
+ (loop $label$30
+ (block
+ (if
+ (i32.eqz
+ (get_global $hangLimit)
+ )
+ (return)
+ )
+ (set_global $hangLimit
+ (i32.sub
+ (get_global $hangLimit)
+ (i32.const 1)
+ )
+ )
+ )
+ (loop $label$31
+ (block
+ (if
+ (i32.eqz
+ (get_global $hangLimit)
+ )
+ (return)
+ )
+ (set_global $hangLimit
+ (i32.sub
+ (get_global $hangLimit)
+ (i32.const 1)
+ )
+ )
+ )
+ (block $label$32
+ (loop $label$33
+ (block
+ (if
+ (i32.eqz
+ (get_global $hangLimit)
+ )
+ (return)
+ )
+ (set_global $hangLimit
+ (i32.sub
+ (get_global $hangLimit)
+ (i32.const 1)
+ )
+ )
+ )
+ (block $label$34
+ (block $label$35
+ (drop
+ (f64.load offset=22
+ (i32.and
+ (i32.const -31)
+ (i32.const 31)
+ )
+ )
+ )
+ )
+ )
+ )
+ )
+ )
+ )
+ (block $label$36
+ (br_if $label$17
+ (i32.eqz
+ (i32.const 1)
+ )
+ )
+ (block $label$37
+ (block $label$38
+ (block $label$39
+ (block $label$40
+ (block $label$41
+ (nop)
+ )
+ )
+ )
+ )
+ )
+ )
+ )
+ (nop)
+ )
+ )
+ )
+ )
+ (func $func_3 (result f32)
+ (local $0 i32)
+ (block
+ (if
+ (i32.eqz
+ (get_global $hangLimit)
+ )
+ (return
+ (f32.const 3595217802362880)
+ )
+ )
+ (set_global $hangLimit
+ (i32.sub
+ (get_global $hangLimit)
+ (i32.const 1)
+ )
+ )
+ )
+ (f32.const 1.1754943508222875e-38)
+ )
+ (func $func_4 (result i32)
+ (block
+ (if
+ (i32.eqz
+ (get_global $hangLimit)
+ )
+ (return
+ (i32.const 11)
+ )
+ )
+ (set_global $hangLimit
+ (i32.sub
+ (get_global $hangLimit)
+ (i32.const 1)
+ )
+ )
+ )
+ (i32.const 71)
+ )
+ (func $func_5 (param $0 i64) (param $1 i32) (param $2 i32) (result i64)
+ (local $3 f32)
+ (block
+ (if
+ (i32.eqz
+ (get_global $hangLimit)
+ )
+ (return
+ (i64.const -77)
+ )
+ )
+ (set_global $hangLimit
+ (i32.sub
+ (get_global $hangLimit)
+ (i32.const 1)
+ )
+ )
+ )
+ (call $func_1
+ (if (result i64)
+ (if (result i32)
+ (i32.ctz
+ (block $label$0 (result i32)
+ (return
+ (i64.const -94)
+ )
+ )
+ )
+ (block $label$1 (result i32)
+ (return
+ (i64.const -71)
+ )
+ )
+ (block $label$2 (result i32)
+ (call $func_4)
+ )
+ )
+ (tee_local $0
+ (select
+ (select
+ (loop $label$7 (result i64)
+ (block
+ (if
+ (i32.eqz
+ (get_global $hangLimit)
+ )
+ (return
+ (i64.const -9223372036854775808)
+ )
+ )
+ (set_global $hangLimit
+ (i32.sub
+ (get_global $hangLimit)
+ (i32.const 1)
+ )
+ )
+ )
+ (block $label$8 (result i64)
+ (return
+ (i64.const 4627)
+ )
+ )
+ )
+ (i64.sub
+ (i64.const 30983)
+ (if (result i64)
+ (i32.eqz
+ (i32.const -128)
+ )
+ (block $label$9 (result i64)
+ (i64.rem_s
+ (i64.load offset=3 align=4
+ (i32.and
+ (f32.le
+ (f32.load offset=4
+ (i32.and
+ (i32.const -126)
+ (i32.const 31)
+ )
+ )
+ (tee_local $3
+ (call $deNan32
+ (select
+ (call $deNan32
+ (f32.convert_s/i32
+ (get_local $1)
+ )
+ )
+ (f32.const 7.458154094308611e-10)
+ (get_local $1)
+ )
+ )
+ )
+ )
+ (i32.const 31)
+ )
+ )
+ (block $label$10 (result i64)
+ (return
+ (i64.const -72)
+ )
+ )
+ )
+ )
+ (block $label$11 (result i64)
+ (return
+ (i64.const 106)
+ )
+ )
+ )
+ )
+ (i32.const 0)
+ )
+ (loop $label$12 (result i64)
+ (block
+ (if
+ (i32.eqz
+ (get_global $hangLimit)
+ )
+ (return
+ (i64.const 65509)
+ )
+ )
+ (set_global $hangLimit
+ (i32.sub
+ (get_global $hangLimit)
+ (i32.const 1)
+ )
+ )
+ )
+ (block $label$13 (result i64)
+ (return
+ (i64.const 127)
+ )
+ )
+ )
+ (select
+ (f64.ge
+ (f64.const 1.1754943508222875e-38)
+ (if (result f64)
+ (f32.gt
+ (get_local $3)
+ (call $deNan32
+ (f32.sub
+ (get_local $3)
+ (get_local $3)
+ )
+ )
+ )
+ (block $label$3 (result f64)
+ (return
+ (i64.const 65457)
+ )
+ )
+ (block $label$4 (result f64)
+ (return
+ (i64.const 1011356149276677899)
+ )
+ )
+ )
+ )
+ (i32.reinterpret/f32
+ (f32.load offset=2 align=2
+ (i32.and
+ (select
+ (get_local $2)
+ (tee_local $2
+ (get_local $2)
+ )
+ (i32.load8_u offset=2
+ (i32.and
+ (loop $label$5 (result i32)
+ (block
+ (if
+ (i32.eqz
+ (get_global $hangLimit)
+ )
+ (return
+ (i64.const 0)
+ )
+ )
+ (set_global $hangLimit
+ (i32.sub
+ (get_global $hangLimit)
+ (i32.const 1)
+ )
+ )
+ )
+ (block $label$6 (result i32)
+ (return
+ (i64.const -65)
+ )
+ )
+ )
+ (i32.const 31)
+ )
+ )
+ )
+ (i32.const 31)
+ )
+ )
+ )
+ (i32.const 10853)
+ )
+ )
+ )
+ (block $label$14 (result i64)
+ (block $label$15
+ (nop)
+ )
+ (return
+ (i64.const -89)
+ )
+ )
+ )
+ (block $label$16 (result i32)
+ (block $label$17
+ (nop)
+ )
+ (nop)
+ (get_local $1)
+ )
+ )
+ )
+ (func $hangLimitInitializer
+ (set_global $hangLimit
+ (i32.const 25)
+ )
+ )
+ (func $deNan32 (param $0 f32) (result f32)
+ (if (result f32)
+ (f32.eq
+ (get_local $0)
+ (get_local $0)
+ )
+ (get_local $0)
+ (f32.const 0)
+ )
+ )
+ (func $deNan64 (param $0 f64) (result f64)
+ (if (result f64)
+ (f64.eq
+ (get_local $0)
+ (get_local $0)
+ )
+ (get_local $0)
+ (f64.const 0)
+ )
+ )
+)