forked from pret/pokeemerald
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathlibrfu_stwi.s
28857 lines (25501 loc) · 357 KB
/
librfu_stwi.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
@ Generated by gcc 2.9-arm-000512 for Thumb/elf
.code 16
.gcc2_compiled.:
.text
.align 2, 0
.globl STWI_init_all
.type STWI_init_all,function
.thumb_func
STWI_init_all:
.LFB1:
.LM1:
push {r4, lr}
add r3, r0, #0
lsl r2, r2, #0x18
lsr r2, r2, #0x18
.LM2:
.LBB2:
cmp r2, #0x1
bne .L3 @cond_branch
.LM3:
add r2, r3, #0
add r2, r2, #0xe8
str r2, [r1]
.LM4:
.LBB3:
ldr r1, .L6
ldr r0, .L6+0x4
str r0, [r1]
str r2, [r1, #0x4]
ldr r0, .L6+0x8
str r0, [r1, #0x8]
ldr r0, [r1, #0x8]
.LBE3:
.LM5:
ldr r1, .L6+0xc
ldr r2, .L6+0x10
add r0, r3, r2
.LM6:
b .L5
.L7:
.align 2, 0
.L6:
.word 0x40000d4
.word IntrSIO32
.word -0x7ffffb50
.word gSTWIStatus
.word 0xa48
.L3:
.LM7:
ldr r0, .L8
str r0, [r1]
.LM8:
ldr r1, .L8+0x4
add r0, r3, #0
add r0, r0, #0xe8
.L5:
str r0, [r1]
add r2, r1, #0
.LM9:
ldr r1, [r2]
str r3, [r1, #0x28]
.LM10:
add r0, r3, #0
add r0, r0, #0x74
str r0, [r1, #0x24]
.LM11:
ldrb r0, [r1, #0x14]
mov r4, #0x0
mov r0, #0x1
strb r0, [r1, #0x14]
.LM12:
ldr r0, [r2]
str r4, [r0]
.LM13:
strb r4, [r0, #0x4]
.LM14:
ldr r0, [r2]
strb r4, [r0, #0x5]
.LM15:
ldr r0, [r2]
strb r4, [r0, #0x7]
.LM16:
ldr r0, [r2]
strb r4, [r0, #0x8]
.LM17:
ldr r0, [r2]
strb r4, [r0, #0x9]
.LM18:
ldr r0, [r2]
str r4, [r0, #0xc]
.LM19:
ldrb r1, [r0, #0x10]
strb r4, [r0, #0x10]
.LM20:
ldr r0, [r2]
ldrh r1, [r0, #0x12]
mov r1, #0x0
strh r4, [r0, #0x12]
.LM21:
strb r1, [r0, #0x15]
.LM22:
ldr r0, [r2]
add r0, r0, #0x2c
ldrb r2, [r0]
strb r1, [r0]
.LM23:
ldr r1, .L8+0x8
mov r2, #0x80
lsl r2, r2, #0x1
add r0, r2, #0
strh r0, [r1]
.LM24:
sub r1, r1, #0xc
ldr r2, .L8+0xc
add r0, r2, #0
strh r0, [r1]
.LM25:
bl STWI_init_Callback_M
.LM26:
bl STWI_init_Callback_S
.LM27:
.LBB4:
ldr r3, .L8+0x10
ldrh r2, [r3]
strh r4, [r3]
ldr r4, .L8+0x14
ldrh r0, [r4]
mov r1, #0x80
orr r0, r0, r1
strh r0, [r4]
strh r2, [r3]
.LBE4:
.LM28:
.LBE2:
pop {r4}
pop {r0}
bx r0
.L9:
.align 2, 0
.L8:
.word IntrSIO32
.word gSTWIStatus
.word 0x4000134
.word 0x5003
.word 0x4000208
.word 0x4000200
.LFE1:
.Lfe1:
.size STWI_init_all,.Lfe1-STWI_init_all
.align 2, 0
.globl STWI_init_timer
.type STWI_init_timer,function
.thumb_func
STWI_init_timer:
.LFB2:
.LM29:
push {r4, r5, lr}
.LM30:
.LBB5:
ldr r2, .L11
str r2, [r0]
.LM31:
ldr r5, .L11+0x4
ldr r0, [r5]
mov r4, #0x0
strb r1, [r0, #0xa]
.LM32:
.LBB6:
ldr r3, .L11+0x8
ldrh r2, [r3]
strh r4, [r3]
ldr r4, .L11+0xc
ldr r1, [r5]
mov r0, #0x8
ldrb r1, [r1, #0xa]
lsl r0, r0, r1
ldrh r1, [r4]
orr r0, r0, r1
strh r0, [r4]
strh r2, [r3]
.LBE6:
.LM33:
.LBE5:
pop {r4, r5}
pop {r0}
bx r0
.L12:
.align 2, 0
.L11:
.word STWI_intr_timer
.word gSTWIStatus
.word 0x4000208
.word 0x4000200
.LFE2:
.Lfe2:
.size STWI_init_timer,.Lfe2-STWI_init_timer
.align 2, 0
.globl AgbRFU_SoftReset
.type AgbRFU_SoftReset,function
.thumb_func
AgbRFU_SoftReset:
.LFB3:
.LM34:
push {r4, r5, lr}
.LM35:
.LBB7:
.LM36:
ldr r5, .L18
mov r1, #0x80
lsl r1, r1, #0x8
add r0, r1, #0
strh r0, [r5]
.LM37:
ldr r2, .L18+0x4
add r0, r2, #0
strh r0, [r5]
.LM38:
ldr r1, .L18+0x8
ldr r0, [r1]
ldrb r0, [r0, #0xa]
lsl r0, r0, #0x2
ldr r3, .L18+0xc
add r2, r0, r3
.LM39:
ldr r4, .L18+0x10
add r3, r0, r4
.LM40:
mov r0, #0x0
strh r0, [r3]
.LM41:
strh r0, [r2]
.LM42:
mov r0, #0x83
strh r0, [r3]
.LM43:
ldrh r0, [r2]
add r4, r1, #0
cmp r0, #0x11
bhi .L15 @cond_branch
ldr r0, .L18+0x14
add r1, r0, #0
.L16:
.LM44:
strh r1, [r5]
ldrh r0, [r2]
cmp r0, #0x11
bls .L16 @cond_branch
.L15:
.LM45:
mov r0, #0x3
strh r0, [r3]
.LM46:
ldr r1, .L18
ldr r2, .L18+0x4
add r0, r2, #0
strh r0, [r1]
.LM47:
sub r1, r1, #0xc
ldr r3, .L18+0x18
add r0, r3, #0
strh r0, [r1]
.LM48:
ldr r0, [r4]
mov r2, #0x0
str r2, [r0]
.LM49:
strb r2, [r0, #0x4]
.LM50:
ldr r0, [r4]
strb r2, [r0, #0x5]
.LM51:
ldr r0, [r4]
strb r2, [r0, #0x6]
.LM52:
ldr r0, [r4]
strb r2, [r0, #0x7]
.LM53:
ldr r0, [r4]
strb r2, [r0, #0x8]
.LM54:
ldr r0, [r4]
strb r2, [r0, #0x9]
.LM55:
ldr r0, [r4]
str r2, [r0, #0xc]
.LM56:
ldrb r1, [r0, #0x10]
strb r2, [r0, #0x10]
.LM57:
ldr r1, [r4]
ldrh r0, [r1, #0x12]
mov r3, #0x0
strh r2, [r1, #0x12]
.LM58:
ldrb r0, [r1, #0x14]
mov r0, #0x1
strb r0, [r1, #0x14]
.LM59:
ldr r0, [r4]
strb r3, [r0, #0x15]
.LM60:
ldr r0, [r4]
add r0, r0, #0x2c
ldrb r1, [r0]
strb r3, [r0]
.LM61:
.LBE7:
pop {r4, r5}
pop {r0}
bx r0
.L19:
.align 2, 0
.L18:
.word 0x4000134
.word 0x80a0
.word gSTWIStatus
.word 0x4000100
.word 0x4000102
.word 0x80a2
.word 0x5003
.LFE3:
.Lfe3:
.size AgbRFU_SoftReset,.Lfe3-AgbRFU_SoftReset
.align 2, 0
.globl STWI_set_MS_mode
.type STWI_set_MS_mode,function
.thumb_func
STWI_set_MS_mode:
.LFB4:
.LM62:
lsl r0, r0, #0x18
lsr r0, r0, #0x18
.LM63:
ldr r1, .L21
ldr r1, [r1]
ldrb r2, [r1, #0x14]
strb r0, [r1, #0x14]
.LM64:
bx lr
.L22:
.align 2, 0
.L21:
.word gSTWIStatus
.LFE4:
.Lfe4:
.size STWI_set_MS_mode,.Lfe4-STWI_set_MS_mode
.align 2, 0
.globl STWI_read_status
.type STWI_read_status,function
.thumb_func
STWI_read_status:
.LFB5:
.LM65:
push {lr}
lsl r0, r0, #0x18
lsr r0, r0, #0x18
add r1, r0, #0
.LM66:
cmp r0, #0x1
beq .L26 @cond_branch
cmp r0, #0x1
bgt .L31 @cond_branch
cmp r0, #0
beq .L25 @cond_branch
b .L29
.L31:
cmp r1, #0x2
beq .L27 @cond_branch
cmp r1, #0x3
beq .L28 @cond_branch
b .L29
.L25:
.LM67:
ldr r0, .L33
ldr r0, [r0]
ldrh r0, [r0, #0x12]
b .L32
.L34:
.align 2, 0
.L33:
.word gSTWIStatus
.L26:
.LM68:
ldr r0, .L35
ldr r0, [r0]
ldrb r0, [r0, #0x14]
b .L32
.L36:
.align 2, 0
.L35:
.word gSTWIStatus
.L27:
.LM69:
ldr r0, .L37
ldr r0, [r0]
ldr r0, [r0]
lsl r0, r0, #0x10
lsr r0, r0, #0x10
b .L32
.L38:
.align 2, 0
.L37:
.word gSTWIStatus
.L28:
.LM70:
ldr r0, .L39
ldr r0, [r0]
ldrb r0, [r0, #0x6]
b .L32
.L40:
.align 2, 0
.L39:
.word gSTWIStatus
.L29:
.LM71:
ldr r0, .L41
.L32:
.LM72:
pop {r1}
bx r1
.L42:
.align 2, 0
.L41:
.word 0xffff
.LFE5:
.Lfe5:
.size STWI_read_status,.Lfe5-STWI_read_status
.align 2, 0
.globl STWI_init_Callback_M
.type STWI_init_Callback_M,function
.thumb_func
STWI_init_Callback_M:
.LFB6:
.LM73:
push {lr}
.LM74:
mov r0, #0x0
bl STWI_set_Callback_M
.LM75:
pop {r0}
bx r0
.LFE6:
.Lfe6:
.size STWI_init_Callback_M,.Lfe6-STWI_init_Callback_M
.align 2, 0
.globl STWI_init_Callback_S
.type STWI_init_Callback_S,function
.thumb_func
STWI_init_Callback_S:
.LFB7:
.LM76:
push {lr}
.LM77:
mov r0, #0x0
bl STWI_set_Callback_S
.LM78:
pop {r0}
bx r0
.LFE7:
.Lfe7:
.size STWI_init_Callback_S,.Lfe7-STWI_init_Callback_S
.align 2, 0
.globl STWI_set_Callback_M
.type STWI_set_Callback_M,function
.thumb_func
STWI_set_Callback_M:
.LFB8:
.LM79:
.LM80:
ldr r1, .L46
ldr r1, [r1]
str r0, [r1, #0x18]
.LM81:
bx lr
.L47:
.align 2, 0
.L46:
.word gSTWIStatus
.LFE8:
.Lfe8:
.size STWI_set_Callback_M,.Lfe8-STWI_set_Callback_M
.align 2, 0
.globl STWI_set_Callback_S
.type STWI_set_Callback_S,function
.thumb_func
STWI_set_Callback_S:
.LFB9:
.LM82:
.LM83:
ldr r1, .L49
ldr r1, [r1]
str r0, [r1, #0x1c]
.LM84:
bx lr
.L50:
.align 2, 0
.L49:
.word gSTWIStatus
.LFE9:
.Lfe9:
.size STWI_set_Callback_S,.Lfe9-STWI_set_Callback_S
.align 2, 0
.globl STWI_set_Callback_ID
.type STWI_set_Callback_ID,function
.thumb_func
STWI_set_Callback_ID:
.LFB10:
.LM85:
.LM86:
ldr r1, .L52
ldr r1, [r1]
str r0, [r1, #0x20]
.LM87:
bx lr
.L53:
.align 2, 0
.L52:
.word gSTWIStatus
.LFE10:
.Lfe10:
.size STWI_set_Callback_ID,.Lfe10-STWI_set_Callback_ID
.align 2, 0
.globl STWI_poll_CommandEnd
.type STWI_poll_CommandEnd,function
.thumb_func
STWI_poll_CommandEnd:
.LFB11:
.LM88:
push {lr}
.LM89:
ldr r0, .L59
ldr r1, [r0]
add r2, r1, #0
add r2, r2, #0x2c
ldrb r1, [r2]
add r3, r0, #0
cmp r1, #0x1
bne .L56 @cond_branch
add r1, r2, #0
.L55:
ldrb r0, [r1]
cmp r0, #0x1
beq .L55 @cond_branch
.L56:
.LM90:
ldr r0, [r3]
ldrh r0, [r0, #0x12]
.LM91:
pop {r1}
bx r1
.L60:
.align 2, 0
.L59:
.word gSTWIStatus
.LFE11:
.Lfe11:
.size STWI_poll_CommandEnd,.Lfe11-STWI_poll_CommandEnd
.align 2, 0
.globl STWI_send_ResetREQ
.type STWI_send_ResetREQ,function
.thumb_func
STWI_send_ResetREQ:
.LFB12:
.LM92:
push {lr}
.LM93:
mov r0, #0x10
bl STWI_init
lsl r0, r0, #0x10
lsr r1, r0, #0x10
cmp r1, #0
bne .L62 @cond_branch
.LM94:
ldr r0, .L63
ldr r0, [r0]
strb r1, [r0, #0x4]
.LM95:
bl STWI_start_Command
.L62:
.LM96:
pop {r0}
bx r0
.L64:
.align 2, 0
.L63:
.word gSTWIStatus
.LFE12:
.Lfe12:
.size STWI_send_ResetREQ,.Lfe12-STWI_send_ResetREQ
.align 2, 0
.globl STWI_send_LinkStatusREQ
.type STWI_send_LinkStatusREQ,function
.thumb_func
STWI_send_LinkStatusREQ:
.LFB13:
.LM97:
push {lr}
.LM98:
mov r0, #0x11
bl STWI_init
lsl r0, r0, #0x10
lsr r1, r0, #0x10
cmp r1, #0
bne .L66 @cond_branch
.LM99:
ldr r0, .L67
ldr r0, [r0]
strb r1, [r0, #0x4]
.LM100:
bl STWI_start_Command
.L66:
.LM101:
pop {r0}
bx r0
.L68:
.align 2, 0
.L67:
.word gSTWIStatus
.LFE13:
.Lfe13:
.size STWI_send_LinkStatusREQ,.Lfe13-STWI_send_LinkStatusREQ
.align 2, 0
.globl STWI_send_VersionStatusREQ
.type STWI_send_VersionStatusREQ,function
.thumb_func
STWI_send_VersionStatusREQ:
.LFB14:
.LM102:
push {lr}
.LM103:
mov r0, #0x12
bl STWI_init
lsl r0, r0, #0x10
lsr r1, r0, #0x10
cmp r1, #0
bne .L70 @cond_branch
.LM104:
ldr r0, .L71
ldr r0, [r0]
strb r1, [r0, #0x4]
.LM105:
bl STWI_start_Command
.L70:
.LM106:
pop {r0}
bx r0
.L72:
.align 2, 0
.L71:
.word gSTWIStatus
.LFE14:
.Lfe14:
.size STWI_send_VersionStatusREQ,.Lfe14-STWI_send_VersionStatusREQ
.align 2, 0
.globl STWI_send_SystemStatusREQ
.type STWI_send_SystemStatusREQ,function
.thumb_func
STWI_send_SystemStatusREQ:
.LFB15:
.LM107:
push {lr}
.LM108:
mov r0, #0x13
bl STWI_init
lsl r0, r0, #0x10
lsr r1, r0, #0x10
cmp r1, #0
bne .L74 @cond_branch
.LM109:
ldr r0, .L75
ldr r0, [r0]
strb r1, [r0, #0x4]
.LM110:
bl STWI_start_Command
.L74:
.LM111:
pop {r0}
bx r0
.L76:
.align 2, 0
.L75:
.word gSTWIStatus
.LFE15:
.Lfe15:
.size STWI_send_SystemStatusREQ,.Lfe15-STWI_send_SystemStatusREQ
.align 2, 0
.globl STWI_send_SlotStatusREQ
.type STWI_send_SlotStatusREQ,function
.thumb_func
STWI_send_SlotStatusREQ:
.LFB16:
.LM112:
push {lr}
.LM113:
mov r0, #0x14
bl STWI_init
lsl r0, r0, #0x10
lsr r1, r0, #0x10
cmp r1, #0
bne .L78 @cond_branch
.LM114:
ldr r0, .L79
ldr r0, [r0]
strb r1, [r0, #0x4]
.LM115:
bl STWI_start_Command
.L78:
.LM116:
pop {r0}
bx r0
.L80:
.align 2, 0
.L79:
.word gSTWIStatus
.LFE16:
.Lfe16:
.size STWI_send_SlotStatusREQ,.Lfe16-STWI_send_SlotStatusREQ
.align 2, 0
.globl STWI_send_ConfigStatusREQ
.type STWI_send_ConfigStatusREQ,function
.thumb_func
STWI_send_ConfigStatusREQ:
.LFB17:
.LM117:
push {lr}
.LM118:
mov r0, #0x15
bl STWI_init
lsl r0, r0, #0x10
lsr r1, r0, #0x10
cmp r1, #0
bne .L82 @cond_branch
.LM119:
ldr r0, .L83
ldr r0, [r0]
strb r1, [r0, #0x4]
.LM120:
bl STWI_start_Command
.L82:
.LM121:
pop {r0}
bx r0
.L84:
.align 2, 0
.L83:
.word gSTWIStatus
.LFE17:
.Lfe17:
.size STWI_send_ConfigStatusREQ,.Lfe17-STWI_send_ConfigStatusREQ
.align 2, 0
.globl STWI_send_GameConfigREQ
.type STWI_send_GameConfigREQ,function
.thumb_func
STWI_send_GameConfigREQ:
.LFB18:
.LM122:
push {r4, r5, lr}
add r4, r0, #0
add r5, r1, #0
.LM123:
.LBB8:
.LM124:
mov r0, #0x16
bl STWI_init
lsl r0, r0, #0x10
cmp r0, #0
bne .L86 @cond_branch
.LM125:
ldr r2, .L97
ldr r1, [r2]
mov r0, #0x6
strb r0, [r1, #0x4]
.LM126:
ldr r0, [r2]
ldr r1, [r0, #0x24]
.LM127:
add r1, r1, #0x4
.LM128:
ldrh r0, [r4]
strh r0, [r1]
.LM129:
add r1, r1, #0x2
.LM130:
add r4, r4, #0x2
.LM131:
mov r2, #0xd
.L90:
.LM132:
ldrb r0, [r4]
strb r0, [r1]
.LM133:
add r1, r1, #0x1
.LM134:
add r4, r4, #0x1
.LM135:
sub r2, r2, #0x1
cmp r2, #0
bge .L90 @cond_branch
.LM136:
mov r2, #0x7
.L95:
.LM137:
ldrb r0, [r5]
strb r0, [r1]
.LM138:
add r1, r1, #0x1
.LM139:
add r5, r5, #0x1
.LM140:
sub r2, r2, #0x1
cmp r2, #0
bge .L95 @cond_branch
.LM141:
bl STWI_start_Command
.L86:
.LM142:
.LBE8:
pop {r4, r5}
pop {r0}
bx r0
.L98:
.align 2, 0
.L97:
.word gSTWIStatus
.LFE18:
.Lfe18:
.size STWI_send_GameConfigREQ,.Lfe18-STWI_send_GameConfigREQ
.align 2, 0
.globl STWI_send_SystemConfigREQ
.type STWI_send_SystemConfigREQ,function
.thumb_func
STWI_send_SystemConfigREQ:
.LFB19:
.LM143:
push {r4, r5, r6, lr}
lsl r0, r0, #0x10
lsr r6, r0, #0x10
lsl r1, r1, #0x18
lsr r5, r1, #0x18
lsl r2, r2, #0x18
lsr r4, r2, #0x18
.LM144:
.LBB9:
mov r0, #0x17
bl STWI_init
lsl r0, r0, #0x10
cmp r0, #0
bne .L100 @cond_branch
.LM145:
.LBB10:
.LM146:
ldr r2, .L101
ldr r1, [r2]
mov r0, #0x1