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
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
|
#include <stdlib.h>
#include "Relooper.h"
int main() {
#define SIZE (10*1024*1024)
char *buffer = (char*)malloc(SIZE);
Relooper::SetOutputBuffer(buffer, SIZE);
Block *b0 = new Block("print('entry'); var label; var state; var decisions = [759, 1223, 618, 1805, 277, 512, 204, 1545, 606, 734, 585, 447, 1670, 1031, 665, 1728, 353, 634, 1033, 13, 658, 589, 474, 854, 405, 1111, 1640, 697, 1156, 1357, 317, 618, 990, 1401, 405, 564, 497, 829, 653, 1194, 25, 322, 1178, 198, 1565, 1419, 1608, 486, 368, 606, 813, 22, 148, 141, 261, 375, 472, 964, 1106, 694, 205, 771, 44, 675, 545, 1027, 1528, 240, 1289, 564, 792, 744, 366, 668, 823, 210, 428, 1009, 1662, 1317, 1183, 681, 14, 1334, 712, 506, 224, 695, 401, 1035, 384, 486, 1519, 122, 1186, 1487, 1819, 1702, 463, 1706, 660, 1642, 847, 991, 976, 940, 867, 46, 23, 1449, 56, 1711, 634, 404, 1558, 168, 710, 1581, 1302, 870, 997, 1295, 1739, 769, 1005, 291, 1638, 1771, 842, 659, 1695, 713, 935, 802, 1173, 1572, 850, 607, 996, 55, 1576, 321, 1815, 662, 1044, 1612, 1680, 1050, 844, 553, 278, 1447, 1662, 1094, 1797, 774, 1013, 1204, 907, 340, 1172, 1460, 869, 1264, 111, 1176, 484, 845, 258, 417, 1246, 1017, 745, 189, 333, 1658, 1395, 1764, 1786, 165, 404, 847, 1429, 1574, 403, 718, 1118, 1756, 94, 56, 1498, 1696, 1355, 840, 50, 82, 371, 1087, 875, 1337, 267, 958, 1209, 1167, 1025, 1684, 184, 962, 1496, 201, 127, 372, 1, 1005, 402, 1387, 213, 1143, 1271, 167, 10, 12, 1060, 1390, 1366, 893, 747, 1005, 481, 876, 227, 514, 589, 250, 273, 1188, 1052, 719, 219, 1006, 38, 120, 1454, 489, 672, 149, 534, 1081, 1721, 586, 330, 25, 356, 1743, 1607, 336, 981, 419, 1036, 1293, 1026, 1300, 1453, 792, 22, 45, 420, 409, 1027, 1437, 1421, 795, 136, 1276, 1610, 1593]; var index = 0; function check() { if (index == decisions.length) throw 'HALT'; return decisions[index++] }");
Block *b1 = new Block("print(1); state = check();// ...........................................................................");
Block *b2 = new Block("print(2); state = check();// .........");
Block *b3 = new Block("print(3); state = check();// ..................................");
Block *b4 = new Block("print(4); state = check();// ...........................................................................................................................");
Block *b5 = new Block("print(5); state = check();// ..........................................................................................................................................");
Block *b6 = new Block("print(6); state = check();// .........");
Block *b7 = new Block("print(7); state = check();// .............................................................................................................................................................................................");
Block *b8 = new Block("print(8); state = check();// ....................................................................................................................................................................................................................................................");
Block *b9 = new Block("print(9); state = check();// ...................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................");
Block *b10 = new Block("print(10); state = check();// ...................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................");
Block *b11 = new Block("print(11); state = check();// ........................................................");
Block *b12 = new Block("print(12); state = check();// ................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................");
Block *b13 = new Block("print(13); state = check();// ...................");
Block *b14 = new Block("print(14); state = check();// .............................");
Block *b15 = new Block("print(15); state = check();// ..................................................");
Block *b16 = new Block("print(16); state = check();// ................................................................................................................................................................................................................................................................................................................................................................");
Block *b17 = new Block("print(17); state = check();// ................................................................");
Block *b18 = new Block("print(18); state = check();// ..............................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................");
Block *b19 = new Block("print(19); state = check();// ......................................................................................................................................................................................................................");
Block *b20 = new Block("print(20); state = check();// ..................................................................................................................................................................");
Block *b21 = new Block("print(21); state = check();// ...........................");
Block *b22 = new Block("print(22); state = check();// .........................................................................................................");
Block *b23 = new Block("print(23); state = check();// .................................................................................................................................................................................................................");
Block *b24 = new Block("print(24); state = check();// ...........................");
Block *b25 = new Block("print(25); state = check();// ......................................................................................................................................................");
Block *b26 = new Block("print(26); state = check();// .........................................................................................................................................................................................................................................................................");
Block *b27 = new Block("print(27); state = check();// .............................................................................................................................................................................");
Block *b28 = new Block("print(28); state = check();// ..............................................................................................................");
Block *b29 = new Block("print(29); state = check();// ...............");
Block *b30 = new Block("print(30); state = check();// .................................................................................................................................................................................................................");
Block *b31 = new Block("print(31); state = check();// ..........................................................................................................................................................................................................");
Block *b32 = new Block("print(32); state = check();// ......................................................................................................");
Block *b33 = new Block("print(33); state = check();// ....");
Block *b34 = new Block("print(34); state = check();// ..........................................................................................................................................");
Block *b35 = new Block("print(35); state = check();// .................................");
Block *b36 = new Block("print(36); state = check();// .........................");
Block *b37 = new Block("print(37); state = check();// ................................................................................................................................");
Block *b38 = new Block("print(38); state = check();// ............................................................................................................................................................................................................................................................................................................................................");
Block *b39 = new Block("print(39); state = check();// ................");
Block *b40 = new Block("print(40); state = check();// ................................................................................................................................................");
Block *b41 = new Block("print(41); state = check();// ...................................................................................................................................");
Block *b42 = new Block("print(42); state = check();// .....................................................");
Block *b43 = new Block("print(43); state = check();// .........");
Block *b44 = new Block("print(44); state = check();// .....................................................................................................................................................");
Block *b45 = new Block("print(45); state = check();// ............................");
Block *b46 = new Block("print(46); state = check();// .............................................................................");
Block *b47 = new Block("print(47); state = check();// ....................................................................................................................................");
Block *b48 = new Block("print(48); state = check();// ............");
Block *b49 = new Block("print(49); state = check();// ............................................................................................................................................................................................................................................................................................");
Block *b50 = new Block("print(50); state = check();// ........................................");
Block *b51 = new Block("print(51); state = check();// .............................................................................................");
Block *b52 = new Block("print(52); state = check();// ..............................................................................");
Block *b53 = new Block("print(53); state = check();// ..............................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................");
Block *b54 = new Block("print(54); state = check();// .....................................");
Block *b55 = new Block("print(55); state = check();// ...........................................................................................................................................................................................................");
Block *b56 = new Block("print(56); state = check();// ....................................................................................................................................................................................................................");
Block *b57 = new Block("print(57); state = check();// ...........................................................................................................................................................................................................................................................................................................................");
Block *b58 = new Block("print(58); state = check();// ......................................................................................");
Block *b59 = new Block("print(59); state = check();// ...................................");
Block *b60 = new Block("print(60); state = check();// ......................................................................................................................................................................................................................................");
Block *b61 = new Block("print(61); state = check();// .........................................................................................................................................................");
Block *b62 = new Block("print(62); state = check();// .......................................................................................");
Block *b63 = new Block("print(63); state = check();// .....................................................................................................................................................................");
Block *b64 = new Block("print(64); state = check();// .......................................................................................................................................................................................................................................................................");
Block *b65 = new Block("print(65); state = check();// .........................................................");
Block *b66 = new Block("print(66); state = check();// ...............................................................................................................");
Block *b67 = new Block("print(67); state = check();// .....................................................................................................................................................................................................................");
Block *b68 = new Block("print(68); state = check();// ......................................................................................................................................................................................................................................................................................................................");
Block *b69 = new Block("print(69); state = check();// ......................................................................................................................................................");
Block *b70 = new Block("print(70); state = check();// ..........................................................................................................................");
Block *b71 = new Block("print(71); state = check();// ...........................................................................................................................................................................................................");
Block *b72 = new Block("print(72); state = check();// ..........................................................................................................");
Block *b73 = new Block("print(73); state = check();// .");
Block *b74 = new Block("print(74); state = check();// ..............................................");
Block *b75 = new Block("print(75); state = check();// .............................................");
Block *b76 = new Block("print(76); state = check();// ..............................................................................................................................................................................................................................................................................................................................................................................................................................");
Block *b77 = new Block("print(77); state = check();// ...........................................................................................................................................................................................................................................................................................");
Block *b78 = new Block("print(78); state = check();// ..........................................................................................");
Block *b79 = new Block("print(79); state = check();// ........................................
|