prime/asm/Dolphin/dvd/dvdlow.s

1092 lines
51 KiB
ArmAsm

.include "macros.inc"
.section .sdata
.balign 8
.global lbl_805A8A88
lbl_805A8A88:
# ROM: 0x3F6428
.4byte 0x00000001
.4byte 0
.section .bss
.balign 8
lbl_80540A80:
.skip 0x68
lbl_80540AE8:
.skip 0x78
.section .sbss
.balign 8
.global lbl_805A9768
lbl_805A9768:
.skip 0x4
.global lbl_805A976C
lbl_805A976C:
.skip 0x4
.global lbl_805A9770
lbl_805A9770:
.skip 0x4
.global lbl_805A9774
lbl_805A9774:
.skip 0x4
.global lbl_805A9778
lbl_805A9778:
.skip 0x4
.global lbl_805A977C
lbl_805A977C:
.skip 0x4
.global lbl_805A9780
lbl_805A9780:
.skip 0x4
.global lbl_805A9784
lbl_805A9784:
.skip 0x4
.global lbl_805A9788
lbl_805A9788:
.skip 0x4
.global lbl_805A978C
lbl_805A978C:
.skip 0x4
.global lbl_805A9790
lbl_805A9790:
.skip 0x8
.global lbl_805A9798
lbl_805A9798:
.skip 0x4
.global lbl_805A979C
lbl_805A979C:
.skip 0x4
.global lbl_805A97A0
lbl_805A97A0:
.skip 0x4
.global lbl_805A97A4
lbl_805A97A4:
.skip 0x4
.global lbl_805A97A8
lbl_805A97A8:
.skip 0x4
.global lbl_805A97AC
lbl_805A97AC:
.skip 0x4
.section .text, "ax"
.global __DVDInitWA
__DVDInitWA:
/* 803704A4 0036D404 7C 08 02 A6 */ mflr r0
/* 803704A8 0036D408 3C 60 80 54 */ lis r3, lbl_80540A80@ha
/* 803704AC 0036D40C 90 01 00 04 */ stw r0, 4(r1)
/* 803704B0 0036D410 38 00 00 00 */ li r0, 0
/* 803704B4 0036D414 38 80 00 00 */ li r4, 0
/* 803704B8 0036D418 94 21 FF F8 */ stwu r1, -8(r1)
/* 803704BC 0036D41C 90 0D AB EC */ stw r0, lbl_805A97AC@sda21(r13)
/* 803704C0 0036D420 38 00 FF FF */ li r0, -1
/* 803704C4 0036D424 90 03 0A 80 */ stw r0, lbl_80540A80@l(r3)
/* 803704C8 0036D428 38 60 00 00 */ li r3, 0
/* 803704CC 0036D42C 48 00 0D D5 */ bl __DVDLowSetWAType
/* 803704D0 0036D430 48 00 DB 95 */ bl OSInitAlarm
/* 803704D4 0036D434 80 01 00 0C */ lwz r0, 0xc(r1)
/* 803704D8 0036D438 38 21 00 08 */ addi r1, r1, 8
/* 803704DC 0036D43C 7C 08 03 A6 */ mtlr r0
/* 803704E0 0036D440 4E 80 00 20 */ blr
.global __DVDInterruptHandler
__DVDInterruptHandler:
/* 803704E4 0036D444 7C 08 02 A6 */ mflr r0
/* 803704E8 0036D448 3C 60 80 54 */ lis r3, lbl_80540A80@ha
/* 803704EC 0036D44C 90 01 00 04 */ stw r0, 4(r1)
/* 803704F0 0036D450 94 21 FD 10 */ stwu r1, -0x2f0(r1)
/* 803704F4 0036D454 BF 61 02 DC */ stmw r27, 0x2dc(r1)
/* 803704F8 0036D458 3B 84 00 00 */ addi r28, r4, 0
/* 803704FC 0036D45C 3B C3 0A 80 */ addi r30, r3, lbl_80540A80@l
/* 80370500 0036D460 3B A0 00 00 */ li r29, 0
/* 80370504 0036D464 80 0D AB E8 */ lwz r0, lbl_805A97A8@sda21(r13)
/* 80370508 0036D468 2C 00 00 00 */ cmpwi r0, 0
/* 8037050C 0036D46C 41 82 00 40 */ beq lbl_8037054C
/* 80370510 0036D470 48 01 4E B9 */ bl __OSGetSystemTime
/* 80370514 0036D474 90 8D AB DC */ stw r4, lbl_805A979C@sda21(r13)
/* 80370518 0036D478 38 00 00 00 */ li r0, 0
/* 8037051C 0036D47C 90 6D AB D8 */ stw r3, lbl_805A9798@sda21(r13)
/* 80370520 0036D480 90 0D 9E C8 */ stw r0, lbl_805A8A88@sda21(r13)
/* 80370524 0036D484 80 1E 00 C4 */ lwz r0, 0xc4(r30)
/* 80370528 0036D488 90 1E 00 B8 */ stw r0, 0xb8(r30)
/* 8037052C 0036D48C 80 1E 00 C8 */ lwz r0, 0xc8(r30)
/* 80370530 0036D490 90 1E 00 BC */ stw r0, 0xbc(r30)
/* 80370534 0036D494 80 1E 00 CC */ lwz r0, 0xcc(r30)
/* 80370538 0036D498 90 1E 00 C0 */ stw r0, 0xc0(r30)
/* 8037053C 0036D49C 80 0D AB A8 */ lwz r0, lbl_805A9768@sda21(r13)
/* 80370540 0036D4A0 2C 00 00 01 */ cmpwi r0, 1
/* 80370544 0036D4A4 40 82 00 08 */ bne lbl_8037054C
/* 80370548 0036D4A8 63 BD 00 08 */ ori r29, r29, 8
lbl_8037054C:
/* 8037054C 0036D4AC 38 00 00 00 */ li r0, 0
/* 80370550 0036D4B0 90 0D AB E8 */ stw r0, lbl_805A97A8@sda21(r13)
/* 80370554 0036D4B4 3C 60 CC 00 */ lis r3, 0xCC006000@ha
/* 80370558 0036D4B8 90 0D AB A8 */ stw r0, lbl_805A9768@sda21(r13)
/* 8037055C 0036D4BC 80 03 60 00 */ lwz r0, 0xCC006000@l(r3)
/* 80370560 0036D4C0 70 1F 00 2A */ andi. r31, r0, 0x2a
/* 80370564 0036D4C4 70 03 00 54 */ andi. r3, r0, 0x54
/* 80370568 0036D4C8 57 E0 08 3C */ slwi r0, r31, 1
/* 8037056C 0036D4CC 7C 7B 00 38 */ and r27, r3, r0
/* 80370570 0036D4D0 57 60 06 73 */ rlwinm. r0, r27, 0, 0x19, 0x19
/* 80370574 0036D4D4 41 82 00 08 */ beq lbl_8037057C
/* 80370578 0036D4D8 63 BD 00 08 */ ori r29, r29, 8
lbl_8037057C:
/* 8037057C 0036D4DC 57 60 06 F7 */ rlwinm. r0, r27, 0, 0x1b, 0x1b
/* 80370580 0036D4E0 41 82 00 08 */ beq lbl_80370588
/* 80370584 0036D4E4 63 BD 00 01 */ ori r29, r29, 1
lbl_80370588:
/* 80370588 0036D4E8 57 60 07 7B */ rlwinm. r0, r27, 0, 0x1d, 0x1d
/* 8037058C 0036D4EC 41 82 00 08 */ beq lbl_80370594
/* 80370590 0036D4F0 63 BD 00 02 */ ori r29, r29, 2
lbl_80370594:
/* 80370594 0036D4F4 28 1D 00 00 */ cmplwi r29, 0
/* 80370598 0036D4F8 41 82 00 14 */ beq lbl_803705AC
/* 8037059C 0036D4FC 38 00 00 00 */ li r0, 0
/* 803705A0 0036D500 90 0D AB C0 */ stw r0, lbl_805A9780@sda21(r13)
/* 803705A4 0036D504 38 7E 00 68 */ addi r3, r30, 0x68
/* 803705A8 0036D508 48 00 DE 4D */ bl OSCancelAlarm
lbl_803705AC:
/* 803705AC 0036D50C 7F 60 FB 78 */ or r0, r27, r31
/* 803705B0 0036D510 3F E0 CC 00 */ lis r31, 0xCC006000@ha
/* 803705B4 0036D514 90 1F 60 00 */ stw r0, 0xCC006000@l(r31)
/* 803705B8 0036D518 80 0D AB C0 */ lwz r0, lbl_805A9780@sda21(r13)
/* 803705BC 0036D51C 28 00 00 00 */ cmplwi r0, 0
/* 803705C0 0036D520 41 82 00 A0 */ beq lbl_80370660
/* 803705C4 0036D524 48 01 4E 05 */ bl __OSGetSystemTime
/* 803705C8 0036D528 3C A0 80 00 */ lis r5, 0x800000F8@ha
/* 803705CC 0036D52C 80 ED AB B8 */ lwz r7, lbl_805A9778@sda21(r13)
/* 803705D0 0036D530 80 C5 00 F8 */ lwz r6, 0x800000F8@l(r5)
/* 803705D4 0036D534 3C A0 10 62 */ lis r5, 0x10624DD3@ha
/* 803705D8 0036D538 38 A5 4D D3 */ addi r5, r5, 0x10624DD3@l
/* 803705DC 0036D53C 81 0D AB BC */ lwz r8, lbl_805A977C@sda21(r13)
/* 803705E0 0036D540 54 C6 F0 BE */ srwi r6, r6, 2
/* 803705E4 0036D544 7C A5 30 16 */ mulhwu r5, r5, r6
/* 803705E8 0036D548 54 A5 D1 BE */ srwi r5, r5, 6
/* 803705EC 0036D54C 1C A5 00 C8 */ mulli r5, r5, 0xc8
/* 803705F0 0036D550 7C C8 20 10 */ subfc r6, r8, r4
/* 803705F4 0036D554 7C 67 19 10 */ subfe r3, r7, r3
/* 803705F8 0036D558 38 00 00 00 */ li r0, 0
/* 803705FC 0036D55C 6C 64 80 00 */ xoris r4, r3, 0x8000
/* 80370600 0036D560 6C 03 80 00 */ xoris r3, r0, 0x8000
/* 80370604 0036D564 7C 05 30 10 */ subfc r0, r5, r6
/* 80370608 0036D568 7C 63 21 10 */ subfe r3, r3, r4
/* 8037060C 0036D56C 7C 64 21 10 */ subfe r3, r4, r4
/* 80370610 0036D570 7C 63 00 D1 */ neg. r3, r3
/* 80370614 0036D574 41 82 00 4C */ beq lbl_80370660
/* 80370618 0036D578 3B 7F 60 00 */ addi r27, r31, 0x6000
/* 8037061C 0036D57C 84 1B 00 04 */ lwzu r0, 4(r27)
/* 80370620 0036D580 54 03 07 7A */ rlwinm r3, r0, 0, 0x1d, 0x1d
/* 80370624 0036D584 54 00 0F 7A */ rlwinm r0, r0, 1, 0x1d, 0x1d
/* 80370628 0036D588 7C 60 00 38 */ and r0, r3, r0
/* 8037062C 0036D58C 54 00 07 7B */ rlwinm. r0, r0, 0, 0x1d, 0x1d
/* 80370630 0036D590 41 82 00 24 */ beq lbl_80370654
/* 80370634 0036D594 81 8D AB B4 */ lwz r12, lbl_805A9774@sda21(r13)
/* 80370638 0036D598 28 0C 00 00 */ cmplwi r12, 0
/* 8037063C 0036D59C 41 82 00 10 */ beq lbl_8037064C
/* 80370640 0036D5A0 7D 88 03 A6 */ mtlr r12
/* 80370644 0036D5A4 38 60 00 04 */ li r3, 4
/* 80370648 0036D5A8 4E 80 00 21 */ blrl
lbl_8037064C:
/* 8037064C 0036D5AC 38 00 00 00 */ li r0, 0
/* 80370650 0036D5B0 90 0D AB B4 */ stw r0, lbl_805A9774@sda21(r13)
lbl_80370654:
/* 80370654 0036D5B4 80 1B 00 00 */ lwz r0, 0(r27)
/* 80370658 0036D5B8 90 1B 00 00 */ stw r0, 0(r27)
/* 8037065C 0036D5BC 48 00 00 58 */ b lbl_803706B4
lbl_80370660:
/* 80370660 0036D5C0 80 0D AB C4 */ lwz r0, lbl_805A9784@sda21(r13)
/* 80370664 0036D5C4 2C 00 00 00 */ cmpwi r0, 0
/* 80370668 0036D5C8 41 82 00 40 */ beq lbl_803706A8
/* 8037066C 0036D5CC 3C 60 CC 00 */ lis r3, 0xCC006000@ha
/* 80370670 0036D5D0 38 A3 60 00 */ addi r5, r3, 0xCC006000@l
/* 80370674 0036D5D4 84 05 00 04 */ lwzu r0, 4(r5)
/* 80370678 0036D5D8 54 04 07 BC */ rlwinm r4, r0, 0, 0x1e, 0x1e
/* 8037067C 0036D5DC 54 03 07 7A */ rlwinm r3, r0, 0, 0x1d, 0x1d
/* 80370680 0036D5E0 54 00 0F 7A */ rlwinm r0, r0, 1, 0x1d, 0x1d
/* 80370684 0036D5E4 7C 63 00 38 */ and r3, r3, r0
/* 80370688 0036D5E8 54 60 07 7B */ rlwinm. r0, r3, 0, 0x1d, 0x1d
/* 8037068C 0036D5EC 41 82 00 08 */ beq lbl_80370694
/* 80370690 0036D5F0 63 BD 00 04 */ ori r29, r29, 4
lbl_80370694:
/* 80370694 0036D5F4 7C 60 23 78 */ or r0, r3, r4
/* 80370698 0036D5F8 90 05 00 00 */ stw r0, 0(r5)
/* 8037069C 0036D5FC 38 00 00 00 */ li r0, 0
/* 803706A0 0036D600 90 0D AB C4 */ stw r0, lbl_805A9784@sda21(r13)
/* 803706A4 0036D604 48 00 00 10 */ b lbl_803706B4
lbl_803706A8:
/* 803706A8 0036D608 3C 60 CC 00 */ lis r3, 0xCC006004@ha
/* 803706AC 0036D60C 38 00 00 00 */ li r0, 0
/* 803706B0 0036D610 90 03 60 04 */ stw r0, 0xCC006004@l(r3)
lbl_803706B4:
/* 803706B4 0036D614 57 A0 07 39 */ rlwinm. r0, r29, 0, 0x1c, 0x1c
/* 803706B8 0036D618 41 82 00 14 */ beq lbl_803706CC
/* 803706BC 0036D61C 80 0D AB C8 */ lwz r0, lbl_805A9788@sda21(r13)
/* 803706C0 0036D620 2C 00 00 00 */ cmpwi r0, 0
/* 803706C4 0036D624 40 82 00 08 */ bne lbl_803706CC
/* 803706C8 0036D628 57 BD 07 76 */ rlwinm r29, r29, 0, 0x1d, 0x1b
lbl_803706CC:
/* 803706CC 0036D62C 57 A0 07 FF */ clrlwi. r0, r29, 0x1f
/* 803706D0 0036D630 41 82 00 80 */ beq lbl_80370750
/* 803706D4 0036D634 80 0D AB EC */ lwz r0, lbl_805A97AC@sda21(r13)
/* 803706D8 0036D638 1C 00 00 14 */ mulli r0, r0, 0x14
/* 803706DC 0036D63C 7C 7E 00 2E */ lwzx r3, r30, r0
/* 803706E0 0036D640 2C 03 00 01 */ cmpwi r3, 1
/* 803706E4 0036D644 40 82 00 30 */ bne lbl_80370714
/* 803706E8 0036D648 80 6D AB EC */ lwz r3, lbl_805A97AC@sda21(r13)
/* 803706EC 0036D64C 7C DE 02 14 */ add r6, r30, r0
/* 803706F0 0036D650 38 03 00 01 */ addi r0, r3, 1
/* 803706F4 0036D654 90 0D AB EC */ stw r0, lbl_805A97AC@sda21(r13)
/* 803706F8 0036D658 80 66 00 04 */ lwz r3, 4(r6)
/* 803706FC 0036D65C 80 86 00 08 */ lwz r4, 8(r6)
/* 80370700 0036D660 80 A6 00 0C */ lwz r5, 0xc(r6)
/* 80370704 0036D664 80 C6 00 10 */ lwz r6, 0x10(r6)
/* 80370708 0036D668 48 00 01 B1 */ bl Read
/* 8037070C 0036D66C 38 00 00 01 */ li r0, 1
/* 80370710 0036D670 48 00 00 34 */ b lbl_80370744
lbl_80370714:
/* 80370714 0036D674 2C 03 00 02 */ cmpwi r3, 2
/* 80370718 0036D678 40 82 00 28 */ bne lbl_80370740
/* 8037071C 0036D67C 80 6D AB EC */ lwz r3, lbl_805A97AC@sda21(r13)
/* 80370720 0036D680 7C 9E 02 14 */ add r4, r30, r0
/* 80370724 0036D684 38 03 00 01 */ addi r0, r3, 1
/* 80370728 0036D688 90 0D AB EC */ stw r0, lbl_805A97AC@sda21(r13)
/* 8037072C 0036D68C 80 64 00 0C */ lwz r3, 0xc(r4)
/* 80370730 0036D690 80 84 00 10 */ lwz r4, 0x10(r4)
/* 80370734 0036D694 48 00 05 AD */ bl DVDLowSeek
/* 80370738 0036D698 38 00 00 01 */ li r0, 1
/* 8037073C 0036D69C 48 00 00 08 */ b lbl_80370744
lbl_80370740:
/* 80370740 0036D6A0 38 00 00 00 */ li r0, 0
lbl_80370744:
/* 80370744 0036D6A4 2C 00 00 00 */ cmpwi r0, 0
/* 80370748 0036D6A8 41 82 00 18 */ beq lbl_80370760
/* 8037074C 0036D6AC 48 00 00 64 */ b lbl_803707B0
lbl_80370750:
/* 80370750 0036D6B0 38 00 FF FF */ li r0, -1
/* 80370754 0036D6B4 90 1E 00 00 */ stw r0, 0(r30)
/* 80370758 0036D6B8 38 00 00 00 */ li r0, 0
/* 8037075C 0036D6BC 90 0D AB EC */ stw r0, lbl_805A97AC@sda21(r13)
lbl_80370760:
/* 80370760 0036D6C0 38 61 00 10 */ addi r3, r1, 0x10
/* 80370764 0036D6C4 48 00 EE B1 */ bl OSClearContext
/* 80370768 0036D6C8 38 61 00 10 */ addi r3, r1, 0x10
/* 8037076C 0036D6CC 48 00 EC B1 */ bl OSSetCurrentContext
/* 80370770 0036D6D0 28 1D 00 00 */ cmplwi r29, 0
/* 80370774 0036D6D4 41 82 00 2C */ beq lbl_803707A0
/* 80370778 0036D6D8 81 8D AB B0 */ lwz r12, lbl_805A9770@sda21(r13)
/* 8037077C 0036D6DC 38 00 00 00 */ li r0, 0
/* 80370780 0036D6E0 28 0C 00 00 */ cmplwi r12, 0
/* 80370784 0036D6E4 90 0D AB B0 */ stw r0, lbl_805A9770@sda21(r13)
/* 80370788 0036D6E8 41 82 00 10 */ beq lbl_80370798
/* 8037078C 0036D6EC 7D 88 03 A6 */ mtlr r12
/* 80370790 0036D6F0 38 7D 00 00 */ addi r3, r29, 0
/* 80370794 0036D6F4 4E 80 00 21 */ blrl
lbl_80370798:
/* 80370798 0036D6F8 38 00 00 00 */ li r0, 0
/* 8037079C 0036D6FC 90 0D AB C8 */ stw r0, lbl_805A9788@sda21(r13)
lbl_803707A0:
/* 803707A0 0036D700 38 61 00 10 */ addi r3, r1, 0x10
/* 803707A4 0036D704 48 00 EE 71 */ bl OSClearContext
/* 803707A8 0036D708 7F 83 E3 78 */ mr r3, r28
/* 803707AC 0036D70C 48 00 EC 71 */ bl OSSetCurrentContext
lbl_803707B0:
/* 803707B0 0036D710 BB 61 02 DC */ lmw r27, 0x2dc(r1)
/* 803707B4 0036D714 80 01 02 F4 */ lwz r0, 0x2f4(r1)
/* 803707B8 0036D718 38 21 02 F0 */ addi r1, r1, 0x2f0
/* 803707BC 0036D71C 7C 08 03 A6 */ mtlr r0
/* 803707C0 0036D720 4E 80 00 20 */ blr
.global AlarmHandler
AlarmHandler:
/* 803707C4 0036D724 7C 08 02 A6 */ mflr r0
/* 803707C8 0036D728 3C 60 80 54 */ lis r3, lbl_80540A80@ha
/* 803707CC 0036D72C 90 01 00 04 */ stw r0, 4(r1)
/* 803707D0 0036D730 38 83 0A 80 */ addi r4, r3, lbl_80540A80@l
/* 803707D4 0036D734 94 21 FF F8 */ stwu r1, -8(r1)
/* 803707D8 0036D738 80 0D AB EC */ lwz r0, lbl_805A97AC@sda21(r13)
/* 803707DC 0036D73C 1C 00 00 14 */ mulli r0, r0, 0x14
/* 803707E0 0036D740 7C 64 00 2E */ lwzx r3, r4, r0
/* 803707E4 0036D744 2C 03 00 01 */ cmpwi r3, 1
/* 803707E8 0036D748 40 82 00 2C */ bne lbl_80370814
/* 803707EC 0036D74C 80 6D AB EC */ lwz r3, lbl_805A97AC@sda21(r13)
/* 803707F0 0036D750 7C C4 02 14 */ add r6, r4, r0
/* 803707F4 0036D754 38 03 00 01 */ addi r0, r3, 1
/* 803707F8 0036D758 90 0D AB EC */ stw r0, lbl_805A97AC@sda21(r13)
/* 803707FC 0036D75C 80 66 00 04 */ lwz r3, 4(r6)
/* 80370800 0036D760 80 86 00 08 */ lwz r4, 8(r6)
/* 80370804 0036D764 80 A6 00 0C */ lwz r5, 0xc(r6)
/* 80370808 0036D768 80 C6 00 10 */ lwz r6, 0x10(r6)
/* 8037080C 0036D76C 48 00 00 AD */ bl Read
/* 80370810 0036D770 48 00 00 28 */ b lbl_80370838
lbl_80370814:
/* 80370814 0036D774 2C 03 00 02 */ cmpwi r3, 2
/* 80370818 0036D778 40 82 00 20 */ bne lbl_80370838
/* 8037081C 0036D77C 80 6D AB EC */ lwz r3, lbl_805A97AC@sda21(r13)
/* 80370820 0036D780 7C 84 02 14 */ add r4, r4, r0
/* 80370824 0036D784 38 03 00 01 */ addi r0, r3, 1
/* 80370828 0036D788 90 0D AB EC */ stw r0, lbl_805A97AC@sda21(r13)
/* 8037082C 0036D78C 80 64 00 0C */ lwz r3, 0xc(r4)
/* 80370830 0036D790 80 84 00 10 */ lwz r4, 0x10(r4)
/* 80370834 0036D794 48 00 04 AD */ bl DVDLowSeek
lbl_80370838:
/* 80370838 0036D798 80 01 00 0C */ lwz r0, 0xc(r1)
/* 8037083C 0036D79C 38 21 00 08 */ addi r1, r1, 8
/* 80370840 0036D7A0 7C 08 03 A6 */ mtlr r0
/* 80370844 0036D7A4 4E 80 00 20 */ blr
.global AlarmHandlerForTimeout
AlarmHandlerForTimeout:
/* 80370848 0036D7A8 7C 08 02 A6 */ mflr r0
/* 8037084C 0036D7AC 38 60 04 00 */ li r3, 0x400
/* 80370850 0036D7B0 90 01 00 04 */ stw r0, 4(r1)
/* 80370854 0036D7B4 94 21 FD 20 */ stwu r1, -0x2e0(r1)
/* 80370858 0036D7B8 93 E1 02 DC */ stw r31, 0x2dc(r1)
/* 8037085C 0036D7BC 3B E4 00 00 */ addi r31, r4, 0
/* 80370860 0036D7C0 48 01 11 C9 */ bl __OSMaskInterrupts
/* 80370864 0036D7C4 38 61 00 10 */ addi r3, r1, 0x10
/* 80370868 0036D7C8 48 00 ED AD */ bl OSClearContext
/* 8037086C 0036D7CC 38 61 00 10 */ addi r3, r1, 0x10
/* 80370870 0036D7D0 48 00 EB AD */ bl OSSetCurrentContext
/* 80370874 0036D7D4 81 8D AB B0 */ lwz r12, lbl_805A9770@sda21(r13)
/* 80370878 0036D7D8 38 00 00 00 */ li r0, 0
/* 8037087C 0036D7DC 28 0C 00 00 */ cmplwi r12, 0
/* 80370880 0036D7E0 90 0D AB B0 */ stw r0, lbl_805A9770@sda21(r13)
/* 80370884 0036D7E4 41 82 00 10 */ beq lbl_80370894
/* 80370888 0036D7E8 7D 88 03 A6 */ mtlr r12
/* 8037088C 0036D7EC 38 60 00 10 */ li r3, 0x10
/* 80370890 0036D7F0 4E 80 00 21 */ blrl
lbl_80370894:
/* 80370894 0036D7F4 38 61 00 10 */ addi r3, r1, 0x10
/* 80370898 0036D7F8 48 00 ED 7D */ bl OSClearContext
/* 8037089C 0036D7FC 7F E3 FB 78 */ mr r3, r31
/* 803708A0 0036D800 48 00 EB 7D */ bl OSSetCurrentContext
/* 803708A4 0036D804 80 01 02 E4 */ lwz r0, 0x2e4(r1)
/* 803708A8 0036D808 83 E1 02 DC */ lwz r31, 0x2dc(r1)
/* 803708AC 0036D80C 38 21 02 E0 */ addi r1, r1, 0x2e0
/* 803708B0 0036D810 7C 08 03 A6 */ mtlr r0
/* 803708B4 0036D814 4E 80 00 20 */ blr
.global Read
Read:
/* 803708B8 0036D818 7C 08 02 A6 */ mflr r0
/* 803708BC 0036D81C 90 01 00 04 */ stw r0, 4(r1)
/* 803708C0 0036D820 38 00 00 00 */ li r0, 0
/* 803708C4 0036D824 94 21 FF D8 */ stwu r1, -0x28(r1)
/* 803708C8 0036D828 93 E1 00 24 */ stw r31, 0x24(r1)
/* 803708CC 0036D82C 93 C1 00 20 */ stw r30, 0x20(r1)
/* 803708D0 0036D830 3B C5 00 00 */ addi r30, r5, 0
/* 803708D4 0036D834 93 A1 00 1C */ stw r29, 0x1c(r1)
/* 803708D8 0036D838 3B A4 00 00 */ addi r29, r4, 0
/* 803708DC 0036D83C 93 81 00 18 */ stw r28, 0x18(r1)
/* 803708E0 0036D840 3B 83 00 00 */ addi r28, r3, 0
/* 803708E4 0036D844 90 0D AB A8 */ stw r0, lbl_805A9768@sda21(r13)
/* 803708E8 0036D848 38 00 00 01 */ li r0, 1
/* 803708EC 0036D84C 90 CD AB B0 */ stw r6, lbl_805A9770@sda21(r13)
/* 803708F0 0036D850 3C C0 80 54 */ lis r6, lbl_80540A80@ha
/* 803708F4 0036D854 3B E6 0A 80 */ addi r31, r6, lbl_80540A80@l
/* 803708F8 0036D858 90 0D AB E8 */ stw r0, lbl_805A97A8@sda21(r13)
/* 803708FC 0036D85C 48 01 4A CD */ bl __OSGetSystemTime
/* 80370900 0036D860 90 8D AB E4 */ stw r4, lbl_805A97A4@sda21(r13)
/* 80370904 0036D864 3C 80 CC 00 */ lis r4, 0xCC006000@ha
/* 80370908 0036D868 3C 00 00 A0 */ lis r0, 0xa0
/* 8037090C 0036D86C 90 6D AB E0 */ stw r3, lbl_805A97A0@sda21(r13)
/* 80370910 0036D870 38 84 60 00 */ addi r4, r4, 0xCC006000@l
/* 80370914 0036D874 3C 60 A8 00 */ lis r3, 0xa800
/* 80370918 0036D878 90 64 00 08 */ stw r3, 8(r4)
/* 8037091C 0036D87C 57 C3 F0 BE */ srwi r3, r30, 2
/* 80370920 0036D880 7C 1D 00 40 */ cmplw r29, r0
/* 80370924 0036D884 90 64 00 0C */ stw r3, 0xc(r4)
/* 80370928 0036D888 38 00 00 03 */ li r0, 3
/* 8037092C 0036D88C 93 A4 00 10 */ stw r29, 0x10(r4)
/* 80370930 0036D890 93 84 00 14 */ stw r28, 0x14(r4)
/* 80370934 0036D894 93 A4 00 18 */ stw r29, 0x18(r4)
/* 80370938 0036D898 93 AD AB AC */ stw r29, lbl_805A976C@sda21(r13)
/* 8037093C 0036D89C 90 04 00 1C */ stw r0, 0x1c(r4)
/* 80370940 0036D8A0 40 81 00 38 */ ble lbl_80370978
/* 80370944 0036D8A4 3C 60 80 00 */ lis r3, 0x800000F8@ha
/* 80370948 0036D8A8 80 03 00 F8 */ lwz r0, 0x800000F8@l(r3)
/* 8037094C 0036D8AC 38 7F 00 68 */ addi r3, r31, 0x68
/* 80370950 0036D8B0 54 00 F0 BE */ srwi r0, r0, 2
/* 80370954 0036D8B4 1F C0 00 14 */ mulli r30, r0, 0x14
/* 80370958 0036D8B8 48 00 D7 59 */ bl OSCreateAlarm
/* 8037095C 0036D8BC 3C 60 80 37 */ lis r3, AlarmHandlerForTimeout@ha
/* 80370960 0036D8C0 38 E3 08 48 */ addi r7, r3, AlarmHandlerForTimeout@l
/* 80370964 0036D8C4 38 DE 00 00 */ addi r6, r30, 0
/* 80370968 0036D8C8 38 7F 00 68 */ addi r3, r31, 0x68
/* 8037096C 0036D8CC 38 A0 00 00 */ li r5, 0
/* 80370970 0036D8D0 48 00 D9 A1 */ bl OSSetAlarm
/* 80370974 0036D8D4 48 00 00 34 */ b lbl_803709A8
lbl_80370978:
/* 80370978 0036D8D8 3C 60 80 00 */ lis r3, 0x800000F8@ha
/* 8037097C 0036D8DC 80 03 00 F8 */ lwz r0, 0x800000F8@l(r3)
/* 80370980 0036D8E0 38 7F 00 68 */ addi r3, r31, 0x68
/* 80370984 0036D8E4 54 00 F0 BE */ srwi r0, r0, 2
/* 80370988 0036D8E8 1F C0 00 0A */ mulli r30, r0, 0xa
/* 8037098C 0036D8EC 48 00 D7 25 */ bl OSCreateAlarm
/* 80370990 0036D8F0 3C 60 80 37 */ lis r3, AlarmHandlerForTimeout@ha
/* 80370994 0036D8F4 38 E3 08 48 */ addi r7, r3, AlarmHandlerForTimeout@l
/* 80370998 0036D8F8 38 DE 00 00 */ addi r6, r30, 0
/* 8037099C 0036D8FC 38 7F 00 68 */ addi r3, r31, 0x68
/* 803709A0 0036D900 38 A0 00 00 */ li r5, 0
/* 803709A4 0036D904 48 00 D9 6D */ bl OSSetAlarm
lbl_803709A8:
/* 803709A8 0036D908 80 01 00 2C */ lwz r0, 0x2c(r1)
/* 803709AC 0036D90C 83 E1 00 24 */ lwz r31, 0x24(r1)
/* 803709B0 0036D910 83 C1 00 20 */ lwz r30, 0x20(r1)
/* 803709B4 0036D914 83 A1 00 1C */ lwz r29, 0x1c(r1)
/* 803709B8 0036D918 83 81 00 18 */ lwz r28, 0x18(r1)
/* 803709BC 0036D91C 38 21 00 28 */ addi r1, r1, 0x28
/* 803709C0 0036D920 7C 08 03 A6 */ mtlr r0
/* 803709C4 0036D924 4E 80 00 20 */ blr
.global SeekTwiceBeforeRead
SeekTwiceBeforeRead:
/* 803709C8 0036D928 7C 08 02 A6 */ mflr r0
/* 803709CC 0036D92C 3C E0 80 54 */ lis r7, lbl_80540A80@ha
/* 803709D0 0036D930 90 01 00 04 */ stw r0, 4(r1)
/* 803709D4 0036D934 54 A8 00 21 */ rlwinm. r8, r5, 0, 0, 0x10
/* 803709D8 0036D938 39 27 0A 80 */ addi r9, r7, lbl_80540A80@l
/* 803709DC 0036D93C 94 21 FF F8 */ stwu r1, -8(r1)
/* 803709E0 0036D940 40 82 00 0C */ bne lbl_803709EC
/* 803709E4 0036D944 39 40 00 00 */ li r10, 0
/* 803709E8 0036D948 48 00 00 0C */ b lbl_803709F4
lbl_803709EC:
/* 803709EC 0036D94C 80 0D AB D0 */ lwz r0, lbl_805A9790@sda21(r13)
/* 803709F0 0036D950 7D 48 02 14 */ add r10, r8, r0
lbl_803709F4:
/* 803709F4 0036D954 38 00 00 02 */ li r0, 2
/* 803709F8 0036D958 90 09 00 00 */ stw r0, 0(r9)
/* 803709FC 0036D95C 39 00 00 01 */ li r8, 1
/* 80370A00 0036D960 38 E0 FF FF */ li r7, -1
/* 80370A04 0036D964 91 49 00 0C */ stw r10, 0xc(r9)
/* 80370A08 0036D968 38 00 00 00 */ li r0, 0
/* 80370A0C 0036D96C 90 C9 00 10 */ stw r6, 0x10(r9)
/* 80370A10 0036D970 91 09 00 14 */ stw r8, 0x14(r9)
/* 80370A14 0036D974 90 69 00 18 */ stw r3, 0x18(r9)
/* 80370A18 0036D978 7D 43 53 78 */ mr r3, r10
/* 80370A1C 0036D97C 90 89 00 1C */ stw r4, 0x1c(r9)
/* 80370A20 0036D980 7C C4 33 78 */ mr r4, r6
/* 80370A24 0036D984 90 A9 00 20 */ stw r5, 0x20(r9)
/* 80370A28 0036D988 90 C9 00 24 */ stw r6, 0x24(r9)
/* 80370A2C 0036D98C 90 E9 00 28 */ stw r7, 0x28(r9)
/* 80370A30 0036D990 90 0D AB EC */ stw r0, lbl_805A97AC@sda21(r13)
/* 80370A34 0036D994 48 00 02 AD */ bl DVDLowSeek
/* 80370A38 0036D998 80 01 00 0C */ lwz r0, 0xc(r1)
/* 80370A3C 0036D99C 38 21 00 08 */ addi r1, r1, 8
/* 80370A40 0036D9A0 7C 08 03 A6 */ mtlr r0
/* 80370A44 0036D9A4 4E 80 00 20 */ blr
.global DVDLowRead
DVDLowRead:
/* 80370A48 0036D9A8 7C 08 02 A6 */ mflr r0
/* 80370A4C 0036D9AC 3C E0 CC 00 */ lis r7, 0xCC006000@ha
/* 80370A50 0036D9B0 90 01 00 04 */ stw r0, 4(r1)
/* 80370A54 0036D9B4 94 21 FF C0 */ stwu r1, -0x40(r1)
/* 80370A58 0036D9B8 BE C1 00 18 */ stmw r22, 0x18(r1)
/* 80370A5C 0036D9BC 3B 24 00 00 */ addi r25, r4, 0
/* 80370A60 0036D9C0 38 87 60 00 */ addi r4, r7, 0xCC006000@l
/* 80370A64 0036D9C4 3C E0 80 54 */ lis r7, lbl_80540A80@ha
/* 80370A68 0036D9C8 3B E7 0A 80 */ addi r31, r7, lbl_80540A80@l
/* 80370A6C 0036D9CC 3B 03 00 00 */ addi r24, r3, 0
/* 80370A70 0036D9D0 3B 45 00 00 */ addi r26, r5, 0
/* 80370A74 0036D9D4 3B DF 00 CC */ addi r30, r31, 0xcc
/* 80370A78 0036D9D8 7C DB 33 78 */ mr r27, r6
/* 80370A7C 0036D9DC 93 24 00 18 */ stw r25, 0x18(r4)
/* 80370A80 0036D9E0 93 1F 00 C4 */ stw r24, 0xc4(r31)
/* 80370A84 0036D9E4 93 3F 00 C8 */ stw r25, 0xc8(r31)
/* 80370A88 0036D9E8 93 5F 00 CC */ stw r26, 0xcc(r31)
/* 80370A8C 0036D9EC 80 0D AB CC */ lwz r0, lbl_805A978C@sda21(r13)
/* 80370A90 0036D9F0 28 00 00 00 */ cmplwi r0, 0
/* 80370A94 0036D9F4 40 82 00 2C */ bne lbl_80370AC0
/* 80370A98 0036D9F8 38 00 FF FF */ li r0, -1
/* 80370A9C 0036D9FC 90 1F 00 00 */ stw r0, 0(r31)
/* 80370AA0 0036DA00 38 00 00 00 */ li r0, 0
/* 80370AA4 0036DA04 38 78 00 00 */ addi r3, r24, 0
/* 80370AA8 0036DA08 90 0D AB EC */ stw r0, lbl_805A97AC@sda21(r13)
/* 80370AAC 0036DA0C 38 99 00 00 */ addi r4, r25, 0
/* 80370AB0 0036DA10 38 BA 00 00 */ addi r5, r26, 0
/* 80370AB4 0036DA14 38 DB 00 00 */ addi r6, r27, 0
/* 80370AB8 0036DA18 4B FF FE 01 */ bl Read
/* 80370ABC 0036DA1C 48 00 02 0C */ b lbl_80370CC8
lbl_80370AC0:
/* 80370AC0 0036DA20 80 0D AB CC */ lwz r0, lbl_805A978C@sda21(r13)
/* 80370AC4 0036DA24 28 00 00 01 */ cmplwi r0, 1
/* 80370AC8 0036DA28 40 82 02 00 */ bne lbl_80370CC8
/* 80370ACC 0036DA2C 80 0D 9E C8 */ lwz r0, lbl_805A8A88@sda21(r13)
/* 80370AD0 0036DA30 2C 00 00 00 */ cmpwi r0, 0
/* 80370AD4 0036DA34 41 82 00 1C */ beq lbl_80370AF0
/* 80370AD8 0036DA38 38 78 00 00 */ addi r3, r24, 0
/* 80370ADC 0036DA3C 38 99 00 00 */ addi r4, r25, 0
/* 80370AE0 0036DA40 38 BA 00 00 */ addi r5, r26, 0
/* 80370AE4 0036DA44 38 DB 00 00 */ addi r6, r27, 0
/* 80370AE8 0036DA48 4B FF FE E1 */ bl SeekTwiceBeforeRead
/* 80370AEC 0036DA4C 48 00 01 DC */ b lbl_80370CC8
lbl_80370AF0:
/* 80370AF0 0036DA50 3B BF 00 BC */ addi r29, r31, 0xbc
/* 80370AF4 0036DA54 80 1E 00 00 */ lwz r0, 0(r30)
/* 80370AF8 0036DA58 3B 9F 00 C0 */ addi r28, r31, 0xc0
/* 80370AFC 0036DA5C 80 7F 00 BC */ lwz r3, 0xbc(r31)
/* 80370B00 0036DA60 80 9F 00 C0 */ lwz r4, 0xc0(r31)
/* 80370B04 0036DA64 54 17 8B FE */ srwi r23, r0, 0xf
/* 80370B08 0036DA68 38 03 FF FF */ addi r0, r3, -1
/* 80370B0C 0036DA6C 7C 04 02 14 */ add r0, r4, r0
/* 80370B10 0036DA70 54 16 8B FE */ srwi r22, r0, 0xf
/* 80370B14 0036DA74 48 00 3B 9D */ bl DVDGetCurrentDiskID
/* 80370B18 0036DA78 88 03 00 08 */ lbz r0, 8(r3)
/* 80370B1C 0036DA7C 28 00 00 00 */ cmplwi r0, 0
/* 80370B20 0036DA80 41 82 00 0C */ beq lbl_80370B2C
/* 80370B24 0036DA84 38 00 00 01 */ li r0, 1
/* 80370B28 0036DA88 48 00 00 08 */ b lbl_80370B30
lbl_80370B2C:
/* 80370B2C 0036DA8C 38 00 00 00 */ li r0, 0
lbl_80370B30:
/* 80370B30 0036DA90 2C 00 00 00 */ cmpwi r0, 0
/* 80370B34 0036DA94 41 82 00 0C */ beq lbl_80370B40
/* 80370B38 0036DA98 38 60 00 05 */ li r3, 5
/* 80370B3C 0036DA9C 48 00 00 08 */ b lbl_80370B44
lbl_80370B40:
/* 80370B40 0036DAA0 38 60 00 0F */ li r3, 0xf
lbl_80370B44:
/* 80370B44 0036DAA4 38 16 FF FE */ addi r0, r22, -2
/* 80370B48 0036DAA8 7C 17 00 40 */ cmplw r23, r0
/* 80370B4C 0036DAAC 41 81 00 14 */ bgt lbl_80370B60
/* 80370B50 0036DAB0 38 03 00 03 */ addi r0, r3, 3
/* 80370B54 0036DAB4 7C 16 02 14 */ add r0, r22, r0
/* 80370B58 0036DAB8 7C 17 00 40 */ cmplw r23, r0
/* 80370B5C 0036DABC 40 80 00 0C */ bge lbl_80370B68
lbl_80370B60:
/* 80370B60 0036DAC0 38 00 00 01 */ li r0, 1
/* 80370B64 0036DAC4 48 00 00 08 */ b lbl_80370B6C
lbl_80370B68:
/* 80370B68 0036DAC8 38 00 00 00 */ li r0, 0
lbl_80370B6C:
/* 80370B6C 0036DACC 2C 00 00 00 */ cmpwi r0, 0
/* 80370B70 0036DAD0 40 82 00 2C */ bne lbl_80370B9C
/* 80370B74 0036DAD4 38 00 FF FF */ li r0, -1
/* 80370B78 0036DAD8 90 1F 00 00 */ stw r0, 0(r31)
/* 80370B7C 0036DADC 38 00 00 00 */ li r0, 0
/* 80370B80 0036DAE0 38 78 00 00 */ addi r3, r24, 0
/* 80370B84 0036DAE4 90 0D AB EC */ stw r0, lbl_805A97AC@sda21(r13)
/* 80370B88 0036DAE8 38 99 00 00 */ addi r4, r25, 0
/* 80370B8C 0036DAEC 38 BA 00 00 */ addi r5, r26, 0
/* 80370B90 0036DAF0 38 DB 00 00 */ addi r6, r27, 0
/* 80370B94 0036DAF4 4B FF FD 25 */ bl Read
/* 80370B98 0036DAF8 48 00 01 30 */ b lbl_80370CC8
lbl_80370B9C:
/* 80370B9C 0036DAFC 80 7D 00 00 */ lwz r3, 0(r29)
/* 80370BA0 0036DB00 80 9C 00 00 */ lwz r4, 0(r28)
/* 80370BA4 0036DB04 38 63 FF FF */ addi r3, r3, -1
/* 80370BA8 0036DB08 80 1E 00 00 */ lwz r0, 0(r30)
/* 80370BAC 0036DB0C 7C 64 1A 14 */ add r3, r4, r3
/* 80370BB0 0036DB10 54 63 8B FE */ srwi r3, r3, 0xf
/* 80370BB4 0036DB14 54 04 8B FE */ srwi r4, r0, 0xf
/* 80370BB8 0036DB18 7C 03 20 40 */ cmplw r3, r4
/* 80370BBC 0036DB1C 41 82 00 10 */ beq lbl_80370BCC
/* 80370BC0 0036DB20 38 03 00 01 */ addi r0, r3, 1
/* 80370BC4 0036DB24 7C 00 20 40 */ cmplw r0, r4
/* 80370BC8 0036DB28 40 82 00 EC */ bne lbl_80370CB4
lbl_80370BCC:
/* 80370BCC 0036DB2C 48 01 47 FD */ bl __OSGetSystemTime
/* 80370BD0 0036DB30 3C A0 80 00 */ lis r5, 0x800000F8@ha
/* 80370BD4 0036DB34 81 0D AB D8 */ lwz r8, lbl_805A9798@sda21(r13)
/* 80370BD8 0036DB38 80 05 00 F8 */ lwz r0, 0x800000F8@l(r5)
/* 80370BDC 0036DB3C 3C A0 10 62 */ lis r5, 0x10624DD3@ha
/* 80370BE0 0036DB40 81 2D AB DC */ lwz r9, lbl_805A979C@sda21(r13)
/* 80370BE4 0036DB44 38 C0 00 00 */ li r6, 0
/* 80370BE8 0036DB48 54 07 F0 BE */ srwi r7, r0, 2
/* 80370BEC 0036DB4C 38 05 4D D3 */ addi r0, r5, 0x10624DD3@l
/* 80370BF0 0036DB50 7C 00 38 16 */ mulhwu r0, r0, r7
/* 80370BF4 0036DB54 54 00 D1 BE */ srwi r0, r0, 6
/* 80370BF8 0036DB58 7D 29 20 10 */ subfc r9, r9, r4
/* 80370BFC 0036DB5C 7D 08 19 10 */ subfe r8, r8, r3
/* 80370C00 0036DB60 1C A0 00 05 */ mulli r5, r0, 5
/* 80370C04 0036DB64 6C C4 80 00 */ xoris r4, r6, 0x8000
/* 80370C08 0036DB68 6D 03 80 00 */ xoris r3, r8, 0x8000
/* 80370C0C 0036DB6C 7C 09 28 10 */ subfc r0, r9, r5
/* 80370C10 0036DB70 7C 63 21 10 */ subfe r3, r3, r4
/* 80370C14 0036DB74 7C 64 21 10 */ subfe r3, r4, r4
/* 80370C18 0036DB78 7C 63 00 D1 */ neg. r3, r3
/* 80370C1C 0036DB7C 41 82 00 28 */ beq lbl_80370C44
/* 80370C20 0036DB80 38 00 FF FF */ li r0, -1
/* 80370C24 0036DB84 90 1F 00 00 */ stw r0, 0(r31)
/* 80370C28 0036DB88 38 78 00 00 */ addi r3, r24, 0
/* 80370C2C 0036DB8C 38 99 00 00 */ addi r4, r25, 0
/* 80370C30 0036DB90 90 CD AB EC */ stw r6, lbl_805A97AC@sda21(r13)
/* 80370C34 0036DB94 38 BA 00 00 */ addi r5, r26, 0
/* 80370C38 0036DB98 38 DB 00 00 */ addi r6, r27, 0
/* 80370C3C 0036DB9C 4B FF FC 7D */ bl Read
/* 80370C40 0036DBA0 48 00 00 88 */ b lbl_80370CC8
lbl_80370C44:
/* 80370C44 0036DBA4 38 00 00 01 */ li r0, 1
/* 80370C48 0036DBA8 90 1F 00 00 */ stw r0, 0(r31)
/* 80370C4C 0036DBAC 3C 60 43 1C */ lis r3, 0x431BDE83@ha
/* 80370C50 0036DBB0 38 03 DE 83 */ addi r0, r3, 0x431BDE83@l
/* 80370C54 0036DBB4 93 1F 00 04 */ stw r24, 4(r31)
/* 80370C58 0036DBB8 7C 00 38 16 */ mulhwu r0, r0, r7
/* 80370C5C 0036DBBC 93 3F 00 08 */ stw r25, 8(r31)
/* 80370C60 0036DBC0 93 5F 00 0C */ stw r26, 0xc(r31)
/* 80370C64 0036DBC4 54 00 8B FE */ srwi r0, r0, 0xf
/* 80370C68 0036DBC8 1C 60 01 F4 */ mulli r3, r0, 0x1f4
/* 80370C6C 0036DBCC 93 7F 00 10 */ stw r27, 0x10(r31)
/* 80370C70 0036DBD0 38 00 FF FF */ li r0, -1
/* 80370C74 0036DBD4 90 1F 00 14 */ stw r0, 0x14(r31)
/* 80370C78 0036DBD8 7C A9 28 10 */ subfc r5, r9, r5
/* 80370C7C 0036DBDC 7C 88 31 10 */ subfe r4, r8, r6
/* 80370C80 0036DBE0 54 60 E8 FE */ srwi r0, r3, 3
/* 80370C84 0036DBE4 90 CD AB EC */ stw r6, lbl_805A97AC@sda21(r13)
/* 80370C88 0036DBE8 7E E5 00 14 */ addc r23, r5, r0
/* 80370C8C 0036DBEC 7E C4 31 14 */ adde r22, r4, r6
/* 80370C90 0036DBF0 38 7F 00 40 */ addi r3, r31, 0x40
/* 80370C94 0036DBF4 48 00 D4 1D */ bl OSCreateAlarm
/* 80370C98 0036DBF8 3C 60 80 37 */ lis r3, AlarmHandler@ha
/* 80370C9C 0036DBFC 38 E3 07 C4 */ addi r7, r3, AlarmHandler@l
/* 80370CA0 0036DC00 38 D7 00 00 */ addi r6, r23, 0
/* 80370CA4 0036DC04 38 B6 00 00 */ addi r5, r22, 0
/* 80370CA8 0036DC08 38 7F 00 40 */ addi r3, r31, 0x40
/* 80370CAC 0036DC0C 48 00 D6 65 */ bl OSSetAlarm
/* 80370CB0 0036DC10 48 00 00 18 */ b lbl_80370CC8
lbl_80370CB4:
/* 80370CB4 0036DC14 38 78 00 00 */ addi r3, r24, 0
/* 80370CB8 0036DC18 38 99 00 00 */ addi r4, r25, 0
/* 80370CBC 0036DC1C 38 BA 00 00 */ addi r5, r26, 0
/* 80370CC0 0036DC20 38 DB 00 00 */ addi r6, r27, 0
/* 80370CC4 0036DC24 4B FF FD 05 */ bl SeekTwiceBeforeRead
lbl_80370CC8:
/* 80370CC8 0036DC28 BA C1 00 18 */ lmw r22, 0x18(r1)
/* 80370CCC 0036DC2C 38 60 00 01 */ li r3, 1
/* 80370CD0 0036DC30 80 01 00 44 */ lwz r0, 0x44(r1)
/* 80370CD4 0036DC34 38 21 00 40 */ addi r1, r1, 0x40
/* 80370CD8 0036DC38 7C 08 03 A6 */ mtlr r0
/* 80370CDC 0036DC3C 4E 80 00 20 */ blr
.global DVDLowSeek
DVDLowSeek:
/* 80370CE0 0036DC40 7C 08 02 A6 */ mflr r0
/* 80370CE4 0036DC44 90 01 00 04 */ stw r0, 4(r1)
/* 80370CE8 0036DC48 38 00 00 00 */ li r0, 0
/* 80370CEC 0036DC4C 94 21 FF E8 */ stwu r1, -0x18(r1)
/* 80370CF0 0036DC50 93 E1 00 14 */ stw r31, 0x14(r1)
/* 80370CF4 0036DC54 93 C1 00 10 */ stw r30, 0x10(r1)
/* 80370CF8 0036DC58 90 8D AB B0 */ stw r4, lbl_805A9770@sda21(r13)
/* 80370CFC 0036DC5C 3C 80 CC 00 */ lis r4, 0xCC006000@ha
/* 80370D00 0036DC60 38 84 60 00 */ addi r4, r4, 0xCC006000@l
/* 80370D04 0036DC64 90 0D AB A8 */ stw r0, lbl_805A9768@sda21(r13)
/* 80370D08 0036DC68 3C 00 AB 00 */ lis r0, 0xab00
/* 80370D0C 0036DC6C 90 04 00 08 */ stw r0, 8(r4)
/* 80370D10 0036DC70 54 60 F0 BE */ srwi r0, r3, 2
/* 80370D14 0036DC74 3C 60 80 54 */ lis r3, lbl_80540AE8@ha
/* 80370D18 0036DC78 90 04 00 0C */ stw r0, 0xc(r4)
/* 80370D1C 0036DC7C 38 00 00 01 */ li r0, 1
/* 80370D20 0036DC80 3B E3 0A E8 */ addi r31, r3, lbl_80540AE8@l
/* 80370D24 0036DC84 90 04 00 1C */ stw r0, 0x1c(r4)
/* 80370D28 0036DC88 3C 80 80 00 */ lis r4, 0x800000F8@ha
/* 80370D2C 0036DC8C 38 7F 00 00 */ addi r3, r31, 0
/* 80370D30 0036DC90 80 04 00 F8 */ lwz r0, 0x800000F8@l(r4)
/* 80370D34 0036DC94 54 00 F0 BE */ srwi r0, r0, 2
/* 80370D38 0036DC98 1F C0 00 0A */ mulli r30, r0, 0xa
/* 80370D3C 0036DC9C 48 00 D3 75 */ bl OSCreateAlarm
/* 80370D40 0036DCA0 3C 60 80 37 */ lis r3, AlarmHandlerForTimeout@ha
/* 80370D44 0036DCA4 38 E3 08 48 */ addi r7, r3, AlarmHandlerForTimeout@l
/* 80370D48 0036DCA8 38 7F 00 00 */ addi r3, r31, 0
/* 80370D4C 0036DCAC 38 DE 00 00 */ addi r6, r30, 0
/* 80370D50 0036DCB0 38 A0 00 00 */ li r5, 0
/* 80370D54 0036DCB4 48 00 D5 BD */ bl OSSetAlarm
/* 80370D58 0036DCB8 80 01 00 1C */ lwz r0, 0x1c(r1)
/* 80370D5C 0036DCBC 38 60 00 01 */ li r3, 1
/* 80370D60 0036DCC0 83 E1 00 14 */ lwz r31, 0x14(r1)
/* 80370D64 0036DCC4 83 C1 00 10 */ lwz r30, 0x10(r1)
/* 80370D68 0036DCC8 38 21 00 18 */ addi r1, r1, 0x18
/* 80370D6C 0036DCCC 7C 08 03 A6 */ mtlr r0
/* 80370D70 0036DCD0 4E 80 00 20 */ blr
.global DVDLowWaitCoverClose
DVDLowWaitCoverClose:
/* 80370D74 0036DCD4 38 00 00 01 */ li r0, 1
/* 80370D78 0036DCD8 90 6D AB B0 */ stw r3, lbl_805A9770@sda21(r13)
/* 80370D7C 0036DCDC 3C 60 CC 00 */ lis r3, 0xCC006000@ha
/* 80370D80 0036DCE0 90 0D AB C4 */ stw r0, lbl_805A9784@sda21(r13)
/* 80370D84 0036DCE4 38 00 00 00 */ li r0, 0
/* 80370D88 0036DCE8 38 83 60 00 */ addi r4, r3, 0xCC006000@l
/* 80370D8C 0036DCEC 90 0D AB A8 */ stw r0, lbl_805A9768@sda21(r13)
/* 80370D90 0036DCF0 38 00 00 02 */ li r0, 2
/* 80370D94 0036DCF4 38 60 00 01 */ li r3, 1
/* 80370D98 0036DCF8 90 04 00 04 */ stw r0, 4(r4)
/* 80370D9C 0036DCFC 4E 80 00 20 */ blr
.global DVDLowReadDiskID
DVDLowReadDiskID:
/* 80370DA0 0036DD00 7C 08 02 A6 */ mflr r0
/* 80370DA4 0036DD04 39 00 00 00 */ li r8, 0
/* 80370DA8 0036DD08 90 01 00 04 */ stw r0, 4(r1)
/* 80370DAC 0036DD0C 3C A0 A8 00 */ lis r5, 0xA8000040@ha
/* 80370DB0 0036DD10 38 05 00 40 */ addi r0, r5, 0xA8000040@l
/* 80370DB4 0036DD14 94 21 FF E8 */ stwu r1, -0x18(r1)
/* 80370DB8 0036DD18 38 C0 00 20 */ li r6, 0x20
/* 80370DBC 0036DD1C 3C A0 80 00 */ lis r5, 0x800000F8@ha
/* 80370DC0 0036DD20 93 E1 00 14 */ stw r31, 0x14(r1)
/* 80370DC4 0036DD24 93 C1 00 10 */ stw r30, 0x10(r1)
/* 80370DC8 0036DD28 90 8D AB B0 */ stw r4, lbl_805A9770@sda21(r13)
/* 80370DCC 0036DD2C 3C 80 CC 00 */ lis r4, 0xCC006000@ha
/* 80370DD0 0036DD30 38 E4 60 00 */ addi r7, r4, 0xCC006000@l
/* 80370DD4 0036DD34 91 0D AB A8 */ stw r8, lbl_805A9768@sda21(r13)
/* 80370DD8 0036DD38 90 04 60 08 */ stw r0, 0x6008(r4)
/* 80370DDC 0036DD3C 3C 80 80 54 */ lis r4, lbl_80540AE8@ha
/* 80370DE0 0036DD40 38 00 00 03 */ li r0, 3
/* 80370DE4 0036DD44 91 07 00 0C */ stw r8, 0xc(r7)
/* 80370DE8 0036DD48 3B E4 0A E8 */ addi r31, r4, lbl_80540AE8@l
/* 80370DEC 0036DD4C 90 C7 00 10 */ stw r6, 0x10(r7)
/* 80370DF0 0036DD50 90 67 00 14 */ stw r3, 0x14(r7)
/* 80370DF4 0036DD54 7F E3 FB 78 */ mr r3, r31
/* 80370DF8 0036DD58 90 C7 00 18 */ stw r6, 0x18(r7)
/* 80370DFC 0036DD5C 90 07 00 1C */ stw r0, 0x1c(r7)
/* 80370E00 0036DD60 80 05 00 F8 */ lwz r0, 0x800000F8@l(r5)
/* 80370E04 0036DD64 54 00 F0 BE */ srwi r0, r0, 2
/* 80370E08 0036DD68 1F C0 00 0A */ mulli r30, r0, 0xa
/* 80370E0C 0036DD6C 48 00 D2 A5 */ bl OSCreateAlarm
/* 80370E10 0036DD70 3C 60 80 37 */ lis r3, AlarmHandlerForTimeout@ha
/* 80370E14 0036DD74 38 E3 08 48 */ addi r7, r3, AlarmHandlerForTimeout@l
/* 80370E18 0036DD78 38 7F 00 00 */ addi r3, r31, 0
/* 80370E1C 0036DD7C 38 DE 00 00 */ addi r6, r30, 0
/* 80370E20 0036DD80 38 A0 00 00 */ li r5, 0
/* 80370E24 0036DD84 48 00 D4 ED */ bl OSSetAlarm
/* 80370E28 0036DD88 80 01 00 1C */ lwz r0, 0x1c(r1)
/* 80370E2C 0036DD8C 38 60 00 01 */ li r3, 1
/* 80370E30 0036DD90 83 E1 00 14 */ lwz r31, 0x14(r1)
/* 80370E34 0036DD94 83 C1 00 10 */ lwz r30, 0x10(r1)
/* 80370E38 0036DD98 38 21 00 18 */ addi r1, r1, 0x18
/* 80370E3C 0036DD9C 7C 08 03 A6 */ mtlr r0
/* 80370E40 0036DDA0 4E 80 00 20 */ blr
.global DVDLowStopMotor
DVDLowStopMotor:
/* 80370E44 0036DDA4 7C 08 02 A6 */ mflr r0
/* 80370E48 0036DDA8 90 01 00 04 */ stw r0, 4(r1)
/* 80370E4C 0036DDAC 38 00 00 00 */ li r0, 0
/* 80370E50 0036DDB0 94 21 FF E8 */ stwu r1, -0x18(r1)
/* 80370E54 0036DDB4 93 E1 00 14 */ stw r31, 0x14(r1)
/* 80370E58 0036DDB8 93 C1 00 10 */ stw r30, 0x10(r1)
/* 80370E5C 0036DDBC 90 6D AB B0 */ stw r3, lbl_805A9770@sda21(r13)
/* 80370E60 0036DDC0 3C 60 CC 00 */ lis r3, 0xCC006000@ha
/* 80370E64 0036DDC4 38 83 60 00 */ addi r4, r3, 0xCC006000@l
/* 80370E68 0036DDC8 90 0D AB A8 */ stw r0, lbl_805A9768@sda21(r13)
/* 80370E6C 0036DDCC 3C 00 E3 00 */ lis r0, 0xe300
/* 80370E70 0036DDD0 90 03 60 08 */ stw r0, 0x6008(r3)
/* 80370E74 0036DDD4 38 00 00 01 */ li r0, 1
/* 80370E78 0036DDD8 3C 60 80 54 */ lis r3, lbl_80540AE8@ha
/* 80370E7C 0036DDDC 90 04 00 1C */ stw r0, 0x1c(r4)
/* 80370E80 0036DDE0 3C 80 80 00 */ lis r4, 0x800000F8@ha
/* 80370E84 0036DDE4 3B E3 0A E8 */ addi r31, r3, lbl_80540AE8@l
/* 80370E88 0036DDE8 80 04 00 F8 */ lwz r0, 0x800000F8@l(r4)
/* 80370E8C 0036DDEC 38 7F 00 00 */ addi r3, r31, 0
/* 80370E90 0036DDF0 54 00 F0 BE */ srwi r0, r0, 2
/* 80370E94 0036DDF4 1F C0 00 0A */ mulli r30, r0, 0xa
/* 80370E98 0036DDF8 48 00 D2 19 */ bl OSCreateAlarm
/* 80370E9C 0036DDFC 3C 60 80 37 */ lis r3, AlarmHandlerForTimeout@ha
/* 80370EA0 0036DE00 38 E3 08 48 */ addi r7, r3, AlarmHandlerForTimeout@l
/* 80370EA4 0036DE04 38 7F 00 00 */ addi r3, r31, 0
/* 80370EA8 0036DE08 38 DE 00 00 */ addi r6, r30, 0
/* 80370EAC 0036DE0C 38 A0 00 00 */ li r5, 0
/* 80370EB0 0036DE10 48 00 D4 61 */ bl OSSetAlarm
/* 80370EB4 0036DE14 80 01 00 1C */ lwz r0, 0x1c(r1)
/* 80370EB8 0036DE18 38 60 00 01 */ li r3, 1
/* 80370EBC 0036DE1C 83 E1 00 14 */ lwz r31, 0x14(r1)
/* 80370EC0 0036DE20 83 C1 00 10 */ lwz r30, 0x10(r1)
/* 80370EC4 0036DE24 38 21 00 18 */ addi r1, r1, 0x18
/* 80370EC8 0036DE28 7C 08 03 A6 */ mtlr r0
/* 80370ECC 0036DE2C 4E 80 00 20 */ blr
.global DVDLowRequestError
DVDLowRequestError:
/* 80370ED0 0036DE30 7C 08 02 A6 */ mflr r0
/* 80370ED4 0036DE34 90 01 00 04 */ stw r0, 4(r1)
/* 80370ED8 0036DE38 38 00 00 00 */ li r0, 0
/* 80370EDC 0036DE3C 94 21 FF E8 */ stwu r1, -0x18(r1)
/* 80370EE0 0036DE40 93 E1 00 14 */ stw r31, 0x14(r1)
/* 80370EE4 0036DE44 93 C1 00 10 */ stw r30, 0x10(r1)
/* 80370EE8 0036DE48 90 6D AB B0 */ stw r3, lbl_805A9770@sda21(r13)
/* 80370EEC 0036DE4C 3C 60 CC 00 */ lis r3, 0xCC006000@ha
/* 80370EF0 0036DE50 38 83 60 00 */ addi r4, r3, 0xCC006000@l
/* 80370EF4 0036DE54 90 0D AB A8 */ stw r0, lbl_805A9768@sda21(r13)
/* 80370EF8 0036DE58 3C 00 E0 00 */ lis r0, 0xe000
/* 80370EFC 0036DE5C 90 03 60 08 */ stw r0, 0x6008(r3)
/* 80370F00 0036DE60 38 00 00 01 */ li r0, 1
/* 80370F04 0036DE64 3C 60 80 54 */ lis r3, lbl_80540AE8@ha
/* 80370F08 0036DE68 90 04 00 1C */ stw r0, 0x1c(r4)
/* 80370F0C 0036DE6C 3C 80 80 00 */ lis r4, 0x800000F8@ha
/* 80370F10 0036DE70 3B E3 0A E8 */ addi r31, r3, lbl_80540AE8@l
/* 80370F14 0036DE74 80 04 00 F8 */ lwz r0, 0x800000F8@l(r4)
/* 80370F18 0036DE78 38 7F 00 00 */ addi r3, r31, 0
/* 80370F1C 0036DE7C 54 00 F0 BE */ srwi r0, r0, 2
/* 80370F20 0036DE80 1F C0 00 0A */ mulli r30, r0, 0xa
/* 80370F24 0036DE84 48 00 D1 8D */ bl OSCreateAlarm
/* 80370F28 0036DE88 3C 60 80 37 */ lis r3, AlarmHandlerForTimeout@ha
/* 80370F2C 0036DE8C 38 E3 08 48 */ addi r7, r3, AlarmHandlerForTimeout@l
/* 80370F30 0036DE90 38 7F 00 00 */ addi r3, r31, 0
/* 80370F34 0036DE94 38 DE 00 00 */ addi r6, r30, 0
/* 80370F38 0036DE98 38 A0 00 00 */ li r5, 0
/* 80370F3C 0036DE9C 48 00 D3 D5 */ bl OSSetAlarm
/* 80370F40 0036DEA0 80 01 00 1C */ lwz r0, 0x1c(r1)
/* 80370F44 0036DEA4 38 60 00 01 */ li r3, 1
/* 80370F48 0036DEA8 83 E1 00 14 */ lwz r31, 0x14(r1)
/* 80370F4C 0036DEAC 83 C1 00 10 */ lwz r30, 0x10(r1)
/* 80370F50 0036DEB0 38 21 00 18 */ addi r1, r1, 0x18
/* 80370F54 0036DEB4 7C 08 03 A6 */ mtlr r0
/* 80370F58 0036DEB8 4E 80 00 20 */ blr
.global DVDLowInquiry
DVDLowInquiry:
/* 80370F5C 0036DEBC 7C 08 02 A6 */ mflr r0
/* 80370F60 0036DEC0 38 C0 00 20 */ li r6, 0x20
/* 80370F64 0036DEC4 90 01 00 04 */ stw r0, 4(r1)
/* 80370F68 0036DEC8 38 00 00 00 */ li r0, 0
/* 80370F6C 0036DECC 3C A0 80 00 */ lis r5, 0x800000F8@ha
/* 80370F70 0036DED0 94 21 FF E8 */ stwu r1, -0x18(r1)
/* 80370F74 0036DED4 93 E1 00 14 */ stw r31, 0x14(r1)
/* 80370F78 0036DED8 93 C1 00 10 */ stw r30, 0x10(r1)
/* 80370F7C 0036DEDC 90 8D AB B0 */ stw r4, lbl_805A9770@sda21(r13)
/* 80370F80 0036DEE0 3C 80 CC 00 */ lis r4, 0xCC006000@ha
/* 80370F84 0036DEE4 38 E4 60 00 */ addi r7, r4, 0xCC006000@l
/* 80370F88 0036DEE8 90 0D AB A8 */ stw r0, lbl_805A9768@sda21(r13)
/* 80370F8C 0036DEEC 3C 00 12 00 */ lis r0, 0x1200
/* 80370F90 0036DEF0 90 04 60 08 */ stw r0, 0x6008(r4)
/* 80370F94 0036DEF4 3C 80 80 54 */ lis r4, lbl_80540AE8@ha
/* 80370F98 0036DEF8 38 00 00 03 */ li r0, 3
/* 80370F9C 0036DEFC 90 C7 00 10 */ stw r6, 0x10(r7)
/* 80370FA0 0036DF00 3B E4 0A E8 */ addi r31, r4, lbl_80540AE8@l
/* 80370FA4 0036DF04 90 67 00 14 */ stw r3, 0x14(r7)
/* 80370FA8 0036DF08 38 7F 00 00 */ addi r3, r31, 0
/* 80370FAC 0036DF0C 90 C7 00 18 */ stw r6, 0x18(r7)
/* 80370FB0 0036DF10 90 07 00 1C */ stw r0, 0x1c(r7)
/* 80370FB4 0036DF14 80 05 00 F8 */ lwz r0, 0x800000F8@l(r5)
/* 80370FB8 0036DF18 54 00 F0 BE */ srwi r0, r0, 2
/* 80370FBC 0036DF1C 1F C0 00 0A */ mulli r30, r0, 0xa
/* 80370FC0 0036DF20 48 00 D0 F1 */ bl OSCreateAlarm
/* 80370FC4 0036DF24 3C 60 80 37 */ lis r3, AlarmHandlerForTimeout@ha
/* 80370FC8 0036DF28 38 E3 08 48 */ addi r7, r3, AlarmHandlerForTimeout@l
/* 80370FCC 0036DF2C 38 7F 00 00 */ addi r3, r31, 0
/* 80370FD0 0036DF30 38 DE 00 00 */ addi r6, r30, 0
/* 80370FD4 0036DF34 38 A0 00 00 */ li r5, 0
/* 80370FD8 0036DF38 48 00 D3 39 */ bl OSSetAlarm
/* 80370FDC 0036DF3C 80 01 00 1C */ lwz r0, 0x1c(r1)
/* 80370FE0 0036DF40 38 60 00 01 */ li r3, 1
/* 80370FE4 0036DF44 83 E1 00 14 */ lwz r31, 0x14(r1)
/* 80370FE8 0036DF48 83 C1 00 10 */ lwz r30, 0x10(r1)
/* 80370FEC 0036DF4C 38 21 00 18 */ addi r1, r1, 0x18
/* 80370FF0 0036DF50 7C 08 03 A6 */ mtlr r0
/* 80370FF4 0036DF54 4E 80 00 20 */ blr
.global DVDLowAudioStream
DVDLowAudioStream:
/* 80370FF8 0036DF58 7C 08 02 A6 */ mflr r0
/* 80370FFC 0036DF5C 90 01 00 04 */ stw r0, 4(r1)
/* 80371000 0036DF60 38 00 00 00 */ li r0, 0
/* 80371004 0036DF64 94 21 FF E0 */ stwu r1, -0x20(r1)
/* 80371008 0036DF68 93 E1 00 1C */ stw r31, 0x1c(r1)
/* 8037100C 0036DF6C 93 C1 00 18 */ stw r30, 0x18(r1)
/* 80371010 0036DF70 90 CD AB B0 */ stw r6, lbl_805A9770@sda21(r13)
/* 80371014 0036DF74 3C C0 CC 00 */ lis r6, 0xCC006000@ha
/* 80371018 0036DF78 38 C6 60 00 */ addi r6, r6, 0xCC006000@l
/* 8037101C 0036DF7C 90 0D AB A8 */ stw r0, lbl_805A9768@sda21(r13)
/* 80371020 0036DF80 64 60 E1 00 */ oris r0, r3, 0xe100
/* 80371024 0036DF84 3C 60 80 54 */ lis r3, lbl_80540AE8@ha
/* 80371028 0036DF88 90 06 00 08 */ stw r0, 8(r6)
/* 8037102C 0036DF8C 54 A0 F0 BE */ srwi r0, r5, 2
/* 80371030 0036DF90 3B E3 0A E8 */ addi r31, r3, lbl_80540AE8@l
/* 80371034 0036DF94 90 06 00 0C */ stw r0, 0xc(r6)
/* 80371038 0036DF98 38 00 00 01 */ li r0, 1
/* 8037103C 0036DF9C 38 7F 00 00 */ addi r3, r31, 0
/* 80371040 0036DFA0 90 86 00 10 */ stw r4, 0x10(r6)
/* 80371044 0036DFA4 3C 80 80 00 */ lis r4, 0x800000F8@ha
/* 80371048 0036DFA8 90 06 00 1C */ stw r0, 0x1c(r6)
/* 8037104C 0036DFAC 80 04 00 F8 */ lwz r0, 0x800000F8@l(r4)
/* 80371050 0036DFB0 54 00 F0 BE */ srwi r0, r0, 2
/* 80371054 0036DFB4 1F C0 00 0A */ mulli r30, r0, 0xa
/* 80371058 0036DFB8 48 00 D0 59 */ bl OSCreateAlarm
/* 8037105C 0036DFBC 3C 60 80 37 */ lis r3, AlarmHandlerForTimeout@ha
/* 80371060 0036DFC0 38 E3 08 48 */ addi r7, r3, AlarmHandlerForTimeout@l
/* 80371064 0036DFC4 38 7F 00 00 */ addi r3, r31, 0
/* 80371068 0036DFC8 38 DE 00 00 */ addi r6, r30, 0
/* 8037106C 0036DFCC 38 A0 00 00 */ li r5, 0
/* 80371070 0036DFD0 48 00 D2 A1 */ bl OSSetAlarm
/* 80371074 0036DFD4 80 01 00 24 */ lwz r0, 0x24(r1)
/* 80371078 0036DFD8 38 60 00 01 */ li r3, 1
/* 8037107C 0036DFDC 83 E1 00 1C */ lwz r31, 0x1c(r1)
/* 80371080 0036DFE0 83 C1 00 18 */ lwz r30, 0x18(r1)
/* 80371084 0036DFE4 38 21 00 20 */ addi r1, r1, 0x20
/* 80371088 0036DFE8 7C 08 03 A6 */ mtlr r0
/* 8037108C 0036DFEC 4E 80 00 20 */ blr
.global DVDLowRequestAudioStatus
DVDLowRequestAudioStatus:
/* 80371090 0036DFF0 7C 08 02 A6 */ mflr r0
/* 80371094 0036DFF4 90 01 00 04 */ stw r0, 4(r1)
/* 80371098 0036DFF8 38 00 00 00 */ li r0, 0
/* 8037109C 0036DFFC 94 21 FF E8 */ stwu r1, -0x18(r1)
/* 803710A0 0036E000 93 E1 00 14 */ stw r31, 0x14(r1)
/* 803710A4 0036E004 93 C1 00 10 */ stw r30, 0x10(r1)
/* 803710A8 0036E008 90 8D AB B0 */ stw r4, lbl_805A9770@sda21(r13)
/* 803710AC 0036E00C 3C 80 CC 00 */ lis r4, 0xCC006000@ha
/* 803710B0 0036E010 38 84 60 00 */ addi r4, r4, 0xCC006000@l
/* 803710B4 0036E014 90 0D AB A8 */ stw r0, lbl_805A9768@sda21(r13)
/* 803710B8 0036E018 64 60 E2 00 */ oris r0, r3, 0xe200
/* 803710BC 0036E01C 3C 60 80 54 */ lis r3, lbl_80540AE8@ha
/* 803710C0 0036E020 90 04 00 08 */ stw r0, 8(r4)
/* 803710C4 0036E024 38 00 00 01 */ li r0, 1
/* 803710C8 0036E028 3B E3 0A E8 */ addi r31, r3, lbl_80540AE8@l
/* 803710CC 0036E02C 90 04 00 1C */ stw r0, 0x1c(r4)
/* 803710D0 0036E030 3C 80 80 00 */ lis r4, 0x800000F8@ha
/* 803710D4 0036E034 38 7F 00 00 */ addi r3, r31, 0
/* 803710D8 0036E038 80 04 00 F8 */ lwz r0, 0x800000F8@l(r4)
/* 803710DC 0036E03C 54 00 F0 BE */ srwi r0, r0, 2
/* 803710E0 0036E040 1F C0 00 0A */ mulli r30, r0, 0xa
/* 803710E4 0036E044 48 00 CF CD */ bl OSCreateAlarm
/* 803710E8 0036E048 3C 60 80 37 */ lis r3, AlarmHandlerForTimeout@ha
/* 803710EC 0036E04C 38 E3 08 48 */ addi r7, r3, AlarmHandlerForTimeout@l
/* 803710F0 0036E050 38 7F 00 00 */ addi r3, r31, 0
/* 803710F4 0036E054 38 DE 00 00 */ addi r6, r30, 0
/* 803710F8 0036E058 38 A0 00 00 */ li r5, 0
/* 803710FC 0036E05C 48 00 D2 15 */ bl OSSetAlarm
/* 80371100 0036E060 80 01 00 1C */ lwz r0, 0x1c(r1)
/* 80371104 0036E064 38 60 00 01 */ li r3, 1
/* 80371108 0036E068 83 E1 00 14 */ lwz r31, 0x14(r1)
/* 8037110C 0036E06C 83 C1 00 10 */ lwz r30, 0x10(r1)
/* 80371110 0036E070 38 21 00 18 */ addi r1, r1, 0x18
/* 80371114 0036E074 7C 08 03 A6 */ mtlr r0
/* 80371118 0036E078 4E 80 00 20 */ blr
.global DVDLowAudioBufferConfig
DVDLowAudioBufferConfig:
/* 8037111C 0036E07C 7C 08 02 A6 */ mflr r0
/* 80371120 0036E080 2C 03 00 00 */ cmpwi r3, 0
/* 80371124 0036E084 90 01 00 04 */ stw r0, 4(r1)
/* 80371128 0036E088 38 00 00 00 */ li r0, 0
/* 8037112C 0036E08C 94 21 FF E0 */ stwu r1, -0x20(r1)
/* 80371130 0036E090 93 E1 00 1C */ stw r31, 0x1c(r1)
/* 80371134 0036E094 93 C1 00 18 */ stw r30, 0x18(r1)
/* 80371138 0036E098 90 AD AB B0 */ stw r5, lbl_805A9770@sda21(r13)
/* 8037113C 0036E09C 90 0D AB A8 */ stw r0, lbl_805A9768@sda21(r13)
/* 80371140 0036E0A0 41 82 00 08 */ beq lbl_80371148
/* 80371144 0036E0A4 3C 00 00 01 */ lis r0, 1
lbl_80371148:
/* 80371148 0036E0A8 64 00 E4 00 */ oris r0, r0, 0xe400
/* 8037114C 0036E0AC 3C 60 CC 00 */ lis r3, 0xCC006000@ha
/* 80371150 0036E0B0 7C 80 03 78 */ or r0, r4, r0
/* 80371154 0036E0B4 38 63 60 00 */ addi r3, r3, 0xCC006000@l
/* 80371158 0036E0B8 90 03 00 08 */ stw r0, 8(r3)
/* 8037115C 0036E0BC 38 00 00 01 */ li r0, 1
/* 80371160 0036E0C0 3C 80 80 00 */ lis r4, 0x800000F8@ha
/* 80371164 0036E0C4 90 03 00 1C */ stw r0, 0x1c(r3)
/* 80371168 0036E0C8 3C 60 80 54 */ lis r3, lbl_80540AE8@ha
/* 8037116C 0036E0CC 3B E3 0A E8 */ addi r31, r3, lbl_80540AE8@l
/* 80371170 0036E0D0 80 04 00 F8 */ lwz r0, 0x800000F8@l(r4)
/* 80371174 0036E0D4 38 7F 00 00 */ addi r3, r31, 0
/* 80371178 0036E0D8 54 00 F0 BE */ srwi r0, r0, 2
/* 8037117C 0036E0DC 1F C0 00 0A */ mulli r30, r0, 0xa
/* 80371180 0036E0E0 48 00 CF 31 */ bl OSCreateAlarm
/* 80371184 0036E0E4 3C 60 80 37 */ lis r3, AlarmHandlerForTimeout@ha
/* 80371188 0036E0E8 38 E3 08 48 */ addi r7, r3, AlarmHandlerForTimeout@l
/* 8037118C 0036E0EC 38 7F 00 00 */ addi r3, r31, 0
/* 80371190 0036E0F0 38 DE 00 00 */ addi r6, r30, 0
/* 80371194 0036E0F4 38 A0 00 00 */ li r5, 0
/* 80371198 0036E0F8 48 00 D1 79 */ bl OSSetAlarm
/* 8037119C 0036E0FC 80 01 00 24 */ lwz r0, 0x24(r1)
/* 803711A0 0036E100 38 60 00 01 */ li r3, 1
/* 803711A4 0036E104 83 E1 00 1C */ lwz r31, 0x1c(r1)
/* 803711A8 0036E108 83 C1 00 18 */ lwz r30, 0x18(r1)
/* 803711AC 0036E10C 38 21 00 20 */ addi r1, r1, 0x20
/* 803711B0 0036E110 7C 08 03 A6 */ mtlr r0
/* 803711B4 0036E114 4E 80 00 20 */ blr
.global DVDLowReset
DVDLowReset:
/* 803711B8 0036E118 7C 08 02 A6 */ mflr r0
/* 803711BC 0036E11C 3C 80 CC 00 */ lis r4, 0xCC003000@ha
/* 803711C0 0036E120 90 01 00 04 */ stw r0, 4(r1)
/* 803711C4 0036E124 38 00 00 02 */ li r0, 2
/* 803711C8 0036E128 94 21 FF E0 */ stwu r1, -0x20(r1)
/* 803711CC 0036E12C BF 41 00 08 */ stmw r26, 8(r1)
/* 803711D0 0036E130 3B E4 30 00 */ addi r31, r4, 0xCC003000@l
/* 803711D4 0036E134 90 04 60 04 */ stw r0, 0x6004(r4)
/* 803711D8 0036E138 83 C4 30 24 */ lwz r30, 0x3024(r4)
/* 803711DC 0036E13C 57 C0 07 B8 */ rlwinm r0, r30, 0, 0x1e, 0x1c
/* 803711E0 0036E140 60 00 00 01 */ ori r0, r0, 1
/* 803711E4 0036E144 94 1F 00 24 */ stwu r0, 0x24(r31)
/* 803711E8 0036E148 48 01 41 E1 */ bl __OSGetSystemTime
/* 803711EC 0036E14C 3C A0 80 00 */ lis r5, 0x800000F8@ha
/* 803711F0 0036E150 80 05 00 F8 */ lwz r0, 0x800000F8@l(r5)
/* 803711F4 0036E154 3C A0 43 1C */ lis r5, 0x431BDE83@ha
/* 803711F8 0036E158 38 A5 DE 83 */ addi r5, r5, 0x431BDE83@l
/* 803711FC 0036E15C 54 00 F0 BE */ srwi r0, r0, 2
/* 80371200 0036E160 7C 05 00 16 */ mulhwu r0, r5, r0
/* 80371204 0036E164 54 00 8B FE */ srwi r0, r0, 0xf
/* 80371208 0036E168 1C 00 00 0C */ mulli r0, r0, 0xc
/* 8037120C 0036E16C 3B 44 00 00 */ addi r26, r4, 0
/* 80371210 0036E170 3B 63 00 00 */ addi r27, r3, 0
/* 80371214 0036E174 54 1C E8 FE */ srwi r28, r0, 3
/* 80371218 0036E178 3B A0 00 00 */ li r29, 0
lbl_8037121C:
/* 8037121C 0036E17C 48 01 41 AD */ bl __OSGetSystemTime
/* 80371220 0036E180 7C BA 20 10 */ subfc r5, r26, r4
/* 80371224 0036E184 7C 1B 19 10 */ subfe r0, r27, r3
/* 80371228 0036E188 6C 04 80 00 */ xoris r4, r0, 0x8000
/* 8037122C 0036E18C 6F A3 80 00 */ xoris r3, r29, 0x8000
/* 80371230 0036E190 7C 1C 28 10 */ subfc r0, r28, r5
/* 80371234 0036E194 7C 63 21 10 */ subfe r3, r3, r4
/* 80371238 0036E198 7C 64 21 10 */ subfe r3, r4, r4
/* 8037123C 0036E19C 7C 63 00 D1 */ neg. r3, r3
/* 80371240 0036E1A0 40 82 FF DC */ bne lbl_8037121C
/* 80371244 0036E1A4 63 C0 00 05 */ ori r0, r30, 5
/* 80371248 0036E1A8 90 1F 00 00 */ stw r0, 0(r31)
/* 8037124C 0036E1AC 38 00 00 01 */ li r0, 1
/* 80371250 0036E1B0 90 0D AB C0 */ stw r0, lbl_805A9780@sda21(r13)
/* 80371254 0036E1B4 48 01 41 75 */ bl __OSGetSystemTime
/* 80371258 0036E1B8 90 8D AB BC */ stw r4, lbl_805A977C@sda21(r13)
/* 8037125C 0036E1BC 90 6D AB B8 */ stw r3, lbl_805A9778@sda21(r13)
/* 80371260 0036E1C0 BB 41 00 08 */ lmw r26, 8(r1)
/* 80371264 0036E1C4 80 01 00 24 */ lwz r0, 0x24(r1)
/* 80371268 0036E1C8 38 21 00 20 */ addi r1, r1, 0x20
/* 8037126C 0036E1CC 7C 08 03 A6 */ mtlr r0
/* 80371270 0036E1D0 4E 80 00 20 */ blr
.global DVDLowBreak
DVDLowBreak:
/* 80371274 0036E1D4 38 00 00 01 */ li r0, 1
/* 80371278 0036E1D8 90 0D AB A8 */ stw r0, lbl_805A9768@sda21(r13)
/* 8037127C 0036E1DC 38 60 00 01 */ li r3, 1
/* 80371280 0036E1E0 90 0D AB C8 */ stw r0, lbl_805A9788@sda21(r13)
/* 80371284 0036E1E4 4E 80 00 20 */ blr
.global DVDLowClearCallback
DVDLowClearCallback:
/* 80371288 0036E1E8 3C 60 CC 00 */ lis r3, 0xCC006004@ha
/* 8037128C 0036E1EC 38 00 00 00 */ li r0, 0
/* 80371290 0036E1F0 90 03 60 04 */ stw r0, 0xCC006004@l(r3)
/* 80371294 0036E1F4 80 6D AB B0 */ lwz r3, lbl_805A9770@sda21(r13)
/* 80371298 0036E1F8 90 0D AB B0 */ stw r0, lbl_805A9770@sda21(r13)
/* 8037129C 0036E1FC 4E 80 00 20 */ blr
.global __DVDLowSetWAType
__DVDLowSetWAType:
/* 803712A0 0036E200 7C 08 02 A6 */ mflr r0
/* 803712A4 0036E204 90 01 00 04 */ stw r0, 4(r1)
/* 803712A8 0036E208 94 21 FF E8 */ stwu r1, -0x18(r1)
/* 803712AC 0036E20C 93 E1 00 14 */ stw r31, 0x14(r1)
/* 803712B0 0036E210 3B E4 00 00 */ addi r31, r4, 0
/* 803712B4 0036E214 93 C1 00 10 */ stw r30, 0x10(r1)
/* 803712B8 0036E218 3B C3 00 00 */ addi r30, r3, 0
/* 803712BC 0036E21C 48 01 03 A5 */ bl OSDisableInterrupts
/* 803712C0 0036E220 93 CD AB CC */ stw r30, lbl_805A978C@sda21(r13)
/* 803712C4 0036E224 93 ED AB D0 */ stw r31, lbl_805A9790@sda21(r13)
/* 803712C8 0036E228 48 01 03 C1 */ bl OSRestoreInterrupts
/* 803712CC 0036E22C 80 01 00 1C */ lwz r0, 0x1c(r1)
/* 803712D0 0036E230 83 E1 00 14 */ lwz r31, 0x14(r1)
/* 803712D4 0036E234 83 C1 00 10 */ lwz r30, 0x10(r1)
/* 803712D8 0036E238 38 21 00 18 */ addi r1, r1, 0x18
/* 803712DC 0036E23C 7C 08 03 A6 */ mtlr r0
/* 803712E0 0036E240 4E 80 00 20 */ blr