-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.s
1800 lines (1800 loc) · 28 KB
/
main.s
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
.cpu arm7tdmi
.fpu softvfp
.eabi_attribute 20, 1
.eabi_attribute 21, 1
.eabi_attribute 23, 3
.eabi_attribute 24, 1
.eabi_attribute 25, 1
.eabi_attribute 26, 1
.eabi_attribute 30, 2
.eabi_attribute 34, 0
.eabi_attribute 18, 4
.arm
.syntax divided
.file "main.c"
.text
.align 2
.global goToSplash
.type goToSplash, %function
goToSplash:
@ Function supports interworking.
@ args = 0, pretend = 0, frame = 0
@ frame_needed = 0, uses_anonymous_args = 0
mov ip, #1
stmfd sp!, {r4, r5, lr}
mov r5, #0
ldr r4, .L3
ldr lr, .L3+4
sub sp, sp, #12
mov r3, ip
str ip, [r4]
ldr r1, .L3+8
ldr r2, .L3+12
ldr r0, .L3+16
ldr r4, .L3+20
str r5, [lr]
mov lr, pc
bx r4
ldr r0, .L3+24
ldr r3, .L3+28
mov lr, pc
bx r3
mov r3, #67108864
ldr r2, .L3+32
ldr r0, .L3+36
strh r2, [r3] @ movhi
ldr r3, .L3+40
mov lr, pc
bx r3
mov r2, #5
mov r1, #12
str r2, [sp]
mov r0, #115
mov r2, #4
mov r3, #40
ldr r4, .L3+44
mov lr, pc
bx r4
ldr r3, .L3+48
mov lr, pc
bx r3
add sp, sp, #12
@ sp needed
ldmfd sp!, {r4, r5, lr}
bx lr
.L4:
.align 2
.L3:
.word startInstr
.word state
.word 194316
.word 11025
.word introsong
.word playSoundA
.word startPal
.word loadPalette
.word 1044
.word startBitmap
.word drawBackgroundImage4
.word drawRect4
.word flipPage
.size goToSplash, .-goToSplash
.align 2
.type updateWinLose.part.1, %function
updateWinLose.part.1:
@ Function supports interworking.
@ args = 0, pretend = 0, frame = 0
@ frame_needed = 0, uses_anonymous_args = 0
ldr r3, .L9
ldr r3, [r3]
tst r3, #8
bxne lr
stmfd sp!, {r4, lr}
ldr r3, .L9+4
mov lr, pc
bx r3
ldmfd sp!, {r4, lr}
b goToSplash
.L10:
.align 2
.L9:
.word buttons
.word flipPage
.size updateWinLose.part.1, .-updateWinLose.part.1
.align 2
.global goToInstructions
.type goToInstructions, %function
goToInstructions:
@ Function supports interworking.
@ args = 0, pretend = 0, frame = 0
@ frame_needed = 0, uses_anonymous_args = 0
mov r1, #1
stmfd sp!, {r4, lr}
ldr r2, .L13
ldr r0, .L13+4
ldr r3, .L13+8
str r1, [r2]
mov lr, pc
bx r3
ldr r0, .L13+12
ldr r3, .L13+16
mov lr, pc
bx r3
ldr r3, .L13+20
mov lr, pc
bx r3
ldmfd sp!, {r4, lr}
bx lr
.L14:
.align 2
.L13:
.word state
.word instructionsPal
.word loadPalette
.word instructionsBitmap
.word drawBackgroundImage4
.word flipPage
.size goToInstructions, .-goToInstructions
.align 2
.global updateInstructions
.type updateInstructions, %function
updateInstructions:
@ Function supports interworking.
@ args = 0, pretend = 0, frame = 0
@ frame_needed = 0, uses_anonymous_args = 0
stmfd sp!, {r4, r5, r6, lr}
ldr r4, .L32
ldr r3, [r4]
tst r3, #2
beq .L16
ldr r2, .L32+4
ldr r0, [r2]
ands r5, r0, #2
beq .L29
.L16:
tst r3, #16
beq .L17
ldr r2, .L32+4
ldr r0, [r2]
ands r5, r0, #16
beq .L30
.L17:
tst r3, #32
beq .L15
ldr r3, .L32+4
ldr r0, [r3]
ands r4, r0, #32
beq .L31
.L15:
ldmfd sp!, {r4, r5, r6, lr}
bx lr
.L31:
ldr r0, .L32+8
ldr r3, .L32+12
mov lr, pc
bx r3
ldr r3, .L32+16
mov lr, pc
bx r3
mov r0, r4
ldr r3, .L32+20
mov lr, pc
bx r3
ldmfd sp!, {r4, r5, r6, lr}
bx lr
.L30:
ldr r0, .L32+24
ldr r3, .L32+12
mov lr, pc
bx r3
ldr r3, .L32+16
mov lr, pc
bx r3
ldr r3, .L32+20
mov r0, r5
mov lr, pc
bx r3
ldr r3, [r4]
b .L17
.L29:
ldr r3, .L32+16
mov lr, pc
bx r3
ldr r3, .L32+20
mov r0, r5
mov lr, pc
bx r3
bl goToSplash
ldr r3, [r4]
b .L16
.L33:
.align 2
.L32:
.word oldButtons
.word buttons
.word instructionsBitmap
.word drawBackgroundImage4
.word flipPage
.word fillScreen4
.word instructions2Bitmap
.size updateInstructions, .-updateInstructions
.align 2
.global goToGame
.type goToGame, %function
goToGame:
@ Function supports interworking.
@ args = 0, pretend = 0, frame = 0
@ frame_needed = 0, uses_anonymous_args = 0
mov r1, #2
ldr r2, .L38
stmfd sp!, {r4, lr}
ldr r0, .L38+4
ldr r3, .L38+8
str r1, [r2]
mov lr, pc
bx r3
mov lr, #5888
mov r3, #67108864
ldr ip, .L38+12
ldr r4, .L38+16
ldr r1, .L38+20
ldr r0, .L38+24
ldr r2, .L38+28
strh lr, [r3] @ movhi
strh r4, [r3, #12] @ movhi
strh r0, [r3, #80] @ movhi
strh ip, [r3, #10] @ movhi
ldr r4, .L38+32
strh r1, [r3, #8] @ movhi
strh r2, [r3, #82] @ movhi
ldr r1, .L38+36
mov r3, #2544
mov r2, #100663296
mov r0, #3
mov lr, pc
bx r4
mov r3, #1024
ldr r2, .L38+40
ldr r1, .L38+44
mov r0, #3
mov lr, pc
bx r4
mov r3, #2448
ldr r2, .L38+48
ldr r1, .L38+52
mov r0, #3
mov lr, pc
bx r4
mov r3, #2048
ldr r2, .L38+56
ldr r1, .L38+60
mov r0, #3
mov lr, pc
bx r4
mov r3, #64
ldr r2, .L38+64
ldr r1, .L38+68
mov r0, #3
mov lr, pc
bx r4
mov r3, #1024
ldr r2, .L38+72
ldr r1, .L38+76
mov r0, #3
mov lr, pc
bx r4
mov r3, #16384
ldr r2, .L38+80
ldr r1, .L38+84
mov r0, #3
mov lr, pc
bx r4
mov r3, #256
ldr r2, .L38+88
ldr r1, .L38+92
mov r0, #3
mov lr, pc
bx r4
mov r2, #0
mov r1, #512
ldr ip, .L38+96
ldr r0, .L38+100
mov r3, r2
str r2, [ip]
str r2, [r0]
ldr r2, .L38+104
.L35:
strh r1, [r2, r3] @ movhi
add r3, r3, #8
cmp r3, #1024
bne .L35
ldmfd sp!, {r4, lr}
bx lr
.L39:
.align 2
.L38:
.word state
.word cloudsPal
.word loadPalette
.word -25595
.word 7938
.word 6920
.word 13378
.word 2313
.word DMANow
.word backgroundTiles
.word 100726784
.word backgroundMap
.word 100679680
.word cloudsTiles
.word 100720640
.word cloudsMap
.word 100696064
.word scorebgTiles
.word 100718592
.word scorebgMap
.word 100728832
.word spritesTiles
.word 83886592
.word spritesPal
.word vOff
.word hOff
.word shadowOAM
.size goToGame, .-goToGame
.align 2
.global goToPause
.type goToPause, %function
goToPause:
@ Function supports interworking.
@ args = 0, pretend = 0, frame = 0
@ frame_needed = 0, uses_anonymous_args = 0
mov r2, #67108864
mov r0, #3
ldr r1, .L42
ldr r3, .L42+4
stmfd sp!, {r4, lr}
str r0, [r3]
strh r1, [r2] @ movhi
ldr r3, .L42+8
mov lr, pc
bx r3
ldr r0, .L42+12
ldr r3, .L42+16
mov lr, pc
bx r3
ldr r0, .L42+20
ldr r3, .L42+24
mov lr, pc
bx r3
ldr r3, .L42+28
mov lr, pc
bx r3
ldmfd sp!, {r4, lr}
bx lr
.L43:
.align 2
.L42:
.word 1044
.word state
.word pauseSound
.word pausePal
.word loadPalette
.word pauseBitmap
.word drawBackgroundImage4
.word flipPage
.size goToPause, .-goToPause
.align 2
.global updatePause
.type updatePause, %function
updatePause:
@ Function supports interworking.
@ args = 0, pretend = 0, frame = 0
@ frame_needed = 0, uses_anonymous_args = 0
stmfd sp!, {r4, r5, r6, lr}
ldr r4, .L56
ldr r3, [r4]
tst r3, #4
beq .L45
ldr r2, .L56+4
ldr r0, [r2]
ands r5, r0, #4
beq .L54
.L45:
tst r3, #8
beq .L44
ldr r3, .L56+4
ldr r0, [r3]
ands r4, r0, #8
beq .L55
.L44:
ldmfd sp!, {r4, r5, r6, lr}
bx lr
.L55:
ldr r3, .L56+8
mov lr, pc
bx r3
mov r0, r4
ldr r3, .L56+12
mov lr, pc
bx r3
ldmfd sp!, {r4, r5, r6, lr}
b goToSplash
.L54:
ldr r3, .L56+8
mov lr, pc
bx r3
ldr r3, .L56+16
mov lr, pc
bx r3
ldr r3, .L56+12
mov r0, r5
mov lr, pc
bx r3
bl goToGame
ldr r3, [r4]
b .L45
.L57:
.align 2
.L56:
.word oldButtons
.word buttons
.word flipPage
.word fillScreen4
.word unpauseSound
.size updatePause, .-updatePause
.align 2
.global goToWinLose
.type goToWinLose, %function
goToWinLose:
@ Function supports interworking.
@ args = 0, pretend = 0, frame = 48
@ frame_needed = 0, uses_anonymous_args = 0
mov r0, #4
mov r3, #67108864
stmfd sp!, {r4, r5, r6, lr}
ldr r1, .L69
ldr r4, .L69+4
str r0, [r1]
ldr r1, [r4]
ldr r2, .L69+8
cmp r1, #200
sub sp, sp, #48
strh r2, [r3] @ movhi
ldr r5, .L69+12
ble .L59
ldr r3, [r5]
cmp r3, #0
beq .L59
ldr r0, .L69+16
cmp r3, #2
cmpgt r1, r0
ble .L68
cmp r3, #4
movgt r2, #0
movle r2, #1
sub r1, r1, #600
cmp r1, r0
movhi r3, r2
orrls r3, r2, #1
cmp r3, #0
beq .L63
ldr r0, .L69+20
ldr r3, .L69+24
mov lr, pc
bx r3
ldr r3, .L69+28
ldr r0, .L69+32
mov lr, pc
bx r3
ldr r6, .L69+36
ldr r2, [r4]
ldr r1, .L69+40
add r0, sp, #4
mov lr, pc
bx r6
ldr r4, .L69+44
mov r3, #7
add r2, sp, #4
mov r1, #170
mov r0, #70
mov lr, pc
bx r4
ldr r2, [r5]
add r0, sp, #4
ldr r1, .L69+40
mov lr, pc
bx r6
add r2, sp, #4
mov r3, #7
b .L67
.L59:
ldr r0, .L69+48
ldr r3, .L69+24
mov lr, pc
bx r3
ldr r3, .L69+28
ldr r0, .L69+52
mov lr, pc
bx r3
ldr r6, .L69+36
ldr r2, [r4]
ldr r1, .L69+40
add r0, sp, #4
mov lr, pc
bx r6
ldr r4, .L69+44
mov r3, #4
add r2, sp, #4
mov r1, #170
mov r0, #70
mov lr, pc
bx r4
ldr r2, [r5]
add r0, sp, #4
ldr r1, .L69+40
mov lr, pc
bx r6
mov r3, #4
add r2, sp, #4
.L67:
mov r1, #180
mov r0, #110
mov lr, pc
bx r4
ldr r3, .L69+56
mov lr, pc
bx r3
.L58:
add sp, sp, #48
@ sp needed
ldmfd sp!, {r4, r5, r6, lr}
bx lr
.L68:
ldr r0, .L69+60
ldr r3, .L69+24
mov lr, pc
bx r3
ldr r3, .L69+28
ldr r0, .L69+64
mov lr, pc
bx r3
ldr r6, .L69+36
ldr r2, [r4]
ldr r1, .L69+40
add r0, sp, #4
mov lr, pc
bx r6
ldr r4, .L69+44
mov r3, #6
add r2, sp, #4
mov r1, #170
mov r0, #70
mov lr, pc
bx r4
ldr r2, [r5]
add r0, sp, #4
ldr r1, .L69+40
mov lr, pc
bx r6
add r2, sp, #4
mov r3, #6
b .L67
.L63:
ldr r0, .L69+68
ldr r3, .L69+24
mov lr, pc
bx r3
ldr r3, .L69+28
ldr r0, .L69+72
mov lr, pc
bx r3
ldr r6, .L69+36
ldr r2, [r4]
add r0, sp, #4
ldr r1, .L69+40
mov lr, pc
bx r6
ldr r4, .L69+44
add r2, sp, #4
mov r3, #3
mov r1, #50
mov r0, #70
mov lr, pc
bx r4
ldr r2, [r5]
add r0, sp, #4
ldr r1, .L69+40
mov lr, pc
bx r6
add r2, sp, #4
mov r3, #3
mov r1, #55
mov r0, #110
mov lr, pc
bx r4
ldr r3, .L69+56
mov lr, pc
bx r3
b .L58
.L70:
.align 2
.L69:
.word state
.word height
.word 1044
.word score
.word 599
.word okPal
.word loadPalette
.word drawBackgroundImage4
.word okBitmap
.word sprintf
.word .LC0
.word drawString
.word realbadPal
.word realbadBitmap
.word flipPage
.word badPal
.word badBitmap
.word awesomePal
.word awesomeBitmap
.size goToWinLose, .-goToWinLose
.align 2
.global updateWinLose
.type updateWinLose, %function
updateWinLose:
@ Function supports interworking.
@ args = 0, pretend = 0, frame = 0
@ frame_needed = 0, uses_anonymous_args = 0
@ link register save eliminated.
ldr r3, .L73
ldr r3, [r3]
tst r3, #8
bxeq lr
b updateWinLose.part.1
.L74:
.align 2
.L73:
.word oldButtons
.size updateWinLose, .-updateWinLose
.global __aeabi_i2d
.global __aeabi_ddiv
.global __aeabi_d2iz
.align 2
.global getDigit
.type getDigit, %function
getDigit:
@ Function supports interworking.
@ args = 0, pretend = 0, frame = 0
@ frame_needed = 0, uses_anonymous_args = 0
stmfd sp!, {r4, r5, r6, r7, r8, lr}
mov r5, r0
ldr r4, .L77
mov r0, r1
mov lr, pc
bx r4
ldr r6, .L77+4
mov r2, r0
mov r3, r1
mov r0, #0
ldr r1, .L77+8
mov lr, pc
bx r6
mov r6, r0
mov r7, r1
mov r0, r5
mov lr, pc
bx r4
mov r2, r6
mov r3, r7
ldr r4, .L77+12
mov lr, pc
bx r4
ldr r3, .L77+16
mov lr, pc
bx r3
ldr r3, .L77+20
smull r1, r2, r3, r0
mov r3, r0, asr #31
rsb r3, r3, r2, asr #2
add r3, r3, r3, lsl #2
sub r0, r0, r3, asl #1
ldmfd sp!, {r4, r5, r6, r7, r8, lr}
bx lr
.L78:
.align 2
.L77:
.word __aeabi_i2d
.word pow
.word 1076101120
.word __aeabi_ddiv
.word __aeabi_d2iz
.word 1717986919
.size getDigit, .-getDigit
.align 2
.global updateOAM
.type updateOAM, %function
updateOAM:
@ Function supports interworking.
@ args = 0, pretend = 0, frame = 0
@ frame_needed = 0, uses_anonymous_args = 0
ldr r3, .L105
ldr r2, [r3, #48]
cmp r2, #0
stmfd sp!, {r4, r5, r6, r7, r8, r9, r10, lr}
beq .L80
ldr r2, [r3, #8]
mvn r2, r2, asl #17
mvn r2, r2, lsr #17
ldr r1, [r3]
ldr r3, [r3, #28]
ldr ip, .L105+4
mov r1, r1, asr #8
orr r3, r3, #2048
strh r2, [ip, #34] @ movhi
strh r1, [ip, #32] @ movhi
strh r3, [ip, #36] @ movhi
.L81:
ldr r5, .L105+4
mov r6, #512
mov ip, r5
mov r3, r5
ldr r2, .L105+8
add lr, r5, #72
.L84:
ldr r1, [r2]
cmp r1, #0
ldrne r1, [r2, #-4]
ldrne r0, [r2, #-20]
addne r1, r1, #128
ldrne r4, [r2, #-24]
orrne r1, r1, #2048
orrne r0, r0, #16384
strneh r1, [r3, #44] @ movhi
strneh r0, [r3, #42] @ movhi
strneh r4, [r3, #40] @ movhi
streqh r6, [r3, #40] @ movhi
add r3, r3, #8
cmp r3, lr
add r2, r2, #28
bne .L84
mov r6, #512
ldr r3, .L105+12
ldr r2, .L105+4
add r0, r3, #100
.L87:
ldr r1, [r3, #12]
cmp r1, #0
ldrne r1, [r3, #16]
ldrne r4, [r3]
addne r1, r1, #256
ldrne lr, [r3, #4]
orrne r1, r1, #2048
add r3, r3, #20
strneh r1, [r2, #124] @ movhi
strneh r4, [r2, #120] @ movhi
strneh lr, [r2, #122] @ movhi
streqh r6, [r2, #120] @ movhi
cmp r3, r0
add r2, r2, #8
bne .L87
mov r1, #202
ldr r7, .L105+16
ldr r0, [r7]
mov r3, #145
cmp r0, #7
strh r1, [ip, #4] @ movhi
moveq r1, #512
strh r3, [ip, #16] @ movhi
ldrne r1, .L105+20
strh r3, [ip] @ movhi
strh r3, [ip, #8] @ movhi
ldr r3, .L105+4
ldr r2, .L105+24
streqh r1, [r3, #16] @ movhi
strneh r1, [r3, #10] @ movhi
mov r1, #288
strh r2, [ip, #2] @ movhi
ldrne r2, .L105+28
addeq r2, r2, #145
streqh r2, [r3, #10] @ movhi
strneh r2, [r3, #18] @ movhi
mov r0, #206
mov r2, #142
mov r4, #50
mov r10, #0
mov r8, #145
ldr r3, .L105+32
ldr r3, [r3]
add r3, r3, r1
strh r3, [ip, #28] @ movhi
ldr r3, .L105+36
strh r0, [ip, #12] @ movhi
strh r1, [ip, #20] @ movhi
strh r2, [ip, #24] @ movhi
strh r3, [ip, #26] @ movhi
ldr r6, .L105+4
ldr r9, .L105+40
.L90:
strh r4, [r6, #170] @ movhi
mov r1, r10
strh r8, [r6, #168] @ movhi
ldr r0, [r9]
bl getDigit
add r10, r10, #1
sub r4, r4, #8
add r0, r0, #192
mov r4, r4, asl #16
cmp r10, #3
strh r0, [r6, #172] @ movhi
mov r4, r4, lsr #16
add r6, r6, #8
bne .L90
ldr r3, [r7]
cmp r3, #0
ble .L94
mov r4, #230
mov r6, #0
mov r9, #145
ldr r8, .L105+44
.L91:
mov r1, r6
ldr r0, [r8]
strh r4, [r5, #202] @ movhi
strh r9, [r5, #200] @ movhi
bl getDigit
ldr r3, [r7]
add r6, r6, #1
sub r4, r4, #8
add r0, r0, #192
mov r4, r4, asl #16
cmp r3, r6
strh r0, [r5, #204] @ movhi
mov r4, r4, lsr #16
add r5, r5, #8
bgt .L91
.L94:
ldr r3, .L105+48
ldr r3, [r3]
cmp r3, #0
beq .L104
mov r2, #512
ldr r3, .L105+52
strh r2, [r3], #8 @ movhi
ldmfd sp!, {r4, r5, r6, r7, r8, r9, r10, lr}
strh r2, [r3] @ movhi
bx lr
.L80:
mov r3, #512
ldr ip, .L105+4
strh r3, [ip, #32] @ movhi
b .L81
.L104:
ldr r3, .L105+52
mov r1, #40
mov r2, r3
mov lr, #352
mov ip, #360
ldr r4, .L105+56
strh r1, [r2, #8]! @ movhi
ldr r0, .L105+60
strh r4, [r3, #2] @ movhi
strh lr, [r3, #4] @ movhi
strh ip, [r3, #12] @ movhi
strh r1, [r3] @ movhi
strh r0, [r2, #2] @ movhi
ldmfd sp!, {r4, r5, r6, r7, r8, r9, r10, lr}
bx lr
.L106:
.align 2
.L105:
.word player
.word shadowOAM
.word platforms+24
.word stars
.word cheat
.word -32628
.word -32763
.word -32678
.word soundSprite
.word 16454
.word score
.word height
.word startGame
.word shadowOAM+480
.word -16324
.word -16259
.size updateOAM, .-updateOAM
.global __aeabi_idivmod
.align 2
.global updateGame
.type updateGame, %function
updateGame:
@ Function supports interworking.
@ args = 0, pretend = 0, frame = 8
@ frame_needed = 0, uses_anonymous_args = 0
mov r3, #0
mov r1, #512
stmfd sp!, {r4, r5, r6, r7, r8, r9, r10, fp, lr}
ldr r5, .L192
ldr r2, [r5]
add r2, r2, #1
str r2, [r5]
ldr r2, .L192+4
sub sp, sp, #12
.L108:
strh r1, [r2, r3] @ movhi
add r3, r3, #8
cmp r3, #1024
bne .L108
ldr r6, .L192+8
ldr r3, [r6]
cmp r3, #0
beq .L109
ldr r4, .L192+12
ldr r7, .L192+16
ldr r2, [r4, #16]
.L110:
ldr r0, [r4, #36]
ldr r1, [r4]
ldr r3, [r4, #12]
add r2, r2, r0
add r1, r2, r1
rsb r3, r3, #142
cmp r3, r1, asr #8
str r2, [r4, #16]
str r1, [r4]
ldr r2, .L192+12
movle r1, #0
movle r3, r3, asl #8
strle r3, [r2]
strle r1, [r2, #16]
.L147:
ldr r8, .L192+12
ldr r1, .L192+20
mov r0, r8
ldr r3, .L192+24
mov lr, pc
bx r3
cmp r0, #0
beq .L182
ldr r3, .L192+28
ldr r2, [r8, #40]
ldr r3, [r3]
rsb r2, r2, #0
cmp r3, #0
str r2, [r8, #16]
bne .L115
ldr r2, .L192+32
ldr r1, .L192+36
ldr r0, .L192+40
ldr r9, .L192+44
mov lr, pc
bx r9
.L182:
ldr r2, [r8, #16]
cmp r2, #100
bgt .L185
.L116:
ldr r1, [r4]
mov r3, r2, lsr #31
cmp r1, #13568
movge r1, #0
andlt r1, r3, #1
.L148:
mov r3, #0
cmp r1, r3
str r3, [r4, #28]
beq .L186
mov r1, r3
mov fp, r3
ldr r10, .L192+48
ldr r8, .L192+52
ldr r0, [r10]
str r0, [sp]
ldr r0, [r8]
ldr ip, .L192+20
str r0, [sp, #4]
ldr r0, .L192+56
mov r2, r2, asr #8
.L124: