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
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
package test {
  class Literal extends Object {
    /* Static initializer */
    /*
    static public function Literal() {
      return;
    }
     */

    public function Literal() {
      super();
      return;
    }

    function test() {
      call(1, 1, 200, 200);
      return;
    }

  }
}

package test {
  class Arithmetics extends Object {
    /* Static initializer */
    /*
    static public function Arithmetics() {
      return;
    }
     */

    public function Arithmetics() {
      super();
      return;
    }

    function b() {
      var local1:int = 0;
      var local0:int = 0;
      var sp1 = local0 + 1;
      var local2 = sp1;
      local0 = sp1;
      local1 = local2;
      var sp2 = local0 + 1;
      local2 = sp2;
      local0 = sp2;
      var sp3 = local1 - local2;
      local2 = sp3;
      local1 = sp3;
      return local2;
    }

    function a() {
      var local0:int = 0;
      var sp1 = local0 + 1;
      local0 = sp1;
      var local1:int = sp1;
      var sp2 = local0;
      local0 = sp2 + 1;
      var local2:int = sp2;
      return local0;
    }

  }
}

package test {
  class Logic extends Object {
    /* Static initializer */
    /*
    static public function Logic() {
      return;
    }
     */

    public function Logic() {
      super();
      return;
    }

    function P_a_or_b_p_and_P_c_and_d_p_or_e(a:Boolean, b:Boolean, c:Boolean, d:Boolean, e:Boolean):Boolean {
      var local0:Boolean = ((a || b) && (c && d)) || e;
      away();
      return local0;
    }

    function a_or_b(a:Boolean, b:Boolean, c:Boolean, d:Boolean, e:Boolean):Boolean {
      /* 'Ouch!' cried I, then died.
      RuntimeError: no jumps yet :/
          /home/whitequark/furnace-avm2/lib/furnace-avm2/abc/decompiler.rb:458:in `expr_jump'
          /home/whitequark/furnace-avm2/lib/furnace-avm2/abc/decompiler.rb:83:in `expression'
          /home/whitequark/furnace-avm2/lib/furnace-avm2/abc/decompiler.rb:72:in `block in on_expression'
          /home/whitequark/furnace-avm2/lib/furnace-avm2/abc/decompiler.rb:71:in `catch'
          /home/whitequark/furnace-avm2/lib/furnace-avm2/abc/decompiler.rb:71:in `on_expression'
          /home/whitequark/furnace-avm2/lib/furnace-avm2/abc/decompiler.rb:22:in `decompile'
            ... et cetera
       */
    }

    function a_and_b_and_c(a:Boolean, b:Boolean, c:Boolean, d:Boolean, e:Boolean):Boolean {
      return a && (b && c);
    }

    function P_a_and_b_p_and_c(a:Boolean, b:Boolean, c:Boolean, d:Boolean, e:Boolean):Boolean {
      return (a && b) && c;
    }

    function a_and_b(a:Boolean, b:Boolean, c:Boolean, d:Boolean, e:Boolean):Boolean {
      return a && b;
    }

  }
}

package test {
  class Ternary extends Object {
    /* Static initializer */
    /*
    static public function Ternary() {
      return;
    }
     */

    public function Ternary() {
      super();
      return;
    }

    function hardcore(a:Boolean, b:Boolean, c:Boolean, d:Boolean, e:Boolean):Boolean {
      /* 'Ouch!' cried I, then died.
      RuntimeError: no jumps yet :/
          /home/whitequark/furnace-avm2/lib/furnace-avm2/abc/decompiler.rb:458:in `expr_jump'
          /home/whitequark/furnace-avm2/lib/furnace-avm2/abc/decompiler.rb:83:in `expression'
          /home/whitequark/furnace-avm2/lib/furnace-avm2/abc/decompiler.rb:72:in `block in on_expression'
          /home/whitequark/furnace-avm2/lib/furnace-avm2/abc/decompiler.rb:71:in `catch'
          /home/whitequark/furnace-avm2/lib/furnace-avm2/abc/decompiler.rb:71:in `on_expression'
          /home/whitequark/furnace-avm2/lib/furnace-avm2/abc/decompiler.rb:22:in `decompile'
            ... et cetera
       */
    }

    function q(a:Boolean, b:Boolean, c:Boolean, d:Boolean, e:Boolean):Boolean {
      return (a ? b : c) ? (b ? c : d) : (c ? d : e);
    }

    function a_I_b_E_c_I_d_E_e(a:Boolean, b:Boolean, c:Boolean, d:Boolean, e:Boolean):Boolean {
      return a ? b : (c ? d : e);
    }

    function a_I_b_I_c_E_d_E_e(a:Boolean, b:Boolean, c:Boolean, d:Boolean, e:Boolean):Boolean {
      return a ? (b ? c : d) : e;
    }

    function a_I_b_E_c(a:Boolean, b:Boolean, c:Boolean, d:Boolean, e:Boolean):Boolean {
      return (1 > 2) ? b : c;
    }

  }
}

