aboutsummaryrefslogtreecommitdiff
path: root/tools/test-js-optimizer-asm-pre-output.js
blob: 25d521abb93f4244423920a669571aabd4e3e2dc (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
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
function a() {
  f((HEAPU8[10202] | 0) + 5 | 0);
  f(HEAPU8[10202] | 0);
  f(347);
  f(351);
  f(8);
  HEAP[1024] = 5;
  HEAP[1024] = 5;
  whee(12, 13);
  whee(12, 13);
  f((g = t(), g + g | 0) | 0);
}
function b($this, $__n) {
  $this = $this | 0;
  $__n = $__n | 0;
  var $4 = 0, $5 = 0, $10 = 0, $13 = 0, $14 = 0, $15 = 0, $23 = 0, $30 = 0, $38 = 0, $40 = 0;
  if (($__n | 0) == 0) {
    return;
  }
  $4 = $this;
  $5 = HEAP8[$4 & 16777215] | 0;
  if (($5 & 1) == 0) {
    $14 = 10;
    $13 = $5;
  } else {
    $10 = HEAP32[($this & 16777215) >> 2] | 0;
    $14 = ($10 & -2) - 1 | 0;
    $13 = $10 & 255;
  }
  $15 = $13 & 255;
  if (($15 & 1 | 0) == 0) {
    $23 = $15 >>> 1;
  } else {
    $23 = HEAP32[($this + 4 & 16777215) >> 2] | 0;
  }
  if (($14 - $23 | 0) >>> 0 < $__n >>> 0) {
    __ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE9__grow_byEjjjjjj($this, $14, ($__n - $14 | 0) + $23 | 0, $23, $23);
    $30 = HEAP8[$4 & 16777215] | 0;
  } else {
    $30 = $13;
  }
  if (($30 & 1) == 0) {
    $38 = $this + 1 | 0;
  } else {
    $38 = HEAP32[($this + 8 & 16777215) >> 2] | 0;
  }
  _memset($38 + $23 | 0, 0, $__n | 0, 1, 1213141516);
  $40 = $23 + $__n | 0;
  if ((HEAP8[$4 & 16777215] & 1) == 0) {
    HEAP8[$4 & 16777215] = $40 << 1 & 255;
  } else {
    HEAP32[($this + 4 & 16777215) >> 2] = $40;
  }
  HEAP8[$38 + $40 & 16777215] = 0;
  return;
}
function rett() {
  if (f()) {
    g();
    return 5;
  }
  return 0;
}
function ret2t() {
  if (f()) {
    g();
    return;
  }
}
function retf() {
  if (f()) {
    g();
    return +h();
  }
  return +0;
}
function i32_8() {
  if ((HEAP8[$4 & 16777215] | 0) == 0) {
    print(5);
  }
  if ((HEAP8[$5 & 16777215] | 0) == 0) {
    print(5);
  }
  if ((HEAP8[$6 & 16777215] | 0) == 0) {
    print(5);
  }
  if ((HEAP8[$7 & 16777215] | 0) == 0) {
    print(5);
  }
  if (HEAPU8[$8 & 16777215] << 24 >> 16 == 0) {
    print(5);
  }
  if (HEAPU8[$9 & 16777215] << 16 >> 16 == 0) {
    print(5);
  }
}
function sign_extension_simplification() {
  if ((HEAP8[$4 & 16777215] & 127) == 0) {
    print(5);
  }
  if ((HEAP8[$4 & 16777215] & 128) << 24 >> 24 == 0) {
    print(5);
  }
  if ((HEAP32[$5 & 16777215] & 32767) == 0) {
    print(5);
  }
  if ((HEAP32[$5 & 16777215] & 32768) << 16 >> 16 == 0) {
    print(5);
  }
}
function tempDoublePtr($45, $14, $28, $42) {
  $45 = $45 | 0;
  $14 = $14 | 0;
  $28 = $28 | 0;
  $42 = $42 | 0;
  var unelim = +0, bad = 0, unelim2 = +0;
  unelim = +(127.5 * +$14);
  HEAPF32[$45 >> 2] = ($14 < $28 ? $14 : $28) - $42;
  HEAP32[$world + 102916 >> 2] = _malloc(192) | 0;
  f(+HEAPF32[$45 >> 2]);
  g(HEAP32[$14 >> 2] | 0);
  $42 = +HEAPF32[$42 >> 2];
  ch($42);
  HEAPF32[$45 >> 2] = unelim;
  moar();
  bad = (HEAPF32[tempDoublePtr >> 2] = 127.5 * +$14, HEAP32[tempDoublePtr >> 2] | 0);
  func();
  HEAP32[4] = bad;
  HEAP32[5] = bad + 1;
  moar();
  unelim2 = 127 + $14 | 0;
  func();
  HEAP32[4] = unelim2;
}
function boxx($this, $aabb, $xf, $childIndex) {
  $this = $this | 0;
  $aabb = $aabb | 0;
  $xf = $xf | 0;
  $childIndex = $childIndex | 0;
  var $2 = +0, $4 = +0, $7 = +0, $9 = +0, $13 = +0, $14 = +0, $19 = +0, $20 = +0, $22 = +0, $25 = +0, $28 = +0, $32 = +0, $42 = +0, $45 = 0, $_sroa_06_0_insert_insert$1 = +0, $51 = 0, $_sroa_0_0_insert_insert$1 = +0;
  $2 = +HEAPF32[$xf + 12 >> 2];
  $4 = +HEAPF32[$this + 12 >> 2];
  $7 = +HEAPF32[$xf + 8 >> 2];
  $9 = +HEAPF32[$this + 16 >> 2];
  $13 = +HEAPF32[$xf >> 2];
  $14 = $13 + ($2 * $4 - $7 * $9);
  $19 = +HEAPF32[$xf + 4 >> 2];
  $20 = $4 * $7 + $2 * $9 + $19;
  $22 = +HEAPF32[$this + 20 >> 2];
  $25 = +HEAPF32[$this + 24 >> 2];
  $28 = $13 + ($2 * $22 - $7 * $25);
  $32 = $19 + ($7 * $22 + $2 * $25);
  $42 = +HEAPF32[$this + 8 >> 2];
  $45 = $aabb;
  $_sroa_06_0_insert_insert$1 = +(($20 < $32 ? $20 : $32) - $42);
  HEAPF32[$45 >> 2] = ($14 < $28 ? $14 : $28) - $42;
  HEAPF32[$45 + 4 >> 2] = $_sroa_06_0_insert_insert$1;
  $51 = $aabb + 8 | 0;
  $_sroa_0_0_insert_insert$1 = +($42 + ($20 > $32 ? $20 : $32));
  HEAPF32[$51 >> 2] = $42 + ($14 > $28 ? $14 : $28);
  HEAPF32[$51 + 4 >> 2] = $_sroa_0_0_insert_insert$1;
  return;
}