prime/asm/Dolphin/gx/GXFifo.s

832 lines
41 KiB
ArmAsm
Raw Normal View History

2022-04-02 21:03:04 +00:00
.include "macros.inc"
.section .sbss
lbl_805A9848:
.skip 0x4
lbl_805A984C:
.skip 0x4
lbl_805A9850:
.skip 0x4
lbl_805A9854:
.skip 0x4
lbl_805A9858:
.skip 0x4
lbl_805A985C:
.skip 0x4
lbl_805A9860:
.skip 0x4
lbl_805A9864:
.skip 0x4
2022-04-02 21:03:04 +00:00
.section .text, "ax"
.global GXCPInterruptHandler
GXCPInterruptHandler:
/* 8037627C 003731DC 7C 08 02 A6 */ mflr r0
/* 80376280 003731E0 90 01 00 04 */ stw r0, 4(r1)
/* 80376284 003731E4 94 21 FD 20 */ stwu r1, -0x2e0(r1)
/* 80376288 003731E8 93 E1 02 DC */ stw r31, 0x2dc(r1)
/* 8037628C 003731EC 7C 9F 23 78 */ mr r31, r4
/* 80376290 003731F0 80 AD AC 7C */ lwz r5, lbl_805A983C@sda21(r13)
/* 80376294 003731F4 80 62 CE 08 */ lwz r3, lbl_805AEB28@sda21(r2)
/* 80376298 003731F8 A0 05 00 00 */ lhz r0, 0(r5)
/* 8037629C 003731FC 90 03 00 0C */ stw r0, 0xc(r3)
/* 803762A0 00373200 80 03 00 08 */ lwz r0, 8(r3)
/* 803762A4 00373204 54 00 EF FF */ rlwinm. r0, r0, 0x1d, 0x1f, 0x1f
/* 803762A8 00373208 41 82 00 38 */ beq lbl_803762E0
/* 803762AC 0037320C 80 03 00 0C */ lwz r0, 0xc(r3)
/* 803762B0 00373210 54 00 FF FF */ rlwinm. r0, r0, 0x1f, 0x1f, 0x1f
/* 803762B4 00373214 41 82 00 2C */ beq lbl_803762E0
/* 803762B8 00373218 80 6D AC 90 */ lwz r3, lbl_805A9850@sda21(r13)
/* 803762BC 0037321C 48 00 EA 59 */ bl OSResumeThread
/* 803762C0 00373220 38 00 00 00 */ li r0, 0
/* 803762C4 00373224 90 0D AC 98 */ stw r0, lbl_805A9858@sda21(r13)
/* 803762C8 00373228 38 60 00 01 */ li r3, 1
/* 803762CC 0037322C 38 80 00 01 */ li r4, 1
/* 803762D0 00373230 48 00 07 19 */ bl __GXWriteFifoIntReset
/* 803762D4 00373234 38 60 00 01 */ li r3, 1
/* 803762D8 00373238 38 80 00 00 */ li r4, 0
/* 803762DC 0037323C 48 00 06 D1 */ bl __GXWriteFifoIntEnable
lbl_803762E0:
/* 803762E0 00373240 80 62 CE 08 */ lwz r3, lbl_805AEB28@sda21(r2)
/* 803762E4 00373244 80 03 00 08 */ lwz r0, 8(r3)
/* 803762E8 00373248 54 00 F7 FF */ rlwinm. r0, r0, 0x1e, 0x1f, 0x1f
/* 803762EC 0037324C 41 82 00 44 */ beq lbl_80376330
/* 803762F0 00373250 80 03 00 0C */ lwz r0, 0xc(r3)
/* 803762F4 00373254 54 00 07 FF */ clrlwi. r0, r0, 0x1f
/* 803762F8 00373258 41 82 00 38 */ beq lbl_80376330
/* 803762FC 0037325C 80 AD AC A0 */ lwz r5, lbl_805A9860@sda21(r13)
/* 80376300 00373260 38 60 00 00 */ li r3, 0
/* 80376304 00373264 38 80 00 01 */ li r4, 1
/* 80376308 00373268 38 05 00 01 */ addi r0, r5, 1
/* 8037630C 0037326C 90 0D AC A0 */ stw r0, lbl_805A9860@sda21(r13)
/* 80376310 00373270 48 00 06 9D */ bl __GXWriteFifoIntEnable
/* 80376314 00373274 38 60 00 01 */ li r3, 1
/* 80376318 00373278 38 80 00 00 */ li r4, 0
/* 8037631C 0037327C 48 00 06 CD */ bl __GXWriteFifoIntReset
/* 80376320 00373280 38 00 00 01 */ li r0, 1
/* 80376324 00373284 80 6D AC 90 */ lwz r3, lbl_805A9850@sda21(r13)
/* 80376328 00373288 90 0D AC 98 */ stw r0, lbl_805A9858@sda21(r13)
/* 8037632C 0037328C 48 00 EC 71 */ bl OSSuspendThread
lbl_80376330:
/* 80376330 00373290 80 62 CE 08 */ lwz r3, lbl_805AEB28@sda21(r2)
/* 80376334 00373294 80 83 00 08 */ lwz r4, 8(r3)
/* 80376338 00373298 38 A3 00 08 */ addi r5, r3, 8
/* 8037633C 0037329C 54 80 DF FF */ rlwinm. r0, r4, 0x1b, 0x1f, 0x1f
/* 80376340 003732A0 41 82 00 5C */ beq lbl_8037639C
/* 80376344 003732A4 80 03 00 0C */ lwz r0, 0xc(r3)
/* 80376348 003732A8 54 00 E7 FF */ rlwinm. r0, r0, 0x1c, 0x1f, 0x1f
/* 8037634C 003732AC 41 82 00 50 */ beq lbl_8037639C
/* 80376350 003732B0 54 80 06 F2 */ rlwinm r0, r4, 0, 0x1b, 0x19
/* 80376354 003732B4 90 05 00 00 */ stw r0, 0(r5)
/* 80376358 003732B8 80 03 00 08 */ lwz r0, 8(r3)
/* 8037635C 003732BC 80 6D AC 7C */ lwz r3, lbl_805A983C@sda21(r13)
/* 80376360 003732C0 B0 03 00 02 */ sth r0, 2(r3)
/* 80376364 003732C4 80 0D AC 9C */ lwz r0, lbl_805A985C@sda21(r13)
/* 80376368 003732C8 28 00 00 00 */ cmplwi r0, 0
/* 8037636C 003732CC 41 82 00 30 */ beq lbl_8037639C
/* 80376370 003732D0 38 61 00 10 */ addi r3, r1, 0x10
/* 80376374 003732D4 48 00 92 A1 */ bl OSClearContext
/* 80376378 003732D8 38 61 00 10 */ addi r3, r1, 0x10
/* 8037637C 003732DC 48 00 90 A1 */ bl OSSetCurrentContext
/* 80376380 003732E0 81 8D AC 9C */ lwz r12, lbl_805A985C@sda21(r13)
/* 80376384 003732E4 7D 88 03 A6 */ mtlr r12
/* 80376388 003732E8 4E 80 00 21 */ blrl
/* 8037638C 003732EC 38 61 00 10 */ addi r3, r1, 0x10
/* 80376390 003732F0 48 00 92 85 */ bl OSClearContext
/* 80376394 003732F4 7F E3 FB 78 */ mr r3, r31
/* 80376398 003732F8 48 00 90 85 */ bl OSSetCurrentContext
lbl_8037639C:
/* 8037639C 003732FC 80 01 02 E4 */ lwz r0, 0x2e4(r1)
/* 803763A0 00373300 83 E1 02 DC */ lwz r31, 0x2dc(r1)
/* 803763A4 00373304 38 21 02 E0 */ addi r1, r1, 0x2e0
/* 803763A8 00373308 7C 08 03 A6 */ mtlr r0
/* 803763AC 0037330C 4E 80 00 20 */ blr
.global GXInitFifoBase
GXInitFifoBase:
/* 803763B0 00373310 7C 08 02 A6 */ mflr r0
/* 803763B4 00373314 90 01 00 04 */ stw r0, 4(r1)
/* 803763B8 00373318 38 05 FF FC */ addi r0, r5, -4
/* 803763BC 0037331C 94 21 FF E0 */ stwu r1, -0x20(r1)
/* 803763C0 00373320 93 E1 00 1C */ stw r31, 0x1c(r1)
/* 803763C4 00373324 3B E4 00 00 */ addi r31, r4, 0
/* 803763C8 00373328 7C 1F 02 14 */ add r0, r31, r0
/* 803763CC 0037332C 93 C1 00 18 */ stw r30, 0x18(r1)
/* 803763D0 00373330 3B C3 00 00 */ addi r30, r3, 0
/* 803763D4 00373334 38 85 C0 00 */ addi r4, r5, -16384
/* 803763D8 00373338 93 E3 00 00 */ stw r31, 0(r3)
/* 803763DC 0037333C 90 03 00 04 */ stw r0, 4(r3)
/* 803763E0 00373340 38 00 00 00 */ li r0, 0
/* 803763E4 00373344 90 A3 00 08 */ stw r5, 8(r3)
/* 803763E8 00373348 54 A5 F8 74 */ rlwinm r5, r5, 0x1f, 1, 0x1a
/* 803763EC 0037334C 90 1E 00 1C */ stw r0, 0x1c(r30)
/* 803763F0 00373350 48 00 00 9D */ bl GXInitFifoLimits
/* 803763F4 00373354 38 7E 00 00 */ addi r3, r30, 0
/* 803763F8 00373358 38 9F 00 00 */ addi r4, r31, 0
/* 803763FC 0037335C 38 BF 00 00 */ addi r5, r31, 0
/* 80376400 00373360 48 00 00 1D */ bl GXInitFifoPtrs
/* 80376404 00373364 80 01 00 24 */ lwz r0, 0x24(r1)
/* 80376408 00373368 83 E1 00 1C */ lwz r31, 0x1c(r1)
/* 8037640C 0037336C 83 C1 00 18 */ lwz r30, 0x18(r1)
/* 80376410 00373370 38 21 00 20 */ addi r1, r1, 0x20
/* 80376414 00373374 7C 08 03 A6 */ mtlr r0
/* 80376418 00373378 4E 80 00 20 */ blr
.global GXInitFifoPtrs
GXInitFifoPtrs:
/* 8037641C 0037337C 7C 08 02 A6 */ mflr r0
/* 80376420 00373380 90 01 00 04 */ stw r0, 4(r1)
/* 80376424 00373384 94 21 FF D8 */ stwu r1, -0x28(r1)
/* 80376428 00373388 93 E1 00 24 */ stw r31, 0x24(r1)
/* 8037642C 0037338C 3B E5 00 00 */ addi r31, r5, 0
/* 80376430 00373390 93 C1 00 20 */ stw r30, 0x20(r1)
/* 80376434 00373394 3B C4 00 00 */ addi r30, r4, 0
/* 80376438 00373398 93 A1 00 1C */ stw r29, 0x1c(r1)
/* 8037643C 0037339C 3B A3 00 00 */ addi r29, r3, 0
/* 80376440 003733A0 48 00 B2 21 */ bl OSDisableInterrupts
/* 80376444 003733A4 93 DD 00 14 */ stw r30, 0x14(r29)
/* 80376448 003733A8 7C 1E F8 50 */ subf r0, r30, r31
/* 8037644C 003733AC 93 FD 00 18 */ stw r31, 0x18(r29)
/* 80376450 003733B0 90 1D 00 1C */ stw r0, 0x1c(r29)
/* 80376454 003733B4 80 9D 00 1C */ lwz r4, 0x1c(r29)
/* 80376458 003733B8 2C 04 00 00 */ cmpwi r4, 0
/* 8037645C 003733BC 40 80 00 10 */ bge lbl_8037646C
/* 80376460 003733C0 80 1D 00 08 */ lwz r0, 8(r29)
/* 80376464 003733C4 7C 04 02 14 */ add r0, r4, r0
/* 80376468 003733C8 90 1D 00 1C */ stw r0, 0x1c(r29)
lbl_8037646C:
/* 8037646C 003733CC 48 00 B2 1D */ bl OSRestoreInterrupts
/* 80376470 003733D0 80 01 00 2C */ lwz r0, 0x2c(r1)
/* 80376474 003733D4 83 E1 00 24 */ lwz r31, 0x24(r1)
/* 80376478 003733D8 83 C1 00 20 */ lwz r30, 0x20(r1)
/* 8037647C 003733DC 83 A1 00 1C */ lwz r29, 0x1c(r1)
/* 80376480 003733E0 38 21 00 28 */ addi r1, r1, 0x28
/* 80376484 003733E4 7C 08 03 A6 */ mtlr r0
/* 80376488 003733E8 4E 80 00 20 */ blr
.global GXInitFifoLimits
GXInitFifoLimits:
/* 8037648C 003733EC 90 83 00 0C */ stw r4, 0xc(r3)
/* 80376490 003733F0 90 A3 00 10 */ stw r5, 0x10(r3)
/* 80376494 003733F4 4E 80 00 20 */ blr
.global GXSetCPUFifo
GXSetCPUFifo:
/* 80376498 003733F8 7C 08 02 A6 */ mflr r0
/* 8037649C 003733FC 90 01 00 04 */ stw r0, 4(r1)
/* 803764A0 00373400 94 21 FF E8 */ stwu r1, -0x18(r1)
/* 803764A4 00373404 93 E1 00 14 */ stw r31, 0x14(r1)
/* 803764A8 00373408 93 C1 00 10 */ stw r30, 0x10(r1)
/* 803764AC 0037340C 7C 7E 1B 78 */ mr r30, r3
/* 803764B0 00373410 48 00 B1 B1 */ bl OSDisableInterrupts
/* 803764B4 00373414 80 0D AC 8C */ lwz r0, lbl_805A984C@sda21(r13)
/* 803764B8 00373418 3B E3 00 00 */ addi r31, r3, 0
/* 803764BC 0037341C 93 CD AC 88 */ stw r30, lbl_805A9848@sda21(r13)
/* 803764C0 00373420 7C 1E 00 40 */ cmplw r30, r0
/* 803764C4 00373424 40 82 00 64 */ bne lbl_80376528
/* 803764C8 00373428 80 BE 00 00 */ lwz r5, 0(r30)
/* 803764CC 0037342C 38 00 00 01 */ li r0, 1
/* 803764D0 00373430 80 8D AC 78 */ lwz r4, lbl_805A9838@sda21(r13)
/* 803764D4 00373434 38 60 00 01 */ li r3, 1
/* 803764D8 00373438 54 A5 00 BE */ clrlwi r5, r5, 2
/* 803764DC 0037343C 90 A4 00 0C */ stw r5, 0xc(r4)
/* 803764E0 00373440 38 80 00 01 */ li r4, 1
/* 803764E4 00373444 80 DE 00 04 */ lwz r6, 4(r30)
/* 803764E8 00373448 80 AD AC 78 */ lwz r5, lbl_805A9838@sda21(r13)
/* 803764EC 0037344C 54 C6 00 BE */ clrlwi r6, r6, 2
/* 803764F0 00373450 90 C5 00 10 */ stw r6, 0x10(r5)
/* 803764F4 00373454 80 DE 00 18 */ lwz r6, 0x18(r30)
/* 803764F8 00373458 80 AD AC 78 */ lwz r5, lbl_805A9838@sda21(r13)
/* 803764FC 0037345C 54 C6 00 B4 */ rlwinm r6, r6, 0, 2, 0x1a
/* 80376500 00373460 54 C6 01 88 */ rlwinm r6, r6, 0, 6, 4
/* 80376504 00373464 90 C5 00 14 */ stw r6, 0x14(r5)
/* 80376508 00373468 98 0D AC 94 */ stb r0, lbl_805A9854@sda21(r13)
/* 8037650C 0037346C 48 00 04 DD */ bl __GXWriteFifoIntReset
/* 80376510 00373470 38 60 00 01 */ li r3, 1
/* 80376514 00373474 38 80 00 00 */ li r4, 0
/* 80376518 00373478 48 00 04 95 */ bl __GXWriteFifoIntEnable
/* 8037651C 0037347C 38 60 00 01 */ li r3, 1
/* 80376520 00373480 48 00 04 51 */ bl __GXFifoLink
/* 80376524 00373484 48 00 00 60 */ b lbl_80376584
lbl_80376528:
/* 80376528 00373488 88 0D AC 94 */ lbz r0, lbl_805A9854@sda21(r13)
/* 8037652C 0037348C 28 00 00 00 */ cmplwi r0, 0
/* 80376530 00373490 41 82 00 14 */ beq lbl_80376544
/* 80376534 00373494 38 60 00 00 */ li r3, 0
/* 80376538 00373498 48 00 04 39 */ bl __GXFifoLink
/* 8037653C 0037349C 38 00 00 00 */ li r0, 0
/* 80376540 003734A0 98 0D AC 94 */ stb r0, lbl_805A9854@sda21(r13)
lbl_80376544:
/* 80376544 003734A4 38 60 00 00 */ li r3, 0
/* 80376548 003734A8 38 80 00 00 */ li r4, 0
/* 8037654C 003734AC 48 00 04 61 */ bl __GXWriteFifoIntEnable
/* 80376550 003734B0 80 1E 00 00 */ lwz r0, 0(r30)
/* 80376554 003734B4 80 6D AC 78 */ lwz r3, lbl_805A9838@sda21(r13)
/* 80376558 003734B8 54 00 00 BE */ clrlwi r0, r0, 2
/* 8037655C 003734BC 90 03 00 0C */ stw r0, 0xc(r3)
/* 80376560 003734C0 80 1E 00 04 */ lwz r0, 4(r30)
/* 80376564 003734C4 80 6D AC 78 */ lwz r3, lbl_805A9838@sda21(r13)
/* 80376568 003734C8 54 00 00 BE */ clrlwi r0, r0, 2
/* 8037656C 003734CC 90 03 00 10 */ stw r0, 0x10(r3)
/* 80376570 003734D0 80 1E 00 18 */ lwz r0, 0x18(r30)
/* 80376574 003734D4 80 6D AC 78 */ lwz r3, lbl_805A9838@sda21(r13)
/* 80376578 003734D8 54 00 00 B4 */ rlwinm r0, r0, 0, 2, 0x1a
/* 8037657C 003734DC 54 00 01 88 */ rlwinm r0, r0, 0, 6, 4
/* 80376580 003734E0 90 03 00 14 */ stw r0, 0x14(r3)
lbl_80376584:
/* 80376584 003734E4 4B FF 92 89 */ bl PPCSync
/* 80376588 003734E8 7F E3 FB 78 */ mr r3, r31
/* 8037658C 003734EC 48 00 B0 FD */ bl OSRestoreInterrupts
/* 80376590 003734F0 80 01 00 1C */ lwz r0, 0x1c(r1)
/* 80376594 003734F4 83 E1 00 14 */ lwz r31, 0x14(r1)
/* 80376598 003734F8 83 C1 00 10 */ lwz r30, 0x10(r1)
/* 8037659C 003734FC 38 21 00 18 */ addi r1, r1, 0x18
/* 803765A0 00373500 7C 08 03 A6 */ mtlr r0
/* 803765A4 00373504 4E 80 00 20 */ blr
.global GXSetGPFifo
GXSetGPFifo:
/* 803765A8 00373508 7C 08 02 A6 */ mflr r0
/* 803765AC 0037350C 90 01 00 04 */ stw r0, 4(r1)
/* 803765B0 00373510 94 21 FF E8 */ stwu r1, -0x18(r1)
/* 803765B4 00373514 93 E1 00 14 */ stw r31, 0x14(r1)
/* 803765B8 00373518 93 C1 00 10 */ stw r30, 0x10(r1)
/* 803765BC 0037351C 7C 7E 1B 78 */ mr r30, r3
/* 803765C0 00373520 48 00 B0 A1 */ bl OSDisableInterrupts
/* 803765C4 00373524 7C 7F 1B 78 */ mr r31, r3
/* 803765C8 00373528 48 00 03 89 */ bl __GXFifoReadDisable
/* 803765CC 0037352C 38 60 00 00 */ li r3, 0
/* 803765D0 00373530 38 80 00 00 */ li r4, 0
/* 803765D4 00373534 48 00 03 D9 */ bl __GXWriteFifoIntEnable
/* 803765D8 00373538 93 CD AC 8C */ stw r30, lbl_805A984C@sda21(r13)
/* 803765DC 0037353C 80 6D AC 7C */ lwz r3, lbl_805A983C@sda21(r13)
/* 803765E0 00373540 80 1E 00 00 */ lwz r0, 0(r30)
/* 803765E4 00373544 B0 03 00 20 */ sth r0, 0x20(r3)
/* 803765E8 00373548 80 1E 00 04 */ lwz r0, 4(r30)
/* 803765EC 0037354C 80 6D AC 7C */ lwz r3, lbl_805A983C@sda21(r13)
/* 803765F0 00373550 B0 03 00 24 */ sth r0, 0x24(r3)
/* 803765F4 00373554 80 1E 00 1C */ lwz r0, 0x1c(r30)
/* 803765F8 00373558 80 6D AC 7C */ lwz r3, lbl_805A983C@sda21(r13)
/* 803765FC 0037355C B0 03 00 30 */ sth r0, 0x30(r3)
/* 80376600 00373560 80 1E 00 18 */ lwz r0, 0x18(r30)
/* 80376604 00373564 80 6D AC 7C */ lwz r3, lbl_805A983C@sda21(r13)
/* 80376608 00373568 B0 03 00 34 */ sth r0, 0x34(r3)
/* 8037660C 0037356C 80 1E 00 14 */ lwz r0, 0x14(r30)
/* 80376610 00373570 80 6D AC 7C */ lwz r3, lbl_805A983C@sda21(r13)
/* 80376614 00373574 B0 03 00 38 */ sth r0, 0x38(r3)
/* 80376618 00373578 80 1E 00 0C */ lwz r0, 0xc(r30)
/* 8037661C 0037357C 80 6D AC 7C */ lwz r3, lbl_805A983C@sda21(r13)
/* 80376620 00373580 B0 03 00 28 */ sth r0, 0x28(r3)
/* 80376624 00373584 80 1E 00 10 */ lwz r0, 0x10(r30)
/* 80376628 00373588 80 6D AC 7C */ lwz r3, lbl_805A983C@sda21(r13)
/* 8037662C 0037358C B0 03 00 2C */ sth r0, 0x2c(r3)
/* 80376630 00373590 80 1E 00 00 */ lwz r0, 0(r30)
/* 80376634 00373594 80 6D AC 7C */ lwz r3, lbl_805A983C@sda21(r13)
/* 80376638 00373598 54 00 84 BE */ rlwinm r0, r0, 0x10, 0x12, 0x1f
/* 8037663C 0037359C B0 03 00 22 */ sth r0, 0x22(r3)
/* 80376640 003735A0 80 1E 00 04 */ lwz r0, 4(r30)
/* 80376644 003735A4 80 6D AC 7C */ lwz r3, lbl_805A983C@sda21(r13)
/* 80376648 003735A8 54 00 84 BE */ rlwinm r0, r0, 0x10, 0x12, 0x1f
/* 8037664C 003735AC B0 03 00 26 */ sth r0, 0x26(r3)
/* 80376650 003735B0 80 1E 00 1C */ lwz r0, 0x1c(r30)
/* 80376654 003735B4 80 6D AC 7C */ lwz r3, lbl_805A983C@sda21(r13)
/* 80376658 003735B8 7C 00 86 70 */ srawi r0, r0, 0x10
/* 8037665C 003735BC B0 03 00 32 */ sth r0, 0x32(r3)
/* 80376660 003735C0 80 1E 00 18 */ lwz r0, 0x18(r30)
/* 80376664 003735C4 80 6D AC 7C */ lwz r3, lbl_805A983C@sda21(r13)
/* 80376668 003735C8 54 00 84 BE */ rlwinm r0, r0, 0x10, 0x12, 0x1f
/* 8037666C 003735CC B0 03 00 36 */ sth r0, 0x36(r3)
/* 80376670 003735D0 80 1E 00 14 */ lwz r0, 0x14(r30)
/* 80376674 003735D4 80 6D AC 7C */ lwz r3, lbl_805A983C@sda21(r13)
/* 80376678 003735D8 54 00 84 BE */ rlwinm r0, r0, 0x10, 0x12, 0x1f
/* 8037667C 003735DC B0 03 00 3A */ sth r0, 0x3a(r3)
/* 80376680 003735E0 80 1E 00 0C */ lwz r0, 0xc(r30)
/* 80376684 003735E4 80 6D AC 7C */ lwz r3, lbl_805A983C@sda21(r13)
/* 80376688 003735E8 54 00 84 3E */ srwi r0, r0, 0x10
/* 8037668C 003735EC B0 03 00 2A */ sth r0, 0x2a(r3)
/* 80376690 003735F0 80 1E 00 10 */ lwz r0, 0x10(r30)
/* 80376694 003735F4 80 6D AC 7C */ lwz r3, lbl_805A983C@sda21(r13)
/* 80376698 003735F8 54 00 84 3E */ srwi r0, r0, 0x10
/* 8037669C 003735FC B0 03 00 2E */ sth r0, 0x2e(r3)
/* 803766A0 00373600 4B FF 91 6D */ bl PPCSync
/* 803766A4 00373604 80 6D AC 88 */ lwz r3, lbl_805A9848@sda21(r13)
/* 803766A8 00373608 80 0D AC 8C */ lwz r0, lbl_805A984C@sda21(r13)
/* 803766AC 0037360C 7C 03 00 40 */ cmplw r3, r0
/* 803766B0 00373610 40 82 00 24 */ bne lbl_803766D4
/* 803766B4 00373614 38 00 00 01 */ li r0, 1
/* 803766B8 00373618 98 0D AC 94 */ stb r0, lbl_805A9854@sda21(r13)
/* 803766BC 0037361C 38 60 00 01 */ li r3, 1
/* 803766C0 00373620 38 80 00 00 */ li r4, 0
/* 803766C4 00373624 48 00 02 E9 */ bl __GXWriteFifoIntEnable
/* 803766C8 00373628 38 60 00 01 */ li r3, 1
/* 803766CC 0037362C 48 00 02 A5 */ bl __GXFifoLink
/* 803766D0 00373630 48 00 00 20 */ b lbl_803766F0
lbl_803766D4:
/* 803766D4 00373634 38 00 00 00 */ li r0, 0
/* 803766D8 00373638 98 0D AC 94 */ stb r0, lbl_805A9854@sda21(r13)
/* 803766DC 0037363C 38 60 00 00 */ li r3, 0
/* 803766E0 00373640 38 80 00 00 */ li r4, 0
/* 803766E4 00373644 48 00 02 C9 */ bl __GXWriteFifoIntEnable
/* 803766E8 00373648 38 60 00 00 */ li r3, 0
/* 803766EC 0037364C 48 00 02 85 */ bl __GXFifoLink
lbl_803766F0:
/* 803766F0 00373650 38 60 00 01 */ li r3, 1
/* 803766F4 00373654 38 80 00 01 */ li r4, 1
/* 803766F8 00373658 48 00 02 F1 */ bl __GXWriteFifoIntReset
/* 803766FC 0037365C 48 00 02 31 */ bl __GXFifoReadEnable
/* 80376700 00373660 7F E3 FB 78 */ mr r3, r31
/* 80376704 00373664 48 00 AF 85 */ bl OSRestoreInterrupts
/* 80376708 00373668 80 01 00 1C */ lwz r0, 0x1c(r1)
/* 8037670C 0037366C 83 E1 00 14 */ lwz r31, 0x14(r1)
/* 80376710 00373670 83 C1 00 10 */ lwz r30, 0x10(r1)
/* 80376714 00373674 38 21 00 18 */ addi r1, r1, 0x18
/* 80376718 00373678 7C 08 03 A6 */ mtlr r0
/* 8037671C 0037367C 4E 80 00 20 */ blr
.global __GXSaveCPUFifoAux
__GXSaveCPUFifoAux:
/* 80376720 00373680 80 0D AC 88 */ lwz r0, lbl_805A9848@sda21(r13)
/* 80376724 00373684 7C 03 00 40 */ cmplw r3, r0
/* 80376728 00373688 40 82 00 18 */ bne lbl_80376740
/* 8037672C 0037368C 80 CD AC 78 */ lwz r6, lbl_805A9838@sda21(r13)
/* 80376730 00373690 80 06 00 14 */ lwz r0, 0x14(r6)
/* 80376734 00373694 54 06 01 88 */ rlwinm r6, r0, 0, 6, 4
/* 80376738 00373698 3C 06 80 00 */ addis r0, r6, 0x8000
/* 8037673C 0037369C 90 03 00 18 */ stw r0, 0x18(r3)
lbl_80376740:
/* 80376740 003736A0 80 0D AC 8C */ lwz r0, lbl_805A984C@sda21(r13)
/* 80376744 003736A4 7C 03 00 40 */ cmplw r3, r0
/* 80376748 003736A8 40 82 00 34 */ bne lbl_8037677C
/* 8037674C 003736AC 80 ED AC 7C */ lwz r7, lbl_805A983C@sda21(r13)
/* 80376750 003736B0 A0 C7 00 3A */ lhz r6, 0x3a(r7)
/* 80376754 003736B4 A0 E7 00 38 */ lhz r7, 0x38(r7)
/* 80376758 003736B8 50 C7 80 1E */ rlwimi r7, r6, 0x10, 0, 0xf
/* 8037675C 003736BC 3C 07 80 00 */ addis r0, r7, 0x8000
/* 80376760 003736C0 90 03 00 14 */ stw r0, 0x14(r3)
/* 80376764 003736C4 80 ED AC 7C */ lwz r7, lbl_805A983C@sda21(r13)
/* 80376768 003736C8 A0 C7 00 32 */ lhz r6, 0x32(r7)
/* 8037676C 003736CC A0 07 00 30 */ lhz r0, 0x30(r7)
/* 80376770 003736D0 50 C0 80 1E */ rlwimi r0, r6, 0x10, 0, 0xf
/* 80376774 003736D4 90 03 00 1C */ stw r0, 0x1c(r3)
/* 80376778 003736D8 48 00 00 2C */ b lbl_803767A4
lbl_8037677C:
/* 8037677C 003736DC 80 C3 00 14 */ lwz r6, 0x14(r3)
/* 80376780 003736E0 80 03 00 18 */ lwz r0, 0x18(r3)
/* 80376784 003736E4 7C 06 00 50 */ subf r0, r6, r0
/* 80376788 003736E8 90 03 00 1C */ stw r0, 0x1c(r3)
/* 8037678C 003736EC 80 C3 00 1C */ lwz r6, 0x1c(r3)
/* 80376790 003736F0 2C 06 00 00 */ cmpwi r6, 0
/* 80376794 003736F4 40 80 00 10 */ bge lbl_803767A4
/* 80376798 003736F8 80 03 00 08 */ lwz r0, 8(r3)
/* 8037679C 003736FC 7C 06 02 14 */ add r0, r6, r0
/* 803767A0 00373700 90 03 00 1C */ stw r0, 0x1c(r3)
lbl_803767A4:
/* 803767A4 00373704 80 03 00 14 */ lwz r0, 0x14(r3)
/* 803767A8 00373708 90 04 00 00 */ stw r0, 0(r4)
/* 803767AC 0037370C 80 03 00 18 */ lwz r0, 0x18(r3)
/* 803767B0 00373710 90 05 00 00 */ stw r0, 0(r5)
/* 803767B4 00373714 4E 80 00 20 */ blr
.global GXSetBreakPtCallback
GXSetBreakPtCallback:
/* 803767B8 00373718 7C 08 02 A6 */ mflr r0
/* 803767BC 0037371C 90 01 00 04 */ stw r0, 4(r1)
/* 803767C0 00373720 94 21 FF E8 */ stwu r1, -0x18(r1)
/* 803767C4 00373724 93 E1 00 14 */ stw r31, 0x14(r1)
/* 803767C8 00373728 93 C1 00 10 */ stw r30, 0x10(r1)
/* 803767CC 0037372C 7C 7E 1B 78 */ mr r30, r3
/* 803767D0 00373730 83 ED AC 9C */ lwz r31, lbl_805A985C@sda21(r13)
/* 803767D4 00373734 48 00 AE 8D */ bl OSDisableInterrupts
/* 803767D8 00373738 93 CD AC 9C */ stw r30, lbl_805A985C@sda21(r13)
/* 803767DC 0037373C 48 00 AE AD */ bl OSRestoreInterrupts
/* 803767E0 00373740 7F E3 FB 78 */ mr r3, r31
/* 803767E4 00373744 80 01 00 1C */ lwz r0, 0x1c(r1)
/* 803767E8 00373748 83 E1 00 14 */ lwz r31, 0x14(r1)
/* 803767EC 0037374C 83 C1 00 10 */ lwz r30, 0x10(r1)
/* 803767F0 00373750 38 21 00 18 */ addi r1, r1, 0x18
/* 803767F4 00373754 7C 08 03 A6 */ mtlr r0
/* 803767F8 00373758 4E 80 00 20 */ blr
.global GXEnableBreakPt
GXEnableBreakPt:
/* 803767FC 0037375C 7C 08 02 A6 */ mflr r0
/* 80376800 00373760 90 01 00 04 */ stw r0, 4(r1)
/* 80376804 00373764 94 21 FF E8 */ stwu r1, -0x18(r1)
/* 80376808 00373768 93 E1 00 14 */ stw r31, 0x14(r1)
/* 8037680C 0037376C 93 C1 00 10 */ stw r30, 0x10(r1)
/* 80376810 00373770 7C 7E 1B 78 */ mr r30, r3
/* 80376814 00373774 48 00 AE 4D */ bl OSDisableInterrupts
/* 80376818 00373778 7C 7F 1B 78 */ mr r31, r3
/* 8037681C 0037377C 48 00 01 35 */ bl __GXFifoReadDisable
/* 80376820 00373780 80 6D AC 7C */ lwz r3, lbl_805A983C@sda21(r13)
/* 80376824 00373784 57 C0 84 BE */ rlwinm r0, r30, 0x10, 0x12, 0x1f
/* 80376828 00373788 B3 C3 00 3C */ sth r30, 0x3c(r3)
/* 8037682C 0037378C 80 6D AC 7C */ lwz r3, lbl_805A983C@sda21(r13)
/* 80376830 00373790 B0 03 00 3E */ sth r0, 0x3e(r3)
/* 80376834 00373794 80 62 CE 08 */ lwz r3, lbl_805AEB28@sda21(r2)
/* 80376838 00373798 80 03 00 08 */ lwz r0, 8(r3)
/* 8037683C 0037379C 54 00 07 FA */ rlwinm r0, r0, 0, 0x1f, 0x1d
/* 80376840 003737A0 60 00 00 02 */ ori r0, r0, 2
/* 80376844 003737A4 90 03 00 08 */ stw r0, 8(r3)
/* 80376848 003737A8 80 03 00 08 */ lwz r0, 8(r3)
/* 8037684C 003737AC 54 00 06 F2 */ rlwinm r0, r0, 0, 0x1b, 0x19
/* 80376850 003737B0 60 00 00 20 */ ori r0, r0, 0x20
/* 80376854 003737B4 90 03 00 08 */ stw r0, 8(r3)
/* 80376858 003737B8 80 03 00 08 */ lwz r0, 8(r3)
/* 8037685C 003737BC 80 6D AC 7C */ lwz r3, lbl_805A983C@sda21(r13)
/* 80376860 003737C0 B0 03 00 02 */ sth r0, 2(r3)
/* 80376864 003737C4 93 CD AC A4 */ stw r30, lbl_805A9864@sda21(r13)
/* 80376868 003737C8 48 00 00 C5 */ bl __GXFifoReadEnable
/* 8037686C 003737CC 7F E3 FB 78 */ mr r3, r31
/* 80376870 003737D0 48 00 AE 19 */ bl OSRestoreInterrupts
/* 80376874 003737D4 80 01 00 1C */ lwz r0, 0x1c(r1)
/* 80376878 003737D8 83 E1 00 14 */ lwz r31, 0x14(r1)
/* 8037687C 003737DC 83 C1 00 10 */ lwz r30, 0x10(r1)
/* 80376880 003737E0 38 21 00 18 */ addi r1, r1, 0x18
/* 80376884 003737E4 7C 08 03 A6 */ mtlr r0
/* 80376888 003737E8 4E 80 00 20 */ blr
.global GXDisableBreakPt
GXDisableBreakPt:
/* 8037688C 003737EC 7C 08 02 A6 */ mflr r0
/* 80376890 003737F0 90 01 00 04 */ stw r0, 4(r1)
/* 80376894 003737F4 94 21 FF F8 */ stwu r1, -8(r1)
/* 80376898 003737F8 48 00 AD C9 */ bl OSDisableInterrupts
/* 8037689C 003737FC 80 A2 CE 08 */ lwz r5, lbl_805AEB28@sda21(r2)
/* 803768A0 00373800 38 00 00 00 */ li r0, 0
/* 803768A4 00373804 80 85 00 08 */ lwz r4, 8(r5)
/* 803768A8 00373808 54 84 07 FA */ rlwinm r4, r4, 0, 0x1f, 0x1d
/* 803768AC 0037380C 90 85 00 08 */ stw r4, 8(r5)
/* 803768B0 00373810 80 85 00 08 */ lwz r4, 8(r5)
/* 803768B4 00373814 54 84 06 F2 */ rlwinm r4, r4, 0, 0x1b, 0x19
/* 803768B8 00373818 90 85 00 08 */ stw r4, 8(r5)
/* 803768BC 0037381C 80 A5 00 08 */ lwz r5, 8(r5)
/* 803768C0 00373820 80 8D AC 7C */ lwz r4, lbl_805A983C@sda21(r13)
/* 803768C4 00373824 B0 A4 00 02 */ sth r5, 2(r4)
/* 803768C8 00373828 90 0D AC A4 */ stw r0, lbl_805A9864@sda21(r13)
/* 803768CC 0037382C 48 00 AD BD */ bl OSRestoreInterrupts
/* 803768D0 00373830 80 01 00 0C */ lwz r0, 0xc(r1)
/* 803768D4 00373834 38 21 00 08 */ addi r1, r1, 8
/* 803768D8 00373838 7C 08 03 A6 */ mtlr r0
/* 803768DC 0037383C 4E 80 00 20 */ blr
.global __GXFifoInit
__GXFifoInit:
/* 803768E0 00373840 7C 08 02 A6 */ mflr r0
/* 803768E4 00373844 3C 60 80 37 */ lis r3, GXCPInterruptHandler@ha
/* 803768E8 00373848 90 01 00 04 */ stw r0, 4(r1)
/* 803768EC 0037384C 38 83 62 7C */ addi r4, r3, GXCPInterruptHandler@l
/* 803768F0 00373850 38 60 00 11 */ li r3, 0x11
/* 803768F4 00373854 94 21 FF F8 */ stwu r1, -8(r1)
/* 803768F8 00373858 48 00 AD B5 */ bl __OSSetInterruptHandler
/* 803768FC 0037385C 38 60 40 00 */ li r3, 0x4000
/* 80376900 00373860 48 00 B1 B1 */ bl __OSUnmaskInterrupts
/* 80376904 00373864 48 00 DC D1 */ bl OSGetCurrentThread
/* 80376908 00373868 38 00 00 00 */ li r0, 0
/* 8037690C 0037386C 90 6D AC 90 */ stw r3, lbl_805A9850@sda21(r13)
/* 80376910 00373870 90 0D AC 98 */ stw r0, lbl_805A9858@sda21(r13)
/* 80376914 00373874 90 0D AC 88 */ stw r0, lbl_805A9848@sda21(r13)
/* 80376918 00373878 90 0D AC 8C */ stw r0, lbl_805A984C@sda21(r13)
/* 8037691C 0037387C 80 01 00 0C */ lwz r0, 0xc(r1)
/* 80376920 00373880 38 21 00 08 */ addi r1, r1, 8
/* 80376924 00373884 7C 08 03 A6 */ mtlr r0
/* 80376928 00373888 4E 80 00 20 */ blr
.global __GXFifoReadEnable
__GXFifoReadEnable:
/* 8037692C 0037388C 80 62 CE 08 */ lwz r3, lbl_805AEB28@sda21(r2)
/* 80376930 00373890 80 03 00 08 */ lwz r0, 8(r3)
/* 80376934 00373894 54 00 00 3C */ rlwinm r0, r0, 0, 0, 0x1e
/* 80376938 00373898 60 00 00 01 */ ori r0, r0, 1
/* 8037693C 0037389C 90 03 00 08 */ stw r0, 8(r3)
/* 80376940 003738A0 80 03 00 08 */ lwz r0, 8(r3)
/* 80376944 003738A4 80 6D AC 7C */ lwz r3, lbl_805A983C@sda21(r13)
/* 80376948 003738A8 B0 03 00 02 */ sth r0, 2(r3)
/* 8037694C 003738AC 4E 80 00 20 */ blr
.global __GXFifoReadDisable
__GXFifoReadDisable:
/* 80376950 003738B0 80 62 CE 08 */ lwz r3, lbl_805AEB28@sda21(r2)
/* 80376954 003738B4 80 03 00 08 */ lwz r0, 8(r3)
/* 80376958 003738B8 54 00 00 3C */ rlwinm r0, r0, 0, 0, 0x1e
/* 8037695C 003738BC 90 03 00 08 */ stw r0, 8(r3)
/* 80376960 003738C0 80 03 00 08 */ lwz r0, 8(r3)
/* 80376964 003738C4 80 6D AC 7C */ lwz r3, lbl_805A983C@sda21(r13)
/* 80376968 003738C8 B0 03 00 02 */ sth r0, 2(r3)
/* 8037696C 003738CC 4E 80 00 20 */ blr
.global __GXFifoLink
__GXFifoLink:
/* 80376970 003738D0 54 60 06 3F */ clrlwi. r0, r3, 0x18
/* 80376974 003738D4 41 82 00 0C */ beq lbl_80376980
/* 80376978 003738D8 38 00 00 01 */ li r0, 1
/* 8037697C 003738DC 48 00 00 08 */ b lbl_80376984
lbl_80376980:
/* 80376980 003738E0 38 00 00 00 */ li r0, 0
lbl_80376984:
/* 80376984 003738E4 80 82 CE 08 */ lwz r4, lbl_805AEB28@sda21(r2)
/* 80376988 003738E8 54 00 20 36 */ slwi r0, r0, 4
/* 8037698C 003738EC 80 64 00 08 */ lwz r3, 8(r4)
/* 80376990 003738F0 54 63 07 34 */ rlwinm r3, r3, 0, 0x1c, 0x1a
/* 80376994 003738F4 7C 60 03 78 */ or r0, r3, r0
/* 80376998 003738F8 90 04 00 08 */ stw r0, 8(r4)
/* 8037699C 003738FC 80 04 00 08 */ lwz r0, 8(r4)
/* 803769A0 00373900 80 6D AC 7C */ lwz r3, lbl_805A983C@sda21(r13)
/* 803769A4 00373904 B0 03 00 02 */ sth r0, 2(r3)
/* 803769A8 00373908 4E 80 00 20 */ blr
.global __GXWriteFifoIntEnable
__GXWriteFifoIntEnable:
/* 803769AC 0037390C 80 C2 CE 08 */ lwz r6, lbl_805AEB28@sda21(r2)
/* 803769B0 00373910 54 63 15 BA */ rlwinm r3, r3, 2, 0x16, 0x1d
/* 803769B4 00373914 54 80 1D 78 */ rlwinm r0, r4, 3, 0x15, 0x1c
/* 803769B8 00373918 80 A6 00 08 */ lwz r5, 8(r6)
/* 803769BC 0037391C 54 A4 07 B8 */ rlwinm r4, r5, 0, 0x1e, 0x1c
/* 803769C0 00373920 7C 83 1B 78 */ or r3, r4, r3
/* 803769C4 00373924 90 66 00 08 */ stw r3, 8(r6)
/* 803769C8 00373928 80 66 00 08 */ lwz r3, 8(r6)
/* 803769CC 0037392C 54 63 07 76 */ rlwinm r3, r3, 0, 0x1d, 0x1b
/* 803769D0 00373930 7C 60 03 78 */ or r0, r3, r0
/* 803769D4 00373934 90 06 00 08 */ stw r0, 8(r6)
/* 803769D8 00373938 80 06 00 08 */ lwz r0, 8(r6)
/* 803769DC 0037393C 80 6D AC 7C */ lwz r3, lbl_805A983C@sda21(r13)
/* 803769E0 00373940 B0 03 00 02 */ sth r0, 2(r3)
/* 803769E4 00373944 4E 80 00 20 */ blr
.global __GXWriteFifoIntReset
__GXWriteFifoIntReset:
/* 803769E8 00373948 80 C2 CE 08 */ lwz r6, lbl_805AEB28@sda21(r2)
/* 803769EC 0037394C 54 63 06 3E */ clrlwi r3, r3, 0x18
/* 803769F0 00373950 54 80 0D FC */ rlwinm r0, r4, 1, 0x17, 0x1e
/* 803769F4 00373954 80 A6 00 10 */ lwz r5, 0x10(r6)
/* 803769F8 00373958 54 A4 00 3C */ rlwinm r4, r5, 0, 0, 0x1e
/* 803769FC 0037395C 7C 83 1B 78 */ or r3, r4, r3
/* 80376A00 00373960 90 66 00 10 */ stw r3, 0x10(r6)
/* 80376A04 00373964 80 66 00 10 */ lwz r3, 0x10(r6)
/* 80376A08 00373968 54 63 07 FA */ rlwinm r3, r3, 0, 0x1f, 0x1d
/* 80376A0C 0037396C 7C 60 03 78 */ or r0, r3, r0
/* 80376A10 00373970 90 06 00 10 */ stw r0, 0x10(r6)
/* 80376A14 00373974 80 06 00 10 */ lwz r0, 0x10(r6)
/* 80376A18 00373978 80 6D AC 7C */ lwz r3, lbl_805A983C@sda21(r13)
/* 80376A1C 0037397C B0 03 00 04 */ sth r0, 4(r3)
/* 80376A20 00373980 4E 80 00 20 */ blr
.global __GXCleanGPFifo
__GXCleanGPFifo:
/* 80376A24 00373984 7C 08 02 A6 */ mflr r0
/* 80376A28 00373988 90 01 00 04 */ stw r0, 4(r1)
/* 80376A2C 0037398C 94 21 FF 58 */ stwu r1, -0xa8(r1)
/* 80376A30 00373990 93 E1 00 A4 */ stw r31, 0xa4(r1)
/* 80376A34 00373994 93 C1 00 A0 */ stw r30, 0xa0(r1)
/* 80376A38 00373998 93 A1 00 9C */ stw r29, 0x9c(r1)
/* 80376A3C 0037399C 48 00 00 F1 */ bl GXGetGPFifo
/* 80376A40 003739A0 7C 7F 1B 79 */ or. r31, r3, r3
/* 80376A44 003739A4 41 82 00 C4 */ beq lbl_80376B08
/* 80376A48 003739A8 48 00 00 DD */ bl GXGetCPUFifo
/* 80376A4C 003739AC 38 00 00 10 */ li r0, 0x10
/* 80376A50 003739B0 83 BF 00 00 */ lwz r29, 0(r31)
/* 80376A54 003739B4 7C 09 03 A6 */ mtctr r0
/* 80376A58 003739B8 3B C3 00 00 */ addi r30, r3, 0
/* 80376A5C 003739BC 38 A1 00 0C */ addi r5, r1, 0xc
/* 80376A60 003739C0 38 9F FF F8 */ addi r4, r31, -8
lbl_80376A64:
/* 80376A64 003739C4 84 64 00 08 */ lwzu r3, 8(r4)
/* 80376A68 003739C8 80 04 00 04 */ lwz r0, 4(r4)
/* 80376A6C 003739CC 94 65 00 08 */ stwu r3, 8(r5)
/* 80376A70 003739D0 90 05 00 04 */ stw r0, 4(r5)
/* 80376A74 003739D4 42 00 FF F0 */ bdnz lbl_80376A64
/* 80376A78 003739D8 48 00 AB E9 */ bl OSDisableInterrupts
/* 80376A7C 003739DC 93 A1 00 28 */ stw r29, 0x28(r1)
/* 80376A80 003739E0 38 00 00 00 */ li r0, 0
/* 80376A84 003739E4 93 A1 00 2C */ stw r29, 0x2c(r1)
/* 80376A88 003739E8 90 01 00 30 */ stw r0, 0x30(r1)
/* 80376A8C 003739EC 80 81 00 30 */ lwz r4, 0x30(r1)
/* 80376A90 003739F0 2C 04 00 00 */ cmpwi r4, 0
/* 80376A94 003739F4 40 80 00 10 */ bge lbl_80376AA4
/* 80376A98 003739F8 80 01 00 1C */ lwz r0, 0x1c(r1)
/* 80376A9C 003739FC 7C 04 02 14 */ add r0, r4, r0
/* 80376AA0 00373A00 90 01 00 30 */ stw r0, 0x30(r1)
lbl_80376AA4:
/* 80376AA4 00373A04 48 00 AB E5 */ bl OSRestoreInterrupts
/* 80376AA8 00373A08 38 61 00 14 */ addi r3, r1, 0x14
/* 80376AAC 00373A0C 4B FF FA FD */ bl GXSetGPFifo
/* 80376AB0 00373A10 7C 1E F8 40 */ cmplw r30, r31
/* 80376AB4 00373A14 40 82 00 0C */ bne lbl_80376AC0
/* 80376AB8 00373A18 38 61 00 14 */ addi r3, r1, 0x14
/* 80376ABC 00373A1C 4B FF F9 DD */ bl GXSetCPUFifo
lbl_80376AC0:
/* 80376AC0 00373A20 48 00 AB A1 */ bl OSDisableInterrupts
/* 80376AC4 00373A24 93 BF 00 14 */ stw r29, 0x14(r31)
/* 80376AC8 00373A28 38 00 00 00 */ li r0, 0
/* 80376ACC 00373A2C 93 BF 00 18 */ stw r29, 0x18(r31)
/* 80376AD0 00373A30 90 1F 00 1C */ stw r0, 0x1c(r31)
/* 80376AD4 00373A34 80 9F 00 1C */ lwz r4, 0x1c(r31)
/* 80376AD8 00373A38 2C 04 00 00 */ cmpwi r4, 0
/* 80376ADC 00373A3C 40 80 00 10 */ bge lbl_80376AEC
/* 80376AE0 00373A40 80 1F 00 08 */ lwz r0, 8(r31)
/* 80376AE4 00373A44 7C 04 02 14 */ add r0, r4, r0
/* 80376AE8 00373A48 90 1F 00 1C */ stw r0, 0x1c(r31)
lbl_80376AEC:
/* 80376AEC 00373A4C 48 00 AB 9D */ bl OSRestoreInterrupts
/* 80376AF0 00373A50 7F E3 FB 78 */ mr r3, r31
/* 80376AF4 00373A54 4B FF FA B5 */ bl GXSetGPFifo
/* 80376AF8 00373A58 7C 1E F8 40 */ cmplw r30, r31
/* 80376AFC 00373A5C 40 82 00 0C */ bne lbl_80376B08
/* 80376B00 00373A60 7F C3 F3 78 */ mr r3, r30
/* 80376B04 00373A64 4B FF F9 95 */ bl GXSetCPUFifo
lbl_80376B08:
/* 80376B08 00373A68 80 01 00 AC */ lwz r0, 0xac(r1)
/* 80376B0C 00373A6C 83 E1 00 A4 */ lwz r31, 0xa4(r1)
/* 80376B10 00373A70 83 C1 00 A0 */ lwz r30, 0xa0(r1)
/* 80376B14 00373A74 83 A1 00 9C */ lwz r29, 0x9c(r1)
/* 80376B18 00373A78 38 21 00 A8 */ addi r1, r1, 0xa8
/* 80376B1C 00373A7C 7C 08 03 A6 */ mtlr r0
/* 80376B20 00373A80 4E 80 00 20 */ blr
.global GXGetCPUFifo
GXGetCPUFifo:
/* 80376B24 00373A84 80 6D AC 88 */ lwz r3, lbl_805A9848@sda21(r13)
/* 80376B28 00373A88 4E 80 00 20 */ blr
.global GXGetGPFifo
GXGetGPFifo:
/* 80376B2C 00373A8C 80 6D AC 8C */ lwz r3, lbl_805A984C@sda21(r13)
/* 80376B30 00373A90 4E 80 00 20 */ blr
.global GXRedirectWriteGatherPipe
GXRedirectWriteGatherPipe:
/* 80376B34 00373A94 7C 08 02 A6 */ mflr r0
/* 80376B38 00373A98 90 01 00 04 */ stw r0, 4(r1)
/* 80376B3C 00373A9C 94 21 FF E8 */ stwu r1, -0x18(r1)
/* 80376B40 00373AA0 93 E1 00 14 */ stw r31, 0x14(r1)
/* 80376B44 00373AA4 93 C1 00 10 */ stw r30, 0x10(r1)
/* 80376B48 00373AA8 7C 7E 1B 78 */ mr r30, r3
/* 80376B4C 00373AAC 48 00 AB 15 */ bl OSDisableInterrupts
/* 80376B50 00373AB0 7C 7F 1B 78 */ mr r31, r3
/* 80376B54 00373AB4 48 00 17 BD */ bl GXFlush
lbl_80376B58:
/* 80376B58 00373AB8 4B FF 8D 29 */ bl PPCMfwpar
/* 80376B5C 00373ABC 54 60 07 FF */ clrlwi. r0, r3, 0x1f
/* 80376B60 00373AC0 40 82 FF F8 */ bne lbl_80376B58
/* 80376B64 00373AC4 3C 60 0C 01 */ lis r3, 0x0C008000@ha
/* 80376B68 00373AC8 38 63 80 00 */ addi r3, r3, 0x0C008000@l
/* 80376B6C 00373ACC 4B FF 8D 21 */ bl PPCMtwpar
/* 80376B70 00373AD0 88 0D AC 94 */ lbz r0, lbl_805A9854@sda21(r13)
/* 80376B74 00373AD4 28 00 00 00 */ cmplwi r0, 0
/* 80376B78 00373AD8 41 82 00 44 */ beq lbl_80376BBC
/* 80376B7C 00373ADC 80 82 CE 08 */ lwz r4, lbl_805AEB28@sda21(r2)
/* 80376B80 00373AE0 80 04 00 08 */ lwz r0, 8(r4)
/* 80376B84 00373AE4 54 00 07 34 */ rlwinm r0, r0, 0, 0x1c, 0x1a
/* 80376B88 00373AE8 90 04 00 08 */ stw r0, 8(r4)
/* 80376B8C 00373AEC 80 04 00 08 */ lwz r0, 8(r4)
/* 80376B90 00373AF0 80 6D AC 7C */ lwz r3, lbl_805A983C@sda21(r13)
/* 80376B94 00373AF4 B0 03 00 02 */ sth r0, 2(r3)
/* 80376B98 00373AF8 80 04 00 08 */ lwz r0, 8(r4)
/* 80376B9C 00373AFC 54 00 07 B8 */ rlwinm r0, r0, 0, 0x1e, 0x1c
/* 80376BA0 00373B00 90 04 00 08 */ stw r0, 8(r4)
/* 80376BA4 00373B04 80 04 00 08 */ lwz r0, 8(r4)
/* 80376BA8 00373B08 54 00 07 76 */ rlwinm r0, r0, 0, 0x1d, 0x1b
/* 80376BAC 00373B0C 90 04 00 08 */ stw r0, 8(r4)
/* 80376BB0 00373B10 80 04 00 08 */ lwz r0, 8(r4)
/* 80376BB4 00373B14 80 6D AC 7C */ lwz r3, lbl_805A983C@sda21(r13)
/* 80376BB8 00373B18 B0 03 00 02 */ sth r0, 2(r3)
lbl_80376BBC:
/* 80376BBC 00373B1C 80 8D AC 78 */ lwz r4, lbl_805A9838@sda21(r13)
/* 80376BC0 00373B20 57 C5 00 B4 */ rlwinm r5, r30, 0, 2, 0x1a
/* 80376BC4 00373B24 80 6D AC 88 */ lwz r3, lbl_805A9848@sda21(r13)
/* 80376BC8 00373B28 54 A5 01 88 */ rlwinm r5, r5, 0, 6, 4
/* 80376BCC 00373B2C 80 04 00 14 */ lwz r0, 0x14(r4)
/* 80376BD0 00373B30 54 04 01 88 */ rlwinm r4, r0, 0, 6, 4
/* 80376BD4 00373B34 3C 04 80 00 */ addis r0, r4, 0x8000
/* 80376BD8 00373B38 90 03 00 18 */ stw r0, 0x18(r3)
/* 80376BDC 00373B3C 38 80 00 00 */ li r4, 0
/* 80376BE0 00373B40 3C 00 04 00 */ lis r0, 0x400
/* 80376BE4 00373B44 80 6D AC 78 */ lwz r3, lbl_805A9838@sda21(r13)
/* 80376BE8 00373B48 90 83 00 0C */ stw r4, 0xc(r3)
/* 80376BEC 00373B4C 80 6D AC 78 */ lwz r3, lbl_805A9838@sda21(r13)
/* 80376BF0 00373B50 90 03 00 10 */ stw r0, 0x10(r3)
/* 80376BF4 00373B54 80 6D AC 78 */ lwz r3, lbl_805A9838@sda21(r13)
/* 80376BF8 00373B58 90 A3 00 14 */ stw r5, 0x14(r3)
/* 80376BFC 00373B5C 4B FF 8C 11 */ bl PPCSync
/* 80376C00 00373B60 7F E3 FB 78 */ mr r3, r31
/* 80376C04 00373B64 48 00 AA 85 */ bl OSRestoreInterrupts
/* 80376C08 00373B68 3C 60 CC 01 */ lis r3, 0xCC008000@ha
/* 80376C0C 00373B6C 80 01 00 1C */ lwz r0, 0x1c(r1)
/* 80376C10 00373B70 83 E1 00 14 */ lwz r31, 0x14(r1)
/* 80376C14 00373B74 38 63 80 00 */ addi r3, r3, 0xCC008000@l
/* 80376C18 00373B78 83 C1 00 10 */ lwz r30, 0x10(r1)
/* 80376C1C 00373B7C 38 21 00 18 */ addi r1, r1, 0x18
/* 80376C20 00373B80 7C 08 03 A6 */ mtlr r0
/* 80376C24 00373B84 4E 80 00 20 */ blr
.global GXRestoreWriteGatherPipe
GXRestoreWriteGatherPipe:
/* 80376C28 00373B88 7C 08 02 A6 */ mflr r0
/* 80376C2C 00373B8C 90 01 00 04 */ stw r0, 4(r1)
/* 80376C30 00373B90 94 21 FF E8 */ stwu r1, -0x18(r1)
/* 80376C34 00373B94 93 E1 00 14 */ stw r31, 0x14(r1)
/* 80376C38 00373B98 48 00 AA 29 */ bl OSDisableInterrupts
/* 80376C3C 00373B9C 3C A0 CC 01 */ lis r5, 0xCC008000@ha
/* 80376C40 00373BA0 38 80 00 00 */ li r4, 0
/* 80376C44 00373BA4 98 85 80 00 */ stb r4, 0xCC008000@l(r5)
/* 80376C48 00373BA8 38 C0 00 18 */ li r6, 0x18
/* 80376C4C 00373BAC 20 06 00 1F */ subfic r0, r6, 0x1f
/* 80376C50 00373BB0 98 85 80 00 */ stb r4, 0xCC008000@l(r5)
/* 80376C54 00373BB4 28 06 00 1F */ cmplwi r6, 0x1f
/* 80376C58 00373BB8 7C 09 03 A6 */ mtctr r0
/* 80376C5C 00373BBC 7C 7F 1B 78 */ mr r31, r3
/* 80376C60 00373BC0 98 85 80 00 */ stb r4, 0xCC008000@l(r5)
/* 80376C64 00373BC4 98 85 80 00 */ stb r4, 0xCC008000@l(r5)
/* 80376C68 00373BC8 98 85 80 00 */ stb r4, 0xCC008000@l(r5)
/* 80376C6C 00373BCC 98 85 80 00 */ stb r4, 0xCC008000@l(r5)
/* 80376C70 00373BD0 98 85 80 00 */ stb r4, 0xCC008000@l(r5)
/* 80376C74 00373BD4 98 85 80 00 */ stb r4, 0xCC008000@l(r5)
/* 80376C78 00373BD8 98 85 80 00 */ stb r4, 0xCC008000@l(r5)
/* 80376C7C 00373BDC 98 85 80 00 */ stb r4, 0xCC008000@l(r5)
/* 80376C80 00373BE0 98 85 80 00 */ stb r4, 0xCC008000@l(r5)
/* 80376C84 00373BE4 98 85 80 00 */ stb r4, 0xCC008000@l(r5)
/* 80376C88 00373BE8 98 85 80 00 */ stb r4, 0xCC008000@l(r5)
/* 80376C8C 00373BEC 98 85 80 00 */ stb r4, 0xCC008000@l(r5)
/* 80376C90 00373BF0 98 85 80 00 */ stb r4, 0xCC008000@l(r5)
/* 80376C94 00373BF4 98 85 80 00 */ stb r4, 0xCC008000@l(r5)
/* 80376C98 00373BF8 98 85 80 00 */ stb r4, 0xCC008000@l(r5)
/* 80376C9C 00373BFC 98 85 80 00 */ stb r4, 0xCC008000@l(r5)
/* 80376CA0 00373C00 98 85 80 00 */ stb r4, 0xCC008000@l(r5)
/* 80376CA4 00373C04 98 85 80 00 */ stb r4, 0xCC008000@l(r5)
/* 80376CA8 00373C08 98 85 80 00 */ stb r4, 0xCC008000@l(r5)
/* 80376CAC 00373C0C 98 85 80 00 */ stb r4, 0xCC008000@l(r5)
/* 80376CB0 00373C10 98 85 80 00 */ stb r4, 0xCC008000@l(r5)
/* 80376CB4 00373C14 98 85 80 00 */ stb r4, 0xCC008000@l(r5)
/* 80376CB8 00373C18 40 80 00 0C */ bge lbl_80376CC4
lbl_80376CBC:
/* 80376CBC 00373C1C 98 85 80 00 */ stb r4, 0xCC008000@l(r5)
/* 80376CC0 00373C20 42 00 FF FC */ bdnz lbl_80376CBC
lbl_80376CC4:
/* 80376CC4 00373C24 4B FF 8B 49 */ bl PPCSync
lbl_80376CC8:
/* 80376CC8 00373C28 4B FF 8B B9 */ bl PPCMfwpar
/* 80376CCC 00373C2C 54 60 07 FF */ clrlwi. r0, r3, 0x1f
/* 80376CD0 00373C30 40 82 FF F8 */ bne lbl_80376CC8
/* 80376CD4 00373C34 3C 60 0C 01 */ lis r3, 0x0C008000@ha
/* 80376CD8 00373C38 38 63 80 00 */ addi r3, r3, 0x0C008000@l
/* 80376CDC 00373C3C 4B FF 8B B1 */ bl PPCMtwpar
/* 80376CE0 00373C40 80 8D AC 88 */ lwz r4, lbl_805A9848@sda21(r13)
/* 80376CE4 00373C44 80 6D AC 78 */ lwz r3, lbl_805A9838@sda21(r13)
/* 80376CE8 00373C48 80 04 00 00 */ lwz r0, 0(r4)
/* 80376CEC 00373C4C 54 00 00 BE */ clrlwi r0, r0, 2
/* 80376CF0 00373C50 90 03 00 0C */ stw r0, 0xc(r3)
/* 80376CF4 00373C54 80 8D AC 88 */ lwz r4, lbl_805A9848@sda21(r13)
/* 80376CF8 00373C58 80 6D AC 78 */ lwz r3, lbl_805A9838@sda21(r13)
/* 80376CFC 00373C5C 80 04 00 04 */ lwz r0, 4(r4)
/* 80376D00 00373C60 54 00 00 BE */ clrlwi r0, r0, 2
/* 80376D04 00373C64 90 03 00 10 */ stw r0, 0x10(r3)
/* 80376D08 00373C68 80 8D AC 88 */ lwz r4, lbl_805A9848@sda21(r13)
/* 80376D0C 00373C6C 80 6D AC 78 */ lwz r3, lbl_805A9838@sda21(r13)
/* 80376D10 00373C70 80 04 00 18 */ lwz r0, 0x18(r4)
/* 80376D14 00373C74 54 00 00 B4 */ rlwinm r0, r0, 0, 2, 0x1a
/* 80376D18 00373C78 54 00 01 88 */ rlwinm r0, r0, 0, 6, 4
/* 80376D1C 00373C7C 90 03 00 14 */ stw r0, 0x14(r3)
/* 80376D20 00373C80 88 0D AC 94 */ lbz r0, lbl_805A9854@sda21(r13)
/* 80376D24 00373C84 28 00 00 00 */ cmplwi r0, 0
/* 80376D28 00373C88 41 82 00 78 */ beq lbl_80376DA0
/* 80376D2C 00373C8C 80 82 CE 08 */ lwz r4, lbl_805AEB28@sda21(r2)
/* 80376D30 00373C90 80 04 00 10 */ lwz r0, 0x10(r4)
/* 80376D34 00373C94 54 00 00 3C */ rlwinm r0, r0, 0, 0, 0x1e
/* 80376D38 00373C98 60 00 00 01 */ ori r0, r0, 1
/* 80376D3C 00373C9C 90 04 00 10 */ stw r0, 0x10(r4)
/* 80376D40 00373CA0 80 04 00 10 */ lwz r0, 0x10(r4)
/* 80376D44 00373CA4 54 00 07 FA */ rlwinm r0, r0, 0, 0x1f, 0x1d
/* 80376D48 00373CA8 60 00 00 02 */ ori r0, r0, 2
/* 80376D4C 00373CAC 90 04 00 10 */ stw r0, 0x10(r4)
/* 80376D50 00373CB0 80 04 00 10 */ lwz r0, 0x10(r4)
/* 80376D54 00373CB4 80 6D AC 7C */ lwz r3, lbl_805A983C@sda21(r13)
/* 80376D58 00373CB8 B0 03 00 04 */ sth r0, 4(r3)
/* 80376D5C 00373CBC 80 04 00 08 */ lwz r0, 8(r4)
/* 80376D60 00373CC0 54 00 07 B8 */ rlwinm r0, r0, 0, 0x1e, 0x1c
/* 80376D64 00373CC4 60 00 00 04 */ ori r0, r0, 4
/* 80376D68 00373CC8 90 04 00 08 */ stw r0, 8(r4)
/* 80376D6C 00373CCC 80 04 00 08 */ lwz r0, 8(r4)
/* 80376D70 00373CD0 54 00 07 76 */ rlwinm r0, r0, 0, 0x1d, 0x1b
/* 80376D74 00373CD4 90 04 00 08 */ stw r0, 8(r4)
/* 80376D78 00373CD8 80 04 00 08 */ lwz r0, 8(r4)
/* 80376D7C 00373CDC 80 6D AC 7C */ lwz r3, lbl_805A983C@sda21(r13)
/* 80376D80 00373CE0 B0 03 00 02 */ sth r0, 2(r3)
/* 80376D84 00373CE4 80 04 00 08 */ lwz r0, 8(r4)
/* 80376D88 00373CE8 54 00 07 34 */ rlwinm r0, r0, 0, 0x1c, 0x1a
/* 80376D8C 00373CEC 60 00 00 10 */ ori r0, r0, 0x10
/* 80376D90 00373CF0 90 04 00 08 */ stw r0, 8(r4)
/* 80376D94 00373CF4 80 04 00 08 */ lwz r0, 8(r4)
/* 80376D98 00373CF8 80 6D AC 7C */ lwz r3, lbl_805A983C@sda21(r13)
/* 80376D9C 00373CFC B0 03 00 02 */ sth r0, 2(r3)
lbl_80376DA0:
/* 80376DA0 00373D00 4B FF 8A 6D */ bl PPCSync
/* 80376DA4 00373D04 7F E3 FB 78 */ mr r3, r31
/* 80376DA8 00373D08 48 00 A8 E1 */ bl OSRestoreInterrupts
/* 80376DAC 00373D0C 80 01 00 1C */ lwz r0, 0x1c(r1)
/* 80376DB0 00373D10 83 E1 00 14 */ lwz r31, 0x14(r1)
/* 80376DB4 00373D14 38 21 00 18 */ addi r1, r1, 0x18
/* 80376DB8 00373D18 7C 08 03 A6 */ mtlr r0
/* 80376DBC 00373D1C 4E 80 00 20 */ blr