package test {
  class Conditionals extends Object {
    /* Static initializer */
    /*
    static public function Conditionals() {
      return;
    }
     */

    public function Conditionals() {
      super();
      return;
    }

    function b(a:Boolean) {
      /* 'Ouch!' cried I, then died.
      RuntimeError: no jumps yet :/
          /home/whitequark/furnace-avm2/lib/furnace-avm2/abc/decompiler.rb:458:in `expr_jump'
          /home/whitequark/furnace-avm2/lib/furnace-avm2/abc/decompiler.rb:83:in `expression'
          /home/whitequark/furnace-avm2/lib/furnace-avm2/abc/decompiler.rb:72:in `block in on_expression'
          /home/whitequark/furnace-avm2/lib/furnace-avm2/abc/decompiler.rb:71:in `catch'
          /home/whitequark/furnace-avm2/lib/furnace-avm2/abc/decompiler.rb:71:in `on_expression'
          /home/whitequark/furnace-avm2/lib/furnace-avm2/abc/decompiler.rb:22:in `decompile'
            ... et cetera
       */
    }

    function a(a:Boolean) {
      baz();
      /* 'Ouch!' cried I, then died.
      RuntimeError: no jumps yet :/
          /home/whitequark/furnace-avm2/lib/furnace-avm2/abc/decompiler.rb:458:in `expr_jump'
          /home/whitequark/furnace-avm2/lib/furnace-avm2/abc/decompiler.rb:83:in `expression'
          /home/whitequark/furnace-avm2/lib/furnace-avm2/abc/decompiler.rb:72:in `block in on_expression'
          /home/whitequark/furnace-avm2/lib/furnace-avm2/abc/decompiler.rb:71:in `catch'
          /home/whitequark/furnace-avm2/lib/furnace-avm2/abc/decompiler.rb:71:in `on_expression'
          /home/whitequark/furnace-avm2/lib/furnace-avm2/abc/decompiler.rb:22:in `decompile'
            ... et cetera
       */
    }

  }
}

package test {
  class Loops extends Object {
    /* Static initializer */
    /*
    static public function Loops() {
      return;
    }
     */

    public function Loops() {
      super();
      return;
    }

    function e(f:Boolean) {
      /* 'Ouch!' cried I, then died.
      RuntimeError: no jumps yet :/
          /home/whitequark/furnace-avm2/lib/furnace-avm2/abc/decompiler.rb:458:in `expr_jump'
          /home/whitequark/furnace-avm2/lib/furnace-avm2/abc/decompiler.rb:83:in `expression'
          /home/whitequark/furnace-avm2/lib/furnace-avm2/abc/decompiler.rb:72:in `block in on_expression'
          /home/whitequark/furnace-avm2/lib/furnace-avm2/abc/decompiler.rb:71:in `catch'
          /home/whitequark/furnace-avm2/lib/furnace-avm2/abc/decompiler.rb:71:in `on_expression'
          /home/whitequark/furnace-avm2/lib/furnace-avm2/abc/decompiler.rb:22:in `decompile'
            ... et cetera
       */
    }

    function d() {
      /* 'Ouch!' cried I, then died.
      RuntimeError: no jumps yet :/
          /home/whitequark/furnace-avm2/lib/furnace-avm2/abc/decompiler.rb:458:in `expr_jump'
          /home/whitequark/furnace-avm2/lib/furnace-avm2/abc/decompiler.rb:83:in `expression'
          /home/whitequark/furnace-avm2/lib/furnace-avm2/abc/decompiler.rb:72:in `block in on_expression'
          /home/whitequark/furnace-avm2/lib/furnace-avm2/abc/decompiler.rb:71:in `catch'
          /home/whitequark/furnace-avm2/lib/furnace-avm2/abc/decompiler.rb:71:in `on_expression'
          /home/whitequark/furnace-avm2/lib/furnace-avm2/abc/decompiler.rb:22:in `decompile'
            ... et cetera
       */
    }

    function b() {
      weee();
      var local0:int = 1;
      /* 'Ouch!' cried I, then died.
      RuntimeError: no jumps yet :/
          /home/whitequark/furnace-avm2/lib/furnace-avm2/abc/decompiler.rb:458:in `expr_jump'
          /home/whitequark/furnace-avm2/lib/furnace-avm2/abc/decompiler.rb:83:in `expression'
          /home/whitequark/furnace-avm2/lib/furnace-avm2/abc/decompiler.rb:72:in `block in on_expression'
          /home/whitequark/furnace-avm2/lib/furnace-avm2/abc/decompiler.rb:71:in `catch'
          /home/whitequark/furnace-avm2/lib/furnace-avm2/abc/decompiler.rb:71:in `on_expression'
          /home/whitequark/furnace-avm2/lib/furnace-avm2/abc/decompiler.rb:22:in `decompile'
            ... et cetera
       */
    }

  }
}

