prime/asm/Dolphin/os/OSLink.s

722 lines
32 KiB
ArmAsm
Raw Normal View History

.include "macros.inc"
.section .data
.balign 8
.global lbl_803F2290
lbl_803F2290:
.asciz "OSLink: unknown relocation type %3d\n"
.balign 4
.global lbl_803F22B8
lbl_803F22B8:
.asciz "OSUnlink: unknown relocation type %3d\n"
.balign 4
.section .text, "ax"
.global OSNotifyLink
OSNotifyLink:
/* 80381ECC 0037EE2C 4E 80 00 20 */ blr
.global OSNotifyUnlink
OSNotifyUnlink:
/* 80381ED0 0037EE30 4E 80 00 20 */ blr
.global Relocate
Relocate:
/* 80381ED4 0037EE34 7C 08 02 A6 */ mflr r0
/* 80381ED8 0037EE38 90 01 00 04 */ stw r0, 4(r1)
/* 80381EDC 0037EE3C 94 21 FF C0 */ stwu r1, -0x40(r1)
/* 80381EE0 0037EE40 BE E1 00 1C */ stmw r23, 0x1c(r1)
/* 80381EE4 0037EE44 7C 7A 1B 79 */ or. r26, r3, r3
/* 80381EE8 0037EE48 3B 64 00 00 */ addi r27, r4, 0
/* 80381EEC 0037EE4C 41 82 00 0C */ beq lbl_80381EF8
/* 80381EF0 0037EE50 83 FA 00 00 */ lwz r31, 0(r26)
/* 80381EF4 0037EE54 48 00 00 08 */ b lbl_80381EFC
lbl_80381EF8:
/* 80381EF8 0037EE58 3B E0 00 00 */ li r31, 0
lbl_80381EFC:
/* 80381EFC 0037EE5C 80 7B 00 28 */ lwz r3, 0x28(r27)
/* 80381F00 0037EE60 80 1B 00 2C */ lwz r0, 0x2c(r27)
/* 80381F04 0037EE64 38 83 00 00 */ addi r4, r3, 0
/* 80381F08 0037EE68 7C 63 02 14 */ add r3, r3, r0
/* 80381F0C 0037EE6C 38 03 00 07 */ addi r0, r3, 7
/* 80381F10 0037EE70 7C 04 00 50 */ subf r0, r4, r0
/* 80381F14 0037EE74 54 00 E8 FE */ srwi r0, r0, 3
/* 80381F18 0037EE78 7C 04 18 40 */ cmplw r4, r3
/* 80381F1C 0037EE7C 7C 09 03 A6 */ mtctr r0
/* 80381F20 0037EE80 40 80 00 18 */ bge lbl_80381F38
lbl_80381F24:
/* 80381F24 0037EE84 80 04 00 00 */ lwz r0, 0(r4)
/* 80381F28 0037EE88 7C 00 F8 40 */ cmplw r0, r31
/* 80381F2C 0037EE8C 41 82 00 14 */ beq lbl_80381F40
/* 80381F30 0037EE90 38 84 00 08 */ addi r4, r4, 8
/* 80381F34 0037EE94 42 00 FF F0 */ bdnz lbl_80381F24
lbl_80381F38:
/* 80381F38 0037EE98 38 60 00 00 */ li r3, 0
/* 80381F3C 0037EE9C 48 00 02 40 */ b lbl_8038217C
lbl_80381F40:
/* 80381F40 0037EEA0 3C 60 80 3F */ lis r3, lbl_803F2290@ha
/* 80381F44 0037EEA4 83 C4 00 04 */ lwz r30, 4(r4)
/* 80381F48 0037EEA8 3B 23 22 90 */ addi r25, r3, lbl_803F2290@l
/* 80381F4C 0037EEAC 3B A0 00 00 */ li r29, 0
/* 80381F50 0037EEB0 48 00 01 F4 */ b lbl_80382144
lbl_80381F54:
/* 80381F54 0037EEB4 A0 1E 00 00 */ lhz r0, 0(r30)
/* 80381F58 0037EEB8 28 1F 00 00 */ cmplwi r31, 0
/* 80381F5C 0037EEBC 7F 9C 02 14 */ add r28, r28, r0
/* 80381F60 0037EEC0 41 82 00 1C */ beq lbl_80381F7C
/* 80381F64 0037EEC4 88 1E 00 03 */ lbz r0, 3(r30)
/* 80381F68 0037EEC8 80 7A 00 10 */ lwz r3, 0x10(r26)
/* 80381F6C 0037EECC 54 00 18 38 */ slwi r0, r0, 3
/* 80381F70 0037EED0 7C 03 00 2E */ lwzx r0, r3, r0
/* 80381F74 0037EED4 54 05 00 3C */ rlwinm r5, r0, 0, 0, 0x1e
/* 80381F78 0037EED8 48 00 00 08 */ b lbl_80381F80
lbl_80381F7C:
/* 80381F7C 0037EEDC 38 A0 00 00 */ li r5, 0
lbl_80381F80:
/* 80381F80 0037EEE0 2C 04 00 06 */ cmpwi r4, 6
/* 80381F84 0037EEE4 41 82 00 C4 */ beq lbl_80382048
/* 80381F88 0037EEE8 40 80 00 30 */ bge lbl_80381FB8
/* 80381F8C 0037EEEC 2C 04 00 02 */ cmpwi r4, 2
/* 80381F90 0037EEF0 41 82 00 68 */ beq lbl_80381FF8
/* 80381F94 0037EEF4 40 80 00 14 */ bge lbl_80381FA8
/* 80381F98 0037EEF8 2C 04 00 00 */ cmpwi r4, 0
/* 80381F9C 0037EEFC 41 82 01 A4 */ beq lbl_80382140
/* 80381FA0 0037EF00 40 80 00 48 */ bge lbl_80381FE8
/* 80381FA4 0037EF04 48 00 01 90 */ b lbl_80382134
lbl_80381FA8:
/* 80381FA8 0037EF08 2C 04 00 04 */ cmpwi r4, 4
/* 80381FAC 0037EF0C 41 82 00 78 */ beq lbl_80382024
/* 80381FB0 0037EF10 40 80 00 84 */ bge lbl_80382034
/* 80381FB4 0037EF14 48 00 00 60 */ b lbl_80382014
lbl_80381FB8:
/* 80381FB8 0037EF18 2C 04 00 C9 */ cmpwi r4, 0xc9
/* 80381FBC 0037EF1C 41 82 01 84 */ beq lbl_80382140
/* 80381FC0 0037EF20 40 80 00 1C */ bge lbl_80381FDC
/* 80381FC4 0037EF24 2C 04 00 0A */ cmpwi r4, 0xa
/* 80381FC8 0037EF28 41 82 00 C8 */ beq lbl_80382090
/* 80381FCC 0037EF2C 41 80 00 A8 */ blt lbl_80382074
/* 80381FD0 0037EF30 2C 04 00 0E */ cmpwi r4, 0xe
/* 80381FD4 0037EF34 40 80 01 60 */ bge lbl_80382134
/* 80381FD8 0037EF38 48 00 00 D8 */ b lbl_803820B0
lbl_80381FDC:
/* 80381FDC 0037EF3C 2C 04 00 CB */ cmpwi r4, 0xcb
/* 80381FE0 0037EF40 40 80 01 54 */ bge lbl_80382134
/* 80381FE4 0037EF44 48 00 00 EC */ b lbl_803820D0
lbl_80381FE8:
/* 80381FE8 0037EF48 80 1E 00 04 */ lwz r0, 4(r30)
/* 80381FEC 0037EF4C 7C 05 02 14 */ add r0, r5, r0
/* 80381FF0 0037EF50 90 1C 00 00 */ stw r0, 0(r28)
/* 80381FF4 0037EF54 48 00 01 4C */ b lbl_80382140
lbl_80381FF8:
/* 80381FF8 0037EF58 80 1E 00 04 */ lwz r0, 4(r30)
/* 80381FFC 0037EF5C 80 7C 00 00 */ lwz r3, 0(r28)
/* 80382000 0037EF60 7C 05 02 14 */ add r0, r5, r0
/* 80382004 0037EF64 54 63 07 8A */ rlwinm r3, r3, 0, 0x1e, 5
/* 80382008 0037EF68 50 03 01 BA */ rlwimi r3, r0, 0, 6, 0x1d
/* 8038200C 0037EF6C 90 7C 00 00 */ stw r3, 0(r28)
/* 80382010 0037EF70 48 00 01 30 */ b lbl_80382140
lbl_80382014:
/* 80382014 0037EF74 80 1E 00 04 */ lwz r0, 4(r30)
/* 80382018 0037EF78 7C 05 02 14 */ add r0, r5, r0
/* 8038201C 0037EF7C B0 1C 00 00 */ sth r0, 0(r28)
/* 80382020 0037EF80 48 00 01 20 */ b lbl_80382140
lbl_80382024:
/* 80382024 0037EF84 80 1E 00 04 */ lwz r0, 4(r30)
/* 80382028 0037EF88 7C 05 02 14 */ add r0, r5, r0
/* 8038202C 0037EF8C B0 1C 00 00 */ sth r0, 0(r28)
/* 80382030 0037EF90 48 00 01 10 */ b lbl_80382140
lbl_80382034:
/* 80382034 0037EF94 80 1E 00 04 */ lwz r0, 4(r30)
/* 80382038 0037EF98 7C 05 02 14 */ add r0, r5, r0
/* 8038203C 0037EF9C 54 00 84 3E */ srwi r0, r0, 0x10
/* 80382040 0037EFA0 B0 1C 00 00 */ sth r0, 0(r28)
/* 80382044 0037EFA4 48 00 00 FC */ b lbl_80382140
lbl_80382048:
/* 80382048 0037EFA8 80 1E 00 04 */ lwz r0, 4(r30)
/* 8038204C 0037EFAC 7C 85 02 14 */ add r4, r5, r0
/* 80382050 0037EFB0 54 80 04 21 */ rlwinm. r0, r4, 0, 0x10, 0x10
/* 80382054 0037EFB4 41 82 00 0C */ beq lbl_80382060
/* 80382058 0037EFB8 38 60 00 01 */ li r3, 1
/* 8038205C 0037EFBC 48 00 00 08 */ b lbl_80382064
lbl_80382060:
/* 80382060 0037EFC0 38 60 00 00 */ li r3, 0
lbl_80382064:
/* 80382064 0037EFC4 54 80 84 3E */ srwi r0, r4, 0x10
/* 80382068 0037EFC8 7C 00 1A 14 */ add r0, r0, r3
/* 8038206C 0037EFCC B0 1C 00 00 */ sth r0, 0(r28)
/* 80382070 0037EFD0 48 00 00 D0 */ b lbl_80382140
lbl_80382074:
/* 80382074 0037EFD4 80 1E 00 04 */ lwz r0, 4(r30)
/* 80382078 0037EFD8 80 7C 00 00 */ lwz r3, 0(r28)
/* 8038207C 0037EFDC 7C 05 02 14 */ add r0, r5, r0
/* 80382080 0037EFE0 54 63 07 9E */ rlwinm r3, r3, 0, 0x1e, 0xf
/* 80382084 0037EFE4 50 03 04 3A */ rlwimi r3, r0, 0, 0x10, 0x1d
/* 80382088 0037EFE8 90 7C 00 00 */ stw r3, 0(r28)
/* 8038208C 0037EFEC 48 00 00 B4 */ b lbl_80382140
lbl_80382090:
/* 80382090 0037EFF0 80 1E 00 04 */ lwz r0, 4(r30)
/* 80382094 0037EFF4 80 7C 00 00 */ lwz r3, 0(r28)
/* 80382098 0037EFF8 7C 05 02 14 */ add r0, r5, r0
/* 8038209C 0037EFFC 7C 1C 00 50 */ subf r0, r28, r0
/* 803820A0 0037F000 54 63 07 8A */ rlwinm r3, r3, 0, 0x1e, 5
/* 803820A4 0037F004 50 03 01 BA */ rlwimi r3, r0, 0, 6, 0x1d
/* 803820A8 0037F008 90 7C 00 00 */ stw r3, 0(r28)
/* 803820AC 0037F00C 48 00 00 94 */ b lbl_80382140
lbl_803820B0:
/* 803820B0 0037F010 80 1E 00 04 */ lwz r0, 4(r30)
/* 803820B4 0037F014 80 7C 00 00 */ lwz r3, 0(r28)
/* 803820B8 0037F018 7C 05 02 14 */ add r0, r5, r0
/* 803820BC 0037F01C 7C 1C 00 50 */ subf r0, r28, r0
/* 803820C0 0037F020 54 63 07 9E */ rlwinm r3, r3, 0, 0x1e, 0xf
/* 803820C4 0037F024 50 03 04 3A */ rlwimi r3, r0, 0, 0x10, 0x1d
/* 803820C8 0037F028 90 7C 00 00 */ stw r3, 0(r28)
/* 803820CC 0037F02C 48 00 00 74 */ b lbl_80382140
lbl_803820D0:
/* 803820D0 0037F030 88 1E 00 03 */ lbz r0, 3(r30)
/* 803820D4 0037F034 28 1D 00 00 */ cmplwi r29, 0
/* 803820D8 0037F038 80 7B 00 10 */ lwz r3, 0x10(r27)
/* 803820DC 0037F03C 54 00 18 38 */ slwi r0, r0, 3
/* 803820E0 0037F040 7C 63 02 14 */ add r3, r3, r0
/* 803820E4 0037F044 80 03 00 00 */ lwz r0, 0(r3)
/* 803820E8 0037F048 3A E3 00 00 */ addi r23, r3, 0
/* 803820EC 0037F04C 54 1C 00 3C */ rlwinm r28, r0, 0, 0, 0x1e
/* 803820F0 0037F050 41 82 00 24 */ beq lbl_80382114
/* 803820F4 0037F054 80 1D 00 00 */ lwz r0, 0(r29)
/* 803820F8 0037F058 80 9D 00 04 */ lwz r4, 4(r29)
/* 803820FC 0037F05C 54 18 00 3C */ rlwinm r24, r0, 0, 0, 0x1e
/* 80382100 0037F060 38 78 00 00 */ addi r3, r24, 0
/* 80382104 0037F064 4B FF C9 AD */ bl DCFlushRange
/* 80382108 0037F068 7F 03 C3 78 */ mr r3, r24
/* 8038210C 0037F06C 80 9D 00 04 */ lwz r4, 4(r29)
/* 80382110 0037F070 4B FF CA 85 */ bl ICInvalidateRange
lbl_80382114:
/* 80382114 0037F074 80 17 00 00 */ lwz r0, 0(r23)
/* 80382118 0037F078 54 00 07 FF */ clrlwi. r0, r0, 0x1f
/* 8038211C 0037F07C 41 82 00 0C */ beq lbl_80382128
/* 80382120 0037F080 7E E0 BB 78 */ mr r0, r23
/* 80382124 0037F084 48 00 00 08 */ b lbl_8038212C
lbl_80382128:
/* 80382128 0037F088 38 00 00 00 */ li r0, 0
lbl_8038212C:
/* 8038212C 0037F08C 7C 1D 03 78 */ mr r29, r0
/* 80382130 0037F090 48 00 00 10 */ b lbl_80382140
lbl_80382134:
/* 80382134 0037F094 38 79 00 00 */ addi r3, r25, 0
/* 80382138 0037F098 4C C6 31 82 */ crclr 6
/* 8038213C 0037F09C 4B FF D8 71 */ bl OSReport
lbl_80382140:
/* 80382140 0037F0A0 3B DE 00 08 */ addi r30, r30, 8
lbl_80382144:
/* 80382144 0037F0A4 88 9E 00 02 */ lbz r4, 2(r30)
/* 80382148 0037F0A8 28 04 00 CB */ cmplwi r4, 0xcb
/* 8038214C 0037F0AC 40 82 FE 08 */ bne lbl_80381F54
/* 80382150 0037F0B0 28 1D 00 00 */ cmplwi r29, 0
/* 80382154 0037F0B4 41 82 00 24 */ beq lbl_80382178
/* 80382158 0037F0B8 80 1D 00 00 */ lwz r0, 0(r29)
/* 8038215C 0037F0BC 80 9D 00 04 */ lwz r4, 4(r29)
/* 80382160 0037F0C0 54 19 00 3C */ rlwinm r25, r0, 0, 0, 0x1e
/* 80382164 0037F0C4 38 79 00 00 */ addi r3, r25, 0
/* 80382168 0037F0C8 4B FF C9 49 */ bl DCFlushRange
/* 8038216C 0037F0CC 7F 23 CB 78 */ mr r3, r25
/* 80382170 0037F0D0 80 9D 00 04 */ lwz r4, 4(r29)
/* 80382174 0037F0D4 4B FF CA 21 */ bl ICInvalidateRange
lbl_80382178:
/* 80382178 0037F0D8 38 60 00 01 */ li r3, 1
lbl_8038217C:
/* 8038217C 0037F0DC BA E1 00 1C */ lmw r23, 0x1c(r1)
/* 80382180 0037F0E0 80 01 00 44 */ lwz r0, 0x44(r1)
/* 80382184 0037F0E4 38 21 00 40 */ addi r1, r1, 0x40
/* 80382188 0037F0E8 7C 08 03 A6 */ mtlr r0
/* 8038218C 0037F0EC 4E 80 00 20 */ blr
.global OSLink
OSLink:
/* 80382190 0037F0F0 7C 08 02 A6 */ mflr r0
/* 80382194 0037F0F4 90 01 00 04 */ stw r0, 4(r1)
/* 80382198 0037F0F8 38 00 00 00 */ li r0, 0
/* 8038219C 0037F0FC 94 21 FF E8 */ stwu r1, -0x18(r1)
/* 803821A0 0037F100 93 E1 00 14 */ stw r31, 0x14(r1)
/* 803821A4 0037F104 3B E3 00 00 */ addi r31, r3, 0
/* 803821A8 0037F108 93 C1 00 10 */ stw r30, 0x10(r1)
/* 803821AC 0037F10C 7C 9E 23 78 */ mr r30, r4
/* 803821B0 0037F110 98 03 00 33 */ stb r0, 0x33(r3)
/* 803821B4 0037F114 80 03 00 1C */ lwz r0, 0x1c(r3)
/* 803821B8 0037F118 28 00 00 02 */ cmplwi r0, 2
/* 803821BC 0037F11C 41 81 00 40 */ bgt lbl_803821FC
/* 803821C0 0037F120 41 80 00 44 */ blt lbl_80382204
/* 803821C4 0037F124 80 7F 00 40 */ lwz r3, 0x40(r31)
/* 803821C8 0037F128 28 03 00 00 */ cmplwi r3, 0
/* 803821CC 0037F12C 41 82 00 14 */ beq lbl_803821E0
/* 803821D0 0037F130 7C 1F 1B 96 */ divwu r0, r31, r3
/* 803821D4 0037F134 7C 00 19 D6 */ mullw r0, r0, r3
/* 803821D8 0037F138 7C 00 F8 51 */ subf. r0, r0, r31
/* 803821DC 0037F13C 40 82 00 20 */ bne lbl_803821FC
lbl_803821E0:
/* 803821E0 0037F140 80 7F 00 44 */ lwz r3, 0x44(r31)
/* 803821E4 0037F144 28 03 00 00 */ cmplwi r3, 0
/* 803821E8 0037F148 41 82 00 1C */ beq lbl_80382204
/* 803821EC 0037F14C 7C 1E 1B 96 */ divwu r0, r30, r3
/* 803821F0 0037F150 7C 00 19 D6 */ mullw r0, r0, r3
/* 803821F4 0037F154 7C 00 F0 51 */ subf. r0, r0, r30
/* 803821F8 0037F158 41 82 00 0C */ beq lbl_80382204
lbl_803821FC:
/* 803821FC 0037F15C 38 60 00 00 */ li r3, 0
/* 80382200 0037F160 48 00 01 D4 */ b lbl_803823D4
lbl_80382204:
/* 80382204 0037F164 3C 60 80 00 */ lis r3, 0x800030C8@ha
/* 80382208 0037F168 38 A3 30 C8 */ addi r5, r3, 0x800030C8@l
/* 8038220C 0037F16C 84 85 00 04 */ lwzu r4, 4(r5)
/* 80382210 0037F170 28 04 00 00 */ cmplwi r4, 0
/* 80382214 0037F174 40 82 00 0C */ bne lbl_80382220
/* 80382218 0037F178 93 E3 30 C8 */ stw r31, 0x30c8(r3)
/* 8038221C 0037F17C 48 00 00 08 */ b lbl_80382224
lbl_80382220:
/* 80382220 0037F180 93 E4 00 04 */ stw r31, 4(r4)
lbl_80382224:
/* 80382224 0037F184 90 9F 00 08 */ stw r4, 8(r31)
/* 80382228 0037F188 38 00 00 00 */ li r0, 0
/* 8038222C 0037F18C 38 7E 00 00 */ addi r3, r30, 0
/* 80382230 0037F190 90 1F 00 04 */ stw r0, 4(r31)
/* 80382234 0037F194 38 80 00 00 */ li r4, 0
/* 80382238 0037F198 93 E5 00 00 */ stw r31, 0(r5)
/* 8038223C 0037F19C 80 BF 00 20 */ lwz r5, 0x20(r31)
/* 80382240 0037F1A0 4B C8 11 69 */ bl memset
/* 80382244 0037F1A4 80 1F 00 10 */ lwz r0, 0x10(r31)
/* 80382248 0037F1A8 38 A0 00 01 */ li r5, 1
/* 8038224C 0037F1AC 38 60 00 08 */ li r3, 8
/* 80382250 0037F1B0 7C 00 FA 14 */ add r0, r0, r31
/* 80382254 0037F1B4 90 1F 00 10 */ stw r0, 0x10(r31)
/* 80382258 0037F1B8 80 1F 00 24 */ lwz r0, 0x24(r31)
/* 8038225C 0037F1BC 7C 00 FA 14 */ add r0, r0, r31
/* 80382260 0037F1C0 90 1F 00 24 */ stw r0, 0x24(r31)
/* 80382264 0037F1C4 80 1F 00 28 */ lwz r0, 0x28(r31)
/* 80382268 0037F1C8 7C 00 FA 14 */ add r0, r0, r31
/* 8038226C 0037F1CC 90 1F 00 28 */ stw r0, 0x28(r31)
/* 80382270 0037F1D0 48 00 00 48 */ b lbl_803822B8
lbl_80382274:
/* 80382274 0037F1D4 80 1F 00 10 */ lwz r0, 0x10(r31)
/* 80382278 0037F1D8 7C 80 1A 14 */ add r4, r0, r3
/* 8038227C 0037F1DC 80 04 00 00 */ lwz r0, 0(r4)
/* 80382280 0037F1E0 28 00 00 00 */ cmplwi r0, 0
/* 80382284 0037F1E4 41 82 00 10 */ beq lbl_80382294
/* 80382288 0037F1E8 7C 00 FA 14 */ add r0, r0, r31
/* 8038228C 0037F1EC 90 04 00 00 */ stw r0, 0(r4)
/* 80382290 0037F1F0 48 00 00 20 */ b lbl_803822B0
lbl_80382294:
/* 80382294 0037F1F4 80 04 00 04 */ lwz r0, 4(r4)
/* 80382298 0037F1F8 28 00 00 00 */ cmplwi r0, 0
/* 8038229C 0037F1FC 41 82 00 14 */ beq lbl_803822B0
/* 803822A0 0037F200 98 BF 00 33 */ stb r5, 0x33(r31)
/* 803822A4 0037F204 93 C4 00 00 */ stw r30, 0(r4)
/* 803822A8 0037F208 80 04 00 04 */ lwz r0, 4(r4)
/* 803822AC 0037F20C 7F DE 02 14 */ add r30, r30, r0
lbl_803822B0:
/* 803822B0 0037F210 38 63 00 08 */ addi r3, r3, 8
/* 803822B4 0037F214 38 A5 00 01 */ addi r5, r5, 1
lbl_803822B8:
/* 803822B8 0037F218 80 1F 00 0C */ lwz r0, 0xc(r31)
/* 803822BC 0037F21C 7C 05 00 40 */ cmplw r5, r0
/* 803822C0 0037F220 41 80 FF B4 */ blt lbl_80382274
/* 803822C4 0037F224 80 9F 00 28 */ lwz r4, 0x28(r31)
/* 803822C8 0037F228 48 00 00 14 */ b lbl_803822DC
lbl_803822CC:
/* 803822CC 0037F22C 80 04 00 04 */ lwz r0, 4(r4)
/* 803822D0 0037F230 7C 00 FA 14 */ add r0, r0, r31
/* 803822D4 0037F234 90 04 00 04 */ stw r0, 4(r4)
/* 803822D8 0037F238 38 84 00 08 */ addi r4, r4, 8
lbl_803822DC:
/* 803822DC 0037F23C 80 7F 00 28 */ lwz r3, 0x28(r31)
/* 803822E0 0037F240 80 1F 00 2C */ lwz r0, 0x2c(r31)
/* 803822E4 0037F244 7C 03 02 14 */ add r0, r3, r0
/* 803822E8 0037F248 7C 04 00 40 */ cmplw r4, r0
/* 803822EC 0037F24C 41 80 FF E0 */ blt lbl_803822CC
/* 803822F0 0037F250 88 1F 00 30 */ lbz r0, 0x30(r31)
/* 803822F4 0037F254 28 00 00 00 */ cmplwi r0, 0
/* 803822F8 0037F258 41 82 00 20 */ beq lbl_80382318
/* 803822FC 0037F25C 80 7F 00 10 */ lwz r3, 0x10(r31)
/* 80382300 0037F260 54 00 18 38 */ slwi r0, r0, 3
/* 80382304 0037F264 80 9F 00 34 */ lwz r4, 0x34(r31)
/* 80382308 0037F268 7C 03 00 2E */ lwzx r0, r3, r0
/* 8038230C 0037F26C 54 00 00 3C */ rlwinm r0, r0, 0, 0, 0x1e
/* 80382310 0037F270 7C 04 02 14 */ add r0, r4, r0
/* 80382314 0037F274 90 1F 00 34 */ stw r0, 0x34(r31)
lbl_80382318:
/* 80382318 0037F278 88 1F 00 31 */ lbz r0, 0x31(r31)
/* 8038231C 0037F27C 28 00 00 00 */ cmplwi r0, 0
/* 80382320 0037F280 41 82 00 20 */ beq lbl_80382340
/* 80382324 0037F284 80 7F 00 10 */ lwz r3, 0x10(r31)
/* 80382328 0037F288 54 00 18 38 */ slwi r0, r0, 3
/* 8038232C 0037F28C 80 9F 00 38 */ lwz r4, 0x38(r31)
/* 80382330 0037F290 7C 03 00 2E */ lwzx r0, r3, r0
/* 80382334 0037F294 54 00 00 3C */ rlwinm r0, r0, 0, 0, 0x1e
/* 80382338 0037F298 7C 04 02 14 */ add r0, r4, r0
/* 8038233C 0037F29C 90 1F 00 38 */ stw r0, 0x38(r31)
lbl_80382340:
/* 80382340 0037F2A0 88 1F 00 32 */ lbz r0, 0x32(r31)
/* 80382344 0037F2A4 28 00 00 00 */ cmplwi r0, 0
/* 80382348 0037F2A8 41 82 00 20 */ beq lbl_80382368
/* 8038234C 0037F2AC 80 7F 00 10 */ lwz r3, 0x10(r31)
/* 80382350 0037F2B0 54 00 18 38 */ slwi r0, r0, 3
/* 80382354 0037F2B4 80 9F 00 3C */ lwz r4, 0x3c(r31)
/* 80382358 0037F2B8 7C 03 00 2E */ lwzx r0, r3, r0
/* 8038235C 0037F2BC 54 00 00 3C */ rlwinm r0, r0, 0, 0, 0x1e
/* 80382360 0037F2C0 7C 04 02 14 */ add r0, r4, r0
/* 80382364 0037F2C4 90 1F 00 3C */ stw r0, 0x3c(r31)
lbl_80382368:
/* 80382368 0037F2C8 3C 60 80 00 */ lis r3, 0x800030D0@ha
/* 8038236C 0037F2CC 80 63 30 D0 */ lwz r3, 0x800030D0@l(r3)
/* 80382370 0037F2D0 28 03 00 00 */ cmplwi r3, 0
/* 80382374 0037F2D4 41 82 00 10 */ beq lbl_80382384
/* 80382378 0037F2D8 80 1F 00 14 */ lwz r0, 0x14(r31)
/* 8038237C 0037F2DC 7C 00 1A 14 */ add r0, r0, r3
/* 80382380 0037F2E0 90 1F 00 14 */ stw r0, 0x14(r31)
lbl_80382384:
/* 80382384 0037F2E4 38 60 00 00 */ li r3, 0
/* 80382388 0037F2E8 38 9F 00 00 */ addi r4, r31, 0
/* 8038238C 0037F2EC 4B FF FB 49 */ bl Relocate
/* 80382390 0037F2F0 3C 60 80 00 */ lis r3, 0x800030C8@ha
/* 80382394 0037F2F4 83 C3 30 C8 */ lwz r30, 0x800030C8@l(r3)
/* 80382398 0037F2F8 48 00 00 28 */ b lbl_803823C0
lbl_8038239C:
/* 8038239C 0037F2FC 38 7F 00 00 */ addi r3, r31, 0
/* 803823A0 0037F300 38 9E 00 00 */ addi r4, r30, 0
/* 803823A4 0037F304 4B FF FB 31 */ bl Relocate
/* 803823A8 0037F308 7C 1E F8 40 */ cmplw r30, r31
/* 803823AC 0037F30C 41 82 00 10 */ beq lbl_803823BC
/* 803823B0 0037F310 38 7E 00 00 */ addi r3, r30, 0
/* 803823B4 0037F314 38 9F 00 00 */ addi r4, r31, 0
/* 803823B8 0037F318 4B FF FB 1D */ bl Relocate
lbl_803823BC:
/* 803823BC 0037F31C 83 DE 00 04 */ lwz r30, 4(r30)
lbl_803823C0:
/* 803823C0 0037F320 28 1E 00 00 */ cmplwi r30, 0
/* 803823C4 0037F324 40 82 FF D8 */ bne lbl_8038239C
/* 803823C8 0037F328 7F E3 FB 78 */ mr r3, r31
/* 803823CC 0037F32C 4B FF FB 01 */ bl OSNotifyLink
/* 803823D0 0037F330 38 60 00 01 */ li r3, 1
lbl_803823D4:
/* 803823D4 0037F334 80 01 00 1C */ lwz r0, 0x1c(r1)
/* 803823D8 0037F338 83 E1 00 14 */ lwz r31, 0x14(r1)
/* 803823DC 0037F33C 83 C1 00 10 */ lwz r30, 0x10(r1)
/* 803823E0 0037F340 38 21 00 18 */ addi r1, r1, 0x18
/* 803823E4 0037F344 7C 08 03 A6 */ mtlr r0
/* 803823E8 0037F348 4E 80 00 20 */ blr
.global Undo
Undo:
/* 803823EC 0037F34C 7C 08 02 A6 */ mflr r0
/* 803823F0 0037F350 90 01 00 04 */ stw r0, 4(r1)
/* 803823F4 0037F354 94 21 FF C8 */ stwu r1, -0x38(r1)
/* 803823F8 0037F358 BF 21 00 1C */ stmw r25, 0x1c(r1)
/* 803823FC 0037F35C 7C 9C 23 78 */ mr r28, r4
/* 80382400 0037F360 80 83 00 00 */ lwz r4, 0(r3)
/* 80382404 0037F364 80 7C 00 28 */ lwz r3, 0x28(r28)
/* 80382408 0037F368 80 1C 00 2C */ lwz r0, 0x2c(r28)
/* 8038240C 0037F36C 38 A3 00 00 */ addi r5, r3, 0
/* 80382410 0037F370 7C 63 02 14 */ add r3, r3, r0
/* 80382414 0037F374 38 03 00 07 */ addi r0, r3, 7
/* 80382418 0037F378 7C 05 00 50 */ subf r0, r5, r0
/* 8038241C 0037F37C 54 00 E8 FE */ srwi r0, r0, 3
/* 80382420 0037F380 7C 05 18 40 */ cmplw r5, r3
/* 80382424 0037F384 7C 09 03 A6 */ mtctr r0
/* 80382428 0037F388 40 80 00 18 */ bge lbl_80382440
lbl_8038242C:
/* 8038242C 0037F38C 80 05 00 00 */ lwz r0, 0(r5)
/* 80382430 0037F390 7C 00 20 40 */ cmplw r0, r4
/* 80382434 0037F394 41 82 00 14 */ beq lbl_80382448
/* 80382438 0037F398 38 A5 00 08 */ addi r5, r5, 8
/* 8038243C 0037F39C 42 00 FF F0 */ bdnz lbl_8038242C
lbl_80382440:
/* 80382440 0037F3A0 38 60 00 00 */ li r3, 0
/* 80382444 0037F3A4 48 00 01 CC */ b lbl_80382610
lbl_80382448:
/* 80382448 0037F3A8 3C 60 80 3F */ lis r3, lbl_803F22B8@ha
/* 8038244C 0037F3AC 83 E5 00 04 */ lwz r31, 4(r5)
/* 80382450 0037F3B0 3B 63 22 B8 */ addi r27, r3, lbl_803F22B8@l
/* 80382454 0037F3B4 3B C0 00 00 */ li r30, 0
/* 80382458 0037F3B8 48 00 01 80 */ b lbl_803825D8
lbl_8038245C:
/* 8038245C 0037F3BC A0 1F 00 00 */ lhz r0, 0(r31)
/* 80382460 0037F3C0 2C 04 00 06 */ cmpwi r4, 6
/* 80382464 0037F3C4 38 60 00 00 */ li r3, 0
/* 80382468 0037F3C8 7F BD 02 14 */ add r29, r29, r0
/* 8038246C 0037F3CC 41 82 00 A4 */ beq lbl_80382510
/* 80382470 0037F3D0 40 80 00 30 */ bge lbl_803824A0
/* 80382474 0037F3D4 2C 04 00 02 */ cmpwi r4, 2
/* 80382478 0037F3D8 41 82 00 64 */ beq lbl_803824DC
/* 8038247C 0037F3DC 40 80 00 14 */ bge lbl_80382490
/* 80382480 0037F3E0 2C 04 00 00 */ cmpwi r4, 0
/* 80382484 0037F3E4 41 82 01 50 */ beq lbl_803825D4
/* 80382488 0037F3E8 40 80 00 48 */ bge lbl_803824D0
/* 8038248C 0037F3EC 48 00 01 3C */ b lbl_803825C8
lbl_80382490:
/* 80382490 0037F3F0 2C 04 00 04 */ cmpwi r4, 4
/* 80382494 0037F3F4 41 82 00 64 */ beq lbl_803824F8
/* 80382498 0037F3F8 40 80 00 6C */ bge lbl_80382504
/* 8038249C 0037F3FC 48 00 00 50 */ b lbl_803824EC
lbl_803824A0:
/* 803824A0 0037F400 2C 04 00 C9 */ cmpwi r4, 0xc9
/* 803824A4 0037F404 41 82 01 30 */ beq lbl_803825D4
/* 803824A8 0037F408 40 80 00 1C */ bge lbl_803824C4
/* 803824AC 0037F40C 2C 04 00 0A */ cmpwi r4, 0xa
/* 803824B0 0037F410 41 82 00 7C */ beq lbl_8038252C
/* 803824B4 0037F414 41 80 00 68 */ blt lbl_8038251C
/* 803824B8 0037F418 2C 04 00 0E */ cmpwi r4, 0xe
/* 803824BC 0037F41C 40 80 01 0C */ bge lbl_803825C8
/* 803824C0 0037F420 48 00 00 94 */ b lbl_80382554
lbl_803824C4:
/* 803824C4 0037F424 2C 04 00 CB */ cmpwi r4, 0xcb
/* 803824C8 0037F428 40 80 01 00 */ bge lbl_803825C8
/* 803824CC 0037F42C 48 00 00 98 */ b lbl_80382564
lbl_803824D0:
/* 803824D0 0037F430 38 00 00 00 */ li r0, 0
/* 803824D4 0037F434 90 1D 00 00 */ stw r0, 0(r29)
/* 803824D8 0037F438 48 00 00 FC */ b lbl_803825D4
lbl_803824DC:
/* 803824DC 0037F43C 80 1D 00 00 */ lwz r0, 0(r29)
/* 803824E0 0037F440 54 00 07 8A */ rlwinm r0, r0, 0, 0x1e, 5
/* 803824E4 0037F444 90 1D 00 00 */ stw r0, 0(r29)
/* 803824E8 0037F448 48 00 00 EC */ b lbl_803825D4
lbl_803824EC:
/* 803824EC 0037F44C 38 00 00 00 */ li r0, 0
/* 803824F0 0037F450 B0 1D 00 00 */ sth r0, 0(r29)
/* 803824F4 0037F454 48 00 00 E0 */ b lbl_803825D4
lbl_803824F8:
/* 803824F8 0037F458 38 00 00 00 */ li r0, 0
/* 803824FC 0037F45C B0 1D 00 00 */ sth r0, 0(r29)
/* 80382500 0037F460 48 00 00 D4 */ b lbl_803825D4
lbl_80382504:
/* 80382504 0037F464 38 00 00 00 */ li r0, 0
/* 80382508 0037F468 B0 1D 00 00 */ sth r0, 0(r29)
/* 8038250C 0037F46C 48 00 00 C8 */ b lbl_803825D4
lbl_80382510:
/* 80382510 0037F470 38 00 00 00 */ li r0, 0
/* 80382514 0037F474 B0 1D 00 00 */ sth r0, 0(r29)
/* 80382518 0037F478 48 00 00 BC */ b lbl_803825D4
lbl_8038251C:
/* 8038251C 0037F47C 80 1D 00 00 */ lwz r0, 0(r29)
/* 80382520 0037F480 54 00 07 9E */ rlwinm r0, r0, 0, 0x1e, 0xf
/* 80382524 0037F484 90 1D 00 00 */ stw r0, 0(r29)
/* 80382528 0037F488 48 00 00 AC */ b lbl_803825D4
lbl_8038252C:
/* 8038252C 0037F48C 88 1C 00 32 */ lbz r0, 0x32(r28)
/* 80382530 0037F490 28 00 00 00 */ cmplwi r0, 0
/* 80382534 0037F494 41 82 00 0C */ beq lbl_80382540
/* 80382538 0037F498 80 1C 00 3C */ lwz r0, 0x3c(r28)
/* 8038253C 0037F49C 7C 7D 00 50 */ subf r3, r29, r0
lbl_80382540:
/* 80382540 0037F4A0 80 1D 00 00 */ lwz r0, 0(r29)
/* 80382544 0037F4A4 54 00 07 8A */ rlwinm r0, r0, 0, 0x1e, 5
/* 80382548 0037F4A8 50 60 01 BA */ rlwimi r0, r3, 0, 6, 0x1d
/* 8038254C 0037F4AC 90 1D 00 00 */ stw r0, 0(r29)
/* 80382550 0037F4B0 48 00 00 84 */ b lbl_803825D4
lbl_80382554:
/* 80382554 0037F4B4 80 1D 00 00 */ lwz r0, 0(r29)
/* 80382558 0037F4B8 54 00 07 9E */ rlwinm r0, r0, 0, 0x1e, 0xf
/* 8038255C 0037F4BC 90 1D 00 00 */ stw r0, 0(r29)
/* 80382560 0037F4C0 48 00 00 74 */ b lbl_803825D4
lbl_80382564:
/* 80382564 0037F4C4 88 1F 00 03 */ lbz r0, 3(r31)
/* 80382568 0037F4C8 28 1E 00 00 */ cmplwi r30, 0
/* 8038256C 0037F4CC 80 7C 00 10 */ lwz r3, 0x10(r28)
/* 80382570 0037F4D0 54 00 18 38 */ slwi r0, r0, 3
/* 80382574 0037F4D4 7C 63 02 14 */ add r3, r3, r0
/* 80382578 0037F4D8 80 03 00 00 */ lwz r0, 0(r3)
/* 8038257C 0037F4DC 3B 43 00 00 */ addi r26, r3, 0
/* 80382580 0037F4E0 54 1D 00 3C */ rlwinm r29, r0, 0, 0, 0x1e
/* 80382584 0037F4E4 41 82 00 24 */ beq lbl_803825A8
/* 80382588 0037F4E8 80 1E 00 00 */ lwz r0, 0(r30)
/* 8038258C 0037F4EC 80 9E 00 04 */ lwz r4, 4(r30)
/* 80382590 0037F4F0 54 19 00 3C */ rlwinm r25, r0, 0, 0, 0x1e
/* 80382594 0037F4F4 38 79 00 00 */ addi r3, r25, 0
/* 80382598 0037F4F8 4B FF C5 19 */ bl DCFlushRange
/* 8038259C 0037F4FC 7F 23 CB 78 */ mr r3, r25
/* 803825A0 0037F500 80 9E 00 04 */ lwz r4, 4(r30)
/* 803825A4 0037F504 4B FF C5 F1 */ bl ICInvalidateRange
lbl_803825A8:
/* 803825A8 0037F508 80 1A 00 00 */ lwz r0, 0(r26)
/* 803825AC 0037F50C 54 00 07 FF */ clrlwi. r0, r0, 0x1f
/* 803825B0 0037F510 41 82 00 0C */ beq lbl_803825BC
/* 803825B4 0037F514 7F 40 D3 78 */ mr r0, r26
/* 803825B8 0037F518 48 00 00 08 */ b lbl_803825C0
lbl_803825BC:
/* 803825BC 0037F51C 38 00 00 00 */ li r0, 0
lbl_803825C0:
/* 803825C0 0037F520 7C 1E 03 78 */ mr r30, r0
/* 803825C4 0037F524 48 00 00 10 */ b lbl_803825D4
lbl_803825C8:
/* 803825C8 0037F528 38 7B 00 00 */ addi r3, r27, 0
/* 803825CC 0037F52C 4C C6 31 82 */ crclr 6
/* 803825D0 0037F530 4B FF D3 DD */ bl OSReport
lbl_803825D4:
/* 803825D4 0037F534 3B FF 00 08 */ addi r31, r31, 8
lbl_803825D8:
/* 803825D8 0037F538 88 9F 00 02 */ lbz r4, 2(r31)
/* 803825DC 0037F53C 28 04 00 CB */ cmplwi r4, 0xcb
/* 803825E0 0037F540 40 82 FE 7C */ bne lbl_8038245C
/* 803825E4 0037F544 28 1E 00 00 */ cmplwi r30, 0
/* 803825E8 0037F548 41 82 00 24 */ beq lbl_8038260C
/* 803825EC 0037F54C 80 1E 00 00 */ lwz r0, 0(r30)
/* 803825F0 0037F550 80 9E 00 04 */ lwz r4, 4(r30)
/* 803825F4 0037F554 54 1B 00 3C */ rlwinm r27, r0, 0, 0, 0x1e
/* 803825F8 0037F558 38 7B 00 00 */ addi r3, r27, 0
/* 803825FC 0037F55C 4B FF C4 B5 */ bl DCFlushRange
/* 80382600 0037F560 7F 63 DB 78 */ mr r3, r27
/* 80382604 0037F564 80 9E 00 04 */ lwz r4, 4(r30)
/* 80382608 0037F568 4B FF C5 8D */ bl ICInvalidateRange
lbl_8038260C:
/* 8038260C 0037F56C 38 60 00 01 */ li r3, 1
lbl_80382610:
/* 80382610 0037F570 BB 21 00 1C */ lmw r25, 0x1c(r1)
/* 80382614 0037F574 80 01 00 3C */ lwz r0, 0x3c(r1)
/* 80382618 0037F578 38 21 00 38 */ addi r1, r1, 0x38
/* 8038261C 0037F57C 7C 08 03 A6 */ mtlr r0
/* 80382620 0037F580 4E 80 00 20 */ blr
.global OSUnlink
OSUnlink:
/* 80382624 0037F584 7C 08 02 A6 */ mflr r0
/* 80382628 0037F588 90 01 00 04 */ stw r0, 4(r1)
/* 8038262C 0037F58C 94 21 FF E8 */ stwu r1, -0x18(r1)
/* 80382630 0037F590 93 E1 00 14 */ stw r31, 0x14(r1)
/* 80382634 0037F594 7C 7F 1B 78 */ mr r31, r3
/* 80382638 0037F598 93 C1 00 10 */ stw r30, 0x10(r1)
/* 8038263C 0037F59C 80 83 00 04 */ lwz r4, 4(r3)
/* 80382640 0037F5A0 80 A3 00 08 */ lwz r5, 8(r3)
/* 80382644 0037F5A4 28 04 00 00 */ cmplwi r4, 0
/* 80382648 0037F5A8 40 82 00 10 */ bne lbl_80382658
/* 8038264C 0037F5AC 3C 60 80 00 */ lis r3, 0x800030CC@ha
/* 80382650 0037F5B0 90 A3 30 CC */ stw r5, 0x800030CC@l(r3)
/* 80382654 0037F5B4 48 00 00 08 */ b lbl_8038265C
lbl_80382658:
/* 80382658 0037F5B8 90 A4 00 08 */ stw r5, 8(r4)
lbl_8038265C:
/* 8038265C 0037F5BC 28 05 00 00 */ cmplwi r5, 0
/* 80382660 0037F5C0 40 82 00 10 */ bne lbl_80382670
/* 80382664 0037F5C4 3C 60 80 00 */ lis r3, 0x800030C8@ha
/* 80382668 0037F5C8 90 83 30 C8 */ stw r4, 0x800030C8@l(r3)
/* 8038266C 0037F5CC 48 00 00 08 */ b lbl_80382674
lbl_80382670:
/* 80382670 0037F5D0 90 85 00 04 */ stw r4, 4(r5)
lbl_80382674:
/* 80382674 0037F5D4 3C 60 80 00 */ lis r3, 0x800030C8@ha
/* 80382678 0037F5D8 83 C3 30 C8 */ lwz r30, 0x800030C8@l(r3)
/* 8038267C 0037F5DC 48 00 00 14 */ b lbl_80382690
lbl_80382680:
/* 80382680 0037F5E0 38 7F 00 00 */ addi r3, r31, 0
/* 80382684 0037F5E4 38 9E 00 00 */ addi r4, r30, 0
/* 80382688 0037F5E8 4B FF FD 65 */ bl Undo
/* 8038268C 0037F5EC 83 DE 00 04 */ lwz r30, 4(r30)
lbl_80382690:
/* 80382690 0037F5F0 28 1E 00 00 */ cmplwi r30, 0
/* 80382694 0037F5F4 40 82 FF EC */ bne lbl_80382680
/* 80382698 0037F5F8 7F E3 FB 78 */ mr r3, r31
/* 8038269C 0037F5FC 4B FF F8 35 */ bl OSNotifyUnlink
/* 803826A0 0037F600 3C 60 80 00 */ lis r3, 0x800030D0@ha
/* 803826A4 0037F604 80 63 30 D0 */ lwz r3, 0x800030D0@l(r3)
/* 803826A8 0037F608 28 03 00 00 */ cmplwi r3, 0
/* 803826AC 0037F60C 41 82 00 10 */ beq lbl_803826BC
/* 803826B0 0037F610 80 1F 00 14 */ lwz r0, 0x14(r31)
/* 803826B4 0037F614 7C 03 00 50 */ subf r0, r3, r0
/* 803826B8 0037F618 90 1F 00 14 */ stw r0, 0x14(r31)
lbl_803826BC:
/* 803826BC 0037F61C 88 1F 00 30 */ lbz r0, 0x30(r31)
/* 803826C0 0037F620 28 00 00 00 */ cmplwi r0, 0
/* 803826C4 0037F624 41 82 00 20 */ beq lbl_803826E4
/* 803826C8 0037F628 80 9F 00 10 */ lwz r4, 0x10(r31)
/* 803826CC 0037F62C 54 03 18 38 */ slwi r3, r0, 3
/* 803826D0 0037F630 80 1F 00 34 */ lwz r0, 0x34(r31)
/* 803826D4 0037F634 7C 64 18 2E */ lwzx r3, r4, r3
/* 803826D8 0037F638 54 63 00 3C */ rlwinm r3, r3, 0, 0, 0x1e
/* 803826DC 0037F63C 7C 03 00 50 */ subf r0, r3, r0
/* 803826E0 0037F640 90 1F 00 34 */ stw r0, 0x34(r31)
lbl_803826E4:
/* 803826E4 0037F644 88 1F 00 31 */ lbz r0, 0x31(r31)
/* 803826E8 0037F648 28 00 00 00 */ cmplwi r0, 0
/* 803826EC 0037F64C 41 82 00 20 */ beq lbl_8038270C
/* 803826F0 0037F650 80 9F 00 10 */ lwz r4, 0x10(r31)
/* 803826F4 0037F654 54 03 18 38 */ slwi r3, r0, 3
/* 803826F8 0037F658 80 1F 00 38 */ lwz r0, 0x38(r31)
/* 803826FC 0037F65C 7C 64 18 2E */ lwzx r3, r4, r3
/* 80382700 0037F660 54 63 00 3C */ rlwinm r3, r3, 0, 0, 0x1e
/* 80382704 0037F664 7C 03 00 50 */ subf r0, r3, r0
/* 80382708 0037F668 90 1F 00 38 */ stw r0, 0x38(r31)
lbl_8038270C:
/* 8038270C 0037F66C 88 1F 00 32 */ lbz r0, 0x32(r31)
/* 80382710 0037F670 28 00 00 00 */ cmplwi r0, 0
/* 80382714 0037F674 41 82 00 20 */ beq lbl_80382734
/* 80382718 0037F678 80 9F 00 10 */ lwz r4, 0x10(r31)
/* 8038271C 0037F67C 54 03 18 38 */ slwi r3, r0, 3
/* 80382720 0037F680 80 1F 00 3C */ lwz r0, 0x3c(r31)
/* 80382724 0037F684 7C 64 18 2E */ lwzx r3, r4, r3
/* 80382728 0037F688 54 63 00 3C */ rlwinm r3, r3, 0, 0, 0x1e
/* 8038272C 0037F68C 7C 03 00 50 */ subf r0, r3, r0
/* 80382730 0037F690 90 1F 00 3C */ stw r0, 0x3c(r31)
lbl_80382734:
/* 80382734 0037F694 80 9F 00 28 */ lwz r4, 0x28(r31)
/* 80382738 0037F698 48 00 00 14 */ b lbl_8038274C
lbl_8038273C:
/* 8038273C 0037F69C 80 04 00 04 */ lwz r0, 4(r4)
/* 80382740 0037F6A0 7C 1F 00 50 */ subf r0, r31, r0
/* 80382744 0037F6A4 90 04 00 04 */ stw r0, 4(r4)
/* 80382748 0037F6A8 38 84 00 08 */ addi r4, r4, 8
lbl_8038274C:
/* 8038274C 0037F6AC 80 7F 00 28 */ lwz r3, 0x28(r31)
/* 80382750 0037F6B0 80 1F 00 2C */ lwz r0, 0x2c(r31)
/* 80382754 0037F6B4 7C 03 02 14 */ add r0, r3, r0
/* 80382758 0037F6B8 7C 04 00 40 */ cmplw r4, r0
/* 8038275C 0037F6BC 41 80 FF E0 */ blt lbl_8038273C
/* 80382760 0037F6C0 38 C0 00 01 */ li r6, 1
/* 80382764 0037F6C4 38 A0 00 08 */ li r5, 8
/* 80382768 0037F6C8 38 60 00 00 */ li r3, 0
/* 8038276C 0037F6CC 48 00 00 40 */ b lbl_803827AC
lbl_80382770:
/* 80382770 0037F6D0 88 1F 00 33 */ lbz r0, 0x33(r31)
/* 80382774 0037F6D4 80 9F 00 10 */ lwz r4, 0x10(r31)
/* 80382778 0037F6D8 7C 06 00 40 */ cmplw r6, r0
/* 8038277C 0037F6DC 7C 84 2A 14 */ add r4, r4, r5
/* 80382780 0037F6E0 40 82 00 10 */ bne lbl_80382790
/* 80382784 0037F6E4 98 7F 00 33 */ stb r3, 0x33(r31)
/* 80382788 0037F6E8 90 64 00 00 */ stw r3, 0(r4)
/* 8038278C 0037F6EC 48 00 00 18 */ b lbl_803827A4
lbl_80382790:
/* 80382790 0037F6F0 80 04 00 00 */ lwz r0, 0(r4)
/* 80382794 0037F6F4 28 00 00 00 */ cmplwi r0, 0
/* 80382798 0037F6F8 41 82 00 0C */ beq lbl_803827A4
/* 8038279C 0037F6FC 7C 1F 00 50 */ subf r0, r31, r0
/* 803827A0 0037F700 90 04 00 00 */ stw r0, 0(r4)
lbl_803827A4:
/* 803827A4 0037F704 38 A5 00 08 */ addi r5, r5, 8
/* 803827A8 0037F708 38 C6 00 01 */ addi r6, r6, 1
lbl_803827AC:
/* 803827AC 0037F70C 80 1F 00 0C */ lwz r0, 0xc(r31)
/* 803827B0 0037F710 7C 06 00 40 */ cmplw r6, r0
/* 803827B4 0037F714 41 80 FF BC */ blt lbl_80382770
/* 803827B8 0037F718 80 1F 00 24 */ lwz r0, 0x24(r31)
/* 803827BC 0037F71C 38 60 00 01 */ li r3, 1
/* 803827C0 0037F720 7C 1F 00 50 */ subf r0, r31, r0
/* 803827C4 0037F724 90 1F 00 24 */ stw r0, 0x24(r31)
/* 803827C8 0037F728 80 1F 00 28 */ lwz r0, 0x28(r31)
/* 803827CC 0037F72C 7C 1F 00 50 */ subf r0, r31, r0
/* 803827D0 0037F730 90 1F 00 28 */ stw r0, 0x28(r31)
/* 803827D4 0037F734 80 1F 00 10 */ lwz r0, 0x10(r31)
/* 803827D8 0037F738 7C 1F 00 50 */ subf r0, r31, r0
/* 803827DC 0037F73C 90 1F 00 10 */ stw r0, 0x10(r31)
/* 803827E0 0037F740 80 01 00 1C */ lwz r0, 0x1c(r1)
/* 803827E4 0037F744 83 E1 00 14 */ lwz r31, 0x14(r1)
/* 803827E8 0037F748 83 C1 00 10 */ lwz r30, 0x10(r1)
/* 803827EC 0037F74C 38 21 00 18 */ addi r1, r1, 0x18
/* 803827F0 0037F750 7C 08 03 A6 */ mtlr r0
/* 803827F4 0037F754 4E 80 00 20 */ blr
.global __OSModuleInit
__OSModuleInit:
/* 803827F8 0037F758 3C 80 80 00 */ lis r4, 0x800030CC@ha
/* 803827FC 0037F75C 38 00 00 00 */ li r0, 0
/* 80382800 0037F760 90 04 30 CC */ stw r0, 0x800030CC@l(r4)
/* 80382804 0037F764 90 04 30 C8 */ stw r0, 0x30c8(r4)
/* 80382808 0037F768 90 04 30 D0 */ stw r0, 0x30d0(r4)
/* 8038280C 0037F76C 4E 80 00 20 */ blr