-
Notifications
You must be signed in to change notification settings - Fork 15
/
Copy pathtmp.asm
8199 lines (8199 loc) · 308 KB
/
tmp.asm
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
# standard Decaf preamble
.text
.align 2
.globl main
_offset_Random_0:
# BeginFunc 4
subu $sp, $sp, 8 # decrement sp to make space to save ra, fp
sw $fp, 8($sp) # save fp
sw $ra, 4($sp) # save ra
addiu $fp, $sp, 8 # set up new fp
subu $sp, $sp, 4 # decrement sp to make space for locals/temps
# _tmp0 = 0
li $t0, 0 # load constant value 0 into $t0
# Return _tmp0
move $v0, $t0 # assign return value into $v0
move $sp, $fp # pop callee frame off stack
lw $ra, -4($fp) # restore saved ra
lw $fp, 0($fp) # restore saved fp
jr $ra # return from function
# EndFunc
# (below handles reaching end of fn body with no explicit return)
move $sp, $fp # pop callee frame off stack
lw $ra, -4($fp) # restore saved ra
lw $fp, 0($fp) # restore saved fp
jr $ra # return from function
# VTable for class Random
.data
.align 2
Random: # label for class Random vtable
.word _offset_Random_0
.word f_Random.Init
.word f_Random.GenRandom
.word f_Random.RndInt
.text
f_Random.Init:
# BeginFunc 20
subu $sp, $sp, 8 # decrement sp to make space to save ra, fp
sw $fp, 8($sp) # save fp
sw $ra, 4($sp) # save ra
addiu $fp, $sp, 8 # set up new fp
subu $sp, $sp, 20 # decrement sp to make space for locals/temps
# _tmp1 = 4
li $t0, 4 # load constant value 4 into $t0
# _tmp2 = this + _tmp1
lw $t1, 4($fp) # load this from $fp+4 into $t1
add $t2, $t1, $t0
# _tmp3 = *(_tmp2)
lw $t3, 0($t2) # load with offset
# _tmp4 = 4
li $t4, 4 # load constant value 4 into $t4
# _tmp5 = this + _tmp4
add $t5, $t1, $t4
# *(_tmp5) = seedVal
lw $t6, 8($fp) # load seedVal from $fp+8 into $t6
sw $t6, 0($t5) # store with offset
# EndFunc
# (below handles reaching end of fn body with no explicit return)
move $sp, $fp # pop callee frame off stack
lw $ra, -4($fp) # restore saved ra
lw $fp, 0($fp) # restore saved fp
jr $ra # return from function
f_Random.GenRandom:
# BeginFunc 76
subu $sp, $sp, 8 # decrement sp to make space to save ra, fp
sw $fp, 8($sp) # save fp
sw $ra, 4($sp) # save ra
addiu $fp, $sp, 8 # set up new fp
subu $sp, $sp, 76 # decrement sp to make space for locals/temps
# _tmp6 = 4
li $t0, 4 # load constant value 4 into $t0
# _tmp7 = this + _tmp6
lw $t1, 4($fp) # load this from $fp+4 into $t1
add $t2, $t1, $t0
# _tmp8 = *(_tmp7)
lw $t3, 0($t2) # load with offset
# _tmp9 = 15625
li $t4, 15625 # load constant value 15625 into $t4
# _tmp10 = 4
li $t5, 4 # load constant value 4 into $t5
# _tmp11 = this + _tmp10
add $t6, $t1, $t5
# _tmp12 = *(_tmp11)
lw $t7, 0($t6) # load with offset
# _tmp13 = 10000
li $s0, 10000 # load constant value 10000 into $s0
# _tmp14 = _tmp12 % _tmp13
rem $s1, $t7, $s0
# _tmp15 = _tmp9 * _tmp14
mul $s2, $t4, $s1
# _tmp16 = 22221
li $s3, 22221 # load constant value 22221 into $s3
# _tmp17 = _tmp15 + _tmp16
add $s4, $s2, $s3
# _tmp18 = 65536
li $s5, 65536 # load constant value 65536 into $s5
# _tmp19 = _tmp17 % _tmp18
rem $s6, $s4, $s5
# _tmp20 = 4
li $s7, 4 # load constant value 4 into $s7
# _tmp21 = this + _tmp20
add $t8, $t1, $s7
# *(_tmp21) = _tmp19
sw $s6, 0($t8) # store with offset
# _tmp22 = 4
li $t9, 4 # load constant value 4 into $t9
# _tmp23 = this + _tmp22
sw $t0, -8($fp) # spill _tmp6 from $t0 to $fp-8
add $t0, $t1, $t9
# _tmp24 = *(_tmp23)
lw $t1, 0($t0) # load with offset
# Return _tmp24
move $v0, $t1 # assign return value into $v0
move $sp, $fp # pop callee frame off stack
lw $ra, -4($fp) # restore saved ra
lw $fp, 0($fp) # restore saved fp
jr $ra # return from function
# EndFunc
# (below handles reaching end of fn body with no explicit return)
move $sp, $fp # pop callee frame off stack
lw $ra, -4($fp) # restore saved ra
lw $fp, 0($fp) # restore saved fp
jr $ra # return from function
f_Random.RndInt:
# BeginFunc 28
subu $sp, $sp, 8 # decrement sp to make space to save ra, fp
sw $fp, 8($sp) # save fp
sw $ra, 4($sp) # save ra
addiu $fp, $sp, 8 # set up new fp
subu $sp, $sp, 28 # decrement sp to make space for locals/temps
# _tmp25 = *(this)
lw $t0, 4($fp) # load this from $fp+4 into $t0
lw $t1, 0($t0) # load with offset
# _tmp26 = *(_tmp25)
lw $t2, 0($t1) # load with offset
# _tmp27 = ACall _tmp26
# (save modified registers before flow of control change)
sw $t1, -8($fp) # spill _tmp25 from $t1 to $fp-8
sw $t2, -12($fp) # spill _tmp26 from $t2 to $fp-12
jalr $t2 # jump to function
move $t0, $v0 # copy function return value from $v0
# _tmp28 = this - _tmp27
lw $t1, 4($fp) # load this from $fp+4 into $t1
sub $t2, $t1, $t0
# _tmp29 = *(_tmp25 + 8)
lw $t3, -8($fp) # load _tmp25 from $fp-8 into $t3
lw $t4, 8($t3) # load with offset
# PushParam _tmp28
subu $sp, $sp, 4 # decrement sp to make space for param
sw $t2, 4($sp) # copy param value to stack
# _tmp30 = ACall _tmp29
# (save modified registers before flow of control change)
sw $t0, -16($fp) # spill _tmp27 from $t0 to $fp-16
sw $t2, -20($fp) # spill _tmp28 from $t2 to $fp-20
sw $t4, -24($fp) # spill _tmp29 from $t4 to $fp-24
jalr $t4 # jump to function
move $t0, $v0 # copy function return value from $v0
# PopParams 4
add $sp, $sp, 4 # pop params off stack
# _tmp31 = _tmp30 % max
lw $t1, 8($fp) # load max from $fp+8 into $t1
rem $t2, $t0, $t1
# Return _tmp31
move $v0, $t2 # assign return value into $v0
move $sp, $fp # pop callee frame off stack
lw $ra, -4($fp) # restore saved ra
lw $fp, 0($fp) # restore saved fp
jr $ra # return from function
# EndFunc
# (below handles reaching end of fn body with no explicit return)
move $sp, $fp # pop callee frame off stack
lw $ra, -4($fp) # restore saved ra
lw $fp, 0($fp) # restore saved fp
jr $ra # return from function
_offset_Deck_0:
# BeginFunc 4
subu $sp, $sp, 8 # decrement sp to make space to save ra, fp
sw $fp, 8($sp) # save fp
sw $ra, 4($sp) # save ra
addiu $fp, $sp, 8 # set up new fp
subu $sp, $sp, 4 # decrement sp to make space for locals/temps
# _tmp32 = 0
li $t0, 0 # load constant value 0 into $t0
# Return _tmp32
move $v0, $t0 # assign return value into $v0
move $sp, $fp # pop callee frame off stack
lw $ra, -4($fp) # restore saved ra
lw $fp, 0($fp) # restore saved fp
jr $ra # return from function
# EndFunc
# (below handles reaching end of fn body with no explicit return)
move $sp, $fp # pop callee frame off stack
lw $ra, -4($fp) # restore saved ra
lw $fp, 0($fp) # restore saved fp
jr $ra # return from function
# VTable for class Deck
.data
.align 2
Deck: # label for class Deck vtable
.word _offset_Deck_0
.word f_Deck.Init
.word f_Deck.Shuffle
.word f_Deck.GetCard
.text
f_Deck.Init:
# BeginFunc 52
subu $sp, $sp, 8 # decrement sp to make space to save ra, fp
sw $fp, 8($sp) # save fp
sw $ra, 4($sp) # save ra
addiu $fp, $sp, 8 # set up new fp
subu $sp, $sp, 52 # decrement sp to make space for locals/temps
# _tmp33 = 8
li $t0, 8 # load constant value 8 into $t0
# _tmp34 = this + _tmp33
lw $t1, 4($fp) # load this from $fp+4 into $t1
add $t2, $t1, $t0
# _tmp35 = *(_tmp34)
lw $t3, 0($t2) # load with offset
# _tmp36 = 52
li $t4, 52 # load constant value 52 into $t4
# _tmp37 = 0
li $t5, 0 # load constant value 0 into $t5
# _tmp38 = 4
li $t6, 4 # load constant value 4 into $t6
# _tmp39 = _tmp37 < _tmp36
slt $t7, $t5, $t4
# IfZ _tmp39 Goto _L0
# (save modified registers before flow of control change)
sw $t0, -8($fp) # spill _tmp33 from $t0 to $fp-8
sw $t2, -12($fp) # spill _tmp34 from $t2 to $fp-12
sw $t3, -16($fp) # spill _tmp35 from $t3 to $fp-16
sw $t4, -20($fp) # spill _tmp36 from $t4 to $fp-20
sw $t5, -24($fp) # spill _tmp37 from $t5 to $fp-24
sw $t6, -28($fp) # spill _tmp38 from $t6 to $fp-28
sw $t7, -32($fp) # spill _tmp39 from $t7 to $fp-32
beqz $t7, _L0 # branch if _tmp39 is zero
# Goto _L1
b _L1 # unconditional branch
_L0:
# _tmp40 = "Decaf runtime error: Array size is <= 0\n"
.data # create string constant marked with label
_string1: .asciiz "Decaf runtime error: Array size is <= 0\n"
.text
la $t0, _string1 # load label
# PushParam _tmp40
subu $sp, $sp, 4 # decrement sp to make space for param
sw $t0, 4($sp) # copy param value to stack
# LCall _PrintString
# (save modified registers before flow of control change)
sw $t0, -36($fp) # spill _tmp40 from $t0 to $fp-36
jal _PrintString # jump to function
# PopParams 4
add $sp, $sp, 4 # pop params off stack
# LCall _Halt
jal _Halt # jump to function
_L1:
# _tmp41 = _tmp36 * _tmp38
lw $t0, -20($fp) # load _tmp36 from $fp-20 into $t0
lw $t1, -28($fp) # load _tmp38 from $fp-28 into $t1
mul $t2, $t0, $t1
# _tmp42 = _tmp41 + _tmp38
add $t3, $t2, $t1
# PushParam _tmp42
subu $sp, $sp, 4 # decrement sp to make space for param
sw $t3, 4($sp) # copy param value to stack
# _tmp43 = LCall _Alloc
# (save modified registers before flow of control change)
sw $t2, -40($fp) # spill _tmp41 from $t2 to $fp-40
sw $t3, -44($fp) # spill _tmp42 from $t3 to $fp-44
jal _Alloc # jump to function
move $t0, $v0 # copy function return value from $v0
# PopParams 4
add $sp, $sp, 4 # pop params off stack
# *(_tmp43) = _tmp36
lw $t1, -20($fp) # load _tmp36 from $fp-20 into $t1
sw $t1, 0($t0) # store with offset
# _tmp44 = 8
li $t2, 8 # load constant value 8 into $t2
# _tmp45 = this + _tmp44
lw $t3, 4($fp) # load this from $fp+4 into $t3
add $t4, $t3, $t2
# *(_tmp45) = _tmp43
sw $t0, 0($t4) # store with offset
# EndFunc
# (below handles reaching end of fn body with no explicit return)
move $sp, $fp # pop callee frame off stack
lw $ra, -4($fp) # restore saved ra
lw $fp, 0($fp) # restore saved fp
jr $ra # return from function
f_Deck.Shuffle:
# BeginFunc 776
subu $sp, $sp, 8 # decrement sp to make space to save ra, fp
sw $fp, 8($sp) # save fp
sw $ra, 4($sp) # save ra
addiu $fp, $sp, 8 # set up new fp
subu $sp, $sp, 776 # decrement sp to make space for locals/temps
# _tmp46 = 4
li $t0, 4 # load constant value 4 into $t0
# _tmp47 = this + _tmp46
lw $t1, 4($fp) # load this from $fp+4 into $t1
add $t2, $t1, $t0
# _tmp48 = *(_tmp47)
lw $t3, 0($t2) # load with offset
# _tmp49 = 0
li $t4, 0 # load constant value 0 into $t4
# _tmp50 = 4
li $t5, 4 # load constant value 4 into $t5
# _tmp51 = this + _tmp50
add $t6, $t1, $t5
# *(_tmp51) = _tmp49
sw $t4, 0($t6) # store with offset
# (save modified registers before flow of control change)
sw $t0, -8($fp) # spill _tmp46 from $t0 to $fp-8
sw $t2, -12($fp) # spill _tmp47 from $t2 to $fp-12
sw $t3, -16($fp) # spill _tmp48 from $t3 to $fp-16
sw $t4, -20($fp) # spill _tmp49 from $t4 to $fp-20
sw $t5, -24($fp) # spill _tmp50 from $t5 to $fp-24
sw $t6, -28($fp) # spill _tmp51 from $t6 to $fp-28
_L2:
# _tmp52 = 4
li $t0, 4 # load constant value 4 into $t0
# _tmp53 = this + _tmp52
lw $t1, 4($fp) # load this from $fp+4 into $t1
add $t2, $t1, $t0
# _tmp54 = *(_tmp53)
lw $t3, 0($t2) # load with offset
# _tmp55 = 52
li $t4, 52 # load constant value 52 into $t4
# _tmp56 = _tmp54 < _tmp55
slt $t5, $t3, $t4
# IfZ _tmp56 Goto _L3
# (save modified registers before flow of control change)
sw $t0, -32($fp) # spill _tmp52 from $t0 to $fp-32
sw $t2, -36($fp) # spill _tmp53 from $t2 to $fp-36
sw $t3, -40($fp) # spill _tmp54 from $t3 to $fp-40
sw $t4, -44($fp) # spill _tmp55 from $t4 to $fp-44
sw $t5, -48($fp) # spill _tmp56 from $t5 to $fp-48
beqz $t5, _L3 # branch if _tmp56 is zero
# _tmp57 = 8
li $t0, 8 # load constant value 8 into $t0
# _tmp58 = this + _tmp57
lw $t1, 4($fp) # load this from $fp+4 into $t1
add $t2, $t1, $t0
# _tmp59 = *(_tmp58)
lw $t3, 0($t2) # load with offset
# _tmp60 = 4
li $t4, 4 # load constant value 4 into $t4
# _tmp61 = this + _tmp60
add $t5, $t1, $t4
# _tmp62 = *(_tmp61)
lw $t6, 0($t5) # load with offset
# _tmp63 = 0
li $t7, 0 # load constant value 0 into $t7
# _tmp64 = 4
li $s0, 4 # load constant value 4 into $s0
# _tmp65 = *(_tmp59)
lw $s1, 0($t3) # load with offset
# _tmp66 = _tmp65 == _tmp62
seq $s2, $s1, $t6
# _tmp67 = _tmp65 < _tmp62
slt $s3, $s1, $t6
# _tmp68 = _tmp67 || _tmp66
or $s4, $s3, $s2
# _tmp69 = _tmp62 < _tmp63
slt $s5, $t6, $t7
# _tmp70 = _tmp69 || _tmp68
or $s6, $s5, $s4
# IfZ _tmp70 Goto _L4
# (save modified registers before flow of control change)
sw $t0, -52($fp) # spill _tmp57 from $t0 to $fp-52
sw $t2, -56($fp) # spill _tmp58 from $t2 to $fp-56
sw $t3, -60($fp) # spill _tmp59 from $t3 to $fp-60
sw $t4, -64($fp) # spill _tmp60 from $t4 to $fp-64
sw $t5, -68($fp) # spill _tmp61 from $t5 to $fp-68
sw $t6, -72($fp) # spill _tmp62 from $t6 to $fp-72
sw $t7, -76($fp) # spill _tmp63 from $t7 to $fp-76
sw $s0, -80($fp) # spill _tmp64 from $s0 to $fp-80
sw $s1, -84($fp) # spill _tmp65 from $s1 to $fp-84
sw $s2, -88($fp) # spill _tmp66 from $s2 to $fp-88
sw $s3, -92($fp) # spill _tmp67 from $s3 to $fp-92
sw $s4, -96($fp) # spill _tmp68 from $s4 to $fp-96
sw $s5, -100($fp) # spill _tmp69 from $s5 to $fp-100
sw $s6, -104($fp) # spill _tmp70 from $s6 to $fp-104
beqz $s6, _L4 # branch if _tmp70 is zero
# _tmp71 = "Decaf runtime error: Array subscript out of bound..."
.data # create string constant marked with label
_string2: .asciiz "Decaf runtime error: Array subscript out of bounds\n"
.text
la $t0, _string2 # load label
# PushParam _tmp71
subu $sp, $sp, 4 # decrement sp to make space for param
sw $t0, 4($sp) # copy param value to stack
# LCall _PrintString
# (save modified registers before flow of control change)
sw $t0, -108($fp) # spill _tmp71 from $t0 to $fp-108
jal _PrintString # jump to function
# PopParams 4
add $sp, $sp, 4 # pop params off stack
# LCall _Halt
jal _Halt # jump to function
_L4:
# _tmp72 = _tmp62 * _tmp64
lw $t0, -72($fp) # load _tmp62 from $fp-72 into $t0
lw $t1, -80($fp) # load _tmp64 from $fp-80 into $t1
mul $t2, $t0, $t1
# _tmp73 = _tmp72 + _tmp64
add $t3, $t2, $t1
# _tmp74 = _tmp59 + _tmp73
lw $t4, -60($fp) # load _tmp59 from $fp-60 into $t4
add $t5, $t4, $t3
# _tmp75 = *(_tmp74)
lw $t6, 0($t5) # load with offset
# _tmp76 = 4
li $t7, 4 # load constant value 4 into $t7
# _tmp77 = this + _tmp76
lw $s0, 4($fp) # load this from $fp+4 into $s0
add $s1, $s0, $t7
# _tmp78 = *(_tmp77)
lw $s2, 0($s1) # load with offset
# _tmp79 = 1
li $s3, 1 # load constant value 1 into $s3
# _tmp80 = _tmp78 + _tmp79
add $s4, $s2, $s3
# _tmp81 = 13
li $s5, 13 # load constant value 13 into $s5
# _tmp82 = _tmp80 % _tmp81
rem $s6, $s4, $s5
# _tmp83 = 8
li $s7, 8 # load constant value 8 into $s7
# _tmp84 = this + _tmp83
add $t8, $s0, $s7
# _tmp85 = *(_tmp84)
lw $t9, 0($t8) # load with offset
# _tmp86 = 4
li $t0, 4 # load constant value 4 into $t0
# _tmp87 = this + _tmp86
add $t1, $s0, $t0
# _tmp88 = *(_tmp87)
lw $t4, 0($t1) # load with offset
# _tmp89 = 0
li $s0, 0 # load constant value 0 into $s0
# _tmp90 = 4
sw $t1, -172($fp) # spill _tmp87 from $t1 to $fp-172
li $t1, 4 # load constant value 4 into $t1
# _tmp91 = *(_tmp85)
sw $t2, -112($fp) # spill _tmp72 from $t2 to $fp-112
lw $t2, 0($t9) # load with offset
# _tmp92 = _tmp91 == _tmp88
sw $t3, -116($fp) # spill _tmp73 from $t3 to $fp-116
seq $t3, $t2, $t4
# _tmp93 = _tmp91 < _tmp88
sw $t5, -120($fp) # spill _tmp74 from $t5 to $fp-120
slt $t5, $t2, $t4
# _tmp94 = _tmp93 || _tmp92
sw $t6, -124($fp) # spill _tmp75 from $t6 to $fp-124
or $t6, $t5, $t3
# _tmp95 = _tmp88 < _tmp89
sw $t7, -128($fp) # spill _tmp76 from $t7 to $fp-128
slt $t7, $t4, $s0
# _tmp96 = _tmp95 || _tmp94
sw $s0, -180($fp) # spill _tmp89 from $s0 to $fp-180
or $s0, $t7, $t6
# IfZ _tmp96 Goto _L5
# (save modified registers before flow of control change)
sw $t0, -168($fp) # spill _tmp86 from $t0 to $fp-168
sw $t1, -184($fp) # spill _tmp90 from $t1 to $fp-184
sw $t2, -188($fp) # spill _tmp91 from $t2 to $fp-188
sw $t3, -192($fp) # spill _tmp92 from $t3 to $fp-192
sw $t4, -176($fp) # spill _tmp88 from $t4 to $fp-176
sw $t5, -196($fp) # spill _tmp93 from $t5 to $fp-196
sw $t6, -200($fp) # spill _tmp94 from $t6 to $fp-200
sw $t7, -204($fp) # spill _tmp95 from $t7 to $fp-204
sw $s0, -208($fp) # spill _tmp96 from $s0 to $fp-208
sw $s1, -132($fp) # spill _tmp77 from $s1 to $fp-132
sw $s2, -136($fp) # spill _tmp78 from $s2 to $fp-136
sw $s3, -140($fp) # spill _tmp79 from $s3 to $fp-140
sw $s4, -144($fp) # spill _tmp80 from $s4 to $fp-144
sw $s5, -148($fp) # spill _tmp81 from $s5 to $fp-148
sw $s6, -152($fp) # spill _tmp82 from $s6 to $fp-152
sw $s7, -156($fp) # spill _tmp83 from $s7 to $fp-156
sw $t8, -160($fp) # spill _tmp84 from $t8 to $fp-160
sw $t9, -164($fp) # spill _tmp85 from $t9 to $fp-164
beqz $s0, _L5 # branch if _tmp96 is zero
# _tmp97 = "Decaf runtime error: Array subscript out of bound..."
.data # create string constant marked with label
_string3: .asciiz "Decaf runtime error: Array subscript out of bounds\n"
.text
la $t0, _string3 # load label
# PushParam _tmp97
subu $sp, $sp, 4 # decrement sp to make space for param
sw $t0, 4($sp) # copy param value to stack
# LCall _PrintString
# (save modified registers before flow of control change)
sw $t0, -212($fp) # spill _tmp97 from $t0 to $fp-212
jal _PrintString # jump to function
# PopParams 4
add $sp, $sp, 4 # pop params off stack
# LCall _Halt
jal _Halt # jump to function
_L5:
# _tmp98 = _tmp88 * _tmp90
lw $t0, -176($fp) # load _tmp88 from $fp-176 into $t0
lw $t1, -184($fp) # load _tmp90 from $fp-184 into $t1
mul $t2, $t0, $t1
# _tmp99 = _tmp98 + _tmp90
add $t3, $t2, $t1
# _tmp100 = _tmp85 + _tmp99
lw $t4, -164($fp) # load _tmp85 from $fp-164 into $t4
add $t5, $t4, $t3
# *(_tmp100) = _tmp82
lw $t6, -152($fp) # load _tmp82 from $fp-152 into $t6
sw $t6, 0($t5) # store with offset
# _tmp101 = 4
li $t7, 4 # load constant value 4 into $t7
# _tmp102 = this + _tmp101
lw $s0, 4($fp) # load this from $fp+4 into $s0
add $s1, $s0, $t7
# _tmp103 = *(_tmp102)
lw $s2, 0($s1) # load with offset
# _tmp104 = 4
li $s3, 4 # load constant value 4 into $s3
# _tmp105 = this + _tmp104
add $s4, $s0, $s3
# _tmp106 = *(_tmp105)
lw $s5, 0($s4) # load with offset
# _tmp107 = 1
li $s6, 1 # load constant value 1 into $s6
# _tmp108 = _tmp106 + _tmp107
add $s7, $s5, $s6
# _tmp109 = 4
li $t8, 4 # load constant value 4 into $t8
# _tmp110 = this + _tmp109
add $t9, $s0, $t8
# *(_tmp110) = _tmp108
sw $s7, 0($t9) # store with offset
# Goto _L2
# (save modified registers before flow of control change)
sw $t2, -216($fp) # spill _tmp98 from $t2 to $fp-216
sw $t3, -220($fp) # spill _tmp99 from $t3 to $fp-220
sw $t5, -224($fp) # spill _tmp100 from $t5 to $fp-224
sw $t7, -228($fp) # spill _tmp101 from $t7 to $fp-228
sw $s1, -232($fp) # spill _tmp102 from $s1 to $fp-232
sw $s2, -236($fp) # spill _tmp103 from $s2 to $fp-236
sw $s3, -240($fp) # spill _tmp104 from $s3 to $fp-240
sw $s4, -244($fp) # spill _tmp105 from $s4 to $fp-244
sw $s5, -248($fp) # spill _tmp106 from $s5 to $fp-248
sw $s6, -252($fp) # spill _tmp107 from $s6 to $fp-252
sw $s7, -256($fp) # spill _tmp108 from $s7 to $fp-256
sw $t8, -260($fp) # spill _tmp109 from $t8 to $fp-260
sw $t9, -264($fp) # spill _tmp110 from $t9 to $fp-264
b _L2 # unconditional branch
_L3:
_L6:
# _tmp111 = 4
li $t0, 4 # load constant value 4 into $t0
# _tmp112 = this + _tmp111
lw $t1, 4($fp) # load this from $fp+4 into $t1
add $t2, $t1, $t0
# _tmp113 = *(_tmp112)
lw $t3, 0($t2) # load with offset
# _tmp114 = 0
li $t4, 0 # load constant value 0 into $t4
# _tmp115 = _tmp114 < _tmp113
slt $t5, $t4, $t3
# IfZ _tmp115 Goto _L7
# (save modified registers before flow of control change)
sw $t0, -268($fp) # spill _tmp111 from $t0 to $fp-268
sw $t2, -272($fp) # spill _tmp112 from $t2 to $fp-272
sw $t3, -276($fp) # spill _tmp113 from $t3 to $fp-276
sw $t4, -280($fp) # spill _tmp114 from $t4 to $fp-280
sw $t5, -284($fp) # spill _tmp115 from $t5 to $fp-284
beqz $t5, _L7 # branch if _tmp115 is zero
# _tmp116 = 4
li $t0, 4 # load constant value 4 into $t0
# _tmp117 = this + _tmp116
lw $t1, 4($fp) # load this from $fp+4 into $t1
add $t2, $t1, $t0
# _tmp118 = *(_tmp117)
lw $t3, 0($t2) # load with offset
# PushParam _tmp118
subu $sp, $sp, 4 # decrement sp to make space for param
sw $t3, 4($sp) # copy param value to stack
# _tmp119 = *(gRnd)
lw $t4, 0($gp) # load gRnd from $gp+0 into $t4
lw $t5, 0($t4) # load with offset
# _tmp120 = *(_tmp119)
lw $t6, 0($t5) # load with offset
# _tmp121 = ACall _tmp120
# (save modified registers before flow of control change)
sw $t0, -296($fp) # spill _tmp116 from $t0 to $fp-296
sw $t2, -300($fp) # spill _tmp117 from $t2 to $fp-300
sw $t3, -304($fp) # spill _tmp118 from $t3 to $fp-304
sw $t5, -308($fp) # spill _tmp119 from $t5 to $fp-308
sw $t6, -312($fp) # spill _tmp120 from $t6 to $fp-312
jalr $t6 # jump to function
move $t0, $v0 # copy function return value from $v0
# _tmp122 = gRnd - _tmp121
lw $t1, 0($gp) # load gRnd from $gp+0 into $t1
sub $t2, $t1, $t0
# _tmp123 = *(_tmp119 + 12)
lw $t3, -308($fp) # load _tmp119 from $fp-308 into $t3
lw $t4, 12($t3) # load with offset
# PushParam _tmp122
subu $sp, $sp, 4 # decrement sp to make space for param
sw $t2, 4($sp) # copy param value to stack
# _tmp124 = ACall _tmp123
# (save modified registers before flow of control change)
sw $t0, -316($fp) # spill _tmp121 from $t0 to $fp-316
sw $t2, -320($fp) # spill _tmp122 from $t2 to $fp-320
sw $t4, -324($fp) # spill _tmp123 from $t4 to $fp-324
jalr $t4 # jump to function
move $t0, $v0 # copy function return value from $v0
# PopParams 8
add $sp, $sp, 8 # pop params off stack
# r = _tmp124
move $t1, $t0 # copy value
# _tmp125 = 4
li $t2, 4 # load constant value 4 into $t2
# _tmp126 = this + _tmp125
lw $t3, 4($fp) # load this from $fp+4 into $t3
add $t4, $t3, $t2
# _tmp127 = *(_tmp126)
lw $t5, 0($t4) # load with offset
# _tmp128 = 4
li $t6, 4 # load constant value 4 into $t6
# _tmp129 = this + _tmp128
add $t7, $t3, $t6
# _tmp130 = *(_tmp129)
lw $s0, 0($t7) # load with offset
# _tmp131 = 1
li $s1, 1 # load constant value 1 into $s1
# _tmp132 = _tmp130 - _tmp131
sub $s2, $s0, $s1
# _tmp133 = 4
li $s3, 4 # load constant value 4 into $s3
# _tmp134 = this + _tmp133
add $s4, $t3, $s3
# *(_tmp134) = _tmp132
sw $s2, 0($s4) # store with offset
# _tmp135 = 8
li $s5, 8 # load constant value 8 into $s5
# _tmp136 = this + _tmp135
add $s6, $t3, $s5
# _tmp137 = *(_tmp136)
lw $s7, 0($s6) # load with offset
# _tmp138 = 4
li $t8, 4 # load constant value 4 into $t8
# _tmp139 = this + _tmp138
add $t9, $t3, $t8
# _tmp140 = *(_tmp139)
lw $t3, 0($t9) # load with offset
# _tmp141 = 0
sw $s1, -356($fp) # spill _tmp131 from $s1 to $fp-356
li $s1, 0 # load constant value 0 into $s1
# _tmp142 = 4
sw $s2, -360($fp) # spill _tmp132 from $s2 to $fp-360
li $s2, 4 # load constant value 4 into $s2
# _tmp143 = *(_tmp137)
sw $s3, -364($fp) # spill _tmp133 from $s3 to $fp-364
lw $s3, 0($s7) # load with offset
# _tmp144 = _tmp143 == _tmp140
sw $s4, -368($fp) # spill _tmp134 from $s4 to $fp-368
seq $s4, $s3, $t3
# _tmp145 = _tmp143 < _tmp140
sw $s5, -372($fp) # spill _tmp135 from $s5 to $fp-372
slt $s5, $s3, $t3
# _tmp146 = _tmp145 || _tmp144
sw $s6, -376($fp) # spill _tmp136 from $s6 to $fp-376
or $s6, $s5, $s4
# _tmp147 = _tmp140 < _tmp141
sw $s7, -380($fp) # spill _tmp137 from $s7 to $fp-380
slt $s7, $t3, $s1
# _tmp148 = _tmp147 || _tmp146
sw $t8, -384($fp) # spill _tmp138 from $t8 to $fp-384
or $t8, $s7, $s6
# IfZ _tmp148 Goto _L8
# (save modified registers before flow of control change)
sw $t0, -328($fp) # spill _tmp124 from $t0 to $fp-328
sw $t1, -288($fp) # spill r from $t1 to $fp-288
sw $t2, -332($fp) # spill _tmp125 from $t2 to $fp-332
sw $t3, -392($fp) # spill _tmp140 from $t3 to $fp-392
sw $t4, -336($fp) # spill _tmp126 from $t4 to $fp-336
sw $t5, -340($fp) # spill _tmp127 from $t5 to $fp-340
sw $t6, -344($fp) # spill _tmp128 from $t6 to $fp-344
sw $t7, -348($fp) # spill _tmp129 from $t7 to $fp-348
sw $s0, -352($fp) # spill _tmp130 from $s0 to $fp-352
sw $s1, -396($fp) # spill _tmp141 from $s1 to $fp-396
sw $s2, -400($fp) # spill _tmp142 from $s2 to $fp-400
sw $s3, -404($fp) # spill _tmp143 from $s3 to $fp-404
sw $s4, -408($fp) # spill _tmp144 from $s4 to $fp-408
sw $s5, -412($fp) # spill _tmp145 from $s5 to $fp-412
sw $s6, -416($fp) # spill _tmp146 from $s6 to $fp-416
sw $s7, -420($fp) # spill _tmp147 from $s7 to $fp-420
sw $t8, -424($fp) # spill _tmp148 from $t8 to $fp-424
sw $t9, -388($fp) # spill _tmp139 from $t9 to $fp-388
beqz $t8, _L8 # branch if _tmp148 is zero
# _tmp149 = "Decaf runtime error: Array subscript out of bound..."
.data # create string constant marked with label
_string4: .asciiz "Decaf runtime error: Array subscript out of bounds\n"
.text
la $t0, _string4 # load label
# PushParam _tmp149
subu $sp, $sp, 4 # decrement sp to make space for param
sw $t0, 4($sp) # copy param value to stack
# LCall _PrintString
# (save modified registers before flow of control change)
sw $t0, -428($fp) # spill _tmp149 from $t0 to $fp-428
jal _PrintString # jump to function
# PopParams 4
add $sp, $sp, 4 # pop params off stack
# LCall _Halt
jal _Halt # jump to function
_L8:
# _tmp150 = _tmp140 * _tmp142
lw $t0, -392($fp) # load _tmp140 from $fp-392 into $t0
lw $t1, -400($fp) # load _tmp142 from $fp-400 into $t1
mul $t2, $t0, $t1
# _tmp151 = _tmp150 + _tmp142
add $t3, $t2, $t1
# _tmp152 = _tmp137 + _tmp151
lw $t4, -380($fp) # load _tmp137 from $fp-380 into $t4
add $t5, $t4, $t3
# _tmp153 = *(_tmp152)
lw $t6, 0($t5) # load with offset
# temp = _tmp153
move $t7, $t6 # copy value
# _tmp154 = 8
li $s0, 8 # load constant value 8 into $s0
# _tmp155 = this + _tmp154
lw $s1, 4($fp) # load this from $fp+4 into $s1
add $s2, $s1, $s0
# _tmp156 = *(_tmp155)
lw $s3, 0($s2) # load with offset
# _tmp157 = 4
li $s4, 4 # load constant value 4 into $s4
# _tmp158 = this + _tmp157
add $s5, $s1, $s4
# _tmp159 = *(_tmp158)
lw $s6, 0($s5) # load with offset
# _tmp160 = 0
li $s7, 0 # load constant value 0 into $s7
# _tmp161 = 4
li $t8, 4 # load constant value 4 into $t8
# _tmp162 = *(_tmp156)
lw $t9, 0($s3) # load with offset
# _tmp163 = _tmp162 == _tmp159
seq $t0, $t9, $s6
# _tmp164 = _tmp162 < _tmp159
slt $t1, $t9, $s6
# _tmp165 = _tmp164 || _tmp163
or $t4, $t1, $t0
# _tmp166 = _tmp159 < _tmp160
slt $s1, $s6, $s7
# _tmp167 = _tmp166 || _tmp165
sw $t9, -480($fp) # spill _tmp162 from $t9 to $fp-480
or $t9, $s1, $t4
# IfZ _tmp167 Goto _L9
# (save modified registers before flow of control change)
sw $t0, -484($fp) # spill _tmp163 from $t0 to $fp-484
sw $t1, -488($fp) # spill _tmp164 from $t1 to $fp-488
sw $t2, -432($fp) # spill _tmp150 from $t2 to $fp-432
sw $t3, -436($fp) # spill _tmp151 from $t3 to $fp-436
sw $t4, -492($fp) # spill _tmp165 from $t4 to $fp-492
sw $t5, -440($fp) # spill _tmp152 from $t5 to $fp-440
sw $t6, -444($fp) # spill _tmp153 from $t6 to $fp-444
sw $t7, -292($fp) # spill temp from $t7 to $fp-292
sw $s0, -448($fp) # spill _tmp154 from $s0 to $fp-448
sw $s1, -496($fp) # spill _tmp166 from $s1 to $fp-496
sw $s2, -452($fp) # spill _tmp155 from $s2 to $fp-452
sw $s3, -456($fp) # spill _tmp156 from $s3 to $fp-456
sw $s4, -460($fp) # spill _tmp157 from $s4 to $fp-460
sw $s5, -464($fp) # spill _tmp158 from $s5 to $fp-464
sw $s6, -468($fp) # spill _tmp159 from $s6 to $fp-468
sw $s7, -472($fp) # spill _tmp160 from $s7 to $fp-472
sw $t8, -476($fp) # spill _tmp161 from $t8 to $fp-476
sw $t9, -500($fp) # spill _tmp167 from $t9 to $fp-500
beqz $t9, _L9 # branch if _tmp167 is zero
# _tmp168 = "Decaf runtime error: Array subscript out of bound..."
.data # create string constant marked with label
_string5: .asciiz "Decaf runtime error: Array subscript out of bounds\n"
.text
la $t0, _string5 # load label
# PushParam _tmp168
subu $sp, $sp, 4 # decrement sp to make space for param
sw $t0, 4($sp) # copy param value to stack
# LCall _PrintString
# (save modified registers before flow of control change)
sw $t0, -504($fp) # spill _tmp168 from $t0 to $fp-504
jal _PrintString # jump to function
# PopParams 4
add $sp, $sp, 4 # pop params off stack
# LCall _Halt
jal _Halt # jump to function
_L9:
# _tmp169 = _tmp159 * _tmp161
lw $t0, -468($fp) # load _tmp159 from $fp-468 into $t0
lw $t1, -476($fp) # load _tmp161 from $fp-476 into $t1
mul $t2, $t0, $t1
# _tmp170 = _tmp169 + _tmp161
add $t3, $t2, $t1
# _tmp171 = _tmp156 + _tmp170
lw $t4, -456($fp) # load _tmp156 from $fp-456 into $t4
add $t5, $t4, $t3
# _tmp172 = *(_tmp171)
lw $t6, 0($t5) # load with offset
# _tmp173 = 8
li $t7, 8 # load constant value 8 into $t7
# _tmp174 = this + _tmp173
lw $s0, 4($fp) # load this from $fp+4 into $s0
add $s1, $s0, $t7
# _tmp175 = *(_tmp174)
lw $s2, 0($s1) # load with offset
# _tmp176 = 0
li $s3, 0 # load constant value 0 into $s3
# _tmp177 = 4
li $s4, 4 # load constant value 4 into $s4
# _tmp178 = *(_tmp175)
lw $s5, 0($s2) # load with offset
# _tmp179 = _tmp178 == r
lw $s6, -288($fp) # load r from $fp-288 into $s6
seq $s7, $s5, $s6
# _tmp180 = _tmp178 < r
slt $t8, $s5, $s6
# _tmp181 = _tmp180 || _tmp179
or $t9, $t8, $s7
# _tmp182 = r < _tmp176
slt $t0, $s6, $s3
# _tmp183 = _tmp182 || _tmp181
or $t1, $t0, $t9
# IfZ _tmp183 Goto _L10
# (save modified registers before flow of control change)
sw $t0, -560($fp) # spill _tmp182 from $t0 to $fp-560
sw $t1, -564($fp) # spill _tmp183 from $t1 to $fp-564
sw $t2, -508($fp) # spill _tmp169 from $t2 to $fp-508
sw $t3, -512($fp) # spill _tmp170 from $t3 to $fp-512
sw $t5, -516($fp) # spill _tmp171 from $t5 to $fp-516
sw $t6, -520($fp) # spill _tmp172 from $t6 to $fp-520
sw $t7, -524($fp) # spill _tmp173 from $t7 to $fp-524
sw $s1, -528($fp) # spill _tmp174 from $s1 to $fp-528
sw $s2, -532($fp) # spill _tmp175 from $s2 to $fp-532
sw $s3, -536($fp) # spill _tmp176 from $s3 to $fp-536
sw $s4, -540($fp) # spill _tmp177 from $s4 to $fp-540
sw $s5, -544($fp) # spill _tmp178 from $s5 to $fp-544
sw $s7, -548($fp) # spill _tmp179 from $s7 to $fp-548
sw $t8, -552($fp) # spill _tmp180 from $t8 to $fp-552
sw $t9, -556($fp) # spill _tmp181 from $t9 to $fp-556
beqz $t1, _L10 # branch if _tmp183 is zero
# _tmp184 = "Decaf runtime error: Array subscript out of bound..."
.data # create string constant marked with label
_string6: .asciiz "Decaf runtime error: Array subscript out of bounds\n"
.text
la $t0, _string6 # load label
# PushParam _tmp184
subu $sp, $sp, 4 # decrement sp to make space for param
sw $t0, 4($sp) # copy param value to stack
# LCall _PrintString
# (save modified registers before flow of control change)
sw $t0, -568($fp) # spill _tmp184 from $t0 to $fp-568
jal _PrintString # jump to function
# PopParams 4
add $sp, $sp, 4 # pop params off stack
# LCall _Halt
jal _Halt # jump to function
_L10:
# _tmp185 = r * _tmp177
lw $t0, -288($fp) # load r from $fp-288 into $t0
lw $t1, -540($fp) # load _tmp177 from $fp-540 into $t1
mul $t2, $t0, $t1
# _tmp186 = _tmp185 + _tmp177
add $t3, $t2, $t1
# _tmp187 = _tmp175 + _tmp186
lw $t4, -532($fp) # load _tmp175 from $fp-532 into $t4
add $t5, $t4, $t3
# _tmp188 = *(_tmp187)
lw $t6, 0($t5) # load with offset
# _tmp189 = 8
li $t7, 8 # load constant value 8 into $t7
# _tmp190 = this + _tmp189
lw $s0, 4($fp) # load this from $fp+4 into $s0
add $s1, $s0, $t7
# _tmp191 = *(_tmp190)
lw $s2, 0($s1) # load with offset
# _tmp192 = 4
li $s3, 4 # load constant value 4 into $s3
# _tmp193 = this + _tmp192
add $s4, $s0, $s3
# _tmp194 = *(_tmp193)
lw $s5, 0($s4) # load with offset
# _tmp195 = 0
li $s6, 0 # load constant value 0 into $s6
# _tmp196 = 4
li $s7, 4 # load constant value 4 into $s7
# _tmp197 = *(_tmp191)
lw $t8, 0($s2) # load with offset
# _tmp198 = _tmp197 == _tmp194
seq $t9, $t8, $s5
# _tmp199 = _tmp197 < _tmp194
slt $t0, $t8, $s5
# _tmp200 = _tmp199 || _tmp198
or $t1, $t0, $t9
# _tmp201 = _tmp194 < _tmp195
slt $t4, $s5, $s6
# _tmp202 = _tmp201 || _tmp200
or $s0, $t4, $t1
# IfZ _tmp202 Goto _L11
# (save modified registers before flow of control change)
sw $t0, -628($fp) # spill _tmp199 from $t0 to $fp-628
sw $t1, -632($fp) # spill _tmp200 from $t1 to $fp-632
sw $t2, -572($fp) # spill _tmp185 from $t2 to $fp-572
sw $t3, -576($fp) # spill _tmp186 from $t3 to $fp-576
sw $t4, -636($fp) # spill _tmp201 from $t4 to $fp-636
sw $t5, -580($fp) # spill _tmp187 from $t5 to $fp-580
sw $t6, -584($fp) # spill _tmp188 from $t6 to $fp-584
sw $t7, -588($fp) # spill _tmp189 from $t7 to $fp-588
sw $s0, -640($fp) # spill _tmp202 from $s0 to $fp-640
sw $s1, -592($fp) # spill _tmp190 from $s1 to $fp-592
sw $s2, -596($fp) # spill _tmp191 from $s2 to $fp-596
sw $s3, -600($fp) # spill _tmp192 from $s3 to $fp-600
sw $s4, -604($fp) # spill _tmp193 from $s4 to $fp-604
sw $s5, -608($fp) # spill _tmp194 from $s5 to $fp-608
sw $s6, -612($fp) # spill _tmp195 from $s6 to $fp-612
sw $s7, -616($fp) # spill _tmp196 from $s7 to $fp-616
sw $t8, -620($fp) # spill _tmp197 from $t8 to $fp-620
sw $t9, -624($fp) # spill _tmp198 from $t9 to $fp-624
beqz $s0, _L11 # branch if _tmp202 is zero
# _tmp203 = "Decaf runtime error: Array subscript out of bound..."
.data # create string constant marked with label
_string7: .asciiz "Decaf runtime error: Array subscript out of bounds\n"
.text
la $t0, _string7 # load label
# PushParam _tmp203
subu $sp, $sp, 4 # decrement sp to make space for param
sw $t0, 4($sp) # copy param value to stack
# LCall _PrintString
# (save modified registers before flow of control change)
sw $t0, -644($fp) # spill _tmp203 from $t0 to $fp-644
jal _PrintString # jump to function
# PopParams 4
add $sp, $sp, 4 # pop params off stack
# LCall _Halt
jal _Halt # jump to function
_L11:
# _tmp204 = _tmp194 * _tmp196
lw $t0, -608($fp) # load _tmp194 from $fp-608 into $t0
lw $t1, -616($fp) # load _tmp196 from $fp-616 into $t1
mul $t2, $t0, $t1
# _tmp205 = _tmp204 + _tmp196
add $t3, $t2, $t1
# _tmp206 = _tmp191 + _tmp205
lw $t4, -596($fp) # load _tmp191 from $fp-596 into $t4
add $t5, $t4, $t3
# *(_tmp206) = _tmp188
lw $t6, -584($fp) # load _tmp188 from $fp-584 into $t6
sw $t6, 0($t5) # store with offset
# _tmp207 = 8
li $t7, 8 # load constant value 8 into $t7
# _tmp208 = this + _tmp207
lw $s0, 4($fp) # load this from $fp+4 into $s0
add $s1, $s0, $t7
# _tmp209 = *(_tmp208)
lw $s2, 0($s1) # load with offset
# _tmp210 = 0
li $s3, 0 # load constant value 0 into $s3
# _tmp211 = 4
li $s4, 4 # load constant value 4 into $s4
# _tmp212 = *(_tmp209)
lw $s5, 0($s2) # load with offset
# _tmp213 = _tmp212 == r
lw $s6, -288($fp) # load r from $fp-288 into $s6
seq $s7, $s5, $s6
# _tmp214 = _tmp212 < r
slt $t8, $s5, $s6
# _tmp215 = _tmp214 || _tmp213
or $t9, $t8, $s7
# _tmp216 = r < _tmp210
slt $t0, $s6, $s3
# _tmp217 = _tmp216 || _tmp215
or $t1, $t0, $t9
# IfZ _tmp217 Goto _L12
# (save modified registers before flow of control change)
sw $t0, -696($fp) # spill _tmp216 from $t0 to $fp-696
sw $t1, -700($fp) # spill _tmp217 from $t1 to $fp-700
sw $t2, -648($fp) # spill _tmp204 from $t2 to $fp-648
sw $t3, -652($fp) # spill _tmp205 from $t3 to $fp-652
sw $t5, -656($fp) # spill _tmp206 from $t5 to $fp-656
sw $t7, -660($fp) # spill _tmp207 from $t7 to $fp-660
sw $s1, -664($fp) # spill _tmp208 from $s1 to $fp-664
sw $s2, -668($fp) # spill _tmp209 from $s2 to $fp-668
sw $s3, -672($fp) # spill _tmp210 from $s3 to $fp-672
sw $s4, -676($fp) # spill _tmp211 from $s4 to $fp-676
sw $s5, -680($fp) # spill _tmp212 from $s5 to $fp-680
sw $s7, -684($fp) # spill _tmp213 from $s7 to $fp-684
sw $t8, -688($fp) # spill _tmp214 from $t8 to $fp-688
sw $t9, -692($fp) # spill _tmp215 from $t9 to $fp-692
beqz $t1, _L12 # branch if _tmp217 is zero
# _tmp218 = "Decaf runtime error: Array subscript out of bound..."
.data # create string constant marked with label
_string8: .asciiz "Decaf runtime error: Array subscript out of bounds\n"
.text
la $t0, _string8 # load label
# PushParam _tmp218