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
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
|
const vmt_TV
:TV.Start
const vmt_Tree
:Tree.Init
:Tree.SetRight
:Tree.SetLeft
:Tree.GetRight
:Tree.GetLeft
:Tree.GetKey
:Tree.SetKey
:Tree.GetHas_Right
:Tree.GetHas_Left
:Tree.SetHas_Left
:Tree.SetHas_Right
:Tree.Compare
:Tree.Insert
:Tree.Delete
:Tree.Remove
:Tree.RemoveRight
:Tree.RemoveLeft
:Tree.Search
:Tree.Print
:Tree.RecPrint
:Tree.accept
const vmt_Visitor
:Visitor.visit
const vmt_MyVisitor
:MyVisitor.visit
func Main [in 0, out 0, local 0]
$t0 = HeapAllocZ(4)
[$t0] = :vmt_TV
if $t0 goto :null1
Error("null pointer")
null1:
$t1 = [$t0]
$t1 = [$t1]
$a0 = $t0
call $t1
$t1 = $v0
PrintIntS($t1)
ret
func TV.Start [in 0, out 0, local 1]
local[0] = $s0
$t0 = HeapAllocZ(28)
[$t0] = :vmt_Tree
$s0 = $t0
if $s0 goto :null2
Error("null pointer")
null2:
$t0 = [$s0]
$t0 = [$t0]
$a0 = $s0
$a1 = 16
call $t0
if $s0 goto :null3
Error("null pointer")
null3:
$t0 = [$s0]
$t0 = [$t0+72]
$a0 = $s0
call $t0
PrintIntS(100000000)
if $s0 goto :null4
Error("null pointer")
null4:
$t0 = [$s0]
$t0 = [$t0+48]
$a0 = $s0
$a1 = 8
call $t0
if $s0 goto :null5
Error("null pointer")
null5:
$t0 = [$s0]
$t0 = [$t0+48]
$a0 = $s0
$a1 = 24
call $t0
if $s0 goto :null6
Error("null pointer")
null6:
$t0 = [$s0]
$t0 = [$t0+48]
$a0 = $s0
$a1 = 4
call $t0
if $s0 goto :null7
Error("null pointer")
null7:
$t0 = [$s0]
$t0 = [$t0+48]
$a0 = $s0
$a1 = 12
call $t0
if $s0 goto :null8
Error("null pointer")
null8:
$t0 = [$s0]
$t0 = [$t0+48]
$a0 = $s0
$a1 = 20
call $t0
if $s0 goto :null9
Error("null pointer")
null9:
$t0 = [$s0]
$t0 = [$t0+48]
$a0 = $s0
$a1 = 28
call $t0
if $s0 goto :null10
Error("null pointer")
null10:
$t0 = [$s0]
$t0 = [$t0+48]
$a0 = $s0
$a1 = 14
call $t0
if $s0 goto :null11
Error("null pointer")
null11:
$t0 = [$s0]
$t0 = [$t0+72]
$a0 = $s0
call $t0
PrintIntS(100000000)
$t0 = HeapAllocZ(12)
[$t0] = :vmt_MyVisitor
$t0 = $t0
PrintIntS(50000000)
if $s0 goto :null12
Error("null pointer")
null12:
$t1 = [$s0]
$t1 = [$t1+80]
$a0 = $s0
$a1 = $t0
call $t1
PrintIntS(100000000)
if $s0 goto :null13
Error("null pointer")
null13:
$t1 = [$s0]
$t1 = [$t1+68]
$a0 = $s0
$a1 = 24
call $t1
$t1 = $v0
PrintIntS($t1)
if $s0 goto :null14
Error("null pointer")
null14:
$t1 = [$s0]
$t1 = [$t1+68]
$a0 = $s0
$a1 = 12
call $t1
$t1 = $v0
PrintIntS($t1)
if $s0 goto :null15
Error("null pointer")
null15:
$t1 = [$s0]
$t1 = [$t1+68]
$a0 = $s0
$a1 = 16
call $t1
$t1 = $v0
PrintIntS($t1)
if $s0 goto :null16
Error("null pointer")
null16:
$t1 = [$s0]
$t1 = [$t1+68]
$a0 = $s0
$a1 = 50
call $t1
$t1 = $v0
PrintIntS($t1)
if $s0 goto :null17
Error("null pointer")
null17:
$t1 = [$s0]
$t1 = [$t1+68]
$a0 = $s0
$a1 = 12
call $t1
$t1 = $v0
PrintIntS($t1)
if $s0 goto :null18
Error("null pointer")
null18:
$t1 = [$s0]
$t1 = [$t1+52]
$a0 = $s0
$a1 = 12
call $t1
if $s0 goto :null19
Error("null pointer")
null19:
$t1 = [$s0]
$t1 = [$t1+72]
$a0 = $s0
call $t1
if $s0 goto :null20
Error("null pointer")
null20:
$t1 = [$s0]
$t1 = [$t1+68]
$a0 = $s0
$a1 = 12
call $t1
$t1 = $v0
PrintIntS($t1)
$v0 = 0
$s0 = local[0]
ret
func Tree.Init [in 0, out 0, local 0]
$t0 = $a0
$t1 = $a1
[$t0+12] = $t1
[$t0+16] = 0
[$t0+20] = 0
$v0 = 1
ret
func Tree.SetRight [in 0, out 0, local 0]
$t0 = $a0
$t1 = $a1
[$t0+8] = $t1
$v0 = 1
ret
func Tree.SetLeft [in 0, out 0, local 0]
$t0 = $a0
$t1 = $a1
[$t0+4] = $t1
$v0 = 1
ret
func Tree.GetRight [in 0, out 0, local 0]
$t0 = $a0
$t0 = [$t0+8]
$v0 = $t0
ret
func Tree.GetLeft [in 0, out 0, local 0]
$t0 = $a0
$t0 = [$t0+4]
$v0 = $t0
ret
func Tree.GetKey [in 0, out 0, local 0]
$t0 = $a0
$t0 = [$t0+12]
$v0 = $t0
ret
func Tree.SetKey [in 0, out 0, local 0]
$t0 = $a0
$t1 = $a1
[$t0+12] = $t1
$v0 = 1
ret
func Tree.GetHas_Right [in 0, out 0, local 0]
$t0 = $a0
$t0 = [$t0+20]
$v0 = $t0
ret
func Tree.GetHas_Left [in 0, out 0, local 0]
$t0 = $a0
$t0 = [$t0+16]
$v0 = $t0
ret
func Tree.SetHas_Left [in 0, out 0, local 0]
$t0 = $a0
$t1 = $a1
[$t0+16] = $t1
$v0 = 1
ret
func Tree.SetHas_Right [in 0, out 0, local 0]
$t0 = $a0
$t1 = $a1
[$t0+20] = $t1
$v0 = 1
ret
func Tree.Compare [in 0, out 0, local 0]
$t0 = $a1
$t1 = $a2
$t2 = Add($t1 1)
$t1 = LtS($t0 $t1)
if0 $t1 goto :if1_else
$t1 = 0
goto :if1_end
if1_else:
$t2 = LtS($t0 $t2)
$t2 = Sub(1 $t2)
if0 $t2 goto :if2_else
$t1 = 0
goto :if2_end
if2_else:
$t1 = 1
if2_end:
if1_end:
$v0 = $t1
ret
func Tree.Insert [in 0, out 0, local 4]
local[0] = $s0
local[1] = $s1
local[2] = $s2
local[3] = $s3
$s0 = $a0
$s1 = $a1
$t0 = HeapAllocZ(28)
[$t0] = :vmt_Tree
$s2 = $t0
if $s2 goto :null21
Error("null pointer")
null21:
$t0 = [$s2]
$t0 = [$t0]
$a0 = $s2
$a1 = $s1
call $t0
$s0 = $s0
$s3 = 1
while1_top:
if0 $s3 goto :while1_end
if $s0 goto :null22
Error("null pointer")
null22:
$t0 = [$s0]
$t0 = [$t0+20]
$a0 = $s0
call $t0
$t0 = $v0
$t0 = LtS($s1 $t0)
if0 $t0 goto :if3_else
if $s0 goto :null23
Error("null pointer")
null23:
$t0 = [$s0]
$t0 = [$t0+32]
$a0 = $s0
call $t0
$t0 = $v0
if0 $t0 goto :if4_else
if $s0 goto :null24
Error("null pointer")
null24:
$t0 = [$s0]
$t0 = [$t0+16]
$a0 = $s0
call $t0
$s0 = $v0
goto :if4_end
if4_else:
$s3 = 0
if $s0 goto :null25
Error("null pointer")
null25:
$t0 = [$s0]
$t0 = [$t0+36]
$a0 = $s0
$a1 = 1
call $t0
if $s0 goto :null26
Error("null pointer")
null26:
$t0 = [$s0]
$t0 = [$t0+8]
$a0 = $s0
$a1 = $s2
call $t0
if4_end:
goto :if3_end
if3_else:
if $s0 goto :null27
Error("null pointer")
null27:
$t0 = [$s0]
$t0 = [$t0+28]
$a0 = $s0
call $t0
$t0 = $v0
if0 $t0 goto :if5_else
if $s0 goto :null28
Error("null pointer")
null28:
$t0 = [$s0]
$t0 = [$t0+12]
$a0 = $s0
call $t0
$s0 = $v0
goto :if5_end
if5_else:
$s3 = 0
if $s0 goto :null29
Error("null pointer")
null29:
$t0 = [$s0]
$t0 = [$t0+40]
$a0 = $s0
$a1 = 1
call $t0
if $s0 goto :null30
Error("null pointer")
null30:
$t0 = [$s0]
$t0 = [$t0+4]
$a0 = $s0
$a1 = $s2
call $t0
if5_end:
if3_end:
goto :while1_top
while1_end:
$v0 = 1
$s0 = local[0]
$s1 = local[1]
$s2 = local[2]
$s3 = local[3]
ret
func Tree.Delete [in 0, out 0, local 7]
local[0] = $s0
local[1] = $s1
local[2] = $s2
local[3] = $s3
local[4] = $s4
local[5] = $s5
local[6] = $s6
$s0 = $a0
$s1 = $a1
$s2 = $s0
$s3 = $s0
$s4 = 1
$s5 = 0
$s6 = 1
while2_top:
if0 $s4 goto :while2_end
if $s2 goto :null31
Error("null pointer")
null31:
$t0 = [$s2]
$t0 = [$t0+20]
$a0 = $s2
call $t0
$t0 = $v0
$t1 = LtS($s1 $t0)
if0 $t1 goto :if6_else
if $s2 goto :null32
Error("null pointer")
null32:
$t1 = [$s2]
$t1 = [$t1+32]
$a0 = $s2
call $t1
$t1 = $v0
if0 $t1 goto :if7_else
$s3 = $s2
if $s2 goto :null33
Error("null pointer")
null33:
$t1 = [$s2]
$t1 = [$t1+16]
$a0 = $s2
call $t1
$s2 = $v0
goto :if7_end
if7_else:
$s4 = 0
if7_end:
goto :if6_end
if6_else:
$t0 = LtS($t0 $s1)
if0 $t0 goto :if8_else
if $s2 goto :null34
Error("null pointer")
null34:
$t0 = [$s2]
$t0 = [$t0+28]
$a0 = $s2
call $t0
$t0 = $v0
if0 $t0 goto :if9_else
$s3 = $s2
if $s2 goto :null35
Error("null pointer")
null35:
$t0 = [$s2]
$t0 = [$t0+12]
$a0 = $s2
call $t0
$s2 = $v0
goto :if9_end
if9_else:
$s4 = 0
if9_end:
goto :if8_end
if8_else:
if0 $s6 goto :if10_else
if $s2 goto :null36
Error("null pointer")
null36:
$t0 = [$s2]
$t0 = [$t0+28]
$a0 = $s2
call $t0
$t0 = $v0
$t0 = Sub(1 $t0)
if0 $t0 goto :ss1_else
if $s2 goto :null37
Error("null pointer")
null37:
$t0 = [$s2]
$t0 = [$t0+32]
$a0 = $s2
call $t0
$t0 = $v0
$t0 = Sub(1 $t0)
goto :ss1_end
ss1_else:
$t0 = 0
ss1_end:
if0 $t0 goto :if11_else
goto :if11_end
if11_else:
$t0 = [$s0]
$t0 = [$t0+56]
$a0 = $s0
$a1 = $s3
$a2 = $s2
call $t0
if11_end:
goto :if10_end
if10_else:
$t0 = [$s0]
$t0 = [$t0+56]
$a0 = $s0
$a1 = $s3
$a2 = $s2
call $t0
if10_end:
$s5 = 1
$s4 = 0
if8_end:
if6_end:
$s6 = 0
goto :while2_top
while2_end:
$v0 = $s5
$s0 = local[0]
$s1 = local[1]
$s2 = local[2]
$s3 = local[3]
$s4 = local[4]
$s5 = local[5]
$s6 = local[6]
ret
func Tree.Remove [in 0, out 0, local 3]
local[0] = $s0
local[1] = $s1
local[2] = $s2
$s0 = $a0
$s1 = $a1
$s2 = $a2
if $s2 goto :null38
Error("null pointer")
null38:
$t0 = [$s2]
$t0 = [$t0+32]
$a0 = $s2
call $t0
$t0 = $v0
if0 $t0 goto :if12_else
$t0 = [$s0]
$t0 = [$t0+64]
$a0 = $s0
$a1 = $s1
$a2 = $s2
call $t0
goto :if12_end
if12_else:
if $s2 goto :null39
Error("null pointer")
null39:
$t0 = [$s2]
$t0 = [$t0+28]
$a0 = $s2
call $t0
$t0 = $v0
if0 $t0 goto :if13_else
$t0 = [$s0]
$t0 = [$t0+60]
$a0 = $s0
$a1 = $s1
$a2 = $s2
call $t0
goto :if13_end
if13_else:
if $s2 goto :null40
Error("null pointer")
null40:
$t0 = [$s2]
$t0 = [$t0+20]
$a0 = $s2
call $t0
$s2 = $v0
if $s1 goto :null41
Error("null pointer")
null41:
$t0 = [$s1]
$t0 = [$t0+16]
$a0 = $s1
call $t0
$t0 = $v0
if $t0 goto :null42
Error("null pointer")
null42:
$t1 = [$t0]
$t1 = [$t1+20]
$a0 = $t0
call $t1
$t1 = $v0
$t0 = [$s0]
$t0 = [$t0+44]
$a0 = $s0
$a1 = $s2
$a2 = $t1
call $t0
$t0 = $v0
if0 $t0 goto :if14_else
if $s1 goto :null43
Error("null pointer")
null43:
$t0 = [$s1]
$t0 = [$t0+8]
$t1 = [$s0+24]
$a0 = $s1
$a1 = $t1
call $t0
if $s1 goto :null44
Error("null pointer")
null44:
$t1 = [$s1]
$t1 = [$t1+36]
$a0 = $s1
$a1 = 0
call $t1
goto :if14_end
if14_else:
if $s1 goto :null45
Error("null pointer")
null45:
$t1 = [$s1]
$t1 = [$t1+4]
$t0 = [$s0+24]
$a0 = $s1
$a1 = $t0
call $t1
if $s1 goto :null46
Error("null pointer")
null46:
$t0 = [$s1]
$t0 = [$t0+40]
$a0 = $s1
$a1 = 0
call $t0
if14_end:
if13_end:
if12_end:
$v0 = 1
$s0 = local[0]
$s1 = local[1]
$s2 = local[2]
ret
func Tree.RemoveRight [in 0, out 0, local 4]
local[0] = $s0
local[1] = $s1
local[2] = $s2
local[3] = $s3
$s0 = $a0
$s1 = $a1
$s2 = $a2
while3_top:
if $s2 goto :null47
Error("null pointer")
null47:
$t0 = [$s2]
$t0 = [$t0+28]
$a0 = $s2
call $t0
$t0 = $v0
if0 $t0 goto :while3_end
if $s2 goto :null48
Error("null pointer")
null48:
$s3 = [$s2]
$s3 = [$s3+24]
if $s2 goto :null49
Error("null pointer")
null49:
$t0 = [$s2]
$t0 = [$t0+12]
$a0 = $s2
call $t0
$t0 = $v0
if $t0 goto :null50
Error("null pointer")
null50:
$t1 = [$t0]
$t1 = [$t1+20]
$a0 = $t0
call $t1
$t1 = $v0
$a0 = $s2
$a1 = $t1
call $s3
$s1 = $s2
if $s2 goto :null51
Error("null pointer")
null51:
$t1 = [$s2]
$t1 = [$t1+12]
$a0 = $s2
call $t1
$s2 = $v0
goto :while3_top
while3_end:
if $s1 goto :null52
Error("null pointer")
null52:
$t1 = [$s1]
$t1 = [$t1+4]
$t0 = [$s0+24]
$a0 = $s1
$a1 = $t0
call $t1
if $s1 goto :null53
Error("null pointer")
null53:
$t0 = [$s1]
$t0 = [$t0+40]
$a0 = $s1
$a1 = 0
call $t0
$v0 = 1
$s0 = local[0]
$s1 = local[1]
$s2 = local[2]
$s3 = local[3]
ret
func Tree.RemoveLeft [in 0, out 0, local 4]
local[0] = $s0
local[1] = $s1
local[2] = $s2
local[3] = $s3
$s0 = $a0
$s1 = $a1
$s2 = $a2
while4_top:
if $s2 goto :null54
Error("null pointer")
null54:
$t0 = [$s2]
$t0 = [$t0+32]
$a0 = $s2
call $t0
$t0 = $v0
if0 $t0 goto :while4_end
if $s2 goto :null55
Error("null pointer")
null55:
$s3 = [$s2]
$s3 = [$s3+24]
if $s2 goto :null56
Error("null pointer")
null56:
$t0 = [$s2]
$t0 = [$t0+16]
$a0 = $s2
call $t0
$t0 = $v0
if $t0 goto :null57
Error("null pointer")
null57:
$t1 = [$t0]
$t1 = [$t1+20]
$a0 = $t0
call $t1
$t1 = $v0
$a0 = $s2
$a1 = $t1
call $s3
$s1 = $s2
if $s2 goto :null58
Error("null pointer")
null58:
$t1 = [$s2]
$t1 = [$t1+16]
$a0 = $s2
call $t1
$s2 = $v0
goto :while4_top
while4_end:
if $s1 goto :null59
Error("null pointer")
null59:
$t1 = [$s1]
$t1 = [$t1+8]
$t0 = [$s0+24]
$a0 = $s1
$a1 = $t0
call $t1
if $s1 goto :null60
Error("null pointer")
null60:
$t0 = [$s1]
$t0 = [$t0+36]
$a0 = $s1
$a1 = 0
call $t0
$v0 = 1
$s0 = local[0]
$s1 = local[1]
$s2 = local[2]
$s3 = local[3]
ret
func Tree.Search [in 0, out 0, local 4]
local[0] = $s0
local[1] = $s1
local[2] = $s2
local[3] = $s3
$t0 = $a0
$s0 = $a1
$s1 = $t0
$s2 = 1
$s3 = 0
while5_top:
if0 $s2 goto :while5_end
if $s1 goto :null61
Error("null pointer")
null61:
$t0 = [$s1]
$t0 = [$t0+20]
$a0 = $s1
call $t0
$t0 = $v0
$t1 = LtS($s0 $t0)
if0 $t1 goto :if15_else
if $s1 goto :null62
Error("null pointer")
null62:
$t1 = [$s1]
$t1 = [$t1+32]
$a0 = $s1
call $t1
$t1 = $v0
if0 $t1 goto :if16_else
if $s1 goto :null63
Error("null pointer")
null63:
$t1 = [$s1]
$t1 = [$t1+16]
$a0 = $s1
call $t1
$s1 = $v0
goto :if16_end
if16_else:
$s2 = 0
if16_end:
goto :if15_end
if15_else:
$t0 = LtS($t0 $s0)
if0 $t0 goto :if17_else
if $s1 goto :null64
Error("null pointer")
null64:
$t0 = [$s1]
$t0 = [$t0+28]
$a0 = $s1
call $t0
$t0 = $v0
if0 $t0 goto :if18_else
if $s1 goto :null65
Error("null pointer")
null65:
$t0 = [$s1]
$t0 = [$t0+12]
$a0 = $s1
call $t0
$s1 = $v0
goto :if18_end
if18_else:
$s2 = 0
if18_end:
goto :if17_end
if17_else:
$s3 = 1
$s2 = 0
if17_end:
if15_end:
goto :while5_top
while5_end:
$v0 = $s3
$s0 = local[0]
$s1 = local[1]
$s2 = local[2]
$s3 = local[3]
ret
func Tree.Print [in 0, out 0, local 0]
$t0 = $a0
$t1 = $t0
$t2 = [$t0]
$t2 = [$t2+76]
$a0 = $t0
$a1 = $t1
call $t2
$v0 = 1
ret
func Tree.RecPrint [in 0, out 0, local 3]
local[0] = $s0
local[1] = $s1
local[2] = $s2
$s0 = $a0
$s1 = $a1
if $s1 goto :null66
Error("null pointer")
null66:
$t0 = [$s1]
$t0 = [$t0+32]
$a0 = $s1
call $t0
$t0 = $v0
if0 $t0 goto :if19_else
$s2 = [$s0]
$s2 = [$s2+76]
if $s1 goto :null67
Error("null pointer")
null67:
$t0 = [$s1]
$t0 = [$t0+16]
$a0 = $s1
call $t0
$t0 = $v0
$a0 = $s0
$a1 = $t0
call $s2
goto :if19_end
if19_else:
if19_end:
if $s1 goto :null68
Error("null pointer")
null68:
$t0 = [$s1]
$t0 = [$t0+20]
$a0 = $s1
call $t0
$t0 = $v0
PrintIntS($t0)
if $s1 goto :null69
Error("null pointer")
null69:
$t0 = [$s1]
$t0 = [$t0+28]
$a0 = $s1
call $t0
$t0 = $v0
if0 $t0 goto :if20_else
$s2 = [$s0]
$s2 = [$s2+76]
if $s1 goto :null70
Error("null pointer")
null70:
$t0 = [$s1]
$t0 = [$t0+12]
$a0 = $s1
call $t0
$t0 = $v0
$a0 = $s0
$a1 = $t0
call $s2
goto :if20_end
if20_else:
if20_end:
$v0 = 1
$s0 = local[0]
$s1 = local[1]
$s2 = local[2]
ret
func Tree.accept [in 0, out 0, local 0]
$t0 = $a0
$t1 = $a1
PrintIntS(333)
if $t1 goto :null71
Error("null pointer")
null71:
$t2 = [$t1]
$t2 = [$t2]
$a0 = $t1
$a1 = $t0
call $t2
$v0 = 0
ret
func Visitor.visit [in 0, out 0, local 2]
local[0] = $s0
local[1] = $s1
$s0 = $a0
$s1 = $a1
if $s1 goto :null72
Error("null pointer")
null72:
$t0 = [$s1]
$t0 = [$t0+28]
$a0 = $s1
call $t0
$t0 = $v0
if0 $t0 goto :if21_else
if $s1 goto :null73
Error("null pointer")
null73:
$t0 = [$s1]
$t0 = [$t0+12]
$a0 = $s1
call $t0
$t0 = $v0
[$s0+8] = $t0
$t0 = [$s0+8]
if $t0 goto :null74
Error("null pointer")
null74:
$t1 = [$t0]
$t1 = [$t1+80]
$a0 = $t0
$a1 = $s0
call $t1
goto :if21_end
if21_else:
if21_end:
if $s1 goto :null75
Error("null pointer")
null75:
$t1 = [$s1]
$t1 = [$t1+32]
$a0 = $s1
call $t1
$t1 = $v0
if0 $t1 goto :if22_else
if $s1 goto :null76
Error("null pointer")
null76:
$t1 = [$s1]
$t1 = [$t1+16]
$a0 = $s1
call $t1
$t1 = $v0
[$s0+4] = $t1
$t1 = [$s0+4]
if $t1 goto :null77
Error("null pointer")
null77:
$t0 = [$t1]
$t0 = [$t0+80]
$a0 = $t1
$a1 = $s0
call $t0
goto :if22_end
if22_else:
if22_end:
$v0 = 0
$s0 = local[0]
$s1 = local[1]
ret
func MyVisitor.visit [in 0, out 0, local 2]
local[0] = $s0
local[1] = $s1
$s0 = $a0
$s1 = $a1
if $s1 goto :null78
Error("null pointer")
null78:
$t0 = [$s1]
$t0 = [$t0+28]
$a0 = $s1
call $t0
$t0 = $v0
if0 $t0 goto :if23_else
if $s1 goto :null79
Error("null pointer")
null79:
$t0 = [$s1]
$t0 = [$t0+12]
$a0 = $s1
call $t0
$t0 = $v0
[$s0+8] = $t0
$t0 = [$s0+8]
if $t0 goto :null80
Error("null pointer")
null80:
$t1 = [$t0]
$t1 = [$t1+80]
$a0 = $t0
$a1 = $s0
call $t1
goto :if23_end
if23_else:
if23_end:
if $s1 goto :null81
Error("null pointer")
null81:
$t1 = [$s1]
$t1 = [$t1+20]
$a0 = $s1
call $t1
$t1 = $v0
PrintIntS($t1)
if $s1 goto :null82
Error("null pointer")
null82:
$t1 = [$s1]
$t1 = [$t1+32]
$a0 = $s1
call $t1
$t1 = $v0
if0 $t1 goto :if24_else
if $s1 goto :null83
Error("null pointer")
null83:
$t1 = [$s1]
$t1 = [$t1+16]
$a0 = $s1
call $t1
$t1 = $v0
[$s0+4] = $t1
$t1 = [$s0+4]
if $t1 goto :null84
Error("null pointer")
null84:
$t0 = [$t1]
$t0 = [$t0+80]
$a0 = $t1
$a1 = $s0
call $t0
goto :if24_end
if24_else:
if24_end:
$v0 = 0
$s0 = local[0]
$s1 = local[1]
ret
|