donut-decomp/asm/dvd/dvderror.s
2022-10-17 09:13:49 +01:00

791 lines
37 KiB
ArmAsm

.include "macros.inc"
.section .text, "ax" # 0x80006A00 - 0x80406260 ; 0x003FF860
.global cbForNandClose
cbForNandClose:
/* 8003F2D0 0003B110 81 8D E6 E0 */ lwz r12, Callback_8055CB00@sda21(r13)
/* 8003F2D4 0003B114 2C 0C 00 00 */ cmpwi r12, 0x0
/* 8003F2D8 0003B118 4D 82 00 20 */ beqlr
/* 8003F2DC 0003B11C 7C 60 00 34 */ cntlzw r0, r3
/* 8003F2E0 0003B120 38 80 00 00 */ li r4, 0x0
/* 8003F2E4 0003B124 54 00 DF FE */ extrwi r0, r0, 1, 26
/* 8003F2E8 0003B128 7C 60 00 D0 */ neg r3, r0
/* 8003F2EC 0003B12C 38 63 00 02 */ addi r3, r3, 0x2
/* 8003F2F0 0003B130 7D 89 03 A6 */ mtctr r12
/* 8003F2F4 0003B134 4E 80 04 20 */ bctr
/* 8003F2F8 0003B138 4E 80 00 20 */ blr
/* 8003F2FC 0003B13C 00 00 00 00 */ .4byte 0x00000000
.global cbForNandWrite
cbForNandWrite:
/* 8003F300 0003B140 94 21 FF F0 */ stwu r1, -0x10(r1)
/* 8003F304 0003B144 7C 08 02 A6 */ mflr r0
/* 8003F308 0003B148 3C 60 80 4A */ lis r3, NandInfo@ha
/* 8003F30C 0003B14C 3C 80 80 04 */ lis r4, cbForNandClose@ha
/* 8003F310 0003B150 3C A0 80 4A */ lis r5, NandCb@ha
/* 8003F314 0003B154 90 01 00 14 */ stw r0, 0x14(r1)
/* 8003F318 0003B158 38 63 FA E0 */ addi r3, r3, NandInfo@l
/* 8003F31C 0003B15C 38 84 F2 D0 */ addi r4, r4, cbForNandClose@l
/* 8003F320 0003B160 38 A5 FB 6C */ addi r5, r5, NandCb@l
/* 8003F324 0003B164 48 00 A3 9D */ bl NANDCloseAsync
/* 8003F328 0003B168 2C 03 00 00 */ cmpwi r3, 0x0
/* 8003F32C 0003B16C 41 82 00 20 */ beq lbl_8003F34C
/* 8003F330 0003B170 81 8D E6 E0 */ lwz r12, Callback_8055CB00@sda21(r13)
/* 8003F334 0003B174 2C 0C 00 00 */ cmpwi r12, 0x0
/* 8003F338 0003B178 41 82 00 14 */ beq lbl_8003F34C
/* 8003F33C 0003B17C 38 60 00 02 */ li r3, 0x2
/* 8003F340 0003B180 38 80 00 00 */ li r4, 0x0
/* 8003F344 0003B184 7D 89 03 A6 */ mtctr r12
/* 8003F348 0003B188 4E 80 04 21 */ bctrl
.global lbl_8003F34C
lbl_8003F34C:
/* 8003F34C 0003B18C 80 01 00 14 */ lwz r0, 0x14(r1)
/* 8003F350 0003B190 7C 08 03 A6 */ mtlr r0
/* 8003F354 0003B194 38 21 00 10 */ addi r1, r1, 0x10
/* 8003F358 0003B198 4E 80 00 20 */ blr
/* 8003F35C 0003B19C 00 00 00 00 */ .4byte 0x00000000
.global cbForNandSeek
cbForNandSeek:
/* 8003F360 0003B1A0 94 21 FF F0 */ stwu r1, -0x10(r1)
/* 8003F364 0003B1A4 7C 08 02 A6 */ mflr r0
/* 8003F368 0003B1A8 90 01 00 14 */ stw r0, 0x14(r1)
/* 8003F36C 0003B1AC 93 E1 00 0C */ stw r31, 0xc(r1)
/* 8003F370 0003B1B0 3F E0 80 4A */ lis r31, NandInfo@ha
/* 8003F374 0003B1B4 3B FF FA E0 */ addi r31, r31, NandInfo@l
/* 8003F378 0003B1B8 80 8D E6 DC */ lwz r4, NextOffset@sda21(r13)
/* 8003F37C 0003B1BC 38 A4 00 01 */ addi r5, r4, 0x1
/* 8003F380 0003B1C0 54 A0 38 30 */ slwi r0, r5, 7
/* 8003F384 0003B1C4 7C 03 00 40 */ cmplw r3, r0
/* 8003F388 0003B1C8 40 82 00 A4 */ bne lbl_8003F42C
/* 8003F38C 0003B1CC 2C 04 00 00 */ cmpwi r4, 0x0
/* 8003F390 0003B1D0 40 82 00 30 */ bne lbl_8003F3C0
/* 8003F394 0003B1D4 3C 80 24 92 */ lis r4, 0x2492
/* 8003F398 0003B1D8 38 7F 01 60 */ addi r3, r31, 0x160
/* 8003F39C 0003B1DC 38 04 49 25 */ addi r0, r4, 0x4925
/* 8003F3A0 0003B1E0 7C 80 28 16 */ mulhwu r4, r0, r5
/* 8003F3A4 0003B1E4 7C 04 28 50 */ subf r0, r4, r5
/* 8003F3A8 0003B1E8 54 00 F8 7E */ srwi r0, r0, 1
/* 8003F3AC 0003B1EC 7C 00 22 14 */ add r0, r0, r4
/* 8003F3B0 0003B1F0 54 00 F0 BE */ srwi r0, r0, 2
/* 8003F3B4 0003B1F4 1C 00 00 07 */ mulli r0, r0, 0x7
/* 8003F3B8 0003B1F8 7C 00 28 50 */ subf r0, r0, r5
/* 8003F3BC 0003B1FC 90 03 00 18 */ stw r0, 0x18(r3)
.global lbl_8003F3C0
lbl_8003F3C0:
/* 8003F3C0 0003B200 38 7F 01 60 */ addi r3, r31, 0x160
/* 8003F3C4 0003B204 38 80 00 80 */ li r4, 0x80
/* 8003F3C8 0003B208 4B FD D5 B9 */ bl DCFlushRange
/* 8003F3CC 0003B20C 3C C0 80 04 */ lis r6, cbForNandWrite@ha
/* 8003F3D0 0003B210 38 7F 00 00 */ addi r3, r31, 0x0
/* 8003F3D4 0003B214 38 9F 01 60 */ addi r4, r31, 0x160
/* 8003F3D8 0003B218 38 FF 00 8C */ addi r7, r31, 0x8c
/* 8003F3DC 0003B21C 38 C6 F3 00 */ addi r6, r6, cbForNandWrite@l
/* 8003F3E0 0003B220 38 A0 00 80 */ li r5, 0x80
/* 8003F3E4 0003B224 48 00 90 8D */ bl NANDWriteAsync
/* 8003F3E8 0003B228 2C 03 00 00 */ cmpwi r3, 0x0
/* 8003F3EC 0003B22C 41 82 00 5C */ beq lbl_8003F448
/* 8003F3F0 0003B230 3C 80 80 04 */ lis r4, cbForNandClose@ha
/* 8003F3F4 0003B234 38 7F 00 00 */ addi r3, r31, 0x0
/* 8003F3F8 0003B238 38 84 F2 D0 */ addi r4, r4, cbForNandClose@l
/* 8003F3FC 0003B23C 38 BF 00 8C */ addi r5, r31, 0x8c
/* 8003F400 0003B240 48 00 A2 C1 */ bl NANDCloseAsync
/* 8003F404 0003B244 2C 03 00 00 */ cmpwi r3, 0x0
/* 8003F408 0003B248 41 82 00 40 */ beq lbl_8003F448
/* 8003F40C 0003B24C 81 8D E6 E0 */ lwz r12, Callback_8055CB00@sda21(r13)
/* 8003F410 0003B250 2C 0C 00 00 */ cmpwi r12, 0x0
/* 8003F414 0003B254 41 82 00 34 */ beq lbl_8003F448
/* 8003F418 0003B258 38 60 00 02 */ li r3, 0x2
/* 8003F41C 0003B25C 38 80 00 00 */ li r4, 0x0
/* 8003F420 0003B260 7D 89 03 A6 */ mtctr r12
/* 8003F424 0003B264 4E 80 04 21 */ bctrl
/* 8003F428 0003B268 48 00 00 20 */ b lbl_8003F448
.global lbl_8003F42C
lbl_8003F42C:
/* 8003F42C 0003B26C 81 8D E6 E0 */ lwz r12, Callback_8055CB00@sda21(r13)
/* 8003F430 0003B270 2C 0C 00 00 */ cmpwi r12, 0x0
/* 8003F434 0003B274 41 82 00 14 */ beq lbl_8003F448
/* 8003F438 0003B278 38 60 00 02 */ li r3, 0x2
/* 8003F43C 0003B27C 38 80 00 00 */ li r4, 0x0
/* 8003F440 0003B280 7D 89 03 A6 */ mtctr r12
/* 8003F444 0003B284 4E 80 04 21 */ bctrl
.global lbl_8003F448
lbl_8003F448:
/* 8003F448 0003B288 80 01 00 14 */ lwz r0, 0x14(r1)
/* 8003F44C 0003B28C 83 E1 00 0C */ lwz r31, 0xc(r1)
/* 8003F450 0003B290 7C 08 03 A6 */ mtlr r0
/* 8003F454 0003B294 38 21 00 10 */ addi r1, r1, 0x10
/* 8003F458 0003B298 4E 80 00 20 */ blr
/* 8003F45C 0003B29C 00 00 00 00 */ .4byte 0x00000000
.global cbForNandWrite0
cbForNandWrite0:
/* 8003F460 0003B2A0 94 21 FF F0 */ stwu r1, -0x10(r1)
/* 8003F464 0003B2A4 7C 08 02 A6 */ mflr r0
/* 8003F468 0003B2A8 28 03 00 80 */ cmplwi r3, 0x80
/* 8003F46C 0003B2AC 90 01 00 14 */ stw r0, 0x14(r1)
/* 8003F470 0003B2B0 93 E1 00 0C */ stw r31, 0xc(r1)
/* 8003F474 0003B2B4 3F E0 80 4A */ lis r31, NandInfo@ha
/* 8003F478 0003B2B8 3B FF FA E0 */ addi r31, r31, NandInfo@l
/* 8003F47C 0003B2BC 40 82 01 08 */ bne lbl_8003F584
/* 8003F480 0003B2C0 80 8D E6 DC */ lwz r4, NextOffset@sda21(r13)
/* 8003F484 0003B2C4 3C C0 80 04 */ lis r6, cbForNandSeek@ha
/* 8003F488 0003B2C8 38 7F 00 00 */ addi r3, r31, 0x0
/* 8003F48C 0003B2CC 38 FF 00 8C */ addi r7, r31, 0x8c
/* 8003F490 0003B2D0 38 04 00 01 */ addi r0, r4, 0x1
/* 8003F494 0003B2D4 38 C6 F3 60 */ addi r6, r6, cbForNandSeek@l
/* 8003F498 0003B2D8 54 04 38 30 */ slwi r4, r0, 7
/* 8003F49C 0003B2DC 38 A0 00 00 */ li r5, 0x0
/* 8003F4A0 0003B2E0 48 00 90 F1 */ bl NANDSeekAsync
/* 8003F4A4 0003B2E4 2C 03 00 00 */ cmpwi r3, 0x0
/* 8003F4A8 0003B2E8 41 82 00 F8 */ beq lbl_8003F5A0
/* 8003F4AC 0003B2EC 80 8D E6 DC */ lwz r4, NextOffset@sda21(r13)
/* 8003F4B0 0003B2F0 38 A4 00 01 */ addi r5, r4, 0x1
/* 8003F4B4 0003B2F4 54 A3 38 30 */ slwi r3, r5, 7
/* 8003F4B8 0003B2F8 3C 03 00 01 */ addis r0, r3, 0x1
/* 8003F4BC 0003B2FC 28 00 FF FF */ cmplwi r0, 0xffff
/* 8003F4C0 0003B300 40 82 00 A4 */ bne lbl_8003F564
/* 8003F4C4 0003B304 2C 04 00 00 */ cmpwi r4, 0x0
/* 8003F4C8 0003B308 40 82 00 30 */ bne lbl_8003F4F8
/* 8003F4CC 0003B30C 3C 80 24 92 */ lis r4, 0x2492
/* 8003F4D0 0003B310 38 7F 01 60 */ addi r3, r31, 0x160
/* 8003F4D4 0003B314 38 04 49 25 */ addi r0, r4, 0x4925
/* 8003F4D8 0003B318 7C 80 28 16 */ mulhwu r4, r0, r5
/* 8003F4DC 0003B31C 7C 04 28 50 */ subf r0, r4, r5
/* 8003F4E0 0003B320 54 00 F8 7E */ srwi r0, r0, 1
/* 8003F4E4 0003B324 7C 00 22 14 */ add r0, r0, r4
/* 8003F4E8 0003B328 54 00 F0 BE */ srwi r0, r0, 2
/* 8003F4EC 0003B32C 1C 00 00 07 */ mulli r0, r0, 0x7
/* 8003F4F0 0003B330 7C 00 28 50 */ subf r0, r0, r5
/* 8003F4F4 0003B334 90 03 00 18 */ stw r0, 0x18(r3)
.global lbl_8003F4F8
lbl_8003F4F8:
/* 8003F4F8 0003B338 38 7F 01 60 */ addi r3, r31, 0x160
/* 8003F4FC 0003B33C 38 80 00 80 */ li r4, 0x80
/* 8003F500 0003B340 4B FD D4 81 */ bl DCFlushRange
/* 8003F504 0003B344 3C C0 80 04 */ lis r6, cbForNandWrite@ha
/* 8003F508 0003B348 38 7F 00 00 */ addi r3, r31, 0x0
/* 8003F50C 0003B34C 38 9F 01 60 */ addi r4, r31, 0x160
/* 8003F510 0003B350 38 FF 00 8C */ addi r7, r31, 0x8c
/* 8003F514 0003B354 38 C6 F3 00 */ addi r6, r6, cbForNandWrite@l
/* 8003F518 0003B358 38 A0 00 80 */ li r5, 0x80
/* 8003F51C 0003B35C 48 00 8F 55 */ bl NANDWriteAsync
/* 8003F520 0003B360 2C 03 00 00 */ cmpwi r3, 0x0
/* 8003F524 0003B364 41 82 00 7C */ beq lbl_8003F5A0
/* 8003F528 0003B368 3C 80 80 04 */ lis r4, cbForNandClose@ha
/* 8003F52C 0003B36C 38 7F 00 00 */ addi r3, r31, 0x0
/* 8003F530 0003B370 38 84 F2 D0 */ addi r4, r4, cbForNandClose@l
/* 8003F534 0003B374 38 BF 00 8C */ addi r5, r31, 0x8c
/* 8003F538 0003B378 48 00 A1 89 */ bl NANDCloseAsync
/* 8003F53C 0003B37C 2C 03 00 00 */ cmpwi r3, 0x0
/* 8003F540 0003B380 41 82 00 60 */ beq lbl_8003F5A0
/* 8003F544 0003B384 81 8D E6 E0 */ lwz r12, Callback_8055CB00@sda21(r13)
/* 8003F548 0003B388 2C 0C 00 00 */ cmpwi r12, 0x0
/* 8003F54C 0003B38C 41 82 00 54 */ beq lbl_8003F5A0
/* 8003F550 0003B390 38 60 00 02 */ li r3, 0x2
/* 8003F554 0003B394 38 80 00 00 */ li r4, 0x0
/* 8003F558 0003B398 7D 89 03 A6 */ mtctr r12
/* 8003F55C 0003B39C 4E 80 04 21 */ bctrl
/* 8003F560 0003B3A0 48 00 00 40 */ b lbl_8003F5A0
.global lbl_8003F564
lbl_8003F564:
/* 8003F564 0003B3A4 81 8D E6 E0 */ lwz r12, Callback_8055CB00@sda21(r13)
/* 8003F568 0003B3A8 2C 0C 00 00 */ cmpwi r12, 0x0
/* 8003F56C 0003B3AC 41 82 00 34 */ beq lbl_8003F5A0
/* 8003F570 0003B3B0 38 60 00 02 */ li r3, 0x2
/* 8003F574 0003B3B4 38 80 00 00 */ li r4, 0x0
/* 8003F578 0003B3B8 7D 89 03 A6 */ mtctr r12
/* 8003F57C 0003B3BC 4E 80 04 21 */ bctrl
/* 8003F580 0003B3C0 48 00 00 20 */ b lbl_8003F5A0
.global lbl_8003F584
lbl_8003F584:
/* 8003F584 0003B3C4 81 8D E6 E0 */ lwz r12, Callback_8055CB00@sda21(r13)
/* 8003F588 0003B3C8 2C 0C 00 00 */ cmpwi r12, 0x0
/* 8003F58C 0003B3CC 41 82 00 14 */ beq lbl_8003F5A0
/* 8003F590 0003B3D0 38 60 00 02 */ li r3, 0x2
/* 8003F594 0003B3D4 38 80 00 00 */ li r4, 0x0
/* 8003F598 0003B3D8 7D 89 03 A6 */ mtctr r12
/* 8003F59C 0003B3DC 4E 80 04 21 */ bctrl
.global lbl_8003F5A0
lbl_8003F5A0:
/* 8003F5A0 0003B3E0 80 01 00 14 */ lwz r0, 0x14(r1)
/* 8003F5A4 0003B3E4 83 E1 00 0C */ lwz r31, 0xc(r1)
/* 8003F5A8 0003B3E8 7C 08 03 A6 */ mtlr r0
/* 8003F5AC 0003B3EC 38 21 00 10 */ addi r1, r1, 0x10
/* 8003F5B0 0003B3F0 4E 80 00 20 */ blr
/* 8003F5B4 0003B3F4 00 00 00 00 */ .4byte 0x00000000
/* 8003F5B8 0003B3F8 00 00 00 00 */ .4byte 0x00000000
/* 8003F5BC 0003B3FC 00 00 00 00 */ .4byte 0x00000000
.global cbForNandSeek2
cbForNandSeek2:
/* 8003F5C0 0003B400 94 21 FF F0 */ stwu r1, -0x10(r1)
/* 8003F5C4 0003B404 7C 08 02 A6 */ mflr r0
/* 8003F5C8 0003B408 28 03 00 80 */ cmplwi r3, 0x80
/* 8003F5CC 0003B40C 3C E0 80 4A */ lis r7, NandInfo@ha
/* 8003F5D0 0003B410 90 01 00 14 */ stw r0, 0x14(r1)
/* 8003F5D4 0003B414 38 E7 FA E0 */ addi r7, r7, NandInfo@l
/* 8003F5D8 0003B418 40 82 00 78 */ bne lbl_8003F650
/* 8003F5DC 0003B41C 38 87 01 E0 */ addi r4, r7, 0x1e0
/* 8003F5E0 0003B420 3C 60 24 92 */ lis r3, 0x2492
/* 8003F5E4 0003B424 80 A4 00 18 */ lwz r5, 0x18(r4)
/* 8003F5E8 0003B428 38 03 49 25 */ addi r0, r3, 0x4925
/* 8003F5EC 0003B42C 3C C0 80 04 */ lis r6, cbForNandWrite0@ha
/* 8003F5F0 0003B430 38 67 00 00 */ addi r3, r7, 0x0
/* 8003F5F4 0003B434 39 25 00 01 */ addi r9, r5, 0x1
/* 8003F5F8 0003B438 38 E7 00 8C */ addi r7, r7, 0x8c
/* 8003F5FC 0003B43C 7D 00 48 16 */ mulhwu r8, r0, r9
/* 8003F600 0003B440 38 C6 F4 60 */ addi r6, r6, cbForNandWrite0@l
/* 8003F604 0003B444 38 A0 00 80 */ li r5, 0x80
/* 8003F608 0003B448 7C 08 48 50 */ subf r0, r8, r9
/* 8003F60C 0003B44C 54 00 F8 7E */ srwi r0, r0, 1
/* 8003F610 0003B450 7C 00 42 14 */ add r0, r0, r8
/* 8003F614 0003B454 54 00 F0 BE */ srwi r0, r0, 2
/* 8003F618 0003B458 1C 00 00 07 */ mulli r0, r0, 0x7
/* 8003F61C 0003B45C 7C 00 48 50 */ subf r0, r0, r9
/* 8003F620 0003B460 90 04 00 18 */ stw r0, 0x18(r4)
/* 8003F624 0003B464 48 00 8E 4D */ bl NANDWriteAsync
/* 8003F628 0003B468 2C 03 00 00 */ cmpwi r3, 0x0
/* 8003F62C 0003B46C 41 82 00 40 */ beq lbl_8003F66C
/* 8003F630 0003B470 81 8D E6 E0 */ lwz r12, Callback_8055CB00@sda21(r13)
/* 8003F634 0003B474 2C 0C 00 00 */ cmpwi r12, 0x0
/* 8003F638 0003B478 41 82 00 34 */ beq lbl_8003F66C
/* 8003F63C 0003B47C 38 60 00 02 */ li r3, 0x2
/* 8003F640 0003B480 38 80 00 00 */ li r4, 0x0
/* 8003F644 0003B484 7D 89 03 A6 */ mtctr r12
/* 8003F648 0003B488 4E 80 04 21 */ bctrl
/* 8003F64C 0003B48C 48 00 00 20 */ b lbl_8003F66C
.global lbl_8003F650
lbl_8003F650:
/* 8003F650 0003B490 81 8D E6 E0 */ lwz r12, Callback_8055CB00@sda21(r13)
/* 8003F654 0003B494 2C 0C 00 00 */ cmpwi r12, 0x0
/* 8003F658 0003B498 41 82 00 14 */ beq lbl_8003F66C
/* 8003F65C 0003B49C 38 60 00 02 */ li r3, 0x2
/* 8003F660 0003B4A0 38 80 00 00 */ li r4, 0x0
/* 8003F664 0003B4A4 7D 89 03 A6 */ mtctr r12
/* 8003F668 0003B4A8 4E 80 04 21 */ bctrl
.global lbl_8003F66C
lbl_8003F66C:
/* 8003F66C 0003B4AC 80 01 00 14 */ lwz r0, 0x14(r1)
/* 8003F670 0003B4B0 7C 08 03 A6 */ mtlr r0
/* 8003F674 0003B4B4 38 21 00 10 */ addi r1, r1, 0x10
/* 8003F678 0003B4B8 4E 80 00 20 */ blr
/* 8003F67C 0003B4BC 00 00 00 00 */ .4byte 0x00000000
.global cbForNandRead
cbForNandRead:
/* 8003F680 0003B4C0 94 21 FF F0 */ stwu r1, -0x10(r1)
/* 8003F684 0003B4C4 7C 08 02 A6 */ mflr r0
/* 8003F688 0003B4C8 28 03 00 80 */ cmplwi r3, 0x80
/* 8003F68C 0003B4CC 90 01 00 14 */ stw r0, 0x14(r1)
/* 8003F690 0003B4D0 93 E1 00 0C */ stw r31, 0xc(r1)
/* 8003F694 0003B4D4 3F E0 80 4A */ lis r31, NandInfo@ha
/* 8003F698 0003B4D8 3B FF FA E0 */ addi r31, r31, NandInfo@l
/* 8003F69C 0003B4DC 40 82 00 54 */ bne lbl_8003F6F0
/* 8003F6A0 0003B4E0 38 7F 01 E0 */ addi r3, r31, 0x1e0
/* 8003F6A4 0003B4E4 3C C0 80 04 */ lis r6, cbForNandSeek2@ha
/* 8003F6A8 0003B4E8 80 03 00 18 */ lwz r0, 0x18(r3)
/* 8003F6AC 0003B4EC 38 7F 00 00 */ addi r3, r31, 0x0
/* 8003F6B0 0003B4F0 90 0D E6 DC */ stw r0, NextOffset@sda21(r13)
/* 8003F6B4 0003B4F4 38 C6 F5 C0 */ addi r6, r6, cbForNandSeek2@l
/* 8003F6B8 0003B4F8 38 FF 00 8C */ addi r7, r31, 0x8c
/* 8003F6BC 0003B4FC 38 80 00 80 */ li r4, 0x80
/* 8003F6C0 0003B500 38 A0 00 00 */ li r5, 0x0
/* 8003F6C4 0003B504 48 00 8E CD */ bl NANDSeekAsync
/* 8003F6C8 0003B508 2C 03 00 00 */ cmpwi r3, 0x0
/* 8003F6CC 0003B50C 41 82 00 88 */ beq lbl_8003F754
/* 8003F6D0 0003B510 81 8D E6 E0 */ lwz r12, Callback_8055CB00@sda21(r13)
/* 8003F6D4 0003B514 2C 0C 00 00 */ cmpwi r12, 0x0
/* 8003F6D8 0003B518 41 82 00 7C */ beq lbl_8003F754
/* 8003F6DC 0003B51C 38 60 00 02 */ li r3, 0x2
/* 8003F6E0 0003B520 38 80 00 00 */ li r4, 0x0
/* 8003F6E4 0003B524 7D 89 03 A6 */ mtctr r12
/* 8003F6E8 0003B528 4E 80 04 21 */ bctrl
/* 8003F6EC 0003B52C 48 00 00 68 */ b lbl_8003F754
.global lbl_8003F6F0
lbl_8003F6F0:
/* 8003F6F0 0003B530 38 9F 01 60 */ addi r4, r31, 0x160
/* 8003F6F4 0003B534 38 00 00 01 */ li r0, 0x1
/* 8003F6F8 0003B538 3C C0 80 04 */ lis r6, cbForNandWrite@ha
/* 8003F6FC 0003B53C 90 04 00 18 */ stw r0, 0x18(r4)
/* 8003F700 0003B540 38 7F 00 00 */ addi r3, r31, 0x0
/* 8003F704 0003B544 38 FF 00 8C */ addi r7, r31, 0x8c
/* 8003F708 0003B548 38 C6 F3 00 */ addi r6, r6, cbForNandWrite@l
/* 8003F70C 0003B54C 38 A0 00 80 */ li r5, 0x80
/* 8003F710 0003B550 48 00 8D 61 */ bl NANDWriteAsync
/* 8003F714 0003B554 2C 03 00 00 */ cmpwi r3, 0x0
/* 8003F718 0003B558 41 82 00 3C */ beq lbl_8003F754
/* 8003F71C 0003B55C 3C 80 80 04 */ lis r4, cbForNandClose@ha
/* 8003F720 0003B560 38 7F 00 00 */ addi r3, r31, 0x0
/* 8003F724 0003B564 38 84 F2 D0 */ addi r4, r4, cbForNandClose@l
/* 8003F728 0003B568 38 BF 00 8C */ addi r5, r31, 0x8c
/* 8003F72C 0003B56C 48 00 9F 95 */ bl NANDCloseAsync
/* 8003F730 0003B570 2C 03 00 00 */ cmpwi r3, 0x0
/* 8003F734 0003B574 41 82 00 20 */ beq lbl_8003F754
/* 8003F738 0003B578 81 8D E6 E0 */ lwz r12, Callback_8055CB00@sda21(r13)
/* 8003F73C 0003B57C 2C 0C 00 00 */ cmpwi r12, 0x0
/* 8003F740 0003B580 41 82 00 14 */ beq lbl_8003F754
/* 8003F744 0003B584 38 60 00 02 */ li r3, 0x2
/* 8003F748 0003B588 38 80 00 00 */ li r4, 0x0
/* 8003F74C 0003B58C 7D 89 03 A6 */ mtctr r12
/* 8003F750 0003B590 4E 80 04 21 */ bctrl
.global lbl_8003F754
lbl_8003F754:
/* 8003F754 0003B594 80 01 00 14 */ lwz r0, 0x14(r1)
/* 8003F758 0003B598 83 E1 00 0C */ lwz r31, 0xc(r1)
/* 8003F75C 0003B59C 7C 08 03 A6 */ mtlr r0
/* 8003F760 0003B5A0 38 21 00 10 */ addi r1, r1, 0x10
/* 8003F764 0003B5A4 4E 80 00 20 */ blr
/* 8003F768 0003B5A8 00 00 00 00 */ .4byte 0x00000000
/* 8003F76C 0003B5AC 00 00 00 00 */ .4byte 0x00000000
.global cbForNandSeek0
cbForNandSeek0:
/* 8003F770 0003B5B0 94 21 FF F0 */ stwu r1, -0x10(r1)
/* 8003F774 0003B5B4 7C 08 02 A6 */ mflr r0
/* 8003F778 0003B5B8 2C 03 00 00 */ cmpwi r3, 0x0
/* 8003F77C 0003B5BC 3C E0 80 4A */ lis r7, NandInfo@ha
/* 8003F780 0003B5C0 90 01 00 14 */ stw r0, 0x14(r1)
/* 8003F784 0003B5C4 38 E7 FA E0 */ addi r7, r7, NandInfo@l
/* 8003F788 0003B5C8 40 82 00 5C */ bne lbl_8003F7E4
/* 8003F78C 0003B5CC 38 A7 01 60 */ addi r5, r7, 0x160
/* 8003F790 0003B5D0 38 60 00 00 */ li r3, 0x0
/* 8003F794 0003B5D4 38 00 00 01 */ li r0, 0x1
/* 8003F798 0003B5D8 3C C0 80 04 */ lis r6, cbForNandWrite0@ha
/* 8003F79C 0003B5DC 90 6D E6 DC */ stw r3, NextOffset@sda21(r13)
/* 8003F7A0 0003B5E0 38 67 00 00 */ addi r3, r7, 0x0
/* 8003F7A4 0003B5E4 38 87 01 E0 */ addi r4, r7, 0x1e0
/* 8003F7A8 0003B5E8 38 C6 F4 60 */ addi r6, r6, cbForNandWrite0@l
/* 8003F7AC 0003B5EC 90 05 00 18 */ stw r0, 0x18(r5)
/* 8003F7B0 0003B5F0 38 E7 00 8C */ addi r7, r7, 0x8c
/* 8003F7B4 0003B5F4 38 A0 00 80 */ li r5, 0x80
/* 8003F7B8 0003B5F8 48 00 8C B9 */ bl NANDWriteAsync
/* 8003F7BC 0003B5FC 2C 03 00 00 */ cmpwi r3, 0x0
/* 8003F7C0 0003B600 41 82 00 40 */ beq lbl_8003F800
/* 8003F7C4 0003B604 81 8D E6 E0 */ lwz r12, Callback_8055CB00@sda21(r13)
/* 8003F7C8 0003B608 2C 0C 00 00 */ cmpwi r12, 0x0
/* 8003F7CC 0003B60C 41 82 00 34 */ beq lbl_8003F800
/* 8003F7D0 0003B610 38 60 00 02 */ li r3, 0x2
/* 8003F7D4 0003B614 38 80 00 00 */ li r4, 0x0
/* 8003F7D8 0003B618 7D 89 03 A6 */ mtctr r12
/* 8003F7DC 0003B61C 4E 80 04 21 */ bctrl
/* 8003F7E0 0003B620 48 00 00 20 */ b lbl_8003F800
.global lbl_8003F7E4
lbl_8003F7E4:
/* 8003F7E4 0003B624 81 8D E6 E0 */ lwz r12, Callback_8055CB00@sda21(r13)
/* 8003F7E8 0003B628 2C 0C 00 00 */ cmpwi r12, 0x0
/* 8003F7EC 0003B62C 41 82 00 14 */ beq lbl_8003F800
/* 8003F7F0 0003B630 38 60 00 02 */ li r3, 0x2
/* 8003F7F4 0003B634 38 80 00 00 */ li r4, 0x0
/* 8003F7F8 0003B638 7D 89 03 A6 */ mtctr r12
/* 8003F7FC 0003B63C 4E 80 04 21 */ bctrl
.global lbl_8003F800
lbl_8003F800:
/* 8003F800 0003B640 80 01 00 14 */ lwz r0, 0x14(r1)
/* 8003F804 0003B644 7C 08 03 A6 */ mtlr r0
/* 8003F808 0003B648 38 21 00 10 */ addi r1, r1, 0x10
/* 8003F80C 0003B64C 4E 80 00 20 */ blr
.global cbForNandSeek1
cbForNandSeek1:
/* 8003F810 0003B650 94 21 FF F0 */ stwu r1, -0x10(r1)
/* 8003F814 0003B654 7C 08 02 A6 */ mflr r0
/* 8003F818 0003B658 28 03 00 80 */ cmplwi r3, 0x80
/* 8003F81C 0003B65C 90 01 00 14 */ stw r0, 0x14(r1)
/* 8003F820 0003B660 93 E1 00 0C */ stw r31, 0xc(r1)
/* 8003F824 0003B664 3F E0 80 4A */ lis r31, NandInfo@ha
/* 8003F828 0003B668 3B FF FA E0 */ addi r31, r31, NandInfo@l
/* 8003F82C 0003B66C 40 82 00 90 */ bne lbl_8003F8BC
/* 8003F830 0003B670 3C C0 80 04 */ lis r6, cbForNandRead@ha
/* 8003F834 0003B674 38 7F 00 00 */ addi r3, r31, 0x0
/* 8003F838 0003B678 38 9F 01 E0 */ addi r4, r31, 0x1e0
/* 8003F83C 0003B67C 38 FF 00 8C */ addi r7, r31, 0x8c
/* 8003F840 0003B680 38 C6 F6 80 */ addi r6, r6, cbForNandRead@l
/* 8003F844 0003B684 38 A0 00 80 */ li r5, 0x80
/* 8003F848 0003B688 48 00 8B 39 */ bl NANDReadAsync
/* 8003F84C 0003B68C 2C 03 00 00 */ cmpwi r3, 0x0
/* 8003F850 0003B690 41 82 00 AC */ beq lbl_8003F8FC
/* 8003F854 0003B694 38 9F 01 60 */ addi r4, r31, 0x160
/* 8003F858 0003B698 38 00 00 01 */ li r0, 0x1
/* 8003F85C 0003B69C 3C C0 80 04 */ lis r6, cbForNandWrite@ha
/* 8003F860 0003B6A0 90 04 00 18 */ stw r0, 0x18(r4)
/* 8003F864 0003B6A4 38 7F 00 00 */ addi r3, r31, 0x0
/* 8003F868 0003B6A8 38 FF 00 8C */ addi r7, r31, 0x8c
/* 8003F86C 0003B6AC 38 C6 F3 00 */ addi r6, r6, cbForNandWrite@l
/* 8003F870 0003B6B0 38 A0 00 80 */ li r5, 0x80
/* 8003F874 0003B6B4 48 00 8B FD */ bl NANDWriteAsync
/* 8003F878 0003B6B8 2C 03 00 00 */ cmpwi r3, 0x0
/* 8003F87C 0003B6BC 41 82 00 80 */ beq lbl_8003F8FC
/* 8003F880 0003B6C0 3C 80 80 04 */ lis r4, cbForNandClose@ha
/* 8003F884 0003B6C4 38 7F 00 00 */ addi r3, r31, 0x0
/* 8003F888 0003B6C8 38 84 F2 D0 */ addi r4, r4, cbForNandClose@l
/* 8003F88C 0003B6CC 38 BF 00 8C */ addi r5, r31, 0x8c
/* 8003F890 0003B6D0 48 00 9E 31 */ bl NANDCloseAsync
/* 8003F894 0003B6D4 2C 03 00 00 */ cmpwi r3, 0x0
/* 8003F898 0003B6D8 41 82 00 64 */ beq lbl_8003F8FC
/* 8003F89C 0003B6DC 81 8D E6 E0 */ lwz r12, Callback_8055CB00@sda21(r13)
/* 8003F8A0 0003B6E0 2C 0C 00 00 */ cmpwi r12, 0x0
/* 8003F8A4 0003B6E4 41 82 00 58 */ beq lbl_8003F8FC
/* 8003F8A8 0003B6E8 38 60 00 02 */ li r3, 0x2
/* 8003F8AC 0003B6EC 38 80 00 00 */ li r4, 0x0
/* 8003F8B0 0003B6F0 7D 89 03 A6 */ mtctr r12
/* 8003F8B4 0003B6F4 4E 80 04 21 */ bctrl
/* 8003F8B8 0003B6F8 48 00 00 44 */ b lbl_8003F8FC
.global lbl_8003F8BC
lbl_8003F8BC:
/* 8003F8BC 0003B6FC 3C C0 80 04 */ lis r6, cbForNandSeek0@ha
/* 8003F8C0 0003B700 38 7F 00 00 */ addi r3, r31, 0x0
/* 8003F8C4 0003B704 38 C6 F7 70 */ addi r6, r6, cbForNandSeek0@l
/* 8003F8C8 0003B708 38 FF 00 8C */ addi r7, r31, 0x8c
/* 8003F8CC 0003B70C 38 80 00 00 */ li r4, 0x0
/* 8003F8D0 0003B710 38 A0 00 00 */ li r5, 0x0
/* 8003F8D4 0003B714 48 00 8C BD */ bl NANDSeekAsync
/* 8003F8D8 0003B718 2C 03 00 00 */ cmpwi r3, 0x0
/* 8003F8DC 0003B71C 41 82 00 20 */ beq lbl_8003F8FC
/* 8003F8E0 0003B720 81 8D E6 E0 */ lwz r12, Callback_8055CB00@sda21(r13)
/* 8003F8E4 0003B724 2C 0C 00 00 */ cmpwi r12, 0x0
/* 8003F8E8 0003B728 41 82 00 14 */ beq lbl_8003F8FC
/* 8003F8EC 0003B72C 38 60 00 02 */ li r3, 0x2
/* 8003F8F0 0003B730 38 80 00 00 */ li r4, 0x0
/* 8003F8F4 0003B734 7D 89 03 A6 */ mtctr r12
/* 8003F8F8 0003B738 4E 80 04 21 */ bctrl
.global lbl_8003F8FC
lbl_8003F8FC:
/* 8003F8FC 0003B73C 80 01 00 14 */ lwz r0, 0x14(r1)
/* 8003F900 0003B740 83 E1 00 0C */ lwz r31, 0xc(r1)
/* 8003F904 0003B744 7C 08 03 A6 */ mtlr r0
/* 8003F908 0003B748 38 21 00 10 */ addi r1, r1, 0x10
/* 8003F90C 0003B74C 4E 80 00 20 */ blr
.global cbForNandOpen
cbForNandOpen:
/* 8003F910 0003B750 94 21 FF F0 */ stwu r1, -0x10(r1)
/* 8003F914 0003B754 7C 08 02 A6 */ mflr r0
/* 8003F918 0003B758 2C 03 00 00 */ cmpwi r3, 0x0
/* 8003F91C 0003B75C 90 01 00 14 */ stw r0, 0x14(r1)
/* 8003F920 0003B760 93 E1 00 0C */ stw r31, 0xc(r1)
/* 8003F924 0003B764 3F E0 80 4A */ lis r31, NandInfo@ha
/* 8003F928 0003B768 3B FF FA E0 */ addi r31, r31, NandInfo@l
/* 8003F92C 0003B76C 40 82 00 D0 */ bne lbl_8003F9FC
/* 8003F930 0003B770 80 0D E6 D8 */ lwz r0, ExistFlag@sda21(r13)
/* 8003F934 0003B774 2C 00 00 00 */ cmpwi r0, 0x0
/* 8003F938 0003B778 41 82 00 6C */ beq lbl_8003F9A4
/* 8003F93C 0003B77C 3C C0 80 04 */ lis r6, cbForNandSeek1@ha
/* 8003F940 0003B780 38 7F 00 00 */ addi r3, r31, 0x0
/* 8003F944 0003B784 38 C6 F8 10 */ addi r6, r6, cbForNandSeek1@l
/* 8003F948 0003B788 38 FF 00 8C */ addi r7, r31, 0x8c
/* 8003F94C 0003B78C 38 80 00 80 */ li r4, 0x80
/* 8003F950 0003B790 38 A0 00 00 */ li r5, 0x0
/* 8003F954 0003B794 48 00 8C 3D */ bl NANDSeekAsync
/* 8003F958 0003B798 2C 03 00 00 */ cmpwi r3, 0x0
/* 8003F95C 0003B79C 41 82 00 BC */ beq lbl_8003FA18
/* 8003F960 0003B7A0 3C C0 80 04 */ lis r6, cbForNandSeek0@ha
/* 8003F964 0003B7A4 38 7F 00 00 */ addi r3, r31, 0x0
/* 8003F968 0003B7A8 38 C6 F7 70 */ addi r6, r6, cbForNandSeek0@l
/* 8003F96C 0003B7AC 38 FF 00 8C */ addi r7, r31, 0x8c
/* 8003F970 0003B7B0 38 80 00 00 */ li r4, 0x0
/* 8003F974 0003B7B4 38 A0 00 00 */ li r5, 0x0
/* 8003F978 0003B7B8 48 00 8C 19 */ bl NANDSeekAsync
/* 8003F97C 0003B7BC 2C 03 00 00 */ cmpwi r3, 0x0
/* 8003F980 0003B7C0 41 82 00 98 */ beq lbl_8003FA18
/* 8003F984 0003B7C4 81 8D E6 E0 */ lwz r12, Callback_8055CB00@sda21(r13)
/* 8003F988 0003B7C8 2C 0C 00 00 */ cmpwi r12, 0x0
/* 8003F98C 0003B7CC 41 82 00 8C */ beq lbl_8003FA18
/* 8003F990 0003B7D0 38 60 00 02 */ li r3, 0x2
/* 8003F994 0003B7D4 38 80 00 00 */ li r4, 0x0
/* 8003F998 0003B7D8 7D 89 03 A6 */ mtctr r12
/* 8003F99C 0003B7DC 4E 80 04 21 */ bctrl
/* 8003F9A0 0003B7E0 48 00 00 78 */ b lbl_8003FA18
.global lbl_8003F9A4
lbl_8003F9A4:
/* 8003F9A4 0003B7E4 38 BF 01 60 */ addi r5, r31, 0x160
/* 8003F9A8 0003B7E8 38 60 00 00 */ li r3, 0x0
/* 8003F9AC 0003B7EC 38 00 00 01 */ li r0, 0x1
/* 8003F9B0 0003B7F0 3C C0 80 04 */ lis r6, cbForNandWrite0@ha
/* 8003F9B4 0003B7F4 90 6D E6 DC */ stw r3, NextOffset@sda21(r13)
/* 8003F9B8 0003B7F8 38 7F 00 00 */ addi r3, r31, 0x0
/* 8003F9BC 0003B7FC 38 9F 01 E0 */ addi r4, r31, 0x1e0
/* 8003F9C0 0003B800 38 C6 F4 60 */ addi r6, r6, cbForNandWrite0@l
/* 8003F9C4 0003B804 90 05 00 18 */ stw r0, 0x18(r5)
/* 8003F9C8 0003B808 38 FF 00 8C */ addi r7, r31, 0x8c
/* 8003F9CC 0003B80C 38 A0 00 80 */ li r5, 0x80
/* 8003F9D0 0003B810 48 00 8A A1 */ bl NANDWriteAsync
/* 8003F9D4 0003B814 2C 03 00 00 */ cmpwi r3, 0x0
/* 8003F9D8 0003B818 41 82 00 40 */ beq lbl_8003FA18
/* 8003F9DC 0003B81C 81 8D E6 E0 */ lwz r12, Callback_8055CB00@sda21(r13)
/* 8003F9E0 0003B820 2C 0C 00 00 */ cmpwi r12, 0x0
/* 8003F9E4 0003B824 41 82 00 34 */ beq lbl_8003FA18
/* 8003F9E8 0003B828 38 60 00 02 */ li r3, 0x2
/* 8003F9EC 0003B82C 38 80 00 00 */ li r4, 0x0
/* 8003F9F0 0003B830 7D 89 03 A6 */ mtctr r12
/* 8003F9F4 0003B834 4E 80 04 21 */ bctrl
/* 8003F9F8 0003B838 48 00 00 20 */ b lbl_8003FA18
.global lbl_8003F9FC
lbl_8003F9FC:
/* 8003F9FC 0003B83C 81 8D E6 E0 */ lwz r12, Callback_8055CB00@sda21(r13)
/* 8003FA00 0003B840 2C 0C 00 00 */ cmpwi r12, 0x0
/* 8003FA04 0003B844 41 82 00 14 */ beq lbl_8003FA18
/* 8003FA08 0003B848 38 60 00 02 */ li r3, 0x2
/* 8003FA0C 0003B84C 38 80 00 00 */ li r4, 0x0
/* 8003FA10 0003B850 7D 89 03 A6 */ mtctr r12
/* 8003FA14 0003B854 4E 80 04 21 */ bctrl
.global lbl_8003FA18
lbl_8003FA18:
/* 8003FA18 0003B858 80 01 00 14 */ lwz r0, 0x14(r1)
/* 8003FA1C 0003B85C 83 E1 00 0C */ lwz r31, 0xc(r1)
/* 8003FA20 0003B860 7C 08 03 A6 */ mtlr r0
/* 8003FA24 0003B864 38 21 00 10 */ addi r1, r1, 0x10
/* 8003FA28 0003B868 4E 80 00 20 */ blr
/* 8003FA2C 0003B86C 00 00 00 00 */ .4byte 0x00000000
.global cbForNandCreate
cbForNandCreate:
/* 8003FA30 0003B870 94 21 FF F0 */ stwu r1, -0x10(r1)
/* 8003FA34 0003B874 7C 08 02 A6 */ mflr r0
/* 8003FA38 0003B878 2C 03 00 00 */ cmpwi r3, 0x0
/* 8003FA3C 0003B87C 90 01 00 14 */ stw r0, 0x14(r1)
/* 8003FA40 0003B880 41 82 00 14 */ beq lbl_8003FA54
/* 8003FA44 0003B884 2C 03 FF FA */ cmpwi r3, -0x6
/* 8003FA48 0003B888 40 82 00 5C */ bne lbl_8003FAA4
/* 8003FA4C 0003B88C 38 00 00 01 */ li r0, 0x1
/* 8003FA50 0003B890 90 0D E6 D8 */ stw r0, ExistFlag@sda21(r13)
.global lbl_8003FA54
lbl_8003FA54:
/* 8003FA54 0003B894 3C 60 80 43 */ lis r3, "@1459"@ha
/* 8003FA58 0003B898 3C 80 80 4A */ lis r4, NandInfo@ha
/* 8003FA5C 0003B89C 3C C0 80 04 */ lis r6, cbForNandOpen@ha
/* 8003FA60 0003B8A0 3C E0 80 4A */ lis r7, NandCb@ha
/* 8003FA64 0003B8A4 38 63 16 A8 */ addi r3, r3, "@1459"@l
/* 8003FA68 0003B8A8 38 84 FA E0 */ addi r4, r4, NandInfo@l
/* 8003FA6C 0003B8AC 38 C6 F9 10 */ addi r6, r6, cbForNandOpen@l
/* 8003FA70 0003B8B0 38 E7 FB 6C */ addi r7, r7, NandCb@l
/* 8003FA74 0003B8B4 38 A0 00 03 */ li r5, 0x3
/* 8003FA78 0003B8B8 48 00 9A D9 */ bl NANDPrivateOpenAsync
/* 8003FA7C 0003B8BC 2C 03 00 00 */ cmpwi r3, 0x0
/* 8003FA80 0003B8C0 41 82 00 40 */ beq lbl_8003FAC0
/* 8003FA84 0003B8C4 81 8D E6 E0 */ lwz r12, Callback_8055CB00@sda21(r13)
/* 8003FA88 0003B8C8 2C 0C 00 00 */ cmpwi r12, 0x0
/* 8003FA8C 0003B8CC 41 82 00 34 */ beq lbl_8003FAC0
/* 8003FA90 0003B8D0 38 60 00 02 */ li r3, 0x2
/* 8003FA94 0003B8D4 38 80 00 00 */ li r4, 0x0
/* 8003FA98 0003B8D8 7D 89 03 A6 */ mtctr r12
/* 8003FA9C 0003B8DC 4E 80 04 21 */ bctrl
/* 8003FAA0 0003B8E0 48 00 00 20 */ b lbl_8003FAC0
.global lbl_8003FAA4
lbl_8003FAA4:
/* 8003FAA4 0003B8E4 81 8D E6 E0 */ lwz r12, Callback_8055CB00@sda21(r13)
/* 8003FAA8 0003B8E8 2C 0C 00 00 */ cmpwi r12, 0x0
/* 8003FAAC 0003B8EC 41 82 00 14 */ beq lbl_8003FAC0
/* 8003FAB0 0003B8F0 38 60 00 02 */ li r3, 0x2
/* 8003FAB4 0003B8F4 38 80 00 00 */ li r4, 0x0
/* 8003FAB8 0003B8F8 7D 89 03 A6 */ mtctr r12
/* 8003FABC 0003B8FC 4E 80 04 21 */ bctrl
.global lbl_8003FAC0
lbl_8003FAC0:
/* 8003FAC0 0003B900 80 01 00 14 */ lwz r0, 0x14(r1)
/* 8003FAC4 0003B904 7C 08 03 A6 */ mtlr r0
/* 8003FAC8 0003B908 38 21 00 10 */ addi r1, r1, 0x10
/* 8003FACC 0003B90C 4E 80 00 20 */ blr
.global cbForNandCreateDir
cbForNandCreateDir:
/* 8003FAD0 0003B910 94 21 FF F0 */ stwu r1, -0x10(r1)
/* 8003FAD4 0003B914 7C 08 02 A6 */ mflr r0
/* 8003FAD8 0003B918 2C 03 00 00 */ cmpwi r3, 0x0
/* 8003FADC 0003B91C 90 01 00 14 */ stw r0, 0x14(r1)
/* 8003FAE0 0003B920 41 82 00 0C */ beq lbl_8003FAEC
/* 8003FAE4 0003B924 2C 03 FF FA */ cmpwi r3, -0x6
/* 8003FAE8 0003B928 40 82 00 50 */ bne lbl_8003FB38
.global lbl_8003FAEC
lbl_8003FAEC:
/* 8003FAEC 0003B92C 3C 60 80 43 */ lis r3, "@1459"@ha
/* 8003FAF0 0003B930 3C C0 80 04 */ lis r6, cbForNandCreate@ha
/* 8003FAF4 0003B934 3C E0 80 4A */ lis r7, NandCb@ha
/* 8003FAF8 0003B938 38 80 00 3F */ li r4, 0x3f
/* 8003FAFC 0003B93C 38 63 16 A8 */ addi r3, r3, "@1459"@l
/* 8003FB00 0003B940 38 C6 FA 30 */ addi r6, r6, cbForNandCreate@l
/* 8003FB04 0003B944 38 E7 FB 6C */ addi r7, r7, NandCb@l
/* 8003FB08 0003B948 38 A0 00 00 */ li r5, 0x0
/* 8003FB0C 0003B94C 48 00 85 75 */ bl NANDPrivateCreateAsync
/* 8003FB10 0003B950 2C 03 00 00 */ cmpwi r3, 0x0
/* 8003FB14 0003B954 41 82 00 40 */ beq lbl_8003FB54
/* 8003FB18 0003B958 81 8D E6 E0 */ lwz r12, Callback_8055CB00@sda21(r13)
/* 8003FB1C 0003B95C 2C 0C 00 00 */ cmpwi r12, 0x0
/* 8003FB20 0003B960 41 82 00 34 */ beq lbl_8003FB54
/* 8003FB24 0003B964 38 60 00 02 */ li r3, 0x2
/* 8003FB28 0003B968 38 80 00 00 */ li r4, 0x0
/* 8003FB2C 0003B96C 7D 89 03 A6 */ mtctr r12
/* 8003FB30 0003B970 4E 80 04 21 */ bctrl
/* 8003FB34 0003B974 48 00 00 20 */ b lbl_8003FB54
.global lbl_8003FB38
lbl_8003FB38:
/* 8003FB38 0003B978 81 8D E6 E0 */ lwz r12, Callback_8055CB00@sda21(r13)
/* 8003FB3C 0003B97C 2C 0C 00 00 */ cmpwi r12, 0x0
/* 8003FB40 0003B980 41 82 00 14 */ beq lbl_8003FB54
/* 8003FB44 0003B984 38 60 00 02 */ li r3, 0x2
/* 8003FB48 0003B988 38 80 00 00 */ li r4, 0x0
/* 8003FB4C 0003B98C 7D 89 03 A6 */ mtctr r12
/* 8003FB50 0003B990 4E 80 04 21 */ bctrl
.global lbl_8003FB54
lbl_8003FB54:
/* 8003FB54 0003B994 80 01 00 14 */ lwz r0, 0x14(r1)
/* 8003FB58 0003B998 7C 08 03 A6 */ mtlr r0
/* 8003FB5C 0003B99C 38 21 00 10 */ addi r1, r1, 0x10
/* 8003FB60 0003B9A0 4E 80 00 20 */ blr
/* 8003FB64 0003B9A4 00 00 00 00 */ .4byte 0x00000000
/* 8003FB68 0003B9A8 00 00 00 00 */ .4byte 0x00000000
/* 8003FB6C 0003B9AC 00 00 00 00 */ .4byte 0x00000000
.global cbForPrepareControlRegister
cbForPrepareControlRegister:
/* 8003FB70 0003B9B0 94 21 FF F0 */ stwu r1, -0x10(r1)
/* 8003FB74 0003B9B4 7C 08 02 A6 */ mflr r0
/* 8003FB78 0003B9B8 28 03 00 01 */ cmplwi r3, 0x1
/* 8003FB7C 0003B9BC 90 01 00 14 */ stw r0, 0x14(r1)
/* 8003FB80 0003B9C0 40 82 00 18 */ bne lbl_8003FB98
/* 8003FB84 0003B9C4 48 00 26 FD */ bl DVDLowGetControlRegister
/* 8003FB88 0003B9C8 3C 80 80 4A */ lis r4, __ErrorInfo@ha
/* 8003FB8C 0003B9CC 38 84 FC 40 */ addi r4, r4, __ErrorInfo@l
/* 8003FB90 0003B9D0 90 64 00 14 */ stw r3, 0x14(r4)
/* 8003FB94 0003B9D4 48 00 00 14 */ b lbl_8003FBA8
.global lbl_8003FB98
lbl_8003FB98:
/* 8003FB98 0003B9D8 3C 60 80 4A */ lis r3, __ErrorInfo@ha
/* 8003FB9C 0003B9DC 38 00 FF FF */ li r0, -0x1
/* 8003FBA0 0003B9E0 38 63 FC 40 */ addi r3, r3, __ErrorInfo@l
/* 8003FBA4 0003B9E4 90 03 00 14 */ stw r0, 0x14(r3)
.global lbl_8003FBA8
lbl_8003FBA8:
/* 8003FBA8 0003B9E8 3C 60 80 43 */ lis r3, "@1478"@ha
/* 8003FBAC 0003B9EC 3C C0 80 04 */ lis r6, cbForNandCreateDir@ha
/* 8003FBB0 0003B9F0 3C E0 80 4A */ lis r7, NandCb@ha
/* 8003FBB4 0003B9F4 38 80 00 3F */ li r4, 0x3f
/* 8003FBB8 0003B9F8 38 63 16 C4 */ addi r3, r3, "@1478"@l
/* 8003FBBC 0003B9FC 38 C6 FA D0 */ addi r6, r6, cbForNandCreateDir@l
/* 8003FBC0 0003BA00 38 E7 FB 6C */ addi r7, r7, NandCb@l
/* 8003FBC4 0003BA04 38 A0 00 00 */ li r5, 0x0
/* 8003FBC8 0003BA08 48 00 8C 99 */ bl NANDPrivateCreateDirAsync
/* 8003FBCC 0003BA0C 2C 03 00 00 */ cmpwi r3, 0x0
/* 8003FBD0 0003BA10 41 82 00 20 */ beq lbl_8003FBF0
/* 8003FBD4 0003BA14 81 8D E6 E0 */ lwz r12, Callback_8055CB00@sda21(r13)
/* 8003FBD8 0003BA18 2C 0C 00 00 */ cmpwi r12, 0x0
/* 8003FBDC 0003BA1C 41 82 00 14 */ beq lbl_8003FBF0
/* 8003FBE0 0003BA20 38 60 00 02 */ li r3, 0x2
/* 8003FBE4 0003BA24 38 80 00 00 */ li r4, 0x0
/* 8003FBE8 0003BA28 7D 89 03 A6 */ mtctr r12
/* 8003FBEC 0003BA2C 4E 80 04 21 */ bctrl
.global lbl_8003FBF0
lbl_8003FBF0:
/* 8003FBF0 0003BA30 80 01 00 14 */ lwz r0, 0x14(r1)
/* 8003FBF4 0003BA34 7C 08 03 A6 */ mtlr r0
/* 8003FBF8 0003BA38 38 21 00 10 */ addi r1, r1, 0x10
/* 8003FBFC 0003BA3C 4E 80 00 20 */ blr
.global cbForPrepareStatusRegister
cbForPrepareStatusRegister:
/* 8003FC00 0003BA40 94 21 FF F0 */ stwu r1, -0x10(r1)
/* 8003FC04 0003BA44 7C 08 02 A6 */ mflr r0
/* 8003FC08 0003BA48 28 03 00 01 */ cmplwi r3, 0x1
/* 8003FC0C 0003BA4C 90 01 00 14 */ stw r0, 0x14(r1)
/* 8003FC10 0003BA50 40 82 00 18 */ bne lbl_8003FC28
/* 8003FC14 0003BA54 48 00 26 5D */ bl DVDLowGetStatusRegister
/* 8003FC18 0003BA58 3C 80 80 4A */ lis r4, __ErrorInfo@ha
/* 8003FC1C 0003BA5C 38 84 FC 40 */ addi r4, r4, __ErrorInfo@l
/* 8003FC20 0003BA60 90 64 00 10 */ stw r3, 0x10(r4)
/* 8003FC24 0003BA64 48 00 00 14 */ b lbl_8003FC38
.global lbl_8003FC28
lbl_8003FC28:
/* 8003FC28 0003BA68 3C 60 80 4A */ lis r3, __ErrorInfo@ha
/* 8003FC2C 0003BA6C 38 00 FF FF */ li r0, -0x1
/* 8003FC30 0003BA70 38 63 FC 40 */ addi r3, r3, __ErrorInfo@l
/* 8003FC34 0003BA74 90 03 00 10 */ stw r0, 0x10(r3)
.global lbl_8003FC38
lbl_8003FC38:
/* 8003FC38 0003BA78 3C 60 80 04 */ lis r3, cbForPrepareControlRegister@ha
/* 8003FC3C 0003BA7C 38 63 FB 70 */ addi r3, r3, cbForPrepareControlRegister@l
/* 8003FC40 0003BA80 48 00 29 31 */ bl DVDLowPrepareControlRegister
/* 8003FC44 0003BA84 2C 03 00 00 */ cmpwi r3, 0x0
/* 8003FC48 0003BA88 40 82 00 20 */ bne lbl_8003FC68
/* 8003FC4C 0003BA8C 81 8D E6 E0 */ lwz r12, Callback_8055CB00@sda21(r13)
/* 8003FC50 0003BA90 2C 0C 00 00 */ cmpwi r12, 0x0
/* 8003FC54 0003BA94 41 82 00 14 */ beq lbl_8003FC68
/* 8003FC58 0003BA98 38 60 00 02 */ li r3, 0x2
/* 8003FC5C 0003BA9C 38 80 00 00 */ li r4, 0x0
/* 8003FC60 0003BAA0 7D 89 03 A6 */ mtctr r12
/* 8003FC64 0003BAA4 4E 80 04 21 */ bctrl
.global lbl_8003FC68
lbl_8003FC68:
/* 8003FC68 0003BAA8 80 01 00 14 */ lwz r0, 0x14(r1)
/* 8003FC6C 0003BAAC 7C 08 03 A6 */ mtlr r0
/* 8003FC70 0003BAB0 38 21 00 10 */ addi r1, r1, 0x10
/* 8003FC74 0003BAB4 4E 80 00 20 */ blr
/* 8003FC78 0003BAB8 00 00 00 00 */ .4byte 0x00000000
/* 8003FC7C 0003BABC 00 00 00 00 */ .4byte 0x00000000
.global __DVDStoreErrorCode
__DVDStoreErrorCode:
/* 8003FC80 0003BAC0 94 21 FF F0 */ stwu r1, -0x10(r1)
/* 8003FC84 0003BAC4 7C 08 02 A6 */ mflr r0
/* 8003FC88 0003BAC8 90 01 00 14 */ stw r0, 0x14(r1)
/* 8003FC8C 0003BACC 93 E1 00 0C */ stw r31, 0xc(r1)
/* 8003FC90 0003BAD0 3F E0 80 4A */ lis r31, __ErrorInfo@ha
/* 8003FC94 0003BAD4 3B FF FC 40 */ addi r31, r31, __ErrorInfo@l
/* 8003FC98 0003BAD8 93 C1 00 08 */ stw r30, 0x8(r1)
/* 8003FC9C 0003BADC 7C 9E 23 78 */ mr r30, r4
/* 8003FCA0 0003BAE0 90 7F 00 08 */ stw r3, 0x8(r31)
/* 8003FCA4 0003BAE4 4B FE 5E 9D */ bl OSGetTime
/* 8003FCA8 0003BAE8 3C C0 80 00 */ lis r6, 0x800000F8@ha
/* 8003FCAC 0003BAEC 38 A0 00 00 */ li r5, 0x0
/* 8003FCB0 0003BAF0 80 06 00 F8 */ lwz r0, 0x800000F8@l(r6)
/* 8003FCB4 0003BAF4 54 06 F0 BE */ srwi r6, r0, 2
/* 8003FCB8 0003BAF8 4B FC 77 D5 */ bl __div2i
/* 8003FCBC 0003BAFC 3C 60 80 04 */ lis r3, cbForPrepareStatusRegister@ha
/* 8003FCC0 0003BB00 90 9F 00 0C */ stw r4, 0xc(r31)
/* 8003FCC4 0003BB04 38 63 FC 00 */ addi r3, r3, cbForPrepareStatusRegister@l
/* 8003FCC8 0003BB08 93 CD E6 E0 */ stw r30, Callback_8055CB00@sda21(r13)
/* 8003FCCC 0003BB0C 48 00 27 35 */ bl DVDLowPrepareStatusRegister
/* 8003FCD0 0003BB10 80 01 00 14 */ lwz r0, 0x14(r1)
/* 8003FCD4 0003BB14 83 E1 00 0C */ lwz r31, 0xc(r1)
/* 8003FCD8 0003BB18 83 C1 00 08 */ lwz r30, 0x8(r1)
/* 8003FCDC 0003BB1C 7C 08 03 A6 */ mtlr r0
/* 8003FCE0 0003BB20 38 21 00 10 */ addi r1, r1, 0x10
/* 8003FCE4 0003BB24 4E 80 00 20 */ blr
/* 8003FCE8 0003BB28 00 00 00 00 */ .4byte 0x00000000
/* 8003FCEC 0003BB2C 00 00 00 00 */ .4byte 0x00000000
.include "macros.inc"
.section .data, "wa" # 0x80421040 - 0x80496700 ; 0x000756C0
.global "@1459"
"@1459":
.4byte 0x2F736861
.4byte 0x72656432
.4byte 0x2F746573
.4byte 0x74322F64
.4byte 0x76646572
.4byte 0x726F722E
.4byte 0x64617400
.global "@1478"
"@1478":
.4byte 0x2F736861
.4byte 0x72656432
.4byte 0x2F746573
.4byte 0x74320000
.4byte 0
.include "macros.inc"
.section .bss, "", @nobits # 0x80496700 - 0x80556420 ; 0x000BFD20
.global NandInfo
NandInfo:
.skip 0x8C
.global NandCb
NandCb:
.skip 0xD4
.global __ErrorInfo
__ErrorInfo:
.skip 0x100
.include "macros.inc"
.section .sbss, "", @nobits # 0x8055C6E0 - 0x8055DF80 ; 0x000018A0
.global ExistFlag
ExistFlag:
.skip 0x4
.global NextOffset
NextOffset:
.skip 0x4
.global Callback_8055CB00
Callback_8055CB00:
.skip 0x8