prime/asm/musyx/hw_aramdma.s

943 lines
46 KiB
ArmAsm
Raw Normal View History

.include "macros.inc"
.section .sbss, "wa"
.balign 4
.global aramIdleStreamBuffers
aramIdleStreamBuffers:
.skip 0x4
.global aramFreeStreamBuffers
aramFreeStreamBuffers:
.skip 0x4
.global aramUsedStreamBuffers
aramUsedStreamBuffers:
.skip 0x4
.global aramUploadChunkSize
aramUploadChunkSize:
.skip 0x4
.global aramUploadCallback
aramUploadCallback:
.skip 0x4
.global aramStream
aramStream:
.skip 0x4
.global aramWrite
aramWrite:
.skip 0x4
.global aramTop
aramTop:
.skip 0x4
.section .text, "ax"
.global aramQueueCallback
aramQueueCallback:
/* 803B3F70 003B0ED0 94 21 FF E0 */ stwu r1, -0x20(r1)
/* 803B3F74 003B0ED4 7C 08 02 A6 */ mflr r0
/* 803B3F78 003B0ED8 90 01 00 24 */ stw r0, 0x24(r1)
/* 803B3F7C 003B0EDC 93 E1 00 1C */ stw r31, 0x1c(r1)
/* 803B3F80 003B0EE0 93 C1 00 18 */ stw r30, 0x18(r1)
/* 803B3F84 003B0EE4 93 A1 00 14 */ stw r29, 0x14(r1)
/* 803B3F88 003B0EE8 93 81 00 10 */ stw r28, 0x10(r1)
/* 803B3F8C 003B0EEC 7C 7C 1B 78 */ mr r28, r3
/* 803B3F90 003B0EF0 3C 60 80 56 */ lis r3, lbl_80566F90@ha
/* 803B3F94 003B0EF4 80 1C 00 0C */ lwz r0, 0xc(r28)
/* 803B3F98 003B0EF8 3B E3 6F 90 */ addi r31, r3, lbl_80566F90@l
/* 803B3F9C 003B0EFC 28 00 00 01 */ cmplwi r0, 1
/* 803B3FA0 003B0F00 40 82 00 0C */ bne lbl_803B3FAC
/* 803B3FA4 003B0F04 3C 60 80 56 */ lis r3, lbl_80567214@ha
/* 803B3FA8 003B0F08 3B E3 72 14 */ addi r31, r3, lbl_80567214@l
lbl_803B3FAC:
/* 803B3FAC 003B0F0C 3B A0 00 00 */ li r29, 0
/* 803B3FB0 003B0F10 7F FE FB 78 */ mr r30, r31
lbl_803B3FB4:
/* 803B3FB4 003B0F14 7C 1C F0 40 */ cmplw r28, r30
/* 803B3FB8 003B0F18 40 82 00 1C */ bne lbl_803B3FD4
/* 803B3FBC 003B0F1C 81 9E 00 20 */ lwz r12, 0x20(r30)
/* 803B3FC0 003B0F20 28 0C 00 00 */ cmplwi r12, 0
/* 803B3FC4 003B0F24 41 82 00 10 */ beq lbl_803B3FD4
/* 803B3FC8 003B0F28 80 7E 00 24 */ lwz r3, 0x24(r30)
/* 803B3FCC 003B0F2C 7D 89 03 A6 */ mtctr r12
/* 803B3FD0 003B0F30 4E 80 04 21 */ bctrl
lbl_803B3FD4:
/* 803B3FD4 003B0F34 3B BD 00 01 */ addi r29, r29, 1
/* 803B3FD8 003B0F38 3B DE 00 28 */ addi r30, r30, 0x28
/* 803B3FDC 003B0F3C 28 1D 00 10 */ cmplwi r29, 0x10
/* 803B3FE0 003B0F40 41 80 FF D4 */ blt lbl_803B3FB4
/* 803B3FE4 003B0F44 88 7F 02 81 */ lbz r3, 0x281(r31)
/* 803B3FE8 003B0F48 38 03 FF FF */ addi r0, r3, -1
/* 803B3FEC 003B0F4C 98 1F 02 81 */ stb r0, 0x281(r31)
/* 803B3FF0 003B0F50 83 E1 00 1C */ lwz r31, 0x1c(r1)
/* 803B3FF4 003B0F54 83 C1 00 18 */ lwz r30, 0x18(r1)
/* 803B3FF8 003B0F58 83 A1 00 14 */ lwz r29, 0x14(r1)
/* 803B3FFC 003B0F5C 83 81 00 10 */ lwz r28, 0x10(r1)
/* 803B4000 003B0F60 80 01 00 24 */ lwz r0, 0x24(r1)
/* 803B4004 003B0F64 7C 08 03 A6 */ mtlr r0
/* 803B4008 003B0F68 38 21 00 20 */ addi r1, r1, 0x20
/* 803B400C 003B0F6C 4E 80 00 20 */ blr
.global aramUploadData
aramUploadData:
/* 803B4010 003B0F70 94 21 FF D0 */ stwu r1, -0x30(r1)
/* 803B4014 003B0F74 7C 08 02 A6 */ mflr r0
/* 803B4018 003B0F78 90 01 00 34 */ stw r0, 0x34(r1)
/* 803B401C 003B0F7C 39 61 00 30 */ addi r11, r1, 0x30
/* 803B4020 003B0F80 4B FD 5A 51 */ bl _savegpr_24
/* 803B4024 003B0F84 7C D8 33 79 */ or. r24, r6, r6
/* 803B4028 003B0F88 7C 79 1B 78 */ mr r25, r3
/* 803B402C 003B0F8C 7C 9A 23 78 */ mr r26, r4
/* 803B4030 003B0F90 7C BB 2B 78 */ mr r27, r5
/* 803B4034 003B0F94 7C FC 3B 78 */ mr r28, r7
/* 803B4038 003B0F98 7D 1D 43 78 */ mr r29, r8
/* 803B403C 003B0F9C 41 82 00 10 */ beq lbl_803B404C
/* 803B4040 003B0FA0 3C 60 80 56 */ lis r3, lbl_80567214@ha
/* 803B4044 003B0FA4 3B E3 72 14 */ addi r31, r3, lbl_80567214@l
/* 803B4048 003B0FA8 48 00 00 0C */ b lbl_803B4054
lbl_803B404C:
/* 803B404C 003B0FAC 3C 60 80 56 */ lis r3, lbl_80566F90@ha
/* 803B4050 003B0FB0 3B E3 6F 90 */ addi r31, r3, lbl_80566F90@l
lbl_803B4054:
/* 803B4054 003B0FB4 4B FC D6 0D */ bl OSDisableInterrupts
/* 803B4058 003B0FB8 88 1F 02 81 */ lbz r0, 0x281(r31)
/* 803B405C 003B0FBC 7C 7E 1B 78 */ mr r30, r3
/* 803B4060 003B0FC0 28 00 00 10 */ cmplwi r0, 0x10
/* 803B4064 003B0FC4 40 80 01 68 */ bge lbl_803B41CC
/* 803B4068 003B0FC8 88 9F 02 80 */ lbz r4, 0x280(r31)
/* 803B406C 003B0FCC 7C 18 00 D0 */ neg r0, r24
/* 803B4070 003B0FD0 7C 00 C3 78 */ or r0, r0, r24
/* 803B4074 003B0FD4 3C 60 80 3B */ lis r3, aramQueueCallback@ha
/* 803B4078 003B0FD8 1C 84 00 28 */ mulli r4, r4, 0x28
/* 803B407C 003B0FDC 38 E0 00 2A */ li r7, 0x2a
/* 803B4080 003B0FE0 38 A0 00 00 */ li r5, 0
/* 803B4084 003B0FE4 54 08 0F FE */ srwi r8, r0, 0x1f
/* 803B4088 003B0FE8 7C DF 22 14 */ add r6, r31, r4
/* 803B408C 003B0FEC 38 83 3F 70 */ addi r4, r3, aramQueueCallback@l
/* 803B4090 003B0FF0 90 E6 00 04 */ stw r7, 4(r6)
/* 803B4094 003B0FF4 88 1F 02 80 */ lbz r0, 0x280(r31)
/* 803B4098 003B0FF8 1C 00 00 28 */ mulli r0, r0, 0x28
/* 803B409C 003B0FFC 7C 7F 02 14 */ add r3, r31, r0
/* 803B40A0 003B1000 90 A3 00 08 */ stw r5, 8(r3)
/* 803B40A4 003B1004 88 1F 02 80 */ lbz r0, 0x280(r31)
/* 803B40A8 003B1008 1C 00 00 28 */ mulli r0, r0, 0x28
/* 803B40AC 003B100C 7C 7F 02 14 */ add r3, r31, r0
/* 803B40B0 003B1010 91 03 00 0C */ stw r8, 0xc(r3)
/* 803B40B4 003B1014 88 1F 02 80 */ lbz r0, 0x280(r31)
/* 803B40B8 003B1018 1C 00 00 28 */ mulli r0, r0, 0x28
/* 803B40BC 003B101C 7C 7F 02 14 */ add r3, r31, r0
/* 803B40C0 003B1020 93 23 00 10 */ stw r25, 0x10(r3)
/* 803B40C4 003B1024 88 1F 02 80 */ lbz r0, 0x280(r31)
/* 803B40C8 003B1028 1C 00 00 28 */ mulli r0, r0, 0x28
/* 803B40CC 003B102C 7C 7F 02 14 */ add r3, r31, r0
/* 803B40D0 003B1030 93 43 00 14 */ stw r26, 0x14(r3)
/* 803B40D4 003B1034 88 1F 02 80 */ lbz r0, 0x280(r31)
/* 803B40D8 003B1038 1C 00 00 28 */ mulli r0, r0, 0x28
/* 803B40DC 003B103C 7C 7F 02 14 */ add r3, r31, r0
/* 803B40E0 003B1040 93 63 00 18 */ stw r27, 0x18(r3)
/* 803B40E4 003B1044 88 1F 02 80 */ lbz r0, 0x280(r31)
/* 803B40E8 003B1048 1C 00 00 28 */ mulli r0, r0, 0x28
/* 803B40EC 003B104C 7C 7F 02 14 */ add r3, r31, r0
/* 803B40F0 003B1050 90 83 00 1C */ stw r4, 0x1c(r3)
/* 803B40F4 003B1054 88 1F 02 80 */ lbz r0, 0x280(r31)
/* 803B40F8 003B1058 1C 00 00 28 */ mulli r0, r0, 0x28
/* 803B40FC 003B105C 7C 7F 02 14 */ add r3, r31, r0
/* 803B4100 003B1060 93 83 00 20 */ stw r28, 0x20(r3)
/* 803B4104 003B1064 88 1F 02 80 */ lbz r0, 0x280(r31)
/* 803B4108 003B1068 1C 00 00 28 */ mulli r0, r0, 0x28
/* 803B410C 003B106C 7C 7F 02 14 */ add r3, r31, r0
/* 803B4110 003B1070 93 A3 00 24 */ stw r29, 0x24(r3)
/* 803B4114 003B1074 88 7F 02 80 */ lbz r3, 0x280(r31)
/* 803B4118 003B1078 88 1F 02 80 */ lbz r0, 0x280(r31)
/* 803B411C 003B107C 88 9F 02 80 */ lbz r4, 0x280(r31)
/* 803B4120 003B1080 1C 63 00 28 */ mulli r3, r3, 0x28
/* 803B4124 003B1084 88 BF 02 80 */ lbz r5, 0x280(r31)
/* 803B4128 003B1088 88 DF 02 80 */ lbz r6, 0x280(r31)
/* 803B412C 003B108C 88 FF 02 80 */ lbz r7, 0x280(r31)
/* 803B4130 003B1090 1D 40 00 28 */ mulli r10, r0, 0x28
/* 803B4134 003B1094 89 1F 02 80 */ lbz r8, 0x280(r31)
/* 803B4138 003B1098 7C 7F 1A 14 */ add r3, r31, r3
/* 803B413C 003B109C 88 1F 02 80 */ lbz r0, 0x280(r31)
/* 803B4140 003B10A0 1D 24 00 28 */ mulli r9, r4, 0x28
/* 803B4144 003B10A4 7C 9F 52 14 */ add r4, r31, r10
/* 803B4148 003B10A8 80 84 00 04 */ lwz r4, 4(r4)
/* 803B414C 003B10AC 1D 45 00 28 */ mulli r10, r5, 0x28
/* 803B4150 003B10B0 7C BF 4A 14 */ add r5, r31, r9
/* 803B4154 003B10B4 80 A5 00 08 */ lwz r5, 8(r5)
/* 803B4158 003B10B8 1D 26 00 28 */ mulli r9, r6, 0x28
/* 803B415C 003B10BC 7C DF 52 14 */ add r6, r31, r10
/* 803B4160 003B10C0 80 C6 00 0C */ lwz r6, 0xc(r6)
/* 803B4164 003B10C4 1D 47 00 28 */ mulli r10, r7, 0x28
/* 803B4168 003B10C8 7C FF 4A 14 */ add r7, r31, r9
/* 803B416C 003B10CC 80 E7 00 10 */ lwz r7, 0x10(r7)
/* 803B4170 003B10D0 1D 28 00 28 */ mulli r9, r8, 0x28
/* 803B4174 003B10D4 7D 1F 52 14 */ add r8, r31, r10
/* 803B4178 003B10D8 81 08 00 14 */ lwz r8, 0x14(r8)
/* 803B417C 003B10DC 1C 00 00 28 */ mulli r0, r0, 0x28
/* 803B4180 003B10E0 7D 3F 4A 14 */ add r9, r31, r9
/* 803B4184 003B10E4 81 29 00 18 */ lwz r9, 0x18(r9)
/* 803B4188 003B10E8 7D 5F 02 14 */ add r10, r31, r0
/* 803B418C 003B10EC 81 4A 00 1C */ lwz r10, 0x1c(r10)
/* 803B4190 003B10F0 4B FB B4 E1 */ bl ARQPostRequest
/* 803B4194 003B10F4 88 9F 02 81 */ lbz r4, 0x281(r31)
/* 803B4198 003B10F8 7F C3 F3 78 */ mr r3, r30
/* 803B419C 003B10FC 38 04 00 01 */ addi r0, r4, 1
/* 803B41A0 003B1100 98 1F 02 81 */ stb r0, 0x281(r31)
/* 803B41A4 003B1104 88 9F 02 80 */ lbz r4, 0x280(r31)
/* 803B41A8 003B1108 38 84 00 01 */ addi r4, r4, 1
/* 803B41AC 003B110C 54 80 E0 06 */ slwi r0, r4, 0x1c
/* 803B41B0 003B1110 54 84 0F FE */ srwi r4, r4, 0x1f
/* 803B41B4 003B1114 7C 04 00 50 */ subf r0, r4, r0
/* 803B41B8 003B1118 54 00 20 3E */ rotlwi r0, r0, 4
/* 803B41BC 003B111C 7C 00 22 14 */ add r0, r0, r4
/* 803B41C0 003B1120 98 1F 02 80 */ stb r0, 0x280(r31)
/* 803B41C4 003B1124 4B FC D4 C5 */ bl OSRestoreInterrupts
/* 803B41C8 003B1128 48 00 00 0C */ b lbl_803B41D4
lbl_803B41CC:
/* 803B41CC 003B112C 4B FC D4 BD */ bl OSRestoreInterrupts
/* 803B41D0 003B1130 4B FF FE 84 */ b lbl_803B4054
lbl_803B41D4:
/* 803B41D4 003B1134 39 61 00 30 */ addi r11, r1, 0x30
/* 803B41D8 003B1138 4B FD 58 E5 */ bl _restgpr_24
/* 803B41DC 003B113C 80 01 00 34 */ lwz r0, 0x34(r1)
/* 803B41E0 003B1140 7C 08 03 A6 */ mtlr r0
/* 803B41E4 003B1144 38 21 00 30 */ addi r1, r1, 0x30
/* 803B41E8 003B1148 4E 80 00 20 */ blr
.global aramSyncTransferQueue
aramSyncTransferQueue:
/* 803B41EC 003B114C 3C 60 80 56 */ lis r3, lbl_80566F90@ha
/* 803B41F0 003B1150 38 63 6F 90 */ addi r3, r3, lbl_80566F90@l
lbl_803B41F4:
/* 803B41F4 003B1154 88 03 02 81 */ lbz r0, 0x281(r3)
/* 803B41F8 003B1158 28 00 00 00 */ cmplwi r0, 0
/* 803B41FC 003B115C 40 82 FF F8 */ bne lbl_803B41F4
.global sub_803b4200
sub_803b4200:
/* 803B4200 003B1160 4E 80 00 20 */ blr
.global aramInit
aramInit:
/* 803B4204 003B1164 94 21 FF E0 */ stwu r1, -0x20(r1)
/* 803B4208 003B1168 7C 08 02 A6 */ mflr r0
/* 803B420C 003B116C 90 01 00 24 */ stw r0, 0x24(r1)
/* 803B4210 003B1170 39 61 00 20 */ addi r11, r1, 0x20
/* 803B4214 003B1174 4B FD 58 69 */ bl _savegpr_27
/* 803B4218 003B1178 7C 7B 1B 78 */ mr r27, r3
/* 803B421C 003B117C 4B FB 99 99 */ bl ARGetBaseAddress
/* 803B4220 003B1180 7C 7E 1B 78 */ mr r30, r3
/* 803B4224 003B1184 38 60 05 00 */ li r3, 0x500
/* 803B4228 003B1188 48 00 0F 0D */ bl salMalloc
/* 803B422C 003B118C 7C 7C 1B 78 */ mr r28, r3
/* 803B4230 003B1190 38 00 00 10 */ li r0, 0x10
/* 803B4234 003B1194 7F 84 E3 78 */ mr r4, r28
/* 803B4238 003B1198 38 60 00 00 */ li r3, 0
/* 803B423C 003B119C 7C 09 03 A6 */ mtctr r0
lbl_803B4240:
/* 803B4240 003B11A0 B0 64 00 00 */ sth r3, 0(r4)
/* 803B4244 003B11A4 B0 64 00 02 */ sth r3, 2(r4)
/* 803B4248 003B11A8 B0 64 00 04 */ sth r3, 4(r4)
/* 803B424C 003B11AC B0 64 00 06 */ sth r3, 6(r4)
/* 803B4250 003B11B0 B0 64 00 08 */ sth r3, 8(r4)
/* 803B4254 003B11B4 B0 64 00 0A */ sth r3, 0xa(r4)
/* 803B4258 003B11B8 B0 64 00 0C */ sth r3, 0xc(r4)
/* 803B425C 003B11BC B0 64 00 0E */ sth r3, 0xe(r4)
/* 803B4260 003B11C0 B0 64 00 10 */ sth r3, 0x10(r4)
/* 803B4264 003B11C4 B0 64 00 12 */ sth r3, 0x12(r4)
/* 803B4268 003B11C8 B0 64 00 14 */ sth r3, 0x14(r4)
/* 803B426C 003B11CC B0 64 00 16 */ sth r3, 0x16(r4)
/* 803B4270 003B11D0 B0 64 00 18 */ sth r3, 0x18(r4)
/* 803B4274 003B11D4 B0 64 00 1A */ sth r3, 0x1a(r4)
/* 803B4278 003B11D8 B0 64 00 1C */ sth r3, 0x1c(r4)
/* 803B427C 003B11DC B0 64 00 1E */ sth r3, 0x1e(r4)
/* 803B4280 003B11E0 B0 64 00 20 */ sth r3, 0x20(r4)
/* 803B4284 003B11E4 B0 64 00 22 */ sth r3, 0x22(r4)
/* 803B4288 003B11E8 B0 64 00 24 */ sth r3, 0x24(r4)
/* 803B428C 003B11EC B0 64 00 26 */ sth r3, 0x26(r4)
/* 803B4290 003B11F0 B0 64 00 28 */ sth r3, 0x28(r4)
/* 803B4294 003B11F4 B0 64 00 2A */ sth r3, 0x2a(r4)
/* 803B4298 003B11F8 B0 64 00 2C */ sth r3, 0x2c(r4)
/* 803B429C 003B11FC B0 64 00 2E */ sth r3, 0x2e(r4)
/* 803B42A0 003B1200 B0 64 00 30 */ sth r3, 0x30(r4)
/* 803B42A4 003B1204 B0 64 00 32 */ sth r3, 0x32(r4)
/* 803B42A8 003B1208 B0 64 00 34 */ sth r3, 0x34(r4)
/* 803B42AC 003B120C B0 64 00 36 */ sth r3, 0x36(r4)
/* 803B42B0 003B1210 B0 64 00 38 */ sth r3, 0x38(r4)
/* 803B42B4 003B1214 B0 64 00 3A */ sth r3, 0x3a(r4)
/* 803B42B8 003B1218 B0 64 00 3C */ sth r3, 0x3c(r4)
/* 803B42BC 003B121C B0 64 00 3E */ sth r3, 0x3e(r4)
/* 803B42C0 003B1220 B0 64 00 40 */ sth r3, 0x40(r4)
/* 803B42C4 003B1224 B0 64 00 42 */ sth r3, 0x42(r4)
/* 803B42C8 003B1228 B0 64 00 44 */ sth r3, 0x44(r4)
/* 803B42CC 003B122C B0 64 00 46 */ sth r3, 0x46(r4)
/* 803B42D0 003B1230 B0 64 00 48 */ sth r3, 0x48(r4)
/* 803B42D4 003B1234 B0 64 00 4A */ sth r3, 0x4a(r4)
/* 803B42D8 003B1238 B0 64 00 4C */ sth r3, 0x4c(r4)
/* 803B42DC 003B123C B0 64 00 4E */ sth r3, 0x4e(r4)
/* 803B42E0 003B1240 38 84 00 50 */ addi r4, r4, 0x50
/* 803B42E4 003B1244 42 00 FF 5C */ bdnz lbl_803B4240
/* 803B42E8 003B1248 7F 83 E3 78 */ mr r3, r28
/* 803B42EC 003B124C 38 80 05 00 */ li r4, 0x500
/* 803B42F0 003B1250 4B FC A7 C1 */ bl DCFlushRange
/* 803B42F4 003B1254 3C 80 80 56 */ lis r4, lbl_80566F90@ha
/* 803B42F8 003B1258 3C 60 80 56 */ lis r3, lbl_80567214@ha
/* 803B42FC 003B125C 3B E4 6F 90 */ addi r31, r4, lbl_80566F90@l
/* 803B4300 003B1260 38 00 00 00 */ li r0, 0
/* 803B4304 003B1264 98 1F 02 81 */ stb r0, 0x281(r31)
/* 803B4308 003B1268 38 63 72 14 */ addi r3, r3, lbl_80567214@l
/* 803B430C 003B126C 98 1F 02 80 */ stb r0, 0x280(r31)
/* 803B4310 003B1270 98 03 02 81 */ stb r0, 0x281(r3)
/* 803B4314 003B1274 98 03 02 80 */ stb r0, 0x280(r3)
lbl_803B4318:
/* 803B4318 003B1278 4B FC D3 49 */ bl OSDisableInterrupts
/* 803B431C 003B127C 88 1F 02 81 */ lbz r0, 0x281(r31)
/* 803B4320 003B1280 7C 7D 1B 78 */ mr r29, r3
/* 803B4324 003B1284 28 00 00 10 */ cmplwi r0, 0x10
/* 803B4328 003B1288 40 80 01 60 */ bge lbl_803B4488
/* 803B432C 003B128C 88 9F 02 80 */ lbz r4, 0x280(r31)
/* 803B4330 003B1290 3C 60 80 3B */ lis r3, aramQueueCallback@ha
/* 803B4334 003B1294 38 E0 00 2A */ li r7, 0x2a
/* 803B4338 003B1298 38 00 00 00 */ li r0, 0
/* 803B433C 003B129C 1C C4 00 28 */ mulli r6, r4, 0x28
/* 803B4340 003B12A0 38 A0 05 00 */ li r5, 0x500
/* 803B4344 003B12A4 38 83 3F 70 */ addi r4, r3, aramQueueCallback@l
/* 803B4348 003B12A8 7C 7F 32 14 */ add r3, r31, r6
/* 803B434C 003B12AC 90 E3 00 04 */ stw r7, 4(r3)
/* 803B4350 003B12B0 88 7F 02 80 */ lbz r3, 0x280(r31)
/* 803B4354 003B12B4 1C 63 00 28 */ mulli r3, r3, 0x28
/* 803B4358 003B12B8 7C 7F 1A 14 */ add r3, r31, r3
/* 803B435C 003B12BC 90 03 00 08 */ stw r0, 8(r3)
/* 803B4360 003B12C0 88 7F 02 80 */ lbz r3, 0x280(r31)
/* 803B4364 003B12C4 1C 63 00 28 */ mulli r3, r3, 0x28
/* 803B4368 003B12C8 7C 7F 1A 14 */ add r3, r31, r3
/* 803B436C 003B12CC 90 03 00 0C */ stw r0, 0xc(r3)
/* 803B4370 003B12D0 88 7F 02 80 */ lbz r3, 0x280(r31)
/* 803B4374 003B12D4 1C 63 00 28 */ mulli r3, r3, 0x28
/* 803B4378 003B12D8 7C 7F 1A 14 */ add r3, r31, r3
/* 803B437C 003B12DC 93 83 00 10 */ stw r28, 0x10(r3)
/* 803B4380 003B12E0 88 7F 02 80 */ lbz r3, 0x280(r31)
/* 803B4384 003B12E4 1C 63 00 28 */ mulli r3, r3, 0x28
/* 803B4388 003B12E8 7C 7F 1A 14 */ add r3, r31, r3
/* 803B438C 003B12EC 93 C3 00 14 */ stw r30, 0x14(r3)
/* 803B4390 003B12F0 88 7F 02 80 */ lbz r3, 0x280(r31)
/* 803B4394 003B12F4 1C 63 00 28 */ mulli r3, r3, 0x28
/* 803B4398 003B12F8 7C 7F 1A 14 */ add r3, r31, r3
/* 803B439C 003B12FC 90 A3 00 18 */ stw r5, 0x18(r3)
/* 803B43A0 003B1300 88 7F 02 80 */ lbz r3, 0x280(r31)
/* 803B43A4 003B1304 1C 63 00 28 */ mulli r3, r3, 0x28
/* 803B43A8 003B1308 7C 7F 1A 14 */ add r3, r31, r3
/* 803B43AC 003B130C 90 83 00 1C */ stw r4, 0x1c(r3)
/* 803B43B0 003B1310 88 7F 02 80 */ lbz r3, 0x280(r31)
/* 803B43B4 003B1314 1C 63 00 28 */ mulli r3, r3, 0x28
/* 803B43B8 003B1318 7C 7F 1A 14 */ add r3, r31, r3
/* 803B43BC 003B131C 90 03 00 20 */ stw r0, 0x20(r3)
/* 803B43C0 003B1320 88 7F 02 80 */ lbz r3, 0x280(r31)
/* 803B43C4 003B1324 1C 63 00 28 */ mulli r3, r3, 0x28
/* 803B43C8 003B1328 7C 7F 1A 14 */ add r3, r31, r3
/* 803B43CC 003B132C 90 03 00 24 */ stw r0, 0x24(r3)
/* 803B43D0 003B1330 88 7F 02 80 */ lbz r3, 0x280(r31)
/* 803B43D4 003B1334 88 1F 02 80 */ lbz r0, 0x280(r31)
/* 803B43D8 003B1338 88 9F 02 80 */ lbz r4, 0x280(r31)
/* 803B43DC 003B133C 1C 63 00 28 */ mulli r3, r3, 0x28
/* 803B43E0 003B1340 88 BF 02 80 */ lbz r5, 0x280(r31)
/* 803B43E4 003B1344 88 DF 02 80 */ lbz r6, 0x280(r31)
/* 803B43E8 003B1348 88 FF 02 80 */ lbz r7, 0x280(r31)
/* 803B43EC 003B134C 1D 40 00 28 */ mulli r10, r0, 0x28
/* 803B43F0 003B1350 89 1F 02 80 */ lbz r8, 0x280(r31)
/* 803B43F4 003B1354 7C 7F 1A 14 */ add r3, r31, r3
/* 803B43F8 003B1358 88 1F 02 80 */ lbz r0, 0x280(r31)
/* 803B43FC 003B135C 1D 24 00 28 */ mulli r9, r4, 0x28
/* 803B4400 003B1360 7C 9F 52 14 */ add r4, r31, r10
/* 803B4404 003B1364 80 84 00 04 */ lwz r4, 4(r4)
/* 803B4408 003B1368 1D 45 00 28 */ mulli r10, r5, 0x28
/* 803B440C 003B136C 7C BF 4A 14 */ add r5, r31, r9
/* 803B4410 003B1370 80 A5 00 08 */ lwz r5, 8(r5)
/* 803B4414 003B1374 1D 26 00 28 */ mulli r9, r6, 0x28
/* 803B4418 003B1378 7C DF 52 14 */ add r6, r31, r10
/* 803B441C 003B137C 80 C6 00 0C */ lwz r6, 0xc(r6)
/* 803B4420 003B1380 1D 47 00 28 */ mulli r10, r7, 0x28
/* 803B4424 003B1384 7C FF 4A 14 */ add r7, r31, r9
/* 803B4428 003B1388 80 E7 00 10 */ lwz r7, 0x10(r7)
/* 803B442C 003B138C 1D 28 00 28 */ mulli r9, r8, 0x28
/* 803B4430 003B1390 7D 1F 52 14 */ add r8, r31, r10
/* 803B4434 003B1394 81 08 00 14 */ lwz r8, 0x14(r8)
/* 803B4438 003B1398 1C 00 00 28 */ mulli r0, r0, 0x28
/* 803B443C 003B139C 7D 3F 4A 14 */ add r9, r31, r9
/* 803B4440 003B13A0 81 29 00 18 */ lwz r9, 0x18(r9)
/* 803B4444 003B13A4 7D 5F 02 14 */ add r10, r31, r0
/* 803B4448 003B13A8 81 4A 00 1C */ lwz r10, 0x1c(r10)
/* 803B444C 003B13AC 4B FB B2 25 */ bl ARQPostRequest
/* 803B4450 003B13B0 88 9F 02 81 */ lbz r4, 0x281(r31)
/* 803B4454 003B13B4 7F A3 EB 78 */ mr r3, r29
/* 803B4458 003B13B8 38 04 00 01 */ addi r0, r4, 1
/* 803B445C 003B13BC 98 1F 02 81 */ stb r0, 0x281(r31)
/* 803B4460 003B13C0 88 9F 02 80 */ lbz r4, 0x280(r31)
/* 803B4464 003B13C4 38 84 00 01 */ addi r4, r4, 1
/* 803B4468 003B13C8 54 80 E0 06 */ slwi r0, r4, 0x1c
/* 803B446C 003B13CC 54 84 0F FE */ srwi r4, r4, 0x1f
/* 803B4470 003B13D0 7C 04 00 50 */ subf r0, r4, r0
/* 803B4474 003B13D4 54 00 20 3E */ rotlwi r0, r0, 4
/* 803B4478 003B13D8 7C 00 22 14 */ add r0, r0, r4
/* 803B447C 003B13DC 98 1F 02 80 */ stb r0, 0x280(r31)
/* 803B4480 003B13E0 4B FC D2 09 */ bl OSRestoreInterrupts
/* 803B4484 003B13E4 48 00 00 0C */ b lbl_803B4490
lbl_803B4488:
/* 803B4488 003B13E8 4B FC D2 01 */ bl OSRestoreInterrupts
/* 803B448C 003B13EC 4B FF FE 8C */ b lbl_803B4318
lbl_803B4490:
/* 803B4490 003B13F0 88 1F 02 81 */ lbz r0, 0x281(r31)
/* 803B4494 003B13F4 28 00 00 00 */ cmplwi r0, 0
/* 803B4498 003B13F8 40 82 FF F8 */ bne lbl_803B4490
/* 803B449C 003B13FC 7F 83 E3 78 */ mr r3, r28
/* 803B44A0 003B1400 48 00 0C BD */ bl salFree
/* 803B44A4 003B1404 7C 1E DA 14 */ add r0, r30, r27
/* 803B44A8 003B1408 90 0D AF AC */ stw r0, aramTop@sda21(r13)
/* 803B44AC 003B140C 4B FB 97 11 */ bl ARGetSize
/* 803B44B0 003B1410 80 0D AF AC */ lwz r0, aramTop@sda21(r13)
/* 803B44B4 003B1414 7C 00 18 40 */ cmplw r0, r3
/* 803B44B8 003B1418 40 81 00 0C */ ble lbl_803B44C4
/* 803B44BC 003B141C 4B FB 97 01 */ bl ARGetSize
/* 803B44C0 003B1420 90 6D AF AC */ stw r3, aramTop@sda21(r13)
lbl_803B44C4:
/* 803B44C4 003B1424 38 7E 05 00 */ addi r3, r30, 0x500
/* 803B44C8 003B1428 38 00 00 00 */ li r0, 0
/* 803B44CC 003B142C 90 6D AF A8 */ stw r3, aramWrite@sda21(r13)
/* 803B44D0 003B1430 90 0D AF A0 */ stw r0, aramUploadCallback@sda21(r13)
/* 803B44D4 003B1434 48 00 04 6D */ bl InitStreamBuffers
/* 803B44D8 003B1438 39 61 00 20 */ addi r11, r1, 0x20
/* 803B44DC 003B143C 4B FD 55 ED */ bl _restgpr_27
/* 803B44E0 003B1440 80 01 00 24 */ lwz r0, 0x24(r1)
/* 803B44E4 003B1444 7C 08 03 A6 */ mtlr r0
/* 803B44E8 003B1448 38 21 00 20 */ addi r1, r1, 0x20
/* 803B44EC 003B144C 4E 80 00 20 */ blr
.global aramExit
aramExit:
/* 803B44F0 003B1450 4E 80 00 20 */ blr
.global aramGetZeroBuffer
aramGetZeroBuffer:
/* 803B44F4 003B1454 94 21 FF F0 */ stwu r1, -0x10(r1)
/* 803B44F8 003B1458 7C 08 02 A6 */ mflr r0
/* 803B44FC 003B145C 90 01 00 14 */ stw r0, 0x14(r1)
/* 803B4500 003B1460 4B FB 96 B5 */ bl ARGetBaseAddress
/* 803B4504 003B1464 80 01 00 14 */ lwz r0, 0x14(r1)
/* 803B4508 003B1468 7C 08 03 A6 */ mtlr r0
/* 803B450C 003B146C 38 21 00 10 */ addi r1, r1, 0x10
/* 803B4510 003B1470 4E 80 00 20 */ blr
.global aramSetUploadCallback
aramSetUploadCallback:
/* 803B4514 003B1474 94 21 FF F0 */ stwu r1, -0x10(r1)
/* 803B4518 003B1478 7C 08 02 A6 */ mflr r0
/* 803B451C 003B147C 90 01 00 14 */ stw r0, 0x14(r1)
/* 803B4520 003B1480 93 E1 00 0C */ stw r31, 0xc(r1)
/* 803B4524 003B1484 93 C1 00 08 */ stw r30, 8(r1)
/* 803B4528 003B1488 7C 7E 1B 79 */ or. r30, r3, r3
/* 803B452C 003B148C 41 82 00 24 */ beq lbl_803B4550
/* 803B4530 003B1490 38 04 00 1F */ addi r0, r4, 0x1f
/* 803B4534 003B1494 54 1F 00 34 */ rlwinm r31, r0, 0, 0, 0x1a
/* 803B4538 003B1498 4B FB B2 95 */ bl sub_8036f7cc
/* 803B453C 003B149C 7C 1F 18 40 */ cmplw r31, r3
/* 803B4540 003B14A0 7F E0 FB 78 */ mr r0, r31
/* 803B4544 003B14A4 40 80 00 08 */ bge lbl_803B454C
/* 803B4548 003B14A8 7C 60 1B 78 */ mr r0, r3
lbl_803B454C:
/* 803B454C 003B14AC 90 0D AF 9C */ stw r0, aramUploadChunkSize@sda21(r13)
lbl_803B4550:
/* 803B4550 003B14B0 93 CD AF A0 */ stw r30, aramUploadCallback@sda21(r13)
/* 803B4554 003B14B4 80 01 00 14 */ lwz r0, 0x14(r1)
/* 803B4558 003B14B8 83 E1 00 0C */ lwz r31, 0xc(r1)
/* 803B455C 003B14BC 83 C1 00 08 */ lwz r30, 8(r1)
/* 803B4560 003B14C0 7C 08 03 A6 */ mtlr r0
/* 803B4564 003B14C4 38 21 00 10 */ addi r1, r1, 0x10
/* 803B4568 003B14C8 4E 80 00 20 */ blr
.global sub_803b456c
sub_803b456c:
/* 803B456C 003B14CC 94 21 FF D0 */ stwu r1, -0x30(r1)
/* 803B4570 003B14D0 7C 08 02 A6 */ mflr r0
/* 803B4574 003B14D4 90 01 00 34 */ stw r0, 0x34(r1)
/* 803B4578 003B14D8 39 61 00 30 */ addi r11, r1, 0x30
/* 803B457C 003B14DC 4B FD 54 F1 */ bl func_80389A6C
/* 803B4580 003B14E0 80 0D AF A0 */ lwz r0, aramUploadCallback@sda21(r13)
/* 803B4584 003B14E4 38 84 00 1F */ addi r4, r4, 0x1f
/* 803B4588 003B14E8 83 0D AF A8 */ lwz r24, aramWrite@sda21(r13)
/* 803B458C 003B14EC 7C 79 1B 78 */ mr r25, r3
/* 803B4590 003B14F0 28 00 00 00 */ cmplwi r0, 0
/* 803B4594 003B14F4 54 97 00 34 */ rlwinm r23, r4, 0, 0, 0x1a
/* 803B4598 003B14F8 40 82 01 A0 */ bne lbl_803B4738
/* 803B459C 003B14FC 7E E4 BB 78 */ mr r4, r23
/* 803B45A0 003B1500 4B FC A5 11 */ bl DCFlushRange
/* 803B45A4 003B1504 3C 60 80 56 */ lis r3, lbl_80566F90@ha
/* 803B45A8 003B1508 83 CD AF A8 */ lwz r30, aramWrite@sda21(r13)
/* 803B45AC 003B150C 3B 83 6F 90 */ addi r28, r3, lbl_80566F90@l
lbl_803B45B0:
/* 803B45B0 003B1510 4B FC D0 B1 */ bl OSDisableInterrupts
/* 803B45B4 003B1514 88 1C 02 81 */ lbz r0, 0x281(r28)
/* 803B45B8 003B1518 7C 7D 1B 78 */ mr r29, r3
/* 803B45BC 003B151C 28 00 00 10 */ cmplwi r0, 0x10
/* 803B45C0 003B1520 40 80 01 5C */ bge lbl_803B471C
/* 803B45C4 003B1524 88 9C 02 80 */ lbz r4, 0x280(r28)
/* 803B45C8 003B1528 3C 60 80 3B */ lis r3, aramQueueCallback@ha
/* 803B45CC 003B152C 38 C0 00 2A */ li r6, 0x2a
/* 803B45D0 003B1530 38 00 00 00 */ li r0, 0
/* 803B45D4 003B1534 1C A4 00 28 */ mulli r5, r4, 0x28
/* 803B45D8 003B1538 38 83 3F 70 */ addi r4, r3, aramQueueCallback@l
/* 803B45DC 003B153C 7C 7C 2A 14 */ add r3, r28, r5
/* 803B45E0 003B1540 90 C3 00 04 */ stw r6, 4(r3)
/* 803B45E4 003B1544 88 7C 02 80 */ lbz r3, 0x280(r28)
/* 803B45E8 003B1548 1C 63 00 28 */ mulli r3, r3, 0x28
/* 803B45EC 003B154C 7C 7C 1A 14 */ add r3, r28, r3
/* 803B45F0 003B1550 90 03 00 08 */ stw r0, 8(r3)
/* 803B45F4 003B1554 88 7C 02 80 */ lbz r3, 0x280(r28)
/* 803B45F8 003B1558 1C 63 00 28 */ mulli r3, r3, 0x28
/* 803B45FC 003B155C 7C 7C 1A 14 */ add r3, r28, r3
/* 803B4600 003B1560 90 03 00 0C */ stw r0, 0xc(r3)
/* 803B4604 003B1564 88 7C 02 80 */ lbz r3, 0x280(r28)
/* 803B4608 003B1568 1C 63 00 28 */ mulli r3, r3, 0x28
/* 803B460C 003B156C 7C 7C 1A 14 */ add r3, r28, r3
/* 803B4610 003B1570 93 23 00 10 */ stw r25, 0x10(r3)
/* 803B4614 003B1574 88 7C 02 80 */ lbz r3, 0x280(r28)
/* 803B4618 003B1578 1C 63 00 28 */ mulli r3, r3, 0x28
/* 803B461C 003B157C 7C 7C 1A 14 */ add r3, r28, r3
/* 803B4620 003B1580 93 C3 00 14 */ stw r30, 0x14(r3)
/* 803B4624 003B1584 88 7C 02 80 */ lbz r3, 0x280(r28)
/* 803B4628 003B1588 1C 63 00 28 */ mulli r3, r3, 0x28
/* 803B462C 003B158C 7C 7C 1A 14 */ add r3, r28, r3
/* 803B4630 003B1590 92 E3 00 18 */ stw r23, 0x18(r3)
/* 803B4634 003B1594 88 7C 02 80 */ lbz r3, 0x280(r28)
/* 803B4638 003B1598 1C 63 00 28 */ mulli r3, r3, 0x28
/* 803B463C 003B159C 7C 7C 1A 14 */ add r3, r28, r3
/* 803B4640 003B15A0 90 83 00 1C */ stw r4, 0x1c(r3)
/* 803B4644 003B15A4 88 7C 02 80 */ lbz r3, 0x280(r28)
/* 803B4648 003B15A8 1C 63 00 28 */ mulli r3, r3, 0x28
/* 803B464C 003B15AC 7C 7C 1A 14 */ add r3, r28, r3
/* 803B4650 003B15B0 90 03 00 20 */ stw r0, 0x20(r3)
/* 803B4654 003B15B4 88 7C 02 80 */ lbz r3, 0x280(r28)
/* 803B4658 003B15B8 1C 63 00 28 */ mulli r3, r3, 0x28
/* 803B465C 003B15BC 7C 7C 1A 14 */ add r3, r28, r3
/* 803B4660 003B15C0 90 03 00 24 */ stw r0, 0x24(r3)
/* 803B4664 003B15C4 88 7C 02 80 */ lbz r3, 0x280(r28)
/* 803B4668 003B15C8 88 1C 02 80 */ lbz r0, 0x280(r28)
/* 803B466C 003B15CC 88 9C 02 80 */ lbz r4, 0x280(r28)
/* 803B4670 003B15D0 1C 63 00 28 */ mulli r3, r3, 0x28
/* 803B4674 003B15D4 88 BC 02 80 */ lbz r5, 0x280(r28)
/* 803B4678 003B15D8 88 DC 02 80 */ lbz r6, 0x280(r28)
/* 803B467C 003B15DC 88 FC 02 80 */ lbz r7, 0x280(r28)
/* 803B4680 003B15E0 1D 40 00 28 */ mulli r10, r0, 0x28
/* 803B4684 003B15E4 89 1C 02 80 */ lbz r8, 0x280(r28)
/* 803B4688 003B15E8 7C 7C 1A 14 */ add r3, r28, r3
/* 803B468C 003B15EC 88 1C 02 80 */ lbz r0, 0x280(r28)
/* 803B4690 003B15F0 1D 24 00 28 */ mulli r9, r4, 0x28
/* 803B4694 003B15F4 7C 9C 52 14 */ add r4, r28, r10
/* 803B4698 003B15F8 80 84 00 04 */ lwz r4, 4(r4)
/* 803B469C 003B15FC 1D 45 00 28 */ mulli r10, r5, 0x28
/* 803B46A0 003B1600 7C BC 4A 14 */ add r5, r28, r9
/* 803B46A4 003B1604 80 A5 00 08 */ lwz r5, 8(r5)
/* 803B46A8 003B1608 1D 26 00 28 */ mulli r9, r6, 0x28
/* 803B46AC 003B160C 7C DC 52 14 */ add r6, r28, r10
/* 803B46B0 003B1610 80 C6 00 0C */ lwz r6, 0xc(r6)
/* 803B46B4 003B1614 1D 47 00 28 */ mulli r10, r7, 0x28
/* 803B46B8 003B1618 7C FC 4A 14 */ add r7, r28, r9
/* 803B46BC 003B161C 80 E7 00 10 */ lwz r7, 0x10(r7)
/* 803B46C0 003B1620 1D 28 00 28 */ mulli r9, r8, 0x28
/* 803B46C4 003B1624 7D 1C 52 14 */ add r8, r28, r10
/* 803B46C8 003B1628 81 08 00 14 */ lwz r8, 0x14(r8)
/* 803B46CC 003B162C 1C 00 00 28 */ mulli r0, r0, 0x28
/* 803B46D0 003B1630 7D 3C 4A 14 */ add r9, r28, r9
/* 803B46D4 003B1634 81 29 00 18 */ lwz r9, 0x18(r9)
/* 803B46D8 003B1638 7D 5C 02 14 */ add r10, r28, r0
/* 803B46DC 003B163C 81 4A 00 1C */ lwz r10, 0x1c(r10)
/* 803B46E0 003B1640 4B FB AF 91 */ bl ARQPostRequest
/* 803B46E4 003B1644 88 9C 02 81 */ lbz r4, 0x281(r28)
/* 803B46E8 003B1648 7F A3 EB 78 */ mr r3, r29
/* 803B46EC 003B164C 38 04 00 01 */ addi r0, r4, 1
/* 803B46F0 003B1650 98 1C 02 81 */ stb r0, 0x281(r28)
/* 803B46F4 003B1654 88 9C 02 80 */ lbz r4, 0x280(r28)
/* 803B46F8 003B1658 38 84 00 01 */ addi r4, r4, 1
/* 803B46FC 003B165C 54 80 E0 06 */ slwi r0, r4, 0x1c
/* 803B4700 003B1660 54 84 0F FE */ srwi r4, r4, 0x1f
/* 803B4704 003B1664 7C 04 00 50 */ subf r0, r4, r0
/* 803B4708 003B1668 54 00 20 3E */ rotlwi r0, r0, 4
/* 803B470C 003B166C 7C 00 22 14 */ add r0, r0, r4
/* 803B4710 003B1670 98 1C 02 80 */ stb r0, 0x280(r28)
/* 803B4714 003B1674 4B FC CF 75 */ bl OSRestoreInterrupts
/* 803B4718 003B1678 48 00 00 0C */ b lbl_803B4724
lbl_803B471C:
/* 803B471C 003B167C 4B FC CF 6D */ bl OSRestoreInterrupts
/* 803B4720 003B1680 4B FF FE 90 */ b lbl_803B45B0
lbl_803B4724:
/* 803B4724 003B1684 80 0D AF A8 */ lwz r0, aramWrite@sda21(r13)
/* 803B4728 003B1688 7F 03 C3 78 */ mr r3, r24
/* 803B472C 003B168C 7C 00 BA 14 */ add r0, r0, r23
/* 803B4730 003B1690 90 0D AF A8 */ stw r0, aramWrite@sda21(r13)
/* 803B4734 003B1694 48 00 01 DC */ b lbl_803B4910
lbl_803B4738:
/* 803B4738 003B1698 3C 80 80 56 */ lis r4, lbl_80566F90@ha
/* 803B473C 003B169C 3C 60 80 3B */ lis r3, aramQueueCallback@ha
/* 803B4740 003B16A0 3B C4 6F 90 */ addi r30, r4, lbl_80566F90@l
/* 803B4744 003B16A4 3B E3 3F 70 */ addi r31, r3, aramQueueCallback@l
/* 803B4748 003B16A8 48 00 01 BC */ b lbl_803B4904
lbl_803B474C:
/* 803B474C 003B16AC 80 0D AF 9C */ lwz r0, aramUploadChunkSize@sda21(r13)
/* 803B4750 003B16B0 7E FC BB 78 */ mr r28, r23
/* 803B4754 003B16B4 7C 17 00 40 */ cmplw r23, r0
/* 803B4758 003B16B8 41 80 00 08 */ blt lbl_803B4760
/* 803B475C 003B16BC 7C 1C 03 78 */ mr r28, r0
lbl_803B4760:
/* 803B4760 003B16C0 81 8D AF A0 */ lwz r12, aramUploadCallback@sda21(r13)
/* 803B4764 003B16C4 7F 23 CB 78 */ mr r3, r25
/* 803B4768 003B16C8 7F 84 E3 78 */ mr r4, r28
/* 803B476C 003B16CC 7D 89 03 A6 */ mtctr r12
/* 803B4770 003B16D0 4E 80 04 21 */ bctrl
/* 803B4774 003B16D4 7C 7D 1B 78 */ mr r29, r3
/* 803B4778 003B16D8 7F 84 E3 78 */ mr r4, r28
/* 803B477C 003B16DC 4B FC A3 35 */ bl DCFlushRange
/* 803B4780 003B16E0 83 4D AF A8 */ lwz r26, aramWrite@sda21(r13)
lbl_803B4784:
/* 803B4784 003B16E4 4B FC CE DD */ bl OSDisableInterrupts
/* 803B4788 003B16E8 88 1E 02 81 */ lbz r0, 0x281(r30)
/* 803B478C 003B16EC 7C 7B 1B 78 */ mr r27, r3
/* 803B4790 003B16F0 28 00 00 10 */ cmplwi r0, 0x10
/* 803B4794 003B16F4 40 80 01 54 */ bge lbl_803B48E8
/* 803B4798 003B16F8 88 7E 02 80 */ lbz r3, 0x280(r30)
/* 803B479C 003B16FC 38 80 00 2A */ li r4, 0x2a
/* 803B47A0 003B1700 38 00 00 00 */ li r0, 0
/* 803B47A4 003B1704 1C 63 00 28 */ mulli r3, r3, 0x28
/* 803B47A8 003B1708 38 63 00 04 */ addi r3, r3, 4
/* 803B47AC 003B170C 7C 9E 19 2E */ stwx r4, r30, r3
/* 803B47B0 003B1710 88 7E 02 80 */ lbz r3, 0x280(r30)
/* 803B47B4 003B1714 1C 63 00 28 */ mulli r3, r3, 0x28
/* 803B47B8 003B1718 38 63 00 08 */ addi r3, r3, 8
/* 803B47BC 003B171C 7C 1E 19 2E */ stwx r0, r30, r3
/* 803B47C0 003B1720 88 7E 02 80 */ lbz r3, 0x280(r30)
/* 803B47C4 003B1724 1C 63 00 28 */ mulli r3, r3, 0x28
/* 803B47C8 003B1728 38 63 00 0C */ addi r3, r3, 0xc
/* 803B47CC 003B172C 7C 1E 19 2E */ stwx r0, r30, r3
/* 803B47D0 003B1730 88 7E 02 80 */ lbz r3, 0x280(r30)
/* 803B47D4 003B1734 1C 63 00 28 */ mulli r3, r3, 0x28
/* 803B47D8 003B1738 38 63 00 10 */ addi r3, r3, 0x10
/* 803B47DC 003B173C 7F BE 19 2E */ stwx r29, r30, r3
/* 803B47E0 003B1740 88 7E 02 80 */ lbz r3, 0x280(r30)
/* 803B47E4 003B1744 1C 63 00 28 */ mulli r3, r3, 0x28
/* 803B47E8 003B1748 38 63 00 14 */ addi r3, r3, 0x14
/* 803B47EC 003B174C 7F 5E 19 2E */ stwx r26, r30, r3
/* 803B47F0 003B1750 88 7E 02 80 */ lbz r3, 0x280(r30)
/* 803B47F4 003B1754 1C 63 00 28 */ mulli r3, r3, 0x28
/* 803B47F8 003B1758 38 63 00 18 */ addi r3, r3, 0x18
/* 803B47FC 003B175C 7F 9E 19 2E */ stwx r28, r30, r3
/* 803B4800 003B1760 88 7E 02 80 */ lbz r3, 0x280(r30)
/* 803B4804 003B1764 1C 63 00 28 */ mulli r3, r3, 0x28
/* 803B4808 003B1768 38 63 00 1C */ addi r3, r3, 0x1c
/* 803B480C 003B176C 7F FE 19 2E */ stwx r31, r30, r3
/* 803B4810 003B1770 88 7E 02 80 */ lbz r3, 0x280(r30)
/* 803B4814 003B1774 1C 63 00 28 */ mulli r3, r3, 0x28
/* 803B4818 003B1778 38 63 00 20 */ addi r3, r3, 0x20
/* 803B481C 003B177C 7C 1E 19 2E */ stwx r0, r30, r3
/* 803B4820 003B1780 88 7E 02 80 */ lbz r3, 0x280(r30)
/* 803B4824 003B1784 1C 63 00 28 */ mulli r3, r3, 0x28
/* 803B4828 003B1788 38 63 00 24 */ addi r3, r3, 0x24
/* 803B482C 003B178C 7C 1E 19 2E */ stwx r0, r30, r3
/* 803B4830 003B1790 88 7E 02 80 */ lbz r3, 0x280(r30)
/* 803B4834 003B1794 88 1E 02 80 */ lbz r0, 0x280(r30)
/* 803B4838 003B1798 88 9E 02 80 */ lbz r4, 0x280(r30)
/* 803B483C 003B179C 1C 63 00 28 */ mulli r3, r3, 0x28
/* 803B4840 003B17A0 88 BE 02 80 */ lbz r5, 0x280(r30)
/* 803B4844 003B17A4 88 DE 02 80 */ lbz r6, 0x280(r30)
/* 803B4848 003B17A8 88 FE 02 80 */ lbz r7, 0x280(r30)
/* 803B484C 003B17AC 1D 40 00 28 */ mulli r10, r0, 0x28
/* 803B4850 003B17B0 89 1E 02 80 */ lbz r8, 0x280(r30)
/* 803B4854 003B17B4 7C 7E 1A 14 */ add r3, r30, r3
/* 803B4858 003B17B8 88 1E 02 80 */ lbz r0, 0x280(r30)
/* 803B485C 003B17BC 1D 24 00 28 */ mulli r9, r4, 0x28
/* 803B4860 003B17C0 38 8A 00 04 */ addi r4, r10, 4
/* 803B4864 003B17C4 7C 9E 20 2E */ lwzx r4, r30, r4
/* 803B4868 003B17C8 1D 45 00 28 */ mulli r10, r5, 0x28
/* 803B486C 003B17CC 38 A9 00 08 */ addi r5, r9, 8
/* 803B4870 003B17D0 7C BE 28 2E */ lwzx r5, r30, r5
/* 803B4874 003B17D4 1D 26 00 28 */ mulli r9, r6, 0x28
/* 803B4878 003B17D8 38 CA 00 0C */ addi r6, r10, 0xc
/* 803B487C 003B17DC 7C DE 30 2E */ lwzx r6, r30, r6
/* 803B4880 003B17E0 1D 47 00 28 */ mulli r10, r7, 0x28
/* 803B4884 003B17E4 38 E9 00 10 */ addi r7, r9, 0x10
/* 803B4888 003B17E8 7C FE 38 2E */ lwzx r7, r30, r7
/* 803B488C 003B17EC 1D 28 00 28 */ mulli r9, r8, 0x28
/* 803B4890 003B17F0 39 0A 00 14 */ addi r8, r10, 0x14
/* 803B4894 003B17F4 7D 1E 40 2E */ lwzx r8, r30, r8
/* 803B4898 003B17F8 1D 40 00 28 */ mulli r10, r0, 0x28
/* 803B489C 003B17FC 38 09 00 18 */ addi r0, r9, 0x18
/* 803B48A0 003B1800 7D 3E 00 2E */ lwzx r9, r30, r0
/* 803B48A4 003B1804 38 0A 00 1C */ addi r0, r10, 0x1c
/* 803B48A8 003B1808 7D 5E 00 2E */ lwzx r10, r30, r0
/* 803B48AC 003B180C 4B FB AD C5 */ bl ARQPostRequest
/* 803B48B0 003B1810 88 9E 02 81 */ lbz r4, 0x281(r30)
/* 803B48B4 003B1814 7F 63 DB 78 */ mr r3, r27
/* 803B48B8 003B1818 38 04 00 01 */ addi r0, r4, 1
/* 803B48BC 003B181C 98 1E 02 81 */ stb r0, 0x281(r30)
/* 803B48C0 003B1820 88 9E 02 80 */ lbz r4, 0x280(r30)
/* 803B48C4 003B1824 38 84 00 01 */ addi r4, r4, 1
/* 803B48C8 003B1828 54 80 E0 06 */ slwi r0, r4, 0x1c
/* 803B48CC 003B182C 54 84 0F FE */ srwi r4, r4, 0x1f
/* 803B48D0 003B1830 7C 04 00 50 */ subf r0, r4, r0
/* 803B48D4 003B1834 54 00 20 3E */ rotlwi r0, r0, 4
/* 803B48D8 003B1838 7C 00 22 14 */ add r0, r0, r4
/* 803B48DC 003B183C 98 1E 02 80 */ stb r0, 0x280(r30)
/* 803B48E0 003B1840 4B FC CD A9 */ bl OSRestoreInterrupts
/* 803B48E4 003B1844 48 00 00 0C */ b lbl_803B48F0
lbl_803B48E8:
/* 803B48E8 003B1848 4B FC CD A1 */ bl OSRestoreInterrupts
/* 803B48EC 003B184C 4B FF FE 98 */ b lbl_803B4784
lbl_803B48F0:
/* 803B48F0 003B1850 80 0D AF A8 */ lwz r0, aramWrite@sda21(r13)
/* 803B48F4 003B1854 7E FC B8 50 */ subf r23, r28, r23
/* 803B48F8 003B1858 7F 39 E2 14 */ add r25, r25, r28
/* 803B48FC 003B185C 7C 00 E2 14 */ add r0, r0, r28
/* 803B4900 003B1860 90 0D AF A8 */ stw r0, aramWrite@sda21(r13)
lbl_803B4904:
/* 803B4904 003B1864 28 17 00 00 */ cmplwi r23, 0
/* 803B4908 003B1868 40 82 FE 44 */ bne lbl_803B474C
/* 803B490C 003B186C 7F 03 C3 78 */ mr r3, r24
lbl_803B4910:
/* 803B4910 003B1870 39 61 00 30 */ addi r11, r1, 0x30
/* 803B4914 003B1874 4B FD 51 A5 */ bl _restgpr_23
/* 803B4918 003B1878 80 01 00 34 */ lwz r0, 0x34(r1)
/* 803B491C 003B187C 7C 08 03 A6 */ mtlr r0
/* 803B4920 003B1880 38 21 00 30 */ addi r1, r1, 0x30
/* 803B4924 003B1884 4E 80 00 20 */ blr
.global sub_803b4928
sub_803b4928:
/* 803B4928 003B1888 38 64 00 1F */ addi r3, r4, 0x1f
/* 803B492C 003B188C 80 0D AF A8 */ lwz r0, aramWrite@sda21(r13)
/* 803B4930 003B1890 54 63 00 34 */ rlwinm r3, r3, 0, 0, 0x1a
/* 803B4934 003B1894 7C 03 00 50 */ subf r0, r3, r0
/* 803B4938 003B1898 90 0D AF A8 */ stw r0, aramWrite@sda21(r13)
/* 803B493C 003B189C 4E 80 00 20 */ blr
.global InitStreamBuffers
InitStreamBuffers:
/* 803B4940 003B18A0 3C 60 80 56 */ lis r3, lbl_80567498@ha
/* 803B4944 003B18A4 38 80 00 00 */ li r4, 0
/* 803B4948 003B18A8 38 63 74 98 */ addi r3, r3, lbl_80567498@l
/* 803B494C 003B18AC 38 00 00 07 */ li r0, 7
/* 803B4950 003B18B0 90 8D AF 98 */ stw r4, aramUsedStreamBuffers@sda21(r13)
/* 803B4954 003B18B4 38 E3 00 10 */ addi r7, r3, 0x10
/* 803B4958 003B18B8 39 00 00 01 */ li r8, 1
/* 803B495C 003B18BC 90 8D AF 94 */ stw r4, aramFreeStreamBuffers@sda21(r13)
/* 803B4960 003B18C0 90 6D AF 90 */ stw r3, aramIdleStreamBuffers@sda21(r13)
/* 803B4964 003B18C4 7C 09 03 A6 */ mtctr r0
lbl_803B4968:
/* 803B4968 003B18C8 90 E7 FF F0 */ stw r7, -0x10(r7)
/* 803B496C 003B18CC 38 67 00 10 */ addi r3, r7, 0x10
/* 803B4970 003B18D0 38 07 00 20 */ addi r0, r7, 0x20
/* 803B4974 003B18D4 38 C7 00 30 */ addi r6, r7, 0x30
/* 803B4978 003B18D8 90 67 00 00 */ stw r3, 0(r7)
/* 803B497C 003B18DC 38 A7 00 40 */ addi r5, r7, 0x40
/* 803B4980 003B18E0 38 87 00 50 */ addi r4, r7, 0x50
/* 803B4984 003B18E4 38 67 00 60 */ addi r3, r7, 0x60
/* 803B4988 003B18E8 90 07 00 10 */ stw r0, 0x10(r7)
/* 803B498C 003B18EC 38 07 00 70 */ addi r0, r7, 0x70
/* 803B4990 003B18F0 39 08 00 08 */ addi r8, r8, 8
/* 803B4994 003B18F4 90 C7 00 20 */ stw r6, 0x20(r7)
/* 803B4998 003B18F8 90 A7 00 30 */ stw r5, 0x30(r7)
/* 803B499C 003B18FC 90 87 00 40 */ stw r4, 0x40(r7)
/* 803B49A0 003B1900 90 67 00 50 */ stw r3, 0x50(r7)
/* 803B49A4 003B1904 90 07 00 60 */ stw r0, 0x60(r7)
/* 803B49A8 003B1908 38 E7 00 80 */ addi r7, r7, 0x80
/* 803B49AC 003B190C 42 00 FF BC */ bdnz lbl_803B4968
/* 803B49B0 003B1910 3C 60 80 56 */ lis r3, lbl_80567498@ha
/* 803B49B4 003B1914 55 04 20 36 */ slwi r4, r8, 4
/* 803B49B8 003B1918 38 63 74 98 */ addi r3, r3, lbl_80567498@l
/* 803B49BC 003B191C 20 08 00 40 */ subfic r0, r8, 0x40
/* 803B49C0 003B1920 7C 63 22 14 */ add r3, r3, r4
/* 803B49C4 003B1924 7C 09 03 A6 */ mtctr r0
/* 803B49C8 003B1928 28 08 00 40 */ cmplwi r8, 0x40
/* 803B49CC 003B192C 40 80 00 14 */ bge lbl_803B49E0
lbl_803B49D0:
/* 803B49D0 003B1930 90 63 FF F0 */ stw r3, -0x10(r3)
/* 803B49D4 003B1934 38 63 00 10 */ addi r3, r3, 0x10
/* 803B49D8 003B1938 39 08 00 01 */ addi r8, r8, 1
/* 803B49DC 003B193C 42 00 FF F4 */ bdnz lbl_803B49D0
lbl_803B49E0:
/* 803B49E0 003B1940 3C 60 80 56 */ lis r3, lbl_80567498@ha
/* 803B49E4 003B1944 80 0D AF AC */ lwz r0, aramTop@sda21(r13)
/* 803B49E8 003B1948 38 83 74 98 */ addi r4, r3, lbl_80567498@l
/* 803B49EC 003B194C 55 03 20 36 */ slwi r3, r8, 4
/* 803B49F0 003B1950 7C 64 1A 14 */ add r3, r4, r3
/* 803B49F4 003B1954 38 80 00 00 */ li r4, 0
/* 803B49F8 003B1958 90 83 FF F0 */ stw r4, -0x10(r3)
/* 803B49FC 003B195C 90 0D AF A4 */ stw r0, aramStream@sda21(r13)
/* 803B4A00 003B1960 4E 80 00 20 */ blr
.global sub_803b4a04
sub_803b4a04:
/* 803B4A04 003B1964 38 03 00 1F */ addi r0, r3, 0x1f
/* 803B4A08 003B1968 80 6D AF 94 */ lwz r3, aramFreeStreamBuffers@sda21(r13)
/* 803B4A0C 003B196C 54 07 00 34 */ rlwinm r7, r0, 0, 0, 0x1a
/* 803B4A10 003B1970 38 A0 00 00 */ li r5, 0
/* 803B4A14 003B1974 38 80 00 00 */ li r4, 0
/* 803B4A18 003B1978 38 C0 FF FF */ li r6, -1
/* 803B4A1C 003B197C 48 00 00 34 */ b lbl_803B4A50
lbl_803B4A20:
/* 803B4A20 003B1980 80 03 00 0C */ lwz r0, 0xc(r3)
/* 803B4A24 003B1984 7C 00 38 40 */ cmplw r0, r7
/* 803B4A28 003B1988 40 82 00 0C */ bne lbl_803B4A34
/* 803B4A2C 003B198C 7C 65 1B 78 */ mr r5, r3
/* 803B4A30 003B1990 48 00 00 28 */ b lbl_803B4A58
lbl_803B4A34:
/* 803B4A34 003B1994 40 81 00 14 */ ble lbl_803B4A48
/* 803B4A38 003B1998 7C 06 00 40 */ cmplw r6, r0
/* 803B4A3C 003B199C 40 81 00 0C */ ble lbl_803B4A48
/* 803B4A40 003B19A0 7C 65 1B 78 */ mr r5, r3
/* 803B4A44 003B19A4 7C 06 03 78 */ mr r6, r0
lbl_803B4A48:
/* 803B4A48 003B19A8 7C 64 1B 78 */ mr r4, r3
/* 803B4A4C 003B19AC 80 63 00 00 */ lwz r3, 0(r3)
lbl_803B4A50:
/* 803B4A50 003B19B0 28 03 00 00 */ cmplwi r3, 0
/* 803B4A54 003B19B4 40 82 FF CC */ bne lbl_803B4A20
lbl_803B4A58:
/* 803B4A58 003B19B8 28 05 00 00 */ cmplwi r5, 0
/* 803B4A5C 003B19BC 40 82 00 58 */ bne lbl_803B4AB4
/* 803B4A60 003B19C0 80 8D AF 90 */ lwz r4, aramIdleStreamBuffers@sda21(r13)
/* 803B4A64 003B19C4 28 04 00 00 */ cmplwi r4, 0
/* 803B4A68 003B19C8 41 82 00 78 */ beq lbl_803B4AE0
/* 803B4A6C 003B19CC 80 6D AF A4 */ lwz r3, aramStream@sda21(r13)
/* 803B4A70 003B19D0 80 0D AF A8 */ lwz r0, aramWrite@sda21(r13)
/* 803B4A74 003B19D4 7C 67 18 50 */ subf r3, r7, r3
/* 803B4A78 003B19D8 7C 03 00 40 */ cmplw r3, r0
/* 803B4A7C 003B19DC 41 80 00 64 */ blt lbl_803B4AE0
/* 803B4A80 003B19E0 80 04 00 00 */ lwz r0, 0(r4)
/* 803B4A84 003B19E4 7C 85 23 78 */ mr r5, r4
/* 803B4A88 003B19E8 90 0D AF 90 */ stw r0, aramIdleStreamBuffers@sda21(r13)
/* 803B4A8C 003B19EC 90 E4 00 0C */ stw r7, 0xc(r4)
/* 803B4A90 003B19F0 90 E4 00 08 */ stw r7, 8(r4)
/* 803B4A94 003B19F4 80 0D AF A4 */ lwz r0, aramStream@sda21(r13)
/* 803B4A98 003B19F8 7C 07 00 50 */ subf r0, r7, r0
/* 803B4A9C 003B19FC 90 0D AF A4 */ stw r0, aramStream@sda21(r13)
/* 803B4AA0 003B1A00 90 04 00 04 */ stw r0, 4(r4)
/* 803B4AA4 003B1A04 80 0D AF 98 */ lwz r0, aramUsedStreamBuffers@sda21(r13)
/* 803B4AA8 003B1A08 90 04 00 00 */ stw r0, 0(r4)
/* 803B4AAC 003B1A0C 90 8D AF 98 */ stw r4, aramUsedStreamBuffers@sda21(r13)
/* 803B4AB0 003B1A10 48 00 00 30 */ b lbl_803B4AE0
lbl_803B4AB4:
/* 803B4AB4 003B1A14 28 04 00 00 */ cmplwi r4, 0
/* 803B4AB8 003B1A18 41 82 00 10 */ beq lbl_803B4AC8
/* 803B4ABC 003B1A1C 80 05 00 00 */ lwz r0, 0(r5)
/* 803B4AC0 003B1A20 90 04 00 00 */ stw r0, 0(r4)
/* 803B4AC4 003B1A24 48 00 00 0C */ b lbl_803B4AD0
lbl_803B4AC8:
/* 803B4AC8 003B1A28 80 05 00 00 */ lwz r0, 0(r5)
/* 803B4ACC 003B1A2C 90 0D AF 94 */ stw r0, aramFreeStreamBuffers@sda21(r13)
lbl_803B4AD0:
/* 803B4AD0 003B1A30 90 E5 00 08 */ stw r7, 8(r5)
/* 803B4AD4 003B1A34 80 0D AF 98 */ lwz r0, aramUsedStreamBuffers@sda21(r13)
/* 803B4AD8 003B1A38 90 05 00 00 */ stw r0, 0(r5)
/* 803B4ADC 003B1A3C 90 AD AF 98 */ stw r5, aramUsedStreamBuffers@sda21(r13)
lbl_803B4AE0:
/* 803B4AE0 003B1A40 28 05 00 00 */ cmplwi r5, 0
/* 803B4AE4 003B1A44 40 82 00 0C */ bne lbl_803B4AF0
/* 803B4AE8 003B1A48 38 60 00 FF */ li r3, 0xff
/* 803B4AEC 003B1A4C 4E 80 00 20 */ blr
lbl_803B4AF0:
/* 803B4AF0 003B1A50 3C 60 80 56 */ lis r3, lbl_80567498@ha
/* 803B4AF4 003B1A54 38 03 74 98 */ addi r0, r3, lbl_80567498@l
/* 803B4AF8 003B1A58 7C 00 28 50 */ subf r0, r0, r5
/* 803B4AFC 003B1A5C 7C 00 26 70 */ srawi r0, r0, 4
/* 803B4B00 003B1A60 7C 00 01 94 */ addze r0, r0
/* 803B4B04 003B1A64 54 03 06 3E */ clrlwi r3, r0, 0x18
/* 803B4B08 003B1A68 4E 80 00 20 */ blr
.global aramGetStreamBufferAddress
aramGetStreamBufferAddress:
/* 803B4B0C 003B1A6C 28 04 00 00 */ cmplwi r4, 0
/* 803B4B10 003B1A70 41 82 00 1C */ beq lbl_803B4B2C
/* 803B4B14 003B1A74 3C A0 80 56 */ lis r5, lbl_80567498@ha
/* 803B4B18 003B1A78 54 60 25 36 */ rlwinm r0, r3, 4, 0x14, 0x1b
/* 803B4B1C 003B1A7C 38 A5 74 98 */ addi r5, r5, lbl_80567498@l
/* 803B4B20 003B1A80 7C A5 02 14 */ add r5, r5, r0
/* 803B4B24 003B1A84 80 05 00 08 */ lwz r0, 8(r5)
/* 803B4B28 003B1A88 90 04 00 00 */ stw r0, 0(r4)
lbl_803B4B2C:
/* 803B4B2C 003B1A8C 3C 80 80 56 */ lis r4, lbl_80567498@ha
/* 803B4B30 003B1A90 54 60 25 36 */ rlwinm r0, r3, 4, 0x14, 0x1b
/* 803B4B34 003B1A94 38 64 74 98 */ addi r3, r4, lbl_80567498@l
/* 803B4B38 003B1A98 7C 63 02 14 */ add r3, r3, r0
/* 803B4B3C 003B1A9C 80 63 00 04 */ lwz r3, 4(r3)
/* 803B4B40 003B1AA0 4E 80 00 20 */ blr
.global aramFreeStreamBuffer
aramFreeStreamBuffer:
/* 803B4B44 003B1AA4 3C 80 80 56 */ lis r4, lbl_80567498@ha
/* 803B4B48 003B1AA8 54 63 25 36 */ rlwinm r3, r3, 4, 0x14, 0x1b
/* 803B4B4C 003B1AAC 38 04 74 98 */ addi r0, r4, lbl_80567498@l
/* 803B4B50 003B1AB0 80 AD AF 98 */ lwz r5, aramUsedStreamBuffers@sda21(r13)
/* 803B4B54 003B1AB4 38 C0 00 00 */ li r6, 0
/* 803B4B58 003B1AB8 7C 80 1A 14 */ add r4, r0, r3
/* 803B4B5C 003B1ABC 48 00 00 34 */ b lbl_803B4B90
lbl_803B4B60:
/* 803B4B60 003B1AC0 7C 05 20 40 */ cmplw r5, r4
/* 803B4B64 003B1AC4 40 82 00 24 */ bne lbl_803B4B88
/* 803B4B68 003B1AC8 28 06 00 00 */ cmplwi r6, 0
/* 803B4B6C 003B1ACC 41 82 00 10 */ beq lbl_803B4B7C
/* 803B4B70 003B1AD0 80 04 00 00 */ lwz r0, 0(r4)
/* 803B4B74 003B1AD4 90 06 00 00 */ stw r0, 0(r6)
/* 803B4B78 003B1AD8 48 00 00 20 */ b lbl_803B4B98
lbl_803B4B7C:
/* 803B4B7C 003B1ADC 80 04 00 00 */ lwz r0, 0(r4)
/* 803B4B80 003B1AE0 90 0D AF 98 */ stw r0, aramUsedStreamBuffers@sda21(r13)
/* 803B4B84 003B1AE4 48 00 00 14 */ b lbl_803B4B98
lbl_803B4B88:
/* 803B4B88 003B1AE8 7C A6 2B 78 */ mr r6, r5
/* 803B4B8C 003B1AEC 80 A5 00 00 */ lwz r5, 0(r5)
lbl_803B4B90:
/* 803B4B90 003B1AF0 28 05 00 00 */ cmplwi r5, 0
/* 803B4B94 003B1AF4 40 82 FF CC */ bne lbl_803B4B60
lbl_803B4B98:
/* 803B4B98 003B1AF8 80 64 00 04 */ lwz r3, 4(r4)
/* 803B4B9C 003B1AFC 80 0D AF A4 */ lwz r0, aramStream@sda21(r13)
/* 803B4BA0 003B1B00 7C 03 00 40 */ cmplw r3, r0
/* 803B4BA4 003B1B04 40 82 00 88 */ bne lbl_803B4C2C
/* 803B4BA8 003B1B08 80 0D AF 90 */ lwz r0, aramIdleStreamBuffers@sda21(r13)
/* 803B4BAC 003B1B0C 38 A0 FF FF */ li r5, -1
/* 803B4BB0 003B1B10 80 6D AF 98 */ lwz r3, aramUsedStreamBuffers@sda21(r13)
/* 803B4BB4 003B1B14 90 04 00 00 */ stw r0, 0(r4)
/* 803B4BB8 003B1B18 90 8D AF 90 */ stw r4, aramIdleStreamBuffers@sda21(r13)
/* 803B4BBC 003B1B1C 48 00 00 18 */ b lbl_803B4BD4
lbl_803B4BC0:
/* 803B4BC0 003B1B20 80 03 00 04 */ lwz r0, 4(r3)
/* 803B4BC4 003B1B24 7C 00 28 40 */ cmplw r0, r5
/* 803B4BC8 003B1B28 41 81 00 08 */ bgt lbl_803B4BD0
/* 803B4BCC 003B1B2C 7C 05 03 78 */ mr r5, r0
lbl_803B4BD0:
/* 803B4BD0 003B1B30 80 63 00 00 */ lwz r3, 0(r3)
lbl_803B4BD4:
/* 803B4BD4 003B1B34 28 03 00 00 */ cmplwi r3, 0
/* 803B4BD8 003B1B38 40 82 FF E8 */ bne lbl_803B4BC0
/* 803B4BDC 003B1B3C 80 8D AF 94 */ lwz r4, aramFreeStreamBuffers@sda21(r13)
/* 803B4BE0 003B1B40 48 00 00 28 */ b lbl_803B4C08
lbl_803B4BE4:
/* 803B4BE4 003B1B44 80 04 00 04 */ lwz r0, 4(r4)
/* 803B4BE8 003B1B48 80 64 00 00 */ lwz r3, 0(r4)
/* 803B4BEC 003B1B4C 7C 00 28 40 */ cmplw r0, r5
/* 803B4BF0 003B1B50 40 80 00 14 */ bge lbl_803B4C04
/* 803B4BF4 003B1B54 90 6D AF 94 */ stw r3, aramFreeStreamBuffers@sda21(r13)
/* 803B4BF8 003B1B58 80 0D AF 90 */ lwz r0, aramIdleStreamBuffers@sda21(r13)
/* 803B4BFC 003B1B5C 90 04 00 00 */ stw r0, 0(r4)
/* 803B4C00 003B1B60 90 8D AF 90 */ stw r4, aramIdleStreamBuffers@sda21(r13)
lbl_803B4C04:
/* 803B4C04 003B1B64 7C 64 1B 78 */ mr r4, r3
lbl_803B4C08:
/* 803B4C08 003B1B68 28 04 00 00 */ cmplwi r4, 0
/* 803B4C0C 003B1B6C 40 82 FF D8 */ bne lbl_803B4BE4
/* 803B4C10 003B1B70 3C 05 00 01 */ addis r0, r5, 1
/* 803B4C14 003B1B74 80 6D AF AC */ lwz r3, aramTop@sda21(r13)
/* 803B4C18 003B1B78 28 00 FF FF */ cmplwi r0, 0xffff
/* 803B4C1C 003B1B7C 41 82 00 08 */ beq lbl_803B4C24
/* 803B4C20 003B1B80 7C A3 2B 78 */ mr r3, r5
lbl_803B4C24:
/* 803B4C24 003B1B84 90 6D AF A4 */ stw r3, aramStream@sda21(r13)
/* 803B4C28 003B1B88 4E 80 00 20 */ blr
lbl_803B4C2C:
/* 803B4C2C 003B1B8C 80 0D AF 94 */ lwz r0, aramFreeStreamBuffers@sda21(r13)
/* 803B4C30 003B1B90 90 04 00 00 */ stw r0, 0(r4)
/* 803B4C34 003B1B94 90 8D AF 94 */ stw r4, aramFreeStreamBuffers@sda21(r13)
/* 803B4C38 003B1B98 4E 80 00 20 */ blr