package test {
  class Switch extends Object {
    /* Static initializer */
    /*
    static public function Switch() {
      return;
    }
     */

    public function Switch() {
      super();
      return;
    }

    function b(q:int):Boolean {
      /* 'Ouch!' cried I, then died.
      RuntimeError: no jumps yet :/
          /home/whitequark/furnace-avm2/lib/furnace-avm2/abc/decompiler.rb:458:in `expr_jump'
          /home/whitequark/furnace-avm2/lib/furnace-avm2/abc/decompiler.rb:83:in `expression'
          /home/whitequark/furnace-avm2/lib/furnace-avm2/abc/decompiler.rb:72:in `block in on_expression'
          /home/whitequark/furnace-avm2/lib/furnace-avm2/abc/decompiler.rb:71:in `catch'
          /home/whitequark/furnace-avm2/lib/furnace-avm2/abc/decompiler.rb:71:in `on_expression'
          /home/whitequark/furnace-avm2/lib/furnace-avm2/abc/decompiler.rb:22:in `decompile'
            ... et cetera
       */
    }

    function a(q:int):Boolean {
      var local0 = q;
      /* 'Ouch!' cried I, then died.
      RuntimeError: no jumps yet :/
          /home/whitequark/furnace-avm2/lib/furnace-avm2/abc/decompiler.rb:458:in `expr_jump'
          /home/whitequark/furnace-avm2/lib/furnace-avm2/abc/decompiler.rb:83:in `expression'
          /home/whitequark/furnace-avm2/lib/furnace-avm2/abc/decompiler.rb:72:in `block in on_expression'
          /home/whitequark/furnace-avm2/lib/furnace-avm2/abc/decompiler.rb:71:in `catch'
          /home/whitequark/furnace-avm2/lib/furnace-avm2/abc/decompiler.rb:71:in `on_expression'
          /home/whitequark/furnace-avm2/lib/furnace-avm2/abc/decompiler.rb:22:in `decompile'
            ... et cetera
       */
    }

  }
}

package test {
  class Exceptions extends Object {
    /* Static initializer */
    /*
    static public function Exceptions() {
      return;
    }
     */

    public function Exceptions() {
      super();
      return;
    }

    function c() {
      /* 'Ouch!' cried I, then died.
      RuntimeError: cannot consume 1: stack underflow with 0
          /home/whitequark/furnace-avm2/lib/furnace-avm2/transform/ast_build.rb:34:in `block in transform'
          /home/whitequark/furnace-avm2/lib/furnace-avm2/transform/ast_build.rb:182:in `call'
          /home/whitequark/furnace-avm2/lib/furnace-avm2/transform/ast_build.rb:182:in `block in transform'
          /home/whitequark/furnace-avm2/lib/furnace-avm2/abc/primitives/opcode_sequence.rb:32:in `each'
          /home/whitequark/furnace-avm2/lib/furnace-avm2/abc/primitives/opcode_sequence.rb:32:in `each'
          /home/whitequark/furnace-avm2/lib/furnace-avm2/transform/ast_build.rb:91:in `transform'
            ... et cetera
       */
    }

    function b() {
      /* Well, this is embarassing.

      Stage `expression' failed at:
      (7:new-activation)

      Opcode at the top of stack:
      (set-spurious 1
        (7:new-activation))
       */
    }

    function a() {
      /* Well, this is embarassing.

      Stage `expression' failed at:
      (7:new-activation)

      Opcode at the top of stack:
      (set-spurious 1
        (7:new-activation))
       */
    }

  }
}