donut-decomp/asm/os/OSCache.s
2022-10-17 09:03:07 +01:00

606 lines
24 KiB
ArmAsm

.include "macros.inc"
.section .text, "ax" # 0x80006A00 - 0x80406260 ; 0x003FF860
.global DCEnable
DCEnable:
/* 8001C930 00018770 7C 00 04 AC */ sync
/* 8001C934 00018774 7C 70 FA A6 */ mfspr r3, HID0
/* 8001C938 00018778 60 63 40 00 */ ori r3, r3, 0x4000
/* 8001C93C 0001877C 7C 70 FB A6 */ mtspr HID0, r3
/* 8001C940 00018780 4E 80 00 20 */ blr
/* 8001C944 00018784 00 00 00 00 */ .4byte 0x00000000
/* 8001C948 00018788 00 00 00 00 */ .4byte 0x00000000
/* 8001C94C 0001878C 00 00 00 00 */ .4byte 0x00000000
.global DCInvalidateRange
DCInvalidateRange:
/* 8001C950 00018790 28 04 00 00 */ cmplwi r4, 0x0
/* 8001C954 00018794 4C 81 00 20 */ blelr
/* 8001C958 00018798 54 65 06 FE */ clrlwi r5, r3, 27
/* 8001C95C 0001879C 7C 84 2A 14 */ add r4, r4, r5
/* 8001C960 000187A0 38 84 00 1F */ addi r4, r4, 0x1f
/* 8001C964 000187A4 54 84 D9 7E */ srwi r4, r4, 5
/* 8001C968 000187A8 7C 89 03 A6 */ mtctr r4
.global lbl_8001C96C
lbl_8001C96C:
/* 8001C96C 000187AC 7C 00 1B AC */ dcbi r0, r3
/* 8001C970 000187B0 38 63 00 20 */ addi r3, r3, 0x20
/* 8001C974 000187B4 42 00 FF F8 */ bdnz lbl_8001C96C
/* 8001C978 000187B8 4E 80 00 20 */ blr
/* 8001C97C 000187BC 00 00 00 00 */ .4byte 0x00000000
.global DCFlushRange
DCFlushRange:
/* 8001C980 000187C0 28 04 00 00 */ cmplwi r4, 0x0
/* 8001C984 000187C4 4C 81 00 20 */ blelr
/* 8001C988 000187C8 54 65 06 FE */ clrlwi r5, r3, 27
/* 8001C98C 000187CC 7C 84 2A 14 */ add r4, r4, r5
/* 8001C990 000187D0 38 84 00 1F */ addi r4, r4, 0x1f
/* 8001C994 000187D4 54 84 D9 7E */ srwi r4, r4, 5
/* 8001C998 000187D8 7C 89 03 A6 */ mtctr r4
.global lbl_8001C99C
lbl_8001C99C:
/* 8001C99C 000187DC 7C 00 18 AC */ dcbf r0, r3
/* 8001C9A0 000187E0 38 63 00 20 */ addi r3, r3, 0x20
/* 8001C9A4 000187E4 42 00 FF F8 */ bdnz lbl_8001C99C
/* 8001C9A8 000187E8 44 00 00 02 */ sc
/* 8001C9AC 000187EC 4E 80 00 20 */ blr
.global DCStoreRange
DCStoreRange:
/* 8001C9B0 000187F0 28 04 00 00 */ cmplwi r4, 0x0
/* 8001C9B4 000187F4 4C 81 00 20 */ blelr
/* 8001C9B8 000187F8 54 65 06 FE */ clrlwi r5, r3, 27
/* 8001C9BC 000187FC 7C 84 2A 14 */ add r4, r4, r5
/* 8001C9C0 00018800 38 84 00 1F */ addi r4, r4, 0x1f
/* 8001C9C4 00018804 54 84 D9 7E */ srwi r4, r4, 5
/* 8001C9C8 00018808 7C 89 03 A6 */ mtctr r4
.global lbl_8001C9CC
lbl_8001C9CC:
/* 8001C9CC 0001880C 7C 00 18 6C */ dcbst r0, r3
/* 8001C9D0 00018810 38 63 00 20 */ addi r3, r3, 0x20
/* 8001C9D4 00018814 42 00 FF F8 */ bdnz lbl_8001C9CC
/* 8001C9D8 00018818 44 00 00 02 */ sc
/* 8001C9DC 0001881C 4E 80 00 20 */ blr
.global DCFlushRangeNoSync
DCFlushRangeNoSync:
/* 8001C9E0 00018820 28 04 00 00 */ cmplwi r4, 0x0
/* 8001C9E4 00018824 4C 81 00 20 */ blelr
/* 8001C9E8 00018828 54 65 06 FE */ clrlwi r5, r3, 27
/* 8001C9EC 0001882C 7C 84 2A 14 */ add r4, r4, r5
/* 8001C9F0 00018830 38 84 00 1F */ addi r4, r4, 0x1f
/* 8001C9F4 00018834 54 84 D9 7E */ srwi r4, r4, 5
/* 8001C9F8 00018838 7C 89 03 A6 */ mtctr r4
.global lbl_8001C9FC
lbl_8001C9FC:
/* 8001C9FC 0001883C 7C 00 18 AC */ dcbf r0, r3
/* 8001CA00 00018840 38 63 00 20 */ addi r3, r3, 0x20
/* 8001CA04 00018844 42 00 FF F8 */ bdnz lbl_8001C9FC
/* 8001CA08 00018848 4E 80 00 20 */ blr
/* 8001CA0C 0001884C 00 00 00 00 */ .4byte 0x00000000
.global DCStoreRangeNoSync
DCStoreRangeNoSync:
/* 8001CA10 00018850 28 04 00 00 */ cmplwi r4, 0x0
/* 8001CA14 00018854 4C 81 00 20 */ blelr
/* 8001CA18 00018858 54 65 06 FE */ clrlwi r5, r3, 27
/* 8001CA1C 0001885C 7C 84 2A 14 */ add r4, r4, r5
/* 8001CA20 00018860 38 84 00 1F */ addi r4, r4, 0x1f
/* 8001CA24 00018864 54 84 D9 7E */ srwi r4, r4, 5
/* 8001CA28 00018868 7C 89 03 A6 */ mtctr r4
.global lbl_8001CA2C
lbl_8001CA2C:
/* 8001CA2C 0001886C 7C 00 18 6C */ dcbst r0, r3
/* 8001CA30 00018870 38 63 00 20 */ addi r3, r3, 0x20
/* 8001CA34 00018874 42 00 FF F8 */ bdnz lbl_8001CA2C
/* 8001CA38 00018878 4E 80 00 20 */ blr
/* 8001CA3C 0001887C 00 00 00 00 */ .4byte 0x00000000
.global DCZeroRange
DCZeroRange:
/* 8001CA40 00018880 28 04 00 00 */ cmplwi r4, 0x0
/* 8001CA44 00018884 4C 81 00 20 */ blelr
/* 8001CA48 00018888 54 65 06 FE */ clrlwi r5, r3, 27
/* 8001CA4C 0001888C 7C 84 2A 14 */ add r4, r4, r5
/* 8001CA50 00018890 38 84 00 1F */ addi r4, r4, 0x1f
/* 8001CA54 00018894 54 84 D9 7E */ srwi r4, r4, 5
/* 8001CA58 00018898 7C 89 03 A6 */ mtctr r4
.global lbl_8001CA5C
lbl_8001CA5C:
/* 8001CA5C 0001889C 7C 00 1F EC */ dcbz r0, r3
/* 8001CA60 000188A0 38 63 00 20 */ addi r3, r3, 0x20
/* 8001CA64 000188A4 42 00 FF F8 */ bdnz lbl_8001CA5C
/* 8001CA68 000188A8 4E 80 00 20 */ blr
/* 8001CA6C 000188AC 00 00 00 00 */ .4byte 0x00000000
.global ICInvalidateRange
ICInvalidateRange:
/* 8001CA70 000188B0 28 04 00 00 */ cmplwi r4, 0x0
/* 8001CA74 000188B4 4C 81 00 20 */ blelr
/* 8001CA78 000188B8 54 65 06 FE */ clrlwi r5, r3, 27
/* 8001CA7C 000188BC 7C 84 2A 14 */ add r4, r4, r5
/* 8001CA80 000188C0 38 84 00 1F */ addi r4, r4, 0x1f
/* 8001CA84 000188C4 54 84 D9 7E */ srwi r4, r4, 5
/* 8001CA88 000188C8 7C 89 03 A6 */ mtctr r4
.global lbl_8001CA8C
lbl_8001CA8C:
/* 8001CA8C 000188CC 7C 00 1F AC */ icbi r0, r3
/* 8001CA90 000188D0 38 63 00 20 */ addi r3, r3, 0x20
/* 8001CA94 000188D4 42 00 FF F8 */ bdnz lbl_8001CA8C
/* 8001CA98 000188D8 7C 00 04 AC */ sync
/* 8001CA9C 000188DC 4C 00 01 2C */ isync
/* 8001CAA0 000188E0 4E 80 00 20 */ blr
/* 8001CAA4 000188E4 00 00 00 00 */ .4byte 0x00000000
/* 8001CAA8 000188E8 00 00 00 00 */ .4byte 0x00000000
/* 8001CAAC 000188EC 00 00 00 00 */ .4byte 0x00000000
.global ICFlashInvalidate
ICFlashInvalidate:
/* 8001CAB0 000188F0 7C 70 FA A6 */ mfspr r3, HID0
/* 8001CAB4 000188F4 60 63 08 00 */ ori r3, r3, 0x800
/* 8001CAB8 000188F8 7C 70 FB A6 */ mtspr HID0, r3
/* 8001CABC 000188FC 4E 80 00 20 */ blr
.global ICEnable
ICEnable:
/* 8001CAC0 00018900 4C 00 01 2C */ isync
/* 8001CAC4 00018904 7C 70 FA A6 */ mfspr r3, HID0
/* 8001CAC8 00018908 60 63 80 00 */ ori r3, r3, 0x8000
/* 8001CACC 0001890C 7C 70 FB A6 */ mtspr HID0, r3
/* 8001CAD0 00018910 4E 80 00 20 */ blr
/* 8001CAD4 00018914 00 00 00 00 */ .4byte 0x00000000
/* 8001CAD8 00018918 00 00 00 00 */ .4byte 0x00000000
/* 8001CADC 0001891C 00 00 00 00 */ .4byte 0x00000000
.global __LCEnable
__LCEnable:
/* 8001CAE0 00018920 7C A0 00 A6 */ mfmsr r5
/* 8001CAE4 00018924 60 A5 10 00 */ ori r5, r5, 0x1000
/* 8001CAE8 00018928 7C A0 01 24 */ mtmsr r5
/* 8001CAEC 0001892C 3C 60 80 00 */ lis r3, 0x80000020@ha
/* 8001CAF0 00018930 38 80 04 00 */ li r4, 0x400
/* 8001CAF4 00018934 7C 89 03 A6 */ mtctr r4
.global lbl_8001CAF8
lbl_8001CAF8:
/* 8001CAF8 00018938 7C 00 1A 2C */ dcbt r0, r3
/* 8001CAFC 0001893C 7C 00 18 6C */ dcbst r0, r3
/* 8001CB00 00018940 38 63 00 20 */ addi r3, r3, 0x80000020@l
/* 8001CB04 00018944 42 00 FF F4 */ bdnz lbl_8001CAF8
/* 8001CB08 00018948 7C 98 E2 A6 */ mfspr r4, HID2
/* 8001CB0C 0001894C 64 84 10 0F */ oris r4, r4, 0x100f
/* 8001CB10 00018950 7C 98 E3 A6 */ mtspr HID2, r4
/* 8001CB14 00018954 60 00 00 00 */ nop
/* 8001CB18 00018958 60 00 00 00 */ nop
/* 8001CB1C 0001895C 60 00 00 00 */ nop
/* 8001CB20 00018960 60 00 00 00 */ nop
/* 8001CB24 00018964 60 00 00 00 */ nop
/* 8001CB28 00018968 60 00 00 00 */ nop
/* 8001CB2C 0001896C 60 00 00 00 */ nop
/* 8001CB30 00018970 60 00 00 00 */ nop
/* 8001CB34 00018974 60 00 00 00 */ nop
/* 8001CB38 00018978 60 00 00 00 */ nop
/* 8001CB3C 0001897C 60 00 00 00 */ nop
/* 8001CB40 00018980 60 00 00 00 */ nop
/* 8001CB44 00018984 3C 60 E0 00 */ lis r3, 0xE0000002@h
/* 8001CB48 00018988 60 63 00 02 */ ori r3, r3, 0xE0000002@l
/* 8001CB4C 0001898C 7C 7F 83 A6 */ mtdbatl 3, r3
/* 8001CB50 00018990 60 63 01 FE */ ori r3, r3, 0x1fe
/* 8001CB54 00018994 7C 7E 83 A6 */ mtdbatu 3, r3
/* 8001CB58 00018998 4C 00 01 2C */ isync
/* 8001CB5C 0001899C 3C 60 E0 00 */ lis r3, 0xE0000020@ha
/* 8001CB60 000189A0 38 C0 02 00 */ li r6, 0x200
/* 8001CB64 000189A4 7C C9 03 A6 */ mtctr r6
/* 8001CB68 000189A8 38 C0 00 00 */ li r6, 0x0
.global lbl_8001CB6C
lbl_8001CB6C:
/* 8001CB6C 000189AC 10 06 1F EC */ dcbz_l r6, r3
/* 8001CB70 000189B0 38 63 00 20 */ addi r3, r3, 0xE0000020@l
/* 8001CB74 000189B4 42 00 FF F8 */ bdnz lbl_8001CB6C
/* 8001CB78 000189B8 60 00 00 00 */ nop
/* 8001CB7C 000189BC 60 00 00 00 */ nop
/* 8001CB80 000189C0 60 00 00 00 */ nop
/* 8001CB84 000189C4 60 00 00 00 */ nop
/* 8001CB88 000189C8 60 00 00 00 */ nop
/* 8001CB8C 000189CC 60 00 00 00 */ nop
/* 8001CB90 000189D0 60 00 00 00 */ nop
/* 8001CB94 000189D4 60 00 00 00 */ nop
/* 8001CB98 000189D8 60 00 00 00 */ nop
/* 8001CB9C 000189DC 60 00 00 00 */ nop
/* 8001CBA0 000189E0 60 00 00 00 */ nop
/* 8001CBA4 000189E4 60 00 00 00 */ nop
/* 8001CBA8 000189E8 4E 80 00 20 */ blr
/* 8001CBAC 000189EC 00 00 00 00 */ .4byte 0x00000000
.global LCEnable
LCEnable:
/* 8001CBB0 000189F0 94 21 FF F0 */ stwu r1, -0x10(r1)
/* 8001CBB4 000189F4 7C 08 02 A6 */ mflr r0
/* 8001CBB8 000189F8 90 01 00 14 */ stw r0, 0x14(r1)
/* 8001CBBC 000189FC 93 E1 00 0C */ stw r31, 0xc(r1)
/* 8001CBC0 00018A00 48 00 4C 61 */ bl OSDisableInterrupts
/* 8001CBC4 00018A04 7C 7F 1B 78 */ mr r31, r3
/* 8001CBC8 00018A08 4B FF FF 19 */ bl __LCEnable
/* 8001CBCC 00018A0C 7F E3 FB 78 */ mr r3, r31
/* 8001CBD0 00018A10 48 00 4C 91 */ bl OSRestoreInterrupts
/* 8001CBD4 00018A14 80 01 00 14 */ lwz r0, 0x14(r1)
/* 8001CBD8 00018A18 83 E1 00 0C */ lwz r31, 0xc(r1)
/* 8001CBDC 00018A1C 7C 08 03 A6 */ mtlr r0
/* 8001CBE0 00018A20 38 21 00 10 */ addi r1, r1, 0x10
/* 8001CBE4 00018A24 4E 80 00 20 */ blr
/* 8001CBE8 00018A28 00 00 00 00 */ .4byte 0x00000000
/* 8001CBEC 00018A2C 00 00 00 00 */ .4byte 0x00000000
.global LCDisable
LCDisable:
/* 8001CBF0 00018A30 3C 60 E0 00 */ lis r3, 0xE0000020@ha
/* 8001CBF4 00018A34 38 80 02 00 */ li r4, 0x200
/* 8001CBF8 00018A38 7C 89 03 A6 */ mtctr r4
.global lbl_8001CBFC
lbl_8001CBFC:
/* 8001CBFC 00018A3C 7C 00 1B AC */ dcbi r0, r3
/* 8001CC00 00018A40 38 63 00 20 */ addi r3, r3, 0xE0000020@l
/* 8001CC04 00018A44 42 00 FF F8 */ bdnz lbl_8001CBFC
/* 8001CC08 00018A48 7C 98 E2 A6 */ mfspr r4, HID2
/* 8001CC0C 00018A4C 54 84 01 04 */ rlwinm r4, r4, 0, 4, 2
/* 8001CC10 00018A50 7C 98 E3 A6 */ mtspr HID2, r4
/* 8001CC14 00018A54 4E 80 00 20 */ blr
/* 8001CC18 00018A58 00 00 00 00 */ .4byte 0x00000000
/* 8001CC1C 00018A5C 00 00 00 00 */ .4byte 0x00000000
.global LCLoadBlocks
LCLoadBlocks:
/* 8001CC20 00018A60 54 A6 F6 FE */ extrwi r6, r5, 5, 25
/* 8001CC24 00018A64 54 84 00 FE */ clrlwi r4, r4, 3
/* 8001CC28 00018A68 7C C6 23 78 */ or r6, r6, r4
/* 8001CC2C 00018A6C 7C DA E3 A6 */ mtspr DMA_U, r6
/* 8001CC30 00018A70 54 A6 17 3A */ rlwinm r6, r5, 2, 28, 29
/* 8001CC34 00018A74 7C C6 1B 78 */ or r6, r6, r3
/* 8001CC38 00018A78 60 C6 00 12 */ ori r6, r6, 0x12
/* 8001CC3C 00018A7C 7C DB E3 A6 */ mtspr DMA_L, r6
/* 8001CC40 00018A80 4E 80 00 20 */ blr
/* 8001CC44 00018A84 00 00 00 00 */ .4byte 0x00000000
/* 8001CC48 00018A88 00 00 00 00 */ .4byte 0x00000000
/* 8001CC4C 00018A8C 00 00 00 00 */ .4byte 0x00000000
.global LCStoreBlocks
LCStoreBlocks:
/* 8001CC50 00018A90 54 A6 F6 FE */ extrwi r6, r5, 5, 25
/* 8001CC54 00018A94 54 63 00 FE */ clrlwi r3, r3, 3
/* 8001CC58 00018A98 7C C6 1B 78 */ or r6, r6, r3
/* 8001CC5C 00018A9C 7C DA E3 A6 */ mtspr DMA_U, r6
/* 8001CC60 00018AA0 54 A6 17 3A */ rlwinm r6, r5, 2, 28, 29
/* 8001CC64 00018AA4 7C C6 23 78 */ or r6, r6, r4
/* 8001CC68 00018AA8 60 C6 00 02 */ ori r6, r6, 0x2
/* 8001CC6C 00018AAC 7C DB E3 A6 */ mtspr DMA_L, r6
/* 8001CC70 00018AB0 4E 80 00 20 */ blr
/* 8001CC74 00018AB4 00 00 00 00 */ .4byte 0x00000000
/* 8001CC78 00018AB8 00 00 00 00 */ .4byte 0x00000000
/* 8001CC7C 00018ABC 00 00 00 00 */ .4byte 0x00000000
.global LCStoreData
LCStoreData:
/* 8001CC80 00018AC0 94 21 FF E0 */ stwu r1, -0x20(r1)
/* 8001CC84 00018AC4 7C 08 02 A6 */ mflr r0
/* 8001CC88 00018AC8 90 01 00 24 */ stw r0, 0x24(r1)
/* 8001CC8C 00018ACC 38 05 00 1F */ addi r0, r5, 0x1f
/* 8001CC90 00018AD0 93 E1 00 1C */ stw r31, 0x1c(r1)
/* 8001CC94 00018AD4 54 1F D9 7E */ srwi r31, r0, 5
/* 8001CC98 00018AD8 38 1F 00 7F */ addi r0, r31, 0x7f
/* 8001CC9C 00018ADC 93 C1 00 18 */ stw r30, 0x18(r1)
/* 8001CCA0 00018AE0 54 1E C9 FE */ srwi r30, r0, 7
/* 8001CCA4 00018AE4 93 A1 00 14 */ stw r29, 0x14(r1)
/* 8001CCA8 00018AE8 7C 9D 23 78 */ mr r29, r4
/* 8001CCAC 00018AEC 93 81 00 10 */ stw r28, 0x10(r1)
/* 8001CCB0 00018AF0 7C 7C 1B 78 */ mr r28, r3
/* 8001CCB4 00018AF4 48 00 00 40 */ b lbl_8001CCF4
.global lbl_8001CCB8
lbl_8001CCB8:
/* 8001CCB8 00018AF8 28 1F 00 80 */ cmplwi r31, 0x80
/* 8001CCBC 00018AFC 40 80 00 1C */ bge lbl_8001CCD8
/* 8001CCC0 00018B00 7F 83 E3 78 */ mr r3, r28
/* 8001CCC4 00018B04 7F A4 EB 78 */ mr r4, r29
/* 8001CCC8 00018B08 7F E5 FB 78 */ mr r5, r31
/* 8001CCCC 00018B0C 4B FF FF 85 */ bl LCStoreBlocks
/* 8001CCD0 00018B10 3B E0 00 00 */ li r31, 0x0
/* 8001CCD4 00018B14 48 00 00 20 */ b lbl_8001CCF4
.global lbl_8001CCD8
lbl_8001CCD8:
/* 8001CCD8 00018B18 7F 83 E3 78 */ mr r3, r28
/* 8001CCDC 00018B1C 7F A4 EB 78 */ mr r4, r29
/* 8001CCE0 00018B20 38 A0 00 00 */ li r5, 0x0
/* 8001CCE4 00018B24 4B FF FF 6D */ bl LCStoreBlocks
/* 8001CCE8 00018B28 3B FF FF 80 */ addi r31, r31, -0x80
/* 8001CCEC 00018B2C 3B 9C 10 00 */ addi r28, r28, 0x1000
/* 8001CCF0 00018B30 3B BD 10 00 */ addi r29, r29, 0x1000
.global lbl_8001CCF4
lbl_8001CCF4:
/* 8001CCF4 00018B34 2C 1F 00 00 */ cmpwi r31, 0x0
/* 8001CCF8 00018B38 40 82 FF C0 */ bne lbl_8001CCB8
/* 8001CCFC 00018B3C 7F C3 F3 78 */ mr r3, r30
/* 8001CD00 00018B40 83 E1 00 1C */ lwz r31, 0x1c(r1)
/* 8001CD04 00018B44 83 C1 00 18 */ lwz r30, 0x18(r1)
/* 8001CD08 00018B48 83 A1 00 14 */ lwz r29, 0x14(r1)
/* 8001CD0C 00018B4C 83 81 00 10 */ lwz r28, 0x10(r1)
/* 8001CD10 00018B50 80 01 00 24 */ lwz r0, 0x24(r1)
/* 8001CD14 00018B54 7C 08 03 A6 */ mtlr r0
/* 8001CD18 00018B58 38 21 00 20 */ addi r1, r1, 0x20
/* 8001CD1C 00018B5C 4E 80 00 20 */ blr
.global LCQueueLength
LCQueueLength:
/* 8001CD20 00018B60 7C 98 E2 A6 */ mfspr r4, HID2
/* 8001CD24 00018B64 54 83 47 3E */ extrwi r3, r4, 4, 4
/* 8001CD28 00018B68 4E 80 00 20 */ blr
/* 8001CD2C 00018B6C 00 00 00 00 */ .4byte 0x00000000
.global LCQueueWait
LCQueueWait:
/* 8001CD30 00018B70 7C 98 E2 A6 */ mfspr r4, HID2
/* 8001CD34 00018B74 54 84 47 3E */ extrwi r4, r4, 4, 4
/* 8001CD38 00018B78 7C 04 18 00 */ cmpw r4, r3
/* 8001CD3C 00018B7C 41 81 FF F4 */ bgt LCQueueWait
/* 8001CD40 00018B80 4E 80 00 20 */ blr
/* 8001CD44 00018B84 00 00 00 00 */ .4byte 0x00000000
/* 8001CD48 00018B88 00 00 00 00 */ .4byte 0x00000000
/* 8001CD4C 00018B8C 00 00 00 00 */ .4byte 0x00000000
.global DMAErrorHandler
DMAErrorHandler:
/* 8001CD50 00018B90 94 21 FF 80 */ stwu r1, -0x80(r1)
/* 8001CD54 00018B94 7C 08 02 A6 */ mflr r0
/* 8001CD58 00018B98 90 01 00 84 */ stw r0, 0x84(r1)
/* 8001CD5C 00018B9C 93 E1 00 7C */ stw r31, 0x7c(r1)
/* 8001CD60 00018BA0 93 C1 00 78 */ stw r30, 0x78(r1)
/* 8001CD64 00018BA4 93 A1 00 74 */ stw r29, 0x74(r1)
/* 8001CD68 00018BA8 7C 9D 23 78 */ mr r29, r4
/* 8001CD6C 00018BAC 40 86 00 24 */ bne cr1, lbl_8001CD90
/* 8001CD70 00018BB0 D8 21 00 28 */ stfd f1, 0x28(r1)
/* 8001CD74 00018BB4 D8 41 00 30 */ stfd f2, 0x30(r1)
/* 8001CD78 00018BB8 D8 61 00 38 */ stfd f3, 0x38(r1)
/* 8001CD7C 00018BBC D8 81 00 40 */ stfd f4, 0x40(r1)
/* 8001CD80 00018BC0 D8 A1 00 48 */ stfd f5, 0x48(r1)
/* 8001CD84 00018BC4 D8 C1 00 50 */ stfd f6, 0x50(r1)
/* 8001CD88 00018BC8 D8 E1 00 58 */ stfd f7, 0x58(r1)
/* 8001CD8C 00018BCC D9 01 00 60 */ stfd f8, 0x60(r1)
.global lbl_8001CD90
lbl_8001CD90:
/* 8001CD90 00018BD0 3F E0 80 42 */ lis r31, "@909"@ha
/* 8001CD94 00018BD4 90 61 00 08 */ stw r3, 0x8(r1)
/* 8001CD98 00018BD8 3B FF 22 78 */ addi r31, r31, "@909"@l
/* 8001CD9C 00018BDC 90 81 00 0C */ stw r4, 0xc(r1)
/* 8001CDA0 00018BE0 90 A1 00 10 */ stw r5, 0x10(r1)
/* 8001CDA4 00018BE4 90 C1 00 14 */ stw r6, 0x14(r1)
/* 8001CDA8 00018BE8 90 E1 00 18 */ stw r7, 0x18(r1)
/* 8001CDAC 00018BEC 91 01 00 1C */ stw r8, 0x1c(r1)
/* 8001CDB0 00018BF0 91 21 00 20 */ stw r9, 0x20(r1)
/* 8001CDB4 00018BF4 91 41 00 24 */ stw r10, 0x24(r1)
/* 8001CDB8 00018BF8 4B FF D4 49 */ bl PPCMfhid2
/* 8001CDBC 00018BFC 7C 7E 1B 78 */ mr r30, r3
/* 8001CDC0 00018C00 38 7F 00 00 */ addi r3, r31, 0x0
/* 8001CDC4 00018C04 4C C6 31 82 */ crclr 4*cr1+eq
/* 8001CDC8 00018C08 48 00 0B C9 */ bl OSReport
/* 8001CDCC 00018C0C 80 BD 01 9C */ lwz r5, 0x19c(r29)
/* 8001CDD0 00018C10 7F C4 F3 78 */ mr r4, r30
/* 8001CDD4 00018C14 38 7F 00 18 */ addi r3, r31, 0x18
/* 8001CDD8 00018C18 4C C6 31 82 */ crclr 4*cr1+eq
/* 8001CDDC 00018C1C 48 00 0B B5 */ bl OSReport
/* 8001CDE0 00018C20 57 C0 02 17 */ rlwinm. r0, r30, 0, 8, 11
/* 8001CDE4 00018C24 41 82 00 10 */ beq lbl_8001CDF4
/* 8001CDE8 00018C28 80 1D 01 9C */ lwz r0, 0x19c(r29)
/* 8001CDEC 00018C2C 54 00 02 95 */ rlwinm. r0, r0, 0, 10, 10
/* 8001CDF0 00018C30 40 82 00 1C */ bne lbl_8001CE0C
.global lbl_8001CDF4
lbl_8001CDF4:
/* 8001CDF4 00018C34 38 7F 00 38 */ addi r3, r31, 0x38
/* 8001CDF8 00018C38 4C C6 31 82 */ crclr 4*cr1+eq
/* 8001CDFC 00018C3C 48 00 0B 95 */ bl OSReport
/* 8001CE00 00018C40 7F A3 EB 78 */ mr r3, r29
/* 8001CE04 00018C44 48 00 07 2D */ bl OSDumpContext
/* 8001CE08 00018C48 4B FF D3 29 */ bl PPCHalt
.global lbl_8001CE0C
lbl_8001CE0C:
/* 8001CE0C 00018C4C 38 7F 00 68 */ addi r3, r31, 0x68
/* 8001CE10 00018C50 4C C6 31 82 */ crclr 4*cr1+eq
/* 8001CE14 00018C54 48 00 0B 7D */ bl OSReport
/* 8001CE18 00018C58 38 7F 00 A4 */ addi r3, r31, 0xa4
/* 8001CE1C 00018C5C 4C C6 31 82 */ crclr 4*cr1+eq
/* 8001CE20 00018C60 48 00 0B 71 */ bl OSReport
/* 8001CE24 00018C64 57 C0 02 11 */ rlwinm. r0, r30, 0, 8, 8
/* 8001CE28 00018C68 41 82 00 10 */ beq lbl_8001CE38
/* 8001CE2C 00018C6C 38 7F 00 DC */ addi r3, r31, 0xdc
/* 8001CE30 00018C70 4C C6 31 82 */ crclr 4*cr1+eq
/* 8001CE34 00018C74 48 00 0B 5D */ bl OSReport
.global lbl_8001CE38
lbl_8001CE38:
/* 8001CE38 00018C78 57 C0 02 53 */ rlwinm. r0, r30, 0, 9, 9
/* 8001CE3C 00018C7C 41 82 00 10 */ beq lbl_8001CE4C
/* 8001CE40 00018C80 38 7F 01 1C */ addi r3, r31, 0x11c
/* 8001CE44 00018C84 4C C6 31 82 */ crclr 4*cr1+eq
/* 8001CE48 00018C88 48 00 0B 49 */ bl OSReport
.global lbl_8001CE4C
lbl_8001CE4C:
/* 8001CE4C 00018C8C 57 C0 02 95 */ rlwinm. r0, r30, 0, 10, 10
/* 8001CE50 00018C90 41 82 00 10 */ beq lbl_8001CE60
/* 8001CE54 00018C94 38 7F 01 48 */ addi r3, r31, 0x148
/* 8001CE58 00018C98 4C C6 31 82 */ crclr 4*cr1+eq
/* 8001CE5C 00018C9C 48 00 0B 35 */ bl OSReport
.global lbl_8001CE60
lbl_8001CE60:
/* 8001CE60 00018CA0 57 C0 02 D7 */ rlwinm. r0, r30, 0, 11, 11
/* 8001CE64 00018CA4 41 82 00 10 */ beq lbl_8001CE74
/* 8001CE68 00018CA8 38 7F 01 68 */ addi r3, r31, 0x168
/* 8001CE6C 00018CAC 4C C6 31 82 */ crclr 4*cr1+eq
/* 8001CE70 00018CB0 48 00 0B 21 */ bl OSReport
.global lbl_8001CE74
lbl_8001CE74:
/* 8001CE74 00018CB4 7F C3 F3 78 */ mr r3, r30
/* 8001CE78 00018CB8 4B FF D3 99 */ bl PPCMthid2
/* 8001CE7C 00018CBC 80 01 00 84 */ lwz r0, 0x84(r1)
/* 8001CE80 00018CC0 83 E1 00 7C */ lwz r31, 0x7c(r1)
/* 8001CE84 00018CC4 83 C1 00 78 */ lwz r30, 0x78(r1)
/* 8001CE88 00018CC8 83 A1 00 74 */ lwz r29, 0x74(r1)
/* 8001CE8C 00018CCC 7C 08 03 A6 */ mtlr r0
/* 8001CE90 00018CD0 38 21 00 80 */ addi r1, r1, 0x80
/* 8001CE94 00018CD4 4E 80 00 20 */ blr
/* 8001CE98 00018CD8 00 00 00 00 */ .4byte 0x00000000
/* 8001CE9C 00018CDC 00 00 00 00 */ .4byte 0x00000000
.global __OSCacheInit
__OSCacheInit:
/* 8001CEA0 00018CE0 94 21 FF F0 */ stwu r1, -0x10(r1)
/* 8001CEA4 00018CE4 7C 08 02 A6 */ mflr r0
/* 8001CEA8 00018CE8 90 01 00 14 */ stw r0, 0x14(r1)
/* 8001CEAC 00018CEC 93 E1 00 0C */ stw r31, 0xc(r1)
/* 8001CEB0 00018CF0 4B FF D2 21 */ bl PPCMfhid0
/* 8001CEB4 00018CF4 54 60 04 21 */ rlwinm. r0, r3, 0, 16, 16
/* 8001CEB8 00018CF8 40 82 00 08 */ bne lbl_8001CEC0
/* 8001CEBC 00018CFC 4B FF FC 05 */ bl ICEnable
.global lbl_8001CEC0
lbl_8001CEC0:
/* 8001CEC0 00018D00 4B FF D2 11 */ bl PPCMfhid0
/* 8001CEC4 00018D04 54 60 04 63 */ rlwinm. r0, r3, 0, 17, 17
/* 8001CEC8 00018D08 40 82 00 08 */ bne lbl_8001CED0
/* 8001CECC 00018D0C 4B FF FA 65 */ bl DCEnable
.global lbl_8001CED0
lbl_8001CED0:
/* 8001CED0 00018D10 4B FF D2 21 */ bl PPCMfl2cr
/* 8001CED4 00018D14 54 60 00 01 */ clrrwi. r0, r3, 31
/* 8001CED8 00018D18 40 82 00 8C */ bne lbl_8001CF64
/* 8001CEDC 00018D1C 4B FF D1 D5 */ bl PPCMfmsr
/* 8001CEE0 00018D20 7C 7F 1B 78 */ mr r31, r3
/* 8001CEE4 00018D24 7C 00 04 AC */ sync
/* 8001CEE8 00018D28 38 60 00 30 */ li r3, 0x30
/* 8001CEEC 00018D2C 4B FF D1 D5 */ bl PPCMtmsr
/* 8001CEF0 00018D30 7C 00 04 AC */ sync
/* 8001CEF4 00018D34 7C 00 04 AC */ sync
/* 8001CEF8 00018D38 4B FF D1 F9 */ bl PPCMfl2cr
/* 8001CEFC 00018D3C 54 63 00 7E */ clrlwi r3, r3, 1
/* 8001CF00 00018D40 4B FF D2 01 */ bl PPCMtl2cr
/* 8001CF04 00018D44 7C 00 04 AC */ sync
/* 8001CF08 00018D48 7C 00 04 AC */ sync
/* 8001CF0C 00018D4C 4B FF D1 E5 */ bl PPCMfl2cr
/* 8001CF10 00018D50 54 63 00 7E */ clrlwi r3, r3, 1
/* 8001CF14 00018D54 4B FF D1 ED */ bl PPCMtl2cr
/* 8001CF18 00018D58 7C 00 04 AC */ sync
/* 8001CF1C 00018D5C 4B FF D1 D5 */ bl PPCMfl2cr
/* 8001CF20 00018D60 64 63 00 20 */ oris r3, r3, 0x20
/* 8001CF24 00018D64 4B FF D1 DD */ bl PPCMtl2cr
.global lbl_8001CF28
lbl_8001CF28:
/* 8001CF28 00018D68 4B FF D1 C9 */ bl PPCMfl2cr
/* 8001CF2C 00018D6C 54 60 07 FF */ clrlwi. r0, r3, 31
/* 8001CF30 00018D70 40 82 FF F8 */ bne lbl_8001CF28
/* 8001CF34 00018D74 4B FF D1 BD */ bl PPCMfl2cr
/* 8001CF38 00018D78 54 63 02 D2 */ rlwinm r3, r3, 0, 11, 9
/* 8001CF3C 00018D7C 4B FF D1 C5 */ bl PPCMtl2cr
.global lbl_8001CF40
lbl_8001CF40:
/* 8001CF40 00018D80 4B FF D1 B1 */ bl PPCMfl2cr
/* 8001CF44 00018D84 54 60 07 FF */ clrlwi. r0, r3, 31
/* 8001CF48 00018D88 40 82 FF F8 */ bne lbl_8001CF40
/* 8001CF4C 00018D8C 7F E3 FB 78 */ mr r3, r31
/* 8001CF50 00018D90 4B FF D1 71 */ bl PPCMtmsr
/* 8001CF54 00018D94 4B FF D1 9D */ bl PPCMfl2cr
/* 8001CF58 00018D98 64 60 80 00 */ oris r0, r3, 0x8000
/* 8001CF5C 00018D9C 54 03 02 D2 */ rlwinm r3, r0, 0, 11, 9
/* 8001CF60 00018DA0 4B FF D1 A1 */ bl PPCMtl2cr
.global lbl_8001CF64
lbl_8001CF64:
/* 8001CF64 00018DA4 3C 80 80 02 */ lis r4, DMAErrorHandler@ha
/* 8001CF68 00018DA8 38 60 00 01 */ li r3, 0x1
/* 8001CF6C 00018DAC 38 84 CD 50 */ addi r4, r4, DMAErrorHandler@l
/* 8001CF70 00018DB0 48 00 0A B1 */ bl OSSetErrorHandler
/* 8001CF74 00018DB4 80 01 00 14 */ lwz r0, 0x14(r1)
/* 8001CF78 00018DB8 83 E1 00 0C */ lwz r31, 0xc(r1)
/* 8001CF7C 00018DBC 7C 08 03 A6 */ mtlr r0
/* 8001CF80 00018DC0 38 21 00 10 */ addi r1, r1, 0x10
/* 8001CF84 00018DC4 4E 80 00 20 */ blr
/* 8001CF88 00018DC8 00 00 00 00 */ .4byte 0x00000000
/* 8001CF8C 00018DCC 00 00 00 00 */ .4byte 0x00000000
.include "macros.inc"
.section .data, "wa" # 0x80421040 - 0x80496700 ; 0x000756C0
.global "@909"
"@909":
.4byte 0x4D616368
.4byte 0x696E6520
.4byte 0x63686563
.4byte 0x6B207265
.4byte 0x63656976
.4byte 0x65640A00
.4byte 0x48494432
.4byte 0x203D2030
.4byte 0x78257820
.4byte 0x20205352
.4byte 0x5231203D
.4byte 0x20307825
.4byte 0x780A0000
.4byte 0
.4byte 0x4D616368
.4byte 0x696E6520
.4byte 0x63686563
.4byte 0x6B207761
.4byte 0x73206E6F
.4byte 0x7420444D
.4byte 0x412F6C6F
.4byte 0x636B6564
.4byte 0x20636163
.4byte 0x68652072
.4byte 0x656C6174
.4byte 0x65640A00
.4byte 0x444D4145
.4byte 0x72726F72
.4byte 0x48616E64
.4byte 0x6C657228
.4byte 0x293A2041
.4byte 0x6E206572
.4byte 0x726F7220
.4byte 0x6F636375
.4byte 0x72726564
.4byte 0x20776869
.4byte 0x6C652070
.4byte 0x726F6365
.4byte 0x7373696E
.4byte 0x6720444D
.4byte 0x412E0A00
.4byte 0x54686520
.4byte 0x666F6C6C
.4byte 0x6F77696E
.4byte 0x67206572
.4byte 0x726F7273
.4byte 0x20686176
.4byte 0x65206265
.4byte 0x656E2064
.4byte 0x65746563
.4byte 0x74656420
.4byte 0x616E6420
.4byte 0x636C6561
.4byte 0x72656420
.4byte 0x3A0A0000
.4byte 0x092D2052
.4byte 0x65717565
.4byte 0x73746564
.4byte 0x2061206C
.4byte 0x6F636B65
.4byte 0x64206361
.4byte 0x63686520
.4byte 0x74616720
.4byte 0x74686174
.4byte 0x20776173
.4byte 0x20616C72
.4byte 0x65616479
.4byte 0x20696E20
.4byte 0x74686520
.4byte 0x63616368
.4byte 0x650A0000
.4byte 0x092D2044
.4byte 0x4D412061
.4byte 0x7474656D
.4byte 0x70746564
.4byte 0x20746F20
.4byte 0x61636365
.4byte 0x7373206E
.4byte 0x6F726D61
.4byte 0x6C206361
.4byte 0x6368650A
.4byte 0
.4byte 0x092D2044
.4byte 0x4D41206D
.4byte 0x69737365
.4byte 0x6420696E
.4byte 0x20646174
.4byte 0x61206361
.4byte 0x6368650A
.4byte 0
.4byte 0x092D2044
.4byte 0x4D412071
.4byte 0x75657565
.4byte 0x206F7665
.4byte 0x72666C6F
.4byte 0x7765640A
.4byte 0
.4byte 0