summaryrefslogtreecommitdiff
path: root/test/two_sides.fromasm.clamp.no-opts
blob: 0034f3a531ed06c5d563b8f775b4f81f2bdb87f0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
(module
 (import "env" "memory" (memory $memory 256 256))
 (import "env" "table" (table $table 0 0 funcref))
 (import "env" "__memory_base" (global $__memory_base i32))
 (import "env" "__table_base" (global $__table_base i32))
 (export "_test" (func $_test))
 (func $f64-to-int (; 0 ;) (param $0 f64) (result i32)
  (if (result i32)
   (f64.ne
    (local.get $0)
    (local.get $0)
   )
   (i32.const -2147483648)
   (if (result i32)
    (f64.ge
     (local.get $0)
     (f64.const 2147483648)
    )
    (i32.const -2147483648)
    (if (result i32)
     (f64.le
      (local.get $0)
      (f64.const -2147483649)
     )
     (i32.const -2147483648)
     (i32.trunc_f64_s
      (local.get $0)
     )
    )
   )
  )
 )
 (func $_test (; 1 ;) (param $i1 i32) (param $i2 i32) (param $i3 i32) (param $i4 i32) (param $i5 i32) (result i32)
  (local $d6 f64)
  (if
   (i32.eqz
    (local.get $i5)
   )
   (block
    (local.set $d6
     (f64.convert_i32_s
      (i32.mul
       (local.get $i4)
       (local.get $i3)
      )
     )
    )
    (local.set $d6
     (f64.mul
      (f64.add
       (f64.convert_i32_s
        (local.get $i3)
       )
       (local.get $d6)
      )
      (f64.add
       (f64.convert_i32_s
        (local.get $i4)
       )
       (local.get $d6)
      )
     )
    )
    (local.set $i5
     (call $f64-to-int
      (local.get $d6)
     )
    )
    (return
     (local.get $i5)
    )
   )
   (block
    (local.set $d6
     (f64.convert_i32_s
      (i32.mul
       (local.get $i2)
       (local.get $i1)
      )
     )
    )
    (local.set $d6
     (f64.mul
      (f64.add
       (f64.convert_i32_s
        (local.get $i3)
       )
       (local.get $d6)
      )
      (f64.add
       (local.get $d6)
       (f64.convert_i32_s
        (local.get $i4)
       )
      )
     )
    )
    (local.set $i5
     (call $f64-to-int
      (local.get $d6)
     )
    )
    (return
     (local.get $i5)
    )
   )
  )
  (return
   (i32.const 0)
  )
 )
)