donut-decomp/asm/bte/rfc_utils.s

742 lines
30 KiB
ArmAsm
Raw Normal View History

2022-10-16 16:05:58 +00:00
.include "macros.inc"
.section .text, "ax" # 0x80006A00 - 0x80406260 ; 0x003FF860
2022-10-16 16:31:36 +00:00
.global rfc_calc_fcs
rfc_calc_fcs:
/* 8009BFB0 00097DF0 3C A0 80 41 */ lis r5, rfc_crctable@ha
2022-10-16 16:05:58 +00:00
/* 8009BFB4 00097DF4 38 C0 00 FF */ li r6, 0xff
2022-10-16 16:31:36 +00:00
/* 8009BFB8 00097DF8 38 A5 81 50 */ addi r5, r5, rfc_crctable@l
2022-10-16 16:05:58 +00:00
/* 8009BFBC 00097DFC 48 00 00 14 */ b lbl_8009BFD0
.global lbl_8009BFC0
lbl_8009BFC0:
/* 8009BFC0 00097E00 88 04 00 00 */ lbz r0, 0x0(r4)
/* 8009BFC4 00097E04 38 84 00 01 */ addi r4, r4, 0x1
/* 8009BFC8 00097E08 7C C0 02 78 */ xor r0, r6, r0
/* 8009BFCC 00097E0C 7C C5 00 AE */ lbzx r6, r5, r0
.global lbl_8009BFD0
lbl_8009BFD0:
/* 8009BFD0 00097E10 54 60 04 3F */ clrlwi. r0, r3, 16
/* 8009BFD4 00097E14 38 63 FF FF */ addi r3, r3, -0x1
/* 8009BFD8 00097E18 40 82 FF E8 */ bne lbl_8009BFC0
/* 8009BFDC 00097E1C 20 06 00 FF */ subfic r0, r6, 0xff
/* 8009BFE0 00097E20 54 03 06 3E */ clrlwi r3, r0, 24
/* 8009BFE4 00097E24 4E 80 00 20 */ blr
2022-10-16 16:31:36 +00:00
.global rfc_check_fcs
rfc_check_fcs:
/* 8009BFE8 00097E28 3C C0 80 41 */ lis r6, rfc_crctable@ha
2022-10-16 16:05:58 +00:00
/* 8009BFEC 00097E2C 38 E0 00 FF */ li r7, 0xff
2022-10-16 16:31:36 +00:00
/* 8009BFF0 00097E30 38 C6 81 50 */ addi r6, r6, rfc_crctable@l
2022-10-16 16:05:58 +00:00
/* 8009BFF4 00097E34 48 00 00 14 */ b lbl_8009C008
.global lbl_8009BFF8
lbl_8009BFF8:
/* 8009BFF8 00097E38 88 04 00 00 */ lbz r0, 0x0(r4)
/* 8009BFFC 00097E3C 38 84 00 01 */ addi r4, r4, 0x1
/* 8009C000 00097E40 7C E0 02 78 */ xor r0, r7, r0
/* 8009C004 00097E44 7C E6 00 AE */ lbzx r7, r6, r0
.global lbl_8009C008
lbl_8009C008:
/* 8009C008 00097E48 54 60 04 3F */ clrlwi. r0, r3, 16
/* 8009C00C 00097E4C 38 63 FF FF */ addi r3, r3, -0x1
/* 8009C010 00097E50 40 82 FF E8 */ bne lbl_8009BFF8
2022-10-16 16:31:36 +00:00
/* 8009C014 00097E54 3C 60 80 41 */ lis r3, rfc_crctable@ha
2022-10-16 16:05:58 +00:00
/* 8009C018 00097E58 7C E0 2A 78 */ xor r0, r7, r5
2022-10-16 16:31:36 +00:00
/* 8009C01C 00097E5C 38 63 81 50 */ addi r3, r3, rfc_crctable@l
2022-10-16 16:05:58 +00:00
/* 8009C020 00097E60 7C 63 00 AE */ lbzx r3, r3, r0
/* 8009C024 00097E64 38 03 FF 31 */ addi r0, r3, -0xcf
/* 8009C028 00097E68 7C 00 00 34 */ cntlzw r0, r0
/* 8009C02C 00097E6C 54 03 DE 3E */ extrwi r3, r0, 8, 19
/* 8009C030 00097E70 4E 80 00 20 */ blr
2022-10-16 16:31:36 +00:00
.global rfc_alloc_multiplexer_channel
rfc_alloc_multiplexer_channel:
2022-10-16 16:05:58 +00:00
/* 8009C034 00097E74 94 21 FF E0 */ stwu r1, -0x20(r1)
/* 8009C038 00097E78 7C 08 02 A6 */ mflr r0
/* 8009C03C 00097E7C 90 01 00 24 */ stw r0, 0x24(r1)
/* 8009C040 00097E80 39 61 00 20 */ addi r11, r1, 0x20
/* 8009C044 00097E84 4B F6 B2 F9 */ bl lbl_8000733C
2022-10-16 16:31:36 +00:00
/* 8009C048 00097E88 3C A0 80 50 */ lis r5, rfc_cb@ha
2022-10-16 16:05:58 +00:00
/* 8009C04C 00097E8C 7C 7B 1B 78 */ mr r27, r3
2022-10-16 16:31:36 +00:00
/* 8009C050 00097E90 3B E5 98 08 */ addi r31, r5, rfc_cb@l
2022-10-16 16:05:58 +00:00
/* 8009C054 00097E94 7C 9C 23 78 */ mr r28, r4
/* 8009C058 00097E98 88 1F 04 08 */ lbz r0, 0x408(r31)
/* 8009C05C 00097E9C 38 7F 03 FE */ addi r3, r31, 0x3fe
/* 8009C060 00097EA0 3B C0 00 00 */ li r30, 0x0
/* 8009C064 00097EA4 2C 00 00 00 */ cmpwi r0, 0x0
/* 8009C068 00097EA8 41 82 00 5C */ beq lbl_8009C0C4
/* 8009C06C 00097EAC 7F 64 DB 78 */ mr r4, r27
/* 8009C070 00097EB0 38 A0 00 06 */ li r5, 0x6
2022-10-16 16:31:36 +00:00
/* 8009C074 00097EB4 4B F6 ED FD */ bl memcmp
2022-10-16 16:05:58 +00:00
/* 8009C078 00097EB8 2C 03 00 00 */ cmpwi r3, 0x0
/* 8009C07C 00097EBC 40 82 00 48 */ bne lbl_8009C0C4
/* 8009C080 00097EC0 88 1F 04 14 */ lbz r0, 0x414(r31)
/* 8009C084 00097EC4 28 00 00 04 */ cmplwi r0, 0x4
/* 8009C088 00097EC8 41 80 00 18 */ blt lbl_8009C0A0
/* 8009C08C 00097ECC 3C 60 00 09 */ lis r3, 0x9
2022-10-16 16:31:36 +00:00
/* 8009C090 00097ED0 3C 80 80 44 */ lis r4, "@688"@ha
2022-10-16 16:05:58 +00:00
/* 8009C094 00097ED4 38 63 00 03 */ addi r3, r3, 0x3
2022-10-16 16:31:36 +00:00
/* 8009C098 00097ED8 38 84 F8 C0 */ addi r4, r4, "@688"@l
/* 8009C09C 00097EDC 4B FD B8 C5 */ bl LogMsg_0
2022-10-16 16:05:58 +00:00
.global lbl_8009C0A0
lbl_8009C0A0:
/* 8009C0A0 00097EE0 1C 1E 00 78 */ mulli r0, r30, 0x78
2022-10-16 16:31:36 +00:00
/* 8009C0A4 00097EE4 3C 60 80 50 */ lis r3, rfc_cb@ha
/* 8009C0A8 00097EE8 38 63 98 08 */ addi r3, r3, rfc_cb@l
2022-10-16 16:05:58 +00:00
/* 8009C0AC 00097EEC 7C 63 02 14 */ add r3, r3, r0
/* 8009C0B0 00097EF0 3B E3 03 9C */ addi r31, r3, 0x39c
/* 8009C0B4 00097EF4 7F E3 FB 78 */ mr r3, r31
2022-10-16 16:31:36 +00:00
/* 8009C0B8 00097EF8 4B FD BE 69 */ bl btu_stop_timer
2022-10-16 16:05:58 +00:00
/* 8009C0BC 00097EFC 7F E3 FB 78 */ mr r3, r31
/* 8009C0C0 00097F00 48 00 00 B4 */ b lbl_8009C174
.global lbl_8009C0C4
lbl_8009C0C4:
2022-10-16 16:31:36 +00:00
/* 8009C0C4 00097F04 3F E0 80 50 */ lis r31, rfc_cb@ha
/* 8009C0C8 00097F08 3B FF 98 08 */ addi r31, r31, rfc_cb@l
2022-10-16 16:05:58 +00:00
/* 8009C0CC 00097F0C 88 7F 00 65 */ lbz r3, 0x65(r31)
/* 8009C0D0 00097F10 3B C3 00 01 */ addi r30, r3, 0x1
/* 8009C0D4 00097F14 2C 1E 00 01 */ cmpwi r30, 0x1
/* 8009C0D8 00097F18 41 80 00 08 */ blt lbl_8009C0E0
/* 8009C0DC 00097F1C 3B C0 00 00 */ li r30, 0x0
.global lbl_8009C0E0
lbl_8009C0E0:
/* 8009C0E0 00097F20 1C 1E 00 78 */ mulli r0, r30, 0x78
/* 8009C0E4 00097F24 7C 7F 02 14 */ add r3, r31, r0
/* 8009C0E8 00097F28 88 03 04 08 */ lbz r0, 0x408(r3)
/* 8009C0EC 00097F2C 3B A3 03 9C */ addi r29, r3, 0x39c
/* 8009C0F0 00097F30 2C 00 00 00 */ cmpwi r0, 0x0
/* 8009C0F4 00097F34 40 82 00 7C */ bne lbl_8009C170
/* 8009C0F8 00097F38 7F A3 EB 78 */ mr r3, r29
/* 8009C0FC 00097F3C 38 80 00 00 */ li r4, 0x0
/* 8009C100 00097F40 38 A0 00 78 */ li r5, 0x78
2022-10-16 16:31:36 +00:00
/* 8009C104 00097F44 4B F6 82 4D */ bl memset
2022-10-16 16:05:58 +00:00
/* 8009C108 00097F48 7F 64 DB 78 */ mr r4, r27
/* 8009C10C 00097F4C 38 7D 00 62 */ addi r3, r29, 0x62
/* 8009C110 00097F50 38 A0 00 06 */ li r5, 0x6
2022-10-16 16:31:36 +00:00
/* 8009C114 00097F54 4B F6 7E ED */ bl memcpy
2022-10-16 16:05:58 +00:00
/* 8009C118 00097F58 38 7D 00 18 */ addi r3, r29, 0x18
2022-10-16 16:31:36 +00:00
/* 8009C11C 00097F5C 4B FD 8B 45 */ bl GKI_init_q
2022-10-16 16:05:58 +00:00
/* 8009C120 00097F60 9B 9D 00 6D */ stb r28, 0x6d(r29)
/* 8009C124 00097F64 88 1F 04 14 */ lbz r0, 0x414(r31)
/* 8009C128 00097F68 28 00 00 04 */ cmplwi r0, 0x4
/* 8009C12C 00097F6C 41 80 00 1C */ blt lbl_8009C148
/* 8009C130 00097F70 3C 60 00 09 */ lis r3, 0x9
2022-10-16 16:31:36 +00:00
/* 8009C134 00097F74 3C 80 80 44 */ lis r4, "@689"@ha
2022-10-16 16:05:58 +00:00
/* 8009C138 00097F78 38 63 00 03 */ addi r3, r3, 0x3
/* 8009C13C 00097F7C 38 A0 00 3C */ li r5, 0x3c
2022-10-16 16:31:36 +00:00
/* 8009C140 00097F80 38 84 F8 D0 */ addi r4, r4, "@689"@l
/* 8009C144 00097F84 4B FD B8 1D */ bl LogMsg_0
2022-10-16 16:05:58 +00:00
.global lbl_8009C148
lbl_8009C148:
/* 8009C148 00097F88 93 BD 00 10 */ stw r29, 0x10(r29)
/* 8009C14C 00097F8C 7F A3 EB 78 */ mr r3, r29
/* 8009C150 00097F90 38 80 00 0B */ li r4, 0xb
/* 8009C154 00097F94 38 A0 00 3C */ li r5, 0x3c
2022-10-16 16:31:36 +00:00
/* 8009C158 00097F98 4B FD BD 59 */ bl btu_start_timer
/* 8009C15C 00097F9C 3C 80 80 50 */ lis r4, rfc_cb@ha
2022-10-16 16:05:58 +00:00
/* 8009C160 00097FA0 7F A3 EB 78 */ mr r3, r29
2022-10-16 16:31:36 +00:00
/* 8009C164 00097FA4 38 84 98 08 */ addi r4, r4, rfc_cb@l
2022-10-16 16:05:58 +00:00
/* 8009C168 00097FA8 9B C4 00 65 */ stb r30, 0x65(r4)
/* 8009C16C 00097FAC 48 00 00 08 */ b lbl_8009C174
.global lbl_8009C170
lbl_8009C170:
/* 8009C170 00097FB0 38 60 00 00 */ li r3, 0x0
.global lbl_8009C174
lbl_8009C174:
/* 8009C174 00097FB4 39 61 00 20 */ addi r11, r1, 0x20
/* 8009C178 00097FB8 4B F6 B2 11 */ bl lbl_80007388
/* 8009C17C 00097FBC 80 01 00 24 */ lwz r0, 0x24(r1)
/* 8009C180 00097FC0 7C 08 03 A6 */ mtlr r0
/* 8009C184 00097FC4 38 21 00 20 */ addi r1, r1, 0x20
/* 8009C188 00097FC8 4E 80 00 20 */ blr
2022-10-16 16:31:36 +00:00
.global rfc_release_multiplexer_channel
rfc_release_multiplexer_channel:
2022-10-16 16:05:58 +00:00
/* 8009C18C 00097FCC 94 21 FF F0 */ stwu r1, -0x10(r1)
/* 8009C190 00097FD0 7C 08 02 A6 */ mflr r0
2022-10-16 16:31:36 +00:00
/* 8009C194 00097FD4 3C 80 80 50 */ lis r4, rfc_cb@ha
2022-10-16 16:05:58 +00:00
/* 8009C198 00097FD8 90 01 00 14 */ stw r0, 0x14(r1)
2022-10-16 16:31:36 +00:00
/* 8009C19C 00097FDC 38 84 98 08 */ addi r4, r4, rfc_cb@l
2022-10-16 16:05:58 +00:00
/* 8009C1A0 00097FE0 93 E1 00 0C */ stw r31, 0xc(r1)
/* 8009C1A4 00097FE4 7C 7F 1B 78 */ mr r31, r3
/* 8009C1A8 00097FE8 88 04 04 14 */ lbz r0, 0x414(r4)
/* 8009C1AC 00097FEC 28 00 00 04 */ cmplwi r0, 0x4
/* 8009C1B0 00097FF0 41 80 00 18 */ blt lbl_8009C1C8
/* 8009C1B4 00097FF4 3C 60 00 09 */ lis r3, 0x9
2022-10-16 16:31:36 +00:00
/* 8009C1B8 00097FF8 3C 80 80 44 */ lis r4, "@688"@ha
2022-10-16 16:05:58 +00:00
/* 8009C1BC 00097FFC 38 63 00 03 */ addi r3, r3, 0x3
2022-10-16 16:31:36 +00:00
/* 8009C1C0 00098000 38 84 F8 C0 */ addi r4, r4, "@688"@l
/* 8009C1C4 00098004 4B FD B7 9D */ bl LogMsg_0
2022-10-16 16:05:58 +00:00
.global lbl_8009C1C8
lbl_8009C1C8:
/* 8009C1C8 00098008 7F E3 FB 78 */ mr r3, r31
2022-10-16 16:31:36 +00:00
/* 8009C1CC 0009800C 4B FD BD 55 */ bl btu_stop_timer
2022-10-16 16:05:58 +00:00
/* 8009C1D0 00098010 48 00 00 08 */ b lbl_8009C1D8
.global lbl_8009C1D4
lbl_8009C1D4:
2022-10-16 16:31:36 +00:00
/* 8009C1D4 00098014 4B FD 8D 3D */ bl GKI_freebuf
2022-10-16 16:05:58 +00:00
.global lbl_8009C1D8
lbl_8009C1D8:
/* 8009C1D8 00098018 38 7F 00 18 */ addi r3, r31, 0x18
2022-10-16 16:31:36 +00:00
/* 8009C1DC 0009801C 4B FD 93 E5 */ bl GKI_dequeue
2022-10-16 16:05:58 +00:00
/* 8009C1E0 00098020 2C 03 00 00 */ cmpwi r3, 0x0
/* 8009C1E4 00098024 40 82 FF F0 */ bne lbl_8009C1D4
/* 8009C1E8 00098028 7F E3 FB 78 */ mr r3, r31
/* 8009C1EC 0009802C 38 80 00 00 */ li r4, 0x0
/* 8009C1F0 00098030 38 A0 00 78 */ li r5, 0x78
2022-10-16 16:31:36 +00:00
/* 8009C1F4 00098034 4B F6 81 5D */ bl memset
2022-10-16 16:05:58 +00:00
/* 8009C1F8 00098038 38 00 00 00 */ li r0, 0x0
/* 8009C1FC 0009803C 98 1F 00 6C */ stb r0, 0x6c(r31)
/* 8009C200 00098040 83 E1 00 0C */ lwz r31, 0xc(r1)
/* 8009C204 00098044 80 01 00 14 */ lwz r0, 0x14(r1)
/* 8009C208 00098048 7C 08 03 A6 */ mtlr r0
/* 8009C20C 0009804C 38 21 00 10 */ addi r1, r1, 0x10
/* 8009C210 00098050 4E 80 00 20 */ blr
2022-10-16 16:31:36 +00:00
.global rfc_timer_start
rfc_timer_start:
2022-10-16 16:05:58 +00:00
/* 8009C214 00098054 94 21 FF F0 */ stwu r1, -0x10(r1)
/* 8009C218 00098058 7C 08 02 A6 */ mflr r0
2022-10-16 16:31:36 +00:00
/* 8009C21C 0009805C 3C A0 80 50 */ lis r5, rfc_cb@ha
2022-10-16 16:05:58 +00:00
/* 8009C220 00098060 90 01 00 14 */ stw r0, 0x14(r1)
2022-10-16 16:31:36 +00:00
/* 8009C224 00098064 38 A5 98 08 */ addi r5, r5, rfc_cb@l
2022-10-16 16:05:58 +00:00
/* 8009C228 00098068 93 E1 00 0C */ stw r31, 0xc(r1)
/* 8009C22C 0009806C 7C 9F 23 78 */ mr r31, r4
/* 8009C230 00098070 93 C1 00 08 */ stw r30, 0x8(r1)
/* 8009C234 00098074 7C 7E 1B 78 */ mr r30, r3
/* 8009C238 00098078 88 05 04 14 */ lbz r0, 0x414(r5)
/* 8009C23C 0009807C 28 00 00 04 */ cmplwi r0, 0x4
/* 8009C240 00098080 41 80 00 1C */ blt lbl_8009C25C
/* 8009C244 00098084 3C 60 00 09 */ lis r3, 0x9
2022-10-16 16:31:36 +00:00
/* 8009C248 00098088 3C 80 80 44 */ lis r4, "@689"@ha
2022-10-16 16:05:58 +00:00
/* 8009C24C 0009808C 7F E5 FB 78 */ mr r5, r31
/* 8009C250 00098090 38 63 00 03 */ addi r3, r3, 0x3
2022-10-16 16:31:36 +00:00
/* 8009C254 00098094 38 84 F8 D0 */ addi r4, r4, "@689"@l
/* 8009C258 00098098 4B FD B7 09 */ bl LogMsg_0
2022-10-16 16:05:58 +00:00
.global lbl_8009C25C
lbl_8009C25C:
/* 8009C25C 0009809C 93 DE 00 10 */ stw r30, 0x10(r30)
/* 8009C260 000980A0 7F C3 F3 78 */ mr r3, r30
/* 8009C264 000980A4 7F E5 FB 78 */ mr r5, r31
/* 8009C268 000980A8 38 80 00 0B */ li r4, 0xb
2022-10-16 16:31:36 +00:00
/* 8009C26C 000980AC 4B FD BC 45 */ bl btu_start_timer
2022-10-16 16:05:58 +00:00
/* 8009C270 000980B0 80 01 00 14 */ lwz r0, 0x14(r1)
/* 8009C274 000980B4 83 E1 00 0C */ lwz r31, 0xc(r1)
/* 8009C278 000980B8 83 C1 00 08 */ lwz r30, 0x8(r1)
/* 8009C27C 000980BC 7C 08 03 A6 */ mtlr r0
/* 8009C280 000980C0 38 21 00 10 */ addi r1, r1, 0x10
/* 8009C284 000980C4 4E 80 00 20 */ blr
2022-10-16 16:31:36 +00:00
.global rfc_timer_stop
rfc_timer_stop:
2022-10-16 16:05:58 +00:00
/* 8009C288 000980C8 94 21 FF F0 */ stwu r1, -0x10(r1)
/* 8009C28C 000980CC 7C 08 02 A6 */ mflr r0
2022-10-16 16:31:36 +00:00
/* 8009C290 000980D0 3C 80 80 50 */ lis r4, rfc_cb@ha
2022-10-16 16:05:58 +00:00
/* 8009C294 000980D4 90 01 00 14 */ stw r0, 0x14(r1)
2022-10-16 16:31:36 +00:00
/* 8009C298 000980D8 38 84 98 08 */ addi r4, r4, rfc_cb@l
2022-10-16 16:05:58 +00:00
/* 8009C29C 000980DC 93 E1 00 0C */ stw r31, 0xc(r1)
/* 8009C2A0 000980E0 7C 7F 1B 78 */ mr r31, r3
/* 8009C2A4 000980E4 88 04 04 14 */ lbz r0, 0x414(r4)
/* 8009C2A8 000980E8 28 00 00 04 */ cmplwi r0, 0x4
/* 8009C2AC 000980EC 41 80 00 18 */ blt lbl_8009C2C4
/* 8009C2B0 000980F0 3C 60 00 09 */ lis r3, 0x9
2022-10-16 16:31:36 +00:00
/* 8009C2B4 000980F4 3C 80 80 44 */ lis r4, "@688"@ha
2022-10-16 16:05:58 +00:00
/* 8009C2B8 000980F8 38 63 00 03 */ addi r3, r3, 0x3
2022-10-16 16:31:36 +00:00
/* 8009C2BC 000980FC 38 84 F8 C0 */ addi r4, r4, "@688"@l
/* 8009C2C0 00098100 4B FD B6 A1 */ bl LogMsg_0
2022-10-16 16:05:58 +00:00
.global lbl_8009C2C4
lbl_8009C2C4:
/* 8009C2C4 00098104 7F E3 FB 78 */ mr r3, r31
2022-10-16 16:31:36 +00:00
/* 8009C2C8 00098108 4B FD BC 59 */ bl btu_stop_timer
2022-10-16 16:05:58 +00:00
/* 8009C2CC 0009810C 80 01 00 14 */ lwz r0, 0x14(r1)
/* 8009C2D0 00098110 83 E1 00 0C */ lwz r31, 0xc(r1)
/* 8009C2D4 00098114 7C 08 03 A6 */ mtlr r0
/* 8009C2D8 00098118 38 21 00 10 */ addi r1, r1, 0x10
/* 8009C2DC 0009811C 4E 80 00 20 */ blr
2022-10-16 16:31:36 +00:00
.global rfc_port_timer_start
rfc_port_timer_start:
2022-10-16 16:05:58 +00:00
/* 8009C2E0 00098120 94 21 FF E0 */ stwu r1, -0x20(r1)
/* 8009C2E4 00098124 7C 08 02 A6 */ mflr r0
2022-10-16 16:31:36 +00:00
/* 8009C2E8 00098128 3C A0 80 50 */ lis r5, rfc_cb@ha
2022-10-16 16:05:58 +00:00
/* 8009C2EC 0009812C 90 01 00 24 */ stw r0, 0x24(r1)
2022-10-16 16:31:36 +00:00
/* 8009C2F0 00098130 38 A5 98 08 */ addi r5, r5, rfc_cb@l
2022-10-16 16:05:58 +00:00
/* 8009C2F4 00098134 93 E1 00 1C */ stw r31, 0x1c(r1)
/* 8009C2F8 00098138 3B E3 00 70 */ addi r31, r3, 0x70
/* 8009C2FC 0009813C 93 C1 00 18 */ stw r30, 0x18(r1)
/* 8009C300 00098140 7C 9E 23 78 */ mr r30, r4
/* 8009C304 00098144 93 A1 00 14 */ stw r29, 0x14(r1)
/* 8009C308 00098148 7C 7D 1B 78 */ mr r29, r3
/* 8009C30C 0009814C 88 05 04 14 */ lbz r0, 0x414(r5)
/* 8009C310 00098150 28 00 00 04 */ cmplwi r0, 0x4
/* 8009C314 00098154 41 80 00 1C */ blt lbl_8009C330
/* 8009C318 00098158 3C 60 00 09 */ lis r3, 0x9
2022-10-16 16:31:36 +00:00
/* 8009C31C 0009815C 3C 80 80 44 */ lis r4, "@704_8043F8F0"@ha
2022-10-16 16:05:58 +00:00
/* 8009C320 00098160 7F C5 F3 78 */ mr r5, r30
/* 8009C324 00098164 38 63 00 03 */ addi r3, r3, 0x3
2022-10-16 16:31:36 +00:00
/* 8009C328 00098168 38 84 F8 F0 */ addi r4, r4, "@704_8043F8F0"@l
/* 8009C32C 0009816C 4B FD B6 35 */ bl LogMsg_0
2022-10-16 16:05:58 +00:00
.global lbl_8009C330
lbl_8009C330:
/* 8009C330 00098170 93 BF 00 10 */ stw r29, 0x10(r31)
/* 8009C334 00098174 7F E3 FB 78 */ mr r3, r31
/* 8009C338 00098178 7F C5 F3 78 */ mr r5, r30
/* 8009C33C 0009817C 38 80 00 0C */ li r4, 0xc
2022-10-16 16:31:36 +00:00
/* 8009C340 00098180 4B FD BB 71 */ bl btu_start_timer
2022-10-16 16:05:58 +00:00
/* 8009C344 00098184 80 01 00 24 */ lwz r0, 0x24(r1)
/* 8009C348 00098188 83 E1 00 1C */ lwz r31, 0x1c(r1)
/* 8009C34C 0009818C 83 C1 00 18 */ lwz r30, 0x18(r1)
/* 8009C350 00098190 83 A1 00 14 */ lwz r29, 0x14(r1)
/* 8009C354 00098194 7C 08 03 A6 */ mtlr r0
/* 8009C358 00098198 38 21 00 20 */ addi r1, r1, 0x20
/* 8009C35C 0009819C 4E 80 00 20 */ blr
2022-10-16 16:31:36 +00:00
.global rfc_port_timer_stop
rfc_port_timer_stop:
2022-10-16 16:05:58 +00:00
/* 8009C360 000981A0 94 21 FF F0 */ stwu r1, -0x10(r1)
/* 8009C364 000981A4 7C 08 02 A6 */ mflr r0
2022-10-16 16:31:36 +00:00
/* 8009C368 000981A8 3C 80 80 50 */ lis r4, rfc_cb@ha
2022-10-16 16:05:58 +00:00
/* 8009C36C 000981AC 90 01 00 14 */ stw r0, 0x14(r1)
2022-10-16 16:31:36 +00:00
/* 8009C370 000981B0 38 84 98 08 */ addi r4, r4, rfc_cb@l
2022-10-16 16:05:58 +00:00
/* 8009C374 000981B4 93 E1 00 0C */ stw r31, 0xc(r1)
/* 8009C378 000981B8 7C 7F 1B 78 */ mr r31, r3
/* 8009C37C 000981BC 88 04 04 14 */ lbz r0, 0x414(r4)
/* 8009C380 000981C0 28 00 00 04 */ cmplwi r0, 0x4
/* 8009C384 000981C4 41 80 00 18 */ blt lbl_8009C39C
/* 8009C388 000981C8 3C 60 00 09 */ lis r3, 0x9
2022-10-16 16:31:36 +00:00
/* 8009C38C 000981CC 3C 80 80 44 */ lis r4, "@708_8043F914"@ha
2022-10-16 16:05:58 +00:00
/* 8009C390 000981D0 38 63 00 03 */ addi r3, r3, 0x3
2022-10-16 16:31:36 +00:00
/* 8009C394 000981D4 38 84 F9 14 */ addi r4, r4, "@708_8043F914"@l
/* 8009C398 000981D8 4B FD B5 C9 */ bl LogMsg_0
2022-10-16 16:05:58 +00:00
.global lbl_8009C39C
lbl_8009C39C:
/* 8009C39C 000981DC 38 7F 00 70 */ addi r3, r31, 0x70
2022-10-16 16:31:36 +00:00
/* 8009C3A0 000981E0 4B FD BB 81 */ bl btu_stop_timer
2022-10-16 16:05:58 +00:00
/* 8009C3A4 000981E4 80 01 00 14 */ lwz r0, 0x14(r1)
/* 8009C3A8 000981E8 83 E1 00 0C */ lwz r31, 0xc(r1)
/* 8009C3AC 000981EC 7C 08 03 A6 */ mtlr r0
/* 8009C3B0 000981F0 38 21 00 10 */ addi r1, r1, 0x10
/* 8009C3B4 000981F4 4E 80 00 20 */ blr
2022-10-16 16:31:36 +00:00
.global rfc_check_mcb_active
rfc_check_mcb_active:
2022-10-16 16:05:58 +00:00
/* 8009C3B8 000981F8 94 21 FF F0 */ stwu r1, -0x10(r1)
/* 8009C3BC 000981FC 7C 08 02 A6 */ mflr r0
/* 8009C3C0 00098200 38 A0 00 00 */ li r5, 0x0
/* 8009C3C4 00098204 90 01 00 14 */ stw r0, 0x14(r1)
/* 8009C3C8 00098208 38 00 00 3D */ li r0, 0x3d
/* 8009C3CC 0009820C 93 E1 00 0C */ stw r31, 0xc(r1)
/* 8009C3D0 00098210 7C 7F 1B 78 */ mr r31, r3
/* 8009C3D4 00098214 7C 09 03 A6 */ mtctr r0
.global lbl_8009C3D8
lbl_8009C3D8:
/* 8009C3D8 00098218 54 A0 04 3E */ clrlwi r0, r5, 16
/* 8009C3DC 0009821C 7C 83 02 14 */ add r4, r3, r0
/* 8009C3E0 00098220 88 04 00 24 */ lbz r0, 0x24(r4)
/* 8009C3E4 00098224 2C 00 00 00 */ cmpwi r0, 0x0
/* 8009C3E8 00098228 41 82 00 10 */ beq lbl_8009C3F8
/* 8009C3EC 0009822C 38 00 00 00 */ li r0, 0x0
/* 8009C3F0 00098230 98 03 00 74 */ stb r0, 0x74(r3)
/* 8009C3F4 00098234 48 00 00 74 */ b lbl_8009C468
.global lbl_8009C3F8
lbl_8009C3F8:
/* 8009C3F8 00098238 38 A5 00 01 */ addi r5, r5, 0x1
/* 8009C3FC 0009823C 42 00 FF DC */ bdnz lbl_8009C3D8
/* 8009C400 00098240 88 03 00 74 */ lbz r0, 0x74(r3)
/* 8009C404 00098244 2C 00 00 00 */ cmpwi r0, 0x0
/* 8009C408 00098248 41 82 00 20 */ beq lbl_8009C428
/* 8009C40C 0009824C 38 00 00 00 */ li r0, 0x0
/* 8009C410 00098250 38 80 00 08 */ li r4, 0x8
/* 8009C414 00098254 98 03 00 74 */ stb r0, 0x74(r3)
/* 8009C418 00098258 7F E3 FB 78 */ mr r3, r31
/* 8009C41C 0009825C 38 A0 00 00 */ li r5, 0x0
2022-10-16 16:31:36 +00:00
/* 8009C420 00098260 4B FF C2 3D */ bl rfc_mx_sm_execute
2022-10-16 16:05:58 +00:00
/* 8009C424 00098264 48 00 00 44 */ b lbl_8009C468
.global lbl_8009C428
lbl_8009C428:
2022-10-16 16:31:36 +00:00
/* 8009C428 00098268 3C 60 80 50 */ lis r3, rfc_cb@ha
/* 8009C42C 0009826C 38 63 98 08 */ addi r3, r3, rfc_cb@l
2022-10-16 16:05:58 +00:00
/* 8009C430 00098270 88 03 04 14 */ lbz r0, 0x414(r3)
/* 8009C434 00098274 28 00 00 04 */ cmplwi r0, 0x4
/* 8009C438 00098278 41 80 00 1C */ blt lbl_8009C454
/* 8009C43C 0009827C 3C 60 00 09 */ lis r3, 0x9
2022-10-16 16:31:36 +00:00
/* 8009C440 00098280 3C 80 80 44 */ lis r4, "@689"@ha
2022-10-16 16:05:58 +00:00
/* 8009C444 00098284 38 63 00 03 */ addi r3, r3, 0x3
/* 8009C448 00098288 38 A0 00 02 */ li r5, 0x2
2022-10-16 16:31:36 +00:00
/* 8009C44C 0009828C 38 84 F8 D0 */ addi r4, r4, "@689"@l
/* 8009C450 00098290 4B FD B5 11 */ bl LogMsg_0
2022-10-16 16:05:58 +00:00
.global lbl_8009C454
lbl_8009C454:
/* 8009C454 00098294 93 FF 00 10 */ stw r31, 0x10(r31)
/* 8009C458 00098298 7F E3 FB 78 */ mr r3, r31
/* 8009C45C 0009829C 38 80 00 0B */ li r4, 0xb
/* 8009C460 000982A0 38 A0 00 02 */ li r5, 0x2
2022-10-16 16:31:36 +00:00
/* 8009C464 000982A4 4B FD BA 4D */ bl btu_start_timer
2022-10-16 16:05:58 +00:00
.global lbl_8009C468
lbl_8009C468:
/* 8009C468 000982A8 80 01 00 14 */ lwz r0, 0x14(r1)
/* 8009C46C 000982AC 83 E1 00 0C */ lwz r31, 0xc(r1)
/* 8009C470 000982B0 7C 08 03 A6 */ mtlr r0
/* 8009C474 000982B4 38 21 00 10 */ addi r1, r1, 0x10
/* 8009C478 000982B8 4E 80 00 20 */ blr
2022-10-16 16:31:36 +00:00
.global rfcomm_process_timeout
rfcomm_process_timeout:
2022-10-16 16:05:58 +00:00
/* 8009C47C 000982BC A0 03 00 14 */ lhz r0, 0x14(r3)
/* 8009C480 000982C0 2C 00 00 0C */ cmpwi r0, 0xc
/* 8009C484 000982C4 41 82 00 20 */ beq lbl_8009C4A4
/* 8009C488 000982C8 4C 80 00 20 */ bgelr
/* 8009C48C 000982CC 2C 00 00 0B */ cmpwi r0, 0xb
/* 8009C490 000982D0 4D 80 00 20 */ bltlr
/* 8009C494 000982D4 80 63 00 10 */ lwz r3, 0x10(r3)
/* 8009C498 000982D8 38 80 00 05 */ li r4, 0x5
/* 8009C49C 000982DC 38 A0 00 00 */ li r5, 0x0
2022-10-16 16:31:36 +00:00
/* 8009C4A0 000982E0 4B FF C1 BC */ b rfc_mx_sm_execute
2022-10-16 16:05:58 +00:00
.global lbl_8009C4A4
lbl_8009C4A4:
/* 8009C4A4 000982E4 80 63 00 10 */ lwz r3, 0x10(r3)
/* 8009C4A8 000982E8 38 80 00 05 */ li r4, 0x5
/* 8009C4AC 000982EC 38 A0 00 00 */ li r5, 0x0
2022-10-16 16:31:36 +00:00
/* 8009C4B0 000982F0 4B FF CD F0 */ b rfc_port_sm_execute
2022-10-16 16:05:58 +00:00
/* 8009C4B4 000982F4 4E 80 00 20 */ blr
2022-10-16 16:31:36 +00:00
.global rfc_sec_check_complete
rfc_sec_check_complete:
2022-10-16 16:05:58 +00:00
/* 8009C4B8 000982F8 94 21 FF F0 */ stwu r1, -0x10(r1)
/* 8009C4BC 000982FC 7C 08 02 A6 */ mflr r0
/* 8009C4C0 00098300 90 01 00 14 */ stw r0, 0x14(r1)
/* 8009C4C4 00098304 98 A1 00 08 */ stb r5, 0x8(r1)
/* 8009C4C8 00098308 88 04 00 01 */ lbz r0, 0x1(r4)
/* 8009C4CC 0009830C 2C 00 00 00 */ cmpwi r0, 0x0
/* 8009C4D0 00098310 41 82 00 2C */ beq lbl_8009C4FC
/* 8009C4D4 00098314 88 04 00 68 */ lbz r0, 0x68(r4)
/* 8009C4D8 00098318 28 00 00 02 */ cmplwi r0, 0x2
/* 8009C4DC 0009831C 41 82 00 10 */ beq lbl_8009C4EC
/* 8009C4E0 00098320 28 00 00 03 */ cmplwi r0, 0x3
/* 8009C4E4 00098324 41 82 00 08 */ beq lbl_8009C4EC
/* 8009C4E8 00098328 48 00 00 14 */ b lbl_8009C4FC
.global lbl_8009C4EC
lbl_8009C4EC:
/* 8009C4EC 0009832C 7C 83 23 78 */ mr r3, r4
/* 8009C4F0 00098330 38 A1 00 08 */ addi r5, r1, 0x8
/* 8009C4F4 00098334 38 80 00 0F */ li r4, 0xf
2022-10-16 16:31:36 +00:00
/* 8009C4F8 00098338 4B FF CD A9 */ bl rfc_port_sm_execute
2022-10-16 16:05:58 +00:00
.global lbl_8009C4FC
lbl_8009C4FC:
/* 8009C4FC 0009833C 80 01 00 14 */ lwz r0, 0x14(r1)
/* 8009C500 00098340 7C 08 03 A6 */ mtlr r0
/* 8009C504 00098344 38 21 00 10 */ addi r1, r1, 0x10
/* 8009C508 00098348 4E 80 00 20 */ blr
2022-10-16 16:31:36 +00:00
.global rfc_port_closed
rfc_port_closed:
2022-10-16 16:05:58 +00:00
/* 8009C50C 0009834C 94 21 FF E0 */ stwu r1, -0x20(r1)
/* 8009C510 00098350 7C 08 02 A6 */ mflr r0
2022-10-16 16:31:36 +00:00
/* 8009C514 00098354 3C 80 80 50 */ lis r4, rfc_cb@ha
2022-10-16 16:05:58 +00:00
/* 8009C518 00098358 90 01 00 24 */ stw r0, 0x24(r1)
2022-10-16 16:31:36 +00:00
/* 8009C51C 0009835C 38 84 98 08 */ addi r4, r4, rfc_cb@l
2022-10-16 16:05:58 +00:00
/* 8009C520 00098360 93 E1 00 1C */ stw r31, 0x1c(r1)
2022-10-16 16:31:36 +00:00
/* 8009C524 00098364 3F E0 80 44 */ lis r31, "@688"@ha
/* 8009C528 00098368 3B FF F8 C0 */ addi r31, r31, "@688"@l
2022-10-16 16:05:58 +00:00
/* 8009C52C 0009836C 93 C1 00 18 */ stw r30, 0x18(r1)
/* 8009C530 00098370 93 A1 00 14 */ stw r29, 0x14(r1)
/* 8009C534 00098374 7C 7D 1B 78 */ mr r29, r3
/* 8009C538 00098378 88 04 04 14 */ lbz r0, 0x414(r4)
/* 8009C53C 0009837C 83 C3 00 6C */ lwz r30, 0x6c(r3)
/* 8009C540 00098380 28 00 00 05 */ cmplwi r0, 0x5
/* 8009C544 00098384 41 80 00 14 */ blt lbl_8009C558
/* 8009C548 00098388 3C 60 00 09 */ lis r3, 0x9
/* 8009C54C 0009838C 38 9F 00 68 */ addi r4, r31, 0x68
/* 8009C550 00098390 38 63 00 04 */ addi r3, r3, 0x4
2022-10-16 16:31:36 +00:00
/* 8009C554 00098394 4B FD B4 0D */ bl LogMsg_0
2022-10-16 16:05:58 +00:00
.global lbl_8009C558
lbl_8009C558:
2022-10-16 16:31:36 +00:00
/* 8009C558 00098398 3C 60 80 50 */ lis r3, rfc_cb@ha
/* 8009C55C 0009839C 38 63 98 08 */ addi r3, r3, rfc_cb@l
2022-10-16 16:05:58 +00:00
/* 8009C560 000983A0 88 03 04 14 */ lbz r0, 0x414(r3)
/* 8009C564 000983A4 28 00 00 04 */ cmplwi r0, 0x4
/* 8009C568 000983A8 41 80 00 14 */ blt lbl_8009C57C
/* 8009C56C 000983AC 3C 60 00 09 */ lis r3, 0x9
/* 8009C570 000983B0 38 9F 00 54 */ addi r4, r31, 0x54
/* 8009C574 000983B4 38 63 00 03 */ addi r3, r3, 0x3
2022-10-16 16:31:36 +00:00
/* 8009C578 000983B8 4B FD B3 E9 */ bl LogMsg_0
2022-10-16 16:05:58 +00:00
.global lbl_8009C57C
lbl_8009C57C:
/* 8009C57C 000983BC 38 7D 00 70 */ addi r3, r29, 0x70
2022-10-16 16:31:36 +00:00
/* 8009C580 000983C0 4B FD B9 A1 */ bl btu_stop_timer
2022-10-16 16:05:58 +00:00
/* 8009C584 000983C4 38 80 00 00 */ li r4, 0x0
/* 8009C588 000983C8 2C 1E 00 00 */ cmpwi r30, 0x0
/* 8009C58C 000983CC 98 9D 00 68 */ stb r4, 0x68(r29)
/* 8009C590 000983D0 41 82 00 AC */ beq lbl_8009C63C
/* 8009C594 000983D4 88 7D 00 0D */ lbz r3, 0xd(r29)
/* 8009C598 000983D8 38 00 00 3D */ li r0, 0x3d
/* 8009C59C 000983DC 38 A0 00 00 */ li r5, 0x0
/* 8009C5A0 000983E0 7C 7E 1A 14 */ add r3, r30, r3
/* 8009C5A4 000983E4 98 83 00 24 */ stb r4, 0x24(r3)
/* 8009C5A8 000983E8 98 9D 00 0D */ stb r4, 0xd(r29)
/* 8009C5AC 000983EC 7C 09 03 A6 */ mtctr r0
.global lbl_8009C5B0
lbl_8009C5B0:
/* 8009C5B0 000983F0 54 A0 04 3E */ clrlwi r0, r5, 16
/* 8009C5B4 000983F4 7C 7E 02 14 */ add r3, r30, r0
/* 8009C5B8 000983F8 88 03 00 24 */ lbz r0, 0x24(r3)
/* 8009C5BC 000983FC 2C 00 00 00 */ cmpwi r0, 0x0
/* 8009C5C0 00098400 41 82 00 10 */ beq lbl_8009C5D0
/* 8009C5C4 00098404 38 00 00 00 */ li r0, 0x0
/* 8009C5C8 00098408 98 1E 00 74 */ stb r0, 0x74(r30)
/* 8009C5CC 0009840C 48 00 00 70 */ b lbl_8009C63C
.global lbl_8009C5D0
lbl_8009C5D0:
/* 8009C5D0 00098410 38 A5 00 01 */ addi r5, r5, 0x1
/* 8009C5D4 00098414 42 00 FF DC */ bdnz lbl_8009C5B0
/* 8009C5D8 00098418 88 1E 00 74 */ lbz r0, 0x74(r30)
/* 8009C5DC 0009841C 2C 00 00 00 */ cmpwi r0, 0x0
/* 8009C5E0 00098420 41 82 00 20 */ beq lbl_8009C600
/* 8009C5E4 00098424 38 00 00 00 */ li r0, 0x0
/* 8009C5E8 00098428 7F C3 F3 78 */ mr r3, r30
/* 8009C5EC 0009842C 98 1E 00 74 */ stb r0, 0x74(r30)
/* 8009C5F0 00098430 38 80 00 08 */ li r4, 0x8
/* 8009C5F4 00098434 38 A0 00 00 */ li r5, 0x0
2022-10-16 16:31:36 +00:00
/* 8009C5F8 00098438 4B FF C0 65 */ bl rfc_mx_sm_execute
2022-10-16 16:05:58 +00:00
/* 8009C5FC 0009843C 48 00 00 40 */ b lbl_8009C63C
.global lbl_8009C600
lbl_8009C600:
2022-10-16 16:31:36 +00:00
/* 8009C600 00098440 3C 60 80 50 */ lis r3, rfc_cb@ha
/* 8009C604 00098444 38 63 98 08 */ addi r3, r3, rfc_cb@l
2022-10-16 16:05:58 +00:00
/* 8009C608 00098448 88 03 04 14 */ lbz r0, 0x414(r3)
/* 8009C60C 0009844C 28 00 00 04 */ cmplwi r0, 0x4
/* 8009C610 00098450 41 80 00 18 */ blt lbl_8009C628
/* 8009C614 00098454 3C 60 00 09 */ lis r3, 0x9
/* 8009C618 00098458 38 9F 00 10 */ addi r4, r31, 0x10
/* 8009C61C 0009845C 38 63 00 03 */ addi r3, r3, 0x3
/* 8009C620 00098460 38 A0 00 02 */ li r5, 0x2
2022-10-16 16:31:36 +00:00
/* 8009C624 00098464 4B FD B3 3D */ bl LogMsg_0
2022-10-16 16:05:58 +00:00
.global lbl_8009C628
lbl_8009C628:
/* 8009C628 00098468 93 DE 00 10 */ stw r30, 0x10(r30)
/* 8009C62C 0009846C 7F C3 F3 78 */ mr r3, r30
/* 8009C630 00098470 38 80 00 0B */ li r4, 0xb
/* 8009C634 00098474 38 A0 00 02 */ li r5, 0x2
2022-10-16 16:31:36 +00:00
/* 8009C638 00098478 4B FD B8 79 */ bl btu_start_timer
2022-10-16 16:05:58 +00:00
.global lbl_8009C63C
lbl_8009C63C:
/* 8009C63C 0009847C 7F A3 EB 78 */ mr r3, r29
/* 8009C640 00098480 38 80 00 13 */ li r4, 0x13
2022-10-16 16:31:36 +00:00
/* 8009C644 00098484 4B FF AF 79 */ bl port_rfc_closed
2022-10-16 16:05:58 +00:00
/* 8009C648 00098488 80 01 00 24 */ lwz r0, 0x24(r1)
/* 8009C64C 0009848C 83 E1 00 1C */ lwz r31, 0x1c(r1)
/* 8009C650 00098490 83 C1 00 18 */ lwz r30, 0x18(r1)
/* 8009C654 00098494 83 A1 00 14 */ lwz r29, 0x14(r1)
/* 8009C658 00098498 7C 08 03 A6 */ mtlr r0
/* 8009C65C 0009849C 38 21 00 20 */ addi r1, r1, 0x20
/* 8009C660 000984A0 4E 80 00 20 */ blr
2022-10-16 16:31:36 +00:00
.global rfc_inc_credit
rfc_inc_credit:
2022-10-16 16:05:58 +00:00
/* 8009C664 000984A4 94 21 FF F0 */ stwu r1, -0x10(r1)
/* 8009C668 000984A8 7C 08 02 A6 */ mflr r0
/* 8009C66C 000984AC 90 01 00 14 */ stw r0, 0x14(r1)
/* 8009C670 000984B0 93 E1 00 0C */ stw r31, 0xc(r1)
/* 8009C674 000984B4 7C 7F 1B 78 */ mr r31, r3
/* 8009C678 000984B8 80 A3 00 6C */ lwz r5, 0x6c(r3)
/* 8009C67C 000984BC 88 05 00 72 */ lbz r0, 0x72(r5)
/* 8009C680 000984C0 28 00 00 02 */ cmplwi r0, 0x2
/* 8009C684 000984C4 40 82 00 58 */ bne lbl_8009C6DC
/* 8009C688 000984C8 A0 03 00 98 */ lhz r0, 0x98(r3)
2022-10-16 16:31:36 +00:00
/* 8009C68C 000984CC 3C A0 80 50 */ lis r5, rfc_cb@ha
/* 8009C690 000984D0 38 A5 98 08 */ addi r5, r5, rfc_cb@l
2022-10-16 16:05:58 +00:00
/* 8009C694 000984D4 7C C0 22 14 */ add r6, r0, r4
/* 8009C698 000984D8 B0 C3 00 98 */ sth r6, 0x98(r3)
/* 8009C69C 000984DC 88 05 04 14 */ lbz r0, 0x414(r5)
/* 8009C6A0 000984E0 28 00 00 04 */ cmplwi r0, 0x4
/* 8009C6A4 000984E4 41 80 00 1C */ blt lbl_8009C6C0
/* 8009C6A8 000984E8 3C 60 00 09 */ lis r3, 0x9
2022-10-16 16:31:36 +00:00
/* 8009C6AC 000984EC 3C 80 80 44 */ lis r4, "@745"@ha
2022-10-16 16:05:58 +00:00
/* 8009C6B0 000984F0 38 63 00 03 */ addi r3, r3, 0x3
/* 8009C6B4 000984F4 54 C5 04 3E */ clrlwi r5, r6, 16
2022-10-16 16:31:36 +00:00
/* 8009C6B8 000984F8 38 84 F9 38 */ addi r4, r4, "@745"@l
/* 8009C6BC 000984FC 4B FD B2 A5 */ bl LogMsg_0
2022-10-16 16:05:58 +00:00
.global lbl_8009C6C0
lbl_8009C6C0:
/* 8009C6C0 00098500 88 1F 00 24 */ lbz r0, 0x24(r31)
/* 8009C6C4 00098504 28 00 00 01 */ cmplwi r0, 0x1
/* 8009C6C8 00098508 40 82 00 14 */ bne lbl_8009C6DC
/* 8009C6CC 0009850C 80 7F 00 6C */ lwz r3, 0x6c(r31)
/* 8009C6D0 00098510 38 A0 00 01 */ li r5, 0x1
/* 8009C6D4 00098514 88 9F 00 0D */ lbz r4, 0xd(r31)
2022-10-16 16:31:36 +00:00
/* 8009C6D8 00098518 4B FF AC BD */ bl PORT_FlowInd
2022-10-16 16:05:58 +00:00
.global lbl_8009C6DC
lbl_8009C6DC:
/* 8009C6DC 0009851C 80 01 00 14 */ lwz r0, 0x14(r1)
/* 8009C6E0 00098520 83 E1 00 0C */ lwz r31, 0xc(r1)
/* 8009C6E4 00098524 7C 08 03 A6 */ mtlr r0
/* 8009C6E8 00098528 38 21 00 10 */ addi r1, r1, 0x10
/* 8009C6EC 0009852C 4E 80 00 20 */ blr
2022-10-16 16:31:36 +00:00
.global rfc_dec_credit
rfc_dec_credit:
2022-10-16 16:05:58 +00:00
/* 8009C6F0 00098530 80 83 00 6C */ lwz r4, 0x6c(r3)
/* 8009C6F4 00098534 88 04 00 72 */ lbz r0, 0x72(r4)
/* 8009C6F8 00098538 28 00 00 02 */ cmplwi r0, 0x2
/* 8009C6FC 0009853C 4C 82 00 20 */ bnelr
/* 8009C700 00098540 A0 83 00 98 */ lhz r4, 0x98(r3)
/* 8009C704 00098544 2C 04 00 00 */ cmpwi r4, 0x0
/* 8009C708 00098548 41 82 00 0C */ beq lbl_8009C714
/* 8009C70C 0009854C 38 04 FF FF */ addi r0, r4, -0x1
/* 8009C710 00098550 B0 03 00 98 */ sth r0, 0x98(r3)
.global lbl_8009C714
lbl_8009C714:
/* 8009C714 00098554 A0 03 00 98 */ lhz r0, 0x98(r3)
/* 8009C718 00098558 2C 00 00 00 */ cmpwi r0, 0x0
/* 8009C71C 0009855C 4C 82 00 20 */ bnelr
/* 8009C720 00098560 38 00 00 01 */ li r0, 0x1
/* 8009C724 00098564 98 03 00 24 */ stb r0, 0x24(r3)
/* 8009C728 00098568 4E 80 00 20 */ blr
2022-10-16 16:31:36 +00:00
.global rfc_check_send_cmd
rfc_check_send_cmd:
2022-10-16 16:05:58 +00:00
/* 8009C72C 0009856C 94 21 FF F0 */ stwu r1, -0x10(r1)
/* 8009C730 00098570 7C 08 02 A6 */ mflr r0
/* 8009C734 00098574 2C 04 00 00 */ cmpwi r4, 0x0
/* 8009C738 00098578 90 01 00 14 */ stw r0, 0x14(r1)
/* 8009C73C 0009857C 93 E1 00 0C */ stw r31, 0xc(r1)
/* 8009C740 00098580 7C 7F 1B 78 */ mr r31, r3
/* 8009C744 00098584 41 82 00 2C */ beq lbl_8009C770
/* 8009C748 00098588 38 63 00 18 */ addi r3, r3, 0x18
2022-10-16 16:31:36 +00:00
/* 8009C74C 0009858C 4B FD 8B F5 */ bl GKI_enqueue
2022-10-16 16:05:58 +00:00
/* 8009C750 00098590 48 00 00 20 */ b lbl_8009C770
.global lbl_8009C754
lbl_8009C754:
/* 8009C754 00098594 38 7F 00 18 */ addi r3, r31, 0x18
2022-10-16 16:31:36 +00:00
/* 8009C758 00098598 4B FD 8E 69 */ bl GKI_dequeue
2022-10-16 16:05:58 +00:00
/* 8009C75C 0009859C 2C 03 00 00 */ cmpwi r3, 0x0
/* 8009C760 000985A0 7C 64 1B 78 */ mr r4, r3
/* 8009C764 000985A4 41 82 00 18 */ beq lbl_8009C77C
/* 8009C768 000985A8 A0 7F 00 68 */ lhz r3, 0x68(r31)
2022-10-16 16:31:36 +00:00
/* 8009C76C 000985AC 4B FF 43 35 */ bl L2CA_DataWrite
2022-10-16 16:05:58 +00:00
.global lbl_8009C770
lbl_8009C770:
/* 8009C770 000985B0 88 1F 00 73 */ lbz r0, 0x73(r31)
/* 8009C774 000985B4 2C 00 00 00 */ cmpwi r0, 0x0
/* 8009C778 000985B8 41 82 FF DC */ beq lbl_8009C754
.global lbl_8009C77C
lbl_8009C77C:
/* 8009C77C 000985BC 80 01 00 14 */ lwz r0, 0x14(r1)
/* 8009C780 000985C0 83 E1 00 0C */ lwz r31, 0xc(r1)
/* 8009C784 000985C4 7C 08 03 A6 */ mtlr r0
/* 8009C788 000985C8 38 21 00 10 */ addi r1, r1, 0x10
/* 8009C78C 000985CC 4E 80 00 20 */ blr
2022-10-17 08:41:13 +00:00
.include "macros.inc"
.section .rodata, "wa" # 0x80406560 - 0x80421040 ; 0x0001AAE0
.global rfc_crctable
rfc_crctable:
.4byte 0x0091E372
.4byte 0x0796E475
.4byte 0x0E9FED7C
.4byte 0x0998EA7B
.4byte 0x1C8DFF6E
.4byte 0x1B8AF869
.4byte 0x1283F160
.4byte 0x1584F667
.4byte 0x38A9DB4A
.4byte 0x3FAEDC4D
.4byte 0x36A7D544
.4byte 0x31A0D243
.4byte 0x24B5C756
.4byte 0x23B2C051
.4byte 0x2ABBC958
.4byte 0x2DBCCE5F
.4byte 0x70E19302
.4byte 0x77E69405
.4byte 0x7EEF9D0C
.4byte 0x79E89A0B
.4byte 0x6CFD8F1E
.4byte 0x6BFA8819
.4byte 0x62F38110
.4byte 0x65F48617
.4byte 0x48D9AB3A
.4byte 0x4FDEAC3D
.4byte 0x46D7A534
.4byte 0x41D0A233
.4byte 0x54C5B726
.4byte 0x53C2B021
.4byte 0x5ACBB928
.4byte 0x5DCCBE2F
.4byte 0xE0710392
.4byte 0xE7760495
.4byte 0xEE7F0D9C
.4byte 0xE9780A9B
.4byte 0xFC6D1F8E
.4byte 0xFB6A1889
.4byte 0xF2631180
.4byte 0xF5641687
.4byte 0xD8493BAA
.4byte 0xDF4E3CAD
.4byte 0xD64735A4
.4byte 0xD14032A3
.4byte 0xC45527B6
.4byte 0xC35220B1
.4byte 0xCA5B29B8
.4byte 0xCD5C2EBF
.4byte 0x900173E2
.4byte 0x970674E5
.4byte 0x9E0F7DEC
.4byte 0x99087AEB
.4byte 0x8C1D6FFE
.4byte 0x8B1A68F9
.4byte 0x821361F0
.4byte 0x851466F7
.4byte 0xA8394BDA
.4byte 0xAF3E4CDD
.4byte 0xA63745D4
.4byte 0xA13042D3
.4byte 0xB42557C6
.4byte 0xB32250C1
.4byte 0xBA2B59C8
.4byte 0xBD2C5ECF
.include "macros.inc"
.section .data, "wa" # 0x80421040 - 0x80496700 ; 0x000756C0
.global "@688"
"@688":
.4byte 0x7266635F
.4byte 0x74696D65
.4byte 0x725F7374
.4byte 0x6F700000
.global "@689"
"@689":
.4byte 0x7266635F
.4byte 0x74696D65
.4byte 0x725F7374
.4byte 0x61727420
.4byte 0x2D207469
.4byte 0x6D656F75
.4byte 0x743A2564
.4byte 0
.global "@704_8043F8F0"
"@704_8043F8F0":
.4byte 0x7266635F
.4byte 0x706F7274
.4byte 0x5F74696D
.4byte 0x65725F73
.4byte 0x74617274
.4byte 0x202D2074
.4byte 0x696D656F
.4byte 0x75743A25
.4byte 0x64000000
.global "@708_8043F914"
"@708_8043F914":
.4byte 0x7266635F
.4byte 0x706F7274
.4byte 0x5F74696D
.4byte 0x65725F73
.4byte 0x746F7000
.4byte 0x7266635F
.4byte 0x706F7274
.4byte 0x5F636C6F
.4byte 0x73656400
.global "@745"
"@745":
.4byte 0x7266635F
.4byte 0x696E635F
.4byte 0x63726564
.4byte 0x69743A25
.4byte 0x64000000
.4byte 0