From cfb3a0c93d12d82105e413be5c73f5e2c2a7c7c4 Mon Sep 17 00:00:00 2001 From: Phillip Stephens Date: Sat, 2 Apr 2022 14:03:04 -0700 Subject: [PATCH] Split SDK objects Former-commit-id: 84076de482545766d1b6bbf40e7577112046951b --- Makefile | 4 +- asm/Dolphin/AR/ar.s | 1841 +++++++++ asm/Dolphin/AR/arq.s | 281 ++ asm/Dolphin/DSP/dsp.s | 166 + asm/Dolphin/DSP/dsp_debug.s | 27 + asm/Dolphin/DSP/dsp_task.s | 634 ++++ asm/Dolphin/DVD/dvd.s | 3310 +++++++++++++++++ asm/Dolphin/DVD/dvderror.s | 126 + asm/Dolphin/DVD/dvdfatal.s | 95 + asm/Dolphin/DVD/dvdfs.s | 677 ++++ asm/Dolphin/DVD/dvdidutils.s | 74 + asm/Dolphin/DVD/dvdlow.s | 1018 +++++ asm/Dolphin/DVD/dvdqueue.s | 153 + asm/Dolphin/DVD/fstload.s | 160 + asm/Dolphin/{ => EXI}/EXIBios.s | 0 asm/Dolphin/{ => EXI}/EXIUart.s | 0 asm/Dolphin/{ => GBA}/GBA.s | 0 asm/Dolphin/{ => GBA}/GBARead.s | 0 asm/Dolphin/{ => GBA}/GBAWrite.s | 0 asm/Dolphin/{ => GBA}/GBAXfer.s | 0 asm/Dolphin/GX/GXAttr.s | 1441 +++++++ asm/Dolphin/GX/GXBump.s | 433 +++ asm/Dolphin/GX/GXDisplayList.s | 36 + asm/Dolphin/GX/GXFifo.s | 813 ++++ asm/Dolphin/GX/GXFrameBuf.s | 769 ++++ asm/Dolphin/GX/GXGeometry.s | 287 ++ asm/Dolphin/GX/GXInit.s | 1203 ++++++ asm/Dolphin/GX/GXLight.s | 398 ++ asm/Dolphin/GX/GXMisc.s | 432 +++ asm/Dolphin/GX/GXPerf.s | 555 +++ asm/Dolphin/GX/GXPixel.s | 425 +++ asm/Dolphin/GX/GXStubs.s | 7 + asm/Dolphin/GX/GXTev.s | 584 +++ asm/Dolphin/GX/GXTexture.s | 1295 +++++++ asm/Dolphin/GX/GXTransform.s | 412 ++ asm/Dolphin/OS/OS.s | 692 ++++ asm/Dolphin/OS/OSAlarm.s | 517 +++ asm/Dolphin/OS/OSArena.s | 39 + asm/Dolphin/OS/OSAudioSystem.s | 193 + asm/Dolphin/OS/OSCache.s | 579 +++ asm/Dolphin/OS/OSContext.s | 579 +++ asm/Dolphin/OS/OSError.s | 465 +++ asm/Dolphin/OS/OSFatal.s | 821 ++++ asm/Dolphin/OS/OSFont.s | 736 ++++ asm/Dolphin/OS/OSInterrupt.s | 662 ++++ asm/Dolphin/OS/OSLink.s | 709 ++++ asm/Dolphin/OS/OSMemory.s | 416 +++ asm/Dolphin/OS/OSMutex.s | 38 + asm/Dolphin/OS/OSReboot.s | 162 + asm/Dolphin/OS/OSReset.s | 357 ++ asm/Dolphin/OS/OSResetSW.s | 252 ++ asm/Dolphin/OS/OSRtc.s | 851 +++++ asm/Dolphin/OS/OSSync.s | 44 + asm/Dolphin/OS/OSThread.s | 1157 ++++++ asm/Dolphin/OS/OSTime.s | 322 ++ asm/Dolphin/PAD/PadClamp.s | 172 + asm/Dolphin/PAD/pad.s | 1942 ++++++++++ asm/Dolphin/PPCArch.s | 120 + asm/Dolphin/{ => SI}/SIBios.s | 0 asm/Dolphin/{ => SI}/SISamplingRate.s | 0 asm/Dolphin/{ => THP}/THPAudio.s | 0 asm/Dolphin/{ => THP}/THPDec.s | 0 asm/Dolphin/ai.s | 696 ++++ asm/Dolphin/db.s | 78 + asm/Dolphin/dtk.s | 2 +- asm/Dolphin/mtx/mtx.s | 298 ++ asm/Dolphin/mtx/mtx44.s | 86 + asm/Dolphin/mtx/mtx44vec.s | 51 + asm/Dolphin/mtx/psmtx.s | 25 + asm/Dolphin/mtx/vec.s | 42 + asm/Dolphin/vi.s | 2201 +++++++++++ asm/Kyoto_CWD/main.s | 6 +- asm/Runtime/PPCEABI/H/CPlusLibPPC.s | 19 + asm/Runtime/PPCEABI/H/FILE_POS.s | 212 ++ asm/Runtime/PPCEABI/H/Gecko_ExceptionPPC.s | 36 + asm/Runtime/PPCEABI/H/NMWException.s | 162 + asm/Runtime/PPCEABI/H/__init_cpp_exceptions.s | 45 + asm/Runtime/PPCEABI/H/__va_arg.s | 62 + asm/Runtime/PPCEABI/H/abort_exit.s | 63 + asm/Runtime/PPCEABI/H/alloc.s | 1030 +++++ asm/Runtime/PPCEABI/H/ansi_files.s | 82 + asm/Runtime/PPCEABI/H/ansi_fp.s | 2081 +++++++++++ asm/Runtime/PPCEABI/H/arith.s | 12 + asm/Runtime/PPCEABI/H/buffer_io.s | 75 + asm/Runtime/PPCEABI/H/ctype.s | 16 + asm/Runtime/PPCEABI/H/direct_io.s | 234 ++ asm/Runtime/PPCEABI/H/file_io.s | 152 + .../PPCEABI/H/global_destructor_chain.s | 35 + asm/Runtime/PPCEABI/H/mbstring.s | 106 + asm/Runtime/PPCEABI/H/ptmf.s | 32 + asm/Runtime/PPCEABI/H/runtime.s | 687 ++++ asm/Runtime/PPCEABI/H/strtold.s | 2 +- asm/Runtime/PPCEABI/H/uart_console_io.s | 4 - asm/Runtime/PPCEABI/H/widechar_io.s | 65 - asm/musyx/hw_dolphin.s | 4 +- asm/os/__ppc_eabi_init_text.s | 53 + asm/text.s.REMOVED.git-id | 2 +- ldscript.lcf | 5 +- obj_files.mk | 123 +- 99 files changed, 38276 insertions(+), 89 deletions(-) create mode 100644 asm/Dolphin/AR/ar.s create mode 100644 asm/Dolphin/AR/arq.s create mode 100644 asm/Dolphin/DSP/dsp.s create mode 100644 asm/Dolphin/DSP/dsp_debug.s create mode 100644 asm/Dolphin/DSP/dsp_task.s create mode 100644 asm/Dolphin/DVD/dvd.s create mode 100644 asm/Dolphin/DVD/dvderror.s create mode 100644 asm/Dolphin/DVD/dvdfatal.s create mode 100644 asm/Dolphin/DVD/dvdfs.s create mode 100644 asm/Dolphin/DVD/dvdidutils.s create mode 100644 asm/Dolphin/DVD/dvdlow.s create mode 100644 asm/Dolphin/DVD/dvdqueue.s create mode 100644 asm/Dolphin/DVD/fstload.s rename asm/Dolphin/{ => EXI}/EXIBios.s (100%) rename asm/Dolphin/{ => EXI}/EXIUart.s (100%) rename asm/Dolphin/{ => GBA}/GBA.s (100%) rename asm/Dolphin/{ => GBA}/GBARead.s (100%) rename asm/Dolphin/{ => GBA}/GBAWrite.s (100%) rename asm/Dolphin/{ => GBA}/GBAXfer.s (100%) create mode 100644 asm/Dolphin/GX/GXAttr.s create mode 100644 asm/Dolphin/GX/GXBump.s create mode 100644 asm/Dolphin/GX/GXDisplayList.s create mode 100644 asm/Dolphin/GX/GXFifo.s create mode 100644 asm/Dolphin/GX/GXFrameBuf.s create mode 100644 asm/Dolphin/GX/GXGeometry.s create mode 100644 asm/Dolphin/GX/GXInit.s create mode 100644 asm/Dolphin/GX/GXLight.s create mode 100644 asm/Dolphin/GX/GXMisc.s create mode 100644 asm/Dolphin/GX/GXPerf.s create mode 100644 asm/Dolphin/GX/GXPixel.s create mode 100644 asm/Dolphin/GX/GXStubs.s create mode 100644 asm/Dolphin/GX/GXTev.s create mode 100644 asm/Dolphin/GX/GXTexture.s create mode 100644 asm/Dolphin/GX/GXTransform.s create mode 100644 asm/Dolphin/OS/OS.s create mode 100644 asm/Dolphin/OS/OSAlarm.s create mode 100644 asm/Dolphin/OS/OSArena.s create mode 100644 asm/Dolphin/OS/OSAudioSystem.s create mode 100644 asm/Dolphin/OS/OSCache.s create mode 100644 asm/Dolphin/OS/OSContext.s create mode 100644 asm/Dolphin/OS/OSError.s create mode 100644 asm/Dolphin/OS/OSFatal.s create mode 100644 asm/Dolphin/OS/OSFont.s create mode 100644 asm/Dolphin/OS/OSInterrupt.s create mode 100644 asm/Dolphin/OS/OSLink.s create mode 100644 asm/Dolphin/OS/OSMemory.s create mode 100644 asm/Dolphin/OS/OSMutex.s create mode 100644 asm/Dolphin/OS/OSReboot.s create mode 100644 asm/Dolphin/OS/OSReset.s create mode 100644 asm/Dolphin/OS/OSResetSW.s create mode 100644 asm/Dolphin/OS/OSRtc.s create mode 100644 asm/Dolphin/OS/OSSync.s create mode 100644 asm/Dolphin/OS/OSThread.s create mode 100644 asm/Dolphin/OS/OSTime.s create mode 100644 asm/Dolphin/PAD/PadClamp.s create mode 100644 asm/Dolphin/PAD/pad.s create mode 100644 asm/Dolphin/PPCArch.s rename asm/Dolphin/{ => SI}/SIBios.s (100%) rename asm/Dolphin/{ => SI}/SISamplingRate.s (100%) rename asm/Dolphin/{ => THP}/THPAudio.s (100%) rename asm/Dolphin/{ => THP}/THPDec.s (100%) create mode 100644 asm/Dolphin/ai.s create mode 100644 asm/Dolphin/db.s create mode 100644 asm/Dolphin/mtx/mtx.s create mode 100644 asm/Dolphin/mtx/mtx44.s create mode 100644 asm/Dolphin/mtx/mtx44vec.s create mode 100644 asm/Dolphin/mtx/psmtx.s create mode 100644 asm/Dolphin/mtx/vec.s create mode 100644 asm/Dolphin/vi.s create mode 100644 asm/Runtime/PPCEABI/H/CPlusLibPPC.s create mode 100644 asm/Runtime/PPCEABI/H/FILE_POS.s create mode 100644 asm/Runtime/PPCEABI/H/Gecko_ExceptionPPC.s create mode 100644 asm/Runtime/PPCEABI/H/NMWException.s create mode 100644 asm/Runtime/PPCEABI/H/__init_cpp_exceptions.s create mode 100644 asm/Runtime/PPCEABI/H/__va_arg.s create mode 100644 asm/Runtime/PPCEABI/H/abort_exit.s create mode 100644 asm/Runtime/PPCEABI/H/alloc.s create mode 100644 asm/Runtime/PPCEABI/H/ansi_files.s create mode 100644 asm/Runtime/PPCEABI/H/ansi_fp.s create mode 100644 asm/Runtime/PPCEABI/H/arith.s create mode 100644 asm/Runtime/PPCEABI/H/buffer_io.s create mode 100644 asm/Runtime/PPCEABI/H/ctype.s create mode 100644 asm/Runtime/PPCEABI/H/direct_io.s create mode 100644 asm/Runtime/PPCEABI/H/file_io.s create mode 100644 asm/Runtime/PPCEABI/H/global_destructor_chain.s create mode 100644 asm/Runtime/PPCEABI/H/mbstring.s create mode 100644 asm/Runtime/PPCEABI/H/ptmf.s create mode 100644 asm/Runtime/PPCEABI/H/runtime.s create mode 100644 asm/os/__ppc_eabi_init_text.s diff --git a/Makefile b/Makefile index 543db5f0..d8907949 100644 --- a/Makefile +++ b/Makefile @@ -55,7 +55,9 @@ endif O_FILES := $(INIT_O_FILES) $(EXTAB_O_FILES) $(EXTABINDEX_O_FILES) $(KYOTO_CWD) \ $(CTORS_O_FILES) $(DTORS_O_FILES) $(RODATA_O_FILES) $(DATA_O_FILES) \ $(BSS_O_FILES) $(SDATA_O_FILES) $(SBSS_O_FILES) $(SDATA2_O_FILES) \ - $(SBSS2_O_FILES) $(TEXT_O_FILES) $(MSL_PPCEABI_BARE_H) $(MUSYX_FILES) \ + $(SBSS2_O_FILES) $(TEXT_O_FILES) $(AI_FILES) $(AR_FILES) $(BASE_FILES) \ + $(DB_FILES) $(DSP_FILES) $(DVD_FILES) $(GX_FILES) $(MTX_FILES) $(OS_FILES) \ + $(PAD_FILES) $(VI_FILES) $(MSL_PPCEABI_BARE_H) $(MUSYX_FILES) \ $(DTK_FILES) $(CARD_FILES) $(SI_FILES) $(EXI_FILES) $(THP_FILES) \ $(GBA_FILES) diff --git a/asm/Dolphin/AR/ar.s b/asm/Dolphin/AR/ar.s new file mode 100644 index 00000000..7c2b9bf5 --- /dev/null +++ b/asm/Dolphin/AR/ar.s @@ -0,0 +1,1841 @@ +.include "macros.inc" + +.section .text, "ax" + +.global ARRegisterDMACallback +ARRegisterDMACallback: +/* 8036D8A4 0036A804 7C 08 02 A6 */ mflr r0 +/* 8036D8A8 0036A808 90 01 00 04 */ stw r0, 4(r1) +/* 8036D8AC 0036A80C 94 21 FF E8 */ stwu r1, -0x18(r1) +/* 8036D8B0 0036A810 93 E1 00 14 */ stw r31, 0x14(r1) +/* 8036D8B4 0036A814 93 C1 00 10 */ stw r30, 0x10(r1) +/* 8036D8B8 0036A818 7C 7E 1B 78 */ mr r30, r3 +/* 8036D8BC 0036A81C 83 ED AB 38 */ lwz r31, lbl_805A96F8@sda21(r13) +/* 8036D8C0 0036A820 48 01 3D A1 */ bl OSDisableInterrupts +/* 8036D8C4 0036A824 93 CD AB 38 */ stw r30, lbl_805A96F8@sda21(r13) +/* 8036D8C8 0036A828 48 01 3D C1 */ bl OSRestoreInterrupts +/* 8036D8CC 0036A82C 7F E3 FB 78 */ mr r3, r31 +/* 8036D8D0 0036A830 80 01 00 1C */ lwz r0, 0x1c(r1) +/* 8036D8D4 0036A834 83 E1 00 14 */ lwz r31, 0x14(r1) +/* 8036D8D8 0036A838 83 C1 00 10 */ lwz r30, 0x10(r1) +/* 8036D8DC 0036A83C 38 21 00 18 */ addi r1, r1, 0x18 +/* 8036D8E0 0036A840 7C 08 03 A6 */ mtlr r0 +/* 8036D8E4 0036A844 4E 80 00 20 */ blr + +.global ARGetDMAStatus +ARGetDMAStatus: +/* 8036D8E8 0036A848 7C 08 02 A6 */ mflr r0 +/* 8036D8EC 0036A84C 90 01 00 04 */ stw r0, 4(r1) +/* 8036D8F0 0036A850 94 21 FF F0 */ stwu r1, -0x10(r1) +/* 8036D8F4 0036A854 93 E1 00 0C */ stw r31, 0xc(r1) +/* 8036D8F8 0036A858 48 01 3D 69 */ bl OSDisableInterrupts +/* 8036D8FC 0036A85C 3C 80 CC 00 */ lis r4, 0xCC00500A@ha +/* 8036D900 0036A860 A0 04 50 0A */ lhz r0, 0xCC00500A@l(r4) +/* 8036D904 0036A864 54 1F 05 AC */ rlwinm r31, r0, 0, 0x16, 0x16 +/* 8036D908 0036A868 48 01 3D 81 */ bl OSRestoreInterrupts +/* 8036D90C 0036A86C 7F E3 FB 78 */ mr r3, r31 +/* 8036D910 0036A870 80 01 00 14 */ lwz r0, 0x14(r1) +/* 8036D914 0036A874 83 E1 00 0C */ lwz r31, 0xc(r1) +/* 8036D918 0036A878 38 21 00 10 */ addi r1, r1, 0x10 +/* 8036D91C 0036A87C 7C 08 03 A6 */ mtlr r0 +/* 8036D920 0036A880 4E 80 00 20 */ blr + +.global ARStartDMA +ARStartDMA: +/* 8036D924 0036A884 7C 08 02 A6 */ mflr r0 +/* 8036D928 0036A888 90 01 00 04 */ stw r0, 4(r1) +/* 8036D92C 0036A88C 94 21 FF D8 */ stwu r1, -0x28(r1) +/* 8036D930 0036A890 93 E1 00 24 */ stw r31, 0x24(r1) +/* 8036D934 0036A894 3B E6 00 00 */ addi r31, r6, 0 +/* 8036D938 0036A898 93 C1 00 20 */ stw r30, 0x20(r1) +/* 8036D93C 0036A89C 3B C5 00 00 */ addi r30, r5, 0 +/* 8036D940 0036A8A0 93 A1 00 1C */ stw r29, 0x1c(r1) +/* 8036D944 0036A8A4 3B A3 00 00 */ addi r29, r3, 0 +/* 8036D948 0036A8A8 93 81 00 18 */ stw r28, 0x18(r1) +/* 8036D94C 0036A8AC 3B 84 00 00 */ addi r28, r4, 0 +/* 8036D950 0036A8B0 48 01 3D 11 */ bl OSDisableInterrupts +/* 8036D954 0036A8B4 3C C0 CC 00 */ lis r6, 0xCC005020@ha +/* 8036D958 0036A8B8 A0 06 50 20 */ lhz r0, 0xCC005020@l(r6) +/* 8036D95C 0036A8BC 39 06 50 00 */ addi r8, r6, 0x5000 +/* 8036D960 0036A8C0 39 26 50 00 */ addi r9, r6, 0x5000 +/* 8036D964 0036A8C4 54 04 00 2A */ rlwinm r4, r0, 0, 0, 0x15 +/* 8036D968 0036A8C8 57 80 84 3E */ srwi r0, r28, 0x10 +/* 8036D96C 0036A8CC 7C 80 03 78 */ or r0, r4, r0 +/* 8036D970 0036A8D0 B0 06 50 20 */ sth r0, 0x5020(r6) +/* 8036D974 0036A8D4 57 80 04 3E */ clrlwi r0, r28, 0x10 +/* 8036D978 0036A8D8 38 86 50 00 */ addi r4, r6, 0x5000 +/* 8036D97C 0036A8DC A0 A6 50 22 */ lhz r5, 0x5022(r6) +/* 8036D980 0036A8E0 54 A5 06 DE */ rlwinm r5, r5, 0, 0x1b, 0xf +/* 8036D984 0036A8E4 7C A0 03 78 */ or r0, r5, r0 +/* 8036D988 0036A8E8 B0 06 50 22 */ sth r0, 0x5022(r6) +/* 8036D98C 0036A8EC 38 A6 50 00 */ addi r5, r6, 0x5000 +/* 8036D990 0036A8F0 57 C0 84 3E */ srwi r0, r30, 0x10 +/* 8036D994 0036A8F4 A0 C6 50 24 */ lhz r6, 0x5024(r6) +/* 8036D998 0036A8F8 54 C6 00 2A */ rlwinm r6, r6, 0, 0, 0x15 +/* 8036D99C 0036A8FC 7C C0 03 78 */ or r0, r6, r0 +/* 8036D9A0 0036A900 B0 08 00 24 */ sth r0, 0x24(r8) +/* 8036D9A4 0036A904 57 C0 04 3E */ clrlwi r0, r30, 0x10 +/* 8036D9A8 0036A908 A0 C9 00 26 */ lhz r6, 0x26(r9) +/* 8036D9AC 0036A90C 54 C6 06 DE */ rlwinm r6, r6, 0, 0x1b, 0xf +/* 8036D9B0 0036A910 7C C0 03 78 */ or r0, r6, r0 +/* 8036D9B4 0036A914 B0 09 00 26 */ sth r0, 0x26(r9) +/* 8036D9B8 0036A918 57 E6 84 3E */ srwi r6, r31, 0x10 +/* 8036D9BC 0036A91C 57 E0 04 3E */ clrlwi r0, r31, 0x10 +/* 8036D9C0 0036A920 A0 E4 00 28 */ lhz r7, 0x28(r4) +/* 8036D9C4 0036A924 54 E7 04 5E */ rlwinm r7, r7, 0, 0x11, 0xf +/* 8036D9C8 0036A928 53 A7 78 20 */ rlwimi r7, r29, 0xf, 0, 0x10 +/* 8036D9CC 0036A92C B0 E4 00 28 */ sth r7, 0x28(r4) +/* 8036D9D0 0036A930 A0 E4 00 28 */ lhz r7, 0x28(r4) +/* 8036D9D4 0036A934 54 E7 00 2A */ rlwinm r7, r7, 0, 0, 0x15 +/* 8036D9D8 0036A938 7C E6 33 78 */ or r6, r7, r6 +/* 8036D9DC 0036A93C B0 C4 00 28 */ sth r6, 0x28(r4) +/* 8036D9E0 0036A940 A0 85 00 2A */ lhz r4, 0x2a(r5) +/* 8036D9E4 0036A944 54 84 06 DE */ rlwinm r4, r4, 0, 0x1b, 0xf +/* 8036D9E8 0036A948 7C 80 03 78 */ or r0, r4, r0 +/* 8036D9EC 0036A94C B0 05 00 2A */ sth r0, 0x2a(r5) +/* 8036D9F0 0036A950 48 01 3C 99 */ bl OSRestoreInterrupts +/* 8036D9F4 0036A954 80 01 00 2C */ lwz r0, 0x2c(r1) +/* 8036D9F8 0036A958 83 E1 00 24 */ lwz r31, 0x24(r1) +/* 8036D9FC 0036A95C 83 C1 00 20 */ lwz r30, 0x20(r1) +/* 8036DA00 0036A960 83 A1 00 1C */ lwz r29, 0x1c(r1) +/* 8036DA04 0036A964 83 81 00 18 */ lwz r28, 0x18(r1) +/* 8036DA08 0036A968 38 21 00 28 */ addi r1, r1, 0x28 +/* 8036DA0C 0036A96C 7C 08 03 A6 */ mtlr r0 +/* 8036DA10 0036A970 4E 80 00 20 */ blr + +.global ARAlloc +ARAlloc: +/* 8036DA14 0036A974 7C 08 02 A6 */ mflr r0 +/* 8036DA18 0036A978 90 01 00 04 */ stw r0, 4(r1) +/* 8036DA1C 0036A97C 94 21 FF E8 */ stwu r1, -0x18(r1) +/* 8036DA20 0036A980 93 E1 00 14 */ stw r31, 0x14(r1) +/* 8036DA24 0036A984 93 C1 00 10 */ stw r30, 0x10(r1) +/* 8036DA28 0036A988 7C 7E 1B 78 */ mr r30, r3 +/* 8036DA2C 0036A98C 48 01 3C 35 */ bl OSDisableInterrupts +/* 8036DA30 0036A990 83 ED AB 48 */ lwz r31, lbl_805A9708@sda21(r13) +/* 8036DA34 0036A994 80 8D AB 50 */ lwz r4, lbl_805A9710@sda21(r13) +/* 8036DA38 0036A998 7C 1F F2 14 */ add r0, r31, r30 +/* 8036DA3C 0036A99C 90 0D AB 48 */ stw r0, lbl_805A9708@sda21(r13) +/* 8036DA40 0036A9A0 93 C4 00 00 */ stw r30, 0(r4) +/* 8036DA44 0036A9A4 80 AD AB 50 */ lwz r5, lbl_805A9710@sda21(r13) +/* 8036DA48 0036A9A8 80 8D AB 4C */ lwz r4, lbl_805A970C@sda21(r13) +/* 8036DA4C 0036A9AC 38 A5 00 04 */ addi r5, r5, 4 +/* 8036DA50 0036A9B0 38 04 FF FF */ addi r0, r4, -1 +/* 8036DA54 0036A9B4 90 AD AB 50 */ stw r5, lbl_805A9710@sda21(r13) +/* 8036DA58 0036A9B8 90 0D AB 4C */ stw r0, lbl_805A970C@sda21(r13) +/* 8036DA5C 0036A9BC 48 01 3C 2D */ bl OSRestoreInterrupts +/* 8036DA60 0036A9C0 7F E3 FB 78 */ mr r3, r31 +/* 8036DA64 0036A9C4 80 01 00 1C */ lwz r0, 0x1c(r1) +/* 8036DA68 0036A9C8 83 E1 00 14 */ lwz r31, 0x14(r1) +/* 8036DA6C 0036A9CC 83 C1 00 10 */ lwz r30, 0x10(r1) +/* 8036DA70 0036A9D0 38 21 00 18 */ addi r1, r1, 0x18 +/* 8036DA74 0036A9D4 7C 08 03 A6 */ mtlr r0 +/* 8036DA78 0036A9D8 4E 80 00 20 */ blr + +.global ARFree +ARFree: +/* 8036DA7C 0036A9DC 7C 08 02 A6 */ mflr r0 +/* 8036DA80 0036A9E0 90 01 00 04 */ stw r0, 4(r1) +/* 8036DA84 0036A9E4 94 21 FF E8 */ stwu r1, -0x18(r1) +/* 8036DA88 0036A9E8 93 E1 00 14 */ stw r31, 0x14(r1) +/* 8036DA8C 0036A9EC 7C 7F 1B 78 */ mr r31, r3 +/* 8036DA90 0036A9F0 48 01 3B D1 */ bl OSDisableInterrupts +/* 8036DA94 0036A9F4 80 8D AB 50 */ lwz r4, lbl_805A9710@sda21(r13) +/* 8036DA98 0036A9F8 28 1F 00 00 */ cmplwi r31, 0 +/* 8036DA9C 0036A9FC 38 04 FF FC */ addi r0, r4, -4 +/* 8036DAA0 0036AA00 90 0D AB 50 */ stw r0, lbl_805A9710@sda21(r13) +/* 8036DAA4 0036AA04 41 82 00 10 */ beq lbl_8036DAB4 +/* 8036DAA8 0036AA08 80 8D AB 50 */ lwz r4, lbl_805A9710@sda21(r13) +/* 8036DAAC 0036AA0C 80 04 00 00 */ lwz r0, 0(r4) +/* 8036DAB0 0036AA10 90 1F 00 00 */ stw r0, 0(r31) +lbl_8036DAB4: +/* 8036DAB4 0036AA14 80 AD AB 50 */ lwz r5, lbl_805A9710@sda21(r13) +/* 8036DAB8 0036AA18 80 8D AB 4C */ lwz r4, lbl_805A970C@sda21(r13) +/* 8036DABC 0036AA1C 80 C5 00 00 */ lwz r6, 0(r5) +/* 8036DAC0 0036AA20 38 04 00 01 */ addi r0, r4, 1 +/* 8036DAC4 0036AA24 80 AD AB 48 */ lwz r5, lbl_805A9708@sda21(r13) +/* 8036DAC8 0036AA28 90 0D AB 4C */ stw r0, lbl_805A970C@sda21(r13) +/* 8036DACC 0036AA2C 7C 06 28 50 */ subf r0, r6, r5 +/* 8036DAD0 0036AA30 90 0D AB 48 */ stw r0, lbl_805A9708@sda21(r13) +/* 8036DAD4 0036AA34 48 01 3B B5 */ bl OSRestoreInterrupts +/* 8036DAD8 0036AA38 80 6D AB 48 */ lwz r3, lbl_805A9708@sda21(r13) +/* 8036DADC 0036AA3C 80 01 00 1C */ lwz r0, 0x1c(r1) +/* 8036DAE0 0036AA40 83 E1 00 14 */ lwz r31, 0x14(r1) +/* 8036DAE4 0036AA44 38 21 00 18 */ addi r1, r1, 0x18 +/* 8036DAE8 0036AA48 7C 08 03 A6 */ mtlr r0 +/* 8036DAEC 0036AA4C 4E 80 00 20 */ blr + +.global ARInit +ARInit: +/* 8036DAF0 0036AA50 7C 08 02 A6 */ mflr r0 +/* 8036DAF4 0036AA54 90 01 00 04 */ stw r0, 4(r1) +/* 8036DAF8 0036AA58 94 21 FF E0 */ stwu r1, -0x20(r1) +/* 8036DAFC 0036AA5C 93 E1 00 1C */ stw r31, 0x1c(r1) +/* 8036DB00 0036AA60 93 C1 00 18 */ stw r30, 0x18(r1) +/* 8036DB04 0036AA64 3B C4 00 00 */ addi r30, r4, 0 +/* 8036DB08 0036AA68 93 A1 00 14 */ stw r29, 0x14(r1) +/* 8036DB0C 0036AA6C 3B A3 00 00 */ addi r29, r3, 0 +/* 8036DB10 0036AA70 80 0D AB 54 */ lwz r0, lbl_805A9714@sda21(r13) +/* 8036DB14 0036AA74 2C 00 00 01 */ cmpwi r0, 1 +/* 8036DB18 0036AA78 40 82 00 0C */ bne lbl_8036DB24 +/* 8036DB1C 0036AA7C 38 60 40 00 */ li r3, 0x4000 +/* 8036DB20 0036AA80 48 00 00 78 */ b lbl_8036DB98 +lbl_8036DB24: +/* 8036DB24 0036AA84 80 6D 9E B0 */ lwz r3, lbl_805A8A70@sda21(r13) +/* 8036DB28 0036AA88 48 01 05 11 */ bl OSRegisterVersion +/* 8036DB2C 0036AA8C 48 01 3B 35 */ bl OSDisableInterrupts +/* 8036DB30 0036AA90 38 00 00 00 */ li r0, 0 +/* 8036DB34 0036AA94 3C 80 80 37 */ lis r4, __ARHandler@ha +/* 8036DB38 0036AA98 90 0D AB 38 */ stw r0, lbl_805A96F8@sda21(r13) +/* 8036DB3C 0036AA9C 3B E3 00 00 */ addi r31, r3, 0 +/* 8036DB40 0036AAA0 38 84 DB C4 */ addi r4, r4, __ARHandler@l +/* 8036DB44 0036AAA4 38 60 00 06 */ li r3, 6 +/* 8036DB48 0036AAA8 48 01 3B 65 */ bl __OSSetInterruptHandler +/* 8036DB4C 0036AAAC 3C 60 02 00 */ lis r3, 0x200 +/* 8036DB50 0036AAB0 48 01 3F 61 */ bl __OSUnmaskInterrupts +/* 8036DB54 0036AAB4 38 00 40 00 */ li r0, 0x4000 +/* 8036DB58 0036AAB8 93 CD AB 4C */ stw r30, lbl_805A970C@sda21(r13) +/* 8036DB5C 0036AABC 3C 60 CC 00 */ lis r3, 0xCC005000@ha +/* 8036DB60 0036AAC0 90 0D AB 48 */ stw r0, lbl_805A9708@sda21(r13) +/* 8036DB64 0036AAC4 38 83 50 00 */ addi r4, r3, 0xCC005000@l +/* 8036DB68 0036AAC8 93 AD AB 50 */ stw r29, lbl_805A9710@sda21(r13) +/* 8036DB6C 0036AACC A0 04 00 1A */ lhz r0, 0x1a(r4) +/* 8036DB70 0036AAD0 A0 63 50 1A */ lhz r3, 0x501a(r3) +/* 8036DB74 0036AAD4 54 00 00 2E */ rlwinm r0, r0, 0, 0, 0x17 +/* 8036DB78 0036AAD8 50 60 06 3E */ rlwimi r0, r3, 0, 0x18, 0x1f +/* 8036DB7C 0036AADC B0 04 00 1A */ sth r0, 0x1a(r4) +/* 8036DB80 0036AAE0 48 00 00 BD */ bl __ARChecksize +/* 8036DB84 0036AAE4 38 00 00 01 */ li r0, 1 +/* 8036DB88 0036AAE8 90 0D AB 54 */ stw r0, lbl_805A9714@sda21(r13) +/* 8036DB8C 0036AAEC 7F E3 FB 78 */ mr r3, r31 +/* 8036DB90 0036AAF0 48 01 3A F9 */ bl OSRestoreInterrupts +/* 8036DB94 0036AAF4 80 6D AB 48 */ lwz r3, lbl_805A9708@sda21(r13) +lbl_8036DB98: +/* 8036DB98 0036AAF8 80 01 00 24 */ lwz r0, 0x24(r1) +/* 8036DB9C 0036AAFC 83 E1 00 1C */ lwz r31, 0x1c(r1) +/* 8036DBA0 0036AB00 83 C1 00 18 */ lwz r30, 0x18(r1) +/* 8036DBA4 0036AB04 83 A1 00 14 */ lwz r29, 0x14(r1) +/* 8036DBA8 0036AB08 38 21 00 20 */ addi r1, r1, 0x20 +/* 8036DBAC 0036AB0C 7C 08 03 A6 */ mtlr r0 +/* 8036DBB0 0036AB10 4E 80 00 20 */ blr + +.global ARGetBaseAddress +ARGetBaseAddress: +/* 8036DBB4 0036AB14 38 60 40 00 */ li r3, 0x4000 +/* 8036DBB8 0036AB18 4E 80 00 20 */ blr + +.global ARGetSize +ARGetSize: +/* 8036DBBC 0036AB1C 80 6D AB 3C */ lwz r3, lbl_805A96FC@sda21(r13) +/* 8036DBC0 0036AB20 4E 80 00 20 */ blr + +.global __ARHandler +__ARHandler: +/* 8036DBC4 0036AB24 7C 08 02 A6 */ mflr r0 +/* 8036DBC8 0036AB28 3C 60 CC 00 */ lis r3, 0xCC005000@ha +/* 8036DBCC 0036AB2C 90 01 00 04 */ stw r0, 4(r1) +/* 8036DBD0 0036AB30 38 63 50 00 */ addi r3, r3, 0xCC005000@l +/* 8036DBD4 0036AB34 38 00 FF 77 */ li r0, -137 +/* 8036DBD8 0036AB38 94 21 FD 20 */ stwu r1, -0x2e0(r1) +/* 8036DBDC 0036AB3C 93 E1 02 DC */ stw r31, 0x2dc(r1) +/* 8036DBE0 0036AB40 3B E4 00 00 */ addi r31, r4, 0 +/* 8036DBE4 0036AB44 A0 A3 00 0A */ lhz r5, 0xa(r3) +/* 8036DBE8 0036AB48 7C A0 00 38 */ and r0, r5, r0 +/* 8036DBEC 0036AB4C 60 00 00 20 */ ori r0, r0, 0x20 +/* 8036DBF0 0036AB50 B0 03 00 0A */ sth r0, 0xa(r3) +/* 8036DBF4 0036AB54 38 61 00 10 */ addi r3, r1, 0x10 +/* 8036DBF8 0036AB58 48 01 1A 1D */ bl OSClearContext +/* 8036DBFC 0036AB5C 38 61 00 10 */ addi r3, r1, 0x10 +/* 8036DC00 0036AB60 48 01 18 1D */ bl OSSetCurrentContext +/* 8036DC04 0036AB64 81 8D AB 38 */ lwz r12, lbl_805A96F8@sda21(r13) +/* 8036DC08 0036AB68 28 0C 00 00 */ cmplwi r12, 0 +/* 8036DC0C 0036AB6C 41 82 00 0C */ beq lbl_8036DC18 +/* 8036DC10 0036AB70 7D 88 03 A6 */ mtlr r12 +/* 8036DC14 0036AB74 4E 80 00 21 */ blrl +lbl_8036DC18: +/* 8036DC18 0036AB78 38 61 00 10 */ addi r3, r1, 0x10 +/* 8036DC1C 0036AB7C 48 01 19 F9 */ bl OSClearContext +/* 8036DC20 0036AB80 7F E3 FB 78 */ mr r3, r31 +/* 8036DC24 0036AB84 48 01 17 F9 */ bl OSSetCurrentContext +/* 8036DC28 0036AB88 80 01 02 E4 */ lwz r0, 0x2e4(r1) +/* 8036DC2C 0036AB8C 83 E1 02 DC */ lwz r31, 0x2dc(r1) +/* 8036DC30 0036AB90 38 21 02 E0 */ addi r1, r1, 0x2e0 +/* 8036DC34 0036AB94 7C 08 03 A6 */ mtlr r0 +/* 8036DC38 0036AB98 4E 80 00 20 */ blr + +.global __ARChecksize +__ARChecksize: +/* 8036DC3C 0036AB9C 7C 08 02 A6 */ mflr r0 +/* 8036DC40 0036ABA0 3C 60 CC 00 */ lis r3, 0xCC005000@ha +/* 8036DC44 0036ABA4 90 01 00 04 */ stw r0, 4(r1) +/* 8036DC48 0036ABA8 38 63 50 00 */ addi r3, r3, 0xCC005000@l +/* 8036DC4C 0036ABAC 94 21 FD 40 */ stwu r1, -0x2c0(r1) +/* 8036DC50 0036ABB0 BD C1 02 78 */ stmw r14, 0x278(r1) +lbl_8036DC54: +/* 8036DC54 0036ABB4 A0 03 00 16 */ lhz r0, 0x16(r3) +/* 8036DC58 0036ABB8 54 00 07 FF */ clrlwi. r0, r0, 0x1f +/* 8036DC5C 0036ABBC 41 82 FF F8 */ beq lbl_8036DC54 +/* 8036DC60 0036ABC0 3E E0 CC 00 */ lis r23, 0xCC005000@ha +/* 8036DC64 0036ABC4 38 17 50 00 */ addi r0, r23, 0xCC005000@l +/* 8036DC68 0036ABC8 90 01 02 48 */ stw r0, 0x248(r1) +/* 8036DC6C 0036ABCC 3C 60 01 00 */ lis r3, 0x01000000@ha +/* 8036DC70 0036ABD0 38 01 01 F3 */ addi r0, r1, 0x1f3 +/* 8036DC74 0036ABD4 90 6D AB 40 */ stw r3, lbl_805A9700@sda21(r13) +/* 8036DC78 0036ABD8 3C A0 DE AE */ lis r5, 0xDEADBEEF@ha +/* 8036DC7C 0036ABDC 80 81 02 48 */ lwz r4, 0x248(r1) +/* 8036DC80 0036ABE0 54 16 00 34 */ rlwinm r22, r0, 0, 0, 0x1a +/* 8036DC84 0036ABE4 38 01 01 B3 */ addi r0, r1, 0x1b3 +/* 8036DC88 0036ABE8 A0 84 00 12 */ lhz r4, 0x12(r4) +/* 8036DC8C 0036ABEC 38 E1 00 B3 */ addi r7, r1, 0xb3 +/* 8036DC90 0036ABF0 54 E7 00 34 */ rlwinm r7, r7, 0, 0, 0x1a +/* 8036DC94 0036ABF4 54 84 00 32 */ rlwinm r4, r4, 0, 0, 0x19 +/* 8036DC98 0036ABF8 90 E1 02 1C */ stw r7, 0x21c(r1) +/* 8036DC9C 0036ABFC 60 86 00 23 */ ori r6, r4, 0x23 +/* 8036DCA0 0036AC00 80 81 02 48 */ lwz r4, 0x248(r1) +/* 8036DCA4 0036AC04 39 41 01 73 */ addi r10, r1, 0x173 +/* 8036DCA8 0036AC08 B0 C4 00 12 */ sth r6, 0x12(r4) +/* 8036DCAC 0036AC0C 38 A5 BE EF */ addi r5, r5, 0xDEADBEEF@l +/* 8036DCB0 0036AC10 3C 80 BA D1 */ lis r4, 0xBAD0BAD0@ha +/* 8036DCB4 0036AC14 54 15 00 34 */ rlwinm r21, r0, 0, 0, 0x1a +/* 8036DCB8 0036AC18 90 B6 00 00 */ stw r5, 0(r22) +/* 8036DCBC 0036AC1C 38 04 BA D0 */ addi r0, r4, 0xBAD0BAD0@l +/* 8036DCC0 0036AC20 90 15 00 00 */ stw r0, 0(r21) +/* 8036DCC4 0036AC24 38 81 00 33 */ addi r4, r1, 0x33 +/* 8036DCC8 0036AC28 38 C1 00 73 */ addi r6, r1, 0x73 +/* 8036DCCC 0036AC2C 90 B6 00 04 */ stw r5, 4(r22) +/* 8036DCD0 0036AC30 54 84 00 34 */ rlwinm r4, r4, 0, 0, 0x1a +/* 8036DCD4 0036AC34 54 C6 00 34 */ rlwinm r6, r6, 0, 0, 0x1a +/* 8036DCD8 0036AC38 90 15 00 04 */ stw r0, 4(r21) +/* 8036DCDC 0036AC3C 39 21 01 33 */ addi r9, r1, 0x133 +/* 8036DCE0 0036AC40 39 01 00 F3 */ addi r8, r1, 0xf3 +/* 8036DCE4 0036AC44 90 B6 00 08 */ stw r5, 8(r22) +/* 8036DCE8 0036AC48 3A 63 00 00 */ addi r19, r3, 0x01000000@l +/* 8036DCEC 0036AC4C 38 76 00 00 */ addi r3, r22, 0 +/* 8036DCF0 0036AC50 90 15 00 08 */ stw r0, 8(r21) +/* 8036DCF4 0036AC54 55 58 00 34 */ rlwinm r24, r10, 0, 0, 0x1a +/* 8036DCF8 0036AC58 55 3C 00 34 */ rlwinm r28, r9, 0, 0, 0x1a +/* 8036DCFC 0036AC5C 90 B6 00 0C */ stw r5, 0xc(r22) +/* 8036DD00 0036AC60 55 14 00 34 */ rlwinm r20, r8, 0, 0, 0x1a +/* 8036DD04 0036AC64 90 15 00 0C */ stw r0, 0xc(r21) +/* 8036DD08 0036AC68 90 B6 00 10 */ stw r5, 0x10(r22) +/* 8036DD0C 0036AC6C 90 15 00 10 */ stw r0, 0x10(r21) +/* 8036DD10 0036AC70 90 B6 00 14 */ stw r5, 0x14(r22) +/* 8036DD14 0036AC74 90 15 00 14 */ stw r0, 0x14(r21) +/* 8036DD18 0036AC78 90 B6 00 18 */ stw r5, 0x18(r22) +/* 8036DD1C 0036AC7C 90 15 00 18 */ stw r0, 0x18(r21) +/* 8036DD20 0036AC80 90 B6 00 1C */ stw r5, 0x1c(r22) +/* 8036DD24 0036AC84 80 A1 02 48 */ lwz r5, 0x248(r1) +/* 8036DD28 0036AC88 90 81 02 14 */ stw r4, 0x214(r1) +/* 8036DD2C 0036AC8C 38 80 00 03 */ li r4, 3 +/* 8036DD30 0036AC90 38 A5 00 12 */ addi r5, r5, 0x12 +/* 8036DD34 0036AC94 B0 81 02 70 */ sth r4, 0x270(r1) +/* 8036DD38 0036AC98 38 80 00 20 */ li r4, 0x20 +/* 8036DD3C 0036AC9C 90 C1 02 18 */ stw r6, 0x218(r1) +/* 8036DD40 0036ACA0 90 15 00 1C */ stw r0, 0x1c(r21) +/* 8036DD44 0036ACA4 90 A1 02 48 */ stw r5, 0x248(r1) +/* 8036DD48 0036ACA8 48 01 0D 69 */ bl DCFlushRange +/* 8036DD4C 0036ACAC 38 75 00 00 */ addi r3, r21, 0 +/* 8036DD50 0036ACB0 38 80 00 20 */ li r4, 0x20 +/* 8036DD54 0036ACB4 48 01 0D 5D */ bl DCFlushRange +/* 8036DD58 0036ACB8 38 00 00 00 */ li r0, 0 +/* 8036DD5C 0036ACBC 90 0D AB 44 */ stw r0, lbl_805A9704@sda21(r13) +/* 8036DD60 0036ACC0 38 7C 00 00 */ addi r3, r28, 0 +/* 8036DD64 0036ACC4 38 80 00 20 */ li r4, 0x20 +/* 8036DD68 0036ACC8 48 01 0D 1D */ bl DCInvalidateRange +/* 8036DD6C 0036ACCC 57 83 84 3E */ srwi r3, r28, 0x10 +/* 8036DD70 0036ACD0 A0 17 50 20 */ lhz r0, 0x5020(r23) +/* 8036DD74 0036ACD4 90 61 02 3C */ stw r3, 0x23c(r1) +/* 8036DD78 0036ACD8 3B 37 50 00 */ addi r25, r23, 0x5000 +/* 8036DD7C 0036ACDC 54 03 00 2A */ rlwinm r3, r0, 0, 0, 0x15 +/* 8036DD80 0036ACE0 80 01 02 3C */ lwz r0, 0x23c(r1) +/* 8036DD84 0036ACE4 3B 57 50 00 */ addi r26, r23, 0x5000 +/* 8036DD88 0036ACE8 56 71 84 3E */ srwi r17, r19, 0x10 +/* 8036DD8C 0036ACEC 7C 60 03 78 */ or r0, r3, r0 +/* 8036DD90 0036ACF0 B4 19 00 20 */ sthu r0, 0x20(r25) +/* 8036DD94 0036ACF4 57 83 04 3E */ clrlwi r3, r28, 0x10 +/* 8036DD98 0036ACF8 3B 77 50 00 */ addi r27, r23, 0x5000 +/* 8036DD9C 0036ACFC A0 17 50 22 */ lhz r0, 0x5022(r23) +/* 8036DDA0 0036AD00 56 72 04 3E */ clrlwi r18, r19, 0x10 +/* 8036DDA4 0036AD04 90 61 02 4C */ stw r3, 0x24c(r1) +/* 8036DDA8 0036AD08 3B 97 50 00 */ addi r28, r23, 0x5000 +/* 8036DDAC 0036AD0C 54 03 06 DE */ rlwinm r3, r0, 0, 0x1b, 0xf +/* 8036DDB0 0036AD10 80 01 02 4C */ lwz r0, 0x24c(r1) +/* 8036DDB4 0036AD14 3B D7 50 00 */ addi r30, r23, 0x5000 +/* 8036DDB8 0036AD18 3B B7 50 00 */ addi r29, r23, 0x5000 +/* 8036DDBC 0036AD1C 7C 60 03 78 */ or r0, r3, r0 +/* 8036DDC0 0036AD20 B4 1A 00 22 */ sthu r0, 0x22(r26) +/* 8036DDC4 0036AD24 A0 17 50 24 */ lhz r0, 0x5024(r23) +/* 8036DDC8 0036AD28 54 00 00 2A */ rlwinm r0, r0, 0, 0, 0x15 +/* 8036DDCC 0036AD2C 7C 00 8B 78 */ or r0, r0, r17 +/* 8036DDD0 0036AD30 B4 1B 00 24 */ sthu r0, 0x24(r27) +/* 8036DDD4 0036AD34 A0 17 50 26 */ lhz r0, 0x5026(r23) +/* 8036DDD8 0036AD38 54 00 06 DE */ rlwinm r0, r0, 0, 0x1b, 0xf +/* 8036DDDC 0036AD3C 7C 00 93 78 */ or r0, r0, r18 +/* 8036DDE0 0036AD40 B4 1C 00 26 */ sthu r0, 0x26(r28) +/* 8036DDE4 0036AD44 A0 17 50 28 */ lhz r0, 0x5028(r23) +/* 8036DDE8 0036AD48 60 00 80 00 */ ori r0, r0, 0x8000 +/* 8036DDEC 0036AD4C B0 17 50 28 */ sth r0, 0x5028(r23) +/* 8036DDF0 0036AD50 A0 17 50 28 */ lhz r0, 0x5028(r23) +/* 8036DDF4 0036AD54 54 00 00 2A */ rlwinm r0, r0, 0, 0, 0x15 +/* 8036DDF8 0036AD58 60 00 00 00 */ nop +/* 8036DDFC 0036AD5C B4 1E 00 28 */ sthu r0, 0x28(r30) +/* 8036DE00 0036AD60 A0 17 50 2A */ lhz r0, 0x502a(r23) +/* 8036DE04 0036AD64 54 00 06 DE */ rlwinm r0, r0, 0, 0x1b, 0xf +/* 8036DE08 0036AD68 60 00 00 20 */ ori r0, r0, 0x20 +/* 8036DE0C 0036AD6C B4 1D 00 2A */ sthu r0, 0x2a(r29) +lbl_8036DE10: +/* 8036DE10 0036AD70 3B F7 50 00 */ addi r31, r23, 0x5000 +/* 8036DE14 0036AD74 A4 1F 00 0A */ lhzu r0, 0xa(r31) +/* 8036DE18 0036AD78 54 00 05 AD */ rlwinm. r0, r0, 0, 0x16, 0x16 +/* 8036DE1C 0036AD7C 40 82 FF F4 */ bne lbl_8036DE10 +/* 8036DE20 0036AD80 A0 7F 00 00 */ lhz r3, 0(r31) +/* 8036DE24 0036AD84 38 00 FF 77 */ li r0, -137 +/* 8036DE28 0036AD88 7C 60 00 38 */ and r0, r3, r0 +/* 8036DE2C 0036AD8C 60 00 00 20 */ ori r0, r0, 0x20 +/* 8036DE30 0036AD90 B0 1F 00 00 */ sth r0, 0(r31) +/* 8036DE34 0036AD94 48 00 19 D9 */ bl PPCSync +/* 8036DE38 0036AD98 56 C0 84 3E */ srwi r0, r22, 0x10 +/* 8036DE3C 0036AD9C A0 79 00 00 */ lhz r3, 0(r25) +/* 8036DE40 0036ADA0 90 01 02 44 */ stw r0, 0x244(r1) +/* 8036DE44 0036ADA4 54 63 00 2A */ rlwinm r3, r3, 0, 0, 0x15 +/* 8036DE48 0036ADA8 80 01 02 44 */ lwz r0, 0x244(r1) +/* 8036DE4C 0036ADAC 7C 60 03 78 */ or r0, r3, r0 +/* 8036DE50 0036ADB0 B0 19 00 00 */ sth r0, 0(r25) +/* 8036DE54 0036ADB4 56 C0 04 3E */ clrlwi r0, r22, 0x10 +/* 8036DE58 0036ADB8 90 01 02 50 */ stw r0, 0x250(r1) +/* 8036DE5C 0036ADBC A0 1A 00 00 */ lhz r0, 0(r26) +/* 8036DE60 0036ADC0 54 03 06 DE */ rlwinm r3, r0, 0, 0x1b, 0xf +/* 8036DE64 0036ADC4 80 01 02 50 */ lwz r0, 0x250(r1) +/* 8036DE68 0036ADC8 7C 60 03 78 */ or r0, r3, r0 +/* 8036DE6C 0036ADCC B0 1A 00 00 */ sth r0, 0(r26) +/* 8036DE70 0036ADD0 A0 1B 00 00 */ lhz r0, 0(r27) +/* 8036DE74 0036ADD4 54 00 00 2A */ rlwinm r0, r0, 0, 0, 0x15 +/* 8036DE78 0036ADD8 7C 00 8B 78 */ or r0, r0, r17 +/* 8036DE7C 0036ADDC B0 1B 00 00 */ sth r0, 0(r27) +/* 8036DE80 0036ADE0 A0 1C 00 00 */ lhz r0, 0(r28) +/* 8036DE84 0036ADE4 54 00 06 DE */ rlwinm r0, r0, 0, 0x1b, 0xf +/* 8036DE88 0036ADE8 7C 00 93 78 */ or r0, r0, r18 +/* 8036DE8C 0036ADEC B0 1C 00 00 */ sth r0, 0(r28) +/* 8036DE90 0036ADF0 A0 1E 00 00 */ lhz r0, 0(r30) +/* 8036DE94 0036ADF4 54 00 04 5E */ rlwinm r0, r0, 0, 0x11, 0xf +/* 8036DE98 0036ADF8 B0 1E 00 00 */ sth r0, 0(r30) +/* 8036DE9C 0036ADFC A0 1E 00 00 */ lhz r0, 0(r30) +/* 8036DEA0 0036AE00 54 00 00 2A */ rlwinm r0, r0, 0, 0, 0x15 +/* 8036DEA4 0036AE04 60 00 00 00 */ nop +/* 8036DEA8 0036AE08 B0 1E 00 00 */ sth r0, 0(r30) +/* 8036DEAC 0036AE0C A0 1D 00 00 */ lhz r0, 0(r29) +/* 8036DEB0 0036AE10 54 00 06 DE */ rlwinm r0, r0, 0, 0x1b, 0xf +/* 8036DEB4 0036AE14 60 00 00 20 */ ori r0, r0, 0x20 +/* 8036DEB8 0036AE18 B0 1D 00 00 */ sth r0, 0(r29) +lbl_8036DEBC: +/* 8036DEBC 0036AE1C A0 1F 00 00 */ lhz r0, 0(r31) +/* 8036DEC0 0036AE20 54 00 05 AD */ rlwinm. r0, r0, 0, 0x16, 0x16 +/* 8036DEC4 0036AE24 40 82 FF F8 */ bne lbl_8036DEBC +/* 8036DEC8 0036AE28 A0 1F 00 00 */ lhz r0, 0(r31) +/* 8036DECC 0036AE2C 38 80 FF 77 */ li r4, -137 +/* 8036DED0 0036AE30 38 78 00 00 */ addi r3, r24, 0 +/* 8036DED4 0036AE34 7C 00 20 38 */ and r0, r0, r4 +/* 8036DED8 0036AE38 60 00 00 20 */ ori r0, r0, 0x20 +/* 8036DEDC 0036AE3C B0 1F 00 00 */ sth r0, 0(r31) +/* 8036DEE0 0036AE40 38 80 00 00 */ li r4, 0 +/* 8036DEE4 0036AE44 38 A0 00 20 */ li r5, 0x20 +/* 8036DEE8 0036AE48 4B C9 54 C1 */ bl memset +/* 8036DEEC 0036AE4C 38 78 00 00 */ addi r3, r24, 0 +/* 8036DEF0 0036AE50 38 80 00 20 */ li r4, 0x20 +/* 8036DEF4 0036AE54 48 01 0B BD */ bl DCFlushRange +/* 8036DEF8 0036AE58 57 00 84 3E */ srwi r0, r24, 0x10 +/* 8036DEFC 0036AE5C A0 79 00 00 */ lhz r3, 0(r25) +/* 8036DF00 0036AE60 90 01 02 40 */ stw r0, 0x240(r1) +/* 8036DF04 0036AE64 54 63 00 2A */ rlwinm r3, r3, 0, 0, 0x15 +/* 8036DF08 0036AE68 80 01 02 40 */ lwz r0, 0x240(r1) +/* 8036DF0C 0036AE6C 7C 60 03 78 */ or r0, r3, r0 +/* 8036DF10 0036AE70 B0 19 00 00 */ sth r0, 0(r25) +/* 8036DF14 0036AE74 57 00 04 3E */ clrlwi r0, r24, 0x10 +/* 8036DF18 0036AE78 90 01 02 54 */ stw r0, 0x254(r1) +/* 8036DF1C 0036AE7C A0 1A 00 00 */ lhz r0, 0(r26) +/* 8036DF20 0036AE80 54 03 06 DE */ rlwinm r3, r0, 0, 0x1b, 0xf +/* 8036DF24 0036AE84 80 01 02 54 */ lwz r0, 0x254(r1) +/* 8036DF28 0036AE88 7C 60 03 78 */ or r0, r3, r0 +/* 8036DF2C 0036AE8C B0 1A 00 00 */ sth r0, 0(r26) +/* 8036DF30 0036AE90 A0 1B 00 00 */ lhz r0, 0(r27) +/* 8036DF34 0036AE94 54 00 00 2A */ rlwinm r0, r0, 0, 0, 0x15 +/* 8036DF38 0036AE98 7C 00 8B 78 */ or r0, r0, r17 +/* 8036DF3C 0036AE9C B0 1B 00 00 */ sth r0, 0(r27) +/* 8036DF40 0036AEA0 A0 1C 00 00 */ lhz r0, 0(r28) +/* 8036DF44 0036AEA4 54 00 06 DE */ rlwinm r0, r0, 0, 0x1b, 0xf +/* 8036DF48 0036AEA8 7C 00 93 78 */ or r0, r0, r18 +/* 8036DF4C 0036AEAC B0 1C 00 00 */ sth r0, 0(r28) +/* 8036DF50 0036AEB0 A0 1E 00 00 */ lhz r0, 0(r30) +/* 8036DF54 0036AEB4 60 00 80 00 */ ori r0, r0, 0x8000 +/* 8036DF58 0036AEB8 B0 1E 00 00 */ sth r0, 0(r30) +/* 8036DF5C 0036AEBC A0 1E 00 00 */ lhz r0, 0(r30) +/* 8036DF60 0036AEC0 54 00 00 2A */ rlwinm r0, r0, 0, 0, 0x15 +/* 8036DF64 0036AEC4 60 00 00 00 */ nop +/* 8036DF68 0036AEC8 B0 1E 00 00 */ sth r0, 0(r30) +/* 8036DF6C 0036AECC A0 1D 00 00 */ lhz r0, 0(r29) +/* 8036DF70 0036AED0 54 00 06 DE */ rlwinm r0, r0, 0, 0x1b, 0xf +/* 8036DF74 0036AED4 60 00 00 20 */ ori r0, r0, 0x20 +/* 8036DF78 0036AED8 B0 1D 00 00 */ sth r0, 0(r29) +lbl_8036DF7C: +/* 8036DF7C 0036AEDC A0 1F 00 00 */ lhz r0, 0(r31) +/* 8036DF80 0036AEE0 54 00 05 AD */ rlwinm. r0, r0, 0, 0x16, 0x16 +/* 8036DF84 0036AEE4 40 82 FF F8 */ bne lbl_8036DF7C +/* 8036DF88 0036AEE8 A0 7F 00 00 */ lhz r3, 0(r31) +/* 8036DF8C 0036AEEC 38 00 FF 77 */ li r0, -137 +/* 8036DF90 0036AEF0 7C 60 00 38 */ and r0, r3, r0 +/* 8036DF94 0036AEF4 60 00 00 20 */ ori r0, r0, 0x20 +/* 8036DF98 0036AEF8 B0 1F 00 00 */ sth r0, 0(r31) +/* 8036DF9C 0036AEFC 48 00 18 71 */ bl PPCSync +/* 8036DFA0 0036AF00 80 78 00 00 */ lwz r3, 0(r24) +/* 8036DFA4 0036AF04 80 16 00 00 */ lwz r0, 0(r22) +/* 8036DFA8 0036AF08 7C 03 00 40 */ cmplw r3, r0 +/* 8036DFAC 0036AF0C 40 82 14 64 */ bne lbl_8036F410 +/* 8036DFB0 0036AF10 38 74 00 00 */ addi r3, r20, 0 +/* 8036DFB4 0036AF14 38 80 00 20 */ li r4, 0x20 +/* 8036DFB8 0036AF18 48 01 0A CD */ bl DCInvalidateRange +/* 8036DFBC 0036AF1C 56 80 84 3E */ srwi r0, r20, 0x10 +/* 8036DFC0 0036AF20 A0 99 00 00 */ lhz r4, 0(r25) +/* 8036DFC4 0036AF24 90 01 02 34 */ stw r0, 0x234(r1) +/* 8036DFC8 0036AF28 3C 73 00 20 */ addis r3, r19, 0x20 +/* 8036DFCC 0036AF2C 54 84 00 2A */ rlwinm r4, r4, 0, 0, 0x15 +/* 8036DFD0 0036AF30 80 01 02 34 */ lwz r0, 0x234(r1) +/* 8036DFD4 0036AF34 54 70 84 3E */ srwi r16, r3, 0x10 +/* 8036DFD8 0036AF38 54 77 04 3E */ clrlwi r23, r3, 0x10 +/* 8036DFDC 0036AF3C 7C 80 03 78 */ or r0, r4, r0 +/* 8036DFE0 0036AF40 B0 19 00 00 */ sth r0, 0(r25) +/* 8036DFE4 0036AF44 56 80 04 3E */ clrlwi r0, r20, 0x10 +/* 8036DFE8 0036AF48 90 01 02 58 */ stw r0, 0x258(r1) +/* 8036DFEC 0036AF4C A0 1A 00 00 */ lhz r0, 0(r26) +/* 8036DFF0 0036AF50 54 03 06 DE */ rlwinm r3, r0, 0, 0x1b, 0xf +/* 8036DFF4 0036AF54 80 01 02 58 */ lwz r0, 0x258(r1) +/* 8036DFF8 0036AF58 7C 60 03 78 */ or r0, r3, r0 +/* 8036DFFC 0036AF5C B0 1A 00 00 */ sth r0, 0(r26) +/* 8036E000 0036AF60 A0 1B 00 00 */ lhz r0, 0(r27) +/* 8036E004 0036AF64 54 00 00 2A */ rlwinm r0, r0, 0, 0, 0x15 +/* 8036E008 0036AF68 7C 00 83 78 */ or r0, r0, r16 +/* 8036E00C 0036AF6C B0 1B 00 00 */ sth r0, 0(r27) +/* 8036E010 0036AF70 A0 1C 00 00 */ lhz r0, 0(r28) +/* 8036E014 0036AF74 54 00 06 DE */ rlwinm r0, r0, 0, 0x1b, 0xf +/* 8036E018 0036AF78 7C 00 BB 78 */ or r0, r0, r23 +/* 8036E01C 0036AF7C B0 1C 00 00 */ sth r0, 0(r28) +/* 8036E020 0036AF80 A0 1E 00 00 */ lhz r0, 0(r30) +/* 8036E024 0036AF84 60 00 80 00 */ ori r0, r0, 0x8000 +/* 8036E028 0036AF88 B0 1E 00 00 */ sth r0, 0(r30) +/* 8036E02C 0036AF8C A0 1E 00 00 */ lhz r0, 0(r30) +/* 8036E030 0036AF90 54 00 00 2A */ rlwinm r0, r0, 0, 0, 0x15 +/* 8036E034 0036AF94 60 00 00 00 */ nop +/* 8036E038 0036AF98 B0 1E 00 00 */ sth r0, 0(r30) +/* 8036E03C 0036AF9C A0 1D 00 00 */ lhz r0, 0(r29) +/* 8036E040 0036AFA0 54 00 06 DE */ rlwinm r0, r0, 0, 0x1b, 0xf +/* 8036E044 0036AFA4 60 00 00 20 */ ori r0, r0, 0x20 +/* 8036E048 0036AFA8 B0 1D 00 00 */ sth r0, 0(r29) +lbl_8036E04C: +/* 8036E04C 0036AFAC A0 1F 00 00 */ lhz r0, 0(r31) +/* 8036E050 0036AFB0 54 00 05 AD */ rlwinm. r0, r0, 0, 0x16, 0x16 +/* 8036E054 0036AFB4 40 82 FF F8 */ bne lbl_8036E04C +/* 8036E058 0036AFB8 A0 7F 00 00 */ lhz r3, 0(r31) +/* 8036E05C 0036AFBC 38 00 FF 77 */ li r0, -137 +/* 8036E060 0036AFC0 7C 60 00 38 */ and r0, r3, r0 +/* 8036E064 0036AFC4 60 00 00 20 */ ori r0, r0, 0x20 +/* 8036E068 0036AFC8 B0 1F 00 00 */ sth r0, 0(r31) +/* 8036E06C 0036AFCC 48 00 17 A1 */ bl PPCSync +/* 8036E070 0036AFD0 80 61 02 1C */ lwz r3, 0x21c(r1) +/* 8036E074 0036AFD4 38 80 00 20 */ li r4, 0x20 +/* 8036E078 0036AFD8 48 01 0A 0D */ bl DCInvalidateRange +/* 8036E07C 0036AFDC 80 01 02 1C */ lwz r0, 0x21c(r1) +/* 8036E080 0036AFE0 3C 73 01 00 */ addis r3, r19, 0x100 +/* 8036E084 0036AFE4 A0 99 00 00 */ lhz r4, 0(r25) +/* 8036E088 0036AFE8 54 6E 84 3E */ srwi r14, r3, 0x10 +/* 8036E08C 0036AFEC 54 00 84 3E */ srwi r0, r0, 0x10 +/* 8036E090 0036AFF0 90 01 02 2C */ stw r0, 0x22c(r1) +/* 8036E094 0036AFF4 54 84 00 2A */ rlwinm r4, r4, 0, 0, 0x15 +/* 8036E098 0036AFF8 54 6F 04 3E */ clrlwi r15, r3, 0x10 +/* 8036E09C 0036AFFC 80 01 02 2C */ lwz r0, 0x22c(r1) +/* 8036E0A0 0036B000 7C 80 03 78 */ or r0, r4, r0 +/* 8036E0A4 0036B004 B0 19 00 00 */ sth r0, 0(r25) +/* 8036E0A8 0036B008 80 01 02 1C */ lwz r0, 0x21c(r1) +/* 8036E0AC 0036B00C 54 00 04 3E */ clrlwi r0, r0, 0x10 +/* 8036E0B0 0036B010 90 01 02 5C */ stw r0, 0x25c(r1) +/* 8036E0B4 0036B014 A0 1A 00 00 */ lhz r0, 0(r26) +/* 8036E0B8 0036B018 54 03 06 DE */ rlwinm r3, r0, 0, 0x1b, 0xf +/* 8036E0BC 0036B01C 80 01 02 5C */ lwz r0, 0x25c(r1) +/* 8036E0C0 0036B020 7C 60 03 78 */ or r0, r3, r0 +/* 8036E0C4 0036B024 B0 1A 00 00 */ sth r0, 0(r26) +/* 8036E0C8 0036B028 A0 1B 00 00 */ lhz r0, 0(r27) +/* 8036E0CC 0036B02C 54 00 00 2A */ rlwinm r0, r0, 0, 0, 0x15 +/* 8036E0D0 0036B030 7C 00 73 78 */ or r0, r0, r14 +/* 8036E0D4 0036B034 B0 1B 00 00 */ sth r0, 0(r27) +/* 8036E0D8 0036B038 A0 1C 00 00 */ lhz r0, 0(r28) +/* 8036E0DC 0036B03C 54 00 06 DE */ rlwinm r0, r0, 0, 0x1b, 0xf +/* 8036E0E0 0036B040 7C 00 7B 78 */ or r0, r0, r15 +/* 8036E0E4 0036B044 B0 1C 00 00 */ sth r0, 0(r28) +/* 8036E0E8 0036B048 A0 1E 00 00 */ lhz r0, 0(r30) +/* 8036E0EC 0036B04C 60 00 80 00 */ ori r0, r0, 0x8000 +/* 8036E0F0 0036B050 B0 1E 00 00 */ sth r0, 0(r30) +/* 8036E0F4 0036B054 A0 1E 00 00 */ lhz r0, 0(r30) +/* 8036E0F8 0036B058 54 00 00 2A */ rlwinm r0, r0, 0, 0, 0x15 +/* 8036E0FC 0036B05C 60 00 00 00 */ nop +/* 8036E100 0036B060 B0 1E 00 00 */ sth r0, 0(r30) +/* 8036E104 0036B064 A0 1D 00 00 */ lhz r0, 0(r29) +/* 8036E108 0036B068 54 00 06 DE */ rlwinm r0, r0, 0, 0x1b, 0xf +/* 8036E10C 0036B06C 60 00 00 20 */ ori r0, r0, 0x20 +/* 8036E110 0036B070 B0 1D 00 00 */ sth r0, 0(r29) +lbl_8036E114: +/* 8036E114 0036B074 A0 1F 00 00 */ lhz r0, 0(r31) +/* 8036E118 0036B078 54 00 05 AD */ rlwinm. r0, r0, 0, 0x16, 0x16 +/* 8036E11C 0036B07C 40 82 FF F8 */ bne lbl_8036E114 +/* 8036E120 0036B080 A0 7F 00 00 */ lhz r3, 0(r31) +/* 8036E124 0036B084 38 00 FF 77 */ li r0, -137 +/* 8036E128 0036B088 7C 60 00 38 */ and r0, r3, r0 +/* 8036E12C 0036B08C 60 00 00 20 */ ori r0, r0, 0x20 +/* 8036E130 0036B090 B0 1F 00 00 */ sth r0, 0(r31) +/* 8036E134 0036B094 48 00 16 D9 */ bl PPCSync +/* 8036E138 0036B098 80 61 02 18 */ lwz r3, 0x218(r1) +/* 8036E13C 0036B09C 38 80 00 20 */ li r4, 0x20 +/* 8036E140 0036B0A0 48 01 09 45 */ bl DCInvalidateRange +/* 8036E144 0036B0A4 80 01 02 18 */ lwz r0, 0x218(r1) +/* 8036E148 0036B0A8 38 73 02 00 */ addi r3, r19, 0x200 +/* 8036E14C 0036B0AC A0 99 00 00 */ lhz r4, 0(r25) +/* 8036E150 0036B0B0 54 00 84 3E */ srwi r0, r0, 0x10 +/* 8036E154 0036B0B4 90 01 02 24 */ stw r0, 0x224(r1) +/* 8036E158 0036B0B8 54 84 00 2A */ rlwinm r4, r4, 0, 0, 0x15 +/* 8036E15C 0036B0BC 80 01 02 24 */ lwz r0, 0x224(r1) +/* 8036E160 0036B0C0 7C 80 03 78 */ or r0, r4, r0 +/* 8036E164 0036B0C4 B0 19 00 00 */ sth r0, 0(r25) +/* 8036E168 0036B0C8 54 60 84 3E */ srwi r0, r3, 0x10 +/* 8036E16C 0036B0CC 54 63 04 3E */ clrlwi r3, r3, 0x10 +/* 8036E170 0036B0D0 90 01 02 30 */ stw r0, 0x230(r1) +/* 8036E174 0036B0D4 80 01 02 18 */ lwz r0, 0x218(r1) +/* 8036E178 0036B0D8 90 61 02 64 */ stw r3, 0x264(r1) +/* 8036E17C 0036B0DC 54 00 04 3E */ clrlwi r0, r0, 0x10 +/* 8036E180 0036B0E0 90 01 02 60 */ stw r0, 0x260(r1) +/* 8036E184 0036B0E4 A0 1A 00 00 */ lhz r0, 0(r26) +/* 8036E188 0036B0E8 54 03 06 DE */ rlwinm r3, r0, 0, 0x1b, 0xf +/* 8036E18C 0036B0EC 80 01 02 60 */ lwz r0, 0x260(r1) +/* 8036E190 0036B0F0 7C 60 03 78 */ or r0, r3, r0 +/* 8036E194 0036B0F4 B0 1A 00 00 */ sth r0, 0(r26) +/* 8036E198 0036B0F8 A0 1B 00 00 */ lhz r0, 0(r27) +/* 8036E19C 0036B0FC 54 03 00 2A */ rlwinm r3, r0, 0, 0, 0x15 +/* 8036E1A0 0036B100 80 01 02 30 */ lwz r0, 0x230(r1) +/* 8036E1A4 0036B104 7C 60 03 78 */ or r0, r3, r0 +/* 8036E1A8 0036B108 B0 1B 00 00 */ sth r0, 0(r27) +/* 8036E1AC 0036B10C A0 1C 00 00 */ lhz r0, 0(r28) +/* 8036E1B0 0036B110 54 03 06 DE */ rlwinm r3, r0, 0, 0x1b, 0xf +/* 8036E1B4 0036B114 80 01 02 64 */ lwz r0, 0x264(r1) +/* 8036E1B8 0036B118 7C 60 03 78 */ or r0, r3, r0 +/* 8036E1BC 0036B11C B0 1C 00 00 */ sth r0, 0(r28) +/* 8036E1C0 0036B120 A0 1E 00 00 */ lhz r0, 0(r30) +/* 8036E1C4 0036B124 60 00 80 00 */ ori r0, r0, 0x8000 +/* 8036E1C8 0036B128 B0 1E 00 00 */ sth r0, 0(r30) +/* 8036E1CC 0036B12C A0 1E 00 00 */ lhz r0, 0(r30) +/* 8036E1D0 0036B130 54 00 00 2A */ rlwinm r0, r0, 0, 0, 0x15 +/* 8036E1D4 0036B134 60 00 00 00 */ nop +/* 8036E1D8 0036B138 B0 1E 00 00 */ sth r0, 0(r30) +/* 8036E1DC 0036B13C A0 1D 00 00 */ lhz r0, 0(r29) +/* 8036E1E0 0036B140 54 00 06 DE */ rlwinm r0, r0, 0, 0x1b, 0xf +/* 8036E1E4 0036B144 60 00 00 20 */ ori r0, r0, 0x20 +/* 8036E1E8 0036B148 B0 1D 00 00 */ sth r0, 0(r29) +lbl_8036E1EC: +/* 8036E1EC 0036B14C A0 1F 00 00 */ lhz r0, 0(r31) +/* 8036E1F0 0036B150 54 00 05 AD */ rlwinm. r0, r0, 0, 0x16, 0x16 +/* 8036E1F4 0036B154 40 82 FF F8 */ bne lbl_8036E1EC +/* 8036E1F8 0036B158 A0 7F 00 00 */ lhz r3, 0(r31) +/* 8036E1FC 0036B15C 38 00 FF 77 */ li r0, -137 +/* 8036E200 0036B160 7C 60 00 38 */ and r0, r3, r0 +/* 8036E204 0036B164 60 00 00 20 */ ori r0, r0, 0x20 +/* 8036E208 0036B168 B0 1F 00 00 */ sth r0, 0(r31) +/* 8036E20C 0036B16C 48 00 16 01 */ bl PPCSync +/* 8036E210 0036B170 80 61 02 14 */ lwz r3, 0x214(r1) +/* 8036E214 0036B174 38 80 00 20 */ li r4, 0x20 +/* 8036E218 0036B178 48 01 08 6D */ bl DCInvalidateRange +/* 8036E21C 0036B17C 80 01 02 14 */ lwz r0, 0x214(r1) +/* 8036E220 0036B180 3C 73 00 40 */ addis r3, r19, 0x40 +/* 8036E224 0036B184 A0 99 00 00 */ lhz r4, 0(r25) +/* 8036E228 0036B188 54 00 84 3E */ srwi r0, r0, 0x10 +/* 8036E22C 0036B18C 90 01 02 20 */ stw r0, 0x220(r1) +/* 8036E230 0036B190 54 84 00 2A */ rlwinm r4, r4, 0, 0, 0x15 +/* 8036E234 0036B194 80 01 02 20 */ lwz r0, 0x220(r1) +/* 8036E238 0036B198 7C 80 03 78 */ or r0, r4, r0 +/* 8036E23C 0036B19C B0 19 00 00 */ sth r0, 0(r25) +/* 8036E240 0036B1A0 54 60 84 3E */ srwi r0, r3, 0x10 +/* 8036E244 0036B1A4 54 63 04 3E */ clrlwi r3, r3, 0x10 +/* 8036E248 0036B1A8 90 01 02 28 */ stw r0, 0x228(r1) +/* 8036E24C 0036B1AC 80 01 02 14 */ lwz r0, 0x214(r1) +/* 8036E250 0036B1B0 90 61 02 6C */ stw r3, 0x26c(r1) +/* 8036E254 0036B1B4 54 00 04 3E */ clrlwi r0, r0, 0x10 +/* 8036E258 0036B1B8 90 01 02 68 */ stw r0, 0x268(r1) +/* 8036E25C 0036B1BC A0 1A 00 00 */ lhz r0, 0(r26) +/* 8036E260 0036B1C0 54 03 06 DE */ rlwinm r3, r0, 0, 0x1b, 0xf +/* 8036E264 0036B1C4 80 01 02 68 */ lwz r0, 0x268(r1) +/* 8036E268 0036B1C8 7C 60 03 78 */ or r0, r3, r0 +/* 8036E26C 0036B1CC B0 1A 00 00 */ sth r0, 0(r26) +/* 8036E270 0036B1D0 A0 1B 00 00 */ lhz r0, 0(r27) +/* 8036E274 0036B1D4 54 03 00 2A */ rlwinm r3, r0, 0, 0, 0x15 +/* 8036E278 0036B1D8 80 01 02 28 */ lwz r0, 0x228(r1) +/* 8036E27C 0036B1DC 7C 60 03 78 */ or r0, r3, r0 +/* 8036E280 0036B1E0 B0 1B 00 00 */ sth r0, 0(r27) +/* 8036E284 0036B1E4 A0 1C 00 00 */ lhz r0, 0(r28) +/* 8036E288 0036B1E8 54 03 06 DE */ rlwinm r3, r0, 0, 0x1b, 0xf +/* 8036E28C 0036B1EC 80 01 02 6C */ lwz r0, 0x26c(r1) +/* 8036E290 0036B1F0 7C 60 03 78 */ or r0, r3, r0 +/* 8036E294 0036B1F4 B0 1C 00 00 */ sth r0, 0(r28) +/* 8036E298 0036B1F8 A0 1E 00 00 */ lhz r0, 0(r30) +/* 8036E29C 0036B1FC 60 00 80 00 */ ori r0, r0, 0x8000 +/* 8036E2A0 0036B200 B0 1E 00 00 */ sth r0, 0(r30) +/* 8036E2A4 0036B204 A0 1E 00 00 */ lhz r0, 0(r30) +/* 8036E2A8 0036B208 54 00 00 2A */ rlwinm r0, r0, 0, 0, 0x15 +/* 8036E2AC 0036B20C 60 00 00 00 */ nop +/* 8036E2B0 0036B210 B0 1E 00 00 */ sth r0, 0(r30) +/* 8036E2B4 0036B214 A0 1D 00 00 */ lhz r0, 0(r29) +/* 8036E2B8 0036B218 54 00 06 DE */ rlwinm r0, r0, 0, 0x1b, 0xf +/* 8036E2BC 0036B21C 60 00 00 20 */ ori r0, r0, 0x20 +/* 8036E2C0 0036B220 B0 1D 00 00 */ sth r0, 0(r29) +lbl_8036E2C4: +/* 8036E2C4 0036B224 A0 1F 00 00 */ lhz r0, 0(r31) +/* 8036E2C8 0036B228 54 00 05 AD */ rlwinm. r0, r0, 0, 0x16, 0x16 +/* 8036E2CC 0036B22C 40 82 FF F8 */ bne lbl_8036E2C4 +/* 8036E2D0 0036B230 A0 7F 00 00 */ lhz r3, 0(r31) +/* 8036E2D4 0036B234 38 00 FF 77 */ li r0, -137 +/* 8036E2D8 0036B238 7C 60 00 38 */ and r0, r3, r0 +/* 8036E2DC 0036B23C 60 00 00 20 */ ori r0, r0, 0x20 +/* 8036E2E0 0036B240 B0 1F 00 00 */ sth r0, 0(r31) +/* 8036E2E4 0036B244 48 00 15 29 */ bl PPCSync +/* 8036E2E8 0036B248 56 A0 84 3E */ srwi r0, r21, 0x10 +/* 8036E2EC 0036B24C A0 79 00 00 */ lhz r3, 0(r25) +/* 8036E2F0 0036B250 90 01 02 38 */ stw r0, 0x238(r1) +/* 8036E2F4 0036B254 56 B4 04 3E */ clrlwi r20, r21, 0x10 +/* 8036E2F8 0036B258 54 63 00 2A */ rlwinm r3, r3, 0, 0, 0x15 +/* 8036E2FC 0036B25C 80 01 02 38 */ lwz r0, 0x238(r1) +/* 8036E300 0036B260 7C 60 03 78 */ or r0, r3, r0 +/* 8036E304 0036B264 B0 19 00 00 */ sth r0, 0(r25) +/* 8036E308 0036B268 A0 1A 00 00 */ lhz r0, 0(r26) +/* 8036E30C 0036B26C 54 00 06 DE */ rlwinm r0, r0, 0, 0x1b, 0xf +/* 8036E310 0036B270 7C 00 A3 78 */ or r0, r0, r20 +/* 8036E314 0036B274 B0 1A 00 00 */ sth r0, 0(r26) +/* 8036E318 0036B278 A0 1B 00 00 */ lhz r0, 0(r27) +/* 8036E31C 0036B27C 54 00 00 2A */ rlwinm r0, r0, 0, 0, 0x15 +/* 8036E320 0036B280 7C 00 83 78 */ or r0, r0, r16 +/* 8036E324 0036B284 B0 1B 00 00 */ sth r0, 0(r27) +/* 8036E328 0036B288 A0 1C 00 00 */ lhz r0, 0(r28) +/* 8036E32C 0036B28C 54 00 06 DE */ rlwinm r0, r0, 0, 0x1b, 0xf +/* 8036E330 0036B290 7C 00 BB 78 */ or r0, r0, r23 +/* 8036E334 0036B294 B0 1C 00 00 */ sth r0, 0(r28) +/* 8036E338 0036B298 A0 1E 00 00 */ lhz r0, 0(r30) +/* 8036E33C 0036B29C 54 00 04 5E */ rlwinm r0, r0, 0, 0x11, 0xf +/* 8036E340 0036B2A0 B0 1E 00 00 */ sth r0, 0(r30) +/* 8036E344 0036B2A4 A0 1E 00 00 */ lhz r0, 0(r30) +/* 8036E348 0036B2A8 54 00 00 2A */ rlwinm r0, r0, 0, 0, 0x15 +/* 8036E34C 0036B2AC 60 00 00 00 */ nop +/* 8036E350 0036B2B0 B0 1E 00 00 */ sth r0, 0(r30) +/* 8036E354 0036B2B4 A0 1D 00 00 */ lhz r0, 0(r29) +/* 8036E358 0036B2B8 54 00 06 DE */ rlwinm r0, r0, 0, 0x1b, 0xf +/* 8036E35C 0036B2BC 60 00 00 20 */ ori r0, r0, 0x20 +/* 8036E360 0036B2C0 B0 1D 00 00 */ sth r0, 0(r29) +lbl_8036E364: +/* 8036E364 0036B2C4 A0 1F 00 00 */ lhz r0, 0(r31) +/* 8036E368 0036B2C8 54 00 05 AD */ rlwinm. r0, r0, 0, 0x16, 0x16 +/* 8036E36C 0036B2CC 40 82 FF F8 */ bne lbl_8036E364 +/* 8036E370 0036B2D0 A0 7F 00 00 */ lhz r3, 0(r31) +/* 8036E374 0036B2D4 38 00 FF 77 */ li r0, -137 +/* 8036E378 0036B2D8 7C 60 00 38 */ and r0, r3, r0 +/* 8036E37C 0036B2DC 60 00 00 20 */ ori r0, r0, 0x20 +/* 8036E380 0036B2E0 B0 1F 00 00 */ sth r0, 0(r31) +/* 8036E384 0036B2E4 A0 19 00 00 */ lhz r0, 0(r25) +/* 8036E388 0036B2E8 54 03 00 2A */ rlwinm r3, r0, 0, 0, 0x15 +/* 8036E38C 0036B2EC 80 01 02 44 */ lwz r0, 0x244(r1) +/* 8036E390 0036B2F0 7C 60 03 78 */ or r0, r3, r0 +/* 8036E394 0036B2F4 B0 19 00 00 */ sth r0, 0(r25) +/* 8036E398 0036B2F8 A0 1A 00 00 */ lhz r0, 0(r26) +/* 8036E39C 0036B2FC 54 03 06 DE */ rlwinm r3, r0, 0, 0x1b, 0xf +/* 8036E3A0 0036B300 80 01 02 50 */ lwz r0, 0x250(r1) +/* 8036E3A4 0036B304 7C 60 03 78 */ or r0, r3, r0 +/* 8036E3A8 0036B308 B0 1A 00 00 */ sth r0, 0(r26) +/* 8036E3AC 0036B30C A0 1B 00 00 */ lhz r0, 0(r27) +/* 8036E3B0 0036B310 54 00 00 2A */ rlwinm r0, r0, 0, 0, 0x15 +/* 8036E3B4 0036B314 7C 00 8B 78 */ or r0, r0, r17 +/* 8036E3B8 0036B318 B0 1B 00 00 */ sth r0, 0(r27) +/* 8036E3BC 0036B31C A0 1C 00 00 */ lhz r0, 0(r28) +/* 8036E3C0 0036B320 54 00 06 DE */ rlwinm r0, r0, 0, 0x1b, 0xf +/* 8036E3C4 0036B324 7C 00 93 78 */ or r0, r0, r18 +/* 8036E3C8 0036B328 B0 1C 00 00 */ sth r0, 0(r28) +/* 8036E3CC 0036B32C A0 1E 00 00 */ lhz r0, 0(r30) +/* 8036E3D0 0036B330 54 00 04 5E */ rlwinm r0, r0, 0, 0x11, 0xf +/* 8036E3D4 0036B334 B0 1E 00 00 */ sth r0, 0(r30) +/* 8036E3D8 0036B338 A0 1E 00 00 */ lhz r0, 0(r30) +/* 8036E3DC 0036B33C 54 00 00 2A */ rlwinm r0, r0, 0, 0, 0x15 +/* 8036E3E0 0036B340 60 00 00 00 */ nop +/* 8036E3E4 0036B344 B0 1E 00 00 */ sth r0, 0(r30) +/* 8036E3E8 0036B348 A0 1D 00 00 */ lhz r0, 0(r29) +/* 8036E3EC 0036B34C 54 00 06 DE */ rlwinm r0, r0, 0, 0x1b, 0xf +/* 8036E3F0 0036B350 60 00 00 20 */ ori r0, r0, 0x20 +/* 8036E3F4 0036B354 B0 1D 00 00 */ sth r0, 0(r29) +lbl_8036E3F8: +/* 8036E3F8 0036B358 A0 1F 00 00 */ lhz r0, 0(r31) +/* 8036E3FC 0036B35C 54 00 05 AD */ rlwinm. r0, r0, 0, 0x16, 0x16 +/* 8036E400 0036B360 40 82 FF F8 */ bne lbl_8036E3F8 +/* 8036E404 0036B364 A0 1F 00 00 */ lhz r0, 0(r31) +/* 8036E408 0036B368 38 80 FF 77 */ li r4, -137 +/* 8036E40C 0036B36C 38 78 00 00 */ addi r3, r24, 0 +/* 8036E410 0036B370 7C 00 20 38 */ and r0, r0, r4 +/* 8036E414 0036B374 60 00 00 20 */ ori r0, r0, 0x20 +/* 8036E418 0036B378 B0 1F 00 00 */ sth r0, 0(r31) +/* 8036E41C 0036B37C 38 80 00 00 */ li r4, 0 +/* 8036E420 0036B380 38 A0 00 20 */ li r5, 0x20 +/* 8036E424 0036B384 4B C9 4F 85 */ bl memset +/* 8036E428 0036B388 38 78 00 00 */ addi r3, r24, 0 +/* 8036E42C 0036B38C 38 80 00 20 */ li r4, 0x20 +/* 8036E430 0036B390 48 01 06 81 */ bl DCFlushRange +/* 8036E434 0036B394 A0 19 00 00 */ lhz r0, 0(r25) +/* 8036E438 0036B398 54 03 00 2A */ rlwinm r3, r0, 0, 0, 0x15 +/* 8036E43C 0036B39C 80 01 02 40 */ lwz r0, 0x240(r1) +/* 8036E440 0036B3A0 7C 60 03 78 */ or r0, r3, r0 +/* 8036E444 0036B3A4 B0 19 00 00 */ sth r0, 0(r25) +/* 8036E448 0036B3A8 A0 1A 00 00 */ lhz r0, 0(r26) +/* 8036E44C 0036B3AC 54 03 06 DE */ rlwinm r3, r0, 0, 0x1b, 0xf +/* 8036E450 0036B3B0 80 01 02 54 */ lwz r0, 0x254(r1) +/* 8036E454 0036B3B4 7C 60 03 78 */ or r0, r3, r0 +/* 8036E458 0036B3B8 B0 1A 00 00 */ sth r0, 0(r26) +/* 8036E45C 0036B3BC A0 1B 00 00 */ lhz r0, 0(r27) +/* 8036E460 0036B3C0 54 00 00 2A */ rlwinm r0, r0, 0, 0, 0x15 +/* 8036E464 0036B3C4 7C 00 83 78 */ or r0, r0, r16 +/* 8036E468 0036B3C8 B0 1B 00 00 */ sth r0, 0(r27) +/* 8036E46C 0036B3CC A0 1C 00 00 */ lhz r0, 0(r28) +/* 8036E470 0036B3D0 54 00 06 DE */ rlwinm r0, r0, 0, 0x1b, 0xf +/* 8036E474 0036B3D4 7C 00 BB 78 */ or r0, r0, r23 +/* 8036E478 0036B3D8 B0 1C 00 00 */ sth r0, 0(r28) +/* 8036E47C 0036B3DC A0 1E 00 00 */ lhz r0, 0(r30) +/* 8036E480 0036B3E0 60 00 80 00 */ ori r0, r0, 0x8000 +/* 8036E484 0036B3E4 B0 1E 00 00 */ sth r0, 0(r30) +/* 8036E488 0036B3E8 A0 1E 00 00 */ lhz r0, 0(r30) +/* 8036E48C 0036B3EC 54 00 00 2A */ rlwinm r0, r0, 0, 0, 0x15 +/* 8036E490 0036B3F0 60 00 00 00 */ nop +/* 8036E494 0036B3F4 B0 1E 00 00 */ sth r0, 0(r30) +/* 8036E498 0036B3F8 A0 1D 00 00 */ lhz r0, 0(r29) +/* 8036E49C 0036B3FC 54 00 06 DE */ rlwinm r0, r0, 0, 0x1b, 0xf +/* 8036E4A0 0036B400 60 00 00 20 */ ori r0, r0, 0x20 +/* 8036E4A4 0036B404 B0 1D 00 00 */ sth r0, 0(r29) +lbl_8036E4A8: +/* 8036E4A8 0036B408 A0 1F 00 00 */ lhz r0, 0(r31) +/* 8036E4AC 0036B40C 54 00 05 AD */ rlwinm. r0, r0, 0, 0x16, 0x16 +/* 8036E4B0 0036B410 40 82 FF F8 */ bne lbl_8036E4A8 +/* 8036E4B4 0036B414 A0 7F 00 00 */ lhz r3, 0(r31) +/* 8036E4B8 0036B418 38 00 FF 77 */ li r0, -137 +/* 8036E4BC 0036B41C 7C 60 00 38 */ and r0, r3, r0 +/* 8036E4C0 0036B420 60 00 00 20 */ ori r0, r0, 0x20 +/* 8036E4C4 0036B424 B0 1F 00 00 */ sth r0, 0(r31) +/* 8036E4C8 0036B428 48 00 13 45 */ bl PPCSync +/* 8036E4CC 0036B42C 80 78 00 00 */ lwz r3, 0(r24) +/* 8036E4D0 0036B430 80 16 00 00 */ lwz r0, 0(r22) +/* 8036E4D4 0036B434 7C 03 00 40 */ cmplw r3, r0 +/* 8036E4D8 0036B438 40 82 00 A8 */ bne lbl_8036E580 +/* 8036E4DC 0036B43C A0 19 00 00 */ lhz r0, 0(r25) +/* 8036E4E0 0036B440 54 03 00 2A */ rlwinm r3, r0, 0, 0, 0x15 +/* 8036E4E4 0036B444 80 01 02 3C */ lwz r0, 0x23c(r1) +/* 8036E4E8 0036B448 7C 60 03 78 */ or r0, r3, r0 +/* 8036E4EC 0036B44C B0 19 00 00 */ sth r0, 0(r25) +/* 8036E4F0 0036B450 A0 1A 00 00 */ lhz r0, 0(r26) +/* 8036E4F4 0036B454 54 03 06 DE */ rlwinm r3, r0, 0, 0x1b, 0xf +/* 8036E4F8 0036B458 80 01 02 4C */ lwz r0, 0x24c(r1) +/* 8036E4FC 0036B45C 7C 60 03 78 */ or r0, r3, r0 +/* 8036E500 0036B460 B0 1A 00 00 */ sth r0, 0(r26) +/* 8036E504 0036B464 A0 1B 00 00 */ lhz r0, 0(r27) +/* 8036E508 0036B468 54 00 00 2A */ rlwinm r0, r0, 0, 0, 0x15 +/* 8036E50C 0036B46C 7C 00 8B 78 */ or r0, r0, r17 +/* 8036E510 0036B470 B0 1B 00 00 */ sth r0, 0(r27) +/* 8036E514 0036B474 A0 1C 00 00 */ lhz r0, 0(r28) +/* 8036E518 0036B478 54 00 06 DE */ rlwinm r0, r0, 0, 0x1b, 0xf +/* 8036E51C 0036B47C 7C 00 93 78 */ or r0, r0, r18 +/* 8036E520 0036B480 B0 1C 00 00 */ sth r0, 0(r28) +/* 8036E524 0036B484 A0 1E 00 00 */ lhz r0, 0(r30) +/* 8036E528 0036B488 54 00 04 5E */ rlwinm r0, r0, 0, 0x11, 0xf +/* 8036E52C 0036B48C B0 1E 00 00 */ sth r0, 0(r30) +/* 8036E530 0036B490 A0 1E 00 00 */ lhz r0, 0(r30) +/* 8036E534 0036B494 54 00 00 2A */ rlwinm r0, r0, 0, 0, 0x15 +/* 8036E538 0036B498 60 00 00 00 */ nop +/* 8036E53C 0036B49C B0 1E 00 00 */ sth r0, 0(r30) +/* 8036E540 0036B4A0 A0 1D 00 00 */ lhz r0, 0(r29) +/* 8036E544 0036B4A4 54 00 06 DE */ rlwinm r0, r0, 0, 0x1b, 0xf +/* 8036E548 0036B4A8 60 00 00 20 */ ori r0, r0, 0x20 +/* 8036E54C 0036B4AC B0 1D 00 00 */ sth r0, 0(r29) +lbl_8036E550: +/* 8036E550 0036B4B0 A0 1F 00 00 */ lhz r0, 0(r31) +/* 8036E554 0036B4B4 54 00 05 AD */ rlwinm. r0, r0, 0, 0x16, 0x16 +/* 8036E558 0036B4B8 40 82 FF F8 */ bne lbl_8036E550 +/* 8036E55C 0036B4BC A0 9F 00 00 */ lhz r4, 0(r31) +/* 8036E560 0036B4C0 38 60 FF 77 */ li r3, -137 +/* 8036E564 0036B4C4 3C 00 00 20 */ lis r0, 0x20 +/* 8036E568 0036B4C8 7C 83 18 38 */ and r3, r4, r3 +/* 8036E56C 0036B4CC 60 63 00 20 */ ori r3, r3, 0x20 +/* 8036E570 0036B4D0 B0 7F 00 00 */ sth r3, 0(r31) +/* 8036E574 0036B4D4 3E 73 00 20 */ addis r19, r19, 0x20 +/* 8036E578 0036B4D8 90 0D AB 44 */ stw r0, lbl_805A9704@sda21(r13) +/* 8036E57C 0036B4DC 48 00 0E 78 */ b lbl_8036F3F4 +lbl_8036E580: +/* 8036E580 0036B4E0 A0 19 00 00 */ lhz r0, 0(r25) +/* 8036E584 0036B4E4 54 03 00 2A */ rlwinm r3, r0, 0, 0, 0x15 +/* 8036E588 0036B4E8 80 01 02 38 */ lwz r0, 0x238(r1) +/* 8036E58C 0036B4EC 7C 60 03 78 */ or r0, r3, r0 +/* 8036E590 0036B4F0 B0 19 00 00 */ sth r0, 0(r25) +/* 8036E594 0036B4F4 A0 1A 00 00 */ lhz r0, 0(r26) +/* 8036E598 0036B4F8 54 00 06 DE */ rlwinm r0, r0, 0, 0x1b, 0xf +/* 8036E59C 0036B4FC 7C 00 A3 78 */ or r0, r0, r20 +/* 8036E5A0 0036B500 B0 1A 00 00 */ sth r0, 0(r26) +/* 8036E5A4 0036B504 A0 1B 00 00 */ lhz r0, 0(r27) +/* 8036E5A8 0036B508 54 00 00 2A */ rlwinm r0, r0, 0, 0, 0x15 +/* 8036E5AC 0036B50C 7C 00 73 78 */ or r0, r0, r14 +/* 8036E5B0 0036B510 B0 1B 00 00 */ sth r0, 0(r27) +/* 8036E5B4 0036B514 A0 1C 00 00 */ lhz r0, 0(r28) +/* 8036E5B8 0036B518 54 00 06 DE */ rlwinm r0, r0, 0, 0x1b, 0xf +/* 8036E5BC 0036B51C 7C 00 7B 78 */ or r0, r0, r15 +/* 8036E5C0 0036B520 B0 1C 00 00 */ sth r0, 0(r28) +/* 8036E5C4 0036B524 A0 1E 00 00 */ lhz r0, 0(r30) +/* 8036E5C8 0036B528 54 00 04 5E */ rlwinm r0, r0, 0, 0x11, 0xf +/* 8036E5CC 0036B52C B0 1E 00 00 */ sth r0, 0(r30) +/* 8036E5D0 0036B530 A0 1E 00 00 */ lhz r0, 0(r30) +/* 8036E5D4 0036B534 54 00 00 2A */ rlwinm r0, r0, 0, 0, 0x15 +/* 8036E5D8 0036B538 60 00 00 00 */ nop +/* 8036E5DC 0036B53C B0 1E 00 00 */ sth r0, 0(r30) +/* 8036E5E0 0036B540 A0 1D 00 00 */ lhz r0, 0(r29) +/* 8036E5E4 0036B544 54 00 06 DE */ rlwinm r0, r0, 0, 0x1b, 0xf +/* 8036E5E8 0036B548 60 00 00 20 */ ori r0, r0, 0x20 +/* 8036E5EC 0036B54C B0 1D 00 00 */ sth r0, 0(r29) +lbl_8036E5F0: +/* 8036E5F0 0036B550 A0 1F 00 00 */ lhz r0, 0(r31) +/* 8036E5F4 0036B554 54 00 05 AD */ rlwinm. r0, r0, 0, 0x16, 0x16 +/* 8036E5F8 0036B558 40 82 FF F8 */ bne lbl_8036E5F0 +/* 8036E5FC 0036B55C A0 7F 00 00 */ lhz r3, 0(r31) +/* 8036E600 0036B560 38 00 FF 77 */ li r0, -137 +/* 8036E604 0036B564 7C 60 00 38 */ and r0, r3, r0 +/* 8036E608 0036B568 60 00 00 20 */ ori r0, r0, 0x20 +/* 8036E60C 0036B56C B0 1F 00 00 */ sth r0, 0(r31) +/* 8036E610 0036B570 A0 19 00 00 */ lhz r0, 0(r25) +/* 8036E614 0036B574 54 03 00 2A */ rlwinm r3, r0, 0, 0, 0x15 +/* 8036E618 0036B578 80 01 02 44 */ lwz r0, 0x244(r1) +/* 8036E61C 0036B57C 7C 60 03 78 */ or r0, r3, r0 +/* 8036E620 0036B580 B0 19 00 00 */ sth r0, 0(r25) +/* 8036E624 0036B584 A0 1A 00 00 */ lhz r0, 0(r26) +/* 8036E628 0036B588 54 03 06 DE */ rlwinm r3, r0, 0, 0x1b, 0xf +/* 8036E62C 0036B58C 80 01 02 50 */ lwz r0, 0x250(r1) +/* 8036E630 0036B590 7C 60 03 78 */ or r0, r3, r0 +/* 8036E634 0036B594 B0 1A 00 00 */ sth r0, 0(r26) +/* 8036E638 0036B598 A0 1B 00 00 */ lhz r0, 0(r27) +/* 8036E63C 0036B59C 54 00 00 2A */ rlwinm r0, r0, 0, 0, 0x15 +/* 8036E640 0036B5A0 7C 00 8B 78 */ or r0, r0, r17 +/* 8036E644 0036B5A4 B0 1B 00 00 */ sth r0, 0(r27) +/* 8036E648 0036B5A8 A0 1C 00 00 */ lhz r0, 0(r28) +/* 8036E64C 0036B5AC 54 00 06 DE */ rlwinm r0, r0, 0, 0x1b, 0xf +/* 8036E650 0036B5B0 7C 00 93 78 */ or r0, r0, r18 +/* 8036E654 0036B5B4 B0 1C 00 00 */ sth r0, 0(r28) +/* 8036E658 0036B5B8 A0 1E 00 00 */ lhz r0, 0(r30) +/* 8036E65C 0036B5BC 54 00 04 5E */ rlwinm r0, r0, 0, 0x11, 0xf +/* 8036E660 0036B5C0 B0 1E 00 00 */ sth r0, 0(r30) +/* 8036E664 0036B5C4 A0 1E 00 00 */ lhz r0, 0(r30) +/* 8036E668 0036B5C8 54 00 00 2A */ rlwinm r0, r0, 0, 0, 0x15 +/* 8036E66C 0036B5CC 60 00 00 00 */ nop +/* 8036E670 0036B5D0 B0 1E 00 00 */ sth r0, 0(r30) +/* 8036E674 0036B5D4 A0 1D 00 00 */ lhz r0, 0(r29) +/* 8036E678 0036B5D8 54 00 06 DE */ rlwinm r0, r0, 0, 0x1b, 0xf +/* 8036E67C 0036B5DC 60 00 00 20 */ ori r0, r0, 0x20 +/* 8036E680 0036B5E0 B0 1D 00 00 */ sth r0, 0(r29) +lbl_8036E684: +/* 8036E684 0036B5E4 A0 1F 00 00 */ lhz r0, 0(r31) +/* 8036E688 0036B5E8 54 00 05 AD */ rlwinm. r0, r0, 0, 0x16, 0x16 +/* 8036E68C 0036B5EC 40 82 FF F8 */ bne lbl_8036E684 +/* 8036E690 0036B5F0 A0 1F 00 00 */ lhz r0, 0(r31) +/* 8036E694 0036B5F4 38 80 FF 77 */ li r4, -137 +/* 8036E698 0036B5F8 38 78 00 00 */ addi r3, r24, 0 +/* 8036E69C 0036B5FC 7C 00 20 38 */ and r0, r0, r4 +/* 8036E6A0 0036B600 60 00 00 20 */ ori r0, r0, 0x20 +/* 8036E6A4 0036B604 B0 1F 00 00 */ sth r0, 0(r31) +/* 8036E6A8 0036B608 38 80 00 00 */ li r4, 0 +/* 8036E6AC 0036B60C 38 A0 00 20 */ li r5, 0x20 +/* 8036E6B0 0036B610 4B C9 4C F9 */ bl memset +/* 8036E6B4 0036B614 38 78 00 00 */ addi r3, r24, 0 +/* 8036E6B8 0036B618 38 80 00 20 */ li r4, 0x20 +/* 8036E6BC 0036B61C 48 01 03 F5 */ bl DCFlushRange +/* 8036E6C0 0036B620 A0 19 00 00 */ lhz r0, 0(r25) +/* 8036E6C4 0036B624 54 03 00 2A */ rlwinm r3, r0, 0, 0, 0x15 +/* 8036E6C8 0036B628 80 01 02 40 */ lwz r0, 0x240(r1) +/* 8036E6CC 0036B62C 7C 60 03 78 */ or r0, r3, r0 +/* 8036E6D0 0036B630 B0 19 00 00 */ sth r0, 0(r25) +/* 8036E6D4 0036B634 A0 1A 00 00 */ lhz r0, 0(r26) +/* 8036E6D8 0036B638 54 03 06 DE */ rlwinm r3, r0, 0, 0x1b, 0xf +/* 8036E6DC 0036B63C 80 01 02 54 */ lwz r0, 0x254(r1) +/* 8036E6E0 0036B640 7C 60 03 78 */ or r0, r3, r0 +/* 8036E6E4 0036B644 B0 1A 00 00 */ sth r0, 0(r26) +/* 8036E6E8 0036B648 A0 1B 00 00 */ lhz r0, 0(r27) +/* 8036E6EC 0036B64C 54 00 00 2A */ rlwinm r0, r0, 0, 0, 0x15 +/* 8036E6F0 0036B650 7C 00 73 78 */ or r0, r0, r14 +/* 8036E6F4 0036B654 B0 1B 00 00 */ sth r0, 0(r27) +/* 8036E6F8 0036B658 A0 1C 00 00 */ lhz r0, 0(r28) +/* 8036E6FC 0036B65C 54 00 06 DE */ rlwinm r0, r0, 0, 0x1b, 0xf +/* 8036E700 0036B660 7C 00 7B 78 */ or r0, r0, r15 +/* 8036E704 0036B664 B0 1C 00 00 */ sth r0, 0(r28) +/* 8036E708 0036B668 A0 1E 00 00 */ lhz r0, 0(r30) +/* 8036E70C 0036B66C 60 00 80 00 */ ori r0, r0, 0x8000 +/* 8036E710 0036B670 B0 1E 00 00 */ sth r0, 0(r30) +/* 8036E714 0036B674 A0 1E 00 00 */ lhz r0, 0(r30) +/* 8036E718 0036B678 54 00 00 2A */ rlwinm r0, r0, 0, 0, 0x15 +/* 8036E71C 0036B67C 60 00 00 00 */ nop +/* 8036E720 0036B680 B0 1E 00 00 */ sth r0, 0(r30) +/* 8036E724 0036B684 A0 1D 00 00 */ lhz r0, 0(r29) +/* 8036E728 0036B688 54 00 06 DE */ rlwinm r0, r0, 0, 0x1b, 0xf +/* 8036E72C 0036B68C 60 00 00 20 */ ori r0, r0, 0x20 +/* 8036E730 0036B690 B0 1D 00 00 */ sth r0, 0(r29) +lbl_8036E734: +/* 8036E734 0036B694 A0 1F 00 00 */ lhz r0, 0(r31) +/* 8036E738 0036B698 54 00 05 AD */ rlwinm. r0, r0, 0, 0x16, 0x16 +/* 8036E73C 0036B69C 40 82 FF F8 */ bne lbl_8036E734 +/* 8036E740 0036B6A0 A0 7F 00 00 */ lhz r3, 0(r31) +/* 8036E744 0036B6A4 38 00 FF 77 */ li r0, -137 +/* 8036E748 0036B6A8 7C 60 00 38 */ and r0, r3, r0 +/* 8036E74C 0036B6AC 60 00 00 20 */ ori r0, r0, 0x20 +/* 8036E750 0036B6B0 B0 1F 00 00 */ sth r0, 0(r31) +/* 8036E754 0036B6B4 48 00 10 B9 */ bl PPCSync +/* 8036E758 0036B6B8 80 78 00 00 */ lwz r3, 0(r24) +/* 8036E75C 0036B6BC 80 16 00 00 */ lwz r0, 0(r22) +/* 8036E760 0036B6C0 7C 03 00 40 */ cmplw r3, r0 +/* 8036E764 0036B6C4 40 82 01 48 */ bne lbl_8036E8AC +/* 8036E768 0036B6C8 A0 19 00 00 */ lhz r0, 0(r25) +/* 8036E76C 0036B6CC 54 03 00 2A */ rlwinm r3, r0, 0, 0, 0x15 +/* 8036E770 0036B6D0 80 01 02 3C */ lwz r0, 0x23c(r1) +/* 8036E774 0036B6D4 7C 60 03 78 */ or r0, r3, r0 +/* 8036E778 0036B6D8 B0 19 00 00 */ sth r0, 0(r25) +/* 8036E77C 0036B6DC A0 1A 00 00 */ lhz r0, 0(r26) +/* 8036E780 0036B6E0 54 03 06 DE */ rlwinm r3, r0, 0, 0x1b, 0xf +/* 8036E784 0036B6E4 80 01 02 4C */ lwz r0, 0x24c(r1) +/* 8036E788 0036B6E8 7C 60 03 78 */ or r0, r3, r0 +/* 8036E78C 0036B6EC B0 1A 00 00 */ sth r0, 0(r26) +/* 8036E790 0036B6F0 A0 1B 00 00 */ lhz r0, 0(r27) +/* 8036E794 0036B6F4 54 00 00 2A */ rlwinm r0, r0, 0, 0, 0x15 +/* 8036E798 0036B6F8 7C 00 8B 78 */ or r0, r0, r17 +/* 8036E79C 0036B6FC B0 1B 00 00 */ sth r0, 0(r27) +/* 8036E7A0 0036B700 A0 1C 00 00 */ lhz r0, 0(r28) +/* 8036E7A4 0036B704 54 00 06 DE */ rlwinm r0, r0, 0, 0x1b, 0xf +/* 8036E7A8 0036B708 7C 00 93 78 */ or r0, r0, r18 +/* 8036E7AC 0036B70C B0 1C 00 00 */ sth r0, 0(r28) +/* 8036E7B0 0036B710 A0 1E 00 00 */ lhz r0, 0(r30) +/* 8036E7B4 0036B714 54 00 04 5E */ rlwinm r0, r0, 0, 0x11, 0xf +/* 8036E7B8 0036B718 B0 1E 00 00 */ sth r0, 0(r30) +/* 8036E7BC 0036B71C A0 1E 00 00 */ lhz r0, 0(r30) +/* 8036E7C0 0036B720 54 00 00 2A */ rlwinm r0, r0, 0, 0, 0x15 +/* 8036E7C4 0036B724 60 00 00 00 */ nop +/* 8036E7C8 0036B728 B0 1E 00 00 */ sth r0, 0(r30) +/* 8036E7CC 0036B72C A0 1D 00 00 */ lhz r0, 0(r29) +/* 8036E7D0 0036B730 54 00 06 DE */ rlwinm r0, r0, 0, 0x1b, 0xf +/* 8036E7D4 0036B734 60 00 00 20 */ ori r0, r0, 0x20 +/* 8036E7D8 0036B738 B0 1D 00 00 */ sth r0, 0(r29) +lbl_8036E7DC: +/* 8036E7DC 0036B73C A0 1F 00 00 */ lhz r0, 0(r31) +/* 8036E7E0 0036B740 54 00 05 AD */ rlwinm. r0, r0, 0, 0x16, 0x16 +/* 8036E7E4 0036B744 40 82 FF F8 */ bne lbl_8036E7DC +/* 8036E7E8 0036B748 A0 7F 00 00 */ lhz r3, 0(r31) +/* 8036E7EC 0036B74C 38 00 FF 77 */ li r0, -137 +/* 8036E7F0 0036B750 7C 60 00 38 */ and r0, r3, r0 +/* 8036E7F4 0036B754 60 00 00 20 */ ori r0, r0, 0x20 +/* 8036E7F8 0036B758 B0 1F 00 00 */ sth r0, 0(r31) +/* 8036E7FC 0036B75C A0 19 00 00 */ lhz r0, 0(r25) +/* 8036E800 0036B760 54 03 00 2A */ rlwinm r3, r0, 0, 0, 0x15 +/* 8036E804 0036B764 80 01 02 34 */ lwz r0, 0x234(r1) +/* 8036E808 0036B768 7C 60 03 78 */ or r0, r3, r0 +/* 8036E80C 0036B76C B0 19 00 00 */ sth r0, 0(r25) +/* 8036E810 0036B770 A0 1A 00 00 */ lhz r0, 0(r26) +/* 8036E814 0036B774 54 03 06 DE */ rlwinm r3, r0, 0, 0x1b, 0xf +/* 8036E818 0036B778 80 01 02 58 */ lwz r0, 0x258(r1) +/* 8036E81C 0036B77C 7C 60 03 78 */ or r0, r3, r0 +/* 8036E820 0036B780 B0 1A 00 00 */ sth r0, 0(r26) +/* 8036E824 0036B784 A0 1B 00 00 */ lhz r0, 0(r27) +/* 8036E828 0036B788 54 00 00 2A */ rlwinm r0, r0, 0, 0, 0x15 +/* 8036E82C 0036B78C 7C 00 83 78 */ or r0, r0, r16 +/* 8036E830 0036B790 B0 1B 00 00 */ sth r0, 0(r27) +/* 8036E834 0036B794 A0 1C 00 00 */ lhz r0, 0(r28) +/* 8036E838 0036B798 54 00 06 DE */ rlwinm r0, r0, 0, 0x1b, 0xf +/* 8036E83C 0036B79C 7C 00 BB 78 */ or r0, r0, r23 +/* 8036E840 0036B7A0 B0 1C 00 00 */ sth r0, 0(r28) +/* 8036E844 0036B7A4 A0 1E 00 00 */ lhz r0, 0(r30) +/* 8036E848 0036B7A8 54 00 04 5E */ rlwinm r0, r0, 0, 0x11, 0xf +/* 8036E84C 0036B7AC B0 1E 00 00 */ sth r0, 0(r30) +/* 8036E850 0036B7B0 A0 1E 00 00 */ lhz r0, 0(r30) +/* 8036E854 0036B7B4 54 00 00 2A */ rlwinm r0, r0, 0, 0, 0x15 +/* 8036E858 0036B7B8 60 00 00 00 */ nop +/* 8036E85C 0036B7BC B0 1E 00 00 */ sth r0, 0(r30) +/* 8036E860 0036B7C0 A0 1D 00 00 */ lhz r0, 0(r29) +/* 8036E864 0036B7C4 54 00 06 DE */ rlwinm r0, r0, 0, 0x1b, 0xf +/* 8036E868 0036B7C8 60 00 00 20 */ ori r0, r0, 0x20 +/* 8036E86C 0036B7CC B0 1D 00 00 */ sth r0, 0(r29) +lbl_8036E870: +/* 8036E870 0036B7D0 A0 1F 00 00 */ lhz r0, 0(r31) +/* 8036E874 0036B7D4 54 00 05 AD */ rlwinm. r0, r0, 0, 0x16, 0x16 +/* 8036E878 0036B7D8 40 82 FF F8 */ bne lbl_8036E870 +/* 8036E87C 0036B7DC A0 9F 00 00 */ lhz r4, 0(r31) +/* 8036E880 0036B7E0 38 00 FF 77 */ li r0, -137 +/* 8036E884 0036B7E4 3C 60 00 40 */ lis r3, 0x40 +/* 8036E888 0036B7E8 7C 80 00 38 */ and r0, r4, r0 +/* 8036E88C 0036B7EC 60 00 00 20 */ ori r0, r0, 0x20 +/* 8036E890 0036B7F0 B0 1F 00 00 */ sth r0, 0(r31) +/* 8036E894 0036B7F4 3E 73 00 40 */ addis r19, r19, 0x40 +/* 8036E898 0036B7F8 A0 01 02 70 */ lhz r0, 0x270(r1) +/* 8036E89C 0036B7FC 90 6D AB 44 */ stw r3, lbl_805A9704@sda21(r13) +/* 8036E8A0 0036B800 60 00 00 08 */ ori r0, r0, 8 +/* 8036E8A4 0036B804 B0 01 02 70 */ sth r0, 0x270(r1) +/* 8036E8A8 0036B808 48 00 0B 4C */ b lbl_8036F3F4 +lbl_8036E8AC: +/* 8036E8AC 0036B80C A0 19 00 00 */ lhz r0, 0(r25) +/* 8036E8B0 0036B810 54 03 00 2A */ rlwinm r3, r0, 0, 0, 0x15 +/* 8036E8B4 0036B814 80 01 02 38 */ lwz r0, 0x238(r1) +/* 8036E8B8 0036B818 7C 60 03 78 */ or r0, r3, r0 +/* 8036E8BC 0036B81C B0 19 00 00 */ sth r0, 0(r25) +/* 8036E8C0 0036B820 A0 1A 00 00 */ lhz r0, 0(r26) +/* 8036E8C4 0036B824 54 00 06 DE */ rlwinm r0, r0, 0, 0x1b, 0xf +/* 8036E8C8 0036B828 7C 00 A3 78 */ or r0, r0, r20 +/* 8036E8CC 0036B82C B0 1A 00 00 */ sth r0, 0(r26) +/* 8036E8D0 0036B830 A0 1B 00 00 */ lhz r0, 0(r27) +/* 8036E8D4 0036B834 54 03 00 2A */ rlwinm r3, r0, 0, 0, 0x15 +/* 8036E8D8 0036B838 80 01 02 30 */ lwz r0, 0x230(r1) +/* 8036E8DC 0036B83C 7C 60 03 78 */ or r0, r3, r0 +/* 8036E8E0 0036B840 B0 1B 00 00 */ sth r0, 0(r27) +/* 8036E8E4 0036B844 A0 1C 00 00 */ lhz r0, 0(r28) +/* 8036E8E8 0036B848 54 03 06 DE */ rlwinm r3, r0, 0, 0x1b, 0xf +/* 8036E8EC 0036B84C 80 01 02 64 */ lwz r0, 0x264(r1) +/* 8036E8F0 0036B850 7C 60 03 78 */ or r0, r3, r0 +/* 8036E8F4 0036B854 B0 1C 00 00 */ sth r0, 0(r28) +/* 8036E8F8 0036B858 A0 1E 00 00 */ lhz r0, 0(r30) +/* 8036E8FC 0036B85C 54 00 04 5E */ rlwinm r0, r0, 0, 0x11, 0xf +/* 8036E900 0036B860 B0 1E 00 00 */ sth r0, 0(r30) +/* 8036E904 0036B864 A0 1E 00 00 */ lhz r0, 0(r30) +/* 8036E908 0036B868 54 00 00 2A */ rlwinm r0, r0, 0, 0, 0x15 +/* 8036E90C 0036B86C 60 00 00 00 */ nop +/* 8036E910 0036B870 B0 1E 00 00 */ sth r0, 0(r30) +/* 8036E914 0036B874 A0 1D 00 00 */ lhz r0, 0(r29) +/* 8036E918 0036B878 54 00 06 DE */ rlwinm r0, r0, 0, 0x1b, 0xf +/* 8036E91C 0036B87C 60 00 00 20 */ ori r0, r0, 0x20 +/* 8036E920 0036B880 B0 1D 00 00 */ sth r0, 0(r29) +lbl_8036E924: +/* 8036E924 0036B884 A0 1F 00 00 */ lhz r0, 0(r31) +/* 8036E928 0036B888 54 00 05 AD */ rlwinm. r0, r0, 0, 0x16, 0x16 +/* 8036E92C 0036B88C 40 82 FF F8 */ bne lbl_8036E924 +/* 8036E930 0036B890 A0 7F 00 00 */ lhz r3, 0(r31) +/* 8036E934 0036B894 38 00 FF 77 */ li r0, -137 +/* 8036E938 0036B898 7C 60 00 38 */ and r0, r3, r0 +/* 8036E93C 0036B89C 60 00 00 20 */ ori r0, r0, 0x20 +/* 8036E940 0036B8A0 B0 1F 00 00 */ sth r0, 0(r31) +/* 8036E944 0036B8A4 A0 19 00 00 */ lhz r0, 0(r25) +/* 8036E948 0036B8A8 54 03 00 2A */ rlwinm r3, r0, 0, 0, 0x15 +/* 8036E94C 0036B8AC 80 01 02 44 */ lwz r0, 0x244(r1) +/* 8036E950 0036B8B0 7C 60 03 78 */ or r0, r3, r0 +/* 8036E954 0036B8B4 B0 19 00 00 */ sth r0, 0(r25) +/* 8036E958 0036B8B8 A0 1A 00 00 */ lhz r0, 0(r26) +/* 8036E95C 0036B8BC 54 03 06 DE */ rlwinm r3, r0, 0, 0x1b, 0xf +/* 8036E960 0036B8C0 80 01 02 50 */ lwz r0, 0x250(r1) +/* 8036E964 0036B8C4 7C 60 03 78 */ or r0, r3, r0 +/* 8036E968 0036B8C8 B0 1A 00 00 */ sth r0, 0(r26) +/* 8036E96C 0036B8CC A0 1B 00 00 */ lhz r0, 0(r27) +/* 8036E970 0036B8D0 54 00 00 2A */ rlwinm r0, r0, 0, 0, 0x15 +/* 8036E974 0036B8D4 7C 00 8B 78 */ or r0, r0, r17 +/* 8036E978 0036B8D8 B0 1B 00 00 */ sth r0, 0(r27) +/* 8036E97C 0036B8DC A0 1C 00 00 */ lhz r0, 0(r28) +/* 8036E980 0036B8E0 54 00 06 DE */ rlwinm r0, r0, 0, 0x1b, 0xf +/* 8036E984 0036B8E4 7C 00 93 78 */ or r0, r0, r18 +/* 8036E988 0036B8E8 B0 1C 00 00 */ sth r0, 0(r28) +/* 8036E98C 0036B8EC A0 1E 00 00 */ lhz r0, 0(r30) +/* 8036E990 0036B8F0 54 00 04 5E */ rlwinm r0, r0, 0, 0x11, 0xf +/* 8036E994 0036B8F4 B0 1E 00 00 */ sth r0, 0(r30) +/* 8036E998 0036B8F8 A0 1E 00 00 */ lhz r0, 0(r30) +/* 8036E99C 0036B8FC 54 00 00 2A */ rlwinm r0, r0, 0, 0, 0x15 +/* 8036E9A0 0036B900 60 00 00 00 */ nop +/* 8036E9A4 0036B904 B0 1E 00 00 */ sth r0, 0(r30) +/* 8036E9A8 0036B908 A0 1D 00 00 */ lhz r0, 0(r29) +/* 8036E9AC 0036B90C 54 00 06 DE */ rlwinm r0, r0, 0, 0x1b, 0xf +/* 8036E9B0 0036B910 60 00 00 20 */ ori r0, r0, 0x20 +/* 8036E9B4 0036B914 B0 1D 00 00 */ sth r0, 0(r29) +lbl_8036E9B8: +/* 8036E9B8 0036B918 A0 1F 00 00 */ lhz r0, 0(r31) +/* 8036E9BC 0036B91C 54 00 05 AD */ rlwinm. r0, r0, 0, 0x16, 0x16 +/* 8036E9C0 0036B920 40 82 FF F8 */ bne lbl_8036E9B8 +/* 8036E9C4 0036B924 A0 1F 00 00 */ lhz r0, 0(r31) +/* 8036E9C8 0036B928 38 80 FF 77 */ li r4, -137 +/* 8036E9CC 0036B92C 38 78 00 00 */ addi r3, r24, 0 +/* 8036E9D0 0036B930 7C 00 20 38 */ and r0, r0, r4 +/* 8036E9D4 0036B934 60 00 00 20 */ ori r0, r0, 0x20 +/* 8036E9D8 0036B938 B0 1F 00 00 */ sth r0, 0(r31) +/* 8036E9DC 0036B93C 38 80 00 00 */ li r4, 0 +/* 8036E9E0 0036B940 38 A0 00 20 */ li r5, 0x20 +/* 8036E9E4 0036B944 4B C9 49 C5 */ bl memset +/* 8036E9E8 0036B948 38 78 00 00 */ addi r3, r24, 0 +/* 8036E9EC 0036B94C 38 80 00 20 */ li r4, 0x20 +/* 8036E9F0 0036B950 48 01 00 C1 */ bl DCFlushRange +/* 8036E9F4 0036B954 A0 19 00 00 */ lhz r0, 0(r25) +/* 8036E9F8 0036B958 54 03 00 2A */ rlwinm r3, r0, 0, 0, 0x15 +/* 8036E9FC 0036B95C 80 01 02 40 */ lwz r0, 0x240(r1) +/* 8036EA00 0036B960 7C 60 03 78 */ or r0, r3, r0 +/* 8036EA04 0036B964 B0 19 00 00 */ sth r0, 0(r25) +/* 8036EA08 0036B968 A0 1A 00 00 */ lhz r0, 0(r26) +/* 8036EA0C 0036B96C 54 03 06 DE */ rlwinm r3, r0, 0, 0x1b, 0xf +/* 8036EA10 0036B970 80 01 02 54 */ lwz r0, 0x254(r1) +/* 8036EA14 0036B974 7C 60 03 78 */ or r0, r3, r0 +/* 8036EA18 0036B978 B0 1A 00 00 */ sth r0, 0(r26) +/* 8036EA1C 0036B97C A0 1B 00 00 */ lhz r0, 0(r27) +/* 8036EA20 0036B980 54 03 00 2A */ rlwinm r3, r0, 0, 0, 0x15 +/* 8036EA24 0036B984 80 01 02 30 */ lwz r0, 0x230(r1) +/* 8036EA28 0036B988 7C 60 03 78 */ or r0, r3, r0 +/* 8036EA2C 0036B98C B0 1B 00 00 */ sth r0, 0(r27) +/* 8036EA30 0036B990 A0 1C 00 00 */ lhz r0, 0(r28) +/* 8036EA34 0036B994 54 03 06 DE */ rlwinm r3, r0, 0, 0x1b, 0xf +/* 8036EA38 0036B998 80 01 02 64 */ lwz r0, 0x264(r1) +/* 8036EA3C 0036B99C 7C 60 03 78 */ or r0, r3, r0 +/* 8036EA40 0036B9A0 B0 1C 00 00 */ sth r0, 0(r28) +/* 8036EA44 0036B9A4 A0 1E 00 00 */ lhz r0, 0(r30) +/* 8036EA48 0036B9A8 60 00 80 00 */ ori r0, r0, 0x8000 +/* 8036EA4C 0036B9AC B0 1E 00 00 */ sth r0, 0(r30) +/* 8036EA50 0036B9B0 A0 1E 00 00 */ lhz r0, 0(r30) +/* 8036EA54 0036B9B4 54 00 00 2A */ rlwinm r0, r0, 0, 0, 0x15 +/* 8036EA58 0036B9B8 60 00 00 00 */ nop +/* 8036EA5C 0036B9BC B0 1E 00 00 */ sth r0, 0(r30) +/* 8036EA60 0036B9C0 A0 1D 00 00 */ lhz r0, 0(r29) +/* 8036EA64 0036B9C4 54 00 06 DE */ rlwinm r0, r0, 0, 0x1b, 0xf +/* 8036EA68 0036B9C8 60 00 00 20 */ ori r0, r0, 0x20 +/* 8036EA6C 0036B9CC B0 1D 00 00 */ sth r0, 0(r29) +lbl_8036EA70: +/* 8036EA70 0036B9D0 A0 1F 00 00 */ lhz r0, 0(r31) +/* 8036EA74 0036B9D4 54 00 05 AD */ rlwinm. r0, r0, 0, 0x16, 0x16 +/* 8036EA78 0036B9D8 40 82 FF F8 */ bne lbl_8036EA70 +/* 8036EA7C 0036B9DC A0 7F 00 00 */ lhz r3, 0(r31) +/* 8036EA80 0036B9E0 38 00 FF 77 */ li r0, -137 +/* 8036EA84 0036B9E4 7C 60 00 38 */ and r0, r3, r0 +/* 8036EA88 0036B9E8 60 00 00 20 */ ori r0, r0, 0x20 +/* 8036EA8C 0036B9EC B0 1F 00 00 */ sth r0, 0(r31) +/* 8036EA90 0036B9F0 48 00 0D 7D */ bl PPCSync +/* 8036EA94 0036B9F4 80 78 00 00 */ lwz r3, 0(r24) +/* 8036EA98 0036B9F8 80 16 00 00 */ lwz r0, 0(r22) +/* 8036EA9C 0036B9FC 7C 03 00 40 */ cmplw r3, r0 +/* 8036EAA0 0036BA00 40 82 01 DC */ bne lbl_8036EC7C +/* 8036EAA4 0036BA04 A0 19 00 00 */ lhz r0, 0(r25) +/* 8036EAA8 0036BA08 54 03 00 2A */ rlwinm r3, r0, 0, 0, 0x15 +/* 8036EAAC 0036BA0C 80 01 02 3C */ lwz r0, 0x23c(r1) +/* 8036EAB0 0036BA10 7C 60 03 78 */ or r0, r3, r0 +/* 8036EAB4 0036BA14 B0 19 00 00 */ sth r0, 0(r25) +/* 8036EAB8 0036BA18 A0 1A 00 00 */ lhz r0, 0(r26) +/* 8036EABC 0036BA1C 54 03 06 DE */ rlwinm r3, r0, 0, 0x1b, 0xf +/* 8036EAC0 0036BA20 80 01 02 4C */ lwz r0, 0x24c(r1) +/* 8036EAC4 0036BA24 7C 60 03 78 */ or r0, r3, r0 +/* 8036EAC8 0036BA28 B0 1A 00 00 */ sth r0, 0(r26) +/* 8036EACC 0036BA2C A0 1B 00 00 */ lhz r0, 0(r27) +/* 8036EAD0 0036BA30 54 00 00 2A */ rlwinm r0, r0, 0, 0, 0x15 +/* 8036EAD4 0036BA34 7C 00 8B 78 */ or r0, r0, r17 +/* 8036EAD8 0036BA38 B0 1B 00 00 */ sth r0, 0(r27) +/* 8036EADC 0036BA3C A0 1C 00 00 */ lhz r0, 0(r28) +/* 8036EAE0 0036BA40 54 00 06 DE */ rlwinm r0, r0, 0, 0x1b, 0xf +/* 8036EAE4 0036BA44 7C 00 93 78 */ or r0, r0, r18 +/* 8036EAE8 0036BA48 B0 1C 00 00 */ sth r0, 0(r28) +/* 8036EAEC 0036BA4C A0 1E 00 00 */ lhz r0, 0(r30) +/* 8036EAF0 0036BA50 54 00 04 5E */ rlwinm r0, r0, 0, 0x11, 0xf +/* 8036EAF4 0036BA54 B0 1E 00 00 */ sth r0, 0(r30) +/* 8036EAF8 0036BA58 A0 1E 00 00 */ lhz r0, 0(r30) +/* 8036EAFC 0036BA5C 54 00 00 2A */ rlwinm r0, r0, 0, 0, 0x15 +/* 8036EB00 0036BA60 60 00 00 00 */ nop +/* 8036EB04 0036BA64 B0 1E 00 00 */ sth r0, 0(r30) +/* 8036EB08 0036BA68 A0 1D 00 00 */ lhz r0, 0(r29) +/* 8036EB0C 0036BA6C 54 00 06 DE */ rlwinm r0, r0, 0, 0x1b, 0xf +/* 8036EB10 0036BA70 60 00 00 20 */ ori r0, r0, 0x20 +/* 8036EB14 0036BA74 B0 1D 00 00 */ sth r0, 0(r29) +lbl_8036EB18: +/* 8036EB18 0036BA78 A0 1F 00 00 */ lhz r0, 0(r31) +/* 8036EB1C 0036BA7C 54 00 05 AD */ rlwinm. r0, r0, 0, 0x16, 0x16 +/* 8036EB20 0036BA80 40 82 FF F8 */ bne lbl_8036EB18 +/* 8036EB24 0036BA84 A0 7F 00 00 */ lhz r3, 0(r31) +/* 8036EB28 0036BA88 38 00 FF 77 */ li r0, -137 +/* 8036EB2C 0036BA8C 7C 60 00 38 */ and r0, r3, r0 +/* 8036EB30 0036BA90 60 00 00 20 */ ori r0, r0, 0x20 +/* 8036EB34 0036BA94 B0 1F 00 00 */ sth r0, 0(r31) +/* 8036EB38 0036BA98 A0 19 00 00 */ lhz r0, 0(r25) +/* 8036EB3C 0036BA9C 54 03 00 2A */ rlwinm r3, r0, 0, 0, 0x15 +/* 8036EB40 0036BAA0 80 01 02 34 */ lwz r0, 0x234(r1) +/* 8036EB44 0036BAA4 7C 60 03 78 */ or r0, r3, r0 +/* 8036EB48 0036BAA8 B0 19 00 00 */ sth r0, 0(r25) +/* 8036EB4C 0036BAAC A0 1A 00 00 */ lhz r0, 0(r26) +/* 8036EB50 0036BAB0 54 03 06 DE */ rlwinm r3, r0, 0, 0x1b, 0xf +/* 8036EB54 0036BAB4 80 01 02 58 */ lwz r0, 0x258(r1) +/* 8036EB58 0036BAB8 7C 60 03 78 */ or r0, r3, r0 +/* 8036EB5C 0036BABC B0 1A 00 00 */ sth r0, 0(r26) +/* 8036EB60 0036BAC0 A0 1B 00 00 */ lhz r0, 0(r27) +/* 8036EB64 0036BAC4 54 00 00 2A */ rlwinm r0, r0, 0, 0, 0x15 +/* 8036EB68 0036BAC8 7C 00 83 78 */ or r0, r0, r16 +/* 8036EB6C 0036BACC B0 1B 00 00 */ sth r0, 0(r27) +/* 8036EB70 0036BAD0 A0 1C 00 00 */ lhz r0, 0(r28) +/* 8036EB74 0036BAD4 54 00 06 DE */ rlwinm r0, r0, 0, 0x1b, 0xf +/* 8036EB78 0036BAD8 7C 00 BB 78 */ or r0, r0, r23 +/* 8036EB7C 0036BADC B0 1C 00 00 */ sth r0, 0(r28) +/* 8036EB80 0036BAE0 A0 1E 00 00 */ lhz r0, 0(r30) +/* 8036EB84 0036BAE4 54 00 04 5E */ rlwinm r0, r0, 0, 0x11, 0xf +/* 8036EB88 0036BAE8 B0 1E 00 00 */ sth r0, 0(r30) +/* 8036EB8C 0036BAEC A0 1E 00 00 */ lhz r0, 0(r30) +/* 8036EB90 0036BAF0 54 00 00 2A */ rlwinm r0, r0, 0, 0, 0x15 +/* 8036EB94 0036BAF4 60 00 00 00 */ nop +/* 8036EB98 0036BAF8 B0 1E 00 00 */ sth r0, 0(r30) +/* 8036EB9C 0036BAFC A0 1D 00 00 */ lhz r0, 0(r29) +/* 8036EBA0 0036BB00 54 00 06 DE */ rlwinm r0, r0, 0, 0x1b, 0xf +/* 8036EBA4 0036BB04 60 00 00 20 */ ori r0, r0, 0x20 +/* 8036EBA8 0036BB08 B0 1D 00 00 */ sth r0, 0(r29) +lbl_8036EBAC: +/* 8036EBAC 0036BB0C A0 1F 00 00 */ lhz r0, 0(r31) +/* 8036EBB0 0036BB10 54 00 05 AD */ rlwinm. r0, r0, 0, 0x16, 0x16 +/* 8036EBB4 0036BB14 40 82 FF F8 */ bne lbl_8036EBAC +/* 8036EBB8 0036BB18 A0 7F 00 00 */ lhz r3, 0(r31) +/* 8036EBBC 0036BB1C 38 00 FF 77 */ li r0, -137 +/* 8036EBC0 0036BB20 7C 60 00 38 */ and r0, r3, r0 +/* 8036EBC4 0036BB24 60 00 00 20 */ ori r0, r0, 0x20 +/* 8036EBC8 0036BB28 B0 1F 00 00 */ sth r0, 0(r31) +/* 8036EBCC 0036BB2C A0 19 00 00 */ lhz r0, 0(r25) +/* 8036EBD0 0036BB30 54 03 00 2A */ rlwinm r3, r0, 0, 0, 0x15 +/* 8036EBD4 0036BB34 80 01 02 2C */ lwz r0, 0x22c(r1) +/* 8036EBD8 0036BB38 7C 60 03 78 */ or r0, r3, r0 +/* 8036EBDC 0036BB3C B0 19 00 00 */ sth r0, 0(r25) +/* 8036EBE0 0036BB40 A0 1A 00 00 */ lhz r0, 0(r26) +/* 8036EBE4 0036BB44 54 03 06 DE */ rlwinm r3, r0, 0, 0x1b, 0xf +/* 8036EBE8 0036BB48 80 01 02 5C */ lwz r0, 0x25c(r1) +/* 8036EBEC 0036BB4C 7C 60 03 78 */ or r0, r3, r0 +/* 8036EBF0 0036BB50 B0 1A 00 00 */ sth r0, 0(r26) +/* 8036EBF4 0036BB54 A0 1B 00 00 */ lhz r0, 0(r27) +/* 8036EBF8 0036BB58 54 00 00 2A */ rlwinm r0, r0, 0, 0, 0x15 +/* 8036EBFC 0036BB5C 7C 00 73 78 */ or r0, r0, r14 +/* 8036EC00 0036BB60 B0 1B 00 00 */ sth r0, 0(r27) +/* 8036EC04 0036BB64 A0 1C 00 00 */ lhz r0, 0(r28) +/* 8036EC08 0036BB68 54 00 06 DE */ rlwinm r0, r0, 0, 0x1b, 0xf +/* 8036EC0C 0036BB6C 7C 00 7B 78 */ or r0, r0, r15 +/* 8036EC10 0036BB70 B0 1C 00 00 */ sth r0, 0(r28) +/* 8036EC14 0036BB74 A0 1E 00 00 */ lhz r0, 0(r30) +/* 8036EC18 0036BB78 54 00 04 5E */ rlwinm r0, r0, 0, 0x11, 0xf +/* 8036EC1C 0036BB7C B0 1E 00 00 */ sth r0, 0(r30) +/* 8036EC20 0036BB80 A0 1E 00 00 */ lhz r0, 0(r30) +/* 8036EC24 0036BB84 54 00 00 2A */ rlwinm r0, r0, 0, 0, 0x15 +/* 8036EC28 0036BB88 60 00 00 00 */ nop +/* 8036EC2C 0036BB8C B0 1E 00 00 */ sth r0, 0(r30) +/* 8036EC30 0036BB90 A0 1D 00 00 */ lhz r0, 0(r29) +/* 8036EC34 0036BB94 54 00 06 DE */ rlwinm r0, r0, 0, 0x1b, 0xf +/* 8036EC38 0036BB98 60 00 00 20 */ ori r0, r0, 0x20 +/* 8036EC3C 0036BB9C B0 1D 00 00 */ sth r0, 0(r29) +lbl_8036EC40: +/* 8036EC40 0036BBA0 A0 1F 00 00 */ lhz r0, 0(r31) +/* 8036EC44 0036BBA4 54 00 05 AD */ rlwinm. r0, r0, 0, 0x16, 0x16 +/* 8036EC48 0036BBA8 40 82 FF F8 */ bne lbl_8036EC40 +/* 8036EC4C 0036BBAC A0 9F 00 00 */ lhz r4, 0(r31) +/* 8036EC50 0036BBB0 38 00 FF 77 */ li r0, -137 +/* 8036EC54 0036BBB4 3C 60 00 80 */ lis r3, 0x80 +/* 8036EC58 0036BBB8 7C 80 00 38 */ and r0, r4, r0 +/* 8036EC5C 0036BBBC 60 00 00 20 */ ori r0, r0, 0x20 +/* 8036EC60 0036BBC0 B0 1F 00 00 */ sth r0, 0(r31) +/* 8036EC64 0036BBC4 3E 73 00 80 */ addis r19, r19, 0x80 +/* 8036EC68 0036BBC8 A0 01 02 70 */ lhz r0, 0x270(r1) +/* 8036EC6C 0036BBCC 90 6D AB 44 */ stw r3, lbl_805A9704@sda21(r13) +/* 8036EC70 0036BBD0 60 00 00 10 */ ori r0, r0, 0x10 +/* 8036EC74 0036BBD4 B0 01 02 70 */ sth r0, 0x270(r1) +/* 8036EC78 0036BBD8 48 00 07 7C */ b lbl_8036F3F4 +lbl_8036EC7C: +/* 8036EC7C 0036BBDC A0 19 00 00 */ lhz r0, 0(r25) +/* 8036EC80 0036BBE0 54 03 00 2A */ rlwinm r3, r0, 0, 0, 0x15 +/* 8036EC84 0036BBE4 80 01 02 38 */ lwz r0, 0x238(r1) +/* 8036EC88 0036BBE8 7C 60 03 78 */ or r0, r3, r0 +/* 8036EC8C 0036BBEC B0 19 00 00 */ sth r0, 0(r25) +/* 8036EC90 0036BBF0 A0 1A 00 00 */ lhz r0, 0(r26) +/* 8036EC94 0036BBF4 54 00 06 DE */ rlwinm r0, r0, 0, 0x1b, 0xf +/* 8036EC98 0036BBF8 7C 00 A3 78 */ or r0, r0, r20 +/* 8036EC9C 0036BBFC B0 1A 00 00 */ sth r0, 0(r26) +/* 8036ECA0 0036BC00 A0 1B 00 00 */ lhz r0, 0(r27) +/* 8036ECA4 0036BC04 54 03 00 2A */ rlwinm r3, r0, 0, 0, 0x15 +/* 8036ECA8 0036BC08 80 01 02 28 */ lwz r0, 0x228(r1) +/* 8036ECAC 0036BC0C 7C 60 03 78 */ or r0, r3, r0 +/* 8036ECB0 0036BC10 B0 1B 00 00 */ sth r0, 0(r27) +/* 8036ECB4 0036BC14 A0 1C 00 00 */ lhz r0, 0(r28) +/* 8036ECB8 0036BC18 54 03 06 DE */ rlwinm r3, r0, 0, 0x1b, 0xf +/* 8036ECBC 0036BC1C 80 01 02 6C */ lwz r0, 0x26c(r1) +/* 8036ECC0 0036BC20 7C 60 03 78 */ or r0, r3, r0 +/* 8036ECC4 0036BC24 B0 1C 00 00 */ sth r0, 0(r28) +/* 8036ECC8 0036BC28 A0 1E 00 00 */ lhz r0, 0(r30) +/* 8036ECCC 0036BC2C 54 00 04 5E */ rlwinm r0, r0, 0, 0x11, 0xf +/* 8036ECD0 0036BC30 B0 1E 00 00 */ sth r0, 0(r30) +/* 8036ECD4 0036BC34 A0 1E 00 00 */ lhz r0, 0(r30) +/* 8036ECD8 0036BC38 54 00 00 2A */ rlwinm r0, r0, 0, 0, 0x15 +/* 8036ECDC 0036BC3C 60 00 00 00 */ nop +/* 8036ECE0 0036BC40 B0 1E 00 00 */ sth r0, 0(r30) +/* 8036ECE4 0036BC44 A0 1D 00 00 */ lhz r0, 0(r29) +/* 8036ECE8 0036BC48 54 00 06 DE */ rlwinm r0, r0, 0, 0x1b, 0xf +/* 8036ECEC 0036BC4C 60 00 00 20 */ ori r0, r0, 0x20 +/* 8036ECF0 0036BC50 B0 1D 00 00 */ sth r0, 0(r29) +lbl_8036ECF4: +/* 8036ECF4 0036BC54 A0 1F 00 00 */ lhz r0, 0(r31) +/* 8036ECF8 0036BC58 54 00 05 AD */ rlwinm. r0, r0, 0, 0x16, 0x16 +/* 8036ECFC 0036BC5C 40 82 FF F8 */ bne lbl_8036ECF4 +/* 8036ED00 0036BC60 A0 7F 00 00 */ lhz r3, 0(r31) +/* 8036ED04 0036BC64 38 00 FF 77 */ li r0, -137 +/* 8036ED08 0036BC68 7C 60 00 38 */ and r0, r3, r0 +/* 8036ED0C 0036BC6C 60 00 00 20 */ ori r0, r0, 0x20 +/* 8036ED10 0036BC70 B0 1F 00 00 */ sth r0, 0(r31) +/* 8036ED14 0036BC74 A0 19 00 00 */ lhz r0, 0(r25) +/* 8036ED18 0036BC78 54 03 00 2A */ rlwinm r3, r0, 0, 0, 0x15 +/* 8036ED1C 0036BC7C 80 01 02 44 */ lwz r0, 0x244(r1) +/* 8036ED20 0036BC80 7C 60 03 78 */ or r0, r3, r0 +/* 8036ED24 0036BC84 B0 19 00 00 */ sth r0, 0(r25) +/* 8036ED28 0036BC88 A0 1A 00 00 */ lhz r0, 0(r26) +/* 8036ED2C 0036BC8C 54 03 06 DE */ rlwinm r3, r0, 0, 0x1b, 0xf +/* 8036ED30 0036BC90 80 01 02 50 */ lwz r0, 0x250(r1) +/* 8036ED34 0036BC94 7C 60 03 78 */ or r0, r3, r0 +/* 8036ED38 0036BC98 B0 1A 00 00 */ sth r0, 0(r26) +/* 8036ED3C 0036BC9C A0 1B 00 00 */ lhz r0, 0(r27) +/* 8036ED40 0036BCA0 54 00 00 2A */ rlwinm r0, r0, 0, 0, 0x15 +/* 8036ED44 0036BCA4 7C 00 8B 78 */ or r0, r0, r17 +/* 8036ED48 0036BCA8 B0 1B 00 00 */ sth r0, 0(r27) +/* 8036ED4C 0036BCAC A0 1C 00 00 */ lhz r0, 0(r28) +/* 8036ED50 0036BCB0 54 00 06 DE */ rlwinm r0, r0, 0, 0x1b, 0xf +/* 8036ED54 0036BCB4 7C 00 93 78 */ or r0, r0, r18 +/* 8036ED58 0036BCB8 B0 1C 00 00 */ sth r0, 0(r28) +/* 8036ED5C 0036BCBC A0 1E 00 00 */ lhz r0, 0(r30) +/* 8036ED60 0036BCC0 54 00 04 5E */ rlwinm r0, r0, 0, 0x11, 0xf +/* 8036ED64 0036BCC4 B0 1E 00 00 */ sth r0, 0(r30) +/* 8036ED68 0036BCC8 A0 1E 00 00 */ lhz r0, 0(r30) +/* 8036ED6C 0036BCCC 54 00 00 2A */ rlwinm r0, r0, 0, 0, 0x15 +/* 8036ED70 0036BCD0 60 00 00 00 */ nop +/* 8036ED74 0036BCD4 B0 1E 00 00 */ sth r0, 0(r30) +/* 8036ED78 0036BCD8 A0 1D 00 00 */ lhz r0, 0(r29) +/* 8036ED7C 0036BCDC 54 00 06 DE */ rlwinm r0, r0, 0, 0x1b, 0xf +/* 8036ED80 0036BCE0 60 00 00 20 */ ori r0, r0, 0x20 +/* 8036ED84 0036BCE4 B0 1D 00 00 */ sth r0, 0(r29) +lbl_8036ED88: +/* 8036ED88 0036BCE8 A0 1F 00 00 */ lhz r0, 0(r31) +/* 8036ED8C 0036BCEC 54 00 05 AD */ rlwinm. r0, r0, 0, 0x16, 0x16 +/* 8036ED90 0036BCF0 40 82 FF F8 */ bne lbl_8036ED88 +/* 8036ED94 0036BCF4 A0 1F 00 00 */ lhz r0, 0(r31) +/* 8036ED98 0036BCF8 38 80 FF 77 */ li r4, -137 +/* 8036ED9C 0036BCFC 38 78 00 00 */ addi r3, r24, 0 +/* 8036EDA0 0036BD00 7C 00 20 38 */ and r0, r0, r4 +/* 8036EDA4 0036BD04 60 00 00 20 */ ori r0, r0, 0x20 +/* 8036EDA8 0036BD08 B0 1F 00 00 */ sth r0, 0(r31) +/* 8036EDAC 0036BD0C 38 80 00 00 */ li r4, 0 +/* 8036EDB0 0036BD10 38 A0 00 20 */ li r5, 0x20 +/* 8036EDB4 0036BD14 4B C9 45 F5 */ bl memset +/* 8036EDB8 0036BD18 38 78 00 00 */ addi r3, r24, 0 +/* 8036EDBC 0036BD1C 38 80 00 20 */ li r4, 0x20 +/* 8036EDC0 0036BD20 48 00 FC F1 */ bl DCFlushRange +/* 8036EDC4 0036BD24 A0 19 00 00 */ lhz r0, 0(r25) +/* 8036EDC8 0036BD28 54 03 00 2A */ rlwinm r3, r0, 0, 0, 0x15 +/* 8036EDCC 0036BD2C 80 01 02 40 */ lwz r0, 0x240(r1) +/* 8036EDD0 0036BD30 7C 60 03 78 */ or r0, r3, r0 +/* 8036EDD4 0036BD34 B0 19 00 00 */ sth r0, 0(r25) +/* 8036EDD8 0036BD38 A0 1A 00 00 */ lhz r0, 0(r26) +/* 8036EDDC 0036BD3C 54 03 06 DE */ rlwinm r3, r0, 0, 0x1b, 0xf +/* 8036EDE0 0036BD40 80 01 02 54 */ lwz r0, 0x254(r1) +/* 8036EDE4 0036BD44 7C 60 03 78 */ or r0, r3, r0 +/* 8036EDE8 0036BD48 B0 1A 00 00 */ sth r0, 0(r26) +/* 8036EDEC 0036BD4C A0 1B 00 00 */ lhz r0, 0(r27) +/* 8036EDF0 0036BD50 54 03 00 2A */ rlwinm r3, r0, 0, 0, 0x15 +/* 8036EDF4 0036BD54 80 01 02 28 */ lwz r0, 0x228(r1) +/* 8036EDF8 0036BD58 7C 60 03 78 */ or r0, r3, r0 +/* 8036EDFC 0036BD5C B0 1B 00 00 */ sth r0, 0(r27) +/* 8036EE00 0036BD60 A0 1C 00 00 */ lhz r0, 0(r28) +/* 8036EE04 0036BD64 54 03 06 DE */ rlwinm r3, r0, 0, 0x1b, 0xf +/* 8036EE08 0036BD68 80 01 02 6C */ lwz r0, 0x26c(r1) +/* 8036EE0C 0036BD6C 7C 60 03 78 */ or r0, r3, r0 +/* 8036EE10 0036BD70 B0 1C 00 00 */ sth r0, 0(r28) +/* 8036EE14 0036BD74 A0 1E 00 00 */ lhz r0, 0(r30) +/* 8036EE18 0036BD78 60 00 80 00 */ ori r0, r0, 0x8000 +/* 8036EE1C 0036BD7C B0 1E 00 00 */ sth r0, 0(r30) +/* 8036EE20 0036BD80 A0 1E 00 00 */ lhz r0, 0(r30) +/* 8036EE24 0036BD84 54 00 00 2A */ rlwinm r0, r0, 0, 0, 0x15 +/* 8036EE28 0036BD88 60 00 00 00 */ nop +/* 8036EE2C 0036BD8C B0 1E 00 00 */ sth r0, 0(r30) +/* 8036EE30 0036BD90 A0 1D 00 00 */ lhz r0, 0(r29) +/* 8036EE34 0036BD94 54 00 06 DE */ rlwinm r0, r0, 0, 0x1b, 0xf +/* 8036EE38 0036BD98 60 00 00 20 */ ori r0, r0, 0x20 +/* 8036EE3C 0036BD9C B0 1D 00 00 */ sth r0, 0(r29) +lbl_8036EE40: +/* 8036EE40 0036BDA0 A0 1F 00 00 */ lhz r0, 0(r31) +/* 8036EE44 0036BDA4 54 00 05 AD */ rlwinm. r0, r0, 0, 0x16, 0x16 +/* 8036EE48 0036BDA8 40 82 FF F8 */ bne lbl_8036EE40 +/* 8036EE4C 0036BDAC A0 7F 00 00 */ lhz r3, 0(r31) +/* 8036EE50 0036BDB0 38 00 FF 77 */ li r0, -137 +/* 8036EE54 0036BDB4 7C 60 00 38 */ and r0, r3, r0 +/* 8036EE58 0036BDB8 60 00 00 20 */ ori r0, r0, 0x20 +/* 8036EE5C 0036BDBC B0 1F 00 00 */ sth r0, 0(r31) +/* 8036EE60 0036BDC0 48 00 09 AD */ bl PPCSync +/* 8036EE64 0036BDC4 80 18 00 00 */ lwz r0, 0(r24) +/* 8036EE68 0036BDC8 80 76 00 00 */ lwz r3, 0(r22) +/* 8036EE6C 0036BDCC 7C 00 18 40 */ cmplw r0, r3 +/* 8036EE70 0036BDD0 40 82 02 78 */ bne lbl_8036F0E8 +/* 8036EE74 0036BDD4 A0 19 00 00 */ lhz r0, 0(r25) +/* 8036EE78 0036BDD8 54 03 00 2A */ rlwinm r3, r0, 0, 0, 0x15 +/* 8036EE7C 0036BDDC 80 01 02 3C */ lwz r0, 0x23c(r1) +/* 8036EE80 0036BDE0 7C 60 03 78 */ or r0, r3, r0 +/* 8036EE84 0036BDE4 B0 19 00 00 */ sth r0, 0(r25) +/* 8036EE88 0036BDE8 A0 1A 00 00 */ lhz r0, 0(r26) +/* 8036EE8C 0036BDEC 54 03 06 DE */ rlwinm r3, r0, 0, 0x1b, 0xf +/* 8036EE90 0036BDF0 80 01 02 4C */ lwz r0, 0x24c(r1) +/* 8036EE94 0036BDF4 7C 60 03 78 */ or r0, r3, r0 +/* 8036EE98 0036BDF8 B0 1A 00 00 */ sth r0, 0(r26) +/* 8036EE9C 0036BDFC A0 1B 00 00 */ lhz r0, 0(r27) +/* 8036EEA0 0036BE00 54 00 00 2A */ rlwinm r0, r0, 0, 0, 0x15 +/* 8036EEA4 0036BE04 7C 00 8B 78 */ or r0, r0, r17 +/* 8036EEA8 0036BE08 B0 1B 00 00 */ sth r0, 0(r27) +/* 8036EEAC 0036BE0C A0 1C 00 00 */ lhz r0, 0(r28) +/* 8036EEB0 0036BE10 54 00 06 DE */ rlwinm r0, r0, 0, 0x1b, 0xf +/* 8036EEB4 0036BE14 7C 00 93 78 */ or r0, r0, r18 +/* 8036EEB8 0036BE18 B0 1C 00 00 */ sth r0, 0(r28) +/* 8036EEBC 0036BE1C A0 1E 00 00 */ lhz r0, 0(r30) +/* 8036EEC0 0036BE20 54 00 04 5E */ rlwinm r0, r0, 0, 0x11, 0xf +/* 8036EEC4 0036BE24 B0 1E 00 00 */ sth r0, 0(r30) +/* 8036EEC8 0036BE28 A0 1E 00 00 */ lhz r0, 0(r30) +/* 8036EECC 0036BE2C 54 00 00 2A */ rlwinm r0, r0, 0, 0, 0x15 +/* 8036EED0 0036BE30 60 00 00 00 */ nop +/* 8036EED4 0036BE34 B0 1E 00 00 */ sth r0, 0(r30) +/* 8036EED8 0036BE38 A0 1D 00 00 */ lhz r0, 0(r29) +/* 8036EEDC 0036BE3C 54 00 06 DE */ rlwinm r0, r0, 0, 0x1b, 0xf +/* 8036EEE0 0036BE40 60 00 00 20 */ ori r0, r0, 0x20 +/* 8036EEE4 0036BE44 B0 1D 00 00 */ sth r0, 0(r29) +lbl_8036EEE8: +/* 8036EEE8 0036BE48 A0 1F 00 00 */ lhz r0, 0(r31) +/* 8036EEEC 0036BE4C 54 00 05 AD */ rlwinm. r0, r0, 0, 0x16, 0x16 +/* 8036EEF0 0036BE50 40 82 FF F8 */ bne lbl_8036EEE8 +/* 8036EEF4 0036BE54 A0 7F 00 00 */ lhz r3, 0(r31) +/* 8036EEF8 0036BE58 38 00 FF 77 */ li r0, -137 +/* 8036EEFC 0036BE5C 7C 60 00 38 */ and r0, r3, r0 +/* 8036EF00 0036BE60 60 00 00 20 */ ori r0, r0, 0x20 +/* 8036EF04 0036BE64 B0 1F 00 00 */ sth r0, 0(r31) +/* 8036EF08 0036BE68 A0 19 00 00 */ lhz r0, 0(r25) +/* 8036EF0C 0036BE6C 54 03 00 2A */ rlwinm r3, r0, 0, 0, 0x15 +/* 8036EF10 0036BE70 80 01 02 34 */ lwz r0, 0x234(r1) +/* 8036EF14 0036BE74 7C 60 03 78 */ or r0, r3, r0 +/* 8036EF18 0036BE78 B0 19 00 00 */ sth r0, 0(r25) +/* 8036EF1C 0036BE7C A0 1A 00 00 */ lhz r0, 0(r26) +/* 8036EF20 0036BE80 54 03 06 DE */ rlwinm r3, r0, 0, 0x1b, 0xf +/* 8036EF24 0036BE84 80 01 02 58 */ lwz r0, 0x258(r1) +/* 8036EF28 0036BE88 7C 60 03 78 */ or r0, r3, r0 +/* 8036EF2C 0036BE8C B0 1A 00 00 */ sth r0, 0(r26) +/* 8036EF30 0036BE90 A0 1B 00 00 */ lhz r0, 0(r27) +/* 8036EF34 0036BE94 54 00 00 2A */ rlwinm r0, r0, 0, 0, 0x15 +/* 8036EF38 0036BE98 7C 00 83 78 */ or r0, r0, r16 +/* 8036EF3C 0036BE9C B0 1B 00 00 */ sth r0, 0(r27) +/* 8036EF40 0036BEA0 A0 1C 00 00 */ lhz r0, 0(r28) +/* 8036EF44 0036BEA4 54 00 06 DE */ rlwinm r0, r0, 0, 0x1b, 0xf +/* 8036EF48 0036BEA8 7C 00 BB 78 */ or r0, r0, r23 +/* 8036EF4C 0036BEAC B0 1C 00 00 */ sth r0, 0(r28) +/* 8036EF50 0036BEB0 A0 1E 00 00 */ lhz r0, 0(r30) +/* 8036EF54 0036BEB4 54 00 04 5E */ rlwinm r0, r0, 0, 0x11, 0xf +/* 8036EF58 0036BEB8 B0 1E 00 00 */ sth r0, 0(r30) +/* 8036EF5C 0036BEBC A0 1E 00 00 */ lhz r0, 0(r30) +/* 8036EF60 0036BEC0 54 00 00 2A */ rlwinm r0, r0, 0, 0, 0x15 +/* 8036EF64 0036BEC4 60 00 00 00 */ nop +/* 8036EF68 0036BEC8 B0 1E 00 00 */ sth r0, 0(r30) +/* 8036EF6C 0036BECC A0 1D 00 00 */ lhz r0, 0(r29) +/* 8036EF70 0036BED0 54 00 06 DE */ rlwinm r0, r0, 0, 0x1b, 0xf +/* 8036EF74 0036BED4 60 00 00 20 */ ori r0, r0, 0x20 +/* 8036EF78 0036BED8 B0 1D 00 00 */ sth r0, 0(r29) +lbl_8036EF7C: +/* 8036EF7C 0036BEDC A0 1F 00 00 */ lhz r0, 0(r31) +/* 8036EF80 0036BEE0 54 00 05 AD */ rlwinm. r0, r0, 0, 0x16, 0x16 +/* 8036EF84 0036BEE4 40 82 FF F8 */ bne lbl_8036EF7C +/* 8036EF88 0036BEE8 A0 7F 00 00 */ lhz r3, 0(r31) +/* 8036EF8C 0036BEEC 38 00 FF 77 */ li r0, -137 +/* 8036EF90 0036BEF0 7C 60 00 38 */ and r0, r3, r0 +/* 8036EF94 0036BEF4 60 00 00 20 */ ori r0, r0, 0x20 +/* 8036EF98 0036BEF8 B0 1F 00 00 */ sth r0, 0(r31) +/* 8036EF9C 0036BEFC A0 19 00 00 */ lhz r0, 0(r25) +/* 8036EFA0 0036BF00 54 03 00 2A */ rlwinm r3, r0, 0, 0, 0x15 +/* 8036EFA4 0036BF04 80 01 02 2C */ lwz r0, 0x22c(r1) +/* 8036EFA8 0036BF08 7C 60 03 78 */ or r0, r3, r0 +/* 8036EFAC 0036BF0C B0 19 00 00 */ sth r0, 0(r25) +/* 8036EFB0 0036BF10 A0 1A 00 00 */ lhz r0, 0(r26) +/* 8036EFB4 0036BF14 54 03 06 DE */ rlwinm r3, r0, 0, 0x1b, 0xf +/* 8036EFB8 0036BF18 80 01 02 5C */ lwz r0, 0x25c(r1) +/* 8036EFBC 0036BF1C 7C 60 03 78 */ or r0, r3, r0 +/* 8036EFC0 0036BF20 B0 1A 00 00 */ sth r0, 0(r26) +/* 8036EFC4 0036BF24 A0 1B 00 00 */ lhz r0, 0(r27) +/* 8036EFC8 0036BF28 54 00 00 2A */ rlwinm r0, r0, 0, 0, 0x15 +/* 8036EFCC 0036BF2C 7C 00 73 78 */ or r0, r0, r14 +/* 8036EFD0 0036BF30 B0 1B 00 00 */ sth r0, 0(r27) +/* 8036EFD4 0036BF34 A0 1C 00 00 */ lhz r0, 0(r28) +/* 8036EFD8 0036BF38 54 00 06 DE */ rlwinm r0, r0, 0, 0x1b, 0xf +/* 8036EFDC 0036BF3C 7C 00 7B 78 */ or r0, r0, r15 +/* 8036EFE0 0036BF40 B0 1C 00 00 */ sth r0, 0(r28) +/* 8036EFE4 0036BF44 A0 1E 00 00 */ lhz r0, 0(r30) +/* 8036EFE8 0036BF48 54 00 04 5E */ rlwinm r0, r0, 0, 0x11, 0xf +/* 8036EFEC 0036BF4C B0 1E 00 00 */ sth r0, 0(r30) +/* 8036EFF0 0036BF50 A0 1E 00 00 */ lhz r0, 0(r30) +/* 8036EFF4 0036BF54 54 00 00 2A */ rlwinm r0, r0, 0, 0, 0x15 +/* 8036EFF8 0036BF58 60 00 00 00 */ nop +/* 8036EFFC 0036BF5C B0 1E 00 00 */ sth r0, 0(r30) +/* 8036F000 0036BF60 A0 1D 00 00 */ lhz r0, 0(r29) +/* 8036F004 0036BF64 54 00 06 DE */ rlwinm r0, r0, 0, 0x1b, 0xf +/* 8036F008 0036BF68 60 00 00 20 */ ori r0, r0, 0x20 +/* 8036F00C 0036BF6C B0 1D 00 00 */ sth r0, 0(r29) +lbl_8036F010: +/* 8036F010 0036BF70 A0 1F 00 00 */ lhz r0, 0(r31) +/* 8036F014 0036BF74 54 00 05 AD */ rlwinm. r0, r0, 0, 0x16, 0x16 +/* 8036F018 0036BF78 40 82 FF F8 */ bne lbl_8036F010 +/* 8036F01C 0036BF7C A0 7F 00 00 */ lhz r3, 0(r31) +/* 8036F020 0036BF80 38 00 FF 77 */ li r0, -137 +/* 8036F024 0036BF84 7C 60 00 38 */ and r0, r3, r0 +/* 8036F028 0036BF88 60 00 00 20 */ ori r0, r0, 0x20 +/* 8036F02C 0036BF8C B0 1F 00 00 */ sth r0, 0(r31) +/* 8036F030 0036BF90 A0 19 00 00 */ lhz r0, 0(r25) +/* 8036F034 0036BF94 54 03 00 2A */ rlwinm r3, r0, 0, 0, 0x15 +/* 8036F038 0036BF98 80 01 02 24 */ lwz r0, 0x224(r1) +/* 8036F03C 0036BF9C 7C 60 03 78 */ or r0, r3, r0 +/* 8036F040 0036BFA0 B0 19 00 00 */ sth r0, 0(r25) +/* 8036F044 0036BFA4 A0 1A 00 00 */ lhz r0, 0(r26) +/* 8036F048 0036BFA8 54 03 06 DE */ rlwinm r3, r0, 0, 0x1b, 0xf +/* 8036F04C 0036BFAC 80 01 02 60 */ lwz r0, 0x260(r1) +/* 8036F050 0036BFB0 7C 60 03 78 */ or r0, r3, r0 +/* 8036F054 0036BFB4 B0 1A 00 00 */ sth r0, 0(r26) +/* 8036F058 0036BFB8 A0 1B 00 00 */ lhz r0, 0(r27) +/* 8036F05C 0036BFBC 54 03 00 2A */ rlwinm r3, r0, 0, 0, 0x15 +/* 8036F060 0036BFC0 80 01 02 30 */ lwz r0, 0x230(r1) +/* 8036F064 0036BFC4 7C 60 03 78 */ or r0, r3, r0 +/* 8036F068 0036BFC8 B0 1B 00 00 */ sth r0, 0(r27) +/* 8036F06C 0036BFCC A0 1C 00 00 */ lhz r0, 0(r28) +/* 8036F070 0036BFD0 54 03 06 DE */ rlwinm r3, r0, 0, 0x1b, 0xf +/* 8036F074 0036BFD4 80 01 02 64 */ lwz r0, 0x264(r1) +/* 8036F078 0036BFD8 7C 60 03 78 */ or r0, r3, r0 +/* 8036F07C 0036BFDC B0 1C 00 00 */ sth r0, 0(r28) +/* 8036F080 0036BFE0 A0 1E 00 00 */ lhz r0, 0(r30) +/* 8036F084 0036BFE4 54 00 04 5E */ rlwinm r0, r0, 0, 0x11, 0xf +/* 8036F088 0036BFE8 B0 1E 00 00 */ sth r0, 0(r30) +/* 8036F08C 0036BFEC A0 1E 00 00 */ lhz r0, 0(r30) +/* 8036F090 0036BFF0 54 00 00 2A */ rlwinm r0, r0, 0, 0, 0x15 +/* 8036F094 0036BFF4 60 00 00 00 */ nop +/* 8036F098 0036BFF8 B0 1E 00 00 */ sth r0, 0(r30) +/* 8036F09C 0036BFFC A0 1D 00 00 */ lhz r0, 0(r29) +/* 8036F0A0 0036C000 54 00 06 DE */ rlwinm r0, r0, 0, 0x1b, 0xf +/* 8036F0A4 0036C004 60 00 00 20 */ ori r0, r0, 0x20 +/* 8036F0A8 0036C008 B0 1D 00 00 */ sth r0, 0(r29) +lbl_8036F0AC: +/* 8036F0AC 0036C00C A0 1F 00 00 */ lhz r0, 0(r31) +/* 8036F0B0 0036C010 54 00 05 AD */ rlwinm. r0, r0, 0, 0x16, 0x16 +/* 8036F0B4 0036C014 40 82 FF F8 */ bne lbl_8036F0AC +/* 8036F0B8 0036C018 A0 9F 00 00 */ lhz r4, 0(r31) +/* 8036F0BC 0036C01C 38 00 FF 77 */ li r0, -137 +/* 8036F0C0 0036C020 3C 60 01 00 */ lis r3, 0x100 +/* 8036F0C4 0036C024 7C 80 00 38 */ and r0, r4, r0 +/* 8036F0C8 0036C028 60 00 00 20 */ ori r0, r0, 0x20 +/* 8036F0CC 0036C02C B0 1F 00 00 */ sth r0, 0(r31) +/* 8036F0D0 0036C030 3E 73 01 00 */ addis r19, r19, 0x100 +/* 8036F0D4 0036C034 A0 01 02 70 */ lhz r0, 0x270(r1) +/* 8036F0D8 0036C038 90 6D AB 44 */ stw r3, lbl_805A9704@sda21(r13) +/* 8036F0DC 0036C03C 60 00 00 18 */ ori r0, r0, 0x18 +/* 8036F0E0 0036C040 B0 01 02 70 */ sth r0, 0x270(r1) +/* 8036F0E4 0036C044 48 00 03 10 */ b lbl_8036F3F4 +lbl_8036F0E8: +/* 8036F0E8 0036C048 A0 19 00 00 */ lhz r0, 0(r25) +/* 8036F0EC 0036C04C 54 03 00 2A */ rlwinm r3, r0, 0, 0, 0x15 +/* 8036F0F0 0036C050 80 01 02 3C */ lwz r0, 0x23c(r1) +/* 8036F0F4 0036C054 7C 60 03 78 */ or r0, r3, r0 +/* 8036F0F8 0036C058 B0 19 00 00 */ sth r0, 0(r25) +/* 8036F0FC 0036C05C A0 1A 00 00 */ lhz r0, 0(r26) +/* 8036F100 0036C060 54 03 06 DE */ rlwinm r3, r0, 0, 0x1b, 0xf +/* 8036F104 0036C064 80 01 02 4C */ lwz r0, 0x24c(r1) +/* 8036F108 0036C068 7C 60 03 78 */ or r0, r3, r0 +/* 8036F10C 0036C06C B0 1A 00 00 */ sth r0, 0(r26) +/* 8036F110 0036C070 A0 1B 00 00 */ lhz r0, 0(r27) +/* 8036F114 0036C074 54 00 00 2A */ rlwinm r0, r0, 0, 0, 0x15 +/* 8036F118 0036C078 7C 00 8B 78 */ or r0, r0, r17 +/* 8036F11C 0036C07C B0 1B 00 00 */ sth r0, 0(r27) +/* 8036F120 0036C080 A0 1C 00 00 */ lhz r0, 0(r28) +/* 8036F124 0036C084 54 00 06 DE */ rlwinm r0, r0, 0, 0x1b, 0xf +/* 8036F128 0036C088 7C 00 93 78 */ or r0, r0, r18 +/* 8036F12C 0036C08C B0 1C 00 00 */ sth r0, 0(r28) +/* 8036F130 0036C090 A0 1E 00 00 */ lhz r0, 0(r30) +/* 8036F134 0036C094 54 00 04 5E */ rlwinm r0, r0, 0, 0x11, 0xf +/* 8036F138 0036C098 B0 1E 00 00 */ sth r0, 0(r30) +/* 8036F13C 0036C09C A0 1E 00 00 */ lhz r0, 0(r30) +/* 8036F140 0036C0A0 54 00 00 2A */ rlwinm r0, r0, 0, 0, 0x15 +/* 8036F144 0036C0A4 60 00 00 00 */ nop +/* 8036F148 0036C0A8 B0 1E 00 00 */ sth r0, 0(r30) +/* 8036F14C 0036C0AC A0 1D 00 00 */ lhz r0, 0(r29) +/* 8036F150 0036C0B0 54 00 06 DE */ rlwinm r0, r0, 0, 0x1b, 0xf +/* 8036F154 0036C0B4 60 00 00 20 */ ori r0, r0, 0x20 +/* 8036F158 0036C0B8 B0 1D 00 00 */ sth r0, 0(r29) +lbl_8036F15C: +/* 8036F15C 0036C0BC A0 1F 00 00 */ lhz r0, 0(r31) +/* 8036F160 0036C0C0 54 00 05 AD */ rlwinm. r0, r0, 0, 0x16, 0x16 +/* 8036F164 0036C0C4 40 82 FF F8 */ bne lbl_8036F15C +/* 8036F168 0036C0C8 A0 7F 00 00 */ lhz r3, 0(r31) +/* 8036F16C 0036C0CC 38 00 FF 77 */ li r0, -137 +/* 8036F170 0036C0D0 7C 60 00 38 */ and r0, r3, r0 +/* 8036F174 0036C0D4 60 00 00 20 */ ori r0, r0, 0x20 +/* 8036F178 0036C0D8 B0 1F 00 00 */ sth r0, 0(r31) +/* 8036F17C 0036C0DC A0 19 00 00 */ lhz r0, 0(r25) +/* 8036F180 0036C0E0 54 03 00 2A */ rlwinm r3, r0, 0, 0, 0x15 +/* 8036F184 0036C0E4 80 01 02 34 */ lwz r0, 0x234(r1) +/* 8036F188 0036C0E8 7C 60 03 78 */ or r0, r3, r0 +/* 8036F18C 0036C0EC B0 19 00 00 */ sth r0, 0(r25) +/* 8036F190 0036C0F0 A0 1A 00 00 */ lhz r0, 0(r26) +/* 8036F194 0036C0F4 54 03 06 DE */ rlwinm r3, r0, 0, 0x1b, 0xf +/* 8036F198 0036C0F8 80 01 02 58 */ lwz r0, 0x258(r1) +/* 8036F19C 0036C0FC 7C 60 03 78 */ or r0, r3, r0 +/* 8036F1A0 0036C100 B0 1A 00 00 */ sth r0, 0(r26) +/* 8036F1A4 0036C104 A0 1B 00 00 */ lhz r0, 0(r27) +/* 8036F1A8 0036C108 54 00 00 2A */ rlwinm r0, r0, 0, 0, 0x15 +/* 8036F1AC 0036C10C 7C 00 83 78 */ or r0, r0, r16 +/* 8036F1B0 0036C110 B0 1B 00 00 */ sth r0, 0(r27) +/* 8036F1B4 0036C114 A0 1C 00 00 */ lhz r0, 0(r28) +/* 8036F1B8 0036C118 54 00 06 DE */ rlwinm r0, r0, 0, 0x1b, 0xf +/* 8036F1BC 0036C11C 7C 00 BB 78 */ or r0, r0, r23 +/* 8036F1C0 0036C120 B0 1C 00 00 */ sth r0, 0(r28) +/* 8036F1C4 0036C124 A0 1E 00 00 */ lhz r0, 0(r30) +/* 8036F1C8 0036C128 54 00 04 5E */ rlwinm r0, r0, 0, 0x11, 0xf +/* 8036F1CC 0036C12C B0 1E 00 00 */ sth r0, 0(r30) +/* 8036F1D0 0036C130 A0 1E 00 00 */ lhz r0, 0(r30) +/* 8036F1D4 0036C134 54 00 00 2A */ rlwinm r0, r0, 0, 0, 0x15 +/* 8036F1D8 0036C138 60 00 00 00 */ nop +/* 8036F1DC 0036C13C B0 1E 00 00 */ sth r0, 0(r30) +/* 8036F1E0 0036C140 A0 1D 00 00 */ lhz r0, 0(r29) +/* 8036F1E4 0036C144 54 00 06 DE */ rlwinm r0, r0, 0, 0x1b, 0xf +/* 8036F1E8 0036C148 60 00 00 20 */ ori r0, r0, 0x20 +/* 8036F1EC 0036C14C B0 1D 00 00 */ sth r0, 0(r29) +lbl_8036F1F0: +/* 8036F1F0 0036C150 A0 1F 00 00 */ lhz r0, 0(r31) +/* 8036F1F4 0036C154 54 00 05 AD */ rlwinm. r0, r0, 0, 0x16, 0x16 +/* 8036F1F8 0036C158 40 82 FF F8 */ bne lbl_8036F1F0 +/* 8036F1FC 0036C15C A0 7F 00 00 */ lhz r3, 0(r31) +/* 8036F200 0036C160 38 00 FF 77 */ li r0, -137 +/* 8036F204 0036C164 7C 60 00 38 */ and r0, r3, r0 +/* 8036F208 0036C168 60 00 00 20 */ ori r0, r0, 0x20 +/* 8036F20C 0036C16C B0 1F 00 00 */ sth r0, 0(r31) +/* 8036F210 0036C170 A0 19 00 00 */ lhz r0, 0(r25) +/* 8036F214 0036C174 54 03 00 2A */ rlwinm r3, r0, 0, 0, 0x15 +/* 8036F218 0036C178 80 01 02 2C */ lwz r0, 0x22c(r1) +/* 8036F21C 0036C17C 7C 60 03 78 */ or r0, r3, r0 +/* 8036F220 0036C180 B0 19 00 00 */ sth r0, 0(r25) +/* 8036F224 0036C184 A0 1A 00 00 */ lhz r0, 0(r26) +/* 8036F228 0036C188 54 03 06 DE */ rlwinm r3, r0, 0, 0x1b, 0xf +/* 8036F22C 0036C18C 80 01 02 5C */ lwz r0, 0x25c(r1) +/* 8036F230 0036C190 7C 60 03 78 */ or r0, r3, r0 +/* 8036F234 0036C194 B0 1A 00 00 */ sth r0, 0(r26) +/* 8036F238 0036C198 A0 1B 00 00 */ lhz r0, 0(r27) +/* 8036F23C 0036C19C 54 00 00 2A */ rlwinm r0, r0, 0, 0, 0x15 +/* 8036F240 0036C1A0 7C 00 73 78 */ or r0, r0, r14 +/* 8036F244 0036C1A4 B0 1B 00 00 */ sth r0, 0(r27) +/* 8036F248 0036C1A8 A0 1C 00 00 */ lhz r0, 0(r28) +/* 8036F24C 0036C1AC 54 00 06 DE */ rlwinm r0, r0, 0, 0x1b, 0xf +/* 8036F250 0036C1B0 7C 00 7B 78 */ or r0, r0, r15 +/* 8036F254 0036C1B4 B0 1C 00 00 */ sth r0, 0(r28) +/* 8036F258 0036C1B8 A0 1E 00 00 */ lhz r0, 0(r30) +/* 8036F25C 0036C1BC 54 00 04 5E */ rlwinm r0, r0, 0, 0x11, 0xf +/* 8036F260 0036C1C0 B0 1E 00 00 */ sth r0, 0(r30) +/* 8036F264 0036C1C4 A0 1E 00 00 */ lhz r0, 0(r30) +/* 8036F268 0036C1C8 54 00 00 2A */ rlwinm r0, r0, 0, 0, 0x15 +/* 8036F26C 0036C1CC 60 00 00 00 */ nop +/* 8036F270 0036C1D0 B0 1E 00 00 */ sth r0, 0(r30) +/* 8036F274 0036C1D4 A0 1D 00 00 */ lhz r0, 0(r29) +/* 8036F278 0036C1D8 54 00 06 DE */ rlwinm r0, r0, 0, 0x1b, 0xf +/* 8036F27C 0036C1DC 60 00 00 20 */ ori r0, r0, 0x20 +/* 8036F280 0036C1E0 B0 1D 00 00 */ sth r0, 0(r29) +lbl_8036F284: +/* 8036F284 0036C1E4 A0 1F 00 00 */ lhz r0, 0(r31) +/* 8036F288 0036C1E8 54 00 05 AD */ rlwinm. r0, r0, 0, 0x16, 0x16 +/* 8036F28C 0036C1EC 40 82 FF F8 */ bne lbl_8036F284 +/* 8036F290 0036C1F0 A0 7F 00 00 */ lhz r3, 0(r31) +/* 8036F294 0036C1F4 38 00 FF 77 */ li r0, -137 +/* 8036F298 0036C1F8 7C 60 00 38 */ and r0, r3, r0 +/* 8036F29C 0036C1FC 60 00 00 20 */ ori r0, r0, 0x20 +/* 8036F2A0 0036C200 B0 1F 00 00 */ sth r0, 0(r31) +/* 8036F2A4 0036C204 A0 19 00 00 */ lhz r0, 0(r25) +/* 8036F2A8 0036C208 54 03 00 2A */ rlwinm r3, r0, 0, 0, 0x15 +/* 8036F2AC 0036C20C 80 01 02 24 */ lwz r0, 0x224(r1) +/* 8036F2B0 0036C210 7C 60 03 78 */ or r0, r3, r0 +/* 8036F2B4 0036C214 B0 19 00 00 */ sth r0, 0(r25) +/* 8036F2B8 0036C218 A0 1A 00 00 */ lhz r0, 0(r26) +/* 8036F2BC 0036C21C 54 03 06 DE */ rlwinm r3, r0, 0, 0x1b, 0xf +/* 8036F2C0 0036C220 80 01 02 60 */ lwz r0, 0x260(r1) +/* 8036F2C4 0036C224 7C 60 03 78 */ or r0, r3, r0 +/* 8036F2C8 0036C228 B0 1A 00 00 */ sth r0, 0(r26) +/* 8036F2CC 0036C22C A0 1B 00 00 */ lhz r0, 0(r27) +/* 8036F2D0 0036C230 54 03 00 2A */ rlwinm r3, r0, 0, 0, 0x15 +/* 8036F2D4 0036C234 80 01 02 30 */ lwz r0, 0x230(r1) +/* 8036F2D8 0036C238 7C 60 03 78 */ or r0, r3, r0 +/* 8036F2DC 0036C23C B0 1B 00 00 */ sth r0, 0(r27) +/* 8036F2E0 0036C240 A0 1C 00 00 */ lhz r0, 0(r28) +/* 8036F2E4 0036C244 54 03 06 DE */ rlwinm r3, r0, 0, 0x1b, 0xf +/* 8036F2E8 0036C248 80 01 02 64 */ lwz r0, 0x264(r1) +/* 8036F2EC 0036C24C 7C 60 03 78 */ or r0, r3, r0 +/* 8036F2F0 0036C250 B0 1C 00 00 */ sth r0, 0(r28) +/* 8036F2F4 0036C254 A0 1E 00 00 */ lhz r0, 0(r30) +/* 8036F2F8 0036C258 54 00 04 5E */ rlwinm r0, r0, 0, 0x11, 0xf +/* 8036F2FC 0036C25C B0 1E 00 00 */ sth r0, 0(r30) +/* 8036F300 0036C260 A0 1E 00 00 */ lhz r0, 0(r30) +/* 8036F304 0036C264 54 00 00 2A */ rlwinm r0, r0, 0, 0, 0x15 +/* 8036F308 0036C268 60 00 00 00 */ nop +/* 8036F30C 0036C26C B0 1E 00 00 */ sth r0, 0(r30) +/* 8036F310 0036C270 A0 1D 00 00 */ lhz r0, 0(r29) +/* 8036F314 0036C274 54 00 06 DE */ rlwinm r0, r0, 0, 0x1b, 0xf +/* 8036F318 0036C278 60 00 00 20 */ ori r0, r0, 0x20 +/* 8036F31C 0036C27C B0 1D 00 00 */ sth r0, 0(r29) +lbl_8036F320: +/* 8036F320 0036C280 A0 1F 00 00 */ lhz r0, 0(r31) +/* 8036F324 0036C284 54 00 05 AD */ rlwinm. r0, r0, 0, 0x16, 0x16 +/* 8036F328 0036C288 40 82 FF F8 */ bne lbl_8036F320 +/* 8036F32C 0036C28C A0 7F 00 00 */ lhz r3, 0(r31) +/* 8036F330 0036C290 38 00 FF 77 */ li r0, -137 +/* 8036F334 0036C294 7C 60 00 38 */ and r0, r3, r0 +/* 8036F338 0036C298 60 00 00 20 */ ori r0, r0, 0x20 +/* 8036F33C 0036C29C B0 1F 00 00 */ sth r0, 0(r31) +/* 8036F340 0036C2A0 A0 19 00 00 */ lhz r0, 0(r25) +/* 8036F344 0036C2A4 54 03 00 2A */ rlwinm r3, r0, 0, 0, 0x15 +/* 8036F348 0036C2A8 80 01 02 20 */ lwz r0, 0x220(r1) +/* 8036F34C 0036C2AC 7C 60 03 78 */ or r0, r3, r0 +/* 8036F350 0036C2B0 B0 19 00 00 */ sth r0, 0(r25) +/* 8036F354 0036C2B4 A0 1A 00 00 */ lhz r0, 0(r26) +/* 8036F358 0036C2B8 54 03 06 DE */ rlwinm r3, r0, 0, 0x1b, 0xf +/* 8036F35C 0036C2BC 80 01 02 68 */ lwz r0, 0x268(r1) +/* 8036F360 0036C2C0 7C 60 03 78 */ or r0, r3, r0 +/* 8036F364 0036C2C4 B0 1A 00 00 */ sth r0, 0(r26) +/* 8036F368 0036C2C8 A0 1B 00 00 */ lhz r0, 0(r27) +/* 8036F36C 0036C2CC 54 03 00 2A */ rlwinm r3, r0, 0, 0, 0x15 +/* 8036F370 0036C2D0 80 01 02 28 */ lwz r0, 0x228(r1) +/* 8036F374 0036C2D4 7C 60 03 78 */ or r0, r3, r0 +/* 8036F378 0036C2D8 B0 1B 00 00 */ sth r0, 0(r27) +/* 8036F37C 0036C2DC A0 1C 00 00 */ lhz r0, 0(r28) +/* 8036F380 0036C2E0 54 03 06 DE */ rlwinm r3, r0, 0, 0x1b, 0xf +/* 8036F384 0036C2E4 80 01 02 6C */ lwz r0, 0x26c(r1) +/* 8036F388 0036C2E8 7C 60 03 78 */ or r0, r3, r0 +/* 8036F38C 0036C2EC B0 1C 00 00 */ sth r0, 0(r28) +/* 8036F390 0036C2F0 A0 1E 00 00 */ lhz r0, 0(r30) +/* 8036F394 0036C2F4 54 00 04 5E */ rlwinm r0, r0, 0, 0x11, 0xf +/* 8036F398 0036C2F8 B0 1E 00 00 */ sth r0, 0(r30) +/* 8036F39C 0036C2FC A0 1E 00 00 */ lhz r0, 0(r30) +/* 8036F3A0 0036C300 54 00 00 2A */ rlwinm r0, r0, 0, 0, 0x15 +/* 8036F3A4 0036C304 60 00 00 00 */ nop +/* 8036F3A8 0036C308 B0 1E 00 00 */ sth r0, 0(r30) +/* 8036F3AC 0036C30C A0 1D 00 00 */ lhz r0, 0(r29) +/* 8036F3B0 0036C310 54 00 06 DE */ rlwinm r0, r0, 0, 0x1b, 0xf +/* 8036F3B4 0036C314 60 00 00 20 */ ori r0, r0, 0x20 +/* 8036F3B8 0036C318 B0 1D 00 00 */ sth r0, 0(r29) +lbl_8036F3BC: +/* 8036F3BC 0036C31C A0 1F 00 00 */ lhz r0, 0(r31) +/* 8036F3C0 0036C320 54 00 05 AD */ rlwinm. r0, r0, 0, 0x16, 0x16 +/* 8036F3C4 0036C324 40 82 FF F8 */ bne lbl_8036F3BC +/* 8036F3C8 0036C328 A0 9F 00 00 */ lhz r4, 0(r31) +/* 8036F3CC 0036C32C 38 00 FF 77 */ li r0, -137 +/* 8036F3D0 0036C330 3C 60 02 00 */ lis r3, 0x200 +/* 8036F3D4 0036C334 7C 80 00 38 */ and r0, r4, r0 +/* 8036F3D8 0036C338 60 00 00 20 */ ori r0, r0, 0x20 +/* 8036F3DC 0036C33C B0 1F 00 00 */ sth r0, 0(r31) +/* 8036F3E0 0036C340 3E 73 02 00 */ addis r19, r19, 0x200 +/* 8036F3E4 0036C344 A0 01 02 70 */ lhz r0, 0x270(r1) +/* 8036F3E8 0036C348 90 6D AB 44 */ stw r3, lbl_805A9704@sda21(r13) +/* 8036F3EC 0036C34C 60 00 00 20 */ ori r0, r0, 0x20 +/* 8036F3F0 0036C350 B0 01 02 70 */ sth r0, 0x270(r1) +lbl_8036F3F4: +/* 8036F3F4 0036C354 80 61 02 48 */ lwz r3, 0x248(r1) +/* 8036F3F8 0036C358 A0 03 00 00 */ lhz r0, 0(r3) +/* 8036F3FC 0036C35C 54 03 00 32 */ rlwinm r3, r0, 0, 0, 0x19 +/* 8036F400 0036C360 A0 01 02 70 */ lhz r0, 0x270(r1) +/* 8036F404 0036C364 7C 60 03 78 */ or r0, r3, r0 +/* 8036F408 0036C368 80 61 02 48 */ lwz r3, 0x248(r1) +/* 8036F40C 0036C36C B0 03 00 00 */ sth r0, 0(r3) +lbl_8036F410: +/* 8036F410 0036C370 3C 60 C0 00 */ lis r3, 0xC00000D0@ha +/* 8036F414 0036C374 92 63 00 D0 */ stw r19, 0xC00000D0@l(r3) +/* 8036F418 0036C378 92 6D AB 3C */ stw r19, lbl_805A96FC@sda21(r13) +/* 8036F41C 0036C37C 80 01 02 C4 */ lwz r0, 0x2c4(r1) +/* 8036F420 0036C380 B9 C1 02 78 */ lmw r14, 0x278(r1) +/* 8036F424 0036C384 38 21 02 C0 */ addi r1, r1, 0x2c0 +/* 8036F428 0036C388 7C 08 03 A6 */ mtlr r0 +/* 8036F42C 0036C38C 4E 80 00 20 */ blr diff --git a/asm/Dolphin/AR/arq.s b/asm/Dolphin/AR/arq.s new file mode 100644 index 00000000..d8c4d25c --- /dev/null +++ b/asm/Dolphin/AR/arq.s @@ -0,0 +1,281 @@ +.include "macros.inc" + +.section .text, "ax" + +.global __ARQServiceQueueLo +__ARQServiceQueueLo: +/* 8036F430 0036C390 7C 08 02 A6 */ mflr r0 +/* 8036F434 0036C394 90 01 00 04 */ stw r0, 4(r1) +/* 8036F438 0036C398 94 21 FF F8 */ stwu r1, -8(r1) +/* 8036F43C 0036C39C 80 0D AB 6C */ lwz r0, lbl_805A972C@sda21(r13) +/* 8036F440 0036C3A0 28 00 00 00 */ cmplwi r0, 0 +/* 8036F444 0036C3A4 40 82 00 1C */ bne lbl_8036F460 +/* 8036F448 0036C3A8 80 6D AB 60 */ lwz r3, lbl_805A9720@sda21(r13) +/* 8036F44C 0036C3AC 28 03 00 00 */ cmplwi r3, 0 +/* 8036F450 0036C3B0 41 82 00 10 */ beq lbl_8036F460 +/* 8036F454 0036C3B4 90 6D AB 6C */ stw r3, lbl_805A972C@sda21(r13) +/* 8036F458 0036C3B8 80 03 00 00 */ lwz r0, 0(r3) +/* 8036F45C 0036C3BC 90 0D AB 60 */ stw r0, lbl_805A9720@sda21(r13) +lbl_8036F460: +/* 8036F460 0036C3C0 80 AD AB 6C */ lwz r5, lbl_805A972C@sda21(r13) +/* 8036F464 0036C3C4 28 05 00 00 */ cmplwi r5, 0 +/* 8036F468 0036C3C8 41 82 00 B8 */ beq lbl_8036F520 +/* 8036F46C 0036C3CC 80 C5 00 18 */ lwz r6, 0x18(r5) +/* 8036F470 0036C3D0 80 0D AB 78 */ lwz r0, lbl_805A9738@sda21(r13) +/* 8036F474 0036C3D4 7C 06 00 40 */ cmplw r6, r0 +/* 8036F478 0036C3D8 41 81 00 3C */ bgt lbl_8036F4B4 +/* 8036F47C 0036C3DC 80 65 00 08 */ lwz r3, 8(r5) +/* 8036F480 0036C3E0 28 03 00 00 */ cmplwi r3, 0 +/* 8036F484 0036C3E4 40 82 00 14 */ bne lbl_8036F498 +/* 8036F488 0036C3E8 80 85 00 10 */ lwz r4, 0x10(r5) +/* 8036F48C 0036C3EC 80 A5 00 14 */ lwz r5, 0x14(r5) +/* 8036F490 0036C3F0 4B FF E4 95 */ bl ARStartDMA +/* 8036F494 0036C3F4 48 00 00 10 */ b lbl_8036F4A4 +lbl_8036F498: +/* 8036F498 0036C3F8 80 85 00 14 */ lwz r4, 0x14(r5) +/* 8036F49C 0036C3FC 80 A5 00 10 */ lwz r5, 0x10(r5) +/* 8036F4A0 0036C400 4B FF E4 85 */ bl ARStartDMA +lbl_8036F4A4: +/* 8036F4A4 0036C404 80 6D AB 6C */ lwz r3, lbl_805A972C@sda21(r13) +/* 8036F4A8 0036C408 80 03 00 1C */ lwz r0, 0x1c(r3) +/* 8036F4AC 0036C40C 90 0D AB 74 */ stw r0, lbl_805A9734@sda21(r13) +/* 8036F4B0 0036C410 48 00 00 34 */ b lbl_8036F4E4 +lbl_8036F4B4: +/* 8036F4B4 0036C414 80 65 00 08 */ lwz r3, 8(r5) +/* 8036F4B8 0036C418 28 03 00 00 */ cmplwi r3, 0 +/* 8036F4BC 0036C41C 40 82 00 18 */ bne lbl_8036F4D4 +/* 8036F4C0 0036C420 80 85 00 10 */ lwz r4, 0x10(r5) +/* 8036F4C4 0036C424 7C 06 03 78 */ mr r6, r0 +/* 8036F4C8 0036C428 80 A5 00 14 */ lwz r5, 0x14(r5) +/* 8036F4CC 0036C42C 4B FF E4 59 */ bl ARStartDMA +/* 8036F4D0 0036C430 48 00 00 14 */ b lbl_8036F4E4 +lbl_8036F4D4: +/* 8036F4D4 0036C434 80 85 00 14 */ lwz r4, 0x14(r5) +/* 8036F4D8 0036C438 7C 06 03 78 */ mr r6, r0 +/* 8036F4DC 0036C43C 80 A5 00 10 */ lwz r5, 0x10(r5) +/* 8036F4E0 0036C440 4B FF E4 45 */ bl ARStartDMA +lbl_8036F4E4: +/* 8036F4E4 0036C444 80 6D AB 6C */ lwz r3, lbl_805A972C@sda21(r13) +/* 8036F4E8 0036C448 80 8D AB 78 */ lwz r4, lbl_805A9738@sda21(r13) +/* 8036F4EC 0036C44C 80 03 00 18 */ lwz r0, 0x18(r3) +/* 8036F4F0 0036C450 7C 04 00 50 */ subf r0, r4, r0 +/* 8036F4F4 0036C454 90 03 00 18 */ stw r0, 0x18(r3) +/* 8036F4F8 0036C458 80 8D AB 6C */ lwz r4, lbl_805A972C@sda21(r13) +/* 8036F4FC 0036C45C 80 0D AB 78 */ lwz r0, lbl_805A9738@sda21(r13) +/* 8036F500 0036C460 80 64 00 10 */ lwz r3, 0x10(r4) +/* 8036F504 0036C464 7C 03 02 14 */ add r0, r3, r0 +/* 8036F508 0036C468 90 04 00 10 */ stw r0, 0x10(r4) +/* 8036F50C 0036C46C 80 8D AB 6C */ lwz r4, lbl_805A972C@sda21(r13) +/* 8036F510 0036C470 80 0D AB 78 */ lwz r0, lbl_805A9738@sda21(r13) +/* 8036F514 0036C474 80 64 00 14 */ lwz r3, 0x14(r4) +/* 8036F518 0036C478 7C 03 02 14 */ add r0, r3, r0 +/* 8036F51C 0036C47C 90 04 00 14 */ stw r0, 0x14(r4) +lbl_8036F520: +/* 8036F520 0036C480 80 01 00 0C */ lwz r0, 0xc(r1) +/* 8036F524 0036C484 38 21 00 08 */ addi r1, r1, 8 +/* 8036F528 0036C488 7C 08 03 A6 */ mtlr r0 +/* 8036F52C 0036C48C 4E 80 00 20 */ blr + +.global __ARQCallbackHack +__ARQCallbackHack: +/* 8036F530 0036C490 4E 80 00 20 */ blr + +.global __ARQInterruptServiceRoutine +__ARQInterruptServiceRoutine: +/* 8036F534 0036C494 7C 08 02 A6 */ mflr r0 +/* 8036F538 0036C498 90 01 00 04 */ stw r0, 4(r1) +/* 8036F53C 0036C49C 94 21 FF F8 */ stwu r1, -8(r1) +/* 8036F540 0036C4A0 81 8D AB 70 */ lwz r12, lbl_805A9730@sda21(r13) +/* 8036F544 0036C4A4 28 0C 00 00 */ cmplwi r12, 0 +/* 8036F548 0036C4A8 41 82 00 20 */ beq lbl_8036F568 +/* 8036F54C 0036C4AC 80 6D AB 68 */ lwz r3, lbl_805A9728@sda21(r13) +/* 8036F550 0036C4B0 7D 88 03 A6 */ mtlr r12 +/* 8036F554 0036C4B4 4E 80 00 21 */ blrl +/* 8036F558 0036C4B8 38 00 00 00 */ li r0, 0 +/* 8036F55C 0036C4BC 90 0D AB 68 */ stw r0, lbl_805A9728@sda21(r13) +/* 8036F560 0036C4C0 90 0D AB 70 */ stw r0, lbl_805A9730@sda21(r13) +/* 8036F564 0036C4C4 48 00 00 28 */ b lbl_8036F58C +lbl_8036F568: +/* 8036F568 0036C4C8 81 8D AB 74 */ lwz r12, lbl_805A9734@sda21(r13) +/* 8036F56C 0036C4CC 28 0C 00 00 */ cmplwi r12, 0 +/* 8036F570 0036C4D0 41 82 00 1C */ beq lbl_8036F58C +/* 8036F574 0036C4D4 80 6D AB 6C */ lwz r3, lbl_805A972C@sda21(r13) +/* 8036F578 0036C4D8 7D 88 03 A6 */ mtlr r12 +/* 8036F57C 0036C4DC 4E 80 00 21 */ blrl +/* 8036F580 0036C4E0 38 00 00 00 */ li r0, 0 +/* 8036F584 0036C4E4 90 0D AB 6C */ stw r0, lbl_805A972C@sda21(r13) +/* 8036F588 0036C4E8 90 0D AB 74 */ stw r0, lbl_805A9734@sda21(r13) +lbl_8036F58C: +/* 8036F58C 0036C4EC 80 CD AB 58 */ lwz r6, lbl_805A9718@sda21(r13) +/* 8036F590 0036C4F0 28 06 00 00 */ cmplwi r6, 0 +/* 8036F594 0036C4F4 41 82 00 4C */ beq lbl_8036F5E0 +/* 8036F598 0036C4F8 80 66 00 08 */ lwz r3, 8(r6) +/* 8036F59C 0036C4FC 28 03 00 00 */ cmplwi r3, 0 +/* 8036F5A0 0036C500 40 82 00 18 */ bne lbl_8036F5B8 +/* 8036F5A4 0036C504 80 86 00 10 */ lwz r4, 0x10(r6) +/* 8036F5A8 0036C508 80 A6 00 14 */ lwz r5, 0x14(r6) +/* 8036F5AC 0036C50C 80 C6 00 18 */ lwz r6, 0x18(r6) +/* 8036F5B0 0036C510 4B FF E3 75 */ bl ARStartDMA +/* 8036F5B4 0036C514 48 00 00 14 */ b lbl_8036F5C8 +lbl_8036F5B8: +/* 8036F5B8 0036C518 80 86 00 14 */ lwz r4, 0x14(r6) +/* 8036F5BC 0036C51C 80 A6 00 10 */ lwz r5, 0x10(r6) +/* 8036F5C0 0036C520 80 C6 00 18 */ lwz r6, 0x18(r6) +/* 8036F5C4 0036C524 4B FF E3 61 */ bl ARStartDMA +lbl_8036F5C8: +/* 8036F5C8 0036C528 80 6D AB 58 */ lwz r3, lbl_805A9718@sda21(r13) +/* 8036F5CC 0036C52C 80 03 00 1C */ lwz r0, 0x1c(r3) +/* 8036F5D0 0036C530 90 0D AB 70 */ stw r0, lbl_805A9730@sda21(r13) +/* 8036F5D4 0036C534 90 6D AB 68 */ stw r3, lbl_805A9728@sda21(r13) +/* 8036F5D8 0036C538 80 03 00 00 */ lwz r0, 0(r3) +/* 8036F5DC 0036C53C 90 0D AB 58 */ stw r0, lbl_805A9718@sda21(r13) +lbl_8036F5E0: +/* 8036F5E0 0036C540 80 0D AB 68 */ lwz r0, lbl_805A9728@sda21(r13) +/* 8036F5E4 0036C544 28 00 00 00 */ cmplwi r0, 0 +/* 8036F5E8 0036C548 40 82 00 08 */ bne lbl_8036F5F0 +/* 8036F5EC 0036C54C 4B FF FE 45 */ bl __ARQServiceQueueLo +lbl_8036F5F0: +/* 8036F5F0 0036C550 80 01 00 0C */ lwz r0, 0xc(r1) +/* 8036F5F4 0036C554 38 21 00 08 */ addi r1, r1, 8 +/* 8036F5F8 0036C558 7C 08 03 A6 */ mtlr r0 +/* 8036F5FC 0036C55C 4E 80 00 20 */ blr + +.global ARQInit +ARQInit: +/* 8036F600 0036C560 7C 08 02 A6 */ mflr r0 +/* 8036F604 0036C564 90 01 00 04 */ stw r0, 4(r1) +/* 8036F608 0036C568 94 21 FF F0 */ stwu r1, -0x10(r1) +/* 8036F60C 0036C56C 93 E1 00 0C */ stw r31, 0xc(r1) +/* 8036F610 0036C570 80 0D AB 7C */ lwz r0, lbl_805A973C@sda21(r13) +/* 8036F614 0036C574 2C 00 00 01 */ cmpwi r0, 1 +/* 8036F618 0036C578 41 82 00 44 */ beq lbl_8036F65C +/* 8036F61C 0036C57C 80 6D 9E B8 */ lwz r3, lbl_805A8A78@sda21(r13) +/* 8036F620 0036C580 48 00 EA 19 */ bl OSRegisterVersion +/* 8036F624 0036C584 3B E0 00 00 */ li r31, 0 +/* 8036F628 0036C588 38 00 10 00 */ li r0, 0x1000 +/* 8036F62C 0036C58C 93 ED AB 60 */ stw r31, lbl_805A9720@sda21(r13) +/* 8036F630 0036C590 3C 60 80 37 */ lis r3, __ARQInterruptServiceRoutine@ha +/* 8036F634 0036C594 93 ED AB 58 */ stw r31, lbl_805A9718@sda21(r13) +/* 8036F638 0036C598 38 63 F5 34 */ addi r3, r3, __ARQInterruptServiceRoutine@l +/* 8036F63C 0036C59C 90 0D AB 78 */ stw r0, lbl_805A9738@sda21(r13) +/* 8036F640 0036C5A0 4B FF E2 65 */ bl ARRegisterDMACallback +/* 8036F644 0036C5A4 38 00 00 01 */ li r0, 1 +/* 8036F648 0036C5A8 93 ED AB 68 */ stw r31, lbl_805A9728@sda21(r13) +/* 8036F64C 0036C5AC 93 ED AB 6C */ stw r31, lbl_805A972C@sda21(r13) +/* 8036F650 0036C5B0 93 ED AB 70 */ stw r31, lbl_805A9730@sda21(r13) +/* 8036F654 0036C5B4 93 ED AB 74 */ stw r31, lbl_805A9734@sda21(r13) +/* 8036F658 0036C5B8 90 0D AB 7C */ stw r0, lbl_805A973C@sda21(r13) +lbl_8036F65C: +/* 8036F65C 0036C5BC 80 01 00 14 */ lwz r0, 0x14(r1) +/* 8036F660 0036C5C0 83 E1 00 0C */ lwz r31, 0xc(r1) +/* 8036F664 0036C5C4 38 21 00 10 */ addi r1, r1, 0x10 +/* 8036F668 0036C5C8 7C 08 03 A6 */ mtlr r0 +/* 8036F66C 0036C5CC 4E 80 00 20 */ blr + +.global ARQPostRequest +ARQPostRequest: +/* 8036F670 0036C5D0 7C 08 02 A6 */ mflr r0 +/* 8036F674 0036C5D4 28 0A 00 00 */ cmplwi r10, 0 +/* 8036F678 0036C5D8 90 01 00 04 */ stw r0, 4(r1) +/* 8036F67C 0036C5DC 38 00 00 00 */ li r0, 0 +/* 8036F680 0036C5E0 94 21 FF C8 */ stwu r1, -0x38(r1) +/* 8036F684 0036C5E4 93 E1 00 34 */ stw r31, 0x34(r1) +/* 8036F688 0036C5E8 93 C1 00 30 */ stw r30, 0x30(r1) +/* 8036F68C 0036C5EC 3B C6 00 00 */ addi r30, r6, 0 +/* 8036F690 0036C5F0 93 A1 00 2C */ stw r29, 0x2c(r1) +/* 8036F694 0036C5F4 3B A3 00 00 */ addi r29, r3, 0 +/* 8036F698 0036C5F8 90 03 00 00 */ stw r0, 0(r3) +/* 8036F69C 0036C5FC 90 83 00 04 */ stw r4, 4(r3) +/* 8036F6A0 0036C600 90 A3 00 08 */ stw r5, 8(r3) +/* 8036F6A4 0036C604 90 E3 00 10 */ stw r7, 0x10(r3) +/* 8036F6A8 0036C608 91 03 00 14 */ stw r8, 0x14(r3) +/* 8036F6AC 0036C60C 91 23 00 18 */ stw r9, 0x18(r3) +/* 8036F6B0 0036C610 41 82 00 0C */ beq lbl_8036F6BC +/* 8036F6B4 0036C614 91 5D 00 1C */ stw r10, 0x1c(r29) +/* 8036F6B8 0036C618 48 00 00 10 */ b lbl_8036F6C8 +lbl_8036F6BC: +/* 8036F6BC 0036C61C 3C 60 80 37 */ lis r3, __ARQCallbackHack@ha +/* 8036F6C0 0036C620 38 03 F5 30 */ addi r0, r3, __ARQCallbackHack@l +/* 8036F6C4 0036C624 90 1D 00 1C */ stw r0, 0x1c(r29) +lbl_8036F6C8: +/* 8036F6C8 0036C628 48 01 1F 99 */ bl OSDisableInterrupts +/* 8036F6CC 0036C62C 2C 1E 00 01 */ cmpwi r30, 1 +/* 8036F6D0 0036C630 3B E3 00 00 */ addi r31, r3, 0 +/* 8036F6D4 0036C634 41 82 00 38 */ beq lbl_8036F70C +/* 8036F6D8 0036C638 40 80 00 54 */ bge lbl_8036F72C +/* 8036F6DC 0036C63C 2C 1E 00 00 */ cmpwi r30, 0 +/* 8036F6E0 0036C640 40 80 00 08 */ bge lbl_8036F6E8 +/* 8036F6E4 0036C644 48 00 00 48 */ b lbl_8036F72C +lbl_8036F6E8: +/* 8036F6E8 0036C648 80 0D AB 60 */ lwz r0, lbl_805A9720@sda21(r13) +/* 8036F6EC 0036C64C 28 00 00 00 */ cmplwi r0, 0 +/* 8036F6F0 0036C650 41 82 00 10 */ beq lbl_8036F700 +/* 8036F6F4 0036C654 80 6D AB 64 */ lwz r3, lbl_805A9724@sda21(r13) +/* 8036F6F8 0036C658 93 A3 00 00 */ stw r29, 0(r3) +/* 8036F6FC 0036C65C 48 00 00 08 */ b lbl_8036F704 +lbl_8036F700: +/* 8036F700 0036C660 93 AD AB 60 */ stw r29, lbl_805A9720@sda21(r13) +lbl_8036F704: +/* 8036F704 0036C664 93 AD AB 64 */ stw r29, lbl_805A9724@sda21(r13) +/* 8036F708 0036C668 48 00 00 24 */ b lbl_8036F72C +lbl_8036F70C: +/* 8036F70C 0036C66C 80 0D AB 58 */ lwz r0, lbl_805A9718@sda21(r13) +/* 8036F710 0036C670 28 00 00 00 */ cmplwi r0, 0 +/* 8036F714 0036C674 41 82 00 10 */ beq lbl_8036F724 +/* 8036F718 0036C678 80 6D AB 5C */ lwz r3, lbl_805A971C@sda21(r13) +/* 8036F71C 0036C67C 93 A3 00 00 */ stw r29, 0(r3) +/* 8036F720 0036C680 48 00 00 08 */ b lbl_8036F728 +lbl_8036F724: +/* 8036F724 0036C684 93 AD AB 58 */ stw r29, lbl_805A9718@sda21(r13) +lbl_8036F728: +/* 8036F728 0036C688 93 AD AB 5C */ stw r29, lbl_805A971C@sda21(r13) +lbl_8036F72C: +/* 8036F72C 0036C68C 80 0D AB 68 */ lwz r0, lbl_805A9728@sda21(r13) +/* 8036F730 0036C690 28 00 00 00 */ cmplwi r0, 0 +/* 8036F734 0036C694 40 82 00 74 */ bne lbl_8036F7A8 +/* 8036F738 0036C698 80 0D AB 6C */ lwz r0, lbl_805A972C@sda21(r13) +/* 8036F73C 0036C69C 28 00 00 00 */ cmplwi r0, 0 +/* 8036F740 0036C6A0 40 82 00 68 */ bne lbl_8036F7A8 +/* 8036F744 0036C6A4 80 CD AB 58 */ lwz r6, lbl_805A9718@sda21(r13) +/* 8036F748 0036C6A8 28 06 00 00 */ cmplwi r6, 0 +/* 8036F74C 0036C6AC 41 82 00 4C */ beq lbl_8036F798 +/* 8036F750 0036C6B0 80 66 00 08 */ lwz r3, 8(r6) +/* 8036F754 0036C6B4 28 03 00 00 */ cmplwi r3, 0 +/* 8036F758 0036C6B8 40 82 00 18 */ bne lbl_8036F770 +/* 8036F75C 0036C6BC 80 86 00 10 */ lwz r4, 0x10(r6) +/* 8036F760 0036C6C0 80 A6 00 14 */ lwz r5, 0x14(r6) +/* 8036F764 0036C6C4 80 C6 00 18 */ lwz r6, 0x18(r6) +/* 8036F768 0036C6C8 4B FF E1 BD */ bl ARStartDMA +/* 8036F76C 0036C6CC 48 00 00 14 */ b lbl_8036F780 +lbl_8036F770: +/* 8036F770 0036C6D0 80 86 00 14 */ lwz r4, 0x14(r6) +/* 8036F774 0036C6D4 80 A6 00 10 */ lwz r5, 0x10(r6) +/* 8036F778 0036C6D8 80 C6 00 18 */ lwz r6, 0x18(r6) +/* 8036F77C 0036C6DC 4B FF E1 A9 */ bl ARStartDMA +lbl_8036F780: +/* 8036F780 0036C6E0 80 6D AB 58 */ lwz r3, lbl_805A9718@sda21(r13) +/* 8036F784 0036C6E4 80 03 00 1C */ lwz r0, 0x1c(r3) +/* 8036F788 0036C6E8 90 0D AB 70 */ stw r0, lbl_805A9730@sda21(r13) +/* 8036F78C 0036C6EC 90 6D AB 68 */ stw r3, lbl_805A9728@sda21(r13) +/* 8036F790 0036C6F0 80 03 00 00 */ lwz r0, 0(r3) +/* 8036F794 0036C6F4 90 0D AB 58 */ stw r0, lbl_805A9718@sda21(r13) +lbl_8036F798: +/* 8036F798 0036C6F8 80 0D AB 68 */ lwz r0, lbl_805A9728@sda21(r13) +/* 8036F79C 0036C6FC 28 00 00 00 */ cmplwi r0, 0 +/* 8036F7A0 0036C700 40 82 00 08 */ bne lbl_8036F7A8 +/* 8036F7A4 0036C704 4B FF FC 8D */ bl __ARQServiceQueueLo +lbl_8036F7A8: +/* 8036F7A8 0036C708 7F E3 FB 78 */ mr r3, r31 +/* 8036F7AC 0036C70C 48 01 1E DD */ bl OSRestoreInterrupts +/* 8036F7B0 0036C710 80 01 00 3C */ lwz r0, 0x3c(r1) +/* 8036F7B4 0036C714 83 E1 00 34 */ lwz r31, 0x34(r1) +/* 8036F7B8 0036C718 83 C1 00 30 */ lwz r30, 0x30(r1) +/* 8036F7BC 0036C71C 83 A1 00 2C */ lwz r29, 0x2c(r1) +/* 8036F7C0 0036C720 38 21 00 38 */ addi r1, r1, 0x38 +/* 8036F7C4 0036C724 7C 08 03 A6 */ mtlr r0 +/* 8036F7C8 0036C728 4E 80 00 20 */ blr + +.global sub_8036f7cc +sub_8036f7cc: +/* 8036F7CC 0036C72C 80 6D AB 78 */ lwz r3, lbl_805A9738@sda21(r13) +/* 8036F7D0 0036C730 4E 80 00 20 */ blr diff --git a/asm/Dolphin/DSP/dsp.s b/asm/Dolphin/DSP/dsp.s new file mode 100644 index 00000000..cfa2d7ce --- /dev/null +++ b/asm/Dolphin/DSP/dsp.s @@ -0,0 +1,166 @@ +.include "macros.inc" + +.section .text, "ax" + +.global DSPCheckMailToDSP +DSPCheckMailToDSP: +/* 8036F9B8 0036C918 3C 60 CC 00 */ lis r3, 0xCC005000@ha +/* 8036F9BC 0036C91C A0 03 50 00 */ lhz r0, 0xCC005000@l(r3) +/* 8036F9C0 0036C920 54 03 8F FE */ rlwinm r3, r0, 0x11, 0x1f, 0x1f +/* 8036F9C4 0036C924 4E 80 00 20 */ blr + +.global DSPCheckMailFromDSP +DSPCheckMailFromDSP: +/* 8036F9C8 0036C928 3C 60 CC 00 */ lis r3, 0xCC005004@ha +/* 8036F9CC 0036C92C A0 03 50 04 */ lhz r0, 0xCC005004@l(r3) +/* 8036F9D0 0036C930 54 03 8F FE */ rlwinm r3, r0, 0x11, 0x1f, 0x1f +/* 8036F9D4 0036C934 4E 80 00 20 */ blr + +.global DSPReadMailFromDSP +DSPReadMailFromDSP: +/* 8036F9D8 0036C938 3C 60 CC 00 */ lis r3, 0xCC005000@ha +/* 8036F9DC 0036C93C 38 63 50 00 */ addi r3, r3, 0xCC005000@l +/* 8036F9E0 0036C940 A0 03 00 04 */ lhz r0, 4(r3) +/* 8036F9E4 0036C944 A0 63 00 06 */ lhz r3, 6(r3) +/* 8036F9E8 0036C948 50 03 80 1E */ rlwimi r3, r0, 0x10, 0, 0xf +/* 8036F9EC 0036C94C 4E 80 00 20 */ blr + +.global DSPSendMailToDSP +DSPSendMailToDSP: +/* 8036F9F0 0036C950 3C 80 CC 00 */ lis r4, 0xCC005000@ha +/* 8036F9F4 0036C954 54 60 84 3E */ srwi r0, r3, 0x10 +/* 8036F9F8 0036C958 B0 04 50 00 */ sth r0, 0xCC005000@l(r4) +/* 8036F9FC 0036C95C B0 64 50 02 */ sth r3, 0x5002(r4) +/* 8036FA00 0036C960 4E 80 00 20 */ blr + +.global DSPInit +DSPInit: +/* 8036FA04 0036C964 7C 08 02 A6 */ mflr r0 +/* 8036FA08 0036C968 3C 60 80 3F */ lis r3, lbl_803EF9D0@ha +/* 8036FA0C 0036C96C 90 01 00 04 */ stw r0, 4(r1) +/* 8036FA10 0036C970 38 A3 F9 D0 */ addi r5, r3, lbl_803EF9D0@l +/* 8036FA14 0036C974 4C C6 31 82 */ crclr 6 +/* 8036FA18 0036C978 38 65 00 48 */ addi r3, r5, 0x48 +/* 8036FA1C 0036C97C 94 21 FF F0 */ stwu r1, -0x10(r1) +/* 8036FA20 0036C980 38 85 00 68 */ addi r4, r5, 0x68 +/* 8036FA24 0036C984 93 E1 00 0C */ stw r31, 0xc(r1) +/* 8036FA28 0036C988 38 A5 00 74 */ addi r5, r5, 0x74 +/* 8036FA2C 0036C98C 48 00 01 A5 */ bl __DSP_debug_printf +/* 8036FA30 0036C990 80 0D AB 88 */ lwz r0, lbl_805A9748@sda21(r13) +/* 8036FA34 0036C994 2C 00 00 01 */ cmpwi r0, 1 +/* 8036FA38 0036C998 41 82 00 7C */ beq lbl_8036FAB4 +/* 8036FA3C 0036C99C 80 6D 9E C0 */ lwz r3, lbl_805A8A80@sda21(r13) +/* 8036FA40 0036C9A0 48 00 E5 F9 */ bl OSRegisterVersion +/* 8036FA44 0036C9A4 48 01 1C 1D */ bl OSDisableInterrupts +/* 8036FA48 0036C9A8 3C 80 80 37 */ lis r4, __DSPHandler@ha +/* 8036FA4C 0036C9AC 3B E3 00 00 */ addi r31, r3, 0 +/* 8036FA50 0036C9B0 38 84 FC 20 */ addi r4, r4, __DSPHandler@l +/* 8036FA54 0036C9B4 38 60 00 07 */ li r3, 7 +/* 8036FA58 0036C9B8 48 01 1C 55 */ bl __OSSetInterruptHandler +/* 8036FA5C 0036C9BC 3C 60 01 00 */ lis r3, 0x100 +/* 8036FA60 0036C9C0 48 01 20 51 */ bl __OSUnmaskInterrupts +/* 8036FA64 0036C9C4 3C 60 CC 00 */ lis r3, 0xCC005000@ha +/* 8036FA68 0036C9C8 38 C3 50 00 */ addi r6, r3, 0xCC005000@l +/* 8036FA6C 0036C9CC A0 63 50 0A */ lhz r3, 0x500a(r3) +/* 8036FA70 0036C9D0 38 00 FF 57 */ li r0, -169 +/* 8036FA74 0036C9D4 7C 60 00 38 */ and r0, r3, r0 +/* 8036FA78 0036C9D8 60 00 08 00 */ ori r0, r0, 0x800 +/* 8036FA7C 0036C9DC B0 06 00 0A */ sth r0, 0xa(r6) +/* 8036FA80 0036C9E0 38 A0 FF 53 */ li r5, -173 +/* 8036FA84 0036C9E4 38 80 00 00 */ li r4, 0 +/* 8036FA88 0036C9E8 A0 E6 00 0A */ lhz r7, 0xa(r6) +/* 8036FA8C 0036C9EC 38 00 00 01 */ li r0, 1 +/* 8036FA90 0036C9F0 38 7F 00 00 */ addi r3, r31, 0 +/* 8036FA94 0036C9F4 7C E5 28 38 */ and r5, r7, r5 +/* 8036FA98 0036C9F8 B0 A6 00 0A */ sth r5, 0xa(r6) +/* 8036FA9C 0036C9FC 90 8D AB 98 */ stw r4, lbl_805A9758@sda21(r13) +/* 8036FAA0 0036CA00 90 8D AB A4 */ stw r4, lbl_805A9764@sda21(r13) +/* 8036FAA4 0036CA04 90 8D AB 9C */ stw r4, lbl_805A975C@sda21(r13) +/* 8036FAA8 0036CA08 90 8D AB A0 */ stw r4, lbl_805A9760@sda21(r13) +/* 8036FAAC 0036CA0C 90 0D AB 88 */ stw r0, lbl_805A9748@sda21(r13) +/* 8036FAB0 0036CA10 48 01 1B D9 */ bl OSRestoreInterrupts +lbl_8036FAB4: +/* 8036FAB4 0036CA14 80 01 00 14 */ lwz r0, 0x14(r1) +/* 8036FAB8 0036CA18 83 E1 00 0C */ lwz r31, 0xc(r1) +/* 8036FABC 0036CA1C 38 21 00 10 */ addi r1, r1, 0x10 +/* 8036FAC0 0036CA20 7C 08 03 A6 */ mtlr r0 +/* 8036FAC4 0036CA24 4E 80 00 20 */ blr + +.global DSPReset +DSPReset: +/* 8036FAC8 0036CA28 7C 08 02 A6 */ mflr r0 +/* 8036FACC 0036CA2C 90 01 00 04 */ stw r0, 4(r1) +/* 8036FAD0 0036CA30 94 21 FF F8 */ stwu r1, -8(r1) +/* 8036FAD4 0036CA34 48 01 1B 8D */ bl OSDisableInterrupts +/* 8036FAD8 0036CA38 3C 80 CC 00 */ lis r4, 0xCC005000@ha +/* 8036FADC 0036CA3C 38 84 50 00 */ addi r4, r4, 0xCC005000@l +/* 8036FAE0 0036CA40 A0 A4 00 0A */ lhz r5, 0xa(r4) +/* 8036FAE4 0036CA44 38 00 FF 57 */ li r0, -169 +/* 8036FAE8 0036CA48 7C A0 00 38 */ and r0, r5, r0 +/* 8036FAEC 0036CA4C 60 00 08 01 */ ori r0, r0, 0x801 +/* 8036FAF0 0036CA50 B0 04 00 0A */ sth r0, 0xa(r4) +/* 8036FAF4 0036CA54 38 00 00 00 */ li r0, 0 +/* 8036FAF8 0036CA58 90 0D AB 88 */ stw r0, lbl_805A9748@sda21(r13) +/* 8036FAFC 0036CA5C 48 01 1B 8D */ bl OSRestoreInterrupts +/* 8036FB00 0036CA60 80 01 00 0C */ lwz r0, 0xc(r1) +/* 8036FB04 0036CA64 38 21 00 08 */ addi r1, r1, 8 +/* 8036FB08 0036CA68 7C 08 03 A6 */ mtlr r0 +/* 8036FB0C 0036CA6C 4E 80 00 20 */ blr + +.global DSPHalt +DSPHalt: +/* 8036FB10 0036CA70 7C 08 02 A6 */ mflr r0 +/* 8036FB14 0036CA74 90 01 00 04 */ stw r0, 4(r1) +/* 8036FB18 0036CA78 94 21 FF F8 */ stwu r1, -8(r1) +/* 8036FB1C 0036CA7C 48 01 1B 45 */ bl OSDisableInterrupts +/* 8036FB20 0036CA80 3C 80 CC 00 */ lis r4, 0xCC005000@ha +/* 8036FB24 0036CA84 38 84 50 00 */ addi r4, r4, 0xCC005000@l +/* 8036FB28 0036CA88 A0 A4 00 0A */ lhz r5, 0xa(r4) +/* 8036FB2C 0036CA8C 38 00 FF 57 */ li r0, -169 +/* 8036FB30 0036CA90 7C A0 00 38 */ and r0, r5, r0 +/* 8036FB34 0036CA94 60 00 00 04 */ ori r0, r0, 4 +/* 8036FB38 0036CA98 B0 04 00 0A */ sth r0, 0xa(r4) +/* 8036FB3C 0036CA9C 48 01 1B 4D */ bl OSRestoreInterrupts +/* 8036FB40 0036CAA0 80 01 00 0C */ lwz r0, 0xc(r1) +/* 8036FB44 0036CAA4 38 21 00 08 */ addi r1, r1, 8 +/* 8036FB48 0036CAA8 7C 08 03 A6 */ mtlr r0 +/* 8036FB4C 0036CAAC 4E 80 00 20 */ blr + +.global DSPGetDMAStatus +DSPGetDMAStatus: +/* 8036FB50 0036CAB0 3C 60 CC 00 */ lis r3, 0xCC00500A@ha +/* 8036FB54 0036CAB4 A0 03 50 0A */ lhz r0, 0xCC00500A@l(r3) +/* 8036FB58 0036CAB8 54 03 05 AC */ rlwinm r3, r0, 0, 0x16, 0x16 +/* 8036FB5C 0036CABC 4E 80 00 20 */ blr + +.global DSPAddTask +DSPAddTask: +/* 8036FB60 0036CAC0 7C 08 02 A6 */ mflr r0 +/* 8036FB64 0036CAC4 90 01 00 04 */ stw r0, 4(r1) +/* 8036FB68 0036CAC8 94 21 FF E8 */ stwu r1, -0x18(r1) +/* 8036FB6C 0036CACC 93 E1 00 14 */ stw r31, 0x14(r1) +/* 8036FB70 0036CAD0 93 C1 00 10 */ stw r30, 0x10(r1) +/* 8036FB74 0036CAD4 7C 7E 1B 78 */ mr r30, r3 +/* 8036FB78 0036CAD8 48 01 1A E9 */ bl OSDisableInterrupts +/* 8036FB7C 0036CADC 3B E3 00 00 */ addi r31, r3, 0 +/* 8036FB80 0036CAE0 38 7E 00 00 */ addi r3, r30, 0 +/* 8036FB84 0036CAE4 48 00 07 ED */ bl __DSP_insert_task +/* 8036FB88 0036CAE8 38 00 00 00 */ li r0, 0 +/* 8036FB8C 0036CAEC 90 1E 00 00 */ stw r0, 0(r30) +/* 8036FB90 0036CAF0 38 00 00 01 */ li r0, 1 +/* 8036FB94 0036CAF4 38 7F 00 00 */ addi r3, r31, 0 +/* 8036FB98 0036CAF8 90 1E 00 08 */ stw r0, 8(r30) +/* 8036FB9C 0036CAFC 48 01 1A ED */ bl OSRestoreInterrupts +/* 8036FBA0 0036CB00 80 0D AB A0 */ lwz r0, lbl_805A9760@sda21(r13) +/* 8036FBA4 0036CB04 7C 1E 00 40 */ cmplw r30, r0 +/* 8036FBA8 0036CB08 40 82 00 0C */ bne lbl_8036FBB4 +/* 8036FBAC 0036CB0C 7F C3 F3 78 */ mr r3, r30 +/* 8036FBB0 0036CB10 48 00 06 35 */ bl __DSP_boot_task +lbl_8036FBB4: +/* 8036FBB4 0036CB14 7F C3 F3 78 */ mr r3, r30 +/* 8036FBB8 0036CB18 80 01 00 1C */ lwz r0, 0x1c(r1) +/* 8036FBBC 0036CB1C 83 E1 00 14 */ lwz r31, 0x14(r1) +/* 8036FBC0 0036CB20 83 C1 00 10 */ lwz r30, 0x10(r1) +/* 8036FBC4 0036CB24 38 21 00 18 */ addi r1, r1, 0x18 +/* 8036FBC8 0036CB28 7C 08 03 A6 */ mtlr r0 +/* 8036FBCC 0036CB2C 4E 80 00 20 */ blr diff --git a/asm/Dolphin/DSP/dsp_debug.s b/asm/Dolphin/DSP/dsp_debug.s new file mode 100644 index 00000000..1023a0c4 --- /dev/null +++ b/asm/Dolphin/DSP/dsp_debug.s @@ -0,0 +1,27 @@ +.include "macros.inc" + +.section .text, "ax" + +.global __DSP_debug_printf +__DSP_debug_printf: +/* 8036FBD0 0036CB30 94 21 FF 90 */ stwu r1, -0x70(r1) +/* 8036FBD4 0036CB34 40 86 00 24 */ bne cr1, lbl_8036FBF8 +/* 8036FBD8 0036CB38 D8 21 00 28 */ stfd f1, 0x28(r1) +/* 8036FBDC 0036CB3C D8 41 00 30 */ stfd f2, 0x30(r1) +/* 8036FBE0 0036CB40 D8 61 00 38 */ stfd f3, 0x38(r1) +/* 8036FBE4 0036CB44 D8 81 00 40 */ stfd f4, 0x40(r1) +/* 8036FBE8 0036CB48 D8 A1 00 48 */ stfd f5, 0x48(r1) +/* 8036FBEC 0036CB4C D8 C1 00 50 */ stfd f6, 0x50(r1) +/* 8036FBF0 0036CB50 D8 E1 00 58 */ stfd f7, 0x58(r1) +/* 8036FBF4 0036CB54 D9 01 00 60 */ stfd f8, 0x60(r1) +lbl_8036FBF8: +/* 8036FBF8 0036CB58 90 61 00 08 */ stw r3, 8(r1) +/* 8036FBFC 0036CB5C 90 81 00 0C */ stw r4, 0xc(r1) +/* 8036FC00 0036CB60 90 A1 00 10 */ stw r5, 0x10(r1) +/* 8036FC04 0036CB64 90 C1 00 14 */ stw r6, 0x14(r1) +/* 8036FC08 0036CB68 90 E1 00 18 */ stw r7, 0x18(r1) +/* 8036FC0C 0036CB6C 91 01 00 1C */ stw r8, 0x1c(r1) +/* 8036FC10 0036CB70 91 21 00 20 */ stw r9, 0x20(r1) +/* 8036FC14 0036CB74 91 41 00 24 */ stw r10, 0x24(r1) +/* 8036FC18 0036CB78 38 21 00 70 */ addi r1, r1, 0x70 +/* 8036FC1C 0036CB7C 4E 80 00 20 */ blr diff --git a/asm/Dolphin/DSP/dsp_task.s b/asm/Dolphin/DSP/dsp_task.s new file mode 100644 index 00000000..26365f4b --- /dev/null +++ b/asm/Dolphin/DSP/dsp_task.s @@ -0,0 +1,634 @@ +.include "macros.inc" + +.section .text, "ax" + +.global __DSPHandler +__DSPHandler: +/* 8036FC20 0036CB80 7C 08 02 A6 */ mflr r0 +/* 8036FC24 0036CB84 3C 60 CC 00 */ lis r3, 0xCC005000@ha +/* 8036FC28 0036CB88 90 01 00 04 */ stw r0, 4(r1) +/* 8036FC2C 0036CB8C 38 63 50 00 */ addi r3, r3, 0xCC005000@l +/* 8036FC30 0036CB90 38 00 FF D7 */ li r0, -41 +/* 8036FC34 0036CB94 94 21 FD 18 */ stwu r1, -0x2e8(r1) +/* 8036FC38 0036CB98 93 E1 02 E4 */ stw r31, 0x2e4(r1) +/* 8036FC3C 0036CB9C 3B E4 00 00 */ addi r31, r4, 0 +/* 8036FC40 0036CBA0 A0 A3 00 0A */ lhz r5, 0xa(r3) +/* 8036FC44 0036CBA4 7C A0 00 38 */ and r0, r5, r0 +/* 8036FC48 0036CBA8 60 00 00 80 */ ori r0, r0, 0x80 +/* 8036FC4C 0036CBAC B0 03 00 0A */ sth r0, 0xa(r3) +/* 8036FC50 0036CBB0 38 61 00 10 */ addi r3, r1, 0x10 +/* 8036FC54 0036CBB4 48 00 F9 C1 */ bl OSClearContext +/* 8036FC58 0036CBB8 38 61 00 10 */ addi r3, r1, 0x10 +/* 8036FC5C 0036CBBC 48 00 F7 C1 */ bl OSSetCurrentContext +lbl_8036FC60: +/* 8036FC60 0036CBC0 4B FF FD 69 */ bl DSPCheckMailFromDSP +/* 8036FC64 0036CBC4 28 03 00 00 */ cmplwi r3, 0 +/* 8036FC68 0036CBC8 41 82 FF F8 */ beq lbl_8036FC60 +/* 8036FC6C 0036CBCC 4B FF FD 6D */ bl DSPReadMailFromDSP +/* 8036FC70 0036CBD0 80 AD AB A4 */ lwz r5, lbl_805A9764@sda21(r13) +/* 8036FC74 0036CBD4 80 05 00 08 */ lwz r0, 8(r5) +/* 8036FC78 0036CBD8 54 00 07 BD */ rlwinm. r0, r0, 0, 0x1e, 0x1e +/* 8036FC7C 0036CBDC 41 82 00 18 */ beq lbl_8036FC94 +/* 8036FC80 0036CBE0 3C 03 23 2F */ addis r0, r3, 0x232f +/* 8036FC84 0036CBE4 28 00 00 02 */ cmplwi r0, 2 +/* 8036FC88 0036CBE8 40 82 00 0C */ bne lbl_8036FC94 +/* 8036FC8C 0036CBEC 3C 60 DC D1 */ lis r3, 0xDCD10003@ha +/* 8036FC90 0036CBF0 38 63 00 03 */ addi r3, r3, 0xDCD10003@l +lbl_8036FC94: +/* 8036FC94 0036CBF4 3C 80 DC D1 */ lis r4, 0xDCD10002@ha +/* 8036FC98 0036CBF8 38 04 00 02 */ addi r0, r4, 0xDCD10002@l +/* 8036FC9C 0036CBFC 7C 03 00 00 */ cmpw r3, r0 +/* 8036FCA0 0036CC00 41 82 00 74 */ beq lbl_8036FD14 +/* 8036FCA4 0036CC04 40 80 00 14 */ bge lbl_8036FCB8 +/* 8036FCA8 0036CC08 7C 03 20 00 */ cmpw r3, r4 +/* 8036FCAC 0036CC0C 41 82 00 20 */ beq lbl_8036FCCC +/* 8036FCB0 0036CC10 40 80 00 40 */ bge lbl_8036FCF0 +/* 8036FCB4 0036CC14 48 00 03 6C */ b lbl_80370020 +lbl_8036FCB8: +/* 8036FCB8 0036CC18 38 04 00 04 */ addi r0, r4, 4 +/* 8036FCBC 0036CC1C 7C 03 00 00 */ cmpw r3, r0 +/* 8036FCC0 0036CC20 41 82 03 48 */ beq lbl_80370008 +/* 8036FCC4 0036CC24 40 80 03 5C */ bge lbl_80370020 +/* 8036FCC8 0036CC28 48 00 01 B4 */ b lbl_8036FE7C +lbl_8036FCCC: +/* 8036FCCC 0036CC2C 38 00 00 01 */ li r0, 1 +/* 8036FCD0 0036CC30 90 05 00 00 */ stw r0, 0(r5) +/* 8036FCD4 0036CC34 80 6D AB A4 */ lwz r3, lbl_805A9764@sda21(r13) +/* 8036FCD8 0036CC38 81 83 00 28 */ lwz r12, 0x28(r3) +/* 8036FCDC 0036CC3C 28 0C 00 00 */ cmplwi r12, 0 +/* 8036FCE0 0036CC40 41 82 03 40 */ beq lbl_80370020 +/* 8036FCE4 0036CC44 7D 88 03 A6 */ mtlr r12 +/* 8036FCE8 0036CC48 4E 80 00 21 */ blrl +/* 8036FCEC 0036CC4C 48 00 03 34 */ b lbl_80370020 +lbl_8036FCF0: +/* 8036FCF0 0036CC50 38 00 00 01 */ li r0, 1 +/* 8036FCF4 0036CC54 90 05 00 00 */ stw r0, 0(r5) +/* 8036FCF8 0036CC58 80 6D AB A4 */ lwz r3, lbl_805A9764@sda21(r13) +/* 8036FCFC 0036CC5C 81 83 00 2C */ lwz r12, 0x2c(r3) +/* 8036FD00 0036CC60 28 0C 00 00 */ cmplwi r12, 0 +/* 8036FD04 0036CC64 41 82 03 1C */ beq lbl_80370020 +/* 8036FD08 0036CC68 7D 88 03 A6 */ mtlr r12 +/* 8036FD0C 0036CC6C 4E 80 00 21 */ blrl +/* 8036FD10 0036CC70 48 00 03 10 */ b lbl_80370020 +lbl_8036FD14: +/* 8036FD14 0036CC74 80 0D AB 90 */ lwz r0, lbl_805A9750@sda21(r13) +/* 8036FD18 0036CC78 2C 00 00 00 */ cmpwi r0, 0 +/* 8036FD1C 0036CC7C 41 82 00 98 */ beq lbl_8036FDB4 +/* 8036FD20 0036CC80 80 0D AB 94 */ lwz r0, lbl_805A9754@sda21(r13) +/* 8036FD24 0036CC84 7C 05 00 40 */ cmplw r5, r0 +/* 8036FD28 0036CC88 40 82 00 44 */ bne lbl_8036FD6C +/* 8036FD2C 0036CC8C 3C 60 CD D1 */ lis r3, 0xCDD10003@ha +/* 8036FD30 0036CC90 38 63 00 03 */ addi r3, r3, 0xCDD10003@l +/* 8036FD34 0036CC94 4B FF FC BD */ bl DSPSendMailToDSP +lbl_8036FD38: +/* 8036FD38 0036CC98 4B FF FC 81 */ bl DSPCheckMailToDSP +/* 8036FD3C 0036CC9C 28 03 00 00 */ cmplwi r3, 0 +/* 8036FD40 0036CCA0 40 82 FF F8 */ bne lbl_8036FD38 +/* 8036FD44 0036CCA4 38 00 00 00 */ li r0, 0 +/* 8036FD48 0036CCA8 80 6D AB A4 */ lwz r3, lbl_805A9764@sda21(r13) +/* 8036FD4C 0036CCAC 90 0D AB 94 */ stw r0, lbl_805A9754@sda21(r13) +/* 8036FD50 0036CCB0 90 0D AB 90 */ stw r0, lbl_805A9750@sda21(r13) +/* 8036FD54 0036CCB4 81 83 00 2C */ lwz r12, 0x2c(r3) +/* 8036FD58 0036CCB8 28 0C 00 00 */ cmplwi r12, 0 +/* 8036FD5C 0036CCBC 41 82 02 C4 */ beq lbl_80370020 +/* 8036FD60 0036CCC0 7D 88 03 A6 */ mtlr r12 +/* 8036FD64 0036CCC4 4E 80 00 21 */ blrl +/* 8036FD68 0036CCC8 48 00 02 B8 */ b lbl_80370020 +lbl_8036FD6C: +/* 8036FD6C 0036CCCC 3C 60 CD D1 */ lis r3, 0xCDD10001@ha +/* 8036FD70 0036CCD0 38 63 00 01 */ addi r3, r3, 0xCDD10001@l +/* 8036FD74 0036CCD4 4B FF FC 7D */ bl DSPSendMailToDSP +lbl_8036FD78: +/* 8036FD78 0036CCD8 4B FF FC 41 */ bl DSPCheckMailToDSP +/* 8036FD7C 0036CCDC 28 03 00 00 */ cmplwi r3, 0 +/* 8036FD80 0036CCE0 40 82 FF F8 */ bne lbl_8036FD78 +/* 8036FD84 0036CCE4 80 6D AB A4 */ lwz r3, lbl_805A9764@sda21(r13) +/* 8036FD88 0036CCE8 80 8D AB 94 */ lwz r4, lbl_805A9754@sda21(r13) +/* 8036FD8C 0036CCEC 48 00 02 B9 */ bl __DSP_exec_task +/* 8036FD90 0036CCF0 80 6D AB A4 */ lwz r3, lbl_805A9764@sda21(r13) +/* 8036FD94 0036CCF4 38 80 00 02 */ li r4, 2 +/* 8036FD98 0036CCF8 38 00 00 00 */ li r0, 0 +/* 8036FD9C 0036CCFC 90 83 00 00 */ stw r4, 0(r3) +/* 8036FDA0 0036CD00 80 6D AB 94 */ lwz r3, lbl_805A9754@sda21(r13) +/* 8036FDA4 0036CD04 90 0D AB 90 */ stw r0, lbl_805A9750@sda21(r13) +/* 8036FDA8 0036CD08 90 6D AB A4 */ stw r3, lbl_805A9764@sda21(r13) +/* 8036FDAC 0036CD0C 90 0D AB 94 */ stw r0, lbl_805A9754@sda21(r13) +/* 8036FDB0 0036CD10 48 00 02 70 */ b lbl_80370020 +lbl_8036FDB4: +/* 8036FDB4 0036CD14 80 05 00 38 */ lwz r0, 0x38(r5) +/* 8036FDB8 0036CD18 28 00 00 00 */ cmplwi r0, 0 +/* 8036FDBC 0036CD1C 40 82 00 80 */ bne lbl_8036FE3C +/* 8036FDC0 0036CD20 80 0D AB A0 */ lwz r0, lbl_805A9760@sda21(r13) +/* 8036FDC4 0036CD24 7C 05 00 40 */ cmplw r5, r0 +/* 8036FDC8 0036CD28 40 82 00 38 */ bne lbl_8036FE00 +/* 8036FDCC 0036CD2C 3C 60 CD D1 */ lis r3, 0xCDD10003@ha +/* 8036FDD0 0036CD30 38 63 00 03 */ addi r3, r3, 0xCDD10003@l +/* 8036FDD4 0036CD34 4B FF FC 1D */ bl DSPSendMailToDSP +lbl_8036FDD8: +/* 8036FDD8 0036CD38 4B FF FB E1 */ bl DSPCheckMailToDSP +/* 8036FDDC 0036CD3C 28 03 00 00 */ cmplwi r3, 0 +/* 8036FDE0 0036CD40 40 82 FF F8 */ bne lbl_8036FDD8 +/* 8036FDE4 0036CD44 80 6D AB A4 */ lwz r3, lbl_805A9764@sda21(r13) +/* 8036FDE8 0036CD48 81 83 00 2C */ lwz r12, 0x2c(r3) +/* 8036FDEC 0036CD4C 28 0C 00 00 */ cmplwi r12, 0 +/* 8036FDF0 0036CD50 41 82 02 30 */ beq lbl_80370020 +/* 8036FDF4 0036CD54 7D 88 03 A6 */ mtlr r12 +/* 8036FDF8 0036CD58 4E 80 00 21 */ blrl +/* 8036FDFC 0036CD5C 48 00 02 24 */ b lbl_80370020 +lbl_8036FE00: +/* 8036FE00 0036CD60 3C 60 CD D1 */ lis r3, 0xCDD10001@ha +/* 8036FE04 0036CD64 38 63 00 01 */ addi r3, r3, 0xCDD10001@l +/* 8036FE08 0036CD68 4B FF FB E9 */ bl DSPSendMailToDSP +lbl_8036FE0C: +/* 8036FE0C 0036CD6C 4B FF FB AD */ bl DSPCheckMailToDSP +/* 8036FE10 0036CD70 28 03 00 00 */ cmplwi r3, 0 +/* 8036FE14 0036CD74 40 82 FF F8 */ bne lbl_8036FE0C +/* 8036FE18 0036CD78 80 6D AB A4 */ lwz r3, lbl_805A9764@sda21(r13) +/* 8036FE1C 0036CD7C 80 8D AB A0 */ lwz r4, lbl_805A9760@sda21(r13) +/* 8036FE20 0036CD80 48 00 02 25 */ bl __DSP_exec_task +/* 8036FE24 0036CD84 80 6D AB A4 */ lwz r3, lbl_805A9764@sda21(r13) +/* 8036FE28 0036CD88 38 00 00 02 */ li r0, 2 +/* 8036FE2C 0036CD8C 90 03 00 00 */ stw r0, 0(r3) +/* 8036FE30 0036CD90 80 0D AB A0 */ lwz r0, lbl_805A9760@sda21(r13) +/* 8036FE34 0036CD94 90 0D AB A4 */ stw r0, lbl_805A9764@sda21(r13) +/* 8036FE38 0036CD98 48 00 01 E8 */ b lbl_80370020 +lbl_8036FE3C: +/* 8036FE3C 0036CD9C 3C 60 CD D1 */ lis r3, 0xCDD10001@ha +/* 8036FE40 0036CDA0 38 63 00 01 */ addi r3, r3, 0xCDD10001@l +/* 8036FE44 0036CDA4 4B FF FB AD */ bl DSPSendMailToDSP +lbl_8036FE48: +/* 8036FE48 0036CDA8 4B FF FB 71 */ bl DSPCheckMailToDSP +/* 8036FE4C 0036CDAC 28 03 00 00 */ cmplwi r3, 0 +/* 8036FE50 0036CDB0 40 82 FF F8 */ bne lbl_8036FE48 +/* 8036FE54 0036CDB4 80 6D AB A4 */ lwz r3, lbl_805A9764@sda21(r13) +/* 8036FE58 0036CDB8 80 83 00 38 */ lwz r4, 0x38(r3) +/* 8036FE5C 0036CDBC 48 00 01 E9 */ bl __DSP_exec_task +/* 8036FE60 0036CDC0 80 6D AB A4 */ lwz r3, lbl_805A9764@sda21(r13) +/* 8036FE64 0036CDC4 38 00 00 02 */ li r0, 2 +/* 8036FE68 0036CDC8 90 03 00 00 */ stw r0, 0(r3) +/* 8036FE6C 0036CDCC 80 6D AB A4 */ lwz r3, lbl_805A9764@sda21(r13) +/* 8036FE70 0036CDD0 80 03 00 38 */ lwz r0, 0x38(r3) +/* 8036FE74 0036CDD4 90 0D AB A4 */ stw r0, lbl_805A9764@sda21(r13) +/* 8036FE78 0036CDD8 48 00 01 A8 */ b lbl_80370020 +lbl_8036FE7C: +/* 8036FE7C 0036CDDC 80 0D AB 90 */ lwz r0, lbl_805A9750@sda21(r13) +/* 8036FE80 0036CDE0 2C 00 00 00 */ cmpwi r0, 0 +/* 8036FE84 0036CDE4 41 82 00 60 */ beq lbl_8036FEE4 +/* 8036FE88 0036CDE8 81 85 00 30 */ lwz r12, 0x30(r5) +/* 8036FE8C 0036CDEC 28 0C 00 00 */ cmplwi r12, 0 +/* 8036FE90 0036CDF0 41 82 00 10 */ beq lbl_8036FEA0 +/* 8036FE94 0036CDF4 7D 88 03 A6 */ mtlr r12 +/* 8036FE98 0036CDF8 38 65 00 00 */ addi r3, r5, 0 +/* 8036FE9C 0036CDFC 4E 80 00 21 */ blrl +lbl_8036FEA0: +/* 8036FEA0 0036CE00 3C 60 CD D1 */ lis r3, 0xCDD10001@ha +/* 8036FEA4 0036CE04 38 63 00 01 */ addi r3, r3, 0xCDD10001@l +/* 8036FEA8 0036CE08 4B FF FB 49 */ bl DSPSendMailToDSP +lbl_8036FEAC: +/* 8036FEAC 0036CE0C 4B FF FB 0D */ bl DSPCheckMailToDSP +/* 8036FEB0 0036CE10 28 03 00 00 */ cmplwi r3, 0 +/* 8036FEB4 0036CE14 40 82 FF F8 */ bne lbl_8036FEAC +/* 8036FEB8 0036CE18 38 60 00 00 */ li r3, 0 +/* 8036FEBC 0036CE1C 80 8D AB 94 */ lwz r4, lbl_805A9754@sda21(r13) +/* 8036FEC0 0036CE20 48 00 01 85 */ bl __DSP_exec_task +/* 8036FEC4 0036CE24 80 6D AB A4 */ lwz r3, lbl_805A9764@sda21(r13) +/* 8036FEC8 0036CE28 48 00 05 49 */ bl __DSP_remove_task +/* 8036FECC 0036CE2C 80 6D AB 94 */ lwz r3, lbl_805A9754@sda21(r13) +/* 8036FED0 0036CE30 38 00 00 00 */ li r0, 0 +/* 8036FED4 0036CE34 90 0D AB 90 */ stw r0, lbl_805A9750@sda21(r13) +/* 8036FED8 0036CE38 90 6D AB A4 */ stw r3, lbl_805A9764@sda21(r13) +/* 8036FEDC 0036CE3C 90 0D AB 94 */ stw r0, lbl_805A9754@sda21(r13) +/* 8036FEE0 0036CE40 48 00 01 40 */ b lbl_80370020 +lbl_8036FEE4: +/* 8036FEE4 0036CE44 80 05 00 38 */ lwz r0, 0x38(r5) +/* 8036FEE8 0036CE48 28 00 00 00 */ cmplwi r0, 0 +/* 8036FEEC 0036CE4C 40 82 00 B4 */ bne lbl_8036FFA0 +/* 8036FEF0 0036CE50 80 0D AB A0 */ lwz r0, lbl_805A9760@sda21(r13) +/* 8036FEF4 0036CE54 7C 05 00 40 */ cmplw r5, r0 +/* 8036FEF8 0036CE58 40 82 00 4C */ bne lbl_8036FF44 +/* 8036FEFC 0036CE5C 81 85 00 30 */ lwz r12, 0x30(r5) +/* 8036FF00 0036CE60 28 0C 00 00 */ cmplwi r12, 0 +/* 8036FF04 0036CE64 41 82 00 10 */ beq lbl_8036FF14 +/* 8036FF08 0036CE68 7D 88 03 A6 */ mtlr r12 +/* 8036FF0C 0036CE6C 38 65 00 00 */ addi r3, r5, 0 +/* 8036FF10 0036CE70 4E 80 00 21 */ blrl +lbl_8036FF14: +/* 8036FF14 0036CE74 3C 60 CD D1 */ lis r3, 0xCDD10002@ha +/* 8036FF18 0036CE78 38 63 00 02 */ addi r3, r3, 0xCDD10002@l +/* 8036FF1C 0036CE7C 4B FF FA D5 */ bl DSPSendMailToDSP +lbl_8036FF20: +/* 8036FF20 0036CE80 4B FF FA 99 */ bl DSPCheckMailToDSP +/* 8036FF24 0036CE84 28 03 00 00 */ cmplwi r3, 0 +/* 8036FF28 0036CE88 40 82 FF F8 */ bne lbl_8036FF20 +/* 8036FF2C 0036CE8C 80 6D AB A4 */ lwz r3, lbl_805A9764@sda21(r13) +/* 8036FF30 0036CE90 38 00 00 03 */ li r0, 3 +/* 8036FF34 0036CE94 90 03 00 00 */ stw r0, 0(r3) +/* 8036FF38 0036CE98 80 6D AB A4 */ lwz r3, lbl_805A9764@sda21(r13) +/* 8036FF3C 0036CE9C 48 00 04 D5 */ bl __DSP_remove_task +/* 8036FF40 0036CEA0 48 00 00 E0 */ b lbl_80370020 +lbl_8036FF44: +/* 8036FF44 0036CEA4 81 85 00 30 */ lwz r12, 0x30(r5) +/* 8036FF48 0036CEA8 28 0C 00 00 */ cmplwi r12, 0 +/* 8036FF4C 0036CEAC 41 82 00 10 */ beq lbl_8036FF5C +/* 8036FF50 0036CEB0 7D 88 03 A6 */ mtlr r12 +/* 8036FF54 0036CEB4 38 65 00 00 */ addi r3, r5, 0 +/* 8036FF58 0036CEB8 4E 80 00 21 */ blrl +lbl_8036FF5C: +/* 8036FF5C 0036CEBC 3C 60 CD D1 */ lis r3, 0xCDD10001@ha +/* 8036FF60 0036CEC0 38 63 00 01 */ addi r3, r3, 0xCDD10001@l +/* 8036FF64 0036CEC4 4B FF FA 8D */ bl DSPSendMailToDSP +lbl_8036FF68: +/* 8036FF68 0036CEC8 4B FF FA 51 */ bl DSPCheckMailToDSP +/* 8036FF6C 0036CECC 28 03 00 00 */ cmplwi r3, 0 +/* 8036FF70 0036CED0 40 82 FF F8 */ bne lbl_8036FF68 +/* 8036FF74 0036CED4 80 8D AB A4 */ lwz r4, lbl_805A9764@sda21(r13) +/* 8036FF78 0036CED8 38 00 00 03 */ li r0, 3 +/* 8036FF7C 0036CEDC 38 60 00 00 */ li r3, 0 +/* 8036FF80 0036CEE0 90 04 00 00 */ stw r0, 0(r4) +/* 8036FF84 0036CEE4 80 8D AB A0 */ lwz r4, lbl_805A9760@sda21(r13) +/* 8036FF88 0036CEE8 48 00 00 BD */ bl __DSP_exec_task +/* 8036FF8C 0036CEEC 80 0D AB A0 */ lwz r0, lbl_805A9760@sda21(r13) +/* 8036FF90 0036CEF0 80 6D AB 9C */ lwz r3, lbl_805A975C@sda21(r13) +/* 8036FF94 0036CEF4 90 0D AB A4 */ stw r0, lbl_805A9764@sda21(r13) +/* 8036FF98 0036CEF8 48 00 04 79 */ bl __DSP_remove_task +/* 8036FF9C 0036CEFC 48 00 00 84 */ b lbl_80370020 +lbl_8036FFA0: +/* 8036FFA0 0036CF00 81 85 00 30 */ lwz r12, 0x30(r5) +/* 8036FFA4 0036CF04 28 0C 00 00 */ cmplwi r12, 0 +/* 8036FFA8 0036CF08 41 82 00 10 */ beq lbl_8036FFB8 +/* 8036FFAC 0036CF0C 7D 88 03 A6 */ mtlr r12 +/* 8036FFB0 0036CF10 38 65 00 00 */ addi r3, r5, 0 +/* 8036FFB4 0036CF14 4E 80 00 21 */ blrl +lbl_8036FFB8: +/* 8036FFB8 0036CF18 3C 60 CD D1 */ lis r3, 0xCDD10001@ha +/* 8036FFBC 0036CF1C 38 63 00 01 */ addi r3, r3, 0xCDD10001@l +/* 8036FFC0 0036CF20 4B FF FA 31 */ bl DSPSendMailToDSP +lbl_8036FFC4: +/* 8036FFC4 0036CF24 4B FF F9 F5 */ bl DSPCheckMailToDSP +/* 8036FFC8 0036CF28 28 03 00 00 */ cmplwi r3, 0 +/* 8036FFCC 0036CF2C 40 82 FF F8 */ bne lbl_8036FFC4 +/* 8036FFD0 0036CF30 80 8D AB A4 */ lwz r4, lbl_805A9764@sda21(r13) +/* 8036FFD4 0036CF34 38 00 00 03 */ li r0, 3 +/* 8036FFD8 0036CF38 38 60 00 00 */ li r3, 0 +/* 8036FFDC 0036CF3C 90 04 00 00 */ stw r0, 0(r4) +/* 8036FFE0 0036CF40 80 8D AB A4 */ lwz r4, lbl_805A9764@sda21(r13) +/* 8036FFE4 0036CF44 80 84 00 38 */ lwz r4, 0x38(r4) +/* 8036FFE8 0036CF48 48 00 00 5D */ bl __DSP_exec_task +/* 8036FFEC 0036CF4C 80 6D AB A4 */ lwz r3, lbl_805A9764@sda21(r13) +/* 8036FFF0 0036CF50 80 03 00 38 */ lwz r0, 0x38(r3) +/* 8036FFF4 0036CF54 90 0D AB A4 */ stw r0, lbl_805A9764@sda21(r13) +/* 8036FFF8 0036CF58 80 6D AB A4 */ lwz r3, lbl_805A9764@sda21(r13) +/* 8036FFFC 0036CF5C 80 63 00 3C */ lwz r3, 0x3c(r3) +/* 80370000 0036CF60 48 00 04 11 */ bl __DSP_remove_task +/* 80370004 0036CF64 48 00 00 1C */ b lbl_80370020 +lbl_80370008: +/* 80370008 0036CF68 81 85 00 34 */ lwz r12, 0x34(r5) +/* 8037000C 0036CF6C 28 0C 00 00 */ cmplwi r12, 0 +/* 80370010 0036CF70 41 82 00 10 */ beq lbl_80370020 +/* 80370014 0036CF74 7D 88 03 A6 */ mtlr r12 +/* 80370018 0036CF78 38 65 00 00 */ addi r3, r5, 0 +/* 8037001C 0036CF7C 4E 80 00 21 */ blrl +lbl_80370020: +/* 80370020 0036CF80 38 61 00 10 */ addi r3, r1, 0x10 +/* 80370024 0036CF84 48 00 F5 F1 */ bl OSClearContext +/* 80370028 0036CF88 7F E3 FB 78 */ mr r3, r31 +/* 8037002C 0036CF8C 48 00 F3 F1 */ bl OSSetCurrentContext +/* 80370030 0036CF90 80 01 02 EC */ lwz r0, 0x2ec(r1) +/* 80370034 0036CF94 83 E1 02 E4 */ lwz r31, 0x2e4(r1) +/* 80370038 0036CF98 38 21 02 E8 */ addi r1, r1, 0x2e8 +/* 8037003C 0036CF9C 7C 08 03 A6 */ mtlr r0 +/* 80370040 0036CFA0 4E 80 00 20 */ blr + +.global __DSP_exec_task +__DSP_exec_task: +/* 80370044 0036CFA4 7C 08 02 A6 */ mflr r0 +/* 80370048 0036CFA8 90 01 00 04 */ stw r0, 4(r1) +/* 8037004C 0036CFAC 94 21 FF E8 */ stwu r1, -0x18(r1) +/* 80370050 0036CFB0 93 E1 00 14 */ stw r31, 0x14(r1) +/* 80370054 0036CFB4 3B E4 00 00 */ addi r31, r4, 0 +/* 80370058 0036CFB8 93 C1 00 10 */ stw r30, 0x10(r1) +/* 8037005C 0036CFBC 7C 7E 1B 79 */ or. r30, r3, r3 +/* 80370060 0036CFC0 41 82 00 44 */ beq lbl_803700A4 +/* 80370064 0036CFC4 80 7E 00 18 */ lwz r3, 0x18(r30) +/* 80370068 0036CFC8 4B FF F9 89 */ bl DSPSendMailToDSP +lbl_8037006C: +/* 8037006C 0036CFCC 4B FF F9 4D */ bl DSPCheckMailToDSP +/* 80370070 0036CFD0 28 03 00 00 */ cmplwi r3, 0 +/* 80370074 0036CFD4 40 82 FF F8 */ bne lbl_8037006C +/* 80370078 0036CFD8 80 7E 00 1C */ lwz r3, 0x1c(r30) +/* 8037007C 0036CFDC 4B FF F9 75 */ bl DSPSendMailToDSP +lbl_80370080: +/* 80370080 0036CFE0 4B FF F9 39 */ bl DSPCheckMailToDSP +/* 80370084 0036CFE4 28 03 00 00 */ cmplwi r3, 0 +/* 80370088 0036CFE8 40 82 FF F8 */ bne lbl_80370080 +/* 8037008C 0036CFEC 80 7E 00 20 */ lwz r3, 0x20(r30) +/* 80370090 0036CFF0 4B FF F9 61 */ bl DSPSendMailToDSP +lbl_80370094: +/* 80370094 0036CFF4 4B FF F9 25 */ bl DSPCheckMailToDSP +/* 80370098 0036CFF8 28 03 00 00 */ cmplwi r3, 0 +/* 8037009C 0036CFFC 40 82 FF F8 */ bne lbl_80370094 +/* 803700A0 0036D000 48 00 00 40 */ b lbl_803700E0 +lbl_803700A4: +/* 803700A4 0036D004 38 60 00 00 */ li r3, 0 +/* 803700A8 0036D008 4B FF F9 49 */ bl DSPSendMailToDSP +lbl_803700AC: +/* 803700AC 0036D00C 4B FF F9 0D */ bl DSPCheckMailToDSP +/* 803700B0 0036D010 28 03 00 00 */ cmplwi r3, 0 +/* 803700B4 0036D014 40 82 FF F8 */ bne lbl_803700AC +/* 803700B8 0036D018 38 60 00 00 */ li r3, 0 +/* 803700BC 0036D01C 4B FF F9 35 */ bl DSPSendMailToDSP +lbl_803700C0: +/* 803700C0 0036D020 4B FF F8 F9 */ bl DSPCheckMailToDSP +/* 803700C4 0036D024 28 03 00 00 */ cmplwi r3, 0 +/* 803700C8 0036D028 40 82 FF F8 */ bne lbl_803700C0 +/* 803700CC 0036D02C 38 60 00 00 */ li r3, 0 +/* 803700D0 0036D030 4B FF F9 21 */ bl DSPSendMailToDSP +lbl_803700D4: +/* 803700D4 0036D034 4B FF F8 E5 */ bl DSPCheckMailToDSP +/* 803700D8 0036D038 28 03 00 00 */ cmplwi r3, 0 +/* 803700DC 0036D03C 40 82 FF F8 */ bne lbl_803700D4 +lbl_803700E0: +/* 803700E0 0036D040 80 7F 00 0C */ lwz r3, 0xc(r31) +/* 803700E4 0036D044 4B FF F9 0D */ bl DSPSendMailToDSP +lbl_803700E8: +/* 803700E8 0036D048 4B FF F8 D1 */ bl DSPCheckMailToDSP +/* 803700EC 0036D04C 28 03 00 00 */ cmplwi r3, 0 +/* 803700F0 0036D050 40 82 FF F8 */ bne lbl_803700E8 +/* 803700F4 0036D054 80 7F 00 10 */ lwz r3, 0x10(r31) +/* 803700F8 0036D058 4B FF F8 F9 */ bl DSPSendMailToDSP +lbl_803700FC: +/* 803700FC 0036D05C 4B FF F8 BD */ bl DSPCheckMailToDSP +/* 80370100 0036D060 28 03 00 00 */ cmplwi r3, 0 +/* 80370104 0036D064 40 82 FF F8 */ bne lbl_803700FC +/* 80370108 0036D068 80 7F 00 14 */ lwz r3, 0x14(r31) +/* 8037010C 0036D06C 4B FF F8 E5 */ bl DSPSendMailToDSP +lbl_80370110: +/* 80370110 0036D070 4B FF F8 A9 */ bl DSPCheckMailToDSP +/* 80370114 0036D074 28 03 00 00 */ cmplwi r3, 0 +/* 80370118 0036D078 40 82 FF F8 */ bne lbl_80370110 +/* 8037011C 0036D07C 80 1F 00 00 */ lwz r0, 0(r31) +/* 80370120 0036D080 28 00 00 00 */ cmplwi r0, 0 +/* 80370124 0036D084 40 82 00 58 */ bne lbl_8037017C +/* 80370128 0036D088 A0 7F 00 24 */ lhz r3, 0x24(r31) +/* 8037012C 0036D08C 4B FF F8 C5 */ bl DSPSendMailToDSP +lbl_80370130: +/* 80370130 0036D090 4B FF F8 89 */ bl DSPCheckMailToDSP +/* 80370134 0036D094 28 03 00 00 */ cmplwi r3, 0 +/* 80370138 0036D098 40 82 FF F8 */ bne lbl_80370130 +/* 8037013C 0036D09C 38 60 00 00 */ li r3, 0 +/* 80370140 0036D0A0 4B FF F8 B1 */ bl DSPSendMailToDSP +lbl_80370144: +/* 80370144 0036D0A4 4B FF F8 75 */ bl DSPCheckMailToDSP +/* 80370148 0036D0A8 28 03 00 00 */ cmplwi r3, 0 +/* 8037014C 0036D0AC 40 82 FF F8 */ bne lbl_80370144 +/* 80370150 0036D0B0 38 60 00 00 */ li r3, 0 +/* 80370154 0036D0B4 4B FF F8 9D */ bl DSPSendMailToDSP +lbl_80370158: +/* 80370158 0036D0B8 4B FF F8 61 */ bl DSPCheckMailToDSP +/* 8037015C 0036D0BC 28 03 00 00 */ cmplwi r3, 0 +/* 80370160 0036D0C0 40 82 FF F8 */ bne lbl_80370158 +/* 80370164 0036D0C4 38 60 00 00 */ li r3, 0 +/* 80370168 0036D0C8 4B FF F8 89 */ bl DSPSendMailToDSP +lbl_8037016C: +/* 8037016C 0036D0CC 4B FF F8 4D */ bl DSPCheckMailToDSP +/* 80370170 0036D0D0 28 03 00 00 */ cmplwi r3, 0 +/* 80370174 0036D0D4 40 82 FF F8 */ bne lbl_8037016C +/* 80370178 0036D0D8 48 00 00 54 */ b lbl_803701CC +lbl_8037017C: +/* 8037017C 0036D0DC A0 7F 00 26 */ lhz r3, 0x26(r31) +/* 80370180 0036D0E0 4B FF F8 71 */ bl DSPSendMailToDSP +lbl_80370184: +/* 80370184 0036D0E4 4B FF F8 35 */ bl DSPCheckMailToDSP +/* 80370188 0036D0E8 28 03 00 00 */ cmplwi r3, 0 +/* 8037018C 0036D0EC 40 82 FF F8 */ bne lbl_80370184 +/* 80370190 0036D0F0 80 7F 00 18 */ lwz r3, 0x18(r31) +/* 80370194 0036D0F4 4B FF F8 5D */ bl DSPSendMailToDSP +lbl_80370198: +/* 80370198 0036D0F8 4B FF F8 21 */ bl DSPCheckMailToDSP +/* 8037019C 0036D0FC 28 03 00 00 */ cmplwi r3, 0 +/* 803701A0 0036D100 40 82 FF F8 */ bne lbl_80370198 +/* 803701A4 0036D104 80 7F 00 1C */ lwz r3, 0x1c(r31) +/* 803701A8 0036D108 4B FF F8 49 */ bl DSPSendMailToDSP +lbl_803701AC: +/* 803701AC 0036D10C 4B FF F8 0D */ bl DSPCheckMailToDSP +/* 803701B0 0036D110 28 03 00 00 */ cmplwi r3, 0 +/* 803701B4 0036D114 40 82 FF F8 */ bne lbl_803701AC +/* 803701B8 0036D118 80 7F 00 20 */ lwz r3, 0x20(r31) +/* 803701BC 0036D11C 4B FF F8 35 */ bl DSPSendMailToDSP +lbl_803701C0: +/* 803701C0 0036D120 4B FF F7 F9 */ bl DSPCheckMailToDSP +/* 803701C4 0036D124 28 03 00 00 */ cmplwi r3, 0 +/* 803701C8 0036D128 40 82 FF F8 */ bne lbl_803701C0 +lbl_803701CC: +/* 803701CC 0036D12C 80 01 00 1C */ lwz r0, 0x1c(r1) +/* 803701D0 0036D130 83 E1 00 14 */ lwz r31, 0x14(r1) +/* 803701D4 0036D134 83 C1 00 10 */ lwz r30, 0x10(r1) +/* 803701D8 0036D138 38 21 00 18 */ addi r1, r1, 0x18 +/* 803701DC 0036D13C 7C 08 03 A6 */ mtlr r0 +/* 803701E0 0036D140 4E 80 00 20 */ blr + +.global __DSP_boot_task +__DSP_boot_task: +/* 803701E4 0036D144 7C 08 02 A6 */ mflr r0 +/* 803701E8 0036D148 3C 80 80 3F */ lis r4, lbl_803EFA50@ha +/* 803701EC 0036D14C 90 01 00 04 */ stw r0, 4(r1) +/* 803701F0 0036D150 94 21 FF E8 */ stwu r1, -0x18(r1) +/* 803701F4 0036D154 93 E1 00 14 */ stw r31, 0x14(r1) +/* 803701F8 0036D158 3B E4 FA 50 */ addi r31, r4, lbl_803EFA50@l +/* 803701FC 0036D15C 93 C1 00 10 */ stw r30, 0x10(r1) +/* 80370200 0036D160 3B C3 00 00 */ addi r30, r3, 0 +lbl_80370204: +/* 80370204 0036D164 4B FF F7 C5 */ bl DSPCheckMailFromDSP +/* 80370208 0036D168 28 03 00 00 */ cmplwi r3, 0 +/* 8037020C 0036D16C 41 82 FF F8 */ beq lbl_80370204 +/* 80370210 0036D170 4B FF F7 C9 */ bl DSPReadMailFromDSP +/* 80370214 0036D174 90 61 00 0C */ stw r3, 0xc(r1) +/* 80370218 0036D178 3C 60 80 F4 */ lis r3, 0x80F3A001@ha +/* 8037021C 0036D17C 38 63 A0 01 */ addi r3, r3, 0x80F3A001@l +/* 80370220 0036D180 4B FF F7 D1 */ bl DSPSendMailToDSP +lbl_80370224: +/* 80370224 0036D184 4B FF F7 95 */ bl DSPCheckMailToDSP +/* 80370228 0036D188 28 03 00 00 */ cmplwi r3, 0 +/* 8037022C 0036D18C 40 82 FF F8 */ bne lbl_80370224 +/* 80370230 0036D190 80 7E 00 0C */ lwz r3, 0xc(r30) +/* 80370234 0036D194 4B FF F7 BD */ bl DSPSendMailToDSP +lbl_80370238: +/* 80370238 0036D198 4B FF F7 81 */ bl DSPCheckMailToDSP +/* 8037023C 0036D19C 28 03 00 00 */ cmplwi r3, 0 +/* 80370240 0036D1A0 40 82 FF F8 */ bne lbl_80370238 +/* 80370244 0036D1A4 3C 60 80 F4 */ lis r3, 0x80F3C002@ha +/* 80370248 0036D1A8 38 63 C0 02 */ addi r3, r3, 0x80F3C002@l +/* 8037024C 0036D1AC 4B FF F7 A5 */ bl DSPSendMailToDSP +lbl_80370250: +/* 80370250 0036D1B0 4B FF F7 69 */ bl DSPCheckMailToDSP +/* 80370254 0036D1B4 28 03 00 00 */ cmplwi r3, 0 +/* 80370258 0036D1B8 40 82 FF F8 */ bne lbl_80370250 +/* 8037025C 0036D1BC 80 1E 00 14 */ lwz r0, 0x14(r30) +/* 80370260 0036D1C0 54 03 04 3E */ clrlwi r3, r0, 0x10 +/* 80370264 0036D1C4 4B FF F7 8D */ bl DSPSendMailToDSP +lbl_80370268: +/* 80370268 0036D1C8 4B FF F7 51 */ bl DSPCheckMailToDSP +/* 8037026C 0036D1CC 28 03 00 00 */ cmplwi r3, 0 +/* 80370270 0036D1D0 40 82 FF F8 */ bne lbl_80370268 +/* 80370274 0036D1D4 3C 60 80 F4 */ lis r3, 0x80F3A002@ha +/* 80370278 0036D1D8 38 63 A0 02 */ addi r3, r3, 0x80F3A002@l +/* 8037027C 0036D1DC 4B FF F7 75 */ bl DSPSendMailToDSP +lbl_80370280: +/* 80370280 0036D1E0 4B FF F7 39 */ bl DSPCheckMailToDSP +/* 80370284 0036D1E4 28 03 00 00 */ cmplwi r3, 0 +/* 80370288 0036D1E8 40 82 FF F8 */ bne lbl_80370280 +/* 8037028C 0036D1EC 80 7E 00 10 */ lwz r3, 0x10(r30) +/* 80370290 0036D1F0 4B FF F7 61 */ bl DSPSendMailToDSP +lbl_80370294: +/* 80370294 0036D1F4 4B FF F7 25 */ bl DSPCheckMailToDSP +/* 80370298 0036D1F8 28 03 00 00 */ cmplwi r3, 0 +/* 8037029C 0036D1FC 40 82 FF F8 */ bne lbl_80370294 +/* 803702A0 0036D200 3C 60 80 F4 */ lis r3, 0x80F3B002@ha +/* 803702A4 0036D204 38 63 B0 02 */ addi r3, r3, 0x80F3B002@l +/* 803702A8 0036D208 4B FF F7 49 */ bl DSPSendMailToDSP +lbl_803702AC: +/* 803702AC 0036D20C 4B FF F7 0D */ bl DSPCheckMailToDSP +/* 803702B0 0036D210 28 03 00 00 */ cmplwi r3, 0 +/* 803702B4 0036D214 40 82 FF F8 */ bne lbl_803702AC +/* 803702B8 0036D218 38 60 00 00 */ li r3, 0 +/* 803702BC 0036D21C 4B FF F7 35 */ bl DSPSendMailToDSP +lbl_803702C0: +/* 803702C0 0036D220 4B FF F6 F9 */ bl DSPCheckMailToDSP +/* 803702C4 0036D224 28 03 00 00 */ cmplwi r3, 0 +/* 803702C8 0036D228 40 82 FF F8 */ bne lbl_803702C0 +/* 803702CC 0036D22C 3C 60 80 F4 */ lis r3, 0x80F3D001@ha +/* 803702D0 0036D230 38 63 D0 01 */ addi r3, r3, 0x80F3D001@l +/* 803702D4 0036D234 4B FF F7 1D */ bl DSPSendMailToDSP +lbl_803702D8: +/* 803702D8 0036D238 4B FF F6 E1 */ bl DSPCheckMailToDSP +/* 803702DC 0036D23C 28 03 00 00 */ cmplwi r3, 0 +/* 803702E0 0036D240 40 82 FF F8 */ bne lbl_803702D8 +/* 803702E4 0036D244 A0 7E 00 24 */ lhz r3, 0x24(r30) +/* 803702E8 0036D248 4B FF F7 09 */ bl DSPSendMailToDSP +lbl_803702EC: +/* 803702EC 0036D24C 4B FF F6 CD */ bl DSPCheckMailToDSP +/* 803702F0 0036D250 28 03 00 00 */ cmplwi r3, 0 +/* 803702F4 0036D254 40 82 FF F8 */ bne lbl_803702EC +/* 803702F8 0036D258 38 7F 00 00 */ addi r3, r31, 0 +/* 803702FC 0036D25C 4C C6 31 82 */ crclr 6 +/* 80370300 0036D260 38 9E 00 00 */ addi r4, r30, 0 +/* 80370304 0036D264 4B FF F8 CD */ bl __DSP_debug_printf +/* 80370308 0036D268 80 9E 00 0C */ lwz r4, 0xc(r30) +/* 8037030C 0036D26C 38 7F 00 20 */ addi r3, r31, 0x20 +/* 80370310 0036D270 4C C6 31 82 */ crclr 6 +/* 80370314 0036D274 4B FF F8 BD */ bl __DSP_debug_printf +/* 80370318 0036D278 80 9E 00 14 */ lwz r4, 0x14(r30) +/* 8037031C 0036D27C 38 7F 00 50 */ addi r3, r31, 0x50 +/* 80370320 0036D280 4C C6 31 82 */ crclr 6 +/* 80370324 0036D284 4B FF F8 AD */ bl __DSP_debug_printf +/* 80370328 0036D288 80 9E 00 10 */ lwz r4, 0x10(r30) +/* 8037032C 0036D28C 38 7F 00 80 */ addi r3, r31, 0x80 +/* 80370330 0036D290 4C C6 31 82 */ crclr 6 +/* 80370334 0036D294 4B FF F8 9D */ bl __DSP_debug_printf +/* 80370338 0036D298 80 9E 00 1C */ lwz r4, 0x1c(r30) +/* 8037033C 0036D29C 38 7F 00 B0 */ addi r3, r31, 0xb0 +/* 80370340 0036D2A0 4C C6 31 82 */ crclr 6 +/* 80370344 0036D2A4 4B FF F8 8D */ bl __DSP_debug_printf +/* 80370348 0036D2A8 A0 9E 00 24 */ lhz r4, 0x24(r30) +/* 8037034C 0036D2AC 38 7F 00 E0 */ addi r3, r31, 0xe0 +/* 80370350 0036D2B0 4C C6 31 82 */ crclr 6 +/* 80370354 0036D2B4 4B FF F8 7D */ bl __DSP_debug_printf +/* 80370358 0036D2B8 80 01 00 1C */ lwz r0, 0x1c(r1) +/* 8037035C 0036D2BC 83 E1 00 14 */ lwz r31, 0x14(r1) +/* 80370360 0036D2C0 83 C1 00 10 */ lwz r30, 0x10(r1) +/* 80370364 0036D2C4 38 21 00 18 */ addi r1, r1, 0x18 +/* 80370368 0036D2C8 7C 08 03 A6 */ mtlr r0 +/* 8037036C 0036D2CC 4E 80 00 20 */ blr + +.global __DSP_insert_task +__DSP_insert_task: +/* 80370370 0036D2D0 80 0D AB A0 */ lwz r0, lbl_805A9760@sda21(r13) +/* 80370374 0036D2D4 28 00 00 00 */ cmplwi r0, 0 +/* 80370378 0036D2D8 40 82 00 20 */ bne lbl_80370398 +/* 8037037C 0036D2DC 90 6D AB A4 */ stw r3, lbl_805A9764@sda21(r13) +/* 80370380 0036D2E0 38 00 00 00 */ li r0, 0 +/* 80370384 0036D2E4 90 6D AB 9C */ stw r3, lbl_805A975C@sda21(r13) +/* 80370388 0036D2E8 90 6D AB A0 */ stw r3, lbl_805A9760@sda21(r13) +/* 8037038C 0036D2EC 90 03 00 3C */ stw r0, 0x3c(r3) +/* 80370390 0036D2F0 90 03 00 38 */ stw r0, 0x38(r3) +/* 80370394 0036D2F4 4E 80 00 20 */ blr +lbl_80370398: +/* 80370398 0036D2F8 7C 05 03 78 */ mr r5, r0 +/* 8037039C 0036D2FC 48 00 00 44 */ b lbl_803703E0 +lbl_803703A0: +/* 803703A0 0036D300 80 83 00 04 */ lwz r4, 4(r3) +/* 803703A4 0036D304 80 05 00 04 */ lwz r0, 4(r5) +/* 803703A8 0036D308 7C 04 00 40 */ cmplw r4, r0 +/* 803703AC 0036D30C 40 80 00 30 */ bge lbl_803703DC +/* 803703B0 0036D310 80 05 00 3C */ lwz r0, 0x3c(r5) +/* 803703B4 0036D314 90 03 00 3C */ stw r0, 0x3c(r3) +/* 803703B8 0036D318 90 65 00 3C */ stw r3, 0x3c(r5) +/* 803703BC 0036D31C 90 A3 00 38 */ stw r5, 0x38(r3) +/* 803703C0 0036D320 80 83 00 3C */ lwz r4, 0x3c(r3) +/* 803703C4 0036D324 28 04 00 00 */ cmplwi r4, 0 +/* 803703C8 0036D328 40 82 00 0C */ bne lbl_803703D4 +/* 803703CC 0036D32C 90 6D AB A0 */ stw r3, lbl_805A9760@sda21(r13) +/* 803703D0 0036D330 48 00 00 18 */ b lbl_803703E8 +lbl_803703D4: +/* 803703D4 0036D334 90 64 00 38 */ stw r3, 0x38(r4) +/* 803703D8 0036D338 48 00 00 10 */ b lbl_803703E8 +lbl_803703DC: +/* 803703DC 0036D33C 80 A5 00 38 */ lwz r5, 0x38(r5) +lbl_803703E0: +/* 803703E0 0036D340 28 05 00 00 */ cmplwi r5, 0 +/* 803703E4 0036D344 40 82 FF BC */ bne lbl_803703A0 +lbl_803703E8: +/* 803703E8 0036D348 28 05 00 00 */ cmplwi r5, 0 +/* 803703EC 0036D34C 4C 82 00 20 */ bnelr +/* 803703F0 0036D350 80 8D AB 9C */ lwz r4, lbl_805A975C@sda21(r13) +/* 803703F4 0036D354 38 00 00 00 */ li r0, 0 +/* 803703F8 0036D358 90 64 00 38 */ stw r3, 0x38(r4) +/* 803703FC 0036D35C 90 03 00 38 */ stw r0, 0x38(r3) +/* 80370400 0036D360 80 0D AB 9C */ lwz r0, lbl_805A975C@sda21(r13) +/* 80370404 0036D364 90 03 00 3C */ stw r0, 0x3c(r3) +/* 80370408 0036D368 90 6D AB 9C */ stw r3, lbl_805A975C@sda21(r13) +/* 8037040C 0036D36C 4E 80 00 20 */ blr + +.global __DSP_remove_task +__DSP_remove_task: +/* 80370410 0036D370 38 80 00 00 */ li r4, 0 +/* 80370414 0036D374 90 83 00 08 */ stw r4, 8(r3) +/* 80370418 0036D378 38 00 00 03 */ li r0, 3 +/* 8037041C 0036D37C 90 03 00 00 */ stw r0, 0(r3) +/* 80370420 0036D380 80 0D AB A0 */ lwz r0, lbl_805A9760@sda21(r13) +/* 80370424 0036D384 7C 00 18 40 */ cmplw r0, r3 +/* 80370428 0036D388 40 82 00 30 */ bne lbl_80370458 +/* 8037042C 0036D38C 80 03 00 38 */ lwz r0, 0x38(r3) +/* 80370430 0036D390 28 00 00 00 */ cmplwi r0, 0 +/* 80370434 0036D394 41 82 00 14 */ beq lbl_80370448 +/* 80370438 0036D398 90 0D AB A0 */ stw r0, lbl_805A9760@sda21(r13) +/* 8037043C 0036D39C 80 63 00 38 */ lwz r3, 0x38(r3) +/* 80370440 0036D3A0 90 83 00 3C */ stw r4, 0x3c(r3) +/* 80370444 0036D3A4 4E 80 00 20 */ blr +lbl_80370448: +/* 80370448 0036D3A8 90 8D AB A4 */ stw r4, lbl_805A9764@sda21(r13) +/* 8037044C 0036D3AC 90 8D AB 9C */ stw r4, lbl_805A975C@sda21(r13) +/* 80370450 0036D3B0 90 8D AB A0 */ stw r4, lbl_805A9760@sda21(r13) +/* 80370454 0036D3B4 4E 80 00 20 */ blr +lbl_80370458: +/* 80370458 0036D3B8 80 0D AB 9C */ lwz r0, lbl_805A975C@sda21(r13) +/* 8037045C 0036D3BC 7C 00 18 40 */ cmplw r0, r3 +/* 80370460 0036D3C0 40 82 00 20 */ bne lbl_80370480 +/* 80370464 0036D3C4 80 03 00 3C */ lwz r0, 0x3c(r3) +/* 80370468 0036D3C8 90 0D AB 9C */ stw r0, lbl_805A975C@sda21(r13) +/* 8037046C 0036D3CC 80 63 00 3C */ lwz r3, 0x3c(r3) +/* 80370470 0036D3D0 90 83 00 38 */ stw r4, 0x38(r3) +/* 80370474 0036D3D4 80 0D AB A0 */ lwz r0, lbl_805A9760@sda21(r13) +/* 80370478 0036D3D8 90 0D AB A4 */ stw r0, lbl_805A9764@sda21(r13) +/* 8037047C 0036D3DC 4E 80 00 20 */ blr +lbl_80370480: +/* 80370480 0036D3E0 80 03 00 38 */ lwz r0, 0x38(r3) +/* 80370484 0036D3E4 90 0D AB A4 */ stw r0, lbl_805A9764@sda21(r13) +/* 80370488 0036D3E8 80 03 00 38 */ lwz r0, 0x38(r3) +/* 8037048C 0036D3EC 80 83 00 3C */ lwz r4, 0x3c(r3) +/* 80370490 0036D3F0 90 04 00 38 */ stw r0, 0x38(r4) +/* 80370494 0036D3F4 80 03 00 3C */ lwz r0, 0x3c(r3) +/* 80370498 0036D3F8 80 63 00 38 */ lwz r3, 0x38(r3) +/* 8037049C 0036D3FC 90 03 00 3C */ stw r0, 0x3c(r3) +/* 803704A0 0036D400 4E 80 00 20 */ blr + diff --git a/asm/Dolphin/DVD/dvd.s b/asm/Dolphin/DVD/dvd.s new file mode 100644 index 00000000..ab78e476 --- /dev/null +++ b/asm/Dolphin/DVD/dvd.s @@ -0,0 +1,3310 @@ +.include "macros.inc" + +.section .text, "ax" + +.global DVDInit +DVDInit: +/* 80371BA4 0036EB04 7C 08 02 A6 */ mflr r0 +/* 80371BA8 0036EB08 90 01 00 04 */ stw r0, 4(r1) +/* 80371BAC 0036EB0C 94 21 FF F0 */ stwu r1, -0x10(r1) +/* 80371BB0 0036EB10 93 E1 00 0C */ stw r31, 0xc(r1) +/* 80371BB4 0036EB14 80 0D AC 54 */ lwz r0, lbl_805A9814@sda21(r13) +/* 80371BB8 0036EB18 2C 00 00 00 */ cmpwi r0, 0 +/* 80371BBC 0036EB1C 40 82 00 A0 */ bne lbl_80371C5C +/* 80371BC0 0036EB20 80 6D 9E D8 */ lwz r3, lbl_805A8A98@sda21(r13) +/* 80371BC4 0036EB24 48 00 C4 75 */ bl OSRegisterVersion +/* 80371BC8 0036EB28 3B E0 00 01 */ li r31, 1 +/* 80371BCC 0036EB2C 93 ED AC 54 */ stw r31, lbl_805A9814@sda21(r13) +/* 80371BD0 0036EB30 4B FF F7 15 */ bl __DVDFSInit +/* 80371BD4 0036EB34 48 00 2C E5 */ bl __DVDClearWaitingQueue +/* 80371BD8 0036EB38 4B FF E8 CD */ bl __DVDInitWA +/* 80371BDC 0036EB3C 3C 00 80 00 */ lis r0, 0x8000 +/* 80371BE0 0036EB40 3C 60 80 37 */ lis r3, __DVDInterruptHandler@ha +/* 80371BE4 0036EB44 90 0D AC 18 */ stw r0, lbl_805A97D8@sda21(r13) +/* 80371BE8 0036EB48 38 83 04 E4 */ addi r4, r3, __DVDInterruptHandler@l +/* 80371BEC 0036EB4C 90 0D AC 14 */ stw r0, lbl_805A97D4@sda21(r13) +/* 80371BF0 0036EB50 38 60 00 15 */ li r3, 0x15 +/* 80371BF4 0036EB54 48 00 FA B9 */ bl __OSSetInterruptHandler +/* 80371BF8 0036EB58 38 60 04 00 */ li r3, 0x400 +/* 80371BFC 0036EB5C 48 00 FE B5 */ bl __OSUnmaskInterrupts +/* 80371C00 0036EB60 38 6D AC 08 */ addi r3, r13, lbl_805A97C8@sda21 +/* 80371C04 0036EB64 48 01 29 C1 */ bl OSInitThreadQueue +/* 80371C08 0036EB68 3C 60 CC 00 */ lis r3, 0xCC006000@ha +/* 80371C0C 0036EB6C 38 00 00 2A */ li r0, 0x2a +/* 80371C10 0036EB70 90 03 60 00 */ stw r0, 0xCC006000@l(r3) +/* 80371C14 0036EB74 38 00 00 00 */ li r0, 0 +/* 80371C18 0036EB78 90 03 60 04 */ stw r0, 0x6004(r3) +/* 80371C1C 0036EB7C 80 6D AC 18 */ lwz r3, lbl_805A97D8@sda21(r13) +/* 80371C20 0036EB80 38 63 00 20 */ addi r3, r3, 0x20 +/* 80371C24 0036EB84 80 63 00 00 */ lwz r3, 0(r3) +/* 80371C28 0036EB88 3C 03 1A E0 */ addis r0, r3, 0x1ae0 +/* 80371C2C 0036EB8C 28 00 7C 22 */ cmplwi r0, 0x7c22 +/* 80371C30 0036EB90 40 82 00 1C */ bne lbl_80371C4C +/* 80371C34 0036EB94 3C 60 80 3F */ lis r3, lbl_803EFFC8@ha +/* 80371C38 0036EB98 4C C6 31 82 */ crclr 6 +/* 80371C3C 0036EB9C 38 63 FF C8 */ addi r3, r3, lbl_803EFFC8@l +/* 80371C40 0036EBA0 48 00 DD 6D */ bl OSReport +/* 80371C44 0036EBA4 48 00 33 01 */ bl __fstLoad +/* 80371C48 0036EBA8 48 00 00 14 */ b lbl_80371C5C +lbl_80371C4C: +/* 80371C4C 0036EBAC 3C 03 F2 EB */ addis r0, r3, 0xf2eb +/* 80371C50 0036EBB0 28 00 EA 5E */ cmplwi r0, 0xea5e +/* 80371C54 0036EBB4 41 82 00 08 */ beq lbl_80371C5C +/* 80371C58 0036EBB8 93 ED AC 50 */ stw r31, lbl_805A9810@sda21(r13) +lbl_80371C5C: +/* 80371C5C 0036EBBC 80 01 00 14 */ lwz r0, 0x14(r1) +/* 80371C60 0036EBC0 83 E1 00 0C */ lwz r31, 0xc(r1) +/* 80371C64 0036EBC4 38 21 00 10 */ addi r1, r1, 0x10 +/* 80371C68 0036EBC8 7C 08 03 A6 */ mtlr r0 +/* 80371C6C 0036EBCC 4E 80 00 20 */ blr + +.global stateReadingFST +stateReadingFST: +/* 80371C70 0036EBD0 7C 08 02 A6 */ mflr r0 +/* 80371C74 0036EBD4 3C 60 80 37 */ lis r3, stateReadingFST@ha +/* 80371C78 0036EBD8 90 01 00 04 */ stw r0, 4(r1) +/* 80371C7C 0036EBDC 38 03 1C 70 */ addi r0, r3, stateReadingFST@l +/* 80371C80 0036EBE0 3C 60 80 54 */ lis r3, lbl_80540B60@ha +/* 80371C84 0036EBE4 94 21 FF F0 */ stwu r1, -0x10(r1) +/* 80371C88 0036EBE8 38 63 0B 60 */ addi r3, r3, lbl_80540B60@l +/* 80371C8C 0036EBEC 93 E1 00 0C */ stw r31, 0xc(r1) +/* 80371C90 0036EBF0 3B E3 00 08 */ addi r31, r3, 8 +/* 80371C94 0036EBF4 90 0D AC 58 */ stw r0, lbl_805A9818@sda21(r13) +/* 80371C98 0036EBF8 80 8D AC 18 */ lwz r4, lbl_805A97D8@sda21(r13) +/* 80371C9C 0036EBFC 80 1F 00 00 */ lwz r0, 0(r31) +/* 80371CA0 0036EC00 80 64 00 3C */ lwz r3, 0x3c(r4) +/* 80371CA4 0036EC04 7C 03 00 40 */ cmplw r3, r0 +/* 80371CA8 0036EC08 40 80 00 1C */ bge lbl_80371CC4 +/* 80371CAC 0036EC0C 3C 60 80 3F */ lis r3, lbl_803EFFD4@ha +/* 80371CB0 0036EC10 4C C6 31 82 */ crclr 6 +/* 80371CB4 0036EC14 38 A3 FF D4 */ addi r5, r3, lbl_803EFFD4@l +/* 80371CB8 0036EC18 38 6D 9E E4 */ addi r3, r13, lbl_805A8AA4@sda21 +/* 80371CBC 0036EC1C 38 80 02 76 */ li r4, 0x276 +/* 80371CC0 0036EC20 48 00 DD 6D */ bl OSPanic +lbl_80371CC4: +/* 80371CC4 0036EC24 3C 60 80 54 */ lis r3, lbl_80540B60@ha +/* 80371CC8 0036EC28 80 DF 00 00 */ lwz r6, 0(r31) +/* 80371CCC 0036EC2C 38 A3 0B 60 */ addi r5, r3, lbl_80540B60@l +/* 80371CD0 0036EC30 80 ED AC 18 */ lwz r7, lbl_805A97D8@sda21(r13) +/* 80371CD4 0036EC34 3C 80 80 37 */ lis r4, cbForReadingFST@ha +/* 80371CD8 0036EC38 80 A5 00 04 */ lwz r5, 4(r5) +/* 80371CDC 0036EC3C 38 06 00 1F */ addi r0, r6, 0x1f +/* 80371CE0 0036EC40 80 67 00 38 */ lwz r3, 0x38(r7) +/* 80371CE4 0036EC44 38 C4 1D 04 */ addi r6, r4, cbForReadingFST@l +/* 80371CE8 0036EC48 54 04 00 34 */ rlwinm r4, r0, 0, 0, 0x1a +/* 80371CEC 0036EC4C 4B FF ED 5D */ bl DVDLowRead +/* 80371CF0 0036EC50 80 01 00 14 */ lwz r0, 0x14(r1) +/* 80371CF4 0036EC54 83 E1 00 0C */ lwz r31, 0xc(r1) +/* 80371CF8 0036EC58 38 21 00 10 */ addi r1, r1, 0x10 +/* 80371CFC 0036EC5C 7C 08 03 A6 */ mtlr r0 +/* 80371D00 0036EC60 4E 80 00 20 */ blr + +.global cbForReadingFST +cbForReadingFST: +/* 80371D04 0036EC64 7C 08 02 A6 */ mflr r0 +/* 80371D08 0036EC68 28 03 00 10 */ cmplwi r3, 0x10 +/* 80371D0C 0036EC6C 90 01 00 04 */ stw r0, 4(r1) +/* 80371D10 0036EC70 94 21 FF E8 */ stwu r1, -0x18(r1) +/* 80371D14 0036EC74 93 E1 00 14 */ stw r31, 0x14(r1) +/* 80371D18 0036EC78 40 82 00 18 */ bne lbl_80371D30 +/* 80371D1C 0036EC7C 80 6D AC 10 */ lwz r3, lbl_805A97D0@sda21(r13) +/* 80371D20 0036EC80 38 00 FF FF */ li r0, -1 +/* 80371D24 0036EC84 90 03 00 0C */ stw r0, 0xc(r3) +/* 80371D28 0036EC88 48 00 01 15 */ bl stateTimeout +/* 80371D2C 0036EC8C 48 00 00 50 */ b lbl_80371D7C +lbl_80371D30: +/* 80371D30 0036EC90 54 60 07 FF */ clrlwi. r0, r3, 0x1f +/* 80371D34 0036EC94 41 82 00 44 */ beq lbl_80371D78 +/* 80371D38 0036EC98 3B E0 00 00 */ li r31, 0 +/* 80371D3C 0036EC9C 93 ED AC 44 */ stw r31, lbl_805A9804@sda21(r13) +/* 80371D40 0036ECA0 4B FF F5 A5 */ bl __DVDFSInit +/* 80371D44 0036ECA4 3C 60 80 54 */ lis r3, lbl_80540BA0@ha +/* 80371D48 0036ECA8 80 8D AC 10 */ lwz r4, lbl_805A97D0@sda21(r13) +/* 80371D4C 0036ECAC 38 03 0B A0 */ addi r0, r3, lbl_80540BA0@l +/* 80371D50 0036ECB0 90 0D AC 10 */ stw r0, lbl_805A97D0@sda21(r13) +/* 80371D54 0036ECB4 93 E4 00 0C */ stw r31, 0xc(r4) +/* 80371D58 0036ECB8 81 84 00 28 */ lwz r12, 0x28(r4) +/* 80371D5C 0036ECBC 28 0C 00 00 */ cmplwi r12, 0 +/* 80371D60 0036ECC0 41 82 00 10 */ beq lbl_80371D70 +/* 80371D64 0036ECC4 7D 88 03 A6 */ mtlr r12 +/* 80371D68 0036ECC8 38 60 00 00 */ li r3, 0 +/* 80371D6C 0036ECCC 4E 80 00 21 */ blrl +lbl_80371D70: +/* 80371D70 0036ECD0 48 00 0E 95 */ bl stateReady +/* 80371D74 0036ECD4 48 00 00 08 */ b lbl_80371D7C +lbl_80371D78: +/* 80371D78 0036ECD8 48 00 00 F9 */ bl stateGettingError +lbl_80371D7C: +/* 80371D7C 0036ECDC 80 01 00 1C */ lwz r0, 0x1c(r1) +/* 80371D80 0036ECE0 83 E1 00 14 */ lwz r31, 0x14(r1) +/* 80371D84 0036ECE4 38 21 00 18 */ addi r1, r1, 0x18 +/* 80371D88 0036ECE8 7C 08 03 A6 */ mtlr r0 +/* 80371D8C 0036ECEC 4E 80 00 20 */ blr + +.global cbForStateError +cbForStateError: +/* 80371D90 0036ECF0 7C 08 02 A6 */ mflr r0 +/* 80371D94 0036ECF4 28 03 00 10 */ cmplwi r3, 0x10 +/* 80371D98 0036ECF8 90 01 00 04 */ stw r0, 4(r1) +/* 80371D9C 0036ECFC 94 21 FF E8 */ stwu r1, -0x18(r1) +/* 80371DA0 0036ED00 93 E1 00 14 */ stw r31, 0x14(r1) +/* 80371DA4 0036ED04 40 82 00 18 */ bne lbl_80371DBC +/* 80371DA8 0036ED08 80 6D AC 10 */ lwz r3, lbl_805A97D0@sda21(r13) +/* 80371DAC 0036ED0C 38 00 FF FF */ li r0, -1 +/* 80371DB0 0036ED10 90 03 00 0C */ stw r0, 0xc(r3) +/* 80371DB4 0036ED14 48 00 00 89 */ bl stateTimeout +/* 80371DB8 0036ED18 48 00 00 70 */ b lbl_80371E28 +lbl_80371DBC: +/* 80371DBC 0036ED1C 48 00 30 81 */ bl __DVDPrintFatalMessage +/* 80371DC0 0036ED20 3C 60 80 54 */ lis r3, lbl_80540BA0@ha +/* 80371DC4 0036ED24 83 ED AC 10 */ lwz r31, lbl_805A97D0@sda21(r13) +/* 80371DC8 0036ED28 38 03 0B A0 */ addi r0, r3, lbl_80540BA0@l +/* 80371DCC 0036ED2C 38 60 00 01 */ li r3, 1 +/* 80371DD0 0036ED30 90 0D AC 10 */ stw r0, lbl_805A97D0@sda21(r13) +/* 80371DD4 0036ED34 90 6D AC 28 */ stw r3, lbl_805A97E8@sda21(r13) +/* 80371DD8 0036ED38 81 9F 00 28 */ lwz r12, 0x28(r31) +/* 80371DDC 0036ED3C 28 0C 00 00 */ cmplwi r12, 0 +/* 80371DE0 0036ED40 41 82 00 14 */ beq lbl_80371DF4 +/* 80371DE4 0036ED44 7D 88 03 A6 */ mtlr r12 +/* 80371DE8 0036ED48 38 9F 00 00 */ addi r4, r31, 0 +/* 80371DEC 0036ED4C 38 60 FF FF */ li r3, -1 +/* 80371DF0 0036ED50 4E 80 00 21 */ blrl +lbl_80371DF4: +/* 80371DF4 0036ED54 80 0D AC 30 */ lwz r0, lbl_805A97F0@sda21(r13) +/* 80371DF8 0036ED58 28 00 00 00 */ cmplwi r0, 0 +/* 80371DFC 0036ED5C 41 82 00 28 */ beq lbl_80371E24 +/* 80371E00 0036ED60 81 8D AC 34 */ lwz r12, lbl_805A97F4@sda21(r13) +/* 80371E04 0036ED64 38 00 00 00 */ li r0, 0 +/* 80371E08 0036ED68 90 0D AC 30 */ stw r0, lbl_805A97F0@sda21(r13) +/* 80371E0C 0036ED6C 28 0C 00 00 */ cmplwi r12, 0 +/* 80371E10 0036ED70 41 82 00 14 */ beq lbl_80371E24 +/* 80371E14 0036ED74 7D 88 03 A6 */ mtlr r12 +/* 80371E18 0036ED78 38 9F 00 00 */ addi r4, r31, 0 +/* 80371E1C 0036ED7C 38 60 00 00 */ li r3, 0 +/* 80371E20 0036ED80 4E 80 00 21 */ blrl +lbl_80371E24: +/* 80371E24 0036ED84 48 00 0D E1 */ bl stateReady +lbl_80371E28: +/* 80371E28 0036ED88 80 01 00 1C */ lwz r0, 0x1c(r1) +/* 80371E2C 0036ED8C 83 E1 00 14 */ lwz r31, 0x14(r1) +/* 80371E30 0036ED90 38 21 00 18 */ addi r1, r1, 0x18 +/* 80371E34 0036ED94 7C 08 03 A6 */ mtlr r0 +/* 80371E38 0036ED98 4E 80 00 20 */ blr + +.global stateTimeout +stateTimeout: +/* 80371E3C 0036ED9C 7C 08 02 A6 */ mflr r0 +/* 80371E40 0036EDA0 3C 60 01 23 */ lis r3, 0x01234568@ha +/* 80371E44 0036EDA4 90 01 00 04 */ stw r0, 4(r1) +/* 80371E48 0036EDA8 38 63 45 68 */ addi r3, r3, 0x01234568@l +/* 80371E4C 0036EDAC 94 21 FF F8 */ stwu r1, -8(r1) +/* 80371E50 0036EDB0 48 00 2D 7D */ bl __DVDStoreErrorCode +/* 80371E54 0036EDB4 48 00 22 6D */ bl DVDReset +/* 80371E58 0036EDB8 38 60 00 00 */ li r3, 0 +/* 80371E5C 0036EDBC 4B FF FF 35 */ bl cbForStateError +/* 80371E60 0036EDC0 80 01 00 0C */ lwz r0, 0xc(r1) +/* 80371E64 0036EDC4 38 21 00 08 */ addi r1, r1, 8 +/* 80371E68 0036EDC8 7C 08 03 A6 */ mtlr r0 +/* 80371E6C 0036EDCC 4E 80 00 20 */ blr + +.global stateGettingError +stateGettingError: +/* 80371E70 0036EDD0 7C 08 02 A6 */ mflr r0 +/* 80371E74 0036EDD4 3C 60 80 37 */ lis r3, cbForStateGettingError@ha +/* 80371E78 0036EDD8 90 01 00 04 */ stw r0, 4(r1) +/* 80371E7C 0036EDDC 38 63 1F 4C */ addi r3, r3, cbForStateGettingError@l +/* 80371E80 0036EDE0 94 21 FF F8 */ stwu r1, -8(r1) +/* 80371E84 0036EDE4 4B FF F0 4D */ bl DVDLowRequestError +/* 80371E88 0036EDE8 80 01 00 0C */ lwz r0, 0xc(r1) +/* 80371E8C 0036EDEC 38 21 00 08 */ addi r1, r1, 8 +/* 80371E90 0036EDF0 7C 08 03 A6 */ mtlr r0 +/* 80371E94 0036EDF4 4E 80 00 20 */ blr + +.global CategorizeError +CategorizeError: +/* 80371E98 0036EDF8 3C 03 FF FE */ addis r0, r3, 0xfffe +/* 80371E9C 0036EDFC 28 00 04 00 */ cmplwi r0, 0x400 +/* 80371EA0 0036EE00 40 82 00 10 */ bne lbl_80371EB0 +/* 80371EA4 0036EE04 90 6D AC 40 */ stw r3, lbl_805A9800@sda21(r13) +/* 80371EA8 0036EE08 38 60 00 01 */ li r3, 1 +/* 80371EAC 0036EE0C 4E 80 00 20 */ blr +lbl_80371EB0: +/* 80371EB0 0036EE10 54 64 02 3E */ clrlwi r4, r3, 8 +/* 80371EB4 0036EE14 3C 04 FF FA */ addis r0, r4, 0xfffa +/* 80371EB8 0036EE18 28 00 28 00 */ cmplwi r0, 0x2800 +/* 80371EBC 0036EE1C 41 82 00 1C */ beq lbl_80371ED8 +/* 80371EC0 0036EE20 3C 04 FF FE */ addis r0, r4, 0xfffe +/* 80371EC4 0036EE24 28 00 3A 00 */ cmplwi r0, 0x3a00 +/* 80371EC8 0036EE28 41 82 00 10 */ beq lbl_80371ED8 +/* 80371ECC 0036EE2C 3C 04 FF F5 */ addis r0, r4, 0xfff5 +/* 80371ED0 0036EE30 28 00 5A 01 */ cmplwi r0, 0x5a01 +/* 80371ED4 0036EE34 40 82 00 0C */ bne lbl_80371EE0 +lbl_80371ED8: +/* 80371ED8 0036EE38 38 60 00 00 */ li r3, 0 +/* 80371EDC 0036EE3C 4E 80 00 20 */ blr +lbl_80371EE0: +/* 80371EE0 0036EE40 80 6D AC 44 */ lwz r3, lbl_805A9804@sda21(r13) +/* 80371EE4 0036EE44 38 03 00 01 */ addi r0, r3, 1 +/* 80371EE8 0036EE48 90 0D AC 44 */ stw r0, lbl_805A9804@sda21(r13) +/* 80371EEC 0036EE4C 80 0D AC 44 */ lwz r0, lbl_805A9804@sda21(r13) +/* 80371EF0 0036EE50 2C 00 00 02 */ cmpwi r0, 2 +/* 80371EF4 0036EE54 40 82 00 28 */ bne lbl_80371F1C +/* 80371EF8 0036EE58 80 0D AC 40 */ lwz r0, lbl_805A9800@sda21(r13) +/* 80371EFC 0036EE5C 7C 04 00 40 */ cmplw r4, r0 +/* 80371F00 0036EE60 40 82 00 10 */ bne lbl_80371F10 +/* 80371F04 0036EE64 90 8D AC 40 */ stw r4, lbl_805A9800@sda21(r13) +/* 80371F08 0036EE68 38 60 00 01 */ li r3, 1 +/* 80371F0C 0036EE6C 4E 80 00 20 */ blr +lbl_80371F10: +/* 80371F10 0036EE70 90 8D AC 40 */ stw r4, lbl_805A9800@sda21(r13) +/* 80371F14 0036EE74 38 60 00 02 */ li r3, 2 +/* 80371F18 0036EE78 4E 80 00 20 */ blr +lbl_80371F1C: +/* 80371F1C 0036EE7C 3C 04 FF FD */ addis r0, r4, 0xfffd +/* 80371F20 0036EE80 90 8D AC 40 */ stw r4, lbl_805A9800@sda21(r13) +/* 80371F24 0036EE84 28 00 11 00 */ cmplwi r0, 0x1100 +/* 80371F28 0036EE88 41 82 00 14 */ beq lbl_80371F3C +/* 80371F2C 0036EE8C 80 6D AC 10 */ lwz r3, lbl_805A97D0@sda21(r13) +/* 80371F30 0036EE90 80 03 00 08 */ lwz r0, 8(r3) +/* 80371F34 0036EE94 28 00 00 05 */ cmplwi r0, 5 +/* 80371F38 0036EE98 40 82 00 0C */ bne lbl_80371F44 +lbl_80371F3C: +/* 80371F3C 0036EE9C 38 60 00 02 */ li r3, 2 +/* 80371F40 0036EEA0 4E 80 00 20 */ blr +lbl_80371F44: +/* 80371F44 0036EEA4 38 60 00 03 */ li r3, 3 +/* 80371F48 0036EEA8 4E 80 00 20 */ blr + +.global cbForStateGettingError +cbForStateGettingError: +/* 80371F4C 0036EEAC 7C 08 02 A6 */ mflr r0 +/* 80371F50 0036EEB0 28 03 00 10 */ cmplwi r3, 0x10 +/* 80371F54 0036EEB4 90 01 00 04 */ stw r0, 4(r1) +/* 80371F58 0036EEB8 94 21 FF E0 */ stwu r1, -0x20(r1) +/* 80371F5C 0036EEBC 93 E1 00 1C */ stw r31, 0x1c(r1) +/* 80371F60 0036EEC0 93 C1 00 18 */ stw r30, 0x18(r1) +/* 80371F64 0036EEC4 93 A1 00 14 */ stw r29, 0x14(r1) +/* 80371F68 0036EEC8 93 81 00 10 */ stw r28, 0x10(r1) +/* 80371F6C 0036EECC 40 82 00 2C */ bne lbl_80371F98 +/* 80371F70 0036EED0 80 8D AC 10 */ lwz r4, lbl_805A97D0@sda21(r13) +/* 80371F74 0036EED4 38 00 FF FF */ li r0, -1 +/* 80371F78 0036EED8 3C 60 01 23 */ lis r3, 0x01234568@ha +/* 80371F7C 0036EEDC 90 04 00 0C */ stw r0, 0xc(r4) +/* 80371F80 0036EEE0 38 63 45 68 */ addi r3, r3, 0x01234568@l +/* 80371F84 0036EEE4 48 00 2C 49 */ bl __DVDStoreErrorCode +/* 80371F88 0036EEE8 48 00 21 39 */ bl DVDReset +/* 80371F8C 0036EEEC 38 60 00 00 */ li r3, 0 +/* 80371F90 0036EEF0 4B FF FE 01 */ bl cbForStateError +/* 80371F94 0036EEF4 48 00 02 2C */ b lbl_803721C0 +lbl_80371F98: +/* 80371F98 0036EEF8 54 60 07 BD */ rlwinm. r0, r3, 0, 0x1e, 0x1e +/* 80371F9C 0036EEFC 41 82 00 2C */ beq lbl_80371FC8 +/* 80371FA0 0036EF00 80 8D AC 10 */ lwz r4, lbl_805A97D0@sda21(r13) +/* 80371FA4 0036EF04 38 00 FF FF */ li r0, -1 +/* 80371FA8 0036EF08 3C 60 01 23 */ lis r3, 0x01234567@ha +/* 80371FAC 0036EF0C 90 04 00 0C */ stw r0, 0xc(r4) +/* 80371FB0 0036EF10 38 63 45 67 */ addi r3, r3, 0x01234567@l +/* 80371FB4 0036EF14 48 00 2C 19 */ bl __DVDStoreErrorCode +/* 80371FB8 0036EF18 3C 60 80 37 */ lis r3, cbForStateError@ha +/* 80371FBC 0036EF1C 38 63 1D 90 */ addi r3, r3, cbForStateError@l +/* 80371FC0 0036EF20 4B FF EE 85 */ bl DVDLowStopMotor +/* 80371FC4 0036EF24 48 00 01 FC */ b lbl_803721C0 +lbl_80371FC8: +/* 80371FC8 0036EF28 3C 60 CC 00 */ lis r3, 0xCC006020@ha +/* 80371FCC 0036EF2C 83 A3 60 20 */ lwz r29, 0xCC006020@l(r3) +/* 80371FD0 0036EF30 38 7D 00 00 */ addi r3, r29, 0 +/* 80371FD4 0036EF34 57 BC 00 0E */ rlwinm r28, r29, 0, 0, 7 +/* 80371FD8 0036EF38 4B FF FE C1 */ bl CategorizeError +/* 80371FDC 0036EF3C 3B E3 00 00 */ addi r31, r3, 0 +/* 80371FE0 0036EF40 28 1F 00 01 */ cmplwi r31, 1 +/* 80371FE4 0036EF44 40 82 00 28 */ bne lbl_8037200C +/* 80371FE8 0036EF48 80 8D AC 10 */ lwz r4, lbl_805A97D0@sda21(r13) +/* 80371FEC 0036EF4C 38 00 FF FF */ li r0, -1 +/* 80371FF0 0036EF50 38 7D 00 00 */ addi r3, r29, 0 +/* 80371FF4 0036EF54 90 04 00 0C */ stw r0, 0xc(r4) +/* 80371FF8 0036EF58 48 00 2B D5 */ bl __DVDStoreErrorCode +/* 80371FFC 0036EF5C 3C 60 80 37 */ lis r3, cbForStateError@ha +/* 80372000 0036EF60 38 63 1D 90 */ addi r3, r3, cbForStateError@l +/* 80372004 0036EF64 4B FF EE 41 */ bl DVDLowStopMotor +/* 80372008 0036EF68 48 00 01 B8 */ b lbl_803721C0 +lbl_8037200C: +/* 8037200C 0036EF6C 38 1F FF FE */ addi r0, r31, -2 +/* 80372010 0036EF70 28 00 00 01 */ cmplwi r0, 1 +/* 80372014 0036EF74 41 81 00 0C */ bgt lbl_80372020 +/* 80372018 0036EF78 38 80 00 00 */ li r4, 0 +/* 8037201C 0036EF7C 48 00 00 44 */ b lbl_80372060 +lbl_80372020: +/* 80372020 0036EF80 3C 1C FF 00 */ addis r0, r28, 0xff00 +/* 80372024 0036EF84 28 00 00 00 */ cmplwi r0, 0 +/* 80372028 0036EF88 40 82 00 0C */ bne lbl_80372034 +/* 8037202C 0036EF8C 38 80 00 04 */ li r4, 4 +/* 80372030 0036EF90 48 00 00 30 */ b lbl_80372060 +lbl_80372034: +/* 80372034 0036EF94 3C 1C FE 00 */ addis r0, r28, 0xfe00 +/* 80372038 0036EF98 28 00 00 00 */ cmplwi r0, 0 +/* 8037203C 0036EF9C 40 82 00 0C */ bne lbl_80372048 +/* 80372040 0036EFA0 38 80 00 06 */ li r4, 6 +/* 80372044 0036EFA4 48 00 00 1C */ b lbl_80372060 +lbl_80372048: +/* 80372048 0036EFA8 3C 1C FD 00 */ addis r0, r28, 0xfd00 +/* 8037204C 0036EFAC 28 00 00 00 */ cmplwi r0, 0 +/* 80372050 0036EFB0 40 82 00 0C */ bne lbl_8037205C +/* 80372054 0036EFB4 38 80 00 03 */ li r4, 3 +/* 80372058 0036EFB8 48 00 00 08 */ b lbl_80372060 +lbl_8037205C: +/* 8037205C 0036EFBC 38 80 00 05 */ li r4, 5 +lbl_80372060: +/* 80372060 0036EFC0 80 0D AC 30 */ lwz r0, lbl_805A97F0@sda21(r13) +/* 80372064 0036EFC4 28 00 00 00 */ cmplwi r0, 0 +/* 80372068 0036EFC8 41 82 00 6C */ beq lbl_803720D4 +/* 8037206C 0036EFCC 3C 60 80 54 */ lis r3, lbl_80540BA0@ha +/* 80372070 0036EFD0 90 8D AC 38 */ stw r4, lbl_805A97F8@sda21(r13) +/* 80372074 0036EFD4 38 00 00 00 */ li r0, 0 +/* 80372078 0036EFD8 83 CD AC 10 */ lwz r30, lbl_805A97D0@sda21(r13) +/* 8037207C 0036EFDC 38 63 0B A0 */ addi r3, r3, lbl_80540BA0@l +/* 80372080 0036EFE0 90 0D AC 30 */ stw r0, lbl_805A97F0@sda21(r13) +/* 80372084 0036EFE4 38 00 00 0A */ li r0, 0xa +/* 80372088 0036EFE8 90 6D AC 10 */ stw r3, lbl_805A97D0@sda21(r13) +/* 8037208C 0036EFEC 90 1E 00 0C */ stw r0, 0xc(r30) +/* 80372090 0036EFF0 81 9E 00 28 */ lwz r12, 0x28(r30) +/* 80372094 0036EFF4 28 0C 00 00 */ cmplwi r12, 0 +/* 80372098 0036EFF8 41 82 00 14 */ beq lbl_803720AC +/* 8037209C 0036EFFC 7D 88 03 A6 */ mtlr r12 +/* 803720A0 0036F000 38 9E 00 00 */ addi r4, r30, 0 +/* 803720A4 0036F004 38 60 FF FD */ li r3, -3 +/* 803720A8 0036F008 4E 80 00 21 */ blrl +lbl_803720AC: +/* 803720AC 0036F00C 81 8D AC 34 */ lwz r12, lbl_805A97F4@sda21(r13) +/* 803720B0 0036F010 28 0C 00 00 */ cmplwi r12, 0 +/* 803720B4 0036F014 41 82 00 14 */ beq lbl_803720C8 +/* 803720B8 0036F018 7D 88 03 A6 */ mtlr r12 +/* 803720BC 0036F01C 38 9E 00 00 */ addi r4, r30, 0 +/* 803720C0 0036F020 38 60 00 00 */ li r3, 0 +/* 803720C4 0036F024 4E 80 00 21 */ blrl +lbl_803720C8: +/* 803720C8 0036F028 48 00 0B 3D */ bl stateReady +/* 803720CC 0036F02C 38 00 00 01 */ li r0, 1 +/* 803720D0 0036F030 48 00 00 08 */ b lbl_803720D8 +lbl_803720D4: +/* 803720D4 0036F034 38 00 00 00 */ li r0, 0 +lbl_803720D8: +/* 803720D8 0036F038 2C 00 00 00 */ cmpwi r0, 0 +/* 803720DC 0036F03C 40 82 00 E4 */ bne lbl_803721C0 +/* 803720E0 0036F040 28 1F 00 02 */ cmplwi r31, 2 +/* 803720E4 0036F044 40 82 00 14 */ bne lbl_803720F8 +/* 803720E8 0036F048 7F A3 EB 78 */ mr r3, r29 +/* 803720EC 0036F04C 48 00 2A E1 */ bl __DVDStoreErrorCode +/* 803720F0 0036F050 48 00 01 F1 */ bl stateGotToRetry +/* 803720F4 0036F054 48 00 00 CC */ b lbl_803721C0 +lbl_803720F8: +/* 803720F8 0036F058 28 1F 00 03 */ cmplwi r31, 3 +/* 803720FC 0036F05C 40 82 00 40 */ bne lbl_8037213C +/* 80372100 0036F060 57 A3 02 3E */ clrlwi r3, r29, 8 +/* 80372104 0036F064 3C 03 FF FD */ addis r0, r3, 0xfffd +/* 80372108 0036F068 28 00 11 00 */ cmplwi r0, 0x1100 +/* 8037210C 0036F06C 40 82 00 1C */ bne lbl_80372128 +/* 80372110 0036F070 80 AD AC 10 */ lwz r5, lbl_805A97D0@sda21(r13) +/* 80372114 0036F074 3C 60 80 37 */ lis r3, cbForUnrecoveredError@ha +/* 80372118 0036F078 38 83 21 E0 */ addi r4, r3, cbForUnrecoveredError@l +/* 8037211C 0036F07C 80 65 00 10 */ lwz r3, 0x10(r5) +/* 80372120 0036F080 4B FF EB C1 */ bl DVDLowSeek +/* 80372124 0036F084 48 00 00 9C */ b lbl_803721C0 +lbl_80372128: +/* 80372128 0036F088 81 8D AC 58 */ lwz r12, lbl_805A9818@sda21(r13) +/* 8037212C 0036F08C 80 6D AC 10 */ lwz r3, lbl_805A97D0@sda21(r13) +/* 80372130 0036F090 7D 88 03 A6 */ mtlr r12 +/* 80372134 0036F094 4E 80 00 21 */ blrl +/* 80372138 0036F098 48 00 00 88 */ b lbl_803721C0 +lbl_8037213C: +/* 8037213C 0036F09C 3C 1C FF 00 */ addis r0, r28, 0xff00 +/* 80372140 0036F0A0 28 00 00 00 */ cmplwi r0, 0 +/* 80372144 0036F0A4 40 82 00 18 */ bne lbl_8037215C +/* 80372148 0036F0A8 80 6D AC 10 */ lwz r3, lbl_805A97D0@sda21(r13) +/* 8037214C 0036F0AC 38 00 00 05 */ li r0, 5 +/* 80372150 0036F0B0 90 03 00 0C */ stw r0, 0xc(r3) +/* 80372154 0036F0B4 48 00 09 A5 */ bl stateMotorStopped +/* 80372158 0036F0B8 48 00 00 68 */ b lbl_803721C0 +lbl_8037215C: +/* 8037215C 0036F0BC 3C 1C FE 00 */ addis r0, r28, 0xfe00 +/* 80372160 0036F0C0 28 00 00 00 */ cmplwi r0, 0 +/* 80372164 0036F0C4 40 82 00 18 */ bne lbl_8037217C +/* 80372168 0036F0C8 80 6D AC 10 */ lwz r3, lbl_805A97D0@sda21(r13) +/* 8037216C 0036F0CC 38 00 00 03 */ li r0, 3 +/* 80372170 0036F0D0 90 03 00 0C */ stw r0, 0xc(r3) +/* 80372174 0036F0D4 48 00 08 19 */ bl stateCoverClosed +/* 80372178 0036F0D8 48 00 00 48 */ b lbl_803721C0 +lbl_8037217C: +/* 8037217C 0036F0DC 3C 1C FD 00 */ addis r0, r28, 0xfd00 +/* 80372180 0036F0E0 28 00 00 00 */ cmplwi r0, 0 +/* 80372184 0036F0E4 40 82 00 18 */ bne lbl_8037219C +/* 80372188 0036F0E8 80 6D AC 10 */ lwz r3, lbl_805A97D0@sda21(r13) +/* 8037218C 0036F0EC 38 00 00 04 */ li r0, 4 +/* 80372190 0036F0F0 90 03 00 0C */ stw r0, 0xc(r3) +/* 80372194 0036F0F4 48 00 09 65 */ bl stateMotorStopped +/* 80372198 0036F0F8 48 00 00 28 */ b lbl_803721C0 +lbl_8037219C: +/* 8037219C 0036F0FC 80 8D AC 10 */ lwz r4, lbl_805A97D0@sda21(r13) +/* 803721A0 0036F100 38 00 FF FF */ li r0, -1 +/* 803721A4 0036F104 3C 60 01 23 */ lis r3, 0x01234567@ha +/* 803721A8 0036F108 90 04 00 0C */ stw r0, 0xc(r4) +/* 803721AC 0036F10C 38 63 45 67 */ addi r3, r3, 0x01234567@l +/* 803721B0 0036F110 48 00 2A 1D */ bl __DVDStoreErrorCode +/* 803721B4 0036F114 3C 60 80 37 */ lis r3, cbForStateError@ha +/* 803721B8 0036F118 38 63 1D 90 */ addi r3, r3, cbForStateError@l +/* 803721BC 0036F11C 4B FF EC 89 */ bl DVDLowStopMotor +lbl_803721C0: +/* 803721C0 0036F120 80 01 00 24 */ lwz r0, 0x24(r1) +/* 803721C4 0036F124 83 E1 00 1C */ lwz r31, 0x1c(r1) +/* 803721C8 0036F128 83 C1 00 18 */ lwz r30, 0x18(r1) +/* 803721CC 0036F12C 83 A1 00 14 */ lwz r29, 0x14(r1) +/* 803721D0 0036F130 83 81 00 10 */ lwz r28, 0x10(r1) +/* 803721D4 0036F134 38 21 00 20 */ addi r1, r1, 0x20 +/* 803721D8 0036F138 7C 08 03 A6 */ mtlr r0 +/* 803721DC 0036F13C 4E 80 00 20 */ blr + +.global cbForUnrecoveredError +cbForUnrecoveredError: +/* 803721E0 0036F140 7C 08 02 A6 */ mflr r0 +/* 803721E4 0036F144 28 03 00 10 */ cmplwi r3, 0x10 +/* 803721E8 0036F148 90 01 00 04 */ stw r0, 4(r1) +/* 803721EC 0036F14C 94 21 FF F8 */ stwu r1, -8(r1) +/* 803721F0 0036F150 40 82 00 2C */ bne lbl_8037221C +/* 803721F4 0036F154 80 8D AC 10 */ lwz r4, lbl_805A97D0@sda21(r13) +/* 803721F8 0036F158 38 00 FF FF */ li r0, -1 +/* 803721FC 0036F15C 3C 60 01 23 */ lis r3, 0x01234568@ha +/* 80372200 0036F160 90 04 00 0C */ stw r0, 0xc(r4) +/* 80372204 0036F164 38 63 45 68 */ addi r3, r3, 0x01234568@l +/* 80372208 0036F168 48 00 29 C5 */ bl __DVDStoreErrorCode +/* 8037220C 0036F16C 48 00 1E B5 */ bl DVDReset +/* 80372210 0036F170 38 60 00 00 */ li r3, 0 +/* 80372214 0036F174 4B FF FB 7D */ bl cbForStateError +/* 80372218 0036F178 48 00 00 20 */ b lbl_80372238 +lbl_8037221C: +/* 8037221C 0036F17C 54 60 07 FF */ clrlwi. r0, r3, 0x1f +/* 80372220 0036F180 41 82 00 0C */ beq lbl_8037222C +/* 80372224 0036F184 48 00 00 BD */ bl stateGotToRetry +/* 80372228 0036F188 48 00 00 10 */ b lbl_80372238 +lbl_8037222C: +/* 8037222C 0036F18C 3C 60 80 37 */ lis r3, cbForUnrecoveredErrorRetry@ha +/* 80372230 0036F190 38 63 22 48 */ addi r3, r3, cbForUnrecoveredErrorRetry@l +/* 80372234 0036F194 4B FF EC 9D */ bl DVDLowRequestError +lbl_80372238: +/* 80372238 0036F198 80 01 00 0C */ lwz r0, 0xc(r1) +/* 8037223C 0036F19C 38 21 00 08 */ addi r1, r1, 8 +/* 80372240 0036F1A0 7C 08 03 A6 */ mtlr r0 +/* 80372244 0036F1A4 4E 80 00 20 */ blr + +.global cbForUnrecoveredErrorRetry +cbForUnrecoveredErrorRetry: +/* 80372248 0036F1A8 7C 08 02 A6 */ mflr r0 +/* 8037224C 0036F1AC 28 03 00 10 */ cmplwi r3, 0x10 +/* 80372250 0036F1B0 90 01 00 04 */ stw r0, 4(r1) +/* 80372254 0036F1B4 94 21 FF F8 */ stwu r1, -8(r1) +/* 80372258 0036F1B8 40 82 00 2C */ bne lbl_80372284 +/* 8037225C 0036F1BC 80 8D AC 10 */ lwz r4, lbl_805A97D0@sda21(r13) +/* 80372260 0036F1C0 38 00 FF FF */ li r0, -1 +/* 80372264 0036F1C4 3C 60 01 23 */ lis r3, 0x01234568@ha +/* 80372268 0036F1C8 90 04 00 0C */ stw r0, 0xc(r4) +/* 8037226C 0036F1CC 38 63 45 68 */ addi r3, r3, 0x01234568@l +/* 80372270 0036F1D0 48 00 29 5D */ bl __DVDStoreErrorCode +/* 80372274 0036F1D4 48 00 1E 4D */ bl DVDReset +/* 80372278 0036F1D8 38 60 00 00 */ li r3, 0 +/* 8037227C 0036F1DC 4B FF FB 15 */ bl cbForStateError +/* 80372280 0036F1E0 48 00 00 50 */ b lbl_803722D0 +lbl_80372284: +/* 80372284 0036F1E4 54 60 07 BD */ rlwinm. r0, r3, 0, 0x1e, 0x1e +/* 80372288 0036F1E8 80 6D AC 10 */ lwz r3, lbl_805A97D0@sda21(r13) +/* 8037228C 0036F1EC 38 80 FF FF */ li r4, -1 +/* 80372290 0036F1F0 90 83 00 0C */ stw r4, 0xc(r3) +/* 80372294 0036F1F4 41 82 00 20 */ beq lbl_803722B4 +/* 80372298 0036F1F8 3C 60 01 23 */ lis r3, 0x01234567@ha +/* 8037229C 0036F1FC 38 63 45 67 */ addi r3, r3, 0x01234567@l +/* 803722A0 0036F200 48 00 29 2D */ bl __DVDStoreErrorCode +/* 803722A4 0036F204 3C 60 80 37 */ lis r3, cbForStateError@ha +/* 803722A8 0036F208 38 63 1D 90 */ addi r3, r3, cbForStateError@l +/* 803722AC 0036F20C 4B FF EB 99 */ bl DVDLowStopMotor +/* 803722B0 0036F210 48 00 00 20 */ b lbl_803722D0 +lbl_803722B4: +/* 803722B4 0036F214 3C 60 CC 00 */ lis r3, 0xCC006000@ha +/* 803722B8 0036F218 38 63 60 00 */ addi r3, r3, 0xCC006000@l +/* 803722BC 0036F21C 80 63 00 20 */ lwz r3, 0x20(r3) +/* 803722C0 0036F220 48 00 29 0D */ bl __DVDStoreErrorCode +/* 803722C4 0036F224 3C 60 80 37 */ lis r3, cbForStateError@ha +/* 803722C8 0036F228 38 63 1D 90 */ addi r3, r3, cbForStateError@l +/* 803722CC 0036F22C 4B FF EB 79 */ bl DVDLowStopMotor +lbl_803722D0: +/* 803722D0 0036F230 80 01 00 0C */ lwz r0, 0xc(r1) +/* 803722D4 0036F234 38 21 00 08 */ addi r1, r1, 8 +/* 803722D8 0036F238 7C 08 03 A6 */ mtlr r0 +/* 803722DC 0036F23C 4E 80 00 20 */ blr + +.global stateGotToRetry +stateGotToRetry: +/* 803722E0 0036F240 7C 08 02 A6 */ mflr r0 +/* 803722E4 0036F244 3C 60 80 37 */ lis r3, cbForStateGoToRetry@ha +/* 803722E8 0036F248 90 01 00 04 */ stw r0, 4(r1) +/* 803722EC 0036F24C 38 63 23 08 */ addi r3, r3, cbForStateGoToRetry@l +/* 803722F0 0036F250 94 21 FF F8 */ stwu r1, -8(r1) +/* 803722F4 0036F254 4B FF EB 51 */ bl DVDLowStopMotor +/* 803722F8 0036F258 80 01 00 0C */ lwz r0, 0xc(r1) +/* 803722FC 0036F25C 38 21 00 08 */ addi r1, r1, 8 +/* 80372300 0036F260 7C 08 03 A6 */ mtlr r0 +/* 80372304 0036F264 4E 80 00 20 */ blr + +.global cbForStateGoToRetry +cbForStateGoToRetry: +/* 80372308 0036F268 7C 08 02 A6 */ mflr r0 +/* 8037230C 0036F26C 28 03 00 10 */ cmplwi r3, 0x10 +/* 80372310 0036F270 90 01 00 04 */ stw r0, 4(r1) +/* 80372314 0036F274 94 21 FF E8 */ stwu r1, -0x18(r1) +/* 80372318 0036F278 93 E1 00 14 */ stw r31, 0x14(r1) +/* 8037231C 0036F27C 40 82 00 2C */ bne lbl_80372348 +/* 80372320 0036F280 80 8D AC 10 */ lwz r4, lbl_805A97D0@sda21(r13) +/* 80372324 0036F284 38 00 FF FF */ li r0, -1 +/* 80372328 0036F288 3C 60 01 23 */ lis r3, 0x01234568@ha +/* 8037232C 0036F28C 90 04 00 0C */ stw r0, 0xc(r4) +/* 80372330 0036F290 38 63 45 68 */ addi r3, r3, 0x01234568@l +/* 80372334 0036F294 48 00 28 99 */ bl __DVDStoreErrorCode +/* 80372338 0036F298 48 00 1D 89 */ bl DVDReset +/* 8037233C 0036F29C 38 60 00 00 */ li r3, 0 +/* 80372340 0036F2A0 4B FF FA 51 */ bl cbForStateError +/* 80372344 0036F2A4 48 00 01 08 */ b lbl_8037244C +lbl_80372348: +/* 80372348 0036F2A8 54 60 07 BD */ rlwinm. r0, r3, 0, 0x1e, 0x1e +/* 8037234C 0036F2AC 41 82 00 2C */ beq lbl_80372378 +/* 80372350 0036F2B0 80 8D AC 10 */ lwz r4, lbl_805A97D0@sda21(r13) +/* 80372354 0036F2B4 38 00 FF FF */ li r0, -1 +/* 80372358 0036F2B8 3C 60 01 23 */ lis r3, 0x01234567@ha +/* 8037235C 0036F2BC 90 04 00 0C */ stw r0, 0xc(r4) +/* 80372360 0036F2C0 38 63 45 67 */ addi r3, r3, 0x01234567@l +/* 80372364 0036F2C4 48 00 28 69 */ bl __DVDStoreErrorCode +/* 80372368 0036F2C8 3C 60 80 37 */ lis r3, cbForStateError@ha +/* 8037236C 0036F2CC 38 63 1D 90 */ addi r3, r3, cbForStateError@l +/* 80372370 0036F2D0 4B FF EA D5 */ bl DVDLowStopMotor +/* 80372374 0036F2D4 48 00 00 D8 */ b lbl_8037244C +lbl_80372378: +/* 80372378 0036F2D8 38 00 00 00 */ li r0, 0 +/* 8037237C 0036F2DC 90 0D AC 44 */ stw r0, lbl_805A9804@sda21(r13) +/* 80372380 0036F2E0 80 0D AC 2C */ lwz r0, lbl_805A97EC@sda21(r13) +/* 80372384 0036F2E4 28 00 00 04 */ cmplwi r0, 4 +/* 80372388 0036F2E8 41 82 00 28 */ beq lbl_803723B0 +/* 8037238C 0036F2EC 80 0D AC 2C */ lwz r0, lbl_805A97EC@sda21(r13) +/* 80372390 0036F2F0 28 00 00 05 */ cmplwi r0, 5 +/* 80372394 0036F2F4 41 82 00 1C */ beq lbl_803723B0 +/* 80372398 0036F2F8 80 0D AC 2C */ lwz r0, lbl_805A97EC@sda21(r13) +/* 8037239C 0036F2FC 28 00 00 0D */ cmplwi r0, 0xd +/* 803723A0 0036F300 41 82 00 10 */ beq lbl_803723B0 +/* 803723A4 0036F304 80 0D AC 2C */ lwz r0, lbl_805A97EC@sda21(r13) +/* 803723A8 0036F308 28 00 00 0F */ cmplwi r0, 0xf +/* 803723AC 0036F30C 40 82 00 0C */ bne lbl_803723B8 +lbl_803723B0: +/* 803723B0 0036F310 38 00 00 01 */ li r0, 1 +/* 803723B4 0036F314 90 0D AC 48 */ stw r0, lbl_805A9808@sda21(r13) +lbl_803723B8: +/* 803723B8 0036F318 80 0D AC 30 */ lwz r0, lbl_805A97F0@sda21(r13) +/* 803723BC 0036F31C 28 00 00 00 */ cmplwi r0, 0 +/* 803723C0 0036F320 41 82 00 70 */ beq lbl_80372430 +/* 803723C4 0036F324 38 00 00 02 */ li r0, 2 +/* 803723C8 0036F328 83 ED AC 10 */ lwz r31, lbl_805A97D0@sda21(r13) +/* 803723CC 0036F32C 3C 60 80 54 */ lis r3, lbl_80540BA0@ha +/* 803723D0 0036F330 90 0D AC 38 */ stw r0, lbl_805A97F8@sda21(r13) +/* 803723D4 0036F334 38 03 0B A0 */ addi r0, r3, lbl_80540BA0@l +/* 803723D8 0036F338 38 60 00 00 */ li r3, 0 +/* 803723DC 0036F33C 90 0D AC 10 */ stw r0, lbl_805A97D0@sda21(r13) +/* 803723E0 0036F340 38 00 00 0A */ li r0, 0xa +/* 803723E4 0036F344 90 6D AC 30 */ stw r3, lbl_805A97F0@sda21(r13) +/* 803723E8 0036F348 90 1F 00 0C */ stw r0, 0xc(r31) +/* 803723EC 0036F34C 81 9F 00 28 */ lwz r12, 0x28(r31) +/* 803723F0 0036F350 28 0C 00 00 */ cmplwi r12, 0 +/* 803723F4 0036F354 41 82 00 14 */ beq lbl_80372408 +/* 803723F8 0036F358 7D 88 03 A6 */ mtlr r12 +/* 803723FC 0036F35C 38 9F 00 00 */ addi r4, r31, 0 +/* 80372400 0036F360 38 60 FF FD */ li r3, -3 +/* 80372404 0036F364 4E 80 00 21 */ blrl +lbl_80372408: +/* 80372408 0036F368 81 8D AC 34 */ lwz r12, lbl_805A97F4@sda21(r13) +/* 8037240C 0036F36C 28 0C 00 00 */ cmplwi r12, 0 +/* 80372410 0036F370 41 82 00 14 */ beq lbl_80372424 +/* 80372414 0036F374 7D 88 03 A6 */ mtlr r12 +/* 80372418 0036F378 38 9F 00 00 */ addi r4, r31, 0 +/* 8037241C 0036F37C 38 60 00 00 */ li r3, 0 +/* 80372420 0036F380 4E 80 00 21 */ blrl +lbl_80372424: +/* 80372424 0036F384 48 00 07 E1 */ bl stateReady +/* 80372428 0036F388 38 00 00 01 */ li r0, 1 +/* 8037242C 0036F38C 48 00 00 08 */ b lbl_80372434 +lbl_80372430: +/* 80372430 0036F390 38 00 00 00 */ li r0, 0 +lbl_80372434: +/* 80372434 0036F394 2C 00 00 00 */ cmpwi r0, 0 +/* 80372438 0036F398 40 82 00 14 */ bne lbl_8037244C +/* 8037243C 0036F39C 80 6D AC 10 */ lwz r3, lbl_805A97D0@sda21(r13) +/* 80372440 0036F3A0 38 00 00 0B */ li r0, 0xb +/* 80372444 0036F3A4 90 03 00 0C */ stw r0, 0xc(r3) +/* 80372448 0036F3A8 48 00 06 B1 */ bl stateMotorStopped +lbl_8037244C: +/* 8037244C 0036F3AC 80 01 00 1C */ lwz r0, 0x1c(r1) +/* 80372450 0036F3B0 83 E1 00 14 */ lwz r31, 0x14(r1) +/* 80372454 0036F3B4 38 21 00 18 */ addi r1, r1, 0x18 +/* 80372458 0036F3B8 7C 08 03 A6 */ mtlr r0 +/* 8037245C 0036F3BC 4E 80 00 20 */ blr + +.global stateCheckID +stateCheckID: +/* 80372460 0036F3C0 7C 08 02 A6 */ mflr r0 +/* 80372464 0036F3C4 3C 60 80 54 */ lis r3, lbl_80540B60@ha +/* 80372468 0036F3C8 90 01 00 04 */ stw r0, 4(r1) +/* 8037246C 0036F3CC 94 21 FF F0 */ stwu r1, -0x10(r1) +/* 80372470 0036F3D0 93 E1 00 0C */ stw r31, 0xc(r1) +/* 80372474 0036F3D4 3B E3 0B 60 */ addi r31, r3, lbl_80540B60@l +/* 80372478 0036F3D8 80 0D AC 2C */ lwz r0, lbl_805A97EC@sda21(r13) +/* 8037247C 0036F3DC 2C 00 00 03 */ cmpwi r0, 3 +/* 80372480 0036F3E0 41 82 00 08 */ beq lbl_80372488 +/* 80372484 0036F3E4 48 00 00 6C */ b lbl_803724F0 +lbl_80372488: +/* 80372488 0036F3E8 80 8D AC 10 */ lwz r4, lbl_805A97D0@sda21(r13) +/* 8037248C 0036F3EC 38 7F 00 20 */ addi r3, r31, 0x20 +/* 80372490 0036F3F0 80 84 00 24 */ lwz r4, 0x24(r4) +/* 80372494 0036F3F4 48 00 27 B5 */ bl DVDCompareDiskID +/* 80372498 0036F3F8 2C 03 00 00 */ cmpwi r3, 0 +/* 8037249C 0036F3FC 41 82 00 44 */ beq lbl_803724E0 +/* 803724A0 0036F400 80 6D AC 14 */ lwz r3, lbl_805A97D4@sda21(r13) +/* 803724A4 0036F404 38 9F 00 20 */ addi r4, r31, 0x20 +/* 803724A8 0036F408 38 A0 00 20 */ li r5, 0x20 +/* 803724AC 0036F40C 4B C9 0F E5 */ bl memcpy +/* 803724B0 0036F410 80 8D AC 10 */ lwz r4, lbl_805A97D0@sda21(r13) +/* 803724B4 0036F414 38 00 00 01 */ li r0, 1 +/* 803724B8 0036F418 38 7F 00 00 */ addi r3, r31, 0 +/* 803724BC 0036F41C 90 04 00 0C */ stw r0, 0xc(r4) +/* 803724C0 0036F420 38 80 00 20 */ li r4, 0x20 +/* 803724C4 0036F424 48 00 C5 C1 */ bl DCInvalidateRange +/* 803724C8 0036F428 3C 80 80 37 */ lis r4, stateCheckID2a@ha +/* 803724CC 0036F42C 80 6D AC 10 */ lwz r3, lbl_805A97D0@sda21(r13) +/* 803724D0 0036F430 38 04 25 74 */ addi r0, r4, stateCheckID2a@l +/* 803724D4 0036F434 90 0D AC 58 */ stw r0, lbl_805A9818@sda21(r13) +/* 803724D8 0036F438 48 00 00 9D */ bl stateCheckID2a +/* 803724DC 0036F43C 48 00 00 50 */ b lbl_8037252C +lbl_803724E0: +/* 803724E0 0036F440 3C 60 80 37 */ lis r3, cbForStateCheckID1@ha +/* 803724E4 0036F444 38 63 26 54 */ addi r3, r3, cbForStateCheckID1@l +/* 803724E8 0036F448 4B FF E9 5D */ bl DVDLowStopMotor +/* 803724EC 0036F44C 48 00 00 40 */ b lbl_8037252C +lbl_803724F0: +/* 803724F0 0036F450 80 8D AC 14 */ lwz r4, lbl_805A97D4@sda21(r13) +/* 803724F4 0036F454 38 7F 00 20 */ addi r3, r31, 0x20 +/* 803724F8 0036F458 38 A0 00 20 */ li r5, 0x20 +/* 803724FC 0036F45C 48 01 B3 81 */ bl memcmp +/* 80372500 0036F460 2C 03 00 00 */ cmpwi r3, 0 +/* 80372504 0036F464 41 82 00 14 */ beq lbl_80372518 +/* 80372508 0036F468 3C 60 80 37 */ lis r3, cbForStateCheckID1@ha +/* 8037250C 0036F46C 38 63 26 54 */ addi r3, r3, cbForStateCheckID1@l +/* 80372510 0036F470 4B FF E9 35 */ bl DVDLowStopMotor +/* 80372514 0036F474 48 00 00 18 */ b lbl_8037252C +lbl_80372518: +/* 80372518 0036F478 3C 80 80 37 */ lis r4, stateCheckID3@ha +/* 8037251C 0036F47C 80 6D AC 10 */ lwz r3, lbl_805A97D0@sda21(r13) +/* 80372520 0036F480 38 04 25 40 */ addi r0, r4, stateCheckID3@l +/* 80372524 0036F484 90 0D AC 58 */ stw r0, lbl_805A9818@sda21(r13) +/* 80372528 0036F488 48 00 00 19 */ bl stateCheckID3 +lbl_8037252C: +/* 8037252C 0036F48C 80 01 00 14 */ lwz r0, 0x14(r1) +/* 80372530 0036F490 83 E1 00 0C */ lwz r31, 0xc(r1) +/* 80372534 0036F494 38 21 00 10 */ addi r1, r1, 0x10 +/* 80372538 0036F498 7C 08 03 A6 */ mtlr r0 +/* 8037253C 0036F49C 4E 80 00 20 */ blr + +.global stateCheckID3 +stateCheckID3: +/* 80372540 0036F4A0 7C 08 02 A6 */ mflr r0 +/* 80372544 0036F4A4 3C 60 80 37 */ lis r3, cbForStateCheckID3@ha +/* 80372548 0036F4A8 90 01 00 04 */ stw r0, 4(r1) +/* 8037254C 0036F4AC 38 A3 28 4C */ addi r5, r3, cbForStateCheckID3@l +/* 80372550 0036F4B0 94 21 FF F8 */ stwu r1, -8(r1) +/* 80372554 0036F4B4 80 8D AC 14 */ lwz r4, lbl_805A97D4@sda21(r13) +/* 80372558 0036F4B8 88 64 00 08 */ lbz r3, 8(r4) +/* 8037255C 0036F4BC 38 80 00 0A */ li r4, 0xa +/* 80372560 0036F4C0 4B FF EB BD */ bl DVDLowAudioBufferConfig +/* 80372564 0036F4C4 80 01 00 0C */ lwz r0, 0xc(r1) +/* 80372568 0036F4C8 38 21 00 08 */ addi r1, r1, 8 +/* 8037256C 0036F4CC 7C 08 03 A6 */ mtlr r0 +/* 80372570 0036F4D0 4E 80 00 20 */ blr + +.global stateCheckID2a +stateCheckID2a: +/* 80372574 0036F4D4 7C 08 02 A6 */ mflr r0 +/* 80372578 0036F4D8 3C 60 80 37 */ lis r3, cbForStateCheckID2a@ha +/* 8037257C 0036F4DC 90 01 00 04 */ stw r0, 4(r1) +/* 80372580 0036F4E0 38 A3 25 A8 */ addi r5, r3, cbForStateCheckID2a@l +/* 80372584 0036F4E4 94 21 FF F8 */ stwu r1, -8(r1) +/* 80372588 0036F4E8 80 8D AC 14 */ lwz r4, lbl_805A97D4@sda21(r13) +/* 8037258C 0036F4EC 88 64 00 08 */ lbz r3, 8(r4) +/* 80372590 0036F4F0 38 80 00 0A */ li r4, 0xa +/* 80372594 0036F4F4 4B FF EB 89 */ bl DVDLowAudioBufferConfig +/* 80372598 0036F4F8 80 01 00 0C */ lwz r0, 0xc(r1) +/* 8037259C 0036F4FC 38 21 00 08 */ addi r1, r1, 8 +/* 803725A0 0036F500 7C 08 03 A6 */ mtlr r0 +/* 803725A4 0036F504 4E 80 00 20 */ blr + +.global cbForStateCheckID2a +cbForStateCheckID2a: +/* 803725A8 0036F508 7C 08 02 A6 */ mflr r0 +/* 803725AC 0036F50C 28 03 00 10 */ cmplwi r3, 0x10 +/* 803725B0 0036F510 90 01 00 04 */ stw r0, 4(r1) +/* 803725B4 0036F514 94 21 FF F8 */ stwu r1, -8(r1) +/* 803725B8 0036F518 40 82 00 2C */ bne lbl_803725E4 +/* 803725BC 0036F51C 80 8D AC 10 */ lwz r4, lbl_805A97D0@sda21(r13) +/* 803725C0 0036F520 38 00 FF FF */ li r0, -1 +/* 803725C4 0036F524 3C 60 01 23 */ lis r3, 0x01234568@ha +/* 803725C8 0036F528 90 04 00 0C */ stw r0, 0xc(r4) +/* 803725CC 0036F52C 38 63 45 68 */ addi r3, r3, 0x01234568@l +/* 803725D0 0036F530 48 00 25 FD */ bl __DVDStoreErrorCode +/* 803725D4 0036F534 48 00 1A ED */ bl DVDReset +/* 803725D8 0036F538 38 60 00 00 */ li r3, 0 +/* 803725DC 0036F53C 4B FF F7 B5 */ bl cbForStateError +/* 803725E0 0036F540 48 00 00 2C */ b lbl_8037260C +lbl_803725E4: +/* 803725E4 0036F544 54 60 07 FF */ clrlwi. r0, r3, 0x1f +/* 803725E8 0036F548 41 82 00 18 */ beq lbl_80372600 +/* 803725EC 0036F54C 38 00 00 00 */ li r0, 0 +/* 803725F0 0036F550 80 6D AC 10 */ lwz r3, lbl_805A97D0@sda21(r13) +/* 803725F4 0036F554 90 0D AC 44 */ stw r0, lbl_805A9804@sda21(r13) +/* 803725F8 0036F558 48 00 00 25 */ bl stateCheckID2 +/* 803725FC 0036F55C 48 00 00 10 */ b lbl_8037260C +lbl_80372600: +/* 80372600 0036F560 3C 60 80 37 */ lis r3, cbForStateGettingError@ha +/* 80372604 0036F564 38 63 1F 4C */ addi r3, r3, cbForStateGettingError@l +/* 80372608 0036F568 4B FF E8 C9 */ bl DVDLowRequestError +lbl_8037260C: +/* 8037260C 0036F56C 80 01 00 0C */ lwz r0, 0xc(r1) +/* 80372610 0036F570 38 21 00 08 */ addi r1, r1, 8 +/* 80372614 0036F574 7C 08 03 A6 */ mtlr r0 +/* 80372618 0036F578 4E 80 00 20 */ blr + +.global stateCheckID2 +stateCheckID2: +/* 8037261C 0036F57C 7C 08 02 A6 */ mflr r0 +/* 80372620 0036F580 3C 60 80 54 */ lis r3, lbl_80540B60@ha +/* 80372624 0036F584 90 01 00 04 */ stw r0, 4(r1) +/* 80372628 0036F588 3C 80 80 37 */ lis r4, cbForStateCheckID2@ha +/* 8037262C 0036F58C 38 C4 27 68 */ addi r6, r4, cbForStateCheckID2@l +/* 80372630 0036F590 94 21 FF F8 */ stwu r1, -8(r1) +/* 80372634 0036F594 38 63 0B 60 */ addi r3, r3, lbl_80540B60@l +/* 80372638 0036F598 38 80 00 20 */ li r4, 0x20 +/* 8037263C 0036F59C 38 A0 04 20 */ li r5, 0x420 +/* 80372640 0036F5A0 4B FF E4 09 */ bl DVDLowRead +/* 80372644 0036F5A4 80 01 00 0C */ lwz r0, 0xc(r1) +/* 80372648 0036F5A8 38 21 00 08 */ addi r1, r1, 8 +/* 8037264C 0036F5AC 7C 08 03 A6 */ mtlr r0 +/* 80372650 0036F5B0 4E 80 00 20 */ blr + +.global cbForStateCheckID1 +cbForStateCheckID1: +/* 80372654 0036F5B4 7C 08 02 A6 */ mflr r0 +/* 80372658 0036F5B8 28 03 00 10 */ cmplwi r3, 0x10 +/* 8037265C 0036F5BC 90 01 00 04 */ stw r0, 4(r1) +/* 80372660 0036F5C0 94 21 FF E8 */ stwu r1, -0x18(r1) +/* 80372664 0036F5C4 93 E1 00 14 */ stw r31, 0x14(r1) +/* 80372668 0036F5C8 40 82 00 2C */ bne lbl_80372694 +/* 8037266C 0036F5CC 80 8D AC 10 */ lwz r4, lbl_805A97D0@sda21(r13) +/* 80372670 0036F5D0 38 00 FF FF */ li r0, -1 +/* 80372674 0036F5D4 3C 60 01 23 */ lis r3, 0x01234568@ha +/* 80372678 0036F5D8 90 04 00 0C */ stw r0, 0xc(r4) +/* 8037267C 0036F5DC 38 63 45 68 */ addi r3, r3, 0x01234568@l +/* 80372680 0036F5E0 48 00 25 4D */ bl __DVDStoreErrorCode +/* 80372684 0036F5E4 48 00 1A 3D */ bl DVDReset +/* 80372688 0036F5E8 38 60 00 00 */ li r3, 0 +/* 8037268C 0036F5EC 4B FF F7 05 */ bl cbForStateError +/* 80372690 0036F5F0 48 00 00 C4 */ b lbl_80372754 +lbl_80372694: +/* 80372694 0036F5F4 54 60 07 BD */ rlwinm. r0, r3, 0, 0x1e, 0x1e +/* 80372698 0036F5F8 41 82 00 2C */ beq lbl_803726C4 +/* 8037269C 0036F5FC 80 8D AC 10 */ lwz r4, lbl_805A97D0@sda21(r13) +/* 803726A0 0036F600 38 00 FF FF */ li r0, -1 +/* 803726A4 0036F604 3C 60 01 23 */ lis r3, 0x01234567@ha +/* 803726A8 0036F608 90 04 00 0C */ stw r0, 0xc(r4) +/* 803726AC 0036F60C 38 63 45 67 */ addi r3, r3, 0x01234567@l +/* 803726B0 0036F610 48 00 25 1D */ bl __DVDStoreErrorCode +/* 803726B4 0036F614 3C 60 80 37 */ lis r3, cbForStateError@ha +/* 803726B8 0036F618 38 63 1D 90 */ addi r3, r3, cbForStateError@l +/* 803726BC 0036F61C 4B FF E7 89 */ bl DVDLowStopMotor +/* 803726C0 0036F620 48 00 00 94 */ b lbl_80372754 +lbl_803726C4: +/* 803726C4 0036F624 38 80 00 00 */ li r4, 0 +/* 803726C8 0036F628 90 8D AC 44 */ stw r4, lbl_805A9804@sda21(r13) +/* 803726CC 0036F62C 80 0D AC 30 */ lwz r0, lbl_805A97F0@sda21(r13) +/* 803726D0 0036F630 28 00 00 00 */ cmplwi r0, 0 +/* 803726D4 0036F634 41 82 00 68 */ beq lbl_8037273C +/* 803726D8 0036F638 38 00 00 01 */ li r0, 1 +/* 803726DC 0036F63C 83 ED AC 10 */ lwz r31, lbl_805A97D0@sda21(r13) +/* 803726E0 0036F640 90 0D AC 38 */ stw r0, lbl_805A97F8@sda21(r13) +/* 803726E4 0036F644 3C 60 80 54 */ lis r3, lbl_80540BA0@ha +/* 803726E8 0036F648 38 63 0B A0 */ addi r3, r3, lbl_80540BA0@l +/* 803726EC 0036F64C 90 8D AC 30 */ stw r4, lbl_805A97F0@sda21(r13) +/* 803726F0 0036F650 38 00 00 0A */ li r0, 0xa +/* 803726F4 0036F654 90 6D AC 10 */ stw r3, lbl_805A97D0@sda21(r13) +/* 803726F8 0036F658 90 1F 00 0C */ stw r0, 0xc(r31) +/* 803726FC 0036F65C 81 9F 00 28 */ lwz r12, 0x28(r31) +/* 80372700 0036F660 28 0C 00 00 */ cmplwi r12, 0 +/* 80372704 0036F664 41 82 00 14 */ beq lbl_80372718 +/* 80372708 0036F668 7D 88 03 A6 */ mtlr r12 +/* 8037270C 0036F66C 38 9F 00 00 */ addi r4, r31, 0 +/* 80372710 0036F670 38 60 FF FD */ li r3, -3 +/* 80372714 0036F674 4E 80 00 21 */ blrl +lbl_80372718: +/* 80372718 0036F678 81 8D AC 34 */ lwz r12, lbl_805A97F4@sda21(r13) +/* 8037271C 0036F67C 28 0C 00 00 */ cmplwi r12, 0 +/* 80372720 0036F680 41 82 00 14 */ beq lbl_80372734 +/* 80372724 0036F684 7D 88 03 A6 */ mtlr r12 +/* 80372728 0036F688 38 9F 00 00 */ addi r4, r31, 0 +/* 8037272C 0036F68C 38 60 00 00 */ li r3, 0 +/* 80372730 0036F690 4E 80 00 21 */ blrl +lbl_80372734: +/* 80372734 0036F694 48 00 04 D1 */ bl stateReady +/* 80372738 0036F698 38 80 00 01 */ li r4, 1 +lbl_8037273C: +/* 8037273C 0036F69C 2C 04 00 00 */ cmpwi r4, 0 +/* 80372740 0036F6A0 40 82 00 14 */ bne lbl_80372754 +/* 80372744 0036F6A4 80 6D AC 10 */ lwz r3, lbl_805A97D0@sda21(r13) +/* 80372748 0036F6A8 38 00 00 06 */ li r0, 6 +/* 8037274C 0036F6AC 90 03 00 0C */ stw r0, 0xc(r3) +/* 80372750 0036F6B0 48 00 03 A9 */ bl stateMotorStopped +lbl_80372754: +/* 80372754 0036F6B4 80 01 00 1C */ lwz r0, 0x1c(r1) +/* 80372758 0036F6B8 83 E1 00 14 */ lwz r31, 0x14(r1) +/* 8037275C 0036F6BC 38 21 00 18 */ addi r1, r1, 0x18 +/* 80372760 0036F6C0 7C 08 03 A6 */ mtlr r0 +/* 80372764 0036F6C4 4E 80 00 20 */ blr + +.global cbForStateCheckID2 +cbForStateCheckID2: +/* 80372768 0036F6C8 7C 08 02 A6 */ mflr r0 +/* 8037276C 0036F6CC 28 03 00 10 */ cmplwi r3, 0x10 +/* 80372770 0036F6D0 90 01 00 04 */ stw r0, 4(r1) +/* 80372774 0036F6D4 94 21 FF E8 */ stwu r1, -0x18(r1) +/* 80372778 0036F6D8 93 E1 00 14 */ stw r31, 0x14(r1) +/* 8037277C 0036F6DC 40 82 00 2C */ bne lbl_803727A8 +/* 80372780 0036F6E0 80 8D AC 10 */ lwz r4, lbl_805A97D0@sda21(r13) +/* 80372784 0036F6E4 38 00 FF FF */ li r0, -1 +/* 80372788 0036F6E8 3C 60 01 23 */ lis r3, 0x01234568@ha +/* 8037278C 0036F6EC 90 04 00 0C */ stw r0, 0xc(r4) +/* 80372790 0036F6F0 38 63 45 68 */ addi r3, r3, 0x01234568@l +/* 80372794 0036F6F4 48 00 24 39 */ bl __DVDStoreErrorCode +/* 80372798 0036F6F8 48 00 19 29 */ bl DVDReset +/* 8037279C 0036F6FC 38 60 00 00 */ li r3, 0 +/* 803727A0 0036F700 4B FF F5 F1 */ bl cbForStateError +/* 803727A4 0036F704 48 00 00 94 */ b lbl_80372838 +lbl_803727A8: +/* 803727A8 0036F708 54 60 07 FF */ clrlwi. r0, r3, 0x1f +/* 803727AC 0036F70C 41 82 00 80 */ beq lbl_8037282C +/* 803727B0 0036F710 3C 60 80 37 */ lis r3, stateReadingFST@ha +/* 803727B4 0036F714 80 8D AC 18 */ lwz r4, lbl_805A97D8@sda21(r13) +/* 803727B8 0036F718 38 03 1C 70 */ addi r0, r3, stateReadingFST@l +/* 803727BC 0036F71C 38 A0 00 00 */ li r5, 0 +/* 803727C0 0036F720 90 0D AC 58 */ stw r0, lbl_805A9818@sda21(r13) +/* 803727C4 0036F724 3C 60 80 54 */ lis r3, lbl_80540B60@ha +/* 803727C8 0036F728 90 AD AC 44 */ stw r5, lbl_805A9804@sda21(r13) +/* 803727CC 0036F72C 38 63 0B 60 */ addi r3, r3, lbl_80540B60@l +/* 803727D0 0036F730 3B E3 00 08 */ addi r31, r3, 8 +/* 803727D4 0036F734 80 64 00 3C */ lwz r3, 0x3c(r4) +/* 803727D8 0036F738 80 1F 00 00 */ lwz r0, 0(r31) +/* 803727DC 0036F73C 7C 03 00 40 */ cmplw r3, r0 +/* 803727E0 0036F740 40 80 00 1C */ bge lbl_803727FC +/* 803727E4 0036F744 3C 60 80 3F */ lis r3, lbl_803EFFD4@ha +/* 803727E8 0036F748 4C C6 31 82 */ crclr 6 +/* 803727EC 0036F74C 38 A3 FF D4 */ addi r5, r3, lbl_803EFFD4@l +/* 803727F0 0036F750 38 6D 9E E4 */ addi r3, r13, lbl_805A8AA4@sda21 +/* 803727F4 0036F754 38 80 02 76 */ li r4, 0x276 +/* 803727F8 0036F758 48 00 D2 35 */ bl OSPanic +lbl_803727FC: +/* 803727FC 0036F75C 3C 60 80 54 */ lis r3, lbl_80540B60@ha +/* 80372800 0036F760 80 DF 00 00 */ lwz r6, 0(r31) +/* 80372804 0036F764 38 A3 0B 60 */ addi r5, r3, lbl_80540B60@l +/* 80372808 0036F768 80 ED AC 18 */ lwz r7, lbl_805A97D8@sda21(r13) +/* 8037280C 0036F76C 3C 80 80 37 */ lis r4, cbForReadingFST@ha +/* 80372810 0036F770 80 A5 00 04 */ lwz r5, 4(r5) +/* 80372814 0036F774 38 06 00 1F */ addi r0, r6, 0x1f +/* 80372818 0036F778 80 67 00 38 */ lwz r3, 0x38(r7) +/* 8037281C 0036F77C 38 C4 1D 04 */ addi r6, r4, cbForReadingFST@l +/* 80372820 0036F780 54 04 00 34 */ rlwinm r4, r0, 0, 0, 0x1a +/* 80372824 0036F784 4B FF E2 25 */ bl DVDLowRead +/* 80372828 0036F788 48 00 00 10 */ b lbl_80372838 +lbl_8037282C: +/* 8037282C 0036F78C 3C 60 80 37 */ lis r3, cbForStateGettingError@ha +/* 80372830 0036F790 38 63 1F 4C */ addi r3, r3, cbForStateGettingError@l +/* 80372834 0036F794 4B FF E6 9D */ bl DVDLowRequestError +lbl_80372838: +/* 80372838 0036F798 80 01 00 1C */ lwz r0, 0x1c(r1) +/* 8037283C 0036F79C 83 E1 00 14 */ lwz r31, 0x14(r1) +/* 80372840 0036F7A0 38 21 00 18 */ addi r1, r1, 0x18 +/* 80372844 0036F7A4 7C 08 03 A6 */ mtlr r0 +/* 80372848 0036F7A8 4E 80 00 20 */ blr + +.global cbForStateCheckID3 +cbForStateCheckID3: +/* 8037284C 0036F7AC 7C 08 02 A6 */ mflr r0 +/* 80372850 0036F7B0 28 03 00 10 */ cmplwi r3, 0x10 +/* 80372854 0036F7B4 90 01 00 04 */ stw r0, 4(r1) +/* 80372858 0036F7B8 94 21 FF E8 */ stwu r1, -0x18(r1) +/* 8037285C 0036F7BC 93 E1 00 14 */ stw r31, 0x14(r1) +/* 80372860 0036F7C0 40 82 00 2C */ bne lbl_8037288C +/* 80372864 0036F7C4 80 8D AC 10 */ lwz r4, lbl_805A97D0@sda21(r13) +/* 80372868 0036F7C8 38 00 FF FF */ li r0, -1 +/* 8037286C 0036F7CC 3C 60 01 23 */ lis r3, 0x01234568@ha +/* 80372870 0036F7D0 90 04 00 0C */ stw r0, 0xc(r4) +/* 80372874 0036F7D4 38 63 45 68 */ addi r3, r3, 0x01234568@l +/* 80372878 0036F7D8 48 00 23 55 */ bl __DVDStoreErrorCode +/* 8037287C 0036F7DC 48 00 18 45 */ bl DVDReset +/* 80372880 0036F7E0 38 60 00 00 */ li r3, 0 +/* 80372884 0036F7E4 4B FF F5 0D */ bl cbForStateError +/* 80372888 0036F7E8 48 00 00 AC */ b lbl_80372934 +lbl_8037288C: +/* 8037288C 0036F7EC 54 60 07 FF */ clrlwi. r0, r3, 0x1f +/* 80372890 0036F7F0 41 82 00 98 */ beq lbl_80372928 +/* 80372894 0036F7F4 38 80 00 00 */ li r4, 0 +/* 80372898 0036F7F8 90 8D AC 44 */ stw r4, lbl_805A9804@sda21(r13) +/* 8037289C 0036F7FC 80 0D AC 30 */ lwz r0, lbl_805A97F0@sda21(r13) +/* 803728A0 0036F800 28 00 00 00 */ cmplwi r0, 0 +/* 803728A4 0036F804 41 82 00 64 */ beq lbl_80372908 +/* 803728A8 0036F808 90 8D AC 38 */ stw r4, lbl_805A97F8@sda21(r13) +/* 803728AC 0036F80C 3C 60 80 54 */ lis r3, lbl_80540BA0@ha +/* 803728B0 0036F810 83 ED AC 10 */ lwz r31, lbl_805A97D0@sda21(r13) +/* 803728B4 0036F814 38 63 0B A0 */ addi r3, r3, lbl_80540BA0@l +/* 803728B8 0036F818 90 8D AC 30 */ stw r4, lbl_805A97F0@sda21(r13) +/* 803728BC 0036F81C 38 00 00 0A */ li r0, 0xa +/* 803728C0 0036F820 90 6D AC 10 */ stw r3, lbl_805A97D0@sda21(r13) +/* 803728C4 0036F824 90 1F 00 0C */ stw r0, 0xc(r31) +/* 803728C8 0036F828 81 9F 00 28 */ lwz r12, 0x28(r31) +/* 803728CC 0036F82C 28 0C 00 00 */ cmplwi r12, 0 +/* 803728D0 0036F830 41 82 00 14 */ beq lbl_803728E4 +/* 803728D4 0036F834 7D 88 03 A6 */ mtlr r12 +/* 803728D8 0036F838 38 9F 00 00 */ addi r4, r31, 0 +/* 803728DC 0036F83C 38 60 FF FD */ li r3, -3 +/* 803728E0 0036F840 4E 80 00 21 */ blrl +lbl_803728E4: +/* 803728E4 0036F844 81 8D AC 34 */ lwz r12, lbl_805A97F4@sda21(r13) +/* 803728E8 0036F848 28 0C 00 00 */ cmplwi r12, 0 +/* 803728EC 0036F84C 41 82 00 14 */ beq lbl_80372900 +/* 803728F0 0036F850 7D 88 03 A6 */ mtlr r12 +/* 803728F4 0036F854 38 9F 00 00 */ addi r4, r31, 0 +/* 803728F8 0036F858 38 60 00 00 */ li r3, 0 +/* 803728FC 0036F85C 4E 80 00 21 */ blrl +lbl_80372900: +/* 80372900 0036F860 48 00 03 05 */ bl stateReady +/* 80372904 0036F864 38 80 00 01 */ li r4, 1 +lbl_80372908: +/* 80372908 0036F868 2C 04 00 00 */ cmpwi r4, 0 +/* 8037290C 0036F86C 40 82 00 28 */ bne lbl_80372934 +/* 80372910 0036F870 80 6D AC 10 */ lwz r3, lbl_805A97D0@sda21(r13) +/* 80372914 0036F874 38 00 00 01 */ li r0, 1 +/* 80372918 0036F878 90 03 00 0C */ stw r0, 0xc(r3) +/* 8037291C 0036F87C 80 6D AC 10 */ lwz r3, lbl_805A97D0@sda21(r13) +/* 80372920 0036F880 48 00 05 C1 */ bl stateBusy +/* 80372924 0036F884 48 00 00 10 */ b lbl_80372934 +lbl_80372928: +/* 80372928 0036F888 3C 60 80 37 */ lis r3, cbForStateGettingError@ha +/* 8037292C 0036F88C 38 63 1F 4C */ addi r3, r3, cbForStateGettingError@l +/* 80372930 0036F890 4B FF E5 A1 */ bl DVDLowRequestError +lbl_80372934: +/* 80372934 0036F894 80 01 00 1C */ lwz r0, 0x1c(r1) +/* 80372938 0036F898 83 E1 00 14 */ lwz r31, 0x14(r1) +/* 8037293C 0036F89C 38 21 00 18 */ addi r1, r1, 0x18 +/* 80372940 0036F8A0 7C 08 03 A6 */ mtlr r0 +/* 80372944 0036F8A4 4E 80 00 20 */ blr + +.global AlarmHandler_0 +AlarmHandler_0: +/* 80372948 0036F8A8 7C 08 02 A6 */ mflr r0 +/* 8037294C 0036F8AC 90 01 00 04 */ stw r0, 4(r1) +/* 80372950 0036F8B0 94 21 FF F8 */ stwu r1, -8(r1) +/* 80372954 0036F8B4 48 00 17 6D */ bl DVDReset +/* 80372958 0036F8B8 3C 60 80 54 */ lis r3, lbl_80540B80@ha +/* 8037295C 0036F8BC 38 63 0B 80 */ addi r3, r3, lbl_80540B80@l +/* 80372960 0036F8C0 38 80 00 20 */ li r4, 0x20 +/* 80372964 0036F8C4 48 00 C1 21 */ bl DCInvalidateRange +/* 80372968 0036F8C8 3C 80 80 37 */ lis r4, stateCoverClosed_CMD@ha +/* 8037296C 0036F8CC 80 6D AC 10 */ lwz r3, lbl_805A97D0@sda21(r13) +/* 80372970 0036F8D0 38 04 2A 58 */ addi r0, r4, stateCoverClosed_CMD@l +/* 80372974 0036F8D4 90 0D AC 58 */ stw r0, lbl_805A9818@sda21(r13) +/* 80372978 0036F8D8 48 00 00 E1 */ bl stateCoverClosed_CMD +/* 8037297C 0036F8DC 80 01 00 0C */ lwz r0, 0xc(r1) +/* 80372980 0036F8E0 38 21 00 08 */ addi r1, r1, 8 +/* 80372984 0036F8E4 7C 08 03 A6 */ mtlr r0 +/* 80372988 0036F8E8 4E 80 00 20 */ blr + +.global stateCoverClosed +stateCoverClosed: +/* 8037298C 0036F8EC 7C 08 02 A6 */ mflr r0 +/* 80372990 0036F8F0 3C 60 80 54 */ lis r3, lbl_80540B60@ha +/* 80372994 0036F8F4 90 01 00 04 */ stw r0, 4(r1) +/* 80372998 0036F8F8 94 21 FF F0 */ stwu r1, -0x10(r1) +/* 8037299C 0036F8FC 93 E1 00 0C */ stw r31, 0xc(r1) +/* 803729A0 0036F900 3B E3 0B 60 */ addi r31, r3, lbl_80540B60@l +/* 803729A4 0036F904 80 0D AC 2C */ lwz r0, lbl_805A97EC@sda21(r13) +/* 803729A8 0036F908 2C 00 00 0D */ cmpwi r0, 0xd +/* 803729AC 0036F90C 41 82 00 28 */ beq lbl_803729D4 +/* 803729B0 0036F910 40 80 00 18 */ bge lbl_803729C8 +/* 803729B4 0036F914 2C 00 00 06 */ cmpwi r0, 6 +/* 803729B8 0036F918 40 80 00 4C */ bge lbl_80372A04 +/* 803729BC 0036F91C 2C 00 00 04 */ cmpwi r0, 4 +/* 803729C0 0036F920 40 80 00 14 */ bge lbl_803729D4 +/* 803729C4 0036F924 48 00 00 40 */ b lbl_80372A04 +lbl_803729C8: +/* 803729C8 0036F928 2C 00 00 0F */ cmpwi r0, 0xf +/* 803729CC 0036F92C 41 82 00 08 */ beq lbl_803729D4 +/* 803729D0 0036F930 48 00 00 34 */ b lbl_80372A04 +lbl_803729D4: +/* 803729D4 0036F934 48 00 1E E5 */ bl __DVDClearWaitingQueue +/* 803729D8 0036F938 80 8D AC 10 */ lwz r4, lbl_805A97D0@sda21(r13) +/* 803729DC 0036F93C 38 1F 00 40 */ addi r0, r31, 0x40 +/* 803729E0 0036F940 90 0D AC 10 */ stw r0, lbl_805A97D0@sda21(r13) +/* 803729E4 0036F944 81 84 00 28 */ lwz r12, 0x28(r4) +/* 803729E8 0036F948 28 0C 00 00 */ cmplwi r12, 0 +/* 803729EC 0036F94C 41 82 00 10 */ beq lbl_803729FC +/* 803729F0 0036F950 7D 88 03 A6 */ mtlr r12 +/* 803729F4 0036F954 38 60 FF FC */ li r3, -4 +/* 803729F8 0036F958 4E 80 00 21 */ blrl +lbl_803729FC: +/* 803729FC 0036F95C 48 00 02 09 */ bl stateReady +/* 80372A00 0036F960 48 00 00 44 */ b lbl_80372A44 +lbl_80372A04: +/* 80372A04 0036F964 48 00 16 BD */ bl DVDReset +/* 80372A08 0036F968 38 7F 00 70 */ addi r3, r31, 0x70 +/* 80372A0C 0036F96C 48 00 B6 A5 */ bl OSCreateAlarm +/* 80372A10 0036F970 3C 60 80 00 */ lis r3, 0x800000F8@ha +/* 80372A14 0036F974 80 03 00 F8 */ lwz r0, 0x800000F8@l(r3) +/* 80372A18 0036F978 3C 80 10 62 */ lis r4, 0x10624DD3@ha +/* 80372A1C 0036F97C 3C 60 80 37 */ lis r3, AlarmHandler_0@ha +/* 80372A20 0036F980 54 00 F0 BE */ srwi r0, r0, 2 +/* 80372A24 0036F984 38 84 4D D3 */ addi r4, r4, 0x10624DD3@l +/* 80372A28 0036F988 7C 04 00 16 */ mulhwu r0, r4, r0 +/* 80372A2C 0036F98C 54 00 D1 BE */ srwi r0, r0, 6 +/* 80372A30 0036F990 1C C0 04 7E */ mulli r6, r0, 0x47e +/* 80372A34 0036F994 38 E3 29 48 */ addi r7, r3, AlarmHandler_0@l +/* 80372A38 0036F998 38 7F 00 70 */ addi r3, r31, 0x70 +/* 80372A3C 0036F99C 38 A0 00 00 */ li r5, 0 +/* 80372A40 0036F9A0 48 00 B8 D1 */ bl OSSetAlarm +lbl_80372A44: +/* 80372A44 0036F9A4 80 01 00 14 */ lwz r0, 0x14(r1) +/* 80372A48 0036F9A8 83 E1 00 0C */ lwz r31, 0xc(r1) +/* 80372A4C 0036F9AC 38 21 00 10 */ addi r1, r1, 0x10 +/* 80372A50 0036F9B0 7C 08 03 A6 */ mtlr r0 +/* 80372A54 0036F9B4 4E 80 00 20 */ blr + +.global stateCoverClosed_CMD +stateCoverClosed_CMD: +/* 80372A58 0036F9B8 7C 08 02 A6 */ mflr r0 +/* 80372A5C 0036F9BC 3C 60 80 54 */ lis r3, lbl_80540B80@ha +/* 80372A60 0036F9C0 90 01 00 04 */ stw r0, 4(r1) +/* 80372A64 0036F9C4 3C 80 80 37 */ lis r4, cbForStateCoverClosed@ha +/* 80372A68 0036F9C8 38 63 0B 80 */ addi r3, r3, lbl_80540B80@l +/* 80372A6C 0036F9CC 94 21 FF F8 */ stwu r1, -8(r1) +/* 80372A70 0036F9D0 38 84 2A 88 */ addi r4, r4, cbForStateCoverClosed@l +/* 80372A74 0036F9D4 4B FF E3 2D */ bl DVDLowReadDiskID +/* 80372A78 0036F9D8 80 01 00 0C */ lwz r0, 0xc(r1) +/* 80372A7C 0036F9DC 38 21 00 08 */ addi r1, r1, 8 +/* 80372A80 0036F9E0 7C 08 03 A6 */ mtlr r0 +/* 80372A84 0036F9E4 4E 80 00 20 */ blr + +.global cbForStateCoverClosed +cbForStateCoverClosed: +/* 80372A88 0036F9E8 7C 08 02 A6 */ mflr r0 +/* 80372A8C 0036F9EC 28 03 00 10 */ cmplwi r3, 0x10 +/* 80372A90 0036F9F0 90 01 00 04 */ stw r0, 4(r1) +/* 80372A94 0036F9F4 94 21 FF F8 */ stwu r1, -8(r1) +/* 80372A98 0036F9F8 40 82 00 2C */ bne lbl_80372AC4 +/* 80372A9C 0036F9FC 80 8D AC 10 */ lwz r4, lbl_805A97D0@sda21(r13) +/* 80372AA0 0036FA00 38 00 FF FF */ li r0, -1 +/* 80372AA4 0036FA04 3C 60 01 23 */ lis r3, 0x01234568@ha +/* 80372AA8 0036FA08 90 04 00 0C */ stw r0, 0xc(r4) +/* 80372AAC 0036FA0C 38 63 45 68 */ addi r3, r3, 0x01234568@l +/* 80372AB0 0036FA10 48 00 21 1D */ bl __DVDStoreErrorCode +/* 80372AB4 0036FA14 48 00 16 0D */ bl DVDReset +/* 80372AB8 0036FA18 38 60 00 00 */ li r3, 0 +/* 80372ABC 0036FA1C 4B FF F2 D5 */ bl cbForStateError +/* 80372AC0 0036FA20 48 00 00 28 */ b lbl_80372AE8 +lbl_80372AC4: +/* 80372AC4 0036FA24 54 60 07 FF */ clrlwi. r0, r3, 0x1f +/* 80372AC8 0036FA28 41 82 00 14 */ beq lbl_80372ADC +/* 80372ACC 0036FA2C 38 00 00 00 */ li r0, 0 +/* 80372AD0 0036FA30 90 0D AC 44 */ stw r0, lbl_805A9804@sda21(r13) +/* 80372AD4 0036FA34 4B FF F9 8D */ bl stateCheckID +/* 80372AD8 0036FA38 48 00 00 10 */ b lbl_80372AE8 +lbl_80372ADC: +/* 80372ADC 0036FA3C 3C 60 80 37 */ lis r3, cbForStateGettingError@ha +/* 80372AE0 0036FA40 38 63 1F 4C */ addi r3, r3, cbForStateGettingError@l +/* 80372AE4 0036FA44 4B FF E3 ED */ bl DVDLowRequestError +lbl_80372AE8: +/* 80372AE8 0036FA48 80 01 00 0C */ lwz r0, 0xc(r1) +/* 80372AEC 0036FA4C 38 21 00 08 */ addi r1, r1, 8 +/* 80372AF0 0036FA50 7C 08 03 A6 */ mtlr r0 +/* 80372AF4 0036FA54 4E 80 00 20 */ blr + +.global stateMotorStopped +stateMotorStopped: +/* 80372AF8 0036FA58 7C 08 02 A6 */ mflr r0 +/* 80372AFC 0036FA5C 3C 60 80 37 */ lis r3, cbForStateMotorStopped@ha +/* 80372B00 0036FA60 90 01 00 04 */ stw r0, 4(r1) +/* 80372B04 0036FA64 38 63 2B 20 */ addi r3, r3, cbForStateMotorStopped@l +/* 80372B08 0036FA68 94 21 FF F8 */ stwu r1, -8(r1) +/* 80372B0C 0036FA6C 4B FF E2 69 */ bl DVDLowWaitCoverClose +/* 80372B10 0036FA70 80 01 00 0C */ lwz r0, 0xc(r1) +/* 80372B14 0036FA74 38 21 00 08 */ addi r1, r1, 8 +/* 80372B18 0036FA78 7C 08 03 A6 */ mtlr r0 +/* 80372B1C 0036FA7C 4E 80 00 20 */ blr + +.global cbForStateMotorStopped +cbForStateMotorStopped: +/* 80372B20 0036FA80 7C 08 02 A6 */ mflr r0 +/* 80372B24 0036FA84 3C 60 CC 00 */ lis r3, 0xCC006004@ha +/* 80372B28 0036FA88 90 01 00 04 */ stw r0, 4(r1) +/* 80372B2C 0036FA8C 38 00 00 00 */ li r0, 0 +/* 80372B30 0036FA90 3C 80 80 54 */ lis r4, lbl_80540B60@ha +/* 80372B34 0036FA94 94 21 FF E8 */ stwu r1, -0x18(r1) +/* 80372B38 0036FA98 93 E1 00 14 */ stw r31, 0x14(r1) +/* 80372B3C 0036FA9C 3B E4 0B 60 */ addi r31, r4, lbl_80540B60@l +/* 80372B40 0036FAA0 90 03 60 04 */ stw r0, 0xCC006004@l(r3) +/* 80372B44 0036FAA4 38 00 00 03 */ li r0, 3 +/* 80372B48 0036FAA8 80 6D AC 10 */ lwz r3, lbl_805A97D0@sda21(r13) +/* 80372B4C 0036FAAC 90 03 00 0C */ stw r0, 0xc(r3) +/* 80372B50 0036FAB0 80 0D AC 2C */ lwz r0, lbl_805A97EC@sda21(r13) +/* 80372B54 0036FAB4 2C 00 00 0D */ cmpwi r0, 0xd +/* 80372B58 0036FAB8 41 82 00 28 */ beq lbl_80372B80 +/* 80372B5C 0036FABC 40 80 00 18 */ bge lbl_80372B74 +/* 80372B60 0036FAC0 2C 00 00 06 */ cmpwi r0, 6 +/* 80372B64 0036FAC4 40 80 00 4C */ bge lbl_80372BB0 +/* 80372B68 0036FAC8 2C 00 00 04 */ cmpwi r0, 4 +/* 80372B6C 0036FACC 40 80 00 14 */ bge lbl_80372B80 +/* 80372B70 0036FAD0 48 00 00 40 */ b lbl_80372BB0 +lbl_80372B74: +/* 80372B74 0036FAD4 2C 00 00 0F */ cmpwi r0, 0xf +/* 80372B78 0036FAD8 41 82 00 08 */ beq lbl_80372B80 +/* 80372B7C 0036FADC 48 00 00 34 */ b lbl_80372BB0 +lbl_80372B80: +/* 80372B80 0036FAE0 48 00 1D 39 */ bl __DVDClearWaitingQueue +/* 80372B84 0036FAE4 80 8D AC 10 */ lwz r4, lbl_805A97D0@sda21(r13) +/* 80372B88 0036FAE8 38 1F 00 40 */ addi r0, r31, 0x40 +/* 80372B8C 0036FAEC 90 0D AC 10 */ stw r0, lbl_805A97D0@sda21(r13) +/* 80372B90 0036FAF0 81 84 00 28 */ lwz r12, 0x28(r4) +/* 80372B94 0036FAF4 28 0C 00 00 */ cmplwi r12, 0 +/* 80372B98 0036FAF8 41 82 00 10 */ beq lbl_80372BA8 +/* 80372B9C 0036FAFC 7D 88 03 A6 */ mtlr r12 +/* 80372BA0 0036FB00 38 60 FF FC */ li r3, -4 +/* 80372BA4 0036FB04 4E 80 00 21 */ blrl +lbl_80372BA8: +/* 80372BA8 0036FB08 48 00 00 5D */ bl stateReady +/* 80372BAC 0036FB0C 48 00 00 44 */ b lbl_80372BF0 +lbl_80372BB0: +/* 80372BB0 0036FB10 48 00 15 11 */ bl DVDReset +/* 80372BB4 0036FB14 38 7F 00 70 */ addi r3, r31, 0x70 +/* 80372BB8 0036FB18 48 00 B4 F9 */ bl OSCreateAlarm +/* 80372BBC 0036FB1C 3C 60 80 00 */ lis r3, 0x800000F8@ha +/* 80372BC0 0036FB20 80 03 00 F8 */ lwz r0, 0x800000F8@l(r3) +/* 80372BC4 0036FB24 3C 80 10 62 */ lis r4, 0x10624DD3@ha +/* 80372BC8 0036FB28 3C 60 80 37 */ lis r3, AlarmHandler_0@ha +/* 80372BCC 0036FB2C 54 00 F0 BE */ srwi r0, r0, 2 +/* 80372BD0 0036FB30 38 84 4D D3 */ addi r4, r4, 0x10624DD3@l +/* 80372BD4 0036FB34 7C 04 00 16 */ mulhwu r0, r4, r0 +/* 80372BD8 0036FB38 54 00 D1 BE */ srwi r0, r0, 6 +/* 80372BDC 0036FB3C 1C C0 04 7E */ mulli r6, r0, 0x47e +/* 80372BE0 0036FB40 38 E3 29 48 */ addi r7, r3, AlarmHandler_0@l +/* 80372BE4 0036FB44 38 7F 00 70 */ addi r3, r31, 0x70 +/* 80372BE8 0036FB48 38 A0 00 00 */ li r5, 0 +/* 80372BEC 0036FB4C 48 00 B7 25 */ bl OSSetAlarm +lbl_80372BF0: +/* 80372BF0 0036FB50 80 01 00 1C */ lwz r0, 0x1c(r1) +/* 80372BF4 0036FB54 83 E1 00 14 */ lwz r31, 0x14(r1) +/* 80372BF8 0036FB58 38 21 00 18 */ addi r1, r1, 0x18 +/* 80372BFC 0036FB5C 7C 08 03 A6 */ mtlr r0 +/* 80372C00 0036FB60 4E 80 00 20 */ blr + +.global stateReady +stateReady: +/* 80372C04 0036FB64 7C 08 02 A6 */ mflr r0 +/* 80372C08 0036FB68 3C 60 80 54 */ lis r3, lbl_80540B60@ha +/* 80372C0C 0036FB6C 90 01 00 04 */ stw r0, 4(r1) +/* 80372C10 0036FB70 94 21 FF F0 */ stwu r1, -0x10(r1) +/* 80372C14 0036FB74 93 E1 00 0C */ stw r31, 0xc(r1) +/* 80372C18 0036FB78 3B E3 0B 60 */ addi r31, r3, lbl_80540B60@l +/* 80372C1C 0036FB7C 48 00 1D DD */ bl __DVDCheckWaitingQueue +/* 80372C20 0036FB80 2C 03 00 00 */ cmpwi r3, 0 +/* 80372C24 0036FB84 40 82 00 10 */ bne lbl_80372C34 +/* 80372C28 0036FB88 38 00 00 00 */ li r0, 0 +/* 80372C2C 0036FB8C 90 0D AC 10 */ stw r0, lbl_805A97D0@sda21(r13) +/* 80372C30 0036FB90 48 00 02 9C */ b lbl_80372ECC +lbl_80372C34: +/* 80372C34 0036FB94 80 0D AC 1C */ lwz r0, lbl_805A97DC@sda21(r13) +/* 80372C38 0036FB98 2C 00 00 00 */ cmpwi r0, 0 +/* 80372C3C 0036FB9C 41 82 00 18 */ beq lbl_80372C54 +/* 80372C40 0036FBA0 38 60 00 01 */ li r3, 1 +/* 80372C44 0036FBA4 38 00 00 00 */ li r0, 0 +/* 80372C48 0036FBA8 90 6D AC 20 */ stw r3, lbl_805A97E0@sda21(r13) +/* 80372C4C 0036FBAC 90 0D AC 10 */ stw r0, lbl_805A97D0@sda21(r13) +/* 80372C50 0036FBB0 48 00 02 7C */ b lbl_80372ECC +lbl_80372C54: +/* 80372C54 0036FBB4 48 00 1D 05 */ bl __DVDPopWaitingQueue +/* 80372C58 0036FBB8 80 0D AC 28 */ lwz r0, lbl_805A97E8@sda21(r13) +/* 80372C5C 0036FBBC 90 6D AC 10 */ stw r3, lbl_805A97D0@sda21(r13) +/* 80372C60 0036FBC0 2C 00 00 00 */ cmpwi r0, 0 +/* 80372C64 0036FBC4 41 82 00 3C */ beq lbl_80372CA0 +/* 80372C68 0036FBC8 80 6D AC 10 */ lwz r3, lbl_805A97D0@sda21(r13) +/* 80372C6C 0036FBCC 38 80 FF FF */ li r4, -1 +/* 80372C70 0036FBD0 38 1F 00 40 */ addi r0, r31, 0x40 +/* 80372C74 0036FBD4 90 83 00 0C */ stw r4, 0xc(r3) +/* 80372C78 0036FBD8 80 8D AC 10 */ lwz r4, lbl_805A97D0@sda21(r13) +/* 80372C7C 0036FBDC 90 0D AC 10 */ stw r0, lbl_805A97D0@sda21(r13) +/* 80372C80 0036FBE0 81 84 00 28 */ lwz r12, 0x28(r4) +/* 80372C84 0036FBE4 28 0C 00 00 */ cmplwi r12, 0 +/* 80372C88 0036FBE8 41 82 00 10 */ beq lbl_80372C98 +/* 80372C8C 0036FBEC 7D 88 03 A6 */ mtlr r12 +/* 80372C90 0036FBF0 38 60 FF FF */ li r3, -1 +/* 80372C94 0036FBF4 4E 80 00 21 */ blrl +lbl_80372C98: +/* 80372C98 0036FBF8 4B FF FF 6D */ bl stateReady +/* 80372C9C 0036FBFC 48 00 02 30 */ b lbl_80372ECC +lbl_80372CA0: +/* 80372CA0 0036FC00 80 8D AC 10 */ lwz r4, lbl_805A97D0@sda21(r13) +/* 80372CA4 0036FC04 80 04 00 08 */ lwz r0, 8(r4) +/* 80372CA8 0036FC08 90 0D AC 2C */ stw r0, lbl_805A97EC@sda21(r13) +/* 80372CAC 0036FC0C 80 0D AC 38 */ lwz r0, lbl_805A97F8@sda21(r13) +/* 80372CB0 0036FC10 28 00 00 00 */ cmplwi r0, 0 +/* 80372CB4 0036FC14 41 82 02 08 */ beq lbl_80372EBC +/* 80372CB8 0036FC18 80 0D AC 38 */ lwz r0, lbl_805A97F8@sda21(r13) +/* 80372CBC 0036FC1C 2C 00 00 04 */ cmpwi r0, 4 +/* 80372CC0 0036FC20 41 82 01 10 */ beq lbl_80372DD0 +/* 80372CC4 0036FC24 40 80 00 1C */ bge lbl_80372CE0 +/* 80372CC8 0036FC28 2C 00 00 02 */ cmpwi r0, 2 +/* 80372CCC 0036FC2C 41 82 00 D4 */ beq lbl_80372DA0 +/* 80372CD0 0036FC30 40 80 00 E8 */ bge lbl_80372DB8 +/* 80372CD4 0036FC34 2C 00 00 01 */ cmpwi r0, 1 +/* 80372CD8 0036FC38 40 80 00 1C */ bge lbl_80372CF4 +/* 80372CDC 0036FC3C 48 00 01 D4 */ b lbl_80372EB0 +lbl_80372CE0: +/* 80372CE0 0036FC40 2C 00 00 08 */ cmpwi r0, 8 +/* 80372CE4 0036FC44 40 80 01 CC */ bge lbl_80372EB0 +/* 80372CE8 0036FC48 2C 00 00 06 */ cmpwi r0, 6 +/* 80372CEC 0036FC4C 40 80 00 FC */ bge lbl_80372DE8 +/* 80372CF0 0036FC50 48 00 01 A4 */ b lbl_80372E94 +lbl_80372CF4: +/* 80372CF4 0036FC54 38 00 00 01 */ li r0, 1 +/* 80372CF8 0036FC58 90 04 00 0C */ stw r0, 0xc(r4) +/* 80372CFC 0036FC5C 80 0D AC 2C */ lwz r0, lbl_805A97EC@sda21(r13) +/* 80372D00 0036FC60 2C 00 00 0D */ cmpwi r0, 0xd +/* 80372D04 0036FC64 41 82 00 28 */ beq lbl_80372D2C +/* 80372D08 0036FC68 40 80 00 18 */ bge lbl_80372D20 +/* 80372D0C 0036FC6C 2C 00 00 06 */ cmpwi r0, 6 +/* 80372D10 0036FC70 40 80 00 4C */ bge lbl_80372D5C +/* 80372D14 0036FC74 2C 00 00 04 */ cmpwi r0, 4 +/* 80372D18 0036FC78 40 80 00 14 */ bge lbl_80372D2C +/* 80372D1C 0036FC7C 48 00 00 40 */ b lbl_80372D5C +lbl_80372D20: +/* 80372D20 0036FC80 2C 00 00 0F */ cmpwi r0, 0xf +/* 80372D24 0036FC84 41 82 00 08 */ beq lbl_80372D2C +/* 80372D28 0036FC88 48 00 00 34 */ b lbl_80372D5C +lbl_80372D2C: +/* 80372D2C 0036FC8C 48 00 1B 8D */ bl __DVDClearWaitingQueue +/* 80372D30 0036FC90 80 8D AC 10 */ lwz r4, lbl_805A97D0@sda21(r13) +/* 80372D34 0036FC94 38 1F 00 40 */ addi r0, r31, 0x40 +/* 80372D38 0036FC98 90 0D AC 10 */ stw r0, lbl_805A97D0@sda21(r13) +/* 80372D3C 0036FC9C 81 84 00 28 */ lwz r12, 0x28(r4) +/* 80372D40 0036FCA0 28 0C 00 00 */ cmplwi r12, 0 +/* 80372D44 0036FCA4 41 82 00 10 */ beq lbl_80372D54 +/* 80372D48 0036FCA8 7D 88 03 A6 */ mtlr r12 +/* 80372D4C 0036FCAC 38 60 FF FC */ li r3, -4 +/* 80372D50 0036FCB0 4E 80 00 21 */ blrl +lbl_80372D54: +/* 80372D54 0036FCB4 4B FF FE B1 */ bl stateReady +/* 80372D58 0036FCB8 48 00 01 58 */ b lbl_80372EB0 +lbl_80372D5C: +/* 80372D5C 0036FCBC 48 00 13 65 */ bl DVDReset +/* 80372D60 0036FCC0 38 7F 00 70 */ addi r3, r31, 0x70 +/* 80372D64 0036FCC4 48 00 B3 4D */ bl OSCreateAlarm +/* 80372D68 0036FCC8 3C 60 80 00 */ lis r3, 0x800000F8@ha +/* 80372D6C 0036FCCC 80 03 00 F8 */ lwz r0, 0x800000F8@l(r3) +/* 80372D70 0036FCD0 3C 80 10 62 */ lis r4, 0x10624DD3@ha +/* 80372D74 0036FCD4 3C 60 80 37 */ lis r3, AlarmHandler_0@ha +/* 80372D78 0036FCD8 54 00 F0 BE */ srwi r0, r0, 2 +/* 80372D7C 0036FCDC 38 84 4D D3 */ addi r4, r4, 0x10624DD3@l +/* 80372D80 0036FCE0 7C 04 00 16 */ mulhwu r0, r4, r0 +/* 80372D84 0036FCE4 54 00 D1 BE */ srwi r0, r0, 6 +/* 80372D88 0036FCE8 1C C0 04 7E */ mulli r6, r0, 0x47e +/* 80372D8C 0036FCEC 38 E3 29 48 */ addi r7, r3, AlarmHandler_0@l +/* 80372D90 0036FCF0 38 7F 00 70 */ addi r3, r31, 0x70 +/* 80372D94 0036FCF4 38 A0 00 00 */ li r5, 0 +/* 80372D98 0036FCF8 48 00 B5 79 */ bl OSSetAlarm +/* 80372D9C 0036FCFC 48 00 01 14 */ b lbl_80372EB0 +lbl_80372DA0: +/* 80372DA0 0036FD00 38 00 00 0B */ li r0, 0xb +/* 80372DA4 0036FD04 3C 60 80 37 */ lis r3, cbForStateMotorStopped@ha +/* 80372DA8 0036FD08 90 04 00 0C */ stw r0, 0xc(r4) +/* 80372DAC 0036FD0C 38 63 2B 20 */ addi r3, r3, cbForStateMotorStopped@l +/* 80372DB0 0036FD10 4B FF DF C5 */ bl DVDLowWaitCoverClose +/* 80372DB4 0036FD14 48 00 00 FC */ b lbl_80372EB0 +lbl_80372DB8: +/* 80372DB8 0036FD18 38 00 00 04 */ li r0, 4 +/* 80372DBC 0036FD1C 3C 60 80 37 */ lis r3, cbForStateMotorStopped@ha +/* 80372DC0 0036FD20 90 04 00 0C */ stw r0, 0xc(r4) +/* 80372DC4 0036FD24 38 63 2B 20 */ addi r3, r3, cbForStateMotorStopped@l +/* 80372DC8 0036FD28 4B FF DF AD */ bl DVDLowWaitCoverClose +/* 80372DCC 0036FD2C 48 00 00 E4 */ b lbl_80372EB0 +lbl_80372DD0: +/* 80372DD0 0036FD30 38 00 00 05 */ li r0, 5 +/* 80372DD4 0036FD34 3C 60 80 37 */ lis r3, cbForStateMotorStopped@ha +/* 80372DD8 0036FD38 90 04 00 0C */ stw r0, 0xc(r4) +/* 80372DDC 0036FD3C 38 63 2B 20 */ addi r3, r3, cbForStateMotorStopped@l +/* 80372DE0 0036FD40 4B FF DF 95 */ bl DVDLowWaitCoverClose +/* 80372DE4 0036FD44 48 00 00 CC */ b lbl_80372EB0 +lbl_80372DE8: +/* 80372DE8 0036FD48 38 00 00 03 */ li r0, 3 +/* 80372DEC 0036FD4C 90 04 00 0C */ stw r0, 0xc(r4) +/* 80372DF0 0036FD50 80 0D AC 2C */ lwz r0, lbl_805A97EC@sda21(r13) +/* 80372DF4 0036FD54 2C 00 00 0D */ cmpwi r0, 0xd +/* 80372DF8 0036FD58 41 82 00 28 */ beq lbl_80372E20 +/* 80372DFC 0036FD5C 40 80 00 18 */ bge lbl_80372E14 +/* 80372E00 0036FD60 2C 00 00 06 */ cmpwi r0, 6 +/* 80372E04 0036FD64 40 80 00 4C */ bge lbl_80372E50 +/* 80372E08 0036FD68 2C 00 00 04 */ cmpwi r0, 4 +/* 80372E0C 0036FD6C 40 80 00 14 */ bge lbl_80372E20 +/* 80372E10 0036FD70 48 00 00 40 */ b lbl_80372E50 +lbl_80372E14: +/* 80372E14 0036FD74 2C 00 00 0F */ cmpwi r0, 0xf +/* 80372E18 0036FD78 41 82 00 08 */ beq lbl_80372E20 +/* 80372E1C 0036FD7C 48 00 00 34 */ b lbl_80372E50 +lbl_80372E20: +/* 80372E20 0036FD80 48 00 1A 99 */ bl __DVDClearWaitingQueue +/* 80372E24 0036FD84 80 8D AC 10 */ lwz r4, lbl_805A97D0@sda21(r13) +/* 80372E28 0036FD88 38 1F 00 40 */ addi r0, r31, 0x40 +/* 80372E2C 0036FD8C 90 0D AC 10 */ stw r0, lbl_805A97D0@sda21(r13) +/* 80372E30 0036FD90 81 84 00 28 */ lwz r12, 0x28(r4) +/* 80372E34 0036FD94 28 0C 00 00 */ cmplwi r12, 0 +/* 80372E38 0036FD98 41 82 00 10 */ beq lbl_80372E48 +/* 80372E3C 0036FD9C 7D 88 03 A6 */ mtlr r12 +/* 80372E40 0036FDA0 38 60 FF FC */ li r3, -4 +/* 80372E44 0036FDA4 4E 80 00 21 */ blrl +lbl_80372E48: +/* 80372E48 0036FDA8 4B FF FD BD */ bl stateReady +/* 80372E4C 0036FDAC 48 00 00 64 */ b lbl_80372EB0 +lbl_80372E50: +/* 80372E50 0036FDB0 48 00 12 71 */ bl DVDReset +/* 80372E54 0036FDB4 38 7F 00 70 */ addi r3, r31, 0x70 +/* 80372E58 0036FDB8 48 00 B2 59 */ bl OSCreateAlarm +/* 80372E5C 0036FDBC 3C 60 80 00 */ lis r3, 0x800000F8@ha +/* 80372E60 0036FDC0 80 03 00 F8 */ lwz r0, 0x800000F8@l(r3) +/* 80372E64 0036FDC4 3C 80 10 62 */ lis r4, 0x10624DD3@ha +/* 80372E68 0036FDC8 3C 60 80 37 */ lis r3, AlarmHandler_0@ha +/* 80372E6C 0036FDCC 54 00 F0 BE */ srwi r0, r0, 2 +/* 80372E70 0036FDD0 38 84 4D D3 */ addi r4, r4, 0x10624DD3@l +/* 80372E74 0036FDD4 7C 04 00 16 */ mulhwu r0, r4, r0 +/* 80372E78 0036FDD8 54 00 D1 BE */ srwi r0, r0, 6 +/* 80372E7C 0036FDDC 1C C0 04 7E */ mulli r6, r0, 0x47e +/* 80372E80 0036FDE0 38 E3 29 48 */ addi r7, r3, AlarmHandler_0@l +/* 80372E84 0036FDE4 38 7F 00 70 */ addi r3, r31, 0x70 +/* 80372E88 0036FDE8 38 A0 00 00 */ li r5, 0 +/* 80372E8C 0036FDEC 48 00 B4 85 */ bl OSSetAlarm +/* 80372E90 0036FDF0 48 00 00 20 */ b lbl_80372EB0 +lbl_80372E94: +/* 80372E94 0036FDF4 38 00 FF FF */ li r0, -1 +/* 80372E98 0036FDF8 90 04 00 0C */ stw r0, 0xc(r4) +/* 80372E9C 0036FDFC 80 6D AC 3C */ lwz r3, lbl_805A97FC@sda21(r13) +/* 80372EA0 0036FE00 48 00 1D 2D */ bl __DVDStoreErrorCode +/* 80372EA4 0036FE04 3C 60 80 37 */ lis r3, cbForStateError@ha +/* 80372EA8 0036FE08 38 63 1D 90 */ addi r3, r3, cbForStateError@l +/* 80372EAC 0036FE0C 4B FF DF 99 */ bl DVDLowStopMotor +lbl_80372EB0: +/* 80372EB0 0036FE10 38 00 00 00 */ li r0, 0 +/* 80372EB4 0036FE14 90 0D AC 38 */ stw r0, lbl_805A97F8@sda21(r13) +/* 80372EB8 0036FE18 48 00 00 14 */ b lbl_80372ECC +lbl_80372EBC: +/* 80372EBC 0036FE1C 38 00 00 01 */ li r0, 1 +/* 80372EC0 0036FE20 90 04 00 0C */ stw r0, 0xc(r4) +/* 80372EC4 0036FE24 80 6D AC 10 */ lwz r3, lbl_805A97D0@sda21(r13) +/* 80372EC8 0036FE28 48 00 00 19 */ bl stateBusy +lbl_80372ECC: +/* 80372ECC 0036FE2C 80 01 00 14 */ lwz r0, 0x14(r1) +/* 80372ED0 0036FE30 83 E1 00 0C */ lwz r31, 0xc(r1) +/* 80372ED4 0036FE34 38 21 00 10 */ addi r1, r1, 0x10 +/* 80372ED8 0036FE38 7C 08 03 A6 */ mtlr r0 +/* 80372EDC 0036FE3C 4E 80 00 20 */ blr + +.global stateBusy +stateBusy: +/* 80372EE0 0036FE40 7C 08 02 A6 */ mflr r0 +/* 80372EE4 0036FE44 3C 80 80 37 */ lis r4, stateBusy@ha +/* 80372EE8 0036FE48 90 01 00 04 */ stw r0, 4(r1) +/* 80372EEC 0036FE4C 38 04 2E E0 */ addi r0, r4, stateBusy@l +/* 80372EF0 0036FE50 7C 67 1B 78 */ mr r7, r3 +/* 80372EF4 0036FE54 94 21 FF F8 */ stwu r1, -8(r1) +/* 80372EF8 0036FE58 90 0D AC 58 */ stw r0, lbl_805A9818@sda21(r13) +/* 80372EFC 0036FE5C 80 03 00 08 */ lwz r0, 8(r3) +/* 80372F00 0036FE60 28 00 00 0F */ cmplwi r0, 0xf +/* 80372F04 0036FE64 41 81 02 D4 */ bgt lbl_803731D8 +/* 80372F08 0036FE68 3C 60 80 3F */ lis r3, lbl_803F0008@ha +/* 80372F0C 0036FE6C 38 63 00 08 */ addi r3, r3, lbl_803F0008@l +/* 80372F10 0036FE70 54 00 10 3A */ slwi r0, r0, 2 +/* 80372F14 0036FE74 7C 03 00 2E */ lwzx r0, r3, r0 +/* 80372F18 0036FE78 7C 09 03 A6 */ mtctr r0 +/* 80372F1C 0036FE7C 4E 80 04 20 */ bctr +/* 80372F20 0036FE80 3C 60 CC 00 */ lis r3, 0xCC006004@ha +/* 80372F24 0036FE84 80 03 60 04 */ lwz r0, 0xCC006004@l(r3) +/* 80372F28 0036FE88 38 A3 60 00 */ addi r5, r3, 0x6000 +/* 80372F2C 0036FE8C 3C 60 80 37 */ lis r3, cbForStateBusy@ha +/* 80372F30 0036FE90 90 05 00 04 */ stw r0, 4(r5) +/* 80372F34 0036FE94 38 00 00 20 */ li r0, 0x20 +/* 80372F38 0036FE98 38 83 32 00 */ addi r4, r3, cbForStateBusy@l +/* 80372F3C 0036FE9C 90 07 00 1C */ stw r0, 0x1c(r7) +/* 80372F40 0036FEA0 80 67 00 18 */ lwz r3, 0x18(r7) +/* 80372F44 0036FEA4 4B FF DE 5D */ bl DVDLowReadDiskID +/* 80372F48 0036FEA8 48 00 02 A8 */ b lbl_803731F0 +/* 80372F4C 0036FEAC 80 07 00 14 */ lwz r0, 0x14(r7) +/* 80372F50 0036FEB0 28 00 00 00 */ cmplwi r0, 0 +/* 80372F54 0036FEB4 40 82 00 3C */ bne lbl_80372F90 +/* 80372F58 0036FEB8 3C 60 80 54 */ lis r3, lbl_80540BA0@ha +/* 80372F5C 0036FEBC 80 8D AC 10 */ lwz r4, lbl_805A97D0@sda21(r13) +/* 80372F60 0036FEC0 38 03 0B A0 */ addi r0, r3, lbl_80540BA0@l +/* 80372F64 0036FEC4 90 0D AC 10 */ stw r0, lbl_805A97D0@sda21(r13) +/* 80372F68 0036FEC8 38 00 00 00 */ li r0, 0 +/* 80372F6C 0036FECC 90 04 00 0C */ stw r0, 0xc(r4) +/* 80372F70 0036FED0 81 84 00 28 */ lwz r12, 0x28(r4) +/* 80372F74 0036FED4 28 0C 00 00 */ cmplwi r12, 0 +/* 80372F78 0036FED8 41 82 00 10 */ beq lbl_80372F88 +/* 80372F7C 0036FEDC 7D 88 03 A6 */ mtlr r12 +/* 80372F80 0036FEE0 38 60 00 00 */ li r3, 0 +/* 80372F84 0036FEE4 4E 80 00 21 */ blrl +lbl_80372F88: +/* 80372F88 0036FEE8 4B FF FC 7D */ bl stateReady +/* 80372F8C 0036FEEC 48 00 02 64 */ b lbl_803731F0 +lbl_80372F90: +/* 80372F90 0036FEF0 3C 60 CC 00 */ lis r3, 0xCC006000@ha +/* 80372F94 0036FEF4 38 63 60 00 */ addi r3, r3, 0xCC006000@l +/* 80372F98 0036FEF8 80 03 00 04 */ lwz r0, 4(r3) +/* 80372F9C 0036FEFC 3C 80 00 08 */ lis r4, 8 +/* 80372FA0 0036FF00 90 03 00 04 */ stw r0, 4(r3) +/* 80372FA4 0036FF04 80 67 00 20 */ lwz r3, 0x20(r7) +/* 80372FA8 0036FF08 80 07 00 14 */ lwz r0, 0x14(r7) +/* 80372FAC 0036FF0C 7C 03 00 50 */ subf r0, r3, r0 +/* 80372FB0 0036FF10 7C 00 20 40 */ cmplw r0, r4 +/* 80372FB4 0036FF14 40 81 00 08 */ ble lbl_80372FBC +/* 80372FB8 0036FF18 48 00 00 08 */ b lbl_80372FC0 +lbl_80372FBC: +/* 80372FBC 0036FF1C 7C 04 03 78 */ mr r4, r0 +lbl_80372FC0: +/* 80372FC0 0036FF20 90 87 00 1C */ stw r4, 0x1c(r7) +/* 80372FC4 0036FF24 3C 60 80 37 */ lis r3, cbForStateBusy@ha +/* 80372FC8 0036FF28 38 C3 32 00 */ addi r6, r3, cbForStateBusy@l +/* 80372FCC 0036FF2C 80 A7 00 20 */ lwz r5, 0x20(r7) +/* 80372FD0 0036FF30 80 67 00 18 */ lwz r3, 0x18(r7) +/* 80372FD4 0036FF34 80 07 00 10 */ lwz r0, 0x10(r7) +/* 80372FD8 0036FF38 7C 63 2A 14 */ add r3, r3, r5 +/* 80372FDC 0036FF3C 80 87 00 1C */ lwz r4, 0x1c(r7) +/* 80372FE0 0036FF40 7C A0 2A 14 */ add r5, r0, r5 +/* 80372FE4 0036FF44 4B FF DA 65 */ bl DVDLowRead +/* 80372FE8 0036FF48 48 00 02 08 */ b lbl_803731F0 +/* 80372FEC 0036FF4C 3C 60 CC 00 */ lis r3, 0xCC006004@ha +/* 80372FF0 0036FF50 80 03 60 04 */ lwz r0, 0xCC006004@l(r3) +/* 80372FF4 0036FF54 38 A3 60 00 */ addi r5, r3, 0x6000 +/* 80372FF8 0036FF58 3C 60 80 37 */ lis r3, cbForStateBusy@ha +/* 80372FFC 0036FF5C 90 05 00 04 */ stw r0, 4(r5) +/* 80373000 0036FF60 38 83 32 00 */ addi r4, r3, cbForStateBusy@l +/* 80373004 0036FF64 80 67 00 10 */ lwz r3, 0x10(r7) +/* 80373008 0036FF68 4B FF DC D9 */ bl DVDLowSeek +/* 8037300C 0036FF6C 48 00 01 E4 */ b lbl_803731F0 +/* 80373010 0036FF70 3C 60 80 37 */ lis r3, cbForStateBusy@ha +/* 80373014 0036FF74 38 63 32 00 */ addi r3, r3, cbForStateBusy@l +/* 80373018 0036FF78 4B FF DE 2D */ bl DVDLowStopMotor +/* 8037301C 0036FF7C 48 00 01 D4 */ b lbl_803731F0 +/* 80373020 0036FF80 3C 60 80 37 */ lis r3, cbForStateBusy@ha +/* 80373024 0036FF84 38 63 32 00 */ addi r3, r3, cbForStateBusy@l +/* 80373028 0036FF88 4B FF DE 1D */ bl DVDLowStopMotor +/* 8037302C 0036FF8C 48 00 01 C4 */ b lbl_803731F0 +/* 80373030 0036FF90 3C 60 CC 00 */ lis r3, 0xCC006000@ha +/* 80373034 0036FF94 38 63 60 00 */ addi r3, r3, 0xCC006000@l +/* 80373038 0036FF98 80 03 00 04 */ lwz r0, 4(r3) +/* 8037303C 0036FF9C 90 03 00 04 */ stw r0, 4(r3) +/* 80373040 0036FFA0 80 0D AC 24 */ lwz r0, lbl_805A97E4@sda21(r13) +/* 80373044 0036FFA4 2C 00 00 00 */ cmpwi r0, 0 +/* 80373048 0036FFA8 41 82 00 24 */ beq lbl_8037306C +/* 8037304C 0036FFAC 80 AD AC 10 */ lwz r5, lbl_805A97D0@sda21(r13) +/* 80373050 0036FFB0 38 00 00 00 */ li r0, 0 +/* 80373054 0036FFB4 3C 60 80 37 */ lis r3, cbForStateBusy@ha +/* 80373058 0036FFB8 90 05 00 1C */ stw r0, 0x1c(r5) +/* 8037305C 0036FFBC 38 83 32 00 */ addi r4, r3, cbForStateBusy@l +/* 80373060 0036FFC0 38 60 00 00 */ li r3, 0 +/* 80373064 0036FFC4 4B FF E0 2D */ bl DVDLowRequestAudioStatus +/* 80373068 0036FFC8 48 00 01 88 */ b lbl_803731F0 +lbl_8037306C: +/* 8037306C 0036FFCC 80 8D AC 10 */ lwz r4, lbl_805A97D0@sda21(r13) +/* 80373070 0036FFD0 38 00 00 01 */ li r0, 1 +/* 80373074 0036FFD4 3C 60 80 37 */ lis r3, cbForStateBusy@ha +/* 80373078 0036FFD8 90 04 00 1C */ stw r0, 0x1c(r4) +/* 8037307C 0036FFDC 38 C3 32 00 */ addi r6, r3, cbForStateBusy@l +/* 80373080 0036FFE0 38 60 00 00 */ li r3, 0 +/* 80373084 0036FFE4 80 87 00 14 */ lwz r4, 0x14(r7) +/* 80373088 0036FFE8 80 A7 00 10 */ lwz r5, 0x10(r7) +/* 8037308C 0036FFEC 4B FF DF 6D */ bl DVDLowAudioStream +/* 80373090 0036FFF0 48 00 01 60 */ b lbl_803731F0 +/* 80373094 0036FFF4 3C 60 CC 00 */ lis r3, 0xCC006004@ha +/* 80373098 0036FFF8 80 03 60 04 */ lwz r0, 0xCC006004@l(r3) +/* 8037309C 0036FFFC 38 83 60 00 */ addi r4, r3, 0x6000 +/* 803730A0 00370000 3C 60 80 37 */ lis r3, cbForStateBusy@ha +/* 803730A4 00370004 90 04 00 04 */ stw r0, 4(r4) +/* 803730A8 00370008 38 C3 32 00 */ addi r6, r3, cbForStateBusy@l +/* 803730AC 0037000C 3C 60 00 01 */ lis r3, 1 +/* 803730B0 00370010 38 80 00 00 */ li r4, 0 +/* 803730B4 00370014 38 A0 00 00 */ li r5, 0 +/* 803730B8 00370018 4B FF DF 41 */ bl DVDLowAudioStream +/* 803730BC 0037001C 48 00 01 34 */ b lbl_803731F0 +/* 803730C0 00370020 3C 60 CC 00 */ lis r3, 0xCC006004@ha +/* 803730C4 00370024 80 03 60 04 */ lwz r0, 0xCC006004@l(r3) +/* 803730C8 00370028 38 83 60 00 */ addi r4, r3, 0x6000 +/* 803730CC 0037002C 3C 60 80 37 */ lis r3, cbForStateBusy@ha +/* 803730D0 00370030 90 04 00 04 */ stw r0, 4(r4) +/* 803730D4 00370034 38 00 00 01 */ li r0, 1 +/* 803730D8 00370038 38 C3 32 00 */ addi r6, r3, cbForStateBusy@l +/* 803730DC 0037003C 90 0D AC 24 */ stw r0, lbl_805A97E4@sda21(r13) +/* 803730E0 00370040 38 60 00 00 */ li r3, 0 +/* 803730E4 00370044 38 80 00 00 */ li r4, 0 +/* 803730E8 00370048 38 A0 00 00 */ li r5, 0 +/* 803730EC 0037004C 4B FF DF 0D */ bl DVDLowAudioStream +/* 803730F0 00370050 48 00 01 00 */ b lbl_803731F0 +/* 803730F4 00370054 3C 60 CC 00 */ lis r3, 0xCC006004@ha +/* 803730F8 00370058 80 03 60 04 */ lwz r0, 0xCC006004@l(r3) +/* 803730FC 0037005C 38 A3 60 00 */ addi r5, r3, 0x6000 +/* 80373100 00370060 3C 60 80 37 */ lis r3, cbForStateBusy@ha +/* 80373104 00370064 90 05 00 04 */ stw r0, 4(r5) +/* 80373108 00370068 38 83 32 00 */ addi r4, r3, cbForStateBusy@l +/* 8037310C 0037006C 38 60 00 00 */ li r3, 0 +/* 80373110 00370070 4B FF DF 81 */ bl DVDLowRequestAudioStatus +/* 80373114 00370074 48 00 00 DC */ b lbl_803731F0 +/* 80373118 00370078 3C 60 CC 00 */ lis r3, 0xCC006004@ha +/* 8037311C 0037007C 80 03 60 04 */ lwz r0, 0xCC006004@l(r3) +/* 80373120 00370080 38 A3 60 00 */ addi r5, r3, 0x6000 +/* 80373124 00370084 3C 60 80 37 */ lis r3, cbForStateBusy@ha +/* 80373128 00370088 90 05 00 04 */ stw r0, 4(r5) +/* 8037312C 0037008C 38 83 32 00 */ addi r4, r3, cbForStateBusy@l +/* 80373130 00370090 3C 60 00 01 */ lis r3, 1 +/* 80373134 00370094 4B FF DF 5D */ bl DVDLowRequestAudioStatus +/* 80373138 00370098 48 00 00 B8 */ b lbl_803731F0 +/* 8037313C 0037009C 3C 60 CC 00 */ lis r3, 0xCC006004@ha +/* 80373140 003700A0 80 03 60 04 */ lwz r0, 0xCC006004@l(r3) +/* 80373144 003700A4 38 A3 60 00 */ addi r5, r3, 0x6000 +/* 80373148 003700A8 3C 60 80 37 */ lis r3, cbForStateBusy@ha +/* 8037314C 003700AC 90 05 00 04 */ stw r0, 4(r5) +/* 80373150 003700B0 38 83 32 00 */ addi r4, r3, cbForStateBusy@l +/* 80373154 003700B4 3C 60 00 02 */ lis r3, 2 +/* 80373158 003700B8 4B FF DF 39 */ bl DVDLowRequestAudioStatus +/* 8037315C 003700BC 48 00 00 94 */ b lbl_803731F0 +/* 80373160 003700C0 3C 60 CC 00 */ lis r3, 0xCC006004@ha +/* 80373164 003700C4 80 03 60 04 */ lwz r0, 0xCC006004@l(r3) +/* 80373168 003700C8 38 A3 60 00 */ addi r5, r3, 0x6000 +/* 8037316C 003700CC 3C 60 80 37 */ lis r3, cbForStateBusy@ha +/* 80373170 003700D0 90 05 00 04 */ stw r0, 4(r5) +/* 80373174 003700D4 38 83 32 00 */ addi r4, r3, cbForStateBusy@l +/* 80373178 003700D8 3C 60 00 03 */ lis r3, 3 +/* 8037317C 003700DC 4B FF DF 15 */ bl DVDLowRequestAudioStatus +/* 80373180 003700E0 48 00 00 70 */ b lbl_803731F0 +/* 80373184 003700E4 3C 60 CC 00 */ lis r3, 0xCC006004@ha +/* 80373188 003700E8 80 03 60 04 */ lwz r0, 0xCC006004@l(r3) +/* 8037318C 003700EC 38 83 60 00 */ addi r4, r3, 0x6000 +/* 80373190 003700F0 3C 60 80 37 */ lis r3, cbForStateBusy@ha +/* 80373194 003700F4 90 04 00 04 */ stw r0, 4(r4) +/* 80373198 003700F8 38 A3 32 00 */ addi r5, r3, cbForStateBusy@l +/* 8037319C 003700FC 80 67 00 10 */ lwz r3, 0x10(r7) +/* 803731A0 00370100 80 87 00 14 */ lwz r4, 0x14(r7) +/* 803731A4 00370104 4B FF DF 79 */ bl DVDLowAudioBufferConfig +/* 803731A8 00370108 48 00 00 48 */ b lbl_803731F0 +/* 803731AC 0037010C 3C 60 CC 00 */ lis r3, 0xCC006004@ha +/* 803731B0 00370110 80 03 60 04 */ lwz r0, 0xCC006004@l(r3) +/* 803731B4 00370114 38 A3 60 00 */ addi r5, r3, 0x6000 +/* 803731B8 00370118 3C 60 80 37 */ lis r3, cbForStateBusy@ha +/* 803731BC 0037011C 90 05 00 04 */ stw r0, 4(r5) +/* 803731C0 00370120 38 00 00 20 */ li r0, 0x20 +/* 803731C4 00370124 38 83 32 00 */ addi r4, r3, cbForStateBusy@l +/* 803731C8 00370128 90 07 00 1C */ stw r0, 0x1c(r7) +/* 803731CC 0037012C 80 67 00 18 */ lwz r3, 0x18(r7) +/* 803731D0 00370130 4B FF DD 8D */ bl DVDLowInquiry +/* 803731D4 00370134 48 00 00 1C */ b lbl_803731F0 +lbl_803731D8: +/* 803731D8 00370138 81 8D 9E E0 */ lwz r12, lbl_805A8AA0@sda21(r13) +/* 803731DC 0037013C 3C 60 80 37 */ lis r3, cbForStateBusy@ha +/* 803731E0 00370140 38 83 32 00 */ addi r4, r3, cbForStateBusy@l +/* 803731E4 00370144 7D 88 03 A6 */ mtlr r12 +/* 803731E8 00370148 38 67 00 00 */ addi r3, r7, 0 +/* 803731EC 0037014C 4E 80 00 21 */ blrl +lbl_803731F0: +/* 803731F0 00370150 80 01 00 0C */ lwz r0, 0xc(r1) +/* 803731F4 00370154 38 21 00 08 */ addi r1, r1, 8 +/* 803731F8 00370158 7C 08 03 A6 */ mtlr r0 +/* 803731FC 0037015C 4E 80 00 20 */ blr + +.global cbForStateBusy +cbForStateBusy: +/* 80373200 00370160 7C 08 02 A6 */ mflr r0 +/* 80373204 00370164 28 03 00 10 */ cmplwi r3, 0x10 +/* 80373208 00370168 90 01 00 04 */ stw r0, 4(r1) +/* 8037320C 0037016C 3C 80 80 54 */ lis r4, lbl_80540B60@ha +/* 80373210 00370170 94 21 FF E8 */ stwu r1, -0x18(r1) +/* 80373214 00370174 93 E1 00 14 */ stw r31, 0x14(r1) +/* 80373218 00370178 3B E4 0B 60 */ addi r31, r4, lbl_80540B60@l +/* 8037321C 0037017C 93 C1 00 10 */ stw r30, 0x10(r1) +/* 80373220 00370180 40 82 00 2C */ bne lbl_8037324C +/* 80373224 00370184 80 8D AC 10 */ lwz r4, lbl_805A97D0@sda21(r13) +/* 80373228 00370188 38 00 FF FF */ li r0, -1 +/* 8037322C 0037018C 3C 60 01 23 */ lis r3, 0x01234568@ha +/* 80373230 00370190 90 04 00 0C */ stw r0, 0xc(r4) +/* 80373234 00370194 38 63 45 68 */ addi r3, r3, 0x01234568@l +/* 80373238 00370198 48 00 19 95 */ bl __DVDStoreErrorCode +/* 8037323C 0037019C 48 00 0E 85 */ bl DVDReset +/* 80373240 003701A0 38 60 00 00 */ li r3, 0 +/* 80373244 003701A4 4B FF EB 4D */ bl cbForStateError +/* 80373248 003701A8 48 00 05 D8 */ b lbl_80373820 +lbl_8037324C: +/* 8037324C 003701AC 80 0D AC 2C */ lwz r0, lbl_805A97EC@sda21(r13) +/* 80373250 003701B0 28 00 00 03 */ cmplwi r0, 3 +/* 80373254 003701B4 41 82 00 10 */ beq lbl_80373264 +/* 80373258 003701B8 80 0D AC 2C */ lwz r0, lbl_805A97EC@sda21(r13) +/* 8037325C 003701BC 28 00 00 0F */ cmplwi r0, 0xf +/* 80373260 003701C0 40 82 00 EC */ bne lbl_8037334C +lbl_80373264: +/* 80373264 003701C4 54 60 07 BD */ rlwinm. r0, r3, 0, 0x1e, 0x1e +/* 80373268 003701C8 41 82 00 2C */ beq lbl_80373294 +/* 8037326C 003701CC 80 8D AC 10 */ lwz r4, lbl_805A97D0@sda21(r13) +/* 80373270 003701D0 38 00 FF FF */ li r0, -1 +/* 80373274 003701D4 3C 60 01 23 */ lis r3, 0x01234567@ha +/* 80373278 003701D8 90 04 00 0C */ stw r0, 0xc(r4) +/* 8037327C 003701DC 38 63 45 67 */ addi r3, r3, 0x01234567@l +/* 80373280 003701E0 48 00 19 4D */ bl __DVDStoreErrorCode +/* 80373284 003701E4 3C 60 80 37 */ lis r3, cbForStateError@ha +/* 80373288 003701E8 38 63 1D 90 */ addi r3, r3, cbForStateError@l +/* 8037328C 003701EC 4B FF DB B9 */ bl DVDLowStopMotor +/* 80373290 003701F0 48 00 05 90 */ b lbl_80373820 +lbl_80373294: +/* 80373294 003701F4 38 00 00 00 */ li r0, 0 +/* 80373298 003701F8 90 0D AC 44 */ stw r0, lbl_805A9804@sda21(r13) +/* 8037329C 003701FC 80 0D AC 2C */ lwz r0, lbl_805A97EC@sda21(r13) +/* 803732A0 00370200 28 00 00 0F */ cmplwi r0, 0xf +/* 803732A4 00370204 40 82 00 0C */ bne lbl_803732B0 +/* 803732A8 00370208 38 00 00 01 */ li r0, 1 +/* 803732AC 0037020C 90 0D AC 48 */ stw r0, lbl_805A9808@sda21(r13) +lbl_803732B0: +/* 803732B0 00370210 80 0D AC 30 */ lwz r0, lbl_805A97F0@sda21(r13) +/* 803732B4 00370214 28 00 00 00 */ cmplwi r0, 0 +/* 803732B8 00370218 41 82 00 6C */ beq lbl_80373324 +/* 803732BC 0037021C 38 00 00 07 */ li r0, 7 +/* 803732C0 00370220 83 CD AC 10 */ lwz r30, lbl_805A97D0@sda21(r13) +/* 803732C4 00370224 90 0D AC 38 */ stw r0, lbl_805A97F8@sda21(r13) +/* 803732C8 00370228 38 7F 00 40 */ addi r3, r31, 0x40 +/* 803732CC 0037022C 38 00 00 00 */ li r0, 0 +/* 803732D0 00370230 90 0D AC 30 */ stw r0, lbl_805A97F0@sda21(r13) +/* 803732D4 00370234 38 00 00 0A */ li r0, 0xa +/* 803732D8 00370238 90 6D AC 10 */ stw r3, lbl_805A97D0@sda21(r13) +/* 803732DC 0037023C 90 1E 00 0C */ stw r0, 0xc(r30) +/* 803732E0 00370240 81 9E 00 28 */ lwz r12, 0x28(r30) +/* 803732E4 00370244 28 0C 00 00 */ cmplwi r12, 0 +/* 803732E8 00370248 41 82 00 14 */ beq lbl_803732FC +/* 803732EC 0037024C 7D 88 03 A6 */ mtlr r12 +/* 803732F0 00370250 38 9E 00 00 */ addi r4, r30, 0 +/* 803732F4 00370254 38 60 FF FD */ li r3, -3 +/* 803732F8 00370258 4E 80 00 21 */ blrl +lbl_803732FC: +/* 803732FC 0037025C 81 8D AC 34 */ lwz r12, lbl_805A97F4@sda21(r13) +/* 80373300 00370260 28 0C 00 00 */ cmplwi r12, 0 +/* 80373304 00370264 41 82 00 14 */ beq lbl_80373318 +/* 80373308 00370268 7D 88 03 A6 */ mtlr r12 +/* 8037330C 0037026C 38 9E 00 00 */ addi r4, r30, 0 +/* 80373310 00370270 38 60 00 00 */ li r3, 0 +/* 80373314 00370274 4E 80 00 21 */ blrl +lbl_80373318: +/* 80373318 00370278 4B FF F8 ED */ bl stateReady +/* 8037331C 0037027C 38 00 00 01 */ li r0, 1 +/* 80373320 00370280 48 00 00 08 */ b lbl_80373328 +lbl_80373324: +/* 80373324 00370284 38 00 00 00 */ li r0, 0 +lbl_80373328: +/* 80373328 00370288 2C 00 00 00 */ cmpwi r0, 0 +/* 8037332C 0037028C 40 82 04 F4 */ bne lbl_80373820 +/* 80373330 00370290 80 8D AC 10 */ lwz r4, lbl_805A97D0@sda21(r13) +/* 80373334 00370294 38 00 00 07 */ li r0, 7 +/* 80373338 00370298 3C 60 80 37 */ lis r3, cbForStateMotorStopped@ha +/* 8037333C 0037029C 90 04 00 0C */ stw r0, 0xc(r4) +/* 80373340 003702A0 38 63 2B 20 */ addi r3, r3, cbForStateMotorStopped@l +/* 80373344 003702A4 4B FF DA 31 */ bl DVDLowWaitCoverClose +/* 80373348 003702A8 48 00 04 D8 */ b lbl_80373820 +lbl_8037334C: +/* 8037334C 003702AC 80 8D AC 2C */ lwz r4, lbl_805A97EC@sda21(r13) +/* 80373350 003702B0 28 04 00 01 */ cmplwi r4, 1 +/* 80373354 003702B4 41 82 00 18 */ beq lbl_8037336C +/* 80373358 003702B8 38 04 FF FC */ addi r0, r4, -4 +/* 8037335C 003702BC 28 00 00 01 */ cmplwi r0, 1 +/* 80373360 003702C0 40 81 00 0C */ ble lbl_8037336C +/* 80373364 003702C4 28 04 00 0E */ cmplwi r4, 0xe +/* 80373368 003702C8 40 82 00 0C */ bne lbl_80373374 +lbl_8037336C: +/* 8037336C 003702CC 38 00 00 01 */ li r0, 1 +/* 80373370 003702D0 48 00 00 1C */ b lbl_8037338C +lbl_80373374: +/* 80373374 003702D4 80 0D 9E EC */ lwz r0, lbl_805A8AAC@sda21(r13) +/* 80373378 003702D8 7C 04 00 40 */ cmplw r4, r0 +/* 8037337C 003702DC 40 82 00 0C */ bne lbl_80373388 +/* 80373380 003702E0 38 00 00 01 */ li r0, 1 +/* 80373384 003702E4 48 00 00 08 */ b lbl_8037338C +lbl_80373388: +/* 80373388 003702E8 38 00 00 00 */ li r0, 0 +lbl_8037338C: +/* 8037338C 003702EC 2C 00 00 00 */ cmpwi r0, 0 +/* 80373390 003702F0 41 82 00 28 */ beq lbl_803733B8 +/* 80373394 003702F4 80 CD AC 10 */ lwz r6, lbl_805A97D0@sda21(r13) +/* 80373398 003702F8 3C 80 CC 00 */ lis r4, 0xCC006000@ha +/* 8037339C 003702FC 38 84 60 00 */ addi r4, r4, 0xCC006000@l +/* 803733A0 00370300 80 84 00 18 */ lwz r4, 0x18(r4) +/* 803733A4 00370304 80 06 00 1C */ lwz r0, 0x1c(r6) +/* 803733A8 00370308 80 A6 00 20 */ lwz r5, 0x20(r6) +/* 803733AC 0037030C 7C 04 00 50 */ subf r0, r4, r0 +/* 803733B0 00370310 7C 05 02 14 */ add r0, r5, r0 +/* 803733B4 00370314 90 06 00 20 */ stw r0, 0x20(r6) +lbl_803733B8: +/* 803733B8 00370318 54 60 07 39 */ rlwinm. r0, r3, 0, 0x1c, 0x1c +/* 803733BC 0037031C 41 82 00 60 */ beq lbl_8037341C +/* 803733C0 00370320 83 CD AC 10 */ lwz r30, lbl_805A97D0@sda21(r13) +/* 803733C4 00370324 38 7F 00 40 */ addi r3, r31, 0x40 +/* 803733C8 00370328 38 00 00 00 */ li r0, 0 +/* 803733CC 0037032C 90 0D AC 30 */ stw r0, lbl_805A97F0@sda21(r13) +/* 803733D0 00370330 38 00 00 0A */ li r0, 0xa +/* 803733D4 00370334 90 6D AC 10 */ stw r3, lbl_805A97D0@sda21(r13) +/* 803733D8 00370338 90 1E 00 0C */ stw r0, 0xc(r30) +/* 803733DC 0037033C 81 9E 00 28 */ lwz r12, 0x28(r30) +/* 803733E0 00370340 28 0C 00 00 */ cmplwi r12, 0 +/* 803733E4 00370344 41 82 00 14 */ beq lbl_803733F8 +/* 803733E8 00370348 7D 88 03 A6 */ mtlr r12 +/* 803733EC 0037034C 38 9E 00 00 */ addi r4, r30, 0 +/* 803733F0 00370350 38 60 FF FD */ li r3, -3 +/* 803733F4 00370354 4E 80 00 21 */ blrl +lbl_803733F8: +/* 803733F8 00370358 81 8D AC 34 */ lwz r12, lbl_805A97F4@sda21(r13) +/* 803733FC 0037035C 28 0C 00 00 */ cmplwi r12, 0 +/* 80373400 00370360 41 82 00 14 */ beq lbl_80373414 +/* 80373404 00370364 7D 88 03 A6 */ mtlr r12 +/* 80373408 00370368 38 9E 00 00 */ addi r4, r30, 0 +/* 8037340C 0037036C 38 60 00 00 */ li r3, 0 +/* 80373410 00370370 4E 80 00 21 */ blrl +lbl_80373414: +/* 80373414 00370374 4B FF F7 F1 */ bl stateReady +/* 80373418 00370378 48 00 04 08 */ b lbl_80373820 +lbl_8037341C: +/* 8037341C 0037037C 54 60 07 FF */ clrlwi. r0, r3, 0x1f +/* 80373420 00370380 41 82 02 D0 */ beq lbl_803736F0 +/* 80373424 00370384 38 80 00 00 */ li r4, 0 +/* 80373428 00370388 90 8D AC 44 */ stw r4, lbl_805A9804@sda21(r13) +/* 8037342C 0037038C 80 0D AC 30 */ lwz r0, lbl_805A97F0@sda21(r13) +/* 80373430 00370390 28 00 00 00 */ cmplwi r0, 0 +/* 80373434 00370394 41 82 00 60 */ beq lbl_80373494 +/* 80373438 00370398 90 8D AC 38 */ stw r4, lbl_805A97F8@sda21(r13) +/* 8037343C 0037039C 38 7F 00 40 */ addi r3, r31, 0x40 +/* 80373440 003703A0 83 CD AC 10 */ lwz r30, lbl_805A97D0@sda21(r13) +/* 80373444 003703A4 38 00 00 0A */ li r0, 0xa +/* 80373448 003703A8 90 8D AC 30 */ stw r4, lbl_805A97F0@sda21(r13) +/* 8037344C 003703AC 90 6D AC 10 */ stw r3, lbl_805A97D0@sda21(r13) +/* 80373450 003703B0 90 1E 00 0C */ stw r0, 0xc(r30) +/* 80373454 003703B4 81 9E 00 28 */ lwz r12, 0x28(r30) +/* 80373458 003703B8 28 0C 00 00 */ cmplwi r12, 0 +/* 8037345C 003703BC 41 82 00 14 */ beq lbl_80373470 +/* 80373460 003703C0 7D 88 03 A6 */ mtlr r12 +/* 80373464 003703C4 38 9E 00 00 */ addi r4, r30, 0 +/* 80373468 003703C8 38 60 FF FD */ li r3, -3 +/* 8037346C 003703CC 4E 80 00 21 */ blrl +lbl_80373470: +/* 80373470 003703D0 81 8D AC 34 */ lwz r12, lbl_805A97F4@sda21(r13) +/* 80373474 003703D4 28 0C 00 00 */ cmplwi r12, 0 +/* 80373478 003703D8 41 82 00 14 */ beq lbl_8037348C +/* 8037347C 003703DC 7D 88 03 A6 */ mtlr r12 +/* 80373480 003703E0 38 9E 00 00 */ addi r4, r30, 0 +/* 80373484 003703E4 38 60 00 00 */ li r3, 0 +/* 80373488 003703E8 4E 80 00 21 */ blrl +lbl_8037348C: +/* 8037348C 003703EC 4B FF F7 79 */ bl stateReady +/* 80373490 003703F0 38 80 00 01 */ li r4, 1 +lbl_80373494: +/* 80373494 003703F4 2C 04 00 00 */ cmpwi r4, 0 +/* 80373498 003703F8 40 82 03 88 */ bne lbl_80373820 +/* 8037349C 003703FC 80 6D AC 2C */ lwz r3, lbl_805A97EC@sda21(r13) +/* 803734A0 00370400 28 03 00 01 */ cmplwi r3, 1 +/* 803734A4 00370404 41 82 00 18 */ beq lbl_803734BC +/* 803734A8 00370408 38 03 FF FC */ addi r0, r3, -4 +/* 803734AC 0037040C 28 00 00 01 */ cmplwi r0, 1 +/* 803734B0 00370410 40 81 00 0C */ ble lbl_803734BC +/* 803734B4 00370414 28 03 00 0E */ cmplwi r3, 0xe +/* 803734B8 00370418 40 82 00 0C */ bne lbl_803734C4 +lbl_803734BC: +/* 803734BC 0037041C 38 00 00 01 */ li r0, 1 +/* 803734C0 00370420 48 00 00 1C */ b lbl_803734DC +lbl_803734C4: +/* 803734C4 00370424 80 0D 9E EC */ lwz r0, lbl_805A8AAC@sda21(r13) +/* 803734C8 00370428 7C 03 00 40 */ cmplw r3, r0 +/* 803734CC 0037042C 40 82 00 0C */ bne lbl_803734D8 +/* 803734D0 00370430 38 00 00 01 */ li r0, 1 +/* 803734D4 00370434 48 00 00 08 */ b lbl_803734DC +lbl_803734D8: +/* 803734D8 00370438 38 00 00 00 */ li r0, 0 +lbl_803734DC: +/* 803734DC 0037043C 2C 00 00 00 */ cmpwi r0, 0 +/* 803734E0 00370440 41 82 00 54 */ beq lbl_80373534 +/* 803734E4 00370444 80 6D AC 10 */ lwz r3, lbl_805A97D0@sda21(r13) +/* 803734E8 00370448 80 83 00 20 */ lwz r4, 0x20(r3) +/* 803734EC 0037044C 80 03 00 14 */ lwz r0, 0x14(r3) +/* 803734F0 00370450 7C 04 00 40 */ cmplw r4, r0 +/* 803734F4 00370454 41 82 00 0C */ beq lbl_80373500 +/* 803734F8 00370458 4B FF F9 E9 */ bl stateBusy +/* 803734FC 0037045C 48 00 03 24 */ b lbl_80373820 +lbl_80373500: +/* 80373500 00370460 38 1F 00 40 */ addi r0, r31, 0x40 +/* 80373504 00370464 90 0D AC 10 */ stw r0, lbl_805A97D0@sda21(r13) +/* 80373508 00370468 38 00 00 00 */ li r0, 0 +/* 8037350C 0037046C 38 83 00 00 */ addi r4, r3, 0 +/* 80373510 00370470 90 03 00 0C */ stw r0, 0xc(r3) +/* 80373514 00370474 81 83 00 28 */ lwz r12, 0x28(r3) +/* 80373518 00370478 28 0C 00 00 */ cmplwi r12, 0 +/* 8037351C 0037047C 41 82 00 10 */ beq lbl_8037352C +/* 80373520 00370480 80 64 00 20 */ lwz r3, 0x20(r4) +/* 80373524 00370484 7D 88 03 A6 */ mtlr r12 +/* 80373528 00370488 4E 80 00 21 */ blrl +lbl_8037352C: +/* 8037352C 0037048C 4B FF F6 D9 */ bl stateReady +/* 80373530 00370490 48 00 02 F0 */ b lbl_80373820 +lbl_80373534: +/* 80373534 00370494 80 8D AC 2C */ lwz r4, lbl_805A97EC@sda21(r13) +/* 80373538 00370498 38 04 FF F7 */ addi r0, r4, -9 +/* 8037353C 0037049C 28 00 00 03 */ cmplwi r0, 3 +/* 80373540 003704A0 41 81 00 0C */ bgt lbl_8037354C +/* 80373544 003704A4 38 00 00 01 */ li r0, 1 +/* 80373548 003704A8 48 00 00 48 */ b lbl_80373590 +lbl_8037354C: +/* 8037354C 003704AC 3C 60 80 3F */ lis r3, 0x803f +/* 80373550 003704B0 84 03 00 48 */ lwzu r0, 0x48(r3) +/* 80373554 003704B4 7C 04 00 40 */ cmplw r4, r0 +/* 80373558 003704B8 40 82 00 0C */ bne lbl_80373564 +/* 8037355C 003704BC 38 00 00 01 */ li r0, 1 +/* 80373560 003704C0 48 00 00 30 */ b lbl_80373590 +lbl_80373564: +/* 80373564 003704C4 84 03 00 04 */ lwzu r0, 4(r3) +/* 80373568 003704C8 7C 04 00 40 */ cmplw r4, r0 +/* 8037356C 003704CC 40 82 00 0C */ bne lbl_80373578 +/* 80373570 003704D0 38 00 00 01 */ li r0, 1 +/* 80373574 003704D4 48 00 00 1C */ b lbl_80373590 +lbl_80373578: +/* 80373578 003704D8 80 03 00 04 */ lwz r0, 4(r3) +/* 8037357C 003704DC 7C 04 00 40 */ cmplw r4, r0 +/* 80373580 003704E0 40 82 00 0C */ bne lbl_8037358C +/* 80373584 003704E4 38 00 00 01 */ li r0, 1 +/* 80373588 003704E8 48 00 00 08 */ b lbl_80373590 +lbl_8037358C: +/* 8037358C 003704EC 38 00 00 00 */ li r0, 0 +lbl_80373590: +/* 80373590 003704F0 2C 00 00 00 */ cmpwi r0, 0 +/* 80373594 003704F4 41 82 00 68 */ beq lbl_803735FC +/* 80373598 003704F8 80 0D AC 2C */ lwz r0, lbl_805A97EC@sda21(r13) +/* 8037359C 003704FC 28 00 00 0B */ cmplwi r0, 0xb +/* 803735A0 00370500 41 82 00 10 */ beq lbl_803735B0 +/* 803735A4 00370504 80 0D AC 2C */ lwz r0, lbl_805A97EC@sda21(r13) +/* 803735A8 00370508 28 00 00 0A */ cmplwi r0, 0xa +/* 803735AC 0037050C 40 82 00 14 */ bne lbl_803735C0 +lbl_803735B0: +/* 803735B0 00370510 3C 60 CC 00 */ lis r3, 0xCC006020@ha +/* 803735B4 00370514 80 03 60 20 */ lwz r0, 0xCC006020@l(r3) +/* 803735B8 00370518 54 03 10 3A */ slwi r3, r0, 2 +/* 803735BC 0037051C 48 00 00 10 */ b lbl_803735CC +lbl_803735C0: +/* 803735C0 00370520 3C 60 CC 00 */ lis r3, 0xCC006000@ha +/* 803735C4 00370524 38 63 60 00 */ addi r3, r3, 0xCC006000@l +/* 803735C8 00370528 80 63 00 20 */ lwz r3, 0x20(r3) +lbl_803735CC: +/* 803735CC 0037052C 80 8D AC 10 */ lwz r4, lbl_805A97D0@sda21(r13) +/* 803735D0 00370530 38 BF 00 40 */ addi r5, r31, 0x40 +/* 803735D4 00370534 38 00 00 00 */ li r0, 0 +/* 803735D8 00370538 90 AD AC 10 */ stw r5, lbl_805A97D0@sda21(r13) +/* 803735DC 0037053C 90 04 00 0C */ stw r0, 0xc(r4) +/* 803735E0 00370540 81 84 00 28 */ lwz r12, 0x28(r4) +/* 803735E4 00370544 28 0C 00 00 */ cmplwi r12, 0 +/* 803735E8 00370548 41 82 00 0C */ beq lbl_803735F4 +/* 803735EC 0037054C 7D 88 03 A6 */ mtlr r12 +/* 803735F0 00370550 4E 80 00 21 */ blrl +lbl_803735F4: +/* 803735F4 00370554 4B FF F6 11 */ bl stateReady +/* 803735F8 00370558 48 00 02 28 */ b lbl_80373820 +lbl_803735FC: +/* 803735FC 0037055C 80 0D AC 2C */ lwz r0, lbl_805A97EC@sda21(r13) +/* 80373600 00370560 28 00 00 06 */ cmplwi r0, 6 +/* 80373604 00370564 40 82 00 B8 */ bne lbl_803736BC +/* 80373608 00370568 80 8D AC 10 */ lwz r4, lbl_805A97D0@sda21(r13) +/* 8037360C 0037056C 38 A4 00 1C */ addi r5, r4, 0x1c +/* 80373610 00370570 80 04 00 1C */ lwz r0, 0x1c(r4) +/* 80373614 00370574 28 00 00 00 */ cmplwi r0, 0 +/* 80373618 00370578 40 82 00 74 */ bne lbl_8037368C +/* 8037361C 0037057C 3C 60 CC 00 */ lis r3, 0xCC006020@ha +/* 80373620 00370580 80 03 60 20 */ lwz r0, 0xCC006020@l(r3) +/* 80373624 00370584 54 00 07 FF */ clrlwi. r0, r0, 0x1f +/* 80373628 00370588 41 82 00 34 */ beq lbl_8037365C +/* 8037362C 0037058C 38 1F 00 40 */ addi r0, r31, 0x40 +/* 80373630 00370590 90 0D AC 10 */ stw r0, lbl_805A97D0@sda21(r13) +/* 80373634 00370594 38 00 00 09 */ li r0, 9 +/* 80373638 00370598 90 04 00 0C */ stw r0, 0xc(r4) +/* 8037363C 0037059C 81 84 00 28 */ lwz r12, 0x28(r4) +/* 80373640 003705A0 28 0C 00 00 */ cmplwi r12, 0 +/* 80373644 003705A4 41 82 00 10 */ beq lbl_80373654 +/* 80373648 003705A8 7D 88 03 A6 */ mtlr r12 +/* 8037364C 003705AC 38 60 FF FE */ li r3, -2 +/* 80373650 003705B0 4E 80 00 21 */ blrl +lbl_80373654: +/* 80373654 003705B4 4B FF F5 B1 */ bl stateReady +/* 80373658 003705B8 48 00 01 C8 */ b lbl_80373820 +lbl_8037365C: +/* 8037365C 003705BC 38 00 00 00 */ li r0, 0 +/* 80373660 003705C0 90 0D AC 24 */ stw r0, lbl_805A97E4@sda21(r13) +/* 80373664 003705C4 38 00 00 01 */ li r0, 1 +/* 80373668 003705C8 3C 60 80 37 */ lis r3, cbForStateBusy@ha +/* 8037366C 003705CC 90 05 00 00 */ stw r0, 0(r5) +/* 80373670 003705D0 38 C3 32 00 */ addi r6, r3, cbForStateBusy@l +/* 80373674 003705D4 38 60 00 00 */ li r3, 0 +/* 80373678 003705D8 80 AD AC 10 */ lwz r5, lbl_805A97D0@sda21(r13) +/* 8037367C 003705DC 80 85 00 14 */ lwz r4, 0x14(r5) +/* 80373680 003705E0 80 A5 00 10 */ lwz r5, 0x10(r5) +/* 80373684 003705E4 4B FF D9 75 */ bl DVDLowAudioStream +/* 80373688 003705E8 48 00 01 98 */ b lbl_80373820 +lbl_8037368C: +/* 8037368C 003705EC 38 1F 00 40 */ addi r0, r31, 0x40 +/* 80373690 003705F0 90 0D AC 10 */ stw r0, lbl_805A97D0@sda21(r13) +/* 80373694 003705F4 38 00 00 00 */ li r0, 0 +/* 80373698 003705F8 90 04 00 0C */ stw r0, 0xc(r4) +/* 8037369C 003705FC 81 84 00 28 */ lwz r12, 0x28(r4) +/* 803736A0 00370600 28 0C 00 00 */ cmplwi r12, 0 +/* 803736A4 00370604 41 82 00 10 */ beq lbl_803736B4 +/* 803736A8 00370608 7D 88 03 A6 */ mtlr r12 +/* 803736AC 0037060C 38 60 00 00 */ li r3, 0 +/* 803736B0 00370610 4E 80 00 21 */ blrl +lbl_803736B4: +/* 803736B4 00370614 4B FF F5 51 */ bl stateReady +/* 803736B8 00370618 48 00 01 68 */ b lbl_80373820 +lbl_803736BC: +/* 803736BC 0037061C 80 8D AC 10 */ lwz r4, lbl_805A97D0@sda21(r13) +/* 803736C0 00370620 38 7F 00 40 */ addi r3, r31, 0x40 +/* 803736C4 00370624 38 00 00 00 */ li r0, 0 +/* 803736C8 00370628 90 6D AC 10 */ stw r3, lbl_805A97D0@sda21(r13) +/* 803736CC 0037062C 90 04 00 0C */ stw r0, 0xc(r4) +/* 803736D0 00370630 81 84 00 28 */ lwz r12, 0x28(r4) +/* 803736D4 00370634 28 0C 00 00 */ cmplwi r12, 0 +/* 803736D8 00370638 41 82 00 10 */ beq lbl_803736E8 +/* 803736DC 0037063C 7D 88 03 A6 */ mtlr r12 +/* 803736E0 00370640 38 60 00 00 */ li r3, 0 +/* 803736E4 00370644 4E 80 00 21 */ blrl +lbl_803736E8: +/* 803736E8 00370648 4B FF F5 1D */ bl stateReady +/* 803736EC 0037064C 48 00 01 34 */ b lbl_80373820 +lbl_803736F0: +/* 803736F0 00370650 80 0D AC 2C */ lwz r0, lbl_805A97EC@sda21(r13) +/* 803736F4 00370654 28 00 00 0E */ cmplwi r0, 0xe +/* 803736F8 00370658 40 82 00 2C */ bne lbl_80373724 +/* 803736FC 0037065C 80 8D AC 10 */ lwz r4, lbl_805A97D0@sda21(r13) +/* 80373700 00370660 38 00 FF FF */ li r0, -1 +/* 80373704 00370664 3C 60 01 23 */ lis r3, 0x01234567@ha +/* 80373708 00370668 90 04 00 0C */ stw r0, 0xc(r4) +/* 8037370C 0037066C 38 63 45 67 */ addi r3, r3, 0x01234567@l +/* 80373710 00370670 48 00 14 BD */ bl __DVDStoreErrorCode +/* 80373714 00370674 3C 60 80 37 */ lis r3, cbForStateError@ha +/* 80373718 00370678 38 63 1D 90 */ addi r3, r3, cbForStateError@l +/* 8037371C 0037067C 4B FF D7 29 */ bl DVDLowStopMotor +/* 80373720 00370680 48 00 01 00 */ b lbl_80373820 +lbl_80373724: +/* 80373724 00370684 80 0D AC 2C */ lwz r0, lbl_805A97EC@sda21(r13) +/* 80373728 00370688 28 00 00 01 */ cmplwi r0, 1 +/* 8037372C 0037068C 41 82 00 28 */ beq lbl_80373754 +/* 80373730 00370690 80 0D AC 2C */ lwz r0, lbl_805A97EC@sda21(r13) +/* 80373734 00370694 28 00 00 04 */ cmplwi r0, 4 +/* 80373738 00370698 41 82 00 1C */ beq lbl_80373754 +/* 8037373C 0037069C 80 0D AC 2C */ lwz r0, lbl_805A97EC@sda21(r13) +/* 80373740 003706A0 28 00 00 05 */ cmplwi r0, 5 +/* 80373744 003706A4 41 82 00 10 */ beq lbl_80373754 +/* 80373748 003706A8 80 0D AC 2C */ lwz r0, lbl_805A97EC@sda21(r13) +/* 8037374C 003706AC 28 00 00 0E */ cmplwi r0, 0xe +/* 80373750 003706B0 40 82 00 C4 */ bne lbl_80373814 +lbl_80373754: +/* 80373754 003706B4 83 CD AC 10 */ lwz r30, lbl_805A97D0@sda21(r13) +/* 80373758 003706B8 80 7E 00 20 */ lwz r3, 0x20(r30) +/* 8037375C 003706BC 80 1E 00 14 */ lwz r0, 0x14(r30) +/* 80373760 003706C0 7C 03 00 40 */ cmplw r3, r0 +/* 80373764 003706C4 40 82 00 B0 */ bne lbl_80373814 +/* 80373768 003706C8 80 0D AC 30 */ lwz r0, lbl_805A97F0@sda21(r13) +/* 8037376C 003706CC 28 00 00 00 */ cmplwi r0, 0 +/* 80373770 003706D0 41 82 00 64 */ beq lbl_803737D4 +/* 80373774 003706D4 38 80 00 00 */ li r4, 0 +/* 80373778 003706D8 90 8D AC 38 */ stw r4, lbl_805A97F8@sda21(r13) +/* 8037377C 003706DC 38 7F 00 40 */ addi r3, r31, 0x40 +/* 80373780 003706E0 38 00 00 0A */ li r0, 0xa +/* 80373784 003706E4 90 8D AC 30 */ stw r4, lbl_805A97F0@sda21(r13) +/* 80373788 003706E8 90 6D AC 10 */ stw r3, lbl_805A97D0@sda21(r13) +/* 8037378C 003706EC 90 1E 00 0C */ stw r0, 0xc(r30) +/* 80373790 003706F0 81 9E 00 28 */ lwz r12, 0x28(r30) +/* 80373794 003706F4 28 0C 00 00 */ cmplwi r12, 0 +/* 80373798 003706F8 41 82 00 14 */ beq lbl_803737AC +/* 8037379C 003706FC 7D 88 03 A6 */ mtlr r12 +/* 803737A0 00370700 38 9E 00 00 */ addi r4, r30, 0 +/* 803737A4 00370704 38 60 FF FD */ li r3, -3 +/* 803737A8 00370708 4E 80 00 21 */ blrl +lbl_803737AC: +/* 803737AC 0037070C 81 8D AC 34 */ lwz r12, lbl_805A97F4@sda21(r13) +/* 803737B0 00370710 28 0C 00 00 */ cmplwi r12, 0 +/* 803737B4 00370714 41 82 00 14 */ beq lbl_803737C8 +/* 803737B8 00370718 7D 88 03 A6 */ mtlr r12 +/* 803737BC 0037071C 38 9E 00 00 */ addi r4, r30, 0 +/* 803737C0 00370720 38 60 00 00 */ li r3, 0 +/* 803737C4 00370724 4E 80 00 21 */ blrl +lbl_803737C8: +/* 803737C8 00370728 4B FF F4 3D */ bl stateReady +/* 803737CC 0037072C 38 00 00 01 */ li r0, 1 +/* 803737D0 00370730 48 00 00 08 */ b lbl_803737D8 +lbl_803737D4: +/* 803737D4 00370734 38 00 00 00 */ li r0, 0 +lbl_803737D8: +/* 803737D8 00370738 2C 00 00 00 */ cmpwi r0, 0 +/* 803737DC 0037073C 40 82 00 44 */ bne lbl_80373820 +/* 803737E0 00370740 80 8D AC 10 */ lwz r4, lbl_805A97D0@sda21(r13) +/* 803737E4 00370744 38 7F 00 40 */ addi r3, r31, 0x40 +/* 803737E8 00370748 38 00 00 00 */ li r0, 0 +/* 803737EC 0037074C 90 6D AC 10 */ stw r3, lbl_805A97D0@sda21(r13) +/* 803737F0 00370750 90 04 00 0C */ stw r0, 0xc(r4) +/* 803737F4 00370754 81 84 00 28 */ lwz r12, 0x28(r4) +/* 803737F8 00370758 28 0C 00 00 */ cmplwi r12, 0 +/* 803737FC 0037075C 41 82 00 10 */ beq lbl_8037380C +/* 80373800 00370760 80 64 00 20 */ lwz r3, 0x20(r4) +/* 80373804 00370764 7D 88 03 A6 */ mtlr r12 +/* 80373808 00370768 4E 80 00 21 */ blrl +lbl_8037380C: +/* 8037380C 0037076C 4B FF F3 F9 */ bl stateReady +/* 80373810 00370770 48 00 00 10 */ b lbl_80373820 +lbl_80373814: +/* 80373814 00370774 3C 60 80 37 */ lis r3, cbForStateGettingError@ha +/* 80373818 00370778 38 63 1F 4C */ addi r3, r3, cbForStateGettingError@l +/* 8037381C 0037077C 4B FF D6 B5 */ bl DVDLowRequestError +lbl_80373820: +/* 80373820 00370780 80 01 00 1C */ lwz r0, 0x1c(r1) +/* 80373824 00370784 83 E1 00 14 */ lwz r31, 0x14(r1) +/* 80373828 00370788 83 C1 00 10 */ lwz r30, 0x10(r1) +/* 8037382C 0037078C 38 21 00 18 */ addi r1, r1, 0x18 +/* 80373830 00370790 7C 08 03 A6 */ mtlr r0 +/* 80373834 00370794 4E 80 00 20 */ blr + +.global sub_80373838 +sub_80373838: +/* 80373838 00370798 7C 08 02 A6 */ mflr r0 +/* 8037383C 0037079C 90 01 00 04 */ stw r0, 4(r1) +/* 80373840 003707A0 94 21 FF E0 */ stwu r1, -0x20(r1) +/* 80373844 003707A4 93 E1 00 1C */ stw r31, 0x1c(r1) +/* 80373848 003707A8 93 C1 00 18 */ stw r30, 0x18(r1) +/* 8037384C 003707AC 3B C4 00 00 */ addi r30, r4, 0 +/* 80373850 003707B0 93 A1 00 14 */ stw r29, 0x14(r1) +/* 80373854 003707B4 3B A3 00 00 */ addi r29, r3, 0 +/* 80373858 003707B8 80 0D 9E DC */ lwz r0, lbl_805A8A9C@sda21(r13) +/* 8037385C 003707BC 2C 00 00 00 */ cmpwi r0, 0 +/* 80373860 003707C0 41 82 00 30 */ beq lbl_80373890 +/* 80373864 003707C4 80 7E 00 08 */ lwz r3, 8(r30) +/* 80373868 003707C8 28 03 00 01 */ cmplwi r3, 1 +/* 8037386C 003707CC 41 82 00 18 */ beq lbl_80373884 +/* 80373870 003707D0 38 03 FF FC */ addi r0, r3, -4 +/* 80373874 003707D4 28 00 00 01 */ cmplwi r0, 1 +/* 80373878 003707D8 40 81 00 0C */ ble lbl_80373884 +/* 8037387C 003707DC 28 03 00 0E */ cmplwi r3, 0xe +/* 80373880 003707E0 40 82 00 10 */ bne lbl_80373890 +lbl_80373884: +/* 80373884 003707E4 80 7E 00 18 */ lwz r3, 0x18(r30) +/* 80373888 003707E8 80 9E 00 14 */ lwz r4, 0x14(r30) +/* 8037388C 003707EC 48 00 B1 F9 */ bl DCInvalidateRange +lbl_80373890: +/* 80373890 003707F0 48 00 DD D1 */ bl OSDisableInterrupts +/* 80373894 003707F4 38 00 00 02 */ li r0, 2 +/* 80373898 003707F8 90 1E 00 0C */ stw r0, 0xc(r30) +/* 8037389C 003707FC 3B E3 00 00 */ addi r31, r3, 0 +/* 803738A0 00370800 38 7D 00 00 */ addi r3, r29, 0 +/* 803738A4 00370804 38 9E 00 00 */ addi r4, r30, 0 +/* 803738A8 00370808 48 00 10 49 */ bl __DVDPushWaitingQueue +/* 803738AC 0037080C 80 0D AC 10 */ lwz r0, lbl_805A97D0@sda21(r13) +/* 803738B0 00370810 3B C3 00 00 */ addi r30, r3, 0 +/* 803738B4 00370814 28 00 00 00 */ cmplwi r0, 0 +/* 803738B8 00370818 40 82 00 14 */ bne lbl_803738CC +/* 803738BC 0037081C 80 0D AC 1C */ lwz r0, lbl_805A97DC@sda21(r13) +/* 803738C0 00370820 2C 00 00 00 */ cmpwi r0, 0 +/* 803738C4 00370824 40 82 00 08 */ bne lbl_803738CC +/* 803738C8 00370828 4B FF F3 3D */ bl stateReady +lbl_803738CC: +/* 803738CC 0037082C 7F E3 FB 78 */ mr r3, r31 +/* 803738D0 00370830 48 00 DD B9 */ bl OSRestoreInterrupts +/* 803738D4 00370834 7F C3 F3 78 */ mr r3, r30 +/* 803738D8 00370838 80 01 00 24 */ lwz r0, 0x24(r1) +/* 803738DC 0037083C 83 E1 00 1C */ lwz r31, 0x1c(r1) +/* 803738E0 00370840 83 C1 00 18 */ lwz r30, 0x18(r1) +/* 803738E4 00370844 83 A1 00 14 */ lwz r29, 0x14(r1) +/* 803738E8 00370848 38 21 00 20 */ addi r1, r1, 0x20 +/* 803738EC 0037084C 7C 08 03 A6 */ mtlr r0 +/* 803738F0 00370850 4E 80 00 20 */ blr + +.global DVDReadAbsAsyncPrio +DVDReadAbsAsyncPrio: +/* 803738F4 00370854 7C 08 02 A6 */ mflr r0 +/* 803738F8 00370858 90 01 00 04 */ stw r0, 4(r1) +/* 803738FC 0037085C 38 00 00 01 */ li r0, 1 +/* 80373900 00370860 94 21 FF C8 */ stwu r1, -0x38(r1) +/* 80373904 00370864 93 E1 00 34 */ stw r31, 0x34(r1) +/* 80373908 00370868 3B E8 00 00 */ addi r31, r8, 0 +/* 8037390C 0037086C 93 C1 00 30 */ stw r30, 0x30(r1) +/* 80373910 00370870 93 A1 00 2C */ stw r29, 0x2c(r1) +/* 80373914 00370874 3B A3 00 00 */ addi r29, r3, 0 +/* 80373918 00370878 90 03 00 08 */ stw r0, 8(r3) +/* 8037391C 0037087C 38 00 00 00 */ li r0, 0 +/* 80373920 00370880 90 83 00 18 */ stw r4, 0x18(r3) +/* 80373924 00370884 90 A3 00 14 */ stw r5, 0x14(r3) +/* 80373928 00370888 90 C3 00 10 */ stw r6, 0x10(r3) +/* 8037392C 0037088C 90 03 00 20 */ stw r0, 0x20(r3) +/* 80373930 00370890 90 E3 00 28 */ stw r7, 0x28(r3) +/* 80373934 00370894 80 0D 9E DC */ lwz r0, lbl_805A8A9C@sda21(r13) +/* 80373938 00370898 2C 00 00 00 */ cmpwi r0, 0 +/* 8037393C 0037089C 41 82 00 30 */ beq lbl_8037396C +/* 80373940 003708A0 80 7D 00 08 */ lwz r3, 8(r29) +/* 80373944 003708A4 28 03 00 01 */ cmplwi r3, 1 +/* 80373948 003708A8 41 82 00 18 */ beq lbl_80373960 +/* 8037394C 003708AC 38 03 FF FC */ addi r0, r3, -4 +/* 80373950 003708B0 28 00 00 01 */ cmplwi r0, 1 +/* 80373954 003708B4 40 81 00 0C */ ble lbl_80373960 +/* 80373958 003708B8 28 03 00 0E */ cmplwi r3, 0xe +/* 8037395C 003708BC 40 82 00 10 */ bne lbl_8037396C +lbl_80373960: +/* 80373960 003708C0 80 7D 00 18 */ lwz r3, 0x18(r29) +/* 80373964 003708C4 80 9D 00 14 */ lwz r4, 0x14(r29) +/* 80373968 003708C8 48 00 B1 1D */ bl DCInvalidateRange +lbl_8037396C: +/* 8037396C 003708CC 48 00 DC F5 */ bl OSDisableInterrupts +/* 80373970 003708D0 38 00 00 02 */ li r0, 2 +/* 80373974 003708D4 90 1D 00 0C */ stw r0, 0xc(r29) +/* 80373978 003708D8 3B C3 00 00 */ addi r30, r3, 0 +/* 8037397C 003708DC 38 7F 00 00 */ addi r3, r31, 0 +/* 80373980 003708E0 38 9D 00 00 */ addi r4, r29, 0 +/* 80373984 003708E4 48 00 0F 6D */ bl __DVDPushWaitingQueue +/* 80373988 003708E8 80 0D AC 10 */ lwz r0, lbl_805A97D0@sda21(r13) +/* 8037398C 003708EC 3B E3 00 00 */ addi r31, r3, 0 +/* 80373990 003708F0 28 00 00 00 */ cmplwi r0, 0 +/* 80373994 003708F4 40 82 00 14 */ bne lbl_803739A8 +/* 80373998 003708F8 80 0D AC 1C */ lwz r0, lbl_805A97DC@sda21(r13) +/* 8037399C 003708FC 2C 00 00 00 */ cmpwi r0, 0 +/* 803739A0 00370900 40 82 00 08 */ bne lbl_803739A8 +/* 803739A4 00370904 4B FF F2 61 */ bl stateReady +lbl_803739A8: +/* 803739A8 00370908 7F C3 F3 78 */ mr r3, r30 +/* 803739AC 0037090C 48 00 DC DD */ bl OSRestoreInterrupts +/* 803739B0 00370910 7F E3 FB 78 */ mr r3, r31 +/* 803739B4 00370914 80 01 00 3C */ lwz r0, 0x3c(r1) +/* 803739B8 00370918 83 E1 00 34 */ lwz r31, 0x34(r1) +/* 803739BC 0037091C 83 C1 00 30 */ lwz r30, 0x30(r1) +/* 803739C0 00370920 83 A1 00 2C */ lwz r29, 0x2c(r1) +/* 803739C4 00370924 38 21 00 38 */ addi r1, r1, 0x38 +/* 803739C8 00370928 7C 08 03 A6 */ mtlr r0 +/* 803739CC 0037092C 4E 80 00 20 */ blr + +.global DVDReadAbsAsyncForBS +DVDReadAbsAsyncForBS: +/* 803739D0 00370930 7C 08 02 A6 */ mflr r0 +/* 803739D4 00370934 90 01 00 04 */ stw r0, 4(r1) +/* 803739D8 00370938 38 00 00 04 */ li r0, 4 +/* 803739DC 0037093C 94 21 FF D0 */ stwu r1, -0x30(r1) +/* 803739E0 00370940 93 E1 00 2C */ stw r31, 0x2c(r1) +/* 803739E4 00370944 3B E3 00 00 */ addi r31, r3, 0 +/* 803739E8 00370948 93 C1 00 28 */ stw r30, 0x28(r1) +/* 803739EC 0037094C 90 03 00 08 */ stw r0, 8(r3) +/* 803739F0 00370950 38 00 00 00 */ li r0, 0 +/* 803739F4 00370954 90 83 00 18 */ stw r4, 0x18(r3) +/* 803739F8 00370958 90 A3 00 14 */ stw r5, 0x14(r3) +/* 803739FC 0037095C 90 C3 00 10 */ stw r6, 0x10(r3) +/* 80373A00 00370960 90 03 00 20 */ stw r0, 0x20(r3) +/* 80373A04 00370964 90 E3 00 28 */ stw r7, 0x28(r3) +/* 80373A08 00370968 80 0D 9E DC */ lwz r0, lbl_805A8A9C@sda21(r13) +/* 80373A0C 0037096C 2C 00 00 00 */ cmpwi r0, 0 +/* 80373A10 00370970 41 82 00 30 */ beq lbl_80373A40 +/* 80373A14 00370974 80 7F 00 08 */ lwz r3, 8(r31) +/* 80373A18 00370978 28 03 00 01 */ cmplwi r3, 1 +/* 80373A1C 0037097C 41 82 00 18 */ beq lbl_80373A34 +/* 80373A20 00370980 38 03 FF FC */ addi r0, r3, -4 +/* 80373A24 00370984 28 00 00 01 */ cmplwi r0, 1 +/* 80373A28 00370988 40 81 00 0C */ ble lbl_80373A34 +/* 80373A2C 0037098C 28 03 00 0E */ cmplwi r3, 0xe +/* 80373A30 00370990 40 82 00 10 */ bne lbl_80373A40 +lbl_80373A34: +/* 80373A34 00370994 80 7F 00 18 */ lwz r3, 0x18(r31) +/* 80373A38 00370998 80 9F 00 14 */ lwz r4, 0x14(r31) +/* 80373A3C 0037099C 48 00 B0 49 */ bl DCInvalidateRange +lbl_80373A40: +/* 80373A40 003709A0 48 00 DC 21 */ bl OSDisableInterrupts +/* 80373A44 003709A4 38 00 00 02 */ li r0, 2 +/* 80373A48 003709A8 90 1F 00 0C */ stw r0, 0xc(r31) +/* 80373A4C 003709AC 3B C3 00 00 */ addi r30, r3, 0 +/* 80373A50 003709B0 38 9F 00 00 */ addi r4, r31, 0 +/* 80373A54 003709B4 38 60 00 02 */ li r3, 2 +/* 80373A58 003709B8 48 00 0E 99 */ bl __DVDPushWaitingQueue +/* 80373A5C 003709BC 80 0D AC 10 */ lwz r0, lbl_805A97D0@sda21(r13) +/* 80373A60 003709C0 3B E3 00 00 */ addi r31, r3, 0 +/* 80373A64 003709C4 28 00 00 00 */ cmplwi r0, 0 +/* 80373A68 003709C8 40 82 00 14 */ bne lbl_80373A7C +/* 80373A6C 003709CC 80 0D AC 1C */ lwz r0, lbl_805A97DC@sda21(r13) +/* 80373A70 003709D0 2C 00 00 00 */ cmpwi r0, 0 +/* 80373A74 003709D4 40 82 00 08 */ bne lbl_80373A7C +/* 80373A78 003709D8 4B FF F1 8D */ bl stateReady +lbl_80373A7C: +/* 80373A7C 003709DC 7F C3 F3 78 */ mr r3, r30 +/* 80373A80 003709E0 48 00 DC 09 */ bl OSRestoreInterrupts +/* 80373A84 003709E4 7F E3 FB 78 */ mr r3, r31 +/* 80373A88 003709E8 80 01 00 34 */ lwz r0, 0x34(r1) +/* 80373A8C 003709EC 83 E1 00 2C */ lwz r31, 0x2c(r1) +/* 80373A90 003709F0 83 C1 00 28 */ lwz r30, 0x28(r1) +/* 80373A94 003709F4 38 21 00 30 */ addi r1, r1, 0x30 +/* 80373A98 003709F8 7C 08 03 A6 */ mtlr r0 +/* 80373A9C 003709FC 4E 80 00 20 */ blr + +.global DVDReadDiskID +DVDReadDiskID: +/* 80373AA0 00370A00 7C 08 02 A6 */ mflr r0 +/* 80373AA4 00370A04 90 01 00 04 */ stw r0, 4(r1) +/* 80373AA8 00370A08 38 00 00 05 */ li r0, 5 +/* 80373AAC 00370A0C 94 21 FF D8 */ stwu r1, -0x28(r1) +/* 80373AB0 00370A10 93 E1 00 24 */ stw r31, 0x24(r1) +/* 80373AB4 00370A14 3B E3 00 00 */ addi r31, r3, 0 +/* 80373AB8 00370A18 93 C1 00 20 */ stw r30, 0x20(r1) +/* 80373ABC 00370A1C 90 03 00 08 */ stw r0, 8(r3) +/* 80373AC0 00370A20 38 60 00 20 */ li r3, 0x20 +/* 80373AC4 00370A24 38 00 00 00 */ li r0, 0 +/* 80373AC8 00370A28 90 9F 00 18 */ stw r4, 0x18(r31) +/* 80373ACC 00370A2C 90 7F 00 14 */ stw r3, 0x14(r31) +/* 80373AD0 00370A30 90 1F 00 10 */ stw r0, 0x10(r31) +/* 80373AD4 00370A34 90 1F 00 20 */ stw r0, 0x20(r31) +/* 80373AD8 00370A38 90 BF 00 28 */ stw r5, 0x28(r31) +/* 80373ADC 00370A3C 80 0D 9E DC */ lwz r0, lbl_805A8A9C@sda21(r13) +/* 80373AE0 00370A40 2C 00 00 00 */ cmpwi r0, 0 +/* 80373AE4 00370A44 41 82 00 30 */ beq lbl_80373B14 +/* 80373AE8 00370A48 80 7F 00 08 */ lwz r3, 8(r31) +/* 80373AEC 00370A4C 28 03 00 01 */ cmplwi r3, 1 +/* 80373AF0 00370A50 41 82 00 18 */ beq lbl_80373B08 +/* 80373AF4 00370A54 38 03 FF FC */ addi r0, r3, -4 +/* 80373AF8 00370A58 28 00 00 01 */ cmplwi r0, 1 +/* 80373AFC 00370A5C 40 81 00 0C */ ble lbl_80373B08 +/* 80373B00 00370A60 28 03 00 0E */ cmplwi r3, 0xe +/* 80373B04 00370A64 40 82 00 10 */ bne lbl_80373B14 +lbl_80373B08: +/* 80373B08 00370A68 80 7F 00 18 */ lwz r3, 0x18(r31) +/* 80373B0C 00370A6C 80 9F 00 14 */ lwz r4, 0x14(r31) +/* 80373B10 00370A70 48 00 AF 75 */ bl DCInvalidateRange +lbl_80373B14: +/* 80373B14 00370A74 48 00 DB 4D */ bl OSDisableInterrupts +/* 80373B18 00370A78 38 00 00 02 */ li r0, 2 +/* 80373B1C 00370A7C 90 1F 00 0C */ stw r0, 0xc(r31) +/* 80373B20 00370A80 3B C3 00 00 */ addi r30, r3, 0 +/* 80373B24 00370A84 38 9F 00 00 */ addi r4, r31, 0 +/* 80373B28 00370A88 38 60 00 02 */ li r3, 2 +/* 80373B2C 00370A8C 48 00 0D C5 */ bl __DVDPushWaitingQueue +/* 80373B30 00370A90 80 0D AC 10 */ lwz r0, lbl_805A97D0@sda21(r13) +/* 80373B34 00370A94 3B E3 00 00 */ addi r31, r3, 0 +/* 80373B38 00370A98 28 00 00 00 */ cmplwi r0, 0 +/* 80373B3C 00370A9C 40 82 00 14 */ bne lbl_80373B50 +/* 80373B40 00370AA0 80 0D AC 1C */ lwz r0, lbl_805A97DC@sda21(r13) +/* 80373B44 00370AA4 2C 00 00 00 */ cmpwi r0, 0 +/* 80373B48 00370AA8 40 82 00 08 */ bne lbl_80373B50 +/* 80373B4C 00370AAC 4B FF F0 B9 */ bl stateReady +lbl_80373B50: +/* 80373B50 00370AB0 7F C3 F3 78 */ mr r3, r30 +/* 80373B54 00370AB4 48 00 DB 35 */ bl OSRestoreInterrupts +/* 80373B58 00370AB8 7F E3 FB 78 */ mr r3, r31 +/* 80373B5C 00370ABC 80 01 00 2C */ lwz r0, 0x2c(r1) +/* 80373B60 00370AC0 83 E1 00 24 */ lwz r31, 0x24(r1) +/* 80373B64 00370AC4 83 C1 00 20 */ lwz r30, 0x20(r1) +/* 80373B68 00370AC8 38 21 00 28 */ addi r1, r1, 0x28 +/* 80373B6C 00370ACC 7C 08 03 A6 */ mtlr r0 +/* 80373B70 00370AD0 4E 80 00 20 */ blr + +.global sub_80373b74 +sub_80373b74: +/* 80373B74 00370AD4 7C 08 02 A6 */ mflr r0 +/* 80373B78 00370AD8 90 01 00 04 */ stw r0, 4(r1) +/* 80373B7C 00370ADC 38 00 00 06 */ li r0, 6 +/* 80373B80 00370AE0 94 21 FF D8 */ stwu r1, -0x28(r1) +/* 80373B84 00370AE4 93 E1 00 24 */ stw r31, 0x24(r1) +/* 80373B88 00370AE8 3B E3 00 00 */ addi r31, r3, 0 +/* 80373B8C 00370AEC 93 C1 00 20 */ stw r30, 0x20(r1) +/* 80373B90 00370AF0 90 03 00 08 */ stw r0, 8(r3) +/* 80373B94 00370AF4 90 83 00 14 */ stw r4, 0x14(r3) +/* 80373B98 00370AF8 90 A3 00 10 */ stw r5, 0x10(r3) +/* 80373B9C 00370AFC 90 C3 00 28 */ stw r6, 0x28(r3) +/* 80373BA0 00370B00 80 0D 9E DC */ lwz r0, lbl_805A8A9C@sda21(r13) +/* 80373BA4 00370B04 2C 00 00 00 */ cmpwi r0, 0 +/* 80373BA8 00370B08 41 82 00 30 */ beq lbl_80373BD8 +/* 80373BAC 00370B0C 80 7F 00 08 */ lwz r3, 8(r31) +/* 80373BB0 00370B10 28 03 00 01 */ cmplwi r3, 1 +/* 80373BB4 00370B14 41 82 00 18 */ beq lbl_80373BCC +/* 80373BB8 00370B18 38 03 FF FC */ addi r0, r3, -4 +/* 80373BBC 00370B1C 28 00 00 01 */ cmplwi r0, 1 +/* 80373BC0 00370B20 40 81 00 0C */ ble lbl_80373BCC +/* 80373BC4 00370B24 28 03 00 0E */ cmplwi r3, 0xe +/* 80373BC8 00370B28 40 82 00 10 */ bne lbl_80373BD8 +lbl_80373BCC: +/* 80373BCC 00370B2C 80 7F 00 18 */ lwz r3, 0x18(r31) +/* 80373BD0 00370B30 80 9F 00 14 */ lwz r4, 0x14(r31) +/* 80373BD4 00370B34 48 00 AE B1 */ bl DCInvalidateRange +lbl_80373BD8: +/* 80373BD8 00370B38 48 00 DA 89 */ bl OSDisableInterrupts +/* 80373BDC 00370B3C 38 00 00 02 */ li r0, 2 +/* 80373BE0 00370B40 90 1F 00 0C */ stw r0, 0xc(r31) +/* 80373BE4 00370B44 3B C3 00 00 */ addi r30, r3, 0 +/* 80373BE8 00370B48 38 9F 00 00 */ addi r4, r31, 0 +/* 80373BEC 00370B4C 38 60 00 01 */ li r3, 1 +/* 80373BF0 00370B50 48 00 0D 01 */ bl __DVDPushWaitingQueue +/* 80373BF4 00370B54 80 0D AC 10 */ lwz r0, lbl_805A97D0@sda21(r13) +/* 80373BF8 00370B58 3B E3 00 00 */ addi r31, r3, 0 +/* 80373BFC 00370B5C 28 00 00 00 */ cmplwi r0, 0 +/* 80373C00 00370B60 40 82 00 14 */ bne lbl_80373C14 +/* 80373C04 00370B64 80 0D AC 1C */ lwz r0, lbl_805A97DC@sda21(r13) +/* 80373C08 00370B68 2C 00 00 00 */ cmpwi r0, 0 +/* 80373C0C 00370B6C 40 82 00 08 */ bne lbl_80373C14 +/* 80373C10 00370B70 4B FF EF F5 */ bl stateReady +lbl_80373C14: +/* 80373C14 00370B74 7F C3 F3 78 */ mr r3, r30 +/* 80373C18 00370B78 48 00 DA 71 */ bl OSRestoreInterrupts +/* 80373C1C 00370B7C 7F E3 FB 78 */ mr r3, r31 +/* 80373C20 00370B80 80 01 00 2C */ lwz r0, 0x2c(r1) +/* 80373C24 00370B84 83 E1 00 24 */ lwz r31, 0x24(r1) +/* 80373C28 00370B88 83 C1 00 20 */ lwz r30, 0x20(r1) +/* 80373C2C 00370B8C 38 21 00 28 */ addi r1, r1, 0x28 +/* 80373C30 00370B90 7C 08 03 A6 */ mtlr r0 +/* 80373C34 00370B94 4E 80 00 20 */ blr + +.global DVDCancelStreamAsync +DVDCancelStreamAsync: +/* 80373C38 00370B98 7C 08 02 A6 */ mflr r0 +/* 80373C3C 00370B9C 90 01 00 04 */ stw r0, 4(r1) +/* 80373C40 00370BA0 38 00 00 07 */ li r0, 7 +/* 80373C44 00370BA4 94 21 FF E0 */ stwu r1, -0x20(r1) +/* 80373C48 00370BA8 93 E1 00 1C */ stw r31, 0x1c(r1) +/* 80373C4C 00370BAC 3B E3 00 00 */ addi r31, r3, 0 +/* 80373C50 00370BB0 93 C1 00 18 */ stw r30, 0x18(r1) +/* 80373C54 00370BB4 90 03 00 08 */ stw r0, 8(r3) +/* 80373C58 00370BB8 90 83 00 28 */ stw r4, 0x28(r3) +/* 80373C5C 00370BBC 80 0D 9E DC */ lwz r0, lbl_805A8A9C@sda21(r13) +/* 80373C60 00370BC0 2C 00 00 00 */ cmpwi r0, 0 +/* 80373C64 00370BC4 41 82 00 30 */ beq lbl_80373C94 +/* 80373C68 00370BC8 80 7F 00 08 */ lwz r3, 8(r31) +/* 80373C6C 00370BCC 28 03 00 01 */ cmplwi r3, 1 +/* 80373C70 00370BD0 41 82 00 18 */ beq lbl_80373C88 +/* 80373C74 00370BD4 38 03 FF FC */ addi r0, r3, -4 +/* 80373C78 00370BD8 28 00 00 01 */ cmplwi r0, 1 +/* 80373C7C 00370BDC 40 81 00 0C */ ble lbl_80373C88 +/* 80373C80 00370BE0 28 03 00 0E */ cmplwi r3, 0xe +/* 80373C84 00370BE4 40 82 00 10 */ bne lbl_80373C94 +lbl_80373C88: +/* 80373C88 00370BE8 80 7F 00 18 */ lwz r3, 0x18(r31) +/* 80373C8C 00370BEC 80 9F 00 14 */ lwz r4, 0x14(r31) +/* 80373C90 00370BF0 48 00 AD F5 */ bl DCInvalidateRange +lbl_80373C94: +/* 80373C94 00370BF4 48 00 D9 CD */ bl OSDisableInterrupts +/* 80373C98 00370BF8 38 00 00 02 */ li r0, 2 +/* 80373C9C 00370BFC 90 1F 00 0C */ stw r0, 0xc(r31) +/* 80373CA0 00370C00 3B C3 00 00 */ addi r30, r3, 0 +/* 80373CA4 00370C04 38 9F 00 00 */ addi r4, r31, 0 +/* 80373CA8 00370C08 38 60 00 01 */ li r3, 1 +/* 80373CAC 00370C0C 48 00 0C 45 */ bl __DVDPushWaitingQueue +/* 80373CB0 00370C10 80 0D AC 10 */ lwz r0, lbl_805A97D0@sda21(r13) +/* 80373CB4 00370C14 3B E3 00 00 */ addi r31, r3, 0 +/* 80373CB8 00370C18 28 00 00 00 */ cmplwi r0, 0 +/* 80373CBC 00370C1C 40 82 00 14 */ bne lbl_80373CD0 +/* 80373CC0 00370C20 80 0D AC 1C */ lwz r0, lbl_805A97DC@sda21(r13) +/* 80373CC4 00370C24 2C 00 00 00 */ cmpwi r0, 0 +/* 80373CC8 00370C28 40 82 00 08 */ bne lbl_80373CD0 +/* 80373CCC 00370C2C 4B FF EF 39 */ bl stateReady +lbl_80373CD0: +/* 80373CD0 00370C30 7F C3 F3 78 */ mr r3, r30 +/* 80373CD4 00370C34 48 00 D9 B5 */ bl OSRestoreInterrupts +/* 80373CD8 00370C38 7F E3 FB 78 */ mr r3, r31 +/* 80373CDC 00370C3C 80 01 00 24 */ lwz r0, 0x24(r1) +/* 80373CE0 00370C40 83 E1 00 1C */ lwz r31, 0x1c(r1) +/* 80373CE4 00370C44 83 C1 00 18 */ lwz r30, 0x18(r1) +/* 80373CE8 00370C48 38 21 00 20 */ addi r1, r1, 0x20 +/* 80373CEC 00370C4C 7C 08 03 A6 */ mtlr r0 +/* 80373CF0 00370C50 4E 80 00 20 */ blr + +.global sub_80373cf4 +sub_80373cf4: +/* 80373CF4 00370C54 7C 08 02 A6 */ mflr r0 +/* 80373CF8 00370C58 90 01 00 04 */ stw r0, 4(r1) +/* 80373CFC 00370C5C 38 00 00 07 */ li r0, 7 +/* 80373D00 00370C60 94 21 FF E0 */ stwu r1, -0x20(r1) +/* 80373D04 00370C64 93 E1 00 1C */ stw r31, 0x1c(r1) +/* 80373D08 00370C68 93 C1 00 18 */ stw r30, 0x18(r1) +/* 80373D0C 00370C6C 3B C3 00 00 */ addi r30, r3, 0 +/* 80373D10 00370C70 3C 60 80 37 */ lis r3, sub_80373d94@ha +/* 80373D14 00370C74 90 1E 00 08 */ stw r0, 8(r30) +/* 80373D18 00370C78 38 03 3D 94 */ addi r0, r3, sub_80373d94@l +/* 80373D1C 00370C7C 38 9E 00 00 */ addi r4, r30, 0 +/* 80373D20 00370C80 90 1E 00 28 */ stw r0, 0x28(r30) +/* 80373D24 00370C84 38 60 00 01 */ li r3, 1 +/* 80373D28 00370C88 4B FF FB 11 */ bl sub_80373838 +/* 80373D2C 00370C8C 2C 03 00 00 */ cmpwi r3, 0 +/* 80373D30 00370C90 40 82 00 0C */ bne lbl_80373D3C +/* 80373D34 00370C94 38 60 FF FF */ li r3, -1 +/* 80373D38 00370C98 48 00 00 44 */ b lbl_80373D7C +lbl_80373D3C: +/* 80373D3C 00370C9C 48 00 D9 25 */ bl OSDisableInterrupts +/* 80373D40 00370CA0 7C 7F 1B 78 */ mr r31, r3 +lbl_80373D44: +/* 80373D44 00370CA4 80 7E 00 0C */ lwz r3, 0xc(r30) +/* 80373D48 00370CA8 38 03 00 01 */ addi r0, r3, 1 +/* 80373D4C 00370CAC 28 00 00 01 */ cmplwi r0, 1 +/* 80373D50 00370CB0 40 81 00 0C */ ble lbl_80373D5C +/* 80373D54 00370CB4 2C 03 00 0A */ cmpwi r3, 0xa +/* 80373D58 00370CB8 40 82 00 0C */ bne lbl_80373D64 +lbl_80373D5C: +/* 80373D5C 00370CBC 83 DE 00 20 */ lwz r30, 0x20(r30) +/* 80373D60 00370CC0 48 00 00 10 */ b lbl_80373D70 +lbl_80373D64: +/* 80373D64 00370CC4 38 6D AC 08 */ addi r3, r13, lbl_805A97C8@sda21 +/* 80373D68 00370CC8 48 01 13 A5 */ bl OSSleepThread +/* 80373D6C 00370CCC 4B FF FF D8 */ b lbl_80373D44 +lbl_80373D70: +/* 80373D70 00370CD0 7F E3 FB 78 */ mr r3, r31 +/* 80373D74 00370CD4 48 00 D9 15 */ bl OSRestoreInterrupts +/* 80373D78 00370CD8 7F C3 F3 78 */ mr r3, r30 +lbl_80373D7C: +/* 80373D7C 00370CDC 80 01 00 24 */ lwz r0, 0x24(r1) +/* 80373D80 00370CE0 83 E1 00 1C */ lwz r31, 0x1c(r1) +/* 80373D84 00370CE4 83 C1 00 18 */ lwz r30, 0x18(r1) +/* 80373D88 00370CE8 38 21 00 20 */ addi r1, r1, 0x20 +/* 80373D8C 00370CEC 7C 08 03 A6 */ mtlr r0 +/* 80373D90 00370CF0 4E 80 00 20 */ blr + +.global sub_80373d94 +sub_80373d94: +/* 80373D94 00370CF4 7C 08 02 A6 */ mflr r0 +/* 80373D98 00370CF8 90 01 00 04 */ stw r0, 4(r1) +/* 80373D9C 00370CFC 94 21 FF F8 */ stwu r1, -8(r1) +/* 80373DA0 00370D00 90 64 00 20 */ stw r3, 0x20(r4) +/* 80373DA4 00370D04 38 6D AC 08 */ addi r3, r13, lbl_805A97C8@sda21 +/* 80373DA8 00370D08 48 01 14 51 */ bl OSWakeupThread +/* 80373DAC 00370D0C 80 01 00 0C */ lwz r0, 0xc(r1) +/* 80373DB0 00370D10 38 21 00 08 */ addi r1, r1, 8 +/* 80373DB4 00370D14 7C 08 03 A6 */ mtlr r0 +/* 80373DB8 00370D18 4E 80 00 20 */ blr + +.global sub_80373dbc +sub_80373dbc: +/* 80373DBC 00370D1C 7C 08 02 A6 */ mflr r0 +/* 80373DC0 00370D20 90 01 00 04 */ stw r0, 4(r1) +/* 80373DC4 00370D24 38 00 00 08 */ li r0, 8 +/* 80373DC8 00370D28 94 21 FF E0 */ stwu r1, -0x20(r1) +/* 80373DCC 00370D2C 93 E1 00 1C */ stw r31, 0x1c(r1) +/* 80373DD0 00370D30 3B E3 00 00 */ addi r31, r3, 0 +/* 80373DD4 00370D34 93 C1 00 18 */ stw r30, 0x18(r1) +/* 80373DD8 00370D38 90 03 00 08 */ stw r0, 8(r3) +/* 80373DDC 00370D3C 90 83 00 28 */ stw r4, 0x28(r3) +/* 80373DE0 00370D40 80 0D 9E DC */ lwz r0, lbl_805A8A9C@sda21(r13) +/* 80373DE4 00370D44 2C 00 00 00 */ cmpwi r0, 0 +/* 80373DE8 00370D48 41 82 00 30 */ beq lbl_80373E18 +/* 80373DEC 00370D4C 80 7F 00 08 */ lwz r3, 8(r31) +/* 80373DF0 00370D50 28 03 00 01 */ cmplwi r3, 1 +/* 80373DF4 00370D54 41 82 00 18 */ beq lbl_80373E0C +/* 80373DF8 00370D58 38 03 FF FC */ addi r0, r3, -4 +/* 80373DFC 00370D5C 28 00 00 01 */ cmplwi r0, 1 +/* 80373E00 00370D60 40 81 00 0C */ ble lbl_80373E0C +/* 80373E04 00370D64 28 03 00 0E */ cmplwi r3, 0xe +/* 80373E08 00370D68 40 82 00 10 */ bne lbl_80373E18 +lbl_80373E0C: +/* 80373E0C 00370D6C 80 7F 00 18 */ lwz r3, 0x18(r31) +/* 80373E10 00370D70 80 9F 00 14 */ lwz r4, 0x14(r31) +/* 80373E14 00370D74 48 00 AC 71 */ bl DCInvalidateRange +lbl_80373E18: +/* 80373E18 00370D78 48 00 D8 49 */ bl OSDisableInterrupts +/* 80373E1C 00370D7C 38 00 00 02 */ li r0, 2 +/* 80373E20 00370D80 90 1F 00 0C */ stw r0, 0xc(r31) +/* 80373E24 00370D84 3B C3 00 00 */ addi r30, r3, 0 +/* 80373E28 00370D88 38 9F 00 00 */ addi r4, r31, 0 +/* 80373E2C 00370D8C 38 60 00 01 */ li r3, 1 +/* 80373E30 00370D90 48 00 0A C1 */ bl __DVDPushWaitingQueue +/* 80373E34 00370D94 80 0D AC 10 */ lwz r0, lbl_805A97D0@sda21(r13) +/* 80373E38 00370D98 3B E3 00 00 */ addi r31, r3, 0 +/* 80373E3C 00370D9C 28 00 00 00 */ cmplwi r0, 0 +/* 80373E40 00370DA0 40 82 00 14 */ bne lbl_80373E54 +/* 80373E44 00370DA4 80 0D AC 1C */ lwz r0, lbl_805A97DC@sda21(r13) +/* 80373E48 00370DA8 2C 00 00 00 */ cmpwi r0, 0 +/* 80373E4C 00370DAC 40 82 00 08 */ bne lbl_80373E54 +/* 80373E50 00370DB0 4B FF ED B5 */ bl stateReady +lbl_80373E54: +/* 80373E54 00370DB4 7F C3 F3 78 */ mr r3, r30 +/* 80373E58 00370DB8 48 00 D8 31 */ bl OSRestoreInterrupts +/* 80373E5C 00370DBC 7F E3 FB 78 */ mr r3, r31 +/* 80373E60 00370DC0 80 01 00 24 */ lwz r0, 0x24(r1) +/* 80373E64 00370DC4 83 E1 00 1C */ lwz r31, 0x1c(r1) +/* 80373E68 00370DC8 83 C1 00 18 */ lwz r30, 0x18(r1) +/* 80373E6C 00370DCC 38 21 00 20 */ addi r1, r1, 0x20 +/* 80373E70 00370DD0 7C 08 03 A6 */ mtlr r0 +/* 80373E74 00370DD4 4E 80 00 20 */ blr + +.global sub_80373e78 +sub_80373e78: +/* 80373E78 00370DD8 7C 08 02 A6 */ mflr r0 +/* 80373E7C 00370DDC 90 01 00 04 */ stw r0, 4(r1) +/* 80373E80 00370DE0 38 00 00 09 */ li r0, 9 +/* 80373E84 00370DE4 94 21 FF E0 */ stwu r1, -0x20(r1) +/* 80373E88 00370DE8 93 E1 00 1C */ stw r31, 0x1c(r1) +/* 80373E8C 00370DEC 3B E3 00 00 */ addi r31, r3, 0 +/* 80373E90 00370DF0 93 C1 00 18 */ stw r30, 0x18(r1) +/* 80373E94 00370DF4 90 03 00 08 */ stw r0, 8(r3) +/* 80373E98 00370DF8 90 83 00 28 */ stw r4, 0x28(r3) +/* 80373E9C 00370DFC 80 0D 9E DC */ lwz r0, lbl_805A8A9C@sda21(r13) +/* 80373EA0 00370E00 2C 00 00 00 */ cmpwi r0, 0 +/* 80373EA4 00370E04 41 82 00 30 */ beq lbl_80373ED4 +/* 80373EA8 00370E08 80 7F 00 08 */ lwz r3, 8(r31) +/* 80373EAC 00370E0C 28 03 00 01 */ cmplwi r3, 1 +/* 80373EB0 00370E10 41 82 00 18 */ beq lbl_80373EC8 +/* 80373EB4 00370E14 38 03 FF FC */ addi r0, r3, -4 +/* 80373EB8 00370E18 28 00 00 01 */ cmplwi r0, 1 +/* 80373EBC 00370E1C 40 81 00 0C */ ble lbl_80373EC8 +/* 80373EC0 00370E20 28 03 00 0E */ cmplwi r3, 0xe +/* 80373EC4 00370E24 40 82 00 10 */ bne lbl_80373ED4 +lbl_80373EC8: +/* 80373EC8 00370E28 80 7F 00 18 */ lwz r3, 0x18(r31) +/* 80373ECC 00370E2C 80 9F 00 14 */ lwz r4, 0x14(r31) +/* 80373ED0 00370E30 48 00 AB B5 */ bl DCInvalidateRange +lbl_80373ED4: +/* 80373ED4 00370E34 48 00 D7 8D */ bl OSDisableInterrupts +/* 80373ED8 00370E38 38 00 00 02 */ li r0, 2 +/* 80373EDC 00370E3C 90 1F 00 0C */ stw r0, 0xc(r31) +/* 80373EE0 00370E40 3B C3 00 00 */ addi r30, r3, 0 +/* 80373EE4 00370E44 38 9F 00 00 */ addi r4, r31, 0 +/* 80373EE8 00370E48 38 60 00 01 */ li r3, 1 +/* 80373EEC 00370E4C 48 00 0A 05 */ bl __DVDPushWaitingQueue +/* 80373EF0 00370E50 80 0D AC 10 */ lwz r0, lbl_805A97D0@sda21(r13) +/* 80373EF4 00370E54 3B E3 00 00 */ addi r31, r3, 0 +/* 80373EF8 00370E58 28 00 00 00 */ cmplwi r0, 0 +/* 80373EFC 00370E5C 40 82 00 14 */ bne lbl_80373F10 +/* 80373F00 00370E60 80 0D AC 1C */ lwz r0, lbl_805A97DC@sda21(r13) +/* 80373F04 00370E64 2C 00 00 00 */ cmpwi r0, 0 +/* 80373F08 00370E68 40 82 00 08 */ bne lbl_80373F10 +/* 80373F0C 00370E6C 4B FF EC F9 */ bl stateReady +lbl_80373F10: +/* 80373F10 00370E70 7F C3 F3 78 */ mr r3, r30 +/* 80373F14 00370E74 48 00 D7 75 */ bl OSRestoreInterrupts +/* 80373F18 00370E78 7F E3 FB 78 */ mr r3, r31 +/* 80373F1C 00370E7C 80 01 00 24 */ lwz r0, 0x24(r1) +/* 80373F20 00370E80 83 E1 00 1C */ lwz r31, 0x1c(r1) +/* 80373F24 00370E84 83 C1 00 18 */ lwz r30, 0x18(r1) +/* 80373F28 00370E88 38 21 00 20 */ addi r1, r1, 0x20 +/* 80373F2C 00370E8C 7C 08 03 A6 */ mtlr r0 +/* 80373F30 00370E90 4E 80 00 20 */ blr + +.global sub_80373f34 +sub_80373f34: +/* 80373F34 00370E94 7C 08 02 A6 */ mflr r0 +/* 80373F38 00370E98 90 01 00 04 */ stw r0, 4(r1) +/* 80373F3C 00370E9C 38 00 00 0A */ li r0, 0xa +/* 80373F40 00370EA0 94 21 FF E0 */ stwu r1, -0x20(r1) +/* 80373F44 00370EA4 93 E1 00 1C */ stw r31, 0x1c(r1) +/* 80373F48 00370EA8 3B E3 00 00 */ addi r31, r3, 0 +/* 80373F4C 00370EAC 93 C1 00 18 */ stw r30, 0x18(r1) +/* 80373F50 00370EB0 90 03 00 08 */ stw r0, 8(r3) +/* 80373F54 00370EB4 90 83 00 28 */ stw r4, 0x28(r3) +/* 80373F58 00370EB8 80 0D 9E DC */ lwz r0, lbl_805A8A9C@sda21(r13) +/* 80373F5C 00370EBC 2C 00 00 00 */ cmpwi r0, 0 +/* 80373F60 00370EC0 41 82 00 30 */ beq lbl_80373F90 +/* 80373F64 00370EC4 80 7F 00 08 */ lwz r3, 8(r31) +/* 80373F68 00370EC8 28 03 00 01 */ cmplwi r3, 1 +/* 80373F6C 00370ECC 41 82 00 18 */ beq lbl_80373F84 +/* 80373F70 00370ED0 38 03 FF FC */ addi r0, r3, -4 +/* 80373F74 00370ED4 28 00 00 01 */ cmplwi r0, 1 +/* 80373F78 00370ED8 40 81 00 0C */ ble lbl_80373F84 +/* 80373F7C 00370EDC 28 03 00 0E */ cmplwi r3, 0xe +/* 80373F80 00370EE0 40 82 00 10 */ bne lbl_80373F90 +lbl_80373F84: +/* 80373F84 00370EE4 80 7F 00 18 */ lwz r3, 0x18(r31) +/* 80373F88 00370EE8 80 9F 00 14 */ lwz r4, 0x14(r31) +/* 80373F8C 00370EEC 48 00 AA F9 */ bl DCInvalidateRange +lbl_80373F90: +/* 80373F90 00370EF0 48 00 D6 D1 */ bl OSDisableInterrupts +/* 80373F94 00370EF4 38 00 00 02 */ li r0, 2 +/* 80373F98 00370EF8 90 1F 00 0C */ stw r0, 0xc(r31) +/* 80373F9C 00370EFC 3B C3 00 00 */ addi r30, r3, 0 +/* 80373FA0 00370F00 38 9F 00 00 */ addi r4, r31, 0 +/* 80373FA4 00370F04 38 60 00 01 */ li r3, 1 +/* 80373FA8 00370F08 48 00 09 49 */ bl __DVDPushWaitingQueue +/* 80373FAC 00370F0C 80 0D AC 10 */ lwz r0, lbl_805A97D0@sda21(r13) +/* 80373FB0 00370F10 3B E3 00 00 */ addi r31, r3, 0 +/* 80373FB4 00370F14 28 00 00 00 */ cmplwi r0, 0 +/* 80373FB8 00370F18 40 82 00 14 */ bne lbl_80373FCC +/* 80373FBC 00370F1C 80 0D AC 1C */ lwz r0, lbl_805A97DC@sda21(r13) +/* 80373FC0 00370F20 2C 00 00 00 */ cmpwi r0, 0 +/* 80373FC4 00370F24 40 82 00 08 */ bne lbl_80373FCC +/* 80373FC8 00370F28 4B FF EC 3D */ bl stateReady +lbl_80373FCC: +/* 80373FCC 00370F2C 7F C3 F3 78 */ mr r3, r30 +/* 80373FD0 00370F30 48 00 D6 B9 */ bl OSRestoreInterrupts +/* 80373FD4 00370F34 7F E3 FB 78 */ mr r3, r31 +/* 80373FD8 00370F38 80 01 00 24 */ lwz r0, 0x24(r1) +/* 80373FDC 00370F3C 83 E1 00 1C */ lwz r31, 0x1c(r1) +/* 80373FE0 00370F40 83 C1 00 18 */ lwz r30, 0x18(r1) +/* 80373FE4 00370F44 38 21 00 20 */ addi r1, r1, 0x20 +/* 80373FE8 00370F48 7C 08 03 A6 */ mtlr r0 +/* 80373FEC 00370F4C 4E 80 00 20 */ blr + +.global DVDInquiryAsync +DVDInquiryAsync: +/* 80373FF0 00370F50 7C 08 02 A6 */ mflr r0 +/* 80373FF4 00370F54 90 01 00 04 */ stw r0, 4(r1) +/* 80373FF8 00370F58 38 00 00 0E */ li r0, 0xe +/* 80373FFC 00370F5C 94 21 FF D8 */ stwu r1, -0x28(r1) +/* 80374000 00370F60 93 E1 00 24 */ stw r31, 0x24(r1) +/* 80374004 00370F64 3B E3 00 00 */ addi r31, r3, 0 +/* 80374008 00370F68 93 C1 00 20 */ stw r30, 0x20(r1) +/* 8037400C 00370F6C 90 03 00 08 */ stw r0, 8(r3) +/* 80374010 00370F70 38 60 00 20 */ li r3, 0x20 +/* 80374014 00370F74 38 00 00 00 */ li r0, 0 +/* 80374018 00370F78 90 9F 00 18 */ stw r4, 0x18(r31) +/* 8037401C 00370F7C 90 7F 00 14 */ stw r3, 0x14(r31) +/* 80374020 00370F80 90 1F 00 20 */ stw r0, 0x20(r31) +/* 80374024 00370F84 90 BF 00 28 */ stw r5, 0x28(r31) +/* 80374028 00370F88 80 0D 9E DC */ lwz r0, lbl_805A8A9C@sda21(r13) +/* 8037402C 00370F8C 2C 00 00 00 */ cmpwi r0, 0 +/* 80374030 00370F90 41 82 00 30 */ beq lbl_80374060 +/* 80374034 00370F94 80 7F 00 08 */ lwz r3, 8(r31) +/* 80374038 00370F98 28 03 00 01 */ cmplwi r3, 1 +/* 8037403C 00370F9C 41 82 00 18 */ beq lbl_80374054 +/* 80374040 00370FA0 38 03 FF FC */ addi r0, r3, -4 +/* 80374044 00370FA4 28 00 00 01 */ cmplwi r0, 1 +/* 80374048 00370FA8 40 81 00 0C */ ble lbl_80374054 +/* 8037404C 00370FAC 28 03 00 0E */ cmplwi r3, 0xe +/* 80374050 00370FB0 40 82 00 10 */ bne lbl_80374060 +lbl_80374054: +/* 80374054 00370FB4 80 7F 00 18 */ lwz r3, 0x18(r31) +/* 80374058 00370FB8 80 9F 00 14 */ lwz r4, 0x14(r31) +/* 8037405C 00370FBC 48 00 AA 29 */ bl DCInvalidateRange +lbl_80374060: +/* 80374060 00370FC0 48 00 D6 01 */ bl OSDisableInterrupts +/* 80374064 00370FC4 38 00 00 02 */ li r0, 2 +/* 80374068 00370FC8 90 1F 00 0C */ stw r0, 0xc(r31) +/* 8037406C 00370FCC 3B C3 00 00 */ addi r30, r3, 0 +/* 80374070 00370FD0 38 9F 00 00 */ addi r4, r31, 0 +/* 80374074 00370FD4 38 60 00 02 */ li r3, 2 +/* 80374078 00370FD8 48 00 08 79 */ bl __DVDPushWaitingQueue +/* 8037407C 00370FDC 80 0D AC 10 */ lwz r0, lbl_805A97D0@sda21(r13) +/* 80374080 00370FE0 3B E3 00 00 */ addi r31, r3, 0 +/* 80374084 00370FE4 28 00 00 00 */ cmplwi r0, 0 +/* 80374088 00370FE8 40 82 00 14 */ bne lbl_8037409C +/* 8037408C 00370FEC 80 0D AC 1C */ lwz r0, lbl_805A97DC@sda21(r13) +/* 80374090 00370FF0 2C 00 00 00 */ cmpwi r0, 0 +/* 80374094 00370FF4 40 82 00 08 */ bne lbl_8037409C +/* 80374098 00370FF8 4B FF EB 6D */ bl stateReady +lbl_8037409C: +/* 8037409C 00370FFC 7F C3 F3 78 */ mr r3, r30 +/* 803740A0 00371000 48 00 D5 E9 */ bl OSRestoreInterrupts +/* 803740A4 00371004 7F E3 FB 78 */ mr r3, r31 +/* 803740A8 00371008 80 01 00 2C */ lwz r0, 0x2c(r1) +/* 803740AC 0037100C 83 E1 00 24 */ lwz r31, 0x24(r1) +/* 803740B0 00371010 83 C1 00 20 */ lwz r30, 0x20(r1) +/* 803740B4 00371014 38 21 00 28 */ addi r1, r1, 0x28 +/* 803740B8 00371018 7C 08 03 A6 */ mtlr r0 +/* 803740BC 0037101C 4E 80 00 20 */ blr + +.global DVDReset +DVDReset: +/* 803740C0 00371020 7C 08 02 A6 */ mflr r0 +/* 803740C4 00371024 90 01 00 04 */ stw r0, 4(r1) +/* 803740C8 00371028 94 21 FF F8 */ stwu r1, -8(r1) +/* 803740CC 0037102C 4B FF D0 ED */ bl DVDLowReset +/* 803740D0 00371030 3C 60 CC 00 */ lis r3, 0xCC006000@ha +/* 803740D4 00371034 38 00 00 2A */ li r0, 0x2a +/* 803740D8 00371038 90 03 60 00 */ stw r0, 0xCC006000@l(r3) +/* 803740DC 0037103C 38 83 60 00 */ addi r4, r3, 0x6000 +/* 803740E0 00371040 38 00 00 00 */ li r0, 0 +/* 803740E4 00371044 80 63 60 04 */ lwz r3, 0x6004(r3) +/* 803740E8 00371048 90 64 00 04 */ stw r3, 4(r4) +/* 803740EC 0037104C 90 0D AC 48 */ stw r0, lbl_805A9808@sda21(r13) +/* 803740F0 00371050 90 0D AC 38 */ stw r0, lbl_805A97F8@sda21(r13) +/* 803740F4 00371054 80 01 00 0C */ lwz r0, 0xc(r1) +/* 803740F8 00371058 38 21 00 08 */ addi r1, r1, 8 +/* 803740FC 0037105C 7C 08 03 A6 */ mtlr r0 +/* 80374100 00371060 4E 80 00 20 */ blr + +.global DVDGetCommandBlockStatus +DVDGetCommandBlockStatus: +/* 80374104 00371064 7C 08 02 A6 */ mflr r0 +/* 80374108 00371068 90 01 00 04 */ stw r0, 4(r1) +/* 8037410C 0037106C 94 21 FF E8 */ stwu r1, -0x18(r1) +/* 80374110 00371070 93 E1 00 14 */ stw r31, 0x14(r1) +/* 80374114 00371074 7C 7F 1B 78 */ mr r31, r3 +/* 80374118 00371078 48 00 D5 49 */ bl OSDisableInterrupts +/* 8037411C 0037107C 80 1F 00 0C */ lwz r0, 0xc(r31) +/* 80374120 00371080 2C 00 00 03 */ cmpwi r0, 3 +/* 80374124 00371084 40 82 00 0C */ bne lbl_80374130 +/* 80374128 00371088 3B E0 00 01 */ li r31, 1 +/* 8037412C 0037108C 48 00 00 08 */ b lbl_80374134 +lbl_80374130: +/* 80374130 00371090 7C 1F 03 78 */ mr r31, r0 +lbl_80374134: +/* 80374134 00371094 48 00 D5 55 */ bl OSRestoreInterrupts +/* 80374138 00371098 7F E3 FB 78 */ mr r3, r31 +/* 8037413C 0037109C 80 01 00 1C */ lwz r0, 0x1c(r1) +/* 80374140 003710A0 83 E1 00 14 */ lwz r31, 0x14(r1) +/* 80374144 003710A4 38 21 00 18 */ addi r1, r1, 0x18 +/* 80374148 003710A8 7C 08 03 A6 */ mtlr r0 +/* 8037414C 003710AC 4E 80 00 20 */ blr + +.global DVDGetDriveStatus +DVDGetDriveStatus: +/* 80374150 003710B0 7C 08 02 A6 */ mflr r0 +/* 80374154 003710B4 90 01 00 04 */ stw r0, 4(r1) +/* 80374158 003710B8 94 21 FF E8 */ stwu r1, -0x18(r1) +/* 8037415C 003710BC 93 E1 00 14 */ stw r31, 0x14(r1) +/* 80374160 003710C0 93 C1 00 10 */ stw r30, 0x10(r1) +/* 80374164 003710C4 48 00 D4 FD */ bl OSDisableInterrupts +/* 80374168 003710C8 80 0D AC 28 */ lwz r0, lbl_805A97E8@sda21(r13) +/* 8037416C 003710CC 3B C3 00 00 */ addi r30, r3, 0 +/* 80374170 003710D0 2C 00 00 00 */ cmpwi r0, 0 +/* 80374174 003710D4 41 82 00 0C */ beq lbl_80374180 +/* 80374178 003710D8 3B E0 FF FF */ li r31, -1 +/* 8037417C 003710DC 48 00 00 5C */ b lbl_803741D8 +lbl_80374180: +/* 80374180 003710E0 80 0D AC 20 */ lwz r0, lbl_805A97E0@sda21(r13) +/* 80374184 003710E4 2C 00 00 00 */ cmpwi r0, 0 +/* 80374188 003710E8 41 82 00 0C */ beq lbl_80374194 +/* 8037418C 003710EC 3B E0 00 08 */ li r31, 8 +/* 80374190 003710F0 48 00 00 48 */ b lbl_803741D8 +lbl_80374194: +/* 80374194 003710F4 83 ED AC 10 */ lwz r31, lbl_805A97D0@sda21(r13) +/* 80374198 003710F8 28 1F 00 00 */ cmplwi r31, 0 +/* 8037419C 003710FC 40 82 00 0C */ bne lbl_803741A8 +/* 803741A0 00371100 3B E0 00 00 */ li r31, 0 +/* 803741A4 00371104 48 00 00 34 */ b lbl_803741D8 +lbl_803741A8: +/* 803741A8 00371108 3C 60 80 54 */ lis r3, lbl_80540BA0@ha +/* 803741AC 0037110C 38 03 0B A0 */ addi r0, r3, lbl_80540BA0@l +/* 803741B0 00371110 7C 1F 00 40 */ cmplw r31, r0 +/* 803741B4 00371114 40 82 00 0C */ bne lbl_803741C0 +/* 803741B8 00371118 3B E0 00 00 */ li r31, 0 +/* 803741BC 0037111C 48 00 00 1C */ b lbl_803741D8 +lbl_803741C0: +/* 803741C0 00371120 48 00 D4 A1 */ bl OSDisableInterrupts +/* 803741C4 00371124 83 FF 00 0C */ lwz r31, 0xc(r31) +/* 803741C8 00371128 2C 1F 00 03 */ cmpwi r31, 3 +/* 803741CC 0037112C 40 82 00 08 */ bne lbl_803741D4 +/* 803741D0 00371130 3B E0 00 01 */ li r31, 1 +lbl_803741D4: +/* 803741D4 00371134 48 00 D4 B5 */ bl OSRestoreInterrupts +lbl_803741D8: +/* 803741D8 00371138 7F C3 F3 78 */ mr r3, r30 +/* 803741DC 0037113C 48 00 D4 AD */ bl OSRestoreInterrupts +/* 803741E0 00371140 7F E3 FB 78 */ mr r3, r31 +/* 803741E4 00371144 80 01 00 1C */ lwz r0, 0x1c(r1) +/* 803741E8 00371148 83 E1 00 14 */ lwz r31, 0x14(r1) +/* 803741EC 0037114C 83 C1 00 10 */ lwz r30, 0x10(r1) +/* 803741F0 00371150 38 21 00 18 */ addi r1, r1, 0x18 +/* 803741F4 00371154 7C 08 03 A6 */ mtlr r0 +/* 803741F8 00371158 4E 80 00 20 */ blr + +.global DVDSetAutoInvalidation +DVDSetAutoInvalidation: +/* 803741FC 0037115C 80 0D 9E DC */ lwz r0, lbl_805A8A9C@sda21(r13) +/* 80374200 00371160 90 6D 9E DC */ stw r3, lbl_805A8A9C@sda21(r13) +/* 80374204 00371164 7C 03 03 78 */ mr r3, r0 +/* 80374208 00371168 4E 80 00 20 */ blr + +.global DVDCancelAsync +DVDCancelAsync: +/* 8037420C 0037116C 7C 08 02 A6 */ mflr r0 +/* 80374210 00371170 90 01 00 04 */ stw r0, 4(r1) +/* 80374214 00371174 94 21 FF E0 */ stwu r1, -0x20(r1) +/* 80374218 00371178 93 E1 00 1C */ stw r31, 0x1c(r1) +/* 8037421C 0037117C 93 C1 00 18 */ stw r30, 0x18(r1) +/* 80374220 00371180 3B C4 00 00 */ addi r30, r4, 0 +/* 80374224 00371184 93 A1 00 14 */ stw r29, 0x14(r1) +/* 80374228 00371188 3B A3 00 00 */ addi r29, r3, 0 +/* 8037422C 0037118C 48 00 D4 35 */ bl OSDisableInterrupts +/* 80374230 00371190 80 9D 00 0C */ lwz r4, 0xc(r29) +/* 80374234 00371194 3B E3 00 00 */ addi r31, r3, 0 +/* 80374238 00371198 38 04 00 01 */ addi r0, r4, 1 +/* 8037423C 0037119C 28 00 00 0C */ cmplwi r0, 0xc +/* 80374240 003711A0 41 81 02 14 */ bgt lbl_80374454 +/* 80374244 003711A4 3C 60 80 3F */ lis r3, lbl_803F0098@ha +/* 80374248 003711A8 38 63 00 98 */ addi r3, r3, lbl_803F0098@l +/* 8037424C 003711AC 54 00 10 3A */ slwi r0, r0, 2 +/* 80374250 003711B0 7C 03 00 2E */ lwzx r0, r3, r0 +/* 80374254 003711B4 7C 09 03 A6 */ mtctr r0 +/* 80374258 003711B8 4E 80 04 20 */ bctr +/* 8037425C 003711BC 28 1E 00 00 */ cmplwi r30, 0 +/* 80374260 003711C0 41 82 01 F4 */ beq lbl_80374454 +/* 80374264 003711C4 39 9E 00 00 */ addi r12, r30, 0 +/* 80374268 003711C8 7D 88 03 A6 */ mtlr r12 +/* 8037426C 003711CC 38 9D 00 00 */ addi r4, r29, 0 +/* 80374270 003711D0 38 60 00 00 */ li r3, 0 +/* 80374274 003711D4 4E 80 00 21 */ blrl +/* 80374278 003711D8 48 00 01 DC */ b lbl_80374454 +/* 8037427C 003711DC 80 0D AC 30 */ lwz r0, lbl_805A97F0@sda21(r13) +/* 80374280 003711E0 28 00 00 00 */ cmplwi r0, 0 +/* 80374284 003711E4 41 82 00 14 */ beq lbl_80374298 +/* 80374288 003711E8 7F E3 FB 78 */ mr r3, r31 +/* 8037428C 003711EC 48 00 D3 FD */ bl OSRestoreInterrupts +/* 80374290 003711F0 38 60 00 00 */ li r3, 0 +/* 80374294 003711F4 48 00 01 CC */ b lbl_80374460 +lbl_80374298: +/* 80374298 003711F8 38 00 00 01 */ li r0, 1 +/* 8037429C 003711FC 93 CD AC 34 */ stw r30, lbl_805A97F4@sda21(r13) +/* 803742A0 00371200 90 0D AC 30 */ stw r0, lbl_805A97F0@sda21(r13) +/* 803742A4 00371204 80 1D 00 08 */ lwz r0, 8(r29) +/* 803742A8 00371208 28 00 00 04 */ cmplwi r0, 4 +/* 803742AC 0037120C 41 82 00 0C */ beq lbl_803742B8 +/* 803742B0 00371210 28 00 00 01 */ cmplwi r0, 1 +/* 803742B4 00371214 40 82 01 A0 */ bne lbl_80374454 +lbl_803742B8: +/* 803742B8 00371218 4B FF CF BD */ bl DVDLowBreak +/* 803742BC 0037121C 48 00 01 98 */ b lbl_80374454 +/* 803742C0 00371220 7F A3 EB 78 */ mr r3, r29 +/* 803742C4 00371224 48 00 07 8D */ bl __DVDDequeueWaitingQueue +/* 803742C8 00371228 38 00 00 0A */ li r0, 0xa +/* 803742CC 0037122C 90 1D 00 0C */ stw r0, 0xc(r29) +/* 803742D0 00371230 81 9D 00 28 */ lwz r12, 0x28(r29) +/* 803742D4 00371234 28 0C 00 00 */ cmplwi r12, 0 +/* 803742D8 00371238 41 82 00 14 */ beq lbl_803742EC +/* 803742DC 0037123C 7D 88 03 A6 */ mtlr r12 +/* 803742E0 00371240 38 9D 00 00 */ addi r4, r29, 0 +/* 803742E4 00371244 38 60 FF FD */ li r3, -3 +/* 803742E8 00371248 4E 80 00 21 */ blrl +lbl_803742EC: +/* 803742EC 0037124C 28 1E 00 00 */ cmplwi r30, 0 +/* 803742F0 00371250 41 82 01 64 */ beq lbl_80374454 +/* 803742F4 00371254 39 9E 00 00 */ addi r12, r30, 0 +/* 803742F8 00371258 7D 88 03 A6 */ mtlr r12 +/* 803742FC 0037125C 38 9D 00 00 */ addi r4, r29, 0 +/* 80374300 00371260 38 60 00 00 */ li r3, 0 +/* 80374304 00371264 4E 80 00 21 */ blrl +/* 80374308 00371268 48 00 01 4C */ b lbl_80374454 +/* 8037430C 0037126C 80 1D 00 08 */ lwz r0, 8(r29) +/* 80374310 00371270 2C 00 00 0D */ cmpwi r0, 0xd +/* 80374314 00371274 41 82 00 28 */ beq lbl_8037433C +/* 80374318 00371278 40 80 00 18 */ bge lbl_80374330 +/* 8037431C 0037127C 2C 00 00 06 */ cmpwi r0, 6 +/* 80374320 00371280 40 80 00 3C */ bge lbl_8037435C +/* 80374324 00371284 2C 00 00 04 */ cmpwi r0, 4 +/* 80374328 00371288 40 80 00 14 */ bge lbl_8037433C +/* 8037432C 0037128C 48 00 00 30 */ b lbl_8037435C +lbl_80374330: +/* 80374330 00371290 2C 00 00 0F */ cmpwi r0, 0xf +/* 80374334 00371294 41 82 00 08 */ beq lbl_8037433C +/* 80374338 00371298 48 00 00 24 */ b lbl_8037435C +lbl_8037433C: +/* 8037433C 0037129C 28 1E 00 00 */ cmplwi r30, 0 +/* 80374340 003712A0 41 82 01 14 */ beq lbl_80374454 +/* 80374344 003712A4 39 9E 00 00 */ addi r12, r30, 0 +/* 80374348 003712A8 7D 88 03 A6 */ mtlr r12 +/* 8037434C 003712AC 38 9D 00 00 */ addi r4, r29, 0 +/* 80374350 003712B0 38 60 00 00 */ li r3, 0 +/* 80374354 003712B4 4E 80 00 21 */ blrl +/* 80374358 003712B8 48 00 00 FC */ b lbl_80374454 +lbl_8037435C: +/* 8037435C 003712BC 80 0D AC 30 */ lwz r0, lbl_805A97F0@sda21(r13) +/* 80374360 003712C0 28 00 00 00 */ cmplwi r0, 0 +/* 80374364 003712C4 41 82 00 14 */ beq lbl_80374378 +/* 80374368 003712C8 7F E3 FB 78 */ mr r3, r31 +/* 8037436C 003712CC 48 00 D3 1D */ bl OSRestoreInterrupts +/* 80374370 003712D0 38 60 00 00 */ li r3, 0 +/* 80374374 003712D4 48 00 00 EC */ b lbl_80374460 +lbl_80374378: +/* 80374378 003712D8 38 00 00 01 */ li r0, 1 +/* 8037437C 003712DC 93 CD AC 34 */ stw r30, lbl_805A97F4@sda21(r13) +/* 80374380 003712E0 90 0D AC 30 */ stw r0, lbl_805A97F0@sda21(r13) +/* 80374384 003712E4 48 00 00 D0 */ b lbl_80374454 +/* 80374388 003712E8 4B FF CF 01 */ bl DVDLowClearCallback +/* 8037438C 003712EC 3C 80 80 37 */ lis r4, cbForStateMotorStopped@ha +/* 80374390 003712F0 38 04 2B 20 */ addi r0, r4, cbForStateMotorStopped@l +/* 80374394 003712F4 7C 03 00 40 */ cmplw r3, r0 +/* 80374398 003712F8 41 82 00 14 */ beq lbl_803743AC +/* 8037439C 003712FC 7F E3 FB 78 */ mr r3, r31 +/* 803743A0 00371300 48 00 D2 E9 */ bl OSRestoreInterrupts +/* 803743A4 00371304 38 60 00 00 */ li r3, 0 +/* 803743A8 00371308 48 00 00 B8 */ b lbl_80374460 +lbl_803743AC: +/* 803743AC 0037130C 80 1D 00 0C */ lwz r0, 0xc(r29) +/* 803743B0 00371310 2C 00 00 04 */ cmpwi r0, 4 +/* 803743B4 00371314 40 82 00 0C */ bne lbl_803743C0 +/* 803743B8 00371318 38 00 00 03 */ li r0, 3 +/* 803743BC 0037131C 90 0D AC 38 */ stw r0, lbl_805A97F8@sda21(r13) +lbl_803743C0: +/* 803743C0 00371320 80 1D 00 0C */ lwz r0, 0xc(r29) +/* 803743C4 00371324 2C 00 00 05 */ cmpwi r0, 5 +/* 803743C8 00371328 40 82 00 0C */ bne lbl_803743D4 +/* 803743CC 0037132C 38 00 00 04 */ li r0, 4 +/* 803743D0 00371330 90 0D AC 38 */ stw r0, lbl_805A97F8@sda21(r13) +lbl_803743D4: +/* 803743D4 00371334 80 1D 00 0C */ lwz r0, 0xc(r29) +/* 803743D8 00371338 2C 00 00 06 */ cmpwi r0, 6 +/* 803743DC 0037133C 40 82 00 0C */ bne lbl_803743E8 +/* 803743E0 00371340 38 00 00 01 */ li r0, 1 +/* 803743E4 00371344 90 0D AC 38 */ stw r0, lbl_805A97F8@sda21(r13) +lbl_803743E8: +/* 803743E8 00371348 80 1D 00 0C */ lwz r0, 0xc(r29) +/* 803743EC 0037134C 2C 00 00 0B */ cmpwi r0, 0xb +/* 803743F0 00371350 40 82 00 0C */ bne lbl_803743FC +/* 803743F4 00371354 38 00 00 02 */ li r0, 2 +/* 803743F8 00371358 90 0D AC 38 */ stw r0, lbl_805A97F8@sda21(r13) +lbl_803743FC: +/* 803743FC 0037135C 80 1D 00 0C */ lwz r0, 0xc(r29) +/* 80374400 00371360 2C 00 00 07 */ cmpwi r0, 7 +/* 80374404 00371364 40 82 00 0C */ bne lbl_80374410 +/* 80374408 00371368 38 00 00 07 */ li r0, 7 +/* 8037440C 0037136C 90 0D AC 38 */ stw r0, lbl_805A97F8@sda21(r13) +lbl_80374410: +/* 80374410 00371370 38 00 00 0A */ li r0, 0xa +/* 80374414 00371374 90 1D 00 0C */ stw r0, 0xc(r29) +/* 80374418 00371378 81 9D 00 28 */ lwz r12, 0x28(r29) +/* 8037441C 0037137C 28 0C 00 00 */ cmplwi r12, 0 +/* 80374420 00371380 41 82 00 14 */ beq lbl_80374434 +/* 80374424 00371384 7D 88 03 A6 */ mtlr r12 +/* 80374428 00371388 38 9D 00 00 */ addi r4, r29, 0 +/* 8037442C 0037138C 38 60 FF FD */ li r3, -3 +/* 80374430 00371390 4E 80 00 21 */ blrl +lbl_80374434: +/* 80374434 00371394 28 1E 00 00 */ cmplwi r30, 0 +/* 80374438 00371398 41 82 00 18 */ beq lbl_80374450 +/* 8037443C 0037139C 39 9E 00 00 */ addi r12, r30, 0 +/* 80374440 003713A0 7D 88 03 A6 */ mtlr r12 +/* 80374444 003713A4 38 9D 00 00 */ addi r4, r29, 0 +/* 80374448 003713A8 38 60 00 00 */ li r3, 0 +/* 8037444C 003713AC 4E 80 00 21 */ blrl +lbl_80374450: +/* 80374450 003713B0 4B FF E7 B5 */ bl stateReady +lbl_80374454: +/* 80374454 003713B4 7F E3 FB 78 */ mr r3, r31 +/* 80374458 003713B8 48 00 D2 31 */ bl OSRestoreInterrupts +/* 8037445C 003713BC 38 60 00 01 */ li r3, 1 +lbl_80374460: +/* 80374460 003713C0 80 01 00 24 */ lwz r0, 0x24(r1) +/* 80374464 003713C4 83 E1 00 1C */ lwz r31, 0x1c(r1) +/* 80374468 003713C8 83 C1 00 18 */ lwz r30, 0x18(r1) +/* 8037446C 003713CC 83 A1 00 14 */ lwz r29, 0x14(r1) +/* 80374470 003713D0 38 21 00 20 */ addi r1, r1, 0x20 +/* 80374474 003713D4 7C 08 03 A6 */ mtlr r0 +/* 80374478 003713D8 4E 80 00 20 */ blr + +.global DVDCancel +DVDCancel: +/* 8037447C 003713DC 7C 08 02 A6 */ mflr r0 +/* 80374480 003713E0 3C 80 80 37 */ lis r4, cbForCancelSync@ha +/* 80374484 003713E4 90 01 00 04 */ stw r0, 4(r1) +/* 80374488 003713E8 38 84 45 28 */ addi r4, r4, cbForCancelSync@l +/* 8037448C 003713EC 94 21 FF E8 */ stwu r1, -0x18(r1) +/* 80374490 003713F0 93 E1 00 14 */ stw r31, 0x14(r1) +/* 80374494 003713F4 93 C1 00 10 */ stw r30, 0x10(r1) +/* 80374498 003713F8 3B C3 00 00 */ addi r30, r3, 0 +/* 8037449C 003713FC 4B FF FD 71 */ bl DVDCancelAsync +/* 803744A0 00371400 2C 03 00 00 */ cmpwi r3, 0 +/* 803744A4 00371404 40 82 00 0C */ bne lbl_803744B0 +/* 803744A8 00371408 38 60 FF FF */ li r3, -1 +/* 803744AC 0037140C 48 00 00 64 */ b lbl_80374510 +lbl_803744B0: +/* 803744B0 00371410 48 00 D1 B1 */ bl OSDisableInterrupts +/* 803744B4 00371414 7C 7F 1B 78 */ mr r31, r3 +lbl_803744B8: +/* 803744B8 00371418 80 7E 00 0C */ lwz r3, 0xc(r30) +/* 803744BC 0037141C 38 03 00 01 */ addi r0, r3, 1 +/* 803744C0 00371420 28 00 00 01 */ cmplwi r0, 1 +/* 803744C4 00371424 40 81 00 40 */ ble lbl_80374504 +/* 803744C8 00371428 2C 03 00 0A */ cmpwi r3, 0xa +/* 803744CC 0037142C 41 82 00 38 */ beq lbl_80374504 +/* 803744D0 00371430 2C 03 00 03 */ cmpwi r3, 3 +/* 803744D4 00371434 40 82 00 24 */ bne lbl_803744F8 +/* 803744D8 00371438 80 7E 00 08 */ lwz r3, 8(r30) +/* 803744DC 0037143C 38 03 FF FC */ addi r0, r3, -4 +/* 803744E0 00371440 28 00 00 01 */ cmplwi r0, 1 +/* 803744E4 00371444 40 81 00 20 */ ble lbl_80374504 +/* 803744E8 00371448 28 03 00 0D */ cmplwi r3, 0xd +/* 803744EC 0037144C 41 82 00 18 */ beq lbl_80374504 +/* 803744F0 00371450 28 03 00 0F */ cmplwi r3, 0xf +/* 803744F4 00371454 41 82 00 10 */ beq lbl_80374504 +lbl_803744F8: +/* 803744F8 00371458 38 6D AC 08 */ addi r3, r13, lbl_805A97C8@sda21 +/* 803744FC 0037145C 48 01 0C 11 */ bl OSSleepThread +/* 80374500 00371460 4B FF FF B8 */ b lbl_803744B8 +lbl_80374504: +/* 80374504 00371464 7F E3 FB 78 */ mr r3, r31 +/* 80374508 00371468 48 00 D1 81 */ bl OSRestoreInterrupts +/* 8037450C 0037146C 38 60 00 00 */ li r3, 0 +lbl_80374510: +/* 80374510 00371470 80 01 00 1C */ lwz r0, 0x1c(r1) +/* 80374514 00371474 83 E1 00 14 */ lwz r31, 0x14(r1) +/* 80374518 00371478 83 C1 00 10 */ lwz r30, 0x10(r1) +/* 8037451C 0037147C 38 21 00 18 */ addi r1, r1, 0x18 +/* 80374520 00371480 7C 08 03 A6 */ mtlr r0 +/* 80374524 00371484 4E 80 00 20 */ blr + +.global cbForCancelSync +cbForCancelSync: +/* 80374528 00371488 7C 08 02 A6 */ mflr r0 +/* 8037452C 0037148C 38 6D AC 08 */ addi r3, r13, lbl_805A97C8@sda21 +/* 80374530 00371490 90 01 00 04 */ stw r0, 4(r1) +/* 80374534 00371494 94 21 FF F8 */ stwu r1, -8(r1) +/* 80374538 00371498 48 01 0C C1 */ bl OSWakeupThread +/* 8037453C 0037149C 80 01 00 0C */ lwz r0, 0xc(r1) +/* 80374540 003714A0 38 21 00 08 */ addi r1, r1, 8 +/* 80374544 003714A4 7C 08 03 A6 */ mtlr r0 +/* 80374548 003714A8 4E 80 00 20 */ blr + +.global sub_8037454c +sub_8037454c: +/* 8037454C 003714AC 7C 08 02 A6 */ mflr r0 +/* 80374550 003714B0 90 01 00 04 */ stw r0, 4(r1) +/* 80374554 003714B4 94 21 FF E0 */ stwu r1, -0x20(r1) +/* 80374558 003714B8 93 E1 00 1C */ stw r31, 0x1c(r1) +/* 8037455C 003714BC 93 C1 00 18 */ stw r30, 0x18(r1) +/* 80374560 003714C0 93 A1 00 14 */ stw r29, 0x14(r1) +/* 80374564 003714C4 93 81 00 10 */ stw r28, 0x10(r1) +/* 80374568 003714C8 48 00 D0 F9 */ bl OSDisableInterrupts +/* 8037456C 003714CC 38 00 00 00 */ li r0, 0 +/* 80374570 003714D0 90 0D AC 4C */ stw r0, lbl_805A980C@sda21(r13) +/* 80374574 003714D4 7C 7F 1B 78 */ mr r31, r3 +/* 80374578 003714D8 48 00 D0 E9 */ bl OSDisableInterrupts +/* 8037457C 003714DC 7C 7D 1B 78 */ mr r29, r3 +/* 80374580 003714E0 48 00 D0 E1 */ bl OSDisableInterrupts +/* 80374584 003714E4 80 0D AC 10 */ lwz r0, lbl_805A97D0@sda21(r13) +/* 80374588 003714E8 38 80 00 01 */ li r4, 1 +/* 8037458C 003714EC 90 8D AC 1C */ stw r4, lbl_805A97DC@sda21(r13) +/* 80374590 003714F0 28 00 00 00 */ cmplwi r0, 0 +/* 80374594 003714F4 40 82 00 08 */ bne lbl_8037459C +/* 80374598 003714F8 90 8D AC 20 */ stw r4, lbl_805A97E0@sda21(r13) +lbl_8037459C: +/* 8037459C 003714FC 48 00 D0 ED */ bl OSRestoreInterrupts +/* 803745A0 00371500 48 00 00 0C */ b lbl_803745AC +lbl_803745A4: +/* 803745A4 00371504 38 80 00 00 */ li r4, 0 +/* 803745A8 00371508 4B FF FC 65 */ bl DVDCancelAsync +lbl_803745AC: +/* 803745AC 0037150C 48 00 03 AD */ bl __DVDPopWaitingQueue +/* 803745B0 00371510 28 03 00 00 */ cmplwi r3, 0 +/* 803745B4 00371514 40 82 FF F0 */ bne lbl_803745A4 +/* 803745B8 00371518 80 6D AC 10 */ lwz r3, lbl_805A97D0@sda21(r13) +/* 803745BC 0037151C 28 03 00 00 */ cmplwi r3, 0 +/* 803745C0 00371520 41 82 00 18 */ beq lbl_803745D8 +/* 803745C4 00371524 3C 80 80 37 */ lis r4, sub_80374684@ha +/* 803745C8 00371528 38 84 46 84 */ addi r4, r4, sub_80374684@l +/* 803745CC 0037152C 4B FF FC 41 */ bl DVDCancelAsync +/* 803745D0 00371530 7C 7E 1B 78 */ mr r30, r3 +/* 803745D4 00371534 48 00 00 20 */ b lbl_803745F4 +lbl_803745D8: +/* 803745D8 00371538 3C 60 80 37 */ lis r3, 0x8037 +/* 803745DC 0037153C 34 03 46 84 */ addic. r0, r3, 0x4684 +/* 803745E0 00371540 3B C0 00 01 */ li r30, 1 +/* 803745E4 00371544 41 82 00 10 */ beq lbl_803745F4 +/* 803745E8 00371548 38 60 00 00 */ li r3, 0 +/* 803745EC 0037154C 38 80 00 00 */ li r4, 0 +/* 803745F0 00371550 48 00 00 95 */ bl sub_80374684 +lbl_803745F4: +/* 803745F4 00371554 48 00 D0 6D */ bl OSDisableInterrupts +/* 803745F8 00371558 38 80 00 00 */ li r4, 0 +/* 803745FC 0037155C 90 8D AC 1C */ stw r4, lbl_805A97DC@sda21(r13) +/* 80374600 00371560 7C 7C 1B 78 */ mr r28, r3 +/* 80374604 00371564 80 0D AC 20 */ lwz r0, lbl_805A97E0@sda21(r13) +/* 80374608 00371568 2C 00 00 00 */ cmpwi r0, 0 +/* 8037460C 0037156C 41 82 00 0C */ beq lbl_80374618 +/* 80374610 00371570 90 8D AC 20 */ stw r4, lbl_805A97E0@sda21(r13) +/* 80374614 00371574 4B FF E5 F1 */ bl stateReady +lbl_80374618: +/* 80374618 00371578 7F 83 E3 78 */ mr r3, r28 +/* 8037461C 0037157C 48 00 D0 6D */ bl OSRestoreInterrupts +/* 80374620 00371580 7F A3 EB 78 */ mr r3, r29 +/* 80374624 00371584 48 00 D0 65 */ bl OSRestoreInterrupts +/* 80374628 00371588 2C 1E 00 00 */ cmpwi r30, 0 +/* 8037462C 0037158C 40 82 00 14 */ bne lbl_80374640 +/* 80374630 00371590 7F E3 FB 78 */ mr r3, r31 +/* 80374634 00371594 48 00 D0 55 */ bl OSRestoreInterrupts +/* 80374638 00371598 38 60 FF FF */ li r3, -1 +/* 8037463C 0037159C 48 00 00 28 */ b lbl_80374664 +lbl_80374640: +/* 80374640 003715A0 80 0D AC 4C */ lwz r0, lbl_805A980C@sda21(r13) +/* 80374644 003715A4 2C 00 00 00 */ cmpwi r0, 0 +/* 80374648 003715A8 40 82 00 10 */ bne lbl_80374658 +/* 8037464C 003715AC 38 6D AC 08 */ addi r3, r13, lbl_805A97C8@sda21 +/* 80374650 003715B0 48 01 0A BD */ bl OSSleepThread +/* 80374654 003715B4 4B FF FF EC */ b lbl_80374640 +lbl_80374658: +/* 80374658 003715B8 7F E3 FB 78 */ mr r3, r31 +/* 8037465C 003715BC 48 00 D0 2D */ bl OSRestoreInterrupts +/* 80374660 003715C0 38 60 00 00 */ li r3, 0 +lbl_80374664: +/* 80374664 003715C4 80 01 00 24 */ lwz r0, 0x24(r1) +/* 80374668 003715C8 83 E1 00 1C */ lwz r31, 0x1c(r1) +/* 8037466C 003715CC 83 C1 00 18 */ lwz r30, 0x18(r1) +/* 80374670 003715D0 83 A1 00 14 */ lwz r29, 0x14(r1) +/* 80374674 003715D4 83 81 00 10 */ lwz r28, 0x10(r1) +/* 80374678 003715D8 38 21 00 20 */ addi r1, r1, 0x20 +/* 8037467C 003715DC 7C 08 03 A6 */ mtlr r0 +/* 80374680 003715E0 4E 80 00 20 */ blr + +.global sub_80374684 +sub_80374684: +/* 80374684 003715E4 7C 08 02 A6 */ mflr r0 +/* 80374688 003715E8 38 6D AC 08 */ addi r3, r13, lbl_805A97C8@sda21 +/* 8037468C 003715EC 90 01 00 04 */ stw r0, 4(r1) +/* 80374690 003715F0 38 00 00 01 */ li r0, 1 +/* 80374694 003715F4 94 21 FF F8 */ stwu r1, -8(r1) +/* 80374698 003715F8 90 0D AC 4C */ stw r0, lbl_805A980C@sda21(r13) +/* 8037469C 003715FC 48 01 0B 5D */ bl OSWakeupThread +/* 803746A0 00371600 80 01 00 0C */ lwz r0, 0xc(r1) +/* 803746A4 00371604 38 21 00 08 */ addi r1, r1, 8 +/* 803746A8 00371608 7C 08 03 A6 */ mtlr r0 +/* 803746AC 0037160C 4E 80 00 20 */ blr + +.global DVDGetCurrentDiskID +DVDGetCurrentDiskID: +/* 803746B0 00371610 3C 60 80 00 */ lis r3, 0x8000 +/* 803746B4 00371614 4E 80 00 20 */ blr + +.global DVDCheckDisk +DVDCheckDisk: +/* 803746B8 00371618 7C 08 02 A6 */ mflr r0 +/* 803746BC 0037161C 90 01 00 04 */ stw r0, 4(r1) +/* 803746C0 00371620 94 21 FF F0 */ stwu r1, -0x10(r1) +/* 803746C4 00371624 93 E1 00 0C */ stw r31, 0xc(r1) +/* 803746C8 00371628 48 00 CF 99 */ bl OSDisableInterrupts +/* 803746CC 0037162C 80 0D AC 28 */ lwz r0, lbl_805A97E8@sda21(r13) +/* 803746D0 00371630 2C 00 00 00 */ cmpwi r0, 0 +/* 803746D4 00371634 41 82 00 0C */ beq lbl_803746E0 +/* 803746D8 00371638 38 80 FF FF */ li r4, -1 +/* 803746DC 0037163C 48 00 00 48 */ b lbl_80374724 +lbl_803746E0: +/* 803746E0 00371640 80 0D AC 20 */ lwz r0, lbl_805A97E0@sda21(r13) +/* 803746E4 00371644 2C 00 00 00 */ cmpwi r0, 0 +/* 803746E8 00371648 41 82 00 0C */ beq lbl_803746F4 +/* 803746EC 0037164C 38 80 00 08 */ li r4, 8 +/* 803746F0 00371650 48 00 00 34 */ b lbl_80374724 +lbl_803746F4: +/* 803746F4 00371654 80 AD AC 10 */ lwz r5, lbl_805A97D0@sda21(r13) +/* 803746F8 00371658 28 05 00 00 */ cmplwi r5, 0 +/* 803746FC 0037165C 40 82 00 0C */ bne lbl_80374708 +/* 80374700 00371660 38 80 00 00 */ li r4, 0 +/* 80374704 00371664 48 00 00 20 */ b lbl_80374724 +lbl_80374708: +/* 80374708 00371668 3C 80 80 54 */ lis r4, lbl_80540BA0@ha +/* 8037470C 0037166C 38 04 0B A0 */ addi r0, r4, lbl_80540BA0@l +/* 80374710 00371670 7C 05 00 40 */ cmplw r5, r0 +/* 80374714 00371674 40 82 00 0C */ bne lbl_80374720 +/* 80374718 00371678 38 80 00 00 */ li r4, 0 +/* 8037471C 0037167C 48 00 00 08 */ b lbl_80374724 +lbl_80374720: +/* 80374720 00371680 80 85 00 0C */ lwz r4, 0xc(r5) +lbl_80374724: +/* 80374724 00371684 38 04 00 01 */ addi r0, r4, 1 +/* 80374728 00371688 28 00 00 0C */ cmplwi r0, 0xc +/* 8037472C 0037168C 41 81 00 54 */ bgt lbl_80374780 +/* 80374730 00371690 3C 80 80 3F */ lis r4, lbl_803F00CC@ha +/* 80374734 00371694 38 84 00 CC */ addi r4, r4, lbl_803F00CC@l +/* 80374738 00371698 54 00 10 3A */ slwi r0, r0, 2 +/* 8037473C 0037169C 7C 04 00 2E */ lwzx r0, r4, r0 +/* 80374740 003716A0 7C 09 03 A6 */ mtctr r0 +/* 80374744 003716A4 4E 80 04 20 */ bctr +/* 80374748 003716A8 3B E0 00 01 */ li r31, 1 +/* 8037474C 003716AC 48 00 00 34 */ b lbl_80374780 +/* 80374750 003716B0 3B E0 00 00 */ li r31, 0 +/* 80374754 003716B4 48 00 00 2C */ b lbl_80374780 +/* 80374758 003716B8 3C 80 CC 00 */ lis r4, 0xCC006000@ha +/* 8037475C 003716BC 38 84 60 00 */ addi r4, r4, 0xCC006000@l +/* 80374760 003716C0 80 84 00 04 */ lwz r4, 4(r4) +/* 80374764 003716C4 54 80 F7 FF */ rlwinm. r0, r4, 0x1e, 0x1f, 0x1f +/* 80374768 003716C8 40 82 00 0C */ bne lbl_80374774 +/* 8037476C 003716CC 54 80 07 FF */ clrlwi. r0, r4, 0x1f +/* 80374770 003716D0 41 82 00 0C */ beq lbl_8037477C +lbl_80374774: +/* 80374774 003716D4 3B E0 00 00 */ li r31, 0 +/* 80374778 003716D8 48 00 00 08 */ b lbl_80374780 +lbl_8037477C: +/* 8037477C 003716DC 3B E0 00 01 */ li r31, 1 +lbl_80374780: +/* 80374780 003716E0 48 00 CF 09 */ bl OSRestoreInterrupts +/* 80374784 003716E4 7F E3 FB 78 */ mr r3, r31 +/* 80374788 003716E8 80 01 00 14 */ lwz r0, 0x14(r1) +/* 8037478C 003716EC 83 E1 00 0C */ lwz r31, 0xc(r1) +/* 80374790 003716F0 38 21 00 10 */ addi r1, r1, 0x10 +/* 80374794 003716F4 7C 08 03 A6 */ mtlr r0 +/* 80374798 003716F8 4E 80 00 20 */ blr + +.global __DVDPrepareResetAsync +__DVDPrepareResetAsync: +/* 8037479C 003716FC 7C 08 02 A6 */ mflr r0 +/* 803747A0 00371700 90 01 00 04 */ stw r0, 4(r1) +/* 803747A4 00371704 94 21 FF E0 */ stwu r1, -0x20(r1) +/* 803747A8 00371708 93 E1 00 1C */ stw r31, 0x1c(r1) +/* 803747AC 0037170C 93 C1 00 18 */ stw r30, 0x18(r1) +/* 803747B0 00371710 7C 7E 1B 78 */ mr r30, r3 +/* 803747B4 00371714 93 A1 00 14 */ stw r29, 0x14(r1) +/* 803747B8 00371718 48 00 CE A9 */ bl OSDisableInterrupts +/* 803747BC 0037171C 7C 7D 1B 78 */ mr r29, r3 +/* 803747C0 00371720 48 00 00 F9 */ bl __DVDClearWaitingQueue +/* 803747C4 00371724 80 0D AC 30 */ lwz r0, lbl_805A97F0@sda21(r13) +/* 803747C8 00371728 28 00 00 00 */ cmplwi r0, 0 +/* 803747CC 0037172C 41 82 00 0C */ beq lbl_803747D8 +/* 803747D0 00371730 93 CD AC 34 */ stw r30, lbl_805A97F4@sda21(r13) +/* 803747D4 00371734 48 00 00 C0 */ b lbl_80374894 +lbl_803747D8: +/* 803747D8 00371738 80 6D AC 10 */ lwz r3, lbl_805A97D0@sda21(r13) +/* 803747DC 0037173C 28 03 00 00 */ cmplwi r3, 0 +/* 803747E0 00371740 41 82 00 0C */ beq lbl_803747EC +/* 803747E4 00371744 38 00 00 00 */ li r0, 0 +/* 803747E8 00371748 90 03 00 28 */ stw r0, 0x28(r3) +lbl_803747EC: +/* 803747EC 0037174C 48 00 CE 75 */ bl OSDisableInterrupts +/* 803747F0 00371750 7C 7F 1B 78 */ mr r31, r3 +/* 803747F4 00371754 48 00 CE 6D */ bl OSDisableInterrupts +/* 803747F8 00371758 80 0D AC 10 */ lwz r0, lbl_805A97D0@sda21(r13) +/* 803747FC 0037175C 38 80 00 01 */ li r4, 1 +/* 80374800 00371760 90 8D AC 1C */ stw r4, lbl_805A97DC@sda21(r13) +/* 80374804 00371764 28 00 00 00 */ cmplwi r0, 0 +/* 80374808 00371768 40 82 00 08 */ bne lbl_80374810 +/* 8037480C 0037176C 90 8D AC 20 */ stw r4, lbl_805A97E0@sda21(r13) +lbl_80374810: +/* 80374810 00371770 48 00 CE 79 */ bl OSRestoreInterrupts +/* 80374814 00371774 48 00 00 0C */ b lbl_80374820 +lbl_80374818: +/* 80374818 00371778 38 80 00 00 */ li r4, 0 +/* 8037481C 0037177C 4B FF F9 F1 */ bl DVDCancelAsync +lbl_80374820: +/* 80374820 00371780 48 00 01 39 */ bl __DVDPopWaitingQueue +/* 80374824 00371784 28 03 00 00 */ cmplwi r3, 0 +/* 80374828 00371788 40 82 FF F0 */ bne lbl_80374818 +/* 8037482C 0037178C 80 6D AC 10 */ lwz r3, lbl_805A97D0@sda21(r13) +/* 80374830 00371790 28 03 00 00 */ cmplwi r3, 0 +/* 80374834 00371794 41 82 00 10 */ beq lbl_80374844 +/* 80374838 00371798 7F C4 F3 78 */ mr r4, r30 +/* 8037483C 0037179C 4B FF F9 D1 */ bl DVDCancelAsync +/* 80374840 003717A0 48 00 00 20 */ b lbl_80374860 +lbl_80374844: +/* 80374844 003717A4 28 1E 00 00 */ cmplwi r30, 0 +/* 80374848 003717A8 41 82 00 18 */ beq lbl_80374860 +/* 8037484C 003717AC 39 9E 00 00 */ addi r12, r30, 0 +/* 80374850 003717B0 7D 88 03 A6 */ mtlr r12 +/* 80374854 003717B4 38 60 00 00 */ li r3, 0 +/* 80374858 003717B8 38 80 00 00 */ li r4, 0 +/* 8037485C 003717BC 4E 80 00 21 */ blrl +lbl_80374860: +/* 80374860 003717C0 48 00 CE 01 */ bl OSDisableInterrupts +/* 80374864 003717C4 38 80 00 00 */ li r4, 0 +/* 80374868 003717C8 90 8D AC 1C */ stw r4, lbl_805A97DC@sda21(r13) +/* 8037486C 003717CC 7C 7E 1B 78 */ mr r30, r3 +/* 80374870 003717D0 80 0D AC 20 */ lwz r0, lbl_805A97E0@sda21(r13) +/* 80374874 003717D4 2C 00 00 00 */ cmpwi r0, 0 +/* 80374878 003717D8 41 82 00 0C */ beq lbl_80374884 +/* 8037487C 003717DC 90 8D AC 20 */ stw r4, lbl_805A97E0@sda21(r13) +/* 80374880 003717E0 4B FF E3 85 */ bl stateReady +lbl_80374884: +/* 80374884 003717E4 7F C3 F3 78 */ mr r3, r30 +/* 80374888 003717E8 48 00 CE 01 */ bl OSRestoreInterrupts +/* 8037488C 003717EC 7F E3 FB 78 */ mr r3, r31 +/* 80374890 003717F0 48 00 CD F9 */ bl OSRestoreInterrupts +lbl_80374894: +/* 80374894 003717F4 7F A3 EB 78 */ mr r3, r29 +/* 80374898 003717F8 48 00 CD F1 */ bl OSRestoreInterrupts +/* 8037489C 003717FC 80 01 00 24 */ lwz r0, 0x24(r1) +/* 803748A0 00371800 83 E1 00 1C */ lwz r31, 0x1c(r1) +/* 803748A4 00371804 83 C1 00 18 */ lwz r30, 0x18(r1) +/* 803748A8 00371808 83 A1 00 14 */ lwz r29, 0x14(r1) +/* 803748AC 0037180C 38 21 00 20 */ addi r1, r1, 0x20 +/* 803748B0 00371810 7C 08 03 A6 */ mtlr r0 +/* 803748B4 00371814 4E 80 00 20 */ blr diff --git a/asm/Dolphin/DVD/dvderror.s b/asm/Dolphin/DVD/dvderror.s new file mode 100644 index 00000000..20164861 --- /dev/null +++ b/asm/Dolphin/DVD/dvderror.s @@ -0,0 +1,126 @@ +.include "macros.inc" + +.section .text, "ax" + +.global ErrorCode2Num +ErrorCode2Num: +/* 80374AB0 00371A10 38 00 00 02 */ li r0, 2 +/* 80374AB4 00371A14 3C 80 80 3F */ lis r4, lbl_803F0100@ha +/* 80374AB8 00371A18 7C 09 03 A6 */ mtctr r0 +/* 80374ABC 00371A1C 38 84 01 00 */ addi r4, r4, lbl_803F0100@l +/* 80374AC0 00371A20 38 A0 00 00 */ li r5, 0 +lbl_80374AC4: +/* 80374AC4 00371A24 80 04 00 00 */ lwz r0, 0(r4) +/* 80374AC8 00371A28 7C 03 00 40 */ cmplw r3, r0 +/* 80374ACC 00371A2C 40 82 00 0C */ bne lbl_80374AD8 +/* 80374AD0 00371A30 54 A3 06 3E */ clrlwi r3, r5, 0x18 +/* 80374AD4 00371A34 4E 80 00 20 */ blr +lbl_80374AD8: +/* 80374AD8 00371A38 84 04 00 04 */ lwzu r0, 4(r4) +/* 80374ADC 00371A3C 38 A5 00 01 */ addi r5, r5, 1 +/* 80374AE0 00371A40 7C 03 00 40 */ cmplw r3, r0 +/* 80374AE4 00371A44 40 82 00 0C */ bne lbl_80374AF0 +/* 80374AE8 00371A48 54 A3 06 3E */ clrlwi r3, r5, 0x18 +/* 80374AEC 00371A4C 4E 80 00 20 */ blr +lbl_80374AF0: +/* 80374AF0 00371A50 84 04 00 04 */ lwzu r0, 4(r4) +/* 80374AF4 00371A54 38 A5 00 01 */ addi r5, r5, 1 +/* 80374AF8 00371A58 7C 03 00 40 */ cmplw r3, r0 +/* 80374AFC 00371A5C 40 82 00 0C */ bne lbl_80374B08 +/* 80374B00 00371A60 54 A3 06 3E */ clrlwi r3, r5, 0x18 +/* 80374B04 00371A64 4E 80 00 20 */ blr +lbl_80374B08: +/* 80374B08 00371A68 84 04 00 04 */ lwzu r0, 4(r4) +/* 80374B0C 00371A6C 38 A5 00 01 */ addi r5, r5, 1 +/* 80374B10 00371A70 7C 03 00 40 */ cmplw r3, r0 +/* 80374B14 00371A74 40 82 00 0C */ bne lbl_80374B20 +/* 80374B18 00371A78 54 A3 06 3E */ clrlwi r3, r5, 0x18 +/* 80374B1C 00371A7C 4E 80 00 20 */ blr +lbl_80374B20: +/* 80374B20 00371A80 84 04 00 04 */ lwzu r0, 4(r4) +/* 80374B24 00371A84 38 A5 00 01 */ addi r5, r5, 1 +/* 80374B28 00371A88 7C 03 00 40 */ cmplw r3, r0 +/* 80374B2C 00371A8C 40 82 00 0C */ bne lbl_80374B38 +/* 80374B30 00371A90 54 A3 06 3E */ clrlwi r3, r5, 0x18 +/* 80374B34 00371A94 4E 80 00 20 */ blr +lbl_80374B38: +/* 80374B38 00371A98 84 04 00 04 */ lwzu r0, 4(r4) +/* 80374B3C 00371A9C 38 A5 00 01 */ addi r5, r5, 1 +/* 80374B40 00371AA0 7C 03 00 40 */ cmplw r3, r0 +/* 80374B44 00371AA4 40 82 00 0C */ bne lbl_80374B50 +/* 80374B48 00371AA8 54 A3 06 3E */ clrlwi r3, r5, 0x18 +/* 80374B4C 00371AAC 4E 80 00 20 */ blr +lbl_80374B50: +/* 80374B50 00371AB0 84 04 00 04 */ lwzu r0, 4(r4) +/* 80374B54 00371AB4 38 A5 00 01 */ addi r5, r5, 1 +/* 80374B58 00371AB8 7C 03 00 40 */ cmplw r3, r0 +/* 80374B5C 00371ABC 40 82 00 0C */ bne lbl_80374B68 +/* 80374B60 00371AC0 54 A3 06 3E */ clrlwi r3, r5, 0x18 +/* 80374B64 00371AC4 4E 80 00 20 */ blr +lbl_80374B68: +/* 80374B68 00371AC8 84 04 00 04 */ lwzu r0, 4(r4) +/* 80374B6C 00371ACC 38 A5 00 01 */ addi r5, r5, 1 +/* 80374B70 00371AD0 7C 03 00 40 */ cmplw r3, r0 +/* 80374B74 00371AD4 40 82 00 0C */ bne lbl_80374B80 +/* 80374B78 00371AD8 54 A3 06 3E */ clrlwi r3, r5, 0x18 +/* 80374B7C 00371ADC 4E 80 00 20 */ blr +lbl_80374B80: +/* 80374B80 00371AE0 84 04 00 04 */ lwzu r0, 4(r4) +/* 80374B84 00371AE4 38 A5 00 01 */ addi r5, r5, 1 +/* 80374B88 00371AE8 7C 03 00 40 */ cmplw r3, r0 +/* 80374B8C 00371AEC 40 82 00 0C */ bne lbl_80374B98 +/* 80374B90 00371AF0 54 A3 06 3E */ clrlwi r3, r5, 0x18 +/* 80374B94 00371AF4 4E 80 00 20 */ blr +lbl_80374B98: +/* 80374B98 00371AF8 38 84 00 04 */ addi r4, r4, 4 +/* 80374B9C 00371AFC 38 A5 00 01 */ addi r5, r5, 1 +/* 80374BA0 00371B00 42 00 FF 24 */ bdnz lbl_80374AC4 +/* 80374BA4 00371B04 3C 80 00 10 */ lis r4, 0x10 +/* 80374BA8 00371B08 7C 03 20 40 */ cmplw r3, r4 +/* 80374BAC 00371B0C 41 80 00 18 */ blt lbl_80374BC4 +/* 80374BB0 00371B10 38 04 00 08 */ addi r0, r4, 8 +/* 80374BB4 00371B14 7C 03 00 40 */ cmplw r3, r0 +/* 80374BB8 00371B18 41 81 00 0C */ bgt lbl_80374BC4 +/* 80374BBC 00371B1C 38 60 00 11 */ li r3, 0x11 +/* 80374BC0 00371B20 4E 80 00 20 */ blr +lbl_80374BC4: +/* 80374BC4 00371B24 38 60 00 1D */ li r3, 0x1d +/* 80374BC8 00371B28 4E 80 00 20 */ blr + +.global __DVDStoreErrorCode +__DVDStoreErrorCode: +/* 80374BCC 00371B2C 7C 08 02 A6 */ mflr r0 +/* 80374BD0 00371B30 90 01 00 04 */ stw r0, 4(r1) +/* 80374BD4 00371B34 3C 03 FE DD */ addis r0, r3, 0xfedd +/* 80374BD8 00371B38 28 00 45 67 */ cmplwi r0, 0x4567 +/* 80374BDC 00371B3C 94 21 FF E8 */ stwu r1, -0x18(r1) +/* 80374BE0 00371B40 93 E1 00 14 */ stw r31, 0x14(r1) +/* 80374BE4 00371B44 40 82 00 0C */ bne lbl_80374BF0 +/* 80374BE8 00371B48 3B E0 00 FF */ li r31, 0xff +/* 80374BEC 00371B4C 48 00 00 38 */ b lbl_80374C24 +lbl_80374BF0: +/* 80374BF0 00371B50 28 00 45 68 */ cmplwi r0, 0x4568 +/* 80374BF4 00371B54 40 82 00 0C */ bne lbl_80374C00 +/* 80374BF8 00371B58 3B E0 00 FE */ li r31, 0xfe +/* 80374BFC 00371B5C 48 00 00 28 */ b lbl_80374C24 +lbl_80374C00: +/* 80374C00 00371B60 54 7F 46 3E */ srwi r31, r3, 0x18 +/* 80374C04 00371B64 54 63 02 3E */ clrlwi r3, r3, 8 +/* 80374C08 00371B68 4B FF FE A9 */ bl ErrorCode2Num +/* 80374C0C 00371B6C 28 1F 00 06 */ cmplwi r31, 6 +/* 80374C10 00371B70 41 80 00 08 */ blt lbl_80374C18 +/* 80374C14 00371B74 3B E0 00 06 */ li r31, 6 +lbl_80374C18: +/* 80374C18 00371B78 1C 1F 00 1E */ mulli r0, r31, 0x1e +/* 80374C1C 00371B7C 54 63 06 3E */ clrlwi r3, r3, 0x18 +/* 80374C20 00371B80 7F E3 02 14 */ add r31, r3, r0 +lbl_80374C24: +/* 80374C24 00371B84 48 00 EF 0D */ bl __OSLockSramEx +/* 80374C28 00371B88 9B E3 00 24 */ stb r31, 0x24(r3) +/* 80374C2C 00371B8C 38 60 00 01 */ li r3, 1 +/* 80374C30 00371B90 48 00 F2 89 */ bl __OSUnlockSramEx +/* 80374C34 00371B94 80 01 00 1C */ lwz r0, 0x1c(r1) +/* 80374C38 00371B98 83 E1 00 14 */ lwz r31, 0x14(r1) +/* 80374C3C 00371B9C 38 21 00 18 */ addi r1, r1, 0x18 +/* 80374C40 00371BA0 7C 08 03 A6 */ mtlr r0 +/* 80374C44 00371BA4 4E 80 00 20 */ blr diff --git a/asm/Dolphin/DVD/dvdfatal.s b/asm/Dolphin/DVD/dvdfatal.s new file mode 100644 index 00000000..78aba828 --- /dev/null +++ b/asm/Dolphin/DVD/dvdfatal.s @@ -0,0 +1,95 @@ +.include "macros.inc" + +.section .text, "ax" + +.global ShowMessage +ShowMessage: +/* 80374D40 00371CA0 7C 08 02 A6 */ mflr r0 +/* 80374D44 00371CA4 90 01 00 04 */ stw r0, 4(r1) +/* 80374D48 00371CA8 94 21 FF E8 */ stwu r1, -0x18(r1) +/* 80374D4C 00371CAC 80 62 CE 00 */ lwz r3, lbl_805AEB20@sda21(r2) +/* 80374D50 00371CB0 80 02 CE 04 */ lwz r0, lbl_805AEB24@sda21(r2) +/* 80374D54 00371CB4 90 61 00 14 */ stw r3, 0x14(r1) +/* 80374D58 00371CB8 90 01 00 10 */ stw r0, 0x10(r1) +/* 80374D5C 00371CBC 48 01 47 7D */ bl VIGetTvFormat +/* 80374D60 00371CC0 28 03 00 00 */ cmplwi r3, 0 +/* 80374D64 00371CC4 40 82 00 24 */ bne lbl_80374D88 +/* 80374D68 00371CC8 48 00 C1 DD */ bl OSGetFontEncode +/* 80374D6C 00371CCC 54 60 04 3E */ clrlwi r0, r3, 0x10 +/* 80374D70 00371CD0 28 00 00 01 */ cmplwi r0, 1 +/* 80374D74 00371CD4 40 82 00 0C */ bne lbl_80374D80 +/* 80374D78 00371CD8 80 AD 9E F0 */ lwz r5, lbl_805A8AB0@sda21(r13) +/* 80374D7C 00371CDC 48 00 00 24 */ b lbl_80374DA0 +lbl_80374D80: +/* 80374D80 00371CE0 80 AD 9E F4 */ lwz r5, lbl_805A8AB4@sda21(r13) +/* 80374D84 00371CE4 48 00 00 1C */ b lbl_80374DA0 +lbl_80374D88: +/* 80374D88 00371CE8 48 00 F4 C1 */ bl OSGetLanguage +/* 80374D8C 00371CEC 3C 80 80 3E */ lis r4, lbl_803D8570@ha +/* 80374D90 00371CF0 54 63 15 BA */ rlwinm r3, r3, 2, 0x16, 0x1d +/* 80374D94 00371CF4 38 04 85 70 */ addi r0, r4, lbl_803D8570@l +/* 80374D98 00371CF8 7C 60 1A 14 */ add r3, r0, r3 +/* 80374D9C 00371CFC 80 A3 00 00 */ lwz r5, 0(r3) +lbl_80374DA0: +/* 80374DA0 00371D00 80 C1 00 14 */ lwz r6, 0x14(r1) +/* 80374DA4 00371D04 38 81 00 08 */ addi r4, r1, 8 +/* 80374DA8 00371D08 80 01 00 10 */ lwz r0, 0x10(r1) +/* 80374DAC 00371D0C 38 61 00 0C */ addi r3, r1, 0xc +/* 80374DB0 00371D10 90 C1 00 08 */ stw r6, 8(r1) +/* 80374DB4 00371D14 90 01 00 0C */ stw r0, 0xc(r1) +/* 80374DB8 00371D18 48 00 B7 79 */ bl OSFatal +/* 80374DBC 00371D1C 80 01 00 1C */ lwz r0, 0x1c(r1) +/* 80374DC0 00371D20 38 21 00 18 */ addi r1, r1, 0x18 +/* 80374DC4 00371D24 7C 08 03 A6 */ mtlr r0 +/* 80374DC8 00371D28 4E 80 00 20 */ blr + +.global DVDSetAutoFatalMessaging +DVDSetAutoFatalMessaging: +/* 80374DCC 00371D2C 7C 08 02 A6 */ mflr r0 +/* 80374DD0 00371D30 90 01 00 04 */ stw r0, 4(r1) +/* 80374DD4 00371D34 94 21 FF E8 */ stwu r1, -0x18(r1) +/* 80374DD8 00371D38 93 E1 00 14 */ stw r31, 0x14(r1) +/* 80374DDC 00371D3C 93 C1 00 10 */ stw r30, 0x10(r1) +/* 80374DE0 00371D40 7C 7E 1B 78 */ mr r30, r3 +/* 80374DE4 00371D44 48 00 C8 7D */ bl OSDisableInterrupts +/* 80374DE8 00371D48 80 0D AC 60 */ lwz r0, lbl_805A9820@sda21(r13) +/* 80374DEC 00371D4C 28 00 00 00 */ cmplwi r0, 0 +/* 80374DF0 00371D50 41 82 00 0C */ beq lbl_80374DFC +/* 80374DF4 00371D54 3B E0 00 01 */ li r31, 1 +/* 80374DF8 00371D58 48 00 00 08 */ b lbl_80374E00 +lbl_80374DFC: +/* 80374DFC 00371D5C 3B E0 00 00 */ li r31, 0 +lbl_80374E00: +/* 80374E00 00371D60 2C 1E 00 00 */ cmpwi r30, 0 +/* 80374E04 00371D64 41 82 00 10 */ beq lbl_80374E14 +/* 80374E08 00371D68 3C 80 80 37 */ lis r4, ShowMessage@ha +/* 80374E0C 00371D6C 38 04 4D 40 */ addi r0, r4, ShowMessage@l +/* 80374E10 00371D70 48 00 00 08 */ b lbl_80374E18 +lbl_80374E14: +/* 80374E14 00371D74 38 00 00 00 */ li r0, 0 +lbl_80374E18: +/* 80374E18 00371D78 90 0D AC 60 */ stw r0, lbl_805A9820@sda21(r13) +/* 80374E1C 00371D7C 48 00 C8 6D */ bl OSRestoreInterrupts +/* 80374E20 00371D80 7F E3 FB 78 */ mr r3, r31 +/* 80374E24 00371D84 80 01 00 1C */ lwz r0, 0x1c(r1) +/* 80374E28 00371D88 83 E1 00 14 */ lwz r31, 0x14(r1) +/* 80374E2C 00371D8C 83 C1 00 10 */ lwz r30, 0x10(r1) +/* 80374E30 00371D90 38 21 00 18 */ addi r1, r1, 0x18 +/* 80374E34 00371D94 7C 08 03 A6 */ mtlr r0 +/* 80374E38 00371D98 4E 80 00 20 */ blr + +.global __DVDPrintFatalMessage +__DVDPrintFatalMessage: +/* 80374E3C 00371D9C 7C 08 02 A6 */ mflr r0 +/* 80374E40 00371DA0 90 01 00 04 */ stw r0, 4(r1) +/* 80374E44 00371DA4 94 21 FF F8 */ stwu r1, -8(r1) +/* 80374E48 00371DA8 81 8D AC 60 */ lwz r12, lbl_805A9820@sda21(r13) +/* 80374E4C 00371DAC 28 0C 00 00 */ cmplwi r12, 0 +/* 80374E50 00371DB0 41 82 00 0C */ beq lbl_80374E5C +/* 80374E54 00371DB4 7D 88 03 A6 */ mtlr r12 +/* 80374E58 00371DB8 4E 80 00 21 */ blrl +lbl_80374E5C: +/* 80374E5C 00371DBC 80 01 00 0C */ lwz r0, 0xc(r1) +/* 80374E60 00371DC0 38 21 00 08 */ addi r1, r1, 8 +/* 80374E64 00371DC4 7C 08 03 A6 */ mtlr r0 +/* 80374E68 00371DC8 4E 80 00 20 */ blr diff --git a/asm/Dolphin/DVD/dvdfs.s b/asm/Dolphin/DVD/dvdfs.s new file mode 100644 index 00000000..dd2e8fc0 --- /dev/null +++ b/asm/Dolphin/DVD/dvdfs.s @@ -0,0 +1,677 @@ +.include "macros.inc" + +.section .text, "ax" + +.global __DVDFSInit +__DVDFSInit: +/* 803712E4 0036E244 3C 60 80 00 */ lis r3, 0x80000038@ha +/* 803712E8 0036E248 90 6D AB F0 */ stw r3, lbl_805A97B0@sda21(r13) +/* 803712EC 0036E24C 80 03 00 38 */ lwz r0, 0x80000038@l(r3) +/* 803712F0 0036E250 90 0D AB F4 */ stw r0, lbl_805A97B4@sda21(r13) +/* 803712F4 0036E254 80 6D AB F4 */ lwz r3, lbl_805A97B4@sda21(r13) +/* 803712F8 0036E258 28 03 00 00 */ cmplwi r3, 0 +/* 803712FC 0036E25C 4D 82 00 20 */ beqlr +/* 80371300 0036E260 80 03 00 08 */ lwz r0, 8(r3) +/* 80371304 0036E264 90 0D AB FC */ stw r0, lbl_805A97BC@sda21(r13) +/* 80371308 0036E268 80 0D AB FC */ lwz r0, lbl_805A97BC@sda21(r13) +/* 8037130C 0036E26C 1C 00 00 0C */ mulli r0, r0, 0xc +/* 80371310 0036E270 7C 03 02 14 */ add r0, r3, r0 +/* 80371314 0036E274 90 0D AB F8 */ stw r0, lbl_805A97B8@sda21(r13) +/* 80371318 0036E278 4E 80 00 20 */ blr + +.global DVDConvertPathToEntrynum +DVDConvertPathToEntrynum: +/* 8037131C 0036E27C 7C 08 02 A6 */ mflr r0 +/* 80371320 0036E280 90 01 00 04 */ stw r0, 4(r1) +/* 80371324 0036E284 94 21 FF B8 */ stwu r1, -0x48(r1) +/* 80371328 0036E288 BE 81 00 18 */ stmw r20, 0x18(r1) +/* 8037132C 0036E28C 7C 77 1B 78 */ mr r23, r3 +/* 80371330 0036E290 3C 60 80 3F */ lis r3, lbl_803EFB90@ha +/* 80371334 0036E294 3B 37 00 00 */ addi r25, r23, 0 +/* 80371338 0036E298 3B E3 FB 90 */ addi r31, r3, lbl_803EFB90@l +/* 8037133C 0036E29C 83 4D AC 00 */ lwz r26, lbl_805A97C0@sda21(r13) +lbl_80371340: +/* 80371340 0036E2A0 88 77 00 00 */ lbz r3, 0(r23) +/* 80371344 0036E2A4 7C 60 07 75 */ extsb. r0, r3 +/* 80371348 0036E2A8 40 82 00 0C */ bne lbl_80371354 +/* 8037134C 0036E2AC 7F 43 D3 78 */ mr r3, r26 +/* 80371350 0036E2B0 48 00 02 AC */ b lbl_803715FC +lbl_80371354: +/* 80371354 0036E2B4 7C 60 07 74 */ extsb r0, r3 +/* 80371358 0036E2B8 2C 00 00 2F */ cmpwi r0, 0x2f +/* 8037135C 0036E2BC 40 82 00 10 */ bne lbl_8037136C +/* 80371360 0036E2C0 3B 40 00 00 */ li r26, 0 +/* 80371364 0036E2C4 3A F7 00 01 */ addi r23, r23, 1 +/* 80371368 0036E2C8 4B FF FF D8 */ b lbl_80371340 +lbl_8037136C: +/* 8037136C 0036E2CC 2C 00 00 2E */ cmpwi r0, 0x2e +/* 80371370 0036E2D0 40 82 00 74 */ bne lbl_803713E4 +/* 80371374 0036E2D4 88 77 00 01 */ lbz r3, 1(r23) +/* 80371378 0036E2D8 7C 60 07 74 */ extsb r0, r3 +/* 8037137C 0036E2DC 2C 00 00 2E */ cmpwi r0, 0x2e +/* 80371380 0036E2E0 40 82 00 44 */ bne lbl_803713C4 +/* 80371384 0036E2E4 88 77 00 02 */ lbz r3, 2(r23) +/* 80371388 0036E2E8 2C 03 00 2F */ cmpwi r3, 0x2f +/* 8037138C 0036E2EC 40 82 00 1C */ bne lbl_803713A8 +/* 80371390 0036E2F0 1C 7A 00 0C */ mulli r3, r26, 0xc +/* 80371394 0036E2F4 80 8D AB F4 */ lwz r4, lbl_805A97B4@sda21(r13) +/* 80371398 0036E2F8 38 03 00 04 */ addi r0, r3, 4 +/* 8037139C 0036E2FC 7F 44 00 2E */ lwzx r26, r4, r0 +/* 803713A0 0036E300 3A F7 00 03 */ addi r23, r23, 3 +/* 803713A4 0036E304 4B FF FF 9C */ b lbl_80371340 +lbl_803713A8: +/* 803713A8 0036E308 7C 60 07 75 */ extsb. r0, r3 +/* 803713AC 0036E30C 40 82 00 38 */ bne lbl_803713E4 +/* 803713B0 0036E310 1C 1A 00 0C */ mulli r0, r26, 0xc +/* 803713B4 0036E314 80 6D AB F4 */ lwz r3, lbl_805A97B4@sda21(r13) +/* 803713B8 0036E318 7C 63 02 14 */ add r3, r3, r0 +/* 803713BC 0036E31C 80 63 00 04 */ lwz r3, 4(r3) +/* 803713C0 0036E320 48 00 02 3C */ b lbl_803715FC +lbl_803713C4: +/* 803713C4 0036E324 2C 00 00 2F */ cmpwi r0, 0x2f +/* 803713C8 0036E328 40 82 00 0C */ bne lbl_803713D4 +/* 803713CC 0036E32C 3A F7 00 02 */ addi r23, r23, 2 +/* 803713D0 0036E330 4B FF FF 70 */ b lbl_80371340 +lbl_803713D4: +/* 803713D4 0036E334 7C 60 07 75 */ extsb. r0, r3 +/* 803713D8 0036E338 40 82 00 0C */ bne lbl_803713E4 +/* 803713DC 0036E33C 7F 43 D3 78 */ mr r3, r26 +/* 803713E0 0036E340 48 00 02 1C */ b lbl_803715FC +lbl_803713E4: +/* 803713E4 0036E344 80 0D AC 04 */ lwz r0, lbl_805A97C4@sda21(r13) +/* 803713E8 0036E348 28 00 00 00 */ cmplwi r0, 0 +/* 803713EC 0036E34C 40 82 00 AC */ bne lbl_80371498 +/* 803713F0 0036E350 3B 97 00 00 */ addi r28, r23, 0 +/* 803713F4 0036E354 38 A0 00 00 */ li r5, 0 +/* 803713F8 0036E358 38 80 00 00 */ li r4, 0 +/* 803713FC 0036E35C 48 00 00 48 */ b lbl_80371444 +lbl_80371400: +/* 80371400 0036E360 7C 60 07 74 */ extsb r0, r3 +/* 80371404 0036E364 2C 00 00 2E */ cmpwi r0, 0x2e +/* 80371408 0036E368 40 82 00 2C */ bne lbl_80371434 +/* 8037140C 0036E36C 7C 17 E0 50 */ subf r0, r23, r28 +/* 80371410 0036E370 2C 00 00 08 */ cmpwi r0, 8 +/* 80371414 0036E374 41 81 00 0C */ bgt lbl_80371420 +/* 80371418 0036E378 2C 05 00 01 */ cmpwi r5, 1 +/* 8037141C 0036E37C 40 82 00 0C */ bne lbl_80371428 +lbl_80371420: +/* 80371420 0036E380 38 80 00 01 */ li r4, 1 +/* 80371424 0036E384 48 00 00 38 */ b lbl_8037145C +lbl_80371428: +/* 80371428 0036E388 3B 1C 00 01 */ addi r24, r28, 1 +/* 8037142C 0036E38C 38 A0 00 01 */ li r5, 1 +/* 80371430 0036E390 48 00 00 10 */ b lbl_80371440 +lbl_80371434: +/* 80371434 0036E394 2C 00 00 20 */ cmpwi r0, 0x20 +/* 80371438 0036E398 40 82 00 08 */ bne lbl_80371440 +/* 8037143C 0036E39C 38 80 00 01 */ li r4, 1 +lbl_80371440: +/* 80371440 0036E3A0 3B 9C 00 01 */ addi r28, r28, 1 +lbl_80371444: +/* 80371444 0036E3A4 88 7C 00 00 */ lbz r3, 0(r28) +/* 80371448 0036E3A8 7C 60 07 75 */ extsb. r0, r3 +/* 8037144C 0036E3AC 41 82 00 10 */ beq lbl_8037145C +/* 80371450 0036E3B0 7C 60 07 74 */ extsb r0, r3 +/* 80371454 0036E3B4 2C 00 00 2F */ cmpwi r0, 0x2f +/* 80371458 0036E3B8 40 82 FF A8 */ bne lbl_80371400 +lbl_8037145C: +/* 8037145C 0036E3BC 2C 05 00 01 */ cmpwi r5, 1 +/* 80371460 0036E3C0 40 82 00 14 */ bne lbl_80371474 +/* 80371464 0036E3C4 7C 18 E0 50 */ subf r0, r24, r28 +/* 80371468 0036E3C8 2C 00 00 03 */ cmpwi r0, 3 +/* 8037146C 0036E3CC 40 81 00 08 */ ble lbl_80371474 +/* 80371470 0036E3D0 38 80 00 01 */ li r4, 1 +lbl_80371474: +/* 80371474 0036E3D4 2C 04 00 00 */ cmpwi r4, 0 +/* 80371478 0036E3D8 41 82 00 44 */ beq lbl_803714BC +/* 8037147C 0036E3DC 38 BF 00 00 */ addi r5, r31, 0 +/* 80371480 0036E3E0 4C C6 31 82 */ crclr 6 +/* 80371484 0036E3E4 38 D9 00 00 */ addi r6, r25, 0 +/* 80371488 0036E3E8 38 6D 9E D0 */ addi r3, r13, lbl_805A8A90@sda21 +/* 8037148C 0036E3EC 38 80 01 7B */ li r4, 0x17b +/* 80371490 0036E3F0 48 00 E5 9D */ bl OSPanic +/* 80371494 0036E3F4 48 00 00 28 */ b lbl_803714BC +lbl_80371498: +/* 80371498 0036E3F8 7E FC BB 78 */ mr r28, r23 +/* 8037149C 0036E3FC 48 00 00 08 */ b lbl_803714A4 +lbl_803714A0: +/* 803714A0 0036E400 3B 9C 00 01 */ addi r28, r28, 1 +lbl_803714A4: +/* 803714A4 0036E404 88 7C 00 00 */ lbz r3, 0(r28) +/* 803714A8 0036E408 7C 60 07 75 */ extsb. r0, r3 +/* 803714AC 0036E40C 41 82 00 10 */ beq lbl_803714BC +/* 803714B0 0036E410 7C 60 07 74 */ extsb r0, r3 +/* 803714B4 0036E414 2C 00 00 2F */ cmpwi r0, 0x2f +/* 803714B8 0036E418 40 82 FF E8 */ bne lbl_803714A0 +lbl_803714BC: +/* 803714BC 0036E41C 88 1C 00 00 */ lbz r0, 0(r28) +/* 803714C0 0036E420 7C 00 07 75 */ extsb. r0, r0 +/* 803714C4 0036E424 40 82 00 0C */ bne lbl_803714D0 +/* 803714C8 0036E428 3B C0 00 00 */ li r30, 0 +/* 803714CC 0036E42C 48 00 00 08 */ b lbl_803714D4 +lbl_803714D0: +/* 803714D0 0036E430 3B C0 00 01 */ li r30, 1 +lbl_803714D4: +/* 803714D4 0036E434 1F BA 00 0C */ mulli r29, r26, 0xc +/* 803714D8 0036E438 7F 77 E0 50 */ subf r27, r23, r28 +/* 803714DC 0036E43C 3B 5A 00 01 */ addi r26, r26, 1 +/* 803714E0 0036E440 48 00 00 E4 */ b lbl_803715C4 +lbl_803714E4: +/* 803714E4 0036E444 1F 9A 00 0C */ mulli r28, r26, 0xc +/* 803714E8 0036E448 7C 83 E0 2E */ lwzx r4, r3, r28 +/* 803714EC 0036E44C 54 80 00 0F */ rlwinm. r0, r4, 0, 0, 7 +/* 803714F0 0036E450 40 82 00 0C */ bne lbl_803714FC +/* 803714F4 0036E454 38 00 00 00 */ li r0, 0 +/* 803714F8 0036E458 48 00 00 08 */ b lbl_80371500 +lbl_803714FC: +/* 803714FC 0036E45C 38 00 00 01 */ li r0, 1 +lbl_80371500: +/* 80371500 0036E460 2C 00 00 00 */ cmpwi r0, 0 +/* 80371504 0036E464 40 82 00 0C */ bne lbl_80371510 +/* 80371508 0036E468 2C 1E 00 01 */ cmpwi r30, 1 +/* 8037150C 0036E46C 41 82 00 80 */ beq lbl_8037158C +lbl_80371510: +/* 80371510 0036E470 80 6D AB F8 */ lwz r3, lbl_805A97B8@sda21(r13) +/* 80371514 0036E474 54 80 02 3E */ clrlwi r0, r4, 8 +/* 80371518 0036E478 3A B7 00 00 */ addi r21, r23, 0 +/* 8037151C 0036E47C 7E 83 02 14 */ add r20, r3, r0 +/* 80371520 0036E480 48 00 00 38 */ b lbl_80371558 +lbl_80371524: +/* 80371524 0036E484 88 14 00 00 */ lbz r0, 0(r20) +/* 80371528 0036E488 3A 94 00 01 */ addi r20, r20, 1 +/* 8037152C 0036E48C 7C 03 07 74 */ extsb r3, r0 +/* 80371530 0036E490 48 01 B9 F5 */ bl tolower +/* 80371534 0036E494 88 15 00 00 */ lbz r0, 0(r21) +/* 80371538 0036E498 3A C3 00 00 */ addi r22, r3, 0 +/* 8037153C 0036E49C 3A B5 00 01 */ addi r21, r21, 1 +/* 80371540 0036E4A0 7C 03 07 74 */ extsb r3, r0 +/* 80371544 0036E4A4 48 01 B9 E1 */ bl tolower +/* 80371548 0036E4A8 7C 03 B0 00 */ cmpw r3, r22 +/* 8037154C 0036E4AC 41 82 00 0C */ beq lbl_80371558 +/* 80371550 0036E4B0 38 00 00 00 */ li r0, 0 +/* 80371554 0036E4B4 48 00 00 30 */ b lbl_80371584 +lbl_80371558: +/* 80371558 0036E4B8 88 14 00 00 */ lbz r0, 0(r20) +/* 8037155C 0036E4BC 7C 00 07 75 */ extsb. r0, r0 +/* 80371560 0036E4C0 40 82 FF C4 */ bne lbl_80371524 +/* 80371564 0036E4C4 88 75 00 00 */ lbz r3, 0(r21) +/* 80371568 0036E4C8 2C 03 00 2F */ cmpwi r3, 0x2f +/* 8037156C 0036E4CC 41 82 00 0C */ beq lbl_80371578 +/* 80371570 0036E4D0 7C 60 07 75 */ extsb. r0, r3 +/* 80371574 0036E4D4 40 82 00 0C */ bne lbl_80371580 +lbl_80371578: +/* 80371578 0036E4D8 38 00 00 01 */ li r0, 1 +/* 8037157C 0036E4DC 48 00 00 08 */ b lbl_80371584 +lbl_80371580: +/* 80371580 0036E4E0 38 00 00 00 */ li r0, 0 +lbl_80371584: +/* 80371584 0036E4E4 2C 00 00 01 */ cmpwi r0, 1 +/* 80371588 0036E4E8 41 82 00 58 */ beq lbl_803715E0 +lbl_8037158C: +/* 8037158C 0036E4EC 80 0D AB F4 */ lwz r0, lbl_805A97B4@sda21(r13) +/* 80371590 0036E4F0 7C 60 E2 14 */ add r3, r0, r28 +/* 80371594 0036E4F4 80 03 00 00 */ lwz r0, 0(r3) +/* 80371598 0036E4F8 54 00 00 0F */ rlwinm. r0, r0, 0, 0, 7 +/* 8037159C 0036E4FC 40 82 00 0C */ bne lbl_803715A8 +/* 803715A0 0036E500 38 00 00 00 */ li r0, 0 +/* 803715A4 0036E504 48 00 00 08 */ b lbl_803715AC +lbl_803715A8: +/* 803715A8 0036E508 38 00 00 01 */ li r0, 1 +lbl_803715AC: +/* 803715AC 0036E50C 2C 00 00 00 */ cmpwi r0, 0 +/* 803715B0 0036E510 41 82 00 0C */ beq lbl_803715BC +/* 803715B4 0036E514 80 03 00 08 */ lwz r0, 8(r3) +/* 803715B8 0036E518 48 00 00 08 */ b lbl_803715C0 +lbl_803715BC: +/* 803715BC 0036E51C 38 1A 00 01 */ addi r0, r26, 1 +lbl_803715C0: +/* 803715C0 0036E520 7C 1A 03 78 */ mr r26, r0 +lbl_803715C4: +/* 803715C4 0036E524 80 6D AB F4 */ lwz r3, lbl_805A97B4@sda21(r13) +/* 803715C8 0036E528 38 03 00 08 */ addi r0, r3, 8 +/* 803715CC 0036E52C 7C 1D 00 2E */ lwzx r0, r29, r0 +/* 803715D0 0036E530 7C 1A 00 40 */ cmplw r26, r0 +/* 803715D4 0036E534 41 80 FF 10 */ blt lbl_803714E4 +/* 803715D8 0036E538 38 60 FF FF */ li r3, -1 +/* 803715DC 0036E53C 48 00 00 20 */ b lbl_803715FC +lbl_803715E0: +/* 803715E0 0036E540 2C 1E 00 00 */ cmpwi r30, 0 +/* 803715E4 0036E544 40 82 00 0C */ bne lbl_803715F0 +/* 803715E8 0036E548 7F 43 D3 78 */ mr r3, r26 +/* 803715EC 0036E54C 48 00 00 10 */ b lbl_803715FC +lbl_803715F0: +/* 803715F0 0036E550 7E FB BA 14 */ add r23, r27, r23 +/* 803715F4 0036E554 3A F7 00 01 */ addi r23, r23, 1 +/* 803715F8 0036E558 4B FF FD 48 */ b lbl_80371340 +lbl_803715FC: +/* 803715FC 0036E55C BA 81 00 18 */ lmw r20, 0x18(r1) +/* 80371600 0036E560 80 01 00 4C */ lwz r0, 0x4c(r1) +/* 80371604 0036E564 38 21 00 48 */ addi r1, r1, 0x48 +/* 80371608 0036E568 7C 08 03 A6 */ mtlr r0 +/* 8037160C 0036E56C 4E 80 00 20 */ blr + +.global DVDFastOpen +DVDFastOpen: +/* 80371610 0036E570 2C 03 00 00 */ cmpwi r3, 0 +/* 80371614 0036E574 41 80 00 38 */ blt lbl_8037164C +/* 80371618 0036E578 80 0D AB FC */ lwz r0, lbl_805A97BC@sda21(r13) +/* 8037161C 0036E57C 7C 03 00 40 */ cmplw r3, r0 +/* 80371620 0036E580 40 80 00 2C */ bge lbl_8037164C +/* 80371624 0036E584 1C C3 00 0C */ mulli r6, r3, 0xc +/* 80371628 0036E588 80 6D AB F4 */ lwz r3, lbl_805A97B4@sda21(r13) +/* 8037162C 0036E58C 7C 03 30 2E */ lwzx r0, r3, r6 +/* 80371630 0036E590 54 00 00 0F */ rlwinm. r0, r0, 0, 0, 7 +/* 80371634 0036E594 40 82 00 0C */ bne lbl_80371640 +/* 80371638 0036E598 38 00 00 00 */ li r0, 0 +/* 8037163C 0036E59C 48 00 00 08 */ b lbl_80371644 +lbl_80371640: +/* 80371640 0036E5A0 38 00 00 01 */ li r0, 1 +lbl_80371644: +/* 80371644 0036E5A4 2C 00 00 00 */ cmpwi r0, 0 +/* 80371648 0036E5A8 41 82 00 0C */ beq lbl_80371654 +lbl_8037164C: +/* 8037164C 0036E5AC 38 60 00 00 */ li r3, 0 +/* 80371650 0036E5B0 4E 80 00 20 */ blr +lbl_80371654: +/* 80371654 0036E5B4 7C 63 32 14 */ add r3, r3, r6 +/* 80371658 0036E5B8 80 A3 00 04 */ lwz r5, 4(r3) +/* 8037165C 0036E5BC 38 00 00 00 */ li r0, 0 +/* 80371660 0036E5C0 38 60 00 01 */ li r3, 1 +/* 80371664 0036E5C4 90 A4 00 30 */ stw r5, 0x30(r4) +/* 80371668 0036E5C8 80 AD AB F4 */ lwz r5, lbl_805A97B4@sda21(r13) +/* 8037166C 0036E5CC 7C A5 32 14 */ add r5, r5, r6 +/* 80371670 0036E5D0 80 A5 00 08 */ lwz r5, 8(r5) +/* 80371674 0036E5D4 90 A4 00 34 */ stw r5, 0x34(r4) +/* 80371678 0036E5D8 90 04 00 38 */ stw r0, 0x38(r4) +/* 8037167C 0036E5DC 90 04 00 0C */ stw r0, 0xc(r4) +/* 80371680 0036E5E0 4E 80 00 20 */ blr + +.global DVDOpen +DVDOpen: +/* 80371684 0036E5E4 7C 08 02 A6 */ mflr r0 +/* 80371688 0036E5E8 90 01 00 04 */ stw r0, 4(r1) +/* 8037168C 0036E5EC 94 21 FF 68 */ stwu r1, -0x98(r1) +/* 80371690 0036E5F0 93 E1 00 94 */ stw r31, 0x94(r1) +/* 80371694 0036E5F4 3B E4 00 00 */ addi r31, r4, 0 +/* 80371698 0036E5F8 93 C1 00 90 */ stw r30, 0x90(r1) +/* 8037169C 0036E5FC 3B C3 00 00 */ addi r30, r3, 0 +/* 803716A0 0036E600 4B FF FC 7D */ bl DVDConvertPathToEntrynum +/* 803716A4 0036E604 2C 03 00 00 */ cmpwi r3, 0 +/* 803716A8 0036E608 40 80 00 30 */ bge lbl_803716D8 +/* 803716AC 0036E60C 38 61 00 10 */ addi r3, r1, 0x10 +/* 803716B0 0036E610 38 80 00 80 */ li r4, 0x80 +/* 803716B4 0036E614 48 00 02 1D */ bl DVDGetCurrentDir +/* 803716B8 0036E618 3C 60 80 3F */ lis r3, lbl_803EFC58@ha +/* 803716BC 0036E61C 4C C6 31 82 */ crclr 6 +/* 803716C0 0036E620 38 63 FC 58 */ addi r3, r3, lbl_803EFC58@l +/* 803716C4 0036E624 38 9E 00 00 */ addi r4, r30, 0 +/* 803716C8 0036E628 38 A1 00 10 */ addi r5, r1, 0x10 +/* 803716CC 0036E62C 48 00 E2 E1 */ bl OSReport +/* 803716D0 0036E630 38 60 00 00 */ li r3, 0 +/* 803716D4 0036E634 48 00 00 60 */ b lbl_80371734 +lbl_803716D8: +/* 803716D8 0036E638 1C A3 00 0C */ mulli r5, r3, 0xc +/* 803716DC 0036E63C 80 6D AB F4 */ lwz r3, lbl_805A97B4@sda21(r13) +/* 803716E0 0036E640 7C 03 28 2E */ lwzx r0, r3, r5 +/* 803716E4 0036E644 54 00 00 0F */ rlwinm. r0, r0, 0, 0, 7 +/* 803716E8 0036E648 40 82 00 0C */ bne lbl_803716F4 +/* 803716EC 0036E64C 38 00 00 00 */ li r0, 0 +/* 803716F0 0036E650 48 00 00 08 */ b lbl_803716F8 +lbl_803716F4: +/* 803716F4 0036E654 38 00 00 01 */ li r0, 1 +lbl_803716F8: +/* 803716F8 0036E658 2C 00 00 00 */ cmpwi r0, 0 +/* 803716FC 0036E65C 41 82 00 0C */ beq lbl_80371708 +/* 80371700 0036E660 38 60 00 00 */ li r3, 0 +/* 80371704 0036E664 48 00 00 30 */ b lbl_80371734 +lbl_80371708: +/* 80371708 0036E668 7C 63 2A 14 */ add r3, r3, r5 +/* 8037170C 0036E66C 80 83 00 04 */ lwz r4, 4(r3) +/* 80371710 0036E670 38 00 00 00 */ li r0, 0 +/* 80371714 0036E674 38 60 00 01 */ li r3, 1 +/* 80371718 0036E678 90 9F 00 30 */ stw r4, 0x30(r31) +/* 8037171C 0036E67C 80 8D AB F4 */ lwz r4, lbl_805A97B4@sda21(r13) +/* 80371720 0036E680 7C 84 2A 14 */ add r4, r4, r5 +/* 80371724 0036E684 80 84 00 08 */ lwz r4, 8(r4) +/* 80371728 0036E688 90 9F 00 34 */ stw r4, 0x34(r31) +/* 8037172C 0036E68C 90 1F 00 38 */ stw r0, 0x38(r31) +/* 80371730 0036E690 90 1F 00 0C */ stw r0, 0xc(r31) +lbl_80371734: +/* 80371734 0036E694 80 01 00 9C */ lwz r0, 0x9c(r1) +/* 80371738 0036E698 83 E1 00 94 */ lwz r31, 0x94(r1) +/* 8037173C 0036E69C 83 C1 00 90 */ lwz r30, 0x90(r1) +/* 80371740 0036E6A0 38 21 00 98 */ addi r1, r1, 0x98 +/* 80371744 0036E6A4 7C 08 03 A6 */ mtlr r0 +/* 80371748 0036E6A8 4E 80 00 20 */ blr + +.global DVDClose +DVDClose: +/* 8037174C 0036E6AC 7C 08 02 A6 */ mflr r0 +/* 80371750 0036E6B0 90 01 00 04 */ stw r0, 4(r1) +/* 80371754 0036E6B4 94 21 FF F8 */ stwu r1, -8(r1) +/* 80371758 0036E6B8 48 00 2D 25 */ bl DVDCancel +/* 8037175C 0036E6BC 38 60 00 01 */ li r3, 1 +/* 80371760 0036E6C0 80 01 00 0C */ lwz r0, 0xc(r1) +/* 80371764 0036E6C4 38 21 00 08 */ addi r1, r1, 8 +/* 80371768 0036E6C8 7C 08 03 A6 */ mtlr r0 +/* 8037176C 0036E6CC 4E 80 00 20 */ blr + +.global entryToPath +entryToPath: +/* 80371770 0036E6D0 7C 08 02 A6 */ mflr r0 +/* 80371774 0036E6D4 28 03 00 00 */ cmplwi r3, 0 +/* 80371778 0036E6D8 90 01 00 04 */ stw r0, 4(r1) +/* 8037177C 0036E6DC 94 21 FF D0 */ stwu r1, -0x30(r1) +/* 80371780 0036E6E0 93 E1 00 2C */ stw r31, 0x2c(r1) +/* 80371784 0036E6E4 93 C1 00 28 */ stw r30, 0x28(r1) +/* 80371788 0036E6E8 3B C5 00 00 */ addi r30, r5, 0 +/* 8037178C 0036E6EC 93 A1 00 24 */ stw r29, 0x24(r1) +/* 80371790 0036E6F0 3B A4 00 00 */ addi r29, r4, 0 +/* 80371794 0036E6F4 93 81 00 20 */ stw r28, 0x20(r1) +/* 80371798 0036E6F8 40 82 00 0C */ bne lbl_803717A4 +/* 8037179C 0036E6FC 38 60 00 00 */ li r3, 0 +/* 803717A0 0036E700 48 00 01 10 */ b lbl_803718B0 +lbl_803717A4: +/* 803717A4 0036E704 80 8D AB F4 */ lwz r4, lbl_805A97B4@sda21(r13) +/* 803717A8 0036E708 1C 63 00 0C */ mulli r3, r3, 0xc +/* 803717AC 0036E70C 80 CD AB F8 */ lwz r6, lbl_805A97B8@sda21(r13) +/* 803717B0 0036E710 38 A4 00 04 */ addi r5, r4, 4 +/* 803717B4 0036E714 7C 04 18 2E */ lwzx r0, r4, r3 +/* 803717B8 0036E718 7C 65 18 2E */ lwzx r3, r5, r3 +/* 803717BC 0036E71C 54 00 02 3E */ clrlwi r0, r0, 8 +/* 803717C0 0036E720 28 03 00 00 */ cmplwi r3, 0 +/* 803717C4 0036E724 7F E6 02 14 */ add r31, r6, r0 +/* 803717C8 0036E728 40 82 00 0C */ bne lbl_803717D4 +/* 803717CC 0036E72C 38 60 00 00 */ li r3, 0 +/* 803717D0 0036E730 48 00 00 80 */ b lbl_80371850 +lbl_803717D4: +/* 803717D4 0036E734 1C 63 00 0C */ mulli r3, r3, 0xc +/* 803717D8 0036E738 7C 04 18 2E */ lwzx r0, r4, r3 +/* 803717DC 0036E73C 7F A4 EB 78 */ mr r4, r29 +/* 803717E0 0036E740 7C 65 18 2E */ lwzx r3, r5, r3 +/* 803717E4 0036E744 38 BE 00 00 */ addi r5, r30, 0 +/* 803717E8 0036E748 54 00 02 3E */ clrlwi r0, r0, 8 +/* 803717EC 0036E74C 7F 86 02 14 */ add r28, r6, r0 +/* 803717F0 0036E750 4B FF FF 81 */ bl entryToPath +/* 803717F4 0036E754 7C 03 F0 40 */ cmplw r3, r30 +/* 803717F8 0036E758 40 82 00 08 */ bne lbl_80371800 +/* 803717FC 0036E75C 48 00 00 54 */ b lbl_80371850 +lbl_80371800: +/* 80371800 0036E760 38 03 00 00 */ addi r0, r3, 0 +/* 80371804 0036E764 38 63 00 01 */ addi r3, r3, 1 +/* 80371808 0036E768 38 80 00 2F */ li r4, 0x2f +/* 8037180C 0036E76C 7C C3 F0 50 */ subf r6, r3, r30 +/* 80371810 0036E770 7C 9D 01 AE */ stbx r4, r29, r0 +/* 80371814 0036E774 38 86 00 00 */ addi r4, r6, 0 +/* 80371818 0036E778 7C BD 1A 14 */ add r5, r29, r3 +/* 8037181C 0036E77C 48 00 00 18 */ b lbl_80371834 +lbl_80371820: +/* 80371820 0036E780 88 1C 00 00 */ lbz r0, 0(r28) +/* 80371824 0036E784 3B 9C 00 01 */ addi r28, r28, 1 +/* 80371828 0036E788 38 84 FF FF */ addi r4, r4, -1 +/* 8037182C 0036E78C 98 05 00 00 */ stb r0, 0(r5) +/* 80371830 0036E790 38 A5 00 01 */ addi r5, r5, 1 +lbl_80371834: +/* 80371834 0036E794 28 04 00 00 */ cmplwi r4, 0 +/* 80371838 0036E798 41 82 00 10 */ beq lbl_80371848 +/* 8037183C 0036E79C 88 1C 00 00 */ lbz r0, 0(r28) +/* 80371840 0036E7A0 7C 00 07 75 */ extsb. r0, r0 +/* 80371844 0036E7A4 40 82 FF DC */ bne lbl_80371820 +lbl_80371848: +/* 80371848 0036E7A8 7C 04 30 50 */ subf r0, r4, r6 +/* 8037184C 0036E7AC 7C 63 02 14 */ add r3, r3, r0 +lbl_80371850: +/* 80371850 0036E7B0 7C 03 F0 40 */ cmplw r3, r30 +/* 80371854 0036E7B4 40 82 00 08 */ bne lbl_8037185C +/* 80371858 0036E7B8 48 00 00 58 */ b lbl_803718B0 +lbl_8037185C: +/* 8037185C 0036E7BC 38 03 00 00 */ addi r0, r3, 0 +/* 80371860 0036E7C0 38 63 00 01 */ addi r3, r3, 1 +/* 80371864 0036E7C4 38 80 00 2F */ li r4, 0x2f +/* 80371868 0036E7C8 7C E3 F0 50 */ subf r7, r3, r30 +/* 8037186C 0036E7CC 7C 9D 01 AE */ stbx r4, r29, r0 +/* 80371870 0036E7D0 38 DF 00 00 */ addi r6, r31, 0 +/* 80371874 0036E7D4 38 87 00 00 */ addi r4, r7, 0 +/* 80371878 0036E7D8 7C BD 1A 14 */ add r5, r29, r3 +/* 8037187C 0036E7DC 48 00 00 18 */ b lbl_80371894 +lbl_80371880: +/* 80371880 0036E7E0 88 06 00 00 */ lbz r0, 0(r6) +/* 80371884 0036E7E4 38 C6 00 01 */ addi r6, r6, 1 +/* 80371888 0036E7E8 38 84 FF FF */ addi r4, r4, -1 +/* 8037188C 0036E7EC 98 05 00 00 */ stb r0, 0(r5) +/* 80371890 0036E7F0 38 A5 00 01 */ addi r5, r5, 1 +lbl_80371894: +/* 80371894 0036E7F4 28 04 00 00 */ cmplwi r4, 0 +/* 80371898 0036E7F8 41 82 00 10 */ beq lbl_803718A8 +/* 8037189C 0036E7FC 88 06 00 00 */ lbz r0, 0(r6) +/* 803718A0 0036E800 7C 00 07 75 */ extsb. r0, r0 +/* 803718A4 0036E804 40 82 FF DC */ bne lbl_80371880 +lbl_803718A8: +/* 803718A8 0036E808 7C 04 38 50 */ subf r0, r4, r7 +/* 803718AC 0036E80C 7C 63 02 14 */ add r3, r3, r0 +lbl_803718B0: +/* 803718B0 0036E810 80 01 00 34 */ lwz r0, 0x34(r1) +/* 803718B4 0036E814 83 E1 00 2C */ lwz r31, 0x2c(r1) +/* 803718B8 0036E818 83 C1 00 28 */ lwz r30, 0x28(r1) +/* 803718BC 0036E81C 83 A1 00 24 */ lwz r29, 0x24(r1) +/* 803718C0 0036E820 83 81 00 20 */ lwz r28, 0x20(r1) +/* 803718C4 0036E824 38 21 00 30 */ addi r1, r1, 0x30 +/* 803718C8 0036E828 7C 08 03 A6 */ mtlr r0 +/* 803718CC 0036E82C 4E 80 00 20 */ blr + +.global DVDGetCurrentDir +DVDGetCurrentDir: +/* 803718D0 0036E830 7C 08 02 A6 */ mflr r0 +/* 803718D4 0036E834 90 01 00 04 */ stw r0, 4(r1) +/* 803718D8 0036E838 94 21 FF E0 */ stwu r1, -0x20(r1) +/* 803718DC 0036E83C 93 E1 00 1C */ stw r31, 0x1c(r1) +/* 803718E0 0036E840 93 C1 00 18 */ stw r30, 0x18(r1) +/* 803718E4 0036E844 3B C4 00 00 */ addi r30, r4, 0 +/* 803718E8 0036E848 38 BE 00 00 */ addi r5, r30, 0 +/* 803718EC 0036E84C 93 A1 00 14 */ stw r29, 0x14(r1) +/* 803718F0 0036E850 3B A3 00 00 */ addi r29, r3, 0 +/* 803718F4 0036E854 38 9D 00 00 */ addi r4, r29, 0 +/* 803718F8 0036E858 83 ED AC 00 */ lwz r31, lbl_805A97C0@sda21(r13) +/* 803718FC 0036E85C 38 7F 00 00 */ addi r3, r31, 0 +/* 80371900 0036E860 4B FF FE 71 */ bl entryToPath +/* 80371904 0036E864 7C 03 F0 40 */ cmplw r3, r30 +/* 80371908 0036E868 40 82 00 14 */ bne lbl_8037191C +/* 8037190C 0036E86C 38 00 00 00 */ li r0, 0 +/* 80371910 0036E870 7C 7D F2 14 */ add r3, r29, r30 +/* 80371914 0036E874 98 03 FF FF */ stb r0, -1(r3) +/* 80371918 0036E878 48 00 00 5C */ b lbl_80371974 +lbl_8037191C: +/* 8037191C 0036E87C 1C 1F 00 0C */ mulli r0, r31, 0xc +/* 80371920 0036E880 80 8D AB F4 */ lwz r4, lbl_805A97B4@sda21(r13) +/* 80371924 0036E884 7C 04 00 2E */ lwzx r0, r4, r0 +/* 80371928 0036E888 54 00 00 0F */ rlwinm. r0, r0, 0, 0, 7 +/* 8037192C 0036E88C 40 82 00 0C */ bne lbl_80371938 +/* 80371930 0036E890 38 00 00 00 */ li r0, 0 +/* 80371934 0036E894 48 00 00 08 */ b lbl_8037193C +lbl_80371938: +/* 80371938 0036E898 38 00 00 01 */ li r0, 1 +lbl_8037193C: +/* 8037193C 0036E89C 2C 00 00 00 */ cmpwi r0, 0 +/* 80371940 0036E8A0 41 82 00 28 */ beq lbl_80371968 +/* 80371944 0036E8A4 38 1E FF FF */ addi r0, r30, -1 +/* 80371948 0036E8A8 7C 03 00 40 */ cmplw r3, r0 +/* 8037194C 0036E8AC 40 82 00 10 */ bne lbl_8037195C +/* 80371950 0036E8B0 38 00 00 00 */ li r0, 0 +/* 80371954 0036E8B4 7C 1D 19 AE */ stbx r0, r29, r3 +/* 80371958 0036E8B8 48 00 00 1C */ b lbl_80371974 +lbl_8037195C: +/* 8037195C 0036E8BC 38 00 00 2F */ li r0, 0x2f +/* 80371960 0036E8C0 7C 1D 19 AE */ stbx r0, r29, r3 +/* 80371964 0036E8C4 38 63 00 01 */ addi r3, r3, 1 +lbl_80371968: +/* 80371968 0036E8C8 38 00 00 00 */ li r0, 0 +/* 8037196C 0036E8CC 7C 1D 19 AE */ stbx r0, r29, r3 +/* 80371970 0036E8D0 38 00 00 01 */ li r0, 1 +lbl_80371974: +/* 80371974 0036E8D4 7C 03 03 78 */ mr r3, r0 +/* 80371978 0036E8D8 80 01 00 24 */ lwz r0, 0x24(r1) +/* 8037197C 0036E8DC 83 E1 00 1C */ lwz r31, 0x1c(r1) +/* 80371980 0036E8E0 83 C1 00 18 */ lwz r30, 0x18(r1) +/* 80371984 0036E8E4 83 A1 00 14 */ lwz r29, 0x14(r1) +/* 80371988 0036E8E8 38 21 00 20 */ addi r1, r1, 0x20 +/* 8037198C 0036E8EC 7C 08 03 A6 */ mtlr r0 +/* 80371990 0036E8F0 4E 80 00 20 */ blr + +.global DVDReadAsyncPrio +DVDReadAsyncPrio: +/* 80371994 0036E8F4 7C 08 02 A6 */ mflr r0 +/* 80371998 0036E8F8 90 01 00 04 */ stw r0, 4(r1) +/* 8037199C 0036E8FC 94 21 FF C8 */ stwu r1, -0x38(r1) +/* 803719A0 0036E900 BF 41 00 20 */ stmw r26, 0x20(r1) +/* 803719A4 0036E904 7C DD 33 79 */ or. r29, r6, r6 +/* 803719A8 0036E908 3B 43 00 00 */ addi r26, r3, 0 +/* 803719AC 0036E90C 3B 64 00 00 */ addi r27, r4, 0 +/* 803719B0 0036E910 3B 85 00 00 */ addi r28, r5, 0 +/* 803719B4 0036E914 3B C7 00 00 */ addi r30, r7, 0 +/* 803719B8 0036E918 3B E8 00 00 */ addi r31, r8, 0 +/* 803719BC 0036E91C 41 80 00 10 */ blt lbl_803719CC +/* 803719C0 0036E920 80 1A 00 34 */ lwz r0, 0x34(r26) +/* 803719C4 0036E924 7C 1D 00 40 */ cmplw r29, r0 +/* 803719C8 0036E928 41 80 00 1C */ blt lbl_803719E4 +lbl_803719CC: +/* 803719CC 0036E92C 3C 60 80 3F */ lis r3, lbl_803EFC90@ha +/* 803719D0 0036E930 4C C6 31 82 */ crclr 6 +/* 803719D4 0036E934 38 A3 FC 90 */ addi r5, r3, lbl_803EFC90@l +/* 803719D8 0036E938 38 6D 9E D0 */ addi r3, r13, lbl_805A8A90@sda21 +/* 803719DC 0036E93C 38 80 02 E6 */ li r4, 0x2e6 +/* 803719E0 0036E940 48 00 E0 4D */ bl OSPanic +lbl_803719E4: +/* 803719E4 0036E944 7C 9D E2 15 */ add. r4, r29, r28 +/* 803719E8 0036E948 41 80 00 14 */ blt lbl_803719FC +/* 803719EC 0036E94C 80 7A 00 34 */ lwz r3, 0x34(r26) +/* 803719F0 0036E950 38 03 00 20 */ addi r0, r3, 0x20 +/* 803719F4 0036E954 7C 04 00 40 */ cmplw r4, r0 +/* 803719F8 0036E958 41 80 00 1C */ blt lbl_80371A14 +lbl_803719FC: +/* 803719FC 0036E95C 3C 60 80 3F */ lis r3, lbl_803EFC90@ha +/* 80371A00 0036E960 4C C6 31 82 */ crclr 6 +/* 80371A04 0036E964 38 A3 FC 90 */ addi r5, r3, lbl_803EFC90@l +/* 80371A08 0036E968 38 6D 9E D0 */ addi r3, r13, lbl_805A8A90@sda21 +/* 80371A0C 0036E96C 38 80 02 EC */ li r4, 0x2ec +/* 80371A10 0036E970 48 00 E0 1D */ bl OSPanic +lbl_80371A14: +/* 80371A14 0036E974 93 DA 00 38 */ stw r30, 0x38(r26) +/* 80371A18 0036E978 3C 60 80 37 */ lis r3, cbForReadAsync@ha +/* 80371A1C 0036E97C 38 E3 1A 54 */ addi r7, r3, cbForReadAsync@l +/* 80371A20 0036E980 80 1A 00 30 */ lwz r0, 0x30(r26) +/* 80371A24 0036E984 38 7A 00 00 */ addi r3, r26, 0 +/* 80371A28 0036E988 38 9B 00 00 */ addi r4, r27, 0 +/* 80371A2C 0036E98C 38 BC 00 00 */ addi r5, r28, 0 +/* 80371A30 0036E990 39 1F 00 00 */ addi r8, r31, 0 +/* 80371A34 0036E994 7C C0 EA 14 */ add r6, r0, r29 +/* 80371A38 0036E998 48 00 1E BD */ bl DVDReadAbsAsyncPrio +/* 80371A3C 0036E99C BB 41 00 20 */ lmw r26, 0x20(r1) +/* 80371A40 0036E9A0 38 60 00 01 */ li r3, 1 +/* 80371A44 0036E9A4 80 01 00 3C */ lwz r0, 0x3c(r1) +/* 80371A48 0036E9A8 38 21 00 38 */ addi r1, r1, 0x38 +/* 80371A4C 0036E9AC 7C 08 03 A6 */ mtlr r0 +/* 80371A50 0036E9B0 4E 80 00 20 */ blr + +.global cbForReadAsync +cbForReadAsync: +/* 80371A54 0036E9B4 7C 08 02 A6 */ mflr r0 +/* 80371A58 0036E9B8 90 01 00 04 */ stw r0, 4(r1) +/* 80371A5C 0036E9BC 94 21 FF F8 */ stwu r1, -8(r1) +/* 80371A60 0036E9C0 81 84 00 38 */ lwz r12, 0x38(r4) +/* 80371A64 0036E9C4 28 0C 00 00 */ cmplwi r12, 0 +/* 80371A68 0036E9C8 41 82 00 0C */ beq lbl_80371A74 +/* 80371A6C 0036E9CC 7D 88 03 A6 */ mtlr r12 +/* 80371A70 0036E9D0 4E 80 00 21 */ blrl +lbl_80371A74: +/* 80371A74 0036E9D4 80 01 00 0C */ lwz r0, 0xc(r1) +/* 80371A78 0036E9D8 38 21 00 08 */ addi r1, r1, 8 +/* 80371A7C 0036E9DC 7C 08 03 A6 */ mtlr r0 +/* 80371A80 0036E9E0 4E 80 00 20 */ blr + +.global DVDPrepareStreamAsync +DVDPrepareStreamAsync: +/* 80371A84 0036E9E4 7C 08 02 A6 */ mflr r0 +/* 80371A88 0036E9E8 90 01 00 04 */ stw r0, 4(r1) +/* 80371A8C 0036E9EC 94 21 FF C8 */ stwu r1, -0x38(r1) +/* 80371A90 0036E9F0 BF 61 00 24 */ stmw r27, 0x24(r1) +/* 80371A94 0036E9F4 3B A5 00 00 */ addi r29, r5, 0 +/* 80371A98 0036E9F8 7C 7B 1B 78 */ mr r27, r3 +/* 80371A9C 0036E9FC 3B 84 00 00 */ addi r28, r4, 0 +/* 80371AA0 0036EA00 3B C6 00 00 */ addi r30, r6, 0 +/* 80371AA4 0036EA04 80 E3 00 30 */ lwz r7, 0x30(r3) +/* 80371AA8 0036EA08 3C 60 80 3F */ lis r3, lbl_803EFB90@ha +/* 80371AAC 0036EA0C 3B E3 FB 90 */ addi r31, r3, lbl_803EFB90@l +/* 80371AB0 0036EA10 7C 07 EA 14 */ add r0, r7, r29 +/* 80371AB4 0036EA14 54 00 04 7F */ clrlwi. r0, r0, 0x11 +/* 80371AB8 0036EA18 41 82 00 20 */ beq lbl_80371AD8 +/* 80371ABC 0036EA1C 38 C7 00 00 */ addi r6, r7, 0 +/* 80371AC0 0036EA20 4C C6 31 82 */ crclr 6 +/* 80371AC4 0036EA24 38 FD 00 00 */ addi r7, r29, 0 +/* 80371AC8 0036EA28 38 BF 01 C8 */ addi r5, r31, 0x1c8 +/* 80371ACC 0036EA2C 38 6D 9E D0 */ addi r3, r13, lbl_805A8A90@sda21 +/* 80371AD0 0036EA30 38 80 04 A5 */ li r4, 0x4a5 +/* 80371AD4 0036EA34 48 00 DF 59 */ bl OSPanic +lbl_80371AD8: +/* 80371AD8 0036EA38 28 1C 00 00 */ cmplwi r28, 0 +/* 80371ADC 0036EA3C 40 82 00 0C */ bne lbl_80371AE8 +/* 80371AE0 0036EA40 80 1B 00 34 */ lwz r0, 0x34(r27) +/* 80371AE4 0036EA44 7F 9D 00 50 */ subf r28, r29, r0 +lbl_80371AE8: +/* 80371AE8 0036EA48 57 80 04 7F */ clrlwi. r0, r28, 0x11 +/* 80371AEC 0036EA4C 41 82 00 1C */ beq lbl_80371B08 +/* 80371AF0 0036EA50 38 DC 00 00 */ addi r6, r28, 0 +/* 80371AF4 0036EA54 4C C6 31 82 */ crclr 6 +/* 80371AF8 0036EA58 38 BF 02 30 */ addi r5, r31, 0x230 +/* 80371AFC 0036EA5C 38 6D 9E D0 */ addi r3, r13, lbl_805A8A90@sda21 +/* 80371B00 0036EA60 38 80 04 AF */ li r4, 0x4af +/* 80371B04 0036EA64 48 00 DF 29 */ bl OSPanic +lbl_80371B08: +/* 80371B08 0036EA68 80 7B 00 34 */ lwz r3, 0x34(r27) +/* 80371B0C 0036EA6C 7C 1D 18 40 */ cmplw r29, r3 +/* 80371B10 0036EA70 40 80 00 10 */ bge lbl_80371B20 +/* 80371B14 0036EA74 7C 1D E2 14 */ add r0, r29, r28 +/* 80371B18 0036EA78 7C 00 18 40 */ cmplw r0, r3 +/* 80371B1C 0036EA7C 40 81 00 20 */ ble lbl_80371B3C +lbl_80371B20: +/* 80371B20 0036EA80 38 DD 00 00 */ addi r6, r29, 0 +/* 80371B24 0036EA84 4C C6 31 82 */ crclr 6 +/* 80371B28 0036EA88 38 FC 00 00 */ addi r7, r28, 0 +/* 80371B2C 0036EA8C 38 BF 02 88 */ addi r5, r31, 0x288 +/* 80371B30 0036EA90 38 6D 9E D0 */ addi r3, r13, lbl_805A8A90@sda21 +/* 80371B34 0036EA94 38 80 04 B7 */ li r4, 0x4b7 +/* 80371B38 0036EA98 48 00 DE F5 */ bl OSPanic +lbl_80371B3C: +/* 80371B3C 0036EA9C 93 DB 00 38 */ stw r30, 0x38(r27) +/* 80371B40 0036EAA0 3C 60 80 37 */ lis r3, cbForPrepareStreamAsync@ha +/* 80371B44 0036EAA4 38 C3 1B 70 */ addi r6, r3, cbForPrepareStreamAsync@l +/* 80371B48 0036EAA8 80 1B 00 30 */ lwz r0, 0x30(r27) +/* 80371B4C 0036EAAC 38 7B 00 00 */ addi r3, r27, 0 +/* 80371B50 0036EAB0 38 9C 00 00 */ addi r4, r28, 0 +/* 80371B54 0036EAB4 7C A0 EA 14 */ add r5, r0, r29 +/* 80371B58 0036EAB8 48 00 20 1D */ bl sub_80373b74 +/* 80371B5C 0036EABC BB 61 00 24 */ lmw r27, 0x24(r1) +/* 80371B60 0036EAC0 80 01 00 3C */ lwz r0, 0x3c(r1) +/* 80371B64 0036EAC4 38 21 00 38 */ addi r1, r1, 0x38 +/* 80371B68 0036EAC8 7C 08 03 A6 */ mtlr r0 +/* 80371B6C 0036EACC 4E 80 00 20 */ blr + +.global cbForPrepareStreamAsync +cbForPrepareStreamAsync: +/* 80371B70 0036EAD0 7C 08 02 A6 */ mflr r0 +/* 80371B74 0036EAD4 90 01 00 04 */ stw r0, 4(r1) +/* 80371B78 0036EAD8 94 21 FF F8 */ stwu r1, -8(r1) +/* 80371B7C 0036EADC 81 84 00 38 */ lwz r12, 0x38(r4) +/* 80371B80 0036EAE0 28 0C 00 00 */ cmplwi r12, 0 +/* 80371B84 0036EAE4 41 82 00 0C */ beq lbl_80371B90 +/* 80371B88 0036EAE8 7D 88 03 A6 */ mtlr r12 +/* 80371B8C 0036EAEC 4E 80 00 21 */ blrl +lbl_80371B90: +/* 80371B90 0036EAF0 80 01 00 0C */ lwz r0, 0xc(r1) +/* 80371B94 0036EAF4 38 21 00 08 */ addi r1, r1, 8 +/* 80371B98 0036EAF8 7C 08 03 A6 */ mtlr r0 +/* 80371B9C 0036EAFC 4E 80 00 20 */ blr + +.global nullsub_62 +nullsub_62: +/* 80371BA0 0036EB00 4E 80 00 20 */ blr + diff --git a/asm/Dolphin/DVD/dvdidutils.s b/asm/Dolphin/DVD/dvdidutils.s new file mode 100644 index 00000000..ad9af2ed --- /dev/null +++ b/asm/Dolphin/DVD/dvdidutils.s @@ -0,0 +1,74 @@ +.include "macros.inc" + +.section .text, "ax" + +.global DVDCompareDiskID +DVDCompareDiskID: +/* 80374C48 00371BA8 7C 08 02 A6 */ mflr r0 +/* 80374C4C 00371BAC 90 01 00 04 */ stw r0, 4(r1) +/* 80374C50 00371BB0 94 21 FF E8 */ stwu r1, -0x18(r1) +/* 80374C54 00371BB4 93 E1 00 14 */ stw r31, 0x14(r1) +/* 80374C58 00371BB8 3B E4 00 00 */ addi r31, r4, 0 +/* 80374C5C 00371BBC 93 C1 00 10 */ stw r30, 0x10(r1) +/* 80374C60 00371BC0 7C 7E 1B 78 */ mr r30, r3 +/* 80374C64 00371BC4 88 03 00 00 */ lbz r0, 0(r3) +/* 80374C68 00371BC8 7C 00 07 75 */ extsb. r0, r0 +/* 80374C6C 00371BCC 41 82 00 30 */ beq lbl_80374C9C +/* 80374C70 00371BD0 88 1F 00 00 */ lbz r0, 0(r31) +/* 80374C74 00371BD4 7C 00 07 75 */ extsb. r0, r0 +/* 80374C78 00371BD8 41 82 00 24 */ beq lbl_80374C9C +/* 80374C7C 00371BDC 38 7E 00 00 */ addi r3, r30, 0 +/* 80374C80 00371BE0 38 9F 00 00 */ addi r4, r31, 0 +/* 80374C84 00371BE4 38 A0 00 04 */ li r5, 4 +/* 80374C88 00371BE8 48 01 B2 D5 */ bl strncmp +/* 80374C8C 00371BEC 2C 03 00 00 */ cmpwi r3, 0 +/* 80374C90 00371BF0 41 82 00 0C */ beq lbl_80374C9C +/* 80374C94 00371BF4 38 60 00 00 */ li r3, 0 +/* 80374C98 00371BF8 48 00 00 90 */ b lbl_80374D28 +lbl_80374C9C: +/* 80374C9C 00371BFC 88 1E 00 04 */ lbz r0, 4(r30) +/* 80374CA0 00371C00 7C 00 07 75 */ extsb. r0, r0 +/* 80374CA4 00371C04 41 82 00 28 */ beq lbl_80374CCC +/* 80374CA8 00371C08 88 1F 00 04 */ lbz r0, 4(r31) +/* 80374CAC 00371C0C 7C 00 07 75 */ extsb. r0, r0 +/* 80374CB0 00371C10 41 82 00 1C */ beq lbl_80374CCC +/* 80374CB4 00371C14 38 7E 00 04 */ addi r3, r30, 4 +/* 80374CB8 00371C18 38 9F 00 04 */ addi r4, r31, 4 +/* 80374CBC 00371C1C 38 A0 00 02 */ li r5, 2 +/* 80374CC0 00371C20 48 01 B2 9D */ bl strncmp +/* 80374CC4 00371C24 2C 03 00 00 */ cmpwi r3, 0 +/* 80374CC8 00371C28 41 82 00 0C */ beq lbl_80374CD4 +lbl_80374CCC: +/* 80374CCC 00371C2C 38 60 00 00 */ li r3, 0 +/* 80374CD0 00371C30 48 00 00 58 */ b lbl_80374D28 +lbl_80374CD4: +/* 80374CD4 00371C34 88 7E 00 06 */ lbz r3, 6(r30) +/* 80374CD8 00371C38 28 03 00 FF */ cmplwi r3, 0xff +/* 80374CDC 00371C3C 41 82 00 20 */ beq lbl_80374CFC +/* 80374CE0 00371C40 88 1F 00 06 */ lbz r0, 6(r31) +/* 80374CE4 00371C44 28 00 00 FF */ cmplwi r0, 0xff +/* 80374CE8 00371C48 41 82 00 14 */ beq lbl_80374CFC +/* 80374CEC 00371C4C 7C 03 00 40 */ cmplw r3, r0 +/* 80374CF0 00371C50 41 82 00 0C */ beq lbl_80374CFC +/* 80374CF4 00371C54 38 60 00 00 */ li r3, 0 +/* 80374CF8 00371C58 48 00 00 30 */ b lbl_80374D28 +lbl_80374CFC: +/* 80374CFC 00371C5C 88 7E 00 07 */ lbz r3, 7(r30) +/* 80374D00 00371C60 28 03 00 FF */ cmplwi r3, 0xff +/* 80374D04 00371C64 41 82 00 20 */ beq lbl_80374D24 +/* 80374D08 00371C68 88 1F 00 07 */ lbz r0, 7(r31) +/* 80374D0C 00371C6C 28 00 00 FF */ cmplwi r0, 0xff +/* 80374D10 00371C70 41 82 00 14 */ beq lbl_80374D24 +/* 80374D14 00371C74 7C 03 00 40 */ cmplw r3, r0 +/* 80374D18 00371C78 41 82 00 0C */ beq lbl_80374D24 +/* 80374D1C 00371C7C 38 60 00 00 */ li r3, 0 +/* 80374D20 00371C80 48 00 00 08 */ b lbl_80374D28 +lbl_80374D24: +/* 80374D24 00371C84 38 60 00 01 */ li r3, 1 +lbl_80374D28: +/* 80374D28 00371C88 80 01 00 1C */ lwz r0, 0x1c(r1) +/* 80374D2C 00371C8C 83 E1 00 14 */ lwz r31, 0x14(r1) +/* 80374D30 00371C90 83 C1 00 10 */ lwz r30, 0x10(r1) +/* 80374D34 00371C94 38 21 00 18 */ addi r1, r1, 0x18 +/* 80374D38 00371C98 7C 08 03 A6 */ mtlr r0 +/* 80374D3C 00371C9C 4E 80 00 20 */ blr diff --git a/asm/Dolphin/DVD/dvdlow.s b/asm/Dolphin/DVD/dvdlow.s new file mode 100644 index 00000000..46a8e913 --- /dev/null +++ b/asm/Dolphin/DVD/dvdlow.s @@ -0,0 +1,1018 @@ +.include "macros.inc" + +.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 diff --git a/asm/Dolphin/DVD/dvdqueue.s b/asm/Dolphin/DVD/dvdqueue.s new file mode 100644 index 00000000..6bf2c0e7 --- /dev/null +++ b/asm/Dolphin/DVD/dvdqueue.s @@ -0,0 +1,153 @@ +.include "macros.inc" + +.section .text, "ax" + +.global __DVDClearWaitingQueue +__DVDClearWaitingQueue: +/* 803748B8 00371818 3C 60 80 54 */ lis r3, lbl_80540BF8@ha +/* 803748BC 0037181C 38 63 0B F8 */ addi r3, r3, lbl_80540BF8@l +/* 803748C0 00371820 90 63 00 00 */ stw r3, 0(r3) +/* 803748C4 00371824 38 A3 00 08 */ addi r5, r3, 8 +/* 803748C8 00371828 38 83 00 10 */ addi r4, r3, 0x10 +/* 803748CC 0037182C 90 63 00 04 */ stw r3, 4(r3) +/* 803748D0 00371830 38 63 00 18 */ addi r3, r3, 0x18 +/* 803748D4 00371834 90 A5 00 00 */ stw r5, 0(r5) +/* 803748D8 00371838 90 A5 00 04 */ stw r5, 4(r5) +/* 803748DC 0037183C 90 84 00 00 */ stw r4, 0(r4) +/* 803748E0 00371840 90 84 00 04 */ stw r4, 4(r4) +/* 803748E4 00371844 90 63 00 00 */ stw r3, 0(r3) +/* 803748E8 00371848 90 63 00 04 */ stw r3, 4(r3) +/* 803748EC 0037184C 4E 80 00 20 */ blr + +.global __DVDPushWaitingQueue +__DVDPushWaitingQueue: +/* 803748F0 00371850 7C 08 02 A6 */ mflr r0 +/* 803748F4 00371854 90 01 00 04 */ stw r0, 4(r1) +/* 803748F8 00371858 94 21 FF E8 */ stwu r1, -0x18(r1) +/* 803748FC 0037185C 93 E1 00 14 */ stw r31, 0x14(r1) +/* 80374900 00371860 3B E4 00 00 */ addi r31, r4, 0 +/* 80374904 00371864 93 C1 00 10 */ stw r30, 0x10(r1) +/* 80374908 00371868 3B C3 00 00 */ addi r30, r3, 0 +/* 8037490C 0037186C 48 00 CD 55 */ bl OSDisableInterrupts +/* 80374910 00371870 3C 80 80 54 */ lis r4, lbl_80540BF8@ha +/* 80374914 00371874 57 C5 18 38 */ slwi r5, r30, 3 +/* 80374918 00371878 38 04 0B F8 */ addi r0, r4, lbl_80540BF8@l +/* 8037491C 0037187C 7C A0 2A 14 */ add r5, r0, r5 +/* 80374920 00371880 80 85 00 04 */ lwz r4, 4(r5) +/* 80374924 00371884 93 E4 00 00 */ stw r31, 0(r4) +/* 80374928 00371888 80 05 00 04 */ lwz r0, 4(r5) +/* 8037492C 0037188C 90 1F 00 04 */ stw r0, 4(r31) +/* 80374930 00371890 90 BF 00 00 */ stw r5, 0(r31) +/* 80374934 00371894 93 E5 00 04 */ stw r31, 4(r5) +/* 80374938 00371898 48 00 CD 51 */ bl OSRestoreInterrupts +/* 8037493C 0037189C 80 01 00 1C */ lwz r0, 0x1c(r1) +/* 80374940 003718A0 38 60 00 01 */ li r3, 1 +/* 80374944 003718A4 83 E1 00 14 */ lwz r31, 0x14(r1) +/* 80374948 003718A8 83 C1 00 10 */ lwz r30, 0x10(r1) +/* 8037494C 003718AC 38 21 00 18 */ addi r1, r1, 0x18 +/* 80374950 003718B0 7C 08 03 A6 */ mtlr r0 +/* 80374954 003718B4 4E 80 00 20 */ blr + +.global __DVDPopWaitingQueue +__DVDPopWaitingQueue: +/* 80374958 003718B8 7C 08 02 A6 */ mflr r0 +/* 8037495C 003718BC 90 01 00 04 */ stw r0, 4(r1) +/* 80374960 003718C0 94 21 FF F0 */ stwu r1, -0x10(r1) +/* 80374964 003718C4 93 E1 00 0C */ stw r31, 0xc(r1) +/* 80374968 003718C8 48 00 CC F9 */ bl OSDisableInterrupts +/* 8037496C 003718CC 38 00 00 04 */ li r0, 4 +/* 80374970 003718D0 3C 80 80 54 */ lis r4, lbl_80540BF8@ha +/* 80374974 003718D4 7C 09 03 A6 */ mtctr r0 +/* 80374978 003718D8 38 84 0B F8 */ addi r4, r4, lbl_80540BF8@l +/* 8037497C 003718DC 3B E0 00 00 */ li r31, 0 +lbl_80374980: +/* 80374980 003718E0 80 04 00 00 */ lwz r0, 0(r4) +/* 80374984 003718E4 7C 00 20 40 */ cmplw r0, r4 +/* 80374988 003718E8 41 82 00 48 */ beq lbl_803749D0 +/* 8037498C 003718EC 48 00 CC FD */ bl OSRestoreInterrupts +/* 80374990 003718F0 48 00 CC D1 */ bl OSDisableInterrupts +/* 80374994 003718F4 3C 80 80 54 */ lis r4, lbl_80540BF8@ha +/* 80374998 003718F8 57 E5 18 38 */ slwi r5, r31, 3 +/* 8037499C 003718FC 38 04 0B F8 */ addi r0, r4, lbl_80540BF8@l +/* 803749A0 00371900 7C A0 2A 14 */ add r5, r0, r5 +/* 803749A4 00371904 83 E5 00 00 */ lwz r31, 0(r5) +/* 803749A8 00371908 80 1F 00 00 */ lwz r0, 0(r31) +/* 803749AC 0037190C 90 05 00 00 */ stw r0, 0(r5) +/* 803749B0 00371910 80 9F 00 00 */ lwz r4, 0(r31) +/* 803749B4 00371914 90 A4 00 04 */ stw r5, 4(r4) +/* 803749B8 00371918 48 00 CC D1 */ bl OSRestoreInterrupts +/* 803749BC 0037191C 38 00 00 00 */ li r0, 0 +/* 803749C0 00371920 90 1F 00 00 */ stw r0, 0(r31) +/* 803749C4 00371924 7F E3 FB 78 */ mr r3, r31 +/* 803749C8 00371928 90 1F 00 04 */ stw r0, 4(r31) +/* 803749CC 0037192C 48 00 00 18 */ b lbl_803749E4 +lbl_803749D0: +/* 803749D0 00371930 38 84 00 08 */ addi r4, r4, 8 +/* 803749D4 00371934 3B FF 00 01 */ addi r31, r31, 1 +/* 803749D8 00371938 42 00 FF A8 */ bdnz lbl_80374980 +/* 803749DC 0037193C 48 00 CC AD */ bl OSRestoreInterrupts +/* 803749E0 00371940 38 60 00 00 */ li r3, 0 +lbl_803749E4: +/* 803749E4 00371944 80 01 00 14 */ lwz r0, 0x14(r1) +/* 803749E8 00371948 83 E1 00 0C */ lwz r31, 0xc(r1) +/* 803749EC 0037194C 38 21 00 10 */ addi r1, r1, 0x10 +/* 803749F0 00371950 7C 08 03 A6 */ mtlr r0 +/* 803749F4 00371954 4E 80 00 20 */ blr + +.global __DVDCheckWaitingQueue +__DVDCheckWaitingQueue: +/* 803749F8 00371958 7C 08 02 A6 */ mflr r0 +/* 803749FC 0037195C 90 01 00 04 */ stw r0, 4(r1) +/* 80374A00 00371960 94 21 FF F8 */ stwu r1, -8(r1) +/* 80374A04 00371964 48 00 CC 5D */ bl OSDisableInterrupts +/* 80374A08 00371968 38 00 00 04 */ li r0, 4 +/* 80374A0C 0037196C 3C 80 80 54 */ lis r4, lbl_80540BF8@ha +/* 80374A10 00371970 7C 09 03 A6 */ mtctr r0 +/* 80374A14 00371974 38 84 0B F8 */ addi r4, r4, lbl_80540BF8@l +lbl_80374A18: +/* 80374A18 00371978 80 04 00 00 */ lwz r0, 0(r4) +/* 80374A1C 0037197C 7C 00 20 40 */ cmplw r0, r4 +/* 80374A20 00371980 41 82 00 10 */ beq lbl_80374A30 +/* 80374A24 00371984 48 00 CC 65 */ bl OSRestoreInterrupts +/* 80374A28 00371988 38 60 00 01 */ li r3, 1 +/* 80374A2C 0037198C 48 00 00 14 */ b lbl_80374A40 +lbl_80374A30: +/* 80374A30 00371990 38 84 00 08 */ addi r4, r4, 8 +/* 80374A34 00371994 42 00 FF E4 */ bdnz lbl_80374A18 +/* 80374A38 00371998 48 00 CC 51 */ bl OSRestoreInterrupts +/* 80374A3C 0037199C 38 60 00 00 */ li r3, 0 +lbl_80374A40: +/* 80374A40 003719A0 80 01 00 0C */ lwz r0, 0xc(r1) +/* 80374A44 003719A4 38 21 00 08 */ addi r1, r1, 8 +/* 80374A48 003719A8 7C 08 03 A6 */ mtlr r0 +/* 80374A4C 003719AC 4E 80 00 20 */ blr + +.global __DVDDequeueWaitingQueue +__DVDDequeueWaitingQueue: +/* 80374A50 003719B0 7C 08 02 A6 */ mflr r0 +/* 80374A54 003719B4 90 01 00 04 */ stw r0, 4(r1) +/* 80374A58 003719B8 94 21 FF E8 */ stwu r1, -0x18(r1) +/* 80374A5C 003719BC 93 E1 00 14 */ stw r31, 0x14(r1) +/* 80374A60 003719C0 7C 7F 1B 78 */ mr r31, r3 +/* 80374A64 003719C4 48 00 CB FD */ bl OSDisableInterrupts +/* 80374A68 003719C8 80 9F 00 04 */ lwz r4, 4(r31) +/* 80374A6C 003719CC 80 BF 00 00 */ lwz r5, 0(r31) +/* 80374A70 003719D0 28 04 00 00 */ cmplwi r4, 0 +/* 80374A74 003719D4 41 82 00 0C */ beq lbl_80374A80 +/* 80374A78 003719D8 28 05 00 00 */ cmplwi r5, 0 +/* 80374A7C 003719DC 40 82 00 10 */ bne lbl_80374A8C +lbl_80374A80: +/* 80374A80 003719E0 48 00 CC 09 */ bl OSRestoreInterrupts +/* 80374A84 003719E4 38 60 00 00 */ li r3, 0 +/* 80374A88 003719E8 48 00 00 14 */ b lbl_80374A9C +lbl_80374A8C: +/* 80374A8C 003719EC 90 A4 00 00 */ stw r5, 0(r4) +/* 80374A90 003719F0 90 85 00 04 */ stw r4, 4(r5) +/* 80374A94 003719F4 48 00 CB F5 */ bl OSRestoreInterrupts +/* 80374A98 003719F8 38 60 00 01 */ li r3, 1 +lbl_80374A9C: +/* 80374A9C 003719FC 80 01 00 1C */ lwz r0, 0x1c(r1) +/* 80374AA0 00371A00 83 E1 00 14 */ lwz r31, 0x14(r1) +/* 80374AA4 00371A04 38 21 00 18 */ addi r1, r1, 0x18 +/* 80374AA8 00371A08 7C 08 03 A6 */ mtlr r0 +/* 80374AAC 00371A0C 4E 80 00 20 */ blr diff --git a/asm/Dolphin/DVD/fstload.s b/asm/Dolphin/DVD/fstload.s new file mode 100644 index 00000000..3e01c3a2 --- /dev/null +++ b/asm/Dolphin/DVD/fstload.s @@ -0,0 +1,160 @@ +.include "macros.inc" + +.section .text, "ax" + +.global cb +cb: +/* 80374E6C 00371DCC 7C 08 02 A6 */ mflr r0 +/* 80374E70 00371DD0 2C 03 00 00 */ cmpwi r3, 0 +/* 80374E74 00371DD4 90 01 00 04 */ stw r0, 4(r1) +/* 80374E78 00371DD8 94 21 FF E8 */ stwu r1, -0x18(r1) +/* 80374E7C 00371DDC 93 E1 00 14 */ stw r31, 0x14(r1) +/* 80374E80 00371DE0 3B E4 00 00 */ addi r31, r4, 0 +/* 80374E84 00371DE4 40 81 00 7C */ ble lbl_80374F00 +/* 80374E88 00371DE8 80 0D AC 68 */ lwz r0, lbl_805A9828@sda21(r13) +/* 80374E8C 00371DEC 2C 00 00 01 */ cmpwi r0, 1 +/* 80374E90 00371DF0 41 82 00 3C */ beq lbl_80374ECC +/* 80374E94 00371DF4 40 80 00 9C */ bge lbl_80374F30 +/* 80374E98 00371DF8 2C 00 00 00 */ cmpwi r0, 0 +/* 80374E9C 00371DFC 40 80 00 08 */ bge lbl_80374EA4 +/* 80374EA0 00371E00 48 00 00 90 */ b lbl_80374F30 +lbl_80374EA4: +/* 80374EA4 00371E04 38 00 00 01 */ li r0, 1 +/* 80374EA8 00371E08 80 8D AC 6C */ lwz r4, lbl_805A982C@sda21(r13) +/* 80374EAC 00371E0C 3C 60 80 37 */ lis r3, cb@ha +/* 80374EB0 00371E10 90 0D AC 68 */ stw r0, lbl_805A9828@sda21(r13) +/* 80374EB4 00371E14 38 E3 4E 6C */ addi r7, r3, cb@l +/* 80374EB8 00371E18 38 7F 00 00 */ addi r3, r31, 0 +/* 80374EBC 00371E1C 38 A0 00 20 */ li r5, 0x20 +/* 80374EC0 00371E20 38 C0 04 20 */ li r6, 0x420 +/* 80374EC4 00371E24 4B FF EB 0D */ bl DVDReadAbsAsyncForBS +/* 80374EC8 00371E28 48 00 00 68 */ b lbl_80374F30 +lbl_80374ECC: +/* 80374ECC 00371E2C 38 00 00 02 */ li r0, 2 +/* 80374ED0 00371E30 80 CD AC 6C */ lwz r6, lbl_805A982C@sda21(r13) +/* 80374ED4 00371E34 90 0D AC 68 */ stw r0, lbl_805A9828@sda21(r13) +/* 80374ED8 00371E38 3C 60 80 37 */ lis r3, cb@ha +/* 80374EDC 00371E3C 38 E3 4E 6C */ addi r7, r3, cb@l +/* 80374EE0 00371E40 80 A6 00 08 */ lwz r5, 8(r6) +/* 80374EE4 00371E44 7F E3 FB 78 */ mr r3, r31 +/* 80374EE8 00371E48 80 86 00 10 */ lwz r4, 0x10(r6) +/* 80374EEC 00371E4C 38 05 00 1F */ addi r0, r5, 0x1f +/* 80374EF0 00371E50 80 C6 00 04 */ lwz r6, 4(r6) +/* 80374EF4 00371E54 54 05 00 34 */ rlwinm r5, r0, 0, 0, 0x1a +/* 80374EF8 00371E58 4B FF EA D9 */ bl DVDReadAbsAsyncForBS +/* 80374EFC 00371E5C 48 00 00 34 */ b lbl_80374F30 +lbl_80374F00: +/* 80374F00 00371E60 2C 03 FF FF */ cmpwi r3, -1 +/* 80374F04 00371E64 41 82 00 2C */ beq lbl_80374F30 +/* 80374F08 00371E68 2C 03 FF FC */ cmpwi r3, -4 +/* 80374F0C 00371E6C 40 82 00 24 */ bne lbl_80374F30 +/* 80374F10 00371E70 38 00 00 00 */ li r0, 0 +/* 80374F14 00371E74 90 0D AC 68 */ stw r0, lbl_805A9828@sda21(r13) +/* 80374F18 00371E78 4B FF F1 A9 */ bl DVDReset +/* 80374F1C 00371E7C 3C 60 80 37 */ lis r3, cb@ha +/* 80374F20 00371E80 80 8D AC 70 */ lwz r4, lbl_805A9830@sda21(r13) +/* 80374F24 00371E84 38 A3 4E 6C */ addi r5, r3, cb@l +/* 80374F28 00371E88 38 7F 00 00 */ addi r3, r31, 0 +/* 80374F2C 00371E8C 4B FF EB 75 */ bl DVDReadDiskID +lbl_80374F30: +/* 80374F30 00371E90 80 01 00 1C */ lwz r0, 0x1c(r1) +/* 80374F34 00371E94 83 E1 00 14 */ lwz r31, 0x14(r1) +/* 80374F38 00371E98 38 21 00 18 */ addi r1, r1, 0x18 +/* 80374F3C 00371E9C 7C 08 03 A6 */ mtlr r0 +/* 80374F40 00371EA0 4E 80 00 20 */ blr + +.global __fstLoad +__fstLoad: +/* 80374F44 00371EA4 7C 08 02 A6 */ mflr r0 +/* 80374F48 00371EA8 3C 60 80 3F */ lis r3, lbl_803F0578@ha +/* 80374F4C 00371EAC 90 01 00 04 */ stw r0, 4(r1) +/* 80374F50 00371EB0 94 21 FF A0 */ stwu r1, -0x60(r1) +/* 80374F54 00371EB4 93 E1 00 5C */ stw r31, 0x5c(r1) +/* 80374F58 00371EB8 3B E3 05 78 */ addi r31, r3, lbl_803F0578@l +/* 80374F5C 00371EBC 93 C1 00 58 */ stw r30, 0x58(r1) +/* 80374F60 00371EC0 93 A1 00 54 */ stw r29, 0x54(r1) +/* 80374F64 00371EC4 48 00 98 2D */ bl OSGetArenaHi +/* 80374F68 00371EC8 3C 60 80 54 */ lis r3, lbl_80540C18@ha +/* 80374F6C 00371ECC 38 63 0C 18 */ addi r3, r3, lbl_80540C18@l +/* 80374F70 00371ED0 38 81 00 2B */ addi r4, r1, 0x2b +/* 80374F74 00371ED4 38 03 00 1F */ addi r0, r3, 0x1f +/* 80374F78 00371ED8 54 83 00 34 */ rlwinm r3, r4, 0, 0, 0x1a +/* 80374F7C 00371EDC 54 00 00 34 */ rlwinm r0, r0, 0, 0, 0x1a +/* 80374F80 00371EE0 90 6D AC 70 */ stw r3, lbl_805A9830@sda21(r13) +/* 80374F84 00371EE4 90 0D AC 6C */ stw r0, lbl_805A982C@sda21(r13) +/* 80374F88 00371EE8 4B FF F1 39 */ bl DVDReset +/* 80374F8C 00371EEC 3C 60 80 54 */ lis r3, lbl_80540C58@ha +/* 80374F90 00371EF0 80 8D AC 70 */ lwz r4, lbl_805A9830@sda21(r13) +/* 80374F94 00371EF4 3C A0 80 37 */ lis r5, cb@ha +/* 80374F98 00371EF8 38 63 0C 58 */ addi r3, r3, lbl_80540C58@l +/* 80374F9C 00371EFC 38 A5 4E 6C */ addi r5, r5, cb@l +/* 80374FA0 00371F00 4B FF EB 01 */ bl DVDReadDiskID +lbl_80374FA4: +/* 80374FA4 00371F04 4B FF F1 AD */ bl DVDGetDriveStatus +/* 80374FA8 00371F08 2C 03 00 00 */ cmpwi r3, 0 +/* 80374FAC 00371F0C 40 82 FF F8 */ bne lbl_80374FA4 +/* 80374FB0 00371F10 80 6D AC 6C */ lwz r3, lbl_805A982C@sda21(r13) +/* 80374FB4 00371F14 3F A0 80 00 */ lis r29, 0x80000000@ha +/* 80374FB8 00371F18 3F C0 80 00 */ lis r30, 0x80000038@ha +/* 80374FBC 00371F1C 80 03 00 10 */ lwz r0, 0x10(r3) +/* 80374FC0 00371F20 38 7D 00 00 */ addi r3, r29, 0x80000000@l +/* 80374FC4 00371F24 38 A0 00 20 */ li r5, 0x20 +/* 80374FC8 00371F28 90 1E 00 38 */ stw r0, 0x80000038@l(r30) +/* 80374FCC 00371F2C 80 8D AC 6C */ lwz r4, lbl_805A982C@sda21(r13) +/* 80374FD0 00371F30 80 04 00 0C */ lwz r0, 0xc(r4) +/* 80374FD4 00371F34 90 1E 00 3C */ stw r0, 0x3c(r30) +/* 80374FD8 00371F38 80 8D AC 70 */ lwz r4, lbl_805A9830@sda21(r13) +/* 80374FDC 00371F3C 4B C8 E4 B5 */ bl memcpy +/* 80374FE0 00371F40 38 6D 9E F8 */ addi r3, r13, lbl_805A8AB8@sda21 +/* 80374FE4 00371F44 4C C6 31 82 */ crclr 6 +/* 80374FE8 00371F48 48 00 A9 C5 */ bl OSReport +/* 80374FEC 00371F4C 88 9D 00 00 */ lbz r4, 0(r29) +/* 80374FF0 00371F50 7F E3 FB 78 */ mr r3, r31 +/* 80374FF4 00371F54 88 BD 00 01 */ lbz r5, 1(r29) +/* 80374FF8 00371F58 4C C6 31 82 */ crclr 6 +/* 80374FFC 00371F5C 88 DD 00 02 */ lbz r6, 2(r29) +/* 80375000 00371F60 88 FD 00 03 */ lbz r7, 3(r29) +/* 80375004 00371F64 7C 84 07 74 */ extsb r4, r4 +/* 80375008 00371F68 7C A5 07 74 */ extsb r5, r5 +/* 8037500C 00371F6C 7C C6 07 74 */ extsb r6, r6 +/* 80375010 00371F70 7C E7 07 74 */ extsb r7, r7 +/* 80375014 00371F74 48 00 A9 99 */ bl OSReport +/* 80375018 00371F78 88 9D 00 04 */ lbz r4, 4(r29) +/* 8037501C 00371F7C 38 7F 00 1C */ addi r3, r31, 0x1c +/* 80375020 00371F80 88 BD 00 05 */ lbz r5, 5(r29) +/* 80375024 00371F84 4C C6 31 82 */ crclr 6 +/* 80375028 00371F88 7C 84 07 74 */ extsb r4, r4 +/* 8037502C 00371F8C 7C A5 07 74 */ extsb r5, r5 +/* 80375030 00371F90 48 00 A9 7D */ bl OSReport +/* 80375034 00371F94 88 9D 00 06 */ lbz r4, 6(r29) +/* 80375038 00371F98 38 7F 00 34 */ addi r3, r31, 0x34 +/* 8037503C 00371F9C 4C C6 31 82 */ crclr 6 +/* 80375040 00371FA0 48 00 A9 6D */ bl OSReport +/* 80375044 00371FA4 88 9D 00 07 */ lbz r4, 7(r29) +/* 80375048 00371FA8 38 7F 00 48 */ addi r3, r31, 0x48 +/* 8037504C 00371FAC 4C C6 31 82 */ crclr 6 +/* 80375050 00371FB0 48 00 A9 5D */ bl OSReport +/* 80375054 00371FB4 88 1E 00 08 */ lbz r0, 8(r30) +/* 80375058 00371FB8 28 00 00 00 */ cmplwi r0, 0 +/* 8037505C 00371FBC 40 82 00 0C */ bne lbl_80375068 +/* 80375060 00371FC0 38 8D 9E FC */ addi r4, r13, lbl_805A8ABC@sda21 +/* 80375064 00371FC4 48 00 00 08 */ b lbl_8037506C +lbl_80375068: +/* 80375068 00371FC8 38 8D 9F 00 */ addi r4, r13, lbl_805A8AC0@sda21 +lbl_8037506C: +/* 8037506C 00371FCC 4C C6 31 82 */ crclr 6 +/* 80375070 00371FD0 38 7F 00 5C */ addi r3, r31, 0x5c +/* 80375074 00371FD4 48 00 A9 39 */ bl OSReport +/* 80375078 00371FD8 38 6D 9E F8 */ addi r3, r13, lbl_805A8AB8@sda21 +/* 8037507C 00371FDC 4C C6 31 82 */ crclr 6 +/* 80375080 00371FE0 48 00 A9 2D */ bl OSReport +/* 80375084 00371FE4 80 6D AC 6C */ lwz r3, lbl_805A982C@sda21(r13) +/* 80375088 00371FE8 80 63 00 10 */ lwz r3, 0x10(r3) +/* 8037508C 00371FEC 48 00 97 15 */ bl OSSetArenaHi +/* 80375090 00371FF0 80 01 00 64 */ lwz r0, 0x64(r1) +/* 80375094 00371FF4 83 E1 00 5C */ lwz r31, 0x5c(r1) +/* 80375098 00371FF8 83 C1 00 58 */ lwz r30, 0x58(r1) +/* 8037509C 00371FFC 83 A1 00 54 */ lwz r29, 0x54(r1) +/* 803750A0 00372000 38 21 00 60 */ addi r1, r1, 0x60 +/* 803750A4 00372004 7C 08 03 A6 */ mtlr r0 +/* 803750A8 00372008 4E 80 00 20 */ blr diff --git a/asm/Dolphin/EXIBios.s b/asm/Dolphin/EXI/EXIBios.s similarity index 100% rename from asm/Dolphin/EXIBios.s rename to asm/Dolphin/EXI/EXIBios.s diff --git a/asm/Dolphin/EXIUart.s b/asm/Dolphin/EXI/EXIUart.s similarity index 100% rename from asm/Dolphin/EXIUart.s rename to asm/Dolphin/EXI/EXIUart.s diff --git a/asm/Dolphin/GBA.s b/asm/Dolphin/GBA/GBA.s similarity index 100% rename from asm/Dolphin/GBA.s rename to asm/Dolphin/GBA/GBA.s diff --git a/asm/Dolphin/GBARead.s b/asm/Dolphin/GBA/GBARead.s similarity index 100% rename from asm/Dolphin/GBARead.s rename to asm/Dolphin/GBA/GBARead.s diff --git a/asm/Dolphin/GBAWrite.s b/asm/Dolphin/GBA/GBAWrite.s similarity index 100% rename from asm/Dolphin/GBAWrite.s rename to asm/Dolphin/GBA/GBAWrite.s diff --git a/asm/Dolphin/GBAXfer.s b/asm/Dolphin/GBA/GBAXfer.s similarity index 100% rename from asm/Dolphin/GBAXfer.s rename to asm/Dolphin/GBA/GBAXfer.s diff --git a/asm/Dolphin/GX/GXAttr.s b/asm/Dolphin/GX/GXAttr.s new file mode 100644 index 00000000..ab0b5086 --- /dev/null +++ b/asm/Dolphin/GX/GXAttr.s @@ -0,0 +1,1441 @@ +.include "macros.inc" + +.section .text, "ax" + +.global __GXXfVtxSpecs +__GXXfVtxSpecs: +/* 80376DC0 00373D20 80 A2 CE 08 */ lwz r5, lbl_805AEB28@sda21(r2) +/* 80376DC4 00373D24 80 85 00 14 */ lwz r4, 0x14(r5) +/* 80376DC8 00373D28 54 80 9F BF */ rlwinm. r0, r4, 0x13, 0x1e, 0x1f +/* 80376DCC 00373D2C 41 82 00 0C */ beq lbl_80376DD8 +/* 80376DD0 00373D30 38 60 00 01 */ li r3, 1 +/* 80376DD4 00373D34 48 00 00 08 */ b lbl_80376DDC +lbl_80376DD8: +/* 80376DD8 00373D38 38 60 00 00 */ li r3, 0 +lbl_80376DDC: +/* 80376DDC 00373D3C 54 80 8F BF */ rlwinm. r0, r4, 0x11, 0x1e, 0x1f +/* 80376DE0 00373D40 41 82 00 0C */ beq lbl_80376DEC +/* 80376DE4 00373D44 38 80 00 01 */ li r4, 1 +/* 80376DE8 00373D48 48 00 00 08 */ b lbl_80376DF0 +lbl_80376DEC: +/* 80376DEC 00373D4C 38 80 00 00 */ li r4, 0 +lbl_80376DF0: +/* 80376DF0 00373D50 88 05 04 1D */ lbz r0, 0x41d(r5) +/* 80376DF4 00373D54 7C E3 22 14 */ add r7, r3, r4 +/* 80376DF8 00373D58 28 00 00 00 */ cmplwi r0, 0 +/* 80376DFC 00373D5C 41 82 00 0C */ beq lbl_80376E08 +/* 80376E00 00373D60 38 80 00 02 */ li r4, 2 +/* 80376E04 00373D64 48 00 00 1C */ b lbl_80376E20 +lbl_80376E08: +/* 80376E08 00373D68 88 05 04 1C */ lbz r0, 0x41c(r5) +/* 80376E0C 00373D6C 28 00 00 00 */ cmplwi r0, 0 +/* 80376E10 00373D70 41 82 00 0C */ beq lbl_80376E1C +/* 80376E14 00373D74 38 80 00 01 */ li r4, 1 +/* 80376E18 00373D78 48 00 00 08 */ b lbl_80376E20 +lbl_80376E1C: +/* 80376E1C 00373D7C 38 80 00 00 */ li r4, 0 +lbl_80376E20: +/* 80376E20 00373D80 80 C5 00 18 */ lwz r6, 0x18(r5) +/* 80376E24 00373D84 54 C0 07 BF */ clrlwi. r0, r6, 0x1e +/* 80376E28 00373D88 41 82 00 0C */ beq lbl_80376E34 +/* 80376E2C 00373D8C 38 60 00 01 */ li r3, 1 +/* 80376E30 00373D90 48 00 00 08 */ b lbl_80376E38 +lbl_80376E34: +/* 80376E34 00373D94 38 60 00 00 */ li r3, 0 +lbl_80376E38: +/* 80376E38 00373D98 54 C0 F7 BF */ rlwinm. r0, r6, 0x1e, 0x1e, 0x1f +/* 80376E3C 00373D9C 41 82 00 0C */ beq lbl_80376E48 +/* 80376E40 00373DA0 38 A0 00 01 */ li r5, 1 +/* 80376E44 00373DA4 48 00 00 08 */ b lbl_80376E4C +lbl_80376E48: +/* 80376E48 00373DA8 38 A0 00 00 */ li r5, 0 +lbl_80376E4C: +/* 80376E4C 00373DAC 54 C0 E7 BF */ rlwinm. r0, r6, 0x1c, 0x1e, 0x1f +/* 80376E50 00373DB0 7D 03 2A 14 */ add r8, r3, r5 +/* 80376E54 00373DB4 41 82 00 0C */ beq lbl_80376E60 +/* 80376E58 00373DB8 38 60 00 01 */ li r3, 1 +/* 80376E5C 00373DBC 48 00 00 08 */ b lbl_80376E64 +lbl_80376E60: +/* 80376E60 00373DC0 38 60 00 00 */ li r3, 0 +lbl_80376E64: +/* 80376E64 00373DC4 54 C0 D7 BF */ rlwinm. r0, r6, 0x1a, 0x1e, 0x1f +/* 80376E68 00373DC8 7D 08 1A 14 */ add r8, r8, r3 +/* 80376E6C 00373DCC 41 82 00 0C */ beq lbl_80376E78 +/* 80376E70 00373DD0 38 60 00 01 */ li r3, 1 +/* 80376E74 00373DD4 48 00 00 08 */ b lbl_80376E7C +lbl_80376E78: +/* 80376E78 00373DD8 38 60 00 00 */ li r3, 0 +lbl_80376E7C: +/* 80376E7C 00373DDC 54 C0 C7 BF */ rlwinm. r0, r6, 0x18, 0x1e, 0x1f +/* 80376E80 00373DE0 7D 08 1A 14 */ add r8, r8, r3 +/* 80376E84 00373DE4 41 82 00 0C */ beq lbl_80376E90 +/* 80376E88 00373DE8 38 60 00 01 */ li r3, 1 +/* 80376E8C 00373DEC 48 00 00 08 */ b lbl_80376E94 +lbl_80376E90: +/* 80376E90 00373DF0 38 60 00 00 */ li r3, 0 +lbl_80376E94: +/* 80376E94 00373DF4 54 C0 B7 BF */ rlwinm. r0, r6, 0x16, 0x1e, 0x1f +/* 80376E98 00373DF8 7D 08 1A 14 */ add r8, r8, r3 +/* 80376E9C 00373DFC 41 82 00 0C */ beq lbl_80376EA8 +/* 80376EA0 00373E00 38 60 00 01 */ li r3, 1 +/* 80376EA4 00373E04 48 00 00 08 */ b lbl_80376EAC +lbl_80376EA8: +/* 80376EA8 00373E08 38 60 00 00 */ li r3, 0 +lbl_80376EAC: +/* 80376EAC 00373E0C 54 C0 A7 BF */ rlwinm. r0, r6, 0x14, 0x1e, 0x1f +/* 80376EB0 00373E10 7D 08 1A 14 */ add r8, r8, r3 +/* 80376EB4 00373E14 41 82 00 0C */ beq lbl_80376EC0 +/* 80376EB8 00373E18 38 60 00 01 */ li r3, 1 +/* 80376EBC 00373E1C 48 00 00 08 */ b lbl_80376EC4 +lbl_80376EC0: +/* 80376EC0 00373E20 38 60 00 00 */ li r3, 0 +lbl_80376EC4: +/* 80376EC4 00373E24 54 C0 97 BF */ rlwinm. r0, r6, 0x12, 0x1e, 0x1f +/* 80376EC8 00373E28 7D 08 1A 14 */ add r8, r8, r3 +/* 80376ECC 00373E2C 41 82 00 0C */ beq lbl_80376ED8 +/* 80376ED0 00373E30 38 C0 00 01 */ li r6, 1 +/* 80376ED4 00373E34 48 00 00 08 */ b lbl_80376EDC +lbl_80376ED8: +/* 80376ED8 00373E38 38 C0 00 00 */ li r6, 0 +lbl_80376EDC: +/* 80376EDC 00373E3C 38 00 00 10 */ li r0, 0x10 +/* 80376EE0 00373E40 80 62 CE 08 */ lwz r3, lbl_805AEB28@sda21(r2) +/* 80376EE4 00373E44 3C A0 CC 01 */ lis r5, 0xCC008000@ha +/* 80376EE8 00373E48 7D 08 32 14 */ add r8, r8, r6 +/* 80376EEC 00373E4C 98 05 80 00 */ stb r0, 0xCC008000@l(r5) +/* 80376EF0 00373E50 54 80 10 3A */ slwi r0, r4, 2 +/* 80376EF4 00373E54 38 80 10 08 */ li r4, 0x1008 +/* 80376EF8 00373E58 90 85 80 00 */ stw r4, 0xCC008000@l(r5) +/* 80376EFC 00373E5C 55 04 20 36 */ slwi r4, r8, 4 +/* 80376F00 00373E60 7C E0 03 78 */ or r0, r7, r0 +/* 80376F04 00373E64 7C 80 03 78 */ or r0, r4, r0 +/* 80376F08 00373E68 90 05 80 00 */ stw r0, 0xCC008000@l(r5) +/* 80376F0C 00373E6C 38 00 00 01 */ li r0, 1 +/* 80376F10 00373E70 B0 03 00 02 */ sth r0, 2(r3) +/* 80376F14 00373E74 4E 80 00 20 */ blr + +.global GXSetVtxDesc +GXSetVtxDesc: +/* 80376F18 00373E78 28 03 00 19 */ cmplwi r3, 0x19 +/* 80376F1C 00373E7C 41 81 02 F0 */ bgt lbl_8037720C +/* 80376F20 00373E80 3C A0 80 3F */ lis r5, lbl_803F0718@ha +/* 80376F24 00373E84 38 A5 07 18 */ addi r5, r5, lbl_803F0718@l +/* 80376F28 00373E88 54 60 10 3A */ slwi r0, r3, 2 +/* 80376F2C 00373E8C 7C 05 00 2E */ lwzx r0, r5, r0 +/* 80376F30 00373E90 7C 09 03 A6 */ mtctr r0 +/* 80376F34 00373E94 4E 80 04 20 */ bctr +/* 80376F38 00373E98 80 62 CE 08 */ lwz r3, lbl_805AEB28@sda21(r2) +/* 80376F3C 00373E9C 84 03 00 14 */ lwzu r0, 0x14(r3) +/* 80376F40 00373EA0 54 00 00 3C */ rlwinm r0, r0, 0, 0, 0x1e +/* 80376F44 00373EA4 7C 00 23 78 */ or r0, r0, r4 +/* 80376F48 00373EA8 90 03 00 00 */ stw r0, 0(r3) +/* 80376F4C 00373EAC 48 00 02 C0 */ b lbl_8037720C +/* 80376F50 00373EB0 80 62 CE 08 */ lwz r3, lbl_805AEB28@sda21(r2) +/* 80376F54 00373EB4 54 80 08 3C */ slwi r0, r4, 1 +/* 80376F58 00373EB8 38 83 00 14 */ addi r4, r3, 0x14 +/* 80376F5C 00373EBC 80 63 00 14 */ lwz r3, 0x14(r3) +/* 80376F60 00373EC0 54 63 07 FA */ rlwinm r3, r3, 0, 0x1f, 0x1d +/* 80376F64 00373EC4 7C 60 03 78 */ or r0, r3, r0 +/* 80376F68 00373EC8 90 04 00 00 */ stw r0, 0(r4) +/* 80376F6C 00373ECC 48 00 02 A0 */ b lbl_8037720C +/* 80376F70 00373ED0 80 62 CE 08 */ lwz r3, lbl_805AEB28@sda21(r2) +/* 80376F74 00373ED4 54 80 10 3A */ slwi r0, r4, 2 +/* 80376F78 00373ED8 38 83 00 14 */ addi r4, r3, 0x14 +/* 80376F7C 00373EDC 80 63 00 14 */ lwz r3, 0x14(r3) +/* 80376F80 00373EE0 54 63 07 B8 */ rlwinm r3, r3, 0, 0x1e, 0x1c +/* 80376F84 00373EE4 7C 60 03 78 */ or r0, r3, r0 +/* 80376F88 00373EE8 90 04 00 00 */ stw r0, 0(r4) +/* 80376F8C 00373EEC 48 00 02 80 */ b lbl_8037720C +/* 80376F90 00373EF0 80 62 CE 08 */ lwz r3, lbl_805AEB28@sda21(r2) +/* 80376F94 00373EF4 54 80 18 38 */ slwi r0, r4, 3 +/* 80376F98 00373EF8 38 83 00 14 */ addi r4, r3, 0x14 +/* 80376F9C 00373EFC 80 63 00 14 */ lwz r3, 0x14(r3) +/* 80376FA0 00373F00 54 63 07 76 */ rlwinm r3, r3, 0, 0x1d, 0x1b +/* 80376FA4 00373F04 7C 60 03 78 */ or r0, r3, r0 +/* 80376FA8 00373F08 90 04 00 00 */ stw r0, 0(r4) +/* 80376FAC 00373F0C 48 00 02 60 */ b lbl_8037720C +/* 80376FB0 00373F10 80 62 CE 08 */ lwz r3, lbl_805AEB28@sda21(r2) +/* 80376FB4 00373F14 54 80 20 36 */ slwi r0, r4, 4 +/* 80376FB8 00373F18 38 83 00 14 */ addi r4, r3, 0x14 +/* 80376FBC 00373F1C 80 63 00 14 */ lwz r3, 0x14(r3) +/* 80376FC0 00373F20 54 63 07 34 */ rlwinm r3, r3, 0, 0x1c, 0x1a +/* 80376FC4 00373F24 7C 60 03 78 */ or r0, r3, r0 +/* 80376FC8 00373F28 90 04 00 00 */ stw r0, 0(r4) +/* 80376FCC 00373F2C 48 00 02 40 */ b lbl_8037720C +/* 80376FD0 00373F30 80 62 CE 08 */ lwz r3, lbl_805AEB28@sda21(r2) +/* 80376FD4 00373F34 54 80 28 34 */ slwi r0, r4, 5 +/* 80376FD8 00373F38 38 83 00 14 */ addi r4, r3, 0x14 +/* 80376FDC 00373F3C 80 63 00 14 */ lwz r3, 0x14(r3) +/* 80376FE0 00373F40 54 63 06 F2 */ rlwinm r3, r3, 0, 0x1b, 0x19 +/* 80376FE4 00373F44 7C 60 03 78 */ or r0, r3, r0 +/* 80376FE8 00373F48 90 04 00 00 */ stw r0, 0(r4) +/* 80376FEC 00373F4C 48 00 02 20 */ b lbl_8037720C +/* 80376FF0 00373F50 80 62 CE 08 */ lwz r3, lbl_805AEB28@sda21(r2) +/* 80376FF4 00373F54 54 80 30 32 */ slwi r0, r4, 6 +/* 80376FF8 00373F58 38 83 00 14 */ addi r4, r3, 0x14 +/* 80376FFC 00373F5C 80 63 00 14 */ lwz r3, 0x14(r3) +/* 80377000 00373F60 54 63 06 B0 */ rlwinm r3, r3, 0, 0x1a, 0x18 +/* 80377004 00373F64 7C 60 03 78 */ or r0, r3, r0 +/* 80377008 00373F68 90 04 00 00 */ stw r0, 0(r4) +/* 8037700C 00373F6C 48 00 02 00 */ b lbl_8037720C +/* 80377010 00373F70 80 62 CE 08 */ lwz r3, lbl_805AEB28@sda21(r2) +/* 80377014 00373F74 54 80 38 30 */ slwi r0, r4, 7 +/* 80377018 00373F78 38 83 00 14 */ addi r4, r3, 0x14 +/* 8037701C 00373F7C 80 63 00 14 */ lwz r3, 0x14(r3) +/* 80377020 00373F80 54 63 06 6E */ rlwinm r3, r3, 0, 0x19, 0x17 +/* 80377024 00373F84 7C 60 03 78 */ or r0, r3, r0 +/* 80377028 00373F88 90 04 00 00 */ stw r0, 0(r4) +/* 8037702C 00373F8C 48 00 01 E0 */ b lbl_8037720C +/* 80377030 00373F90 80 62 CE 08 */ lwz r3, lbl_805AEB28@sda21(r2) +/* 80377034 00373F94 54 80 40 2E */ slwi r0, r4, 8 +/* 80377038 00373F98 38 83 00 14 */ addi r4, r3, 0x14 +/* 8037703C 00373F9C 80 63 00 14 */ lwz r3, 0x14(r3) +/* 80377040 00373FA0 54 63 06 2C */ rlwinm r3, r3, 0, 0x18, 0x16 +/* 80377044 00373FA4 7C 60 03 78 */ or r0, r3, r0 +/* 80377048 00373FA8 90 04 00 00 */ stw r0, 0(r4) +/* 8037704C 00373FAC 48 00 01 C0 */ b lbl_8037720C +/* 80377050 00373FB0 80 62 CE 08 */ lwz r3, lbl_805AEB28@sda21(r2) +/* 80377054 00373FB4 54 80 48 2C */ slwi r0, r4, 9 +/* 80377058 00373FB8 38 83 00 14 */ addi r4, r3, 0x14 +/* 8037705C 00373FBC 80 63 00 14 */ lwz r3, 0x14(r3) +/* 80377060 00373FC0 54 63 05 E8 */ rlwinm r3, r3, 0, 0x17, 0x14 +/* 80377064 00373FC4 7C 60 03 78 */ or r0, r3, r0 +/* 80377068 00373FC8 90 04 00 00 */ stw r0, 0(r4) +/* 8037706C 00373FCC 48 00 01 A0 */ b lbl_8037720C +/* 80377070 00373FD0 2C 04 00 00 */ cmpwi r4, 0 +/* 80377074 00373FD4 41 82 00 20 */ beq lbl_80377094 +/* 80377078 00373FD8 80 62 CE 08 */ lwz r3, lbl_805AEB28@sda21(r2) +/* 8037707C 00373FDC 38 A0 00 01 */ li r5, 1 +/* 80377080 00373FE0 38 00 00 00 */ li r0, 0 +/* 80377084 00373FE4 98 A3 04 1C */ stb r5, 0x41c(r3) +/* 80377088 00373FE8 98 03 04 1D */ stb r0, 0x41d(r3) +/* 8037708C 00373FEC 90 83 04 18 */ stw r4, 0x418(r3) +/* 80377090 00373FF0 48 00 01 7C */ b lbl_8037720C +lbl_80377094: +/* 80377094 00373FF4 80 62 CE 08 */ lwz r3, lbl_805AEB28@sda21(r2) +/* 80377098 00373FF8 38 00 00 00 */ li r0, 0 +/* 8037709C 00373FFC 98 03 04 1C */ stb r0, 0x41c(r3) +/* 803770A0 00374000 48 00 01 6C */ b lbl_8037720C +/* 803770A4 00374004 2C 04 00 00 */ cmpwi r4, 0 +/* 803770A8 00374008 41 82 00 20 */ beq lbl_803770C8 +/* 803770AC 0037400C 80 62 CE 08 */ lwz r3, lbl_805AEB28@sda21(r2) +/* 803770B0 00374010 38 A0 00 01 */ li r5, 1 +/* 803770B4 00374014 38 00 00 00 */ li r0, 0 +/* 803770B8 00374018 98 A3 04 1D */ stb r5, 0x41d(r3) +/* 803770BC 0037401C 98 03 04 1C */ stb r0, 0x41c(r3) +/* 803770C0 00374020 90 83 04 18 */ stw r4, 0x418(r3) +/* 803770C4 00374024 48 00 01 48 */ b lbl_8037720C +lbl_803770C8: +/* 803770C8 00374028 80 62 CE 08 */ lwz r3, lbl_805AEB28@sda21(r2) +/* 803770CC 0037402C 38 00 00 00 */ li r0, 0 +/* 803770D0 00374030 98 03 04 1D */ stb r0, 0x41d(r3) +/* 803770D4 00374034 48 00 01 38 */ b lbl_8037720C +/* 803770D8 00374038 80 62 CE 08 */ lwz r3, lbl_805AEB28@sda21(r2) +/* 803770DC 0037403C 54 80 68 24 */ slwi r0, r4, 0xd +/* 803770E0 00374040 38 83 00 14 */ addi r4, r3, 0x14 +/* 803770E4 00374044 80 63 00 14 */ lwz r3, 0x14(r3) +/* 803770E8 00374048 54 63 04 E0 */ rlwinm r3, r3, 0, 0x13, 0x10 +/* 803770EC 0037404C 7C 60 03 78 */ or r0, r3, r0 +/* 803770F0 00374050 90 04 00 00 */ stw r0, 0(r4) +/* 803770F4 00374054 48 00 01 18 */ b lbl_8037720C +/* 803770F8 00374058 80 62 CE 08 */ lwz r3, lbl_805AEB28@sda21(r2) +/* 803770FC 0037405C 54 80 78 20 */ slwi r0, r4, 0xf +/* 80377100 00374060 38 83 00 14 */ addi r4, r3, 0x14 +/* 80377104 00374064 80 63 00 14 */ lwz r3, 0x14(r3) +/* 80377108 00374068 54 63 04 5C */ rlwinm r3, r3, 0, 0x11, 0xe +/* 8037710C 0037406C 7C 60 03 78 */ or r0, r3, r0 +/* 80377110 00374070 90 04 00 00 */ stw r0, 0(r4) +/* 80377114 00374074 48 00 00 F8 */ b lbl_8037720C +/* 80377118 00374078 80 62 CE 08 */ lwz r3, lbl_805AEB28@sda21(r2) +/* 8037711C 0037407C 84 03 00 18 */ lwzu r0, 0x18(r3) +/* 80377120 00374080 54 00 00 3A */ rlwinm r0, r0, 0, 0, 0x1d +/* 80377124 00374084 7C 00 23 78 */ or r0, r0, r4 +/* 80377128 00374088 90 03 00 00 */ stw r0, 0(r3) +/* 8037712C 0037408C 48 00 00 E0 */ b lbl_8037720C +/* 80377130 00374090 80 62 CE 08 */ lwz r3, lbl_805AEB28@sda21(r2) +/* 80377134 00374094 54 80 10 3A */ slwi r0, r4, 2 +/* 80377138 00374098 38 83 00 18 */ addi r4, r3, 0x18 +/* 8037713C 0037409C 80 63 00 18 */ lwz r3, 0x18(r3) +/* 80377140 003740A0 54 63 07 B6 */ rlwinm r3, r3, 0, 0x1e, 0x1b +/* 80377144 003740A4 7C 60 03 78 */ or r0, r3, r0 +/* 80377148 003740A8 90 04 00 00 */ stw r0, 0(r4) +/* 8037714C 003740AC 48 00 00 C0 */ b lbl_8037720C +/* 80377150 003740B0 80 62 CE 08 */ lwz r3, lbl_805AEB28@sda21(r2) +/* 80377154 003740B4 54 80 20 36 */ slwi r0, r4, 4 +/* 80377158 003740B8 38 83 00 18 */ addi r4, r3, 0x18 +/* 8037715C 003740BC 80 63 00 18 */ lwz r3, 0x18(r3) +/* 80377160 003740C0 54 63 07 32 */ rlwinm r3, r3, 0, 0x1c, 0x19 +/* 80377164 003740C4 7C 60 03 78 */ or r0, r3, r0 +/* 80377168 003740C8 90 04 00 00 */ stw r0, 0(r4) +/* 8037716C 003740CC 48 00 00 A0 */ b lbl_8037720C +/* 80377170 003740D0 80 62 CE 08 */ lwz r3, lbl_805AEB28@sda21(r2) +/* 80377174 003740D4 54 80 30 32 */ slwi r0, r4, 6 +/* 80377178 003740D8 38 83 00 18 */ addi r4, r3, 0x18 +/* 8037717C 003740DC 80 63 00 18 */ lwz r3, 0x18(r3) +/* 80377180 003740E0 54 63 06 AE */ rlwinm r3, r3, 0, 0x1a, 0x17 +/* 80377184 003740E4 7C 60 03 78 */ or r0, r3, r0 +/* 80377188 003740E8 90 04 00 00 */ stw r0, 0(r4) +/* 8037718C 003740EC 48 00 00 80 */ b lbl_8037720C +/* 80377190 003740F0 80 62 CE 08 */ lwz r3, lbl_805AEB28@sda21(r2) +/* 80377194 003740F4 54 80 40 2E */ slwi r0, r4, 8 +/* 80377198 003740F8 38 83 00 18 */ addi r4, r3, 0x18 +/* 8037719C 003740FC 80 63 00 18 */ lwz r3, 0x18(r3) +/* 803771A0 00374100 54 63 06 2A */ rlwinm r3, r3, 0, 0x18, 0x15 +/* 803771A4 00374104 7C 60 03 78 */ or r0, r3, r0 +/* 803771A8 00374108 90 04 00 00 */ stw r0, 0(r4) +/* 803771AC 0037410C 48 00 00 60 */ b lbl_8037720C +/* 803771B0 00374110 80 62 CE 08 */ lwz r3, lbl_805AEB28@sda21(r2) +/* 803771B4 00374114 54 80 50 2A */ slwi r0, r4, 0xa +/* 803771B8 00374118 38 83 00 18 */ addi r4, r3, 0x18 +/* 803771BC 0037411C 80 63 00 18 */ lwz r3, 0x18(r3) +/* 803771C0 00374120 54 63 05 A6 */ rlwinm r3, r3, 0, 0x16, 0x13 +/* 803771C4 00374124 7C 60 03 78 */ or r0, r3, r0 +/* 803771C8 00374128 90 04 00 00 */ stw r0, 0(r4) +/* 803771CC 0037412C 48 00 00 40 */ b lbl_8037720C +/* 803771D0 00374130 80 62 CE 08 */ lwz r3, lbl_805AEB28@sda21(r2) +/* 803771D4 00374134 54 80 60 26 */ slwi r0, r4, 0xc +/* 803771D8 00374138 38 83 00 18 */ addi r4, r3, 0x18 +/* 803771DC 0037413C 80 63 00 18 */ lwz r3, 0x18(r3) +/* 803771E0 00374140 54 63 05 22 */ rlwinm r3, r3, 0, 0x14, 0x11 +/* 803771E4 00374144 7C 60 03 78 */ or r0, r3, r0 +/* 803771E8 00374148 90 04 00 00 */ stw r0, 0(r4) +/* 803771EC 0037414C 48 00 00 20 */ b lbl_8037720C +/* 803771F0 00374150 80 62 CE 08 */ lwz r3, lbl_805AEB28@sda21(r2) +/* 803771F4 00374154 54 80 70 22 */ slwi r0, r4, 0xe +/* 803771F8 00374158 38 83 00 18 */ addi r4, r3, 0x18 +/* 803771FC 0037415C 80 63 00 18 */ lwz r3, 0x18(r3) +/* 80377200 00374160 54 63 04 9E */ rlwinm r3, r3, 0, 0x12, 0xf +/* 80377204 00374164 7C 60 03 78 */ or r0, r3, r0 +/* 80377208 00374168 90 04 00 00 */ stw r0, 0(r4) +lbl_8037720C: +/* 8037720C 0037416C 80 62 CE 08 */ lwz r3, lbl_805AEB28@sda21(r2) +/* 80377210 00374170 88 03 04 1C */ lbz r0, 0x41c(r3) +/* 80377214 00374174 28 00 00 00 */ cmplwi r0, 0 +/* 80377218 00374178 40 82 00 10 */ bne lbl_80377228 +/* 8037721C 0037417C 88 03 04 1D */ lbz r0, 0x41d(r3) +/* 80377220 00374180 28 00 00 00 */ cmplwi r0, 0 +/* 80377224 00374184 41 82 00 24 */ beq lbl_80377248 +lbl_80377228: +/* 80377228 00374188 38 83 00 14 */ addi r4, r3, 0x14 +/* 8037722C 0037418C 80 03 04 18 */ lwz r0, 0x418(r3) +/* 80377230 00374190 80 63 00 14 */ lwz r3, 0x14(r3) +/* 80377234 00374194 54 00 58 28 */ slwi r0, r0, 0xb +/* 80377238 00374198 54 63 05 64 */ rlwinm r3, r3, 0, 0x15, 0x12 +/* 8037723C 0037419C 7C 60 03 78 */ or r0, r3, r0 +/* 80377240 003741A0 90 04 00 00 */ stw r0, 0(r4) +/* 80377244 003741A4 48 00 00 10 */ b lbl_80377254 +lbl_80377248: +/* 80377248 003741A8 84 03 00 14 */ lwzu r0, 0x14(r3) +/* 8037724C 003741AC 54 00 05 64 */ rlwinm r0, r0, 0, 0x15, 0x12 +/* 80377250 003741B0 90 03 00 00 */ stw r0, 0(r3) +lbl_80377254: +/* 80377254 003741B4 80 62 CE 08 */ lwz r3, lbl_805AEB28@sda21(r2) +/* 80377258 003741B8 80 03 04 F4 */ lwz r0, 0x4f4(r3) +/* 8037725C 003741BC 60 00 00 08 */ ori r0, r0, 8 +/* 80377260 003741C0 90 03 04 F4 */ stw r0, 0x4f4(r3) +/* 80377264 003741C4 4E 80 00 20 */ blr + +.global GXSetVtxDescv +GXSetVtxDescv: +/* 80377268 003741C8 3C 80 80 3F */ lis r4, lbl_803F0780@ha +/* 8037726C 003741CC 38 84 07 80 */ addi r4, r4, lbl_803F0780@l +/* 80377270 003741D0 48 00 03 04 */ b lbl_80377574 +lbl_80377274: +/* 80377274 003741D4 80 A3 00 00 */ lwz r5, 0(r3) +/* 80377278 003741D8 80 03 00 04 */ lwz r0, 4(r3) +/* 8037727C 003741DC 28 05 00 19 */ cmplwi r5, 0x19 +/* 80377280 003741E0 41 81 02 F0 */ bgt lbl_80377570 +/* 80377284 003741E4 54 A5 10 3A */ slwi r5, r5, 2 +/* 80377288 003741E8 7C A4 28 2E */ lwzx r5, r4, r5 +/* 8037728C 003741EC 7C A9 03 A6 */ mtctr r5 +/* 80377290 003741F0 4E 80 04 20 */ bctr +/* 80377294 003741F4 80 A2 CE 08 */ lwz r5, lbl_805AEB28@sda21(r2) +/* 80377298 003741F8 38 C5 00 14 */ addi r6, r5, 0x14 +/* 8037729C 003741FC 80 A5 00 14 */ lwz r5, 0x14(r5) +/* 803772A0 00374200 54 A5 00 3C */ rlwinm r5, r5, 0, 0, 0x1e +/* 803772A4 00374204 7C A0 03 78 */ or r0, r5, r0 +/* 803772A8 00374208 90 06 00 00 */ stw r0, 0(r6) +/* 803772AC 0037420C 48 00 02 C4 */ b lbl_80377570 +/* 803772B0 00374210 80 A2 CE 08 */ lwz r5, lbl_805AEB28@sda21(r2) +/* 803772B4 00374214 54 00 08 3C */ slwi r0, r0, 1 +/* 803772B8 00374218 38 C5 00 14 */ addi r6, r5, 0x14 +/* 803772BC 0037421C 80 A5 00 14 */ lwz r5, 0x14(r5) +/* 803772C0 00374220 54 A5 07 FA */ rlwinm r5, r5, 0, 0x1f, 0x1d +/* 803772C4 00374224 7C A0 03 78 */ or r0, r5, r0 +/* 803772C8 00374228 90 06 00 00 */ stw r0, 0(r6) +/* 803772CC 0037422C 48 00 02 A4 */ b lbl_80377570 +/* 803772D0 00374230 80 A2 CE 08 */ lwz r5, lbl_805AEB28@sda21(r2) +/* 803772D4 00374234 54 00 10 3A */ slwi r0, r0, 2 +/* 803772D8 00374238 38 C5 00 14 */ addi r6, r5, 0x14 +/* 803772DC 0037423C 80 A5 00 14 */ lwz r5, 0x14(r5) +/* 803772E0 00374240 54 A5 07 B8 */ rlwinm r5, r5, 0, 0x1e, 0x1c +/* 803772E4 00374244 7C A0 03 78 */ or r0, r5, r0 +/* 803772E8 00374248 90 06 00 00 */ stw r0, 0(r6) +/* 803772EC 0037424C 48 00 02 84 */ b lbl_80377570 +/* 803772F0 00374250 80 A2 CE 08 */ lwz r5, lbl_805AEB28@sda21(r2) +/* 803772F4 00374254 54 00 18 38 */ slwi r0, r0, 3 +/* 803772F8 00374258 38 C5 00 14 */ addi r6, r5, 0x14 +/* 803772FC 0037425C 80 A5 00 14 */ lwz r5, 0x14(r5) +/* 80377300 00374260 54 A5 07 76 */ rlwinm r5, r5, 0, 0x1d, 0x1b +/* 80377304 00374264 7C A0 03 78 */ or r0, r5, r0 +/* 80377308 00374268 90 06 00 00 */ stw r0, 0(r6) +/* 8037730C 0037426C 48 00 02 64 */ b lbl_80377570 +/* 80377310 00374270 80 A2 CE 08 */ lwz r5, lbl_805AEB28@sda21(r2) +/* 80377314 00374274 54 00 20 36 */ slwi r0, r0, 4 +/* 80377318 00374278 38 C5 00 14 */ addi r6, r5, 0x14 +/* 8037731C 0037427C 80 A5 00 14 */ lwz r5, 0x14(r5) +/* 80377320 00374280 54 A5 07 34 */ rlwinm r5, r5, 0, 0x1c, 0x1a +/* 80377324 00374284 7C A0 03 78 */ or r0, r5, r0 +/* 80377328 00374288 90 06 00 00 */ stw r0, 0(r6) +/* 8037732C 0037428C 48 00 02 44 */ b lbl_80377570 +/* 80377330 00374290 80 A2 CE 08 */ lwz r5, lbl_805AEB28@sda21(r2) +/* 80377334 00374294 54 00 28 34 */ slwi r0, r0, 5 +/* 80377338 00374298 38 C5 00 14 */ addi r6, r5, 0x14 +/* 8037733C 0037429C 80 A5 00 14 */ lwz r5, 0x14(r5) +/* 80377340 003742A0 54 A5 06 F2 */ rlwinm r5, r5, 0, 0x1b, 0x19 +/* 80377344 003742A4 7C A0 03 78 */ or r0, r5, r0 +/* 80377348 003742A8 90 06 00 00 */ stw r0, 0(r6) +/* 8037734C 003742AC 48 00 02 24 */ b lbl_80377570 +/* 80377350 003742B0 80 A2 CE 08 */ lwz r5, lbl_805AEB28@sda21(r2) +/* 80377354 003742B4 54 00 30 32 */ slwi r0, r0, 6 +/* 80377358 003742B8 38 C5 00 14 */ addi r6, r5, 0x14 +/* 8037735C 003742BC 80 A5 00 14 */ lwz r5, 0x14(r5) +/* 80377360 003742C0 54 A5 06 B0 */ rlwinm r5, r5, 0, 0x1a, 0x18 +/* 80377364 003742C4 7C A0 03 78 */ or r0, r5, r0 +/* 80377368 003742C8 90 06 00 00 */ stw r0, 0(r6) +/* 8037736C 003742CC 48 00 02 04 */ b lbl_80377570 +/* 80377370 003742D0 80 A2 CE 08 */ lwz r5, lbl_805AEB28@sda21(r2) +/* 80377374 003742D4 54 00 38 30 */ slwi r0, r0, 7 +/* 80377378 003742D8 38 C5 00 14 */ addi r6, r5, 0x14 +/* 8037737C 003742DC 80 A5 00 14 */ lwz r5, 0x14(r5) +/* 80377380 003742E0 54 A5 06 6E */ rlwinm r5, r5, 0, 0x19, 0x17 +/* 80377384 003742E4 7C A0 03 78 */ or r0, r5, r0 +/* 80377388 003742E8 90 06 00 00 */ stw r0, 0(r6) +/* 8037738C 003742EC 48 00 01 E4 */ b lbl_80377570 +/* 80377390 003742F0 80 A2 CE 08 */ lwz r5, lbl_805AEB28@sda21(r2) +/* 80377394 003742F4 54 00 40 2E */ slwi r0, r0, 8 +/* 80377398 003742F8 38 C5 00 14 */ addi r6, r5, 0x14 +/* 8037739C 003742FC 80 A5 00 14 */ lwz r5, 0x14(r5) +/* 803773A0 00374300 54 A5 06 2C */ rlwinm r5, r5, 0, 0x18, 0x16 +/* 803773A4 00374304 7C A0 03 78 */ or r0, r5, r0 +/* 803773A8 00374308 90 06 00 00 */ stw r0, 0(r6) +/* 803773AC 0037430C 48 00 01 C4 */ b lbl_80377570 +/* 803773B0 00374310 80 A2 CE 08 */ lwz r5, lbl_805AEB28@sda21(r2) +/* 803773B4 00374314 54 00 48 2C */ slwi r0, r0, 9 +/* 803773B8 00374318 38 C5 00 14 */ addi r6, r5, 0x14 +/* 803773BC 0037431C 80 A5 00 14 */ lwz r5, 0x14(r5) +/* 803773C0 00374320 54 A5 05 E8 */ rlwinm r5, r5, 0, 0x17, 0x14 +/* 803773C4 00374324 7C A0 03 78 */ or r0, r5, r0 +/* 803773C8 00374328 90 06 00 00 */ stw r0, 0(r6) +/* 803773CC 0037432C 48 00 01 A4 */ b lbl_80377570 +/* 803773D0 00374330 2C 00 00 00 */ cmpwi r0, 0 +/* 803773D4 00374334 41 82 00 20 */ beq lbl_803773F4 +/* 803773D8 00374338 80 C2 CE 08 */ lwz r6, lbl_805AEB28@sda21(r2) +/* 803773DC 0037433C 38 E0 00 01 */ li r7, 1 +/* 803773E0 00374340 38 A0 00 00 */ li r5, 0 +/* 803773E4 00374344 98 E6 04 1C */ stb r7, 0x41c(r6) +/* 803773E8 00374348 98 A6 04 1D */ stb r5, 0x41d(r6) +/* 803773EC 0037434C 90 06 04 18 */ stw r0, 0x418(r6) +/* 803773F0 00374350 48 00 01 80 */ b lbl_80377570 +lbl_803773F4: +/* 803773F4 00374354 80 A2 CE 08 */ lwz r5, lbl_805AEB28@sda21(r2) +/* 803773F8 00374358 38 00 00 00 */ li r0, 0 +/* 803773FC 0037435C 98 05 04 1C */ stb r0, 0x41c(r5) +/* 80377400 00374360 48 00 01 70 */ b lbl_80377570 +/* 80377404 00374364 2C 00 00 00 */ cmpwi r0, 0 +/* 80377408 00374368 41 82 00 20 */ beq lbl_80377428 +/* 8037740C 0037436C 80 C2 CE 08 */ lwz r6, lbl_805AEB28@sda21(r2) +/* 80377410 00374370 38 E0 00 01 */ li r7, 1 +/* 80377414 00374374 38 A0 00 00 */ li r5, 0 +/* 80377418 00374378 98 E6 04 1D */ stb r7, 0x41d(r6) +/* 8037741C 0037437C 98 A6 04 1C */ stb r5, 0x41c(r6) +/* 80377420 00374380 90 06 04 18 */ stw r0, 0x418(r6) +/* 80377424 00374384 48 00 01 4C */ b lbl_80377570 +lbl_80377428: +/* 80377428 00374388 80 A2 CE 08 */ lwz r5, lbl_805AEB28@sda21(r2) +/* 8037742C 0037438C 38 00 00 00 */ li r0, 0 +/* 80377430 00374390 98 05 04 1D */ stb r0, 0x41d(r5) +/* 80377434 00374394 48 00 01 3C */ b lbl_80377570 +/* 80377438 00374398 80 A2 CE 08 */ lwz r5, lbl_805AEB28@sda21(r2) +/* 8037743C 0037439C 54 00 68 24 */ slwi r0, r0, 0xd +/* 80377440 003743A0 38 C5 00 14 */ addi r6, r5, 0x14 +/* 80377444 003743A4 80 A5 00 14 */ lwz r5, 0x14(r5) +/* 80377448 003743A8 54 A5 04 E0 */ rlwinm r5, r5, 0, 0x13, 0x10 +/* 8037744C 003743AC 7C A0 03 78 */ or r0, r5, r0 +/* 80377450 003743B0 90 06 00 00 */ stw r0, 0(r6) +/* 80377454 003743B4 48 00 01 1C */ b lbl_80377570 +/* 80377458 003743B8 80 A2 CE 08 */ lwz r5, lbl_805AEB28@sda21(r2) +/* 8037745C 003743BC 54 00 78 20 */ slwi r0, r0, 0xf +/* 80377460 003743C0 38 C5 00 14 */ addi r6, r5, 0x14 +/* 80377464 003743C4 80 A5 00 14 */ lwz r5, 0x14(r5) +/* 80377468 003743C8 54 A5 04 5C */ rlwinm r5, r5, 0, 0x11, 0xe +/* 8037746C 003743CC 7C A0 03 78 */ or r0, r5, r0 +/* 80377470 003743D0 90 06 00 00 */ stw r0, 0(r6) +/* 80377474 003743D4 48 00 00 FC */ b lbl_80377570 +/* 80377478 003743D8 80 A2 CE 08 */ lwz r5, lbl_805AEB28@sda21(r2) +/* 8037747C 003743DC 38 C5 00 18 */ addi r6, r5, 0x18 +/* 80377480 003743E0 80 A5 00 18 */ lwz r5, 0x18(r5) +/* 80377484 003743E4 54 A5 00 3A */ rlwinm r5, r5, 0, 0, 0x1d +/* 80377488 003743E8 7C A0 03 78 */ or r0, r5, r0 +/* 8037748C 003743EC 90 06 00 00 */ stw r0, 0(r6) +/* 80377490 003743F0 48 00 00 E0 */ b lbl_80377570 +/* 80377494 003743F4 80 A2 CE 08 */ lwz r5, lbl_805AEB28@sda21(r2) +/* 80377498 003743F8 54 00 10 3A */ slwi r0, r0, 2 +/* 8037749C 003743FC 38 C5 00 18 */ addi r6, r5, 0x18 +/* 803774A0 00374400 80 A5 00 18 */ lwz r5, 0x18(r5) +/* 803774A4 00374404 54 A5 07 B6 */ rlwinm r5, r5, 0, 0x1e, 0x1b +/* 803774A8 00374408 7C A0 03 78 */ or r0, r5, r0 +/* 803774AC 0037440C 90 06 00 00 */ stw r0, 0(r6) +/* 803774B0 00374410 48 00 00 C0 */ b lbl_80377570 +/* 803774B4 00374414 80 A2 CE 08 */ lwz r5, lbl_805AEB28@sda21(r2) +/* 803774B8 00374418 54 00 20 36 */ slwi r0, r0, 4 +/* 803774BC 0037441C 38 C5 00 18 */ addi r6, r5, 0x18 +/* 803774C0 00374420 80 A5 00 18 */ lwz r5, 0x18(r5) +/* 803774C4 00374424 54 A5 07 32 */ rlwinm r5, r5, 0, 0x1c, 0x19 +/* 803774C8 00374428 7C A0 03 78 */ or r0, r5, r0 +/* 803774CC 0037442C 90 06 00 00 */ stw r0, 0(r6) +/* 803774D0 00374430 48 00 00 A0 */ b lbl_80377570 +/* 803774D4 00374434 80 A2 CE 08 */ lwz r5, lbl_805AEB28@sda21(r2) +/* 803774D8 00374438 54 00 30 32 */ slwi r0, r0, 6 +/* 803774DC 0037443C 38 C5 00 18 */ addi r6, r5, 0x18 +/* 803774E0 00374440 80 A5 00 18 */ lwz r5, 0x18(r5) +/* 803774E4 00374444 54 A5 06 AE */ rlwinm r5, r5, 0, 0x1a, 0x17 +/* 803774E8 00374448 7C A0 03 78 */ or r0, r5, r0 +/* 803774EC 0037444C 90 06 00 00 */ stw r0, 0(r6) +/* 803774F0 00374450 48 00 00 80 */ b lbl_80377570 +/* 803774F4 00374454 80 A2 CE 08 */ lwz r5, lbl_805AEB28@sda21(r2) +/* 803774F8 00374458 54 00 40 2E */ slwi r0, r0, 8 +/* 803774FC 0037445C 38 C5 00 18 */ addi r6, r5, 0x18 +/* 80377500 00374460 80 A5 00 18 */ lwz r5, 0x18(r5) +/* 80377504 00374464 54 A5 06 2A */ rlwinm r5, r5, 0, 0x18, 0x15 +/* 80377508 00374468 7C A0 03 78 */ or r0, r5, r0 +/* 8037750C 0037446C 90 06 00 00 */ stw r0, 0(r6) +/* 80377510 00374470 48 00 00 60 */ b lbl_80377570 +/* 80377514 00374474 80 A2 CE 08 */ lwz r5, lbl_805AEB28@sda21(r2) +/* 80377518 00374478 54 00 50 2A */ slwi r0, r0, 0xa +/* 8037751C 0037447C 38 C5 00 18 */ addi r6, r5, 0x18 +/* 80377520 00374480 80 A5 00 18 */ lwz r5, 0x18(r5) +/* 80377524 00374484 54 A5 05 A6 */ rlwinm r5, r5, 0, 0x16, 0x13 +/* 80377528 00374488 7C A0 03 78 */ or r0, r5, r0 +/* 8037752C 0037448C 90 06 00 00 */ stw r0, 0(r6) +/* 80377530 00374490 48 00 00 40 */ b lbl_80377570 +/* 80377534 00374494 80 A2 CE 08 */ lwz r5, lbl_805AEB28@sda21(r2) +/* 80377538 00374498 54 00 60 26 */ slwi r0, r0, 0xc +/* 8037753C 0037449C 38 C5 00 18 */ addi r6, r5, 0x18 +/* 80377540 003744A0 80 A5 00 18 */ lwz r5, 0x18(r5) +/* 80377544 003744A4 54 A5 05 22 */ rlwinm r5, r5, 0, 0x14, 0x11 +/* 80377548 003744A8 7C A0 03 78 */ or r0, r5, r0 +/* 8037754C 003744AC 90 06 00 00 */ stw r0, 0(r6) +/* 80377550 003744B0 48 00 00 20 */ b lbl_80377570 +/* 80377554 003744B4 80 A2 CE 08 */ lwz r5, lbl_805AEB28@sda21(r2) +/* 80377558 003744B8 54 00 70 22 */ slwi r0, r0, 0xe +/* 8037755C 003744BC 38 C5 00 18 */ addi r6, r5, 0x18 +/* 80377560 003744C0 80 A5 00 18 */ lwz r5, 0x18(r5) +/* 80377564 003744C4 54 A5 04 9E */ rlwinm r5, r5, 0, 0x12, 0xf +/* 80377568 003744C8 7C A0 03 78 */ or r0, r5, r0 +/* 8037756C 003744CC 90 06 00 00 */ stw r0, 0(r6) +lbl_80377570: +/* 80377570 003744D0 38 63 00 08 */ addi r3, r3, 8 +lbl_80377574: +/* 80377574 003744D4 80 03 00 00 */ lwz r0, 0(r3) +/* 80377578 003744D8 2C 00 00 FF */ cmpwi r0, 0xff +/* 8037757C 003744DC 40 82 FC F8 */ bne lbl_80377274 +/* 80377580 003744E0 80 62 CE 08 */ lwz r3, lbl_805AEB28@sda21(r2) +/* 80377584 003744E4 88 03 04 1C */ lbz r0, 0x41c(r3) +/* 80377588 003744E8 28 00 00 00 */ cmplwi r0, 0 +/* 8037758C 003744EC 40 82 00 10 */ bne lbl_8037759C +/* 80377590 003744F0 88 03 04 1D */ lbz r0, 0x41d(r3) +/* 80377594 003744F4 28 00 00 00 */ cmplwi r0, 0 +/* 80377598 003744F8 41 82 00 24 */ beq lbl_803775BC +lbl_8037759C: +/* 8037759C 003744FC 38 83 00 14 */ addi r4, r3, 0x14 +/* 803775A0 00374500 80 03 04 18 */ lwz r0, 0x418(r3) +/* 803775A4 00374504 80 63 00 14 */ lwz r3, 0x14(r3) +/* 803775A8 00374508 54 00 58 28 */ slwi r0, r0, 0xb +/* 803775AC 0037450C 54 63 05 64 */ rlwinm r3, r3, 0, 0x15, 0x12 +/* 803775B0 00374510 7C 60 03 78 */ or r0, r3, r0 +/* 803775B4 00374514 90 04 00 00 */ stw r0, 0(r4) +/* 803775B8 00374518 48 00 00 10 */ b lbl_803775C8 +lbl_803775BC: +/* 803775BC 0037451C 84 03 00 14 */ lwzu r0, 0x14(r3) +/* 803775C0 00374520 54 00 05 64 */ rlwinm r0, r0, 0, 0x15, 0x12 +/* 803775C4 00374524 90 03 00 00 */ stw r0, 0(r3) +lbl_803775C8: +/* 803775C8 00374528 80 62 CE 08 */ lwz r3, lbl_805AEB28@sda21(r2) +/* 803775CC 0037452C 80 03 04 F4 */ lwz r0, 0x4f4(r3) +/* 803775D0 00374530 60 00 00 08 */ ori r0, r0, 8 +/* 803775D4 00374534 90 03 04 F4 */ stw r0, 0x4f4(r3) +/* 803775D8 00374538 4E 80 00 20 */ blr + +.global __GXSetVCD +__GXSetVCD: +/* 803775DC 0037453C 7C 08 02 A6 */ mflr r0 +/* 803775E0 00374540 38 C0 00 08 */ li r6, 8 +/* 803775E4 00374544 90 01 00 04 */ stw r0, 4(r1) +/* 803775E8 00374548 3C A0 CC 01 */ lis r5, 0xCC008000@ha +/* 803775EC 0037454C 38 60 00 50 */ li r3, 0x50 +/* 803775F0 00374550 94 21 FF F8 */ stwu r1, -8(r1) +/* 803775F4 00374554 38 00 00 60 */ li r0, 0x60 +/* 803775F8 00374558 98 C5 80 00 */ stb r6, 0xCC008000@l(r5) +/* 803775FC 0037455C 80 82 CE 08 */ lwz r4, lbl_805AEB28@sda21(r2) +/* 80377600 00374560 98 65 80 00 */ stb r3, 0xCC008000@l(r5) +/* 80377604 00374564 80 64 00 14 */ lwz r3, 0x14(r4) +/* 80377608 00374568 90 65 80 00 */ stw r3, 0xCC008000@l(r5) +/* 8037760C 0037456C 98 C5 80 00 */ stb r6, 0xCC008000@l(r5) +/* 80377610 00374570 98 05 80 00 */ stb r0, 0xCC008000@l(r5) +/* 80377614 00374574 80 04 00 18 */ lwz r0, 0x18(r4) +/* 80377618 00374578 90 05 80 00 */ stw r0, 0xCC008000@l(r5) +/* 8037761C 0037457C 4B FF F7 A5 */ bl __GXXfVtxSpecs +/* 80377620 00374580 80 01 00 0C */ lwz r0, 0xc(r1) +/* 80377624 00374584 38 21 00 08 */ addi r1, r1, 8 +/* 80377628 00374588 7C 08 03 A6 */ mtlr r0 +/* 8037762C 0037458C 4E 80 00 20 */ blr + +.global __GXCalculateVLim +__GXCalculateVLim: +/* 80377630 00374590 80 62 CE 08 */ lwz r3, lbl_805AEB28@sda21(r2) +/* 80377634 00374594 A0 03 00 04 */ lhz r0, 4(r3) +/* 80377638 00374598 28 00 00 00 */ cmplwi r0, 0 +/* 8037763C 0037459C 4D 82 00 20 */ beqlr +/* 80377640 003745A0 81 23 00 14 */ lwz r9, 0x14(r3) +/* 80377644 003745A4 38 AD 9F 18 */ addi r5, r13, lbl_805A8AD8@sda21 +/* 80377648 003745A8 81 03 00 1C */ lwz r8, 0x1c(r3) +/* 8037764C 003745AC 55 20 07 FE */ clrlwi r0, r9, 0x1f +/* 80377650 003745B0 80 83 00 18 */ lwz r4, 0x18(r3) +/* 80377654 003745B4 55 26 FF FE */ rlwinm r6, r9, 0x1f, 0x1f, 0x1f +/* 80377658 003745B8 7C 00 32 14 */ add r0, r0, r6 +/* 8037765C 003745BC 55 26 F7 FE */ rlwinm r6, r9, 0x1e, 0x1f, 0x1f +/* 80377660 003745C0 7C 00 32 14 */ add r0, r0, r6 +/* 80377664 003745C4 55 27 EF FE */ rlwinm r7, r9, 0x1d, 0x1f, 0x1f +/* 80377668 003745C8 55 26 BF BE */ rlwinm r6, r9, 0x17, 0x1e, 0x1f +/* 8037766C 003745CC 7C A5 30 AE */ lbzx r5, r5, r6 +/* 80377670 003745D0 55 08 BF FE */ rlwinm r8, r8, 0x17, 0x1f, 0x1f +/* 80377674 003745D4 7C 00 3A 14 */ add r0, r0, r7 +/* 80377678 003745D8 55 26 E7 FE */ rlwinm r6, r9, 0x1c, 0x1f, 0x1f +/* 8037767C 003745DC 7C 00 32 14 */ add r0, r0, r6 +/* 80377680 003745E0 55 26 DF FE */ rlwinm r6, r9, 0x1b, 0x1f, 0x1f +/* 80377684 003745E4 7C 00 32 14 */ add r0, r0, r6 +/* 80377688 003745E8 55 26 D7 FE */ rlwinm r6, r9, 0x1a, 0x1f, 0x1f +/* 8037768C 003745EC 7C 00 32 14 */ add r0, r0, r6 +/* 80377690 003745F0 55 26 CF FE */ rlwinm r6, r9, 0x19, 0x1f, 0x1f +/* 80377694 003745F4 7C 00 32 14 */ add r0, r0, r6 +/* 80377698 003745F8 55 26 C7 FE */ rlwinm r6, r9, 0x18, 0x1f, 0x1f +/* 8037769C 003745FC 7C 00 32 14 */ add r0, r0, r6 +/* 803776A0 00374600 2C 08 00 01 */ cmpwi r8, 1 +/* 803776A4 00374604 7C 00 2A 14 */ add r0, r0, r5 +/* 803776A8 00374608 40 82 00 0C */ bne lbl_803776B4 +/* 803776AC 0037460C 39 00 00 03 */ li r8, 3 +/* 803776B0 00374610 48 00 00 08 */ b lbl_803776B8 +lbl_803776B4: +/* 803776B4 00374614 39 00 00 01 */ li r8, 1 +lbl_803776B8: +/* 803776B8 00374618 55 26 AF BE */ rlwinm r6, r9, 0x15, 0x1e, 0x1f +/* 803776BC 0037461C 38 AD 9F 18 */ addi r5, r13, lbl_805A8AD8@sda21 +/* 803776C0 00374620 7C C5 30 AE */ lbzx r6, r5, r6 +/* 803776C4 00374624 55 25 9F BE */ rlwinm r5, r9, 0x13, 0x1e, 0x1f +/* 803776C8 00374628 38 ED 9F 10 */ addi r7, r13, lbl_805A8AD0@sda21 +/* 803776CC 0037462C 7D 06 41 D6 */ mullw r8, r6, r8 +/* 803776D0 00374630 7C C7 28 AE */ lbzx r6, r7, r5 +/* 803776D4 00374634 7C 00 42 14 */ add r0, r0, r8 +/* 803776D8 00374638 55 25 8F BE */ rlwinm r5, r9, 0x11, 0x1e, 0x1f +/* 803776DC 0037463C 7D 27 28 AE */ lbzx r9, r7, r5 +/* 803776E0 00374640 7C 00 32 14 */ add r0, r0, r6 +/* 803776E4 00374644 54 86 07 BE */ clrlwi r6, r4, 0x1e +/* 803776E8 00374648 39 0D 9F 14 */ addi r8, r13, lbl_805A8AD4@sda21 +/* 803776EC 0037464C 54 85 F7 BE */ rlwinm r5, r4, 0x1e, 0x1e, 0x1f +/* 803776F0 00374650 7C E8 30 AE */ lbzx r7, r8, r6 +/* 803776F4 00374654 7C 00 4A 14 */ add r0, r0, r9 +/* 803776F8 00374658 7C C8 28 AE */ lbzx r6, r8, r5 +/* 803776FC 0037465C 7C 00 3A 14 */ add r0, r0, r7 +/* 80377700 00374660 54 85 E7 BE */ rlwinm r5, r4, 0x1c, 0x1e, 0x1f +/* 80377704 00374664 7C E8 28 AE */ lbzx r7, r8, r5 +/* 80377708 00374668 7C 00 32 14 */ add r0, r0, r6 +/* 8037770C 0037466C 54 85 D7 BE */ rlwinm r5, r4, 0x1a, 0x1e, 0x1f +/* 80377710 00374670 7C C8 28 AE */ lbzx r6, r8, r5 +/* 80377714 00374674 7C 00 3A 14 */ add r0, r0, r7 +/* 80377718 00374678 54 85 C7 BE */ rlwinm r5, r4, 0x18, 0x1e, 0x1f +/* 8037771C 0037467C 7C E8 28 AE */ lbzx r7, r8, r5 +/* 80377720 00374680 7C 00 32 14 */ add r0, r0, r6 +/* 80377724 00374684 54 85 B7 BE */ rlwinm r5, r4, 0x16, 0x1e, 0x1f +/* 80377728 00374688 7C C8 28 AE */ lbzx r6, r8, r5 +/* 8037772C 0037468C 54 85 A7 BE */ rlwinm r5, r4, 0x14, 0x1e, 0x1f +/* 80377730 00374690 7C 00 3A 14 */ add r0, r0, r7 +/* 80377734 00374694 7C A8 28 AE */ lbzx r5, r8, r5 +/* 80377738 00374698 54 84 97 BE */ rlwinm r4, r4, 0x12, 0x1e, 0x1f +/* 8037773C 0037469C 7C 00 32 14 */ add r0, r0, r6 +/* 80377740 003746A0 7C 88 20 AE */ lbzx r4, r8, r4 +/* 80377744 003746A4 7C 00 2A 14 */ add r0, r0, r5 +/* 80377748 003746A8 7C 00 22 14 */ add r0, r0, r4 +/* 8037774C 003746AC B0 03 00 06 */ sth r0, 6(r3) +/* 80377750 003746B0 4E 80 00 20 */ blr + +.global GXClearVtxDesc +GXClearVtxDesc: +/* 80377754 003746B4 80 62 CE 08 */ lwz r3, lbl_805AEB28@sda21(r2) +/* 80377758 003746B8 38 80 00 00 */ li r4, 0 +/* 8037775C 003746BC 90 83 00 14 */ stw r4, 0x14(r3) +/* 80377760 003746C0 80 03 00 14 */ lwz r0, 0x14(r3) +/* 80377764 003746C4 54 00 05 E8 */ rlwinm r0, r0, 0, 0x17, 0x14 +/* 80377768 003746C8 60 00 02 00 */ ori r0, r0, 0x200 +/* 8037776C 003746CC 90 03 00 14 */ stw r0, 0x14(r3) +/* 80377770 003746D0 90 83 00 18 */ stw r4, 0x18(r3) +/* 80377774 003746D4 98 83 04 1C */ stb r4, 0x41c(r3) +/* 80377778 003746D8 98 83 04 1D */ stb r4, 0x41d(r3) +/* 8037777C 003746DC 80 03 04 F4 */ lwz r0, 0x4f4(r3) +/* 80377780 003746E0 60 00 00 08 */ ori r0, r0, 8 +/* 80377784 003746E4 90 03 04 F4 */ stw r0, 0x4f4(r3) +/* 80377788 003746E8 4E 80 00 20 */ blr + +.global GXSetVtxAttrFmt +GXSetVtxAttrFmt: +/* 8037778C 003746EC 38 04 FF F7 */ addi r0, r4, -9 +/* 80377790 003746F0 81 02 CE 08 */ lwz r8, lbl_805AEB28@sda21(r2) +/* 80377794 003746F4 54 64 10 3A */ slwi r4, r3, 2 +/* 80377798 003746F8 7D 28 22 14 */ add r9, r8, r4 +/* 8037779C 003746FC 28 00 00 10 */ cmplwi r0, 0x10 +/* 803777A0 00374700 38 89 00 1C */ addi r4, r9, 0x1c +/* 803777A4 00374704 39 09 00 3C */ addi r8, r9, 0x3c +/* 803777A8 00374708 39 29 00 5C */ addi r9, r9, 0x5c +/* 803777AC 0037470C 41 81 03 08 */ bgt lbl_80377AB4 +/* 803777B0 00374710 3D 40 80 3F */ lis r10, lbl_803F07E8@ha +/* 803777B4 00374714 39 4A 07 E8 */ addi r10, r10, lbl_803F07E8@l +/* 803777B8 00374718 54 00 10 3A */ slwi r0, r0, 2 +/* 803777BC 0037471C 7C 0A 00 2E */ lwzx r0, r10, r0 +/* 803777C0 00374720 7C 09 03 A6 */ mtctr r0 +/* 803777C4 00374724 4E 80 04 20 */ bctr +/* 803777C8 00374728 80 04 00 00 */ lwz r0, 0(r4) +/* 803777CC 0037472C 54 C6 08 3C */ slwi r6, r6, 1 +/* 803777D0 00374730 54 00 00 3C */ rlwinm r0, r0, 0, 0, 0x1e +/* 803777D4 00374734 7C 00 2B 78 */ or r0, r0, r5 +/* 803777D8 00374738 90 04 00 00 */ stw r0, 0(r4) +/* 803777DC 0037473C 54 E0 25 36 */ rlwinm r0, r7, 4, 0x14, 0x1b +/* 803777E0 00374740 80 A4 00 00 */ lwz r5, 0(r4) +/* 803777E4 00374744 54 A5 07 F6 */ rlwinm r5, r5, 0, 0x1f, 0x1b +/* 803777E8 00374748 7C A5 33 78 */ or r5, r5, r6 +/* 803777EC 0037474C 90 A4 00 00 */ stw r5, 0(r4) +/* 803777F0 00374750 80 A4 00 00 */ lwz r5, 0(r4) +/* 803777F4 00374754 54 A5 07 2C */ rlwinm r5, r5, 0, 0x1c, 0x16 +/* 803777F8 00374758 7C A0 03 78 */ or r0, r5, r0 +/* 803777FC 0037475C 90 04 00 00 */ stw r0, 0(r4) +/* 80377800 00374760 48 00 02 B4 */ b lbl_80377AB4 +/* 80377804 00374764 80 E4 00 00 */ lwz r7, 0(r4) +/* 80377808 00374768 54 C0 50 2A */ slwi r0, r6, 0xa +/* 8037780C 0037476C 2C 05 00 02 */ cmpwi r5, 2 +/* 80377810 00374770 54 E6 05 A4 */ rlwinm r6, r7, 0, 0x16, 0x12 +/* 80377814 00374774 7C C0 03 78 */ or r0, r6, r0 +/* 80377818 00374778 90 04 00 00 */ stw r0, 0(r4) +/* 8037781C 0037477C 40 82 00 28 */ bne lbl_80377844 +/* 80377820 00374780 80 04 00 00 */ lwz r0, 0(r4) +/* 80377824 00374784 54 00 05 EA */ rlwinm r0, r0, 0, 0x17, 0x15 +/* 80377828 00374788 60 00 02 00 */ ori r0, r0, 0x200 +/* 8037782C 0037478C 90 04 00 00 */ stw r0, 0(r4) +/* 80377830 00374790 80 04 00 00 */ lwz r0, 0(r4) +/* 80377834 00374794 54 00 00 7E */ clrlwi r0, r0, 1 +/* 80377838 00374798 64 00 80 00 */ oris r0, r0, 0x8000 +/* 8037783C 0037479C 90 04 00 00 */ stw r0, 0(r4) +/* 80377840 003747A0 48 00 02 74 */ b lbl_80377AB4 +lbl_80377844: +/* 80377844 003747A4 80 C4 00 00 */ lwz r6, 0(r4) +/* 80377848 003747A8 54 A0 48 2C */ slwi r0, r5, 9 +/* 8037784C 003747AC 54 C5 05 EA */ rlwinm r5, r6, 0, 0x17, 0x15 +/* 80377850 003747B0 7C A0 03 78 */ or r0, r5, r0 +/* 80377854 003747B4 90 04 00 00 */ stw r0, 0(r4) +/* 80377858 003747B8 80 04 00 00 */ lwz r0, 0(r4) +/* 8037785C 003747BC 54 00 00 7E */ clrlwi r0, r0, 1 +/* 80377860 003747C0 90 04 00 00 */ stw r0, 0(r4) +/* 80377864 003747C4 48 00 02 50 */ b lbl_80377AB4 +/* 80377868 003747C8 80 E4 00 00 */ lwz r7, 0(r4) +/* 8037786C 003747CC 54 A5 68 24 */ slwi r5, r5, 0xd +/* 80377870 003747D0 54 C0 70 22 */ slwi r0, r6, 0xe +/* 80377874 003747D4 54 E6 04 E2 */ rlwinm r6, r7, 0, 0x13, 0x11 +/* 80377878 003747D8 7C C5 2B 78 */ or r5, r6, r5 +/* 8037787C 003747DC 90 A4 00 00 */ stw r5, 0(r4) +/* 80377880 003747E0 80 A4 00 00 */ lwz r5, 0(r4) +/* 80377884 003747E4 54 A5 04 9C */ rlwinm r5, r5, 0, 0x12, 0xe +/* 80377888 003747E8 7C A0 03 78 */ or r0, r5, r0 +/* 8037788C 003747EC 90 04 00 00 */ stw r0, 0(r4) +/* 80377890 003747F0 48 00 02 24 */ b lbl_80377AB4 +/* 80377894 003747F4 80 E4 00 00 */ lwz r7, 0(r4) +/* 80377898 003747F8 54 A5 88 1C */ slwi r5, r5, 0x11 +/* 8037789C 003747FC 54 C0 90 1A */ slwi r0, r6, 0x12 +/* 803778A0 00374800 54 E6 03 DA */ rlwinm r6, r7, 0, 0xf, 0xd +/* 803778A4 00374804 7C C5 2B 78 */ or r5, r6, r5 +/* 803778A8 00374808 90 A4 00 00 */ stw r5, 0(r4) +/* 803778AC 0037480C 80 A4 00 00 */ lwz r5, 0(r4) +/* 803778B0 00374810 54 A5 03 94 */ rlwinm r5, r5, 0, 0xe, 0xa +/* 803778B4 00374814 7C A0 03 78 */ or r0, r5, r0 +/* 803778B8 00374818 90 04 00 00 */ stw r0, 0(r4) +/* 803778BC 0037481C 48 00 01 F8 */ b lbl_80377AB4 +/* 803778C0 00374820 81 04 00 00 */ lwz r8, 0(r4) +/* 803778C4 00374824 54 A0 A8 14 */ slwi r0, r5, 0x15 +/* 803778C8 00374828 55 05 02 D2 */ rlwinm r5, r8, 0, 0xb, 9 +/* 803778CC 0037482C 7C A0 03 78 */ or r0, r5, r0 +/* 803778D0 00374830 90 04 00 00 */ stw r0, 0(r4) +/* 803778D4 00374834 54 C5 B0 12 */ slwi r5, r6, 0x16 +/* 803778D8 00374838 54 E0 C8 0C */ slwi r0, r7, 0x19 +/* 803778DC 0037483C 80 C4 00 00 */ lwz r6, 0(r4) +/* 803778E0 00374840 54 C6 02 8C */ rlwinm r6, r6, 0, 0xa, 6 +/* 803778E4 00374844 7C C5 2B 78 */ or r5, r6, r5 +/* 803778E8 00374848 90 A4 00 00 */ stw r5, 0(r4) +/* 803778EC 0037484C 80 A4 00 00 */ lwz r5, 0(r4) +/* 803778F0 00374850 54 A5 01 C2 */ rlwinm r5, r5, 0, 7, 1 +/* 803778F4 00374854 7C A0 03 78 */ or r0, r5, r0 +/* 803778F8 00374858 90 04 00 00 */ stw r0, 0(r4) +/* 803778FC 0037485C 48 00 01 B8 */ b lbl_80377AB4 +/* 80377900 00374860 80 08 00 00 */ lwz r0, 0(r8) +/* 80377904 00374864 54 C4 08 3C */ slwi r4, r6, 1 +/* 80377908 00374868 54 00 00 3C */ rlwinm r0, r0, 0, 0, 0x1e +/* 8037790C 0037486C 7C 00 2B 78 */ or r0, r0, r5 +/* 80377910 00374870 90 08 00 00 */ stw r0, 0(r8) +/* 80377914 00374874 54 E0 25 36 */ rlwinm r0, r7, 4, 0x14, 0x1b +/* 80377918 00374878 80 A8 00 00 */ lwz r5, 0(r8) +/* 8037791C 0037487C 54 A5 07 F6 */ rlwinm r5, r5, 0, 0x1f, 0x1b +/* 80377920 00374880 7C A4 23 78 */ or r4, r5, r4 +/* 80377924 00374884 90 88 00 00 */ stw r4, 0(r8) +/* 80377928 00374888 80 88 00 00 */ lwz r4, 0(r8) +/* 8037792C 0037488C 54 84 07 2C */ rlwinm r4, r4, 0, 0x1c, 0x16 +/* 80377930 00374890 7C 80 03 78 */ or r0, r4, r0 +/* 80377934 00374894 90 08 00 00 */ stw r0, 0(r8) +/* 80377938 00374898 48 00 01 7C */ b lbl_80377AB4 +/* 8037793C 0037489C 80 88 00 00 */ lwz r4, 0(r8) +/* 80377940 003748A0 54 A0 48 2C */ slwi r0, r5, 9 +/* 80377944 003748A4 54 84 05 EA */ rlwinm r4, r4, 0, 0x17, 0x15 +/* 80377948 003748A8 7C 80 03 78 */ or r0, r4, r0 +/* 8037794C 003748AC 90 08 00 00 */ stw r0, 0(r8) +/* 80377950 003748B0 54 C4 50 2A */ slwi r4, r6, 0xa +/* 80377954 003748B4 54 E0 6A E4 */ rlwinm r0, r7, 0xd, 0xb, 0x12 +/* 80377958 003748B8 80 A8 00 00 */ lwz r5, 0(r8) +/* 8037795C 003748BC 54 A5 05 A4 */ rlwinm r5, r5, 0, 0x16, 0x12 +/* 80377960 003748C0 7C A4 23 78 */ or r4, r5, r4 +/* 80377964 003748C4 90 88 00 00 */ stw r4, 0(r8) +/* 80377968 003748C8 80 88 00 00 */ lwz r4, 0(r8) +/* 8037796C 003748CC 54 84 04 DA */ rlwinm r4, r4, 0, 0x13, 0xd +/* 80377970 003748D0 7C 80 03 78 */ or r0, r4, r0 +/* 80377974 003748D4 90 08 00 00 */ stw r0, 0(r8) +/* 80377978 003748D8 48 00 01 3C */ b lbl_80377AB4 +/* 8037797C 003748DC 80 88 00 00 */ lwz r4, 0(r8) +/* 80377980 003748E0 54 A0 90 1A */ slwi r0, r5, 0x12 +/* 80377984 003748E4 54 84 03 98 */ rlwinm r4, r4, 0, 0xe, 0xc +/* 80377988 003748E8 7C 80 03 78 */ or r0, r4, r0 +/* 8037798C 003748EC 90 08 00 00 */ stw r0, 0(r8) +/* 80377990 003748F0 54 C4 98 18 */ slwi r4, r6, 0x13 +/* 80377994 003748F4 54 E0 B0 92 */ rlwinm r0, r7, 0x16, 2, 9 +/* 80377998 003748F8 80 A8 00 00 */ lwz r5, 0(r8) +/* 8037799C 003748FC 54 A5 03 52 */ rlwinm r5, r5, 0, 0xd, 9 +/* 803779A0 00374900 7C A4 23 78 */ or r4, r5, r4 +/* 803779A4 00374904 90 88 00 00 */ stw r4, 0(r8) +/* 803779A8 00374908 80 88 00 00 */ lwz r4, 0(r8) +/* 803779AC 0037490C 54 84 02 88 */ rlwinm r4, r4, 0, 0xa, 4 +/* 803779B0 00374910 7C 80 03 78 */ or r0, r4, r0 +/* 803779B4 00374914 90 08 00 00 */ stw r0, 0(r8) +/* 803779B8 00374918 48 00 00 FC */ b lbl_80377AB4 +/* 803779BC 0037491C 81 48 00 00 */ lwz r10, 0(r8) +/* 803779C0 00374920 54 A0 D8 08 */ slwi r0, r5, 0x1b +/* 803779C4 00374924 54 C4 E0 06 */ slwi r4, r6, 0x1c +/* 803779C8 00374928 55 45 01 46 */ rlwinm r5, r10, 0, 5, 3 +/* 803779CC 0037492C 7C A0 03 78 */ or r0, r5, r0 +/* 803779D0 00374930 90 08 00 00 */ stw r0, 0(r8) +/* 803779D4 00374934 54 E0 06 3E */ clrlwi r0, r7, 0x18 +/* 803779D8 00374938 80 A8 00 00 */ lwz r5, 0(r8) +/* 803779DC 0037493C 54 A5 01 00 */ rlwinm r5, r5, 0, 4, 0 +/* 803779E0 00374940 7C A4 23 78 */ or r4, r5, r4 +/* 803779E4 00374944 90 88 00 00 */ stw r4, 0(r8) +/* 803779E8 00374948 80 89 00 00 */ lwz r4, 0(r9) +/* 803779EC 0037494C 54 84 00 34 */ rlwinm r4, r4, 0, 0, 0x1a +/* 803779F0 00374950 7C 80 03 78 */ or r0, r4, r0 +/* 803779F4 00374954 90 09 00 00 */ stw r0, 0(r9) +/* 803779F8 00374958 48 00 00 BC */ b lbl_80377AB4 +/* 803779FC 0037495C 80 89 00 00 */ lwz r4, 0(r9) +/* 80377A00 00374960 54 A0 28 34 */ slwi r0, r5, 5 +/* 80377A04 00374964 54 84 06 F2 */ rlwinm r4, r4, 0, 0x1b, 0x19 +/* 80377A08 00374968 7C 80 03 78 */ or r0, r4, r0 +/* 80377A0C 0037496C 90 09 00 00 */ stw r0, 0(r9) +/* 80377A10 00374970 54 C4 30 32 */ slwi r4, r6, 6 +/* 80377A14 00374974 54 E0 4B EC */ rlwinm r0, r7, 9, 0xf, 0x16 +/* 80377A18 00374978 80 A9 00 00 */ lwz r5, 0(r9) +/* 80377A1C 0037497C 54 A5 06 AC */ rlwinm r5, r5, 0, 0x1a, 0x16 +/* 80377A20 00374980 7C A4 23 78 */ or r4, r5, r4 +/* 80377A24 00374984 90 89 00 00 */ stw r4, 0(r9) +/* 80377A28 00374988 80 89 00 00 */ lwz r4, 0(r9) +/* 80377A2C 0037498C 54 84 05 E2 */ rlwinm r4, r4, 0, 0x17, 0x11 +/* 80377A30 00374990 7C 80 03 78 */ or r0, r4, r0 +/* 80377A34 00374994 90 09 00 00 */ stw r0, 0(r9) +/* 80377A38 00374998 48 00 00 7C */ b lbl_80377AB4 +/* 80377A3C 0037499C 80 89 00 00 */ lwz r4, 0(r9) +/* 80377A40 003749A0 54 A0 70 22 */ slwi r0, r5, 0xe +/* 80377A44 003749A4 54 84 04 A0 */ rlwinm r4, r4, 0, 0x12, 0x10 +/* 80377A48 003749A8 7C 80 03 78 */ or r0, r4, r0 +/* 80377A4C 003749AC 90 09 00 00 */ stw r0, 0(r9) +/* 80377A50 003749B0 54 C4 78 20 */ slwi r4, r6, 0xf +/* 80377A54 003749B4 54 E0 91 9A */ rlwinm r0, r7, 0x12, 6, 0xd +/* 80377A58 003749B8 80 A9 00 00 */ lwz r5, 0(r9) +/* 80377A5C 003749BC 54 A5 04 5A */ rlwinm r5, r5, 0, 0x11, 0xd +/* 80377A60 003749C0 7C A4 23 78 */ or r4, r5, r4 +/* 80377A64 003749C4 90 89 00 00 */ stw r4, 0(r9) +/* 80377A68 003749C8 80 89 00 00 */ lwz r4, 0(r9) +/* 80377A6C 003749CC 54 84 03 90 */ rlwinm r4, r4, 0, 0xe, 8 +/* 80377A70 003749D0 7C 80 03 78 */ or r0, r4, r0 +/* 80377A74 003749D4 90 09 00 00 */ stw r0, 0(r9) +/* 80377A78 003749D8 48 00 00 3C */ b lbl_80377AB4 +/* 80377A7C 003749DC 80 89 00 00 */ lwz r4, 0(r9) +/* 80377A80 003749E0 54 A0 B8 10 */ slwi r0, r5, 0x17 +/* 80377A84 003749E4 54 84 02 4E */ rlwinm r4, r4, 0, 9, 7 +/* 80377A88 003749E8 7C 80 03 78 */ or r0, r4, r0 +/* 80377A8C 003749EC 90 09 00 00 */ stw r0, 0(r9) +/* 80377A90 003749F0 54 C0 C0 0E */ slwi r0, r6, 0x18 +/* 80377A94 003749F4 80 89 00 00 */ lwz r4, 0(r9) +/* 80377A98 003749F8 54 84 02 08 */ rlwinm r4, r4, 0, 8, 4 +/* 80377A9C 003749FC 7C 80 03 78 */ or r0, r4, r0 +/* 80377AA0 00374A00 90 09 00 00 */ stw r0, 0(r9) +/* 80377AA4 00374A04 80 09 00 00 */ lwz r0, 0(r9) +/* 80377AA8 00374A08 54 00 01 7E */ clrlwi r0, r0, 5 +/* 80377AAC 00374A0C 50 E0 D8 08 */ rlwimi r0, r7, 0x1b, 0, 4 +/* 80377AB0 00374A10 90 09 00 00 */ stw r0, 0(r9) +lbl_80377AB4: +/* 80377AB4 00374A14 80 A2 CE 08 */ lwz r5, lbl_805AEB28@sda21(r2) +/* 80377AB8 00374A18 54 60 06 3E */ clrlwi r0, r3, 0x18 +/* 80377ABC 00374A1C 38 60 00 01 */ li r3, 1 +/* 80377AC0 00374A20 80 85 04 F4 */ lwz r4, 0x4f4(r5) +/* 80377AC4 00374A24 7C 60 00 30 */ slw r0, r3, r0 +/* 80377AC8 00374A28 54 00 06 3E */ clrlwi r0, r0, 0x18 +/* 80377ACC 00374A2C 60 83 00 10 */ ori r3, r4, 0x10 +/* 80377AD0 00374A30 90 65 04 F4 */ stw r3, 0x4f4(r5) +/* 80377AD4 00374A34 88 65 04 F2 */ lbz r3, 0x4f2(r5) +/* 80377AD8 00374A38 7C 60 03 78 */ or r0, r3, r0 +/* 80377ADC 00374A3C 98 05 04 F2 */ stb r0, 0x4f2(r5) +/* 80377AE0 00374A40 4E 80 00 20 */ blr + +.global GXSetVtxAttrFmtv +GXSetVtxAttrFmtv: +/* 80377AE4 00374A44 80 C2 CE 08 */ lwz r6, lbl_805AEB28@sda21(r2) +/* 80377AE8 00374A48 54 60 10 3A */ slwi r0, r3, 2 +/* 80377AEC 00374A4C 3C A0 80 3F */ lis r5, lbl_803F082C@ha +/* 80377AF0 00374A50 7C C6 02 14 */ add r6, r6, r0 +/* 80377AF4 00374A54 39 06 00 1C */ addi r8, r6, 0x1c +/* 80377AF8 00374A58 39 26 00 3C */ addi r9, r6, 0x3c +/* 80377AFC 00374A5C 39 46 00 5C */ addi r10, r6, 0x5c +/* 80377B00 00374A60 38 A5 08 2C */ addi r5, r5, lbl_803F082C@l +/* 80377B04 00374A64 48 00 03 1C */ b lbl_80377E20 +lbl_80377B08: +/* 80377B08 00374A68 80 C4 00 00 */ lwz r6, 0(r4) +/* 80377B0C 00374A6C 88 E4 00 0C */ lbz r7, 0xc(r4) +/* 80377B10 00374A70 39 66 FF F7 */ addi r11, r6, -9 +/* 80377B14 00374A74 80 C4 00 08 */ lwz r6, 8(r4) +/* 80377B18 00374A78 28 0B 00 10 */ cmplwi r11, 0x10 +/* 80377B1C 00374A7C 80 04 00 04 */ lwz r0, 4(r4) +/* 80377B20 00374A80 41 81 02 FC */ bgt lbl_80377E1C +/* 80377B24 00374A84 55 6B 10 3A */ slwi r11, r11, 2 +/* 80377B28 00374A88 7D 65 58 2E */ lwzx r11, r5, r11 +/* 80377B2C 00374A8C 7D 69 03 A6 */ mtctr r11 +/* 80377B30 00374A90 4E 80 04 20 */ bctr +/* 80377B34 00374A94 81 88 00 00 */ lwz r12, 0(r8) +/* 80377B38 00374A98 54 CB 08 3C */ slwi r11, r6, 1 +/* 80377B3C 00374A9C 54 E6 20 36 */ slwi r6, r7, 4 +/* 80377B40 00374AA0 55 87 00 3C */ rlwinm r7, r12, 0, 0, 0x1e +/* 80377B44 00374AA4 7C E0 03 78 */ or r0, r7, r0 +/* 80377B48 00374AA8 90 08 00 00 */ stw r0, 0(r8) +/* 80377B4C 00374AAC 80 08 00 00 */ lwz r0, 0(r8) +/* 80377B50 00374AB0 54 00 07 F6 */ rlwinm r0, r0, 0, 0x1f, 0x1b +/* 80377B54 00374AB4 7C 00 5B 78 */ or r0, r0, r11 +/* 80377B58 00374AB8 90 08 00 00 */ stw r0, 0(r8) +/* 80377B5C 00374ABC 80 08 00 00 */ lwz r0, 0(r8) +/* 80377B60 00374AC0 54 00 07 2C */ rlwinm r0, r0, 0, 0x1c, 0x16 +/* 80377B64 00374AC4 7C 00 33 78 */ or r0, r0, r6 +/* 80377B68 00374AC8 90 08 00 00 */ stw r0, 0(r8) +/* 80377B6C 00374ACC 48 00 02 B0 */ b lbl_80377E1C +/* 80377B70 00374AD0 80 E8 00 00 */ lwz r7, 0(r8) +/* 80377B74 00374AD4 54 C6 50 2A */ slwi r6, r6, 0xa +/* 80377B78 00374AD8 2C 00 00 02 */ cmpwi r0, 2 +/* 80377B7C 00374ADC 54 E7 05 A4 */ rlwinm r7, r7, 0, 0x16, 0x12 +/* 80377B80 00374AE0 7C E6 33 78 */ or r6, r7, r6 +/* 80377B84 00374AE4 90 C8 00 00 */ stw r6, 0(r8) +/* 80377B88 00374AE8 40 82 00 28 */ bne lbl_80377BB0 +/* 80377B8C 00374AEC 80 08 00 00 */ lwz r0, 0(r8) +/* 80377B90 00374AF0 54 00 05 EA */ rlwinm r0, r0, 0, 0x17, 0x15 +/* 80377B94 00374AF4 60 00 02 00 */ ori r0, r0, 0x200 +/* 80377B98 00374AF8 90 08 00 00 */ stw r0, 0(r8) +/* 80377B9C 00374AFC 80 08 00 00 */ lwz r0, 0(r8) +/* 80377BA0 00374B00 54 00 00 7E */ clrlwi r0, r0, 1 +/* 80377BA4 00374B04 64 00 80 00 */ oris r0, r0, 0x8000 +/* 80377BA8 00374B08 90 08 00 00 */ stw r0, 0(r8) +/* 80377BAC 00374B0C 48 00 02 70 */ b lbl_80377E1C +lbl_80377BB0: +/* 80377BB0 00374B10 80 C8 00 00 */ lwz r6, 0(r8) +/* 80377BB4 00374B14 54 00 48 2C */ slwi r0, r0, 9 +/* 80377BB8 00374B18 54 C6 05 EA */ rlwinm r6, r6, 0, 0x17, 0x15 +/* 80377BBC 00374B1C 7C C0 03 78 */ or r0, r6, r0 +/* 80377BC0 00374B20 90 08 00 00 */ stw r0, 0(r8) +/* 80377BC4 00374B24 80 08 00 00 */ lwz r0, 0(r8) +/* 80377BC8 00374B28 54 00 00 7E */ clrlwi r0, r0, 1 +/* 80377BCC 00374B2C 90 08 00 00 */ stw r0, 0(r8) +/* 80377BD0 00374B30 48 00 02 4C */ b lbl_80377E1C +/* 80377BD4 00374B34 81 68 00 00 */ lwz r11, 0(r8) +/* 80377BD8 00374B38 54 07 68 24 */ slwi r7, r0, 0xd +/* 80377BDC 00374B3C 54 C0 70 22 */ slwi r0, r6, 0xe +/* 80377BE0 00374B40 55 66 04 E2 */ rlwinm r6, r11, 0, 0x13, 0x11 +/* 80377BE4 00374B44 7C C6 3B 78 */ or r6, r6, r7 +/* 80377BE8 00374B48 90 C8 00 00 */ stw r6, 0(r8) +/* 80377BEC 00374B4C 80 C8 00 00 */ lwz r6, 0(r8) +/* 80377BF0 00374B50 54 C6 04 9C */ rlwinm r6, r6, 0, 0x12, 0xe +/* 80377BF4 00374B54 7C C0 03 78 */ or r0, r6, r0 +/* 80377BF8 00374B58 90 08 00 00 */ stw r0, 0(r8) +/* 80377BFC 00374B5C 48 00 02 20 */ b lbl_80377E1C +/* 80377C00 00374B60 81 68 00 00 */ lwz r11, 0(r8) +/* 80377C04 00374B64 54 07 88 1C */ slwi r7, r0, 0x11 +/* 80377C08 00374B68 54 C0 90 1A */ slwi r0, r6, 0x12 +/* 80377C0C 00374B6C 55 66 03 DA */ rlwinm r6, r11, 0, 0xf, 0xd +/* 80377C10 00374B70 7C C6 3B 78 */ or r6, r6, r7 +/* 80377C14 00374B74 90 C8 00 00 */ stw r6, 0(r8) +/* 80377C18 00374B78 80 C8 00 00 */ lwz r6, 0(r8) +/* 80377C1C 00374B7C 54 C6 03 94 */ rlwinm r6, r6, 0, 0xe, 0xa +/* 80377C20 00374B80 7C C0 03 78 */ or r0, r6, r0 +/* 80377C24 00374B84 90 08 00 00 */ stw r0, 0(r8) +/* 80377C28 00374B88 48 00 01 F4 */ b lbl_80377E1C +/* 80377C2C 00374B8C 81 68 00 00 */ lwz r11, 0(r8) +/* 80377C30 00374B90 54 00 A8 14 */ slwi r0, r0, 0x15 +/* 80377C34 00374B94 54 C6 B0 12 */ slwi r6, r6, 0x16 +/* 80377C38 00374B98 55 6B 02 D2 */ rlwinm r11, r11, 0, 0xb, 9 +/* 80377C3C 00374B9C 7D 60 03 78 */ or r0, r11, r0 +/* 80377C40 00374BA0 90 08 00 00 */ stw r0, 0(r8) +/* 80377C44 00374BA4 54 E0 C8 0C */ slwi r0, r7, 0x19 +/* 80377C48 00374BA8 80 E8 00 00 */ lwz r7, 0(r8) +/* 80377C4C 00374BAC 54 E7 02 8C */ rlwinm r7, r7, 0, 0xa, 6 +/* 80377C50 00374BB0 7C E6 33 78 */ or r6, r7, r6 +/* 80377C54 00374BB4 90 C8 00 00 */ stw r6, 0(r8) +/* 80377C58 00374BB8 80 C8 00 00 */ lwz r6, 0(r8) +/* 80377C5C 00374BBC 54 C6 01 C2 */ rlwinm r6, r6, 0, 7, 1 +/* 80377C60 00374BC0 7C C0 03 78 */ or r0, r6, r0 +/* 80377C64 00374BC4 90 08 00 00 */ stw r0, 0(r8) +/* 80377C68 00374BC8 48 00 01 B4 */ b lbl_80377E1C +/* 80377C6C 00374BCC 81 89 00 00 */ lwz r12, 0(r9) +/* 80377C70 00374BD0 54 CB 08 3C */ slwi r11, r6, 1 +/* 80377C74 00374BD4 54 E6 20 36 */ slwi r6, r7, 4 +/* 80377C78 00374BD8 55 87 00 3C */ rlwinm r7, r12, 0, 0, 0x1e +/* 80377C7C 00374BDC 7C E0 03 78 */ or r0, r7, r0 +/* 80377C80 00374BE0 90 09 00 00 */ stw r0, 0(r9) +/* 80377C84 00374BE4 80 09 00 00 */ lwz r0, 0(r9) +/* 80377C88 00374BE8 54 00 07 F6 */ rlwinm r0, r0, 0, 0x1f, 0x1b +/* 80377C8C 00374BEC 7C 00 5B 78 */ or r0, r0, r11 +/* 80377C90 00374BF0 90 09 00 00 */ stw r0, 0(r9) +/* 80377C94 00374BF4 80 09 00 00 */ lwz r0, 0(r9) +/* 80377C98 00374BF8 54 00 07 2C */ rlwinm r0, r0, 0, 0x1c, 0x16 +/* 80377C9C 00374BFC 7C 00 33 78 */ or r0, r0, r6 +/* 80377CA0 00374C00 90 09 00 00 */ stw r0, 0(r9) +/* 80377CA4 00374C04 48 00 01 78 */ b lbl_80377E1C +/* 80377CA8 00374C08 81 69 00 00 */ lwz r11, 0(r9) +/* 80377CAC 00374C0C 54 00 48 2C */ slwi r0, r0, 9 +/* 80377CB0 00374C10 54 C6 50 2A */ slwi r6, r6, 0xa +/* 80377CB4 00374C14 55 6B 05 EA */ rlwinm r11, r11, 0, 0x17, 0x15 +/* 80377CB8 00374C18 7D 60 03 78 */ or r0, r11, r0 +/* 80377CBC 00374C1C 90 09 00 00 */ stw r0, 0(r9) +/* 80377CC0 00374C20 54 E0 68 24 */ slwi r0, r7, 0xd +/* 80377CC4 00374C24 80 E9 00 00 */ lwz r7, 0(r9) +/* 80377CC8 00374C28 54 E7 05 A4 */ rlwinm r7, r7, 0, 0x16, 0x12 +/* 80377CCC 00374C2C 7C E6 33 78 */ or r6, r7, r6 +/* 80377CD0 00374C30 90 C9 00 00 */ stw r6, 0(r9) +/* 80377CD4 00374C34 80 C9 00 00 */ lwz r6, 0(r9) +/* 80377CD8 00374C38 54 C6 04 DA */ rlwinm r6, r6, 0, 0x13, 0xd +/* 80377CDC 00374C3C 7C C0 03 78 */ or r0, r6, r0 +/* 80377CE0 00374C40 90 09 00 00 */ stw r0, 0(r9) +/* 80377CE4 00374C44 48 00 01 38 */ b lbl_80377E1C +/* 80377CE8 00374C48 81 69 00 00 */ lwz r11, 0(r9) +/* 80377CEC 00374C4C 54 00 90 1A */ slwi r0, r0, 0x12 +/* 80377CF0 00374C50 54 C6 98 18 */ slwi r6, r6, 0x13 +/* 80377CF4 00374C54 55 6B 03 98 */ rlwinm r11, r11, 0, 0xe, 0xc +/* 80377CF8 00374C58 7D 60 03 78 */ or r0, r11, r0 +/* 80377CFC 00374C5C 90 09 00 00 */ stw r0, 0(r9) +/* 80377D00 00374C60 54 E0 B0 12 */ slwi r0, r7, 0x16 +/* 80377D04 00374C64 80 E9 00 00 */ lwz r7, 0(r9) +/* 80377D08 00374C68 54 E7 03 52 */ rlwinm r7, r7, 0, 0xd, 9 +/* 80377D0C 00374C6C 7C E6 33 78 */ or r6, r7, r6 +/* 80377D10 00374C70 90 C9 00 00 */ stw r6, 0(r9) +/* 80377D14 00374C74 80 C9 00 00 */ lwz r6, 0(r9) +/* 80377D18 00374C78 54 C6 02 88 */ rlwinm r6, r6, 0, 0xa, 4 +/* 80377D1C 00374C7C 7C C0 03 78 */ or r0, r6, r0 +/* 80377D20 00374C80 90 09 00 00 */ stw r0, 0(r9) +/* 80377D24 00374C84 48 00 00 F8 */ b lbl_80377E1C +/* 80377D28 00374C88 81 89 00 00 */ lwz r12, 0(r9) +/* 80377D2C 00374C8C 54 0B D8 08 */ slwi r11, r0, 0x1b +/* 80377D30 00374C90 54 C0 E0 06 */ slwi r0, r6, 0x1c +/* 80377D34 00374C94 55 86 01 46 */ rlwinm r6, r12, 0, 5, 3 +/* 80377D38 00374C98 7C C6 5B 78 */ or r6, r6, r11 +/* 80377D3C 00374C9C 90 C9 00 00 */ stw r6, 0(r9) +/* 80377D40 00374CA0 80 C9 00 00 */ lwz r6, 0(r9) +/* 80377D44 00374CA4 54 C6 01 00 */ rlwinm r6, r6, 0, 4, 0 +/* 80377D48 00374CA8 7C C0 03 78 */ or r0, r6, r0 +/* 80377D4C 00374CAC 90 09 00 00 */ stw r0, 0(r9) +/* 80377D50 00374CB0 80 0A 00 00 */ lwz r0, 0(r10) +/* 80377D54 00374CB4 54 00 00 34 */ rlwinm r0, r0, 0, 0, 0x1a +/* 80377D58 00374CB8 7C 00 3B 78 */ or r0, r0, r7 +/* 80377D5C 00374CBC 90 0A 00 00 */ stw r0, 0(r10) +/* 80377D60 00374CC0 48 00 00 BC */ b lbl_80377E1C +/* 80377D64 00374CC4 81 6A 00 00 */ lwz r11, 0(r10) +/* 80377D68 00374CC8 54 00 28 34 */ slwi r0, r0, 5 +/* 80377D6C 00374CCC 54 C6 30 32 */ slwi r6, r6, 6 +/* 80377D70 00374CD0 55 6B 06 F2 */ rlwinm r11, r11, 0, 0x1b, 0x19 +/* 80377D74 00374CD4 7D 60 03 78 */ or r0, r11, r0 +/* 80377D78 00374CD8 90 0A 00 00 */ stw r0, 0(r10) +/* 80377D7C 00374CDC 54 E0 48 2C */ slwi r0, r7, 9 +/* 80377D80 00374CE0 80 EA 00 00 */ lwz r7, 0(r10) +/* 80377D84 00374CE4 54 E7 06 AC */ rlwinm r7, r7, 0, 0x1a, 0x16 +/* 80377D88 00374CE8 7C E6 33 78 */ or r6, r7, r6 +/* 80377D8C 00374CEC 90 CA 00 00 */ stw r6, 0(r10) +/* 80377D90 00374CF0 80 CA 00 00 */ lwz r6, 0(r10) +/* 80377D94 00374CF4 54 C6 05 E2 */ rlwinm r6, r6, 0, 0x17, 0x11 +/* 80377D98 00374CF8 7C C0 03 78 */ or r0, r6, r0 +/* 80377D9C 00374CFC 90 0A 00 00 */ stw r0, 0(r10) +/* 80377DA0 00374D00 48 00 00 7C */ b lbl_80377E1C +/* 80377DA4 00374D04 81 6A 00 00 */ lwz r11, 0(r10) +/* 80377DA8 00374D08 54 00 70 22 */ slwi r0, r0, 0xe +/* 80377DAC 00374D0C 54 C6 78 20 */ slwi r6, r6, 0xf +/* 80377DB0 00374D10 55 6B 04 A0 */ rlwinm r11, r11, 0, 0x12, 0x10 +/* 80377DB4 00374D14 7D 60 03 78 */ or r0, r11, r0 +/* 80377DB8 00374D18 90 0A 00 00 */ stw r0, 0(r10) +/* 80377DBC 00374D1C 54 E0 90 1A */ slwi r0, r7, 0x12 +/* 80377DC0 00374D20 80 EA 00 00 */ lwz r7, 0(r10) +/* 80377DC4 00374D24 54 E7 04 5A */ rlwinm r7, r7, 0, 0x11, 0xd +/* 80377DC8 00374D28 7C E6 33 78 */ or r6, r7, r6 +/* 80377DCC 00374D2C 90 CA 00 00 */ stw r6, 0(r10) +/* 80377DD0 00374D30 80 CA 00 00 */ lwz r6, 0(r10) +/* 80377DD4 00374D34 54 C6 03 90 */ rlwinm r6, r6, 0, 0xe, 8 +/* 80377DD8 00374D38 7C C0 03 78 */ or r0, r6, r0 +/* 80377DDC 00374D3C 90 0A 00 00 */ stw r0, 0(r10) +/* 80377DE0 00374D40 48 00 00 3C */ b lbl_80377E1C +/* 80377DE4 00374D44 81 8A 00 00 */ lwz r12, 0(r10) +/* 80377DE8 00374D48 54 0B B8 10 */ slwi r11, r0, 0x17 +/* 80377DEC 00374D4C 54 C0 C0 0E */ slwi r0, r6, 0x18 +/* 80377DF0 00374D50 55 86 02 4E */ rlwinm r6, r12, 0, 9, 7 +/* 80377DF4 00374D54 7C C6 5B 78 */ or r6, r6, r11 +/* 80377DF8 00374D58 90 CA 00 00 */ stw r6, 0(r10) +/* 80377DFC 00374D5C 80 CA 00 00 */ lwz r6, 0(r10) +/* 80377E00 00374D60 54 C6 02 08 */ rlwinm r6, r6, 0, 8, 4 +/* 80377E04 00374D64 7C C0 03 78 */ or r0, r6, r0 +/* 80377E08 00374D68 90 0A 00 00 */ stw r0, 0(r10) +/* 80377E0C 00374D6C 80 0A 00 00 */ lwz r0, 0(r10) +/* 80377E10 00374D70 54 00 01 7E */ clrlwi r0, r0, 5 +/* 80377E14 00374D74 50 E0 D8 08 */ rlwimi r0, r7, 0x1b, 0, 4 +/* 80377E18 00374D78 90 0A 00 00 */ stw r0, 0(r10) +lbl_80377E1C: +/* 80377E1C 00374D7C 38 84 00 10 */ addi r4, r4, 0x10 +lbl_80377E20: +/* 80377E20 00374D80 80 04 00 00 */ lwz r0, 0(r4) +/* 80377E24 00374D84 2C 00 00 FF */ cmpwi r0, 0xff +/* 80377E28 00374D88 40 82 FC E0 */ bne lbl_80377B08 +/* 80377E2C 00374D8C 80 A2 CE 08 */ lwz r5, lbl_805AEB28@sda21(r2) +/* 80377E30 00374D90 54 60 06 3E */ clrlwi r0, r3, 0x18 +/* 80377E34 00374D94 38 60 00 01 */ li r3, 1 +/* 80377E38 00374D98 80 85 04 F4 */ lwz r4, 0x4f4(r5) +/* 80377E3C 00374D9C 7C 60 00 30 */ slw r0, r3, r0 +/* 80377E40 00374DA0 54 00 06 3E */ clrlwi r0, r0, 0x18 +/* 80377E44 00374DA4 60 83 00 10 */ ori r3, r4, 0x10 +/* 80377E48 00374DA8 90 65 04 F4 */ stw r3, 0x4f4(r5) +/* 80377E4C 00374DAC 88 65 04 F2 */ lbz r3, 0x4f2(r5) +/* 80377E50 00374DB0 7C 60 03 78 */ or r0, r3, r0 +/* 80377E54 00374DB4 98 05 04 F2 */ stb r0, 0x4f2(r5) +/* 80377E58 00374DB8 4E 80 00 20 */ blr + +.global __GXSetVAT +__GXSetVAT: +/* 80377E5C 00374DBC 81 42 CE 08 */ lwz r10, lbl_805AEB28@sda21(r2) +/* 80377E60 00374DC0 39 80 00 00 */ li r12, 0 +/* 80377E64 00374DC4 39 60 00 00 */ li r11, 0 +/* 80377E68 00374DC8 3C E0 CC 01 */ lis r7, 0xcc01 +/* 80377E6C 00374DCC 48 00 00 70 */ b lbl_80377EDC +lbl_80377E70: +/* 80377E70 00374DD0 55 89 06 3E */ clrlwi r9, r12, 0x18 +/* 80377E74 00374DD4 88 6A 04 F2 */ lbz r3, 0x4f2(r10) +/* 80377E78 00374DD8 38 00 00 01 */ li r0, 1 +/* 80377E7C 00374DDC 7C 00 48 30 */ slw r0, r0, r9 +/* 80377E80 00374DE0 7C 60 00 39 */ and. r0, r3, r0 +/* 80377E84 00374DE4 41 82 00 50 */ beq lbl_80377ED4 +/* 80377E88 00374DE8 39 00 00 08 */ li r8, 8 +/* 80377E8C 00374DEC 99 07 80 00 */ stb r8, 0xCC008000@l(r7) +/* 80377E90 00374DF0 61 23 00 70 */ ori r3, r9, 0x70 +/* 80377E94 00374DF4 38 0B 00 1C */ addi r0, r11, 0x1c +/* 80377E98 00374DF8 98 67 80 00 */ stb r3, 0xCC008000@l(r7) +/* 80377E9C 00374DFC 61 25 00 80 */ ori r5, r9, 0x80 +/* 80377EA0 00374E00 38 8B 00 3C */ addi r4, r11, 0x3c +/* 80377EA4 00374E04 7C CA 00 2E */ lwzx r6, r10, r0 +/* 80377EA8 00374E08 61 23 00 90 */ ori r3, r9, 0x90 +/* 80377EAC 00374E0C 38 0B 00 5C */ addi r0, r11, 0x5c +/* 80377EB0 00374E10 90 C7 80 00 */ stw r6, 0xCC008000@l(r7) +/* 80377EB4 00374E14 99 07 80 00 */ stb r8, 0xCC008000@l(r7) +/* 80377EB8 00374E18 98 A7 80 00 */ stb r5, 0xCC008000@l(r7) +/* 80377EBC 00374E1C 7C 8A 20 2E */ lwzx r4, r10, r4 +/* 80377EC0 00374E20 90 87 80 00 */ stw r4, 0xCC008000@l(r7) +/* 80377EC4 00374E24 99 07 80 00 */ stb r8, 0xCC008000@l(r7) +/* 80377EC8 00374E28 98 67 80 00 */ stb r3, 0xCC008000@l(r7) +/* 80377ECC 00374E2C 7C 0A 00 2E */ lwzx r0, r10, r0 +/* 80377ED0 00374E30 90 07 80 00 */ stw r0, 0xCC008000@l(r7) +lbl_80377ED4: +/* 80377ED4 00374E34 39 6B 00 04 */ addi r11, r11, 4 +/* 80377ED8 00374E38 39 8C 00 01 */ addi r12, r12, 1 +lbl_80377EDC: +/* 80377EDC 00374E3C 55 80 06 3E */ clrlwi r0, r12, 0x18 +/* 80377EE0 00374E40 28 00 00 08 */ cmplwi r0, 8 +/* 80377EE4 00374E44 41 80 FF 8C */ blt lbl_80377E70 +/* 80377EE8 00374E48 80 62 CE 08 */ lwz r3, lbl_805AEB28@sda21(r2) +/* 80377EEC 00374E4C 38 00 00 00 */ li r0, 0 +/* 80377EF0 00374E50 98 03 04 F2 */ stb r0, 0x4f2(r3) +/* 80377EF4 00374E54 4E 80 00 20 */ blr + +.global GXSetArray +GXSetArray: +/* 80377EF8 00374E58 2C 03 00 19 */ cmpwi r3, 0x19 +/* 80377EFC 00374E5C 40 82 00 08 */ bne lbl_80377F04 +/* 80377F00 00374E60 38 60 00 0A */ li r3, 0xa +lbl_80377F04: +/* 80377F04 00374E64 38 00 00 08 */ li r0, 8 +/* 80377F08 00374E68 38 C3 FF F7 */ addi r6, r3, -9 +/* 80377F0C 00374E6C 3C 60 CC 01 */ lis r3, 0xCC008000@ha +/* 80377F10 00374E70 98 03 80 00 */ stb r0, 0xCC008000@l(r3) +/* 80377F14 00374E74 60 C0 00 A0 */ ori r0, r6, 0xa0 +/* 80377F18 00374E78 54 84 00 BE */ clrlwi r4, r4, 2 +/* 80377F1C 00374E7C 98 03 80 00 */ stb r0, 0xCC008000@l(r3) +/* 80377F20 00374E80 34 06 FF F4 */ addic. r0, r6, -12 +/* 80377F24 00374E84 90 83 80 00 */ stw r4, 0xCC008000@l(r3) +/* 80377F28 00374E88 41 80 00 1C */ blt lbl_80377F44 +/* 80377F2C 00374E8C 2C 00 00 04 */ cmpwi r0, 4 +/* 80377F30 00374E90 40 80 00 14 */ bge lbl_80377F44 +/* 80377F34 00374E94 80 62 CE 08 */ lwz r3, lbl_805AEB28@sda21(r2) +/* 80377F38 00374E98 54 00 10 3A */ slwi r0, r0, 2 +/* 80377F3C 00374E9C 7C 63 02 14 */ add r3, r3, r0 +/* 80377F40 00374EA0 90 83 00 88 */ stw r4, 0x88(r3) +lbl_80377F44: +/* 80377F44 00374EA4 38 00 00 08 */ li r0, 8 +/* 80377F48 00374EA8 3C 60 CC 01 */ lis r3, 0xCC008000@ha +/* 80377F4C 00374EAC 98 03 80 00 */ stb r0, 0xCC008000@l(r3) +/* 80377F50 00374EB0 60 C0 00 B0 */ ori r0, r6, 0xb0 +/* 80377F54 00374EB4 54 A4 06 3E */ clrlwi r4, r5, 0x18 +/* 80377F58 00374EB8 98 03 80 00 */ stb r0, 0xCC008000@l(r3) +/* 80377F5C 00374EBC 34 06 FF F4 */ addic. r0, r6, -12 +/* 80377F60 00374EC0 90 83 80 00 */ stw r4, 0xCC008000@l(r3) +/* 80377F64 00374EC4 4D 80 00 20 */ bltlr +/* 80377F68 00374EC8 2C 00 00 04 */ cmpwi r0, 4 +/* 80377F6C 00374ECC 4C 80 00 20 */ bgelr +/* 80377F70 00374ED0 80 62 CE 08 */ lwz r3, lbl_805AEB28@sda21(r2) +/* 80377F74 00374ED4 54 00 10 3A */ slwi r0, r0, 2 +/* 80377F78 00374ED8 7C 63 02 14 */ add r3, r3, r0 +/* 80377F7C 00374EDC 90 83 00 98 */ stw r4, 0x98(r3) +/* 80377F80 00374EE0 4E 80 00 20 */ blr + +.global GXInvalidateVtxCache +GXInvalidateVtxCache: +/* 80377F84 00374EE4 38 00 00 48 */ li r0, 0x48 +/* 80377F88 00374EE8 3C 60 CC 01 */ lis r3, 0xCC008000@ha +/* 80377F8C 00374EEC 98 03 80 00 */ stb r0, 0xCC008000@l(r3) +/* 80377F90 00374EF0 4E 80 00 20 */ blr + +.global GXSetTexCoordGen2 +GXSetTexCoordGen2: +/* 80377F94 00374EF4 7C 08 02 A6 */ mflr r0 +/* 80377F98 00374EF8 28 05 00 14 */ cmplwi r5, 0x14 +/* 80377F9C 00374EFC 90 01 00 04 */ stw r0, 4(r1) +/* 80377FA0 00374F00 39 60 00 00 */ li r11, 0 +/* 80377FA4 00374F04 39 80 00 00 */ li r12, 0 +/* 80377FA8 00374F08 94 21 FF F8 */ stwu r1, -8(r1) +/* 80377FAC 00374F0C 39 40 00 05 */ li r10, 5 +/* 80377FB0 00374F10 41 81 00 98 */ bgt lbl_80378048 +/* 80377FB4 00374F14 3D 20 80 3F */ lis r9, lbl_803F088C@ha +/* 80377FB8 00374F18 39 29 08 8C */ addi r9, r9, lbl_803F088C@l +/* 80377FBC 00374F1C 54 A0 10 3A */ slwi r0, r5, 2 +/* 80377FC0 00374F20 7C 09 00 2E */ lwzx r0, r9, r0 +/* 80377FC4 00374F24 7C 09 03 A6 */ mtctr r0 +/* 80377FC8 00374F28 4E 80 04 20 */ bctr +/* 80377FCC 00374F2C 39 40 00 00 */ li r10, 0 +/* 80377FD0 00374F30 39 80 00 01 */ li r12, 1 +/* 80377FD4 00374F34 48 00 00 74 */ b lbl_80378048 +/* 80377FD8 00374F38 39 40 00 01 */ li r10, 1 +/* 80377FDC 00374F3C 39 80 00 01 */ li r12, 1 +/* 80377FE0 00374F40 48 00 00 68 */ b lbl_80378048 +/* 80377FE4 00374F44 39 40 00 03 */ li r10, 3 +/* 80377FE8 00374F48 39 80 00 01 */ li r12, 1 +/* 80377FEC 00374F4C 48 00 00 5C */ b lbl_80378048 +/* 80377FF0 00374F50 39 40 00 04 */ li r10, 4 +/* 80377FF4 00374F54 39 80 00 01 */ li r12, 1 +/* 80377FF8 00374F58 48 00 00 50 */ b lbl_80378048 +/* 80377FFC 00374F5C 39 40 00 02 */ li r10, 2 +/* 80378000 00374F60 48 00 00 48 */ b lbl_80378048 +/* 80378004 00374F64 39 40 00 02 */ li r10, 2 +/* 80378008 00374F68 48 00 00 40 */ b lbl_80378048 +/* 8037800C 00374F6C 39 40 00 05 */ li r10, 5 +/* 80378010 00374F70 48 00 00 38 */ b lbl_80378048 +/* 80378014 00374F74 39 40 00 06 */ li r10, 6 +/* 80378018 00374F78 48 00 00 30 */ b lbl_80378048 +/* 8037801C 00374F7C 39 40 00 07 */ li r10, 7 +/* 80378020 00374F80 48 00 00 28 */ b lbl_80378048 +/* 80378024 00374F84 39 40 00 08 */ li r10, 8 +/* 80378028 00374F88 48 00 00 20 */ b lbl_80378048 +/* 8037802C 00374F8C 39 40 00 09 */ li r10, 9 +/* 80378030 00374F90 48 00 00 18 */ b lbl_80378048 +/* 80378034 00374F94 39 40 00 0A */ li r10, 0xa +/* 80378038 00374F98 48 00 00 10 */ b lbl_80378048 +/* 8037803C 00374F9C 39 40 00 0B */ li r10, 0xb +/* 80378040 00374FA0 48 00 00 08 */ b lbl_80378048 +/* 80378044 00374FA4 39 40 00 0C */ li r10, 0xc +lbl_80378048: +/* 80378048 00374FA8 2C 04 00 01 */ cmpwi r4, 1 +/* 8037804C 00374FAC 41 82 00 24 */ beq lbl_80378070 +/* 80378050 00374FB0 40 80 00 10 */ bge lbl_80378060 +/* 80378054 00374FB4 2C 04 00 00 */ cmpwi r4, 0 +/* 80378058 00374FB8 40 80 00 2C */ bge lbl_80378084 +/* 8037805C 00374FBC 48 00 00 A4 */ b lbl_80378100 +lbl_80378060: +/* 80378060 00374FC0 2C 04 00 0A */ cmpwi r4, 0xa +/* 80378064 00374FC4 41 82 00 74 */ beq lbl_803780D8 +/* 80378068 00374FC8 40 80 00 98 */ bge lbl_80378100 +/* 8037806C 00374FCC 48 00 00 30 */ b lbl_8037809C +lbl_80378070: +/* 80378070 00374FD0 55 80 10 3A */ slwi r0, r12, 2 +/* 80378074 00374FD4 54 04 07 26 */ rlwinm r4, r0, 0, 0x1c, 0x13 +/* 80378078 00374FD8 55 40 38 30 */ slwi r0, r10, 7 +/* 8037807C 00374FDC 7C 8B 03 78 */ or r11, r4, r0 +/* 80378080 00374FE0 48 00 00 80 */ b lbl_80378100 +lbl_80378084: +/* 80378084 00374FE4 55 80 10 3A */ slwi r0, r12, 2 +/* 80378088 00374FE8 60 00 00 02 */ ori r0, r0, 2 +/* 8037808C 00374FEC 54 04 07 26 */ rlwinm r4, r0, 0, 0x1c, 0x13 +/* 80378090 00374FF0 55 40 38 30 */ slwi r0, r10, 7 +/* 80378094 00374FF4 7C 8B 03 78 */ or r11, r4, r0 +/* 80378098 00374FF8 48 00 00 68 */ b lbl_80378100 +lbl_8037809C: +/* 8037809C 00374FFC 55 80 10 3A */ slwi r0, r12, 2 +/* 803780A0 00375000 54 00 07 30 */ rlwinm r0, r0, 0, 0x1c, 0x18 +/* 803780A4 00375004 60 00 00 10 */ ori r0, r0, 0x10 +/* 803780A8 00375008 54 09 06 66 */ rlwinm r9, r0, 0, 0x19, 0x13 +/* 803780AC 0037500C 55 40 38 30 */ slwi r0, r10, 7 +/* 803780B0 00375010 7D 29 03 78 */ or r9, r9, r0 +/* 803780B4 00375014 38 A5 FF F4 */ addi r5, r5, -12 +/* 803780B8 00375018 38 04 FF FE */ addi r0, r4, -2 +/* 803780BC 0037501C 55 29 05 20 */ rlwinm r9, r9, 0, 0x14, 0x10 +/* 803780C0 00375020 54 A4 60 26 */ slwi r4, r5, 0xc +/* 803780C4 00375024 7D 24 23 78 */ or r4, r9, r4 +/* 803780C8 00375028 54 84 04 5A */ rlwinm r4, r4, 0, 0x11, 0xd +/* 803780CC 0037502C 54 00 78 20 */ slwi r0, r0, 0xf +/* 803780D0 00375030 7C 8B 03 78 */ or r11, r4, r0 +/* 803780D4 00375034 48 00 00 2C */ b lbl_80378100 +lbl_803780D8: +/* 803780D8 00375038 2C 05 00 13 */ cmpwi r5, 0x13 +/* 803780DC 0037503C 55 80 10 3A */ slwi r0, r12, 2 +/* 803780E0 00375040 40 82 00 10 */ bne lbl_803780F0 +/* 803780E4 00375044 54 00 07 30 */ rlwinm r0, r0, 0, 0x1c, 0x18 +/* 803780E8 00375048 60 00 00 20 */ ori r0, r0, 0x20 +/* 803780EC 0037504C 48 00 00 0C */ b lbl_803780F8 +lbl_803780F0: +/* 803780F0 00375050 54 00 07 30 */ rlwinm r0, r0, 0, 0x1c, 0x18 +/* 803780F4 00375054 60 00 00 30 */ ori r0, r0, 0x30 +lbl_803780F8: +/* 803780F8 00375058 54 00 06 66 */ rlwinm r0, r0, 0, 0x19, 0x13 +/* 803780FC 0037505C 60 0B 01 00 */ ori r11, r0, 0x100 +lbl_80378100: +/* 80378100 00375060 39 40 00 10 */ li r10, 0x10 +/* 80378104 00375064 3D 20 CC 01 */ lis r9, 0xCC008000@ha +/* 80378108 00375068 99 49 80 00 */ stb r10, 0xCC008000@l(r9) +/* 8037810C 0037506C 38 03 10 40 */ addi r0, r3, 0x1040 +/* 80378110 00375070 38 88 FF C0 */ addi r4, r8, -64 +/* 80378114 00375074 90 09 80 00 */ stw r0, 0xCC008000@l(r9) +/* 80378118 00375078 54 85 06 2C */ rlwinm r5, r4, 0, 0x18, 0x16 +/* 8037811C 0037507C 54 E4 44 2E */ rlwinm r4, r7, 8, 0x10, 0x17 +/* 80378120 00375080 91 69 80 00 */ stw r11, 0xCC008000@l(r9) +/* 80378124 00375084 38 03 10 50 */ addi r0, r3, 0x1050 +/* 80378128 00375088 28 03 00 06 */ cmplwi r3, 6 +/* 8037812C 0037508C 99 49 80 00 */ stb r10, 0xCC008000@l(r9) +/* 80378130 00375090 7C A4 23 78 */ or r4, r5, r4 +/* 80378134 00375094 90 09 80 00 */ stw r0, 0xCC008000@l(r9) +/* 80378138 00375098 90 89 80 00 */ stw r4, 0xCC008000@l(r9) +/* 8037813C 0037509C 41 81 00 F4 */ bgt lbl_80378230 +/* 80378140 003750A0 3C 80 80 3F */ lis r4, lbl_803F0870@ha +/* 80378144 003750A4 38 84 08 70 */ addi r4, r4, lbl_803F0870@l +/* 80378148 003750A8 54 60 10 3A */ slwi r0, r3, 2 +/* 8037814C 003750AC 7C 04 00 2E */ lwzx r0, r4, r0 +/* 80378150 003750B0 7C 09 03 A6 */ mtctr r0 +/* 80378154 003750B4 4E 80 04 20 */ bctr +/* 80378158 003750B8 80 82 CE 08 */ lwz r4, lbl_805AEB28@sda21(r2) +/* 8037815C 003750BC 54 C0 30 32 */ slwi r0, r6, 6 +/* 80378160 003750C0 38 A4 00 80 */ addi r5, r4, 0x80 +/* 80378164 003750C4 80 84 00 80 */ lwz r4, 0x80(r4) +/* 80378168 003750C8 54 84 06 A6 */ rlwinm r4, r4, 0, 0x1a, 0x13 +/* 8037816C 003750CC 7C 80 03 78 */ or r0, r4, r0 +/* 80378170 003750D0 90 05 00 00 */ stw r0, 0(r5) +/* 80378174 003750D4 48 00 00 D8 */ b lbl_8037824C +/* 80378178 003750D8 80 82 CE 08 */ lwz r4, lbl_805AEB28@sda21(r2) +/* 8037817C 003750DC 54 C0 60 26 */ slwi r0, r6, 0xc +/* 80378180 003750E0 38 A4 00 80 */ addi r5, r4, 0x80 +/* 80378184 003750E4 80 84 00 80 */ lwz r4, 0x80(r4) +/* 80378188 003750E8 54 84 05 1A */ rlwinm r4, r4, 0, 0x14, 0xd +/* 8037818C 003750EC 7C 80 03 78 */ or r0, r4, r0 +/* 80378190 003750F0 90 05 00 00 */ stw r0, 0(r5) +/* 80378194 003750F4 48 00 00 B8 */ b lbl_8037824C +/* 80378198 003750F8 80 82 CE 08 */ lwz r4, lbl_805AEB28@sda21(r2) +/* 8037819C 003750FC 54 C0 90 1A */ slwi r0, r6, 0x12 +/* 803781A0 00375100 38 A4 00 80 */ addi r5, r4, 0x80 +/* 803781A4 00375104 80 84 00 80 */ lwz r4, 0x80(r4) +/* 803781A8 00375108 54 84 03 8E */ rlwinm r4, r4, 0, 0xe, 7 +/* 803781AC 0037510C 7C 80 03 78 */ or r0, r4, r0 +/* 803781B0 00375110 90 05 00 00 */ stw r0, 0(r5) +/* 803781B4 00375114 48 00 00 98 */ b lbl_8037824C +/* 803781B8 00375118 80 82 CE 08 */ lwz r4, lbl_805AEB28@sda21(r2) +/* 803781BC 0037511C 54 C0 C0 0E */ slwi r0, r6, 0x18 +/* 803781C0 00375120 38 A4 00 80 */ addi r5, r4, 0x80 +/* 803781C4 00375124 80 84 00 80 */ lwz r4, 0x80(r4) +/* 803781C8 00375128 54 84 02 02 */ rlwinm r4, r4, 0, 8, 1 +/* 803781CC 0037512C 7C 80 03 78 */ or r0, r4, r0 +/* 803781D0 00375130 90 05 00 00 */ stw r0, 0(r5) +/* 803781D4 00375134 48 00 00 78 */ b lbl_8037824C +/* 803781D8 00375138 80 82 CE 08 */ lwz r4, lbl_805AEB28@sda21(r2) +/* 803781DC 0037513C 84 04 00 84 */ lwzu r0, 0x84(r4) +/* 803781E0 00375140 54 00 00 32 */ rlwinm r0, r0, 0, 0, 0x19 +/* 803781E4 00375144 7C 00 33 78 */ or r0, r0, r6 +/* 803781E8 00375148 90 04 00 00 */ stw r0, 0(r4) +/* 803781EC 0037514C 48 00 00 60 */ b lbl_8037824C +/* 803781F0 00375150 80 82 CE 08 */ lwz r4, lbl_805AEB28@sda21(r2) +/* 803781F4 00375154 54 C0 30 32 */ slwi r0, r6, 6 +/* 803781F8 00375158 38 A4 00 84 */ addi r5, r4, 0x84 +/* 803781FC 0037515C 80 84 00 84 */ lwz r4, 0x84(r4) +/* 80378200 00375160 54 84 06 A6 */ rlwinm r4, r4, 0, 0x1a, 0x13 +/* 80378204 00375164 7C 80 03 78 */ or r0, r4, r0 +/* 80378208 00375168 90 05 00 00 */ stw r0, 0(r5) +/* 8037820C 0037516C 48 00 00 40 */ b lbl_8037824C +/* 80378210 00375170 80 82 CE 08 */ lwz r4, lbl_805AEB28@sda21(r2) +/* 80378214 00375174 54 C0 60 26 */ slwi r0, r6, 0xc +/* 80378218 00375178 38 A4 00 84 */ addi r5, r4, 0x84 +/* 8037821C 0037517C 80 84 00 84 */ lwz r4, 0x84(r4) +/* 80378220 00375180 54 84 05 1A */ rlwinm r4, r4, 0, 0x14, 0xd +/* 80378224 00375184 7C 80 03 78 */ or r0, r4, r0 +/* 80378228 00375188 90 05 00 00 */ stw r0, 0(r5) +/* 8037822C 0037518C 48 00 00 20 */ b lbl_8037824C +lbl_80378230: +/* 80378230 00375190 80 82 CE 08 */ lwz r4, lbl_805AEB28@sda21(r2) +/* 80378234 00375194 54 C0 90 1A */ slwi r0, r6, 0x12 +/* 80378238 00375198 38 A4 00 84 */ addi r5, r4, 0x84 +/* 8037823C 0037519C 80 84 00 84 */ lwz r4, 0x84(r4) +/* 80378240 003751A0 54 84 03 8E */ rlwinm r4, r4, 0, 0xe, 7 +/* 80378244 003751A4 7C 80 03 78 */ or r0, r4, r0 +/* 80378248 003751A8 90 05 00 00 */ stw r0, 0(r5) +lbl_8037824C: +/* 8037824C 003751AC 38 63 00 01 */ addi r3, r3, 1 +/* 80378250 003751B0 48 00 45 15 */ bl __GXSetMatrixIndex +/* 80378254 003751B4 80 01 00 0C */ lwz r0, 0xc(r1) +/* 80378258 003751B8 38 21 00 08 */ addi r1, r1, 8 +/* 8037825C 003751BC 7C 08 03 A6 */ mtlr r0 +/* 80378260 003751C0 4E 80 00 20 */ blr + +.global GXSetNumTexGens +GXSetNumTexGens: +/* 80378264 003751C4 80 C2 CE 08 */ lwz r6, lbl_805AEB28@sda21(r2) +/* 80378268 003751C8 54 68 06 3E */ clrlwi r8, r3, 0x18 +/* 8037826C 003751CC 38 80 00 10 */ li r4, 0x10 +/* 80378270 003751D0 80 A6 02 04 */ lwz r5, 0x204(r6) +/* 80378274 003751D4 3C 60 CC 01 */ lis r3, 0xCC008000@ha +/* 80378278 003751D8 38 00 10 3F */ li r0, 0x103f +/* 8037827C 003751DC 54 A5 00 36 */ rlwinm r5, r5, 0, 0, 0x1b +/* 80378280 003751E0 7C A5 43 78 */ or r5, r5, r8 +/* 80378284 003751E4 90 A6 02 04 */ stw r5, 0x204(r6) +/* 80378288 003751E8 98 83 80 00 */ stb r4, 0xCC008000@l(r3) +/* 8037828C 003751EC 90 03 80 00 */ stw r0, 0xCC008000@l(r3) +/* 80378290 003751F0 91 03 80 00 */ stw r8, 0xCC008000@l(r3) +/* 80378294 003751F4 80 06 04 F4 */ lwz r0, 0x4f4(r6) +/* 80378298 003751F8 60 00 00 04 */ ori r0, r0, 4 +/* 8037829C 003751FC 90 06 04 F4 */ stw r0, 0x4f4(r6) +/* 803782A0 00375200 4E 80 00 20 */ blr + diff --git a/asm/Dolphin/GX/GXBump.s b/asm/Dolphin/GX/GXBump.s new file mode 100644 index 00000000..f0552f3e --- /dev/null +++ b/asm/Dolphin/GX/GXBump.s @@ -0,0 +1,433 @@ +.include "macros.inc" + +.section .text, "ax" + +.global GXSetTevIndirect +GXSetTevIndirect: +/* 8037AE2C 00377D8C 94 21 FF D8 */ stwu r1, -0x28(r1) +/* 8037AE30 00377D90 54 84 07 B6 */ rlwinm r4, r4, 0, 0x1e, 0x1b +/* 8037AE34 00377D94 54 A0 10 3A */ slwi r0, r5, 2 +/* 8037AE38 00377D98 7C 80 03 78 */ or r0, r4, r0 +/* 8037AE3C 00377D9C 81 61 00 34 */ lwz r11, 0x34(r1) +/* 8037AE40 00377DA0 54 05 07 30 */ rlwinm r5, r0, 0, 0x1c, 0x18 +/* 8037AE44 00377DA4 89 81 00 33 */ lbz r12, 0x33(r1) +/* 8037AE48 00377DA8 54 C0 20 36 */ slwi r0, r6, 4 +/* 8037AE4C 00377DAC 80 82 CE 08 */ lwz r4, lbl_805AEB28@sda21(r2) +/* 8037AE50 00377DB0 7C A0 03 78 */ or r0, r5, r0 +/* 8037AE54 00377DB4 54 05 06 6C */ rlwinm r5, r0, 0, 0x19, 0x16 +/* 8037AE58 00377DB8 55 60 38 30 */ slwi r0, r11, 7 +/* 8037AE5C 00377DBC 7C A0 03 78 */ or r0, r5, r0 +/* 8037AE60 00377DC0 54 05 05 E4 */ rlwinm r5, r0, 0, 0x17, 0x12 +/* 8037AE64 00377DC4 54 E0 48 2C */ slwi r0, r7, 9 +/* 8037AE68 00377DC8 7C A0 03 78 */ or r0, r5, r0 +/* 8037AE6C 00377DCC 54 05 04 DE */ rlwinm r5, r0, 0, 0x13, 0xf +/* 8037AE70 00377DD0 55 00 68 24 */ slwi r0, r8, 0xd +/* 8037AE74 00377DD4 7C A0 03 78 */ or r0, r5, r0 +/* 8037AE78 00377DD8 38 A3 00 10 */ addi r5, r3, 0x10 +/* 8037AE7C 00377DDC 54 03 04 18 */ rlwinm r3, r0, 0, 0x10, 0xc +/* 8037AE80 00377DE0 55 20 80 1E */ slwi r0, r9, 0x10 +/* 8037AE84 00377DE4 7C 60 03 78 */ or r0, r3, r0 +/* 8037AE88 00377DE8 54 03 03 56 */ rlwinm r3, r0, 0, 0xd, 0xb +/* 8037AE8C 00377DEC 55 80 98 18 */ slwi r0, r12, 0x13 +/* 8037AE90 00377DF0 7C 60 03 78 */ or r0, r3, r0 +/* 8037AE94 00377DF4 54 03 03 14 */ rlwinm r3, r0, 0, 0xc, 0xa +/* 8037AE98 00377DF8 55 40 A1 16 */ rlwinm r0, r10, 0x14, 4, 0xb +/* 8037AE9C 00377DFC 7C 66 03 78 */ or r6, r3, r0 +/* 8037AEA0 00377E00 38 00 00 61 */ li r0, 0x61 +/* 8037AEA4 00377E04 3C 60 CC 01 */ lis r3, 0xCC008000@ha +/* 8037AEA8 00377E08 98 03 80 00 */ stb r0, 0xCC008000@l(r3) +/* 8037AEAC 00377E0C 54 A0 C0 0E */ slwi r0, r5, 0x18 +/* 8037AEB0 00377E10 50 C0 02 3E */ rlwimi r0, r6, 0, 8, 0x1f +/* 8037AEB4 00377E14 90 03 80 00 */ stw r0, 0xCC008000@l(r3) +/* 8037AEB8 00377E18 38 00 00 00 */ li r0, 0 +/* 8037AEBC 00377E1C B0 04 00 02 */ sth r0, 2(r4) +/* 8037AEC0 00377E20 38 21 00 28 */ addi r1, r1, 0x28 +/* 8037AEC4 00377E24 4E 80 00 20 */ blr + +.global GXSetIndTexMtx +GXSetIndTexMtx: +/* 8037AEC8 00377E28 2C 03 00 08 */ cmpwi r3, 8 +/* 8037AECC 00377E2C 94 21 FF 88 */ stwu r1, -0x78(r1) +/* 8037AED0 00377E30 41 82 00 44 */ beq lbl_8037AF14 +/* 8037AED4 00377E34 40 80 00 1C */ bge lbl_8037AEF0 +/* 8037AED8 00377E38 2C 03 00 04 */ cmpwi r3, 4 +/* 8037AEDC 00377E3C 41 82 00 38 */ beq lbl_8037AF14 +/* 8037AEE0 00377E40 40 80 00 24 */ bge lbl_8037AF04 +/* 8037AEE4 00377E44 2C 03 00 01 */ cmpwi r3, 1 +/* 8037AEE8 00377E48 40 80 00 14 */ bge lbl_8037AEFC +/* 8037AEEC 00377E4C 48 00 00 28 */ b lbl_8037AF14 +lbl_8037AEF0: +/* 8037AEF0 00377E50 2C 03 00 0C */ cmpwi r3, 0xc +/* 8037AEF4 00377E54 40 80 00 20 */ bge lbl_8037AF14 +/* 8037AEF8 00377E58 48 00 00 14 */ b lbl_8037AF0C +lbl_8037AEFC: +/* 8037AEFC 00377E5C 38 03 FF FF */ addi r0, r3, -1 +/* 8037AF00 00377E60 48 00 00 18 */ b lbl_8037AF18 +lbl_8037AF04: +/* 8037AF04 00377E64 38 03 FF FB */ addi r0, r3, -5 +/* 8037AF08 00377E68 48 00 00 10 */ b lbl_8037AF18 +lbl_8037AF0C: +/* 8037AF0C 00377E6C 38 03 FF F7 */ addi r0, r3, -9 +/* 8037AF10 00377E70 48 00 00 08 */ b lbl_8037AF18 +lbl_8037AF14: +/* 8037AF14 00377E74 38 00 00 00 */ li r0, 0 +lbl_8037AF18: +/* 8037AF18 00377E78 C0 42 CE 90 */ lfs f2, lbl_805AEBB0@sda21(r2) +/* 8037AF1C 00377E7C 1C 60 00 03 */ mulli r3, r0, 3 +/* 8037AF20 00377E80 C0 24 00 00 */ lfs f1, 0(r4) +/* 8037AF24 00377E84 C0 04 00 0C */ lfs f0, 0xc(r4) +/* 8037AF28 00377E88 EC 22 00 72 */ fmuls f1, f2, f1 +/* 8037AF2C 00377E8C 39 65 00 11 */ addi r11, r5, 0x11 +/* 8037AF30 00377E90 EC 02 00 32 */ fmuls f0, f2, f0 +/* 8037AF34 00377E94 38 03 00 06 */ addi r0, r3, 6 +/* 8037AF38 00377E98 7D 6B 07 74 */ extsb r11, r11 +/* 8037AF3C 00377E9C FC 20 08 1E */ fctiwz f1, f1 +/* 8037AF40 00377EA0 39 40 00 61 */ li r10, 0x61 +/* 8037AF44 00377EA4 FC 00 00 1E */ fctiwz f0, f0 +/* 8037AF48 00377EA8 3D 20 CC 01 */ lis r9, 0xCC008000@ha +/* 8037AF4C 00377EAC 99 49 80 00 */ stb r10, 0xCC008000@l(r9) +/* 8037AF50 00377EB0 D8 21 00 70 */ stfd f1, 0x70(r1) +/* 8037AF54 00377EB4 54 00 C0 0E */ slwi r0, r0, 0x18 +/* 8037AF58 00377EB8 38 C3 00 07 */ addi r6, r3, 7 +/* 8037AF5C 00377EBC D8 01 00 68 */ stfd f0, 0x68(r1) +/* 8037AF60 00377EC0 38 A3 00 08 */ addi r5, r3, 8 +/* 8037AF64 00377EC4 81 01 00 74 */ lwz r8, 0x74(r1) +/* 8037AF68 00377EC8 80 E1 00 6C */ lwz r7, 0x6c(r1) +/* 8037AF6C 00377ECC 80 62 CE 08 */ lwz r3, lbl_805AEB28@sda21(r2) +/* 8037AF70 00377ED0 54 E7 5A A8 */ rlwinm r7, r7, 0xb, 0xa, 0x14 +/* 8037AF74 00377ED4 51 07 05 7E */ rlwimi r7, r8, 0, 0x15, 0x1f +/* 8037AF78 00377ED8 54 E7 02 8E */ rlwinm r7, r7, 0, 0xa, 7 +/* 8037AF7C 00377EDC 51 67 B2 12 */ rlwimi r7, r11, 0x16, 8, 9 +/* 8037AF80 00377EE0 50 E0 02 3E */ rlwimi r0, r7, 0, 8, 0x1f +/* 8037AF84 00377EE4 90 09 80 00 */ stw r0, 0xCC008000@l(r9) +/* 8037AF88 00377EE8 38 00 00 00 */ li r0, 0 +/* 8037AF8C 00377EEC C0 24 00 04 */ lfs f1, 4(r4) +/* 8037AF90 00377EF0 C0 04 00 10 */ lfs f0, 0x10(r4) +/* 8037AF94 00377EF4 EC 22 00 72 */ fmuls f1, f2, f1 +/* 8037AF98 00377EF8 EC 02 00 32 */ fmuls f0, f2, f0 +/* 8037AF9C 00377EFC 99 49 80 00 */ stb r10, 0xCC008000@l(r9) +/* 8037AFA0 00377F00 FC 20 08 1E */ fctiwz f1, f1 +/* 8037AFA4 00377F04 FC 00 00 1E */ fctiwz f0, f0 +/* 8037AFA8 00377F08 D8 21 00 60 */ stfd f1, 0x60(r1) +/* 8037AFAC 00377F0C D8 01 00 58 */ stfd f0, 0x58(r1) +/* 8037AFB0 00377F10 81 01 00 64 */ lwz r8, 0x64(r1) +/* 8037AFB4 00377F14 80 E1 00 5C */ lwz r7, 0x5c(r1) +/* 8037AFB8 00377F18 54 E7 5A A8 */ rlwinm r7, r7, 0xb, 0xa, 0x14 +/* 8037AFBC 00377F1C 51 07 05 7E */ rlwimi r7, r8, 0, 0x15, 0x1f +/* 8037AFC0 00377F20 54 E7 02 8E */ rlwinm r7, r7, 0, 0xa, 7 +/* 8037AFC4 00377F24 51 67 A2 12 */ rlwimi r7, r11, 0x14, 8, 9 +/* 8037AFC8 00377F28 54 E7 02 3E */ clrlwi r7, r7, 8 +/* 8037AFCC 00377F2C 50 C7 C0 0E */ rlwimi r7, r6, 0x18, 0, 7 +/* 8037AFD0 00377F30 90 E9 80 00 */ stw r7, 0xCC008000@l(r9) +/* 8037AFD4 00377F34 C0 24 00 08 */ lfs f1, 8(r4) +/* 8037AFD8 00377F38 C0 04 00 14 */ lfs f0, 0x14(r4) +/* 8037AFDC 00377F3C EC 22 00 72 */ fmuls f1, f2, f1 +/* 8037AFE0 00377F40 EC 02 00 32 */ fmuls f0, f2, f0 +/* 8037AFE4 00377F44 99 49 80 00 */ stb r10, 0xCC008000@l(r9) +/* 8037AFE8 00377F48 FC 20 08 1E */ fctiwz f1, f1 +/* 8037AFEC 00377F4C FC 00 00 1E */ fctiwz f0, f0 +/* 8037AFF0 00377F50 D8 21 00 50 */ stfd f1, 0x50(r1) +/* 8037AFF4 00377F54 D8 01 00 48 */ stfd f0, 0x48(r1) +/* 8037AFF8 00377F58 80 C1 00 54 */ lwz r6, 0x54(r1) +/* 8037AFFC 00377F5C 80 81 00 4C */ lwz r4, 0x4c(r1) +/* 8037B000 00377F60 54 84 5A A8 */ rlwinm r4, r4, 0xb, 0xa, 0x14 +/* 8037B004 00377F64 50 C4 05 7E */ rlwimi r4, r6, 0, 0x15, 0x1f +/* 8037B008 00377F68 54 84 02 8E */ rlwinm r4, r4, 0, 0xa, 7 +/* 8037B00C 00377F6C 51 64 92 12 */ rlwimi r4, r11, 0x12, 8, 9 +/* 8037B010 00377F70 54 84 02 3E */ clrlwi r4, r4, 8 +/* 8037B014 00377F74 50 A4 C0 0E */ rlwimi r4, r5, 0x18, 0, 7 +/* 8037B018 00377F78 90 89 80 00 */ stw r4, 0xCC008000@l(r9) +/* 8037B01C 00377F7C B0 03 00 02 */ sth r0, 2(r3) +/* 8037B020 00377F80 38 21 00 78 */ addi r1, r1, 0x78 +/* 8037B024 00377F84 4E 80 00 20 */ blr + +.global GXSetIndTexCoordScale +GXSetIndTexCoordScale: +/* 8037B028 00377F88 2C 03 00 02 */ cmpwi r3, 2 +/* 8037B02C 00377F8C 41 82 00 C8 */ beq lbl_8037B0F4 +/* 8037B030 00377F90 40 80 00 14 */ bge lbl_8037B044 +/* 8037B034 00377F94 2C 03 00 00 */ cmpwi r3, 0 +/* 8037B038 00377F98 41 82 00 18 */ beq lbl_8037B050 +/* 8037B03C 00377F9C 40 80 00 64 */ bge lbl_8037B0A0 +/* 8037B040 00377FA0 48 00 01 54 */ b lbl_8037B194 +lbl_8037B044: +/* 8037B044 00377FA4 2C 03 00 04 */ cmpwi r3, 4 +/* 8037B048 00377FA8 40 80 01 4C */ bge lbl_8037B194 +/* 8037B04C 00377FAC 48 00 00 F8 */ b lbl_8037B144 +lbl_8037B050: +/* 8037B050 00377FB0 80 E2 CE 08 */ lwz r7, lbl_805AEB28@sda21(r2) +/* 8037B054 00377FB4 54 A5 20 36 */ slwi r5, r5, 4 +/* 8037B058 00377FB8 38 00 00 61 */ li r0, 0x61 +/* 8037B05C 00377FBC 80 C7 01 28 */ lwz r6, 0x128(r7) +/* 8037B060 00377FC0 3C 60 CC 01 */ lis r3, 0xCC008000@ha +/* 8037B064 00377FC4 54 C6 00 36 */ rlwinm r6, r6, 0, 0, 0x1b +/* 8037B068 00377FC8 7C C4 23 78 */ or r4, r6, r4 +/* 8037B06C 00377FCC 90 87 01 28 */ stw r4, 0x128(r7) +/* 8037B070 00377FD0 80 87 01 28 */ lwz r4, 0x128(r7) +/* 8037B074 00377FD4 54 84 07 2E */ rlwinm r4, r4, 0, 0x1c, 0x17 +/* 8037B078 00377FD8 7C 84 2B 78 */ or r4, r4, r5 +/* 8037B07C 00377FDC 90 87 01 28 */ stw r4, 0x128(r7) +/* 8037B080 00377FE0 80 87 01 28 */ lwz r4, 0x128(r7) +/* 8037B084 00377FE4 54 84 02 3E */ clrlwi r4, r4, 8 +/* 8037B088 00377FE8 64 84 25 00 */ oris r4, r4, 0x2500 +/* 8037B08C 00377FEC 90 87 01 28 */ stw r4, 0x128(r7) +/* 8037B090 00377FF0 98 03 80 00 */ stb r0, 0xCC008000@l(r3) +/* 8037B094 00377FF4 80 07 01 28 */ lwz r0, 0x128(r7) +/* 8037B098 00377FF8 90 03 80 00 */ stw r0, 0xCC008000@l(r3) +/* 8037B09C 00377FFC 48 00 00 F8 */ b lbl_8037B194 +lbl_8037B0A0: +/* 8037B0A0 00378000 80 E2 CE 08 */ lwz r7, lbl_805AEB28@sda21(r2) +/* 8037B0A4 00378004 54 86 40 2E */ slwi r6, r4, 8 +/* 8037B0A8 00378008 54 A4 60 26 */ slwi r4, r5, 0xc +/* 8037B0AC 0037800C 80 A7 01 28 */ lwz r5, 0x128(r7) +/* 8037B0B0 00378010 38 00 00 61 */ li r0, 0x61 +/* 8037B0B4 00378014 3C 60 CC 01 */ lis r3, 0xCC008000@ha +/* 8037B0B8 00378018 54 A5 06 26 */ rlwinm r5, r5, 0, 0x18, 0x13 +/* 8037B0BC 0037801C 7C A5 33 78 */ or r5, r5, r6 +/* 8037B0C0 00378020 90 A7 01 28 */ stw r5, 0x128(r7) +/* 8037B0C4 00378024 80 A7 01 28 */ lwz r5, 0x128(r7) +/* 8037B0C8 00378028 54 A5 05 1E */ rlwinm r5, r5, 0, 0x14, 0xf +/* 8037B0CC 0037802C 7C A4 23 78 */ or r4, r5, r4 +/* 8037B0D0 00378030 90 87 01 28 */ stw r4, 0x128(r7) +/* 8037B0D4 00378034 80 87 01 28 */ lwz r4, 0x128(r7) +/* 8037B0D8 00378038 54 84 02 3E */ clrlwi r4, r4, 8 +/* 8037B0DC 0037803C 64 84 25 00 */ oris r4, r4, 0x2500 +/* 8037B0E0 00378040 90 87 01 28 */ stw r4, 0x128(r7) +/* 8037B0E4 00378044 98 03 80 00 */ stb r0, 0xCC008000@l(r3) +/* 8037B0E8 00378048 80 07 01 28 */ lwz r0, 0x128(r7) +/* 8037B0EC 0037804C 90 03 80 00 */ stw r0, 0xCC008000@l(r3) +/* 8037B0F0 00378050 48 00 00 A4 */ b lbl_8037B194 +lbl_8037B0F4: +/* 8037B0F4 00378054 80 E2 CE 08 */ lwz r7, lbl_805AEB28@sda21(r2) +/* 8037B0F8 00378058 54 A5 20 36 */ slwi r5, r5, 4 +/* 8037B0FC 0037805C 38 00 00 61 */ li r0, 0x61 +/* 8037B100 00378060 80 C7 01 2C */ lwz r6, 0x12c(r7) +/* 8037B104 00378064 3C 60 CC 01 */ lis r3, 0xCC008000@ha +/* 8037B108 00378068 54 C6 00 36 */ rlwinm r6, r6, 0, 0, 0x1b +/* 8037B10C 0037806C 7C C4 23 78 */ or r4, r6, r4 +/* 8037B110 00378070 90 87 01 2C */ stw r4, 0x12c(r7) +/* 8037B114 00378074 80 87 01 2C */ lwz r4, 0x12c(r7) +/* 8037B118 00378078 54 84 07 2E */ rlwinm r4, r4, 0, 0x1c, 0x17 +/* 8037B11C 0037807C 7C 84 2B 78 */ or r4, r4, r5 +/* 8037B120 00378080 90 87 01 2C */ stw r4, 0x12c(r7) +/* 8037B124 00378084 80 87 01 2C */ lwz r4, 0x12c(r7) +/* 8037B128 00378088 54 84 02 3E */ clrlwi r4, r4, 8 +/* 8037B12C 0037808C 64 84 26 00 */ oris r4, r4, 0x2600 +/* 8037B130 00378090 90 87 01 2C */ stw r4, 0x12c(r7) +/* 8037B134 00378094 98 03 80 00 */ stb r0, 0xCC008000@l(r3) +/* 8037B138 00378098 80 07 01 2C */ lwz r0, 0x12c(r7) +/* 8037B13C 0037809C 90 03 80 00 */ stw r0, 0xCC008000@l(r3) +/* 8037B140 003780A0 48 00 00 54 */ b lbl_8037B194 +lbl_8037B144: +/* 8037B144 003780A4 80 E2 CE 08 */ lwz r7, lbl_805AEB28@sda21(r2) +/* 8037B148 003780A8 54 86 40 2E */ slwi r6, r4, 8 +/* 8037B14C 003780AC 54 A4 60 26 */ slwi r4, r5, 0xc +/* 8037B150 003780B0 80 A7 01 2C */ lwz r5, 0x12c(r7) +/* 8037B154 003780B4 38 00 00 61 */ li r0, 0x61 +/* 8037B158 003780B8 3C 60 CC 01 */ lis r3, 0xCC008000@ha +/* 8037B15C 003780BC 54 A5 06 26 */ rlwinm r5, r5, 0, 0x18, 0x13 +/* 8037B160 003780C0 7C A5 33 78 */ or r5, r5, r6 +/* 8037B164 003780C4 90 A7 01 2C */ stw r5, 0x12c(r7) +/* 8037B168 003780C8 80 A7 01 2C */ lwz r5, 0x12c(r7) +/* 8037B16C 003780CC 54 A5 05 1E */ rlwinm r5, r5, 0, 0x14, 0xf +/* 8037B170 003780D0 7C A4 23 78 */ or r4, r5, r4 +/* 8037B174 003780D4 90 87 01 2C */ stw r4, 0x12c(r7) +/* 8037B178 003780D8 80 87 01 2C */ lwz r4, 0x12c(r7) +/* 8037B17C 003780DC 54 84 02 3E */ clrlwi r4, r4, 8 +/* 8037B180 003780E0 64 84 26 00 */ oris r4, r4, 0x2600 +/* 8037B184 003780E4 90 87 01 2C */ stw r4, 0x12c(r7) +/* 8037B188 003780E8 98 03 80 00 */ stb r0, 0xCC008000@l(r3) +/* 8037B18C 003780EC 80 07 01 2C */ lwz r0, 0x12c(r7) +/* 8037B190 003780F0 90 03 80 00 */ stw r0, 0xCC008000@l(r3) +lbl_8037B194: +/* 8037B194 003780F4 80 62 CE 08 */ lwz r3, lbl_805AEB28@sda21(r2) +/* 8037B198 003780F8 38 00 00 00 */ li r0, 0 +/* 8037B19C 003780FC B0 03 00 02 */ sth r0, 2(r3) +/* 8037B1A0 00378100 4E 80 00 20 */ blr + +.global GXSetIndTexOrder +GXSetIndTexOrder: +/* 8037B1A4 00378104 2C 03 00 02 */ cmpwi r3, 2 +/* 8037B1A8 00378108 41 82 00 84 */ beq lbl_8037B22C +/* 8037B1AC 0037810C 40 80 00 14 */ bge lbl_8037B1C0 +/* 8037B1B0 00378110 2C 03 00 00 */ cmpwi r3, 0 +/* 8037B1B4 00378114 41 82 00 18 */ beq lbl_8037B1CC +/* 8037B1B8 00378118 40 80 00 44 */ bge lbl_8037B1FC +/* 8037B1BC 0037811C 48 00 00 CC */ b lbl_8037B288 +lbl_8037B1C0: +/* 8037B1C0 00378120 2C 03 00 04 */ cmpwi r3, 4 +/* 8037B1C4 00378124 40 80 00 C4 */ bge lbl_8037B288 +/* 8037B1C8 00378128 48 00 00 94 */ b lbl_8037B25C +lbl_8037B1CC: +/* 8037B1CC 0037812C 80 62 CE 08 */ lwz r3, lbl_805AEB28@sda21(r2) +/* 8037B1D0 00378130 54 80 18 38 */ slwi r0, r4, 3 +/* 8037B1D4 00378134 38 83 01 20 */ addi r4, r3, 0x120 +/* 8037B1D8 00378138 80 63 01 20 */ lwz r3, 0x120(r3) +/* 8037B1DC 0037813C 54 63 00 38 */ rlwinm r3, r3, 0, 0, 0x1c +/* 8037B1E0 00378140 7C 63 2B 78 */ or r3, r3, r5 +/* 8037B1E4 00378144 90 64 00 00 */ stw r3, 0(r4) +/* 8037B1E8 00378148 80 64 00 00 */ lwz r3, 0(r4) +/* 8037B1EC 0037814C 54 63 07 72 */ rlwinm r3, r3, 0, 0x1d, 0x19 +/* 8037B1F0 00378150 7C 60 03 78 */ or r0, r3, r0 +/* 8037B1F4 00378154 90 04 00 00 */ stw r0, 0(r4) +/* 8037B1F8 00378158 48 00 00 90 */ b lbl_8037B288 +lbl_8037B1FC: +/* 8037B1FC 0037815C 80 C2 CE 08 */ lwz r6, lbl_805AEB28@sda21(r2) +/* 8037B200 00378160 54 80 48 2C */ slwi r0, r4, 9 +/* 8037B204 00378164 54 A3 30 32 */ slwi r3, r5, 6 +/* 8037B208 00378168 80 86 01 20 */ lwz r4, 0x120(r6) +/* 8037B20C 0037816C 54 84 06 AC */ rlwinm r4, r4, 0, 0x1a, 0x16 +/* 8037B210 00378170 7C 83 1B 78 */ or r3, r4, r3 +/* 8037B214 00378174 90 66 01 20 */ stw r3, 0x120(r6) +/* 8037B218 00378178 80 66 01 20 */ lwz r3, 0x120(r6) +/* 8037B21C 0037817C 54 63 05 E6 */ rlwinm r3, r3, 0, 0x17, 0x13 +/* 8037B220 00378180 7C 60 03 78 */ or r0, r3, r0 +/* 8037B224 00378184 90 06 01 20 */ stw r0, 0x120(r6) +/* 8037B228 00378188 48 00 00 60 */ b lbl_8037B288 +lbl_8037B22C: +/* 8037B22C 0037818C 80 C2 CE 08 */ lwz r6, lbl_805AEB28@sda21(r2) +/* 8037B230 00378190 54 80 78 20 */ slwi r0, r4, 0xf +/* 8037B234 00378194 54 A3 60 26 */ slwi r3, r5, 0xc +/* 8037B238 00378198 80 86 01 20 */ lwz r4, 0x120(r6) +/* 8037B23C 0037819C 54 84 05 20 */ rlwinm r4, r4, 0, 0x14, 0x10 +/* 8037B240 003781A0 7C 83 1B 78 */ or r3, r4, r3 +/* 8037B244 003781A4 90 66 01 20 */ stw r3, 0x120(r6) +/* 8037B248 003781A8 80 66 01 20 */ lwz r3, 0x120(r6) +/* 8037B24C 003781AC 54 63 04 5A */ rlwinm r3, r3, 0, 0x11, 0xd +/* 8037B250 003781B0 7C 60 03 78 */ or r0, r3, r0 +/* 8037B254 003781B4 90 06 01 20 */ stw r0, 0x120(r6) +/* 8037B258 003781B8 48 00 00 30 */ b lbl_8037B288 +lbl_8037B25C: +/* 8037B25C 003781BC 80 C2 CE 08 */ lwz r6, lbl_805AEB28@sda21(r2) +/* 8037B260 003781C0 54 80 A8 14 */ slwi r0, r4, 0x15 +/* 8037B264 003781C4 54 A3 90 1A */ slwi r3, r5, 0x12 +/* 8037B268 003781C8 80 86 01 20 */ lwz r4, 0x120(r6) +/* 8037B26C 003781CC 54 84 03 94 */ rlwinm r4, r4, 0, 0xe, 0xa +/* 8037B270 003781D0 7C 83 1B 78 */ or r3, r4, r3 +/* 8037B274 003781D4 90 66 01 20 */ stw r3, 0x120(r6) +/* 8037B278 003781D8 80 66 01 20 */ lwz r3, 0x120(r6) +/* 8037B27C 003781DC 54 63 02 CE */ rlwinm r3, r3, 0, 0xb, 7 +/* 8037B280 003781E0 7C 60 03 78 */ or r0, r3, r0 +/* 8037B284 003781E4 90 06 01 20 */ stw r0, 0x120(r6) +lbl_8037B288: +/* 8037B288 003781E8 38 00 00 61 */ li r0, 0x61 +/* 8037B28C 003781EC 80 82 CE 08 */ lwz r4, lbl_805AEB28@sda21(r2) +/* 8037B290 003781F0 3C A0 CC 01 */ lis r5, 0xCC008000@ha +/* 8037B294 003781F4 98 05 80 00 */ stb r0, 0xCC008000@l(r5) +/* 8037B298 003781F8 38 00 00 00 */ li r0, 0 +/* 8037B29C 003781FC 80 64 01 20 */ lwz r3, 0x120(r4) +/* 8037B2A0 00378200 90 65 80 00 */ stw r3, 0xCC008000@l(r5) +/* 8037B2A4 00378204 80 64 04 F4 */ lwz r3, 0x4f4(r4) +/* 8037B2A8 00378208 60 63 00 03 */ ori r3, r3, 3 +/* 8037B2AC 0037820C 90 64 04 F4 */ stw r3, 0x4f4(r4) +/* 8037B2B0 00378210 B0 04 00 02 */ sth r0, 2(r4) +/* 8037B2B4 00378214 4E 80 00 20 */ blr + +.global GXSetNumIndStages +GXSetNumIndStages: +/* 8037B2B8 00378218 80 82 CE 08 */ lwz r4, lbl_805AEB28@sda21(r2) +/* 8037B2BC 0037821C 54 60 82 1E */ rlwinm r0, r3, 0x10, 8, 0xf +/* 8037B2C0 00378220 80 64 02 04 */ lwz r3, 0x204(r4) +/* 8037B2C4 00378224 54 63 04 18 */ rlwinm r3, r3, 0, 0x10, 0xc +/* 8037B2C8 00378228 7C 60 03 78 */ or r0, r3, r0 +/* 8037B2CC 0037822C 90 04 02 04 */ stw r0, 0x204(r4) +/* 8037B2D0 00378230 80 04 04 F4 */ lwz r0, 0x4f4(r4) +/* 8037B2D4 00378234 60 00 00 06 */ ori r0, r0, 6 +/* 8037B2D8 00378238 90 04 04 F4 */ stw r0, 0x4f4(r4) +/* 8037B2DC 0037823C 4E 80 00 20 */ blr + +.global GXSetTevDirect +GXSetTevDirect: +/* 8037B2E0 00378240 7C 08 02 A6 */ mflr r0 +/* 8037B2E4 00378244 38 80 00 00 */ li r4, 0 +/* 8037B2E8 00378248 90 01 00 04 */ stw r0, 4(r1) +/* 8037B2EC 0037824C 38 00 00 00 */ li r0, 0 +/* 8037B2F0 00378250 38 A0 00 00 */ li r5, 0 +/* 8037B2F4 00378254 94 21 FF E8 */ stwu r1, -0x18(r1) +/* 8037B2F8 00378258 38 C0 00 00 */ li r6, 0 +/* 8037B2FC 0037825C 38 E0 00 00 */ li r7, 0 +/* 8037B300 00378260 90 01 00 08 */ stw r0, 8(r1) +/* 8037B304 00378264 39 00 00 00 */ li r8, 0 +/* 8037B308 00378268 39 20 00 00 */ li r9, 0 +/* 8037B30C 0037826C 90 01 00 0C */ stw r0, 0xc(r1) +/* 8037B310 00378270 39 40 00 00 */ li r10, 0 +/* 8037B314 00378274 4B FF FB 19 */ bl GXSetTevIndirect +/* 8037B318 00378278 80 01 00 1C */ lwz r0, 0x1c(r1) +/* 8037B31C 0037827C 38 21 00 18 */ addi r1, r1, 0x18 +/* 8037B320 00378280 7C 08 03 A6 */ mtlr r0 +/* 8037B324 00378284 4E 80 00 20 */ blr + +.global __GXUpdateBPMask +__GXUpdateBPMask: +/* 8037B328 00378288 80 62 CE 08 */ lwz r3, lbl_805AEB28@sda21(r2) +/* 8037B32C 0037828C 38 C0 00 00 */ li r6, 0 +/* 8037B330 00378290 38 80 00 00 */ li r4, 0 +/* 8037B334 00378294 80 03 02 04 */ lwz r0, 0x204(r3) +/* 8037B338 00378298 54 00 87 7E */ rlwinm r0, r0, 0x10, 0x1d, 0x1f +/* 8037B33C 0037829C 28 00 00 00 */ cmplwi r0, 0 +/* 8037B340 003782A0 7C 09 03 A6 */ mtctr r0 +/* 8037B344 003782A4 40 81 00 6C */ ble lbl_8037B3B0 +lbl_8037B348: +/* 8037B348 003782A8 2C 04 00 02 */ cmpwi r4, 2 +/* 8037B34C 003782AC 41 82 00 3C */ beq lbl_8037B388 +/* 8037B350 003782B0 40 80 00 14 */ bge lbl_8037B364 +/* 8037B354 003782B4 2C 04 00 00 */ cmpwi r4, 0 +/* 8037B358 003782B8 41 82 00 18 */ beq lbl_8037B370 +/* 8037B35C 003782BC 40 80 00 20 */ bge lbl_8037B37C +/* 8037B360 003782C0 48 00 00 3C */ b lbl_8037B39C +lbl_8037B364: +/* 8037B364 003782C4 2C 04 00 04 */ cmpwi r4, 4 +/* 8037B368 003782C8 40 80 00 34 */ bge lbl_8037B39C +/* 8037B36C 003782CC 48 00 00 28 */ b lbl_8037B394 +lbl_8037B370: +/* 8037B370 003782D0 80 03 01 20 */ lwz r0, 0x120(r3) +/* 8037B374 003782D4 54 05 07 7E */ clrlwi r5, r0, 0x1d +/* 8037B378 003782D8 48 00 00 24 */ b lbl_8037B39C +lbl_8037B37C: +/* 8037B37C 003782DC 80 03 01 20 */ lwz r0, 0x120(r3) +/* 8037B380 003782E0 54 05 D7 7E */ rlwinm r5, r0, 0x1a, 0x1d, 0x1f +/* 8037B384 003782E4 48 00 00 18 */ b lbl_8037B39C +lbl_8037B388: +/* 8037B388 003782E8 80 03 01 20 */ lwz r0, 0x120(r3) +/* 8037B38C 003782EC 54 05 A7 7E */ rlwinm r5, r0, 0x14, 0x1d, 0x1f +/* 8037B390 003782F0 48 00 00 0C */ b lbl_8037B39C +lbl_8037B394: +/* 8037B394 003782F4 80 03 01 20 */ lwz r0, 0x120(r3) +/* 8037B398 003782F8 54 05 77 7E */ rlwinm r5, r0, 0xe, 0x1d, 0x1f +lbl_8037B39C: +/* 8037B39C 003782FC 38 00 00 01 */ li r0, 1 +/* 8037B3A0 00378300 7C 00 28 30 */ slw r0, r0, r5 +/* 8037B3A4 00378304 7C C6 03 78 */ or r6, r6, r0 +/* 8037B3A8 00378308 38 84 00 01 */ addi r4, r4, 1 +/* 8037B3AC 0037830C 42 00 FF 9C */ bdnz lbl_8037B348 +lbl_8037B3B0: +/* 8037B3B0 00378310 38 83 01 24 */ addi r4, r3, 0x124 +/* 8037B3B4 00378314 80 63 01 24 */ lwz r3, 0x124(r3) +/* 8037B3B8 00378318 54 60 06 3E */ clrlwi r0, r3, 0x18 +/* 8037B3BC 0037831C 7C 00 30 40 */ cmplw r0, r6 +/* 8037B3C0 00378320 4D 82 00 20 */ beqlr +/* 8037B3C4 00378324 54 60 00 2E */ rlwinm r0, r3, 0, 0, 0x17 +/* 8037B3C8 00378328 7C 00 33 78 */ or r0, r0, r6 +/* 8037B3CC 0037832C 90 04 00 00 */ stw r0, 0(r4) +/* 8037B3D0 00378330 38 00 00 61 */ li r0, 0x61 +/* 8037B3D4 00378334 3C A0 CC 01 */ lis r5, 0xCC008000@ha +/* 8037B3D8 00378338 98 05 80 00 */ stb r0, 0xCC008000@l(r5) +/* 8037B3DC 0037833C 38 00 00 00 */ li r0, 0 +/* 8037B3E0 00378340 80 82 CE 08 */ lwz r4, lbl_805AEB28@sda21(r2) +/* 8037B3E4 00378344 80 64 01 24 */ lwz r3, 0x124(r4) +/* 8037B3E8 00378348 90 65 80 00 */ stw r3, 0xCC008000@l(r5) +/* 8037B3EC 0037834C B0 04 00 02 */ sth r0, 2(r4) +/* 8037B3F0 00378350 4E 80 00 20 */ blr + +.global __GXFlushTextureState +__GXFlushTextureState: +/* 8037B3F4 00378354 38 00 00 61 */ li r0, 0x61 +/* 8037B3F8 00378358 80 82 CE 08 */ lwz r4, lbl_805AEB28@sda21(r2) +/* 8037B3FC 0037835C 3C A0 CC 01 */ lis r5, 0xCC008000@ha +/* 8037B400 00378360 98 05 80 00 */ stb r0, 0xCC008000@l(r5) +/* 8037B404 00378364 38 00 00 00 */ li r0, 0 +/* 8037B408 00378368 80 64 01 24 */ lwz r3, 0x124(r4) +/* 8037B40C 0037836C 90 65 80 00 */ stw r3, 0xCC008000@l(r5) +/* 8037B410 00378370 B0 04 00 02 */ sth r0, 2(r4) +/* 8037B414 00378374 4E 80 00 20 */ blr + diff --git a/asm/Dolphin/GX/GXDisplayList.s b/asm/Dolphin/GX/GXDisplayList.s new file mode 100644 index 00000000..b841cf90 --- /dev/null +++ b/asm/Dolphin/GX/GXDisplayList.s @@ -0,0 +1,36 @@ +.include "macros.inc" + +.section .text, "ax" + +.global GXCallDisplayList +GXCallDisplayList: +/* 8037C1D4 00379134 7C 08 02 A6 */ mflr r0 +/* 8037C1D8 00379138 90 01 00 04 */ stw r0, 4(r1) +/* 8037C1DC 0037913C 94 21 FF E8 */ stwu r1, -0x18(r1) +/* 8037C1E0 00379140 93 E1 00 14 */ stw r31, 0x14(r1) +/* 8037C1E4 00379144 3B E4 00 00 */ addi r31, r4, 0 +/* 8037C1E8 00379148 93 C1 00 10 */ stw r30, 0x10(r1) +/* 8037C1EC 0037914C 3B C3 00 00 */ addi r30, r3, 0 +/* 8037C1F0 00379150 80 A2 CE 08 */ lwz r5, lbl_805AEB28@sda21(r2) +/* 8037C1F4 00379154 80 05 04 F4 */ lwz r0, 0x4f4(r5) +/* 8037C1F8 00379158 28 00 00 00 */ cmplwi r0, 0 +/* 8037C1FC 0037915C 41 82 00 08 */ beq lbl_8037C204 +/* 8037C200 00379160 4B FF C6 55 */ bl __GXSetDirtyState +lbl_8037C204: +/* 8037C204 00379164 80 62 CE 08 */ lwz r3, lbl_805AEB28@sda21(r2) +/* 8037C208 00379168 80 03 00 00 */ lwz r0, 0(r3) +/* 8037C20C 0037916C 28 00 00 00 */ cmplwi r0, 0 +/* 8037C210 00379170 40 82 00 08 */ bne lbl_8037C218 +/* 8037C214 00379174 4B FF C7 D1 */ bl __GXSendFlushPrim +lbl_8037C218: +/* 8037C218 00379178 38 00 00 40 */ li r0, 0x40 +/* 8037C21C 0037917C 3C 60 CC 01 */ lis r3, 0xCC008000@ha +/* 8037C220 00379180 98 03 80 00 */ stb r0, 0xCC008000@l(r3) +/* 8037C224 00379184 93 C3 80 00 */ stw r30, 0xCC008000@l(r3) +/* 8037C228 00379188 93 E3 80 00 */ stw r31, 0xCC008000@l(r3) +/* 8037C22C 0037918C 80 01 00 1C */ lwz r0, 0x1c(r1) +/* 8037C230 00379190 83 E1 00 14 */ lwz r31, 0x14(r1) +/* 8037C234 00379194 83 C1 00 10 */ lwz r30, 0x10(r1) +/* 8037C238 00379198 38 21 00 18 */ addi r1, r1, 0x18 +/* 8037C23C 0037919C 7C 08 03 A6 */ mtlr r0 +/* 8037C240 003791A0 4E 80 00 20 */ blr diff --git a/asm/Dolphin/GX/GXFifo.s b/asm/Dolphin/GX/GXFifo.s new file mode 100644 index 00000000..0f7da70a --- /dev/null +++ b/asm/Dolphin/GX/GXFifo.s @@ -0,0 +1,813 @@ +.include "macros.inc" + +.section .text, "ax" + +.global GXCPInterruptHandler +GXCPInterruptHandler: +/* 8037627C 003731DC 7C 08 02 A6 */ mflr r0 +/* 80376280 003731E0 90 01 00 04 */ stw r0, 4(r1) +/* 80376284 003731E4 94 21 FD 20 */ stwu r1, -0x2e0(r1) +/* 80376288 003731E8 93 E1 02 DC */ stw r31, 0x2dc(r1) +/* 8037628C 003731EC 7C 9F 23 78 */ mr r31, r4 +/* 80376290 003731F0 80 AD AC 7C */ lwz r5, lbl_805A983C@sda21(r13) +/* 80376294 003731F4 80 62 CE 08 */ lwz r3, lbl_805AEB28@sda21(r2) +/* 80376298 003731F8 A0 05 00 00 */ lhz r0, 0(r5) +/* 8037629C 003731FC 90 03 00 0C */ stw r0, 0xc(r3) +/* 803762A0 00373200 80 03 00 08 */ lwz r0, 8(r3) +/* 803762A4 00373204 54 00 EF FF */ rlwinm. r0, r0, 0x1d, 0x1f, 0x1f +/* 803762A8 00373208 41 82 00 38 */ beq lbl_803762E0 +/* 803762AC 0037320C 80 03 00 0C */ lwz r0, 0xc(r3) +/* 803762B0 00373210 54 00 FF FF */ rlwinm. r0, r0, 0x1f, 0x1f, 0x1f +/* 803762B4 00373214 41 82 00 2C */ beq lbl_803762E0 +/* 803762B8 00373218 80 6D AC 90 */ lwz r3, lbl_805A9850@sda21(r13) +/* 803762BC 0037321C 48 00 EA 59 */ bl OSResumeThread +/* 803762C0 00373220 38 00 00 00 */ li r0, 0 +/* 803762C4 00373224 90 0D AC 98 */ stw r0, lbl_805A9858@sda21(r13) +/* 803762C8 00373228 38 60 00 01 */ li r3, 1 +/* 803762CC 0037322C 38 80 00 01 */ li r4, 1 +/* 803762D0 00373230 48 00 07 19 */ bl __GXWriteFifoIntReset +/* 803762D4 00373234 38 60 00 01 */ li r3, 1 +/* 803762D8 00373238 38 80 00 00 */ li r4, 0 +/* 803762DC 0037323C 48 00 06 D1 */ bl __GXWriteFifoIntEnable +lbl_803762E0: +/* 803762E0 00373240 80 62 CE 08 */ lwz r3, lbl_805AEB28@sda21(r2) +/* 803762E4 00373244 80 03 00 08 */ lwz r0, 8(r3) +/* 803762E8 00373248 54 00 F7 FF */ rlwinm. r0, r0, 0x1e, 0x1f, 0x1f +/* 803762EC 0037324C 41 82 00 44 */ beq lbl_80376330 +/* 803762F0 00373250 80 03 00 0C */ lwz r0, 0xc(r3) +/* 803762F4 00373254 54 00 07 FF */ clrlwi. r0, r0, 0x1f +/* 803762F8 00373258 41 82 00 38 */ beq lbl_80376330 +/* 803762FC 0037325C 80 AD AC A0 */ lwz r5, lbl_805A9860@sda21(r13) +/* 80376300 00373260 38 60 00 00 */ li r3, 0 +/* 80376304 00373264 38 80 00 01 */ li r4, 1 +/* 80376308 00373268 38 05 00 01 */ addi r0, r5, 1 +/* 8037630C 0037326C 90 0D AC A0 */ stw r0, lbl_805A9860@sda21(r13) +/* 80376310 00373270 48 00 06 9D */ bl __GXWriteFifoIntEnable +/* 80376314 00373274 38 60 00 01 */ li r3, 1 +/* 80376318 00373278 38 80 00 00 */ li r4, 0 +/* 8037631C 0037327C 48 00 06 CD */ bl __GXWriteFifoIntReset +/* 80376320 00373280 38 00 00 01 */ li r0, 1 +/* 80376324 00373284 80 6D AC 90 */ lwz r3, lbl_805A9850@sda21(r13) +/* 80376328 00373288 90 0D AC 98 */ stw r0, lbl_805A9858@sda21(r13) +/* 8037632C 0037328C 48 00 EC 71 */ bl OSSuspendThread +lbl_80376330: +/* 80376330 00373290 80 62 CE 08 */ lwz r3, lbl_805AEB28@sda21(r2) +/* 80376334 00373294 80 83 00 08 */ lwz r4, 8(r3) +/* 80376338 00373298 38 A3 00 08 */ addi r5, r3, 8 +/* 8037633C 0037329C 54 80 DF FF */ rlwinm. r0, r4, 0x1b, 0x1f, 0x1f +/* 80376340 003732A0 41 82 00 5C */ beq lbl_8037639C +/* 80376344 003732A4 80 03 00 0C */ lwz r0, 0xc(r3) +/* 80376348 003732A8 54 00 E7 FF */ rlwinm. r0, r0, 0x1c, 0x1f, 0x1f +/* 8037634C 003732AC 41 82 00 50 */ beq lbl_8037639C +/* 80376350 003732B0 54 80 06 F2 */ rlwinm r0, r4, 0, 0x1b, 0x19 +/* 80376354 003732B4 90 05 00 00 */ stw r0, 0(r5) +/* 80376358 003732B8 80 03 00 08 */ lwz r0, 8(r3) +/* 8037635C 003732BC 80 6D AC 7C */ lwz r3, lbl_805A983C@sda21(r13) +/* 80376360 003732C0 B0 03 00 02 */ sth r0, 2(r3) +/* 80376364 003732C4 80 0D AC 9C */ lwz r0, lbl_805A985C@sda21(r13) +/* 80376368 003732C8 28 00 00 00 */ cmplwi r0, 0 +/* 8037636C 003732CC 41 82 00 30 */ beq lbl_8037639C +/* 80376370 003732D0 38 61 00 10 */ addi r3, r1, 0x10 +/* 80376374 003732D4 48 00 92 A1 */ bl OSClearContext +/* 80376378 003732D8 38 61 00 10 */ addi r3, r1, 0x10 +/* 8037637C 003732DC 48 00 90 A1 */ bl OSSetCurrentContext +/* 80376380 003732E0 81 8D AC 9C */ lwz r12, lbl_805A985C@sda21(r13) +/* 80376384 003732E4 7D 88 03 A6 */ mtlr r12 +/* 80376388 003732E8 4E 80 00 21 */ blrl +/* 8037638C 003732EC 38 61 00 10 */ addi r3, r1, 0x10 +/* 80376390 003732F0 48 00 92 85 */ bl OSClearContext +/* 80376394 003732F4 7F E3 FB 78 */ mr r3, r31 +/* 80376398 003732F8 48 00 90 85 */ bl OSSetCurrentContext +lbl_8037639C: +/* 8037639C 003732FC 80 01 02 E4 */ lwz r0, 0x2e4(r1) +/* 803763A0 00373300 83 E1 02 DC */ lwz r31, 0x2dc(r1) +/* 803763A4 00373304 38 21 02 E0 */ addi r1, r1, 0x2e0 +/* 803763A8 00373308 7C 08 03 A6 */ mtlr r0 +/* 803763AC 0037330C 4E 80 00 20 */ blr + +.global GXInitFifoBase +GXInitFifoBase: +/* 803763B0 00373310 7C 08 02 A6 */ mflr r0 +/* 803763B4 00373314 90 01 00 04 */ stw r0, 4(r1) +/* 803763B8 00373318 38 05 FF FC */ addi r0, r5, -4 +/* 803763BC 0037331C 94 21 FF E0 */ stwu r1, -0x20(r1) +/* 803763C0 00373320 93 E1 00 1C */ stw r31, 0x1c(r1) +/* 803763C4 00373324 3B E4 00 00 */ addi r31, r4, 0 +/* 803763C8 00373328 7C 1F 02 14 */ add r0, r31, r0 +/* 803763CC 0037332C 93 C1 00 18 */ stw r30, 0x18(r1) +/* 803763D0 00373330 3B C3 00 00 */ addi r30, r3, 0 +/* 803763D4 00373334 38 85 C0 00 */ addi r4, r5, -16384 +/* 803763D8 00373338 93 E3 00 00 */ stw r31, 0(r3) +/* 803763DC 0037333C 90 03 00 04 */ stw r0, 4(r3) +/* 803763E0 00373340 38 00 00 00 */ li r0, 0 +/* 803763E4 00373344 90 A3 00 08 */ stw r5, 8(r3) +/* 803763E8 00373348 54 A5 F8 74 */ rlwinm r5, r5, 0x1f, 1, 0x1a +/* 803763EC 0037334C 90 1E 00 1C */ stw r0, 0x1c(r30) +/* 803763F0 00373350 48 00 00 9D */ bl GXInitFifoLimits +/* 803763F4 00373354 38 7E 00 00 */ addi r3, r30, 0 +/* 803763F8 00373358 38 9F 00 00 */ addi r4, r31, 0 +/* 803763FC 0037335C 38 BF 00 00 */ addi r5, r31, 0 +/* 80376400 00373360 48 00 00 1D */ bl GXInitFifoPtrs +/* 80376404 00373364 80 01 00 24 */ lwz r0, 0x24(r1) +/* 80376408 00373368 83 E1 00 1C */ lwz r31, 0x1c(r1) +/* 8037640C 0037336C 83 C1 00 18 */ lwz r30, 0x18(r1) +/* 80376410 00373370 38 21 00 20 */ addi r1, r1, 0x20 +/* 80376414 00373374 7C 08 03 A6 */ mtlr r0 +/* 80376418 00373378 4E 80 00 20 */ blr + +.global GXInitFifoPtrs +GXInitFifoPtrs: +/* 8037641C 0037337C 7C 08 02 A6 */ mflr r0 +/* 80376420 00373380 90 01 00 04 */ stw r0, 4(r1) +/* 80376424 00373384 94 21 FF D8 */ stwu r1, -0x28(r1) +/* 80376428 00373388 93 E1 00 24 */ stw r31, 0x24(r1) +/* 8037642C 0037338C 3B E5 00 00 */ addi r31, r5, 0 +/* 80376430 00373390 93 C1 00 20 */ stw r30, 0x20(r1) +/* 80376434 00373394 3B C4 00 00 */ addi r30, r4, 0 +/* 80376438 00373398 93 A1 00 1C */ stw r29, 0x1c(r1) +/* 8037643C 0037339C 3B A3 00 00 */ addi r29, r3, 0 +/* 80376440 003733A0 48 00 B2 21 */ bl OSDisableInterrupts +/* 80376444 003733A4 93 DD 00 14 */ stw r30, 0x14(r29) +/* 80376448 003733A8 7C 1E F8 50 */ subf r0, r30, r31 +/* 8037644C 003733AC 93 FD 00 18 */ stw r31, 0x18(r29) +/* 80376450 003733B0 90 1D 00 1C */ stw r0, 0x1c(r29) +/* 80376454 003733B4 80 9D 00 1C */ lwz r4, 0x1c(r29) +/* 80376458 003733B8 2C 04 00 00 */ cmpwi r4, 0 +/* 8037645C 003733BC 40 80 00 10 */ bge lbl_8037646C +/* 80376460 003733C0 80 1D 00 08 */ lwz r0, 8(r29) +/* 80376464 003733C4 7C 04 02 14 */ add r0, r4, r0 +/* 80376468 003733C8 90 1D 00 1C */ stw r0, 0x1c(r29) +lbl_8037646C: +/* 8037646C 003733CC 48 00 B2 1D */ bl OSRestoreInterrupts +/* 80376470 003733D0 80 01 00 2C */ lwz r0, 0x2c(r1) +/* 80376474 003733D4 83 E1 00 24 */ lwz r31, 0x24(r1) +/* 80376478 003733D8 83 C1 00 20 */ lwz r30, 0x20(r1) +/* 8037647C 003733DC 83 A1 00 1C */ lwz r29, 0x1c(r1) +/* 80376480 003733E0 38 21 00 28 */ addi r1, r1, 0x28 +/* 80376484 003733E4 7C 08 03 A6 */ mtlr r0 +/* 80376488 003733E8 4E 80 00 20 */ blr + +.global GXInitFifoLimits +GXInitFifoLimits: +/* 8037648C 003733EC 90 83 00 0C */ stw r4, 0xc(r3) +/* 80376490 003733F0 90 A3 00 10 */ stw r5, 0x10(r3) +/* 80376494 003733F4 4E 80 00 20 */ blr + +.global GXSetCPUFifo +GXSetCPUFifo: +/* 80376498 003733F8 7C 08 02 A6 */ mflr r0 +/* 8037649C 003733FC 90 01 00 04 */ stw r0, 4(r1) +/* 803764A0 00373400 94 21 FF E8 */ stwu r1, -0x18(r1) +/* 803764A4 00373404 93 E1 00 14 */ stw r31, 0x14(r1) +/* 803764A8 00373408 93 C1 00 10 */ stw r30, 0x10(r1) +/* 803764AC 0037340C 7C 7E 1B 78 */ mr r30, r3 +/* 803764B0 00373410 48 00 B1 B1 */ bl OSDisableInterrupts +/* 803764B4 00373414 80 0D AC 8C */ lwz r0, lbl_805A984C@sda21(r13) +/* 803764B8 00373418 3B E3 00 00 */ addi r31, r3, 0 +/* 803764BC 0037341C 93 CD AC 88 */ stw r30, lbl_805A9848@sda21(r13) +/* 803764C0 00373420 7C 1E 00 40 */ cmplw r30, r0 +/* 803764C4 00373424 40 82 00 64 */ bne lbl_80376528 +/* 803764C8 00373428 80 BE 00 00 */ lwz r5, 0(r30) +/* 803764CC 0037342C 38 00 00 01 */ li r0, 1 +/* 803764D0 00373430 80 8D AC 78 */ lwz r4, lbl_805A9838@sda21(r13) +/* 803764D4 00373434 38 60 00 01 */ li r3, 1 +/* 803764D8 00373438 54 A5 00 BE */ clrlwi r5, r5, 2 +/* 803764DC 0037343C 90 A4 00 0C */ stw r5, 0xc(r4) +/* 803764E0 00373440 38 80 00 01 */ li r4, 1 +/* 803764E4 00373444 80 DE 00 04 */ lwz r6, 4(r30) +/* 803764E8 00373448 80 AD AC 78 */ lwz r5, lbl_805A9838@sda21(r13) +/* 803764EC 0037344C 54 C6 00 BE */ clrlwi r6, r6, 2 +/* 803764F0 00373450 90 C5 00 10 */ stw r6, 0x10(r5) +/* 803764F4 00373454 80 DE 00 18 */ lwz r6, 0x18(r30) +/* 803764F8 00373458 80 AD AC 78 */ lwz r5, lbl_805A9838@sda21(r13) +/* 803764FC 0037345C 54 C6 00 B4 */ rlwinm r6, r6, 0, 2, 0x1a +/* 80376500 00373460 54 C6 01 88 */ rlwinm r6, r6, 0, 6, 4 +/* 80376504 00373464 90 C5 00 14 */ stw r6, 0x14(r5) +/* 80376508 00373468 98 0D AC 94 */ stb r0, lbl_805A9854@sda21(r13) +/* 8037650C 0037346C 48 00 04 DD */ bl __GXWriteFifoIntReset +/* 80376510 00373470 38 60 00 01 */ li r3, 1 +/* 80376514 00373474 38 80 00 00 */ li r4, 0 +/* 80376518 00373478 48 00 04 95 */ bl __GXWriteFifoIntEnable +/* 8037651C 0037347C 38 60 00 01 */ li r3, 1 +/* 80376520 00373480 48 00 04 51 */ bl __GXFifoLink +/* 80376524 00373484 48 00 00 60 */ b lbl_80376584 +lbl_80376528: +/* 80376528 00373488 88 0D AC 94 */ lbz r0, lbl_805A9854@sda21(r13) +/* 8037652C 0037348C 28 00 00 00 */ cmplwi r0, 0 +/* 80376530 00373490 41 82 00 14 */ beq lbl_80376544 +/* 80376534 00373494 38 60 00 00 */ li r3, 0 +/* 80376538 00373498 48 00 04 39 */ bl __GXFifoLink +/* 8037653C 0037349C 38 00 00 00 */ li r0, 0 +/* 80376540 003734A0 98 0D AC 94 */ stb r0, lbl_805A9854@sda21(r13) +lbl_80376544: +/* 80376544 003734A4 38 60 00 00 */ li r3, 0 +/* 80376548 003734A8 38 80 00 00 */ li r4, 0 +/* 8037654C 003734AC 48 00 04 61 */ bl __GXWriteFifoIntEnable +/* 80376550 003734B0 80 1E 00 00 */ lwz r0, 0(r30) +/* 80376554 003734B4 80 6D AC 78 */ lwz r3, lbl_805A9838@sda21(r13) +/* 80376558 003734B8 54 00 00 BE */ clrlwi r0, r0, 2 +/* 8037655C 003734BC 90 03 00 0C */ stw r0, 0xc(r3) +/* 80376560 003734C0 80 1E 00 04 */ lwz r0, 4(r30) +/* 80376564 003734C4 80 6D AC 78 */ lwz r3, lbl_805A9838@sda21(r13) +/* 80376568 003734C8 54 00 00 BE */ clrlwi r0, r0, 2 +/* 8037656C 003734CC 90 03 00 10 */ stw r0, 0x10(r3) +/* 80376570 003734D0 80 1E 00 18 */ lwz r0, 0x18(r30) +/* 80376574 003734D4 80 6D AC 78 */ lwz r3, lbl_805A9838@sda21(r13) +/* 80376578 003734D8 54 00 00 B4 */ rlwinm r0, r0, 0, 2, 0x1a +/* 8037657C 003734DC 54 00 01 88 */ rlwinm r0, r0, 0, 6, 4 +/* 80376580 003734E0 90 03 00 14 */ stw r0, 0x14(r3) +lbl_80376584: +/* 80376584 003734E4 4B FF 92 89 */ bl PPCSync +/* 80376588 003734E8 7F E3 FB 78 */ mr r3, r31 +/* 8037658C 003734EC 48 00 B0 FD */ bl OSRestoreInterrupts +/* 80376590 003734F0 80 01 00 1C */ lwz r0, 0x1c(r1) +/* 80376594 003734F4 83 E1 00 14 */ lwz r31, 0x14(r1) +/* 80376598 003734F8 83 C1 00 10 */ lwz r30, 0x10(r1) +/* 8037659C 003734FC 38 21 00 18 */ addi r1, r1, 0x18 +/* 803765A0 00373500 7C 08 03 A6 */ mtlr r0 +/* 803765A4 00373504 4E 80 00 20 */ blr + +.global GXSetGPFifo +GXSetGPFifo: +/* 803765A8 00373508 7C 08 02 A6 */ mflr r0 +/* 803765AC 0037350C 90 01 00 04 */ stw r0, 4(r1) +/* 803765B0 00373510 94 21 FF E8 */ stwu r1, -0x18(r1) +/* 803765B4 00373514 93 E1 00 14 */ stw r31, 0x14(r1) +/* 803765B8 00373518 93 C1 00 10 */ stw r30, 0x10(r1) +/* 803765BC 0037351C 7C 7E 1B 78 */ mr r30, r3 +/* 803765C0 00373520 48 00 B0 A1 */ bl OSDisableInterrupts +/* 803765C4 00373524 7C 7F 1B 78 */ mr r31, r3 +/* 803765C8 00373528 48 00 03 89 */ bl __GXFifoReadDisable +/* 803765CC 0037352C 38 60 00 00 */ li r3, 0 +/* 803765D0 00373530 38 80 00 00 */ li r4, 0 +/* 803765D4 00373534 48 00 03 D9 */ bl __GXWriteFifoIntEnable +/* 803765D8 00373538 93 CD AC 8C */ stw r30, lbl_805A984C@sda21(r13) +/* 803765DC 0037353C 80 6D AC 7C */ lwz r3, lbl_805A983C@sda21(r13) +/* 803765E0 00373540 80 1E 00 00 */ lwz r0, 0(r30) +/* 803765E4 00373544 B0 03 00 20 */ sth r0, 0x20(r3) +/* 803765E8 00373548 80 1E 00 04 */ lwz r0, 4(r30) +/* 803765EC 0037354C 80 6D AC 7C */ lwz r3, lbl_805A983C@sda21(r13) +/* 803765F0 00373550 B0 03 00 24 */ sth r0, 0x24(r3) +/* 803765F4 00373554 80 1E 00 1C */ lwz r0, 0x1c(r30) +/* 803765F8 00373558 80 6D AC 7C */ lwz r3, lbl_805A983C@sda21(r13) +/* 803765FC 0037355C B0 03 00 30 */ sth r0, 0x30(r3) +/* 80376600 00373560 80 1E 00 18 */ lwz r0, 0x18(r30) +/* 80376604 00373564 80 6D AC 7C */ lwz r3, lbl_805A983C@sda21(r13) +/* 80376608 00373568 B0 03 00 34 */ sth r0, 0x34(r3) +/* 8037660C 0037356C 80 1E 00 14 */ lwz r0, 0x14(r30) +/* 80376610 00373570 80 6D AC 7C */ lwz r3, lbl_805A983C@sda21(r13) +/* 80376614 00373574 B0 03 00 38 */ sth r0, 0x38(r3) +/* 80376618 00373578 80 1E 00 0C */ lwz r0, 0xc(r30) +/* 8037661C 0037357C 80 6D AC 7C */ lwz r3, lbl_805A983C@sda21(r13) +/* 80376620 00373580 B0 03 00 28 */ sth r0, 0x28(r3) +/* 80376624 00373584 80 1E 00 10 */ lwz r0, 0x10(r30) +/* 80376628 00373588 80 6D AC 7C */ lwz r3, lbl_805A983C@sda21(r13) +/* 8037662C 0037358C B0 03 00 2C */ sth r0, 0x2c(r3) +/* 80376630 00373590 80 1E 00 00 */ lwz r0, 0(r30) +/* 80376634 00373594 80 6D AC 7C */ lwz r3, lbl_805A983C@sda21(r13) +/* 80376638 00373598 54 00 84 BE */ rlwinm r0, r0, 0x10, 0x12, 0x1f +/* 8037663C 0037359C B0 03 00 22 */ sth r0, 0x22(r3) +/* 80376640 003735A0 80 1E 00 04 */ lwz r0, 4(r30) +/* 80376644 003735A4 80 6D AC 7C */ lwz r3, lbl_805A983C@sda21(r13) +/* 80376648 003735A8 54 00 84 BE */ rlwinm r0, r0, 0x10, 0x12, 0x1f +/* 8037664C 003735AC B0 03 00 26 */ sth r0, 0x26(r3) +/* 80376650 003735B0 80 1E 00 1C */ lwz r0, 0x1c(r30) +/* 80376654 003735B4 80 6D AC 7C */ lwz r3, lbl_805A983C@sda21(r13) +/* 80376658 003735B8 7C 00 86 70 */ srawi r0, r0, 0x10 +/* 8037665C 003735BC B0 03 00 32 */ sth r0, 0x32(r3) +/* 80376660 003735C0 80 1E 00 18 */ lwz r0, 0x18(r30) +/* 80376664 003735C4 80 6D AC 7C */ lwz r3, lbl_805A983C@sda21(r13) +/* 80376668 003735C8 54 00 84 BE */ rlwinm r0, r0, 0x10, 0x12, 0x1f +/* 8037666C 003735CC B0 03 00 36 */ sth r0, 0x36(r3) +/* 80376670 003735D0 80 1E 00 14 */ lwz r0, 0x14(r30) +/* 80376674 003735D4 80 6D AC 7C */ lwz r3, lbl_805A983C@sda21(r13) +/* 80376678 003735D8 54 00 84 BE */ rlwinm r0, r0, 0x10, 0x12, 0x1f +/* 8037667C 003735DC B0 03 00 3A */ sth r0, 0x3a(r3) +/* 80376680 003735E0 80 1E 00 0C */ lwz r0, 0xc(r30) +/* 80376684 003735E4 80 6D AC 7C */ lwz r3, lbl_805A983C@sda21(r13) +/* 80376688 003735E8 54 00 84 3E */ srwi r0, r0, 0x10 +/* 8037668C 003735EC B0 03 00 2A */ sth r0, 0x2a(r3) +/* 80376690 003735F0 80 1E 00 10 */ lwz r0, 0x10(r30) +/* 80376694 003735F4 80 6D AC 7C */ lwz r3, lbl_805A983C@sda21(r13) +/* 80376698 003735F8 54 00 84 3E */ srwi r0, r0, 0x10 +/* 8037669C 003735FC B0 03 00 2E */ sth r0, 0x2e(r3) +/* 803766A0 00373600 4B FF 91 6D */ bl PPCSync +/* 803766A4 00373604 80 6D AC 88 */ lwz r3, lbl_805A9848@sda21(r13) +/* 803766A8 00373608 80 0D AC 8C */ lwz r0, lbl_805A984C@sda21(r13) +/* 803766AC 0037360C 7C 03 00 40 */ cmplw r3, r0 +/* 803766B0 00373610 40 82 00 24 */ bne lbl_803766D4 +/* 803766B4 00373614 38 00 00 01 */ li r0, 1 +/* 803766B8 00373618 98 0D AC 94 */ stb r0, lbl_805A9854@sda21(r13) +/* 803766BC 0037361C 38 60 00 01 */ li r3, 1 +/* 803766C0 00373620 38 80 00 00 */ li r4, 0 +/* 803766C4 00373624 48 00 02 E9 */ bl __GXWriteFifoIntEnable +/* 803766C8 00373628 38 60 00 01 */ li r3, 1 +/* 803766CC 0037362C 48 00 02 A5 */ bl __GXFifoLink +/* 803766D0 00373630 48 00 00 20 */ b lbl_803766F0 +lbl_803766D4: +/* 803766D4 00373634 38 00 00 00 */ li r0, 0 +/* 803766D8 00373638 98 0D AC 94 */ stb r0, lbl_805A9854@sda21(r13) +/* 803766DC 0037363C 38 60 00 00 */ li r3, 0 +/* 803766E0 00373640 38 80 00 00 */ li r4, 0 +/* 803766E4 00373644 48 00 02 C9 */ bl __GXWriteFifoIntEnable +/* 803766E8 00373648 38 60 00 00 */ li r3, 0 +/* 803766EC 0037364C 48 00 02 85 */ bl __GXFifoLink +lbl_803766F0: +/* 803766F0 00373650 38 60 00 01 */ li r3, 1 +/* 803766F4 00373654 38 80 00 01 */ li r4, 1 +/* 803766F8 00373658 48 00 02 F1 */ bl __GXWriteFifoIntReset +/* 803766FC 0037365C 48 00 02 31 */ bl __GXFifoReadEnable +/* 80376700 00373660 7F E3 FB 78 */ mr r3, r31 +/* 80376704 00373664 48 00 AF 85 */ bl OSRestoreInterrupts +/* 80376708 00373668 80 01 00 1C */ lwz r0, 0x1c(r1) +/* 8037670C 0037366C 83 E1 00 14 */ lwz r31, 0x14(r1) +/* 80376710 00373670 83 C1 00 10 */ lwz r30, 0x10(r1) +/* 80376714 00373674 38 21 00 18 */ addi r1, r1, 0x18 +/* 80376718 00373678 7C 08 03 A6 */ mtlr r0 +/* 8037671C 0037367C 4E 80 00 20 */ blr + +.global __GXSaveCPUFifoAux +__GXSaveCPUFifoAux: +/* 80376720 00373680 80 0D AC 88 */ lwz r0, lbl_805A9848@sda21(r13) +/* 80376724 00373684 7C 03 00 40 */ cmplw r3, r0 +/* 80376728 00373688 40 82 00 18 */ bne lbl_80376740 +/* 8037672C 0037368C 80 CD AC 78 */ lwz r6, lbl_805A9838@sda21(r13) +/* 80376730 00373690 80 06 00 14 */ lwz r0, 0x14(r6) +/* 80376734 00373694 54 06 01 88 */ rlwinm r6, r0, 0, 6, 4 +/* 80376738 00373698 3C 06 80 00 */ addis r0, r6, 0x8000 +/* 8037673C 0037369C 90 03 00 18 */ stw r0, 0x18(r3) +lbl_80376740: +/* 80376740 003736A0 80 0D AC 8C */ lwz r0, lbl_805A984C@sda21(r13) +/* 80376744 003736A4 7C 03 00 40 */ cmplw r3, r0 +/* 80376748 003736A8 40 82 00 34 */ bne lbl_8037677C +/* 8037674C 003736AC 80 ED AC 7C */ lwz r7, lbl_805A983C@sda21(r13) +/* 80376750 003736B0 A0 C7 00 3A */ lhz r6, 0x3a(r7) +/* 80376754 003736B4 A0 E7 00 38 */ lhz r7, 0x38(r7) +/* 80376758 003736B8 50 C7 80 1E */ rlwimi r7, r6, 0x10, 0, 0xf +/* 8037675C 003736BC 3C 07 80 00 */ addis r0, r7, 0x8000 +/* 80376760 003736C0 90 03 00 14 */ stw r0, 0x14(r3) +/* 80376764 003736C4 80 ED AC 7C */ lwz r7, lbl_805A983C@sda21(r13) +/* 80376768 003736C8 A0 C7 00 32 */ lhz r6, 0x32(r7) +/* 8037676C 003736CC A0 07 00 30 */ lhz r0, 0x30(r7) +/* 80376770 003736D0 50 C0 80 1E */ rlwimi r0, r6, 0x10, 0, 0xf +/* 80376774 003736D4 90 03 00 1C */ stw r0, 0x1c(r3) +/* 80376778 003736D8 48 00 00 2C */ b lbl_803767A4 +lbl_8037677C: +/* 8037677C 003736DC 80 C3 00 14 */ lwz r6, 0x14(r3) +/* 80376780 003736E0 80 03 00 18 */ lwz r0, 0x18(r3) +/* 80376784 003736E4 7C 06 00 50 */ subf r0, r6, r0 +/* 80376788 003736E8 90 03 00 1C */ stw r0, 0x1c(r3) +/* 8037678C 003736EC 80 C3 00 1C */ lwz r6, 0x1c(r3) +/* 80376790 003736F0 2C 06 00 00 */ cmpwi r6, 0 +/* 80376794 003736F4 40 80 00 10 */ bge lbl_803767A4 +/* 80376798 003736F8 80 03 00 08 */ lwz r0, 8(r3) +/* 8037679C 003736FC 7C 06 02 14 */ add r0, r6, r0 +/* 803767A0 00373700 90 03 00 1C */ stw r0, 0x1c(r3) +lbl_803767A4: +/* 803767A4 00373704 80 03 00 14 */ lwz r0, 0x14(r3) +/* 803767A8 00373708 90 04 00 00 */ stw r0, 0(r4) +/* 803767AC 0037370C 80 03 00 18 */ lwz r0, 0x18(r3) +/* 803767B0 00373710 90 05 00 00 */ stw r0, 0(r5) +/* 803767B4 00373714 4E 80 00 20 */ blr + +.global GXSetBreakPtCallback +GXSetBreakPtCallback: +/* 803767B8 00373718 7C 08 02 A6 */ mflr r0 +/* 803767BC 0037371C 90 01 00 04 */ stw r0, 4(r1) +/* 803767C0 00373720 94 21 FF E8 */ stwu r1, -0x18(r1) +/* 803767C4 00373724 93 E1 00 14 */ stw r31, 0x14(r1) +/* 803767C8 00373728 93 C1 00 10 */ stw r30, 0x10(r1) +/* 803767CC 0037372C 7C 7E 1B 78 */ mr r30, r3 +/* 803767D0 00373730 83 ED AC 9C */ lwz r31, lbl_805A985C@sda21(r13) +/* 803767D4 00373734 48 00 AE 8D */ bl OSDisableInterrupts +/* 803767D8 00373738 93 CD AC 9C */ stw r30, lbl_805A985C@sda21(r13) +/* 803767DC 0037373C 48 00 AE AD */ bl OSRestoreInterrupts +/* 803767E0 00373740 7F E3 FB 78 */ mr r3, r31 +/* 803767E4 00373744 80 01 00 1C */ lwz r0, 0x1c(r1) +/* 803767E8 00373748 83 E1 00 14 */ lwz r31, 0x14(r1) +/* 803767EC 0037374C 83 C1 00 10 */ lwz r30, 0x10(r1) +/* 803767F0 00373750 38 21 00 18 */ addi r1, r1, 0x18 +/* 803767F4 00373754 7C 08 03 A6 */ mtlr r0 +/* 803767F8 00373758 4E 80 00 20 */ blr + +.global GXEnableBreakPt +GXEnableBreakPt: +/* 803767FC 0037375C 7C 08 02 A6 */ mflr r0 +/* 80376800 00373760 90 01 00 04 */ stw r0, 4(r1) +/* 80376804 00373764 94 21 FF E8 */ stwu r1, -0x18(r1) +/* 80376808 00373768 93 E1 00 14 */ stw r31, 0x14(r1) +/* 8037680C 0037376C 93 C1 00 10 */ stw r30, 0x10(r1) +/* 80376810 00373770 7C 7E 1B 78 */ mr r30, r3 +/* 80376814 00373774 48 00 AE 4D */ bl OSDisableInterrupts +/* 80376818 00373778 7C 7F 1B 78 */ mr r31, r3 +/* 8037681C 0037377C 48 00 01 35 */ bl __GXFifoReadDisable +/* 80376820 00373780 80 6D AC 7C */ lwz r3, lbl_805A983C@sda21(r13) +/* 80376824 00373784 57 C0 84 BE */ rlwinm r0, r30, 0x10, 0x12, 0x1f +/* 80376828 00373788 B3 C3 00 3C */ sth r30, 0x3c(r3) +/* 8037682C 0037378C 80 6D AC 7C */ lwz r3, lbl_805A983C@sda21(r13) +/* 80376830 00373790 B0 03 00 3E */ sth r0, 0x3e(r3) +/* 80376834 00373794 80 62 CE 08 */ lwz r3, lbl_805AEB28@sda21(r2) +/* 80376838 00373798 80 03 00 08 */ lwz r0, 8(r3) +/* 8037683C 0037379C 54 00 07 FA */ rlwinm r0, r0, 0, 0x1f, 0x1d +/* 80376840 003737A0 60 00 00 02 */ ori r0, r0, 2 +/* 80376844 003737A4 90 03 00 08 */ stw r0, 8(r3) +/* 80376848 003737A8 80 03 00 08 */ lwz r0, 8(r3) +/* 8037684C 003737AC 54 00 06 F2 */ rlwinm r0, r0, 0, 0x1b, 0x19 +/* 80376850 003737B0 60 00 00 20 */ ori r0, r0, 0x20 +/* 80376854 003737B4 90 03 00 08 */ stw r0, 8(r3) +/* 80376858 003737B8 80 03 00 08 */ lwz r0, 8(r3) +/* 8037685C 003737BC 80 6D AC 7C */ lwz r3, lbl_805A983C@sda21(r13) +/* 80376860 003737C0 B0 03 00 02 */ sth r0, 2(r3) +/* 80376864 003737C4 93 CD AC A4 */ stw r30, lbl_805A9864@sda21(r13) +/* 80376868 003737C8 48 00 00 C5 */ bl __GXFifoReadEnable +/* 8037686C 003737CC 7F E3 FB 78 */ mr r3, r31 +/* 80376870 003737D0 48 00 AE 19 */ bl OSRestoreInterrupts +/* 80376874 003737D4 80 01 00 1C */ lwz r0, 0x1c(r1) +/* 80376878 003737D8 83 E1 00 14 */ lwz r31, 0x14(r1) +/* 8037687C 003737DC 83 C1 00 10 */ lwz r30, 0x10(r1) +/* 80376880 003737E0 38 21 00 18 */ addi r1, r1, 0x18 +/* 80376884 003737E4 7C 08 03 A6 */ mtlr r0 +/* 80376888 003737E8 4E 80 00 20 */ blr + +.global GXDisableBreakPt +GXDisableBreakPt: +/* 8037688C 003737EC 7C 08 02 A6 */ mflr r0 +/* 80376890 003737F0 90 01 00 04 */ stw r0, 4(r1) +/* 80376894 003737F4 94 21 FF F8 */ stwu r1, -8(r1) +/* 80376898 003737F8 48 00 AD C9 */ bl OSDisableInterrupts +/* 8037689C 003737FC 80 A2 CE 08 */ lwz r5, lbl_805AEB28@sda21(r2) +/* 803768A0 00373800 38 00 00 00 */ li r0, 0 +/* 803768A4 00373804 80 85 00 08 */ lwz r4, 8(r5) +/* 803768A8 00373808 54 84 07 FA */ rlwinm r4, r4, 0, 0x1f, 0x1d +/* 803768AC 0037380C 90 85 00 08 */ stw r4, 8(r5) +/* 803768B0 00373810 80 85 00 08 */ lwz r4, 8(r5) +/* 803768B4 00373814 54 84 06 F2 */ rlwinm r4, r4, 0, 0x1b, 0x19 +/* 803768B8 00373818 90 85 00 08 */ stw r4, 8(r5) +/* 803768BC 0037381C 80 A5 00 08 */ lwz r5, 8(r5) +/* 803768C0 00373820 80 8D AC 7C */ lwz r4, lbl_805A983C@sda21(r13) +/* 803768C4 00373824 B0 A4 00 02 */ sth r5, 2(r4) +/* 803768C8 00373828 90 0D AC A4 */ stw r0, lbl_805A9864@sda21(r13) +/* 803768CC 0037382C 48 00 AD BD */ bl OSRestoreInterrupts +/* 803768D0 00373830 80 01 00 0C */ lwz r0, 0xc(r1) +/* 803768D4 00373834 38 21 00 08 */ addi r1, r1, 8 +/* 803768D8 00373838 7C 08 03 A6 */ mtlr r0 +/* 803768DC 0037383C 4E 80 00 20 */ blr + +.global __GXFifoInit +__GXFifoInit: +/* 803768E0 00373840 7C 08 02 A6 */ mflr r0 +/* 803768E4 00373844 3C 60 80 37 */ lis r3, GXCPInterruptHandler@ha +/* 803768E8 00373848 90 01 00 04 */ stw r0, 4(r1) +/* 803768EC 0037384C 38 83 62 7C */ addi r4, r3, GXCPInterruptHandler@l +/* 803768F0 00373850 38 60 00 11 */ li r3, 0x11 +/* 803768F4 00373854 94 21 FF F8 */ stwu r1, -8(r1) +/* 803768F8 00373858 48 00 AD B5 */ bl __OSSetInterruptHandler +/* 803768FC 0037385C 38 60 40 00 */ li r3, 0x4000 +/* 80376900 00373860 48 00 B1 B1 */ bl __OSUnmaskInterrupts +/* 80376904 00373864 48 00 DC D1 */ bl OSGetCurrentThread +/* 80376908 00373868 38 00 00 00 */ li r0, 0 +/* 8037690C 0037386C 90 6D AC 90 */ stw r3, lbl_805A9850@sda21(r13) +/* 80376910 00373870 90 0D AC 98 */ stw r0, lbl_805A9858@sda21(r13) +/* 80376914 00373874 90 0D AC 88 */ stw r0, lbl_805A9848@sda21(r13) +/* 80376918 00373878 90 0D AC 8C */ stw r0, lbl_805A984C@sda21(r13) +/* 8037691C 0037387C 80 01 00 0C */ lwz r0, 0xc(r1) +/* 80376920 00373880 38 21 00 08 */ addi r1, r1, 8 +/* 80376924 00373884 7C 08 03 A6 */ mtlr r0 +/* 80376928 00373888 4E 80 00 20 */ blr + +.global __GXFifoReadEnable +__GXFifoReadEnable: +/* 8037692C 0037388C 80 62 CE 08 */ lwz r3, lbl_805AEB28@sda21(r2) +/* 80376930 00373890 80 03 00 08 */ lwz r0, 8(r3) +/* 80376934 00373894 54 00 00 3C */ rlwinm r0, r0, 0, 0, 0x1e +/* 80376938 00373898 60 00 00 01 */ ori r0, r0, 1 +/* 8037693C 0037389C 90 03 00 08 */ stw r0, 8(r3) +/* 80376940 003738A0 80 03 00 08 */ lwz r0, 8(r3) +/* 80376944 003738A4 80 6D AC 7C */ lwz r3, lbl_805A983C@sda21(r13) +/* 80376948 003738A8 B0 03 00 02 */ sth r0, 2(r3) +/* 8037694C 003738AC 4E 80 00 20 */ blr + +.global __GXFifoReadDisable +__GXFifoReadDisable: +/* 80376950 003738B0 80 62 CE 08 */ lwz r3, lbl_805AEB28@sda21(r2) +/* 80376954 003738B4 80 03 00 08 */ lwz r0, 8(r3) +/* 80376958 003738B8 54 00 00 3C */ rlwinm r0, r0, 0, 0, 0x1e +/* 8037695C 003738BC 90 03 00 08 */ stw r0, 8(r3) +/* 80376960 003738C0 80 03 00 08 */ lwz r0, 8(r3) +/* 80376964 003738C4 80 6D AC 7C */ lwz r3, lbl_805A983C@sda21(r13) +/* 80376968 003738C8 B0 03 00 02 */ sth r0, 2(r3) +/* 8037696C 003738CC 4E 80 00 20 */ blr + +.global __GXFifoLink +__GXFifoLink: +/* 80376970 003738D0 54 60 06 3F */ clrlwi. r0, r3, 0x18 +/* 80376974 003738D4 41 82 00 0C */ beq lbl_80376980 +/* 80376978 003738D8 38 00 00 01 */ li r0, 1 +/* 8037697C 003738DC 48 00 00 08 */ b lbl_80376984 +lbl_80376980: +/* 80376980 003738E0 38 00 00 00 */ li r0, 0 +lbl_80376984: +/* 80376984 003738E4 80 82 CE 08 */ lwz r4, lbl_805AEB28@sda21(r2) +/* 80376988 003738E8 54 00 20 36 */ slwi r0, r0, 4 +/* 8037698C 003738EC 80 64 00 08 */ lwz r3, 8(r4) +/* 80376990 003738F0 54 63 07 34 */ rlwinm r3, r3, 0, 0x1c, 0x1a +/* 80376994 003738F4 7C 60 03 78 */ or r0, r3, r0 +/* 80376998 003738F8 90 04 00 08 */ stw r0, 8(r4) +/* 8037699C 003738FC 80 04 00 08 */ lwz r0, 8(r4) +/* 803769A0 00373900 80 6D AC 7C */ lwz r3, lbl_805A983C@sda21(r13) +/* 803769A4 00373904 B0 03 00 02 */ sth r0, 2(r3) +/* 803769A8 00373908 4E 80 00 20 */ blr + +.global __GXWriteFifoIntEnable +__GXWriteFifoIntEnable: +/* 803769AC 0037390C 80 C2 CE 08 */ lwz r6, lbl_805AEB28@sda21(r2) +/* 803769B0 00373910 54 63 15 BA */ rlwinm r3, r3, 2, 0x16, 0x1d +/* 803769B4 00373914 54 80 1D 78 */ rlwinm r0, r4, 3, 0x15, 0x1c +/* 803769B8 00373918 80 A6 00 08 */ lwz r5, 8(r6) +/* 803769BC 0037391C 54 A4 07 B8 */ rlwinm r4, r5, 0, 0x1e, 0x1c +/* 803769C0 00373920 7C 83 1B 78 */ or r3, r4, r3 +/* 803769C4 00373924 90 66 00 08 */ stw r3, 8(r6) +/* 803769C8 00373928 80 66 00 08 */ lwz r3, 8(r6) +/* 803769CC 0037392C 54 63 07 76 */ rlwinm r3, r3, 0, 0x1d, 0x1b +/* 803769D0 00373930 7C 60 03 78 */ or r0, r3, r0 +/* 803769D4 00373934 90 06 00 08 */ stw r0, 8(r6) +/* 803769D8 00373938 80 06 00 08 */ lwz r0, 8(r6) +/* 803769DC 0037393C 80 6D AC 7C */ lwz r3, lbl_805A983C@sda21(r13) +/* 803769E0 00373940 B0 03 00 02 */ sth r0, 2(r3) +/* 803769E4 00373944 4E 80 00 20 */ blr + +.global __GXWriteFifoIntReset +__GXWriteFifoIntReset: +/* 803769E8 00373948 80 C2 CE 08 */ lwz r6, lbl_805AEB28@sda21(r2) +/* 803769EC 0037394C 54 63 06 3E */ clrlwi r3, r3, 0x18 +/* 803769F0 00373950 54 80 0D FC */ rlwinm r0, r4, 1, 0x17, 0x1e +/* 803769F4 00373954 80 A6 00 10 */ lwz r5, 0x10(r6) +/* 803769F8 00373958 54 A4 00 3C */ rlwinm r4, r5, 0, 0, 0x1e +/* 803769FC 0037395C 7C 83 1B 78 */ or r3, r4, r3 +/* 80376A00 00373960 90 66 00 10 */ stw r3, 0x10(r6) +/* 80376A04 00373964 80 66 00 10 */ lwz r3, 0x10(r6) +/* 80376A08 00373968 54 63 07 FA */ rlwinm r3, r3, 0, 0x1f, 0x1d +/* 80376A0C 0037396C 7C 60 03 78 */ or r0, r3, r0 +/* 80376A10 00373970 90 06 00 10 */ stw r0, 0x10(r6) +/* 80376A14 00373974 80 06 00 10 */ lwz r0, 0x10(r6) +/* 80376A18 00373978 80 6D AC 7C */ lwz r3, lbl_805A983C@sda21(r13) +/* 80376A1C 0037397C B0 03 00 04 */ sth r0, 4(r3) +/* 80376A20 00373980 4E 80 00 20 */ blr + +.global __GXCleanGPFifo +__GXCleanGPFifo: +/* 80376A24 00373984 7C 08 02 A6 */ mflr r0 +/* 80376A28 00373988 90 01 00 04 */ stw r0, 4(r1) +/* 80376A2C 0037398C 94 21 FF 58 */ stwu r1, -0xa8(r1) +/* 80376A30 00373990 93 E1 00 A4 */ stw r31, 0xa4(r1) +/* 80376A34 00373994 93 C1 00 A0 */ stw r30, 0xa0(r1) +/* 80376A38 00373998 93 A1 00 9C */ stw r29, 0x9c(r1) +/* 80376A3C 0037399C 48 00 00 F1 */ bl GXGetGPFifo +/* 80376A40 003739A0 7C 7F 1B 79 */ or. r31, r3, r3 +/* 80376A44 003739A4 41 82 00 C4 */ beq lbl_80376B08 +/* 80376A48 003739A8 48 00 00 DD */ bl GXGetCPUFifo +/* 80376A4C 003739AC 38 00 00 10 */ li r0, 0x10 +/* 80376A50 003739B0 83 BF 00 00 */ lwz r29, 0(r31) +/* 80376A54 003739B4 7C 09 03 A6 */ mtctr r0 +/* 80376A58 003739B8 3B C3 00 00 */ addi r30, r3, 0 +/* 80376A5C 003739BC 38 A1 00 0C */ addi r5, r1, 0xc +/* 80376A60 003739C0 38 9F FF F8 */ addi r4, r31, -8 +lbl_80376A64: +/* 80376A64 003739C4 84 64 00 08 */ lwzu r3, 8(r4) +/* 80376A68 003739C8 80 04 00 04 */ lwz r0, 4(r4) +/* 80376A6C 003739CC 94 65 00 08 */ stwu r3, 8(r5) +/* 80376A70 003739D0 90 05 00 04 */ stw r0, 4(r5) +/* 80376A74 003739D4 42 00 FF F0 */ bdnz lbl_80376A64 +/* 80376A78 003739D8 48 00 AB E9 */ bl OSDisableInterrupts +/* 80376A7C 003739DC 93 A1 00 28 */ stw r29, 0x28(r1) +/* 80376A80 003739E0 38 00 00 00 */ li r0, 0 +/* 80376A84 003739E4 93 A1 00 2C */ stw r29, 0x2c(r1) +/* 80376A88 003739E8 90 01 00 30 */ stw r0, 0x30(r1) +/* 80376A8C 003739EC 80 81 00 30 */ lwz r4, 0x30(r1) +/* 80376A90 003739F0 2C 04 00 00 */ cmpwi r4, 0 +/* 80376A94 003739F4 40 80 00 10 */ bge lbl_80376AA4 +/* 80376A98 003739F8 80 01 00 1C */ lwz r0, 0x1c(r1) +/* 80376A9C 003739FC 7C 04 02 14 */ add r0, r4, r0 +/* 80376AA0 00373A00 90 01 00 30 */ stw r0, 0x30(r1) +lbl_80376AA4: +/* 80376AA4 00373A04 48 00 AB E5 */ bl OSRestoreInterrupts +/* 80376AA8 00373A08 38 61 00 14 */ addi r3, r1, 0x14 +/* 80376AAC 00373A0C 4B FF FA FD */ bl GXSetGPFifo +/* 80376AB0 00373A10 7C 1E F8 40 */ cmplw r30, r31 +/* 80376AB4 00373A14 40 82 00 0C */ bne lbl_80376AC0 +/* 80376AB8 00373A18 38 61 00 14 */ addi r3, r1, 0x14 +/* 80376ABC 00373A1C 4B FF F9 DD */ bl GXSetCPUFifo +lbl_80376AC0: +/* 80376AC0 00373A20 48 00 AB A1 */ bl OSDisableInterrupts +/* 80376AC4 00373A24 93 BF 00 14 */ stw r29, 0x14(r31) +/* 80376AC8 00373A28 38 00 00 00 */ li r0, 0 +/* 80376ACC 00373A2C 93 BF 00 18 */ stw r29, 0x18(r31) +/* 80376AD0 00373A30 90 1F 00 1C */ stw r0, 0x1c(r31) +/* 80376AD4 00373A34 80 9F 00 1C */ lwz r4, 0x1c(r31) +/* 80376AD8 00373A38 2C 04 00 00 */ cmpwi r4, 0 +/* 80376ADC 00373A3C 40 80 00 10 */ bge lbl_80376AEC +/* 80376AE0 00373A40 80 1F 00 08 */ lwz r0, 8(r31) +/* 80376AE4 00373A44 7C 04 02 14 */ add r0, r4, r0 +/* 80376AE8 00373A48 90 1F 00 1C */ stw r0, 0x1c(r31) +lbl_80376AEC: +/* 80376AEC 00373A4C 48 00 AB 9D */ bl OSRestoreInterrupts +/* 80376AF0 00373A50 7F E3 FB 78 */ mr r3, r31 +/* 80376AF4 00373A54 4B FF FA B5 */ bl GXSetGPFifo +/* 80376AF8 00373A58 7C 1E F8 40 */ cmplw r30, r31 +/* 80376AFC 00373A5C 40 82 00 0C */ bne lbl_80376B08 +/* 80376B00 00373A60 7F C3 F3 78 */ mr r3, r30 +/* 80376B04 00373A64 4B FF F9 95 */ bl GXSetCPUFifo +lbl_80376B08: +/* 80376B08 00373A68 80 01 00 AC */ lwz r0, 0xac(r1) +/* 80376B0C 00373A6C 83 E1 00 A4 */ lwz r31, 0xa4(r1) +/* 80376B10 00373A70 83 C1 00 A0 */ lwz r30, 0xa0(r1) +/* 80376B14 00373A74 83 A1 00 9C */ lwz r29, 0x9c(r1) +/* 80376B18 00373A78 38 21 00 A8 */ addi r1, r1, 0xa8 +/* 80376B1C 00373A7C 7C 08 03 A6 */ mtlr r0 +/* 80376B20 00373A80 4E 80 00 20 */ blr + +.global GXGetCPUFifo +GXGetCPUFifo: +/* 80376B24 00373A84 80 6D AC 88 */ lwz r3, lbl_805A9848@sda21(r13) +/* 80376B28 00373A88 4E 80 00 20 */ blr + +.global GXGetGPFifo +GXGetGPFifo: +/* 80376B2C 00373A8C 80 6D AC 8C */ lwz r3, lbl_805A984C@sda21(r13) +/* 80376B30 00373A90 4E 80 00 20 */ blr + +.global GXRedirectWriteGatherPipe +GXRedirectWriteGatherPipe: +/* 80376B34 00373A94 7C 08 02 A6 */ mflr r0 +/* 80376B38 00373A98 90 01 00 04 */ stw r0, 4(r1) +/* 80376B3C 00373A9C 94 21 FF E8 */ stwu r1, -0x18(r1) +/* 80376B40 00373AA0 93 E1 00 14 */ stw r31, 0x14(r1) +/* 80376B44 00373AA4 93 C1 00 10 */ stw r30, 0x10(r1) +/* 80376B48 00373AA8 7C 7E 1B 78 */ mr r30, r3 +/* 80376B4C 00373AAC 48 00 AB 15 */ bl OSDisableInterrupts +/* 80376B50 00373AB0 7C 7F 1B 78 */ mr r31, r3 +/* 80376B54 00373AB4 48 00 17 BD */ bl GXFlush +lbl_80376B58: +/* 80376B58 00373AB8 4B FF 8D 29 */ bl PPCMfwpar +/* 80376B5C 00373ABC 54 60 07 FF */ clrlwi. r0, r3, 0x1f +/* 80376B60 00373AC0 40 82 FF F8 */ bne lbl_80376B58 +/* 80376B64 00373AC4 3C 60 0C 01 */ lis r3, 0x0C008000@ha +/* 80376B68 00373AC8 38 63 80 00 */ addi r3, r3, 0x0C008000@l +/* 80376B6C 00373ACC 4B FF 8D 21 */ bl PPCMtwpar +/* 80376B70 00373AD0 88 0D AC 94 */ lbz r0, lbl_805A9854@sda21(r13) +/* 80376B74 00373AD4 28 00 00 00 */ cmplwi r0, 0 +/* 80376B78 00373AD8 41 82 00 44 */ beq lbl_80376BBC +/* 80376B7C 00373ADC 80 82 CE 08 */ lwz r4, lbl_805AEB28@sda21(r2) +/* 80376B80 00373AE0 80 04 00 08 */ lwz r0, 8(r4) +/* 80376B84 00373AE4 54 00 07 34 */ rlwinm r0, r0, 0, 0x1c, 0x1a +/* 80376B88 00373AE8 90 04 00 08 */ stw r0, 8(r4) +/* 80376B8C 00373AEC 80 04 00 08 */ lwz r0, 8(r4) +/* 80376B90 00373AF0 80 6D AC 7C */ lwz r3, lbl_805A983C@sda21(r13) +/* 80376B94 00373AF4 B0 03 00 02 */ sth r0, 2(r3) +/* 80376B98 00373AF8 80 04 00 08 */ lwz r0, 8(r4) +/* 80376B9C 00373AFC 54 00 07 B8 */ rlwinm r0, r0, 0, 0x1e, 0x1c +/* 80376BA0 00373B00 90 04 00 08 */ stw r0, 8(r4) +/* 80376BA4 00373B04 80 04 00 08 */ lwz r0, 8(r4) +/* 80376BA8 00373B08 54 00 07 76 */ rlwinm r0, r0, 0, 0x1d, 0x1b +/* 80376BAC 00373B0C 90 04 00 08 */ stw r0, 8(r4) +/* 80376BB0 00373B10 80 04 00 08 */ lwz r0, 8(r4) +/* 80376BB4 00373B14 80 6D AC 7C */ lwz r3, lbl_805A983C@sda21(r13) +/* 80376BB8 00373B18 B0 03 00 02 */ sth r0, 2(r3) +lbl_80376BBC: +/* 80376BBC 00373B1C 80 8D AC 78 */ lwz r4, lbl_805A9838@sda21(r13) +/* 80376BC0 00373B20 57 C5 00 B4 */ rlwinm r5, r30, 0, 2, 0x1a +/* 80376BC4 00373B24 80 6D AC 88 */ lwz r3, lbl_805A9848@sda21(r13) +/* 80376BC8 00373B28 54 A5 01 88 */ rlwinm r5, r5, 0, 6, 4 +/* 80376BCC 00373B2C 80 04 00 14 */ lwz r0, 0x14(r4) +/* 80376BD0 00373B30 54 04 01 88 */ rlwinm r4, r0, 0, 6, 4 +/* 80376BD4 00373B34 3C 04 80 00 */ addis r0, r4, 0x8000 +/* 80376BD8 00373B38 90 03 00 18 */ stw r0, 0x18(r3) +/* 80376BDC 00373B3C 38 80 00 00 */ li r4, 0 +/* 80376BE0 00373B40 3C 00 04 00 */ lis r0, 0x400 +/* 80376BE4 00373B44 80 6D AC 78 */ lwz r3, lbl_805A9838@sda21(r13) +/* 80376BE8 00373B48 90 83 00 0C */ stw r4, 0xc(r3) +/* 80376BEC 00373B4C 80 6D AC 78 */ lwz r3, lbl_805A9838@sda21(r13) +/* 80376BF0 00373B50 90 03 00 10 */ stw r0, 0x10(r3) +/* 80376BF4 00373B54 80 6D AC 78 */ lwz r3, lbl_805A9838@sda21(r13) +/* 80376BF8 00373B58 90 A3 00 14 */ stw r5, 0x14(r3) +/* 80376BFC 00373B5C 4B FF 8C 11 */ bl PPCSync +/* 80376C00 00373B60 7F E3 FB 78 */ mr r3, r31 +/* 80376C04 00373B64 48 00 AA 85 */ bl OSRestoreInterrupts +/* 80376C08 00373B68 3C 60 CC 01 */ lis r3, 0xCC008000@ha +/* 80376C0C 00373B6C 80 01 00 1C */ lwz r0, 0x1c(r1) +/* 80376C10 00373B70 83 E1 00 14 */ lwz r31, 0x14(r1) +/* 80376C14 00373B74 38 63 80 00 */ addi r3, r3, 0xCC008000@l +/* 80376C18 00373B78 83 C1 00 10 */ lwz r30, 0x10(r1) +/* 80376C1C 00373B7C 38 21 00 18 */ addi r1, r1, 0x18 +/* 80376C20 00373B80 7C 08 03 A6 */ mtlr r0 +/* 80376C24 00373B84 4E 80 00 20 */ blr + +.global GXRestoreWriteGatherPipe +GXRestoreWriteGatherPipe: +/* 80376C28 00373B88 7C 08 02 A6 */ mflr r0 +/* 80376C2C 00373B8C 90 01 00 04 */ stw r0, 4(r1) +/* 80376C30 00373B90 94 21 FF E8 */ stwu r1, -0x18(r1) +/* 80376C34 00373B94 93 E1 00 14 */ stw r31, 0x14(r1) +/* 80376C38 00373B98 48 00 AA 29 */ bl OSDisableInterrupts +/* 80376C3C 00373B9C 3C A0 CC 01 */ lis r5, 0xCC008000@ha +/* 80376C40 00373BA0 38 80 00 00 */ li r4, 0 +/* 80376C44 00373BA4 98 85 80 00 */ stb r4, 0xCC008000@l(r5) +/* 80376C48 00373BA8 38 C0 00 18 */ li r6, 0x18 +/* 80376C4C 00373BAC 20 06 00 1F */ subfic r0, r6, 0x1f +/* 80376C50 00373BB0 98 85 80 00 */ stb r4, 0xCC008000@l(r5) +/* 80376C54 00373BB4 28 06 00 1F */ cmplwi r6, 0x1f +/* 80376C58 00373BB8 7C 09 03 A6 */ mtctr r0 +/* 80376C5C 00373BBC 7C 7F 1B 78 */ mr r31, r3 +/* 80376C60 00373BC0 98 85 80 00 */ stb r4, 0xCC008000@l(r5) +/* 80376C64 00373BC4 98 85 80 00 */ stb r4, 0xCC008000@l(r5) +/* 80376C68 00373BC8 98 85 80 00 */ stb r4, 0xCC008000@l(r5) +/* 80376C6C 00373BCC 98 85 80 00 */ stb r4, 0xCC008000@l(r5) +/* 80376C70 00373BD0 98 85 80 00 */ stb r4, 0xCC008000@l(r5) +/* 80376C74 00373BD4 98 85 80 00 */ stb r4, 0xCC008000@l(r5) +/* 80376C78 00373BD8 98 85 80 00 */ stb r4, 0xCC008000@l(r5) +/* 80376C7C 00373BDC 98 85 80 00 */ stb r4, 0xCC008000@l(r5) +/* 80376C80 00373BE0 98 85 80 00 */ stb r4, 0xCC008000@l(r5) +/* 80376C84 00373BE4 98 85 80 00 */ stb r4, 0xCC008000@l(r5) +/* 80376C88 00373BE8 98 85 80 00 */ stb r4, 0xCC008000@l(r5) +/* 80376C8C 00373BEC 98 85 80 00 */ stb r4, 0xCC008000@l(r5) +/* 80376C90 00373BF0 98 85 80 00 */ stb r4, 0xCC008000@l(r5) +/* 80376C94 00373BF4 98 85 80 00 */ stb r4, 0xCC008000@l(r5) +/* 80376C98 00373BF8 98 85 80 00 */ stb r4, 0xCC008000@l(r5) +/* 80376C9C 00373BFC 98 85 80 00 */ stb r4, 0xCC008000@l(r5) +/* 80376CA0 00373C00 98 85 80 00 */ stb r4, 0xCC008000@l(r5) +/* 80376CA4 00373C04 98 85 80 00 */ stb r4, 0xCC008000@l(r5) +/* 80376CA8 00373C08 98 85 80 00 */ stb r4, 0xCC008000@l(r5) +/* 80376CAC 00373C0C 98 85 80 00 */ stb r4, 0xCC008000@l(r5) +/* 80376CB0 00373C10 98 85 80 00 */ stb r4, 0xCC008000@l(r5) +/* 80376CB4 00373C14 98 85 80 00 */ stb r4, 0xCC008000@l(r5) +/* 80376CB8 00373C18 40 80 00 0C */ bge lbl_80376CC4 +lbl_80376CBC: +/* 80376CBC 00373C1C 98 85 80 00 */ stb r4, 0xCC008000@l(r5) +/* 80376CC0 00373C20 42 00 FF FC */ bdnz lbl_80376CBC +lbl_80376CC4: +/* 80376CC4 00373C24 4B FF 8B 49 */ bl PPCSync +lbl_80376CC8: +/* 80376CC8 00373C28 4B FF 8B B9 */ bl PPCMfwpar +/* 80376CCC 00373C2C 54 60 07 FF */ clrlwi. r0, r3, 0x1f +/* 80376CD0 00373C30 40 82 FF F8 */ bne lbl_80376CC8 +/* 80376CD4 00373C34 3C 60 0C 01 */ lis r3, 0x0C008000@ha +/* 80376CD8 00373C38 38 63 80 00 */ addi r3, r3, 0x0C008000@l +/* 80376CDC 00373C3C 4B FF 8B B1 */ bl PPCMtwpar +/* 80376CE0 00373C40 80 8D AC 88 */ lwz r4, lbl_805A9848@sda21(r13) +/* 80376CE4 00373C44 80 6D AC 78 */ lwz r3, lbl_805A9838@sda21(r13) +/* 80376CE8 00373C48 80 04 00 00 */ lwz r0, 0(r4) +/* 80376CEC 00373C4C 54 00 00 BE */ clrlwi r0, r0, 2 +/* 80376CF0 00373C50 90 03 00 0C */ stw r0, 0xc(r3) +/* 80376CF4 00373C54 80 8D AC 88 */ lwz r4, lbl_805A9848@sda21(r13) +/* 80376CF8 00373C58 80 6D AC 78 */ lwz r3, lbl_805A9838@sda21(r13) +/* 80376CFC 00373C5C 80 04 00 04 */ lwz r0, 4(r4) +/* 80376D00 00373C60 54 00 00 BE */ clrlwi r0, r0, 2 +/* 80376D04 00373C64 90 03 00 10 */ stw r0, 0x10(r3) +/* 80376D08 00373C68 80 8D AC 88 */ lwz r4, lbl_805A9848@sda21(r13) +/* 80376D0C 00373C6C 80 6D AC 78 */ lwz r3, lbl_805A9838@sda21(r13) +/* 80376D10 00373C70 80 04 00 18 */ lwz r0, 0x18(r4) +/* 80376D14 00373C74 54 00 00 B4 */ rlwinm r0, r0, 0, 2, 0x1a +/* 80376D18 00373C78 54 00 01 88 */ rlwinm r0, r0, 0, 6, 4 +/* 80376D1C 00373C7C 90 03 00 14 */ stw r0, 0x14(r3) +/* 80376D20 00373C80 88 0D AC 94 */ lbz r0, lbl_805A9854@sda21(r13) +/* 80376D24 00373C84 28 00 00 00 */ cmplwi r0, 0 +/* 80376D28 00373C88 41 82 00 78 */ beq lbl_80376DA0 +/* 80376D2C 00373C8C 80 82 CE 08 */ lwz r4, lbl_805AEB28@sda21(r2) +/* 80376D30 00373C90 80 04 00 10 */ lwz r0, 0x10(r4) +/* 80376D34 00373C94 54 00 00 3C */ rlwinm r0, r0, 0, 0, 0x1e +/* 80376D38 00373C98 60 00 00 01 */ ori r0, r0, 1 +/* 80376D3C 00373C9C 90 04 00 10 */ stw r0, 0x10(r4) +/* 80376D40 00373CA0 80 04 00 10 */ lwz r0, 0x10(r4) +/* 80376D44 00373CA4 54 00 07 FA */ rlwinm r0, r0, 0, 0x1f, 0x1d +/* 80376D48 00373CA8 60 00 00 02 */ ori r0, r0, 2 +/* 80376D4C 00373CAC 90 04 00 10 */ stw r0, 0x10(r4) +/* 80376D50 00373CB0 80 04 00 10 */ lwz r0, 0x10(r4) +/* 80376D54 00373CB4 80 6D AC 7C */ lwz r3, lbl_805A983C@sda21(r13) +/* 80376D58 00373CB8 B0 03 00 04 */ sth r0, 4(r3) +/* 80376D5C 00373CBC 80 04 00 08 */ lwz r0, 8(r4) +/* 80376D60 00373CC0 54 00 07 B8 */ rlwinm r0, r0, 0, 0x1e, 0x1c +/* 80376D64 00373CC4 60 00 00 04 */ ori r0, r0, 4 +/* 80376D68 00373CC8 90 04 00 08 */ stw r0, 8(r4) +/* 80376D6C 00373CCC 80 04 00 08 */ lwz r0, 8(r4) +/* 80376D70 00373CD0 54 00 07 76 */ rlwinm r0, r0, 0, 0x1d, 0x1b +/* 80376D74 00373CD4 90 04 00 08 */ stw r0, 8(r4) +/* 80376D78 00373CD8 80 04 00 08 */ lwz r0, 8(r4) +/* 80376D7C 00373CDC 80 6D AC 7C */ lwz r3, lbl_805A983C@sda21(r13) +/* 80376D80 00373CE0 B0 03 00 02 */ sth r0, 2(r3) +/* 80376D84 00373CE4 80 04 00 08 */ lwz r0, 8(r4) +/* 80376D88 00373CE8 54 00 07 34 */ rlwinm r0, r0, 0, 0x1c, 0x1a +/* 80376D8C 00373CEC 60 00 00 10 */ ori r0, r0, 0x10 +/* 80376D90 00373CF0 90 04 00 08 */ stw r0, 8(r4) +/* 80376D94 00373CF4 80 04 00 08 */ lwz r0, 8(r4) +/* 80376D98 00373CF8 80 6D AC 7C */ lwz r3, lbl_805A983C@sda21(r13) +/* 80376D9C 00373CFC B0 03 00 02 */ sth r0, 2(r3) +lbl_80376DA0: +/* 80376DA0 00373D00 4B FF 8A 6D */ bl PPCSync +/* 80376DA4 00373D04 7F E3 FB 78 */ mr r3, r31 +/* 80376DA8 00373D08 48 00 A8 E1 */ bl OSRestoreInterrupts +/* 80376DAC 00373D0C 80 01 00 1C */ lwz r0, 0x1c(r1) +/* 80376DB0 00373D10 83 E1 00 14 */ lwz r31, 0x14(r1) +/* 80376DB4 00373D14 38 21 00 18 */ addi r1, r1, 0x18 +/* 80376DB8 00373D18 7C 08 03 A6 */ mtlr r0 +/* 80376DBC 00373D1C 4E 80 00 20 */ blr + diff --git a/asm/Dolphin/GX/GXFrameBuf.s b/asm/Dolphin/GX/GXFrameBuf.s new file mode 100644 index 00000000..cba0d95a --- /dev/null +++ b/asm/Dolphin/GX/GXFrameBuf.s @@ -0,0 +1,769 @@ +.include "macros.inc" + +.section .text, "ax" + +.global GXAdjustForOverscan +GXAdjustForOverscan: +/* 80378C04 00375B64 7C 03 20 40 */ cmplw r3, r4 +/* 80378C08 00375B68 54 A7 04 3E */ clrlwi r7, r5, 0x10 +/* 80378C0C 00375B6C 54 C0 04 3E */ clrlwi r0, r6, 0x10 +/* 80378C10 00375B70 54 A5 0C 3C */ rlwinm r5, r5, 1, 0x10, 0x1e +/* 80378C14 00375B74 54 C6 0C 3C */ rlwinm r6, r6, 1, 0x10, 0x1e +/* 80378C18 00375B78 41 82 00 7C */ beq lbl_80378C94 +/* 80378C1C 00375B7C 81 23 00 00 */ lwz r9, 0(r3) +/* 80378C20 00375B80 81 03 00 04 */ lwz r8, 4(r3) +/* 80378C24 00375B84 91 24 00 00 */ stw r9, 0(r4) +/* 80378C28 00375B88 91 04 00 04 */ stw r8, 4(r4) +/* 80378C2C 00375B8C 81 23 00 08 */ lwz r9, 8(r3) +/* 80378C30 00375B90 81 03 00 0C */ lwz r8, 0xc(r3) +/* 80378C34 00375B94 91 24 00 08 */ stw r9, 8(r4) +/* 80378C38 00375B98 91 04 00 0C */ stw r8, 0xc(r4) +/* 80378C3C 00375B9C 81 23 00 10 */ lwz r9, 0x10(r3) +/* 80378C40 00375BA0 81 03 00 14 */ lwz r8, 0x14(r3) +/* 80378C44 00375BA4 91 24 00 10 */ stw r9, 0x10(r4) +/* 80378C48 00375BA8 91 04 00 14 */ stw r8, 0x14(r4) +/* 80378C4C 00375BAC 81 23 00 18 */ lwz r9, 0x18(r3) +/* 80378C50 00375BB0 81 03 00 1C */ lwz r8, 0x1c(r3) +/* 80378C54 00375BB4 91 24 00 18 */ stw r9, 0x18(r4) +/* 80378C58 00375BB8 91 04 00 1C */ stw r8, 0x1c(r4) +/* 80378C5C 00375BBC 81 23 00 20 */ lwz r9, 0x20(r3) +/* 80378C60 00375BC0 81 03 00 24 */ lwz r8, 0x24(r3) +/* 80378C64 00375BC4 91 24 00 20 */ stw r9, 0x20(r4) +/* 80378C68 00375BC8 91 04 00 24 */ stw r8, 0x24(r4) +/* 80378C6C 00375BCC 81 23 00 28 */ lwz r9, 0x28(r3) +/* 80378C70 00375BD0 81 03 00 2C */ lwz r8, 0x2c(r3) +/* 80378C74 00375BD4 91 24 00 28 */ stw r9, 0x28(r4) +/* 80378C78 00375BD8 91 04 00 2C */ stw r8, 0x2c(r4) +/* 80378C7C 00375BDC 81 23 00 30 */ lwz r9, 0x30(r3) +/* 80378C80 00375BE0 81 03 00 34 */ lwz r8, 0x34(r3) +/* 80378C84 00375BE4 91 24 00 30 */ stw r9, 0x30(r4) +/* 80378C88 00375BE8 91 04 00 34 */ stw r8, 0x34(r4) +/* 80378C8C 00375BEC 81 03 00 38 */ lwz r8, 0x38(r3) +/* 80378C90 00375BF0 91 04 00 38 */ stw r8, 0x38(r4) +lbl_80378C94: +/* 80378C94 00375BF4 A1 03 00 04 */ lhz r8, 4(r3) +/* 80378C98 00375BF8 7D 05 40 50 */ subf r8, r5, r8 +/* 80378C9C 00375BFC B1 04 00 04 */ sth r8, 4(r4) +/* 80378CA0 00375C00 A1 43 00 06 */ lhz r10, 6(r3) +/* 80378CA4 00375C04 A1 03 00 08 */ lhz r8, 8(r3) +/* 80378CA8 00375C08 7D 26 51 D6 */ mullw r9, r6, r10 +/* 80378CAC 00375C0C 7D 09 43 96 */ divwu r8, r9, r8 +/* 80378CB0 00375C10 7D 08 50 50 */ subf r8, r8, r10 +/* 80378CB4 00375C14 B1 04 00 06 */ sth r8, 6(r4) +/* 80378CB8 00375C18 81 03 00 14 */ lwz r8, 0x14(r3) +/* 80378CBC 00375C1C 2C 08 00 00 */ cmpwi r8, 0 +/* 80378CC0 00375C20 40 82 00 24 */ bne lbl_80378CE4 +/* 80378CC4 00375C24 81 03 00 00 */ lwz r8, 0(r3) +/* 80378CC8 00375C28 55 08 07 BC */ rlwinm r8, r8, 0, 0x1e, 0x1e +/* 80378CCC 00375C2C 2C 08 00 02 */ cmpwi r8, 2 +/* 80378CD0 00375C30 41 82 00 14 */ beq lbl_80378CE4 +/* 80378CD4 00375C34 A1 03 00 08 */ lhz r8, 8(r3) +/* 80378CD8 00375C38 7D 00 40 50 */ subf r8, r0, r8 +/* 80378CDC 00375C3C B1 04 00 08 */ sth r8, 8(r4) +/* 80378CE0 00375C40 48 00 00 10 */ b lbl_80378CF0 +lbl_80378CE4: +/* 80378CE4 00375C44 A1 03 00 08 */ lhz r8, 8(r3) +/* 80378CE8 00375C48 7D 06 40 50 */ subf r8, r6, r8 +/* 80378CEC 00375C4C B1 04 00 08 */ sth r8, 8(r4) +lbl_80378CF0: +/* 80378CF0 00375C50 A1 03 00 0E */ lhz r8, 0xe(r3) +/* 80378CF4 00375C54 7C A5 40 50 */ subf r5, r5, r8 +/* 80378CF8 00375C58 B0 A4 00 0E */ sth r5, 0xe(r4) +/* 80378CFC 00375C5C A0 A3 00 10 */ lhz r5, 0x10(r3) +/* 80378D00 00375C60 7C A6 28 50 */ subf r5, r6, r5 +/* 80378D04 00375C64 B0 A4 00 10 */ sth r5, 0x10(r4) +/* 80378D08 00375C68 A0 A3 00 0A */ lhz r5, 0xa(r3) +/* 80378D0C 00375C6C 7C A5 3A 14 */ add r5, r5, r7 +/* 80378D10 00375C70 B0 A4 00 0A */ sth r5, 0xa(r4) +/* 80378D14 00375C74 A0 63 00 0C */ lhz r3, 0xc(r3) +/* 80378D18 00375C78 7C 03 02 14 */ add r0, r3, r0 +/* 80378D1C 00375C7C B0 04 00 0C */ sth r0, 0xc(r4) +/* 80378D20 00375C80 4E 80 00 20 */ blr + +.global GXSetDispCopySrc +GXSetDispCopySrc: +/* 80378D24 00375C84 81 22 CE 08 */ lwz r9, lbl_805AEB28@sda21(r2) +/* 80378D28 00375C88 39 40 00 00 */ li r10, 0 +/* 80378D2C 00375C8C 54 A7 04 3E */ clrlwi r7, r5, 0x10 +/* 80378D30 00375C90 91 49 01 E0 */ stw r10, 0x1e0(r9) +/* 80378D34 00375C94 54 C5 04 3E */ clrlwi r5, r6, 0x10 +/* 80378D38 00375C98 38 05 FF FF */ addi r0, r5, -1 +/* 80378D3C 00375C9C 81 09 01 E0 */ lwz r8, 0x1e0(r9) +/* 80378D40 00375CA0 54 63 04 3E */ clrlwi r3, r3, 0x10 +/* 80378D44 00375CA4 54 84 51 AA */ rlwinm r4, r4, 0xa, 6, 0x15 +/* 80378D48 00375CA8 55 05 00 2A */ rlwinm r5, r8, 0, 0, 0x15 +/* 80378D4C 00375CAC 7C A3 1B 78 */ or r3, r5, r3 +/* 80378D50 00375CB0 90 69 01 E0 */ stw r3, 0x1e0(r9) +/* 80378D54 00375CB4 38 67 FF FF */ addi r3, r7, -1 +/* 80378D58 00375CB8 54 00 50 2A */ slwi r0, r0, 0xa +/* 80378D5C 00375CBC 80 A9 01 E0 */ lwz r5, 0x1e0(r9) +/* 80378D60 00375CC0 54 A5 05 96 */ rlwinm r5, r5, 0, 0x16, 0xb +/* 80378D64 00375CC4 7C A4 23 78 */ or r4, r5, r4 +/* 80378D68 00375CC8 90 89 01 E0 */ stw r4, 0x1e0(r9) +/* 80378D6C 00375CCC 80 89 01 E0 */ lwz r4, 0x1e0(r9) +/* 80378D70 00375CD0 54 84 02 3E */ clrlwi r4, r4, 8 +/* 80378D74 00375CD4 64 84 49 00 */ oris r4, r4, 0x4900 +/* 80378D78 00375CD8 90 89 01 E0 */ stw r4, 0x1e0(r9) +/* 80378D7C 00375CDC 91 49 01 E4 */ stw r10, 0x1e4(r9) +/* 80378D80 00375CE0 80 89 01 E4 */ lwz r4, 0x1e4(r9) +/* 80378D84 00375CE4 54 84 00 2A */ rlwinm r4, r4, 0, 0, 0x15 +/* 80378D88 00375CE8 7C 83 1B 78 */ or r3, r4, r3 +/* 80378D8C 00375CEC 90 69 01 E4 */ stw r3, 0x1e4(r9) +/* 80378D90 00375CF0 80 69 01 E4 */ lwz r3, 0x1e4(r9) +/* 80378D94 00375CF4 54 63 05 96 */ rlwinm r3, r3, 0, 0x16, 0xb +/* 80378D98 00375CF8 7C 60 03 78 */ or r0, r3, r0 +/* 80378D9C 00375CFC 90 09 01 E4 */ stw r0, 0x1e4(r9) +/* 80378DA0 00375D00 80 09 01 E4 */ lwz r0, 0x1e4(r9) +/* 80378DA4 00375D04 54 00 02 3E */ clrlwi r0, r0, 8 +/* 80378DA8 00375D08 64 00 4A 00 */ oris r0, r0, 0x4a00 +/* 80378DAC 00375D0C 90 09 01 E4 */ stw r0, 0x1e4(r9) +/* 80378DB0 00375D10 4E 80 00 20 */ blr + +.global GXSetTexCopySrc +GXSetTexCopySrc: +/* 80378DB4 00375D14 81 22 CE 08 */ lwz r9, lbl_805AEB28@sda21(r2) +/* 80378DB8 00375D18 39 40 00 00 */ li r10, 0 +/* 80378DBC 00375D1C 54 A7 04 3E */ clrlwi r7, r5, 0x10 +/* 80378DC0 00375D20 91 49 01 F0 */ stw r10, 0x1f0(r9) +/* 80378DC4 00375D24 54 C5 04 3E */ clrlwi r5, r6, 0x10 +/* 80378DC8 00375D28 38 05 FF FF */ addi r0, r5, -1 +/* 80378DCC 00375D2C 81 09 01 F0 */ lwz r8, 0x1f0(r9) +/* 80378DD0 00375D30 54 63 04 3E */ clrlwi r3, r3, 0x10 +/* 80378DD4 00375D34 54 84 51 AA */ rlwinm r4, r4, 0xa, 6, 0x15 +/* 80378DD8 00375D38 55 05 00 2A */ rlwinm r5, r8, 0, 0, 0x15 +/* 80378DDC 00375D3C 7C A3 1B 78 */ or r3, r5, r3 +/* 80378DE0 00375D40 90 69 01 F0 */ stw r3, 0x1f0(r9) +/* 80378DE4 00375D44 38 67 FF FF */ addi r3, r7, -1 +/* 80378DE8 00375D48 54 00 50 2A */ slwi r0, r0, 0xa +/* 80378DEC 00375D4C 80 A9 01 F0 */ lwz r5, 0x1f0(r9) +/* 80378DF0 00375D50 54 A5 05 96 */ rlwinm r5, r5, 0, 0x16, 0xb +/* 80378DF4 00375D54 7C A4 23 78 */ or r4, r5, r4 +/* 80378DF8 00375D58 90 89 01 F0 */ stw r4, 0x1f0(r9) +/* 80378DFC 00375D5C 80 89 01 F0 */ lwz r4, 0x1f0(r9) +/* 80378E00 00375D60 54 84 02 3E */ clrlwi r4, r4, 8 +/* 80378E04 00375D64 64 84 49 00 */ oris r4, r4, 0x4900 +/* 80378E08 00375D68 90 89 01 F0 */ stw r4, 0x1f0(r9) +/* 80378E0C 00375D6C 91 49 01 F4 */ stw r10, 0x1f4(r9) +/* 80378E10 00375D70 80 89 01 F4 */ lwz r4, 0x1f4(r9) +/* 80378E14 00375D74 54 84 00 2A */ rlwinm r4, r4, 0, 0, 0x15 +/* 80378E18 00375D78 7C 83 1B 78 */ or r3, r4, r3 +/* 80378E1C 00375D7C 90 69 01 F4 */ stw r3, 0x1f4(r9) +/* 80378E20 00375D80 80 69 01 F4 */ lwz r3, 0x1f4(r9) +/* 80378E24 00375D84 54 63 05 96 */ rlwinm r3, r3, 0, 0x16, 0xb +/* 80378E28 00375D88 7C 60 03 78 */ or r0, r3, r0 +/* 80378E2C 00375D8C 90 09 01 F4 */ stw r0, 0x1f4(r9) +/* 80378E30 00375D90 80 09 01 F4 */ lwz r0, 0x1f4(r9) +/* 80378E34 00375D94 54 00 02 3E */ clrlwi r0, r0, 8 +/* 80378E38 00375D98 64 00 4A 00 */ oris r0, r0, 0x4a00 +/* 80378E3C 00375D9C 90 09 01 F4 */ stw r0, 0x1f4(r9) +/* 80378E40 00375DA0 4E 80 00 20 */ blr + +.global GXSetDispCopyDst +GXSetDispCopyDst: +/* 80378E44 00375DA4 80 82 CE 08 */ lwz r4, lbl_805AEB28@sda21(r2) +/* 80378E48 00375DA8 38 00 00 00 */ li r0, 0 +/* 80378E4C 00375DAC 90 04 01 E8 */ stw r0, 0x1e8(r4) +/* 80378E50 00375DB0 38 A4 01 E8 */ addi r5, r4, 0x1e8 +/* 80378E54 00375DB4 54 60 0C 3C */ rlwinm r0, r3, 1, 0x10, 0x1e +/* 80378E58 00375DB8 80 84 01 E8 */ lwz r4, 0x1e8(r4) +/* 80378E5C 00375DBC 7C 00 2E 70 */ srawi r0, r0, 5 +/* 80378E60 00375DC0 54 83 00 2A */ rlwinm r3, r4, 0, 0, 0x15 +/* 80378E64 00375DC4 7C 60 03 78 */ or r0, r3, r0 +/* 80378E68 00375DC8 90 05 00 00 */ stw r0, 0(r5) +/* 80378E6C 00375DCC 80 05 00 00 */ lwz r0, 0(r5) +/* 80378E70 00375DD0 54 00 02 3E */ clrlwi r0, r0, 8 +/* 80378E74 00375DD4 64 00 4D 00 */ oris r0, r0, 0x4d00 +/* 80378E78 00375DD8 90 05 00 00 */ stw r0, 0(r5) +/* 80378E7C 00375DDC 4E 80 00 20 */ blr + +.global GXSetTexCopyDst +GXSetTexCopyDst: +/* 80378E80 00375DE0 7C 08 02 A6 */ mflr r0 +/* 80378E84 00375DE4 2C 05 00 13 */ cmpwi r5, 0x13 +/* 80378E88 00375DE8 90 01 00 04 */ stw r0, 4(r1) +/* 80378E8C 00375DEC 38 00 00 00 */ li r0, 0 +/* 80378E90 00375DF0 39 03 00 00 */ addi r8, r3, 0 +/* 80378E94 00375DF4 94 21 FF D0 */ stwu r1, -0x30(r1) +/* 80378E98 00375DF8 93 E1 00 2C */ stw r31, 0x2c(r1) +/* 80378E9C 00375DFC 54 BF 07 3E */ clrlwi r31, r5, 0x1c +/* 80378EA0 00375E00 93 C1 00 28 */ stw r30, 0x28(r1) +/* 80378EA4 00375E04 3B C6 00 00 */ addi r30, r6, 0 +/* 80378EA8 00375E08 80 E2 CE 08 */ lwz r7, lbl_805AEB28@sda21(r2) +/* 80378EAC 00375E0C 98 07 02 00 */ stb r0, 0x200(r7) +/* 80378EB0 00375E10 38 E4 00 00 */ addi r7, r4, 0 +/* 80378EB4 00375E14 40 82 00 08 */ bne lbl_80378EBC +/* 80378EB8 00375E18 3B E0 00 0B */ li r31, 0xb +lbl_80378EBC: +/* 80378EBC 00375E1C 2C 05 00 26 */ cmpwi r5, 0x26 +/* 80378EC0 00375E20 41 82 00 1C */ beq lbl_80378EDC +/* 80378EC4 00375E24 40 80 00 34 */ bge lbl_80378EF8 +/* 80378EC8 00375E28 2C 05 00 04 */ cmpwi r5, 4 +/* 80378ECC 00375E2C 40 80 00 2C */ bge lbl_80378EF8 +/* 80378ED0 00375E30 2C 05 00 00 */ cmpwi r5, 0 +/* 80378ED4 00375E34 40 80 00 08 */ bge lbl_80378EDC +/* 80378ED8 00375E38 48 00 00 20 */ b lbl_80378EF8 +lbl_80378EDC: +/* 80378EDC 00375E3C 80 62 CE 08 */ lwz r3, lbl_805AEB28@sda21(r2) +/* 80378EE0 00375E40 84 03 01 FC */ lwzu r0, 0x1fc(r3) +/* 80378EE4 00375E44 54 00 04 5C */ rlwinm r0, r0, 0, 0x11, 0xe +/* 80378EE8 00375E48 64 00 00 01 */ oris r0, r0, 1 +/* 80378EEC 00375E4C 60 00 80 00 */ ori r0, r0, 0x8000 +/* 80378EF0 00375E50 90 03 00 00 */ stw r0, 0(r3) +/* 80378EF4 00375E54 48 00 00 18 */ b lbl_80378F0C +lbl_80378EF8: +/* 80378EF8 00375E58 80 62 CE 08 */ lwz r3, lbl_805AEB28@sda21(r2) +/* 80378EFC 00375E5C 84 03 01 FC */ lwzu r0, 0x1fc(r3) +/* 80378F00 00375E60 54 00 04 5C */ rlwinm r0, r0, 0, 0x11, 0xe +/* 80378F04 00375E64 64 00 00 01 */ oris r0, r0, 1 +/* 80378F08 00375E68 90 03 00 00 */ stw r0, 0(r3) +lbl_80378F0C: +/* 80378F0C 00375E6C 54 A4 06 F6 */ rlwinm r4, r5, 0, 0x1b, 0x1b +/* 80378F10 00375E70 80 62 CE 08 */ lwz r3, lbl_805AEB28@sda21(r2) +/* 80378F14 00375E74 38 04 FF F0 */ addi r0, r4, -16 +/* 80378F18 00375E78 7C 00 00 34 */ cntlzw r0, r0 +/* 80378F1C 00375E7C 54 00 DE 3E */ rlwinm r0, r0, 0x1b, 0x18, 0x1f +/* 80378F20 00375E80 98 03 02 00 */ stb r0, 0x200(r3) +/* 80378F24 00375E84 38 88 00 00 */ addi r4, r8, 0 +/* 80378F28 00375E88 38 C1 00 20 */ addi r6, r1, 0x20 +/* 80378F2C 00375E8C 84 03 01 FC */ lwzu r0, 0x1fc(r3) +/* 80378F30 00375E90 39 01 00 18 */ addi r8, r1, 0x18 +/* 80378F34 00375E94 54 00 07 76 */ rlwinm r0, r0, 0, 0x1d, 0x1b +/* 80378F38 00375E98 53 E0 07 38 */ rlwimi r0, r31, 0, 0x1c, 0x1c +/* 80378F3C 00375E9C 90 03 00 00 */ stw r0, 0(r3) +/* 80378F40 00375EA0 38 65 00 00 */ addi r3, r5, 0 +/* 80378F44 00375EA4 38 A7 00 00 */ addi r5, r7, 0 +/* 80378F48 00375EA8 57 FF 07 7E */ clrlwi r31, r31, 0x1d +/* 80378F4C 00375EAC 38 E1 00 1C */ addi r7, r1, 0x1c +/* 80378F50 00375EB0 48 00 0E 4D */ bl __GetImageTileCount +/* 80378F54 00375EB4 80 62 CE 08 */ lwz r3, lbl_805AEB28@sda21(r2) +/* 80378F58 00375EB8 38 00 00 00 */ li r0, 0 +/* 80378F5C 00375EBC 90 03 01 F8 */ stw r0, 0x1f8(r3) +/* 80378F60 00375EC0 38 E3 01 F8 */ addi r7, r3, 0x1f8 +/* 80378F64 00375EC4 39 03 01 FC */ addi r8, r3, 0x1fc +/* 80378F68 00375EC8 80 A1 00 20 */ lwz r5, 0x20(r1) +/* 80378F6C 00375ECC 57 C3 4B EC */ rlwinm r3, r30, 9, 0xf, 0x16 +/* 80378F70 00375ED0 80 81 00 18 */ lwz r4, 0x18(r1) +/* 80378F74 00375ED4 57 E0 20 36 */ slwi r0, r31, 4 +/* 80378F78 00375ED8 80 C7 00 00 */ lwz r6, 0(r7) +/* 80378F7C 00375EDC 7C 85 21 D6 */ mullw r4, r5, r4 +/* 80378F80 00375EE0 54 C5 00 2A */ rlwinm r5, r6, 0, 0, 0x15 +/* 80378F84 00375EE4 7C A4 23 78 */ or r4, r5, r4 +/* 80378F88 00375EE8 90 87 00 00 */ stw r4, 0(r7) +/* 80378F8C 00375EEC 80 87 00 00 */ lwz r4, 0(r7) +/* 80378F90 00375EF0 54 84 02 3E */ clrlwi r4, r4, 8 +/* 80378F94 00375EF4 64 84 4D 00 */ oris r4, r4, 0x4d00 +/* 80378F98 00375EF8 90 87 00 00 */ stw r4, 0(r7) +/* 80378F9C 00375EFC 80 88 00 00 */ lwz r4, 0(r8) +/* 80378FA0 00375F00 54 84 05 EA */ rlwinm r4, r4, 0, 0x17, 0x15 +/* 80378FA4 00375F04 7C 83 1B 78 */ or r3, r4, r3 +/* 80378FA8 00375F08 90 68 00 00 */ stw r3, 0(r8) +/* 80378FAC 00375F0C 80 68 00 00 */ lwz r3, 0(r8) +/* 80378FB0 00375F10 54 63 07 30 */ rlwinm r3, r3, 0, 0x1c, 0x18 +/* 80378FB4 00375F14 7C 60 03 78 */ or r0, r3, r0 +/* 80378FB8 00375F18 90 08 00 00 */ stw r0, 0(r8) +/* 80378FBC 00375F1C 80 01 00 34 */ lwz r0, 0x34(r1) +/* 80378FC0 00375F20 83 E1 00 2C */ lwz r31, 0x2c(r1) +/* 80378FC4 00375F24 83 C1 00 28 */ lwz r30, 0x28(r1) +/* 80378FC8 00375F28 38 21 00 30 */ addi r1, r1, 0x30 +/* 80378FCC 00375F2C 7C 08 03 A6 */ mtlr r0 +/* 80378FD0 00375F30 4E 80 00 20 */ blr + +.global GXSetDispCopyFrame2Field +GXSetDispCopyFrame2Field: +/* 80378FD4 00375F34 80 82 CE 08 */ lwz r4, lbl_805AEB28@sda21(r2) +/* 80378FD8 00375F38 54 60 60 26 */ slwi r0, r3, 0xc +/* 80378FDC 00375F3C 80 64 01 EC */ lwz r3, 0x1ec(r4) +/* 80378FE0 00375F40 54 63 05 22 */ rlwinm r3, r3, 0, 0x14, 0x11 +/* 80378FE4 00375F44 7C 60 03 78 */ or r0, r3, r0 +/* 80378FE8 00375F48 90 04 01 EC */ stw r0, 0x1ec(r4) +/* 80378FEC 00375F4C 84 04 01 FC */ lwzu r0, 0x1fc(r4) +/* 80378FF0 00375F50 54 00 05 22 */ rlwinm r0, r0, 0, 0x14, 0x11 +/* 80378FF4 00375F54 90 04 00 00 */ stw r0, 0(r4) +/* 80378FF8 00375F58 4E 80 00 20 */ blr + +.global GXSetCopyClamp +GXSetCopyClamp: +/* 80378FFC 00375F5C 80 C2 CE 08 */ lwz r6, lbl_805AEB28@sda21(r2) +/* 80379000 00375F60 54 64 07 FE */ clrlwi r4, r3, 0x1f +/* 80379004 00375F64 38 04 FF FF */ addi r0, r4, -1 +/* 80379008 00375F68 80 86 01 EC */ lwz r4, 0x1ec(r6) +/* 8037900C 00375F6C 7C 00 00 34 */ cntlzw r0, r0 +/* 80379010 00375F70 54 63 07 BC */ rlwinm r3, r3, 0, 0x1e, 0x1e +/* 80379014 00375F74 54 85 00 3C */ rlwinm r5, r4, 0, 0, 0x1e +/* 80379018 00375F78 54 04 DE 3E */ rlwinm r4, r0, 0x1b, 0x18, 0x1f +/* 8037901C 00375F7C 7C A0 23 78 */ or r0, r5, r4 +/* 80379020 00375F80 90 06 01 EC */ stw r0, 0x1ec(r6) +/* 80379024 00375F84 38 03 FF FE */ addi r0, r3, -2 +/* 80379028 00375F88 7C 00 00 34 */ cntlzw r0, r0 +/* 8037902C 00375F8C 80 66 01 EC */ lwz r3, 0x1ec(r6) +/* 80379030 00375F90 54 05 E5 FC */ rlwinm r5, r0, 0x1c, 0x17, 0x1e +/* 80379034 00375F94 54 63 07 FA */ rlwinm r3, r3, 0, 0x1f, 0x1d +/* 80379038 00375F98 7C 60 2B 78 */ or r0, r3, r5 +/* 8037903C 00375F9C 90 06 01 EC */ stw r0, 0x1ec(r6) +/* 80379040 00375FA0 80 06 01 FC */ lwz r0, 0x1fc(r6) +/* 80379044 00375FA4 54 00 00 3C */ rlwinm r0, r0, 0, 0, 0x1e +/* 80379048 00375FA8 7C 00 23 78 */ or r0, r0, r4 +/* 8037904C 00375FAC 90 06 01 FC */ stw r0, 0x1fc(r6) +/* 80379050 00375FB0 80 06 01 FC */ lwz r0, 0x1fc(r6) +/* 80379054 00375FB4 54 00 07 FA */ rlwinm r0, r0, 0, 0x1f, 0x1d +/* 80379058 00375FB8 7C 00 2B 78 */ or r0, r0, r5 +/* 8037905C 00375FBC 90 06 01 FC */ stw r0, 0x1fc(r6) +/* 80379060 00375FC0 4E 80 00 20 */ blr + +.global GXSetDispCopyYScale +GXSetDispCopyYScale: +/* 80379064 00375FC4 7C 08 02 A6 */ mflr r0 +/* 80379068 00375FC8 90 01 00 04 */ stw r0, 4(r1) +/* 8037906C 00375FCC 94 21 FF F8 */ stwu r1, -8(r1) +/* 80379070 00375FD0 C0 02 CE 30 */ lfs f0, lbl_805AEB50@sda21(r2) +/* 80379074 00375FD4 EC 20 08 24 */ fdivs f1, f0, f1 +/* 80379078 00375FD8 48 01 08 DD */ bl __cvt_fp2unsigned +/* 8037907C 00375FDC 54 66 05 FE */ clrlwi r6, r3, 0x17 +/* 80379080 00375FE0 80 82 CE 08 */ lwz r4, lbl_805AEB28@sda21(r2) +/* 80379084 00375FE4 38 00 00 61 */ li r0, 0x61 +/* 80379088 00375FE8 3C 60 CC 01 */ lis r3, 0xCC008000@ha +/* 8037908C 00375FEC 98 03 80 00 */ stb r0, 0xCC008000@l(r3) +/* 80379090 00375FF0 64 C0 4E 00 */ oris r0, r6, 0x4e00 +/* 80379094 00375FF4 38 A0 00 00 */ li r5, 0 +/* 80379098 00375FF8 90 03 80 00 */ stw r0, 0xCC008000@l(r3) +/* 8037909C 00375FFC 20 66 01 00 */ subfic r3, r6, 0x100 +/* 803790A0 00376000 30 03 FF FF */ addic r0, r3, -1 +/* 803790A4 00376004 B0 A4 00 02 */ sth r5, 2(r4) +/* 803790A8 00376008 7C 00 19 10 */ subfe r0, r0, r3 +/* 803790AC 0037600C 54 00 53 AA */ rlwinm r0, r0, 0xa, 0xe, 0x15 +/* 803790B0 00376010 80 64 01 EC */ lwz r3, 0x1ec(r4) +/* 803790B4 00376014 28 06 00 80 */ cmplwi r6, 0x80 +/* 803790B8 00376018 38 A6 00 00 */ addi r5, r6, 0 +/* 803790BC 0037601C 54 63 05 A8 */ rlwinm r3, r3, 0, 0x16, 0x14 +/* 803790C0 00376020 7C 60 03 78 */ or r0, r3, r0 +/* 803790C4 00376024 90 04 01 EC */ stw r0, 0x1ec(r4) +/* 803790C8 00376028 80 04 01 E4 */ lwz r0, 0x1e4(r4) +/* 803790CC 0037602C 54 04 B5 BE */ rlwinm r4, r0, 0x16, 0x16, 0x1f +/* 803790D0 00376030 54 00 F3 AE */ rlwinm r0, r0, 0x1e, 0xe, 0x17 +/* 803790D4 00376034 7C 60 33 96 */ divwu r3, r0, r6 +/* 803790D8 00376038 38 84 00 01 */ addi r4, r4, 1 +/* 803790DC 0037603C 38 63 00 01 */ addi r3, r3, 1 +/* 803790E0 00376040 40 81 00 30 */ ble lbl_80379110 +/* 803790E4 00376044 28 06 01 00 */ cmplwi r6, 0x100 +/* 803790E8 00376048 40 80 00 28 */ bge lbl_80379110 +/* 803790EC 0037604C 48 00 00 08 */ b lbl_803790F4 +lbl_803790F0: +/* 803790F0 00376050 54 A5 F8 7E */ srwi r5, r5, 1 +lbl_803790F4: +/* 803790F4 00376054 54 A0 07 FF */ clrlwi. r0, r5, 0x1f +/* 803790F8 00376058 41 82 FF F8 */ beq lbl_803790F0 +/* 803790FC 0037605C 7C 04 2B 96 */ divwu r0, r4, r5 +/* 80379100 00376060 7C 00 29 D6 */ mullw r0, r0, r5 +/* 80379104 00376064 7C 00 20 51 */ subf. r0, r0, r4 +/* 80379108 00376068 40 82 00 08 */ bne lbl_80379110 +/* 8037910C 0037606C 38 63 00 01 */ addi r3, r3, 1 +lbl_80379110: +/* 80379110 00376070 28 03 04 00 */ cmplwi r3, 0x400 +/* 80379114 00376074 40 81 00 08 */ ble lbl_8037911C +/* 80379118 00376078 38 60 04 00 */ li r3, 0x400 +lbl_8037911C: +/* 8037911C 0037607C 80 01 00 0C */ lwz r0, 0xc(r1) +/* 80379120 00376080 38 21 00 08 */ addi r1, r1, 8 +/* 80379124 00376084 7C 08 03 A6 */ mtlr r0 +/* 80379128 00376088 4E 80 00 20 */ blr + +.global GXSetCopyClear +GXSetCopyClear: +/* 8037912C 0037608C 54 80 02 3E */ clrlwi r0, r4, 8 +/* 80379130 00376090 88 83 00 03 */ lbz r4, 3(r3) +/* 80379134 00376094 88 A3 00 00 */ lbz r5, 0(r3) +/* 80379138 00376098 38 C0 00 61 */ li r6, 0x61 +/* 8037913C 0037609C 54 87 40 2E */ slwi r7, r4, 8 +/* 80379140 003760A0 80 82 CE 08 */ lwz r4, lbl_805AEB28@sda21(r2) +/* 80379144 003760A4 50 A7 06 3E */ rlwimi r7, r5, 0, 0x18, 0x1f +/* 80379148 003760A8 3C A0 CC 01 */ lis r5, 0xCC008000@ha +/* 8037914C 003760AC 54 E7 02 3E */ clrlwi r7, r7, 8 +/* 80379150 003760B0 98 C5 80 00 */ stb r6, 0xCC008000@l(r5) +/* 80379154 003760B4 64 E7 4F 00 */ oris r7, r7, 0x4f00 +/* 80379158 003760B8 90 E5 80 00 */ stw r7, 0xCC008000@l(r5) +/* 8037915C 003760BC 64 07 51 00 */ oris r7, r0, 0x5100 +/* 80379160 003760C0 38 00 00 00 */ li r0, 0 +/* 80379164 003760C4 89 03 00 02 */ lbz r8, 2(r3) +/* 80379168 003760C8 88 63 00 01 */ lbz r3, 1(r3) +/* 8037916C 003760CC 54 63 40 2E */ slwi r3, r3, 8 +/* 80379170 003760D0 98 C5 80 00 */ stb r6, 0xCC008000@l(r5) +/* 80379174 003760D4 51 03 06 3E */ rlwimi r3, r8, 0, 0x18, 0x1f +/* 80379178 003760D8 54 63 02 3E */ clrlwi r3, r3, 8 +/* 8037917C 003760DC 64 63 50 00 */ oris r3, r3, 0x5000 +/* 80379180 003760E0 90 65 80 00 */ stw r3, 0xCC008000@l(r5) +/* 80379184 003760E4 98 C5 80 00 */ stb r6, 0xCC008000@l(r5) +/* 80379188 003760E8 90 E5 80 00 */ stw r7, 0xCC008000@l(r5) +/* 8037918C 003760EC B0 04 00 02 */ sth r0, 2(r4) +/* 80379190 003760F0 4E 80 00 20 */ blr + +.global GXSetCopyFilter +GXSetCopyFilter: +/* 80379194 003760F4 94 21 FF B0 */ stwu r1, -0x50(r1) +/* 80379198 003760F8 54 60 06 3F */ clrlwi. r0, r3, 0x18 +/* 8037919C 003760FC BE E1 00 2C */ stmw r23, 0x2c(r1) +/* 803791A0 00376100 41 82 01 28 */ beq lbl_803792C8 +/* 803791A4 00376104 88 04 00 01 */ lbz r0, 1(r4) +/* 803791A8 00376108 88 64 00 07 */ lbz r3, 7(r4) +/* 803791AC 0037610C 54 1E 20 36 */ slwi r30, r0, 4 +/* 803791B0 00376110 89 04 00 00 */ lbz r8, 0(r4) +/* 803791B4 00376114 88 04 00 13 */ lbz r0, 0x13(r4) +/* 803791B8 00376118 54 79 20 36 */ slwi r25, r3, 4 +/* 803791BC 0037611C 89 44 00 06 */ lbz r10, 6(r4) +/* 803791C0 00376120 51 1E 07 3E */ rlwimi r30, r8, 0, 0x1c, 0x1f +/* 803791C4 00376124 89 64 00 02 */ lbz r11, 2(r4) +/* 803791C8 00376128 88 E4 00 0D */ lbz r7, 0xd(r4) +/* 803791CC 0037612C 51 59 07 3E */ rlwimi r25, r10, 0, 0x1c, 0x1f +/* 803791D0 00376130 55 7B 40 2E */ slwi r27, r11, 8 +/* 803791D4 00376134 89 24 00 08 */ lbz r9, 8(r4) +/* 803791D8 00376138 88 64 00 0E */ lbz r3, 0xe(r4) +/* 803791DC 0037613C 55 3A 40 2E */ slwi r26, r9, 8 +/* 803791E0 00376140 8B 84 00 03 */ lbz r28, 3(r4) +/* 803791E4 00376144 53 DB 06 3E */ rlwimi r27, r30, 0, 0x18, 0x1f +/* 803791E8 00376148 89 24 00 10 */ lbz r9, 0x10(r4) +/* 803791EC 0037614C 54 F7 20 36 */ slwi r23, r7, 4 +/* 803791F0 00376150 89 84 00 0C */ lbz r12, 0xc(r4) +/* 803791F4 00376154 88 E4 00 15 */ lbz r7, 0x15(r4) +/* 803791F8 00376158 54 78 40 2E */ slwi r24, r3, 8 +/* 803791FC 0037615C 51 97 07 3E */ rlwimi r23, r12, 0, 0x1c, 0x1f +/* 80379200 00376160 8B A4 00 12 */ lbz r29, 0x12(r4) +/* 80379204 00376164 54 00 20 36 */ slwi r0, r0, 4 +/* 80379208 00376168 53 A0 07 3E */ rlwimi r0, r29, 0, 0x1c, 0x1f +/* 8037920C 0037616C 89 04 00 14 */ lbz r8, 0x14(r4) +/* 80379210 00376170 57 9C 60 26 */ slwi r28, r28, 0xc +/* 80379214 00376174 8B E4 00 09 */ lbz r31, 9(r4) +/* 80379218 00376178 53 7C 05 3E */ rlwimi r28, r27, 0, 0x14, 0x1f +/* 8037921C 0037617C 8B A4 00 04 */ lbz r29, 4(r4) +/* 80379220 00376180 52 F8 06 3E */ rlwimi r24, r23, 0, 0x18, 0x1f +/* 80379224 00376184 89 44 00 0F */ lbz r10, 0xf(r4) +/* 80379228 00376188 55 17 40 2E */ slwi r23, r8, 8 +/* 8037922C 0037618C 89 84 00 0A */ lbz r12, 0xa(r4) +/* 80379230 00376190 53 3A 06 3E */ rlwimi r26, r25, 0, 0x18, 0x1f +/* 80379234 00376194 88 64 00 16 */ lbz r3, 0x16(r4) +/* 80379238 00376198 55 59 60 26 */ slwi r25, r10, 0xc +/* 8037923C 0037619C 8B C4 00 05 */ lbz r30, 5(r4) +/* 80379240 003761A0 50 17 06 3E */ rlwimi r23, r0, 0, 0x18, 0x1f +/* 80379244 003761A4 88 04 00 17 */ lbz r0, 0x17(r4) +/* 80379248 003761A8 57 FB 60 26 */ slwi r27, r31, 0xc +/* 8037924C 003761AC 89 64 00 0B */ lbz r11, 0xb(r4) +/* 80379250 003761B0 89 04 00 11 */ lbz r8, 0x11(r4) +/* 80379254 003761B4 57 A4 80 1E */ slwi r4, r29, 0x10 +/* 80379258 003761B8 54 E7 60 26 */ slwi r7, r7, 0xc +/* 8037925C 003761BC 55 8A 80 1E */ slwi r10, r12, 0x10 +/* 80379260 003761C0 53 5B 05 3E */ rlwimi r27, r26, 0, 0x14, 0x1f +/* 80379264 003761C4 54 6C 80 1E */ slwi r12, r3, 0x10 +/* 80379268 003761C8 52 E7 05 3E */ rlwimi r7, r23, 0, 0x14, 0x1f +/* 8037926C 003761CC 53 84 04 3E */ rlwimi r4, r28, 0, 0x10, 0x1f +/* 80379270 003761D0 57 C3 A0 16 */ slwi r3, r30, 0x14 +/* 80379274 003761D4 53 19 05 3E */ rlwimi r25, r24, 0, 0x14, 0x1f +/* 80379278 003761D8 55 29 80 1E */ slwi r9, r9, 0x10 +/* 8037927C 003761DC 53 6A 04 3E */ rlwimi r10, r27, 0, 0x10, 0x1f +/* 80379280 003761E0 50 83 03 3E */ rlwimi r3, r4, 0, 0xc, 0x1f +/* 80379284 003761E4 50 EC 04 3E */ rlwimi r12, r7, 0, 0x10, 0x1f +/* 80379288 003761E8 54 67 02 3E */ clrlwi r7, r3, 8 +/* 8037928C 003761EC 55 63 A0 16 */ slwi r3, r11, 0x14 +/* 80379290 003761F0 51 43 03 3E */ rlwimi r3, r10, 0, 0xc, 0x1f +/* 80379294 003761F4 54 64 02 3E */ clrlwi r4, r3, 8 +/* 80379298 003761F8 55 03 A0 16 */ slwi r3, r8, 0x14 +/* 8037929C 003761FC 53 29 04 3E */ rlwimi r9, r25, 0, 0x10, 0x1f +/* 803792A0 00376200 51 23 03 3E */ rlwimi r3, r9, 0, 0xc, 0x1f +/* 803792A4 00376204 54 00 A0 16 */ slwi r0, r0, 0x14 +/* 803792A8 00376208 51 80 03 3E */ rlwimi r0, r12, 0, 0xc, 0x1f +/* 803792AC 0037620C 54 63 02 3E */ clrlwi r3, r3, 8 +/* 803792B0 00376210 54 00 02 3E */ clrlwi r0, r0, 8 +/* 803792B4 00376214 64 E8 01 00 */ oris r8, r7, 0x100 +/* 803792B8 00376218 64 87 02 00 */ oris r7, r4, 0x200 +/* 803792BC 0037621C 64 69 03 00 */ oris r9, r3, 0x300 +/* 803792C0 00376220 64 0A 04 00 */ oris r10, r0, 0x400 +/* 803792C4 00376224 48 00 00 24 */ b lbl_803792E8 +lbl_803792C8: +/* 803792C8 00376228 3D 00 01 66 */ lis r8, 0x01666666@ha +/* 803792CC 0037622C 3C E0 02 66 */ lis r7, 0x02666666@ha +/* 803792D0 00376230 3C 80 03 66 */ lis r4, 0x03666666@ha +/* 803792D4 00376234 3C 60 04 66 */ lis r3, 0x04666666@ha +/* 803792D8 00376238 39 08 66 66 */ addi r8, r8, 0x01666666@l +/* 803792DC 0037623C 38 E7 66 66 */ addi r7, r7, 0x02666666@l +/* 803792E0 00376240 39 24 66 66 */ addi r9, r4, 0x03666666@l +/* 803792E4 00376244 39 43 66 66 */ addi r10, r3, 0x04666666@l +lbl_803792E8: +/* 803792E8 00376248 38 80 00 61 */ li r4, 0x61 +/* 803792EC 0037624C 3C 60 CC 01 */ lis r3, 0xCC008000@ha +/* 803792F0 00376250 98 83 80 00 */ stb r4, 0xCC008000@l(r3) +/* 803792F4 00376254 54 A0 06 3F */ clrlwi. r0, r5, 0x18 +/* 803792F8 00376258 91 03 80 00 */ stw r8, 0xCC008000@l(r3) +/* 803792FC 0037625C 98 83 80 00 */ stb r4, 0xCC008000@l(r3) +/* 80379300 00376260 90 E3 80 00 */ stw r7, 0xCC008000@l(r3) +/* 80379304 00376264 98 83 80 00 */ stb r4, 0xCC008000@l(r3) +/* 80379308 00376268 91 23 80 00 */ stw r9, 0xCC008000@l(r3) +/* 8037930C 0037626C 98 83 80 00 */ stb r4, 0xCC008000@l(r3) +/* 80379310 00376270 91 43 80 00 */ stw r10, 0xCC008000@l(r3) +/* 80379314 00376274 41 82 00 68 */ beq lbl_8037937C +/* 80379318 00376278 88 06 00 00 */ lbz r0, 0(r6) +/* 8037931C 0037627C 88 66 00 01 */ lbz r3, 1(r6) +/* 80379320 00376280 64 05 53 00 */ oris r5, r0, 0x5300 +/* 80379324 00376284 88 06 00 04 */ lbz r0, 4(r6) +/* 80379328 00376288 88 86 00 02 */ lbz r4, 2(r6) +/* 8037932C 0037628C 54 A7 06 A6 */ rlwinm r7, r5, 0, 0x1a, 0x13 +/* 80379330 00376290 54 65 30 32 */ slwi r5, r3, 6 +/* 80379334 00376294 88 66 00 05 */ lbz r3, 5(r6) +/* 80379338 00376298 7C E7 2B 78 */ or r7, r7, r5 +/* 8037933C 0037629C 64 08 54 00 */ oris r8, r0, 0x5400 +/* 80379340 003762A0 88 A6 00 03 */ lbz r5, 3(r6) +/* 80379344 003762A4 88 06 00 06 */ lbz r0, 6(r6) +/* 80379348 003762A8 54 E6 05 1A */ rlwinm r6, r7, 0, 0x14, 0xd +/* 8037934C 003762AC 54 84 60 26 */ slwi r4, r4, 0xc +/* 80379350 003762B0 7C C6 23 78 */ or r6, r6, r4 +/* 80379354 003762B4 55 04 06 A6 */ rlwinm r4, r8, 0, 0x1a, 0x13 +/* 80379358 003762B8 54 63 30 32 */ slwi r3, r3, 6 +/* 8037935C 003762BC 7C 83 1B 78 */ or r3, r4, r3 +/* 80379360 003762C0 54 C6 03 8E */ rlwinm r6, r6, 0, 0xe, 7 +/* 80379364 003762C4 54 A4 90 1A */ slwi r4, r5, 0x12 +/* 80379368 003762C8 54 63 05 1A */ rlwinm r3, r3, 0, 0x14, 0xd +/* 8037936C 003762CC 54 00 60 26 */ slwi r0, r0, 0xc +/* 80379370 003762D0 7C C6 23 78 */ or r6, r6, r4 +/* 80379374 003762D4 7C 67 03 78 */ or r7, r3, r0 +/* 80379378 003762D8 48 00 00 14 */ b lbl_8037938C +lbl_8037937C: +/* 8037937C 003762DC 3C 80 53 59 */ lis r4, 0x53595000@ha +/* 80379380 003762E0 3C 60 54 00 */ lis r3, 0x54000015@ha +/* 80379384 003762E4 38 C4 50 00 */ addi r6, r4, 0x53595000@l +/* 80379388 003762E8 38 E3 00 15 */ addi r7, r3, 0x54000015@l +lbl_8037938C: +/* 8037938C 003762EC 38 A0 00 61 */ li r5, 0x61 +/* 80379390 003762F0 80 62 CE 08 */ lwz r3, lbl_805AEB28@sda21(r2) +/* 80379394 003762F4 3C 80 CC 01 */ lis r4, 0xCC008000@ha +/* 80379398 003762F8 98 A4 80 00 */ stb r5, 0xCC008000@l(r4) +/* 8037939C 003762FC 38 00 00 00 */ li r0, 0 +/* 803793A0 00376300 90 C4 80 00 */ stw r6, 0xCC008000@l(r4) +/* 803793A4 00376304 98 A4 80 00 */ stb r5, 0xCC008000@l(r4) +/* 803793A8 00376308 90 E4 80 00 */ stw r7, 0xCC008000@l(r4) +/* 803793AC 0037630C B0 03 00 02 */ sth r0, 2(r3) +/* 803793B0 00376310 BA E1 00 2C */ lmw r23, 0x2c(r1) +/* 803793B4 00376314 38 21 00 50 */ addi r1, r1, 0x50 +/* 803793B8 00376318 4E 80 00 20 */ blr + +.global GXSetDispCopyGamma +GXSetDispCopyGamma: +/* 803793BC 0037631C 80 82 CE 08 */ lwz r4, lbl_805AEB28@sda21(r2) +/* 803793C0 00376320 54 60 38 30 */ slwi r0, r3, 7 +/* 803793C4 00376324 84 64 01 EC */ lwzu r3, 0x1ec(r4) +/* 803793C8 00376328 54 63 06 6C */ rlwinm r3, r3, 0, 0x19, 0x16 +/* 803793CC 0037632C 7C 60 03 78 */ or r0, r3, r0 +/* 803793D0 00376330 90 04 00 00 */ stw r0, 0(r4) +/* 803793D4 00376334 4E 80 00 20 */ blr + +.global GXCopyDisp +GXCopyDisp: +/* 803793D8 00376338 54 80 06 3F */ clrlwi. r0, r4, 0x18 +/* 803793DC 0037633C 41 82 00 3C */ beq lbl_80379418 +/* 803793E0 00376340 80 E2 CE 08 */ lwz r7, lbl_805AEB28@sda21(r2) +/* 803793E4 00376344 38 00 00 61 */ li r0, 0x61 +/* 803793E8 00376348 3C A0 CC 01 */ lis r5, 0xCC008000@ha +/* 803793EC 0037634C 80 C7 01 D8 */ lwz r6, 0x1d8(r7) +/* 803793F0 00376350 54 C6 00 3C */ rlwinm r6, r6, 0, 0, 0x1e +/* 803793F4 00376354 98 05 80 00 */ stb r0, 0xCC008000@l(r5) +/* 803793F8 00376358 60 C6 00 01 */ ori r6, r6, 1 +/* 803793FC 0037635C 54 C6 07 F6 */ rlwinm r6, r6, 0, 0x1f, 0x1b +/* 80379400 00376360 60 C6 00 0E */ ori r6, r6, 0xe +/* 80379404 00376364 90 C5 80 00 */ stw r6, 0xCC008000@l(r5) +/* 80379408 00376368 80 C7 01 D0 */ lwz r6, 0x1d0(r7) +/* 8037940C 0037636C 98 05 80 00 */ stb r0, 0xCC008000@l(r5) +/* 80379410 00376370 54 C0 00 3A */ rlwinm r0, r6, 0, 0, 0x1d +/* 80379414 00376374 90 05 80 00 */ stw r0, 0xCC008000@l(r5) +lbl_80379418: +/* 80379418 00376378 54 80 06 3F */ clrlwi. r0, r4, 0x18 +/* 8037941C 0037637C 38 00 00 00 */ li r0, 0 +/* 80379420 00376380 40 82 00 18 */ bne lbl_80379438 +/* 80379424 00376384 80 A2 CE 08 */ lwz r5, lbl_805AEB28@sda21(r2) +/* 80379428 00376388 80 A5 01 DC */ lwz r5, 0x1dc(r5) +/* 8037942C 0037638C 54 A5 07 7E */ clrlwi r5, r5, 0x1d +/* 80379430 00376390 28 05 00 03 */ cmplwi r5, 3 +/* 80379434 00376394 40 82 00 30 */ bne lbl_80379464 +lbl_80379438: +/* 80379438 00376398 80 A2 CE 08 */ lwz r5, lbl_805AEB28@sda21(r2) +/* 8037943C 0037639C 80 E5 01 DC */ lwz r7, 0x1dc(r5) +/* 80379440 003763A0 54 E5 D7 FE */ rlwinm r5, r7, 0x1a, 0x1f, 0x1f +/* 80379444 003763A4 28 05 00 01 */ cmplwi r5, 1 +/* 80379448 003763A8 40 82 00 1C */ bne lbl_80379464 +/* 8037944C 003763AC 38 00 00 61 */ li r0, 0x61 +/* 80379450 003763B0 3C C0 CC 01 */ lis r6, 0xCC008000@ha +/* 80379454 003763B4 98 06 80 00 */ stb r0, 0xCC008000@l(r6) +/* 80379458 003763B8 54 E5 06 B0 */ rlwinm r5, r7, 0, 0x1a, 0x18 +/* 8037945C 003763BC 38 00 00 01 */ li r0, 1 +/* 80379460 003763C0 90 A6 80 00 */ stw r5, 0xCC008000@l(r6) +lbl_80379464: +/* 80379464 003763C4 39 20 00 61 */ li r9, 0x61 +/* 80379468 003763C8 80 E2 CE 08 */ lwz r7, lbl_805AEB28@sda21(r2) +/* 8037946C 003763CC 3D 00 CC 01 */ lis r8, 0xCC008000@ha +/* 80379470 003763D0 99 28 80 00 */ stb r9, 0xCC008000@l(r8) +/* 80379474 003763D4 54 63 DA 3E */ rlwinm r3, r3, 0x1b, 8, 0x1f +/* 80379478 003763D8 64 6A 4B 00 */ oris r10, r3, 0x4b00 +/* 8037947C 003763DC 80 C7 01 E0 */ lwz r6, 0x1e0(r7) +/* 80379480 003763E0 54 85 06 3F */ clrlwi. r5, r4, 0x18 +/* 80379484 003763E4 54 83 5B 68 */ rlwinm r3, r4, 0xb, 0xd, 0x14 +/* 80379488 003763E8 90 C8 80 00 */ stw r6, 0xCC008000@l(r8) +/* 8037948C 003763EC 99 28 80 00 */ stb r9, 0xCC008000@l(r8) +/* 80379490 003763F0 80 87 01 E4 */ lwz r4, 0x1e4(r7) +/* 80379494 003763F4 90 88 80 00 */ stw r4, 0xCC008000@l(r8) +/* 80379498 003763F8 99 28 80 00 */ stb r9, 0xCC008000@l(r8) +/* 8037949C 003763FC 80 87 01 E8 */ lwz r4, 0x1e8(r7) +/* 803794A0 00376400 90 88 80 00 */ stw r4, 0xCC008000@l(r8) +/* 803794A4 00376404 99 28 80 00 */ stb r9, 0xCC008000@l(r8) +/* 803794A8 00376408 91 48 80 00 */ stw r10, 0xCC008000@l(r8) +/* 803794AC 0037640C 80 87 01 EC */ lwz r4, 0x1ec(r7) +/* 803794B0 00376410 54 84 05 66 */ rlwinm r4, r4, 0, 0x15, 0x13 +/* 803794B4 00376414 7C 83 1B 78 */ or r3, r4, r3 +/* 803794B8 00376418 90 67 01 EC */ stw r3, 0x1ec(r7) +/* 803794BC 0037641C 80 67 01 EC */ lwz r3, 0x1ec(r7) +/* 803794C0 00376420 54 63 04 A0 */ rlwinm r3, r3, 0, 0x12, 0x10 +/* 803794C4 00376424 60 63 40 00 */ ori r3, r3, 0x4000 +/* 803794C8 00376428 90 67 01 EC */ stw r3, 0x1ec(r7) +/* 803794CC 0037642C 80 67 01 EC */ lwz r3, 0x1ec(r7) +/* 803794D0 00376430 54 63 02 3E */ clrlwi r3, r3, 8 +/* 803794D4 00376434 64 63 52 00 */ oris r3, r3, 0x5200 +/* 803794D8 00376438 90 67 01 EC */ stw r3, 0x1ec(r7) +/* 803794DC 0037643C 99 28 80 00 */ stb r9, 0xCC008000@l(r8) +/* 803794E0 00376440 80 67 01 EC */ lwz r3, 0x1ec(r7) +/* 803794E4 00376444 90 68 80 00 */ stw r3, 0xCC008000@l(r8) +/* 803794E8 00376448 41 82 00 1C */ beq lbl_80379504 +/* 803794EC 0037644C 99 28 80 00 */ stb r9, 0xCC008000@l(r8) +/* 803794F0 00376450 80 67 01 D8 */ lwz r3, 0x1d8(r7) +/* 803794F4 00376454 90 68 80 00 */ stw r3, 0xCC008000@l(r8) +/* 803794F8 00376458 99 28 80 00 */ stb r9, 0xCC008000@l(r8) +/* 803794FC 0037645C 80 67 01 D0 */ lwz r3, 0x1d0(r7) +/* 80379500 00376460 90 68 80 00 */ stw r3, 0xCC008000@l(r8) +lbl_80379504: +/* 80379504 00376464 54 00 06 3F */ clrlwi. r0, r0, 0x18 +/* 80379508 00376468 41 82 00 1C */ beq lbl_80379524 +/* 8037950C 0037646C 38 00 00 61 */ li r0, 0x61 +/* 80379510 00376470 80 62 CE 08 */ lwz r3, lbl_805AEB28@sda21(r2) +/* 80379514 00376474 3C 80 CC 01 */ lis r4, 0xCC008000@ha +/* 80379518 00376478 98 04 80 00 */ stb r0, 0xCC008000@l(r4) +/* 8037951C 0037647C 80 03 01 DC */ lwz r0, 0x1dc(r3) +/* 80379520 00376480 90 04 80 00 */ stw r0, 0xCC008000@l(r4) +lbl_80379524: +/* 80379524 00376484 80 62 CE 08 */ lwz r3, lbl_805AEB28@sda21(r2) +/* 80379528 00376488 38 00 00 00 */ li r0, 0 +/* 8037952C 0037648C B0 03 00 02 */ sth r0, 2(r3) +/* 80379530 00376490 4E 80 00 20 */ blr + +.global GXCopyTex +GXCopyTex: +/* 80379534 00376494 54 80 06 3F */ clrlwi. r0, r4, 0x18 +/* 80379538 00376498 41 82 00 3C */ beq lbl_80379574 +/* 8037953C 0037649C 80 E2 CE 08 */ lwz r7, lbl_805AEB28@sda21(r2) +/* 80379540 003764A0 38 00 00 61 */ li r0, 0x61 +/* 80379544 003764A4 3C A0 CC 01 */ lis r5, 0xCC008000@ha +/* 80379548 003764A8 80 C7 01 D8 */ lwz r6, 0x1d8(r7) +/* 8037954C 003764AC 54 C6 00 3C */ rlwinm r6, r6, 0, 0, 0x1e +/* 80379550 003764B0 98 05 80 00 */ stb r0, 0xCC008000@l(r5) +/* 80379554 003764B4 60 C6 00 01 */ ori r6, r6, 1 +/* 80379558 003764B8 54 C6 07 F6 */ rlwinm r6, r6, 0, 0x1f, 0x1b +/* 8037955C 003764BC 60 C6 00 0E */ ori r6, r6, 0xe +/* 80379560 003764C0 90 C5 80 00 */ stw r6, 0xCC008000@l(r5) +/* 80379564 003764C4 80 C7 01 D0 */ lwz r6, 0x1d0(r7) +/* 80379568 003764C8 98 05 80 00 */ stb r0, 0xCC008000@l(r5) +/* 8037956C 003764CC 54 C0 00 3A */ rlwinm r0, r6, 0, 0, 0x1d +/* 80379570 003764D0 90 05 80 00 */ stw r0, 0xCC008000@l(r5) +lbl_80379574: +/* 80379574 003764D4 80 C2 CE 08 */ lwz r6, lbl_805AEB28@sda21(r2) +/* 80379578 003764D8 38 00 00 00 */ li r0, 0 +/* 8037957C 003764DC 88 A6 02 00 */ lbz r5, 0x200(r6) +/* 80379580 003764E0 80 E6 01 DC */ lwz r7, 0x1dc(r6) +/* 80379584 003764E4 28 05 00 00 */ cmplwi r5, 0 +/* 80379588 003764E8 41 82 00 1C */ beq lbl_803795A4 +/* 8037958C 003764EC 54 E5 07 7E */ clrlwi r5, r7, 0x1d +/* 80379590 003764F0 28 05 00 03 */ cmplwi r5, 3 +/* 80379594 003764F4 41 82 00 10 */ beq lbl_803795A4 +/* 80379598 003764F8 54 E0 00 38 */ rlwinm r0, r7, 0, 0, 0x1c +/* 8037959C 003764FC 60 07 00 03 */ ori r7, r0, 3 +/* 803795A0 00376500 38 00 00 01 */ li r0, 1 +lbl_803795A4: +/* 803795A4 00376504 54 85 06 3F */ clrlwi. r5, r4, 0x18 +/* 803795A8 00376508 40 82 00 10 */ bne lbl_803795B8 +/* 803795AC 0037650C 54 E5 07 7E */ clrlwi r5, r7, 0x1d +/* 803795B0 00376510 28 05 00 03 */ cmplwi r5, 3 +/* 803795B4 00376514 40 82 00 18 */ bne lbl_803795CC +lbl_803795B8: +/* 803795B8 00376518 54 E5 D7 FE */ rlwinm r5, r7, 0x1a, 0x1f, 0x1f +/* 803795BC 0037651C 28 05 00 01 */ cmplwi r5, 1 +/* 803795C0 00376520 40 82 00 0C */ bne lbl_803795CC +/* 803795C4 00376524 38 00 00 01 */ li r0, 1 +/* 803795C8 00376528 54 E7 06 B0 */ rlwinm r7, r7, 0, 0x1a, 0x18 +lbl_803795CC: +/* 803795CC 0037652C 54 05 06 3F */ clrlwi. r5, r0, 0x18 +/* 803795D0 00376530 41 82 00 14 */ beq lbl_803795E4 +/* 803795D4 00376534 38 C0 00 61 */ li r6, 0x61 +/* 803795D8 00376538 3C A0 CC 01 */ lis r5, 0xCC008000@ha +/* 803795DC 0037653C 98 C5 80 00 */ stb r6, 0xCC008000@l(r5) +/* 803795E0 00376540 90 E5 80 00 */ stw r7, 0xCC008000@l(r5) +lbl_803795E4: +/* 803795E4 00376544 39 20 00 61 */ li r9, 0x61 +/* 803795E8 00376548 80 E2 CE 08 */ lwz r7, lbl_805AEB28@sda21(r2) +/* 803795EC 0037654C 3D 00 CC 01 */ lis r8, 0xCC008000@ha +/* 803795F0 00376550 99 28 80 00 */ stb r9, 0xCC008000@l(r8) +/* 803795F4 00376554 54 63 DA 3E */ rlwinm r3, r3, 0x1b, 8, 0x1f +/* 803795F8 00376558 64 6A 4B 00 */ oris r10, r3, 0x4b00 +/* 803795FC 0037655C 80 C7 01 F0 */ lwz r6, 0x1f0(r7) +/* 80379600 00376560 54 85 06 3F */ clrlwi. r5, r4, 0x18 +/* 80379604 00376564 54 83 5B 68 */ rlwinm r3, r4, 0xb, 0xd, 0x14 +/* 80379608 00376568 90 C8 80 00 */ stw r6, 0xCC008000@l(r8) +/* 8037960C 0037656C 99 28 80 00 */ stb r9, 0xCC008000@l(r8) +/* 80379610 00376570 80 87 01 F4 */ lwz r4, 0x1f4(r7) +/* 80379614 00376574 90 88 80 00 */ stw r4, 0xCC008000@l(r8) +/* 80379618 00376578 99 28 80 00 */ stb r9, 0xCC008000@l(r8) +/* 8037961C 0037657C 80 87 01 F8 */ lwz r4, 0x1f8(r7) +/* 80379620 00376580 90 88 80 00 */ stw r4, 0xCC008000@l(r8) +/* 80379624 00376584 99 28 80 00 */ stb r9, 0xCC008000@l(r8) +/* 80379628 00376588 91 48 80 00 */ stw r10, 0xCC008000@l(r8) +/* 8037962C 0037658C 80 87 01 FC */ lwz r4, 0x1fc(r7) +/* 80379630 00376590 54 84 05 66 */ rlwinm r4, r4, 0, 0x15, 0x13 +/* 80379634 00376594 7C 83 1B 78 */ or r3, r4, r3 +/* 80379638 00376598 90 67 01 FC */ stw r3, 0x1fc(r7) +/* 8037963C 0037659C 80 67 01 FC */ lwz r3, 0x1fc(r7) +/* 80379640 003765A0 54 63 04 A0 */ rlwinm r3, r3, 0, 0x12, 0x10 +/* 80379644 003765A4 90 67 01 FC */ stw r3, 0x1fc(r7) +/* 80379648 003765A8 80 67 01 FC */ lwz r3, 0x1fc(r7) +/* 8037964C 003765AC 54 63 02 3E */ clrlwi r3, r3, 8 +/* 80379650 003765B0 64 63 52 00 */ oris r3, r3, 0x5200 +/* 80379654 003765B4 90 67 01 FC */ stw r3, 0x1fc(r7) +/* 80379658 003765B8 99 28 80 00 */ stb r9, 0xCC008000@l(r8) +/* 8037965C 003765BC 80 67 01 FC */ lwz r3, 0x1fc(r7) +/* 80379660 003765C0 90 68 80 00 */ stw r3, 0xCC008000@l(r8) +/* 80379664 003765C4 41 82 00 1C */ beq lbl_80379680 +/* 80379668 003765C8 99 28 80 00 */ stb r9, 0xCC008000@l(r8) +/* 8037966C 003765CC 80 67 01 D8 */ lwz r3, 0x1d8(r7) +/* 80379670 003765D0 90 68 80 00 */ stw r3, 0xCC008000@l(r8) +/* 80379674 003765D4 99 28 80 00 */ stb r9, 0xCC008000@l(r8) +/* 80379678 003765D8 80 67 01 D0 */ lwz r3, 0x1d0(r7) +/* 8037967C 003765DC 90 68 80 00 */ stw r3, 0xCC008000@l(r8) +lbl_80379680: +/* 80379680 003765E0 54 00 06 3F */ clrlwi. r0, r0, 0x18 +/* 80379684 003765E4 41 82 00 1C */ beq lbl_803796A0 +/* 80379688 003765E8 38 00 00 61 */ li r0, 0x61 +/* 8037968C 003765EC 80 62 CE 08 */ lwz r3, lbl_805AEB28@sda21(r2) +/* 80379690 003765F0 3C 80 CC 01 */ lis r4, 0xCC008000@ha +/* 80379694 003765F4 98 04 80 00 */ stb r0, 0xCC008000@l(r4) +/* 80379698 003765F8 80 03 01 DC */ lwz r0, 0x1dc(r3) +/* 8037969C 003765FC 90 04 80 00 */ stw r0, 0xCC008000@l(r4) +lbl_803796A0: +/* 803796A0 00376600 80 62 CE 08 */ lwz r3, lbl_805AEB28@sda21(r2) +/* 803796A4 00376604 38 00 00 00 */ li r0, 0 +/* 803796A8 00376608 B0 03 00 02 */ sth r0, 2(r3) +/* 803796AC 0037660C 4E 80 00 20 */ blr + +.global GXClearBoundingBox +GXClearBoundingBox: +/* 803796B0 00376610 38 C0 00 61 */ li r6, 0x61 +/* 803796B4 00376614 80 62 CE 08 */ lwz r3, lbl_805AEB28@sda21(r2) +/* 803796B8 00376618 3C A0 CC 01 */ lis r5, 0xCC008000@ha +/* 803796BC 0037661C 3C 80 55 00 */ lis r4, 0x550003FF@ha +/* 803796C0 00376620 98 C5 80 00 */ stb r6, 0xCC008000@l(r5) +/* 803796C4 00376624 38 04 03 FF */ addi r0, r4, 0x550003FF@l +/* 803796C8 00376628 90 05 80 00 */ stw r0, 0xCC008000@l(r5) +/* 803796CC 0037662C 3C 80 56 00 */ lis r4, 0x560003FF@ha +/* 803796D0 00376630 38 84 03 FF */ addi r4, r4, 0x560003FF@l +/* 803796D4 00376634 98 C5 80 00 */ stb r6, 0xCC008000@l(r5) +/* 803796D8 00376638 38 00 00 00 */ li r0, 0 +/* 803796DC 0037663C 90 85 80 00 */ stw r4, 0xCC008000@l(r5) +/* 803796E0 00376640 B0 03 00 02 */ sth r0, 2(r3) +/* 803796E4 00376644 4E 80 00 20 */ blr diff --git a/asm/Dolphin/GX/GXGeometry.s b/asm/Dolphin/GX/GXGeometry.s new file mode 100644 index 00000000..54bb7f3f --- /dev/null +++ b/asm/Dolphin/GX/GXGeometry.s @@ -0,0 +1,287 @@ +.include "macros.inc" + +.section .text, "ax" + +.global __GXSetDirtyState +__GXSetDirtyState: +/* 80378854 003757B4 7C 08 02 A6 */ mflr r0 +/* 80378858 003757B8 90 01 00 04 */ stw r0, 4(r1) +/* 8037885C 003757BC 94 21 FF F8 */ stwu r1, -8(r1) +/* 80378860 003757C0 80 62 CE 08 */ lwz r3, lbl_805AEB28@sda21(r2) +/* 80378864 003757C4 80 03 04 F4 */ lwz r0, 0x4f4(r3) +/* 80378868 003757C8 54 00 07 FF */ clrlwi. r0, r0, 0x1f +/* 8037886C 003757CC 41 82 00 08 */ beq lbl_80378874 +/* 80378870 003757D0 48 00 22 01 */ bl __GXSetSUTexRegs +lbl_80378874: +/* 80378874 003757D4 80 62 CE 08 */ lwz r3, lbl_805AEB28@sda21(r2) +/* 80378878 003757D8 80 03 04 F4 */ lwz r0, 0x4f4(r3) +/* 8037887C 003757DC 54 00 07 BD */ rlwinm. r0, r0, 0, 0x1e, 0x1e +/* 80378880 003757E0 41 82 00 08 */ beq lbl_80378888 +/* 80378884 003757E4 48 00 2A A5 */ bl __GXUpdateBPMask +lbl_80378888: +/* 80378888 003757E8 80 62 CE 08 */ lwz r3, lbl_805AEB28@sda21(r2) +/* 8037888C 003757EC 80 03 04 F4 */ lwz r0, 0x4f4(r3) +/* 80378890 003757F0 54 00 07 7B */ rlwinm. r0, r0, 0, 0x1d, 0x1d +/* 80378894 003757F4 41 82 00 08 */ beq lbl_8037889C +/* 80378898 003757F8 48 00 03 49 */ bl __GXSetGenMode +lbl_8037889C: +/* 8037889C 003757FC 80 62 CE 08 */ lwz r3, lbl_805AEB28@sda21(r2) +/* 803788A0 00375800 80 03 04 F4 */ lwz r0, 0x4f4(r3) +/* 803788A4 00375804 54 00 07 39 */ rlwinm. r0, r0, 0, 0x1c, 0x1c +/* 803788A8 00375808 41 82 00 08 */ beq lbl_803788B0 +/* 803788AC 0037580C 4B FF ED 31 */ bl __GXSetVCD +lbl_803788B0: +/* 803788B0 00375810 80 62 CE 08 */ lwz r3, lbl_805AEB28@sda21(r2) +/* 803788B4 00375814 80 03 04 F4 */ lwz r0, 0x4f4(r3) +/* 803788B8 00375818 54 00 06 F7 */ rlwinm. r0, r0, 0, 0x1b, 0x1b +/* 803788BC 0037581C 41 82 00 08 */ beq lbl_803788C4 +/* 803788C0 00375820 4B FF F5 9D */ bl __GXSetVAT +lbl_803788C4: +/* 803788C4 00375824 80 62 CE 08 */ lwz r3, lbl_805AEB28@sda21(r2) +/* 803788C8 00375828 80 03 04 F4 */ lwz r0, 0x4f4(r3) +/* 803788CC 0037582C 54 00 06 F9 */ rlwinm. r0, r0, 0, 0x1b, 0x1c +/* 803788D0 00375830 41 82 00 08 */ beq lbl_803788D8 +/* 803788D4 00375834 4B FF ED 5D */ bl __GXCalculateVLim +lbl_803788D8: +/* 803788D8 00375838 80 62 CE 08 */ lwz r3, lbl_805AEB28@sda21(r2) +/* 803788DC 0037583C 38 00 00 00 */ li r0, 0 +/* 803788E0 00375840 90 03 04 F4 */ stw r0, 0x4f4(r3) +/* 803788E4 00375844 80 01 00 0C */ lwz r0, 0xc(r1) +/* 803788E8 00375848 38 21 00 08 */ addi r1, r1, 8 +/* 803788EC 0037584C 7C 08 03 A6 */ mtlr r0 +/* 803788F0 00375850 4E 80 00 20 */ blr + +.global GXBegin +GXBegin: +/* 803788F4 00375854 7C 08 02 A6 */ mflr r0 +/* 803788F8 00375858 90 01 00 04 */ stw r0, 4(r1) +/* 803788FC 0037585C 94 21 FF D8 */ stwu r1, -0x28(r1) +/* 80378900 00375860 93 E1 00 24 */ stw r31, 0x24(r1) +/* 80378904 00375864 3B E5 00 00 */ addi r31, r5, 0 +/* 80378908 00375868 93 C1 00 20 */ stw r30, 0x20(r1) +/* 8037890C 0037586C 3B C4 00 00 */ addi r30, r4, 0 +/* 80378910 00375870 93 A1 00 1C */ stw r29, 0x1c(r1) +/* 80378914 00375874 3B A3 00 00 */ addi r29, r3, 0 +/* 80378918 00375878 80 C2 CE 08 */ lwz r6, lbl_805AEB28@sda21(r2) +/* 8037891C 0037587C 80 06 04 F4 */ lwz r0, 0x4f4(r6) +/* 80378920 00375880 28 00 00 00 */ cmplwi r0, 0 +/* 80378924 00375884 41 82 00 80 */ beq lbl_803789A4 +/* 80378928 00375888 54 00 07 FF */ clrlwi. r0, r0, 0x1f +/* 8037892C 0037588C 41 82 00 08 */ beq lbl_80378934 +/* 80378930 00375890 48 00 21 41 */ bl __GXSetSUTexRegs +lbl_80378934: +/* 80378934 00375894 80 62 CE 08 */ lwz r3, lbl_805AEB28@sda21(r2) +/* 80378938 00375898 80 03 04 F4 */ lwz r0, 0x4f4(r3) +/* 8037893C 0037589C 54 00 07 BD */ rlwinm. r0, r0, 0, 0x1e, 0x1e +/* 80378940 003758A0 41 82 00 08 */ beq lbl_80378948 +/* 80378944 003758A4 48 00 29 E5 */ bl __GXUpdateBPMask +lbl_80378948: +/* 80378948 003758A8 80 62 CE 08 */ lwz r3, lbl_805AEB28@sda21(r2) +/* 8037894C 003758AC 80 03 04 F4 */ lwz r0, 0x4f4(r3) +/* 80378950 003758B0 54 00 07 7B */ rlwinm. r0, r0, 0, 0x1d, 0x1d +/* 80378954 003758B4 41 82 00 08 */ beq lbl_8037895C +/* 80378958 003758B8 48 00 02 89 */ bl __GXSetGenMode +lbl_8037895C: +/* 8037895C 003758BC 80 62 CE 08 */ lwz r3, lbl_805AEB28@sda21(r2) +/* 80378960 003758C0 80 03 04 F4 */ lwz r0, 0x4f4(r3) +/* 80378964 003758C4 54 00 07 39 */ rlwinm. r0, r0, 0, 0x1c, 0x1c +/* 80378968 003758C8 41 82 00 08 */ beq lbl_80378970 +/* 8037896C 003758CC 4B FF EC 71 */ bl __GXSetVCD +lbl_80378970: +/* 80378970 003758D0 80 62 CE 08 */ lwz r3, lbl_805AEB28@sda21(r2) +/* 80378974 003758D4 80 03 04 F4 */ lwz r0, 0x4f4(r3) +/* 80378978 003758D8 54 00 06 F7 */ rlwinm. r0, r0, 0, 0x1b, 0x1b +/* 8037897C 003758DC 41 82 00 08 */ beq lbl_80378984 +/* 80378980 003758E0 4B FF F4 DD */ bl __GXSetVAT +lbl_80378984: +/* 80378984 003758E4 80 62 CE 08 */ lwz r3, lbl_805AEB28@sda21(r2) +/* 80378988 003758E8 80 03 04 F4 */ lwz r0, 0x4f4(r3) +/* 8037898C 003758EC 54 00 06 F9 */ rlwinm. r0, r0, 0, 0x1b, 0x1c +/* 80378990 003758F0 41 82 00 08 */ beq lbl_80378998 +/* 80378994 003758F4 4B FF EC 9D */ bl __GXCalculateVLim +lbl_80378998: +/* 80378998 003758F8 80 62 CE 08 */ lwz r3, lbl_805AEB28@sda21(r2) +/* 8037899C 003758FC 38 00 00 00 */ li r0, 0 +/* 803789A0 00375900 90 03 04 F4 */ stw r0, 0x4f4(r3) +lbl_803789A4: +/* 803789A4 00375904 80 62 CE 08 */ lwz r3, lbl_805AEB28@sda21(r2) +/* 803789A8 00375908 80 03 00 00 */ lwz r0, 0(r3) +/* 803789AC 0037590C 28 00 00 00 */ cmplwi r0, 0 +/* 803789B0 00375910 40 82 00 08 */ bne lbl_803789B8 +/* 803789B4 00375914 48 00 00 31 */ bl __GXSendFlushPrim +lbl_803789B8: +/* 803789B8 00375918 7F C0 EB 78 */ or r0, r30, r29 +/* 803789BC 0037591C 3C 60 CC 01 */ lis r3, 0xCC008000@ha +/* 803789C0 00375920 98 03 80 00 */ stb r0, 0xCC008000@l(r3) +/* 803789C4 00375924 B3 E3 80 00 */ sth r31, 0xCC008000@l(r3) +/* 803789C8 00375928 80 01 00 2C */ lwz r0, 0x2c(r1) +/* 803789CC 0037592C 83 E1 00 24 */ lwz r31, 0x24(r1) +/* 803789D0 00375930 83 C1 00 20 */ lwz r30, 0x20(r1) +/* 803789D4 00375934 83 A1 00 1C */ lwz r29, 0x1c(r1) +/* 803789D8 00375938 38 21 00 28 */ addi r1, r1, 0x28 +/* 803789DC 0037593C 7C 08 03 A6 */ mtlr r0 +/* 803789E0 00375940 4E 80 00 20 */ blr + +.global __GXSendFlushPrim +__GXSendFlushPrim: +/* 803789E4 00375944 80 62 CE 08 */ lwz r3, lbl_805AEB28@sda21(r2) +/* 803789E8 00375948 38 00 00 98 */ li r0, 0x98 +/* 803789EC 0037594C 3C A0 CC 01 */ lis r5, 0xCC008000@ha +/* 803789F0 00375950 A0 C3 00 04 */ lhz r6, 4(r3) +/* 803789F4 00375954 38 80 00 00 */ li r4, 0 +/* 803789F8 00375958 A0 63 00 06 */ lhz r3, 6(r3) +/* 803789FC 0037595C 7C E6 19 D6 */ mullw r7, r6, r3 +/* 80378A00 00375960 98 05 80 00 */ stb r0, 0xCC008000@l(r5) +/* 80378A04 00375964 B0 C5 80 00 */ sth r6, 0xCC008000@l(r5) +/* 80378A08 00375968 38 67 00 03 */ addi r3, r7, 3 +/* 80378A0C 0037596C 28 07 00 00 */ cmplwi r7, 0 +/* 80378A10 00375970 54 63 F0 BE */ srwi r3, r3, 2 +/* 80378A14 00375974 40 81 00 48 */ ble lbl_80378A5C +/* 80378A18 00375978 54 60 E8 FF */ rlwinm. r0, r3, 0x1d, 3, 0x1f +/* 80378A1C 0037597C 7C 09 03 A6 */ mtctr r0 +/* 80378A20 00375980 41 82 00 30 */ beq lbl_80378A50 +lbl_80378A24: +/* 80378A24 00375984 90 85 80 00 */ stw r4, 0xCC008000@l(r5) +/* 80378A28 00375988 90 85 80 00 */ stw r4, 0xCC008000@l(r5) +/* 80378A2C 0037598C 90 85 80 00 */ stw r4, 0xCC008000@l(r5) +/* 80378A30 00375990 90 85 80 00 */ stw r4, 0xCC008000@l(r5) +/* 80378A34 00375994 90 85 80 00 */ stw r4, 0xCC008000@l(r5) +/* 80378A38 00375998 90 85 80 00 */ stw r4, 0xCC008000@l(r5) +/* 80378A3C 0037599C 90 85 80 00 */ stw r4, 0xCC008000@l(r5) +/* 80378A40 003759A0 90 85 80 00 */ stw r4, 0xCC008000@l(r5) +/* 80378A44 003759A4 42 00 FF E0 */ bdnz lbl_80378A24 +/* 80378A48 003759A8 70 63 00 07 */ andi. r3, r3, 7 +/* 80378A4C 003759AC 41 82 00 10 */ beq lbl_80378A5C +lbl_80378A50: +/* 80378A50 003759B0 7C 69 03 A6 */ mtctr r3 +lbl_80378A54: +/* 80378A54 003759B4 90 85 80 00 */ stw r4, 0xCC008000@l(r5) +/* 80378A58 003759B8 42 00 FF FC */ bdnz lbl_80378A54 +lbl_80378A5C: +/* 80378A5C 003759BC 80 62 CE 08 */ lwz r3, lbl_805AEB28@sda21(r2) +/* 80378A60 003759C0 38 00 00 01 */ li r0, 1 +/* 80378A64 003759C4 B0 03 00 02 */ sth r0, 2(r3) +/* 80378A68 003759C8 4E 80 00 20 */ blr + +.global GXSetLineWidth +GXSetLineWidth: +/* 80378A6C 003759CC 80 E2 CE 08 */ lwz r7, lbl_805AEB28@sda21(r2) +/* 80378A70 003759D0 54 86 80 1E */ slwi r6, r4, 0x10 +/* 80378A74 003759D4 38 A0 00 61 */ li r5, 0x61 +/* 80378A78 003759D8 80 07 00 7C */ lwz r0, 0x7c(r7) +/* 80378A7C 003759DC 3C 80 CC 01 */ lis r4, 0xCC008000@ha +/* 80378A80 003759E0 54 00 00 2E */ rlwinm r0, r0, 0, 0, 0x17 +/* 80378A84 003759E4 50 60 06 3E */ rlwimi r0, r3, 0, 0x18, 0x1f +/* 80378A88 003759E8 90 07 00 7C */ stw r0, 0x7c(r7) +/* 80378A8C 003759EC 38 00 00 00 */ li r0, 0 +/* 80378A90 003759F0 80 67 00 7C */ lwz r3, 0x7c(r7) +/* 80378A94 003759F4 54 63 04 18 */ rlwinm r3, r3, 0, 0x10, 0xc +/* 80378A98 003759F8 7C 63 33 78 */ or r3, r3, r6 +/* 80378A9C 003759FC 90 67 00 7C */ stw r3, 0x7c(r7) +/* 80378AA0 00375A00 98 A4 80 00 */ stb r5, 0xCC008000@l(r4) +/* 80378AA4 00375A04 80 67 00 7C */ lwz r3, 0x7c(r7) +/* 80378AA8 00375A08 90 64 80 00 */ stw r3, 0xCC008000@l(r4) +/* 80378AAC 00375A0C B0 07 00 02 */ sth r0, 2(r7) +/* 80378AB0 00375A10 4E 80 00 20 */ blr + +.global GXSetPointSize +GXSetPointSize: +/* 80378AB4 00375A14 80 E2 CE 08 */ lwz r7, lbl_805AEB28@sda21(r2) +/* 80378AB8 00375A18 54 86 98 18 */ slwi r6, r4, 0x13 +/* 80378ABC 00375A1C 38 A0 00 61 */ li r5, 0x61 +/* 80378AC0 00375A20 80 07 00 7C */ lwz r0, 0x7c(r7) +/* 80378AC4 00375A24 3C 80 CC 01 */ lis r4, 0xCC008000@ha +/* 80378AC8 00375A28 54 00 06 1E */ rlwinm r0, r0, 0, 0x18, 0xf +/* 80378ACC 00375A2C 50 60 44 2E */ rlwimi r0, r3, 8, 0x10, 0x17 +/* 80378AD0 00375A30 90 07 00 7C */ stw r0, 0x7c(r7) +/* 80378AD4 00375A34 38 00 00 00 */ li r0, 0 +/* 80378AD8 00375A38 80 67 00 7C */ lwz r3, 0x7c(r7) +/* 80378ADC 00375A3C 54 63 03 52 */ rlwinm r3, r3, 0, 0xd, 9 +/* 80378AE0 00375A40 7C 63 33 78 */ or r3, r3, r6 +/* 80378AE4 00375A44 90 67 00 7C */ stw r3, 0x7c(r7) +/* 80378AE8 00375A48 98 A4 80 00 */ stb r5, 0xCC008000@l(r4) +/* 80378AEC 00375A4C 80 67 00 7C */ lwz r3, 0x7c(r7) +/* 80378AF0 00375A50 90 64 80 00 */ stw r3, 0xCC008000@l(r4) +/* 80378AF4 00375A54 B0 07 00 02 */ sth r0, 2(r7) +/* 80378AF8 00375A58 4E 80 00 20 */ blr + +.global GXEnableTexOffsets +GXEnableTexOffsets: +/* 80378AFC 00375A5C 80 C2 CE 08 */ lwz r6, lbl_805AEB28@sda21(r2) +/* 80378B00 00375A60 54 68 10 3A */ slwi r8, r3, 2 +/* 80378B04 00375A64 7C E6 42 14 */ add r7, r6, r8 +/* 80378B08 00375A68 80 07 00 B8 */ lwz r0, 0xb8(r7) +/* 80378B0C 00375A6C 7D 26 42 14 */ add r9, r6, r8 +/* 80378B10 00375A70 54 03 03 98 */ rlwinm r3, r0, 0, 0xe, 0xc +/* 80378B14 00375A74 54 80 91 9A */ rlwinm r0, r4, 0x12, 6, 0xd +/* 80378B18 00375A78 7C 60 03 78 */ or r0, r3, r0 +/* 80378B1C 00375A7C 90 07 00 B8 */ stw r0, 0xb8(r7) +/* 80378B20 00375A80 54 A0 99 58 */ rlwinm r0, r5, 0x13, 5, 0xc +/* 80378B24 00375A84 38 A0 00 61 */ li r5, 0x61 +/* 80378B28 00375A88 80 69 00 B8 */ lwz r3, 0xb8(r9) +/* 80378B2C 00375A8C 3C 80 CC 01 */ lis r4, 0xCC008000@ha +/* 80378B30 00375A90 54 63 03 56 */ rlwinm r3, r3, 0, 0xd, 0xb +/* 80378B34 00375A94 7C 60 03 78 */ or r0, r3, r0 +/* 80378B38 00375A98 90 09 00 B8 */ stw r0, 0xb8(r9) +/* 80378B3C 00375A9C 7C 66 42 14 */ add r3, r6, r8 +/* 80378B40 00375AA0 38 00 00 00 */ li r0, 0 +/* 80378B44 00375AA4 98 A4 80 00 */ stb r5, 0xCC008000@l(r4) +/* 80378B48 00375AA8 80 63 00 B8 */ lwz r3, 0xb8(r3) +/* 80378B4C 00375AAC 90 64 80 00 */ stw r3, 0xCC008000@l(r4) +/* 80378B50 00375AB0 B0 06 00 02 */ sth r0, 2(r6) +/* 80378B54 00375AB4 4E 80 00 20 */ blr + +.global GXSetCullMode +GXSetCullMode: +/* 80378B58 00375AB8 2C 03 00 02 */ cmpwi r3, 2 +/* 80378B5C 00375ABC 41 82 00 1C */ beq lbl_80378B78 +/* 80378B60 00375AC0 40 80 00 1C */ bge lbl_80378B7C +/* 80378B64 00375AC4 2C 03 00 01 */ cmpwi r3, 1 +/* 80378B68 00375AC8 40 80 00 08 */ bge lbl_80378B70 +/* 80378B6C 00375ACC 48 00 00 10 */ b lbl_80378B7C +lbl_80378B70: +/* 80378B70 00375AD0 38 60 00 02 */ li r3, 2 +/* 80378B74 00375AD4 48 00 00 08 */ b lbl_80378B7C +lbl_80378B78: +/* 80378B78 00375AD8 38 60 00 01 */ li r3, 1 +lbl_80378B7C: +/* 80378B7C 00375ADC 80 82 CE 08 */ lwz r4, lbl_805AEB28@sda21(r2) +/* 80378B80 00375AE0 54 60 70 22 */ slwi r0, r3, 0xe +/* 80378B84 00375AE4 80 64 02 04 */ lwz r3, 0x204(r4) +/* 80378B88 00375AE8 54 63 04 9E */ rlwinm r3, r3, 0, 0x12, 0xf +/* 80378B8C 00375AEC 7C 60 03 78 */ or r0, r3, r0 +/* 80378B90 00375AF0 90 04 02 04 */ stw r0, 0x204(r4) +/* 80378B94 00375AF4 80 04 04 F4 */ lwz r0, 0x4f4(r4) +/* 80378B98 00375AF8 60 00 00 04 */ ori r0, r0, 4 +/* 80378B9C 00375AFC 90 04 04 F4 */ stw r0, 0x4f4(r4) +/* 80378BA0 00375B00 4E 80 00 20 */ blr + +.global GXSetCoPlanar +GXSetCoPlanar: +/* 80378BA4 00375B04 80 C2 CE 08 */ lwz r6, lbl_805AEB28@sda21(r2) +/* 80378BA8 00375B08 54 60 99 58 */ rlwinm r0, r3, 0x13, 5, 0xc +/* 80378BAC 00375B0C 38 80 00 61 */ li r4, 0x61 +/* 80378BB0 00375B10 80 A6 02 04 */ lwz r5, 0x204(r6) +/* 80378BB4 00375B14 3C 60 CC 01 */ lis r3, 0xCC008000@ha +/* 80378BB8 00375B18 54 A5 03 56 */ rlwinm r5, r5, 0, 0xd, 0xb +/* 80378BBC 00375B1C 7C A0 03 78 */ or r0, r5, r0 +/* 80378BC0 00375B20 90 06 02 04 */ stw r0, 0x204(r6) +/* 80378BC4 00375B24 3C 00 FE 08 */ lis r0, 0xfe08 +/* 80378BC8 00375B28 98 83 80 00 */ stb r4, 0xCC008000@l(r3) +/* 80378BCC 00375B2C 90 03 80 00 */ stw r0, 0xCC008000@l(r3) +/* 80378BD0 00375B30 98 83 80 00 */ stb r4, 0xCC008000@l(r3) +/* 80378BD4 00375B34 80 06 02 04 */ lwz r0, 0x204(r6) +/* 80378BD8 00375B38 90 03 80 00 */ stw r0, 0xCC008000@l(r3) +/* 80378BDC 00375B3C 4E 80 00 20 */ blr + +.global __GXSetGenMode +__GXSetGenMode: +/* 80378BE0 00375B40 38 00 00 61 */ li r0, 0x61 +/* 80378BE4 00375B44 80 82 CE 08 */ lwz r4, lbl_805AEB28@sda21(r2) +/* 80378BE8 00375B48 3C A0 CC 01 */ lis r5, 0xCC008000@ha +/* 80378BEC 00375B4C 98 05 80 00 */ stb r0, 0xCC008000@l(r5) +/* 80378BF0 00375B50 38 00 00 00 */ li r0, 0 +/* 80378BF4 00375B54 80 64 02 04 */ lwz r3, 0x204(r4) +/* 80378BF8 00375B58 90 65 80 00 */ stw r3, 0xCC008000@l(r5) +/* 80378BFC 00375B5C B0 04 00 02 */ sth r0, 2(r4) +/* 80378C00 00375B60 4E 80 00 20 */ blr diff --git a/asm/Dolphin/GX/GXInit.s b/asm/Dolphin/GX/GXInit.s new file mode 100644 index 00000000..939c987e --- /dev/null +++ b/asm/Dolphin/GX/GXInit.s @@ -0,0 +1,1203 @@ +.include "macros.inc" + +.section .text, "ax" + +.global __GXDefaultTexRegionCallback +__GXDefaultTexRegionCallback: +/* 803750AC 0037200C 7C 08 02 A6 */ mflr r0 +/* 803750B0 00372010 90 01 00 04 */ stw r0, 4(r1) +/* 803750B4 00372014 94 21 FF F8 */ stwu r1, -8(r1) +/* 803750B8 00372018 48 00 52 3D */ bl GXGetTexObjFmt +/* 803750BC 0037201C 2C 03 00 08 */ cmpwi r3, 8 +/* 803750C0 00372020 41 82 00 38 */ beq lbl_803750F8 +/* 803750C4 00372024 2C 03 00 09 */ cmpwi r3, 9 +/* 803750C8 00372028 41 82 00 30 */ beq lbl_803750F8 +/* 803750CC 0037202C 2C 03 00 0A */ cmpwi r3, 0xa +/* 803750D0 00372030 41 82 00 28 */ beq lbl_803750F8 +/* 803750D4 00372034 80 A2 CE 08 */ lwz r5, lbl_805AEB28@sda21(r2) +/* 803750D8 00372038 80 65 02 C8 */ lwz r3, 0x2c8(r5) +/* 803750DC 0037203C 54 60 07 7E */ clrlwi r0, r3, 0x1d +/* 803750E0 00372040 38 83 00 01 */ addi r4, r3, 1 +/* 803750E4 00372044 54 03 20 36 */ slwi r3, r0, 4 +/* 803750E8 00372048 90 85 02 C8 */ stw r4, 0x2c8(r5) +/* 803750EC 0037204C 38 63 02 08 */ addi r3, r3, 0x208 +/* 803750F0 00372050 7C 65 1A 14 */ add r3, r5, r3 +/* 803750F4 00372054 48 00 00 24 */ b lbl_80375118 +lbl_803750F8: +/* 803750F8 00372058 80 A2 CE 08 */ lwz r5, lbl_805AEB28@sda21(r2) +/* 803750FC 0037205C 80 65 02 CC */ lwz r3, 0x2cc(r5) +/* 80375100 00372060 54 60 07 BE */ clrlwi r0, r3, 0x1e +/* 80375104 00372064 38 83 00 01 */ addi r4, r3, 1 +/* 80375108 00372068 54 03 20 36 */ slwi r3, r0, 4 +/* 8037510C 0037206C 90 85 02 CC */ stw r4, 0x2cc(r5) +/* 80375110 00372070 38 63 02 88 */ addi r3, r3, 0x288 +/* 80375114 00372074 7C 65 1A 14 */ add r3, r5, r3 +lbl_80375118: +/* 80375118 00372078 80 01 00 0C */ lwz r0, 0xc(r1) +/* 8037511C 0037207C 38 21 00 08 */ addi r1, r1, 8 +/* 80375120 00372080 7C 08 03 A6 */ mtlr r0 +/* 80375124 00372084 4E 80 00 20 */ blr + +.global __GXDefaultTlutRegionCallback +__GXDefaultTlutRegionCallback: +/* 80375128 00372088 28 03 00 14 */ cmplwi r3, 0x14 +/* 8037512C 0037208C 41 80 00 0C */ blt lbl_80375138 +/* 80375130 00372090 38 60 00 00 */ li r3, 0 +/* 80375134 00372094 48 00 00 14 */ b sub_80375148 +lbl_80375138: +/* 80375138 00372098 54 63 20 36 */ slwi r3, r3, 4 +/* 8037513C 0037209C 80 02 CE 08 */ lwz r0, lbl_805AEB28@sda21(r2) +/* 80375140 003720A0 38 63 02 D0 */ addi r3, r3, 0x2d0 +/* 80375144 003720A4 7C 60 1A 14 */ add r3, r0, r3 + +.global sub_80375148 +sub_80375148: +/* 80375148 003720A8 4E 80 00 20 */ blr + +.global GXInit +GXInit: +/* 8037514C 003720AC 7C 08 02 A6 */ mflr r0 +/* 80375150 003720B0 90 01 00 04 */ stw r0, 4(r1) +/* 80375154 003720B4 94 21 FF B0 */ stwu r1, -0x50(r1) +/* 80375158 003720B8 BF 21 00 34 */ stmw r25, 0x34(r1) +/* 8037515C 003720BC 7C 7A 1B 78 */ mr r26, r3 +/* 80375160 003720C0 7C 99 23 78 */ mr r25, r4 +/* 80375164 003720C4 3C 80 80 54 */ lis r4, lbl_80540C88@ha +/* 80375168 003720C8 80 6D 9F 08 */ lwz r3, lbl_805A8AC8@sda21(r13) +/* 8037516C 003720CC 3B C4 0C 88 */ addi r30, r4, lbl_80540C88@l +/* 80375170 003720D0 48 00 8E C9 */ bl OSRegisterVersion +/* 80375174 003720D4 80 A2 CE 08 */ lwz r5, lbl_805AEB28@sda21(r2) +/* 80375178 003720D8 3B E0 00 00 */ li r31, 0 +/* 8037517C 003720DC 38 00 00 01 */ li r0, 1 +/* 80375180 003720E0 9B E5 04 F0 */ stb r31, 0x4f0(r5) +/* 80375184 003720E4 38 60 00 01 */ li r3, 1 +/* 80375188 003720E8 38 80 00 00 */ li r4, 0 +/* 8037518C 003720EC 98 05 04 F1 */ stb r0, 0x4f1(r5) +/* 80375190 003720F0 93 E5 04 DC */ stw r31, 0x4dc(r5) +/* 80375194 003720F4 93 E5 04 E0 */ stw r31, 0x4e0(r5) +/* 80375198 003720F8 48 00 31 0D */ bl GXSetMisc +/* 8037519C 003720FC 3C 80 CC 00 */ lis r4, 0xCC003000@ha +/* 803751A0 00372100 38 A4 30 00 */ addi r5, r4, 0xCC003000@l +/* 803751A4 00372104 90 8D AC 7C */ stw r4, lbl_805A983C@sda21(r13) +/* 803751A8 00372108 38 64 10 00 */ addi r3, r4, 0x1000 +/* 803751AC 0037210C 38 04 40 00 */ addi r0, r4, 0x4000 +/* 803751B0 00372110 90 AD AC 78 */ stw r5, lbl_805A9838@sda21(r13) +/* 803751B4 00372114 90 6D AC 80 */ stw r3, lbl_805A9840@sda21(r13) +/* 803751B8 00372118 90 0D AC 84 */ stw r0, lbl_805A9844@sda21(r13) +/* 803751BC 0037211C 48 00 17 25 */ bl __GXFifoInit +/* 803751C0 00372120 7F 44 D3 78 */ mr r4, r26 +/* 803751C4 00372124 7F 25 CB 78 */ mr r5, r25 +/* 803751C8 00372128 38 7E 04 F8 */ addi r3, r30, 0x4f8 +/* 803751CC 0037212C 48 00 11 E5 */ bl GXInitFifoBase +/* 803751D0 00372130 38 7E 04 F8 */ addi r3, r30, 0x4f8 +/* 803751D4 00372134 48 00 12 C5 */ bl GXSetCPUFifo +/* 803751D8 00372138 38 7E 04 F8 */ addi r3, r30, 0x4f8 +/* 803751DC 0037213C 48 00 13 CD */ bl GXSetGPFifo +/* 803751E0 00372140 48 00 35 F5 */ bl __GXPEInit +/* 803751E4 00372144 4B FF A6 8D */ bl PPCMfhid2 +/* 803751E8 00372148 3C 80 0C 01 */ lis r4, 0x0C008000@ha +/* 803751EC 0037214C 7C 7A 1B 78 */ mr r26, r3 +/* 803751F0 00372150 38 64 80 00 */ addi r3, r4, 0x0C008000@l +/* 803751F4 00372154 4B FF A6 99 */ bl PPCMtwpar +/* 803751F8 00372158 67 43 40 00 */ oris r3, r26, 0x4000 +/* 803751FC 0037215C 4B FF A6 7D */ bl PPCMthid2 +/* 80375200 00372160 80 C2 CE 08 */ lwz r6, lbl_805AEB28@sda21(r2) +/* 80375204 00372164 38 00 00 FF */ li r0, 0xff +/* 80375208 00372168 39 00 00 00 */ li r8, 0 +/* 8037520C 0037216C 93 E6 02 04 */ stw r31, 0x204(r6) +/* 80375210 00372170 38 86 02 04 */ addi r4, r6, 0x204 +/* 80375214 00372174 38 E6 01 24 */ addi r7, r6, 0x124 +/* 80375218 00372178 80 64 00 00 */ lwz r3, 0(r4) +/* 8037521C 0037217C 39 26 00 7C */ addi r9, r6, 0x7c +/* 80375220 00372180 38 A0 00 C1 */ li r5, 0xc1 +/* 80375224 00372184 54 63 02 3E */ clrlwi r3, r3, 8 +/* 80375228 00372188 90 64 00 00 */ stw r3, 0(r4) +/* 8037522C 0037218C 38 80 00 C0 */ li r4, 0xc0 +/* 80375230 00372190 90 06 01 24 */ stw r0, 0x124(r6) +/* 80375234 00372194 80 07 00 00 */ lwz r0, 0(r7) +/* 80375238 00372198 54 00 02 3E */ clrlwi r0, r0, 8 +/* 8037523C 0037219C 64 00 0F 00 */ oris r0, r0, 0xf00 +/* 80375240 003721A0 90 07 00 00 */ stw r0, 0(r7) +/* 80375244 003721A4 93 E6 00 7C */ stw r31, 0x7c(r6) +/* 80375248 003721A8 80 09 00 00 */ lwz r0, 0(r9) +/* 8037524C 003721AC 54 00 02 3E */ clrlwi r0, r0, 8 +/* 80375250 003721B0 64 00 22 00 */ oris r0, r0, 0x2200 +/* 80375254 003721B4 90 09 00 00 */ stw r0, 0(r9) +/* 80375258 003721B8 48 00 00 04 */ b lbl_8037525C +lbl_8037525C: +/* 8037525C 003721BC 38 00 00 08 */ li r0, 8 +/* 80375260 003721C0 7C 09 03 A6 */ mtctr r0 +/* 80375264 003721C4 48 00 00 04 */ b lbl_80375268 +lbl_80375268: +/* 80375268 003721C8 48 00 00 04 */ b lbl_8037526C +lbl_8037526C: +/* 8037526C 003721CC 80 62 CE 08 */ lwz r3, lbl_805AEB28@sda21(r2) +/* 80375270 003721D0 55 06 F8 7E */ srwi r6, r8, 1 +/* 80375274 003721D4 3B 9F 01 30 */ addi r28, r31, 0x130 +/* 80375278 003721D8 38 00 00 00 */ li r0, 0 +/* 8037527C 003721DC 3B 5F 01 70 */ addi r26, r31, 0x170 +/* 80375280 003721E0 7C 03 E1 2E */ stwx r0, r3, r28 +/* 80375284 003721E4 54 CA 10 3A */ slwi r10, r6, 2 +/* 80375288 003721E8 3B 6A 01 00 */ addi r27, r10, 0x100 +/* 8037528C 003721EC 7C 03 D1 2E */ stwx r0, r3, r26 +/* 80375290 003721F0 39 3F 04 9C */ addi r9, r31, 0x49c +/* 80375294 003721F4 7C 03 D9 2E */ stwx r0, r3, r27 +/* 80375298 003721F8 3B A0 00 FF */ li r29, 0xff +/* 8037529C 003721FC 54 8C C0 0E */ slwi r12, r4, 0x18 +/* 803752A0 00372200 7F A3 49 2E */ stwx r29, r3, r9 +/* 803752A4 00372204 7F 23 E2 14 */ add r25, r3, r28 +/* 803752A8 00372208 3B FF 00 04 */ addi r31, r31, 4 +/* 803752AC 0037220C 83 99 00 00 */ lwz r28, 0(r25) +/* 803752B0 00372210 7F 43 D2 14 */ add r26, r3, r26 +/* 803752B4 00372214 54 AB C0 0E */ slwi r11, r5, 0x18 +/* 803752B8 00372218 57 9C 02 3E */ clrlwi r28, r28, 8 +/* 803752BC 0037221C 7F 8C 63 78 */ or r12, r28, r12 +/* 803752C0 00372220 91 99 00 00 */ stw r12, 0(r25) +/* 803752C4 00372224 38 EA 01 B0 */ addi r7, r10, 0x1b0 +/* 803752C8 00372228 39 46 00 F6 */ addi r10, r6, 0xf6 +/* 803752CC 0037222C 81 9A 00 00 */ lwz r12, 0(r26) +/* 803752D0 00372230 39 26 00 28 */ addi r9, r6, 0x28 +/* 803752D4 00372234 3B 9F 01 30 */ addi r28, r31, 0x130 +/* 803752D8 00372238 55 86 02 3E */ clrlwi r6, r12, 8 +/* 803752DC 0037223C 7C C6 5B 78 */ or r6, r6, r11 +/* 803752E0 00372240 90 DA 00 00 */ stw r6, 0(r26) +/* 803752E4 00372244 7C E3 3A 14 */ add r7, r3, r7 +/* 803752E8 00372248 39 08 00 01 */ addi r8, r8, 1 +/* 803752EC 0037224C 81 67 00 00 */ lwz r11, 0(r7) +/* 803752F0 00372250 55 06 F8 7E */ srwi r6, r8, 1 +/* 803752F4 00372254 55 4A C0 0E */ slwi r10, r10, 0x18 +/* 803752F8 00372258 55 6B 02 3E */ clrlwi r11, r11, 8 +/* 803752FC 0037225C 7D 6A 53 78 */ or r10, r11, r10 +/* 80375300 00372260 91 47 00 00 */ stw r10, 0(r7) +/* 80375304 00372264 7F 23 DA 14 */ add r25, r3, r27 +/* 80375308 00372268 54 CA 10 3A */ slwi r10, r6, 2 +/* 8037530C 0037226C 80 F9 00 00 */ lwz r7, 0(r25) +/* 80375310 00372270 55 29 C0 0E */ slwi r9, r9, 0x18 +/* 80375314 00372274 3B 5F 01 70 */ addi r26, r31, 0x170 +/* 80375318 00372278 54 E7 02 3E */ clrlwi r7, r7, 8 +/* 8037531C 0037227C 7C E7 4B 78 */ or r7, r7, r9 +/* 80375320 00372280 90 F9 00 00 */ stw r7, 0(r25) +/* 80375324 00372284 3B 6A 01 00 */ addi r27, r10, 0x100 +/* 80375328 00372288 39 3F 04 9C */ addi r9, r31, 0x49c +/* 8037532C 0037228C 7C 03 E1 2E */ stwx r0, r3, r28 +/* 80375330 00372290 38 84 00 02 */ addi r4, r4, 2 +/* 80375334 00372294 54 8C C0 0E */ slwi r12, r4, 0x18 +/* 80375338 00372298 7C 03 D1 2E */ stwx r0, r3, r26 +/* 8037533C 0037229C 38 A5 00 02 */ addi r5, r5, 2 +/* 80375340 003722A0 54 AB C0 0E */ slwi r11, r5, 0x18 +/* 80375344 003722A4 7C 03 D9 2E */ stwx r0, r3, r27 +/* 80375348 003722A8 38 EA 01 B0 */ addi r7, r10, 0x1b0 +/* 8037534C 003722AC 39 46 00 F6 */ addi r10, r6, 0xf6 +/* 80375350 003722B0 7F A3 49 2E */ stwx r29, r3, r9 +/* 80375354 003722B4 7F 23 E2 14 */ add r25, r3, r28 +/* 80375358 003722B8 39 26 00 28 */ addi r9, r6, 0x28 +/* 8037535C 003722BC 83 99 00 00 */ lwz r28, 0(r25) +/* 80375360 003722C0 7F 43 D2 14 */ add r26, r3, r26 +/* 80375364 003722C4 7C E3 3A 14 */ add r7, r3, r7 +/* 80375368 003722C8 57 9C 02 3E */ clrlwi r28, r28, 8 +/* 8037536C 003722CC 7F 8C 63 78 */ or r12, r28, r12 +/* 80375370 003722D0 91 99 00 00 */ stw r12, 0(r25) +/* 80375374 003722D4 55 4A C0 0E */ slwi r10, r10, 0x18 +/* 80375378 003722D8 7F 23 DA 14 */ add r25, r3, r27 +/* 8037537C 003722DC 81 9A 00 00 */ lwz r12, 0(r26) +/* 80375380 003722E0 55 29 C0 0E */ slwi r9, r9, 0x18 +/* 80375384 003722E4 3B FF 00 04 */ addi r31, r31, 4 +/* 80375388 003722E8 55 86 02 3E */ clrlwi r6, r12, 8 +/* 8037538C 003722EC 7C C6 5B 78 */ or r6, r6, r11 +/* 80375390 003722F0 90 DA 00 00 */ stw r6, 0(r26) +/* 80375394 003722F4 38 84 00 02 */ addi r4, r4, 2 +/* 80375398 003722F8 38 A5 00 02 */ addi r5, r5, 2 +/* 8037539C 003722FC 81 67 00 00 */ lwz r11, 0(r7) +/* 803753A0 00372300 39 08 00 01 */ addi r8, r8, 1 +/* 803753A4 00372304 55 6B 02 3E */ clrlwi r11, r11, 8 +/* 803753A8 00372308 7D 6A 53 78 */ or r10, r11, r10 +/* 803753AC 0037230C 91 47 00 00 */ stw r10, 0(r7) +/* 803753B0 00372310 80 F9 00 00 */ lwz r7, 0(r25) +/* 803753B4 00372314 54 E7 02 3E */ clrlwi r7, r7, 8 +/* 803753B8 00372318 7C E7 4B 78 */ or r7, r7, r9 +/* 803753BC 0037231C 90 F9 00 00 */ stw r7, 0(r25) +/* 803753C0 00372320 42 00 FE AC */ bdnz lbl_8037526C +/* 803753C4 00372324 90 03 01 20 */ stw r0, 0x120(r3) +/* 803753C8 00372328 38 83 01 20 */ addi r4, r3, 0x120 +/* 803753CC 0037232C 7C 09 03 78 */ mr r9, r0 +/* 803753D0 00372330 80 64 00 00 */ lwz r3, 0(r4) +/* 803753D4 00372334 39 40 00 30 */ li r10, 0x30 +/* 803753D8 00372338 39 60 00 31 */ li r11, 0x31 +/* 803753DC 0037233C 54 63 02 3E */ clrlwi r3, r3, 8 +/* 803753E0 00372340 64 63 27 00 */ oris r3, r3, 0x2700 +/* 803753E4 00372344 90 64 00 00 */ stw r3, 0(r4) +/* 803753E8 00372348 48 00 00 04 */ b lbl_803753EC +lbl_803753EC: +/* 803753EC 0037234C 38 60 00 02 */ li r3, 2 +/* 803753F0 00372350 7C 69 03 A6 */ mtctr r3 +/* 803753F4 00372354 48 00 00 04 */ b lbl_803753F8 +lbl_803753F8: +/* 803753F8 00372358 48 00 00 04 */ b lbl_803753FC +lbl_803753FC: +/* 803753FC 0037235C 80 62 CE 08 */ lwz r3, lbl_805AEB28@sda21(r2) +/* 80375400 00372360 39 09 00 B8 */ addi r8, r9, 0xb8 +/* 80375404 00372364 38 E9 00 D8 */ addi r7, r9, 0xd8 +/* 80375408 00372368 7C 03 41 2E */ stwx r0, r3, r8 +/* 8037540C 0037236C 55 46 C0 0E */ slwi r6, r10, 0x18 +/* 80375410 00372370 55 64 C0 0E */ slwi r4, r11, 0x18 +/* 80375414 00372374 7C 03 39 2E */ stwx r0, r3, r7 +/* 80375418 00372378 7D 83 42 14 */ add r12, r3, r8 +/* 8037541C 0037237C 39 29 00 04 */ addi r9, r9, 4 +/* 80375420 00372380 80 AC 00 00 */ lwz r5, 0(r12) +/* 80375424 00372384 7F 23 3A 14 */ add r25, r3, r7 +/* 80375428 00372388 39 09 00 B8 */ addi r8, r9, 0xb8 +/* 8037542C 0037238C 54 A5 02 3E */ clrlwi r5, r5, 8 +/* 80375430 00372390 7C A5 33 78 */ or r5, r5, r6 +/* 80375434 00372394 90 AC 00 00 */ stw r5, 0(r12) +/* 80375438 00372398 38 E9 00 D8 */ addi r7, r9, 0xd8 +/* 8037543C 0037239C 39 4A 00 02 */ addi r10, r10, 2 +/* 80375440 003723A0 80 B9 00 00 */ lwz r5, 0(r25) +/* 80375444 003723A4 55 46 C0 0E */ slwi r6, r10, 0x18 +/* 80375448 003723A8 7D 83 42 14 */ add r12, r3, r8 +/* 8037544C 003723AC 54 A5 02 3E */ clrlwi r5, r5, 8 +/* 80375450 003723B0 7C A4 23 78 */ or r4, r5, r4 +/* 80375454 003723B4 90 99 00 00 */ stw r4, 0(r25) +/* 80375458 003723B8 39 6B 00 02 */ addi r11, r11, 2 +/* 8037545C 003723BC 55 64 C0 0E */ slwi r4, r11, 0x18 +/* 80375460 003723C0 7C 03 41 2E */ stwx r0, r3, r8 +/* 80375464 003723C4 39 29 00 04 */ addi r9, r9, 4 +/* 80375468 003723C8 7F 23 3A 14 */ add r25, r3, r7 +/* 8037546C 003723CC 7C 03 39 2E */ stwx r0, r3, r7 +/* 80375470 003723D0 39 09 00 B8 */ addi r8, r9, 0xb8 +/* 80375474 003723D4 38 E9 00 D8 */ addi r7, r9, 0xd8 +/* 80375478 003723D8 80 AC 00 00 */ lwz r5, 0(r12) +/* 8037547C 003723DC 39 4A 00 02 */ addi r10, r10, 2 +/* 80375480 003723E0 39 6B 00 02 */ addi r11, r11, 2 +/* 80375484 003723E4 54 A5 02 3E */ clrlwi r5, r5, 8 +/* 80375488 003723E8 7C A5 33 78 */ or r5, r5, r6 +/* 8037548C 003723EC 90 AC 00 00 */ stw r5, 0(r12) +/* 80375490 003723F0 55 46 C0 0E */ slwi r6, r10, 0x18 +/* 80375494 003723F4 7D 83 42 14 */ add r12, r3, r8 +/* 80375498 003723F8 80 B9 00 00 */ lwz r5, 0(r25) +/* 8037549C 003723FC 39 29 00 04 */ addi r9, r9, 4 +/* 803754A0 00372400 39 4A 00 02 */ addi r10, r10, 2 +/* 803754A4 00372404 54 A5 02 3E */ clrlwi r5, r5, 8 +/* 803754A8 00372408 7C A4 23 78 */ or r4, r5, r4 +/* 803754AC 0037240C 90 99 00 00 */ stw r4, 0(r25) +/* 803754B0 00372410 55 64 C0 0E */ slwi r4, r11, 0x18 +/* 803754B4 00372414 7F 23 3A 14 */ add r25, r3, r7 +/* 803754B8 00372418 7C 03 41 2E */ stwx r0, r3, r8 +/* 803754BC 0037241C 39 09 00 B8 */ addi r8, r9, 0xb8 +/* 803754C0 00372420 39 6B 00 02 */ addi r11, r11, 2 +/* 803754C4 00372424 7C 03 39 2E */ stwx r0, r3, r7 +/* 803754C8 00372428 38 E9 00 D8 */ addi r7, r9, 0xd8 +/* 803754CC 0037242C 39 29 00 04 */ addi r9, r9, 4 +/* 803754D0 00372430 80 AC 00 00 */ lwz r5, 0(r12) +/* 803754D4 00372434 54 A5 02 3E */ clrlwi r5, r5, 8 +/* 803754D8 00372438 7C A5 33 78 */ or r5, r5, r6 +/* 803754DC 0037243C 90 AC 00 00 */ stw r5, 0(r12) +/* 803754E0 00372440 55 46 C0 0E */ slwi r6, r10, 0x18 +/* 803754E4 00372444 7D 83 42 14 */ add r12, r3, r8 +/* 803754E8 00372448 80 B9 00 00 */ lwz r5, 0(r25) +/* 803754EC 0037244C 39 4A 00 02 */ addi r10, r10, 2 +/* 803754F0 00372450 54 A5 02 3E */ clrlwi r5, r5, 8 +/* 803754F4 00372454 7C A4 23 78 */ or r4, r5, r4 +/* 803754F8 00372458 90 99 00 00 */ stw r4, 0(r25) +/* 803754FC 0037245C 55 64 C0 0E */ slwi r4, r11, 0x18 +/* 80375500 00372460 7F 23 3A 14 */ add r25, r3, r7 +/* 80375504 00372464 7C 03 41 2E */ stwx r0, r3, r8 +/* 80375508 00372468 39 6B 00 02 */ addi r11, r11, 2 +/* 8037550C 0037246C 7C 03 39 2E */ stwx r0, r3, r7 +/* 80375510 00372470 80 AC 00 00 */ lwz r5, 0(r12) +/* 80375514 00372474 54 A5 02 3E */ clrlwi r5, r5, 8 +/* 80375518 00372478 7C A5 33 78 */ or r5, r5, r6 +/* 8037551C 0037247C 90 AC 00 00 */ stw r5, 0(r12) +/* 80375520 00372480 80 B9 00 00 */ lwz r5, 0(r25) +/* 80375524 00372484 54 A5 02 3E */ clrlwi r5, r5, 8 +/* 80375528 00372488 7C A4 23 78 */ or r4, r5, r4 +/* 8037552C 0037248C 90 99 00 00 */ stw r4, 0(r25) +/* 80375530 00372490 42 00 FE CC */ bdnz lbl_803753FC +/* 80375534 00372494 38 A3 00 F8 */ addi r5, r3, 0xf8 +/* 80375538 00372498 80 05 00 00 */ lwz r0, 0(r5) +/* 8037553C 0037249C 3C 80 10 62 */ lis r4, 0x10624DD3@ha +/* 80375540 003724A0 38 C3 00 FC */ addi r6, r3, 0xfc +/* 80375544 003724A4 54 00 02 3E */ clrlwi r0, r0, 8 +/* 80375548 003724A8 64 00 20 00 */ oris r0, r0, 0x2000 +/* 8037554C 003724AC 90 05 00 00 */ stw r0, 0(r5) +/* 80375550 003724B0 38 E3 01 D0 */ addi r7, r3, 0x1d0 +/* 80375554 003724B4 39 03 01 D4 */ addi r8, r3, 0x1d4 +/* 80375558 003724B8 80 06 00 00 */ lwz r0, 0(r6) +/* 8037555C 003724BC 39 23 01 D8 */ addi r9, r3, 0x1d8 +/* 80375560 003724C0 39 43 01 DC */ addi r10, r3, 0x1dc +/* 80375564 003724C4 54 00 02 3E */ clrlwi r0, r0, 8 +/* 80375568 003724C8 64 00 21 00 */ oris r0, r0, 0x2100 +/* 8037556C 003724CC 90 06 00 00 */ stw r0, 0(r6) +/* 80375570 003724D0 38 C3 01 FC */ addi r6, r3, 0x1fc +/* 80375574 003724D4 3B A0 00 00 */ li r29, 0 +/* 80375578 003724D8 80 07 00 00 */ lwz r0, 0(r7) +/* 8037557C 003724DC 3C A0 80 00 */ lis r5, 0x800000F8@ha +/* 80375580 003724E0 38 84 4D D3 */ addi r4, r4, 0x10624DD3@l +/* 80375584 003724E4 54 00 02 3E */ clrlwi r0, r0, 8 +/* 80375588 003724E8 64 00 41 00 */ oris r0, r0, 0x4100 +/* 8037558C 003724EC 90 07 00 00 */ stw r0, 0(r7) +/* 80375590 003724F0 80 08 00 00 */ lwz r0, 0(r8) +/* 80375594 003724F4 54 00 02 3E */ clrlwi r0, r0, 8 +/* 80375598 003724F8 64 00 42 00 */ oris r0, r0, 0x4200 +/* 8037559C 003724FC 90 08 00 00 */ stw r0, 0(r8) +/* 803755A0 00372500 80 09 00 00 */ lwz r0, 0(r9) +/* 803755A4 00372504 54 00 02 3E */ clrlwi r0, r0, 8 +/* 803755A8 00372508 64 00 40 00 */ oris r0, r0, 0x4000 +/* 803755AC 0037250C 90 09 00 00 */ stw r0, 0(r9) +/* 803755B0 00372510 80 0A 00 00 */ lwz r0, 0(r10) +/* 803755B4 00372514 54 00 02 3E */ clrlwi r0, r0, 8 +/* 803755B8 00372518 64 00 43 00 */ oris r0, r0, 0x4300 +/* 803755BC 0037251C 90 0A 00 00 */ stw r0, 0(r10) +/* 803755C0 00372520 80 06 00 00 */ lwz r0, 0(r6) +/* 803755C4 00372524 54 00 06 6C */ rlwinm r0, r0, 0, 0x19, 0x16 +/* 803755C8 00372528 90 06 00 00 */ stw r0, 0(r6) +/* 803755CC 0037252C 93 A3 04 F4 */ stw r29, 0x4f4(r3) +/* 803755D0 00372530 9B A3 04 F2 */ stb r29, 0x4f2(r3) +/* 803755D4 00372534 80 05 00 F8 */ lwz r0, 0x800000F8@l(r5) +/* 803755D8 00372538 7C 04 00 16 */ mulhwu r0, r4, r0 +/* 803755DC 0037253C 54 19 D9 7E */ srwi r25, r0, 5 +/* 803755E0 00372540 48 00 5E 15 */ bl __GXFlushTextureState +/* 803755E4 00372544 57 20 AA FE */ srwi r0, r25, 0xb +/* 803755E8 00372548 64 00 69 00 */ oris r0, r0, 0x6900 +/* 803755EC 0037254C 3B 80 00 61 */ li r28, 0x61 +/* 803755F0 00372550 3F E0 CC 01 */ lis r31, 0xCC008000@ha +/* 803755F4 00372554 9B 9F 80 00 */ stb r28, 0xCC008000@l(r31) +/* 803755F8 00372558 60 00 04 00 */ ori r0, r0, 0x400 +/* 803755FC 0037255C 90 1F 80 00 */ stw r0, 0xCC008000@l(r31) +/* 80375600 00372560 48 00 5D F5 */ bl __GXFlushTextureState +/* 80375604 00372564 3C 60 3E 10 */ lis r3, 0x3E0F83E1@ha +/* 80375608 00372568 9B 9F 80 00 */ stb r28, 0xCC008000@l(r31) +/* 8037560C 0037256C 38 03 83 E1 */ addi r0, r3, 0x3E0F83E1@l +/* 80375610 00372570 7C 00 C8 16 */ mulhwu r0, r0, r25 +/* 80375614 00372574 54 00 B2 BE */ srwi r0, r0, 0xa +/* 80375618 00372578 64 00 46 00 */ oris r0, r0, 0x4600 +/* 8037561C 0037257C 60 00 02 00 */ ori r0, r0, 0x200 +/* 80375620 00372580 90 1F 80 00 */ stw r0, 0xCC008000@l(r31) +/* 80375624 00372584 7F A7 EB 78 */ mr r7, r29 +/* 80375628 00372588 48 00 00 04 */ b lbl_8037562C +lbl_8037562C: +/* 8037562C 0037258C 38 00 00 02 */ li r0, 2 +/* 80375630 00372590 7C 09 03 A6 */ mtctr r0 +/* 80375634 00372594 38 A0 00 08 */ li r5, 8 +/* 80375638 00372598 48 00 00 04 */ b lbl_8037563C +lbl_8037563C: +/* 8037563C 0037259C 48 00 00 04 */ b lbl_80375640 +lbl_80375640: +/* 80375640 003725A0 80 C2 CE 08 */ lwz r6, lbl_805AEB28@sda21(r2) +/* 80375644 003725A4 39 07 00 1C */ addi r8, r7, 0x1c +/* 80375648 003725A8 39 27 00 3C */ addi r9, r7, 0x3c +/* 8037564C 003725AC 7D 06 42 14 */ add r8, r6, r8 +/* 80375650 003725B0 80 08 00 00 */ lwz r0, 0(r8) +/* 80375654 003725B4 63 A4 00 80 */ ori r4, r29, 0x80 +/* 80375658 003725B8 38 67 00 3C */ addi r3, r7, 0x3c +/* 8037565C 003725BC 54 00 00 80 */ rlwinm r0, r0, 0, 2, 0 +/* 80375660 003725C0 64 00 40 00 */ oris r0, r0, 0x4000 +/* 80375664 003725C4 90 08 00 00 */ stw r0, 0(r8) +/* 80375668 003725C8 7D 26 4A 14 */ add r9, r6, r9 +/* 8037566C 003725CC 38 E7 00 04 */ addi r7, r7, 4 +/* 80375670 003725D0 80 09 00 00 */ lwz r0, 0(r9) +/* 80375674 003725D4 39 07 00 1C */ addi r8, r7, 0x1c +/* 80375678 003725D8 7D 06 42 14 */ add r8, r6, r8 +/* 8037567C 003725DC 54 00 00 7E */ clrlwi r0, r0, 1 +/* 80375680 003725E0 64 00 80 00 */ oris r0, r0, 0x8000 +/* 80375684 003725E4 90 09 00 00 */ stw r0, 0(r9) +/* 80375688 003725E8 39 27 00 3C */ addi r9, r7, 0x3c +/* 8037568C 003725EC 7D 26 4A 14 */ add r9, r6, r9 +/* 80375690 003725F0 98 BF 80 00 */ stb r5, 0xCC008000@l(r31) +/* 80375694 003725F4 3B BD 00 01 */ addi r29, r29, 1 +/* 80375698 003725F8 98 9F 80 00 */ stb r4, 0xCC008000@l(r31) +/* 8037569C 003725FC 63 A4 00 80 */ ori r4, r29, 0x80 +/* 803756A0 00372600 3B BD 00 01 */ addi r29, r29, 1 +/* 803756A4 00372604 7C 06 18 2E */ lwzx r0, r6, r3 +/* 803756A8 00372608 38 67 00 3C */ addi r3, r7, 0x3c +/* 803756AC 0037260C 38 E7 00 04 */ addi r7, r7, 4 +/* 803756B0 00372610 90 1F 80 00 */ stw r0, 0xCC008000@l(r31) +/* 803756B4 00372614 80 08 00 00 */ lwz r0, 0(r8) +/* 803756B8 00372618 54 00 00 80 */ rlwinm r0, r0, 0, 2, 0 +/* 803756BC 0037261C 64 00 40 00 */ oris r0, r0, 0x4000 +/* 803756C0 00372620 90 08 00 00 */ stw r0, 0(r8) +/* 803756C4 00372624 39 07 00 1C */ addi r8, r7, 0x1c +/* 803756C8 00372628 7D 06 42 14 */ add r8, r6, r8 +/* 803756CC 0037262C 80 09 00 00 */ lwz r0, 0(r9) +/* 803756D0 00372630 54 00 00 7E */ clrlwi r0, r0, 1 +/* 803756D4 00372634 64 00 80 00 */ oris r0, r0, 0x8000 +/* 803756D8 00372638 90 09 00 00 */ stw r0, 0(r9) +/* 803756DC 0037263C 39 27 00 3C */ addi r9, r7, 0x3c +/* 803756E0 00372640 7D 26 4A 14 */ add r9, r6, r9 +/* 803756E4 00372644 98 BF 80 00 */ stb r5, 0xCC008000@l(r31) +/* 803756E8 00372648 98 9F 80 00 */ stb r4, 0xCC008000@l(r31) +/* 803756EC 0037264C 63 A4 00 80 */ ori r4, r29, 0x80 +/* 803756F0 00372650 3B BD 00 01 */ addi r29, r29, 1 +/* 803756F4 00372654 7C 06 18 2E */ lwzx r0, r6, r3 +/* 803756F8 00372658 38 67 00 3C */ addi r3, r7, 0x3c +/* 803756FC 0037265C 38 E7 00 04 */ addi r7, r7, 4 +/* 80375700 00372660 90 1F 80 00 */ stw r0, 0xCC008000@l(r31) +/* 80375704 00372664 80 08 00 00 */ lwz r0, 0(r8) +/* 80375708 00372668 54 00 00 80 */ rlwinm r0, r0, 0, 2, 0 +/* 8037570C 0037266C 64 00 40 00 */ oris r0, r0, 0x4000 +/* 80375710 00372670 90 08 00 00 */ stw r0, 0(r8) +/* 80375714 00372674 39 07 00 1C */ addi r8, r7, 0x1c +/* 80375718 00372678 7D 06 42 14 */ add r8, r6, r8 +/* 8037571C 0037267C 80 09 00 00 */ lwz r0, 0(r9) +/* 80375720 00372680 54 00 00 7E */ clrlwi r0, r0, 1 +/* 80375724 00372684 64 00 80 00 */ oris r0, r0, 0x8000 +/* 80375728 00372688 90 09 00 00 */ stw r0, 0(r9) +/* 8037572C 0037268C 39 27 00 3C */ addi r9, r7, 0x3c +/* 80375730 00372690 7D 26 4A 14 */ add r9, r6, r9 +/* 80375734 00372694 98 BF 80 00 */ stb r5, 0xCC008000@l(r31) +/* 80375738 00372698 98 9F 80 00 */ stb r4, 0xCC008000@l(r31) +/* 8037573C 0037269C 63 A4 00 80 */ ori r4, r29, 0x80 +/* 80375740 003726A0 3B BD 00 01 */ addi r29, r29, 1 +/* 80375744 003726A4 7C 06 18 2E */ lwzx r0, r6, r3 +/* 80375748 003726A8 38 67 00 3C */ addi r3, r7, 0x3c +/* 8037574C 003726AC 38 E7 00 04 */ addi r7, r7, 4 +/* 80375750 003726B0 90 1F 80 00 */ stw r0, 0xCC008000@l(r31) +/* 80375754 003726B4 80 08 00 00 */ lwz r0, 0(r8) +/* 80375758 003726B8 54 00 00 80 */ rlwinm r0, r0, 0, 2, 0 +/* 8037575C 003726BC 64 00 40 00 */ oris r0, r0, 0x4000 +/* 80375760 003726C0 90 08 00 00 */ stw r0, 0(r8) +/* 80375764 003726C4 80 09 00 00 */ lwz r0, 0(r9) +/* 80375768 003726C8 54 00 00 7E */ clrlwi r0, r0, 1 +/* 8037576C 003726CC 64 00 80 00 */ oris r0, r0, 0x8000 +/* 80375770 003726D0 90 09 00 00 */ stw r0, 0(r9) +/* 80375774 003726D4 98 BF 80 00 */ stb r5, 0xCC008000@l(r31) +/* 80375778 003726D8 98 9F 80 00 */ stb r4, 0xCC008000@l(r31) +/* 8037577C 003726DC 7C 06 18 2E */ lwzx r0, r6, r3 +/* 80375780 003726E0 90 1F 80 00 */ stw r0, 0xCC008000@l(r31) +/* 80375784 003726E4 42 00 FE BC */ bdnz lbl_80375640 +/* 80375788 003726E8 38 80 00 10 */ li r4, 0x10 +/* 8037578C 003726EC 3C C0 CC 01 */ lis r6, 0xCC008000@ha +/* 80375790 003726F0 98 86 80 00 */ stb r4, 0xCC008000@l(r6) +/* 80375794 003726F4 38 00 10 00 */ li r0, 0x1000 +/* 80375798 003726F8 3B 80 00 00 */ li r28, 0 +/* 8037579C 003726FC 90 06 80 00 */ stw r0, 0xCC008000@l(r6) +/* 803757A0 00372700 38 00 00 3F */ li r0, 0x3f +/* 803757A4 00372704 57 99 78 20 */ slwi r25, r28, 0xf +/* 803757A8 00372708 90 06 80 00 */ stw r0, 0xCC008000@l(r6) +/* 803757AC 0037270C 38 00 10 12 */ li r0, 0x1012 +/* 803757B0 00372710 38 A0 00 01 */ li r5, 1 +/* 803757B4 00372714 98 86 80 00 */ stb r4, 0xCC008000@l(r6) +/* 803757B8 00372718 38 80 00 61 */ li r4, 0x61 +/* 803757BC 0037271C 3C 60 58 00 */ lis r3, 0x5800000F@ha +/* 803757C0 00372720 90 06 80 00 */ stw r0, 0xCC008000@l(r6) +/* 803757C4 00372724 38 03 00 0F */ addi r0, r3, 0x5800000F@l +/* 803757C8 00372728 3F 59 00 08 */ addis r26, r25, 8 +/* 803757CC 0037272C 90 A6 80 00 */ stw r5, 0xCC008000@l(r6) +/* 803757D0 00372730 57 9B 20 36 */ slwi r27, r28, 4 +/* 803757D4 00372734 98 86 80 00 */ stb r4, 0xCC008000@l(r6) +/* 803757D8 00372738 90 06 80 00 */ stw r0, 0xCC008000@l(r6) +/* 803757DC 0037273C 48 00 00 04 */ b lbl_803757E0 +lbl_803757E0: +/* 803757E0 00372740 48 00 00 04 */ b lbl_803757E4 +lbl_803757E4: +/* 803757E4 00372744 48 00 00 04 */ b lbl_803757E8 +lbl_803757E8: +/* 803757E8 00372748 80 02 CE 08 */ lwz r0, lbl_805AEB28@sda21(r2) +/* 803757EC 0037274C 38 7B 02 08 */ addi r3, r27, 0x208 +/* 803757F0 00372750 7F 25 CB 78 */ mr r5, r25 +/* 803757F4 00372754 7F 47 D3 78 */ mr r7, r26 +/* 803757F8 00372758 7C 60 1A 14 */ add r3, r0, r3 +/* 803757FC 0037275C 38 80 00 00 */ li r4, 0 +/* 80375800 00372760 38 C0 00 00 */ li r6, 0 +/* 80375804 00372764 39 00 00 00 */ li r8, 0 +/* 80375808 00372768 48 00 4D C5 */ bl GXInitTexCacheRegion +/* 8037580C 0037276C 3F 5A 00 01 */ addis r26, r26, 1 +/* 80375810 00372770 3F 39 00 01 */ addis r25, r25, 1 +/* 80375814 00372774 3B 5A 80 00 */ addi r26, r26, -32768 +/* 80375818 00372778 3B 39 80 00 */ addi r25, r25, -32768 +/* 8037581C 0037277C 3B 7B 00 10 */ addi r27, r27, 0x10 +/* 80375820 00372780 3B 9C 00 01 */ addi r28, r28, 1 +/* 80375824 00372784 28 1C 00 08 */ cmplwi r28, 8 +/* 80375828 00372788 41 80 FF C0 */ blt lbl_803757E8 +/* 8037582C 0037278C 3B 20 00 00 */ li r25, 0 +/* 80375830 00372790 57 23 08 3C */ slwi r3, r25, 1 +/* 80375834 00372794 3B 43 00 09 */ addi r26, r3, 9 +/* 80375838 00372798 3B 63 00 08 */ addi r27, r3, 8 +/* 8037583C 0037279C 57 3C 20 36 */ slwi r28, r25, 4 +/* 80375840 003727A0 48 00 00 04 */ b lbl_80375844 +lbl_80375844: +/* 80375844 003727A4 48 00 00 04 */ b lbl_80375848 +lbl_80375848: +/* 80375848 003727A8 48 00 00 04 */ b lbl_8037584C +lbl_8037584C: +/* 8037584C 003727AC 80 02 CE 08 */ lwz r0, lbl_805AEB28@sda21(r2) +/* 80375850 003727B0 38 7C 02 88 */ addi r3, r28, 0x288 +/* 80375854 003727B4 57 65 78 20 */ slwi r5, r27, 0xf +/* 80375858 003727B8 7C 60 1A 14 */ add r3, r0, r3 +/* 8037585C 003727BC 57 47 78 20 */ slwi r7, r26, 0xf +/* 80375860 003727C0 38 80 00 00 */ li r4, 0 +/* 80375864 003727C4 38 C0 00 00 */ li r6, 0 +/* 80375868 003727C8 39 00 00 00 */ li r8, 0 +/* 8037586C 003727CC 48 00 4D 61 */ bl GXInitTexCacheRegion +/* 80375870 003727D0 3B 5A 00 02 */ addi r26, r26, 2 +/* 80375874 003727D4 3B 7B 00 02 */ addi r27, r27, 2 +/* 80375878 003727D8 3B 9C 00 10 */ addi r28, r28, 0x10 +/* 8037587C 003727DC 3B 39 00 01 */ addi r25, r25, 1 +/* 80375880 003727E0 28 19 00 04 */ cmplwi r25, 4 +/* 80375884 003727E4 41 80 FF C8 */ blt lbl_8037584C +/* 80375888 003727E8 3B 20 00 00 */ li r25, 0 +/* 8037588C 003727EC 57 23 68 24 */ slwi r3, r25, 0xd +/* 80375890 003727F0 3F 43 00 0C */ addis r26, r3, 0xc +/* 80375894 003727F4 57 3B 20 36 */ slwi r27, r25, 4 +/* 80375898 003727F8 48 00 00 04 */ b lbl_8037589C +lbl_8037589C: +/* 8037589C 003727FC 48 00 00 04 */ b lbl_803758A0 +lbl_803758A0: +/* 803758A0 00372800 48 00 00 04 */ b lbl_803758A4 +lbl_803758A4: +/* 803758A4 00372804 80 02 CE 08 */ lwz r0, lbl_805AEB28@sda21(r2) +/* 803758A8 00372808 38 7B 02 D0 */ addi r3, r27, 0x2d0 +/* 803758AC 0037280C 7F 44 D3 78 */ mr r4, r26 +/* 803758B0 00372810 7C 60 1A 14 */ add r3, r0, r3 +/* 803758B4 00372814 38 A0 00 10 */ li r5, 0x10 +/* 803758B8 00372818 48 00 4E 35 */ bl GXInitTlutRegion +/* 803758BC 0037281C 3B 5A 20 00 */ addi r26, r26, 0x2000 +/* 803758C0 00372820 3B 7B 00 10 */ addi r27, r27, 0x10 +/* 803758C4 00372824 3B 39 00 01 */ addi r25, r25, 1 +/* 803758C8 00372828 28 19 00 10 */ cmplwi r25, 0x10 +/* 803758CC 0037282C 41 80 FF D8 */ blt lbl_803758A4 +/* 803758D0 00372830 3B 20 00 00 */ li r25, 0 +/* 803758D4 00372834 57 23 78 20 */ slwi r3, r25, 0xf +/* 803758D8 00372838 3F 43 00 0E */ addis r26, r3, 0xe +/* 803758DC 0037283C 48 00 00 04 */ b lbl_803758E0 +lbl_803758E0: +/* 803758E0 00372840 48 00 00 04 */ b lbl_803758E4 +lbl_803758E4: +/* 803758E4 00372844 48 00 00 04 */ b lbl_803758E8 +lbl_803758E8: +/* 803758E8 00372848 38 19 00 10 */ addi r0, r25, 0x10 +/* 803758EC 0037284C 80 A2 CE 08 */ lwz r5, lbl_805AEB28@sda21(r2) +/* 803758F0 00372850 54 03 20 36 */ slwi r3, r0, 4 +/* 803758F4 00372854 38 63 02 D0 */ addi r3, r3, 0x2d0 +/* 803758F8 00372858 7F 44 D3 78 */ mr r4, r26 +/* 803758FC 0037285C 7C 65 1A 14 */ add r3, r5, r3 +/* 80375900 00372860 38 A0 00 40 */ li r5, 0x40 +/* 80375904 00372864 48 00 4D E9 */ bl GXInitTlutRegion +/* 80375908 00372868 3F 5A 00 01 */ addis r26, r26, 1 +/* 8037590C 0037286C 3B 5A 80 00 */ addi r26, r26, -32768 +/* 80375910 00372870 3B 39 00 01 */ addi r25, r25, 1 +/* 80375914 00372874 28 19 00 04 */ cmplwi r25, 4 +/* 80375918 00372878 41 80 FF D0 */ blt lbl_803758E8 +/* 8037591C 0037287C 80 8D AC 7C */ lwz r4, lbl_805A983C@sda21(r13) +/* 80375920 00372880 39 80 00 00 */ li r12, 0 +/* 80375924 00372884 38 60 00 08 */ li r3, 8 +/* 80375928 00372888 B1 84 00 06 */ sth r12, 6(r4) +/* 8037592C 0037288C 3D 40 CC 01 */ lis r10, 0xCC008000@ha +/* 80375930 00372890 39 20 00 20 */ li r9, 0x20 +/* 80375934 00372894 81 62 CE 08 */ lwz r11, lbl_805AEB28@sda21(r2) +/* 80375938 00372898 39 00 00 10 */ li r8, 0x10 +/* 8037593C 0037289C 38 E0 10 06 */ li r7, 0x1006 +/* 80375940 003728A0 38 8B 04 EC */ addi r4, r11, 0x4ec +/* 80375944 003728A4 80 04 00 00 */ lwz r0, 0(r4) +/* 80375948 003728A8 38 C0 00 61 */ li r6, 0x61 +/* 8037594C 003728AC 3C A0 23 00 */ lis r5, 0x2300 +/* 80375950 003728B0 54 00 07 2E */ rlwinm r0, r0, 0, 0x1c, 0x17 +/* 80375954 003728B4 90 04 00 00 */ stw r0, 0(r4) +/* 80375958 003728B8 3C 80 24 00 */ lis r4, 0x2400 +/* 8037595C 003728BC 3C 00 67 00 */ lis r0, 0x6700 +/* 80375960 003728C0 98 6A 80 00 */ stb r3, 0xCC008000@l(r10) +/* 80375964 003728C4 38 60 00 00 */ li r3, 0 +/* 80375968 003728C8 99 2A 80 00 */ stb r9, 0xCC008000@l(r10) +/* 8037596C 003728CC 81 2B 04 EC */ lwz r9, 0x4ec(r11) +/* 80375970 003728D0 91 2A 80 00 */ stw r9, 0xCC008000@l(r10) +/* 80375974 003728D4 99 0A 80 00 */ stb r8, 0xCC008000@l(r10) +/* 80375978 003728D8 90 EA 80 00 */ stw r7, 0xCC008000@l(r10) +/* 8037597C 003728DC 91 8A 80 00 */ stw r12, 0xCC008000@l(r10) +/* 80375980 003728E0 98 CA 80 00 */ stb r6, 0xCC008000@l(r10) +/* 80375984 003728E4 90 AA 80 00 */ stw r5, 0xCC008000@l(r10) +/* 80375988 003728E8 98 CA 80 00 */ stb r6, 0xCC008000@l(r10) +/* 8037598C 003728EC 90 8A 80 00 */ stw r4, 0xCC008000@l(r10) +/* 80375990 003728F0 98 CA 80 00 */ stb r6, 0xCC008000@l(r10) +/* 80375994 003728F4 90 0A 80 00 */ stw r0, 0xCC008000@l(r10) +/* 80375998 003728F8 48 00 52 55 */ bl __GXSetTmemConfig +/* 8037599C 003728FC 48 00 00 1D */ bl __GXInitGX +/* 803759A0 00372900 38 7E 04 F8 */ addi r3, r30, 0x4f8 +/* 803759A4 00372904 BB 21 00 34 */ lmw r25, 0x34(r1) +/* 803759A8 00372908 80 01 00 54 */ lwz r0, 0x54(r1) +/* 803759AC 0037290C 38 21 00 50 */ addi r1, r1, 0x50 +/* 803759B0 00372910 7C 08 03 A6 */ mtlr r0 +/* 803759B4 00372914 4E 80 00 20 */ blr + +.global __GXInitGX +__GXInitGX: +/* 803759B8 00372918 7C 08 02 A6 */ mflr r0 +/* 803759BC 0037291C 90 01 00 04 */ stw r0, 4(r1) +/* 803759C0 00372920 94 21 FF 80 */ stwu r1, -0x80(r1) +/* 803759C4 00372924 93 E1 00 7C */ stw r31, 0x7c(r1) +/* 803759C8 00372928 93 C1 00 78 */ stw r30, 0x78(r1) +/* 803759CC 0037292C 93 A1 00 74 */ stw r29, 0x74(r1) +/* 803759D0 00372930 80 82 CE 0C */ lwz r4, lbl_805AEB2C@sda21(r2) +/* 803759D4 00372934 80 62 CE 10 */ lwz r3, lbl_805AEB30@sda21(r2) +/* 803759D8 00372938 80 02 CE 14 */ lwz r0, lbl_805AEB34@sda21(r2) +/* 803759DC 0037293C 90 81 00 28 */ stw r4, 0x28(r1) +/* 803759E0 00372940 90 61 00 24 */ stw r3, 0x24(r1) +/* 803759E4 00372944 90 01 00 20 */ stw r0, 0x20(r1) +/* 803759E8 00372948 48 01 3A F1 */ bl VIGetTvFormat +/* 803759EC 0037294C 2C 03 00 02 */ cmpwi r3, 2 +/* 803759F0 00372950 41 82 00 54 */ beq lbl_80375A44 +/* 803759F4 00372954 40 80 00 14 */ bge lbl_80375A08 +/* 803759F8 00372958 2C 03 00 00 */ cmpwi r3, 0 +/* 803759FC 0037295C 41 82 00 18 */ beq lbl_80375A14 +/* 80375A00 00372960 40 80 00 24 */ bge lbl_80375A24 +/* 80375A04 00372964 48 00 00 50 */ b lbl_80375A54 +lbl_80375A08: +/* 80375A08 00372968 2C 03 00 05 */ cmpwi r3, 5 +/* 80375A0C 0037296C 41 82 00 28 */ beq lbl_80375A34 +/* 80375A10 00372970 48 00 00 44 */ b lbl_80375A54 +lbl_80375A14: +/* 80375A14 00372974 3C 60 80 3F */ lis r3, lbl_803F08E0@ha +/* 80375A18 00372978 38 03 08 E0 */ addi r0, r3, lbl_803F08E0@l +/* 80375A1C 0037297C 7C 1F 03 78 */ mr r31, r0 +/* 80375A20 00372980 48 00 00 40 */ b lbl_80375A60 +lbl_80375A24: +/* 80375A24 00372984 3C 60 80 3F */ lis r3, lbl_803F0958@ha +/* 80375A28 00372988 38 03 09 58 */ addi r0, r3, lbl_803F0958@l +/* 80375A2C 0037298C 7C 1F 03 78 */ mr r31, r0 +/* 80375A30 00372990 48 00 00 30 */ b lbl_80375A60 +lbl_80375A34: +/* 80375A34 00372994 3C 60 80 3F */ lis r3, lbl_803F0994@ha +/* 80375A38 00372998 38 03 09 94 */ addi r0, r3, lbl_803F0994@l +/* 80375A3C 0037299C 7C 1F 03 78 */ mr r31, r0 +/* 80375A40 003729A0 48 00 00 20 */ b lbl_80375A60 +lbl_80375A44: +/* 80375A44 003729A4 3C 60 80 3F */ lis r3, lbl_803F091C@ha +/* 80375A48 003729A8 38 03 09 1C */ addi r0, r3, lbl_803F091C@l +/* 80375A4C 003729AC 7C 1F 03 78 */ mr r31, r0 +/* 80375A50 003729B0 48 00 00 10 */ b lbl_80375A60 +lbl_80375A54: +/* 80375A54 003729B4 3C 60 80 3F */ lis r3, lbl_803F08E0@ha +/* 80375A58 003729B8 38 03 08 E0 */ addi r0, r3, lbl_803F08E0@l +/* 80375A5C 003729BC 7C 1F 03 78 */ mr r31, r0 +lbl_80375A60: +/* 80375A60 003729C0 80 01 00 28 */ lwz r0, 0x28(r1) +/* 80375A64 003729C4 3C 80 01 00 */ lis r4, 0x00FFFFFF@ha +/* 80375A68 003729C8 38 61 00 1C */ addi r3, r1, 0x1c +/* 80375A6C 003729CC 90 01 00 1C */ stw r0, 0x1c(r1) +/* 80375A70 003729D0 38 84 FF FF */ addi r4, r4, 0x00FFFFFF@l +/* 80375A74 003729D4 48 00 36 B9 */ bl GXSetCopyClear +/* 80375A78 003729D8 38 60 00 00 */ li r3, 0 +/* 80375A7C 003729DC 38 80 00 01 */ li r4, 1 +/* 80375A80 003729E0 38 A0 00 04 */ li r5, 4 +/* 80375A84 003729E4 38 C0 00 3C */ li r6, 0x3c +/* 80375A88 003729E8 38 E0 00 00 */ li r7, 0 +/* 80375A8C 003729EC 39 00 00 7D */ li r8, 0x7d +/* 80375A90 003729F0 48 00 25 05 */ bl GXSetTexCoordGen2 +/* 80375A94 003729F4 38 60 00 01 */ li r3, 1 +/* 80375A98 003729F8 38 80 00 01 */ li r4, 1 +/* 80375A9C 003729FC 38 A0 00 05 */ li r5, 5 +/* 80375AA0 00372A00 38 C0 00 3C */ li r6, 0x3c +/* 80375AA4 00372A04 38 E0 00 00 */ li r7, 0 +/* 80375AA8 00372A08 39 00 00 7D */ li r8, 0x7d +/* 80375AAC 00372A0C 48 00 24 E9 */ bl GXSetTexCoordGen2 +/* 80375AB0 00372A10 38 60 00 02 */ li r3, 2 +/* 80375AB4 00372A14 38 80 00 01 */ li r4, 1 +/* 80375AB8 00372A18 38 A0 00 06 */ li r5, 6 +/* 80375ABC 00372A1C 38 C0 00 3C */ li r6, 0x3c +/* 80375AC0 00372A20 38 E0 00 00 */ li r7, 0 +/* 80375AC4 00372A24 39 00 00 7D */ li r8, 0x7d +/* 80375AC8 00372A28 48 00 24 CD */ bl GXSetTexCoordGen2 +/* 80375ACC 00372A2C 38 60 00 03 */ li r3, 3 +/* 80375AD0 00372A30 38 80 00 01 */ li r4, 1 +/* 80375AD4 00372A34 38 A0 00 07 */ li r5, 7 +/* 80375AD8 00372A38 38 C0 00 3C */ li r6, 0x3c +/* 80375ADC 00372A3C 38 E0 00 00 */ li r7, 0 +/* 80375AE0 00372A40 39 00 00 7D */ li r8, 0x7d +/* 80375AE4 00372A44 48 00 24 B1 */ bl GXSetTexCoordGen2 +/* 80375AE8 00372A48 38 60 00 04 */ li r3, 4 +/* 80375AEC 00372A4C 38 80 00 01 */ li r4, 1 +/* 80375AF0 00372A50 38 A0 00 08 */ li r5, 8 +/* 80375AF4 00372A54 38 C0 00 3C */ li r6, 0x3c +/* 80375AF8 00372A58 38 E0 00 00 */ li r7, 0 +/* 80375AFC 00372A5C 39 00 00 7D */ li r8, 0x7d +/* 80375B00 00372A60 48 00 24 95 */ bl GXSetTexCoordGen2 +/* 80375B04 00372A64 38 60 00 05 */ li r3, 5 +/* 80375B08 00372A68 38 80 00 01 */ li r4, 1 +/* 80375B0C 00372A6C 38 A0 00 09 */ li r5, 9 +/* 80375B10 00372A70 38 C0 00 3C */ li r6, 0x3c +/* 80375B14 00372A74 38 E0 00 00 */ li r7, 0 +/* 80375B18 00372A78 39 00 00 7D */ li r8, 0x7d +/* 80375B1C 00372A7C 48 00 24 79 */ bl GXSetTexCoordGen2 +/* 80375B20 00372A80 38 60 00 06 */ li r3, 6 +/* 80375B24 00372A84 38 80 00 01 */ li r4, 1 +/* 80375B28 00372A88 38 A0 00 0A */ li r5, 0xa +/* 80375B2C 00372A8C 38 C0 00 3C */ li r6, 0x3c +/* 80375B30 00372A90 38 E0 00 00 */ li r7, 0 +/* 80375B34 00372A94 39 00 00 7D */ li r8, 0x7d +/* 80375B38 00372A98 48 00 24 5D */ bl GXSetTexCoordGen2 +/* 80375B3C 00372A9C 38 60 00 07 */ li r3, 7 +/* 80375B40 00372AA0 38 80 00 01 */ li r4, 1 +/* 80375B44 00372AA4 38 A0 00 0B */ li r5, 0xb +/* 80375B48 00372AA8 38 C0 00 3C */ li r6, 0x3c +/* 80375B4C 00372AAC 38 E0 00 00 */ li r7, 0 +/* 80375B50 00372AB0 39 00 00 7D */ li r8, 0x7d +/* 80375B54 00372AB4 48 00 24 41 */ bl GXSetTexCoordGen2 +/* 80375B58 00372AB8 38 60 00 01 */ li r3, 1 +/* 80375B5C 00372ABC 48 00 27 09 */ bl GXSetNumTexGens +/* 80375B60 00372AC0 48 00 1B F5 */ bl GXClearVtxDesc +/* 80375B64 00372AC4 48 00 24 21 */ bl GXInvalidateVtxCache +/* 80375B68 00372AC8 3B A0 00 09 */ li r29, 9 +/* 80375B6C 00372ACC 48 00 00 04 */ b lbl_80375B70 +lbl_80375B70: +/* 80375B70 00372AD0 48 00 00 04 */ b lbl_80375B74 +lbl_80375B74: +/* 80375B74 00372AD4 48 00 00 04 */ b lbl_80375B78 +lbl_80375B78: +/* 80375B78 00372AD8 80 82 CE 08 */ lwz r4, lbl_805AEB28@sda21(r2) +/* 80375B7C 00372ADC 7F A3 EB 78 */ mr r3, r29 +/* 80375B80 00372AE0 38 A0 00 00 */ li r5, 0 +/* 80375B84 00372AE4 48 00 23 75 */ bl GXSetArray +/* 80375B88 00372AE8 3B BD 00 01 */ addi r29, r29, 1 +/* 80375B8C 00372AEC 28 1D 00 18 */ cmplwi r29, 0x18 +/* 80375B90 00372AF0 40 81 FF E8 */ ble lbl_80375B78 +/* 80375B94 00372AF4 3B A0 00 00 */ li r29, 0 +/* 80375B98 00372AF8 48 00 00 04 */ b lbl_80375B9C +lbl_80375B9C: +/* 80375B9C 00372AFC 3C 60 80 3F */ lis r3, lbl_803F062C@ha +/* 80375BA0 00372B00 3B C3 06 2C */ addi r30, r3, lbl_803F062C@l +/* 80375BA4 00372B04 48 00 00 04 */ b lbl_80375BA8 +lbl_80375BA8: +/* 80375BA8 00372B08 48 00 00 04 */ b lbl_80375BAC +lbl_80375BAC: +/* 80375BAC 00372B0C 7F A3 EB 78 */ mr r3, r29 +/* 80375BB0 00372B10 7F C4 F3 78 */ mr r4, r30 +/* 80375BB4 00372B14 48 00 1F 31 */ bl GXSetVtxAttrFmtv +/* 80375BB8 00372B18 3B BD 00 01 */ addi r29, r29, 1 +/* 80375BBC 00372B1C 28 1D 00 08 */ cmplwi r29, 8 +/* 80375BC0 00372B20 41 80 FF EC */ blt lbl_80375BAC +/* 80375BC4 00372B24 38 60 00 06 */ li r3, 6 +/* 80375BC8 00372B28 38 80 00 00 */ li r4, 0 +/* 80375BCC 00372B2C 48 00 2E A1 */ bl GXSetLineWidth +/* 80375BD0 00372B30 38 60 00 06 */ li r3, 6 +/* 80375BD4 00372B34 38 80 00 00 */ li r4, 0 +/* 80375BD8 00372B38 48 00 2E DD */ bl GXSetPointSize +/* 80375BDC 00372B3C 38 60 00 00 */ li r3, 0 +/* 80375BE0 00372B40 38 80 00 00 */ li r4, 0 +/* 80375BE4 00372B44 38 A0 00 00 */ li r5, 0 +/* 80375BE8 00372B48 48 00 2F 15 */ bl GXEnableTexOffsets +/* 80375BEC 00372B4C 38 60 00 01 */ li r3, 1 +/* 80375BF0 00372B50 38 80 00 00 */ li r4, 0 +/* 80375BF4 00372B54 38 A0 00 00 */ li r5, 0 +/* 80375BF8 00372B58 48 00 2F 05 */ bl GXEnableTexOffsets +/* 80375BFC 00372B5C 38 60 00 02 */ li r3, 2 +/* 80375C00 00372B60 38 80 00 00 */ li r4, 0 +/* 80375C04 00372B64 38 A0 00 00 */ li r5, 0 +/* 80375C08 00372B68 48 00 2E F5 */ bl GXEnableTexOffsets +/* 80375C0C 00372B6C 38 60 00 03 */ li r3, 3 +/* 80375C10 00372B70 38 80 00 00 */ li r4, 0 +/* 80375C14 00372B74 38 A0 00 00 */ li r5, 0 +/* 80375C18 00372B78 48 00 2E E5 */ bl GXEnableTexOffsets +/* 80375C1C 00372B7C 38 60 00 04 */ li r3, 4 +/* 80375C20 00372B80 38 80 00 00 */ li r4, 0 +/* 80375C24 00372B84 38 A0 00 00 */ li r5, 0 +/* 80375C28 00372B88 48 00 2E D5 */ bl GXEnableTexOffsets +/* 80375C2C 00372B8C 38 60 00 05 */ li r3, 5 +/* 80375C30 00372B90 38 80 00 00 */ li r4, 0 +/* 80375C34 00372B94 38 A0 00 00 */ li r5, 0 +/* 80375C38 00372B98 48 00 2E C5 */ bl GXEnableTexOffsets +/* 80375C3C 00372B9C 38 60 00 06 */ li r3, 6 +/* 80375C40 00372BA0 38 80 00 00 */ li r4, 0 +/* 80375C44 00372BA4 38 A0 00 00 */ li r5, 0 +/* 80375C48 00372BA8 48 00 2E B5 */ bl GXEnableTexOffsets +/* 80375C4C 00372BAC 38 60 00 07 */ li r3, 7 +/* 80375C50 00372BB0 38 80 00 00 */ li r4, 0 +/* 80375C54 00372BB4 38 A0 00 00 */ li r5, 0 +/* 80375C58 00372BB8 48 00 2E A5 */ bl GXEnableTexOffsets +/* 80375C5C 00372BBC C0 22 CE 18 */ lfs f1, lbl_805AEB38@sda21(r2) +/* 80375C60 00372BC0 38 61 00 2C */ addi r3, r1, 0x2c +/* 80375C64 00372BC4 C0 02 CE 1C */ lfs f0, lbl_805AEB3C@sda21(r2) +/* 80375C68 00372BC8 38 80 00 00 */ li r4, 0 +/* 80375C6C 00372BCC D0 21 00 2C */ stfs f1, 0x2c(r1) +/* 80375C70 00372BD0 D0 01 00 30 */ stfs f0, 0x30(r1) +/* 80375C74 00372BD4 D0 01 00 34 */ stfs f0, 0x34(r1) +/* 80375C78 00372BD8 D0 01 00 38 */ stfs f0, 0x38(r1) +/* 80375C7C 00372BDC D0 01 00 3C */ stfs f0, 0x3c(r1) +/* 80375C80 00372BE0 D0 21 00 40 */ stfs f1, 0x40(r1) +/* 80375C84 00372BE4 D0 01 00 44 */ stfs f0, 0x44(r1) +/* 80375C88 00372BE8 D0 01 00 48 */ stfs f0, 0x48(r1) +/* 80375C8C 00372BEC D0 01 00 4C */ stfs f0, 0x4c(r1) +/* 80375C90 00372BF0 D0 01 00 50 */ stfs f0, 0x50(r1) +/* 80375C94 00372BF4 D0 21 00 54 */ stfs f1, 0x54(r1) +/* 80375C98 00372BF8 D0 01 00 58 */ stfs f0, 0x58(r1) +/* 80375C9C 00372BFC 48 00 67 1D */ bl GXLoadPosMtxImm +/* 80375CA0 00372C00 38 61 00 2C */ addi r3, r1, 0x2c +/* 80375CA4 00372C04 38 80 00 00 */ li r4, 0 +/* 80375CA8 00372C08 48 00 67 61 */ bl GXLoadNrmMtxImm +/* 80375CAC 00372C0C 38 60 00 00 */ li r3, 0 +/* 80375CB0 00372C10 48 00 67 A9 */ bl GXSetCurrentMtx +/* 80375CB4 00372C14 38 61 00 2C */ addi r3, r1, 0x2c +/* 80375CB8 00372C18 38 80 00 3C */ li r4, 0x3c +/* 80375CBC 00372C1C 38 A0 00 00 */ li r5, 0 +/* 80375CC0 00372C20 48 00 67 D1 */ bl GXLoadTexMtxImm +/* 80375CC4 00372C24 38 61 00 2C */ addi r3, r1, 0x2c +/* 80375CC8 00372C28 38 80 00 7D */ li r4, 0x7d +/* 80375CCC 00372C2C 38 A0 00 00 */ li r5, 0 +/* 80375CD0 00372C30 48 00 67 C1 */ bl GXLoadTexMtxImm +/* 80375CD4 00372C34 A0 9F 00 04 */ lhz r4, 4(r31) +/* 80375CD8 00372C38 3C 60 43 30 */ lis r3, 0x4330 +/* 80375CDC 00372C3C A0 1F 00 08 */ lhz r0, 8(r31) +/* 80375CE0 00372C40 90 81 00 6C */ stw r4, 0x6c(r1) +/* 80375CE4 00372C44 C0 22 CE 1C */ lfs f1, lbl_805AEB3C@sda21(r2) +/* 80375CE8 00372C48 90 01 00 64 */ stw r0, 0x64(r1) +/* 80375CEC 00372C4C C8 82 CE 28 */ lfd f4, lbl_805AEB48@sda21(r2) +/* 80375CF0 00372C50 FC 40 08 90 */ fmr f2, f1 +/* 80375CF4 00372C54 90 61 00 68 */ stw r3, 0x68(r1) +/* 80375CF8 00372C58 FC A0 08 90 */ fmr f5, f1 +/* 80375CFC 00372C5C C0 C2 CE 18 */ lfs f6, lbl_805AEB38@sda21(r2) +/* 80375D00 00372C60 90 61 00 60 */ stw r3, 0x60(r1) +/* 80375D04 00372C64 C8 61 00 68 */ lfd f3, 0x68(r1) +/* 80375D08 00372C68 C8 01 00 60 */ lfd f0, 0x60(r1) +/* 80375D0C 00372C6C EC 63 20 28 */ fsubs f3, f3, f4 +/* 80375D10 00372C70 EC 80 20 28 */ fsubs f4, f0, f4 +/* 80375D14 00372C74 48 00 69 35 */ bl GXSetViewport +/* 80375D18 00372C78 3C 60 80 3F */ lis r3, lbl_803F06FC@ha +/* 80375D1C 00372C7C 38 63 06 FC */ addi r3, r3, lbl_803F06FC@l +/* 80375D20 00372C80 48 00 65 D9 */ bl GXSetProjectionv +/* 80375D24 00372C84 38 60 00 00 */ li r3, 0 +/* 80375D28 00372C88 48 00 2E 7D */ bl GXSetCoPlanar +/* 80375D2C 00372C8C 38 60 00 02 */ li r3, 2 +/* 80375D30 00372C90 48 00 2E 29 */ bl GXSetCullMode +/* 80375D34 00372C94 38 60 00 00 */ li r3, 0 +/* 80375D38 00372C98 48 00 6A 05 */ bl GXSetClipMode +/* 80375D3C 00372C9C A0 BF 00 04 */ lhz r5, 4(r31) +/* 80375D40 00372CA0 38 60 00 00 */ li r3, 0 +/* 80375D44 00372CA4 A0 DF 00 06 */ lhz r6, 6(r31) +/* 80375D48 00372CA8 38 80 00 00 */ li r4, 0 +/* 80375D4C 00372CAC 48 00 69 21 */ bl GXSetScissor +/* 80375D50 00372CB0 38 60 00 00 */ li r3, 0 +/* 80375D54 00372CB4 38 80 00 00 */ li r4, 0 +/* 80375D58 00372CB8 48 00 69 A5 */ bl GXSetScissorBoxOffset +/* 80375D5C 00372CBC 38 60 00 00 */ li r3, 0 +/* 80375D60 00372CC0 48 00 3D D1 */ bl GXSetNumChans +/* 80375D64 00372CC4 38 60 00 04 */ li r3, 4 +/* 80375D68 00372CC8 38 80 00 00 */ li r4, 0 +/* 80375D6C 00372CCC 38 A0 00 00 */ li r5, 0 +/* 80375D70 00372CD0 38 C0 00 01 */ li r6, 1 +/* 80375D74 00372CD4 38 E0 00 00 */ li r7, 0 +/* 80375D78 00372CD8 39 00 00 00 */ li r8, 0 +/* 80375D7C 00372CDC 39 20 00 02 */ li r9, 2 +/* 80375D80 00372CE0 48 00 3D F5 */ bl GXSetChanCtrl +/* 80375D84 00372CE4 80 01 00 24 */ lwz r0, 0x24(r1) +/* 80375D88 00372CE8 38 81 00 18 */ addi r4, r1, 0x18 +/* 80375D8C 00372CEC 38 60 00 04 */ li r3, 4 +/* 80375D90 00372CF0 90 01 00 18 */ stw r0, 0x18(r1) +/* 80375D94 00372CF4 48 00 3B B5 */ bl GXSetChanAmbColor +/* 80375D98 00372CF8 80 01 00 20 */ lwz r0, 0x20(r1) +/* 80375D9C 00372CFC 38 81 00 14 */ addi r4, r1, 0x14 +/* 80375DA0 00372D00 38 60 00 04 */ li r3, 4 +/* 80375DA4 00372D04 90 01 00 14 */ stw r0, 0x14(r1) +/* 80375DA8 00372D08 48 00 3C 95 */ bl GXSetChanMatColor +/* 80375DAC 00372D0C 38 60 00 05 */ li r3, 5 +/* 80375DB0 00372D10 38 80 00 00 */ li r4, 0 +/* 80375DB4 00372D14 38 A0 00 00 */ li r5, 0 +/* 80375DB8 00372D18 38 C0 00 01 */ li r6, 1 +/* 80375DBC 00372D1C 38 E0 00 00 */ li r7, 0 +/* 80375DC0 00372D20 39 00 00 00 */ li r8, 0 +/* 80375DC4 00372D24 39 20 00 02 */ li r9, 2 +/* 80375DC8 00372D28 48 00 3D AD */ bl GXSetChanCtrl +/* 80375DCC 00372D2C 80 01 00 24 */ lwz r0, 0x24(r1) +/* 80375DD0 00372D30 38 81 00 10 */ addi r4, r1, 0x10 +/* 80375DD4 00372D34 38 60 00 05 */ li r3, 5 +/* 80375DD8 00372D38 90 01 00 10 */ stw r0, 0x10(r1) +/* 80375DDC 00372D3C 48 00 3B 6D */ bl GXSetChanAmbColor +/* 80375DE0 00372D40 80 01 00 20 */ lwz r0, 0x20(r1) +/* 80375DE4 00372D44 38 81 00 0C */ addi r4, r1, 0xc +/* 80375DE8 00372D48 38 60 00 05 */ li r3, 5 +/* 80375DEC 00372D4C 90 01 00 0C */ stw r0, 0xc(r1) +/* 80375DF0 00372D50 48 00 3C 4D */ bl GXSetChanMatColor +/* 80375DF4 00372D54 48 00 4A 4D */ bl GXInvalidateTexAll +/* 80375DF8 00372D58 80 82 CE 08 */ lwz r4, lbl_805AEB28@sda21(r2) +/* 80375DFC 00372D5C 3B C0 00 00 */ li r30, 0 +/* 80375E00 00372D60 3C 60 80 37 */ lis r3, __GXDefaultTexRegionCallback@ha +/* 80375E04 00372D64 93 C4 02 C8 */ stw r30, 0x2c8(r4) +/* 80375E08 00372D68 38 63 50 AC */ addi r3, r3, __GXDefaultTexRegionCallback@l +/* 80375E0C 00372D6C 93 C4 02 CC */ stw r30, 0x2cc(r4) +/* 80375E10 00372D70 48 00 4A 79 */ bl GXSetTexRegionCallback +/* 80375E14 00372D74 3C 60 80 37 */ lis r3, __GXDefaultTlutRegionCallback@ha +/* 80375E18 00372D78 38 63 51 28 */ addi r3, r3, __GXDefaultTlutRegionCallback@l +/* 80375E1C 00372D7C 48 00 4A 81 */ bl GXSetTlutRegionCallback +/* 80375E20 00372D80 38 60 00 00 */ li r3, 0 +/* 80375E24 00372D84 38 80 00 00 */ li r4, 0 +/* 80375E28 00372D88 38 A0 00 00 */ li r5, 0 +/* 80375E2C 00372D8C 38 C0 00 04 */ li r6, 4 +/* 80375E30 00372D90 48 00 5B C5 */ bl GXSetTevOrder +/* 80375E34 00372D94 38 60 00 01 */ li r3, 1 +/* 80375E38 00372D98 38 80 00 01 */ li r4, 1 +/* 80375E3C 00372D9C 38 A0 00 01 */ li r5, 1 +/* 80375E40 00372DA0 38 C0 00 04 */ li r6, 4 +/* 80375E44 00372DA4 48 00 5B B1 */ bl GXSetTevOrder +/* 80375E48 00372DA8 38 60 00 02 */ li r3, 2 +/* 80375E4C 00372DAC 38 80 00 02 */ li r4, 2 +/* 80375E50 00372DB0 38 A0 00 02 */ li r5, 2 +/* 80375E54 00372DB4 38 C0 00 04 */ li r6, 4 +/* 80375E58 00372DB8 48 00 5B 9D */ bl GXSetTevOrder +/* 80375E5C 00372DBC 38 60 00 03 */ li r3, 3 +/* 80375E60 00372DC0 38 80 00 03 */ li r4, 3 +/* 80375E64 00372DC4 38 A0 00 03 */ li r5, 3 +/* 80375E68 00372DC8 38 C0 00 04 */ li r6, 4 +/* 80375E6C 00372DCC 48 00 5B 89 */ bl GXSetTevOrder +/* 80375E70 00372DD0 38 60 00 04 */ li r3, 4 +/* 80375E74 00372DD4 38 80 00 04 */ li r4, 4 +/* 80375E78 00372DD8 38 A0 00 04 */ li r5, 4 +/* 80375E7C 00372DDC 38 C0 00 04 */ li r6, 4 +/* 80375E80 00372DE0 48 00 5B 75 */ bl GXSetTevOrder +/* 80375E84 00372DE4 38 60 00 05 */ li r3, 5 +/* 80375E88 00372DE8 38 80 00 05 */ li r4, 5 +/* 80375E8C 00372DEC 38 A0 00 05 */ li r5, 5 +/* 80375E90 00372DF0 38 C0 00 04 */ li r6, 4 +/* 80375E94 00372DF4 48 00 5B 61 */ bl GXSetTevOrder +/* 80375E98 00372DF8 38 60 00 06 */ li r3, 6 +/* 80375E9C 00372DFC 38 80 00 06 */ li r4, 6 +/* 80375EA0 00372E00 38 A0 00 06 */ li r5, 6 +/* 80375EA4 00372E04 38 C0 00 04 */ li r6, 4 +/* 80375EA8 00372E08 48 00 5B 4D */ bl GXSetTevOrder +/* 80375EAC 00372E0C 38 60 00 07 */ li r3, 7 +/* 80375EB0 00372E10 38 80 00 07 */ li r4, 7 +/* 80375EB4 00372E14 38 A0 00 07 */ li r5, 7 +/* 80375EB8 00372E18 38 C0 00 04 */ li r6, 4 +/* 80375EBC 00372E1C 48 00 5B 39 */ bl GXSetTevOrder +/* 80375EC0 00372E20 38 60 00 08 */ li r3, 8 +/* 80375EC4 00372E24 38 80 00 FF */ li r4, 0xff +/* 80375EC8 00372E28 38 A0 00 FF */ li r5, 0xff +/* 80375ECC 00372E2C 38 C0 00 FF */ li r6, 0xff +/* 80375ED0 00372E30 48 00 5B 25 */ bl GXSetTevOrder +/* 80375ED4 00372E34 38 60 00 09 */ li r3, 9 +/* 80375ED8 00372E38 38 80 00 FF */ li r4, 0xff +/* 80375EDC 00372E3C 38 A0 00 FF */ li r5, 0xff +/* 80375EE0 00372E40 38 C0 00 FF */ li r6, 0xff +/* 80375EE4 00372E44 48 00 5B 11 */ bl GXSetTevOrder +/* 80375EE8 00372E48 38 60 00 0A */ li r3, 0xa +/* 80375EEC 00372E4C 38 80 00 FF */ li r4, 0xff +/* 80375EF0 00372E50 38 A0 00 FF */ li r5, 0xff +/* 80375EF4 00372E54 38 C0 00 FF */ li r6, 0xff +/* 80375EF8 00372E58 48 00 5A FD */ bl GXSetTevOrder +/* 80375EFC 00372E5C 38 60 00 0B */ li r3, 0xb +/* 80375F00 00372E60 38 80 00 FF */ li r4, 0xff +/* 80375F04 00372E64 38 A0 00 FF */ li r5, 0xff +/* 80375F08 00372E68 38 C0 00 FF */ li r6, 0xff +/* 80375F0C 00372E6C 48 00 5A E9 */ bl GXSetTevOrder +/* 80375F10 00372E70 38 60 00 0C */ li r3, 0xc +/* 80375F14 00372E74 38 80 00 FF */ li r4, 0xff +/* 80375F18 00372E78 38 A0 00 FF */ li r5, 0xff +/* 80375F1C 00372E7C 38 C0 00 FF */ li r6, 0xff +/* 80375F20 00372E80 48 00 5A D5 */ bl GXSetTevOrder +/* 80375F24 00372E84 38 60 00 0D */ li r3, 0xd +/* 80375F28 00372E88 38 80 00 FF */ li r4, 0xff +/* 80375F2C 00372E8C 38 A0 00 FF */ li r5, 0xff +/* 80375F30 00372E90 38 C0 00 FF */ li r6, 0xff +/* 80375F34 00372E94 48 00 5A C1 */ bl GXSetTevOrder +/* 80375F38 00372E98 38 60 00 0E */ li r3, 0xe +/* 80375F3C 00372E9C 38 80 00 FF */ li r4, 0xff +/* 80375F40 00372EA0 38 A0 00 FF */ li r5, 0xff +/* 80375F44 00372EA4 38 C0 00 FF */ li r6, 0xff +/* 80375F48 00372EA8 48 00 5A AD */ bl GXSetTevOrder +/* 80375F4C 00372EAC 38 60 00 0F */ li r3, 0xf +/* 80375F50 00372EB0 38 80 00 FF */ li r4, 0xff +/* 80375F54 00372EB4 38 A0 00 FF */ li r5, 0xff +/* 80375F58 00372EB8 38 C0 00 FF */ li r6, 0xff +/* 80375F5C 00372EBC 48 00 5A 99 */ bl GXSetTevOrder +/* 80375F60 00372EC0 38 60 00 01 */ li r3, 1 +/* 80375F64 00372EC4 48 00 5C 69 */ bl GXSetNumTevStages +/* 80375F68 00372EC8 38 60 00 00 */ li r3, 0 +/* 80375F6C 00372ECC 38 80 00 03 */ li r4, 3 +/* 80375F70 00372ED0 48 00 54 A9 */ bl GXSetTevOp +/* 80375F74 00372ED4 38 60 00 07 */ li r3, 7 +/* 80375F78 00372ED8 38 80 00 00 */ li r4, 0 +/* 80375F7C 00372EDC 38 A0 00 00 */ li r5, 0 +/* 80375F80 00372EE0 38 C0 00 07 */ li r6, 7 +/* 80375F84 00372EE4 38 E0 00 00 */ li r7, 0 +/* 80375F88 00372EE8 48 00 59 95 */ bl GXSetAlphaCompare +/* 80375F8C 00372EEC 38 60 00 00 */ li r3, 0 +/* 80375F90 00372EF0 38 80 00 11 */ li r4, 0x11 +/* 80375F94 00372EF4 38 A0 00 00 */ li r5, 0 +/* 80375F98 00372EF8 48 00 59 D9 */ bl GXSetZTexture +/* 80375F9C 00372EFC 48 00 00 04 */ b lbl_80375FA0 +lbl_80375FA0: +/* 80375FA0 00372F00 48 00 00 04 */ b lbl_80375FA4 +lbl_80375FA4: +/* 80375FA4 00372F04 48 00 00 04 */ b lbl_80375FA8 +lbl_80375FA8: +/* 80375FA8 00372F08 7F C3 F3 78 */ mr r3, r30 +/* 80375FAC 00372F0C 38 80 00 06 */ li r4, 6 +/* 80375FB0 00372F10 48 00 57 A9 */ bl GXSetTevKColorSel +/* 80375FB4 00372F14 7F C3 F3 78 */ mr r3, r30 +/* 80375FB8 00372F18 38 80 00 00 */ li r4, 0 +/* 80375FBC 00372F1C 48 00 58 09 */ bl GXSetTevKAlphaSel +/* 80375FC0 00372F20 7F C3 F3 78 */ mr r3, r30 +/* 80375FC4 00372F24 38 80 00 00 */ li r4, 0 +/* 80375FC8 00372F28 38 A0 00 00 */ li r5, 0 +/* 80375FCC 00372F2C 48 00 58 65 */ bl GXSetTevSwapMode +/* 80375FD0 00372F30 3B DE 00 01 */ addi r30, r30, 1 +/* 80375FD4 00372F34 28 1E 00 10 */ cmplwi r30, 0x10 +/* 80375FD8 00372F38 41 80 FF D0 */ blt lbl_80375FA8 +/* 80375FDC 00372F3C 38 60 00 00 */ li r3, 0 +/* 80375FE0 00372F40 38 80 00 00 */ li r4, 0 +/* 80375FE4 00372F44 38 A0 00 01 */ li r5, 1 +/* 80375FE8 00372F48 38 C0 00 02 */ li r6, 2 +/* 80375FEC 00372F4C 38 E0 00 03 */ li r7, 3 +/* 80375FF0 00372F50 48 00 58 95 */ bl GXSetTevSwapModeTable +/* 80375FF4 00372F54 38 60 00 01 */ li r3, 1 +/* 80375FF8 00372F58 38 80 00 00 */ li r4, 0 +/* 80375FFC 00372F5C 38 A0 00 00 */ li r5, 0 +/* 80376000 00372F60 38 C0 00 00 */ li r6, 0 +/* 80376004 00372F64 38 E0 00 03 */ li r7, 3 +/* 80376008 00372F68 48 00 58 7D */ bl GXSetTevSwapModeTable +/* 8037600C 00372F6C 38 60 00 02 */ li r3, 2 +/* 80376010 00372F70 38 80 00 01 */ li r4, 1 +/* 80376014 00372F74 38 A0 00 01 */ li r5, 1 +/* 80376018 00372F78 38 C0 00 01 */ li r6, 1 +/* 8037601C 00372F7C 38 E0 00 03 */ li r7, 3 +/* 80376020 00372F80 48 00 58 65 */ bl GXSetTevSwapModeTable +/* 80376024 00372F84 38 60 00 03 */ li r3, 3 +/* 80376028 00372F88 38 80 00 02 */ li r4, 2 +/* 8037602C 00372F8C 38 A0 00 02 */ li r5, 2 +/* 80376030 00372F90 38 C0 00 02 */ li r6, 2 +/* 80376034 00372F94 38 E0 00 03 */ li r7, 3 +/* 80376038 00372F98 48 00 58 4D */ bl GXSetTevSwapModeTable +/* 8037603C 00372F9C 3B C0 00 00 */ li r30, 0 +/* 80376040 00372FA0 48 00 00 04 */ b lbl_80376044 +lbl_80376044: +/* 80376044 00372FA4 48 00 00 04 */ b lbl_80376048 +lbl_80376048: +/* 80376048 00372FA8 48 00 00 04 */ b lbl_8037604C +lbl_8037604C: +/* 8037604C 00372FAC 7F C3 F3 78 */ mr r3, r30 +/* 80376050 00372FB0 48 00 52 91 */ bl GXSetTevDirect +/* 80376054 00372FB4 3B DE 00 01 */ addi r30, r30, 1 +/* 80376058 00372FB8 28 1E 00 10 */ cmplwi r30, 0x10 +/* 8037605C 00372FBC 41 80 FF F0 */ blt lbl_8037604C +/* 80376060 00372FC0 38 60 00 00 */ li r3, 0 +/* 80376064 00372FC4 48 00 52 55 */ bl GXSetNumIndStages +/* 80376068 00372FC8 38 60 00 00 */ li r3, 0 +/* 8037606C 00372FCC 38 80 00 00 */ li r4, 0 +/* 80376070 00372FD0 38 A0 00 00 */ li r5, 0 +/* 80376074 00372FD4 48 00 4F B5 */ bl GXSetIndTexCoordScale +/* 80376078 00372FD8 38 60 00 01 */ li r3, 1 +/* 8037607C 00372FDC 38 80 00 00 */ li r4, 0 +/* 80376080 00372FE0 38 A0 00 00 */ li r5, 0 +/* 80376084 00372FE4 48 00 4F A5 */ bl GXSetIndTexCoordScale +/* 80376088 00372FE8 38 60 00 02 */ li r3, 2 +/* 8037608C 00372FEC 38 80 00 00 */ li r4, 0 +/* 80376090 00372FF0 38 A0 00 00 */ li r5, 0 +/* 80376094 00372FF4 48 00 4F 95 */ bl GXSetIndTexCoordScale +/* 80376098 00372FF8 38 60 00 03 */ li r3, 3 +/* 8037609C 00372FFC 38 80 00 00 */ li r4, 0 +/* 803760A0 00373000 38 A0 00 00 */ li r5, 0 +/* 803760A4 00373004 48 00 4F 85 */ bl GXSetIndTexCoordScale +/* 803760A8 00373008 C0 42 CE 18 */ lfs f2, lbl_805AEB38@sda21(r2) +/* 803760AC 0037300C 38 81 00 08 */ addi r4, r1, 8 +/* 803760B0 00373010 80 01 00 24 */ lwz r0, 0x24(r1) +/* 803760B4 00373014 38 60 00 00 */ li r3, 0 +/* 803760B8 00373018 FC 80 10 90 */ fmr f4, f2 +/* 803760BC 0037301C 90 01 00 08 */ stw r0, 8(r1) +/* 803760C0 00373020 C0 22 CE 1C */ lfs f1, lbl_805AEB3C@sda21(r2) +/* 803760C4 00373024 C0 62 CE 20 */ lfs f3, lbl_805AEB40@sda21(r2) +/* 803760C8 00373028 48 00 5B 35 */ bl GXSetFog +/* 803760CC 0037302C 38 60 00 00 */ li r3, 0 +/* 803760D0 00373030 38 80 00 00 */ li r4, 0 +/* 803760D4 00373034 38 A0 00 00 */ li r5, 0 +/* 803760D8 00373038 48 00 5C D5 */ bl GXSetFogRangeAdj +/* 803760DC 0037303C 38 60 00 00 */ li r3, 0 +/* 803760E0 00373040 38 80 00 04 */ li r4, 4 +/* 803760E4 00373044 38 A0 00 05 */ li r5, 5 +/* 803760E8 00373048 38 C0 00 00 */ li r6, 0 +/* 803760EC 0037304C 48 00 5D C1 */ bl GXSetBlendMode +/* 803760F0 00373050 38 60 00 01 */ li r3, 1 +/* 803760F4 00373054 48 00 5E 0D */ bl GXSetColorUpdate +/* 803760F8 00373058 38 60 00 01 */ li r3, 1 +/* 803760FC 0037305C 48 00 5E 31 */ bl GXSetAlphaUpdate +/* 80376100 00373060 38 60 00 01 */ li r3, 1 +/* 80376104 00373064 38 80 00 03 */ li r4, 3 +/* 80376108 00373068 38 A0 00 01 */ li r5, 1 +/* 8037610C 0037306C 48 00 5E 4D */ bl GXSetZMode +/* 80376110 00373070 38 60 00 01 */ li r3, 1 +/* 80376114 00373074 48 00 5E 79 */ bl GXSetZCompLoc +/* 80376118 00373078 38 60 00 01 */ li r3, 1 +/* 8037611C 0037307C 48 00 5F 91 */ bl GXSetDither +/* 80376120 00373080 38 60 00 00 */ li r3, 0 +/* 80376124 00373084 38 80 00 00 */ li r4, 0 +/* 80376128 00373088 48 00 5F B9 */ bl GXSetDstAlpha +/* 8037612C 0037308C 38 60 00 00 */ li r3, 0 +/* 80376130 00373090 38 80 00 00 */ li r4, 0 +/* 80376134 00373094 48 00 5E 91 */ bl GXSetPixelFmt +/* 80376138 00373098 38 60 00 01 */ li r3, 1 +/* 8037613C 0037309C 38 80 00 01 */ li r4, 1 +/* 80376140 003730A0 48 00 5F DD */ bl GXSetFieldMask +/* 80376144 003730A4 A0 1F 00 08 */ lhz r0, 8(r31) +/* 80376148 003730A8 A0 7F 00 10 */ lhz r3, 0x10(r31) +/* 8037614C 003730AC 54 00 08 3C */ slwi r0, r0, 1 +/* 80376150 003730B0 7C 03 00 00 */ cmpw r3, r0 +/* 80376154 003730B4 40 82 00 0C */ bne lbl_80376160 +/* 80376158 003730B8 38 80 00 01 */ li r4, 1 +/* 8037615C 003730BC 48 00 00 08 */ b lbl_80376164 +lbl_80376160: +/* 80376160 003730C0 38 80 00 00 */ li r4, 0 +lbl_80376164: +/* 80376164 003730C4 88 7F 00 18 */ lbz r3, 0x18(r31) +/* 80376168 003730C8 48 00 5F ED */ bl GXSetFieldMode +/* 8037616C 003730CC A0 BF 00 04 */ lhz r5, 4(r31) +/* 80376170 003730D0 38 60 00 00 */ li r3, 0 +/* 80376174 003730D4 A0 DF 00 06 */ lhz r6, 6(r31) +/* 80376178 003730D8 38 80 00 00 */ li r4, 0 +/* 8037617C 003730DC 48 00 2B A9 */ bl GXSetDispCopySrc +/* 80376180 003730E0 A0 7F 00 04 */ lhz r3, 4(r31) +/* 80376184 003730E4 A0 9F 00 06 */ lhz r4, 6(r31) +/* 80376188 003730E8 48 00 2C BD */ bl GXSetDispCopyDst +/* 8037618C 003730EC A0 9F 00 08 */ lhz r4, 8(r31) +/* 80376190 003730F0 3C 60 43 30 */ lis r3, 0x4330 +/* 80376194 003730F4 A0 1F 00 06 */ lhz r0, 6(r31) +/* 80376198 003730F8 90 81 00 64 */ stw r4, 0x64(r1) +/* 8037619C 003730FC C8 42 CE 28 */ lfd f2, lbl_805AEB48@sda21(r2) +/* 803761A0 00373100 90 01 00 6C */ stw r0, 0x6c(r1) +/* 803761A4 00373104 90 61 00 60 */ stw r3, 0x60(r1) +/* 803761A8 00373108 90 61 00 68 */ stw r3, 0x68(r1) +/* 803761AC 0037310C C8 21 00 60 */ lfd f1, 0x60(r1) +/* 803761B0 00373110 C8 01 00 68 */ lfd f0, 0x68(r1) +/* 803761B4 00373114 EC 21 10 28 */ fsubs f1, f1, f2 +/* 803761B8 00373118 EC 00 10 28 */ fsubs f0, f0, f2 +/* 803761BC 0037311C EC 21 00 24 */ fdivs f1, f1, f0 +/* 803761C0 00373120 48 00 2E A5 */ bl GXSetDispCopyYScale +/* 803761C4 00373124 38 60 00 03 */ li r3, 3 +/* 803761C8 00373128 48 00 2E 35 */ bl GXSetCopyClamp +/* 803761CC 0037312C 88 7F 00 19 */ lbz r3, 0x19(r31) +/* 803761D0 00373130 38 9F 00 1A */ addi r4, r31, 0x1a +/* 803761D4 00373134 38 DF 00 32 */ addi r6, r31, 0x32 +/* 803761D8 00373138 38 A0 00 01 */ li r5, 1 +/* 803761DC 0037313C 48 00 2F B9 */ bl GXSetCopyFilter +/* 803761E0 00373140 38 60 00 00 */ li r3, 0 +/* 803761E4 00373144 48 00 31 D9 */ bl GXSetDispCopyGamma +/* 803761E8 00373148 38 60 00 00 */ li r3, 0 +/* 803761EC 0037314C 48 00 2D E9 */ bl GXSetDispCopyFrame2Field +/* 803761F0 00373150 48 00 34 C1 */ bl GXClearBoundingBox +/* 803761F4 00373154 38 60 00 01 */ li r3, 1 +/* 803761F8 00373158 48 00 24 5D */ bl GXPokeColorUpdate +/* 803761FC 0037315C 38 60 00 01 */ li r3, 1 +/* 80376200 00373160 48 00 23 B1 */ bl GXPokeAlphaUpdate +/* 80376204 00373164 38 60 00 00 */ li r3, 0 +/* 80376208 00373168 48 00 24 7D */ bl GXPokeDither +/* 8037620C 0037316C 38 60 00 00 */ li r3, 0 +/* 80376210 00373170 38 80 00 00 */ li r4, 0 +/* 80376214 00373174 38 A0 00 01 */ li r5, 1 +/* 80376218 00373178 38 C0 00 0F */ li r6, 0xf +/* 8037621C 0037317C 48 00 23 B1 */ bl GXPokeBlendMode +/* 80376220 00373180 38 60 00 07 */ li r3, 7 +/* 80376224 00373184 38 80 00 00 */ li r4, 0 +/* 80376228 00373188 48 00 23 61 */ bl GXPokeAlphaMode +/* 8037622C 0037318C 38 60 00 01 */ li r3, 1 +/* 80376230 00373190 48 00 23 6D */ bl GXPokeAlphaRead +/* 80376234 00373194 38 60 00 00 */ li r3, 0 +/* 80376238 00373198 38 80 00 00 */ li r4, 0 +/* 8037623C 0037319C 48 00 24 35 */ bl GXPokeDstAlpha +/* 80376240 003731A0 38 60 00 01 */ li r3, 1 +/* 80376244 003731A4 38 80 00 07 */ li r4, 7 +/* 80376248 003731A8 38 A0 00 01 */ li r5, 1 +/* 8037624C 003731AC 48 00 24 55 */ bl GXPokeZMode +/* 80376250 003731B0 38 60 00 23 */ li r3, 0x23 +/* 80376254 003731B4 38 80 00 16 */ li r4, 0x16 +/* 80376258 003731B8 48 00 65 91 */ bl GXSetGPMetric +/* 8037625C 003731BC 48 00 6D D5 */ bl GXClearGPMetric +/* 80376260 003731C0 80 01 00 84 */ lwz r0, 0x84(r1) +/* 80376264 003731C4 83 E1 00 7C */ lwz r31, 0x7c(r1) +/* 80376268 003731C8 83 C1 00 78 */ lwz r30, 0x78(r1) +/* 8037626C 003731CC 83 A1 00 74 */ lwz r29, 0x74(r1) +/* 80376270 003731D0 38 21 00 80 */ addi r1, r1, 0x80 +/* 80376274 003731D4 7C 08 03 A6 */ mtlr r0 +/* 80376278 003731D8 4E 80 00 20 */ blr diff --git a/asm/Dolphin/GX/GXLight.s b/asm/Dolphin/GX/GXLight.s new file mode 100644 index 00000000..22278b85 --- /dev/null +++ b/asm/Dolphin/GX/GXLight.s @@ -0,0 +1,398 @@ +.include "macros.inc" + +.section .text, "ax" + +.global GXInitLightAttn +GXInitLightAttn: +/* 803796E8 00376648 D0 23 00 10 */ stfs f1, 0x10(r3) +/* 803796EC 0037664C D0 43 00 14 */ stfs f2, 0x14(r3) +/* 803796F0 00376650 D0 63 00 18 */ stfs f3, 0x18(r3) +/* 803796F4 00376654 D0 83 00 1C */ stfs f4, 0x1c(r3) +/* 803796F8 00376658 D0 A3 00 20 */ stfs f5, 0x20(r3) +/* 803796FC 0037665C D0 C3 00 24 */ stfs f6, 0x24(r3) +/* 80379700 00376660 4E 80 00 20 */ blr + +.global GXInitLightSpot +GXInitLightSpot: +/* 80379704 00376664 7C 08 02 A6 */ mflr r0 +/* 80379708 00376668 90 01 00 04 */ stw r0, 4(r1) +/* 8037970C 0037666C 94 21 FF E0 */ stwu r1, -0x20(r1) +/* 80379710 00376670 93 E1 00 1C */ stw r31, 0x1c(r1) +/* 80379714 00376674 3B E4 00 00 */ addi r31, r4, 0 +/* 80379718 00376678 93 C1 00 18 */ stw r30, 0x18(r1) +/* 8037971C 0037667C 3B C3 00 00 */ addi r30, r3, 0 +/* 80379720 00376680 C0 02 CE 38 */ lfs f0, lbl_805AEB58@sda21(r2) +/* 80379724 00376684 FC 01 00 40 */ fcmpo cr0, f1, f0 +/* 80379728 00376688 4C 40 13 82 */ cror 2, 0, 2 +/* 8037972C 0037668C 41 82 00 10 */ beq lbl_8037973C +/* 80379730 00376690 C0 02 CE 3C */ lfs f0, lbl_805AEB5C@sda21(r2) +/* 80379734 00376694 FC 01 00 40 */ fcmpo cr0, f1, f0 +/* 80379738 00376698 40 81 00 08 */ ble lbl_80379740 +lbl_8037973C: +/* 8037973C 0037669C 3B E0 00 00 */ li r31, 0 +lbl_80379740: +/* 80379740 003766A0 C0 42 CE 40 */ lfs f2, lbl_805AEB60@sda21(r2) +/* 80379744 003766A4 C0 02 CE 44 */ lfs f0, lbl_805AEB64@sda21(r2) +/* 80379748 003766A8 EC 22 00 72 */ fmuls f1, f2, f1 +/* 8037974C 003766AC EC 21 00 24 */ fdivs f1, f1, f0 +/* 80379750 003766B0 48 01 B5 BD */ bl cosf +/* 80379754 003766B4 28 1F 00 06 */ cmplwi r31, 6 +/* 80379758 003766B8 41 81 01 0C */ bgt lbl_80379864 +/* 8037975C 003766BC 3C 60 80 3F */ lis r3, lbl_803F09D0@ha +/* 80379760 003766C0 38 63 09 D0 */ addi r3, r3, lbl_803F09D0@l +/* 80379764 003766C4 57 E0 10 3A */ slwi r0, r31, 2 +/* 80379768 003766C8 7C 03 00 2E */ lwzx r0, r3, r0 +/* 8037976C 003766CC 7C 09 03 A6 */ mtctr r0 +/* 80379770 003766D0 4E 80 04 20 */ bctr +/* 80379774 003766D4 C0 02 CE 48 */ lfs f0, lbl_805AEB68@sda21(r2) +/* 80379778 003766D8 C0 82 CE 4C */ lfs f4, lbl_805AEB6C@sda21(r2) +/* 8037977C 003766DC EC 60 00 72 */ fmuls f3, f0, f1 +/* 80379780 003766E0 C0 C2 CE 38 */ lfs f6, lbl_805AEB58@sda21(r2) +/* 80379784 003766E4 48 00 00 EC */ b lbl_80379870 +/* 80379788 003766E8 C0 42 CE 50 */ lfs f2, lbl_805AEB70@sda21(r2) +/* 8037978C 003766EC FC 00 08 50 */ fneg f0, f1 +/* 80379790 003766F0 C0 C2 CE 38 */ lfs f6, lbl_805AEB58@sda21(r2) +/* 80379794 003766F4 EC 22 08 28 */ fsubs f1, f2, f1 +/* 80379798 003766F8 EC 22 08 24 */ fdivs f1, f2, f1 +/* 8037979C 003766FC FC 80 08 90 */ fmr f4, f1 +/* 803797A0 00376700 EC 60 00 72 */ fmuls f3, f0, f1 +/* 803797A4 00376704 48 00 00 CC */ b lbl_80379870 +/* 803797A8 00376708 C0 42 CE 50 */ lfs f2, lbl_805AEB70@sda21(r2) +/* 803797AC 0037670C FC 00 08 50 */ fneg f0, f1 +/* 803797B0 00376710 C0 62 CE 38 */ lfs f3, lbl_805AEB58@sda21(r2) +/* 803797B4 00376714 EC 22 08 28 */ fsubs f1, f2, f1 +/* 803797B8 00376718 EC 22 08 24 */ fdivs f1, f2, f1 +/* 803797BC 0037671C FC C0 08 90 */ fmr f6, f1 +/* 803797C0 00376720 EC 80 00 72 */ fmuls f4, f0, f1 +/* 803797C4 00376724 48 00 00 AC */ b lbl_80379870 +/* 803797C8 00376728 C0 82 CE 50 */ lfs f4, lbl_805AEB70@sda21(r2) +/* 803797CC 0037672C C0 42 CE 54 */ lfs f2, lbl_805AEB74@sda21(r2) +/* 803797D0 00376730 EC 64 08 28 */ fsubs f3, f4, f1 +/* 803797D4 00376734 EC 01 10 28 */ fsubs f0, f1, f2 +/* 803797D8 00376738 EC 63 00 F2 */ fmuls f3, f3, f3 +/* 803797DC 0037673C EC 01 00 32 */ fmuls f0, f1, f0 +/* 803797E0 00376740 EC 24 18 24 */ fdivs f1, f4, f3 +/* 803797E4 00376744 EC 61 00 32 */ fmuls f3, f1, f0 +/* 803797E8 00376748 EC 82 00 72 */ fmuls f4, f2, f1 +/* 803797EC 0037674C FC C0 08 50 */ fneg f6, f1 +/* 803797F0 00376750 48 00 00 80 */ b lbl_80379870 +/* 803797F4 00376754 C0 A2 CE 50 */ lfs f5, lbl_805AEB70@sda21(r2) +/* 803797F8 00376758 C0 62 CE 58 */ lfs f3, lbl_805AEB78@sda21(r2) +/* 803797FC 0037675C EC 85 08 28 */ fsubs f4, f5, f1 +/* 80379800 00376760 C0 42 CE 5C */ lfs f2, lbl_805AEB7C@sda21(r2) +/* 80379804 00376764 EC 05 08 2A */ fadds f0, f5, f1 +/* 80379808 00376768 EC 84 01 32 */ fmuls f4, f4, f4 +/* 8037980C 0037676C EC 02 00 32 */ fmuls f0, f2, f0 +/* 80379810 00376770 EC 85 20 24 */ fdivs f4, f5, f4 +/* 80379814 00376774 EC 43 01 32 */ fmuls f2, f3, f4 +/* 80379818 00376778 EC 80 01 32 */ fmuls f4, f0, f4 +/* 8037981C 0037677C FC C0 10 90 */ fmr f6, f2 +/* 80379820 00376780 EC 62 00 72 */ fmuls f3, f2, f1 +/* 80379824 00376784 48 00 00 4C */ b lbl_80379870 +/* 80379828 00376788 C0 A2 CE 50 */ lfs f5, lbl_805AEB70@sda21(r2) +/* 8037982C 0037678C C0 02 CE 54 */ lfs f0, lbl_805AEB74@sda21(r2) +/* 80379830 00376790 EC 85 08 28 */ fsubs f4, f5, f1 +/* 80379834 00376794 C0 42 CE 5C */ lfs f2, lbl_805AEB7C@sda21(r2) +/* 80379838 00376798 EC 60 00 72 */ fmuls f3, f0, f1 +/* 8037983C 0037679C C0 02 CE 60 */ lfs f0, lbl_805AEB80@sda21(r2) +/* 80379840 003767A0 EC 42 00 72 */ fmuls f2, f2, f1 +/* 80379844 003767A4 EC 84 01 32 */ fmuls f4, f4, f4 +/* 80379848 003767A8 EC 23 00 72 */ fmuls f1, f3, f1 +/* 8037984C 003767AC EC 65 20 24 */ fdivs f3, f5, f4 +/* 80379850 003767B0 EC 23 00 72 */ fmuls f1, f3, f1 +/* 80379854 003767B4 EC 82 00 F2 */ fmuls f4, f2, f3 +/* 80379858 003767B8 EC C0 00 F2 */ fmuls f6, f0, f3 +/* 8037985C 003767BC EC 65 08 28 */ fsubs f3, f5, f1 +/* 80379860 003767C0 48 00 00 10 */ b lbl_80379870 +lbl_80379864: +/* 80379864 003767C4 C0 82 CE 38 */ lfs f4, lbl_805AEB58@sda21(r2) +/* 80379868 003767C8 C0 62 CE 50 */ lfs f3, lbl_805AEB70@sda21(r2) +/* 8037986C 003767CC FC C0 20 90 */ fmr f6, f4 +lbl_80379870: +/* 80379870 003767D0 D0 7E 00 10 */ stfs f3, 0x10(r30) +/* 80379874 003767D4 D0 9E 00 14 */ stfs f4, 0x14(r30) +/* 80379878 003767D8 D0 DE 00 18 */ stfs f6, 0x18(r30) +/* 8037987C 003767DC 80 01 00 24 */ lwz r0, 0x24(r1) +/* 80379880 003767E0 83 E1 00 1C */ lwz r31, 0x1c(r1) +/* 80379884 003767E4 83 C1 00 18 */ lwz r30, 0x18(r1) +/* 80379888 003767E8 38 21 00 20 */ addi r1, r1, 0x20 +/* 8037988C 003767EC 7C 08 03 A6 */ mtlr r0 +/* 80379890 003767F0 4E 80 00 20 */ blr + +.global GXInitLightPos +GXInitLightPos: +/* 80379894 003767F4 D0 23 00 28 */ stfs f1, 0x28(r3) +/* 80379898 003767F8 D0 43 00 2C */ stfs f2, 0x2c(r3) +/* 8037989C 003767FC D0 63 00 30 */ stfs f3, 0x30(r3) +/* 803798A0 00376800 4E 80 00 20 */ blr + +.global GXInitLightDir +GXInitLightDir: +/* 803798A4 00376804 FC 80 08 50 */ fneg f4, f1 +/* 803798A8 00376808 FC 20 10 50 */ fneg f1, f2 +/* 803798AC 0037680C FC 00 18 50 */ fneg f0, f3 +/* 803798B0 00376810 D0 83 00 34 */ stfs f4, 0x34(r3) +/* 803798B4 00376814 D0 23 00 38 */ stfs f1, 0x38(r3) +/* 803798B8 00376818 D0 03 00 3C */ stfs f0, 0x3c(r3) +/* 803798BC 0037681C 4E 80 00 20 */ blr + +.global GXInitLightColor +GXInitLightColor: +/* 803798C0 00376820 80 04 00 00 */ lwz r0, 0(r4) +/* 803798C4 00376824 90 03 00 0C */ stw r0, 0xc(r3) +/* 803798C8 00376828 4E 80 00 20 */ blr + +.global GXLoadLightObjImm +GXLoadLightObjImm: +/* 803798CC 0037682C 7C 80 00 34 */ cntlzw r0, r4 +/* 803798D0 00376830 20 00 00 1F */ subfic r0, r0, 0x1f +/* 803798D4 00376834 54 05 26 76 */ rlwinm r5, r0, 4, 0x19, 0x1b +/* 803798D8 00376838 3C 80 CC 01 */ lis r4, 0xCC008000@ha +/* 803798DC 0037683C 38 00 00 10 */ li r0, 0x10 +/* 803798E0 00376840 38 A5 06 00 */ addi r5, r5, 0x600 +/* 803798E4 00376844 98 04 80 00 */ stb r0, 0xCC008000@l(r4) +/* 803798E8 00376848 64 A0 00 0F */ oris r0, r5, 0xf +/* 803798EC 0037684C 94 04 80 00 */ stwu r0, 0xCC008000@l(r4) +/* 803798F0 00376850 80 03 00 0C */ lwz r0, 0xc(r3) +/* 803798F4 00376854 7C C6 32 78 */ xor r6, r6, r6 +/* 803798F8 00376858 E0 A3 00 10 */ psq_l f5, 16(r3), 0, qr0 +/* 803798FC 0037685C E0 83 00 18 */ psq_l f4, 24(r3), 0, qr0 +/* 80379900 00376860 E0 63 00 20 */ psq_l f3, 32(r3), 0, qr0 +/* 80379904 00376864 E0 43 00 28 */ psq_l f2, 40(r3), 0, qr0 +/* 80379908 00376868 E0 23 00 30 */ psq_l f1, 48(r3), 0, qr0 +/* 8037990C 0037686C E0 03 00 38 */ psq_l f0, 56(r3), 0, qr0 +/* 80379910 00376870 90 C4 00 00 */ stw r6, 0(r4) +/* 80379914 00376874 90 C4 00 00 */ stw r6, 0(r4) +/* 80379918 00376878 90 C4 00 00 */ stw r6, 0(r4) +/* 8037991C 0037687C 90 04 00 00 */ stw r0, 0(r4) +/* 80379920 00376880 F0 A4 00 00 */ psq_st f5, 0(r4), 0, qr0 +/* 80379924 00376884 F0 84 00 00 */ psq_st f4, 0(r4), 0, qr0 +/* 80379928 00376888 F0 64 00 00 */ psq_st f3, 0(r4), 0, qr0 +/* 8037992C 0037688C F0 44 00 00 */ psq_st f2, 0(r4), 0, qr0 +/* 80379930 00376890 F0 24 00 00 */ psq_st f1, 0(r4), 0, qr0 +/* 80379934 00376894 F0 04 00 00 */ psq_st f0, 0(r4), 0, qr0 +/* 80379938 00376898 80 62 CE 08 */ lwz r3, lbl_805AEB28@sda21(r2) +/* 8037993C 0037689C 38 00 00 01 */ li r0, 1 +/* 80379940 003768A0 B0 03 00 02 */ sth r0, 2(r3) +/* 80379944 003768A4 4E 80 00 20 */ blr + +.global GXSetChanAmbColor +GXSetChanAmbColor: +/* 80379948 003768A8 2C 03 00 03 */ cmpwi r3, 3 +/* 8037994C 003768AC 41 82 00 88 */ beq lbl_803799D4 +/* 80379950 003768B0 40 80 00 1C */ bge lbl_8037996C +/* 80379954 003768B4 2C 03 00 01 */ cmpwi r3, 1 +/* 80379958 003768B8 41 82 00 44 */ beq lbl_8037999C +/* 8037995C 003768BC 40 80 00 60 */ bge lbl_803799BC +/* 80379960 003768C0 2C 03 00 00 */ cmpwi r3, 0 +/* 80379964 003768C4 40 80 00 18 */ bge lbl_8037997C +/* 80379968 003768C8 4E 80 00 20 */ blr +lbl_8037996C: +/* 8037996C 003768CC 2C 03 00 05 */ cmpwi r3, 5 +/* 80379970 003768D0 41 82 00 88 */ beq lbl_803799F8 +/* 80379974 003768D4 4C 80 00 20 */ bgelr +/* 80379978 003768D8 48 00 00 74 */ b lbl_803799EC +lbl_8037997C: +/* 8037997C 003768DC 80 62 CE 08 */ lwz r3, lbl_805AEB28@sda21(r2) +/* 80379980 003768E0 38 A0 00 00 */ li r5, 0 +/* 80379984 003768E4 80 04 00 00 */ lwz r0, 0(r4) +/* 80379988 003768E8 80 63 00 A8 */ lwz r3, 0xa8(r3) +/* 8037998C 003768EC 54 00 00 2E */ rlwinm r0, r0, 0, 0, 0x17 +/* 80379990 003768F0 7C 07 03 78 */ mr r7, r0 +/* 80379994 003768F4 50 67 06 3E */ rlwimi r7, r3, 0, 0x18, 0x1f +/* 80379998 003768F8 48 00 00 70 */ b lbl_80379A08 +lbl_8037999C: +/* 8037999C 003768FC 80 62 CE 08 */ lwz r3, lbl_805AEB28@sda21(r2) +/* 803799A0 00376900 38 A0 00 01 */ li r5, 1 +/* 803799A4 00376904 80 04 00 00 */ lwz r0, 0(r4) +/* 803799A8 00376908 80 63 00 AC */ lwz r3, 0xac(r3) +/* 803799AC 0037690C 54 00 00 2E */ rlwinm r0, r0, 0, 0, 0x17 +/* 803799B0 00376910 7C 07 03 78 */ mr r7, r0 +/* 803799B4 00376914 50 67 06 3E */ rlwimi r7, r3, 0, 0x18, 0x1f +/* 803799B8 00376918 48 00 00 50 */ b lbl_80379A08 +lbl_803799BC: +/* 803799BC 0037691C 80 62 CE 08 */ lwz r3, lbl_805AEB28@sda21(r2) +/* 803799C0 00376920 38 A0 00 00 */ li r5, 0 +/* 803799C4 00376924 88 E4 00 03 */ lbz r7, 3(r4) +/* 803799C8 00376928 80 63 00 A8 */ lwz r3, 0xa8(r3) +/* 803799CC 0037692C 50 67 00 2E */ rlwimi r7, r3, 0, 0, 0x17 +/* 803799D0 00376930 48 00 00 38 */ b lbl_80379A08 +lbl_803799D4: +/* 803799D4 00376934 80 62 CE 08 */ lwz r3, lbl_805AEB28@sda21(r2) +/* 803799D8 00376938 38 A0 00 01 */ li r5, 1 +/* 803799DC 0037693C 88 E4 00 03 */ lbz r7, 3(r4) +/* 803799E0 00376940 80 63 00 AC */ lwz r3, 0xac(r3) +/* 803799E4 00376944 50 67 00 2E */ rlwimi r7, r3, 0, 0, 0x17 +/* 803799E8 00376948 48 00 00 20 */ b lbl_80379A08 +lbl_803799EC: +/* 803799EC 0037694C 80 E4 00 00 */ lwz r7, 0(r4) +/* 803799F0 00376950 38 A0 00 00 */ li r5, 0 +/* 803799F4 00376954 48 00 00 14 */ b lbl_80379A08 +lbl_803799F8: +/* 803799F8 00376958 80 E4 00 00 */ lwz r7, 0(r4) +/* 803799FC 0037695C 38 A0 00 01 */ li r5, 1 +/* 80379A00 00376960 48 00 00 08 */ b lbl_80379A08 +/* 80379A04 00376964 4E 80 00 20 */ blr +lbl_80379A08: +/* 80379A08 00376968 38 00 00 10 */ li r0, 0x10 +/* 80379A0C 0037696C 80 82 CE 08 */ lwz r4, lbl_805AEB28@sda21(r2) +/* 80379A10 00376970 3C C0 CC 01 */ lis r6, 0xCC008000@ha +/* 80379A14 00376974 98 06 80 00 */ stb r0, 0xCC008000@l(r6) +/* 80379A18 00376978 38 65 10 0A */ addi r3, r5, 0x100a +/* 80379A1C 0037697C 54 A0 10 3A */ slwi r0, r5, 2 +/* 80379A20 00376980 90 66 80 00 */ stw r3, 0xCC008000@l(r6) +/* 80379A24 00376984 38 A0 00 01 */ li r5, 1 +/* 80379A28 00376988 7C 64 02 14 */ add r3, r4, r0 +/* 80379A2C 0037698C 90 E6 80 00 */ stw r7, 0xCC008000@l(r6) +/* 80379A30 00376990 B0 A4 00 02 */ sth r5, 2(r4) +/* 80379A34 00376994 90 E3 00 A8 */ stw r7, 0xa8(r3) +/* 80379A38 00376998 4E 80 00 20 */ blr + +.global GXSetChanMatColor +GXSetChanMatColor: +/* 80379A3C 0037699C 2C 03 00 03 */ cmpwi r3, 3 +/* 80379A40 003769A0 41 82 00 88 */ beq lbl_80379AC8 +/* 80379A44 003769A4 40 80 00 1C */ bge lbl_80379A60 +/* 80379A48 003769A8 2C 03 00 01 */ cmpwi r3, 1 +/* 80379A4C 003769AC 41 82 00 44 */ beq lbl_80379A90 +/* 80379A50 003769B0 40 80 00 60 */ bge lbl_80379AB0 +/* 80379A54 003769B4 2C 03 00 00 */ cmpwi r3, 0 +/* 80379A58 003769B8 40 80 00 18 */ bge lbl_80379A70 +/* 80379A5C 003769BC 4E 80 00 20 */ blr +lbl_80379A60: +/* 80379A60 003769C0 2C 03 00 05 */ cmpwi r3, 5 +/* 80379A64 003769C4 41 82 00 88 */ beq lbl_80379AEC +/* 80379A68 003769C8 4C 80 00 20 */ bgelr +/* 80379A6C 003769CC 48 00 00 74 */ b lbl_80379AE0 +lbl_80379A70: +/* 80379A70 003769D0 80 62 CE 08 */ lwz r3, lbl_805AEB28@sda21(r2) +/* 80379A74 003769D4 38 A0 00 00 */ li r5, 0 +/* 80379A78 003769D8 80 04 00 00 */ lwz r0, 0(r4) +/* 80379A7C 003769DC 80 63 00 B0 */ lwz r3, 0xb0(r3) +/* 80379A80 003769E0 54 00 00 2E */ rlwinm r0, r0, 0, 0, 0x17 +/* 80379A84 003769E4 7C 07 03 78 */ mr r7, r0 +/* 80379A88 003769E8 50 67 06 3E */ rlwimi r7, r3, 0, 0x18, 0x1f +/* 80379A8C 003769EC 48 00 00 70 */ b lbl_80379AFC +lbl_80379A90: +/* 80379A90 003769F0 80 62 CE 08 */ lwz r3, lbl_805AEB28@sda21(r2) +/* 80379A94 003769F4 38 A0 00 01 */ li r5, 1 +/* 80379A98 003769F8 80 04 00 00 */ lwz r0, 0(r4) +/* 80379A9C 003769FC 80 63 00 B4 */ lwz r3, 0xb4(r3) +/* 80379AA0 00376A00 54 00 00 2E */ rlwinm r0, r0, 0, 0, 0x17 +/* 80379AA4 00376A04 7C 07 03 78 */ mr r7, r0 +/* 80379AA8 00376A08 50 67 06 3E */ rlwimi r7, r3, 0, 0x18, 0x1f +/* 80379AAC 00376A0C 48 00 00 50 */ b lbl_80379AFC +lbl_80379AB0: +/* 80379AB0 00376A10 80 62 CE 08 */ lwz r3, lbl_805AEB28@sda21(r2) +/* 80379AB4 00376A14 38 A0 00 00 */ li r5, 0 +/* 80379AB8 00376A18 88 E4 00 03 */ lbz r7, 3(r4) +/* 80379ABC 00376A1C 80 63 00 B0 */ lwz r3, 0xb0(r3) +/* 80379AC0 00376A20 50 67 00 2E */ rlwimi r7, r3, 0, 0, 0x17 +/* 80379AC4 00376A24 48 00 00 38 */ b lbl_80379AFC +lbl_80379AC8: +/* 80379AC8 00376A28 80 62 CE 08 */ lwz r3, lbl_805AEB28@sda21(r2) +/* 80379ACC 00376A2C 38 A0 00 01 */ li r5, 1 +/* 80379AD0 00376A30 88 E4 00 03 */ lbz r7, 3(r4) +/* 80379AD4 00376A34 80 63 00 B4 */ lwz r3, 0xb4(r3) +/* 80379AD8 00376A38 50 67 00 2E */ rlwimi r7, r3, 0, 0, 0x17 +/* 80379ADC 00376A3C 48 00 00 20 */ b lbl_80379AFC +lbl_80379AE0: +/* 80379AE0 00376A40 80 E4 00 00 */ lwz r7, 0(r4) +/* 80379AE4 00376A44 38 A0 00 00 */ li r5, 0 +/* 80379AE8 00376A48 48 00 00 14 */ b lbl_80379AFC +lbl_80379AEC: +/* 80379AEC 00376A4C 80 E4 00 00 */ lwz r7, 0(r4) +/* 80379AF0 00376A50 38 A0 00 01 */ li r5, 1 +/* 80379AF4 00376A54 48 00 00 08 */ b lbl_80379AFC +/* 80379AF8 00376A58 4E 80 00 20 */ blr +lbl_80379AFC: +/* 80379AFC 00376A5C 38 00 00 10 */ li r0, 0x10 +/* 80379B00 00376A60 80 82 CE 08 */ lwz r4, lbl_805AEB28@sda21(r2) +/* 80379B04 00376A64 3C C0 CC 01 */ lis r6, 0xCC008000@ha +/* 80379B08 00376A68 98 06 80 00 */ stb r0, 0xCC008000@l(r6) +/* 80379B0C 00376A6C 38 65 10 0C */ addi r3, r5, 0x100c +/* 80379B10 00376A70 54 A0 10 3A */ slwi r0, r5, 2 +/* 80379B14 00376A74 90 66 80 00 */ stw r3, 0xCC008000@l(r6) +/* 80379B18 00376A78 38 A0 00 01 */ li r5, 1 +/* 80379B1C 00376A7C 7C 64 02 14 */ add r3, r4, r0 +/* 80379B20 00376A80 90 E6 80 00 */ stw r7, 0xCC008000@l(r6) +/* 80379B24 00376A84 B0 A4 00 02 */ sth r5, 2(r4) +/* 80379B28 00376A88 90 E3 00 B0 */ stw r7, 0xb0(r3) +/* 80379B2C 00376A8C 4E 80 00 20 */ blr + +.global GXSetNumChans +GXSetNumChans: +/* 80379B30 00376A90 80 C2 CE 08 */ lwz r6, lbl_805AEB28@sda21(r2) +/* 80379B34 00376A94 54 60 25 36 */ rlwinm r0, r3, 4, 0x14, 0x1b +/* 80379B38 00376A98 54 68 06 3E */ clrlwi r8, r3, 0x18 +/* 80379B3C 00376A9C 80 A6 02 04 */ lwz r5, 0x204(r6) +/* 80379B40 00376AA0 38 80 00 10 */ li r4, 0x10 +/* 80379B44 00376AA4 3C 60 CC 01 */ lis r3, 0xCC008000@ha +/* 80379B48 00376AA8 54 A5 07 30 */ rlwinm r5, r5, 0, 0x1c, 0x18 +/* 80379B4C 00376AAC 7C A0 03 78 */ or r0, r5, r0 +/* 80379B50 00376AB0 90 06 02 04 */ stw r0, 0x204(r6) +/* 80379B54 00376AB4 38 00 10 09 */ li r0, 0x1009 +/* 80379B58 00376AB8 98 83 80 00 */ stb r4, 0xCC008000@l(r3) +/* 80379B5C 00376ABC 90 03 80 00 */ stw r0, 0xCC008000@l(r3) +/* 80379B60 00376AC0 91 03 80 00 */ stw r8, 0xCC008000@l(r3) +/* 80379B64 00376AC4 80 06 04 F4 */ lwz r0, 0x4f4(r6) +/* 80379B68 00376AC8 60 00 00 04 */ ori r0, r0, 4 +/* 80379B6C 00376ACC 90 06 04 F4 */ stw r0, 0x4f4(r6) +/* 80379B70 00376AD0 4E 80 00 20 */ blr + +.global GXSetChanCtrl +GXSetChanCtrl: +/* 80379B74 00376AD4 54 80 0D FC */ rlwinm r0, r4, 1, 0x17, 0x1e +/* 80379B78 00376AD8 7C 00 33 78 */ or r0, r0, r6 +/* 80379B7C 00376ADC 54 04 06 B0 */ rlwinm r4, r0, 0, 0x1a, 0x18 +/* 80379B80 00376AE0 54 A0 30 32 */ slwi r0, r5, 6 +/* 80379B84 00376AE4 2C 09 00 00 */ cmpwi r9, 0 +/* 80379B88 00376AE8 54 6A 07 BE */ clrlwi r10, r3, 0x1e +/* 80379B8C 00376AEC 7C 86 03 78 */ or r6, r4, r0 +/* 80379B90 00376AF0 40 82 00 08 */ bne lbl_80379B98 +/* 80379B94 00376AF4 39 00 00 00 */ li r8, 0 +lbl_80379B98: +/* 80379B98 00376AF8 20 89 00 02 */ subfic r4, r9, 2 +/* 80379B9C 00376AFC 30 04 FF FF */ addic r0, r4, -1 +/* 80379BA0 00376B00 7C A0 21 10 */ subfe r5, r0, r4 +/* 80379BA4 00376B04 7C 89 00 D0 */ neg r4, r9 +/* 80379BA8 00376B08 30 04 FF FF */ addic r0, r4, -1 +/* 80379BAC 00376B0C 7C 00 21 10 */ subfe r0, r0, r4 +/* 80379BB0 00376B10 54 C6 06 6C */ rlwinm r6, r6, 0, 0x19, 0x16 +/* 80379BB4 00376B14 55 04 38 30 */ slwi r4, r8, 7 +/* 80379BB8 00376B18 7C C4 23 78 */ or r4, r6, r4 +/* 80379BBC 00376B1C 54 86 05 EA */ rlwinm r6, r4, 0, 0x17, 0x15 +/* 80379BC0 00376B20 54 A4 48 2C */ slwi r4, r5, 9 +/* 80379BC4 00376B24 7C C4 23 78 */ or r4, r6, r4 +/* 80379BC8 00376B28 54 84 05 A8 */ rlwinm r4, r4, 0, 0x16, 0x14 +/* 80379BCC 00376B2C 54 00 50 2A */ slwi r0, r0, 0xa +/* 80379BD0 00376B30 7C 86 03 78 */ or r6, r4, r0 +/* 80379BD4 00376B34 54 C6 07 B2 */ rlwinm r6, r6, 0, 0x1e, 0x19 +/* 80379BD8 00376B38 50 E6 16 BA */ rlwimi r6, r7, 2, 0x1a, 0x1d +/* 80379BDC 00376B3C 54 C6 05 60 */ rlwinm r6, r6, 0, 0x15, 0x10 +/* 80379BE0 00376B40 38 A0 00 10 */ li r5, 0x10 +/* 80379BE4 00376B44 3C 80 CC 01 */ lis r4, 0xCC008000@ha +/* 80379BE8 00376B48 98 A4 80 00 */ stb r5, 0xCC008000@l(r4) +/* 80379BEC 00376B4C 38 0A 10 0E */ addi r0, r10, 0x100e +/* 80379BF0 00376B50 50 E6 3C 68 */ rlwimi r6, r7, 7, 0x11, 0x14 +/* 80379BF4 00376B54 90 04 80 00 */ stw r0, 0xCC008000@l(r4) +/* 80379BF8 00376B58 2C 03 00 04 */ cmpwi r3, 4 +/* 80379BFC 00376B5C 90 C4 80 00 */ stw r6, 0xCC008000@l(r4) +/* 80379C00 00376B60 40 82 00 18 */ bne lbl_80379C18 +/* 80379C04 00376B64 98 A4 80 00 */ stb r5, 0xCC008000@l(r4) +/* 80379C08 00376B68 38 00 10 10 */ li r0, 0x1010 +/* 80379C0C 00376B6C 90 04 80 00 */ stw r0, 0xCC008000@l(r4) +/* 80379C10 00376B70 90 C4 80 00 */ stw r6, 0xCC008000@l(r4) +/* 80379C14 00376B74 48 00 00 1C */ b lbl_80379C30 +lbl_80379C18: +/* 80379C18 00376B78 2C 03 00 05 */ cmpwi r3, 5 +/* 80379C1C 00376B7C 40 82 00 14 */ bne lbl_80379C30 +/* 80379C20 00376B80 98 A4 80 00 */ stb r5, 0xCC008000@l(r4) +/* 80379C24 00376B84 38 00 10 11 */ li r0, 0x1011 +/* 80379C28 00376B88 90 04 80 00 */ stw r0, 0xCC008000@l(r4) +/* 80379C2C 00376B8C 90 C4 80 00 */ stw r6, 0xCC008000@l(r4) +lbl_80379C30: +/* 80379C30 00376B90 80 62 CE 08 */ lwz r3, lbl_805AEB28@sda21(r2) +/* 80379C34 00376B94 38 00 00 01 */ li r0, 1 +/* 80379C38 00376B98 B0 03 00 02 */ sth r0, 2(r3) +/* 80379C3C 00376B9C 4E 80 00 20 */ blr diff --git a/asm/Dolphin/GX/GXMisc.s b/asm/Dolphin/GX/GXMisc.s new file mode 100644 index 00000000..c71b20bc --- /dev/null +++ b/asm/Dolphin/GX/GXMisc.s @@ -0,0 +1,432 @@ +.include "macros.inc" + +.section .text, "ax" + +.global GXSetMisc +GXSetMisc: +/* 803782A4 00375204 2C 03 00 01 */ cmpwi r3, 1 +/* 803782A8 00375208 41 82 00 14 */ beq lbl_803782BC +/* 803782AC 0037520C 4D 80 00 20 */ bltlr +/* 803782B0 00375210 2C 03 00 03 */ cmpwi r3, 3 +/* 803782B4 00375214 4C 80 00 20 */ bgelr +/* 803782B8 00375218 48 00 00 40 */ b lbl_803782F8 +lbl_803782BC: +/* 803782BC 0037521C 80 A2 CE 08 */ lwz r5, lbl_805AEB28@sda21(r2) +/* 803782C0 00375220 38 00 00 01 */ li r0, 1 +/* 803782C4 00375224 B0 85 00 04 */ sth r4, 4(r5) +/* 803782C8 00375228 A0 65 00 04 */ lhz r3, 4(r5) +/* 803782CC 0037522C 7C 63 00 34 */ cntlzw r3, r3 +/* 803782D0 00375230 54 63 DC 3E */ rlwinm r3, r3, 0x1b, 0x10, 0x1f +/* 803782D4 00375234 B0 65 00 00 */ sth r3, 0(r5) +/* 803782D8 00375238 B0 05 00 02 */ sth r0, 2(r5) +/* 803782DC 0037523C A0 05 00 04 */ lhz r0, 4(r5) +/* 803782E0 00375240 28 00 00 00 */ cmplwi r0, 0 +/* 803782E4 00375244 4D 82 00 20 */ beqlr +/* 803782E8 00375248 80 05 04 F4 */ lwz r0, 0x4f4(r5) +/* 803782EC 0037524C 60 00 00 08 */ ori r0, r0, 8 +/* 803782F0 00375250 90 05 04 F4 */ stw r0, 0x4f4(r5) +/* 803782F4 00375254 4E 80 00 20 */ blr +lbl_803782F8: +/* 803782F8 00375258 7C 84 00 D0 */ neg r4, r4 +/* 803782FC 0037525C 80 62 CE 08 */ lwz r3, lbl_805AEB28@sda21(r2) +/* 80378300 00375260 30 04 FF FF */ addic r0, r4, -1 +/* 80378304 00375264 7C 00 21 10 */ subfe r0, r0, r4 +/* 80378308 00375268 98 03 04 F1 */ stb r0, 0x4f1(r3) +/* 8037830C 0037526C 4E 80 00 20 */ blr + +.global GXFlush +GXFlush: +/* 80378310 00375270 7C 08 02 A6 */ mflr r0 +/* 80378314 00375274 90 01 00 04 */ stw r0, 4(r1) +/* 80378318 00375278 94 21 FF F8 */ stwu r1, -8(r1) +/* 8037831C 0037527C 80 62 CE 08 */ lwz r3, lbl_805AEB28@sda21(r2) +/* 80378320 00375280 80 03 04 F4 */ lwz r0, 0x4f4(r3) +/* 80378324 00375284 28 00 00 00 */ cmplwi r0, 0 +/* 80378328 00375288 41 82 00 08 */ beq lbl_80378330 +/* 8037832C 0037528C 48 00 05 29 */ bl __GXSetDirtyState +lbl_80378330: +/* 80378330 00375290 38 00 00 00 */ li r0, 0 +/* 80378334 00375294 3C 60 CC 01 */ lis r3, 0xCC008000@ha +/* 80378338 00375298 90 03 80 00 */ stw r0, 0xCC008000@l(r3) +/* 8037833C 0037529C 90 03 80 00 */ stw r0, 0xCC008000@l(r3) +/* 80378340 003752A0 90 03 80 00 */ stw r0, 0xCC008000@l(r3) +/* 80378344 003752A4 90 03 80 00 */ stw r0, 0xCC008000@l(r3) +/* 80378348 003752A8 90 03 80 00 */ stw r0, 0xCC008000@l(r3) +/* 8037834C 003752AC 90 03 80 00 */ stw r0, 0xCC008000@l(r3) +/* 80378350 003752B0 90 03 80 00 */ stw r0, 0xCC008000@l(r3) +/* 80378354 003752B4 90 03 80 00 */ stw r0, 0xCC008000@l(r3) +/* 80378358 003752B8 4B FF 74 B5 */ bl PPCSync +/* 8037835C 003752BC 80 01 00 0C */ lwz r0, 0xc(r1) +/* 80378360 003752C0 38 21 00 08 */ addi r1, r1, 8 +/* 80378364 003752C4 7C 08 03 A6 */ mtlr r0 +/* 80378368 003752C8 4E 80 00 20 */ blr + +.global sub_8037836c +sub_8037836c: +/* 8037836C 003752CC 7C 08 02 A6 */ mflr r0 +/* 80378370 003752D0 3C 60 CC 00 */ lis r3, 0xCC003000@ha +/* 80378374 003752D4 90 01 00 04 */ stw r0, 4(r1) +/* 80378378 003752D8 38 00 00 01 */ li r0, 1 +/* 8037837C 003752DC 94 21 FF E0 */ stwu r1, -0x20(r1) +/* 80378380 003752E0 BF 61 00 0C */ stmw r27, 0xc(r1) +/* 80378384 003752E4 3B 63 30 00 */ addi r27, r3, 0xCC003000@l +/* 80378388 003752E8 94 1B 00 18 */ stwu r0, 0x18(r27) +/* 8037838C 003752EC 48 00 D0 1D */ bl OSGetTime +/* 80378390 003752F0 38 00 00 00 */ li r0, 0 +/* 80378394 003752F4 3B E4 00 00 */ addi r31, r4, 0 +/* 80378398 003752F8 3B C3 00 00 */ addi r30, r3, 0 +/* 8037839C 003752FC 6C 1C 80 00 */ xoris r28, r0, 0x8000 +/* 803783A0 00375300 3B A0 00 32 */ li r29, 0x32 +lbl_803783A4: +/* 803783A4 00375304 48 00 D0 05 */ bl OSGetTime +/* 803783A8 00375308 7C 9F 20 10 */ subfc r4, r31, r4 +/* 803783AC 0037530C 7C 1E 19 10 */ subfe r0, r30, r3 +/* 803783B0 00375310 6C 03 80 00 */ xoris r3, r0, 0x8000 +/* 803783B4 00375314 7C 04 E8 10 */ subfc r0, r4, r29 +/* 803783B8 00375318 7C 63 E1 10 */ subfe r3, r3, r28 +/* 803783BC 0037531C 7C 7C E1 10 */ subfe r3, r28, r28 +/* 803783C0 00375320 7C 63 00 D1 */ neg. r3, r3 +/* 803783C4 00375324 41 82 FF E0 */ beq lbl_803783A4 +/* 803783C8 00375328 3B C0 00 00 */ li r30, 0 +/* 803783CC 0037532C 93 DB 00 00 */ stw r30, 0(r27) +/* 803783D0 00375330 48 00 CF D9 */ bl OSGetTime +/* 803783D4 00375334 3B 84 00 00 */ addi r28, r4, 0 +/* 803783D8 00375338 3B A3 00 00 */ addi r29, r3, 0 +/* 803783DC 0037533C 6F DF 80 00 */ xoris r31, r30, 0x8000 +/* 803783E0 00375340 3B C0 00 05 */ li r30, 5 +lbl_803783E4: +/* 803783E4 00375344 48 00 CF C5 */ bl OSGetTime +/* 803783E8 00375348 7C 9C 20 10 */ subfc r4, r28, r4 +/* 803783EC 0037534C 7C 1D 19 10 */ subfe r0, r29, r3 +/* 803783F0 00375350 6C 03 80 00 */ xoris r3, r0, 0x8000 +/* 803783F4 00375354 7C 04 F0 10 */ subfc r0, r4, r30 +/* 803783F8 00375358 7C 63 F9 10 */ subfe r3, r3, r31 +/* 803783FC 0037535C 7C 7F F9 10 */ subfe r3, r31, r31 +/* 80378400 00375360 7C 63 00 D1 */ neg. r3, r3 +/* 80378404 00375364 41 82 FF E0 */ beq lbl_803783E4 +/* 80378408 00375368 4B FF E6 1D */ bl __GXCleanGPFifo +/* 8037840C 0037536C BB 61 00 0C */ lmw r27, 0xc(r1) +/* 80378410 00375370 80 01 00 24 */ lwz r0, 0x24(r1) +/* 80378414 00375374 38 21 00 20 */ addi r1, r1, 0x20 +/* 80378418 00375378 7C 08 03 A6 */ mtlr r0 +/* 8037841C 0037537C 4E 80 00 20 */ blr + +.global GXSetDrawSync +GXSetDrawSync: +/* 80378420 00375380 7C 08 02 A6 */ mflr r0 +/* 80378424 00375384 90 01 00 04 */ stw r0, 4(r1) +/* 80378428 00375388 94 21 FF E8 */ stwu r1, -0x18(r1) +/* 8037842C 0037538C 93 E1 00 14 */ stw r31, 0x14(r1) +/* 80378430 00375390 93 C1 00 10 */ stw r30, 0x10(r1) +/* 80378434 00375394 7C 7E 1B 78 */ mr r30, r3 +/* 80378438 00375398 48 00 92 29 */ bl OSDisableInterrupts +/* 8037843C 0037539C 38 C0 00 61 */ li r6, 0x61 +/* 80378440 003753A0 80 82 CE 08 */ lwz r4, lbl_805AEB28@sda21(r2) +/* 80378444 003753A4 3C A0 CC 01 */ lis r5, 0xCC008000@ha +/* 80378448 003753A8 57 C0 04 3E */ clrlwi r0, r30, 0x10 +/* 8037844C 003753AC 98 C5 80 00 */ stb r6, 0xCC008000@l(r5) +/* 80378450 003753B0 64 00 48 00 */ oris r0, r0, 0x4800 +/* 80378454 003753B4 90 05 80 00 */ stw r0, 0xCC008000@l(r5) +/* 80378458 003753B8 54 00 00 1E */ rlwinm r0, r0, 0, 0, 0xf +/* 8037845C 003753BC 53 C0 04 3E */ rlwimi r0, r30, 0, 0x10, 0x1f +/* 80378460 003753C0 54 00 02 3E */ clrlwi r0, r0, 8 +/* 80378464 003753C4 98 C5 80 00 */ stb r6, 0xCC008000@l(r5) +/* 80378468 003753C8 64 00 47 00 */ oris r0, r0, 0x4700 +/* 8037846C 003753CC 90 05 80 00 */ stw r0, 0xCC008000@l(r5) +/* 80378470 003753D0 7C 7E 1B 78 */ mr r30, r3 +/* 80378474 003753D4 80 04 04 F4 */ lwz r0, 0x4f4(r4) +/* 80378478 003753D8 28 00 00 00 */ cmplwi r0, 0 +/* 8037847C 003753DC 41 82 00 08 */ beq lbl_80378484 +/* 80378480 003753E0 48 00 03 D5 */ bl __GXSetDirtyState +lbl_80378484: +/* 80378484 003753E4 3B E0 00 00 */ li r31, 0 +/* 80378488 003753E8 3C 60 CC 01 */ lis r3, 0xCC008000@ha +/* 8037848C 003753EC 93 E3 80 00 */ stw r31, 0xCC008000@l(r3) +/* 80378490 003753F0 93 E3 80 00 */ stw r31, 0xCC008000@l(r3) +/* 80378494 003753F4 93 E3 80 00 */ stw r31, 0xCC008000@l(r3) +/* 80378498 003753F8 93 E3 80 00 */ stw r31, 0xCC008000@l(r3) +/* 8037849C 003753FC 93 E3 80 00 */ stw r31, 0xCC008000@l(r3) +/* 803784A0 00375400 93 E3 80 00 */ stw r31, 0xCC008000@l(r3) +/* 803784A4 00375404 93 E3 80 00 */ stw r31, 0xCC008000@l(r3) +/* 803784A8 00375408 93 E3 80 00 */ stw r31, 0xCC008000@l(r3) +/* 803784AC 0037540C 4B FF 73 61 */ bl PPCSync +/* 803784B0 00375410 7F C3 F3 78 */ mr r3, r30 +/* 803784B4 00375414 48 00 91 D5 */ bl OSRestoreInterrupts +/* 803784B8 00375418 80 62 CE 08 */ lwz r3, lbl_805AEB28@sda21(r2) +/* 803784BC 0037541C B3 E3 00 02 */ sth r31, 2(r3) +/* 803784C0 00375420 80 01 00 1C */ lwz r0, 0x1c(r1) +/* 803784C4 00375424 83 E1 00 14 */ lwz r31, 0x14(r1) +/* 803784C8 00375428 83 C1 00 10 */ lwz r30, 0x10(r1) +/* 803784CC 0037542C 38 21 00 18 */ addi r1, r1, 0x18 +/* 803784D0 00375430 7C 08 03 A6 */ mtlr r0 +/* 803784D4 00375434 4E 80 00 20 */ blr + +.global GXReadDrawSync +GXReadDrawSync: +/* 803784D8 00375438 80 6D AC 80 */ lwz r3, lbl_805A9840@sda21(r13) +/* 803784DC 0037543C A0 63 00 0E */ lhz r3, 0xe(r3) +/* 803784E0 00375440 4E 80 00 20 */ blr + +.global GXDrawDone +GXDrawDone: +/* 803784E4 00375444 7C 08 02 A6 */ mflr r0 +/* 803784E8 00375448 90 01 00 04 */ stw r0, 4(r1) +/* 803784EC 0037544C 94 21 FF E8 */ stwu r1, -0x18(r1) +/* 803784F0 00375450 93 E1 00 14 */ stw r31, 0x14(r1) +/* 803784F4 00375454 48 00 91 6D */ bl OSDisableInterrupts +/* 803784F8 00375458 38 00 00 61 */ li r0, 0x61 +/* 803784FC 0037545C 3C A0 CC 01 */ lis r5, 0xCC008000@ha +/* 80378500 00375460 3C 80 45 00 */ lis r4, 0x45000002@ha +/* 80378504 00375464 98 05 80 00 */ stb r0, 0xCC008000@l(r5) +/* 80378508 00375468 38 04 00 02 */ addi r0, r4, 0x45000002@l +/* 8037850C 0037546C 90 05 80 00 */ stw r0, 0xCC008000@l(r5) +/* 80378510 00375470 7C 7F 1B 78 */ mr r31, r3 +/* 80378514 00375474 4B FF FD FD */ bl GXFlush +/* 80378518 00375478 38 00 00 00 */ li r0, 0 +/* 8037851C 0037547C 98 0D AC B0 */ stb r0, lbl_805A9870@sda21(r13) +/* 80378520 00375480 7F E3 FB 78 */ mr r3, r31 +/* 80378524 00375484 48 00 91 65 */ bl OSRestoreInterrupts +/* 80378528 00375488 48 00 91 39 */ bl OSDisableInterrupts +/* 8037852C 0037548C 7C 7F 1B 78 */ mr r31, r3 +/* 80378530 00375490 48 00 00 0C */ b lbl_8037853C +lbl_80378534: +/* 80378534 00375494 38 6D AC B4 */ addi r3, r13, lbl_805A9874@sda21 +/* 80378538 00375498 48 00 CB D5 */ bl OSSleepThread +lbl_8037853C: +/* 8037853C 0037549C 88 0D AC B0 */ lbz r0, lbl_805A9870@sda21(r13) +/* 80378540 003754A0 28 00 00 00 */ cmplwi r0, 0 +/* 80378544 003754A4 41 82 FF F0 */ beq lbl_80378534 +/* 80378548 003754A8 7F E3 FB 78 */ mr r3, r31 +/* 8037854C 003754AC 48 00 91 3D */ bl OSRestoreInterrupts +/* 80378550 003754B0 80 01 00 1C */ lwz r0, 0x1c(r1) +/* 80378554 003754B4 83 E1 00 14 */ lwz r31, 0x14(r1) +/* 80378558 003754B8 38 21 00 18 */ addi r1, r1, 0x18 +/* 8037855C 003754BC 7C 08 03 A6 */ mtlr r0 +/* 80378560 003754C0 4E 80 00 20 */ blr + +.global GXPixModeSync +GXPixModeSync: +/* 80378564 003754C4 38 00 00 61 */ li r0, 0x61 +/* 80378568 003754C8 80 82 CE 08 */ lwz r4, lbl_805AEB28@sda21(r2) +/* 8037856C 003754CC 3C A0 CC 01 */ lis r5, 0xCC008000@ha +/* 80378570 003754D0 98 05 80 00 */ stb r0, 0xCC008000@l(r5) +/* 80378574 003754D4 38 00 00 00 */ li r0, 0 +/* 80378578 003754D8 80 64 01 DC */ lwz r3, 0x1dc(r4) +/* 8037857C 003754DC 90 65 80 00 */ stw r3, 0xCC008000@l(r5) +/* 80378580 003754E0 B0 04 00 02 */ sth r0, 2(r4) +/* 80378584 003754E4 4E 80 00 20 */ blr + +.global GXPokeAlphaMode +GXPokeAlphaMode: +/* 80378588 003754E8 80 AD AC 80 */ lwz r5, lbl_805A9840@sda21(r13) +/* 8037858C 003754EC 54 80 06 3E */ clrlwi r0, r4, 0x18 +/* 80378590 003754F0 50 60 40 2E */ rlwimi r0, r3, 8, 0, 0x17 +/* 80378594 003754F4 B0 05 00 06 */ sth r0, 6(r5) +/* 80378598 003754F8 4E 80 00 20 */ blr + +.global GXPokeAlphaRead +GXPokeAlphaRead: +/* 8037859C 003754FC 54 60 07 B8 */ rlwinm r0, r3, 0, 0x1e, 0x1c +/* 803785A0 00375500 80 6D AC 80 */ lwz r3, lbl_805A9840@sda21(r13) +/* 803785A4 00375504 60 00 00 04 */ ori r0, r0, 4 +/* 803785A8 00375508 B0 03 00 08 */ sth r0, 8(r3) +/* 803785AC 0037550C 4E 80 00 20 */ blr + +.global GXPokeAlphaUpdate +GXPokeAlphaUpdate: +/* 803785B0 00375510 80 8D AC 80 */ lwz r4, lbl_805A9840@sda21(r13) +/* 803785B4 00375514 54 60 25 36 */ rlwinm r0, r3, 4, 0x14, 0x1b +/* 803785B8 00375518 A4 64 00 02 */ lhzu r3, 2(r4) +/* 803785BC 0037551C 54 63 07 34 */ rlwinm r3, r3, 0, 0x1c, 0x1a +/* 803785C0 00375520 7C 60 03 78 */ or r0, r3, r0 +/* 803785C4 00375524 B0 04 00 00 */ sth r0, 0(r4) +/* 803785C8 00375528 4E 80 00 20 */ blr + +.global GXPokeBlendMode +GXPokeBlendMode: +/* 803785CC 0037552C 80 ED AC 80 */ lwz r7, lbl_805A9840@sda21(r13) +/* 803785D0 00375530 2C 03 00 01 */ cmpwi r3, 1 +/* 803785D4 00375534 39 20 00 01 */ li r9, 1 +/* 803785D8 00375538 39 47 00 02 */ addi r10, r7, 2 +/* 803785DC 0037553C A0 E7 00 02 */ lhz r7, 2(r7) +/* 803785E0 00375540 41 82 00 10 */ beq lbl_803785F0 +/* 803785E4 00375544 2C 03 00 03 */ cmpwi r3, 3 +/* 803785E8 00375548 41 82 00 08 */ beq lbl_803785F0 +/* 803785EC 0037554C 39 20 00 00 */ li r9, 0 +lbl_803785F0: +/* 803785F0 00375550 54 E8 00 3C */ rlwinm r8, r7, 0, 0, 0x1e +/* 803785F4 00375554 20 03 00 03 */ subfic r0, r3, 3 +/* 803785F8 00375558 7C 07 00 34 */ cntlzw r7, r0 +/* 803785FC 0037555C 20 03 00 02 */ subfic r0, r3, 2 +/* 80378600 00375560 7D 08 4B 78 */ or r8, r8, r9 +/* 80378604 00375564 7C 00 00 34 */ cntlzw r0, r0 +/* 80378608 00375568 55 08 05 66 */ rlwinm r8, r8, 0, 0x15, 0x13 +/* 8037860C 0037556C 54 E3 30 28 */ rlwinm r3, r7, 6, 0, 0x14 +/* 80378610 00375570 7D 03 1B 78 */ or r3, r8, r3 +/* 80378614 00375574 54 63 07 FA */ rlwinm r3, r3, 0, 0x1f, 0x1d +/* 80378618 00375578 54 00 E1 3C */ rlwinm r0, r0, 0x1c, 4, 0x1e +/* 8037861C 0037557C 7C 60 03 78 */ or r0, r3, r0 +/* 80378620 00375580 54 03 05 1E */ rlwinm r3, r0, 0, 0x14, 0xf +/* 80378624 00375584 54 C0 60 26 */ slwi r0, r6, 0xc +/* 80378628 00375588 7C 60 03 78 */ or r0, r3, r0 +/* 8037862C 0037558C 54 03 06 28 */ rlwinm r3, r0, 0, 0x18, 0x14 +/* 80378630 00375590 54 80 40 2E */ slwi r0, r4, 8 +/* 80378634 00375594 7C 60 03 78 */ or r0, r3, r0 +/* 80378638 00375598 54 03 06 EE */ rlwinm r3, r0, 0, 0x1b, 0x17 +/* 8037863C 0037559C 54 A0 28 34 */ slwi r0, r5, 5 +/* 80378640 003755A0 7C 60 03 78 */ or r0, r3, r0 +/* 80378644 003755A4 54 00 02 3E */ clrlwi r0, r0, 8 +/* 80378648 003755A8 64 00 41 00 */ oris r0, r0, 0x4100 +/* 8037864C 003755AC B0 0A 00 00 */ sth r0, 0(r10) +/* 80378650 003755B0 4E 80 00 20 */ blr + +.global GXPokeColorUpdate +GXPokeColorUpdate: +/* 80378654 003755B4 80 8D AC 80 */ lwz r4, lbl_805A9840@sda21(r13) +/* 80378658 003755B8 54 60 1D 78 */ rlwinm r0, r3, 3, 0x15, 0x1c +/* 8037865C 003755BC A4 64 00 02 */ lhzu r3, 2(r4) +/* 80378660 003755C0 54 63 07 76 */ rlwinm r3, r3, 0, 0x1d, 0x1b +/* 80378664 003755C4 7C 60 03 78 */ or r0, r3, r0 +/* 80378668 003755C8 B0 04 00 00 */ sth r0, 0(r4) +/* 8037866C 003755CC 4E 80 00 20 */ blr + +.global GXPokeDstAlpha +GXPokeDstAlpha: +/* 80378670 003755D0 80 AD AC 80 */ lwz r5, lbl_805A9840@sda21(r13) +/* 80378674 003755D4 54 60 44 2E */ rlwinm r0, r3, 8, 0x10, 0x17 +/* 80378678 003755D8 50 80 06 3E */ rlwimi r0, r4, 0, 0x18, 0x1f +/* 8037867C 003755DC B0 05 00 04 */ sth r0, 4(r5) +/* 80378680 003755E0 4E 80 00 20 */ blr + +.global GXPokeDither +GXPokeDither: +/* 80378684 003755E4 80 8D AC 80 */ lwz r4, lbl_805A9840@sda21(r13) +/* 80378688 003755E8 54 60 15 BA */ rlwinm r0, r3, 2, 0x16, 0x1d +/* 8037868C 003755EC A4 64 00 02 */ lhzu r3, 2(r4) +/* 80378690 003755F0 54 63 07 B8 */ rlwinm r3, r3, 0, 0x1e, 0x1c +/* 80378694 003755F4 7C 60 03 78 */ or r0, r3, r0 +/* 80378698 003755F8 B0 04 00 00 */ sth r0, 0(r4) +/* 8037869C 003755FC 4E 80 00 20 */ blr + +.global GXPokeZMode +GXPokeZMode: +/* 803786A0 00375600 54 60 06 3E */ clrlwi r0, r3, 0x18 +/* 803786A4 00375604 80 6D AC 80 */ lwz r3, lbl_805A9840@sda21(r13) +/* 803786A8 00375608 54 06 07 F6 */ rlwinm r6, r0, 0, 0x1f, 0x1b +/* 803786AC 0037560C 54 80 08 3C */ slwi r0, r4, 1 +/* 803786B0 00375610 7C C0 03 78 */ or r0, r6, r0 +/* 803786B4 00375614 54 04 07 34 */ rlwinm r4, r0, 0, 0x1c, 0x1a +/* 803786B8 00375618 54 A0 25 36 */ rlwinm r0, r5, 4, 0x14, 0x1b +/* 803786BC 0037561C 7C 80 03 78 */ or r0, r4, r0 +/* 803786C0 00375620 B0 03 00 00 */ sth r0, 0(r3) +/* 803786C4 00375624 4E 80 00 20 */ blr + +.global GXTokenInterruptHandler +GXTokenInterruptHandler: +/* 803786C8 00375628 7C 08 02 A6 */ mflr r0 +/* 803786CC 0037562C 90 01 00 04 */ stw r0, 4(r1) +/* 803786D0 00375630 94 21 FD 20 */ stwu r1, -0x2e0(r1) +/* 803786D4 00375634 93 E1 02 DC */ stw r31, 0x2dc(r1) +/* 803786D8 00375638 93 C1 02 D8 */ stw r30, 0x2d8(r1) +/* 803786DC 0037563C 7C 9E 23 78 */ mr r30, r4 +/* 803786E0 00375640 80 0D AC A8 */ lwz r0, lbl_805A9868@sda21(r13) +/* 803786E4 00375644 80 6D AC 80 */ lwz r3, lbl_805A9840@sda21(r13) +/* 803786E8 00375648 28 00 00 00 */ cmplwi r0, 0 +/* 803786EC 0037564C A3 E3 00 0E */ lhz r31, 0xe(r3) +/* 803786F0 00375650 41 82 00 34 */ beq lbl_80378724 +/* 803786F4 00375654 38 61 00 10 */ addi r3, r1, 0x10 +/* 803786F8 00375658 48 00 6F 1D */ bl OSClearContext +/* 803786FC 0037565C 38 61 00 10 */ addi r3, r1, 0x10 +/* 80378700 00375660 48 00 6D 1D */ bl OSSetCurrentContext +/* 80378704 00375664 81 8D AC A8 */ lwz r12, lbl_805A9868@sda21(r13) +/* 80378708 00375668 38 7F 00 00 */ addi r3, r31, 0 +/* 8037870C 0037566C 7D 88 03 A6 */ mtlr r12 +/* 80378710 00375670 4E 80 00 21 */ blrl +/* 80378714 00375674 38 61 00 10 */ addi r3, r1, 0x10 +/* 80378718 00375678 48 00 6E FD */ bl OSClearContext +/* 8037871C 0037567C 7F C3 F3 78 */ mr r3, r30 +/* 80378720 00375680 48 00 6C FD */ bl OSSetCurrentContext +lbl_80378724: +/* 80378724 00375684 80 6D AC 80 */ lwz r3, lbl_805A9840@sda21(r13) +/* 80378728 00375688 A4 03 00 0A */ lhzu r0, 0xa(r3) +/* 8037872C 0037568C 54 00 07 B8 */ rlwinm r0, r0, 0, 0x1e, 0x1c +/* 80378730 00375690 60 00 00 04 */ ori r0, r0, 4 +/* 80378734 00375694 B0 03 00 00 */ sth r0, 0(r3) +/* 80378738 00375698 80 01 02 E4 */ lwz r0, 0x2e4(r1) +/* 8037873C 0037569C 83 E1 02 DC */ lwz r31, 0x2dc(r1) +/* 80378740 003756A0 83 C1 02 D8 */ lwz r30, 0x2d8(r1) +/* 80378744 003756A4 38 21 02 E0 */ addi r1, r1, 0x2e0 +/* 80378748 003756A8 7C 08 03 A6 */ mtlr r0 +/* 8037874C 003756AC 4E 80 00 20 */ blr + +.global GXFinishInterruptHandler +GXFinishInterruptHandler: +/* 80378750 003756B0 7C 08 02 A6 */ mflr r0 +/* 80378754 003756B4 38 60 00 01 */ li r3, 1 +/* 80378758 003756B8 90 01 00 04 */ stw r0, 4(r1) +/* 8037875C 003756BC 94 21 FD 20 */ stwu r1, -0x2e0(r1) +/* 80378760 003756C0 93 E1 02 DC */ stw r31, 0x2dc(r1) +/* 80378764 003756C4 3B E4 00 00 */ addi r31, r4, 0 +/* 80378768 003756C8 80 AD AC 80 */ lwz r5, lbl_805A9840@sda21(r13) +/* 8037876C 003756CC A0 05 00 0A */ lhz r0, 0xa(r5) +/* 80378770 003756D0 54 00 07 76 */ rlwinm r0, r0, 0, 0x1d, 0x1b +/* 80378774 003756D4 60 00 00 08 */ ori r0, r0, 8 +/* 80378778 003756D8 B0 05 00 0A */ sth r0, 0xa(r5) +/* 8037877C 003756DC 80 0D AC AC */ lwz r0, lbl_805A986C@sda21(r13) +/* 80378780 003756E0 98 6D AC B0 */ stb r3, lbl_805A9870@sda21(r13) +/* 80378784 003756E4 28 00 00 00 */ cmplwi r0, 0 +/* 80378788 003756E8 41 82 00 30 */ beq lbl_803787B8 +/* 8037878C 003756EC 38 61 00 10 */ addi r3, r1, 0x10 +/* 80378790 003756F0 48 00 6E 85 */ bl OSClearContext +/* 80378794 003756F4 38 61 00 10 */ addi r3, r1, 0x10 +/* 80378798 003756F8 48 00 6C 85 */ bl OSSetCurrentContext +/* 8037879C 003756FC 81 8D AC AC */ lwz r12, lbl_805A986C@sda21(r13) +/* 803787A0 00375700 7D 88 03 A6 */ mtlr r12 +/* 803787A4 00375704 4E 80 00 21 */ blrl +/* 803787A8 00375708 38 61 00 10 */ addi r3, r1, 0x10 +/* 803787AC 0037570C 48 00 6E 69 */ bl OSClearContext +/* 803787B0 00375710 7F E3 FB 78 */ mr r3, r31 +/* 803787B4 00375714 48 00 6C 69 */ bl OSSetCurrentContext +lbl_803787B8: +/* 803787B8 00375718 38 6D AC B4 */ addi r3, r13, lbl_805A9874@sda21 +/* 803787BC 0037571C 48 00 CA 3D */ bl OSWakeupThread +/* 803787C0 00375720 80 01 02 E4 */ lwz r0, 0x2e4(r1) +/* 803787C4 00375724 83 E1 02 DC */ lwz r31, 0x2dc(r1) +/* 803787C8 00375728 38 21 02 E0 */ addi r1, r1, 0x2e0 +/* 803787CC 0037572C 7C 08 03 A6 */ mtlr r0 +/* 803787D0 00375730 4E 80 00 20 */ blr + +.global __GXPEInit +__GXPEInit: +/* 803787D4 00375734 7C 08 02 A6 */ mflr r0 +/* 803787D8 00375738 3C 60 80 38 */ lis r3, GXTokenInterruptHandler@ha +/* 803787DC 0037573C 90 01 00 04 */ stw r0, 4(r1) +/* 803787E0 00375740 38 83 86 C8 */ addi r4, r3, GXTokenInterruptHandler@l +/* 803787E4 00375744 38 60 00 12 */ li r3, 0x12 +/* 803787E8 00375748 94 21 FF F8 */ stwu r1, -8(r1) +/* 803787EC 0037574C 48 00 8E C1 */ bl __OSSetInterruptHandler +/* 803787F0 00375750 3C 60 80 38 */ lis r3, GXFinishInterruptHandler@ha +/* 803787F4 00375754 38 83 87 50 */ addi r4, r3, GXFinishInterruptHandler@l +/* 803787F8 00375758 38 60 00 13 */ li r3, 0x13 +/* 803787FC 0037575C 48 00 8E B1 */ bl __OSSetInterruptHandler +/* 80378800 00375760 38 6D AC B4 */ addi r3, r13, lbl_805A9874@sda21 +/* 80378804 00375764 48 00 BD C1 */ bl OSInitThreadQueue +/* 80378808 00375768 38 60 20 00 */ li r3, 0x2000 +/* 8037880C 0037576C 48 00 92 A5 */ bl __OSUnmaskInterrupts +/* 80378810 00375770 38 60 10 00 */ li r3, 0x1000 +/* 80378814 00375774 48 00 92 9D */ bl __OSUnmaskInterrupts +/* 80378818 00375778 80 6D AC 80 */ lwz r3, lbl_805A9840@sda21(r13) +/* 8037881C 0037577C A4 03 00 0A */ lhzu r0, 0xa(r3) +/* 80378820 00375780 54 00 07 B8 */ rlwinm r0, r0, 0, 0x1e, 0x1c +/* 80378824 00375784 60 00 00 04 */ ori r0, r0, 4 +/* 80378828 00375788 54 00 07 76 */ rlwinm r0, r0, 0, 0x1d, 0x1b +/* 8037882C 0037578C 60 00 00 08 */ ori r0, r0, 8 +/* 80378830 00375790 54 00 00 3C */ rlwinm r0, r0, 0, 0, 0x1e +/* 80378834 00375794 60 00 00 01 */ ori r0, r0, 1 +/* 80378838 00375798 54 00 07 FA */ rlwinm r0, r0, 0, 0x1f, 0x1d +/* 8037883C 0037579C 60 00 00 02 */ ori r0, r0, 2 +/* 80378840 003757A0 B0 03 00 00 */ sth r0, 0(r3) +/* 80378844 003757A4 80 01 00 0C */ lwz r0, 0xc(r1) +/* 80378848 003757A8 38 21 00 08 */ addi r1, r1, 8 +/* 8037884C 003757AC 7C 08 03 A6 */ mtlr r0 +/* 80378850 003757B0 4E 80 00 20 */ blr diff --git a/asm/Dolphin/GX/GXPerf.s b/asm/Dolphin/GX/GXPerf.s new file mode 100644 index 00000000..067c9cf3 --- /dev/null +++ b/asm/Dolphin/GX/GXPerf.s @@ -0,0 +1,555 @@ +.include "macros.inc" + +.section .text, "ax" + +.global GXSetGPMetric +GXSetGPMetric: +/* 8037C7E8 00379748 80 A2 CE 08 */ lwz r5, lbl_805AEB28@sda21(r2) +/* 8037C7EC 0037974C 80 05 04 E4 */ lwz r0, 0x4e4(r5) +/* 8037C7F0 00379750 2C 00 00 22 */ cmpwi r0, 0x22 +/* 8037C7F4 00379754 41 82 00 2C */ beq lbl_8037C820 +/* 8037C7F8 00379758 40 80 00 74 */ bge lbl_8037C86C +/* 8037C7FC 0037975C 2C 00 00 0B */ cmpwi r0, 0xb +/* 8037C800 00379760 40 80 00 10 */ bge lbl_8037C810 +/* 8037C804 00379764 2C 00 00 00 */ cmpwi r0, 0 +/* 8037C808 00379768 40 80 00 18 */ bge lbl_8037C820 +/* 8037C80C 0037976C 48 00 00 60 */ b lbl_8037C86C +lbl_8037C810: +/* 8037C810 00379770 2C 00 00 1B */ cmpwi r0, 0x1b +/* 8037C814 00379774 40 80 00 44 */ bge lbl_8037C858 +/* 8037C818 00379778 48 00 00 28 */ b lbl_8037C840 +/* 8037C81C 0037977C 48 00 00 50 */ b lbl_8037C86C +lbl_8037C820: +/* 8037C820 00379780 38 00 00 10 */ li r0, 0x10 +/* 8037C824 00379784 3C C0 CC 01 */ lis r6, 0xCC008000@ha +/* 8037C828 00379788 98 06 80 00 */ stb r0, 0xCC008000@l(r6) +/* 8037C82C 0037978C 38 A0 10 06 */ li r5, 0x1006 +/* 8037C830 00379790 38 00 00 00 */ li r0, 0 +/* 8037C834 00379794 90 A6 80 00 */ stw r5, 0xCC008000@l(r6) +/* 8037C838 00379798 90 06 80 00 */ stw r0, 0xCC008000@l(r6) +/* 8037C83C 0037979C 48 00 00 30 */ b lbl_8037C86C +lbl_8037C840: +/* 8037C840 003797A0 38 00 00 61 */ li r0, 0x61 +/* 8037C844 003797A4 3C A0 CC 01 */ lis r5, 0xCC008000@ha +/* 8037C848 003797A8 98 05 80 00 */ stb r0, 0xCC008000@l(r5) +/* 8037C84C 003797AC 3C 00 23 00 */ lis r0, 0x2300 +/* 8037C850 003797B0 90 05 80 00 */ stw r0, 0xCC008000@l(r5) +/* 8037C854 003797B4 48 00 00 18 */ b lbl_8037C86C +lbl_8037C858: +/* 8037C858 003797B8 38 00 00 61 */ li r0, 0x61 +/* 8037C85C 003797BC 3C A0 CC 01 */ lis r5, 0xCC008000@ha +/* 8037C860 003797C0 98 05 80 00 */ stb r0, 0xCC008000@l(r5) +/* 8037C864 003797C4 3C 00 24 00 */ lis r0, 0x2400 +/* 8037C868 003797C8 90 05 80 00 */ stw r0, 0xCC008000@l(r5) +lbl_8037C86C: +/* 8037C86C 003797CC 80 E2 CE 08 */ lwz r7, lbl_805AEB28@sda21(r2) +/* 8037C870 003797D0 80 07 04 E8 */ lwz r0, 0x4e8(r7) +/* 8037C874 003797D4 2C 00 00 15 */ cmpwi r0, 0x15 +/* 8037C878 003797D8 41 82 00 2C */ beq lbl_8037C8A4 +/* 8037C87C 003797DC 40 80 00 78 */ bge lbl_8037C8F4 +/* 8037C880 003797E0 2C 00 00 09 */ cmpwi r0, 9 +/* 8037C884 003797E4 40 80 00 10 */ bge lbl_8037C894 +/* 8037C888 003797E8 2C 00 00 00 */ cmpwi r0, 0 +/* 8037C88C 003797EC 40 80 00 18 */ bge lbl_8037C8A4 +/* 8037C890 003797F0 48 00 00 64 */ b lbl_8037C8F4 +lbl_8037C894: +/* 8037C894 003797F4 2C 00 00 11 */ cmpwi r0, 0x11 +/* 8037C898 003797F8 40 80 00 50 */ bge lbl_8037C8E8 +/* 8037C89C 003797FC 48 00 00 20 */ b lbl_8037C8BC +/* 8037C8A0 00379800 48 00 00 54 */ b lbl_8037C8F4 +lbl_8037C8A4: +/* 8037C8A4 00379804 38 00 00 61 */ li r0, 0x61 +/* 8037C8A8 00379808 3C A0 CC 01 */ lis r5, 0xCC008000@ha +/* 8037C8AC 0037980C 98 05 80 00 */ stb r0, 0xCC008000@l(r5) +/* 8037C8B0 00379810 3C 00 67 00 */ lis r0, 0x6700 +/* 8037C8B4 00379814 90 05 80 00 */ stw r0, 0xCC008000@l(r5) +/* 8037C8B8 00379818 48 00 00 3C */ b lbl_8037C8F4 +lbl_8037C8BC: +/* 8037C8BC 0037981C 80 07 04 EC */ lwz r0, 0x4ec(r7) +/* 8037C8C0 00379820 38 C0 00 08 */ li r6, 8 +/* 8037C8C4 00379824 3C A0 CC 01 */ lis r5, 0xCC008000@ha +/* 8037C8C8 00379828 54 00 07 2E */ rlwinm r0, r0, 0, 0x1c, 0x17 +/* 8037C8CC 0037982C 90 07 04 EC */ stw r0, 0x4ec(r7) +/* 8037C8D0 00379830 38 00 00 20 */ li r0, 0x20 +/* 8037C8D4 00379834 98 C5 80 00 */ stb r6, 0xCC008000@l(r5) +/* 8037C8D8 00379838 98 05 80 00 */ stb r0, 0xCC008000@l(r5) +/* 8037C8DC 0037983C 80 07 04 EC */ lwz r0, 0x4ec(r7) +/* 8037C8E0 00379840 90 05 80 00 */ stw r0, 0xCC008000@l(r5) +/* 8037C8E4 00379844 48 00 00 10 */ b lbl_8037C8F4 +lbl_8037C8E8: +/* 8037C8E8 00379848 80 AD AC 7C */ lwz r5, lbl_805A983C@sda21(r13) +/* 8037C8EC 0037984C 38 00 00 00 */ li r0, 0 +/* 8037C8F0 00379850 B0 05 00 06 */ sth r0, 6(r5) +lbl_8037C8F4: +/* 8037C8F4 00379854 80 A2 CE 08 */ lwz r5, lbl_805AEB28@sda21(r2) +/* 8037C8F8 00379858 90 65 04 E4 */ stw r3, 0x4e4(r5) +/* 8037C8FC 0037985C 80 05 04 E4 */ lwz r0, 0x4e4(r5) +/* 8037C900 00379860 28 00 00 23 */ cmplwi r0, 0x23 +/* 8037C904 00379864 41 81 04 1C */ bgt lbl_8037CD20 +/* 8037C908 00379868 3C 60 80 3F */ lis r3, lbl_803F0D0C@ha +/* 8037C90C 0037986C 38 63 0D 0C */ addi r3, r3, lbl_803F0D0C@l +/* 8037C910 00379870 54 00 10 3A */ slwi r0, r0, 2 +/* 8037C914 00379874 7C 03 00 2E */ lwzx r0, r3, r0 +/* 8037C918 00379878 7C 09 03 A6 */ mtctr r0 +/* 8037C91C 0037987C 4E 80 04 20 */ bctr +/* 8037C920 00379880 38 00 00 10 */ li r0, 0x10 +/* 8037C924 00379884 3C A0 CC 01 */ lis r5, 0xCC008000@ha +/* 8037C928 00379888 98 05 80 00 */ stb r0, 0xCC008000@l(r5) +/* 8037C92C 0037988C 38 60 10 06 */ li r3, 0x1006 +/* 8037C930 00379890 38 00 02 73 */ li r0, 0x273 +/* 8037C934 00379894 90 65 80 00 */ stw r3, 0xCC008000@l(r5) +/* 8037C938 00379898 90 05 80 00 */ stw r0, 0xCC008000@l(r5) +/* 8037C93C 0037989C 48 00 03 E4 */ b lbl_8037CD20 +/* 8037C940 003798A0 38 00 00 10 */ li r0, 0x10 +/* 8037C944 003798A4 3C A0 CC 01 */ lis r5, 0xCC008000@ha +/* 8037C948 003798A8 98 05 80 00 */ stb r0, 0xCC008000@l(r5) +/* 8037C94C 003798AC 38 60 10 06 */ li r3, 0x1006 +/* 8037C950 003798B0 38 00 01 4A */ li r0, 0x14a +/* 8037C954 003798B4 90 65 80 00 */ stw r3, 0xCC008000@l(r5) +/* 8037C958 003798B8 90 05 80 00 */ stw r0, 0xCC008000@l(r5) +/* 8037C95C 003798BC 48 00 03 C4 */ b lbl_8037CD20 +/* 8037C960 003798C0 38 00 00 10 */ li r0, 0x10 +/* 8037C964 003798C4 3C A0 CC 01 */ lis r5, 0xCC008000@ha +/* 8037C968 003798C8 98 05 80 00 */ stb r0, 0xCC008000@l(r5) +/* 8037C96C 003798CC 38 60 10 06 */ li r3, 0x1006 +/* 8037C970 003798D0 38 00 01 6B */ li r0, 0x16b +/* 8037C974 003798D4 90 65 80 00 */ stw r3, 0xCC008000@l(r5) +/* 8037C978 003798D8 90 05 80 00 */ stw r0, 0xCC008000@l(r5) +/* 8037C97C 003798DC 48 00 03 A4 */ b lbl_8037CD20 +/* 8037C980 003798E0 38 00 00 10 */ li r0, 0x10 +/* 8037C984 003798E4 3C A0 CC 01 */ lis r5, 0xCC008000@ha +/* 8037C988 003798E8 98 05 80 00 */ stb r0, 0xCC008000@l(r5) +/* 8037C98C 003798EC 38 60 10 06 */ li r3, 0x1006 +/* 8037C990 003798F0 38 00 00 84 */ li r0, 0x84 +/* 8037C994 003798F4 90 65 80 00 */ stw r3, 0xCC008000@l(r5) +/* 8037C998 003798F8 90 05 80 00 */ stw r0, 0xCC008000@l(r5) +/* 8037C99C 003798FC 48 00 03 84 */ b lbl_8037CD20 +/* 8037C9A0 00379900 38 00 00 10 */ li r0, 0x10 +/* 8037C9A4 00379904 3C A0 CC 01 */ lis r5, 0xCC008000@ha +/* 8037C9A8 00379908 98 05 80 00 */ stb r0, 0xCC008000@l(r5) +/* 8037C9AC 0037990C 38 60 10 06 */ li r3, 0x1006 +/* 8037C9B0 00379910 38 00 00 C6 */ li r0, 0xc6 +/* 8037C9B4 00379914 90 65 80 00 */ stw r3, 0xCC008000@l(r5) +/* 8037C9B8 00379918 90 05 80 00 */ stw r0, 0xCC008000@l(r5) +/* 8037C9BC 0037991C 48 00 03 64 */ b lbl_8037CD20 +/* 8037C9C0 00379920 38 00 00 10 */ li r0, 0x10 +/* 8037C9C4 00379924 3C A0 CC 01 */ lis r5, 0xCC008000@ha +/* 8037C9C8 00379928 98 05 80 00 */ stb r0, 0xCC008000@l(r5) +/* 8037C9CC 0037992C 38 60 10 06 */ li r3, 0x1006 +/* 8037C9D0 00379930 38 00 02 10 */ li r0, 0x210 +/* 8037C9D4 00379934 90 65 80 00 */ stw r3, 0xCC008000@l(r5) +/* 8037C9D8 00379938 90 05 80 00 */ stw r0, 0xCC008000@l(r5) +/* 8037C9DC 0037993C 48 00 03 44 */ b lbl_8037CD20 +/* 8037C9E0 00379940 38 00 00 10 */ li r0, 0x10 +/* 8037C9E4 00379944 3C A0 CC 01 */ lis r5, 0xCC008000@ha +/* 8037C9E8 00379948 98 05 80 00 */ stb r0, 0xCC008000@l(r5) +/* 8037C9EC 0037994C 38 60 10 06 */ li r3, 0x1006 +/* 8037C9F0 00379950 38 00 02 52 */ li r0, 0x252 +/* 8037C9F4 00379954 90 65 80 00 */ stw r3, 0xCC008000@l(r5) +/* 8037C9F8 00379958 90 05 80 00 */ stw r0, 0xCC008000@l(r5) +/* 8037C9FC 0037995C 48 00 03 24 */ b lbl_8037CD20 +/* 8037CA00 00379960 38 00 00 10 */ li r0, 0x10 +/* 8037CA04 00379964 3C A0 CC 01 */ lis r5, 0xCC008000@ha +/* 8037CA08 00379968 98 05 80 00 */ stb r0, 0xCC008000@l(r5) +/* 8037CA0C 0037996C 38 60 10 06 */ li r3, 0x1006 +/* 8037CA10 00379970 38 00 02 31 */ li r0, 0x231 +/* 8037CA14 00379974 90 65 80 00 */ stw r3, 0xCC008000@l(r5) +/* 8037CA18 00379978 90 05 80 00 */ stw r0, 0xCC008000@l(r5) +/* 8037CA1C 0037997C 48 00 03 04 */ b lbl_8037CD20 +/* 8037CA20 00379980 38 00 00 10 */ li r0, 0x10 +/* 8037CA24 00379984 3C A0 CC 01 */ lis r5, 0xCC008000@ha +/* 8037CA28 00379988 98 05 80 00 */ stb r0, 0xCC008000@l(r5) +/* 8037CA2C 0037998C 38 60 10 06 */ li r3, 0x1006 +/* 8037CA30 00379990 38 00 01 AD */ li r0, 0x1ad +/* 8037CA34 00379994 90 65 80 00 */ stw r3, 0xCC008000@l(r5) +/* 8037CA38 00379998 90 05 80 00 */ stw r0, 0xCC008000@l(r5) +/* 8037CA3C 0037999C 48 00 02 E4 */ b lbl_8037CD20 +/* 8037CA40 003799A0 38 00 00 10 */ li r0, 0x10 +/* 8037CA44 003799A4 3C A0 CC 01 */ lis r5, 0xCC008000@ha +/* 8037CA48 003799A8 98 05 80 00 */ stb r0, 0xCC008000@l(r5) +/* 8037CA4C 003799AC 38 60 10 06 */ li r3, 0x1006 +/* 8037CA50 003799B0 38 00 01 CE */ li r0, 0x1ce +/* 8037CA54 003799B4 90 65 80 00 */ stw r3, 0xCC008000@l(r5) +/* 8037CA58 003799B8 90 05 80 00 */ stw r0, 0xCC008000@l(r5) +/* 8037CA5C 003799BC 48 00 02 C4 */ b lbl_8037CD20 +/* 8037CA60 003799C0 38 00 00 10 */ li r0, 0x10 +/* 8037CA64 003799C4 3C A0 CC 01 */ lis r5, 0xCC008000@ha +/* 8037CA68 003799C8 98 05 80 00 */ stb r0, 0xCC008000@l(r5) +/* 8037CA6C 003799CC 38 60 10 06 */ li r3, 0x1006 +/* 8037CA70 003799D0 38 00 00 21 */ li r0, 0x21 +/* 8037CA74 003799D4 90 65 80 00 */ stw r3, 0xCC008000@l(r5) +/* 8037CA78 003799D8 90 05 80 00 */ stw r0, 0xCC008000@l(r5) +/* 8037CA7C 003799DC 48 00 02 A4 */ b lbl_8037CD20 +/* 8037CA80 003799E0 38 00 00 10 */ li r0, 0x10 +/* 8037CA84 003799E4 3C A0 CC 01 */ lis r5, 0xCC008000@ha +/* 8037CA88 003799E8 98 05 80 00 */ stb r0, 0xCC008000@l(r5) +/* 8037CA8C 003799EC 38 60 10 06 */ li r3, 0x1006 +/* 8037CA90 003799F0 38 00 01 53 */ li r0, 0x153 +/* 8037CA94 003799F4 90 65 80 00 */ stw r3, 0xCC008000@l(r5) +/* 8037CA98 003799F8 90 05 80 00 */ stw r0, 0xCC008000@l(r5) +/* 8037CA9C 003799FC 48 00 02 84 */ b lbl_8037CD20 +/* 8037CAA0 00379A00 38 00 00 61 */ li r0, 0x61 +/* 8037CAA4 00379A04 3C A0 CC 01 */ lis r5, 0xCC008000@ha +/* 8037CAA8 00379A08 3C 60 23 01 */ lis r3, 0x2300AE7F@ha +/* 8037CAAC 00379A0C 98 05 80 00 */ stb r0, 0xCC008000@l(r5) +/* 8037CAB0 00379A10 38 03 AE 7F */ addi r0, r3, 0x2300AE7F@l +/* 8037CAB4 00379A14 90 05 80 00 */ stw r0, 0xCC008000@l(r5) +/* 8037CAB8 00379A18 48 00 02 68 */ b lbl_8037CD20 +/* 8037CABC 00379A1C 38 00 00 61 */ li r0, 0x61 +/* 8037CAC0 00379A20 3C A0 CC 01 */ lis r5, 0xCC008000@ha +/* 8037CAC4 00379A24 3C 60 23 01 */ lis r3, 0x23008E7F@ha +/* 8037CAC8 00379A28 98 05 80 00 */ stb r0, 0xCC008000@l(r5) +/* 8037CACC 00379A2C 38 03 8E 7F */ addi r0, r3, 0x23008E7F@l +/* 8037CAD0 00379A30 90 05 80 00 */ stw r0, 0xCC008000@l(r5) +/* 8037CAD4 00379A34 48 00 02 4C */ b lbl_8037CD20 +/* 8037CAD8 00379A38 38 00 00 61 */ li r0, 0x61 +/* 8037CADC 00379A3C 3C A0 CC 01 */ lis r5, 0xCC008000@ha +/* 8037CAE0 00379A40 3C 60 23 01 */ lis r3, 0x23009E7F@ha +/* 8037CAE4 00379A44 98 05 80 00 */ stb r0, 0xCC008000@l(r5) +/* 8037CAE8 00379A48 38 03 9E 7F */ addi r0, r3, 0x23009E7F@l +/* 8037CAEC 00379A4C 90 05 80 00 */ stw r0, 0xCC008000@l(r5) +/* 8037CAF0 00379A50 48 00 02 30 */ b lbl_8037CD20 +/* 8037CAF4 00379A54 38 00 00 61 */ li r0, 0x61 +/* 8037CAF8 00379A58 3C A0 CC 01 */ lis r5, 0xCC008000@ha +/* 8037CAFC 00379A5C 3C 60 23 00 */ lis r3, 0x23001E7F@ha +/* 8037CB00 00379A60 98 05 80 00 */ stb r0, 0xCC008000@l(r5) +/* 8037CB04 00379A64 38 03 1E 7F */ addi r0, r3, 0x23001E7F@l +/* 8037CB08 00379A68 90 05 80 00 */ stw r0, 0xCC008000@l(r5) +/* 8037CB0C 00379A6C 48 00 02 14 */ b lbl_8037CD20 +/* 8037CB10 00379A70 38 00 00 61 */ li r0, 0x61 +/* 8037CB14 00379A74 3C A0 CC 01 */ lis r5, 0xCC008000@ha +/* 8037CB18 00379A78 3C 60 23 01 */ lis r3, 0x2300AC3F@ha +/* 8037CB1C 00379A7C 98 05 80 00 */ stb r0, 0xCC008000@l(r5) +/* 8037CB20 00379A80 38 03 AC 3F */ addi r0, r3, 0x2300AC3F@l +/* 8037CB24 00379A84 90 05 80 00 */ stw r0, 0xCC008000@l(r5) +/* 8037CB28 00379A88 48 00 01 F8 */ b lbl_8037CD20 +/* 8037CB2C 00379A8C 38 00 00 61 */ li r0, 0x61 +/* 8037CB30 00379A90 3C A0 CC 01 */ lis r5, 0xCC008000@ha +/* 8037CB34 00379A94 3C 60 23 01 */ lis r3, 0x2300AC7F@ha +/* 8037CB38 00379A98 98 05 80 00 */ stb r0, 0xCC008000@l(r5) +/* 8037CB3C 00379A9C 38 03 AC 7F */ addi r0, r3, 0x2300AC7F@l +/* 8037CB40 00379AA0 90 05 80 00 */ stw r0, 0xCC008000@l(r5) +/* 8037CB44 00379AA4 48 00 01 DC */ b lbl_8037CD20 +/* 8037CB48 00379AA8 38 00 00 61 */ li r0, 0x61 +/* 8037CB4C 00379AAC 3C A0 CC 01 */ lis r5, 0xCC008000@ha +/* 8037CB50 00379AB0 3C 60 23 01 */ lis r3, 0x2300ACBF@ha +/* 8037CB54 00379AB4 98 05 80 00 */ stb r0, 0xCC008000@l(r5) +/* 8037CB58 00379AB8 38 03 AC BF */ addi r0, r3, 0x2300ACBF@l +/* 8037CB5C 00379ABC 90 05 80 00 */ stw r0, 0xCC008000@l(r5) +/* 8037CB60 00379AC0 48 00 01 C0 */ b lbl_8037CD20 +/* 8037CB64 00379AC4 38 00 00 61 */ li r0, 0x61 +/* 8037CB68 00379AC8 3C A0 CC 01 */ lis r5, 0xCC008000@ha +/* 8037CB6C 00379ACC 3C 60 23 01 */ lis r3, 0x2300ACFF@ha +/* 8037CB70 00379AD0 98 05 80 00 */ stb r0, 0xCC008000@l(r5) +/* 8037CB74 00379AD4 38 03 AC FF */ addi r0, r3, 0x2300ACFF@l +/* 8037CB78 00379AD8 90 05 80 00 */ stw r0, 0xCC008000@l(r5) +/* 8037CB7C 00379ADC 48 00 01 A4 */ b lbl_8037CD20 +/* 8037CB80 00379AE0 38 00 00 61 */ li r0, 0x61 +/* 8037CB84 00379AE4 3C A0 CC 01 */ lis r5, 0xCC008000@ha +/* 8037CB88 00379AE8 3C 60 23 01 */ lis r3, 0x2300AD3F@ha +/* 8037CB8C 00379AEC 98 05 80 00 */ stb r0, 0xCC008000@l(r5) +/* 8037CB90 00379AF0 38 03 AD 3F */ addi r0, r3, 0x2300AD3F@l +/* 8037CB94 00379AF4 90 05 80 00 */ stw r0, 0xCC008000@l(r5) +/* 8037CB98 00379AF8 48 00 01 88 */ b lbl_8037CD20 +/* 8037CB9C 00379AFC 38 00 00 61 */ li r0, 0x61 +/* 8037CBA0 00379B00 3C A0 CC 01 */ lis r5, 0xCC008000@ha +/* 8037CBA4 00379B04 3C 60 23 01 */ lis r3, 0x2300AD7F@ha +/* 8037CBA8 00379B08 98 05 80 00 */ stb r0, 0xCC008000@l(r5) +/* 8037CBAC 00379B0C 38 03 AD 7F */ addi r0, r3, 0x2300AD7F@l +/* 8037CBB0 00379B10 90 05 80 00 */ stw r0, 0xCC008000@l(r5) +/* 8037CBB4 00379B14 48 00 01 6C */ b lbl_8037CD20 +/* 8037CBB8 00379B18 38 00 00 61 */ li r0, 0x61 +/* 8037CBBC 00379B1C 3C A0 CC 01 */ lis r5, 0xCC008000@ha +/* 8037CBC0 00379B20 3C 60 23 01 */ lis r3, 0x2300ADBF@ha +/* 8037CBC4 00379B24 98 05 80 00 */ stb r0, 0xCC008000@l(r5) +/* 8037CBC8 00379B28 38 03 AD BF */ addi r0, r3, 0x2300ADBF@l +/* 8037CBCC 00379B2C 90 05 80 00 */ stw r0, 0xCC008000@l(r5) +/* 8037CBD0 00379B30 48 00 01 50 */ b lbl_8037CD20 +/* 8037CBD4 00379B34 38 00 00 61 */ li r0, 0x61 +/* 8037CBD8 00379B38 3C A0 CC 01 */ lis r5, 0xCC008000@ha +/* 8037CBDC 00379B3C 3C 60 23 01 */ lis r3, 0x2300ADFF@ha +/* 8037CBE0 00379B40 98 05 80 00 */ stb r0, 0xCC008000@l(r5) +/* 8037CBE4 00379B44 38 03 AD FF */ addi r0, r3, 0x2300ADFF@l +/* 8037CBE8 00379B48 90 05 80 00 */ stw r0, 0xCC008000@l(r5) +/* 8037CBEC 00379B4C 48 00 01 34 */ b lbl_8037CD20 +/* 8037CBF0 00379B50 38 00 00 61 */ li r0, 0x61 +/* 8037CBF4 00379B54 3C A0 CC 01 */ lis r5, 0xCC008000@ha +/* 8037CBF8 00379B58 3C 60 23 01 */ lis r3, 0x2300AE3F@ha +/* 8037CBFC 00379B5C 98 05 80 00 */ stb r0, 0xCC008000@l(r5) +/* 8037CC00 00379B60 38 03 AE 3F */ addi r0, r3, 0x2300AE3F@l +/* 8037CC04 00379B64 90 05 80 00 */ stw r0, 0xCC008000@l(r5) +/* 8037CC08 00379B68 48 00 01 18 */ b lbl_8037CD20 +/* 8037CC0C 00379B6C 38 00 00 61 */ li r0, 0x61 +/* 8037CC10 00379B70 3C A0 CC 01 */ lis r5, 0xCC008000@ha +/* 8037CC14 00379B74 3C 60 23 01 */ lis r3, 0x2300A27F@ha +/* 8037CC18 00379B78 98 05 80 00 */ stb r0, 0xCC008000@l(r5) +/* 8037CC1C 00379B7C 38 03 A2 7F */ addi r0, r3, 0x2300A27F@l +/* 8037CC20 00379B80 90 05 80 00 */ stw r0, 0xCC008000@l(r5) +/* 8037CC24 00379B84 48 00 00 FC */ b lbl_8037CD20 +/* 8037CC28 00379B88 38 00 00 61 */ li r0, 0x61 +/* 8037CC2C 00379B8C 3C A0 CC 01 */ lis r5, 0xCC008000@ha +/* 8037CC30 00379B90 3C 60 23 01 */ lis r3, 0x2300A67F@ha +/* 8037CC34 00379B94 98 05 80 00 */ stb r0, 0xCC008000@l(r5) +/* 8037CC38 00379B98 38 03 A6 7F */ addi r0, r3, 0x2300A67F@l +/* 8037CC3C 00379B9C 90 05 80 00 */ stw r0, 0xCC008000@l(r5) +/* 8037CC40 00379BA0 48 00 00 E0 */ b lbl_8037CD20 +/* 8037CC44 00379BA4 38 00 00 61 */ li r0, 0x61 +/* 8037CC48 00379BA8 3C A0 CC 01 */ lis r5, 0xCC008000@ha +/* 8037CC4C 00379BAC 3C 60 23 01 */ lis r3, 0x2300AA7F@ha +/* 8037CC50 00379BB0 98 05 80 00 */ stb r0, 0xCC008000@l(r5) +/* 8037CC54 00379BB4 38 03 AA 7F */ addi r0, r3, 0x2300AA7F@l +/* 8037CC58 00379BB8 90 05 80 00 */ stw r0, 0xCC008000@l(r5) +/* 8037CC5C 00379BBC 48 00 00 C4 */ b lbl_8037CD20 +/* 8037CC60 00379BC0 38 00 00 61 */ li r0, 0x61 +/* 8037CC64 00379BC4 3C A0 CC 01 */ lis r5, 0xCC008000@ha +/* 8037CC68 00379BC8 3C 60 24 03 */ lis r3, 0x2402C0C6@ha +/* 8037CC6C 00379BCC 98 05 80 00 */ stb r0, 0xCC008000@l(r5) +/* 8037CC70 00379BD0 38 03 C0 C6 */ addi r0, r3, 0x2402C0C6@l +/* 8037CC74 00379BD4 90 05 80 00 */ stw r0, 0xCC008000@l(r5) +/* 8037CC78 00379BD8 48 00 00 A8 */ b lbl_8037CD20 +/* 8037CC7C 00379BDC 38 00 00 61 */ li r0, 0x61 +/* 8037CC80 00379BE0 3C A0 CC 01 */ lis r5, 0xCC008000@ha +/* 8037CC84 00379BE4 3C 60 24 03 */ lis r3, 0x2402C16B@ha +/* 8037CC88 00379BE8 98 05 80 00 */ stb r0, 0xCC008000@l(r5) +/* 8037CC8C 00379BEC 38 03 C1 6B */ addi r0, r3, 0x2402C16B@l +/* 8037CC90 00379BF0 90 05 80 00 */ stw r0, 0xCC008000@l(r5) +/* 8037CC94 00379BF4 48 00 00 8C */ b lbl_8037CD20 +/* 8037CC98 00379BF8 38 00 00 61 */ li r0, 0x61 +/* 8037CC9C 00379BFC 3C A0 CC 01 */ lis r5, 0xCC008000@ha +/* 8037CCA0 00379C00 3C 60 24 03 */ lis r3, 0x2402C0E7@ha +/* 8037CCA4 00379C04 98 05 80 00 */ stb r0, 0xCC008000@l(r5) +/* 8037CCA8 00379C08 38 03 C0 E7 */ addi r0, r3, 0x2402C0E7@l +/* 8037CCAC 00379C0C 90 05 80 00 */ stw r0, 0xCC008000@l(r5) +/* 8037CCB0 00379C10 48 00 00 70 */ b lbl_8037CD20 +/* 8037CCB4 00379C14 38 00 00 61 */ li r0, 0x61 +/* 8037CCB8 00379C18 3C A0 CC 01 */ lis r5, 0xCC008000@ha +/* 8037CCBC 00379C1C 3C 60 24 03 */ lis r3, 0x2402C108@ha +/* 8037CCC0 00379C20 98 05 80 00 */ stb r0, 0xCC008000@l(r5) +/* 8037CCC4 00379C24 38 03 C1 08 */ addi r0, r3, 0x2402C108@l +/* 8037CCC8 00379C28 90 05 80 00 */ stw r0, 0xCC008000@l(r5) +/* 8037CCCC 00379C2C 48 00 00 54 */ b lbl_8037CD20 +/* 8037CCD0 00379C30 38 00 00 61 */ li r0, 0x61 +/* 8037CCD4 00379C34 3C A0 CC 01 */ lis r5, 0xCC008000@ha +/* 8037CCD8 00379C38 3C 60 24 03 */ lis r3, 0x2402C129@ha +/* 8037CCDC 00379C3C 98 05 80 00 */ stb r0, 0xCC008000@l(r5) +/* 8037CCE0 00379C40 38 03 C1 29 */ addi r0, r3, 0x2402C129@l +/* 8037CCE4 00379C44 90 05 80 00 */ stw r0, 0xCC008000@l(r5) +/* 8037CCE8 00379C48 48 00 00 38 */ b lbl_8037CD20 +/* 8037CCEC 00379C4C 38 00 00 61 */ li r0, 0x61 +/* 8037CCF0 00379C50 3C A0 CC 01 */ lis r5, 0xCC008000@ha +/* 8037CCF4 00379C54 3C 60 24 03 */ lis r3, 0x2402C14A@ha +/* 8037CCF8 00379C58 98 05 80 00 */ stb r0, 0xCC008000@l(r5) +/* 8037CCFC 00379C5C 38 03 C1 4A */ addi r0, r3, 0x2402C14A@l +/* 8037CD00 00379C60 90 05 80 00 */ stw r0, 0xCC008000@l(r5) +/* 8037CD04 00379C64 48 00 00 1C */ b lbl_8037CD20 +/* 8037CD08 00379C68 38 00 00 61 */ li r0, 0x61 +/* 8037CD0C 00379C6C 3C A0 CC 01 */ lis r5, 0xCC008000@ha +/* 8037CD10 00379C70 3C 60 24 03 */ lis r3, 0x2402C1AD@ha +/* 8037CD14 00379C74 98 05 80 00 */ stb r0, 0xCC008000@l(r5) +/* 8037CD18 00379C78 38 03 C1 AD */ addi r0, r3, 0x2402C1AD@l +/* 8037CD1C 00379C7C 90 05 80 00 */ stw r0, 0xCC008000@l(r5) +lbl_8037CD20: +/* 8037CD20 00379C80 80 62 CE 08 */ lwz r3, lbl_805AEB28@sda21(r2) +/* 8037CD24 00379C84 90 83 04 E8 */ stw r4, 0x4e8(r3) +/* 8037CD28 00379C88 80 03 04 E8 */ lwz r0, 0x4e8(r3) +/* 8037CD2C 00379C8C 28 00 00 16 */ cmplwi r0, 0x16 +/* 8037CD30 00379C90 41 81 02 F0 */ bgt lbl_8037D020 +/* 8037CD34 00379C94 3C 80 80 3F */ lis r4, lbl_803F0CB0@ha +/* 8037CD38 00379C98 38 84 0C B0 */ addi r4, r4, lbl_803F0CB0@l +/* 8037CD3C 00379C9C 54 00 10 3A */ slwi r0, r0, 2 +/* 8037CD40 00379CA0 7C 04 00 2E */ lwzx r0, r4, r0 +/* 8037CD44 00379CA4 7C 09 03 A6 */ mtctr r0 +/* 8037CD48 00379CA8 4E 80 04 20 */ bctr +/* 8037CD4C 00379CAC 38 00 00 61 */ li r0, 0x61 +/* 8037CD50 00379CB0 3C 80 CC 01 */ lis r4, 0xCC008000@ha +/* 8037CD54 00379CB4 3C 60 67 00 */ lis r3, 0x67000042@ha +/* 8037CD58 00379CB8 98 04 80 00 */ stb r0, 0xCC008000@l(r4) +/* 8037CD5C 00379CBC 38 03 00 42 */ addi r0, r3, 0x67000042@l +/* 8037CD60 00379CC0 90 04 80 00 */ stw r0, 0xCC008000@l(r4) +/* 8037CD64 00379CC4 48 00 02 BC */ b lbl_8037D020 +/* 8037CD68 00379CC8 38 00 00 61 */ li r0, 0x61 +/* 8037CD6C 00379CCC 3C 80 CC 01 */ lis r4, 0xCC008000@ha +/* 8037CD70 00379CD0 3C 60 67 00 */ lis r3, 0x67000084@ha +/* 8037CD74 00379CD4 98 04 80 00 */ stb r0, 0xCC008000@l(r4) +/* 8037CD78 00379CD8 38 03 00 84 */ addi r0, r3, 0x67000084@l +/* 8037CD7C 00379CDC 90 04 80 00 */ stw r0, 0xCC008000@l(r4) +/* 8037CD80 00379CE0 48 00 02 A0 */ b lbl_8037D020 +/* 8037CD84 00379CE4 38 00 00 61 */ li r0, 0x61 +/* 8037CD88 00379CE8 3C 80 CC 01 */ lis r4, 0xCC008000@ha +/* 8037CD8C 00379CEC 3C 60 67 00 */ lis r3, 0x67000063@ha +/* 8037CD90 00379CF0 98 04 80 00 */ stb r0, 0xCC008000@l(r4) +/* 8037CD94 00379CF4 38 03 00 63 */ addi r0, r3, 0x67000063@l +/* 8037CD98 00379CF8 90 04 80 00 */ stw r0, 0xCC008000@l(r4) +/* 8037CD9C 00379CFC 48 00 02 84 */ b lbl_8037D020 +/* 8037CDA0 00379D00 38 00 00 61 */ li r0, 0x61 +/* 8037CDA4 00379D04 3C 80 CC 01 */ lis r4, 0xCC008000@ha +/* 8037CDA8 00379D08 3C 60 67 00 */ lis r3, 0x67000129@ha +/* 8037CDAC 00379D0C 98 04 80 00 */ stb r0, 0xCC008000@l(r4) +/* 8037CDB0 00379D10 38 03 01 29 */ addi r0, r3, 0x67000129@l +/* 8037CDB4 00379D14 90 04 80 00 */ stw r0, 0xCC008000@l(r4) +/* 8037CDB8 00379D18 48 00 02 68 */ b lbl_8037D020 +/* 8037CDBC 00379D1C 38 00 00 61 */ li r0, 0x61 +/* 8037CDC0 00379D20 3C 80 CC 01 */ lis r4, 0xCC008000@ha +/* 8037CDC4 00379D24 3C 60 67 00 */ lis r3, 0x67000252@ha +/* 8037CDC8 00379D28 98 04 80 00 */ stb r0, 0xCC008000@l(r4) +/* 8037CDCC 00379D2C 38 03 02 52 */ addi r0, r3, 0x67000252@l +/* 8037CDD0 00379D30 90 04 80 00 */ stw r0, 0xCC008000@l(r4) +/* 8037CDD4 00379D34 48 00 02 4C */ b lbl_8037D020 +/* 8037CDD8 00379D38 38 00 00 61 */ li r0, 0x61 +/* 8037CDDC 00379D3C 3C 80 CC 01 */ lis r4, 0xCC008000@ha +/* 8037CDE0 00379D40 3C 60 67 00 */ lis r3, 0x67000021@ha +/* 8037CDE4 00379D44 98 04 80 00 */ stb r0, 0xCC008000@l(r4) +/* 8037CDE8 00379D48 38 03 00 21 */ addi r0, r3, 0x67000021@l +/* 8037CDEC 00379D4C 90 04 80 00 */ stw r0, 0xCC008000@l(r4) +/* 8037CDF0 00379D50 48 00 02 30 */ b lbl_8037D020 +/* 8037CDF4 00379D54 38 00 00 61 */ li r0, 0x61 +/* 8037CDF8 00379D58 3C 80 CC 01 */ lis r4, 0xCC008000@ha +/* 8037CDFC 00379D5C 3C 60 67 00 */ lis r3, 0x6700014B@ha +/* 8037CE00 00379D60 98 04 80 00 */ stb r0, 0xCC008000@l(r4) +/* 8037CE04 00379D64 38 03 01 4B */ addi r0, r3, 0x6700014B@l +/* 8037CE08 00379D68 90 04 80 00 */ stw r0, 0xCC008000@l(r4) +/* 8037CE0C 00379D6C 48 00 02 14 */ b lbl_8037D020 +/* 8037CE10 00379D70 38 00 00 61 */ li r0, 0x61 +/* 8037CE14 00379D74 3C 80 CC 01 */ lis r4, 0xCC008000@ha +/* 8037CE18 00379D78 3C 60 67 00 */ lis r3, 0x6700018D@ha +/* 8037CE1C 00379D7C 98 04 80 00 */ stb r0, 0xCC008000@l(r4) +/* 8037CE20 00379D80 38 03 01 8D */ addi r0, r3, 0x6700018D@l +/* 8037CE24 00379D84 90 04 80 00 */ stw r0, 0xCC008000@l(r4) +/* 8037CE28 00379D88 48 00 01 F8 */ b lbl_8037D020 +/* 8037CE2C 00379D8C 38 00 00 61 */ li r0, 0x61 +/* 8037CE30 00379D90 3C 80 CC 01 */ lis r4, 0xCC008000@ha +/* 8037CE34 00379D94 3C 60 67 00 */ lis r3, 0x670001CF@ha +/* 8037CE38 00379D98 98 04 80 00 */ stb r0, 0xCC008000@l(r4) +/* 8037CE3C 00379D9C 38 03 01 CF */ addi r0, r3, 0x670001CF@l +/* 8037CE40 00379DA0 90 04 80 00 */ stw r0, 0xCC008000@l(r4) +/* 8037CE44 00379DA4 48 00 01 DC */ b lbl_8037D020 +/* 8037CE48 00379DA8 38 00 00 61 */ li r0, 0x61 +/* 8037CE4C 00379DAC 3C 80 CC 01 */ lis r4, 0xCC008000@ha +/* 8037CE50 00379DB0 3C 60 67 00 */ lis r3, 0x67000211@ha +/* 8037CE54 00379DB4 98 04 80 00 */ stb r0, 0xCC008000@l(r4) +/* 8037CE58 00379DB8 38 03 02 11 */ addi r0, r3, 0x67000211@l +/* 8037CE5C 00379DBC 90 04 80 00 */ stw r0, 0xCC008000@l(r4) +/* 8037CE60 00379DC0 48 00 01 C0 */ b lbl_8037D020 +/* 8037CE64 00379DC4 80 03 04 EC */ lwz r0, 0x4ec(r3) +/* 8037CE68 00379DC8 38 A0 00 08 */ li r5, 8 +/* 8037CE6C 00379DCC 3C 80 CC 01 */ lis r4, 0xCC008000@ha +/* 8037CE70 00379DD0 54 00 07 2E */ rlwinm r0, r0, 0, 0x1c, 0x17 +/* 8037CE74 00379DD4 60 00 00 20 */ ori r0, r0, 0x20 +/* 8037CE78 00379DD8 90 03 04 EC */ stw r0, 0x4ec(r3) +/* 8037CE7C 00379DDC 38 00 00 20 */ li r0, 0x20 +/* 8037CE80 00379DE0 98 A4 80 00 */ stb r5, 0xCC008000@l(r4) +/* 8037CE84 00379DE4 98 04 80 00 */ stb r0, 0xCC008000@l(r4) +/* 8037CE88 00379DE8 80 03 04 EC */ lwz r0, 0x4ec(r3) +/* 8037CE8C 00379DEC 90 04 80 00 */ stw r0, 0xCC008000@l(r4) +/* 8037CE90 00379DF0 48 00 01 90 */ b lbl_8037D020 +/* 8037CE94 00379DF4 80 03 04 EC */ lwz r0, 0x4ec(r3) +/* 8037CE98 00379DF8 38 A0 00 08 */ li r5, 8 +/* 8037CE9C 00379DFC 3C 80 CC 01 */ lis r4, 0xCC008000@ha +/* 8037CEA0 00379E00 54 00 07 2E */ rlwinm r0, r0, 0, 0x1c, 0x17 +/* 8037CEA4 00379E04 60 00 00 30 */ ori r0, r0, 0x30 +/* 8037CEA8 00379E08 90 03 04 EC */ stw r0, 0x4ec(r3) +/* 8037CEAC 00379E0C 38 00 00 20 */ li r0, 0x20 +/* 8037CEB0 00379E10 98 A4 80 00 */ stb r5, 0xCC008000@l(r4) +/* 8037CEB4 00379E14 98 04 80 00 */ stb r0, 0xCC008000@l(r4) +/* 8037CEB8 00379E18 80 03 04 EC */ lwz r0, 0x4ec(r3) +/* 8037CEBC 00379E1C 90 04 80 00 */ stw r0, 0xCC008000@l(r4) +/* 8037CEC0 00379E20 48 00 01 60 */ b lbl_8037D020 +/* 8037CEC4 00379E24 80 03 04 EC */ lwz r0, 0x4ec(r3) +/* 8037CEC8 00379E28 38 A0 00 08 */ li r5, 8 +/* 8037CECC 00379E2C 3C 80 CC 01 */ lis r4, 0xCC008000@ha +/* 8037CED0 00379E30 54 00 07 2E */ rlwinm r0, r0, 0, 0x1c, 0x17 +/* 8037CED4 00379E34 60 00 00 40 */ ori r0, r0, 0x40 +/* 8037CED8 00379E38 90 03 04 EC */ stw r0, 0x4ec(r3) +/* 8037CEDC 00379E3C 38 00 00 20 */ li r0, 0x20 +/* 8037CEE0 00379E40 98 A4 80 00 */ stb r5, 0xCC008000@l(r4) +/* 8037CEE4 00379E44 98 04 80 00 */ stb r0, 0xCC008000@l(r4) +/* 8037CEE8 00379E48 80 03 04 EC */ lwz r0, 0x4ec(r3) +/* 8037CEEC 00379E4C 90 04 80 00 */ stw r0, 0xCC008000@l(r4) +/* 8037CEF0 00379E50 48 00 01 30 */ b lbl_8037D020 +/* 8037CEF4 00379E54 80 03 04 EC */ lwz r0, 0x4ec(r3) +/* 8037CEF8 00379E58 38 A0 00 08 */ li r5, 8 +/* 8037CEFC 00379E5C 3C 80 CC 01 */ lis r4, 0xCC008000@ha +/* 8037CF00 00379E60 54 00 07 2E */ rlwinm r0, r0, 0, 0x1c, 0x17 +/* 8037CF04 00379E64 60 00 00 50 */ ori r0, r0, 0x50 +/* 8037CF08 00379E68 90 03 04 EC */ stw r0, 0x4ec(r3) +/* 8037CF0C 00379E6C 38 00 00 20 */ li r0, 0x20 +/* 8037CF10 00379E70 98 A4 80 00 */ stb r5, 0xCC008000@l(r4) +/* 8037CF14 00379E74 98 04 80 00 */ stb r0, 0xCC008000@l(r4) +/* 8037CF18 00379E78 80 03 04 EC */ lwz r0, 0x4ec(r3) +/* 8037CF1C 00379E7C 90 04 80 00 */ stw r0, 0xCC008000@l(r4) +/* 8037CF20 00379E80 48 00 01 00 */ b lbl_8037D020 +/* 8037CF24 00379E84 80 03 04 EC */ lwz r0, 0x4ec(r3) +/* 8037CF28 00379E88 38 A0 00 08 */ li r5, 8 +/* 8037CF2C 00379E8C 3C 80 CC 01 */ lis r4, 0xCC008000@ha +/* 8037CF30 00379E90 54 00 07 2E */ rlwinm r0, r0, 0, 0x1c, 0x17 +/* 8037CF34 00379E94 60 00 00 60 */ ori r0, r0, 0x60 +/* 8037CF38 00379E98 90 03 04 EC */ stw r0, 0x4ec(r3) +/* 8037CF3C 00379E9C 38 00 00 20 */ li r0, 0x20 +/* 8037CF40 00379EA0 98 A4 80 00 */ stb r5, 0xCC008000@l(r4) +/* 8037CF44 00379EA4 98 04 80 00 */ stb r0, 0xCC008000@l(r4) +/* 8037CF48 00379EA8 80 03 04 EC */ lwz r0, 0x4ec(r3) +/* 8037CF4C 00379EAC 90 04 80 00 */ stw r0, 0xCC008000@l(r4) +/* 8037CF50 00379EB0 48 00 00 D0 */ b lbl_8037D020 +/* 8037CF54 00379EB4 80 03 04 EC */ lwz r0, 0x4ec(r3) +/* 8037CF58 00379EB8 38 A0 00 08 */ li r5, 8 +/* 8037CF5C 00379EBC 3C 80 CC 01 */ lis r4, 0xCC008000@ha +/* 8037CF60 00379EC0 54 00 07 2E */ rlwinm r0, r0, 0, 0x1c, 0x17 +/* 8037CF64 00379EC4 60 00 00 70 */ ori r0, r0, 0x70 +/* 8037CF68 00379EC8 90 03 04 EC */ stw r0, 0x4ec(r3) +/* 8037CF6C 00379ECC 38 00 00 20 */ li r0, 0x20 +/* 8037CF70 00379ED0 98 A4 80 00 */ stb r5, 0xCC008000@l(r4) +/* 8037CF74 00379ED4 98 04 80 00 */ stb r0, 0xCC008000@l(r4) +/* 8037CF78 00379ED8 80 03 04 EC */ lwz r0, 0x4ec(r3) +/* 8037CF7C 00379EDC 90 04 80 00 */ stw r0, 0xCC008000@l(r4) +/* 8037CF80 00379EE0 48 00 00 A0 */ b lbl_8037D020 +/* 8037CF84 00379EE4 80 03 04 EC */ lwz r0, 0x4ec(r3) +/* 8037CF88 00379EE8 38 A0 00 08 */ li r5, 8 +/* 8037CF8C 00379EEC 3C 80 CC 01 */ lis r4, 0xCC008000@ha +/* 8037CF90 00379EF0 54 00 07 2E */ rlwinm r0, r0, 0, 0x1c, 0x17 +/* 8037CF94 00379EF4 60 00 00 90 */ ori r0, r0, 0x90 +/* 8037CF98 00379EF8 90 03 04 EC */ stw r0, 0x4ec(r3) +/* 8037CF9C 00379EFC 38 00 00 20 */ li r0, 0x20 +/* 8037CFA0 00379F00 98 A4 80 00 */ stb r5, 0xCC008000@l(r4) +/* 8037CFA4 00379F04 98 04 80 00 */ stb r0, 0xCC008000@l(r4) +/* 8037CFA8 00379F08 80 03 04 EC */ lwz r0, 0x4ec(r3) +/* 8037CFAC 00379F0C 90 04 80 00 */ stw r0, 0xCC008000@l(r4) +/* 8037CFB0 00379F10 48 00 00 70 */ b lbl_8037D020 +/* 8037CFB4 00379F14 80 03 04 EC */ lwz r0, 0x4ec(r3) +/* 8037CFB8 00379F18 38 A0 00 08 */ li r5, 8 +/* 8037CFBC 00379F1C 3C 80 CC 01 */ lis r4, 0xCC008000@ha +/* 8037CFC0 00379F20 54 00 07 2E */ rlwinm r0, r0, 0, 0x1c, 0x17 +/* 8037CFC4 00379F24 60 00 00 80 */ ori r0, r0, 0x80 +/* 8037CFC8 00379F28 90 03 04 EC */ stw r0, 0x4ec(r3) +/* 8037CFCC 00379F2C 38 00 00 20 */ li r0, 0x20 +/* 8037CFD0 00379F30 98 A4 80 00 */ stb r5, 0xCC008000@l(r4) +/* 8037CFD4 00379F34 98 04 80 00 */ stb r0, 0xCC008000@l(r4) +/* 8037CFD8 00379F38 80 03 04 EC */ lwz r0, 0x4ec(r3) +/* 8037CFDC 00379F3C 90 04 80 00 */ stw r0, 0xCC008000@l(r4) +/* 8037CFE0 00379F40 48 00 00 40 */ b lbl_8037D020 +/* 8037CFE4 00379F44 80 6D AC 7C */ lwz r3, lbl_805A983C@sda21(r13) +/* 8037CFE8 00379F48 38 00 00 02 */ li r0, 2 +/* 8037CFEC 00379F4C B0 03 00 06 */ sth r0, 6(r3) +/* 8037CFF0 00379F50 48 00 00 30 */ b lbl_8037D020 +/* 8037CFF4 00379F54 80 6D AC 7C */ lwz r3, lbl_805A983C@sda21(r13) +/* 8037CFF8 00379F58 38 00 00 03 */ li r0, 3 +/* 8037CFFC 00379F5C B0 03 00 06 */ sth r0, 6(r3) +/* 8037D000 00379F60 48 00 00 20 */ b lbl_8037D020 +/* 8037D004 00379F64 80 6D AC 7C */ lwz r3, lbl_805A983C@sda21(r13) +/* 8037D008 00379F68 38 00 00 04 */ li r0, 4 +/* 8037D00C 00379F6C B0 03 00 06 */ sth r0, 6(r3) +/* 8037D010 00379F70 48 00 00 10 */ b lbl_8037D020 +/* 8037D014 00379F74 80 6D AC 7C */ lwz r3, lbl_805A983C@sda21(r13) +/* 8037D018 00379F78 38 00 00 05 */ li r0, 5 +/* 8037D01C 00379F7C B0 03 00 06 */ sth r0, 6(r3) +lbl_8037D020: +/* 8037D020 00379F80 80 62 CE 08 */ lwz r3, lbl_805AEB28@sda21(r2) +/* 8037D024 00379F84 38 00 00 00 */ li r0, 0 +/* 8037D028 00379F88 B0 03 00 02 */ sth r0, 2(r3) +/* 8037D02C 00379F8C 4E 80 00 20 */ blr + +.global GXClearGPMetric +GXClearGPMetric: +/* 8037D030 00379F90 80 6D AC 7C */ lwz r3, lbl_805A983C@sda21(r13) +/* 8037D034 00379F94 38 00 00 04 */ li r0, 4 +/* 8037D038 00379F98 B0 03 00 04 */ sth r0, 4(r3) +/* 8037D03C 00379F9C 4E 80 00 20 */ blr diff --git a/asm/Dolphin/GX/GXPixel.s b/asm/Dolphin/GX/GXPixel.s new file mode 100644 index 00000000..c67d1cc5 --- /dev/null +++ b/asm/Dolphin/GX/GXPixel.s @@ -0,0 +1,425 @@ +.include "macros.inc" + +.section .text, "ax" + +.global GXSetFog +GXSetFog: +/* 8037BBFC 00378B5C 7C 08 02 A6 */ mflr r0 +/* 8037BC00 00378B60 FC 04 18 00 */ fcmpu cr0, f4, f3 +/* 8037BC04 00378B64 90 01 00 04 */ stw r0, 4(r1) +/* 8037BC08 00378B68 94 21 FF B8 */ stwu r1, -0x48(r1) +/* 8037BC0C 00378B6C 93 E1 00 44 */ stw r31, 0x44(r1) +/* 8037BC10 00378B70 3B E3 00 00 */ addi r31, r3, 0 +/* 8037BC14 00378B74 93 C1 00 40 */ stw r30, 0x40(r1) +/* 8037BC18 00378B78 93 A1 00 3C */ stw r29, 0x3c(r1) +/* 8037BC1C 00378B7C 3B A4 00 00 */ addi r29, r4, 0 +/* 8037BC20 00378B80 41 82 00 0C */ beq lbl_8037BC2C +/* 8037BC24 00378B84 FC 02 08 00 */ fcmpu cr0, f2, f1 +/* 8037BC28 00378B88 40 82 00 14 */ bne lbl_8037BC3C +lbl_8037BC2C: +/* 8037BC2C 00378B8C C0 62 CE 98 */ lfs f3, lbl_805AEBB8@sda21(r2) +/* 8037BC30 00378B90 C0 82 CE 9C */ lfs f4, lbl_805AEBBC@sda21(r2) +/* 8037BC34 00378B94 FC A0 18 90 */ fmr f5, f3 +/* 8037BC38 00378B98 48 00 00 20 */ b lbl_8037BC58 +lbl_8037BC3C: +/* 8037BC3C 00378B9C EC 04 18 28 */ fsubs f0, f4, f3 +/* 8037BC40 00378BA0 EC A2 08 28 */ fsubs f5, f2, f1 +/* 8037BC44 00378BA4 EC 44 00 F2 */ fmuls f2, f4, f3 +/* 8037BC48 00378BA8 EC 84 00 24 */ fdivs f4, f4, f0 +/* 8037BC4C 00378BAC EC 00 01 72 */ fmuls f0, f0, f5 +/* 8037BC50 00378BB0 EC A1 28 24 */ fdivs f5, f1, f5 +/* 8037BC54 00378BB4 EC 62 00 24 */ fdivs f3, f2, f0 +lbl_8037BC58: +/* 8037BC58 00378BB8 C0 22 CE 9C */ lfs f1, lbl_805AEBBC@sda21(r2) +/* 8037BC5C 00378BBC 38 60 00 00 */ li r3, 0 +/* 8037BC60 00378BC0 C8 02 CE A0 */ lfd f0, lbl_805AEBC0@sda21(r2) +/* 8037BC64 00378BC4 48 00 00 0C */ b lbl_8037BC70 +lbl_8037BC68: +/* 8037BC68 00378BC8 EC 84 00 72 */ fmuls f4, f4, f1 +/* 8037BC6C 00378BCC 38 63 00 01 */ addi r3, r3, 1 +lbl_8037BC70: +/* 8037BC70 00378BD0 FC 04 00 40 */ fcmpo cr0, f4, f0 +/* 8037BC74 00378BD4 41 81 FF F4 */ bgt lbl_8037BC68 +/* 8037BC78 00378BD8 C8 02 CE B0 */ lfd f0, lbl_805AEBD0@sda21(r2) +/* 8037BC7C 00378BDC C0 42 CE A8 */ lfs f2, lbl_805AEBC8@sda21(r2) +/* 8037BC80 00378BE0 C0 22 CE 98 */ lfs f1, lbl_805AEBB8@sda21(r2) +/* 8037BC84 00378BE4 48 00 00 0C */ b lbl_8037BC90 +lbl_8037BC88: +/* 8037BC88 00378BE8 EC 84 00 B2 */ fmuls f4, f4, f2 +/* 8037BC8C 00378BEC 38 63 FF FF */ addi r3, r3, -1 +lbl_8037BC90: +/* 8037BC90 00378BF0 FC 04 08 40 */ fcmpo cr0, f4, f1 +/* 8037BC94 00378BF4 40 81 00 0C */ ble lbl_8037BCA0 +/* 8037BC98 00378BF8 FC 04 00 40 */ fcmpo cr0, f4, f0 +/* 8037BC9C 00378BFC 41 80 FF EC */ blt lbl_8037BC88 +lbl_8037BCA0: +/* 8037BCA0 00378C00 3B C3 00 01 */ addi r30, r3, 1 +/* 8037BCA4 00378C04 C0 02 CE B8 */ lfs f0, lbl_805AEBD8@sda21(r2) +/* 8037BCA8 00378C08 38 00 00 01 */ li r0, 1 +/* 8037BCAC 00378C0C C8 42 CE C0 */ lfd f2, lbl_805AEBE0@sda21(r2) +/* 8037BCB0 00378C10 7C 00 F0 30 */ slw r0, r0, r30 +/* 8037BCB4 00378C14 EC 20 01 32 */ fmuls f1, f0, f4 +/* 8037BCB8 00378C18 6C 03 80 00 */ xoris r3, r0, 0x8000 +/* 8037BCBC 00378C1C D0 A1 00 28 */ stfs f5, 0x28(r1) +/* 8037BCC0 00378C20 3C 00 43 30 */ lis r0, 0x4330 +/* 8037BCC4 00378C24 90 61 00 34 */ stw r3, 0x34(r1) +/* 8037BCC8 00378C28 90 01 00 30 */ stw r0, 0x30(r1) +/* 8037BCCC 00378C2C C8 01 00 30 */ lfd f0, 0x30(r1) +/* 8037BCD0 00378C30 EC 00 10 28 */ fsubs f0, f0, f2 +/* 8037BCD4 00378C34 EC 03 00 24 */ fdivs f0, f3, f0 +/* 8037BCD8 00378C38 D0 01 00 2C */ stfs f0, 0x2c(r1) +/* 8037BCDC 00378C3C 48 00 DC 79 */ bl __cvt_fp2unsigned +/* 8037BCE0 00378C40 80 01 00 2C */ lwz r0, 0x2c(r1) +/* 8037BCE4 00378C44 54 69 02 3E */ clrlwi r9, r3, 8 +/* 8037BCE8 00378C48 88 DD 00 01 */ lbz r6, 1(r29) +/* 8037BCEC 00378C4C 57 C8 02 3E */ clrlwi r8, r30, 8 +/* 8037BCF0 00378C50 54 04 A3 68 */ rlwinm r4, r0, 0x14, 0xd, 0x14 +/* 8037BCF4 00378C54 50 04 A5 7E */ rlwimi r4, r0, 0x14, 0x15, 0x1f +/* 8037BCF8 00378C58 89 7D 00 02 */ lbz r11, 2(r29) +/* 8037BCFC 00378C5C 54 00 A3 18 */ rlwinm r0, r0, 0x14, 0xc, 0xc +/* 8037BD00 00378C60 88 BD 00 00 */ lbz r5, 0(r29) +/* 8037BD04 00378C64 50 80 03 7E */ rlwimi r0, r4, 0, 0xd, 0x1f +/* 8037BD08 00378C68 81 81 00 28 */ lwz r12, 0x28(r1) +/* 8037BD0C 00378C6C 54 07 02 3E */ clrlwi r7, r0, 8 +/* 8037BD10 00378C70 80 62 CE 08 */ lwz r3, lbl_805AEB28@sda21(r2) +/* 8037BD14 00378C74 64 EA EE 00 */ oris r10, r7, 0xee00 +/* 8037BD18 00378C78 38 00 00 61 */ li r0, 0x61 +/* 8037BD1C 00378C7C 3C 80 CC 01 */ lis r4, 0xCC008000@ha +/* 8037BD20 00378C80 98 04 80 00 */ stb r0, 0xCC008000@l(r4) +/* 8037BD24 00378C84 65 27 EF 00 */ oris r7, r9, 0xef00 +/* 8037BD28 00378C88 54 C6 40 2E */ slwi r6, r6, 8 +/* 8037BD2C 00378C8C 91 44 80 00 */ stw r10, 0xCC008000@l(r4) +/* 8037BD30 00378C90 55 8A A3 68 */ rlwinm r10, r12, 0x14, 0xd, 0x14 +/* 8037BD34 00378C94 51 8A A5 7E */ rlwimi r10, r12, 0x14, 0x15, 0x1f +/* 8037BD38 00378C98 98 04 80 00 */ stb r0, 0xCC008000@l(r4) +/* 8037BD3C 00378C9C 55 89 A3 18 */ rlwinm r9, r12, 0x14, 0xc, 0xc +/* 8037BD40 00378CA0 51 49 03 7E */ rlwimi r9, r10, 0, 0xd, 0x1f +/* 8037BD44 00378CA4 90 E4 80 00 */ stw r7, 0xCC008000@l(r4) +/* 8037BD48 00378CA8 65 07 F0 00 */ oris r7, r8, 0xf000 +/* 8037BD4C 00378CAC 51 66 06 3E */ rlwimi r6, r11, 0, 0x18, 0x1f +/* 8037BD50 00378CB0 98 04 80 00 */ stb r0, 0xCC008000@l(r4) +/* 8037BD54 00378CB4 90 E4 80 00 */ stw r7, 0xCC008000@l(r4) +/* 8037BD58 00378CB8 57 E7 A8 14 */ slwi r7, r31, 0x15 +/* 8037BD5C 00378CBC 51 27 03 3E */ rlwimi r7, r9, 0, 0xc, 0x1f +/* 8037BD60 00378CC0 54 E7 02 3E */ clrlwi r7, r7, 8 +/* 8037BD64 00378CC4 98 04 80 00 */ stb r0, 0xCC008000@l(r4) +/* 8037BD68 00378CC8 64 E7 F1 00 */ oris r7, r7, 0xf100 +/* 8037BD6C 00378CCC 90 E4 80 00 */ stw r7, 0xCC008000@l(r4) +/* 8037BD70 00378CD0 98 04 80 00 */ stb r0, 0xCC008000@l(r4) +/* 8037BD74 00378CD4 54 A0 80 1E */ slwi r0, r5, 0x10 +/* 8037BD78 00378CD8 50 C0 04 3E */ rlwimi r0, r6, 0, 0x10, 0x1f +/* 8037BD7C 00378CDC 54 00 02 3E */ clrlwi r0, r0, 8 +/* 8037BD80 00378CE0 64 00 F2 00 */ oris r0, r0, 0xf200 +/* 8037BD84 00378CE4 90 04 80 00 */ stw r0, 0xCC008000@l(r4) +/* 8037BD88 00378CE8 38 00 00 00 */ li r0, 0 +/* 8037BD8C 00378CEC B0 03 00 02 */ sth r0, 2(r3) +/* 8037BD90 00378CF0 80 01 00 4C */ lwz r0, 0x4c(r1) +/* 8037BD94 00378CF4 83 E1 00 44 */ lwz r31, 0x44(r1) +/* 8037BD98 00378CF8 83 C1 00 40 */ lwz r30, 0x40(r1) +/* 8037BD9C 00378CFC 83 A1 00 3C */ lwz r29, 0x3c(r1) +/* 8037BDA0 00378D00 38 21 00 48 */ addi r1, r1, 0x48 +/* 8037BDA4 00378D04 7C 08 03 A6 */ mtlr r0 +/* 8037BDA8 00378D08 4E 80 00 20 */ blr + +.global GXSetFogRangeAdj +GXSetFogRangeAdj: +/* 8037BDAC 00378D0C 54 60 06 3F */ clrlwi. r0, r3, 0x18 +/* 8037BDB0 00378D10 41 82 00 C0 */ beq lbl_8037BE70 +/* 8037BDB4 00378D14 A1 05 00 02 */ lhz r8, 2(r5) +/* 8037BDB8 00378D18 38 00 00 61 */ li r0, 0x61 +/* 8037BDBC 00378D1C A1 45 00 00 */ lhz r10, 0(r5) +/* 8037BDC0 00378D20 3C C0 CC 01 */ lis r6, 0xCC008000@ha +/* 8037BDC4 00378D24 55 08 60 26 */ slwi r8, r8, 0xc +/* 8037BDC8 00378D28 51 48 05 3E */ rlwimi r8, r10, 0, 0x14, 0x1f +/* 8037BDCC 00378D2C 98 06 80 00 */ stb r0, 0xCC008000@l(r6) +/* 8037BDD0 00378D30 38 E0 00 E9 */ li r7, 0xe9 +/* 8037BDD4 00378D34 55 09 02 3E */ clrlwi r9, r8, 8 +/* 8037BDD8 00378D38 50 E9 C0 0E */ rlwimi r9, r7, 0x18, 0, 7 +/* 8037BDDC 00378D3C 91 26 80 00 */ stw r9, 0xCC008000@l(r6) +/* 8037BDE0 00378D40 38 E0 00 EA */ li r7, 0xea +/* 8037BDE4 00378D44 54 E9 C0 0E */ slwi r9, r7, 0x18 +/* 8037BDE8 00378D48 A5 45 00 04 */ lhzu r10, 4(r5) +/* 8037BDEC 00378D4C 38 E0 00 EB */ li r7, 0xeb +/* 8037BDF0 00378D50 A1 05 00 02 */ lhz r8, 2(r5) +/* 8037BDF4 00378D54 55 08 60 26 */ slwi r8, r8, 0xc +/* 8037BDF8 00378D58 98 06 80 00 */ stb r0, 0xCC008000@l(r6) +/* 8037BDFC 00378D5C 51 48 05 3E */ rlwimi r8, r10, 0, 0x14, 0x1f +/* 8037BE00 00378D60 51 09 02 3E */ rlwimi r9, r8, 0, 8, 0x1f +/* 8037BE04 00378D64 91 26 80 00 */ stw r9, 0xCC008000@l(r6) +/* 8037BE08 00378D68 54 E9 C0 0E */ slwi r9, r7, 0x18 +/* 8037BE0C 00378D6C 38 E0 00 EC */ li r7, 0xec +/* 8037BE10 00378D70 A1 05 00 06 */ lhz r8, 6(r5) +/* 8037BE14 00378D74 A1 45 00 04 */ lhz r10, 4(r5) +/* 8037BE18 00378D78 55 08 60 26 */ slwi r8, r8, 0xc +/* 8037BE1C 00378D7C 51 48 05 3E */ rlwimi r8, r10, 0, 0x14, 0x1f +/* 8037BE20 00378D80 98 06 80 00 */ stb r0, 0xCC008000@l(r6) +/* 8037BE24 00378D84 51 09 02 3E */ rlwimi r9, r8, 0, 8, 0x1f +/* 8037BE28 00378D88 91 26 80 00 */ stw r9, 0xCC008000@l(r6) +/* 8037BE2C 00378D8C 54 E9 C0 0E */ slwi r9, r7, 0x18 +/* 8037BE30 00378D90 38 E0 00 ED */ li r7, 0xed +/* 8037BE34 00378D94 A1 05 00 0A */ lhz r8, 0xa(r5) +/* 8037BE38 00378D98 A1 45 00 08 */ lhz r10, 8(r5) +/* 8037BE3C 00378D9C 55 08 60 26 */ slwi r8, r8, 0xc +/* 8037BE40 00378DA0 51 48 05 3E */ rlwimi r8, r10, 0, 0x14, 0x1f +/* 8037BE44 00378DA4 98 06 80 00 */ stb r0, 0xCC008000@l(r6) +/* 8037BE48 00378DA8 51 09 02 3E */ rlwimi r9, r8, 0, 8, 0x1f +/* 8037BE4C 00378DAC 91 26 80 00 */ stw r9, 0xCC008000@l(r6) +/* 8037BE50 00378DB0 A1 05 00 0E */ lhz r8, 0xe(r5) +/* 8037BE54 00378DB4 A1 45 00 0C */ lhz r10, 0xc(r5) +/* 8037BE58 00378DB8 55 08 60 26 */ slwi r8, r8, 0xc +/* 8037BE5C 00378DBC 51 48 05 3E */ rlwimi r8, r10, 0, 0x14, 0x1f +/* 8037BE60 00378DC0 98 06 80 00 */ stb r0, 0xCC008000@l(r6) +/* 8037BE64 00378DC4 55 09 02 3E */ clrlwi r9, r8, 8 +/* 8037BE68 00378DC8 50 E9 C0 0E */ rlwimi r9, r7, 0x18, 0, 7 +/* 8037BE6C 00378DCC 91 26 80 00 */ stw r9, 0xCC008000@l(r6) +lbl_8037BE70: +/* 8037BE70 00378DD0 54 85 04 3E */ clrlwi r5, r4, 0x10 +/* 8037BE74 00378DD4 80 82 CE 08 */ lwz r4, lbl_805AEB28@sda21(r2) +/* 8037BE78 00378DD8 38 05 01 56 */ addi r0, r5, 0x156 +/* 8037BE7C 00378DDC 54 05 05 A8 */ rlwinm r5, r0, 0, 0x16, 0x14 +/* 8037BE80 00378DE0 54 60 53 AA */ rlwinm r0, r3, 0xa, 0xe, 0x15 +/* 8037BE84 00378DE4 7C A0 03 78 */ or r0, r5, r0 +/* 8037BE88 00378DE8 54 05 02 3E */ clrlwi r5, r0, 8 +/* 8037BE8C 00378DEC 38 00 00 61 */ li r0, 0x61 +/* 8037BE90 00378DF0 3C 60 CC 01 */ lis r3, 0xCC008000@ha +/* 8037BE94 00378DF4 98 03 80 00 */ stb r0, 0xCC008000@l(r3) +/* 8037BE98 00378DF8 64 A5 E8 00 */ oris r5, r5, 0xe800 +/* 8037BE9C 00378DFC 38 00 00 00 */ li r0, 0 +/* 8037BEA0 00378E00 90 A3 80 00 */ stw r5, 0xCC008000@l(r3) +/* 8037BEA4 00378E04 B0 04 00 02 */ sth r0, 2(r4) +/* 8037BEA8 00378E08 4E 80 00 20 */ blr + +.global GXSetBlendMode +GXSetBlendMode: +/* 8037BEAC 00378E0C 81 02 CE 08 */ lwz r8, lbl_805AEB28@sda21(r2) +/* 8037BEB0 00378E10 20 03 00 03 */ subfic r0, r3, 3 +/* 8037BEB4 00378E14 7C 07 00 34 */ cntlzw r7, r0 +/* 8037BEB8 00378E18 20 03 00 02 */ subfic r0, r3, 2 +/* 8037BEBC 00378E1C 81 28 01 D0 */ lwz r9, 0x1d0(r8) +/* 8037BEC0 00378E20 50 E9 35 28 */ rlwimi r9, r7, 6, 0x14, 0x14 +/* 8037BEC4 00378E24 38 E9 00 00 */ addi r7, r9, 0 +/* 8037BEC8 00378E28 50 67 07 FE */ rlwimi r7, r3, 0, 0x1f, 0x1f +/* 8037BECC 00378E2C 7C 00 00 34 */ cntlzw r0, r0 +/* 8037BED0 00378E30 50 07 E7 BC */ rlwimi r7, r0, 0x1c, 0x1e, 0x1e +/* 8037BED4 00378E34 50 C7 64 26 */ rlwimi r7, r6, 0xc, 0x10, 0x13 +/* 8037BED8 00378E38 50 87 45 6E */ rlwimi r7, r4, 8, 0x15, 0x17 +/* 8037BEDC 00378E3C 38 00 00 61 */ li r0, 0x61 +/* 8037BEE0 00378E40 3C 60 CC 01 */ lis r3, 0xCC008000@ha +/* 8037BEE4 00378E44 98 03 80 00 */ stb r0, 0xCC008000@l(r3) +/* 8037BEE8 00378E48 50 A7 2E 34 */ rlwimi r7, r5, 5, 0x18, 0x1a +/* 8037BEEC 00378E4C 38 00 00 00 */ li r0, 0 +/* 8037BEF0 00378E50 90 E3 80 00 */ stw r7, 0xCC008000@l(r3) +/* 8037BEF4 00378E54 90 E8 01 D0 */ stw r7, 0x1d0(r8) +/* 8037BEF8 00378E58 B0 08 00 02 */ sth r0, 2(r8) +/* 8037BEFC 00378E5C 4E 80 00 20 */ blr + +.global GXSetColorUpdate +GXSetColorUpdate: +/* 8037BF00 00378E60 80 A2 CE 08 */ lwz r5, lbl_805AEB28@sda21(r2) +/* 8037BF04 00378E64 38 00 00 61 */ li r0, 0x61 +/* 8037BF08 00378E68 3C 80 CC 01 */ lis r4, 0xCC008000@ha +/* 8037BF0C 00378E6C 80 C5 01 D0 */ lwz r6, 0x1d0(r5) +/* 8037BF10 00378E70 50 66 1F 38 */ rlwimi r6, r3, 3, 0x1c, 0x1c +/* 8037BF14 00378E74 98 04 80 00 */ stb r0, 0xCC008000@l(r4) +/* 8037BF18 00378E78 38 00 00 00 */ li r0, 0 +/* 8037BF1C 00378E7C 90 C4 80 00 */ stw r6, 0xCC008000@l(r4) +/* 8037BF20 00378E80 90 C5 01 D0 */ stw r6, 0x1d0(r5) +/* 8037BF24 00378E84 B0 05 00 02 */ sth r0, 2(r5) +/* 8037BF28 00378E88 4E 80 00 20 */ blr + +.global GXSetAlphaUpdate +GXSetAlphaUpdate: +/* 8037BF2C 00378E8C 80 A2 CE 08 */ lwz r5, lbl_805AEB28@sda21(r2) +/* 8037BF30 00378E90 38 00 00 61 */ li r0, 0x61 +/* 8037BF34 00378E94 3C 80 CC 01 */ lis r4, 0xCC008000@ha +/* 8037BF38 00378E98 80 C5 01 D0 */ lwz r6, 0x1d0(r5) +/* 8037BF3C 00378E9C 50 66 26 F6 */ rlwimi r6, r3, 4, 0x1b, 0x1b +/* 8037BF40 00378EA0 98 04 80 00 */ stb r0, 0xCC008000@l(r4) +/* 8037BF44 00378EA4 38 00 00 00 */ li r0, 0 +/* 8037BF48 00378EA8 90 C4 80 00 */ stw r6, 0xCC008000@l(r4) +/* 8037BF4C 00378EAC 90 C5 01 D0 */ stw r6, 0x1d0(r5) +/* 8037BF50 00378EB0 B0 05 00 02 */ sth r0, 2(r5) +/* 8037BF54 00378EB4 4E 80 00 20 */ blr + +.global GXSetZMode +GXSetZMode: +/* 8037BF58 00378EB8 80 C2 CE 08 */ lwz r6, lbl_805AEB28@sda21(r2) +/* 8037BF5C 00378EBC 38 00 00 61 */ li r0, 0x61 +/* 8037BF60 00378EC0 80 E6 01 D8 */ lwz r7, 0x1d8(r6) +/* 8037BF64 00378EC4 50 67 07 FE */ rlwimi r7, r3, 0, 0x1f, 0x1f +/* 8037BF68 00378EC8 3C 60 CC 01 */ lis r3, 0xCC008000@ha +/* 8037BF6C 00378ECC 98 03 80 00 */ stb r0, 0xCC008000@l(r3) +/* 8037BF70 00378ED0 50 87 0F 3C */ rlwimi r7, r4, 1, 0x1c, 0x1e +/* 8037BF74 00378ED4 50 A7 26 F6 */ rlwimi r7, r5, 4, 0x1b, 0x1b +/* 8037BF78 00378ED8 90 E3 80 00 */ stw r7, 0xCC008000@l(r3) +/* 8037BF7C 00378EDC 38 00 00 00 */ li r0, 0 +/* 8037BF80 00378EE0 90 E6 01 D8 */ stw r7, 0x1d8(r6) +/* 8037BF84 00378EE4 B0 06 00 02 */ sth r0, 2(r6) +/* 8037BF88 00378EE8 4E 80 00 20 */ blr + +.global GXSetZCompLoc +GXSetZCompLoc: +/* 8037BF8C 00378EEC 80 C2 CE 08 */ lwz r6, lbl_805AEB28@sda21(r2) +/* 8037BF90 00378EF0 54 60 34 B2 */ rlwinm r0, r3, 6, 0x12, 0x19 +/* 8037BF94 00378EF4 38 60 00 61 */ li r3, 0x61 +/* 8037BF98 00378EF8 80 A6 01 DC */ lwz r5, 0x1dc(r6) +/* 8037BF9C 00378EFC 3C 80 CC 01 */ lis r4, 0xCC008000@ha +/* 8037BFA0 00378F00 54 A5 06 B0 */ rlwinm r5, r5, 0, 0x1a, 0x18 +/* 8037BFA4 00378F04 7C A0 03 78 */ or r0, r5, r0 +/* 8037BFA8 00378F08 90 06 01 DC */ stw r0, 0x1dc(r6) +/* 8037BFAC 00378F0C 38 00 00 00 */ li r0, 0 +/* 8037BFB0 00378F10 98 64 80 00 */ stb r3, 0xCC008000@l(r4) +/* 8037BFB4 00378F14 80 66 01 DC */ lwz r3, 0x1dc(r6) +/* 8037BFB8 00378F18 90 64 80 00 */ stw r3, 0xCC008000@l(r4) +/* 8037BFBC 00378F1C B0 06 00 02 */ sth r0, 2(r6) +/* 8037BFC0 00378F20 4E 80 00 20 */ blr + +.global GXSetPixelFmt +GXSetPixelFmt: +/* 8037BFC4 00378F24 80 E2 CE 08 */ lwz r7, lbl_805AEB28@sda21(r2) +/* 8037BFC8 00378F28 3C A0 80 3F */ lis r5, lbl_803F0C90@ha +/* 8037BFCC 00378F2C 54 66 10 3A */ slwi r6, r3, 2 +/* 8037BFD0 00378F30 38 05 0C 90 */ addi r0, r5, lbl_803F0C90@l +/* 8037BFD4 00378F34 81 07 01 DC */ lwz r8, 0x1dc(r7) +/* 8037BFD8 00378F38 7D 40 32 14 */ add r10, r0, r6 +/* 8037BFDC 00378F3C 80 AA 00 00 */ lwz r5, 0(r10) +/* 8037BFE0 00378F40 55 06 00 38 */ rlwinm r6, r8, 0, 0, 0x1c +/* 8037BFE4 00378F44 54 80 18 38 */ slwi r0, r4, 3 +/* 8037BFE8 00378F48 7C C4 2B 78 */ or r4, r6, r5 +/* 8037BFEC 00378F4C 90 87 01 DC */ stw r4, 0x1dc(r7) +/* 8037BFF0 00378F50 80 87 01 DC */ lwz r4, 0x1dc(r7) +/* 8037BFF4 00378F54 54 84 07 72 */ rlwinm r4, r4, 0, 0x1d, 0x19 +/* 8037BFF8 00378F58 7C 80 03 78 */ or r0, r4, r0 +/* 8037BFFC 00378F5C 90 07 01 DC */ stw r0, 0x1dc(r7) +/* 8037C000 00378F60 80 A7 01 DC */ lwz r5, 0x1dc(r7) +/* 8037C004 00378F64 7C 08 28 40 */ cmplw r8, r5 +/* 8037C008 00378F68 41 82 00 4C */ beq lbl_8037C054 +/* 8037C00C 00378F6C 38 00 00 61 */ li r0, 0x61 +/* 8037C010 00378F70 3C 80 CC 01 */ lis r4, 0xCC008000@ha +/* 8037C014 00378F74 98 04 80 00 */ stb r0, 0xCC008000@l(r4) +/* 8037C018 00378F78 2C 03 00 02 */ cmpwi r3, 2 +/* 8037C01C 00378F7C 90 A4 80 00 */ stw r5, 0xCC008000@l(r4) +/* 8037C020 00378F80 40 82 00 0C */ bne lbl_8037C02C +/* 8037C024 00378F84 38 00 00 01 */ li r0, 1 +/* 8037C028 00378F88 48 00 00 08 */ b lbl_8037C030 +lbl_8037C02C: +/* 8037C02C 00378F8C 38 00 00 00 */ li r0, 0 +lbl_8037C030: +/* 8037C030 00378F90 80 A2 CE 08 */ lwz r5, lbl_805AEB28@sda21(r2) +/* 8037C034 00378F94 54 00 4B EC */ rlwinm r0, r0, 9, 0xf, 0x16 +/* 8037C038 00378F98 80 85 02 04 */ lwz r4, 0x204(r5) +/* 8037C03C 00378F9C 54 84 05 EA */ rlwinm r4, r4, 0, 0x17, 0x15 +/* 8037C040 00378FA0 7C 80 03 78 */ or r0, r4, r0 +/* 8037C044 00378FA4 90 05 02 04 */ stw r0, 0x204(r5) +/* 8037C048 00378FA8 80 05 04 F4 */ lwz r0, 0x4f4(r5) +/* 8037C04C 00378FAC 60 00 00 04 */ ori r0, r0, 4 +/* 8037C050 00378FB0 90 05 04 F4 */ stw r0, 0x4f4(r5) +lbl_8037C054: +/* 8037C054 00378FB4 80 0A 00 00 */ lwz r0, 0(r10) +/* 8037C058 00378FB8 28 00 00 04 */ cmplwi r0, 4 +/* 8037C05C 00378FBC 40 82 00 40 */ bne lbl_8037C09C +/* 8037C060 00378FC0 80 A2 CE 08 */ lwz r5, lbl_805AEB28@sda21(r2) +/* 8037C064 00378FC4 38 63 FF FC */ addi r3, r3, -4 +/* 8037C068 00378FC8 38 00 00 61 */ li r0, 0x61 +/* 8037C06C 00378FCC 80 85 01 D4 */ lwz r4, 0x1d4(r5) +/* 8037C070 00378FD0 54 84 05 E8 */ rlwinm r4, r4, 0, 0x17, 0x14 +/* 8037C074 00378FD4 50 64 4D 6C */ rlwimi r4, r3, 9, 0x15, 0x16 +/* 8037C078 00378FD8 90 85 01 D4 */ stw r4, 0x1d4(r5) +/* 8037C07C 00378FDC 3C 60 CC 01 */ lis r3, 0xCC008000@ha +/* 8037C080 00378FE0 80 85 01 D4 */ lwz r4, 0x1d4(r5) +/* 8037C084 00378FE4 54 84 02 3E */ clrlwi r4, r4, 8 +/* 8037C088 00378FE8 64 84 42 00 */ oris r4, r4, 0x4200 +/* 8037C08C 00378FEC 90 85 01 D4 */ stw r4, 0x1d4(r5) +/* 8037C090 00378FF0 98 03 80 00 */ stb r0, 0xCC008000@l(r3) +/* 8037C094 00378FF4 80 05 01 D4 */ lwz r0, 0x1d4(r5) +/* 8037C098 00378FF8 90 03 80 00 */ stw r0, 0xCC008000@l(r3) +lbl_8037C09C: +/* 8037C09C 00378FFC 80 62 CE 08 */ lwz r3, lbl_805AEB28@sda21(r2) +/* 8037C0A0 00379000 38 00 00 00 */ li r0, 0 +/* 8037C0A4 00379004 B0 03 00 02 */ sth r0, 2(r3) +/* 8037C0A8 00379008 4E 80 00 20 */ blr + +.global GXSetDither +GXSetDither: +/* 8037C0AC 0037900C 80 C2 CE 08 */ lwz r6, lbl_805AEB28@sda21(r2) +/* 8037C0B0 00379010 38 00 00 61 */ li r0, 0x61 +/* 8037C0B4 00379014 3C 80 CC 01 */ lis r4, 0xCC008000@ha +/* 8037C0B8 00379018 80 A6 01 D0 */ lwz r5, 0x1d0(r6) +/* 8037C0BC 0037901C 54 63 15 BA */ rlwinm r3, r3, 2, 0x16, 0x1d +/* 8037C0C0 00379020 54 A5 07 B8 */ rlwinm r5, r5, 0, 0x1e, 0x1c +/* 8037C0C4 00379024 98 04 80 00 */ stb r0, 0xCC008000@l(r4) +/* 8037C0C8 00379028 7C A3 1B 78 */ or r3, r5, r3 +/* 8037C0CC 0037902C 90 64 80 00 */ stw r3, 0xCC008000@l(r4) +/* 8037C0D0 00379030 38 00 00 00 */ li r0, 0 +/* 8037C0D4 00379034 90 66 01 D0 */ stw r3, 0x1d0(r6) +/* 8037C0D8 00379038 B0 06 00 02 */ sth r0, 2(r6) +/* 8037C0DC 0037903C 4E 80 00 20 */ blr + +.global GXSetDstAlpha +GXSetDstAlpha: +/* 8037C0E0 00379040 80 C2 CE 08 */ lwz r6, lbl_805AEB28@sda21(r2) +/* 8037C0E4 00379044 54 85 06 3E */ clrlwi r5, r4, 0x18 +/* 8037C0E8 00379048 38 00 00 61 */ li r0, 0x61 +/* 8037C0EC 0037904C 80 E6 01 D4 */ lwz r7, 0x1d4(r6) +/* 8037C0F0 00379050 3C 80 CC 01 */ lis r4, 0xCC008000@ha +/* 8037C0F4 00379054 50 A7 06 3E */ rlwimi r7, r5, 0, 0x18, 0x1f +/* 8037C0F8 00379058 98 04 80 00 */ stb r0, 0xCC008000@l(r4) +/* 8037C0FC 0037905C 54 60 06 3E */ clrlwi r0, r3, 0x18 +/* 8037C100 00379060 38 67 00 00 */ addi r3, r7, 0 +/* 8037C104 00379064 50 03 45 EE */ rlwimi r3, r0, 8, 0x17, 0x17 +/* 8037C108 00379068 90 64 80 00 */ stw r3, 0xCC008000@l(r4) +/* 8037C10C 0037906C 38 00 00 00 */ li r0, 0 +/* 8037C110 00379070 90 66 01 D4 */ stw r3, 0x1d4(r6) +/* 8037C114 00379074 B0 06 00 02 */ sth r0, 2(r6) +/* 8037C118 00379078 4E 80 00 20 */ blr + +.global GXSetFieldMask +GXSetFieldMask: +/* 8037C11C 0037907C 54 80 06 3E */ clrlwi r0, r4, 0x18 +/* 8037C120 00379080 80 82 CE 08 */ lwz r4, lbl_805AEB28@sda21(r2) +/* 8037C124 00379084 54 05 07 FA */ rlwinm r5, r0, 0, 0x1f, 0x1d +/* 8037C128 00379088 54 60 0D FC */ rlwinm r0, r3, 1, 0x17, 0x1e +/* 8037C12C 0037908C 7C A0 03 78 */ or r0, r5, r0 +/* 8037C130 00379090 54 05 02 3E */ clrlwi r5, r0, 8 +/* 8037C134 00379094 38 00 00 61 */ li r0, 0x61 +/* 8037C138 00379098 3C 60 CC 01 */ lis r3, 0xCC008000@ha +/* 8037C13C 0037909C 98 03 80 00 */ stb r0, 0xCC008000@l(r3) +/* 8037C140 003790A0 64 A5 44 00 */ oris r5, r5, 0x4400 +/* 8037C144 003790A4 38 00 00 00 */ li r0, 0 +/* 8037C148 003790A8 90 A3 80 00 */ stw r5, 0xCC008000@l(r3) +/* 8037C14C 003790AC B0 04 00 02 */ sth r0, 2(r4) +/* 8037C150 003790B0 4E 80 00 20 */ blr + +.global GXSetFieldMode +GXSetFieldMode: +/* 8037C154 003790B4 7C 08 02 A6 */ mflr r0 +/* 8037C158 003790B8 90 01 00 04 */ stw r0, 4(r1) +/* 8037C15C 003790BC 54 80 B0 92 */ rlwinm r0, r4, 0x16, 2, 9 +/* 8037C160 003790C0 94 21 FF E0 */ stwu r1, -0x20(r1) +/* 8037C164 003790C4 93 E1 00 1C */ stw r31, 0x1c(r1) +/* 8037C168 003790C8 3F E0 CC 01 */ lis r31, 0xCC008000@ha +/* 8037C16C 003790CC 93 C1 00 18 */ stw r30, 0x18(r1) +/* 8037C170 003790D0 3B C0 00 61 */ li r30, 0x61 +/* 8037C174 003790D4 93 A1 00 14 */ stw r29, 0x14(r1) +/* 8037C178 003790D8 7C 7D 1B 78 */ mr r29, r3 +/* 8037C17C 003790DC 80 A2 CE 08 */ lwz r5, lbl_805AEB28@sda21(r2) +/* 8037C180 003790E0 80 85 00 7C */ lwz r4, 0x7c(r5) +/* 8037C184 003790E4 54 84 02 90 */ rlwinm r4, r4, 0, 0xa, 8 +/* 8037C188 003790E8 7C 80 03 78 */ or r0, r4, r0 +/* 8037C18C 003790EC 90 05 00 7C */ stw r0, 0x7c(r5) +/* 8037C190 003790F0 9B DF 80 00 */ stb r30, 0xCC008000@l(r31) +/* 8037C194 003790F4 80 05 00 7C */ lwz r0, 0x7c(r5) +/* 8037C198 003790F8 90 1F 80 00 */ stw r0, 0xCC008000@l(r31) +/* 8037C19C 003790FC 4B FF F2 59 */ bl __GXFlushTextureState +/* 8037C1A0 00379100 57 A0 06 3E */ clrlwi r0, r29, 0x18 +/* 8037C1A4 00379104 9B DF 80 00 */ stb r30, 0xCC008000@l(r31) +/* 8037C1A8 00379108 64 00 68 00 */ oris r0, r0, 0x6800 +/* 8037C1AC 0037910C 90 1F 80 00 */ stw r0, 0xCC008000@l(r31) +/* 8037C1B0 00379110 4B FF F2 45 */ bl __GXFlushTextureState +/* 8037C1B4 00379114 80 01 00 24 */ lwz r0, 0x24(r1) +/* 8037C1B8 00379118 83 E1 00 1C */ lwz r31, 0x1c(r1) +/* 8037C1BC 0037911C 83 C1 00 18 */ lwz r30, 0x18(r1) +/* 8037C1C0 00379120 83 A1 00 14 */ lwz r29, 0x14(r1) +/* 8037C1C4 00379124 38 21 00 20 */ addi r1, r1, 0x20 +/* 8037C1C8 00379128 7C 08 03 A6 */ mtlr r0 +/* 8037C1CC 0037912C 4E 80 00 20 */ blr diff --git a/asm/Dolphin/GX/GXStubs.s b/asm/Dolphin/GX/GXStubs.s new file mode 100644 index 00000000..6d5b4d61 --- /dev/null +++ b/asm/Dolphin/GX/GXStubs.s @@ -0,0 +1,7 @@ +.include "macros.inc" + +.section .text, "ax" + +.global __GXSetRange +__GXSetRange: +/* 8037C1D0 00379130 4E 80 00 20 */ blr diff --git a/asm/Dolphin/GX/GXTev.s b/asm/Dolphin/GX/GXTev.s new file mode 100644 index 00000000..f1eade2e --- /dev/null +++ b/asm/Dolphin/GX/GXTev.s @@ -0,0 +1,584 @@ +.include "macros.inc" + +.section .text, "ax" + +.global GXSetTevOp +GXSetTevOp: +/* 8037B418 00378378 2C 03 00 00 */ cmpwi r3, 0 +/* 8037B41C 0037837C 3C A0 80 3F */ lis r5, lbl_803F0C18@ha +/* 8037B420 00378380 38 05 0C 18 */ addi r0, r5, lbl_803F0C18@l +/* 8037B424 00378384 40 82 00 14 */ bne lbl_8037B438 +/* 8037B428 00378388 54 84 10 3A */ slwi r4, r4, 2 +/* 8037B42C 0037838C 7C A0 22 14 */ add r5, r0, r4 +/* 8037B430 00378390 39 25 00 28 */ addi r9, r5, 0x28 +/* 8037B434 00378394 48 00 00 18 */ b lbl_8037B44C +lbl_8037B438: +/* 8037B438 00378398 54 84 10 3A */ slwi r4, r4, 2 +/* 8037B43C 0037839C 7C A0 22 14 */ add r5, r0, r4 +/* 8037B440 003783A0 7D 20 22 14 */ add r9, r0, r4 +/* 8037B444 003783A4 38 A5 00 14 */ addi r5, r5, 0x14 +/* 8037B448 003783A8 39 29 00 3C */ addi r9, r9, 0x3c +lbl_8037B44C: +/* 8037B44C 003783AC 80 E2 CE 08 */ lwz r7, lbl_805AEB28@sda21(r2) +/* 8037B450 003783B0 54 63 10 3A */ slwi r3, r3, 2 +/* 8037B454 003783B4 80 05 00 00 */ lwz r0, 0(r5) +/* 8037B458 003783B8 38 A0 00 61 */ li r5, 0x61 +/* 8037B45C 003783BC 7C C7 1A 14 */ add r6, r7, r3 +/* 8037B460 003783C0 80 66 01 30 */ lwz r3, 0x130(r6) +/* 8037B464 003783C4 3C 80 CC 01 */ lis r4, 0xCC008000@ha +/* 8037B468 003783C8 98 A4 80 00 */ stb r5, 0xCC008000@l(r4) +/* 8037B46C 003783CC 54 63 00 0E */ rlwinm r3, r3, 0, 0, 7 +/* 8037B470 003783D0 50 03 02 3E */ rlwimi r3, r0, 0, 8, 0x1f +/* 8037B474 003783D4 90 64 80 00 */ stw r3, 0xCC008000@l(r4) +/* 8037B478 003783D8 38 00 00 00 */ li r0, 0 +/* 8037B47C 003783DC 90 66 01 30 */ stw r3, 0x130(r6) +/* 8037B480 003783E0 81 06 01 70 */ lwz r8, 0x170(r6) +/* 8037B484 003783E4 80 69 00 00 */ lwz r3, 0(r9) +/* 8037B488 003783E8 55 08 07 0E */ rlwinm r8, r8, 0, 0x1c, 7 +/* 8037B48C 003783EC 98 A4 80 00 */ stb r5, 0xCC008000@l(r4) +/* 8037B490 003783F0 50 68 02 36 */ rlwimi r8, r3, 0, 8, 0x1b +/* 8037B494 003783F4 91 04 80 00 */ stw r8, 0xCC008000@l(r4) +/* 8037B498 003783F8 91 06 01 70 */ stw r8, 0x170(r6) +/* 8037B49C 003783FC B0 07 00 02 */ sth r0, 2(r7) +/* 8037B4A0 00378400 4E 80 00 20 */ blr + +.global GXSetTevColorIn +GXSetTevColorIn: +/* 8037B4A4 00378404 81 22 CE 08 */ lwz r9, lbl_805AEB28@sda21(r2) +/* 8037B4A8 00378408 54 63 10 3A */ slwi r3, r3, 2 +/* 8037B4AC 0037840C 38 00 00 61 */ li r0, 0x61 +/* 8037B4B0 00378410 7D 09 1A 14 */ add r8, r9, r3 +/* 8037B4B4 00378414 81 48 01 30 */ lwz r10, 0x130(r8) +/* 8037B4B8 00378418 3C 60 CC 01 */ lis r3, 0xCC008000@ha +/* 8037B4BC 0037841C 50 8A 64 26 */ rlwimi r10, r4, 0xc, 0x10, 0x13 +/* 8037B4C0 00378420 98 03 80 00 */ stb r0, 0xCC008000@l(r3) +/* 8037B4C4 00378424 38 8A 00 00 */ addi r4, r10, 0 +/* 8037B4C8 00378428 50 A4 45 2E */ rlwimi r4, r5, 8, 0x14, 0x17 +/* 8037B4CC 0037842C 50 C4 26 36 */ rlwimi r4, r6, 4, 0x18, 0x1b +/* 8037B4D0 00378430 50 E4 07 3E */ rlwimi r4, r7, 0, 0x1c, 0x1f +/* 8037B4D4 00378434 90 83 80 00 */ stw r4, 0xCC008000@l(r3) +/* 8037B4D8 00378438 38 00 00 00 */ li r0, 0 +/* 8037B4DC 0037843C 90 88 01 30 */ stw r4, 0x130(r8) +/* 8037B4E0 00378440 B0 09 00 02 */ sth r0, 2(r9) +/* 8037B4E4 00378444 4E 80 00 20 */ blr + +.global GXSetTevAlphaIn +GXSetTevAlphaIn: +/* 8037B4E8 00378448 81 22 CE 08 */ lwz r9, lbl_805AEB28@sda21(r2) +/* 8037B4EC 0037844C 54 63 10 3A */ slwi r3, r3, 2 +/* 8037B4F0 00378450 38 00 00 61 */ li r0, 0x61 +/* 8037B4F4 00378454 7D 09 1A 14 */ add r8, r9, r3 +/* 8037B4F8 00378458 81 48 01 70 */ lwz r10, 0x170(r8) +/* 8037B4FC 0037845C 3C 60 CC 01 */ lis r3, 0xCC008000@ha +/* 8037B500 00378460 50 8A 6C 24 */ rlwimi r10, r4, 0xd, 0x10, 0x12 +/* 8037B504 00378464 98 03 80 00 */ stb r0, 0xCC008000@l(r3) +/* 8037B508 00378468 38 8A 00 00 */ addi r4, r10, 0 +/* 8037B50C 0037846C 50 A4 54 EA */ rlwimi r4, r5, 0xa, 0x13, 0x15 +/* 8037B510 00378470 50 C4 3D B0 */ rlwimi r4, r6, 7, 0x16, 0x18 +/* 8037B514 00378474 50 E4 26 76 */ rlwimi r4, r7, 4, 0x19, 0x1b +/* 8037B518 00378478 90 83 80 00 */ stw r4, 0xCC008000@l(r3) +/* 8037B51C 0037847C 38 00 00 00 */ li r0, 0 +/* 8037B520 00378480 90 88 01 70 */ stw r4, 0x170(r8) +/* 8037B524 00378484 B0 09 00 02 */ sth r0, 2(r9) +/* 8037B528 00378488 4E 80 00 20 */ blr + +.global GXSetTevColorOp +GXSetTevColorOp: +/* 8037B52C 0037848C 80 02 CE 08 */ lwz r0, lbl_805AEB28@sda21(r2) +/* 8037B530 00378490 54 69 10 3A */ slwi r9, r3, 2 +/* 8037B534 00378494 2C 04 00 01 */ cmpwi r4, 1 +/* 8037B538 00378498 7C 60 4A 14 */ add r3, r0, r9 +/* 8037B53C 0037849C 80 63 01 30 */ lwz r3, 0x130(r3) +/* 8037B540 003784A0 50 83 93 5A */ rlwimi r3, r4, 0x12, 0xd, 0xd +/* 8037B544 003784A4 39 43 00 00 */ addi r10, r3, 0 +/* 8037B548 003784A8 41 81 00 10 */ bgt lbl_8037B558 +/* 8037B54C 003784AC 50 CA A2 96 */ rlwimi r10, r6, 0x14, 0xa, 0xb +/* 8037B550 003784B0 50 AA 83 9E */ rlwimi r10, r5, 0x10, 0xe, 0xf +/* 8037B554 003784B4 48 00 00 10 */ b lbl_8037B564 +lbl_8037B558: +/* 8037B558 003784B8 38 00 00 03 */ li r0, 3 +/* 8037B55C 003784BC 50 8A 9A 96 */ rlwimi r10, r4, 0x13, 0xa, 0xb +/* 8037B560 003784C0 50 0A 83 9E */ rlwimi r10, r0, 0x10, 0xe, 0xf +lbl_8037B564: +/* 8037B564 003784C4 38 00 00 61 */ li r0, 0x61 +/* 8037B568 003784C8 80 82 CE 08 */ lwz r4, lbl_805AEB28@sda21(r2) +/* 8037B56C 003784CC 3C A0 CC 01 */ lis r5, 0xCC008000@ha +/* 8037B570 003784D0 98 05 80 00 */ stb r0, 0xCC008000@l(r5) +/* 8037B574 003784D4 50 EA 9B 18 */ rlwimi r10, r7, 0x13, 0xc, 0xc +/* 8037B578 003784D8 51 0A B2 12 */ rlwimi r10, r8, 0x16, 8, 9 +/* 8037B57C 003784DC 91 45 80 00 */ stw r10, 0xCC008000@l(r5) +/* 8037B580 003784E0 7C 64 4A 14 */ add r3, r4, r9 +/* 8037B584 003784E4 38 00 00 00 */ li r0, 0 +/* 8037B588 003784E8 91 43 01 30 */ stw r10, 0x130(r3) +/* 8037B58C 003784EC B0 04 00 02 */ sth r0, 2(r4) +/* 8037B590 003784F0 4E 80 00 20 */ blr + +.global GXSetTevAlphaOp +GXSetTevAlphaOp: +/* 8037B594 003784F4 80 02 CE 08 */ lwz r0, lbl_805AEB28@sda21(r2) +/* 8037B598 003784F8 54 69 10 3A */ slwi r9, r3, 2 +/* 8037B59C 003784FC 2C 04 00 01 */ cmpwi r4, 1 +/* 8037B5A0 00378500 7C 60 4A 14 */ add r3, r0, r9 +/* 8037B5A4 00378504 80 63 01 70 */ lwz r3, 0x170(r3) +/* 8037B5A8 00378508 50 83 93 5A */ rlwimi r3, r4, 0x12, 0xd, 0xd +/* 8037B5AC 0037850C 39 43 00 00 */ addi r10, r3, 0 +/* 8037B5B0 00378510 41 81 00 10 */ bgt lbl_8037B5C0 +/* 8037B5B4 00378514 50 CA A2 96 */ rlwimi r10, r6, 0x14, 0xa, 0xb +/* 8037B5B8 00378518 50 AA 83 9E */ rlwimi r10, r5, 0x10, 0xe, 0xf +/* 8037B5BC 0037851C 48 00 00 10 */ b lbl_8037B5CC +lbl_8037B5C0: +/* 8037B5C0 00378520 38 00 00 03 */ li r0, 3 +/* 8037B5C4 00378524 50 8A 9A 96 */ rlwimi r10, r4, 0x13, 0xa, 0xb +/* 8037B5C8 00378528 50 0A 83 9E */ rlwimi r10, r0, 0x10, 0xe, 0xf +lbl_8037B5CC: +/* 8037B5CC 0037852C 38 00 00 61 */ li r0, 0x61 +/* 8037B5D0 00378530 80 82 CE 08 */ lwz r4, lbl_805AEB28@sda21(r2) +/* 8037B5D4 00378534 3C A0 CC 01 */ lis r5, 0xCC008000@ha +/* 8037B5D8 00378538 98 05 80 00 */ stb r0, 0xCC008000@l(r5) +/* 8037B5DC 0037853C 50 EA 9B 18 */ rlwimi r10, r7, 0x13, 0xc, 0xc +/* 8037B5E0 00378540 51 0A B2 12 */ rlwimi r10, r8, 0x16, 8, 9 +/* 8037B5E4 00378544 91 45 80 00 */ stw r10, 0xCC008000@l(r5) +/* 8037B5E8 00378548 7C 64 4A 14 */ add r3, r4, r9 +/* 8037B5EC 0037854C 38 00 00 00 */ li r0, 0 +/* 8037B5F0 00378550 91 43 01 70 */ stw r10, 0x170(r3) +/* 8037B5F4 00378554 B0 04 00 02 */ sth r0, 2(r4) +/* 8037B5F8 00378558 4E 80 00 20 */ blr + +.global GXSetTevColor +GXSetTevColor: +/* 8037B5FC 0037855C 88 04 00 03 */ lbz r0, 3(r4) +/* 8037B600 00378560 54 68 08 3C */ slwi r8, r3, 1 +/* 8037B604 00378564 88 A4 00 00 */ lbz r5, 0(r4) +/* 8037B608 00378568 38 E8 00 E0 */ addi r7, r8, 0xe0 +/* 8037B60C 0037856C 54 09 60 26 */ slwi r9, r0, 0xc +/* 8037B610 00378570 50 A9 06 3E */ rlwimi r9, r5, 0, 0x18, 0x1f +/* 8037B614 00378574 89 44 00 02 */ lbz r10, 2(r4) +/* 8037B618 00378578 88 C4 00 01 */ lbz r6, 1(r4) +/* 8037B61C 0037857C 54 E7 C0 0E */ slwi r7, r7, 0x18 +/* 8037B620 00378580 38 A0 00 61 */ li r5, 0x61 +/* 8037B624 00378584 80 62 CE 08 */ lwz r3, lbl_805AEB28@sda21(r2) +/* 8037B628 00378588 3C 80 CC 01 */ lis r4, 0xCC008000@ha +/* 8037B62C 0037858C 98 A4 80 00 */ stb r5, 0xCC008000@l(r4) +/* 8037B630 00378590 51 27 03 3E */ rlwimi r7, r9, 0, 0xc, 0x1f +/* 8037B634 00378594 38 08 00 E1 */ addi r0, r8, 0xe1 +/* 8037B638 00378598 90 E4 80 00 */ stw r7, 0xCC008000@l(r4) +/* 8037B63C 0037859C 54 C7 60 26 */ slwi r7, r6, 0xc +/* 8037B640 003785A0 54 06 C0 0E */ slwi r6, r0, 0x18 +/* 8037B644 003785A4 51 47 06 3E */ rlwimi r7, r10, 0, 0x18, 0x1f +/* 8037B648 003785A8 98 A4 80 00 */ stb r5, 0xCC008000@l(r4) +/* 8037B64C 003785AC 50 E6 03 3E */ rlwimi r6, r7, 0, 0xc, 0x1f +/* 8037B650 003785B0 90 C4 80 00 */ stw r6, 0xCC008000@l(r4) +/* 8037B654 003785B4 38 00 00 00 */ li r0, 0 +/* 8037B658 003785B8 98 A4 80 00 */ stb r5, 0xCC008000@l(r4) +/* 8037B65C 003785BC 90 C4 80 00 */ stw r6, 0xCC008000@l(r4) +/* 8037B660 003785C0 98 A4 80 00 */ stb r5, 0xCC008000@l(r4) +/* 8037B664 003785C4 90 C4 80 00 */ stw r6, 0xCC008000@l(r4) +/* 8037B668 003785C8 B0 03 00 02 */ sth r0, 2(r3) +/* 8037B66C 003785CC 4E 80 00 20 */ blr + +.global GXSetTevColorS10 +GXSetTevColorS10: +/* 8037B670 003785D0 A8 04 00 06 */ lha r0, 6(r4) +/* 8037B674 003785D4 54 69 08 3C */ slwi r9, r3, 1 +/* 8037B678 003785D8 A8 A4 00 00 */ lha r5, 0(r4) +/* 8037B67C 003785DC 39 09 00 E0 */ addi r8, r9, 0xe0 +/* 8037B680 003785E0 54 0A 62 66 */ rlwinm r10, r0, 0xc, 9, 0x13 +/* 8037B684 003785E4 50 AA 05 7E */ rlwimi r10, r5, 0, 0x15, 0x1f +/* 8037B688 003785E8 A8 E4 00 04 */ lha r7, 4(r4) +/* 8037B68C 003785EC A8 C4 00 02 */ lha r6, 2(r4) +/* 8037B690 003785F0 55 08 C0 0E */ slwi r8, r8, 0x18 +/* 8037B694 003785F4 38 A0 00 61 */ li r5, 0x61 +/* 8037B698 003785F8 80 62 CE 08 */ lwz r3, lbl_805AEB28@sda21(r2) +/* 8037B69C 003785FC 3C 80 CC 01 */ lis r4, 0xCC008000@ha +/* 8037B6A0 00378600 98 A4 80 00 */ stb r5, 0xCC008000@l(r4) +/* 8037B6A4 00378604 51 48 02 7E */ rlwimi r8, r10, 0, 9, 0x1f +/* 8037B6A8 00378608 38 09 00 E1 */ addi r0, r9, 0xe1 +/* 8037B6AC 0037860C 91 04 80 00 */ stw r8, 0xCC008000@l(r4) +/* 8037B6B0 00378610 54 C8 62 66 */ rlwinm r8, r6, 0xc, 9, 0x13 +/* 8037B6B4 00378614 54 06 C0 0E */ slwi r6, r0, 0x18 +/* 8037B6B8 00378618 50 E8 05 7E */ rlwimi r8, r7, 0, 0x15, 0x1f +/* 8037B6BC 0037861C 98 A4 80 00 */ stb r5, 0xCC008000@l(r4) +/* 8037B6C0 00378620 51 06 02 7E */ rlwimi r6, r8, 0, 9, 0x1f +/* 8037B6C4 00378624 90 C4 80 00 */ stw r6, 0xCC008000@l(r4) +/* 8037B6C8 00378628 38 00 00 00 */ li r0, 0 +/* 8037B6CC 0037862C 98 A4 80 00 */ stb r5, 0xCC008000@l(r4) +/* 8037B6D0 00378630 90 C4 80 00 */ stw r6, 0xCC008000@l(r4) +/* 8037B6D4 00378634 98 A4 80 00 */ stb r5, 0xCC008000@l(r4) +/* 8037B6D8 00378638 90 C4 80 00 */ stw r6, 0xCC008000@l(r4) +/* 8037B6DC 0037863C B0 03 00 02 */ sth r0, 2(r3) +/* 8037B6E0 00378640 4E 80 00 20 */ blr + +.global GXSetTevKColor +GXSetTevKColor: +/* 8037B6E4 00378644 88 04 00 03 */ lbz r0, 3(r4) +/* 8037B6E8 00378648 54 65 08 3C */ slwi r5, r3, 1 +/* 8037B6EC 0037864C 88 C4 00 00 */ lbz r6, 0(r4) +/* 8037B6F0 00378650 38 E5 00 E0 */ addi r7, r5, 0xe0 +/* 8037B6F4 00378654 54 00 60 26 */ slwi r0, r0, 0xc +/* 8037B6F8 00378658 50 C0 06 3E */ rlwimi r0, r6, 0, 0x18, 0x1f +/* 8037B6FC 0037865C 88 C4 00 01 */ lbz r6, 1(r4) +/* 8037B700 00378660 89 24 00 02 */ lbz r9, 2(r4) +/* 8037B704 00378664 54 00 03 0E */ rlwinm r0, r0, 0, 0xc, 7 +/* 8037B708 00378668 64 08 00 80 */ oris r8, r0, 0x80 +/* 8037B70C 0037866C 80 62 CE 08 */ lwz r3, lbl_805AEB28@sda21(r2) +/* 8037B710 00378670 54 E7 C0 0E */ slwi r7, r7, 0x18 +/* 8037B714 00378674 38 00 00 61 */ li r0, 0x61 +/* 8037B718 00378678 3C 80 CC 01 */ lis r4, 0xCC008000@ha +/* 8037B71C 0037867C 54 C6 60 26 */ slwi r6, r6, 0xc +/* 8037B720 00378680 98 04 80 00 */ stb r0, 0xCC008000@l(r4) +/* 8037B724 00378684 51 07 02 3E */ rlwimi r7, r8, 0, 8, 0x1f +/* 8037B728 00378688 90 E4 80 00 */ stw r7, 0xCC008000@l(r4) +/* 8037B72C 0037868C 51 26 06 3E */ rlwimi r6, r9, 0, 0x18, 0x1f +/* 8037B730 00378690 38 A5 00 E1 */ addi r5, r5, 0xe1 +/* 8037B734 00378694 98 04 80 00 */ stb r0, 0xCC008000@l(r4) +/* 8037B738 00378698 54 C0 03 0E */ rlwinm r0, r6, 0, 0xc, 7 +/* 8037B73C 0037869C 64 06 00 80 */ oris r6, r0, 0x80 +/* 8037B740 003786A0 54 A0 C0 0E */ slwi r0, r5, 0x18 +/* 8037B744 003786A4 50 C0 02 3E */ rlwimi r0, r6, 0, 8, 0x1f +/* 8037B748 003786A8 90 04 80 00 */ stw r0, 0xCC008000@l(r4) +/* 8037B74C 003786AC 38 00 00 00 */ li r0, 0 +/* 8037B750 003786B0 B0 03 00 02 */ sth r0, 2(r3) +/* 8037B754 003786B4 4E 80 00 20 */ blr + +.global GXSetTevKColorSel +GXSetTevKColorSel: +/* 8037B758 003786B8 7C 65 0E 70 */ srawi r5, r3, 1 +/* 8037B75C 003786BC 80 C2 CE 08 */ lwz r6, lbl_805AEB28@sda21(r2) +/* 8037B760 003786C0 54 60 07 FF */ clrlwi. r0, r3, 0x1f +/* 8037B764 003786C4 54 A3 10 3A */ slwi r3, r5, 2 +/* 8037B768 003786C8 38 E3 01 B0 */ addi r7, r3, 0x1b0 +/* 8037B76C 003786CC 7C E6 3A 14 */ add r7, r6, r7 +/* 8037B770 003786D0 41 82 00 1C */ beq lbl_8037B78C +/* 8037B774 003786D4 80 67 00 00 */ lwz r3, 0(r7) +/* 8037B778 003786D8 54 80 70 22 */ slwi r0, r4, 0xe +/* 8037B77C 003786DC 54 63 04 98 */ rlwinm r3, r3, 0, 0x12, 0xc +/* 8037B780 003786E0 7C 60 03 78 */ or r0, r3, r0 +/* 8037B784 003786E4 90 07 00 00 */ stw r0, 0(r7) +/* 8037B788 003786E8 48 00 00 18 */ b lbl_8037B7A0 +lbl_8037B78C: +/* 8037B78C 003786EC 80 67 00 00 */ lwz r3, 0(r7) +/* 8037B790 003786F0 54 80 20 36 */ slwi r0, r4, 4 +/* 8037B794 003786F4 54 63 07 2C */ rlwinm r3, r3, 0, 0x1c, 0x16 +/* 8037B798 003786F8 7C 60 03 78 */ or r0, r3, r0 +/* 8037B79C 003786FC 90 07 00 00 */ stw r0, 0(r7) +lbl_8037B7A0: +/* 8037B7A0 00378700 38 00 00 61 */ li r0, 0x61 +/* 8037B7A4 00378704 80 62 CE 08 */ lwz r3, lbl_805AEB28@sda21(r2) +/* 8037B7A8 00378708 3C A0 CC 01 */ lis r5, 0xCC008000@ha +/* 8037B7AC 0037870C 98 05 80 00 */ stb r0, 0xCC008000@l(r5) +/* 8037B7B0 00378710 38 00 00 00 */ li r0, 0 +/* 8037B7B4 00378714 80 87 00 00 */ lwz r4, 0(r7) +/* 8037B7B8 00378718 90 85 80 00 */ stw r4, 0xCC008000@l(r5) +/* 8037B7BC 0037871C B0 03 00 02 */ sth r0, 2(r3) +/* 8037B7C0 00378720 4E 80 00 20 */ blr + +.global GXSetTevKAlphaSel +GXSetTevKAlphaSel: +/* 8037B7C4 00378724 7C 65 0E 70 */ srawi r5, r3, 1 +/* 8037B7C8 00378728 80 C2 CE 08 */ lwz r6, lbl_805AEB28@sda21(r2) +/* 8037B7CC 0037872C 54 60 07 FF */ clrlwi. r0, r3, 0x1f +/* 8037B7D0 00378730 54 A3 10 3A */ slwi r3, r5, 2 +/* 8037B7D4 00378734 38 E3 01 B0 */ addi r7, r3, 0x1b0 +/* 8037B7D8 00378738 7C E6 3A 14 */ add r7, r6, r7 +/* 8037B7DC 0037873C 41 82 00 1C */ beq lbl_8037B7F8 +/* 8037B7E0 00378740 80 67 00 00 */ lwz r3, 0(r7) +/* 8037B7E4 00378744 54 80 98 18 */ slwi r0, r4, 0x13 +/* 8037B7E8 00378748 54 63 03 4E */ rlwinm r3, r3, 0, 0xd, 7 +/* 8037B7EC 0037874C 7C 60 03 78 */ or r0, r3, r0 +/* 8037B7F0 00378750 90 07 00 00 */ stw r0, 0(r7) +/* 8037B7F4 00378754 48 00 00 18 */ b lbl_8037B80C +lbl_8037B7F8: +/* 8037B7F8 00378758 80 67 00 00 */ lwz r3, 0(r7) +/* 8037B7FC 0037875C 54 80 48 2C */ slwi r0, r4, 9 +/* 8037B800 00378760 54 63 05 E2 */ rlwinm r3, r3, 0, 0x17, 0x11 +/* 8037B804 00378764 7C 60 03 78 */ or r0, r3, r0 +/* 8037B808 00378768 90 07 00 00 */ stw r0, 0(r7) +lbl_8037B80C: +/* 8037B80C 0037876C 38 00 00 61 */ li r0, 0x61 +/* 8037B810 00378770 80 62 CE 08 */ lwz r3, lbl_805AEB28@sda21(r2) +/* 8037B814 00378774 3C A0 CC 01 */ lis r5, 0xCC008000@ha +/* 8037B818 00378778 98 05 80 00 */ stb r0, 0xCC008000@l(r5) +/* 8037B81C 0037877C 38 00 00 00 */ li r0, 0 +/* 8037B820 00378780 80 87 00 00 */ lwz r4, 0(r7) +/* 8037B824 00378784 90 85 80 00 */ stw r4, 0xCC008000@l(r5) +/* 8037B828 00378788 B0 03 00 02 */ sth r0, 2(r3) +/* 8037B82C 0037878C 4E 80 00 20 */ blr + +.global GXSetTevSwapMode +GXSetTevSwapMode: +/* 8037B830 00378790 54 63 10 3A */ slwi r3, r3, 2 +/* 8037B834 00378794 80 E2 CE 08 */ lwz r7, lbl_805AEB28@sda21(r2) +/* 8037B838 00378798 39 03 01 70 */ addi r8, r3, 0x170 +/* 8037B83C 0037879C 7D 07 42 14 */ add r8, r7, r8 +/* 8037B840 003787A0 80 08 00 00 */ lwz r0, 0(r8) +/* 8037B844 003787A4 54 A5 10 3A */ slwi r5, r5, 2 +/* 8037B848 003787A8 38 60 00 61 */ li r3, 0x61 +/* 8037B84C 003787AC 54 00 00 3A */ rlwinm r0, r0, 0, 0, 0x1d +/* 8037B850 003787B0 7C 00 23 78 */ or r0, r0, r4 +/* 8037B854 003787B4 90 08 00 00 */ stw r0, 0(r8) +/* 8037B858 003787B8 3C 80 CC 01 */ lis r4, 0xCC008000@ha +/* 8037B85C 003787BC 38 00 00 00 */ li r0, 0 +/* 8037B860 003787C0 80 C8 00 00 */ lwz r6, 0(r8) +/* 8037B864 003787C4 54 C6 07 B6 */ rlwinm r6, r6, 0, 0x1e, 0x1b +/* 8037B868 003787C8 7C C5 2B 78 */ or r5, r6, r5 +/* 8037B86C 003787CC 90 A8 00 00 */ stw r5, 0(r8) +/* 8037B870 003787D0 98 64 80 00 */ stb r3, 0xCC008000@l(r4) +/* 8037B874 003787D4 80 68 00 00 */ lwz r3, 0(r8) +/* 8037B878 003787D8 90 64 80 00 */ stw r3, 0xCC008000@l(r4) +/* 8037B87C 003787DC B0 07 00 02 */ sth r0, 2(r7) +/* 8037B880 003787E0 4E 80 00 20 */ blr + +.global GXSetTevSwapModeTable +GXSetTevSwapModeTable: +/* 8037B884 003787E4 54 6A 08 3C */ slwi r10, r3, 1 +/* 8037B888 003787E8 81 22 CE 08 */ lwz r9, lbl_805AEB28@sda21(r2) +/* 8037B88C 003787EC 54 63 18 38 */ slwi r3, r3, 3 +/* 8037B890 003787F0 39 63 01 B0 */ addi r11, r3, 0x1b0 +/* 8037B894 003787F4 7D 69 5A 14 */ add r11, r9, r11 +/* 8037B898 003787F8 81 0B 00 00 */ lwz r8, 0(r11) +/* 8037B89C 003787FC 38 0A 00 01 */ addi r0, r10, 1 +/* 8037B8A0 00378800 54 03 10 3A */ slwi r3, r0, 2 +/* 8037B8A4 00378804 55 00 00 3A */ rlwinm r0, r8, 0, 0, 0x1d +/* 8037B8A8 00378808 7C 00 23 78 */ or r0, r0, r4 +/* 8037B8AC 0037880C 90 0B 00 00 */ stw r0, 0(r11) +/* 8037B8B0 00378810 39 43 01 B0 */ addi r10, r3, 0x1b0 +/* 8037B8B4 00378814 54 A0 10 3A */ slwi r0, r5, 2 +/* 8037B8B8 00378818 80 6B 00 00 */ lwz r3, 0(r11) +/* 8037B8BC 0037881C 39 00 00 61 */ li r8, 0x61 +/* 8037B8C0 00378820 3C A0 CC 01 */ lis r5, 0xCC008000@ha +/* 8037B8C4 00378824 54 63 07 B6 */ rlwinm r3, r3, 0, 0x1e, 0x1b +/* 8037B8C8 00378828 7C 60 03 78 */ or r0, r3, r0 +/* 8037B8CC 0037882C 90 0B 00 00 */ stw r0, 0(r11) +/* 8037B8D0 00378830 7D 49 52 14 */ add r10, r9, r10 +/* 8037B8D4 00378834 54 E3 10 3A */ slwi r3, r7, 2 +/* 8037B8D8 00378838 99 05 80 00 */ stb r8, 0xCC008000@l(r5) +/* 8037B8DC 0037883C 38 00 00 00 */ li r0, 0 +/* 8037B8E0 00378840 80 8B 00 00 */ lwz r4, 0(r11) +/* 8037B8E4 00378844 90 85 80 00 */ stw r4, 0xCC008000@l(r5) +/* 8037B8E8 00378848 80 8A 00 00 */ lwz r4, 0(r10) +/* 8037B8EC 0037884C 54 84 00 3A */ rlwinm r4, r4, 0, 0, 0x1d +/* 8037B8F0 00378850 7C 84 33 78 */ or r4, r4, r6 +/* 8037B8F4 00378854 90 8A 00 00 */ stw r4, 0(r10) +/* 8037B8F8 00378858 80 8A 00 00 */ lwz r4, 0(r10) +/* 8037B8FC 0037885C 54 84 07 B6 */ rlwinm r4, r4, 0, 0x1e, 0x1b +/* 8037B900 00378860 7C 83 1B 78 */ or r3, r4, r3 +/* 8037B904 00378864 90 6A 00 00 */ stw r3, 0(r10) +/* 8037B908 00378868 99 05 80 00 */ stb r8, 0xCC008000@l(r5) +/* 8037B90C 0037886C 80 6A 00 00 */ lwz r3, 0(r10) +/* 8037B910 00378870 90 65 80 00 */ stw r3, 0xCC008000@l(r5) +/* 8037B914 00378874 B0 09 00 02 */ sth r0, 2(r9) +/* 8037B918 00378878 4E 80 00 20 */ blr + +.global GXSetAlphaCompare +GXSetAlphaCompare: +/* 8037B91C 0037887C 54 80 06 3E */ clrlwi r0, r4, 0x18 +/* 8037B920 00378880 80 82 CE 08 */ lwz r4, lbl_805AEB28@sda21(r2) +/* 8037B924 00378884 64 00 F3 00 */ oris r0, r0, 0xf300 +/* 8037B928 00378888 54 00 06 1E */ rlwinm r0, r0, 0, 0x18, 0xf +/* 8037B92C 0037888C 50 E0 44 2E */ rlwimi r0, r7, 8, 0x10, 0x17 +/* 8037B930 00378890 54 07 04 18 */ rlwinm r7, r0, 0, 0x10, 0xc +/* 8037B934 00378894 54 60 80 1E */ slwi r0, r3, 0x10 +/* 8037B938 00378898 7C E0 03 78 */ or r0, r7, r0 +/* 8037B93C 0037889C 54 03 03 52 */ rlwinm r3, r0, 0, 0xd, 9 +/* 8037B940 003788A0 54 C0 98 18 */ slwi r0, r6, 0x13 +/* 8037B944 003788A4 7C 66 03 78 */ or r6, r3, r0 +/* 8037B948 003788A8 38 00 00 61 */ li r0, 0x61 +/* 8037B94C 003788AC 3C 60 CC 01 */ lis r3, 0xCC008000@ha +/* 8037B950 003788B0 98 03 80 00 */ stb r0, 0xCC008000@l(r3) +/* 8037B954 003788B4 54 C6 02 8E */ rlwinm r6, r6, 0, 0xa, 7 +/* 8037B958 003788B8 54 A0 B0 12 */ slwi r0, r5, 0x16 +/* 8037B95C 003788BC 7C C0 03 78 */ or r0, r6, r0 +/* 8037B960 003788C0 90 03 80 00 */ stw r0, 0xCC008000@l(r3) +/* 8037B964 003788C4 38 00 00 00 */ li r0, 0 +/* 8037B968 003788C8 B0 04 00 02 */ sth r0, 2(r4) +/* 8037B96C 003788CC 4E 80 00 20 */ blr + +.global GXSetZTexture +GXSetZTexture: +/* 8037B970 003788D0 2C 04 00 13 */ cmpwi r4, 0x13 +/* 8037B974 003788D4 54 A0 02 3E */ clrlwi r0, r5, 8 +/* 8037B978 003788D8 64 07 F4 00 */ oris r7, r0, 0xf400 +/* 8037B97C 003788DC 41 82 00 28 */ beq lbl_8037B9A4 +/* 8037B980 003788E0 40 80 00 10 */ bge lbl_8037B990 +/* 8037B984 003788E4 2C 04 00 11 */ cmpwi r4, 0x11 +/* 8037B988 003788E8 41 82 00 14 */ beq lbl_8037B99C +/* 8037B98C 003788EC 48 00 00 28 */ b lbl_8037B9B4 +lbl_8037B990: +/* 8037B990 003788F0 2C 04 00 16 */ cmpwi r4, 0x16 +/* 8037B994 003788F4 41 82 00 18 */ beq lbl_8037B9AC +/* 8037B998 003788F8 48 00 00 1C */ b lbl_8037B9B4 +lbl_8037B99C: +/* 8037B99C 003788FC 38 C0 00 00 */ li r6, 0 +/* 8037B9A0 00378900 48 00 00 18 */ b lbl_8037B9B8 +lbl_8037B9A4: +/* 8037B9A4 00378904 38 C0 00 01 */ li r6, 1 +/* 8037B9A8 00378908 48 00 00 10 */ b lbl_8037B9B8 +lbl_8037B9AC: +/* 8037B9AC 0037890C 38 C0 00 02 */ li r6, 2 +/* 8037B9B0 00378910 48 00 00 08 */ b lbl_8037B9B8 +lbl_8037B9B4: +/* 8037B9B4 00378914 38 C0 00 02 */ li r6, 2 +lbl_8037B9B8: +/* 8037B9B8 00378918 38 00 00 61 */ li r0, 0x61 +/* 8037B9BC 0037891C 80 82 CE 08 */ lwz r4, lbl_805AEB28@sda21(r2) +/* 8037B9C0 00378920 3C A0 CC 01 */ lis r5, 0xCC008000@ha +/* 8037B9C4 00378924 98 05 80 00 */ stb r0, 0xCC008000@l(r5) +/* 8037B9C8 00378928 54 C6 07 B6 */ rlwinm r6, r6, 0, 0x1e, 0x1b +/* 8037B9CC 0037892C 54 63 10 3A */ slwi r3, r3, 2 +/* 8037B9D0 00378930 90 E5 80 00 */ stw r7, 0xCC008000@l(r5) +/* 8037B9D4 00378934 7C C3 1B 78 */ or r3, r6, r3 +/* 8037B9D8 00378938 54 63 02 3E */ clrlwi r3, r3, 8 +/* 8037B9DC 0037893C 98 05 80 00 */ stb r0, 0xCC008000@l(r5) +/* 8037B9E0 00378940 64 63 F5 00 */ oris r3, r3, 0xf500 +/* 8037B9E4 00378944 38 00 00 00 */ li r0, 0 +/* 8037B9E8 00378948 90 65 80 00 */ stw r3, 0xCC008000@l(r5) +/* 8037B9EC 0037894C B0 04 00 02 */ sth r0, 2(r4) +/* 8037B9F0 00378950 4E 80 00 20 */ blr + +.global GXSetTevOrder +GXSetTevOrder: +/* 8037B9F4 00378954 7C 67 0E 70 */ srawi r7, r3, 1 +/* 8037B9F8 00378958 81 22 CE 08 */ lwz r9, lbl_805AEB28@sda21(r2) +/* 8037B9FC 0037895C 54 AA 06 2C */ rlwinm r10, r5, 0, 0x18, 0x16 +/* 8037BA00 00378960 7C E7 01 94 */ addze r7, r7 +/* 8037BA04 00378964 54 60 10 3A */ slwi r0, r3, 2 +/* 8037BA08 00378968 7D 09 02 14 */ add r8, r9, r0 +/* 8037BA0C 0037896C 54 E7 10 3A */ slwi r7, r7, 2 +/* 8037BA10 00378970 90 A8 04 9C */ stw r5, 0x49c(r8) +/* 8037BA14 00378974 38 E7 01 00 */ addi r7, r7, 0x100 +/* 8037BA18 00378978 28 0A 00 08 */ cmplwi r10, 8 +/* 8037BA1C 0037897C 38 0A 00 00 */ addi r0, r10, 0 +/* 8037BA20 00378980 7C E9 3A 14 */ add r7, r9, r7 +/* 8037BA24 00378984 41 80 00 0C */ blt lbl_8037BA30 +/* 8037BA28 00378988 39 20 00 00 */ li r9, 0 +/* 8037BA2C 0037898C 48 00 00 08 */ b lbl_8037BA34 +lbl_8037BA30: +/* 8037BA30 00378990 7C 09 03 78 */ mr r9, r0 +lbl_8037BA34: +/* 8037BA34 00378994 2C 04 00 08 */ cmpwi r4, 8 +/* 8037BA38 00378998 41 80 00 28 */ blt lbl_8037BA60 +/* 8037BA3C 0037899C 80 82 CE 08 */ lwz r4, lbl_805AEB28@sda21(r2) +/* 8037BA40 003789A0 38 00 00 01 */ li r0, 1 +/* 8037BA44 003789A4 7C 00 18 30 */ slw r0, r0, r3 +/* 8037BA48 003789A8 81 04 04 E0 */ lwz r8, 0x4e0(r4) +/* 8037BA4C 003789AC 39 44 04 E0 */ addi r10, r4, 0x4e0 +/* 8037BA50 003789B0 38 80 00 00 */ li r4, 0 +/* 8037BA54 003789B4 7D 00 00 78 */ andc r0, r8, r0 +/* 8037BA58 003789B8 90 0A 00 00 */ stw r0, 0(r10) +/* 8037BA5C 003789BC 48 00 00 20 */ b lbl_8037BA7C +lbl_8037BA60: +/* 8037BA60 003789C0 81 02 CE 08 */ lwz r8, lbl_805AEB28@sda21(r2) +/* 8037BA64 003789C4 38 00 00 01 */ li r0, 1 +/* 8037BA68 003789C8 7C 00 18 30 */ slw r0, r0, r3 +/* 8037BA6C 003789CC 39 48 04 E0 */ addi r10, r8, 0x4e0 +/* 8037BA70 003789D0 81 08 04 E0 */ lwz r8, 0x4e0(r8) +/* 8037BA74 003789D4 7D 00 03 78 */ or r0, r8, r0 +/* 8037BA78 003789D8 90 0A 00 00 */ stw r0, 0(r10) +lbl_8037BA7C: +/* 8037BA7C 003789DC 54 60 07 FF */ clrlwi. r0, r3, 0x1f +/* 8037BA80 003789E0 41 82 00 94 */ beq lbl_8037BB14 +/* 8037BA84 003789E4 81 07 00 00 */ lwz r8, 0(r7) +/* 8037BA88 003789E8 55 23 60 26 */ slwi r3, r9, 0xc +/* 8037BA8C 003789EC 54 80 78 20 */ slwi r0, r4, 0xf +/* 8037BA90 003789F0 55 04 05 20 */ rlwinm r4, r8, 0, 0x14, 0x10 +/* 8037BA94 003789F4 7C 83 1B 78 */ or r3, r4, r3 +/* 8037BA98 003789F8 90 67 00 00 */ stw r3, 0(r7) +/* 8037BA9C 003789FC 2C 06 00 FF */ cmpwi r6, 0xff +/* 8037BAA0 00378A00 80 67 00 00 */ lwz r3, 0(r7) +/* 8037BAA4 00378A04 54 63 04 5A */ rlwinm r3, r3, 0, 0x11, 0xd +/* 8037BAA8 00378A08 7C 60 03 78 */ or r0, r3, r0 +/* 8037BAAC 00378A0C 90 07 00 00 */ stw r0, 0(r7) +/* 8037BAB0 00378A10 40 82 00 0C */ bne lbl_8037BABC +/* 8037BAB4 00378A14 38 00 00 07 */ li r0, 7 +/* 8037BAB8 00378A18 48 00 00 18 */ b lbl_8037BAD0 +lbl_8037BABC: +/* 8037BABC 00378A1C 3C 60 80 3F */ lis r3, lbl_803F0C68@ha +/* 8037BAC0 00378A20 54 C4 10 3A */ slwi r4, r6, 2 +/* 8037BAC4 00378A24 38 03 0C 68 */ addi r0, r3, lbl_803F0C68@l +/* 8037BAC8 00378A28 7C 60 22 14 */ add r3, r0, r4 +/* 8037BACC 00378A2C 80 03 00 00 */ lwz r0, 0(r3) +lbl_8037BAD0: +/* 8037BAD0 00378A30 80 67 00 00 */ lwz r3, 0(r7) +/* 8037BAD4 00378A34 54 00 98 18 */ slwi r0, r0, 0x13 +/* 8037BAD8 00378A38 2C 05 00 FF */ cmpwi r5, 0xff +/* 8037BADC 00378A3C 54 63 03 52 */ rlwinm r3, r3, 0, 0xd, 9 +/* 8037BAE0 00378A40 7C 60 03 78 */ or r0, r3, r0 +/* 8037BAE4 00378A44 90 07 00 00 */ stw r0, 0(r7) +/* 8037BAE8 00378A48 38 80 00 00 */ li r4, 0 +/* 8037BAEC 00378A4C 41 82 00 10 */ beq lbl_8037BAFC +/* 8037BAF0 00378A50 54 A0 05 EF */ rlwinm. r0, r5, 0, 0x17, 0x17 +/* 8037BAF4 00378A54 40 82 00 08 */ bne lbl_8037BAFC +/* 8037BAF8 00378A58 38 80 00 01 */ li r4, 1 +lbl_8037BAFC: +/* 8037BAFC 00378A5C 80 67 00 00 */ lwz r3, 0(r7) +/* 8037BB00 00378A60 54 80 90 1A */ slwi r0, r4, 0x12 +/* 8037BB04 00378A64 54 63 03 98 */ rlwinm r3, r3, 0, 0xe, 0xc +/* 8037BB08 00378A68 7C 60 03 78 */ or r0, r3, r0 +/* 8037BB0C 00378A6C 90 07 00 00 */ stw r0, 0(r7) +/* 8037BB10 00378A70 48 00 00 8C */ b lbl_8037BB9C +lbl_8037BB14: +/* 8037BB14 00378A74 80 67 00 00 */ lwz r3, 0(r7) +/* 8037BB18 00378A78 54 80 18 38 */ slwi r0, r4, 3 +/* 8037BB1C 00378A7C 2C 06 00 FF */ cmpwi r6, 0xff +/* 8037BB20 00378A80 54 63 00 38 */ rlwinm r3, r3, 0, 0, 0x1c +/* 8037BB24 00378A84 7C 63 4B 78 */ or r3, r3, r9 +/* 8037BB28 00378A88 90 67 00 00 */ stw r3, 0(r7) +/* 8037BB2C 00378A8C 80 67 00 00 */ lwz r3, 0(r7) +/* 8037BB30 00378A90 54 63 07 72 */ rlwinm r3, r3, 0, 0x1d, 0x19 +/* 8037BB34 00378A94 7C 60 03 78 */ or r0, r3, r0 +/* 8037BB38 00378A98 90 07 00 00 */ stw r0, 0(r7) +/* 8037BB3C 00378A9C 40 82 00 0C */ bne lbl_8037BB48 +/* 8037BB40 00378AA0 38 00 00 07 */ li r0, 7 +/* 8037BB44 00378AA4 48 00 00 18 */ b lbl_8037BB5C +lbl_8037BB48: +/* 8037BB48 00378AA8 3C 60 80 3F */ lis r3, lbl_803F0C68@ha +/* 8037BB4C 00378AAC 54 C4 10 3A */ slwi r4, r6, 2 +/* 8037BB50 00378AB0 38 03 0C 68 */ addi r0, r3, lbl_803F0C68@l +/* 8037BB54 00378AB4 7C 60 22 14 */ add r3, r0, r4 +/* 8037BB58 00378AB8 80 03 00 00 */ lwz r0, 0(r3) +lbl_8037BB5C: +/* 8037BB5C 00378ABC 80 67 00 00 */ lwz r3, 0(r7) +/* 8037BB60 00378AC0 54 00 38 30 */ slwi r0, r0, 7 +/* 8037BB64 00378AC4 2C 05 00 FF */ cmpwi r5, 0xff +/* 8037BB68 00378AC8 54 63 06 6A */ rlwinm r3, r3, 0, 0x19, 0x15 +/* 8037BB6C 00378ACC 7C 60 03 78 */ or r0, r3, r0 +/* 8037BB70 00378AD0 90 07 00 00 */ stw r0, 0(r7) +/* 8037BB74 00378AD4 38 80 00 00 */ li r4, 0 +/* 8037BB78 00378AD8 41 82 00 10 */ beq lbl_8037BB88 +/* 8037BB7C 00378ADC 54 A0 05 EF */ rlwinm. r0, r5, 0, 0x17, 0x17 +/* 8037BB80 00378AE0 40 82 00 08 */ bne lbl_8037BB88 +/* 8037BB84 00378AE4 38 80 00 01 */ li r4, 1 +lbl_8037BB88: +/* 8037BB88 00378AE8 80 67 00 00 */ lwz r3, 0(r7) +/* 8037BB8C 00378AEC 54 80 30 32 */ slwi r0, r4, 6 +/* 8037BB90 00378AF0 54 63 06 B0 */ rlwinm r3, r3, 0, 0x1a, 0x18 +/* 8037BB94 00378AF4 7C 60 03 78 */ or r0, r3, r0 +/* 8037BB98 00378AF8 90 07 00 00 */ stw r0, 0(r7) +lbl_8037BB9C: +/* 8037BB9C 00378AFC 38 00 00 61 */ li r0, 0x61 +/* 8037BBA0 00378B00 80 62 CE 08 */ lwz r3, lbl_805AEB28@sda21(r2) +/* 8037BBA4 00378B04 3C A0 CC 01 */ lis r5, 0xCC008000@ha +/* 8037BBA8 00378B08 98 05 80 00 */ stb r0, 0xCC008000@l(r5) +/* 8037BBAC 00378B0C 38 00 00 00 */ li r0, 0 +/* 8037BBB0 00378B10 80 87 00 00 */ lwz r4, 0(r7) +/* 8037BBB4 00378B14 90 85 80 00 */ stw r4, 0xCC008000@l(r5) +/* 8037BBB8 00378B18 B0 03 00 02 */ sth r0, 2(r3) +/* 8037BBBC 00378B1C 80 03 04 F4 */ lwz r0, 0x4f4(r3) +/* 8037BBC0 00378B20 60 00 00 01 */ ori r0, r0, 1 +/* 8037BBC4 00378B24 90 03 04 F4 */ stw r0, 0x4f4(r3) +/* 8037BBC8 00378B28 4E 80 00 20 */ blr + +.global GXSetNumTevStages +GXSetNumTevStages: +/* 8037BBCC 00378B2C 80 82 CE 08 */ lwz r4, lbl_805AEB28@sda21(r2) +/* 8037BBD0 00378B30 54 63 06 3E */ clrlwi r3, r3, 0x18 +/* 8037BBD4 00378B34 38 03 FF FF */ addi r0, r3, -1 +/* 8037BBD8 00378B38 80 64 02 04 */ lwz r3, 0x204(r4) +/* 8037BBDC 00378B3C 54 00 50 2A */ slwi r0, r0, 0xa +/* 8037BBE0 00378B40 54 63 05 A2 */ rlwinm r3, r3, 0, 0x16, 0x11 +/* 8037BBE4 00378B44 7C 60 03 78 */ or r0, r3, r0 +/* 8037BBE8 00378B48 90 04 02 04 */ stw r0, 0x204(r4) +/* 8037BBEC 00378B4C 80 04 04 F4 */ lwz r0, 0x4f4(r4) +/* 8037BBF0 00378B50 60 00 00 04 */ ori r0, r0, 4 +/* 8037BBF4 00378B54 90 04 04 F4 */ stw r0, 0x4f4(r4) +/* 8037BBF8 00378B58 4E 80 00 20 */ blr diff --git a/asm/Dolphin/GX/GXTexture.s b/asm/Dolphin/GX/GXTexture.s new file mode 100644 index 00000000..53200a6b --- /dev/null +++ b/asm/Dolphin/GX/GXTexture.s @@ -0,0 +1,1295 @@ +.include "macros.inc" + +.section .text, "ax" + +.global GXGetTexBufferSize +GXGetTexBufferSize: +/* 80379C40 00376BA0 94 21 FF D8 */ stwu r1, -0x28(r1) +/* 80379C44 00376BA4 28 05 00 3C */ cmplwi r5, 0x3c +/* 80379C48 00376BA8 93 E1 00 24 */ stw r31, 0x24(r1) +/* 80379C4C 00376BAC 41 81 00 40 */ bgt lbl_80379C8C +/* 80379C50 00376BB0 3D 00 80 3F */ lis r8, lbl_803F09F0@ha +/* 80379C54 00376BB4 39 08 09 F0 */ addi r8, r8, lbl_803F09F0@l +/* 80379C58 00376BB8 54 A0 10 3A */ slwi r0, r5, 2 +/* 80379C5C 00376BBC 7C 08 00 2E */ lwzx r0, r8, r0 +/* 80379C60 00376BC0 7C 09 03 A6 */ mtctr r0 +/* 80379C64 00376BC4 4E 80 04 20 */ bctr +/* 80379C68 00376BC8 38 00 00 03 */ li r0, 3 +/* 80379C6C 00376BCC 39 00 00 03 */ li r8, 3 +/* 80379C70 00376BD0 48 00 00 24 */ b lbl_80379C94 +/* 80379C74 00376BD4 38 00 00 03 */ li r0, 3 +/* 80379C78 00376BD8 39 00 00 02 */ li r8, 2 +/* 80379C7C 00376BDC 48 00 00 18 */ b lbl_80379C94 +/* 80379C80 00376BE0 38 00 00 02 */ li r0, 2 +/* 80379C84 00376BE4 39 00 00 02 */ li r8, 2 +/* 80379C88 00376BE8 48 00 00 0C */ b lbl_80379C94 +lbl_80379C8C: +/* 80379C8C 00376BEC 39 00 00 00 */ li r8, 0 +/* 80379C90 00376BF0 38 00 00 00 */ li r0, 0 +lbl_80379C94: +/* 80379C94 00376BF4 28 05 00 06 */ cmplwi r5, 6 +/* 80379C98 00376BF8 41 82 00 0C */ beq lbl_80379CA4 +/* 80379C9C 00376BFC 28 05 00 16 */ cmplwi r5, 0x16 +/* 80379CA0 00376C00 40 82 00 0C */ bne lbl_80379CAC +lbl_80379CA4: +/* 80379CA4 00376C04 38 A0 00 40 */ li r5, 0x40 +/* 80379CA8 00376C08 48 00 00 08 */ b lbl_80379CB0 +lbl_80379CAC: +/* 80379CAC 00376C0C 38 A0 00 20 */ li r5, 0x20 +lbl_80379CB0: +/* 80379CB0 00376C10 54 C6 06 3E */ clrlwi r6, r6, 0x18 +/* 80379CB4 00376C14 28 06 00 01 */ cmplwi r6, 1 +/* 80379CB8 00376C18 40 82 00 A0 */ bne lbl_80379D58 +/* 80379CBC 00376C1C 54 E9 06 3E */ clrlwi r9, r7, 0x18 +/* 80379CC0 00376C20 38 C0 00 01 */ li r6, 1 +/* 80379CC4 00376C24 7D 29 03 A6 */ mtctr r9 +/* 80379CC8 00376C28 7C C7 40 30 */ slw r7, r6, r8 +/* 80379CCC 00376C2C 7C C6 00 30 */ slw r6, r6, r0 +/* 80379CD0 00376C30 28 09 00 00 */ cmplwi r9, 0 +/* 80379CD4 00376C34 39 46 FF FF */ addi r10, r6, -1 +/* 80379CD8 00376C38 38 E7 FF FF */ addi r7, r7, -1 +/* 80379CDC 00376C3C 3B E0 00 00 */ li r31, 0 +/* 80379CE0 00376C40 40 81 00 AC */ ble lbl_80379D8C +lbl_80379CE4: +/* 80379CE4 00376C44 54 6B 04 3E */ clrlwi r11, r3, 0x10 +/* 80379CE8 00376C48 7C CB 52 14 */ add r6, r11, r10 +/* 80379CEC 00376C4C 54 8C 04 3E */ clrlwi r12, r4, 0x10 +/* 80379CF0 00376C50 7C C9 06 30 */ sraw r9, r6, r0 +/* 80379CF4 00376C54 7C CC 3A 14 */ add r6, r12, r7 +/* 80379CF8 00376C58 7C C6 46 30 */ sraw r6, r6, r8 +/* 80379CFC 00376C5C 7C C9 31 D6 */ mullw r6, r9, r6 +/* 80379D00 00376C60 7C C5 31 D6 */ mullw r6, r5, r6 +/* 80379D04 00376C64 28 0B 00 01 */ cmplwi r11, 1 +/* 80379D08 00376C68 7F FF 32 14 */ add r31, r31, r6 +/* 80379D0C 00376C6C 40 82 00 0C */ bne lbl_80379D18 +/* 80379D10 00376C70 28 0C 00 01 */ cmplwi r12, 1 +/* 80379D14 00376C74 41 82 00 78 */ beq lbl_80379D8C +lbl_80379D18: +/* 80379D18 00376C78 54 63 04 3E */ clrlwi r3, r3, 0x10 +/* 80379D1C 00376C7C 28 03 00 01 */ cmplwi r3, 1 +/* 80379D20 00376C80 40 81 00 0C */ ble lbl_80379D2C +/* 80379D24 00376C84 7D 66 0E 70 */ srawi r6, r11, 1 +/* 80379D28 00376C88 48 00 00 08 */ b lbl_80379D30 +lbl_80379D2C: +/* 80379D2C 00376C8C 38 C0 00 01 */ li r6, 1 +lbl_80379D30: +/* 80379D30 00376C90 54 83 04 3E */ clrlwi r3, r4, 0x10 +/* 80379D34 00376C94 28 03 00 01 */ cmplwi r3, 1 +/* 80379D38 00376C98 54 C3 04 3E */ clrlwi r3, r6, 0x10 +/* 80379D3C 00376C9C 40 81 00 0C */ ble lbl_80379D48 +/* 80379D40 00376CA0 7D 84 0E 70 */ srawi r4, r12, 1 +/* 80379D44 00376CA4 48 00 00 08 */ b lbl_80379D4C +lbl_80379D48: +/* 80379D48 00376CA8 38 80 00 01 */ li r4, 1 +lbl_80379D4C: +/* 80379D4C 00376CAC 54 84 04 3E */ clrlwi r4, r4, 0x10 +/* 80379D50 00376CB0 42 00 FF 94 */ bdnz lbl_80379CE4 +/* 80379D54 00376CB4 48 00 00 38 */ b lbl_80379D8C +lbl_80379D58: +/* 80379D58 00376CB8 38 C0 00 01 */ li r6, 1 +/* 80379D5C 00376CBC 7C C7 00 30 */ slw r7, r6, r0 +/* 80379D60 00376CC0 7C C6 40 30 */ slw r6, r6, r8 +/* 80379D64 00376CC4 54 69 04 3E */ clrlwi r9, r3, 0x10 +/* 80379D68 00376CC8 38 67 FF FF */ addi r3, r7, -1 +/* 80379D6C 00376CCC 7C E9 1A 14 */ add r7, r9, r3 +/* 80379D70 00376CD0 54 84 04 3E */ clrlwi r4, r4, 0x10 +/* 80379D74 00376CD4 38 66 FF FF */ addi r3, r6, -1 +/* 80379D78 00376CD8 7C E6 06 30 */ sraw r6, r7, r0 +/* 80379D7C 00376CDC 7C 04 1A 14 */ add r0, r4, r3 +/* 80379D80 00376CE0 7C 00 46 30 */ sraw r0, r0, r8 +/* 80379D84 00376CE4 7C 06 01 D6 */ mullw r0, r6, r0 +/* 80379D88 00376CE8 7F E5 01 D6 */ mullw r31, r5, r0 +lbl_80379D8C: +/* 80379D8C 00376CEC 7F E3 FB 78 */ mr r3, r31 +/* 80379D90 00376CF0 83 E1 00 24 */ lwz r31, 0x24(r1) +/* 80379D94 00376CF4 38 21 00 28 */ addi r1, r1, 0x28 +/* 80379D98 00376CF8 4E 80 00 20 */ blr + +.global __GetImageTileCount +__GetImageTileCount: +/* 80379D9C 00376CFC 28 03 00 3C */ cmplwi r3, 0x3c +/* 80379DA0 00376D00 41 81 00 40 */ bgt lbl_80379DE0 +/* 80379DA4 00376D04 3D 20 80 3F */ lis r9, lbl_803F0AE4@ha +/* 80379DA8 00376D08 39 29 0A E4 */ addi r9, r9, lbl_803F0AE4@l +/* 80379DAC 00376D0C 54 60 10 3A */ slwi r0, r3, 2 +/* 80379DB0 00376D10 7C 09 00 2E */ lwzx r0, r9, r0 +/* 80379DB4 00376D14 7C 09 03 A6 */ mtctr r0 +/* 80379DB8 00376D18 4E 80 04 20 */ bctr +/* 80379DBC 00376D1C 39 60 00 03 */ li r11, 3 +/* 80379DC0 00376D20 39 80 00 03 */ li r12, 3 +/* 80379DC4 00376D24 48 00 00 24 */ b lbl_80379DE8 +/* 80379DC8 00376D28 39 60 00 03 */ li r11, 3 +/* 80379DCC 00376D2C 39 80 00 02 */ li r12, 2 +/* 80379DD0 00376D30 48 00 00 18 */ b lbl_80379DE8 +/* 80379DD4 00376D34 39 60 00 02 */ li r11, 2 +/* 80379DD8 00376D38 39 80 00 02 */ li r12, 2 +/* 80379DDC 00376D3C 48 00 00 0C */ b lbl_80379DE8 +lbl_80379DE0: +/* 80379DE0 00376D40 39 80 00 00 */ li r12, 0 +/* 80379DE4 00376D44 39 60 00 00 */ li r11, 0 +lbl_80379DE8: +/* 80379DE8 00376D48 54 80 04 3F */ clrlwi. r0, r4, 0x10 +/* 80379DEC 00376D4C 40 82 00 08 */ bne lbl_80379DF4 +/* 80379DF0 00376D50 38 80 00 01 */ li r4, 1 +lbl_80379DF4: +/* 80379DF4 00376D54 54 A0 04 3F */ clrlwi. r0, r5, 0x10 +/* 80379DF8 00376D58 40 82 00 08 */ bne lbl_80379E00 +/* 80379DFC 00376D5C 38 A0 00 01 */ li r5, 1 +lbl_80379E00: +/* 80379E00 00376D60 39 40 00 01 */ li r10, 1 +/* 80379E04 00376D64 7D 49 58 30 */ slw r9, r10, r11 +/* 80379E08 00376D68 54 84 04 3E */ clrlwi r4, r4, 0x10 +/* 80379E0C 00376D6C 38 09 FF FF */ addi r0, r9, -1 +/* 80379E10 00376D70 7C 04 02 14 */ add r0, r4, r0 +/* 80379E14 00376D74 7C 00 5E 30 */ sraw r0, r0, r11 +/* 80379E18 00376D78 7D 44 60 30 */ slw r4, r10, r12 +/* 80379E1C 00376D7C 90 06 00 00 */ stw r0, 0(r6) +/* 80379E20 00376D80 54 A5 04 3E */ clrlwi r5, r5, 0x10 +/* 80379E24 00376D84 38 04 FF FF */ addi r0, r4, -1 +/* 80379E28 00376D88 7C 05 02 14 */ add r0, r5, r0 +/* 80379E2C 00376D8C 7C 00 66 30 */ sraw r0, r0, r12 +/* 80379E30 00376D90 2C 03 00 06 */ cmpwi r3, 6 +/* 80379E34 00376D94 90 07 00 00 */ stw r0, 0(r7) +/* 80379E38 00376D98 41 82 00 10 */ beq lbl_80379E48 +/* 80379E3C 00376D9C 2C 03 00 16 */ cmpwi r3, 0x16 +/* 80379E40 00376DA0 41 82 00 08 */ beq lbl_80379E48 +/* 80379E44 00376DA4 39 40 00 00 */ li r10, 0 +lbl_80379E48: +/* 80379E48 00376DA8 2C 0A 00 00 */ cmpwi r10, 0 +/* 80379E4C 00376DAC 41 82 00 0C */ beq lbl_80379E58 +/* 80379E50 00376DB0 38 00 00 02 */ li r0, 2 +/* 80379E54 00376DB4 48 00 00 08 */ b lbl_80379E5C +lbl_80379E58: +/* 80379E58 00376DB8 38 00 00 01 */ li r0, 1 +lbl_80379E5C: +/* 80379E5C 00376DBC 90 08 00 00 */ stw r0, 0(r8) +/* 80379E60 00376DC0 4E 80 00 20 */ blr + +.global GXInitTexObj +GXInitTexObj: +/* 80379E64 00376DC4 7C 08 02 A6 */ mflr r0 +/* 80379E68 00376DC8 90 01 00 04 */ stw r0, 4(r1) +/* 80379E6C 00376DCC 94 21 FF A0 */ stwu r1, -0x60(r1) +/* 80379E70 00376DD0 BF 01 00 40 */ stmw r24, 0x40(r1) +/* 80379E74 00376DD4 3B 64 00 00 */ addi r27, r4, 0 +/* 80379E78 00376DD8 3B 85 00 00 */ addi r28, r5, 0 +/* 80379E7C 00376DDC 3B E3 00 00 */ addi r31, r3, 0 +/* 80379E80 00376DE0 3B A6 00 00 */ addi r29, r6, 0 +/* 80379E84 00376DE4 3B C7 00 00 */ addi r30, r7, 0 +/* 80379E88 00376DE8 3B 08 00 00 */ addi r24, r8, 0 +/* 80379E8C 00376DEC 3B 29 00 00 */ addi r25, r9, 0 +/* 80379E90 00376DF0 3B 4A 00 00 */ addi r26, r10, 0 +/* 80379E94 00376DF4 38 80 00 00 */ li r4, 0 +/* 80379E98 00376DF8 38 A0 00 20 */ li r5, 0x20 +/* 80379E9C 00376DFC 4B C8 95 0D */ bl memset +/* 80379EA0 00376E00 80 9F 00 00 */ lwz r4, 0(r31) +/* 80379EA4 00376E04 57 40 06 3F */ clrlwi. r0, r26, 0x18 +/* 80379EA8 00376E08 57 23 10 3A */ slwi r3, r25, 2 +/* 80379EAC 00376E0C 54 84 00 3A */ rlwinm r4, r4, 0, 0, 0x1d +/* 80379EB0 00376E10 7C 84 C3 78 */ or r4, r4, r24 +/* 80379EB4 00376E14 90 9F 00 00 */ stw r4, 0(r31) +/* 80379EB8 00376E18 80 1F 00 00 */ lwz r0, 0(r31) +/* 80379EBC 00376E1C 54 00 07 B6 */ rlwinm r0, r0, 0, 0x1e, 0x1b +/* 80379EC0 00376E20 7C 00 1B 78 */ or r0, r0, r3 +/* 80379EC4 00376E24 90 1F 00 00 */ stw r0, 0(r31) +/* 80379EC8 00376E28 80 1F 00 00 */ lwz r0, 0(r31) +/* 80379ECC 00376E2C 54 00 07 34 */ rlwinm r0, r0, 0, 0x1c, 0x1a +/* 80379ED0 00376E30 60 00 00 10 */ ori r0, r0, 0x10 +/* 80379ED4 00376E34 90 1F 00 00 */ stw r0, 0(r31) +/* 80379ED8 00376E38 41 82 00 A4 */ beq lbl_80379F7C +/* 80379EDC 00376E3C 88 7F 00 1F */ lbz r3, 0x1f(r31) +/* 80379EE0 00376E40 38 1E FF F8 */ addi r0, r30, -8 +/* 80379EE4 00376E44 28 00 00 02 */ cmplwi r0, 2 +/* 80379EE8 00376E48 60 60 00 01 */ ori r0, r3, 1 +/* 80379EEC 00376E4C 98 1F 00 1F */ stb r0, 0x1f(r31) +/* 80379EF0 00376E50 41 81 00 18 */ bgt lbl_80379F08 +/* 80379EF4 00376E54 80 1F 00 00 */ lwz r0, 0(r31) +/* 80379EF8 00376E58 54 00 06 EE */ rlwinm r0, r0, 0, 0x1b, 0x17 +/* 80379EFC 00376E5C 60 00 00 A0 */ ori r0, r0, 0xa0 +/* 80379F00 00376E60 90 1F 00 00 */ stw r0, 0(r31) +/* 80379F04 00376E64 48 00 00 14 */ b lbl_80379F18 +lbl_80379F08: +/* 80379F08 00376E68 80 1F 00 00 */ lwz r0, 0(r31) +/* 80379F0C 00376E6C 54 00 06 EE */ rlwinm r0, r0, 0, 0x1b, 0x17 +/* 80379F10 00376E70 60 00 00 C0 */ ori r0, r0, 0xc0 +/* 80379F14 00376E74 90 1F 00 00 */ stw r0, 0(r31) +lbl_80379F18: +/* 80379F18 00376E78 57 83 04 3E */ clrlwi r3, r28, 0x10 +/* 80379F1C 00376E7C 57 A0 04 3E */ clrlwi r0, r29, 0x10 +/* 80379F20 00376E80 7C 03 00 40 */ cmplw r3, r0 +/* 80379F24 00376E84 40 81 00 10 */ ble lbl_80379F34 +/* 80379F28 00376E88 7C 60 00 34 */ cntlzw r0, r3 +/* 80379F2C 00376E8C 20 00 00 1F */ subfic r0, r0, 0x1f +/* 80379F30 00376E90 48 00 00 0C */ b lbl_80379F3C +lbl_80379F34: +/* 80379F34 00376E94 7C 00 00 34 */ cntlzw r0, r0 +/* 80379F38 00376E98 20 00 00 1F */ subfic r0, r0, 0x1f +lbl_80379F3C: +/* 80379F3C 00376E9C 90 01 00 3C */ stw r0, 0x3c(r1) +/* 80379F40 00376EA0 3C 00 43 30 */ lis r0, 0x4330 +/* 80379F44 00376EA4 80 7F 00 04 */ lwz r3, 4(r31) +/* 80379F48 00376EA8 90 01 00 38 */ stw r0, 0x38(r1) +/* 80379F4C 00376EAC C8 22 CE 70 */ lfd f1, lbl_805AEB90@sda21(r2) +/* 80379F50 00376EB0 54 63 06 1E */ rlwinm r3, r3, 0, 0x18, 0xf +/* 80379F54 00376EB4 C8 01 00 38 */ lfd f0, 0x38(r1) +/* 80379F58 00376EB8 C0 42 CE 68 */ lfs f2, lbl_805AEB88@sda21(r2) +/* 80379F5C 00376EBC EC 00 08 28 */ fsubs f0, f0, f1 +/* 80379F60 00376EC0 EC 02 00 32 */ fmuls f0, f2, f0 +/* 80379F64 00376EC4 FC 00 00 1E */ fctiwz f0, f0 +/* 80379F68 00376EC8 D8 01 00 30 */ stfd f0, 0x30(r1) +/* 80379F6C 00376ECC 80 01 00 34 */ lwz r0, 0x34(r1) +/* 80379F70 00376ED0 50 03 44 2E */ rlwimi r3, r0, 8, 0x10, 0x17 +/* 80379F74 00376ED4 90 7F 00 04 */ stw r3, 4(r31) +/* 80379F78 00376ED8 48 00 00 14 */ b lbl_80379F8C +lbl_80379F7C: +/* 80379F7C 00376EDC 80 1F 00 00 */ lwz r0, 0(r31) +/* 80379F80 00376EE0 54 00 06 EE */ rlwinm r0, r0, 0, 0x1b, 0x17 +/* 80379F84 00376EE4 60 00 00 80 */ ori r0, r0, 0x80 +/* 80379F88 00376EE8 90 1F 00 00 */ stw r0, 0(r31) +lbl_80379F8C: +/* 80379F8C 00376EEC 93 DF 00 14 */ stw r30, 0x14(r31) +/* 80379F90 00376EF0 57 A3 04 3E */ clrlwi r3, r29, 0x10 +/* 80379F94 00376EF4 57 C7 07 3E */ clrlwi r7, r30, 0x1c +/* 80379F98 00376EF8 80 BF 00 08 */ lwz r5, 8(r31) +/* 80379F9C 00376EFC 57 84 04 3E */ clrlwi r4, r28, 0x10 +/* 80379FA0 00376F00 38 03 FF FF */ addi r0, r3, -1 +/* 80379FA4 00376F04 54 A6 00 2A */ rlwinm r6, r5, 0, 0, 0x15 +/* 80379FA8 00376F08 38 A4 FF FF */ addi r5, r4, -1 +/* 80379FAC 00376F0C 7C C5 2B 78 */ or r5, r6, r5 +/* 80379FB0 00376F10 90 BF 00 08 */ stw r5, 8(r31) +/* 80379FB4 00376F14 54 05 50 2A */ slwi r5, r0, 0xa +/* 80379FB8 00376F18 57 60 D9 FE */ rlwinm r0, r27, 0x1b, 7, 0x1f +/* 80379FBC 00376F1C 80 DF 00 08 */ lwz r6, 8(r31) +/* 80379FC0 00376F20 28 07 00 0E */ cmplwi r7, 0xe +/* 80379FC4 00376F24 54 C6 05 96 */ rlwinm r6, r6, 0, 0x16, 0xb +/* 80379FC8 00376F28 7C C5 2B 78 */ or r5, r6, r5 +/* 80379FCC 00376F2C 90 BF 00 08 */ stw r5, 8(r31) +/* 80379FD0 00376F30 80 BF 00 08 */ lwz r5, 8(r31) +/* 80379FD4 00376F34 54 A5 03 0E */ rlwinm r5, r5, 0, 0xc, 7 +/* 80379FD8 00376F38 53 C5 A2 16 */ rlwimi r5, r30, 0x14, 8, 0xb +/* 80379FDC 00376F3C 90 BF 00 08 */ stw r5, 8(r31) +/* 80379FE0 00376F40 80 BF 00 0C */ lwz r5, 0xc(r31) +/* 80379FE4 00376F44 54 A5 00 14 */ rlwinm r5, r5, 0, 0, 0xa +/* 80379FE8 00376F48 7C A0 03 78 */ or r0, r5, r0 +/* 80379FEC 00376F4C 90 1F 00 0C */ stw r0, 0xc(r31) +/* 80379FF0 00376F50 41 81 00 80 */ bgt lbl_8037A070 +/* 80379FF4 00376F54 3C A0 80 3F */ lis r5, lbl_803F0BD8@ha +/* 80379FF8 00376F58 38 A5 0B D8 */ addi r5, r5, lbl_803F0BD8@l +/* 80379FFC 00376F5C 54 E0 10 3A */ slwi r0, r7, 2 +/* 8037A000 00376F60 7C 05 00 2E */ lwzx r0, r5, r0 +/* 8037A004 00376F64 7C 09 03 A6 */ mtctr r0 +/* 8037A008 00376F68 4E 80 04 20 */ bctr +/* 8037A00C 00376F6C 38 00 00 01 */ li r0, 1 +/* 8037A010 00376F70 98 1F 00 1E */ stb r0, 0x1e(r31) +/* 8037A014 00376F74 38 00 00 03 */ li r0, 3 +/* 8037A018 00376F78 38 E0 00 03 */ li r7, 3 +/* 8037A01C 00376F7C 48 00 00 64 */ b lbl_8037A080 +/* 8037A020 00376F80 38 00 00 02 */ li r0, 2 +/* 8037A024 00376F84 98 1F 00 1E */ stb r0, 0x1e(r31) +/* 8037A028 00376F88 38 00 00 03 */ li r0, 3 +/* 8037A02C 00376F8C 38 E0 00 02 */ li r7, 2 +/* 8037A030 00376F90 48 00 00 50 */ b lbl_8037A080 +/* 8037A034 00376F94 38 00 00 02 */ li r0, 2 +/* 8037A038 00376F98 98 1F 00 1E */ stb r0, 0x1e(r31) +/* 8037A03C 00376F9C 38 00 00 02 */ li r0, 2 +/* 8037A040 00376FA0 38 E0 00 02 */ li r7, 2 +/* 8037A044 00376FA4 48 00 00 3C */ b lbl_8037A080 +/* 8037A048 00376FA8 38 00 00 03 */ li r0, 3 +/* 8037A04C 00376FAC 98 1F 00 1E */ stb r0, 0x1e(r31) +/* 8037A050 00376FB0 38 00 00 02 */ li r0, 2 +/* 8037A054 00376FB4 38 E0 00 02 */ li r7, 2 +/* 8037A058 00376FB8 48 00 00 28 */ b lbl_8037A080 +/* 8037A05C 00376FBC 38 00 00 00 */ li r0, 0 +/* 8037A060 00376FC0 98 1F 00 1E */ stb r0, 0x1e(r31) +/* 8037A064 00376FC4 38 00 00 03 */ li r0, 3 +/* 8037A068 00376FC8 38 E0 00 03 */ li r7, 3 +/* 8037A06C 00376FCC 48 00 00 14 */ b lbl_8037A080 +lbl_8037A070: +/* 8037A070 00376FD0 38 00 00 02 */ li r0, 2 +/* 8037A074 00376FD4 98 1F 00 1E */ stb r0, 0x1e(r31) +/* 8037A078 00376FD8 38 00 00 02 */ li r0, 2 +/* 8037A07C 00376FDC 38 E0 00 02 */ li r7, 2 +lbl_8037A080: +/* 8037A080 00376FE0 54 08 04 3E */ clrlwi r8, r0, 0x10 +/* 8037A084 00376FE4 38 C0 00 01 */ li r6, 1 +/* 8037A088 00376FE8 7C C5 40 30 */ slw r5, r6, r8 +/* 8037A08C 00376FEC 54 E7 04 3E */ clrlwi r7, r7, 0x10 +/* 8037A090 00376FF0 38 05 FF FF */ addi r0, r5, -1 +/* 8037A094 00376FF4 7C C5 38 30 */ slw r5, r6, r7 +/* 8037A098 00376FF8 7C 84 02 14 */ add r4, r4, r0 +/* 8037A09C 00376FFC 38 05 FF FF */ addi r0, r5, -1 +/* 8037A0A0 00377000 7C 84 46 30 */ sraw r4, r4, r8 +/* 8037A0A4 00377004 7C 03 02 14 */ add r0, r3, r0 +/* 8037A0A8 00377008 7C 00 3E 30 */ sraw r0, r0, r7 +/* 8037A0AC 0037700C 7C 04 01 D6 */ mullw r0, r4, r0 +/* 8037A0B0 00377010 54 00 04 7E */ clrlwi r0, r0, 0x11 +/* 8037A0B4 00377014 B0 1F 00 1C */ sth r0, 0x1c(r31) +/* 8037A0B8 00377018 88 1F 00 1F */ lbz r0, 0x1f(r31) +/* 8037A0BC 0037701C 60 00 00 02 */ ori r0, r0, 2 +/* 8037A0C0 00377020 98 1F 00 1F */ stb r0, 0x1f(r31) +/* 8037A0C4 00377024 80 01 00 64 */ lwz r0, 0x64(r1) +/* 8037A0C8 00377028 BB 01 00 40 */ lmw r24, 0x40(r1) +/* 8037A0CC 0037702C 38 21 00 60 */ addi r1, r1, 0x60 +/* 8037A0D0 00377030 7C 08 03 A6 */ mtlr r0 +/* 8037A0D4 00377034 4E 80 00 20 */ blr + +.global GXInitTexObjCI +GXInitTexObjCI: +/* 8037A0D8 00377038 7C 08 02 A6 */ mflr r0 +/* 8037A0DC 0037703C 90 01 00 04 */ stw r0, 4(r1) +/* 8037A0E0 00377040 94 21 FF D0 */ stwu r1, -0x30(r1) +/* 8037A0E4 00377044 93 E1 00 2C */ stw r31, 0x2c(r1) +/* 8037A0E8 00377048 83 E1 00 38 */ lwz r31, 0x38(r1) +/* 8037A0EC 0037704C 93 C1 00 28 */ stw r30, 0x28(r1) +/* 8037A0F0 00377050 7C 7E 1B 78 */ mr r30, r3 +/* 8037A0F4 00377054 4B FF FD 71 */ bl GXInitTexObj +/* 8037A0F8 00377058 88 1E 00 1F */ lbz r0, 0x1f(r30) +/* 8037A0FC 0037705C 54 00 07 FA */ rlwinm r0, r0, 0, 0x1f, 0x1d +/* 8037A100 00377060 98 1E 00 1F */ stb r0, 0x1f(r30) +/* 8037A104 00377064 93 FE 00 18 */ stw r31, 0x18(r30) +/* 8037A108 00377068 80 01 00 34 */ lwz r0, 0x34(r1) +/* 8037A10C 0037706C 83 E1 00 2C */ lwz r31, 0x2c(r1) +/* 8037A110 00377070 83 C1 00 28 */ lwz r30, 0x28(r1) +/* 8037A114 00377074 38 21 00 30 */ addi r1, r1, 0x30 +/* 8037A118 00377078 7C 08 03 A6 */ mtlr r0 +/* 8037A11C 0037707C 4E 80 00 20 */ blr + +.global GXInitTexObjLOD +GXInitTexObjLOD: +/* 8037A120 00377080 94 21 FF C8 */ stwu r1, -0x38(r1) +/* 8037A124 00377084 C0 02 CE 78 */ lfs f0, lbl_805AEB98@sda21(r2) +/* 8037A128 00377088 FC 03 00 40 */ fcmpo cr0, f3, f0 +/* 8037A12C 0037708C 40 80 00 0C */ bge lbl_8037A138 +/* 8037A130 00377090 FC 60 00 90 */ fmr f3, f0 +/* 8037A134 00377094 48 00 00 18 */ b lbl_8037A14C +lbl_8037A138: +/* 8037A138 00377098 C0 02 CE 7C */ lfs f0, lbl_805AEB9C@sda21(r2) +/* 8037A13C 0037709C FC 03 00 40 */ fcmpo cr0, f3, f0 +/* 8037A140 003770A0 4C 41 13 82 */ cror 2, 1, 2 +/* 8037A144 003770A4 40 82 00 08 */ bne lbl_8037A14C +/* 8037A148 003770A8 C0 62 CE 80 */ lfs f3, lbl_805AEBA0@sda21(r2) +lbl_8037A14C: +/* 8037A14C 003770AC C0 02 CE 84 */ lfs f0, lbl_805AEBA4@sda21(r2) +/* 8037A150 003770B0 2C 05 00 01 */ cmpwi r5, 1 +/* 8037A154 003770B4 80 03 00 00 */ lwz r0, 0(r3) +/* 8037A158 003770B8 EC 00 00 F2 */ fmuls f0, f0, f3 +/* 8037A15C 003770BC 54 05 05 DC */ rlwinm r5, r0, 0, 0x17, 0xe +/* 8037A160 003770C0 FC 00 00 1E */ fctiwz f0, f0 +/* 8037A164 003770C4 D8 01 00 30 */ stfd f0, 0x30(r1) +/* 8037A168 003770C8 80 01 00 34 */ lwz r0, 0x34(r1) +/* 8037A16C 003770CC 50 05 4B EC */ rlwimi r5, r0, 9, 0xf, 0x16 +/* 8037A170 003770D0 90 A3 00 00 */ stw r5, 0(r3) +/* 8037A174 003770D4 40 82 00 0C */ bne lbl_8037A180 +/* 8037A178 003770D8 38 A0 00 01 */ li r5, 1 +/* 8037A17C 003770DC 48 00 00 08 */ b lbl_8037A184 +lbl_8037A180: +/* 8037A180 003770E0 38 A0 00 00 */ li r5, 0 +lbl_8037A184: +/* 8037A184 003770E4 81 23 00 00 */ lwz r9, 0(r3) +/* 8037A188 003770E8 54 E0 06 3F */ clrlwi. r0, r7, 0x18 +/* 8037A18C 003770EC 54 A5 20 36 */ slwi r5, r5, 4 +/* 8037A190 003770F0 55 27 07 34 */ rlwinm r7, r9, 0, 0x1c, 0x1a +/* 8037A194 003770F4 7C E5 2B 78 */ or r5, r7, r5 +/* 8037A198 003770F8 90 A3 00 00 */ stw r5, 0(r3) +/* 8037A19C 003770FC 38 AD 9F 58 */ addi r5, r13, lbl_805A8B18@sda21 +/* 8037A1A0 00377100 7C 05 20 AE */ lbzx r0, r5, r4 +/* 8037A1A4 00377104 80 E3 00 00 */ lwz r7, 0(r3) +/* 8037A1A8 00377108 54 00 28 34 */ slwi r0, r0, 5 +/* 8037A1AC 0037710C 54 E4 06 EE */ rlwinm r4, r7, 0, 0x1b, 0x17 +/* 8037A1B0 00377110 7C 80 03 78 */ or r0, r4, r0 +/* 8037A1B4 00377114 90 03 00 00 */ stw r0, 0(r3) +/* 8037A1B8 00377118 41 82 00 0C */ beq lbl_8037A1C4 +/* 8037A1BC 0037711C 38 00 00 00 */ li r0, 0 +/* 8037A1C0 00377120 48 00 00 08 */ b lbl_8037A1C8 +lbl_8037A1C4: +/* 8037A1C4 00377124 38 00 00 01 */ li r0, 1 +lbl_8037A1C8: +/* 8037A1C8 00377128 80 83 00 00 */ lwz r4, 0(r3) +/* 8037A1CC 0037712C 54 00 40 2E */ slwi r0, r0, 8 +/* 8037A1D0 00377130 54 84 06 2C */ rlwinm r4, r4, 0, 0x18, 0x16 +/* 8037A1D4 00377134 7C 80 03 78 */ or r0, r4, r0 +/* 8037A1D8 00377138 90 03 00 00 */ stw r0, 0(r3) +/* 8037A1DC 0037713C 55 04 98 18 */ slwi r4, r8, 0x13 +/* 8037A1E0 00377140 54 C0 A8 D4 */ rlwinm r0, r6, 0x15, 3, 0xa +/* 8037A1E4 00377144 80 A3 00 00 */ lwz r5, 0(r3) +/* 8037A1E8 00377148 54 A5 03 DA */ rlwinm r5, r5, 0, 0xf, 0xd +/* 8037A1EC 0037714C 90 A3 00 00 */ stw r5, 0(r3) +/* 8037A1F0 00377150 80 A3 00 00 */ lwz r5, 0(r3) +/* 8037A1F4 00377154 54 A5 03 98 */ rlwinm r5, r5, 0, 0xe, 0xc +/* 8037A1F8 00377158 90 A3 00 00 */ stw r5, 0(r3) +/* 8037A1FC 0037715C 80 A3 00 00 */ lwz r5, 0(r3) +/* 8037A200 00377160 54 A5 03 54 */ rlwinm r5, r5, 0, 0xd, 0xa +/* 8037A204 00377164 7C A4 23 78 */ or r4, r5, r4 +/* 8037A208 00377168 90 83 00 00 */ stw r4, 0(r3) +/* 8037A20C 0037716C 80 83 00 00 */ lwz r4, 0(r3) +/* 8037A210 00377170 54 84 02 D2 */ rlwinm r4, r4, 0, 0xb, 9 +/* 8037A214 00377174 7C 80 03 78 */ or r0, r4, r0 +/* 8037A218 00377178 90 03 00 00 */ stw r0, 0(r3) +/* 8037A21C 0037717C C0 02 CE 88 */ lfs f0, lbl_805AEBA8@sda21(r2) +/* 8037A220 00377180 FC 01 00 40 */ fcmpo cr0, f1, f0 +/* 8037A224 00377184 40 80 00 0C */ bge lbl_8037A230 +/* 8037A228 00377188 FC 20 00 90 */ fmr f1, f0 +/* 8037A22C 0037718C 48 00 00 14 */ b lbl_8037A240 +lbl_8037A230: +/* 8037A230 00377190 C0 02 CE 8C */ lfs f0, lbl_805AEBAC@sda21(r2) +/* 8037A234 00377194 FC 01 00 40 */ fcmpo cr0, f1, f0 +/* 8037A238 00377198 40 81 00 08 */ ble lbl_8037A240 +/* 8037A23C 0037719C FC 20 00 90 */ fmr f1, f0 +lbl_8037A240: +/* 8037A240 003771A0 C0 62 CE 68 */ lfs f3, lbl_805AEB88@sda21(r2) +/* 8037A244 003771A4 C0 02 CE 88 */ lfs f0, lbl_805AEBA8@sda21(r2) +/* 8037A248 003771A8 EC 23 00 72 */ fmuls f1, f3, f1 +/* 8037A24C 003771AC FC 02 00 40 */ fcmpo cr0, f2, f0 +/* 8037A250 003771B0 FC 20 08 1E */ fctiwz f1, f1 +/* 8037A254 003771B4 D8 21 00 30 */ stfd f1, 0x30(r1) +/* 8037A258 003771B8 80 81 00 34 */ lwz r4, 0x34(r1) +/* 8037A25C 003771BC 40 80 00 0C */ bge lbl_8037A268 +/* 8037A260 003771C0 FC 40 00 90 */ fmr f2, f0 +/* 8037A264 003771C4 48 00 00 14 */ b lbl_8037A278 +lbl_8037A268: +/* 8037A268 003771C8 C0 02 CE 8C */ lfs f0, lbl_805AEBAC@sda21(r2) +/* 8037A26C 003771CC FC 02 00 40 */ fcmpo cr0, f2, f0 +/* 8037A270 003771D0 40 81 00 08 */ ble lbl_8037A278 +/* 8037A274 003771D4 FC 40 00 90 */ fmr f2, f0 +lbl_8037A278: +/* 8037A278 003771D8 80 03 00 04 */ lwz r0, 4(r3) +/* 8037A27C 003771DC 54 00 00 2E */ rlwinm r0, r0, 0, 0, 0x17 +/* 8037A280 003771E0 50 80 06 3E */ rlwimi r0, r4, 0, 0x18, 0x1f +/* 8037A284 003771E4 90 03 00 04 */ stw r0, 4(r3) +/* 8037A288 003771E8 C0 02 CE 68 */ lfs f0, lbl_805AEB88@sda21(r2) +/* 8037A28C 003771EC 80 03 00 04 */ lwz r0, 4(r3) +/* 8037A290 003771F0 EC 00 00 B2 */ fmuls f0, f0, f2 +/* 8037A294 003771F4 54 04 06 1E */ rlwinm r4, r0, 0, 0x18, 0xf +/* 8037A298 003771F8 FC 00 00 1E */ fctiwz f0, f0 +/* 8037A29C 003771FC D8 01 00 30 */ stfd f0, 0x30(r1) +/* 8037A2A0 00377200 80 01 00 34 */ lwz r0, 0x34(r1) +/* 8037A2A4 00377204 50 04 44 2E */ rlwimi r4, r0, 8, 0x10, 0x17 +/* 8037A2A8 00377208 90 83 00 04 */ stw r4, 4(r3) +/* 8037A2AC 0037720C 38 21 00 38 */ addi r1, r1, 0x38 +/* 8037A2B0 00377210 4E 80 00 20 */ blr + +.global GXInitTexObjData +GXInitTexObjData: +/* 8037A2B4 00377214 80 A3 00 0C */ lwz r5, 0xc(r3) +/* 8037A2B8 00377218 54 80 D9 FE */ rlwinm r0, r4, 0x1b, 7, 0x1f +/* 8037A2BC 0037721C 54 A4 00 14 */ rlwinm r4, r5, 0, 0, 0xa +/* 8037A2C0 00377220 7C 80 03 78 */ or r0, r4, r0 +/* 8037A2C4 00377224 90 03 00 0C */ stw r0, 0xc(r3) +/* 8037A2C8 00377228 4E 80 00 20 */ blr + +.global GXInitTexObjWrapMode +GXInitTexObjWrapMode: +/* 8037A2CC 0037722C 80 C3 00 00 */ lwz r6, 0(r3) +/* 8037A2D0 00377230 54 A0 10 3A */ slwi r0, r5, 2 +/* 8037A2D4 00377234 54 C5 00 3A */ rlwinm r5, r6, 0, 0, 0x1d +/* 8037A2D8 00377238 7C A4 23 78 */ or r4, r5, r4 +/* 8037A2DC 0037723C 90 83 00 00 */ stw r4, 0(r3) +/* 8037A2E0 00377240 80 83 00 00 */ lwz r4, 0(r3) +/* 8037A2E4 00377244 54 84 07 B6 */ rlwinm r4, r4, 0, 0x1e, 0x1b +/* 8037A2E8 00377248 7C 80 03 78 */ or r0, r4, r0 +/* 8037A2EC 0037724C 90 03 00 00 */ stw r0, 0(r3) +/* 8037A2F0 00377250 4E 80 00 20 */ blr + +.global GXGetTexObjFmt +GXGetTexObjFmt: +/* 8037A2F4 00377254 80 63 00 14 */ lwz r3, 0x14(r3) +/* 8037A2F8 00377258 4E 80 00 20 */ blr + +.global GXLoadTexObjPreLoaded +GXLoadTexObjPreLoaded: +/* 8037A2FC 0037725C 7C 08 02 A6 */ mflr r0 +/* 8037A300 00377260 38 ED 9F 30 */ addi r7, r13, lbl_805A8AF0@sda21 +/* 8037A304 00377264 90 01 00 04 */ stw r0, 4(r1) +/* 8037A308 00377268 94 21 FF D8 */ stwu r1, -0x28(r1) +/* 8037A30C 0037726C 93 E1 00 24 */ stw r31, 0x24(r1) +/* 8037A310 00377270 3F E0 CC 01 */ lis r31, 0xCC008000@ha +/* 8037A314 00377274 93 C1 00 20 */ stw r30, 0x20(r1) +/* 8037A318 00377278 3B C0 00 61 */ li r30, 0x61 +/* 8037A31C 0037727C 93 A1 00 1C */ stw r29, 0x1c(r1) +/* 8037A320 00377280 3B A5 00 00 */ addi r29, r5, 0 +/* 8037A324 00377284 38 AD 9F 40 */ addi r5, r13, lbl_805A8B00@sda21 +/* 8037A328 00377288 93 81 00 18 */ stw r28, 0x18(r1) +/* 8037A32C 0037728C 7C 7C 1B 78 */ mr r28, r3 +/* 8037A330 00377290 80 C3 00 00 */ lwz r6, 0(r3) +/* 8037A334 00377294 38 6D 9F 20 */ addi r3, r13, lbl_805A8AE0@sda21 +/* 8037A338 00377298 7C 03 E8 AE */ lbzx r0, r3, r29 +/* 8037A33C 0037729C 38 6D 9F 28 */ addi r3, r13, lbl_805A8AE8@sda21 +/* 8037A340 003772A0 54 00 C0 0E */ slwi r0, r0, 0x18 +/* 8037A344 003772A4 50 C0 02 3E */ rlwimi r0, r6, 0, 8, 0x1f +/* 8037A348 003772A8 90 1C 00 00 */ stw r0, 0(r28) +/* 8037A34C 003772AC 38 CD 9F 38 */ addi r6, r13, lbl_805A8AF8@sda21 +/* 8037A350 003772B0 7C 03 E8 AE */ lbzx r0, r3, r29 +/* 8037A354 003772B4 38 6D 9F 48 */ addi r3, r13, lbl_805A8B08@sda21 +/* 8037A358 003772B8 81 1C 00 04 */ lwz r8, 4(r28) +/* 8037A35C 003772BC 54 00 C0 0E */ slwi r0, r0, 0x18 +/* 8037A360 003772C0 51 00 02 3E */ rlwimi r0, r8, 0, 8, 0x1f +/* 8037A364 003772C4 90 1C 00 04 */ stw r0, 4(r28) +/* 8037A368 003772C8 7C 07 E8 AE */ lbzx r0, r7, r29 +/* 8037A36C 003772CC 81 1C 00 08 */ lwz r8, 8(r28) +/* 8037A370 003772D0 54 00 C0 0E */ slwi r0, r0, 0x18 +/* 8037A374 003772D4 51 00 02 3E */ rlwimi r0, r8, 0, 8, 0x1f +/* 8037A378 003772D8 90 1C 00 08 */ stw r0, 8(r28) +/* 8037A37C 003772DC 7C 06 E8 AE */ lbzx r0, r6, r29 +/* 8037A380 003772E0 80 E4 00 00 */ lwz r7, 0(r4) +/* 8037A384 003772E4 54 00 C0 0E */ slwi r0, r0, 0x18 +/* 8037A388 003772E8 50 E0 02 3E */ rlwimi r0, r7, 0, 8, 0x1f +/* 8037A38C 003772EC 90 04 00 00 */ stw r0, 0(r4) +/* 8037A390 003772F0 7C 05 E8 AE */ lbzx r0, r5, r29 +/* 8037A394 003772F4 80 C4 00 04 */ lwz r6, 4(r4) +/* 8037A398 003772F8 54 00 C0 0E */ slwi r0, r0, 0x18 +/* 8037A39C 003772FC 50 C0 02 3E */ rlwimi r0, r6, 0, 8, 0x1f +/* 8037A3A0 00377300 90 04 00 04 */ stw r0, 4(r4) +/* 8037A3A4 00377304 7C 03 E8 AE */ lbzx r0, r3, r29 +/* 8037A3A8 00377308 80 BC 00 0C */ lwz r5, 0xc(r28) +/* 8037A3AC 0037730C 54 00 C0 0E */ slwi r0, r0, 0x18 +/* 8037A3B0 00377310 50 A0 02 3E */ rlwimi r0, r5, 0, 8, 0x1f +/* 8037A3B4 00377314 90 1C 00 0C */ stw r0, 0xc(r28) +/* 8037A3B8 00377318 9B DF 80 00 */ stb r30, 0xCC008000@l(r31) +/* 8037A3BC 0037731C 80 1C 00 00 */ lwz r0, 0(r28) +/* 8037A3C0 00377320 90 1F 80 00 */ stw r0, 0xCC008000@l(r31) +/* 8037A3C4 00377324 9B DF 80 00 */ stb r30, 0xCC008000@l(r31) +/* 8037A3C8 00377328 80 1C 00 04 */ lwz r0, 4(r28) +/* 8037A3CC 0037732C 90 1F 80 00 */ stw r0, 0xCC008000@l(r31) +/* 8037A3D0 00377330 9B DF 80 00 */ stb r30, 0xCC008000@l(r31) +/* 8037A3D4 00377334 80 1C 00 08 */ lwz r0, 8(r28) +/* 8037A3D8 00377338 90 1F 80 00 */ stw r0, 0xCC008000@l(r31) +/* 8037A3DC 0037733C 9B DF 80 00 */ stb r30, 0xCC008000@l(r31) +/* 8037A3E0 00377340 80 04 00 00 */ lwz r0, 0(r4) +/* 8037A3E4 00377344 90 1F 80 00 */ stw r0, 0xCC008000@l(r31) +/* 8037A3E8 00377348 9B DF 80 00 */ stb r30, 0xCC008000@l(r31) +/* 8037A3EC 0037734C 80 04 00 04 */ lwz r0, 4(r4) +/* 8037A3F0 00377350 90 1F 80 00 */ stw r0, 0xCC008000@l(r31) +/* 8037A3F4 00377354 9B DF 80 00 */ stb r30, 0xCC008000@l(r31) +/* 8037A3F8 00377358 80 1C 00 0C */ lwz r0, 0xc(r28) +/* 8037A3FC 0037735C 90 1F 80 00 */ stw r0, 0xCC008000@l(r31) +/* 8037A400 00377360 88 1C 00 1F */ lbz r0, 0x1f(r28) +/* 8037A404 00377364 54 00 07 BD */ rlwinm. r0, r0, 0, 0x1e, 0x1e +/* 8037A408 00377368 40 82 00 3C */ bne lbl_8037A444 +/* 8037A40C 0037736C 80 82 CE 08 */ lwz r4, lbl_805AEB28@sda21(r2) +/* 8037A410 00377370 80 7C 00 18 */ lwz r3, 0x18(r28) +/* 8037A414 00377374 81 84 04 14 */ lwz r12, 0x414(r4) +/* 8037A418 00377378 7D 88 03 A6 */ mtlr r12 +/* 8037A41C 0037737C 4E 80 00 21 */ blrl +/* 8037A420 00377380 38 8D 9F 50 */ addi r4, r13, lbl_805A8B10@sda21 +/* 8037A424 00377384 80 A3 00 04 */ lwz r5, 4(r3) +/* 8037A428 00377388 7C 04 E8 AE */ lbzx r0, r4, r29 +/* 8037A42C 0037738C 54 00 C0 0E */ slwi r0, r0, 0x18 +/* 8037A430 00377390 50 A0 02 3E */ rlwimi r0, r5, 0, 8, 0x1f +/* 8037A434 00377394 90 03 00 04 */ stw r0, 4(r3) +/* 8037A438 00377398 9B DF 80 00 */ stb r30, 0xCC008000@l(r31) +/* 8037A43C 0037739C 80 03 00 04 */ lwz r0, 4(r3) +/* 8037A440 003773A0 90 1F 80 00 */ stw r0, 0xCC008000@l(r31) +lbl_8037A444: +/* 8037A444 003773A4 80 A2 CE 08 */ lwz r5, lbl_805AEB28@sda21(r2) +/* 8037A448 003773A8 57 A4 10 3A */ slwi r4, r29, 2 +/* 8037A44C 003773AC 80 7C 00 08 */ lwz r3, 8(r28) +/* 8037A450 003773B0 38 00 00 00 */ li r0, 0 +/* 8037A454 003773B4 7C 85 22 14 */ add r4, r5, r4 +/* 8037A458 003773B8 90 64 04 5C */ stw r3, 0x45c(r4) +/* 8037A45C 003773BC 80 7C 00 00 */ lwz r3, 0(r28) +/* 8037A460 003773C0 90 64 04 7C */ stw r3, 0x47c(r4) +/* 8037A464 003773C4 80 65 04 F4 */ lwz r3, 0x4f4(r5) +/* 8037A468 003773C8 60 63 00 01 */ ori r3, r3, 1 +/* 8037A46C 003773CC 90 65 04 F4 */ stw r3, 0x4f4(r5) +/* 8037A470 003773D0 B0 05 00 02 */ sth r0, 2(r5) +/* 8037A474 003773D4 80 01 00 2C */ lwz r0, 0x2c(r1) +/* 8037A478 003773D8 83 E1 00 24 */ lwz r31, 0x24(r1) +/* 8037A47C 003773DC 83 C1 00 20 */ lwz r30, 0x20(r1) +/* 8037A480 003773E0 83 A1 00 1C */ lwz r29, 0x1c(r1) +/* 8037A484 003773E4 83 81 00 18 */ lwz r28, 0x18(r1) +/* 8037A488 003773E8 38 21 00 28 */ addi r1, r1, 0x28 +/* 8037A48C 003773EC 7C 08 03 A6 */ mtlr r0 +/* 8037A490 003773F0 4E 80 00 20 */ blr + +.global GXLoadTexObj +GXLoadTexObj: +/* 8037A494 003773F4 7C 08 02 A6 */ mflr r0 +/* 8037A498 003773F8 90 01 00 04 */ stw r0, 4(r1) +/* 8037A49C 003773FC 94 21 FF E8 */ stwu r1, -0x18(r1) +/* 8037A4A0 00377400 93 E1 00 14 */ stw r31, 0x14(r1) +/* 8037A4A4 00377404 3B E4 00 00 */ addi r31, r4, 0 +/* 8037A4A8 00377408 93 C1 00 10 */ stw r30, 0x10(r1) +/* 8037A4AC 0037740C 3B C3 00 00 */ addi r30, r3, 0 +/* 8037A4B0 00377410 80 A2 CE 08 */ lwz r5, lbl_805AEB28@sda21(r2) +/* 8037A4B4 00377414 81 85 04 10 */ lwz r12, 0x410(r5) +/* 8037A4B8 00377418 7D 88 03 A6 */ mtlr r12 +/* 8037A4BC 0037741C 4E 80 00 21 */ blrl +/* 8037A4C0 00377420 38 83 00 00 */ addi r4, r3, 0 +/* 8037A4C4 00377424 38 7E 00 00 */ addi r3, r30, 0 +/* 8037A4C8 00377428 38 BF 00 00 */ addi r5, r31, 0 +/* 8037A4CC 0037742C 4B FF FE 31 */ bl GXLoadTexObjPreLoaded +/* 8037A4D0 00377430 80 01 00 1C */ lwz r0, 0x1c(r1) +/* 8037A4D4 00377434 83 E1 00 14 */ lwz r31, 0x14(r1) +/* 8037A4D8 00377438 83 C1 00 10 */ lwz r30, 0x10(r1) +/* 8037A4DC 0037743C 38 21 00 18 */ addi r1, r1, 0x18 +/* 8037A4E0 00377440 7C 08 03 A6 */ mtlr r0 +/* 8037A4E4 00377444 4E 80 00 20 */ blr + +.global GXInitTlutObj +GXInitTlutObj: +/* 8037A4E8 00377448 38 00 00 00 */ li r0, 0 +/* 8037A4EC 0037744C 90 03 00 00 */ stw r0, 0(r3) +/* 8037A4F0 00377450 54 A5 50 2A */ slwi r5, r5, 0xa +/* 8037A4F4 00377454 54 80 D9 FE */ rlwinm r0, r4, 0x1b, 7, 0x1f +/* 8037A4F8 00377458 80 E3 00 00 */ lwz r7, 0(r3) +/* 8037A4FC 0037745C 54 E4 05 A6 */ rlwinm r4, r7, 0, 0x16, 0x13 +/* 8037A500 00377460 7C 84 2B 78 */ or r4, r4, r5 +/* 8037A504 00377464 90 83 00 00 */ stw r4, 0(r3) +/* 8037A508 00377468 80 83 00 04 */ lwz r4, 4(r3) +/* 8037A50C 0037746C 54 84 00 14 */ rlwinm r4, r4, 0, 0, 0xa +/* 8037A510 00377470 7C 80 03 78 */ or r0, r4, r0 +/* 8037A514 00377474 90 03 00 04 */ stw r0, 4(r3) +/* 8037A518 00377478 80 03 00 04 */ lwz r0, 4(r3) +/* 8037A51C 0037747C 54 00 02 3E */ clrlwi r0, r0, 8 +/* 8037A520 00377480 64 00 64 00 */ oris r0, r0, 0x6400 +/* 8037A524 00377484 90 03 00 04 */ stw r0, 4(r3) +/* 8037A528 00377488 B0 C3 00 08 */ sth r6, 8(r3) +/* 8037A52C 0037748C 4E 80 00 20 */ blr + +.global GXLoadTlut +GXLoadTlut: +/* 8037A530 00377490 7C 08 02 A6 */ mflr r0 +/* 8037A534 00377494 90 01 00 04 */ stw r0, 4(r1) +/* 8037A538 00377498 94 21 FF E0 */ stwu r1, -0x20(r1) +/* 8037A53C 0037749C 93 E1 00 1C */ stw r31, 0x1c(r1) +/* 8037A540 003774A0 93 C1 00 18 */ stw r30, 0x18(r1) +/* 8037A544 003774A4 7C 7E 1B 78 */ mr r30, r3 +/* 8037A548 003774A8 38 64 00 00 */ addi r3, r4, 0 +/* 8037A54C 003774AC 80 A2 CE 08 */ lwz r5, lbl_805AEB28@sda21(r2) +/* 8037A550 003774B0 81 85 04 14 */ lwz r12, 0x414(r5) +/* 8037A554 003774B4 7D 88 03 A6 */ mtlr r12 +/* 8037A558 003774B8 4E 80 00 21 */ blrl +/* 8037A55C 003774BC 7C 7F 1B 78 */ mr r31, r3 +/* 8037A560 003774C0 48 00 0E 95 */ bl __GXFlushTextureState +/* 8037A564 003774C4 38 80 00 61 */ li r4, 0x61 +/* 8037A568 003774C8 3C 60 CC 01 */ lis r3, 0xCC008000@ha +/* 8037A56C 003774CC 98 83 80 00 */ stb r4, 0xCC008000@l(r3) +/* 8037A570 003774D0 80 1E 00 04 */ lwz r0, 4(r30) +/* 8037A574 003774D4 90 03 80 00 */ stw r0, 0xCC008000@l(r3) +/* 8037A578 003774D8 98 83 80 00 */ stb r4, 0xCC008000@l(r3) +/* 8037A57C 003774DC 80 1F 00 00 */ lwz r0, 0(r31) +/* 8037A580 003774E0 90 03 80 00 */ stw r0, 0xCC008000@l(r3) +/* 8037A584 003774E4 48 00 0E 71 */ bl __GXFlushTextureState +/* 8037A588 003774E8 80 1F 00 00 */ lwz r0, 0(r31) +/* 8037A58C 003774EC 80 7E 00 00 */ lwz r3, 0(r30) +/* 8037A590 003774F0 54 00 05 BE */ clrlwi r0, r0, 0x16 +/* 8037A594 003774F4 50 60 00 2A */ rlwimi r0, r3, 0, 0, 0x15 +/* 8037A598 003774F8 90 1E 00 00 */ stw r0, 0(r30) +/* 8037A59C 003774FC 80 7E 00 00 */ lwz r3, 0(r30) +/* 8037A5A0 00377500 80 1E 00 04 */ lwz r0, 4(r30) +/* 8037A5A4 00377504 90 7F 00 04 */ stw r3, 4(r31) +/* 8037A5A8 00377508 90 1F 00 08 */ stw r0, 8(r31) +/* 8037A5AC 0037750C 80 1E 00 08 */ lwz r0, 8(r30) +/* 8037A5B0 00377510 90 1F 00 0C */ stw r0, 0xc(r31) +/* 8037A5B4 00377514 80 01 00 24 */ lwz r0, 0x24(r1) +/* 8037A5B8 00377518 83 E1 00 1C */ lwz r31, 0x1c(r1) +/* 8037A5BC 0037751C 83 C1 00 18 */ lwz r30, 0x18(r1) +/* 8037A5C0 00377520 38 21 00 20 */ addi r1, r1, 0x20 +/* 8037A5C4 00377524 7C 08 03 A6 */ mtlr r0 +/* 8037A5C8 00377528 4E 80 00 20 */ blr + +.global GXInitTexCacheRegion +GXInitTexCacheRegion: +/* 8037A5CC 0037752C 2C 06 00 01 */ cmpwi r6, 1 +/* 8037A5D0 00377530 41 82 00 28 */ beq lbl_8037A5F8 +/* 8037A5D4 00377534 40 80 00 10 */ bge lbl_8037A5E4 +/* 8037A5D8 00377538 2C 06 00 00 */ cmpwi r6, 0 +/* 8037A5DC 0037753C 40 80 00 14 */ bge lbl_8037A5F0 +/* 8037A5E0 00377540 48 00 00 24 */ b lbl_8037A604 +lbl_8037A5E4: +/* 8037A5E4 00377544 2C 06 00 03 */ cmpwi r6, 3 +/* 8037A5E8 00377548 40 80 00 1C */ bge lbl_8037A604 +/* 8037A5EC 0037754C 48 00 00 14 */ b lbl_8037A600 +lbl_8037A5F0: +/* 8037A5F0 00377550 39 40 00 03 */ li r10, 3 +/* 8037A5F4 00377554 48 00 00 10 */ b lbl_8037A604 +lbl_8037A5F8: +/* 8037A5F8 00377558 39 40 00 04 */ li r10, 4 +/* 8037A5FC 0037755C 48 00 00 08 */ b lbl_8037A604 +lbl_8037A600: +/* 8037A600 00377560 39 40 00 05 */ li r10, 5 +lbl_8037A604: +/* 8037A604 00377564 38 00 00 00 */ li r0, 0 +/* 8037A608 00377568 90 03 00 00 */ stw r0, 0(r3) +/* 8037A60C 0037756C 54 A6 D9 7E */ srwi r6, r5, 5 +/* 8037A610 00377570 55 45 78 20 */ slwi r5, r10, 0xf +/* 8037A614 00377574 81 23 00 00 */ lwz r9, 0(r3) +/* 8037A618 00377578 55 40 90 1A */ slwi r0, r10, 0x12 +/* 8037A61C 0037757C 2C 08 00 02 */ cmpwi r8, 2 +/* 8037A620 00377580 55 29 00 20 */ rlwinm r9, r9, 0, 0, 0x10 +/* 8037A624 00377584 7D 26 33 78 */ or r6, r9, r6 +/* 8037A628 00377588 90 C3 00 00 */ stw r6, 0(r3) +/* 8037A62C 0037758C 80 C3 00 00 */ lwz r6, 0(r3) +/* 8037A630 00377590 54 C6 04 5A */ rlwinm r6, r6, 0, 0x11, 0xd +/* 8037A634 00377594 7C C5 2B 78 */ or r5, r6, r5 +/* 8037A638 00377598 90 A3 00 00 */ stw r5, 0(r3) +/* 8037A63C 0037759C 80 A3 00 00 */ lwz r5, 0(r3) +/* 8037A640 003775A0 54 A5 03 94 */ rlwinm r5, r5, 0, 0xe, 0xa +/* 8037A644 003775A4 7C A0 03 78 */ or r0, r5, r0 +/* 8037A648 003775A8 90 03 00 00 */ stw r0, 0(r3) +/* 8037A64C 003775AC 80 03 00 00 */ lwz r0, 0(r3) +/* 8037A650 003775B0 54 00 02 D2 */ rlwinm r0, r0, 0, 0xb, 9 +/* 8037A654 003775B4 90 03 00 00 */ stw r0, 0(r3) +/* 8037A658 003775B8 41 82 00 34 */ beq lbl_8037A68C +/* 8037A65C 003775BC 40 80 00 14 */ bge lbl_8037A670 +/* 8037A660 003775C0 2C 08 00 00 */ cmpwi r8, 0 +/* 8037A664 003775C4 41 82 00 18 */ beq lbl_8037A67C +/* 8037A668 003775C8 40 80 00 1C */ bge lbl_8037A684 +/* 8037A66C 003775CC 48 00 00 2C */ b lbl_8037A698 +lbl_8037A670: +/* 8037A670 003775D0 2C 08 00 04 */ cmpwi r8, 4 +/* 8037A674 003775D4 40 80 00 24 */ bge lbl_8037A698 +/* 8037A678 003775D8 48 00 00 1C */ b lbl_8037A694 +lbl_8037A67C: +/* 8037A67C 003775DC 39 40 00 03 */ li r10, 3 +/* 8037A680 003775E0 48 00 00 18 */ b lbl_8037A698 +lbl_8037A684: +/* 8037A684 003775E4 39 40 00 04 */ li r10, 4 +/* 8037A688 003775E8 48 00 00 10 */ b lbl_8037A698 +lbl_8037A68C: +/* 8037A68C 003775EC 39 40 00 05 */ li r10, 5 +/* 8037A690 003775F0 48 00 00 08 */ b lbl_8037A698 +lbl_8037A694: +/* 8037A694 003775F4 39 40 00 00 */ li r10, 0 +lbl_8037A698: +/* 8037A698 003775F8 38 00 00 00 */ li r0, 0 +/* 8037A69C 003775FC 90 03 00 04 */ stw r0, 4(r3) +/* 8037A6A0 00377600 54 E7 D9 7E */ srwi r7, r7, 5 +/* 8037A6A4 00377604 55 46 78 20 */ slwi r6, r10, 0xf +/* 8037A6A8 00377608 81 03 00 04 */ lwz r8, 4(r3) +/* 8037A6AC 0037760C 55 45 90 1A */ slwi r5, r10, 0x12 +/* 8037A6B0 00377610 38 00 00 01 */ li r0, 1 +/* 8037A6B4 00377614 55 08 00 20 */ rlwinm r8, r8, 0, 0, 0x10 +/* 8037A6B8 00377618 7D 07 3B 78 */ or r7, r8, r7 +/* 8037A6BC 0037761C 90 E3 00 04 */ stw r7, 4(r3) +/* 8037A6C0 00377620 80 E3 00 04 */ lwz r7, 4(r3) +/* 8037A6C4 00377624 54 E7 04 5A */ rlwinm r7, r7, 0, 0x11, 0xd +/* 8037A6C8 00377628 7C E6 33 78 */ or r6, r7, r6 +/* 8037A6CC 0037762C 90 C3 00 04 */ stw r6, 4(r3) +/* 8037A6D0 00377630 80 C3 00 04 */ lwz r6, 4(r3) +/* 8037A6D4 00377634 54 C6 03 94 */ rlwinm r6, r6, 0, 0xe, 0xa +/* 8037A6D8 00377638 7C C5 2B 78 */ or r5, r6, r5 +/* 8037A6DC 0037763C 90 A3 00 04 */ stw r5, 4(r3) +/* 8037A6E0 00377640 98 83 00 0C */ stb r4, 0xc(r3) +/* 8037A6E4 00377644 98 03 00 0D */ stb r0, 0xd(r3) +/* 8037A6E8 00377648 4E 80 00 20 */ blr + +.global GXInitTlutRegion +GXInitTlutRegion: +/* 8037A6EC 0037764C 38 00 00 00 */ li r0, 0 +/* 8037A6F0 00377650 90 03 00 00 */ stw r0, 0(r3) +/* 8037A6F4 00377654 3C 04 FF F8 */ addis r0, r4, 0xfff8 +/* 8037A6F8 00377658 54 04 BA 7E */ srwi r4, r0, 9 +/* 8037A6FC 0037765C 80 C3 00 00 */ lwz r6, 0(r3) +/* 8037A700 00377660 54 A0 50 2A */ slwi r0, r5, 0xa +/* 8037A704 00377664 54 C5 00 2A */ rlwinm r5, r6, 0, 0, 0x15 +/* 8037A708 00377668 7C A4 23 78 */ or r4, r5, r4 +/* 8037A70C 0037766C 90 83 00 00 */ stw r4, 0(r3) +/* 8037A710 00377670 80 83 00 00 */ lwz r4, 0(r3) +/* 8037A714 00377674 54 84 05 94 */ rlwinm r4, r4, 0, 0x16, 0xa +/* 8037A718 00377678 7C 80 03 78 */ or r0, r4, r0 +/* 8037A71C 0037767C 90 03 00 00 */ stw r0, 0(r3) +/* 8037A720 00377680 80 03 00 00 */ lwz r0, 0(r3) +/* 8037A724 00377684 54 00 02 3E */ clrlwi r0, r0, 8 +/* 8037A728 00377688 64 00 65 00 */ oris r0, r0, 0x6500 +/* 8037A72C 0037768C 90 03 00 00 */ stw r0, 0(r3) +/* 8037A730 00377690 4E 80 00 20 */ blr + +.global GXInvalidateTexRegion +GXInvalidateTexRegion: +/* 8037A734 00377694 7C 08 02 A6 */ mflr r0 +/* 8037A738 00377698 90 01 00 04 */ stw r0, 4(r1) +/* 8037A73C 0037769C 94 21 FF E0 */ stwu r1, -0x20(r1) +/* 8037A740 003776A0 93 E1 00 1C */ stw r31, 0x1c(r1) +/* 8037A744 003776A4 93 C1 00 18 */ stw r30, 0x18(r1) +/* 8037A748 003776A8 93 A1 00 14 */ stw r29, 0x14(r1) +/* 8037A74C 003776AC 80 E3 00 00 */ lwz r7, 0(r3) +/* 8037A750 003776B0 81 03 00 04 */ lwz r8, 4(r3) +/* 8037A754 003776B4 54 E4 8F 7E */ rlwinm r4, r7, 0x11, 0x1d, 0x1f +/* 8037A758 003776B8 34 04 FF FF */ addic. r0, r4, -1 +/* 8037A75C 003776BC 54 E6 77 7E */ rlwinm r6, r7, 0xe, 0x1d, 0x1f +/* 8037A760 003776C0 55 05 8F 7E */ rlwinm r5, r8, 0x11, 0x1d, 0x1f +/* 8037A764 003776C4 55 04 77 7E */ rlwinm r4, r8, 0xe, 0x1d, 0x1f +/* 8037A768 003776C8 3B E5 FF FF */ addi r31, r5, -1 +/* 8037A76C 003776CC 38 C6 FF FF */ addi r6, r6, -1 +/* 8037A770 003776D0 38 A4 FF FF */ addi r5, r4, -1 +/* 8037A774 003776D4 40 80 00 08 */ bge lbl_8037A77C +/* 8037A778 003776D8 38 00 00 00 */ li r0, 0 +lbl_8037A77C: +/* 8037A77C 003776DC 2C 06 00 00 */ cmpwi r6, 0 +/* 8037A780 003776E0 40 80 00 08 */ bge lbl_8037A788 +/* 8037A784 003776E4 38 C0 00 00 */ li r6, 0 +lbl_8037A788: +/* 8037A788 003776E8 2C 1F 00 00 */ cmpwi r31, 0 +/* 8037A78C 003776EC 40 80 00 08 */ bge lbl_8037A794 +/* 8037A790 003776F0 3B E0 00 00 */ li r31, 0 +lbl_8037A794: +/* 8037A794 003776F4 2C 05 00 00 */ cmpwi r5, 0 +/* 8037A798 003776F8 40 80 00 08 */ bge lbl_8037A7A0 +/* 8037A79C 003776FC 38 A0 00 00 */ li r5, 0 +lbl_8037A7A0: +/* 8037A7A0 00377700 88 63 00 0C */ lbz r3, 0xc(r3) +/* 8037A7A4 00377704 7C 80 32 14 */ add r4, r0, r6 +/* 8037A7A8 00377708 38 C4 00 00 */ addi r6, r4, 0 +/* 8037A7AC 0037770C 28 03 00 00 */ cmplwi r3, 0 +/* 8037A7B0 00377710 41 82 00 10 */ beq lbl_8037A7C0 +/* 8037A7B4 00377714 38 05 FF FE */ addi r0, r5, -2 +/* 8037A7B8 00377718 7C C0 32 14 */ add r6, r0, r6 +/* 8037A7BC 0037771C 7C DF 32 14 */ add r6, r31, r6 +lbl_8037A7C0: +/* 8037A7C0 00377720 54 C0 48 2C */ slwi r0, r6, 9 +/* 8037A7C4 00377724 50 E0 D5 FE */ rlwimi r0, r7, 0x1a, 0x17, 0x1f +/* 8037A7C8 00377728 54 00 02 3E */ clrlwi r0, r0, 8 +/* 8037A7CC 0037772C 2C 1F 00 00 */ cmpwi r31, 0 +/* 8037A7D0 00377730 64 1D 66 00 */ oris r29, r0, 0x6600 +/* 8037A7D4 00377734 41 82 00 28 */ beq lbl_8037A7FC +/* 8037A7D8 00377738 28 03 00 00 */ cmplwi r3, 0 +/* 8037A7DC 0037773C 7C 7F 2A 14 */ add r3, r31, r5 +/* 8037A7E0 00377740 41 82 00 0C */ beq lbl_8037A7EC +/* 8037A7E4 00377744 7C 64 1A 14 */ add r3, r4, r3 +/* 8037A7E8 00377748 38 63 FF FE */ addi r3, r3, -2 +lbl_8037A7EC: +/* 8037A7EC 0037774C 54 60 48 2C */ slwi r0, r3, 9 +/* 8037A7F0 00377750 51 00 D5 FE */ rlwimi r0, r8, 0x1a, 0x17, 0x1f +/* 8037A7F4 00377754 54 00 02 3E */ clrlwi r0, r0, 8 +/* 8037A7F8 00377758 64 1E 66 00 */ oris r30, r0, 0x6600 +lbl_8037A7FC: +/* 8037A7FC 0037775C 48 00 0B F9 */ bl __GXFlushTextureState +/* 8037A800 00377760 38 00 00 61 */ li r0, 0x61 +/* 8037A804 00377764 3C 60 CC 01 */ lis r3, 0xCC008000@ha +/* 8037A808 00377768 98 03 80 00 */ stb r0, 0xCC008000@l(r3) +/* 8037A80C 0037776C 2C 1F 00 00 */ cmpwi r31, 0 +/* 8037A810 00377770 93 A3 80 00 */ stw r29, 0xCC008000@l(r3) +/* 8037A814 00377774 41 82 00 0C */ beq lbl_8037A820 +/* 8037A818 00377778 98 03 80 00 */ stb r0, 0xCC008000@l(r3) +/* 8037A81C 0037777C 93 C3 80 00 */ stw r30, 0xCC008000@l(r3) +lbl_8037A820: +/* 8037A820 00377780 48 00 0B D5 */ bl __GXFlushTextureState +/* 8037A824 00377784 80 01 00 24 */ lwz r0, 0x24(r1) +/* 8037A828 00377788 83 E1 00 1C */ lwz r31, 0x1c(r1) +/* 8037A82C 0037778C 83 C1 00 18 */ lwz r30, 0x18(r1) +/* 8037A830 00377790 83 A1 00 14 */ lwz r29, 0x14(r1) +/* 8037A834 00377794 38 21 00 20 */ addi r1, r1, 0x20 +/* 8037A838 00377798 7C 08 03 A6 */ mtlr r0 +/* 8037A83C 0037779C 4E 80 00 20 */ blr + +.global GXInvalidateTexAll +GXInvalidateTexAll: +/* 8037A840 003777A0 7C 08 02 A6 */ mflr r0 +/* 8037A844 003777A4 90 01 00 04 */ stw r0, 4(r1) +/* 8037A848 003777A8 94 21 FF F8 */ stwu r1, -8(r1) +/* 8037A84C 003777AC 48 00 0B A9 */ bl __GXFlushTextureState +/* 8037A850 003777B0 38 C0 00 61 */ li r6, 0x61 +/* 8037A854 003777B4 3C 60 66 00 */ lis r3, 0x66001000@ha +/* 8037A858 003777B8 3C A0 CC 01 */ lis r5, 0xCC008000@ha +/* 8037A85C 003777BC 98 C5 80 00 */ stb r6, 0xCC008000@l(r5) +/* 8037A860 003777C0 38 83 10 00 */ addi r4, r3, 0x66001000@l +/* 8037A864 003777C4 38 03 11 00 */ addi r0, r3, 0x1100 +/* 8037A868 003777C8 90 85 80 00 */ stw r4, 0xCC008000@l(r5) +/* 8037A86C 003777CC 98 C5 80 00 */ stb r6, 0xCC008000@l(r5) +/* 8037A870 003777D0 90 05 80 00 */ stw r0, 0xCC008000@l(r5) +/* 8037A874 003777D4 48 00 0B 81 */ bl __GXFlushTextureState +/* 8037A878 003777D8 80 01 00 0C */ lwz r0, 0xc(r1) +/* 8037A87C 003777DC 38 21 00 08 */ addi r1, r1, 8 +/* 8037A880 003777E0 7C 08 03 A6 */ mtlr r0 +/* 8037A884 003777E4 4E 80 00 20 */ blr + +.global GXSetTexRegionCallback +GXSetTexRegionCallback: +/* 8037A888 003777E8 80 82 CE 08 */ lwz r4, lbl_805AEB28@sda21(r2) +/* 8037A88C 003777EC 84 04 04 10 */ lwzu r0, 0x410(r4) +/* 8037A890 003777F0 90 64 00 00 */ stw r3, 0(r4) +/* 8037A894 003777F4 7C 03 03 78 */ mr r3, r0 +/* 8037A898 003777F8 4E 80 00 20 */ blr + +.global GXSetTlutRegionCallback +GXSetTlutRegionCallback: +/* 8037A89C 003777FC 80 82 CE 08 */ lwz r4, lbl_805AEB28@sda21(r2) +/* 8037A8A0 00377800 84 04 04 14 */ lwzu r0, 0x414(r4) +/* 8037A8A4 00377804 90 64 00 00 */ stw r3, 0(r4) +/* 8037A8A8 00377808 7C 03 03 78 */ mr r3, r0 +/* 8037A8AC 0037780C 4E 80 00 20 */ blr + +.global GXSetTexCoordCylWrap +GXSetTexCoordCylWrap: +/* 8037A8B0 00377810 81 02 CE 08 */ lwz r8, lbl_805AEB28@sda21(r2) +/* 8037A8B4 00377814 38 00 00 01 */ li r0, 1 +/* 8037A8B8 00377818 54 84 06 3F */ clrlwi. r4, r4, 0x18 +/* 8037A8BC 0037781C 80 E8 04 DC */ lwz r7, 0x4dc(r8) +/* 8037A8C0 00377820 7C 00 18 30 */ slw r0, r0, r3 +/* 8037A8C4 00377824 7C E7 00 78 */ andc r7, r7, r0 +/* 8037A8C8 00377828 7C 80 18 30 */ slw r0, r4, r3 +/* 8037A8CC 0037782C 7C E0 03 78 */ or r0, r7, r0 +/* 8037A8D0 00377830 90 08 04 DC */ stw r0, 0x4dc(r8) +/* 8037A8D4 00377834 4D 82 00 20 */ beqlr +/* 8037A8D8 00377838 54 67 10 3A */ slwi r7, r3, 2 +/* 8037A8DC 0037783C 7C 88 3A 14 */ add r4, r8, r7 +/* 8037A8E0 00377840 80 64 00 B8 */ lwz r3, 0xb8(r4) +/* 8037A8E4 00377844 38 05 FF FF */ addi r0, r5, -1 +/* 8037A8E8 00377848 54 00 04 3E */ clrlwi r0, r0, 0x10 +/* 8037A8EC 0037784C 50 60 00 1E */ rlwimi r0, r3, 0, 0, 0xf +/* 8037A8F0 00377850 90 04 00 B8 */ stw r0, 0xb8(r4) +/* 8037A8F4 00377854 7C A8 3A 14 */ add r5, r8, r7 +/* 8037A8F8 00377858 38 06 FF FF */ addi r0, r6, -1 +/* 8037A8FC 0037785C 80 65 00 D8 */ lwz r3, 0xd8(r5) +/* 8037A900 00377860 38 C0 00 61 */ li r6, 0x61 +/* 8037A904 00377864 7C 88 3A 14 */ add r4, r8, r7 +/* 8037A908 00377868 54 63 00 1E */ rlwinm r3, r3, 0, 0, 0xf +/* 8037A90C 0037786C 50 03 04 3E */ rlwimi r3, r0, 0, 0x10, 0x1f +/* 8037A910 00377870 90 65 00 D8 */ stw r3, 0xd8(r5) +/* 8037A914 00377874 3C A0 CC 01 */ lis r5, 0xCC008000@ha +/* 8037A918 00377878 38 00 00 00 */ li r0, 0 +/* 8037A91C 0037787C 98 C5 80 00 */ stb r6, 0xCC008000@l(r5) +/* 8037A920 00377880 80 64 00 B8 */ lwz r3, 0xb8(r4) +/* 8037A924 00377884 90 65 80 00 */ stw r3, 0xCC008000@l(r5) +/* 8037A928 00377888 98 C5 80 00 */ stb r6, 0xCC008000@l(r5) +/* 8037A92C 0037788C 80 64 00 D8 */ lwz r3, 0xd8(r4) +/* 8037A930 00377890 90 65 80 00 */ stw r3, 0xCC008000@l(r5) +/* 8037A934 00377894 B0 08 00 02 */ sth r0, 2(r8) +/* 8037A938 00377898 4E 80 00 20 */ blr + +.global GXSetTexCoordBias +GXSetTexCoordBias: +/* 8037A93C 0037789C 80 E2 CE 08 */ lwz r7, lbl_805AEB28@sda21(r2) +/* 8037A940 003778A0 54 69 10 3A */ slwi r9, r3, 2 +/* 8037A944 003778A4 7D 07 4A 14 */ add r8, r7, r9 +/* 8037A948 003778A8 80 08 00 B8 */ lwz r0, 0xb8(r8) +/* 8037A94C 003778AC 7D 47 4A 14 */ add r10, r7, r9 +/* 8037A950 003778B0 54 06 04 1C */ rlwinm r6, r0, 0, 0x10, 0xe +/* 8037A954 003778B4 54 80 82 1E */ rlwinm r0, r4, 0x10, 8, 0xf +/* 8037A958 003778B8 7C C0 03 78 */ or r0, r6, r0 +/* 8037A95C 003778BC 90 08 00 B8 */ stw r0, 0xb8(r8) +/* 8037A960 003778C0 38 00 00 01 */ li r0, 1 +/* 8037A964 003778C4 54 A4 82 1E */ rlwinm r4, r5, 0x10, 8, 0xf +/* 8037A968 003778C8 80 CA 00 D8 */ lwz r6, 0xd8(r10) +/* 8037A96C 003778CC 7C 00 18 30 */ slw r0, r0, r3 +/* 8037A970 003778D0 54 C3 04 1C */ rlwinm r3, r6, 0, 0x10, 0xe +/* 8037A974 003778D4 7C 63 23 78 */ or r3, r3, r4 +/* 8037A978 003778D8 90 6A 00 D8 */ stw r3, 0xd8(r10) +/* 8037A97C 003778DC 80 67 04 DC */ lwz r3, 0x4dc(r7) +/* 8037A980 003778E0 7C 60 00 39 */ and. r0, r3, r0 +/* 8037A984 003778E4 4D 82 00 20 */ beqlr +/* 8037A988 003778E8 38 C0 00 61 */ li r6, 0x61 +/* 8037A98C 003778EC 3C A0 CC 01 */ lis r5, 0xCC008000@ha +/* 8037A990 003778F0 98 C5 80 00 */ stb r6, 0xCC008000@l(r5) +/* 8037A994 003778F4 7C 87 4A 14 */ add r4, r7, r9 +/* 8037A998 003778F8 38 00 00 00 */ li r0, 0 +/* 8037A99C 003778FC 80 64 00 B8 */ lwz r3, 0xb8(r4) +/* 8037A9A0 00377900 90 65 80 00 */ stw r3, 0xCC008000@l(r5) +/* 8037A9A4 00377904 98 C5 80 00 */ stb r6, 0xCC008000@l(r5) +/* 8037A9A8 00377908 80 64 00 D8 */ lwz r3, 0xd8(r4) +/* 8037A9AC 0037790C 90 65 80 00 */ stw r3, 0xCC008000@l(r5) +/* 8037A9B0 00377910 B0 07 00 02 */ sth r0, 2(r7) +/* 8037A9B4 00377914 4E 80 00 20 */ blr + +.global __SetSURegs +__SetSURegs: +/* 8037A9B8 00377918 80 A2 CE 08 */ lwz r5, lbl_805AEB28@sda21(r2) +/* 8037A9BC 0037791C 54 88 10 3A */ slwi r8, r4, 2 +/* 8037A9C0 00377920 54 60 10 3A */ slwi r0, r3, 2 +/* 8037A9C4 00377924 7C 65 02 14 */ add r3, r5, r0 +/* 8037A9C8 00377928 7C C5 42 14 */ add r6, r5, r8 +/* 8037A9CC 0037792C 80 83 04 5C */ lwz r4, 0x45c(r3) +/* 8037A9D0 00377930 80 06 00 B8 */ lwz r0, 0xb8(r6) +/* 8037A9D4 00377934 7C E5 42 14 */ add r7, r5, r8 +/* 8037A9D8 00377938 7D 25 42 14 */ add r9, r5, r8 +/* 8037A9DC 0037793C 54 00 00 1E */ rlwinm r0, r0, 0, 0, 0xf +/* 8037A9E0 00377940 50 80 05 BE */ rlwimi r0, r4, 0, 0x16, 0x1f +/* 8037A9E4 00377944 90 06 00 B8 */ stw r0, 0xb8(r6) +/* 8037A9E8 00377948 7D 45 42 14 */ add r10, r5, r8 +/* 8037A9EC 0037794C 80 07 00 D8 */ lwz r0, 0xd8(r7) +/* 8037A9F0 00377950 54 00 00 1E */ rlwinm r0, r0, 0, 0, 0xf +/* 8037A9F4 00377954 50 80 B5 BE */ rlwimi r0, r4, 0x16, 0x16, 0x1f +/* 8037A9F8 00377958 90 07 00 D8 */ stw r0, 0xd8(r7) +/* 8037A9FC 0037795C 38 E0 00 61 */ li r7, 0x61 +/* 8037AA00 00377960 80 C3 04 7C */ lwz r6, 0x47c(r3) +/* 8037AA04 00377964 80 69 00 B8 */ lwz r3, 0xb8(r9) +/* 8037AA08 00377968 54 C0 F7 BE */ rlwinm r0, r6, 0x1e, 0x1e, 0x1f +/* 8037AA0C 0037796C 20 80 00 01 */ subfic r4, r0, 1 +/* 8037AA10 00377970 54 C0 07 BE */ clrlwi r0, r6, 0x1e +/* 8037AA14 00377974 20 00 00 01 */ subfic r0, r0, 1 +/* 8037AA18 00377978 7C 00 00 34 */ cntlzw r0, r0 +/* 8037AA1C 0037797C 54 63 04 1C */ rlwinm r3, r3, 0, 0x10, 0xe +/* 8037AA20 00377980 54 00 5A 1E */ rlwinm r0, r0, 0xb, 8, 0xf +/* 8037AA24 00377984 7C 60 03 78 */ or r0, r3, r0 +/* 8037AA28 00377988 90 09 00 B8 */ stw r0, 0xb8(r9) +/* 8037AA2C 0037798C 7C 80 00 34 */ cntlzw r0, r4 +/* 8037AA30 00377990 54 00 5A 1E */ rlwinm r0, r0, 0xb, 8, 0xf +/* 8037AA34 00377994 80 6A 00 D8 */ lwz r3, 0xd8(r10) +/* 8037AA38 00377998 3C C0 CC 01 */ lis r6, 0xCC008000@ha +/* 8037AA3C 0037799C 7C 85 42 14 */ add r4, r5, r8 +/* 8037AA40 003779A0 54 63 04 1C */ rlwinm r3, r3, 0, 0x10, 0xe +/* 8037AA44 003779A4 7C 60 03 78 */ or r0, r3, r0 +/* 8037AA48 003779A8 90 0A 00 D8 */ stw r0, 0xd8(r10) +/* 8037AA4C 003779AC 38 00 00 00 */ li r0, 0 +/* 8037AA50 003779B0 98 E6 80 00 */ stb r7, 0xCC008000@l(r6) +/* 8037AA54 003779B4 80 64 00 B8 */ lwz r3, 0xb8(r4) +/* 8037AA58 003779B8 90 66 80 00 */ stw r3, 0xCC008000@l(r6) +/* 8037AA5C 003779BC 98 E6 80 00 */ stb r7, 0xCC008000@l(r6) +/* 8037AA60 003779C0 80 64 00 D8 */ lwz r3, 0xd8(r4) +/* 8037AA64 003779C4 90 66 80 00 */ stw r3, 0xCC008000@l(r6) +/* 8037AA68 003779C8 B0 05 00 02 */ sth r0, 2(r5) +/* 8037AA6C 003779CC 4E 80 00 20 */ blr + +.global __GXSetSUTexRegs +__GXSetSUTexRegs: +/* 8037AA70 003779D0 7C 08 02 A6 */ mflr r0 +/* 8037AA74 003779D4 90 01 00 04 */ stw r0, 4(r1) +/* 8037AA78 003779D8 94 21 FF D8 */ stwu r1, -0x28(r1) +/* 8037AA7C 003779DC BF 61 00 14 */ stmw r27, 0x14(r1) +/* 8037AA80 003779E0 80 62 CE 08 */ lwz r3, lbl_805AEB28@sda21(r2) +/* 8037AA84 003779E4 80 03 04 DC */ lwz r0, 0x4dc(r3) +/* 8037AA88 003779E8 28 00 00 FF */ cmplwi r0, 0xff +/* 8037AA8C 003779EC 41 82 01 4C */ beq lbl_8037ABD8 +/* 8037AA90 003779F0 80 03 02 04 */ lwz r0, 0x204(r3) +/* 8037AA94 003779F4 3B E0 00 00 */ li r31, 0 +/* 8037AA98 003779F8 54 03 B7 3E */ rlwinm r3, r0, 0x16, 0x1c, 0x1f +/* 8037AA9C 003779FC 3B C3 00 01 */ addi r30, r3, 1 +/* 8037AAA0 00377A00 54 1B 87 7E */ rlwinm r27, r0, 0x10, 0x1d, 0x1f +/* 8037AAA4 00377A04 48 00 00 A0 */ b lbl_8037AB44 +lbl_8037AAA8: +/* 8037AAA8 00377A08 2C 1F 00 02 */ cmpwi r31, 2 +/* 8037AAAC 00377A0C 41 82 00 4C */ beq lbl_8037AAF8 +/* 8037AAB0 00377A10 40 80 00 14 */ bge lbl_8037AAC4 +/* 8037AAB4 00377A14 2C 1F 00 00 */ cmpwi r31, 0 +/* 8037AAB8 00377A18 41 82 00 18 */ beq lbl_8037AAD0 +/* 8037AABC 00377A1C 40 80 00 28 */ bge lbl_8037AAE4 +/* 8037AAC0 00377A20 48 00 00 5C */ b lbl_8037AB1C +lbl_8037AAC4: +/* 8037AAC4 00377A24 2C 1F 00 04 */ cmpwi r31, 4 +/* 8037AAC8 00377A28 40 80 00 54 */ bge lbl_8037AB1C +/* 8037AACC 00377A2C 48 00 00 40 */ b lbl_8037AB0C +lbl_8037AAD0: +/* 8037AAD0 00377A30 80 62 CE 08 */ lwz r3, lbl_805AEB28@sda21(r2) +/* 8037AAD4 00377A34 80 03 01 20 */ lwz r0, 0x120(r3) +/* 8037AAD8 00377A38 54 1D 07 7E */ clrlwi r29, r0, 0x1d +/* 8037AADC 00377A3C 54 1C EF 7E */ rlwinm r28, r0, 0x1d, 0x1d, 0x1f +/* 8037AAE0 00377A40 48 00 00 3C */ b lbl_8037AB1C +lbl_8037AAE4: +/* 8037AAE4 00377A44 80 62 CE 08 */ lwz r3, lbl_805AEB28@sda21(r2) +/* 8037AAE8 00377A48 80 03 01 20 */ lwz r0, 0x120(r3) +/* 8037AAEC 00377A4C 54 1D D7 7E */ rlwinm r29, r0, 0x1a, 0x1d, 0x1f +/* 8037AAF0 00377A50 54 1C BF 7E */ rlwinm r28, r0, 0x17, 0x1d, 0x1f +/* 8037AAF4 00377A54 48 00 00 28 */ b lbl_8037AB1C +lbl_8037AAF8: +/* 8037AAF8 00377A58 80 62 CE 08 */ lwz r3, lbl_805AEB28@sda21(r2) +/* 8037AAFC 00377A5C 80 03 01 20 */ lwz r0, 0x120(r3) +/* 8037AB00 00377A60 54 1D A7 7E */ rlwinm r29, r0, 0x14, 0x1d, 0x1f +/* 8037AB04 00377A64 54 1C 8F 7E */ rlwinm r28, r0, 0x11, 0x1d, 0x1f +/* 8037AB08 00377A68 48 00 00 14 */ b lbl_8037AB1C +lbl_8037AB0C: +/* 8037AB0C 00377A6C 80 62 CE 08 */ lwz r3, lbl_805AEB28@sda21(r2) +/* 8037AB10 00377A70 80 03 01 20 */ lwz r0, 0x120(r3) +/* 8037AB14 00377A74 54 1D 77 7E */ rlwinm r29, r0, 0xe, 0x1d, 0x1f +/* 8037AB18 00377A78 54 1C 5F 7E */ rlwinm r28, r0, 0xb, 0x1d, 0x1f +lbl_8037AB1C: +/* 8037AB1C 00377A7C 80 62 CE 08 */ lwz r3, lbl_805AEB28@sda21(r2) +/* 8037AB20 00377A80 38 00 00 01 */ li r0, 1 +/* 8037AB24 00377A84 7C 00 E0 30 */ slw r0, r0, r28 +/* 8037AB28 00377A88 80 63 04 DC */ lwz r3, 0x4dc(r3) +/* 8037AB2C 00377A8C 7C 60 00 39 */ and. r0, r3, r0 +/* 8037AB30 00377A90 40 82 00 10 */ bne lbl_8037AB40 +/* 8037AB34 00377A94 38 7D 00 00 */ addi r3, r29, 0 +/* 8037AB38 00377A98 38 9C 00 00 */ addi r4, r28, 0 +/* 8037AB3C 00377A9C 4B FF FE 7D */ bl __SetSURegs +lbl_8037AB40: +/* 8037AB40 00377AA0 3B FF 00 01 */ addi r31, r31, 1 +lbl_8037AB44: +/* 8037AB44 00377AA4 7C 1F D8 40 */ cmplw r31, r27 +/* 8037AB48 00377AA8 41 80 FF 60 */ blt lbl_8037AAA8 +/* 8037AB4C 00377AAC 3B E0 00 00 */ li r31, 0 +/* 8037AB50 00377AB0 3B 7F 00 00 */ addi r27, r31, 0 +/* 8037AB54 00377AB4 48 00 00 7C */ b lbl_8037ABD0 +lbl_8037AB58: +/* 8037AB58 00377AB8 80 A2 CE 08 */ lwz r5, lbl_805AEB28@sda21(r2) +/* 8037AB5C 00377ABC 38 7B 04 9C */ addi r3, r27, 0x49c +/* 8037AB60 00377AC0 57 E4 08 3A */ rlwinm r4, r31, 1, 0, 0x1d +/* 8037AB64 00377AC4 7C 65 18 2E */ lwzx r3, r5, r3 +/* 8037AB68 00377AC8 57 E0 07 FF */ clrlwi. r0, r31, 0x1f +/* 8037AB6C 00377ACC 38 84 01 00 */ addi r4, r4, 0x100 +/* 8037AB70 00377AD0 7C 85 22 14 */ add r4, r5, r4 +/* 8037AB74 00377AD4 54 7D 06 2C */ rlwinm r29, r3, 0, 0x18, 0x16 +/* 8037AB78 00377AD8 41 82 00 10 */ beq lbl_8037AB88 +/* 8037AB7C 00377ADC 80 04 00 00 */ lwz r0, 0(r4) +/* 8037AB80 00377AE0 54 1C 8F 7E */ rlwinm r28, r0, 0x11, 0x1d, 0x1f +/* 8037AB84 00377AE4 48 00 00 0C */ b lbl_8037AB90 +lbl_8037AB88: +/* 8037AB88 00377AE8 80 04 00 00 */ lwz r0, 0(r4) +/* 8037AB8C 00377AEC 54 1C EF 7E */ rlwinm r28, r0, 0x1d, 0x1d, 0x1f +lbl_8037AB90: +/* 8037AB90 00377AF0 28 1D 00 FF */ cmplwi r29, 0xff +/* 8037AB94 00377AF4 41 82 00 34 */ beq lbl_8037ABC8 +/* 8037AB98 00377AF8 38 80 00 01 */ li r4, 1 +/* 8037AB9C 00377AFC 80 65 04 DC */ lwz r3, 0x4dc(r5) +/* 8037ABA0 00377B00 7C 80 E0 30 */ slw r0, r4, r28 +/* 8037ABA4 00377B04 7C 60 00 39 */ and. r0, r3, r0 +/* 8037ABA8 00377B08 40 82 00 20 */ bne lbl_8037ABC8 +/* 8037ABAC 00377B0C 80 65 04 E0 */ lwz r3, 0x4e0(r5) +/* 8037ABB0 00377B10 7C 80 F8 30 */ slw r0, r4, r31 +/* 8037ABB4 00377B14 7C 60 00 39 */ and. r0, r3, r0 +/* 8037ABB8 00377B18 41 82 00 10 */ beq lbl_8037ABC8 +/* 8037ABBC 00377B1C 38 7D 00 00 */ addi r3, r29, 0 +/* 8037ABC0 00377B20 38 9C 00 00 */ addi r4, r28, 0 +/* 8037ABC4 00377B24 4B FF FD F5 */ bl __SetSURegs +lbl_8037ABC8: +/* 8037ABC8 00377B28 3B 7B 00 04 */ addi r27, r27, 4 +/* 8037ABCC 00377B2C 3B FF 00 01 */ addi r31, r31, 1 +lbl_8037ABD0: +/* 8037ABD0 00377B30 7C 1F F0 40 */ cmplw r31, r30 +/* 8037ABD4 00377B34 41 80 FF 84 */ blt lbl_8037AB58 +lbl_8037ABD8: +/* 8037ABD8 00377B38 BB 61 00 14 */ lmw r27, 0x14(r1) +/* 8037ABDC 00377B3C 80 01 00 2C */ lwz r0, 0x2c(r1) +/* 8037ABE0 00377B40 38 21 00 28 */ addi r1, r1, 0x28 +/* 8037ABE4 00377B44 7C 08 03 A6 */ mtlr r0 +/* 8037ABE8 00377B48 4E 80 00 20 */ blr + +.global __GXSetTmemConfig +__GXSetTmemConfig: +/* 8037ABEC 00377B4C 94 21 FF E8 */ stwu r1, -0x18(r1) +/* 8037ABF0 00377B50 2C 03 00 01 */ cmpwi r3, 1 +/* 8037ABF4 00377B54 93 E1 00 14 */ stw r31, 0x14(r1) +/* 8037ABF8 00377B58 93 C1 00 10 */ stw r30, 0x10(r1) +/* 8037ABFC 00377B5C 41 82 00 0C */ beq lbl_8037AC08 +/* 8037AC00 00377B60 40 80 01 14 */ bge lbl_8037AD14 +/* 8037AC04 00377B64 48 00 01 10 */ b lbl_8037AD14 +lbl_8037AC08: +/* 8037AC08 00377B68 38 00 00 61 */ li r0, 0x61 +/* 8037AC0C 00377B6C 3C 60 CC 01 */ lis r3, 0xCC008000@ha +/* 8037AC10 00377B70 3C 80 8C 0E */ lis r4, 0x8C0D8000@ha +/* 8037AC14 00377B74 98 03 80 00 */ stb r0, 0xCC008000@l(r3) +/* 8037AC18 00377B78 38 84 80 00 */ addi r4, r4, 0x8C0D8000@l +/* 8037AC1C 00377B7C 90 83 80 00 */ stw r4, 0xCC008000@l(r3) +/* 8037AC20 00377B80 3C 80 90 0E */ lis r4, 0x900DC000@ha +/* 8037AC24 00377B84 3C E0 8D 0E */ lis r7, 0x8D0D8800@ha +/* 8037AC28 00377B88 98 03 80 00 */ stb r0, 0xCC008000@l(r3) +/* 8037AC2C 00377B8C 38 84 C0 00 */ addi r4, r4, 0x900DC000@l +/* 8037AC30 00377B90 3C C0 91 0E */ lis r6, 0x910DC800@ha +/* 8037AC34 00377B94 90 83 80 00 */ stw r4, 0xCC008000@l(r3) +/* 8037AC38 00377B98 3C A0 8E 0E */ lis r5, 0x8E0D9000@ha +/* 8037AC3C 00377B9C 3C 80 92 0E */ lis r4, 0x920DD000@ha +/* 8037AC40 00377BA0 98 03 80 00 */ stb r0, 0xCC008000@l(r3) +/* 8037AC44 00377BA4 38 E7 88 00 */ addi r7, r7, 0x8D0D8800@l +/* 8037AC48 00377BA8 3F C0 8F 0E */ lis r30, 0x8F0D9800@ha +/* 8037AC4C 00377BAC 90 E3 80 00 */ stw r7, 0xCC008000@l(r3) +/* 8037AC50 00377BB0 3D 80 93 0E */ lis r12, 0x930DD800@ha +/* 8037AC54 00377BB4 3D 60 AC 0E */ lis r11, 0xAC0DA000@ha +/* 8037AC58 00377BB8 98 03 80 00 */ stb r0, 0xCC008000@l(r3) +/* 8037AC5C 00377BBC 38 C6 C8 00 */ addi r6, r6, 0x910DC800@l +/* 8037AC60 00377BC0 3D 40 B0 0E */ lis r10, 0xB00DE000@ha +/* 8037AC64 00377BC4 90 C3 80 00 */ stw r6, 0xCC008000@l(r3) +/* 8037AC68 00377BC8 3D 20 AD 0E */ lis r9, 0xAD0DA800@ha +/* 8037AC6C 00377BCC 3D 00 B1 0E */ lis r8, 0xB10DE800@ha +/* 8037AC70 00377BD0 98 03 80 00 */ stb r0, 0xCC008000@l(r3) +/* 8037AC74 00377BD4 38 A5 90 00 */ addi r5, r5, 0x8E0D9000@l +/* 8037AC78 00377BD8 3C E0 AE 0E */ lis r7, 0xAE0DB000@ha +/* 8037AC7C 00377BDC 90 A3 80 00 */ stw r5, 0xCC008000@l(r3) +/* 8037AC80 00377BE0 3C C0 B2 0E */ lis r6, 0xB20DF000@ha +/* 8037AC84 00377BE4 3C A0 AF 0E */ lis r5, 0xAF0DB800@ha +/* 8037AC88 00377BE8 98 03 80 00 */ stb r0, 0xCC008000@l(r3) +/* 8037AC8C 00377BEC 3B E4 D0 00 */ addi r31, r4, 0x920DD000@l +/* 8037AC90 00377BF0 3C 80 B3 0E */ lis r4, 0xB30DF800@ha +/* 8037AC94 00377BF4 93 E3 80 00 */ stw r31, 0xCC008000@l(r3) +/* 8037AC98 00377BF8 3B DE 98 00 */ addi r30, r30, 0x8F0D9800@l +/* 8037AC9C 00377BFC 39 8C D8 00 */ addi r12, r12, 0x930DD800@l +/* 8037ACA0 00377C00 98 03 80 00 */ stb r0, 0xCC008000@l(r3) +/* 8037ACA4 00377C04 39 6B A0 00 */ addi r11, r11, 0xAC0DA000@l +/* 8037ACA8 00377C08 39 4A E0 00 */ addi r10, r10, 0xB00DE000@l +/* 8037ACAC 00377C0C 93 C3 80 00 */ stw r30, 0xCC008000@l(r3) +/* 8037ACB0 00377C10 39 29 A8 00 */ addi r9, r9, 0xAD0DA800@l +/* 8037ACB4 00377C14 39 08 E8 00 */ addi r8, r8, 0xB10DE800@l +/* 8037ACB8 00377C18 98 03 80 00 */ stb r0, 0xCC008000@l(r3) +/* 8037ACBC 00377C1C 38 E7 B0 00 */ addi r7, r7, 0xAE0DB000@l +/* 8037ACC0 00377C20 38 C6 F0 00 */ addi r6, r6, 0xB20DF000@l +/* 8037ACC4 00377C24 91 83 80 00 */ stw r12, 0xCC008000@l(r3) +/* 8037ACC8 00377C28 38 A5 B8 00 */ addi r5, r5, 0xAF0DB800@l +/* 8037ACCC 00377C2C 38 84 F8 00 */ addi r4, r4, 0xB30DF800@l +/* 8037ACD0 00377C30 98 03 80 00 */ stb r0, 0xCC008000@l(r3) +/* 8037ACD4 00377C34 91 63 80 00 */ stw r11, 0xCC008000@l(r3) +/* 8037ACD8 00377C38 98 03 80 00 */ stb r0, 0xCC008000@l(r3) +/* 8037ACDC 00377C3C 91 43 80 00 */ stw r10, 0xCC008000@l(r3) +/* 8037ACE0 00377C40 98 03 80 00 */ stb r0, 0xCC008000@l(r3) +/* 8037ACE4 00377C44 91 23 80 00 */ stw r9, 0xCC008000@l(r3) +/* 8037ACE8 00377C48 98 03 80 00 */ stb r0, 0xCC008000@l(r3) +/* 8037ACEC 00377C4C 91 03 80 00 */ stw r8, 0xCC008000@l(r3) +/* 8037ACF0 00377C50 98 03 80 00 */ stb r0, 0xCC008000@l(r3) +/* 8037ACF4 00377C54 90 E3 80 00 */ stw r7, 0xCC008000@l(r3) +/* 8037ACF8 00377C58 98 03 80 00 */ stb r0, 0xCC008000@l(r3) +/* 8037ACFC 00377C5C 90 C3 80 00 */ stw r6, 0xCC008000@l(r3) +/* 8037AD00 00377C60 98 03 80 00 */ stb r0, 0xCC008000@l(r3) +/* 8037AD04 00377C64 90 A3 80 00 */ stw r5, 0xCC008000@l(r3) +/* 8037AD08 00377C68 98 03 80 00 */ stb r0, 0xCC008000@l(r3) +/* 8037AD0C 00377C6C 90 83 80 00 */ stw r4, 0xCC008000@l(r3) +/* 8037AD10 00377C70 48 00 01 0C */ b lbl_8037AE1C +lbl_8037AD14: +/* 8037AD14 00377C74 38 00 00 61 */ li r0, 0x61 +/* 8037AD18 00377C78 3C 60 CC 01 */ lis r3, 0xCC008000@ha +/* 8037AD1C 00377C7C 3C 80 8C 0E */ lis r4, 0x8C0D8000@ha +/* 8037AD20 00377C80 98 03 80 00 */ stb r0, 0xCC008000@l(r3) +/* 8037AD24 00377C84 38 84 80 00 */ addi r4, r4, 0x8C0D8000@l +/* 8037AD28 00377C88 90 83 80 00 */ stw r4, 0xCC008000@l(r3) +/* 8037AD2C 00377C8C 3C 80 90 0E */ lis r4, 0x900DC000@ha +/* 8037AD30 00377C90 3C E0 8D 0E */ lis r7, 0x8D0D8400@ha +/* 8037AD34 00377C94 98 03 80 00 */ stb r0, 0xCC008000@l(r3) +/* 8037AD38 00377C98 38 84 C0 00 */ addi r4, r4, 0x900DC000@l +/* 8037AD3C 00377C9C 3C C0 91 0E */ lis r6, 0x910DC400@ha +/* 8037AD40 00377CA0 90 83 80 00 */ stw r4, 0xCC008000@l(r3) +/* 8037AD44 00377CA4 3C A0 8E 0E */ lis r5, 0x8E0D8800@ha +/* 8037AD48 00377CA8 3C 80 92 0E */ lis r4, 0x920DC800@ha +/* 8037AD4C 00377CAC 98 03 80 00 */ stb r0, 0xCC008000@l(r3) +/* 8037AD50 00377CB0 38 E7 84 00 */ addi r7, r7, 0x8D0D8400@l +/* 8037AD54 00377CB4 3F E0 8F 0E */ lis r31, 0x8F0D8C00@ha +/* 8037AD58 00377CB8 90 E3 80 00 */ stw r7, 0xCC008000@l(r3) +/* 8037AD5C 00377CBC 3D 80 93 0E */ lis r12, 0x930DCC00@ha +/* 8037AD60 00377CC0 3D 60 AC 0E */ lis r11, 0xAC0D9000@ha +/* 8037AD64 00377CC4 98 03 80 00 */ stb r0, 0xCC008000@l(r3) +/* 8037AD68 00377CC8 38 C6 C4 00 */ addi r6, r6, 0x910DC400@l +/* 8037AD6C 00377CCC 3D 40 B0 0E */ lis r10, 0xB00DD000@ha +/* 8037AD70 00377CD0 90 C3 80 00 */ stw r6, 0xCC008000@l(r3) +/* 8037AD74 00377CD4 3D 20 AD 0E */ lis r9, 0xAD0D9400@ha +/* 8037AD78 00377CD8 3D 00 B1 0E */ lis r8, 0xB10DD400@ha +/* 8037AD7C 00377CDC 98 03 80 00 */ stb r0, 0xCC008000@l(r3) +/* 8037AD80 00377CE0 38 A5 88 00 */ addi r5, r5, 0x8E0D8800@l +/* 8037AD84 00377CE4 3C E0 AE 0E */ lis r7, 0xAE0D9800@ha +/* 8037AD88 00377CE8 90 A3 80 00 */ stw r5, 0xCC008000@l(r3) +/* 8037AD8C 00377CEC 3C C0 B2 0E */ lis r6, 0xB20DD800@ha +/* 8037AD90 00377CF0 3C A0 AF 0E */ lis r5, 0xAF0D9C00@ha +/* 8037AD94 00377CF4 98 03 80 00 */ stb r0, 0xCC008000@l(r3) +/* 8037AD98 00377CF8 3B C4 C8 00 */ addi r30, r4, 0x920DC800@l +/* 8037AD9C 00377CFC 3C 80 B3 0E */ lis r4, 0xB30DDC00@ha +/* 8037ADA0 00377D00 93 C3 80 00 */ stw r30, 0xCC008000@l(r3) +/* 8037ADA4 00377D04 3B FF 8C 00 */ addi r31, r31, 0x8F0D8C00@l +/* 8037ADA8 00377D08 39 8C CC 00 */ addi r12, r12, 0x930DCC00@l +/* 8037ADAC 00377D0C 98 03 80 00 */ stb r0, 0xCC008000@l(r3) +/* 8037ADB0 00377D10 39 6B 90 00 */ addi r11, r11, 0xAC0D9000@l +/* 8037ADB4 00377D14 39 4A D0 00 */ addi r10, r10, 0xB00DD000@l +/* 8037ADB8 00377D18 93 E3 80 00 */ stw r31, 0xCC008000@l(r3) +/* 8037ADBC 00377D1C 39 29 94 00 */ addi r9, r9, 0xAD0D9400@l +/* 8037ADC0 00377D20 39 08 D4 00 */ addi r8, r8, 0xB10DD400@l +/* 8037ADC4 00377D24 98 03 80 00 */ stb r0, 0xCC008000@l(r3) +/* 8037ADC8 00377D28 38 E7 98 00 */ addi r7, r7, 0xAE0D9800@l +/* 8037ADCC 00377D2C 38 C6 D8 00 */ addi r6, r6, 0xB20DD800@l +/* 8037ADD0 00377D30 91 83 80 00 */ stw r12, 0xCC008000@l(r3) +/* 8037ADD4 00377D34 38 A5 9C 00 */ addi r5, r5, 0xAF0D9C00@l +/* 8037ADD8 00377D38 38 84 DC 00 */ addi r4, r4, 0xB30DDC00@l +/* 8037ADDC 00377D3C 98 03 80 00 */ stb r0, 0xCC008000@l(r3) +/* 8037ADE0 00377D40 91 63 80 00 */ stw r11, 0xCC008000@l(r3) +/* 8037ADE4 00377D44 98 03 80 00 */ stb r0, 0xCC008000@l(r3) +/* 8037ADE8 00377D48 91 43 80 00 */ stw r10, 0xCC008000@l(r3) +/* 8037ADEC 00377D4C 98 03 80 00 */ stb r0, 0xCC008000@l(r3) +/* 8037ADF0 00377D50 91 23 80 00 */ stw r9, 0xCC008000@l(r3) +/* 8037ADF4 00377D54 98 03 80 00 */ stb r0, 0xCC008000@l(r3) +/* 8037ADF8 00377D58 91 03 80 00 */ stw r8, 0xCC008000@l(r3) +/* 8037ADFC 00377D5C 98 03 80 00 */ stb r0, 0xCC008000@l(r3) +/* 8037AE00 00377D60 90 E3 80 00 */ stw r7, 0xCC008000@l(r3) +/* 8037AE04 00377D64 98 03 80 00 */ stb r0, 0xCC008000@l(r3) +/* 8037AE08 00377D68 90 C3 80 00 */ stw r6, 0xCC008000@l(r3) +/* 8037AE0C 00377D6C 98 03 80 00 */ stb r0, 0xCC008000@l(r3) +/* 8037AE10 00377D70 90 A3 80 00 */ stw r5, 0xCC008000@l(r3) +/* 8037AE14 00377D74 98 03 80 00 */ stb r0, 0xCC008000@l(r3) +/* 8037AE18 00377D78 90 83 80 00 */ stw r4, 0xCC008000@l(r3) +lbl_8037AE1C: +/* 8037AE1C 00377D7C 83 E1 00 14 */ lwz r31, 0x14(r1) +/* 8037AE20 00377D80 83 C1 00 10 */ lwz r30, 0x10(r1) +/* 8037AE24 00377D84 38 21 00 18 */ addi r1, r1, 0x18 +/* 8037AE28 00377D88 4E 80 00 20 */ blr diff --git a/asm/Dolphin/GX/GXTransform.s b/asm/Dolphin/GX/GXTransform.s new file mode 100644 index 00000000..b83966df --- /dev/null +++ b/asm/Dolphin/GX/GXTransform.s @@ -0,0 +1,412 @@ +.include "macros.inc" + +.section .text, "ax" + +.global GXSetProjection +GXSetProjection: +/* 8037C244 003791A4 80 A2 CE 08 */ lwz r5, lbl_805AEB28@sda21(r2) +/* 8037C248 003791A8 2C 04 00 01 */ cmpwi r4, 1 +/* 8037C24C 003791AC 90 85 04 20 */ stw r4, 0x420(r5) +/* 8037C250 003791B0 C0 03 00 00 */ lfs f0, 0(r3) +/* 8037C254 003791B4 D0 05 04 24 */ stfs f0, 0x424(r5) +/* 8037C258 003791B8 C0 03 00 14 */ lfs f0, 0x14(r3) +/* 8037C25C 003791BC D0 05 04 2C */ stfs f0, 0x42c(r5) +/* 8037C260 003791C0 C0 03 00 28 */ lfs f0, 0x28(r3) +/* 8037C264 003791C4 D0 05 04 34 */ stfs f0, 0x434(r5) +/* 8037C268 003791C8 C0 03 00 2C */ lfs f0, 0x2c(r3) +/* 8037C26C 003791CC D0 05 04 38 */ stfs f0, 0x438(r5) +/* 8037C270 003791D0 40 82 00 18 */ bne lbl_8037C288 +/* 8037C274 003791D4 C0 03 00 0C */ lfs f0, 0xc(r3) +/* 8037C278 003791D8 D0 05 04 28 */ stfs f0, 0x428(r5) +/* 8037C27C 003791DC C0 03 00 1C */ lfs f0, 0x1c(r3) +/* 8037C280 003791E0 D0 05 04 30 */ stfs f0, 0x430(r5) +/* 8037C284 003791E4 48 00 00 14 */ b lbl_8037C298 +lbl_8037C288: +/* 8037C288 003791E8 C0 03 00 08 */ lfs f0, 8(r3) +/* 8037C28C 003791EC D0 05 04 28 */ stfs f0, 0x428(r5) +/* 8037C290 003791F0 C0 03 00 18 */ lfs f0, 0x18(r3) +/* 8037C294 003791F4 D0 05 04 30 */ stfs f0, 0x430(r5) +lbl_8037C298: +/* 8037C298 003791F8 38 00 00 10 */ li r0, 0x10 +/* 8037C29C 003791FC 80 82 CE 08 */ lwz r4, lbl_805AEB28@sda21(r2) +/* 8037C2A0 00379200 3C A0 CC 01 */ lis r5, 0xCC008000@ha +/* 8037C2A4 00379204 3C 60 00 06 */ lis r3, 0x00061020@ha +/* 8037C2A8 00379208 98 05 80 00 */ stb r0, 0xCC008000@l(r5) +/* 8037C2AC 0037920C 38 03 10 20 */ addi r0, r3, 0x00061020@l +/* 8037C2B0 00379210 90 05 80 00 */ stw r0, 0xCC008000@l(r5) +/* 8037C2B4 00379214 38 00 00 01 */ li r0, 1 +/* 8037C2B8 00379218 C0 04 04 24 */ lfs f0, 0x424(r4) +/* 8037C2BC 0037921C D0 05 80 00 */ stfs f0, 0xCC008000@l(r5) +/* 8037C2C0 00379220 C0 04 04 28 */ lfs f0, 0x428(r4) +/* 8037C2C4 00379224 D0 05 80 00 */ stfs f0, 0xCC008000@l(r5) +/* 8037C2C8 00379228 C0 04 04 2C */ lfs f0, 0x42c(r4) +/* 8037C2CC 0037922C D0 05 80 00 */ stfs f0, 0xCC008000@l(r5) +/* 8037C2D0 00379230 C0 04 04 30 */ lfs f0, 0x430(r4) +/* 8037C2D4 00379234 D0 05 80 00 */ stfs f0, 0xCC008000@l(r5) +/* 8037C2D8 00379238 C0 04 04 34 */ lfs f0, 0x434(r4) +/* 8037C2DC 0037923C D0 05 80 00 */ stfs f0, 0xCC008000@l(r5) +/* 8037C2E0 00379240 C0 04 04 38 */ lfs f0, 0x438(r4) +/* 8037C2E4 00379244 D0 05 80 00 */ stfs f0, 0xCC008000@l(r5) +/* 8037C2E8 00379248 80 64 04 20 */ lwz r3, 0x420(r4) +/* 8037C2EC 0037924C 90 65 80 00 */ stw r3, 0xCC008000@l(r5) +/* 8037C2F0 00379250 B0 04 00 02 */ sth r0, 2(r4) +/* 8037C2F4 00379254 4E 80 00 20 */ blr + +.global GXSetProjectionv +GXSetProjectionv: +/* 8037C2F8 00379258 7C 08 02 A6 */ mflr r0 +/* 8037C2FC 0037925C 90 01 00 04 */ stw r0, 4(r1) +/* 8037C300 00379260 94 21 FF E8 */ stwu r1, -0x18(r1) +/* 8037C304 00379264 93 E1 00 14 */ stw r31, 0x14(r1) +/* 8037C308 00379268 7C 7F 1B 78 */ mr r31, r3 +/* 8037C30C 0037926C C0 23 00 00 */ lfs f1, 0(r3) +/* 8037C310 00379270 48 00 D6 45 */ bl __cvt_fp2unsigned +/* 8037C314 00379274 80 E2 CE 08 */ lwz r7, lbl_805AEB28@sda21(r2) +/* 8037C318 00379278 3C 80 00 06 */ lis r4, 0x00061020@ha +/* 8037C31C 0037927C 38 C0 00 10 */ li r6, 0x10 +/* 8037C320 00379280 90 67 04 20 */ stw r3, 0x420(r7) +/* 8037C324 00379284 3C A0 CC 01 */ lis r5, 0xCC008000@ha +/* 8037C328 00379288 38 64 10 20 */ addi r3, r4, 0x00061020@l +/* 8037C32C 0037928C C0 1F 00 04 */ lfs f0, 4(r31) +/* 8037C330 00379290 38 00 00 01 */ li r0, 1 +/* 8037C334 00379294 D0 07 04 24 */ stfs f0, 0x424(r7) +/* 8037C338 00379298 C0 1F 00 08 */ lfs f0, 8(r31) +/* 8037C33C 0037929C D0 07 04 28 */ stfs f0, 0x428(r7) +/* 8037C340 003792A0 C0 1F 00 0C */ lfs f0, 0xc(r31) +/* 8037C344 003792A4 D0 07 04 2C */ stfs f0, 0x42c(r7) +/* 8037C348 003792A8 C0 1F 00 10 */ lfs f0, 0x10(r31) +/* 8037C34C 003792AC D0 07 04 30 */ stfs f0, 0x430(r7) +/* 8037C350 003792B0 C0 1F 00 14 */ lfs f0, 0x14(r31) +/* 8037C354 003792B4 D0 07 04 34 */ stfs f0, 0x434(r7) +/* 8037C358 003792B8 C0 1F 00 18 */ lfs f0, 0x18(r31) +/* 8037C35C 003792BC D0 07 04 38 */ stfs f0, 0x438(r7) +/* 8037C360 003792C0 98 C5 80 00 */ stb r6, 0xCC008000@l(r5) +/* 8037C364 003792C4 90 65 80 00 */ stw r3, 0xCC008000@l(r5) +/* 8037C368 003792C8 C0 07 04 24 */ lfs f0, 0x424(r7) +/* 8037C36C 003792CC D0 05 80 00 */ stfs f0, 0xCC008000@l(r5) +/* 8037C370 003792D0 C0 07 04 28 */ lfs f0, 0x428(r7) +/* 8037C374 003792D4 D0 05 80 00 */ stfs f0, 0xCC008000@l(r5) +/* 8037C378 003792D8 C0 07 04 2C */ lfs f0, 0x42c(r7) +/* 8037C37C 003792DC D0 05 80 00 */ stfs f0, 0xCC008000@l(r5) +/* 8037C380 003792E0 C0 07 04 30 */ lfs f0, 0x430(r7) +/* 8037C384 003792E4 D0 05 80 00 */ stfs f0, 0xCC008000@l(r5) +/* 8037C388 003792E8 C0 07 04 34 */ lfs f0, 0x434(r7) +/* 8037C38C 003792EC D0 05 80 00 */ stfs f0, 0xCC008000@l(r5) +/* 8037C390 003792F0 C0 07 04 38 */ lfs f0, 0x438(r7) +/* 8037C394 003792F4 D0 05 80 00 */ stfs f0, 0xCC008000@l(r5) +/* 8037C398 003792F8 80 67 04 20 */ lwz r3, 0x420(r7) +/* 8037C39C 003792FC 90 65 80 00 */ stw r3, 0xCC008000@l(r5) +/* 8037C3A0 00379300 B0 07 00 02 */ sth r0, 2(r7) +/* 8037C3A4 00379304 80 01 00 1C */ lwz r0, 0x1c(r1) +/* 8037C3A8 00379308 83 E1 00 14 */ lwz r31, 0x14(r1) +/* 8037C3AC 0037930C 38 21 00 18 */ addi r1, r1, 0x18 +/* 8037C3B0 00379310 7C 08 03 A6 */ mtlr r0 +/* 8037C3B4 00379314 4E 80 00 20 */ blr + +.global GXLoadPosMtxImm +GXLoadPosMtxImm: +/* 8037C3B8 00379318 3C A0 CC 01 */ lis r5, 0xCC008000@ha +/* 8037C3BC 0037931C 38 00 00 10 */ li r0, 0x10 +/* 8037C3C0 00379320 54 84 10 3A */ slwi r4, r4, 2 +/* 8037C3C4 00379324 98 05 80 00 */ stb r0, 0xCC008000@l(r5) +/* 8037C3C8 00379328 64 80 00 0B */ oris r0, r4, 0xb +/* 8037C3CC 0037932C 90 05 80 00 */ stw r0, 0xCC008000@l(r5) +/* 8037C3D0 00379330 38 85 80 00 */ addi r4, r5, -32768 +/* 8037C3D4 00379334 E0 A3 00 00 */ psq_l f5, 0(r3), 0, qr0 +/* 8037C3D8 00379338 E0 83 00 08 */ psq_l f4, 8(r3), 0, qr0 +/* 8037C3DC 0037933C E0 63 00 10 */ psq_l f3, 16(r3), 0, qr0 +/* 8037C3E0 00379340 E0 43 00 18 */ psq_l f2, 24(r3), 0, qr0 +/* 8037C3E4 00379344 E0 23 00 20 */ psq_l f1, 32(r3), 0, qr0 +/* 8037C3E8 00379348 E0 03 00 28 */ psq_l f0, 40(r3), 0, qr0 +/* 8037C3EC 0037934C F0 A4 00 00 */ psq_st f5, 0(r4), 0, qr0 +/* 8037C3F0 00379350 F0 84 00 00 */ psq_st f4, 0(r4), 0, qr0 +/* 8037C3F4 00379354 F0 64 00 00 */ psq_st f3, 0(r4), 0, qr0 +/* 8037C3F8 00379358 F0 44 00 00 */ psq_st f2, 0(r4), 0, qr0 +/* 8037C3FC 0037935C F0 24 00 00 */ psq_st f1, 0(r4), 0, qr0 +/* 8037C400 00379360 F0 04 00 00 */ psq_st f0, 0(r4), 0, qr0 +/* 8037C404 00379364 4E 80 00 20 */ blr + +.global GXLoadNrmMtxImm +GXLoadNrmMtxImm: +/* 8037C408 00379368 1C A4 00 03 */ mulli r5, r4, 3 +/* 8037C40C 0037936C 3C 80 CC 01 */ lis r4, 0xCC008000@ha +/* 8037C410 00379370 38 00 00 10 */ li r0, 0x10 +/* 8037C414 00379374 38 A5 04 00 */ addi r5, r5, 0x400 +/* 8037C418 00379378 98 04 80 00 */ stb r0, 0xCC008000@l(r4) +/* 8037C41C 0037937C 64 A0 00 08 */ oris r0, r5, 8 +/* 8037C420 00379380 94 04 80 00 */ stwu r0, 0xCC008000@l(r4) +/* 8037C424 00379384 E0 A3 00 00 */ psq_l f5, 0(r3), 0, qr0 +/* 8037C428 00379388 C0 83 00 08 */ lfs f4, 8(r3) +/* 8037C42C 0037938C E0 63 00 10 */ psq_l f3, 16(r3), 0, qr0 +/* 8037C430 00379390 C0 43 00 18 */ lfs f2, 0x18(r3) +/* 8037C434 00379394 E0 23 00 20 */ psq_l f1, 32(r3), 0, qr0 +/* 8037C438 00379398 C0 03 00 28 */ lfs f0, 0x28(r3) +/* 8037C43C 0037939C F0 A4 00 00 */ psq_st f5, 0(r4), 0, qr0 +/* 8037C440 003793A0 D0 84 00 00 */ stfs f4, 0(r4) +/* 8037C444 003793A4 F0 64 00 00 */ psq_st f3, 0(r4), 0, qr0 +/* 8037C448 003793A8 D0 44 00 00 */ stfs f2, 0(r4) +/* 8037C44C 003793AC F0 24 00 00 */ psq_st f1, 0(r4), 0, qr0 +/* 8037C450 003793B0 D0 04 00 00 */ stfs f0, 0(r4) +/* 8037C454 003793B4 4E 80 00 20 */ blr + +.global GXSetCurrentMtx +GXSetCurrentMtx: +/* 8037C458 003793B8 7C 08 02 A6 */ mflr r0 +/* 8037C45C 003793BC 90 01 00 04 */ stw r0, 4(r1) +/* 8037C460 003793C0 94 21 FF F8 */ stwu r1, -8(r1) +/* 8037C464 003793C4 80 82 CE 08 */ lwz r4, lbl_805AEB28@sda21(r2) +/* 8037C468 003793C8 84 04 00 80 */ lwzu r0, 0x80(r4) +/* 8037C46C 003793CC 54 00 00 32 */ rlwinm r0, r0, 0, 0, 0x19 +/* 8037C470 003793D0 7C 00 1B 78 */ or r0, r0, r3 +/* 8037C474 003793D4 90 04 00 00 */ stw r0, 0(r4) +/* 8037C478 003793D8 38 60 00 00 */ li r3, 0 +/* 8037C47C 003793DC 48 00 02 E9 */ bl __GXSetMatrixIndex +/* 8037C480 003793E0 80 01 00 0C */ lwz r0, 0xc(r1) +/* 8037C484 003793E4 38 21 00 08 */ addi r1, r1, 8 +/* 8037C488 003793E8 7C 08 03 A6 */ mtlr r0 +/* 8037C48C 003793EC 4E 80 00 20 */ blr + +.global GXLoadTexMtxImm +GXLoadTexMtxImm: +/* 8037C490 003793F0 28 04 00 40 */ cmplwi r4, 0x40 +/* 8037C494 003793F4 41 80 00 14 */ blt lbl_8037C4A8 +/* 8037C498 003793F8 38 04 FF C0 */ addi r0, r4, -64 +/* 8037C49C 003793FC 54 04 10 3A */ slwi r4, r0, 2 +/* 8037C4A0 00379400 38 E4 05 00 */ addi r7, r4, 0x500 +/* 8037C4A4 00379404 48 00 00 08 */ b lbl_8037C4AC +lbl_8037C4A8: +/* 8037C4A8 00379408 54 87 10 3A */ slwi r7, r4, 2 +lbl_8037C4AC: +/* 8037C4AC 0037940C 2C 05 00 01 */ cmpwi r5, 1 +/* 8037C4B0 00379410 40 82 00 0C */ bne lbl_8037C4BC +/* 8037C4B4 00379414 38 80 00 08 */ li r4, 8 +/* 8037C4B8 00379418 48 00 00 08 */ b lbl_8037C4C0 +lbl_8037C4BC: +/* 8037C4BC 0037941C 38 80 00 0C */ li r4, 0xc +lbl_8037C4C0: +/* 8037C4C0 00379420 38 04 FF FF */ addi r0, r4, -1 +/* 8037C4C4 00379424 54 06 80 1E */ slwi r6, r0, 0x10 +/* 8037C4C8 00379428 38 00 00 10 */ li r0, 0x10 +/* 8037C4CC 0037942C 3C 80 CC 01 */ lis r4, 0xCC008000@ha +/* 8037C4D0 00379430 98 04 80 00 */ stb r0, 0xCC008000@l(r4) +/* 8037C4D4 00379434 7C E0 33 78 */ or r0, r7, r6 +/* 8037C4D8 00379438 2C 05 00 00 */ cmpwi r5, 0 +/* 8037C4DC 0037943C 90 04 80 00 */ stw r0, 0xCC008000@l(r4) +/* 8037C4E0 00379440 40 82 00 3C */ bne lbl_8037C51C +/* 8037C4E4 00379444 38 84 80 00 */ addi r4, r4, -32768 +/* 8037C4E8 00379448 E0 A3 00 00 */ psq_l f5, 0(r3), 0, qr0 +/* 8037C4EC 0037944C E0 83 00 08 */ psq_l f4, 8(r3), 0, qr0 +/* 8037C4F0 00379450 E0 63 00 10 */ psq_l f3, 16(r3), 0, qr0 +/* 8037C4F4 00379454 E0 43 00 18 */ psq_l f2, 24(r3), 0, qr0 +/* 8037C4F8 00379458 E0 23 00 20 */ psq_l f1, 32(r3), 0, qr0 +/* 8037C4FC 0037945C E0 03 00 28 */ psq_l f0, 40(r3), 0, qr0 +/* 8037C500 00379460 F0 A4 00 00 */ psq_st f5, 0(r4), 0, qr0 +/* 8037C504 00379464 F0 84 00 00 */ psq_st f4, 0(r4), 0, qr0 +/* 8037C508 00379468 F0 64 00 00 */ psq_st f3, 0(r4), 0, qr0 +/* 8037C50C 0037946C F0 44 00 00 */ psq_st f2, 0(r4), 0, qr0 +/* 8037C510 00379470 F0 24 00 00 */ psq_st f1, 0(r4), 0, qr0 +/* 8037C514 00379474 F0 04 00 00 */ psq_st f0, 0(r4), 0, qr0 +/* 8037C518 00379478 4E 80 00 20 */ blr +lbl_8037C51C: +/* 8037C51C 0037947C 38 84 80 00 */ addi r4, r4, -32768 +/* 8037C520 00379480 E0 63 00 00 */ psq_l f3, 0(r3), 0, qr0 +/* 8037C524 00379484 E0 43 00 08 */ psq_l f2, 8(r3), 0, qr0 +/* 8037C528 00379488 E0 23 00 10 */ psq_l f1, 16(r3), 0, qr0 +/* 8037C52C 0037948C E0 03 00 18 */ psq_l f0, 24(r3), 0, qr0 +/* 8037C530 00379490 F0 64 00 00 */ psq_st f3, 0(r4), 0, qr0 +/* 8037C534 00379494 F0 44 00 00 */ psq_st f2, 0(r4), 0, qr0 +/* 8037C538 00379498 F0 24 00 00 */ psq_st f1, 0(r4), 0, qr0 +/* 8037C53C 0037949C F0 04 00 00 */ psq_st f0, 0(r4), 0, qr0 +/* 8037C540 003794A0 4E 80 00 20 */ blr + +.global GXSetViewportJitter +GXSetViewportJitter: +/* 8037C544 003794A4 7C 08 02 A6 */ mflr r0 +/* 8037C548 003794A8 28 03 00 00 */ cmplwi r3, 0 +/* 8037C54C 003794AC 90 01 00 04 */ stw r0, 4(r1) +/* 8037C550 003794B0 94 21 FF A0 */ stwu r1, -0x60(r1) +/* 8037C554 003794B4 DB E1 00 58 */ stfd f31, 0x58(r1) +/* 8037C558 003794B8 DB C1 00 50 */ stfd f30, 0x50(r1) +/* 8037C55C 003794BC DB A1 00 48 */ stfd f29, 0x48(r1) +/* 8037C560 003794C0 DB 81 00 40 */ stfd f28, 0x40(r1) +/* 8037C564 003794C4 DB 61 00 38 */ stfd f27, 0x38(r1) +/* 8037C568 003794C8 DB 41 00 30 */ stfd f26, 0x30(r1) +/* 8037C56C 003794CC 40 82 00 0C */ bne lbl_8037C578 +/* 8037C570 003794D0 C0 02 CE C8 */ lfs f0, lbl_805AEBE8@sda21(r2) +/* 8037C574 003794D4 EC 42 00 28 */ fsubs f2, f2, f0 +lbl_8037C578: +/* 8037C578 003794D8 C1 62 CE C8 */ lfs f11, lbl_805AEBE8@sda21(r2) +/* 8037C57C 003794DC FD 40 20 50 */ fneg f10, f4 +/* 8037C580 003794E0 C0 02 CE D0 */ lfs f0, lbl_805AEBF0@sda21(r2) +/* 8037C584 003794E4 C1 22 CE CC */ lfs f9, lbl_805AEBEC@sda21(r2) +/* 8037C588 003794E8 EF E3 02 F2 */ fmuls f31, f3, f11 +/* 8037C58C 003794EC 80 62 CE 08 */ lwz r3, lbl_805AEB28@sda21(r2) +/* 8037C590 003794F0 EC E4 02 F2 */ fmuls f7, f4, f11 +/* 8037C594 003794F4 D0 23 04 3C */ stfs f1, 0x43c(r3) +/* 8037C598 003794F8 ED 01 F8 2A */ fadds f8, f1, f31 +/* 8037C59C 003794FC EF C0 01 B2 */ fmuls f30, f0, f6 +/* 8037C5A0 00379500 D0 43 04 40 */ stfs f2, 0x440(r3) +/* 8037C5A4 00379504 EC 22 38 2A */ fadds f1, f2, f7 +/* 8037C5A8 00379508 D0 63 04 44 */ stfs f3, 0x444(r3) +/* 8037C5AC 0037950C EC 00 01 72 */ fmuls f0, f0, f5 +/* 8037C5B0 00379510 EF AA 02 F2 */ fmuls f29, f10, f11 +/* 8037C5B4 00379514 D0 83 04 48 */ stfs f4, 0x448(r3) +/* 8037C5B8 00379518 EF 69 40 2A */ fadds f27, f9, f8 +/* 8037C5BC 0037951C D0 A3 04 4C */ stfs f5, 0x44c(r3) +/* 8037C5C0 00379520 EF 49 08 2A */ fadds f26, f9, f1 +/* 8037C5C4 00379524 EF 9E 00 28 */ fsubs f28, f30, f0 +/* 8037C5C8 00379528 D0 C3 04 50 */ stfs f6, 0x450(r3) +/* 8037C5CC 0037952C 88 03 04 54 */ lbz r0, 0x454(r3) +/* 8037C5D0 00379530 28 00 00 00 */ cmplwi r0, 0 +/* 8037C5D4 00379534 41 82 00 10 */ beq lbl_8037C5E4 +/* 8037C5D8 00379538 FC 20 28 90 */ fmr f1, f5 +/* 8037C5DC 0037953C C0 43 04 58 */ lfs f2, 0x458(r3) +/* 8037C5E0 00379540 4B FF FB F1 */ bl __GXSetRange +lbl_8037C5E4: +/* 8037C5E4 00379544 38 00 00 10 */ li r0, 0x10 +/* 8037C5E8 00379548 80 62 CE 08 */ lwz r3, lbl_805AEB28@sda21(r2) +/* 8037C5EC 0037954C 3C A0 CC 01 */ lis r5, 0xCC008000@ha +/* 8037C5F0 00379550 3C 80 00 05 */ lis r4, 0x0005101A@ha +/* 8037C5F4 00379554 98 05 80 00 */ stb r0, 0xCC008000@l(r5) +/* 8037C5F8 00379558 38 04 10 1A */ addi r0, r4, 0x0005101A@l +/* 8037C5FC 0037955C 90 05 80 00 */ stw r0, 0xCC008000@l(r5) +/* 8037C600 00379560 38 00 00 01 */ li r0, 1 +/* 8037C604 00379564 D3 E5 80 00 */ stfs f31, 0xCC008000@l(r5) +/* 8037C608 00379568 D3 A5 80 00 */ stfs f29, 0xCC008000@l(r5) +/* 8037C60C 0037956C D3 85 80 00 */ stfs f28, 0xCC008000@l(r5) +/* 8037C610 00379570 D3 65 80 00 */ stfs f27, 0xCC008000@l(r5) +/* 8037C614 00379574 D3 45 80 00 */ stfs f26, 0xCC008000@l(r5) +/* 8037C618 00379578 D3 C5 80 00 */ stfs f30, 0xCC008000@l(r5) +/* 8037C61C 0037957C B0 03 00 02 */ sth r0, 2(r3) +/* 8037C620 00379580 80 01 00 64 */ lwz r0, 0x64(r1) +/* 8037C624 00379584 CB E1 00 58 */ lfd f31, 0x58(r1) +/* 8037C628 00379588 CB C1 00 50 */ lfd f30, 0x50(r1) +/* 8037C62C 0037958C CB A1 00 48 */ lfd f29, 0x48(r1) +/* 8037C630 00379590 CB 81 00 40 */ lfd f28, 0x40(r1) +/* 8037C634 00379594 CB 61 00 38 */ lfd f27, 0x38(r1) +/* 8037C638 00379598 CB 41 00 30 */ lfd f26, 0x30(r1) +/* 8037C63C 0037959C 38 21 00 60 */ addi r1, r1, 0x60 +/* 8037C640 003795A0 7C 08 03 A6 */ mtlr r0 +/* 8037C644 003795A4 4E 80 00 20 */ blr + +.global GXSetViewport +GXSetViewport: +/* 8037C648 003795A8 7C 08 02 A6 */ mflr r0 +/* 8037C64C 003795AC 38 60 00 01 */ li r3, 1 +/* 8037C650 003795B0 90 01 00 04 */ stw r0, 4(r1) +/* 8037C654 003795B4 94 21 FF F8 */ stwu r1, -8(r1) +/* 8037C658 003795B8 4B FF FE ED */ bl GXSetViewportJitter +/* 8037C65C 003795BC 80 01 00 0C */ lwz r0, 0xc(r1) +/* 8037C660 003795C0 38 21 00 08 */ addi r1, r1, 8 +/* 8037C664 003795C4 7C 08 03 A6 */ mtlr r0 +/* 8037C668 003795C8 4E 80 00 20 */ blr + +.global GXSetScissor +GXSetScissor: +/* 8037C66C 003795CC 81 02 CE 08 */ lwz r8, lbl_805AEB28@sda21(r2) +/* 8037C670 003795D0 39 23 01 56 */ addi r9, r3, 0x156 +/* 8037C674 003795D4 39 44 01 56 */ addi r10, r4, 0x156 +/* 8037C678 003795D8 80 68 00 F8 */ lwz r3, 0xf8(r8) +/* 8037C67C 003795DC 38 05 FF FF */ addi r0, r5, -1 +/* 8037C680 003795E0 55 24 60 26 */ slwi r4, r9, 0xc +/* 8037C684 003795E4 54 63 00 28 */ rlwinm r3, r3, 0, 0, 0x14 +/* 8037C688 003795E8 7C 63 53 78 */ or r3, r3, r10 +/* 8037C68C 003795EC 90 68 00 F8 */ stw r3, 0xf8(r8) +/* 8037C690 003795F0 38 66 FF FF */ addi r3, r6, -1 +/* 8037C694 003795F4 7C CA 1A 14 */ add r6, r10, r3 +/* 8037C698 003795F8 80 A8 00 F8 */ lwz r5, 0xf8(r8) +/* 8037C69C 003795FC 7C 09 02 14 */ add r0, r9, r0 +/* 8037C6A0 00379600 54 A3 05 10 */ rlwinm r3, r5, 0, 0x14, 8 +/* 8037C6A4 00379604 7C 63 23 78 */ or r3, r3, r4 +/* 8037C6A8 00379608 90 68 00 F8 */ stw r3, 0xf8(r8) +/* 8037C6AC 0037960C 54 03 60 26 */ slwi r3, r0, 0xc +/* 8037C6B0 00379610 38 A0 00 61 */ li r5, 0x61 +/* 8037C6B4 00379614 80 E8 00 FC */ lwz r7, 0xfc(r8) +/* 8037C6B8 00379618 3C 80 CC 01 */ lis r4, 0xCC008000@ha +/* 8037C6BC 0037961C 38 00 00 00 */ li r0, 0 +/* 8037C6C0 00379620 54 E7 00 28 */ rlwinm r7, r7, 0, 0, 0x14 +/* 8037C6C4 00379624 7C E6 33 78 */ or r6, r7, r6 +/* 8037C6C8 00379628 90 C8 00 FC */ stw r6, 0xfc(r8) +/* 8037C6CC 0037962C 80 C8 00 FC */ lwz r6, 0xfc(r8) +/* 8037C6D0 00379630 54 C6 05 10 */ rlwinm r6, r6, 0, 0x14, 8 +/* 8037C6D4 00379634 7C C3 1B 78 */ or r3, r6, r3 +/* 8037C6D8 00379638 90 68 00 FC */ stw r3, 0xfc(r8) +/* 8037C6DC 0037963C 98 A4 80 00 */ stb r5, 0xCC008000@l(r4) +/* 8037C6E0 00379640 80 68 00 F8 */ lwz r3, 0xf8(r8) +/* 8037C6E4 00379644 90 64 80 00 */ stw r3, 0xCC008000@l(r4) +/* 8037C6E8 00379648 98 A4 80 00 */ stb r5, 0xCC008000@l(r4) +/* 8037C6EC 0037964C 80 68 00 FC */ lwz r3, 0xfc(r8) +/* 8037C6F0 00379650 90 64 80 00 */ stw r3, 0xCC008000@l(r4) +/* 8037C6F4 00379654 B0 08 00 02 */ sth r0, 2(r8) +/* 8037C6F8 00379658 4E 80 00 20 */ blr + +.global GXSetScissorBoxOffset +GXSetScissorBoxOffset: +/* 8037C6FC 0037965C 38 A3 01 56 */ addi r5, r3, 0x156 +/* 8037C700 00379660 80 62 CE 08 */ lwz r3, lbl_805AEB28@sda21(r2) +/* 8037C704 00379664 38 04 01 56 */ addi r0, r4, 0x156 +/* 8037C708 00379668 54 A4 F8 7E */ srwi r4, r5, 1 +/* 8037C70C 0037966C 54 84 05 96 */ rlwinm r4, r4, 0, 0x16, 0xb +/* 8037C710 00379670 54 00 48 2A */ rlwinm r0, r0, 9, 0, 0x15 +/* 8037C714 00379674 7C 80 03 78 */ or r0, r4, r0 +/* 8037C718 00379678 54 05 02 3E */ clrlwi r5, r0, 8 +/* 8037C71C 0037967C 38 00 00 61 */ li r0, 0x61 +/* 8037C720 00379680 3C 80 CC 01 */ lis r4, 0xCC008000@ha +/* 8037C724 00379684 98 04 80 00 */ stb r0, 0xCC008000@l(r4) +/* 8037C728 00379688 64 A5 59 00 */ oris r5, r5, 0x5900 +/* 8037C72C 0037968C 38 00 00 00 */ li r0, 0 +/* 8037C730 00379690 90 A4 80 00 */ stw r5, 0xCC008000@l(r4) +/* 8037C734 00379694 B0 03 00 02 */ sth r0, 2(r3) +/* 8037C738 00379698 4E 80 00 20 */ blr + +.global GXSetClipMode +GXSetClipMode: +/* 8037C73C 0037969C 38 00 00 10 */ li r0, 0x10 +/* 8037C740 003796A0 80 82 CE 08 */ lwz r4, lbl_805AEB28@sda21(r2) +/* 8037C744 003796A4 3C C0 CC 01 */ lis r6, 0xCC008000@ha +/* 8037C748 003796A8 98 06 80 00 */ stb r0, 0xCC008000@l(r6) +/* 8037C74C 003796AC 38 A0 10 05 */ li r5, 0x1005 +/* 8037C750 003796B0 38 00 00 01 */ li r0, 1 +/* 8037C754 003796B4 90 A6 80 00 */ stw r5, 0xCC008000@l(r6) +/* 8037C758 003796B8 90 66 80 00 */ stw r3, 0xCC008000@l(r6) +/* 8037C75C 003796BC B0 04 00 02 */ sth r0, 2(r4) +/* 8037C760 003796C0 4E 80 00 20 */ blr + +.global __GXSetMatrixIndex +__GXSetMatrixIndex: +/* 8037C764 003796C4 2C 03 00 05 */ cmpwi r3, 5 +/* 8037C768 003796C8 40 80 00 3C */ bge lbl_8037C7A4 +/* 8037C76C 003796CC 38 00 00 08 */ li r0, 8 +/* 8037C770 003796D0 80 82 CE 08 */ lwz r4, lbl_805AEB28@sda21(r2) +/* 8037C774 003796D4 3C A0 CC 01 */ lis r5, 0xCC008000@ha +/* 8037C778 003796D8 98 05 80 00 */ stb r0, 0xCC008000@l(r5) +/* 8037C77C 003796DC 38 00 00 30 */ li r0, 0x30 +/* 8037C780 003796E0 38 60 00 10 */ li r3, 0x10 +/* 8037C784 003796E4 98 05 80 00 */ stb r0, 0xCC008000@l(r5) +/* 8037C788 003796E8 38 00 10 18 */ li r0, 0x1018 +/* 8037C78C 003796EC 80 84 00 80 */ lwz r4, 0x80(r4) +/* 8037C790 003796F0 90 85 80 00 */ stw r4, 0xCC008000@l(r5) +/* 8037C794 003796F4 98 65 80 00 */ stb r3, 0xCC008000@l(r5) +/* 8037C798 003796F8 90 05 80 00 */ stw r0, 0xCC008000@l(r5) +/* 8037C79C 003796FC 90 85 80 00 */ stw r4, 0xCC008000@l(r5) +/* 8037C7A0 00379700 48 00 00 38 */ b lbl_8037C7D8 +lbl_8037C7A4: +/* 8037C7A4 00379704 38 00 00 08 */ li r0, 8 +/* 8037C7A8 00379708 80 82 CE 08 */ lwz r4, lbl_805AEB28@sda21(r2) +/* 8037C7AC 0037970C 3C A0 CC 01 */ lis r5, 0xCC008000@ha +/* 8037C7B0 00379710 98 05 80 00 */ stb r0, 0xCC008000@l(r5) +/* 8037C7B4 00379714 38 00 00 40 */ li r0, 0x40 +/* 8037C7B8 00379718 38 60 00 10 */ li r3, 0x10 +/* 8037C7BC 0037971C 98 05 80 00 */ stb r0, 0xCC008000@l(r5) +/* 8037C7C0 00379720 38 00 10 19 */ li r0, 0x1019 +/* 8037C7C4 00379724 80 84 00 84 */ lwz r4, 0x84(r4) +/* 8037C7C8 00379728 90 85 80 00 */ stw r4, 0xCC008000@l(r5) +/* 8037C7CC 0037972C 98 65 80 00 */ stb r3, 0xCC008000@l(r5) +/* 8037C7D0 00379730 90 05 80 00 */ stw r0, 0xCC008000@l(r5) +/* 8037C7D4 00379734 90 85 80 00 */ stw r4, 0xCC008000@l(r5) +lbl_8037C7D8: +/* 8037C7D8 00379738 80 62 CE 08 */ lwz r3, lbl_805AEB28@sda21(r2) +/* 8037C7DC 0037973C 38 00 00 01 */ li r0, 1 +/* 8037C7E0 00379740 B0 03 00 02 */ sth r0, 2(r3) +/* 8037C7E4 00379744 4E 80 00 20 */ blr + diff --git a/asm/Dolphin/OS/OS.s b/asm/Dolphin/OS/OS.s new file mode 100644 index 00000000..f34ea8d6 --- /dev/null +++ b/asm/Dolphin/OS/OS.s @@ -0,0 +1,692 @@ +.include "macros.inc" + +.section .text, "ax" + +.global OSGetConsoleType +OSGetConsoleType: +/* 8037D71C 0037A67C 80 6D AC C0 */ lwz r3, lbl_805A9880@sda21(r13) +/* 8037D720 0037A680 28 03 00 00 */ cmplwi r3, 0 +/* 8037D724 0037A684 41 82 00 10 */ beq lbl_8037D734 +/* 8037D728 0037A688 80 63 00 2C */ lwz r3, 0x2c(r3) +/* 8037D72C 0037A68C 28 03 00 00 */ cmplwi r3, 0 +/* 8037D730 0037A690 40 82 00 10 */ bne lbl_8037D740 +lbl_8037D734: +/* 8037D734 0037A694 3C 60 10 00 */ lis r3, 0x10000002@ha +/* 8037D738 0037A698 38 63 00 02 */ addi r3, r3, 0x10000002@l +/* 8037D73C 0037A69C 48 00 00 04 */ b lbl_8037D740 +lbl_8037D740: +/* 8037D740 0037A6A0 4E 80 00 20 */ blr + +.global ClearArena +ClearArena: +/* 8037D744 0037A6A4 7C 08 02 A6 */ mflr r0 +/* 8037D748 0037A6A8 90 01 00 04 */ stw r0, 4(r1) +/* 8037D74C 0037A6AC 94 21 FF F0 */ stwu r1, -0x10(r1) +/* 8037D750 0037A6B0 93 E1 00 0C */ stw r31, 0xc(r1) +/* 8037D754 0037A6B4 48 00 5D 19 */ bl OSGetResetCode +/* 8037D758 0037A6B8 3C 03 80 00 */ addis r0, r3, 0x8000 +/* 8037D75C 0037A6BC 28 00 00 00 */ cmplwi r0, 0 +/* 8037D760 0037A6C0 41 82 00 34 */ beq lbl_8037D794 +/* 8037D764 0037A6C4 38 00 00 00 */ li r0, 0 +/* 8037D768 0037A6C8 90 0D AC DC */ stw r0, lbl_805A989C@sda21(r13) +/* 8037D76C 0037A6CC 90 0D AC D8 */ stw r0, lbl_805A9898@sda21(r13) +/* 8037D770 0037A6D0 48 00 10 21 */ bl OSGetArenaHi +/* 8037D774 0037A6D4 7C 7F 1B 78 */ mr r31, r3 +/* 8037D778 0037A6D8 48 00 10 21 */ bl OSGetArenaLo +/* 8037D77C 0037A6DC 7F E3 F8 50 */ subf r31, r3, r31 +/* 8037D780 0037A6E0 48 00 10 19 */ bl OSGetArenaLo +/* 8037D784 0037A6E4 7F E5 FB 78 */ mr r5, r31 +/* 8037D788 0037A6E8 38 80 00 00 */ li r4, 0 +/* 8037D78C 0037A6EC 4B C8 5C 1D */ bl memset +/* 8037D790 0037A6F0 48 00 00 C8 */ b lbl_8037D858 +lbl_8037D794: +/* 8037D794 0037A6F4 3C 80 81 30 */ lis r4, 0x812FDFF0@ha +/* 8037D798 0037A6F8 80 64 DF F0 */ lwz r3, 0x812FDFF0@l(r4) +/* 8037D79C 0037A6FC 80 04 DF EC */ lwz r0, -0x2014(r4) +/* 8037D7A0 0037A700 28 03 00 00 */ cmplwi r3, 0 +/* 8037D7A4 0037A704 90 6D AC DC */ stw r3, lbl_805A989C@sda21(r13) +/* 8037D7A8 0037A708 90 0D AC D8 */ stw r0, lbl_805A9898@sda21(r13) +/* 8037D7AC 0037A70C 40 82 00 28 */ bne lbl_8037D7D4 +/* 8037D7B0 0037A710 48 00 0F E1 */ bl OSGetArenaHi +/* 8037D7B4 0037A714 7C 7F 1B 78 */ mr r31, r3 +/* 8037D7B8 0037A718 48 00 0F E1 */ bl OSGetArenaLo +/* 8037D7BC 0037A71C 7F E3 F8 50 */ subf r31, r3, r31 +/* 8037D7C0 0037A720 48 00 0F D9 */ bl OSGetArenaLo +/* 8037D7C4 0037A724 7F E5 FB 78 */ mr r5, r31 +/* 8037D7C8 0037A728 38 80 00 00 */ li r4, 0 +/* 8037D7CC 0037A72C 4B C8 5B DD */ bl memset +/* 8037D7D0 0037A730 48 00 00 88 */ b lbl_8037D858 +lbl_8037D7D4: +/* 8037D7D4 0037A734 48 00 0F C5 */ bl OSGetArenaLo +/* 8037D7D8 0037A738 80 0D AC DC */ lwz r0, lbl_805A989C@sda21(r13) +/* 8037D7DC 0037A73C 7C 03 00 40 */ cmplw r3, r0 +/* 8037D7E0 0037A740 40 80 00 78 */ bge lbl_8037D858 +/* 8037D7E4 0037A744 48 00 0F AD */ bl OSGetArenaHi +/* 8037D7E8 0037A748 80 0D AC DC */ lwz r0, lbl_805A989C@sda21(r13) +/* 8037D7EC 0037A74C 7C 03 00 40 */ cmplw r3, r0 +/* 8037D7F0 0037A750 41 81 00 28 */ bgt lbl_8037D818 +/* 8037D7F4 0037A754 48 00 0F 9D */ bl OSGetArenaHi +/* 8037D7F8 0037A758 7C 7F 1B 78 */ mr r31, r3 +/* 8037D7FC 0037A75C 48 00 0F 9D */ bl OSGetArenaLo +/* 8037D800 0037A760 7F E3 F8 50 */ subf r31, r3, r31 +/* 8037D804 0037A764 48 00 0F 95 */ bl OSGetArenaLo +/* 8037D808 0037A768 7F E5 FB 78 */ mr r5, r31 +/* 8037D80C 0037A76C 38 80 00 00 */ li r4, 0 +/* 8037D810 0037A770 4B C8 5B 99 */ bl memset +/* 8037D814 0037A774 48 00 00 44 */ b lbl_8037D858 +lbl_8037D818: +/* 8037D818 0037A778 48 00 0F 81 */ bl OSGetArenaLo +/* 8037D81C 0037A77C 80 0D AC DC */ lwz r0, lbl_805A989C@sda21(r13) +/* 8037D820 0037A780 7F E3 00 50 */ subf r31, r3, r0 +/* 8037D824 0037A784 48 00 0F 75 */ bl OSGetArenaLo +/* 8037D828 0037A788 7F E5 FB 78 */ mr r5, r31 +/* 8037D82C 0037A78C 38 80 00 00 */ li r4, 0 +/* 8037D830 0037A790 4B C8 5B 79 */ bl memset +/* 8037D834 0037A794 48 00 0F 5D */ bl OSGetArenaHi +/* 8037D838 0037A798 83 ED AC D8 */ lwz r31, lbl_805A9898@sda21(r13) +/* 8037D83C 0037A79C 7C 03 F8 40 */ cmplw r3, r31 +/* 8037D840 0037A7A0 40 81 00 18 */ ble lbl_8037D858 +/* 8037D844 0037A7A4 48 00 0F 4D */ bl OSGetArenaHi +/* 8037D848 0037A7A8 7C BF 18 50 */ subf r5, r31, r3 +/* 8037D84C 0037A7AC 7F E3 FB 78 */ mr r3, r31 +/* 8037D850 0037A7B0 38 80 00 00 */ li r4, 0 +/* 8037D854 0037A7B4 4B C8 5B 55 */ bl memset +lbl_8037D858: +/* 8037D858 0037A7B8 80 01 00 14 */ lwz r0, 0x14(r1) +/* 8037D85C 0037A7BC 83 E1 00 0C */ lwz r31, 0xc(r1) +/* 8037D860 0037A7C0 38 21 00 10 */ addi r1, r1, 0x10 +/* 8037D864 0037A7C4 7C 08 03 A6 */ mtlr r0 +/* 8037D868 0037A7C8 4E 80 00 20 */ blr + +.global sub_8037d86c +sub_8037d86c: +/* 8037D86C 0037A7CC 80 04 00 0C */ lwz r0, 0xc(r4) +/* 8037D870 0037A7D0 2C 00 00 00 */ cmpwi r0, 0 +/* 8037D874 0037A7D4 41 82 00 08 */ beq lbl_8037D87C +/* 8037D878 0037A7D8 48 00 00 20 */ b lbl_8037D898 +lbl_8037D87C: +/* 8037D87C 0037A7DC 3C 60 80 54 */ lis r3, lbl_80541200@ha +/* 8037D880 0037A7E0 38 63 12 00 */ addi r3, r3, lbl_80541200@l +/* 8037D884 0037A7E4 A0 03 00 02 */ lhz r0, 2(r3) +/* 8037D888 0037A7E8 3C 60 80 00 */ lis r3, 0x800030E6@ha +/* 8037D88C 0037A7EC 60 00 80 00 */ ori r0, r0, 0x8000 +/* 8037D890 0037A7F0 B0 03 30 E6 */ sth r0, 0x800030E6@l(r3) +/* 8037D894 0037A7F4 48 00 00 10 */ b lbl_8037d8a4 +lbl_8037D898: +/* 8037D898 0037A7F8 38 00 00 01 */ li r0, 1 +/* 8037D89C 0037A7FC 3C 60 80 00 */ lis r3, 0x800030E6@ha +/* 8037D8A0 0037A800 B0 03 30 E6 */ sth r0, 0x800030E6@l(r3) +lbl_8037d8a4: +/* 8037D8A4 0037A804 4E 80 00 20 */ blr + +.global OSInit +OSInit: +/* 8037D8A8 0037A808 7C 08 02 A6 */ mflr r0 +/* 8037D8AC 0037A80C 90 01 00 04 */ stw r0, 4(r1) +/* 8037D8B0 0037A810 94 21 FF E8 */ stwu r1, -0x18(r1) +/* 8037D8B4 0037A814 93 E1 00 14 */ stw r31, 0x14(r1) +/* 8037D8B8 0037A818 93 C1 00 10 */ stw r30, 0x10(r1) +/* 8037D8BC 0037A81C 93 A1 00 0C */ stw r29, 0xc(r1) +/* 8037D8C0 0037A820 80 0D AC D0 */ lwz r0, lbl_805A9890@sda21(r13) +/* 8037D8C4 0037A824 3C 60 80 54 */ lis r3, lbl_80541200@ha +/* 8037D8C8 0037A828 3B C3 12 00 */ addi r30, r3, lbl_80541200@l +/* 8037D8CC 0037A82C 2C 00 00 00 */ cmpwi r0, 0 +/* 8037D8D0 0037A830 3C 60 80 3F */ lis r3, lbl_803F0DA0@ha +/* 8037D8D4 0037A834 3B E3 0D A0 */ addi r31, r3, lbl_803F0DA0@l +/* 8037D8D8 0037A838 40 82 03 2C */ bne lbl_8037DC04 +/* 8037D8DC 0037A83C 38 00 00 01 */ li r0, 1 +/* 8037D8E0 0037A840 90 0D AC D0 */ stw r0, lbl_805A9890@sda21(r13) +/* 8037D8E4 0037A844 48 00 7A E5 */ bl __OSGetSystemTime +/* 8037D8E8 0037A848 90 8D AC EC */ stw r4, lbl_805A98AC@sda21(r13) +/* 8037D8EC 0037A84C 90 6D AC E8 */ stw r3, lbl_805A98A8@sda21(r13) +/* 8037D8F0 0037A850 48 00 3D 71 */ bl OSDisableInterrupts +/* 8037D8F4 0037A854 4B FF 1F A1 */ bl PPCDisableSpeculation +/* 8037D8F8 0037A858 4B FF 1F CD */ bl PPCSetFpNonIEEEMode +/* 8037D8FC 0037A85C 38 00 00 00 */ li r0, 0 +/* 8037D900 0037A860 3C 80 80 00 */ lis r4, 0x800000F4@ha +/* 8037D904 0037A864 90 0D AC C4 */ stw r0, lbl_805A9884@sda21(r13) +/* 8037D908 0037A868 90 8D AC C0 */ stw r4, lbl_805A9880@sda21(r13) +/* 8037D90C 0037A86C 90 0D AC 04 */ stw r0, lbl_805A97C4@sda21(r13) +/* 8037D910 0037A870 80 64 00 F4 */ lwz r3, 0x800000F4@l(r4) +/* 8037D914 0037A874 28 03 00 00 */ cmplwi r3, 0 +/* 8037D918 0037A878 41 82 00 34 */ beq lbl_8037D94C +/* 8037D91C 0037A87C 38 03 00 0C */ addi r0, r3, 0xc +/* 8037D920 0037A880 90 0D AC C4 */ stw r0, lbl_805A9884@sda21(r13) +/* 8037D924 0037A884 80 03 00 24 */ lwz r0, 0x24(r3) +/* 8037D928 0037A888 80 6D AC C4 */ lwz r3, lbl_805A9884@sda21(r13) +/* 8037D92C 0037A88C 90 0D AD 94 */ stw r0, lbl_805A9954@sda21(r13) +/* 8037D930 0037A890 80 03 00 00 */ lwz r0, 0(r3) +/* 8037D934 0037A894 54 00 06 3E */ clrlwi r0, r0, 0x18 +/* 8037D938 0037A898 98 04 30 E8 */ stb r0, 0x30e8(r4) +/* 8037D93C 0037A89C 80 0D AD 94 */ lwz r0, lbl_805A9954@sda21(r13) +/* 8037D940 0037A8A0 54 00 06 3E */ clrlwi r0, r0, 0x18 +/* 8037D944 0037A8A4 98 04 30 E9 */ stb r0, 0x30e9(r4) +/* 8037D948 0037A8A8 48 00 00 28 */ b lbl_8037D970 +lbl_8037D94C: +/* 8037D94C 0037A8AC 80 04 00 34 */ lwz r0, 0x34(r4) +/* 8037D950 0037A8B0 28 00 00 00 */ cmplwi r0, 0 +/* 8037D954 0037A8B4 41 82 00 1C */ beq lbl_8037D970 +/* 8037D958 0037A8B8 88 64 30 E8 */ lbz r3, 0x30e8(r4) +/* 8037D95C 0037A8BC 38 0D AC C8 */ addi r0, r13, lbl_805A9888@sda21 +/* 8037D960 0037A8C0 90 6D AC C8 */ stw r3, lbl_805A9888@sda21(r13) +/* 8037D964 0037A8C4 90 0D AC C4 */ stw r0, lbl_805A9884@sda21(r13) +/* 8037D968 0037A8C8 88 04 30 E9 */ lbz r0, 0x30e9(r4) +/* 8037D96C 0037A8CC 90 0D AD 94 */ stw r0, lbl_805A9954@sda21(r13) +lbl_8037D970: +/* 8037D970 0037A8D0 38 00 00 01 */ li r0, 1 +/* 8037D974 0037A8D4 80 6D AC C0 */ lwz r3, lbl_805A9880@sda21(r13) +/* 8037D978 0037A8D8 90 0D AC 04 */ stw r0, lbl_805A97C4@sda21(r13) +/* 8037D97C 0037A8DC 80 63 00 30 */ lwz r3, 0x30(r3) +/* 8037D980 0037A8E0 28 03 00 00 */ cmplwi r3, 0 +/* 8037D984 0037A8E4 40 82 00 10 */ bne lbl_8037D994 +/* 8037D988 0037A8E8 3C 60 80 5C */ lis r3, 0x805C20E0@ha +/* 8037D98C 0037A8EC 38 63 20 E0 */ addi r3, r3, 0x805C20E0@l +/* 8037D990 0037A8F0 48 00 00 04 */ b lbl_8037D994 +lbl_8037D994: +/* 8037D994 0037A8F4 48 00 0E 15 */ bl OSSetArenaLo +/* 8037D998 0037A8F8 80 6D AC C0 */ lwz r3, lbl_805A9880@sda21(r13) +/* 8037D99C 0037A8FC 80 03 00 30 */ lwz r0, 0x30(r3) +/* 8037D9A0 0037A900 28 00 00 00 */ cmplwi r0, 0 +/* 8037D9A4 0037A904 40 82 00 30 */ bne lbl_8037D9D4 +/* 8037D9A8 0037A908 80 6D AC C4 */ lwz r3, lbl_805A9884@sda21(r13) +/* 8037D9AC 0037A90C 28 03 00 00 */ cmplwi r3, 0 +/* 8037D9B0 0037A910 41 82 00 24 */ beq lbl_8037D9D4 +/* 8037D9B4 0037A914 80 03 00 00 */ lwz r0, 0(r3) +/* 8037D9B8 0037A918 28 00 00 02 */ cmplwi r0, 2 +/* 8037D9BC 0037A91C 40 80 00 18 */ bge lbl_8037D9D4 +/* 8037D9C0 0037A920 3C 60 80 5C */ lis r3, 0x805C00C8@ha +/* 8037D9C4 0037A924 38 63 00 C8 */ addi r3, r3, 0x805C00C8@l +/* 8037D9C8 0037A928 38 03 00 1F */ addi r0, r3, 0x1f +/* 8037D9CC 0037A92C 54 03 00 34 */ rlwinm r3, r0, 0, 0, 0x1a +/* 8037D9D0 0037A930 48 00 0D D9 */ bl OSSetArenaLo +lbl_8037D9D4: +/* 8037D9D4 0037A934 80 6D AC C0 */ lwz r3, lbl_805A9880@sda21(r13) +/* 8037D9D8 0037A938 80 63 00 34 */ lwz r3, 0x34(r3) +/* 8037D9DC 0037A93C 28 03 00 00 */ cmplwi r3, 0 +/* 8037D9E0 0037A940 40 82 00 10 */ bne lbl_8037D9F0 +/* 8037D9E4 0037A944 3C 60 81 70 */ lis r3, 0x81700000@ha +/* 8037D9E8 0037A948 38 63 00 00 */ addi r3, r3, 0x81700000@l +/* 8037D9EC 0037A94C 48 00 00 04 */ b lbl_8037D9F0 +lbl_8037D9F0: +/* 8037D9F0 0037A950 48 00 0D B1 */ bl OSSetArenaHi +/* 8037D9F4 0037A954 48 00 02 2D */ bl OSExceptionInit +/* 8037D9F8 0037A958 48 00 6A 0D */ bl __OSInitSystemCall +/* 8037D9FC 0037A95C 48 00 06 69 */ bl OSInitAlarm +/* 8037DA00 0037A960 48 00 4D F9 */ bl __OSModuleInit +/* 8037DA04 0037A964 48 00 3C D9 */ bl __OSInterruptInit +/* 8037DA08 0037A968 3C 60 80 38 */ lis r3, __OSResetSWInterruptHandler@ha +/* 8037DA0C 0037A96C 38 83 34 9C */ addi r4, r3, __OSResetSWInterruptHandler@l +/* 8037DA10 0037A970 38 60 00 16 */ li r3, 0x16 +/* 8037DA14 0037A974 48 00 3C 99 */ bl __OSSetInterruptHandler +/* 8037DA18 0037A978 48 00 1F 4D */ bl __OSContextInit +/* 8037DA1C 0037A97C 48 00 16 B9 */ bl __OSCacheInit +/* 8037DA20 0037A980 48 04 38 29 */ bl sub_803c1248 +/* 8037DA24 0037A984 48 04 15 7D */ bl SIInit +/* 8037DA28 0037A988 48 00 5F 79 */ bl sub_803839a0 +/* 8037DA2C 0037A98C 48 00 6A 41 */ bl __OSThreadInit +/* 8037DA30 0037A990 48 00 0D AD */ bl __OSInitAudioSystem +/* 8037DA34 0037A994 4B FF 1E 3D */ bl PPCMfhid2 +/* 8037DA38 0037A998 54 63 00 80 */ rlwinm r3, r3, 0, 2, 0 +/* 8037DA3C 0037A99C 4B FF 1E 3D */ bl PPCMthid2 +/* 8037DA40 0037A9A0 80 0D AC E0 */ lwz r0, lbl_805A98A0@sda21(r13) +/* 8037DA44 0037A9A4 2C 00 00 00 */ cmpwi r0, 0 +/* 8037DA48 0037A9A8 40 82 00 08 */ bne lbl_8037DA50 +/* 8037DA4C 0037A9AC 48 00 52 4D */ bl __OSInitMemoryProtection +lbl_8037DA50: +/* 8037DA50 0037A9B0 38 7F 00 44 */ addi r3, r31, 0x44 +/* 8037DA54 0037A9B4 4C C6 31 82 */ crclr 6 +/* 8037DA58 0037A9B8 48 00 1F 55 */ bl OSReport +/* 8037DA5C 0037A9BC 38 7F 00 64 */ addi r3, r31, 0x64 +/* 8037DA60 0037A9C0 4C C6 31 82 */ crclr 6 +/* 8037DA64 0037A9C4 38 9F 00 7C */ addi r4, r31, 0x7c +/* 8037DA68 0037A9C8 38 BF 00 88 */ addi r5, r31, 0x88 +/* 8037DA6C 0037A9CC 48 00 1F 41 */ bl OSReport +/* 8037DA70 0037A9D0 38 7F 00 94 */ addi r3, r31, 0x94 +/* 8037DA74 0037A9D4 4C C6 31 82 */ crclr 6 +/* 8037DA78 0037A9D8 48 00 1F 35 */ bl OSReport +/* 8037DA7C 0037A9DC 80 6D AC C0 */ lwz r3, lbl_805A9880@sda21(r13) +/* 8037DA80 0037A9E0 28 03 00 00 */ cmplwi r3, 0 +/* 8037DA84 0037A9E4 41 82 00 10 */ beq lbl_8037DA94 +/* 8037DA88 0037A9E8 80 83 00 2C */ lwz r4, 0x2c(r3) +/* 8037DA8C 0037A9EC 28 04 00 00 */ cmplwi r4, 0 +/* 8037DA90 0037A9F0 40 82 00 10 */ bne lbl_8037DAA0 +lbl_8037DA94: +/* 8037DA94 0037A9F4 3C 60 10 00 */ lis r3, 0x10000002@ha +/* 8037DA98 0037A9F8 38 83 00 02 */ addi r4, r3, 0x10000002@l +/* 8037DA9C 0037A9FC 48 00 00 04 */ b lbl_8037DAA0 +lbl_8037DAA0: +/* 8037DAA0 0037AA00 54 80 00 1E */ rlwinm r0, r4, 0, 0, 0xf +/* 8037DAA4 0037AA04 2C 00 00 00 */ cmpwi r0, 0 +/* 8037DAA8 0037AA08 41 82 00 08 */ beq lbl_8037DAB0 +/* 8037DAAC 0037AA0C 48 00 00 14 */ b lbl_8037DAC0 +lbl_8037DAB0: +/* 8037DAB0 0037AA10 4C C6 31 82 */ crclr 6 +/* 8037DAB4 0037AA14 38 7F 00 A4 */ addi r3, r31, 0xa4 +/* 8037DAB8 0037AA18 48 00 1E F5 */ bl OSReport +/* 8037DABC 0037AA1C 48 00 00 94 */ b lbl_8037DB50 +lbl_8037DAC0: +/* 8037DAC0 0037AA20 3C 60 10 00 */ lis r3, 0x10000002@ha +/* 8037DAC4 0037AA24 54 85 04 3E */ clrlwi r5, r4, 0x10 +/* 8037DAC8 0037AA28 38 03 00 02 */ addi r0, r3, 0x10000002@l +/* 8037DACC 0037AA2C 7C 05 00 00 */ cmpw r5, r0 +/* 8037DAD0 0037AA30 41 82 00 48 */ beq lbl_8037DB18 +/* 8037DAD4 0037AA34 40 80 00 14 */ bge lbl_8037DAE8 +/* 8037DAD8 0037AA38 7C 05 18 00 */ cmpw r5, r3 +/* 8037DADC 0037AA3C 41 82 00 1C */ beq lbl_8037DAF8 +/* 8037DAE0 0037AA40 40 80 00 28 */ bge lbl_8037DB08 +/* 8037DAE4 0037AA44 48 00 00 54 */ b lbl_8037DB38 +lbl_8037DAE8: +/* 8037DAE8 0037AA48 38 03 00 04 */ addi r0, r3, 4 +/* 8037DAEC 0037AA4C 7C 05 00 00 */ cmpw r5, r0 +/* 8037DAF0 0037AA50 40 80 00 48 */ bge lbl_8037DB38 +/* 8037DAF4 0037AA54 48 00 00 34 */ b lbl_8037DB28 +lbl_8037DAF8: +/* 8037DAF8 0037AA58 38 7F 00 B0 */ addi r3, r31, 0xb0 +/* 8037DAFC 0037AA5C 4C C6 31 82 */ crclr 6 +/* 8037DB00 0037AA60 48 00 1E AD */ bl OSReport +/* 8037DB04 0037AA64 48 00 00 4C */ b lbl_8037DB50 +lbl_8037DB08: +/* 8037DB08 0037AA68 38 7F 00 C0 */ addi r3, r31, 0xc0 +/* 8037DB0C 0037AA6C 4C C6 31 82 */ crclr 6 +/* 8037DB10 0037AA70 48 00 1E 9D */ bl OSReport +/* 8037DB14 0037AA74 48 00 00 3C */ b lbl_8037DB50 +lbl_8037DB18: +/* 8037DB18 0037AA78 38 7F 00 D0 */ addi r3, r31, 0xd0 +/* 8037DB1C 0037AA7C 4C C6 31 82 */ crclr 6 +/* 8037DB20 0037AA80 48 00 1E 8D */ bl OSReport +/* 8037DB24 0037AA84 48 00 00 2C */ b lbl_8037DB50 +lbl_8037DB28: +/* 8037DB28 0037AA88 38 7F 00 E0 */ addi r3, r31, 0xe0 +/* 8037DB2C 0037AA8C 4C C6 31 82 */ crclr 6 +/* 8037DB30 0037AA90 48 00 1E 7D */ bl OSReport +/* 8037DB34 0037AA94 48 00 00 1C */ b lbl_8037DB50 +lbl_8037DB38: +/* 8037DB38 0037AA98 54 86 04 3E */ clrlwi r6, r4, 0x10 +/* 8037DB3C 0037AA9C 4C C6 31 82 */ crclr 6 +/* 8037DB40 0037AAA0 7C 85 23 78 */ mr r5, r4 +/* 8037DB44 0037AAA4 38 7F 00 F0 */ addi r3, r31, 0xf0 +/* 8037DB48 0037AAA8 38 86 FF FD */ addi r4, r6, -3 +/* 8037DB4C 0037AAAC 48 00 1E 61 */ bl OSReport +lbl_8037DB50: +/* 8037DB50 0037AAB0 80 8D AC C0 */ lwz r4, lbl_805A9880@sda21(r13) +/* 8037DB54 0037AAB4 38 7F 01 0C */ addi r3, r31, 0x10c +/* 8037DB58 0037AAB8 4C C6 31 82 */ crclr 6 +/* 8037DB5C 0037AABC 80 04 00 28 */ lwz r0, 0x28(r4) +/* 8037DB60 0037AAC0 54 04 65 3E */ srwi r4, r0, 0x14 +/* 8037DB64 0037AAC4 48 00 1E 49 */ bl OSReport +/* 8037DB68 0037AAC8 48 00 0C 29 */ bl OSGetArenaHi +/* 8037DB6C 0037AACC 7C 7D 1B 78 */ mr r29, r3 +/* 8037DB70 0037AAD0 48 00 0C 29 */ bl OSGetArenaLo +/* 8037DB74 0037AAD4 7C 64 1B 78 */ mr r4, r3 +/* 8037DB78 0037AAD8 4C C6 31 82 */ crclr 6 +/* 8037DB7C 0037AADC 7F A5 EB 78 */ mr r5, r29 +/* 8037DB80 0037AAE0 38 7F 01 1C */ addi r3, r31, 0x11c +/* 8037DB84 0037AAE4 48 00 1E 29 */ bl OSReport +/* 8037DB88 0037AAE8 80 6D 9F 68 */ lwz r3, lbl_805A8B28@sda21(r13) +/* 8037DB8C 0037AAEC 48 00 04 AD */ bl OSRegisterVersion +/* 8037DB90 0037AAF0 80 6D AC C4 */ lwz r3, lbl_805A9884@sda21(r13) +/* 8037DB94 0037AAF4 28 03 00 00 */ cmplwi r3, 0 +/* 8037DB98 0037AAF8 41 82 00 14 */ beq lbl_8037DBAC +/* 8037DB9C 0037AAFC 80 03 00 00 */ lwz r0, 0(r3) +/* 8037DBA0 0037AB00 28 00 00 02 */ cmplwi r0, 2 +/* 8037DBA4 0037AB04 41 80 00 08 */ blt lbl_8037DBAC +/* 8037DBA8 0037AB08 4B C8 5A 99 */ bl EnableMetroTRKInterrupts +lbl_8037DBAC: +/* 8037DBAC 0037AB0C 4B FF FB 99 */ bl ClearArena +/* 8037DBB0 0037AB10 48 00 3A C5 */ bl OSEnableInterrupts +/* 8037DBB4 0037AB14 80 0D AC E0 */ lwz r0, lbl_805A98A0@sda21(r13) +/* 8037DBB8 0037AB18 2C 00 00 00 */ cmpwi r0, 0 +/* 8037DBBC 0037AB1C 40 82 00 48 */ bne lbl_8037DC04 +/* 8037DBC0 0037AB20 4B FF 3F E5 */ bl DVDInit +/* 8037DBC4 0037AB24 80 0D AC CC */ lwz r0, lbl_805A988C@sda21(r13) +/* 8037DBC8 0037AB28 2C 00 00 00 */ cmpwi r0, 0 +/* 8037DBCC 0037AB2C 41 82 00 18 */ beq lbl_8037DBE4 +/* 8037DBD0 0037AB30 3C 60 00 01 */ lis r3, 0x00009000@ha +/* 8037DBD4 0037AB34 38 03 90 00 */ addi r0, r3, 0x00009000@l +/* 8037DBD8 0037AB38 3C 60 80 00 */ lis r3, 0x800030E6@ha +/* 8037DBDC 0037AB3C B0 03 30 E6 */ sth r0, 0x800030E6@l(r3) +/* 8037DBE0 0037AB40 48 00 00 24 */ b lbl_8037DC04 +lbl_8037DBE4: +/* 8037DBE4 0037AB44 7F C3 F3 78 */ mr r3, r30 +/* 8037DBE8 0037AB48 38 80 00 20 */ li r4, 0x20 +/* 8037DBEC 0037AB4C 48 00 0E 99 */ bl DCInvalidateRange +/* 8037DBF0 0037AB50 3C 60 80 38 */ lis r3, sub_8037d86c@ha +/* 8037DBF4 0037AB54 38 A3 D8 6C */ addi r5, r3, sub_8037d86c@l +/* 8037DBF8 0037AB58 7F C4 F3 78 */ mr r4, r30 +/* 8037DBFC 0037AB5C 38 7E 00 20 */ addi r3, r30, 0x20 +/* 8037DC00 0037AB60 4B FF 63 F1 */ bl DVDInquiryAsync +lbl_8037DC04: +/* 8037DC04 0037AB64 80 01 00 1C */ lwz r0, 0x1c(r1) +/* 8037DC08 0037AB68 83 E1 00 14 */ lwz r31, 0x14(r1) +/* 8037DC0C 0037AB6C 83 C1 00 10 */ lwz r30, 0x10(r1) +/* 8037DC10 0037AB70 83 A1 00 0C */ lwz r29, 0xc(r1) +/* 8037DC14 0037AB74 38 21 00 18 */ addi r1, r1, 0x18 +/* 8037DC18 0037AB78 7C 08 03 A6 */ mtlr r0 +/* 8037DC1C 0037AB7C 4E 80 00 20 */ blr + +.global OSExceptionInit +OSExceptionInit: +/* 8037DC20 0037AB80 7C 08 02 A6 */ mflr r0 +/* 8037DC24 0037AB84 90 01 00 04 */ stw r0, 4(r1) +/* 8037DC28 0037AB88 94 21 FF C8 */ stwu r1, -0x38(r1) +/* 8037DC2C 0037AB8C BE 81 00 08 */ stmw r20, 8(r1) +/* 8037DC30 0037AB90 3C 60 80 00 */ lis r3, 0x80000060@ha +/* 8037DC34 0037AB94 80 03 00 60 */ lwz r0, 0x80000060@l(r3) +/* 8037DC38 0037AB98 3C 80 80 38 */ lis r4, lbl_8037DF60@ha +/* 8037DC3C 0037AB9C 3B C4 DF 60 */ addi r30, r4, lbl_8037DF60@l +/* 8037DC40 0037ABA0 3C A0 80 38 */ lis r5, sub_8037def8@ha +/* 8037DC44 0037ABA4 83 3E 00 00 */ lwz r25, 0(r30) +/* 8037DC48 0037ABA8 3C 80 80 38 */ lis r4, lbl_8037DF90@ha +/* 8037DC4C 0037ABAC 38 A5 DE F8 */ addi r5, r5, sub_8037def8@l +/* 8037DC50 0037ABB0 38 84 DF 90 */ addi r4, r4, lbl_8037DF90@l +/* 8037DC54 0037ABB4 3C C0 80 3F */ lis r6, lbl_803F0DA0@ha +/* 8037DC58 0037ABB8 28 00 00 00 */ cmplwi r0, 0 +/* 8037DC5C 0037ABBC 7C B8 2B 78 */ mr r24, r5 +/* 8037DC60 0037ABC0 3B A6 0D A0 */ addi r29, r6, lbl_803F0DA0@l +/* 8037DC64 0037ABC4 7E E5 20 50 */ subf r23, r5, r4 +/* 8037DC68 0037ABC8 3A 83 00 60 */ addi r20, r3, 0x60 +/* 8037DC6C 0037ABCC 40 82 00 4C */ bne lbl_8037DCB8 +/* 8037DC70 0037ABD0 38 7D 01 70 */ addi r3, r29, 0x170 +/* 8037DC74 0037ABD4 4C C6 31 82 */ crclr 6 +/* 8037DC78 0037ABD8 4B FF 1C F1 */ bl DBPrintf +/* 8037DC7C 0037ABDC 3C 80 80 38 */ lis r4, __OSDBIntegrator@ha +/* 8037DC80 0037ABE0 3C 60 80 38 */ lis r3, sub_8037dec4@ha +/* 8037DC84 0037ABE4 38 03 DE C4 */ addi r0, r3, sub_8037dec4@l +/* 8037DC88 0037ABE8 38 84 DE A0 */ addi r4, r4, __OSDBIntegrator@l +/* 8037DC8C 0037ABEC 7E A4 00 50 */ subf r21, r4, r0 +/* 8037DC90 0037ABF0 7E 83 A3 78 */ mr r3, r20 +/* 8037DC94 0037ABF4 7E A5 AB 78 */ mr r5, r21 +/* 8037DC98 0037ABF8 4B C8 57 F9 */ bl memcpy +/* 8037DC9C 0037ABFC 7E 83 A3 78 */ mr r3, r20 +/* 8037DCA0 0037AC00 7E A4 AB 78 */ mr r4, r21 +/* 8037DCA4 0037AC04 48 00 0E 6D */ bl DCFlushRangeNoSync +/* 8037DCA8 0037AC08 7C 00 04 AC */ sync 0 +/* 8037DCAC 0037AC0C 7E 83 A3 78 */ mr r3, r20 +/* 8037DCB0 0037AC10 7E A4 AB 78 */ mr r4, r21 +/* 8037DCB4 0037AC14 48 00 0E E1 */ bl ICInvalidateRange +lbl_8037DCB8: +/* 8037DCB8 0037AC18 3C 80 80 38 */ lis r4, sub_8037dec4@ha +/* 8037DCBC 0037AC1C 3C 60 80 38 */ lis r3, __OSSetExceptionHandler@ha +/* 8037DCC0 0037AC20 3B E4 DE C4 */ addi r31, r4, sub_8037dec4@l +/* 8037DCC4 0037AC24 38 03 DE C8 */ addi r0, r3, __OSSetExceptionHandler@l +/* 8037DCC8 0037AC28 3B 9D 01 34 */ addi r28, r29, 0x134 +/* 8037DCCC 0037AC2C 7F 7F 00 50 */ subf r27, r31, r0 +/* 8037DCD0 0037AC30 3B 40 00 00 */ li r26, 0 +/* 8037DCD4 0037AC34 48 00 00 04 */ b lbl_8037DCD8 +lbl_8037DCD8: +/* 8037DCD8 0037AC38 3C 60 80 38 */ lis r3, lbl_8037DF50@ha +/* 8037DCDC 0037AC3C 3A A3 DF 50 */ addi r21, r3, lbl_8037DF50@l +/* 8037DCE0 0037AC40 3E C0 60 00 */ lis r22, 0x6000 +/* 8037DCE4 0037AC44 48 00 00 04 */ b lbl_8037DCE8 +lbl_8037DCE8: +/* 8037DCE8 0037AC48 48 00 01 48 */ b lbl_8037DE30 +lbl_8037DCEC: +/* 8037DCEC 0037AC4C 80 6D AC C4 */ lwz r3, lbl_805A9884@sda21(r13) +/* 8037DCF0 0037AC50 28 03 00 00 */ cmplwi r3, 0 +/* 8037DCF4 0037AC54 41 82 00 34 */ beq lbl_8037DD28 +/* 8037DCF8 0037AC58 80 03 00 00 */ lwz r0, 0(r3) +/* 8037DCFC 0037AC5C 28 00 00 02 */ cmplwi r0, 2 +/* 8037DD00 0037AC60 41 80 00 28 */ blt lbl_8037DD28 +/* 8037DD04 0037AC64 7F 43 D3 78 */ mr r3, r26 +/* 8037DD08 0037AC68 4B FF 1C 45 */ bl __DBIsExceptionMarked +/* 8037DD0C 0037AC6C 2C 03 00 00 */ cmpwi r3, 0 +/* 8037DD10 0037AC70 41 82 00 18 */ beq lbl_8037DD28 +/* 8037DD14 0037AC74 38 7D 01 8C */ addi r3, r29, 0x18c +/* 8037DD18 0037AC78 4C C6 31 82 */ crclr 6 +/* 8037DD1C 0037AC7C 57 44 06 3E */ clrlwi r4, r26, 0x18 +/* 8037DD20 0037AC80 4B FF 1C 49 */ bl DBPrintf +/* 8037DD24 0037AC84 48 00 01 04 */ b lbl_8037DE28 +lbl_8037DD28: +/* 8037DD28 0037AC88 57 54 06 3E */ clrlwi r20, r26, 0x18 +/* 8037DD2C 0037AC8C 7F 20 A3 78 */ or r0, r25, r20 +/* 8037DD30 0037AC90 90 1E 00 00 */ stw r0, 0(r30) +/* 8037DD34 0037AC94 7F 43 D3 78 */ mr r3, r26 +/* 8037DD38 0037AC98 4B FF 1C 15 */ bl __DBIsExceptionMarked +/* 8037DD3C 0037AC9C 2C 03 00 00 */ cmpwi r3, 0 +/* 8037DD40 0037ACA0 41 82 00 28 */ beq lbl_8037DD68 +/* 8037DD44 0037ACA4 7E 84 A3 78 */ mr r4, r20 +/* 8037DD48 0037ACA8 4C C6 31 82 */ crclr 6 +/* 8037DD4C 0037ACAC 38 7D 01 BC */ addi r3, r29, 0x1bc +/* 8037DD50 0037ACB0 4B FF 1C 19 */ bl DBPrintf +/* 8037DD54 0037ACB4 7E A3 AB 78 */ mr r3, r21 +/* 8037DD58 0037ACB8 7F E4 FB 78 */ mr r4, r31 +/* 8037DD5C 0037ACBC 7F 65 DB 78 */ mr r5, r27 +/* 8037DD60 0037ACC0 4B C8 57 31 */ bl memcpy +/* 8037DD64 0037ACC4 48 00 00 90 */ b lbl_8037DDF4 +lbl_8037DD68: +/* 8037DD68 0037ACC8 7E A4 AB 78 */ mr r4, r21 +/* 8037DD6C 0037ACCC 48 00 00 04 */ b lbl_8037DD70 +lbl_8037DD70: +/* 8037DD70 0037ACD0 28 1B 00 00 */ cmplwi r27, 0 +/* 8037DD74 0037ACD4 38 7B 00 03 */ addi r3, r27, 3 +/* 8037DD78 0037ACD8 54 63 F0 BE */ srwi r3, r3, 2 +/* 8037DD7C 0037ACDC 40 81 00 78 */ ble lbl_8037DDF4 +/* 8037DD80 0037ACE0 54 60 E8 FE */ srwi r0, r3, 3 +/* 8037DD84 0037ACE4 28 00 00 00 */ cmplwi r0, 0 +/* 8037DD88 0037ACE8 7C 09 03 A6 */ mtctr r0 +/* 8037DD8C 0037ACEC 41 82 00 54 */ beq lbl_8037DDE0 +/* 8037DD90 0037ACF0 48 00 00 04 */ b lbl_8037DD94 +lbl_8037DD94: +/* 8037DD94 0037ACF4 92 C4 00 00 */ stw r22, 0(r4) +/* 8037DD98 0037ACF8 38 84 00 04 */ addi r4, r4, 4 +/* 8037DD9C 0037ACFC 92 C4 00 00 */ stw r22, 0(r4) +/* 8037DDA0 0037AD00 38 84 00 04 */ addi r4, r4, 4 +/* 8037DDA4 0037AD04 92 C4 00 00 */ stw r22, 0(r4) +/* 8037DDA8 0037AD08 38 84 00 04 */ addi r4, r4, 4 +/* 8037DDAC 0037AD0C 92 C4 00 00 */ stw r22, 0(r4) +/* 8037DDB0 0037AD10 38 84 00 04 */ addi r4, r4, 4 +/* 8037DDB4 0037AD14 92 C4 00 00 */ stw r22, 0(r4) +/* 8037DDB8 0037AD18 38 84 00 04 */ addi r4, r4, 4 +/* 8037DDBC 0037AD1C 92 C4 00 00 */ stw r22, 0(r4) +/* 8037DDC0 0037AD20 38 84 00 04 */ addi r4, r4, 4 +/* 8037DDC4 0037AD24 92 C4 00 00 */ stw r22, 0(r4) +/* 8037DDC8 0037AD28 38 84 00 04 */ addi r4, r4, 4 +/* 8037DDCC 0037AD2C 92 C4 00 00 */ stw r22, 0(r4) +/* 8037DDD0 0037AD30 38 84 00 04 */ addi r4, r4, 4 +/* 8037DDD4 0037AD34 42 00 FF C0 */ bdnz lbl_8037DD94 +/* 8037DDD8 0037AD38 70 63 00 07 */ andi. r3, r3, 7 +/* 8037DDDC 0037AD3C 41 82 00 18 */ beq lbl_8037DDF4 +lbl_8037DDE0: +/* 8037DDE0 0037AD40 7C 69 03 A6 */ mtctr r3 +/* 8037DDE4 0037AD44 48 00 00 04 */ b lbl_8037DDE8 +lbl_8037DDE8: +/* 8037DDE8 0037AD48 92 C4 00 00 */ stw r22, 0(r4) +/* 8037DDEC 0037AD4C 38 84 00 04 */ addi r4, r4, 4 +/* 8037DDF0 0037AD50 42 00 FF F8 */ bdnz lbl_8037DDE8 +lbl_8037DDF4: +/* 8037DDF4 0037AD54 80 7C 00 00 */ lwz r3, 0(r28) +/* 8037DDF8 0037AD58 7F 04 C3 78 */ mr r4, r24 +/* 8037DDFC 0037AD5C 7E E5 BB 78 */ mr r5, r23 +/* 8037DE00 0037AD60 3E 83 80 00 */ addis r20, r3, 0x8000 +/* 8037DE04 0037AD64 7E 83 A3 78 */ mr r3, r20 +/* 8037DE08 0037AD68 4B C8 56 89 */ bl memcpy +/* 8037DE0C 0037AD6C 7E 83 A3 78 */ mr r3, r20 +/* 8037DE10 0037AD70 7E E4 BB 78 */ mr r4, r23 +/* 8037DE14 0037AD74 48 00 0C FD */ bl DCFlushRangeNoSync +/* 8037DE18 0037AD78 7C 00 04 AC */ sync 0 +/* 8037DE1C 0037AD7C 7E 83 A3 78 */ mr r3, r20 +/* 8037DE20 0037AD80 7E E4 BB 78 */ mr r4, r23 +/* 8037DE24 0037AD84 48 00 0D 71 */ bl ICInvalidateRange +lbl_8037DE28: +/* 8037DE28 0037AD88 3B 9C 00 04 */ addi r28, r28, 4 +/* 8037DE2C 0037AD8C 3B 5A 00 01 */ addi r26, r26, 1 +lbl_8037DE30: +/* 8037DE30 0037AD90 57 40 06 3E */ clrlwi r0, r26, 0x18 +/* 8037DE34 0037AD94 28 00 00 0F */ cmplwi r0, 0xf +/* 8037DE38 0037AD98 41 80 FE B4 */ blt lbl_8037DCEC +/* 8037DE3C 0037AD9C 3C 60 80 00 */ lis r3, 0x80003000@ha +/* 8037DE40 0037ADA0 38 03 30 00 */ addi r0, r3, 0x80003000@l +/* 8037DE44 0037ADA4 90 0D AC D4 */ stw r0, lbl_805A9894@sda21(r13) +/* 8037DE48 0037ADA8 3A 80 00 00 */ li r20, 0 +/* 8037DE4C 0037ADAC 48 00 00 04 */ b lbl_8037DE50 +lbl_8037DE50: +/* 8037DE50 0037ADB0 3C 60 80 38 */ lis r3, OSDefaultExceptionHandler@ha +/* 8037DE54 0037ADB4 3A E3 DF 94 */ addi r23, r3, OSDefaultExceptionHandler@l +/* 8037DE58 0037ADB8 48 00 00 04 */ b lbl_8037DE5C +lbl_8037DE5C: +/* 8037DE5C 0037ADBC 48 00 00 14 */ b lbl_8037DE70 +lbl_8037DE60: +/* 8037DE60 0037ADC0 7E 83 A3 78 */ mr r3, r20 +/* 8037DE64 0037ADC4 7E E4 BB 78 */ mr r4, r23 +/* 8037DE68 0037ADC8 48 00 00 61 */ bl __OSSetExceptionHandler +/* 8037DE6C 0037ADCC 3A 94 00 01 */ addi r20, r20, 1 +lbl_8037DE70: +/* 8037DE70 0037ADD0 56 80 06 3E */ clrlwi r0, r20, 0x18 +/* 8037DE74 0037ADD4 28 00 00 0F */ cmplwi r0, 0xf +/* 8037DE78 0037ADD8 41 80 FF E8 */ blt lbl_8037DE60 +/* 8037DE7C 0037ADDC 93 3E 00 00 */ stw r25, 0(r30) +/* 8037DE80 0037ADE0 38 7D 01 EC */ addi r3, r29, 0x1ec +/* 8037DE84 0037ADE4 4C C6 31 82 */ crclr 6 +/* 8037DE88 0037ADE8 4B FF 1A E1 */ bl DBPrintf +/* 8037DE8C 0037ADEC BA 81 00 08 */ lmw r20, 8(r1) +/* 8037DE90 0037ADF0 80 01 00 3C */ lwz r0, 0x3c(r1) +/* 8037DE94 0037ADF4 38 21 00 38 */ addi r1, r1, 0x38 +/* 8037DE98 0037ADF8 7C 08 03 A6 */ mtlr r0 +/* 8037DE9C 0037ADFC 4E 80 00 20 */ blr + +.global __OSDBIntegrator +__OSDBIntegrator: +/* 8037DEA0 0037AE00 38 A0 00 40 */ li r5, 0x40 +/* 8037DEA4 0037AE04 7C 68 02 A6 */ mflr r3 +/* 8037DEA8 0037AE08 90 65 00 0C */ stw r3, 0xc(r5) +/* 8037DEAC 0037AE0C 80 65 00 08 */ lwz r3, 8(r5) +/* 8037DEB0 0037AE10 64 63 80 00 */ oris r3, r3, 0x8000 +/* 8037DEB4 0037AE14 7C 68 03 A6 */ mtlr r3 +/* 8037DEB8 0037AE18 38 60 00 30 */ li r3, 0x30 +/* 8037DEBC 0037AE1C 7C 60 01 24 */ mtmsr r3 +/* 8037DEC0 0037AE20 4E 80 00 20 */ blr + +.global sub_8037dec4 +sub_8037dec4: +/* 8037DEC4 0037AE24 48 00 00 63 */ bla 0x60 + +.global __OSSetExceptionHandler +__OSSetExceptionHandler: +/* 8037DEC8 0037AE28 54 60 06 3E */ clrlwi r0, r3, 0x18 +/* 8037DECC 0037AE2C 80 6D AC D4 */ lwz r3, lbl_805A9894@sda21(r13) +/* 8037DED0 0037AE30 54 00 10 3A */ slwi r0, r0, 2 +/* 8037DED4 0037AE34 7C A3 02 14 */ add r5, r3, r0 +/* 8037DED8 0037AE38 80 65 00 00 */ lwz r3, 0(r5) +/* 8037DEDC 0037AE3C 90 85 00 00 */ stw r4, 0(r5) +/* 8037DEE0 0037AE40 4E 80 00 20 */ blr + +.global __OSGetExceptionHandler +__OSGetExceptionHandler: +/* 8037DEE4 0037AE44 54 60 06 3E */ clrlwi r0, r3, 0x18 +/* 8037DEE8 0037AE48 80 6D AC D4 */ lwz r3, lbl_805A9894@sda21(r13) +/* 8037DEEC 0037AE4C 54 00 10 3A */ slwi r0, r0, 2 +/* 8037DEF0 0037AE50 7C 63 00 2E */ lwzx r3, r3, r0 +/* 8037DEF4 0037AE54 4E 80 00 20 */ blr + +.global sub_8037def8 +sub_8037def8: +/* 8037DEF8 0037AE58 7C 90 43 A6 */ mtspr 0x110, r4 +/* 8037DEFC 0037AE5C 80 80 00 C0 */ lwz r4, 0xc0(0) +/* 8037DF00 0037AE60 90 64 00 0C */ stw r3, 0xc(r4) +/* 8037DF04 0037AE64 7C 70 42 A6 */ mfspr r3, 0x110 +/* 8037DF08 0037AE68 90 64 00 10 */ stw r3, 0x10(r4) +/* 8037DF0C 0037AE6C 90 A4 00 14 */ stw r5, 0x14(r4) +/* 8037DF10 0037AE70 A0 64 01 A2 */ lhz r3, 0x1a2(r4) +/* 8037DF14 0037AE74 60 63 00 02 */ ori r3, r3, 2 +/* 8037DF18 0037AE78 B0 64 01 A2 */ sth r3, 0x1a2(r4) +/* 8037DF1C 0037AE7C 7C 60 00 26 */ mfcr r3 +/* 8037DF20 0037AE80 90 64 00 80 */ stw r3, 0x80(r4) +/* 8037DF24 0037AE84 7C 68 02 A6 */ mflr r3 +/* 8037DF28 0037AE88 90 64 00 84 */ stw r3, 0x84(r4) +/* 8037DF2C 0037AE8C 7C 69 02 A6 */ mfctr r3 +/* 8037DF30 0037AE90 90 64 00 88 */ stw r3, 0x88(r4) +/* 8037DF34 0037AE94 7C 61 02 A6 */ mfxer r3 +/* 8037DF38 0037AE98 90 64 00 8C */ stw r3, 0x8c(r4) +/* 8037DF3C 0037AE9C 7C 7A 02 A6 */ mfspr r3, 0x1a +/* 8037DF40 0037AEA0 90 64 01 98 */ stw r3, 0x198(r4) +/* 8037DF44 0037AEA4 7C 7B 02 A6 */ mfspr r3, 0x1b +/* 8037DF48 0037AEA8 90 64 01 9C */ stw r3, 0x19c(r4) +/* 8037DF4C 0037AEAC 7C 65 1B 78 */ mr r5, r3 +lbl_8037DF50: +/* 8037DF50 0037AEB0 60 00 00 00 */ nop +/* 8037DF54 0037AEB4 7C 60 00 A6 */ mfmsr r3 +/* 8037DF58 0037AEB8 60 63 00 30 */ ori r3, r3, 0x30 +/* 8037DF5C 0037AEBC 7C 7B 03 A6 */ mtspr 0x1b, r3 +lbl_8037DF60: +/* 8037DF60 0037AEC0 38 60 00 00 */ li r3, 0 +/* 8037DF64 0037AEC4 80 80 00 D4 */ lwz r4, 0xd4(0) +/* 8037DF68 0037AEC8 54 A5 07 BD */ rlwinm. r5, r5, 0, 0x1e, 0x1e +/* 8037DF6C 0037AECC 40 82 00 14 */ bne lbl_8037DF80 +/* 8037DF70 0037AED0 3C A0 80 38 */ lis r5, OSDefaultExceptionHandler@ha +/* 8037DF74 0037AED4 38 A5 DF 94 */ addi r5, r5, OSDefaultExceptionHandler@l +/* 8037DF78 0037AED8 7C BA 03 A6 */ mtspr 0x1a, r5 +/* 8037DF7C 0037AEDC 4C 00 00 64 */ rfi +lbl_8037DF80: +/* 8037DF80 0037AEE0 54 65 15 BA */ rlwinm r5, r3, 2, 0x16, 0x1d +/* 8037DF84 0037AEE4 80 A5 30 00 */ lwz r5, 0x3000(r5) +/* 8037DF88 0037AEE8 7C BA 03 A6 */ mtspr 0x1a, r5 +/* 8037DF8C 0037AEEC 4C 00 00 64 */ rfi +lbl_8037DF90: +/* 8037DF90 0037AEF0 60 00 00 00 */ nop + +.global OSDefaultExceptionHandler +OSDefaultExceptionHandler: +/* 8037DF94 0037AEF4 90 04 00 00 */ stw r0, 0(r4) +/* 8037DF98 0037AEF8 90 24 00 04 */ stw r1, 4(r4) +/* 8037DF9C 0037AEFC 90 44 00 08 */ stw r2, 8(r4) +/* 8037DFA0 0037AF00 BC C4 00 18 */ stmw r6, 0x18(r4) +/* 8037DFA4 0037AF04 7C 11 E2 A6 */ mfspr r0, 0x391 +/* 8037DFA8 0037AF08 90 04 01 A8 */ stw r0, 0x1a8(r4) +/* 8037DFAC 0037AF0C 7C 12 E2 A6 */ mfspr r0, 0x392 +/* 8037DFB0 0037AF10 90 04 01 AC */ stw r0, 0x1ac(r4) +/* 8037DFB4 0037AF14 7C 13 E2 A6 */ mfspr r0, 0x393 +/* 8037DFB8 0037AF18 90 04 01 B0 */ stw r0, 0x1b0(r4) +/* 8037DFBC 0037AF1C 7C 14 E2 A6 */ mfspr r0, 0x394 +/* 8037DFC0 0037AF20 90 04 01 B4 */ stw r0, 0x1b4(r4) +/* 8037DFC4 0037AF24 7C 15 E2 A6 */ mfspr r0, 0x395 +/* 8037DFC8 0037AF28 90 04 01 B8 */ stw r0, 0x1b8(r4) +/* 8037DFCC 0037AF2C 7C 16 E2 A6 */ mfspr r0, 0x396 +/* 8037DFD0 0037AF30 90 04 01 BC */ stw r0, 0x1bc(r4) +/* 8037DFD4 0037AF34 7C 17 E2 A6 */ mfspr r0, 0x397 +/* 8037DFD8 0037AF38 90 04 01 C0 */ stw r0, 0x1c0(r4) +/* 8037DFDC 0037AF3C 7C B2 02 A6 */ mfdsisr r5 +/* 8037DFE0 0037AF40 7C D3 02 A6 */ mfdar r6 + +.global sub_8037dfe4 +sub_8037dfe4: +/* 8037DFE4 0037AF44 94 21 FF F8 */ stwu r1, -8(r1) +/* 8037DFE8 0037AF48 48 00 1D 88 */ b __OSUnhandledException + +.global __OSPSInit +__OSPSInit: +/* 8037DFEC 0037AF4C 7C 08 02 A6 */ mflr r0 +/* 8037DFF0 0037AF50 90 01 00 04 */ stw r0, 4(r1) +/* 8037DFF4 0037AF54 94 21 FF F8 */ stwu r1, -8(r1) +/* 8037DFF8 0037AF58 4B FF 18 79 */ bl PPCMfhid2 +/* 8037DFFC 0037AF5C 64 63 A0 00 */ oris r3, r3, 0xa000 +/* 8037E000 0037AF60 4B FF 18 79 */ bl PPCMthid2 +/* 8037E004 0037AF64 48 00 0B C5 */ bl ICFlashInvalidate +/* 8037E008 0037AF68 7C 00 04 AC */ sync 0 +/* 8037E00C 0037AF6C 38 60 00 00 */ li r3, 0 +/* 8037E010 0037AF70 7C 70 E3 A6 */ mtspr 0x390, r3 +/* 8037E014 0037AF74 80 01 00 0C */ lwz r0, 0xc(r1) +/* 8037E018 0037AF78 38 21 00 08 */ addi r1, r1, 8 +/* 8037E01C 0037AF7C 7C 08 03 A6 */ mtlr r0 +/* 8037E020 0037AF80 4E 80 00 20 */ blr + +.global __OSGetDIConfig +__OSGetDIConfig: +/* 8037E024 0037AF84 3C 60 CC 00 */ lis r3, 0xCC006000@ha +/* 8037E028 0037AF88 38 63 60 00 */ addi r3, r3, 0xCC006000@l +/* 8037E02C 0037AF8C 80 03 00 24 */ lwz r0, 0x24(r3) +/* 8037E030 0037AF90 54 03 06 3E */ clrlwi r3, r0, 0x18 +/* 8037E034 0037AF94 4E 80 00 20 */ blr + +.global OSRegisterVersion +OSRegisterVersion: +/* 8037E038 0037AF98 7C 08 02 A6 */ mflr r0 +/* 8037E03C 0037AF9C 90 01 00 04 */ stw r0, 4(r1) +/* 8037E040 0037AFA0 94 21 FF F8 */ stwu r1, -8(r1) +/* 8037E044 0037AFA4 7C 64 1B 78 */ mr r4, r3 +/* 8037E048 0037AFA8 4C C6 31 82 */ crclr 6 +/* 8037E04C 0037AFAC 38 6D 9F 6C */ addi r3, r13, lbl_805A8B2C@sda21 +/* 8037E050 0037AFB0 48 00 19 5D */ bl OSReport +/* 8037E054 0037AFB4 80 01 00 0C */ lwz r0, 0xc(r1) +/* 8037E058 0037AFB8 38 21 00 08 */ addi r1, r1, 8 +/* 8037E05C 0037AFBC 7C 08 03 A6 */ mtlr r0 +/* 8037E060 0037AFC0 4E 80 00 20 */ blr diff --git a/asm/Dolphin/OS/OSAlarm.s b/asm/Dolphin/OS/OSAlarm.s new file mode 100644 index 00000000..69211324 --- /dev/null +++ b/asm/Dolphin/OS/OSAlarm.s @@ -0,0 +1,517 @@ +.include "macros.inc" + +.section .text, "ax" + +.global OSInitAlarm +OSInitAlarm: +/* 8037E064 0037AFC4 7C 08 02 A6 */ mflr r0 +/* 8037E068 0037AFC8 38 60 00 08 */ li r3, 8 +/* 8037E06C 0037AFCC 90 01 00 04 */ stw r0, 4(r1) +/* 8037E070 0037AFD0 94 21 FF F8 */ stwu r1, -8(r1) +/* 8037E074 0037AFD4 4B FF FE 71 */ bl __OSGetExceptionHandler +/* 8037E078 0037AFD8 3C 80 80 38 */ lis r4, DecrementerExceptionHandler@ha +/* 8037E07C 0037AFDC 38 84 E7 40 */ addi r4, r4, DecrementerExceptionHandler@l +/* 8037E080 0037AFE0 7C 03 20 40 */ cmplw r3, r4 +/* 8037E084 0037AFE4 41 82 00 1C */ beq lbl_8037E0A0 +/* 8037E088 0037AFE8 38 00 00 00 */ li r0, 0 +/* 8037E08C 0037AFEC 38 6D AC F0 */ addi r3, r13, lbl_805A98B0@sda21 +/* 8037E090 0037AFF0 90 03 00 04 */ stw r0, 4(r3) +/* 8037E094 0037AFF4 38 60 00 08 */ li r3, 8 +/* 8037E098 0037AFF8 90 0D AC F0 */ stw r0, lbl_805A98B0@sda21(r13) +/* 8037E09C 0037AFFC 4B FF FE 2D */ bl __OSSetExceptionHandler +lbl_8037E0A0: +/* 8037E0A0 0037B000 80 01 00 0C */ lwz r0, 0xc(r1) +/* 8037E0A4 0037B004 38 21 00 08 */ addi r1, r1, 8 +/* 8037E0A8 0037B008 7C 08 03 A6 */ mtlr r0 +/* 8037E0AC 0037B00C 4E 80 00 20 */ blr + +.global OSCreateAlarm +OSCreateAlarm: +/* 8037E0B0 0037B010 38 00 00 00 */ li r0, 0 +/* 8037E0B4 0037B014 90 03 00 00 */ stw r0, 0(r3) +/* 8037E0B8 0037B018 90 03 00 04 */ stw r0, 4(r3) +/* 8037E0BC 0037B01C 4E 80 00 20 */ blr + +.global InsertAlarm +InsertAlarm: +/* 8037E0C0 0037B020 7C 08 02 A6 */ mflr r0 +/* 8037E0C4 0037B024 90 01 00 04 */ stw r0, 4(r1) +/* 8037E0C8 0037B028 94 21 FF C0 */ stwu r1, -0x40(r1) +/* 8037E0CC 0037B02C BF 21 00 24 */ stmw r25, 0x24(r1) +/* 8037E0D0 0037B030 3B 80 00 00 */ li r28, 0 +/* 8037E0D4 0037B034 7C 7D 1B 78 */ mr r29, r3 +/* 8037E0D8 0037B038 6F 84 80 00 */ xoris r4, r28, 0x8000 +/* 8037E0DC 0037B03C 3B 25 00 00 */ addi r25, r5, 0 +/* 8037E0E0 0037B040 3B C6 00 00 */ addi r30, r6, 0 +/* 8037E0E4 0037B044 3B E7 00 00 */ addi r31, r7, 0 +/* 8037E0E8 0037B048 80 03 00 18 */ lwz r0, 0x18(r3) +/* 8037E0EC 0037B04C 81 03 00 1C */ lwz r8, 0x1c(r3) +/* 8037E0F0 0037B050 6C 03 80 00 */ xoris r3, r0, 0x8000 +/* 8037E0F4 0037B054 7C 08 E0 10 */ subfc r0, r8, r28 +/* 8037E0F8 0037B058 7C 63 21 10 */ subfe r3, r3, r4 +/* 8037E0FC 0037B05C 7C 64 21 10 */ subfe r3, r4, r4 +/* 8037E100 0037B060 7C 63 00 D1 */ neg. r3, r3 +/* 8037E104 0037B064 41 82 00 7C */ beq lbl_8037E180 +/* 8037E108 0037B068 48 00 72 C1 */ bl __OSGetSystemTime +/* 8037E10C 0037B06C 80 FD 00 20 */ lwz r7, 0x20(r29) +/* 8037E110 0037B070 6C 65 80 00 */ xoris r5, r3, 0x8000 +/* 8037E114 0037B074 81 1D 00 24 */ lwz r8, 0x24(r29) +/* 8037E118 0037B078 6C E6 80 00 */ xoris r6, r7, 0x8000 +/* 8037E11C 0037B07C 7C 04 40 10 */ subfc r0, r4, r8 +/* 8037E120 0037B080 7C A5 31 10 */ subfe r5, r5, r6 +/* 8037E124 0037B084 7C A6 31 10 */ subfe r5, r6, r6 +/* 8037E128 0037B088 7C A5 00 D1 */ neg. r5, r5 +/* 8037E12C 0037B08C 3B C8 00 00 */ addi r30, r8, 0 +/* 8037E130 0037B090 3B 27 00 00 */ addi r25, r7, 0 +/* 8037E134 0037B094 41 82 00 4C */ beq lbl_8037E180 +/* 8037E138 0037B098 83 7D 00 18 */ lwz r27, 0x18(r29) +/* 8037E13C 0037B09C 7C 88 20 10 */ subfc r4, r8, r4 +/* 8037E140 0037B0A0 83 5D 00 1C */ lwz r26, 0x1c(r29) +/* 8037E144 0037B0A4 7C 67 19 10 */ subfe r3, r7, r3 +/* 8037E148 0037B0A8 38 BB 00 00 */ addi r5, r27, 0 +/* 8037E14C 0037B0AC 38 DA 00 00 */ addi r6, r26, 0 +/* 8037E150 0037B0B0 48 00 BA 7D */ bl __div2i +/* 8037E154 0037B0B4 38 00 00 01 */ li r0, 1 +/* 8037E158 0037B0B8 7C A4 00 14 */ addc r5, r4, r0 +/* 8037E15C 0037B0BC 7C 9B 29 D6 */ mullw r4, r27, r5 +/* 8037E160 0037B0C0 7C 1A 28 16 */ mulhwu r0, r26, r5 +/* 8037E164 0037B0C4 7C 63 E1 14 */ adde r3, r3, r28 +/* 8037E168 0037B0C8 7C 84 02 14 */ add r4, r4, r0 +/* 8037E16C 0037B0CC 7C 1A 19 D6 */ mullw r0, r26, r3 +/* 8037E170 0037B0D0 7C 7A 29 D6 */ mullw r3, r26, r5 +/* 8037E174 0037B0D4 7C 04 02 14 */ add r0, r4, r0 +/* 8037E178 0037B0D8 7F DE 18 14 */ addc r30, r30, r3 +/* 8037E17C 0037B0DC 7F 39 01 14 */ adde r25, r25, r0 +lbl_8037E180: +/* 8037E180 0037B0E0 93 FD 00 00 */ stw r31, 0(r29) +/* 8037E184 0037B0E4 6F 24 80 00 */ xoris r4, r25, 0x8000 +/* 8037E188 0037B0E8 93 DD 00 0C */ stw r30, 0xc(r29) +/* 8037E18C 0037B0EC 93 3D 00 08 */ stw r25, 8(r29) +/* 8037E190 0037B0F0 80 CD AC F0 */ lwz r6, lbl_805A98B0@sda21(r13) +/* 8037E194 0037B0F4 48 00 00 C4 */ b lbl_8037E258 +lbl_8037E198: +/* 8037E198 0037B0F8 80 06 00 08 */ lwz r0, 8(r6) +/* 8037E19C 0037B0FC 80 A6 00 0C */ lwz r5, 0xc(r6) +/* 8037E1A0 0037B100 6C 03 80 00 */ xoris r3, r0, 0x8000 +/* 8037E1A4 0037B104 7C 05 F0 10 */ subfc r0, r5, r30 +/* 8037E1A8 0037B108 7C 63 21 10 */ subfe r3, r3, r4 +/* 8037E1AC 0037B10C 7C 64 21 10 */ subfe r3, r4, r4 +/* 8037E1B0 0037B110 7C 63 00 D1 */ neg. r3, r3 +/* 8037E1B4 0037B114 41 82 00 A0 */ beq lbl_8037E254 +/* 8037E1B8 0037B118 80 06 00 10 */ lwz r0, 0x10(r6) +/* 8037E1BC 0037B11C 90 1D 00 10 */ stw r0, 0x10(r29) +/* 8037E1C0 0037B120 93 A6 00 10 */ stw r29, 0x10(r6) +/* 8037E1C4 0037B124 90 DD 00 14 */ stw r6, 0x14(r29) +/* 8037E1C8 0037B128 80 7D 00 10 */ lwz r3, 0x10(r29) +/* 8037E1CC 0037B12C 28 03 00 00 */ cmplwi r3, 0 +/* 8037E1D0 0037B130 41 82 00 0C */ beq lbl_8037E1DC +/* 8037E1D4 0037B134 93 A3 00 14 */ stw r29, 0x14(r3) +/* 8037E1D8 0037B138 48 00 01 24 */ b lbl_8037E2FC +lbl_8037E1DC: +/* 8037E1DC 0037B13C 93 AD AC F0 */ stw r29, lbl_805A98B0@sda21(r13) +/* 8037E1E0 0037B140 48 00 71 E9 */ bl __OSGetSystemTime +/* 8037E1E4 0037B144 80 DD 00 0C */ lwz r6, 0xc(r29) +/* 8037E1E8 0037B148 38 E0 00 00 */ li r7, 0 +/* 8037E1EC 0037B14C 80 1D 00 08 */ lwz r0, 8(r29) +/* 8037E1F0 0037B150 6C E5 80 00 */ xoris r5, r7, 0x8000 +/* 8037E1F4 0037B154 7D 04 30 10 */ subfc r8, r4, r6 +/* 8037E1F8 0037B158 7C 03 01 10 */ subfe r0, r3, r0 +/* 8037E1FC 0037B15C 6C 06 80 00 */ xoris r6, r0, 0x8000 +/* 8037E200 0037B160 7C 07 40 10 */ subfc r0, r7, r8 +/* 8037E204 0037B164 7C A5 31 10 */ subfe r5, r5, r6 +/* 8037E208 0037B168 7C A6 31 10 */ subfe r5, r6, r6 +/* 8037E20C 0037B16C 7C A5 00 D1 */ neg. r5, r5 +/* 8037E210 0037B170 41 82 00 10 */ beq lbl_8037E220 +/* 8037E214 0037B174 38 60 00 00 */ li r3, 0 +/* 8037E218 0037B178 4B FF 15 ED */ bl PPCMtdec +/* 8037E21C 0037B17C 48 00 00 E0 */ b lbl_8037E2FC +lbl_8037E220: +/* 8037E220 0037B180 3C 80 80 00 */ lis r4, 0x8000 +/* 8037E224 0037B184 6C E3 80 00 */ xoris r3, r7, 0x8000 +/* 8037E228 0037B188 7C 04 40 10 */ subfc r0, r4, r8 +/* 8037E22C 0037B18C 7C 63 31 10 */ subfe r3, r3, r6 +/* 8037E230 0037B190 7C 66 31 10 */ subfe r3, r6, r6 +/* 8037E234 0037B194 7C 63 00 D1 */ neg. r3, r3 +/* 8037E238 0037B198 41 82 00 10 */ beq lbl_8037E248 +/* 8037E23C 0037B19C 7D 03 43 78 */ mr r3, r8 +/* 8037E240 0037B1A0 4B FF 15 C5 */ bl PPCMtdec +/* 8037E244 0037B1A4 48 00 00 B8 */ b lbl_8037E2FC +lbl_8037E248: +/* 8037E248 0037B1A8 38 64 FF FF */ addi r3, r4, -1 +/* 8037E24C 0037B1AC 4B FF 15 B9 */ bl PPCMtdec +/* 8037E250 0037B1B0 48 00 00 AC */ b lbl_8037E2FC +lbl_8037E254: +/* 8037E254 0037B1B4 80 C6 00 14 */ lwz r6, 0x14(r6) +lbl_8037E258: +/* 8037E258 0037B1B8 28 06 00 00 */ cmplwi r6, 0 +/* 8037E25C 0037B1BC 40 82 FF 3C */ bne lbl_8037E198 +/* 8037E260 0037B1C0 3B C0 00 00 */ li r30, 0 +/* 8037E264 0037B1C4 93 DD 00 14 */ stw r30, 0x14(r29) +/* 8037E268 0037B1C8 38 6D AC F0 */ addi r3, r13, lbl_805A98B0@sda21 +/* 8037E26C 0037B1CC 80 83 00 04 */ lwz r4, 4(r3) +/* 8037E270 0037B1D0 97 A3 00 04 */ stwu r29, 4(r3) +/* 8037E274 0037B1D4 28 04 00 00 */ cmplwi r4, 0 +/* 8037E278 0037B1D8 90 9D 00 10 */ stw r4, 0x10(r29) +/* 8037E27C 0037B1DC 41 82 00 0C */ beq lbl_8037E288 +/* 8037E280 0037B1E0 93 A4 00 14 */ stw r29, 0x14(r4) +/* 8037E284 0037B1E4 48 00 00 78 */ b lbl_8037E2FC +lbl_8037E288: +/* 8037E288 0037B1E8 93 A3 00 00 */ stw r29, 0(r3) +/* 8037E28C 0037B1EC 93 AD AC F0 */ stw r29, lbl_805A98B0@sda21(r13) +/* 8037E290 0037B1F0 48 00 71 39 */ bl __OSGetSystemTime +/* 8037E294 0037B1F4 80 DD 00 0C */ lwz r6, 0xc(r29) +/* 8037E298 0037B1F8 6F C5 80 00 */ xoris r5, r30, 0x8000 +/* 8037E29C 0037B1FC 80 1D 00 08 */ lwz r0, 8(r29) +/* 8037E2A0 0037B200 7C E4 30 10 */ subfc r7, r4, r6 +/* 8037E2A4 0037B204 7C 03 01 10 */ subfe r0, r3, r0 +/* 8037E2A8 0037B208 6C 06 80 00 */ xoris r6, r0, 0x8000 +/* 8037E2AC 0037B20C 7C 1E 38 10 */ subfc r0, r30, r7 +/* 8037E2B0 0037B210 7C A5 31 10 */ subfe r5, r5, r6 +/* 8037E2B4 0037B214 7C A6 31 10 */ subfe r5, r6, r6 +/* 8037E2B8 0037B218 7C A5 00 D1 */ neg. r5, r5 +/* 8037E2BC 0037B21C 41 82 00 10 */ beq lbl_8037E2CC +/* 8037E2C0 0037B220 38 60 00 00 */ li r3, 0 +/* 8037E2C4 0037B224 4B FF 15 41 */ bl PPCMtdec +/* 8037E2C8 0037B228 48 00 00 34 */ b lbl_8037E2FC +lbl_8037E2CC: +/* 8037E2CC 0037B22C 3C 80 80 00 */ lis r4, 0x8000 +/* 8037E2D0 0037B230 6F C3 80 00 */ xoris r3, r30, 0x8000 +/* 8037E2D4 0037B234 7C 04 38 10 */ subfc r0, r4, r7 +/* 8037E2D8 0037B238 7C 63 31 10 */ subfe r3, r3, r6 +/* 8037E2DC 0037B23C 7C 66 31 10 */ subfe r3, r6, r6 +/* 8037E2E0 0037B240 7C 63 00 D1 */ neg. r3, r3 +/* 8037E2E4 0037B244 41 82 00 10 */ beq lbl_8037E2F4 +/* 8037E2E8 0037B248 7C E3 3B 78 */ mr r3, r7 +/* 8037E2EC 0037B24C 4B FF 15 19 */ bl PPCMtdec +/* 8037E2F0 0037B250 48 00 00 0C */ b lbl_8037E2FC +lbl_8037E2F4: +/* 8037E2F4 0037B254 38 64 FF FF */ addi r3, r4, -1 +/* 8037E2F8 0037B258 4B FF 15 0D */ bl PPCMtdec +lbl_8037E2FC: +/* 8037E2FC 0037B25C BB 21 00 24 */ lmw r25, 0x24(r1) +/* 8037E300 0037B260 80 01 00 44 */ lwz r0, 0x44(r1) +/* 8037E304 0037B264 38 21 00 40 */ addi r1, r1, 0x40 +/* 8037E308 0037B268 7C 08 03 A6 */ mtlr r0 +/* 8037E30C 0037B26C 4E 80 00 20 */ blr + +.global OSSetAlarm +OSSetAlarm: +/* 8037E310 0037B270 7C 08 02 A6 */ mflr r0 +/* 8037E314 0037B274 90 01 00 04 */ stw r0, 4(r1) +/* 8037E318 0037B278 94 21 FF C8 */ stwu r1, -0x38(r1) +/* 8037E31C 0037B27C BF 61 00 24 */ stmw r27, 0x24(r1) +/* 8037E320 0037B280 3B 63 00 00 */ addi r27, r3, 0 +/* 8037E324 0037B284 3B A5 00 00 */ addi r29, r5, 0 +/* 8037E328 0037B288 3B 86 00 00 */ addi r28, r6, 0 +/* 8037E32C 0037B28C 3B C7 00 00 */ addi r30, r7, 0 +/* 8037E330 0037B290 48 00 33 31 */ bl OSDisableInterrupts +/* 8037E334 0037B294 38 00 00 00 */ li r0, 0 +/* 8037E338 0037B298 90 1B 00 1C */ stw r0, 0x1c(r27) +/* 8037E33C 0037B29C 7C 7F 1B 78 */ mr r31, r3 +/* 8037E340 0037B2A0 90 1B 00 18 */ stw r0, 0x18(r27) +/* 8037E344 0037B2A4 48 00 70 85 */ bl __OSGetSystemTime +/* 8037E348 0037B2A8 7C DC 20 14 */ addc r6, r28, r4 +/* 8037E34C 0037B2AC 7C BD 19 14 */ adde r5, r29, r3 +/* 8037E350 0037B2B0 38 7B 00 00 */ addi r3, r27, 0 +/* 8037E354 0037B2B4 38 FE 00 00 */ addi r7, r30, 0 +/* 8037E358 0037B2B8 4B FF FD 69 */ bl InsertAlarm +/* 8037E35C 0037B2BC 7F E3 FB 78 */ mr r3, r31 +/* 8037E360 0037B2C0 48 00 33 29 */ bl OSRestoreInterrupts +/* 8037E364 0037B2C4 BB 61 00 24 */ lmw r27, 0x24(r1) +/* 8037E368 0037B2C8 80 01 00 3C */ lwz r0, 0x3c(r1) +/* 8037E36C 0037B2CC 38 21 00 38 */ addi r1, r1, 0x38 +/* 8037E370 0037B2D0 7C 08 03 A6 */ mtlr r0 +/* 8037E374 0037B2D4 4E 80 00 20 */ blr + +.global OSSetPeriodicAlarm +OSSetPeriodicAlarm: +/* 8037E378 0037B2D8 7C 08 02 A6 */ mflr r0 +/* 8037E37C 0037B2DC 90 01 00 04 */ stw r0, 4(r1) +/* 8037E380 0037B2E0 94 21 FF C0 */ stwu r1, -0x40(r1) +/* 8037E384 0037B2E4 BF 41 00 28 */ stmw r26, 0x28(r1) +/* 8037E388 0037B2E8 3B 43 00 00 */ addi r26, r3, 0 +/* 8037E38C 0037B2EC 3B 85 00 00 */ addi r28, r5, 0 +/* 8037E390 0037B2F0 3B 66 00 00 */ addi r27, r6, 0 +/* 8037E394 0037B2F4 3B A7 00 00 */ addi r29, r7, 0 +/* 8037E398 0037B2F8 3B E8 00 00 */ addi r31, r8, 0 +/* 8037E39C 0037B2FC 3B C9 00 00 */ addi r30, r9, 0 +/* 8037E3A0 0037B300 48 00 32 C1 */ bl OSDisableInterrupts +/* 8037E3A4 0037B304 93 FA 00 1C */ stw r31, 0x1c(r26) +/* 8037E3A8 0037B308 7C 7F 1B 78 */ mr r31, r3 +/* 8037E3AC 0037B30C 38 9B 00 00 */ addi r4, r27, 0 +/* 8037E3B0 0037B310 93 BA 00 18 */ stw r29, 0x18(r26) +/* 8037E3B4 0037B314 38 7C 00 00 */ addi r3, r28, 0 +/* 8037E3B8 0037B318 48 00 70 75 */ bl __OSTimeToSystemTime +/* 8037E3BC 0037B31C 90 9A 00 24 */ stw r4, 0x24(r26) +/* 8037E3C0 0037B320 38 FE 00 00 */ addi r7, r30, 0 +/* 8037E3C4 0037B324 38 C0 00 00 */ li r6, 0 +/* 8037E3C8 0037B328 90 7A 00 20 */ stw r3, 0x20(r26) +/* 8037E3CC 0037B32C 38 7A 00 00 */ addi r3, r26, 0 +/* 8037E3D0 0037B330 38 A0 00 00 */ li r5, 0 +/* 8037E3D4 0037B334 4B FF FC ED */ bl InsertAlarm +/* 8037E3D8 0037B338 7F E3 FB 78 */ mr r3, r31 +/* 8037E3DC 0037B33C 48 00 32 AD */ bl OSRestoreInterrupts +/* 8037E3E0 0037B340 BB 41 00 28 */ lmw r26, 0x28(r1) +/* 8037E3E4 0037B344 80 01 00 44 */ lwz r0, 0x44(r1) +/* 8037E3E8 0037B348 38 21 00 40 */ addi r1, r1, 0x40 +/* 8037E3EC 0037B34C 7C 08 03 A6 */ mtlr r0 +/* 8037E3F0 0037B350 4E 80 00 20 */ blr + +.global OSCancelAlarm +OSCancelAlarm: +/* 8037E3F4 0037B354 7C 08 02 A6 */ mflr r0 +/* 8037E3F8 0037B358 90 01 00 04 */ stw r0, 4(r1) +/* 8037E3FC 0037B35C 94 21 FF E0 */ stwu r1, -0x20(r1) +/* 8037E400 0037B360 93 E1 00 1C */ stw r31, 0x1c(r1) +/* 8037E404 0037B364 93 C1 00 18 */ stw r30, 0x18(r1) +/* 8037E408 0037B368 7C 7E 1B 78 */ mr r30, r3 +/* 8037E40C 0037B36C 93 A1 00 14 */ stw r29, 0x14(r1) +/* 8037E410 0037B370 48 00 32 51 */ bl OSDisableInterrupts +/* 8037E414 0037B374 80 1E 00 00 */ lwz r0, 0(r30) +/* 8037E418 0037B378 3B E3 00 00 */ addi r31, r3, 0 +/* 8037E41C 0037B37C 28 00 00 00 */ cmplwi r0, 0 +/* 8037E420 0037B380 40 82 00 10 */ bne lbl_8037E430 +/* 8037E424 0037B384 7F E3 FB 78 */ mr r3, r31 +/* 8037E428 0037B388 48 00 32 61 */ bl OSRestoreInterrupts +/* 8037E42C 0037B38C 48 00 00 C8 */ b lbl_8037E4F4 +lbl_8037E430: +/* 8037E430 0037B390 83 BE 00 14 */ lwz r29, 0x14(r30) +/* 8037E434 0037B394 28 1D 00 00 */ cmplwi r29, 0 +/* 8037E438 0037B398 40 82 00 14 */ bne lbl_8037E44C +/* 8037E43C 0037B39C 80 1E 00 10 */ lwz r0, 0x10(r30) +/* 8037E440 0037B3A0 38 6D AC F0 */ addi r3, r13, lbl_805A98B0@sda21 +/* 8037E444 0037B3A4 90 03 00 04 */ stw r0, 4(r3) +/* 8037E448 0037B3A8 48 00 00 0C */ b lbl_8037E454 +lbl_8037E44C: +/* 8037E44C 0037B3AC 80 1E 00 10 */ lwz r0, 0x10(r30) +/* 8037E450 0037B3B0 90 1D 00 10 */ stw r0, 0x10(r29) +lbl_8037E454: +/* 8037E454 0037B3B4 80 7E 00 10 */ lwz r3, 0x10(r30) +/* 8037E458 0037B3B8 28 03 00 00 */ cmplwi r3, 0 +/* 8037E45C 0037B3BC 41 82 00 0C */ beq lbl_8037E468 +/* 8037E460 0037B3C0 93 A3 00 14 */ stw r29, 0x14(r3) +/* 8037E464 0037B3C4 48 00 00 80 */ b lbl_8037E4E4 +lbl_8037E468: +/* 8037E468 0037B3C8 28 1D 00 00 */ cmplwi r29, 0 +/* 8037E46C 0037B3CC 93 AD AC F0 */ stw r29, lbl_805A98B0@sda21(r13) +/* 8037E470 0037B3D0 41 82 00 74 */ beq lbl_8037E4E4 +/* 8037E474 0037B3D4 48 00 6F 55 */ bl __OSGetSystemTime +/* 8037E478 0037B3D8 80 DD 00 0C */ lwz r6, 0xc(r29) +/* 8037E47C 0037B3DC 38 E0 00 00 */ li r7, 0 +/* 8037E480 0037B3E0 80 1D 00 08 */ lwz r0, 8(r29) +/* 8037E484 0037B3E4 6C E5 80 00 */ xoris r5, r7, 0x8000 +/* 8037E488 0037B3E8 7D 04 30 10 */ subfc r8, r4, r6 +/* 8037E48C 0037B3EC 7C 03 01 10 */ subfe r0, r3, r0 +/* 8037E490 0037B3F0 6C 06 80 00 */ xoris r6, r0, 0x8000 +/* 8037E494 0037B3F4 7C 07 40 10 */ subfc r0, r7, r8 +/* 8037E498 0037B3F8 7C A5 31 10 */ subfe r5, r5, r6 +/* 8037E49C 0037B3FC 7C A6 31 10 */ subfe r5, r6, r6 +/* 8037E4A0 0037B400 7C A5 00 D1 */ neg. r5, r5 +/* 8037E4A4 0037B404 41 82 00 10 */ beq lbl_8037E4B4 +/* 8037E4A8 0037B408 38 60 00 00 */ li r3, 0 +/* 8037E4AC 0037B40C 4B FF 13 59 */ bl PPCMtdec +/* 8037E4B0 0037B410 48 00 00 34 */ b lbl_8037E4E4 +lbl_8037E4B4: +/* 8037E4B4 0037B414 3C 80 80 00 */ lis r4, 0x8000 +/* 8037E4B8 0037B418 6C E3 80 00 */ xoris r3, r7, 0x8000 +/* 8037E4BC 0037B41C 7C 04 40 10 */ subfc r0, r4, r8 +/* 8037E4C0 0037B420 7C 63 31 10 */ subfe r3, r3, r6 +/* 8037E4C4 0037B424 7C 66 31 10 */ subfe r3, r6, r6 +/* 8037E4C8 0037B428 7C 63 00 D1 */ neg. r3, r3 +/* 8037E4CC 0037B42C 41 82 00 10 */ beq lbl_8037E4DC +/* 8037E4D0 0037B430 7D 03 43 78 */ mr r3, r8 +/* 8037E4D4 0037B434 4B FF 13 31 */ bl PPCMtdec +/* 8037E4D8 0037B438 48 00 00 0C */ b lbl_8037E4E4 +lbl_8037E4DC: +/* 8037E4DC 0037B43C 38 64 FF FF */ addi r3, r4, -1 +/* 8037E4E0 0037B440 4B FF 13 25 */ bl PPCMtdec +lbl_8037E4E4: +/* 8037E4E4 0037B444 38 00 00 00 */ li r0, 0 +/* 8037E4E8 0037B448 90 1E 00 00 */ stw r0, 0(r30) +/* 8037E4EC 0037B44C 7F E3 FB 78 */ mr r3, r31 +/* 8037E4F0 0037B450 48 00 31 99 */ bl OSRestoreInterrupts +lbl_8037E4F4: +/* 8037E4F4 0037B454 80 01 00 24 */ lwz r0, 0x24(r1) +/* 8037E4F8 0037B458 83 E1 00 1C */ lwz r31, 0x1c(r1) +/* 8037E4FC 0037B45C 83 C1 00 18 */ lwz r30, 0x18(r1) +/* 8037E500 0037B460 83 A1 00 14 */ lwz r29, 0x14(r1) +/* 8037E504 0037B464 38 21 00 20 */ addi r1, r1, 0x20 +/* 8037E508 0037B468 7C 08 03 A6 */ mtlr r0 +/* 8037E50C 0037B46C 4E 80 00 20 */ blr + +.global DecrementerExceptionCallback +DecrementerExceptionCallback: +/* 8037E510 0037B470 7C 08 02 A6 */ mflr r0 +/* 8037E514 0037B474 90 01 00 04 */ stw r0, 4(r1) +/* 8037E518 0037B478 94 21 FD 10 */ stwu r1, -0x2f0(r1) +/* 8037E51C 0037B47C 93 E1 02 EC */ stw r31, 0x2ec(r1) +/* 8037E520 0037B480 93 C1 02 E8 */ stw r30, 0x2e8(r1) +/* 8037E524 0037B484 93 A1 02 E4 */ stw r29, 0x2e4(r1) +/* 8037E528 0037B488 7C 9D 23 78 */ mr r29, r4 +/* 8037E52C 0037B48C 93 81 02 E0 */ stw r28, 0x2e0(r1) +/* 8037E530 0037B490 48 00 6E 99 */ bl __OSGetSystemTime +/* 8037E534 0037B494 80 0D AC F0 */ lwz r0, lbl_805A98B0@sda21(r13) +/* 8037E538 0037B498 3B 84 00 00 */ addi r28, r4, 0 +/* 8037E53C 0037B49C 3B C3 00 00 */ addi r30, r3, 0 +/* 8037E540 0037B4A0 28 00 00 00 */ cmplwi r0, 0 +/* 8037E544 0037B4A4 7C 1F 03 78 */ mr r31, r0 +/* 8037E548 0037B4A8 40 82 00 0C */ bne lbl_8037E554 +/* 8037E54C 0037B4AC 7F A3 EB 78 */ mr r3, r29 +/* 8037E550 0037B4B0 48 00 0F B5 */ bl OSLoadContext +lbl_8037E554: +/* 8037E554 0037B4B4 80 1F 00 08 */ lwz r0, 8(r31) +/* 8037E558 0037B4B8 6F C4 80 00 */ xoris r4, r30, 0x8000 +/* 8037E55C 0037B4BC 80 BF 00 0C */ lwz r5, 0xc(r31) +/* 8037E560 0037B4C0 6C 03 80 00 */ xoris r3, r0, 0x8000 +/* 8037E564 0037B4C4 7C 05 E0 10 */ subfc r0, r5, r28 +/* 8037E568 0037B4C8 7C 63 21 10 */ subfe r3, r3, r4 +/* 8037E56C 0037B4CC 7C 64 21 10 */ subfe r3, r4, r4 +/* 8037E570 0037B4D0 7C 63 00 D1 */ neg. r3, r3 +/* 8037E574 0037B4D4 41 82 00 7C */ beq lbl_8037E5F0 +/* 8037E578 0037B4D8 48 00 6E 51 */ bl __OSGetSystemTime +/* 8037E57C 0037B4DC 80 DF 00 0C */ lwz r6, 0xc(r31) +/* 8037E580 0037B4E0 38 E0 00 00 */ li r7, 0 +/* 8037E584 0037B4E4 80 1F 00 08 */ lwz r0, 8(r31) +/* 8037E588 0037B4E8 6C E5 80 00 */ xoris r5, r7, 0x8000 +/* 8037E58C 0037B4EC 7D 04 30 10 */ subfc r8, r4, r6 +/* 8037E590 0037B4F0 7C 03 01 10 */ subfe r0, r3, r0 +/* 8037E594 0037B4F4 6C 06 80 00 */ xoris r6, r0, 0x8000 +/* 8037E598 0037B4F8 7C 07 40 10 */ subfc r0, r7, r8 +/* 8037E59C 0037B4FC 7C A5 31 10 */ subfe r5, r5, r6 +/* 8037E5A0 0037B500 7C A6 31 10 */ subfe r5, r6, r6 +/* 8037E5A4 0037B504 7C A5 00 D1 */ neg. r5, r5 +/* 8037E5A8 0037B508 41 82 00 10 */ beq lbl_8037E5B8 +/* 8037E5AC 0037B50C 38 60 00 00 */ li r3, 0 +/* 8037E5B0 0037B510 4B FF 12 55 */ bl PPCMtdec +/* 8037E5B4 0037B514 48 00 00 34 */ b lbl_8037E5E8 +lbl_8037E5B8: +/* 8037E5B8 0037B518 3C 80 80 00 */ lis r4, 0x8000 +/* 8037E5BC 0037B51C 6C E3 80 00 */ xoris r3, r7, 0x8000 +/* 8037E5C0 0037B520 7C 04 40 10 */ subfc r0, r4, r8 +/* 8037E5C4 0037B524 7C 63 31 10 */ subfe r3, r3, r6 +/* 8037E5C8 0037B528 7C 66 31 10 */ subfe r3, r6, r6 +/* 8037E5CC 0037B52C 7C 63 00 D1 */ neg. r3, r3 +/* 8037E5D0 0037B530 41 82 00 10 */ beq lbl_8037E5E0 +/* 8037E5D4 0037B534 7D 03 43 78 */ mr r3, r8 +/* 8037E5D8 0037B538 4B FF 12 2D */ bl PPCMtdec +/* 8037E5DC 0037B53C 48 00 00 0C */ b lbl_8037E5E8 +lbl_8037E5E0: +/* 8037E5E0 0037B540 38 64 FF FF */ addi r3, r4, -1 +/* 8037E5E4 0037B544 4B FF 12 21 */ bl PPCMtdec +lbl_8037E5E8: +/* 8037E5E8 0037B548 7F A3 EB 78 */ mr r3, r29 +/* 8037E5EC 0037B54C 48 00 0F 19 */ bl OSLoadContext +lbl_8037E5F0: +/* 8037E5F0 0037B550 80 7F 00 14 */ lwz r3, 0x14(r31) +/* 8037E5F4 0037B554 28 03 00 00 */ cmplwi r3, 0 +/* 8037E5F8 0037B558 90 6D AC F0 */ stw r3, lbl_805A98B0@sda21(r13) +/* 8037E5FC 0037B55C 40 82 00 14 */ bne lbl_8037E610 +/* 8037E600 0037B560 38 00 00 00 */ li r0, 0 +/* 8037E604 0037B564 38 6D AC F0 */ addi r3, r13, lbl_805A98B0@sda21 +/* 8037E608 0037B568 90 03 00 04 */ stw r0, 4(r3) +/* 8037E60C 0037B56C 48 00 00 0C */ b lbl_8037E618 +lbl_8037E610: +/* 8037E610 0037B570 38 00 00 00 */ li r0, 0 +/* 8037E614 0037B574 90 03 00 10 */ stw r0, 0x10(r3) +lbl_8037E618: +/* 8037E618 0037B578 83 DF 00 00 */ lwz r30, 0(r31) +/* 8037E61C 0037B57C 38 C0 00 00 */ li r6, 0 +/* 8037E620 0037B580 6C C4 80 00 */ xoris r4, r6, 0x8000 +/* 8037E624 0037B584 90 DF 00 00 */ stw r6, 0(r31) +/* 8037E628 0037B588 80 1F 00 18 */ lwz r0, 0x18(r31) +/* 8037E62C 0037B58C 80 BF 00 1C */ lwz r5, 0x1c(r31) +/* 8037E630 0037B590 6C 03 80 00 */ xoris r3, r0, 0x8000 +/* 8037E634 0037B594 7C 05 30 10 */ subfc r0, r5, r6 +/* 8037E638 0037B598 7C 63 21 10 */ subfe r3, r3, r4 +/* 8037E63C 0037B59C 7C 64 21 10 */ subfe r3, r4, r4 +/* 8037E640 0037B5A0 7C 63 00 D1 */ neg. r3, r3 +/* 8037E644 0037B5A4 41 82 00 18 */ beq lbl_8037E65C +/* 8037E648 0037B5A8 38 7F 00 00 */ addi r3, r31, 0 +/* 8037E64C 0037B5AC 38 FE 00 00 */ addi r7, r30, 0 +/* 8037E650 0037B5B0 38 C0 00 00 */ li r6, 0 +/* 8037E654 0037B5B4 38 A0 00 00 */ li r5, 0 +/* 8037E658 0037B5B8 4B FF FA 69 */ bl InsertAlarm +lbl_8037E65C: +/* 8037E65C 0037B5BC 83 8D AC F0 */ lwz r28, lbl_805A98B0@sda21(r13) +/* 8037E660 0037B5C0 28 1C 00 00 */ cmplwi r28, 0 +/* 8037E664 0037B5C4 41 82 00 74 */ beq lbl_8037E6D8 +/* 8037E668 0037B5C8 48 00 6D 61 */ bl __OSGetSystemTime +/* 8037E66C 0037B5CC 80 DC 00 0C */ lwz r6, 0xc(r28) +/* 8037E670 0037B5D0 38 E0 00 00 */ li r7, 0 +/* 8037E674 0037B5D4 80 1C 00 08 */ lwz r0, 8(r28) +/* 8037E678 0037B5D8 6C E5 80 00 */ xoris r5, r7, 0x8000 +/* 8037E67C 0037B5DC 7D 04 30 10 */ subfc r8, r4, r6 +/* 8037E680 0037B5E0 7C 03 01 10 */ subfe r0, r3, r0 +/* 8037E684 0037B5E4 6C 06 80 00 */ xoris r6, r0, 0x8000 +/* 8037E688 0037B5E8 7C 07 40 10 */ subfc r0, r7, r8 +/* 8037E68C 0037B5EC 7C A5 31 10 */ subfe r5, r5, r6 +/* 8037E690 0037B5F0 7C A6 31 10 */ subfe r5, r6, r6 +/* 8037E694 0037B5F4 7C A5 00 D1 */ neg. r5, r5 +/* 8037E698 0037B5F8 41 82 00 10 */ beq lbl_8037E6A8 +/* 8037E69C 0037B5FC 38 60 00 00 */ li r3, 0 +/* 8037E6A0 0037B600 4B FF 11 65 */ bl PPCMtdec +/* 8037E6A4 0037B604 48 00 00 34 */ b lbl_8037E6D8 +lbl_8037E6A8: +/* 8037E6A8 0037B608 3C 80 80 00 */ lis r4, 0x8000 +/* 8037E6AC 0037B60C 6C E3 80 00 */ xoris r3, r7, 0x8000 +/* 8037E6B0 0037B610 7C 04 40 10 */ subfc r0, r4, r8 +/* 8037E6B4 0037B614 7C 63 31 10 */ subfe r3, r3, r6 +/* 8037E6B8 0037B618 7C 66 31 10 */ subfe r3, r6, r6 +/* 8037E6BC 0037B61C 7C 63 00 D1 */ neg. r3, r3 +/* 8037E6C0 0037B620 41 82 00 10 */ beq lbl_8037E6D0 +/* 8037E6C4 0037B624 7D 03 43 78 */ mr r3, r8 +/* 8037E6C8 0037B628 4B FF 11 3D */ bl PPCMtdec +/* 8037E6CC 0037B62C 48 00 00 0C */ b lbl_8037E6D8 +lbl_8037E6D0: +/* 8037E6D0 0037B630 38 64 FF FF */ addi r3, r4, -1 +/* 8037E6D4 0037B634 4B FF 11 31 */ bl PPCMtdec +lbl_8037E6D8: +/* 8037E6D8 0037B638 48 00 5F 09 */ bl OSDisableScheduler +/* 8037E6DC 0037B63C 38 61 00 18 */ addi r3, r1, 0x18 +/* 8037E6E0 0037B640 48 00 0F 35 */ bl OSClearContext +/* 8037E6E4 0037B644 38 61 00 18 */ addi r3, r1, 0x18 +/* 8037E6E8 0037B648 48 00 0D 35 */ bl OSSetCurrentContext +/* 8037E6EC 0037B64C 39 9E 00 00 */ addi r12, r30, 0 +/* 8037E6F0 0037B650 7D 88 03 A6 */ mtlr r12 +/* 8037E6F4 0037B654 38 7F 00 00 */ addi r3, r31, 0 +/* 8037E6F8 0037B658 38 9D 00 00 */ addi r4, r29, 0 +/* 8037E6FC 0037B65C 4E 80 00 21 */ blrl +/* 8037E700 0037B660 38 61 00 18 */ addi r3, r1, 0x18 +/* 8037E704 0037B664 48 00 0F 11 */ bl OSClearContext +/* 8037E708 0037B668 7F A3 EB 78 */ mr r3, r29 +/* 8037E70C 0037B66C 48 00 0D 11 */ bl OSSetCurrentContext +/* 8037E710 0037B670 48 00 5F 11 */ bl OSEnableScheduler +/* 8037E714 0037B674 48 00 63 D9 */ bl __OSReschedule +/* 8037E718 0037B678 7F A3 EB 78 */ mr r3, r29 +/* 8037E71C 0037B67C 48 00 0D E9 */ bl OSLoadContext +/* 8037E720 0037B680 80 01 02 F4 */ lwz r0, 0x2f4(r1) +/* 8037E724 0037B684 83 E1 02 EC */ lwz r31, 0x2ec(r1) +/* 8037E728 0037B688 83 C1 02 E8 */ lwz r30, 0x2e8(r1) +/* 8037E72C 0037B68C 83 A1 02 E4 */ lwz r29, 0x2e4(r1) +/* 8037E730 0037B690 83 81 02 E0 */ lwz r28, 0x2e0(r1) +/* 8037E734 0037B694 38 21 02 F0 */ addi r1, r1, 0x2f0 +/* 8037E738 0037B698 7C 08 03 A6 */ mtlr r0 +/* 8037E73C 0037B69C 4E 80 00 20 */ blr + +.global DecrementerExceptionHandler +DecrementerExceptionHandler: +/* 8037E740 0037B6A0 90 04 00 00 */ stw r0, 0(r4) +/* 8037E744 0037B6A4 90 24 00 04 */ stw r1, 4(r4) +/* 8037E748 0037B6A8 90 44 00 08 */ stw r2, 8(r4) +/* 8037E74C 0037B6AC BC C4 00 18 */ stmw r6, 0x18(r4) +/* 8037E750 0037B6B0 7C 11 E2 A6 */ mfspr r0, 0x391 +/* 8037E754 0037B6B4 90 04 01 A8 */ stw r0, 0x1a8(r4) +/* 8037E758 0037B6B8 7C 12 E2 A6 */ mfspr r0, 0x392 +/* 8037E75C 0037B6BC 90 04 01 AC */ stw r0, 0x1ac(r4) +/* 8037E760 0037B6C0 7C 13 E2 A6 */ mfspr r0, 0x393 +/* 8037E764 0037B6C4 90 04 01 B0 */ stw r0, 0x1b0(r4) +/* 8037E768 0037B6C8 7C 14 E2 A6 */ mfspr r0, 0x394 +/* 8037E76C 0037B6CC 90 04 01 B4 */ stw r0, 0x1b4(r4) +/* 8037E770 0037B6D0 7C 15 E2 A6 */ mfspr r0, 0x395 +/* 8037E774 0037B6D4 90 04 01 B8 */ stw r0, 0x1b8(r4) +/* 8037E778 0037B6D8 7C 16 E2 A6 */ mfspr r0, 0x396 +/* 8037E77C 0037B6DC 90 04 01 BC */ stw r0, 0x1bc(r4) +/* 8037E780 0037B6E0 7C 17 E2 A6 */ mfspr r0, 0x397 +/* 8037E784 0037B6E4 90 04 01 C0 */ stw r0, 0x1c0(r4) +/* 8037E788 0037B6E8 94 21 FF F8 */ stwu r1, -8(r1) +/* 8037E78C 0037B6EC 4B FF FD 84 */ b DecrementerExceptionCallback diff --git a/asm/Dolphin/OS/OSArena.s b/asm/Dolphin/OS/OSArena.s new file mode 100644 index 00000000..bb8d8102 --- /dev/null +++ b/asm/Dolphin/OS/OSArena.s @@ -0,0 +1,39 @@ +.include "macros.inc" + +.section .text, "ax" + +.global OSGetArenaHi +OSGetArenaHi: +/* 8037E790 0037B6F0 80 6D AC F8 */ lwz r3, lbl_805A98B8@sda21(r13) +/* 8037E794 0037B6F4 4E 80 00 20 */ blr + +.global OSGetArenaLo +OSGetArenaLo: +/* 8037E798 0037B6F8 80 6D 9F 70 */ lwz r3, lbl_805A8B30@sda21(r13) +/* 8037E79C 0037B6FC 4E 80 00 20 */ blr + +.global OSSetArenaHi +OSSetArenaHi: +/* 8037E7A0 0037B700 90 6D AC F8 */ stw r3, lbl_805A98B8@sda21(r13) +/* 8037E7A4 0037B704 4E 80 00 20 */ blr + +.global OSSetArenaLo +OSSetArenaLo: +/* 8037E7A8 0037B708 90 6D 9F 70 */ stw r3, lbl_805A8B30@sda21(r13) +/* 8037E7AC 0037B70C 4E 80 00 20 */ blr + +.global OSAllocFromArenaLo +OSAllocFromArenaLo: +/* 8037E7B0 0037B710 80 0D 9F 70 */ lwz r0, lbl_805A8B30@sda21(r13) +/* 8037E7B4 0037B714 38 84 FF FF */ addi r4, r4, -1 +/* 8037E7B8 0037B718 7C 85 20 F8 */ nor r5, r4, r4 +/* 8037E7BC 0037B71C 7C 00 22 14 */ add r0, r0, r4 +/* 8037E7C0 0037B720 7C A6 00 38 */ and r6, r5, r0 +/* 8037E7C4 0037B724 7C 06 1A 14 */ add r0, r6, r3 +/* 8037E7C8 0037B728 7C 00 22 14 */ add r0, r0, r4 +/* 8037E7CC 0037B72C 7C A0 00 38 */ and r0, r5, r0 +/* 8037E7D0 0037B730 90 0D 9F 70 */ stw r0, lbl_805A8B30@sda21(r13) +/* 8037E7D4 0037B734 7C C3 33 78 */ mr r3, r6 +/* 8037E7D8 0037B738 4E 80 00 20 */ blr + + diff --git a/asm/Dolphin/OS/OSAudioSystem.s b/asm/Dolphin/OS/OSAudioSystem.s new file mode 100644 index 00000000..42e99217 --- /dev/null +++ b/asm/Dolphin/OS/OSAudioSystem.s @@ -0,0 +1,193 @@ +.include "macros.inc" + +.section .text, "ax" + +.global __OSInitAudioSystem +__OSInitAudioSystem: +/* 8037E7DC 0037B73C 7C 08 02 A6 */ mflr r0 +/* 8037E7E0 0037B740 90 01 00 04 */ stw r0, 4(r1) +/* 8037E7E4 0037B744 94 21 FF D0 */ stwu r1, -0x30(r1) +/* 8037E7E8 0037B748 BF 21 00 14 */ stmw r25, 0x14(r1) +/* 8037E7EC 0037B74C 4B FF FF A5 */ bl OSGetArenaHi +/* 8037E7F0 0037B750 3C 80 81 00 */ lis r4, 0x8100 +/* 8037E7F4 0037B754 38 A0 00 80 */ li r5, 0x80 +/* 8037E7F8 0037B758 38 63 FF 80 */ addi r3, r3, -128 +/* 8037E7FC 0037B75C 4B C8 4C 95 */ bl memcpy +/* 8037E800 0037B760 3C 60 80 3F */ lis r3, lbl_803F0FA8@ha +/* 8037E804 0037B764 38 83 0F A8 */ addi r4, r3, lbl_803F0FA8@l +/* 8037E808 0037B768 3C 60 81 00 */ lis r3, 0x8100 +/* 8037E80C 0037B76C 38 A0 00 80 */ li r5, 0x80 +/* 8037E810 0037B770 4B C8 4C 81 */ bl memcpy +/* 8037E814 0037B774 3C 60 81 00 */ lis r3, 0x8100 +/* 8037E818 0037B778 38 80 00 80 */ li r4, 0x80 +/* 8037E81C 0037B77C 48 00 02 95 */ bl DCFlushRange +/* 8037E820 0037B780 3C 60 CC 00 */ lis r3, 0xCC005000@ha +/* 8037E824 0037B784 38 63 50 00 */ addi r3, r3, 0xCC005000@l +/* 8037E828 0037B788 38 00 00 43 */ li r0, 0x43 +/* 8037E82C 0037B78C B0 03 00 12 */ sth r0, 0x12(r3) +/* 8037E830 0037B790 3B E3 00 0A */ addi r31, r3, 0xa +/* 8037E834 0037B794 38 00 08 AC */ li r0, 0x8ac +/* 8037E838 0037B798 B0 03 00 0A */ sth r0, 0xa(r3) +/* 8037E83C 0037B79C A0 03 00 0A */ lhz r0, 0xa(r3) +/* 8037E840 0037B7A0 60 00 00 01 */ ori r0, r0, 1 +/* 8037E844 0037B7A4 B0 03 00 0A */ sth r0, 0xa(r3) +lbl_8037E848: +/* 8037E848 0037B7A8 A0 1F 00 00 */ lhz r0, 0(r31) +/* 8037E84C 0037B7AC 54 00 07 FF */ clrlwi. r0, r0, 0x1f +/* 8037E850 0037B7B0 40 82 FF F8 */ bne lbl_8037E848 +/* 8037E854 0037B7B4 38 00 00 00 */ li r0, 0 +/* 8037E858 0037B7B8 3C 80 CC 00 */ lis r4, 0xCC005000@ha +/* 8037E85C 0037B7BC B0 04 50 00 */ sth r0, 0xCC005000@l(r4) +lbl_8037E860: +/* 8037E860 0037B7C0 3B C4 50 00 */ addi r30, r4, 0x5000 +/* 8037E864 0037B7C4 A4 7E 00 04 */ lhzu r3, 4(r30) +/* 8037E868 0037B7C8 3B A4 50 00 */ addi r29, r4, 0x5000 +/* 8037E86C 0037B7CC A4 1D 00 06 */ lhzu r0, 6(r29) +/* 8037E870 0037B7D0 50 60 80 1E */ rlwimi r0, r3, 0x10, 0, 0xf +/* 8037E874 0037B7D4 54 00 00 01 */ rlwinm. r0, r0, 0, 0, 0 +/* 8037E878 0037B7D8 40 82 FF E8 */ bne lbl_8037E860 +/* 8037E87C 0037B7DC 3C 60 CC 00 */ lis r3, 0xCC005000@ha +/* 8037E880 0037B7E0 3C 00 01 00 */ lis r0, 0x100 +/* 8037E884 0037B7E4 3B 63 50 00 */ addi r27, r3, 0xCC005000@l +/* 8037E888 0037B7E8 94 1B 00 20 */ stwu r0, 0x20(r27) +/* 8037E88C 0037B7EC 38 00 00 00 */ li r0, 0 +/* 8037E890 0037B7F0 3B 43 50 00 */ addi r26, r3, 0x5000 +/* 8037E894 0037B7F4 94 1A 00 24 */ stwu r0, 0x24(r26) +/* 8037E898 0037B7F8 38 00 00 20 */ li r0, 0x20 +/* 8037E89C 0037B7FC 3B 23 50 00 */ addi r25, r3, 0x5000 +/* 8037E8A0 0037B800 94 19 00 28 */ stwu r0, 0x28(r25) +/* 8037E8A4 0037B804 A0 7F 00 00 */ lhz r3, 0(r31) +/* 8037E8A8 0037B808 48 00 00 08 */ b lbl_8037E8B0 +lbl_8037E8AC: +/* 8037E8AC 0037B80C A0 7F 00 00 */ lhz r3, 0(r31) +lbl_8037E8B0: +/* 8037E8B0 0037B810 54 60 06 B5 */ rlwinm. r0, r3, 0, 0x1a, 0x1a +/* 8037E8B4 0037B814 41 82 FF F8 */ beq lbl_8037E8AC +/* 8037E8B8 0037B818 B0 7F 00 00 */ sth r3, 0(r31) +/* 8037E8BC 0037B81C 48 00 6B 05 */ bl OSGetTick +/* 8037E8C0 0037B820 7C 7C 1B 78 */ mr r28, r3 +lbl_8037E8C4: +/* 8037E8C4 0037B824 48 00 6A FD */ bl OSGetTick +/* 8037E8C8 0037B828 7C 1C 18 50 */ subf r0, r28, r3 +/* 8037E8CC 0037B82C 2C 00 08 92 */ cmpwi r0, 0x892 +/* 8037E8D0 0037B830 41 80 FF F4 */ blt lbl_8037E8C4 +/* 8037E8D4 0037B834 3C 00 01 00 */ lis r0, 0x100 +/* 8037E8D8 0037B838 90 1B 00 00 */ stw r0, 0(r27) +/* 8037E8DC 0037B83C 38 60 00 00 */ li r3, 0 +/* 8037E8E0 0037B840 38 00 00 20 */ li r0, 0x20 +/* 8037E8E4 0037B844 90 7A 00 00 */ stw r3, 0(r26) +/* 8037E8E8 0037B848 90 19 00 00 */ stw r0, 0(r25) +/* 8037E8EC 0037B84C A0 7F 00 00 */ lhz r3, 0(r31) +/* 8037E8F0 0037B850 48 00 00 08 */ b lbl_8037E8F8 +lbl_8037E8F4: +/* 8037E8F4 0037B854 A0 7F 00 00 */ lhz r3, 0(r31) +lbl_8037E8F8: +/* 8037E8F8 0037B858 54 60 06 B5 */ rlwinm. r0, r3, 0, 0x1a, 0x1a +/* 8037E8FC 0037B85C 41 82 FF F8 */ beq lbl_8037E8F4 +/* 8037E900 0037B860 B0 7F 00 00 */ sth r3, 0(r31) +/* 8037E904 0037B864 A0 1F 00 00 */ lhz r0, 0(r31) +/* 8037E908 0037B868 54 00 05 66 */ rlwinm r0, r0, 0, 0x15, 0x13 +/* 8037E90C 0037B86C B0 1F 00 00 */ sth r0, 0(r31) +lbl_8037E910: +/* 8037E910 0037B870 A0 1F 00 00 */ lhz r0, 0(r31) +/* 8037E914 0037B874 54 00 05 6B */ rlwinm. r0, r0, 0, 0x15, 0x15 +/* 8037E918 0037B878 40 82 FF F8 */ bne lbl_8037E910 +/* 8037E91C 0037B87C A0 1F 00 00 */ lhz r0, 0(r31) +/* 8037E920 0037B880 54 00 07 B8 */ rlwinm r0, r0, 0, 0x1e, 0x1c +/* 8037E924 0037B884 B0 1F 00 00 */ sth r0, 0(r31) +/* 8037E928 0037B888 A0 1E 00 00 */ lhz r0, 0(r30) +/* 8037E92C 0037B88C 48 00 00 08 */ b lbl_8037E934 +lbl_8037E930: +/* 8037E930 0037B890 A0 1E 00 00 */ lhz r0, 0(r30) +lbl_8037E934: +/* 8037E934 0037B894 54 05 04 3E */ clrlwi r5, r0, 0x10 +/* 8037E938 0037B898 54 00 04 21 */ rlwinm. r0, r0, 0, 0x10, 0x10 +/* 8037E93C 0037B89C 41 82 FF F4 */ beq lbl_8037E930 +/* 8037E940 0037B8A0 A0 1F 00 00 */ lhz r0, 0(r31) +/* 8037E944 0037B8A4 A0 9D 00 00 */ lhz r4, 0(r29) +/* 8037E948 0037B8A8 60 00 00 04 */ ori r0, r0, 4 +/* 8037E94C 0037B8AC B0 1F 00 00 */ sth r0, 0(r31) +/* 8037E950 0037B8B0 38 00 08 AC */ li r0, 0x8ac +/* 8037E954 0037B8B4 B0 1F 00 00 */ sth r0, 0(r31) +/* 8037E958 0037B8B8 A0 1F 00 00 */ lhz r0, 0(r31) +/* 8037E95C 0037B8BC 60 00 00 01 */ ori r0, r0, 1 +/* 8037E960 0037B8C0 B0 1F 00 00 */ sth r0, 0(r31) +lbl_8037E964: +/* 8037E964 0037B8C4 A0 1F 00 00 */ lhz r0, 0(r31) +/* 8037E968 0037B8C8 54 00 07 FF */ clrlwi. r0, r0, 0x1f +/* 8037E96C 0037B8CC 40 82 FF F8 */ bne lbl_8037E964 +/* 8037E970 0037B8D0 4B FF FE 21 */ bl OSGetArenaHi +/* 8037E974 0037B8D4 38 83 FF 80 */ addi r4, r3, -128 +/* 8037E978 0037B8D8 3C 60 81 00 */ lis r3, 0x8100 +/* 8037E97C 0037B8DC 38 A0 00 80 */ li r5, 0x80 +/* 8037E980 0037B8E0 4B C8 4B 11 */ bl memcpy +/* 8037E984 0037B8E4 BB 21 00 14 */ lmw r25, 0x14(r1) +/* 8037E988 0037B8E8 80 01 00 34 */ lwz r0, 0x34(r1) +/* 8037E98C 0037B8EC 38 21 00 30 */ addi r1, r1, 0x30 +/* 8037E990 0037B8F0 7C 08 03 A6 */ mtlr r0 +/* 8037E994 0037B8F4 4E 80 00 20 */ blr + +.global __OSStopAudioSystem +__OSStopAudioSystem: +/* 8037E998 0037B8F8 7C 08 02 A6 */ mflr r0 +/* 8037E99C 0037B8FC 3C 60 CC 00 */ lis r3, 0xCC005000@ha +/* 8037E9A0 0037B900 90 01 00 04 */ stw r0, 4(r1) +/* 8037E9A4 0037B904 38 00 08 04 */ li r0, 0x804 +/* 8037E9A8 0037B908 94 21 FF F0 */ stwu r1, -0x10(r1) +/* 8037E9AC 0037B90C 93 E1 00 0C */ stw r31, 0xc(r1) +/* 8037E9B0 0037B910 3B E3 50 00 */ addi r31, r3, 0xCC005000@l +/* 8037E9B4 0037B914 38 63 50 00 */ addi r3, r3, 0x5000 +/* 8037E9B8 0037B918 93 C1 00 08 */ stw r30, 8(r1) +/* 8037E9BC 0037B91C B0 1F 00 0A */ sth r0, 0xa(r31) +/* 8037E9C0 0037B920 A0 03 00 36 */ lhz r0, 0x36(r3) +/* 8037E9C4 0037B924 54 00 04 5E */ rlwinm r0, r0, 0, 0x11, 0xf +/* 8037E9C8 0037B928 B0 03 00 36 */ sth r0, 0x36(r3) +/* 8037E9CC 0037B92C A4 1F 00 0A */ lhzu r0, 0xa(r31) +/* 8037E9D0 0037B930 48 00 00 08 */ b lbl_8037E9D8 +lbl_8037E9D4: +/* 8037E9D4 0037B934 A0 1F 00 00 */ lhz r0, 0(r31) +lbl_8037E9D8: +/* 8037E9D8 0037B938 54 00 05 6B */ rlwinm. r0, r0, 0, 0x15, 0x15 +/* 8037E9DC 0037B93C 40 82 FF F8 */ bne lbl_8037E9D4 +/* 8037E9E0 0037B940 A0 1F 00 00 */ lhz r0, 0(r31) +/* 8037E9E4 0037B944 48 00 00 08 */ b lbl_8037E9EC +lbl_8037E9E8: +/* 8037E9E8 0037B948 A0 1F 00 00 */ lhz r0, 0(r31) +lbl_8037E9EC: +/* 8037E9EC 0037B94C 54 00 05 AD */ rlwinm. r0, r0, 0, 0x16, 0x16 +/* 8037E9F0 0037B950 40 82 FF F8 */ bne lbl_8037E9E8 +/* 8037E9F4 0037B954 38 00 08 AC */ li r0, 0x8ac +/* 8037E9F8 0037B958 3C 60 CC 00 */ lis r3, 0xCC005000@ha +/* 8037E9FC 0037B95C B0 1F 00 00 */ sth r0, 0(r31) +/* 8037EA00 0037B960 38 00 00 00 */ li r0, 0 +/* 8037EA04 0037B964 B0 03 50 00 */ sth r0, 0xCC005000@l(r3) +/* 8037EA08 0037B968 38 83 50 00 */ addi r4, r3, 0x5000 +lbl_8037EA0C: +/* 8037EA0C 0037B96C A0 64 00 04 */ lhz r3, 4(r4) +/* 8037EA10 0037B970 A0 04 00 06 */ lhz r0, 6(r4) +/* 8037EA14 0037B974 50 60 80 1E */ rlwimi r0, r3, 0x10, 0, 0xf +/* 8037EA18 0037B978 54 00 00 01 */ rlwinm. r0, r0, 0, 0, 0 +/* 8037EA1C 0037B97C 40 82 FF F0 */ bne lbl_8037EA0C +/* 8037EA20 0037B980 48 00 69 A1 */ bl OSGetTick +/* 8037EA24 0037B984 7C 7E 1B 78 */ mr r30, r3 +lbl_8037EA28: +/* 8037EA28 0037B988 48 00 69 99 */ bl OSGetTick +/* 8037EA2C 0037B98C 7C 1E 18 50 */ subf r0, r30, r3 +/* 8037EA30 0037B990 2C 00 00 2C */ cmpwi r0, 0x2c +/* 8037EA34 0037B994 41 80 FF F4 */ blt lbl_8037EA28 +/* 8037EA38 0037B998 A0 1F 00 00 */ lhz r0, 0(r31) +/* 8037EA3C 0037B99C 60 00 00 01 */ ori r0, r0, 1 +/* 8037EA40 0037B9A0 B0 1F 00 00 */ sth r0, 0(r31) +/* 8037EA44 0037B9A4 A0 1F 00 00 */ lhz r0, 0(r31) +/* 8037EA48 0037B9A8 48 00 00 08 */ b lbl_8037EA50 +lbl_8037EA4C: +/* 8037EA4C 0037B9AC A0 1F 00 00 */ lhz r0, 0(r31) +lbl_8037EA50: +/* 8037EA50 0037B9B0 54 00 07 FF */ clrlwi. r0, r0, 0x1f +/* 8037EA54 0037B9B4 40 82 FF F8 */ bne lbl_8037EA4C +/* 8037EA58 0037B9B8 80 01 00 14 */ lwz r0, 0x14(r1) +/* 8037EA5C 0037B9BC 83 E1 00 0C */ lwz r31, 0xc(r1) +/* 8037EA60 0037B9C0 83 C1 00 08 */ lwz r30, 8(r1) +/* 8037EA64 0037B9C4 38 21 00 10 */ addi r1, r1, 0x10 +/* 8037EA68 0037B9C8 7C 08 03 A6 */ mtlr r0 +/* 8037EA6C 0037B9CC 4E 80 00 20 */ blr diff --git a/asm/Dolphin/OS/OSCache.s b/asm/Dolphin/OS/OSCache.s new file mode 100644 index 00000000..b87bbb8a --- /dev/null +++ b/asm/Dolphin/OS/OSCache.s @@ -0,0 +1,579 @@ +.include "macros.inc" + +.section .text, "ax" + +.global DCEnable +DCEnable: +/* 8037EA70 0037B9D0 7C 00 04 AC */ sync 0 +/* 8037EA74 0037B9D4 7C 70 FA A6 */ mfspr r3, 0x3f0 +/* 8037EA78 0037B9D8 60 63 40 00 */ ori r3, r3, 0x4000 +/* 8037EA7C 0037B9DC 7C 70 FB A6 */ mtspr 0x3f0, r3 +/* 8037EA80 0037B9E0 4E 80 00 20 */ blr + +.global DCInvalidateRange +DCInvalidateRange: +/* 8037EA84 0037B9E4 28 04 00 00 */ cmplwi r4, 0 +/* 8037EA88 0037B9E8 4C 81 00 20 */ blelr +/* 8037EA8C 0037B9EC 54 65 06 FE */ clrlwi r5, r3, 0x1b +/* 8037EA90 0037B9F0 7C 84 2A 14 */ add r4, r4, r5 +/* 8037EA94 0037B9F4 38 84 00 1F */ addi r4, r4, 0x1f +/* 8037EA98 0037B9F8 54 84 D9 7E */ srwi r4, r4, 5 +/* 8037EA9C 0037B9FC 7C 89 03 A6 */ mtctr r4 +lbl_8037EAA0: +/* 8037EAA0 0037BA00 7C 00 1B AC */ dcbi 0, r3 +/* 8037EAA4 0037BA04 38 63 00 20 */ addi r3, r3, 0x20 +/* 8037EAA8 0037BA08 42 00 FF F8 */ bdnz lbl_8037EAA0 +/* 8037EAAC 0037BA0C 4E 80 00 20 */ blr + +.global DCFlushRange +DCFlushRange: +/* 8037EAB0 0037BA10 28 04 00 00 */ cmplwi r4, 0 +/* 8037EAB4 0037BA14 4C 81 00 20 */ blelr +/* 8037EAB8 0037BA18 54 65 06 FE */ clrlwi r5, r3, 0x1b +/* 8037EABC 0037BA1C 7C 84 2A 14 */ add r4, r4, r5 +/* 8037EAC0 0037BA20 38 84 00 1F */ addi r4, r4, 0x1f +/* 8037EAC4 0037BA24 54 84 D9 7E */ srwi r4, r4, 5 +/* 8037EAC8 0037BA28 7C 89 03 A6 */ mtctr r4 +lbl_8037EACC: +/* 8037EACC 0037BA2C 7C 00 18 AC */ dcbf 0, r3 +/* 8037EAD0 0037BA30 38 63 00 20 */ addi r3, r3, 0x20 +/* 8037EAD4 0037BA34 42 00 FF F8 */ bdnz lbl_8037EACC +/* 8037EAD8 0037BA38 44 00 00 02 */ sc +/* 8037EADC 0037BA3C 4E 80 00 20 */ blr + +.global DCStoreRange +DCStoreRange: +/* 8037EAE0 0037BA40 28 04 00 00 */ cmplwi r4, 0 +/* 8037EAE4 0037BA44 4C 81 00 20 */ blelr +/* 8037EAE8 0037BA48 54 65 06 FE */ clrlwi r5, r3, 0x1b +/* 8037EAEC 0037BA4C 7C 84 2A 14 */ add r4, r4, r5 +/* 8037EAF0 0037BA50 38 84 00 1F */ addi r4, r4, 0x1f +/* 8037EAF4 0037BA54 54 84 D9 7E */ srwi r4, r4, 5 +/* 8037EAF8 0037BA58 7C 89 03 A6 */ mtctr r4 +lbl_8037EAFC: +/* 8037EAFC 0037BA5C 7C 00 18 6C */ dcbst 0, r3 +/* 8037EB00 0037BA60 38 63 00 20 */ addi r3, r3, 0x20 +/* 8037EB04 0037BA64 42 00 FF F8 */ bdnz lbl_8037EAFC +/* 8037EB08 0037BA68 44 00 00 02 */ sc +/* 8037EB0C 0037BA6C 4E 80 00 20 */ blr + +.global DCFlushRangeNoSync +DCFlushRangeNoSync: +/* 8037EB10 0037BA70 28 04 00 00 */ cmplwi r4, 0 +/* 8037EB14 0037BA74 4C 81 00 20 */ blelr +/* 8037EB18 0037BA78 54 65 06 FE */ clrlwi r5, r3, 0x1b +/* 8037EB1C 0037BA7C 7C 84 2A 14 */ add r4, r4, r5 +/* 8037EB20 0037BA80 38 84 00 1F */ addi r4, r4, 0x1f +/* 8037EB24 0037BA84 54 84 D9 7E */ srwi r4, r4, 5 +/* 8037EB28 0037BA88 7C 89 03 A6 */ mtctr r4 +lbl_8037EB2C: +/* 8037EB2C 0037BA8C 7C 00 18 AC */ dcbf 0, r3 +/* 8037EB30 0037BA90 38 63 00 20 */ addi r3, r3, 0x20 +/* 8037EB34 0037BA94 42 00 FF F8 */ bdnz lbl_8037EB2C +/* 8037EB38 0037BA98 4E 80 00 20 */ blr + +.global DCStoreRangeNoSync +DCStoreRangeNoSync: +/* 8037EB3C 0037BA9C 28 04 00 00 */ cmplwi r4, 0 +/* 8037EB40 0037BAA0 4C 81 00 20 */ blelr +/* 8037EB44 0037BAA4 54 65 06 FE */ clrlwi r5, r3, 0x1b +/* 8037EB48 0037BAA8 7C 84 2A 14 */ add r4, r4, r5 +/* 8037EB4C 0037BAAC 38 84 00 1F */ addi r4, r4, 0x1f +/* 8037EB50 0037BAB0 54 84 D9 7E */ srwi r4, r4, 5 +/* 8037EB54 0037BAB4 7C 89 03 A6 */ mtctr r4 +lbl_8037EB58: +/* 8037EB58 0037BAB8 7C 00 18 6C */ dcbst 0, r3 +/* 8037EB5C 0037BABC 38 63 00 20 */ addi r3, r3, 0x20 +/* 8037EB60 0037BAC0 42 00 FF F8 */ bdnz lbl_8037EB58 +/* 8037EB64 0037BAC4 4E 80 00 20 */ blr + +.global DCZeroRange +DCZeroRange: +/* 8037EB68 0037BAC8 28 04 00 00 */ cmplwi r4, 0 +/* 8037EB6C 0037BACC 4C 81 00 20 */ blelr +/* 8037EB70 0037BAD0 54 65 06 FE */ clrlwi r5, r3, 0x1b +/* 8037EB74 0037BAD4 7C 84 2A 14 */ add r4, r4, r5 +/* 8037EB78 0037BAD8 38 84 00 1F */ addi r4, r4, 0x1f +/* 8037EB7C 0037BADC 54 84 D9 7E */ srwi r4, r4, 5 +/* 8037EB80 0037BAE0 7C 89 03 A6 */ mtctr r4 +lbl_8037EB84: +/* 8037EB84 0037BAE4 7C 00 1F EC */ dcbz 0, r3 +/* 8037EB88 0037BAE8 38 63 00 20 */ addi r3, r3, 0x20 +/* 8037EB8C 0037BAEC 42 00 FF F8 */ bdnz lbl_8037EB84 + +.global sub_8037eb90 +sub_8037eb90: +/* 8037EB90 0037BAF0 4E 80 00 20 */ blr + +.global ICInvalidateRange +ICInvalidateRange: +/* 8037EB94 0037BAF4 28 04 00 00 */ cmplwi r4, 0 +/* 8037EB98 0037BAF8 4C 81 00 20 */ blelr +/* 8037EB9C 0037BAFC 54 65 06 FE */ clrlwi r5, r3, 0x1b +/* 8037EBA0 0037BB00 7C 84 2A 14 */ add r4, r4, r5 +/* 8037EBA4 0037BB04 38 84 00 1F */ addi r4, r4, 0x1f +/* 8037EBA8 0037BB08 54 84 D9 7E */ srwi r4, r4, 5 +/* 8037EBAC 0037BB0C 7C 89 03 A6 */ mtctr r4 +lbl_8037EBB0: +/* 8037EBB0 0037BB10 7C 00 1F AC */ icbi 0, r3 +/* 8037EBB4 0037BB14 38 63 00 20 */ addi r3, r3, 0x20 +/* 8037EBB8 0037BB18 42 00 FF F8 */ bdnz lbl_8037EBB0 +/* 8037EBBC 0037BB1C 7C 00 04 AC */ sync 0 +/* 8037EBC0 0037BB20 4C 00 01 2C */ isync +/* 8037EBC4 0037BB24 4E 80 00 20 */ blr + +.global ICFlashInvalidate +ICFlashInvalidate: +/* 8037EBC8 0037BB28 7C 70 FA A6 */ mfspr r3, 0x3f0 +/* 8037EBCC 0037BB2C 60 63 08 00 */ ori r3, r3, 0x800 +/* 8037EBD0 0037BB30 7C 70 FB A6 */ mtspr 0x3f0, r3 +/* 8037EBD4 0037BB34 4E 80 00 20 */ blr + +.global ICEnable +ICEnable: +/* 8037EBD8 0037BB38 4C 00 01 2C */ isync +/* 8037EBDC 0037BB3C 7C 70 FA A6 */ mfspr r3, 0x3f0 +/* 8037EBE0 0037BB40 60 63 80 00 */ ori r3, r3, 0x8000 +/* 8037EBE4 0037BB44 7C 70 FB A6 */ mtspr 0x3f0, r3 +/* 8037EBE8 0037BB48 4E 80 00 20 */ blr + +.global __LCEnable +__LCEnable: +/* 8037EBEC 0037BB4C 7C A0 00 A6 */ mfmsr r5 +/* 8037EBF0 0037BB50 60 A5 10 00 */ ori r5, r5, 0x1000 +/* 8037EBF4 0037BB54 7C A0 01 24 */ mtmsr r5 +/* 8037EBF8 0037BB58 3C 60 80 00 */ lis r3, 0x80000020@ha +/* 8037EBFC 0037BB5C 38 80 04 00 */ li r4, 0x400 +/* 8037EC00 0037BB60 7C 89 03 A6 */ mtctr r4 +lbl_8037EC04: +/* 8037EC04 0037BB64 7C 00 1A 2C */ dcbt 0, r3 +/* 8037EC08 0037BB68 7C 00 18 6C */ dcbst 0, r3 +/* 8037EC0C 0037BB6C 38 63 00 20 */ addi r3, r3, 0x80000020@l +/* 8037EC10 0037BB70 42 00 FF F4 */ bdnz lbl_8037EC04 +/* 8037EC14 0037BB74 7C 98 E2 A6 */ mfspr r4, 0x398 +/* 8037EC18 0037BB78 64 84 10 0F */ oris r4, r4, 0x100f +/* 8037EC1C 0037BB7C 7C 98 E3 A6 */ mtspr 0x398, r4 +/* 8037EC20 0037BB80 60 00 00 00 */ nop +/* 8037EC24 0037BB84 60 00 00 00 */ nop +/* 8037EC28 0037BB88 60 00 00 00 */ nop +/* 8037EC2C 0037BB8C 60 00 00 00 */ nop +/* 8037EC30 0037BB90 60 00 00 00 */ nop +/* 8037EC34 0037BB94 60 00 00 00 */ nop +/* 8037EC38 0037BB98 60 00 00 00 */ nop +/* 8037EC3C 0037BB9C 60 00 00 00 */ nop +/* 8037EC40 0037BBA0 60 00 00 00 */ nop +/* 8037EC44 0037BBA4 60 00 00 00 */ nop +/* 8037EC48 0037BBA8 60 00 00 00 */ nop +/* 8037EC4C 0037BBAC 60 00 00 00 */ nop +/* 8037EC50 0037BBB0 3C 60 E0 00 */ lis r3, 0xE0000002@h +/* 8037EC54 0037BBB4 60 63 00 02 */ ori r3, r3, 0xE0000002@l +/* 8037EC58 0037BBB8 7C 7F 83 A6 */ mtdbatl 3, r3 +/* 8037EC5C 0037BBBC 60 63 01 FE */ ori r3, r3, 0x1fe +/* 8037EC60 0037BBC0 7C 7E 83 A6 */ mtdbatu 3, r3 +/* 8037EC64 0037BBC4 4C 00 01 2C */ isync +/* 8037EC68 0037BBC8 3C 60 E0 00 */ lis r3, 0xE0000020@ha +/* 8037EC6C 0037BBCC 38 C0 02 00 */ li r6, 0x200 +/* 8037EC70 0037BBD0 7C C9 03 A6 */ mtctr r6 +/* 8037EC74 0037BBD4 38 C0 00 00 */ li r6, 0 +lbl_8037EC78: +/* 8037EC78 0037BBD8 10 06 1F EC */ dcbz_l r6, r3 +/* 8037EC7C 0037BBDC 38 63 00 20 */ addi r3, r3, 0xE0000020@l +/* 8037EC80 0037BBE0 42 00 FF F8 */ bdnz lbl_8037EC78 +/* 8037EC84 0037BBE4 60 00 00 00 */ nop +/* 8037EC88 0037BBE8 60 00 00 00 */ nop +/* 8037EC8C 0037BBEC 60 00 00 00 */ nop +/* 8037EC90 0037BBF0 60 00 00 00 */ nop +/* 8037EC94 0037BBF4 60 00 00 00 */ nop +/* 8037EC98 0037BBF8 60 00 00 00 */ nop +/* 8037EC9C 0037BBFC 60 00 00 00 */ nop +/* 8037ECA0 0037BC00 60 00 00 00 */ nop +/* 8037ECA4 0037BC04 60 00 00 00 */ nop +/* 8037ECA8 0037BC08 60 00 00 00 */ nop +/* 8037ECAC 0037BC0C 60 00 00 00 */ nop +/* 8037ECB0 0037BC10 60 00 00 00 */ nop +/* 8037ECB4 0037BC14 4E 80 00 20 */ blr + +.global LCEnable +LCEnable: +/* 8037ECB8 0037BC18 7C 08 02 A6 */ mflr r0 +/* 8037ECBC 0037BC1C 90 01 00 04 */ stw r0, 4(r1) +/* 8037ECC0 0037BC20 94 21 FF F0 */ stwu r1, -0x10(r1) +/* 8037ECC4 0037BC24 93 E1 00 0C */ stw r31, 0xc(r1) +/* 8037ECC8 0037BC28 48 00 29 99 */ bl OSDisableInterrupts +/* 8037ECCC 0037BC2C 7C 7F 1B 78 */ mr r31, r3 +/* 8037ECD0 0037BC30 4B FF FF 1D */ bl __LCEnable +/* 8037ECD4 0037BC34 7F E3 FB 78 */ mr r3, r31 +/* 8037ECD8 0037BC38 48 00 29 B1 */ bl OSRestoreInterrupts +/* 8037ECDC 0037BC3C 80 01 00 14 */ lwz r0, 0x14(r1) +/* 8037ECE0 0037BC40 83 E1 00 0C */ lwz r31, 0xc(r1) +/* 8037ECE4 0037BC44 38 21 00 10 */ addi r1, r1, 0x10 +/* 8037ECE8 0037BC48 7C 08 03 A6 */ mtlr r0 +/* 8037ECEC 0037BC4C 4E 80 00 20 */ blr + +.global LCDisable +LCDisable: +/* 8037ECF0 0037BC50 3C 60 E0 00 */ lis r3, 0xE0000020@ha +/* 8037ECF4 0037BC54 38 80 02 00 */ li r4, 0x200 +/* 8037ECF8 0037BC58 7C 89 03 A6 */ mtctr r4 +lbl_8037ECFC: +/* 8037ECFC 0037BC5C 7C 00 1B AC */ dcbi 0, r3 +/* 8037ED00 0037BC60 38 63 00 20 */ addi r3, r3, 0xE0000020@l +/* 8037ED04 0037BC64 42 00 FF F8 */ bdnz lbl_8037ECFC +/* 8037ED08 0037BC68 7C 98 E2 A6 */ mfspr r4, 0x398 +/* 8037ED0C 0037BC6C 54 84 01 04 */ rlwinm r4, r4, 0, 4, 2 +/* 8037ED10 0037BC70 7C 98 E3 A6 */ mtspr 0x398, r4 +/* 8037ED14 0037BC74 4E 80 00 20 */ blr + +.global sub_8037ed18 +sub_8037ed18: +/* 8037ED18 0037BC78 54 A6 F6 FE */ rlwinm r6, r5, 0x1e, 0x1b, 0x1f +/* 8037ED1C 0037BC7C 54 84 01 3E */ clrlwi r4, r4, 4 +/* 8037ED20 0037BC80 7C C6 23 78 */ or r6, r6, r4 +/* 8037ED24 0037BC84 7C DA E3 A6 */ mtspr 0x39a, r6 +/* 8037ED28 0037BC88 54 A6 17 3A */ rlwinm r6, r5, 2, 0x1c, 0x1d +/* 8037ED2C 0037BC8C 7C C6 1B 78 */ or r6, r6, r3 +/* 8037ED30 0037BC90 60 C6 00 12 */ ori r6, r6, 0x12 +/* 8037ED34 0037BC94 7C DB E3 A6 */ mtspr 0x39b, r6 +/* 8037ED38 0037BC98 4E 80 00 20 */ blr + +.global LCStoreBlocks +LCStoreBlocks: +/* 8037ED3C 0037BC9C 54 A6 F6 FE */ rlwinm r6, r5, 0x1e, 0x1b, 0x1f +/* 8037ED40 0037BCA0 54 63 01 3E */ clrlwi r3, r3, 4 +/* 8037ED44 0037BCA4 7C C6 1B 78 */ or r6, r6, r3 +/* 8037ED48 0037BCA8 7C DA E3 A6 */ mtspr 0x39a, r6 +/* 8037ED4C 0037BCAC 54 A6 17 3A */ rlwinm r6, r5, 2, 0x1c, 0x1d +/* 8037ED50 0037BCB0 7C C6 23 78 */ or r6, r6, r4 +/* 8037ED54 0037BCB4 60 C6 00 02 */ ori r6, r6, 2 +/* 8037ED58 0037BCB8 7C DB E3 A6 */ mtspr 0x39b, r6 +/* 8037ED5C 0037BCBC 4E 80 00 20 */ blr + +.global sub_8037ed60 +sub_8037ed60: +/* 8037ED60 0037BCC0 7C 08 02 A6 */ mflr r0 +/* 8037ED64 0037BCC4 90 01 00 04 */ stw r0, 4(r1) +/* 8037ED68 0037BCC8 94 21 FF D8 */ stwu r1, -0x28(r1) +/* 8037ED6C 0037BCCC 93 E1 00 24 */ stw r31, 0x24(r1) +/* 8037ED70 0037BCD0 93 C1 00 20 */ stw r30, 0x20(r1) +/* 8037ED74 0037BCD4 93 A1 00 1C */ stw r29, 0x1c(r1) +/* 8037ED78 0037BCD8 93 81 00 18 */ stw r28, 0x18(r1) +/* 8037ED7C 0037BCDC 7C 7C 1B 78 */ mr r28, r3 +/* 8037ED80 0037BCE0 7C 9D 23 78 */ mr r29, r4 +/* 8037ED84 0037BCE4 38 05 00 1F */ addi r0, r5, 0x1f +/* 8037ED88 0037BCE8 54 03 D9 7E */ srwi r3, r0, 5 +/* 8037ED8C 0037BCEC 38 03 00 7F */ addi r0, r3, 0x7f +/* 8037ED90 0037BCF0 7C 7F 1B 78 */ mr r31, r3 +/* 8037ED94 0037BCF4 54 1E C9 FE */ srwi r30, r0, 7 +/* 8037ED98 0037BCF8 48 00 00 04 */ b lbl_8037ED9C +lbl_8037ED9C: +/* 8037ED9C 0037BCFC 48 00 00 04 */ b lbl_8037EDA0 +lbl_8037EDA0: +/* 8037EDA0 0037BD00 48 00 00 40 */ b lbl_8037EDE0 +lbl_8037EDA4: +/* 8037EDA4 0037BD04 28 1F 00 80 */ cmplwi r31, 0x80 +/* 8037EDA8 0037BD08 40 80 00 1C */ bge lbl_8037EDC4 +/* 8037EDAC 0037BD0C 7F 83 E3 78 */ mr r3, r28 +/* 8037EDB0 0037BD10 7F A4 EB 78 */ mr r4, r29 +/* 8037EDB4 0037BD14 7F E5 FB 78 */ mr r5, r31 +/* 8037EDB8 0037BD18 4B FF FF 61 */ bl sub_8037ed18 +/* 8037EDBC 0037BD1C 3B E0 00 00 */ li r31, 0 +/* 8037EDC0 0037BD20 48 00 00 20 */ b lbl_8037EDE0 +lbl_8037EDC4: +/* 8037EDC4 0037BD24 7F 83 E3 78 */ mr r3, r28 +/* 8037EDC8 0037BD28 7F A4 EB 78 */ mr r4, r29 +/* 8037EDCC 0037BD2C 38 A0 00 00 */ li r5, 0 +/* 8037EDD0 0037BD30 4B FF FF 49 */ bl sub_8037ed18 +/* 8037EDD4 0037BD34 3B FF FF 80 */ addi r31, r31, -128 +/* 8037EDD8 0037BD38 3B 9C 10 00 */ addi r28, r28, 0x1000 +/* 8037EDDC 0037BD3C 3B BD 10 00 */ addi r29, r29, 0x1000 +lbl_8037EDE0: +/* 8037EDE0 0037BD40 28 1F 00 00 */ cmplwi r31, 0 +/* 8037EDE4 0037BD44 40 82 FF C0 */ bne lbl_8037EDA4 +/* 8037EDE8 0037BD48 7F C3 F3 78 */ mr r3, r30 +/* 8037EDEC 0037BD4C 80 01 00 2C */ lwz r0, 0x2c(r1) +/* 8037EDF0 0037BD50 83 E1 00 24 */ lwz r31, 0x24(r1) +/* 8037EDF4 0037BD54 83 C1 00 20 */ lwz r30, 0x20(r1) +/* 8037EDF8 0037BD58 83 A1 00 1C */ lwz r29, 0x1c(r1) +/* 8037EDFC 0037BD5C 83 81 00 18 */ lwz r28, 0x18(r1) +/* 8037EE00 0037BD60 38 21 00 28 */ addi r1, r1, 0x28 +/* 8037EE04 0037BD64 7C 08 03 A6 */ mtlr r0 +/* 8037EE08 0037BD68 4E 80 00 20 */ blr + +.global LCStoreData +LCStoreData: +/* 8037EE0C 0037BD6C 7C 08 02 A6 */ mflr r0 +/* 8037EE10 0037BD70 90 01 00 04 */ stw r0, 4(r1) +/* 8037EE14 0037BD74 94 21 FF D8 */ stwu r1, -0x28(r1) +/* 8037EE18 0037BD78 93 E1 00 24 */ stw r31, 0x24(r1) +/* 8037EE1C 0037BD7C 93 C1 00 20 */ stw r30, 0x20(r1) +/* 8037EE20 0037BD80 93 A1 00 1C */ stw r29, 0x1c(r1) +/* 8037EE24 0037BD84 93 81 00 18 */ stw r28, 0x18(r1) +/* 8037EE28 0037BD88 7C 7C 1B 78 */ mr r28, r3 +/* 8037EE2C 0037BD8C 7C 9D 23 78 */ mr r29, r4 +/* 8037EE30 0037BD90 38 05 00 1F */ addi r0, r5, 0x1f +/* 8037EE34 0037BD94 54 03 D9 7E */ srwi r3, r0, 5 +/* 8037EE38 0037BD98 38 03 00 7F */ addi r0, r3, 0x7f +/* 8037EE3C 0037BD9C 7C 7F 1B 78 */ mr r31, r3 +/* 8037EE40 0037BDA0 54 1E C9 FE */ srwi r30, r0, 7 +/* 8037EE44 0037BDA4 48 00 00 04 */ b lbl_8037EE48 +lbl_8037EE48: +/* 8037EE48 0037BDA8 48 00 00 04 */ b lbl_8037EE4C +lbl_8037EE4C: +/* 8037EE4C 0037BDAC 48 00 00 40 */ b lbl_8037EE8C +lbl_8037EE50: +/* 8037EE50 0037BDB0 28 1F 00 80 */ cmplwi r31, 0x80 +/* 8037EE54 0037BDB4 40 80 00 1C */ bge lbl_8037EE70 +/* 8037EE58 0037BDB8 7F 83 E3 78 */ mr r3, r28 +/* 8037EE5C 0037BDBC 7F A4 EB 78 */ mr r4, r29 +/* 8037EE60 0037BDC0 7F E5 FB 78 */ mr r5, r31 +/* 8037EE64 0037BDC4 4B FF FE D9 */ bl LCStoreBlocks +/* 8037EE68 0037BDC8 3B E0 00 00 */ li r31, 0 +/* 8037EE6C 0037BDCC 48 00 00 20 */ b lbl_8037EE8C +lbl_8037EE70: +/* 8037EE70 0037BDD0 7F 83 E3 78 */ mr r3, r28 +/* 8037EE74 0037BDD4 7F A4 EB 78 */ mr r4, r29 +/* 8037EE78 0037BDD8 38 A0 00 00 */ li r5, 0 +/* 8037EE7C 0037BDDC 4B FF FE C1 */ bl LCStoreBlocks +/* 8037EE80 0037BDE0 3B FF FF 80 */ addi r31, r31, -128 +/* 8037EE84 0037BDE4 3B 9C 10 00 */ addi r28, r28, 0x1000 +/* 8037EE88 0037BDE8 3B BD 10 00 */ addi r29, r29, 0x1000 +lbl_8037EE8C: +/* 8037EE8C 0037BDEC 28 1F 00 00 */ cmplwi r31, 0 +/* 8037EE90 0037BDF0 40 82 FF C0 */ bne lbl_8037EE50 +/* 8037EE94 0037BDF4 7F C3 F3 78 */ mr r3, r30 +/* 8037EE98 0037BDF8 80 01 00 2C */ lwz r0, 0x2c(r1) +/* 8037EE9C 0037BDFC 83 E1 00 24 */ lwz r31, 0x24(r1) +/* 8037EEA0 0037BE00 83 C1 00 20 */ lwz r30, 0x20(r1) +/* 8037EEA4 0037BE04 83 A1 00 1C */ lwz r29, 0x1c(r1) +/* 8037EEA8 0037BE08 83 81 00 18 */ lwz r28, 0x18(r1) +/* 8037EEAC 0037BE0C 38 21 00 28 */ addi r1, r1, 0x28 +/* 8037EEB0 0037BE10 7C 08 03 A6 */ mtlr r0 +/* 8037EEB4 0037BE14 4E 80 00 20 */ blr + +.global LCQueueLength +LCQueueLength: +/* 8037EEB8 0037BE18 7C 98 E2 A6 */ mfspr r4, 0x398 +/* 8037EEBC 0037BE1C 54 83 47 3E */ rlwinm r3, r4, 8, 0x1c, 0x1f +/* 8037EEC0 0037BE20 4E 80 00 20 */ blr + +.global LCQueueWait +LCQueueWait: +/* 8037EEC4 0037BE24 38 63 00 01 */ addi r3, r3, 1 +lbl_8037EEC8: +/* 8037EEC8 0037BE28 7C 98 E2 A6 */ mfspr r4, 0x398 +/* 8037EECC 0037BE2C 54 84 47 3E */ rlwinm r4, r4, 8, 0x1c, 0x1f +/* 8037EED0 0037BE30 7D 04 18 00 */ cmpw cr2, r4, r3 +/* 8037EED4 0037BE34 40 88 FF F4 */ bge cr2, lbl_8037EEC8 +/* 8037EED8 0037BE38 4E 80 00 20 */ blr + +.global L2GlobalInvalidate +L2GlobalInvalidate: +/* 8037EEDC 0037BE3C 7C 08 02 A6 */ mflr r0 +/* 8037EEE0 0037BE40 90 01 00 04 */ stw r0, 4(r1) +/* 8037EEE4 0037BE44 94 21 FF F0 */ stwu r1, -0x10(r1) +/* 8037EEE8 0037BE48 93 E1 00 0C */ stw r31, 0xc(r1) +/* 8037EEEC 0037BE4C 7C 00 04 AC */ sync 0 +/* 8037EEF0 0037BE50 4B FF 09 05 */ bl PPCMfl2cr +/* 8037EEF4 0037BE54 54 63 00 7E */ clrlwi r3, r3, 1 +/* 8037EEF8 0037BE58 4B FF 09 05 */ bl PPCMtl2cr +/* 8037EEFC 0037BE5C 7C 00 04 AC */ sync 0 +/* 8037EF00 0037BE60 4B FF 08 F5 */ bl PPCMfl2cr +/* 8037EF04 0037BE64 64 63 00 20 */ oris r3, r3, 0x20 +/* 8037EF08 0037BE68 4B FF 08 F5 */ bl PPCMtl2cr +/* 8037EF0C 0037BE6C 48 00 00 04 */ b lbl_8037EF10 +lbl_8037EF10: +/* 8037EF10 0037BE70 48 00 00 04 */ b lbl_8037EF14 +lbl_8037EF14: +/* 8037EF14 0037BE74 4B FF 08 E1 */ bl PPCMfl2cr +/* 8037EF18 0037BE78 54 60 07 FE */ clrlwi r0, r3, 0x1f +/* 8037EF1C 0037BE7C 28 00 00 00 */ cmplwi r0, 0 +/* 8037EF20 0037BE80 40 82 FF F4 */ bne lbl_8037EF14 +/* 8037EF24 0037BE84 4B FF 08 D1 */ bl PPCMfl2cr +/* 8037EF28 0037BE88 54 63 02 D2 */ rlwinm r3, r3, 0, 0xb, 9 +/* 8037EF2C 0037BE8C 4B FF 08 D1 */ bl PPCMtl2cr +/* 8037EF30 0037BE90 48 00 00 04 */ b lbl_8037EF34 +lbl_8037EF34: +/* 8037EF34 0037BE94 3C 60 80 3F */ lis r3, lbl_803F1028@ha +/* 8037EF38 0037BE98 3B E3 10 28 */ addi r31, r3, lbl_803F1028@l +/* 8037EF3C 0037BE9C 48 00 00 04 */ b lbl_8037EF40 +lbl_8037EF40: +/* 8037EF40 0037BEA0 48 00 00 10 */ b lbl_8037EF50 +lbl_8037EF44: +/* 8037EF44 0037BEA4 7F E3 FB 78 */ mr r3, r31 +/* 8037EF48 0037BEA8 4C C6 31 82 */ crclr 6 +/* 8037EF4C 0037BEAC 4B FF 0A 1D */ bl DBPrintf +lbl_8037EF50: +/* 8037EF50 0037BEB0 4B FF 08 A5 */ bl PPCMfl2cr +/* 8037EF54 0037BEB4 54 60 07 FE */ clrlwi r0, r3, 0x1f +/* 8037EF58 0037BEB8 28 00 00 00 */ cmplwi r0, 0 +/* 8037EF5C 0037BEBC 40 82 FF E8 */ bne lbl_8037EF44 +/* 8037EF60 0037BEC0 80 01 00 14 */ lwz r0, 0x14(r1) +/* 8037EF64 0037BEC4 83 E1 00 0C */ lwz r31, 0xc(r1) +/* 8037EF68 0037BEC8 38 21 00 10 */ addi r1, r1, 0x10 +/* 8037EF6C 0037BECC 7C 08 03 A6 */ mtlr r0 +/* 8037EF70 0037BED0 4E 80 00 20 */ blr + +.global DMAErrorHandler +DMAErrorHandler: +/* 8037EF74 0037BED4 7C 08 02 A6 */ mflr r0 +/* 8037EF78 0037BED8 90 01 00 04 */ stw r0, 4(r1) +/* 8037EF7C 0037BEDC 94 21 FF 80 */ stwu r1, -0x80(r1) +/* 8037EF80 0037BEE0 93 E1 00 7C */ stw r31, 0x7c(r1) +/* 8037EF84 0037BEE4 93 C1 00 78 */ stw r30, 0x78(r1) +/* 8037EF88 0037BEE8 93 A1 00 74 */ stw r29, 0x74(r1) +/* 8037EF8C 0037BEEC 40 86 00 24 */ bne cr1, lbl_8037EFB0 +/* 8037EF90 0037BEF0 D8 21 00 28 */ stfd f1, 0x28(r1) +/* 8037EF94 0037BEF4 D8 41 00 30 */ stfd f2, 0x30(r1) +/* 8037EF98 0037BEF8 D8 61 00 38 */ stfd f3, 0x38(r1) +/* 8037EF9C 0037BEFC D8 81 00 40 */ stfd f4, 0x40(r1) +/* 8037EFA0 0037BF00 D8 A1 00 48 */ stfd f5, 0x48(r1) +/* 8037EFA4 0037BF04 D8 C1 00 50 */ stfd f6, 0x50(r1) +/* 8037EFA8 0037BF08 D8 E1 00 58 */ stfd f7, 0x58(r1) +/* 8037EFAC 0037BF0C D9 01 00 60 */ stfd f8, 0x60(r1) +lbl_8037EFB0: +/* 8037EFB0 0037BF10 90 61 00 08 */ stw r3, 8(r1) +/* 8037EFB4 0037BF14 90 81 00 0C */ stw r4, 0xc(r1) +/* 8037EFB8 0037BF18 90 A1 00 10 */ stw r5, 0x10(r1) +/* 8037EFBC 0037BF1C 90 C1 00 14 */ stw r6, 0x14(r1) +/* 8037EFC0 0037BF20 90 E1 00 18 */ stw r7, 0x18(r1) +/* 8037EFC4 0037BF24 91 01 00 1C */ stw r8, 0x1c(r1) +/* 8037EFC8 0037BF28 91 21 00 20 */ stw r9, 0x20(r1) +/* 8037EFCC 0037BF2C 91 41 00 24 */ stw r10, 0x24(r1) +/* 8037EFD0 0037BF30 7C 9D 23 78 */ mr r29, r4 +/* 8037EFD4 0037BF34 3C 60 80 3F */ lis r3, lbl_803F1028@ha +/* 8037EFD8 0037BF38 3B E3 10 28 */ addi r31, r3, lbl_803F1028@l +/* 8037EFDC 0037BF3C 4B FF 08 95 */ bl PPCMfhid2 +/* 8037EFE0 0037BF40 7C 7E 1B 78 */ mr r30, r3 +/* 8037EFE4 0037BF44 4C C6 31 82 */ crclr 6 +/* 8037EFE8 0037BF48 38 7F 00 2C */ addi r3, r31, 0x2c +/* 8037EFEC 0037BF4C 48 00 09 C1 */ bl OSReport +/* 8037EFF0 0037BF50 80 BD 01 9C */ lwz r5, 0x19c(r29) +/* 8037EFF4 0037BF54 7F C4 F3 78 */ mr r4, r30 +/* 8037EFF8 0037BF58 38 7F 00 44 */ addi r3, r31, 0x44 +/* 8037EFFC 0037BF5C 4C C6 31 82 */ crclr 6 +/* 8037F000 0037BF60 48 00 09 AD */ bl OSReport +/* 8037F004 0037BF64 57 C0 02 16 */ rlwinm r0, r30, 0, 8, 0xb +/* 8037F008 0037BF68 28 00 00 00 */ cmplwi r0, 0 +/* 8037F00C 0037BF6C 41 82 00 14 */ beq lbl_8037F020 +/* 8037F010 0037BF70 80 1D 01 9C */ lwz r0, 0x19c(r29) +/* 8037F014 0037BF74 54 00 02 94 */ rlwinm r0, r0, 0, 0xa, 0xa +/* 8037F018 0037BF78 28 00 00 00 */ cmplwi r0, 0 +/* 8037F01C 0037BF7C 40 82 00 1C */ bne lbl_8037F038 +lbl_8037F020: +/* 8037F020 0037BF80 38 7F 00 60 */ addi r3, r31, 0x60 +/* 8037F024 0037BF84 4C C6 31 82 */ crclr 6 +/* 8037F028 0037BF88 48 00 09 85 */ bl OSReport +/* 8037F02C 0037BF8C 7F A3 EB 78 */ mr r3, r29 +/* 8037F030 0037BF90 48 00 06 09 */ bl OSDumpContext +/* 8037F034 0037BF94 4B FF 07 E1 */ bl PPCHalt +lbl_8037F038: +/* 8037F038 0037BF98 38 7F 00 90 */ addi r3, r31, 0x90 +/* 8037F03C 0037BF9C 4C C6 31 82 */ crclr 6 +/* 8037F040 0037BFA0 48 00 09 6D */ bl OSReport +/* 8037F044 0037BFA4 38 7F 00 CC */ addi r3, r31, 0xcc +/* 8037F048 0037BFA8 4C C6 31 82 */ crclr 6 +/* 8037F04C 0037BFAC 48 00 09 61 */ bl OSReport +/* 8037F050 0037BFB0 57 C0 02 10 */ rlwinm r0, r30, 0, 8, 8 +/* 8037F054 0037BFB4 28 00 00 00 */ cmplwi r0, 0 +/* 8037F058 0037BFB8 41 82 00 10 */ beq lbl_8037F068 +/* 8037F05C 0037BFBC 38 7F 01 04 */ addi r3, r31, 0x104 +/* 8037F060 0037BFC0 4C C6 31 82 */ crclr 6 +/* 8037F064 0037BFC4 48 00 09 49 */ bl OSReport +lbl_8037F068: +/* 8037F068 0037BFC8 57 C0 02 52 */ rlwinm r0, r30, 0, 9, 9 +/* 8037F06C 0037BFCC 28 00 00 00 */ cmplwi r0, 0 +/* 8037F070 0037BFD0 41 82 00 10 */ beq lbl_8037F080 +/* 8037F074 0037BFD4 38 7F 01 44 */ addi r3, r31, 0x144 +/* 8037F078 0037BFD8 4C C6 31 82 */ crclr 6 +/* 8037F07C 0037BFDC 48 00 09 31 */ bl OSReport +lbl_8037F080: +/* 8037F080 0037BFE0 57 C0 02 94 */ rlwinm r0, r30, 0, 0xa, 0xa +/* 8037F084 0037BFE4 28 00 00 00 */ cmplwi r0, 0 +/* 8037F088 0037BFE8 41 82 00 10 */ beq lbl_8037F098 +/* 8037F08C 0037BFEC 38 7F 01 70 */ addi r3, r31, 0x170 +/* 8037F090 0037BFF0 4C C6 31 82 */ crclr 6 +/* 8037F094 0037BFF4 48 00 09 19 */ bl OSReport +lbl_8037F098: +/* 8037F098 0037BFF8 57 C0 02 D6 */ rlwinm r0, r30, 0, 0xb, 0xb +/* 8037F09C 0037BFFC 28 00 00 00 */ cmplwi r0, 0 +/* 8037F0A0 0037C000 41 82 00 10 */ beq lbl_8037F0B0 +/* 8037F0A4 0037C004 38 7F 01 90 */ addi r3, r31, 0x190 +/* 8037F0A8 0037C008 4C C6 31 82 */ crclr 6 +/* 8037F0AC 0037C00C 48 00 09 01 */ bl OSReport +lbl_8037F0B0: +/* 8037F0B0 0037C010 7F C3 F3 78 */ mr r3, r30 +/* 8037F0B4 0037C014 4B FF 07 C5 */ bl PPCMthid2 +/* 8037F0B8 0037C018 80 01 00 84 */ lwz r0, 0x84(r1) +/* 8037F0BC 0037C01C 83 E1 00 7C */ lwz r31, 0x7c(r1) +/* 8037F0C0 0037C020 83 C1 00 78 */ lwz r30, 0x78(r1) +/* 8037F0C4 0037C024 83 A1 00 74 */ lwz r29, 0x74(r1) +/* 8037F0C8 0037C028 38 21 00 80 */ addi r1, r1, 0x80 +/* 8037F0CC 0037C02C 7C 08 03 A6 */ mtlr r0 +/* 8037F0D0 0037C030 4E 80 00 20 */ blr + +.global __OSCacheInit +__OSCacheInit: +/* 8037F0D4 0037C034 7C 08 02 A6 */ mflr r0 +/* 8037F0D8 0037C038 90 01 00 04 */ stw r0, 4(r1) +/* 8037F0DC 0037C03C 94 21 FF F0 */ stwu r1, -0x10(r1) +/* 8037F0E0 0037C040 93 E1 00 0C */ stw r31, 0xc(r1) +/* 8037F0E4 0037C044 93 C1 00 08 */ stw r30, 8(r1) +/* 8037F0E8 0037C048 3C 60 80 3F */ lis r3, lbl_803F1028@ha +/* 8037F0EC 0037C04C 3B E3 10 28 */ addi r31, r3, lbl_803F1028@l +/* 8037F0F0 0037C050 4B FF 06 F5 */ bl PPCMfhid0 +/* 8037F0F4 0037C054 54 60 04 20 */ rlwinm r0, r3, 0, 0x10, 0x10 +/* 8037F0F8 0037C058 28 00 00 00 */ cmplwi r0, 0 +/* 8037F0FC 0037C05C 40 82 00 14 */ bne lbl_8037F110 +/* 8037F100 0037C060 4B FF FA D9 */ bl ICEnable +/* 8037F104 0037C064 38 7F 01 AC */ addi r3, r31, 0x1ac +/* 8037F108 0037C068 4C C6 31 82 */ crclr 6 +/* 8037F10C 0037C06C 4B FF 08 5D */ bl DBPrintf +lbl_8037F110: +/* 8037F110 0037C070 4B FF 06 D5 */ bl PPCMfhid0 +/* 8037F114 0037C074 54 60 04 62 */ rlwinm r0, r3, 0, 0x11, 0x11 +/* 8037F118 0037C078 28 00 00 00 */ cmplwi r0, 0 +/* 8037F11C 0037C07C 40 82 00 14 */ bne lbl_8037F130 +/* 8037F120 0037C080 4B FF F9 51 */ bl DCEnable +/* 8037F124 0037C084 38 7F 01 C8 */ addi r3, r31, 0x1c8 +/* 8037F128 0037C088 4C C6 31 82 */ crclr 6 +/* 8037F12C 0037C08C 4B FF 08 3D */ bl DBPrintf +lbl_8037F130: +/* 8037F130 0037C090 4B FF 06 C5 */ bl PPCMfl2cr +/* 8037F134 0037C094 54 60 00 00 */ rlwinm r0, r3, 0, 0, 0 +/* 8037F138 0037C098 28 00 00 00 */ cmplwi r0, 0 +/* 8037F13C 0037C09C 40 82 00 58 */ bne lbl_8037F194 +/* 8037F140 0037C0A0 4B FF 06 95 */ bl PPCMfmsr +/* 8037F144 0037C0A4 7C 7E 1B 78 */ mr r30, r3 +/* 8037F148 0037C0A8 7C 00 04 AC */ sync 0 +/* 8037F14C 0037C0AC 38 60 00 30 */ li r3, 0x30 +/* 8037F150 0037C0B0 4B FF 06 8D */ bl PPCMtmsr +/* 8037F154 0037C0B4 7C 00 04 AC */ sync 0 +/* 8037F158 0037C0B8 7C 00 04 AC */ sync 0 +/* 8037F15C 0037C0BC 4B FF 06 99 */ bl PPCMfl2cr +/* 8037F160 0037C0C0 54 63 00 7E */ clrlwi r3, r3, 1 +/* 8037F164 0037C0C4 4B FF 06 99 */ bl PPCMtl2cr +/* 8037F168 0037C0C8 7C 00 04 AC */ sync 0 +/* 8037F16C 0037C0CC 4B FF FD 71 */ bl L2GlobalInvalidate +/* 8037F170 0037C0D0 7F C3 F3 78 */ mr r3, r30 +/* 8037F174 0037C0D4 4B FF 06 69 */ bl PPCMtmsr +/* 8037F178 0037C0D8 4B FF 06 7D */ bl PPCMfl2cr +/* 8037F17C 0037C0DC 64 60 80 00 */ oris r0, r3, 0x8000 +/* 8037F180 0037C0E0 54 03 02 D2 */ rlwinm r3, r0, 0, 0xb, 9 +/* 8037F184 0037C0E4 4B FF 06 79 */ bl PPCMtl2cr +/* 8037F188 0037C0E8 38 7F 01 E4 */ addi r3, r31, 0x1e4 +/* 8037F18C 0037C0EC 4C C6 31 82 */ crclr 6 +/* 8037F190 0037C0F0 4B FF 07 D9 */ bl DBPrintf +lbl_8037F194: +/* 8037F194 0037C0F4 3C 60 80 38 */ lis r3, DMAErrorHandler@ha +/* 8037F198 0037C0F8 38 83 EF 74 */ addi r4, r3, DMAErrorHandler@l +/* 8037F19C 0037C0FC 38 60 00 01 */ li r3, 1 +/* 8037F1A0 0037C100 48 00 09 B9 */ bl OSSetErrorHandler +/* 8037F1A4 0037C104 38 7F 01 FC */ addi r3, r31, 0x1fc +/* 8037F1A8 0037C108 4C C6 31 82 */ crclr 6 +/* 8037F1AC 0037C10C 4B FF 07 BD */ bl DBPrintf +/* 8037F1B0 0037C110 80 01 00 14 */ lwz r0, 0x14(r1) +/* 8037F1B4 0037C114 83 E1 00 0C */ lwz r31, 0xc(r1) +/* 8037F1B8 0037C118 83 C1 00 08 */ lwz r30, 8(r1) +/* 8037F1BC 0037C11C 38 21 00 10 */ addi r1, r1, 0x10 +/* 8037F1C0 0037C120 7C 08 03 A6 */ mtlr r0 +/* 8037F1C4 0037C124 4E 80 00 20 */ blr diff --git a/asm/Dolphin/OS/OSContext.s b/asm/Dolphin/OS/OSContext.s new file mode 100644 index 00000000..94127705 --- /dev/null +++ b/asm/Dolphin/OS/OSContext.s @@ -0,0 +1,579 @@ +.include "macros.inc" + +.section .text, "ax" + +.global __OSLoadFPUContext +__OSLoadFPUContext: +/* 8037F1C8 0037C128 A0 A4 01 A2 */ lhz r5, 0x1a2(r4) +/* 8037F1CC 0037C12C 54 A5 07 FF */ clrlwi. r5, r5, 0x1f +/* 8037F1D0 0037C130 41 82 01 18 */ beq lbl_8037f2e8 +/* 8037F1D4 0037C134 C8 04 01 90 */ lfd f0, 0x190(r4) +/* 8037F1D8 0037C138 FD FE 05 8E */ mtfsf 0xff, f0 +/* 8037F1DC 0037C13C 7C B8 E2 A6 */ mfspr r5, 0x398 +/* 8037F1E0 0037C140 54 A5 1F FF */ rlwinm. r5, r5, 3, 0x1f, 0x1f +/* 8037F1E4 0037C144 41 82 00 84 */ beq lbl_8037F268 +/* 8037F1E8 0037C148 E0 04 01 C8 */ psq_l f0, 456(r4), 0, qr0 +/* 8037F1EC 0037C14C E0 24 01 D0 */ psq_l f1, 464(r4), 0, qr0 +/* 8037F1F0 0037C150 E0 44 01 D8 */ psq_l f2, 472(r4), 0, qr0 +/* 8037F1F4 0037C154 E0 64 01 E0 */ psq_l f3, 480(r4), 0, qr0 +/* 8037F1F8 0037C158 E0 84 01 E8 */ psq_l f4, 488(r4), 0, qr0 +/* 8037F1FC 0037C15C E0 A4 01 F0 */ psq_l f5, 496(r4), 0, qr0 +/* 8037F200 0037C160 E0 C4 01 F8 */ psq_l f6, 504(r4), 0, qr0 +/* 8037F204 0037C164 E0 E4 02 00 */ psq_l f7, 512(r4), 0, qr0 +/* 8037F208 0037C168 E1 04 02 08 */ psq_l f8, 520(r4), 0, qr0 +/* 8037F20C 0037C16C E1 24 02 10 */ psq_l f9, 528(r4), 0, qr0 +/* 8037F210 0037C170 E1 44 02 18 */ psq_l f10, 536(r4), 0, qr0 +/* 8037F214 0037C174 E1 64 02 20 */ psq_l f11, 544(r4), 0, qr0 +/* 8037F218 0037C178 E1 84 02 28 */ psq_l f12, 552(r4), 0, qr0 +/* 8037F21C 0037C17C E1 A4 02 30 */ psq_l f13, 560(r4), 0, qr0 +/* 8037F220 0037C180 E1 C4 02 38 */ psq_l f14, 568(r4), 0, qr0 +/* 8037F224 0037C184 E1 E4 02 40 */ psq_l f15, 576(r4), 0, qr0 +/* 8037F228 0037C188 E2 04 02 48 */ psq_l f16, 584(r4), 0, qr0 +/* 8037F22C 0037C18C E2 24 02 50 */ psq_l f17, 592(r4), 0, qr0 +/* 8037F230 0037C190 E2 44 02 58 */ psq_l f18, 600(r4), 0, qr0 +/* 8037F234 0037C194 E2 64 02 60 */ psq_l f19, 608(r4), 0, qr0 +/* 8037F238 0037C198 E2 84 02 68 */ psq_l f20, 616(r4), 0, qr0 +/* 8037F23C 0037C19C E2 A4 02 70 */ psq_l f21, 624(r4), 0, qr0 +/* 8037F240 0037C1A0 E2 C4 02 78 */ psq_l f22, 632(r4), 0, qr0 +/* 8037F244 0037C1A4 E2 E4 02 80 */ psq_l f23, 640(r4), 0, qr0 +/* 8037F248 0037C1A8 E3 04 02 88 */ psq_l f24, 648(r4), 0, qr0 +/* 8037F24C 0037C1AC E3 24 02 90 */ psq_l f25, 656(r4), 0, qr0 +/* 8037F250 0037C1B0 E3 44 02 98 */ psq_l f26, 664(r4), 0, qr0 +/* 8037F254 0037C1B4 E3 64 02 A0 */ psq_l f27, 672(r4), 0, qr0 +/* 8037F258 0037C1B8 E3 84 02 A8 */ psq_l f28, 680(r4), 0, qr0 +/* 8037F25C 0037C1BC E3 A4 02 B0 */ psq_l f29, 688(r4), 0, qr0 +/* 8037F260 0037C1C0 E3 C4 02 B8 */ psq_l f30, 696(r4), 0, qr0 +/* 8037F264 0037C1C4 E3 E4 02 C0 */ psq_l f31, 704(r4), 0, qr0 +lbl_8037F268: +/* 8037F268 0037C1C8 C8 04 00 90 */ lfd f0, 0x90(r4) +/* 8037F26C 0037C1CC C8 24 00 98 */ lfd f1, 0x98(r4) +/* 8037F270 0037C1D0 C8 44 00 A0 */ lfd f2, 0xa0(r4) +/* 8037F274 0037C1D4 C8 64 00 A8 */ lfd f3, 0xa8(r4) +/* 8037F278 0037C1D8 C8 84 00 B0 */ lfd f4, 0xb0(r4) +/* 8037F27C 0037C1DC C8 A4 00 B8 */ lfd f5, 0xb8(r4) +/* 8037F280 0037C1E0 C8 C4 00 C0 */ lfd f6, 0xc0(r4) +/* 8037F284 0037C1E4 C8 E4 00 C8 */ lfd f7, 0xc8(r4) +/* 8037F288 0037C1E8 C9 04 00 D0 */ lfd f8, 0xd0(r4) +/* 8037F28C 0037C1EC C9 24 00 D8 */ lfd f9, 0xd8(r4) +/* 8037F290 0037C1F0 C9 44 00 E0 */ lfd f10, 0xe0(r4) +/* 8037F294 0037C1F4 C9 64 00 E8 */ lfd f11, 0xe8(r4) +/* 8037F298 0037C1F8 C9 84 00 F0 */ lfd f12, 0xf0(r4) +/* 8037F29C 0037C1FC C9 A4 00 F8 */ lfd f13, 0xf8(r4) +/* 8037F2A0 0037C200 C9 C4 01 00 */ lfd f14, 0x100(r4) +/* 8037F2A4 0037C204 C9 E4 01 08 */ lfd f15, 0x108(r4) +/* 8037F2A8 0037C208 CA 04 01 10 */ lfd f16, 0x110(r4) +/* 8037F2AC 0037C20C CA 24 01 18 */ lfd f17, 0x118(r4) +/* 8037F2B0 0037C210 CA 44 01 20 */ lfd f18, 0x120(r4) +/* 8037F2B4 0037C214 CA 64 01 28 */ lfd f19, 0x128(r4) +/* 8037F2B8 0037C218 CA 84 01 30 */ lfd f20, 0x130(r4) +/* 8037F2BC 0037C21C CA A4 01 38 */ lfd f21, 0x138(r4) +/* 8037F2C0 0037C220 CA C4 01 40 */ lfd f22, 0x140(r4) +/* 8037F2C4 0037C224 CA E4 01 48 */ lfd f23, 0x148(r4) +/* 8037F2C8 0037C228 CB 04 01 50 */ lfd f24, 0x150(r4) +/* 8037F2CC 0037C22C CB 24 01 58 */ lfd f25, 0x158(r4) +/* 8037F2D0 0037C230 CB 44 01 60 */ lfd f26, 0x160(r4) +/* 8037F2D4 0037C234 CB 64 01 68 */ lfd f27, 0x168(r4) +/* 8037F2D8 0037C238 CB 84 01 70 */ lfd f28, 0x170(r4) +/* 8037F2DC 0037C23C CB A4 01 78 */ lfd f29, 0x178(r4) +/* 8037F2E0 0037C240 CB C4 01 80 */ lfd f30, 0x180(r4) +/* 8037F2E4 0037C244 CB E4 01 88 */ lfd f31, 0x188(r4) +lbl_8037f2e8: +/* 8037F2E8 0037C248 4E 80 00 20 */ blr + +.global __OSSaveFPUContext +__OSSaveFPUContext: +/* 8037F2EC 0037C24C A0 65 01 A2 */ lhz r3, 0x1a2(r5) +/* 8037F2F0 0037C250 60 63 00 01 */ ori r3, r3, 1 +/* 8037F2F4 0037C254 B0 65 01 A2 */ sth r3, 0x1a2(r5) +/* 8037F2F8 0037C258 D8 05 00 90 */ stfd f0, 0x90(r5) +/* 8037F2FC 0037C25C D8 25 00 98 */ stfd f1, 0x98(r5) +/* 8037F300 0037C260 D8 45 00 A0 */ stfd f2, 0xa0(r5) +/* 8037F304 0037C264 D8 65 00 A8 */ stfd f3, 0xa8(r5) +/* 8037F308 0037C268 D8 85 00 B0 */ stfd f4, 0xb0(r5) +/* 8037F30C 0037C26C D8 A5 00 B8 */ stfd f5, 0xb8(r5) +/* 8037F310 0037C270 D8 C5 00 C0 */ stfd f6, 0xc0(r5) +/* 8037F314 0037C274 D8 E5 00 C8 */ stfd f7, 0xc8(r5) +/* 8037F318 0037C278 D9 05 00 D0 */ stfd f8, 0xd0(r5) +/* 8037F31C 0037C27C D9 25 00 D8 */ stfd f9, 0xd8(r5) +/* 8037F320 0037C280 D9 45 00 E0 */ stfd f10, 0xe0(r5) +/* 8037F324 0037C284 D9 65 00 E8 */ stfd f11, 0xe8(r5) +/* 8037F328 0037C288 D9 85 00 F0 */ stfd f12, 0xf0(r5) +/* 8037F32C 0037C28C D9 A5 00 F8 */ stfd f13, 0xf8(r5) +/* 8037F330 0037C290 D9 C5 01 00 */ stfd f14, 0x100(r5) +/* 8037F334 0037C294 D9 E5 01 08 */ stfd f15, 0x108(r5) +/* 8037F338 0037C298 DA 05 01 10 */ stfd f16, 0x110(r5) +/* 8037F33C 0037C29C DA 25 01 18 */ stfd f17, 0x118(r5) +/* 8037F340 0037C2A0 DA 45 01 20 */ stfd f18, 0x120(r5) +/* 8037F344 0037C2A4 DA 65 01 28 */ stfd f19, 0x128(r5) +/* 8037F348 0037C2A8 DA 85 01 30 */ stfd f20, 0x130(r5) +/* 8037F34C 0037C2AC DA A5 01 38 */ stfd f21, 0x138(r5) +/* 8037F350 0037C2B0 DA C5 01 40 */ stfd f22, 0x140(r5) +/* 8037F354 0037C2B4 DA E5 01 48 */ stfd f23, 0x148(r5) +/* 8037F358 0037C2B8 DB 05 01 50 */ stfd f24, 0x150(r5) +/* 8037F35C 0037C2BC DB 25 01 58 */ stfd f25, 0x158(r5) +/* 8037F360 0037C2C0 DB 45 01 60 */ stfd f26, 0x160(r5) +/* 8037F364 0037C2C4 DB 65 01 68 */ stfd f27, 0x168(r5) +/* 8037F368 0037C2C8 DB 85 01 70 */ stfd f28, 0x170(r5) +/* 8037F36C 0037C2CC DB A5 01 78 */ stfd f29, 0x178(r5) +/* 8037F370 0037C2D0 DB C5 01 80 */ stfd f30, 0x180(r5) +/* 8037F374 0037C2D4 DB E5 01 88 */ stfd f31, 0x188(r5) +/* 8037F378 0037C2D8 FC 00 04 8E */ mffs f0 +/* 8037F37C 0037C2DC D8 05 01 90 */ stfd f0, 0x190(r5) +/* 8037F380 0037C2E0 C8 05 00 90 */ lfd f0, 0x90(r5) +/* 8037F384 0037C2E4 7C 78 E2 A6 */ mfspr r3, 0x398 +/* 8037F388 0037C2E8 54 63 1F FF */ rlwinm. r3, r3, 3, 0x1f, 0x1f +/* 8037F38C 0037C2EC 41 82 00 84 */ beq sub_8037f410 +/* 8037F390 0037C2F0 F0 05 01 C8 */ psq_st f0, 456(r5), 0, qr0 +/* 8037F394 0037C2F4 F0 25 01 D0 */ psq_st f1, 464(r5), 0, qr0 +/* 8037F398 0037C2F8 F0 45 01 D8 */ psq_st f2, 472(r5), 0, qr0 +/* 8037F39C 0037C2FC F0 65 01 E0 */ psq_st f3, 480(r5), 0, qr0 +/* 8037F3A0 0037C300 F0 85 01 E8 */ psq_st f4, 488(r5), 0, qr0 +/* 8037F3A4 0037C304 F0 A5 01 F0 */ psq_st f5, 496(r5), 0, qr0 +/* 8037F3A8 0037C308 F0 C5 01 F8 */ psq_st f6, 504(r5), 0, qr0 +/* 8037F3AC 0037C30C F0 E5 02 00 */ psq_st f7, 512(r5), 0, qr0 +/* 8037F3B0 0037C310 F1 05 02 08 */ psq_st f8, 520(r5), 0, qr0 +/* 8037F3B4 0037C314 F1 25 02 10 */ psq_st f9, 528(r5), 0, qr0 +/* 8037F3B8 0037C318 F1 45 02 18 */ psq_st f10, 536(r5), 0, qr0 +/* 8037F3BC 0037C31C F1 65 02 20 */ psq_st f11, 544(r5), 0, qr0 +/* 8037F3C0 0037C320 F1 85 02 28 */ psq_st f12, 552(r5), 0, qr0 +/* 8037F3C4 0037C324 F1 A5 02 30 */ psq_st f13, 560(r5), 0, qr0 +/* 8037F3C8 0037C328 F1 C5 02 38 */ psq_st f14, 568(r5), 0, qr0 +/* 8037F3CC 0037C32C F1 E5 02 40 */ psq_st f15, 576(r5), 0, qr0 +/* 8037F3D0 0037C330 F2 05 02 48 */ psq_st f16, 584(r5), 0, qr0 +/* 8037F3D4 0037C334 F2 25 02 50 */ psq_st f17, 592(r5), 0, qr0 +/* 8037F3D8 0037C338 F2 45 02 58 */ psq_st f18, 600(r5), 0, qr0 +/* 8037F3DC 0037C33C F2 65 02 60 */ psq_st f19, 608(r5), 0, qr0 +/* 8037F3E0 0037C340 F2 85 02 68 */ psq_st f20, 616(r5), 0, qr0 +/* 8037F3E4 0037C344 F2 A5 02 70 */ psq_st f21, 624(r5), 0, qr0 +/* 8037F3E8 0037C348 F2 C5 02 78 */ psq_st f22, 632(r5), 0, qr0 +/* 8037F3EC 0037C34C F2 E5 02 80 */ psq_st f23, 640(r5), 0, qr0 +/* 8037F3F0 0037C350 F3 05 02 88 */ psq_st f24, 648(r5), 0, qr0 +/* 8037F3F4 0037C354 F3 25 02 90 */ psq_st f25, 656(r5), 0, qr0 +/* 8037F3F8 0037C358 F3 45 02 98 */ psq_st f26, 664(r5), 0, qr0 +/* 8037F3FC 0037C35C F3 65 02 A0 */ psq_st f27, 672(r5), 0, qr0 +/* 8037F400 0037C360 F3 85 02 A8 */ psq_st f28, 680(r5), 0, qr0 +/* 8037F404 0037C364 F3 A5 02 B0 */ psq_st f29, 688(r5), 0, qr0 +/* 8037F408 0037C368 F3 C5 02 B8 */ psq_st f30, 696(r5), 0, qr0 +/* 8037F40C 0037C36C F3 E5 02 C0 */ psq_st f31, 704(r5), 0, qr0 + +.global sub_8037f410 +sub_8037f410: +/* 8037F410 0037C370 4E 80 00 20 */ blr + +.global OSSaveFPUContext +OSSaveFPUContext: +/* 8037F414 0037C374 38 A3 00 00 */ addi r5, r3, 0 +/* 8037F418 0037C378 4B FF FE D4 */ b __OSSaveFPUContext + +.global OSSetCurrentContext +OSSetCurrentContext: +/* 8037F41C 0037C37C 3C 80 80 00 */ lis r4, 0x800000D4@ha +/* 8037F420 0037C380 90 64 00 D4 */ stw r3, 0x800000D4@l(r4) +/* 8037F424 0037C384 54 65 00 BE */ clrlwi r5, r3, 2 +/* 8037F428 0037C388 90 A4 00 C0 */ stw r5, 0xc0(r4) +/* 8037F42C 0037C38C 80 A4 00 D8 */ lwz r5, 0xd8(r4) +/* 8037F430 0037C390 7C 05 18 00 */ cmpw r5, r3 +/* 8037F434 0037C394 40 82 00 20 */ bne lbl_8037F454 +/* 8037F438 0037C398 80 C3 01 9C */ lwz r6, 0x19c(r3) +/* 8037F43C 0037C39C 60 C6 20 00 */ ori r6, r6, 0x2000 +/* 8037F440 0037C3A0 90 C3 01 9C */ stw r6, 0x19c(r3) +/* 8037F444 0037C3A4 7C C0 00 A6 */ mfmsr r6 +/* 8037F448 0037C3A8 60 C6 00 02 */ ori r6, r6, 2 +/* 8037F44C 0037C3AC 7C C0 01 24 */ mtmsr r6 +/* 8037F450 0037C3B0 4E 80 00 20 */ blr +lbl_8037F454: +/* 8037F454 0037C3B4 80 C3 01 9C */ lwz r6, 0x19c(r3) +/* 8037F458 0037C3B8 54 C6 04 E2 */ rlwinm r6, r6, 0, 0x13, 0x11 +/* 8037F45C 0037C3BC 90 C3 01 9C */ stw r6, 0x19c(r3) +/* 8037F460 0037C3C0 7C C0 00 A6 */ mfmsr r6 +/* 8037F464 0037C3C4 54 C6 04 E2 */ rlwinm r6, r6, 0, 0x13, 0x11 +/* 8037F468 0037C3C8 60 C6 00 02 */ ori r6, r6, 2 +/* 8037F46C 0037C3CC 7C C0 01 24 */ mtmsr r6 +/* 8037F470 0037C3D0 4C 00 01 2C */ isync +/* 8037F474 0037C3D4 4E 80 00 20 */ blr + +.global OSGetCurrentContext +OSGetCurrentContext: +/* 8037F478 0037C3D8 3C 60 80 00 */ lis r3, 0x800000D4@ha +/* 8037F47C 0037C3DC 80 63 00 D4 */ lwz r3, 0x800000D4@l(r3) +/* 8037F480 0037C3E0 4E 80 00 20 */ blr + +.global OSSaveContext +OSSaveContext: +/* 8037F484 0037C3E4 BD A3 00 34 */ stmw r13, 0x34(r3) +/* 8037F488 0037C3E8 7C 11 E2 A6 */ mfspr r0, 0x391 +/* 8037F48C 0037C3EC 90 03 01 A8 */ stw r0, 0x1a8(r3) +/* 8037F490 0037C3F0 7C 12 E2 A6 */ mfspr r0, 0x392 +/* 8037F494 0037C3F4 90 03 01 AC */ stw r0, 0x1ac(r3) +/* 8037F498 0037C3F8 7C 13 E2 A6 */ mfspr r0, 0x393 +/* 8037F49C 0037C3FC 90 03 01 B0 */ stw r0, 0x1b0(r3) +/* 8037F4A0 0037C400 7C 14 E2 A6 */ mfspr r0, 0x394 +/* 8037F4A4 0037C404 90 03 01 B4 */ stw r0, 0x1b4(r3) +/* 8037F4A8 0037C408 7C 15 E2 A6 */ mfspr r0, 0x395 +/* 8037F4AC 0037C40C 90 03 01 B8 */ stw r0, 0x1b8(r3) +/* 8037F4B0 0037C410 7C 16 E2 A6 */ mfspr r0, 0x396 +/* 8037F4B4 0037C414 90 03 01 BC */ stw r0, 0x1bc(r3) +/* 8037F4B8 0037C418 7C 17 E2 A6 */ mfspr r0, 0x397 +/* 8037F4BC 0037C41C 90 03 01 C0 */ stw r0, 0x1c0(r3) +/* 8037F4C0 0037C420 7C 00 00 26 */ mfcr r0 +/* 8037F4C4 0037C424 90 03 00 80 */ stw r0, 0x80(r3) +/* 8037F4C8 0037C428 7C 08 02 A6 */ mflr r0 +/* 8037F4CC 0037C42C 90 03 00 84 */ stw r0, 0x84(r3) +/* 8037F4D0 0037C430 90 03 01 98 */ stw r0, 0x198(r3) +/* 8037F4D4 0037C434 7C 00 00 A6 */ mfmsr r0 +/* 8037F4D8 0037C438 90 03 01 9C */ stw r0, 0x19c(r3) +/* 8037F4DC 0037C43C 7C 09 02 A6 */ mfctr r0 +/* 8037F4E0 0037C440 90 03 00 88 */ stw r0, 0x88(r3) +/* 8037F4E4 0037C444 7C 01 02 A6 */ mfxer r0 +/* 8037F4E8 0037C448 90 03 00 8C */ stw r0, 0x8c(r3) +/* 8037F4EC 0037C44C 90 23 00 04 */ stw r1, 4(r3) +/* 8037F4F0 0037C450 90 43 00 08 */ stw r2, 8(r3) +/* 8037F4F4 0037C454 38 00 00 01 */ li r0, 1 +/* 8037F4F8 0037C458 90 03 00 0C */ stw r0, 0xc(r3) +/* 8037F4FC 0037C45C 38 60 00 00 */ li r3, 0 +/* 8037F500 0037C460 4E 80 00 20 */ blr + +.global OSLoadContext +OSLoadContext: +/* 8037F504 0037C464 3C 80 80 38 */ lis r4, OSDisableInterrupts@ha +/* 8037F508 0037C468 80 C3 01 98 */ lwz r6, 0x198(r3) +/* 8037F50C 0037C46C 38 A4 16 60 */ addi r5, r4, OSDisableInterrupts@l +/* 8037F510 0037C470 7C 06 28 40 */ cmplw r6, r5 +/* 8037F514 0037C474 40 81 00 18 */ ble lbl_8037F52C +/* 8037F518 0037C478 3C 80 80 38 */ lis r4, __RAS_OSDisableInterrupts_end@ha +/* 8037F51C 0037C47C 38 04 16 6C */ addi r0, r4, __RAS_OSDisableInterrupts_end@l +/* 8037F520 0037C480 7C 06 00 40 */ cmplw r6, r0 +/* 8037F524 0037C484 40 80 00 08 */ bge lbl_8037F52C +/* 8037F528 0037C488 90 A3 01 98 */ stw r5, 0x198(r3) +lbl_8037F52C: +/* 8037F52C 0037C48C 80 03 00 00 */ lwz r0, 0(r3) +/* 8037F530 0037C490 80 23 00 04 */ lwz r1, 4(r3) +/* 8037F534 0037C494 80 43 00 08 */ lwz r2, 8(r3) +/* 8037F538 0037C498 A0 83 01 A2 */ lhz r4, 0x1a2(r3) +/* 8037F53C 0037C49C 54 85 07 BD */ rlwinm. r5, r4, 0, 0x1e, 0x1e +/* 8037F540 0037C4A0 41 82 00 14 */ beq lbl_8037F554 +/* 8037F544 0037C4A4 54 84 07 FA */ rlwinm r4, r4, 0, 0x1f, 0x1d +/* 8037F548 0037C4A8 B0 83 01 A2 */ sth r4, 0x1a2(r3) +/* 8037F54C 0037C4AC B8 A3 00 14 */ lmw r5, 0x14(r3) +/* 8037F550 0037C4B0 48 00 00 08 */ b lbl_8037F558 +lbl_8037F554: +/* 8037F554 0037C4B4 B9 A3 00 34 */ lmw r13, 0x34(r3) +lbl_8037F558: +/* 8037F558 0037C4B8 80 83 01 A8 */ lwz r4, 0x1a8(r3) +/* 8037F55C 0037C4BC 7C 91 E3 A6 */ mtspr 0x391, r4 +/* 8037F560 0037C4C0 80 83 01 AC */ lwz r4, 0x1ac(r3) +/* 8037F564 0037C4C4 7C 92 E3 A6 */ mtspr 0x392, r4 +/* 8037F568 0037C4C8 80 83 01 B0 */ lwz r4, 0x1b0(r3) +/* 8037F56C 0037C4CC 7C 93 E3 A6 */ mtspr 0x393, r4 +/* 8037F570 0037C4D0 80 83 01 B4 */ lwz r4, 0x1b4(r3) +/* 8037F574 0037C4D4 7C 94 E3 A6 */ mtspr 0x394, r4 +/* 8037F578 0037C4D8 80 83 01 B8 */ lwz r4, 0x1b8(r3) +/* 8037F57C 0037C4DC 7C 95 E3 A6 */ mtspr 0x395, r4 +/* 8037F580 0037C4E0 80 83 01 BC */ lwz r4, 0x1bc(r3) +/* 8037F584 0037C4E4 7C 96 E3 A6 */ mtspr 0x396, r4 +/* 8037F588 0037C4E8 80 83 01 C0 */ lwz r4, 0x1c0(r3) +/* 8037F58C 0037C4EC 7C 97 E3 A6 */ mtspr 0x397, r4 +/* 8037F590 0037C4F0 80 83 00 80 */ lwz r4, 0x80(r3) +/* 8037F594 0037C4F4 7C 8F F1 20 */ mtcrf 0xff, r4 +/* 8037F598 0037C4F8 80 83 00 84 */ lwz r4, 0x84(r3) +/* 8037F59C 0037C4FC 7C 88 03 A6 */ mtlr r4 +/* 8037F5A0 0037C500 80 83 00 88 */ lwz r4, 0x88(r3) +/* 8037F5A4 0037C504 7C 89 03 A6 */ mtctr r4 +/* 8037F5A8 0037C508 80 83 00 8C */ lwz r4, 0x8c(r3) +/* 8037F5AC 0037C50C 7C 81 03 A6 */ mtxer r4 +/* 8037F5B0 0037C510 7C 80 00 A6 */ mfmsr r4 +/* 8037F5B4 0037C514 54 84 04 5E */ rlwinm r4, r4, 0, 0x11, 0xf +/* 8037F5B8 0037C518 54 84 07 FA */ rlwinm r4, r4, 0, 0x1f, 0x1d +/* 8037F5BC 0037C51C 7C 80 01 24 */ mtmsr r4 +/* 8037F5C0 0037C520 80 83 01 98 */ lwz r4, 0x198(r3) +/* 8037F5C4 0037C524 7C 9A 03 A6 */ mtspr 0x1a, r4 +/* 8037F5C8 0037C528 80 83 01 9C */ lwz r4, 0x19c(r3) +/* 8037F5CC 0037C52C 7C 9B 03 A6 */ mtspr 0x1b, r4 +/* 8037F5D0 0037C530 80 83 00 10 */ lwz r4, 0x10(r3) +/* 8037F5D4 0037C534 80 63 00 0C */ lwz r3, 0xc(r3) +/* 8037F5D8 0037C538 4C 00 00 64 */ rfi + +.global OSGetStackPointer +OSGetStackPointer: +/* 8037F5DC 0037C53C 7C 23 0B 78 */ mr r3, r1 +/* 8037F5E0 0037C540 4E 80 00 20 */ blr + +.global OSSwitchFiber +OSSwitchFiber: +/* 8037F5E4 0037C544 7C 08 02 A6 */ mflr r0 +/* 8037F5E8 0037C548 7C 25 0B 78 */ mr r5, r1 +/* 8037F5EC 0037C54C 94 A4 FF F8 */ stwu r5, -8(r4) +/* 8037F5F0 0037C550 7C 81 23 78 */ mr r1, r4 +/* 8037F5F4 0037C554 90 05 00 04 */ stw r0, 4(r5) +/* 8037F5F8 0037C558 7C 68 03 A6 */ mtlr r3 +/* 8037F5FC 0037C55C 4E 80 00 21 */ blrl +/* 8037F600 0037C560 80 A1 00 00 */ lwz r5, 0(r1) +/* 8037F604 0037C564 80 05 00 04 */ lwz r0, 4(r5) +/* 8037F608 0037C568 7C 08 03 A6 */ mtlr r0 +/* 8037F60C 0037C56C 7C A1 2B 78 */ mr r1, r5 +/* 8037F610 0037C570 4E 80 00 20 */ blr + +.global OSClearContext +OSClearContext: +/* 8037F614 0037C574 38 A0 00 00 */ li r5, 0 +/* 8037F618 0037C578 B0 A3 01 A0 */ sth r5, 0x1a0(r3) +/* 8037F61C 0037C57C 3C 80 80 00 */ lis r4, 0x800000D8@ha +/* 8037F620 0037C580 B0 A3 01 A2 */ sth r5, 0x1a2(r3) +/* 8037F624 0037C584 80 04 00 D8 */ lwz r0, 0x800000D8@l(r4) +/* 8037F628 0037C588 7C 03 00 40 */ cmplw r3, r0 +/* 8037F62C 0037C58C 40 82 00 08 */ bne lbl_8037F634 +/* 8037F630 0037C590 90 A4 00 D8 */ stw r5, 0xd8(r4) +lbl_8037F634: +/* 8037F634 0037C594 4E 80 00 20 */ blr + +.global OSDumpContext +OSDumpContext: +/* 8037F638 0037C598 7C 08 02 A6 */ mflr r0 +/* 8037F63C 0037C59C 90 01 00 04 */ stw r0, 4(r1) +/* 8037F640 0037C5A0 94 21 FD 08 */ stwu r1, -0x2f8(r1) +/* 8037F644 0037C5A4 BF 21 02 DC */ stmw r25, 0x2dc(r1) +/* 8037F648 0037C5A8 7C 7C 1B 78 */ mr r28, r3 +/* 8037F64C 0037C5AC 3C 60 80 3F */ lis r3, lbl_803F1258@ha +/* 8037F650 0037C5B0 4C C6 31 82 */ crclr 6 +/* 8037F654 0037C5B4 3B E3 12 58 */ addi r31, r3, lbl_803F1258@l +/* 8037F658 0037C5B8 7F E3 FB 78 */ mr r3, r31 +/* 8037F65C 0037C5BC 7F 84 E3 78 */ mr r4, r28 +/* 8037F660 0037C5C0 48 00 03 4D */ bl OSReport +/* 8037F664 0037C5C4 3B 20 00 00 */ li r25, 0 +/* 8037F668 0037C5C8 57 20 10 3A */ slwi r0, r25, 2 +/* 8037F66C 0037C5CC 7F 7C 02 14 */ add r27, r28, r0 +/* 8037F670 0037C5D0 48 00 00 04 */ b lbl_8037F674 +lbl_8037F674: +/* 8037F674 0037C5D4 48 00 00 04 */ b lbl_8037F678 +lbl_8037F678: +/* 8037F678 0037C5D8 48 00 00 04 */ b lbl_8037F67C +lbl_8037F67C: +/* 8037F67C 0037C5DC 81 1B 00 40 */ lwz r8, 0x40(r27) +/* 8037F680 0037C5E0 7F 24 CB 78 */ mr r4, r25 +/* 8037F684 0037C5E4 80 BB 00 00 */ lwz r5, 0(r27) +/* 8037F688 0037C5E8 38 7F 00 44 */ addi r3, r31, 0x44 +/* 8037F68C 0037C5EC 4C C6 31 82 */ crclr 6 +/* 8037F690 0037C5F0 7C A6 2B 78 */ mr r6, r5 +/* 8037F694 0037C5F4 7D 09 43 78 */ mr r9, r8 +/* 8037F698 0037C5F8 38 F9 00 10 */ addi r7, r25, 0x10 +/* 8037F69C 0037C5FC 48 00 03 11 */ bl OSReport +/* 8037F6A0 0037C600 3B 7B 00 04 */ addi r27, r27, 4 +/* 8037F6A4 0037C604 3B 39 00 01 */ addi r25, r25, 1 +/* 8037F6A8 0037C608 28 19 00 10 */ cmplwi r25, 0x10 +/* 8037F6AC 0037C60C 41 80 FF D0 */ blt lbl_8037F67C +/* 8037F6B0 0037C610 80 9C 00 84 */ lwz r4, 0x84(r28) +/* 8037F6B4 0037C614 38 7F 00 74 */ addi r3, r31, 0x74 +/* 8037F6B8 0037C618 80 BC 00 80 */ lwz r5, 0x80(r28) +/* 8037F6BC 0037C61C 4C C6 31 82 */ crclr 6 +/* 8037F6C0 0037C620 48 00 02 ED */ bl OSReport +/* 8037F6C4 0037C624 80 9C 01 98 */ lwz r4, 0x198(r28) +/* 8037F6C8 0037C628 38 7F 00 A4 */ addi r3, r31, 0xa4 +/* 8037F6CC 0037C62C 80 BC 01 9C */ lwz r5, 0x19c(r28) +/* 8037F6D0 0037C630 4C C6 31 82 */ crclr 6 +/* 8037F6D4 0037C634 48 00 02 D9 */ bl OSReport +/* 8037F6D8 0037C638 38 7F 00 D4 */ addi r3, r31, 0xd4 +/* 8037F6DC 0037C63C 4C C6 31 82 */ crclr 6 +/* 8037F6E0 0037C640 48 00 02 CD */ bl OSReport +/* 8037F6E4 0037C644 3B 20 00 00 */ li r25, 0 +/* 8037F6E8 0037C648 57 20 10 3A */ slwi r0, r25, 2 +/* 8037F6EC 0037C64C 7F 7C 02 14 */ add r27, r28, r0 +/* 8037F6F0 0037C650 48 00 00 04 */ b lbl_8037F6F4 +lbl_8037F6F4: +/* 8037F6F4 0037C654 48 00 00 04 */ b lbl_8037F6F8 +lbl_8037F6F8: +/* 8037F6F8 0037C658 48 00 00 04 */ b lbl_8037F6FC +lbl_8037F6FC: +/* 8037F6FC 0037C65C 80 BB 01 A4 */ lwz r5, 0x1a4(r27) +/* 8037F700 0037C660 7F 24 CB 78 */ mr r4, r25 +/* 8037F704 0037C664 80 FB 01 B4 */ lwz r7, 0x1b4(r27) +/* 8037F708 0037C668 38 7F 00 E8 */ addi r3, r31, 0xe8 +/* 8037F70C 0037C66C 38 D9 00 04 */ addi r6, r25, 4 +/* 8037F710 0037C670 4C C6 31 82 */ crclr 6 +/* 8037F714 0037C674 48 00 02 99 */ bl OSReport +/* 8037F718 0037C678 3B 7B 00 04 */ addi r27, r27, 4 +/* 8037F71C 0037C67C 3B 39 00 01 */ addi r25, r25, 1 +/* 8037F720 0037C680 28 19 00 04 */ cmplwi r25, 4 +/* 8037F724 0037C684 41 80 FF D8 */ blt lbl_8037F6FC +/* 8037F728 0037C688 A0 1C 01 A2 */ lhz r0, 0x1a2(r28) +/* 8037F72C 0037C68C 54 00 07 FE */ clrlwi r0, r0, 0x1f +/* 8037F730 0037C690 28 00 00 00 */ cmplwi r0, 0 +/* 8037F734 0037C694 41 82 01 3C */ beq lbl_8037F870 +/* 8037F738 0037C698 48 00 1F 29 */ bl OSDisableInterrupts +/* 8037F73C 0037C69C 3C C0 80 00 */ lis r6, 0x800000D4@ha +/* 8037F740 0037C6A0 80 06 00 D4 */ lwz r0, 0x800000D4@l(r6) +/* 8037F744 0037C6A4 38 A0 00 00 */ li r5, 0 +/* 8037F748 0037C6A8 38 81 00 10 */ addi r4, r1, 0x10 +/* 8037F74C 0037C6AC B0 A1 01 B0 */ sth r5, 0x1b0(r1) +/* 8037F750 0037C6B0 7C 1E 03 78 */ mr r30, r0 +/* 8037F754 0037C6B4 7C 7D 1B 78 */ mr r29, r3 +/* 8037F758 0037C6B8 B0 A1 01 B2 */ sth r5, 0x1b2(r1) +/* 8037F75C 0037C6BC 80 06 00 D8 */ lwz r0, 0xd8(r6) +/* 8037F760 0037C6C0 7C 04 00 40 */ cmplw r4, r0 +/* 8037F764 0037C6C4 40 82 00 08 */ bne lbl_8037F76C +/* 8037F768 0037C6C8 90 A6 00 D8 */ stw r5, 0xd8(r6) +lbl_8037F76C: +/* 8037F76C 0037C6CC 38 61 00 10 */ addi r3, r1, 0x10 +/* 8037F770 0037C6D0 4B FF FC AD */ bl OSSetCurrentContext +/* 8037F774 0037C6D4 38 7F 01 0C */ addi r3, r31, 0x10c +/* 8037F778 0037C6D8 4C C6 31 82 */ crclr 6 +/* 8037F77C 0037C6DC 48 00 02 31 */ bl OSReport +/* 8037F780 0037C6E0 3B 20 00 00 */ li r25, 0 +/* 8037F784 0037C6E4 57 20 18 38 */ slwi r0, r25, 3 +/* 8037F788 0037C6E8 7F 5C 02 14 */ add r26, r28, r0 +/* 8037F78C 0037C6EC 48 00 00 04 */ b lbl_8037F790 +lbl_8037F790: +/* 8037F790 0037C6F0 48 00 00 04 */ b lbl_8037F794 +lbl_8037F794: +/* 8037F794 0037C6F4 48 00 00 04 */ b lbl_8037F798 +lbl_8037F798: +/* 8037F798 0037C6F8 C8 3A 00 98 */ lfd f1, 0x98(r26) +/* 8037F79C 0037C6FC 48 00 A1 B9 */ bl __cvt_fp2unsigned +/* 8037F7A0 0037C700 7C 7B 1B 78 */ mr r27, r3 +/* 8037F7A4 0037C704 C8 3A 00 90 */ lfd f1, 0x90(r26) +/* 8037F7A8 0037C708 48 00 A1 AD */ bl __cvt_fp2unsigned +/* 8037F7AC 0037C70C 7C 65 1B 78 */ mr r5, r3 +/* 8037F7B0 0037C710 4C C6 31 82 */ crclr 6 +/* 8037F7B4 0037C714 7F 24 CB 78 */ mr r4, r25 +/* 8037F7B8 0037C718 7F 67 DB 78 */ mr r7, r27 +/* 8037F7BC 0037C71C 38 7F 01 20 */ addi r3, r31, 0x120 +/* 8037F7C0 0037C720 38 D9 00 01 */ addi r6, r25, 1 +/* 8037F7C4 0037C724 48 00 01 E9 */ bl OSReport +/* 8037F7C8 0037C728 3B 5A 00 10 */ addi r26, r26, 0x10 +/* 8037F7CC 0037C72C 3B 39 00 02 */ addi r25, r25, 2 +/* 8037F7D0 0037C730 28 19 00 20 */ cmplwi r25, 0x20 +/* 8037F7D4 0037C734 41 80 FF C4 */ blt lbl_8037F798 +/* 8037F7D8 0037C738 38 7F 01 3C */ addi r3, r31, 0x13c +/* 8037F7DC 0037C73C 4C C6 31 82 */ crclr 6 +/* 8037F7E0 0037C740 48 00 01 CD */ bl OSReport +/* 8037F7E4 0037C744 3B 20 00 00 */ li r25, 0 +/* 8037F7E8 0037C748 57 20 18 38 */ slwi r0, r25, 3 +/* 8037F7EC 0037C74C 7F 5C 02 14 */ add r26, r28, r0 +/* 8037F7F0 0037C750 48 00 00 04 */ b lbl_8037F7F4 +lbl_8037F7F4: +/* 8037F7F4 0037C754 48 00 00 04 */ b lbl_8037F7F8 +lbl_8037F7F8: +/* 8037F7F8 0037C758 48 00 00 04 */ b lbl_8037F7FC +lbl_8037F7FC: +/* 8037F7FC 0037C75C C8 3A 01 D0 */ lfd f1, 0x1d0(r26) +/* 8037F800 0037C760 48 00 A1 55 */ bl __cvt_fp2unsigned +/* 8037F804 0037C764 7C 7B 1B 78 */ mr r27, r3 +/* 8037F808 0037C768 C8 3A 01 C8 */ lfd f1, 0x1c8(r26) +/* 8037F80C 0037C76C 48 00 A1 49 */ bl __cvt_fp2unsigned +/* 8037F810 0037C770 7C 65 1B 78 */ mr r5, r3 +/* 8037F814 0037C774 4C C6 31 82 */ crclr 6 +/* 8037F818 0037C778 7F 24 CB 78 */ mr r4, r25 +/* 8037F81C 0037C77C 7F 67 DB 78 */ mr r7, r27 +/* 8037F820 0037C780 38 7F 01 50 */ addi r3, r31, 0x150 +/* 8037F824 0037C784 38 D9 00 01 */ addi r6, r25, 1 +/* 8037F828 0037C788 48 00 01 85 */ bl OSReport +/* 8037F82C 0037C78C 3B 5A 00 10 */ addi r26, r26, 0x10 +/* 8037F830 0037C790 3B 39 00 02 */ addi r25, r25, 2 +/* 8037F834 0037C794 28 19 00 20 */ cmplwi r25, 0x20 +/* 8037F838 0037C798 41 80 FF C4 */ blt lbl_8037F7FC +/* 8037F83C 0037C79C 38 A0 00 00 */ li r5, 0 +/* 8037F840 0037C7A0 B0 A1 01 B0 */ sth r5, 0x1b0(r1) +/* 8037F844 0037C7A4 3C 60 80 00 */ lis r3, 0x800000D8@ha +/* 8037F848 0037C7A8 38 81 00 10 */ addi r4, r1, 0x10 +/* 8037F84C 0037C7AC B0 A1 01 B2 */ sth r5, 0x1b2(r1) +/* 8037F850 0037C7B0 80 03 00 D8 */ lwz r0, 0x800000D8@l(r3) +/* 8037F854 0037C7B4 7C 04 00 40 */ cmplw r4, r0 +/* 8037F858 0037C7B8 40 82 00 08 */ bne lbl_8037F860 +/* 8037F85C 0037C7BC 90 A3 00 D8 */ stw r5, 0xd8(r3) +lbl_8037F860: +/* 8037F860 0037C7C0 7F C3 F3 78 */ mr r3, r30 +/* 8037F864 0037C7C4 4B FF FB B9 */ bl OSSetCurrentContext +/* 8037F868 0037C7C8 7F A3 EB 78 */ mr r3, r29 +/* 8037F86C 0037C7CC 48 00 1E 1D */ bl OSRestoreInterrupts +lbl_8037F870: +/* 8037F870 0037C7D0 38 7F 01 70 */ addi r3, r31, 0x170 +/* 8037F874 0037C7D4 4C C6 31 82 */ crclr 6 +/* 8037F878 0037C7D8 48 00 01 35 */ bl OSReport +/* 8037F87C 0037C7DC 83 3C 00 04 */ lwz r25, 4(r28) +/* 8037F880 0037C7E0 3B 40 00 00 */ li r26, 0 +/* 8037F884 0037C7E4 48 00 00 04 */ b lbl_8037F888 +lbl_8037F888: +/* 8037F888 0037C7E8 48 00 00 04 */ b lbl_8037F88C +lbl_8037F88C: +/* 8037F88C 0037C7EC 48 00 00 20 */ b lbl_8037F8AC +lbl_8037F890: +/* 8037F890 0037C7F0 80 B9 00 00 */ lwz r5, 0(r25) +/* 8037F894 0037C7F4 7F 24 CB 78 */ mr r4, r25 +/* 8037F898 0037C7F8 80 D9 00 04 */ lwz r6, 4(r25) +/* 8037F89C 0037C7FC 38 7F 01 98 */ addi r3, r31, 0x198 +/* 8037F8A0 0037C800 4C C6 31 82 */ crclr 6 +/* 8037F8A4 0037C804 48 00 01 09 */ bl OSReport +/* 8037F8A8 0037C808 83 39 00 00 */ lwz r25, 0(r25) +lbl_8037F8AC: +/* 8037F8AC 0037C80C 28 19 00 00 */ cmplwi r25, 0 +/* 8037F8B0 0037C810 41 82 00 1C */ beq lbl_8037F8CC +/* 8037F8B4 0037C814 3C 19 00 01 */ addis r0, r25, 1 +/* 8037F8B8 0037C818 28 00 FF FF */ cmplwi r0, 0xffff +/* 8037F8BC 0037C81C 41 82 00 10 */ beq lbl_8037F8CC +/* 8037F8C0 0037C820 28 1A 00 10 */ cmplwi r26, 0x10 +/* 8037F8C4 0037C824 3B 5A 00 01 */ addi r26, r26, 1 +/* 8037F8C8 0037C828 41 80 FF C8 */ blt lbl_8037F890 +lbl_8037F8CC: +/* 8037F8CC 0037C82C BB 21 02 DC */ lmw r25, 0x2dc(r1) +/* 8037F8D0 0037C830 80 01 02 FC */ lwz r0, 0x2fc(r1) +/* 8037F8D4 0037C834 38 21 02 F8 */ addi r1, r1, 0x2f8 +/* 8037F8D8 0037C838 7C 08 03 A6 */ mtlr r0 +/* 8037F8DC 0037C83C 4E 80 00 20 */ blr + +.global OSSwitchFPUContext +OSSwitchFPUContext: +/* 8037F8E0 0037C840 7C A0 00 A6 */ mfmsr r5 +/* 8037F8E4 0037C844 60 A5 20 00 */ ori r5, r5, 0x2000 +/* 8037F8E8 0037C848 7C A0 01 24 */ mtmsr r5 +/* 8037F8EC 0037C84C 4C 00 01 2C */ isync +/* 8037F8F0 0037C850 80 A4 01 9C */ lwz r5, 0x19c(r4) +/* 8037F8F4 0037C854 60 A5 20 00 */ ori r5, r5, 0x2000 +/* 8037F8F8 0037C858 7C BB 03 A6 */ mtspr 0x1b, r5 +/* 8037F8FC 0037C85C 3C 60 80 00 */ lis r3, 0x800000D8@ha +/* 8037F900 0037C860 80 A3 00 D8 */ lwz r5, 0x800000D8@l(r3) +/* 8037F904 0037C864 90 83 00 D8 */ stw r4, 0xd8(r3) +/* 8037F908 0037C868 7C 05 20 00 */ cmpw r5, r4 +/* 8037F90C 0037C86C 41 82 00 14 */ beq lbl_8037F920 +/* 8037F910 0037C870 2C 05 00 00 */ cmpwi r5, 0 +/* 8037F914 0037C874 41 82 00 08 */ beq lbl_8037F91C +/* 8037F918 0037C878 4B FF F9 D5 */ bl __OSSaveFPUContext +lbl_8037F91C: +/* 8037F91C 0037C87C 4B FF F8 AD */ bl __OSLoadFPUContext +lbl_8037F920: +/* 8037F920 0037C880 80 64 00 80 */ lwz r3, 0x80(r4) +/* 8037F924 0037C884 7C 6F F1 20 */ mtcrf 0xff, r3 +/* 8037F928 0037C888 80 64 00 84 */ lwz r3, 0x84(r4) +/* 8037F92C 0037C88C 7C 68 03 A6 */ mtlr r3 +/* 8037F930 0037C890 80 64 01 98 */ lwz r3, 0x198(r4) +/* 8037F934 0037C894 7C 7A 03 A6 */ mtspr 0x1a, r3 +/* 8037F938 0037C898 80 64 00 88 */ lwz r3, 0x88(r4) +/* 8037F93C 0037C89C 7C 69 03 A6 */ mtctr r3 +/* 8037F940 0037C8A0 80 64 00 8C */ lwz r3, 0x8c(r4) +/* 8037F944 0037C8A4 7C 61 03 A6 */ mtxer r3 +/* 8037F948 0037C8A8 A0 64 01 A2 */ lhz r3, 0x1a2(r4) +/* 8037F94C 0037C8AC 54 63 07 FA */ rlwinm r3, r3, 0, 0x1f, 0x1d +/* 8037F950 0037C8B0 B0 64 01 A2 */ sth r3, 0x1a2(r4) +/* 8037F954 0037C8B4 80 A4 00 14 */ lwz r5, 0x14(r4) +/* 8037F958 0037C8B8 80 64 00 0C */ lwz r3, 0xc(r4) +/* 8037F95C 0037C8BC 80 84 00 10 */ lwz r4, 0x10(r4) +/* 8037F960 0037C8C0 4C 00 00 64 */ rfi + +.global __OSContextInit +__OSContextInit: +/* 8037F964 0037C8C4 7C 08 02 A6 */ mflr r0 +/* 8037F968 0037C8C8 90 01 00 04 */ stw r0, 4(r1) +/* 8037F96C 0037C8CC 94 21 FF F8 */ stwu r1, -8(r1) +/* 8037F970 0037C8D0 3C 60 80 38 */ lis r3, OSSwitchFPUContext@ha +/* 8037F974 0037C8D4 38 83 F8 E0 */ addi r4, r3, OSSwitchFPUContext@l +/* 8037F978 0037C8D8 38 60 00 07 */ li r3, 7 +/* 8037F97C 0037C8DC 4B FF E5 4D */ bl __OSSetExceptionHandler +/* 8037F980 0037C8E0 38 00 00 00 */ li r0, 0 +/* 8037F984 0037C8E4 4C C6 31 82 */ crclr 6 +/* 8037F988 0037C8E8 3C 80 80 00 */ lis r4, 0x800000D8@ha +/* 8037F98C 0037C8EC 3C 60 80 3F */ lis r3, lbl_803F140C@ha +/* 8037F990 0037C8F0 90 04 00 D8 */ stw r0, 0x800000D8@l(r4) +/* 8037F994 0037C8F4 38 63 14 0C */ addi r3, r3, lbl_803F140C@l +/* 8037F998 0037C8F8 4B FE FF D1 */ bl DBPrintf +/* 8037F99C 0037C8FC 80 01 00 0C */ lwz r0, 0xc(r1) +/* 8037F9A0 0037C900 38 21 00 08 */ addi r1, r1, 8 +/* 8037F9A4 0037C904 7C 08 03 A6 */ mtlr r0 +/* 8037F9A8 0037C908 4E 80 00 20 */ blr diff --git a/asm/Dolphin/OS/OSError.s b/asm/Dolphin/OS/OSError.s new file mode 100644 index 00000000..2bb75523 --- /dev/null +++ b/asm/Dolphin/OS/OSError.s @@ -0,0 +1,465 @@ +.include "macros.inc" + +.section .text, "ax" + +.global OSReport +OSReport: +/* 8037F9AC 0037C90C 7C 08 02 A6 */ mflr r0 +/* 8037F9B0 0037C910 90 01 00 04 */ stw r0, 4(r1) +/* 8037F9B4 0037C914 94 21 FF 88 */ stwu r1, -0x78(r1) +/* 8037F9B8 0037C918 40 86 00 24 */ bne cr1, lbl_8037F9DC +/* 8037F9BC 0037C91C D8 21 00 28 */ stfd f1, 0x28(r1) +/* 8037F9C0 0037C920 D8 41 00 30 */ stfd f2, 0x30(r1) +/* 8037F9C4 0037C924 D8 61 00 38 */ stfd f3, 0x38(r1) +/* 8037F9C8 0037C928 D8 81 00 40 */ stfd f4, 0x40(r1) +/* 8037F9CC 0037C92C D8 A1 00 48 */ stfd f5, 0x48(r1) +/* 8037F9D0 0037C930 D8 C1 00 50 */ stfd f6, 0x50(r1) +/* 8037F9D4 0037C934 D8 E1 00 58 */ stfd f7, 0x58(r1) +/* 8037F9D8 0037C938 D9 01 00 60 */ stfd f8, 0x60(r1) +lbl_8037F9DC: +/* 8037F9DC 0037C93C 90 61 00 08 */ stw r3, 8(r1) +/* 8037F9E0 0037C940 3C 00 01 00 */ lis r0, 0x100 +/* 8037F9E4 0037C944 90 81 00 0C */ stw r4, 0xc(r1) +/* 8037F9E8 0037C948 38 81 00 6C */ addi r4, r1, 0x6c +/* 8037F9EC 0037C94C 90 A1 00 10 */ stw r5, 0x10(r1) +/* 8037F9F0 0037C950 90 C1 00 14 */ stw r6, 0x14(r1) +/* 8037F9F4 0037C954 90 E1 00 18 */ stw r7, 0x18(r1) +/* 8037F9F8 0037C958 91 01 00 1C */ stw r8, 0x1c(r1) +/* 8037F9FC 0037C95C 91 21 00 20 */ stw r9, 0x20(r1) +/* 8037FA00 0037C960 91 41 00 24 */ stw r10, 0x24(r1) +/* 8037FA04 0037C964 90 01 00 6C */ stw r0, 0x6c(r1) +/* 8037FA08 0037C968 38 01 00 80 */ addi r0, r1, 0x80 +/* 8037FA0C 0037C96C 90 01 00 70 */ stw r0, 0x70(r1) +/* 8037FA10 0037C970 38 01 00 08 */ addi r0, r1, 8 +/* 8037FA14 0037C974 90 01 00 74 */ stw r0, 0x74(r1) +/* 8037FA18 0037C978 48 00 E4 1D */ bl vprintf +/* 8037FA1C 0037C97C 80 01 00 7C */ lwz r0, 0x7c(r1) +/* 8037FA20 0037C980 38 21 00 78 */ addi r1, r1, 0x78 +/* 8037FA24 0037C984 7C 08 03 A6 */ mtlr r0 +/* 8037FA28 0037C988 4E 80 00 20 */ blr + +.global OSPanic +OSPanic: +/* 8037FA2C 0037C98C 7C 08 02 A6 */ mflr r0 +/* 8037FA30 0037C990 90 01 00 04 */ stw r0, 4(r1) +/* 8037FA34 0037C994 94 21 FF 70 */ stwu r1, -0x90(r1) +/* 8037FA38 0037C998 93 E1 00 8C */ stw r31, 0x8c(r1) +/* 8037FA3C 0037C99C 93 C1 00 88 */ stw r30, 0x88(r1) +/* 8037FA40 0037C9A0 93 A1 00 84 */ stw r29, 0x84(r1) +/* 8037FA44 0037C9A4 93 81 00 80 */ stw r28, 0x80(r1) +/* 8037FA48 0037C9A8 40 86 00 24 */ bne cr1, lbl_8037FA6C +/* 8037FA4C 0037C9AC D8 21 00 28 */ stfd f1, 0x28(r1) +/* 8037FA50 0037C9B0 D8 41 00 30 */ stfd f2, 0x30(r1) +/* 8037FA54 0037C9B4 D8 61 00 38 */ stfd f3, 0x38(r1) +/* 8037FA58 0037C9B8 D8 81 00 40 */ stfd f4, 0x40(r1) +/* 8037FA5C 0037C9BC D8 A1 00 48 */ stfd f5, 0x48(r1) +/* 8037FA60 0037C9C0 D8 C1 00 50 */ stfd f6, 0x50(r1) +/* 8037FA64 0037C9C4 D8 E1 00 58 */ stfd f7, 0x58(r1) +/* 8037FA68 0037C9C8 D9 01 00 60 */ stfd f8, 0x60(r1) +lbl_8037FA6C: +/* 8037FA6C 0037C9CC 90 61 00 08 */ stw r3, 8(r1) +/* 8037FA70 0037C9D0 3B 83 00 00 */ addi r28, r3, 0 +/* 8037FA74 0037C9D4 3B C4 00 00 */ addi r30, r4, 0 +/* 8037FA78 0037C9D8 90 81 00 0C */ stw r4, 0xc(r1) +/* 8037FA7C 0037C9DC 3B A5 00 00 */ addi r29, r5, 0 +/* 8037FA80 0037C9E0 90 A1 00 10 */ stw r5, 0x10(r1) +/* 8037FA84 0037C9E4 90 C1 00 14 */ stw r6, 0x14(r1) +/* 8037FA88 0037C9E8 3C C0 80 3F */ lis r6, lbl_803F1430@ha +/* 8037FA8C 0037C9EC 3B E6 14 30 */ addi r31, r6, lbl_803F1430@l +/* 8037FA90 0037C9F0 90 E1 00 18 */ stw r7, 0x18(r1) +/* 8037FA94 0037C9F4 91 01 00 1C */ stw r8, 0x1c(r1) +/* 8037FA98 0037C9F8 91 21 00 20 */ stw r9, 0x20(r1) +/* 8037FA9C 0037C9FC 91 41 00 24 */ stw r10, 0x24(r1) +/* 8037FAA0 0037CA00 48 00 1B C1 */ bl OSDisableInterrupts +/* 8037FAA4 0037CA04 3C 00 03 00 */ lis r0, 0x300 +/* 8037FAA8 0037CA08 90 01 00 74 */ stw r0, 0x74(r1) +/* 8037FAAC 0037CA0C 38 01 00 98 */ addi r0, r1, 0x98 +/* 8037FAB0 0037CA10 38 81 00 74 */ addi r4, r1, 0x74 +/* 8037FAB4 0037CA14 90 01 00 78 */ stw r0, 0x78(r1) +/* 8037FAB8 0037CA18 38 01 00 08 */ addi r0, r1, 8 +/* 8037FABC 0037CA1C 38 7D 00 00 */ addi r3, r29, 0 +/* 8037FAC0 0037CA20 90 01 00 7C */ stw r0, 0x7c(r1) +/* 8037FAC4 0037CA24 48 00 E3 71 */ bl vprintf +/* 8037FAC8 0037CA28 38 7F 00 00 */ addi r3, r31, 0 +/* 8037FACC 0037CA2C 4C C6 31 82 */ crclr 6 +/* 8037FAD0 0037CA30 38 9C 00 00 */ addi r4, r28, 0 +/* 8037FAD4 0037CA34 38 BE 00 00 */ addi r5, r30, 0 +/* 8037FAD8 0037CA38 4B FF FE D5 */ bl OSReport +/* 8037FADC 0037CA3C 38 7F 00 18 */ addi r3, r31, 0x18 +/* 8037FAE0 0037CA40 4C C6 31 82 */ crclr 6 +/* 8037FAE4 0037CA44 4B FF FE C9 */ bl OSReport +/* 8037FAE8 0037CA48 3B C0 00 00 */ li r30, 0 +/* 8037FAEC 0037CA4C 4B FF FA F1 */ bl OSGetStackPointer +/* 8037FAF0 0037CA50 7C 7D 1B 78 */ mr r29, r3 +/* 8037FAF4 0037CA54 48 00 00 20 */ b lbl_8037FB14 +lbl_8037FAF8: +/* 8037FAF8 0037CA58 80 BD 00 00 */ lwz r5, 0(r29) +/* 8037FAFC 0037CA5C 7F A4 EB 78 */ mr r4, r29 +/* 8037FB00 0037CA60 80 DD 00 04 */ lwz r6, 4(r29) +/* 8037FB04 0037CA64 38 7F 00 40 */ addi r3, r31, 0x40 +/* 8037FB08 0037CA68 4C C6 31 82 */ crclr 6 +/* 8037FB0C 0037CA6C 4B FF FE A1 */ bl OSReport +/* 8037FB10 0037CA70 83 BD 00 00 */ lwz r29, 0(r29) +lbl_8037FB14: +/* 8037FB14 0037CA74 28 1D 00 00 */ cmplwi r29, 0 +/* 8037FB18 0037CA78 41 82 00 1C */ beq lbl_8037FB34 +/* 8037FB1C 0037CA7C 3C 1D 00 01 */ addis r0, r29, 1 +/* 8037FB20 0037CA80 28 00 FF FF */ cmplwi r0, 0xffff +/* 8037FB24 0037CA84 41 82 00 10 */ beq lbl_8037FB34 +/* 8037FB28 0037CA88 28 1E 00 10 */ cmplwi r30, 0x10 +/* 8037FB2C 0037CA8C 3B DE 00 01 */ addi r30, r30, 1 +/* 8037FB30 0037CA90 41 80 FF C8 */ blt lbl_8037FAF8 +lbl_8037FB34: +/* 8037FB34 0037CA94 4B FE FC E1 */ bl PPCHalt +/* 8037FB38 0037CA98 80 01 00 94 */ lwz r0, 0x94(r1) +/* 8037FB3C 0037CA9C 83 E1 00 8C */ lwz r31, 0x8c(r1) +/* 8037FB40 0037CAA0 83 C1 00 88 */ lwz r30, 0x88(r1) +/* 8037FB44 0037CAA4 83 A1 00 84 */ lwz r29, 0x84(r1) +/* 8037FB48 0037CAA8 83 81 00 80 */ lwz r28, 0x80(r1) +/* 8037FB4C 0037CAAC 38 21 00 90 */ addi r1, r1, 0x90 +/* 8037FB50 0037CAB0 7C 08 03 A6 */ mtlr r0 +/* 8037FB54 0037CAB4 4E 80 00 20 */ blr + +.global OSSetErrorHandler +OSSetErrorHandler: +/* 8037FB58 0037CAB8 7C 08 02 A6 */ mflr r0 +/* 8037FB5C 0037CABC 90 01 00 04 */ stw r0, 4(r1) +/* 8037FB60 0037CAC0 94 21 FF D0 */ stwu r1, -0x30(r1) +/* 8037FB64 0037CAC4 93 E1 00 2C */ stw r31, 0x2c(r1) +/* 8037FB68 0037CAC8 93 C1 00 28 */ stw r30, 0x28(r1) +/* 8037FB6C 0037CACC 93 A1 00 24 */ stw r29, 0x24(r1) +/* 8037FB70 0037CAD0 3B A3 00 00 */ addi r29, r3, 0 +/* 8037FB74 0037CAD4 93 81 00 20 */ stw r28, 0x20(r1) +/* 8037FB78 0037CAD8 3B 84 00 00 */ addi r28, r4, 0 +/* 8037FB7C 0037CADC 48 00 1A E5 */ bl OSDisableInterrupts +/* 8037FB80 0037CAE0 3C 80 80 54 */ lis r4, lbl_80541250@ha +/* 8037FB84 0037CAE4 57 A5 13 BA */ rlwinm r5, r29, 2, 0xe, 0x1d +/* 8037FB88 0037CAE8 38 04 12 50 */ addi r0, r4, lbl_80541250@l +/* 8037FB8C 0037CAEC 57 A6 04 3E */ clrlwi r6, r29, 0x10 +/* 8037FB90 0037CAF0 7C 80 2A 14 */ add r4, r0, r5 +/* 8037FB94 0037CAF4 83 C4 00 00 */ lwz r30, 0(r4) +/* 8037FB98 0037CAF8 28 06 00 10 */ cmplwi r6, 0x10 +/* 8037FB9C 0037CAFC 7C 7D 1B 78 */ mr r29, r3 +/* 8037FBA0 0037CB00 93 84 00 00 */ stw r28, 0(r4) +/* 8037FBA4 0037CB04 40 82 01 A0 */ bne lbl_8037FD44 +/* 8037FBA8 0037CB08 4B FE FC 2D */ bl PPCMfmsr +/* 8037FBAC 0037CB0C 3B E3 00 00 */ addi r31, r3, 0 +/* 8037FBB0 0037CB10 63 E3 20 00 */ ori r3, r31, 0x2000 +/* 8037FBB4 0037CB14 4B FE FC 29 */ bl PPCMtmsr +/* 8037FBB8 0037CB18 4B FE FC 71 */ bl PPCMffpscr +/* 8037FBBC 0037CB1C 28 1C 00 00 */ cmplwi r28, 0 +/* 8037FBC0 0037CB20 41 82 01 18 */ beq lbl_8037FCD8 +/* 8037FBC4 0037CB24 3C A0 80 00 */ lis r5, 0x800000DC@ha +/* 8037FBC8 0037CB28 3C 80 60 06 */ lis r4, 0x6005F8FF@ha +/* 8037FBCC 0037CB2C 80 C5 00 DC */ lwz r6, 0x800000DC@l(r5) +/* 8037FBD0 0037CB30 38 84 F8 FF */ addi r4, r4, 0x6005F8FF@l +/* 8037FBD4 0037CB34 48 00 00 E8 */ b lbl_8037FCBC +lbl_8037FBD8: +/* 8037FBD8 0037CB38 80 06 01 9C */ lwz r0, 0x19c(r6) +/* 8037FBDC 0037CB3C 60 00 09 00 */ ori r0, r0, 0x900 +/* 8037FBE0 0037CB40 90 06 01 9C */ stw r0, 0x19c(r6) +/* 8037FBE4 0037CB44 A0 A6 01 A2 */ lhz r5, 0x1a2(r6) +/* 8037FBE8 0037CB48 54 A0 07 FF */ clrlwi. r0, r5, 0x1f +/* 8037FBEC 0037CB4C 40 82 00 AC */ bne lbl_8037FC98 +/* 8037FBF0 0037CB50 60 A5 00 01 */ ori r5, r5, 1 +/* 8037FBF4 0037CB54 38 00 00 04 */ li r0, 4 +/* 8037FBF8 0037CB58 B0 A6 01 A2 */ sth r5, 0x1a2(r6) +/* 8037FBFC 0037CB5C 7C 09 03 A6 */ mtctr r0 +/* 8037FC00 0037CB60 38 A6 00 00 */ addi r5, r6, 0 +lbl_8037FC04: +/* 8037FC04 0037CB64 38 00 FF FF */ li r0, -1 +/* 8037FC08 0037CB68 90 05 00 94 */ stw r0, 0x94(r5) +/* 8037FC0C 0037CB6C 90 05 00 90 */ stw r0, 0x90(r5) +/* 8037FC10 0037CB70 90 05 01 CC */ stw r0, 0x1cc(r5) +/* 8037FC14 0037CB74 90 05 01 C8 */ stw r0, 0x1c8(r5) +/* 8037FC18 0037CB78 90 05 00 9C */ stw r0, 0x9c(r5) +/* 8037FC1C 0037CB7C 90 05 00 98 */ stw r0, 0x98(r5) +/* 8037FC20 0037CB80 90 05 01 D4 */ stw r0, 0x1d4(r5) +/* 8037FC24 0037CB84 90 05 01 D0 */ stw r0, 0x1d0(r5) +/* 8037FC28 0037CB88 90 05 00 A4 */ stw r0, 0xa4(r5) +/* 8037FC2C 0037CB8C 90 05 00 A0 */ stw r0, 0xa0(r5) +/* 8037FC30 0037CB90 90 05 01 DC */ stw r0, 0x1dc(r5) +/* 8037FC34 0037CB94 90 05 01 D8 */ stw r0, 0x1d8(r5) +/* 8037FC38 0037CB98 90 05 00 AC */ stw r0, 0xac(r5) +/* 8037FC3C 0037CB9C 90 05 00 A8 */ stw r0, 0xa8(r5) +/* 8037FC40 0037CBA0 90 05 01 E4 */ stw r0, 0x1e4(r5) +/* 8037FC44 0037CBA4 90 05 01 E0 */ stw r0, 0x1e0(r5) +/* 8037FC48 0037CBA8 90 05 00 B4 */ stw r0, 0xb4(r5) +/* 8037FC4C 0037CBAC 90 05 00 B0 */ stw r0, 0xb0(r5) +/* 8037FC50 0037CBB0 90 05 01 EC */ stw r0, 0x1ec(r5) +/* 8037FC54 0037CBB4 90 05 01 E8 */ stw r0, 0x1e8(r5) +/* 8037FC58 0037CBB8 90 05 00 BC */ stw r0, 0xbc(r5) +/* 8037FC5C 0037CBBC 90 05 00 B8 */ stw r0, 0xb8(r5) +/* 8037FC60 0037CBC0 90 05 01 F4 */ stw r0, 0x1f4(r5) +/* 8037FC64 0037CBC4 90 05 01 F0 */ stw r0, 0x1f0(r5) +/* 8037FC68 0037CBC8 90 05 00 C4 */ stw r0, 0xc4(r5) +/* 8037FC6C 0037CBCC 90 05 00 C0 */ stw r0, 0xc0(r5) +/* 8037FC70 0037CBD0 90 05 01 FC */ stw r0, 0x1fc(r5) +/* 8037FC74 0037CBD4 90 05 01 F8 */ stw r0, 0x1f8(r5) +/* 8037FC78 0037CBD8 90 05 00 CC */ stw r0, 0xcc(r5) +/* 8037FC7C 0037CBDC 90 05 00 C8 */ stw r0, 0xc8(r5) +/* 8037FC80 0037CBE0 90 05 02 04 */ stw r0, 0x204(r5) +/* 8037FC84 0037CBE4 90 05 02 00 */ stw r0, 0x200(r5) +/* 8037FC88 0037CBE8 38 A5 00 40 */ addi r5, r5, 0x40 +/* 8037FC8C 0037CBEC 42 00 FF 78 */ bdnz lbl_8037FC04 +/* 8037FC90 0037CBF0 38 00 00 04 */ li r0, 4 +/* 8037FC94 0037CBF4 90 06 01 94 */ stw r0, 0x194(r6) +lbl_8037FC98: +/* 8037FC98 0037CBF8 80 0D 9F 78 */ lwz r0, lbl_805A8B38@sda21(r13) +/* 8037FC9C 0037CBFC 80 A6 01 94 */ lwz r5, 0x194(r6) +/* 8037FCA0 0037CC00 54 00 06 38 */ rlwinm r0, r0, 0, 0x18, 0x1c +/* 8037FCA4 0037CC04 7C A0 03 78 */ or r0, r5, r0 +/* 8037FCA8 0037CC08 90 06 01 94 */ stw r0, 0x194(r6) +/* 8037FCAC 0037CC0C 80 06 01 94 */ lwz r0, 0x194(r6) +/* 8037FCB0 0037CC10 7C 00 20 38 */ and r0, r0, r4 +/* 8037FCB4 0037CC14 90 06 01 94 */ stw r0, 0x194(r6) +/* 8037FCB8 0037CC18 80 C6 02 FC */ lwz r6, 0x2fc(r6) +lbl_8037FCBC: +/* 8037FCBC 0037CC1C 28 06 00 00 */ cmplwi r6, 0 +/* 8037FCC0 0037CC20 40 82 FF 18 */ bne lbl_8037FBD8 +/* 8037FCC4 0037CC24 80 0D 9F 78 */ lwz r0, lbl_805A8B38@sda21(r13) +/* 8037FCC8 0037CC28 63 FF 09 00 */ ori r31, r31, 0x900 +/* 8037FCCC 0037CC2C 54 00 06 38 */ rlwinm r0, r0, 0, 0x18, 0x1c +/* 8037FCD0 0037CC30 7C 63 03 78 */ or r3, r3, r0 +/* 8037FCD4 0037CC34 48 00 00 58 */ b lbl_8037FD2C +lbl_8037FCD8: +/* 8037FCD8 0037CC38 3C A0 80 00 */ lis r5, 0x800000DC@ha +/* 8037FCDC 0037CC3C 3C 80 60 06 */ lis r4, 0x6005F8FF@ha +/* 8037FCE0 0037CC40 80 C5 00 DC */ lwz r6, 0x800000DC@l(r5) +/* 8037FCE4 0037CC44 38 84 F8 FF */ addi r4, r4, 0x6005F8FF@l +/* 8037FCE8 0037CC48 38 A0 F6 FF */ li r5, -2305 +/* 8037FCEC 0037CC4C 48 00 00 2C */ b lbl_8037FD18 +lbl_8037FCF0: +/* 8037FCF0 0037CC50 80 06 01 9C */ lwz r0, 0x19c(r6) +/* 8037FCF4 0037CC54 7C 00 28 38 */ and r0, r0, r5 +/* 8037FCF8 0037CC58 90 06 01 9C */ stw r0, 0x19c(r6) +/* 8037FCFC 0037CC5C 80 06 01 94 */ lwz r0, 0x194(r6) +/* 8037FD00 0037CC60 54 00 07 6E */ rlwinm r0, r0, 0, 0x1d, 0x17 +/* 8037FD04 0037CC64 90 06 01 94 */ stw r0, 0x194(r6) +/* 8037FD08 0037CC68 80 06 01 94 */ lwz r0, 0x194(r6) +/* 8037FD0C 0037CC6C 7C 00 20 38 */ and r0, r0, r4 +/* 8037FD10 0037CC70 90 06 01 94 */ stw r0, 0x194(r6) +/* 8037FD14 0037CC74 80 C6 02 FC */ lwz r6, 0x2fc(r6) +lbl_8037FD18: +/* 8037FD18 0037CC78 28 06 00 00 */ cmplwi r6, 0 +/* 8037FD1C 0037CC7C 40 82 FF D4 */ bne lbl_8037FCF0 +/* 8037FD20 0037CC80 38 00 F6 FF */ li r0, -2305 +/* 8037FD24 0037CC84 54 63 07 6E */ rlwinm r3, r3, 0, 0x1d, 0x17 +/* 8037FD28 0037CC88 7F FF 00 38 */ and r31, r31, r0 +lbl_8037FD2C: +/* 8037FD2C 0037CC8C 3C 80 60 06 */ lis r4, 0x6005F8FF@ha +/* 8037FD30 0037CC90 38 04 F8 FF */ addi r0, r4, 0x6005F8FF@l +/* 8037FD34 0037CC94 7C 63 00 38 */ and r3, r3, r0 +/* 8037FD38 0037CC98 4B FE FB 11 */ bl PPCMtfpscr +/* 8037FD3C 0037CC9C 7F E3 FB 78 */ mr r3, r31 +/* 8037FD40 0037CCA0 4B FE FA 9D */ bl PPCMtmsr +lbl_8037FD44: +/* 8037FD44 0037CCA4 7F A3 EB 78 */ mr r3, r29 +/* 8037FD48 0037CCA8 48 00 19 41 */ bl OSRestoreInterrupts +/* 8037FD4C 0037CCAC 7F C3 F3 78 */ mr r3, r30 +/* 8037FD50 0037CCB0 80 01 00 34 */ lwz r0, 0x34(r1) +/* 8037FD54 0037CCB4 83 E1 00 2C */ lwz r31, 0x2c(r1) +/* 8037FD58 0037CCB8 83 C1 00 28 */ lwz r30, 0x28(r1) +/* 8037FD5C 0037CCBC 83 A1 00 24 */ lwz r29, 0x24(r1) +/* 8037FD60 0037CCC0 83 81 00 20 */ lwz r28, 0x20(r1) +/* 8037FD64 0037CCC4 38 21 00 30 */ addi r1, r1, 0x30 +/* 8037FD68 0037CCC8 7C 08 03 A6 */ mtlr r0 +/* 8037FD6C 0037CCCC 4E 80 00 20 */ blr + +.global __OSUnhandledException +__OSUnhandledException: +/* 8037FD70 0037CCD0 7C 08 02 A6 */ mflr r0 +/* 8037FD74 0037CCD4 3D 00 80 54 */ lis r8, lbl_80541250@ha +/* 8037FD78 0037CCD8 90 01 00 04 */ stw r0, 4(r1) +/* 8037FD7C 0037CCDC 3C E0 80 3F */ lis r7, lbl_803F1430@ha +/* 8037FD80 0037CCE0 94 21 FF C0 */ stwu r1, -0x40(r1) +/* 8037FD84 0037CCE4 BE C1 00 18 */ stmw r22, 0x18(r1) +/* 8037FD88 0037CCE8 3B 03 00 00 */ addi r24, r3, 0 +/* 8037FD8C 0037CCEC 3B 24 00 00 */ addi r25, r4, 0 +/* 8037FD90 0037CCF0 3B 45 00 00 */ addi r26, r5, 0 +/* 8037FD94 0037CCF4 3B 66 00 00 */ addi r27, r6, 0 +/* 8037FD98 0037CCF8 3B C8 12 50 */ addi r30, r8, lbl_80541250@l +/* 8037FD9C 0037CCFC 3B E7 14 30 */ addi r31, r7, lbl_803F1430@l +/* 8037FDA0 0037CD00 48 00 56 09 */ bl OSGetTime +/* 8037FDA4 0037CD04 80 B9 01 9C */ lwz r5, 0x19c(r25) +/* 8037FDA8 0037CD08 3B 84 00 00 */ addi r28, r4, 0 +/* 8037FDAC 0037CD0C 3B A3 00 00 */ addi r29, r3, 0 +/* 8037FDB0 0037CD10 54 A0 07 BD */ rlwinm. r0, r5, 0, 0x1e, 0x1e +/* 8037FDB4 0037CD14 40 82 00 18 */ bne lbl_8037FDCC +/* 8037FDB8 0037CD18 38 7F 00 5C */ addi r3, r31, 0x5c +/* 8037FDBC 0037CD1C 4C C6 31 82 */ crclr 6 +/* 8037FDC0 0037CD20 57 04 06 3E */ clrlwi r4, r24, 0x18 +/* 8037FDC4 0037CD24 4B FF FB E9 */ bl OSReport +/* 8037FDC8 0037CD28 48 00 01 54 */ b lbl_8037FF1C +lbl_8037FDCC: +/* 8037FDCC 0037CD2C 57 00 06 3E */ clrlwi r0, r24, 0x18 +/* 8037FDD0 0037CD30 28 00 00 06 */ cmplwi r0, 6 +/* 8037FDD4 0037CD34 40 82 00 D8 */ bne lbl_8037FEAC +/* 8037FDD8 0037CD38 54 A0 02 D7 */ rlwinm. r0, r5, 0, 0xb, 0xb +/* 8037FDDC 0037CD3C 41 82 00 D0 */ beq lbl_8037FEAC +/* 8037FDE0 0037CD40 80 1E 00 40 */ lwz r0, 0x40(r30) +/* 8037FDE4 0037CD44 28 00 00 00 */ cmplwi r0, 0 +/* 8037FDE8 0037CD48 41 82 00 C4 */ beq lbl_8037FEAC +/* 8037FDEC 0037CD4C 3B 00 00 10 */ li r24, 0x10 +/* 8037FDF0 0037CD50 4B FE F9 E5 */ bl PPCMfmsr +/* 8037FDF4 0037CD54 3A E3 00 00 */ addi r23, r3, 0 +/* 8037FDF8 0037CD58 62 E3 20 00 */ ori r3, r23, 0x2000 +/* 8037FDFC 0037CD5C 4B FE F9 E1 */ bl PPCMtmsr +/* 8037FE00 0037CD60 3C 60 80 00 */ lis r3, 0x800000D8@ha +/* 8037FE04 0037CD64 80 63 00 D8 */ lwz r3, 0x800000D8@l(r3) +/* 8037FE08 0037CD68 28 03 00 00 */ cmplwi r3, 0 +/* 8037FE0C 0037CD6C 41 82 00 08 */ beq lbl_8037FE14 +/* 8037FE10 0037CD70 4B FF F6 05 */ bl OSSaveFPUContext +lbl_8037FE14: +/* 8037FE14 0037CD74 4B FE FA 15 */ bl PPCMffpscr +/* 8037FE18 0037CD78 3C 80 60 06 */ lis r4, 0x6005F8FF@ha +/* 8037FE1C 0037CD7C 3A C4 F8 FF */ addi r22, r4, 0x6005F8FF@l +/* 8037FE20 0037CD80 7C 63 B0 38 */ and r3, r3, r22 +/* 8037FE24 0037CD84 4B FE FA 25 */ bl PPCMtfpscr +/* 8037FE28 0037CD88 7E E3 BB 78 */ mr r3, r23 +/* 8037FE2C 0037CD8C 4B FE F9 B1 */ bl PPCMtmsr +/* 8037FE30 0037CD90 3E E0 80 00 */ lis r23, 0x800000D8@ha +/* 8037FE34 0037CD94 80 17 00 D8 */ lwz r0, 0x800000D8@l(r23) +/* 8037FE38 0037CD98 7C 00 C8 40 */ cmplw r0, r25 +/* 8037FE3C 0037CD9C 40 82 00 54 */ bne lbl_8037FE90 +/* 8037FE40 0037CDA0 48 00 47 A1 */ bl OSDisableScheduler +/* 8037FE44 0037CDA4 81 9E 00 40 */ lwz r12, 0x40(r30) +/* 8037FE48 0037CDA8 38 99 00 00 */ addi r4, r25, 0 +/* 8037FE4C 0037CDAC 38 BA 00 00 */ addi r5, r26, 0 +/* 8037FE50 0037CDB0 4C C6 31 82 */ crclr 6 +/* 8037FE54 0037CDB4 7D 88 03 A6 */ mtlr r12 +/* 8037FE58 0037CDB8 38 DB 00 00 */ addi r6, r27, 0 +/* 8037FE5C 0037CDBC 38 60 00 10 */ li r3, 0x10 +/* 8037FE60 0037CDC0 4E 80 00 21 */ blrl +/* 8037FE64 0037CDC4 80 79 01 9C */ lwz r3, 0x19c(r25) +/* 8037FE68 0037CDC8 38 00 00 00 */ li r0, 0 +/* 8037FE6C 0037CDCC 54 63 04 E2 */ rlwinm r3, r3, 0, 0x13, 0x11 +/* 8037FE70 0037CDD0 90 79 01 9C */ stw r3, 0x19c(r25) +/* 8037FE74 0037CDD4 90 17 00 D8 */ stw r0, 0xd8(r23) +/* 8037FE78 0037CDD8 80 19 01 94 */ lwz r0, 0x194(r25) +/* 8037FE7C 0037CDDC 7C 00 B0 38 */ and r0, r0, r22 +/* 8037FE80 0037CDE0 90 19 01 94 */ stw r0, 0x194(r25) +/* 8037FE84 0037CDE4 48 00 47 9D */ bl OSEnableScheduler +/* 8037FE88 0037CDE8 48 00 4C 65 */ bl __OSReschedule +/* 8037FE8C 0037CDEC 48 00 00 18 */ b lbl_8037FEA4 +lbl_8037FE90: +/* 8037FE90 0037CDF0 80 79 01 9C */ lwz r3, 0x19c(r25) +/* 8037FE94 0037CDF4 38 00 00 00 */ li r0, 0 +/* 8037FE98 0037CDF8 54 63 04 E2 */ rlwinm r3, r3, 0, 0x13, 0x11 +/* 8037FE9C 0037CDFC 90 79 01 9C */ stw r3, 0x19c(r25) +/* 8037FEA0 0037CE00 90 17 00 D8 */ stw r0, 0xd8(r23) +lbl_8037FEA4: +/* 8037FEA4 0037CE04 7F 23 CB 78 */ mr r3, r25 +/* 8037FEA8 0037CE08 4B FF F6 5D */ bl OSLoadContext +lbl_8037FEAC: +/* 8037FEAC 0037CE0C 57 17 06 3E */ clrlwi r23, r24, 0x18 +/* 8037FEB0 0037CE10 57 00 15 BA */ rlwinm r0, r24, 2, 0x16, 0x1d +/* 8037FEB4 0037CE14 7E DE 02 14 */ add r22, r30, r0 +/* 8037FEB8 0037CE18 80 16 00 00 */ lwz r0, 0(r22) +/* 8037FEBC 0037CE1C 28 00 00 00 */ cmplwi r0, 0 +/* 8037FEC0 0037CE20 41 82 00 38 */ beq lbl_8037FEF8 +/* 8037FEC4 0037CE24 48 00 47 1D */ bl OSDisableScheduler +/* 8037FEC8 0037CE28 81 96 00 00 */ lwz r12, 0(r22) +/* 8037FECC 0037CE2C 38 77 00 00 */ addi r3, r23, 0 +/* 8037FED0 0037CE30 38 99 00 00 */ addi r4, r25, 0 +/* 8037FED4 0037CE34 4C C6 31 82 */ crclr 6 +/* 8037FED8 0037CE38 7D 88 03 A6 */ mtlr r12 +/* 8037FEDC 0037CE3C 38 BA 00 00 */ addi r5, r26, 0 +/* 8037FEE0 0037CE40 38 DB 00 00 */ addi r6, r27, 0 +/* 8037FEE4 0037CE44 4E 80 00 21 */ blrl +/* 8037FEE8 0037CE48 48 00 47 39 */ bl OSEnableScheduler +/* 8037FEEC 0037CE4C 48 00 4C 01 */ bl __OSReschedule +/* 8037FEF0 0037CE50 7F 23 CB 78 */ mr r3, r25 +/* 8037FEF4 0037CE54 4B FF F6 11 */ bl OSLoadContext +lbl_8037FEF8: +/* 8037FEF8 0037CE58 57 00 06 3E */ clrlwi r0, r24, 0x18 +/* 8037FEFC 0037CE5C 28 00 00 08 */ cmplwi r0, 8 +/* 8037FF00 0037CE60 40 82 00 0C */ bne lbl_8037FF0C +/* 8037FF04 0037CE64 7F 23 CB 78 */ mr r3, r25 +/* 8037FF08 0037CE68 4B FF F5 FD */ bl OSLoadContext +lbl_8037FF0C: +/* 8037FF0C 0037CE6C 38 7F 00 7C */ addi r3, r31, 0x7c +/* 8037FF10 0037CE70 4C C6 31 82 */ crclr 6 +/* 8037FF14 0037CE74 57 04 06 3E */ clrlwi r4, r24, 0x18 +/* 8037FF18 0037CE78 4B FF FA 95 */ bl OSReport +lbl_8037FF1C: +/* 8037FF1C 0037CE7C 38 6D 9F 7C */ addi r3, r13, lbl_805A8B3C@sda21 +/* 8037FF20 0037CE80 4C C6 31 82 */ crclr 6 +/* 8037FF24 0037CE84 4B FF FA 89 */ bl OSReport +/* 8037FF28 0037CE88 7F 23 CB 78 */ mr r3, r25 +/* 8037FF2C 0037CE8C 4B FF F7 0D */ bl OSDumpContext +/* 8037FF30 0037CE90 38 9A 00 00 */ addi r4, r26, 0 +/* 8037FF34 0037CE94 4C C6 31 82 */ crclr 6 +/* 8037FF38 0037CE98 38 BB 00 00 */ addi r5, r27, 0 +/* 8037FF3C 0037CE9C 38 7F 00 94 */ addi r3, r31, 0x94 +/* 8037FF40 0037CEA0 4B FF FA 6D */ bl OSReport +/* 8037FF44 0037CEA4 38 DC 00 00 */ addi r6, r28, 0 +/* 8037FF48 0037CEA8 4C C6 31 82 */ crclr 6 +/* 8037FF4C 0037CEAC 38 BD 00 00 */ addi r5, r29, 0 +/* 8037FF50 0037CEB0 38 7F 00 C8 */ addi r3, r31, 0xc8 +/* 8037FF54 0037CEB4 4B FF FA 59 */ bl OSReport +/* 8037FF58 0037CEB8 57 00 06 3E */ clrlwi r0, r24, 0x18 +/* 8037FF5C 0037CEBC 28 00 00 0F */ cmplwi r0, 0xf +/* 8037FF60 0037CEC0 41 81 00 C4 */ bgt lbl_80380024 +/* 8037FF64 0037CEC4 3C 60 80 3F */ lis r3, lbl_803F170C@ha +/* 8037FF68 0037CEC8 38 63 17 0C */ addi r3, r3, lbl_803F170C@l +/* 8037FF6C 0037CECC 54 00 10 3A */ slwi r0, r0, 2 +/* 8037FF70 0037CED0 7C 03 00 2E */ lwzx r0, r3, r0 +/* 8037FF74 0037CED4 7C 09 03 A6 */ mtctr r0 +/* 8037FF78 0037CED8 4E 80 04 20 */ bctr +/* 8037FF7C 0037CEDC 80 99 01 98 */ lwz r4, 0x198(r25) +/* 8037FF80 0037CEE0 38 BB 00 00 */ addi r5, r27, 0 +/* 8037FF84 0037CEE4 38 7F 00 D8 */ addi r3, r31, 0xd8 +/* 8037FF88 0037CEE8 4C C6 31 82 */ crclr 6 +/* 8037FF8C 0037CEEC 4B FF FA 21 */ bl OSReport +/* 8037FF90 0037CEF0 48 00 00 94 */ b lbl_80380024 +/* 8037FF94 0037CEF4 80 99 01 98 */ lwz r4, 0x198(r25) +/* 8037FF98 0037CEF8 38 7F 01 38 */ addi r3, r31, 0x138 +/* 8037FF9C 0037CEFC 4C C6 31 82 */ crclr 6 +/* 8037FFA0 0037CF00 4B FF FA 0D */ bl OSReport +/* 8037FFA4 0037CF04 48 00 00 80 */ b lbl_80380024 +/* 8037FFA8 0037CF08 80 99 01 98 */ lwz r4, 0x198(r25) +/* 8037FFAC 0037CF0C 38 BB 00 00 */ addi r5, r27, 0 +/* 8037FFB0 0037CF10 38 7F 01 84 */ addi r3, r31, 0x184 +/* 8037FFB4 0037CF14 4C C6 31 82 */ crclr 6 +/* 8037FFB8 0037CF18 4B FF F9 F5 */ bl OSReport +/* 8037FFBC 0037CF1C 48 00 00 68 */ b lbl_80380024 +/* 8037FFC0 0037CF20 80 99 01 98 */ lwz r4, 0x198(r25) +/* 8037FFC4 0037CF24 38 BB 00 00 */ addi r5, r27, 0 +/* 8037FFC8 0037CF28 38 7F 01 E8 */ addi r3, r31, 0x1e8 +/* 8037FFCC 0037CF2C 4C C6 31 82 */ crclr 6 +/* 8037FFD0 0037CF30 4B FF F9 DD */ bl OSReport +/* 8037FFD4 0037CF34 48 00 00 50 */ b lbl_80380024 +/* 8037FFD8 0037CF38 38 6D 9F 7C */ addi r3, r13, lbl_805A8B3C@sda21 +/* 8037FFDC 0037CF3C 4C C6 31 82 */ crclr 6 +/* 8037FFE0 0037CF40 4B FF F9 CD */ bl OSReport +/* 8037FFE4 0037CF44 3F 20 CC 00 */ lis r25, 0xCC005000@ha +/* 8037FFE8 0037CF48 4C C6 31 82 */ crclr 6 +/* 8037FFEC 0037CF4C 3B 19 50 00 */ addi r24, r25, 0xCC005000@l +/* 8037FFF0 0037CF50 A0 99 50 30 */ lhz r4, 0x5030(r25) +/* 8037FFF4 0037CF54 38 7F 02 48 */ addi r3, r31, 0x248 +/* 8037FFF8 0037CF58 A0 B9 50 32 */ lhz r5, 0x5032(r25) +/* 8037FFFC 0037CF5C 4B FF F9 B1 */ bl OSReport +/* 80380000 0037CF60 A0 98 00 20 */ lhz r4, 0x20(r24) +/* 80380004 0037CF64 38 7F 02 68 */ addi r3, r31, 0x268 +/* 80380008 0037CF68 A0 B8 00 22 */ lhz r5, 0x22(r24) +/* 8038000C 0037CF6C 4C C6 31 82 */ crclr 6 +/* 80380010 0037CF70 4B FF F9 9D */ bl OSReport +/* 80380014 0037CF74 80 99 60 14 */ lwz r4, 0x6014(r25) +/* 80380018 0037CF78 4C C6 31 82 */ crclr 6 +/* 8038001C 0037CF7C 38 7F 02 88 */ addi r3, r31, 0x288 +/* 80380020 0037CF80 4B FF F9 8D */ bl OSReport +lbl_80380024: +/* 80380024 0037CF84 A8 8D AD 18 */ lha r4, lbl_805A98D8@sda21(r13) +/* 80380028 0037CF88 38 7F 02 A4 */ addi r3, r31, 0x2a4 +/* 8038002C 0037CF8C 4C C6 31 82 */ crclr 6 +/* 80380030 0037CF90 80 AD AD 14 */ lwz r5, lbl_805A98D4@sda21(r13) +/* 80380034 0037CF94 80 ED AD 20 */ lwz r7, lbl_805A98E0@sda21(r13) +/* 80380038 0037CF98 81 0D AD 24 */ lwz r8, lbl_805A98E4@sda21(r13) +/* 8038003C 0037CF9C 4B FF F9 71 */ bl OSReport +/* 80380040 0037CFA0 4B FE F7 D5 */ bl PPCHalt +/* 80380044 0037CFA4 BA C1 00 18 */ lmw r22, 0x18(r1) +/* 80380048 0037CFA8 80 01 00 44 */ lwz r0, 0x44(r1) +/* 8038004C 0037CFAC 38 21 00 40 */ addi r1, r1, 0x40 +/* 80380050 0037CFB0 7C 08 03 A6 */ mtlr r0 +/* 80380054 0037CFB4 4E 80 00 20 */ blr diff --git a/asm/Dolphin/OS/OSFatal.s b/asm/Dolphin/OS/OSFatal.s new file mode 100644 index 00000000..0837206f --- /dev/null +++ b/asm/Dolphin/OS/OSFatal.s @@ -0,0 +1,821 @@ +.include "macros.inc" + +.section .text, "ax" + +.global ScreenReport +ScreenReport: +/* 80380058 0037CFB8 7C 08 02 A6 */ mflr r0 +/* 8038005C 0037CFBC 54 AB 04 3E */ clrlwi r11, r5, 0x10 +/* 80380060 0037CFC0 90 01 00 04 */ stw r0, 4(r1) +/* 80380064 0037CFC4 3C A0 80 81 */ lis r5, 0x80808081@ha +/* 80380068 0037CFC8 94 21 FE 60 */ stwu r1, -0x1a0(r1) +/* 8038006C 0037CFCC BE 01 01 60 */ stmw r16, 0x160(r1) +/* 80380070 0037CFD0 54 95 04 3E */ clrlwi r21, r4, 0x10 +/* 80380074 0037CFD4 3C 80 88 89 */ lis r4, 0x88888889@ha +/* 80380078 0037CFD8 3B 43 00 00 */ addi r26, r3, 0 +/* 8038007C 0037CFDC 3B 66 00 00 */ addi r27, r6, 0 +/* 80380080 0037CFE0 3B 87 00 00 */ addi r28, r7, 0 +/* 80380084 0037CFE4 3B A8 00 00 */ addi r29, r8, 0 +/* 80380088 0037CFE8 3B C9 00 00 */ addi r30, r9, 0 +/* 8038008C 0037CFEC 3A 0B FF E8 */ addi r16, r11, -24 +/* 80380090 0037CFF0 3A D5 FF D0 */ addi r22, r21, -48 +/* 80380094 0037CFF4 3B 25 80 81 */ addi r25, r5, 0x80808081@l +/* 80380098 0037CFF8 3B 04 88 89 */ addi r24, r4, 0x88888889@l +/* 8038009C 0037CFFC 3A E1 00 3C */ addi r23, r1, 0x3c +lbl_803800A0: +/* 803800A0 0037D000 7C 10 E8 00 */ cmpw r16, r29 +/* 803800A4 0037D004 41 80 03 7C */ blt lbl_80380420 +/* 803800A8 0037D008 7C 1D A9 D6 */ mullw r0, r29, r21 +/* 803800AC 0037D00C 7C 1C 02 14 */ add r0, r28, r0 +/* 803800B0 0037D010 54 00 08 3C */ slwi r0, r0, 1 +/* 803800B4 0037D014 3B FC 00 00 */ addi r31, r28, 0 +/* 803800B8 0037D018 7E 7A 02 14 */ add r19, r26, r0 +/* 803800BC 0037D01C 48 00 03 58 */ b lbl_80380414 +lbl_803800C0: +/* 803800C0 0037D020 7C 60 07 74 */ extsb r0, r3 +/* 803800C4 0037D024 2C 00 00 0A */ cmpwi r0, 0xa +/* 803800C8 0037D028 40 82 00 10 */ bne lbl_803800D8 +/* 803800CC 0037D02C 7F BD F2 14 */ add r29, r29, r30 +/* 803800D0 0037D030 39 4A 00 01 */ addi r10, r10, 1 +/* 803800D4 0037D034 4B FF FF CC */ b lbl_803800A0 +lbl_803800D8: +/* 803800D8 0037D038 7C 16 F8 00 */ cmpw r22, r31 +/* 803800DC 0037D03C 40 80 00 0C */ bge lbl_803800E8 +/* 803800E0 0037D040 7F BD F2 14 */ add r29, r29, r30 +/* 803800E4 0037D044 4B FF FF BC */ b lbl_803800A0 +lbl_803800E8: +/* 803800E8 0037D048 38 00 00 03 */ li r0, 3 +/* 803800EC 0037D04C 7C 09 03 A6 */ mtctr r0 +/* 803800F0 0037D050 38 80 00 00 */ li r4, 0 +/* 803800F4 0037D054 38 A0 00 00 */ li r5, 0 +lbl_803800F8: +/* 803800F8 0037D058 54 80 07 7E */ clrlwi r0, r4, 0x1d +/* 803800FC 0037D05C 7C C0 2A 14 */ add r6, r0, r5 +/* 80380100 0037D060 38 64 00 01 */ addi r3, r4, 1 +/* 80380104 0037D064 54 60 E8 FE */ srwi r0, r3, 3 +/* 80380108 0037D068 54 C6 10 3A */ slwi r6, r6, 2 +/* 8038010C 0037D06C 39 21 00 3C */ addi r9, r1, 0x3c +/* 80380110 0037D070 7D 29 32 14 */ add r9, r9, r6 +/* 80380114 0037D074 3A 80 00 00 */ li r20, 0 +/* 80380118 0037D078 92 89 00 00 */ stw r20, 0(r9) +/* 8038011C 0037D07C 1C 00 00 18 */ mulli r0, r0, 0x18 +/* 80380120 0037D080 92 89 00 20 */ stw r20, 0x20(r9) +/* 80380124 0037D084 54 63 07 7E */ clrlwi r3, r3, 0x1d +/* 80380128 0037D088 39 04 00 02 */ addi r8, r4, 2 +/* 8038012C 0037D08C 92 89 00 40 */ stw r20, 0x40(r9) +/* 80380130 0037D090 7C 63 02 14 */ add r3, r3, r0 +/* 80380134 0037D094 54 69 10 3A */ slwi r9, r3, 2 +/* 80380138 0037D098 38 61 00 3C */ addi r3, r1, 0x3c +/* 8038013C 0037D09C 7C 63 4A 14 */ add r3, r3, r9 +/* 80380140 0037D0A0 92 83 00 00 */ stw r20, 0(r3) +/* 80380144 0037D0A4 55 07 E8 FE */ srwi r7, r8, 3 +/* 80380148 0037D0A8 38 C4 00 03 */ addi r6, r4, 3 +/* 8038014C 0037D0AC 92 83 00 20 */ stw r20, 0x20(r3) +/* 80380150 0037D0B0 54 C0 E8 FE */ srwi r0, r6, 3 +/* 80380154 0037D0B4 1C E7 00 18 */ mulli r7, r7, 0x18 +/* 80380158 0037D0B8 92 83 00 40 */ stw r20, 0x40(r3) +/* 8038015C 0037D0BC 55 03 07 7E */ clrlwi r3, r8, 0x1d +/* 80380160 0037D0C0 7C 63 3A 14 */ add r3, r3, r7 +/* 80380164 0037D0C4 54 67 10 3A */ slwi r7, r3, 2 +/* 80380168 0037D0C8 38 61 00 3C */ addi r3, r1, 0x3c +/* 8038016C 0037D0CC 7C 63 3A 14 */ add r3, r3, r7 +/* 80380170 0037D0D0 92 83 00 00 */ stw r20, 0(r3) +/* 80380174 0037D0D4 3A 44 00 04 */ addi r18, r4, 4 +/* 80380178 0037D0D8 56 4C E8 FE */ srwi r12, r18, 3 +/* 8038017C 0037D0DC 92 83 00 20 */ stw r20, 0x20(r3) +/* 80380180 0037D0E0 39 64 00 05 */ addi r11, r4, 5 +/* 80380184 0037D0E4 55 69 E8 FE */ srwi r9, r11, 3 +/* 80380188 0037D0E8 92 83 00 40 */ stw r20, 0x40(r3) +/* 8038018C 0037D0EC 54 C3 07 7E */ clrlwi r3, r6, 0x1d +/* 80380190 0037D0F0 1C 00 00 18 */ mulli r0, r0, 0x18 +/* 80380194 0037D0F4 7C 63 02 14 */ add r3, r3, r0 +/* 80380198 0037D0F8 54 71 10 3A */ slwi r17, r3, 2 +/* 8038019C 0037D0FC 38 61 00 3C */ addi r3, r1, 0x3c +/* 803801A0 0037D100 7C 63 8A 14 */ add r3, r3, r17 +/* 803801A4 0037D104 92 83 00 00 */ stw r20, 0(r3) +/* 803801A8 0037D108 39 04 00 06 */ addi r8, r4, 6 +/* 803801AC 0037D10C 1D 8C 00 18 */ mulli r12, r12, 0x18 +/* 803801B0 0037D110 92 83 00 20 */ stw r20, 0x20(r3) +/* 803801B4 0037D114 38 C4 00 07 */ addi r6, r4, 7 +/* 803801B8 0037D118 92 83 00 40 */ stw r20, 0x40(r3) +/* 803801BC 0037D11C 56 51 07 7E */ clrlwi r17, r18, 0x1d +/* 803801C0 0037D120 7D 91 62 14 */ add r12, r17, r12 +/* 803801C4 0037D124 54 C0 E8 FE */ srwi r0, r6, 3 +/* 803801C8 0037D128 55 8C 10 3A */ slwi r12, r12, 2 +/* 803801CC 0037D12C 38 61 00 3C */ addi r3, r1, 0x3c +/* 803801D0 0037D130 7C 63 62 14 */ add r3, r3, r12 +/* 803801D4 0037D134 92 83 00 00 */ stw r20, 0(r3) +/* 803801D8 0037D138 1D 29 00 18 */ mulli r9, r9, 0x18 +/* 803801DC 0037D13C 92 83 00 20 */ stw r20, 0x20(r3) +/* 803801E0 0037D140 55 6B 07 7E */ clrlwi r11, r11, 0x1d +/* 803801E4 0037D144 7D 2B 4A 14 */ add r9, r11, r9 +/* 803801E8 0037D148 92 83 00 40 */ stw r20, 0x40(r3) +/* 803801EC 0037D14C 55 23 10 3A */ slwi r3, r9, 2 +/* 803801F0 0037D150 39 21 00 3C */ addi r9, r1, 0x3c +/* 803801F4 0037D154 7D 29 1A 14 */ add r9, r9, r3 +/* 803801F8 0037D158 55 07 E8 FE */ srwi r7, r8, 3 +/* 803801FC 0037D15C 92 89 00 00 */ stw r20, 0(r9) +/* 80380200 0037D160 1C 67 00 18 */ mulli r3, r7, 0x18 +/* 80380204 0037D164 92 89 00 20 */ stw r20, 0x20(r9) +/* 80380208 0037D168 55 07 07 7E */ clrlwi r7, r8, 0x1d +/* 8038020C 0037D16C 92 89 00 40 */ stw r20, 0x40(r9) +/* 80380210 0037D170 7C 67 1A 14 */ add r3, r7, r3 +/* 80380214 0037D174 54 63 10 3A */ slwi r3, r3, 2 +/* 80380218 0037D178 38 E1 00 3C */ addi r7, r1, 0x3c +/* 8038021C 0037D17C 7C E7 1A 14 */ add r7, r7, r3 +/* 80380220 0037D180 92 87 00 00 */ stw r20, 0(r7) +/* 80380224 0037D184 1C 00 00 18 */ mulli r0, r0, 0x18 +/* 80380228 0037D188 92 87 00 20 */ stw r20, 0x20(r7) +/* 8038022C 0037D18C 54 C3 07 7E */ clrlwi r3, r6, 0x1d +/* 80380230 0037D190 7C 03 02 14 */ add r0, r3, r0 +/* 80380234 0037D194 92 87 00 40 */ stw r20, 0x40(r7) +/* 80380238 0037D198 54 00 10 3A */ slwi r0, r0, 2 +/* 8038023C 0037D19C 38 61 00 3C */ addi r3, r1, 0x3c +/* 80380240 0037D1A0 7C 63 02 14 */ add r3, r3, r0 +/* 80380244 0037D1A4 92 83 00 00 */ stw r20, 0(r3) +/* 80380248 0037D1A8 38 A5 00 18 */ addi r5, r5, 0x18 +/* 8038024C 0037D1AC 38 84 00 08 */ addi r4, r4, 8 +/* 80380250 0037D1B0 92 83 00 20 */ stw r20, 0x20(r3) +/* 80380254 0037D1B4 92 83 00 40 */ stw r20, 0x40(r3) +/* 80380258 0037D1B8 42 00 FE A0 */ bdnz lbl_803800F8 +/* 8038025C 0037D1BC 38 6A 00 00 */ addi r3, r10, 0 +/* 80380260 0037D1C0 38 81 00 3C */ addi r4, r1, 0x3c +/* 80380264 0037D1C4 38 E1 01 5C */ addi r7, r1, 0x15c +/* 80380268 0037D1C8 38 A0 00 00 */ li r5, 0 +/* 8038026C 0037D1CC 38 C0 00 06 */ li r6, 6 +/* 80380270 0037D1D0 48 00 10 ED */ bl sub_8038135c +/* 80380274 0037D1D4 39 43 00 00 */ addi r10, r3, 0 +/* 80380278 0037D1D8 38 14 00 00 */ addi r0, r20, 0 +lbl_8038027C: +/* 8038027C 0037D1DC 56 83 E8 FE */ srwi r3, r20, 3 +/* 80380280 0037D1E0 1C A3 00 18 */ mulli r5, r3, 0x18 +/* 80380284 0037D1E4 38 80 00 0C */ li r4, 0xc +/* 80380288 0037D1E8 7C 03 03 78 */ mr r3, r0 +/* 8038028C 0037D1EC 7C 89 03 A6 */ mtctr r4 +/* 80380290 0037D1F0 56 86 07 7E */ clrlwi r6, r20, 0x1d +/* 80380294 0037D1F4 38 9F 00 00 */ addi r4, r31, 0 +/* 80380298 0037D1F8 7C A6 2A 14 */ add r5, r6, r5 +/* 8038029C 0037D1FC 54 07 08 3C */ slwi r7, r0, 1 +/* 803802A0 0037D200 38 C0 00 00 */ li r6, 0 +lbl_803802A4: +/* 803802A4 0037D204 54 C8 00 38 */ rlwinm r8, r6, 0, 0, 0x1c +/* 803802A8 0037D208 7D 05 42 14 */ add r8, r5, r8 +/* 803802AC 0037D20C 55 09 10 3A */ slwi r9, r8, 2 +/* 803802B0 0037D210 54 C8 07 7E */ clrlwi r8, r6, 0x1d +/* 803802B4 0037D214 7D 37 48 2E */ lwzx r9, r23, r9 +/* 803802B8 0037D218 21 08 00 07 */ subfic r8, r8, 7 +/* 803802BC 0037D21C 55 08 10 3A */ slwi r8, r8, 2 +/* 803802C0 0037D220 7D 28 44 30 */ srw r8, r9, r8 +/* 803802C4 0037D224 55 08 07 3F */ clrlwi. r8, r8, 0x1c +/* 803802C8 0037D228 41 82 00 74 */ beq lbl_8038033C +/* 803802CC 0037D22C 1D 08 00 EF */ mulli r8, r8, 0xef +/* 803802D0 0037D230 89 3B 00 00 */ lbz r9, 0(r27) +/* 803802D4 0037D234 7D 09 41 D6 */ mullw r8, r9, r8 +/* 803802D8 0037D238 7D 39 40 96 */ mulhw r9, r25, r8 +/* 803802DC 0037D23C 7D 09 42 14 */ add r8, r9, r8 +/* 803802E0 0037D240 7D 08 3E 70 */ srawi r8, r8, 7 +/* 803802E4 0037D244 55 09 0F FE */ srwi r9, r8, 0x1f +/* 803802E8 0037D248 7D 08 4A 14 */ add r8, r8, r9 +/* 803802EC 0037D24C 7D 38 40 96 */ mulhw r9, r24, r8 +/* 803802F0 0037D250 7D 09 42 14 */ add r8, r9, r8 +/* 803802F4 0037D254 7D 08 1E 70 */ srawi r8, r8, 3 +/* 803802F8 0037D258 55 09 0F FE */ srwi r9, r8, 0x1f +/* 803802FC 0037D25C 7D 28 4A 14 */ add r9, r8, r9 +/* 80380300 0037D260 39 29 00 10 */ addi r9, r9, 0x10 +/* 80380304 0037D264 54 88 07 FF */ clrlwi. r8, r4, 0x1f +/* 80380308 0037D268 7D 33 39 AE */ stbx r9, r19, r7 +/* 8038030C 0037D26C 41 82 00 1C */ beq lbl_80380328 +/* 80380310 0037D270 89 1B 00 01 */ lbz r8, 1(r27) +/* 80380314 0037D274 7D 33 3A 14 */ add r9, r19, r7 +/* 80380318 0037D278 99 09 FF FF */ stb r8, -1(r9) +/* 8038031C 0037D27C 89 1B 00 02 */ lbz r8, 2(r27) +/* 80380320 0037D280 99 09 00 01 */ stb r8, 1(r9) +/* 80380324 0037D284 48 00 00 18 */ b lbl_8038033C +lbl_80380328: +/* 80380328 0037D288 89 1B 00 02 */ lbz r8, 2(r27) +/* 8038032C 0037D28C 7D 33 3A 14 */ add r9, r19, r7 +/* 80380330 0037D290 99 09 FF FF */ stb r8, -1(r9) +/* 80380334 0037D294 89 1B 00 01 */ lbz r8, 1(r27) +/* 80380338 0037D298 99 09 00 01 */ stb r8, 1(r9) +lbl_8038033C: +/* 8038033C 0037D29C 38 C6 00 01 */ addi r6, r6, 1 +/* 80380340 0037D2A0 54 C8 00 38 */ rlwinm r8, r6, 0, 0, 0x1c +/* 80380344 0037D2A4 7D 05 42 14 */ add r8, r5, r8 +/* 80380348 0037D2A8 55 09 10 3A */ slwi r9, r8, 2 +/* 8038034C 0037D2AC 54 C8 07 7E */ clrlwi r8, r6, 0x1d +/* 80380350 0037D2B0 7D 37 48 2E */ lwzx r9, r23, r9 +/* 80380354 0037D2B4 21 08 00 07 */ subfic r8, r8, 7 +/* 80380358 0037D2B8 55 08 10 3A */ slwi r8, r8, 2 +/* 8038035C 0037D2BC 7D 28 44 30 */ srw r8, r9, r8 +/* 80380360 0037D2C0 55 08 07 3F */ clrlwi. r8, r8, 0x1c +/* 80380364 0037D2C4 38 E7 00 02 */ addi r7, r7, 2 +/* 80380368 0037D2C8 38 84 00 01 */ addi r4, r4, 1 +/* 8038036C 0037D2CC 41 82 00 74 */ beq lbl_803803E0 +/* 80380370 0037D2D0 1D 08 00 EF */ mulli r8, r8, 0xef +/* 80380374 0037D2D4 89 3B 00 00 */ lbz r9, 0(r27) +/* 80380378 0037D2D8 7D 09 41 D6 */ mullw r8, r9, r8 +/* 8038037C 0037D2DC 7D 39 40 96 */ mulhw r9, r25, r8 +/* 80380380 0037D2E0 7D 09 42 14 */ add r8, r9, r8 +/* 80380384 0037D2E4 7D 08 3E 70 */ srawi r8, r8, 7 +/* 80380388 0037D2E8 55 09 0F FE */ srwi r9, r8, 0x1f +/* 8038038C 0037D2EC 7D 08 4A 14 */ add r8, r8, r9 +/* 80380390 0037D2F0 7D 38 40 96 */ mulhw r9, r24, r8 +/* 80380394 0037D2F4 7D 09 42 14 */ add r8, r9, r8 +/* 80380398 0037D2F8 7D 08 1E 70 */ srawi r8, r8, 3 +/* 8038039C 0037D2FC 55 09 0F FE */ srwi r9, r8, 0x1f +/* 803803A0 0037D300 7D 28 4A 14 */ add r9, r8, r9 +/* 803803A4 0037D304 39 29 00 10 */ addi r9, r9, 0x10 +/* 803803A8 0037D308 54 88 07 FF */ clrlwi. r8, r4, 0x1f +/* 803803AC 0037D30C 7D 33 39 AE */ stbx r9, r19, r7 +/* 803803B0 0037D310 41 82 00 1C */ beq lbl_803803CC +/* 803803B4 0037D314 89 1B 00 01 */ lbz r8, 1(r27) +/* 803803B8 0037D318 7D 33 3A 14 */ add r9, r19, r7 +/* 803803BC 0037D31C 99 09 FF FF */ stb r8, -1(r9) +/* 803803C0 0037D320 89 1B 00 02 */ lbz r8, 2(r27) +/* 803803C4 0037D324 99 09 00 01 */ stb r8, 1(r9) +/* 803803C8 0037D328 48 00 00 18 */ b lbl_803803E0 +lbl_803803CC: +/* 803803CC 0037D32C 89 1B 00 02 */ lbz r8, 2(r27) +/* 803803D0 0037D330 7D 33 3A 14 */ add r9, r19, r7 +/* 803803D4 0037D334 99 09 FF FF */ stb r8, -1(r9) +/* 803803D8 0037D338 89 1B 00 01 */ lbz r8, 1(r27) +/* 803803DC 0037D33C 99 09 00 01 */ stb r8, 1(r9) +lbl_803803E0: +/* 803803E0 0037D340 38 63 00 01 */ addi r3, r3, 1 +/* 803803E4 0037D344 38 E7 00 02 */ addi r7, r7, 2 +/* 803803E8 0037D348 38 84 00 01 */ addi r4, r4, 1 +/* 803803EC 0037D34C 38 C6 00 01 */ addi r6, r6, 1 +/* 803803F0 0037D350 42 00 FE B4 */ bdnz lbl_803802A4 +/* 803803F4 0037D354 3A 94 00 01 */ addi r20, r20, 1 +/* 803803F8 0037D358 28 14 00 18 */ cmplwi r20, 0x18 +/* 803803FC 0037D35C 7C 00 AA 14 */ add r0, r0, r21 +/* 80380400 0037D360 41 80 FE 7C */ blt lbl_8038027C +/* 80380404 0037D364 80 61 01 5C */ lwz r3, 0x15c(r1) +/* 80380408 0037D368 54 60 08 3C */ slwi r0, r3, 1 +/* 8038040C 0037D36C 7E 73 02 14 */ add r19, r19, r0 +/* 80380410 0037D370 7F FF 1A 14 */ add r31, r31, r3 +lbl_80380414: +/* 80380414 0037D374 88 6A 00 00 */ lbz r3, 0(r10) +/* 80380418 0037D378 7C 60 07 75 */ extsb. r0, r3 +/* 8038041C 0037D37C 40 82 FC A4 */ bne lbl_803800C0 +lbl_80380420: +/* 80380420 0037D380 BA 01 01 60 */ lmw r16, 0x160(r1) +/* 80380424 0037D384 80 01 01 A4 */ lwz r0, 0x1a4(r1) +/* 80380428 0037D388 38 21 01 A0 */ addi r1, r1, 0x1a0 +/* 8038042C 0037D38C 7C 08 03 A6 */ mtlr r0 +/* 80380430 0037D390 4E 80 00 20 */ blr + +.global ConfigureVideo +ConfigureVideo: +/* 80380434 0037D394 7C 08 02 A6 */ mflr r0 +/* 80380438 0037D398 90 01 00 04 */ stw r0, 4(r1) +/* 8038043C 0037D39C 38 00 01 E0 */ li r0, 0x1e0 +/* 80380440 0037D3A0 94 21 FF B8 */ stwu r1, -0x48(r1) +/* 80380444 0037D3A4 B0 61 00 10 */ sth r3, 0x10(r1) +/* 80380448 0037D3A8 38 60 00 28 */ li r3, 0x28 +/* 8038044C 0037D3AC B0 01 00 12 */ sth r0, 0x12(r1) +/* 80380450 0037D3B0 38 00 02 80 */ li r0, 0x280 +/* 80380454 0037D3B4 B0 81 00 14 */ sth r4, 0x14(r1) +/* 80380458 0037D3B8 B0 61 00 16 */ sth r3, 0x16(r1) +/* 8038045C 0037D3BC B0 01 00 1A */ sth r0, 0x1a(r1) +/* 80380460 0037D3C0 B0 81 00 1C */ sth r4, 0x1c(r1) +/* 80380464 0037D3C4 48 00 90 75 */ bl VIGetTvFormat +/* 80380468 0037D3C8 2C 03 00 02 */ cmpwi r3, 2 +/* 8038046C 0037D3CC 41 82 00 24 */ beq lbl_80380490 +/* 80380470 0037D3D0 40 80 00 14 */ bge lbl_80380484 +/* 80380474 0037D3D4 2C 03 00 00 */ cmpwi r3, 0 +/* 80380478 0037D3D8 41 82 00 18 */ beq lbl_80380490 +/* 8038047C 0037D3DC 40 80 00 70 */ bge lbl_803804EC +/* 80380480 0037D3E0 48 00 00 84 */ b lbl_80380504 +lbl_80380484: +/* 80380484 0037D3E4 2C 03 00 05 */ cmpwi r3, 5 +/* 80380488 0037D3E8 41 82 00 48 */ beq lbl_803804D0 +/* 8038048C 0037D3EC 48 00 00 78 */ b lbl_80380504 +lbl_80380490: +/* 80380490 0037D3F0 3C 60 CC 00 */ lis r3, 0xCC00206C@ha +/* 80380494 0037D3F4 A0 03 20 6C */ lhz r0, 0xCC00206C@l(r3) +/* 80380498 0037D3F8 54 00 07 FF */ clrlwi. r0, r0, 0x1f +/* 8038049C 0037D3FC 41 82 00 1C */ beq lbl_803804B8 +/* 803804A0 0037D400 38 00 00 02 */ li r0, 2 +/* 803804A4 0037D404 90 01 00 0C */ stw r0, 0xc(r1) +/* 803804A8 0037D408 38 00 00 00 */ li r0, 0 +/* 803804AC 0037D40C B0 01 00 18 */ sth r0, 0x18(r1) +/* 803804B0 0037D410 90 01 00 20 */ stw r0, 0x20(r1) +/* 803804B4 0037D414 48 00 00 50 */ b lbl_80380504 +lbl_803804B8: +/* 803804B8 0037D418 38 60 00 00 */ li r3, 0 +/* 803804BC 0037D41C 90 61 00 0C */ stw r3, 0xc(r1) +/* 803804C0 0037D420 38 00 00 01 */ li r0, 1 +/* 803804C4 0037D424 B0 61 00 18 */ sth r3, 0x18(r1) +/* 803804C8 0037D428 90 01 00 20 */ stw r0, 0x20(r1) +/* 803804CC 0037D42C 48 00 00 38 */ b lbl_80380504 +lbl_803804D0: +/* 803804D0 0037D430 38 00 00 14 */ li r0, 0x14 +/* 803804D4 0037D434 90 01 00 0C */ stw r0, 0xc(r1) +/* 803804D8 0037D438 38 60 00 00 */ li r3, 0 +/* 803804DC 0037D43C 38 00 00 01 */ li r0, 1 +/* 803804E0 0037D440 B0 61 00 18 */ sth r3, 0x18(r1) +/* 803804E4 0037D444 90 01 00 20 */ stw r0, 0x20(r1) +/* 803804E8 0037D448 48 00 00 1C */ b lbl_80380504 +lbl_803804EC: +/* 803804EC 0037D44C 38 00 00 04 */ li r0, 4 +/* 803804F0 0037D450 90 01 00 0C */ stw r0, 0xc(r1) +/* 803804F4 0037D454 38 60 00 2F */ li r3, 0x2f +/* 803804F8 0037D458 38 00 00 01 */ li r0, 1 +/* 803804FC 0037D45C B0 61 00 18 */ sth r3, 0x18(r1) +/* 80380500 0037D460 90 01 00 20 */ stw r0, 0x20(r1) +lbl_80380504: +/* 80380504 0037D464 38 61 00 0C */ addi r3, r1, 0xc +/* 80380508 0037D468 48 00 80 4D */ bl VIConfigure +/* 8038050C 0037D46C 38 60 00 00 */ li r3, 0 +/* 80380510 0037D470 38 80 00 00 */ li r4, 0 +/* 80380514 0037D474 38 A0 02 80 */ li r5, 0x280 +/* 80380518 0037D478 38 C0 01 E0 */ li r6, 0x1e0 +/* 8038051C 0037D47C 48 00 88 61 */ bl VIConfigurePan +/* 80380520 0037D480 80 01 00 4C */ lwz r0, 0x4c(r1) +/* 80380524 0037D484 38 21 00 48 */ addi r1, r1, 0x48 +/* 80380528 0037D488 7C 08 03 A6 */ mtlr r0 +/* 8038052C 0037D48C 4E 80 00 20 */ blr + +.global OSFatal +OSFatal: +/* 80380530 0037D490 7C 08 02 A6 */ mflr r0 +/* 80380534 0037D494 3C C0 80 54 */ lis r6, lbl_80541298@ha +/* 80380538 0037D498 90 01 00 04 */ stw r0, 4(r1) +/* 8038053C 0037D49C 94 21 FF D0 */ stwu r1, -0x30(r1) +/* 80380540 0037D4A0 BF 41 00 18 */ stmw r26, 0x18(r1) +/* 80380544 0037D4A4 3B 43 00 00 */ addi r26, r3, 0 +/* 80380548 0037D4A8 3B 64 00 00 */ addi r27, r4, 0 +/* 8038054C 0037D4AC 3B 85 00 00 */ addi r28, r5, 0 +/* 80380550 0037D4B0 3B C6 12 98 */ addi r30, r6, lbl_80541298@l +/* 80380554 0037D4B4 3F A0 80 00 */ lis r29, 0x8000 +/* 80380558 0037D4B8 48 00 11 09 */ bl OSDisableInterrupts +/* 8038055C 0037D4BC 48 00 40 85 */ bl OSDisableScheduler +/* 80380560 0037D4C0 38 7E 00 10 */ addi r3, r30, 0x10 +/* 80380564 0037D4C4 4B FF F0 B1 */ bl OSClearContext +/* 80380568 0037D4C8 38 7E 00 10 */ addi r3, r30, 0x10 +/* 8038056C 0037D4CC 4B FF EE B1 */ bl OSSetCurrentContext +/* 80380570 0037D4D0 4B FF E4 29 */ bl __OSStopAudioSystem +/* 80380574 0037D4D4 38 60 00 00 */ li r3, 0 +/* 80380578 0037D4D8 4B FE CE 05 */ bl AISetStreamVolLeft +/* 8038057C 0037D4DC 38 60 00 00 */ li r3, 0 +/* 80380580 0037D4E0 4B FE CE 29 */ bl AISetStreamVolRight +/* 80380584 0037D4E4 48 00 76 59 */ bl VIInit +/* 80380588 0037D4E8 38 60 00 01 */ li r3, 1 +/* 8038058C 0037D4EC 48 00 8D 21 */ bl VISetBlack +/* 80380590 0037D4F0 48 00 8B 81 */ bl VIFlush +/* 80380594 0037D4F4 48 00 10 E1 */ bl OSEnableInterrupts +/* 80380598 0037D4F8 48 00 8D 91 */ bl VIGetRetraceCount +/* 8038059C 0037D4FC 7C 7F 1B 78 */ mr r31, r3 +lbl_803805A0: +/* 803805A0 0037D500 48 00 8D 89 */ bl VIGetRetraceCount +/* 803805A4 0037D504 7C 1F 18 50 */ subf r0, r31, r3 +/* 803805A8 0037D508 2C 00 00 01 */ cmpwi r0, 1 +/* 803805AC 0037D50C 41 80 FF F4 */ blt lbl_803805A0 +lbl_803805B0: +/* 803805B0 0037D510 38 60 00 00 */ li r3, 0 +/* 803805B4 0037D514 48 00 2A FD */ bl __OSCallResetFunctions +/* 803805B8 0037D518 2C 03 00 00 */ cmpwi r3, 0 +/* 803805BC 0037D51C 41 82 FF F4 */ beq lbl_803805B0 +/* 803805C0 0037D520 48 00 10 A1 */ bl OSDisableInterrupts +/* 803805C4 0037D524 38 60 00 01 */ li r3, 1 +/* 803805C8 0037D528 48 00 2A E9 */ bl __OSCallResetFunctions +/* 803805CC 0037D52C 3C 60 80 38 */ lis r3, OSDefaultExceptionHandler@ha +/* 803805D0 0037D530 38 83 DF 94 */ addi r4, r3, OSDefaultExceptionHandler@l +/* 803805D4 0037D534 38 60 00 08 */ li r3, 8 +/* 803805D8 0037D538 4B FF D8 F1 */ bl __OSSetExceptionHandler +/* 803805DC 0037D53C 4B FF 7D 91 */ bl sub_8037836c +/* 803805E0 0037D540 3C 60 81 20 */ lis r3, 0x8120 +/* 803805E4 0037D544 4B FF E1 C5 */ bl OSSetArenaLo +/* 803805E8 0037D548 80 7D 00 38 */ lwz r3, 0x38(r29) +/* 803805EC 0037D54C 4B FF E1 B5 */ bl OSSetArenaHi +/* 803805F0 0037D550 80 1A 00 00 */ lwz r0, 0(r26) +/* 803805F4 0037D554 90 1E 00 00 */ stw r0, 0(r30) +/* 803805F8 0037D558 80 1B 00 00 */ lwz r0, 0(r27) +/* 803805FC 0037D55C 90 1E 00 04 */ stw r0, 4(r30) +/* 80380600 0037D560 93 9E 00 08 */ stw r28, 8(r30) +/* 80380604 0037D564 4B FF E1 8D */ bl OSGetArenaHi +/* 80380608 0037D568 3C A0 80 38 */ lis r5, Halt@ha +/* 8038060C 0037D56C 38 83 00 00 */ addi r4, r3, 0 +/* 80380610 0037D570 38 65 06 2C */ addi r3, r5, Halt@l +/* 80380614 0037D574 4B FF EF D1 */ bl OSSwitchFiber +/* 80380618 0037D578 BB 41 00 18 */ lmw r26, 0x18(r1) +/* 8038061C 0037D57C 80 01 00 34 */ lwz r0, 0x34(r1) +/* 80380620 0037D580 38 21 00 30 */ addi r1, r1, 0x30 +/* 80380624 0037D584 7C 08 03 A6 */ mtlr r0 +/* 80380628 0037D588 4E 80 00 20 */ blr + +.global Halt +Halt: +/* 8038062C 0037D58C 7C 08 02 A6 */ mflr r0 +/* 80380630 0037D590 90 01 00 04 */ stw r0, 4(r1) +/* 80380634 0037D594 94 21 FF 78 */ stwu r1, -0x88(r1) +/* 80380638 0037D598 93 E1 00 84 */ stw r31, 0x84(r1) +/* 8038063C 0037D59C 93 C1 00 80 */ stw r30, 0x80(r1) +/* 80380640 0037D5A0 93 A1 00 7C */ stw r29, 0x7c(r1) +/* 80380644 0037D5A4 93 81 00 78 */ stw r28, 0x78(r1) +/* 80380648 0037D5A8 48 00 10 2D */ bl OSEnableInterrupts +/* 8038064C 0037D5AC 3C 60 80 54 */ lis r3, lbl_80541298@ha +/* 80380650 0037D5B0 3B E3 12 98 */ addi r31, r3, lbl_80541298@l +/* 80380654 0037D5B4 80 7F 00 08 */ lwz r3, 8(r31) +/* 80380658 0037D5B8 48 00 FB 69 */ bl strlen +/* 8038065C 0037D5BC 3B 83 00 01 */ addi r28, r3, 1 +/* 80380660 0037D5C0 38 7C 00 00 */ addi r3, r28, 0 +/* 80380664 0037D5C4 38 80 00 20 */ li r4, 0x20 +/* 80380668 0037D5C8 4B FF E1 49 */ bl OSAllocFromArenaLo +/* 8038066C 0037D5CC 80 9F 00 08 */ lwz r4, 8(r31) +/* 80380670 0037D5D0 7F 85 E3 78 */ mr r5, r28 +/* 80380674 0037D5D4 48 00 D2 AD */ bl memmove +/* 80380678 0037D5D8 90 7F 00 08 */ stw r3, 8(r31) +/* 8038067C 0037D5DC 48 00 08 C9 */ bl OSGetFontEncode +/* 80380680 0037D5E0 54 60 04 3E */ clrlwi r0, r3, 0x10 +/* 80380684 0037D5E4 28 00 00 01 */ cmplwi r0, 1 +/* 80380688 0037D5E8 40 82 00 1C */ bne lbl_803806A4 +/* 8038068C 0037D5EC 3C 60 00 09 */ lis r3, 0x00090EE4@ha +/* 80380690 0037D5F0 38 63 0E E4 */ addi r3, r3, 0x00090EE4@l +/* 80380694 0037D5F4 38 80 00 20 */ li r4, 0x20 +/* 80380698 0037D5F8 4B FF E1 19 */ bl OSAllocFromArenaLo +/* 8038069C 0037D5FC 7C 7E 1B 78 */ mr r30, r3 +/* 803806A0 0037D600 48 00 00 18 */ b lbl_803806B8 +lbl_803806A4: +/* 803806A4 0037D604 3C 60 00 01 */ lis r3, 0x00010120@ha +/* 803806A8 0037D608 38 63 01 20 */ addi r3, r3, 0x00010120@l +/* 803806AC 0037D60C 38 80 00 20 */ li r4, 0x20 +/* 803806B0 0037D610 4B FF E1 01 */ bl OSAllocFromArenaLo +/* 803806B4 0037D614 7C 7E 1B 78 */ mr r30, r3 +lbl_803806B8: +/* 803806B8 0037D618 4B FF E0 E1 */ bl OSGetArenaLo +/* 803806BC 0037D61C 38 83 00 00 */ addi r4, r3, 0 +/* 803806C0 0037D620 38 7E 00 00 */ addi r3, r30, 0 +/* 803806C4 0037D624 48 00 09 65 */ bl sub_80381028 +/* 803806C8 0037D628 3C 60 00 09 */ lis r3, 0x00096000@ha +/* 803806CC 0037D62C 38 63 60 00 */ addi r3, r3, 0x00096000@l +/* 803806D0 0037D630 38 80 00 20 */ li r4, 0x20 +/* 803806D4 0037D634 4B FF E0 DD */ bl OSAllocFromArenaLo +/* 803806D8 0037D638 80 1F 00 04 */ lwz r0, 4(r31) +/* 803806DC 0037D63C 7C 7D 1B 78 */ mr r29, r3 +/* 803806E0 0037D640 3C 80 43 30 */ lis r4, 0x4330 +/* 803806E4 0037D644 C8 02 CF 30 */ lfd f0, lbl_805AEC50@sda21(r2) +/* 803806E8 0037D648 90 01 00 28 */ stw r0, 0x28(r1) +/* 803806EC 0037D64C C0 82 CF 04 */ lfs f4, lbl_805AEC24@sda21(r2) +/* 803806F0 0037D650 88 01 00 28 */ lbz r0, 0x28(r1) +/* 803806F4 0037D654 88 61 00 29 */ lbz r3, 0x29(r1) +/* 803806F8 0037D658 90 01 00 6C */ stw r0, 0x6c(r1) +/* 803806FC 0037D65C 88 A1 00 2A */ lbz r5, 0x2a(r1) +/* 80380700 0037D660 90 61 00 64 */ stw r3, 0x64(r1) +/* 80380704 0037D664 C0 42 CF 08 */ lfs f2, lbl_805AEC28@sda21(r2) +/* 80380708 0037D668 90 81 00 68 */ stw r4, 0x68(r1) +/* 8038070C 0037D66C C0 C2 CF 00 */ lfs f6, lbl_805AEC20@sda21(r2) +/* 80380710 0037D670 90 81 00 60 */ stw r4, 0x60(r1) +/* 80380714 0037D674 C8 61 00 68 */ lfd f3, 0x68(r1) +/* 80380718 0037D678 90 A1 00 74 */ stw r5, 0x74(r1) +/* 8038071C 0037D67C C8 21 00 60 */ lfd f1, 0x60(r1) +/* 80380720 0037D680 EC 63 00 28 */ fsubs f3, f3, f0 +/* 80380724 0037D684 90 81 00 70 */ stw r4, 0x70(r1) +/* 80380728 0037D688 EC 21 00 28 */ fsubs f1, f1, f0 +/* 8038072C 0037D68C C1 02 CF 18 */ lfs f8, lbl_805AEC38@sda21(r2) +/* 80380730 0037D690 90 61 00 4C */ stw r3, 0x4c(r1) +/* 80380734 0037D694 C8 A1 00 70 */ lfd f5, 0x70(r1) +/* 80380738 0037D698 EC 64 00 F2 */ fmuls f3, f4, f3 +/* 8038073C 0037D69C EC 85 00 28 */ fsubs f4, f5, f0 +/* 80380740 0037D6A0 90 01 00 54 */ stw r0, 0x54(r1) +/* 80380744 0037D6A4 EC 22 00 72 */ fmuls f1, f2, f1 +/* 80380748 0037D6A8 C1 22 CF 14 */ lfs f9, lbl_805AEC34@sda21(r2) +/* 8038074C 0037D6AC 90 81 00 50 */ stw r4, 0x50(r1) +/* 80380750 0037D6B0 90 01 00 44 */ stw r0, 0x44(r1) +/* 80380754 0037D6B4 EC 86 01 32 */ fmuls f4, f6, f4 +/* 80380758 0037D6B8 EC 23 08 2A */ fadds f1, f3, f1 +/* 8038075C 0037D6BC C8 41 00 50 */ lfd f2, 0x50(r1) +/* 80380760 0037D6C0 90 61 00 3C */ stw r3, 0x3c(r1) +/* 80380764 0037D6C4 EC 62 00 28 */ fsubs f3, f2, f0 +/* 80380768 0037D6C8 90 A1 00 5C */ stw r5, 0x5c(r1) +/* 8038076C 0037D6CC ED 64 08 2A */ fadds f11, f4, f1 +/* 80380770 0037D6D0 C1 42 CF 10 */ lfs f10, lbl_805AEC30@sda21(r2) +/* 80380774 0037D6D4 90 81 00 48 */ stw r4, 0x48(r1) +/* 80380778 0037D6D8 ED 29 00 F2 */ fmuls f9, f9, f3 +/* 8038077C 0037D6DC C0 A2 CF 1C */ lfs f5, lbl_805AEC3C@sda21(r2) +/* 80380780 0037D6E0 C8 21 00 48 */ lfd f1, 0x48(r1) +/* 80380784 0037D6E4 90 81 00 40 */ stw r4, 0x40(r1) +/* 80380788 0037D6E8 EC E1 00 28 */ fsubs f7, f1, f0 +/* 8038078C 0037D6EC C0 62 CF 20 */ lfs f3, lbl_805AEC40@sda21(r2) +/* 80380790 0037D6F0 90 81 00 38 */ stw r4, 0x38(r1) +/* 80380794 0037D6F4 C8 41 00 40 */ lfd f2, 0x40(r1) +/* 80380798 0037D6F8 90 A1 00 34 */ stw r5, 0x34(r1) +/* 8038079C 0037D6FC C8 21 00 38 */ lfd f1, 0x38(r1) +/* 803807A0 0037D700 EC C2 00 28 */ fsubs f6, f2, f0 +/* 803807A4 0037D704 90 81 00 30 */ stw r4, 0x30(r1) +/* 803807A8 0037D708 EC E8 01 F2 */ fmuls f7, f8, f7 +/* 803807AC 0037D70C EC 81 00 28 */ fsubs f4, f1, f0 +/* 803807B0 0037D710 90 81 00 58 */ stw r4, 0x58(r1) +/* 803807B4 0037D714 C0 22 CE FC */ lfs f1, lbl_805AEC1C@sda21(r2) +/* 803807B8 0037D718 EC CA 01 B2 */ fmuls f6, f10, f6 +/* 803807BC 0037D71C C9 01 00 58 */ lfd f8, 0x58(r1) +/* 803807C0 0037D720 C8 41 00 30 */ lfd f2, 0x30(r1) +/* 803807C4 0037D724 EC 85 01 32 */ fmuls f4, f5, f4 +/* 803807C8 0037D728 ED 08 00 28 */ fsubs f8, f8, f0 +/* 803807CC 0037D72C EC 02 00 28 */ fsubs f0, f2, f0 +/* 803807D0 0037D730 C1 82 CE F8 */ lfs f12, lbl_805AEC18@sda21(r2) +/* 803807D4 0037D734 EC 49 38 28 */ fsubs f2, f9, f7 +/* 803807D8 0037D738 EC AA 02 32 */ fmuls f5, f10, f8 +/* 803807DC 0037D73C ED 61 58 2A */ fadds f11, f1, f11 +/* 803807E0 0037D740 EC 03 00 32 */ fmuls f0, f3, f0 +/* 803807E4 0037D744 C0 E2 CF 0C */ lfs f7, lbl_805AEC2C@sda21(r2) +/* 803807E8 0037D748 EC A5 10 2A */ fadds f5, f5, f2 +/* 803807EC 0037D74C EC 46 20 28 */ fsubs f2, f6, f4 +/* 803807F0 0037D750 ED 2C 58 2A */ fadds f9, f12, f11 +/* 803807F4 0037D754 C1 02 CF 24 */ lfs f8, lbl_805AEC44@sda21(r2) +/* 803807F8 0037D758 EC 67 28 2A */ fadds f3, f7, f5 +/* 803807FC 0037D75C EC 02 00 28 */ fsubs f0, f2, f0 +/* 80380800 0037D760 FC 09 40 40 */ fcmpo cr0, f9, f8 +/* 80380804 0037D764 EC 6C 18 2A */ fadds f3, f12, f3 +/* 80380808 0037D768 EC 07 00 2A */ fadds f0, f7, f0 +/* 8038080C 0037D76C EC 4C 00 2A */ fadds f2, f12, f0 +/* 80380810 0037D770 40 81 00 08 */ ble lbl_80380818 +/* 80380814 0037D774 48 00 00 18 */ b lbl_8038082C +lbl_80380818: +/* 80380818 0037D778 FC 09 08 40 */ fcmpo cr0, f9, f1 +/* 8038081C 0037D77C 40 80 00 08 */ bge lbl_80380824 +/* 80380820 0037D780 48 00 00 08 */ b lbl_80380828 +lbl_80380824: +/* 80380824 0037D784 FC 20 48 90 */ fmr f1, f9 +lbl_80380828: +/* 80380828 0037D788 FD 00 08 90 */ fmr f8, f1 +lbl_8038082C: +/* 8038082C 0037D78C FC 00 40 1E */ fctiwz f0, f8 +/* 80380830 0037D790 C0 22 CF 28 */ lfs f1, lbl_805AEC48@sda21(r2) +/* 80380834 0037D794 FC 03 08 40 */ fcmpo cr0, f3, f1 +/* 80380838 0037D798 D8 01 00 30 */ stfd f0, 0x30(r1) +/* 8038083C 0037D79C 80 01 00 34 */ lwz r0, 0x34(r1) +/* 80380840 0037D7A0 98 01 00 18 */ stb r0, 0x18(r1) +/* 80380844 0037D7A4 40 81 00 08 */ ble lbl_8038084C +/* 80380848 0037D7A8 48 00 00 18 */ b lbl_80380860 +lbl_8038084C: +/* 8038084C 0037D7AC C0 22 CE FC */ lfs f1, lbl_805AEC1C@sda21(r2) +/* 80380850 0037D7B0 FC 03 08 40 */ fcmpo cr0, f3, f1 +/* 80380854 0037D7B4 40 80 00 08 */ bge lbl_8038085C +/* 80380858 0037D7B8 48 00 00 08 */ b lbl_80380860 +lbl_8038085C: +/* 8038085C 0037D7BC FC 20 18 90 */ fmr f1, f3 +lbl_80380860: +/* 80380860 0037D7C0 FC 00 08 1E */ fctiwz f0, f1 +/* 80380864 0037D7C4 C0 22 CF 28 */ lfs f1, lbl_805AEC48@sda21(r2) +/* 80380868 0037D7C8 FC 02 08 40 */ fcmpo cr0, f2, f1 +/* 8038086C 0037D7CC D8 01 00 30 */ stfd f0, 0x30(r1) +/* 80380870 0037D7D0 80 01 00 34 */ lwz r0, 0x34(r1) +/* 80380874 0037D7D4 98 01 00 19 */ stb r0, 0x19(r1) +/* 80380878 0037D7D8 40 81 00 08 */ ble lbl_80380880 +/* 8038087C 0037D7DC 48 00 00 18 */ b lbl_80380894 +lbl_80380880: +/* 80380880 0037D7E0 C0 22 CE FC */ lfs f1, lbl_805AEC1C@sda21(r2) +/* 80380884 0037D7E4 FC 02 08 40 */ fcmpo cr0, f2, f1 +/* 80380888 0037D7E8 40 80 00 08 */ bge lbl_80380890 +/* 8038088C 0037D7EC 48 00 00 08 */ b lbl_80380894 +lbl_80380890: +/* 80380890 0037D7F0 FC 20 10 90 */ fmr f1, f2 +lbl_80380894: +/* 80380894 0037D7F4 FC 00 08 1E */ fctiwz f0, f1 +/* 80380898 0037D7F8 38 80 00 00 */ li r4, 0 +/* 8038089C 0037D7FC 38 7D 00 00 */ addi r3, r29, 0 +/* 803808A0 0037D800 D8 01 00 30 */ stfd f0, 0x30(r1) +/* 803808A4 0037D804 80 01 00 34 */ lwz r0, 0x34(r1) +/* 803808A8 0037D808 98 01 00 1A */ stb r0, 0x1a(r1) +/* 803808AC 0037D80C 98 81 00 1B */ stb r4, 0x1b(r1) +/* 803808B0 0037D810 80 01 00 18 */ lwz r0, 0x18(r1) +/* 803808B4 0037D814 90 01 00 2C */ stw r0, 0x2c(r1) +/* 803808B8 0037D818 88 A1 00 2D */ lbz r5, 0x2d(r1) +/* 803808BC 0037D81C 88 C1 00 2E */ lbz r6, 0x2e(r1) +lbl_803808C0: +/* 803808C0 0037D820 38 00 00 28 */ li r0, 0x28 +/* 803808C4 0037D824 7C 09 03 A6 */ mtctr r0 +lbl_803808C8: +/* 803808C8 0037D828 88 01 00 2C */ lbz r0, 0x2c(r1) +/* 803808CC 0037D82C 98 03 00 00 */ stb r0, 0(r3) +/* 803808D0 0037D830 98 A3 00 01 */ stb r5, 1(r3) +/* 803808D4 0037D834 88 01 00 2C */ lbz r0, 0x2c(r1) +/* 803808D8 0037D838 98 03 00 02 */ stb r0, 2(r3) +/* 803808DC 0037D83C 98 C3 00 03 */ stb r6, 3(r3) +/* 803808E0 0037D840 88 01 00 2C */ lbz r0, 0x2c(r1) +/* 803808E4 0037D844 98 03 00 04 */ stb r0, 4(r3) +/* 803808E8 0037D848 98 A3 00 05 */ stb r5, 5(r3) +/* 803808EC 0037D84C 88 01 00 2C */ lbz r0, 0x2c(r1) +/* 803808F0 0037D850 98 03 00 06 */ stb r0, 6(r3) +/* 803808F4 0037D854 98 C3 00 07 */ stb r6, 7(r3) +/* 803808F8 0037D858 88 01 00 2C */ lbz r0, 0x2c(r1) +/* 803808FC 0037D85C 98 03 00 08 */ stb r0, 8(r3) +/* 80380900 0037D860 98 A3 00 09 */ stb r5, 9(r3) +/* 80380904 0037D864 88 01 00 2C */ lbz r0, 0x2c(r1) +/* 80380908 0037D868 98 03 00 0A */ stb r0, 0xa(r3) +/* 8038090C 0037D86C 98 C3 00 0B */ stb r6, 0xb(r3) +/* 80380910 0037D870 88 01 00 2C */ lbz r0, 0x2c(r1) +/* 80380914 0037D874 98 03 00 0C */ stb r0, 0xc(r3) +/* 80380918 0037D878 98 A3 00 0D */ stb r5, 0xd(r3) +/* 8038091C 0037D87C 88 01 00 2C */ lbz r0, 0x2c(r1) +/* 80380920 0037D880 98 03 00 0E */ stb r0, 0xe(r3) +/* 80380924 0037D884 98 C3 00 0F */ stb r6, 0xf(r3) +/* 80380928 0037D888 88 01 00 2C */ lbz r0, 0x2c(r1) +/* 8038092C 0037D88C 98 03 00 10 */ stb r0, 0x10(r3) +/* 80380930 0037D890 98 A3 00 11 */ stb r5, 0x11(r3) +/* 80380934 0037D894 88 01 00 2C */ lbz r0, 0x2c(r1) +/* 80380938 0037D898 98 03 00 12 */ stb r0, 0x12(r3) +/* 8038093C 0037D89C 98 C3 00 13 */ stb r6, 0x13(r3) +/* 80380940 0037D8A0 88 01 00 2C */ lbz r0, 0x2c(r1) +/* 80380944 0037D8A4 98 03 00 14 */ stb r0, 0x14(r3) +/* 80380948 0037D8A8 98 A3 00 15 */ stb r5, 0x15(r3) +/* 8038094C 0037D8AC 88 01 00 2C */ lbz r0, 0x2c(r1) +/* 80380950 0037D8B0 98 03 00 16 */ stb r0, 0x16(r3) +/* 80380954 0037D8B4 98 C3 00 17 */ stb r6, 0x17(r3) +/* 80380958 0037D8B8 88 01 00 2C */ lbz r0, 0x2c(r1) +/* 8038095C 0037D8BC 98 03 00 18 */ stb r0, 0x18(r3) +/* 80380960 0037D8C0 98 A3 00 19 */ stb r5, 0x19(r3) +/* 80380964 0037D8C4 88 01 00 2C */ lbz r0, 0x2c(r1) +/* 80380968 0037D8C8 98 03 00 1A */ stb r0, 0x1a(r3) +/* 8038096C 0037D8CC 98 C3 00 1B */ stb r6, 0x1b(r3) +/* 80380970 0037D8D0 88 01 00 2C */ lbz r0, 0x2c(r1) +/* 80380974 0037D8D4 98 03 00 1C */ stb r0, 0x1c(r3) +/* 80380978 0037D8D8 98 A3 00 1D */ stb r5, 0x1d(r3) +/* 8038097C 0037D8DC 88 01 00 2C */ lbz r0, 0x2c(r1) +/* 80380980 0037D8E0 98 03 00 1E */ stb r0, 0x1e(r3) +/* 80380984 0037D8E4 98 C3 00 1F */ stb r6, 0x1f(r3) +/* 80380988 0037D8E8 38 63 00 20 */ addi r3, r3, 0x20 +/* 8038098C 0037D8EC 42 00 FF 3C */ bdnz lbl_803808C8 +/* 80380990 0037D8F0 38 84 00 01 */ addi r4, r4, 1 +/* 80380994 0037D8F4 2C 04 01 E0 */ cmpwi r4, 0x1e0 +/* 80380998 0037D8F8 41 80 FF 28 */ blt lbl_803808C0 +/* 8038099C 0037D8FC 7F A3 EB 78 */ mr r3, r29 +/* 803809A0 0037D900 48 00 88 A1 */ bl VISetNextFrameBuffer +/* 803809A4 0037D904 38 60 02 80 */ li r3, 0x280 +/* 803809A8 0037D908 38 80 01 E0 */ li r4, 0x1e0 +/* 803809AC 0037D90C 4B FF FA 89 */ bl ConfigureVideo +/* 803809B0 0037D910 48 00 87 61 */ bl VIFlush +/* 803809B4 0037D914 48 00 89 75 */ bl VIGetRetraceCount +/* 803809B8 0037D918 7C 7C 1B 78 */ mr r28, r3 +lbl_803809BC: +/* 803809BC 0037D91C 48 00 89 6D */ bl VIGetRetraceCount +/* 803809C0 0037D920 7C 1C 18 50 */ subf r0, r28, r3 +/* 803809C4 0037D924 2C 00 00 02 */ cmpwi r0, 2 +/* 803809C8 0037D928 41 80 FF F4 */ blt lbl_803809BC +/* 803809CC 0037D92C 80 1F 00 00 */ lwz r0, 0(r31) +/* 803809D0 0037D930 3C 60 43 30 */ lis r3, 0x4330 +/* 803809D4 0037D934 C8 02 CF 30 */ lfd f0, lbl_805AEC50@sda21(r2) +/* 803809D8 0037D938 90 01 00 20 */ stw r0, 0x20(r1) +/* 803809DC 0037D93C C0 82 CF 04 */ lfs f4, lbl_805AEC24@sda21(r2) +/* 803809E0 0037D940 88 01 00 20 */ lbz r0, 0x20(r1) +/* 803809E4 0037D944 88 81 00 21 */ lbz r4, 0x21(r1) +/* 803809E8 0037D948 90 01 00 3C */ stw r0, 0x3c(r1) +/* 803809EC 0037D94C 88 A1 00 22 */ lbz r5, 0x22(r1) +/* 803809F0 0037D950 90 81 00 44 */ stw r4, 0x44(r1) +/* 803809F4 0037D954 C0 42 CF 08 */ lfs f2, lbl_805AEC28@sda21(r2) +/* 803809F8 0037D958 90 61 00 38 */ stw r3, 0x38(r1) +/* 803809FC 0037D95C C0 C2 CF 00 */ lfs f6, lbl_805AEC20@sda21(r2) +/* 80380A00 0037D960 90 61 00 40 */ stw r3, 0x40(r1) +/* 80380A04 0037D964 C8 61 00 38 */ lfd f3, 0x38(r1) +/* 80380A08 0037D968 90 A1 00 34 */ stw r5, 0x34(r1) +/* 80380A0C 0037D96C C8 21 00 40 */ lfd f1, 0x40(r1) +/* 80380A10 0037D970 EC 63 00 28 */ fsubs f3, f3, f0 +/* 80380A14 0037D974 90 61 00 30 */ stw r3, 0x30(r1) +/* 80380A18 0037D978 EC 21 00 28 */ fsubs f1, f1, f0 +/* 80380A1C 0037D97C C1 02 CF 18 */ lfs f8, lbl_805AEC38@sda21(r2) +/* 80380A20 0037D980 90 81 00 5C */ stw r4, 0x5c(r1) +/* 80380A24 0037D984 C8 A1 00 30 */ lfd f5, 0x30(r1) +/* 80380A28 0037D988 EC 64 00 F2 */ fmuls f3, f4, f3 +/* 80380A2C 0037D98C EC 85 00 28 */ fsubs f4, f5, f0 +/* 80380A30 0037D990 90 01 00 54 */ stw r0, 0x54(r1) +/* 80380A34 0037D994 EC 22 00 72 */ fmuls f1, f2, f1 +/* 80380A38 0037D998 C1 22 CF 14 */ lfs f9, lbl_805AEC34@sda21(r2) +/* 80380A3C 0037D99C 90 61 00 50 */ stw r3, 0x50(r1) +/* 80380A40 0037D9A0 90 01 00 64 */ stw r0, 0x64(r1) +/* 80380A44 0037D9A4 EC 86 01 32 */ fmuls f4, f6, f4 +/* 80380A48 0037D9A8 EC 23 08 2A */ fadds f1, f3, f1 +/* 80380A4C 0037D9AC C8 41 00 50 */ lfd f2, 0x50(r1) +/* 80380A50 0037D9B0 90 81 00 6C */ stw r4, 0x6c(r1) +/* 80380A54 0037D9B4 EC 62 00 28 */ fsubs f3, f2, f0 +/* 80380A58 0037D9B8 90 A1 00 4C */ stw r5, 0x4c(r1) +/* 80380A5C 0037D9BC ED 64 08 2A */ fadds f11, f4, f1 +/* 80380A60 0037D9C0 C1 42 CF 10 */ lfs f10, lbl_805AEC30@sda21(r2) +/* 80380A64 0037D9C4 90 61 00 58 */ stw r3, 0x58(r1) +/* 80380A68 0037D9C8 ED 29 00 F2 */ fmuls f9, f9, f3 +/* 80380A6C 0037D9CC C0 A2 CF 1C */ lfs f5, lbl_805AEC3C@sda21(r2) +/* 80380A70 0037D9D0 C8 21 00 58 */ lfd f1, 0x58(r1) +/* 80380A74 0037D9D4 90 61 00 60 */ stw r3, 0x60(r1) +/* 80380A78 0037D9D8 EC E1 00 28 */ fsubs f7, f1, f0 +/* 80380A7C 0037D9DC C0 62 CF 20 */ lfs f3, lbl_805AEC40@sda21(r2) +/* 80380A80 0037D9E0 90 61 00 68 */ stw r3, 0x68(r1) +/* 80380A84 0037D9E4 C8 41 00 60 */ lfd f2, 0x60(r1) +/* 80380A88 0037D9E8 90 A1 00 74 */ stw r5, 0x74(r1) +/* 80380A8C 0037D9EC C8 21 00 68 */ lfd f1, 0x68(r1) +/* 80380A90 0037D9F0 EC C2 00 28 */ fsubs f6, f2, f0 +/* 80380A94 0037D9F4 90 61 00 70 */ stw r3, 0x70(r1) +/* 80380A98 0037D9F8 EC E8 01 F2 */ fmuls f7, f8, f7 +/* 80380A9C 0037D9FC EC 81 00 28 */ fsubs f4, f1, f0 +/* 80380AA0 0037DA00 90 61 00 48 */ stw r3, 0x48(r1) +/* 80380AA4 0037DA04 C0 22 CE FC */ lfs f1, lbl_805AEC1C@sda21(r2) +/* 80380AA8 0037DA08 EC CA 01 B2 */ fmuls f6, f10, f6 +/* 80380AAC 0037DA0C C9 01 00 48 */ lfd f8, 0x48(r1) +/* 80380AB0 0037DA10 C8 41 00 70 */ lfd f2, 0x70(r1) +/* 80380AB4 0037DA14 EC 85 01 32 */ fmuls f4, f5, f4 +/* 80380AB8 0037DA18 ED 08 00 28 */ fsubs f8, f8, f0 +/* 80380ABC 0037DA1C EC 02 00 28 */ fsubs f0, f2, f0 +/* 80380AC0 0037DA20 C1 82 CE F8 */ lfs f12, lbl_805AEC18@sda21(r2) +/* 80380AC4 0037DA24 EC 49 38 28 */ fsubs f2, f9, f7 +/* 80380AC8 0037DA28 EC AA 02 32 */ fmuls f5, f10, f8 +/* 80380ACC 0037DA2C ED 61 58 2A */ fadds f11, f1, f11 +/* 80380AD0 0037DA30 EC 03 00 32 */ fmuls f0, f3, f0 +/* 80380AD4 0037DA34 C0 E2 CF 0C */ lfs f7, lbl_805AEC2C@sda21(r2) +/* 80380AD8 0037DA38 EC A5 10 2A */ fadds f5, f5, f2 +/* 80380ADC 0037DA3C EC 46 20 28 */ fsubs f2, f6, f4 +/* 80380AE0 0037DA40 ED 2C 58 2A */ fadds f9, f12, f11 +/* 80380AE4 0037DA44 C1 02 CF 24 */ lfs f8, lbl_805AEC44@sda21(r2) +/* 80380AE8 0037DA48 EC 67 28 2A */ fadds f3, f7, f5 +/* 80380AEC 0037DA4C EC 02 00 28 */ fsubs f0, f2, f0 +/* 80380AF0 0037DA50 FC 09 40 40 */ fcmpo cr0, f9, f8 +/* 80380AF4 0037DA54 EC 6C 18 2A */ fadds f3, f12, f3 +/* 80380AF8 0037DA58 EC 07 00 2A */ fadds f0, f7, f0 +/* 80380AFC 0037DA5C EC 4C 00 2A */ fadds f2, f12, f0 +/* 80380B00 0037DA60 40 81 00 08 */ ble lbl_80380B08 +/* 80380B04 0037DA64 48 00 00 18 */ b lbl_80380B1C +lbl_80380B08: +/* 80380B08 0037DA68 FC 09 08 40 */ fcmpo cr0, f9, f1 +/* 80380B0C 0037DA6C 40 80 00 08 */ bge lbl_80380B14 +/* 80380B10 0037DA70 48 00 00 08 */ b lbl_80380B18 +lbl_80380B14: +/* 80380B14 0037DA74 FC 20 48 90 */ fmr f1, f9 +lbl_80380B18: +/* 80380B18 0037DA78 FD 00 08 90 */ fmr f8, f1 +lbl_80380B1C: +/* 80380B1C 0037DA7C FC 00 40 1E */ fctiwz f0, f8 +/* 80380B20 0037DA80 C0 22 CF 28 */ lfs f1, lbl_805AEC48@sda21(r2) +/* 80380B24 0037DA84 FC 03 08 40 */ fcmpo cr0, f3, f1 +/* 80380B28 0037DA88 D8 01 00 30 */ stfd f0, 0x30(r1) +/* 80380B2C 0037DA8C 80 01 00 34 */ lwz r0, 0x34(r1) +/* 80380B30 0037DA90 98 01 00 1C */ stb r0, 0x1c(r1) +/* 80380B34 0037DA94 40 81 00 08 */ ble lbl_80380B3C +/* 80380B38 0037DA98 48 00 00 18 */ b lbl_80380B50 +lbl_80380B3C: +/* 80380B3C 0037DA9C C0 22 CE FC */ lfs f1, lbl_805AEC1C@sda21(r2) +/* 80380B40 0037DAA0 FC 03 08 40 */ fcmpo cr0, f3, f1 +/* 80380B44 0037DAA4 40 80 00 08 */ bge lbl_80380B4C +/* 80380B48 0037DAA8 48 00 00 08 */ b lbl_80380B50 +lbl_80380B4C: +/* 80380B4C 0037DAAC FC 20 18 90 */ fmr f1, f3 +lbl_80380B50: +/* 80380B50 0037DAB0 FC 00 08 1E */ fctiwz f0, f1 +/* 80380B54 0037DAB4 C0 22 CF 28 */ lfs f1, lbl_805AEC48@sda21(r2) +/* 80380B58 0037DAB8 FC 02 08 40 */ fcmpo cr0, f2, f1 +/* 80380B5C 0037DABC D8 01 00 30 */ stfd f0, 0x30(r1) +/* 80380B60 0037DAC0 80 01 00 34 */ lwz r0, 0x34(r1) +/* 80380B64 0037DAC4 98 01 00 1D */ stb r0, 0x1d(r1) +/* 80380B68 0037DAC8 40 81 00 08 */ ble lbl_80380B70 +/* 80380B6C 0037DACC 48 00 00 18 */ b lbl_80380B84 +lbl_80380B70: +/* 80380B70 0037DAD0 C0 22 CE FC */ lfs f1, lbl_805AEC1C@sda21(r2) +/* 80380B74 0037DAD4 FC 02 08 40 */ fcmpo cr0, f2, f1 +/* 80380B78 0037DAD8 40 80 00 08 */ bge lbl_80380B80 +/* 80380B7C 0037DADC 48 00 00 08 */ b lbl_80380B84 +lbl_80380B80: +/* 80380B80 0037DAE0 FC 20 10 90 */ fmr f1, f2 +lbl_80380B84: +/* 80380B84 0037DAE4 FC 00 08 1E */ fctiwz f0, f1 +/* 80380B88 0037DAE8 38 00 00 00 */ li r0, 0 +/* 80380B8C 0037DAEC 38 C1 00 24 */ addi r6, r1, 0x24 +/* 80380B90 0037DAF0 38 7D 00 00 */ addi r3, r29, 0 +/* 80380B94 0037DAF4 D8 01 00 30 */ stfd f0, 0x30(r1) +/* 80380B98 0037DAF8 38 80 02 80 */ li r4, 0x280 +/* 80380B9C 0037DAFC 80 E1 00 34 */ lwz r7, 0x34(r1) +/* 80380BA0 0037DB00 38 A0 01 E0 */ li r5, 0x1e0 +/* 80380BA4 0037DB04 39 00 00 64 */ li r8, 0x64 +/* 80380BA8 0037DB08 98 E1 00 1E */ stb r7, 0x1e(r1) +/* 80380BAC 0037DB0C 38 E0 00 30 */ li r7, 0x30 +/* 80380BB0 0037DB10 98 01 00 1F */ stb r0, 0x1f(r1) +/* 80380BB4 0037DB14 80 01 00 1C */ lwz r0, 0x1c(r1) +/* 80380BB8 0037DB18 90 01 00 24 */ stw r0, 0x24(r1) +/* 80380BBC 0037DB1C A1 3E 00 0E */ lhz r9, 0xe(r30) +/* 80380BC0 0037DB20 81 5F 00 08 */ lwz r10, 8(r31) +/* 80380BC4 0037DB24 4B FF F4 95 */ bl ScreenReport +/* 80380BC8 0037DB28 3C 80 00 09 */ lis r4, 0x00096000@ha +/* 80380BCC 0037DB2C 38 7D 00 00 */ addi r3, r29, 0 +/* 80380BD0 0037DB30 38 84 60 00 */ addi r4, r4, 0x00096000@l +/* 80380BD4 0037DB34 4B FF DE DD */ bl DCFlushRange +/* 80380BD8 0037DB38 38 60 00 00 */ li r3, 0 +/* 80380BDC 0037DB3C 48 00 86 D1 */ bl VISetBlack +/* 80380BE0 0037DB40 48 00 85 31 */ bl VIFlush +/* 80380BE4 0037DB44 48 00 87 45 */ bl VIGetRetraceCount +/* 80380BE8 0037DB48 7C 7D 1B 78 */ mr r29, r3 +lbl_80380BEC: +/* 80380BEC 0037DB4C 48 00 87 3D */ bl VIGetRetraceCount +/* 80380BF0 0037DB50 7C 1D 18 50 */ subf r0, r29, r3 +/* 80380BF4 0037DB54 2C 00 00 01 */ cmpwi r0, 1 +/* 80380BF8 0037DB58 41 80 FF F4 */ blt lbl_80380BEC +/* 80380BFC 0037DB5C 48 00 0A 65 */ bl OSDisableInterrupts +/* 80380C00 0037DB60 80 9F 00 08 */ lwz r4, 8(r31) +/* 80380C04 0037DB64 4C C6 31 82 */ crclr 6 +/* 80380C08 0037DB68 38 6D 9F 80 */ addi r3, r13, lbl_805A8B40@sda21 +/* 80380C0C 0037DB6C 4B FF ED A1 */ bl OSReport +/* 80380C10 0037DB70 4B FE EC 05 */ bl PPCHalt +/* 80380C14 0037DB74 80 01 00 8C */ lwz r0, 0x8c(r1) +/* 80380C18 0037DB78 83 E1 00 84 */ lwz r31, 0x84(r1) +/* 80380C1C 0037DB7C 83 C1 00 80 */ lwz r30, 0x80(r1) +/* 80380C20 0037DB80 83 A1 00 7C */ lwz r29, 0x7c(r1) +/* 80380C24 0037DB84 83 81 00 78 */ lwz r28, 0x78(r1) +/* 80380C28 0037DB88 38 21 00 88 */ addi r1, r1, 0x88 +/* 80380C2C 0037DB8C 7C 08 03 A6 */ mtlr r0 +/* 80380C30 0037DB90 4E 80 00 20 */ blr diff --git a/asm/Dolphin/OS/OSFont.s b/asm/Dolphin/OS/OSFont.s new file mode 100644 index 00000000..1baffa51 --- /dev/null +++ b/asm/Dolphin/OS/OSFont.s @@ -0,0 +1,736 @@ +.include "macros.inc" + +.section .text, "ax" + +.global sub_80380c34 +sub_80380c34: +/* 80380C34 0037DB94 7C 08 02 A6 */ mflr r0 +/* 80380C38 0037DB98 90 01 00 04 */ stw r0, 4(r1) +/* 80380C3C 0037DB9C 94 21 FF E8 */ stwu r1, -0x18(r1) +/* 80380C40 0037DBA0 93 E1 00 14 */ stw r31, 0x14(r1) +/* 80380C44 0037DBA4 7C 7F 1B 78 */ mr r31, r3 +/* 80380C48 0037DBA8 48 00 02 FD */ bl OSGetFontEncode +/* 80380C4C 0037DBAC 54 60 04 3E */ clrlwi r0, r3, 0x10 +/* 80380C50 0037DBB0 28 00 00 01 */ cmplwi r0, 1 +/* 80380C54 0037DBB4 40 82 01 48 */ bne lbl_80380D9C +/* 80380C58 0037DBB8 57 E0 04 3E */ clrlwi r0, r31, 0x10 +/* 80380C5C 0037DBBC 28 00 00 20 */ cmplwi r0, 0x20 +/* 80380C60 0037DBC0 41 80 00 24 */ blt lbl_80380C84 +/* 80380C64 0037DBC4 28 00 00 DF */ cmplwi r0, 0xdf +/* 80380C68 0037DBC8 41 81 00 1C */ bgt lbl_80380C84 +/* 80380C6C 0037DBCC 3C 60 80 3F */ lis r3, lbl_803F1750@ha +/* 80380C70 0037DBD0 38 63 17 50 */ addi r3, r3, lbl_803F1750@l +/* 80380C74 0037DBD4 54 00 08 3C */ slwi r0, r0, 1 +/* 80380C78 0037DBD8 7C 63 02 14 */ add r3, r3, r0 +/* 80380C7C 0037DBDC A0 63 FF C0 */ lhz r3, -0x40(r3) +/* 80380C80 0037DBE0 48 00 01 3C */ b lbl_80380DBC +lbl_80380C84: +/* 80380C84 0037DBE4 57 E0 04 3E */ clrlwi r0, r31, 0x10 +/* 80380C88 0037DBE8 28 00 88 9E */ cmplwi r0, 0x889e +/* 80380C8C 0037DBEC 40 81 00 7C */ ble lbl_80380D08 +/* 80380C90 0037DBF0 28 00 98 72 */ cmplwi r0, 0x9872 +/* 80380C94 0037DBF4 41 81 00 74 */ bgt lbl_80380D08 +/* 80380C98 0037DBF8 7C 03 46 70 */ srawi r3, r0, 8 +/* 80380C9C 0037DBFC 54 04 06 3E */ clrlwi r4, r0, 0x18 +/* 80380CA0 0037DC00 38 03 FF 78 */ addi r0, r3, -136 +/* 80380CA4 0037DC04 28 04 00 40 */ cmplwi r4, 0x40 +/* 80380CA8 0037DC08 1C A0 00 BC */ mulli r5, r0, 0xbc +/* 80380CAC 0037DC0C 38 60 00 00 */ li r3, 0 +/* 80380CB0 0037DC10 38 03 00 00 */ addi r0, r3, 0 +/* 80380CB4 0037DC14 41 80 00 10 */ blt lbl_80380CC4 +/* 80380CB8 0037DC18 28 04 00 FC */ cmplwi r4, 0xfc +/* 80380CBC 0037DC1C 41 81 00 08 */ bgt lbl_80380CC4 +/* 80380CC0 0037DC20 38 00 00 01 */ li r0, 1 +lbl_80380CC4: +/* 80380CC4 0037DC24 2C 00 00 00 */ cmpwi r0, 0 +/* 80380CC8 0037DC28 41 82 00 14 */ beq lbl_80380CDC +/* 80380CCC 0037DC2C 54 80 06 3E */ clrlwi r0, r4, 0x18 +/* 80380CD0 0037DC30 28 00 00 7F */ cmplwi r0, 0x7f +/* 80380CD4 0037DC34 41 82 00 08 */ beq lbl_80380CDC +/* 80380CD8 0037DC38 38 60 00 01 */ li r3, 1 +lbl_80380CDC: +/* 80380CDC 0037DC3C 2C 03 00 00 */ cmpwi r3, 0 +/* 80380CE0 0037DC40 40 82 00 0C */ bne lbl_80380CEC +/* 80380CE4 0037DC44 38 60 00 00 */ li r3, 0 +/* 80380CE8 0037DC48 48 00 00 D4 */ b lbl_80380DBC +lbl_80380CEC: +/* 80380CEC 0037DC4C 38 64 FF C0 */ addi r3, r4, -64 +/* 80380CF0 0037DC50 2C 03 00 40 */ cmpwi r3, 0x40 +/* 80380CF4 0037DC54 41 80 00 08 */ blt lbl_80380CFC +/* 80380CF8 0037DC58 38 63 FF FF */ addi r3, r3, -1 +lbl_80380CFC: +/* 80380CFC 0037DC5C 38 63 02 BE */ addi r3, r3, 0x2be +/* 80380D00 0037DC60 7C 65 1A 14 */ add r3, r5, r3 +/* 80380D04 0037DC64 48 00 00 B8 */ b lbl_80380DBC +lbl_80380D08: +/* 80380D08 0037DC68 57 E0 04 3E */ clrlwi r0, r31, 0x10 +/* 80380D0C 0037DC6C 28 00 81 40 */ cmplwi r0, 0x8140 +/* 80380D10 0037DC70 41 80 00 A8 */ blt lbl_80380DB8 +/* 80380D14 0037DC74 28 00 87 9E */ cmplwi r0, 0x879e +/* 80380D18 0037DC78 40 80 00 A0 */ bge lbl_80380DB8 +/* 80380D1C 0037DC7C 7C 03 46 70 */ srawi r3, r0, 8 +/* 80380D20 0037DC80 54 04 06 3E */ clrlwi r4, r0, 0x18 +/* 80380D24 0037DC84 38 03 FF 7F */ addi r0, r3, -129 +/* 80380D28 0037DC88 28 04 00 40 */ cmplwi r4, 0x40 +/* 80380D2C 0037DC8C 1C A0 00 BC */ mulli r5, r0, 0xbc +/* 80380D30 0037DC90 38 60 00 00 */ li r3, 0 +/* 80380D34 0037DC94 38 03 00 00 */ addi r0, r3, 0 +/* 80380D38 0037DC98 41 80 00 10 */ blt lbl_80380D48 +/* 80380D3C 0037DC9C 28 04 00 FC */ cmplwi r4, 0xfc +/* 80380D40 0037DCA0 41 81 00 08 */ bgt lbl_80380D48 +/* 80380D44 0037DCA4 38 00 00 01 */ li r0, 1 +lbl_80380D48: +/* 80380D48 0037DCA8 2C 00 00 00 */ cmpwi r0, 0 +/* 80380D4C 0037DCAC 41 82 00 14 */ beq lbl_80380D60 +/* 80380D50 0037DCB0 54 80 06 3E */ clrlwi r0, r4, 0x18 +/* 80380D54 0037DCB4 28 00 00 7F */ cmplwi r0, 0x7f +/* 80380D58 0037DCB8 41 82 00 08 */ beq lbl_80380D60 +/* 80380D5C 0037DCBC 38 60 00 01 */ li r3, 1 +lbl_80380D60: +/* 80380D60 0037DCC0 2C 03 00 00 */ cmpwi r3, 0 +/* 80380D64 0037DCC4 40 82 00 0C */ bne lbl_80380D70 +/* 80380D68 0037DCC8 38 60 00 00 */ li r3, 0 +/* 80380D6C 0037DCCC 48 00 00 50 */ b lbl_80380DBC +lbl_80380D70: +/* 80380D70 0037DCD0 38 64 FF C0 */ addi r3, r4, -64 +/* 80380D74 0037DCD4 2C 03 00 40 */ cmpwi r3, 0x40 +/* 80380D78 0037DCD8 41 80 00 08 */ blt lbl_80380D80 +/* 80380D7C 0037DCDC 38 63 FF FF */ addi r3, r3, -1 +lbl_80380D80: +/* 80380D80 0037DCE0 7C 05 1A 14 */ add r0, r5, r3 +/* 80380D84 0037DCE4 3C 60 80 3F */ lis r3, lbl_803F18D0@ha +/* 80380D88 0037DCE8 54 04 08 3C */ slwi r4, r0, 1 +/* 80380D8C 0037DCEC 38 03 18 D0 */ addi r0, r3, lbl_803F18D0@l +/* 80380D90 0037DCF0 7C 60 22 14 */ add r3, r0, r4 +/* 80380D94 0037DCF4 A0 63 00 00 */ lhz r3, 0(r3) +/* 80380D98 0037DCF8 48 00 00 24 */ b lbl_80380DBC +lbl_80380D9C: +/* 80380D9C 0037DCFC 57 E3 04 3E */ clrlwi r3, r31, 0x10 +/* 80380DA0 0037DD00 28 03 00 20 */ cmplwi r3, 0x20 +/* 80380DA4 0037DD04 40 81 00 14 */ ble lbl_80380DB8 +/* 80380DA8 0037DD08 28 03 00 FF */ cmplwi r3, 0xff +/* 80380DAC 0037DD0C 41 81 00 0C */ bgt lbl_80380DB8 +/* 80380DB0 0037DD10 38 63 FF E0 */ addi r3, r3, -32 +/* 80380DB4 0037DD14 48 00 00 08 */ b lbl_80380DBC +lbl_80380DB8: +/* 80380DB8 0037DD18 38 60 00 00 */ li r3, 0 +lbl_80380DBC: +/* 80380DBC 0037DD1C 80 01 00 1C */ lwz r0, 0x1c(r1) +/* 80380DC0 0037DD20 83 E1 00 14 */ lwz r31, 0x14(r1) +/* 80380DC4 0037DD24 38 21 00 18 */ addi r1, r1, 0x18 +/* 80380DC8 0037DD28 7C 08 03 A6 */ mtlr r0 +/* 80380DCC 0037DD2C 4E 80 00 20 */ blr + +.global sub_80380dd0 +sub_80380dd0: +/* 80380DD0 0037DD30 94 21 FF E0 */ stwu r1, -0x20(r1) +/* 80380DD4 0037DD34 38 C3 00 10 */ addi r6, r3, 0x10 +/* 80380DD8 0037DD38 39 40 00 00 */ li r10, 0 +/* 80380DDC 0037DD3C 93 E1 00 1C */ stw r31, 0x1c(r1) +/* 80380DE0 0037DD40 93 C1 00 18 */ stw r30, 0x18(r1) +/* 80380DE4 0037DD44 3B C0 00 00 */ li r30, 0 +/* 80380DE8 0037DD48 93 A1 00 14 */ stw r29, 0x14(r1) +/* 80380DEC 0037DD4C 83 E3 00 04 */ lwz r31, 4(r3) +/* 80380DF0 0037DD50 81 63 00 08 */ lwz r11, 8(r3) +/* 80380DF4 0037DD54 81 83 00 0C */ lwz r12, 0xc(r3) +lbl_80380DF8: +/* 80380DF8 0037DD58 28 1E 00 00 */ cmplwi r30, 0 +/* 80380DFC 0037DD5C 40 82 00 10 */ bne lbl_80380E0C +/* 80380E00 0037DD60 83 A6 00 00 */ lwz r29, 0(r6) +/* 80380E04 0037DD64 3B C0 00 20 */ li r30, 0x20 +/* 80380E08 0037DD68 38 C6 00 04 */ addi r6, r6, 4 +lbl_80380E0C: +/* 80380E0C 0037DD6C 57 A0 00 01 */ rlwinm. r0, r29, 0, 0, 0 +/* 80380E10 0037DD70 41 82 00 20 */ beq lbl_80380E30 +/* 80380E14 0037DD74 7D 80 63 78 */ mr r0, r12 +/* 80380E18 0037DD78 7C A3 00 AE */ lbzx r5, r3, r0 +/* 80380E1C 0037DD7C 7D 40 53 78 */ mr r0, r10 +/* 80380E20 0037DD80 39 4A 00 01 */ addi r10, r10, 1 +/* 80380E24 0037DD84 7C A4 01 AE */ stbx r5, r4, r0 +/* 80380E28 0037DD88 39 8C 00 01 */ addi r12, r12, 1 +/* 80380E2C 0037DD8C 48 00 00 F4 */ b lbl_80380F20 +lbl_80380E30: +/* 80380E30 0037DD90 7C E3 5A 14 */ add r7, r3, r11 +/* 80380E34 0037DD94 88 A7 00 00 */ lbz r5, 0(r7) +/* 80380E38 0037DD98 39 6B 00 02 */ addi r11, r11, 2 +/* 80380E3C 0037DD9C 88 07 00 01 */ lbz r0, 1(r7) +/* 80380E40 0037DDA0 50 A0 44 2E */ rlwimi r0, r5, 8, 0x10, 0x17 +/* 80380E44 0037DDA4 7C 05 66 71 */ srawi. r5, r0, 0xc +/* 80380E48 0037DDA8 54 00 05 3E */ clrlwi r0, r0, 0x14 +/* 80380E4C 0037DDAC 7D 20 50 50 */ subf r9, r0, r10 +/* 80380E50 0037DDB0 40 82 00 18 */ bne lbl_80380E68 +/* 80380E54 0037DDB4 7D 80 63 78 */ mr r0, r12 +/* 80380E58 0037DDB8 7C A3 00 AE */ lbzx r5, r3, r0 +/* 80380E5C 0037DDBC 39 8C 00 01 */ addi r12, r12, 1 +/* 80380E60 0037DDC0 38 05 00 12 */ addi r0, r5, 0x12 +/* 80380E64 0037DDC4 48 00 00 08 */ b lbl_80380E6C +lbl_80380E68: +/* 80380E68 0037DDC8 38 05 00 02 */ addi r0, r5, 2 +lbl_80380E6C: +/* 80380E6C 0037DDCC 2C 00 00 00 */ cmpwi r0, 0 +/* 80380E70 0037DDD0 7C 05 03 78 */ mr r5, r0 +/* 80380E74 0037DDD4 7C E4 52 14 */ add r7, r4, r10 +/* 80380E78 0037DDD8 40 81 00 A8 */ ble lbl_80380F20 +/* 80380E7C 0037DDDC 54 A0 E8 FF */ rlwinm. r0, r5, 0x1d, 3, 0x1f +/* 80380E80 0037DDE0 7C 09 03 A6 */ mtctr r0 +/* 80380E84 0037DDE4 41 82 00 7C */ beq lbl_80380F00 +lbl_80380E88: +/* 80380E88 0037DDE8 39 09 FF FF */ addi r8, r9, -1 +/* 80380E8C 0037DDEC 7C 04 40 AE */ lbzx r0, r4, r8 +/* 80380E90 0037DDF0 39 09 00 00 */ addi r8, r9, 0 +/* 80380E94 0037DDF4 39 4A 00 08 */ addi r10, r10, 8 +/* 80380E98 0037DDF8 98 07 00 00 */ stb r0, 0(r7) +/* 80380E9C 0037DDFC 7C 04 40 AE */ lbzx r0, r4, r8 +/* 80380EA0 0037DE00 39 09 00 01 */ addi r8, r9, 1 +/* 80380EA4 0037DE04 98 07 00 01 */ stb r0, 1(r7) +/* 80380EA8 0037DE08 7C 04 40 AE */ lbzx r0, r4, r8 +/* 80380EAC 0037DE0C 39 09 00 02 */ addi r8, r9, 2 +/* 80380EB0 0037DE10 98 07 00 02 */ stb r0, 2(r7) +/* 80380EB4 0037DE14 7C 04 40 AE */ lbzx r0, r4, r8 +/* 80380EB8 0037DE18 39 09 00 03 */ addi r8, r9, 3 +/* 80380EBC 0037DE1C 98 07 00 03 */ stb r0, 3(r7) +/* 80380EC0 0037DE20 7C 04 40 AE */ lbzx r0, r4, r8 +/* 80380EC4 0037DE24 39 09 00 04 */ addi r8, r9, 4 +/* 80380EC8 0037DE28 98 07 00 04 */ stb r0, 4(r7) +/* 80380ECC 0037DE2C 7C 04 40 AE */ lbzx r0, r4, r8 +/* 80380ED0 0037DE30 39 09 00 05 */ addi r8, r9, 5 +/* 80380ED4 0037DE34 98 07 00 05 */ stb r0, 5(r7) +/* 80380ED8 0037DE38 7C 04 40 AE */ lbzx r0, r4, r8 +/* 80380EDC 0037DE3C 39 09 00 06 */ addi r8, r9, 6 +/* 80380EE0 0037DE40 39 29 00 08 */ addi r9, r9, 8 +/* 80380EE4 0037DE44 98 07 00 06 */ stb r0, 6(r7) +/* 80380EE8 0037DE48 7C 04 40 AE */ lbzx r0, r4, r8 +/* 80380EEC 0037DE4C 98 07 00 07 */ stb r0, 7(r7) +/* 80380EF0 0037DE50 38 E7 00 08 */ addi r7, r7, 8 +/* 80380EF4 0037DE54 42 00 FF 94 */ bdnz lbl_80380E88 +/* 80380EF8 0037DE58 70 A5 00 07 */ andi. r5, r5, 7 +/* 80380EFC 0037DE5C 41 82 00 24 */ beq lbl_80380F20 +lbl_80380F00: +/* 80380F00 0037DE60 7C A9 03 A6 */ mtctr r5 +lbl_80380F04: +/* 80380F04 0037DE64 39 09 FF FF */ addi r8, r9, -1 +/* 80380F08 0037DE68 7C 04 40 AE */ lbzx r0, r4, r8 +/* 80380F0C 0037DE6C 39 4A 00 01 */ addi r10, r10, 1 +/* 80380F10 0037DE70 39 29 00 01 */ addi r9, r9, 1 +/* 80380F14 0037DE74 98 07 00 00 */ stb r0, 0(r7) +/* 80380F18 0037DE78 38 E7 00 01 */ addi r7, r7, 1 +/* 80380F1C 0037DE7C 42 00 FF E8 */ bdnz lbl_80380F04 +lbl_80380F20: +/* 80380F20 0037DE80 7C 0A F8 00 */ cmpw r10, r31 +/* 80380F24 0037DE84 57 BD 08 3C */ slwi r29, r29, 1 +/* 80380F28 0037DE88 3B DE FF FF */ addi r30, r30, -1 +/* 80380F2C 0037DE8C 41 80 FE CC */ blt lbl_80380DF8 +/* 80380F30 0037DE90 83 E1 00 1C */ lwz r31, 0x1c(r1) +/* 80380F34 0037DE94 83 C1 00 18 */ lwz r30, 0x18(r1) +/* 80380F38 0037DE98 83 A1 00 14 */ lwz r29, 0x14(r1) +/* 80380F3C 0037DE9C 38 21 00 20 */ addi r1, r1, 0x20 +/* 80380F40 0037DEA0 4E 80 00 20 */ blr + +.global OSGetFontEncode +OSGetFontEncode: +/* 80380F44 0037DEA4 A0 6D 9F 88 */ lhz r3, lbl_805A8B48@sda21(r13) +/* 80380F48 0037DEA8 28 03 00 01 */ cmplwi r3, 1 +/* 80380F4C 0037DEAC 4C 81 00 20 */ blelr +/* 80380F50 0037DEB0 3C 60 80 00 */ lis r3, 0x800000CC@ha +/* 80380F54 0037DEB4 80 03 00 CC */ lwz r0, 0x800000CC@l(r3) +/* 80380F58 0037DEB8 2C 00 00 00 */ cmpwi r0, 0 +/* 80380F5C 0037DEBC 41 82 00 0C */ beq lbl_80380F68 +/* 80380F60 0037DEC0 41 80 00 2C */ blt lbl_80380F8C +/* 80380F64 0037DEC4 48 00 00 28 */ b lbl_80380F8C +lbl_80380F68: +/* 80380F68 0037DEC8 3C 60 CC 00 */ lis r3, 0xCC00206E@ha +/* 80380F6C 0037DECC A0 03 20 6E */ lhz r0, 0xCC00206E@l(r3) +/* 80380F70 0037DED0 54 00 07 BD */ rlwinm. r0, r0, 0, 0x1e, 0x1e +/* 80380F74 0037DED4 41 82 00 0C */ beq lbl_80380F80 +/* 80380F78 0037DED8 38 00 00 01 */ li r0, 1 +/* 80380F7C 0037DEDC 48 00 00 08 */ b lbl_80380F84 +lbl_80380F80: +/* 80380F80 0037DEE0 38 00 00 00 */ li r0, 0 +lbl_80380F84: +/* 80380F84 0037DEE4 B0 0D 9F 88 */ sth r0, lbl_805A8B48@sda21(r13) +/* 80380F88 0037DEE8 48 00 00 0C */ b lbl_80380F94 +lbl_80380F8C: +/* 80380F8C 0037DEEC 38 00 00 00 */ li r0, 0 +/* 80380F90 0037DEF0 B0 0D 9F 88 */ sth r0, lbl_805A8B48@sda21(r13) +lbl_80380F94: +/* 80380F94 0037DEF4 A0 6D 9F 88 */ lhz r3, lbl_805A8B48@sda21(r13) +/* 80380F98 0037DEF8 4E 80 00 20 */ blr + +.global sub_80380f9c +sub_80380f9c: +/* 80380F9C 0037DEFC 7C 08 02 A6 */ mflr r0 +/* 80380FA0 0037DF00 90 01 00 04 */ stw r0, 4(r1) +/* 80380FA4 0037DF04 94 21 FF D8 */ stwu r1, -0x28(r1) +/* 80380FA8 0037DF08 93 E1 00 24 */ stw r31, 0x24(r1) +/* 80380FAC 0037DF0C 93 C1 00 20 */ stw r30, 0x20(r1) +/* 80380FB0 0037DF10 3B C5 00 00 */ addi r30, r5, 0 +/* 80380FB4 0037DF14 93 A1 00 1C */ stw r29, 0x1c(r1) +/* 80380FB8 0037DF18 3B A4 00 00 */ addi r29, r4, 0 +/* 80380FBC 0037DF1C 93 81 00 18 */ stw r28, 0x18(r1) +/* 80380FC0 0037DF20 3B 83 00 00 */ addi r28, r3, 0 +/* 80380FC4 0037DF24 48 00 00 3C */ b lbl_80381000 +lbl_80380FC8: +/* 80380FC8 0037DF28 2C 1D 01 00 */ cmpwi r29, 0x100 +/* 80380FCC 0037DF2C 41 81 00 0C */ bgt lbl_80380FD8 +/* 80380FD0 0037DF30 7F BF EB 78 */ mr r31, r29 +/* 80380FD4 0037DF34 48 00 00 08 */ b lbl_80380FDC +lbl_80380FD8: +/* 80380FD8 0037DF38 3B E0 01 00 */ li r31, 0x100 +lbl_80380FDC: +/* 80380FDC 0037DF3C 7F BF E8 50 */ subf r29, r31, r29 +lbl_80380FE0: +/* 80380FE0 0037DF40 38 7C 00 00 */ addi r3, r28, 0 +/* 80380FE4 0037DF44 38 9F 00 00 */ addi r4, r31, 0 +/* 80380FE8 0037DF48 38 BE 00 00 */ addi r5, r30, 0 +/* 80380FEC 0037DF4C 48 00 2F 01 */ bl sub_80383eec +/* 80380FF0 0037DF50 2C 03 00 00 */ cmpwi r3, 0 +/* 80380FF4 0037DF54 41 82 FF EC */ beq lbl_80380FE0 +/* 80380FF8 0037DF58 7F DE FA 14 */ add r30, r30, r31 +/* 80380FFC 0037DF5C 7F 9C FA 14 */ add r28, r28, r31 +lbl_80381000: +/* 80381000 0037DF60 2C 1D 00 00 */ cmpwi r29, 0 +/* 80381004 0037DF64 41 81 FF C4 */ bgt lbl_80380FC8 +/* 80381008 0037DF68 80 01 00 2C */ lwz r0, 0x2c(r1) +/* 8038100C 0037DF6C 83 E1 00 24 */ lwz r31, 0x24(r1) +/* 80381010 0037DF70 83 C1 00 20 */ lwz r30, 0x20(r1) +/* 80381014 0037DF74 83 A1 00 1C */ lwz r29, 0x1c(r1) +/* 80381018 0037DF78 83 81 00 18 */ lwz r28, 0x18(r1) +/* 8038101C 0037DF7C 38 21 00 28 */ addi r1, r1, 0x28 +/* 80381020 0037DF80 7C 08 03 A6 */ mtlr r0 +/* 80381024 0037DF84 4E 80 00 20 */ blr + +.global sub_80381028 +sub_80381028: +/* 80381028 0037DF88 7C 08 02 A6 */ mflr r0 +/* 8038102C 0037DF8C 90 01 00 04 */ stw r0, 4(r1) +/* 80381030 0037DF90 38 00 00 00 */ li r0, 0 +/* 80381034 0037DF94 94 21 FF C0 */ stwu r1, -0x40(r1) +/* 80381038 0037DF98 93 E1 00 3C */ stw r31, 0x3c(r1) +/* 8038103C 0037DF9C 93 C1 00 38 */ stw r30, 0x38(r1) +/* 80381040 0037DFA0 3B C4 00 00 */ addi r30, r4, 0 +/* 80381044 0037DFA4 93 A1 00 34 */ stw r29, 0x34(r1) +/* 80381048 0037DFA8 3B A3 00 00 */ addi r29, r3, 0 +/* 8038104C 0037DFAC 90 0D AD 04 */ stw r0, lbl_805A98C4@sda21(r13) +/* 80381050 0037DFB0 4B FF FE F5 */ bl OSGetFontEncode +/* 80381054 0037DFB4 54 60 04 3E */ clrlwi r0, r3, 0x10 +/* 80381058 0037DFB8 28 00 00 01 */ cmplwi r0, 1 +/* 8038105C 0037DFBC 40 82 00 20 */ bne lbl_8038107C +/* 80381060 0037DFC0 3C 80 00 05 */ lis r4, 0x0004D000@ha +/* 80381064 0037DFC4 3C A0 00 1B */ lis r5, 0x001AFF00@ha +/* 80381068 0037DFC8 38 7E 00 00 */ addi r3, r30, 0 +/* 8038106C 0037DFCC 38 84 D0 00 */ addi r4, r4, 0x0004D000@l +/* 80381070 0037DFD0 38 A5 FF 00 */ addi r5, r5, 0x001AFF00@l +/* 80381074 0037DFD4 4B FF FF 29 */ bl sub_80380f9c +/* 80381078 0037DFD8 48 00 00 18 */ b lbl_80381090 +lbl_8038107C: +/* 8038107C 0037DFDC 3C 80 00 20 */ lis r4, 0x001FCF00@ha +/* 80381080 0037DFE0 38 7E 00 00 */ addi r3, r30, 0 +/* 80381084 0037DFE4 38 A4 CF 00 */ addi r5, r4, 0x001FCF00@l +/* 80381088 0037DFE8 38 80 30 00 */ li r4, 0x3000 +/* 8038108C 0037DFEC 4B FF FF 11 */ bl sub_80380f9c +lbl_80381090: +/* 80381090 0037DFF0 88 1E 00 00 */ lbz r0, 0(r30) +/* 80381094 0037DFF4 28 00 00 59 */ cmplwi r0, 0x59 +/* 80381098 0037DFF8 40 82 00 24 */ bne lbl_803810BC +/* 8038109C 0037DFFC 88 1E 00 01 */ lbz r0, 1(r30) +/* 803810A0 0037E000 28 00 00 61 */ cmplwi r0, 0x61 +/* 803810A4 0037E004 40 82 00 18 */ bne lbl_803810BC +/* 803810A8 0037E008 88 1E 00 02 */ lbz r0, 2(r30) +/* 803810AC 0037E00C 28 00 00 79 */ cmplwi r0, 0x79 +/* 803810B0 0037E010 40 82 00 0C */ bne lbl_803810BC +/* 803810B4 0037E014 83 FE 00 04 */ lwz r31, 4(r30) +/* 803810B8 0037E018 48 00 00 08 */ b lbl_803810C0 +lbl_803810BC: +/* 803810BC 0037E01C 3B E0 00 00 */ li r31, 0 +lbl_803810C0: +/* 803810C0 0037E020 28 1F 00 00 */ cmplwi r31, 0 +/* 803810C4 0037E024 41 82 02 78 */ beq lbl_8038133C +/* 803810C8 0037E028 38 7E 00 00 */ addi r3, r30, 0 +/* 803810CC 0037E02C 38 9D 00 00 */ addi r4, r29, 0 +/* 803810D0 0037E030 4B FF FD 01 */ bl sub_80380dd0 +/* 803810D4 0037E034 93 AD AD 00 */ stw r29, lbl_805A98C0@sda21(r13) +/* 803810D8 0037E038 A0 8D 9F 88 */ lhz r4, lbl_805A8B48@sda21(r13) +/* 803810DC 0037E03C A0 1D 00 22 */ lhz r0, 0x22(r29) +/* 803810E0 0037E040 28 04 00 01 */ cmplwi r4, 1 +/* 803810E4 0037E044 7C 1D 02 14 */ add r0, r29, r0 +/* 803810E8 0037E048 90 0D AD 08 */ stw r0, lbl_805A98C8@sda21(r13) +/* 803810EC 0037E04C A0 7D 00 1A */ lhz r3, 0x1a(r29) +/* 803810F0 0037E050 A0 1D 00 1C */ lhz r0, 0x1c(r29) +/* 803810F4 0037E054 7C 03 01 D6 */ mullw r0, r3, r0 +/* 803810F8 0037E058 90 0D AD 0C */ stw r0, lbl_805A98CC@sda21(r13) +/* 803810FC 0037E05C 41 81 00 08 */ bgt lbl_80381104 +/* 80381100 0037E060 48 00 00 4C */ b lbl_8038114C +lbl_80381104: +/* 80381104 0037E064 3C 60 80 00 */ lis r3, 0x800000CC@ha +/* 80381108 0037E068 80 03 00 CC */ lwz r0, 0x800000CC@l(r3) +/* 8038110C 0037E06C 2C 00 00 00 */ cmpwi r0, 0 +/* 80381110 0037E070 41 82 00 0C */ beq lbl_8038111C +/* 80381114 0037E074 41 80 00 2C */ blt lbl_80381140 +/* 80381118 0037E078 48 00 00 28 */ b lbl_80381140 +lbl_8038111C: +/* 8038111C 0037E07C 3C 60 CC 00 */ lis r3, 0xCC00206E@ha +/* 80381120 0037E080 A0 03 20 6E */ lhz r0, 0xCC00206E@l(r3) +/* 80381124 0037E084 54 00 07 BD */ rlwinm. r0, r0, 0, 0x1e, 0x1e +/* 80381128 0037E088 41 82 00 0C */ beq lbl_80381134 +/* 8038112C 0037E08C 38 00 00 01 */ li r0, 1 +/* 80381130 0037E090 48 00 00 08 */ b lbl_80381138 +lbl_80381134: +/* 80381134 0037E094 38 00 00 00 */ li r0, 0 +lbl_80381138: +/* 80381138 0037E098 B0 0D 9F 88 */ sth r0, lbl_805A8B48@sda21(r13) +/* 8038113C 0037E09C 48 00 00 0C */ b lbl_80381148 +lbl_80381140: +/* 80381140 0037E0A0 38 00 00 00 */ li r0, 0 +/* 80381144 0037E0A4 B0 0D 9F 88 */ sth r0, lbl_805A8B48@sda21(r13) +lbl_80381148: +/* 80381148 0037E0A8 A0 8D 9F 88 */ lhz r4, lbl_805A8B48@sda21(r13) +lbl_8038114C: +/* 8038114C 0037E0AC 54 80 04 3E */ clrlwi r0, r4, 0x10 +/* 80381150 0037E0B0 28 00 00 01 */ cmplwi r0, 1 +/* 80381154 0037E0B4 40 82 01 E8 */ bne lbl_8038133C +/* 80381158 0037E0B8 80 82 CF 38 */ lwz r4, lbl_805AEC58@sda21(r2) +/* 8038115C 0037E0BC 38 60 00 54 */ li r3, 0x54 +/* 80381160 0037E0C0 80 02 CF 3C */ lwz r0, lbl_805AEC5C@sda21(r2) +/* 80381164 0037E0C4 90 81 00 1C */ stw r4, 0x1c(r1) +/* 80381168 0037E0C8 90 01 00 20 */ stw r0, 0x20(r1) +/* 8038116C 0037E0CC 4B FF FA C9 */ bl sub_80380c34 +/* 80381170 0037E0D0 80 AD AD 0C */ lwz r5, lbl_805A98CC@sda21(r13) +/* 80381174 0037E0D4 81 8D AD 00 */ lwz r12, lbl_805A98C0@sda21(r13) +/* 80381178 0037E0D8 7D 43 2B D6 */ divw r10, r3, r5 +/* 8038117C 0037E0DC A0 C1 00 1C */ lhz r6, 0x1c(r1) +/* 80381180 0037E0E0 A0 0C 00 1E */ lhz r0, 0x1e(r12) +/* 80381184 0037E0E4 80 8C 00 14 */ lwz r4, 0x14(r12) +/* 80381188 0037E0E8 81 6C 00 24 */ lwz r11, 0x24(r12) +/* 8038118C 0037E0EC 7D 0A 29 D6 */ mullw r8, r10, r5 +/* 80381190 0037E0F0 A1 2C 00 1A */ lhz r9, 0x1a(r12) +/* 80381194 0037E0F4 A0 AC 00 12 */ lhz r5, 0x12(r12) +/* 80381198 0037E0F8 A0 EC 00 10 */ lhz r7, 0x10(r12) +/* 8038119C 0037E0FC 7F C8 18 50 */ subf r30, r8, r3 +/* 803811A0 0037E100 7D 1E 4B D6 */ divw r8, r30, r9 +/* 803811A4 0037E104 7C 68 49 D6 */ mullw r3, r8, r9 +/* 803811A8 0037E108 7C A8 29 D6 */ mullw r5, r8, r5 +/* 803811AC 0037E10C 7C 00 1E 70 */ srawi r0, r0, 3 +/* 803811B0 0037E110 7C 63 F0 50 */ subf r3, r3, r30 +/* 803811B4 0037E114 7C 00 01 94 */ addze r0, r0 +/* 803811B8 0037E118 54 00 28 34 */ slwi r0, r0, 5 +/* 803811BC 0037E11C 7C 09 0E 70 */ srawi r9, r0, 1 +/* 803811C0 0037E120 7D 4A 21 D6 */ mullw r10, r10, r4 +/* 803811C4 0037E124 7C 63 39 D6 */ mullw r3, r3, r7 +/* 803811C8 0037E128 7D 29 01 94 */ addze r9, r9 +/* 803811CC 0037E12C 38 05 00 04 */ addi r0, r5, 4 +/* 803811D0 0037E130 7C 04 1E 70 */ srawi r4, r0, 3 +/* 803811D4 0037E134 7C 84 01 94 */ addze r4, r4 +/* 803811D8 0037E138 7C 68 1E 70 */ srawi r8, r3, 3 +/* 803811DC 0037E13C 7D 08 01 94 */ addze r8, r8 +/* 803811E0 0037E140 7C 07 1E 70 */ srawi r7, r0, 3 +/* 803811E4 0037E144 7C E7 01 94 */ addze r7, r7 +/* 803811E8 0037E148 54 E7 18 38 */ slwi r7, r7, 3 +/* 803811EC 0037E14C 7C E7 00 10 */ subfc r7, r7, r0 +/* 803811F0 0037E150 7C 60 1E 70 */ srawi r0, r3, 3 +/* 803811F4 0037E154 7C 00 01 94 */ addze r0, r0 +/* 803811F8 0037E158 54 00 18 38 */ slwi r0, r0, 3 +/* 803811FC 0037E15C 7C 00 18 10 */ subfc r0, r0, r3 +/* 80381200 0037E160 7C 03 16 70 */ srawi r3, r0, 2 +/* 80381204 0037E164 7C 09 21 D6 */ mullw r0, r9, r4 +/* 80381208 0037E168 7C 8C 5A 14 */ add r4, r12, r11 +/* 8038120C 0037E16C 55 49 F8 7E */ srwi r9, r10, 1 +/* 80381210 0037E170 7C 84 4A 14 */ add r4, r4, r9 +/* 80381214 0037E174 7D 24 02 14 */ add r9, r4, r0 +/* 80381218 0037E178 55 00 20 36 */ slwi r0, r8, 4 +/* 8038121C 0037E17C 7D 29 02 14 */ add r9, r9, r0 +/* 80381220 0037E180 54 E7 08 3C */ slwi r7, r7, 1 +/* 80381224 0037E184 7D 29 3A 14 */ add r9, r9, r7 +/* 80381228 0037E188 7C 63 01 94 */ addze r3, r3 +/* 8038122C 0037E18C 7D 29 1A 14 */ add r9, r9, r3 +/* 80381230 0037E190 B0 C9 00 00 */ sth r6, 0(r9) +/* 80381234 0037E194 39 45 00 05 */ addi r10, r5, 5 +/* 80381238 0037E198 39 25 00 06 */ addi r9, r5, 6 +/* 8038123C 0037E19C 80 ED AD 00 */ lwz r7, lbl_805A98C0@sda21(r13) +/* 80381240 0037E1A0 38 C5 00 07 */ addi r6, r5, 7 +/* 80381244 0037E1A4 A0 A1 00 1E */ lhz r5, 0x1e(r1) +/* 80381248 0037E1A8 A0 E7 00 1E */ lhz r7, 0x1e(r7) +/* 8038124C 0037E1AC 7C E7 1E 70 */ srawi r7, r7, 3 +/* 80381250 0037E1B0 7C E7 01 94 */ addze r7, r7 +/* 80381254 0037E1B4 54 E7 28 34 */ slwi r7, r7, 5 +/* 80381258 0037E1B8 7C E8 0E 70 */ srawi r8, r7, 1 +/* 8038125C 0037E1BC 7D 08 01 94 */ addze r8, r8 +/* 80381260 0037E1C0 7D 47 1E 70 */ srawi r7, r10, 3 +/* 80381264 0037E1C4 7C E7 01 94 */ addze r7, r7 +/* 80381268 0037E1C8 7D 08 39 D6 */ mullw r8, r8, r7 +/* 8038126C 0037E1CC 7D 47 1E 70 */ srawi r7, r10, 3 +/* 80381270 0037E1D0 7C E7 01 94 */ addze r7, r7 +/* 80381274 0037E1D4 54 E7 18 38 */ slwi r7, r7, 3 +/* 80381278 0037E1D8 7D 04 42 14 */ add r8, r4, r8 +/* 8038127C 0037E1DC 7C E7 50 10 */ subfc r7, r7, r10 +/* 80381280 0037E1E0 7D 08 02 14 */ add r8, r8, r0 +/* 80381284 0037E1E4 54 E7 08 3C */ slwi r7, r7, 1 +/* 80381288 0037E1E8 7D 08 3A 14 */ add r8, r8, r7 +/* 8038128C 0037E1EC 7D 08 1A 14 */ add r8, r8, r3 +/* 80381290 0037E1F0 B0 A8 00 00 */ sth r5, 0(r8) +/* 80381294 0037E1F4 80 ED AD 00 */ lwz r7, lbl_805A98C0@sda21(r13) +/* 80381298 0037E1F8 A0 A1 00 20 */ lhz r5, 0x20(r1) +/* 8038129C 0037E1FC A0 E7 00 1E */ lhz r7, 0x1e(r7) +/* 803812A0 0037E200 7C E7 1E 70 */ srawi r7, r7, 3 +/* 803812A4 0037E204 7C E7 01 94 */ addze r7, r7 +/* 803812A8 0037E208 54 E7 28 34 */ slwi r7, r7, 5 +/* 803812AC 0037E20C 7C E8 0E 70 */ srawi r8, r7, 1 +/* 803812B0 0037E210 7D 08 01 94 */ addze r8, r8 +/* 803812B4 0037E214 7D 27 1E 70 */ srawi r7, r9, 3 +/* 803812B8 0037E218 7C E7 01 94 */ addze r7, r7 +/* 803812BC 0037E21C 7D 08 39 D6 */ mullw r8, r8, r7 +/* 803812C0 0037E220 7D 27 1E 70 */ srawi r7, r9, 3 +/* 803812C4 0037E224 7C E7 01 94 */ addze r7, r7 +/* 803812C8 0037E228 54 E7 18 38 */ slwi r7, r7, 3 +/* 803812CC 0037E22C 7D 04 42 14 */ add r8, r4, r8 +/* 803812D0 0037E230 7C E7 48 10 */ subfc r7, r7, r9 +/* 803812D4 0037E234 7D 08 02 14 */ add r8, r8, r0 +/* 803812D8 0037E238 54 E7 08 3C */ slwi r7, r7, 1 +/* 803812DC 0037E23C 7D 08 3A 14 */ add r8, r8, r7 +/* 803812E0 0037E240 7D 08 1A 14 */ add r8, r8, r3 +/* 803812E4 0037E244 B0 A8 00 00 */ sth r5, 0(r8) +/* 803812E8 0037E248 80 AD AD 00 */ lwz r5, lbl_805A98C0@sda21(r13) +/* 803812EC 0037E24C A0 A5 00 1E */ lhz r5, 0x1e(r5) +/* 803812F0 0037E250 7C A5 1E 70 */ srawi r5, r5, 3 +/* 803812F4 0037E254 7C A5 01 94 */ addze r5, r5 +/* 803812F8 0037E258 54 A5 28 34 */ slwi r5, r5, 5 +/* 803812FC 0037E25C 7C A7 0E 70 */ srawi r7, r5, 1 +/* 80381300 0037E260 7C E7 01 94 */ addze r7, r7 +/* 80381304 0037E264 7C C5 1E 70 */ srawi r5, r6, 3 +/* 80381308 0037E268 7C A5 01 94 */ addze r5, r5 +/* 8038130C 0037E26C 7C A7 29 D6 */ mullw r5, r7, r5 +/* 80381310 0037E270 7C E4 2A 14 */ add r7, r4, r5 +/* 80381314 0037E274 7C C5 1E 70 */ srawi r5, r6, 3 +/* 80381318 0037E278 A0 81 00 22 */ lhz r4, 0x22(r1) +/* 8038131C 0037E27C 7C A5 01 94 */ addze r5, r5 +/* 80381320 0037E280 54 A5 18 38 */ slwi r5, r5, 3 +/* 80381324 0037E284 7C A5 30 10 */ subfc r5, r5, r6 +/* 80381328 0037E288 7C E7 02 14 */ add r7, r7, r0 +/* 8038132C 0037E28C 54 A0 08 3C */ slwi r0, r5, 1 +/* 80381330 0037E290 7C E7 02 14 */ add r7, r7, r0 +/* 80381334 0037E294 7C E7 1A 14 */ add r7, r7, r3 +/* 80381338 0037E298 B0 87 00 00 */ sth r4, 0(r7) +lbl_8038133C: +/* 8038133C 0037E29C 7F E3 FB 78 */ mr r3, r31 +/* 80381340 0037E2A0 80 01 00 44 */ lwz r0, 0x44(r1) +/* 80381344 0037E2A4 83 E1 00 3C */ lwz r31, 0x3c(r1) +/* 80381348 0037E2A8 83 C1 00 38 */ lwz r30, 0x38(r1) +/* 8038134C 0037E2AC 83 A1 00 34 */ lwz r29, 0x34(r1) +/* 80381350 0037E2B0 38 21 00 40 */ addi r1, r1, 0x40 +/* 80381354 0037E2B4 7C 08 03 A6 */ mtlr r0 +/* 80381358 0037E2B8 4E 80 00 20 */ blr + +.global sub_8038135c +sub_8038135c: +/* 8038135C 0037E2BC 7C 08 02 A6 */ mflr r0 +/* 80381360 0037E2C0 90 01 00 04 */ stw r0, 4(r1) +/* 80381364 0037E2C4 94 21 FF A0 */ stwu r1, -0x60(r1) +/* 80381368 0037E2C8 BE 21 00 24 */ stmw r17, 0x24(r1) +/* 8038136C 0037E2CC 7C 7C 1B 78 */ mr r28, r3 +/* 80381370 0037E2D0 3B A4 00 00 */ addi r29, r4, 0 +/* 80381374 0037E2D4 3B C5 00 00 */ addi r30, r5, 0 +/* 80381378 0037E2D8 3B 06 00 00 */ addi r24, r6, 0 +/* 8038137C 0037E2DC 3B E7 00 00 */ addi r31, r7, 0 +/* 80381380 0037E2E0 88 03 00 00 */ lbz r0, 0(r3) +/* 80381384 0037E2E4 28 00 00 00 */ cmplwi r0, 0 +/* 80381388 0037E2E8 7C 03 03 78 */ mr r3, r0 +/* 8038138C 0037E2EC 40 82 00 0C */ bne lbl_80381398 +/* 80381390 0037E2F0 7F 83 E3 78 */ mr r3, r28 +/* 80381394 0037E2F4 48 00 02 B8 */ b lbl_8038164C +lbl_80381398: +/* 80381398 0037E2F8 A0 0D 9F 88 */ lhz r0, lbl_805A8B48@sda21(r13) +/* 8038139C 0037E2FC 3B 9C 00 01 */ addi r28, r28, 1 +/* 803813A0 0037E300 28 00 00 01 */ cmplwi r0, 1 +/* 803813A4 0037E304 41 81 00 08 */ bgt lbl_803813AC +/* 803813A8 0037E308 48 00 00 4C */ b lbl_803813F4 +lbl_803813AC: +/* 803813AC 0037E30C 3C 80 80 00 */ lis r4, 0x800000CC@ha +/* 803813B0 0037E310 80 04 00 CC */ lwz r0, 0x800000CC@l(r4) +/* 803813B4 0037E314 2C 00 00 00 */ cmpwi r0, 0 +/* 803813B8 0037E318 41 82 00 0C */ beq lbl_803813C4 +/* 803813BC 0037E31C 41 80 00 2C */ blt lbl_803813E8 +/* 803813C0 0037E320 48 00 00 28 */ b lbl_803813E8 +lbl_803813C4: +/* 803813C4 0037E324 3C 80 CC 00 */ lis r4, 0xCC00206E@ha +/* 803813C8 0037E328 A0 04 20 6E */ lhz r0, 0xCC00206E@l(r4) +/* 803813CC 0037E32C 54 00 07 BD */ rlwinm. r0, r0, 0, 0x1e, 0x1e +/* 803813D0 0037E330 41 82 00 0C */ beq lbl_803813DC +/* 803813D4 0037E334 38 00 00 01 */ li r0, 1 +/* 803813D8 0037E338 48 00 00 08 */ b lbl_803813E0 +lbl_803813DC: +/* 803813DC 0037E33C 38 00 00 00 */ li r0, 0 +lbl_803813E0: +/* 803813E0 0037E340 B0 0D 9F 88 */ sth r0, lbl_805A8B48@sda21(r13) +/* 803813E4 0037E344 48 00 00 0C */ b lbl_803813F0 +lbl_803813E8: +/* 803813E8 0037E348 38 00 00 00 */ li r0, 0 +/* 803813EC 0037E34C B0 0D 9F 88 */ sth r0, lbl_805A8B48@sda21(r13) +lbl_803813F0: +/* 803813F0 0037E350 A0 0D 9F 88 */ lhz r0, lbl_805A8B48@sda21(r13) +lbl_803813F4: +/* 803813F4 0037E354 54 00 04 3E */ clrlwi r0, r0, 0x10 +/* 803813F8 0037E358 28 00 00 01 */ cmplwi r0, 1 +/* 803813FC 0037E35C 40 82 00 74 */ bne lbl_80381470 +/* 80381400 0037E360 54 60 06 3E */ clrlwi r0, r3, 0x18 +/* 80381404 0037E364 28 00 00 81 */ cmplwi r0, 0x81 +/* 80381408 0037E368 38 80 00 01 */ li r4, 1 +/* 8038140C 0037E36C 38 A0 00 00 */ li r5, 0 +/* 80381410 0037E370 41 80 00 10 */ blt lbl_80381420 +/* 80381414 0037E374 28 00 00 9F */ cmplwi r0, 0x9f +/* 80381418 0037E378 41 81 00 08 */ bgt lbl_80381420 +/* 8038141C 0037E37C 7C 85 23 78 */ mr r5, r4 +lbl_80381420: +/* 80381420 0037E380 2C 05 00 00 */ cmpwi r5, 0 +/* 80381424 0037E384 40 82 00 2C */ bne lbl_80381450 +/* 80381428 0037E388 54 60 06 3E */ clrlwi r0, r3, 0x18 +/* 8038142C 0037E38C 28 00 00 E0 */ cmplwi r0, 0xe0 +/* 80381430 0037E390 38 A0 00 00 */ li r5, 0 +/* 80381434 0037E394 41 80 00 10 */ blt lbl_80381444 +/* 80381438 0037E398 28 00 00 FC */ cmplwi r0, 0xfc +/* 8038143C 0037E39C 41 81 00 08 */ bgt lbl_80381444 +/* 80381440 0037E3A0 38 A0 00 01 */ li r5, 1 +lbl_80381444: +/* 80381444 0037E3A4 2C 05 00 00 */ cmpwi r5, 0 +/* 80381448 0037E3A8 40 82 00 08 */ bne lbl_80381450 +/* 8038144C 0037E3AC 38 80 00 00 */ li r4, 0 +lbl_80381450: +/* 80381450 0037E3B0 2C 04 00 00 */ cmpwi r4, 0 +/* 80381454 0037E3B4 41 82 00 1C */ beq lbl_80381470 +/* 80381458 0037E3B8 88 9C 00 00 */ lbz r4, 0(r28) +/* 8038145C 0037E3BC 7C 80 07 75 */ extsb. r0, r4 +/* 80381460 0037E3C0 41 82 00 10 */ beq lbl_80381470 +/* 80381464 0037E3C4 54 60 42 2E */ rlwinm r0, r3, 8, 8, 0x17 +/* 80381468 0037E3C8 7C 03 23 78 */ or r3, r0, r4 +/* 8038146C 0037E3CC 3B 9C 00 01 */ addi r28, r28, 1 +lbl_80381470: +/* 80381470 0037E3D0 80 8D AD 00 */ lwz r4, lbl_805A98C0@sda21(r13) +/* 80381474 0037E3D4 3B 24 00 2C */ addi r25, r4, 0x2c +/* 80381478 0037E3D8 4B FF F7 BD */ bl sub_80380c34 +/* 8038147C 0037E3DC 80 CD AD 0C */ lwz r6, lbl_805A98CC@sda21(r13) +/* 80381480 0037E3E0 57 00 10 3A */ slwi r0, r24, 2 +/* 80381484 0037E3E4 81 8D AD 00 */ lwz r12, lbl_805A98C0@sda21(r13) +/* 80381488 0037E3E8 7C 00 1E 70 */ srawi r0, r0, 3 +/* 8038148C 0037E3EC 7D 63 33 D6 */ divw r11, r3, r6 +/* 80381490 0037E3F0 80 8C 00 14 */ lwz r4, 0x14(r12) +/* 80381494 0037E3F4 80 AC 00 24 */ lwz r5, 0x24(r12) +/* 80381498 0037E3F8 A1 2C 00 1A */ lhz r9, 0x1a(r12) +/* 8038149C 0037E3FC A0 EC 00 12 */ lhz r7, 0x12(r12) +/* 803814A0 0037E400 7D 0B 31 D6 */ mullw r8, r11, r6 +/* 803814A4 0037E404 A0 CC 00 10 */ lhz r6, 0x10(r12) +/* 803814A8 0037E408 7E 28 18 50 */ subf r17, r8, r3 +/* 803814AC 0037E40C 7D 51 4B D6 */ divw r10, r17, r9 +/* 803814B0 0037E410 7D 0A 49 D6 */ mullw r8, r10, r9 +/* 803814B4 0037E414 7C 8B 21 D6 */ mullw r4, r11, r4 +/* 803814B8 0037E418 7D 68 88 50 */ subf r11, r8, r17 +/* 803814BC 0037E41C 7C 00 01 94 */ addze r0, r0 +/* 803814C0 0037E420 7D 4A 39 D6 */ mullw r10, r10, r7 +/* 803814C4 0037E424 7D 6B 31 D6 */ mullw r11, r11, r6 +/* 803814C8 0037E428 7F 0C 2A 14 */ add r24, r12, r5 +/* 803814CC 0037E42C 54 84 F8 7E */ srwi r4, r4, 1 +/* 803814D0 0037E430 7F 18 22 14 */ add r24, r24, r4 +/* 803814D4 0037E434 54 07 28 34 */ slwi r7, r0, 5 +/* 803814D8 0037E438 3B 60 00 00 */ li r27, 0 +/* 803814DC 0037E43C 48 00 01 48 */ b lbl_80381624 +lbl_803814E0: +/* 803814E0 0037E440 7C 8A DA 14 */ add r4, r10, r27 +/* 803814E4 0037E444 7C 80 1E 70 */ srawi r0, r4, 3 +/* 803814E8 0037E448 7C 00 01 94 */ addze r0, r0 +/* 803814EC 0037E44C 7C 88 1E 70 */ srawi r8, r4, 3 +/* 803814F0 0037E450 7D 08 01 94 */ addze r8, r8 +/* 803814F4 0037E454 55 08 18 38 */ slwi r8, r8, 3 +/* 803814F8 0037E458 7D 08 20 10 */ subfc r8, r8, r4 +/* 803814FC 0037E45C 7F 64 1E 70 */ srawi r4, r27, 3 +/* 80381500 0037E460 7C 84 01 94 */ addze r4, r4 +/* 80381504 0037E464 7C A4 39 D6 */ mullw r5, r4, r7 +/* 80381508 0037E468 7F 66 1E 70 */ srawi r6, r27, 3 +/* 8038150C 0037E46C 7C C6 01 94 */ addze r6, r6 +/* 80381510 0037E470 54 C6 18 38 */ slwi r6, r6, 3 +/* 80381514 0037E474 7C C6 D8 10 */ subfc r6, r6, r27 +/* 80381518 0037E478 55 04 08 3C */ slwi r4, r8, 1 +/* 8038151C 0037E47C 7C BD 2A 14 */ add r5, r29, r5 +/* 80381520 0037E480 54 C6 10 3A */ slwi r6, r6, 2 +/* 80381524 0037E484 39 80 00 00 */ li r12, 0 +/* 80381528 0037E488 48 00 00 E8 */ b lbl_80381610 +lbl_8038152C: +/* 8038152C 0037E48C A1 29 00 1E */ lhz r9, 0x1e(r9) +/* 80381530 0037E490 7E AB 62 14 */ add r21, r11, r12 +/* 80381534 0037E494 7D 1E 62 14 */ add r8, r30, r12 +/* 80381538 0037E498 7D 29 1E 70 */ srawi r9, r9, 3 +/* 8038153C 0037E49C 7D 29 01 94 */ addze r9, r9 +/* 80381540 0037E4A0 55 29 28 34 */ slwi r9, r9, 5 +/* 80381544 0037E4A4 7D 32 0E 70 */ srawi r18, r9, 1 +/* 80381548 0037E4A8 7E 52 01 94 */ addze r18, r18 +/* 8038154C 0037E4AC 7E B3 1E 70 */ srawi r19, r21, 3 +/* 80381550 0037E4B0 7E 73 01 94 */ addze r19, r19 +/* 80381554 0037E4B4 7E A9 1E 70 */ srawi r9, r21, 3 +/* 80381558 0037E4B8 7D 29 01 94 */ addze r9, r9 +/* 8038155C 0037E4BC 55 29 18 38 */ slwi r9, r9, 3 +/* 80381560 0037E4C0 7D 29 A8 10 */ subfc r9, r9, r21 +/* 80381564 0037E4C4 7D 34 16 70 */ srawi r20, r9, 2 +/* 80381568 0037E4C8 7E 94 01 94 */ addze r20, r20 +/* 8038156C 0037E4CC 7E BA 16 70 */ srawi r26, r21, 2 +/* 80381570 0037E4D0 7F 5A 01 94 */ addze r26, r26 +/* 80381574 0037E4D4 57 5A 10 3A */ slwi r26, r26, 2 +/* 80381578 0037E4D8 7F 5A A8 10 */ subfc r26, r26, r21 +/* 8038157C 0037E4DC 7D 15 1E 70 */ srawi r21, r8, 3 +/* 80381580 0037E4E0 7E B5 01 94 */ addze r21, r21 +/* 80381584 0037E4E4 7D 09 1E 70 */ srawi r9, r8, 3 +/* 80381588 0037E4E8 7D 29 01 94 */ addze r9, r9 +/* 8038158C 0037E4EC 55 29 18 38 */ slwi r9, r9, 3 +/* 80381590 0037E4F0 7E 52 01 D6 */ mullw r18, r18, r0 +/* 80381594 0037E4F4 7D 29 40 10 */ subfc r9, r9, r8 +/* 80381598 0037E4F8 7D 36 0E 70 */ srawi r22, r9, 1 +/* 8038159C 0037E4FC 7E D6 01 94 */ addze r22, r22 +/* 803815A0 0037E500 7D 17 0E 70 */ srawi r23, r8, 1 +/* 803815A4 0037E504 7E F7 01 94 */ addze r23, r23 +/* 803815A8 0037E508 56 A9 28 34 */ slwi r9, r21, 5 +/* 803815AC 0037E50C 56 F7 08 3C */ slwi r23, r23, 1 +/* 803815B0 0037E510 7D 25 4A 14 */ add r9, r5, r9 +/* 803815B4 0037E514 7D 29 32 14 */ add r9, r9, r6 +/* 803815B8 0037E518 7E 38 92 14 */ add r17, r24, r18 +/* 803815BC 0037E51C 56 75 20 36 */ slwi r21, r19, 4 +/* 803815C0 0037E520 7E 31 AA 14 */ add r17, r17, r21 +/* 803815C4 0037E524 7E 31 22 14 */ add r17, r17, r4 +/* 803815C8 0037E528 7E F7 40 11 */ subfc. r23, r23, r8 +/* 803815CC 0037E52C 7E 31 A2 14 */ add r17, r17, r20 +/* 803815D0 0037E530 7D 29 B2 14 */ add r9, r9, r22 +/* 803815D4 0037E534 41 82 00 0C */ beq lbl_803815E0 +/* 803815D8 0037E538 3A 40 00 0F */ li r18, 0xf +/* 803815DC 0037E53C 48 00 00 08 */ b lbl_803815E4 +lbl_803815E0: +/* 803815E0 0037E540 3A 40 00 F0 */ li r18, 0xf0 +lbl_803815E4: +/* 803815E4 0037E544 57 48 08 3C */ slwi r8, r26, 1 +/* 803815E8 0037E548 8B 51 00 00 */ lbz r26, 0(r17) +/* 803815EC 0037E54C 21 08 00 06 */ subfic r8, r8, 6 +/* 803815F0 0037E550 8A E9 00 00 */ lbz r23, 0(r9) +/* 803815F4 0037E554 7F 48 46 30 */ sraw r8, r26, r8 +/* 803815F8 0037E558 55 08 07 BE */ clrlwi r8, r8, 0x1e +/* 803815FC 0037E55C 7D 19 40 AE */ lbzx r8, r25, r8 +/* 80381600 0037E560 39 8C 00 01 */ addi r12, r12, 1 +/* 80381604 0037E564 7D 08 90 38 */ and r8, r8, r18 +/* 80381608 0037E568 7E E8 43 78 */ or r8, r23, r8 +/* 8038160C 0037E56C 99 09 00 00 */ stb r8, 0(r9) +lbl_80381610: +/* 80381610 0037E570 81 2D AD 00 */ lwz r9, lbl_805A98C0@sda21(r13) +/* 80381614 0037E574 A1 09 00 10 */ lhz r8, 0x10(r9) +/* 80381618 0037E578 7C 0C 40 00 */ cmpw r12, r8 +/* 8038161C 0037E57C 41 80 FF 10 */ blt lbl_8038152C +/* 80381620 0037E580 3B 7B 00 01 */ addi r27, r27, 1 +lbl_80381624: +/* 80381624 0037E584 80 8D AD 00 */ lwz r4, lbl_805A98C0@sda21(r13) +/* 80381628 0037E588 A0 04 00 12 */ lhz r0, 0x12(r4) +/* 8038162C 0037E58C 7C 1B 00 00 */ cmpw r27, r0 +/* 80381630 0037E590 41 80 FE B0 */ blt lbl_803814E0 +/* 80381634 0037E594 28 1F 00 00 */ cmplwi r31, 0 +/* 80381638 0037E598 41 82 00 10 */ beq lbl_80381648 +/* 8038163C 0037E59C 80 8D AD 08 */ lwz r4, lbl_805A98C8@sda21(r13) +/* 80381640 0037E5A0 7C 04 18 AE */ lbzx r0, r4, r3 +/* 80381644 0037E5A4 90 1F 00 00 */ stw r0, 0(r31) +lbl_80381648: +/* 80381648 0037E5A8 7F 83 E3 78 */ mr r3, r28 +lbl_8038164C: +/* 8038164C 0037E5AC BA 21 00 24 */ lmw r17, 0x24(r1) +/* 80381650 0037E5B0 80 01 00 64 */ lwz r0, 0x64(r1) +/* 80381654 0037E5B4 38 21 00 60 */ addi r1, r1, 0x60 +/* 80381658 0037E5B8 7C 08 03 A6 */ mtlr r0 +/* 8038165C 0037E5BC 4E 80 00 20 */ blr diff --git a/asm/Dolphin/OS/OSInterrupt.s b/asm/Dolphin/OS/OSInterrupt.s new file mode 100644 index 00000000..bb2e6466 --- /dev/null +++ b/asm/Dolphin/OS/OSInterrupt.s @@ -0,0 +1,662 @@ +.include "macros.inc" + +.section .text, "ax" + +.global OSDisableInterrupts +OSDisableInterrupts: +.global __RAS_OSDisableInterrupts_begin +__RAS_OSDisableInterrupts_begin: +/* 80381660 0037E5C0 7C 60 00 A6 */ mfmsr r3 +/* 80381664 0037E5C4 54 64 04 5E */ rlwinm r4, r3, 0, 0x11, 0xf +/* 80381668 0037E5C8 7C 80 01 24 */ mtmsr r4 +.global __RAS_OSDisableInterrupts_end +__RAS_OSDisableInterrupts_end: +/* 8038166C 0037E5CC 54 63 8F FE */ rlwinm r3, r3, 0x11, 0x1f, 0x1f +/* 80381670 0037E5D0 4E 80 00 20 */ blr + +.global OSEnableInterrupts +OSEnableInterrupts: +/* 80381674 0037E5D4 7C 60 00 A6 */ mfmsr r3 +/* 80381678 0037E5D8 60 64 80 00 */ ori r4, r3, 0x8000 +/* 8038167C 0037E5DC 7C 80 01 24 */ mtmsr r4 +/* 80381680 0037E5E0 54 63 8F FE */ rlwinm r3, r3, 0x11, 0x1f, 0x1f +/* 80381684 0037E5E4 4E 80 00 20 */ blr + +.global OSRestoreInterrupts +OSRestoreInterrupts: +/* 80381688 0037E5E8 2C 03 00 00 */ cmpwi r3, 0 +/* 8038168C 0037E5EC 7C 80 00 A6 */ mfmsr r4 +/* 80381690 0037E5F0 41 82 00 0C */ beq lbl_8038169C +/* 80381694 0037E5F4 60 85 80 00 */ ori r5, r4, 0x8000 +/* 80381698 0037E5F8 48 00 00 08 */ b lbl_803816A0 +lbl_8038169C: +/* 8038169C 0037E5FC 54 85 04 5E */ rlwinm r5, r4, 0, 0x11, 0xf +lbl_803816A0: +/* 803816A0 0037E600 7C A0 01 24 */ mtmsr r5 +/* 803816A4 0037E604 54 83 8F FE */ rlwinm r3, r4, 0x11, 0x1f, 0x1f +/* 803816A8 0037E608 4E 80 00 20 */ blr + +.global __OSSetInterruptHandler +__OSSetInterruptHandler: +/* 803816AC 0037E60C 7C 60 07 34 */ extsh r0, r3 +/* 803816B0 0037E610 80 6D AD 10 */ lwz r3, lbl_805A98D0@sda21(r13) +/* 803816B4 0037E614 54 00 10 3A */ slwi r0, r0, 2 +/* 803816B8 0037E618 7C A3 02 14 */ add r5, r3, r0 +/* 803816BC 0037E61C 80 65 00 00 */ lwz r3, 0(r5) +/* 803816C0 0037E620 90 85 00 00 */ stw r4, 0(r5) +/* 803816C4 0037E624 4E 80 00 20 */ blr + +.global __OSGetInterruptHandler +__OSGetInterruptHandler: +/* 803816C8 0037E628 7C 60 07 34 */ extsh r0, r3 +/* 803816CC 0037E62C 80 6D AD 10 */ lwz r3, lbl_805A98D0@sda21(r13) +/* 803816D0 0037E630 54 00 10 3A */ slwi r0, r0, 2 +/* 803816D4 0037E634 7C 63 00 2E */ lwzx r3, r3, r0 +/* 803816D8 0037E638 4E 80 00 20 */ blr + +.global __OSInterruptInit +__OSInterruptInit: +/* 803816DC 0037E63C 7C 08 02 A6 */ mflr r0 +/* 803816E0 0037E640 90 01 00 04 */ stw r0, 4(r1) +/* 803816E4 0037E644 94 21 FF F0 */ stwu r1, -0x10(r1) +/* 803816E8 0037E648 93 E1 00 0C */ stw r31, 0xc(r1) +/* 803816EC 0037E64C 3F E0 80 00 */ lis r31, 0x80003040@ha +/* 803816F0 0037E650 38 1F 30 40 */ addi r0, r31, 0x80003040@l +/* 803816F4 0037E654 90 0D AD 10 */ stw r0, lbl_805A98D0@sda21(r13) +/* 803816F8 0037E658 38 80 00 00 */ li r4, 0 +/* 803816FC 0037E65C 38 A0 00 80 */ li r5, 0x80 +/* 80381700 0037E660 80 6D AD 10 */ lwz r3, lbl_805A98D0@sda21(r13) +/* 80381704 0037E664 4B C8 1C A5 */ bl memset +/* 80381708 0037E668 38 00 00 00 */ li r0, 0 +/* 8038170C 0037E66C 90 1F 00 C4 */ stw r0, 0xc4(r31) +/* 80381710 0037E670 3C 60 CC 00 */ lis r3, 0xCC003000@ha +/* 80381714 0037E674 38 83 30 00 */ addi r4, r3, 0xCC003000@l +/* 80381718 0037E678 90 1F 00 C8 */ stw r0, 0xc8(r31) +/* 8038171C 0037E67C 38 00 00 F0 */ li r0, 0xf0 +/* 80381720 0037E680 38 60 FF E0 */ li r3, -32 +/* 80381724 0037E684 90 04 00 04 */ stw r0, 4(r4) +/* 80381728 0037E688 48 00 03 01 */ bl __OSMaskInterrupts +/* 8038172C 0037E68C 3C 60 80 38 */ lis r3, ExternalInterruptHandler@ha +/* 80381730 0037E690 38 83 1E 7C */ addi r4, r3, ExternalInterruptHandler@l +/* 80381734 0037E694 38 60 00 04 */ li r3, 4 +/* 80381738 0037E698 4B FF C7 91 */ bl __OSSetExceptionHandler +/* 8038173C 0037E69C 80 01 00 14 */ lwz r0, 0x14(r1) +/* 80381740 0037E6A0 83 E1 00 0C */ lwz r31, 0xc(r1) +/* 80381744 0037E6A4 38 21 00 10 */ addi r1, r1, 0x10 +/* 80381748 0037E6A8 7C 08 03 A6 */ mtlr r0 +/* 8038174C 0037E6AC 4E 80 00 20 */ blr + +.global SetInterruptMask +SetInterruptMask: +/* 80381750 0037E6B0 7C 60 00 34 */ cntlzw r0, r3 +/* 80381754 0037E6B4 2C 00 00 0C */ cmpwi r0, 0xc +/* 80381758 0037E6B8 40 80 00 24 */ bge lbl_8038177C +/* 8038175C 0037E6BC 2C 00 00 08 */ cmpwi r0, 8 +/* 80381760 0037E6C0 41 82 00 FC */ beq lbl_8038185C +/* 80381764 0037E6C4 40 80 01 28 */ bge lbl_8038188C +/* 80381768 0037E6C8 2C 00 00 05 */ cmpwi r0, 5 +/* 8038176C 0037E6CC 40 80 00 9C */ bge lbl_80381808 +/* 80381770 0037E6D0 2C 00 00 00 */ cmpwi r0, 0 +/* 80381774 0037E6D4 40 80 00 28 */ bge lbl_8038179C +/* 80381778 0037E6D8 48 00 02 AC */ b lbl_80381A24 +lbl_8038177C: +/* 8038177C 0037E6DC 2C 00 00 11 */ cmpwi r0, 0x11 +/* 80381780 0037E6E0 40 80 00 10 */ bge lbl_80381790 +/* 80381784 0037E6E4 2C 00 00 0F */ cmpwi r0, 0xf +/* 80381788 0037E6E8 40 80 01 A8 */ bge lbl_80381930 +/* 8038178C 0037E6EC 48 00 01 50 */ b lbl_803818DC +lbl_80381790: +/* 80381790 0037E6F0 2C 00 00 1B */ cmpwi r0, 0x1b +/* 80381794 0037E6F4 40 80 02 90 */ bge lbl_80381A24 +/* 80381798 0037E6F8 48 00 01 D8 */ b lbl_80381970 +lbl_8038179C: +/* 8038179C 0037E6FC 54 80 00 00 */ rlwinm r0, r4, 0, 0, 0 +/* 803817A0 0037E700 28 00 00 00 */ cmplwi r0, 0 +/* 803817A4 0037E704 38 A0 00 00 */ li r5, 0 +/* 803817A8 0037E708 40 82 00 08 */ bne lbl_803817B0 +/* 803817AC 0037E70C 60 A5 00 01 */ ori r5, r5, 1 +lbl_803817B0: +/* 803817B0 0037E710 54 80 00 42 */ rlwinm r0, r4, 0, 1, 1 +/* 803817B4 0037E714 28 00 00 00 */ cmplwi r0, 0 +/* 803817B8 0037E718 40 82 00 08 */ bne lbl_803817C0 +/* 803817BC 0037E71C 60 A5 00 02 */ ori r5, r5, 2 +lbl_803817C0: +/* 803817C0 0037E720 54 80 00 84 */ rlwinm r0, r4, 0, 2, 2 +/* 803817C4 0037E724 28 00 00 00 */ cmplwi r0, 0 +/* 803817C8 0037E728 40 82 00 08 */ bne lbl_803817D0 +/* 803817CC 0037E72C 60 A5 00 04 */ ori r5, r5, 4 +lbl_803817D0: +/* 803817D0 0037E730 54 80 00 C6 */ rlwinm r0, r4, 0, 3, 3 +/* 803817D4 0037E734 28 00 00 00 */ cmplwi r0, 0 +/* 803817D8 0037E738 40 82 00 08 */ bne lbl_803817E0 +/* 803817DC 0037E73C 60 A5 00 08 */ ori r5, r5, 8 +lbl_803817E0: +/* 803817E0 0037E740 54 80 01 08 */ rlwinm r0, r4, 0, 4, 4 +/* 803817E4 0037E744 28 00 00 00 */ cmplwi r0, 0 +/* 803817E8 0037E748 40 82 00 08 */ bne lbl_803817F0 +/* 803817EC 0037E74C 60 A5 00 10 */ ori r5, r5, 0x10 +lbl_803817F0: +/* 803817F0 0037E750 3C 80 CC 00 */ lis r4, 0xCC004000@ha +/* 803817F4 0037E754 54 A0 04 3E */ clrlwi r0, r5, 0x10 +/* 803817F8 0037E758 38 84 40 00 */ addi r4, r4, 0xCC004000@l +/* 803817FC 0037E75C B0 04 00 1C */ sth r0, 0x1c(r4) +/* 80381800 0037E760 54 63 01 7E */ clrlwi r3, r3, 5 +/* 80381804 0037E764 48 00 02 20 */ b lbl_80381A24 +lbl_80381808: +/* 80381808 0037E768 3C A0 CC 00 */ lis r5, 0xCC005000@ha +/* 8038180C 0037E76C 38 A5 50 00 */ addi r5, r5, 0xCC005000@l +/* 80381810 0037E770 38 A5 00 0A */ addi r5, r5, 0xa +/* 80381814 0037E774 54 80 01 4A */ rlwinm r0, r4, 0, 5, 5 +/* 80381818 0037E778 A0 C5 00 00 */ lhz r6, 0(r5) +/* 8038181C 0037E77C 28 00 00 00 */ cmplwi r0, 0 +/* 80381820 0037E780 54 C6 07 6C */ rlwinm r6, r6, 0, 0x1d, 0x16 +/* 80381824 0037E784 40 82 00 08 */ bne lbl_8038182C +/* 80381828 0037E788 60 C6 00 10 */ ori r6, r6, 0x10 +lbl_8038182C: +/* 8038182C 0037E78C 54 80 01 8C */ rlwinm r0, r4, 0, 6, 6 +/* 80381830 0037E790 28 00 00 00 */ cmplwi r0, 0 +/* 80381834 0037E794 40 82 00 08 */ bne lbl_8038183C +/* 80381838 0037E798 60 C6 00 40 */ ori r6, r6, 0x40 +lbl_8038183C: +/* 8038183C 0037E79C 54 80 01 CE */ rlwinm r0, r4, 0, 7, 7 +/* 80381840 0037E7A0 28 00 00 00 */ cmplwi r0, 0 +/* 80381844 0037E7A4 40 82 00 08 */ bne lbl_8038184C +/* 80381848 0037E7A8 60 C6 01 00 */ ori r6, r6, 0x100 +lbl_8038184C: +/* 8038184C 0037E7AC 54 C0 04 3E */ clrlwi r0, r6, 0x10 +/* 80381850 0037E7B0 B0 05 00 00 */ sth r0, 0(r5) +/* 80381854 0037E7B4 54 63 02 08 */ rlwinm r3, r3, 0, 8, 4 +/* 80381858 0037E7B8 48 00 01 CC */ b lbl_80381A24 +lbl_8038185C: +/* 8038185C 0037E7BC 54 80 02 10 */ rlwinm r0, r4, 0, 8, 8 +/* 80381860 0037E7C0 3C 80 CC 00 */ lis r4, 0xCC006C00@ha +/* 80381864 0037E7C4 28 00 00 00 */ cmplwi r0, 0 +/* 80381868 0037E7C8 80 A4 6C 00 */ lwz r5, 0xCC006C00@l(r4) +/* 8038186C 0037E7CC 38 00 FF D3 */ li r0, -45 +/* 80381870 0037E7D0 7C A5 00 38 */ and r5, r5, r0 +/* 80381874 0037E7D4 40 82 00 08 */ bne lbl_8038187C +/* 80381878 0037E7D8 60 A5 00 04 */ ori r5, r5, 4 +lbl_8038187C: +/* 8038187C 0037E7DC 3C 80 CC 00 */ lis r4, 0xCC006C00@ha +/* 80381880 0037E7E0 90 A4 6C 00 */ stw r5, 0xCC006C00@l(r4) +/* 80381884 0037E7E4 54 63 02 4E */ rlwinm r3, r3, 0, 9, 7 +/* 80381888 0037E7E8 48 00 01 9C */ b lbl_80381A24 +lbl_8038188C: +/* 8038188C 0037E7EC 54 80 02 52 */ rlwinm r0, r4, 0, 9, 9 +/* 80381890 0037E7F0 3C A0 CC 00 */ lis r5, 0xCC006800@ha +/* 80381894 0037E7F4 28 00 00 00 */ cmplwi r0, 0 +/* 80381898 0037E7F8 80 A5 68 00 */ lwz r5, 0xCC006800@l(r5) +/* 8038189C 0037E7FC 38 00 D3 F0 */ li r0, -11280 +/* 803818A0 0037E800 7C A5 00 38 */ and r5, r5, r0 +/* 803818A4 0037E804 40 82 00 08 */ bne lbl_803818AC +/* 803818A8 0037E808 60 A5 00 01 */ ori r5, r5, 1 +lbl_803818AC: +/* 803818AC 0037E80C 54 80 02 94 */ rlwinm r0, r4, 0, 0xa, 0xa +/* 803818B0 0037E810 28 00 00 00 */ cmplwi r0, 0 +/* 803818B4 0037E814 40 82 00 08 */ bne lbl_803818BC +/* 803818B8 0037E818 60 A5 00 04 */ ori r5, r5, 4 +lbl_803818BC: +/* 803818BC 0037E81C 54 80 02 D6 */ rlwinm r0, r4, 0, 0xb, 0xb +/* 803818C0 0037E820 28 00 00 00 */ cmplwi r0, 0 +/* 803818C4 0037E824 40 82 00 08 */ bne lbl_803818CC +/* 803818C8 0037E828 60 A5 04 00 */ ori r5, r5, 0x400 +lbl_803818CC: +/* 803818CC 0037E82C 3C 80 CC 00 */ lis r4, 0xCC006800@ha +/* 803818D0 0037E830 90 A4 68 00 */ stw r5, 0xCC006800@l(r4) +/* 803818D4 0037E834 54 63 03 10 */ rlwinm r3, r3, 0, 0xc, 8 +/* 803818D8 0037E838 48 00 01 4C */ b lbl_80381A24 +lbl_803818DC: +/* 803818DC 0037E83C 3C A0 CC 00 */ lis r5, 0xCC006800@ha +/* 803818E0 0037E840 38 C5 68 00 */ addi r6, r5, 0xCC006800@l +/* 803818E4 0037E844 38 C6 00 14 */ addi r6, r6, 0x14 +/* 803818E8 0037E848 54 80 03 18 */ rlwinm r0, r4, 0, 0xc, 0xc +/* 803818EC 0037E84C 80 E6 00 00 */ lwz r7, 0(r6) +/* 803818F0 0037E850 38 A0 F3 F0 */ li r5, -3088 +/* 803818F4 0037E854 28 00 00 00 */ cmplwi r0, 0 +/* 803818F8 0037E858 7C E7 28 38 */ and r7, r7, r5 +/* 803818FC 0037E85C 40 82 00 08 */ bne lbl_80381904 +/* 80381900 0037E860 60 E7 00 01 */ ori r7, r7, 1 +lbl_80381904: +/* 80381904 0037E864 54 80 03 5A */ rlwinm r0, r4, 0, 0xd, 0xd +/* 80381908 0037E868 28 00 00 00 */ cmplwi r0, 0 +/* 8038190C 0037E86C 40 82 00 08 */ bne lbl_80381914 +/* 80381910 0037E870 60 E7 00 04 */ ori r7, r7, 4 +lbl_80381914: +/* 80381914 0037E874 54 80 03 9C */ rlwinm r0, r4, 0, 0xe, 0xe +/* 80381918 0037E878 28 00 00 00 */ cmplwi r0, 0 +/* 8038191C 0037E87C 40 82 00 08 */ bne lbl_80381924 +/* 80381920 0037E880 60 E7 04 00 */ ori r7, r7, 0x400 +lbl_80381924: +/* 80381924 0037E884 90 E6 00 00 */ stw r7, 0(r6) +/* 80381928 0037E888 54 63 03 D6 */ rlwinm r3, r3, 0, 0xf, 0xb +/* 8038192C 0037E88C 48 00 00 F8 */ b lbl_80381A24 +lbl_80381930: +/* 80381930 0037E890 3C A0 CC 00 */ lis r5, 0xCC006800@ha +/* 80381934 0037E894 38 A5 68 00 */ addi r5, r5, 0xCC006800@l +/* 80381938 0037E898 38 A5 00 28 */ addi r5, r5, 0x28 +/* 8038193C 0037E89C 54 80 03 DE */ rlwinm r0, r4, 0, 0xf, 0xf +/* 80381940 0037E8A0 80 C5 00 00 */ lwz r6, 0(r5) +/* 80381944 0037E8A4 28 00 00 00 */ cmplwi r0, 0 +/* 80381948 0037E8A8 54 C6 00 36 */ rlwinm r6, r6, 0, 0, 0x1b +/* 8038194C 0037E8AC 40 82 00 08 */ bne lbl_80381954 +/* 80381950 0037E8B0 60 C6 00 01 */ ori r6, r6, 1 +lbl_80381954: +/* 80381954 0037E8B4 54 80 04 20 */ rlwinm r0, r4, 0, 0x10, 0x10 +/* 80381958 0037E8B8 28 00 00 00 */ cmplwi r0, 0 +/* 8038195C 0037E8BC 40 82 00 08 */ bne lbl_80381964 +/* 80381960 0037E8C0 60 C6 00 04 */ ori r6, r6, 4 +lbl_80381964: +/* 80381964 0037E8C4 90 C5 00 00 */ stw r6, 0(r5) +/* 80381968 0037E8C8 54 63 04 5C */ rlwinm r3, r3, 0, 0x11, 0xe +/* 8038196C 0037E8CC 48 00 00 B8 */ b lbl_80381A24 +lbl_80381970: +/* 80381970 0037E8D0 54 80 04 62 */ rlwinm r0, r4, 0, 0x11, 0x11 +/* 80381974 0037E8D4 28 00 00 00 */ cmplwi r0, 0 +/* 80381978 0037E8D8 38 A0 00 F0 */ li r5, 0xf0 +/* 8038197C 0037E8DC 40 82 00 08 */ bne lbl_80381984 +/* 80381980 0037E8E0 60 A5 08 00 */ ori r5, r5, 0x800 +lbl_80381984: +/* 80381984 0037E8E4 54 80 05 28 */ rlwinm r0, r4, 0, 0x14, 0x14 +/* 80381988 0037E8E8 28 00 00 00 */ cmplwi r0, 0 +/* 8038198C 0037E8EC 40 82 00 08 */ bne lbl_80381994 +/* 80381990 0037E8F0 60 A5 00 08 */ ori r5, r5, 8 +lbl_80381994: +/* 80381994 0037E8F4 54 80 05 6A */ rlwinm r0, r4, 0, 0x15, 0x15 +/* 80381998 0037E8F8 28 00 00 00 */ cmplwi r0, 0 +/* 8038199C 0037E8FC 40 82 00 08 */ bne lbl_803819A4 +/* 803819A0 0037E900 60 A5 00 04 */ ori r5, r5, 4 +lbl_803819A4: +/* 803819A4 0037E904 54 80 05 AC */ rlwinm r0, r4, 0, 0x16, 0x16 +/* 803819A8 0037E908 28 00 00 00 */ cmplwi r0, 0 +/* 803819AC 0037E90C 40 82 00 08 */ bne lbl_803819B4 +/* 803819B0 0037E910 60 A5 00 02 */ ori r5, r5, 2 +lbl_803819B4: +/* 803819B4 0037E914 54 80 05 EE */ rlwinm r0, r4, 0, 0x17, 0x17 +/* 803819B8 0037E918 28 00 00 00 */ cmplwi r0, 0 +/* 803819BC 0037E91C 40 82 00 08 */ bne lbl_803819C4 +/* 803819C0 0037E920 60 A5 00 01 */ ori r5, r5, 1 +lbl_803819C4: +/* 803819C4 0037E924 54 80 06 30 */ rlwinm r0, r4, 0, 0x18, 0x18 +/* 803819C8 0037E928 28 00 00 00 */ cmplwi r0, 0 +/* 803819CC 0037E92C 40 82 00 08 */ bne lbl_803819D4 +/* 803819D0 0037E930 60 A5 01 00 */ ori r5, r5, 0x100 +lbl_803819D4: +/* 803819D4 0037E934 54 80 06 72 */ rlwinm r0, r4, 0, 0x19, 0x19 +/* 803819D8 0037E938 28 00 00 00 */ cmplwi r0, 0 +/* 803819DC 0037E93C 40 82 00 08 */ bne lbl_803819E4 +/* 803819E0 0037E940 60 A5 10 00 */ ori r5, r5, 0x1000 +lbl_803819E4: +/* 803819E4 0037E944 54 80 04 A4 */ rlwinm r0, r4, 0, 0x12, 0x12 +/* 803819E8 0037E948 28 00 00 00 */ cmplwi r0, 0 +/* 803819EC 0037E94C 40 82 00 08 */ bne lbl_803819F4 +/* 803819F0 0037E950 60 A5 02 00 */ ori r5, r5, 0x200 +lbl_803819F4: +/* 803819F4 0037E954 54 80 04 E6 */ rlwinm r0, r4, 0, 0x13, 0x13 +/* 803819F8 0037E958 28 00 00 00 */ cmplwi r0, 0 +/* 803819FC 0037E95C 40 82 00 08 */ bne lbl_80381A04 +/* 80381A00 0037E960 60 A5 04 00 */ ori r5, r5, 0x400 +lbl_80381A04: +/* 80381A04 0037E964 54 80 06 B4 */ rlwinm r0, r4, 0, 0x1a, 0x1a +/* 80381A08 0037E968 28 00 00 00 */ cmplwi r0, 0 +/* 80381A0C 0037E96C 40 82 00 08 */ bne lbl_80381A14 +/* 80381A10 0037E970 60 A5 20 00 */ ori r5, r5, 0x2000 +lbl_80381A14: +/* 80381A14 0037E974 3C 80 CC 00 */ lis r4, 0xCC003000@ha +/* 80381A18 0037E978 38 84 30 00 */ addi r4, r4, 0xCC003000@l +/* 80381A1C 0037E97C 90 A4 00 04 */ stw r5, 4(r4) +/* 80381A20 0037E980 54 63 06 E0 */ rlwinm r3, r3, 0, 0x1b, 0x10 +lbl_80381A24: +/* 80381A24 0037E984 4E 80 00 20 */ blr + +.global __OSMaskInterrupts +__OSMaskInterrupts: +/* 80381A28 0037E988 7C 08 02 A6 */ mflr r0 +/* 80381A2C 0037E98C 90 01 00 04 */ stw r0, 4(r1) +/* 80381A30 0037E990 94 21 FF E0 */ stwu r1, -0x20(r1) +/* 80381A34 0037E994 93 E1 00 1C */ stw r31, 0x1c(r1) +/* 80381A38 0037E998 93 C1 00 18 */ stw r30, 0x18(r1) +/* 80381A3C 0037E99C 93 A1 00 14 */ stw r29, 0x14(r1) +/* 80381A40 0037E9A0 7C 7F 1B 78 */ mr r31, r3 +/* 80381A44 0037E9A4 4B FF FC 1D */ bl OSDisableInterrupts +/* 80381A48 0037E9A8 3C 80 80 00 */ lis r4, 0x800000C4@ha +/* 80381A4C 0037E9AC 83 A4 00 C4 */ lwz r29, 0x800000C4@l(r4) +/* 80381A50 0037E9B0 7C 7E 1B 78 */ mr r30, r3 +/* 80381A54 0037E9B4 80 A4 00 C8 */ lwz r5, 0xc8(r4) +/* 80381A58 0037E9B8 7F A0 2B 78 */ or r0, r29, r5 +/* 80381A5C 0037E9BC 7F E3 00 78 */ andc r3, r31, r0 +/* 80381A60 0037E9C0 7F FF EB 78 */ or r31, r31, r29 +/* 80381A64 0037E9C4 93 E4 00 C4 */ stw r31, 0xc4(r4) +/* 80381A68 0037E9C8 7F FF 2B 78 */ or r31, r31, r5 +/* 80381A6C 0037E9CC 48 00 00 04 */ b lbl_80381A70 +lbl_80381A70: +/* 80381A70 0037E9D0 48 00 00 04 */ b lbl_80381A74 +lbl_80381A74: +/* 80381A74 0037E9D4 48 00 00 0C */ b lbl_80381A80 +lbl_80381A78: +/* 80381A78 0037E9D8 7F E4 FB 78 */ mr r4, r31 +/* 80381A7C 0037E9DC 4B FF FC D5 */ bl SetInterruptMask +lbl_80381A80: +/* 80381A80 0037E9E0 28 03 00 00 */ cmplwi r3, 0 +/* 80381A84 0037E9E4 40 82 FF F4 */ bne lbl_80381A78 +/* 80381A88 0037E9E8 7F C3 F3 78 */ mr r3, r30 +/* 80381A8C 0037E9EC 4B FF FB FD */ bl OSRestoreInterrupts +/* 80381A90 0037E9F0 7F A3 EB 78 */ mr r3, r29 +/* 80381A94 0037E9F4 80 01 00 24 */ lwz r0, 0x24(r1) +/* 80381A98 0037E9F8 83 E1 00 1C */ lwz r31, 0x1c(r1) +/* 80381A9C 0037E9FC 83 C1 00 18 */ lwz r30, 0x18(r1) +/* 80381AA0 0037EA00 83 A1 00 14 */ lwz r29, 0x14(r1) +/* 80381AA4 0037EA04 38 21 00 20 */ addi r1, r1, 0x20 +/* 80381AA8 0037EA08 7C 08 03 A6 */ mtlr r0 +/* 80381AAC 0037EA0C 4E 80 00 20 */ blr + +.global __OSUnmaskInterrupts +__OSUnmaskInterrupts: +/* 80381AB0 0037EA10 7C 08 02 A6 */ mflr r0 +/* 80381AB4 0037EA14 90 01 00 04 */ stw r0, 4(r1) +/* 80381AB8 0037EA18 94 21 FF E0 */ stwu r1, -0x20(r1) +/* 80381ABC 0037EA1C 93 E1 00 1C */ stw r31, 0x1c(r1) +/* 80381AC0 0037EA20 93 C1 00 18 */ stw r30, 0x18(r1) +/* 80381AC4 0037EA24 93 A1 00 14 */ stw r29, 0x14(r1) +/* 80381AC8 0037EA28 7C 7F 1B 78 */ mr r31, r3 +/* 80381ACC 0037EA2C 4B FF FB 95 */ bl OSDisableInterrupts +/* 80381AD0 0037EA30 3C 80 80 00 */ lis r4, 0x800000C4@ha +/* 80381AD4 0037EA34 83 A4 00 C4 */ lwz r29, 0x800000C4@l(r4) +/* 80381AD8 0037EA38 7C 7E 1B 78 */ mr r30, r3 +/* 80381ADC 0037EA3C 80 A4 00 C8 */ lwz r5, 0xc8(r4) +/* 80381AE0 0037EA40 7F A0 2B 78 */ or r0, r29, r5 +/* 80381AE4 0037EA44 7F E3 00 38 */ and r3, r31, r0 +/* 80381AE8 0037EA48 7F BF F8 78 */ andc r31, r29, r31 +/* 80381AEC 0037EA4C 93 E4 00 C4 */ stw r31, 0xc4(r4) +/* 80381AF0 0037EA50 7F FF 2B 78 */ or r31, r31, r5 +/* 80381AF4 0037EA54 48 00 00 04 */ b lbl_80381AF8 +lbl_80381AF8: +/* 80381AF8 0037EA58 48 00 00 04 */ b lbl_80381AFC +lbl_80381AFC: +/* 80381AFC 0037EA5C 48 00 00 0C */ b lbl_80381B08 +lbl_80381B00: +/* 80381B00 0037EA60 7F E4 FB 78 */ mr r4, r31 +/* 80381B04 0037EA64 4B FF FC 4D */ bl SetInterruptMask +lbl_80381B08: +/* 80381B08 0037EA68 28 03 00 00 */ cmplwi r3, 0 +/* 80381B0C 0037EA6C 40 82 FF F4 */ bne lbl_80381B00 +/* 80381B10 0037EA70 7F C3 F3 78 */ mr r3, r30 +/* 80381B14 0037EA74 4B FF FB 75 */ bl OSRestoreInterrupts +/* 80381B18 0037EA78 7F A3 EB 78 */ mr r3, r29 +/* 80381B1C 0037EA7C 80 01 00 24 */ lwz r0, 0x24(r1) +/* 80381B20 0037EA80 83 E1 00 1C */ lwz r31, 0x1c(r1) +/* 80381B24 0037EA84 83 C1 00 18 */ lwz r30, 0x18(r1) +/* 80381B28 0037EA88 83 A1 00 14 */ lwz r29, 0x14(r1) +/* 80381B2C 0037EA8C 38 21 00 20 */ addi r1, r1, 0x20 +/* 80381B30 0037EA90 7C 08 03 A6 */ mtlr r0 +/* 80381B34 0037EA94 4E 80 00 20 */ blr + +.global __OSDispatchInterrupt +__OSDispatchInterrupt: +/* 80381B38 0037EA98 7C 08 02 A6 */ mflr r0 +/* 80381B3C 0037EA9C 90 01 00 04 */ stw r0, 4(r1) +/* 80381B40 0037EAA0 94 21 FF D8 */ stwu r1, -0x28(r1) +/* 80381B44 0037EAA4 93 E1 00 24 */ stw r31, 0x24(r1) +/* 80381B48 0037EAA8 93 C1 00 20 */ stw r30, 0x20(r1) +/* 80381B4C 0037EAAC 93 A1 00 1C */ stw r29, 0x1c(r1) +/* 80381B50 0037EAB0 7C 9E 23 78 */ mr r30, r4 +/* 80381B54 0037EAB4 3C 60 CC 00 */ lis r3, 0xCC003000@ha +/* 80381B58 0037EAB8 83 E3 30 00 */ lwz r31, 0xCC003000@l(r3) +/* 80381B5C 0037EABC 57 FF 04 1C */ rlwinm r31, r31, 0, 0x10, 0xe +/* 80381B60 0037EAC0 28 1F 00 00 */ cmplwi r31, 0 +/* 80381B64 0037EAC4 41 82 00 18 */ beq lbl_80381B7C +/* 80381B68 0037EAC8 38 63 30 00 */ addi r3, r3, 0x3000 +/* 80381B6C 0037EACC 80 03 00 04 */ lwz r0, 4(r3) +/* 80381B70 0037EAD0 7F E0 00 38 */ and r0, r31, r0 +/* 80381B74 0037EAD4 28 00 00 00 */ cmplwi r0, 0 +/* 80381B78 0037EAD8 40 82 00 0C */ bne lbl_80381B84 +lbl_80381B7C: +/* 80381B7C 0037EADC 7F C3 F3 78 */ mr r3, r30 +/* 80381B80 0037EAE0 4B FF D9 85 */ bl OSLoadContext +lbl_80381B84: +/* 80381B84 0037EAE4 57 E0 06 30 */ rlwinm r0, r31, 0, 0x18, 0x18 +/* 80381B88 0037EAE8 28 00 00 00 */ cmplwi r0, 0 +/* 80381B8C 0037EAEC 38 00 00 00 */ li r0, 0 +/* 80381B90 0037EAF0 41 82 00 60 */ beq lbl_80381BF0 +/* 80381B94 0037EAF4 3C 60 CC 00 */ lis r3, 0xCC004000@ha +/* 80381B98 0037EAF8 38 63 40 00 */ addi r3, r3, 0xCC004000@l +/* 80381B9C 0037EAFC A0 83 00 1E */ lhz r4, 0x1e(r3) +/* 80381BA0 0037EB00 54 83 07 FE */ clrlwi r3, r4, 0x1f +/* 80381BA4 0037EB04 28 03 00 00 */ cmplwi r3, 0 +/* 80381BA8 0037EB08 41 82 00 08 */ beq lbl_80381BB0 +/* 80381BAC 0037EB0C 64 00 80 00 */ oris r0, r0, 0x8000 +lbl_80381BB0: +/* 80381BB0 0037EB10 54 83 07 BC */ rlwinm r3, r4, 0, 0x1e, 0x1e +/* 80381BB4 0037EB14 28 03 00 00 */ cmplwi r3, 0 +/* 80381BB8 0037EB18 41 82 00 08 */ beq lbl_80381BC0 +/* 80381BBC 0037EB1C 64 00 40 00 */ oris r0, r0, 0x4000 +lbl_80381BC0: +/* 80381BC0 0037EB20 54 83 07 7A */ rlwinm r3, r4, 0, 0x1d, 0x1d +/* 80381BC4 0037EB24 28 03 00 00 */ cmplwi r3, 0 +/* 80381BC8 0037EB28 41 82 00 08 */ beq lbl_80381BD0 +/* 80381BCC 0037EB2C 64 00 20 00 */ oris r0, r0, 0x2000 +lbl_80381BD0: +/* 80381BD0 0037EB30 54 83 07 38 */ rlwinm r3, r4, 0, 0x1c, 0x1c +/* 80381BD4 0037EB34 28 03 00 00 */ cmplwi r3, 0 +/* 80381BD8 0037EB38 41 82 00 08 */ beq lbl_80381BE0 +/* 80381BDC 0037EB3C 64 00 10 00 */ oris r0, r0, 0x1000 +lbl_80381BE0: +/* 80381BE0 0037EB40 54 83 06 F6 */ rlwinm r3, r4, 0, 0x1b, 0x1b +/* 80381BE4 0037EB44 28 03 00 00 */ cmplwi r3, 0 +/* 80381BE8 0037EB48 41 82 00 08 */ beq lbl_80381BF0 +/* 80381BEC 0037EB4C 64 00 08 00 */ oris r0, r0, 0x800 +lbl_80381BF0: +/* 80381BF0 0037EB50 57 E3 06 72 */ rlwinm r3, r31, 0, 0x19, 0x19 +/* 80381BF4 0037EB54 28 03 00 00 */ cmplwi r3, 0 +/* 80381BF8 0037EB58 41 82 00 40 */ beq lbl_80381C38 +/* 80381BFC 0037EB5C 3C 60 CC 00 */ lis r3, 0xCC005000@ha +/* 80381C00 0037EB60 38 63 50 00 */ addi r3, r3, 0xCC005000@l +/* 80381C04 0037EB64 A0 83 00 0A */ lhz r4, 0xa(r3) +/* 80381C08 0037EB68 54 83 07 38 */ rlwinm r3, r4, 0, 0x1c, 0x1c +/* 80381C0C 0037EB6C 28 03 00 00 */ cmplwi r3, 0 +/* 80381C10 0037EB70 41 82 00 08 */ beq lbl_80381C18 +/* 80381C14 0037EB74 64 00 04 00 */ oris r0, r0, 0x400 +lbl_80381C18: +/* 80381C18 0037EB78 54 83 06 B4 */ rlwinm r3, r4, 0, 0x1a, 0x1a +/* 80381C1C 0037EB7C 28 03 00 00 */ cmplwi r3, 0 +/* 80381C20 0037EB80 41 82 00 08 */ beq lbl_80381C28 +/* 80381C24 0037EB84 64 00 02 00 */ oris r0, r0, 0x200 +lbl_80381C28: +/* 80381C28 0037EB88 54 83 06 30 */ rlwinm r3, r4, 0, 0x18, 0x18 +/* 80381C2C 0037EB8C 28 03 00 00 */ cmplwi r3, 0 +/* 80381C30 0037EB90 41 82 00 08 */ beq lbl_80381C38 +/* 80381C34 0037EB94 64 00 01 00 */ oris r0, r0, 0x100 +lbl_80381C38: +/* 80381C38 0037EB98 57 E3 06 B4 */ rlwinm r3, r31, 0, 0x1a, 0x1a +/* 80381C3C 0037EB9C 28 03 00 00 */ cmplwi r3, 0 +/* 80381C40 0037EBA0 41 82 00 1C */ beq lbl_80381C5C +/* 80381C44 0037EBA4 3C 60 CC 00 */ lis r3, 0xCC006C00@ha +/* 80381C48 0037EBA8 80 63 6C 00 */ lwz r3, 0xCC006C00@l(r3) +/* 80381C4C 0037EBAC 54 63 07 38 */ rlwinm r3, r3, 0, 0x1c, 0x1c +/* 80381C50 0037EBB0 28 03 00 00 */ cmplwi r3, 0 +/* 80381C54 0037EBB4 41 82 00 08 */ beq lbl_80381C5C +/* 80381C58 0037EBB8 64 00 00 80 */ oris r0, r0, 0x80 +lbl_80381C5C: +/* 80381C5C 0037EBBC 57 E3 06 F6 */ rlwinm r3, r31, 0, 0x1b, 0x1b +/* 80381C60 0037EBC0 28 03 00 00 */ cmplwi r3, 0 +/* 80381C64 0037EBC4 41 82 00 A4 */ beq lbl_80381D08 +/* 80381C68 0037EBC8 3C 60 CC 00 */ lis r3, 0xCC006800@ha +/* 80381C6C 0037EBCC 80 83 68 00 */ lwz r4, 0xCC006800@l(r3) +/* 80381C70 0037EBD0 54 83 07 BC */ rlwinm r3, r4, 0, 0x1e, 0x1e +/* 80381C74 0037EBD4 28 03 00 00 */ cmplwi r3, 0 +/* 80381C78 0037EBD8 41 82 00 08 */ beq lbl_80381C80 +/* 80381C7C 0037EBDC 64 00 00 40 */ oris r0, r0, 0x40 +lbl_80381C80: +/* 80381C80 0037EBE0 54 83 07 38 */ rlwinm r3, r4, 0, 0x1c, 0x1c +/* 80381C84 0037EBE4 28 03 00 00 */ cmplwi r3, 0 +/* 80381C88 0037EBE8 41 82 00 08 */ beq lbl_80381C90 +/* 80381C8C 0037EBEC 64 00 00 20 */ oris r0, r0, 0x20 +lbl_80381C90: +/* 80381C90 0037EBF0 54 83 05 28 */ rlwinm r3, r4, 0, 0x14, 0x14 +/* 80381C94 0037EBF4 28 03 00 00 */ cmplwi r3, 0 +/* 80381C98 0037EBF8 41 82 00 08 */ beq lbl_80381CA0 +/* 80381C9C 0037EBFC 64 00 00 10 */ oris r0, r0, 0x10 +lbl_80381CA0: +/* 80381CA0 0037EC00 3C 60 CC 00 */ lis r3, 0xCC006800@ha +/* 80381CA4 0037EC04 38 63 68 00 */ addi r3, r3, 0xCC006800@l +/* 80381CA8 0037EC08 80 83 00 14 */ lwz r4, 0x14(r3) +/* 80381CAC 0037EC0C 54 83 07 BC */ rlwinm r3, r4, 0, 0x1e, 0x1e +/* 80381CB0 0037EC10 28 03 00 00 */ cmplwi r3, 0 +/* 80381CB4 0037EC14 41 82 00 08 */ beq lbl_80381CBC +/* 80381CB8 0037EC18 64 00 00 08 */ oris r0, r0, 8 +lbl_80381CBC: +/* 80381CBC 0037EC1C 54 83 07 38 */ rlwinm r3, r4, 0, 0x1c, 0x1c +/* 80381CC0 0037EC20 28 03 00 00 */ cmplwi r3, 0 +/* 80381CC4 0037EC24 41 82 00 08 */ beq lbl_80381CCC +/* 80381CC8 0037EC28 64 00 00 04 */ oris r0, r0, 4 +lbl_80381CCC: +/* 80381CCC 0037EC2C 54 83 05 28 */ rlwinm r3, r4, 0, 0x14, 0x14 +/* 80381CD0 0037EC30 28 03 00 00 */ cmplwi r3, 0 +/* 80381CD4 0037EC34 41 82 00 08 */ beq lbl_80381CDC +/* 80381CD8 0037EC38 64 00 00 02 */ oris r0, r0, 2 +lbl_80381CDC: +/* 80381CDC 0037EC3C 3C 60 CC 00 */ lis r3, 0xCC006800@ha +/* 80381CE0 0037EC40 38 63 68 00 */ addi r3, r3, 0xCC006800@l +/* 80381CE4 0037EC44 80 83 00 28 */ lwz r4, 0x28(r3) +/* 80381CE8 0037EC48 54 83 07 BC */ rlwinm r3, r4, 0, 0x1e, 0x1e +/* 80381CEC 0037EC4C 28 03 00 00 */ cmplwi r3, 0 +/* 80381CF0 0037EC50 41 82 00 08 */ beq lbl_80381CF8 +/* 80381CF4 0037EC54 64 00 00 01 */ oris r0, r0, 1 +lbl_80381CF8: +/* 80381CF8 0037EC58 54 83 07 38 */ rlwinm r3, r4, 0, 0x1c, 0x1c +/* 80381CFC 0037EC5C 28 03 00 00 */ cmplwi r3, 0 +/* 80381D00 0037EC60 41 82 00 08 */ beq lbl_80381D08 +/* 80381D04 0037EC64 60 00 80 00 */ ori r0, r0, 0x8000 +lbl_80381D08: +/* 80381D08 0037EC68 57 E3 04 A4 */ rlwinm r3, r31, 0, 0x12, 0x12 +/* 80381D0C 0037EC6C 28 03 00 00 */ cmplwi r3, 0 +/* 80381D10 0037EC70 41 82 00 08 */ beq lbl_80381D18 +/* 80381D14 0037EC74 60 00 00 20 */ ori r0, r0, 0x20 +lbl_80381D18: +/* 80381D18 0037EC78 57 E3 04 E6 */ rlwinm r3, r31, 0, 0x13, 0x13 +/* 80381D1C 0037EC7C 28 03 00 00 */ cmplwi r3, 0 +/* 80381D20 0037EC80 41 82 00 08 */ beq lbl_80381D28 +/* 80381D24 0037EC84 60 00 00 40 */ ori r0, r0, 0x40 +lbl_80381D28: +/* 80381D28 0037EC88 57 E3 05 6A */ rlwinm r3, r31, 0, 0x15, 0x15 +/* 80381D2C 0037EC8C 28 03 00 00 */ cmplwi r3, 0 +/* 80381D30 0037EC90 41 82 00 08 */ beq lbl_80381D38 +/* 80381D34 0037EC94 60 00 10 00 */ ori r0, r0, 0x1000 +lbl_80381D38: +/* 80381D38 0037EC98 57 E3 05 AC */ rlwinm r3, r31, 0, 0x16, 0x16 +/* 80381D3C 0037EC9C 28 03 00 00 */ cmplwi r3, 0 +/* 80381D40 0037ECA0 41 82 00 08 */ beq lbl_80381D48 +/* 80381D44 0037ECA4 60 00 20 00 */ ori r0, r0, 0x2000 +lbl_80381D48: +/* 80381D48 0037ECA8 57 E3 05 EE */ rlwinm r3, r31, 0, 0x17, 0x17 +/* 80381D4C 0037ECAC 28 03 00 00 */ cmplwi r3, 0 +/* 80381D50 0037ECB0 41 82 00 08 */ beq lbl_80381D58 +/* 80381D54 0037ECB4 60 00 00 80 */ ori r0, r0, 0x80 +lbl_80381D58: +/* 80381D58 0037ECB8 57 E3 07 38 */ rlwinm r3, r31, 0, 0x1c, 0x1c +/* 80381D5C 0037ECBC 28 03 00 00 */ cmplwi r3, 0 +/* 80381D60 0037ECC0 41 82 00 08 */ beq lbl_80381D68 +/* 80381D64 0037ECC4 60 00 08 00 */ ori r0, r0, 0x800 +lbl_80381D68: +/* 80381D68 0037ECC8 57 E3 07 7A */ rlwinm r3, r31, 0, 0x1d, 0x1d +/* 80381D6C 0037ECCC 28 03 00 00 */ cmplwi r3, 0 +/* 80381D70 0037ECD0 41 82 00 08 */ beq lbl_80381D78 +/* 80381D74 0037ECD4 60 00 04 00 */ ori r0, r0, 0x400 +lbl_80381D78: +/* 80381D78 0037ECD8 57 E3 07 BC */ rlwinm r3, r31, 0, 0x1e, 0x1e +/* 80381D7C 0037ECDC 28 03 00 00 */ cmplwi r3, 0 +/* 80381D80 0037ECE0 41 82 00 08 */ beq lbl_80381D88 +/* 80381D84 0037ECE4 60 00 02 00 */ ori r0, r0, 0x200 +lbl_80381D88: +/* 80381D88 0037ECE8 57 E3 05 28 */ rlwinm r3, r31, 0, 0x14, 0x14 +/* 80381D8C 0037ECEC 28 03 00 00 */ cmplwi r3, 0 +/* 80381D90 0037ECF0 41 82 00 08 */ beq lbl_80381D98 +/* 80381D94 0037ECF4 60 00 40 00 */ ori r0, r0, 0x4000 +lbl_80381D98: +/* 80381D98 0037ECF8 57 E3 07 FE */ clrlwi r3, r31, 0x1f +/* 80381D9C 0037ECFC 28 03 00 00 */ cmplwi r3, 0 +/* 80381DA0 0037ED00 41 82 00 08 */ beq lbl_80381DA8 +/* 80381DA4 0037ED04 60 00 01 00 */ ori r0, r0, 0x100 +lbl_80381DA8: +/* 80381DA8 0037ED08 3C 60 80 00 */ lis r3, 0x800000C4@ha +/* 80381DAC 0037ED0C 80 83 00 C4 */ lwz r4, 0x800000C4@l(r3) +/* 80381DB0 0037ED10 80 63 00 C8 */ lwz r3, 0xc8(r3) +/* 80381DB4 0037ED14 7C 83 1B 78 */ or r3, r4, r3 +/* 80381DB8 0037ED18 7C 04 18 78 */ andc r4, r0, r3 +/* 80381DBC 0037ED1C 28 04 00 00 */ cmplwi r4, 0 +/* 80381DC0 0037ED20 41 82 00 98 */ beq lbl_80381E58 +/* 80381DC4 0037ED24 3C 60 80 3F */ lis r3, lbl_803F2260@ha +/* 80381DC8 0037ED28 38 03 22 60 */ addi r0, r3, lbl_803F2260@l +/* 80381DCC 0037ED2C 7C 03 03 78 */ mr r3, r0 +/* 80381DD0 0037ED30 48 00 00 04 */ b lbl_80381DD4 +lbl_80381DD4: +/* 80381DD4 0037ED34 48 00 00 04 */ b lbl_80381DD8 +lbl_80381DD8: +/* 80381DD8 0037ED38 80 03 00 00 */ lwz r0, 0(r3) +/* 80381DDC 0037ED3C 7C 80 00 38 */ and r0, r4, r0 +/* 80381DE0 0037ED40 28 00 00 00 */ cmplwi r0, 0 +/* 80381DE4 0037ED44 41 82 00 10 */ beq lbl_80381DF4 +/* 80381DE8 0037ED48 7C 00 00 34 */ cntlzw r0, r0 +/* 80381DEC 0037ED4C 7C 1D 07 34 */ extsh r29, r0 +/* 80381DF0 0037ED50 48 00 00 0C */ b lbl_80381DFC +lbl_80381DF4: +/* 80381DF4 0037ED54 38 63 00 04 */ addi r3, r3, 4 +/* 80381DF8 0037ED58 4B FF FF E0 */ b lbl_80381DD8 +lbl_80381DFC: +/* 80381DFC 0037ED5C 80 6D AD 10 */ lwz r3, lbl_805A98D0@sda21(r13) +/* 80381E00 0037ED60 57 A0 10 3A */ slwi r0, r29, 2 +/* 80381E04 0037ED64 7F E3 00 2E */ lwzx r31, r3, r0 +/* 80381E08 0037ED68 28 1F 00 00 */ cmplwi r31, 0 +/* 80381E0C 0037ED6C 41 82 00 4C */ beq lbl_80381E58 +/* 80381E10 0037ED70 2C 1D 00 04 */ cmpwi r29, 4 +/* 80381E14 0037ED74 40 81 00 1C */ ble lbl_80381E30 +/* 80381E18 0037ED78 B3 AD AD 18 */ sth r29, lbl_805A98D8@sda21(r13) +/* 80381E1C 0037ED7C 48 00 35 8D */ bl OSGetTime +/* 80381E20 0037ED80 90 8D AD 24 */ stw r4, lbl_805A98E4@sda21(r13) +/* 80381E24 0037ED84 90 6D AD 20 */ stw r3, lbl_805A98E0@sda21(r13) +/* 80381E28 0037ED88 80 1E 01 98 */ lwz r0, 0x198(r30) +/* 80381E2C 0037ED8C 90 0D AD 14 */ stw r0, lbl_805A98D4@sda21(r13) +lbl_80381E30: +/* 80381E30 0037ED90 48 00 27 B1 */ bl OSDisableScheduler +/* 80381E34 0037ED94 7F A3 EB 78 */ mr r3, r29 +/* 80381E38 0037ED98 7F C4 F3 78 */ mr r4, r30 +/* 80381E3C 0037ED9C 7F EC FB 78 */ mr r12, r31 +/* 80381E40 0037EDA0 7D 88 03 A6 */ mtlr r12 +/* 80381E44 0037EDA4 4E 80 00 21 */ blrl +/* 80381E48 0037EDA8 48 00 27 D9 */ bl OSEnableScheduler +/* 80381E4C 0037EDAC 48 00 2C A1 */ bl __OSReschedule +/* 80381E50 0037EDB0 7F C3 F3 78 */ mr r3, r30 +/* 80381E54 0037EDB4 4B FF D6 B1 */ bl OSLoadContext +lbl_80381E58: +/* 80381E58 0037EDB8 7F C3 F3 78 */ mr r3, r30 +/* 80381E5C 0037EDBC 4B FF D6 A9 */ bl OSLoadContext +/* 80381E60 0037EDC0 80 01 00 2C */ lwz r0, 0x2c(r1) +/* 80381E64 0037EDC4 83 E1 00 24 */ lwz r31, 0x24(r1) +/* 80381E68 0037EDC8 83 C1 00 20 */ lwz r30, 0x20(r1) +/* 80381E6C 0037EDCC 83 A1 00 1C */ lwz r29, 0x1c(r1) +/* 80381E70 0037EDD0 38 21 00 28 */ addi r1, r1, 0x28 +/* 80381E74 0037EDD4 7C 08 03 A6 */ mtlr r0 +/* 80381E78 0037EDD8 4E 80 00 20 */ blr + +.global ExternalInterruptHandler +ExternalInterruptHandler: +/* 80381E7C 0037EDDC 90 04 00 00 */ stw r0, 0(r4) +/* 80381E80 0037EDE0 90 24 00 04 */ stw r1, 4(r4) +/* 80381E84 0037EDE4 90 44 00 08 */ stw r2, 8(r4) +/* 80381E88 0037EDE8 BC C4 00 18 */ stmw r6, 0x18(r4) +/* 80381E8C 0037EDEC 7C 11 E2 A6 */ mfspr r0, 0x391 +/* 80381E90 0037EDF0 90 04 01 A8 */ stw r0, 0x1a8(r4) +/* 80381E94 0037EDF4 7C 12 E2 A6 */ mfspr r0, 0x392 +/* 80381E98 0037EDF8 90 04 01 AC */ stw r0, 0x1ac(r4) +/* 80381E9C 0037EDFC 7C 13 E2 A6 */ mfspr r0, 0x393 +/* 80381EA0 0037EE00 90 04 01 B0 */ stw r0, 0x1b0(r4) +/* 80381EA4 0037EE04 7C 14 E2 A6 */ mfspr r0, 0x394 +/* 80381EA8 0037EE08 90 04 01 B4 */ stw r0, 0x1b4(r4) +/* 80381EAC 0037EE0C 7C 15 E2 A6 */ mfspr r0, 0x395 +/* 80381EB0 0037EE10 90 04 01 B8 */ stw r0, 0x1b8(r4) +/* 80381EB4 0037EE14 7C 16 E2 A6 */ mfspr r0, 0x396 +/* 80381EB8 0037EE18 90 04 01 BC */ stw r0, 0x1bc(r4) +/* 80381EBC 0037EE1C 7C 17 E2 A6 */ mfspr r0, 0x397 +/* 80381EC0 0037EE20 90 04 01 C0 */ stw r0, 0x1c0(r4) +/* 80381EC4 0037EE24 94 21 FF F8 */ stwu r1, -8(r1) +/* 80381EC8 0037EE28 4B FF FC 70 */ b __OSDispatchInterrupt + diff --git a/asm/Dolphin/OS/OSLink.s b/asm/Dolphin/OS/OSLink.s new file mode 100644 index 00000000..d923b86f --- /dev/null +++ b/asm/Dolphin/OS/OSLink.s @@ -0,0 +1,709 @@ +.include "macros.inc" + +.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 diff --git a/asm/Dolphin/OS/OSMemory.s b/asm/Dolphin/OS/OSMemory.s new file mode 100644 index 00000000..4aa4b461 --- /dev/null +++ b/asm/Dolphin/OS/OSMemory.s @@ -0,0 +1,416 @@ +.include "macros.inc" + +.section .text, "ax" + +.global sub_80382810 +sub_80382810: +/* 80382810 0037F770 7C 08 02 A6 */ mflr r0 +/* 80382814 0037F774 90 01 00 04 */ stw r0, 4(r1) +/* 80382818 0037F778 94 21 FF D8 */ stwu r1, -0x28(r1) +/* 8038281C 0037F77C 93 E1 00 24 */ stw r31, 0x24(r1) +/* 80382820 0037F780 3B E5 00 00 */ addi r31, r5, 0 +/* 80382824 0037F784 93 C1 00 20 */ stw r30, 0x20(r1) +/* 80382828 0037F788 3B C4 00 00 */ addi r30, r4, 0 +/* 8038282C 0037F78C 93 A1 00 1C */ stw r29, 0x1c(r1) +/* 80382830 0037F790 3B A3 00 00 */ addi r29, r3, 0 +/* 80382834 0037F794 48 00 1D 91 */ bl OSInitThreadQueue +/* 80382838 0037F798 38 7D 00 08 */ addi r3, r29, 8 +/* 8038283C 0037F79C 48 00 1D 89 */ bl OSInitThreadQueue +/* 80382840 0037F7A0 93 DD 00 10 */ stw r30, 0x10(r29) +/* 80382844 0037F7A4 38 00 00 00 */ li r0, 0 +/* 80382848 0037F7A8 93 FD 00 14 */ stw r31, 0x14(r29) +/* 8038284C 0037F7AC 90 1D 00 18 */ stw r0, 0x18(r29) +/* 80382850 0037F7B0 90 1D 00 1C */ stw r0, 0x1c(r29) +/* 80382854 0037F7B4 80 01 00 2C */ lwz r0, 0x2c(r1) +/* 80382858 0037F7B8 83 E1 00 24 */ lwz r31, 0x24(r1) +/* 8038285C 0037F7BC 83 C1 00 20 */ lwz r30, 0x20(r1) +/* 80382860 0037F7C0 83 A1 00 1C */ lwz r29, 0x1c(r1) +/* 80382864 0037F7C4 38 21 00 28 */ addi r1, r1, 0x28 +/* 80382868 0037F7C8 7C 08 03 A6 */ mtlr r0 +/* 8038286C 0037F7CC 4E 80 00 20 */ blr + +.global sub_80382870 +sub_80382870: +/* 80382870 0037F7D0 7C 08 02 A6 */ mflr r0 +/* 80382874 0037F7D4 90 01 00 04 */ stw r0, 4(r1) +/* 80382878 0037F7D8 94 21 FF D8 */ stwu r1, -0x28(r1) +/* 8038287C 0037F7DC 93 E1 00 24 */ stw r31, 0x24(r1) +/* 80382880 0037F7E0 3B E5 00 00 */ addi r31, r5, 0 +/* 80382884 0037F7E4 93 C1 00 20 */ stw r30, 0x20(r1) +/* 80382888 0037F7E8 93 A1 00 1C */ stw r29, 0x1c(r1) +/* 8038288C 0037F7EC 3B A4 00 00 */ addi r29, r4, 0 +/* 80382890 0037F7F0 93 81 00 18 */ stw r28, 0x18(r1) +/* 80382894 0037F7F4 3B 83 00 00 */ addi r28, r3, 0 +/* 80382898 0037F7F8 4B FF ED C9 */ bl OSDisableInterrupts +/* 8038289C 0037F7FC 3B C3 00 00 */ addi r30, r3, 0 +/* 803828A0 0037F800 57 FF 07 FE */ clrlwi r31, r31, 0x1f +/* 803828A4 0037F804 48 00 00 24 */ b lbl_803828C8 +lbl_803828A8: +/* 803828A8 0037F808 2C 1F 00 00 */ cmpwi r31, 0 +/* 803828AC 0037F80C 40 82 00 14 */ bne lbl_803828C0 +/* 803828B0 0037F810 7F C3 F3 78 */ mr r3, r30 +/* 803828B4 0037F814 4B FF ED D5 */ bl OSRestoreInterrupts +/* 803828B8 0037F818 38 60 00 00 */ li r3, 0 +/* 803828BC 0037F81C 48 00 00 5C */ b lbl_80382918 +lbl_803828C0: +/* 803828C0 0037F820 7F 83 E3 78 */ mr r3, r28 +/* 803828C4 0037F824 48 00 28 49 */ bl OSSleepThread +lbl_803828C8: +/* 803828C8 0037F828 80 DC 00 14 */ lwz r6, 0x14(r28) +/* 803828CC 0037F82C 80 9C 00 1C */ lwz r4, 0x1c(r28) +/* 803828D0 0037F830 7C 06 20 00 */ cmpw r6, r4 +/* 803828D4 0037F834 40 81 FF D4 */ ble lbl_803828A8 +/* 803828D8 0037F838 80 1C 00 18 */ lwz r0, 0x18(r28) +/* 803828DC 0037F83C 38 7C 00 08 */ addi r3, r28, 8 +/* 803828E0 0037F840 80 BC 00 10 */ lwz r5, 0x10(r28) +/* 803828E4 0037F844 7C 80 22 14 */ add r4, r0, r4 +/* 803828E8 0037F848 7C 04 33 D6 */ divw r0, r4, r6 +/* 803828EC 0037F84C 7C 00 31 D6 */ mullw r0, r0, r6 +/* 803828F0 0037F850 7C 00 20 50 */ subf r0, r0, r4 +/* 803828F4 0037F854 54 00 10 3A */ slwi r0, r0, 2 +/* 803828F8 0037F858 7F A5 01 2E */ stwx r29, r5, r0 +/* 803828FC 0037F85C 80 9C 00 1C */ lwz r4, 0x1c(r28) +/* 80382900 0037F860 38 04 00 01 */ addi r0, r4, 1 +/* 80382904 0037F864 90 1C 00 1C */ stw r0, 0x1c(r28) +/* 80382908 0037F868 48 00 28 F1 */ bl OSWakeupThread +/* 8038290C 0037F86C 7F C3 F3 78 */ mr r3, r30 +/* 80382910 0037F870 4B FF ED 79 */ bl OSRestoreInterrupts +/* 80382914 0037F874 38 60 00 01 */ li r3, 1 +lbl_80382918: +/* 80382918 0037F878 80 01 00 2C */ lwz r0, 0x2c(r1) +/* 8038291C 0037F87C 83 E1 00 24 */ lwz r31, 0x24(r1) +/* 80382920 0037F880 83 C1 00 20 */ lwz r30, 0x20(r1) +/* 80382924 0037F884 83 A1 00 1C */ lwz r29, 0x1c(r1) +/* 80382928 0037F888 83 81 00 18 */ lwz r28, 0x18(r1) +/* 8038292C 0037F88C 38 21 00 28 */ addi r1, r1, 0x28 +/* 80382930 0037F890 7C 08 03 A6 */ mtlr r0 +/* 80382934 0037F894 4E 80 00 20 */ blr + +.global sub_80382938 +sub_80382938: +/* 80382938 0037F898 7C 08 02 A6 */ mflr r0 +/* 8038293C 0037F89C 90 01 00 04 */ stw r0, 4(r1) +/* 80382940 0037F8A0 94 21 FF D8 */ stwu r1, -0x28(r1) +/* 80382944 0037F8A4 93 E1 00 24 */ stw r31, 0x24(r1) +/* 80382948 0037F8A8 3B E3 00 00 */ addi r31, r3, 0 +/* 8038294C 0037F8AC 93 C1 00 20 */ stw r30, 0x20(r1) +/* 80382950 0037F8B0 3B C5 00 00 */ addi r30, r5, 0 +/* 80382954 0037F8B4 93 A1 00 1C */ stw r29, 0x1c(r1) +/* 80382958 0037F8B8 93 81 00 18 */ stw r28, 0x18(r1) +/* 8038295C 0037F8BC 3B 84 00 00 */ addi r28, r4, 0 +/* 80382960 0037F8C0 4B FF ED 01 */ bl OSDisableInterrupts +/* 80382964 0037F8C4 3B A3 00 00 */ addi r29, r3, 0 +/* 80382968 0037F8C8 57 DE 07 FE */ clrlwi r30, r30, 0x1f +/* 8038296C 0037F8CC 48 00 00 24 */ b lbl_80382990 +lbl_80382970: +/* 80382970 0037F8D0 2C 1E 00 00 */ cmpwi r30, 0 +/* 80382974 0037F8D4 40 82 00 14 */ bne lbl_80382988 +/* 80382978 0037F8D8 7F A3 EB 78 */ mr r3, r29 +/* 8038297C 0037F8DC 4B FF ED 0D */ bl OSRestoreInterrupts +/* 80382980 0037F8E0 38 60 00 00 */ li r3, 0 +/* 80382984 0037F8E4 48 00 00 70 */ b lbl_803829F4 +lbl_80382988: +/* 80382988 0037F8E8 38 7F 00 08 */ addi r3, r31, 8 +/* 8038298C 0037F8EC 48 00 27 81 */ bl OSSleepThread +lbl_80382990: +/* 80382990 0037F8F0 80 1F 00 1C */ lwz r0, 0x1c(r31) +/* 80382994 0037F8F4 2C 00 00 00 */ cmpwi r0, 0 +/* 80382998 0037F8F8 41 82 FF D8 */ beq lbl_80382970 +/* 8038299C 0037F8FC 28 1C 00 00 */ cmplwi r28, 0 +/* 803829A0 0037F900 41 82 00 18 */ beq lbl_803829B8 +/* 803829A4 0037F904 80 1F 00 18 */ lwz r0, 0x18(r31) +/* 803829A8 0037F908 80 7F 00 10 */ lwz r3, 0x10(r31) +/* 803829AC 0037F90C 54 00 10 3A */ slwi r0, r0, 2 +/* 803829B0 0037F910 7C 03 00 2E */ lwzx r0, r3, r0 +/* 803829B4 0037F914 90 1C 00 00 */ stw r0, 0(r28) +lbl_803829B8: +/* 803829B8 0037F918 80 BF 00 18 */ lwz r5, 0x18(r31) +/* 803829BC 0037F91C 7F E3 FB 78 */ mr r3, r31 +/* 803829C0 0037F920 80 9F 00 14 */ lwz r4, 0x14(r31) +/* 803829C4 0037F924 38 A5 00 01 */ addi r5, r5, 1 +/* 803829C8 0037F928 7C 05 23 D6 */ divw r0, r5, r4 +/* 803829CC 0037F92C 7C 00 21 D6 */ mullw r0, r0, r4 +/* 803829D0 0037F930 7C 00 28 50 */ subf r0, r0, r5 +/* 803829D4 0037F934 90 1F 00 18 */ stw r0, 0x18(r31) +/* 803829D8 0037F938 80 9F 00 1C */ lwz r4, 0x1c(r31) +/* 803829DC 0037F93C 38 04 FF FF */ addi r0, r4, -1 +/* 803829E0 0037F940 90 1F 00 1C */ stw r0, 0x1c(r31) +/* 803829E4 0037F944 48 00 28 15 */ bl OSWakeupThread +/* 803829E8 0037F948 7F A3 EB 78 */ mr r3, r29 +/* 803829EC 0037F94C 4B FF EC 9D */ bl OSRestoreInterrupts +/* 803829F0 0037F950 38 60 00 01 */ li r3, 1 +lbl_803829F4: +/* 803829F4 0037F954 80 01 00 2C */ lwz r0, 0x2c(r1) +/* 803829F8 0037F958 83 E1 00 24 */ lwz r31, 0x24(r1) +/* 803829FC 0037F95C 83 C1 00 20 */ lwz r30, 0x20(r1) +/* 80382A00 0037F960 83 A1 00 1C */ lwz r29, 0x1c(r1) +/* 80382A04 0037F964 83 81 00 18 */ lwz r28, 0x18(r1) +/* 80382A08 0037F968 38 21 00 28 */ addi r1, r1, 0x28 +/* 80382A0C 0037F96C 7C 08 03 A6 */ mtlr r0 +/* 80382A10 0037F970 4E 80 00 20 */ blr + +.include "macros.inc" + +.section .text, "ax" + +.global OnReset +OnReset: +/* 80382A14 0037F974 7C 08 02 A6 */ mflr r0 +/* 80382A18 0037F978 2C 03 00 00 */ cmpwi r3, 0 +/* 80382A1C 0037F97C 90 01 00 04 */ stw r0, 4(r1) +/* 80382A20 0037F980 94 21 FF F8 */ stwu r1, -8(r1) +/* 80382A24 0037F984 41 82 00 18 */ beq lbl_80382A3C +/* 80382A28 0037F988 3C 60 CC 00 */ lis r3, 0xCC004010@ha +/* 80382A2C 0037F98C 38 00 00 FF */ li r0, 0xff +/* 80382A30 0037F990 B0 03 40 10 */ sth r0, 0xCC004010@l(r3) +/* 80382A34 0037F994 3C 60 F0 00 */ lis r3, 0xf000 +/* 80382A38 0037F998 4B FF EF F1 */ bl __OSMaskInterrupts +lbl_80382A3C: +/* 80382A3C 0037F99C 38 60 00 01 */ li r3, 1 +/* 80382A40 0037F9A0 80 01 00 0C */ lwz r0, 0xc(r1) +/* 80382A44 0037F9A4 38 21 00 08 */ addi r1, r1, 8 +/* 80382A48 0037F9A8 7C 08 03 A6 */ mtlr r0 +/* 80382A4C 0037F9AC 4E 80 00 20 */ blr + +.global MEMIntrruptHandler +MEMIntrruptHandler: +/* 80382A50 0037F9B0 7C 08 02 A6 */ mflr r0 +/* 80382A54 0037F9B4 3C 60 CC 00 */ lis r3, 0xCC004000@ha +/* 80382A58 0037F9B8 90 01 00 04 */ stw r0, 4(r1) +/* 80382A5C 0037F9BC 39 03 40 00 */ addi r8, r3, 0xCC004000@l +/* 80382A60 0037F9C0 38 00 00 00 */ li r0, 0 +/* 80382A64 0037F9C4 94 21 FF F8 */ stwu r1, -8(r1) +/* 80382A68 0037F9C8 A0 E3 40 24 */ lhz r7, 0x4024(r3) +/* 80382A6C 0037F9CC 3C 60 80 54 */ lis r3, lbl_80541250@ha +/* 80382A70 0037F9D0 A0 C8 00 22 */ lhz r6, 0x22(r8) +/* 80382A74 0037F9D4 38 63 12 50 */ addi r3, r3, lbl_80541250@l +/* 80382A78 0037F9D8 A0 A8 00 1E */ lhz r5, 0x1e(r8) +/* 80382A7C 0037F9DC 50 E6 81 9E */ rlwimi r6, r7, 0x10, 6, 0xf +/* 80382A80 0037F9E0 B0 08 00 20 */ sth r0, 0x20(r8) +/* 80382A84 0037F9E4 81 83 00 3C */ lwz r12, 0x3c(r3) +/* 80382A88 0037F9E8 28 0C 00 00 */ cmplwi r12, 0 +/* 80382A8C 0037F9EC 41 82 00 18 */ beq lbl_80382AA4 +/* 80382A90 0037F9F0 7D 88 03 A6 */ mtlr r12 +/* 80382A94 0037F9F4 38 60 00 0F */ li r3, 0xf +/* 80382A98 0037F9F8 4C C6 31 82 */ crclr 6 +/* 80382A9C 0037F9FC 4E 80 00 21 */ blrl +/* 80382AA0 0037FA00 48 00 00 0C */ b lbl_80382AAC +lbl_80382AA4: +/* 80382AA4 0037FA04 38 60 00 0F */ li r3, 0xf +/* 80382AA8 0037FA08 4B FF D2 C9 */ bl __OSUnhandledException +lbl_80382AAC: +/* 80382AAC 0037FA0C 80 01 00 0C */ lwz r0, 0xc(r1) +/* 80382AB0 0037FA10 38 21 00 08 */ addi r1, r1, 8 +/* 80382AB4 0037FA14 7C 08 03 A6 */ mtlr r0 +/* 80382AB8 0037FA18 4E 80 00 20 */ blr + +.global OSProtectRange +OSProtectRange: +/* 80382ABC 0037FA1C 7C 08 02 A6 */ mflr r0 +/* 80382AC0 0037FA20 90 01 00 04 */ stw r0, 4(r1) +/* 80382AC4 0037FA24 94 21 FF D0 */ stwu r1, -0x30(r1) +/* 80382AC8 0037FA28 BF 41 00 18 */ stmw r26, 0x18(r1) +/* 80382ACC 0037FA2C 3B 43 00 00 */ addi r26, r3, 0 +/* 80382AD0 0037FA30 28 1A 00 04 */ cmplwi r26, 4 +/* 80382AD4 0037FA34 40 80 00 98 */ bge lbl_80382B6C +/* 80382AD8 0037FA38 7C 64 2A 14 */ add r3, r4, r5 +/* 80382ADC 0037FA3C 38 03 03 FF */ addi r0, r3, 0x3ff +/* 80382AE0 0037FA40 54 9B 00 2A */ rlwinm r27, r4, 0, 0, 0x15 +/* 80382AE4 0037FA44 54 1D 00 2A */ rlwinm r29, r0, 0, 0, 0x15 +/* 80382AE8 0037FA48 38 7B 00 00 */ addi r3, r27, 0 +/* 80382AEC 0037FA4C 54 DF 07 BE */ clrlwi r31, r6, 0x1e +/* 80382AF0 0037FA50 7C 9B E8 50 */ subf r4, r27, r29 +/* 80382AF4 0037FA54 4B FF BF BD */ bl DCFlushRange +/* 80382AF8 0037FA58 4B FF EB 69 */ bl OSDisableInterrupts +/* 80382AFC 0037FA5C 3C 00 80 00 */ lis r0, 0x8000 +/* 80382B00 0037FA60 7C 1E D4 30 */ srw r30, r0, r26 +/* 80382B04 0037FA64 3B 83 00 00 */ addi r28, r3, 0 +/* 80382B08 0037FA68 38 7E 00 00 */ addi r3, r30, 0 +/* 80382B0C 0037FA6C 4B FF EF 1D */ bl __OSMaskInterrupts +/* 80382B10 0037FA70 3C 60 CC 00 */ lis r3, 0xCC004000@ha +/* 80382B14 0037FA74 38 A3 40 00 */ addi r5, r3, 0xCC004000@l +/* 80382B18 0037FA78 57 43 10 3A */ slwi r3, r26, 2 +/* 80382B1C 0037FA7C 57 60 B4 3E */ rlwinm r0, r27, 0x16, 0x10, 0x1f +/* 80382B20 0037FA80 7C 05 1B 2E */ sthx r0, r5, r3 +/* 80382B24 0037FA84 57 A4 B4 3E */ rlwinm r4, r29, 0x16, 0x10, 0x1f +/* 80382B28 0037FA88 7C 65 1A 14 */ add r3, r5, r3 +/* 80382B2C 0037FA8C B0 83 00 02 */ sth r4, 2(r3) +/* 80382B30 0037FA90 38 85 00 10 */ addi r4, r5, 0x10 +/* 80382B34 0037FA94 57 46 08 3C */ slwi r6, r26, 1 +/* 80382B38 0037FA98 38 00 00 03 */ li r0, 3 +/* 80382B3C 0037FA9C A0 A5 00 10 */ lhz r5, 0x10(r5) +/* 80382B40 0037FAA0 7C 03 30 30 */ slw r3, r0, r6 +/* 80382B44 0037FAA4 7F E0 30 30 */ slw r0, r31, r6 +/* 80382B48 0037FAA8 7C A5 18 78 */ andc r5, r5, r3 +/* 80382B4C 0037FAAC 7C A5 03 78 */ or r5, r5, r0 +/* 80382B50 0037FAB0 28 1F 00 03 */ cmplwi r31, 3 +/* 80382B54 0037FAB4 B0 A4 00 00 */ sth r5, 0(r4) +/* 80382B58 0037FAB8 41 82 00 0C */ beq lbl_80382B64 +/* 80382B5C 0037FABC 7F C3 F3 78 */ mr r3, r30 +/* 80382B60 0037FAC0 4B FF EF 51 */ bl __OSUnmaskInterrupts +lbl_80382B64: +/* 80382B64 0037FAC4 7F 83 E3 78 */ mr r3, r28 +/* 80382B68 0037FAC8 4B FF EB 21 */ bl OSRestoreInterrupts +lbl_80382B6C: +/* 80382B6C 0037FACC BB 41 00 18 */ lmw r26, 0x18(r1) +/* 80382B70 0037FAD0 80 01 00 34 */ lwz r0, 0x34(r1) +/* 80382B74 0037FAD4 38 21 00 30 */ addi r1, r1, 0x30 +/* 80382B78 0037FAD8 7C 08 03 A6 */ mtlr r0 +/* 80382B7C 0037FADC 4E 80 00 20 */ blr + +.global Config24MB +Config24MB: +/* 80382B80 0037FAE0 38 E0 00 00 */ li r7, 0 +/* 80382B84 0037FAE4 3C 80 00 00 */ lis r4, 0x00000002@ha +/* 80382B88 0037FAE8 38 84 00 02 */ addi r4, r4, 0x00000002@l +/* 80382B8C 0037FAEC 3C 60 80 00 */ lis r3, 0x800001FF@ha +/* 80382B90 0037FAF0 38 63 01 FF */ addi r3, r3, 0x800001FF@l +/* 80382B94 0037FAF4 3C C0 01 00 */ lis r6, 0x01000002@ha +/* 80382B98 0037FAF8 38 C6 00 02 */ addi r6, r6, 0x01000002@l +/* 80382B9C 0037FAFC 3C A0 81 00 */ lis r5, 0x810000FF@ha +/* 80382BA0 0037FB00 38 A5 00 FF */ addi r5, r5, 0x810000FF@l +/* 80382BA4 0037FB04 4C 00 01 2C */ isync +/* 80382BA8 0037FB08 7C F8 83 A6 */ mtdbatu 0, r7 +/* 80382BAC 0037FB0C 7C 99 83 A6 */ mtdbatl 0, r4 +/* 80382BB0 0037FB10 7C 78 83 A6 */ mtdbatu 0, r3 +/* 80382BB4 0037FB14 4C 00 01 2C */ isync +/* 80382BB8 0037FB18 7C F0 83 A6 */ mtibatu 0, r7 +/* 80382BBC 0037FB1C 7C 91 83 A6 */ mtibatl 0, r4 +/* 80382BC0 0037FB20 7C 70 83 A6 */ mtibatu 0, r3 +/* 80382BC4 0037FB24 4C 00 01 2C */ isync +/* 80382BC8 0037FB28 7C FC 83 A6 */ mtdbatu 2, r7 +/* 80382BCC 0037FB2C 7C DD 83 A6 */ mtdbatl 2, r6 +/* 80382BD0 0037FB30 7C BC 83 A6 */ mtdbatu 2, r5 +/* 80382BD4 0037FB34 4C 00 01 2C */ isync +/* 80382BD8 0037FB38 7C F4 83 A6 */ mtibatu 2, r7 +/* 80382BDC 0037FB3C 7C D5 83 A6 */ mtibatl 2, r6 +/* 80382BE0 0037FB40 7C B4 83 A6 */ mtibatu 2, r5 +/* 80382BE4 0037FB44 4C 00 01 2C */ isync +/* 80382BE8 0037FB48 7C 60 00 A6 */ mfmsr r3 +/* 80382BEC 0037FB4C 60 63 00 30 */ ori r3, r3, 0x30 +/* 80382BF0 0037FB50 7C 7B 03 A6 */ mtspr 0x1b, r3 +/* 80382BF4 0037FB54 7C 68 02 A6 */ mflr r3 +/* 80382BF8 0037FB58 7C 7A 03 A6 */ mtspr 0x1a, r3 +/* 80382BFC 0037FB5C 4C 00 00 64 */ rfi + +.global Config48MB +Config48MB: +/* 80382C00 0037FB60 38 E0 00 00 */ li r7, 0 +/* 80382C04 0037FB64 3C 80 00 00 */ lis r4, 0x00000002@ha +/* 80382C08 0037FB68 38 84 00 02 */ addi r4, r4, 0x00000002@l +/* 80382C0C 0037FB6C 3C 60 80 00 */ lis r3, 0x800003FF@ha +/* 80382C10 0037FB70 38 63 03 FF */ addi r3, r3, 0x800003FF@l +/* 80382C14 0037FB74 3C C0 02 00 */ lis r6, 0x02000002@ha +/* 80382C18 0037FB78 38 C6 00 02 */ addi r6, r6, 0x02000002@l +/* 80382C1C 0037FB7C 3C A0 82 00 */ lis r5, 0x820001FF@ha +/* 80382C20 0037FB80 38 A5 01 FF */ addi r5, r5, 0x820001FF@l +/* 80382C24 0037FB84 4C 00 01 2C */ isync +/* 80382C28 0037FB88 7C F8 83 A6 */ mtdbatu 0, r7 +/* 80382C2C 0037FB8C 7C 99 83 A6 */ mtdbatl 0, r4 +/* 80382C30 0037FB90 7C 78 83 A6 */ mtdbatu 0, r3 +/* 80382C34 0037FB94 4C 00 01 2C */ isync +/* 80382C38 0037FB98 7C F0 83 A6 */ mtibatu 0, r7 +/* 80382C3C 0037FB9C 7C 91 83 A6 */ mtibatl 0, r4 +/* 80382C40 0037FBA0 7C 70 83 A6 */ mtibatu 0, r3 +/* 80382C44 0037FBA4 4C 00 01 2C */ isync +/* 80382C48 0037FBA8 7C FC 83 A6 */ mtdbatu 2, r7 +/* 80382C4C 0037FBAC 7C DD 83 A6 */ mtdbatl 2, r6 +/* 80382C50 0037FBB0 7C BC 83 A6 */ mtdbatu 2, r5 +/* 80382C54 0037FBB4 4C 00 01 2C */ isync +/* 80382C58 0037FBB8 7C F4 83 A6 */ mtibatu 2, r7 +/* 80382C5C 0037FBBC 7C D5 83 A6 */ mtibatl 2, r6 +/* 80382C60 0037FBC0 7C B4 83 A6 */ mtibatu 2, r5 +/* 80382C64 0037FBC4 4C 00 01 2C */ isync +/* 80382C68 0037FBC8 7C 60 00 A6 */ mfmsr r3 +/* 80382C6C 0037FBCC 60 63 00 30 */ ori r3, r3, 0x30 +/* 80382C70 0037FBD0 7C 7B 03 A6 */ mtspr 0x1b, r3 +/* 80382C74 0037FBD4 7C 68 02 A6 */ mflr r3 +/* 80382C78 0037FBD8 7C 7A 03 A6 */ mtspr 0x1a, r3 +/* 80382C7C 0037FBDC 4C 00 00 64 */ rfi + +.global RealMode +RealMode: +/* 80382C80 0037FBE0 54 63 00 BE */ clrlwi r3, r3, 2 +/* 80382C84 0037FBE4 7C 7A 03 A6 */ mtspr 0x1a, r3 +/* 80382C88 0037FBE8 7C 60 00 A6 */ mfmsr r3 +/* 80382C8C 0037FBEC 54 63 07 32 */ rlwinm r3, r3, 0, 0x1c, 0x19 +/* 80382C90 0037FBF0 7C 7B 03 A6 */ mtspr 0x1b, r3 +/* 80382C94 0037FBF4 4C 00 00 64 */ rfi + +.global __OSInitMemoryProtection +__OSInitMemoryProtection: +/* 80382C98 0037FBF8 7C 08 02 A6 */ mflr r0 +/* 80382C9C 0037FBFC 90 01 00 04 */ stw r0, 4(r1) +/* 80382CA0 0037FC00 94 21 FF B8 */ stwu r1, -0x48(r1) +/* 80382CA4 0037FC04 93 E1 00 44 */ stw r31, 0x44(r1) +/* 80382CA8 0037FC08 93 C1 00 40 */ stw r30, 0x40(r1) +/* 80382CAC 0037FC0C 93 A1 00 3C */ stw r29, 0x3c(r1) +/* 80382CB0 0037FC10 3C 60 80 00 */ lis r3, 0x800000F0@ha +/* 80382CB4 0037FC14 83 A3 00 F0 */ lwz r29, 0x800000F0@l(r3) +/* 80382CB8 0037FC18 4B FF E9 A9 */ bl OSDisableInterrupts +/* 80382CBC 0037FC1C 3C 00 01 80 */ lis r0, 0x180 +/* 80382CC0 0037FC20 7C 1D 00 40 */ cmplw r29, r0 +/* 80382CC4 0037FC24 7C 7F 1B 78 */ mr r31, r3 +/* 80382CC8 0037FC28 41 81 00 14 */ bgt lbl_80382CDC +/* 80382CCC 0037FC2C 3C 60 80 38 */ lis r3, Config24MB@ha +/* 80382CD0 0037FC30 38 63 2B 80 */ addi r3, r3, Config24MB@l +/* 80382CD4 0037FC34 4B FF FF AD */ bl RealMode +/* 80382CD8 0037FC38 48 00 00 1C */ b lbl_80382CF4 +lbl_80382CDC: +/* 80382CDC 0037FC3C 3C 00 03 00 */ lis r0, 0x300 +/* 80382CE0 0037FC40 7C 1D 00 40 */ cmplw r29, r0 +/* 80382CE4 0037FC44 41 81 00 10 */ bgt lbl_80382CF4 +/* 80382CE8 0037FC48 3C 60 80 38 */ lis r3, Config48MB@ha +/* 80382CEC 0037FC4C 38 63 2C 00 */ addi r3, r3, Config48MB@l +/* 80382CF0 0037FC50 4B FF FF 91 */ bl RealMode +lbl_80382CF4: +/* 80382CF4 0037FC54 3C 60 CC 00 */ lis r3, 0xCC004000@ha +/* 80382CF8 0037FC58 3B A3 40 00 */ addi r29, r3, 0xCC004000@l +/* 80382CFC 0037FC5C 38 00 00 00 */ li r0, 0 +/* 80382D00 0037FC60 B0 1D 00 20 */ sth r0, 0x20(r29) +/* 80382D04 0037FC64 38 00 00 FF */ li r0, 0xff +/* 80382D08 0037FC68 3C 60 F0 00 */ lis r3, 0xf000 +/* 80382D0C 0037FC6C B0 1D 00 10 */ sth r0, 0x10(r29) +/* 80382D10 0037FC70 4B FF ED 19 */ bl __OSMaskInterrupts +/* 80382D14 0037FC74 3C 60 80 38 */ lis r3, MEMIntrruptHandler@ha +/* 80382D18 0037FC78 3B C3 2A 50 */ addi r30, r3, MEMIntrruptHandler@l +/* 80382D1C 0037FC7C 7F C4 F3 78 */ mr r4, r30 +/* 80382D20 0037FC80 38 60 00 00 */ li r3, 0 +/* 80382D24 0037FC84 4B FF E9 89 */ bl __OSSetInterruptHandler +/* 80382D28 0037FC88 7F C4 F3 78 */ mr r4, r30 +/* 80382D2C 0037FC8C 38 60 00 01 */ li r3, 1 +/* 80382D30 0037FC90 4B FF E9 7D */ bl __OSSetInterruptHandler +/* 80382D34 0037FC94 7F C4 F3 78 */ mr r4, r30 +/* 80382D38 0037FC98 38 60 00 02 */ li r3, 2 +/* 80382D3C 0037FC9C 4B FF E9 71 */ bl __OSSetInterruptHandler +/* 80382D40 0037FCA0 7F C4 F3 78 */ mr r4, r30 +/* 80382D44 0037FCA4 38 60 00 03 */ li r3, 3 +/* 80382D48 0037FCA8 4B FF E9 65 */ bl __OSSetInterruptHandler +/* 80382D4C 0037FCAC 7F C4 F3 78 */ mr r4, r30 +/* 80382D50 0037FCB0 38 60 00 04 */ li r3, 4 +/* 80382D54 0037FCB4 4B FF E9 59 */ bl __OSSetInterruptHandler +/* 80382D58 0037FCB8 3C 60 80 3F */ lis r3, lbl_803F22E0@ha +/* 80382D5C 0037FCBC 38 63 22 E0 */ addi r3, r3, lbl_803F22E0@l +/* 80382D60 0037FCC0 48 00 02 CD */ bl OSRegisterResetFunction +/* 80382D64 0037FCC4 3C 60 80 00 */ lis r3, 0x800000F0@ha +/* 80382D68 0037FCC8 80 83 00 F0 */ lwz r4, 0x800000F0@l(r3) +/* 80382D6C 0037FCCC 80 03 00 28 */ lwz r0, 0x28(r3) +/* 80382D70 0037FCD0 7C 04 00 40 */ cmplw r4, r0 +/* 80382D74 0037FCD4 40 80 00 18 */ bge lbl_80382D8C +/* 80382D78 0037FCD8 3C 04 FE 80 */ addis r0, r4, 0xfe80 +/* 80382D7C 0037FCDC 28 00 00 00 */ cmplwi r0, 0 +/* 80382D80 0037FCE0 40 82 00 0C */ bne lbl_80382D8C +/* 80382D84 0037FCE4 38 00 00 02 */ li r0, 2 +/* 80382D88 0037FCE8 B0 1D 00 28 */ sth r0, 0x28(r29) +lbl_80382D8C: +/* 80382D8C 0037FCEC 3C 60 08 00 */ lis r3, 0x800 +/* 80382D90 0037FCF0 4B FF ED 21 */ bl __OSUnmaskInterrupts +/* 80382D94 0037FCF4 7F E3 FB 78 */ mr r3, r31 +/* 80382D98 0037FCF8 4B FF E8 F1 */ bl OSRestoreInterrupts +/* 80382D9C 0037FCFC 80 01 00 4C */ lwz r0, 0x4c(r1) +/* 80382DA0 0037FD00 83 E1 00 44 */ lwz r31, 0x44(r1) +/* 80382DA4 0037FD04 83 C1 00 40 */ lwz r30, 0x40(r1) +/* 80382DA8 0037FD08 83 A1 00 3C */ lwz r29, 0x3c(r1) +/* 80382DAC 0037FD0C 38 21 00 48 */ addi r1, r1, 0x48 +/* 80382DB0 0037FD10 7C 08 03 A6 */ mtlr r0 +/* 80382DB4 0037FD14 4E 80 00 20 */ blr diff --git a/asm/Dolphin/OS/OSMutex.s b/asm/Dolphin/OS/OSMutex.s new file mode 100644 index 00000000..8cc03c0c --- /dev/null +++ b/asm/Dolphin/OS/OSMutex.s @@ -0,0 +1,38 @@ +.include "macros.inc" + +.section .text, "ax" + +.global __OSUnlockAllMutex +__OSUnlockAllMutex: +/* 80382DB8 0037FD18 7C 08 02 A6 */ mflr r0 +/* 80382DBC 0037FD1C 90 01 00 04 */ stw r0, 4(r1) +/* 80382DC0 0037FD20 94 21 FF E8 */ stwu r1, -0x18(r1) +/* 80382DC4 0037FD24 93 E1 00 14 */ stw r31, 0x14(r1) +/* 80382DC8 0037FD28 3B E0 00 00 */ li r31, 0 +/* 80382DCC 0037FD2C 93 C1 00 10 */ stw r30, 0x10(r1) +/* 80382DD0 0037FD30 3B C3 00 00 */ addi r30, r3, 0 +/* 80382DD4 0037FD34 48 00 00 30 */ b lbl_80382E04 +lbl_80382DD8: +/* 80382DD8 0037FD38 80 A4 00 10 */ lwz r5, 0x10(r4) +/* 80382DDC 0037FD3C 38 64 00 00 */ addi r3, r4, 0 +/* 80382DE0 0037FD40 28 05 00 00 */ cmplwi r5, 0 +/* 80382DE4 0037FD44 40 82 00 0C */ bne lbl_80382DF0 +/* 80382DE8 0037FD48 93 FE 02 F8 */ stw r31, 0x2f8(r30) +/* 80382DEC 0037FD4C 48 00 00 08 */ b lbl_80382DF4 +lbl_80382DF0: +/* 80382DF0 0037FD50 93 E5 00 14 */ stw r31, 0x14(r5) +lbl_80382DF4: +/* 80382DF4 0037FD54 90 BE 02 F4 */ stw r5, 0x2f4(r30) +/* 80382DF8 0037FD58 93 E4 00 0C */ stw r31, 0xc(r4) +/* 80382DFC 0037FD5C 93 E4 00 08 */ stw r31, 8(r4) +/* 80382E00 0037FD60 48 00 23 F9 */ bl OSWakeupThread +lbl_80382E04: +/* 80382E04 0037FD64 80 9E 02 F4 */ lwz r4, 0x2f4(r30) +/* 80382E08 0037FD68 28 04 00 00 */ cmplwi r4, 0 +/* 80382E0C 0037FD6C 40 82 FF CC */ bne lbl_80382DD8 +/* 80382E10 0037FD70 80 01 00 1C */ lwz r0, 0x1c(r1) +/* 80382E14 0037FD74 83 E1 00 14 */ lwz r31, 0x14(r1) +/* 80382E18 0037FD78 83 C1 00 10 */ lwz r30, 0x10(r1) +/* 80382E1C 0037FD7C 38 21 00 18 */ addi r1, r1, 0x18 +/* 80382E20 0037FD80 7C 08 03 A6 */ mtlr r0 +/* 80382E24 0037FD84 4E 80 00 20 */ blr diff --git a/asm/Dolphin/OS/OSReboot.s b/asm/Dolphin/OS/OSReboot.s new file mode 100644 index 00000000..23d73eff --- /dev/null +++ b/asm/Dolphin/OS/OSReboot.s @@ -0,0 +1,162 @@ +.include "macros.inc" + +.section .text, "ax" + +.global Run +Run: +/* 80382E28 0037FD88 7C 00 04 AC */ sync 0 +/* 80382E2C 0037FD8C 4C 00 01 2C */ isync +/* 80382E30 0037FD90 7C 68 03 A6 */ mtlr r3 +/* 80382E34 0037FD94 4E 80 00 20 */ blr + +.global sub_80382e38 +sub_80382e38: +/* 80382E38 0037FD98 38 00 00 01 */ li r0, 1 +/* 80382E3C 0037FD9C 90 0D AD 30 */ stw r0, lbl_805A98F0@sda21(r13) +/* 80382E40 0037FDA0 4E 80 00 20 */ blr + +.global sub_80382e44 +sub_80382e44: +/* 80382E44 0037FDA4 7C 08 02 A6 */ mflr r0 +/* 80382E48 0037FDA8 90 01 00 04 */ stw r0, 4(r1) +/* 80382E4C 0037FDAC 94 21 FC C0 */ stwu r1, -0x340(r1) +/* 80382E50 0037FDB0 93 E1 03 3C */ stw r31, 0x33c(r1) +/* 80382E54 0037FDB4 93 C1 03 38 */ stw r30, 0x338(r1) +/* 80382E58 0037FDB8 3C 60 80 54 */ lis r3, lbl_80541580@ha +/* 80382E5C 0037FDBC 3B C3 15 80 */ addi r30, r3, lbl_80541580@l +/* 80382E60 0037FDC0 4B FF E8 01 */ bl OSDisableInterrupts +/* 80382E64 0037FDC4 80 AD AD 28 */ lwz r5, lbl_805A98E8@sda21(r13) +/* 80382E68 0037FDC8 3C 80 81 30 */ lis r4, 0x812FDFF0@ha +/* 80382E6C 0037FDCC 80 0D AD 2C */ lwz r0, lbl_805A98EC@sda21(r13) +/* 80382E70 0037FDD0 38 60 00 00 */ li r3, 0 +/* 80382E74 0037FDD4 3F E0 81 80 */ lis r31, 0x817FFFFC@ha +/* 80382E78 0037FDD8 38 E0 00 01 */ li r7, 1 +/* 80382E7C 0037FDDC 90 7F FF FC */ stw r3, 0x817FFFFC@l(r31) +/* 80382E80 0037FDE0 3C C0 80 00 */ lis r6, 0x800030E2@ha +/* 80382E84 0037FDE4 90 7F FF F8 */ stw r3, -8(r31) +/* 80382E88 0037FDE8 38 61 00 70 */ addi r3, r1, 0x70 +/* 80382E8C 0037FDEC 98 E6 30 E2 */ stb r7, 0x800030E2@l(r6) +/* 80382E90 0037FDF0 90 A4 DF F0 */ stw r5, 0x812FDFF0@l(r4) +/* 80382E94 0037FDF4 90 04 DF EC */ stw r0, -0x2014(r4) +/* 80382E98 0037FDF8 4B FF C7 7D */ bl OSClearContext +/* 80382E9C 0037FDFC 38 61 00 70 */ addi r3, r1, 0x70 +/* 80382EA0 0037FE00 4B FF C5 7D */ bl OSSetCurrentContext +/* 80382EA4 0037FE04 4B FE ED 01 */ bl DVDInit +/* 80382EA8 0037FE08 38 60 00 01 */ li r3, 1 +/* 80382EAC 0037FE0C 4B FF 13 51 */ bl DVDSetAutoInvalidation +/* 80382EB0 0037FE10 3C 60 80 38 */ lis r3, sub_80382e38@ha +/* 80382EB4 0037FE14 38 63 2E 38 */ addi r3, r3, sub_80382e38@l +/* 80382EB8 0037FE18 4B FF 18 E5 */ bl __DVDPrepareResetAsync +/* 80382EBC 0037FE1C 4B FF 17 FD */ bl DVDCheckDisk +/* 80382EC0 0037FE20 2C 03 00 00 */ cmpwi r3, 0 +/* 80382EC4 0037FE24 40 82 00 0C */ bne lbl_80382ED0 +/* 80382EC8 0037FE28 80 7F FF FC */ lwz r3, -4(r31) +/* 80382ECC 0037FE2C 48 00 02 E1 */ bl __OSDoHotReset +lbl_80382ED0: +/* 80382ED0 0037FE30 38 60 FF E0 */ li r3, -32 +/* 80382ED4 0037FE34 4B FF EB 55 */ bl __OSMaskInterrupts +/* 80382ED8 0037FE38 38 60 04 00 */ li r3, 0x400 +/* 80382EDC 0037FE3C 4B FF EB D5 */ bl __OSUnmaskInterrupts +/* 80382EE0 0037FE40 4B FF E7 95 */ bl OSEnableInterrupts +/* 80382EE4 0037FE44 48 00 00 04 */ b lbl_80382EE8 +lbl_80382EE8: +/* 80382EE8 0037FE48 48 00 00 04 */ b lbl_80382EEC +lbl_80382EEC: +/* 80382EEC 0037FE4C 80 0D AD 30 */ lwz r0, lbl_805A98F0@sda21(r13) +/* 80382EF0 0037FE50 2C 00 00 00 */ cmpwi r0, 0 +/* 80382EF4 0037FE54 41 82 FF F8 */ beq lbl_80382EEC +/* 80382EF8 0037FE58 7F C4 F3 78 */ mr r4, r30 +/* 80382EFC 0037FE5C 38 61 00 40 */ addi r3, r1, 0x40 +/* 80382F00 0037FE60 38 A0 00 20 */ li r5, 0x20 +/* 80382F04 0037FE64 38 C0 24 40 */ li r6, 0x2440 +/* 80382F08 0037FE68 38 E0 00 00 */ li r7, 0 +/* 80382F0C 0037FE6C 4B FF 0A C5 */ bl DVDReadAbsAsyncForBS +/* 80382F10 0037FE70 3F E0 81 80 */ lis r31, 0x8180 +/* 80382F14 0037FE74 48 00 00 04 */ b lbl_80382F18 +lbl_80382F18: +/* 80382F18 0037FE78 48 00 00 04 */ b lbl_80382F1C +lbl_80382F1C: +/* 80382F1C 0037FE7C 80 01 00 4C */ lwz r0, 0x4c(r1) +/* 80382F20 0037FE80 2C 00 00 01 */ cmpwi r0, 1 +/* 80382F24 0037FE84 41 82 FF F8 */ beq lbl_80382F1C +/* 80382F28 0037FE88 40 80 00 14 */ bge lbl_80382F3C +/* 80382F2C 0037FE8C 2C 00 FF FF */ cmpwi r0, -1 +/* 80382F30 0037FE90 41 82 00 18 */ beq lbl_80382F48 +/* 80382F34 0037FE94 40 80 00 20 */ bge lbl_80382F54 +/* 80382F38 0037FE98 4B FF FF E4 */ b lbl_80382F1C +lbl_80382F3C: +/* 80382F3C 0037FE9C 2C 00 00 0C */ cmpwi r0, 0xc +/* 80382F40 0037FEA0 40 80 FF DC */ bge lbl_80382F1C +/* 80382F44 0037FEA4 48 00 00 04 */ b lbl_80382F48 +lbl_80382F48: +/* 80382F48 0037FEA8 80 7F FF FC */ lwz r3, -4(r31) +/* 80382F4C 0037FEAC 48 00 02 61 */ bl __OSDoHotReset +/* 80382F50 0037FEB0 4B FF FF CC */ b lbl_80382F1C +lbl_80382F54: +/* 80382F54 0037FEB4 80 7E 00 18 */ lwz r3, 0x18(r30) +/* 80382F58 0037FEB8 80 9E 00 14 */ lwz r4, 0x14(r30) +/* 80382F5C 0037FEBC 38 03 00 1F */ addi r0, r3, 0x1f +/* 80382F60 0037FEC0 38 84 00 20 */ addi r4, r4, 0x20 +/* 80382F64 0037FEC4 54 1E 00 34 */ rlwinm r30, r0, 0, 0, 0x1a +/* 80382F68 0037FEC8 48 00 00 04 */ b lbl_80382F6C +lbl_80382F6C: +/* 80382F6C 0037FECC 48 00 00 04 */ b lbl_80382F70 +lbl_80382F70: +/* 80382F70 0037FED0 80 0D AD 30 */ lwz r0, lbl_805A98F0@sda21(r13) +/* 80382F74 0037FED4 2C 00 00 00 */ cmpwi r0, 0 +/* 80382F78 0037FED8 41 82 FF F8 */ beq lbl_80382F70 +/* 80382F7C 0037FEDC 7F C5 F3 78 */ mr r5, r30 +/* 80382F80 0037FEE0 38 61 00 10 */ addi r3, r1, 0x10 +/* 80382F84 0037FEE4 38 C4 24 40 */ addi r6, r4, 0x2440 +/* 80382F88 0037FEE8 3C 80 81 30 */ lis r4, 0x8130 +/* 80382F8C 0037FEEC 38 E0 00 00 */ li r7, 0 +/* 80382F90 0037FEF0 4B FF 0A 41 */ bl DVDReadAbsAsyncForBS +/* 80382F94 0037FEF4 3F E0 81 80 */ lis r31, 0x8180 +/* 80382F98 0037FEF8 48 00 00 04 */ b lbl_80382F9C +lbl_80382F9C: +/* 80382F9C 0037FEFC 48 00 00 04 */ b lbl_80382FA0 +lbl_80382FA0: +/* 80382FA0 0037FF00 80 01 00 1C */ lwz r0, 0x1c(r1) +/* 80382FA4 0037FF04 2C 00 00 01 */ cmpwi r0, 1 +/* 80382FA8 0037FF08 41 82 FF F8 */ beq lbl_80382FA0 +/* 80382FAC 0037FF0C 40 80 00 14 */ bge lbl_80382FC0 +/* 80382FB0 0037FF10 2C 00 FF FF */ cmpwi r0, -1 +/* 80382FB4 0037FF14 41 82 00 18 */ beq lbl_80382FCC +/* 80382FB8 0037FF18 40 80 00 20 */ bge lbl_80382FD8 +/* 80382FBC 0037FF1C 4B FF FF E4 */ b lbl_80382FA0 +lbl_80382FC0: +/* 80382FC0 0037FF20 2C 00 00 0C */ cmpwi r0, 0xc +/* 80382FC4 0037FF24 40 80 FF DC */ bge lbl_80382FA0 +/* 80382FC8 0037FF28 48 00 00 04 */ b lbl_80382FCC +lbl_80382FCC: +/* 80382FCC 0037FF2C 80 7F FF FC */ lwz r3, -4(r31) +/* 80382FD0 0037FF30 48 00 01 DD */ bl __OSDoHotReset +/* 80382FD4 0037FF34 4B FF FF CC */ b lbl_80382FA0 +lbl_80382FD8: +/* 80382FD8 0037FF38 3C 60 81 30 */ lis r3, 0x8130 +/* 80382FDC 0037FF3C 7F C4 F3 78 */ mr r4, r30 +/* 80382FE0 0037FF40 4B FF BB B5 */ bl ICInvalidateRange +/* 80382FE4 0037FF44 4B FF E6 7D */ bl OSDisableInterrupts +/* 80382FE8 0037FF48 4B FF BB E1 */ bl ICFlashInvalidate +/* 80382FEC 0037FF4C 3C 60 81 30 */ lis r3, 0x8130 +/* 80382FF0 0037FF50 4B FF FE 39 */ bl Run +/* 80382FF4 0037FF54 80 01 03 44 */ lwz r0, 0x344(r1) +/* 80382FF8 0037FF58 83 E1 03 3C */ lwz r31, 0x33c(r1) +/* 80382FFC 0037FF5C 83 C1 03 38 */ lwz r30, 0x338(r1) +/* 80383000 0037FF60 38 21 03 40 */ addi r1, r1, 0x340 +/* 80383004 0037FF64 7C 08 03 A6 */ mtlr r0 +/* 80383008 0037FF68 4E 80 00 20 */ blr + +.global sub_8038300c +sub_8038300c: +/* 8038300C 0037FF6C 90 6D AD 28 */ stw r3, lbl_805A98E8@sda21(r13) +/* 80383010 0037FF70 90 8D AD 2C */ stw r4, lbl_805A98EC@sda21(r13) +/* 80383014 0037FF74 4E 80 00 20 */ blr + +.global sub_80383018 +sub_80383018: +/* 80383018 0037FF78 80 0D AC DC */ lwz r0, lbl_805A989C@sda21(r13) +/* 8038301C 0037FF7C 90 03 00 00 */ stw r0, 0(r3) +/* 80383020 0037FF80 80 0D AC D8 */ lwz r0, lbl_805A9898@sda21(r13) +/* 80383024 0037FF84 90 04 00 00 */ stw r0, 0(r4) +/* 80383028 0037FF88 4E 80 00 20 */ blr diff --git a/asm/Dolphin/OS/OSReset.s b/asm/Dolphin/OS/OSReset.s new file mode 100644 index 00000000..664ee3a4 --- /dev/null +++ b/asm/Dolphin/OS/OSReset.s @@ -0,0 +1,357 @@ +.include "macros.inc" + +.section .text, "ax" + +.global OSRegisterResetFunction +OSRegisterResetFunction: +/* 8038302C 0037FF8C 80 AD AD 38 */ lwz r5, lbl_805A98F8@sda21(r13) +/* 80383030 0037FF90 48 00 00 08 */ b lbl_80383038 +lbl_80383034: +/* 80383034 0037FF94 80 A5 00 08 */ lwz r5, 8(r5) +lbl_80383038: +/* 80383038 0037FF98 28 05 00 00 */ cmplwi r5, 0 +/* 8038303C 0037FF9C 41 82 00 14 */ beq lbl_80383050 +/* 80383040 0037FFA0 80 85 00 04 */ lwz r4, 4(r5) +/* 80383044 0037FFA4 80 03 00 04 */ lwz r0, 4(r3) +/* 80383048 0037FFA8 7C 04 00 40 */ cmplw r4, r0 +/* 8038304C 0037FFAC 40 81 FF E8 */ ble lbl_80383034 +lbl_80383050: +/* 80383050 0037FFB0 28 05 00 00 */ cmplwi r5, 0 +/* 80383054 0037FFB4 40 82 00 34 */ bne lbl_80383088 +/* 80383058 0037FFB8 38 AD AD 38 */ addi r5, r13, lbl_805A98F8@sda21 +/* 8038305C 0037FFBC 84 85 00 04 */ lwzu r4, 4(r5) +/* 80383060 0037FFC0 28 04 00 00 */ cmplwi r4, 0 +/* 80383064 0037FFC4 40 82 00 0C */ bne lbl_80383070 +/* 80383068 0037FFC8 90 6D AD 38 */ stw r3, lbl_805A98F8@sda21(r13) +/* 8038306C 0037FFCC 48 00 00 08 */ b lbl_80383074 +lbl_80383070: +/* 80383070 0037FFD0 90 64 00 08 */ stw r3, 8(r4) +lbl_80383074: +/* 80383074 0037FFD4 90 83 00 0C */ stw r4, 0xc(r3) +/* 80383078 0037FFD8 38 00 00 00 */ li r0, 0 +/* 8038307C 0037FFDC 90 03 00 08 */ stw r0, 8(r3) +/* 80383080 0037FFE0 90 65 00 00 */ stw r3, 0(r5) +/* 80383084 0037FFE4 4E 80 00 20 */ blr +lbl_80383088: +/* 80383088 0037FFE8 90 A3 00 08 */ stw r5, 8(r3) +/* 8038308C 0037FFEC 80 85 00 0C */ lwz r4, 0xc(r5) +/* 80383090 0037FFF0 90 65 00 0C */ stw r3, 0xc(r5) +/* 80383094 0037FFF4 28 04 00 00 */ cmplwi r4, 0 +/* 80383098 0037FFF8 90 83 00 0C */ stw r4, 0xc(r3) +/* 8038309C 0037FFFC 40 82 00 0C */ bne lbl_803830A8 +/* 803830A0 00380000 90 6D AD 38 */ stw r3, lbl_805A98F8@sda21(r13) +/* 803830A4 00380004 4E 80 00 20 */ blr +lbl_803830A8: +/* 803830A8 00380008 90 64 00 08 */ stw r3, 8(r4) +/* 803830AC 0038000C 4E 80 00 20 */ blr + +.global __OSCallResetFunctions +__OSCallResetFunctions: +/* 803830B0 00380010 7C 08 02 A6 */ mflr r0 +/* 803830B4 00380014 90 01 00 04 */ stw r0, 4(r1) +/* 803830B8 00380018 94 21 FF E0 */ stwu r1, -0x20(r1) +/* 803830BC 0038001C 93 E1 00 1C */ stw r31, 0x1c(r1) +/* 803830C0 00380020 93 C1 00 18 */ stw r30, 0x18(r1) +/* 803830C4 00380024 3B C0 00 00 */ li r30, 0 +/* 803830C8 00380028 93 A1 00 14 */ stw r29, 0x14(r1) +/* 803830CC 0038002C 3B A3 00 00 */ addi r29, r3, 0 +/* 803830D0 00380030 83 ED AD 38 */ lwz r31, lbl_805A98F8@sda21(r13) +/* 803830D4 00380034 48 00 00 24 */ b lbl_803830F8 +lbl_803830D8: +/* 803830D8 00380038 81 9F 00 00 */ lwz r12, 0(r31) +/* 803830DC 0038003C 38 7D 00 00 */ addi r3, r29, 0 +/* 803830E0 00380040 7D 88 03 A6 */ mtlr r12 +/* 803830E4 00380044 4E 80 00 21 */ blrl +/* 803830E8 00380048 7C 60 00 34 */ cntlzw r0, r3 +/* 803830EC 0038004C 83 FF 00 08 */ lwz r31, 8(r31) +/* 803830F0 00380050 54 00 D9 7E */ srwi r0, r0, 5 +/* 803830F4 00380054 7F DE 03 78 */ or r30, r30, r0 +lbl_803830F8: +/* 803830F8 00380058 28 1F 00 00 */ cmplwi r31, 0 +/* 803830FC 0038005C 40 82 FF DC */ bne lbl_803830D8 +/* 80383100 00380060 48 00 0D DD */ bl __OSSyncSram +/* 80383104 00380064 7C 60 00 34 */ cntlzw r0, r3 +/* 80383108 00380068 54 00 D9 7E */ srwi r0, r0, 5 +/* 8038310C 0038006C 7F DE 03 79 */ or. r30, r30, r0 +/* 80383110 00380070 41 82 00 0C */ beq lbl_8038311C +/* 80383114 00380074 38 60 00 00 */ li r3, 0 +/* 80383118 00380078 48 00 00 08 */ b lbl_80383120 +lbl_8038311C: +/* 8038311C 0038007C 38 60 00 01 */ li r3, 1 +lbl_80383120: +/* 80383120 00380080 80 01 00 24 */ lwz r0, 0x24(r1) +/* 80383124 00380084 83 E1 00 1C */ lwz r31, 0x1c(r1) +/* 80383128 00380088 83 C1 00 18 */ lwz r30, 0x18(r1) +/* 8038312C 0038008C 83 A1 00 14 */ lwz r29, 0x14(r1) +/* 80383130 00380090 38 21 00 20 */ addi r1, r1, 0x20 +/* 80383134 00380094 7C 08 03 A6 */ mtlr r0 +/* 80383138 00380098 4E 80 00 20 */ blr + +.global Reset +Reset: +/* 8038313C 0038009C 48 00 00 20 */ b lbl_8038315C +lbl_80383140: +/* 80383140 003800A0 7D 10 FA A6 */ mfspr r8, 0x3f0 +/* 80383144 003800A4 61 08 00 08 */ ori r8, r8, 8 +/* 80383148 003800A8 7D 10 FB A6 */ mtspr 0x3f0, r8 +/* 8038314C 003800AC 4C 00 01 2C */ isync +/* 80383150 003800B0 7C 00 04 AC */ sync 0 +/* 80383154 003800B4 60 00 00 00 */ nop +/* 80383158 003800B8 48 00 00 08 */ b lbl_80383160 +lbl_8038315C: +/* 8038315C 003800BC 48 00 00 20 */ b lbl_8038317C +lbl_80383160: +/* 80383160 003800C0 7C AC 42 E6 */ mftb r5, 0x10c +lbl_80383164: +/* 80383164 003800C4 7C CC 42 E6 */ mftb r6, 0x10c +/* 80383168 003800C8 7C E5 30 50 */ subf r7, r5, r6 +/* 8038316C 003800CC 28 07 11 24 */ cmplwi r7, 0x1124 +/* 80383170 003800D0 41 80 FF F4 */ blt lbl_80383164 +/* 80383174 003800D4 60 00 00 00 */ nop +/* 80383178 003800D8 48 00 00 08 */ b lbl_80383180 +lbl_8038317C: +/* 8038317C 003800DC 48 00 00 20 */ b lbl_8038319C +lbl_80383180: +/* 80383180 003800E0 3D 00 CC 00 */ lis r8, 0xCC003000@h +/* 80383184 003800E4 61 08 30 00 */ ori r8, r8, 0xCC003000@l +/* 80383188 003800E8 38 80 00 03 */ li r4, 3 +/* 8038318C 003800EC 90 88 00 24 */ stw r4, 0x24(r8) +/* 80383190 003800F0 90 68 00 24 */ stw r3, 0x24(r8) +/* 80383194 003800F4 60 00 00 00 */ nop +/* 80383198 003800F8 48 00 00 08 */ b lbl_803831A0 +lbl_8038319C: +/* 8038319C 003800FC 48 00 00 0C */ b lbl_803831A8 +lbl_803831A0: +/* 803831A0 00380100 60 00 00 00 */ nop +/* 803831A4 00380104 4B FF FF FC */ b lbl_803831A0 +lbl_803831A8: +/* 803831A8 00380108 4B FF FF 98 */ b lbl_80383140 + +.global __OSDoHotReset +__OSDoHotReset: +/* 803831AC 0038010C 7C 08 02 A6 */ mflr r0 +/* 803831B0 00380110 90 01 00 04 */ stw r0, 4(r1) +/* 803831B4 00380114 94 21 FF E8 */ stwu r1, -0x18(r1) +/* 803831B8 00380118 93 E1 00 14 */ stw r31, 0x14(r1) +/* 803831BC 0038011C 7C 7F 1B 78 */ mr r31, r3 +/* 803831C0 00380120 4B FF E4 A1 */ bl OSDisableInterrupts +/* 803831C4 00380124 3C 60 CC 00 */ lis r3, 0xCC002000@ha +/* 803831C8 00380128 38 63 20 00 */ addi r3, r3, 0xCC002000@l +/* 803831CC 0038012C 38 00 00 00 */ li r0, 0 +/* 803831D0 00380130 B0 03 00 02 */ sth r0, 2(r3) +/* 803831D4 00380134 4B FF B9 F5 */ bl ICFlashInvalidate +/* 803831D8 00380138 57 E3 18 38 */ slwi r3, r31, 3 +/* 803831DC 0038013C 4B FF FF 61 */ bl Reset +/* 803831E0 00380140 80 01 00 1C */ lwz r0, 0x1c(r1) +/* 803831E4 00380144 83 E1 00 14 */ lwz r31, 0x14(r1) +/* 803831E8 00380148 38 21 00 18 */ addi r1, r1, 0x18 +/* 803831EC 0038014C 7C 08 03 A6 */ mtlr r0 +/* 803831F0 00380150 4E 80 00 20 */ blr + +.global OSResetSystem +OSResetSystem: +/* 803831F4 00380154 7C 08 02 A6 */ mflr r0 +/* 803831F8 00380158 90 01 00 04 */ stw r0, 4(r1) +/* 803831FC 0038015C 94 21 FF C0 */ stwu r1, -0x40(r1) +/* 80383200 00380160 BF 41 00 28 */ stmw r26, 0x28(r1) +/* 80383204 00380164 7C 7A 1B 78 */ mr r26, r3 +/* 80383208 00380168 7C 9D 23 78 */ mr r29, r4 +/* 8038320C 0038016C 7C BE 2B 78 */ mr r30, r5 +/* 80383210 00380170 48 00 13 D1 */ bl OSDisableScheduler +/* 80383214 00380174 4B FF B7 85 */ bl __OSStopAudioSystem +/* 80383218 00380178 2C 1A 00 02 */ cmpwi r26, 2 +/* 8038321C 0038017C 40 82 00 10 */ bne lbl_8038322C +/* 80383220 00380180 38 60 00 01 */ li r3, 1 +/* 80383224 00380184 48 00 43 E5 */ bl __PADDisableRecalibration +/* 80383228 00380188 7C 7F 1B 78 */ mr r31, r3 +lbl_8038322C: +/* 8038322C 0038018C 48 00 00 04 */ b lbl_80383230 +lbl_80383230: +/* 80383230 00380190 48 00 00 04 */ b lbl_80383234 +lbl_80383234: +/* 80383234 00380194 83 6D AD 38 */ lwz r27, lbl_805A98F8@sda21(r13) +/* 80383238 00380198 3B 80 00 00 */ li r28, 0 +/* 8038323C 0038019C 48 00 00 04 */ b lbl_80383240 +lbl_80383240: +/* 80383240 003801A0 48 00 00 04 */ b lbl_80383244 +lbl_80383244: +/* 80383244 003801A4 48 00 00 24 */ b lbl_80383268 +lbl_80383248: +/* 80383248 003801A8 38 60 00 00 */ li r3, 0 +/* 8038324C 003801AC 81 9B 00 00 */ lwz r12, 0(r27) +/* 80383250 003801B0 7D 88 03 A6 */ mtlr r12 +/* 80383254 003801B4 4E 80 00 21 */ blrl +/* 80383258 003801B8 7C 60 00 34 */ cntlzw r0, r3 +/* 8038325C 003801BC 83 7B 00 08 */ lwz r27, 8(r27) +/* 80383260 003801C0 54 00 D9 7E */ srwi r0, r0, 5 +/* 80383264 003801C4 7F 9C 03 78 */ or r28, r28, r0 +lbl_80383268: +/* 80383268 003801C8 28 1B 00 00 */ cmplwi r27, 0 +/* 8038326C 003801CC 40 82 FF DC */ bne lbl_80383248 +/* 80383270 003801D0 48 00 0C 6D */ bl __OSSyncSram +/* 80383274 003801D4 7C 60 00 34 */ cntlzw r0, r3 +/* 80383278 003801D8 54 00 D9 7E */ srwi r0, r0, 5 +/* 8038327C 003801DC 7F 9C 03 78 */ or r28, r28, r0 +/* 80383280 003801E0 2C 1C 00 00 */ cmpwi r28, 0 +/* 80383284 003801E4 41 82 00 0C */ beq lbl_80383290 +/* 80383288 003801E8 38 00 00 00 */ li r0, 0 +/* 8038328C 003801EC 48 00 00 08 */ b lbl_80383294 +lbl_80383290: +/* 80383290 003801F0 38 00 00 01 */ li r0, 1 +lbl_80383294: +/* 80383294 003801F4 2C 00 00 00 */ cmpwi r0, 0 +/* 80383298 003801F8 41 82 FF 9C */ beq lbl_80383234 +/* 8038329C 003801FC 2C 1A 00 01 */ cmpwi r26, 1 +/* 803832A0 00380200 40 82 00 38 */ bne lbl_803832D8 +/* 803832A4 00380204 2C 1E 00 00 */ cmpwi r30, 0 +/* 803832A8 00380208 41 82 00 30 */ beq lbl_803832D8 +/* 803832AC 0038020C 48 00 08 29 */ bl __OSLockSram +/* 803832B0 00380210 88 03 00 13 */ lbz r0, 0x13(r3) +/* 803832B4 00380214 60 00 00 40 */ ori r0, r0, 0x40 +/* 803832B8 00380218 98 03 00 13 */ stb r0, 0x13(r3) +/* 803832BC 0038021C 38 60 00 01 */ li r3, 1 +/* 803832C0 00380220 48 00 0B D5 */ bl __OSUnlockSram +/* 803832C4 00380224 48 00 00 04 */ b lbl_803832C8 +lbl_803832C8: +/* 803832C8 00380228 48 00 00 04 */ b lbl_803832CC +lbl_803832CC: +/* 803832CC 0038022C 48 00 0C 11 */ bl __OSSyncSram +/* 803832D0 00380230 2C 03 00 00 */ cmpwi r3, 0 +/* 803832D4 00380234 41 82 FF F8 */ beq lbl_803832CC +lbl_803832D8: +/* 803832D8 00380238 4B FF E3 89 */ bl OSDisableInterrupts +/* 803832DC 0038023C 83 8D AD 38 */ lwz r28, lbl_805A98F8@sda21(r13) +/* 803832E0 00380240 3B 60 00 00 */ li r27, 0 +/* 803832E4 00380244 48 00 00 04 */ b lbl_803832E8 +lbl_803832E8: +/* 803832E8 00380248 48 00 00 04 */ b lbl_803832EC +lbl_803832EC: +/* 803832EC 0038024C 48 00 00 24 */ b lbl_80383310 +lbl_803832F0: +/* 803832F0 00380250 38 60 00 01 */ li r3, 1 +/* 803832F4 00380254 81 9C 00 00 */ lwz r12, 0(r28) +/* 803832F8 00380258 7D 88 03 A6 */ mtlr r12 +/* 803832FC 0038025C 4E 80 00 21 */ blrl +/* 80383300 00380260 7C 60 00 34 */ cntlzw r0, r3 +/* 80383304 00380264 83 9C 00 08 */ lwz r28, 8(r28) +/* 80383308 00380268 54 00 D9 7E */ srwi r0, r0, 5 +/* 8038330C 0038026C 7F 7B 03 78 */ or r27, r27, r0 +lbl_80383310: +/* 80383310 00380270 28 1C 00 00 */ cmplwi r28, 0 +/* 80383314 00380274 40 82 FF DC */ bne lbl_803832F0 +/* 80383318 00380278 48 00 0B C5 */ bl __OSSyncSram +/* 8038331C 0038027C 4B FF B9 D5 */ bl LCDisable +/* 80383320 00380280 2C 1A 00 01 */ cmpwi r26, 1 +/* 80383324 00380284 40 82 00 28 */ bne lbl_8038334C +/* 80383328 00380288 4B FF E3 39 */ bl OSDisableInterrupts +/* 8038332C 0038028C 3C 60 CC 00 */ lis r3, 0xCC002000@ha +/* 80383330 00380290 38 63 20 00 */ addi r3, r3, 0xCC002000@l +/* 80383334 00380294 38 00 00 00 */ li r0, 0 +/* 80383338 00380298 B0 03 00 02 */ sth r0, 2(r3) +/* 8038333C 0038029C 4B FF B8 8D */ bl ICFlashInvalidate +/* 80383340 003802A0 57 A3 18 38 */ slwi r3, r29, 3 +/* 80383344 003802A4 4B FF FD F9 */ bl Reset +/* 80383348 003802A8 48 00 00 60 */ b lbl_803833A8 +lbl_8038334C: +/* 8038334C 003802AC 2C 1A 00 00 */ cmpwi r26, 0 +/* 80383350 003802B0 40 82 00 58 */ bne lbl_803833A8 +/* 80383354 003802B4 3C 60 80 00 */ lis r3, 0x800000DC@ha +/* 80383358 003802B8 80 63 00 DC */ lwz r3, 0x800000DC@l(r3) +/* 8038335C 003802BC 48 00 00 04 */ b lbl_80383360 +lbl_80383360: +/* 80383360 003802C0 48 00 00 04 */ b lbl_80383364 +lbl_80383364: +/* 80383364 003802C4 48 00 00 2C */ b lbl_80383390 +lbl_80383368: +/* 80383368 003802C8 A0 03 02 C8 */ lhz r0, 0x2c8(r3) +/* 8038336C 003802CC 83 63 02 FC */ lwz r27, 0x2fc(r3) +/* 80383370 003802D0 2C 00 00 04 */ cmpwi r0, 4 +/* 80383374 003802D4 41 82 00 14 */ beq lbl_80383388 +/* 80383378 003802D8 40 80 00 14 */ bge lbl_8038338C +/* 8038337C 003802DC 2C 00 00 01 */ cmpwi r0, 1 +/* 80383380 003802E0 41 82 00 08 */ beq lbl_80383388 +/* 80383384 003802E4 48 00 00 08 */ b lbl_8038338C +lbl_80383388: +/* 80383388 003802E8 48 00 17 D1 */ bl OSCancelThread +lbl_8038338C: +/* 8038338C 003802EC 7F 63 DB 78 */ mr r3, r27 +lbl_80383390: +/* 80383390 003802F0 28 03 00 00 */ cmplwi r3, 0 +/* 80383394 003802F4 40 82 FF D4 */ bne lbl_80383368 +/* 80383398 003802F8 48 00 12 89 */ bl OSEnableScheduler +/* 8038339C 003802FC 7F A3 EB 78 */ mr r3, r29 +/* 803833A0 00380300 7F C4 F3 78 */ mr r4, r30 +/* 803833A4 00380304 4B FF FA A1 */ bl sub_80382e44 +lbl_803833A8: +/* 803833A8 00380308 3C 60 80 00 */ lis r3, 0x800000DC@ha +/* 803833AC 0038030C 80 63 00 DC */ lwz r3, 0x800000DC@l(r3) +/* 803833B0 00380310 48 00 00 04 */ b lbl_803833B4 +lbl_803833B4: +/* 803833B4 00380314 48 00 00 04 */ b lbl_803833B8 +lbl_803833B8: +/* 803833B8 00380318 48 00 00 2C */ b lbl_803833E4 +lbl_803833BC: +/* 803833BC 0038031C A0 03 02 C8 */ lhz r0, 0x2c8(r3) +/* 803833C0 00380320 83 63 02 FC */ lwz r27, 0x2fc(r3) +/* 803833C4 00380324 2C 00 00 04 */ cmpwi r0, 4 +/* 803833C8 00380328 41 82 00 14 */ beq lbl_803833DC +/* 803833CC 0038032C 40 80 00 14 */ bge lbl_803833E0 +/* 803833D0 00380330 2C 00 00 01 */ cmpwi r0, 1 +/* 803833D4 00380334 41 82 00 08 */ beq lbl_803833DC +/* 803833D8 00380338 48 00 00 08 */ b lbl_803833E0 +lbl_803833DC: +/* 803833DC 0038033C 48 00 17 7D */ bl OSCancelThread +lbl_803833E0: +/* 803833E0 00380340 7F 63 DB 78 */ mr r3, r27 +lbl_803833E4: +/* 803833E4 00380344 28 03 00 00 */ cmplwi r3, 0 +/* 803833E8 00380348 40 82 FF D4 */ bne lbl_803833BC +/* 803833EC 0038034C 3F A0 80 00 */ lis r29, 0x80000040@ha +/* 803833F0 00380350 38 7D 00 40 */ addi r3, r29, 0x80000040@l +/* 803833F4 00380354 38 80 00 00 */ li r4, 0 +/* 803833F8 00380358 38 A0 00 8C */ li r5, 0x8c +/* 803833FC 0038035C 4B C7 FF AD */ bl memset +/* 80383400 00380360 38 7D 00 D4 */ addi r3, r29, 0xd4 +/* 80383404 00380364 38 80 00 00 */ li r4, 0 +/* 80383408 00380368 38 A0 00 14 */ li r5, 0x14 +/* 8038340C 0038036C 4B C7 FF 9D */ bl memset +/* 80383410 00380370 38 7D 00 F4 */ addi r3, r29, 0xf4 +/* 80383414 00380374 38 80 00 00 */ li r4, 0 +/* 80383418 00380378 38 A0 00 04 */ li r5, 4 +/* 8038341C 0038037C 4B C7 FF 8D */ bl memset +/* 80383420 00380380 38 7D 30 00 */ addi r3, r29, 0x3000 +/* 80383424 00380384 38 80 00 00 */ li r4, 0 +/* 80383428 00380388 38 A0 00 C0 */ li r5, 0xc0 +/* 8038342C 0038038C 4B C7 FF 7D */ bl memset +/* 80383430 00380390 38 7D 30 C8 */ addi r3, r29, 0x30c8 +/* 80383434 00380394 38 80 00 00 */ li r4, 0 +/* 80383438 00380398 38 A0 00 0C */ li r5, 0xc +/* 8038343C 0038039C 4B C7 FF 6D */ bl memset +/* 80383440 003803A0 38 7D 30 E2 */ addi r3, r29, 0x30e2 +/* 80383444 003803A4 38 80 00 00 */ li r4, 0 +/* 80383448 003803A8 38 A0 00 01 */ li r5, 1 +/* 8038344C 003803AC 4B C7 FF 5D */ bl memset +/* 80383450 003803B0 7F E3 FB 78 */ mr r3, r31 +/* 80383454 003803B4 48 00 41 B5 */ bl __PADDisableRecalibration +/* 80383458 003803B8 BB 41 00 28 */ lmw r26, 0x28(r1) +/* 8038345C 003803BC 80 01 00 44 */ lwz r0, 0x44(r1) +/* 80383460 003803C0 38 21 00 40 */ addi r1, r1, 0x40 +/* 80383464 003803C4 7C 08 03 A6 */ mtlr r0 +/* 80383468 003803C8 4E 80 00 20 */ blr + +.global OSGetResetCode +OSGetResetCode: +/* 8038346C 003803CC 3C 60 80 00 */ lis r3, 0x800030E2@ha +/* 80383470 003803D0 88 03 30 E2 */ lbz r0, 0x800030E2@l(r3) +/* 80383474 003803D4 28 00 00 00 */ cmplwi r0, 0 +/* 80383478 003803D8 41 82 00 0C */ beq lbl_80383484 +/* 8038347C 003803DC 3C 60 80 00 */ lis r3, 0x8000 +/* 80383480 003803E0 48 00 00 18 */ b lbl_80383498 +lbl_80383484: +/* 80383484 003803E4 3C 60 CC 00 */ lis r3, 0xCC003000@ha +/* 80383488 003803E8 38 63 30 00 */ addi r3, r3, 0xCC003000@l +/* 8038348C 003803EC 80 03 00 24 */ lwz r0, 0x24(r3) +/* 80383490 003803F0 54 00 00 38 */ rlwinm r0, r0, 0, 0, 0x1c +/* 80383494 003803F4 54 03 E8 FE */ srwi r3, r0, 3 +lbl_80383498: +/* 80383498 003803F8 4E 80 00 20 */ blr diff --git a/asm/Dolphin/OS/OSResetSW.s b/asm/Dolphin/OS/OSResetSW.s new file mode 100644 index 00000000..0c9824a3 --- /dev/null +++ b/asm/Dolphin/OS/OSResetSW.s @@ -0,0 +1,252 @@ +.include "macros.inc" + +.section .text, "ax" + +.global __OSResetSWInterruptHandler +__OSResetSWInterruptHandler: +/* 8038349C 003803FC 7C 08 02 A6 */ mflr r0 +/* 803834A0 00380400 90 01 00 04 */ stw r0, 4(r1) +/* 803834A4 00380404 94 21 FF D8 */ stwu r1, -0x28(r1) +/* 803834A8 00380408 93 E1 00 24 */ stw r31, 0x24(r1) +/* 803834AC 0038040C 93 C1 00 20 */ stw r30, 0x20(r1) +/* 803834B0 00380410 93 A1 00 1C */ stw r29, 0x1c(r1) +/* 803834B4 00380414 48 00 1F 15 */ bl __OSGetSystemTime +/* 803834B8 00380418 3C A0 80 00 */ lis r5, 0x800000F8@ha +/* 803834BC 0038041C 90 8D AD 5C */ stw r4, lbl_805A991C@sda21(r13) +/* 803834C0 00380420 80 05 00 F8 */ lwz r0, 0x800000F8@l(r5) +/* 803834C4 00380424 3C 80 43 1C */ lis r4, 0x431BDE83@ha +/* 803834C8 00380428 38 84 DE 83 */ addi r4, r4, 0x431BDE83@l +/* 803834CC 0038042C 90 6D AD 58 */ stw r3, lbl_805A9918@sda21(r13) +/* 803834D0 00380430 54 00 F0 BE */ srwi r0, r0, 2 +/* 803834D4 00380434 7C 04 00 16 */ mulhwu r0, r4, r0 +/* 803834D8 00380438 54 00 8B FE */ srwi r0, r0, 0xf +/* 803834DC 0038043C 1C 00 00 64 */ mulli r0, r0, 0x64 +/* 803834E0 00380440 54 1D E8 FE */ srwi r29, r0, 3 +/* 803834E4 00380444 3B C0 00 00 */ li r30, 0 +/* 803834E8 00380448 3F E0 CC 00 */ lis r31, 0xcc00 +lbl_803834EC: +/* 803834EC 0038044C 48 00 1E DD */ bl __OSGetSystemTime +/* 803834F0 00380450 80 CD AD 5C */ lwz r6, lbl_805A991C@sda21(r13) +/* 803834F4 00380454 6F C5 80 00 */ xoris r5, r30, 0x8000 +/* 803834F8 00380458 80 0D AD 58 */ lwz r0, lbl_805A9918@sda21(r13) +/* 803834FC 0038045C 7C 86 20 10 */ subfc r4, r6, r4 +/* 80383500 00380460 7C 00 19 10 */ subfe r0, r0, r3 +/* 80383504 00380464 6C 03 80 00 */ xoris r3, r0, 0x8000 +/* 80383508 00380468 7C 1D 20 10 */ subfc r0, r29, r4 +/* 8038350C 0038046C 7C A5 19 10 */ subfe r5, r5, r3 +/* 80383510 00380470 7C A3 19 10 */ subfe r5, r3, r3 +/* 80383514 00380474 7C A5 00 D1 */ neg. r5, r5 +/* 80383518 00380478 41 82 00 10 */ beq lbl_80383528 +/* 8038351C 0038047C 80 1F 30 00 */ lwz r0, 0x3000(r31) +/* 80383520 00380480 54 00 03 DF */ rlwinm. r0, r0, 0, 0xf, 0xf +/* 80383524 00380484 41 82 FF C8 */ beq lbl_803834EC +lbl_80383528: +/* 80383528 00380488 3C 60 CC 00 */ lis r3, 0xCC003000@ha +/* 8038352C 0038048C 80 03 30 00 */ lwz r0, 0xCC003000@l(r3) +/* 80383530 00380490 54 00 03 DF */ rlwinm. r0, r0, 0, 0xf, 0xf +/* 80383534 00380494 40 82 00 34 */ bne lbl_80383568 +/* 80383538 00380498 38 00 00 01 */ li r0, 1 +/* 8038353C 0038049C 90 0D AD 44 */ stw r0, lbl_805A9904@sda21(r13) +/* 80383540 003804A0 38 60 02 00 */ li r3, 0x200 +/* 80383544 003804A4 90 0D AD 48 */ stw r0, lbl_805A9908@sda21(r13) +/* 80383548 003804A8 4B FF E4 E1 */ bl __OSMaskInterrupts +/* 8038354C 003804AC 81 8D AD 40 */ lwz r12, lbl_805A9900@sda21(r13) +/* 80383550 003804B0 28 0C 00 00 */ cmplwi r12, 0 +/* 80383554 003804B4 41 82 00 14 */ beq lbl_80383568 +/* 80383558 003804B8 38 00 00 00 */ li r0, 0 +/* 8038355C 003804BC 7D 88 03 A6 */ mtlr r12 +/* 80383560 003804C0 90 0D AD 40 */ stw r0, lbl_805A9900@sda21(r13) +/* 80383564 003804C4 4E 80 00 21 */ blrl +lbl_80383568: +/* 80383568 003804C8 38 00 00 02 */ li r0, 2 +/* 8038356C 003804CC 3C 60 CC 00 */ lis r3, 0xCC003000@ha +/* 80383570 003804D0 90 03 30 00 */ stw r0, 0xCC003000@l(r3) +/* 80383574 003804D4 80 01 00 2C */ lwz r0, 0x2c(r1) +/* 80383578 003804D8 83 E1 00 24 */ lwz r31, 0x24(r1) +/* 8038357C 003804DC 83 C1 00 20 */ lwz r30, 0x20(r1) +/* 80383580 003804E0 83 A1 00 1C */ lwz r29, 0x1c(r1) +/* 80383584 003804E4 38 21 00 28 */ addi r1, r1, 0x28 +/* 80383588 003804E8 7C 08 03 A6 */ mtlr r0 +/* 8038358C 003804EC 4E 80 00 20 */ blr + +.global OSGetResetButtonState +OSGetResetButtonState: +/* 80383590 003804F0 7C 08 02 A6 */ mflr r0 +/* 80383594 003804F4 90 01 00 04 */ stw r0, 4(r1) +/* 80383598 003804F8 94 21 FF E8 */ stwu r1, -0x18(r1) +/* 8038359C 003804FC 93 E1 00 14 */ stw r31, 0x14(r1) +/* 803835A0 00380500 93 C1 00 10 */ stw r30, 0x10(r1) +/* 803835A4 00380504 93 A1 00 0C */ stw r29, 0xc(r1) +/* 803835A8 00380508 4B FF E0 B9 */ bl OSDisableInterrupts +/* 803835AC 0038050C 7C 7E 1B 78 */ mr r30, r3 +/* 803835B0 00380510 48 00 1E 19 */ bl __OSGetSystemTime +/* 803835B4 00380514 3C A0 CC 00 */ lis r5, 0xCC003000@ha +/* 803835B8 00380518 80 05 30 00 */ lwz r0, 0xCC003000@l(r5) +/* 803835BC 0038051C 54 00 03 DF */ rlwinm. r0, r0, 0, 0xf, 0xf +/* 803835C0 00380520 40 82 00 DC */ bne lbl_8038369C +/* 803835C4 00380524 80 0D AD 44 */ lwz r0, lbl_805A9904@sda21(r13) +/* 803835C8 00380528 2C 00 00 00 */ cmpwi r0, 0 +/* 803835CC 0038052C 40 82 00 40 */ bne lbl_8038360C +/* 803835D0 00380530 80 0D AD 50 */ lwz r0, lbl_805A9910@sda21(r13) +/* 803835D4 00380534 38 C0 00 00 */ li r6, 0 +/* 803835D8 00380538 80 AD AD 54 */ lwz r5, lbl_805A9914@sda21(r13) +/* 803835DC 0038053C 38 E0 00 01 */ li r7, 1 +/* 803835E0 00380540 7C 00 32 78 */ xor r0, r0, r6 +/* 803835E4 00380544 7C A5 32 78 */ xor r5, r5, r6 +/* 803835E8 00380548 90 ED AD 44 */ stw r7, lbl_805A9904@sda21(r13) +/* 803835EC 0038054C 7C A0 03 79 */ or. r0, r5, r0 +/* 803835F0 00380550 41 82 00 08 */ beq lbl_803835F8 +/* 803835F4 00380554 48 00 00 08 */ b lbl_803835FC +lbl_803835F8: +/* 803835F8 00380558 7C C7 33 78 */ mr r7, r6 +lbl_803835FC: +/* 803835FC 0038055C 90 8D AD 5C */ stw r4, lbl_805A991C@sda21(r13) +/* 80383600 00380560 7C FD 3B 78 */ mr r29, r7 +/* 80383604 00380564 90 6D AD 58 */ stw r3, lbl_805A9918@sda21(r13) +/* 80383608 00380568 48 00 01 48 */ b lbl_80383750 +lbl_8038360C: +/* 8038360C 0038056C 80 0D AD 50 */ lwz r0, lbl_805A9910@sda21(r13) +/* 80383610 00380570 39 20 00 00 */ li r9, 0 +/* 80383614 00380574 80 AD AD 54 */ lwz r5, lbl_805A9914@sda21(r13) +/* 80383618 00380578 39 40 00 01 */ li r10, 1 +/* 8038361C 0038057C 7C 00 4A 78 */ xor r0, r0, r9 +/* 80383620 00380580 7C A5 4A 78 */ xor r5, r5, r9 +/* 80383624 00380584 7C A0 03 79 */ or. r0, r5, r0 +/* 80383628 00380588 40 82 00 58 */ bne lbl_80383680 +/* 8038362C 0038058C 3C C0 80 00 */ lis r6, 0x800000F8@ha +/* 80383630 00380590 80 AD AD 5C */ lwz r5, lbl_805A991C@sda21(r13) +/* 80383634 00380594 80 E6 00 F8 */ lwz r7, 0x800000F8@l(r6) +/* 80383638 00380598 3C C0 43 1C */ lis r6, 0x431BDE83@ha +/* 8038363C 0038059C 39 06 DE 83 */ addi r8, r6, 0x431BDE83@l +/* 80383640 003805A0 80 0D AD 58 */ lwz r0, lbl_805A9918@sda21(r13) +/* 80383644 003805A4 54 E6 F0 BE */ srwi r6, r7, 2 +/* 80383648 003805A8 7C C8 30 16 */ mulhwu r6, r8, r6 +/* 8038364C 003805AC 54 C6 8B FE */ srwi r6, r6, 0xf +/* 80383650 003805B0 1C C6 00 64 */ mulli r6, r6, 0x64 +/* 80383654 003805B4 7C E5 20 10 */ subfc r7, r5, r4 +/* 80383658 003805B8 7C 00 19 10 */ subfe r0, r0, r3 +/* 8038365C 003805BC 54 C8 E8 FE */ srwi r8, r6, 3 +/* 80383660 003805C0 6C 05 80 00 */ xoris r5, r0, 0x8000 +/* 80383664 003805C4 6D 26 80 00 */ xoris r6, r9, 0x8000 +/* 80383668 003805C8 7C 07 40 10 */ subfc r0, r7, r8 +/* 8038366C 003805CC 7C A5 31 10 */ subfe r5, r5, r6 +/* 80383670 003805D0 7C A6 31 10 */ subfe r5, r6, r6 +/* 80383674 003805D4 7C A5 00 D1 */ neg. r5, r5 +/* 80383678 003805D8 40 82 00 08 */ bne lbl_80383680 +/* 8038367C 003805DC 7D 2A 4B 78 */ mr r10, r9 +lbl_80383680: +/* 80383680 003805E0 2C 0A 00 00 */ cmpwi r10, 0 +/* 80383684 003805E4 41 82 00 0C */ beq lbl_80383690 +/* 80383688 003805E8 38 00 00 01 */ li r0, 1 +/* 8038368C 003805EC 48 00 00 08 */ b lbl_80383694 +lbl_80383690: +/* 80383690 003805F0 38 00 00 00 */ li r0, 0 +lbl_80383694: +/* 80383694 003805F4 7C 1D 03 78 */ mr r29, r0 +/* 80383698 003805F8 48 00 00 B8 */ b lbl_80383750 +lbl_8038369C: +/* 8038369C 003805FC 80 0D AD 44 */ lwz r0, lbl_805A9904@sda21(r13) +/* 803836A0 00380600 2C 00 00 00 */ cmpwi r0, 0 +/* 803836A4 00380604 41 82 00 34 */ beq lbl_803836D8 +/* 803836A8 00380608 80 AD AD 48 */ lwz r5, lbl_805A9908@sda21(r13) +/* 803836AC 0038060C 38 00 00 00 */ li r0, 0 +/* 803836B0 00380610 90 0D AD 44 */ stw r0, lbl_805A9904@sda21(r13) +/* 803836B4 00380614 2C 05 00 00 */ cmpwi r5, 0 +/* 803836B8 00380618 3B A5 00 00 */ addi r29, r5, 0 +/* 803836BC 0038061C 41 82 00 10 */ beq lbl_803836CC +/* 803836C0 00380620 90 8D AD 54 */ stw r4, lbl_805A9914@sda21(r13) +/* 803836C4 00380624 90 6D AD 50 */ stw r3, lbl_805A9910@sda21(r13) +/* 803836C8 00380628 48 00 00 88 */ b lbl_80383750 +lbl_803836CC: +/* 803836CC 0038062C 90 0D AD 54 */ stw r0, lbl_805A9914@sda21(r13) +/* 803836D0 00380630 90 0D AD 50 */ stw r0, lbl_805A9910@sda21(r13) +/* 803836D4 00380634 48 00 00 7C */ b lbl_80383750 +lbl_803836D8: +/* 803836D8 00380638 80 CD AD 50 */ lwz r6, lbl_805A9910@sda21(r13) +/* 803836DC 0038063C 39 00 00 00 */ li r8, 0 +/* 803836E0 00380640 80 ED AD 54 */ lwz r7, lbl_805A9914@sda21(r13) +/* 803836E4 00380644 7C C0 42 78 */ xor r0, r6, r8 +/* 803836E8 00380648 7C E5 42 78 */ xor r5, r7, r8 +/* 803836EC 0038064C 7C A0 03 79 */ or. r0, r5, r0 +/* 803836F0 00380650 41 82 00 50 */ beq lbl_80383740 +/* 803836F4 00380654 3C A0 80 00 */ lis r5, 0x800000F8@ha +/* 803836F8 00380658 80 05 00 F8 */ lwz r0, 0x800000F8@l(r5) +/* 803836FC 0038065C 3C A0 10 62 */ lis r5, 0x10624DD3@ha +/* 80383700 00380660 38 A5 4D D3 */ addi r5, r5, 0x10624DD3@l +/* 80383704 00380664 54 00 F0 BE */ srwi r0, r0, 2 +/* 80383708 00380668 7C 05 00 16 */ mulhwu r0, r5, r0 +/* 8038370C 0038066C 54 00 D1 BE */ srwi r0, r0, 6 +/* 80383710 00380670 1C 00 00 28 */ mulli r0, r0, 0x28 +/* 80383714 00380674 7C E7 20 10 */ subfc r7, r7, r4 +/* 80383718 00380678 7C A6 19 10 */ subfe r5, r6, r3 +/* 8038371C 0038067C 6C A6 80 00 */ xoris r6, r5, 0x8000 +/* 80383720 00380680 6D 05 80 00 */ xoris r5, r8, 0x8000 +/* 80383724 00380684 7C 00 38 10 */ subfc r0, r0, r7 +/* 80383728 00380688 7C A5 31 10 */ subfe r5, r5, r6 +/* 8038372C 0038068C 7C A6 31 10 */ subfe r5, r6, r6 +/* 80383730 00380690 7C A5 00 D1 */ neg. r5, r5 +/* 80383734 00380694 41 82 00 0C */ beq lbl_80383740 +/* 80383738 00380698 3B A0 00 01 */ li r29, 1 +/* 8038373C 0038069C 48 00 00 14 */ b lbl_80383750 +lbl_80383740: +/* 80383740 003806A0 38 00 00 00 */ li r0, 0 +/* 80383744 003806A4 90 0D AD 54 */ stw r0, lbl_805A9914@sda21(r13) +/* 80383748 003806A8 3B A0 00 00 */ li r29, 0 +/* 8038374C 003806AC 90 0D AD 50 */ stw r0, lbl_805A9910@sda21(r13) +lbl_80383750: +/* 80383750 003806B0 3C A0 80 00 */ lis r5, 0x800030E3@ha +/* 80383754 003806B4 93 AD AD 48 */ stw r29, lbl_805A9908@sda21(r13) +/* 80383758 003806B8 88 05 30 E3 */ lbz r0, 0x800030E3@l(r5) +/* 8038375C 003806BC 54 00 06 BF */ clrlwi. r0, r0, 0x1a +/* 80383760 003806C0 41 82 00 A0 */ beq lbl_80383800 +/* 80383764 003806C4 1D 40 00 3C */ mulli r10, r0, 0x3c +/* 80383768 003806C8 80 05 00 F8 */ lwz r0, 0xf8(r5) +/* 8038376C 003806CC 81 2D AC EC */ lwz r9, lbl_805A98AC@sda21(r13) +/* 80383770 003806D0 81 0D AC E8 */ lwz r8, lbl_805A98A8@sda21(r13) +/* 80383774 003806D4 54 06 F0 BE */ srwi r6, r0, 2 +/* 80383778 003806D8 7D 40 FE 70 */ srawi r0, r10, 0x1f +/* 8038377C 003806DC 7C E0 31 D6 */ mullw r7, r0, r6 +/* 80383780 003806E0 7C 0A 30 16 */ mulhwu r0, r10, r6 +/* 80383784 003806E4 7C AA 31 D6 */ mullw r5, r10, r6 +/* 80383788 003806E8 7D 29 28 14 */ addc r9, r9, r5 +/* 8038378C 003806EC 3B E0 00 00 */ li r31, 0 +/* 80383790 003806F0 7C E7 02 14 */ add r7, r7, r0 +/* 80383794 003806F4 7C 0A F9 D6 */ mullw r0, r10, r31 +/* 80383798 003806F8 7C 07 02 14 */ add r0, r7, r0 +/* 8038379C 003806FC 7D 08 01 14 */ adde r8, r8, r0 +/* 803837A0 00380700 6D 07 80 00 */ xoris r7, r8, 0x8000 +/* 803837A4 00380704 6C 65 80 00 */ xoris r5, r3, 0x8000 +/* 803837A8 00380708 7C 04 48 10 */ subfc r0, r4, r9 +/* 803837AC 0038070C 7C A5 39 10 */ subfe r5, r5, r7 +/* 803837B0 00380710 7C A7 39 10 */ subfe r5, r7, r7 +/* 803837B4 00380714 7C A5 00 D1 */ neg. r5, r5 +/* 803837B8 00380718 41 82 00 48 */ beq lbl_80383800 +/* 803837BC 0038071C 7C 89 20 10 */ subfc r4, r9, r4 +/* 803837C0 00380720 7C 68 19 10 */ subfe r3, r8, r3 +/* 803837C4 00380724 38 A0 00 00 */ li r5, 0 +/* 803837C8 00380728 48 00 64 05 */ bl __div2i +/* 803837CC 0038072C 38 A0 00 00 */ li r5, 0 +/* 803837D0 00380730 38 C0 00 02 */ li r6, 2 +/* 803837D4 00380734 48 00 63 F9 */ bl __div2i +/* 803837D8 00380738 38 00 00 01 */ li r0, 1 +/* 803837DC 0038073C 7C 84 00 38 */ and r4, r4, r0 +/* 803837E0 00380740 7C 60 F8 38 */ and r0, r3, r31 +/* 803837E4 00380744 7C 83 FA 78 */ xor r3, r4, r31 +/* 803837E8 00380748 7C 00 FA 78 */ xor r0, r0, r31 +/* 803837EC 0038074C 7C 60 03 79 */ or. r0, r3, r0 +/* 803837F0 00380750 40 82 00 0C */ bne lbl_803837FC +/* 803837F4 00380754 3B A0 00 01 */ li r29, 1 +/* 803837F8 00380758 48 00 00 08 */ b lbl_80383800 +lbl_803837FC: +/* 803837FC 0038075C 3B A0 00 00 */ li r29, 0 +lbl_80383800: +/* 80383800 00380760 7F C3 F3 78 */ mr r3, r30 +/* 80383804 00380764 4B FF DE 85 */ bl OSRestoreInterrupts +/* 80383808 00380768 7F A3 EB 78 */ mr r3, r29 +/* 8038380C 0038076C 80 01 00 1C */ lwz r0, 0x1c(r1) +/* 80383810 00380770 83 E1 00 14 */ lwz r31, 0x14(r1) +/* 80383814 00380774 83 C1 00 10 */ lwz r30, 0x10(r1) +/* 80383818 00380778 83 A1 00 0C */ lwz r29, 0xc(r1) +/* 8038381C 0038077C 38 21 00 18 */ addi r1, r1, 0x18 +/* 80383820 00380780 7C 08 03 A6 */ mtlr r0 +/* 80383824 00380784 4E 80 00 20 */ blr diff --git a/asm/Dolphin/OS/OSRtc.s b/asm/Dolphin/OS/OSRtc.s new file mode 100644 index 00000000..33a2b52f --- /dev/null +++ b/asm/Dolphin/OS/OSRtc.s @@ -0,0 +1,851 @@ +.include "macros.inc" + +.section .text, "ax" + +.global WriteSramCallback +WriteSramCallback: +/* 80383828 00380788 7C 08 02 A6 */ mflr r0 +/* 8038382C 0038078C 3C 60 80 54 */ lis r3, lbl_805415A0@ha +/* 80383830 00380790 90 01 00 04 */ stw r0, 4(r1) +/* 80383834 00380794 94 21 FF E8 */ stwu r1, -0x18(r1) +/* 80383838 00380798 93 E1 00 14 */ stw r31, 0x14(r1) +/* 8038383C 0038079C 3B E3 15 A0 */ addi r31, r3, lbl_805415A0@l +/* 80383840 003807A0 93 C1 00 10 */ stw r30, 0x10(r1) +/* 80383844 003807A4 3B DF 00 40 */ addi r30, r31, 0x40 +/* 80383848 003807A8 80 9F 00 40 */ lwz r4, 0x40(r31) +/* 8038384C 003807AC 7C 7F 22 14 */ add r3, r31, r4 +/* 80383850 003807B0 20 A4 00 40 */ subfic r5, r4, 0x40 +/* 80383854 003807B4 48 00 00 35 */ bl WriteSram +/* 80383858 003807B8 90 7F 00 4C */ stw r3, 0x4c(r31) +/* 8038385C 003807BC 80 1F 00 4C */ lwz r0, 0x4c(r31) +/* 80383860 003807C0 2C 00 00 00 */ cmpwi r0, 0 +/* 80383864 003807C4 41 82 00 0C */ beq lbl_80383870 +/* 80383868 003807C8 38 00 00 40 */ li r0, 0x40 +/* 8038386C 003807CC 90 1E 00 00 */ stw r0, 0(r30) +lbl_80383870: +/* 80383870 003807D0 80 01 00 1C */ lwz r0, 0x1c(r1) +/* 80383874 003807D4 83 E1 00 14 */ lwz r31, 0x14(r1) +/* 80383878 003807D8 83 C1 00 10 */ lwz r30, 0x10(r1) +/* 8038387C 003807DC 38 21 00 18 */ addi r1, r1, 0x18 +/* 80383880 003807E0 7C 08 03 A6 */ mtlr r0 +/* 80383884 003807E4 4E 80 00 20 */ blr + +.global WriteSram +WriteSram: +/* 80383888 003807E8 7C 08 02 A6 */ mflr r0 +/* 8038388C 003807EC 3C C0 80 38 */ lis r6, WriteSramCallback@ha +/* 80383890 003807F0 90 01 00 04 */ stw r0, 4(r1) +/* 80383894 003807F4 38 06 38 28 */ addi r0, r6, WriteSramCallback@l +/* 80383898 003807F8 94 21 FF D8 */ stwu r1, -0x28(r1) +/* 8038389C 003807FC 93 E1 00 24 */ stw r31, 0x24(r1) +/* 803838A0 00380800 3B E4 00 00 */ addi r31, r4, 0 +/* 803838A4 00380804 38 80 00 01 */ li r4, 1 +/* 803838A8 00380808 93 C1 00 20 */ stw r30, 0x20(r1) +/* 803838AC 0038080C 3B C5 00 00 */ addi r30, r5, 0 +/* 803838B0 00380810 7C 05 03 78 */ mr r5, r0 +/* 803838B4 00380814 93 A1 00 1C */ stw r29, 0x1c(r1) +/* 803838B8 00380818 3B A3 00 00 */ addi r29, r3, 0 +/* 803838BC 0038081C 38 60 00 00 */ li r3, 0 +/* 803838C0 00380820 48 03 DA A5 */ bl EXILock +/* 803838C4 00380824 2C 03 00 00 */ cmpwi r3, 0 +/* 803838C8 00380828 40 82 00 0C */ bne lbl_803838D4 +/* 803838CC 0038082C 38 60 00 00 */ li r3, 0 +/* 803838D0 00380830 48 00 00 B4 */ b lbl_80383984 +lbl_803838D4: +/* 803838D4 00380834 38 60 00 00 */ li r3, 0 +/* 803838D8 00380838 38 80 00 01 */ li r4, 1 +/* 803838DC 0038083C 38 A0 00 03 */ li r5, 3 +/* 803838E0 00380840 48 03 D3 7D */ bl EXISelect +/* 803838E4 00380844 2C 03 00 00 */ cmpwi r3, 0 +/* 803838E8 00380848 40 82 00 14 */ bne lbl_803838FC +/* 803838EC 0038084C 38 60 00 00 */ li r3, 0 +/* 803838F0 00380850 48 03 DB 69 */ bl EXIUnlock +/* 803838F4 00380854 38 60 00 00 */ li r3, 0 +/* 803838F8 00380858 48 00 00 8C */ b lbl_80383984 +lbl_803838FC: +/* 803838FC 0038085C 57 FF 30 32 */ slwi r31, r31, 6 +/* 80383900 00380860 38 1F 01 00 */ addi r0, r31, 0x100 +/* 80383904 00380864 64 00 A0 00 */ oris r0, r0, 0xa000 +/* 80383908 00380868 90 01 00 14 */ stw r0, 0x14(r1) +/* 8038390C 0038086C 38 81 00 14 */ addi r4, r1, 0x14 +/* 80383910 00380870 38 60 00 00 */ li r3, 0 +/* 80383914 00380874 38 A0 00 04 */ li r5, 4 +/* 80383918 00380878 38 C0 00 01 */ li r6, 1 +/* 8038391C 0038087C 38 E0 00 00 */ li r7, 0 +/* 80383920 00380880 48 03 C7 E9 */ bl EXIImm +/* 80383924 00380884 7C 60 00 34 */ cntlzw r0, r3 +/* 80383928 00380888 54 1F D9 7E */ srwi r31, r0, 5 +/* 8038392C 0038088C 38 60 00 00 */ li r3, 0 +/* 80383930 00380890 48 03 CB C1 */ bl sub_803c04f0 +/* 80383934 00380894 7C 60 00 34 */ cntlzw r0, r3 +/* 80383938 00380898 54 00 D9 7E */ srwi r0, r0, 5 +/* 8038393C 0038089C 38 9D 00 00 */ addi r4, r29, 0 +/* 80383940 003808A0 38 BE 00 00 */ addi r5, r30, 0 +/* 80383944 003808A4 7F FF 03 78 */ or r31, r31, r0 +/* 80383948 003808A8 38 60 00 00 */ li r3, 0 +/* 8038394C 003808AC 38 C0 00 01 */ li r6, 1 +/* 80383950 003808B0 48 03 CA 15 */ bl EXIImmEx +/* 80383954 003808B4 7C 60 00 34 */ cntlzw r0, r3 +/* 80383958 003808B8 54 00 D9 7E */ srwi r0, r0, 5 +/* 8038395C 003808BC 7F FF 03 78 */ or r31, r31, r0 +/* 80383960 003808C0 38 60 00 00 */ li r3, 0 +/* 80383964 003808C4 48 03 D4 25 */ bl EXIDeselect +/* 80383968 003808C8 7C 60 00 34 */ cntlzw r0, r3 +/* 8038396C 003808CC 54 00 D9 7E */ srwi r0, r0, 5 +/* 80383970 003808D0 7F FF 03 78 */ or r31, r31, r0 +/* 80383974 003808D4 38 60 00 00 */ li r3, 0 +/* 80383978 003808D8 48 03 DA E1 */ bl EXIUnlock +/* 8038397C 003808DC 7F E0 00 34 */ cntlzw r0, r31 +/* 80383980 003808E0 54 03 D9 7E */ srwi r3, r0, 5 +lbl_80383984: +/* 80383984 003808E4 80 01 00 2C */ lwz r0, 0x2c(r1) +/* 80383988 003808E8 83 E1 00 24 */ lwz r31, 0x24(r1) +/* 8038398C 003808EC 83 C1 00 20 */ lwz r30, 0x20(r1) +/* 80383990 003808F0 83 A1 00 1C */ lwz r29, 0x1c(r1) +/* 80383994 003808F4 38 21 00 28 */ addi r1, r1, 0x28 +/* 80383998 003808F8 7C 08 03 A6 */ mtlr r0 +/* 8038399C 003808FC 4E 80 00 20 */ blr + +.global sub_803839a0 +sub_803839a0: +/* 803839A0 00380900 7C 08 02 A6 */ mflr r0 +/* 803839A4 00380904 3C 60 80 54 */ lis r3, lbl_805415A0@ha +/* 803839A8 00380908 90 01 00 04 */ stw r0, 4(r1) +/* 803839AC 0038090C 38 80 00 40 */ li r4, 0x40 +/* 803839B0 00380910 94 21 FF E8 */ stwu r1, -0x18(r1) +/* 803839B4 00380914 93 E1 00 14 */ stw r31, 0x14(r1) +/* 803839B8 00380918 3B E0 00 00 */ li r31, 0 +/* 803839BC 0038091C 93 C1 00 10 */ stw r30, 0x10(r1) +/* 803839C0 00380920 3B C3 15 A0 */ addi r30, r3, lbl_805415A0@l +/* 803839C4 00380924 38 7E 00 00 */ addi r3, r30, 0 +/* 803839C8 00380928 93 FE 00 44 */ stw r31, 0x44(r30) +/* 803839CC 0038092C 93 FE 00 48 */ stw r31, 0x48(r30) +/* 803839D0 00380930 4B FF B0 B5 */ bl DCInvalidateRange +/* 803839D4 00380934 38 60 00 00 */ li r3, 0 +/* 803839D8 00380938 38 80 00 01 */ li r4, 1 +/* 803839DC 0038093C 38 A0 00 00 */ li r5, 0 +/* 803839E0 00380940 48 03 D9 85 */ bl EXILock +/* 803839E4 00380944 2C 03 00 00 */ cmpwi r3, 0 +/* 803839E8 00380948 40 82 00 08 */ bne lbl_803839F0 +/* 803839EC 0038094C 48 00 00 C4 */ b lbl_80383AB0 +lbl_803839F0: +/* 803839F0 00380950 38 60 00 00 */ li r3, 0 +/* 803839F4 00380954 38 80 00 01 */ li r4, 1 +/* 803839F8 00380958 38 A0 00 03 */ li r5, 3 +/* 803839FC 0038095C 48 03 D2 61 */ bl EXISelect +/* 80383A00 00380960 2C 03 00 00 */ cmpwi r3, 0 +/* 80383A04 00380964 40 82 00 10 */ bne lbl_80383A14 +/* 80383A08 00380968 38 60 00 00 */ li r3, 0 +/* 80383A0C 0038096C 48 03 DA 4D */ bl EXIUnlock +/* 80383A10 00380970 48 00 00 A0 */ b lbl_80383AB0 +lbl_80383A14: +/* 80383A14 00380974 3C 60 20 00 */ lis r3, 0x20000100@ha +/* 80383A18 00380978 38 03 01 00 */ addi r0, r3, 0x20000100@l +/* 80383A1C 0038097C 90 01 00 08 */ stw r0, 8(r1) +/* 80383A20 00380980 38 81 00 08 */ addi r4, r1, 8 +/* 80383A24 00380984 38 60 00 00 */ li r3, 0 +/* 80383A28 00380988 38 A0 00 04 */ li r5, 4 +/* 80383A2C 0038098C 38 C0 00 01 */ li r6, 1 +/* 80383A30 00380990 38 E0 00 00 */ li r7, 0 +/* 80383A34 00380994 48 03 C6 D5 */ bl EXIImm +/* 80383A38 00380998 7C 60 00 34 */ cntlzw r0, r3 +/* 80383A3C 0038099C 54 1F D9 7E */ srwi r31, r0, 5 +/* 80383A40 003809A0 38 60 00 00 */ li r3, 0 +/* 80383A44 003809A4 48 03 CA AD */ bl sub_803c04f0 +/* 80383A48 003809A8 7C 60 00 34 */ cntlzw r0, r3 +/* 80383A4C 003809AC 54 00 D9 7E */ srwi r0, r0, 5 +/* 80383A50 003809B0 38 9E 00 00 */ addi r4, r30, 0 +/* 80383A54 003809B4 7F FF 03 78 */ or r31, r31, r0 +/* 80383A58 003809B8 38 60 00 00 */ li r3, 0 +/* 80383A5C 003809BC 38 A0 00 40 */ li r5, 0x40 +/* 80383A60 003809C0 38 C0 00 00 */ li r6, 0 +/* 80383A64 003809C4 38 E0 00 00 */ li r7, 0 +/* 80383A68 003809C8 48 03 C9 9D */ bl EXIDma +/* 80383A6C 003809CC 7C 60 00 34 */ cntlzw r0, r3 +/* 80383A70 003809D0 54 00 D9 7E */ srwi r0, r0, 5 +/* 80383A74 003809D4 7F FF 03 78 */ or r31, r31, r0 +/* 80383A78 003809D8 38 60 00 00 */ li r3, 0 +/* 80383A7C 003809DC 48 03 CA 75 */ bl sub_803c04f0 +/* 80383A80 003809E0 7C 60 00 34 */ cntlzw r0, r3 +/* 80383A84 003809E4 54 00 D9 7E */ srwi r0, r0, 5 +/* 80383A88 003809E8 7F FF 03 78 */ or r31, r31, r0 +/* 80383A8C 003809EC 38 60 00 00 */ li r3, 0 +/* 80383A90 003809F0 48 03 D2 F9 */ bl EXIDeselect +/* 80383A94 003809F4 7C 60 00 34 */ cntlzw r0, r3 +/* 80383A98 003809F8 54 00 D9 7E */ srwi r0, r0, 5 +/* 80383A9C 003809FC 7F FF 03 78 */ or r31, r31, r0 +/* 80383AA0 00380A00 38 60 00 00 */ li r3, 0 +/* 80383AA4 00380A04 48 03 D9 B5 */ bl EXIUnlock +/* 80383AA8 00380A08 7F E0 00 34 */ cntlzw r0, r31 +/* 80383AAC 00380A0C 54 1F D9 7E */ srwi r31, r0, 5 +lbl_80383AB0: +/* 80383AB0 00380A10 93 FE 00 4C */ stw r31, 0x4c(r30) +/* 80383AB4 00380A14 38 00 00 40 */ li r0, 0x40 +/* 80383AB8 00380A18 90 1E 00 40 */ stw r0, 0x40(r30) +/* 80383ABC 00380A1C 80 01 00 1C */ lwz r0, 0x1c(r1) +/* 80383AC0 00380A20 83 E1 00 14 */ lwz r31, 0x14(r1) +/* 80383AC4 00380A24 83 C1 00 10 */ lwz r30, 0x10(r1) +/* 80383AC8 00380A28 38 21 00 18 */ addi r1, r1, 0x18 +/* 80383ACC 00380A2C 7C 08 03 A6 */ mtlr r0 +/* 80383AD0 00380A30 4E 80 00 20 */ blr + +.global __OSLockSram +__OSLockSram: +/* 80383AD4 00380A34 7C 08 02 A6 */ mflr r0 +/* 80383AD8 00380A38 3C 60 80 54 */ lis r3, lbl_805415A0@ha +/* 80383ADC 00380A3C 90 01 00 04 */ stw r0, 4(r1) +/* 80383AE0 00380A40 94 21 FF F0 */ stwu r1, -0x10(r1) +/* 80383AE4 00380A44 93 E1 00 0C */ stw r31, 0xc(r1) +/* 80383AE8 00380A48 3B E3 15 A0 */ addi r31, r3, lbl_805415A0@l +/* 80383AEC 00380A4C 4B FF DB 75 */ bl OSDisableInterrupts +/* 80383AF0 00380A50 80 1F 00 48 */ lwz r0, 0x48(r31) +/* 80383AF4 00380A54 38 9F 00 48 */ addi r4, r31, 0x48 +/* 80383AF8 00380A58 2C 00 00 00 */ cmpwi r0, 0 +/* 80383AFC 00380A5C 41 82 00 10 */ beq lbl_80383B0C +/* 80383B00 00380A60 4B FF DB 89 */ bl OSRestoreInterrupts +/* 80383B04 00380A64 3B E0 00 00 */ li r31, 0 +/* 80383B08 00380A68 48 00 00 10 */ b lbl_80383B18 +lbl_80383B0C: +/* 80383B0C 00380A6C 90 7F 00 44 */ stw r3, 0x44(r31) +/* 80383B10 00380A70 38 00 00 01 */ li r0, 1 +/* 80383B14 00380A74 90 04 00 00 */ stw r0, 0(r4) +lbl_80383B18: +/* 80383B18 00380A78 7F E3 FB 78 */ mr r3, r31 +/* 80383B1C 00380A7C 80 01 00 14 */ lwz r0, 0x14(r1) +/* 80383B20 00380A80 83 E1 00 0C */ lwz r31, 0xc(r1) +/* 80383B24 00380A84 38 21 00 10 */ addi r1, r1, 0x10 +/* 80383B28 00380A88 7C 08 03 A6 */ mtlr r0 +/* 80383B2C 00380A8C 4E 80 00 20 */ blr + +.global __OSLockSramEx +__OSLockSramEx: +/* 80383B30 00380A90 7C 08 02 A6 */ mflr r0 +/* 80383B34 00380A94 3C 60 80 54 */ lis r3, lbl_805415A0@ha +/* 80383B38 00380A98 90 01 00 04 */ stw r0, 4(r1) +/* 80383B3C 00380A9C 94 21 FF F0 */ stwu r1, -0x10(r1) +/* 80383B40 00380AA0 93 E1 00 0C */ stw r31, 0xc(r1) +/* 80383B44 00380AA4 3B E3 15 A0 */ addi r31, r3, lbl_805415A0@l +/* 80383B48 00380AA8 4B FF DB 19 */ bl OSDisableInterrupts +/* 80383B4C 00380AAC 80 1F 00 48 */ lwz r0, 0x48(r31) +/* 80383B50 00380AB0 38 9F 00 48 */ addi r4, r31, 0x48 +/* 80383B54 00380AB4 2C 00 00 00 */ cmpwi r0, 0 +/* 80383B58 00380AB8 41 82 00 10 */ beq lbl_80383B68 +/* 80383B5C 00380ABC 4B FF DB 2D */ bl OSRestoreInterrupts +/* 80383B60 00380AC0 38 60 00 00 */ li r3, 0 +/* 80383B64 00380AC4 48 00 00 14 */ b lbl_80383B78 +lbl_80383B68: +/* 80383B68 00380AC8 90 7F 00 44 */ stw r3, 0x44(r31) +/* 80383B6C 00380ACC 38 00 00 01 */ li r0, 1 +/* 80383B70 00380AD0 38 7F 00 14 */ addi r3, r31, 0x14 +/* 80383B74 00380AD4 90 04 00 00 */ stw r0, 0(r4) +lbl_80383B78: +/* 80383B78 00380AD8 80 01 00 14 */ lwz r0, 0x14(r1) +/* 80383B7C 00380ADC 83 E1 00 0C */ lwz r31, 0xc(r1) +/* 80383B80 00380AE0 38 21 00 10 */ addi r1, r1, 0x10 +/* 80383B84 00380AE4 7C 08 03 A6 */ mtlr r0 +/* 80383B88 00380AE8 4E 80 00 20 */ blr + +.global sub_80383b8c +sub_80383b8c: +/* 80383B8C 00380AEC 7C 08 02 A6 */ mflr r0 +/* 80383B90 00380AF0 2C 03 00 00 */ cmpwi r3, 0 +/* 80383B94 00380AF4 90 01 00 04 */ stw r0, 4(r1) +/* 80383B98 00380AF8 3C 60 80 54 */ lis r3, lbl_805415A0@ha +/* 80383B9C 00380AFC 94 21 FF D0 */ stwu r1, -0x30(r1) +/* 80383BA0 00380B00 BF 61 00 1C */ stmw r27, 0x1c(r1) +/* 80383BA4 00380B04 3B E3 15 A0 */ addi r31, r3, lbl_805415A0@l +/* 80383BA8 00380B08 41 82 02 C4 */ beq lbl_80383E6C +/* 80383BAC 00380B0C 28 04 00 00 */ cmplwi r4, 0 +/* 80383BB0 00380B10 40 82 01 B0 */ bne lbl_80383D60 +/* 80383BB4 00380B14 88 7F 00 13 */ lbz r3, 0x13(r31) +/* 80383BB8 00380B18 54 60 07 BE */ clrlwi r0, r3, 0x1e +/* 80383BBC 00380B1C 28 00 00 02 */ cmplwi r0, 2 +/* 80383BC0 00380B20 40 81 00 0C */ ble lbl_80383BCC +/* 80383BC4 00380B24 54 60 00 3A */ rlwinm r0, r3, 0, 0, 0x1d +/* 80383BC8 00380B28 98 1F 00 13 */ stb r0, 0x13(r31) +lbl_80383BCC: +/* 80383BCC 00380B2C 38 00 00 00 */ li r0, 0 +/* 80383BD0 00380B30 B0 1F 00 02 */ sth r0, 2(r31) +/* 80383BD4 00380B34 38 BF 00 14 */ addi r5, r31, 0x14 +/* 80383BD8 00380B38 38 DF 00 0C */ addi r6, r31, 0xc +/* 80383BDC 00380B3C 38 65 00 01 */ addi r3, r5, 1 +/* 80383BE0 00380B40 B0 1F 00 00 */ sth r0, 0(r31) +/* 80383BE4 00380B44 7C 66 18 50 */ subf r3, r6, r3 +/* 80383BE8 00380B48 7C 06 28 40 */ cmplw r6, r5 +/* 80383BEC 00380B4C 54 63 F8 7E */ srwi r3, r3, 1 +/* 80383BF0 00380B50 40 80 01 70 */ bge lbl_80383D60 +/* 80383BF4 00380B54 54 60 E8 FF */ rlwinm. r0, r3, 0x1d, 3, 0x1f +/* 80383BF8 00380B58 7C 09 03 A6 */ mtctr r0 +/* 80383BFC 00380B5C 41 82 01 34 */ beq lbl_80383D30 +lbl_80383C00: +/* 80383C00 00380B60 A0 BF 00 00 */ lhz r5, 0(r31) +/* 80383C04 00380B64 A0 06 00 00 */ lhz r0, 0(r6) +/* 80383C08 00380B68 7C 05 02 14 */ add r0, r5, r0 +/* 80383C0C 00380B6C B0 1F 00 00 */ sth r0, 0(r31) +/* 80383C10 00380B70 A0 06 00 00 */ lhz r0, 0(r6) +/* 80383C14 00380B74 A0 BF 00 02 */ lhz r5, 2(r31) +/* 80383C18 00380B78 7C 00 00 F8 */ nor r0, r0, r0 +/* 80383C1C 00380B7C 7C 05 02 14 */ add r0, r5, r0 +/* 80383C20 00380B80 B0 1F 00 02 */ sth r0, 2(r31) +/* 80383C24 00380B84 A0 BF 00 00 */ lhz r5, 0(r31) +/* 80383C28 00380B88 A0 06 00 02 */ lhz r0, 2(r6) +/* 80383C2C 00380B8C 7C 05 02 14 */ add r0, r5, r0 +/* 80383C30 00380B90 B0 1F 00 00 */ sth r0, 0(r31) +/* 80383C34 00380B94 A0 06 00 02 */ lhz r0, 2(r6) +/* 80383C38 00380B98 A0 BF 00 02 */ lhz r5, 2(r31) +/* 80383C3C 00380B9C 7C 00 00 F8 */ nor r0, r0, r0 +/* 80383C40 00380BA0 7C 05 02 14 */ add r0, r5, r0 +/* 80383C44 00380BA4 B0 1F 00 02 */ sth r0, 2(r31) +/* 80383C48 00380BA8 A0 BF 00 00 */ lhz r5, 0(r31) +/* 80383C4C 00380BAC A0 06 00 04 */ lhz r0, 4(r6) +/* 80383C50 00380BB0 7C 05 02 14 */ add r0, r5, r0 +/* 80383C54 00380BB4 B0 1F 00 00 */ sth r0, 0(r31) +/* 80383C58 00380BB8 A0 06 00 04 */ lhz r0, 4(r6) +/* 80383C5C 00380BBC A0 BF 00 02 */ lhz r5, 2(r31) +/* 80383C60 00380BC0 7C 00 00 F8 */ nor r0, r0, r0 +/* 80383C64 00380BC4 7C 05 02 14 */ add r0, r5, r0 +/* 80383C68 00380BC8 B0 1F 00 02 */ sth r0, 2(r31) +/* 80383C6C 00380BCC A0 BF 00 00 */ lhz r5, 0(r31) +/* 80383C70 00380BD0 A0 06 00 06 */ lhz r0, 6(r6) +/* 80383C74 00380BD4 7C 05 02 14 */ add r0, r5, r0 +/* 80383C78 00380BD8 B0 1F 00 00 */ sth r0, 0(r31) +/* 80383C7C 00380BDC A0 06 00 06 */ lhz r0, 6(r6) +/* 80383C80 00380BE0 A0 BF 00 02 */ lhz r5, 2(r31) +/* 80383C84 00380BE4 7C 00 00 F8 */ nor r0, r0, r0 +/* 80383C88 00380BE8 7C 05 02 14 */ add r0, r5, r0 +/* 80383C8C 00380BEC B0 1F 00 02 */ sth r0, 2(r31) +/* 80383C90 00380BF0 A0 BF 00 00 */ lhz r5, 0(r31) +/* 80383C94 00380BF4 A0 06 00 08 */ lhz r0, 8(r6) +/* 80383C98 00380BF8 7C 05 02 14 */ add r0, r5, r0 +/* 80383C9C 00380BFC B0 1F 00 00 */ sth r0, 0(r31) +/* 80383CA0 00380C00 A0 06 00 08 */ lhz r0, 8(r6) +/* 80383CA4 00380C04 A0 BF 00 02 */ lhz r5, 2(r31) +/* 80383CA8 00380C08 7C 00 00 F8 */ nor r0, r0, r0 +/* 80383CAC 00380C0C 7C 05 02 14 */ add r0, r5, r0 +/* 80383CB0 00380C10 B0 1F 00 02 */ sth r0, 2(r31) +/* 80383CB4 00380C14 A0 BF 00 00 */ lhz r5, 0(r31) +/* 80383CB8 00380C18 A0 06 00 0A */ lhz r0, 0xa(r6) +/* 80383CBC 00380C1C 7C 05 02 14 */ add r0, r5, r0 +/* 80383CC0 00380C20 B0 1F 00 00 */ sth r0, 0(r31) +/* 80383CC4 00380C24 A0 06 00 0A */ lhz r0, 0xa(r6) +/* 80383CC8 00380C28 A0 BF 00 02 */ lhz r5, 2(r31) +/* 80383CCC 00380C2C 7C 00 00 F8 */ nor r0, r0, r0 +/* 80383CD0 00380C30 7C 05 02 14 */ add r0, r5, r0 +/* 80383CD4 00380C34 B0 1F 00 02 */ sth r0, 2(r31) +/* 80383CD8 00380C38 A0 BF 00 00 */ lhz r5, 0(r31) +/* 80383CDC 00380C3C A0 06 00 0C */ lhz r0, 0xc(r6) +/* 80383CE0 00380C40 7C 05 02 14 */ add r0, r5, r0 +/* 80383CE4 00380C44 B0 1F 00 00 */ sth r0, 0(r31) +/* 80383CE8 00380C48 A0 06 00 0C */ lhz r0, 0xc(r6) +/* 80383CEC 00380C4C A0 BF 00 02 */ lhz r5, 2(r31) +/* 80383CF0 00380C50 7C 00 00 F8 */ nor r0, r0, r0 +/* 80383CF4 00380C54 7C 05 02 14 */ add r0, r5, r0 +/* 80383CF8 00380C58 B0 1F 00 02 */ sth r0, 2(r31) +/* 80383CFC 00380C5C A0 BF 00 00 */ lhz r5, 0(r31) +/* 80383D00 00380C60 A0 06 00 0E */ lhz r0, 0xe(r6) +/* 80383D04 00380C64 7C 05 02 14 */ add r0, r5, r0 +/* 80383D08 00380C68 B0 1F 00 00 */ sth r0, 0(r31) +/* 80383D0C 00380C6C A0 06 00 0E */ lhz r0, 0xe(r6) +/* 80383D10 00380C70 38 C6 00 10 */ addi r6, r6, 0x10 +/* 80383D14 00380C74 A0 BF 00 02 */ lhz r5, 2(r31) +/* 80383D18 00380C78 7C 00 00 F8 */ nor r0, r0, r0 +/* 80383D1C 00380C7C 7C 05 02 14 */ add r0, r5, r0 +/* 80383D20 00380C80 B0 1F 00 02 */ sth r0, 2(r31) +/* 80383D24 00380C84 42 00 FE DC */ bdnz lbl_80383C00 +/* 80383D28 00380C88 70 63 00 07 */ andi. r3, r3, 7 +/* 80383D2C 00380C8C 41 82 00 34 */ beq lbl_80383D60 +lbl_80383D30: +/* 80383D30 00380C90 7C 69 03 A6 */ mtctr r3 +lbl_80383D34: +/* 80383D34 00380C94 A0 BF 00 00 */ lhz r5, 0(r31) +/* 80383D38 00380C98 A0 06 00 00 */ lhz r0, 0(r6) +/* 80383D3C 00380C9C 7C 05 02 14 */ add r0, r5, r0 +/* 80383D40 00380CA0 B0 1F 00 00 */ sth r0, 0(r31) +/* 80383D44 00380CA4 A0 06 00 00 */ lhz r0, 0(r6) +/* 80383D48 00380CA8 38 C6 00 02 */ addi r6, r6, 2 +/* 80383D4C 00380CAC A0 BF 00 02 */ lhz r5, 2(r31) +/* 80383D50 00380CB0 7C 00 00 F8 */ nor r0, r0, r0 +/* 80383D54 00380CB4 7C 05 02 14 */ add r0, r5, r0 +/* 80383D58 00380CB8 B0 1F 00 02 */ sth r0, 2(r31) +/* 80383D5C 00380CBC 42 00 FF D8 */ bdnz lbl_80383D34 +lbl_80383D60: +/* 80383D60 00380CC0 3B DF 00 40 */ addi r30, r31, 0x40 +/* 80383D64 00380CC4 80 1F 00 40 */ lwz r0, 0x40(r31) +/* 80383D68 00380CC8 7C 04 00 40 */ cmplw r4, r0 +/* 80383D6C 00380CCC 40 80 00 08 */ bge lbl_80383D74 +/* 80383D70 00380CD0 90 9E 00 00 */ stw r4, 0(r30) +lbl_80383D74: +/* 80383D74 00380CD4 83 BE 00 00 */ lwz r29, 0(r30) +/* 80383D78 00380CD8 3C 60 80 38 */ lis r3, WriteSramCallback@ha +/* 80383D7C 00380CDC 38 A3 38 28 */ addi r5, r3, WriteSramCallback@l +/* 80383D80 00380CE0 23 7D 00 40 */ subfic r27, r29, 0x40 +/* 80383D84 00380CE4 7F 9F EA 14 */ add r28, r31, r29 +/* 80383D88 00380CE8 38 60 00 00 */ li r3, 0 +/* 80383D8C 00380CEC 38 80 00 01 */ li r4, 1 +/* 80383D90 00380CF0 48 03 D5 D5 */ bl EXILock +/* 80383D94 00380CF4 2C 03 00 00 */ cmpwi r3, 0 +/* 80383D98 00380CF8 40 82 00 0C */ bne lbl_80383DA4 +/* 80383D9C 00380CFC 38 00 00 00 */ li r0, 0 +/* 80383DA0 00380D00 48 00 00 B4 */ b lbl_80383E54 +lbl_80383DA4: +/* 80383DA4 00380D04 38 60 00 00 */ li r3, 0 +/* 80383DA8 00380D08 38 80 00 01 */ li r4, 1 +/* 80383DAC 00380D0C 38 A0 00 03 */ li r5, 3 +/* 80383DB0 00380D10 48 03 CE AD */ bl EXISelect +/* 80383DB4 00380D14 2C 03 00 00 */ cmpwi r3, 0 +/* 80383DB8 00380D18 40 82 00 14 */ bne lbl_80383DCC +/* 80383DBC 00380D1C 38 60 00 00 */ li r3, 0 +/* 80383DC0 00380D20 48 03 D6 99 */ bl EXIUnlock +/* 80383DC4 00380D24 38 00 00 00 */ li r0, 0 +/* 80383DC8 00380D28 48 00 00 8C */ b lbl_80383E54 +lbl_80383DCC: +/* 80383DCC 00380D2C 57 A3 30 32 */ slwi r3, r29, 6 +/* 80383DD0 00380D30 38 03 01 00 */ addi r0, r3, 0x100 +/* 80383DD4 00380D34 64 00 A0 00 */ oris r0, r0, 0xa000 +/* 80383DD8 00380D38 90 01 00 10 */ stw r0, 0x10(r1) +/* 80383DDC 00380D3C 38 81 00 10 */ addi r4, r1, 0x10 +/* 80383DE0 00380D40 38 60 00 00 */ li r3, 0 +/* 80383DE4 00380D44 38 A0 00 04 */ li r5, 4 +/* 80383DE8 00380D48 38 C0 00 01 */ li r6, 1 +/* 80383DEC 00380D4C 38 E0 00 00 */ li r7, 0 +/* 80383DF0 00380D50 48 03 C3 19 */ bl EXIImm +/* 80383DF4 00380D54 7C 60 00 34 */ cntlzw r0, r3 +/* 80383DF8 00380D58 54 1D D9 7E */ srwi r29, r0, 5 +/* 80383DFC 00380D5C 38 60 00 00 */ li r3, 0 +/* 80383E00 00380D60 48 03 C6 F1 */ bl sub_803c04f0 +/* 80383E04 00380D64 7C 60 00 34 */ cntlzw r0, r3 +/* 80383E08 00380D68 54 00 D9 7E */ srwi r0, r0, 5 +/* 80383E0C 00380D6C 38 9C 00 00 */ addi r4, r28, 0 +/* 80383E10 00380D70 38 BB 00 00 */ addi r5, r27, 0 +/* 80383E14 00380D74 7F BD 03 78 */ or r29, r29, r0 +/* 80383E18 00380D78 38 60 00 00 */ li r3, 0 +/* 80383E1C 00380D7C 38 C0 00 01 */ li r6, 1 +/* 80383E20 00380D80 48 03 C5 45 */ bl EXIImmEx +/* 80383E24 00380D84 7C 60 00 34 */ cntlzw r0, r3 +/* 80383E28 00380D88 54 00 D9 7E */ srwi r0, r0, 5 +/* 80383E2C 00380D8C 7F BD 03 78 */ or r29, r29, r0 +/* 80383E30 00380D90 38 60 00 00 */ li r3, 0 +/* 80383E34 00380D94 48 03 CF 55 */ bl EXIDeselect +/* 80383E38 00380D98 7C 60 00 34 */ cntlzw r0, r3 +/* 80383E3C 00380D9C 54 00 D9 7E */ srwi r0, r0, 5 +/* 80383E40 00380DA0 7F BD 03 78 */ or r29, r29, r0 +/* 80383E44 00380DA4 38 60 00 00 */ li r3, 0 +/* 80383E48 00380DA8 48 03 D6 11 */ bl EXIUnlock +/* 80383E4C 00380DAC 7F A0 00 34 */ cntlzw r0, r29 +/* 80383E50 00380DB0 54 00 D9 7E */ srwi r0, r0, 5 +lbl_80383E54: +/* 80383E54 00380DB4 90 1F 00 4C */ stw r0, 0x4c(r31) +/* 80383E58 00380DB8 80 1F 00 4C */ lwz r0, 0x4c(r31) +/* 80383E5C 00380DBC 2C 00 00 00 */ cmpwi r0, 0 +/* 80383E60 00380DC0 41 82 00 0C */ beq lbl_80383E6C +/* 80383E64 00380DC4 38 00 00 40 */ li r0, 0x40 +/* 80383E68 00380DC8 90 1E 00 00 */ stw r0, 0(r30) +lbl_80383E6C: +/* 80383E6C 00380DCC 38 00 00 00 */ li r0, 0 +/* 80383E70 00380DD0 90 1F 00 48 */ stw r0, 0x48(r31) +/* 80383E74 00380DD4 80 7F 00 44 */ lwz r3, 0x44(r31) +/* 80383E78 00380DD8 4B FF D8 11 */ bl OSRestoreInterrupts +/* 80383E7C 00380DDC 80 7F 00 4C */ lwz r3, 0x4c(r31) +/* 80383E80 00380DE0 BB 61 00 1C */ lmw r27, 0x1c(r1) +/* 80383E84 00380DE4 80 01 00 34 */ lwz r0, 0x34(r1) +/* 80383E88 00380DE8 38 21 00 30 */ addi r1, r1, 0x30 +/* 80383E8C 00380DEC 7C 08 03 A6 */ mtlr r0 +/* 80383E90 00380DF0 4E 80 00 20 */ blr + +.global __OSUnlockSram +__OSUnlockSram: +/* 80383E94 00380DF4 7C 08 02 A6 */ mflr r0 +/* 80383E98 00380DF8 38 80 00 00 */ li r4, 0 +/* 80383E9C 00380DFC 90 01 00 04 */ stw r0, 4(r1) +/* 80383EA0 00380E00 94 21 FF F8 */ stwu r1, -8(r1) +/* 80383EA4 00380E04 4B FF FC E9 */ bl sub_80383b8c +/* 80383EA8 00380E08 80 01 00 0C */ lwz r0, 0xc(r1) +/* 80383EAC 00380E0C 38 21 00 08 */ addi r1, r1, 8 +/* 80383EB0 00380E10 7C 08 03 A6 */ mtlr r0 +/* 80383EB4 00380E14 4E 80 00 20 */ blr + +.global __OSUnlockSramEx +__OSUnlockSramEx: +/* 80383EB8 00380E18 7C 08 02 A6 */ mflr r0 +/* 80383EBC 00380E1C 38 80 00 14 */ li r4, 0x14 +/* 80383EC0 00380E20 90 01 00 04 */ stw r0, 4(r1) +/* 80383EC4 00380E24 94 21 FF F8 */ stwu r1, -8(r1) +/* 80383EC8 00380E28 4B FF FC C5 */ bl sub_80383b8c +/* 80383ECC 00380E2C 80 01 00 0C */ lwz r0, 0xc(r1) +/* 80383ED0 00380E30 38 21 00 08 */ addi r1, r1, 8 +/* 80383ED4 00380E34 7C 08 03 A6 */ mtlr r0 +/* 80383ED8 00380E38 4E 80 00 20 */ blr + +.global __OSSyncSram +__OSSyncSram: +/* 80383EDC 00380E3C 3C 60 80 54 */ lis r3, lbl_805415A0@ha +/* 80383EE0 00380E40 38 63 15 A0 */ addi r3, r3, lbl_805415A0@l +/* 80383EE4 00380E44 80 63 00 4C */ lwz r3, 0x4c(r3) +/* 80383EE8 00380E48 4E 80 00 20 */ blr + +.global sub_80383eec +sub_80383eec: +/* 80383EEC 00380E4C 7C 08 02 A6 */ mflr r0 +/* 80383EF0 00380E50 90 01 00 04 */ stw r0, 4(r1) +/* 80383EF4 00380E54 94 21 FF D8 */ stwu r1, -0x28(r1) +/* 80383EF8 00380E58 93 E1 00 24 */ stw r31, 0x24(r1) +/* 80383EFC 00380E5C 3B E5 00 00 */ addi r31, r5, 0 +/* 80383F00 00380E60 93 C1 00 20 */ stw r30, 0x20(r1) +/* 80383F04 00380E64 3B C4 00 00 */ addi r30, r4, 0 +/* 80383F08 00380E68 93 A1 00 1C */ stw r29, 0x1c(r1) +/* 80383F0C 00380E6C 3B A3 00 00 */ addi r29, r3, 0 +/* 80383F10 00380E70 4B FF AB 75 */ bl DCInvalidateRange +/* 80383F14 00380E74 38 60 00 00 */ li r3, 0 +/* 80383F18 00380E78 38 80 00 01 */ li r4, 1 +/* 80383F1C 00380E7C 38 A0 00 00 */ li r5, 0 +/* 80383F20 00380E80 48 03 D4 45 */ bl EXILock +/* 80383F24 00380E84 2C 03 00 00 */ cmpwi r3, 0 +/* 80383F28 00380E88 40 82 00 0C */ bne lbl_80383F34 +/* 80383F2C 00380E8C 38 60 00 00 */ li r3, 0 +/* 80383F30 00380E90 48 00 00 C4 */ b lbl_80383FF4 +lbl_80383F34: +/* 80383F34 00380E94 38 60 00 00 */ li r3, 0 +/* 80383F38 00380E98 38 80 00 01 */ li r4, 1 +/* 80383F3C 00380E9C 38 A0 00 03 */ li r5, 3 +/* 80383F40 00380EA0 48 03 CD 1D */ bl EXISelect +/* 80383F44 00380EA4 2C 03 00 00 */ cmpwi r3, 0 +/* 80383F48 00380EA8 40 82 00 14 */ bne lbl_80383F5C +/* 80383F4C 00380EAC 38 60 00 00 */ li r3, 0 +/* 80383F50 00380EB0 48 03 D5 09 */ bl EXIUnlock +/* 80383F54 00380EB4 38 60 00 00 */ li r3, 0 +/* 80383F58 00380EB8 48 00 00 9C */ b lbl_80383FF4 +lbl_80383F5C: +/* 80383F5C 00380EBC 57 E0 30 32 */ slwi r0, r31, 6 +/* 80383F60 00380EC0 90 01 00 14 */ stw r0, 0x14(r1) +/* 80383F64 00380EC4 38 81 00 14 */ addi r4, r1, 0x14 +/* 80383F68 00380EC8 38 60 00 00 */ li r3, 0 +/* 80383F6C 00380ECC 38 A0 00 04 */ li r5, 4 +/* 80383F70 00380ED0 38 C0 00 01 */ li r6, 1 +/* 80383F74 00380ED4 38 E0 00 00 */ li r7, 0 +/* 80383F78 00380ED8 48 03 C1 91 */ bl EXIImm +/* 80383F7C 00380EDC 7C 60 00 34 */ cntlzw r0, r3 +/* 80383F80 00380EE0 54 1F D9 7E */ srwi r31, r0, 5 +/* 80383F84 00380EE4 38 60 00 00 */ li r3, 0 +/* 80383F88 00380EE8 48 03 C5 69 */ bl sub_803c04f0 +/* 80383F8C 00380EEC 7C 60 00 34 */ cntlzw r0, r3 +/* 80383F90 00380EF0 54 00 D9 7E */ srwi r0, r0, 5 +/* 80383F94 00380EF4 38 9D 00 00 */ addi r4, r29, 0 +/* 80383F98 00380EF8 38 BE 00 00 */ addi r5, r30, 0 +/* 80383F9C 00380EFC 7F FF 03 78 */ or r31, r31, r0 +/* 80383FA0 00380F00 38 60 00 00 */ li r3, 0 +/* 80383FA4 00380F04 38 C0 00 00 */ li r6, 0 +/* 80383FA8 00380F08 38 E0 00 00 */ li r7, 0 +/* 80383FAC 00380F0C 48 03 C4 59 */ bl EXIDma +/* 80383FB0 00380F10 7C 60 00 34 */ cntlzw r0, r3 +/* 80383FB4 00380F14 54 00 D9 7E */ srwi r0, r0, 5 +/* 80383FB8 00380F18 7F FF 03 78 */ or r31, r31, r0 +/* 80383FBC 00380F1C 38 60 00 00 */ li r3, 0 +/* 80383FC0 00380F20 48 03 C5 31 */ bl sub_803c04f0 +/* 80383FC4 00380F24 7C 60 00 34 */ cntlzw r0, r3 +/* 80383FC8 00380F28 54 00 D9 7E */ srwi r0, r0, 5 +/* 80383FCC 00380F2C 7F FF 03 78 */ or r31, r31, r0 +/* 80383FD0 00380F30 38 60 00 00 */ li r3, 0 +/* 80383FD4 00380F34 48 03 CD B5 */ bl EXIDeselect +/* 80383FD8 00380F38 7C 60 00 34 */ cntlzw r0, r3 +/* 80383FDC 00380F3C 54 00 D9 7E */ srwi r0, r0, 5 +/* 80383FE0 00380F40 7F FF 03 78 */ or r31, r31, r0 +/* 80383FE4 00380F44 38 60 00 00 */ li r3, 0 +/* 80383FE8 00380F48 48 03 D4 71 */ bl EXIUnlock +/* 80383FEC 00380F4C 7F E0 00 34 */ cntlzw r0, r31 +/* 80383FF0 00380F50 54 03 D9 7E */ srwi r3, r0, 5 +lbl_80383FF4: +/* 80383FF4 00380F54 80 01 00 2C */ lwz r0, 0x2c(r1) +/* 80383FF8 00380F58 83 E1 00 24 */ lwz r31, 0x24(r1) +/* 80383FFC 00380F5C 83 C1 00 20 */ lwz r30, 0x20(r1) +/* 80384000 00380F60 83 A1 00 1C */ lwz r29, 0x1c(r1) +/* 80384004 00380F64 38 21 00 28 */ addi r1, r1, 0x28 +/* 80384008 00380F68 7C 08 03 A6 */ mtlr r0 +/* 8038400C 00380F6C 4E 80 00 20 */ blr + +.global OSGetSoundMode +OSGetSoundMode: +/* 80384010 00380F70 7C 08 02 A6 */ mflr r0 +/* 80384014 00380F74 3C 60 80 54 */ lis r3, lbl_805415A0@ha +/* 80384018 00380F78 90 01 00 04 */ stw r0, 4(r1) +/* 8038401C 00380F7C 94 21 FF E0 */ stwu r1, -0x20(r1) +/* 80384020 00380F80 93 E1 00 1C */ stw r31, 0x1c(r1) +/* 80384024 00380F84 3B E3 15 A0 */ addi r31, r3, lbl_805415A0@l +/* 80384028 00380F88 4B FF D6 39 */ bl OSDisableInterrupts +/* 8038402C 00380F8C 80 1F 00 48 */ lwz r0, 0x48(r31) +/* 80384030 00380F90 38 9F 00 48 */ addi r4, r31, 0x48 +/* 80384034 00380F94 2C 00 00 00 */ cmpwi r0, 0 +/* 80384038 00380F98 41 82 00 10 */ beq lbl_80384048 +/* 8038403C 00380F9C 4B FF D6 4D */ bl OSRestoreInterrupts +/* 80384040 00380FA0 3B E0 00 00 */ li r31, 0 +/* 80384044 00380FA4 48 00 00 10 */ b lbl_80384054 +lbl_80384048: +/* 80384048 00380FA8 90 7F 00 44 */ stw r3, 0x44(r31) +/* 8038404C 00380FAC 38 00 00 01 */ li r0, 1 +/* 80384050 00380FB0 90 04 00 00 */ stw r0, 0(r4) +lbl_80384054: +/* 80384054 00380FB4 88 1F 00 13 */ lbz r0, 0x13(r31) +/* 80384058 00380FB8 54 00 07 7B */ rlwinm. r0, r0, 0, 0x1d, 0x1d +/* 8038405C 00380FBC 41 82 00 0C */ beq lbl_80384068 +/* 80384060 00380FC0 3B E0 00 01 */ li r31, 1 +/* 80384064 00380FC4 48 00 00 08 */ b lbl_8038406C +lbl_80384068: +/* 80384068 00380FC8 3B E0 00 00 */ li r31, 0 +lbl_8038406C: +/* 8038406C 00380FCC 38 60 00 00 */ li r3, 0 +/* 80384070 00380FD0 38 80 00 00 */ li r4, 0 +/* 80384074 00380FD4 4B FF FB 19 */ bl sub_80383b8c +/* 80384078 00380FD8 7F E3 FB 78 */ mr r3, r31 +/* 8038407C 00380FDC 80 01 00 24 */ lwz r0, 0x24(r1) +/* 80384080 00380FE0 83 E1 00 1C */ lwz r31, 0x1c(r1) +/* 80384084 00380FE4 38 21 00 20 */ addi r1, r1, 0x20 +/* 80384088 00380FE8 7C 08 03 A6 */ mtlr r0 +/* 8038408C 00380FEC 4E 80 00 20 */ blr + +.global OSSetSoundMode +OSSetSoundMode: +/* 80384090 00380FF0 7C 08 02 A6 */ mflr r0 +/* 80384094 00380FF4 3C 80 80 54 */ lis r4, lbl_805415A0@ha +/* 80384098 00380FF8 90 01 00 04 */ stw r0, 4(r1) +/* 8038409C 00380FFC 94 21 FF E0 */ stwu r1, -0x20(r1) +/* 803840A0 00381000 93 E1 00 1C */ stw r31, 0x1c(r1) +/* 803840A4 00381004 3B E4 15 A0 */ addi r31, r4, lbl_805415A0@l +/* 803840A8 00381008 93 C1 00 18 */ stw r30, 0x18(r1) +/* 803840AC 0038100C 54 7E 17 7A */ rlwinm r30, r3, 2, 0x1d, 0x1d +/* 803840B0 00381010 4B FF D5 B1 */ bl OSDisableInterrupts +/* 803840B4 00381014 80 1F 00 48 */ lwz r0, 0x48(r31) +/* 803840B8 00381018 38 9F 00 48 */ addi r4, r31, 0x48 +/* 803840BC 0038101C 2C 00 00 00 */ cmpwi r0, 0 +/* 803840C0 00381020 41 82 00 10 */ beq lbl_803840D0 +/* 803840C4 00381024 4B FF D5 C5 */ bl OSRestoreInterrupts +/* 803840C8 00381028 3B E0 00 00 */ li r31, 0 +/* 803840CC 0038102C 48 00 00 10 */ b lbl_803840DC +lbl_803840D0: +/* 803840D0 00381030 90 7F 00 44 */ stw r3, 0x44(r31) +/* 803840D4 00381034 38 00 00 01 */ li r0, 1 +/* 803840D8 00381038 90 04 00 00 */ stw r0, 0(r4) +lbl_803840DC: +/* 803840DC 0038103C 88 7F 00 13 */ lbz r3, 0x13(r31) +/* 803840E0 00381040 54 60 07 7A */ rlwinm r0, r3, 0, 0x1d, 0x1d +/* 803840E4 00381044 7C 1E 00 40 */ cmplw r30, r0 +/* 803840E8 00381048 40 82 00 14 */ bne lbl_803840FC +/* 803840EC 0038104C 38 60 00 00 */ li r3, 0 +/* 803840F0 00381050 38 80 00 00 */ li r4, 0 +/* 803840F4 00381054 4B FF FA 99 */ bl sub_80383b8c +/* 803840F8 00381058 48 00 00 24 */ b lbl_8038411C +lbl_803840FC: +/* 803840FC 0038105C 54 60 07 B8 */ rlwinm r0, r3, 0, 0x1e, 0x1c +/* 80384100 00381060 98 1F 00 13 */ stb r0, 0x13(r31) +/* 80384104 00381064 38 60 00 01 */ li r3, 1 +/* 80384108 00381068 38 80 00 00 */ li r4, 0 +/* 8038410C 0038106C 88 1F 00 13 */ lbz r0, 0x13(r31) +/* 80384110 00381070 7C 00 F3 78 */ or r0, r0, r30 +/* 80384114 00381074 98 1F 00 13 */ stb r0, 0x13(r31) +/* 80384118 00381078 4B FF FA 75 */ bl sub_80383b8c +lbl_8038411C: +/* 8038411C 0038107C 80 01 00 24 */ lwz r0, 0x24(r1) +/* 80384120 00381080 83 E1 00 1C */ lwz r31, 0x1c(r1) +/* 80384124 00381084 83 C1 00 18 */ lwz r30, 0x18(r1) +/* 80384128 00381088 38 21 00 20 */ addi r1, r1, 0x20 +/* 8038412C 0038108C 7C 08 03 A6 */ mtlr r0 +/* 80384130 00381090 4E 80 00 20 */ blr + +.global OSGetProgressiveMode +OSGetProgressiveMode: +/* 80384134 00381094 7C 08 02 A6 */ mflr r0 +/* 80384138 00381098 3C 60 80 54 */ lis r3, lbl_805415A0@ha +/* 8038413C 0038109C 90 01 00 04 */ stw r0, 4(r1) +/* 80384140 003810A0 94 21 FF E8 */ stwu r1, -0x18(r1) +/* 80384144 003810A4 93 E1 00 14 */ stw r31, 0x14(r1) +/* 80384148 003810A8 3B E3 15 A0 */ addi r31, r3, lbl_805415A0@l +/* 8038414C 003810AC 4B FF D5 15 */ bl OSDisableInterrupts +/* 80384150 003810B0 80 1F 00 48 */ lwz r0, 0x48(r31) +/* 80384154 003810B4 38 9F 00 48 */ addi r4, r31, 0x48 +/* 80384158 003810B8 2C 00 00 00 */ cmpwi r0, 0 +/* 8038415C 003810BC 41 82 00 10 */ beq lbl_8038416C +/* 80384160 003810C0 4B FF D5 29 */ bl OSRestoreInterrupts +/* 80384164 003810C4 3B E0 00 00 */ li r31, 0 +/* 80384168 003810C8 48 00 00 10 */ b lbl_80384178 +lbl_8038416C: +/* 8038416C 003810CC 90 7F 00 44 */ stw r3, 0x44(r31) +/* 80384170 003810D0 38 00 00 01 */ li r0, 1 +/* 80384174 003810D4 90 04 00 00 */ stw r0, 0(r4) +lbl_80384178: +/* 80384178 003810D8 88 1F 00 13 */ lbz r0, 0x13(r31) +/* 8038417C 003810DC 38 60 00 00 */ li r3, 0 +/* 80384180 003810E0 38 80 00 00 */ li r4, 0 +/* 80384184 003810E4 54 1F CF FE */ rlwinm r31, r0, 0x19, 0x1f, 0x1f +/* 80384188 003810E8 4B FF FA 05 */ bl sub_80383b8c +/* 8038418C 003810EC 7F E3 FB 78 */ mr r3, r31 +/* 80384190 003810F0 80 01 00 1C */ lwz r0, 0x1c(r1) +/* 80384194 003810F4 83 E1 00 14 */ lwz r31, 0x14(r1) +/* 80384198 003810F8 38 21 00 18 */ addi r1, r1, 0x18 +/* 8038419C 003810FC 7C 08 03 A6 */ mtlr r0 +/* 803841A0 00381100 4E 80 00 20 */ blr + +.global sub_803841a4 +sub_803841a4: +/* 803841A4 00381104 7C 08 02 A6 */ mflr r0 +/* 803841A8 00381108 3C 80 80 54 */ lis r4, lbl_805415A0@ha +/* 803841AC 0038110C 90 01 00 04 */ stw r0, 4(r1) +/* 803841B0 00381110 94 21 FF E0 */ stwu r1, -0x20(r1) +/* 803841B4 00381114 93 E1 00 1C */ stw r31, 0x1c(r1) +/* 803841B8 00381118 3B E4 15 A0 */ addi r31, r4, lbl_805415A0@l +/* 803841BC 0038111C 93 C1 00 18 */ stw r30, 0x18(r1) +/* 803841C0 00381120 54 7E 3E 30 */ rlwinm r30, r3, 7, 0x18, 0x18 +/* 803841C4 00381124 4B FF D4 9D */ bl OSDisableInterrupts +/* 803841C8 00381128 80 1F 00 48 */ lwz r0, 0x48(r31) +/* 803841CC 0038112C 38 9F 00 48 */ addi r4, r31, 0x48 +/* 803841D0 00381130 2C 00 00 00 */ cmpwi r0, 0 +/* 803841D4 00381134 41 82 00 10 */ beq lbl_803841E4 +/* 803841D8 00381138 4B FF D4 B1 */ bl OSRestoreInterrupts +/* 803841DC 0038113C 3B E0 00 00 */ li r31, 0 +/* 803841E0 00381140 48 00 00 10 */ b lbl_803841F0 +lbl_803841E4: +/* 803841E4 00381144 90 7F 00 44 */ stw r3, 0x44(r31) +/* 803841E8 00381148 38 00 00 01 */ li r0, 1 +/* 803841EC 0038114C 90 04 00 00 */ stw r0, 0(r4) +lbl_803841F0: +/* 803841F0 00381150 88 7F 00 13 */ lbz r3, 0x13(r31) +/* 803841F4 00381154 54 60 06 30 */ rlwinm r0, r3, 0, 0x18, 0x18 +/* 803841F8 00381158 7C 1E 00 40 */ cmplw r30, r0 +/* 803841FC 0038115C 40 82 00 14 */ bne lbl_80384210 +/* 80384200 00381160 38 60 00 00 */ li r3, 0 +/* 80384204 00381164 38 80 00 00 */ li r4, 0 +/* 80384208 00381168 4B FF F9 85 */ bl sub_80383b8c +/* 8038420C 0038116C 48 00 00 24 */ b lbl_80384230 +lbl_80384210: +/* 80384210 00381170 54 60 06 6E */ rlwinm r0, r3, 0, 0x19, 0x17 +/* 80384214 00381174 98 1F 00 13 */ stb r0, 0x13(r31) +/* 80384218 00381178 38 60 00 01 */ li r3, 1 +/* 8038421C 0038117C 38 80 00 00 */ li r4, 0 +/* 80384220 00381180 88 1F 00 13 */ lbz r0, 0x13(r31) +/* 80384224 00381184 7C 00 F3 78 */ or r0, r0, r30 +/* 80384228 00381188 98 1F 00 13 */ stb r0, 0x13(r31) +/* 8038422C 0038118C 4B FF F9 61 */ bl sub_80383b8c +lbl_80384230: +/* 80384230 00381190 80 01 00 24 */ lwz r0, 0x24(r1) +/* 80384234 00381194 83 E1 00 1C */ lwz r31, 0x1c(r1) +/* 80384238 00381198 83 C1 00 18 */ lwz r30, 0x18(r1) +/* 8038423C 0038119C 38 21 00 20 */ addi r1, r1, 0x20 +/* 80384240 003811A0 7C 08 03 A6 */ mtlr r0 +/* 80384244 003811A4 4E 80 00 20 */ blr + +.global OSGetLanguage +OSGetLanguage: +/* 80384248 003811A8 7C 08 02 A6 */ mflr r0 +/* 8038424C 003811AC 3C 60 80 54 */ lis r3, lbl_805415A0@ha +/* 80384250 003811B0 90 01 00 04 */ stw r0, 4(r1) +/* 80384254 003811B4 94 21 FF E8 */ stwu r1, -0x18(r1) +/* 80384258 003811B8 93 E1 00 14 */ stw r31, 0x14(r1) +/* 8038425C 003811BC 3B E3 15 A0 */ addi r31, r3, lbl_805415A0@l +/* 80384260 003811C0 4B FF D4 01 */ bl OSDisableInterrupts +/* 80384264 003811C4 80 1F 00 48 */ lwz r0, 0x48(r31) +/* 80384268 003811C8 38 9F 00 48 */ addi r4, r31, 0x48 +/* 8038426C 003811CC 2C 00 00 00 */ cmpwi r0, 0 +/* 80384270 003811D0 41 82 00 10 */ beq lbl_80384280 +/* 80384274 003811D4 4B FF D4 15 */ bl OSRestoreInterrupts +/* 80384278 003811D8 3B E0 00 00 */ li r31, 0 +/* 8038427C 003811DC 48 00 00 10 */ b lbl_8038428C +lbl_80384280: +/* 80384280 003811E0 90 7F 00 44 */ stw r3, 0x44(r31) +/* 80384284 003811E4 38 00 00 01 */ li r0, 1 +/* 80384288 003811E8 90 04 00 00 */ stw r0, 0(r4) +lbl_8038428C: +/* 8038428C 003811EC 8B FF 00 12 */ lbz r31, 0x12(r31) +/* 80384290 003811F0 38 60 00 00 */ li r3, 0 +/* 80384294 003811F4 38 80 00 00 */ li r4, 0 +/* 80384298 003811F8 4B FF F8 F5 */ bl sub_80383b8c +/* 8038429C 003811FC 7F E3 FB 78 */ mr r3, r31 +/* 803842A0 00381200 80 01 00 1C */ lwz r0, 0x1c(r1) +/* 803842A4 00381204 83 E1 00 14 */ lwz r31, 0x14(r1) +/* 803842A8 00381208 38 21 00 18 */ addi r1, r1, 0x18 +/* 803842AC 0038120C 7C 08 03 A6 */ mtlr r0 +/* 803842B0 00381210 4E 80 00 20 */ blr + +.global OSGetWirelessID +OSGetWirelessID: +/* 803842B4 00381214 7C 08 02 A6 */ mflr r0 +/* 803842B8 00381218 3C 80 80 54 */ lis r4, lbl_805415A0@ha +/* 803842BC 0038121C 90 01 00 04 */ stw r0, 4(r1) +/* 803842C0 00381220 94 21 FF E0 */ stwu r1, -0x20(r1) +/* 803842C4 00381224 93 E1 00 1C */ stw r31, 0x1c(r1) +/* 803842C8 00381228 3B E4 15 A0 */ addi r31, r4, lbl_805415A0@l +/* 803842CC 0038122C 93 C1 00 18 */ stw r30, 0x18(r1) +/* 803842D0 00381230 3B C3 00 00 */ addi r30, r3, 0 +/* 803842D4 00381234 4B FF D3 8D */ bl OSDisableInterrupts +/* 803842D8 00381238 80 1F 00 48 */ lwz r0, 0x48(r31) +/* 803842DC 0038123C 38 9F 00 48 */ addi r4, r31, 0x48 +/* 803842E0 00381240 2C 00 00 00 */ cmpwi r0, 0 +/* 803842E4 00381244 41 82 00 10 */ beq lbl_803842F4 +/* 803842E8 00381248 4B FF D3 A1 */ bl OSRestoreInterrupts +/* 803842EC 0038124C 38 60 00 00 */ li r3, 0 +/* 803842F0 00381250 48 00 00 14 */ b lbl_80384304 +lbl_803842F4: +/* 803842F4 00381254 90 7F 00 44 */ stw r3, 0x44(r31) +/* 803842F8 00381258 38 00 00 01 */ li r0, 1 +/* 803842FC 0038125C 38 7F 00 14 */ addi r3, r31, 0x14 +/* 80384300 00381260 90 04 00 00 */ stw r0, 0(r4) +lbl_80384304: +/* 80384304 00381264 57 C0 08 3C */ slwi r0, r30, 1 +/* 80384308 00381268 7C 63 02 14 */ add r3, r3, r0 +/* 8038430C 0038126C A3 E3 00 1C */ lhz r31, 0x1c(r3) +/* 80384310 00381270 38 60 00 00 */ li r3, 0 +/* 80384314 00381274 38 80 00 14 */ li r4, 0x14 +/* 80384318 00381278 4B FF F8 75 */ bl sub_80383b8c +/* 8038431C 0038127C 7F E3 FB 78 */ mr r3, r31 +/* 80384320 00381280 80 01 00 24 */ lwz r0, 0x24(r1) +/* 80384324 00381284 83 E1 00 1C */ lwz r31, 0x1c(r1) +/* 80384328 00381288 83 C1 00 18 */ lwz r30, 0x18(r1) +/* 8038432C 0038128C 38 21 00 20 */ addi r1, r1, 0x20 +/* 80384330 00381290 7C 08 03 A6 */ mtlr r0 +/* 80384334 00381294 4E 80 00 20 */ blr + +.global OSSetWirelessID +OSSetWirelessID: +/* 80384338 00381298 7C 08 02 A6 */ mflr r0 +/* 8038433C 0038129C 3C A0 80 54 */ lis r5, lbl_805415A0@ha +/* 80384340 003812A0 90 01 00 04 */ stw r0, 4(r1) +/* 80384344 003812A4 94 21 FF D8 */ stwu r1, -0x28(r1) +/* 80384348 003812A8 93 E1 00 24 */ stw r31, 0x24(r1) +/* 8038434C 003812AC 3B E5 15 A0 */ addi r31, r5, lbl_805415A0@l +/* 80384350 003812B0 93 C1 00 20 */ stw r30, 0x20(r1) +/* 80384354 003812B4 3B C4 00 00 */ addi r30, r4, 0 +/* 80384358 003812B8 93 A1 00 1C */ stw r29, 0x1c(r1) +/* 8038435C 003812BC 3B A3 00 00 */ addi r29, r3, 0 +/* 80384360 003812C0 4B FF D3 01 */ bl OSDisableInterrupts +/* 80384364 003812C4 80 1F 00 48 */ lwz r0, 0x48(r31) +/* 80384368 003812C8 38 9F 00 48 */ addi r4, r31, 0x48 +/* 8038436C 003812CC 2C 00 00 00 */ cmpwi r0, 0 +/* 80384370 003812D0 41 82 00 10 */ beq lbl_80384380 +/* 80384374 003812D4 4B FF D3 15 */ bl OSRestoreInterrupts +/* 80384378 003812D8 38 60 00 00 */ li r3, 0 +/* 8038437C 003812DC 48 00 00 14 */ b lbl_80384390 +lbl_80384380: +/* 80384380 003812E0 90 7F 00 44 */ stw r3, 0x44(r31) +/* 80384384 003812E4 38 00 00 01 */ li r0, 1 +/* 80384388 003812E8 38 7F 00 14 */ addi r3, r31, 0x14 +/* 8038438C 003812EC 90 04 00 00 */ stw r0, 0(r4) +lbl_80384390: +/* 80384390 003812F0 57 A0 08 3C */ slwi r0, r29, 1 +/* 80384394 003812F4 7C 83 02 14 */ add r4, r3, r0 +/* 80384398 003812F8 A4 64 00 1C */ lhzu r3, 0x1c(r4) +/* 8038439C 003812FC 57 C0 04 3E */ clrlwi r0, r30, 0x10 +/* 803843A0 00381300 7C 03 00 40 */ cmplw r3, r0 +/* 803843A4 00381304 41 82 00 18 */ beq lbl_803843BC +/* 803843A8 00381308 B3 C4 00 00 */ sth r30, 0(r4) +/* 803843AC 0038130C 38 60 00 01 */ li r3, 1 +/* 803843B0 00381310 38 80 00 14 */ li r4, 0x14 +/* 803843B4 00381314 4B FF F7 D9 */ bl sub_80383b8c +/* 803843B8 00381318 48 00 00 10 */ b lbl_803843C8 +lbl_803843BC: +/* 803843BC 0038131C 38 60 00 00 */ li r3, 0 +/* 803843C0 00381320 38 80 00 14 */ li r4, 0x14 +/* 803843C4 00381324 4B FF F7 C9 */ bl sub_80383b8c +lbl_803843C8: +/* 803843C8 00381328 80 01 00 2C */ lwz r0, 0x2c(r1) +/* 803843CC 0038132C 83 E1 00 24 */ lwz r31, 0x24(r1) +/* 803843D0 00381330 83 C1 00 20 */ lwz r30, 0x20(r1) +/* 803843D4 00381334 83 A1 00 1C */ lwz r29, 0x1c(r1) +/* 803843D8 00381338 38 21 00 28 */ addi r1, r1, 0x28 +/* 803843DC 0038133C 7C 08 03 A6 */ mtlr r0 +/* 803843E0 00381340 4E 80 00 20 */ blr diff --git a/asm/Dolphin/OS/OSSync.s b/asm/Dolphin/OS/OSSync.s new file mode 100644 index 00000000..b277cd3a --- /dev/null +++ b/asm/Dolphin/OS/OSSync.s @@ -0,0 +1,44 @@ +.include "macros.inc" + +.section .text, "ax" + +__OSSystemCallVectorStart: +.global SystemCallVector +SystemCallVector: +/* 803843E4 00381344 7D 30 FA A6 */ mfspr r9, 0x3f0 +/* 803843E8 00381348 61 2A 00 08 */ ori r10, r9, 8 +/* 803843EC 0038134C 7D 50 FB A6 */ mtspr 0x3f0, r10 +/* 803843F0 00381350 4C 00 01 2C */ isync +/* 803843F4 00381354 7C 00 04 AC */ sync 0 +/* 803843F8 00381358 7D 30 FB A6 */ mtspr 0x3f0, r9 +/* 803843FC 0038135C 4C 00 00 64 */ rfi +__OSSystemCallVectorEnd: +/* 80384400 00381360 60 00 00 00 */ nop + +.global __OSInitSystemCall +__OSInitSystemCall: +/* 80384404 00381364 7C 08 02 A6 */ mflr r0 +/* 80384408 00381368 90 01 00 04 */ stw r0, 4(r1) +/* 8038440C 0038136C 94 21 FF F0 */ stwu r1, -0x10(r1) +/* 80384410 00381370 93 E1 00 0C */ stw r31, 0xc(r1) +/* 80384414 00381374 3C A0 80 00 */ lis r5, 0x80000C00@ha +/* 80384418 00381378 3C 80 80 38 */ lis r4, __OSSystemCallVectorStart@ha +/* 8038441C 0038137C 3C 60 80 38 */ lis r3, __OSSystemCallVectorEnd@ha +/* 80384420 00381380 3B E5 0C 00 */ addi r31, r5, 0x80000C00@l +/* 80384424 00381384 38 03 44 00 */ addi r0, r3, __OSSystemCallVectorEnd@l +/* 80384428 00381388 38 84 43 E4 */ addi r4, r4, __OSSystemCallVectorStart@l +/* 8038442C 0038138C 7F E3 FB 78 */ mr r3, r31 +/* 80384430 00381390 7C A4 00 50 */ subf r5, r4, r0 +/* 80384434 00381394 4B C7 F0 5D */ bl memcpy +/* 80384438 00381398 7F E3 FB 78 */ mr r3, r31 +/* 8038443C 0038139C 38 80 01 00 */ li r4, 0x100 +/* 80384440 003813A0 4B FF A6 D1 */ bl DCFlushRangeNoSync +/* 80384444 003813A4 7C 00 04 AC */ sync 0 +/* 80384448 003813A8 7F E3 FB 78 */ mr r3, r31 +/* 8038444C 003813AC 38 80 01 00 */ li r4, 0x100 +/* 80384450 003813B0 4B FF A7 45 */ bl ICInvalidateRange +/* 80384454 003813B4 80 01 00 14 */ lwz r0, 0x14(r1) +/* 80384458 003813B8 83 E1 00 0C */ lwz r31, 0xc(r1) +/* 8038445C 003813BC 38 21 00 10 */ addi r1, r1, 0x10 +/* 80384460 003813C0 7C 08 03 A6 */ mtlr r0 +/* 80384464 003813C4 4E 80 00 20 */ blr diff --git a/asm/Dolphin/OS/OSThread.s b/asm/Dolphin/OS/OSThread.s new file mode 100644 index 00000000..fafd7a93 --- /dev/null +++ b/asm/Dolphin/OS/OSThread.s @@ -0,0 +1,1157 @@ +.include "macros.inc" + +.section .text, "ax" + +.global DefaultSwitchThreadCallback +DefaultSwitchThreadCallback: +/* 80384468 003813C8 4E 80 00 20 */ blr + +.global __OSThreadInit +__OSThreadInit: +/* 8038446C 003813CC 7C 08 02 A6 */ mflr r0 +/* 80384470 003813D0 3C 60 80 54 */ lis r3, lbl_805415F8@ha +/* 80384474 003813D4 90 01 00 04 */ stw r0, 4(r1) +/* 80384478 003813D8 38 00 00 02 */ li r0, 2 +/* 8038447C 003813DC 38 80 00 10 */ li r4, 0x10 +/* 80384480 003813E0 94 21 FF E8 */ stwu r1, -0x18(r1) +/* 80384484 003813E4 93 E1 00 14 */ stw r31, 0x14(r1) +/* 80384488 003813E8 93 C1 00 10 */ stw r30, 0x10(r1) +/* 8038448C 003813EC 93 A1 00 0C */ stw r29, 0xc(r1) +/* 80384490 003813F0 3B A0 00 00 */ li r29, 0 +/* 80384494 003813F4 93 81 00 08 */ stw r28, 8(r1) +/* 80384498 003813F8 3B 83 15 F8 */ addi r28, r3, lbl_805415F8@l +/* 8038449C 003813FC 3B FC 04 18 */ addi r31, r28, 0x418 +/* 803844A0 00381400 B0 1C 06 E0 */ sth r0, 0x6e0(r28) +/* 803844A4 00381404 38 00 00 01 */ li r0, 1 +/* 803844A8 00381408 38 7F 02 E8 */ addi r3, r31, 0x2e8 +/* 803844AC 0038140C B0 1C 06 E2 */ sth r0, 0x6e2(r28) +/* 803844B0 00381410 38 00 FF FF */ li r0, -1 +/* 803844B4 00381414 90 9C 06 EC */ stw r4, 0x6ec(r28) +/* 803844B8 00381418 90 9C 06 E8 */ stw r4, 0x6e8(r28) +/* 803844BC 0038141C 93 BC 06 E4 */ stw r29, 0x6e4(r28) +/* 803844C0 00381420 90 1C 06 F0 */ stw r0, 0x6f0(r28) +/* 803844C4 00381424 93 BC 07 08 */ stw r29, 0x708(r28) +/* 803844C8 00381428 48 00 00 FD */ bl OSInitThreadQueue +/* 803844CC 0038142C 93 BC 07 10 */ stw r29, 0x710(r28) +/* 803844D0 00381430 3F C0 80 00 */ lis r30, 0x800000D8@ha +/* 803844D4 00381434 38 7F 00 00 */ addi r3, r31, 0 +/* 803844D8 00381438 93 BC 07 0C */ stw r29, 0x70c(r28) +/* 803844DC 0038143C 93 FE 00 D8 */ stw r31, 0x800000D8@l(r30) +/* 803844E0 00381440 4B FF B1 35 */ bl OSClearContext +/* 803844E4 00381444 7F E3 FB 78 */ mr r3, r31 +/* 803844E8 00381448 4B FF AF 35 */ bl OSSetCurrentContext +/* 803844EC 0038144C 3C 60 80 5C */ lis r3, 0x805C00C8@ha +/* 803844F0 00381450 38 03 00 C8 */ addi r0, r3, 0x805C00C8@l +/* 803844F4 00381454 3C 60 80 5B */ lis r3, 0x805AF4C8@ha +/* 803844F8 00381458 90 1C 07 1C */ stw r0, 0x71c(r28) +/* 803844FC 0038145C 38 03 F4 C8 */ addi r0, r3, 0x805AF4C8@l +/* 80384500 00381460 90 1C 07 20 */ stw r0, 0x720(r28) +/* 80384504 00381464 3C 60 DE AE */ lis r3, 0xDEADBABE@ha +/* 80384508 00381468 38 03 BA BE */ addi r0, r3, 0xDEADBABE@l +/* 8038450C 0038146C 80 7C 07 20 */ lwz r3, 0x720(r28) +/* 80384510 00381470 7F E4 FB 78 */ mr r4, r31 +/* 80384514 00381474 90 03 00 00 */ stw r0, 0(r3) +/* 80384518 00381478 81 8D 9F 90 */ lwz r12, lbl_805A8B50@sda21(r13) +/* 8038451C 0038147C 80 7E 00 E4 */ lwz r3, 0xe4(r30) +/* 80384520 00381480 7D 88 03 A6 */ mtlr r12 +/* 80384524 00381484 4E 80 00 21 */ blrl +/* 80384528 00381488 93 FE 00 E4 */ stw r31, 0xe4(r30) +/* 8038452C 0038148C 38 60 00 00 */ li r3, 0 +/* 80384530 00381490 48 00 0D CD */ bl OSClearStack +/* 80384534 00381494 93 AD AD 60 */ stw r29, lbl_805A9920@sda21(r13) +/* 80384538 00381498 3B C0 00 00 */ li r30, 0 +/* 8038453C 0038149C 57 C0 18 38 */ slwi r0, r30, 3 +/* 80384540 003814A0 93 AD AD 64 */ stw r29, lbl_805A9924@sda21(r13) +/* 80384544 003814A4 7F BC 02 14 */ add r29, r28, r0 +lbl_80384548: +/* 80384548 003814A8 7F A3 EB 78 */ mr r3, r29 +/* 8038454C 003814AC 48 00 00 79 */ bl OSInitThreadQueue +/* 80384550 003814B0 3B DE 00 01 */ addi r30, r30, 1 +/* 80384554 003814B4 2C 1E 00 1F */ cmpwi r30, 0x1f +/* 80384558 003814B8 3B BD 00 08 */ addi r29, r29, 8 +/* 8038455C 003814BC 40 81 FF EC */ ble lbl_80384548 +/* 80384560 003814C0 3F C0 80 00 */ lis r30, 0x800000DC@ha +/* 80384564 003814C4 38 7E 00 DC */ addi r3, r30, 0x800000DC@l +/* 80384568 003814C8 48 00 00 5D */ bl OSInitThreadQueue +/* 8038456C 003814CC 38 9E 00 DC */ addi r4, r30, 0xdc +/* 80384570 003814D0 84 64 00 04 */ lwzu r3, 4(r4) +/* 80384574 003814D4 28 03 00 00 */ cmplwi r3, 0 +/* 80384578 003814D8 40 82 00 0C */ bne lbl_80384584 +/* 8038457C 003814DC 93 FE 00 DC */ stw r31, 0xdc(r30) +/* 80384580 003814E0 48 00 00 08 */ b lbl_80384588 +lbl_80384584: +/* 80384584 003814E4 93 E3 02 FC */ stw r31, 0x2fc(r3) +lbl_80384588: +/* 80384588 003814E8 90 7F 03 00 */ stw r3, 0x300(r31) +/* 8038458C 003814EC 3B C0 00 00 */ li r30, 0 +/* 80384590 003814F0 38 7C 07 30 */ addi r3, r28, 0x730 +/* 80384594 003814F4 93 DF 02 FC */ stw r30, 0x2fc(r31) +/* 80384598 003814F8 93 E4 00 00 */ stw r31, 0(r4) +/* 8038459C 003814FC 4B FF B0 79 */ bl OSClearContext +/* 803845A0 00381500 93 CD AD 68 */ stw r30, lbl_805A9928@sda21(r13) +/* 803845A4 00381504 80 01 00 1C */ lwz r0, 0x1c(r1) +/* 803845A8 00381508 83 E1 00 14 */ lwz r31, 0x14(r1) +/* 803845AC 0038150C 83 C1 00 10 */ lwz r30, 0x10(r1) +/* 803845B0 00381510 83 A1 00 0C */ lwz r29, 0xc(r1) +/* 803845B4 00381514 83 81 00 08 */ lwz r28, 8(r1) +/* 803845B8 00381518 38 21 00 18 */ addi r1, r1, 0x18 +/* 803845BC 0038151C 7C 08 03 A6 */ mtlr r0 +/* 803845C0 00381520 4E 80 00 20 */ blr + +.global OSInitThreadQueue +OSInitThreadQueue: +/* 803845C4 00381524 38 00 00 00 */ li r0, 0 +/* 803845C8 00381528 90 03 00 04 */ stw r0, 4(r3) +/* 803845CC 0038152C 90 03 00 00 */ stw r0, 0(r3) +/* 803845D0 00381530 4E 80 00 20 */ blr + +.global OSGetCurrentThread +OSGetCurrentThread: +/* 803845D4 00381534 3C 60 80 00 */ lis r3, 0x800000E4@ha +/* 803845D8 00381538 80 63 00 E4 */ lwz r3, 0x800000E4@l(r3) +/* 803845DC 0038153C 4E 80 00 20 */ blr + +.global OSDisableScheduler +OSDisableScheduler: +/* 803845E0 00381540 7C 08 02 A6 */ mflr r0 +/* 803845E4 00381544 90 01 00 04 */ stw r0, 4(r1) +/* 803845E8 00381548 94 21 FF F0 */ stwu r1, -0x10(r1) +/* 803845EC 0038154C 93 E1 00 0C */ stw r31, 0xc(r1) +/* 803845F0 00381550 4B FF D0 71 */ bl OSDisableInterrupts +/* 803845F4 00381554 80 8D AD 68 */ lwz r4, lbl_805A9928@sda21(r13) +/* 803845F8 00381558 38 04 00 01 */ addi r0, r4, 1 +/* 803845FC 0038155C 90 0D AD 68 */ stw r0, lbl_805A9928@sda21(r13) +/* 80384600 00381560 7C 9F 23 78 */ mr r31, r4 +/* 80384604 00381564 4B FF D0 85 */ bl OSRestoreInterrupts +/* 80384608 00381568 7F E3 FB 78 */ mr r3, r31 +/* 8038460C 0038156C 80 01 00 14 */ lwz r0, 0x14(r1) +/* 80384610 00381570 83 E1 00 0C */ lwz r31, 0xc(r1) +/* 80384614 00381574 38 21 00 10 */ addi r1, r1, 0x10 +/* 80384618 00381578 7C 08 03 A6 */ mtlr r0 +/* 8038461C 0038157C 4E 80 00 20 */ blr + +.global OSEnableScheduler +OSEnableScheduler: +/* 80384620 00381580 7C 08 02 A6 */ mflr r0 +/* 80384624 00381584 90 01 00 04 */ stw r0, 4(r1) +/* 80384628 00381588 94 21 FF F0 */ stwu r1, -0x10(r1) +/* 8038462C 0038158C 93 E1 00 0C */ stw r31, 0xc(r1) +/* 80384630 00381590 4B FF D0 31 */ bl OSDisableInterrupts +/* 80384634 00381594 80 8D AD 68 */ lwz r4, lbl_805A9928@sda21(r13) +/* 80384638 00381598 38 04 FF FF */ addi r0, r4, -1 +/* 8038463C 0038159C 90 0D AD 68 */ stw r0, lbl_805A9928@sda21(r13) +/* 80384640 003815A0 7C 9F 23 78 */ mr r31, r4 +/* 80384644 003815A4 4B FF D0 45 */ bl OSRestoreInterrupts +/* 80384648 003815A8 7F E3 FB 78 */ mr r3, r31 +/* 8038464C 003815AC 80 01 00 14 */ lwz r0, 0x14(r1) +/* 80384650 003815B0 83 E1 00 0C */ lwz r31, 0xc(r1) +/* 80384654 003815B4 38 21 00 10 */ addi r1, r1, 0x10 +/* 80384658 003815B8 7C 08 03 A6 */ mtlr r0 +/* 8038465C 003815BC 4E 80 00 20 */ blr + +.global UnsetRun +UnsetRun: +/* 80384660 003815C0 80 83 02 E0 */ lwz r4, 0x2e0(r3) +/* 80384664 003815C4 80 A3 02 DC */ lwz r5, 0x2dc(r3) +/* 80384668 003815C8 28 04 00 00 */ cmplwi r4, 0 +/* 8038466C 003815CC 80 C3 02 E4 */ lwz r6, 0x2e4(r3) +/* 80384670 003815D0 40 82 00 0C */ bne lbl_8038467C +/* 80384674 003815D4 90 C5 00 04 */ stw r6, 4(r5) +/* 80384678 003815D8 48 00 00 08 */ b lbl_80384680 +lbl_8038467C: +/* 8038467C 003815DC 90 C4 02 E4 */ stw r6, 0x2e4(r4) +lbl_80384680: +/* 80384680 003815E0 28 06 00 00 */ cmplwi r6, 0 +/* 80384684 003815E4 40 82 00 0C */ bne lbl_80384690 +/* 80384688 003815E8 90 85 00 00 */ stw r4, 0(r5) +/* 8038468C 003815EC 48 00 00 08 */ b lbl_80384694 +lbl_80384690: +/* 80384690 003815F0 90 86 02 E0 */ stw r4, 0x2e0(r6) +lbl_80384694: +/* 80384694 003815F4 80 05 00 00 */ lwz r0, 0(r5) +/* 80384698 003815F8 28 00 00 00 */ cmplwi r0, 0 +/* 8038469C 003815FC 40 82 00 20 */ bne lbl_803846BC +/* 803846A0 00381600 80 03 02 D0 */ lwz r0, 0x2d0(r3) +/* 803846A4 00381604 38 80 00 01 */ li r4, 1 +/* 803846A8 00381608 80 AD AD 60 */ lwz r5, lbl_805A9920@sda21(r13) +/* 803846AC 0038160C 20 00 00 1F */ subfic r0, r0, 0x1f +/* 803846B0 00381610 7C 80 00 30 */ slw r0, r4, r0 +/* 803846B4 00381614 7C A0 00 78 */ andc r0, r5, r0 +/* 803846B8 00381618 90 0D AD 60 */ stw r0, lbl_805A9920@sda21(r13) +lbl_803846BC: +/* 803846BC 0038161C 38 00 00 00 */ li r0, 0 +/* 803846C0 00381620 90 03 02 DC */ stw r0, 0x2dc(r3) +/* 803846C4 00381624 4E 80 00 20 */ blr + +.global __OSGetEffectivePriority +__OSGetEffectivePriority: +/* 803846C8 00381628 80 83 02 D4 */ lwz r4, 0x2d4(r3) +/* 803846CC 0038162C 80 A3 02 F4 */ lwz r5, 0x2f4(r3) +/* 803846D0 00381630 48 00 00 24 */ b lbl_803846F4 +lbl_803846D4: +/* 803846D4 00381634 80 65 00 00 */ lwz r3, 0(r5) +/* 803846D8 00381638 28 03 00 00 */ cmplwi r3, 0 +/* 803846DC 0038163C 41 82 00 14 */ beq lbl_803846F0 +/* 803846E0 00381640 80 03 02 D0 */ lwz r0, 0x2d0(r3) +/* 803846E4 00381644 7C 00 20 00 */ cmpw r0, r4 +/* 803846E8 00381648 40 80 00 08 */ bge lbl_803846F0 +/* 803846EC 0038164C 7C 04 03 78 */ mr r4, r0 +lbl_803846F0: +/* 803846F0 00381650 80 A5 00 10 */ lwz r5, 0x10(r5) +lbl_803846F4: +/* 803846F4 00381654 28 05 00 00 */ cmplwi r5, 0 +/* 803846F8 00381658 40 82 FF DC */ bne lbl_803846D4 +/* 803846FC 0038165C 7C 83 23 78 */ mr r3, r4 +/* 80384700 00381660 4E 80 00 20 */ blr + +.global SetEffectivePriority +SetEffectivePriority: +/* 80384704 00381664 7C 08 02 A6 */ mflr r0 +/* 80384708 00381668 90 01 00 04 */ stw r0, 4(r1) +/* 8038470C 0038166C 94 21 FF E8 */ stwu r1, -0x18(r1) +/* 80384710 00381670 93 E1 00 14 */ stw r31, 0x14(r1) +/* 80384714 00381674 7C 7F 1B 78 */ mr r31, r3 +/* 80384718 00381678 93 C1 00 10 */ stw r30, 0x10(r1) +/* 8038471C 0038167C 3B C4 00 00 */ addi r30, r4, 0 +/* 80384720 00381680 A0 03 02 C8 */ lhz r0, 0x2c8(r3) +/* 80384724 00381684 2C 00 00 03 */ cmpwi r0, 3 +/* 80384728 00381688 41 82 01 80 */ beq lbl_803848A8 +/* 8038472C 0038168C 40 80 00 14 */ bge lbl_80384740 +/* 80384730 00381690 2C 00 00 01 */ cmpwi r0, 1 +/* 80384734 00381694 41 82 00 18 */ beq lbl_8038474C +/* 80384738 00381698 40 80 01 64 */ bge lbl_8038489C +/* 8038473C 0038169C 48 00 01 6C */ b lbl_803848A8 +lbl_80384740: +/* 80384740 003816A0 2C 00 00 05 */ cmpwi r0, 5 +/* 80384744 003816A4 40 80 01 64 */ bge lbl_803848A8 +/* 80384748 003816A8 48 00 00 7C */ b lbl_803847C4 +lbl_8038474C: +/* 8038474C 003816AC 7F E3 FB 78 */ mr r3, r31 +/* 80384750 003816B0 4B FF FF 11 */ bl UnsetRun +/* 80384754 003816B4 93 DF 02 D0 */ stw r30, 0x2d0(r31) +/* 80384758 003816B8 3C 60 80 54 */ lis r3, lbl_805415F8@ha +/* 8038475C 003816BC 38 03 15 F8 */ addi r0, r3, lbl_805415F8@l +/* 80384760 003816C0 80 7F 02 D0 */ lwz r3, 0x2d0(r31) +/* 80384764 003816C4 54 63 18 38 */ slwi r3, r3, 3 +/* 80384768 003816C8 7C 00 1A 14 */ add r0, r0, r3 +/* 8038476C 003816CC 90 1F 02 DC */ stw r0, 0x2dc(r31) +/* 80384770 003816D0 80 9F 02 DC */ lwz r4, 0x2dc(r31) +/* 80384774 003816D4 80 64 00 04 */ lwz r3, 4(r4) +/* 80384778 003816D8 28 03 00 00 */ cmplwi r3, 0 +/* 8038477C 003816DC 40 82 00 0C */ bne lbl_80384788 +/* 80384780 003816E0 93 E4 00 00 */ stw r31, 0(r4) +/* 80384784 003816E4 48 00 00 08 */ b lbl_8038478C +lbl_80384788: +/* 80384788 003816E8 93 E3 02 E0 */ stw r31, 0x2e0(r3) +lbl_8038478C: +/* 8038478C 003816EC 90 7F 02 E4 */ stw r3, 0x2e4(r31) +/* 80384790 003816F0 38 00 00 00 */ li r0, 0 +/* 80384794 003816F4 38 60 00 01 */ li r3, 1 +/* 80384798 003816F8 90 1F 02 E0 */ stw r0, 0x2e0(r31) +/* 8038479C 003816FC 80 9F 02 DC */ lwz r4, 0x2dc(r31) +/* 803847A0 00381700 93 E4 00 04 */ stw r31, 4(r4) +/* 803847A4 00381704 80 1F 02 D0 */ lwz r0, 0x2d0(r31) +/* 803847A8 00381708 80 8D AD 60 */ lwz r4, lbl_805A9920@sda21(r13) +/* 803847AC 0038170C 20 00 00 1F */ subfic r0, r0, 0x1f +/* 803847B0 00381710 7C 60 00 30 */ slw r0, r3, r0 +/* 803847B4 00381714 7C 80 03 78 */ or r0, r4, r0 +/* 803847B8 00381718 90 0D AD 60 */ stw r0, lbl_805A9920@sda21(r13) +/* 803847BC 0038171C 90 6D AD 64 */ stw r3, lbl_805A9924@sda21(r13) +/* 803847C0 00381720 48 00 00 E8 */ b lbl_803848A8 +lbl_803847C4: +/* 803847C4 00381724 80 9F 02 E0 */ lwz r4, 0x2e0(r31) +/* 803847C8 00381728 80 BF 02 E4 */ lwz r5, 0x2e4(r31) +/* 803847CC 0038172C 28 04 00 00 */ cmplwi r4, 0 +/* 803847D0 00381730 40 82 00 10 */ bne lbl_803847E0 +/* 803847D4 00381734 80 7F 02 DC */ lwz r3, 0x2dc(r31) +/* 803847D8 00381738 90 A3 00 04 */ stw r5, 4(r3) +/* 803847DC 0038173C 48 00 00 08 */ b lbl_803847E4 +lbl_803847E0: +/* 803847E0 00381740 90 A4 02 E4 */ stw r5, 0x2e4(r4) +lbl_803847E4: +/* 803847E4 00381744 28 05 00 00 */ cmplwi r5, 0 +/* 803847E8 00381748 40 82 00 10 */ bne lbl_803847F8 +/* 803847EC 0038174C 80 7F 02 DC */ lwz r3, 0x2dc(r31) +/* 803847F0 00381750 90 83 00 00 */ stw r4, 0(r3) +/* 803847F4 00381754 48 00 00 08 */ b lbl_803847FC +lbl_803847F8: +/* 803847F8 00381758 90 85 02 E0 */ stw r4, 0x2e0(r5) +lbl_803847FC: +/* 803847FC 0038175C 93 DF 02 D0 */ stw r30, 0x2d0(r31) +/* 80384800 00381760 80 9F 02 DC */ lwz r4, 0x2dc(r31) +/* 80384804 00381764 80 A4 00 00 */ lwz r5, 0(r4) +/* 80384808 00381768 48 00 00 08 */ b lbl_80384810 +lbl_8038480C: +/* 8038480C 0038176C 80 A5 02 E0 */ lwz r5, 0x2e0(r5) +lbl_80384810: +/* 80384810 00381770 28 05 00 00 */ cmplwi r5, 0 +/* 80384814 00381774 41 82 00 14 */ beq lbl_80384828 +/* 80384818 00381778 80 65 02 D0 */ lwz r3, 0x2d0(r5) +/* 8038481C 0038177C 80 1F 02 D0 */ lwz r0, 0x2d0(r31) +/* 80384820 00381780 7C 03 00 00 */ cmpw r3, r0 +/* 80384824 00381784 40 81 FF E8 */ ble lbl_8038480C +lbl_80384828: +/* 80384828 00381788 28 05 00 00 */ cmplwi r5, 0 +/* 8038482C 0038178C 40 82 00 34 */ bne lbl_80384860 +/* 80384830 00381790 80 64 00 04 */ lwz r3, 4(r4) +/* 80384834 00381794 28 03 00 00 */ cmplwi r3, 0 +/* 80384838 00381798 40 82 00 0C */ bne lbl_80384844 +/* 8038483C 0038179C 93 E4 00 00 */ stw r31, 0(r4) +/* 80384840 003817A0 48 00 00 08 */ b lbl_80384848 +lbl_80384844: +/* 80384844 003817A4 93 E3 02 E0 */ stw r31, 0x2e0(r3) +lbl_80384848: +/* 80384848 003817A8 90 7F 02 E4 */ stw r3, 0x2e4(r31) +/* 8038484C 003817AC 38 00 00 00 */ li r0, 0 +/* 80384850 003817B0 90 1F 02 E0 */ stw r0, 0x2e0(r31) +/* 80384854 003817B4 80 7F 02 DC */ lwz r3, 0x2dc(r31) +/* 80384858 003817B8 93 E3 00 04 */ stw r31, 4(r3) +/* 8038485C 003817BC 48 00 00 2C */ b lbl_80384888 +lbl_80384860: +/* 80384860 003817C0 90 BF 02 E0 */ stw r5, 0x2e0(r31) +/* 80384864 003817C4 80 65 02 E4 */ lwz r3, 0x2e4(r5) +/* 80384868 003817C8 93 E5 02 E4 */ stw r31, 0x2e4(r5) +/* 8038486C 003817CC 28 03 00 00 */ cmplwi r3, 0 +/* 80384870 003817D0 90 7F 02 E4 */ stw r3, 0x2e4(r31) +/* 80384874 003817D4 40 82 00 10 */ bne lbl_80384884 +/* 80384878 003817D8 80 7F 02 DC */ lwz r3, 0x2dc(r31) +/* 8038487C 003817DC 93 E3 00 00 */ stw r31, 0(r3) +/* 80384880 003817E0 48 00 00 08 */ b lbl_80384888 +lbl_80384884: +/* 80384884 003817E4 93 E3 02 E0 */ stw r31, 0x2e0(r3) +lbl_80384888: +/* 80384888 003817E8 80 7F 02 F0 */ lwz r3, 0x2f0(r31) +/* 8038488C 003817EC 28 03 00 00 */ cmplwi r3, 0 +/* 80384890 003817F0 41 82 00 18 */ beq lbl_803848A8 +/* 80384894 003817F4 80 63 00 08 */ lwz r3, 8(r3) +/* 80384898 003817F8 48 00 00 14 */ b lbl_803848AC +lbl_8038489C: +/* 8038489C 003817FC 38 00 00 01 */ li r0, 1 +/* 803848A0 00381800 90 0D AD 64 */ stw r0, lbl_805A9924@sda21(r13) +/* 803848A4 00381804 93 DF 02 D0 */ stw r30, 0x2d0(r31) +lbl_803848A8: +/* 803848A8 00381808 38 60 00 00 */ li r3, 0 +lbl_803848AC: +/* 803848AC 0038180C 80 01 00 1C */ lwz r0, 0x1c(r1) +/* 803848B0 00381810 83 E1 00 14 */ lwz r31, 0x14(r1) +/* 803848B4 00381814 83 C1 00 10 */ lwz r30, 0x10(r1) +/* 803848B8 00381818 38 21 00 18 */ addi r1, r1, 0x18 +/* 803848BC 0038181C 7C 08 03 A6 */ mtlr r0 +/* 803848C0 00381820 4E 80 00 20 */ blr + +.global SelectThread +SelectThread: +/* 803848C4 00381824 7C 08 02 A6 */ mflr r0 +/* 803848C8 00381828 3C 80 80 54 */ lis r4, lbl_805415F8@ha +/* 803848CC 0038182C 90 01 00 04 */ stw r0, 4(r1) +/* 803848D0 00381830 94 21 FF E8 */ stwu r1, -0x18(r1) +/* 803848D4 00381834 93 E1 00 14 */ stw r31, 0x14(r1) +/* 803848D8 00381838 3B E4 15 F8 */ addi r31, r4, lbl_805415F8@l +/* 803848DC 0038183C 93 C1 00 10 */ stw r30, 0x10(r1) +/* 803848E0 00381840 3B C3 00 00 */ addi r30, r3, 0 +/* 803848E4 00381844 80 0D AD 68 */ lwz r0, lbl_805A9928@sda21(r13) +/* 803848E8 00381848 2C 00 00 00 */ cmpwi r0, 0 +/* 803848EC 0038184C 40 81 00 0C */ ble lbl_803848F8 +/* 803848F0 00381850 38 60 00 00 */ li r3, 0 +/* 803848F4 00381854 48 00 01 E0 */ b lbl_80384AD4 +lbl_803848F8: +/* 803848F8 00381858 4B FF AB 81 */ bl OSGetCurrentContext +/* 803848FC 0038185C 3C 80 80 00 */ lis r4, 0x800000E4@ha +/* 80384900 00381860 80 C4 00 E4 */ lwz r6, 0x800000E4@l(r4) +/* 80384904 00381864 7C 03 30 40 */ cmplw r3, r6 +/* 80384908 00381868 38 66 00 00 */ addi r3, r6, 0 +/* 8038490C 0038186C 41 82 00 0C */ beq lbl_80384918 +/* 80384910 00381870 38 60 00 00 */ li r3, 0 +/* 80384914 00381874 48 00 01 C0 */ b lbl_80384AD4 +lbl_80384918: +/* 80384918 00381878 28 06 00 00 */ cmplwi r6, 0 +/* 8038491C 0038187C 41 82 00 BC */ beq lbl_803849D8 +/* 80384920 00381880 A0 06 02 C8 */ lhz r0, 0x2c8(r6) +/* 80384924 00381884 28 00 00 02 */ cmplwi r0, 2 +/* 80384928 00381888 40 82 00 90 */ bne lbl_803849B8 +/* 8038492C 0038188C 2C 1E 00 00 */ cmpwi r30, 0 +/* 80384930 00381890 40 82 00 20 */ bne lbl_80384950 +/* 80384934 00381894 80 8D AD 60 */ lwz r4, lbl_805A9920@sda21(r13) +/* 80384938 00381898 80 06 02 D0 */ lwz r0, 0x2d0(r6) +/* 8038493C 0038189C 7C 84 00 34 */ cntlzw r4, r4 +/* 80384940 003818A0 7C 00 20 00 */ cmpw r0, r4 +/* 80384944 003818A4 41 81 00 0C */ bgt lbl_80384950 +/* 80384948 003818A8 38 60 00 00 */ li r3, 0 +/* 8038494C 003818AC 48 00 01 88 */ b lbl_80384AD4 +lbl_80384950: +/* 80384950 003818B0 38 00 00 01 */ li r0, 1 +/* 80384954 003818B4 B0 06 02 C8 */ sth r0, 0x2c8(r6) +/* 80384958 003818B8 80 06 02 D0 */ lwz r0, 0x2d0(r6) +/* 8038495C 003818BC 54 00 18 38 */ slwi r0, r0, 3 +/* 80384960 003818C0 7C 1F 02 14 */ add r0, r31, r0 +/* 80384964 003818C4 90 06 02 DC */ stw r0, 0x2dc(r6) +/* 80384968 003818C8 80 A6 02 DC */ lwz r5, 0x2dc(r6) +/* 8038496C 003818CC 80 85 00 04 */ lwz r4, 4(r5) +/* 80384970 003818D0 28 04 00 00 */ cmplwi r4, 0 +/* 80384974 003818D4 40 82 00 0C */ bne lbl_80384980 +/* 80384978 003818D8 90 C5 00 00 */ stw r6, 0(r5) +/* 8038497C 003818DC 48 00 00 08 */ b lbl_80384984 +lbl_80384980: +/* 80384980 003818E0 90 C4 02 E0 */ stw r6, 0x2e0(r4) +lbl_80384984: +/* 80384984 003818E4 90 86 02 E4 */ stw r4, 0x2e4(r6) +/* 80384988 003818E8 38 00 00 00 */ li r0, 0 +/* 8038498C 003818EC 38 80 00 01 */ li r4, 1 +/* 80384990 003818F0 90 06 02 E0 */ stw r0, 0x2e0(r6) +/* 80384994 003818F4 80 A6 02 DC */ lwz r5, 0x2dc(r6) +/* 80384998 003818F8 90 C5 00 04 */ stw r6, 4(r5) +/* 8038499C 003818FC 80 06 02 D0 */ lwz r0, 0x2d0(r6) +/* 803849A0 00381900 80 AD AD 60 */ lwz r5, lbl_805A9920@sda21(r13) +/* 803849A4 00381904 20 00 00 1F */ subfic r0, r0, 0x1f +/* 803849A8 00381908 7C 80 00 30 */ slw r0, r4, r0 +/* 803849AC 0038190C 7C A0 03 78 */ or r0, r5, r0 +/* 803849B0 00381910 90 0D AD 60 */ stw r0, lbl_805A9920@sda21(r13) +/* 803849B4 00381914 90 8D AD 64 */ stw r4, lbl_805A9924@sda21(r13) +lbl_803849B8: +/* 803849B8 00381918 A0 06 01 A2 */ lhz r0, 0x1a2(r6) +/* 803849BC 0038191C 54 00 07 BD */ rlwinm. r0, r0, 0, 0x1e, 0x1e +/* 803849C0 00381920 40 82 00 18 */ bne lbl_803849D8 +/* 803849C4 00381924 4B FF AA C1 */ bl OSSaveContext +/* 803849C8 00381928 28 03 00 00 */ cmplwi r3, 0 +/* 803849CC 0038192C 41 82 00 0C */ beq lbl_803849D8 +/* 803849D0 00381930 38 60 00 00 */ li r3, 0 +/* 803849D4 00381934 48 00 01 00 */ b lbl_80384AD4 +lbl_803849D8: +/* 803849D8 00381938 81 8D 9F 90 */ lwz r12, lbl_805A8B50@sda21(r13) +/* 803849DC 0038193C 3F C0 80 00 */ lis r30, 0x800000E4@ha +/* 803849E0 00381940 80 7E 00 E4 */ lwz r3, 0x800000E4@l(r30) +/* 803849E4 00381944 38 80 00 00 */ li r4, 0 +/* 803849E8 00381948 7D 88 03 A6 */ mtlr r12 +/* 803849EC 0038194C 4E 80 00 21 */ blrl +/* 803849F0 00381950 80 0D AD 60 */ lwz r0, lbl_805A9920@sda21(r13) +/* 803849F4 00381954 38 60 00 00 */ li r3, 0 +/* 803849F8 00381958 90 7E 00 E4 */ stw r3, 0xe4(r30) +/* 803849FC 0038195C 28 00 00 00 */ cmplwi r0, 0 +/* 80384A00 00381960 40 82 00 34 */ bne lbl_80384A34 +/* 80384A04 00381964 38 7F 07 30 */ addi r3, r31, 0x730 +/* 80384A08 00381968 4B FF AA 15 */ bl OSSetCurrentContext +lbl_80384A0C: +/* 80384A0C 0038196C 4B FF CC 69 */ bl OSEnableInterrupts +lbl_80384A10: +/* 80384A10 00381970 80 0D AD 60 */ lwz r0, lbl_805A9920@sda21(r13) +/* 80384A14 00381974 28 00 00 00 */ cmplwi r0, 0 +/* 80384A18 00381978 41 82 FF F8 */ beq lbl_80384A10 +/* 80384A1C 0038197C 4B FF CC 45 */ bl OSDisableInterrupts +/* 80384A20 00381980 80 0D AD 60 */ lwz r0, lbl_805A9920@sda21(r13) +/* 80384A24 00381984 28 00 00 00 */ cmplwi r0, 0 +/* 80384A28 00381988 41 82 FF E4 */ beq lbl_80384A0C +/* 80384A2C 0038198C 38 7F 07 30 */ addi r3, r31, 0x730 +/* 80384A30 00381990 4B FF AB E5 */ bl OSClearContext +lbl_80384A34: +/* 80384A34 00381994 38 60 00 00 */ li r3, 0 +/* 80384A38 00381998 90 6D AD 64 */ stw r3, lbl_805A9924@sda21(r13) +/* 80384A3C 0038199C 80 0D AD 60 */ lwz r0, lbl_805A9920@sda21(r13) +/* 80384A40 003819A0 7C 07 00 34 */ cntlzw r7, r0 +/* 80384A44 003819A4 54 E0 18 38 */ slwi r0, r7, 3 +/* 80384A48 003819A8 7C 9F 02 14 */ add r4, r31, r0 +/* 80384A4C 003819AC 80 A4 00 00 */ lwz r5, 0(r4) +/* 80384A50 003819B0 80 C5 02 E0 */ lwz r6, 0x2e0(r5) +/* 80384A54 003819B4 3B C5 00 00 */ addi r30, r5, 0 +/* 80384A58 003819B8 28 06 00 00 */ cmplwi r6, 0 +/* 80384A5C 003819BC 40 82 00 0C */ bne lbl_80384A68 +/* 80384A60 003819C0 90 64 00 04 */ stw r3, 4(r4) +/* 80384A64 003819C4 48 00 00 08 */ b lbl_80384A6C +lbl_80384A68: +/* 80384A68 003819C8 90 66 02 E4 */ stw r3, 0x2e4(r6) +lbl_80384A6C: +/* 80384A6C 003819CC 90 C4 00 00 */ stw r6, 0(r4) +/* 80384A70 003819D0 80 04 00 00 */ lwz r0, 0(r4) +/* 80384A74 003819D4 28 00 00 00 */ cmplwi r0, 0 +/* 80384A78 003819D8 40 82 00 1C */ bne lbl_80384A94 +/* 80384A7C 003819DC 20 07 00 1F */ subfic r0, r7, 0x1f +/* 80384A80 003819E0 80 8D AD 60 */ lwz r4, lbl_805A9920@sda21(r13) +/* 80384A84 003819E4 38 60 00 01 */ li r3, 1 +/* 80384A88 003819E8 7C 60 00 30 */ slw r0, r3, r0 +/* 80384A8C 003819EC 7C 80 00 78 */ andc r0, r4, r0 +/* 80384A90 003819F0 90 0D AD 60 */ stw r0, lbl_805A9920@sda21(r13) +lbl_80384A94: +/* 80384A94 003819F4 38 00 00 00 */ li r0, 0 +/* 80384A98 003819F8 90 1E 02 DC */ stw r0, 0x2dc(r30) +/* 80384A9C 003819FC 38 00 00 02 */ li r0, 2 +/* 80384AA0 00381A00 3F E0 80 00 */ lis r31, 0x800000E4@ha +/* 80384AA4 00381A04 B0 1E 02 C8 */ sth r0, 0x2c8(r30) +/* 80384AA8 00381A08 7F C4 F3 78 */ mr r4, r30 +/* 80384AAC 00381A0C 81 8D 9F 90 */ lwz r12, lbl_805A8B50@sda21(r13) +/* 80384AB0 00381A10 80 7F 00 E4 */ lwz r3, 0x800000E4@l(r31) +/* 80384AB4 00381A14 7D 88 03 A6 */ mtlr r12 +/* 80384AB8 00381A18 4E 80 00 21 */ blrl +/* 80384ABC 00381A1C 93 DF 00 E4 */ stw r30, 0xe4(r31) +/* 80384AC0 00381A20 7F C3 F3 78 */ mr r3, r30 +/* 80384AC4 00381A24 4B FF A9 59 */ bl OSSetCurrentContext +/* 80384AC8 00381A28 7F C3 F3 78 */ mr r3, r30 +/* 80384ACC 00381A2C 4B FF AA 39 */ bl OSLoadContext +/* 80384AD0 00381A30 7F C3 F3 78 */ mr r3, r30 +lbl_80384AD4: +/* 80384AD4 00381A34 80 01 00 1C */ lwz r0, 0x1c(r1) +/* 80384AD8 00381A38 83 E1 00 14 */ lwz r31, 0x14(r1) +/* 80384ADC 00381A3C 83 C1 00 10 */ lwz r30, 0x10(r1) +/* 80384AE0 00381A40 38 21 00 18 */ addi r1, r1, 0x18 +/* 80384AE4 00381A44 7C 08 03 A6 */ mtlr r0 +/* 80384AE8 00381A48 4E 80 00 20 */ blr + +.global __OSReschedule +__OSReschedule: +/* 80384AEC 00381A4C 7C 08 02 A6 */ mflr r0 +/* 80384AF0 00381A50 90 01 00 04 */ stw r0, 4(r1) +/* 80384AF4 00381A54 94 21 FF F8 */ stwu r1, -8(r1) +/* 80384AF8 00381A58 80 0D AD 64 */ lwz r0, lbl_805A9924@sda21(r13) +/* 80384AFC 00381A5C 2C 00 00 00 */ cmpwi r0, 0 +/* 80384B00 00381A60 41 82 00 0C */ beq lbl_80384B0C +/* 80384B04 00381A64 38 60 00 00 */ li r3, 0 +/* 80384B08 00381A68 4B FF FD BD */ bl SelectThread +lbl_80384B0C: +/* 80384B0C 00381A6C 80 01 00 0C */ lwz r0, 0xc(r1) +/* 80384B10 00381A70 38 21 00 08 */ addi r1, r1, 8 +/* 80384B14 00381A74 7C 08 03 A6 */ mtlr r0 +/* 80384B18 00381A78 4E 80 00 20 */ blr + +.global OSYieldThread +OSYieldThread: +/* 80384B1C 00381A7C 7C 08 02 A6 */ mflr r0 +/* 80384B20 00381A80 90 01 00 04 */ stw r0, 4(r1) +/* 80384B24 00381A84 94 21 FF F0 */ stwu r1, -0x10(r1) +/* 80384B28 00381A88 93 E1 00 0C */ stw r31, 0xc(r1) +/* 80384B2C 00381A8C 4B FF CB 35 */ bl OSDisableInterrupts +/* 80384B30 00381A90 3B E3 00 00 */ addi r31, r3, 0 +/* 80384B34 00381A94 38 60 00 01 */ li r3, 1 +/* 80384B38 00381A98 4B FF FD 8D */ bl SelectThread +/* 80384B3C 00381A9C 7F E3 FB 78 */ mr r3, r31 +/* 80384B40 00381AA0 4B FF CB 49 */ bl OSRestoreInterrupts +/* 80384B44 00381AA4 80 01 00 14 */ lwz r0, 0x14(r1) +/* 80384B48 00381AA8 83 E1 00 0C */ lwz r31, 0xc(r1) +/* 80384B4C 00381AAC 38 21 00 10 */ addi r1, r1, 0x10 +/* 80384B50 00381AB0 7C 08 03 A6 */ mtlr r0 +/* 80384B54 00381AB4 4E 80 00 20 */ blr + +.global OSCancelThread +OSCancelThread: +/* 80384B58 00381AB8 7C 08 02 A6 */ mflr r0 +/* 80384B5C 00381ABC 90 01 00 04 */ stw r0, 4(r1) +/* 80384B60 00381AC0 94 21 FF E0 */ stwu r1, -0x20(r1) +/* 80384B64 00381AC4 93 E1 00 1C */ stw r31, 0x1c(r1) +/* 80384B68 00381AC8 93 C1 00 18 */ stw r30, 0x18(r1) +/* 80384B6C 00381ACC 7C 7E 1B 78 */ mr r30, r3 +/* 80384B70 00381AD0 93 A1 00 14 */ stw r29, 0x14(r1) +/* 80384B74 00381AD4 4B FF CA ED */ bl OSDisableInterrupts +/* 80384B78 00381AD8 A0 1E 02 C8 */ lhz r0, 0x2c8(r30) +/* 80384B7C 00381ADC 3B E3 00 00 */ addi r31, r3, 0 +/* 80384B80 00381AE0 2C 00 00 03 */ cmpwi r0, 3 +/* 80384B84 00381AE4 41 82 00 DC */ beq lbl_80384C60 +/* 80384B88 00381AE8 40 80 00 14 */ bge lbl_80384B9C +/* 80384B8C 00381AEC 2C 00 00 01 */ cmpwi r0, 1 +/* 80384B90 00381AF0 41 82 00 18 */ beq lbl_80384BA8 +/* 80384B94 00381AF4 40 80 00 2C */ bge lbl_80384BC0 +/* 80384B98 00381AF8 48 00 00 C8 */ b lbl_80384C60 +lbl_80384B9C: +/* 80384B9C 00381AFC 2C 00 00 05 */ cmpwi r0, 5 +/* 80384BA0 00381B00 40 80 00 C0 */ bge lbl_80384C60 +/* 80384BA4 00381B04 48 00 00 28 */ b lbl_80384BCC +lbl_80384BA8: +/* 80384BA8 00381B08 80 1E 02 CC */ lwz r0, 0x2cc(r30) +/* 80384BAC 00381B0C 2C 00 00 00 */ cmpwi r0, 0 +/* 80384BB0 00381B10 41 81 00 BC */ bgt lbl_80384C6C +/* 80384BB4 00381B14 7F C3 F3 78 */ mr r3, r30 +/* 80384BB8 00381B18 4B FF FA A9 */ bl UnsetRun +/* 80384BBC 00381B1C 48 00 00 B0 */ b lbl_80384C6C +lbl_80384BC0: +/* 80384BC0 00381B20 38 00 00 01 */ li r0, 1 +/* 80384BC4 00381B24 90 0D AD 64 */ stw r0, lbl_805A9924@sda21(r13) +/* 80384BC8 00381B28 48 00 00 A4 */ b lbl_80384C6C +lbl_80384BCC: +/* 80384BCC 00381B2C 80 9E 02 E0 */ lwz r4, 0x2e0(r30) +/* 80384BD0 00381B30 80 BE 02 E4 */ lwz r5, 0x2e4(r30) +/* 80384BD4 00381B34 28 04 00 00 */ cmplwi r4, 0 +/* 80384BD8 00381B38 40 82 00 10 */ bne lbl_80384BE8 +/* 80384BDC 00381B3C 80 7E 02 DC */ lwz r3, 0x2dc(r30) +/* 80384BE0 00381B40 90 A3 00 04 */ stw r5, 4(r3) +/* 80384BE4 00381B44 48 00 00 08 */ b lbl_80384BEC +lbl_80384BE8: +/* 80384BE8 00381B48 90 A4 02 E4 */ stw r5, 0x2e4(r4) +lbl_80384BEC: +/* 80384BEC 00381B4C 28 05 00 00 */ cmplwi r5, 0 +/* 80384BF0 00381B50 40 82 00 10 */ bne lbl_80384C00 +/* 80384BF4 00381B54 80 7E 02 DC */ lwz r3, 0x2dc(r30) +/* 80384BF8 00381B58 90 83 00 00 */ stw r4, 0(r3) +/* 80384BFC 00381B5C 48 00 00 08 */ b lbl_80384C04 +lbl_80384C00: +/* 80384C00 00381B60 90 85 02 E0 */ stw r4, 0x2e0(r5) +lbl_80384C04: +/* 80384C04 00381B64 38 00 00 00 */ li r0, 0 +/* 80384C08 00381B68 90 1E 02 DC */ stw r0, 0x2dc(r30) +/* 80384C0C 00381B6C 80 1E 02 CC */ lwz r0, 0x2cc(r30) +/* 80384C10 00381B70 2C 00 00 00 */ cmpwi r0, 0 +/* 80384C14 00381B74 41 81 00 58 */ bgt lbl_80384C6C +/* 80384C18 00381B78 80 7E 02 F0 */ lwz r3, 0x2f0(r30) +/* 80384C1C 00381B7C 28 03 00 00 */ cmplwi r3, 0 +/* 80384C20 00381B80 41 82 00 4C */ beq lbl_80384C6C +/* 80384C24 00381B84 83 A3 00 08 */ lwz r29, 8(r3) +lbl_80384C28: +/* 80384C28 00381B88 80 1D 02 CC */ lwz r0, 0x2cc(r29) +/* 80384C2C 00381B8C 2C 00 00 00 */ cmpwi r0, 0 +/* 80384C30 00381B90 41 81 00 3C */ bgt lbl_80384C6C +/* 80384C34 00381B94 7F A3 EB 78 */ mr r3, r29 +/* 80384C38 00381B98 4B FF FA 91 */ bl __OSGetEffectivePriority +/* 80384C3C 00381B9C 80 1D 02 D0 */ lwz r0, 0x2d0(r29) +/* 80384C40 00381BA0 38 83 00 00 */ addi r4, r3, 0 +/* 80384C44 00381BA4 7C 00 20 00 */ cmpw r0, r4 +/* 80384C48 00381BA8 41 82 00 24 */ beq lbl_80384C6C +/* 80384C4C 00381BAC 7F A3 EB 78 */ mr r3, r29 +/* 80384C50 00381BB0 4B FF FA B5 */ bl SetEffectivePriority +/* 80384C54 00381BB4 7C 7D 1B 79 */ or. r29, r3, r3 +/* 80384C58 00381BB8 40 82 FF D0 */ bne lbl_80384C28 +/* 80384C5C 00381BBC 48 00 00 10 */ b lbl_80384C6C +lbl_80384C60: +/* 80384C60 00381BC0 7F E3 FB 78 */ mr r3, r31 +/* 80384C64 00381BC4 4B FF CA 25 */ bl OSRestoreInterrupts +/* 80384C68 00381BC8 48 00 00 90 */ b lbl_80384CF8 +lbl_80384C6C: +/* 80384C6C 00381BCC 7F C3 F3 78 */ mr r3, r30 +/* 80384C70 00381BD0 4B FF A9 A5 */ bl OSClearContext +/* 80384C74 00381BD4 A0 1E 02 CA */ lhz r0, 0x2ca(r30) +/* 80384C78 00381BD8 54 00 07 FF */ clrlwi. r0, r0, 0x1f +/* 80384C7C 00381BDC 41 82 00 48 */ beq lbl_80384CC4 +/* 80384C80 00381BE0 80 9E 02 FC */ lwz r4, 0x2fc(r30) +/* 80384C84 00381BE4 80 BE 03 00 */ lwz r5, 0x300(r30) +/* 80384C88 00381BE8 28 04 00 00 */ cmplwi r4, 0 +/* 80384C8C 00381BEC 40 82 00 10 */ bne lbl_80384C9C +/* 80384C90 00381BF0 3C 60 80 00 */ lis r3, 0x800000E0@ha +/* 80384C94 00381BF4 90 A3 00 E0 */ stw r5, 0x800000E0@l(r3) +/* 80384C98 00381BF8 48 00 00 08 */ b lbl_80384CA0 +lbl_80384C9C: +/* 80384C9C 00381BFC 90 A4 03 00 */ stw r5, 0x300(r4) +lbl_80384CA0: +/* 80384CA0 00381C00 28 05 00 00 */ cmplwi r5, 0 +/* 80384CA4 00381C04 40 82 00 10 */ bne lbl_80384CB4 +/* 80384CA8 00381C08 3C 60 80 00 */ lis r3, 0x800000DC@ha +/* 80384CAC 00381C0C 90 83 00 DC */ stw r4, 0x800000DC@l(r3) +/* 80384CB0 00381C10 48 00 00 08 */ b lbl_80384CB8 +lbl_80384CB4: +/* 80384CB4 00381C14 90 85 02 FC */ stw r4, 0x2fc(r5) +lbl_80384CB8: +/* 80384CB8 00381C18 38 00 00 00 */ li r0, 0 +/* 80384CBC 00381C1C B0 1E 02 C8 */ sth r0, 0x2c8(r30) +/* 80384CC0 00381C20 48 00 00 0C */ b lbl_80384CCC +lbl_80384CC4: +/* 80384CC4 00381C24 38 00 00 08 */ li r0, 8 +/* 80384CC8 00381C28 B0 1E 02 C8 */ sth r0, 0x2c8(r30) +lbl_80384CCC: +/* 80384CCC 00381C2C 7F C3 F3 78 */ mr r3, r30 +/* 80384CD0 00381C30 4B FF E0 E9 */ bl __OSUnlockAllMutex +/* 80384CD4 00381C34 38 7E 02 E8 */ addi r3, r30, 0x2e8 +/* 80384CD8 00381C38 48 00 05 21 */ bl OSWakeupThread +/* 80384CDC 00381C3C 80 0D AD 64 */ lwz r0, lbl_805A9924@sda21(r13) +/* 80384CE0 00381C40 2C 00 00 00 */ cmpwi r0, 0 +/* 80384CE4 00381C44 41 82 00 0C */ beq lbl_80384CF0 +/* 80384CE8 00381C48 38 60 00 00 */ li r3, 0 +/* 80384CEC 00381C4C 4B FF FB D9 */ bl SelectThread +lbl_80384CF0: +/* 80384CF0 00381C50 7F E3 FB 78 */ mr r3, r31 +/* 80384CF4 00381C54 4B FF C9 95 */ bl OSRestoreInterrupts +lbl_80384CF8: +/* 80384CF8 00381C58 80 01 00 24 */ lwz r0, 0x24(r1) +/* 80384CFC 00381C5C 83 E1 00 1C */ lwz r31, 0x1c(r1) +/* 80384D00 00381C60 83 C1 00 18 */ lwz r30, 0x18(r1) +/* 80384D04 00381C64 83 A1 00 14 */ lwz r29, 0x14(r1) +/* 80384D08 00381C68 38 21 00 20 */ addi r1, r1, 0x20 +/* 80384D0C 00381C6C 7C 08 03 A6 */ mtlr r0 +/* 80384D10 00381C70 4E 80 00 20 */ blr + +.global OSResumeThread +OSResumeThread: +/* 80384D14 00381C74 7C 08 02 A6 */ mflr r0 +/* 80384D18 00381C78 90 01 00 04 */ stw r0, 4(r1) +/* 80384D1C 00381C7C 94 21 FF D8 */ stwu r1, -0x28(r1) +/* 80384D20 00381C80 93 E1 00 24 */ stw r31, 0x24(r1) +/* 80384D24 00381C84 93 C1 00 20 */ stw r30, 0x20(r1) +/* 80384D28 00381C88 93 A1 00 1C */ stw r29, 0x1c(r1) +/* 80384D2C 00381C8C 7C 7D 1B 78 */ mr r29, r3 +/* 80384D30 00381C90 4B FF C9 31 */ bl OSDisableInterrupts +/* 80384D34 00381C94 80 9D 02 CC */ lwz r4, 0x2cc(r29) +/* 80384D38 00381C98 3B E3 00 00 */ addi r31, r3, 0 +/* 80384D3C 00381C9C 38 04 FF FF */ addi r0, r4, -1 +/* 80384D40 00381CA0 90 1D 02 CC */ stw r0, 0x2cc(r29) +/* 80384D44 00381CA4 7C 9E 23 78 */ mr r30, r4 +/* 80384D48 00381CA8 80 1D 02 CC */ lwz r0, 0x2cc(r29) +/* 80384D4C 00381CAC 2C 00 00 00 */ cmpwi r0, 0 +/* 80384D50 00381CB0 40 80 00 10 */ bge lbl_80384D60 +/* 80384D54 00381CB4 38 00 00 00 */ li r0, 0 +/* 80384D58 00381CB8 90 1D 02 CC */ stw r0, 0x2cc(r29) +/* 80384D5C 00381CBC 48 00 02 18 */ b lbl_80384F74 +lbl_80384D60: +/* 80384D60 00381CC0 40 82 02 14 */ bne lbl_80384F74 +/* 80384D64 00381CC4 A0 1D 02 C8 */ lhz r0, 0x2c8(r29) +/* 80384D68 00381CC8 2C 00 00 04 */ cmpwi r0, 4 +/* 80384D6C 00381CCC 41 82 00 B8 */ beq lbl_80384E24 +/* 80384D70 00381CD0 40 80 01 F0 */ bge lbl_80384F60 +/* 80384D74 00381CD4 2C 00 00 01 */ cmpwi r0, 1 +/* 80384D78 00381CD8 41 82 00 08 */ beq lbl_80384D80 +/* 80384D7C 00381CDC 48 00 01 E4 */ b lbl_80384F60 +lbl_80384D80: +/* 80384D80 00381CE0 80 1D 02 D4 */ lwz r0, 0x2d4(r29) +/* 80384D84 00381CE4 80 7D 02 F4 */ lwz r3, 0x2f4(r29) +/* 80384D88 00381CE8 48 00 00 24 */ b lbl_80384DAC +lbl_80384D8C: +/* 80384D8C 00381CEC 80 83 00 00 */ lwz r4, 0(r3) +/* 80384D90 00381CF0 28 04 00 00 */ cmplwi r4, 0 +/* 80384D94 00381CF4 41 82 00 14 */ beq lbl_80384DA8 +/* 80384D98 00381CF8 80 84 02 D0 */ lwz r4, 0x2d0(r4) +/* 80384D9C 00381CFC 7C 04 00 00 */ cmpw r4, r0 +/* 80384DA0 00381D00 40 80 00 08 */ bge lbl_80384DA8 +/* 80384DA4 00381D04 7C 80 23 78 */ mr r0, r4 +lbl_80384DA8: +/* 80384DA8 00381D08 80 63 00 10 */ lwz r3, 0x10(r3) +lbl_80384DAC: +/* 80384DAC 00381D0C 28 03 00 00 */ cmplwi r3, 0 +/* 80384DB0 00381D10 40 82 FF DC */ bne lbl_80384D8C +/* 80384DB4 00381D14 90 1D 02 D0 */ stw r0, 0x2d0(r29) +/* 80384DB8 00381D18 3C 60 80 54 */ lis r3, lbl_805415F8@ha +/* 80384DBC 00381D1C 38 03 15 F8 */ addi r0, r3, lbl_805415F8@l +/* 80384DC0 00381D20 80 7D 02 D0 */ lwz r3, 0x2d0(r29) +/* 80384DC4 00381D24 54 63 18 38 */ slwi r3, r3, 3 +/* 80384DC8 00381D28 7C 00 1A 14 */ add r0, r0, r3 +/* 80384DCC 00381D2C 90 1D 02 DC */ stw r0, 0x2dc(r29) +/* 80384DD0 00381D30 80 9D 02 DC */ lwz r4, 0x2dc(r29) +/* 80384DD4 00381D34 80 64 00 04 */ lwz r3, 4(r4) +/* 80384DD8 00381D38 28 03 00 00 */ cmplwi r3, 0 +/* 80384DDC 00381D3C 40 82 00 0C */ bne lbl_80384DE8 +/* 80384DE0 00381D40 93 A4 00 00 */ stw r29, 0(r4) +/* 80384DE4 00381D44 48 00 00 08 */ b lbl_80384DEC +lbl_80384DE8: +/* 80384DE8 00381D48 93 A3 02 E0 */ stw r29, 0x2e0(r3) +lbl_80384DEC: +/* 80384DEC 00381D4C 90 7D 02 E4 */ stw r3, 0x2e4(r29) +/* 80384DF0 00381D50 38 00 00 00 */ li r0, 0 +/* 80384DF4 00381D54 38 60 00 01 */ li r3, 1 +/* 80384DF8 00381D58 90 1D 02 E0 */ stw r0, 0x2e0(r29) +/* 80384DFC 00381D5C 80 9D 02 DC */ lwz r4, 0x2dc(r29) +/* 80384E00 00381D60 93 A4 00 04 */ stw r29, 4(r4) +/* 80384E04 00381D64 80 1D 02 D0 */ lwz r0, 0x2d0(r29) +/* 80384E08 00381D68 80 8D AD 60 */ lwz r4, lbl_805A9920@sda21(r13) +/* 80384E0C 00381D6C 20 00 00 1F */ subfic r0, r0, 0x1f +/* 80384E10 00381D70 7C 60 00 30 */ slw r0, r3, r0 +/* 80384E14 00381D74 7C 80 03 78 */ or r0, r4, r0 +/* 80384E18 00381D78 90 0D AD 60 */ stw r0, lbl_805A9920@sda21(r13) +/* 80384E1C 00381D7C 90 6D AD 64 */ stw r3, lbl_805A9924@sda21(r13) +/* 80384E20 00381D80 48 00 01 40 */ b lbl_80384F60 +lbl_80384E24: +/* 80384E24 00381D84 80 9D 02 E0 */ lwz r4, 0x2e0(r29) +/* 80384E28 00381D88 80 BD 02 E4 */ lwz r5, 0x2e4(r29) +/* 80384E2C 00381D8C 28 04 00 00 */ cmplwi r4, 0 +/* 80384E30 00381D90 40 82 00 10 */ bne lbl_80384E40 +/* 80384E34 00381D94 80 7D 02 DC */ lwz r3, 0x2dc(r29) +/* 80384E38 00381D98 90 A3 00 04 */ stw r5, 4(r3) +/* 80384E3C 00381D9C 48 00 00 08 */ b lbl_80384E44 +lbl_80384E40: +/* 80384E40 00381DA0 90 A4 02 E4 */ stw r5, 0x2e4(r4) +lbl_80384E44: +/* 80384E44 00381DA4 28 05 00 00 */ cmplwi r5, 0 +/* 80384E48 00381DA8 40 82 00 10 */ bne lbl_80384E58 +/* 80384E4C 00381DAC 80 7D 02 DC */ lwz r3, 0x2dc(r29) +/* 80384E50 00381DB0 90 83 00 00 */ stw r4, 0(r3) +/* 80384E54 00381DB4 48 00 00 08 */ b lbl_80384E5C +lbl_80384E58: +/* 80384E58 00381DB8 90 85 02 E0 */ stw r4, 0x2e0(r5) +lbl_80384E5C: +/* 80384E5C 00381DBC 80 1D 02 D4 */ lwz r0, 0x2d4(r29) +/* 80384E60 00381DC0 80 7D 02 F4 */ lwz r3, 0x2f4(r29) +/* 80384E64 00381DC4 48 00 00 24 */ b lbl_80384E88 +lbl_80384E68: +/* 80384E68 00381DC8 80 83 00 00 */ lwz r4, 0(r3) +/* 80384E6C 00381DCC 28 04 00 00 */ cmplwi r4, 0 +/* 80384E70 00381DD0 41 82 00 14 */ beq lbl_80384E84 +/* 80384E74 00381DD4 80 84 02 D0 */ lwz r4, 0x2d0(r4) +/* 80384E78 00381DD8 7C 04 00 00 */ cmpw r4, r0 +/* 80384E7C 00381DDC 40 80 00 08 */ bge lbl_80384E84 +/* 80384E80 00381DE0 7C 80 23 78 */ mr r0, r4 +lbl_80384E84: +/* 80384E84 00381DE4 80 63 00 10 */ lwz r3, 0x10(r3) +lbl_80384E88: +/* 80384E88 00381DE8 28 03 00 00 */ cmplwi r3, 0 +/* 80384E8C 00381DEC 40 82 FF DC */ bne lbl_80384E68 +/* 80384E90 00381DF0 90 1D 02 D0 */ stw r0, 0x2d0(r29) +/* 80384E94 00381DF4 80 9D 02 DC */ lwz r4, 0x2dc(r29) +/* 80384E98 00381DF8 80 A4 00 00 */ lwz r5, 0(r4) +/* 80384E9C 00381DFC 48 00 00 08 */ b lbl_80384EA4 +lbl_80384EA0: +/* 80384EA0 00381E00 80 A5 02 E0 */ lwz r5, 0x2e0(r5) +lbl_80384EA4: +/* 80384EA4 00381E04 28 05 00 00 */ cmplwi r5, 0 +/* 80384EA8 00381E08 41 82 00 14 */ beq lbl_80384EBC +/* 80384EAC 00381E0C 80 65 02 D0 */ lwz r3, 0x2d0(r5) +/* 80384EB0 00381E10 80 1D 02 D0 */ lwz r0, 0x2d0(r29) +/* 80384EB4 00381E14 7C 03 00 00 */ cmpw r3, r0 +/* 80384EB8 00381E18 40 81 FF E8 */ ble lbl_80384EA0 +lbl_80384EBC: +/* 80384EBC 00381E1C 28 05 00 00 */ cmplwi r5, 0 +/* 80384EC0 00381E20 40 82 00 34 */ bne lbl_80384EF4 +/* 80384EC4 00381E24 80 64 00 04 */ lwz r3, 4(r4) +/* 80384EC8 00381E28 28 03 00 00 */ cmplwi r3, 0 +/* 80384ECC 00381E2C 40 82 00 0C */ bne lbl_80384ED8 +/* 80384ED0 00381E30 93 A4 00 00 */ stw r29, 0(r4) +/* 80384ED4 00381E34 48 00 00 08 */ b lbl_80384EDC +lbl_80384ED8: +/* 80384ED8 00381E38 93 A3 02 E0 */ stw r29, 0x2e0(r3) +lbl_80384EDC: +/* 80384EDC 00381E3C 90 7D 02 E4 */ stw r3, 0x2e4(r29) +/* 80384EE0 00381E40 38 00 00 00 */ li r0, 0 +/* 80384EE4 00381E44 90 1D 02 E0 */ stw r0, 0x2e0(r29) +/* 80384EE8 00381E48 80 7D 02 DC */ lwz r3, 0x2dc(r29) +/* 80384EEC 00381E4C 93 A3 00 04 */ stw r29, 4(r3) +/* 80384EF0 00381E50 48 00 00 2C */ b lbl_80384F1C +lbl_80384EF4: +/* 80384EF4 00381E54 90 BD 02 E0 */ stw r5, 0x2e0(r29) +/* 80384EF8 00381E58 80 65 02 E4 */ lwz r3, 0x2e4(r5) +/* 80384EFC 00381E5C 93 A5 02 E4 */ stw r29, 0x2e4(r5) +/* 80384F00 00381E60 28 03 00 00 */ cmplwi r3, 0 +/* 80384F04 00381E64 90 7D 02 E4 */ stw r3, 0x2e4(r29) +/* 80384F08 00381E68 40 82 00 10 */ bne lbl_80384F18 +/* 80384F0C 00381E6C 80 7D 02 DC */ lwz r3, 0x2dc(r29) +/* 80384F10 00381E70 93 A3 00 00 */ stw r29, 0(r3) +/* 80384F14 00381E74 48 00 00 08 */ b lbl_80384F1C +lbl_80384F18: +/* 80384F18 00381E78 93 A3 02 E0 */ stw r29, 0x2e0(r3) +lbl_80384F1C: +/* 80384F1C 00381E7C 80 7D 02 F0 */ lwz r3, 0x2f0(r29) +/* 80384F20 00381E80 28 03 00 00 */ cmplwi r3, 0 +/* 80384F24 00381E84 41 82 00 3C */ beq lbl_80384F60 +/* 80384F28 00381E88 83 A3 00 08 */ lwz r29, 8(r3) +lbl_80384F2C: +/* 80384F2C 00381E8C 80 1D 02 CC */ lwz r0, 0x2cc(r29) +/* 80384F30 00381E90 2C 00 00 00 */ cmpwi r0, 0 +/* 80384F34 00381E94 41 81 00 2C */ bgt lbl_80384F60 +/* 80384F38 00381E98 7F A3 EB 78 */ mr r3, r29 +/* 80384F3C 00381E9C 4B FF F7 8D */ bl __OSGetEffectivePriority +/* 80384F40 00381EA0 80 1D 02 D0 */ lwz r0, 0x2d0(r29) +/* 80384F44 00381EA4 38 83 00 00 */ addi r4, r3, 0 +/* 80384F48 00381EA8 7C 00 20 00 */ cmpw r0, r4 +/* 80384F4C 00381EAC 41 82 00 14 */ beq lbl_80384F60 +/* 80384F50 00381EB0 7F A3 EB 78 */ mr r3, r29 +/* 80384F54 00381EB4 4B FF F7 B1 */ bl SetEffectivePriority +/* 80384F58 00381EB8 7C 7D 1B 79 */ or. r29, r3, r3 +/* 80384F5C 00381EBC 40 82 FF D0 */ bne lbl_80384F2C +lbl_80384F60: +/* 80384F60 00381EC0 80 0D AD 64 */ lwz r0, lbl_805A9924@sda21(r13) +/* 80384F64 00381EC4 2C 00 00 00 */ cmpwi r0, 0 +/* 80384F68 00381EC8 41 82 00 0C */ beq lbl_80384F74 +/* 80384F6C 00381ECC 38 60 00 00 */ li r3, 0 +/* 80384F70 00381ED0 4B FF F9 55 */ bl SelectThread +lbl_80384F74: +/* 80384F74 00381ED4 7F E3 FB 78 */ mr r3, r31 +/* 80384F78 00381ED8 4B FF C7 11 */ bl OSRestoreInterrupts +/* 80384F7C 00381EDC 7F C3 F3 78 */ mr r3, r30 +/* 80384F80 00381EE0 80 01 00 2C */ lwz r0, 0x2c(r1) +/* 80384F84 00381EE4 83 E1 00 24 */ lwz r31, 0x24(r1) +/* 80384F88 00381EE8 83 C1 00 20 */ lwz r30, 0x20(r1) +/* 80384F8C 00381EEC 83 A1 00 1C */ lwz r29, 0x1c(r1) +/* 80384F90 00381EF0 38 21 00 28 */ addi r1, r1, 0x28 +/* 80384F94 00381EF4 7C 08 03 A6 */ mtlr r0 +/* 80384F98 00381EF8 4E 80 00 20 */ blr + +.global OSSuspendThread +OSSuspendThread: +/* 80384F9C 00381EFC 7C 08 02 A6 */ mflr r0 +/* 80384FA0 00381F00 90 01 00 04 */ stw r0, 4(r1) +/* 80384FA4 00381F04 94 21 FF E0 */ stwu r1, -0x20(r1) +/* 80384FA8 00381F08 93 E1 00 1C */ stw r31, 0x1c(r1) +/* 80384FAC 00381F0C 93 C1 00 18 */ stw r30, 0x18(r1) +/* 80384FB0 00381F10 93 A1 00 14 */ stw r29, 0x14(r1) +/* 80384FB4 00381F14 7C 7D 1B 78 */ mr r29, r3 +/* 80384FB8 00381F18 4B FF C6 A9 */ bl OSDisableInterrupts +/* 80384FBC 00381F1C 80 9D 02 CC */ lwz r4, 0x2cc(r29) +/* 80384FC0 00381F20 3B E3 00 00 */ addi r31, r3, 0 +/* 80384FC4 00381F24 38 04 00 01 */ addi r0, r4, 1 +/* 80384FC8 00381F28 7C 9E 23 79 */ or. r30, r4, r4 +/* 80384FCC 00381F2C 90 1D 02 CC */ stw r0, 0x2cc(r29) +/* 80384FD0 00381F30 40 82 01 14 */ bne lbl_803850E4 +/* 80384FD4 00381F34 A0 1D 02 C8 */ lhz r0, 0x2c8(r29) +/* 80384FD8 00381F38 2C 00 00 03 */ cmpwi r0, 3 +/* 80384FDC 00381F3C 41 82 00 F4 */ beq lbl_803850D0 +/* 80384FE0 00381F40 40 80 00 14 */ bge lbl_80384FF4 +/* 80384FE4 00381F44 2C 00 00 01 */ cmpwi r0, 1 +/* 80384FE8 00381F48 41 82 00 28 */ beq lbl_80385010 +/* 80384FEC 00381F4C 40 80 00 14 */ bge lbl_80385000 +/* 80384FF0 00381F50 48 00 00 E0 */ b lbl_803850D0 +lbl_80384FF4: +/* 80384FF4 00381F54 2C 00 00 05 */ cmpwi r0, 5 +/* 80384FF8 00381F58 40 80 00 D8 */ bge lbl_803850D0 +/* 80384FFC 00381F5C 48 00 00 20 */ b lbl_8038501C +lbl_80385000: +/* 80385000 00381F60 38 00 00 01 */ li r0, 1 +/* 80385004 00381F64 90 0D AD 64 */ stw r0, lbl_805A9924@sda21(r13) +/* 80385008 00381F68 B0 1D 02 C8 */ sth r0, 0x2c8(r29) +/* 8038500C 00381F6C 48 00 00 C4 */ b lbl_803850D0 +lbl_80385010: +/* 80385010 00381F70 7F A3 EB 78 */ mr r3, r29 +/* 80385014 00381F74 4B FF F6 4D */ bl UnsetRun +/* 80385018 00381F78 48 00 00 B8 */ b lbl_803850D0 +lbl_8038501C: +/* 8038501C 00381F7C 80 9D 02 E0 */ lwz r4, 0x2e0(r29) +/* 80385020 00381F80 80 BD 02 E4 */ lwz r5, 0x2e4(r29) +/* 80385024 00381F84 28 04 00 00 */ cmplwi r4, 0 +/* 80385028 00381F88 40 82 00 10 */ bne lbl_80385038 +/* 8038502C 00381F8C 80 7D 02 DC */ lwz r3, 0x2dc(r29) +/* 80385030 00381F90 90 A3 00 04 */ stw r5, 4(r3) +/* 80385034 00381F94 48 00 00 08 */ b lbl_8038503C +lbl_80385038: +/* 80385038 00381F98 90 A4 02 E4 */ stw r5, 0x2e4(r4) +lbl_8038503C: +/* 8038503C 00381F9C 28 05 00 00 */ cmplwi r5, 0 +/* 80385040 00381FA0 40 82 00 10 */ bne lbl_80385050 +/* 80385044 00381FA4 80 7D 02 DC */ lwz r3, 0x2dc(r29) +/* 80385048 00381FA8 90 83 00 00 */ stw r4, 0(r3) +/* 8038504C 00381FAC 48 00 00 08 */ b lbl_80385054 +lbl_80385050: +/* 80385050 00381FB0 90 85 02 E0 */ stw r4, 0x2e0(r5) +lbl_80385054: +/* 80385054 00381FB4 38 00 00 20 */ li r0, 0x20 +/* 80385058 00381FB8 90 1D 02 D0 */ stw r0, 0x2d0(r29) +/* 8038505C 00381FBC 80 9D 02 DC */ lwz r4, 0x2dc(r29) +/* 80385060 00381FC0 80 64 00 04 */ lwz r3, 4(r4) +/* 80385064 00381FC4 28 03 00 00 */ cmplwi r3, 0 +/* 80385068 00381FC8 40 82 00 0C */ bne lbl_80385074 +/* 8038506C 00381FCC 93 A4 00 00 */ stw r29, 0(r4) +/* 80385070 00381FD0 48 00 00 08 */ b lbl_80385078 +lbl_80385074: +/* 80385074 00381FD4 93 A3 02 E0 */ stw r29, 0x2e0(r3) +lbl_80385078: +/* 80385078 00381FD8 90 7D 02 E4 */ stw r3, 0x2e4(r29) +/* 8038507C 00381FDC 38 00 00 00 */ li r0, 0 +/* 80385080 00381FE0 90 1D 02 E0 */ stw r0, 0x2e0(r29) +/* 80385084 00381FE4 80 7D 02 DC */ lwz r3, 0x2dc(r29) +/* 80385088 00381FE8 93 A3 00 04 */ stw r29, 4(r3) +/* 8038508C 00381FEC 80 7D 02 F0 */ lwz r3, 0x2f0(r29) +/* 80385090 00381FF0 28 03 00 00 */ cmplwi r3, 0 +/* 80385094 00381FF4 41 82 00 3C */ beq lbl_803850D0 +/* 80385098 00381FF8 83 A3 00 08 */ lwz r29, 8(r3) +lbl_8038509C: +/* 8038509C 00381FFC 80 1D 02 CC */ lwz r0, 0x2cc(r29) +/* 803850A0 00382000 2C 00 00 00 */ cmpwi r0, 0 +/* 803850A4 00382004 41 81 00 2C */ bgt lbl_803850D0 +/* 803850A8 00382008 7F A3 EB 78 */ mr r3, r29 +/* 803850AC 0038200C 4B FF F6 1D */ bl __OSGetEffectivePriority +/* 803850B0 00382010 80 1D 02 D0 */ lwz r0, 0x2d0(r29) +/* 803850B4 00382014 38 83 00 00 */ addi r4, r3, 0 +/* 803850B8 00382018 7C 00 20 00 */ cmpw r0, r4 +/* 803850BC 0038201C 41 82 00 14 */ beq lbl_803850D0 +/* 803850C0 00382020 7F A3 EB 78 */ mr r3, r29 +/* 803850C4 00382024 4B FF F6 41 */ bl SetEffectivePriority +/* 803850C8 00382028 7C 7D 1B 79 */ or. r29, r3, r3 +/* 803850CC 0038202C 40 82 FF D0 */ bne lbl_8038509C +lbl_803850D0: +/* 803850D0 00382030 80 0D AD 64 */ lwz r0, lbl_805A9924@sda21(r13) +/* 803850D4 00382034 2C 00 00 00 */ cmpwi r0, 0 +/* 803850D8 00382038 41 82 00 0C */ beq lbl_803850E4 +/* 803850DC 0038203C 38 60 00 00 */ li r3, 0 +/* 803850E0 00382040 4B FF F7 E5 */ bl SelectThread +lbl_803850E4: +/* 803850E4 00382044 7F E3 FB 78 */ mr r3, r31 +/* 803850E8 00382048 4B FF C5 A1 */ bl OSRestoreInterrupts +/* 803850EC 0038204C 7F C3 F3 78 */ mr r3, r30 +/* 803850F0 00382050 80 01 00 24 */ lwz r0, 0x24(r1) +/* 803850F4 00382054 83 E1 00 1C */ lwz r31, 0x1c(r1) +/* 803850F8 00382058 83 C1 00 18 */ lwz r30, 0x18(r1) +/* 803850FC 0038205C 83 A1 00 14 */ lwz r29, 0x14(r1) +/* 80385100 00382060 38 21 00 20 */ addi r1, r1, 0x20 +/* 80385104 00382064 7C 08 03 A6 */ mtlr r0 +/* 80385108 00382068 4E 80 00 20 */ blr + +.global OSSleepThread +OSSleepThread: +/* 8038510C 0038206C 7C 08 02 A6 */ mflr r0 +/* 80385110 00382070 90 01 00 04 */ stw r0, 4(r1) +/* 80385114 00382074 94 21 FF E8 */ stwu r1, -0x18(r1) +/* 80385118 00382078 93 E1 00 14 */ stw r31, 0x14(r1) +/* 8038511C 0038207C 93 C1 00 10 */ stw r30, 0x10(r1) +/* 80385120 00382080 7C 7E 1B 78 */ mr r30, r3 +/* 80385124 00382084 4B FF C5 3D */ bl OSDisableInterrupts +/* 80385128 00382088 3C 80 80 00 */ lis r4, 0x800000E4@ha +/* 8038512C 0038208C 80 84 00 E4 */ lwz r4, 0x800000E4@l(r4) +/* 80385130 00382090 38 00 00 04 */ li r0, 4 +/* 80385134 00382094 7C 7F 1B 78 */ mr r31, r3 +/* 80385138 00382098 B0 04 02 C8 */ sth r0, 0x2c8(r4) +/* 8038513C 0038209C 93 C4 02 DC */ stw r30, 0x2dc(r4) +/* 80385140 003820A0 80 BE 00 00 */ lwz r5, 0(r30) +/* 80385144 003820A4 48 00 00 08 */ b lbl_8038514C +lbl_80385148: +/* 80385148 003820A8 80 A5 02 E0 */ lwz r5, 0x2e0(r5) +lbl_8038514C: +/* 8038514C 003820AC 28 05 00 00 */ cmplwi r5, 0 +/* 80385150 003820B0 41 82 00 14 */ beq lbl_80385164 +/* 80385154 003820B4 80 65 02 D0 */ lwz r3, 0x2d0(r5) +/* 80385158 003820B8 80 04 02 D0 */ lwz r0, 0x2d0(r4) +/* 8038515C 003820BC 7C 03 00 00 */ cmpw r3, r0 +/* 80385160 003820C0 40 81 FF E8 */ ble lbl_80385148 +lbl_80385164: +/* 80385164 003820C4 28 05 00 00 */ cmplwi r5, 0 +/* 80385168 003820C8 40 82 00 30 */ bne lbl_80385198 +/* 8038516C 003820CC 80 7E 00 04 */ lwz r3, 4(r30) +/* 80385170 003820D0 28 03 00 00 */ cmplwi r3, 0 +/* 80385174 003820D4 40 82 00 0C */ bne lbl_80385180 +/* 80385178 003820D8 90 9E 00 00 */ stw r4, 0(r30) +/* 8038517C 003820DC 48 00 00 08 */ b lbl_80385184 +lbl_80385180: +/* 80385180 003820E0 90 83 02 E0 */ stw r4, 0x2e0(r3) +lbl_80385184: +/* 80385184 003820E4 90 64 02 E4 */ stw r3, 0x2e4(r4) +/* 80385188 003820E8 38 00 00 00 */ li r0, 0 +/* 8038518C 003820EC 90 04 02 E0 */ stw r0, 0x2e0(r4) +/* 80385190 003820F0 90 9E 00 04 */ stw r4, 4(r30) +/* 80385194 003820F4 48 00 00 28 */ b lbl_803851BC +lbl_80385198: +/* 80385198 003820F8 90 A4 02 E0 */ stw r5, 0x2e0(r4) +/* 8038519C 003820FC 80 65 02 E4 */ lwz r3, 0x2e4(r5) +/* 803851A0 00382100 90 85 02 E4 */ stw r4, 0x2e4(r5) +/* 803851A4 00382104 28 03 00 00 */ cmplwi r3, 0 +/* 803851A8 00382108 90 64 02 E4 */ stw r3, 0x2e4(r4) +/* 803851AC 0038210C 40 82 00 0C */ bne lbl_803851B8 +/* 803851B0 00382110 90 9E 00 00 */ stw r4, 0(r30) +/* 803851B4 00382114 48 00 00 08 */ b lbl_803851BC +lbl_803851B8: +/* 803851B8 00382118 90 83 02 E0 */ stw r4, 0x2e0(r3) +lbl_803851BC: +/* 803851BC 0038211C 38 00 00 01 */ li r0, 1 +/* 803851C0 00382120 90 0D AD 64 */ stw r0, lbl_805A9924@sda21(r13) +/* 803851C4 00382124 80 0D AD 64 */ lwz r0, lbl_805A9924@sda21(r13) +/* 803851C8 00382128 2C 00 00 00 */ cmpwi r0, 0 +/* 803851CC 0038212C 41 82 00 0C */ beq lbl_803851D8 +/* 803851D0 00382130 38 60 00 00 */ li r3, 0 +/* 803851D4 00382134 4B FF F6 F1 */ bl SelectThread +lbl_803851D8: +/* 803851D8 00382138 7F E3 FB 78 */ mr r3, r31 +/* 803851DC 0038213C 4B FF C4 AD */ bl OSRestoreInterrupts +/* 803851E0 00382140 80 01 00 1C */ lwz r0, 0x1c(r1) +/* 803851E4 00382144 83 E1 00 14 */ lwz r31, 0x14(r1) +/* 803851E8 00382148 83 C1 00 10 */ lwz r30, 0x10(r1) +/* 803851EC 0038214C 38 21 00 18 */ addi r1, r1, 0x18 +/* 803851F0 00382150 7C 08 03 A6 */ mtlr r0 +/* 803851F4 00382154 4E 80 00 20 */ blr + +.global OSWakeupThread +OSWakeupThread: +/* 803851F8 00382158 7C 08 02 A6 */ mflr r0 +/* 803851FC 0038215C 90 01 00 04 */ stw r0, 4(r1) +/* 80385200 00382160 94 21 FF E8 */ stwu r1, -0x18(r1) +/* 80385204 00382164 93 E1 00 14 */ stw r31, 0x14(r1) +/* 80385208 00382168 93 C1 00 10 */ stw r30, 0x10(r1) +/* 8038520C 0038216C 7C 7E 1B 78 */ mr r30, r3 +/* 80385210 00382170 4B FF C4 51 */ bl OSDisableInterrupts +/* 80385214 00382174 3C 80 80 54 */ lis r4, lbl_805415F8@ha +/* 80385218 00382178 3B E3 00 00 */ addi r31, r3, 0 +/* 8038521C 0038217C 38 A4 15 F8 */ addi r5, r4, lbl_805415F8@l +/* 80385220 00382180 48 00 00 9C */ b lbl_803852BC +lbl_80385224: +/* 80385224 00382184 80 66 02 E0 */ lwz r3, 0x2e0(r6) +/* 80385228 00382188 28 03 00 00 */ cmplwi r3, 0 +/* 8038522C 0038218C 40 82 00 10 */ bne lbl_8038523C +/* 80385230 00382190 38 00 00 00 */ li r0, 0 +/* 80385234 00382194 90 1E 00 04 */ stw r0, 4(r30) +/* 80385238 00382198 48 00 00 0C */ b lbl_80385244 +lbl_8038523C: +/* 8038523C 0038219C 38 00 00 00 */ li r0, 0 +/* 80385240 003821A0 90 03 02 E4 */ stw r0, 0x2e4(r3) +lbl_80385244: +/* 80385244 003821A4 90 7E 00 00 */ stw r3, 0(r30) +/* 80385248 003821A8 38 00 00 01 */ li r0, 1 +/* 8038524C 003821AC B0 06 02 C8 */ sth r0, 0x2c8(r6) +/* 80385250 003821B0 80 06 02 CC */ lwz r0, 0x2cc(r6) +/* 80385254 003821B4 2C 00 00 00 */ cmpwi r0, 0 +/* 80385258 003821B8 41 81 00 64 */ bgt lbl_803852BC +/* 8038525C 003821BC 80 06 02 D0 */ lwz r0, 0x2d0(r6) +/* 80385260 003821C0 54 00 18 38 */ slwi r0, r0, 3 +/* 80385264 003821C4 7C 05 02 14 */ add r0, r5, r0 +/* 80385268 003821C8 90 06 02 DC */ stw r0, 0x2dc(r6) +/* 8038526C 003821CC 80 86 02 DC */ lwz r4, 0x2dc(r6) +/* 80385270 003821D0 80 64 00 04 */ lwz r3, 4(r4) +/* 80385274 003821D4 28 03 00 00 */ cmplwi r3, 0 +/* 80385278 003821D8 40 82 00 0C */ bne lbl_80385284 +/* 8038527C 003821DC 90 C4 00 00 */ stw r6, 0(r4) +/* 80385280 003821E0 48 00 00 08 */ b lbl_80385288 +lbl_80385284: +/* 80385284 003821E4 90 C3 02 E0 */ stw r6, 0x2e0(r3) +lbl_80385288: +/* 80385288 003821E8 90 66 02 E4 */ stw r3, 0x2e4(r6) +/* 8038528C 003821EC 38 00 00 00 */ li r0, 0 +/* 80385290 003821F0 38 60 00 01 */ li r3, 1 +/* 80385294 003821F4 90 06 02 E0 */ stw r0, 0x2e0(r6) +/* 80385298 003821F8 80 86 02 DC */ lwz r4, 0x2dc(r6) +/* 8038529C 003821FC 90 C4 00 04 */ stw r6, 4(r4) +/* 803852A0 00382200 80 06 02 D0 */ lwz r0, 0x2d0(r6) +/* 803852A4 00382204 80 8D AD 60 */ lwz r4, lbl_805A9920@sda21(r13) +/* 803852A8 00382208 20 00 00 1F */ subfic r0, r0, 0x1f +/* 803852AC 0038220C 7C 60 00 30 */ slw r0, r3, r0 +/* 803852B0 00382210 7C 80 03 78 */ or r0, r4, r0 +/* 803852B4 00382214 90 0D AD 60 */ stw r0, lbl_805A9920@sda21(r13) +/* 803852B8 00382218 90 6D AD 64 */ stw r3, lbl_805A9924@sda21(r13) +lbl_803852BC: +/* 803852BC 0038221C 80 DE 00 00 */ lwz r6, 0(r30) +/* 803852C0 00382220 28 06 00 00 */ cmplwi r6, 0 +/* 803852C4 00382224 40 82 FF 60 */ bne lbl_80385224 +/* 803852C8 00382228 80 0D AD 64 */ lwz r0, lbl_805A9924@sda21(r13) +/* 803852CC 0038222C 2C 00 00 00 */ cmpwi r0, 0 +/* 803852D0 00382230 41 82 00 0C */ beq lbl_803852DC +/* 803852D4 00382234 38 60 00 00 */ li r3, 0 +/* 803852D8 00382238 4B FF F5 ED */ bl SelectThread +lbl_803852DC: +/* 803852DC 0038223C 7F E3 FB 78 */ mr r3, r31 +/* 803852E0 00382240 4B FF C3 A9 */ bl OSRestoreInterrupts +/* 803852E4 00382244 80 01 00 1C */ lwz r0, 0x1c(r1) +/* 803852E8 00382248 83 E1 00 14 */ lwz r31, 0x14(r1) +/* 803852EC 0038224C 83 C1 00 10 */ lwz r30, 0x10(r1) +/* 803852F0 00382250 38 21 00 18 */ addi r1, r1, 0x18 +/* 803852F4 00382254 7C 08 03 A6 */ mtlr r0 +/* 803852F8 00382258 4E 80 00 20 */ blr + +.global OSClearStack +OSClearStack: +/* 803852FC 0038225C 7C 08 02 A6 */ mflr r0 +/* 80385300 00382260 90 01 00 04 */ stw r0, 4(r1) +/* 80385304 00382264 54 60 82 1E */ rlwinm r0, r3, 0x10, 8, 0xf +/* 80385308 00382268 50 60 C0 0E */ rlwimi r0, r3, 0x18, 0, 7 +/* 8038530C 0038226C 94 21 FF E8 */ stwu r1, -0x18(r1) +/* 80385310 00382270 50 60 44 2E */ rlwimi r0, r3, 8, 0x10, 0x17 +/* 80385314 00382274 93 E1 00 14 */ stw r31, 0x14(r1) +/* 80385318 00382278 7C 1F 03 78 */ mr r31, r0 +/* 8038531C 0038227C 50 7F 06 3E */ rlwimi r31, r3, 0, 0x18, 0x1f +/* 80385320 00382280 4B FF A2 BD */ bl OSGetStackPointer +/* 80385324 00382284 3C 80 80 00 */ lis r4, 0x800000E4@ha +/* 80385328 00382288 80 A4 00 E4 */ lwz r5, 0x800000E4@l(r4) +/* 8038532C 0038228C 38 83 00 03 */ addi r4, r3, 3 +/* 80385330 00382290 80 A5 03 08 */ lwz r5, 0x308(r5) +/* 80385334 00382294 38 A5 00 04 */ addi r5, r5, 4 +/* 80385338 00382298 7C 05 18 40 */ cmplw r5, r3 +/* 8038533C 0038229C 7C 85 20 50 */ subf r4, r5, r4 +/* 80385340 003822A0 54 84 F0 BE */ srwi r4, r4, 2 +/* 80385344 003822A4 40 80 00 50 */ bge lbl_80385394 +/* 80385348 003822A8 54 80 E8 FF */ rlwinm. r0, r4, 0x1d, 3, 0x1f +/* 8038534C 003822AC 7C 09 03 A6 */ mtctr r0 +/* 80385350 003822B0 41 82 00 34 */ beq lbl_80385384 +lbl_80385354: +/* 80385354 003822B4 93 E5 00 00 */ stw r31, 0(r5) +/* 80385358 003822B8 93 E5 00 04 */ stw r31, 4(r5) +/* 8038535C 003822BC 93 E5 00 08 */ stw r31, 8(r5) +/* 80385360 003822C0 93 E5 00 0C */ stw r31, 0xc(r5) +/* 80385364 003822C4 93 E5 00 10 */ stw r31, 0x10(r5) +/* 80385368 003822C8 93 E5 00 14 */ stw r31, 0x14(r5) +/* 8038536C 003822CC 93 E5 00 18 */ stw r31, 0x18(r5) +/* 80385370 003822D0 93 E5 00 1C */ stw r31, 0x1c(r5) +/* 80385374 003822D4 38 A5 00 20 */ addi r5, r5, 0x20 +/* 80385378 003822D8 42 00 FF DC */ bdnz lbl_80385354 +/* 8038537C 003822DC 70 84 00 07 */ andi. r4, r4, 7 +/* 80385380 003822E0 41 82 00 14 */ beq lbl_80385394 +lbl_80385384: +/* 80385384 003822E4 7C 89 03 A6 */ mtctr r4 +lbl_80385388: +/* 80385388 003822E8 93 E5 00 00 */ stw r31, 0(r5) +/* 8038538C 003822EC 38 A5 00 04 */ addi r5, r5, 4 +/* 80385390 003822F0 42 00 FF F8 */ bdnz lbl_80385388 +lbl_80385394: +/* 80385394 003822F4 80 01 00 1C */ lwz r0, 0x1c(r1) +/* 80385398 003822F8 83 E1 00 14 */ lwz r31, 0x14(r1) +/* 8038539C 003822FC 38 21 00 18 */ addi r1, r1, 0x18 +/* 803853A0 00382300 7C 08 03 A6 */ mtlr r0 +/* 803853A4 00382304 4E 80 00 20 */ blr diff --git a/asm/Dolphin/OS/OSTime.s b/asm/Dolphin/OS/OSTime.s new file mode 100644 index 00000000..68cf42f8 --- /dev/null +++ b/asm/Dolphin/OS/OSTime.s @@ -0,0 +1,322 @@ +.include "macros.inc" + +.section .text, "ax" + +.global OSGetTime +OSGetTime: +/* 803853A8 00382308 7C 6D 42 E6 */ mftbu r3 +/* 803853AC 0038230C 7C 8C 42 E6 */ mftb r4, 0x10c +/* 803853B0 00382310 7C AD 42 E6 */ mftbu r5 +/* 803853B4 00382314 7C 03 28 00 */ cmpw r3, r5 +/* 803853B8 00382318 40 82 FF F0 */ bne OSGetTime +/* 803853BC 0038231C 4E 80 00 20 */ blr + +.global OSGetTick +OSGetTick: +/* 803853C0 00382320 7C 6C 42 E6 */ mftb r3, 0x10c +/* 803853C4 00382324 4E 80 00 20 */ blr + +.global __OSGetSystemTime +__OSGetSystemTime: +/* 803853C8 00382328 7C 08 02 A6 */ mflr r0 +/* 803853CC 0038232C 90 01 00 04 */ stw r0, 4(r1) +/* 803853D0 00382330 94 21 FF E0 */ stwu r1, -0x20(r1) +/* 803853D4 00382334 93 E1 00 1C */ stw r31, 0x1c(r1) +/* 803853D8 00382338 93 C1 00 18 */ stw r30, 0x18(r1) +/* 803853DC 0038233C 93 A1 00 14 */ stw r29, 0x14(r1) +/* 803853E0 00382340 4B FF C2 81 */ bl OSDisableInterrupts +/* 803853E4 00382344 7C 7F 1B 78 */ mr r31, r3 +/* 803853E8 00382348 4B FF FF C1 */ bl OSGetTime +/* 803853EC 0038234C 3C C0 80 00 */ lis r6, 0x800030DC@ha +/* 803853F0 00382350 80 A6 30 DC */ lwz r5, 0x800030DC@l(r6) +/* 803853F4 00382354 80 06 30 D8 */ lwz r0, 0x30d8(r6) +/* 803853F8 00382358 7F A5 20 14 */ addc r29, r5, r4 +/* 803853FC 0038235C 7F C0 19 14 */ adde r30, r0, r3 +/* 80385400 00382360 7F E3 FB 78 */ mr r3, r31 +/* 80385404 00382364 4B FF C2 85 */ bl OSRestoreInterrupts +/* 80385408 00382368 7F A4 EB 78 */ mr r4, r29 +/* 8038540C 0038236C 7F C3 F3 78 */ mr r3, r30 +/* 80385410 00382370 80 01 00 24 */ lwz r0, 0x24(r1) +/* 80385414 00382374 83 E1 00 1C */ lwz r31, 0x1c(r1) +/* 80385418 00382378 83 C1 00 18 */ lwz r30, 0x18(r1) +/* 8038541C 0038237C 83 A1 00 14 */ lwz r29, 0x14(r1) +/* 80385420 00382380 38 21 00 20 */ addi r1, r1, 0x20 +/* 80385424 00382384 7C 08 03 A6 */ mtlr r0 +/* 80385428 00382388 4E 80 00 20 */ blr + +.global __OSTimeToSystemTime +__OSTimeToSystemTime: +/* 8038542C 0038238C 7C 08 02 A6 */ mflr r0 +/* 80385430 00382390 90 01 00 04 */ stw r0, 4(r1) +/* 80385434 00382394 94 21 FF E0 */ stwu r1, -0x20(r1) +/* 80385438 00382398 93 E1 00 1C */ stw r31, 0x1c(r1) +/* 8038543C 0038239C 93 C1 00 18 */ stw r30, 0x18(r1) +/* 80385440 003823A0 7C 7F 1B 78 */ mr r31, r3 +/* 80385444 003823A4 7C 9E 23 78 */ mr r30, r4 +/* 80385448 003823A8 4B FF C2 19 */ bl OSDisableInterrupts +/* 8038544C 003823AC 3C A0 80 00 */ lis r5, 0x800030DC@ha +/* 80385450 003823B0 80 85 30 DC */ lwz r4, 0x800030DC@l(r5) +/* 80385454 003823B4 80 05 30 D8 */ lwz r0, 0x30d8(r5) +/* 80385458 003823B8 7F C4 F0 14 */ addc r30, r4, r30 +/* 8038545C 003823BC 7F E0 F9 14 */ adde r31, r0, r31 +/* 80385460 003823C0 4B FF C2 29 */ bl OSRestoreInterrupts +/* 80385464 003823C4 7F C4 F3 78 */ mr r4, r30 +/* 80385468 003823C8 7F E3 FB 78 */ mr r3, r31 +/* 8038546C 003823CC 80 01 00 24 */ lwz r0, 0x24(r1) +/* 80385470 003823D0 83 E1 00 1C */ lwz r31, 0x1c(r1) +/* 80385474 003823D4 83 C1 00 18 */ lwz r30, 0x18(r1) +/* 80385478 003823D8 38 21 00 20 */ addi r1, r1, 0x20 +/* 8038547C 003823DC 7C 08 03 A6 */ mtlr r0 +/* 80385480 003823E0 4E 80 00 20 */ blr + +.global GetDates +GetDates: +/* 80385484 003823E4 3C A0 92 49 */ lis r5, 0x92492493@ha +/* 80385488 003823E8 38 05 24 93 */ addi r0, r5, 0x92492493@l +/* 8038548C 003823EC 38 E3 00 06 */ addi r7, r3, 6 +/* 80385490 003823F0 7C C0 38 96 */ mulhw r6, r0, r7 +/* 80385494 003823F4 3C A0 B3 8D */ lis r5, 0xB38CF9B1@ha +/* 80385498 003823F8 38 05 F9 B1 */ addi r0, r5, 0xB38CF9B1@l +/* 8038549C 003823FC 7C 00 18 96 */ mulhw r0, r0, r3 +/* 803854A0 00382400 7C A6 3A 14 */ add r5, r6, r7 +/* 803854A4 00382404 7C A5 16 70 */ srawi r5, r5, 2 +/* 803854A8 00382408 54 A6 0F FE */ srwi r6, r5, 0x1f +/* 803854AC 0038240C 7C A5 32 14 */ add r5, r5, r6 +/* 803854B0 00382410 7C 00 1A 14 */ add r0, r0, r3 +/* 803854B4 00382414 1C C5 00 07 */ mulli r6, r5, 7 +/* 803854B8 00382418 7C 00 46 70 */ srawi r0, r0, 8 +/* 803854BC 0038241C 54 05 0F FE */ srwi r5, r0, 0x1f +/* 803854C0 00382420 7C A0 2A 14 */ add r5, r0, r5 +/* 803854C4 00382424 7C 06 38 50 */ subf r0, r6, r7 +/* 803854C8 00382428 1D 65 01 6D */ mulli r11, r5, 0x16d +/* 803854CC 0038242C 90 04 00 18 */ stw r0, 0x18(r4) +/* 803854D0 00382430 48 00 00 04 */ b lbl_803854D4 +lbl_803854D4: +/* 803854D4 00382434 3C C0 51 EC */ lis r6, 0x51EB851F@ha +/* 803854D8 00382438 39 46 85 1F */ addi r10, r6, 0x51EB851F@l +/* 803854DC 0038243C 48 00 00 04 */ b lbl_803854E0 +lbl_803854E0: +/* 803854E0 00382440 48 00 00 0C */ b lbl_803854EC +lbl_803854E4: +/* 803854E4 00382444 39 6B FE 93 */ addi r11, r11, -365 +/* 803854E8 00382448 38 A5 FF FF */ addi r5, r5, -1 +lbl_803854EC: +/* 803854EC 0038244C 2C 05 00 01 */ cmpwi r5, 1 +/* 803854F0 00382450 40 80 00 0C */ bge lbl_803854FC +/* 803854F4 00382454 38 00 00 00 */ li r0, 0 +/* 803854F8 00382458 48 00 00 38 */ b lbl_80385530 +lbl_803854FC: +/* 803854FC 0038245C 38 05 FF FF */ addi r0, r5, -1 +/* 80385500 00382460 7C 0A 00 96 */ mulhw r0, r10, r0 +/* 80385504 00382464 7C 08 3E 70 */ srawi r8, r0, 7 +/* 80385508 00382468 7C 06 2E 70 */ srawi r6, r0, 5 +/* 8038550C 0038246C 38 05 00 03 */ addi r0, r5, 3 +/* 80385510 00382470 54 C7 0F FE */ srwi r7, r6, 0x1f +/* 80385514 00382474 7C 00 16 70 */ srawi r0, r0, 2 +/* 80385518 00382478 55 09 0F FE */ srwi r9, r8, 0x1f +/* 8038551C 0038247C 7C C6 3A 14 */ add r6, r6, r7 +/* 80385520 00382480 7C 00 01 94 */ addze r0, r0 +/* 80385524 00382484 7C E8 4A 14 */ add r7, r8, r9 +/* 80385528 00382488 7C 06 00 50 */ subf r0, r6, r0 +/* 8038552C 0038248C 7C 07 02 14 */ add r0, r7, r0 +lbl_80385530: +/* 80385530 00382490 7C 0B 02 14 */ add r0, r11, r0 +/* 80385534 00382494 7C 03 00 00 */ cmpw r3, r0 +/* 80385538 00382498 41 80 FF AC */ blt lbl_803854E4 +/* 8038553C 0038249C 7C A6 16 70 */ srawi r6, r5, 2 +/* 80385540 003824A0 90 A4 00 14 */ stw r5, 0x14(r4) +/* 80385544 003824A4 7C C6 01 94 */ addze r6, r6 +/* 80385548 003824A8 54 C6 10 3A */ slwi r6, r6, 2 +/* 8038554C 003824AC 7C C6 28 10 */ subfc r6, r6, r5 +/* 80385550 003824B0 7C 00 18 50 */ subf r0, r0, r3 +/* 80385554 003824B4 2C 06 00 00 */ cmpwi r6, 0 +/* 80385558 003824B8 90 04 00 1C */ stw r0, 0x1c(r4) +/* 8038555C 003824BC 38 E0 00 01 */ li r7, 1 +/* 80385560 003824C0 39 00 00 00 */ li r8, 0 +/* 80385564 003824C4 40 82 00 30 */ bne lbl_80385594 +/* 80385568 003824C8 3C 60 51 EC */ lis r3, 0x51EB851F@ha +/* 8038556C 003824CC 38 63 85 1F */ addi r3, r3, 0x51EB851F@l +/* 80385570 003824D0 7C 63 28 96 */ mulhw r3, r3, r5 +/* 80385574 003824D4 7C 63 2E 70 */ srawi r3, r3, 5 +/* 80385578 003824D8 54 66 0F FE */ srwi r6, r3, 0x1f +/* 8038557C 003824DC 7C 63 32 14 */ add r3, r3, r6 +/* 80385580 003824E0 1C 63 00 64 */ mulli r3, r3, 0x64 +/* 80385584 003824E4 7C 63 28 50 */ subf r3, r3, r5 +/* 80385588 003824E8 2C 03 00 00 */ cmpwi r3, 0 +/* 8038558C 003824EC 41 82 00 08 */ beq lbl_80385594 +/* 80385590 003824F0 7C E8 3B 78 */ mr r8, r7 +lbl_80385594: +/* 80385594 003824F4 2C 08 00 00 */ cmpwi r8, 0 +/* 80385598 003824F8 40 82 00 30 */ bne lbl_803855C8 +/* 8038559C 003824FC 3C 60 51 EC */ lis r3, 0x51EB851F@ha +/* 803855A0 00382500 38 63 85 1F */ addi r3, r3, 0x51EB851F@l +/* 803855A4 00382504 7C 63 28 96 */ mulhw r3, r3, r5 +/* 803855A8 00382508 7C 63 3E 70 */ srawi r3, r3, 7 +/* 803855AC 0038250C 54 66 0F FE */ srwi r6, r3, 0x1f +/* 803855B0 00382510 7C 63 32 14 */ add r3, r3, r6 +/* 803855B4 00382514 1C 63 01 90 */ mulli r3, r3, 0x190 +/* 803855B8 00382518 7C 63 28 50 */ subf r3, r3, r5 +/* 803855BC 0038251C 2C 03 00 00 */ cmpwi r3, 0 +/* 803855C0 00382520 41 82 00 08 */ beq lbl_803855C8 +/* 803855C4 00382524 38 E0 00 00 */ li r7, 0 +lbl_803855C8: +/* 803855C8 00382528 2C 07 00 00 */ cmpwi r7, 0 +/* 803855CC 0038252C 41 82 00 10 */ beq lbl_803855DC +/* 803855D0 00382530 3C 60 80 3F */ lis r3, lbl_803F2320@ha +/* 803855D4 00382534 38 C3 23 20 */ addi r6, r3, lbl_803F2320@l +/* 803855D8 00382538 48 00 00 0C */ b lbl_803855E4 +lbl_803855DC: +/* 803855DC 0038253C 3C 60 80 3F */ lis r3, lbl_803F22F0@ha +/* 803855E0 00382540 38 C3 22 F0 */ addi r6, r3, lbl_803F22F0@l +lbl_803855E4: +/* 803855E4 00382544 38 E0 00 0C */ li r7, 0xc +/* 803855E8 00382548 38 60 00 30 */ li r3, 0x30 +/* 803855EC 0038254C 48 00 00 04 */ b lbl_803855F0 +lbl_803855F0: +/* 803855F0 00382550 48 00 00 04 */ b lbl_803855F4 +lbl_803855F4: +/* 803855F4 00382554 38 63 FF FC */ addi r3, r3, -4 +/* 803855F8 00382558 7C A6 18 2E */ lwzx r5, r6, r3 +/* 803855FC 0038255C 38 E7 FF FF */ addi r7, r7, -1 +/* 80385600 00382560 7C 00 28 00 */ cmpw r0, r5 +/* 80385604 00382564 41 80 FF F0 */ blt lbl_803855F4 +/* 80385608 00382568 90 E4 00 10 */ stw r7, 0x10(r4) +/* 8038560C 0038256C 7C 66 18 2E */ lwzx r3, r6, r3 +/* 80385610 00382570 7C 63 00 50 */ subf r3, r3, r0 +/* 80385614 00382574 38 03 00 01 */ addi r0, r3, 1 +/* 80385618 00382578 90 04 00 0C */ stw r0, 0xc(r4) +/* 8038561C 0038257C 4E 80 00 20 */ blr + +.global OSTicksToCalendarTime +OSTicksToCalendarTime: +/* 80385620 00382580 7C 08 02 A6 */ mflr r0 +/* 80385624 00382584 90 01 00 04 */ stw r0, 4(r1) +/* 80385628 00382588 94 21 FF C8 */ stwu r1, -0x38(r1) +/* 8038562C 0038258C BF 21 00 1C */ stmw r25, 0x1c(r1) +/* 80385630 00382590 7C 7D 1B 78 */ mr r29, r3 +/* 80385634 00382594 7C 9E 23 78 */ mr r30, r4 +/* 80385638 00382598 7C BF 2B 78 */ mr r31, r5 +/* 8038563C 0038259C 3F 60 80 00 */ lis r27, 0x800000F8@ha +/* 80385640 003825A0 80 1B 00 F8 */ lwz r0, 0x800000F8@l(r27) +/* 80385644 003825A4 7F A3 EB 78 */ mr r3, r29 +/* 80385648 003825A8 7F C4 F3 78 */ mr r4, r30 +/* 8038564C 003825AC 54 06 F0 BE */ srwi r6, r0, 2 +/* 80385650 003825B0 38 A0 00 00 */ li r5, 0 +/* 80385654 003825B4 48 00 47 95 */ bl __mod2i +/* 80385658 003825B8 7C 7A 1B 78 */ mr r26, r3 +/* 8038565C 003825BC 38 A0 00 00 */ li r5, 0 +/* 80385660 003825C0 7C 99 23 78 */ mr r25, r4 +/* 80385664 003825C4 6F 44 80 00 */ xoris r4, r26, 0x8000 +/* 80385668 003825C8 6C A3 80 00 */ xoris r3, r5, 0x8000 +/* 8038566C 003825CC 7C 05 C8 10 */ subfc r0, r5, r25 +/* 80385670 003825D0 7C 63 21 10 */ subfe r3, r3, r4 +/* 80385674 003825D4 7C 64 21 10 */ subfe r3, r4, r4 +/* 80385678 003825D8 7C 63 00 D0 */ neg r3, r3 +/* 8038567C 003825DC 2C 03 00 00 */ cmpwi r3, 0 +/* 80385680 003825E0 41 82 00 14 */ beq lbl_80385694 +/* 80385684 003825E4 80 1B 00 F8 */ lwz r0, 0xf8(r27) +/* 80385688 003825E8 54 00 F0 BE */ srwi r0, r0, 2 +/* 8038568C 003825EC 7F 39 00 14 */ addc r25, r25, r0 +/* 80385690 003825F0 7F 5A 29 14 */ adde r26, r26, r5 +lbl_80385694: +/* 80385694 003825F4 38 80 00 08 */ li r4, 8 +/* 80385698 003825F8 7C 7A 21 D6 */ mullw r3, r26, r4 +/* 8038569C 003825FC 7C 19 20 16 */ mulhwu r0, r25, r4 +/* 803856A0 00382600 3F 60 80 00 */ lis r27, 0x800000F8@ha +/* 803856A4 00382604 80 DB 00 F8 */ lwz r6, 0x800000F8@l(r27) +/* 803856A8 00382608 3C A0 43 1C */ lis r5, 0x431BDE83@ha +/* 803856AC 0038260C 38 A5 DE 83 */ addi r5, r5, 0x431BDE83@l +/* 803856B0 00382610 54 C6 F0 BE */ srwi r6, r6, 2 +/* 803856B4 00382614 7C A5 30 16 */ mulhwu r5, r5, r6 +/* 803856B8 00382618 54 A6 8B FE */ srwi r6, r5, 0xf +/* 803856BC 0038261C 3B 80 00 00 */ li r28, 0 +/* 803856C0 00382620 7C 63 02 14 */ add r3, r3, r0 +/* 803856C4 00382624 7C 19 E1 D6 */ mullw r0, r25, r28 +/* 803856C8 00382628 7C 99 21 D6 */ mullw r4, r25, r4 +/* 803856CC 0038262C 7C 63 02 14 */ add r3, r3, r0 +/* 803856D0 00382630 38 A0 00 00 */ li r5, 0 +/* 803856D4 00382634 48 00 44 F9 */ bl __div2i +/* 803856D8 00382638 38 A0 00 00 */ li r5, 0 +/* 803856DC 0038263C 38 C0 03 E8 */ li r6, 0x3e8 +/* 803856E0 00382640 48 00 47 09 */ bl __mod2i +/* 803856E4 00382644 90 9F 00 24 */ stw r4, 0x24(r31) +/* 803856E8 00382648 3C 60 10 62 */ lis r3, 0x10624DD3@ha +/* 803856EC 0038264C 38 A3 4D D3 */ addi r5, r3, 0x10624DD3@l +/* 803856F0 00382650 80 1B 00 F8 */ lwz r0, 0xf8(r27) +/* 803856F4 00382654 7F 43 D3 78 */ mr r3, r26 +/* 803856F8 00382658 7F 24 CB 78 */ mr r4, r25 +/* 803856FC 0038265C 54 00 F0 BE */ srwi r0, r0, 2 +/* 80385700 00382660 7C 05 00 16 */ mulhwu r0, r5, r0 +/* 80385704 00382664 54 06 D1 BE */ srwi r6, r0, 6 +/* 80385708 00382668 38 A0 00 00 */ li r5, 0 +/* 8038570C 0038266C 48 00 44 C1 */ bl __div2i +/* 80385710 00382670 38 A0 00 00 */ li r5, 0 +/* 80385714 00382674 38 C0 03 E8 */ li r6, 0x3e8 +/* 80385718 00382678 48 00 46 D1 */ bl __mod2i +/* 8038571C 0038267C 90 9F 00 20 */ stw r4, 0x20(r31) +/* 80385720 00382680 7F D9 F0 10 */ subfc r30, r25, r30 +/* 80385724 00382684 7F BA E9 10 */ subfe r29, r26, r29 +/* 80385728 00382688 80 1B 00 F8 */ lwz r0, 0xf8(r27) +/* 8038572C 0038268C 3C A0 00 01 */ lis r5, 0x00015180@ha +/* 80385730 00382690 3B 25 51 80 */ addi r25, r5, 0x00015180@l +/* 80385734 00382694 7F A3 EB 78 */ mr r3, r29 +/* 80385738 00382698 54 06 F0 BE */ srwi r6, r0, 2 +/* 8038573C 0038269C 7F C4 F3 78 */ mr r4, r30 +/* 80385740 003826A0 38 A0 00 00 */ li r5, 0 +/* 80385744 003826A4 48 00 44 89 */ bl __div2i +/* 80385748 003826A8 7F 26 CB 78 */ mr r6, r25 +/* 8038574C 003826AC 38 A0 00 00 */ li r5, 0 +/* 80385750 003826B0 48 00 44 7D */ bl __div2i +/* 80385754 003826B4 3C A0 00 0B */ lis r5, 0x000B2575@ha +/* 80385758 003826B8 80 1B 00 F8 */ lwz r0, 0xf8(r27) +/* 8038575C 003826BC 38 A5 25 75 */ addi r5, r5, 0x000B2575@l +/* 80385760 003826C0 7F 44 28 14 */ addc r26, r4, r5 +/* 80385764 003826C4 54 06 F0 BE */ srwi r6, r0, 2 +/* 80385768 003826C8 7C 03 E1 14 */ adde r0, r3, r28 +/* 8038576C 003826CC 7F A3 EB 78 */ mr r3, r29 +/* 80385770 003826D0 7F C4 F3 78 */ mr r4, r30 +/* 80385774 003826D4 38 A0 00 00 */ li r5, 0 +/* 80385778 003826D8 48 00 44 55 */ bl __div2i +/* 8038577C 003826DC 7F 26 CB 78 */ mr r6, r25 +/* 80385780 003826E0 38 A0 00 00 */ li r5, 0 +/* 80385784 003826E4 48 00 46 65 */ bl __mod2i +/* 80385788 003826E8 7C 9B 23 78 */ mr r27, r4 +/* 8038578C 003826EC 2C 1B 00 00 */ cmpwi r27, 0 +/* 80385790 003826F0 40 80 00 10 */ bge lbl_803857A0 +/* 80385794 003826F4 3F 7B 00 01 */ addis r27, r27, 1 +/* 80385798 003826F8 3B 5A FF FF */ addi r26, r26, -1 +/* 8038579C 003826FC 3B 7B 51 80 */ addi r27, r27, 0x5180 +lbl_803857A0: +/* 803857A0 00382700 7F 43 D3 78 */ mr r3, r26 +/* 803857A4 00382704 7F E4 FB 78 */ mr r4, r31 +/* 803857A8 00382708 4B FF FC DD */ bl GetDates +/* 803857AC 0038270C 3C 60 88 89 */ lis r3, 0x88888889@ha +/* 803857B0 00382710 38 A3 88 89 */ addi r5, r3, 0x88888889@l +/* 803857B4 00382714 7C 05 D8 96 */ mulhw r0, r5, r27 +/* 803857B8 00382718 7C 80 DA 14 */ add r4, r0, r27 +/* 803857BC 0038271C 7C 80 2E 70 */ srawi r0, r4, 5 +/* 803857C0 00382720 54 03 0F FE */ srwi r3, r0, 0x1f +/* 803857C4 00382724 7C E0 1A 14 */ add r7, r0, r3 +/* 803857C8 00382728 7C 05 38 96 */ mulhw r0, r5, r7 +/* 803857CC 0038272C 7C 00 3A 14 */ add r0, r0, r7 +/* 803857D0 00382730 7C 05 2E 70 */ srawi r5, r0, 5 +/* 803857D4 00382734 7C 00 2E 70 */ srawi r0, r0, 5 +/* 803857D8 00382738 54 03 0F FE */ srwi r3, r0, 0x1f +/* 803857DC 0038273C 7C 60 1A 14 */ add r3, r0, r3 +/* 803857E0 00382740 7C 80 2E 70 */ srawi r0, r4, 5 +/* 803857E4 00382744 54 A6 0F FE */ srwi r6, r5, 0x1f +/* 803857E8 00382748 1C 83 00 3C */ mulli r4, r3, 0x3c +/* 803857EC 0038274C 54 03 0F FE */ srwi r3, r0, 0x1f +/* 803857F0 00382750 7C A5 32 14 */ add r5, r5, r6 +/* 803857F4 00382754 7C 00 1A 14 */ add r0, r0, r3 +/* 803857F8 00382758 90 BF 00 08 */ stw r5, 8(r31) +/* 803857FC 0038275C 1C 00 00 3C */ mulli r0, r0, 0x3c +/* 80385800 00382760 7C 64 38 50 */ subf r3, r4, r7 +/* 80385804 00382764 90 7F 00 04 */ stw r3, 4(r31) +/* 80385808 00382768 7C 00 D8 50 */ subf r0, r0, r27 +/* 8038580C 0038276C 90 1F 00 00 */ stw r0, 0(r31) +/* 80385810 00382770 BB 21 00 1C */ lmw r25, 0x1c(r1) +/* 80385814 00382774 80 01 00 3C */ lwz r0, 0x3c(r1) +/* 80385818 00382778 38 21 00 38 */ addi r1, r1, 0x38 +/* 8038581C 0038277C 7C 08 03 A6 */ mtlr r0 +/* 80385820 00382780 4E 80 00 20 */ blr diff --git a/asm/Dolphin/PAD/PadClamp.s b/asm/Dolphin/PAD/PadClamp.s new file mode 100644 index 00000000..423189cb --- /dev/null +++ b/asm/Dolphin/PAD/PadClamp.s @@ -0,0 +1,172 @@ +.include "macros.inc" + +.section .text, "ax" # 0x80003640 - 0x803CB1C0 + +.global ClampStick +ClampStick: +/* 803858B8 00382818 88 03 00 00 */ lbz r0, 0(r3) +/* 803858BC 0038281C 89 84 00 00 */ lbz r12, 0(r4) +/* 803858C0 00382820 7C 00 07 75 */ extsb. r0, r0 +/* 803858C4 00382824 7D 8C 07 74 */ extsb r12, r12 +/* 803858C8 00382828 7C 0B 03 78 */ mr r11, r0 +/* 803858CC 0038282C 41 80 00 0C */ blt lbl_803858D8 +/* 803858D0 00382830 38 00 00 01 */ li r0, 1 +/* 803858D4 00382834 48 00 00 0C */ b lbl_803858E0 +lbl_803858D8: +/* 803858D8 00382838 38 00 FF FF */ li r0, -1 +/* 803858DC 0038283C 7D 6B 00 D0 */ neg r11, r11 +lbl_803858E0: +/* 803858E0 00382840 2C 0C 00 00 */ cmpwi r12, 0 +/* 803858E4 00382844 41 80 00 0C */ blt lbl_803858F0 +/* 803858E8 00382848 39 00 00 01 */ li r8, 1 +/* 803858EC 0038284C 48 00 00 0C */ b lbl_803858F8 +lbl_803858F0: +/* 803858F0 00382850 39 00 FF FF */ li r8, -1 +/* 803858F4 00382854 7D 8C 00 D0 */ neg r12, r12 +lbl_803858F8: +/* 803858F8 00382858 7C E7 07 74 */ extsb r7, r7 +/* 803858FC 0038285C 7C 0B 38 00 */ cmpw r11, r7 +/* 80385900 00382860 41 81 00 0C */ bgt lbl_8038590C +/* 80385904 00382864 39 60 00 00 */ li r11, 0 +/* 80385908 00382868 48 00 00 08 */ b lbl_80385910 +lbl_8038590C: +/* 8038590C 0038286C 7D 67 58 50 */ subf r11, r7, r11 +lbl_80385910: +/* 80385910 00382870 7C 0C 38 00 */ cmpw r12, r7 +/* 80385914 00382874 41 81 00 0C */ bgt lbl_80385920 +/* 80385918 00382878 39 80 00 00 */ li r12, 0 +/* 8038591C 0038287C 48 00 00 08 */ b lbl_80385924 +lbl_80385920: +/* 80385920 00382880 7D 87 60 50 */ subf r12, r7, r12 +lbl_80385924: +/* 80385924 00382884 2C 0B 00 00 */ cmpwi r11, 0 +/* 80385928 00382888 40 82 00 1C */ bne lbl_80385944 +/* 8038592C 0038288C 2C 0C 00 00 */ cmpwi r12, 0 +/* 80385930 00382890 40 82 00 14 */ bne lbl_80385944 +/* 80385934 00382894 38 00 00 00 */ li r0, 0 +/* 80385938 00382898 98 04 00 00 */ stb r0, 0(r4) +/* 8038593C 0038289C 98 03 00 00 */ stb r0, 0(r3) +/* 80385940 003828A0 4E 80 00 20 */ blr +lbl_80385944: +/* 80385944 003828A4 7C C6 07 74 */ extsb r6, r6 +/* 80385948 003828A8 7D 26 61 D6 */ mullw r9, r6, r12 +/* 8038594C 003828AC 7C E6 59 D6 */ mullw r7, r6, r11 +/* 80385950 003828B0 7C 09 38 00 */ cmpw r9, r7 +/* 80385954 003828B4 41 81 00 44 */ bgt lbl_80385998 +/* 80385958 003828B8 7C A9 07 74 */ extsb r9, r5 +/* 8038595C 003828BC 7C A6 48 50 */ subf r5, r6, r9 +/* 80385960 003828C0 7C AC 29 D6 */ mullw r5, r12, r5 +/* 80385964 003828C4 7D 26 49 D6 */ mullw r9, r6, r9 +/* 80385968 003828C8 7C E7 2A 14 */ add r7, r7, r5 +/* 8038596C 003828CC 7C 09 38 00 */ cmpw r9, r7 +/* 80385970 003828D0 40 80 00 64 */ bge lbl_803859D4 +/* 80385974 003828D4 7C CB 49 D6 */ mullw r6, r11, r9 +/* 80385978 003828D8 7C AC 49 D6 */ mullw r5, r12, r9 +/* 8038597C 003828DC 7C C6 3B D6 */ divw r6, r6, r7 +/* 80385980 003828E0 7C A5 3B D6 */ divw r5, r5, r7 +/* 80385984 003828E4 7C C6 07 74 */ extsb r6, r6 +/* 80385988 003828E8 7C A5 07 74 */ extsb r5, r5 +/* 8038598C 003828EC 39 66 00 00 */ addi r11, r6, 0 +/* 80385990 003828F0 39 85 00 00 */ addi r12, r5, 0 +/* 80385994 003828F4 48 00 00 40 */ b lbl_803859D4 +lbl_80385998: +/* 80385998 003828F8 7C A7 07 74 */ extsb r7, r5 +/* 8038599C 003828FC 7C A6 38 50 */ subf r5, r6, r7 +/* 803859A0 00382900 7C AB 29 D6 */ mullw r5, r11, r5 +/* 803859A4 00382904 7D 46 39 D6 */ mullw r10, r6, r7 +/* 803859A8 00382908 7C E9 2A 14 */ add r7, r9, r5 +/* 803859AC 0038290C 7C 0A 38 00 */ cmpw r10, r7 +/* 803859B0 00382910 40 80 00 24 */ bge lbl_803859D4 +/* 803859B4 00382914 7C CB 51 D6 */ mullw r6, r11, r10 +/* 803859B8 00382918 7C AC 51 D6 */ mullw r5, r12, r10 +/* 803859BC 0038291C 7C C6 3B D6 */ divw r6, r6, r7 +/* 803859C0 00382920 7C A5 3B D6 */ divw r5, r5, r7 +/* 803859C4 00382924 7C C6 07 74 */ extsb r6, r6 +/* 803859C8 00382928 7C A5 07 74 */ extsb r5, r5 +/* 803859CC 0038292C 39 66 00 00 */ addi r11, r6, 0 +/* 803859D0 00382930 39 85 00 00 */ addi r12, r5, 0 +lbl_803859D4: +/* 803859D4 00382934 7C A0 59 D6 */ mullw r5, r0, r11 +/* 803859D8 00382938 7C 08 61 D6 */ mullw r0, r8, r12 +/* 803859DC 0038293C 98 A3 00 00 */ stb r5, 0(r3) +/* 803859E0 00382940 98 04 00 00 */ stb r0, 0(r4) +/* 803859E4 00382944 4E 80 00 20 */ blr + +.global PADClamp +PADClamp: +/* 803859E8 00382948 7C 08 02 A6 */ mflr r0 +/* 803859EC 0038294C 3C 80 80 3E */ lis r4, lbl_803D8588@ha +/* 803859F0 00382950 90 01 00 04 */ stw r0, 4(r1) +/* 803859F4 00382954 94 21 FF E0 */ stwu r1, -0x20(r1) +/* 803859F8 00382958 93 E1 00 1C */ stw r31, 0x1c(r1) +/* 803859FC 0038295C 93 C1 00 18 */ stw r30, 0x18(r1) +/* 80385A00 00382960 3B C0 00 00 */ li r30, 0 +/* 80385A04 00382964 93 A1 00 14 */ stw r29, 0x14(r1) +/* 80385A08 00382968 3B A3 00 00 */ addi r29, r3, 0 +/* 80385A0C 0038296C 93 81 00 10 */ stw r28, 0x10(r1) +/* 80385A10 00382970 3B 84 85 88 */ addi r28, r4, lbl_803D8588@l +/* 80385A14 00382974 3B FC 00 01 */ addi r31, r28, 1 +lbl_80385A18: +/* 80385A18 00382978 88 1D 00 0A */ lbz r0, 0xa(r29) +/* 80385A1C 0038297C 7C 00 07 75 */ extsb. r0, r0 +/* 80385A20 00382980 40 82 00 AC */ bne lbl_80385ACC +/* 80385A24 00382984 88 BC 00 03 */ lbz r5, 3(r28) +/* 80385A28 00382988 38 7D 00 02 */ addi r3, r29, 2 +/* 80385A2C 0038298C 88 DC 00 04 */ lbz r6, 4(r28) +/* 80385A30 00382990 38 9D 00 03 */ addi r4, r29, 3 +/* 80385A34 00382994 88 FC 00 02 */ lbz r7, 2(r28) +/* 80385A38 00382998 4B FF FE 81 */ bl ClampStick +/* 80385A3C 0038299C 88 BC 00 06 */ lbz r5, 6(r28) +/* 80385A40 003829A0 38 7D 00 04 */ addi r3, r29, 4 +/* 80385A44 003829A4 88 DC 00 07 */ lbz r6, 7(r28) +/* 80385A48 003829A8 38 9D 00 05 */ addi r4, r29, 5 +/* 80385A4C 003829AC 88 FC 00 05 */ lbz r7, 5(r28) +/* 80385A50 003829B0 4B FF FE 69 */ bl ClampStick +/* 80385A54 003829B4 88 9D 00 06 */ lbz r4, 6(r29) +/* 80385A58 003829B8 88 1C 00 00 */ lbz r0, 0(r28) +/* 80385A5C 003829BC 88 7F 00 00 */ lbz r3, 0(r31) +/* 80385A60 003829C0 7C 04 00 40 */ cmplw r4, r0 +/* 80385A64 003829C4 41 81 00 10 */ bgt lbl_80385A74 +/* 80385A68 003829C8 38 00 00 00 */ li r0, 0 +/* 80385A6C 003829CC 98 1D 00 06 */ stb r0, 6(r29) +/* 80385A70 003829D0 48 00 00 20 */ b lbl_80385A90 +lbl_80385A74: +/* 80385A74 003829D4 7C 03 20 40 */ cmplw r3, r4 +/* 80385A78 003829D8 40 80 00 08 */ bge lbl_80385A80 +/* 80385A7C 003829DC 98 7D 00 06 */ stb r3, 6(r29) +lbl_80385A80: +/* 80385A80 003829E0 88 7C 00 00 */ lbz r3, 0(r28) +/* 80385A84 003829E4 88 1D 00 06 */ lbz r0, 6(r29) +/* 80385A88 003829E8 7C 03 00 50 */ subf r0, r3, r0 +/* 80385A8C 003829EC 98 1D 00 06 */ stb r0, 6(r29) +lbl_80385A90: +/* 80385A90 003829F0 88 9D 00 07 */ lbz r4, 7(r29) +/* 80385A94 003829F4 88 1C 00 00 */ lbz r0, 0(r28) +/* 80385A98 003829F8 88 7F 00 00 */ lbz r3, 0(r31) +/* 80385A9C 003829FC 7C 04 00 40 */ cmplw r4, r0 +/* 80385AA0 00382A00 41 81 00 10 */ bgt lbl_80385AB0 +/* 80385AA4 00382A04 38 00 00 00 */ li r0, 0 +/* 80385AA8 00382A08 98 1D 00 07 */ stb r0, 7(r29) +/* 80385AAC 00382A0C 48 00 00 20 */ b lbl_80385ACC +lbl_80385AB0: +/* 80385AB0 00382A10 7C 03 20 40 */ cmplw r3, r4 +/* 80385AB4 00382A14 40 80 00 08 */ bge lbl_80385ABC +/* 80385AB8 00382A18 98 7D 00 07 */ stb r3, 7(r29) +lbl_80385ABC: +/* 80385ABC 00382A1C 88 7C 00 00 */ lbz r3, 0(r28) +/* 80385AC0 00382A20 88 1D 00 07 */ lbz r0, 7(r29) +/* 80385AC4 00382A24 7C 03 00 50 */ subf r0, r3, r0 +/* 80385AC8 00382A28 98 1D 00 07 */ stb r0, 7(r29) +lbl_80385ACC: +/* 80385ACC 00382A2C 3B DE 00 01 */ addi r30, r30, 1 +/* 80385AD0 00382A30 2C 1E 00 04 */ cmpwi r30, 4 +/* 80385AD4 00382A34 3B BD 00 0C */ addi r29, r29, 0xc +/* 80385AD8 00382A38 41 80 FF 40 */ blt lbl_80385A18 +/* 80385ADC 00382A3C 80 01 00 24 */ lwz r0, 0x24(r1) +/* 80385AE0 00382A40 83 E1 00 1C */ lwz r31, 0x1c(r1) +/* 80385AE4 00382A44 83 C1 00 18 */ lwz r30, 0x18(r1) +/* 80385AE8 00382A48 83 A1 00 14 */ lwz r29, 0x14(r1) +/* 80385AEC 00382A4C 83 81 00 10 */ lwz r28, 0x10(r1) +/* 80385AF0 00382A50 38 21 00 20 */ addi r1, r1, 0x20 +/* 80385AF4 00382A54 7C 08 03 A6 */ mtlr r0 +/* 80385AF8 00382A58 4E 80 00 20 */ blr diff --git a/asm/Dolphin/PAD/pad.s b/asm/Dolphin/PAD/pad.s new file mode 100644 index 00000000..bc1f2b33 --- /dev/null +++ b/asm/Dolphin/PAD/pad.s @@ -0,0 +1,1942 @@ +.include "macros.inc" + +.section .text, "ax" # 0x80003640 - 0x803CB1C0 + +.global UpdateOrigin +UpdateOrigin: +/* 80385AFC 00382A5C 7C 08 02 A6 */ mflr r0 +/* 80385B00 00382A60 3C A0 80 54 */ lis r5, lbl_80542000@ha +/* 80385B04 00382A64 90 01 00 04 */ stw r0, 4(r1) +/* 80385B08 00382A68 1C C3 00 0C */ mulli r6, r3, 0xc +/* 80385B0C 00382A6C 94 21 FF E8 */ stwu r1, -0x18(r1) +/* 80385B10 00382A70 38 A5 20 00 */ addi r5, r5, lbl_80542000@l +/* 80385B14 00382A74 93 E1 00 14 */ stw r31, 0x14(r1) +/* 80385B18 00382A78 7F E5 32 14 */ add r31, r5, r6 +/* 80385B1C 00382A7C 80 0D 9F A4 */ lwz r0, lbl_805A8B64@sda21(r13) +/* 80385B20 00382A80 54 04 05 6E */ rlwinm r4, r0, 0, 0x15, 0x17 +/* 80385B24 00382A84 2C 04 04 00 */ cmpwi r4, 0x400 +/* 80385B28 00382A88 3C 00 80 00 */ lis r0, 0x8000 +/* 80385B2C 00382A8C 7C 00 1C 30 */ srw r0, r0, r3 +/* 80385B30 00382A90 41 82 00 F4 */ beq lbl_80385C24 +/* 80385B34 00382A94 40 80 00 34 */ bge lbl_80385B68 +/* 80385B38 00382A98 2C 04 02 00 */ cmpwi r4, 0x200 +/* 80385B3C 00382A9C 41 82 00 B8 */ beq lbl_80385BF4 +/* 80385B40 00382AA0 40 80 00 1C */ bge lbl_80385B5C +/* 80385B44 00382AA4 2C 04 01 00 */ cmpwi r4, 0x100 +/* 80385B48 00382AA8 41 82 00 78 */ beq lbl_80385BC0 +/* 80385B4C 00382AAC 40 80 00 D8 */ bge lbl_80385C24 +/* 80385B50 00382AB0 2C 04 00 00 */ cmpwi r4, 0 +/* 80385B54 00382AB4 41 82 00 38 */ beq lbl_80385B8C +/* 80385B58 00382AB8 48 00 00 CC */ b lbl_80385C24 +lbl_80385B5C: +/* 80385B5C 00382ABC 2C 04 03 00 */ cmpwi r4, 0x300 +/* 80385B60 00382AC0 41 82 00 C4 */ beq lbl_80385C24 +/* 80385B64 00382AC4 48 00 00 C0 */ b lbl_80385C24 +lbl_80385B68: +/* 80385B68 00382AC8 2C 04 06 00 */ cmpwi r4, 0x600 +/* 80385B6C 00382ACC 41 82 00 20 */ beq lbl_80385B8C +/* 80385B70 00382AD0 40 80 00 10 */ bge lbl_80385B80 +/* 80385B74 00382AD4 2C 04 05 00 */ cmpwi r4, 0x500 +/* 80385B78 00382AD8 41 82 00 14 */ beq lbl_80385B8C +/* 80385B7C 00382ADC 48 00 00 A8 */ b lbl_80385C24 +lbl_80385B80: +/* 80385B80 00382AE0 2C 04 07 00 */ cmpwi r4, 0x700 +/* 80385B84 00382AE4 41 82 00 08 */ beq lbl_80385B8C +/* 80385B88 00382AE8 48 00 00 9C */ b lbl_80385C24 +lbl_80385B8C: +/* 80385B8C 00382AEC 88 9F 00 06 */ lbz r4, 6(r31) +/* 80385B90 00382AF0 54 84 00 36 */ rlwinm r4, r4, 0, 0, 0x1b +/* 80385B94 00382AF4 98 9F 00 06 */ stb r4, 6(r31) +/* 80385B98 00382AF8 88 9F 00 07 */ lbz r4, 7(r31) +/* 80385B9C 00382AFC 54 84 00 36 */ rlwinm r4, r4, 0, 0, 0x1b +/* 80385BA0 00382B00 98 9F 00 07 */ stb r4, 7(r31) +/* 80385BA4 00382B04 88 9F 00 08 */ lbz r4, 8(r31) +/* 80385BA8 00382B08 54 84 00 36 */ rlwinm r4, r4, 0, 0, 0x1b +/* 80385BAC 00382B0C 98 9F 00 08 */ stb r4, 8(r31) +/* 80385BB0 00382B10 88 9F 00 09 */ lbz r4, 9(r31) +/* 80385BB4 00382B14 54 84 00 36 */ rlwinm r4, r4, 0, 0, 0x1b +/* 80385BB8 00382B18 98 9F 00 09 */ stb r4, 9(r31) +/* 80385BBC 00382B1C 48 00 00 68 */ b lbl_80385C24 +lbl_80385BC0: +/* 80385BC0 00382B20 88 9F 00 04 */ lbz r4, 4(r31) +/* 80385BC4 00382B24 54 84 00 36 */ rlwinm r4, r4, 0, 0, 0x1b +/* 80385BC8 00382B28 98 9F 00 04 */ stb r4, 4(r31) +/* 80385BCC 00382B2C 88 9F 00 05 */ lbz r4, 5(r31) +/* 80385BD0 00382B30 54 84 00 36 */ rlwinm r4, r4, 0, 0, 0x1b +/* 80385BD4 00382B34 98 9F 00 05 */ stb r4, 5(r31) +/* 80385BD8 00382B38 88 9F 00 08 */ lbz r4, 8(r31) +/* 80385BDC 00382B3C 54 84 00 36 */ rlwinm r4, r4, 0, 0, 0x1b +/* 80385BE0 00382B40 98 9F 00 08 */ stb r4, 8(r31) +/* 80385BE4 00382B44 88 9F 00 09 */ lbz r4, 9(r31) +/* 80385BE8 00382B48 54 84 00 36 */ rlwinm r4, r4, 0, 0, 0x1b +/* 80385BEC 00382B4C 98 9F 00 09 */ stb r4, 9(r31) +/* 80385BF0 00382B50 48 00 00 34 */ b lbl_80385C24 +lbl_80385BF4: +/* 80385BF4 00382B54 88 9F 00 04 */ lbz r4, 4(r31) +/* 80385BF8 00382B58 54 84 00 36 */ rlwinm r4, r4, 0, 0, 0x1b +/* 80385BFC 00382B5C 98 9F 00 04 */ stb r4, 4(r31) +/* 80385C00 00382B60 88 9F 00 05 */ lbz r4, 5(r31) +/* 80385C04 00382B64 54 84 00 36 */ rlwinm r4, r4, 0, 0, 0x1b +/* 80385C08 00382B68 98 9F 00 05 */ stb r4, 5(r31) +/* 80385C0C 00382B6C 88 9F 00 06 */ lbz r4, 6(r31) +/* 80385C10 00382B70 54 84 00 36 */ rlwinm r4, r4, 0, 0, 0x1b +/* 80385C14 00382B74 98 9F 00 06 */ stb r4, 6(r31) +/* 80385C18 00382B78 88 9F 00 07 */ lbz r4, 7(r31) +/* 80385C1C 00382B7C 54 84 00 36 */ rlwinm r4, r4, 0, 0, 0x1b +/* 80385C20 00382B80 98 9F 00 07 */ stb r4, 7(r31) +lbl_80385C24: +/* 80385C24 00382B84 88 9F 00 02 */ lbz r4, 2(r31) +/* 80385C28 00382B88 38 84 FF 80 */ addi r4, r4, -128 +/* 80385C2C 00382B8C 98 9F 00 02 */ stb r4, 2(r31) +/* 80385C30 00382B90 88 9F 00 03 */ lbz r4, 3(r31) +/* 80385C34 00382B94 38 84 FF 80 */ addi r4, r4, -128 +/* 80385C38 00382B98 98 9F 00 03 */ stb r4, 3(r31) +/* 80385C3C 00382B9C 88 9F 00 04 */ lbz r4, 4(r31) +/* 80385C40 00382BA0 38 84 FF 80 */ addi r4, r4, -128 +/* 80385C44 00382BA4 98 9F 00 04 */ stb r4, 4(r31) +/* 80385C48 00382BA8 88 9F 00 05 */ lbz r4, 5(r31) +/* 80385C4C 00382BAC 38 84 FF 80 */ addi r4, r4, -128 +/* 80385C50 00382BB0 98 9F 00 05 */ stb r4, 5(r31) +/* 80385C54 00382BB4 80 8D 9F A0 */ lwz r4, lbl_805A8B60@sda21(r13) +/* 80385C58 00382BB8 7C 80 00 39 */ and. r0, r4, r0 +/* 80385C5C 00382BBC 41 82 00 30 */ beq lbl_80385C8C +/* 80385C60 00382BC0 88 1F 00 02 */ lbz r0, 2(r31) +/* 80385C64 00382BC4 7C 00 07 74 */ extsb r0, r0 +/* 80385C68 00382BC8 2C 00 00 40 */ cmpwi r0, 0x40 +/* 80385C6C 00382BCC 40 81 00 20 */ ble lbl_80385C8C +/* 80385C70 00382BD0 48 03 9E 2D */ bl SIGetType +/* 80385C74 00382BD4 54 63 00 1E */ rlwinm r3, r3, 0, 0, 0xf +/* 80385C78 00382BD8 3C 03 F7 00 */ addis r0, r3, 0xf700 +/* 80385C7C 00382BDC 28 00 00 00 */ cmplwi r0, 0 +/* 80385C80 00382BE0 40 82 00 0C */ bne lbl_80385C8C +/* 80385C84 00382BE4 38 00 00 00 */ li r0, 0 +/* 80385C88 00382BE8 98 1F 00 02 */ stb r0, 2(r31) +lbl_80385C8C: +/* 80385C8C 00382BEC 80 01 00 1C */ lwz r0, 0x1c(r1) +/* 80385C90 00382BF0 83 E1 00 14 */ lwz r31, 0x14(r1) +/* 80385C94 00382BF4 38 21 00 18 */ addi r1, r1, 0x18 +/* 80385C98 00382BF8 7C 08 03 A6 */ mtlr r0 +/* 80385C9C 00382BFC 4E 80 00 20 */ blr + +.global PADOriginCallback +PADOriginCallback: +/* 80385CA0 00382C00 7C 08 02 A6 */ mflr r0 +/* 80385CA4 00382C04 90 01 00 04 */ stw r0, 4(r1) +/* 80385CA8 00382C08 54 80 07 3F */ clrlwi. r0, r4, 0x1c +/* 80385CAC 00382C0C 94 21 FF D0 */ stwu r1, -0x30(r1) +/* 80385CB0 00382C10 93 E1 00 2C */ stw r31, 0x2c(r1) +/* 80385CB4 00382C14 40 82 00 48 */ bne lbl_80385CFC +/* 80385CB8 00382C18 80 6D 9F 9C */ lwz r3, lbl_805A8B5C@sda21(r13) +/* 80385CBC 00382C1C 4B FF FE 41 */ bl UpdateOrigin +/* 80385CC0 00382C20 83 ED 9F 9C */ lwz r31, lbl_805A8B5C@sda21(r13) +/* 80385CC4 00382C24 3C 00 80 00 */ lis r0, 0x8000 +/* 80385CC8 00382C28 80 6D AD 74 */ lwz r3, lbl_805A9934@sda21(r13) +/* 80385CCC 00382C2C 38 81 00 1C */ addi r4, r1, 0x1c +/* 80385CD0 00382C30 7C 00 FC 30 */ srw r0, r0, r31 +/* 80385CD4 00382C34 7C 60 03 78 */ or r0, r3, r0 +/* 80385CD8 00382C38 90 0D AD 74 */ stw r0, lbl_805A9934@sda21(r13) +/* 80385CDC 00382C3C 7F E3 FB 78 */ mr r3, r31 +/* 80385CE0 00382C40 48 03 98 69 */ bl SIGetResponse +/* 80385CE4 00382C44 80 0D 9F A4 */ lwz r0, lbl_805A8B64@sda21(r13) +/* 80385CE8 00382C48 38 7F 00 00 */ addi r3, r31, 0 +/* 80385CEC 00382C4C 64 04 00 40 */ oris r4, r0, 0x40 +/* 80385CF0 00382C50 48 03 95 ED */ bl SISetCommand +/* 80385CF4 00382C54 80 6D AD 74 */ lwz r3, lbl_805A9934@sda21(r13) +/* 80385CF8 00382C58 48 03 96 75 */ bl SIEnablePolling +lbl_80385CFC: +/* 80385CFC 00382C5C 80 AD AD 78 */ lwz r5, lbl_805A9938@sda21(r13) +/* 80385D00 00382C60 7C A0 00 34 */ cntlzw r0, r5 +/* 80385D04 00382C64 90 0D 9F 9C */ stw r0, lbl_805A8B5C@sda21(r13) +/* 80385D08 00382C68 80 8D 9F 9C */ lwz r4, lbl_805A8B5C@sda21(r13) +/* 80385D0C 00382C6C 2C 04 00 20 */ cmpwi r4, 0x20 +/* 80385D10 00382C70 41 82 00 40 */ beq lbl_80385D50 +/* 80385D14 00382C74 3C 00 80 00 */ lis r0, 0x8000 +/* 80385D18 00382C78 7C 00 24 30 */ srw r0, r0, r4 +/* 80385D1C 00382C7C 7C A0 00 78 */ andc r0, r5, r0 +/* 80385D20 00382C80 1C 84 00 0C */ mulli r4, r4, 0xc +/* 80385D24 00382C84 90 0D AD 78 */ stw r0, lbl_805A9938@sda21(r13) +/* 80385D28 00382C88 3C 60 80 54 */ lis r3, lbl_80542000@ha +/* 80385D2C 00382C8C 38 03 20 00 */ addi r0, r3, lbl_80542000@l +/* 80385D30 00382C90 7C 60 22 14 */ add r3, r0, r4 +/* 80385D34 00382C94 38 80 00 00 */ li r4, 0 +/* 80385D38 00382C98 38 A0 00 0C */ li r5, 0xc +/* 80385D3C 00382C9C 4B C7 D6 6D */ bl memset +/* 80385D40 00382CA0 3C 80 80 38 */ lis r4, PADTypeAndStatusCallback@ha +/* 80385D44 00382CA4 80 6D 9F 9C */ lwz r3, lbl_805A8B5C@sda21(r13) +/* 80385D48 00382CA8 38 84 5E FC */ addi r4, r4, PADTypeAndStatusCallback@l +/* 80385D4C 00382CAC 48 03 9F 15 */ bl SIGetTypeAsync +lbl_80385D50: +/* 80385D50 00382CB0 80 01 00 34 */ lwz r0, 0x34(r1) +/* 80385D54 00382CB4 83 E1 00 2C */ lwz r31, 0x2c(r1) +/* 80385D58 00382CB8 38 21 00 30 */ addi r1, r1, 0x30 +/* 80385D5C 00382CBC 7C 08 03 A6 */ mtlr r0 +/* 80385D60 00382CC0 4E 80 00 20 */ blr + +.global sub_80385d64 +sub_80385d64: +/* 80385D64 00382CC4 7C 08 02 A6 */ mflr r0 +/* 80385D68 00382CC8 90 01 00 04 */ stw r0, 4(r1) +/* 80385D6C 00382CCC 3C 00 80 00 */ lis r0, 0x8000 +/* 80385D70 00382CD0 94 21 FF D8 */ stwu r1, -0x28(r1) +/* 80385D74 00382CD4 93 E1 00 24 */ stw r31, 0x24(r1) +/* 80385D78 00382CD8 3B E4 00 00 */ addi r31, r4, 0 +/* 80385D7C 00382CDC 93 C1 00 20 */ stw r30, 0x20(r1) +/* 80385D80 00382CE0 93 A1 00 1C */ stw r29, 0x1c(r1) +/* 80385D84 00382CE4 7C 7D 1B 78 */ mr r29, r3 +/* 80385D88 00382CE8 7C 1E EC 30 */ srw r30, r0, r29 +/* 80385D8C 00382CEC 80 6D AD 74 */ lwz r3, lbl_805A9934@sda21(r13) +/* 80385D90 00382CF0 7C 60 F0 39 */ and. r0, r3, r30 +/* 80385D94 00382CF4 41 82 00 74 */ beq lbl_80385E08 +/* 80385D98 00382CF8 57 E0 07 3F */ clrlwi. r0, r31, 0x1c +/* 80385D9C 00382CFC 40 82 00 0C */ bne lbl_80385DA8 +/* 80385DA0 00382D00 7F A3 EB 78 */ mr r3, r29 +/* 80385DA4 00382D04 4B FF FD 59 */ bl UpdateOrigin +lbl_80385DA8: +/* 80385DA8 00382D08 57 E0 07 39 */ rlwinm. r0, r31, 0, 0x1c, 0x1c +/* 80385DAC 00382D0C 41 82 00 5C */ beq lbl_80385E08 +/* 80385DB0 00382D10 4B FF B8 B1 */ bl OSDisableInterrupts +/* 80385DB4 00382D14 3B E3 00 00 */ addi r31, r3, 0 +/* 80385DB8 00382D18 38 7E 00 00 */ addi r3, r30, 0 +/* 80385DBC 00382D1C 48 03 96 4D */ bl SIDisablePolling +/* 80385DC0 00382D20 80 CD AD 74 */ lwz r6, lbl_805A9934@sda21(r13) +/* 80385DC4 00382D24 7F C8 F0 F8 */ nor r8, r30, r30 +/* 80385DC8 00382D28 80 AD AD 80 */ lwz r5, lbl_805A9940@sda21(r13) +/* 80385DCC 00382D2C 7F A3 EB 78 */ mr r3, r29 +/* 80385DD0 00382D30 80 8D AD 84 */ lwz r4, lbl_805A9944@sda21(r13) +/* 80385DD4 00382D34 80 0D AD 88 */ lwz r0, lbl_805A9948@sda21(r13) +/* 80385DD8 00382D38 7C C7 40 38 */ and r7, r6, r8 +/* 80385DDC 00382D3C 7C A6 40 38 */ and r6, r5, r8 +/* 80385DE0 00382D40 90 ED AD 74 */ stw r7, lbl_805A9934@sda21(r13) +/* 80385DE4 00382D44 7C 85 40 38 */ and r5, r4, r8 +/* 80385DE8 00382D48 7C 00 40 38 */ and r0, r0, r8 +/* 80385DEC 00382D4C 90 CD AD 80 */ stw r6, lbl_805A9940@sda21(r13) +/* 80385DF0 00382D50 38 80 00 00 */ li r4, 0 +/* 80385DF4 00382D54 90 AD AD 84 */ stw r5, lbl_805A9944@sda21(r13) +/* 80385DF8 00382D58 90 0D AD 88 */ stw r0, lbl_805A9948@sda21(r13) +/* 80385DFC 00382D5C 4B FF E5 3D */ bl OSSetWirelessID +/* 80385E00 00382D60 7F E3 FB 78 */ mr r3, r31 +/* 80385E04 00382D64 4B FF B8 85 */ bl OSRestoreInterrupts +lbl_80385E08: +/* 80385E08 00382D68 80 01 00 2C */ lwz r0, 0x2c(r1) +/* 80385E0C 00382D6C 83 E1 00 24 */ lwz r31, 0x24(r1) +/* 80385E10 00382D70 83 C1 00 20 */ lwz r30, 0x20(r1) +/* 80385E14 00382D74 83 A1 00 1C */ lwz r29, 0x1c(r1) +/* 80385E18 00382D78 38 21 00 28 */ addi r1, r1, 0x28 +/* 80385E1C 00382D7C 7C 08 03 A6 */ mtlr r0 +/* 80385E20 00382D80 4E 80 00 20 */ blr + +.global PADProbeCallback +PADProbeCallback: +/* 80385E24 00382D84 7C 08 02 A6 */ mflr r0 +/* 80385E28 00382D88 90 01 00 04 */ stw r0, 4(r1) +/* 80385E2C 00382D8C 54 80 07 3F */ clrlwi. r0, r4, 0x1c +/* 80385E30 00382D90 94 21 FF D0 */ stwu r1, -0x30(r1) +/* 80385E34 00382D94 93 E1 00 2C */ stw r31, 0x2c(r1) +/* 80385E38 00382D98 93 C1 00 28 */ stw r30, 0x28(r1) +/* 80385E3C 00382D9C 40 82 00 54 */ bne lbl_80385E90 +/* 80385E40 00382DA0 83 CD 9F 9C */ lwz r30, lbl_805A8B5C@sda21(r13) +/* 80385E44 00382DA4 3F E0 80 00 */ lis r31, 0x8000 +/* 80385E48 00382DA8 80 6D AD 74 */ lwz r3, lbl_805A9934@sda21(r13) +/* 80385E4C 00382DAC 38 81 00 1C */ addi r4, r1, 0x1c +/* 80385E50 00382DB0 7F E0 F4 30 */ srw r0, r31, r30 +/* 80385E54 00382DB4 7C 60 03 78 */ or r0, r3, r0 +/* 80385E58 00382DB8 90 0D AD 74 */ stw r0, lbl_805A9934@sda21(r13) +/* 80385E5C 00382DBC 7F C3 F3 78 */ mr r3, r30 +/* 80385E60 00382DC0 48 03 96 E9 */ bl SIGetResponse +/* 80385E64 00382DC4 80 0D 9F A4 */ lwz r0, lbl_805A8B64@sda21(r13) +/* 80385E68 00382DC8 38 7E 00 00 */ addi r3, r30, 0 +/* 80385E6C 00382DCC 64 04 00 40 */ oris r4, r0, 0x40 +/* 80385E70 00382DD0 48 03 94 6D */ bl SISetCommand +/* 80385E74 00382DD4 80 6D AD 74 */ lwz r3, lbl_805A9934@sda21(r13) +/* 80385E78 00382DD8 48 03 94 F5 */ bl SIEnablePolling +/* 80385E7C 00382DDC 80 0D 9F 9C */ lwz r0, lbl_805A8B5C@sda21(r13) +/* 80385E80 00382DE0 80 6D AD 80 */ lwz r3, lbl_805A9940@sda21(r13) +/* 80385E84 00382DE4 7F E0 04 30 */ srw r0, r31, r0 +/* 80385E88 00382DE8 7C 60 03 78 */ or r0, r3, r0 +/* 80385E8C 00382DEC 90 0D AD 80 */ stw r0, lbl_805A9940@sda21(r13) +lbl_80385E90: +/* 80385E90 00382DF0 80 AD AD 78 */ lwz r5, lbl_805A9938@sda21(r13) +/* 80385E94 00382DF4 7C A0 00 34 */ cntlzw r0, r5 +/* 80385E98 00382DF8 90 0D 9F 9C */ stw r0, lbl_805A8B5C@sda21(r13) +/* 80385E9C 00382DFC 80 8D 9F 9C */ lwz r4, lbl_805A8B5C@sda21(r13) +/* 80385EA0 00382E00 2C 04 00 20 */ cmpwi r4, 0x20 +/* 80385EA4 00382E04 41 82 00 40 */ beq lbl_80385EE4 +/* 80385EA8 00382E08 3C 00 80 00 */ lis r0, 0x8000 +/* 80385EAC 00382E0C 7C 00 24 30 */ srw r0, r0, r4 +/* 80385EB0 00382E10 7C A0 00 78 */ andc r0, r5, r0 +/* 80385EB4 00382E14 1C 84 00 0C */ mulli r4, r4, 0xc +/* 80385EB8 00382E18 90 0D AD 78 */ stw r0, lbl_805A9938@sda21(r13) +/* 80385EBC 00382E1C 3C 60 80 54 */ lis r3, lbl_80542000@ha +/* 80385EC0 00382E20 38 03 20 00 */ addi r0, r3, lbl_80542000@l +/* 80385EC4 00382E24 7C 60 22 14 */ add r3, r0, r4 +/* 80385EC8 00382E28 38 80 00 00 */ li r4, 0 +/* 80385ECC 00382E2C 38 A0 00 0C */ li r5, 0xc +/* 80385ED0 00382E30 4B C7 D4 D9 */ bl memset +/* 80385ED4 00382E34 3C 80 80 38 */ lis r4, PADTypeAndStatusCallback@ha +/* 80385ED8 00382E38 80 6D 9F 9C */ lwz r3, lbl_805A8B5C@sda21(r13) +/* 80385EDC 00382E3C 38 84 5E FC */ addi r4, r4, PADTypeAndStatusCallback@l +/* 80385EE0 00382E40 48 03 9D 81 */ bl SIGetTypeAsync +lbl_80385EE4: +/* 80385EE4 00382E44 80 01 00 34 */ lwz r0, 0x34(r1) +/* 80385EE8 00382E48 83 E1 00 2C */ lwz r31, 0x2c(r1) +/* 80385EEC 00382E4C 83 C1 00 28 */ lwz r30, 0x28(r1) +/* 80385EF0 00382E50 38 21 00 30 */ addi r1, r1, 0x30 +/* 80385EF4 00382E54 7C 08 03 A6 */ mtlr r0 +/* 80385EF8 00382E58 4E 80 00 20 */ blr + +.global PADTypeAndStatusCallback +PADTypeAndStatusCallback: +/* 80385EFC 00382E5C 7C 08 02 A6 */ mflr r0 +/* 80385F00 00382E60 3C C0 80 54 */ lis r6, lbl_80541FF0@ha +/* 80385F04 00382E64 90 01 00 04 */ stw r0, 4(r1) +/* 80385F08 00382E68 54 80 07 3F */ clrlwi. r0, r4, 0x1c +/* 80385F0C 00382E6C 94 21 FF C0 */ stwu r1, -0x40(r1) +/* 80385F10 00382E70 93 E1 00 3C */ stw r31, 0x3c(r1) +/* 80385F14 00382E74 3F E0 80 00 */ lis r31, 0x8000 +/* 80385F18 00382E78 93 C1 00 38 */ stw r30, 0x38(r1) +/* 80385F1C 00382E7C 3B C6 1F F0 */ addi r30, r6, lbl_80541FF0@l +/* 80385F20 00382E80 93 A1 00 34 */ stw r29, 0x34(r1) +/* 80385F24 00382E84 93 81 00 30 */ stw r28, 0x30(r1) +/* 80385F28 00382E88 83 AD 9F 9C */ lwz r29, lbl_805A8B5C@sda21(r13) +/* 80385F2C 00382E8C 80 AD AD 7C */ lwz r5, lbl_805A993C@sda21(r13) +/* 80385F30 00382E90 7F FC EC 30 */ srw r28, r31, r29 +/* 80385F34 00382E94 7C A3 E0 78 */ andc r3, r5, r28 +/* 80385F38 00382E98 90 6D AD 7C */ stw r3, lbl_805A993C@sda21(r13) +/* 80385F3C 00382E9C 7C A5 E0 38 */ and r5, r5, r28 +/* 80385F40 00382EA0 38 60 00 01 */ li r3, 1 +/* 80385F44 00382EA4 41 82 00 54 */ beq lbl_80385F98 +/* 80385F48 00382EA8 80 8D AD 78 */ lwz r4, lbl_805A9938@sda21(r13) +/* 80385F4C 00382EAC 7C 80 00 34 */ cntlzw r0, r4 +/* 80385F50 00382EB0 90 0D 9F 9C */ stw r0, lbl_805A8B5C@sda21(r13) +/* 80385F54 00382EB4 80 6D 9F 9C */ lwz r3, lbl_805A8B5C@sda21(r13) +/* 80385F58 00382EB8 2C 03 00 20 */ cmpwi r3, 0x20 +/* 80385F5C 00382EBC 41 82 02 AC */ beq lbl_80386208 +/* 80385F60 00382EC0 1C 03 00 0C */ mulli r0, r3, 0xc +/* 80385F64 00382EC4 7F E3 1C 30 */ srw r3, r31, r3 +/* 80385F68 00382EC8 7C 84 18 78 */ andc r4, r4, r3 +/* 80385F6C 00382ECC 7C 7E 02 14 */ add r3, r30, r0 +/* 80385F70 00382ED0 90 8D AD 78 */ stw r4, lbl_805A9938@sda21(r13) +/* 80385F74 00382ED4 38 80 00 00 */ li r4, 0 +/* 80385F78 00382ED8 38 A0 00 0C */ li r5, 0xc +/* 80385F7C 00382EDC 38 63 00 10 */ addi r3, r3, 0x10 +/* 80385F80 00382EE0 4B C7 D4 29 */ bl memset +/* 80385F84 00382EE4 3C 80 80 38 */ lis r4, PADTypeAndStatusCallback@ha +/* 80385F88 00382EE8 80 6D 9F 9C */ lwz r3, lbl_805A8B5C@sda21(r13) +/* 80385F8C 00382EEC 38 84 5E FC */ addi r4, r4, PADTypeAndStatusCallback@l +/* 80385F90 00382EF0 48 03 9C D1 */ bl SIGetTypeAsync +/* 80385F94 00382EF4 48 00 02 74 */ b lbl_80386208 +lbl_80385F98: +/* 80385F98 00382EF8 54 86 00 2E */ rlwinm r6, r4, 0, 0, 0x17 +/* 80385F9C 00382EFC 54 84 00 C8 */ rlwinm r4, r4, 0, 3, 4 +/* 80385FA0 00382F00 3C 04 F8 00 */ addis r0, r4, 0xf800 +/* 80385FA4 00382F04 57 A4 10 3A */ slwi r4, r29, 2 +/* 80385FA8 00382F08 28 00 00 00 */ cmplwi r0, 0 +/* 80385FAC 00382F0C 7C DE 21 2E */ stwx r6, r30, r4 +/* 80385FB0 00382F10 40 82 00 0C */ bne lbl_80385FBC +/* 80385FB4 00382F14 54 C0 01 CF */ rlwinm. r0, r6, 0, 7, 7 +/* 80385FB8 00382F18 40 82 00 58 */ bne lbl_80386010 +lbl_80385FBC: +/* 80385FBC 00382F1C 80 AD AD 78 */ lwz r5, lbl_805A9938@sda21(r13) +/* 80385FC0 00382F20 7C A0 00 34 */ cntlzw r0, r5 +/* 80385FC4 00382F24 90 0D 9F 9C */ stw r0, lbl_805A8B5C@sda21(r13) +/* 80385FC8 00382F28 80 8D 9F 9C */ lwz r4, lbl_805A8B5C@sda21(r13) +/* 80385FCC 00382F2C 2C 04 00 20 */ cmpwi r4, 0x20 +/* 80385FD0 00382F30 41 82 02 38 */ beq lbl_80386208 +/* 80385FD4 00382F34 3C 60 80 00 */ lis r3, 0x8000 +/* 80385FD8 00382F38 1C 04 00 0C */ mulli r0, r4, 0xc +/* 80385FDC 00382F3C 7C 63 24 30 */ srw r3, r3, r4 +/* 80385FE0 00382F40 7C A4 18 78 */ andc r4, r5, r3 +/* 80385FE4 00382F44 7C 7E 02 14 */ add r3, r30, r0 +/* 80385FE8 00382F48 90 8D AD 78 */ stw r4, lbl_805A9938@sda21(r13) +/* 80385FEC 00382F4C 38 80 00 00 */ li r4, 0 +/* 80385FF0 00382F50 38 A0 00 0C */ li r5, 0xc +/* 80385FF4 00382F54 38 63 00 10 */ addi r3, r3, 0x10 +/* 80385FF8 00382F58 4B C7 D3 B1 */ bl memset +/* 80385FFC 00382F5C 3C 80 80 38 */ lis r4, PADTypeAndStatusCallback@ha +/* 80386000 00382F60 80 6D 9F 9C */ lwz r3, lbl_805A8B5C@sda21(r13) +/* 80386004 00382F64 38 84 5E FC */ addi r4, r4, PADTypeAndStatusCallback@l +/* 80386008 00382F68 48 03 9C 59 */ bl SIGetTypeAsync +/* 8038600C 00382F6C 48 00 01 FC */ b lbl_80386208 +lbl_80386010: +/* 80386010 00382F70 80 0D 9F A8 */ lwz r0, lbl_805A8B68@sda21(r13) +/* 80386014 00382F74 28 00 00 02 */ cmplwi r0, 2 +/* 80386018 00382F78 40 80 00 84 */ bge lbl_8038609C +/* 8038601C 00382F7C 80 0D AD 74 */ lwz r0, lbl_805A9934@sda21(r13) +/* 80386020 00382F80 38 7D 00 00 */ addi r3, r29, 0 +/* 80386024 00382F84 38 81 00 1C */ addi r4, r1, 0x1c +/* 80386028 00382F88 7C 00 E3 78 */ or r0, r0, r28 +/* 8038602C 00382F8C 90 0D AD 74 */ stw r0, lbl_805A9934@sda21(r13) +/* 80386030 00382F90 48 03 95 19 */ bl SIGetResponse +/* 80386034 00382F94 80 0D 9F A4 */ lwz r0, lbl_805A8B64@sda21(r13) +/* 80386038 00382F98 38 7D 00 00 */ addi r3, r29, 0 +/* 8038603C 00382F9C 64 04 00 40 */ oris r4, r0, 0x40 +/* 80386040 00382FA0 48 03 92 9D */ bl SISetCommand +/* 80386044 00382FA4 80 6D AD 74 */ lwz r3, lbl_805A9934@sda21(r13) +/* 80386048 00382FA8 48 03 93 25 */ bl SIEnablePolling +/* 8038604C 00382FAC 80 8D AD 78 */ lwz r4, lbl_805A9938@sda21(r13) +/* 80386050 00382FB0 7C 80 00 34 */ cntlzw r0, r4 +/* 80386054 00382FB4 90 0D 9F 9C */ stw r0, lbl_805A8B5C@sda21(r13) +/* 80386058 00382FB8 80 6D 9F 9C */ lwz r3, lbl_805A8B5C@sda21(r13) +/* 8038605C 00382FBC 2C 03 00 20 */ cmpwi r3, 0x20 +/* 80386060 00382FC0 41 82 01 A8 */ beq lbl_80386208 +/* 80386064 00382FC4 1C 03 00 0C */ mulli r0, r3, 0xc +/* 80386068 00382FC8 7F E3 1C 30 */ srw r3, r31, r3 +/* 8038606C 00382FCC 7C 84 18 78 */ andc r4, r4, r3 +/* 80386070 00382FD0 7C 7E 02 14 */ add r3, r30, r0 +/* 80386074 00382FD4 90 8D AD 78 */ stw r4, lbl_805A9938@sda21(r13) +/* 80386078 00382FD8 38 80 00 00 */ li r4, 0 +/* 8038607C 00382FDC 38 A0 00 0C */ li r5, 0xc +/* 80386080 00382FE0 38 63 00 10 */ addi r3, r3, 0x10 +/* 80386084 00382FE4 4B C7 D3 25 */ bl memset +/* 80386088 00382FE8 3C 80 80 38 */ lis r4, PADTypeAndStatusCallback@ha +/* 8038608C 00382FEC 80 6D 9F 9C */ lwz r3, lbl_805A8B5C@sda21(r13) +/* 80386090 00382FF0 38 84 5E FC */ addi r4, r4, PADTypeAndStatusCallback@l +/* 80386094 00382FF4 48 03 9B CD */ bl SIGetTypeAsync +/* 80386098 00382FF8 48 00 01 70 */ b lbl_80386208 +lbl_8038609C: +/* 8038609C 00382FFC 54 C0 00 01 */ rlwinm. r0, r6, 0, 0, 0 +/* 803860A0 00383000 41 82 00 0C */ beq lbl_803860AC +/* 803860A4 00383004 54 C0 01 4B */ rlwinm. r0, r6, 0, 5, 5 +/* 803860A8 00383008 41 82 00 74 */ beq lbl_8038611C +lbl_803860AC: +/* 803860AC 0038300C 28 05 00 00 */ cmplwi r5, 0 +/* 803860B0 00383010 41 82 00 38 */ beq lbl_803860E8 +/* 803860B4 00383014 1C 1D 00 0C */ mulli r0, r29, 0xc +/* 803860B8 00383018 3C 60 80 38 */ lis r3, PADOriginCallback@ha +/* 803860BC 0038301C 7C DE 02 14 */ add r6, r30, r0 +/* 803860C0 00383020 39 03 5C A0 */ addi r8, r3, PADOriginCallback@l +/* 803860C4 00383024 38 7D 00 00 */ addi r3, r29, 0 +/* 803860C8 00383028 38 8D 9F B4 */ addi r4, r13, lbl_805A8B74@sda21 +/* 803860CC 0038302C 38 A0 00 03 */ li r5, 3 +/* 803860D0 00383030 38 E0 00 0A */ li r7, 0xa +/* 803860D4 00383034 39 40 00 00 */ li r10, 0 +/* 803860D8 00383038 39 20 00 00 */ li r9, 0 +/* 803860DC 0038303C 38 C6 00 10 */ addi r6, r6, 0x10 +/* 803860E0 00383040 48 03 95 B9 */ bl SITransfer +/* 803860E4 00383044 48 00 00 C0 */ b lbl_803861A4 +lbl_803860E8: +/* 803860E8 00383048 1C 1D 00 0C */ mulli r0, r29, 0xc +/* 803860EC 0038304C 3C 60 80 38 */ lis r3, PADOriginCallback@ha +/* 803860F0 00383050 7C DE 02 14 */ add r6, r30, r0 +/* 803860F4 00383054 39 03 5C A0 */ addi r8, r3, PADOriginCallback@l +/* 803860F8 00383058 38 7D 00 00 */ addi r3, r29, 0 +/* 803860FC 0038305C 38 8D 9F B0 */ addi r4, r13, lbl_805A8B70@sda21 +/* 80386100 00383060 38 A0 00 01 */ li r5, 1 +/* 80386104 00383064 38 E0 00 0A */ li r7, 0xa +/* 80386108 00383068 39 40 00 00 */ li r10, 0 +/* 8038610C 0038306C 39 20 00 00 */ li r9, 0 +/* 80386110 00383070 38 C6 00 10 */ addi r6, r6, 0x10 +/* 80386114 00383074 48 03 95 85 */ bl SITransfer +/* 80386118 00383078 48 00 00 8C */ b lbl_803861A4 +lbl_8038611C: +/* 8038611C 0038307C 54 C0 02 D7 */ rlwinm. r0, r6, 0, 0xb, 0xb +/* 80386120 00383080 41 82 00 84 */ beq lbl_803861A4 +/* 80386124 00383084 54 C0 03 19 */ rlwinm. r0, r6, 0, 0xc, 0xc +/* 80386128 00383088 40 82 00 7C */ bne lbl_803861A4 +/* 8038612C 0038308C 54 C0 03 5B */ rlwinm. r0, r6, 0, 0xd, 0xd +/* 80386130 00383090 40 82 00 74 */ bne lbl_803861A4 +/* 80386134 00383094 54 C0 00 43 */ rlwinm. r0, r6, 0, 1, 1 +/* 80386138 00383098 41 82 00 38 */ beq lbl_80386170 +/* 8038613C 0038309C 1C 1D 00 0C */ mulli r0, r29, 0xc +/* 80386140 003830A0 3C 60 80 38 */ lis r3, PADOriginCallback@ha +/* 80386144 003830A4 7C DE 02 14 */ add r6, r30, r0 +/* 80386148 003830A8 39 03 5C A0 */ addi r8, r3, PADOriginCallback@l +/* 8038614C 003830AC 38 7D 00 00 */ addi r3, r29, 0 +/* 80386150 003830B0 38 8D 9F B0 */ addi r4, r13, lbl_805A8B70@sda21 +/* 80386154 003830B4 38 A0 00 01 */ li r5, 1 +/* 80386158 003830B8 38 E0 00 0A */ li r7, 0xa +/* 8038615C 003830BC 39 40 00 00 */ li r10, 0 +/* 80386160 003830C0 39 20 00 00 */ li r9, 0 +/* 80386164 003830C4 38 C6 00 10 */ addi r6, r6, 0x10 +/* 80386168 003830C8 48 03 95 31 */ bl SITransfer +/* 8038616C 003830CC 48 00 00 38 */ b lbl_803861A4 +lbl_80386170: +/* 80386170 003830D0 1C 1D 00 0C */ mulli r0, r29, 0xc +/* 80386174 003830D4 3C 60 80 38 */ lis r3, PADProbeCallback@ha +/* 80386178 003830D8 7C 9E 22 14 */ add r4, r30, r4 +/* 8038617C 003830DC 7C DE 02 14 */ add r6, r30, r0 +/* 80386180 003830E0 39 03 5E 24 */ addi r8, r3, PADProbeCallback@l +/* 80386184 003830E4 38 7D 00 00 */ addi r3, r29, 0 +/* 80386188 003830E8 38 A0 00 03 */ li r5, 3 +/* 8038618C 003830EC 38 E0 00 08 */ li r7, 8 +/* 80386190 003830F0 39 40 00 00 */ li r10, 0 +/* 80386194 003830F4 39 20 00 00 */ li r9, 0 +/* 80386198 003830F8 38 84 00 40 */ addi r4, r4, 0x40 +/* 8038619C 003830FC 38 C6 00 10 */ addi r6, r6, 0x10 +/* 803861A0 00383100 48 03 94 F9 */ bl SITransfer +lbl_803861A4: +/* 803861A4 00383104 2C 03 00 00 */ cmpwi r3, 0 +/* 803861A8 00383108 40 82 00 60 */ bne lbl_80386208 +/* 803861AC 0038310C 80 AD AD 78 */ lwz r5, lbl_805A9938@sda21(r13) +/* 803861B0 00383110 80 6D AD 88 */ lwz r3, lbl_805A9948@sda21(r13) +/* 803861B4 00383114 7C A0 00 34 */ cntlzw r0, r5 +/* 803861B8 00383118 90 0D 9F 9C */ stw r0, lbl_805A8B5C@sda21(r13) +/* 803861BC 0038311C 7C 60 E3 78 */ or r0, r3, r28 +/* 803861C0 00383120 80 8D 9F 9C */ lwz r4, lbl_805A8B5C@sda21(r13) +/* 803861C4 00383124 90 0D AD 88 */ stw r0, lbl_805A9948@sda21(r13) +/* 803861C8 00383128 2C 04 00 20 */ cmpwi r4, 0x20 +/* 803861CC 0038312C 41 82 00 3C */ beq lbl_80386208 +/* 803861D0 00383130 3C 60 80 00 */ lis r3, 0x8000 +/* 803861D4 00383134 1C 04 00 0C */ mulli r0, r4, 0xc +/* 803861D8 00383138 7C 63 24 30 */ srw r3, r3, r4 +/* 803861DC 0038313C 7C A4 18 78 */ andc r4, r5, r3 +/* 803861E0 00383140 7C 7E 02 14 */ add r3, r30, r0 +/* 803861E4 00383144 90 8D AD 78 */ stw r4, lbl_805A9938@sda21(r13) +/* 803861E8 00383148 38 80 00 00 */ li r4, 0 +/* 803861EC 0038314C 38 A0 00 0C */ li r5, 0xc +/* 803861F0 00383150 38 63 00 10 */ addi r3, r3, 0x10 +/* 803861F4 00383154 4B C7 D1 B5 */ bl memset +/* 803861F8 00383158 3C 80 80 38 */ lis r4, PADTypeAndStatusCallback@ha +/* 803861FC 0038315C 80 6D 9F 9C */ lwz r3, lbl_805A8B5C@sda21(r13) +/* 80386200 00383160 38 84 5E FC */ addi r4, r4, PADTypeAndStatusCallback@l +/* 80386204 00383164 48 03 9A 5D */ bl SIGetTypeAsync +lbl_80386208: +/* 80386208 00383168 80 01 00 44 */ lwz r0, 0x44(r1) +/* 8038620C 0038316C 83 E1 00 3C */ lwz r31, 0x3c(r1) +/* 80386210 00383170 83 C1 00 38 */ lwz r30, 0x38(r1) +/* 80386214 00383174 83 A1 00 34 */ lwz r29, 0x34(r1) +/* 80386218 00383178 83 81 00 30 */ lwz r28, 0x30(r1) +/* 8038621C 0038317C 38 21 00 40 */ addi r1, r1, 0x40 +/* 80386220 00383180 7C 08 03 A6 */ mtlr r0 +/* 80386224 00383184 4E 80 00 20 */ blr + +.global sub_80386228 +sub_80386228: +/* 80386228 00383188 7C 08 02 A6 */ mflr r0 +/* 8038622C 0038318C 90 01 00 04 */ stw r0, 4(r1) +/* 80386230 00383190 94 21 FF E0 */ stwu r1, -0x20(r1) +/* 80386234 00383194 93 E1 00 1C */ stw r31, 0x1c(r1) +/* 80386238 00383198 7C 7F 1B 78 */ mr r31, r3 +/* 8038623C 0038319C 3C 60 80 00 */ lis r3, 0x8000 +/* 80386240 003831A0 93 C1 00 18 */ stw r30, 0x18(r1) +/* 80386244 003831A4 93 A1 00 14 */ stw r29, 0x14(r1) +/* 80386248 003831A8 7C 7D FC 30 */ srw r29, r3, r31 +/* 8038624C 003831AC 80 0D AD 74 */ lwz r0, lbl_805A9934@sda21(r13) +/* 80386250 003831B0 7C 00 E8 39 */ and. r0, r0, r29 +/* 80386254 003831B4 41 82 00 EC */ beq lbl_80386340 +/* 80386258 003831B8 80 AD AD 80 */ lwz r5, lbl_805A9940@sda21(r13) +/* 8038625C 003831BC 7F A6 E8 F8 */ nor r6, r29, r29 +/* 80386260 003831C0 80 6D AD 84 */ lwz r3, lbl_805A9944@sda21(r13) +/* 80386264 003831C4 54 80 07 3F */ clrlwi. r0, r4, 0x1c +/* 80386268 003831C8 7C A5 30 38 */ and r5, r5, r6 +/* 8038626C 003831CC 7C 63 30 38 */ and r3, r3, r6 +/* 80386270 003831D0 90 AD AD 80 */ stw r5, lbl_805A9940@sda21(r13) +/* 80386274 003831D4 90 6D AD 84 */ stw r3, lbl_805A9944@sda21(r13) +/* 80386278 003831D8 54 83 00 2E */ rlwinm r3, r4, 0, 0, 0x17 +/* 8038627C 003831DC 40 82 00 6C */ bne lbl_803862E8 +/* 80386280 003831E0 54 60 00 01 */ rlwinm. r0, r3, 0, 0, 0 +/* 80386284 003831E4 41 82 00 64 */ beq lbl_803862E8 +/* 80386288 003831E8 54 60 02 D7 */ rlwinm. r0, r3, 0, 0xb, 0xb +/* 8038628C 003831EC 41 82 00 5C */ beq lbl_803862E8 +/* 80386290 003831F0 54 60 00 43 */ rlwinm. r0, r3, 0, 1, 1 +/* 80386294 003831F4 41 82 00 54 */ beq lbl_803862E8 +/* 80386298 003831F8 54 60 01 4B */ rlwinm. r0, r3, 0, 5, 5 +/* 8038629C 003831FC 40 82 00 4C */ bne lbl_803862E8 +/* 803862A0 00383200 54 60 03 19 */ rlwinm. r0, r3, 0, 0xc, 0xc +/* 803862A4 00383204 40 82 00 44 */ bne lbl_803862E8 +/* 803862A8 00383208 54 60 03 5B */ rlwinm. r0, r3, 0, 0xd, 0xd +/* 803862AC 0038320C 40 82 00 3C */ bne lbl_803862E8 +/* 803862B0 00383210 1C 9F 00 0C */ mulli r4, r31, 0xc +/* 803862B4 00383214 3C 60 80 54 */ lis r3, lbl_80542000@ha +/* 803862B8 00383218 38 03 20 00 */ addi r0, r3, lbl_80542000@l +/* 803862BC 0038321C 3C 60 80 38 */ lis r3, sub_80385d64@ha +/* 803862C0 00383220 7C C0 22 14 */ add r6, r0, r4 +/* 803862C4 00383224 39 03 5D 64 */ addi r8, r3, sub_80385d64@l +/* 803862C8 00383228 38 7F 00 00 */ addi r3, r31, 0 +/* 803862CC 0038322C 38 8D 9F B0 */ addi r4, r13, lbl_805A8B70@sda21 +/* 803862D0 00383230 38 A0 00 01 */ li r5, 1 +/* 803862D4 00383234 38 E0 00 0A */ li r7, 0xa +/* 803862D8 00383238 39 40 00 00 */ li r10, 0 +/* 803862DC 0038323C 39 20 00 00 */ li r9, 0 +/* 803862E0 00383240 48 03 93 B9 */ bl SITransfer +/* 803862E4 00383244 48 00 00 5C */ b lbl_80386340 +lbl_803862E8: +/* 803862E8 00383248 4B FF B3 79 */ bl OSDisableInterrupts +/* 803862EC 0038324C 3B C3 00 00 */ addi r30, r3, 0 +/* 803862F0 00383250 38 7D 00 00 */ addi r3, r29, 0 +/* 803862F4 00383254 48 03 91 15 */ bl SIDisablePolling +/* 803862F8 00383258 80 CD AD 74 */ lwz r6, lbl_805A9934@sda21(r13) +/* 803862FC 0038325C 7F A8 E8 F8 */ nor r8, r29, r29 +/* 80386300 00383260 80 AD AD 80 */ lwz r5, lbl_805A9940@sda21(r13) +/* 80386304 00383264 7F E3 FB 78 */ mr r3, r31 +/* 80386308 00383268 80 8D AD 84 */ lwz r4, lbl_805A9944@sda21(r13) +/* 8038630C 0038326C 80 0D AD 88 */ lwz r0, lbl_805A9948@sda21(r13) +/* 80386310 00383270 7C C7 40 38 */ and r7, r6, r8 +/* 80386314 00383274 7C A6 40 38 */ and r6, r5, r8 +/* 80386318 00383278 90 ED AD 74 */ stw r7, lbl_805A9934@sda21(r13) +/* 8038631C 0038327C 7C 85 40 38 */ and r5, r4, r8 +/* 80386320 00383280 7C 00 40 38 */ and r0, r0, r8 +/* 80386324 00383284 90 CD AD 80 */ stw r6, lbl_805A9940@sda21(r13) +/* 80386328 00383288 38 80 00 00 */ li r4, 0 +/* 8038632C 0038328C 90 AD AD 84 */ stw r5, lbl_805A9944@sda21(r13) +/* 80386330 00383290 90 0D AD 88 */ stw r0, lbl_805A9948@sda21(r13) +/* 80386334 00383294 4B FF E0 05 */ bl OSSetWirelessID +/* 80386338 00383298 7F C3 F3 78 */ mr r3, r30 +/* 8038633C 0038329C 4B FF B3 4D */ bl OSRestoreInterrupts +lbl_80386340: +/* 80386340 003832A0 80 01 00 24 */ lwz r0, 0x24(r1) +/* 80386344 003832A4 83 E1 00 1C */ lwz r31, 0x1c(r1) +/* 80386348 003832A8 83 C1 00 18 */ lwz r30, 0x18(r1) +/* 8038634C 003832AC 83 A1 00 14 */ lwz r29, 0x14(r1) +/* 80386350 003832B0 38 21 00 20 */ addi r1, r1, 0x20 +/* 80386354 003832B4 7C 08 03 A6 */ mtlr r0 +/* 80386358 003832B8 4E 80 00 20 */ blr + +.global PADReset +PADReset: +/* 8038635C 003832BC 7C 08 02 A6 */ mflr r0 +/* 80386360 003832C0 90 01 00 04 */ stw r0, 4(r1) +/* 80386364 003832C4 94 21 FF E8 */ stwu r1, -0x18(r1) +/* 80386368 003832C8 93 E1 00 14 */ stw r31, 0x14(r1) +/* 8038636C 003832CC 93 C1 00 10 */ stw r30, 0x10(r1) +/* 80386370 003832D0 7C 7E 1B 78 */ mr r30, r3 +/* 80386374 003832D4 4B FF B2 ED */ bl OSDisableInterrupts +/* 80386378 003832D8 80 8D AD 88 */ lwz r4, lbl_805A9948@sda21(r13) +/* 8038637C 003832DC 38 E0 00 00 */ li r7, 0 +/* 80386380 003832E0 80 AD AD 80 */ lwz r5, lbl_805A9940@sda21(r13) +/* 80386384 003832E4 3B E3 00 00 */ addi r31, r3, 0 +/* 80386388 003832E8 80 0D AD 84 */ lwz r0, lbl_805A9944@sda21(r13) +/* 8038638C 003832EC 7F DE 23 78 */ or r30, r30, r4 +/* 80386390 003832F0 80 8D AD 78 */ lwz r4, lbl_805A9938@sda21(r13) +/* 80386394 003832F4 7C A5 03 78 */ or r5, r5, r0 +/* 80386398 003832F8 80 0D 9F A8 */ lwz r0, lbl_805A8B68@sda21(r13) +/* 8038639C 003832FC 7F DE 28 78 */ andc r30, r30, r5 +/* 803863A0 00383300 80 AD AD 74 */ lwz r5, lbl_805A9934@sda21(r13) +/* 803863A4 00383304 7C 86 F3 78 */ or r6, r4, r30 +/* 803863A8 00383308 90 ED AD 88 */ stw r7, lbl_805A9948@sda21(r13) +/* 803863AC 0038330C 7C A4 F0 78 */ andc r4, r5, r30 +/* 803863B0 00383310 90 CD AD 78 */ stw r6, lbl_805A9938@sda21(r13) +/* 803863B4 00383314 28 00 00 04 */ cmplwi r0, 4 +/* 803863B8 00383318 80 0D AD 78 */ lwz r0, lbl_805A9938@sda21(r13) +/* 803863BC 0038331C 90 8D AD 74 */ stw r4, lbl_805A9934@sda21(r13) +/* 803863C0 00383320 7C 03 28 38 */ and r3, r0, r5 +/* 803863C4 00383324 40 82 00 10 */ bne lbl_803863D4 +/* 803863C8 00383328 80 0D AD 7C */ lwz r0, lbl_805A993C@sda21(r13) +/* 803863CC 0038332C 7C 00 F3 78 */ or r0, r0, r30 +/* 803863D0 00383330 90 0D AD 7C */ stw r0, lbl_805A993C@sda21(r13) +lbl_803863D4: +/* 803863D4 00383334 48 03 90 35 */ bl SIDisablePolling +/* 803863D8 00383338 80 0D 9F 9C */ lwz r0, lbl_805A8B5C@sda21(r13) +/* 803863DC 0038333C 2C 00 00 20 */ cmpwi r0, 0x20 +/* 803863E0 00383340 40 82 00 58 */ bne lbl_80386438 +/* 803863E4 00383344 80 AD AD 78 */ lwz r5, lbl_805A9938@sda21(r13) +/* 803863E8 00383348 7C A0 00 34 */ cntlzw r0, r5 +/* 803863EC 0038334C 90 0D 9F 9C */ stw r0, lbl_805A8B5C@sda21(r13) +/* 803863F0 00383350 80 8D 9F 9C */ lwz r4, lbl_805A8B5C@sda21(r13) +/* 803863F4 00383354 2C 04 00 20 */ cmpwi r4, 0x20 +/* 803863F8 00383358 41 82 00 40 */ beq lbl_80386438 +/* 803863FC 0038335C 3C 00 80 00 */ lis r0, 0x8000 +/* 80386400 00383360 7C 00 24 30 */ srw r0, r0, r4 +/* 80386404 00383364 7C A0 00 78 */ andc r0, r5, r0 +/* 80386408 00383368 1C 84 00 0C */ mulli r4, r4, 0xc +/* 8038640C 0038336C 90 0D AD 78 */ stw r0, lbl_805A9938@sda21(r13) +/* 80386410 00383370 3C 60 80 54 */ lis r3, lbl_80542000@ha +/* 80386414 00383374 38 03 20 00 */ addi r0, r3, lbl_80542000@l +/* 80386418 00383378 7C 60 22 14 */ add r3, r0, r4 +/* 8038641C 0038337C 38 80 00 00 */ li r4, 0 +/* 80386420 00383380 38 A0 00 0C */ li r5, 0xc +/* 80386424 00383384 4B C7 CF 85 */ bl memset +/* 80386428 00383388 3C 80 80 38 */ lis r4, PADTypeAndStatusCallback@ha +/* 8038642C 0038338C 80 6D 9F 9C */ lwz r3, lbl_805A8B5C@sda21(r13) +/* 80386430 00383390 38 84 5E FC */ addi r4, r4, PADTypeAndStatusCallback@l +/* 80386434 00383394 48 03 98 2D */ bl SIGetTypeAsync +lbl_80386438: +/* 80386438 00383398 7F E3 FB 78 */ mr r3, r31 +/* 8038643C 0038339C 4B FF B2 4D */ bl OSRestoreInterrupts +/* 80386440 003833A0 80 01 00 1C */ lwz r0, 0x1c(r1) +/* 80386444 003833A4 38 60 00 01 */ li r3, 1 +/* 80386448 003833A8 83 E1 00 14 */ lwz r31, 0x14(r1) +/* 8038644C 003833AC 83 C1 00 10 */ lwz r30, 0x10(r1) +/* 80386450 003833B0 38 21 00 18 */ addi r1, r1, 0x18 +/* 80386454 003833B4 7C 08 03 A6 */ mtlr r0 +/* 80386458 003833B8 4E 80 00 20 */ blr + +.global sub_8038645c +sub_8038645c: +/* 8038645C 003833BC 7C 08 02 A6 */ mflr r0 +/* 80386460 003833C0 90 01 00 04 */ stw r0, 4(r1) +/* 80386464 003833C4 94 21 FF E8 */ stwu r1, -0x18(r1) +/* 80386468 003833C8 93 E1 00 14 */ stw r31, 0x14(r1) +/* 8038646C 003833CC 93 C1 00 10 */ stw r30, 0x10(r1) +/* 80386470 003833D0 7C 7E 1B 78 */ mr r30, r3 +/* 80386474 003833D4 4B FF B1 ED */ bl OSDisableInterrupts +/* 80386478 003833D8 80 CD AD 88 */ lwz r6, lbl_805A9948@sda21(r13) +/* 8038647C 003833DC 38 E0 00 00 */ li r7, 0 +/* 80386480 003833E0 80 AD AD 80 */ lwz r5, lbl_805A9940@sda21(r13) +/* 80386484 003833E4 3C 80 80 00 */ lis r4, 0x800030E3@ha +/* 80386488 003833E8 80 0D AD 84 */ lwz r0, lbl_805A9944@sda21(r13) +/* 8038648C 003833EC 7F DE 33 78 */ or r30, r30, r6 +/* 80386490 003833F0 80 CD AD 78 */ lwz r6, lbl_805A9938@sda21(r13) +/* 80386494 003833F4 7C A5 03 78 */ or r5, r5, r0 +/* 80386498 003833F8 88 04 30 E3 */ lbz r0, 0x800030E3@l(r4) +/* 8038649C 003833FC 7F DE 28 78 */ andc r30, r30, r5 +/* 803864A0 00383400 80 AD AD 74 */ lwz r5, lbl_805A9934@sda21(r13) +/* 803864A4 00383404 7C C4 F3 78 */ or r4, r6, r30 +/* 803864A8 00383408 90 ED AD 88 */ stw r7, lbl_805A9948@sda21(r13) +/* 803864AC 0038340C 54 00 06 73 */ rlwinm. r0, r0, 0, 0x19, 0x19 +/* 803864B0 00383410 90 8D AD 78 */ stw r4, lbl_805A9938@sda21(r13) +/* 803864B4 00383414 7C A4 F0 78 */ andc r4, r5, r30 +/* 803864B8 00383418 3B E3 00 00 */ addi r31, r3, 0 +/* 803864BC 0038341C 80 CD AD 78 */ lwz r6, lbl_805A9938@sda21(r13) +/* 803864C0 00383420 90 8D AD 74 */ stw r4, lbl_805A9934@sda21(r13) +/* 803864C4 00383424 7C C3 28 38 */ and r3, r6, r5 +/* 803864C8 00383428 40 82 00 10 */ bne lbl_803864D8 +/* 803864CC 0038342C 80 0D AD 7C */ lwz r0, lbl_805A993C@sda21(r13) +/* 803864D0 00383430 7C 00 F3 78 */ or r0, r0, r30 +/* 803864D4 00383434 90 0D AD 7C */ stw r0, lbl_805A993C@sda21(r13) +lbl_803864D8: +/* 803864D8 00383438 48 03 8F 31 */ bl SIDisablePolling +/* 803864DC 0038343C 80 0D 9F 9C */ lwz r0, lbl_805A8B5C@sda21(r13) +/* 803864E0 00383440 2C 00 00 20 */ cmpwi r0, 0x20 +/* 803864E4 00383444 40 82 00 58 */ bne lbl_8038653C +/* 803864E8 00383448 80 AD AD 78 */ lwz r5, lbl_805A9938@sda21(r13) +/* 803864EC 0038344C 7C A0 00 34 */ cntlzw r0, r5 +/* 803864F0 00383450 90 0D 9F 9C */ stw r0, lbl_805A8B5C@sda21(r13) +/* 803864F4 00383454 80 8D 9F 9C */ lwz r4, lbl_805A8B5C@sda21(r13) +/* 803864F8 00383458 2C 04 00 20 */ cmpwi r4, 0x20 +/* 803864FC 0038345C 41 82 00 40 */ beq lbl_8038653C +/* 80386500 00383460 3C 00 80 00 */ lis r0, 0x8000 +/* 80386504 00383464 7C 00 24 30 */ srw r0, r0, r4 +/* 80386508 00383468 7C A0 00 78 */ andc r0, r5, r0 +/* 8038650C 0038346C 1C 84 00 0C */ mulli r4, r4, 0xc +/* 80386510 00383470 90 0D AD 78 */ stw r0, lbl_805A9938@sda21(r13) +/* 80386514 00383474 3C 60 80 54 */ lis r3, lbl_80542000@ha +/* 80386518 00383478 38 03 20 00 */ addi r0, r3, lbl_80542000@l +/* 8038651C 0038347C 7C 60 22 14 */ add r3, r0, r4 +/* 80386520 00383480 38 80 00 00 */ li r4, 0 +/* 80386524 00383484 38 A0 00 0C */ li r5, 0xc +/* 80386528 00383488 4B C7 CE 81 */ bl memset +/* 8038652C 0038348C 3C 80 80 38 */ lis r4, PADTypeAndStatusCallback@ha +/* 80386530 00383490 80 6D 9F 9C */ lwz r3, lbl_805A8B5C@sda21(r13) +/* 80386534 00383494 38 84 5E FC */ addi r4, r4, PADTypeAndStatusCallback@l +/* 80386538 00383498 48 03 97 29 */ bl SIGetTypeAsync +lbl_8038653C: +/* 8038653C 0038349C 7F E3 FB 78 */ mr r3, r31 +/* 80386540 003834A0 4B FF B1 49 */ bl OSRestoreInterrupts +/* 80386544 003834A4 80 01 00 1C */ lwz r0, 0x1c(r1) +/* 80386548 003834A8 38 60 00 01 */ li r3, 1 +/* 8038654C 003834AC 83 E1 00 14 */ lwz r31, 0x14(r1) +/* 80386550 003834B0 83 C1 00 10 */ lwz r30, 0x10(r1) +/* 80386554 003834B4 38 21 00 18 */ addi r1, r1, 0x18 +/* 80386558 003834B8 7C 08 03 A6 */ mtlr r0 +/* 8038655C 003834BC 4E 80 00 20 */ blr + +.global PADInit +PADInit: +/* 80386560 003834C0 7C 08 02 A6 */ mflr r0 +/* 80386564 003834C4 3C 60 80 54 */ lis r3, lbl_80541FF0@ha +/* 80386568 003834C8 90 01 00 04 */ stw r0, 4(r1) +/* 8038656C 003834CC 94 21 FF C8 */ stwu r1, -0x38(r1) +/* 80386570 003834D0 BF 21 00 1C */ stmw r25, 0x1c(r1) +/* 80386574 003834D4 3B E3 1F F0 */ addi r31, r3, lbl_80541FF0@l +/* 80386578 003834D8 80 0D AD 70 */ lwz r0, lbl_805A9930@sda21(r13) +/* 8038657C 003834DC 2C 00 00 00 */ cmpwi r0, 0 +/* 80386580 003834E0 41 82 00 0C */ beq lbl_8038658C +/* 80386584 003834E4 38 60 00 01 */ li r3, 1 +/* 80386588 003834E8 48 00 01 DC */ b lbl_80386764 +lbl_8038658C: +/* 8038658C 003834EC 80 6D 9F 98 */ lwz r3, lbl_805A8B58@sda21(r13) +/* 80386590 003834F0 4B FF 7A A9 */ bl OSRegisterVersion +/* 80386594 003834F4 80 6D AD 94 */ lwz r3, lbl_805A9954@sda21(r13) +/* 80386598 003834F8 28 03 00 00 */ cmplwi r3, 0 +/* 8038659C 003834FC 41 82 00 08 */ beq lbl_803865A4 +/* 803865A0 00383500 48 00 06 E1 */ bl PADSetSpec +lbl_803865A4: +/* 803865A4 00383504 80 0D B0 18 */ lwz r0, lbl_805A9BD8@sda21(r13) +/* 803865A8 00383508 38 60 00 01 */ li r3, 1 +/* 803865AC 0038350C 90 6D AD 70 */ stw r3, lbl_805A9930@sda21(r13) +/* 803865B0 00383510 28 00 00 00 */ cmplwi r0, 0 +/* 803865B4 00383514 41 82 00 8C */ beq lbl_80386640 +/* 803865B8 00383518 4B FF ED F1 */ bl OSGetTime +/* 803865BC 0038351C 3B 24 00 00 */ addi r25, r4, 0 +/* 803865C0 00383520 3B 43 00 00 */ addi r26, r3, 0 +/* 803865C4 00383524 38 A0 00 10 */ li r5, 0x10 +/* 803865C8 00383528 48 00 39 75 */ bl __shr2i +/* 803865CC 0038352C 3C A0 00 01 */ lis r5, 0x0000FFFF@ha +/* 803865D0 00383530 3B 65 FF FF */ addi r27, r5, 0x0000FFFF@l +/* 803865D4 00383534 3B 80 00 00 */ li r28, 0 +/* 803865D8 00383538 7C 86 D8 38 */ and r6, r4, r27 +/* 803865DC 0038353C 7F 24 D8 38 */ and r4, r25, r27 +/* 803865E0 00383540 7C 65 E0 38 */ and r5, r3, r28 +/* 803865E4 00383544 7F 40 E0 38 */ and r0, r26, r28 +/* 803865E8 00383548 7F A4 30 14 */ addc r29, r4, r6 +/* 803865EC 0038354C 38 7A 00 00 */ addi r3, r26, 0 +/* 803865F0 00383550 38 99 00 00 */ addi r4, r25, 0 +/* 803865F4 00383554 7F C0 29 14 */ adde r30, r0, r5 +/* 803865F8 00383558 38 A0 00 20 */ li r5, 0x20 +/* 803865FC 0038355C 48 00 39 41 */ bl __shr2i +/* 80386600 00383560 7C 84 D8 38 */ and r4, r4, r27 +/* 80386604 00383564 7C 60 E0 38 */ and r0, r3, r28 +/* 80386608 00383568 7F A4 E8 14 */ addc r29, r4, r29 +/* 8038660C 0038356C 38 7A 00 00 */ addi r3, r26, 0 +/* 80386610 00383570 38 99 00 00 */ addi r4, r25, 0 +/* 80386614 00383574 7F C0 F1 14 */ adde r30, r0, r30 +/* 80386618 00383578 38 A0 00 30 */ li r5, 0x30 +/* 8038661C 0038357C 48 00 39 21 */ bl __shr2i +/* 80386620 00383580 7C 80 D8 38 */ and r0, r4, r27 +/* 80386624 00383584 7C A0 E8 14 */ addc r5, r0, r29 +/* 80386628 00383588 3C 00 F0 00 */ lis r0, 0xf000 +/* 8038662C 0038358C 38 80 3F FF */ li r4, 0x3fff +/* 80386630 00383590 90 0D AD 7C */ stw r0, lbl_805A993C@sda21(r13) +/* 80386634 00383594 7C A0 20 38 */ and r0, r5, r4 +/* 80386638 00383598 3C 60 80 00 */ lis r3, 0x800030E0@ha +/* 8038663C 0038359C B0 03 30 E0 */ sth r0, 0x800030E0@l(r3) +lbl_80386640: +/* 80386640 003835A0 3C 60 80 00 */ lis r3, 0x800030E0@ha +/* 80386644 003835A4 A0 03 30 E0 */ lhz r0, 0x800030E0@l(r3) +/* 80386648 003835A8 54 00 42 AE */ rlwinm r0, r0, 8, 0xa, 0x17 +/* 8038664C 003835AC 64 00 4D 00 */ oris r0, r0, 0x4d00 +/* 80386650 003835B0 90 1F 00 40 */ stw r0, 0x40(r31) +/* 80386654 003835B4 A0 03 30 E0 */ lhz r0, 0x30e0(r3) +/* 80386658 003835B8 54 00 42 AE */ rlwinm r0, r0, 8, 0xa, 0x17 +/* 8038665C 003835BC 64 00 4D 40 */ oris r0, r0, 0x4d40 +/* 80386660 003835C0 90 1F 00 44 */ stw r0, 0x44(r31) +/* 80386664 003835C4 A0 03 30 E0 */ lhz r0, 0x30e0(r3) +/* 80386668 003835C8 54 00 42 AE */ rlwinm r0, r0, 8, 0xa, 0x17 +/* 8038666C 003835CC 64 00 4D 80 */ oris r0, r0, 0x4d80 +/* 80386670 003835D0 90 1F 00 48 */ stw r0, 0x48(r31) +/* 80386674 003835D4 A0 03 30 E0 */ lhz r0, 0x30e0(r3) +/* 80386678 003835D8 54 00 42 AE */ rlwinm r0, r0, 8, 0xa, 0x17 +/* 8038667C 003835DC 64 00 4D C0 */ oris r0, r0, 0x4dc0 +/* 80386680 003835E0 90 1F 00 4C */ stw r0, 0x4c(r31) +/* 80386684 003835E4 48 03 99 6D */ bl SIRefreshSamplingRate +/* 80386688 003835E8 3C 60 80 3F */ lis r3, lbl_803F2398@ha +/* 8038668C 003835EC 38 63 23 98 */ addi r3, r3, lbl_803F2398@l +/* 80386690 003835F0 4B FF C9 9D */ bl OSRegisterResetFunction +/* 80386694 003835F4 3F 80 F0 00 */ lis r28, 0xf000 +/* 80386698 003835F8 4B FF AF C9 */ bl OSDisableInterrupts +/* 8038669C 003835FC 80 8D AD 88 */ lwz r4, lbl_805A9948@sda21(r13) +/* 803866A0 00383600 38 E0 00 00 */ li r7, 0 +/* 803866A4 00383604 80 AD AD 80 */ lwz r5, lbl_805A9940@sda21(r13) +/* 803866A8 00383608 3B 63 00 00 */ addi r27, r3, 0 +/* 803866AC 0038360C 80 0D AD 84 */ lwz r0, lbl_805A9944@sda21(r13) +/* 803866B0 00383610 7F 9C 23 78 */ or r28, r28, r4 +/* 803866B4 00383614 80 8D AD 78 */ lwz r4, lbl_805A9938@sda21(r13) +/* 803866B8 00383618 7C A5 03 78 */ or r5, r5, r0 +/* 803866BC 0038361C 80 0D 9F A8 */ lwz r0, lbl_805A8B68@sda21(r13) +/* 803866C0 00383620 7F 9C 28 78 */ andc r28, r28, r5 +/* 803866C4 00383624 80 AD AD 74 */ lwz r5, lbl_805A9934@sda21(r13) +/* 803866C8 00383628 7C 86 E3 78 */ or r6, r4, r28 +/* 803866CC 0038362C 90 ED AD 88 */ stw r7, lbl_805A9948@sda21(r13) +/* 803866D0 00383630 7C A4 E0 78 */ andc r4, r5, r28 +/* 803866D4 00383634 90 CD AD 78 */ stw r6, lbl_805A9938@sda21(r13) +/* 803866D8 00383638 28 00 00 04 */ cmplwi r0, 4 +/* 803866DC 0038363C 80 0D AD 78 */ lwz r0, lbl_805A9938@sda21(r13) +/* 803866E0 00383640 90 8D AD 74 */ stw r4, lbl_805A9934@sda21(r13) +/* 803866E4 00383644 7C 03 28 38 */ and r3, r0, r5 +/* 803866E8 00383648 40 82 00 10 */ bne lbl_803866F8 +/* 803866EC 0038364C 80 0D AD 7C */ lwz r0, lbl_805A993C@sda21(r13) +/* 803866F0 00383650 7C 00 E3 78 */ or r0, r0, r28 +/* 803866F4 00383654 90 0D AD 7C */ stw r0, lbl_805A993C@sda21(r13) +lbl_803866F8: +/* 803866F8 00383658 48 03 8D 11 */ bl SIDisablePolling +/* 803866FC 0038365C 80 0D 9F 9C */ lwz r0, lbl_805A8B5C@sda21(r13) +/* 80386700 00383660 2C 00 00 20 */ cmpwi r0, 0x20 +/* 80386704 00383664 40 82 00 54 */ bne lbl_80386758 +/* 80386708 00383668 80 AD AD 78 */ lwz r5, lbl_805A9938@sda21(r13) +/* 8038670C 0038366C 7C A0 00 34 */ cntlzw r0, r5 +/* 80386710 00383670 90 0D 9F 9C */ stw r0, lbl_805A8B5C@sda21(r13) +/* 80386714 00383674 80 8D 9F 9C */ lwz r4, lbl_805A8B5C@sda21(r13) +/* 80386718 00383678 2C 04 00 20 */ cmpwi r4, 0x20 +/* 8038671C 0038367C 41 82 00 3C */ beq lbl_80386758 +/* 80386720 00383680 3C 60 80 00 */ lis r3, 0x8000 +/* 80386724 00383684 1C 04 00 0C */ mulli r0, r4, 0xc +/* 80386728 00383688 7C 63 24 30 */ srw r3, r3, r4 +/* 8038672C 0038368C 7C A4 18 78 */ andc r4, r5, r3 +/* 80386730 00383690 7C 7F 02 14 */ add r3, r31, r0 +/* 80386734 00383694 90 8D AD 78 */ stw r4, lbl_805A9938@sda21(r13) +/* 80386738 00383698 38 80 00 00 */ li r4, 0 +/* 8038673C 0038369C 38 A0 00 0C */ li r5, 0xc +/* 80386740 003836A0 38 63 00 10 */ addi r3, r3, 0x10 +/* 80386744 003836A4 4B C7 CC 65 */ bl memset +/* 80386748 003836A8 3C 80 80 38 */ lis r4, PADTypeAndStatusCallback@ha +/* 8038674C 003836AC 80 6D 9F 9C */ lwz r3, lbl_805A8B5C@sda21(r13) +/* 80386750 003836B0 38 84 5E FC */ addi r4, r4, PADTypeAndStatusCallback@l +/* 80386754 003836B4 48 03 95 0D */ bl SIGetTypeAsync +lbl_80386758: +/* 80386758 003836B8 7F 63 DB 78 */ mr r3, r27 +/* 8038675C 003836BC 4B FF AF 2D */ bl OSRestoreInterrupts +/* 80386760 003836C0 38 60 00 01 */ li r3, 1 +lbl_80386764: +/* 80386764 003836C4 BB 21 00 1C */ lmw r25, 0x1c(r1) +/* 80386768 003836C8 80 01 00 3C */ lwz r0, 0x3c(r1) +/* 8038676C 003836CC 38 21 00 38 */ addi r1, r1, 0x38 +/* 80386770 003836D0 7C 08 03 A6 */ mtlr r0 +/* 80386774 003836D4 4E 80 00 20 */ blr + +.global PADRead +PADRead: +/* 80386778 003836D8 7C 08 02 A6 */ mflr r0 +/* 8038677C 003836DC 90 01 00 04 */ stw r0, 4(r1) +/* 80386780 003836E0 94 21 FF B0 */ stwu r1, -0x50(r1) +/* 80386784 003836E4 BE 81 00 20 */ stmw r20, 0x20(r1) +/* 80386788 003836E8 7C 7F 1B 78 */ mr r31, r3 +/* 8038678C 003836EC 4B FF AE D5 */ bl OSDisableInterrupts +/* 80386790 003836F0 3A A0 00 00 */ li r21, 0 +/* 80386794 003836F4 1C 15 00 0C */ mulli r0, r21, 0xc +/* 80386798 003836F8 3C 80 80 54 */ lis r4, lbl_80542000@ha +/* 8038679C 003836FC 3B 44 20 00 */ addi r26, r4, lbl_80542000@l +/* 803867A0 00383700 3C 80 80 38 */ lis r4, sub_80385d64@ha +/* 803867A4 00383704 3C A0 80 38 */ lis r5, sub_80386228@ha +/* 803867A8 00383708 3C C0 80 38 */ lis r6, PADTypeAndStatusCallback@ha +/* 803867AC 0038370C 7F 1A 02 14 */ add r24, r26, r0 +/* 803867B0 00383710 3A C3 00 00 */ addi r22, r3, 0 +/* 803867B4 00383714 3B C4 5D 64 */ addi r30, r4, sub_80385d64@l +/* 803867B8 00383718 3B A5 62 28 */ addi r29, r5, sub_80386228@l +/* 803867BC 0038371C 3B 86 5E FC */ addi r28, r6, PADTypeAndStatusCallback@l +/* 803867C0 00383720 3A 80 00 00 */ li r20, 0 +/* 803867C4 00383724 3F 60 80 00 */ lis r27, 0x8000 +lbl_803867C8: +/* 803867C8 00383728 80 0D AD 88 */ lwz r0, lbl_805A9948@sda21(r13) +/* 803867CC 0038372C 7F 77 AC 30 */ srw r23, r27, r21 +/* 803867D0 00383730 7C 00 B8 39 */ and. r0, r0, r23 +/* 803867D4 00383734 41 82 00 D8 */ beq lbl_803868AC +/* 803867D8 00383738 4B FF AE 89 */ bl OSDisableInterrupts +/* 803867DC 0038373C 80 8D AD 80 */ lwz r4, lbl_805A9940@sda21(r13) +/* 803867E0 00383740 38 C0 00 00 */ li r6, 0 +/* 803867E4 00383744 80 0D AD 84 */ lwz r0, lbl_805A9944@sda21(r13) +/* 803867E8 00383748 7C 79 1B 78 */ mr r25, r3 +/* 803867EC 0038374C 80 AD AD 88 */ lwz r5, lbl_805A9948@sda21(r13) +/* 803867F0 00383750 7C 84 03 78 */ or r4, r4, r0 +/* 803867F4 00383754 80 0D AD 78 */ lwz r0, lbl_805A9938@sda21(r13) +/* 803867F8 00383758 7C A7 20 78 */ andc r7, r5, r4 +/* 803867FC 0038375C 80 AD AD 74 */ lwz r5, lbl_805A9934@sda21(r13) +/* 80386800 00383760 7C 04 3B 78 */ or r4, r0, r7 +/* 80386804 00383764 80 0D 9F A8 */ lwz r0, lbl_805A8B68@sda21(r13) +/* 80386808 00383768 90 8D AD 78 */ stw r4, lbl_805A9938@sda21(r13) +/* 8038680C 0038376C 7C A4 38 78 */ andc r4, r5, r7 +/* 80386810 00383770 28 00 00 04 */ cmplwi r0, 4 +/* 80386814 00383774 80 0D AD 78 */ lwz r0, lbl_805A9938@sda21(r13) +/* 80386818 00383778 90 CD AD 88 */ stw r6, lbl_805A9948@sda21(r13) +/* 8038681C 0038377C 7C 03 28 38 */ and r3, r0, r5 +/* 80386820 00383780 90 8D AD 74 */ stw r4, lbl_805A9934@sda21(r13) +/* 80386824 00383784 40 82 00 10 */ bne lbl_80386834 +/* 80386828 00383788 80 0D AD 7C */ lwz r0, lbl_805A993C@sda21(r13) +/* 8038682C 0038378C 7C 00 3B 78 */ or r0, r0, r7 +/* 80386830 00383790 90 0D AD 7C */ stw r0, lbl_805A993C@sda21(r13) +lbl_80386834: +/* 80386834 00383794 48 03 8B D5 */ bl SIDisablePolling +/* 80386838 00383798 80 0D 9F 9C */ lwz r0, lbl_805A8B5C@sda21(r13) +/* 8038683C 0038379C 2C 00 00 20 */ cmpwi r0, 0x20 +/* 80386840 003837A0 40 82 00 48 */ bne lbl_80386888 +/* 80386844 003837A4 80 8D AD 78 */ lwz r4, lbl_805A9938@sda21(r13) +/* 80386848 003837A8 7C 80 00 34 */ cntlzw r0, r4 +/* 8038684C 003837AC 90 0D 9F 9C */ stw r0, lbl_805A8B5C@sda21(r13) +/* 80386850 003837B0 80 6D 9F 9C */ lwz r3, lbl_805A8B5C@sda21(r13) +/* 80386854 003837B4 2C 03 00 20 */ cmpwi r3, 0x20 +/* 80386858 003837B8 41 82 00 30 */ beq lbl_80386888 +/* 8038685C 003837BC 1C 03 00 0C */ mulli r0, r3, 0xc +/* 80386860 003837C0 7F 63 1C 30 */ srw r3, r27, r3 +/* 80386864 003837C4 7C 84 18 78 */ andc r4, r4, r3 +/* 80386868 003837C8 90 8D AD 78 */ stw r4, lbl_805A9938@sda21(r13) +/* 8038686C 003837CC 7C 7A 02 14 */ add r3, r26, r0 +/* 80386870 003837D0 38 80 00 00 */ li r4, 0 +/* 80386874 003837D4 38 A0 00 0C */ li r5, 0xc +/* 80386878 003837D8 4B C7 CB 31 */ bl memset +/* 8038687C 003837DC 80 6D 9F 9C */ lwz r3, lbl_805A8B5C@sda21(r13) +/* 80386880 003837E0 7F 84 E3 78 */ mr r4, r28 +/* 80386884 003837E4 48 03 93 DD */ bl SIGetTypeAsync +lbl_80386888: +/* 80386888 003837E8 7F 23 CB 78 */ mr r3, r25 +/* 8038688C 003837EC 4B FF AD FD */ bl OSRestoreInterrupts +/* 80386890 003837F0 38 00 FF FE */ li r0, -2 +/* 80386894 003837F4 98 1F 00 0A */ stb r0, 0xa(r31) +/* 80386898 003837F8 38 7F 00 00 */ addi r3, r31, 0 +/* 8038689C 003837FC 38 80 00 00 */ li r4, 0 +/* 803868A0 00383800 38 A0 00 0A */ li r5, 0xa +/* 803868A4 00383804 4B C7 CB 05 */ bl memset +/* 803868A8 00383808 48 00 02 48 */ b lbl_80386AF0 +lbl_803868AC: +/* 803868AC 0038380C 80 0D AD 78 */ lwz r0, lbl_805A9938@sda21(r13) +/* 803868B0 00383810 7C 00 B8 39 */ and. r0, r0, r23 +/* 803868B4 00383814 40 82 00 10 */ bne lbl_803868C4 +/* 803868B8 00383818 80 0D 9F 9C */ lwz r0, lbl_805A8B5C@sda21(r13) +/* 803868BC 0038381C 7C 00 A8 00 */ cmpw r0, r21 +/* 803868C0 00383820 40 82 00 20 */ bne lbl_803868E0 +lbl_803868C4: +/* 803868C4 00383824 38 00 FF FE */ li r0, -2 +/* 803868C8 00383828 98 1F 00 0A */ stb r0, 0xa(r31) +/* 803868CC 0038382C 38 7F 00 00 */ addi r3, r31, 0 +/* 803868D0 00383830 38 80 00 00 */ li r4, 0 +/* 803868D4 00383834 38 A0 00 0A */ li r5, 0xa +/* 803868D8 00383838 4B C7 CA D1 */ bl memset +/* 803868DC 0038383C 48 00 02 14 */ b lbl_80386AF0 +lbl_803868E0: +/* 803868E0 00383840 80 0D AD 74 */ lwz r0, lbl_805A9934@sda21(r13) +/* 803868E4 00383844 7C 00 B8 39 */ and. r0, r0, r23 +/* 803868E8 00383848 40 82 00 20 */ bne lbl_80386908 +/* 803868EC 0038384C 38 00 FF FF */ li r0, -1 +/* 803868F0 00383850 98 1F 00 0A */ stb r0, 0xa(r31) +/* 803868F4 00383854 38 7F 00 00 */ addi r3, r31, 0 +/* 803868F8 00383858 38 80 00 00 */ li r4, 0 +/* 803868FC 0038385C 38 A0 00 0A */ li r5, 0xa +/* 80386900 00383860 4B C7 CA A9 */ bl memset +/* 80386904 00383864 48 00 01 EC */ b lbl_80386AF0 +lbl_80386908: +/* 80386908 00383868 7E A3 AB 78 */ mr r3, r21 +/* 8038690C 0038386C 48 03 7D C1 */ bl SIIsChanBusy +/* 80386910 00383870 2C 03 00 00 */ cmpwi r3, 0 +/* 80386914 00383874 41 82 00 20 */ beq lbl_80386934 +/* 80386918 00383878 38 00 FF FD */ li r0, -3 +/* 8038691C 0038387C 98 1F 00 0A */ stb r0, 0xa(r31) +/* 80386920 00383880 38 7F 00 00 */ addi r3, r31, 0 +/* 80386924 00383884 38 80 00 00 */ li r4, 0 +/* 80386928 00383888 38 A0 00 0A */ li r5, 0xa +/* 8038692C 0038388C 4B C7 CA 7D */ bl memset +/* 80386930 00383890 48 00 01 C0 */ b lbl_80386AF0 +lbl_80386934: +/* 80386934 00383894 7E A3 AB 78 */ mr r3, r21 +/* 80386938 00383898 48 03 89 29 */ bl SIGetStatus +/* 8038693C 0038389C 54 60 07 39 */ rlwinm. r0, r3, 0, 0x1c, 0x1c +/* 80386940 003838A0 41 82 00 CC */ beq lbl_80386A0C +/* 80386944 003838A4 38 75 00 00 */ addi r3, r21, 0 +/* 80386948 003838A8 38 81 00 14 */ addi r4, r1, 0x14 +/* 8038694C 003838AC 48 03 8B FD */ bl SIGetResponse +/* 80386950 003838B0 80 0D AD 80 */ lwz r0, lbl_805A9940@sda21(r13) +/* 80386954 003838B4 7C 00 B8 39 */ and. r0, r0, r23 +/* 80386958 003838B8 41 82 00 40 */ beq lbl_80386998 +/* 8038695C 003838BC 38 00 00 00 */ li r0, 0 +/* 80386960 003838C0 98 1F 00 0A */ stb r0, 0xa(r31) +/* 80386964 003838C4 38 7F 00 00 */ addi r3, r31, 0 +/* 80386968 003838C8 38 80 00 00 */ li r4, 0 +/* 8038696C 003838CC 38 A0 00 0A */ li r5, 0xa +/* 80386970 003838D0 4B C7 CA 39 */ bl memset +/* 80386974 003838D4 80 6D AD 84 */ lwz r3, lbl_805A9944@sda21(r13) +/* 80386978 003838D8 7C 60 B8 39 */ and. r0, r3, r23 +/* 8038697C 003838DC 40 82 01 74 */ bne lbl_80386AF0 +/* 80386980 003838E0 7C 60 BB 78 */ or r0, r3, r23 +/* 80386984 003838E4 90 0D AD 84 */ stw r0, lbl_805A9944@sda21(r13) +/* 80386988 003838E8 38 75 00 00 */ addi r3, r21, 0 +/* 8038698C 003838EC 38 9D 00 00 */ addi r4, r29, 0 +/* 80386990 003838F0 48 03 92 D1 */ bl SIGetTypeAsync +/* 80386994 003838F4 48 00 01 5C */ b lbl_80386AF0 +lbl_80386998: +/* 80386998 003838F8 4B FF AC C9 */ bl OSDisableInterrupts +/* 8038699C 003838FC 3B 23 00 00 */ addi r25, r3, 0 +/* 803869A0 00383900 38 77 00 00 */ addi r3, r23, 0 +/* 803869A4 00383904 48 03 8A 65 */ bl SIDisablePolling +/* 803869A8 00383908 80 CD AD 74 */ lwz r6, lbl_805A9934@sda21(r13) +/* 803869AC 0038390C 7E E8 B8 F8 */ nor r8, r23, r23 +/* 803869B0 00383910 80 AD AD 80 */ lwz r5, lbl_805A9940@sda21(r13) +/* 803869B4 00383914 7E A3 AB 78 */ mr r3, r21 +/* 803869B8 00383918 80 8D AD 84 */ lwz r4, lbl_805A9944@sda21(r13) +/* 803869BC 0038391C 80 0D AD 88 */ lwz r0, lbl_805A9948@sda21(r13) +/* 803869C0 00383920 7C C7 40 38 */ and r7, r6, r8 +/* 803869C4 00383924 7C A6 40 38 */ and r6, r5, r8 +/* 803869C8 00383928 90 ED AD 74 */ stw r7, lbl_805A9934@sda21(r13) +/* 803869CC 0038392C 7C 85 40 38 */ and r5, r4, r8 +/* 803869D0 00383930 7C 00 40 38 */ and r0, r0, r8 +/* 803869D4 00383934 90 CD AD 80 */ stw r6, lbl_805A9940@sda21(r13) +/* 803869D8 00383938 38 80 00 00 */ li r4, 0 +/* 803869DC 0038393C 90 AD AD 84 */ stw r5, lbl_805A9944@sda21(r13) +/* 803869E0 00383940 90 0D AD 88 */ stw r0, lbl_805A9948@sda21(r13) +/* 803869E4 00383944 4B FF D9 55 */ bl OSSetWirelessID +/* 803869E8 00383948 7F 23 CB 78 */ mr r3, r25 +/* 803869EC 0038394C 4B FF AC 9D */ bl OSRestoreInterrupts +/* 803869F0 00383950 38 00 FF FF */ li r0, -1 +/* 803869F4 00383954 98 1F 00 0A */ stb r0, 0xa(r31) +/* 803869F8 00383958 38 7F 00 00 */ addi r3, r31, 0 +/* 803869FC 0038395C 38 80 00 00 */ li r4, 0 +/* 80386A00 00383960 38 A0 00 0A */ li r5, 0xa +/* 80386A04 00383964 4B C7 C9 A5 */ bl memset +/* 80386A08 00383968 48 00 00 E8 */ b lbl_80386AF0 +lbl_80386A0C: +/* 80386A0C 0038396C 7E A3 AB 78 */ mr r3, r21 +/* 80386A10 00383970 48 03 90 8D */ bl SIGetType +/* 80386A14 00383974 54 60 00 85 */ rlwinm. r0, r3, 0, 2, 2 +/* 80386A18 00383978 40 82 00 08 */ bne lbl_80386A20 +/* 80386A1C 0038397C 7E 94 BB 78 */ or r20, r20, r23 +lbl_80386A20: +/* 80386A20 00383980 38 75 00 00 */ addi r3, r21, 0 +/* 80386A24 00383984 38 81 00 14 */ addi r4, r1, 0x14 +/* 80386A28 00383988 48 03 8B 21 */ bl SIGetResponse +/* 80386A2C 0038398C 2C 03 00 00 */ cmpwi r3, 0 +/* 80386A30 00383990 40 82 00 20 */ bne lbl_80386A50 +/* 80386A34 00383994 38 00 FF FD */ li r0, -3 +/* 80386A38 00383998 98 1F 00 0A */ stb r0, 0xa(r31) +/* 80386A3C 0038399C 38 7F 00 00 */ addi r3, r31, 0 +/* 80386A40 003839A0 38 80 00 00 */ li r4, 0 +/* 80386A44 003839A4 38 A0 00 0A */ li r5, 0xa +/* 80386A48 003839A8 4B C7 C9 61 */ bl memset +/* 80386A4C 003839AC 48 00 00 A4 */ b lbl_80386AF0 +lbl_80386A50: +/* 80386A50 003839B0 80 01 00 14 */ lwz r0, 0x14(r1) +/* 80386A54 003839B4 54 00 00 01 */ rlwinm. r0, r0, 0, 0, 0 +/* 80386A58 003839B8 41 82 00 20 */ beq lbl_80386A78 +/* 80386A5C 003839BC 38 00 FF FD */ li r0, -3 +/* 80386A60 003839C0 98 1F 00 0A */ stb r0, 0xa(r31) +/* 80386A64 003839C4 38 7F 00 00 */ addi r3, r31, 0 +/* 80386A68 003839C8 38 80 00 00 */ li r4, 0 +/* 80386A6C 003839CC 38 A0 00 0A */ li r5, 0xa +/* 80386A70 003839D0 4B C7 C9 39 */ bl memset +/* 80386A74 003839D4 48 00 00 7C */ b lbl_80386AF0 +lbl_80386A78: +/* 80386A78 003839D8 81 8D 9F AC */ lwz r12, lbl_805A8B6C@sda21(r13) +/* 80386A7C 003839DC 38 75 00 00 */ addi r3, r21, 0 +/* 80386A80 003839E0 38 9F 00 00 */ addi r4, r31, 0 +/* 80386A84 003839E4 7D 88 03 A6 */ mtlr r12 +/* 80386A88 003839E8 38 A1 00 14 */ addi r5, r1, 0x14 +/* 80386A8C 003839EC 4E 80 00 21 */ blrl +/* 80386A90 003839F0 A0 1F 00 00 */ lhz r0, 0(r31) +/* 80386A94 003839F4 54 00 04 A5 */ rlwinm. r0, r0, 0, 0x12, 0x12 +/* 80386A98 003839F8 41 82 00 44 */ beq lbl_80386ADC +/* 80386A9C 003839FC 38 00 FF FD */ li r0, -3 +/* 80386AA0 00383A00 98 1F 00 0A */ stb r0, 0xa(r31) +/* 80386AA4 00383A04 38 7F 00 00 */ addi r3, r31, 0 +/* 80386AA8 00383A08 38 80 00 00 */ li r4, 0 +/* 80386AAC 00383A0C 38 A0 00 0A */ li r5, 0xa +/* 80386AB0 00383A10 4B C7 C8 F9 */ bl memset +/* 80386AB4 00383A14 38 75 00 00 */ addi r3, r21, 0 +/* 80386AB8 00383A18 38 D8 00 00 */ addi r6, r24, 0 +/* 80386ABC 00383A1C 39 1E 00 00 */ addi r8, r30, 0 +/* 80386AC0 00383A20 38 8D 9F B0 */ addi r4, r13, lbl_805A8B70@sda21 +/* 80386AC4 00383A24 38 A0 00 01 */ li r5, 1 +/* 80386AC8 00383A28 38 E0 00 0A */ li r7, 0xa +/* 80386ACC 00383A2C 39 40 00 00 */ li r10, 0 +/* 80386AD0 00383A30 39 20 00 00 */ li r9, 0 +/* 80386AD4 00383A34 48 03 8B C5 */ bl SITransfer +/* 80386AD8 00383A38 48 00 00 18 */ b lbl_80386AF0 +lbl_80386ADC: +/* 80386ADC 00383A3C 38 00 00 00 */ li r0, 0 +/* 80386AE0 00383A40 98 1F 00 0A */ stb r0, 0xa(r31) +/* 80386AE4 00383A44 A0 1F 00 00 */ lhz r0, 0(r31) +/* 80386AE8 00383A48 54 00 06 6E */ rlwinm r0, r0, 0, 0x19, 0x17 +/* 80386AEC 00383A4C B0 1F 00 00 */ sth r0, 0(r31) +lbl_80386AF0: +/* 80386AF0 00383A50 3A B5 00 01 */ addi r21, r21, 1 +/* 80386AF4 00383A54 2C 15 00 04 */ cmpwi r21, 4 +/* 80386AF8 00383A58 3B 18 00 0C */ addi r24, r24, 0xc +/* 80386AFC 00383A5C 3B FF 00 0C */ addi r31, r31, 0xc +/* 80386B00 00383A60 41 80 FC C8 */ blt lbl_803867C8 +/* 80386B04 00383A64 7E C3 B3 78 */ mr r3, r22 +/* 80386B08 00383A68 4B FF AB 81 */ bl OSRestoreInterrupts +/* 80386B0C 00383A6C 7E 83 A3 78 */ mr r3, r20 +/* 80386B10 00383A70 BA 81 00 20 */ lmw r20, 0x20(r1) +/* 80386B14 00383A74 80 01 00 54 */ lwz r0, 0x54(r1) +/* 80386B18 00383A78 38 21 00 50 */ addi r1, r1, 0x50 +/* 80386B1C 00383A7C 7C 08 03 A6 */ mtlr r0 +/* 80386B20 00383A80 4E 80 00 20 */ blr + +.global PADControlAllMotors +PADControlAllMotors: +/* 80386B24 00383A84 7C 08 02 A6 */ mflr r0 +/* 80386B28 00383A88 90 01 00 04 */ stw r0, 4(r1) +/* 80386B2C 00383A8C 94 21 FF D8 */ stwu r1, -0x28(r1) +/* 80386B30 00383A90 BF 61 00 14 */ stmw r27, 0x14(r1) +/* 80386B34 00383A94 7C 7B 1B 78 */ mr r27, r3 +/* 80386B38 00383A98 4B FF AB 29 */ bl OSDisableInterrupts +/* 80386B3C 00383A9C 3B C3 00 00 */ addi r30, r3, 0 +/* 80386B40 00383AA0 3B 80 00 00 */ li r28, 0 +/* 80386B44 00383AA4 3B A0 00 00 */ li r29, 0 +/* 80386B48 00383AA8 3F E0 80 00 */ lis r31, 0x8000 +lbl_80386B4C: +/* 80386B4C 00383AAC 80 6D AD 74 */ lwz r3, lbl_805A9934@sda21(r13) +/* 80386B50 00383AB0 7F E0 EC 30 */ srw r0, r31, r29 +/* 80386B54 00383AB4 7C 60 00 39 */ and. r0, r3, r0 +/* 80386B58 00383AB8 41 82 00 4C */ beq lbl_80386BA4 +/* 80386B5C 00383ABC 7F A3 EB 78 */ mr r3, r29 +/* 80386B60 00383AC0 48 03 8F 3D */ bl SIGetType +/* 80386B64 00383AC4 54 60 00 85 */ rlwinm. r0, r3, 0, 2, 2 +/* 80386B68 00383AC8 40 82 00 3C */ bne lbl_80386BA4 +/* 80386B6C 00383ACC 80 0D 9F A8 */ lwz r0, lbl_805A8B68@sda21(r13) +/* 80386B70 00383AD0 80 7B 00 00 */ lwz r3, 0(r27) +/* 80386B74 00383AD4 28 00 00 02 */ cmplwi r0, 2 +/* 80386B78 00383AD8 40 80 00 10 */ bge lbl_80386B88 +/* 80386B7C 00383ADC 28 03 00 02 */ cmplwi r3, 2 +/* 80386B80 00383AE0 40 82 00 08 */ bne lbl_80386B88 +/* 80386B84 00383AE4 38 60 00 00 */ li r3, 0 +lbl_80386B88: +/* 80386B88 00383AE8 80 8D 9F A4 */ lwz r4, lbl_805A8B64@sda21(r13) +/* 80386B8C 00383AEC 54 60 07 BE */ clrlwi r0, r3, 0x1e +/* 80386B90 00383AF0 38 7D 00 00 */ addi r3, r29, 0 +/* 80386B94 00383AF4 64 84 00 40 */ oris r4, r4, 0x40 +/* 80386B98 00383AF8 7C 84 03 78 */ or r4, r4, r0 +/* 80386B9C 00383AFC 48 03 87 41 */ bl SISetCommand +/* 80386BA0 00383B00 3B 80 00 01 */ li r28, 1 +lbl_80386BA4: +/* 80386BA4 00383B04 3B BD 00 01 */ addi r29, r29, 1 +/* 80386BA8 00383B08 2C 1D 00 04 */ cmpwi r29, 4 +/* 80386BAC 00383B0C 3B 7B 00 04 */ addi r27, r27, 4 +/* 80386BB0 00383B10 41 80 FF 9C */ blt lbl_80386B4C +/* 80386BB4 00383B14 2C 1C 00 00 */ cmpwi r28, 0 +/* 80386BB8 00383B18 41 82 00 08 */ beq lbl_80386BC0 +/* 80386BBC 00383B1C 48 03 87 35 */ bl SITransferCommands +lbl_80386BC0: +/* 80386BC0 00383B20 7F C3 F3 78 */ mr r3, r30 +/* 80386BC4 00383B24 4B FF AA C5 */ bl OSRestoreInterrupts +/* 80386BC8 00383B28 BB 61 00 14 */ lmw r27, 0x14(r1) +/* 80386BCC 00383B2C 80 01 00 2C */ lwz r0, 0x2c(r1) +/* 80386BD0 00383B30 38 21 00 28 */ addi r1, r1, 0x28 +/* 80386BD4 00383B34 7C 08 03 A6 */ mtlr r0 +/* 80386BD8 00383B38 4E 80 00 20 */ blr + +.global sub_80386bdc +sub_80386bdc: +/* 80386BDC 00383B3C 7C 08 02 A6 */ mflr r0 +/* 80386BE0 00383B40 90 01 00 04 */ stw r0, 4(r1) +/* 80386BE4 00383B44 94 21 FF D8 */ stwu r1, -0x28(r1) +/* 80386BE8 00383B48 93 E1 00 24 */ stw r31, 0x24(r1) +/* 80386BEC 00383B4C 93 C1 00 20 */ stw r30, 0x20(r1) +/* 80386BF0 00383B50 3B C4 00 00 */ addi r30, r4, 0 +/* 80386BF4 00383B54 93 A1 00 1C */ stw r29, 0x1c(r1) +/* 80386BF8 00383B58 3B A3 00 00 */ addi r29, r3, 0 +/* 80386BFC 00383B5C 4B FF AA 65 */ bl OSDisableInterrupts +/* 80386C00 00383B60 3C 00 80 00 */ lis r0, 0x8000 +/* 80386C04 00383B64 80 8D AD 74 */ lwz r4, lbl_805A9934@sda21(r13) +/* 80386C08 00383B68 7C 00 EC 30 */ srw r0, r0, r29 +/* 80386C0C 00383B6C 7C 80 00 39 */ and. r0, r4, r0 +/* 80386C10 00383B70 3B E3 00 00 */ addi r31, r3, 0 +/* 80386C14 00383B74 41 82 00 48 */ beq lbl_80386C5C +/* 80386C18 00383B78 7F A3 EB 78 */ mr r3, r29 +/* 80386C1C 00383B7C 48 03 8E 81 */ bl SIGetType +/* 80386C20 00383B80 54 60 00 85 */ rlwinm. r0, r3, 0, 2, 2 +/* 80386C24 00383B84 40 82 00 38 */ bne lbl_80386C5C +/* 80386C28 00383B88 80 0D 9F A8 */ lwz r0, lbl_805A8B68@sda21(r13) +/* 80386C2C 00383B8C 28 00 00 02 */ cmplwi r0, 2 +/* 80386C30 00383B90 40 80 00 10 */ bge lbl_80386C40 +/* 80386C34 00383B94 28 1E 00 02 */ cmplwi r30, 2 +/* 80386C38 00383B98 40 82 00 08 */ bne lbl_80386C40 +/* 80386C3C 00383B9C 3B C0 00 00 */ li r30, 0 +lbl_80386C40: +/* 80386C40 00383BA0 80 8D 9F A4 */ lwz r4, lbl_805A8B64@sda21(r13) +/* 80386C44 00383BA4 57 C0 07 BE */ clrlwi r0, r30, 0x1e +/* 80386C48 00383BA8 38 7D 00 00 */ addi r3, r29, 0 +/* 80386C4C 00383BAC 64 84 00 40 */ oris r4, r4, 0x40 +/* 80386C50 00383BB0 7C 84 03 78 */ or r4, r4, r0 +/* 80386C54 00383BB4 48 03 86 89 */ bl SISetCommand +/* 80386C58 00383BB8 48 03 86 99 */ bl SITransferCommands +lbl_80386C5C: +/* 80386C5C 00383BBC 7F E3 FB 78 */ mr r3, r31 +/* 80386C60 00383BC0 4B FF AA 29 */ bl OSRestoreInterrupts +/* 80386C64 00383BC4 80 01 00 2C */ lwz r0, 0x2c(r1) +/* 80386C68 00383BC8 83 E1 00 24 */ lwz r31, 0x24(r1) +/* 80386C6C 00383BCC 83 C1 00 20 */ lwz r30, 0x20(r1) +/* 80386C70 00383BD0 83 A1 00 1C */ lwz r29, 0x1c(r1) +/* 80386C74 00383BD4 38 21 00 28 */ addi r1, r1, 0x28 +/* 80386C78 00383BD8 7C 08 03 A6 */ mtlr r0 +/* 80386C7C 00383BDC 4E 80 00 20 */ blr + +.global PADSetSpec +PADSetSpec: +/* 80386C80 00383BE0 38 00 00 00 */ li r0, 0 +/* 80386C84 00383BE4 2C 03 00 01 */ cmpwi r3, 1 +/* 80386C88 00383BE8 90 0D AD 94 */ stw r0, lbl_805A9954@sda21(r13) +/* 80386C8C 00383BEC 41 82 00 30 */ beq lbl_80386CBC +/* 80386C90 00383BF0 40 80 00 10 */ bge lbl_80386CA0 +/* 80386C94 00383BF4 2C 03 00 00 */ cmpwi r3, 0 +/* 80386C98 00383BF8 40 80 00 14 */ bge lbl_80386CAC +/* 80386C9C 00383BFC 48 00 00 3C */ b lbl_80386CD8 +lbl_80386CA0: +/* 80386CA0 00383C00 2C 03 00 06 */ cmpwi r3, 6 +/* 80386CA4 00383C04 40 80 00 34 */ bge lbl_80386CD8 +/* 80386CA8 00383C08 48 00 00 24 */ b lbl_80386CCC +lbl_80386CAC: +/* 80386CAC 00383C0C 3C 80 80 38 */ lis r4, sub_80386ce0@ha +/* 80386CB0 00383C10 38 04 6C E0 */ addi r0, r4, sub_80386ce0@l +/* 80386CB4 00383C14 90 0D 9F AC */ stw r0, lbl_805A8B6C@sda21(r13) +/* 80386CB8 00383C18 48 00 00 20 */ b lbl_80386CD8 +lbl_80386CBC: +/* 80386CBC 00383C1C 3C 80 80 38 */ lis r4, SPEC0_MakeStatus@ha +/* 80386CC0 00383C20 38 04 6E 54 */ addi r0, r4, SPEC0_MakeStatus@l +/* 80386CC4 00383C24 90 0D 9F AC */ stw r0, lbl_805A8B6C@sda21(r13) +/* 80386CC8 00383C28 48 00 00 10 */ b lbl_80386CD8 +lbl_80386CCC: +/* 80386CCC 00383C2C 3C 80 80 38 */ lis r4, sub_80386fc8@ha +/* 80386CD0 00383C30 38 04 6F C8 */ addi r0, r4, sub_80386fc8@l +/* 80386CD4 00383C34 90 0D 9F AC */ stw r0, lbl_805A8B6C@sda21(r13) +lbl_80386CD8: +/* 80386CD8 00383C38 90 6D 9F A8 */ stw r3, lbl_805A8B68@sda21(r13) +/* 80386CDC 00383C3C 4E 80 00 20 */ blr + +.global sub_80386ce0 +sub_80386ce0: +/* 80386CE0 00383C40 38 60 00 00 */ li r3, 0 +/* 80386CE4 00383C44 B0 64 00 00 */ sth r3, 0(r4) +/* 80386CE8 00383C48 80 05 00 00 */ lwz r0, 0(r5) +/* 80386CEC 00383C4C 54 00 87 39 */ rlwinm. r0, r0, 0x10, 0x1c, 0x1c +/* 80386CF0 00383C50 41 82 00 08 */ beq lbl_80386CF8 +/* 80386CF4 00383C54 38 60 01 00 */ li r3, 0x100 +lbl_80386CF8: +/* 80386CF8 00383C58 A0 04 00 00 */ lhz r0, 0(r4) +/* 80386CFC 00383C5C 7C 00 1B 78 */ or r0, r0, r3 +/* 80386D00 00383C60 B0 04 00 00 */ sth r0, 0(r4) +/* 80386D04 00383C64 80 05 00 00 */ lwz r0, 0(r5) +/* 80386D08 00383C68 54 00 86 B5 */ rlwinm. r0, r0, 0x10, 0x1a, 0x1a +/* 80386D0C 00383C6C 41 82 00 0C */ beq lbl_80386D18 +/* 80386D10 00383C70 38 60 02 00 */ li r3, 0x200 +/* 80386D14 00383C74 48 00 00 08 */ b lbl_80386D1C +lbl_80386D18: +/* 80386D18 00383C78 38 60 00 00 */ li r3, 0 +lbl_80386D1C: +/* 80386D1C 00383C7C A0 04 00 00 */ lhz r0, 0(r4) +/* 80386D20 00383C80 7C 00 1B 78 */ or r0, r0, r3 +/* 80386D24 00383C84 B0 04 00 00 */ sth r0, 0(r4) +/* 80386D28 00383C88 80 05 00 00 */ lwz r0, 0(r5) +/* 80386D2C 00383C8C 54 00 85 EF */ rlwinm. r0, r0, 0x10, 0x17, 0x17 +/* 80386D30 00383C90 41 82 00 0C */ beq lbl_80386D3C +/* 80386D34 00383C94 38 60 04 00 */ li r3, 0x400 +/* 80386D38 00383C98 48 00 00 08 */ b lbl_80386D40 +lbl_80386D3C: +/* 80386D3C 00383C9C 38 60 00 00 */ li r3, 0 +lbl_80386D40: +/* 80386D40 00383CA0 A0 04 00 00 */ lhz r0, 0(r4) +/* 80386D44 00383CA4 7C 00 1B 78 */ or r0, r0, r3 +/* 80386D48 00383CA8 B0 04 00 00 */ sth r0, 0(r4) +/* 80386D4C 00383CAC 80 05 00 00 */ lwz r0, 0(r5) +/* 80386D50 00383CB0 54 00 87 FF */ rlwinm. r0, r0, 0x10, 0x1f, 0x1f +/* 80386D54 00383CB4 41 82 00 0C */ beq lbl_80386D60 +/* 80386D58 00383CB8 38 60 08 00 */ li r3, 0x800 +/* 80386D5C 00383CBC 48 00 00 08 */ b lbl_80386D64 +lbl_80386D60: +/* 80386D60 00383CC0 38 60 00 00 */ li r3, 0 +lbl_80386D64: +/* 80386D64 00383CC4 A0 04 00 00 */ lhz r0, 0(r4) +/* 80386D68 00383CC8 7C 00 1B 78 */ or r0, r0, r3 +/* 80386D6C 00383CCC B0 04 00 00 */ sth r0, 0(r4) +/* 80386D70 00383CD0 80 05 00 00 */ lwz r0, 0(r5) +/* 80386D74 00383CD4 54 00 86 F7 */ rlwinm. r0, r0, 0x10, 0x1b, 0x1b +/* 80386D78 00383CD8 41 82 00 0C */ beq lbl_80386D84 +/* 80386D7C 00383CDC 38 C0 10 00 */ li r6, 0x1000 +/* 80386D80 00383CE0 48 00 00 08 */ b lbl_80386D88 +lbl_80386D84: +/* 80386D84 00383CE4 38 C0 00 00 */ li r6, 0 +lbl_80386D88: +/* 80386D88 00383CE8 A0 64 00 00 */ lhz r3, 0(r4) +/* 80386D8C 00383CEC 38 00 00 00 */ li r0, 0 +/* 80386D90 00383CF0 7C 63 33 78 */ or r3, r3, r6 +/* 80386D94 00383CF4 B0 64 00 00 */ sth r3, 0(r4) +/* 80386D98 00383CF8 80 65 00 04 */ lwz r3, 4(r5) +/* 80386D9C 00383CFC 54 63 84 3E */ srwi r3, r3, 0x10 +/* 80386DA0 00383D00 7C 63 07 74 */ extsb r3, r3 +/* 80386DA4 00383D04 98 64 00 02 */ stb r3, 2(r4) +/* 80386DA8 00383D08 80 65 00 04 */ lwz r3, 4(r5) +/* 80386DAC 00383D0C 54 63 46 3E */ srwi r3, r3, 0x18 +/* 80386DB0 00383D10 7C 63 07 74 */ extsb r3, r3 +/* 80386DB4 00383D14 98 64 00 03 */ stb r3, 3(r4) +/* 80386DB8 00383D18 80 65 00 04 */ lwz r3, 4(r5) +/* 80386DBC 00383D1C 7C 63 07 74 */ extsb r3, r3 +/* 80386DC0 00383D20 98 64 00 04 */ stb r3, 4(r4) +/* 80386DC4 00383D24 80 65 00 04 */ lwz r3, 4(r5) +/* 80386DC8 00383D28 54 63 C2 3E */ srwi r3, r3, 8 +/* 80386DCC 00383D2C 7C 63 07 74 */ extsb r3, r3 +/* 80386DD0 00383D30 98 64 00 05 */ stb r3, 5(r4) +/* 80386DD4 00383D34 80 65 00 00 */ lwz r3, 0(r5) +/* 80386DD8 00383D38 54 63 C6 3E */ rlwinm r3, r3, 0x18, 0x18, 0x1f +/* 80386DDC 00383D3C 98 64 00 06 */ stb r3, 6(r4) +/* 80386DE0 00383D40 80 65 00 00 */ lwz r3, 0(r5) +/* 80386DE4 00383D44 98 64 00 07 */ stb r3, 7(r4) +/* 80386DE8 00383D48 98 04 00 08 */ stb r0, 8(r4) +/* 80386DEC 00383D4C 98 04 00 09 */ stb r0, 9(r4) +/* 80386DF0 00383D50 88 04 00 06 */ lbz r0, 6(r4) +/* 80386DF4 00383D54 28 00 00 AA */ cmplwi r0, 0xaa +/* 80386DF8 00383D58 41 80 00 10 */ blt lbl_80386E08 +/* 80386DFC 00383D5C A0 04 00 00 */ lhz r0, 0(r4) +/* 80386E00 00383D60 60 00 00 40 */ ori r0, r0, 0x40 +/* 80386E04 00383D64 B0 04 00 00 */ sth r0, 0(r4) +lbl_80386E08: +/* 80386E08 00383D68 88 04 00 07 */ lbz r0, 7(r4) +/* 80386E0C 00383D6C 28 00 00 AA */ cmplwi r0, 0xaa +/* 80386E10 00383D70 41 80 00 10 */ blt lbl_80386E20 +/* 80386E14 00383D74 A0 04 00 00 */ lhz r0, 0(r4) +/* 80386E18 00383D78 60 00 00 20 */ ori r0, r0, 0x20 +/* 80386E1C 00383D7C B0 04 00 00 */ sth r0, 0(r4) +lbl_80386E20: +/* 80386E20 00383D80 88 64 00 02 */ lbz r3, 2(r4) +/* 80386E24 00383D84 38 03 FF 80 */ addi r0, r3, -128 +/* 80386E28 00383D88 98 04 00 02 */ stb r0, 2(r4) +/* 80386E2C 00383D8C 88 64 00 03 */ lbz r3, 3(r4) +/* 80386E30 00383D90 38 03 FF 80 */ addi r0, r3, -128 +/* 80386E34 00383D94 98 04 00 03 */ stb r0, 3(r4) +/* 80386E38 00383D98 88 64 00 04 */ lbz r3, 4(r4) +/* 80386E3C 00383D9C 38 03 FF 80 */ addi r0, r3, -128 +/* 80386E40 00383DA0 98 04 00 04 */ stb r0, 4(r4) +/* 80386E44 00383DA4 88 64 00 05 */ lbz r3, 5(r4) +/* 80386E48 00383DA8 38 03 FF 80 */ addi r0, r3, -128 +/* 80386E4C 00383DAC 98 04 00 05 */ stb r0, 5(r4) +/* 80386E50 00383DB0 4E 80 00 20 */ blr + +.global SPEC0_MakeStatus +SPEC0_MakeStatus: +/* 80386E54 00383DB4 38 60 00 00 */ li r3, 0 +/* 80386E58 00383DB8 B0 64 00 00 */ sth r3, 0(r4) +/* 80386E5C 00383DBC 80 05 00 00 */ lwz r0, 0(r5) +/* 80386E60 00383DC0 54 00 86 31 */ rlwinm. r0, r0, 0x10, 0x18, 0x18 +/* 80386E64 00383DC4 41 82 00 08 */ beq lbl_80386E6C +/* 80386E68 00383DC8 38 60 01 00 */ li r3, 0x100 +lbl_80386E6C: +/* 80386E6C 00383DCC A0 04 00 00 */ lhz r0, 0(r4) +/* 80386E70 00383DD0 7C 00 1B 78 */ or r0, r0, r3 +/* 80386E74 00383DD4 B0 04 00 00 */ sth r0, 0(r4) +/* 80386E78 00383DD8 80 05 00 00 */ lwz r0, 0(r5) +/* 80386E7C 00383DDC 54 00 85 EF */ rlwinm. r0, r0, 0x10, 0x17, 0x17 +/* 80386E80 00383DE0 41 82 00 0C */ beq lbl_80386E8C +/* 80386E84 00383DE4 38 60 02 00 */ li r3, 0x200 +/* 80386E88 00383DE8 48 00 00 08 */ b lbl_80386E90 +lbl_80386E8C: +/* 80386E8C 00383DEC 38 60 00 00 */ li r3, 0 +lbl_80386E90: +/* 80386E90 00383DF0 A0 04 00 00 */ lhz r0, 0(r4) +/* 80386E94 00383DF4 7C 00 1B 78 */ or r0, r0, r3 +/* 80386E98 00383DF8 B0 04 00 00 */ sth r0, 0(r4) +/* 80386E9C 00383DFC 80 05 00 00 */ lwz r0, 0(r5) +/* 80386EA0 00383E00 54 00 86 B5 */ rlwinm. r0, r0, 0x10, 0x1a, 0x1a +/* 80386EA4 00383E04 41 82 00 0C */ beq lbl_80386EB0 +/* 80386EA8 00383E08 38 60 04 00 */ li r3, 0x400 +/* 80386EAC 00383E0C 48 00 00 08 */ b lbl_80386EB4 +lbl_80386EB0: +/* 80386EB0 00383E10 38 60 00 00 */ li r3, 0 +lbl_80386EB4: +/* 80386EB4 00383E14 A0 04 00 00 */ lhz r0, 0(r4) +/* 80386EB8 00383E18 7C 00 1B 78 */ or r0, r0, r3 +/* 80386EBC 00383E1C B0 04 00 00 */ sth r0, 0(r4) +/* 80386EC0 00383E20 80 05 00 00 */ lwz r0, 0(r5) +/* 80386EC4 00383E24 54 00 86 F7 */ rlwinm. r0, r0, 0x10, 0x1b, 0x1b +/* 80386EC8 00383E28 41 82 00 0C */ beq lbl_80386ED4 +/* 80386ECC 00383E2C 38 60 08 00 */ li r3, 0x800 +/* 80386ED0 00383E30 48 00 00 08 */ b lbl_80386ED8 +lbl_80386ED4: +/* 80386ED4 00383E34 38 60 00 00 */ li r3, 0 +lbl_80386ED8: +/* 80386ED8 00383E38 A0 04 00 00 */ lhz r0, 0(r4) +/* 80386EDC 00383E3C 7C 00 1B 78 */ or r0, r0, r3 +/* 80386EE0 00383E40 B0 04 00 00 */ sth r0, 0(r4) +/* 80386EE4 00383E44 80 05 00 00 */ lwz r0, 0(r5) +/* 80386EE8 00383E48 54 00 85 AD */ rlwinm. r0, r0, 0x10, 0x16, 0x16 +/* 80386EEC 00383E4C 41 82 00 0C */ beq lbl_80386EF8 +/* 80386EF0 00383E50 38 C0 10 00 */ li r6, 0x1000 +/* 80386EF4 00383E54 48 00 00 08 */ b lbl_80386EFC +lbl_80386EF8: +/* 80386EF8 00383E58 38 C0 00 00 */ li r6, 0 +lbl_80386EFC: +/* 80386EFC 00383E5C A0 64 00 00 */ lhz r3, 0(r4) +/* 80386F00 00383E60 38 00 00 00 */ li r0, 0 +/* 80386F04 00383E64 7C 63 33 78 */ or r3, r3, r6 +/* 80386F08 00383E68 B0 64 00 00 */ sth r3, 0(r4) +/* 80386F0C 00383E6C 80 65 00 04 */ lwz r3, 4(r5) +/* 80386F10 00383E70 54 63 84 3E */ srwi r3, r3, 0x10 +/* 80386F14 00383E74 7C 63 07 74 */ extsb r3, r3 +/* 80386F18 00383E78 98 64 00 02 */ stb r3, 2(r4) +/* 80386F1C 00383E7C 80 65 00 04 */ lwz r3, 4(r5) +/* 80386F20 00383E80 54 63 46 3E */ srwi r3, r3, 0x18 +/* 80386F24 00383E84 7C 63 07 74 */ extsb r3, r3 +/* 80386F28 00383E88 98 64 00 03 */ stb r3, 3(r4) +/* 80386F2C 00383E8C 80 65 00 04 */ lwz r3, 4(r5) +/* 80386F30 00383E90 7C 63 07 74 */ extsb r3, r3 +/* 80386F34 00383E94 98 64 00 04 */ stb r3, 4(r4) +/* 80386F38 00383E98 80 65 00 04 */ lwz r3, 4(r5) +/* 80386F3C 00383E9C 54 63 C2 3E */ srwi r3, r3, 8 +/* 80386F40 00383EA0 7C 63 07 74 */ extsb r3, r3 +/* 80386F44 00383EA4 98 64 00 05 */ stb r3, 5(r4) +/* 80386F48 00383EA8 80 65 00 00 */ lwz r3, 0(r5) +/* 80386F4C 00383EAC 54 63 C6 3E */ rlwinm r3, r3, 0x18, 0x18, 0x1f +/* 80386F50 00383EB0 98 64 00 06 */ stb r3, 6(r4) +/* 80386F54 00383EB4 80 65 00 00 */ lwz r3, 0(r5) +/* 80386F58 00383EB8 98 64 00 07 */ stb r3, 7(r4) +/* 80386F5C 00383EBC 98 04 00 08 */ stb r0, 8(r4) +/* 80386F60 00383EC0 98 04 00 09 */ stb r0, 9(r4) +/* 80386F64 00383EC4 88 04 00 06 */ lbz r0, 6(r4) +/* 80386F68 00383EC8 28 00 00 AA */ cmplwi r0, 0xaa +/* 80386F6C 00383ECC 41 80 00 10 */ blt lbl_80386F7C +/* 80386F70 00383ED0 A0 04 00 00 */ lhz r0, 0(r4) +/* 80386F74 00383ED4 60 00 00 40 */ ori r0, r0, 0x40 +/* 80386F78 00383ED8 B0 04 00 00 */ sth r0, 0(r4) +lbl_80386F7C: +/* 80386F7C 00383EDC 88 04 00 07 */ lbz r0, 7(r4) +/* 80386F80 00383EE0 28 00 00 AA */ cmplwi r0, 0xaa +/* 80386F84 00383EE4 41 80 00 10 */ blt lbl_80386F94 +/* 80386F88 00383EE8 A0 04 00 00 */ lhz r0, 0(r4) +/* 80386F8C 00383EEC 60 00 00 20 */ ori r0, r0, 0x20 +/* 80386F90 00383EF0 B0 04 00 00 */ sth r0, 0(r4) +lbl_80386F94: +/* 80386F94 00383EF4 88 64 00 02 */ lbz r3, 2(r4) +/* 80386F98 00383EF8 38 03 FF 80 */ addi r0, r3, -128 +/* 80386F9C 00383EFC 98 04 00 02 */ stb r0, 2(r4) +/* 80386FA0 00383F00 88 64 00 03 */ lbz r3, 3(r4) +/* 80386FA4 00383F04 38 03 FF 80 */ addi r0, r3, -128 +/* 80386FA8 00383F08 98 04 00 03 */ stb r0, 3(r4) +/* 80386FAC 00383F0C 88 64 00 04 */ lbz r3, 4(r4) +/* 80386FB0 00383F10 38 03 FF 80 */ addi r0, r3, -128 +/* 80386FB4 00383F14 98 04 00 04 */ stb r0, 4(r4) +/* 80386FB8 00383F18 88 64 00 05 */ lbz r3, 5(r4) +/* 80386FBC 00383F1C 38 03 FF 80 */ addi r0, r3, -128 +/* 80386FC0 00383F20 98 04 00 05 */ stb r0, 5(r4) +/* 80386FC4 00383F24 4E 80 00 20 */ blr + +.global sub_80386fc8 +sub_80386fc8: +/* 80386FC8 00383F28 80 05 00 00 */ lwz r0, 0(r5) +/* 80386FCC 00383F2C 54 00 84 BE */ rlwinm r0, r0, 0x10, 0x12, 0x1f +/* 80386FD0 00383F30 B0 04 00 00 */ sth r0, 0(r4) +/* 80386FD4 00383F34 80 05 00 00 */ lwz r0, 0(r5) +/* 80386FD8 00383F38 54 00 C2 3E */ srwi r0, r0, 8 +/* 80386FDC 00383F3C 7C 00 07 74 */ extsb r0, r0 +/* 80386FE0 00383F40 98 04 00 02 */ stb r0, 2(r4) +/* 80386FE4 00383F44 80 05 00 00 */ lwz r0, 0(r5) +/* 80386FE8 00383F48 7C 00 07 74 */ extsb r0, r0 +/* 80386FEC 00383F4C 98 04 00 03 */ stb r0, 3(r4) +/* 80386FF0 00383F50 80 0D 9F A4 */ lwz r0, lbl_805A8B64@sda21(r13) +/* 80386FF4 00383F54 54 00 05 6E */ rlwinm r0, r0, 0, 0x15, 0x17 +/* 80386FF8 00383F58 2C 00 04 00 */ cmpwi r0, 0x400 +/* 80386FFC 00383F5C 41 82 01 98 */ beq lbl_80387194 +/* 80387000 00383F60 40 80 00 34 */ bge lbl_80387034 +/* 80387004 00383F64 2C 00 02 00 */ cmpwi r0, 0x200 +/* 80387008 00383F68 41 82 00 F8 */ beq lbl_80387100 +/* 8038700C 00383F6C 40 80 00 1C */ bge lbl_80387028 +/* 80387010 00383F70 2C 00 01 00 */ cmpwi r0, 0x100 +/* 80387014 00383F74 41 82 00 98 */ beq lbl_803870AC +/* 80387018 00383F78 40 80 01 BC */ bge lbl_803871D4 +/* 8038701C 00383F7C 2C 00 00 00 */ cmpwi r0, 0 +/* 80387020 00383F80 41 82 00 38 */ beq lbl_80387058 +/* 80387024 00383F84 48 00 01 B0 */ b lbl_803871D4 +lbl_80387028: +/* 80387028 00383F88 2C 00 03 00 */ cmpwi r0, 0x300 +/* 8038702C 00383F8C 41 82 01 24 */ beq lbl_80387150 +/* 80387030 00383F90 48 00 01 A4 */ b lbl_803871D4 +lbl_80387034: +/* 80387034 00383F94 2C 00 06 00 */ cmpwi r0, 0x600 +/* 80387038 00383F98 41 82 00 20 */ beq lbl_80387058 +/* 8038703C 00383F9C 40 80 00 10 */ bge lbl_8038704C +/* 80387040 00383FA0 2C 00 05 00 */ cmpwi r0, 0x500 +/* 80387044 00383FA4 41 82 00 14 */ beq lbl_80387058 +/* 80387048 00383FA8 48 00 01 8C */ b lbl_803871D4 +lbl_8038704C: +/* 8038704C 00383FAC 2C 00 07 00 */ cmpwi r0, 0x700 +/* 80387050 00383FB0 41 82 00 08 */ beq lbl_80387058 +/* 80387054 00383FB4 48 00 01 80 */ b lbl_803871D4 +lbl_80387058: +/* 80387058 00383FB8 80 05 00 04 */ lwz r0, 4(r5) +/* 8038705C 00383FBC 54 00 46 3E */ srwi r0, r0, 0x18 +/* 80387060 00383FC0 7C 00 07 74 */ extsb r0, r0 +/* 80387064 00383FC4 98 04 00 04 */ stb r0, 4(r4) +/* 80387068 00383FC8 80 05 00 04 */ lwz r0, 4(r5) +/* 8038706C 00383FCC 54 00 84 3E */ srwi r0, r0, 0x10 +/* 80387070 00383FD0 7C 00 07 74 */ extsb r0, r0 +/* 80387074 00383FD4 98 04 00 05 */ stb r0, 5(r4) +/* 80387078 00383FD8 80 05 00 04 */ lwz r0, 4(r5) +/* 8038707C 00383FDC 54 00 C6 36 */ rlwinm r0, r0, 0x18, 0x18, 0x1b +/* 80387080 00383FE0 98 04 00 06 */ stb r0, 6(r4) +/* 80387084 00383FE4 80 05 00 04 */ lwz r0, 4(r5) +/* 80387088 00383FE8 54 00 E6 36 */ rlwinm r0, r0, 0x1c, 0x18, 0x1b +/* 8038708C 00383FEC 98 04 00 07 */ stb r0, 7(r4) +/* 80387090 00383FF0 80 05 00 04 */ lwz r0, 4(r5) +/* 80387094 00383FF4 54 00 06 36 */ rlwinm r0, r0, 0, 0x18, 0x1b +/* 80387098 00383FF8 98 04 00 08 */ stb r0, 8(r4) +/* 8038709C 00383FFC 80 05 00 04 */ lwz r0, 4(r5) +/* 803870A0 00384000 54 00 26 36 */ rlwinm r0, r0, 4, 0x18, 0x1b +/* 803870A4 00384004 98 04 00 09 */ stb r0, 9(r4) +/* 803870A8 00384008 48 00 01 2C */ b lbl_803871D4 +lbl_803870AC: +/* 803870AC 0038400C 80 05 00 04 */ lwz r0, 4(r5) +/* 803870B0 00384010 54 00 46 36 */ rlwinm r0, r0, 8, 0x18, 0x1b +/* 803870B4 00384014 7C 00 07 74 */ extsb r0, r0 +/* 803870B8 00384018 98 04 00 04 */ stb r0, 4(r4) +/* 803870BC 0038401C 80 05 00 04 */ lwz r0, 4(r5) +/* 803870C0 00384020 54 00 66 36 */ rlwinm r0, r0, 0xc, 0x18, 0x1b +/* 803870C4 00384024 7C 00 07 74 */ extsb r0, r0 +/* 803870C8 00384028 98 04 00 05 */ stb r0, 5(r4) +/* 803870CC 0038402C 80 05 00 04 */ lwz r0, 4(r5) +/* 803870D0 00384030 54 00 86 3E */ rlwinm r0, r0, 0x10, 0x18, 0x1f +/* 803870D4 00384034 98 04 00 06 */ stb r0, 6(r4) +/* 803870D8 00384038 80 05 00 04 */ lwz r0, 4(r5) +/* 803870DC 0038403C 54 00 C6 3E */ rlwinm r0, r0, 0x18, 0x18, 0x1f +/* 803870E0 00384040 98 04 00 07 */ stb r0, 7(r4) +/* 803870E4 00384044 80 05 00 04 */ lwz r0, 4(r5) +/* 803870E8 00384048 54 00 06 36 */ rlwinm r0, r0, 0, 0x18, 0x1b +/* 803870EC 0038404C 98 04 00 08 */ stb r0, 8(r4) +/* 803870F0 00384050 80 05 00 04 */ lwz r0, 4(r5) +/* 803870F4 00384054 54 00 26 36 */ rlwinm r0, r0, 4, 0x18, 0x1b +/* 803870F8 00384058 98 04 00 09 */ stb r0, 9(r4) +/* 803870FC 0038405C 48 00 00 D8 */ b lbl_803871D4 +lbl_80387100: +/* 80387100 00384060 80 05 00 04 */ lwz r0, 4(r5) +/* 80387104 00384064 54 00 46 36 */ rlwinm r0, r0, 8, 0x18, 0x1b +/* 80387108 00384068 7C 00 07 74 */ extsb r0, r0 +/* 8038710C 0038406C 98 04 00 04 */ stb r0, 4(r4) +/* 80387110 00384070 80 05 00 04 */ lwz r0, 4(r5) +/* 80387114 00384074 54 00 66 36 */ rlwinm r0, r0, 0xc, 0x18, 0x1b +/* 80387118 00384078 7C 00 07 74 */ extsb r0, r0 +/* 8038711C 0038407C 98 04 00 05 */ stb r0, 5(r4) +/* 80387120 00384080 80 05 00 04 */ lwz r0, 4(r5) +/* 80387124 00384084 54 00 86 36 */ rlwinm r0, r0, 0x10, 0x18, 0x1b +/* 80387128 00384088 98 04 00 06 */ stb r0, 6(r4) +/* 8038712C 0038408C 80 05 00 04 */ lwz r0, 4(r5) +/* 80387130 00384090 54 00 A6 36 */ rlwinm r0, r0, 0x14, 0x18, 0x1b +/* 80387134 00384094 98 04 00 07 */ stb r0, 7(r4) +/* 80387138 00384098 80 05 00 04 */ lwz r0, 4(r5) +/* 8038713C 0038409C 54 00 C6 3E */ rlwinm r0, r0, 0x18, 0x18, 0x1f +/* 80387140 003840A0 98 04 00 08 */ stb r0, 8(r4) +/* 80387144 003840A4 80 05 00 04 */ lwz r0, 4(r5) +/* 80387148 003840A8 98 04 00 09 */ stb r0, 9(r4) +/* 8038714C 003840AC 48 00 00 88 */ b lbl_803871D4 +lbl_80387150: +/* 80387150 003840B0 80 C5 00 04 */ lwz r6, 4(r5) +/* 80387154 003840B4 38 00 00 00 */ li r0, 0 +/* 80387158 003840B8 54 C6 46 3E */ srwi r6, r6, 0x18 +/* 8038715C 003840BC 7C C6 07 74 */ extsb r6, r6 +/* 80387160 003840C0 98 C4 00 04 */ stb r6, 4(r4) +/* 80387164 003840C4 80 C5 00 04 */ lwz r6, 4(r5) +/* 80387168 003840C8 54 C6 84 3E */ srwi r6, r6, 0x10 +/* 8038716C 003840CC 7C C6 07 74 */ extsb r6, r6 +/* 80387170 003840D0 98 C4 00 05 */ stb r6, 5(r4) +/* 80387174 003840D4 80 C5 00 04 */ lwz r6, 4(r5) +/* 80387178 003840D8 54 C6 C6 3E */ rlwinm r6, r6, 0x18, 0x18, 0x1f +/* 8038717C 003840DC 98 C4 00 06 */ stb r6, 6(r4) +/* 80387180 003840E0 80 A5 00 04 */ lwz r5, 4(r5) +/* 80387184 003840E4 98 A4 00 07 */ stb r5, 7(r4) +/* 80387188 003840E8 98 04 00 08 */ stb r0, 8(r4) +/* 8038718C 003840EC 98 04 00 09 */ stb r0, 9(r4) +/* 80387190 003840F0 48 00 00 44 */ b lbl_803871D4 +lbl_80387194: +/* 80387194 003840F4 80 C5 00 04 */ lwz r6, 4(r5) +/* 80387198 003840F8 38 00 00 00 */ li r0, 0 +/* 8038719C 003840FC 54 C6 46 3E */ srwi r6, r6, 0x18 +/* 803871A0 00384100 7C C6 07 74 */ extsb r6, r6 +/* 803871A4 00384104 98 C4 00 04 */ stb r6, 4(r4) +/* 803871A8 00384108 80 C5 00 04 */ lwz r6, 4(r5) +/* 803871AC 0038410C 54 C6 84 3E */ srwi r6, r6, 0x10 +/* 803871B0 00384110 7C C6 07 74 */ extsb r6, r6 +/* 803871B4 00384114 98 C4 00 05 */ stb r6, 5(r4) +/* 803871B8 00384118 98 04 00 06 */ stb r0, 6(r4) +/* 803871BC 0038411C 98 04 00 07 */ stb r0, 7(r4) +/* 803871C0 00384120 80 05 00 04 */ lwz r0, 4(r5) +/* 803871C4 00384124 54 00 C6 3E */ rlwinm r0, r0, 0x18, 0x18, 0x1f +/* 803871C8 00384128 98 04 00 08 */ stb r0, 8(r4) +/* 803871CC 0038412C 80 05 00 04 */ lwz r0, 4(r5) +/* 803871D0 00384130 98 04 00 09 */ stb r0, 9(r4) +lbl_803871D4: +/* 803871D4 00384134 88 C4 00 02 */ lbz r6, 2(r4) +/* 803871D8 00384138 3C A0 80 54 */ lis r5, lbl_80542000@ha +/* 803871DC 0038413C 1C 63 00 0C */ mulli r3, r3, 0xc +/* 803871E0 00384140 38 06 FF 80 */ addi r0, r6, -128 +/* 803871E4 00384144 98 04 00 02 */ stb r0, 2(r4) +/* 803871E8 00384148 38 05 20 00 */ addi r0, r5, lbl_80542000@l +/* 803871EC 0038414C 7C 60 1A 14 */ add r3, r0, r3 +/* 803871F0 00384150 88 A4 00 03 */ lbz r5, 3(r4) +/* 803871F4 00384154 38 05 FF 80 */ addi r0, r5, -128 +/* 803871F8 00384158 98 04 00 03 */ stb r0, 3(r4) +/* 803871FC 0038415C 88 A4 00 04 */ lbz r5, 4(r4) +/* 80387200 00384160 38 05 FF 80 */ addi r0, r5, -128 +/* 80387204 00384164 98 04 00 04 */ stb r0, 4(r4) +/* 80387208 00384168 88 A4 00 05 */ lbz r5, 5(r4) +/* 8038720C 0038416C 38 05 FF 80 */ addi r0, r5, -128 +/* 80387210 00384170 98 04 00 05 */ stb r0, 5(r4) +/* 80387214 00384174 88 E3 00 02 */ lbz r7, 2(r3) +/* 80387218 00384178 88 C4 00 02 */ lbz r6, 2(r4) +/* 8038721C 0038417C 7C E0 07 75 */ extsb. r0, r7 +/* 80387220 00384180 40 81 00 24 */ ble lbl_80387244 +/* 80387224 00384184 7C E5 07 74 */ extsb r5, r7 +/* 80387228 00384188 38 05 FF 80 */ addi r0, r5, -128 +/* 8038722C 0038418C 7C 05 07 74 */ extsb r5, r0 +/* 80387230 00384190 7C C0 07 74 */ extsb r0, r6 +/* 80387234 00384194 7C 00 28 00 */ cmpw r0, r5 +/* 80387238 00384198 40 80 00 30 */ bge lbl_80387268 +/* 8038723C 0038419C 7C A6 2B 78 */ mr r6, r5 +/* 80387240 003841A0 48 00 00 28 */ b lbl_80387268 +lbl_80387244: +/* 80387244 003841A4 7C E0 07 75 */ extsb. r0, r7 +/* 80387248 003841A8 40 80 00 20 */ bge lbl_80387268 +/* 8038724C 003841AC 7C E5 07 74 */ extsb r5, r7 +/* 80387250 003841B0 38 05 00 7F */ addi r0, r5, 0x7f +/* 80387254 003841B4 7C 05 07 74 */ extsb r5, r0 +/* 80387258 003841B8 7C C0 07 74 */ extsb r0, r6 +/* 8038725C 003841BC 7C 05 00 00 */ cmpw r5, r0 +/* 80387260 003841C0 40 80 00 08 */ bge lbl_80387268 +/* 80387264 003841C4 7C A6 2B 78 */ mr r6, r5 +lbl_80387268: +/* 80387268 003841C8 7C C7 30 50 */ subf r6, r7, r6 +/* 8038726C 003841CC 98 C4 00 02 */ stb r6, 2(r4) +/* 80387270 003841D0 88 E3 00 03 */ lbz r7, 3(r3) +/* 80387274 003841D4 88 C4 00 03 */ lbz r6, 3(r4) +/* 80387278 003841D8 7C E0 07 75 */ extsb. r0, r7 +/* 8038727C 003841DC 40 81 00 24 */ ble lbl_803872A0 +/* 80387280 003841E0 7C E5 07 74 */ extsb r5, r7 +/* 80387284 003841E4 38 05 FF 80 */ addi r0, r5, -128 +/* 80387288 003841E8 7C 05 07 74 */ extsb r5, r0 +/* 8038728C 003841EC 7C C0 07 74 */ extsb r0, r6 +/* 80387290 003841F0 7C 00 28 00 */ cmpw r0, r5 +/* 80387294 003841F4 40 80 00 30 */ bge lbl_803872C4 +/* 80387298 003841F8 7C A6 2B 78 */ mr r6, r5 +/* 8038729C 003841FC 48 00 00 28 */ b lbl_803872C4 +lbl_803872A0: +/* 803872A0 00384200 7C E0 07 75 */ extsb. r0, r7 +/* 803872A4 00384204 40 80 00 20 */ bge lbl_803872C4 +/* 803872A8 00384208 7C E5 07 74 */ extsb r5, r7 +/* 803872AC 0038420C 38 05 00 7F */ addi r0, r5, 0x7f +/* 803872B0 00384210 7C 05 07 74 */ extsb r5, r0 +/* 803872B4 00384214 7C C0 07 74 */ extsb r0, r6 +/* 803872B8 00384218 7C 05 00 00 */ cmpw r5, r0 +/* 803872BC 0038421C 40 80 00 08 */ bge lbl_803872C4 +/* 803872C0 00384220 7C A6 2B 78 */ mr r6, r5 +lbl_803872C4: +/* 803872C4 00384224 7C C7 30 50 */ subf r6, r7, r6 +/* 803872C8 00384228 98 C4 00 03 */ stb r6, 3(r4) +/* 803872CC 0038422C 88 E3 00 04 */ lbz r7, 4(r3) +/* 803872D0 00384230 88 C4 00 04 */ lbz r6, 4(r4) +/* 803872D4 00384234 7C E0 07 75 */ extsb. r0, r7 +/* 803872D8 00384238 40 81 00 24 */ ble lbl_803872FC +/* 803872DC 0038423C 7C E5 07 74 */ extsb r5, r7 +/* 803872E0 00384240 38 05 FF 80 */ addi r0, r5, -128 +/* 803872E4 00384244 7C 05 07 74 */ extsb r5, r0 +/* 803872E8 00384248 7C C0 07 74 */ extsb r0, r6 +/* 803872EC 0038424C 7C 00 28 00 */ cmpw r0, r5 +/* 803872F0 00384250 40 80 00 30 */ bge lbl_80387320 +/* 803872F4 00384254 7C A6 2B 78 */ mr r6, r5 +/* 803872F8 00384258 48 00 00 28 */ b lbl_80387320 +lbl_803872FC: +/* 803872FC 0038425C 7C E0 07 75 */ extsb. r0, r7 +/* 80387300 00384260 40 80 00 20 */ bge lbl_80387320 +/* 80387304 00384264 7C E5 07 74 */ extsb r5, r7 +/* 80387308 00384268 38 05 00 7F */ addi r0, r5, 0x7f +/* 8038730C 0038426C 7C 05 07 74 */ extsb r5, r0 +/* 80387310 00384270 7C C0 07 74 */ extsb r0, r6 +/* 80387314 00384274 7C 05 00 00 */ cmpw r5, r0 +/* 80387318 00384278 40 80 00 08 */ bge lbl_80387320 +/* 8038731C 0038427C 7C A6 2B 78 */ mr r6, r5 +lbl_80387320: +/* 80387320 00384280 7C C7 30 50 */ subf r6, r7, r6 +/* 80387324 00384284 98 C4 00 04 */ stb r6, 4(r4) +/* 80387328 00384288 88 E3 00 05 */ lbz r7, 5(r3) +/* 8038732C 0038428C 88 C4 00 05 */ lbz r6, 5(r4) +/* 80387330 00384290 7C E0 07 75 */ extsb. r0, r7 +/* 80387334 00384294 40 81 00 24 */ ble lbl_80387358 +/* 80387338 00384298 7C E5 07 74 */ extsb r5, r7 +/* 8038733C 0038429C 38 05 FF 80 */ addi r0, r5, -128 +/* 80387340 003842A0 7C 05 07 74 */ extsb r5, r0 +/* 80387344 003842A4 7C C0 07 74 */ extsb r0, r6 +/* 80387348 003842A8 7C 00 28 00 */ cmpw r0, r5 +/* 8038734C 003842AC 40 80 00 30 */ bge lbl_8038737C +/* 80387350 003842B0 7C A6 2B 78 */ mr r6, r5 +/* 80387354 003842B4 48 00 00 28 */ b lbl_8038737C +lbl_80387358: +/* 80387358 003842B8 7C E0 07 75 */ extsb. r0, r7 +/* 8038735C 003842BC 40 80 00 20 */ bge lbl_8038737C +/* 80387360 003842C0 7C E5 07 74 */ extsb r5, r7 +/* 80387364 003842C4 38 05 00 7F */ addi r0, r5, 0x7f +/* 80387368 003842C8 7C 05 07 74 */ extsb r5, r0 +/* 8038736C 003842CC 7C C0 07 74 */ extsb r0, r6 +/* 80387370 003842D0 7C 05 00 00 */ cmpw r5, r0 +/* 80387374 003842D4 40 80 00 08 */ bge lbl_8038737C +/* 80387378 003842D8 7C A6 2B 78 */ mr r6, r5 +lbl_8038737C: +/* 8038737C 003842DC 7C C7 30 50 */ subf r6, r7, r6 +/* 80387380 003842E0 98 C4 00 05 */ stb r6, 5(r4) +/* 80387384 003842E4 88 03 00 06 */ lbz r0, 6(r3) +/* 80387388 003842E8 88 A4 00 06 */ lbz r5, 6(r4) +/* 8038738C 003842EC 7C 05 00 40 */ cmplw r5, r0 +/* 80387390 003842F0 40 80 00 08 */ bge lbl_80387398 +/* 80387394 003842F4 7C 05 03 78 */ mr r5, r0 +lbl_80387398: +/* 80387398 003842F8 7C A0 28 50 */ subf r5, r0, r5 +/* 8038739C 003842FC 98 A4 00 06 */ stb r5, 6(r4) +/* 803873A0 00384300 88 03 00 07 */ lbz r0, 7(r3) +/* 803873A4 00384304 88 64 00 07 */ lbz r3, 7(r4) +/* 803873A8 00384308 7C 03 00 40 */ cmplw r3, r0 +/* 803873AC 0038430C 40 80 00 08 */ bge lbl_803873B4 +/* 803873B0 00384310 7C 03 03 78 */ mr r3, r0 +lbl_803873B4: +/* 803873B4 00384314 7C 60 18 50 */ subf r3, r0, r3 +/* 803873B8 00384318 98 64 00 07 */ stb r3, 7(r4) +/* 803873BC 0038431C 4E 80 00 20 */ blr + +.global sub_803873c0 +sub_803873c0: +/* 803873C0 00384320 7C 08 02 A6 */ mflr r0 +/* 803873C4 00384324 90 01 00 04 */ stw r0, 4(r1) +/* 803873C8 00384328 94 21 FF D8 */ stwu r1, -0x28(r1) +/* 803873CC 0038432C 93 E1 00 24 */ stw r31, 0x24(r1) +/* 803873D0 00384330 93 C1 00 20 */ stw r30, 0x20(r1) +/* 803873D4 00384334 3B C3 00 00 */ addi r30, r3, 0 +/* 803873D8 00384338 80 0D AD 8C */ lwz r0, lbl_805A994C@sda21(r13) +/* 803873DC 0038433C 28 00 00 00 */ cmplwi r0, 0 +/* 803873E0 00384340 41 82 00 0C */ beq lbl_803873EC +/* 803873E4 00384344 38 60 00 00 */ li r3, 0 +/* 803873E8 00384348 48 00 01 CD */ bl PADSetSamplingCallback +lbl_803873EC: +/* 803873EC 0038434C 2C 1E 00 00 */ cmpwi r30, 0 +/* 803873F0 00384350 40 82 01 40 */ bne lbl_80387530 +/* 803873F4 00384354 80 0D AD 78 */ lwz r0, lbl_805A9938@sda21(r13) +/* 803873F8 00384358 3B C0 00 00 */ li r30, 0 +/* 803873FC 0038435C 38 7E 00 00 */ addi r3, r30, 0 +/* 80387400 00384360 28 00 00 00 */ cmplwi r0, 0 +/* 80387404 00384364 40 82 00 14 */ bne lbl_80387418 +/* 80387408 00384368 80 0D 9F 9C */ lwz r0, lbl_805A8B5C@sda21(r13) +/* 8038740C 0038436C 2C 00 00 20 */ cmpwi r0, 0x20 +/* 80387410 00384370 40 82 00 08 */ bne lbl_80387418 +/* 80387414 00384374 38 60 00 01 */ li r3, 1 +lbl_80387418: +/* 80387418 00384378 2C 03 00 00 */ cmpwi r3, 0 +/* 8038741C 0038437C 41 82 00 14 */ beq lbl_80387430 +/* 80387420 00384380 48 03 72 8D */ bl SIBusy +/* 80387424 00384384 2C 03 00 00 */ cmpwi r3, 0 +/* 80387428 00384388 40 82 00 08 */ bne lbl_80387430 +/* 8038742C 0038438C 3B C0 00 01 */ li r30, 1 +lbl_80387430: +/* 80387430 00384390 80 0D AD 90 */ lwz r0, lbl_805A9950@sda21(r13) +/* 80387434 00384394 2C 00 00 00 */ cmpwi r0, 0 +/* 80387438 00384398 40 82 00 F0 */ bne lbl_80387528 +/* 8038743C 0038439C 2C 1E 00 00 */ cmpwi r30, 0 +/* 80387440 003843A0 41 82 00 E8 */ beq lbl_80387528 +/* 80387444 003843A4 3F C0 F0 00 */ lis r30, 0xf000 +/* 80387448 003843A8 4B FF A2 19 */ bl OSDisableInterrupts +/* 8038744C 003843AC 80 CD AD 88 */ lwz r6, lbl_805A9948@sda21(r13) +/* 80387450 003843B0 38 E0 00 00 */ li r7, 0 +/* 80387454 003843B4 80 AD AD 80 */ lwz r5, lbl_805A9940@sda21(r13) +/* 80387458 003843B8 3C 80 80 00 */ lis r4, 0x800030E3@ha +/* 8038745C 003843BC 80 0D AD 84 */ lwz r0, lbl_805A9944@sda21(r13) +/* 80387460 003843C0 7F DE 33 78 */ or r30, r30, r6 +/* 80387464 003843C4 80 CD AD 78 */ lwz r6, lbl_805A9938@sda21(r13) +/* 80387468 003843C8 7C A5 03 78 */ or r5, r5, r0 +/* 8038746C 003843CC 88 04 30 E3 */ lbz r0, 0x800030E3@l(r4) +/* 80387470 003843D0 7F DE 28 78 */ andc r30, r30, r5 +/* 80387474 003843D4 80 AD AD 74 */ lwz r5, lbl_805A9934@sda21(r13) +/* 80387478 003843D8 7C C4 F3 78 */ or r4, r6, r30 +/* 8038747C 003843DC 90 ED AD 88 */ stw r7, lbl_805A9948@sda21(r13) +/* 80387480 003843E0 54 00 06 73 */ rlwinm. r0, r0, 0, 0x19, 0x19 +/* 80387484 003843E4 90 8D AD 78 */ stw r4, lbl_805A9938@sda21(r13) +/* 80387488 003843E8 7C A4 F0 78 */ andc r4, r5, r30 +/* 8038748C 003843EC 3B E3 00 00 */ addi r31, r3, 0 +/* 80387490 003843F0 80 CD AD 78 */ lwz r6, lbl_805A9938@sda21(r13) +/* 80387494 003843F4 90 8D AD 74 */ stw r4, lbl_805A9934@sda21(r13) +/* 80387498 003843F8 7C C3 28 38 */ and r3, r6, r5 +/* 8038749C 003843FC 40 82 00 10 */ bne lbl_803874AC +/* 803874A0 00384400 80 0D AD 7C */ lwz r0, lbl_805A993C@sda21(r13) +/* 803874A4 00384404 7C 00 F3 78 */ or r0, r0, r30 +/* 803874A8 00384408 90 0D AD 7C */ stw r0, lbl_805A993C@sda21(r13) +lbl_803874AC: +/* 803874AC 0038440C 48 03 7F 5D */ bl SIDisablePolling +/* 803874B0 00384410 80 0D 9F 9C */ lwz r0, lbl_805A8B5C@sda21(r13) +/* 803874B4 00384414 2C 00 00 20 */ cmpwi r0, 0x20 +/* 803874B8 00384418 40 82 00 58 */ bne lbl_80387510 +/* 803874BC 0038441C 80 AD AD 78 */ lwz r5, lbl_805A9938@sda21(r13) +/* 803874C0 00384420 7C A0 00 34 */ cntlzw r0, r5 +/* 803874C4 00384424 90 0D 9F 9C */ stw r0, lbl_805A8B5C@sda21(r13) +/* 803874C8 00384428 80 8D 9F 9C */ lwz r4, lbl_805A8B5C@sda21(r13) +/* 803874CC 0038442C 2C 04 00 20 */ cmpwi r4, 0x20 +/* 803874D0 00384430 41 82 00 40 */ beq lbl_80387510 +/* 803874D4 00384434 3C 00 80 00 */ lis r0, 0x8000 +/* 803874D8 00384438 7C 00 24 30 */ srw r0, r0, r4 +/* 803874DC 0038443C 7C A0 00 78 */ andc r0, r5, r0 +/* 803874E0 00384440 1C 84 00 0C */ mulli r4, r4, 0xc +/* 803874E4 00384444 90 0D AD 78 */ stw r0, lbl_805A9938@sda21(r13) +/* 803874E8 00384448 3C 60 80 54 */ lis r3, lbl_80542000@ha +/* 803874EC 0038444C 38 03 20 00 */ addi r0, r3, lbl_80542000@l +/* 803874F0 00384450 7C 60 22 14 */ add r3, r0, r4 +/* 803874F4 00384454 38 80 00 00 */ li r4, 0 +/* 803874F8 00384458 38 A0 00 0C */ li r5, 0xc +/* 803874FC 0038445C 4B C7 BE AD */ bl memset +/* 80387500 00384460 3C 80 80 38 */ lis r4, PADTypeAndStatusCallback@ha +/* 80387504 00384464 80 6D 9F 9C */ lwz r3, lbl_805A8B5C@sda21(r13) +/* 80387508 00384468 38 84 5E FC */ addi r4, r4, PADTypeAndStatusCallback@l +/* 8038750C 0038446C 48 03 87 55 */ bl SIGetTypeAsync +lbl_80387510: +/* 80387510 00384470 7F E3 FB 78 */ mr r3, r31 +/* 80387514 00384474 4B FF A1 75 */ bl OSRestoreInterrupts +/* 80387518 00384478 38 00 00 01 */ li r0, 1 +/* 8038751C 0038447C 90 0D AD 90 */ stw r0, lbl_805A9950@sda21(r13) +/* 80387520 00384480 38 60 00 00 */ li r3, 0 +/* 80387524 00384484 48 00 00 18 */ b lbl_8038753C +lbl_80387528: +/* 80387528 00384488 7F C3 F3 78 */ mr r3, r30 +/* 8038752C 0038448C 48 00 00 10 */ b lbl_8038753C +lbl_80387530: +/* 80387530 00384490 38 00 00 00 */ li r0, 0 +/* 80387534 00384494 90 0D AD 90 */ stw r0, lbl_805A9950@sda21(r13) +/* 80387538 00384498 38 60 00 01 */ li r3, 1 +lbl_8038753C: +/* 8038753C 0038449C 80 01 00 2C */ lwz r0, 0x2c(r1) +/* 80387540 003844A0 83 E1 00 24 */ lwz r31, 0x24(r1) +/* 80387544 003844A4 83 C1 00 20 */ lwz r30, 0x20(r1) +/* 80387548 003844A8 38 21 00 28 */ addi r1, r1, 0x28 +/* 8038754C 003844AC 7C 08 03 A6 */ mtlr r0 +/* 80387550 003844B0 4E 80 00 20 */ blr + +.global SamplingHandler +SamplingHandler: +/* 80387554 003844B4 7C 08 02 A6 */ mflr r0 +/* 80387558 003844B8 90 01 00 04 */ stw r0, 4(r1) +/* 8038755C 003844BC 94 21 FD 20 */ stwu r1, -0x2e0(r1) +/* 80387560 003844C0 93 E1 02 DC */ stw r31, 0x2dc(r1) +/* 80387564 003844C4 3B E4 00 00 */ addi r31, r4, 0 +/* 80387568 003844C8 80 0D AD 8C */ lwz r0, lbl_805A994C@sda21(r13) +/* 8038756C 003844CC 28 00 00 00 */ cmplwi r0, 0 +/* 80387570 003844D0 41 82 00 30 */ beq lbl_803875A0 +/* 80387574 003844D4 38 61 00 10 */ addi r3, r1, 0x10 +/* 80387578 003844D8 4B FF 80 9D */ bl OSClearContext +/* 8038757C 003844DC 38 61 00 10 */ addi r3, r1, 0x10 +/* 80387580 003844E0 4B FF 7E 9D */ bl OSSetCurrentContext +/* 80387584 003844E4 81 8D AD 8C */ lwz r12, lbl_805A994C@sda21(r13) +/* 80387588 003844E8 7D 88 03 A6 */ mtlr r12 +/* 8038758C 003844EC 4E 80 00 21 */ blrl +/* 80387590 003844F0 38 61 00 10 */ addi r3, r1, 0x10 +/* 80387594 003844F4 4B FF 80 81 */ bl OSClearContext +/* 80387598 003844F8 7F E3 FB 78 */ mr r3, r31 +/* 8038759C 003844FC 4B FF 7E 81 */ bl OSSetCurrentContext +lbl_803875A0: +/* 803875A0 00384500 80 01 02 E4 */ lwz r0, 0x2e4(r1) +/* 803875A4 00384504 83 E1 02 DC */ lwz r31, 0x2dc(r1) +/* 803875A8 00384508 38 21 02 E0 */ addi r1, r1, 0x2e0 +/* 803875AC 0038450C 7C 08 03 A6 */ mtlr r0 +/* 803875B0 00384510 4E 80 00 20 */ blr + +.global PADSetSamplingCallback +PADSetSamplingCallback: +/* 803875B4 00384514 7C 08 02 A6 */ mflr r0 +/* 803875B8 00384518 28 03 00 00 */ cmplwi r3, 0 +/* 803875BC 0038451C 90 01 00 04 */ stw r0, 4(r1) +/* 803875C0 00384520 94 21 FF E8 */ stwu r1, -0x18(r1) +/* 803875C4 00384524 93 E1 00 14 */ stw r31, 0x14(r1) +/* 803875C8 00384528 83 ED AD 8C */ lwz r31, lbl_805A994C@sda21(r13) +/* 803875CC 0038452C 90 6D AD 8C */ stw r3, lbl_805A994C@sda21(r13) +/* 803875D0 00384530 41 82 00 14 */ beq lbl_803875E4 +/* 803875D4 00384534 3C 60 80 38 */ lis r3, SamplingHandler@ha +/* 803875D8 00384538 38 63 75 54 */ addi r3, r3, SamplingHandler@l +/* 803875DC 0038453C 48 03 78 05 */ bl SIRegisterPollingHandler +/* 803875E0 00384540 48 00 00 10 */ b lbl_803875F0 +lbl_803875E4: +/* 803875E4 00384544 3C 60 80 38 */ lis r3, SamplingHandler@ha +/* 803875E8 00384548 38 63 75 54 */ addi r3, r3, SamplingHandler@l +/* 803875EC 0038454C 48 03 78 C1 */ bl SIUnregisterPollingHandler +lbl_803875F0: +/* 803875F0 00384550 7F E3 FB 78 */ mr r3, r31 +/* 803875F4 00384554 80 01 00 1C */ lwz r0, 0x1c(r1) +/* 803875F8 00384558 83 E1 00 14 */ lwz r31, 0x14(r1) +/* 803875FC 0038455C 38 21 00 18 */ addi r1, r1, 0x18 +/* 80387600 00384560 7C 08 03 A6 */ mtlr r0 +/* 80387604 00384564 4E 80 00 20 */ blr + +.global __PADDisableRecalibration +__PADDisableRecalibration: +/* 80387608 00384568 7C 08 02 A6 */ mflr r0 +/* 8038760C 0038456C 90 01 00 04 */ stw r0, 4(r1) +/* 80387610 00384570 94 21 FF E8 */ stwu r1, -0x18(r1) +/* 80387614 00384574 93 E1 00 14 */ stw r31, 0x14(r1) +/* 80387618 00384578 93 C1 00 10 */ stw r30, 0x10(r1) +/* 8038761C 0038457C 7C 7E 1B 78 */ mr r30, r3 +/* 80387620 00384580 4B FF A0 41 */ bl OSDisableInterrupts +/* 80387624 00384584 3C 80 80 00 */ lis r4, 0x800030E3@ha +/* 80387628 00384588 88 04 30 E3 */ lbz r0, 0x800030E3@l(r4) +/* 8038762C 0038458C 54 00 06 73 */ rlwinm. r0, r0, 0, 0x19, 0x19 +/* 80387630 00384590 41 82 00 0C */ beq lbl_8038763C +/* 80387634 00384594 3B E0 00 01 */ li r31, 1 +/* 80387638 00384598 48 00 00 08 */ b lbl_80387640 +lbl_8038763C: +/* 8038763C 0038459C 3B E0 00 00 */ li r31, 0 +lbl_80387640: +/* 80387640 003845A0 3C 80 80 00 */ lis r4, 0x800030E3@ha +/* 80387644 003845A4 88 04 30 E3 */ lbz r0, 0x800030E3@l(r4) +/* 80387648 003845A8 70 00 00 BF */ andi. r0, r0, 0xbf +/* 8038764C 003845AC 2C 1E 00 00 */ cmpwi r30, 0 +/* 80387650 003845B0 98 04 30 E3 */ stb r0, 0x30e3(r4) +/* 80387654 003845B4 41 82 00 10 */ beq lbl_80387664 +/* 80387658 003845B8 88 04 30 E3 */ lbz r0, 0x30e3(r4) +/* 8038765C 003845BC 60 00 00 40 */ ori r0, r0, 0x40 +/* 80387660 003845C0 98 04 30 E3 */ stb r0, 0x30e3(r4) +lbl_80387664: +/* 80387664 003845C4 4B FF A0 25 */ bl OSRestoreInterrupts +/* 80387668 003845C8 7F E3 FB 78 */ mr r3, r31 +/* 8038766C 003845CC 80 01 00 1C */ lwz r0, 0x1c(r1) +/* 80387670 003845D0 83 E1 00 14 */ lwz r31, 0x14(r1) +/* 80387674 003845D4 83 C1 00 10 */ lwz r30, 0x10(r1) +/* 80387678 003845D8 38 21 00 18 */ addi r1, r1, 0x18 +/* 8038767C 003845DC 7C 08 03 A6 */ mtlr r0 +/* 80387680 003845E0 4E 80 00 20 */ blr diff --git a/asm/Dolphin/PPCArch.s b/asm/Dolphin/PPCArch.s new file mode 100644 index 00000000..30444732 --- /dev/null +++ b/asm/Dolphin/PPCArch.s @@ -0,0 +1,120 @@ +.include "macros.inc" + +.section .text, "ax" + +.global PPCMfmsr +PPCMfmsr: +/* 8036F7D4 0036C734 7C 60 00 A6 */ mfmsr r3 +/* 8036F7D8 0036C738 4E 80 00 20 */ blr + +.global PPCMtmsr +PPCMtmsr: +/* 8036F7DC 0036C73C 7C 60 01 24 */ mtmsr r3 +/* 8036F7E0 0036C740 4E 80 00 20 */ blr + +.global PPCMfhid0 +PPCMfhid0: +/* 8036F7E4 0036C744 7C 70 FA A6 */ mfspr r3, 0x3f0 +/* 8036F7E8 0036C748 4E 80 00 20 */ blr + +.global PPCMthid0 +PPCMthid0: +/* 8036F7EC 0036C74C 7C 70 FB A6 */ mtspr 0x3f0, r3 +/* 8036F7F0 0036C750 4E 80 00 20 */ blr + +.global PPCMfl2cr +PPCMfl2cr: +/* 8036F7F4 0036C754 7C 79 FA A6 */ mfspr r3, 0x3f9 +/* 8036F7F8 0036C758 4E 80 00 20 */ blr + +.global PPCMtl2cr +PPCMtl2cr: +/* 8036F7FC 0036C75C 7C 79 FB A6 */ mtspr 0x3f9, r3 +/* 8036F800 0036C760 4E 80 00 20 */ blr + +.global PPCMtdec +PPCMtdec: +/* 8036F804 0036C764 7C 76 03 A6 */ mtspr 0x16, r3 +/* 8036F808 0036C768 4E 80 00 20 */ blr + +.global PPCSync +PPCSync: +/* 8036F80C 0036C76C 44 00 00 02 */ sc +/* 8036F810 0036C770 4E 80 00 20 */ blr + +.global PPCHalt +PPCHalt: +/* 8036F814 0036C774 7C 00 04 AC */ sync 0 +lbl_8036F818: +/* 8036F818 0036C778 60 00 00 00 */ nop +/* 8036F81C 0036C77C 38 60 00 00 */ li r3, 0 +/* 8036F820 0036C780 60 00 00 00 */ nop +/* 8036F824 0036C784 4B FF FF F4 */ b lbl_8036F818 + +.global PPCMffpscr +PPCMffpscr: +/* 8036F828 0036C788 94 21 FF E8 */ stwu r1, -0x18(r1) +/* 8036F82C 0036C78C DB E1 00 10 */ stfd f31, 0x10(r1) +/* 8036F830 0036C790 FF E0 04 8E */ mffs f31 +/* 8036F834 0036C794 DB E1 00 08 */ stfd f31, 8(r1) +/* 8036F838 0036C798 80 61 00 0C */ lwz r3, 0xc(r1) +/* 8036F83C 0036C79C CB E1 00 10 */ lfd f31, 0x10(r1) +/* 8036F840 0036C7A0 38 21 00 18 */ addi r1, r1, 0x18 +/* 8036F844 0036C7A4 4E 80 00 20 */ blr + +.global PPCMtfpscr +PPCMtfpscr: +/* 8036F848 0036C7A8 94 21 FF E0 */ stwu r1, -0x20(r1) +/* 8036F84C 0036C7AC DB E1 00 18 */ stfd f31, 0x18(r1) +/* 8036F850 0036C7B0 38 80 00 00 */ li r4, 0 +/* 8036F854 0036C7B4 90 81 00 10 */ stw r4, 0x10(r1) +/* 8036F858 0036C7B8 90 61 00 14 */ stw r3, 0x14(r1) +/* 8036F85C 0036C7BC CB E1 00 10 */ lfd f31, 0x10(r1) +/* 8036F860 0036C7C0 FD FE FD 8E */ mtfsf 0xff, f31 +/* 8036F864 0036C7C4 CB E1 00 18 */ lfd f31, 0x18(r1) +/* 8036F868 0036C7C8 38 21 00 20 */ addi r1, r1, 0x20 +/* 8036F86C 0036C7CC 4E 80 00 20 */ blr + +.global PPCMfhid2 +PPCMfhid2: +/* 8036F870 0036C7D0 7C 78 E2 A6 */ mfspr r3, 0x398 +/* 8036F874 0036C7D4 4E 80 00 20 */ blr + +.global PPCMthid2 +PPCMthid2: +/* 8036F878 0036C7D8 7C 78 E3 A6 */ mtspr 0x398, r3 +/* 8036F87C 0036C7DC 4E 80 00 20 */ blr + +.global PPCMfwpar +PPCMfwpar: +/* 8036F880 0036C7E0 7C 00 04 AC */ sync 0 +/* 8036F884 0036C7E4 7C 79 E2 A6 */ mfspr r3, 0x399 +/* 8036F888 0036C7E8 4E 80 00 20 */ blr + +.global PPCMtwpar +PPCMtwpar: +/* 8036F88C 0036C7EC 7C 79 E3 A6 */ mtspr 0x399, r3 +/* 8036F890 0036C7F0 4E 80 00 20 */ blr + +.global PPCDisableSpeculation +PPCDisableSpeculation: +/* 8036F894 0036C7F4 7C 08 02 A6 */ mflr r0 +/* 8036F898 0036C7F8 90 01 00 04 */ stw r0, 4(r1) +/* 8036F89C 0036C7FC 94 21 FF F8 */ stwu r1, -8(r1) +/* 8036F8A0 0036C800 4B FF FF 45 */ bl PPCMfhid0 +/* 8036F8A4 0036C804 60 63 02 00 */ ori r3, r3, 0x200 +/* 8036F8A8 0036C808 4B FF FF 45 */ bl PPCMthid0 +/* 8036F8AC 0036C80C 80 01 00 0C */ lwz r0, 0xc(r1) +/* 8036F8B0 0036C810 38 21 00 08 */ addi r1, r1, 8 +/* 8036F8B4 0036C814 7C 08 03 A6 */ mtlr r0 +/* 8036F8B8 0036C818 4E 80 00 20 */ blr + +.global PPCSetFpIEEEMode +PPCSetFpIEEEMode: +/* 8036F8BC 0036C81C FF A0 00 8C */ mtfsb0 0x1d +/* 8036F8C0 0036C820 4E 80 00 20 */ blr + +.global PPCSetFpNonIEEEMode +PPCSetFpNonIEEEMode: +/* 8036F8C4 0036C824 FF A0 00 4C */ mtfsb1 0x1d +/* 8036F8C8 0036C828 4E 80 00 20 */ blr diff --git a/asm/Dolphin/SIBios.s b/asm/Dolphin/SI/SIBios.s similarity index 100% rename from asm/Dolphin/SIBios.s rename to asm/Dolphin/SI/SIBios.s diff --git a/asm/Dolphin/SISamplingRate.s b/asm/Dolphin/SI/SISamplingRate.s similarity index 100% rename from asm/Dolphin/SISamplingRate.s rename to asm/Dolphin/SI/SISamplingRate.s diff --git a/asm/Dolphin/THPAudio.s b/asm/Dolphin/THP/THPAudio.s similarity index 100% rename from asm/Dolphin/THPAudio.s rename to asm/Dolphin/THP/THPAudio.s diff --git a/asm/Dolphin/THPDec.s b/asm/Dolphin/THP/THPDec.s similarity index 100% rename from asm/Dolphin/THPDec.s rename to asm/Dolphin/THP/THPDec.s diff --git a/asm/Dolphin/ai.s b/asm/Dolphin/ai.s new file mode 100644 index 00000000..13602149 --- /dev/null +++ b/asm/Dolphin/ai.s @@ -0,0 +1,696 @@ +.include "macros.inc" + +.section .text, "ax" + +.global AIRegisterDMACallback +AIRegisterDMACallback: +/* 8036CF3C 00369E9C 7C 08 02 A6 */ mflr r0 +/* 8036CF40 00369EA0 90 01 00 04 */ stw r0, 4(r1) +/* 8036CF44 00369EA4 94 21 FF E8 */ stwu r1, -0x18(r1) +/* 8036CF48 00369EA8 93 E1 00 14 */ stw r31, 0x14(r1) +/* 8036CF4C 00369EAC 93 C1 00 10 */ stw r30, 0x10(r1) +/* 8036CF50 00369EB0 7C 7E 1B 78 */ mr r30, r3 +/* 8036CF54 00369EB4 83 ED AA FC */ lwz r31, lbl_805A96BC@sda21(r13) +/* 8036CF58 00369EB8 48 01 47 09 */ bl OSDisableInterrupts +/* 8036CF5C 00369EBC 93 CD AA FC */ stw r30, lbl_805A96BC@sda21(r13) +/* 8036CF60 00369EC0 48 01 47 29 */ bl OSRestoreInterrupts +/* 8036CF64 00369EC4 7F E3 FB 78 */ mr r3, r31 +/* 8036CF68 00369EC8 80 01 00 1C */ lwz r0, 0x1c(r1) +/* 8036CF6C 00369ECC 83 E1 00 14 */ lwz r31, 0x14(r1) +/* 8036CF70 00369ED0 83 C1 00 10 */ lwz r30, 0x10(r1) +/* 8036CF74 00369ED4 38 21 00 18 */ addi r1, r1, 0x18 +/* 8036CF78 00369ED8 7C 08 03 A6 */ mtlr r0 +/* 8036CF7C 00369EDC 4E 80 00 20 */ blr + +.global AIInitDMA +AIInitDMA: +/* 8036CF80 00369EE0 7C 08 02 A6 */ mflr r0 +/* 8036CF84 00369EE4 90 01 00 04 */ stw r0, 4(r1) +/* 8036CF88 00369EE8 94 21 FF E8 */ stwu r1, -0x18(r1) +/* 8036CF8C 00369EEC 93 E1 00 14 */ stw r31, 0x14(r1) +/* 8036CF90 00369EF0 3B E4 00 00 */ addi r31, r4, 0 +/* 8036CF94 00369EF4 93 C1 00 10 */ stw r30, 0x10(r1) +/* 8036CF98 00369EF8 3B C3 00 00 */ addi r30, r3, 0 +/* 8036CF9C 00369EFC 48 01 46 C5 */ bl OSDisableInterrupts +/* 8036CFA0 00369F00 3C 80 CC 00 */ lis r4, 0xCC005030@ha +/* 8036CFA4 00369F04 A0 04 50 30 */ lhz r0, 0xCC005030@l(r4) +/* 8036CFA8 00369F08 38 A4 50 00 */ addi r5, r4, 0x5000 +/* 8036CFAC 00369F0C 38 C4 50 00 */ addi r6, r4, 0x5000 +/* 8036CFB0 00369F10 38 E4 50 00 */ addi r7, r4, 0x5000 +/* 8036CFB4 00369F14 54 04 00 2A */ rlwinm r4, r0, 0, 0, 0x15 +/* 8036CFB8 00369F18 57 C0 84 3E */ srwi r0, r30, 0x10 +/* 8036CFBC 00369F1C 7C 80 03 78 */ or r0, r4, r0 +/* 8036CFC0 00369F20 B0 05 00 30 */ sth r0, 0x30(r5) +/* 8036CFC4 00369F24 57 C0 04 3E */ clrlwi r0, r30, 0x10 +/* 8036CFC8 00369F28 A0 86 00 32 */ lhz r4, 0x32(r6) +/* 8036CFCC 00369F2C 54 84 06 DE */ rlwinm r4, r4, 0, 0x1b, 0xf +/* 8036CFD0 00369F30 7C 80 03 78 */ or r0, r4, r0 +/* 8036CFD4 00369F34 B0 06 00 32 */ sth r0, 0x32(r6) +/* 8036CFD8 00369F38 57 E0 DC 3E */ rlwinm r0, r31, 0x1b, 0x10, 0x1f +/* 8036CFDC 00369F3C A0 87 00 36 */ lhz r4, 0x36(r7) +/* 8036CFE0 00369F40 54 84 00 20 */ rlwinm r4, r4, 0, 0, 0x10 +/* 8036CFE4 00369F44 7C 80 03 78 */ or r0, r4, r0 +/* 8036CFE8 00369F48 B0 07 00 36 */ sth r0, 0x36(r7) +/* 8036CFEC 00369F4C 48 01 46 9D */ bl OSRestoreInterrupts +/* 8036CFF0 00369F50 80 01 00 1C */ lwz r0, 0x1c(r1) +/* 8036CFF4 00369F54 83 E1 00 14 */ lwz r31, 0x14(r1) +/* 8036CFF8 00369F58 83 C1 00 10 */ lwz r30, 0x10(r1) +/* 8036CFFC 00369F5C 38 21 00 18 */ addi r1, r1, 0x18 +/* 8036D000 00369F60 7C 08 03 A6 */ mtlr r0 +/* 8036D004 00369F64 4E 80 00 20 */ blr + +.global AIStartDMA +AIStartDMA: +/* 8036D008 00369F68 3C 60 CC 00 */ lis r3, 0xCC005000@ha +/* 8036D00C 00369F6C 38 63 50 00 */ addi r3, r3, 0xCC005000@l +/* 8036D010 00369F70 A0 03 00 36 */ lhz r0, 0x36(r3) +/* 8036D014 00369F74 60 00 80 00 */ ori r0, r0, 0x8000 +/* 8036D018 00369F78 B0 03 00 36 */ sth r0, 0x36(r3) +/* 8036D01C 00369F7C 4E 80 00 20 */ blr + +.global AIStopDMA +AIStopDMA: +/* 8036D020 00369F80 3C 60 CC 00 */ lis r3, 0xCC005000@ha +/* 8036D024 00369F84 38 63 50 00 */ addi r3, r3, 0xCC005000@l +/* 8036D028 00369F88 A0 03 00 36 */ lhz r0, 0x36(r3) +/* 8036D02C 00369F8C 54 00 04 5E */ rlwinm r0, r0, 0, 0x11, 0xf +/* 8036D030 00369F90 B0 03 00 36 */ sth r0, 0x36(r3) +/* 8036D034 00369F94 4E 80 00 20 */ blr + +.global AIGetDMAStartAddr +AIGetDMAStartAddr: +/* 8036D038 00369F98 3C 60 CC 00 */ lis r3, 0xCC005000@ha +/* 8036D03C 00369F9C 38 63 50 00 */ addi r3, r3, 0xCC005000@l +/* 8036D040 00369FA0 A0 83 00 30 */ lhz r4, 0x30(r3) +/* 8036D044 00369FA4 A0 03 00 32 */ lhz r0, 0x32(r3) +/* 8036D048 00369FA8 54 03 04 34 */ rlwinm r3, r0, 0, 0x10, 0x1a +/* 8036D04C 00369FAC 50 83 81 9E */ rlwimi r3, r4, 0x10, 6, 0xf +/* 8036D050 00369FB0 4E 80 00 20 */ blr + +.global AIRegisterStreamCallback +AIRegisterStreamCallback: +/* 8036D054 00369FB4 7C 08 02 A6 */ mflr r0 +/* 8036D058 00369FB8 90 01 00 04 */ stw r0, 4(r1) +/* 8036D05C 00369FBC 94 21 FF E8 */ stwu r1, -0x18(r1) +/* 8036D060 00369FC0 93 E1 00 14 */ stw r31, 0x14(r1) +/* 8036D064 00369FC4 93 C1 00 10 */ stw r30, 0x10(r1) +/* 8036D068 00369FC8 7C 7E 1B 78 */ mr r30, r3 +/* 8036D06C 00369FCC 83 ED AA F8 */ lwz r31, lbl_805A96B8@sda21(r13) +/* 8036D070 00369FD0 48 01 45 F1 */ bl OSDisableInterrupts +/* 8036D074 00369FD4 93 CD AA F8 */ stw r30, lbl_805A96B8@sda21(r13) +/* 8036D078 00369FD8 48 01 46 11 */ bl OSRestoreInterrupts +/* 8036D07C 00369FDC 7F E3 FB 78 */ mr r3, r31 +/* 8036D080 00369FE0 80 01 00 1C */ lwz r0, 0x1c(r1) +/* 8036D084 00369FE4 83 E1 00 14 */ lwz r31, 0x14(r1) +/* 8036D088 00369FE8 83 C1 00 10 */ lwz r30, 0x10(r1) +/* 8036D08C 00369FEC 38 21 00 18 */ addi r1, r1, 0x18 +/* 8036D090 00369FF0 7C 08 03 A6 */ mtlr r0 +/* 8036D094 00369FF4 4E 80 00 20 */ blr + +.global sub_8036d098 +sub_8036d098: +/* 8036D098 00369FF8 3C 60 CC 00 */ lis r3, 0xCC006C00@ha +/* 8036D09C 00369FFC 80 03 6C 00 */ lwz r0, 0xCC006C00@l(r3) +/* 8036D0A0 0036A000 54 00 06 F2 */ rlwinm r0, r0, 0, 0x1b, 0x19 +/* 8036D0A4 0036A004 60 00 00 20 */ ori r0, r0, 0x20 +/* 8036D0A8 0036A008 90 03 6C 00 */ stw r0, 0x6c00(r3) +/* 8036D0AC 0036A00C 4E 80 00 20 */ blr + +.global SetTRKConnected +SetTRKConnected: +/* 8036D0B0 0036A010 3C 80 CC 00 */ lis r4, 0xCC006C0C@ha +/* 8036D0B4 0036A014 90 64 6C 0C */ stw r3, 0xCC006C0C@l(r4) +/* 8036D0B8 0036A018 4E 80 00 20 */ blr + +.global AISetStreamPlayState +AISetStreamPlayState: +/* 8036D0BC 0036A01C 7C 08 02 A6 */ mflr r0 +/* 8036D0C0 0036A020 90 01 00 04 */ stw r0, 4(r1) +/* 8036D0C4 0036A024 94 21 FF E0 */ stwu r1, -0x20(r1) +/* 8036D0C8 0036A028 93 E1 00 1C */ stw r31, 0x1c(r1) +/* 8036D0CC 0036A02C 93 C1 00 18 */ stw r30, 0x18(r1) +/* 8036D0D0 0036A030 93 A1 00 14 */ stw r29, 0x14(r1) +/* 8036D0D4 0036A034 7C 7D 1B 78 */ mr r29, r3 +/* 8036D0D8 0036A038 48 00 00 BD */ bl AIGetStreamPlayState +/* 8036D0DC 0036A03C 7C 1D 18 40 */ cmplw r29, r3 +/* 8036D0E0 0036A040 41 82 00 98 */ beq lbl_8036D178 +/* 8036D0E4 0036A044 48 00 02 89 */ bl AIGetStreamSampleRate +/* 8036D0E8 0036A048 28 03 00 00 */ cmplwi r3, 0 +/* 8036D0EC 0036A04C 40 82 00 78 */ bne lbl_8036D164 +/* 8036D0F0 0036A050 28 1D 00 01 */ cmplwi r29, 1 +/* 8036D0F4 0036A054 40 82 00 70 */ bne lbl_8036D164 +/* 8036D0F8 0036A058 48 00 02 CD */ bl AIGetStreamVolRight +/* 8036D0FC 0036A05C 7C 7E 1B 78 */ mr r30, r3 +/* 8036D100 0036A060 48 00 02 99 */ bl AIGetStreamVolLeft +/* 8036D104 0036A064 3B A3 00 00 */ addi r29, r3, 0 +/* 8036D108 0036A068 38 60 00 00 */ li r3, 0 +/* 8036D10C 0036A06C 48 00 02 9D */ bl AISetStreamVolRight +/* 8036D110 0036A070 38 60 00 00 */ li r3, 0 +/* 8036D114 0036A074 48 00 02 69 */ bl AISetStreamVolLeft +/* 8036D118 0036A078 48 01 45 49 */ bl OSDisableInterrupts +/* 8036D11C 0036A07C 7C 7F 1B 78 */ mr r31, r3 +/* 8036D120 0036A080 48 00 05 A1 */ bl __AI_SRC_INIT +/* 8036D124 0036A084 3C 80 CC 00 */ lis r4, 0xCC006C00@ha +/* 8036D128 0036A088 80 04 6C 00 */ lwz r0, 0xCC006C00@l(r4) +/* 8036D12C 0036A08C 38 7F 00 00 */ addi r3, r31, 0 +/* 8036D130 0036A090 54 00 06 F2 */ rlwinm r0, r0, 0, 0x1b, 0x19 +/* 8036D134 0036A094 60 00 00 20 */ ori r0, r0, 0x20 +/* 8036D138 0036A098 90 04 6C 00 */ stw r0, 0x6c00(r4) +/* 8036D13C 0036A09C 80 04 6C 00 */ lwz r0, 0x6c00(r4) +/* 8036D140 0036A0A0 54 00 00 3C */ rlwinm r0, r0, 0, 0, 0x1e +/* 8036D144 0036A0A4 60 00 00 01 */ ori r0, r0, 1 +/* 8036D148 0036A0A8 90 04 6C 00 */ stw r0, 0x6c00(r4) +/* 8036D14C 0036A0AC 48 01 45 3D */ bl OSRestoreInterrupts +/* 8036D150 0036A0B0 7F C3 F3 78 */ mr r3, r30 +/* 8036D154 0036A0B4 48 00 02 29 */ bl AISetStreamVolLeft +/* 8036D158 0036A0B8 7F A3 EB 78 */ mr r3, r29 +/* 8036D15C 0036A0BC 48 00 02 4D */ bl AISetStreamVolRight +/* 8036D160 0036A0C0 48 00 00 18 */ b lbl_8036D178 +lbl_8036D164: +/* 8036D164 0036A0C4 3C 60 CC 00 */ lis r3, 0xCC006C00@ha +/* 8036D168 0036A0C8 80 03 6C 00 */ lwz r0, 0xCC006C00@l(r3) +/* 8036D16C 0036A0CC 54 00 00 3C */ rlwinm r0, r0, 0, 0, 0x1e +/* 8036D170 0036A0D0 7C 00 EB 78 */ or r0, r0, r29 +/* 8036D174 0036A0D4 90 03 6C 00 */ stw r0, 0x6c00(r3) +lbl_8036D178: +/* 8036D178 0036A0D8 80 01 00 24 */ lwz r0, 0x24(r1) +/* 8036D17C 0036A0DC 83 E1 00 1C */ lwz r31, 0x1c(r1) +/* 8036D180 0036A0E0 83 C1 00 18 */ lwz r30, 0x18(r1) +/* 8036D184 0036A0E4 83 A1 00 14 */ lwz r29, 0x14(r1) +/* 8036D188 0036A0E8 38 21 00 20 */ addi r1, r1, 0x20 +/* 8036D18C 0036A0EC 7C 08 03 A6 */ mtlr r0 +/* 8036D190 0036A0F0 4E 80 00 20 */ blr + +.global AIGetStreamPlayState +AIGetStreamPlayState: +/* 8036D194 0036A0F4 3C 60 CC 00 */ lis r3, 0xCC006C00@ha +/* 8036D198 0036A0F8 80 03 6C 00 */ lwz r0, 0xCC006C00@l(r3) +/* 8036D19C 0036A0FC 54 03 07 FE */ clrlwi r3, r0, 0x1f +/* 8036D1A0 0036A100 4E 80 00 20 */ blr + +.global AISetDSPSampleRate +AISetDSPSampleRate: +/* 8036D1A4 0036A104 7C 08 02 A6 */ mflr r0 +/* 8036D1A8 0036A108 90 01 00 04 */ stw r0, 4(r1) +/* 8036D1AC 0036A10C 94 21 FF D8 */ stwu r1, -0x28(r1) +/* 8036D1B0 0036A110 BF 41 00 10 */ stmw r26, 0x10(r1) +/* 8036D1B4 0036A114 7C 7A 1B 78 */ mr r26, r3 +/* 8036D1B8 0036A118 48 00 00 CD */ bl AIGetDSPSampleRate +/* 8036D1BC 0036A11C 7C 1A 18 40 */ cmplw r26, r3 +/* 8036D1C0 0036A120 41 82 00 B0 */ beq lbl_8036D270 +/* 8036D1C4 0036A124 3F E0 CC 00 */ lis r31, 0xCC006C00@ha +/* 8036D1C8 0036A128 80 1F 6C 00 */ lwz r0, 0xCC006C00@l(r31) +/* 8036D1CC 0036A12C 28 1A 00 00 */ cmplwi r26, 0 +/* 8036D1D0 0036A130 54 00 06 B0 */ rlwinm r0, r0, 0, 0x1a, 0x18 +/* 8036D1D4 0036A134 90 1F 6C 00 */ stw r0, 0x6c00(r31) +/* 8036D1D8 0036A138 40 82 00 98 */ bne lbl_8036D270 +/* 8036D1DC 0036A13C 48 00 01 BD */ bl AIGetStreamVolLeft +/* 8036D1E0 0036A140 7C 7E 1B 78 */ mr r30, r3 +/* 8036D1E4 0036A144 48 00 01 E1 */ bl AIGetStreamVolRight +/* 8036D1E8 0036A148 80 1F 6C 00 */ lwz r0, 0x6c00(r31) +/* 8036D1EC 0036A14C 3B A3 00 00 */ addi r29, r3, 0 +/* 8036D1F0 0036A150 54 1B 07 FE */ clrlwi r27, r0, 0x1f +/* 8036D1F4 0036A154 48 00 01 79 */ bl AIGetStreamSampleRate +/* 8036D1F8 0036A158 3B 83 00 00 */ addi r28, r3, 0 +/* 8036D1FC 0036A15C 38 60 00 00 */ li r3, 0 +/* 8036D200 0036A160 48 00 01 7D */ bl AISetStreamVolLeft +/* 8036D204 0036A164 38 60 00 00 */ li r3, 0 +/* 8036D208 0036A168 48 00 01 A1 */ bl AISetStreamVolRight +/* 8036D20C 0036A16C 48 01 44 55 */ bl OSDisableInterrupts +/* 8036D210 0036A170 7C 7A 1B 78 */ mr r26, r3 +/* 8036D214 0036A174 48 00 04 AD */ bl __AI_SRC_INIT +/* 8036D218 0036A178 80 9F 6C 00 */ lwz r4, 0x6c00(r31) +/* 8036D21C 0036A17C 57 80 08 3C */ slwi r0, r28, 1 +/* 8036D220 0036A180 38 7A 00 00 */ addi r3, r26, 0 +/* 8036D224 0036A184 54 84 06 F2 */ rlwinm r4, r4, 0, 0x1b, 0x19 +/* 8036D228 0036A188 60 84 00 20 */ ori r4, r4, 0x20 +/* 8036D22C 0036A18C 90 9F 6C 00 */ stw r4, 0x6c00(r31) +/* 8036D230 0036A190 80 9F 6C 00 */ lwz r4, 0x6c00(r31) +/* 8036D234 0036A194 54 84 07 FA */ rlwinm r4, r4, 0, 0x1f, 0x1d +/* 8036D238 0036A198 7C 80 03 78 */ or r0, r4, r0 +/* 8036D23C 0036A19C 90 1F 6C 00 */ stw r0, 0x6c00(r31) +/* 8036D240 0036A1A0 80 1F 6C 00 */ lwz r0, 0x6c00(r31) +/* 8036D244 0036A1A4 54 00 00 3C */ rlwinm r0, r0, 0, 0, 0x1e +/* 8036D248 0036A1A8 7C 00 DB 78 */ or r0, r0, r27 +/* 8036D24C 0036A1AC 90 1F 6C 00 */ stw r0, 0x6c00(r31) +/* 8036D250 0036A1B0 80 1F 6C 00 */ lwz r0, 0x6c00(r31) +/* 8036D254 0036A1B4 60 00 00 40 */ ori r0, r0, 0x40 +/* 8036D258 0036A1B8 90 1F 6C 00 */ stw r0, 0x6c00(r31) +/* 8036D25C 0036A1BC 48 01 44 2D */ bl OSRestoreInterrupts +/* 8036D260 0036A1C0 7F C3 F3 78 */ mr r3, r30 +/* 8036D264 0036A1C4 48 00 01 19 */ bl AISetStreamVolLeft +/* 8036D268 0036A1C8 7F A3 EB 78 */ mr r3, r29 +/* 8036D26C 0036A1CC 48 00 01 3D */ bl AISetStreamVolRight +lbl_8036D270: +/* 8036D270 0036A1D0 BB 41 00 10 */ lmw r26, 0x10(r1) +/* 8036D274 0036A1D4 80 01 00 2C */ lwz r0, 0x2c(r1) +/* 8036D278 0036A1D8 38 21 00 28 */ addi r1, r1, 0x28 +/* 8036D27C 0036A1DC 7C 08 03 A6 */ mtlr r0 +/* 8036D280 0036A1E0 4E 80 00 20 */ blr + +.global AIGetDSPSampleRate +AIGetDSPSampleRate: +/* 8036D284 0036A1E4 3C 60 CC 00 */ lis r3, 0xCC006C00@ha +/* 8036D288 0036A1E8 80 03 6C 00 */ lwz r0, 0xCC006C00@l(r3) +/* 8036D28C 0036A1EC 54 00 D7 FE */ rlwinm r0, r0, 0x1a, 0x1f, 0x1f +/* 8036D290 0036A1F0 68 03 00 01 */ xori r3, r0, 1 +/* 8036D294 0036A1F4 4E 80 00 20 */ blr + +.global __AI_set_stream_sample_rate +__AI_set_stream_sample_rate: +/* 8036D298 0036A1F8 7C 08 02 A6 */ mflr r0 +/* 8036D29C 0036A1FC 90 01 00 04 */ stw r0, 4(r1) +/* 8036D2A0 0036A200 94 21 FF D0 */ stwu r1, -0x30(r1) +/* 8036D2A4 0036A204 BF 21 00 14 */ stmw r25, 0x14(r1) +/* 8036D2A8 0036A208 7C 79 1B 78 */ mr r25, r3 +/* 8036D2AC 0036A20C 48 00 00 C1 */ bl AIGetStreamSampleRate +/* 8036D2B0 0036A210 7C 19 18 40 */ cmplw r25, r3 +/* 8036D2B4 0036A214 41 82 00 A4 */ beq lbl_8036D358 +/* 8036D2B8 0036A218 3F E0 CC 00 */ lis r31, 0xCC006C00@ha +/* 8036D2BC 0036A21C 80 1F 6C 00 */ lwz r0, 0xCC006C00@l(r31) +/* 8036D2C0 0036A220 54 00 07 FE */ clrlwi r0, r0, 0x1f +/* 8036D2C4 0036A224 7C 1D 03 78 */ mr r29, r0 +/* 8036D2C8 0036A228 48 00 00 D1 */ bl AIGetStreamVolLeft +/* 8036D2CC 0036A22C 7C 7C 1B 78 */ mr r28, r3 +/* 8036D2D0 0036A230 48 00 00 F5 */ bl AIGetStreamVolRight +/* 8036D2D4 0036A234 3B 63 00 00 */ addi r27, r3, 0 +/* 8036D2D8 0036A238 38 60 00 00 */ li r3, 0 +/* 8036D2DC 0036A23C 48 00 00 CD */ bl AISetStreamVolRight +/* 8036D2E0 0036A240 38 60 00 00 */ li r3, 0 +/* 8036D2E4 0036A244 48 00 00 99 */ bl AISetStreamVolLeft +/* 8036D2E8 0036A248 80 7F 6C 00 */ lwz r3, 0x6c00(r31) +/* 8036D2EC 0036A24C 80 1F 6C 00 */ lwz r0, 0x6c00(r31) +/* 8036D2F0 0036A250 54 7A 06 72 */ rlwinm r26, r3, 0, 0x19, 0x19 +/* 8036D2F4 0036A254 54 00 06 B0 */ rlwinm r0, r0, 0, 0x1a, 0x18 +/* 8036D2F8 0036A258 90 1F 6C 00 */ stw r0, 0x6c00(r31) +/* 8036D2FC 0036A25C 48 01 43 65 */ bl OSDisableInterrupts +/* 8036D300 0036A260 7C 7E 1B 78 */ mr r30, r3 +/* 8036D304 0036A264 48 00 03 BD */ bl __AI_SRC_INIT +/* 8036D308 0036A268 80 9F 6C 00 */ lwz r4, 0x6c00(r31) +/* 8036D30C 0036A26C 57 20 08 3C */ slwi r0, r25, 1 +/* 8036D310 0036A270 38 7E 00 00 */ addi r3, r30, 0 +/* 8036D314 0036A274 7C 84 D3 78 */ or r4, r4, r26 +/* 8036D318 0036A278 90 9F 6C 00 */ stw r4, 0x6c00(r31) +/* 8036D31C 0036A27C 80 9F 6C 00 */ lwz r4, 0x6c00(r31) +/* 8036D320 0036A280 54 84 06 F2 */ rlwinm r4, r4, 0, 0x1b, 0x19 +/* 8036D324 0036A284 60 84 00 20 */ ori r4, r4, 0x20 +/* 8036D328 0036A288 90 9F 6C 00 */ stw r4, 0x6c00(r31) +/* 8036D32C 0036A28C 80 9F 6C 00 */ lwz r4, 0x6c00(r31) +/* 8036D330 0036A290 54 84 07 FA */ rlwinm r4, r4, 0, 0x1f, 0x1d +/* 8036D334 0036A294 7C 80 03 78 */ or r0, r4, r0 +/* 8036D338 0036A298 90 1F 6C 00 */ stw r0, 0x6c00(r31) +/* 8036D33C 0036A29C 48 01 43 4D */ bl OSRestoreInterrupts +/* 8036D340 0036A2A0 7F A3 EB 78 */ mr r3, r29 +/* 8036D344 0036A2A4 4B FF FD 79 */ bl AISetStreamPlayState +/* 8036D348 0036A2A8 7F 83 E3 78 */ mr r3, r28 +/* 8036D34C 0036A2AC 48 00 00 31 */ bl AISetStreamVolLeft +/* 8036D350 0036A2B0 7F 63 DB 78 */ mr r3, r27 +/* 8036D354 0036A2B4 48 00 00 55 */ bl AISetStreamVolRight +lbl_8036D358: +/* 8036D358 0036A2B8 BB 21 00 14 */ lmw r25, 0x14(r1) +/* 8036D35C 0036A2BC 80 01 00 34 */ lwz r0, 0x34(r1) +/* 8036D360 0036A2C0 38 21 00 30 */ addi r1, r1, 0x30 +/* 8036D364 0036A2C4 7C 08 03 A6 */ mtlr r0 +/* 8036D368 0036A2C8 4E 80 00 20 */ blr + +.global AIGetStreamSampleRate +AIGetStreamSampleRate: +/* 8036D36C 0036A2CC 3C 60 CC 00 */ lis r3, 0xCC006C00@ha +/* 8036D370 0036A2D0 80 03 6C 00 */ lwz r0, 0xCC006C00@l(r3) +/* 8036D374 0036A2D4 54 03 FF FE */ rlwinm r3, r0, 0x1f, 0x1f, 0x1f +/* 8036D378 0036A2D8 4E 80 00 20 */ blr + +.global AISetStreamVolLeft +AISetStreamVolLeft: +/* 8036D37C 0036A2DC 3C 80 CC 00 */ lis r4, 0xCC006C00@ha +/* 8036D380 0036A2E0 38 84 6C 00 */ addi r4, r4, 0xCC006C00@l +/* 8036D384 0036A2E4 80 04 00 04 */ lwz r0, 4(r4) +/* 8036D388 0036A2E8 54 00 00 2E */ rlwinm r0, r0, 0, 0, 0x17 +/* 8036D38C 0036A2EC 50 60 06 3E */ rlwimi r0, r3, 0, 0x18, 0x1f +/* 8036D390 0036A2F0 90 04 00 04 */ stw r0, 4(r4) +/* 8036D394 0036A2F4 4E 80 00 20 */ blr + +.global AIGetStreamVolLeft +AIGetStreamVolLeft: +/* 8036D398 0036A2F8 3C 60 CC 00 */ lis r3, 0xCC006C04@ha +/* 8036D39C 0036A2FC 80 03 6C 04 */ lwz r0, 0xCC006C04@l(r3) +/* 8036D3A0 0036A300 54 03 06 3E */ clrlwi r3, r0, 0x18 +/* 8036D3A4 0036A304 4E 80 00 20 */ blr + +.global AISetStreamVolRight +AISetStreamVolRight: +/* 8036D3A8 0036A308 3C 80 CC 00 */ lis r4, 0xCC006C00@ha +/* 8036D3AC 0036A30C 38 84 6C 00 */ addi r4, r4, 0xCC006C00@l +/* 8036D3B0 0036A310 80 04 00 04 */ lwz r0, 4(r4) +/* 8036D3B4 0036A314 54 00 06 1E */ rlwinm r0, r0, 0, 0x18, 0xf +/* 8036D3B8 0036A318 50 60 44 2E */ rlwimi r0, r3, 8, 0x10, 0x17 +/* 8036D3BC 0036A31C 90 04 00 04 */ stw r0, 4(r4) +/* 8036D3C0 0036A320 4E 80 00 20 */ blr + +.global AIGetStreamVolRight +AIGetStreamVolRight: +/* 8036D3C4 0036A324 3C 60 CC 00 */ lis r3, 0xCC006C04@ha +/* 8036D3C8 0036A328 80 03 6C 04 */ lwz r0, 0xCC006C04@l(r3) +/* 8036D3CC 0036A32C 54 03 C6 3E */ rlwinm r3, r0, 0x18, 0x18, 0x1f +/* 8036D3D0 0036A330 4E 80 00 20 */ blr + +.global AIInit +AIInit: +/* 8036D3D4 0036A334 7C 08 02 A6 */ mflr r0 +/* 8036D3D8 0036A338 90 01 00 04 */ stw r0, 4(r1) +/* 8036D3DC 0036A33C 94 21 FF E8 */ stwu r1, -0x18(r1) +/* 8036D3E0 0036A340 93 E1 00 14 */ stw r31, 0x14(r1) +/* 8036D3E4 0036A344 93 C1 00 10 */ stw r30, 0x10(r1) +/* 8036D3E8 0036A348 3B C3 00 00 */ addi r30, r3, 0 +/* 8036D3EC 0036A34C 80 0D AB 08 */ lwz r0, lbl_805A96C8@sda21(r13) +/* 8036D3F0 0036A350 2C 00 00 01 */ cmpwi r0, 1 +/* 8036D3F4 0036A354 41 82 01 34 */ beq lbl_8036D528 +/* 8036D3F8 0036A358 80 6D 9E A8 */ lwz r3, lbl_805A8A68@sda21(r13) +/* 8036D3FC 0036A35C 48 01 0C 3D */ bl OSRegisterVersion +/* 8036D400 0036A360 3C 60 80 00 */ lis r3, 0x800000F8@ha +/* 8036D404 0036A364 80 03 00 F8 */ lwz r0, 0x800000F8@l(r3) +/* 8036D408 0036A368 3C 60 43 1C */ lis r3, 0x431BDE83@ha +/* 8036D40C 0036A36C 3C 80 00 01 */ lis r4, 0x0000A428@ha +/* 8036D410 0036A370 54 00 F0 BE */ srwi r0, r0, 2 +/* 8036D414 0036A374 38 63 DE 83 */ addi r3, r3, 0x431BDE83@l +/* 8036D418 0036A378 7C 03 00 16 */ mulhwu r0, r3, r0 +/* 8036D41C 0036A37C 54 09 8B FE */ srwi r9, r0, 0xf +/* 8036D420 0036A380 38 A4 A4 28 */ addi r5, r4, 0x0000A428@l +/* 8036D424 0036A384 38 64 A4 10 */ addi r3, r4, -23536 +/* 8036D428 0036A388 38 04 F6 18 */ addi r0, r4, -2536 +/* 8036D42C 0036A38C 3C 80 10 62 */ lis r4, 0x10624DD3@ha +/* 8036D430 0036A390 7C E9 29 D6 */ mullw r7, r9, r5 +/* 8036D434 0036A394 39 44 4D D3 */ addi r10, r4, 0x10624DD3@l +/* 8036D438 0036A398 7C A9 19 D6 */ mullw r5, r9, r3 +/* 8036D43C 0036A39C 7C 89 01 D6 */ mullw r4, r9, r0 +/* 8036D440 0036A3A0 1D 09 7B 24 */ mulli r8, r9, 0x7b24 +/* 8036D444 0036A3A4 1C 69 0B B8 */ mulli r3, r9, 0xbb8 +/* 8036D448 0036A3A8 7D 0A 40 16 */ mulhwu r8, r10, r8 +/* 8036D44C 0036A3AC 7C EA 38 16 */ mulhwu r7, r10, r7 +/* 8036D450 0036A3B0 7C AA 28 16 */ mulhwu r5, r10, r5 +/* 8036D454 0036A3B4 7C 8A 20 16 */ mulhwu r4, r10, r4 +/* 8036D458 0036A3B8 7C 6A 18 16 */ mulhwu r3, r10, r3 +/* 8036D45C 0036A3BC 55 08 BA 7E */ srwi r8, r8, 9 +/* 8036D460 0036A3C0 54 E7 BA 7E */ srwi r7, r7, 9 +/* 8036D464 0036A3C4 91 0D AB 14 */ stw r8, lbl_805A96D4@sda21(r13) +/* 8036D468 0036A3C8 54 A5 BA 7E */ srwi r5, r5, 9 +/* 8036D46C 0036A3CC 54 84 BA 7E */ srwi r4, r4, 9 +/* 8036D470 0036A3D0 90 ED AB 1C */ stw r7, lbl_805A96DC@sda21(r13) +/* 8036D474 0036A3D4 3B E0 00 00 */ li r31, 0 +/* 8036D478 0036A3D8 54 63 BA 7E */ srwi r3, r3, 9 +/* 8036D47C 0036A3DC 90 AD AB 24 */ stw r5, lbl_805A96E4@sda21(r13) +/* 8036D480 0036A3E0 3C C0 CC 00 */ lis r6, 0xCC006C00@ha +/* 8036D484 0036A3E4 90 6D AB 34 */ stw r3, lbl_805A96F4@sda21(r13) +/* 8036D488 0036A3E8 38 60 00 01 */ li r3, 1 +/* 8036D48C 0036A3EC 80 06 6C 00 */ lwz r0, 0xCC006C00@l(r6) +/* 8036D490 0036A3F0 90 8D AB 2C */ stw r4, lbl_805A96EC@sda21(r13) +/* 8036D494 0036A3F4 54 00 06 F2 */ rlwinm r0, r0, 0, 0x1b, 0x19 +/* 8036D498 0036A3F8 60 00 00 20 */ ori r0, r0, 0x20 +/* 8036D49C 0036A3FC 93 ED AB 10 */ stw r31, lbl_805A96D0@sda21(r13) +/* 8036D4A0 0036A400 93 ED AB 18 */ stw r31, lbl_805A96D8@sda21(r13) +/* 8036D4A4 0036A404 93 ED AB 20 */ stw r31, lbl_805A96E0@sda21(r13) +/* 8036D4A8 0036A408 93 ED AB 28 */ stw r31, lbl_805A96E8@sda21(r13) +/* 8036D4AC 0036A40C 93 ED AB 30 */ stw r31, lbl_805A96F0@sda21(r13) +/* 8036D4B0 0036A410 80 A6 6C 04 */ lwz r5, 0x6c04(r6) +/* 8036D4B4 0036A414 90 06 6C 00 */ stw r0, 0x6c00(r6) +/* 8036D4B8 0036A418 54 A0 06 1E */ rlwinm r0, r5, 0, 0x18, 0xf +/* 8036D4BC 0036A41C 60 00 00 00 */ nop +/* 8036D4C0 0036A420 90 06 6C 04 */ stw r0, 0x6c04(r6) +/* 8036D4C4 0036A424 80 06 6C 04 */ lwz r0, 0x6c04(r6) +/* 8036D4C8 0036A428 54 00 00 2E */ rlwinm r0, r0, 0, 0, 0x17 +/* 8036D4CC 0036A42C 60 00 00 00 */ nop +/* 8036D4D0 0036A430 90 06 6C 04 */ stw r0, 0x6c04(r6) +/* 8036D4D4 0036A434 93 E6 6C 0C */ stw r31, 0x6c0c(r6) +/* 8036D4D8 0036A438 4B FF FD C1 */ bl __AI_set_stream_sample_rate +/* 8036D4DC 0036A43C 38 60 00 00 */ li r3, 0 +/* 8036D4E0 0036A440 4B FF FC C5 */ bl AISetDSPSampleRate +/* 8036D4E4 0036A444 3C 60 80 37 */ lis r3, __AIDHandler@ha +/* 8036D4E8 0036A448 93 ED AA F8 */ stw r31, lbl_805A96B8@sda21(r13) +/* 8036D4EC 0036A44C 38 83 D5 BC */ addi r4, r3, __AIDHandler@l +/* 8036D4F0 0036A450 93 ED AA FC */ stw r31, lbl_805A96BC@sda21(r13) +/* 8036D4F4 0036A454 38 60 00 05 */ li r3, 5 +/* 8036D4F8 0036A458 93 CD AB 00 */ stw r30, lbl_805A96C0@sda21(r13) +/* 8036D4FC 0036A45C 48 01 41 B1 */ bl __OSSetInterruptHandler +/* 8036D500 0036A460 3C 60 04 00 */ lis r3, 0x400 +/* 8036D504 0036A464 48 01 45 AD */ bl __OSUnmaskInterrupts +/* 8036D508 0036A468 3C 60 80 37 */ lis r3, __AISHandler@ha +/* 8036D50C 0036A46C 38 83 D5 40 */ addi r4, r3, __AISHandler@l +/* 8036D510 0036A470 38 60 00 08 */ li r3, 8 +/* 8036D514 0036A474 48 01 41 99 */ bl __OSSetInterruptHandler +/* 8036D518 0036A478 3C 60 00 80 */ lis r3, 0x80 +/* 8036D51C 0036A47C 48 01 45 95 */ bl __OSUnmaskInterrupts +/* 8036D520 0036A480 38 00 00 01 */ li r0, 1 +/* 8036D524 0036A484 90 0D AB 08 */ stw r0, lbl_805A96C8@sda21(r13) +lbl_8036D528: +/* 8036D528 0036A488 80 01 00 1C */ lwz r0, 0x1c(r1) +/* 8036D52C 0036A48C 83 E1 00 14 */ lwz r31, 0x14(r1) +/* 8036D530 0036A490 83 C1 00 10 */ lwz r30, 0x10(r1) +/* 8036D534 0036A494 38 21 00 18 */ addi r1, r1, 0x18 +/* 8036D538 0036A498 7C 08 03 A6 */ mtlr r0 +/* 8036D53C 0036A49C 4E 80 00 20 */ blr + +.global __AISHandler +__AISHandler: +/* 8036D540 0036A4A0 7C 08 02 A6 */ mflr r0 +/* 8036D544 0036A4A4 90 01 00 04 */ stw r0, 4(r1) +/* 8036D548 0036A4A8 94 21 FD 20 */ stwu r1, -0x2e0(r1) +/* 8036D54C 0036A4AC 93 E1 02 DC */ stw r31, 0x2dc(r1) +/* 8036D550 0036A4B0 3F E0 CC 00 */ lis r31, 0xCC006C00@ha +/* 8036D554 0036A4B4 80 1F 6C 00 */ lwz r0, 0xCC006C00@l(r31) +/* 8036D558 0036A4B8 38 61 00 10 */ addi r3, r1, 0x10 +/* 8036D55C 0036A4BC 93 C1 02 D8 */ stw r30, 0x2d8(r1) +/* 8036D560 0036A4C0 60 00 00 08 */ ori r0, r0, 8 +/* 8036D564 0036A4C4 90 1F 6C 00 */ stw r0, 0x6c00(r31) +/* 8036D568 0036A4C8 3B C4 00 00 */ addi r30, r4, 0 +/* 8036D56C 0036A4CC 48 01 20 A9 */ bl OSClearContext +/* 8036D570 0036A4D0 38 61 00 10 */ addi r3, r1, 0x10 +/* 8036D574 0036A4D4 48 01 1E A9 */ bl OSSetCurrentContext +/* 8036D578 0036A4D8 81 8D AA F8 */ lwz r12, lbl_805A96B8@sda21(r13) +/* 8036D57C 0036A4DC 28 0C 00 00 */ cmplwi r12, 0 +/* 8036D580 0036A4E0 41 82 00 14 */ beq lbl_8036D594 +/* 8036D584 0036A4E4 38 7F 6C 00 */ addi r3, r31, 0x6c00 +/* 8036D588 0036A4E8 7D 88 03 A6 */ mtlr r12 +/* 8036D58C 0036A4EC 80 63 00 08 */ lwz r3, 8(r3) +/* 8036D590 0036A4F0 4E 80 00 21 */ blrl +lbl_8036D594: +/* 8036D594 0036A4F4 38 61 00 10 */ addi r3, r1, 0x10 +/* 8036D598 0036A4F8 48 01 20 7D */ bl OSClearContext +/* 8036D59C 0036A4FC 7F C3 F3 78 */ mr r3, r30 +/* 8036D5A0 0036A500 48 01 1E 7D */ bl OSSetCurrentContext +/* 8036D5A4 0036A504 80 01 02 E4 */ lwz r0, 0x2e4(r1) +/* 8036D5A8 0036A508 83 E1 02 DC */ lwz r31, 0x2dc(r1) +/* 8036D5AC 0036A50C 83 C1 02 D8 */ lwz r30, 0x2d8(r1) +/* 8036D5B0 0036A510 38 21 02 E0 */ addi r1, r1, 0x2e0 +/* 8036D5B4 0036A514 7C 08 03 A6 */ mtlr r0 +/* 8036D5B8 0036A518 4E 80 00 20 */ blr + +.global __AIDHandler +__AIDHandler: +/* 8036D5BC 0036A51C 7C 08 02 A6 */ mflr r0 +/* 8036D5C0 0036A520 3C 60 CC 00 */ lis r3, 0xCC005000@ha +/* 8036D5C4 0036A524 90 01 00 04 */ stw r0, 4(r1) +/* 8036D5C8 0036A528 38 63 50 00 */ addi r3, r3, 0xCC005000@l +/* 8036D5CC 0036A52C 38 00 FF 5F */ li r0, -161 +/* 8036D5D0 0036A530 94 21 FD 20 */ stwu r1, -0x2e0(r1) +/* 8036D5D4 0036A534 93 E1 02 DC */ stw r31, 0x2dc(r1) +/* 8036D5D8 0036A538 3B E4 00 00 */ addi r31, r4, 0 +/* 8036D5DC 0036A53C A0 A3 00 0A */ lhz r5, 0xa(r3) +/* 8036D5E0 0036A540 7C A0 00 38 */ and r0, r5, r0 +/* 8036D5E4 0036A544 60 00 00 08 */ ori r0, r0, 8 +/* 8036D5E8 0036A548 B0 03 00 0A */ sth r0, 0xa(r3) +/* 8036D5EC 0036A54C 38 61 00 10 */ addi r3, r1, 0x10 +/* 8036D5F0 0036A550 48 01 20 25 */ bl OSClearContext +/* 8036D5F4 0036A554 38 61 00 10 */ addi r3, r1, 0x10 +/* 8036D5F8 0036A558 48 01 1E 25 */ bl OSSetCurrentContext +/* 8036D5FC 0036A55C 80 6D AA FC */ lwz r3, lbl_805A96BC@sda21(r13) +/* 8036D600 0036A560 28 03 00 00 */ cmplwi r3, 0 +/* 8036D604 0036A564 41 82 00 40 */ beq lbl_8036D644 +/* 8036D608 0036A568 80 0D AB 0C */ lwz r0, lbl_805A96CC@sda21(r13) +/* 8036D60C 0036A56C 2C 00 00 00 */ cmpwi r0, 0 +/* 8036D610 0036A570 40 82 00 34 */ bne lbl_8036D644 +/* 8036D614 0036A574 80 0D AB 00 */ lwz r0, lbl_805A96C0@sda21(r13) +/* 8036D618 0036A578 38 80 00 01 */ li r4, 1 +/* 8036D61C 0036A57C 90 8D AB 0C */ stw r4, lbl_805A96CC@sda21(r13) +/* 8036D620 0036A580 28 00 00 00 */ cmplwi r0, 0 +/* 8036D624 0036A584 41 82 00 0C */ beq lbl_8036D630 +/* 8036D628 0036A588 48 00 00 41 */ bl __AICallbackStackSwitch +/* 8036D62C 0036A58C 48 00 00 10 */ b lbl_8036D63C +lbl_8036D630: +/* 8036D630 0036A590 39 83 00 00 */ addi r12, r3, 0 +/* 8036D634 0036A594 7D 88 03 A6 */ mtlr r12 +/* 8036D638 0036A598 4E 80 00 21 */ blrl +lbl_8036D63C: +/* 8036D63C 0036A59C 38 00 00 00 */ li r0, 0 +/* 8036D640 0036A5A0 90 0D AB 0C */ stw r0, lbl_805A96CC@sda21(r13) +lbl_8036D644: +/* 8036D644 0036A5A4 38 61 00 10 */ addi r3, r1, 0x10 +/* 8036D648 0036A5A8 48 01 1F CD */ bl OSClearContext +/* 8036D64C 0036A5AC 7F E3 FB 78 */ mr r3, r31 +/* 8036D650 0036A5B0 48 01 1D CD */ bl OSSetCurrentContext +/* 8036D654 0036A5B4 80 01 02 E4 */ lwz r0, 0x2e4(r1) +/* 8036D658 0036A5B8 83 E1 02 DC */ lwz r31, 0x2dc(r1) +/* 8036D65C 0036A5BC 38 21 02 E0 */ addi r1, r1, 0x2e0 +/* 8036D660 0036A5C0 7C 08 03 A6 */ mtlr r0 +/* 8036D664 0036A5C4 4E 80 00 20 */ blr + +.global __AICallbackStackSwitch +__AICallbackStackSwitch: +/* 8036D668 0036A5C8 7C 08 02 A6 */ mflr r0 +/* 8036D66C 0036A5CC 90 01 00 04 */ stw r0, 4(r1) +/* 8036D670 0036A5D0 94 21 FF E8 */ stwu r1, -0x18(r1) +/* 8036D674 0036A5D4 93 E1 00 14 */ stw r31, 0x14(r1) +/* 8036D678 0036A5D8 7C 7F 1B 78 */ mr r31, r3 +/* 8036D67C 0036A5DC 3C A0 80 5B */ lis r5, lbl_805A96C4@ha +/* 8036D680 0036A5E0 38 A5 96 C4 */ addi r5, r5, lbl_805A96C4@l +/* 8036D684 0036A5E4 90 25 00 00 */ stw r1, 0(r5) +/* 8036D688 0036A5E8 3C A0 80 5B */ lis r5, lbl_805A96C0@ha +/* 8036D68C 0036A5EC 38 A5 96 C0 */ addi r5, r5, lbl_805A96C0@l +/* 8036D690 0036A5F0 80 25 00 00 */ lwz r1, 0(r5) +/* 8036D694 0036A5F4 38 21 FF F8 */ addi r1, r1, -8 +/* 8036D698 0036A5F8 7F E8 03 A6 */ mtlr r31 +/* 8036D69C 0036A5FC 4E 80 00 21 */ blrl +/* 8036D6A0 0036A600 3C A0 80 5B */ lis r5, lbl_805A96C4@ha +/* 8036D6A4 0036A604 38 A5 96 C4 */ addi r5, r5, lbl_805A96C4@l +/* 8036D6A8 0036A608 80 25 00 00 */ lwz r1, 0(r5) +/* 8036D6AC 0036A60C 80 01 00 1C */ lwz r0, 0x1c(r1) +/* 8036D6B0 0036A610 83 E1 00 14 */ lwz r31, 0x14(r1) +/* 8036D6B4 0036A614 38 21 00 18 */ addi r1, r1, 0x18 +/* 8036D6B8 0036A618 7C 08 03 A6 */ mtlr r0 +/* 8036D6BC 0036A61C 4E 80 00 20 */ blr + +.global __AI_SRC_INIT +__AI_SRC_INIT: +/* 8036D6C0 0036A620 7C 08 02 A6 */ mflr r0 +/* 8036D6C4 0036A624 90 01 00 04 */ stw r0, 4(r1) +/* 8036D6C8 0036A628 94 21 FF D0 */ stwu r1, -0x30(r1) +/* 8036D6CC 0036A62C BF 41 00 18 */ stmw r26, 0x18(r1) +/* 8036D6D0 0036A630 38 80 00 00 */ li r4, 0 +/* 8036D6D4 0036A634 38 60 00 00 */ li r3, 0 +/* 8036D6D8 0036A638 38 00 00 00 */ li r0, 0 +/* 8036D6DC 0036A63C 3B 80 00 00 */ li r28, 0 +/* 8036D6E0 0036A640 3B A0 00 00 */ li r29, 0 +/* 8036D6E4 0036A644 48 00 00 04 */ b lbl_8036D6E8 +lbl_8036D6E8: +/* 8036D6E8 0036A648 3F E0 CC 00 */ lis r31, 0xcc00 +/* 8036D6EC 0036A64C 48 00 00 04 */ b lbl_8036D6F0 +lbl_8036D6F0: +/* 8036D6F0 0036A650 48 00 01 64 */ b lbl_8036D854 +lbl_8036D6F4: +/* 8036D6F4 0036A654 80 1F 6C 00 */ lwz r0, 0x6c00(r31) +/* 8036D6F8 0036A658 3B DF 6C 00 */ addi r30, r31, 0x6c00 +/* 8036D6FC 0036A65C 3B DE 00 08 */ addi r30, r30, 8 +/* 8036D700 0036A660 54 00 06 F2 */ rlwinm r0, r0, 0, 0x1b, 0x19 +/* 8036D704 0036A664 60 00 00 20 */ ori r0, r0, 0x20 +/* 8036D708 0036A668 90 1F 6C 00 */ stw r0, 0x6c00(r31) +/* 8036D70C 0036A66C 80 1F 6C 00 */ lwz r0, 0x6c00(r31) +/* 8036D710 0036A670 54 00 07 FA */ rlwinm r0, r0, 0, 0x1f, 0x1d +/* 8036D714 0036A674 90 1F 6C 00 */ stw r0, 0x6c00(r31) +/* 8036D718 0036A678 80 1F 6C 00 */ lwz r0, 0x6c00(r31) +/* 8036D71C 0036A67C 54 00 00 3C */ rlwinm r0, r0, 0, 0, 0x1e +/* 8036D720 0036A680 60 00 00 01 */ ori r0, r0, 1 +/* 8036D724 0036A684 90 1F 6C 00 */ stw r0, 0x6c00(r31) +/* 8036D728 0036A688 80 7E 00 00 */ lwz r3, 0(r30) +/* 8036D72C 0036A68C 48 00 00 04 */ b lbl_8036D730 +lbl_8036D730: +/* 8036D730 0036A690 48 00 00 04 */ b lbl_8036D734 +lbl_8036D734: +/* 8036D734 0036A694 80 1E 00 00 */ lwz r0, 0(r30) +/* 8036D738 0036A698 7C 03 00 40 */ cmplw r3, r0 +/* 8036D73C 0036A69C 41 82 FF F8 */ beq lbl_8036D734 +/* 8036D740 0036A6A0 48 01 7C 69 */ bl OSGetTime +/* 8036D744 0036A6A4 80 1F 6C 00 */ lwz r0, 0x6c00(r31) +/* 8036D748 0036A6A8 7C 9A 23 78 */ mr r26, r4 +/* 8036D74C 0036A6AC 7C 7B 1B 78 */ mr r27, r3 +/* 8036D750 0036A6B0 54 00 07 FA */ rlwinm r0, r0, 0, 0x1f, 0x1d +/* 8036D754 0036A6B4 60 00 00 02 */ ori r0, r0, 2 +/* 8036D758 0036A6B8 90 1F 6C 00 */ stw r0, 0x6c00(r31) +/* 8036D75C 0036A6BC 80 1F 6C 00 */ lwz r0, 0x6c00(r31) +/* 8036D760 0036A6C0 54 00 00 3C */ rlwinm r0, r0, 0, 0, 0x1e +/* 8036D764 0036A6C4 60 00 00 01 */ ori r0, r0, 1 +/* 8036D768 0036A6C8 90 1F 6C 00 */ stw r0, 0x6c00(r31) +/* 8036D76C 0036A6CC 80 7E 00 00 */ lwz r3, 0(r30) +/* 8036D770 0036A6D0 48 00 00 04 */ b lbl_8036D774 +lbl_8036D774: +/* 8036D774 0036A6D4 48 00 00 04 */ b lbl_8036D778 +lbl_8036D778: +/* 8036D778 0036A6D8 80 1E 00 00 */ lwz r0, 0(r30) +/* 8036D77C 0036A6DC 7C 03 00 40 */ cmplw r3, r0 +/* 8036D780 0036A6E0 41 82 FF F8 */ beq lbl_8036D778 +/* 8036D784 0036A6E4 48 01 7C 25 */ bl OSGetTime +/* 8036D788 0036A6E8 7D 1A 20 10 */ subfc r8, r26, r4 +/* 8036D78C 0036A6EC 81 8D AB 14 */ lwz r12, lbl_805A96D4@sda21(r13) +/* 8036D790 0036A6F0 80 BF 6C 00 */ lwz r5, 0x6c00(r31) +/* 8036D794 0036A6F4 7C FB 19 10 */ subfe r7, r27, r3 +/* 8036D798 0036A6F8 81 4D AB 34 */ lwz r10, lbl_805A96F4@sda21(r13) +/* 8036D79C 0036A6FC 6C E7 80 00 */ xoris r7, r7, 0x8000 +/* 8036D7A0 0036A700 54 A5 07 FA */ rlwinm r5, r5, 0, 0x1f, 0x1d +/* 8036D7A4 0036A704 81 6D AB 10 */ lwz r11, lbl_805A96D0@sda21(r13) +/* 8036D7A8 0036A708 7C CA 60 10 */ subfc r6, r10, r12 +/* 8036D7AC 0036A70C 81 2D AB 30 */ lwz r9, lbl_805A96F0@sda21(r13) +/* 8036D7B0 0036A710 90 BF 6C 00 */ stw r5, 0x6c00(r31) +/* 8036D7B4 0036A714 7C 09 59 10 */ subfe r0, r9, r11 +/* 8036D7B8 0036A718 6C 05 80 00 */ xoris r5, r0, 0x8000 +/* 8036D7BC 0036A71C 7C 06 40 10 */ subfc r0, r6, r8 +/* 8036D7C0 0036A720 80 1F 6C 00 */ lwz r0, 0x6c00(r31) +/* 8036D7C4 0036A724 7C A5 39 10 */ subfe r5, r5, r7 +/* 8036D7C8 0036A728 7C A7 39 10 */ subfe r5, r7, r7 +/* 8036D7CC 0036A72C 7C A5 00 D0 */ neg r5, r5 +/* 8036D7D0 0036A730 54 00 00 3C */ rlwinm r0, r0, 0, 0, 0x1e +/* 8036D7D4 0036A734 2C 05 00 00 */ cmpwi r5, 0 +/* 8036D7D8 0036A738 90 1F 6C 00 */ stw r0, 0x6c00(r31) +/* 8036D7DC 0036A73C 41 82 00 14 */ beq lbl_8036D7F0 +/* 8036D7E0 0036A740 83 AD AB 20 */ lwz r29, lbl_805A96E0@sda21(r13) +/* 8036D7E4 0036A744 38 00 00 01 */ li r0, 1 +/* 8036D7E8 0036A748 83 8D AB 24 */ lwz r28, lbl_805A96E4@sda21(r13) +/* 8036D7EC 0036A74C 48 00 00 68 */ b lbl_8036D854 +lbl_8036D7F0: +/* 8036D7F0 0036A750 7C CC 50 14 */ addc r6, r12, r10 +/* 8036D7F4 0036A754 7C 0B 49 14 */ adde r0, r11, r9 +/* 8036D7F8 0036A758 6C 05 80 00 */ xoris r5, r0, 0x8000 +/* 8036D7FC 0036A75C 7C 06 40 10 */ subfc r0, r6, r8 +/* 8036D800 0036A760 7C A5 39 10 */ subfe r5, r5, r7 +/* 8036D804 0036A764 7C A7 39 10 */ subfe r5, r7, r7 +/* 8036D808 0036A768 7C A5 00 D0 */ neg r5, r5 +/* 8036D80C 0036A76C 2C 05 00 00 */ cmpwi r5, 0 +/* 8036D810 0036A770 40 82 00 40 */ bne lbl_8036D850 +/* 8036D814 0036A774 80 AD AB 1C */ lwz r5, lbl_805A96DC@sda21(r13) +/* 8036D818 0036A778 80 0D AB 18 */ lwz r0, lbl_805A96D8@sda21(r13) +/* 8036D81C 0036A77C 7C CA 28 10 */ subfc r6, r10, r5 +/* 8036D820 0036A780 7C 09 01 10 */ subfe r0, r9, r0 +/* 8036D824 0036A784 6C 05 80 00 */ xoris r5, r0, 0x8000 +/* 8036D828 0036A788 7C 06 40 10 */ subfc r0, r6, r8 +/* 8036D82C 0036A78C 7C A5 39 10 */ subfe r5, r5, r7 +/* 8036D830 0036A790 7C A7 39 10 */ subfe r5, r7, r7 +/* 8036D834 0036A794 7C A5 00 D0 */ neg r5, r5 +/* 8036D838 0036A798 2C 05 00 00 */ cmpwi r5, 0 +/* 8036D83C 0036A79C 41 82 00 14 */ beq lbl_8036D850 +/* 8036D840 0036A7A0 83 AD AB 28 */ lwz r29, lbl_805A96E8@sda21(r13) +/* 8036D844 0036A7A4 38 00 00 01 */ li r0, 1 +/* 8036D848 0036A7A8 83 8D AB 2C */ lwz r28, lbl_805A96EC@sda21(r13) +/* 8036D84C 0036A7AC 48 00 00 08 */ b lbl_8036D854 +lbl_8036D850: +/* 8036D850 0036A7B0 38 00 00 00 */ li r0, 0 +lbl_8036D854: +/* 8036D854 0036A7B4 28 00 00 00 */ cmplwi r0, 0 +/* 8036D858 0036A7B8 41 82 FE 9C */ beq lbl_8036D6F4 +/* 8036D85C 0036A7BC 7F 64 E0 14 */ addc r27, r4, r28 +/* 8036D860 0036A7C0 7F 43 E9 14 */ adde r26, r3, r29 +/* 8036D864 0036A7C4 48 00 00 04 */ b lbl_8036D868 +lbl_8036D868: +/* 8036D868 0036A7C8 48 00 00 04 */ b lbl_8036D86C +lbl_8036D86C: +/* 8036D86C 0036A7CC 48 01 7B 3D */ bl OSGetTime +/* 8036D870 0036A7D0 6C 65 80 00 */ xoris r5, r3, 0x8000 +/* 8036D874 0036A7D4 6F 43 80 00 */ xoris r3, r26, 0x8000 +/* 8036D878 0036A7D8 7C 1B 20 10 */ subfc r0, r27, r4 +/* 8036D87C 0036A7DC 7C 63 29 10 */ subfe r3, r3, r5 +/* 8036D880 0036A7E0 7C 65 29 10 */ subfe r3, r5, r5 +/* 8036D884 0036A7E4 7C 63 00 D0 */ neg r3, r3 +/* 8036D888 0036A7E8 2C 03 00 00 */ cmpwi r3, 0 +/* 8036D88C 0036A7EC 40 82 FF E0 */ bne lbl_8036D86C +/* 8036D890 0036A7F0 BB 41 00 18 */ lmw r26, 0x18(r1) +/* 8036D894 0036A7F4 80 01 00 34 */ lwz r0, 0x34(r1) +/* 8036D898 0036A7F8 38 21 00 30 */ addi r1, r1, 0x30 +/* 8036D89C 0036A7FC 7C 08 03 A6 */ mtlr r0 +/* 8036D8A0 0036A800 4E 80 00 20 */ blr + diff --git a/asm/Dolphin/db.s b/asm/Dolphin/db.s new file mode 100644 index 00000000..57e5a377 --- /dev/null +++ b/asm/Dolphin/db.s @@ -0,0 +1,78 @@ +.include "macros.inc" + +.section .text, "ax" + +.global DBInit +DBInit: +/* 8036F8CC 0036C82C 3C 80 80 00 */ lis r4, 0x80000040@ha +/* 8036F8D0 0036C830 38 04 00 40 */ addi r0, r4, 0x80000040@l +/* 8036F8D4 0036C834 3C 60 80 37 */ lis r3, __DBExceptionDestination@ha +/* 8036F8D8 0036C838 90 0D AB 80 */ stw r0, lbl_805A9740@sda21(r13) +/* 8036F8DC 0036C83C 38 63 F9 3C */ addi r3, r3, __DBExceptionDestination@l +/* 8036F8E0 0036C840 3C 03 80 00 */ addis r0, r3, 0x8000 +/* 8036F8E4 0036C844 90 04 00 48 */ stw r0, 0x48(r4) +/* 8036F8E8 0036C848 38 00 00 01 */ li r0, 1 +/* 8036F8EC 0036C84C 90 0D AB 84 */ stw r0, lbl_805A9744@sda21(r13) +/* 8036F8F0 0036C850 4E 80 00 20 */ blr + +.global __DBExceptionDestinationAux +__DBExceptionDestinationAux: +/* 8036F8F4 0036C854 7C 08 02 A6 */ mflr r0 +/* 8036F8F8 0036C858 3C 60 80 3F */ lis r3, lbl_803EF9B8@ha +/* 8036F8FC 0036C85C 90 01 00 04 */ stw r0, 4(r1) +/* 8036F900 0036C860 38 63 F9 B8 */ addi r3, r3, lbl_803EF9B8@l +/* 8036F904 0036C864 4C C6 31 82 */ crclr 6 +/* 8036F908 0036C868 94 21 FF E8 */ stwu r1, -0x18(r1) +/* 8036F90C 0036C86C 93 E1 00 14 */ stw r31, 0x14(r1) +/* 8036F910 0036C870 80 80 00 C0 */ lwz r4, 0xc0(0) +/* 8036F914 0036C874 3F E4 80 00 */ addis r31, r4, 0x8000 +/* 8036F918 0036C878 48 01 00 95 */ bl OSReport +/* 8036F91C 0036C87C 7F E3 FB 78 */ mr r3, r31 +/* 8036F920 0036C880 48 00 FD 19 */ bl OSDumpContext +/* 8036F924 0036C884 4B FF FE F1 */ bl PPCHalt +/* 8036F928 0036C888 80 01 00 1C */ lwz r0, 0x1c(r1) +/* 8036F92C 0036C88C 83 E1 00 14 */ lwz r31, 0x14(r1) +/* 8036F930 0036C890 38 21 00 18 */ addi r1, r1, 0x18 +/* 8036F934 0036C894 7C 08 03 A6 */ mtlr r0 +/* 8036F938 0036C898 4E 80 00 20 */ blr + +.global __DBExceptionDestination +__DBExceptionDestination: +/* 8036F93C 0036C89C 7C 60 00 A6 */ mfmsr r3 +/* 8036F940 0036C8A0 60 63 00 30 */ ori r3, r3, 0x30 +/* 8036F944 0036C8A4 7C 60 01 24 */ mtmsr r3 +/* 8036F948 0036C8A8 4B FF FF AC */ b __DBExceptionDestinationAux + +.global __DBIsExceptionMarked +__DBIsExceptionMarked: +/* 8036F94C 0036C8AC 80 8D AB 80 */ lwz r4, lbl_805A9740@sda21(r13) +/* 8036F950 0036C8B0 54 60 06 3E */ clrlwi r0, r3, 0x18 +/* 8036F954 0036C8B4 38 60 00 01 */ li r3, 1 +/* 8036F958 0036C8B8 80 84 00 04 */ lwz r4, 4(r4) +/* 8036F95C 0036C8BC 7C 60 00 30 */ slw r0, r3, r0 +/* 8036F960 0036C8C0 7C 83 00 38 */ and r3, r4, r0 +/* 8036F964 0036C8C4 4E 80 00 20 */ blr + +.global DBPrintf +DBPrintf: +/* 8036F968 0036C8C8 94 21 FF 90 */ stwu r1, -0x70(r1) +/* 8036F96C 0036C8CC 40 86 00 24 */ bne cr1, lbl_8036F990 +/* 8036F970 0036C8D0 D8 21 00 28 */ stfd f1, 0x28(r1) +/* 8036F974 0036C8D4 D8 41 00 30 */ stfd f2, 0x30(r1) +/* 8036F978 0036C8D8 D8 61 00 38 */ stfd f3, 0x38(r1) +/* 8036F97C 0036C8DC D8 81 00 40 */ stfd f4, 0x40(r1) +/* 8036F980 0036C8E0 D8 A1 00 48 */ stfd f5, 0x48(r1) +/* 8036F984 0036C8E4 D8 C1 00 50 */ stfd f6, 0x50(r1) +/* 8036F988 0036C8E8 D8 E1 00 58 */ stfd f7, 0x58(r1) +/* 8036F98C 0036C8EC D9 01 00 60 */ stfd f8, 0x60(r1) +lbl_8036F990: +/* 8036F990 0036C8F0 90 61 00 08 */ stw r3, 8(r1) +/* 8036F994 0036C8F4 90 81 00 0C */ stw r4, 0xc(r1) +/* 8036F998 0036C8F8 90 A1 00 10 */ stw r5, 0x10(r1) +/* 8036F99C 0036C8FC 90 C1 00 14 */ stw r6, 0x14(r1) +/* 8036F9A0 0036C900 90 E1 00 18 */ stw r7, 0x18(r1) +/* 8036F9A4 0036C904 91 01 00 1C */ stw r8, 0x1c(r1) +/* 8036F9A8 0036C908 91 21 00 20 */ stw r9, 0x20(r1) +/* 8036F9AC 0036C90C 91 41 00 24 */ stw r10, 0x24(r1) +/* 8036F9B0 0036C910 38 21 00 70 */ addi r1, r1, 0x70 +/* 8036F9B4 0036C914 4E 80 00 20 */ blr diff --git a/asm/Dolphin/dtk.s b/asm/Dolphin/dtk.s index bb7d2c48..22f2da14 100644 --- a/asm/Dolphin/dtk.s +++ b/asm/Dolphin/dtk.s @@ -356,7 +356,7 @@ DTKInit: /* 803B79E8 003B4948 4B FB 59 C1 */ bl AISetStreamVolRight /* 803B79EC 003B494C 3C 60 80 3B */ lis r3, sub_803b782c@ha /* 803B79F0 003B4950 38 63 78 2C */ addi r3, r3, sub_803b782c@l -/* 803B79F4 003B4954 4B FB 56 61 */ bl AIRegisterDMACallback +/* 803B79F4 003B4954 4B FB 56 61 */ bl AIRegisterStreamCallback /* 803B79F8 003B4958 4B FB 56 A1 */ bl sub_8036d098 /* 803B79FC 003B495C 38 60 00 00 */ li r3, 0 /* 803B7A00 003B4960 4B FB 56 BD */ bl AISetStreamPlayState diff --git a/asm/Dolphin/mtx/mtx.s b/asm/Dolphin/mtx/mtx.s new file mode 100644 index 00000000..54deb28d --- /dev/null +++ b/asm/Dolphin/mtx/mtx.s @@ -0,0 +1,298 @@ +.include "macros.inc" + +.section .text, "ax" + +.global PSMTXIdentity +PSMTXIdentity: +/* 8037D040 00379FA0 C0 02 CE DC */ lfs f0, lbl_805AEBFC@sda21(r2) +/* 8037D044 00379FA4 C0 22 CE D8 */ lfs f1, lbl_805AEBF8@sda21(r2) +/* 8037D048 00379FA8 F0 03 00 08 */ psq_st f0, 8(r3), 0, qr0 +/* 8037D04C 00379FAC 10 40 0C 60 */ ps_merge01 f2, f0, f1 +/* 8037D050 00379FB0 F0 03 00 18 */ psq_st f0, 24(r3), 0, qr0 +/* 8037D054 00379FB4 10 21 04 A0 */ ps_merge10 f1, f1, f0 +/* 8037D058 00379FB8 F0 03 00 20 */ psq_st f0, 32(r3), 0, qr0 +/* 8037D05C 00379FBC F0 43 00 10 */ psq_st f2, 16(r3), 0, qr0 +/* 8037D060 00379FC0 F0 23 00 00 */ psq_st f1, 0(r3), 0, qr0 +/* 8037D064 00379FC4 F0 23 00 28 */ psq_st f1, 40(r3), 0, qr0 +/* 8037D068 00379FC8 4E 80 00 20 */ blr + +.global PSMTXCopy +PSMTXCopy: +/* 8037D06C 00379FCC E0 03 00 00 */ psq_l f0, 0(r3), 0, qr0 +/* 8037D070 00379FD0 F0 04 00 00 */ psq_st f0, 0(r4), 0, qr0 +/* 8037D074 00379FD4 E0 23 00 08 */ psq_l f1, 8(r3), 0, qr0 +/* 8037D078 00379FD8 F0 24 00 08 */ psq_st f1, 8(r4), 0, qr0 +/* 8037D07C 00379FDC E0 43 00 10 */ psq_l f2, 16(r3), 0, qr0 +/* 8037D080 00379FE0 F0 44 00 10 */ psq_st f2, 16(r4), 0, qr0 +/* 8037D084 00379FE4 E0 63 00 18 */ psq_l f3, 24(r3), 0, qr0 +/* 8037D088 00379FE8 F0 64 00 18 */ psq_st f3, 24(r4), 0, qr0 +/* 8037D08C 00379FEC E0 83 00 20 */ psq_l f4, 32(r3), 0, qr0 +/* 8037D090 00379FF0 F0 84 00 20 */ psq_st f4, 32(r4), 0, qr0 +/* 8037D094 00379FF4 E0 A3 00 28 */ psq_l f5, 40(r3), 0, qr0 +/* 8037D098 00379FF8 F0 A4 00 28 */ psq_st f5, 40(r4), 0, qr0 +/* 8037D09C 00379FFC 4E 80 00 20 */ blr + +.global PSMTXConcat +PSMTXConcat: +/* 8037D0A0 0037A000 94 21 FF C0 */ stwu r1, -0x40(r1) +/* 8037D0A4 0037A004 E0 03 00 00 */ psq_l f0, 0(r3), 0, qr0 +/* 8037D0A8 0037A008 D9 C1 00 08 */ stfd f14, 8(r1) +/* 8037D0AC 0037A00C E0 C4 00 00 */ psq_l f6, 0(r4), 0, qr0 +/* 8037D0B0 0037A010 3C C0 80 5B */ lis r6, lbl_805A8B20@ha +/* 8037D0B4 0037A014 E0 E4 00 08 */ psq_l f7, 8(r4), 0, qr0 +/* 8037D0B8 0037A018 D9 E1 00 10 */ stfd f15, 0x10(r1) +/* 8037D0BC 0037A01C 38 C6 8B 20 */ addi r6, r6, lbl_805A8B20@l +/* 8037D0C0 0037A020 DB E1 00 28 */ stfd f31, 0x28(r1) +/* 8037D0C4 0037A024 E1 04 00 10 */ psq_l f8, 16(r4), 0, qr0 +/* 8037D0C8 0037A028 11 86 00 18 */ ps_muls0 f12, f6, f0 +/* 8037D0CC 0037A02C E0 43 00 10 */ psq_l f2, 16(r3), 0, qr0 +/* 8037D0D0 0037A030 11 A7 00 18 */ ps_muls0 f13, f7, f0 +/* 8037D0D4 0037A034 E3 E6 00 00 */ psq_l f31, 0(r6), 0, qr0 +/* 8037D0D8 0037A038 11 C6 00 98 */ ps_muls0 f14, f6, f2 +/* 8037D0DC 0037A03C E1 24 00 18 */ psq_l f9, 24(r4), 0, qr0 +/* 8037D0E0 0037A040 11 E7 00 98 */ ps_muls0 f15, f7, f2 +/* 8037D0E4 0037A044 E0 23 00 08 */ psq_l f1, 8(r3), 0, qr0 +/* 8037D0E8 0037A048 11 88 60 1E */ ps_madds1 f12, f8, f0, f12 +/* 8037D0EC 0037A04C E0 63 00 18 */ psq_l f3, 24(r3), 0, qr0 +/* 8037D0F0 0037A050 11 C8 70 9E */ ps_madds1 f14, f8, f2, f14 +/* 8037D0F4 0037A054 E1 44 00 20 */ psq_l f10, 32(r4), 0, qr0 +/* 8037D0F8 0037A058 11 A9 68 1E */ ps_madds1 f13, f9, f0, f13 +/* 8037D0FC 0037A05C E1 64 00 28 */ psq_l f11, 40(r4), 0, qr0 +/* 8037D100 0037A060 11 E9 78 9E */ ps_madds1 f15, f9, f2, f15 +/* 8037D104 0037A064 E0 83 00 20 */ psq_l f4, 32(r3), 0, qr0 +/* 8037D108 0037A068 E0 A3 00 28 */ psq_l f5, 40(r3), 0, qr0 +/* 8037D10C 0037A06C 11 8A 60 5C */ ps_madds0 f12, f10, f1, f12 +/* 8037D110 0037A070 11 AB 68 5C */ ps_madds0 f13, f11, f1, f13 +/* 8037D114 0037A074 11 CA 70 DC */ ps_madds0 f14, f10, f3, f14 +/* 8037D118 0037A078 11 EB 78 DC */ ps_madds0 f15, f11, f3, f15 +/* 8037D11C 0037A07C F1 85 00 00 */ psq_st f12, 0(r5), 0, qr0 +/* 8037D120 0037A080 10 46 01 18 */ ps_muls0 f2, f6, f4 +/* 8037D124 0037A084 11 BF 68 5E */ ps_madds1 f13, f31, f1, f13 +/* 8037D128 0037A088 10 07 01 18 */ ps_muls0 f0, f7, f4 +/* 8037D12C 0037A08C F1 C5 00 10 */ psq_st f14, 16(r5), 0, qr0 +/* 8037D130 0037A090 11 FF 78 DE */ ps_madds1 f15, f31, f3, f15 +/* 8037D134 0037A094 F1 A5 00 08 */ psq_st f13, 8(r5), 0, qr0 +/* 8037D138 0037A098 10 48 11 1E */ ps_madds1 f2, f8, f4, f2 +/* 8037D13C 0037A09C 10 09 01 1E */ ps_madds1 f0, f9, f4, f0 +/* 8037D140 0037A0A0 10 4A 11 5C */ ps_madds0 f2, f10, f5, f2 +/* 8037D144 0037A0A4 C9 C1 00 08 */ lfd f14, 8(r1) +/* 8037D148 0037A0A8 F1 E5 00 18 */ psq_st f15, 24(r5), 0, qr0 +/* 8037D14C 0037A0AC 10 0B 01 5C */ ps_madds0 f0, f11, f5, f0 +/* 8037D150 0037A0B0 F0 45 00 20 */ psq_st f2, 32(r5), 0, qr0 +/* 8037D154 0037A0B4 10 1F 01 5E */ ps_madds1 f0, f31, f5, f0 +/* 8037D158 0037A0B8 C9 E1 00 10 */ lfd f15, 0x10(r1) +/* 8037D15C 0037A0BC F0 05 00 28 */ psq_st f0, 40(r5), 0, qr0 +/* 8037D160 0037A0C0 CB E1 00 28 */ lfd f31, 0x28(r1) +/* 8037D164 0037A0C4 38 21 00 40 */ addi r1, r1, 0x40 +/* 8037D168 0037A0C8 4E 80 00 20 */ blr + +.global PSMTXInvXpose +PSMTXInvXpose: +/* 8037D16C 0037A0CC E0 03 80 00 */ psq_l f0, 0(r3), 1, qr0 +/* 8037D170 0037A0D0 E0 23 00 04 */ psq_l f1, 4(r3), 0, qr0 +/* 8037D174 0037A0D4 E0 43 80 10 */ psq_l f2, 16(r3), 1, qr0 +/* 8037D178 0037A0D8 10 C1 04 A0 */ ps_merge10 f6, f1, f0 +/* 8037D17C 0037A0DC E0 63 00 14 */ psq_l f3, 20(r3), 0, qr0 +/* 8037D180 0037A0E0 E0 83 80 20 */ psq_l f4, 32(r3), 1, qr0 +/* 8037D184 0037A0E4 10 E3 14 A0 */ ps_merge10 f7, f3, f2 +/* 8037D188 0037A0E8 E0 A3 00 24 */ psq_l f5, 36(r3), 0, qr0 +/* 8037D18C 0037A0EC 11 63 01 B2 */ ps_mul f11, f3, f6 +/* 8037D190 0037A0F0 11 05 24 A0 */ ps_merge10 f8, f5, f4 +/* 8037D194 0037A0F4 11 A5 01 F2 */ ps_mul f13, f5, f7 +/* 8037D198 0037A0F8 11 61 59 F8 */ ps_msub f11, f1, f7, f11 +/* 8037D19C 0037A0FC 11 81 02 32 */ ps_mul f12, f1, f8 +/* 8037D1A0 0037A100 11 A3 6A 38 */ ps_msub f13, f3, f8, f13 +/* 8037D1A4 0037A104 11 85 61 B8 */ ps_msub f12, f5, f6, f12 +/* 8037D1A8 0037A108 11 43 01 32 */ ps_mul f10, f3, f4 +/* 8037D1AC 0037A10C 11 20 01 72 */ ps_mul f9, f0, f5 +/* 8037D1B0 0037A110 11 01 00 B2 */ ps_mul f8, f1, f2 +/* 8037D1B4 0037A114 11 42 51 78 */ ps_msub f10, f2, f5, f10 +/* 8037D1B8 0037A118 11 21 49 38 */ ps_msub f9, f1, f4, f9 +/* 8037D1BC 0037A11C 11 00 40 F8 */ ps_msub f8, f0, f3, f8 +/* 8037D1C0 0037A120 10 E0 03 72 */ ps_mul f7, f0, f13 +/* 8037D1C4 0037A124 10 21 08 28 */ ps_sub f1, f1, f1 +/* 8037D1C8 0037A128 10 E2 3B 3A */ ps_madd f7, f2, f12, f7 +/* 8037D1CC 0037A12C 10 E4 3A FA */ ps_madd f7, f4, f11, f7 +/* 8037D1D0 0037A130 10 07 08 40 */ ps_cmpo0 cr0, f7, f1 +/* 8037D1D4 0037A134 40 82 00 0C */ bne lbl_8037D1E0 +/* 8037D1D8 0037A138 38 60 00 00 */ li r3, 0 +/* 8037D1DC 0037A13C 4E 80 00 20 */ blr +lbl_8037D1E0: +/* 8037D1E0 0037A140 EC 00 38 30 */ fres f0, f7 +/* 8037D1E4 0037A144 F0 24 80 0C */ psq_st f1, 12(r4), 1, qr0 +/* 8037D1E8 0037A148 10 C0 00 2A */ ps_add f6, f0, f0 +/* 8037D1EC 0037A14C 10 A0 00 32 */ ps_mul f5, f0, f0 +/* 8037D1F0 0037A150 F0 24 80 1C */ psq_st f1, 28(r4), 1, qr0 +/* 8037D1F4 0037A154 10 07 31 7C */ ps_nmsub f0, f7, f5, f6 +/* 8037D1F8 0037A158 F0 24 80 2C */ psq_st f1, 44(r4), 1, qr0 +/* 8037D1FC 0037A15C 11 AD 00 18 */ ps_muls0 f13, f13, f0 +/* 8037D200 0037A160 11 8C 00 18 */ ps_muls0 f12, f12, f0 +/* 8037D204 0037A164 11 6B 00 18 */ ps_muls0 f11, f11, f0 +/* 8037D208 0037A168 F1 A4 00 00 */ psq_st f13, 0(r4), 0, qr0 +/* 8037D20C 0037A16C F1 84 00 10 */ psq_st f12, 16(r4), 0, qr0 +/* 8037D210 0037A170 11 4A 00 18 */ ps_muls0 f10, f10, f0 +/* 8037D214 0037A174 11 29 00 18 */ ps_muls0 f9, f9, f0 +/* 8037D218 0037A178 F1 64 00 20 */ psq_st f11, 32(r4), 0, qr0 +/* 8037D21C 0037A17C F1 44 80 08 */ psq_st f10, 8(r4), 1, qr0 +/* 8037D220 0037A180 11 08 00 18 */ ps_muls0 f8, f8, f0 +/* 8037D224 0037A184 38 60 00 01 */ li r3, 1 +/* 8037D228 0037A188 F1 24 80 18 */ psq_st f9, 24(r4), 1, qr0 +/* 8037D22C 0037A18C F1 04 80 28 */ psq_st f8, 40(r4), 1, qr0 +/* 8037D230 0037A190 4E 80 00 20 */ blr + +.global PSMTXTrans +PSMTXTrans: +/* 8037D234 0037A194 C0 02 CE DC */ lfs f0, lbl_805AEBFC@sda21(r2) +/* 8037D238 0037A198 C0 82 CE D8 */ lfs f4, lbl_805AEBF8@sda21(r2) +/* 8037D23C 0037A19C D0 23 00 0C */ stfs f1, 0xc(r3) +/* 8037D240 0037A1A0 D0 43 00 1C */ stfs f2, 0x1c(r3) +/* 8037D244 0037A1A4 F0 03 00 04 */ psq_st f0, 4(r3), 0, qr0 +/* 8037D248 0037A1A8 F0 03 00 20 */ psq_st f0, 32(r3), 0, qr0 +/* 8037D24C 0037A1AC D0 03 00 10 */ stfs f0, 0x10(r3) +/* 8037D250 0037A1B0 D0 83 00 14 */ stfs f4, 0x14(r3) +/* 8037D254 0037A1B4 D0 03 00 18 */ stfs f0, 0x18(r3) +/* 8037D258 0037A1B8 D0 83 00 28 */ stfs f4, 0x28(r3) +/* 8037D25C 0037A1BC D0 63 00 2C */ stfs f3, 0x2c(r3) +/* 8037D260 0037A1C0 D0 83 00 00 */ stfs f4, 0(r3) +/* 8037D264 0037A1C4 4E 80 00 20 */ blr + +.global PSMTXScale +PSMTXScale: +/* 8037D268 0037A1C8 C0 02 CE DC */ lfs f0, lbl_805AEBFC@sda21(r2) +/* 8037D26C 0037A1CC D0 23 00 00 */ stfs f1, 0(r3) +/* 8037D270 0037A1D0 F0 03 00 04 */ psq_st f0, 4(r3), 0, qr0 +/* 8037D274 0037A1D4 F0 03 00 0C */ psq_st f0, 12(r3), 0, qr0 +/* 8037D278 0037A1D8 D0 43 00 14 */ stfs f2, 0x14(r3) +/* 8037D27C 0037A1DC F0 03 00 18 */ psq_st f0, 24(r3), 0, qr0 +/* 8037D280 0037A1E0 F0 03 00 20 */ psq_st f0, 32(r3), 0, qr0 +/* 8037D284 0037A1E4 D0 63 00 28 */ stfs f3, 0x28(r3) +/* 8037D288 0037A1E8 D0 03 00 2C */ stfs f0, 0x2c(r3) +/* 8037D28C 0037A1EC 4E 80 00 20 */ blr + +.global PSMTXScaleApply +PSMTXScaleApply: +/* 8037D290 0037A1F0 FC 20 08 18 */ frsp f1, f1 +/* 8037D294 0037A1F4 E0 83 00 00 */ psq_l f4, 0(r3), 0, qr0 +/* 8037D298 0037A1F8 FC 40 10 18 */ frsp f2, f2 +/* 8037D29C 0037A1FC E0 A3 00 08 */ psq_l f5, 8(r3), 0, qr0 +/* 8037D2A0 0037A200 FC 60 18 18 */ frsp f3, f3 +/* 8037D2A4 0037A204 10 84 00 58 */ ps_muls0 f4, f4, f1 +/* 8037D2A8 0037A208 E0 C3 00 10 */ psq_l f6, 16(r3), 0, qr0 +/* 8037D2AC 0037A20C 10 A5 00 58 */ ps_muls0 f5, f5, f1 +/* 8037D2B0 0037A210 E0 E3 00 18 */ psq_l f7, 24(r3), 0, qr0 +/* 8037D2B4 0037A214 10 C6 00 98 */ ps_muls0 f6, f6, f2 +/* 8037D2B8 0037A218 E1 03 00 20 */ psq_l f8, 32(r3), 0, qr0 +/* 8037D2BC 0037A21C F0 84 00 00 */ psq_st f4, 0(r4), 0, qr0 +/* 8037D2C0 0037A220 10 E7 00 98 */ ps_muls0 f7, f7, f2 +/* 8037D2C4 0037A224 E0 43 00 28 */ psq_l f2, 40(r3), 0, qr0 +/* 8037D2C8 0037A228 F0 A4 00 08 */ psq_st f5, 8(r4), 0, qr0 +/* 8037D2CC 0037A22C 11 08 00 D8 */ ps_muls0 f8, f8, f3 +/* 8037D2D0 0037A230 F0 C4 00 10 */ psq_st f6, 16(r4), 0, qr0 +/* 8037D2D4 0037A234 10 42 00 D8 */ ps_muls0 f2, f2, f3 +/* 8037D2D8 0037A238 F0 E4 00 18 */ psq_st f7, 24(r4), 0, qr0 +/* 8037D2DC 0037A23C F1 04 00 20 */ psq_st f8, 32(r4), 0, qr0 +/* 8037D2E0 0037A240 F0 44 00 28 */ psq_st f2, 40(r4), 0, qr0 +/* 8037D2E4 0037A244 4E 80 00 20 */ blr + +.global C_MTXLookAt +C_MTXLookAt: +/* 8037D2E8 0037A248 7C 08 02 A6 */ mflr r0 +/* 8037D2EC 0037A24C 90 01 00 04 */ stw r0, 4(r1) +/* 8037D2F0 0037A250 94 21 FF B0 */ stwu r1, -0x50(r1) +/* 8037D2F4 0037A254 93 E1 00 4C */ stw r31, 0x4c(r1) +/* 8037D2F8 0037A258 93 C1 00 48 */ stw r30, 0x48(r1) +/* 8037D2FC 0037A25C 93 A1 00 44 */ stw r29, 0x44(r1) +/* 8037D300 0037A260 7C 7D 1B 78 */ mr r29, r3 +/* 8037D304 0037A264 7C 9E 23 78 */ mr r30, r4 +/* 8037D308 0037A268 7C BF 2B 78 */ mr r31, r5 +/* 8037D30C 0037A26C C0 3E 00 00 */ lfs f1, 0(r30) +/* 8037D310 0037A270 38 61 00 30 */ addi r3, r1, 0x30 +/* 8037D314 0037A274 C0 06 00 00 */ lfs f0, 0(r6) +/* 8037D318 0037A278 7C 64 1B 78 */ mr r4, r3 +/* 8037D31C 0037A27C EC 01 00 28 */ fsubs f0, f1, f0 +/* 8037D320 0037A280 D0 01 00 30 */ stfs f0, 0x30(r1) +/* 8037D324 0037A284 C0 3E 00 04 */ lfs f1, 4(r30) +/* 8037D328 0037A288 C0 06 00 04 */ lfs f0, 4(r6) +/* 8037D32C 0037A28C EC 01 00 28 */ fsubs f0, f1, f0 +/* 8037D330 0037A290 D0 01 00 34 */ stfs f0, 0x34(r1) +/* 8037D334 0037A294 C0 3E 00 08 */ lfs f1, 8(r30) +/* 8037D338 0037A298 C0 06 00 08 */ lfs f0, 8(r6) +/* 8037D33C 0037A29C EC 01 00 28 */ fsubs f0, f1, f0 +/* 8037D340 0037A2A0 D0 01 00 38 */ stfs f0, 0x38(r1) +/* 8037D344 0037A2A4 48 00 03 0D */ bl C_VECNormalize +/* 8037D348 0037A2A8 7F E3 FB 78 */ mr r3, r31 +/* 8037D34C 0037A2AC 38 81 00 30 */ addi r4, r1, 0x30 +/* 8037D350 0037A2B0 38 A1 00 24 */ addi r5, r1, 0x24 +/* 8037D354 0037A2B4 48 00 03 41 */ bl C_VECCrossProduct +/* 8037D358 0037A2B8 38 61 00 24 */ addi r3, r1, 0x24 +/* 8037D35C 0037A2BC 7C 64 1B 78 */ mr r4, r3 +/* 8037D360 0037A2C0 48 00 02 F1 */ bl C_VECNormalize +/* 8037D364 0037A2C4 38 61 00 30 */ addi r3, r1, 0x30 +/* 8037D368 0037A2C8 38 81 00 24 */ addi r4, r1, 0x24 +/* 8037D36C 0037A2CC 38 A1 00 18 */ addi r5, r1, 0x18 +/* 8037D370 0037A2D0 48 00 03 25 */ bl C_VECCrossProduct +/* 8037D374 0037A2D4 C0 01 00 24 */ lfs f0, 0x24(r1) +/* 8037D378 0037A2D8 D0 1D 00 00 */ stfs f0, 0(r29) +/* 8037D37C 0037A2DC C0 01 00 28 */ lfs f0, 0x28(r1) +/* 8037D380 0037A2E0 D0 1D 00 04 */ stfs f0, 4(r29) +/* 8037D384 0037A2E4 C0 01 00 2C */ lfs f0, 0x2c(r1) +/* 8037D388 0037A2E8 D0 1D 00 08 */ stfs f0, 8(r29) +/* 8037D38C 0037A2EC C0 7E 00 00 */ lfs f3, 0(r30) +/* 8037D390 0037A2F0 C0 41 00 24 */ lfs f2, 0x24(r1) +/* 8037D394 0037A2F4 C0 3E 00 04 */ lfs f1, 4(r30) +/* 8037D398 0037A2F8 C0 01 00 28 */ lfs f0, 0x28(r1) +/* 8037D39C 0037A2FC EC 43 00 B2 */ fmuls f2, f3, f2 +/* 8037D3A0 0037A300 C0 7E 00 08 */ lfs f3, 8(r30) +/* 8037D3A4 0037A304 EC 01 00 32 */ fmuls f0, f1, f0 +/* 8037D3A8 0037A308 C0 21 00 2C */ lfs f1, 0x2c(r1) +/* 8037D3AC 0037A30C EC 23 00 72 */ fmuls f1, f3, f1 +/* 8037D3B0 0037A310 EC 02 00 2A */ fadds f0, f2, f0 +/* 8037D3B4 0037A314 EC 01 00 2A */ fadds f0, f1, f0 +/* 8037D3B8 0037A318 FC 00 00 50 */ fneg f0, f0 +/* 8037D3BC 0037A31C D0 1D 00 0C */ stfs f0, 0xc(r29) +/* 8037D3C0 0037A320 C0 01 00 18 */ lfs f0, 0x18(r1) +/* 8037D3C4 0037A324 D0 1D 00 10 */ stfs f0, 0x10(r29) +/* 8037D3C8 0037A328 C0 01 00 1C */ lfs f0, 0x1c(r1) +/* 8037D3CC 0037A32C D0 1D 00 14 */ stfs f0, 0x14(r29) +/* 8037D3D0 0037A330 C0 01 00 20 */ lfs f0, 0x20(r1) +/* 8037D3D4 0037A334 D0 1D 00 18 */ stfs f0, 0x18(r29) +/* 8037D3D8 0037A338 C0 7E 00 00 */ lfs f3, 0(r30) +/* 8037D3DC 0037A33C C0 41 00 18 */ lfs f2, 0x18(r1) +/* 8037D3E0 0037A340 C0 3E 00 04 */ lfs f1, 4(r30) +/* 8037D3E4 0037A344 C0 01 00 1C */ lfs f0, 0x1c(r1) +/* 8037D3E8 0037A348 EC 43 00 B2 */ fmuls f2, f3, f2 +/* 8037D3EC 0037A34C C0 7E 00 08 */ lfs f3, 8(r30) +/* 8037D3F0 0037A350 EC 01 00 32 */ fmuls f0, f1, f0 +/* 8037D3F4 0037A354 C0 21 00 20 */ lfs f1, 0x20(r1) +/* 8037D3F8 0037A358 EC 23 00 72 */ fmuls f1, f3, f1 +/* 8037D3FC 0037A35C EC 02 00 2A */ fadds f0, f2, f0 +/* 8037D400 0037A360 EC 01 00 2A */ fadds f0, f1, f0 +/* 8037D404 0037A364 FC 00 00 50 */ fneg f0, f0 +/* 8037D408 0037A368 D0 1D 00 1C */ stfs f0, 0x1c(r29) +/* 8037D40C 0037A36C C0 01 00 30 */ lfs f0, 0x30(r1) +/* 8037D410 0037A370 D0 1D 00 20 */ stfs f0, 0x20(r29) +/* 8037D414 0037A374 C0 01 00 34 */ lfs f0, 0x34(r1) +/* 8037D418 0037A378 D0 1D 00 24 */ stfs f0, 0x24(r29) +/* 8037D41C 0037A37C C0 01 00 38 */ lfs f0, 0x38(r1) +/* 8037D420 0037A380 D0 1D 00 28 */ stfs f0, 0x28(r29) +/* 8037D424 0037A384 C0 7E 00 00 */ lfs f3, 0(r30) +/* 8037D428 0037A388 C0 41 00 30 */ lfs f2, 0x30(r1) +/* 8037D42C 0037A38C C0 3E 00 04 */ lfs f1, 4(r30) +/* 8037D430 0037A390 C0 01 00 34 */ lfs f0, 0x34(r1) +/* 8037D434 0037A394 EC 43 00 B2 */ fmuls f2, f3, f2 +/* 8037D438 0037A398 C0 7E 00 08 */ lfs f3, 8(r30) +/* 8037D43C 0037A39C EC 01 00 32 */ fmuls f0, f1, f0 +/* 8037D440 0037A3A0 C0 21 00 38 */ lfs f1, 0x38(r1) +/* 8037D444 0037A3A4 EC 23 00 72 */ fmuls f1, f3, f1 +/* 8037D448 0037A3A8 EC 02 00 2A */ fadds f0, f2, f0 +/* 8037D44C 0037A3AC EC 01 00 2A */ fadds f0, f1, f0 +/* 8037D450 0037A3B0 FC 00 00 50 */ fneg f0, f0 +/* 8037D454 0037A3B4 D0 1D 00 2C */ stfs f0, 0x2c(r29) +/* 8037D458 0037A3B8 80 01 00 54 */ lwz r0, 0x54(r1) +/* 8037D45C 0037A3BC 83 E1 00 4C */ lwz r31, 0x4c(r1) +/* 8037D460 0037A3C0 83 C1 00 48 */ lwz r30, 0x48(r1) +/* 8037D464 0037A3C4 83 A1 00 44 */ lwz r29, 0x44(r1) +/* 8037D468 0037A3C8 38 21 00 50 */ addi r1, r1, 0x50 +/* 8037D46C 0037A3CC 7C 08 03 A6 */ mtlr r0 +/* 8037D470 0037A3D0 4E 80 00 20 */ blr + diff --git a/asm/Dolphin/mtx/mtx44.s b/asm/Dolphin/mtx/mtx44.s new file mode 100644 index 00000000..f83870b6 --- /dev/null +++ b/asm/Dolphin/mtx/mtx44.s @@ -0,0 +1,86 @@ +.include "macros.inc" + +.section .text, "ax" + +.global C_MTXFrustum +C_MTXFrustum: +/* 8037D51C 0037A47C ED 24 18 28 */ fsubs f9, f4, f3 +/* 8037D520 0037A480 C1 42 CE E0 */ lfs f10, lbl_805AEC00@sda21(r2) +/* 8037D524 0037A484 EC 01 10 28 */ fsubs f0, f1, f2 +/* 8037D528 0037A488 C1 02 CE E4 */ lfs f8, lbl_805AEC04@sda21(r2) +/* 8037D52C 0037A48C EC E6 28 28 */ fsubs f7, f6, f5 +/* 8037D530 0037A490 ED 6A 48 24 */ fdivs f11, f10, f9 +/* 8037D534 0037A494 ED 08 01 72 */ fmuls f8, f8, f5 +/* 8037D538 0037A498 ED 2A 00 24 */ fdivs f9, f10, f0 +/* 8037D53C 0037A49C EC 08 02 F2 */ fmuls f0, f8, f11 +/* 8037D540 0037A4A0 EC 64 18 2A */ fadds f3, f4, f3 +/* 8037D544 0037A4A4 EC 41 10 2A */ fadds f2, f1, f2 +/* 8037D548 0037A4A8 D0 03 00 00 */ stfs f0, 0(r3) +/* 8037D54C 0037A4AC EC 06 01 72 */ fmuls f0, f6, f5 +/* 8037D550 0037A4B0 EC CA 38 24 */ fdivs f6, f10, f7 +/* 8037D554 0037A4B4 C0 82 CE E8 */ lfs f4, lbl_805AEC08@sda21(r2) +/* 8037D558 0037A4B8 D0 83 00 04 */ stfs f4, 4(r3) +/* 8037D55C 0037A4BC EC 6B 00 F2 */ fmuls f3, f11, f3 +/* 8037D560 0037A4C0 FC 20 28 50 */ fneg f1, f5 +/* 8037D564 0037A4C4 FC 00 00 50 */ fneg f0, f0 +/* 8037D568 0037A4C8 D0 63 00 08 */ stfs f3, 8(r3) +/* 8037D56C 0037A4CC EC 68 02 72 */ fmuls f3, f8, f9 +/* 8037D570 0037A4D0 EC 49 00 B2 */ fmuls f2, f9, f2 +/* 8037D574 0037A4D4 D0 83 00 0C */ stfs f4, 0xc(r3) +/* 8037D578 0037A4D8 EC 21 01 B2 */ fmuls f1, f1, f6 +/* 8037D57C 0037A4DC D0 83 00 10 */ stfs f4, 0x10(r3) +/* 8037D580 0037A4E0 EC 06 00 32 */ fmuls f0, f6, f0 +/* 8037D584 0037A4E4 D0 63 00 14 */ stfs f3, 0x14(r3) +/* 8037D588 0037A4E8 D0 43 00 18 */ stfs f2, 0x18(r3) +/* 8037D58C 0037A4EC D0 83 00 1C */ stfs f4, 0x1c(r3) +/* 8037D590 0037A4F0 D0 83 00 20 */ stfs f4, 0x20(r3) +/* 8037D594 0037A4F4 D0 83 00 24 */ stfs f4, 0x24(r3) +/* 8037D598 0037A4F8 D0 23 00 28 */ stfs f1, 0x28(r3) +/* 8037D59C 0037A4FC D0 03 00 2C */ stfs f0, 0x2c(r3) +/* 8037D5A0 0037A500 D0 83 00 30 */ stfs f4, 0x30(r3) +/* 8037D5A4 0037A504 D0 83 00 34 */ stfs f4, 0x34(r3) +/* 8037D5A8 0037A508 C0 02 CE EC */ lfs f0, lbl_805AEC0C@sda21(r2) +/* 8037D5AC 0037A50C D0 03 00 38 */ stfs f0, 0x38(r3) +/* 8037D5B0 0037A510 D0 83 00 3C */ stfs f4, 0x3c(r3) +/* 8037D5B4 0037A514 4E 80 00 20 */ blr + +.global C_MTXOrtho +C_MTXOrtho: +/* 8037D5B8 0037A518 ED 04 18 28 */ fsubs f8, f4, f3 +/* 8037D5BC 0037A51C C1 22 CE E0 */ lfs f9, lbl_805AEC00@sda21(r2) +/* 8037D5C0 0037A520 EC 01 10 28 */ fsubs f0, f1, f2 +/* 8037D5C4 0037A524 C0 E2 CE E4 */ lfs f7, lbl_805AEC04@sda21(r2) +/* 8037D5C8 0037A528 EC 64 18 2A */ fadds f3, f4, f3 +/* 8037D5CC 0037A52C ED 49 40 24 */ fdivs f10, f9, f8 +/* 8037D5D0 0037A530 ED 09 00 24 */ fdivs f8, f9, f0 +/* 8037D5D4 0037A534 EC 87 02 B2 */ fmuls f4, f7, f10 +/* 8037D5D8 0037A538 FC 60 18 50 */ fneg f3, f3 +/* 8037D5DC 0037A53C EC 06 28 28 */ fsubs f0, f6, f5 +/* 8037D5E0 0037A540 D0 83 00 00 */ stfs f4, 0(r3) +/* 8037D5E4 0037A544 EC 21 10 2A */ fadds f1, f1, f2 +/* 8037D5E8 0037A548 EC 4A 00 F2 */ fmuls f2, f10, f3 +/* 8037D5EC 0037A54C C0 62 CE E8 */ lfs f3, lbl_805AEC08@sda21(r2) +/* 8037D5F0 0037A550 FC 20 08 50 */ fneg f1, f1 +/* 8037D5F4 0037A554 D0 63 00 04 */ stfs f3, 4(r3) +/* 8037D5F8 0037A558 EC 89 00 24 */ fdivs f4, f9, f0 +/* 8037D5FC 0037A55C D0 63 00 08 */ stfs f3, 8(r3) +/* 8037D600 0037A560 D0 43 00 0C */ stfs f2, 0xc(r3) +/* 8037D604 0037A564 D0 63 00 10 */ stfs f3, 0x10(r3) +/* 8037D608 0037A568 EC 47 02 32 */ fmuls f2, f7, f8 +/* 8037D60C 0037A56C FC 00 30 50 */ fneg f0, f6 +/* 8037D610 0037A570 EC 28 00 72 */ fmuls f1, f8, f1 +/* 8037D614 0037A574 D0 43 00 14 */ stfs f2, 0x14(r3) +/* 8037D618 0037A578 EC 00 01 32 */ fmuls f0, f0, f4 +/* 8037D61C 0037A57C D0 63 00 18 */ stfs f3, 0x18(r3) +/* 8037D620 0037A580 D0 23 00 1C */ stfs f1, 0x1c(r3) +/* 8037D624 0037A584 D0 63 00 20 */ stfs f3, 0x20(r3) +/* 8037D628 0037A588 D0 63 00 24 */ stfs f3, 0x24(r3) +/* 8037D62C 0037A58C C0 22 CE EC */ lfs f1, lbl_805AEC0C@sda21(r2) +/* 8037D630 0037A590 EC 21 01 32 */ fmuls f1, f1, f4 +/* 8037D634 0037A594 D0 23 00 28 */ stfs f1, 0x28(r3) +/* 8037D638 0037A598 D0 03 00 2C */ stfs f0, 0x2c(r3) +/* 8037D63C 0037A59C D0 63 00 30 */ stfs f3, 0x30(r3) +/* 8037D640 0037A5A0 D0 63 00 34 */ stfs f3, 0x34(r3) +/* 8037D644 0037A5A4 D0 63 00 38 */ stfs f3, 0x38(r3) +/* 8037D648 0037A5A8 D1 23 00 3C */ stfs f9, 0x3c(r3) +/* 8037D64C 0037A5AC 4E 80 00 20 */ blr diff --git a/asm/Dolphin/mtx/mtx44vec.s b/asm/Dolphin/mtx/mtx44vec.s new file mode 100644 index 00000000..e4eb16d9 --- /dev/null +++ b/asm/Dolphin/mtx/mtx44vec.s @@ -0,0 +1,51 @@ +.include "macros.inc" + +.section .text, "ax" + +.global PSMTXMultVec +PSMTXMultVec: +/* 8037D474 0037A3D4 E0 04 00 00 */ psq_l f0, 0(r4), 0, qr0 +/* 8037D478 0037A3D8 E0 43 00 00 */ psq_l f2, 0(r3), 0, qr0 +/* 8037D47C 0037A3DC E0 24 80 08 */ psq_l f1, 8(r4), 1, qr0 +/* 8037D480 0037A3E0 10 82 00 32 */ ps_mul f4, f2, f0 +/* 8037D484 0037A3E4 E0 63 00 08 */ psq_l f3, 8(r3), 0, qr0 +/* 8037D488 0037A3E8 10 A3 20 7A */ ps_madd f5, f3, f1, f4 +/* 8037D48C 0037A3EC E1 03 00 10 */ psq_l f8, 16(r3), 0, qr0 +/* 8037D490 0037A3F0 10 C5 29 94 */ ps_sum0 f6, f5, f6, f5 +/* 8037D494 0037A3F4 E1 23 00 18 */ psq_l f9, 24(r3), 0, qr0 +/* 8037D498 0037A3F8 11 48 00 32 */ ps_mul f10, f8, f0 +/* 8037D49C 0037A3FC F0 C5 80 00 */ psq_st f6, 0(r5), 1, qr0 +/* 8037D4A0 0037A400 11 69 50 7A */ ps_madd f11, f9, f1, f10 +/* 8037D4A4 0037A404 E0 43 00 20 */ psq_l f2, 32(r3), 0, qr0 +/* 8037D4A8 0037A408 11 8B 5B 14 */ ps_sum0 f12, f11, f12, f11 +/* 8037D4AC 0037A40C E0 63 00 28 */ psq_l f3, 40(r3), 0, qr0 +/* 8037D4B0 0037A410 10 82 00 32 */ ps_mul f4, f2, f0 +/* 8037D4B4 0037A414 F1 85 80 04 */ psq_st f12, 4(r5), 1, qr0 +/* 8037D4B8 0037A418 10 A3 20 7A */ ps_madd f5, f3, f1, f4 +/* 8037D4BC 0037A41C 10 C5 29 94 */ ps_sum0 f6, f5, f6, f5 +/* 8037D4C0 0037A420 F0 C5 80 08 */ psq_st f6, 8(r5), 1, qr0 +/* 8037D4C4 0037A424 4E 80 00 20 */ blr + +.global PSMTXMultVecSR +PSMTXMultVecSR: +/* 8037D4C8 0037A428 E0 03 00 00 */ psq_l f0, 0(r3), 0, qr0 +/* 8037D4CC 0037A42C E0 C4 00 00 */ psq_l f6, 0(r4), 0, qr0 +/* 8037D4D0 0037A430 E0 43 00 10 */ psq_l f2, 16(r3), 0, qr0 +/* 8037D4D4 0037A434 11 00 01 B2 */ ps_mul f8, f0, f6 +/* 8037D4D8 0037A438 E0 83 00 20 */ psq_l f4, 32(r3), 0, qr0 +/* 8037D4DC 0037A43C 11 42 01 B2 */ ps_mul f10, f2, f6 +/* 8037D4E0 0037A440 E0 E4 80 08 */ psq_l f7, 8(r4), 1, qr0 +/* 8037D4E4 0037A444 11 84 01 B2 */ ps_mul f12, f4, f6 +/* 8037D4E8 0037A448 E0 63 00 18 */ psq_l f3, 24(r3), 0, qr0 +/* 8037D4EC 0037A44C 11 08 42 14 */ ps_sum0 f8, f8, f8, f8 +/* 8037D4F0 0037A450 E0 A3 00 28 */ psq_l f5, 40(r3), 0, qr0 +/* 8037D4F4 0037A454 11 4A 52 94 */ ps_sum0 f10, f10, f10, f10 +/* 8037D4F8 0037A458 E0 23 00 08 */ psq_l f1, 8(r3), 0, qr0 +/* 8037D4FC 0037A45C 11 8C 63 14 */ ps_sum0 f12, f12, f12, f12 +/* 8037D500 0037A460 11 21 41 FA */ ps_madd f9, f1, f7, f8 +/* 8037D504 0037A464 F1 25 80 00 */ psq_st f9, 0(r5), 1, qr0 +/* 8037D508 0037A468 11 63 51 FA */ ps_madd f11, f3, f7, f10 +/* 8037D50C 0037A46C F1 65 80 04 */ psq_st f11, 4(r5), 1, qr0 +/* 8037D510 0037A470 11 A5 61 FA */ ps_madd f13, f5, f7, f12 +/* 8037D514 0037A474 F1 A5 80 08 */ psq_st f13, 8(r5), 1, qr0 +/* 8037D518 0037A478 4E 80 00 20 */ blr diff --git a/asm/Dolphin/mtx/psmtx.s b/asm/Dolphin/mtx/psmtx.s new file mode 100644 index 00000000..a7f1c23b --- /dev/null +++ b/asm/Dolphin/mtx/psmtx.s @@ -0,0 +1,25 @@ +.include "macros.inc" + +.section .text, "ax" + +.global PSMTXReorder +PSMTXReorder: +/* 8037D6D0 0037A630 E0 03 00 00 */ psq_l f0, 0(r3), 0, qr0 +/* 8037D6D4 0037A634 E0 43 00 10 */ psq_l f2, 16(r3), 0, qr0 +/* 8037D6D8 0037A638 E0 83 00 20 */ psq_l f4, 32(r3), 0, qr0 +/* 8037D6DC 0037A63C E0 23 00 08 */ psq_l f1, 8(r3), 0, qr0 +/* 8037D6E0 0037A640 10 C0 14 20 */ ps_merge00 f6, f0, f2 +/* 8037D6E4 0037A644 E0 63 00 18 */ psq_l f3, 24(r3), 0, qr0 +/* 8037D6E8 0037A648 11 84 04 60 */ ps_merge01 f12, f4, f0 +/* 8037D6EC 0037A64C E0 A3 00 28 */ psq_l f5, 40(r3), 0, qr0 +/* 8037D6F0 0037A650 10 E2 24 E0 */ ps_merge11 f7, f2, f4 +/* 8037D6F4 0037A654 F0 C4 00 00 */ psq_st f6, 0(r4), 0, qr0 +/* 8037D6F8 0037A658 11 01 1C 20 */ ps_merge00 f8, f1, f3 +/* 8037D6FC 0037A65C F1 84 00 08 */ psq_st f12, 8(r4), 0, qr0 +/* 8037D700 0037A660 11 25 0C 60 */ ps_merge01 f9, f5, f1 +/* 8037D704 0037A664 F0 E4 00 10 */ psq_st f7, 16(r4), 0, qr0 +/* 8037D708 0037A668 11 43 2C E0 */ ps_merge11 f10, f3, f5 +/* 8037D70C 0037A66C F1 04 00 18 */ psq_st f8, 24(r4), 0, qr0 +/* 8037D710 0037A670 F1 24 00 20 */ psq_st f9, 32(r4), 0, qr0 +/* 8037D714 0037A674 F1 44 00 28 */ psq_st f10, 40(r4), 0, qr0 +/* 8037D718 0037A678 4E 80 00 20 */ blr diff --git a/asm/Dolphin/mtx/vec.s b/asm/Dolphin/mtx/vec.s new file mode 100644 index 00000000..850b6234 --- /dev/null +++ b/asm/Dolphin/mtx/vec.s @@ -0,0 +1,42 @@ +.include "macros.inc" + +.section .text, "ax" + +.global C_VECNormalize +C_VECNormalize: +/* 8037D650 0037A5B0 C0 02 CE F0 */ lfs f0, lbl_805AEC10@sda21(r2) +/* 8037D654 0037A5B4 C0 22 CE F4 */ lfs f1, lbl_805AEC14@sda21(r2) +/* 8037D658 0037A5B8 E0 43 00 00 */ psq_l f2, 0(r3), 0, qr0 +/* 8037D65C 0037A5BC 10 A2 00 B2 */ ps_mul f5, f2, f2 +/* 8037D660 0037A5C0 E0 63 80 08 */ psq_l f3, 8(r3), 1, qr0 +/* 8037D664 0037A5C4 10 83 28 FA */ ps_madd f4, f3, f3, f5 +/* 8037D668 0037A5C8 10 84 28 D4 */ ps_sum0 f4, f4, f3, f5 +/* 8037D66C 0037A5CC FC A0 20 34 */ frsqrte f5, f4 +/* 8037D670 0037A5D0 EC C5 01 72 */ fmuls f6, f5, f5 +/* 8037D674 0037A5D4 EC 05 00 32 */ fmuls f0, f5, f0 +/* 8037D678 0037A5D8 EC C6 09 3C */ fnmsubs f6, f6, f4, f1 +/* 8037D67C 0037A5DC EC A6 00 32 */ fmuls f5, f6, f0 +/* 8037D680 0037A5E0 10 42 01 58 */ ps_muls0 f2, f2, f5 +/* 8037D684 0037A5E4 F0 44 00 00 */ psq_st f2, 0(r4), 0, qr0 +/* 8037D688 0037A5E8 10 63 01 58 */ ps_muls0 f3, f3, f5 +/* 8037D68C 0037A5EC F0 64 80 08 */ psq_st f3, 8(r4), 1, qr0 +/* 8037D690 0037A5F0 4E 80 00 20 */ blr + +.global C_VECCrossProduct +C_VECCrossProduct: +/* 8037D694 0037A5F4 E0 24 00 00 */ psq_l f1, 0(r4), 0, qr0 +/* 8037D698 0037A5F8 C0 43 00 08 */ lfs f2, 8(r3) +/* 8037D69C 0037A5FC E0 03 00 00 */ psq_l f0, 0(r3), 0, qr0 +/* 8037D6A0 0037A600 10 C1 0C A0 */ ps_merge10 f6, f1, f1 +/* 8037D6A4 0037A604 C0 64 00 08 */ lfs f3, 8(r4) +/* 8037D6A8 0037A608 10 81 00 B2 */ ps_mul f4, f1, f2 +/* 8037D6AC 0037A60C 10 E1 00 18 */ ps_muls0 f7, f1, f0 +/* 8037D6B0 0037A610 10 A0 20 F8 */ ps_msub f5, f0, f3, f4 +/* 8037D6B4 0037A614 11 00 39 B8 */ ps_msub f8, f0, f6, f7 +/* 8037D6B8 0037A618 11 25 2C E0 */ ps_merge11 f9, f5, f5 +/* 8037D6BC 0037A61C 11 45 44 60 */ ps_merge01 f10, f5, f8 +/* 8037D6C0 0037A620 F1 25 80 00 */ psq_st f9, 0(r5), 1, qr0 +/* 8037D6C4 0037A624 11 40 50 50 */ ps_neg f10, f10 +/* 8037D6C8 0037A628 F1 45 00 04 */ psq_st f10, 4(r5), 0, qr0 +/* 8037D6CC 0037A62C 4E 80 00 20 */ blr + diff --git a/asm/Dolphin/vi.s b/asm/Dolphin/vi.s new file mode 100644 index 00000000..dbff1809 --- /dev/null +++ b/asm/Dolphin/vi.s @@ -0,0 +1,2201 @@ +.include "macros.inc" + +.section .text, "ax" # 0x80003640 - 0x803CB1C0 + +.global __VIRetraceHandler +__VIRetraceHandler: +/* 80387684 003845E4 7C 08 02 A6 */ mflr r0 +/* 80387688 003845E8 3C 60 CC 00 */ lis r3, 0xCC002000@ha +/* 8038768C 003845EC 90 01 00 04 */ stw r0, 4(r1) +/* 80387690 003845F0 38 A3 20 00 */ addi r5, r3, 0xCC002000@l +/* 80387694 003845F4 3C 60 80 54 */ lis r3, lbl_80542040@ha +/* 80387698 003845F8 94 21 FD 08 */ stwu r1, -0x2f8(r1) +/* 8038769C 003845FC 38 E0 00 00 */ li r7, 0 +/* 803876A0 00384600 BF 61 02 E4 */ stmw r27, 0x2e4(r1) +/* 803876A4 00384604 3B C4 00 00 */ addi r30, r4, 0 +/* 803876A8 00384608 3B E3 20 40 */ addi r31, r3, lbl_80542040@l +/* 803876AC 0038460C A4 C5 00 30 */ lhzu r6, 0x30(r5) +/* 803876B0 00384610 54 C0 04 21 */ rlwinm. r0, r6, 0, 0x10, 0x10 +/* 803876B4 00384614 41 82 00 10 */ beq lbl_803876C4 +/* 803876B8 00384618 54 C0 04 5E */ rlwinm r0, r6, 0, 0x11, 0xf +/* 803876BC 0038461C B0 05 00 00 */ sth r0, 0(r5) +/* 803876C0 00384620 60 E7 00 01 */ ori r7, r7, 1 +lbl_803876C4: +/* 803876C4 00384624 3C 60 CC 00 */ lis r3, 0xCC002034@ha +/* 803876C8 00384628 A4 83 20 34 */ lhzu r4, 0xCC002034@l(r3) +/* 803876CC 0038462C 54 80 04 21 */ rlwinm. r0, r4, 0, 0x10, 0x10 +/* 803876D0 00384630 41 82 00 10 */ beq lbl_803876E0 +/* 803876D4 00384634 54 80 04 5E */ rlwinm r0, r4, 0, 0x11, 0xf +/* 803876D8 00384638 B0 03 00 00 */ sth r0, 0(r3) +/* 803876DC 0038463C 60 E7 00 02 */ ori r7, r7, 2 +lbl_803876E0: +/* 803876E0 00384640 3C 60 CC 00 */ lis r3, 0xCC002038@ha +/* 803876E4 00384644 A4 83 20 38 */ lhzu r4, 0xCC002038@l(r3) +/* 803876E8 00384648 54 80 04 21 */ rlwinm. r0, r4, 0, 0x10, 0x10 +/* 803876EC 0038464C 41 82 00 10 */ beq lbl_803876FC +/* 803876F0 00384650 54 80 04 5E */ rlwinm r0, r4, 0, 0x11, 0xf +/* 803876F4 00384654 B0 03 00 00 */ sth r0, 0(r3) +/* 803876F8 00384658 60 E7 00 04 */ ori r7, r7, 4 +lbl_803876FC: +/* 803876FC 0038465C 3C 60 CC 00 */ lis r3, 0xCC00203C@ha +/* 80387700 00384660 A4 83 20 3C */ lhzu r4, 0xCC00203C@l(r3) +/* 80387704 00384664 54 80 04 21 */ rlwinm. r0, r4, 0, 0x10, 0x10 +/* 80387708 00384668 41 82 00 10 */ beq lbl_80387718 +/* 8038770C 0038466C 54 80 04 5E */ rlwinm r0, r4, 0, 0x11, 0xf +/* 80387710 00384670 B0 03 00 00 */ sth r0, 0(r3) +/* 80387714 00384674 60 E7 00 08 */ ori r7, r7, 8 +lbl_80387718: +/* 80387718 00384678 54 E0 07 7B */ rlwinm. r0, r7, 0, 0x1d, 0x1d +/* 8038771C 0038467C 40 82 00 0C */ bne lbl_80387728 +/* 80387720 00384680 54 E0 07 39 */ rlwinm. r0, r7, 0, 0x1c, 0x1c +/* 80387724 00384684 41 82 00 10 */ beq lbl_80387734 +lbl_80387728: +/* 80387728 00384688 7F C3 F3 78 */ mr r3, r30 +/* 8038772C 0038468C 4B FF 7C F1 */ bl OSSetCurrentContext +/* 80387730 00384690 48 00 01 70 */ b lbl_803878A0 +lbl_80387734: +/* 80387734 00384694 80 8D AD 9C */ lwz r4, lbl_805A995C@sda21(r13) +/* 80387738 00384698 38 61 00 18 */ addi r3, r1, 0x18 +/* 8038773C 0038469C 38 04 00 01 */ addi r0, r4, 1 +/* 80387740 003846A0 90 0D AD 9C */ stw r0, lbl_805A995C@sda21(r13) +/* 80387744 003846A4 4B FF 7E D1 */ bl OSClearContext +/* 80387748 003846A8 38 61 00 18 */ addi r3, r1, 0x18 +/* 8038774C 003846AC 4B FF 7C D1 */ bl OSSetCurrentContext +/* 80387750 003846B0 81 8D AD AC */ lwz r12, lbl_805A996C@sda21(r13) +/* 80387754 003846B4 28 0C 00 00 */ cmplwi r12, 0 +/* 80387758 003846B8 41 82 00 10 */ beq lbl_80387768 +/* 8038775C 003846BC 80 6D AD 9C */ lwz r3, lbl_805A995C@sda21(r13) +/* 80387760 003846C0 7D 88 03 A6 */ mtlr r12 +/* 80387764 003846C4 4E 80 00 21 */ blrl +lbl_80387768: +/* 80387768 003846C8 80 0D AD A0 */ lwz r0, lbl_805A9960@sda21(r13) +/* 8038776C 003846CC 28 00 00 00 */ cmplwi r0, 0 +/* 80387770 003846D0 41 82 00 F4 */ beq lbl_80387864 +/* 80387774 003846D4 80 0D AD C8 */ lwz r0, lbl_805A9988@sda21(r13) +/* 80387778 003846D8 28 00 00 01 */ cmplwi r0, 1 +/* 8038777C 003846DC 40 82 00 10 */ bne lbl_8038778C +/* 80387780 003846E0 48 00 1B B1 */ bl getCurrentFieldEvenOdd +/* 80387784 003846E4 28 03 00 00 */ cmplwi r3, 0 +/* 80387788 003846E8 41 82 00 C4 */ beq lbl_8038784C +lbl_8038778C: +/* 8038778C 003846EC 3C 60 CC 00 */ lis r3, 0xCC002000@ha +/* 80387790 003846F0 3B A3 20 00 */ addi r29, r3, 0xCC002000@l +/* 80387794 003846F4 48 00 00 78 */ b lbl_8038780C +lbl_80387798: +/* 80387798 003846F8 80 6D AD D0 */ lwz r3, lbl_805A9990@sda21(r13) +/* 8038779C 003846FC 38 A0 00 20 */ li r5, 0x20 +/* 803877A0 00384700 83 6D AD D4 */ lwz r27, lbl_805A9994@sda21(r13) +/* 803877A4 00384704 38 9B 00 00 */ addi r4, r27, 0 +/* 803877A8 00384708 48 00 27 71 */ bl __shr2u +/* 803877AC 0038470C 7C 84 00 34 */ cntlzw r4, r4 +/* 803877B0 00384710 2C 04 00 20 */ cmpwi r4, 0x20 +/* 803877B4 00384714 38 00 FF FF */ li r0, -1 +/* 803877B8 00384718 7F 60 00 38 */ and r0, r27, r0 +/* 803877BC 0038471C 40 80 00 08 */ bge lbl_803877C4 +/* 803877C0 00384720 48 00 00 0C */ b lbl_803877CC +lbl_803877C4: +/* 803877C4 00384724 7C 03 00 34 */ cntlzw r3, r0 +/* 803877C8 00384728 38 83 00 20 */ addi r4, r3, 0x20 +lbl_803877CC: +/* 803877CC 0038472C 54 86 08 3C */ slwi r6, r4, 1 +/* 803877D0 00384730 7C 7F 32 14 */ add r3, r31, r6 +/* 803877D4 00384734 A0 03 00 78 */ lhz r0, 0x78(r3) +/* 803877D8 00384738 20 A4 00 3F */ subfic r5, r4, 0x3f +/* 803877DC 0038473C 38 60 00 00 */ li r3, 0 +/* 803877E0 00384740 7C 1D 33 2E */ sthx r0, r29, r6 +/* 803877E4 00384744 38 80 00 01 */ li r4, 1 +/* 803877E8 00384748 48 00 27 0D */ bl __shl2i +/* 803877EC 0038474C 80 0D AD D0 */ lwz r0, lbl_805A9990@sda21(r13) +/* 803877F0 00384750 7C 65 18 F8 */ nor r5, r3, r3 +/* 803877F4 00384754 7C 84 20 F8 */ nor r4, r4, r4 +/* 803877F8 00384758 80 6D AD D4 */ lwz r3, lbl_805A9994@sda21(r13) +/* 803877FC 0038475C 7C 00 28 38 */ and r0, r0, r5 +/* 80387800 00384760 7C 63 20 38 */ and r3, r3, r4 +/* 80387804 00384764 90 6D AD D4 */ stw r3, lbl_805A9994@sda21(r13) +/* 80387808 00384768 90 0D AD D0 */ stw r0, lbl_805A9990@sda21(r13) +lbl_8038780C: +/* 8038780C 0038476C 80 0D AD D0 */ lwz r0, lbl_805A9990@sda21(r13) +/* 80387810 00384770 38 80 00 00 */ li r4, 0 +/* 80387814 00384774 80 6D AD D4 */ lwz r3, lbl_805A9994@sda21(r13) +/* 80387818 00384778 7C 00 22 78 */ xor r0, r0, r4 +/* 8038781C 0038477C 7C 63 22 78 */ xor r3, r3, r4 +/* 80387820 00384780 7C 60 03 79 */ or. r0, r3, r0 +/* 80387824 00384784 40 82 FF 74 */ bne lbl_80387798 +/* 80387828 00384788 90 8D AD C8 */ stw r4, lbl_805A9988@sda21(r13) +/* 8038782C 0038478C 38 80 00 01 */ li r4, 1 +/* 80387830 00384790 80 0D AD E0 */ lwz r0, lbl_805A99A0@sda21(r13) +/* 80387834 00384794 80 7F 01 44 */ lwz r3, 0x144(r31) +/* 80387838 00384798 90 6D AD D8 */ stw r3, lbl_805A9998@sda21(r13) +/* 8038783C 0038479C 80 7F 01 18 */ lwz r3, 0x118(r31) +/* 80387840 003847A0 90 6D AD DC */ stw r3, lbl_805A999C@sda21(r13) +/* 80387844 003847A4 90 0D AD E4 */ stw r0, lbl_805A99A4@sda21(r13) +/* 80387848 003847A8 48 00 00 08 */ b lbl_80387850 +lbl_8038784C: +/* 8038784C 003847AC 38 80 00 00 */ li r4, 0 +lbl_80387850: +/* 80387850 003847B0 2C 04 00 00 */ cmpwi r4, 0 +/* 80387854 003847B4 41 82 00 10 */ beq lbl_80387864 +/* 80387858 003847B8 38 00 00 00 */ li r0, 0 +/* 8038785C 003847BC 90 0D AD A0 */ stw r0, lbl_805A9960@sda21(r13) +/* 80387860 003847C0 48 03 87 91 */ bl SIRefreshSamplingRate +lbl_80387864: +/* 80387864 003847C4 80 0D AD B0 */ lwz r0, lbl_805A9970@sda21(r13) +/* 80387868 003847C8 28 00 00 00 */ cmplwi r0, 0 +/* 8038786C 003847CC 41 82 00 1C */ beq lbl_80387888 +/* 80387870 003847D0 38 61 00 18 */ addi r3, r1, 0x18 +/* 80387874 003847D4 4B FF 7D A1 */ bl OSClearContext +/* 80387878 003847D8 81 8D AD B0 */ lwz r12, lbl_805A9970@sda21(r13) +/* 8038787C 003847DC 80 6D AD 9C */ lwz r3, lbl_805A995C@sda21(r13) +/* 80387880 003847E0 7D 88 03 A6 */ mtlr r12 +/* 80387884 003847E4 4E 80 00 21 */ blrl +lbl_80387888: +/* 80387888 003847E8 38 6D AD A4 */ addi r3, r13, lbl_805A9964@sda21 +/* 8038788C 003847EC 4B FF D9 6D */ bl OSWakeupThread +/* 80387890 003847F0 38 61 00 18 */ addi r3, r1, 0x18 +/* 80387894 003847F4 4B FF 7D 81 */ bl OSClearContext +/* 80387898 003847F8 7F C3 F3 78 */ mr r3, r30 +/* 8038789C 003847FC 4B FF 7B 81 */ bl OSSetCurrentContext +lbl_803878A0: +/* 803878A0 00384800 BB 61 02 E4 */ lmw r27, 0x2e4(r1) +/* 803878A4 00384804 80 01 02 FC */ lwz r0, 0x2fc(r1) +/* 803878A8 00384808 38 21 02 F8 */ addi r1, r1, 0x2f8 +/* 803878AC 0038480C 7C 08 03 A6 */ mtlr r0 +/* 803878B0 00384810 4E 80 00 20 */ blr + +.global VISetPreRetraceCallback +VISetPreRetraceCallback: +/* 803878B4 00384814 7C 08 02 A6 */ mflr r0 +/* 803878B8 00384818 90 01 00 04 */ stw r0, 4(r1) +/* 803878BC 0038481C 94 21 FF E8 */ stwu r1, -0x18(r1) +/* 803878C0 00384820 93 E1 00 14 */ stw r31, 0x14(r1) +/* 803878C4 00384824 93 C1 00 10 */ stw r30, 0x10(r1) +/* 803878C8 00384828 7C 7E 1B 78 */ mr r30, r3 +/* 803878CC 0038482C 83 ED AD AC */ lwz r31, lbl_805A996C@sda21(r13) +/* 803878D0 00384830 4B FF 9D 91 */ bl OSDisableInterrupts +/* 803878D4 00384834 93 CD AD AC */ stw r30, lbl_805A996C@sda21(r13) +/* 803878D8 00384838 4B FF 9D B1 */ bl OSRestoreInterrupts +/* 803878DC 0038483C 7F E3 FB 78 */ mr r3, r31 +/* 803878E0 00384840 80 01 00 1C */ lwz r0, 0x1c(r1) +/* 803878E4 00384844 83 E1 00 14 */ lwz r31, 0x14(r1) +/* 803878E8 00384848 83 C1 00 10 */ lwz r30, 0x10(r1) +/* 803878EC 0038484C 38 21 00 18 */ addi r1, r1, 0x18 +/* 803878F0 00384850 7C 08 03 A6 */ mtlr r0 +/* 803878F4 00384854 4E 80 00 20 */ blr + +.global VISetPostRetraceCallback +VISetPostRetraceCallback: +/* 803878F8 00384858 7C 08 02 A6 */ mflr r0 +/* 803878FC 0038485C 90 01 00 04 */ stw r0, 4(r1) +/* 80387900 00384860 94 21 FF E8 */ stwu r1, -0x18(r1) +/* 80387904 00384864 93 E1 00 14 */ stw r31, 0x14(r1) +/* 80387908 00384868 93 C1 00 10 */ stw r30, 0x10(r1) +/* 8038790C 0038486C 7C 7E 1B 78 */ mr r30, r3 +/* 80387910 00384870 83 ED AD B0 */ lwz r31, lbl_805A9970@sda21(r13) +/* 80387914 00384874 4B FF 9D 4D */ bl OSDisableInterrupts +/* 80387918 00384878 93 CD AD B0 */ stw r30, lbl_805A9970@sda21(r13) +/* 8038791C 0038487C 4B FF 9D 6D */ bl OSRestoreInterrupts +/* 80387920 00384880 7F E3 FB 78 */ mr r3, r31 +/* 80387924 00384884 80 01 00 1C */ lwz r0, 0x1c(r1) +/* 80387928 00384888 83 E1 00 14 */ lwz r31, 0x14(r1) +/* 8038792C 0038488C 83 C1 00 10 */ lwz r30, 0x10(r1) +/* 80387930 00384890 38 21 00 18 */ addi r1, r1, 0x18 +/* 80387934 00384894 7C 08 03 A6 */ mtlr r0 +/* 80387938 00384898 4E 80 00 20 */ blr + +.global getTiming +getTiming: +/* 8038793C 0038489C 28 03 00 1A */ cmplwi r3, 0x1a +/* 80387940 003848A0 3C 80 80 3F */ lis r4, lbl_803F23A8@ha +/* 80387944 003848A4 38 A4 23 A8 */ addi r5, r4, lbl_803F23A8@l +/* 80387948 003848A8 41 81 00 8C */ bgt lbl_803879D4 +/* 8038794C 003848AC 3C 80 80 3F */ lis r4, lbl_803F259C@ha +/* 80387950 003848B0 38 84 25 9C */ addi r4, r4, lbl_803F259C@l +/* 80387954 003848B4 54 60 10 3A */ slwi r0, r3, 2 +/* 80387958 003848B8 7C 04 00 2E */ lwzx r0, r4, r0 +/* 8038795C 003848BC 7C 09 03 A6 */ mtctr r0 +/* 80387960 003848C0 4E 80 04 20 */ bctr +/* 80387964 003848C4 38 65 00 44 */ addi r3, r5, 0x44 +/* 80387968 003848C8 4E 80 00 20 */ blr +/* 8038796C 003848CC 38 65 00 6A */ addi r3, r5, 0x6a +/* 80387970 003848D0 4E 80 00 20 */ blr +/* 80387974 003848D4 38 65 00 90 */ addi r3, r5, 0x90 +/* 80387978 003848D8 4E 80 00 20 */ blr +/* 8038797C 003848DC 38 65 00 B6 */ addi r3, r5, 0xb6 +/* 80387980 003848E0 4E 80 00 20 */ blr +/* 80387984 003848E4 38 65 00 44 */ addi r3, r5, 0x44 +/* 80387988 003848E8 4E 80 00 20 */ blr +/* 8038798C 003848EC 38 65 00 6A */ addi r3, r5, 0x6a +/* 80387990 003848F0 4E 80 00 20 */ blr +/* 80387994 003848F4 38 65 00 DC */ addi r3, r5, 0xdc +/* 80387998 003848F8 4E 80 00 20 */ blr +/* 8038799C 003848FC 38 65 01 02 */ addi r3, r5, 0x102 +/* 803879A0 00384900 4E 80 00 20 */ blr +/* 803879A4 00384904 38 65 01 28 */ addi r3, r5, 0x128 +/* 803879A8 00384908 4E 80 00 20 */ blr +/* 803879AC 0038490C 38 65 01 4E */ addi r3, r5, 0x14e +/* 803879B0 00384910 4E 80 00 20 */ blr +/* 803879B4 00384914 38 65 00 90 */ addi r3, r5, 0x90 +/* 803879B8 00384918 4E 80 00 20 */ blr +/* 803879BC 0038491C 38 65 00 B6 */ addi r3, r5, 0xb6 +/* 803879C0 00384920 4E 80 00 20 */ blr +/* 803879C4 00384924 38 65 01 74 */ addi r3, r5, 0x174 +/* 803879C8 00384928 4E 80 00 20 */ blr +/* 803879CC 0038492C 38 65 01 9A */ addi r3, r5, 0x19a +/* 803879D0 00384930 4E 80 00 20 */ blr +lbl_803879D4: +/* 803879D4 00384934 38 60 00 00 */ li r3, 0 +/* 803879D8 00384938 4E 80 00 20 */ blr + +.global __VIInit +__VIInit: +/* 803879DC 0038493C 7C 08 02 A6 */ mflr r0 +/* 803879E0 00384940 90 01 00 04 */ stw r0, 4(r1) +/* 803879E4 00384944 94 21 FF D0 */ stwu r1, -0x30(r1) +/* 803879E8 00384948 93 E1 00 2C */ stw r31, 0x2c(r1) +/* 803879EC 0038494C 54 7F F0 BE */ srwi r31, r3, 2 +/* 803879F0 00384950 93 C1 00 28 */ stw r30, 0x28(r1) +/* 803879F4 00384954 93 A1 00 24 */ stw r29, 0x24(r1) +/* 803879F8 00384958 3B A3 00 00 */ addi r29, r3, 0 +/* 803879FC 0038495C 3C 60 80 00 */ lis r3, 0x800000CC@ha +/* 80387A00 00384960 93 E3 00 CC */ stw r31, 0x800000CC@l(r3) +/* 80387A04 00384964 38 7D 00 00 */ addi r3, r29, 0 +/* 80387A08 00384968 57 BE 07 BC */ rlwinm r30, r29, 0, 0x1e, 0x1e +/* 80387A0C 0038496C 4B FF FF 31 */ bl getTiming +/* 80387A10 00384970 3C 80 CC 00 */ lis r4, 0xCC002000@ha +/* 80387A14 00384974 38 00 00 02 */ li r0, 2 +/* 80387A18 00384978 38 A4 20 00 */ addi r5, r4, 0xCC002000@l +/* 80387A1C 0038497C B4 05 00 02 */ sthu r0, 2(r5) +/* 80387A20 00384980 38 00 00 00 */ li r0, 0 +/* 80387A24 00384984 90 01 00 1C */ stw r0, 0x1c(r1) +/* 80387A28 00384988 80 01 00 1C */ lwz r0, 0x1c(r1) +/* 80387A2C 0038498C 28 00 03 E8 */ cmplwi r0, 0x3e8 +/* 80387A30 00384990 40 80 00 20 */ bge lbl_80387A50 +/* 80387A34 00384994 48 00 00 10 */ b lbl_80387A44 +lbl_80387A38: +/* 80387A38 00384998 80 81 00 1C */ lwz r4, 0x1c(r1) +/* 80387A3C 0038499C 38 04 00 08 */ addi r0, r4, 8 +/* 80387A40 003849A0 90 01 00 1C */ stw r0, 0x1c(r1) +lbl_80387A44: +/* 80387A44 003849A4 80 01 00 1C */ lwz r0, 0x1c(r1) +/* 80387A48 003849A8 28 00 03 E8 */ cmplwi r0, 0x3e8 +/* 80387A4C 003849AC 41 80 FF EC */ blt lbl_80387A38 +lbl_80387A50: +/* 80387A50 003849B0 38 00 00 00 */ li r0, 0 +/* 80387A54 003849B4 B0 05 00 00 */ sth r0, 0(r5) +/* 80387A58 003849B8 3D 80 CC 00 */ lis r12, 0xCC002006@ha +/* 80387A5C 003849BC 39 00 28 28 */ li r8, 0x2828 +/* 80387A60 003849C0 A0 C3 00 1A */ lhz r6, 0x1a(r3) +/* 80387A64 003849C4 38 E0 00 01 */ li r7, 1 +/* 80387A68 003849C8 2C 1D 00 02 */ cmpwi r29, 2 +/* 80387A6C 003849CC B0 CC 20 06 */ sth r6, 0xCC002006@l(r12) +/* 80387A70 003849D0 38 C0 10 01 */ li r6, 0x1001 +/* 80387A74 003849D4 38 8C 20 00 */ addi r4, r12, 0x2000 +/* 80387A78 003849D8 89 23 00 1D */ lbz r9, 0x1d(r3) +/* 80387A7C 003849DC 89 43 00 1E */ lbz r10, 0x1e(r3) +/* 80387A80 003849E0 51 2A 44 2E */ rlwimi r10, r9, 8, 0x10, 0x17 +/* 80387A84 003849E4 B1 4C 20 04 */ sth r10, 0x2004(r12) +/* 80387A88 003849E8 89 23 00 1F */ lbz r9, 0x1f(r3) +/* 80387A8C 003849EC 89 43 00 1C */ lbz r10, 0x1c(r3) +/* 80387A90 003849F0 55 29 38 30 */ slwi r9, r9, 7 +/* 80387A94 003849F4 7D 49 4B 78 */ or r9, r10, r9 +/* 80387A98 003849F8 B1 2C 20 0A */ sth r9, 0x200a(r12) +/* 80387A9C 003849FC A1 23 00 20 */ lhz r9, 0x20(r3) +/* 80387AA0 00384A00 55 29 0C 3C */ rlwinm r9, r9, 1, 0x10, 0x1e +/* 80387AA4 00384A04 B1 2C 20 08 */ sth r9, 0x2008(r12) +/* 80387AA8 00384A08 A1 23 00 02 */ lhz r9, 2(r3) +/* 80387AAC 00384A0C 89 63 00 00 */ lbz r11, 0(r3) +/* 80387AB0 00384A10 55 29 08 3C */ slwi r9, r9, 1 +/* 80387AB4 00384A14 A1 43 00 04 */ lhz r10, 4(r3) +/* 80387AB8 00384A18 39 29 FF FE */ addi r9, r9, -2 +/* 80387ABC 00384A1C B1 6C 20 00 */ sth r11, 0x2000(r12) +/* 80387AC0 00384A20 7D 2A 4A 14 */ add r9, r10, r9 +/* 80387AC4 00384A24 B1 2C 20 0E */ sth r9, 0x200e(r12) +/* 80387AC8 00384A28 A1 23 00 08 */ lhz r9, 8(r3) +/* 80387ACC 00384A2C 39 29 00 02 */ addi r9, r9, 2 +/* 80387AD0 00384A30 B1 2C 20 0C */ sth r9, 0x200c(r12) +/* 80387AD4 00384A34 A1 23 00 02 */ lhz r9, 2(r3) +/* 80387AD8 00384A38 A1 43 00 06 */ lhz r10, 6(r3) +/* 80387ADC 00384A3C 55 29 08 3C */ slwi r9, r9, 1 +/* 80387AE0 00384A40 39 29 FF FE */ addi r9, r9, -2 +/* 80387AE4 00384A44 7D 2A 4A 14 */ add r9, r10, r9 +/* 80387AE8 00384A48 B1 2C 20 12 */ sth r9, 0x2012(r12) +/* 80387AEC 00384A4C A1 23 00 0A */ lhz r9, 0xa(r3) +/* 80387AF0 00384A50 39 29 00 02 */ addi r9, r9, 2 +/* 80387AF4 00384A54 B1 2C 20 10 */ sth r9, 0x2010(r12) +/* 80387AF8 00384A58 A1 23 00 10 */ lhz r9, 0x10(r3) +/* 80387AFC 00384A5C 89 43 00 0C */ lbz r10, 0xc(r3) +/* 80387B00 00384A60 55 29 28 34 */ slwi r9, r9, 5 +/* 80387B04 00384A64 7D 49 4B 78 */ or r9, r10, r9 +/* 80387B08 00384A68 B1 2C 20 16 */ sth r9, 0x2016(r12) +/* 80387B0C 00384A6C A1 23 00 14 */ lhz r9, 0x14(r3) +/* 80387B10 00384A70 89 43 00 0E */ lbz r10, 0xe(r3) +/* 80387B14 00384A74 55 29 28 34 */ slwi r9, r9, 5 +/* 80387B18 00384A78 7D 49 4B 78 */ or r9, r10, r9 +/* 80387B1C 00384A7C B1 2C 20 14 */ sth r9, 0x2014(r12) +/* 80387B20 00384A80 A1 23 00 12 */ lhz r9, 0x12(r3) +/* 80387B24 00384A84 89 43 00 0D */ lbz r10, 0xd(r3) +/* 80387B28 00384A88 55 29 28 34 */ slwi r9, r9, 5 +/* 80387B2C 00384A8C 7D 49 4B 78 */ or r9, r10, r9 +/* 80387B30 00384A90 B1 2C 20 1A */ sth r9, 0x201a(r12) +/* 80387B34 00384A94 A1 23 00 16 */ lhz r9, 0x16(r3) +/* 80387B38 00384A98 89 43 00 0F */ lbz r10, 0xf(r3) +/* 80387B3C 00384A9C 55 29 28 34 */ slwi r9, r9, 5 +/* 80387B40 00384AA0 7D 49 4B 78 */ or r9, r10, r9 +/* 80387B44 00384AA4 B1 2C 20 18 */ sth r9, 0x2018(r12) +/* 80387B48 00384AA8 B1 0C 20 48 */ sth r8, 0x2048(r12) +/* 80387B4C 00384AAC B0 EC 20 36 */ sth r7, 0x2036(r12) +/* 80387B50 00384AB0 B0 CC 20 34 */ sth r6, 0x2034(r12) +/* 80387B54 00384AB4 A0 C3 00 18 */ lhz r6, 0x18(r3) +/* 80387B58 00384AB8 A0 63 00 1A */ lhz r3, 0x1a(r3) +/* 80387B5C 00384ABC 7C C6 0E 70 */ srawi r6, r6, 1 +/* 80387B60 00384AC0 38 63 00 01 */ addi r3, r3, 1 +/* 80387B64 00384AC4 7C C6 01 94 */ addze r6, r6 +/* 80387B68 00384AC8 B0 6C 20 32 */ sth r3, 0x2032(r12) +/* 80387B6C 00384ACC 38 C6 00 01 */ addi r6, r6, 1 +/* 80387B70 00384AD0 60 C3 10 00 */ ori r3, r6, 0x1000 +/* 80387B74 00384AD4 B0 6C 20 30 */ sth r3, 0x2030(r12) +/* 80387B78 00384AD8 41 82 00 30 */ beq lbl_80387BA8 +/* 80387B7C 00384ADC 2C 1D 00 03 */ cmpwi r29, 3 +/* 80387B80 00384AE0 41 82 00 28 */ beq lbl_80387BA8 +/* 80387B84 00384AE4 2C 1D 00 1A */ cmpwi r29, 0x1a +/* 80387B88 00384AE8 41 82 00 20 */ beq lbl_80387BA8 +/* 80387B8C 00384AEC 57 C3 10 3A */ slwi r3, r30, 2 +/* 80387B90 00384AF0 60 66 00 01 */ ori r6, r3, 1 +/* 80387B94 00384AF4 57 E3 40 2E */ slwi r3, r31, 8 +/* 80387B98 00384AF8 7C C3 1B 78 */ or r3, r6, r3 +/* 80387B9C 00384AFC B0 65 00 00 */ sth r3, 0(r5) +/* 80387BA0 00384B00 B0 04 00 6C */ sth r0, 0x6c(r4) +/* 80387BA4 00384B04 48 00 00 1C */ b lbl_80387BC0 +lbl_80387BA8: +/* 80387BA8 00384B08 57 E0 40 2E */ slwi r0, r31, 8 +/* 80387BAC 00384B0C 60 00 00 05 */ ori r0, r0, 5 +/* 80387BB0 00384B10 B0 05 00 00 */ sth r0, 0(r5) +/* 80387BB4 00384B14 3C 60 CC 00 */ lis r3, 0xCC00206C@ha +/* 80387BB8 00384B18 38 00 00 01 */ li r0, 1 +/* 80387BBC 00384B1C B0 03 20 6C */ sth r0, 0xCC00206C@l(r3) +lbl_80387BC0: +/* 80387BC0 00384B20 80 01 00 34 */ lwz r0, 0x34(r1) +/* 80387BC4 00384B24 83 E1 00 2C */ lwz r31, 0x2c(r1) +/* 80387BC8 00384B28 83 C1 00 28 */ lwz r30, 0x28(r1) +/* 80387BCC 00384B2C 83 A1 00 24 */ lwz r29, 0x24(r1) +/* 80387BD0 00384B30 38 21 00 30 */ addi r1, r1, 0x30 +/* 80387BD4 00384B34 7C 08 03 A6 */ mtlr r0 +/* 80387BD8 00384B38 4E 80 00 20 */ blr + +.global VIInit +VIInit: +/* 80387BDC 00384B3C 7C 08 02 A6 */ mflr r0 +/* 80387BE0 00384B40 3C 80 80 3F */ lis r4, lbl_803F23A8@ha +/* 80387BE4 00384B44 90 01 00 04 */ stw r0, 4(r1) +/* 80387BE8 00384B48 3C 60 80 54 */ lis r3, lbl_80542040@ha +/* 80387BEC 00384B4C 94 21 FF E8 */ stwu r1, -0x18(r1) +/* 80387BF0 00384B50 93 E1 00 14 */ stw r31, 0x14(r1) +/* 80387BF4 00384B54 93 C1 00 10 */ stw r30, 0x10(r1) +/* 80387BF8 00384B58 3B C3 20 40 */ addi r30, r3, lbl_80542040@l +/* 80387BFC 00384B5C 93 A1 00 0C */ stw r29, 0xc(r1) +/* 80387C00 00384B60 3B A4 23 A8 */ addi r29, r4, lbl_803F23A8@l +/* 80387C04 00384B64 93 81 00 08 */ stw r28, 8(r1) +/* 80387C08 00384B68 80 0D AD 98 */ lwz r0, lbl_805A9958@sda21(r13) +/* 80387C0C 00384B6C 2C 00 00 00 */ cmpwi r0, 0 +/* 80387C10 00384B70 40 82 04 5C */ bne lbl_8038806C +/* 80387C14 00384B74 80 6D 9F B8 */ lwz r3, lbl_805A8B78@sda21(r13) +/* 80387C18 00384B78 4B FF 64 21 */ bl OSRegisterVersion +/* 80387C1C 00384B7C 38 00 00 01 */ li r0, 1 +/* 80387C20 00384B80 90 0D AD 98 */ stw r0, lbl_805A9958@sda21(r13) +/* 80387C24 00384B84 3C 60 CC 00 */ lis r3, 0xCC002000@ha +/* 80387C28 00384B88 3B 83 20 00 */ addi r28, r3, 0xCC002000@l +/* 80387C2C 00384B8C 90 0D AD B4 */ stw r0, lbl_805A9974@sda21(r13) +/* 80387C30 00384B90 A4 1C 00 02 */ lhzu r0, 2(r28) +/* 80387C34 00384B94 54 00 07 FF */ clrlwi. r0, r0, 0x1f +/* 80387C38 00384B98 40 82 00 0C */ bne lbl_80387C44 +/* 80387C3C 00384B9C 38 60 00 00 */ li r3, 0 +/* 80387C40 00384BA0 4B FF FD 9D */ bl __VIInit +lbl_80387C44: +/* 80387C44 00384BA4 3B E0 00 00 */ li r31, 0 +/* 80387C48 00384BA8 93 ED AD 9C */ stw r31, lbl_805A995C@sda21(r13) +/* 80387C4C 00384BAC 3C 60 CC 00 */ lis r3, 0xCC002000@ha +/* 80387C50 00384BB0 38 63 20 00 */ addi r3, r3, 0xCC002000@l +/* 80387C54 00384BB4 93 ED AD C4 */ stw r31, lbl_805A9984@sda21(r13) +/* 80387C58 00384BB8 38 00 02 80 */ li r0, 0x280 +/* 80387C5C 00384BBC 93 ED AD C0 */ stw r31, lbl_805A9980@sda21(r13) +/* 80387C60 00384BC0 93 ED AD D4 */ stw r31, lbl_805A9994@sda21(r13) +/* 80387C64 00384BC4 93 ED AD D0 */ stw r31, lbl_805A9990@sda21(r13) +/* 80387C68 00384BC8 93 ED AD BC */ stw r31, lbl_805A997C@sda21(r13) +/* 80387C6C 00384BCC 93 ED AD C8 */ stw r31, lbl_805A9988@sda21(r13) +/* 80387C70 00384BD0 93 ED AD A0 */ stw r31, lbl_805A9960@sda21(r13) +/* 80387C74 00384BD4 A0 BD 01 C2 */ lhz r5, 0x1c2(r29) +/* 80387C78 00384BD8 A0 DD 01 C0 */ lhz r6, 0x1c0(r29) +/* 80387C7C 00384BDC 54 A5 54 2A */ rlwinm r5, r5, 0xa, 0x10, 0x15 +/* 80387C80 00384BE0 7C C5 2B 78 */ or r5, r6, r5 +/* 80387C84 00384BE4 B0 A3 00 4E */ sth r5, 0x4e(r3) +/* 80387C88 00384BE8 A0 DD 01 C2 */ lhz r6, 0x1c2(r29) +/* 80387C8C 00384BEC A0 BD 01 C4 */ lhz r5, 0x1c4(r29) +/* 80387C90 00384BF0 7C C6 36 70 */ srawi r6, r6, 6 +/* 80387C94 00384BF4 54 A5 20 36 */ slwi r5, r5, 4 +/* 80387C98 00384BF8 7C C5 2B 78 */ or r5, r6, r5 +/* 80387C9C 00384BFC B0 A3 00 4C */ sth r5, 0x4c(r3) +/* 80387CA0 00384C00 A0 BD 01 C8 */ lhz r5, 0x1c8(r29) +/* 80387CA4 00384C04 A0 DD 01 C6 */ lhz r6, 0x1c6(r29) +/* 80387CA8 00384C08 54 A5 54 2A */ rlwinm r5, r5, 0xa, 0x10, 0x15 +/* 80387CAC 00384C0C 7C C5 2B 78 */ or r5, r6, r5 +/* 80387CB0 00384C10 B0 A3 00 52 */ sth r5, 0x52(r3) +/* 80387CB4 00384C14 A0 DD 01 C8 */ lhz r6, 0x1c8(r29) +/* 80387CB8 00384C18 A0 BD 01 CA */ lhz r5, 0x1ca(r29) +/* 80387CBC 00384C1C 7C C6 36 70 */ srawi r6, r6, 6 +/* 80387CC0 00384C20 54 A5 20 36 */ slwi r5, r5, 4 +/* 80387CC4 00384C24 7C C5 2B 78 */ or r5, r6, r5 +/* 80387CC8 00384C28 B0 A3 00 50 */ sth r5, 0x50(r3) +/* 80387CCC 00384C2C A0 BD 01 CE */ lhz r5, 0x1ce(r29) +/* 80387CD0 00384C30 A0 DD 01 CC */ lhz r6, 0x1cc(r29) +/* 80387CD4 00384C34 54 A5 54 2A */ rlwinm r5, r5, 0xa, 0x10, 0x15 +/* 80387CD8 00384C38 7C C5 2B 78 */ or r5, r6, r5 +/* 80387CDC 00384C3C B0 A3 00 56 */ sth r5, 0x56(r3) +/* 80387CE0 00384C40 A0 BD 01 CE */ lhz r5, 0x1ce(r29) +/* 80387CE4 00384C44 A0 9D 01 D0 */ lhz r4, 0x1d0(r29) +/* 80387CE8 00384C48 7C A5 36 70 */ srawi r5, r5, 6 +/* 80387CEC 00384C4C 54 84 20 36 */ slwi r4, r4, 4 +/* 80387CF0 00384C50 7C A4 23 78 */ or r4, r5, r4 +/* 80387CF4 00384C54 B0 83 00 54 */ sth r4, 0x54(r3) +/* 80387CF8 00384C58 A0 9D 01 D4 */ lhz r4, 0x1d4(r29) +/* 80387CFC 00384C5C A0 BD 01 D2 */ lhz r5, 0x1d2(r29) +/* 80387D00 00384C60 54 84 40 2E */ slwi r4, r4, 8 +/* 80387D04 00384C64 7C A4 23 78 */ or r4, r5, r4 +/* 80387D08 00384C68 B0 83 00 5A */ sth r4, 0x5a(r3) +/* 80387D0C 00384C6C A0 9D 01 D8 */ lhz r4, 0x1d8(r29) +/* 80387D10 00384C70 A0 BD 01 D6 */ lhz r5, 0x1d6(r29) +/* 80387D14 00384C74 54 84 40 2E */ slwi r4, r4, 8 +/* 80387D18 00384C78 7C A4 23 78 */ or r4, r5, r4 +/* 80387D1C 00384C7C B0 83 00 58 */ sth r4, 0x58(r3) +/* 80387D20 00384C80 A0 9D 01 DC */ lhz r4, 0x1dc(r29) +/* 80387D24 00384C84 A0 BD 01 DA */ lhz r5, 0x1da(r29) +/* 80387D28 00384C88 54 84 40 2E */ slwi r4, r4, 8 +/* 80387D2C 00384C8C 7C A4 23 78 */ or r4, r5, r4 +/* 80387D30 00384C90 B0 83 00 5E */ sth r4, 0x5e(r3) +/* 80387D34 00384C94 A0 9D 01 E0 */ lhz r4, 0x1e0(r29) +/* 80387D38 00384C98 A0 BD 01 DE */ lhz r5, 0x1de(r29) +/* 80387D3C 00384C9C 54 84 40 2E */ slwi r4, r4, 8 +/* 80387D40 00384CA0 7C A4 23 78 */ or r4, r5, r4 +/* 80387D44 00384CA4 B0 83 00 5C */ sth r4, 0x5c(r3) +/* 80387D48 00384CA8 A0 9D 01 E4 */ lhz r4, 0x1e4(r29) +/* 80387D4C 00384CAC A0 BD 01 E2 */ lhz r5, 0x1e2(r29) +/* 80387D50 00384CB0 54 84 40 2E */ slwi r4, r4, 8 +/* 80387D54 00384CB4 7C A4 23 78 */ or r4, r5, r4 +/* 80387D58 00384CB8 B0 83 00 62 */ sth r4, 0x62(r3) +/* 80387D5C 00384CBC A0 9D 01 E8 */ lhz r4, 0x1e8(r29) +/* 80387D60 00384CC0 A0 BD 01 E6 */ lhz r5, 0x1e6(r29) +/* 80387D64 00384CC4 54 84 40 2E */ slwi r4, r4, 8 +/* 80387D68 00384CC8 7C A4 23 78 */ or r4, r5, r4 +/* 80387D6C 00384CCC B0 83 00 60 */ sth r4, 0x60(r3) +/* 80387D70 00384CD0 A0 9D 01 EC */ lhz r4, 0x1ec(r29) +/* 80387D74 00384CD4 A0 BD 01 EA */ lhz r5, 0x1ea(r29) +/* 80387D78 00384CD8 54 84 40 2E */ slwi r4, r4, 8 +/* 80387D7C 00384CDC 7C A4 23 78 */ or r4, r5, r4 +/* 80387D80 00384CE0 B0 83 00 66 */ sth r4, 0x66(r3) +/* 80387D84 00384CE4 A0 9D 01 F0 */ lhz r4, 0x1f0(r29) +/* 80387D88 00384CE8 A0 BD 01 EE */ lhz r5, 0x1ee(r29) +/* 80387D8C 00384CEC 54 84 40 2E */ slwi r4, r4, 8 +/* 80387D90 00384CF0 7C A4 23 78 */ or r4, r5, r4 +/* 80387D94 00384CF4 B0 83 00 64 */ sth r4, 0x64(r3) +/* 80387D98 00384CF8 B0 03 00 70 */ sth r0, 0x70(r3) +/* 80387D9C 00384CFC 4B FF BD 39 */ bl __OSLockSram +/* 80387DA0 00384D00 88 03 00 10 */ lbz r0, 0x10(r3) +/* 80387DA4 00384D04 38 60 00 00 */ li r3, 0 +/* 80387DA8 00384D08 7C 00 07 74 */ extsb r0, r0 +/* 80387DAC 00384D0C B3 ED AD BA */ sth r31, lbl_805A997A@sda21(r13) +/* 80387DB0 00384D10 B0 0D AD B8 */ sth r0, lbl_805A9978@sda21(r13) +/* 80387DB4 00384D14 4B FF C0 E1 */ bl __OSUnlockSram +/* 80387DB8 00384D18 A3 BC 00 00 */ lhz r29, 0(r28) +/* 80387DBC 00384D1C 3C 60 80 00 */ lis r3, 0x800000CC@ha +/* 80387DC0 00384D20 80 63 00 CC */ lwz r3, 0x800000CC@l(r3) +/* 80387DC4 00384D24 38 9E 01 14 */ addi r4, r30, 0x114 +/* 80387DC8 00384D28 57 A0 F7 FE */ rlwinm r0, r29, 0x1e, 0x1f, 0x1f +/* 80387DCC 00384D2C 90 1E 01 14 */ stw r0, 0x114(r30) +/* 80387DD0 00384D30 57 A0 C7 BE */ rlwinm r0, r29, 0x18, 0x1e, 0x1f +/* 80387DD4 00384D34 28 03 00 01 */ cmplwi r3, 1 +/* 80387DD8 00384D38 90 1E 01 18 */ stw r0, 0x118(r30) +/* 80387DDC 00384D3C 3B 9E 01 18 */ addi r28, r30, 0x118 +/* 80387DE0 00384D40 40 82 00 18 */ bne lbl_80387DF8 +/* 80387DE4 00384D44 80 1C 00 00 */ lwz r0, 0(r28) +/* 80387DE8 00384D48 28 00 00 00 */ cmplwi r0, 0 +/* 80387DEC 00384D4C 40 82 00 0C */ bne lbl_80387DF8 +/* 80387DF0 00384D50 38 00 00 05 */ li r0, 5 +/* 80387DF4 00384D54 90 1C 00 00 */ stw r0, 0(r28) +lbl_80387DF8: +/* 80387DF8 00384D58 80 7C 00 00 */ lwz r3, 0(r28) +/* 80387DFC 00384D5C 28 03 00 03 */ cmplwi r3, 3 +/* 80387E00 00384D60 40 82 00 08 */ bne lbl_80387E08 +/* 80387E04 00384D64 38 60 00 00 */ li r3, 0 +lbl_80387E08: +/* 80387E08 00384D68 80 04 00 00 */ lwz r0, 0(r4) +/* 80387E0C 00384D6C 54 63 10 3A */ slwi r3, r3, 2 +/* 80387E10 00384D70 7C 63 02 14 */ add r3, r3, r0 +/* 80387E14 00384D74 4B FF FB 29 */ bl getTiming +/* 80387E18 00384D78 90 7E 01 44 */ stw r3, 0x144(r30) +/* 80387E1C 00384D7C 38 9E 01 44 */ addi r4, r30, 0x144 +/* 80387E20 00384D80 38 00 02 80 */ li r0, 0x280 +/* 80387E24 00384D84 B3 BE 00 02 */ sth r29, 2(r30) +/* 80387E28 00384D88 39 00 00 00 */ li r8, 0 +/* 80387E2C 00384D8C 38 DE 00 F6 */ addi r6, r30, 0xf6 +/* 80387E30 00384D90 80 84 00 00 */ lwz r4, 0(r4) +/* 80387E34 00384D94 38 7E 00 F2 */ addi r3, r30, 0xf2 +/* 80387E38 00384D98 90 8D AD D8 */ stw r4, lbl_805A9998@sda21(r13) +/* 80387E3C 00384D9C 80 9C 00 00 */ lwz r4, 0(r28) +/* 80387E40 00384DA0 90 8D AD DC */ stw r4, lbl_805A999C@sda21(r13) +/* 80387E44 00384DA4 B0 1E 00 F4 */ sth r0, 0xf4(r30) +/* 80387E48 00384DA8 80 8D AD D8 */ lwz r4, lbl_805A9998@sda21(r13) +/* 80387E4C 00384DAC A4 04 00 02 */ lhzu r0, 2(r4) +/* 80387E50 00384DB0 54 00 0C 3C */ rlwinm r0, r0, 1, 0x10, 0x1e +/* 80387E54 00384DB4 B0 1E 00 F6 */ sth r0, 0xf6(r30) +/* 80387E58 00384DB8 A0 1E 00 F4 */ lhz r0, 0xf4(r30) +/* 80387E5C 00384DBC 20 00 02 D0 */ subfic r0, r0, 0x2d0 +/* 80387E60 00384DC0 7C 00 0E 70 */ srawi r0, r0, 1 +/* 80387E64 00384DC4 7C 00 01 94 */ addze r0, r0 +/* 80387E68 00384DC8 B0 1E 00 F0 */ sth r0, 0xf0(r30) +/* 80387E6C 00384DCC B1 1E 00 F2 */ sth r8, 0xf2(r30) +/* 80387E70 00384DD0 A0 1E 00 F4 */ lhz r0, 0xf4(r30) +/* 80387E74 00384DD4 A8 FE 00 F0 */ lha r7, 0xf0(r30) +/* 80387E78 00384DD8 A8 AD AD B8 */ lha r5, lbl_805A9978@sda21(r13) +/* 80387E7C 00384DDC 20 00 02 D0 */ subfic r0, r0, 0x2d0 +/* 80387E80 00384DE0 A1 24 00 00 */ lhz r9, 0(r4) +/* 80387E84 00384DE4 7C A7 2A 14 */ add r5, r7, r5 +/* 80387E88 00384DE8 7C 05 00 00 */ cmpw r5, r0 +/* 80387E8C 00384DEC 40 81 00 08 */ ble lbl_80387E94 +/* 80387E90 00384DF0 48 00 00 18 */ b lbl_80387EA8 +lbl_80387E94: +/* 80387E94 00384DF4 2C 05 00 00 */ cmpwi r5, 0 +/* 80387E98 00384DF8 40 80 00 08 */ bge lbl_80387EA0 +/* 80387E9C 00384DFC 48 00 00 08 */ b lbl_80387EA4 +lbl_80387EA0: +/* 80387EA0 00384E00 7C A8 2B 78 */ mr r8, r5 +lbl_80387EA4: +/* 80387EA4 00384E04 7D 00 43 78 */ mr r0, r8 +lbl_80387EA8: +/* 80387EA8 00384E08 B0 1E 00 F8 */ sth r0, 0xf8(r30) +/* 80387EAC 00384E0C 39 1E 01 10 */ addi r8, r30, 0x110 +/* 80387EB0 00384E10 80 1E 01 10 */ lwz r0, 0x110(r30) +/* 80387EB4 00384E14 2C 00 00 00 */ cmpwi r0, 0 +/* 80387EB8 00384E18 40 82 00 0C */ bne lbl_80387EC4 +/* 80387EBC 00384E1C 39 60 00 02 */ li r11, 2 +/* 80387EC0 00384E20 48 00 00 08 */ b lbl_80387EC8 +lbl_80387EC4: +/* 80387EC4 00384E24 39 60 00 01 */ li r11, 1 +lbl_80387EC8: +/* 80387EC8 00384E28 A0 03 00 00 */ lhz r0, 0(r3) +/* 80387ECC 00384E2C A8 AD AD BA */ lha r5, lbl_805A997A@sda21(r13) +/* 80387ED0 00384E30 7C 07 07 34 */ extsh r7, r0 +/* 80387ED4 00384E34 54 00 07 FE */ clrlwi r0, r0, 0x1f +/* 80387ED8 00384E38 7C E7 2A 14 */ add r7, r7, r5 +/* 80387EDC 00384E3C 7C 07 00 00 */ cmpw r7, r0 +/* 80387EE0 00384E40 40 81 00 08 */ ble lbl_80387EE8 +/* 80387EE4 00384E44 48 00 00 08 */ b lbl_80387EEC +lbl_80387EE8: +/* 80387EE8 00384E48 7C 07 03 78 */ mr r7, r0 +lbl_80387EEC: +/* 80387EEC 00384E4C B0 FE 00 FA */ sth r7, 0xfa(r30) +/* 80387EF0 00384E50 7D 27 07 34 */ extsh r7, r9 +/* 80387EF4 00384E54 54 E7 08 3C */ slwi r7, r7, 1 +/* 80387EF8 00384E58 A3 86 00 00 */ lhz r28, 0(r6) +/* 80387EFC 00384E5C 7D 80 38 50 */ subf r12, r0, r7 +/* 80387F00 00384E60 A9 43 00 00 */ lha r10, 0(r3) +/* 80387F04 00384E64 7F 87 07 34 */ extsh r7, r28 +/* 80387F08 00384E68 7D 27 2A 14 */ add r9, r7, r5 +/* 80387F0C 00384E6C 7D 2A 4A 14 */ add r9, r10, r9 +/* 80387F10 00384E70 7C EC 48 51 */ subf. r7, r12, r9 +/* 80387F14 00384E74 40 81 00 0C */ ble lbl_80387F20 +/* 80387F18 00384E78 7D 2C 48 50 */ subf r9, r12, r9 +/* 80387F1C 00384E7C 48 00 00 08 */ b lbl_80387F24 +lbl_80387F20: +/* 80387F20 00384E80 39 20 00 00 */ li r9, 0 +lbl_80387F24: +/* 80387F24 00384E84 7D 4A 2A 14 */ add r10, r10, r5 +/* 80387F28 00384E88 7C E0 50 51 */ subf. r7, r0, r10 +/* 80387F2C 00384E8C 40 80 00 0C */ bge lbl_80387F38 +/* 80387F30 00384E90 7C E0 50 50 */ subf r7, r0, r10 +/* 80387F34 00384E94 48 00 00 08 */ b lbl_80387F3C +lbl_80387F38: +/* 80387F38 00384E98 38 E0 00 00 */ li r7, 0 +lbl_80387F3C: +/* 80387F3C 00384E9C 7C FC 3A 14 */ add r7, r28, r7 +/* 80387F40 00384EA0 7C E9 38 50 */ subf r7, r9, r7 +/* 80387F44 00384EA4 B0 FE 00 FC */ sth r7, 0xfc(r30) +/* 80387F48 00384EA8 A8 E3 00 00 */ lha r7, 0(r3) +/* 80387F4C 00384EAC 7D 27 2A 14 */ add r9, r7, r5 +/* 80387F50 00384EB0 7C E0 48 51 */ subf. r7, r0, r9 +/* 80387F54 00384EB4 40 80 00 0C */ bge lbl_80387F60 +/* 80387F58 00384EB8 7C E0 48 50 */ subf r7, r0, r9 +/* 80387F5C 00384EBC 48 00 00 08 */ b lbl_80387F64 +lbl_80387F60: +/* 80387F60 00384EC0 38 E0 00 00 */ li r7, 0 +lbl_80387F64: +/* 80387F64 00384EC4 7D 47 5B D6 */ divw r10, r7, r11 +/* 80387F68 00384EC8 38 FE 01 08 */ addi r7, r30, 0x108 +/* 80387F6C 00384ECC A1 3E 01 08 */ lhz r9, 0x108(r30) +/* 80387F70 00384ED0 7D 2A 48 50 */ subf r9, r10, r9 +/* 80387F74 00384ED4 B1 3E 00 FE */ sth r9, 0xfe(r30) +/* 80387F78 00384ED8 A8 C6 00 00 */ lha r6, 0(r6) +/* 80387F7C 00384EDC A9 23 00 00 */ lha r9, 0(r3) +/* 80387F80 00384EE0 7C C6 2A 14 */ add r6, r6, r5 +/* 80387F84 00384EE4 7C C9 32 14 */ add r6, r9, r6 +/* 80387F88 00384EE8 7C 6C 30 51 */ subf. r3, r12, r6 +/* 80387F8C 00384EEC 40 81 00 0C */ ble lbl_80387F98 +/* 80387F90 00384EF0 7C CC 30 50 */ subf r6, r12, r6 +/* 80387F94 00384EF4 48 00 00 08 */ b lbl_80387F9C +lbl_80387F98: +/* 80387F98 00384EF8 38 C0 00 00 */ li r6, 0 +lbl_80387F9C: +/* 80387F9C 00384EFC 7C A9 2A 14 */ add r5, r9, r5 +/* 80387FA0 00384F00 7C 60 28 51 */ subf. r3, r0, r5 +/* 80387FA4 00384F04 40 80 00 0C */ bge lbl_80387FB0 +/* 80387FA8 00384F08 7C 00 28 50 */ subf r0, r0, r5 +/* 80387FAC 00384F0C 48 00 00 08 */ b lbl_80387FB4 +lbl_80387FB0: +/* 80387FB0 00384F10 38 00 00 00 */ li r0, 0 +lbl_80387FB4: +/* 80387FB4 00384F14 7C 00 5B D6 */ divw r0, r0, r11 +/* 80387FB8 00384F18 A0 7E 01 0C */ lhz r3, 0x10c(r30) +/* 80387FBC 00384F1C 7C 03 02 14 */ add r0, r3, r0 +/* 80387FC0 00384F20 7C A6 5B D6 */ divw r5, r6, r11 +/* 80387FC4 00384F24 7C 05 00 50 */ subf r0, r5, r0 +/* 80387FC8 00384F28 B0 1E 01 00 */ sth r0, 0x100(r30) +/* 80387FCC 00384F2C 39 20 02 80 */ li r9, 0x280 +/* 80387FD0 00384F30 3B 80 00 00 */ li r28, 0 +/* 80387FD4 00384F34 B1 3E 01 02 */ sth r9, 0x102(r30) +/* 80387FD8 00384F38 38 A0 00 28 */ li r5, 0x28 +/* 80387FDC 00384F3C 38 00 00 01 */ li r0, 1 +/* 80387FE0 00384F40 A0 C4 00 00 */ lhz r6, 0(r4) +/* 80387FE4 00384F44 38 6D AD A4 */ addi r3, r13, lbl_805A9964@sda21 +/* 80387FE8 00384F48 54 C6 0C 3C */ rlwinm r6, r6, 1, 0x10, 0x1e +/* 80387FEC 00384F4C B0 DE 01 04 */ sth r6, 0x104(r30) +/* 80387FF0 00384F50 B3 9E 01 06 */ sth r28, 0x106(r30) +/* 80387FF4 00384F54 B3 87 00 00 */ sth r28, 0(r7) +/* 80387FF8 00384F58 B1 3E 01 0A */ sth r9, 0x10a(r30) +/* 80387FFC 00384F5C A0 84 00 00 */ lhz r4, 0(r4) +/* 80388000 00384F60 54 84 0C 3C */ rlwinm r4, r4, 1, 0x10, 0x1e +/* 80388004 00384F64 B0 9E 01 0C */ sth r4, 0x10c(r30) +/* 80388008 00384F68 93 88 00 00 */ stw r28, 0(r8) +/* 8038800C 00384F6C 98 BE 01 1C */ stb r5, 0x11c(r30) +/* 80388010 00384F70 98 BE 01 1D */ stb r5, 0x11d(r30) +/* 80388014 00384F74 98 BE 01 1E */ stb r5, 0x11e(r30) +/* 80388018 00384F78 9B 9E 01 2C */ stb r28, 0x12c(r30) +/* 8038801C 00384F7C 90 1E 01 30 */ stw r0, 0x130(r30) +/* 80388020 00384F80 93 9E 01 34 */ stw r28, 0x134(r30) +/* 80388024 00384F84 4B FF C5 A1 */ bl OSInitThreadQueue +/* 80388028 00384F88 3C 60 CC 00 */ lis r3, 0xCC002030@ha +/* 8038802C 00384F8C A0 03 20 30 */ lhz r0, 0xCC002030@l(r3) +/* 80388030 00384F90 38 83 20 00 */ addi r4, r3, 0x2000 +/* 80388034 00384F94 38 A3 20 00 */ addi r5, r3, 0x2000 +/* 80388038 00384F98 54 00 04 7E */ clrlwi r0, r0, 0x11 +/* 8038803C 00384F9C B0 04 00 30 */ sth r0, 0x30(r4) +/* 80388040 00384FA0 3C 60 80 38 */ lis r3, __VIRetraceHandler@ha +/* 80388044 00384FA4 38 83 76 84 */ addi r4, r3, __VIRetraceHandler@l +/* 80388048 00384FA8 A0 05 00 34 */ lhz r0, 0x34(r5) +/* 8038804C 00384FAC 38 60 00 18 */ li r3, 0x18 +/* 80388050 00384FB0 54 00 04 7E */ clrlwi r0, r0, 0x11 +/* 80388054 00384FB4 B0 05 00 34 */ sth r0, 0x34(r5) +/* 80388058 00384FB8 93 8D AD AC */ stw r28, lbl_805A996C@sda21(r13) +/* 8038805C 00384FBC 93 8D AD B0 */ stw r28, lbl_805A9970@sda21(r13) +/* 80388060 00384FC0 4B FF 96 4D */ bl __OSSetInterruptHandler +/* 80388064 00384FC4 38 60 00 80 */ li r3, 0x80 +/* 80388068 00384FC8 4B FF 9A 49 */ bl __OSUnmaskInterrupts +lbl_8038806C: +/* 8038806C 00384FCC 80 01 00 1C */ lwz r0, 0x1c(r1) +/* 80388070 00384FD0 83 E1 00 14 */ lwz r31, 0x14(r1) +/* 80388074 00384FD4 83 C1 00 10 */ lwz r30, 0x10(r1) +/* 80388078 00384FD8 83 A1 00 0C */ lwz r29, 0xc(r1) +/* 8038807C 00384FDC 83 81 00 08 */ lwz r28, 8(r1) +/* 80388080 00384FE0 38 21 00 18 */ addi r1, r1, 0x18 +/* 80388084 00384FE4 7C 08 03 A6 */ mtlr r0 +/* 80388088 00384FE8 4E 80 00 20 */ blr + +.global VIWaitForRetrace +VIWaitForRetrace: +/* 8038808C 00384FEC 7C 08 02 A6 */ mflr r0 +/* 80388090 00384FF0 90 01 00 04 */ stw r0, 4(r1) +/* 80388094 00384FF4 94 21 FF F0 */ stwu r1, -0x10(r1) +/* 80388098 00384FF8 93 E1 00 0C */ stw r31, 0xc(r1) +/* 8038809C 00384FFC 93 C1 00 08 */ stw r30, 8(r1) +/* 803880A0 00385000 4B FF 95 C1 */ bl OSDisableInterrupts +/* 803880A4 00385004 83 CD AD 9C */ lwz r30, lbl_805A995C@sda21(r13) +/* 803880A8 00385008 7C 7F 1B 78 */ mr r31, r3 +lbl_803880AC: +/* 803880AC 0038500C 38 6D AD A4 */ addi r3, r13, lbl_805A9964@sda21 +/* 803880B0 00385010 4B FF D0 5D */ bl OSSleepThread +/* 803880B4 00385014 80 0D AD 9C */ lwz r0, lbl_805A995C@sda21(r13) +/* 803880B8 00385018 7C 1E 00 40 */ cmplw r30, r0 +/* 803880BC 0038501C 41 82 FF F0 */ beq lbl_803880AC +/* 803880C0 00385020 7F E3 FB 78 */ mr r3, r31 +/* 803880C4 00385024 4B FF 95 C5 */ bl OSRestoreInterrupts +/* 803880C8 00385028 80 01 00 14 */ lwz r0, 0x14(r1) +/* 803880CC 0038502C 83 E1 00 0C */ lwz r31, 0xc(r1) +/* 803880D0 00385030 83 C1 00 08 */ lwz r30, 8(r1) +/* 803880D4 00385034 38 21 00 10 */ addi r1, r1, 0x10 +/* 803880D8 00385038 7C 08 03 A6 */ mtlr r0 +/* 803880DC 0038503C 4E 80 00 20 */ blr + +.global setFbbRegs +setFbbRegs: +/* 803880E0 00385040 94 21 FF B8 */ stwu r1, -0x48(r1) +/* 803880E4 00385044 3D 20 80 54 */ lis r9, lbl_80542040@ha +/* 803880E8 00385048 39 29 20 40 */ addi r9, r9, lbl_80542040@l +/* 803880EC 0038504C 93 E1 00 44 */ stw r31, 0x44(r1) +/* 803880F0 00385050 89 03 00 2C */ lbz r8, 0x2c(r3) +/* 803880F4 00385054 A0 03 00 0E */ lhz r0, 0xe(r3) +/* 803880F8 00385058 55 1F 28 34 */ slwi r31, r8, 5 +/* 803880FC 0038505C A1 03 00 16 */ lhz r8, 0x16(r3) +/* 80388100 00385060 7C 1F 01 D6 */ mullw r0, r31, r0 +/* 80388104 00385064 81 63 00 20 */ lwz r11, 0x20(r3) +/* 80388108 00385068 81 43 00 30 */ lwz r10, 0x30(r3) +/* 8038810C 0038506C A1 83 00 0A */ lhz r12, 0xa(r3) +/* 80388110 00385070 55 08 08 34 */ rlwinm r8, r8, 1, 0, 0x1a +/* 80388114 00385074 7C 08 02 14 */ add r0, r8, r0 +/* 80388118 00385078 7C 0A 02 14 */ add r0, r10, r0 +/* 8038811C 0038507C 2C 0B 00 00 */ cmpwi r11, 0 +/* 80388120 00385080 90 04 00 00 */ stw r0, 0(r4) +/* 80388124 00385084 40 82 00 0C */ bne lbl_80388130 +/* 80388128 00385088 81 04 00 00 */ lwz r8, 0(r4) +/* 8038812C 0038508C 48 00 00 0C */ b lbl_80388138 +lbl_80388130: +/* 80388130 00385090 80 04 00 00 */ lwz r0, 0(r4) +/* 80388134 00385094 7D 00 FA 14 */ add r8, r0, r31 +lbl_80388138: +/* 80388138 00385098 7D 80 0E 70 */ srawi r0, r12, 1 +/* 8038813C 0038509C 91 05 00 00 */ stw r8, 0(r5) +/* 80388140 003850A0 7C 00 01 94 */ addze r0, r0 +/* 80388144 003850A4 54 00 08 3C */ slwi r0, r0, 1 +/* 80388148 003850A8 7C 00 60 10 */ subfc r0, r0, r12 +/* 8038814C 003850AC 2C 00 00 01 */ cmpwi r0, 1 +/* 80388150 003850B0 40 82 00 14 */ bne lbl_80388164 +/* 80388154 003850B4 81 04 00 00 */ lwz r8, 0(r4) +/* 80388158 003850B8 80 05 00 00 */ lwz r0, 0(r5) +/* 8038815C 003850BC 90 04 00 00 */ stw r0, 0(r4) +/* 80388160 003850C0 91 05 00 00 */ stw r8, 0(r5) +lbl_80388164: +/* 80388164 003850C4 80 04 00 00 */ lwz r0, 0(r4) +/* 80388168 003850C8 54 00 00 BE */ clrlwi r0, r0, 2 +/* 8038816C 003850CC 90 04 00 00 */ stw r0, 0(r4) +/* 80388170 003850D0 80 05 00 00 */ lwz r0, 0(r5) +/* 80388174 003850D4 54 00 00 BE */ clrlwi r0, r0, 2 +/* 80388178 003850D8 90 05 00 00 */ stw r0, 0(r5) +/* 8038817C 003850DC 80 03 00 44 */ lwz r0, 0x44(r3) +/* 80388180 003850E0 2C 00 00 00 */ cmpwi r0, 0 +/* 80388184 003850E4 41 82 00 90 */ beq lbl_80388214 +/* 80388188 003850E8 89 03 00 2C */ lbz r8, 0x2c(r3) +/* 8038818C 003850EC A0 03 00 0E */ lhz r0, 0xe(r3) +/* 80388190 003850F0 55 1F 28 34 */ slwi r31, r8, 5 +/* 80388194 003850F4 A1 03 00 16 */ lhz r8, 0x16(r3) +/* 80388198 003850F8 7C 1F 01 D6 */ mullw r0, r31, r0 +/* 8038819C 003850FC 81 63 00 20 */ lwz r11, 0x20(r3) +/* 803881A0 00385100 81 43 00 48 */ lwz r10, 0x48(r3) +/* 803881A4 00385104 A1 83 00 0A */ lhz r12, 0xa(r3) +/* 803881A8 00385108 55 08 08 34 */ rlwinm r8, r8, 1, 0, 0x1a +/* 803881AC 0038510C 7C 08 02 14 */ add r0, r8, r0 +/* 803881B0 00385110 7C 0A 02 14 */ add r0, r10, r0 +/* 803881B4 00385114 2C 0B 00 00 */ cmpwi r11, 0 +/* 803881B8 00385118 90 06 00 00 */ stw r0, 0(r6) +/* 803881BC 0038511C 40 82 00 0C */ bne lbl_803881C8 +/* 803881C0 00385120 81 06 00 00 */ lwz r8, 0(r6) +/* 803881C4 00385124 48 00 00 0C */ b lbl_803881D0 +lbl_803881C8: +/* 803881C8 00385128 80 06 00 00 */ lwz r0, 0(r6) +/* 803881CC 0038512C 7D 00 FA 14 */ add r8, r0, r31 +lbl_803881D0: +/* 803881D0 00385130 7D 80 0E 70 */ srawi r0, r12, 1 +/* 803881D4 00385134 91 07 00 00 */ stw r8, 0(r7) +/* 803881D8 00385138 7C 00 01 94 */ addze r0, r0 +/* 803881DC 0038513C 54 00 08 3C */ slwi r0, r0, 1 +/* 803881E0 00385140 7C 00 60 10 */ subfc r0, r0, r12 +/* 803881E4 00385144 2C 00 00 01 */ cmpwi r0, 1 +/* 803881E8 00385148 40 82 00 14 */ bne lbl_803881FC +/* 803881EC 0038514C 81 06 00 00 */ lwz r8, 0(r6) +/* 803881F0 00385150 80 07 00 00 */ lwz r0, 0(r7) +/* 803881F4 00385154 90 06 00 00 */ stw r0, 0(r6) +/* 803881F8 00385158 91 07 00 00 */ stw r8, 0(r7) +lbl_803881FC: +/* 803881FC 0038515C 80 06 00 00 */ lwz r0, 0(r6) +/* 80388200 00385160 54 00 00 BE */ clrlwi r0, r0, 2 +/* 80388204 00385164 90 06 00 00 */ stw r0, 0(r6) +/* 80388208 00385168 80 07 00 00 */ lwz r0, 0(r7) +/* 8038820C 0038516C 54 00 00 BE */ clrlwi r0, r0, 2 +/* 80388210 00385170 90 07 00 00 */ stw r0, 0(r7) +lbl_80388214: +/* 80388214 00385174 80 04 00 00 */ lwz r0, 0(r4) +/* 80388218 00385178 3D 00 01 00 */ lis r8, 0x100 +/* 8038821C 0038517C 7C 00 40 40 */ cmplw r0, r8 +/* 80388220 00385180 40 80 00 30 */ bge lbl_80388250 +/* 80388224 00385184 80 05 00 00 */ lwz r0, 0(r5) +/* 80388228 00385188 7C 00 40 40 */ cmplw r0, r8 +/* 8038822C 0038518C 40 80 00 24 */ bge lbl_80388250 +/* 80388230 00385190 80 06 00 00 */ lwz r0, 0(r6) +/* 80388234 00385194 7C 00 40 40 */ cmplw r0, r8 +/* 80388238 00385198 40 80 00 18 */ bge lbl_80388250 +/* 8038823C 0038519C 80 07 00 00 */ lwz r0, 0(r7) +/* 80388240 003851A0 7C 00 40 40 */ cmplw r0, r8 +/* 80388244 003851A4 40 80 00 0C */ bge lbl_80388250 +/* 80388248 003851A8 39 40 00 00 */ li r10, 0 +/* 8038824C 003851AC 48 00 00 08 */ b lbl_80388254 +lbl_80388250: +/* 80388250 003851B0 39 40 00 01 */ li r10, 1 +lbl_80388254: +/* 80388254 003851B4 28 0A 00 00 */ cmplwi r10, 0 +/* 80388258 003851B8 41 82 00 34 */ beq lbl_8038828C +/* 8038825C 003851BC 80 04 00 00 */ lwz r0, 0(r4) +/* 80388260 003851C0 54 00 D9 7E */ srwi r0, r0, 5 +/* 80388264 003851C4 90 04 00 00 */ stw r0, 0(r4) +/* 80388268 003851C8 80 05 00 00 */ lwz r0, 0(r5) +/* 8038826C 003851CC 54 00 D9 7E */ srwi r0, r0, 5 +/* 80388270 003851D0 90 05 00 00 */ stw r0, 0(r5) +/* 80388274 003851D4 80 06 00 00 */ lwz r0, 0(r6) +/* 80388278 003851D8 54 00 D9 7E */ srwi r0, r0, 5 +/* 8038827C 003851DC 90 06 00 00 */ stw r0, 0(r6) +/* 80388280 003851E0 80 07 00 00 */ lwz r0, 0(r7) +/* 80388284 003851E4 54 00 D9 7E */ srwi r0, r0, 5 +/* 80388288 003851E8 90 07 00 00 */ stw r0, 0(r7) +lbl_8038828C: +/* 8038828C 003851EC 80 04 00 00 */ lwz r0, 0(r4) +/* 80388290 003851F0 55 4B 60 26 */ slwi r11, r10, 0xc +/* 80388294 003851F4 3D 00 00 01 */ lis r8, 1 +/* 80388298 003851F8 B0 09 00 1E */ sth r0, 0x1e(r9) +/* 8038829C 003851FC 3C 00 00 02 */ lis r0, 2 +/* 803882A0 00385200 81 4D AD C0 */ lwz r10, lbl_805A9980@sda21(r13) +/* 803882A4 00385204 81 8D AD C4 */ lwz r12, lbl_805A9984@sda21(r13) +/* 803882A8 00385208 7D 4A 43 78 */ or r10, r10, r8 +/* 803882AC 0038520C 91 8D AD C4 */ stw r12, lbl_805A9984@sda21(r13) +/* 803882B0 00385210 91 4D AD C0 */ stw r10, lbl_805A9980@sda21(r13) +/* 803882B4 00385214 81 44 00 00 */ lwz r10, 0(r4) +/* 803882B8 00385218 88 83 00 3C */ lbz r4, 0x3c(r3) +/* 803882BC 0038521C 55 4A 84 3E */ srwi r10, r10, 0x10 +/* 803882C0 00385220 54 84 40 2E */ slwi r4, r4, 8 +/* 803882C4 00385224 7D 44 23 78 */ or r4, r10, r4 +/* 803882C8 00385228 7D 64 23 78 */ or r4, r11, r4 +/* 803882CC 0038522C B0 89 00 1C */ sth r4, 0x1c(r9) +/* 803882D0 00385230 80 8D AD C0 */ lwz r4, lbl_805A9980@sda21(r13) +/* 803882D4 00385234 81 4D AD C4 */ lwz r10, lbl_805A9984@sda21(r13) +/* 803882D8 00385238 7C 80 03 78 */ or r0, r4, r0 +/* 803882DC 0038523C 91 4D AD C4 */ stw r10, lbl_805A9984@sda21(r13) +/* 803882E0 00385240 90 0D AD C0 */ stw r0, lbl_805A9980@sda21(r13) +/* 803882E4 00385244 80 05 00 00 */ lwz r0, 0(r5) +/* 803882E8 00385248 B0 09 00 26 */ sth r0, 0x26(r9) +/* 803882EC 0038524C 80 0D AD C0 */ lwz r0, lbl_805A9980@sda21(r13) +/* 803882F0 00385250 80 8D AD C4 */ lwz r4, lbl_805A9984@sda21(r13) +/* 803882F4 00385254 60 00 10 00 */ ori r0, r0, 0x1000 +/* 803882F8 00385258 90 8D AD C4 */ stw r4, lbl_805A9984@sda21(r13) +/* 803882FC 0038525C 90 0D AD C0 */ stw r0, lbl_805A9980@sda21(r13) +/* 80388300 00385260 80 05 00 00 */ lwz r0, 0(r5) +/* 80388304 00385264 54 00 84 3E */ srwi r0, r0, 0x10 +/* 80388308 00385268 B0 09 00 24 */ sth r0, 0x24(r9) +/* 8038830C 0038526C 80 0D AD C0 */ lwz r0, lbl_805A9980@sda21(r13) +/* 80388310 00385270 80 8D AD C4 */ lwz r4, lbl_805A9984@sda21(r13) +/* 80388314 00385274 60 00 20 00 */ ori r0, r0, 0x2000 +/* 80388318 00385278 90 8D AD C4 */ stw r4, lbl_805A9984@sda21(r13) +/* 8038831C 0038527C 90 0D AD C0 */ stw r0, lbl_805A9980@sda21(r13) +/* 80388320 00385280 80 03 00 44 */ lwz r0, 0x44(r3) +/* 80388324 00385284 2C 00 00 00 */ cmpwi r0, 0 +/* 80388328 00385288 41 82 00 80 */ beq lbl_803883A8 +/* 8038832C 0038528C 80 66 00 00 */ lwz r3, 0(r6) +/* 80388330 00385290 38 08 80 00 */ addi r0, r8, -32768 +/* 80388334 00385294 B0 69 00 22 */ sth r3, 0x22(r9) +/* 80388338 00385298 80 6D AD C0 */ lwz r3, lbl_805A9980@sda21(r13) +/* 8038833C 0038529C 80 8D AD C4 */ lwz r4, lbl_805A9984@sda21(r13) +/* 80388340 003852A0 60 63 40 00 */ ori r3, r3, 0x4000 +/* 80388344 003852A4 90 8D AD C4 */ stw r4, lbl_805A9984@sda21(r13) +/* 80388348 003852A8 90 6D AD C0 */ stw r3, lbl_805A9980@sda21(r13) +/* 8038834C 003852AC 80 66 00 00 */ lwz r3, 0(r6) +/* 80388350 003852B0 54 63 84 3E */ srwi r3, r3, 0x10 +/* 80388354 003852B4 B0 69 00 20 */ sth r3, 0x20(r9) +/* 80388358 003852B8 80 6D AD C0 */ lwz r3, lbl_805A9980@sda21(r13) +/* 8038835C 003852BC 80 8D AD C4 */ lwz r4, lbl_805A9984@sda21(r13) +/* 80388360 003852C0 7C 60 03 78 */ or r0, r3, r0 +/* 80388364 003852C4 90 8D AD C4 */ stw r4, lbl_805A9984@sda21(r13) +/* 80388368 003852C8 90 0D AD C0 */ stw r0, lbl_805A9980@sda21(r13) +/* 8038836C 003852CC 80 07 00 00 */ lwz r0, 0(r7) +/* 80388370 003852D0 B0 09 00 2A */ sth r0, 0x2a(r9) +/* 80388374 003852D4 80 0D AD C0 */ lwz r0, lbl_805A9980@sda21(r13) +/* 80388378 003852D8 80 6D AD C4 */ lwz r3, lbl_805A9984@sda21(r13) +/* 8038837C 003852DC 60 00 04 00 */ ori r0, r0, 0x400 +/* 80388380 003852E0 90 6D AD C4 */ stw r3, lbl_805A9984@sda21(r13) +/* 80388384 003852E4 90 0D AD C0 */ stw r0, lbl_805A9980@sda21(r13) +/* 80388388 003852E8 80 07 00 00 */ lwz r0, 0(r7) +/* 8038838C 003852EC 54 00 84 3E */ srwi r0, r0, 0x10 +/* 80388390 003852F0 B0 09 00 28 */ sth r0, 0x28(r9) +/* 80388394 003852F4 80 0D AD C0 */ lwz r0, lbl_805A9980@sda21(r13) +/* 80388398 003852F8 80 6D AD C4 */ lwz r3, lbl_805A9984@sda21(r13) +/* 8038839C 003852FC 60 00 08 00 */ ori r0, r0, 0x800 +/* 803883A0 00385300 90 6D AD C4 */ stw r3, lbl_805A9984@sda21(r13) +/* 803883A4 00385304 90 0D AD C0 */ stw r0, lbl_805A9980@sda21(r13) +lbl_803883A8: +/* 803883A8 00385308 83 E1 00 44 */ lwz r31, 0x44(r1) +/* 803883AC 0038530C 38 21 00 48 */ addi r1, r1, 0x48 +/* 803883B0 00385310 4E 80 00 20 */ blr + +.global setVerticalRegs +setVerticalRegs: +/* 803883B4 00385314 94 21 FF D8 */ stwu r1, -0x28(r1) +/* 803883B8 00385318 3D 60 80 54 */ lis r11, lbl_80542040@ha +/* 803883BC 0038531C 39 6B 20 40 */ addi r11, r11, lbl_80542040@l +/* 803883C0 00385320 93 E1 00 24 */ stw r31, 0x24(r1) +/* 803883C4 00385324 83 E1 00 30 */ lwz r31, 0x30(r1) +/* 803883C8 00385328 93 C1 00 20 */ stw r30, 0x20(r1) +/* 803883CC 0038532C 93 A1 00 1C */ stw r29, 0x1c(r1) +/* 803883D0 00385330 A0 0B 00 6C */ lhz r0, 0x6c(r11) +/* 803883D4 00385334 54 00 07 FF */ clrlwi. r0, r0, 0x1f +/* 803883D8 00385338 41 82 00 10 */ beq lbl_803883E8 +/* 803883DC 0038533C 39 80 00 01 */ li r12, 1 +/* 803883E0 00385340 3B A0 00 02 */ li r29, 2 +/* 803883E4 00385344 48 00 00 0C */ b lbl_803883F0 +lbl_803883E8: +/* 803883E8 00385348 39 80 00 02 */ li r12, 2 +/* 803883EC 0038534C 3B A0 00 01 */ li r29, 1 +lbl_803883F0: +/* 803883F0 00385350 54 7E 04 3E */ clrlwi r30, r3, 0x10 +/* 803883F4 00385354 7F C0 0E 70 */ srawi r0, r30, 1 +/* 803883F8 00385358 7C 00 01 94 */ addze r0, r0 +/* 803883FC 0038535C 54 00 08 3C */ slwi r0, r0, 1 +/* 80388400 00385360 7C 00 F0 11 */ subfc. r0, r0, r30 +/* 80388404 00385364 40 82 00 3C */ bne lbl_80388440 +/* 80388408 00385368 55 83 04 3E */ clrlwi r3, r12, 0x10 +/* 8038840C 0038536C 54 C0 04 3E */ clrlwi r0, r6, 0x10 +/* 80388410 00385370 7C 03 01 D6 */ mullw r0, r3, r0 +/* 80388414 00385374 54 83 04 3E */ clrlwi r3, r4, 0x10 +/* 80388418 00385378 7C 03 00 50 */ subf r0, r3, r0 +/* 8038841C 0038537C 57 A3 04 3E */ clrlwi r3, r29, 0x10 +/* 80388420 00385380 7F A3 F1 D6 */ mullw r29, r3, r30 +/* 80388424 00385384 7C 1E 00 50 */ subf r0, r30, r0 +/* 80388428 00385388 7F C3 01 D6 */ mullw r30, r3, r0 +/* 8038842C 0038538C 7C 07 EA 14 */ add r0, r7, r29 +/* 80388430 00385390 7C C9 F2 14 */ add r6, r9, r30 +/* 80388434 00385394 7C 68 EA 14 */ add r3, r8, r29 +/* 80388438 00385398 7C EA F2 14 */ add r7, r10, r30 +/* 8038843C 0038539C 48 00 00 38 */ b lbl_80388474 +lbl_80388440: +/* 80388440 003853A0 55 83 04 3E */ clrlwi r3, r12, 0x10 +/* 80388444 003853A4 54 C0 04 3E */ clrlwi r0, r6, 0x10 +/* 80388448 003853A8 7C 03 01 D6 */ mullw r0, r3, r0 +/* 8038844C 003853AC 54 83 04 3E */ clrlwi r3, r4, 0x10 +/* 80388450 003853B0 7C 03 00 50 */ subf r0, r3, r0 +/* 80388454 003853B4 57 A3 04 3E */ clrlwi r3, r29, 0x10 +/* 80388458 003853B8 7F A3 F1 D6 */ mullw r29, r3, r30 +/* 8038845C 003853BC 7C 1E 00 50 */ subf r0, r30, r0 +/* 80388460 003853C0 7F C3 01 D6 */ mullw r30, r3, r0 +/* 80388464 003853C4 7C 08 EA 14 */ add r0, r8, r29 +/* 80388468 003853C8 7C CA F2 14 */ add r6, r10, r30 +/* 8038846C 003853CC 7C 67 EA 14 */ add r3, r7, r29 +/* 80388470 003853D0 7C E9 F2 14 */ add r7, r9, r30 +lbl_80388474: +/* 80388474 003853D4 54 88 04 3E */ clrlwi r8, r4, 0x10 +/* 80388478 003853D8 55 84 04 3E */ clrlwi r4, r12, 0x10 +/* 8038847C 003853DC 7C 88 23 D6 */ divw r4, r8, r4 +/* 80388480 003853E0 2C 1F 00 00 */ cmpwi r31, 0 +/* 80388484 003853E4 54 84 04 3E */ clrlwi r4, r4, 0x10 +/* 80388488 003853E8 41 82 00 20 */ beq lbl_803884A8 +/* 8038848C 003853EC 54 84 08 3C */ slwi r4, r4, 1 +/* 80388490 003853F0 38 84 FF FE */ addi r4, r4, -2 +/* 80388494 003853F4 7C 00 22 14 */ add r0, r0, r4 +/* 80388498 003853F8 7C 63 22 14 */ add r3, r3, r4 +/* 8038849C 003853FC 38 80 00 00 */ li r4, 0 +/* 803884A0 00385400 38 C6 00 02 */ addi r6, r6, 2 +/* 803884A4 00385404 38 E7 00 02 */ addi r7, r7, 2 +lbl_803884A8: +/* 803884A8 00385408 54 A5 06 3E */ clrlwi r5, r5, 0x18 +/* 803884AC 0038540C 54 84 23 36 */ rlwinm r4, r4, 4, 0xc, 0x1b +/* 803884B0 00385410 7C A4 23 78 */ or r4, r5, r4 +/* 803884B4 00385414 B0 8B 00 00 */ sth r4, 0(r11) +/* 803884B8 00385418 3C 80 80 00 */ lis r4, 0x8000 +/* 803884BC 0038541C 3D 20 01 00 */ lis r9, 0x100 +/* 803884C0 00385420 80 AD AD C0 */ lwz r5, lbl_805A9980@sda21(r13) +/* 803884C4 00385424 3D 00 02 00 */ lis r8, 0x200 +/* 803884C8 00385428 81 4D AD C4 */ lwz r10, lbl_805A9984@sda21(r13) +/* 803884CC 0038542C 7C A4 23 78 */ or r4, r5, r4 +/* 803884D0 00385430 3C A0 00 40 */ lis r5, 0x40 +/* 803884D4 00385434 91 4D AD C4 */ stw r10, lbl_805A9984@sda21(r13) +/* 803884D8 00385438 90 8D AD C0 */ stw r4, lbl_805A9980@sda21(r13) +/* 803884DC 0038543C 3C 80 00 80 */ lis r4, 0x80 +/* 803884E0 00385440 B0 0B 00 0E */ sth r0, 0xe(r11) +/* 803884E4 00385444 80 0D AD C0 */ lwz r0, lbl_805A9980@sda21(r13) +/* 803884E8 00385448 81 4D AD C4 */ lwz r10, lbl_805A9984@sda21(r13) +/* 803884EC 0038544C 7C 00 4B 78 */ or r0, r0, r9 +/* 803884F0 00385450 91 4D AD C4 */ stw r10, lbl_805A9984@sda21(r13) +/* 803884F4 00385454 90 0D AD C0 */ stw r0, lbl_805A9980@sda21(r13) +/* 803884F8 00385458 B0 CB 00 0C */ sth r6, 0xc(r11) +/* 803884FC 0038545C 80 0D AD C0 */ lwz r0, lbl_805A9980@sda21(r13) +/* 80388500 00385460 80 CD AD C4 */ lwz r6, lbl_805A9984@sda21(r13) +/* 80388504 00385464 7C 00 43 78 */ or r0, r0, r8 +/* 80388508 00385468 90 CD AD C4 */ stw r6, lbl_805A9984@sda21(r13) +/* 8038850C 0038546C 90 0D AD C0 */ stw r0, lbl_805A9980@sda21(r13) +/* 80388510 00385470 B0 6B 00 12 */ sth r3, 0x12(r11) +/* 80388514 00385474 80 0D AD C0 */ lwz r0, lbl_805A9980@sda21(r13) +/* 80388518 00385478 80 6D AD C4 */ lwz r3, lbl_805A9984@sda21(r13) +/* 8038851C 0038547C 7C 00 2B 78 */ or r0, r0, r5 +/* 80388520 00385480 90 6D AD C4 */ stw r3, lbl_805A9984@sda21(r13) +/* 80388524 00385484 90 0D AD C0 */ stw r0, lbl_805A9980@sda21(r13) +/* 80388528 00385488 B0 EB 00 10 */ sth r7, 0x10(r11) +/* 8038852C 0038548C 80 0D AD C0 */ lwz r0, lbl_805A9980@sda21(r13) +/* 80388530 00385490 80 6D AD C4 */ lwz r3, lbl_805A9984@sda21(r13) +/* 80388534 00385494 7C 00 23 78 */ or r0, r0, r4 +/* 80388538 00385498 90 6D AD C4 */ stw r3, lbl_805A9984@sda21(r13) +/* 8038853C 0038549C 90 0D AD C0 */ stw r0, lbl_805A9980@sda21(r13) +/* 80388540 003854A0 83 E1 00 24 */ lwz r31, 0x24(r1) +/* 80388544 003854A4 83 C1 00 20 */ lwz r30, 0x20(r1) +/* 80388548 003854A8 83 A1 00 1C */ lwz r29, 0x1c(r1) +/* 8038854C 003854AC 38 21 00 28 */ addi r1, r1, 0x28 +/* 80388550 003854B0 4E 80 00 20 */ blr + +.global VIConfigure +VIConfigure: +/* 80388554 003854B4 7C 08 02 A6 */ mflr r0 +/* 80388558 003854B8 3C A0 80 3F */ lis r5, lbl_803F23A8@ha +/* 8038855C 003854BC 90 01 00 04 */ stw r0, 4(r1) +/* 80388560 003854C0 3C 80 80 54 */ lis r4, lbl_80542040@ha +/* 80388564 003854C4 94 21 FF 88 */ stwu r1, -0x78(r1) +/* 80388568 003854C8 BD C1 00 30 */ stmw r14, 0x30(r1) +/* 8038856C 003854CC 3B E3 00 00 */ addi r31, r3, 0 +/* 80388570 003854D0 39 E5 23 A8 */ addi r15, r5, lbl_803F23A8@l +/* 80388574 003854D4 3B A4 20 40 */ addi r29, r4, lbl_80542040@l +/* 80388578 003854D8 4B FF 90 E9 */ bl OSDisableInterrupts +/* 8038857C 003854DC 80 9F 00 00 */ lwz r4, 0(r31) +/* 80388580 003854E0 3B 9D 01 14 */ addi r28, r29, 0x114 +/* 80388584 003854E4 80 1D 01 14 */ lwz r0, 0x114(r29) +/* 80388588 003854E8 39 C3 00 00 */ addi r14, r3, 0 +/* 8038858C 003854EC 54 84 07 BE */ clrlwi r4, r4, 0x1e +/* 80388590 003854F0 7C 00 20 40 */ cmplw r0, r4 +/* 80388594 003854F4 41 82 00 10 */ beq lbl_803885A4 +/* 80388598 003854F8 38 00 00 01 */ li r0, 1 +/* 8038859C 003854FC 90 0D AD BC */ stw r0, lbl_805A997C@sda21(r13) +/* 803885A0 00385500 90 9C 00 00 */ stw r4, 0(r28) +lbl_803885A4: +/* 803885A4 00385504 80 1F 00 00 */ lwz r0, 0(r31) +/* 803885A8 00385508 3C 60 80 00 */ lis r3, 0x800000CC@ha +/* 803885AC 0038550C 82 03 00 CC */ lwz r16, 0x800000CC@l(r3) +/* 803885B0 00385510 54 00 F0 BE */ srwi r0, r0, 2 +/* 803885B4 00385514 28 00 00 04 */ cmplwi r0, 4 +/* 803885B8 00385518 7C 11 03 78 */ mr r17, r0 +/* 803885BC 0038551C 40 82 00 6C */ bne lbl_80388628 +/* 803885C0 00385520 80 0D AD EC */ lwz r0, lbl_805A99AC@sda21(r13) +/* 803885C4 00385524 28 00 00 00 */ cmplwi r0, 0 +/* 803885C8 00385528 40 82 00 60 */ bne lbl_80388628 +/* 803885CC 0038552C 38 00 00 01 */ li r0, 1 +/* 803885D0 00385530 4C C6 31 82 */ crclr 6 +/* 803885D4 00385534 90 0D AD EC */ stw r0, lbl_805A99AC@sda21(r13) +/* 803885D8 00385538 38 6F 02 60 */ addi r3, r15, 0x260 +/* 803885DC 0038553C 4B FF 73 D1 */ bl OSReport +/* 803885E0 00385540 38 6F 02 8C */ addi r3, r15, 0x28c +/* 803885E4 00385544 4C C6 31 82 */ crclr 6 +/* 803885E8 00385548 4B FF 73 C5 */ bl OSReport +/* 803885EC 0038554C 38 6F 02 B8 */ addi r3, r15, 0x2b8 +/* 803885F0 00385550 4C C6 31 82 */ crclr 6 +/* 803885F4 00385554 4B FF 73 B9 */ bl OSReport +/* 803885F8 00385558 38 6F 02 E4 */ addi r3, r15, 0x2e4 +/* 803885FC 0038555C 4C C6 31 82 */ crclr 6 +/* 80388600 00385560 4B FF 73 AD */ bl OSReport +/* 80388604 00385564 38 6F 03 10 */ addi r3, r15, 0x310 +/* 80388608 00385568 4C C6 31 82 */ crclr 6 +/* 8038860C 0038556C 4B FF 73 A1 */ bl OSReport +/* 80388610 00385570 38 6F 03 3C */ addi r3, r15, 0x33c +/* 80388614 00385574 4C C6 31 82 */ crclr 6 +/* 80388618 00385578 4B FF 73 95 */ bl OSReport +/* 8038861C 0038557C 38 6F 02 60 */ addi r3, r15, 0x260 +/* 80388620 00385580 4C C6 31 82 */ crclr 6 +/* 80388624 00385584 4B FF 73 89 */ bl OSReport +lbl_80388628: +/* 80388628 00385588 2C 10 00 02 */ cmpwi r16, 2 +/* 8038862C 0038558C 41 82 00 30 */ beq lbl_8038865C +/* 80388630 00385590 40 80 00 14 */ bge lbl_80388644 +/* 80388634 00385594 2C 10 00 00 */ cmpwi r16, 0 +/* 80388638 00385598 41 82 00 24 */ beq lbl_8038865C +/* 8038863C 0038559C 40 80 00 3C */ bge lbl_80388678 +/* 80388640 003855A0 48 00 00 48 */ b lbl_80388688 +lbl_80388644: +/* 80388644 003855A4 2C 10 00 06 */ cmpwi r16, 6 +/* 80388648 003855A8 41 82 00 14 */ beq lbl_8038865C +/* 8038864C 003855AC 40 80 00 3C */ bge lbl_80388688 +/* 80388650 003855B0 2C 10 00 05 */ cmpwi r16, 5 +/* 80388654 003855B4 40 80 00 24 */ bge lbl_80388678 +/* 80388658 003855B8 48 00 00 30 */ b lbl_80388688 +lbl_8038865C: +/* 8038865C 003855BC 28 11 00 00 */ cmplwi r17, 0 +/* 80388660 003855C0 41 82 00 44 */ beq lbl_803886A4 +/* 80388664 003855C4 28 11 00 02 */ cmplwi r17, 2 +/* 80388668 003855C8 41 82 00 3C */ beq lbl_803886A4 +/* 8038866C 003855CC 28 11 00 06 */ cmplwi r17, 6 +/* 80388670 003855D0 40 82 00 18 */ bne lbl_80388688 +/* 80388674 003855D4 48 00 00 30 */ b lbl_803886A4 +lbl_80388678: +/* 80388678 003855D8 28 11 00 01 */ cmplwi r17, 1 +/* 8038867C 003855DC 41 82 00 28 */ beq lbl_803886A4 +/* 80388680 003855E0 28 11 00 05 */ cmplwi r17, 5 +/* 80388684 003855E4 41 82 00 20 */ beq lbl_803886A4 +lbl_80388688: +/* 80388688 003855E8 38 D0 00 00 */ addi r6, r16, 0 +/* 8038868C 003855EC 4C C6 31 82 */ crclr 6 +/* 80388690 003855F0 38 F1 00 00 */ addi r7, r17, 0 +/* 80388694 003855F4 38 AF 03 68 */ addi r5, r15, 0x368 +/* 80388698 003855F8 38 6D 9F BC */ addi r3, r13, lbl_805A8B7C@sda21 +/* 8038869C 003855FC 38 80 07 5C */ li r4, 0x75c +/* 803886A0 00385600 4B FF 73 8D */ bl OSPanic +lbl_803886A4: +/* 803886A4 00385604 28 11 00 00 */ cmplwi r17, 0 +/* 803886A8 00385608 41 82 00 0C */ beq lbl_803886B4 +/* 803886AC 0038560C 28 11 00 02 */ cmplwi r17, 2 +/* 803886B0 00385610 40 82 00 0C */ bne lbl_803886BC +lbl_803886B4: +/* 803886B4 00385614 92 1D 01 18 */ stw r16, 0x118(r29) +/* 803886B8 00385618 48 00 00 08 */ b lbl_803886C0 +lbl_803886BC: +/* 803886BC 0038561C 92 3D 01 18 */ stw r17, 0x118(r29) +lbl_803886C0: +/* 803886C0 00385620 A0 1F 00 0A */ lhz r0, 0xa(r31) +/* 803886C4 00385624 B0 1D 00 F0 */ sth r0, 0xf0(r29) +/* 803886C8 00385628 80 1C 00 00 */ lwz r0, 0(r28) +/* 803886CC 0038562C 28 00 00 01 */ cmplwi r0, 1 +/* 803886D0 00385630 40 82 00 10 */ bne lbl_803886E0 +/* 803886D4 00385634 A0 1F 00 0C */ lhz r0, 0xc(r31) +/* 803886D8 00385638 54 00 0C 3C */ rlwinm r0, r0, 1, 0x10, 0x1e +/* 803886DC 0038563C 48 00 00 08 */ b lbl_803886E4 +lbl_803886E0: +/* 803886E0 00385640 A0 1F 00 0C */ lhz r0, 0xc(r31) +lbl_803886E4: +/* 803886E4 00385644 B0 1D 00 F2 */ sth r0, 0xf2(r29) +/* 803886E8 00385648 3A FD 00 F2 */ addi r23, r29, 0xf2 +/* 803886EC 0038564C 3B 1D 00 F4 */ addi r24, r29, 0xf4 +/* 803886F0 00385650 A0 1F 00 0E */ lhz r0, 0xe(r31) +/* 803886F4 00385654 3B 7D 01 02 */ addi r27, r29, 0x102 +/* 803886F8 00385658 3B 3D 01 10 */ addi r25, r29, 0x110 +/* 803886FC 0038565C B0 1D 00 F4 */ sth r0, 0xf4(r29) +/* 80388700 00385660 38 00 00 00 */ li r0, 0 +/* 80388704 00385664 3A 1D 01 0A */ addi r16, r29, 0x10a +/* 80388708 00385668 A0 7F 00 04 */ lhz r3, 4(r31) +/* 8038870C 0038566C 3B 5D 01 0C */ addi r26, r29, 0x10c +/* 80388710 00385670 39 FD 01 06 */ addi r15, r29, 0x106 +/* 80388714 00385674 B0 7D 01 02 */ sth r3, 0x102(r29) +/* 80388718 00385678 3A 3D 01 08 */ addi r17, r29, 0x108 +/* 8038871C 0038567C A0 7F 00 08 */ lhz r3, 8(r31) +/* 80388720 00385680 B0 7D 01 04 */ sth r3, 0x104(r29) +/* 80388724 00385684 80 7F 00 14 */ lwz r3, 0x14(r31) +/* 80388728 00385688 90 7D 01 10 */ stw r3, 0x110(r29) +/* 8038872C 0038568C A0 7D 01 02 */ lhz r3, 0x102(r29) +/* 80388730 00385690 B0 7D 01 0A */ sth r3, 0x10a(r29) +/* 80388734 00385694 A0 7D 01 04 */ lhz r3, 0x104(r29) +/* 80388738 00385698 B0 7D 01 0C */ sth r3, 0x10c(r29) +/* 8038873C 0038569C B0 1D 01 06 */ sth r0, 0x106(r29) +/* 80388740 003856A0 B0 1D 01 08 */ sth r0, 0x108(r29) +/* 80388744 003856A4 80 1C 00 00 */ lwz r0, 0(r28) +/* 80388748 003856A8 28 00 00 02 */ cmplwi r0, 2 +/* 8038874C 003856AC 40 82 00 0C */ bne lbl_80388758 +/* 80388750 003856B0 A0 1A 00 00 */ lhz r0, 0(r26) +/* 80388754 003856B4 48 00 00 30 */ b lbl_80388784 +lbl_80388758: +/* 80388758 003856B8 28 00 00 03 */ cmplwi r0, 3 +/* 8038875C 003856BC 40 82 00 0C */ bne lbl_80388768 +/* 80388760 003856C0 A0 1A 00 00 */ lhz r0, 0(r26) +/* 80388764 003856C4 48 00 00 20 */ b lbl_80388784 +lbl_80388768: +/* 80388768 003856C8 80 19 00 00 */ lwz r0, 0(r25) +/* 8038876C 003856CC 2C 00 00 00 */ cmpwi r0, 0 +/* 80388770 003856D0 40 82 00 10 */ bne lbl_80388780 +/* 80388774 003856D4 A0 1A 00 00 */ lhz r0, 0(r26) +/* 80388778 003856D8 54 00 0C 3C */ rlwinm r0, r0, 1, 0x10, 0x1e +/* 8038877C 003856DC 48 00 00 08 */ b lbl_80388784 +lbl_80388780: +/* 80388780 003856E0 A0 1A 00 00 */ lhz r0, 0(r26) +lbl_80388784: +/* 80388784 003856E4 3A DD 00 F6 */ addi r22, r29, 0xf6 +/* 80388788 003856E8 B0 1D 00 F6 */ sth r0, 0xf6(r29) +/* 8038878C 003856EC 80 1C 00 00 */ lwz r0, 0(r28) +/* 80388790 003856F0 28 00 00 03 */ cmplwi r0, 3 +/* 80388794 003856F4 40 82 00 0C */ bne lbl_803887A0 +/* 80388798 003856F8 38 00 00 01 */ li r0, 1 +/* 8038879C 003856FC 48 00 00 08 */ b lbl_803887A4 +lbl_803887A0: +/* 803887A0 00385700 38 00 00 00 */ li r0, 0 +lbl_803887A4: +/* 803887A4 00385704 3A 5D 01 34 */ addi r18, r29, 0x134 +/* 803887A8 00385708 90 1D 01 34 */ stw r0, 0x134(r29) +/* 803887AC 0038570C 3A BD 01 18 */ addi r21, r29, 0x118 +/* 803887B0 00385710 80 7D 01 18 */ lwz r3, 0x118(r29) +/* 803887B4 00385714 80 1C 00 00 */ lwz r0, 0(r28) +/* 803887B8 00385718 54 63 10 3A */ slwi r3, r3, 2 +/* 803887BC 0038571C 7C 63 02 14 */ add r3, r3, r0 +/* 803887C0 00385720 4B FF F1 7D */ bl getTiming +/* 803887C4 00385724 7C 7E 1B 78 */ mr r30, r3 +/* 803887C8 00385728 93 DD 01 44 */ stw r30, 0x144(r29) +/* 803887CC 0038572C A0 18 00 00 */ lhz r0, 0(r24) +/* 803887D0 00385730 A8 9D 00 F0 */ lha r4, 0xf0(r29) +/* 803887D4 00385734 A8 6D AD B8 */ lha r3, lbl_805A9978@sda21(r13) +/* 803887D8 00385738 20 A0 02 D0 */ subfic r5, r0, 0x2d0 +/* 803887DC 0038573C A0 1E 00 02 */ lhz r0, 2(r30) +/* 803887E0 00385740 7C 64 1A 14 */ add r3, r4, r3 +/* 803887E4 00385744 7C 03 28 00 */ cmpw r3, r5 +/* 803887E8 00385748 40 81 00 08 */ ble lbl_803887F0 +/* 803887EC 0038574C 48 00 00 14 */ b lbl_80388800 +lbl_803887F0: +/* 803887F0 00385750 2C 03 00 00 */ cmpwi r3, 0 +/* 803887F4 00385754 40 80 00 08 */ bge lbl_803887FC +/* 803887F8 00385758 38 60 00 00 */ li r3, 0 +lbl_803887FC: +/* 803887FC 0038575C 7C 65 1B 78 */ mr r5, r3 +lbl_80388800: +/* 80388800 00385760 B0 BD 00 F8 */ sth r5, 0xf8(r29) +/* 80388804 00385764 38 7D 00 F8 */ addi r3, r29, 0xf8 +/* 80388808 00385768 80 99 00 00 */ lwz r4, 0(r25) +/* 8038880C 0038576C 2C 04 00 00 */ cmpwi r4, 0 +/* 80388810 00385770 40 82 00 0C */ bne lbl_8038881C +/* 80388814 00385774 38 80 00 02 */ li r4, 2 +/* 80388818 00385778 48 00 00 08 */ b lbl_80388820 +lbl_8038881C: +/* 8038881C 0038577C 38 80 00 01 */ li r4, 1 +lbl_80388820: +/* 80388820 00385780 A0 B7 00 00 */ lhz r5, 0(r23) +/* 80388824 00385784 A8 CD AD BA */ lha r6, lbl_805A997A@sda21(r13) +/* 80388828 00385788 7C A7 07 34 */ extsh r7, r5 +/* 8038882C 0038578C 54 A5 07 FE */ clrlwi r5, r5, 0x1f +/* 80388830 00385790 7C E7 32 14 */ add r7, r7, r6 +/* 80388834 00385794 7C 07 28 00 */ cmpw r7, r5 +/* 80388838 00385798 40 81 00 08 */ ble lbl_80388840 +/* 8038883C 0038579C 48 00 00 08 */ b lbl_80388844 +lbl_80388840: +/* 80388840 003857A0 7C A7 2B 78 */ mr r7, r5 +lbl_80388844: +/* 80388844 003857A4 B0 FD 00 FA */ sth r7, 0xfa(r29) +/* 80388848 003857A8 7C 00 07 34 */ extsh r0, r0 +/* 8038884C 003857AC 54 00 08 3C */ slwi r0, r0, 1 +/* 80388850 003857B0 A1 16 00 00 */ lhz r8, 0(r22) +/* 80388854 003857B4 7C 05 00 50 */ subf r0, r5, r0 +/* 80388858 003857B8 A8 F7 00 00 */ lha r7, 0(r23) +/* 8038885C 003857BC 3A 7D 00 FA */ addi r19, r29, 0xfa +/* 80388860 003857C0 7D 09 07 34 */ extsh r9, r8 +/* 80388864 003857C4 7D 49 32 14 */ add r10, r9, r6 +/* 80388868 003857C8 7D 47 52 14 */ add r10, r7, r10 +/* 8038886C 003857CC 7D 20 50 51 */ subf. r9, r0, r10 +/* 80388870 003857D0 40 81 00 0C */ ble lbl_8038887C +/* 80388874 003857D4 7D 20 50 50 */ subf r9, r0, r10 +/* 80388878 003857D8 48 00 00 08 */ b lbl_80388880 +lbl_8038887C: +/* 8038887C 003857DC 39 20 00 00 */ li r9, 0 +lbl_80388880: +/* 80388880 003857E0 7D 47 32 14 */ add r10, r7, r6 +/* 80388884 003857E4 7C E5 50 51 */ subf. r7, r5, r10 +/* 80388888 003857E8 40 80 00 0C */ bge lbl_80388894 +/* 8038888C 003857EC 7C E5 50 50 */ subf r7, r5, r10 +/* 80388890 003857F0 48 00 00 08 */ b lbl_80388898 +lbl_80388894: +/* 80388894 003857F4 38 E0 00 00 */ li r7, 0 +lbl_80388898: +/* 80388898 003857F8 7C E8 3A 14 */ add r7, r8, r7 +/* 8038889C 003857FC 7C E9 38 50 */ subf r7, r9, r7 +/* 803888A0 00385800 3A 9D 00 FC */ addi r20, r29, 0xfc +/* 803888A4 00385804 B0 FD 00 FC */ sth r7, 0xfc(r29) +/* 803888A8 00385808 A8 F7 00 00 */ lha r7, 0(r23) +/* 803888AC 0038580C 7D 07 32 14 */ add r8, r7, r6 +/* 803888B0 00385810 7C E5 40 51 */ subf. r7, r5, r8 +/* 803888B4 00385814 40 80 00 0C */ bge lbl_803888C0 +/* 803888B8 00385818 7C E5 40 50 */ subf r7, r5, r8 +/* 803888BC 0038581C 48 00 00 08 */ b lbl_803888C4 +lbl_803888C0: +/* 803888C0 00385820 38 E0 00 00 */ li r7, 0 +lbl_803888C4: +/* 803888C4 00385824 7D 07 23 D6 */ divw r8, r7, r4 +/* 803888C8 00385828 A0 F1 00 00 */ lhz r7, 0(r17) +/* 803888CC 0038582C 7C E8 38 50 */ subf r7, r8, r7 +/* 803888D0 00385830 B0 FD 00 FE */ sth r7, 0xfe(r29) +/* 803888D4 00385834 A8 F6 00 00 */ lha r7, 0(r22) +/* 803888D8 00385838 A9 37 00 00 */ lha r9, 0(r23) +/* 803888DC 0038583C 7D 07 32 14 */ add r8, r7, r6 +/* 803888E0 00385840 7D 09 42 14 */ add r8, r9, r8 +/* 803888E4 00385844 7C E0 40 51 */ subf. r7, r0, r8 +/* 803888E8 00385848 40 81 00 0C */ ble lbl_803888F4 +/* 803888EC 0038584C 7C E0 40 50 */ subf r7, r0, r8 +/* 803888F0 00385850 48 00 00 08 */ b lbl_803888F8 +lbl_803888F4: +/* 803888F4 00385854 38 E0 00 00 */ li r7, 0 +lbl_803888F8: +/* 803888F8 00385858 7C C9 32 14 */ add r6, r9, r6 +/* 803888FC 0038585C 7C 05 30 51 */ subf. r0, r5, r6 +/* 80388900 00385860 40 80 00 0C */ bge lbl_8038890C +/* 80388904 00385864 7C 05 30 50 */ subf r0, r5, r6 +/* 80388908 00385868 48 00 00 08 */ b lbl_80388910 +lbl_8038890C: +/* 8038890C 0038586C 38 00 00 00 */ li r0, 0 +lbl_80388910: +/* 80388910 00385870 7C 00 23 D6 */ divw r0, r0, r4 +/* 80388914 00385874 A0 BA 00 00 */ lhz r5, 0(r26) +/* 80388918 00385878 7C 87 23 D6 */ divw r4, r7, r4 +/* 8038891C 0038587C 7C 05 02 14 */ add r0, r5, r0 +/* 80388920 00385880 7C 04 00 50 */ subf r0, r4, r0 +/* 80388924 00385884 B0 1D 01 00 */ sth r0, 0x100(r29) +/* 80388928 00385888 80 0D AD B4 */ lwz r0, lbl_805A9974@sda21(r13) +/* 8038892C 0038588C 28 00 00 00 */ cmplwi r0, 0 +/* 80388930 00385890 40 82 00 0C */ bne lbl_8038893C +/* 80388934 00385894 38 00 00 03 */ li r0, 3 +/* 80388938 00385898 90 15 00 00 */ stw r0, 0(r21) +lbl_8038893C: +/* 8038893C 0038589C A0 BE 00 18 */ lhz r5, 0x18(r30) +/* 80388940 003858A0 7C A4 0E 70 */ srawi r4, r5, 1 +/* 80388944 003858A4 7C 84 01 94 */ addze r4, r4 +/* 80388948 003858A8 7C A0 0E 70 */ srawi r0, r5, 1 +/* 8038894C 003858AC 7C 00 01 94 */ addze r0, r0 +/* 80388950 003858B0 54 00 08 3C */ slwi r0, r0, 1 +/* 80388954 003858B4 7C 00 28 10 */ subfc r0, r0, r5 +/* 80388958 003858B8 54 00 04 3F */ clrlwi. r0, r0, 0x10 +/* 8038895C 003858BC 54 84 04 3E */ clrlwi r4, r4, 0x10 +/* 80388960 003858C0 41 82 00 0C */ beq lbl_8038896C +/* 80388964 003858C4 A0 BE 00 1A */ lhz r5, 0x1a(r30) +/* 80388968 003858C8 48 00 00 08 */ b lbl_80388970 +lbl_8038896C: +/* 8038896C 003858CC 38 A0 00 00 */ li r5, 0 +lbl_80388970: +/* 80388970 003858D0 38 05 00 01 */ addi r0, r5, 1 +/* 80388974 003858D4 B0 1D 00 32 */ sth r0, 0x32(r29) +/* 80388978 003858D8 38 04 00 01 */ addi r0, r4, 1 +/* 8038897C 003858DC 60 00 10 00 */ ori r0, r0, 0x1000 +/* 80388980 003858E0 80 AD AD C0 */ lwz r5, lbl_805A9980@sda21(r13) +/* 80388984 003858E4 38 9D 00 02 */ addi r4, r29, 2 +/* 80388988 003858E8 80 CD AD C4 */ lwz r6, lbl_805A9984@sda21(r13) +/* 8038898C 003858EC 60 A5 00 40 */ ori r5, r5, 0x40 +/* 80388990 003858F0 90 CD AD C4 */ stw r6, lbl_805A9984@sda21(r13) +/* 80388994 003858F4 90 AD AD C0 */ stw r5, lbl_805A9980@sda21(r13) +/* 80388998 003858F8 B0 1D 00 30 */ sth r0, 0x30(r29) +/* 8038899C 003858FC 80 0D AD C0 */ lwz r0, lbl_805A9980@sda21(r13) +/* 803889A0 00385900 80 AD AD C4 */ lwz r5, lbl_805A9984@sda21(r13) +/* 803889A4 00385904 60 00 00 80 */ ori r0, r0, 0x80 +/* 803889A8 00385908 90 AD AD C4 */ stw r5, lbl_805A9984@sda21(r13) +/* 803889AC 0038590C 90 0D AD C0 */ stw r0, lbl_805A9980@sda21(r13) +/* 803889B0 00385910 80 1C 00 00 */ lwz r0, 0(r28) +/* 803889B4 00385914 A0 BD 00 02 */ lhz r5, 2(r29) +/* 803889B8 00385918 28 00 00 02 */ cmplwi r0, 2 +/* 803889BC 0038591C 41 82 00 0C */ beq lbl_803889C8 +/* 803889C0 00385920 28 00 00 03 */ cmplwi r0, 3 +/* 803889C4 00385924 40 82 00 10 */ bne lbl_803889D4 +lbl_803889C8: +/* 803889C8 00385928 54 A0 07 B8 */ rlwinm r0, r5, 0, 0x1e, 0x1c +/* 803889CC 0038592C 60 05 00 04 */ ori r5, r0, 4 +/* 803889D0 00385930 48 00 00 0C */ b lbl_803889DC +lbl_803889D4: +/* 803889D4 00385934 54 A5 07 B8 */ rlwinm r5, r5, 0, 0x1e, 0x1c +/* 803889D8 00385938 50 05 17 7A */ rlwimi r5, r0, 2, 0x1d, 0x1d +lbl_803889DC: +/* 803889DC 0038593C 80 D5 00 00 */ lwz r6, 0(r21) +/* 803889E0 00385940 54 A5 07 76 */ rlwinm r5, r5, 0, 0x1d, 0x1b +/* 803889E4 00385944 80 F2 00 00 */ lwz r7, 0(r18) +/* 803889E8 00385948 28 06 00 04 */ cmplwi r6, 4 +/* 803889EC 0038594C 54 E0 18 38 */ slwi r0, r7, 3 +/* 803889F0 00385950 7C A5 03 78 */ or r5, r5, r0 +/* 803889F4 00385954 41 82 00 10 */ beq lbl_80388A04 +/* 803889F8 00385958 38 06 FF FB */ addi r0, r6, -5 +/* 803889FC 0038595C 28 00 00 01 */ cmplwi r0, 1 +/* 80388A00 00385960 41 81 00 0C */ bgt lbl_80388A0C +lbl_80388A04: +/* 80388A04 00385964 54 A0 06 2A */ rlwinm r0, r5, 0, 0x18, 0x15 +/* 80388A08 00385968 48 00 00 10 */ b lbl_80388A18 +lbl_80388A0C: +/* 80388A0C 0038596C 54 A5 06 2A */ rlwinm r5, r5, 0, 0x18, 0x15 +/* 80388A10 00385970 54 C0 40 2E */ slwi r0, r6, 8 +/* 80388A14 00385974 7C A0 03 78 */ or r0, r5, r0 +lbl_80388A18: +/* 80388A18 00385978 B0 04 00 00 */ sth r0, 0(r4) +/* 80388A1C 0038597C 3C 00 40 00 */ lis r0, 0x4000 +/* 80388A20 00385980 38 DD 00 6C */ addi r6, r29, 0x6c +/* 80388A24 00385984 80 8D AD C0 */ lwz r4, lbl_805A9980@sda21(r13) +/* 80388A28 00385988 80 AD AD C4 */ lwz r5, lbl_805A9984@sda21(r13) +/* 80388A2C 0038598C 7C 80 03 78 */ or r0, r4, r0 +/* 80388A30 00385990 90 AD AD C4 */ stw r5, lbl_805A9984@sda21(r13) +/* 80388A34 00385994 90 0D AD C0 */ stw r0, lbl_805A9980@sda21(r13) +/* 80388A38 00385998 80 1F 00 00 */ lwz r0, 0(r31) +/* 80388A3C 0038599C A0 9D 00 6C */ lhz r4, 0x6c(r29) +/* 80388A40 003859A0 2C 00 00 02 */ cmpwi r0, 2 +/* 80388A44 003859A4 41 82 00 14 */ beq lbl_80388A58 +/* 80388A48 003859A8 2C 00 00 03 */ cmpwi r0, 3 +/* 80388A4C 003859AC 41 82 00 0C */ beq lbl_80388A58 +/* 80388A50 003859B0 2C 00 00 1A */ cmpwi r0, 0x1a +/* 80388A54 003859B4 40 82 00 10 */ bne lbl_80388A64 +lbl_80388A58: +/* 80388A58 003859B8 54 80 00 3C */ rlwinm r0, r4, 0, 0, 0x1e +/* 80388A5C 003859BC 60 00 00 01 */ ori r0, r0, 1 +/* 80388A60 003859C0 48 00 00 08 */ b lbl_80388A68 +lbl_80388A64: +/* 80388A64 003859C4 54 80 00 3C */ rlwinm r0, r4, 0, 0, 0x1e +lbl_80388A68: +/* 80388A68 003859C8 B0 06 00 00 */ sth r0, 0(r6) +/* 80388A6C 003859CC 2C 07 00 00 */ cmpwi r7, 0 +/* 80388A70 003859D0 80 8D AD C0 */ lwz r4, lbl_805A9980@sda21(r13) +/* 80388A74 003859D4 80 0D AD C4 */ lwz r0, lbl_805A9984@sda21(r13) +/* 80388A78 003859D8 60 00 02 00 */ ori r0, r0, 0x200 +/* 80388A7C 003859DC 90 0D AD C4 */ stw r0, lbl_805A9984@sda21(r13) +/* 80388A80 003859E0 90 8D AD C0 */ stw r4, lbl_805A9980@sda21(r13) +/* 80388A84 003859E4 A0 98 00 00 */ lhz r4, 0(r24) +/* 80388A88 003859E8 A0 B0 00 00 */ lhz r5, 0(r16) +/* 80388A8C 003859EC 41 82 00 0C */ beq lbl_80388A98 +/* 80388A90 003859F0 54 A0 08 3C */ slwi r0, r5, 1 +/* 80388A94 003859F4 48 00 00 08 */ b lbl_80388A9C +lbl_80388A98: +/* 80388A98 003859F8 7C A0 2B 78 */ mr r0, r5 +lbl_80388A9C: +/* 80388A9C 003859FC 54 08 04 3E */ clrlwi r8, r0, 0x10 +/* 80388AA0 00385A00 7C 08 20 40 */ cmplw r8, r4 +/* 80388AA4 00385A04 40 80 00 50 */ bge lbl_80388AF4 +/* 80388AA8 00385A08 55 06 40 2E */ slwi r6, r8, 8 +/* 80388AAC 00385A0C 38 06 FF FF */ addi r0, r6, -1 +/* 80388AB0 00385A10 7C 04 02 14 */ add r0, r4, r0 +/* 80388AB4 00385A14 7C 00 23 96 */ divwu r0, r0, r4 +/* 80388AB8 00385A18 60 00 10 00 */ ori r0, r0, 0x1000 +/* 80388ABC 00385A1C B0 1D 00 4A */ sth r0, 0x4a(r29) +/* 80388AC0 00385A20 3C 00 04 00 */ lis r0, 0x400 +/* 80388AC4 00385A24 80 CD AD C0 */ lwz r6, lbl_805A9980@sda21(r13) +/* 80388AC8 00385A28 80 ED AD C4 */ lwz r7, lbl_805A9984@sda21(r13) +/* 80388ACC 00385A2C 7C E0 03 78 */ or r0, r7, r0 +/* 80388AD0 00385A30 90 0D AD C4 */ stw r0, lbl_805A9984@sda21(r13) +/* 80388AD4 00385A34 90 CD AD C0 */ stw r6, lbl_805A9980@sda21(r13) +/* 80388AD8 00385A38 B1 1D 00 70 */ sth r8, 0x70(r29) +/* 80388ADC 00385A3C 80 CD AD C0 */ lwz r6, lbl_805A9980@sda21(r13) +/* 80388AE0 00385A40 80 0D AD C4 */ lwz r0, lbl_805A9984@sda21(r13) +/* 80388AE4 00385A44 60 00 00 80 */ ori r0, r0, 0x80 +/* 80388AE8 00385A48 90 0D AD C4 */ stw r0, lbl_805A9984@sda21(r13) +/* 80388AEC 00385A4C 90 CD AD C0 */ stw r6, lbl_805A9980@sda21(r13) +/* 80388AF0 00385A50 48 00 00 24 */ b lbl_80388B14 +lbl_80388AF4: +/* 80388AF4 00385A54 38 00 01 00 */ li r0, 0x100 +/* 80388AF8 00385A58 B0 1D 00 4A */ sth r0, 0x4a(r29) +/* 80388AFC 00385A5C 3C 00 04 00 */ lis r0, 0x400 +/* 80388B00 00385A60 80 CD AD C0 */ lwz r6, lbl_805A9980@sda21(r13) +/* 80388B04 00385A64 80 ED AD C4 */ lwz r7, lbl_805A9984@sda21(r13) +/* 80388B08 00385A68 7C E0 03 78 */ or r0, r7, r0 +/* 80388B0C 00385A6C 90 0D AD C4 */ stw r0, lbl_805A9984@sda21(r13) +/* 80388B10 00385A70 90 CD AD C0 */ stw r6, lbl_805A9980@sda21(r13) +lbl_80388B14: +/* 80388B14 00385A74 A0 03 00 00 */ lhz r0, 0(r3) +/* 80388B18 00385A78 21 84 02 D0 */ subfic r12, r4, 0x2d0 +/* 80388B1C 00385A7C A0 DE 00 1A */ lhz r6, 0x1a(r30) +/* 80388B20 00385A80 3C 60 10 00 */ lis r3, 0x1000 +/* 80388B24 00385A84 3D 00 20 00 */ lis r8, 0x2000 +/* 80388B28 00385A88 B0 DD 00 06 */ sth r6, 6(r29) +/* 80388B2C 00385A8C 3D 20 04 00 */ lis r9, 0x400 +/* 80388B30 00385A90 3C E0 08 00 */ lis r7, 0x800 +/* 80388B34 00385A94 81 4D AD C0 */ lwz r10, lbl_805A9980@sda21(r13) +/* 80388B38 00385A98 3C C0 00 10 */ lis r6, 0x10 +/* 80388B3C 00385A9C 3C 80 00 20 */ lis r4, 0x20 +/* 80388B40 00385AA0 81 6D AD C4 */ lwz r11, lbl_805A9984@sda21(r13) +/* 80388B44 00385AA4 7D 4A 1B 78 */ or r10, r10, r3 +/* 80388B48 00385AA8 3C 60 00 04 */ lis r3, 4 +/* 80388B4C 00385AAC 91 6D AD C4 */ stw r11, lbl_805A9984@sda21(r13) +/* 80388B50 00385AB0 91 4D AD C0 */ stw r10, lbl_805A9980@sda21(r13) +/* 80388B54 00385AB4 89 5E 00 1D */ lbz r10, 0x1d(r30) +/* 80388B58 00385AB8 89 7E 00 1E */ lbz r11, 0x1e(r30) +/* 80388B5C 00385ABC 51 4B 44 2E */ rlwimi r11, r10, 8, 0x10, 0x17 +/* 80388B60 00385AC0 B1 7D 00 04 */ sth r11, 4(r29) +/* 80388B64 00385AC4 81 4D AD C0 */ lwz r10, lbl_805A9980@sda21(r13) +/* 80388B68 00385AC8 81 6D AD C4 */ lwz r11, lbl_805A9984@sda21(r13) +/* 80388B6C 00385ACC 7D 48 43 78 */ or r8, r10, r8 +/* 80388B70 00385AD0 91 6D AD C4 */ stw r11, lbl_805A9984@sda21(r13) +/* 80388B74 00385AD4 91 0D AD C0 */ stw r8, lbl_805A9980@sda21(r13) +/* 80388B78 00385AD8 89 1E 00 1F */ lbz r8, 0x1f(r30) +/* 80388B7C 00385ADC 89 5E 00 1C */ lbz r10, 0x1c(r30) +/* 80388B80 00385AE0 7E 08 02 14 */ add r16, r8, r0 +/* 80388B84 00385AE4 A1 7E 00 20 */ lhz r11, 0x20(r30) +/* 80388B88 00385AE8 3A 10 FF D8 */ addi r16, r16, -40 +/* 80388B8C 00385AEC 56 08 3C 30 */ rlwinm r8, r16, 7, 0x10, 0x18 +/* 80388B90 00385AF0 7D 48 43 78 */ or r8, r10, r8 +/* 80388B94 00385AF4 B1 1D 00 0A */ sth r8, 0xa(r29) +/* 80388B98 00385AF8 7D 0B 02 14 */ add r8, r11, r0 +/* 80388B9C 00385AFC 38 08 00 28 */ addi r0, r8, 0x28 +/* 80388BA0 00385B00 81 4D AD C0 */ lwz r10, lbl_805A9980@sda21(r13) +/* 80388BA4 00385B04 7C 0C 00 50 */ subf r0, r12, r0 +/* 80388BA8 00385B08 56 08 BA 7E */ srwi r8, r16, 9 +/* 80388BAC 00385B0C 81 6D AD C4 */ lwz r11, lbl_805A9984@sda21(r13) +/* 80388BB0 00385B10 54 00 08 3C */ slwi r0, r0, 1 +/* 80388BB4 00385B14 7D 49 4B 78 */ or r9, r10, r9 +/* 80388BB8 00385B18 91 6D AD C4 */ stw r11, lbl_805A9984@sda21(r13) +/* 80388BBC 00385B1C 7D 00 03 78 */ or r0, r8, r0 +/* 80388BC0 00385B20 91 2D AD C0 */ stw r9, lbl_805A9980@sda21(r13) +/* 80388BC4 00385B24 B0 1D 00 08 */ sth r0, 8(r29) +/* 80388BC8 00385B28 80 0D AD C0 */ lwz r0, lbl_805A9980@sda21(r13) +/* 80388BCC 00385B2C 81 0D AD C4 */ lwz r8, lbl_805A9984@sda21(r13) +/* 80388BD0 00385B30 7C 00 3B 78 */ or r0, r0, r7 +/* 80388BD4 00385B34 91 0D AD C4 */ stw r8, lbl_805A9984@sda21(r13) +/* 80388BD8 00385B38 90 0D AD C0 */ stw r0, lbl_805A9980@sda21(r13) +/* 80388BDC 00385B3C A0 1E 00 10 */ lhz r0, 0x10(r30) +/* 80388BE0 00385B40 88 FE 00 0C */ lbz r7, 0xc(r30) +/* 80388BE4 00385B44 54 00 28 34 */ slwi r0, r0, 5 +/* 80388BE8 00385B48 7C E0 03 78 */ or r0, r7, r0 +/* 80388BEC 00385B4C B0 1D 00 16 */ sth r0, 0x16(r29) +/* 80388BF0 00385B50 80 0D AD C0 */ lwz r0, lbl_805A9980@sda21(r13) +/* 80388BF4 00385B54 80 ED AD C4 */ lwz r7, lbl_805A9984@sda21(r13) +/* 80388BF8 00385B58 7C 00 33 78 */ or r0, r0, r6 +/* 80388BFC 00385B5C 90 ED AD C4 */ stw r7, lbl_805A9984@sda21(r13) +/* 80388C00 00385B60 90 0D AD C0 */ stw r0, lbl_805A9980@sda21(r13) +/* 80388C04 00385B64 A0 1E 00 14 */ lhz r0, 0x14(r30) +/* 80388C08 00385B68 88 DE 00 0E */ lbz r6, 0xe(r30) +/* 80388C0C 00385B6C 54 00 28 34 */ slwi r0, r0, 5 +/* 80388C10 00385B70 7C C0 03 78 */ or r0, r6, r0 +/* 80388C14 00385B74 B0 1D 00 14 */ sth r0, 0x14(r29) +/* 80388C18 00385B78 80 0D AD C0 */ lwz r0, lbl_805A9980@sda21(r13) +/* 80388C1C 00385B7C 80 CD AD C4 */ lwz r6, lbl_805A9984@sda21(r13) +/* 80388C20 00385B80 7C 00 23 78 */ or r0, r0, r4 +/* 80388C24 00385B84 90 CD AD C4 */ stw r6, lbl_805A9984@sda21(r13) +/* 80388C28 00385B88 90 0D AD C0 */ stw r0, lbl_805A9980@sda21(r13) +/* 80388C2C 00385B8C A0 1E 00 12 */ lhz r0, 0x12(r30) +/* 80388C30 00385B90 88 9E 00 0D */ lbz r4, 0xd(r30) +/* 80388C34 00385B94 54 00 28 34 */ slwi r0, r0, 5 +/* 80388C38 00385B98 7C 80 03 78 */ or r0, r4, r0 +/* 80388C3C 00385B9C B0 1D 00 1A */ sth r0, 0x1a(r29) +/* 80388C40 00385BA0 80 0D AD C0 */ lwz r0, lbl_805A9980@sda21(r13) +/* 80388C44 00385BA4 80 8D AD C4 */ lwz r4, lbl_805A9984@sda21(r13) +/* 80388C48 00385BA8 7C 00 1B 78 */ or r0, r0, r3 +/* 80388C4C 00385BAC 90 8D AD C4 */ stw r4, lbl_805A9984@sda21(r13) +/* 80388C50 00385BB0 90 0D AD C0 */ stw r0, lbl_805A9980@sda21(r13) +/* 80388C54 00385BB4 A0 1E 00 16 */ lhz r0, 0x16(r30) +/* 80388C58 00385BB8 88 7E 00 0F */ lbz r3, 0xf(r30) +/* 80388C5C 00385BBC 54 00 28 34 */ slwi r0, r0, 5 +/* 80388C60 00385BC0 7C 60 03 78 */ or r0, r3, r0 +/* 80388C64 00385BC4 B0 1D 00 18 */ sth r0, 0x18(r29) +/* 80388C68 00385BC8 80 6D AD C0 */ lwz r3, lbl_805A9980@sda21(r13) +/* 80388C6C 00385BCC 3C 00 00 08 */ lis r0, 8 +/* 80388C70 00385BD0 38 DD 01 1C */ addi r6, r29, 0x11c +/* 80388C74 00385BD4 80 8D AD C4 */ lwz r4, lbl_805A9984@sda21(r13) +/* 80388C78 00385BD8 7C 60 03 78 */ or r0, r3, r0 +/* 80388C7C 00385BDC 90 8D AD C4 */ stw r4, lbl_805A9984@sda21(r13) +/* 80388C80 00385BE0 90 0D AD C0 */ stw r0, lbl_805A9980@sda21(r13) +/* 80388C84 00385BE4 A0 7B 00 00 */ lhz r3, 0(r27) +/* 80388C88 00385BE8 80 99 00 00 */ lwz r4, 0(r25) +/* 80388C8C 00385BEC 38 03 00 0F */ addi r0, r3, 0xf +/* 80388C90 00385BF0 A0 6F 00 00 */ lhz r3, 0(r15) +/* 80388C94 00385BF4 7C 00 26 70 */ srawi r0, r0, 4 +/* 80388C98 00385BF8 7C 00 01 94 */ addze r0, r0 +/* 80388C9C 00385BFC 2C 04 00 00 */ cmpwi r4, 0 +/* 80388CA0 00385C00 98 1D 01 1C */ stb r0, 0x11c(r29) +/* 80388CA4 00385C04 40 82 00 0C */ bne lbl_80388CB0 +/* 80388CA8 00385C08 88 86 00 00 */ lbz r4, 0(r6) +/* 80388CAC 00385C0C 48 00 00 0C */ b lbl_80388CB8 +lbl_80388CB0: +/* 80388CB0 00385C10 88 06 00 00 */ lbz r0, 0(r6) +/* 80388CB4 00385C14 54 04 0E 3C */ rlwinm r4, r0, 1, 0x18, 0x1e +lbl_80388CB8: +/* 80388CB8 00385C18 7C 60 26 70 */ srawi r0, r3, 4 +/* 80388CBC 00385C1C 98 9D 01 1D */ stb r4, 0x11d(r29) +/* 80388CC0 00385C20 7C 00 01 94 */ addze r0, r0 +/* 80388CC4 00385C24 54 00 20 36 */ slwi r0, r0, 4 +/* 80388CC8 00385C28 7C 00 18 10 */ subfc r0, r0, r3 +/* 80388CCC 00385C2C 98 1D 01 2C */ stb r0, 0x12c(r29) +/* 80388CD0 00385C30 38 05 00 0F */ addi r0, r5, 0xf +/* 80388CD4 00385C34 3C 60 08 00 */ lis r3, 0x800 +/* 80388CD8 00385C38 88 9D 01 2C */ lbz r4, 0x12c(r29) +/* 80388CDC 00385C3C 7C 04 02 14 */ add r0, r4, r0 +/* 80388CE0 00385C40 7C 00 26 70 */ srawi r0, r0, 4 +/* 80388CE4 00385C44 7C 00 01 94 */ addze r0, r0 +/* 80388CE8 00385C48 98 1D 01 1E */ stb r0, 0x11e(r29) +/* 80388CEC 00385C4C 88 1D 01 1E */ lbz r0, 0x11e(r29) +/* 80388CF0 00385C50 88 9D 01 1D */ lbz r4, 0x11d(r29) +/* 80388CF4 00385C54 50 04 44 2E */ rlwimi r4, r0, 8, 0x10, 0x17 +/* 80388CF8 00385C58 B0 9D 00 48 */ sth r4, 0x48(r29) +/* 80388CFC 00385C5C 80 8D AD C0 */ lwz r4, lbl_805A9980@sda21(r13) +/* 80388D00 00385C60 80 0D AD E8 */ lwz r0, lbl_805A99A8@sda21(r13) +/* 80388D04 00385C64 80 AD AD C4 */ lwz r5, lbl_805A9984@sda21(r13) +/* 80388D08 00385C68 28 00 00 00 */ cmplwi r0, 0 +/* 80388D0C 00385C6C 7C A0 1B 78 */ or r0, r5, r3 +/* 80388D10 00385C70 90 0D AD C4 */ stw r0, lbl_805A9984@sda21(r13) +/* 80388D14 00385C74 90 8D AD C0 */ stw r4, lbl_805A9980@sda21(r13) +/* 80388D18 00385C78 41 82 00 1C */ beq lbl_80388D34 +/* 80388D1C 00385C7C 38 7D 00 F0 */ addi r3, r29, 0xf0 +/* 80388D20 00385C80 38 9D 01 24 */ addi r4, r29, 0x124 +/* 80388D24 00385C84 38 BD 01 28 */ addi r5, r29, 0x128 +/* 80388D28 00385C88 38 DD 01 3C */ addi r6, r29, 0x13c +/* 80388D2C 00385C8C 38 FD 01 40 */ addi r7, r29, 0x140 +/* 80388D30 00385C90 4B FF F3 B1 */ bl setFbbRegs +lbl_80388D34: +/* 80388D34 00385C94 80 1D 01 30 */ lwz r0, 0x130(r29) +/* 80388D38 00385C98 90 01 00 08 */ stw r0, 8(r1) +/* 80388D3C 00385C9C A0 73 00 00 */ lhz r3, 0(r19) +/* 80388D40 00385CA0 A0 94 00 00 */ lhz r4, 0(r20) +/* 80388D44 00385CA4 88 BE 00 00 */ lbz r5, 0(r30) +/* 80388D48 00385CA8 A0 DE 00 02 */ lhz r6, 2(r30) +/* 80388D4C 00385CAC A0 FE 00 04 */ lhz r7, 4(r30) +/* 80388D50 00385CB0 A1 1E 00 06 */ lhz r8, 6(r30) +/* 80388D54 00385CB4 A1 3E 00 08 */ lhz r9, 8(r30) +/* 80388D58 00385CB8 A1 5E 00 0A */ lhz r10, 0xa(r30) +/* 80388D5C 00385CBC 4B FF F6 59 */ bl setVerticalRegs +/* 80388D60 00385CC0 7D C3 73 78 */ mr r3, r14 +/* 80388D64 00385CC4 4B FF 89 25 */ bl OSRestoreInterrupts +/* 80388D68 00385CC8 B9 C1 00 30 */ lmw r14, 0x30(r1) +/* 80388D6C 00385CCC 80 01 00 7C */ lwz r0, 0x7c(r1) +/* 80388D70 00385CD0 38 21 00 78 */ addi r1, r1, 0x78 +/* 80388D74 00385CD4 7C 08 03 A6 */ mtlr r0 +/* 80388D78 00385CD8 4E 80 00 20 */ blr + +.global VIConfigurePan +VIConfigurePan: +/* 80388D7C 00385CDC 7C 08 02 A6 */ mflr r0 +/* 80388D80 00385CE0 3C E0 80 54 */ lis r7, lbl_80542040@ha +/* 80388D84 00385CE4 90 01 00 04 */ stw r0, 4(r1) +/* 80388D88 00385CE8 94 21 FF B0 */ stwu r1, -0x50(r1) +/* 80388D8C 00385CEC BE E1 00 2C */ stmw r23, 0x2c(r1) +/* 80388D90 00385CF0 3B 43 00 00 */ addi r26, r3, 0 +/* 80388D94 00385CF4 3B 24 00 00 */ addi r25, r4, 0 +/* 80388D98 00385CF8 3B 05 00 00 */ addi r24, r5, 0 +/* 80388D9C 00385CFC 3A E6 00 00 */ addi r23, r6, 0 +/* 80388DA0 00385D00 3B A7 20 40 */ addi r29, r7, lbl_80542040@l +/* 80388DA4 00385D04 4B FF 88 BD */ bl OSDisableInterrupts +/* 80388DA8 00385D08 B3 5D 01 06 */ sth r26, 0x106(r29) +/* 80388DAC 00385D0C 39 7D 01 06 */ addi r11, r29, 0x106 +/* 80388DB0 00385D10 39 1D 01 08 */ addi r8, r29, 0x108 +/* 80388DB4 00385D14 B3 3D 01 08 */ sth r25, 0x108(r29) +/* 80388DB8 00385D18 39 5D 01 0A */ addi r10, r29, 0x10a +/* 80388DBC 00385D1C 38 9D 01 0C */ addi r4, r29, 0x10c +/* 80388DC0 00385D20 B3 1D 01 0A */ sth r24, 0x10a(r29) +/* 80388DC4 00385D24 7C 7E 1B 78 */ mr r30, r3 +/* 80388DC8 00385D28 B2 FD 01 0C */ sth r23, 0x10c(r29) +/* 80388DCC 00385D2C 80 1D 01 14 */ lwz r0, 0x114(r29) +/* 80388DD0 00385D30 28 00 00 02 */ cmplwi r0, 2 +/* 80388DD4 00385D34 40 82 00 0C */ bne lbl_80388DE0 +/* 80388DD8 00385D38 A0 04 00 00 */ lhz r0, 0(r4) +/* 80388DDC 00385D3C 48 00 00 30 */ b lbl_80388E0C +lbl_80388DE0: +/* 80388DE0 00385D40 28 00 00 03 */ cmplwi r0, 3 +/* 80388DE4 00385D44 40 82 00 0C */ bne lbl_80388DF0 +/* 80388DE8 00385D48 A0 04 00 00 */ lhz r0, 0(r4) +/* 80388DEC 00385D4C 48 00 00 20 */ b lbl_80388E0C +lbl_80388DF0: +/* 80388DF0 00385D50 80 1D 01 10 */ lwz r0, 0x110(r29) +/* 80388DF4 00385D54 2C 00 00 00 */ cmpwi r0, 0 +/* 80388DF8 00385D58 40 82 00 10 */ bne lbl_80388E08 +/* 80388DFC 00385D5C A0 04 00 00 */ lhz r0, 0(r4) +/* 80388E00 00385D60 54 00 0C 3C */ rlwinm r0, r0, 1, 0x10, 0x1e +/* 80388E04 00385D64 48 00 00 08 */ b lbl_80388E0C +lbl_80388E08: +/* 80388E08 00385D68 A0 04 00 00 */ lhz r0, 0(r4) +lbl_80388E0C: +/* 80388E0C 00385D6C 3B 7D 00 F6 */ addi r27, r29, 0xf6 +/* 80388E10 00385D70 B0 1D 00 F6 */ sth r0, 0xf6(r29) +/* 80388E14 00385D74 39 3D 00 F4 */ addi r9, r29, 0xf4 +/* 80388E18 00385D78 A0 1D 00 F4 */ lhz r0, 0xf4(r29) +/* 80388E1C 00385D7C A8 BD 00 F0 */ lha r5, 0xf0(r29) +/* 80388E20 00385D80 A8 6D AD B8 */ lha r3, lbl_805A9978@sda21(r13) +/* 80388E24 00385D84 20 00 02 D0 */ subfic r0, r0, 0x2d0 +/* 80388E28 00385D88 83 9D 01 44 */ lwz r28, 0x144(r29) +/* 80388E2C 00385D8C 7C 65 1A 14 */ add r3, r5, r3 +/* 80388E30 00385D90 7C 03 00 00 */ cmpw r3, r0 +/* 80388E34 00385D94 A0 FC 00 02 */ lhz r7, 2(r28) +/* 80388E38 00385D98 40 81 00 08 */ ble lbl_80388E40 +/* 80388E3C 00385D9C 48 00 00 14 */ b lbl_80388E50 +lbl_80388E40: +/* 80388E40 00385DA0 2C 03 00 00 */ cmpwi r3, 0 +/* 80388E44 00385DA4 40 80 00 08 */ bge lbl_80388E4C +/* 80388E48 00385DA8 38 60 00 00 */ li r3, 0 +lbl_80388E4C: +/* 80388E4C 00385DAC 7C 60 1B 78 */ mr r0, r3 +lbl_80388E50: +/* 80388E50 00385DB0 B0 1D 00 F8 */ sth r0, 0xf8(r29) +/* 80388E54 00385DB4 39 9D 01 10 */ addi r12, r29, 0x110 +/* 80388E58 00385DB8 80 1D 01 10 */ lwz r0, 0x110(r29) +/* 80388E5C 00385DBC 2C 00 00 00 */ cmpwi r0, 0 +/* 80388E60 00385DC0 40 82 00 0C */ bne lbl_80388E6C +/* 80388E64 00385DC4 38 00 00 02 */ li r0, 2 +/* 80388E68 00385DC8 48 00 00 08 */ b lbl_80388E70 +lbl_80388E6C: +/* 80388E6C 00385DCC 38 00 00 01 */ li r0, 1 +lbl_80388E70: +/* 80388E70 00385DD0 A0 7D 00 F2 */ lhz r3, 0xf2(r29) +/* 80388E74 00385DD4 38 DD 00 F2 */ addi r6, r29, 0xf2 +/* 80388E78 00385DD8 A8 AD AD BA */ lha r5, lbl_805A997A@sda21(r13) +/* 80388E7C 00385DDC 7C 79 07 34 */ extsh r25, r3 +/* 80388E80 00385DE0 54 63 07 FE */ clrlwi r3, r3, 0x1f +/* 80388E84 00385DE4 7F 59 2A 14 */ add r26, r25, r5 +/* 80388E88 00385DE8 7C 1A 18 00 */ cmpw r26, r3 +/* 80388E8C 00385DEC 40 81 00 08 */ ble lbl_80388E94 +/* 80388E90 00385DF0 48 00 00 08 */ b lbl_80388E98 +lbl_80388E94: +/* 80388E94 00385DF4 7C 7A 1B 78 */ mr r26, r3 +lbl_80388E98: +/* 80388E98 00385DF8 B3 5D 00 FA */ sth r26, 0xfa(r29) +/* 80388E9C 00385DFC 7C E7 07 34 */ extsh r7, r7 +/* 80388EA0 00385E00 54 E7 08 3C */ slwi r7, r7, 1 +/* 80388EA4 00385E04 A2 FB 00 00 */ lhz r23, 0(r27) +/* 80388EA8 00385E08 7C E3 38 50 */ subf r7, r3, r7 +/* 80388EAC 00385E0C AB 06 00 00 */ lha r24, 0(r6) +/* 80388EB0 00385E10 3B FD 00 FA */ addi r31, r29, 0xfa +/* 80388EB4 00385E14 7E FA 07 34 */ extsh r26, r23 +/* 80388EB8 00385E18 7F 3A 2A 14 */ add r25, r26, r5 +/* 80388EBC 00385E1C 7F 38 CA 14 */ add r25, r24, r25 +/* 80388EC0 00385E20 7F 47 C8 51 */ subf. r26, r7, r25 +/* 80388EC4 00385E24 40 81 00 0C */ ble lbl_80388ED0 +/* 80388EC8 00385E28 7F 27 C8 50 */ subf r25, r7, r25 +/* 80388ECC 00385E2C 48 00 00 08 */ b lbl_80388ED4 +lbl_80388ED0: +/* 80388ED0 00385E30 3B 20 00 00 */ li r25, 0 +lbl_80388ED4: +/* 80388ED4 00385E34 7F 18 2A 14 */ add r24, r24, r5 +/* 80388ED8 00385E38 7F 43 C0 51 */ subf. r26, r3, r24 +/* 80388EDC 00385E3C 40 80 00 0C */ bge lbl_80388EE8 +/* 80388EE0 00385E40 7F 43 C0 50 */ subf r26, r3, r24 +/* 80388EE4 00385E44 48 00 00 08 */ b lbl_80388EEC +lbl_80388EE8: +/* 80388EE8 00385E48 3B 40 00 00 */ li r26, 0 +lbl_80388EEC: +/* 80388EEC 00385E4C 7F 57 D2 14 */ add r26, r23, r26 +/* 80388EF0 00385E50 7F 59 D0 50 */ subf r26, r25, r26 +/* 80388EF4 00385E54 B3 5D 00 FC */ sth r26, 0xfc(r29) +/* 80388EF8 00385E58 AB 46 00 00 */ lha r26, 0(r6) +/* 80388EFC 00385E5C 7E FA 2A 14 */ add r23, r26, r5 +/* 80388F00 00385E60 7F 43 B8 51 */ subf. r26, r3, r23 +/* 80388F04 00385E64 40 80 00 0C */ bge lbl_80388F10 +/* 80388F08 00385E68 7F 23 B8 50 */ subf r25, r3, r23 +/* 80388F0C 00385E6C 48 00 00 08 */ b lbl_80388F14 +lbl_80388F10: +/* 80388F10 00385E70 3B 20 00 00 */ li r25, 0 +lbl_80388F14: +/* 80388F14 00385E74 7F 59 03 D6 */ divw r26, r25, r0 +/* 80388F18 00385E78 A1 08 00 00 */ lhz r8, 0(r8) +/* 80388F1C 00385E7C 7D 1A 40 50 */ subf r8, r26, r8 +/* 80388F20 00385E80 B1 1D 00 FE */ sth r8, 0xfe(r29) +/* 80388F24 00385E84 A9 1B 00 00 */ lha r8, 0(r27) +/* 80388F28 00385E88 AA E6 00 00 */ lha r23, 0(r6) +/* 80388F2C 00385E8C 7D 08 2A 14 */ add r8, r8, r5 +/* 80388F30 00385E90 7D 17 42 14 */ add r8, r23, r8 +/* 80388F34 00385E94 7C C7 40 51 */ subf. r6, r7, r8 +/* 80388F38 00385E98 40 81 00 0C */ ble lbl_80388F44 +/* 80388F3C 00385E9C 7C C7 40 50 */ subf r6, r7, r8 +/* 80388F40 00385EA0 48 00 00 08 */ b lbl_80388F48 +lbl_80388F44: +/* 80388F44 00385EA4 38 C0 00 00 */ li r6, 0 +lbl_80388F48: +/* 80388F48 00385EA8 7C F7 2A 14 */ add r7, r23, r5 +/* 80388F4C 00385EAC 7C A3 38 51 */ subf. r5, r3, r7 +/* 80388F50 00385EB0 40 80 00 0C */ bge lbl_80388F5C +/* 80388F54 00385EB4 7C 63 38 50 */ subf r3, r3, r7 +/* 80388F58 00385EB8 48 00 00 08 */ b lbl_80388F60 +lbl_80388F5C: +/* 80388F5C 00385EBC 38 60 00 00 */ li r3, 0 +lbl_80388F60: +/* 80388F60 00385EC0 7C 63 03 D6 */ divw r3, r3, r0 +/* 80388F64 00385EC4 A0 84 00 00 */ lhz r4, 0(r4) +/* 80388F68 00385EC8 7C A6 03 D6 */ divw r5, r6, r0 +/* 80388F6C 00385ECC 7C 04 1A 14 */ add r0, r4, r3 +/* 80388F70 00385ED0 7C 05 00 50 */ subf r0, r5, r0 +/* 80388F74 00385ED4 B0 1D 01 00 */ sth r0, 0x100(r29) +/* 80388F78 00385ED8 80 1D 01 34 */ lwz r0, 0x134(r29) +/* 80388F7C 00385EDC A0 A9 00 00 */ lhz r5, 0(r9) +/* 80388F80 00385EE0 2C 00 00 00 */ cmpwi r0, 0 +/* 80388F84 00385EE4 A0 6A 00 00 */ lhz r3, 0(r10) +/* 80388F88 00385EE8 41 82 00 0C */ beq lbl_80388F94 +/* 80388F8C 00385EEC 54 60 08 3C */ slwi r0, r3, 1 +/* 80388F90 00385EF0 48 00 00 08 */ b lbl_80388F98 +lbl_80388F94: +/* 80388F94 00385EF4 7C 60 1B 78 */ mr r0, r3 +lbl_80388F98: +/* 80388F98 00385EF8 54 06 04 3E */ clrlwi r6, r0, 0x10 +/* 80388F9C 00385EFC 7C 06 28 40 */ cmplw r6, r5 +/* 80388FA0 00385F00 40 80 00 50 */ bge lbl_80388FF0 +/* 80388FA4 00385F04 54 C4 40 2E */ slwi r4, r6, 8 +/* 80388FA8 00385F08 38 04 FF FF */ addi r0, r4, -1 +/* 80388FAC 00385F0C 7C 05 02 14 */ add r0, r5, r0 +/* 80388FB0 00385F10 7C 00 2B 96 */ divwu r0, r0, r5 +/* 80388FB4 00385F14 60 00 10 00 */ ori r0, r0, 0x1000 +/* 80388FB8 00385F18 B0 1D 00 4A */ sth r0, 0x4a(r29) +/* 80388FBC 00385F1C 3C 00 04 00 */ lis r0, 0x400 +/* 80388FC0 00385F20 80 8D AD C0 */ lwz r4, lbl_805A9980@sda21(r13) +/* 80388FC4 00385F24 80 AD AD C4 */ lwz r5, lbl_805A9984@sda21(r13) +/* 80388FC8 00385F28 7C A0 03 78 */ or r0, r5, r0 +/* 80388FCC 00385F2C 90 0D AD C4 */ stw r0, lbl_805A9984@sda21(r13) +/* 80388FD0 00385F30 90 8D AD C0 */ stw r4, lbl_805A9980@sda21(r13) +/* 80388FD4 00385F34 B0 DD 00 70 */ sth r6, 0x70(r29) +/* 80388FD8 00385F38 80 8D AD C0 */ lwz r4, lbl_805A9980@sda21(r13) +/* 80388FDC 00385F3C 80 0D AD C4 */ lwz r0, lbl_805A9984@sda21(r13) +/* 80388FE0 00385F40 60 00 00 80 */ ori r0, r0, 0x80 +/* 80388FE4 00385F44 90 0D AD C4 */ stw r0, lbl_805A9984@sda21(r13) +/* 80388FE8 00385F48 90 8D AD C0 */ stw r4, lbl_805A9980@sda21(r13) +/* 80388FEC 00385F4C 48 00 00 24 */ b lbl_80389010 +lbl_80388FF0: +/* 80388FF0 00385F50 38 00 01 00 */ li r0, 0x100 +/* 80388FF4 00385F54 B0 1D 00 4A */ sth r0, 0x4a(r29) +/* 80388FF8 00385F58 3C 00 04 00 */ lis r0, 0x400 +/* 80388FFC 00385F5C 80 8D AD C0 */ lwz r4, lbl_805A9980@sda21(r13) +/* 80389000 00385F60 80 AD AD C4 */ lwz r5, lbl_805A9984@sda21(r13) +/* 80389004 00385F64 7C A0 03 78 */ or r0, r5, r0 +/* 80389008 00385F68 90 0D AD C4 */ stw r0, lbl_805A9984@sda21(r13) +/* 8038900C 00385F6C 90 8D AD C0 */ stw r4, lbl_805A9980@sda21(r13) +lbl_80389010: +/* 80389010 00385F70 A0 9D 01 02 */ lhz r4, 0x102(r29) +/* 80389014 00385F74 38 DD 01 1C */ addi r6, r29, 0x11c +/* 80389018 00385F78 80 AC 00 00 */ lwz r5, 0(r12) +/* 8038901C 00385F7C 38 04 00 0F */ addi r0, r4, 0xf +/* 80389020 00385F80 A0 8B 00 00 */ lhz r4, 0(r11) +/* 80389024 00385F84 7C 00 26 70 */ srawi r0, r0, 4 +/* 80389028 00385F88 7C 00 01 94 */ addze r0, r0 +/* 8038902C 00385F8C 2C 05 00 00 */ cmpwi r5, 0 +/* 80389030 00385F90 98 1D 01 1C */ stb r0, 0x11c(r29) +/* 80389034 00385F94 40 82 00 0C */ bne lbl_80389040 +/* 80389038 00385F98 88 A6 00 00 */ lbz r5, 0(r6) +/* 8038903C 00385F9C 48 00 00 0C */ b lbl_80389048 +lbl_80389040: +/* 80389040 00385FA0 88 06 00 00 */ lbz r0, 0(r6) +/* 80389044 00385FA4 54 05 0E 3C */ rlwinm r5, r0, 1, 0x18, 0x1e +lbl_80389048: +/* 80389048 00385FA8 7C 80 26 70 */ srawi r0, r4, 4 +/* 8038904C 00385FAC 98 BD 01 1D */ stb r5, 0x11d(r29) +/* 80389050 00385FB0 7C 00 01 94 */ addze r0, r0 +/* 80389054 00385FB4 54 00 20 36 */ slwi r0, r0, 4 +/* 80389058 00385FB8 7C 00 20 10 */ subfc r0, r0, r4 +/* 8038905C 00385FBC 98 1D 01 2C */ stb r0, 0x12c(r29) +/* 80389060 00385FC0 38 9D 01 2C */ addi r4, r29, 0x12c +/* 80389064 00385FC4 38 03 00 0F */ addi r0, r3, 0xf +/* 80389068 00385FC8 88 84 00 00 */ lbz r4, 0(r4) +/* 8038906C 00385FCC 3C 60 08 00 */ lis r3, 0x800 +/* 80389070 00385FD0 7C 04 02 14 */ add r0, r4, r0 +/* 80389074 00385FD4 7C 00 26 70 */ srawi r0, r0, 4 +/* 80389078 00385FD8 7C 00 01 94 */ addze r0, r0 +/* 8038907C 00385FDC 98 1D 01 1E */ stb r0, 0x11e(r29) +/* 80389080 00385FE0 88 1D 01 1E */ lbz r0, 0x11e(r29) +/* 80389084 00385FE4 88 9D 01 1D */ lbz r4, 0x11d(r29) +/* 80389088 00385FE8 50 04 44 2E */ rlwimi r4, r0, 8, 0x10, 0x17 +/* 8038908C 00385FEC B0 9D 00 48 */ sth r4, 0x48(r29) +/* 80389090 00385FF0 80 8D AD C0 */ lwz r4, lbl_805A9980@sda21(r13) +/* 80389094 00385FF4 80 0D AD E8 */ lwz r0, lbl_805A99A8@sda21(r13) +/* 80389098 00385FF8 80 AD AD C4 */ lwz r5, lbl_805A9984@sda21(r13) +/* 8038909C 00385FFC 28 00 00 00 */ cmplwi r0, 0 +/* 803890A0 00386000 7C A0 1B 78 */ or r0, r5, r3 +/* 803890A4 00386004 90 0D AD C4 */ stw r0, lbl_805A9984@sda21(r13) +/* 803890A8 00386008 90 8D AD C0 */ stw r4, lbl_805A9980@sda21(r13) +/* 803890AC 0038600C 41 82 00 1C */ beq lbl_803890C8 +/* 803890B0 00386010 38 7D 00 F0 */ addi r3, r29, 0xf0 +/* 803890B4 00386014 38 9D 01 24 */ addi r4, r29, 0x124 +/* 803890B8 00386018 38 BD 01 28 */ addi r5, r29, 0x128 +/* 803890BC 0038601C 38 DD 01 3C */ addi r6, r29, 0x13c +/* 803890C0 00386020 38 FD 01 40 */ addi r7, r29, 0x140 +/* 803890C4 00386024 4B FF F0 1D */ bl setFbbRegs +lbl_803890C8: +/* 803890C8 00386028 80 1D 01 30 */ lwz r0, 0x130(r29) +/* 803890CC 0038602C 90 01 00 08 */ stw r0, 8(r1) +/* 803890D0 00386030 A0 7F 00 00 */ lhz r3, 0(r31) +/* 803890D4 00386034 A0 9B 00 00 */ lhz r4, 0(r27) +/* 803890D8 00386038 88 BC 00 00 */ lbz r5, 0(r28) +/* 803890DC 0038603C A0 DC 00 02 */ lhz r6, 2(r28) +/* 803890E0 00386040 A0 FC 00 04 */ lhz r7, 4(r28) +/* 803890E4 00386044 A1 1C 00 06 */ lhz r8, 6(r28) +/* 803890E8 00386048 A1 3C 00 08 */ lhz r9, 8(r28) +/* 803890EC 0038604C A1 5C 00 0A */ lhz r10, 0xa(r28) +/* 803890F0 00386050 4B FF F2 C5 */ bl setVerticalRegs +/* 803890F4 00386054 7F C3 F3 78 */ mr r3, r30 +/* 803890F8 00386058 4B FF 85 91 */ bl OSRestoreInterrupts +/* 803890FC 0038605C BA E1 00 2C */ lmw r23, 0x2c(r1) +/* 80389100 00386060 80 01 00 54 */ lwz r0, 0x54(r1) +/* 80389104 00386064 38 21 00 50 */ addi r1, r1, 0x50 +/* 80389108 00386068 7C 08 03 A6 */ mtlr r0 +/* 8038910C 0038606C 4E 80 00 20 */ blr + +.global VIFlush +VIFlush: +/* 80389110 00386070 7C 08 02 A6 */ mflr r0 +/* 80389114 00386074 3C 60 80 54 */ lis r3, lbl_80542040@ha +/* 80389118 00386078 90 01 00 04 */ stw r0, 4(r1) +/* 8038911C 0038607C 94 21 FF E0 */ stwu r1, -0x20(r1) +/* 80389120 00386080 93 E1 00 1C */ stw r31, 0x1c(r1) +/* 80389124 00386084 3B E3 20 40 */ addi r31, r3, lbl_80542040@l +/* 80389128 00386088 93 C1 00 18 */ stw r30, 0x18(r1) +/* 8038912C 0038608C 93 A1 00 14 */ stw r29, 0x14(r1) +/* 80389130 00386090 93 81 00 10 */ stw r28, 0x10(r1) +/* 80389134 00386094 4B FF 85 2D */ bl OSDisableInterrupts +/* 80389138 00386098 80 AD AD C8 */ lwz r5, lbl_805A9988@sda21(r13) +/* 8038913C 0038609C 3B C3 00 00 */ addi r30, r3, 0 +/* 80389140 003860A0 38 00 00 00 */ li r0, 0 +/* 80389144 003860A4 80 8D AD BC */ lwz r4, lbl_805A997C@sda21(r13) +/* 80389148 003860A8 7C A3 23 78 */ or r3, r5, r4 +/* 8038914C 003860AC 90 6D AD C8 */ stw r3, lbl_805A9988@sda21(r13) +/* 80389150 003860B0 90 0D AD BC */ stw r0, lbl_805A997C@sda21(r13) +/* 80389154 003860B4 80 8D AD D0 */ lwz r4, lbl_805A9990@sda21(r13) +/* 80389158 003860B8 80 AD AD D4 */ lwz r5, lbl_805A9994@sda21(r13) +/* 8038915C 003860BC 80 0D AD C0 */ lwz r0, lbl_805A9980@sda21(r13) +/* 80389160 003860C0 80 6D AD C4 */ lwz r3, lbl_805A9984@sda21(r13) +/* 80389164 003860C4 7C 80 03 78 */ or r0, r4, r0 +/* 80389168 003860C8 7C A3 1B 78 */ or r3, r5, r3 +/* 8038916C 003860CC 90 6D AD D4 */ stw r3, lbl_805A9994@sda21(r13) +/* 80389170 003860D0 90 0D AD D0 */ stw r0, lbl_805A9990@sda21(r13) +/* 80389174 003860D4 48 00 00 78 */ b lbl_803891EC +lbl_80389178: +/* 80389178 003860D8 80 6D AD C0 */ lwz r3, lbl_805A9980@sda21(r13) +/* 8038917C 003860DC 38 A0 00 20 */ li r5, 0x20 +/* 80389180 003860E0 83 8D AD C4 */ lwz r28, lbl_805A9984@sda21(r13) +/* 80389184 003860E4 38 9C 00 00 */ addi r4, r28, 0 +/* 80389188 003860E8 48 00 0D 91 */ bl __shr2u +/* 8038918C 003860EC 7C 84 00 34 */ cntlzw r4, r4 +/* 80389190 003860F0 2C 04 00 20 */ cmpwi r4, 0x20 +/* 80389194 003860F4 38 00 FF FF */ li r0, -1 +/* 80389198 003860F8 7F 80 00 38 */ and r0, r28, r0 +/* 8038919C 003860FC 40 80 00 08 */ bge lbl_803891A4 +/* 803891A0 00386100 48 00 00 0C */ b lbl_803891AC +lbl_803891A4: +/* 803891A4 00386104 7C 03 00 34 */ cntlzw r3, r0 +/* 803891A8 00386108 38 83 00 20 */ addi r4, r3, 0x20 +lbl_803891AC: +/* 803891AC 0038610C 54 83 08 3C */ slwi r3, r4, 1 +/* 803891B0 00386110 7C 1F 1A 2E */ lhzx r0, r31, r3 +/* 803891B4 00386114 7C 7F 1A 14 */ add r3, r31, r3 +/* 803891B8 00386118 20 A4 00 3F */ subfic r5, r4, 0x3f +/* 803891BC 0038611C B0 03 00 78 */ sth r0, 0x78(r3) +/* 803891C0 00386120 38 60 00 00 */ li r3, 0 +/* 803891C4 00386124 38 80 00 01 */ li r4, 1 +/* 803891C8 00386128 48 00 0D 2D */ bl __shl2i +/* 803891CC 0038612C 80 0D AD C0 */ lwz r0, lbl_805A9980@sda21(r13) +/* 803891D0 00386130 7C 65 18 F8 */ nor r5, r3, r3 +/* 803891D4 00386134 7C 84 20 F8 */ nor r4, r4, r4 +/* 803891D8 00386138 80 6D AD C4 */ lwz r3, lbl_805A9984@sda21(r13) +/* 803891DC 0038613C 7C 00 28 38 */ and r0, r0, r5 +/* 803891E0 00386140 7C 63 20 38 */ and r3, r3, r4 +/* 803891E4 00386144 90 6D AD C4 */ stw r3, lbl_805A9984@sda21(r13) +/* 803891E8 00386148 90 0D AD C0 */ stw r0, lbl_805A9980@sda21(r13) +lbl_803891EC: +/* 803891EC 0038614C 80 0D AD C0 */ lwz r0, lbl_805A9980@sda21(r13) +/* 803891F0 00386150 38 60 00 00 */ li r3, 0 +/* 803891F4 00386154 80 8D AD C4 */ lwz r4, lbl_805A9984@sda21(r13) +/* 803891F8 00386158 7C 00 1A 78 */ xor r0, r0, r3 +/* 803891FC 0038615C 7C 83 1A 78 */ xor r3, r4, r3 +/* 80389200 00386160 7C 60 03 79 */ or. r0, r3, r0 +/* 80389204 00386164 40 82 FF 74 */ bne lbl_80389178 +/* 80389208 00386168 38 00 00 01 */ li r0, 1 +/* 8038920C 0038616C 90 0D AD A0 */ stw r0, lbl_805A9960@sda21(r13) +/* 80389210 00386170 7F C3 F3 78 */ mr r3, r30 +/* 80389214 00386174 80 1F 01 20 */ lwz r0, 0x120(r31) +/* 80389218 00386178 90 0D AD E0 */ stw r0, lbl_805A99A0@sda21(r13) +/* 8038921C 0038617C 4B FF 84 6D */ bl OSRestoreInterrupts +/* 80389220 00386180 80 01 00 24 */ lwz r0, 0x24(r1) +/* 80389224 00386184 83 E1 00 1C */ lwz r31, 0x1c(r1) +/* 80389228 00386188 83 C1 00 18 */ lwz r30, 0x18(r1) +/* 8038922C 0038618C 83 A1 00 14 */ lwz r29, 0x14(r1) +/* 80389230 00386190 83 81 00 10 */ lwz r28, 0x10(r1) +/* 80389234 00386194 38 21 00 20 */ addi r1, r1, 0x20 +/* 80389238 00386198 7C 08 03 A6 */ mtlr r0 +/* 8038923C 0038619C 4E 80 00 20 */ blr + +.global VISetNextFrameBuffer +VISetNextFrameBuffer: +/* 80389240 003861A0 7C 08 02 A6 */ mflr r0 +/* 80389244 003861A4 3C 80 80 54 */ lis r4, lbl_80542040@ha +/* 80389248 003861A8 90 01 00 04 */ stw r0, 4(r1) +/* 8038924C 003861AC 94 21 FF E8 */ stwu r1, -0x18(r1) +/* 80389250 003861B0 93 E1 00 14 */ stw r31, 0x14(r1) +/* 80389254 003861B4 3B E4 20 40 */ addi r31, r4, lbl_80542040@l +/* 80389258 003861B8 93 C1 00 10 */ stw r30, 0x10(r1) +/* 8038925C 003861BC 3B C3 00 00 */ addi r30, r3, 0 +/* 80389260 003861C0 4B FF 84 01 */ bl OSDisableInterrupts +/* 80389264 003861C4 93 DF 01 20 */ stw r30, 0x120(r31) +/* 80389268 003861C8 38 00 00 01 */ li r0, 1 +/* 8038926C 003861CC 3B C3 00 00 */ addi r30, r3, 0 +/* 80389270 003861D0 90 0D AD E8 */ stw r0, lbl_805A99A8@sda21(r13) +/* 80389274 003861D4 38 7F 00 F0 */ addi r3, r31, 0xf0 +/* 80389278 003861D8 38 9F 01 24 */ addi r4, r31, 0x124 +/* 8038927C 003861DC 38 BF 01 28 */ addi r5, r31, 0x128 +/* 80389280 003861E0 38 DF 01 3C */ addi r6, r31, 0x13c +/* 80389284 003861E4 38 FF 01 40 */ addi r7, r31, 0x140 +/* 80389288 003861E8 4B FF EE 59 */ bl setFbbRegs +/* 8038928C 003861EC 7F C3 F3 78 */ mr r3, r30 +/* 80389290 003861F0 4B FF 83 F9 */ bl OSRestoreInterrupts +/* 80389294 003861F4 80 01 00 1C */ lwz r0, 0x1c(r1) +/* 80389298 003861F8 83 E1 00 14 */ lwz r31, 0x14(r1) +/* 8038929C 003861FC 83 C1 00 10 */ lwz r30, 0x10(r1) +/* 803892A0 00386200 38 21 00 18 */ addi r1, r1, 0x18 +/* 803892A4 00386204 7C 08 03 A6 */ mtlr r0 +/* 803892A8 00386208 4E 80 00 20 */ blr + +.global VISetBlack +VISetBlack: +/* 803892AC 0038620C 7C 08 02 A6 */ mflr r0 +/* 803892B0 00386210 3C 80 80 54 */ lis r4, lbl_80542040@ha +/* 803892B4 00386214 90 01 00 04 */ stw r0, 4(r1) +/* 803892B8 00386218 94 21 FF E0 */ stwu r1, -0x20(r1) +/* 803892BC 0038621C 93 E1 00 1C */ stw r31, 0x1c(r1) +/* 803892C0 00386220 3B E4 20 40 */ addi r31, r4, lbl_80542040@l +/* 803892C4 00386224 93 C1 00 18 */ stw r30, 0x18(r1) +/* 803892C8 00386228 3B C3 00 00 */ addi r30, r3, 0 +/* 803892CC 0038622C 4B FF 83 95 */ bl OSDisableInterrupts +/* 803892D0 00386230 93 DF 01 30 */ stw r30, 0x130(r31) +/* 803892D4 00386234 7C 7E 1B 78 */ mr r30, r3 +/* 803892D8 00386238 81 5F 01 44 */ lwz r10, 0x144(r31) +/* 803892DC 0038623C 80 1F 01 30 */ lwz r0, 0x130(r31) +/* 803892E0 00386240 90 01 00 08 */ stw r0, 8(r1) +/* 803892E4 00386244 A0 7F 00 FA */ lhz r3, 0xfa(r31) +/* 803892E8 00386248 A0 9F 00 F6 */ lhz r4, 0xf6(r31) +/* 803892EC 0038624C 88 AA 00 00 */ lbz r5, 0(r10) +/* 803892F0 00386250 A0 CA 00 02 */ lhz r6, 2(r10) +/* 803892F4 00386254 A0 EA 00 04 */ lhz r7, 4(r10) +/* 803892F8 00386258 A1 0A 00 06 */ lhz r8, 6(r10) +/* 803892FC 0038625C A1 2A 00 08 */ lhz r9, 8(r10) +/* 80389300 00386260 A1 4A 00 0A */ lhz r10, 0xa(r10) +/* 80389304 00386264 4B FF F0 B1 */ bl setVerticalRegs +/* 80389308 00386268 7F C3 F3 78 */ mr r3, r30 +/* 8038930C 0038626C 4B FF 83 7D */ bl OSRestoreInterrupts +/* 80389310 00386270 80 01 00 24 */ lwz r0, 0x24(r1) +/* 80389314 00386274 83 E1 00 1C */ lwz r31, 0x1c(r1) +/* 80389318 00386278 83 C1 00 18 */ lwz r30, 0x18(r1) +/* 8038931C 0038627C 38 21 00 20 */ addi r1, r1, 0x20 +/* 80389320 00386280 7C 08 03 A6 */ mtlr r0 +/* 80389324 00386284 4E 80 00 20 */ blr + +.global VIGetRetraceCount +VIGetRetraceCount: +/* 80389328 00386288 80 6D AD 9C */ lwz r3, lbl_805A995C@sda21(r13) +/* 8038932C 0038628C 4E 80 00 20 */ blr + +.global getCurrentFieldEvenOdd +getCurrentFieldEvenOdd: +/* 80389330 00386290 3C 60 CC 00 */ lis r3, 0xCC002000@ha +/* 80389334 00386294 38 E3 20 00 */ addi r7, r3, 0xCC002000@l +/* 80389338 00386298 A4 07 00 2C */ lhzu r0, 0x2c(r7) +/* 8038933C 0038629C 38 83 20 00 */ addi r4, r3, 0x2000 +/* 80389340 003862A0 54 05 05 7E */ clrlwi r5, r0, 0x15 +lbl_80389344: +/* 80389344 003862A4 A0 07 00 00 */ lhz r0, 0(r7) +/* 80389348 003862A8 7C A6 2B 78 */ mr r6, r5 +/* 8038934C 003862AC A0 64 00 2E */ lhz r3, 0x2e(r4) +/* 80389350 003862B0 54 05 05 7E */ clrlwi r5, r0, 0x15 +/* 80389354 003862B4 7C 06 28 40 */ cmplw r6, r5 +/* 80389358 003862B8 54 63 05 7E */ clrlwi r3, r3, 0x15 +/* 8038935C 003862BC 40 82 FF E8 */ bne lbl_80389344 +/* 80389360 003862C0 80 CD AD D8 */ lwz r6, lbl_805A9998@sda21(r13) +/* 80389364 003862C4 38 05 FF FF */ addi r0, r5, -1 +/* 80389368 003862C8 38 83 FF FF */ addi r4, r3, -1 +/* 8038936C 003862CC A0 66 00 1A */ lhz r3, 0x1a(r6) +/* 80389370 003862D0 54 05 08 3C */ slwi r5, r0, 1 +/* 80389374 003862D4 A0 06 00 18 */ lhz r0, 0x18(r6) +/* 80389378 003862D8 7C 64 1B 96 */ divwu r3, r4, r3 +/* 8038937C 003862DC 7C 65 1A 14 */ add r3, r5, r3 +/* 80389380 003862E0 7C 03 00 40 */ cmplw r3, r0 +/* 80389384 003862E4 40 80 00 0C */ bge lbl_80389390 +/* 80389388 003862E8 38 60 00 01 */ li r3, 1 +/* 8038938C 003862EC 4E 80 00 20 */ blr +lbl_80389390: +/* 80389390 003862F0 38 60 00 00 */ li r3, 0 +/* 80389394 003862F4 4E 80 00 20 */ blr + +.global VIGetNextField +VIGetNextField: +/* 80389398 003862F8 7C 08 02 A6 */ mflr r0 +/* 8038939C 003862FC 90 01 00 04 */ stw r0, 4(r1) +/* 803893A0 00386300 94 21 FF E0 */ stwu r1, -0x20(r1) +/* 803893A4 00386304 93 E1 00 1C */ stw r31, 0x1c(r1) +/* 803893A8 00386308 4B FF 82 B9 */ bl OSDisableInterrupts +/* 803893AC 0038630C 3C 80 CC 00 */ lis r4, 0xCC002000@ha +/* 803893B0 00386310 39 04 20 00 */ addi r8, r4, 0xCC002000@l +/* 803893B4 00386314 A4 08 00 2C */ lhzu r0, 0x2c(r8) +/* 803893B8 00386318 38 A4 20 00 */ addi r5, r4, 0x2000 +/* 803893BC 0038631C 54 06 05 7E */ clrlwi r6, r0, 0x15 +lbl_803893C0: +/* 803893C0 00386320 A0 08 00 00 */ lhz r0, 0(r8) +/* 803893C4 00386324 7C C7 33 78 */ mr r7, r6 +/* 803893C8 00386328 A0 85 00 2E */ lhz r4, 0x2e(r5) +/* 803893CC 0038632C 54 06 05 7E */ clrlwi r6, r0, 0x15 +/* 803893D0 00386330 7C 07 30 40 */ cmplw r7, r6 +/* 803893D4 00386334 54 84 05 7E */ clrlwi r4, r4, 0x15 +/* 803893D8 00386338 40 82 FF E8 */ bne lbl_803893C0 +/* 803893DC 0038633C 80 ED AD D8 */ lwz r7, lbl_805A9998@sda21(r13) +/* 803893E0 00386340 38 06 FF FF */ addi r0, r6, -1 +/* 803893E4 00386344 38 A4 FF FF */ addi r5, r4, -1 +/* 803893E8 00386348 A0 87 00 1A */ lhz r4, 0x1a(r7) +/* 803893EC 0038634C 54 06 08 3C */ slwi r6, r0, 1 +/* 803893F0 00386350 A0 07 00 18 */ lhz r0, 0x18(r7) +/* 803893F4 00386354 7C 85 23 96 */ divwu r4, r5, r4 +/* 803893F8 00386358 7C 86 22 14 */ add r4, r6, r4 +/* 803893FC 0038635C 7C 04 00 40 */ cmplw r4, r0 +/* 80389400 00386360 40 80 00 0C */ bge lbl_8038940C +/* 80389404 00386364 3B E0 00 01 */ li r31, 1 +/* 80389408 00386368 48 00 00 08 */ b lbl_80389410 +lbl_8038940C: +/* 8038940C 0038636C 3B E0 00 00 */ li r31, 0 +lbl_80389410: +/* 80389410 00386370 4B FF 82 79 */ bl OSRestoreInterrupts +/* 80389414 00386374 3C 60 80 54 */ lis r3, lbl_80542130@ha +/* 80389418 00386378 38 63 21 30 */ addi r3, r3, lbl_80542130@l +/* 8038941C 0038637C A0 03 00 0A */ lhz r0, 0xa(r3) +/* 80389420 00386380 6B E3 00 01 */ xori r3, r31, 1 +/* 80389424 00386384 54 00 07 FE */ clrlwi r0, r0, 0x1f +/* 80389428 00386388 7C 63 02 78 */ xor r3, r3, r0 +/* 8038942C 0038638C 80 01 00 24 */ lwz r0, 0x24(r1) +/* 80389430 00386390 83 E1 00 1C */ lwz r31, 0x1c(r1) +/* 80389434 00386394 38 21 00 20 */ addi r1, r1, 0x20 +/* 80389438 00386398 7C 08 03 A6 */ mtlr r0 +/* 8038943C 0038639C 4E 80 00 20 */ blr + +.global VIGetCurrentLine +VIGetCurrentLine: +/* 80389440 003863A0 7C 08 02 A6 */ mflr r0 +/* 80389444 003863A4 90 01 00 04 */ stw r0, 4(r1) +/* 80389448 003863A8 94 21 FF F0 */ stwu r1, -0x10(r1) +/* 8038944C 003863AC 93 E1 00 0C */ stw r31, 0xc(r1) +/* 80389450 003863B0 93 C1 00 08 */ stw r30, 8(r1) +/* 80389454 003863B4 83 ED AD D8 */ lwz r31, lbl_805A9998@sda21(r13) +/* 80389458 003863B8 4B FF 82 09 */ bl OSDisableInterrupts +/* 8038945C 003863BC 3C 80 CC 00 */ lis r4, 0xCC002000@ha +/* 80389460 003863C0 39 04 20 00 */ addi r8, r4, 0xCC002000@l +/* 80389464 003863C4 A4 08 00 2C */ lhzu r0, 0x2c(r8) +/* 80389468 003863C8 38 A4 20 00 */ addi r5, r4, 0x2000 +/* 8038946C 003863CC 54 06 05 7E */ clrlwi r6, r0, 0x15 +lbl_80389470: +/* 80389470 003863D0 A0 08 00 00 */ lhz r0, 0(r8) +/* 80389474 003863D4 7C C7 33 78 */ mr r7, r6 +/* 80389478 003863D8 A0 85 00 2E */ lhz r4, 0x2e(r5) +/* 8038947C 003863DC 54 06 05 7E */ clrlwi r6, r0, 0x15 +/* 80389480 003863E0 7C 07 30 40 */ cmplw r7, r6 +/* 80389484 003863E4 54 87 05 7E */ clrlwi r7, r4, 0x15 +/* 80389488 003863E8 40 82 FF E8 */ bne lbl_80389470 +/* 8038948C 003863EC 80 8D AD D8 */ lwz r4, lbl_805A9998@sda21(r13) +/* 80389490 003863F0 38 A7 FF FF */ addi r5, r7, -1 +/* 80389494 003863F4 38 C6 FF FF */ addi r6, r6, -1 +/* 80389498 003863F8 A0 04 00 1A */ lhz r0, 0x1a(r4) +/* 8038949C 003863FC 54 C4 08 3C */ slwi r4, r6, 1 +/* 803894A0 00386400 7C 05 03 96 */ divwu r0, r5, r0 +/* 803894A4 00386404 7F C4 02 14 */ add r30, r4, r0 +/* 803894A8 00386408 4B FF 81 E1 */ bl OSRestoreInterrupts +/* 803894AC 0038640C A0 1F 00 18 */ lhz r0, 0x18(r31) +/* 803894B0 00386410 7C 1E 00 40 */ cmplw r30, r0 +/* 803894B4 00386414 41 80 00 08 */ blt lbl_803894BC +/* 803894B8 00386418 7F C0 F0 50 */ subf r30, r0, r30 +lbl_803894BC: +/* 803894BC 0038641C 57 C3 F8 7E */ srwi r3, r30, 1 +/* 803894C0 00386420 80 01 00 14 */ lwz r0, 0x14(r1) +/* 803894C4 00386424 83 E1 00 0C */ lwz r31, 0xc(r1) +/* 803894C8 00386428 83 C1 00 08 */ lwz r30, 8(r1) +/* 803894CC 0038642C 38 21 00 10 */ addi r1, r1, 0x10 +/* 803894D0 00386430 7C 08 03 A6 */ mtlr r0 +/* 803894D4 00386434 4E 80 00 20 */ blr + +.global VIGetTvFormat +VIGetTvFormat: +/* 803894D8 00386438 7C 08 02 A6 */ mflr r0 +/* 803894DC 0038643C 90 01 00 04 */ stw r0, 4(r1) +/* 803894E0 00386440 94 21 FF F0 */ stwu r1, -0x10(r1) +/* 803894E4 00386444 93 E1 00 0C */ stw r31, 0xc(r1) +/* 803894E8 00386448 4B FF 81 79 */ bl OSDisableInterrupts +/* 803894EC 0038644C 80 AD AD DC */ lwz r5, lbl_805A999C@sda21(r13) +/* 803894F0 00386450 28 05 00 06 */ cmplwi r5, 6 +/* 803894F4 00386454 41 81 00 30 */ bgt lbl_80389524 +/* 803894F8 00386458 3C 80 80 3F */ lis r4, lbl_803F275C@ha +/* 803894FC 0038645C 38 84 27 5C */ addi r4, r4, lbl_803F275C@l +/* 80389500 00386460 54 A0 10 3A */ slwi r0, r5, 2 +/* 80389504 00386464 7C 04 00 2E */ lwzx r0, r4, r0 +/* 80389508 00386468 7C 09 03 A6 */ mtctr r0 +/* 8038950C 0038646C 4E 80 04 20 */ bctr +/* 80389510 00386470 3B E0 00 00 */ li r31, 0 +/* 80389514 00386474 48 00 00 10 */ b lbl_80389524 +/* 80389518 00386478 3B E0 00 01 */ li r31, 1 +/* 8038951C 0038647C 48 00 00 08 */ b lbl_80389524 +/* 80389520 00386480 7C BF 2B 78 */ mr r31, r5 +lbl_80389524: +/* 80389524 00386484 4B FF 81 65 */ bl OSRestoreInterrupts +/* 80389528 00386488 7F E3 FB 78 */ mr r3, r31 +/* 8038952C 0038648C 80 01 00 14 */ lwz r0, 0x14(r1) +/* 80389530 00386490 83 E1 00 0C */ lwz r31, 0xc(r1) +/* 80389534 00386494 38 21 00 10 */ addi r1, r1, 0x10 +/* 80389538 00386498 7C 08 03 A6 */ mtlr r0 +/* 8038953C 0038649C 4E 80 00 20 */ blr + +.global VIGetDTVStatus +VIGetDTVStatus: +/* 80389540 003864A0 7C 08 02 A6 */ mflr r0 +/* 80389544 003864A4 90 01 00 04 */ stw r0, 4(r1) +/* 80389548 003864A8 94 21 FF F0 */ stwu r1, -0x10(r1) +/* 8038954C 003864AC 93 E1 00 0C */ stw r31, 0xc(r1) +/* 80389550 003864B0 4B FF 81 11 */ bl OSDisableInterrupts +/* 80389554 003864B4 3C 80 CC 00 */ lis r4, 0xCC00206E@ha +/* 80389558 003864B8 A0 04 20 6E */ lhz r0, 0xCC00206E@l(r4) +/* 8038955C 003864BC 54 1F 07 BE */ clrlwi r31, r0, 0x1e +/* 80389560 003864C0 4B FF 81 29 */ bl OSRestoreInterrupts +/* 80389564 003864C4 57 E3 07 FE */ clrlwi r3, r31, 0x1f +/* 80389568 003864C8 80 01 00 14 */ lwz r0, 0x14(r1) +/* 8038956C 003864CC 83 E1 00 0C */ lwz r31, 0xc(r1) +/* 80389570 003864D0 38 21 00 10 */ addi r1, r1, 0x10 +/* 80389574 003864D4 7C 08 03 A6 */ mtlr r0 +/* 80389578 003864D8 4E 80 00 20 */ blr diff --git a/asm/Kyoto_CWD/main.s b/asm/Kyoto_CWD/main.s index 01cfbcac..58fc4696 100644 --- a/asm/Kyoto_CWD/main.s +++ b/asm/Kyoto_CWD/main.s @@ -964,8 +964,8 @@ lbl_805A9D78: .section .text, "ax" -.global nullsub_1 -nullsub_1: +.global EnableMetroTRKInterrupts +EnableMetroTRKInterrupts: /* 80003640 000005A0 4E 80 00 20 */ blr .global InitMetroTRK @@ -6637,7 +6637,7 @@ main: /* 8000851C 0000547C 93 A1 00 14 */ stw r29, 0x14(r1) /* 80008520 00005480 7C 7D 1B 78 */ mr r29, r3 /* 80008524 00005484 38 60 00 01 */ li r3, 1 -/* 80008528 00005488 48 36 C8 A5 */ bl sub_80374dcc +/* 80008528 00005488 48 36 C8 A5 */ bl DVDSetAutoFatalMessaging /* 8000852C 0000548C 48 2C E3 D1 */ bl SetErrorHandlers /* 80008530 00005490 3C 60 80 45 */ lis r3, 0x8045 /* 80008534 00005494 37 E3 75 60 */ addic. r31, r3, 0x7560 diff --git a/asm/Runtime/PPCEABI/H/CPlusLibPPC.s b/asm/Runtime/PPCEABI/H/CPlusLibPPC.s new file mode 100644 index 00000000..777758b9 --- /dev/null +++ b/asm/Runtime/PPCEABI/H/CPlusLibPPC.s @@ -0,0 +1,19 @@ +.include "macros.inc" + +.section .text, "ax" + +.global __copy +__copy: +/* 803896A4 00386604 28 03 00 00 */ cmplwi r3, 0 +/* 803896A8 00386608 4D 82 00 20 */ beqlr +/* 803896AC 0038660C 28 05 00 00 */ cmplwi r5, 0 +/* 803896B0 00386610 4D 82 00 20 */ beqlr +/* 803896B4 00386614 7C 66 1B 78 */ mr r6, r3 +lbl_803896B8: +/* 803896B8 00386618 88 04 00 00 */ lbz r0, 0(r4) +/* 803896BC 0038661C 34 A5 FF FF */ addic. r5, r5, -1 +/* 803896C0 00386620 38 84 00 01 */ addi r4, r4, 1 +/* 803896C4 00386624 98 06 00 00 */ stb r0, 0(r6) +/* 803896C8 00386628 38 C6 00 01 */ addi r6, r6, 1 +/* 803896CC 0038662C 40 82 FF EC */ bne lbl_803896B8 +/* 803896D0 00386630 4E 80 00 20 */ blr diff --git a/asm/Runtime/PPCEABI/H/FILE_POS.s b/asm/Runtime/PPCEABI/H/FILE_POS.s new file mode 100644 index 00000000..727c6093 --- /dev/null +++ b/asm/Runtime/PPCEABI/H/FILE_POS.s @@ -0,0 +1,212 @@ +.include "macros.inc" + +.section .text, "ax" + +.global fseek +fseek: +/* 8038D46C 0038A3CC 94 21 FF F0 */ stwu r1, -0x10(r1) +/* 8038D470 0038A3D0 7C 08 02 A6 */ mflr r0 +/* 8038D474 0038A3D4 90 01 00 14 */ stw r0, 0x14(r1) +/* 8038D478 0038A3D8 48 00 00 15 */ bl _fseek +/* 8038D47C 0038A3DC 80 01 00 14 */ lwz r0, 0x14(r1) +/* 8038D480 0038A3E0 7C 08 03 A6 */ mtlr r0 +/* 8038D484 0038A3E4 38 21 00 10 */ addi r1, r1, 0x10 +/* 8038D488 0038A3E8 4E 80 00 20 */ blr + +.global _fseek +_fseek: +/* 8038D48C 0038A3EC 94 21 FF E0 */ stwu r1, -0x20(r1) +/* 8038D490 0038A3F0 7C 08 02 A6 */ mflr r0 +/* 8038D494 0038A3F4 90 01 00 24 */ stw r0, 0x24(r1) +/* 8038D498 0038A3F8 93 E1 00 1C */ stw r31, 0x1c(r1) +/* 8038D49C 0038A3FC 7C BF 2B 78 */ mr r31, r5 +/* 8038D4A0 0038A400 93 C1 00 18 */ stw r30, 0x18(r1) +/* 8038D4A4 0038A404 7C 7E 1B 78 */ mr r30, r3 +/* 8038D4A8 0038A408 90 81 00 08 */ stw r4, 8(r1) +/* 8038D4AC 0038A40C A0 03 00 04 */ lhz r0, 4(r3) +/* 8038D4B0 0038A410 54 00 D7 7E */ rlwinm r0, r0, 0x1a, 0x1d, 0x1f +/* 8038D4B4 0038A414 28 00 00 01 */ cmplwi r0, 1 +/* 8038D4B8 0038A418 40 82 00 10 */ bne lbl_8038D4C8 +/* 8038D4BC 0038A41C 88 1E 00 0A */ lbz r0, 0xa(r30) +/* 8038D4C0 0038A420 28 00 00 00 */ cmplwi r0, 0 +/* 8038D4C4 0038A424 41 82 00 14 */ beq lbl_8038D4D8 +lbl_8038D4C8: +/* 8038D4C8 0038A428 38 00 00 28 */ li r0, 0x28 +/* 8038D4CC 0038A42C 38 60 FF FF */ li r3, -1 +/* 8038D4D0 0038A430 90 0D AE 10 */ stw r0, lbl_805A99D0@sda21(r13) +/* 8038D4D4 0038A434 48 00 01 DC */ b lbl_8038D6B0 +lbl_8038D4D8: +/* 8038D4D8 0038A438 88 1E 00 08 */ lbz r0, 8(r30) +/* 8038D4DC 0038A43C 54 00 DF 7E */ rlwinm r0, r0, 0x1b, 0x1d, 0x1f +/* 8038D4E0 0038A440 28 00 00 01 */ cmplwi r0, 1 +/* 8038D4E4 0038A444 40 82 00 34 */ bne lbl_8038D518 +/* 8038D4E8 0038A448 38 80 00 00 */ li r4, 0 +/* 8038D4EC 0038A44C 4B FF F9 41 */ bl __flush_buffer +/* 8038D4F0 0038A450 2C 03 00 00 */ cmpwi r3, 0 +/* 8038D4F4 0038A454 41 82 00 24 */ beq lbl_8038D518 +/* 8038D4F8 0038A458 38 00 00 01 */ li r0, 1 +/* 8038D4FC 0038A45C 38 80 00 00 */ li r4, 0 +/* 8038D500 0038A460 98 1E 00 0A */ stb r0, 0xa(r30) +/* 8038D504 0038A464 38 00 00 28 */ li r0, 0x28 +/* 8038D508 0038A468 38 60 FF FF */ li r3, -1 +/* 8038D50C 0038A46C 90 9E 00 28 */ stw r4, 0x28(r30) +/* 8038D510 0038A470 90 0D AE 10 */ stw r0, lbl_805A99D0@sda21(r13) +/* 8038D514 0038A474 48 00 01 9C */ b lbl_8038D6B0 +lbl_8038D518: +/* 8038D518 0038A478 2C 1F 00 01 */ cmpwi r31, 1 +/* 8038D51C 0038A47C 40 82 00 80 */ bne lbl_8038D59C +/* 8038D520 0038A480 A0 1E 00 04 */ lhz r0, 4(r30) +/* 8038D524 0038A484 3B E0 00 00 */ li r31, 0 +/* 8038D528 0038A488 54 00 D7 7E */ rlwinm r0, r0, 0x1a, 0x1d, 0x1f +/* 8038D52C 0038A48C 28 00 00 01 */ cmplwi r0, 1 +/* 8038D530 0038A490 41 82 00 0C */ beq lbl_8038D53C +/* 8038D534 0038A494 28 00 00 02 */ cmplwi r0, 2 +/* 8038D538 0038A498 40 82 00 10 */ bne lbl_8038D548 +lbl_8038D53C: +/* 8038D53C 0038A49C 88 1E 00 0A */ lbz r0, 0xa(r30) +/* 8038D540 0038A4A0 28 00 00 00 */ cmplwi r0, 0 +/* 8038D544 0038A4A4 41 82 00 14 */ beq lbl_8038D558 +lbl_8038D548: +/* 8038D548 0038A4A8 38 00 00 28 */ li r0, 0x28 +/* 8038D54C 0038A4AC 38 60 FF FF */ li r3, -1 +/* 8038D550 0038A4B0 90 0D AE 10 */ stw r0, lbl_805A99D0@sda21(r13) +/* 8038D554 0038A4B4 48 00 00 3C */ b lbl_8038D590 +lbl_8038D558: +/* 8038D558 0038A4B8 88 1E 00 08 */ lbz r0, 8(r30) +/* 8038D55C 0038A4BC 54 05 DF 7F */ rlwinm. r5, r0, 0x1b, 0x1d, 0x1f +/* 8038D560 0038A4C0 40 82 00 0C */ bne lbl_8038D56C +/* 8038D564 0038A4C4 80 7E 00 18 */ lwz r3, 0x18(r30) +/* 8038D568 0038A4C8 48 00 00 28 */ b lbl_8038D590 +lbl_8038D56C: +/* 8038D56C 0038A4CC 80 7E 00 1C */ lwz r3, 0x1c(r30) +/* 8038D570 0038A4D0 28 05 00 03 */ cmplwi r5, 3 +/* 8038D574 0038A4D4 80 1E 00 24 */ lwz r0, 0x24(r30) +/* 8038D578 0038A4D8 80 9E 00 34 */ lwz r4, 0x34(r30) +/* 8038D57C 0038A4DC 7C 03 00 50 */ subf r0, r3, r0 +/* 8038D580 0038A4E0 7C 64 02 14 */ add r3, r4, r0 +/* 8038D584 0038A4E4 41 80 00 0C */ blt lbl_8038D590 +/* 8038D588 0038A4E8 38 05 FF FE */ addi r0, r5, -2 +/* 8038D58C 0038A4EC 7C 60 18 50 */ subf r3, r0, r3 +lbl_8038D590: +/* 8038D590 0038A4F0 80 01 00 08 */ lwz r0, 8(r1) +/* 8038D594 0038A4F4 7C 00 1A 14 */ add r0, r0, r3 +/* 8038D598 0038A4F8 90 01 00 08 */ stw r0, 8(r1) +lbl_8038D59C: +/* 8038D59C 0038A4FC 2C 1F 00 02 */ cmpwi r31, 2 +/* 8038D5A0 0038A500 41 82 00 90 */ beq lbl_8038D630 +/* 8038D5A4 0038A504 88 1E 00 04 */ lbz r0, 4(r30) +/* 8038D5A8 0038A508 54 00 EF 7E */ rlwinm r0, r0, 0x1d, 0x1d, 0x1f +/* 8038D5AC 0038A50C 28 00 00 03 */ cmplwi r0, 3 +/* 8038D5B0 0038A510 41 82 00 80 */ beq lbl_8038D630 +/* 8038D5B4 0038A514 88 1E 00 08 */ lbz r0, 8(r30) +/* 8038D5B8 0038A518 54 00 DF 7E */ rlwinm r0, r0, 0x1b, 0x1d, 0x1f +/* 8038D5BC 0038A51C 28 00 00 02 */ cmplwi r0, 2 +/* 8038D5C0 0038A520 41 82 00 0C */ beq lbl_8038D5CC +/* 8038D5C4 0038A524 28 00 00 03 */ cmplwi r0, 3 +/* 8038D5C8 0038A528 40 82 00 68 */ bne lbl_8038D630 +lbl_8038D5CC: +/* 8038D5CC 0038A52C 80 61 00 08 */ lwz r3, 8(r1) +/* 8038D5D0 0038A530 80 1E 00 18 */ lwz r0, 0x18(r30) +/* 8038D5D4 0038A534 7C 03 00 40 */ cmplw r3, r0 +/* 8038D5D8 0038A538 40 80 00 10 */ bge lbl_8038D5E8 +/* 8038D5DC 0038A53C 80 1E 00 34 */ lwz r0, 0x34(r30) +/* 8038D5E0 0038A540 7C 03 00 40 */ cmplw r3, r0 +/* 8038D5E4 0038A544 40 80 00 18 */ bge lbl_8038D5FC +lbl_8038D5E8: +/* 8038D5E8 0038A548 88 1E 00 08 */ lbz r0, 8(r30) +/* 8038D5EC 0038A54C 38 60 00 00 */ li r3, 0 +/* 8038D5F0 0038A550 50 60 2E 34 */ rlwimi r0, r3, 5, 0x18, 0x1a +/* 8038D5F4 0038A554 98 1E 00 08 */ stb r0, 8(r30) +/* 8038D5F8 0038A558 48 00 00 48 */ b lbl_8038D640 +lbl_8038D5FC: +/* 8038D5FC 0038A55C 80 9E 00 1C */ lwz r4, 0x1c(r30) +/* 8038D600 0038A560 7C 00 18 50 */ subf r0, r0, r3 +/* 8038D604 0038A564 38 60 00 02 */ li r3, 2 +/* 8038D608 0038A568 7C 04 02 14 */ add r0, r4, r0 +/* 8038D60C 0038A56C 90 1E 00 24 */ stw r0, 0x24(r30) +/* 8038D610 0038A570 80 81 00 08 */ lwz r4, 8(r1) +/* 8038D614 0038A574 80 1E 00 18 */ lwz r0, 0x18(r30) +/* 8038D618 0038A578 7C 04 00 50 */ subf r0, r4, r0 +/* 8038D61C 0038A57C 90 1E 00 28 */ stw r0, 0x28(r30) +/* 8038D620 0038A580 88 1E 00 08 */ lbz r0, 8(r30) +/* 8038D624 0038A584 50 60 2E 34 */ rlwimi r0, r3, 5, 0x18, 0x1a +/* 8038D628 0038A588 98 1E 00 08 */ stb r0, 8(r30) +/* 8038D62C 0038A58C 48 00 00 14 */ b lbl_8038D640 +lbl_8038D630: +/* 8038D630 0038A590 88 1E 00 08 */ lbz r0, 8(r30) +/* 8038D634 0038A594 38 60 00 00 */ li r3, 0 +/* 8038D638 0038A598 50 60 2E 34 */ rlwimi r0, r3, 5, 0x18, 0x1a +/* 8038D63C 0038A59C 98 1E 00 08 */ stb r0, 8(r30) +lbl_8038D640: +/* 8038D640 0038A5A0 88 1E 00 08 */ lbz r0, 8(r30) +/* 8038D644 0038A5A4 54 00 DF 7F */ rlwinm. r0, r0, 0x1b, 0x1d, 0x1f +/* 8038D648 0038A5A8 40 82 00 64 */ bne lbl_8038D6AC +/* 8038D64C 0038A5AC 81 9E 00 38 */ lwz r12, 0x38(r30) +/* 8038D650 0038A5B0 28 0C 00 00 */ cmplwi r12, 0 +/* 8038D654 0038A5B4 41 82 00 44 */ beq lbl_8038D698 +/* 8038D658 0038A5B8 7F E5 FB 78 */ mr r5, r31 +/* 8038D65C 0038A5BC 38 81 00 08 */ addi r4, r1, 8 +/* 8038D660 0038A5C0 80 7E 00 00 */ lwz r3, 0(r30) +/* 8038D664 0038A5C4 80 DE 00 48 */ lwz r6, 0x48(r30) +/* 8038D668 0038A5C8 7D 89 03 A6 */ mtctr r12 +/* 8038D66C 0038A5CC 4E 80 04 21 */ bctrl +/* 8038D670 0038A5D0 2C 03 00 00 */ cmpwi r3, 0 +/* 8038D674 0038A5D4 41 82 00 24 */ beq lbl_8038D698 +/* 8038D678 0038A5D8 38 00 00 01 */ li r0, 1 +/* 8038D67C 0038A5DC 38 80 00 00 */ li r4, 0 +/* 8038D680 0038A5E0 98 1E 00 0A */ stb r0, 0xa(r30) +/* 8038D684 0038A5E4 38 00 00 28 */ li r0, 0x28 +/* 8038D688 0038A5E8 38 60 FF FF */ li r3, -1 +/* 8038D68C 0038A5EC 90 9E 00 28 */ stw r4, 0x28(r30) +/* 8038D690 0038A5F0 90 0D AE 10 */ stw r0, lbl_805A99D0@sda21(r13) +/* 8038D694 0038A5F4 48 00 00 1C */ b lbl_8038D6B0 +lbl_8038D698: +/* 8038D698 0038A5F8 38 60 00 00 */ li r3, 0 +/* 8038D69C 0038A5FC 98 7E 00 09 */ stb r3, 9(r30) +/* 8038D6A0 0038A600 80 01 00 08 */ lwz r0, 8(r1) +/* 8038D6A4 0038A604 90 1E 00 18 */ stw r0, 0x18(r30) +/* 8038D6A8 0038A608 90 7E 00 28 */ stw r3, 0x28(r30) +lbl_8038D6AC: +/* 8038D6AC 0038A60C 38 60 00 00 */ li r3, 0 +lbl_8038D6B0: +/* 8038D6B0 0038A610 80 01 00 24 */ lwz r0, 0x24(r1) +/* 8038D6B4 0038A614 83 E1 00 1C */ lwz r31, 0x1c(r1) +/* 8038D6B8 0038A618 83 C1 00 18 */ lwz r30, 0x18(r1) +/* 8038D6BC 0038A61C 7C 08 03 A6 */ mtlr r0 +/* 8038D6C0 0038A620 38 21 00 20 */ addi r1, r1, 0x20 +/* 8038D6C4 0038A624 4E 80 00 20 */ blr + +.global ftell +ftell: +/* 8038D6C8 0038A628 A0 03 00 04 */ lhz r0, 4(r3) +/* 8038D6CC 0038A62C 54 00 D7 7E */ rlwinm r0, r0, 0x1a, 0x1d, 0x1f +/* 8038D6D0 0038A630 28 00 00 01 */ cmplwi r0, 1 +/* 8038D6D4 0038A634 41 82 00 0C */ beq lbl_8038D6E0 +/* 8038D6D8 0038A638 28 00 00 02 */ cmplwi r0, 2 +/* 8038D6DC 0038A63C 40 82 00 10 */ bne lbl_8038D6EC +lbl_8038D6E0: +/* 8038D6E0 0038A640 88 03 00 0A */ lbz r0, 0xa(r3) +/* 8038D6E4 0038A644 28 00 00 00 */ cmplwi r0, 0 +/* 8038D6E8 0038A648 41 82 00 14 */ beq lbl_8038D6FC +lbl_8038D6EC: +/* 8038D6EC 0038A64C 38 00 00 28 */ li r0, 0x28 +/* 8038D6F0 0038A650 38 60 FF FF */ li r3, -1 +/* 8038D6F4 0038A654 90 0D AE 10 */ stw r0, lbl_805A99D0@sda21(r13) +/* 8038D6F8 0038A658 4E 80 00 20 */ blr +lbl_8038D6FC: +/* 8038D6FC 0038A65C 88 03 00 08 */ lbz r0, 8(r3) +/* 8038D700 0038A660 54 05 DF 7F */ rlwinm. r5, r0, 0x1b, 0x1d, 0x1f +/* 8038D704 0038A664 40 82 00 0C */ bne lbl_8038D710 +/* 8038D708 0038A668 80 63 00 18 */ lwz r3, 0x18(r3) +/* 8038D70C 0038A66C 4E 80 00 20 */ blr +lbl_8038D710: +/* 8038D710 0038A670 80 83 00 1C */ lwz r4, 0x1c(r3) +/* 8038D714 0038A674 28 05 00 03 */ cmplwi r5, 3 +/* 8038D718 0038A678 80 03 00 24 */ lwz r0, 0x24(r3) +/* 8038D71C 0038A67C 80 63 00 34 */ lwz r3, 0x34(r3) +/* 8038D720 0038A680 7C 04 00 50 */ subf r0, r4, r0 +/* 8038D724 0038A684 7C 63 02 14 */ add r3, r3, r0 +/* 8038D728 0038A688 4D 80 00 20 */ bltlr +/* 8038D72C 0038A68C 38 05 FF FE */ addi r0, r5, -2 +/* 8038D730 0038A690 7C 60 18 50 */ subf r3, r0, r3 +/* 8038D734 0038A694 4E 80 00 20 */ blr diff --git a/asm/Runtime/PPCEABI/H/Gecko_ExceptionPPC.s b/asm/Runtime/PPCEABI/H/Gecko_ExceptionPPC.s new file mode 100644 index 00000000..3716292a --- /dev/null +++ b/asm/Runtime/PPCEABI/H/Gecko_ExceptionPPC.s @@ -0,0 +1,36 @@ +.include "macros.inc" + +.section .text, "ax" + +.global __unregister_fragment +__unregister_fragment: +/* 8038A160 003870C0 2C 03 00 00 */ cmpwi r3, 0 +/* 8038A164 003870C4 4D 80 00 20 */ bltlr +/* 8038A168 003870C8 2C 03 00 01 */ cmpwi r3, 1 +/* 8038A16C 003870CC 4C 80 00 20 */ bgelr +/* 8038A170 003870D0 1C 83 00 0C */ mulli r4, r3, 0xc +/* 8038A174 003870D4 3C 60 80 54 */ lis r3, lbl_80542188@ha +/* 8038A178 003870D8 38 00 00 00 */ li r0, 0 +/* 8038A17C 003870DC 38 63 21 88 */ addi r3, r3, lbl_80542188@l +/* 8038A180 003870E0 7C 63 22 14 */ add r3, r3, r4 +/* 8038A184 003870E4 90 03 00 00 */ stw r0, 0(r3) +/* 8038A188 003870E8 90 03 00 04 */ stw r0, 4(r3) +/* 8038A18C 003870EC 90 03 00 08 */ stw r0, 8(r3) +/* 8038A190 003870F0 4E 80 00 20 */ blr + +.global __register_fragment +__register_fragment: +/* 8038A194 003870F4 3C A0 80 54 */ lis r5, lbl_80542188@ha +/* 8038A198 003870F8 38 A5 21 88 */ addi r5, r5, lbl_80542188@l +/* 8038A19C 003870FC 80 05 00 08 */ lwz r0, 8(r5) +/* 8038A1A0 00387100 2C 00 00 00 */ cmpwi r0, 0 +/* 8038A1A4 00387104 40 82 00 1C */ bne lbl_8038A1C0 +/* 8038A1A8 00387108 90 65 00 00 */ stw r3, 0(r5) +/* 8038A1AC 0038710C 38 00 00 01 */ li r0, 1 +/* 8038A1B0 00387110 38 60 00 00 */ li r3, 0 +/* 8038A1B4 00387114 90 85 00 04 */ stw r4, 4(r5) +/* 8038A1B8 00387118 90 05 00 08 */ stw r0, 8(r5) +/* 8038A1BC 0038711C 4E 80 00 20 */ blr +lbl_8038A1C0: +/* 8038A1C0 00387120 38 60 FF FF */ li r3, -1 +/* 8038A1C4 00387124 4E 80 00 20 */ blr diff --git a/asm/Runtime/PPCEABI/H/NMWException.s b/asm/Runtime/PPCEABI/H/NMWException.s new file mode 100644 index 00000000..9e10555e --- /dev/null +++ b/asm/Runtime/PPCEABI/H/NMWException.s @@ -0,0 +1,162 @@ +.include "macros.inc" + +.section .text, "ax" + +.global __destroy_arr +__destroy_arr: +/* 803896D4 00386634 94 21 FF E0 */ stwu r1, -0x20(r1) +/* 803896D8 00386638 7C 08 02 A6 */ mflr r0 +/* 803896DC 0038663C 90 01 00 24 */ stw r0, 0x24(r1) +/* 803896E0 00386640 93 E1 00 1C */ stw r31, 0x1c(r1) +/* 803896E4 00386644 93 C1 00 18 */ stw r30, 0x18(r1) +/* 803896E8 00386648 7C DE 33 78 */ mr r30, r6 +/* 803896EC 0038664C 93 A1 00 14 */ stw r29, 0x14(r1) +/* 803896F0 00386650 7C BD 2B 78 */ mr r29, r5 +/* 803896F4 00386654 7C 1D F1 D6 */ mullw r0, r29, r30 +/* 803896F8 00386658 93 81 00 10 */ stw r28, 0x10(r1) +/* 803896FC 0038665C 7C 9C 23 78 */ mr r28, r4 +/* 80389700 00386660 7F E3 02 14 */ add r31, r3, r0 +/* 80389704 00386664 48 00 00 20 */ b lbl_80389724 +lbl_80389708: +/* 80389708 00386668 7F FD F8 50 */ subf r31, r29, r31 +/* 8038970C 0038666C 7F 8C E3 78 */ mr r12, r28 +/* 80389710 00386670 7F E3 FB 78 */ mr r3, r31 +/* 80389714 00386674 38 80 FF FF */ li r4, -1 +/* 80389718 00386678 7D 89 03 A6 */ mtctr r12 +/* 8038971C 0038667C 4E 80 04 21 */ bctrl +/* 80389720 00386680 3B DE FF FF */ addi r30, r30, -1 +lbl_80389724: +/* 80389724 00386684 28 1E 00 00 */ cmplwi r30, 0 +/* 80389728 00386688 40 82 FF E0 */ bne lbl_80389708 +/* 8038972C 0038668C 80 01 00 24 */ lwz r0, 0x24(r1) +/* 80389730 00386690 83 E1 00 1C */ lwz r31, 0x1c(r1) +/* 80389734 00386694 83 C1 00 18 */ lwz r30, 0x18(r1) +/* 80389738 00386698 83 A1 00 14 */ lwz r29, 0x14(r1) +/* 8038973C 0038669C 83 81 00 10 */ lwz r28, 0x10(r1) +/* 80389740 003866A0 7C 08 03 A6 */ mtlr r0 +/* 80389744 003866A4 38 21 00 20 */ addi r1, r1, 0x20 +/* 80389748 003866A8 4E 80 00 20 */ blr + + +.global __construct_array +__construct_array: +/* 8038974C 003866AC 94 21 FF D0 */ stwu r1, -0x30(r1) +/* 80389750 003866B0 7C 08 02 A6 */ mflr r0 +/* 80389754 003866B4 90 01 00 34 */ stw r0, 0x34(r1) +/* 80389758 003866B8 38 00 00 00 */ li r0, 0 +/* 8038975C 003866BC 93 E1 00 2C */ stw r31, 0x2c(r1) +/* 80389760 003866C0 7C FF 3B 78 */ mr r31, r7 +/* 80389764 003866C4 93 C1 00 28 */ stw r30, 0x28(r1) +/* 80389768 003866C8 7C 7E 1B 78 */ mr r30, r3 +/* 8038976C 003866CC 93 A1 00 24 */ stw r29, 0x24(r1) +/* 80389770 003866D0 7C DD 33 78 */ mr r29, r6 +/* 80389774 003866D4 93 E1 00 18 */ stw r31, 0x18(r1) +/* 80389778 003866D8 93 81 00 20 */ stw r28, 0x20(r1) +/* 8038977C 003866DC 7C 9C 23 78 */ mr r28, r4 +/* 80389780 003866E0 90 61 00 08 */ stw r3, 8(r1) +/* 80389784 003866E4 93 A1 00 0C */ stw r29, 0xc(r1) +/* 80389788 003866E8 93 E1 00 10 */ stw r31, 0x10(r1) +/* 8038978C 003866EC 90 A1 00 14 */ stw r5, 0x14(r1) +/* 80389790 003866F0 90 01 00 18 */ stw r0, 0x18(r1) +/* 80389794 003866F4 48 00 00 28 */ b lbl_803897BC +lbl_80389798: +/* 80389798 003866F8 7F 8C E3 78 */ mr r12, r28 +/* 8038979C 003866FC 7F C3 F3 78 */ mr r3, r30 +/* 803897A0 00386700 38 80 00 01 */ li r4, 1 +/* 803897A4 00386704 7D 89 03 A6 */ mtctr r12 +/* 803897A8 00386708 4E 80 04 21 */ bctrl +/* 803897AC 0038670C 80 61 00 18 */ lwz r3, 0x18(r1) +/* 803897B0 00386710 7F DE EA 14 */ add r30, r30, r29 +/* 803897B4 00386714 38 03 00 01 */ addi r0, r3, 1 +/* 803897B8 00386718 90 01 00 18 */ stw r0, 0x18(r1) +lbl_803897BC: +/* 803897BC 0038671C 80 81 00 18 */ lwz r4, 0x18(r1) +/* 803897C0 00386720 7C 04 F8 40 */ cmplw r4, r31 +/* 803897C4 00386724 41 80 FF D4 */ blt lbl_80389798 +/* 803897C8 00386728 80 01 00 10 */ lwz r0, 0x10(r1) +/* 803897CC 0038672C 7C 04 00 40 */ cmplw r4, r0 +/* 803897D0 00386730 40 80 00 54 */ bge lbl_80389824 +/* 803897D4 00386734 80 01 00 14 */ lwz r0, 0x14(r1) +/* 803897D8 00386738 28 00 00 00 */ cmplwi r0, 0 +/* 803897DC 0038673C 41 82 00 48 */ beq lbl_80389824 +/* 803897E0 00386740 83 E1 00 0C */ lwz r31, 0xc(r1) +/* 803897E4 00386744 80 61 00 08 */ lwz r3, 8(r1) +/* 803897E8 00386748 7C 1F 21 D6 */ mullw r0, r31, r4 +/* 803897EC 0038674C 7F C3 02 14 */ add r30, r3, r0 +/* 803897F0 00386750 48 00 00 28 */ b lbl_80389818 +lbl_803897F4: +/* 803897F4 00386754 81 81 00 14 */ lwz r12, 0x14(r1) +/* 803897F8 00386758 7F DF F0 50 */ subf r30, r31, r30 +/* 803897FC 0038675C 7F C3 F3 78 */ mr r3, r30 +/* 80389800 00386760 38 80 FF FF */ li r4, -1 +/* 80389804 00386764 7D 89 03 A6 */ mtctr r12 +/* 80389808 00386768 4E 80 04 21 */ bctrl +/* 8038980C 0038676C 80 61 00 18 */ lwz r3, 0x18(r1) +/* 80389810 00386770 38 03 FF FF */ addi r0, r3, -1 +/* 80389814 00386774 90 01 00 18 */ stw r0, 0x18(r1) +lbl_80389818: +/* 80389818 00386778 80 01 00 18 */ lwz r0, 0x18(r1) +/* 8038981C 0038677C 28 00 00 00 */ cmplwi r0, 0 +/* 80389820 00386780 40 82 FF D4 */ bne lbl_803897F4 +lbl_80389824: +/* 80389824 00386784 80 01 00 34 */ lwz r0, 0x34(r1) +/* 80389828 00386788 83 E1 00 2C */ lwz r31, 0x2c(r1) +/* 8038982C 0038678C 83 C1 00 28 */ lwz r30, 0x28(r1) +/* 80389830 00386790 83 A1 00 24 */ lwz r29, 0x24(r1) +/* 80389834 00386794 83 81 00 20 */ lwz r28, 0x20(r1) +/* 80389838 00386798 7C 08 03 A6 */ mtlr r0 +/* 8038983C 0038679C 38 21 00 30 */ addi r1, r1, 0x30 +/* 80389840 003867A0 4E 80 00 20 */ blr + +.global __partial_array_destructor +__partial_array_destructor: +/* 80389844 003867A4 94 21 FF E0 */ stwu r1, -0x20(r1) +/* 80389848 003867A8 7C 08 02 A6 */ mflr r0 +/* 8038984C 003867AC 90 01 00 24 */ stw r0, 0x24(r1) +/* 80389850 003867B0 93 E1 00 1C */ stw r31, 0x1c(r1) +/* 80389854 003867B4 93 C1 00 18 */ stw r30, 0x18(r1) +/* 80389858 003867B8 7C 9E 23 78 */ mr r30, r4 +/* 8038985C 003867BC 93 A1 00 14 */ stw r29, 0x14(r1) +/* 80389860 003867C0 7C 7D 1B 79 */ or. r29, r3, r3 +/* 80389864 003867C4 41 82 00 78 */ beq lbl_803898DC +/* 80389868 003867C8 80 9D 00 10 */ lwz r4, 0x10(r29) +/* 8038986C 003867CC 80 1D 00 08 */ lwz r0, 8(r29) +/* 80389870 003867D0 7C 04 00 40 */ cmplw r4, r0 +/* 80389874 003867D4 40 80 00 58 */ bge lbl_803898CC +/* 80389878 003867D8 80 1D 00 0C */ lwz r0, 0xc(r29) +/* 8038987C 003867DC 28 00 00 00 */ cmplwi r0, 0 +/* 80389880 003867E0 41 82 00 4C */ beq lbl_803898CC +/* 80389884 003867E4 80 1D 00 04 */ lwz r0, 4(r29) +/* 80389888 003867E8 80 7D 00 00 */ lwz r3, 0(r29) +/* 8038988C 003867EC 7C 00 21 D6 */ mullw r0, r0, r4 +/* 80389890 003867F0 7F E3 02 14 */ add r31, r3, r0 +/* 80389894 003867F4 48 00 00 2C */ b lbl_803898C0 +lbl_80389898: +/* 80389898 003867F8 80 1D 00 04 */ lwz r0, 4(r29) +/* 8038989C 003867FC 38 80 FF FF */ li r4, -1 +/* 803898A0 00386800 81 9D 00 0C */ lwz r12, 0xc(r29) +/* 803898A4 00386804 7F E0 F8 50 */ subf r31, r0, r31 +/* 803898A8 00386808 7F E3 FB 78 */ mr r3, r31 +/* 803898AC 0038680C 7D 89 03 A6 */ mtctr r12 +/* 803898B0 00386810 4E 80 04 21 */ bctrl +/* 803898B4 00386814 80 7D 00 10 */ lwz r3, 0x10(r29) +/* 803898B8 00386818 38 03 FF FF */ addi r0, r3, -1 +/* 803898BC 0038681C 90 1D 00 10 */ stw r0, 0x10(r29) +lbl_803898C0: +/* 803898C0 00386820 80 1D 00 10 */ lwz r0, 0x10(r29) +/* 803898C4 00386824 28 00 00 00 */ cmplwi r0, 0 +/* 803898C8 00386828 40 82 FF D0 */ bne lbl_80389898 +lbl_803898CC: +/* 803898CC 0038682C 7F C0 07 35 */ extsh. r0, r30 +/* 803898D0 00386830 40 81 00 0C */ ble lbl_803898DC +/* 803898D4 00386834 7F A3 EB 78 */ mr r3, r29 +/* 803898D8 00386838 4B D3 8A 2D */ bl sub_800c2304 +lbl_803898DC: +/* 803898DC 0038683C 80 01 00 24 */ lwz r0, 0x24(r1) +/* 803898E0 00386840 7F A3 EB 78 */ mr r3, r29 +/* 803898E4 00386844 83 E1 00 1C */ lwz r31, 0x1c(r1) +/* 803898E8 00386848 83 C1 00 18 */ lwz r30, 0x18(r1) +/* 803898EC 0038684C 83 A1 00 14 */ lwz r29, 0x14(r1) +/* 803898F0 00386850 7C 08 03 A6 */ mtlr r0 +/* 803898F4 00386854 38 21 00 20 */ addi r1, r1, 0x20 +/* 803898F8 00386858 4E 80 00 20 */ blr diff --git a/asm/Runtime/PPCEABI/H/__init_cpp_exceptions.s b/asm/Runtime/PPCEABI/H/__init_cpp_exceptions.s new file mode 100644 index 00000000..70c418c1 --- /dev/null +++ b/asm/Runtime/PPCEABI/H/__init_cpp_exceptions.s @@ -0,0 +1,45 @@ +.include "macros.inc" + +.section .text, "ax" + +.global GetR2__Fv +GetR2__Fv: +/* 8038A0E4 00387044 7C 43 13 78 */ mr r3, r2 +/* 8038A0E8 00387048 4E 80 00 20 */ blr + +.global __fini_cpp_exceptions +__fini_cpp_exceptions: +/* 8038A0EC 0038704C 94 21 FF F0 */ stwu r1, -0x10(r1) +/* 8038A0F0 00387050 7C 08 02 A6 */ mflr r0 +/* 8038A0F4 00387054 90 01 00 14 */ stw r0, 0x14(r1) +/* 8038A0F8 00387058 80 6D 9F C8 */ lwz r3, lbl_805A8B88@sda21(r13) +/* 8038A0FC 0038705C 2C 03 FF FE */ cmpwi r3, -2 +/* 8038A100 00387060 41 82 00 10 */ beq lbl_8038A110 +/* 8038A104 00387064 48 00 00 5D */ bl __unregister_fragment +/* 8038A108 00387068 38 00 FF FE */ li r0, -2 +/* 8038A10C 0038706C 90 0D 9F C8 */ stw r0, lbl_805A8B88@sda21(r13) +lbl_8038A110: +/* 8038A110 00387070 80 01 00 14 */ lwz r0, 0x14(r1) +/* 8038A114 00387074 7C 08 03 A6 */ mtlr r0 +/* 8038A118 00387078 38 21 00 10 */ addi r1, r1, 0x10 +/* 8038A11C 0038707C 4E 80 00 20 */ blr + +.global __init_cpp_exceptions +__init_cpp_exceptions: +/* 8038A120 00387080 94 21 FF F0 */ stwu r1, -0x10(r1) +/* 8038A124 00387084 7C 08 02 A6 */ mflr r0 +/* 8038A128 00387088 90 01 00 14 */ stw r0, 0x14(r1) +/* 8038A12C 0038708C 80 0D 9F C8 */ lwz r0, lbl_805A8B88@sda21(r13) +/* 8038A130 00387090 2C 00 FF FE */ cmpwi r0, -2 +/* 8038A134 00387094 40 82 00 1C */ bne lbl_8038A150 +/* 8038A138 00387098 4B FF FF AD */ bl GetR2__Fv +/* 8038A13C 0038709C 3C A0 80 00 */ lis r5, lbl_80003604@ha +/* 8038A140 003870A0 7C 64 1B 78 */ mr r4, r3 +/* 8038A144 003870A4 38 65 36 04 */ addi r3, r5, lbl_80003604@l +/* 8038A148 003870A8 48 00 00 4D */ bl __register_fragment +/* 8038A14C 003870AC 90 6D 9F C8 */ stw r3, lbl_805A8B88@sda21(r13) +lbl_8038A150: +/* 8038A150 003870B0 80 01 00 14 */ lwz r0, 0x14(r1) +/* 8038A154 003870B4 7C 08 03 A6 */ mtlr r0 +/* 8038A158 003870B8 38 21 00 10 */ addi r1, r1, 0x10 +/* 8038A15C 003870BC 4E 80 00 20 */ blr diff --git a/asm/Runtime/PPCEABI/H/__va_arg.s b/asm/Runtime/PPCEABI/H/__va_arg.s new file mode 100644 index 00000000..ec1d8616 --- /dev/null +++ b/asm/Runtime/PPCEABI/H/__va_arg.s @@ -0,0 +1,62 @@ +.include "macros.inc" + +.section .text, "ax" + +.global __va_arg +__va_arg: +/* 8038957C 003864DC 88 E3 00 00 */ lbz r7, 0(r3) +/* 80389580 003864E0 2C 04 00 03 */ cmpwi r4, 3 +/* 80389584 003864E4 7C 66 1B 78 */ mr r6, r3 +/* 80389588 003864E8 38 00 00 08 */ li r0, 8 +/* 8038958C 003864EC 39 00 00 04 */ li r8, 4 +/* 80389590 003864F0 7C E7 07 74 */ extsb r7, r7 +/* 80389594 003864F4 39 20 00 01 */ li r9, 1 +/* 80389598 003864F8 38 A0 00 00 */ li r5, 0 +/* 8038959C 003864FC 39 40 00 00 */ li r10, 0 +/* 803895A0 00386500 39 60 00 04 */ li r11, 4 +/* 803895A4 00386504 40 82 00 1C */ bne lbl_803895C0 +/* 803895A8 00386508 88 E3 00 01 */ lbz r7, 1(r3) +/* 803895AC 0038650C 38 C3 00 01 */ addi r6, r3, 1 +/* 803895B0 00386510 39 00 00 08 */ li r8, 8 +/* 803895B4 00386514 39 40 00 20 */ li r10, 0x20 +/* 803895B8 00386518 7C E7 07 74 */ extsb r7, r7 +/* 803895BC 0038651C 39 60 00 08 */ li r11, 8 +lbl_803895C0: +/* 803895C0 00386520 2C 04 00 02 */ cmpwi r4, 2 +/* 803895C4 00386524 40 82 00 1C */ bne lbl_803895E0 +/* 803895C8 00386528 54 E0 07 FF */ clrlwi. r0, r7, 0x1f +/* 803895CC 0038652C 39 00 00 08 */ li r8, 8 +/* 803895D0 00386530 38 00 00 07 */ li r0, 7 +/* 803895D4 00386534 41 82 00 08 */ beq lbl_803895DC +/* 803895D8 00386538 38 A0 00 01 */ li r5, 1 +lbl_803895DC: +/* 803895DC 0038653C 39 20 00 02 */ li r9, 2 +lbl_803895E0: +/* 803895E0 00386540 7C 07 00 00 */ cmpw r7, r0 +/* 803895E4 00386544 40 80 00 24 */ bge lbl_80389608 +/* 803895E8 00386548 7C E7 2A 14 */ add r7, r7, r5 +/* 803895EC 0038654C 80 A3 00 08 */ lwz r5, 8(r3) +/* 803895F0 00386550 7C 67 59 D6 */ mullw r3, r7, r11 +/* 803895F4 00386554 7C 07 4A 14 */ add r0, r7, r9 +/* 803895F8 00386558 98 06 00 00 */ stb r0, 0(r6) +/* 803895FC 0038655C 7C CA 1A 14 */ add r6, r10, r3 +/* 80389600 00386560 7C C5 32 14 */ add r6, r5, r6 +/* 80389604 00386564 48 00 00 2C */ b lbl_80389630 +lbl_80389608: +/* 80389608 00386568 38 A0 00 08 */ li r5, 8 +/* 8038960C 0038656C 38 08 FF FF */ addi r0, r8, -1 +/* 80389610 00386570 98 A6 00 00 */ stb r5, 0(r6) +/* 80389614 00386574 7C 06 00 F8 */ nor r6, r0, r0 +/* 80389618 00386578 80 03 00 04 */ lwz r0, 4(r3) +/* 8038961C 0038657C 7C A8 02 14 */ add r5, r8, r0 +/* 80389620 00386580 38 05 FF FF */ addi r0, r5, -1 +/* 80389624 00386584 7C C6 00 38 */ and r6, r6, r0 +/* 80389628 00386588 7C 06 42 14 */ add r0, r6, r8 +/* 8038962C 0038658C 90 03 00 04 */ stw r0, 4(r3) +lbl_80389630: +/* 80389630 00386590 2C 04 00 00 */ cmpwi r4, 0 +/* 80389634 00386594 40 82 00 08 */ bne lbl_8038963C +/* 80389638 00386598 80 C6 00 00 */ lwz r6, 0(r6) +lbl_8038963C: +/* 8038963C 0038659C 7C C3 33 78 */ mr r3, r6 +/* 80389640 003865A0 4E 80 00 20 */ blr diff --git a/asm/Runtime/PPCEABI/H/abort_exit.s b/asm/Runtime/PPCEABI/H/abort_exit.s new file mode 100644 index 00000000..fec1705d --- /dev/null +++ b/asm/Runtime/PPCEABI/H/abort_exit.s @@ -0,0 +1,63 @@ +.include "macros.inc" + +.section .text, "ax" + +.global exit +exit: +/* 8038A1C8 00387128 94 21 FF F0 */ stwu r1, -0x10(r1) +/* 8038A1CC 0038712C 7C 08 02 A6 */ mflr r0 +/* 8038A1D0 00387130 90 01 00 14 */ stw r0, 0x14(r1) +/* 8038A1D4 00387134 93 E1 00 0C */ stw r31, 0xc(r1) +/* 8038A1D8 00387138 80 0D AD F8 */ lwz r0, lbl_805A99B8@sda21(r13) +/* 8038A1DC 0038713C 2C 00 00 00 */ cmpwi r0, 0 +/* 8038A1E0 00387140 40 82 00 4C */ bne lbl_8038A22C +/* 8038A1E4 00387144 4B FF F4 61 */ bl __destroy_global_chain +/* 8038A1E8 00387148 3C 60 80 3D */ lis r3, __destroy_global_chain_reference@ha +/* 8038A1EC 0038714C 38 03 B3 80 */ addi r0, r3, __destroy_global_chain_reference@l +/* 8038A1F0 00387150 7C 1F 03 78 */ mr r31, r0 +/* 8038A1F4 00387154 48 00 00 10 */ b lbl_8038A204 +lbl_8038A1F8: +/* 8038A1F8 00387158 7D 89 03 A6 */ mtctr r12 +/* 8038A1FC 0038715C 4E 80 04 21 */ bctrl +/* 8038A200 00387160 3B FF 00 04 */ addi r31, r31, 4 +lbl_8038A204: +/* 8038A204 00387164 81 9F 00 00 */ lwz r12, 0(r31) +/* 8038A208 00387168 28 0C 00 00 */ cmplwi r12, 0 +/* 8038A20C 0038716C 40 82 FF EC */ bne lbl_8038A1F8 +/* 8038A210 00387170 81 8D AE 00 */ lwz r12, lbl_805A99C0@sda21(r13) +/* 8038A214 00387174 28 0C 00 00 */ cmplwi r12, 0 +/* 8038A218 00387178 41 82 00 14 */ beq lbl_8038A22C +/* 8038A21C 0038717C 7D 89 03 A6 */ mtctr r12 +/* 8038A220 00387180 4E 80 04 21 */ bctrl +/* 8038A224 00387184 38 00 00 00 */ li r0, 0 +/* 8038A228 00387188 90 0D AE 00 */ stw r0, lbl_805A99C0@sda21(r13) +lbl_8038A22C: +/* 8038A22C 0038718C 3C 60 80 54 */ lis r3, lbl_80542198@ha +/* 8038A230 00387190 3B E3 21 98 */ addi r31, r3, lbl_80542198@l +/* 8038A234 00387194 48 00 00 20 */ b lbl_8038A254 +lbl_8038A238: +/* 8038A238 00387198 80 6D AD FC */ lwz r3, lbl_805A99BC@sda21(r13) +/* 8038A23C 0038719C 38 63 FF FF */ addi r3, r3, -1 +/* 8038A240 003871A0 54 60 10 3A */ slwi r0, r3, 2 +/* 8038A244 003871A4 90 6D AD FC */ stw r3, lbl_805A99BC@sda21(r13) +/* 8038A248 003871A8 7D 9F 00 2E */ lwzx r12, r31, r0 +/* 8038A24C 003871AC 7D 89 03 A6 */ mtctr r12 +/* 8038A250 003871B0 4E 80 04 21 */ bctrl +lbl_8038A254: +/* 8038A254 003871B4 80 0D AD FC */ lwz r0, lbl_805A99BC@sda21(r13) +/* 8038A258 003871B8 2C 00 00 00 */ cmpwi r0, 0 +/* 8038A25C 003871BC 41 81 FF DC */ bgt lbl_8038A238 +/* 8038A260 003871C0 81 8D AE 04 */ lwz r12, lbl_805A99C4@sda21(r13) +/* 8038A264 003871C4 28 0C 00 00 */ cmplwi r12, 0 +/* 8038A268 003871C8 41 82 00 14 */ beq lbl_8038A27C +/* 8038A26C 003871CC 7D 89 03 A6 */ mtctr r12 +/* 8038A270 003871D0 4E 80 04 21 */ bctrl +/* 8038A274 003871D4 38 00 00 00 */ li r0, 0 +/* 8038A278 003871D8 90 0D AE 04 */ stw r0, lbl_805A99C4@sda21(r13) +lbl_8038A27C: +/* 8038A27C 003871DC 4B FF B6 1D */ bl _ExitProcess +/* 8038A280 003871E0 80 01 00 14 */ lwz r0, 0x14(r1) +/* 8038A284 003871E4 83 E1 00 0C */ lwz r31, 0xc(r1) +/* 8038A288 003871E8 7C 08 03 A6 */ mtlr r0 +/* 8038A28C 003871EC 38 21 00 10 */ addi r1, r1, 0x10 +/* 8038A290 003871F0 4E 80 00 20 */ blr diff --git a/asm/Runtime/PPCEABI/H/alloc.s b/asm/Runtime/PPCEABI/H/alloc.s new file mode 100644 index 00000000..11496bd2 --- /dev/null +++ b/asm/Runtime/PPCEABI/H/alloc.s @@ -0,0 +1,1030 @@ +.include "macros.inc" + +.section .text, "ax" + +.global calloc +calloc: +/* 8038A294 003871F4 94 21 FF F0 */ stwu r1, -0x10(r1) +/* 8038A298 003871F8 7C 08 02 A6 */ mflr r0 +/* 8038A29C 003871FC 90 01 00 14 */ stw r0, 0x14(r1) +/* 8038A2A0 00387200 93 E1 00 0C */ stw r31, 0xc(r1) +/* 8038A2A4 00387204 7C 7F 1B 78 */ mr r31, r3 +/* 8038A2A8 00387208 93 C1 00 08 */ stw r30, 8(r1) +/* 8038A2AC 0038720C 7C 9E 23 78 */ mr r30, r4 +/* 8038A2B0 00387210 88 0D AE 08 */ lbz r0, lbl_805A99C8@sda21(r13) +/* 8038A2B4 00387214 28 00 00 00 */ cmplwi r0, 0 +/* 8038A2B8 00387218 40 82 00 20 */ bne lbl_8038A2D8 +/* 8038A2BC 0038721C 3C 60 80 54 */ lis r3, lbl_80542298@ha +/* 8038A2C0 00387220 38 80 00 00 */ li r4, 0 +/* 8038A2C4 00387224 38 63 22 98 */ addi r3, r3, lbl_80542298@l +/* 8038A2C8 00387228 38 A0 00 34 */ li r5, 0x34 +/* 8038A2CC 0038722C 4B C7 90 DD */ bl memset +/* 8038A2D0 00387230 38 00 00 01 */ li r0, 1 +/* 8038A2D4 00387234 98 0D AE 08 */ stb r0, lbl_805A99C8@sda21(r13) +lbl_8038A2D8: +/* 8038A2D8 00387238 7F DE F9 D7 */ mullw. r30, r30, r31 +/* 8038A2DC 0038723C 3C 60 80 54 */ lis r3, lbl_80542298@ha +/* 8038A2E0 00387240 38 63 22 98 */ addi r3, r3, lbl_80542298@l +/* 8038A2E4 00387244 40 82 00 0C */ bne lbl_8038A2F0 +/* 8038A2E8 00387248 3B E0 00 00 */ li r31, 0 +/* 8038A2EC 0038724C 48 00 00 38 */ b lbl_8038A324 +lbl_8038A2F0: +/* 8038A2F0 00387250 38 00 FF CF */ li r0, -49 +/* 8038A2F4 00387254 7C 1E 00 40 */ cmplw r30, r0 +/* 8038A2F8 00387258 40 81 00 0C */ ble lbl_8038A304 +/* 8038A2FC 0038725C 3B E0 00 00 */ li r31, 0 +/* 8038A300 00387260 48 00 00 24 */ b lbl_8038A324 +lbl_8038A304: +/* 8038A304 00387264 28 1E 00 44 */ cmplwi r30, 0x44 +/* 8038A308 00387268 41 81 00 10 */ bgt lbl_8038A318 +/* 8038A30C 0038726C 7F C4 F3 78 */ mr r4, r30 +/* 8038A310 00387270 48 00 03 79 */ bl sub_8038a688 +/* 8038A314 00387274 48 00 00 0C */ b lbl_8038A320 +lbl_8038A318: +/* 8038A318 00387278 7F C4 F3 78 */ mr r4, r30 +/* 8038A31C 0038727C 48 00 07 31 */ bl sub_8038aa4c +lbl_8038A320: +/* 8038A320 00387280 7C 7F 1B 78 */ mr r31, r3 +lbl_8038A324: +/* 8038A324 00387284 28 1F 00 00 */ cmplwi r31, 0 +/* 8038A328 00387288 41 82 00 14 */ beq lbl_8038A33C +/* 8038A32C 0038728C 7F E3 FB 78 */ mr r3, r31 +/* 8038A330 00387290 7F C5 F3 78 */ mr r5, r30 +/* 8038A334 00387294 38 80 00 00 */ li r4, 0 +/* 8038A338 00387298 4B C7 90 71 */ bl memset +lbl_8038A33C: +/* 8038A33C 0038729C 80 01 00 14 */ lwz r0, 0x14(r1) +/* 8038A340 003872A0 7F E3 FB 78 */ mr r3, r31 +/* 8038A344 003872A4 83 E1 00 0C */ lwz r31, 0xc(r1) +/* 8038A348 003872A8 83 C1 00 08 */ lwz r30, 8(r1) +/* 8038A34C 003872AC 7C 08 03 A6 */ mtlr r0 +/* 8038A350 003872B0 38 21 00 10 */ addi r1, r1, 0x10 +/* 8038A354 003872B4 4E 80 00 20 */ blr + +.global sub_8038a358 +sub_8038a358: +/* 8038A358 003872B8 94 21 FF F0 */ stwu r1, -0x10(r1) +/* 8038A35C 003872BC 7C 08 02 A6 */ mflr r0 +/* 8038A360 003872C0 90 01 00 14 */ stw r0, 0x14(r1) +/* 8038A364 003872C4 93 E1 00 0C */ stw r31, 0xc(r1) +/* 8038A368 003872C8 93 C1 00 08 */ stw r30, 8(r1) +/* 8038A36C 003872CC 7C 7E 1B 78 */ mr r30, r3 +/* 8038A370 003872D0 88 0D AE 08 */ lbz r0, lbl_805A99C8@sda21(r13) +/* 8038A374 003872D4 28 00 00 00 */ cmplwi r0, 0 +/* 8038A378 003872D8 40 82 00 20 */ bne lbl_8038A398 +/* 8038A37C 003872DC 3C 60 80 54 */ lis r3, lbl_80542298@ha +/* 8038A380 003872E0 38 80 00 00 */ li r4, 0 +/* 8038A384 003872E4 38 63 22 98 */ addi r3, r3, lbl_80542298@l +/* 8038A388 003872E8 38 A0 00 34 */ li r5, 0x34 +/* 8038A38C 003872EC 4B C7 90 1D */ bl memset +/* 8038A390 003872F0 38 00 00 01 */ li r0, 1 +/* 8038A394 003872F4 98 0D AE 08 */ stb r0, lbl_805A99C8@sda21(r13) +lbl_8038A398: +/* 8038A398 003872F8 28 1E 00 00 */ cmplwi r30, 0 +/* 8038A39C 003872FC 3C 60 80 54 */ lis r3, lbl_80542298@ha +/* 8038A3A0 00387300 3B E3 22 98 */ addi r31, r3, lbl_80542298@l +/* 8038A3A4 00387304 41 82 00 D0 */ beq lbl_8038A474 +/* 8038A3A8 00387308 80 7E FF FC */ lwz r3, -4(r30) +/* 8038A3AC 0038730C 54 60 07 FF */ clrlwi. r0, r3, 0x1f +/* 8038A3B0 00387310 40 82 00 0C */ bne lbl_8038A3BC +/* 8038A3B4 00387314 80 A3 00 08 */ lwz r5, 8(r3) +/* 8038A3B8 00387318 48 00 00 10 */ b lbl_8038A3C8 +lbl_8038A3BC: +/* 8038A3BC 0038731C 80 1E FF F8 */ lwz r0, -8(r30) +/* 8038A3C0 00387320 54 03 00 38 */ rlwinm r3, r0, 0, 0, 0x1c +/* 8038A3C4 00387324 38 A3 FF F8 */ addi r5, r3, -8 +lbl_8038A3C8: +/* 8038A3C8 00387328 28 05 00 44 */ cmplwi r5, 0x44 +/* 8038A3CC 0038732C 41 81 00 14 */ bgt lbl_8038A3E0 +/* 8038A3D0 00387330 7F E3 FB 78 */ mr r3, r31 +/* 8038A3D4 00387334 7F C4 F3 78 */ mr r4, r30 +/* 8038A3D8 00387338 48 00 00 B5 */ bl sub_8038a48c +/* 8038A3DC 0038733C 48 00 00 98 */ b lbl_8038A474 +lbl_8038A3E0: +/* 8038A3E0 00387340 80 1E FF FC */ lwz r0, -4(r30) +/* 8038A3E4 00387344 38 9E FF F8 */ addi r4, r30, -8 +/* 8038A3E8 00387348 54 1E 00 3C */ rlwinm r30, r0, 0, 0, 0x1e +/* 8038A3EC 0038734C 7F C3 F3 78 */ mr r3, r30 +/* 8038A3F0 00387350 48 00 09 61 */ bl sub_8038ad50 +/* 8038A3F4 00387354 80 7E 00 10 */ lwz r3, 0x10(r30) +/* 8038A3F8 00387358 38 A0 00 00 */ li r5, 0 +/* 8038A3FC 0038735C 54 60 07 BD */ rlwinm. r0, r3, 0, 0x1e, 0x1e +/* 8038A400 00387360 40 82 00 20 */ bne lbl_8038A420 +/* 8038A404 00387364 80 1E 00 0C */ lwz r0, 0xc(r30) +/* 8038A408 00387368 54 64 00 38 */ rlwinm r4, r3, 0, 0, 0x1c +/* 8038A40C 0038736C 54 03 00 38 */ rlwinm r3, r0, 0, 0, 0x1c +/* 8038A410 00387370 38 03 FF E8 */ addi r0, r3, -24 +/* 8038A414 00387374 7C 04 00 40 */ cmplw r4, r0 +/* 8038A418 00387378 40 82 00 08 */ bne lbl_8038A420 +/* 8038A41C 0038737C 38 A0 00 01 */ li r5, 1 +lbl_8038A420: +/* 8038A420 00387380 2C 05 00 00 */ cmpwi r5, 0 +/* 8038A424 00387384 41 82 00 50 */ beq lbl_8038A474 +/* 8038A428 00387388 80 9E 00 04 */ lwz r4, 4(r30) +/* 8038A42C 0038738C 7C 04 F0 40 */ cmplw r4, r30 +/* 8038A430 00387390 40 82 00 08 */ bne lbl_8038A438 +/* 8038A434 00387394 38 80 00 00 */ li r4, 0 +lbl_8038A438: +/* 8038A438 00387398 80 1F 00 00 */ lwz r0, 0(r31) +/* 8038A43C 0038739C 7C 00 F0 40 */ cmplw r0, r30 +/* 8038A440 003873A0 40 82 00 08 */ bne lbl_8038A448 +/* 8038A444 003873A4 90 9F 00 00 */ stw r4, 0(r31) +lbl_8038A448: +/* 8038A448 003873A8 28 04 00 00 */ cmplwi r4, 0 +/* 8038A44C 003873AC 41 82 00 14 */ beq lbl_8038A460 +/* 8038A450 003873B0 80 1E 00 00 */ lwz r0, 0(r30) +/* 8038A454 003873B4 90 04 00 00 */ stw r0, 0(r4) +/* 8038A458 003873B8 80 64 00 00 */ lwz r3, 0(r4) +/* 8038A45C 003873BC 90 83 00 04 */ stw r4, 4(r3) +lbl_8038A460: +/* 8038A460 003873C0 38 00 00 00 */ li r0, 0 +/* 8038A464 003873C4 7F C3 F3 78 */ mr r3, r30 +/* 8038A468 003873C8 90 1E 00 04 */ stw r0, 4(r30) +/* 8038A46C 003873CC 90 1E 00 00 */ stw r0, 0(r30) +/* 8038A470 003873D0 4B C7 E0 15 */ bl sub_80008484 +lbl_8038A474: +/* 8038A474 003873D4 80 01 00 14 */ lwz r0, 0x14(r1) +/* 8038A478 003873D8 83 E1 00 0C */ lwz r31, 0xc(r1) +/* 8038A47C 003873DC 83 C1 00 08 */ lwz r30, 8(r1) +/* 8038A480 003873E0 7C 08 03 A6 */ mtlr r0 +/* 8038A484 003873E4 38 21 00 10 */ addi r1, r1, 0x10 +/* 8038A488 003873E8 4E 80 00 20 */ blr + +.global sub_8038a48c +sub_8038a48c: +/* 8038A48C 003873EC 94 21 FF F0 */ stwu r1, -0x10(r1) +/* 8038A490 003873F0 7C 08 02 A6 */ mflr r0 +/* 8038A494 003873F4 3C C0 80 3E */ lis r6, lbl_803D85C0@ha +/* 8038A498 003873F8 90 01 00 14 */ stw r0, 0x14(r1) +/* 8038A49C 003873FC 93 E1 00 0C */ stw r31, 0xc(r1) +/* 8038A4A0 00387400 7C 7F 1B 78 */ mr r31, r3 +/* 8038A4A4 00387404 38 66 85 C0 */ addi r3, r6, lbl_803D85C0@l +/* 8038A4A8 00387408 38 C0 00 00 */ li r6, 0 +/* 8038A4AC 0038740C 93 C1 00 08 */ stw r30, 8(r1) +/* 8038A4B0 00387410 48 00 00 0C */ b lbl_8038A4BC +lbl_8038A4B4: +/* 8038A4B4 00387414 38 63 00 04 */ addi r3, r3, 4 +/* 8038A4B8 00387418 38 C6 00 01 */ addi r6, r6, 1 +lbl_8038A4BC: +/* 8038A4BC 0038741C 80 03 00 00 */ lwz r0, 0(r3) +/* 8038A4C0 00387420 7C 05 00 40 */ cmplw r5, r0 +/* 8038A4C4 00387424 41 81 FF F0 */ bgt lbl_8038A4B4 +/* 8038A4C8 00387428 38 E4 FF FC */ addi r7, r4, -4 +/* 8038A4CC 0038742C 54 C4 18 38 */ slwi r4, r6, 3 +/* 8038A4D0 00387430 80 67 00 00 */ lwz r3, 0(r7) +/* 8038A4D4 00387434 38 84 00 04 */ addi r4, r4, 4 +/* 8038A4D8 00387438 7C 9F 22 14 */ add r4, r31, r4 +/* 8038A4DC 0038743C 80 03 00 0C */ lwz r0, 0xc(r3) +/* 8038A4E0 00387440 28 00 00 00 */ cmplwi r0, 0 +/* 8038A4E4 00387444 40 82 00 74 */ bne lbl_8038A558 +/* 8038A4E8 00387448 80 A4 00 04 */ lwz r5, 4(r4) +/* 8038A4EC 0038744C 7C 05 18 40 */ cmplw r5, r3 +/* 8038A4F0 00387450 41 82 00 68 */ beq lbl_8038A558 +/* 8038A4F4 00387454 80 04 00 00 */ lwz r0, 0(r4) +/* 8038A4F8 00387458 7C 00 18 40 */ cmplw r0, r3 +/* 8038A4FC 0038745C 40 82 00 1C */ bne lbl_8038A518 +/* 8038A500 00387460 80 05 00 00 */ lwz r0, 0(r5) +/* 8038A504 00387464 90 04 00 04 */ stw r0, 4(r4) +/* 8038A508 00387468 80 A4 00 00 */ lwz r5, 0(r4) +/* 8038A50C 0038746C 80 05 00 00 */ lwz r0, 0(r5) +/* 8038A510 00387470 90 04 00 00 */ stw r0, 0(r4) +/* 8038A514 00387474 48 00 00 44 */ b lbl_8038A558 +lbl_8038A518: +/* 8038A518 00387478 80 03 00 04 */ lwz r0, 4(r3) +/* 8038A51C 0038747C 80 A3 00 00 */ lwz r5, 0(r3) +/* 8038A520 00387480 90 05 00 04 */ stw r0, 4(r5) +/* 8038A524 00387484 80 03 00 00 */ lwz r0, 0(r3) +/* 8038A528 00387488 80 A3 00 04 */ lwz r5, 4(r3) +/* 8038A52C 0038748C 90 05 00 00 */ stw r0, 0(r5) +/* 8038A530 00387490 80 04 00 04 */ lwz r0, 4(r4) +/* 8038A534 00387494 90 03 00 04 */ stw r0, 4(r3) +/* 8038A538 00387498 80 A3 00 04 */ lwz r5, 4(r3) +/* 8038A53C 0038749C 80 05 00 00 */ lwz r0, 0(r5) +/* 8038A540 003874A0 90 03 00 00 */ stw r0, 0(r3) +/* 8038A544 003874A4 80 A3 00 00 */ lwz r5, 0(r3) +/* 8038A548 003874A8 90 65 00 04 */ stw r3, 4(r5) +/* 8038A54C 003874AC 80 A3 00 04 */ lwz r5, 4(r3) +/* 8038A550 003874B0 90 65 00 00 */ stw r3, 0(r5) +/* 8038A554 003874B4 90 64 00 04 */ stw r3, 4(r4) +lbl_8038A558: +/* 8038A558 003874B8 80 03 00 0C */ lwz r0, 0xc(r3) +/* 8038A55C 003874BC 90 07 00 04 */ stw r0, 4(r7) +/* 8038A560 003874C0 90 E3 00 0C */ stw r7, 0xc(r3) +/* 8038A564 003874C4 80 A3 00 10 */ lwz r5, 0x10(r3) +/* 8038A568 003874C8 34 05 FF FF */ addic. r0, r5, -1 +/* 8038A56C 003874CC 90 03 00 10 */ stw r0, 0x10(r3) +/* 8038A570 003874D0 40 82 01 00 */ bne lbl_8038A670 +/* 8038A574 003874D4 80 04 00 04 */ lwz r0, 4(r4) +/* 8038A578 003874D8 7C 00 18 40 */ cmplw r0, r3 +/* 8038A57C 003874DC 40 82 00 0C */ bne lbl_8038A588 +/* 8038A580 003874E0 80 03 00 04 */ lwz r0, 4(r3) +/* 8038A584 003874E4 90 04 00 04 */ stw r0, 4(r4) +lbl_8038A588: +/* 8038A588 003874E8 80 04 00 00 */ lwz r0, 0(r4) +/* 8038A58C 003874EC 7C 00 18 40 */ cmplw r0, r3 +/* 8038A590 003874F0 40 82 00 0C */ bne lbl_8038A59C +/* 8038A594 003874F4 80 03 00 00 */ lwz r0, 0(r3) +/* 8038A598 003874F8 90 04 00 00 */ stw r0, 0(r4) +lbl_8038A59C: +/* 8038A59C 003874FC 80 03 00 04 */ lwz r0, 4(r3) +/* 8038A5A0 00387500 80 A3 00 00 */ lwz r5, 0(r3) +/* 8038A5A4 00387504 90 05 00 04 */ stw r0, 4(r5) +/* 8038A5A8 00387508 80 03 00 00 */ lwz r0, 0(r3) +/* 8038A5AC 0038750C 80 A3 00 04 */ lwz r5, 4(r3) +/* 8038A5B0 00387510 90 05 00 00 */ stw r0, 0(r5) +/* 8038A5B4 00387514 80 04 00 04 */ lwz r0, 4(r4) +/* 8038A5B8 00387518 7C 00 18 40 */ cmplw r0, r3 +/* 8038A5BC 0038751C 40 82 00 0C */ bne lbl_8038A5C8 +/* 8038A5C0 00387520 38 00 00 00 */ li r0, 0 +/* 8038A5C4 00387524 90 04 00 04 */ stw r0, 4(r4) +lbl_8038A5C8: +/* 8038A5C8 00387528 80 04 00 00 */ lwz r0, 0(r4) +/* 8038A5CC 0038752C 7C 00 18 40 */ cmplw r0, r3 +/* 8038A5D0 00387530 40 82 00 0C */ bne lbl_8038A5DC +/* 8038A5D4 00387534 38 00 00 00 */ li r0, 0 +/* 8038A5D8 00387538 90 04 00 00 */ stw r0, 0(r4) +lbl_8038A5DC: +/* 8038A5DC 0038753C 80 03 FF FC */ lwz r0, -4(r3) +/* 8038A5E0 00387540 38 83 FF F8 */ addi r4, r3, -8 +/* 8038A5E4 00387544 54 1E 00 3C */ rlwinm r30, r0, 0, 0, 0x1e +/* 8038A5E8 00387548 7F C3 F3 78 */ mr r3, r30 +/* 8038A5EC 0038754C 48 00 07 65 */ bl sub_8038ad50 +/* 8038A5F0 00387550 80 7E 00 10 */ lwz r3, 0x10(r30) +/* 8038A5F4 00387554 38 A0 00 00 */ li r5, 0 +/* 8038A5F8 00387558 54 60 07 BD */ rlwinm. r0, r3, 0, 0x1e, 0x1e +/* 8038A5FC 0038755C 40 82 00 20 */ bne lbl_8038A61C +/* 8038A600 00387560 80 1E 00 0C */ lwz r0, 0xc(r30) +/* 8038A604 00387564 54 64 00 38 */ rlwinm r4, r3, 0, 0, 0x1c +/* 8038A608 00387568 54 03 00 38 */ rlwinm r3, r0, 0, 0, 0x1c +/* 8038A60C 0038756C 38 03 FF E8 */ addi r0, r3, -24 +/* 8038A610 00387570 7C 04 00 40 */ cmplw r4, r0 +/* 8038A614 00387574 40 82 00 08 */ bne lbl_8038A61C +/* 8038A618 00387578 38 A0 00 01 */ li r5, 1 +lbl_8038A61C: +/* 8038A61C 0038757C 2C 05 00 00 */ cmpwi r5, 0 +/* 8038A620 00387580 41 82 00 50 */ beq lbl_8038A670 +/* 8038A624 00387584 80 9E 00 04 */ lwz r4, 4(r30) +/* 8038A628 00387588 7C 04 F0 40 */ cmplw r4, r30 +/* 8038A62C 0038758C 40 82 00 08 */ bne lbl_8038A634 +/* 8038A630 00387590 38 80 00 00 */ li r4, 0 +lbl_8038A634: +/* 8038A634 00387594 80 1F 00 00 */ lwz r0, 0(r31) +/* 8038A638 00387598 7C 00 F0 40 */ cmplw r0, r30 +/* 8038A63C 0038759C 40 82 00 08 */ bne lbl_8038A644 +/* 8038A640 003875A0 90 9F 00 00 */ stw r4, 0(r31) +lbl_8038A644: +/* 8038A644 003875A4 28 04 00 00 */ cmplwi r4, 0 +/* 8038A648 003875A8 41 82 00 14 */ beq lbl_8038A65C +/* 8038A64C 003875AC 80 1E 00 00 */ lwz r0, 0(r30) +/* 8038A650 003875B0 90 04 00 00 */ stw r0, 0(r4) +/* 8038A654 003875B4 80 64 00 00 */ lwz r3, 0(r4) +/* 8038A658 003875B8 90 83 00 04 */ stw r4, 4(r3) +lbl_8038A65C: +/* 8038A65C 003875BC 38 00 00 00 */ li r0, 0 +/* 8038A660 003875C0 7F C3 F3 78 */ mr r3, r30 +/* 8038A664 003875C4 90 1E 00 04 */ stw r0, 4(r30) +/* 8038A668 003875C8 90 1E 00 00 */ stw r0, 0(r30) +/* 8038A66C 003875CC 4B C7 DE 19 */ bl sub_80008484 +lbl_8038A670: +/* 8038A670 003875D0 80 01 00 14 */ lwz r0, 0x14(r1) +/* 8038A674 003875D4 83 E1 00 0C */ lwz r31, 0xc(r1) +/* 8038A678 003875D8 83 C1 00 08 */ lwz r30, 8(r1) +/* 8038A67C 003875DC 7C 08 03 A6 */ mtlr r0 +/* 8038A680 003875E0 38 21 00 10 */ addi r1, r1, 0x10 +/* 8038A684 003875E4 4E 80 00 20 */ blr + +.global sub_8038a688 +sub_8038a688: +/* 8038A688 003875E8 94 21 FF D0 */ stwu r1, -0x30(r1) +/* 8038A68C 003875EC 7C 08 02 A6 */ mflr r0 +/* 8038A690 003875F0 3C A0 80 3E */ lis r5, lbl_803D85C0@ha +/* 8038A694 003875F4 90 01 00 34 */ stw r0, 0x34(r1) +/* 8038A698 003875F8 BF 01 00 10 */ stmw r24, 0x10(r1) +/* 8038A69C 003875FC 7C 7B 1B 78 */ mr r27, r3 +/* 8038A6A0 00387600 38 65 85 C0 */ addi r3, r5, lbl_803D85C0@l +/* 8038A6A4 00387604 3B E0 00 00 */ li r31, 0 +/* 8038A6A8 00387608 48 00 00 0C */ b lbl_8038A6B4 +lbl_8038A6AC: +/* 8038A6AC 0038760C 38 63 00 04 */ addi r3, r3, 4 +/* 8038A6B0 00387610 3B FF 00 01 */ addi r31, r31, 1 +lbl_8038A6B4: +/* 8038A6B4 00387614 80 03 00 00 */ lwz r0, 0(r3) +/* 8038A6B8 00387618 7C 04 00 40 */ cmplw r4, r0 +/* 8038A6BC 0038761C 41 81 FF F0 */ bgt lbl_8038A6AC +/* 8038A6C0 00387620 57 E3 18 38 */ slwi r3, r31, 3 +/* 8038A6C4 00387624 3B C3 00 04 */ addi r30, r3, 4 +/* 8038A6C8 00387628 7F DB F2 14 */ add r30, r27, r30 +/* 8038A6CC 0038762C 80 7E 00 04 */ lwz r3, 4(r30) +/* 8038A6D0 00387630 28 03 00 00 */ cmplwi r3, 0 +/* 8038A6D4 00387634 41 82 00 10 */ beq lbl_8038A6E4 +/* 8038A6D8 00387638 80 03 00 0C */ lwz r0, 0xc(r3) +/* 8038A6DC 0038763C 28 00 00 00 */ cmplwi r0, 0 +/* 8038A6E0 00387640 40 82 01 10 */ bne lbl_8038A7F0 +lbl_8038A6E4: +/* 8038A6E4 00387644 3C 60 80 3E */ lis r3, lbl_803D85C0@ha +/* 8038A6E8 00387648 57 F9 10 3A */ slwi r25, r31, 2 +/* 8038A6EC 0038764C 3B 43 85 C0 */ addi r26, r3, lbl_803D85C0@l +/* 8038A6F0 00387650 38 80 0F EC */ li r4, 0xfec +/* 8038A6F4 00387654 7C 7A C8 2E */ lwzx r3, r26, r25 +/* 8038A6F8 00387658 38 03 00 04 */ addi r0, r3, 4 +/* 8038A6FC 0038765C 7F 04 03 96 */ divwu r24, r4, r0 +/* 8038A700 00387660 28 18 01 00 */ cmplwi r24, 0x100 +/* 8038A704 00387664 40 81 00 08 */ ble lbl_8038A70C +/* 8038A708 00387668 3B 00 01 00 */ li r24, 0x100 +lbl_8038A70C: +/* 8038A70C 0038766C 7F 1C C3 78 */ mr r28, r24 +/* 8038A710 00387670 48 00 00 4C */ b lbl_8038A75C +lbl_8038A714: +/* 8038A714 00387674 7C 9A C8 2E */ lwzx r4, r26, r25 +/* 8038A718 00387678 7F 63 DB 78 */ mr r3, r27 +/* 8038A71C 0038767C 38 A1 00 08 */ addi r5, r1, 8 +/* 8038A720 00387680 38 04 00 04 */ addi r0, r4, 4 +/* 8038A724 00387684 7C 98 01 D6 */ mullw r4, r24, r0 +/* 8038A728 00387688 38 84 00 14 */ addi r4, r4, 0x14 +/* 8038A72C 0038768C 48 00 02 49 */ bl soft_allocate_from_var_pools +/* 8038A730 00387690 7C 7D 1B 79 */ or. r29, r3, r3 +/* 8038A734 00387694 40 82 00 30 */ bne lbl_8038A764 +/* 8038A738 00387698 80 81 00 08 */ lwz r4, 8(r1) +/* 8038A73C 0038769C 28 04 00 14 */ cmplwi r4, 0x14 +/* 8038A740 003876A0 40 81 00 18 */ ble lbl_8038A758 +/* 8038A744 003876A4 7C 7A C8 2E */ lwzx r3, r26, r25 +/* 8038A748 003876A8 38 84 FF EC */ addi r4, r4, -20 +/* 8038A74C 003876AC 38 03 00 04 */ addi r0, r3, 4 +/* 8038A750 003876B0 7F 04 03 96 */ divwu r24, r4, r0 +/* 8038A754 003876B4 48 00 00 08 */ b lbl_8038A75C +lbl_8038A758: +/* 8038A758 003876B8 3B 00 00 00 */ li r24, 0 +lbl_8038A75C: +/* 8038A75C 003876BC 28 18 00 0A */ cmplwi r24, 0xa +/* 8038A760 003876C0 40 80 FF B4 */ bge lbl_8038A714 +lbl_8038A764: +/* 8038A764 003876C4 28 1D 00 00 */ cmplwi r29, 0 +/* 8038A768 003876C8 40 82 00 34 */ bne lbl_8038A79C +/* 8038A76C 003876CC 7C 18 E0 40 */ cmplw r24, r28 +/* 8038A770 003876D0 40 80 00 2C */ bge lbl_8038A79C +/* 8038A774 003876D4 7C 9A C8 2E */ lwzx r4, r26, r25 +/* 8038A778 003876D8 7F 63 DB 78 */ mr r3, r27 +/* 8038A77C 003876DC 38 04 00 04 */ addi r0, r4, 4 +/* 8038A780 003876E0 7C 9C 01 D6 */ mullw r4, r28, r0 +/* 8038A784 003876E4 38 84 00 14 */ addi r4, r4, 0x14 +/* 8038A788 003876E8 48 00 02 C5 */ bl sub_8038aa4c +/* 8038A78C 003876EC 7C 7D 1B 79 */ or. r29, r3, r3 +/* 8038A790 003876F0 40 82 00 0C */ bne lbl_8038A79C +/* 8038A794 003876F4 38 60 00 00 */ li r3, 0 +/* 8038A798 003876F8 48 00 00 A0 */ b lbl_8038A838 +lbl_8038A79C: +/* 8038A79C 003876FC 80 7D FF FC */ lwz r3, -4(r29) +/* 8038A7A0 00387700 54 60 07 FF */ clrlwi. r0, r3, 0x1f +/* 8038A7A4 00387704 40 82 00 0C */ bne lbl_8038A7B0 +/* 8038A7A8 00387708 81 03 00 08 */ lwz r8, 8(r3) +/* 8038A7AC 0038770C 48 00 00 10 */ b lbl_8038A7BC +lbl_8038A7B0: +/* 8038A7B0 00387710 80 1D FF F8 */ lwz r0, -8(r29) +/* 8038A7B4 00387714 54 03 00 38 */ rlwinm r3, r0, 0, 0, 0x1c +/* 8038A7B8 00387718 39 03 FF F8 */ addi r8, r3, -8 +lbl_8038A7BC: +/* 8038A7BC 0038771C 80 1E 00 04 */ lwz r0, 4(r30) +/* 8038A7C0 00387720 28 00 00 00 */ cmplwi r0, 0 +/* 8038A7C4 00387724 40 82 00 0C */ bne lbl_8038A7D0 +/* 8038A7C8 00387728 93 BE 00 04 */ stw r29, 4(r30) +/* 8038A7CC 0038772C 93 BE 00 00 */ stw r29, 0(r30) +lbl_8038A7D0: +/* 8038A7D0 00387730 80 9E 00 00 */ lwz r4, 0(r30) +/* 8038A7D4 00387734 7F A3 EB 78 */ mr r3, r29 +/* 8038A7D8 00387738 80 BE 00 04 */ lwz r5, 4(r30) +/* 8038A7DC 0038773C 7F E6 FB 78 */ mr r6, r31 +/* 8038A7E0 00387740 38 FD 00 14 */ addi r7, r29, 0x14 +/* 8038A7E4 00387744 39 08 FF EC */ addi r8, r8, -20 +/* 8038A7E8 00387748 48 00 00 65 */ bl sub_8038a84c +/* 8038A7EC 0038774C 93 BE 00 04 */ stw r29, 4(r30) +lbl_8038A7F0: +/* 8038A7F0 00387750 80 7E 00 04 */ lwz r3, 4(r30) +/* 8038A7F4 00387754 80 A3 00 0C */ lwz r5, 0xc(r3) +/* 8038A7F8 00387758 80 05 00 04 */ lwz r0, 4(r5) +/* 8038A7FC 0038775C 90 03 00 0C */ stw r0, 0xc(r3) +/* 8038A800 00387760 80 9E 00 04 */ lwz r4, 4(r30) +/* 8038A804 00387764 80 64 00 10 */ lwz r3, 0x10(r4) +/* 8038A808 00387768 38 03 00 01 */ addi r0, r3, 1 +/* 8038A80C 0038776C 90 04 00 10 */ stw r0, 0x10(r4) +/* 8038A810 00387770 80 7E 00 04 */ lwz r3, 4(r30) +/* 8038A814 00387774 80 03 00 0C */ lwz r0, 0xc(r3) +/* 8038A818 00387778 28 00 00 00 */ cmplwi r0, 0 +/* 8038A81C 0038777C 40 82 00 18 */ bne lbl_8038A834 +/* 8038A820 00387780 80 03 00 04 */ lwz r0, 4(r3) +/* 8038A824 00387784 90 1E 00 04 */ stw r0, 4(r30) +/* 8038A828 00387788 80 7E 00 00 */ lwz r3, 0(r30) +/* 8038A82C 0038778C 80 03 00 04 */ lwz r0, 4(r3) +/* 8038A830 00387790 90 1E 00 00 */ stw r0, 0(r30) +lbl_8038A834: +/* 8038A834 00387794 38 65 00 04 */ addi r3, r5, 4 +lbl_8038A838: +/* 8038A838 00387798 BB 01 00 10 */ lmw r24, 0x10(r1) +/* 8038A83C 0038779C 80 01 00 34 */ lwz r0, 0x34(r1) +/* 8038A840 003877A0 7C 08 03 A6 */ mtlr r0 +/* 8038A844 003877A4 38 21 00 30 */ addi r1, r1, 0x30 +/* 8038A848 003877A8 4E 80 00 20 */ blr + +.global sub_8038a84c +sub_8038a84c: +/* 8038A84C 003877AC 3D 20 80 3E */ lis r9, lbl_803D85C0@ha +/* 8038A850 003877B0 54 C0 10 3A */ slwi r0, r6, 2 +/* 8038A854 003877B4 38 C9 85 C0 */ addi r6, r9, lbl_803D85C0@l +/* 8038A858 003877B8 90 83 00 00 */ stw r4, 0(r3) +/* 8038A85C 003877BC 7C C6 00 2E */ lwzx r6, r6, r0 +/* 8038A860 003877C0 7C E9 3B 78 */ mr r9, r7 +/* 8038A864 003877C4 90 A3 00 04 */ stw r5, 4(r3) +/* 8038A868 003877C8 39 60 00 00 */ li r11, 0 +/* 8038A86C 003877CC 39 46 00 04 */ addi r10, r6, 4 +/* 8038A870 003877D0 7D 08 53 96 */ divwu r8, r8, r10 +/* 8038A874 003877D4 90 64 00 04 */ stw r3, 4(r4) +/* 8038A878 003877D8 90 65 00 00 */ stw r3, 0(r5) +/* 8038A87C 003877DC 90 C3 00 08 */ stw r6, 8(r3) +/* 8038A880 003877E0 38 08 FF FF */ addi r0, r8, -1 +/* 8038A884 003877E4 28 00 00 00 */ cmplwi r0, 0 +/* 8038A888 003877E8 40 81 00 D4 */ ble lbl_8038A95C +/* 8038A88C 003877EC 28 00 00 08 */ cmplwi r0, 8 +/* 8038A890 003877F0 38 88 FF F7 */ addi r4, r8, -9 +/* 8038A894 003877F4 40 81 00 A0 */ ble lbl_8038A934 +/* 8038A898 003877F8 38 04 00 07 */ addi r0, r4, 7 +/* 8038A89C 003877FC 54 00 E8 FE */ srwi r0, r0, 3 +/* 8038A8A0 00387800 7C 09 03 A6 */ mtctr r0 +/* 8038A8A4 00387804 28 04 00 00 */ cmplwi r4, 0 +/* 8038A8A8 00387808 40 81 00 8C */ ble lbl_8038A934 +lbl_8038A8AC: +/* 8038A8AC 0038780C 90 69 00 00 */ stw r3, 0(r9) +/* 8038A8B0 00387810 7C 09 52 14 */ add r0, r9, r10 +/* 8038A8B4 00387814 7C 04 03 78 */ mr r4, r0 +/* 8038A8B8 00387818 39 6B 00 08 */ addi r11, r11, 8 +/* 8038A8BC 0038781C 90 09 00 04 */ stw r0, 4(r9) +/* 8038A8C0 00387820 7C 00 52 14 */ add r0, r0, r10 +/* 8038A8C4 00387824 7C 05 03 78 */ mr r5, r0 +/* 8038A8C8 00387828 90 64 00 00 */ stw r3, 0(r4) +/* 8038A8CC 0038782C 90 04 00 04 */ stw r0, 4(r4) +/* 8038A8D0 00387830 7C 00 52 14 */ add r0, r0, r10 +/* 8038A8D4 00387834 7C 04 03 78 */ mr r4, r0 +/* 8038A8D8 00387838 90 65 00 00 */ stw r3, 0(r5) +/* 8038A8DC 0038783C 90 05 00 04 */ stw r0, 4(r5) +/* 8038A8E0 00387840 7C 00 52 14 */ add r0, r0, r10 +/* 8038A8E4 00387844 7C 05 03 78 */ mr r5, r0 +/* 8038A8E8 00387848 90 64 00 00 */ stw r3, 0(r4) +/* 8038A8EC 0038784C 90 04 00 04 */ stw r0, 4(r4) +/* 8038A8F0 00387850 7C 00 52 14 */ add r0, r0, r10 +/* 8038A8F4 00387854 7C 04 03 78 */ mr r4, r0 +/* 8038A8F8 00387858 90 65 00 00 */ stw r3, 0(r5) +/* 8038A8FC 0038785C 90 05 00 04 */ stw r0, 4(r5) +/* 8038A900 00387860 7C 00 52 14 */ add r0, r0, r10 +/* 8038A904 00387864 7C 05 03 78 */ mr r5, r0 +/* 8038A908 00387868 90 64 00 00 */ stw r3, 0(r4) +/* 8038A90C 0038786C 90 04 00 04 */ stw r0, 4(r4) +/* 8038A910 00387870 7C 00 52 14 */ add r0, r0, r10 +/* 8038A914 00387874 7C 04 03 78 */ mr r4, r0 +/* 8038A918 00387878 90 65 00 00 */ stw r3, 0(r5) +/* 8038A91C 0038787C 90 05 00 04 */ stw r0, 4(r5) +/* 8038A920 00387880 7C 00 52 14 */ add r0, r0, r10 +/* 8038A924 00387884 7C 09 03 78 */ mr r9, r0 +/* 8038A928 00387888 90 64 00 00 */ stw r3, 0(r4) +/* 8038A92C 0038788C 90 04 00 04 */ stw r0, 4(r4) +/* 8038A930 00387890 42 00 FF 7C */ bdnz lbl_8038A8AC +lbl_8038A934: +/* 8038A934 00387894 38 88 FF FF */ addi r4, r8, -1 +/* 8038A938 00387898 7C 0B 20 50 */ subf r0, r11, r4 +/* 8038A93C 0038789C 7C 09 03 A6 */ mtctr r0 +/* 8038A940 003878A0 7C 0B 20 40 */ cmplw r11, r4 +/* 8038A944 003878A4 40 80 00 18 */ bge lbl_8038A95C +lbl_8038A948: +/* 8038A948 003878A8 90 69 00 00 */ stw r3, 0(r9) +/* 8038A94C 003878AC 7C 09 52 14 */ add r0, r9, r10 +/* 8038A950 003878B0 90 09 00 04 */ stw r0, 4(r9) +/* 8038A954 003878B4 7C 09 03 78 */ mr r9, r0 +/* 8038A958 003878B8 42 00 FF F0 */ bdnz lbl_8038A948 +lbl_8038A95C: +/* 8038A95C 003878BC 90 69 00 00 */ stw r3, 0(r9) +/* 8038A960 003878C0 38 00 00 00 */ li r0, 0 +/* 8038A964 003878C4 90 09 00 04 */ stw r0, 4(r9) +/* 8038A968 003878C8 90 E3 00 0C */ stw r7, 0xc(r3) +/* 8038A96C 003878CC 90 03 00 10 */ stw r0, 0x10(r3) +/* 8038A970 003878D0 4E 80 00 20 */ blr + +.global soft_allocate_from_var_pools +soft_allocate_from_var_pools: +/* 8038A974 003878D4 94 21 FF E0 */ stwu r1, -0x20(r1) +/* 8038A978 003878D8 7C 08 02 A6 */ mflr r0 +/* 8038A97C 003878DC 90 01 00 24 */ stw r0, 0x24(r1) +/* 8038A980 003878E0 38 04 00 0F */ addi r0, r4, 0xf +/* 8038A984 003878E4 93 E1 00 1C */ stw r31, 0x1c(r1) +/* 8038A988 003878E8 93 C1 00 18 */ stw r30, 0x18(r1) +/* 8038A98C 003878EC 7C BE 2B 78 */ mr r30, r5 +/* 8038A990 003878F0 93 A1 00 14 */ stw r29, 0x14(r1) +/* 8038A994 003878F4 54 1D 00 38 */ rlwinm r29, r0, 0, 0, 0x1c +/* 8038A998 003878F8 28 1D 00 50 */ cmplwi r29, 0x50 +/* 8038A99C 003878FC 93 81 00 10 */ stw r28, 0x10(r1) +/* 8038A9A0 00387900 7C 7C 1B 78 */ mr r28, r3 +/* 8038A9A4 00387904 40 80 00 08 */ bge lbl_8038A9AC +/* 8038A9A8 00387908 3B A0 00 50 */ li r29, 0x50 +lbl_8038A9AC: +/* 8038A9AC 0038790C 38 00 00 00 */ li r0, 0 +/* 8038A9B0 00387910 90 1E 00 00 */ stw r0, 0(r30) +/* 8038A9B4 00387914 83 FC 00 00 */ lwz r31, 0(r28) +/* 8038A9B8 00387918 28 1F 00 00 */ cmplwi r31, 0 +/* 8038A9BC 0038791C 40 82 00 0C */ bne lbl_8038A9C8 +/* 8038A9C0 00387920 38 60 00 00 */ li r3, 0 +/* 8038A9C4 00387924 48 00 00 68 */ b lbl_8038AA2C +lbl_8038A9C8: +/* 8038A9C8 00387928 80 1F 00 08 */ lwz r0, 8(r31) +/* 8038A9CC 0038792C 7C 1D 00 40 */ cmplw r29, r0 +/* 8038A9D0 00387930 41 81 00 20 */ bgt lbl_8038A9F0 +/* 8038A9D4 00387934 7F E3 FB 78 */ mr r3, r31 +/* 8038A9D8 00387938 7F A4 EB 78 */ mr r4, r29 +/* 8038A9DC 0038793C 48 00 04 F1 */ bl sub_8038aecc +/* 8038A9E0 00387940 28 03 00 00 */ cmplwi r3, 0 +/* 8038A9E4 00387944 41 82 00 0C */ beq lbl_8038A9F0 +/* 8038A9E8 00387948 93 FC 00 00 */ stw r31, 0(r28) +/* 8038A9EC 0038794C 48 00 00 3C */ b lbl_8038AA28 +lbl_8038A9F0: +/* 8038A9F0 00387950 80 7F 00 08 */ lwz r3, 8(r31) +/* 8038A9F4 00387954 28 03 00 08 */ cmplwi r3, 8 +/* 8038A9F8 00387958 40 81 00 18 */ ble lbl_8038AA10 +/* 8038A9FC 0038795C 80 1E 00 00 */ lwz r0, 0(r30) +/* 8038AA00 00387960 38 63 FF F8 */ addi r3, r3, -8 +/* 8038AA04 00387964 7C 00 18 40 */ cmplw r0, r3 +/* 8038AA08 00387968 40 80 00 08 */ bge lbl_8038AA10 +/* 8038AA0C 0038796C 90 7E 00 00 */ stw r3, 0(r30) +lbl_8038AA10: +/* 8038AA10 00387970 83 FF 00 04 */ lwz r31, 4(r31) +/* 8038AA14 00387974 80 1C 00 00 */ lwz r0, 0(r28) +/* 8038AA18 00387978 7C 1F 00 40 */ cmplw r31, r0 +/* 8038AA1C 0038797C 40 82 FF AC */ bne lbl_8038A9C8 +/* 8038AA20 00387980 38 60 00 00 */ li r3, 0 +/* 8038AA24 00387984 48 00 00 08 */ b lbl_8038AA2C +lbl_8038AA28: +/* 8038AA28 00387988 38 63 00 08 */ addi r3, r3, 8 +lbl_8038AA2C: +/* 8038AA2C 0038798C 80 01 00 24 */ lwz r0, 0x24(r1) +/* 8038AA30 00387990 83 E1 00 1C */ lwz r31, 0x1c(r1) +/* 8038AA34 00387994 83 C1 00 18 */ lwz r30, 0x18(r1) +/* 8038AA38 00387998 83 A1 00 14 */ lwz r29, 0x14(r1) +/* 8038AA3C 0038799C 83 81 00 10 */ lwz r28, 0x10(r1) +/* 8038AA40 003879A0 7C 08 03 A6 */ mtlr r0 +/* 8038AA44 003879A4 38 21 00 20 */ addi r1, r1, 0x20 +/* 8038AA48 003879A8 4E 80 00 20 */ blr + +.global sub_8038aa4c +sub_8038aa4c: +/* 8038AA4C 003879AC 94 21 FF E0 */ stwu r1, -0x20(r1) +/* 8038AA50 003879B0 7C 08 02 A6 */ mflr r0 +/* 8038AA54 003879B4 90 01 00 24 */ stw r0, 0x24(r1) +/* 8038AA58 003879B8 38 04 00 0F */ addi r0, r4, 0xf +/* 8038AA5C 003879BC 93 E1 00 1C */ stw r31, 0x1c(r1) +/* 8038AA60 003879C0 93 C1 00 18 */ stw r30, 0x18(r1) +/* 8038AA64 003879C4 54 1E 00 38 */ rlwinm r30, r0, 0, 0, 0x1c +/* 8038AA68 003879C8 28 1E 00 50 */ cmplwi r30, 0x50 +/* 8038AA6C 003879CC 93 A1 00 14 */ stw r29, 0x14(r1) +/* 8038AA70 003879D0 7C 7D 1B 78 */ mr r29, r3 +/* 8038AA74 003879D4 93 81 00 10 */ stw r28, 0x10(r1) +/* 8038AA78 003879D8 40 80 00 08 */ bge lbl_8038AA80 +/* 8038AA7C 003879DC 3B C0 00 50 */ li r30, 0x50 +lbl_8038AA80: +/* 8038AA80 003879E0 83 FD 00 00 */ lwz r31, 0(r29) +/* 8038AA84 003879E4 28 1F 00 00 */ cmplwi r31, 0 +/* 8038AA88 003879E8 41 82 00 08 */ beq lbl_8038AA90 +/* 8038AA8C 003879EC 48 00 00 C0 */ b lbl_8038AB4C +lbl_8038AA90: +/* 8038AA90 003879F0 38 7E 00 1F */ addi r3, r30, 0x1f +/* 8038AA94 003879F4 3C 00 00 01 */ lis r0, 1 +/* 8038AA98 003879F8 54 7C 00 38 */ rlwinm r28, r3, 0, 0, 0x1c +/* 8038AA9C 003879FC 7C 1C 00 40 */ cmplw r28, r0 +/* 8038AAA0 00387A00 40 80 00 08 */ bge lbl_8038AAA8 +/* 8038AAA4 00387A04 7C 1C 03 78 */ mr r28, r0 +lbl_8038AAA8: +/* 8038AAA8 00387A08 7F 83 E3 78 */ mr r3, r28 +/* 8038AAAC 00387A0C 4B C7 D9 F9 */ bl sub_800084a4 +/* 8038AAB0 00387A10 7C 7F 1B 79 */ or. r31, r3, r3 +/* 8038AAB4 00387A14 40 82 00 0C */ bne lbl_8038AAC0 +/* 8038AAB8 00387A18 3B E0 00 00 */ li r31, 0 +/* 8038AABC 00387A1C 48 00 00 90 */ b lbl_8038AB4C +lbl_8038AAC0: +/* 8038AAC0 00387A20 63 80 00 03 */ ori r0, r28, 3 +/* 8038AAC4 00387A24 38 9F 00 10 */ addi r4, r31, 0x10 +/* 8038AAC8 00387A28 90 1F 00 0C */ stw r0, 0xc(r31) +/* 8038AACC 00387A2C 39 1C FF F8 */ addi r8, r28, -8 +/* 8038AAD0 00387A30 63 E7 00 01 */ ori r7, r31, 1 +/* 8038AAD4 00387A34 38 1C FF E8 */ addi r0, r28, -24 +/* 8038AAD8 00387A38 81 3F 00 0C */ lwz r9, 0xc(r31) +/* 8038AADC 00387A3C 7C BC 22 14 */ add r5, r28, r4 +/* 8038AAE0 00387A40 38 C0 00 00 */ li r6, 0 +/* 8038AAE4 00387A44 7D 3F 41 2E */ stwx r9, r31, r8 +/* 8038AAE8 00387A48 90 FF 00 14 */ stw r7, 0x14(r31) +/* 8038AAEC 00387A4C 90 1F 00 10 */ stw r0, 0x10(r31) +/* 8038AAF0 00387A50 90 05 FF E4 */ stw r0, -0x1c(r5) +/* 8038AAF4 00387A54 90 1F 00 08 */ stw r0, 8(r31) +/* 8038AAF8 00387A58 80 1F 00 0C */ lwz r0, 0xc(r31) +/* 8038AAFC 00387A5C 54 05 00 38 */ rlwinm r5, r0, 0, 0, 0x1c +/* 8038AB00 00387A60 38 05 FF FC */ addi r0, r5, -4 +/* 8038AB04 00387A64 7C DF 01 2E */ stwx r6, r31, r0 +/* 8038AB08 00387A68 48 00 02 49 */ bl sub_8038ad50 +/* 8038AB0C 00387A6C 80 7D 00 00 */ lwz r3, 0(r29) +/* 8038AB10 00387A70 28 03 00 00 */ cmplwi r3, 0 +/* 8038AB14 00387A74 41 82 00 2C */ beq lbl_8038AB40 +/* 8038AB18 00387A78 80 03 00 00 */ lwz r0, 0(r3) +/* 8038AB1C 00387A7C 90 1F 00 00 */ stw r0, 0(r31) +/* 8038AB20 00387A80 80 7F 00 00 */ lwz r3, 0(r31) +/* 8038AB24 00387A84 93 E3 00 04 */ stw r31, 4(r3) +/* 8038AB28 00387A88 80 1D 00 00 */ lwz r0, 0(r29) +/* 8038AB2C 00387A8C 90 1F 00 04 */ stw r0, 4(r31) +/* 8038AB30 00387A90 80 7D 00 00 */ lwz r3, 0(r29) +/* 8038AB34 00387A94 93 E3 00 00 */ stw r31, 0(r3) +/* 8038AB38 00387A98 93 FD 00 00 */ stw r31, 0(r29) +/* 8038AB3C 00387A9C 48 00 00 10 */ b lbl_8038AB4C +lbl_8038AB40: +/* 8038AB40 00387AA0 93 FD 00 00 */ stw r31, 0(r29) +/* 8038AB44 00387AA4 93 FF 00 00 */ stw r31, 0(r31) +/* 8038AB48 00387AA8 93 FF 00 04 */ stw r31, 4(r31) +lbl_8038AB4C: +/* 8038AB4C 00387AAC 28 1F 00 00 */ cmplwi r31, 0 +/* 8038AB50 00387AB0 7F FC FB 78 */ mr r28, r31 +/* 8038AB54 00387AB4 40 82 00 0C */ bne lbl_8038AB60 +/* 8038AB58 00387AB8 38 60 00 00 */ li r3, 0 +/* 8038AB5C 00387ABC 48 00 01 18 */ b lbl_8038AC74 +lbl_8038AB60: +/* 8038AB60 00387AC0 80 1C 00 08 */ lwz r0, 8(r28) +/* 8038AB64 00387AC4 7C 1E 00 40 */ cmplw r30, r0 +/* 8038AB68 00387AC8 41 81 00 20 */ bgt lbl_8038AB88 +/* 8038AB6C 00387ACC 7F 83 E3 78 */ mr r3, r28 +/* 8038AB70 00387AD0 7F C4 F3 78 */ mr r4, r30 +/* 8038AB74 00387AD4 48 00 03 59 */ bl sub_8038aecc +/* 8038AB78 00387AD8 28 03 00 00 */ cmplwi r3, 0 +/* 8038AB7C 00387ADC 41 82 00 0C */ beq lbl_8038AB88 +/* 8038AB80 00387AE0 93 9D 00 00 */ stw r28, 0(r29) +/* 8038AB84 00387AE4 48 00 00 EC */ b lbl_8038AC70 +lbl_8038AB88: +/* 8038AB88 00387AE8 83 9C 00 04 */ lwz r28, 4(r28) +/* 8038AB8C 00387AEC 80 1D 00 00 */ lwz r0, 0(r29) +/* 8038AB90 00387AF0 7C 1C 00 40 */ cmplw r28, r0 +/* 8038AB94 00387AF4 40 82 FF CC */ bne lbl_8038AB60 +/* 8038AB98 00387AF8 38 7E 00 1F */ addi r3, r30, 0x1f +/* 8038AB9C 00387AFC 3C 00 00 01 */ lis r0, 1 +/* 8038ABA0 00387B00 54 7F 00 38 */ rlwinm r31, r3, 0, 0, 0x1c +/* 8038ABA4 00387B04 7C 1F 00 40 */ cmplw r31, r0 +/* 8038ABA8 00387B08 40 80 00 08 */ bge lbl_8038ABB0 +/* 8038ABAC 00387B0C 7C 1F 03 78 */ mr r31, r0 +lbl_8038ABB0: +/* 8038ABB0 00387B10 7F E3 FB 78 */ mr r3, r31 +/* 8038ABB4 00387B14 4B C7 D8 F1 */ bl sub_800084a4 +/* 8038ABB8 00387B18 7C 7C 1B 79 */ or. r28, r3, r3 +/* 8038ABBC 00387B1C 40 82 00 0C */ bne lbl_8038ABC8 +/* 8038ABC0 00387B20 3B 80 00 00 */ li r28, 0 +/* 8038ABC4 00387B24 48 00 00 90 */ b lbl_8038AC54 +lbl_8038ABC8: +/* 8038ABC8 00387B28 63 E0 00 03 */ ori r0, r31, 3 +/* 8038ABCC 00387B2C 38 9C 00 10 */ addi r4, r28, 0x10 +/* 8038ABD0 00387B30 90 1C 00 0C */ stw r0, 0xc(r28) +/* 8038ABD4 00387B34 39 1F FF F8 */ addi r8, r31, -8 +/* 8038ABD8 00387B38 63 87 00 01 */ ori r7, r28, 1 +/* 8038ABDC 00387B3C 38 1F FF E8 */ addi r0, r31, -24 +/* 8038ABE0 00387B40 81 3C 00 0C */ lwz r9, 0xc(r28) +/* 8038ABE4 00387B44 7C BF 22 14 */ add r5, r31, r4 +/* 8038ABE8 00387B48 38 C0 00 00 */ li r6, 0 +/* 8038ABEC 00387B4C 7D 3C 41 2E */ stwx r9, r28, r8 +/* 8038ABF0 00387B50 90 FC 00 14 */ stw r7, 0x14(r28) +/* 8038ABF4 00387B54 90 1C 00 10 */ stw r0, 0x10(r28) +/* 8038ABF8 00387B58 90 05 FF E4 */ stw r0, -0x1c(r5) +/* 8038ABFC 00387B5C 90 1C 00 08 */ stw r0, 8(r28) +/* 8038AC00 00387B60 80 1C 00 0C */ lwz r0, 0xc(r28) +/* 8038AC04 00387B64 54 05 00 38 */ rlwinm r5, r0, 0, 0, 0x1c +/* 8038AC08 00387B68 38 05 FF FC */ addi r0, r5, -4 +/* 8038AC0C 00387B6C 7C DC 01 2E */ stwx r6, r28, r0 +/* 8038AC10 00387B70 48 00 01 41 */ bl sub_8038ad50 +/* 8038AC14 00387B74 80 7D 00 00 */ lwz r3, 0(r29) +/* 8038AC18 00387B78 28 03 00 00 */ cmplwi r3, 0 +/* 8038AC1C 00387B7C 41 82 00 2C */ beq lbl_8038AC48 +/* 8038AC20 00387B80 80 03 00 00 */ lwz r0, 0(r3) +/* 8038AC24 00387B84 90 1C 00 00 */ stw r0, 0(r28) +/* 8038AC28 00387B88 80 7C 00 00 */ lwz r3, 0(r28) +/* 8038AC2C 00387B8C 93 83 00 04 */ stw r28, 4(r3) +/* 8038AC30 00387B90 80 1D 00 00 */ lwz r0, 0(r29) +/* 8038AC34 00387B94 90 1C 00 04 */ stw r0, 4(r28) +/* 8038AC38 00387B98 80 7D 00 00 */ lwz r3, 0(r29) +/* 8038AC3C 00387B9C 93 83 00 00 */ stw r28, 0(r3) +/* 8038AC40 00387BA0 93 9D 00 00 */ stw r28, 0(r29) +/* 8038AC44 00387BA4 48 00 00 10 */ b lbl_8038AC54 +lbl_8038AC48: +/* 8038AC48 00387BA8 93 9D 00 00 */ stw r28, 0(r29) +/* 8038AC4C 00387BAC 93 9C 00 00 */ stw r28, 0(r28) +/* 8038AC50 00387BB0 93 9C 00 04 */ stw r28, 4(r28) +lbl_8038AC54: +/* 8038AC54 00387BB4 28 1C 00 00 */ cmplwi r28, 0 +/* 8038AC58 00387BB8 40 82 00 0C */ bne lbl_8038AC64 +/* 8038AC5C 00387BBC 38 60 00 00 */ li r3, 0 +/* 8038AC60 00387BC0 48 00 00 14 */ b lbl_8038AC74 +lbl_8038AC64: +/* 8038AC64 00387BC4 7F 83 E3 78 */ mr r3, r28 +/* 8038AC68 00387BC8 7F C4 F3 78 */ mr r4, r30 +/* 8038AC6C 00387BCC 48 00 02 61 */ bl sub_8038aecc +lbl_8038AC70: +/* 8038AC70 00387BD0 38 63 00 08 */ addi r3, r3, 8 +lbl_8038AC74: +/* 8038AC74 00387BD4 80 01 00 24 */ lwz r0, 0x24(r1) +/* 8038AC78 00387BD8 83 E1 00 1C */ lwz r31, 0x1c(r1) +/* 8038AC7C 00387BDC 83 C1 00 18 */ lwz r30, 0x18(r1) +/* 8038AC80 00387BE0 83 A1 00 14 */ lwz r29, 0x14(r1) +/* 8038AC84 00387BE4 83 81 00 10 */ lwz r28, 0x10(r1) +/* 8038AC88 00387BE8 7C 08 03 A6 */ mtlr r0 +/* 8038AC8C 00387BEC 38 21 00 20 */ addi r1, r1, 0x20 +/* 8038AC90 00387BF0 4E 80 00 20 */ blr + +.global sub_8038ac94 +sub_8038ac94: +/* 8038AC94 00387BF4 80 C3 00 00 */ lwz r6, 0(r3) +/* 8038AC98 00387BF8 54 C8 00 38 */ rlwinm r8, r6, 0, 0, 0x1c +/* 8038AC9C 00387BFC 7C A3 42 14 */ add r5, r3, r8 +/* 8038ACA0 00387C00 80 E5 00 00 */ lwz r7, 0(r5) +/* 8038ACA4 00387C04 54 E0 07 BD */ rlwinm. r0, r7, 0, 0x1e, 0x1e +/* 8038ACA8 00387C08 4C 82 00 20 */ bnelr +/* 8038ACAC 00387C0C 54 C0 07 7E */ clrlwi r0, r6, 0x1d +/* 8038ACB0 00387C10 54 E6 00 38 */ rlwinm r6, r7, 0, 0, 0x1c +/* 8038ACB4 00387C14 90 03 00 00 */ stw r0, 0(r3) +/* 8038ACB8 00387C18 7C E8 32 14 */ add r7, r8, r6 +/* 8038ACBC 00387C1C 54 E0 00 38 */ rlwinm r0, r7, 0, 0, 0x1c +/* 8038ACC0 00387C20 80 C3 00 00 */ lwz r6, 0(r3) +/* 8038ACC4 00387C24 7C C0 03 78 */ or r0, r6, r0 +/* 8038ACC8 00387C28 90 03 00 00 */ stw r0, 0(r3) +/* 8038ACCC 00387C2C 80 03 00 00 */ lwz r0, 0(r3) +/* 8038ACD0 00387C30 54 00 07 BD */ rlwinm. r0, r0, 0, 0x1e, 0x1e +/* 8038ACD4 00387C34 40 82 00 0C */ bne lbl_8038ACE0 +/* 8038ACD8 00387C38 38 07 FF FC */ addi r0, r7, -4 +/* 8038ACDC 00387C3C 7C E3 01 2E */ stwx r7, r3, r0 +lbl_8038ACE0: +/* 8038ACE0 00387C40 80 03 00 00 */ lwz r0, 0(r3) +/* 8038ACE4 00387C44 54 00 07 BD */ rlwinm. r0, r0, 0, 0x1e, 0x1e +/* 8038ACE8 00387C48 40 82 00 18 */ bne lbl_8038AD00 +/* 8038ACEC 00387C4C 7C C3 38 2E */ lwzx r6, r3, r7 +/* 8038ACF0 00387C50 38 00 FF FB */ li r0, -5 +/* 8038ACF4 00387C54 7C C0 00 38 */ and r0, r6, r0 +/* 8038ACF8 00387C58 7C 03 39 2E */ stwx r0, r3, r7 +/* 8038ACFC 00387C5C 48 00 00 10 */ b lbl_8038AD0C +lbl_8038AD00: +/* 8038AD00 00387C60 7C 03 38 2E */ lwzx r0, r3, r7 +/* 8038AD04 00387C64 60 00 00 04 */ ori r0, r0, 4 +/* 8038AD08 00387C68 7C 03 39 2E */ stwx r0, r3, r7 +lbl_8038AD0C: +/* 8038AD0C 00387C6C 80 64 00 00 */ lwz r3, 0(r4) +/* 8038AD10 00387C70 7C 03 28 40 */ cmplw r3, r5 +/* 8038AD14 00387C74 40 82 00 0C */ bne lbl_8038AD20 +/* 8038AD18 00387C78 80 03 00 0C */ lwz r0, 0xc(r3) +/* 8038AD1C 00387C7C 90 04 00 00 */ stw r0, 0(r4) +lbl_8038AD20: +/* 8038AD20 00387C80 80 04 00 00 */ lwz r0, 0(r4) +/* 8038AD24 00387C84 7C 00 28 40 */ cmplw r0, r5 +/* 8038AD28 00387C88 40 82 00 0C */ bne lbl_8038AD34 +/* 8038AD2C 00387C8C 38 00 00 00 */ li r0, 0 +/* 8038AD30 00387C90 90 04 00 00 */ stw r0, 0(r4) +lbl_8038AD34: +/* 8038AD34 00387C94 80 05 00 08 */ lwz r0, 8(r5) +/* 8038AD38 00387C98 80 65 00 0C */ lwz r3, 0xc(r5) +/* 8038AD3C 00387C9C 90 03 00 08 */ stw r0, 8(r3) +/* 8038AD40 00387CA0 80 05 00 0C */ lwz r0, 0xc(r5) +/* 8038AD44 00387CA4 80 65 00 08 */ lwz r3, 8(r5) +/* 8038AD48 00387CA8 90 03 00 0C */ stw r0, 0xc(r3) +/* 8038AD4C 00387CAC 4E 80 00 20 */ blr + +.global sub_8038ad50 +sub_8038ad50: +/* 8038AD50 00387CB0 94 21 FF F0 */ stwu r1, -0x10(r1) +/* 8038AD54 00387CB4 7C 08 02 A6 */ mflr r0 +/* 8038AD58 00387CB8 38 A0 FF FD */ li r5, -3 +/* 8038AD5C 00387CBC 90 01 00 14 */ stw r0, 0x14(r1) +/* 8038AD60 00387CC0 38 00 FF FB */ li r0, -5 +/* 8038AD64 00387CC4 93 E1 00 0C */ stw r31, 0xc(r1) +/* 8038AD68 00387CC8 93 C1 00 08 */ stw r30, 8(r1) +/* 8038AD6C 00387CCC 7C 7E 1B 78 */ mr r30, r3 +/* 8038AD70 00387CD0 80 C4 00 00 */ lwz r6, 0(r4) +/* 8038AD74 00387CD4 7C C3 28 38 */ and r3, r6, r5 +/* 8038AD78 00387CD8 54 C6 00 38 */ rlwinm r6, r6, 0, 0, 0x1c +/* 8038AD7C 00387CDC 90 64 00 00 */ stw r3, 0(r4) +/* 8038AD80 00387CE0 7C A4 32 14 */ add r5, r4, r6 +/* 8038AD84 00387CE4 80 65 00 00 */ lwz r3, 0(r5) +/* 8038AD88 00387CE8 7C 60 00 38 */ and r0, r3, r0 +/* 8038AD8C 00387CEC 90 05 00 00 */ stw r0, 0(r5) +/* 8038AD90 00387CF0 90 C5 FF FC */ stw r6, -4(r5) +/* 8038AD94 00387CF4 80 1E 00 0C */ lwz r0, 0xc(r30) +/* 8038AD98 00387CF8 54 03 00 38 */ rlwinm r3, r0, 0, 0, 0x1c +/* 8038AD9C 00387CFC 3B E3 FF FC */ addi r31, r3, -4 +/* 8038ADA0 00387D00 7F FE FA 14 */ add r31, r30, r31 +/* 8038ADA4 00387D04 80 7F 00 00 */ lwz r3, 0(r31) +/* 8038ADA8 00387D08 28 03 00 00 */ cmplwi r3, 0 +/* 8038ADAC 00387D0C 41 82 00 E0 */ beq lbl_8038AE8C +/* 8038ADB0 00387D10 80 03 00 08 */ lwz r0, 8(r3) +/* 8038ADB4 00387D14 90 04 00 08 */ stw r0, 8(r4) +/* 8038ADB8 00387D18 80 64 00 08 */ lwz r3, 8(r4) +/* 8038ADBC 00387D1C 90 83 00 0C */ stw r4, 0xc(r3) +/* 8038ADC0 00387D20 80 1F 00 00 */ lwz r0, 0(r31) +/* 8038ADC4 00387D24 90 04 00 0C */ stw r0, 0xc(r4) +/* 8038ADC8 00387D28 80 7F 00 00 */ lwz r3, 0(r31) +/* 8038ADCC 00387D2C 90 83 00 08 */ stw r4, 8(r3) +/* 8038ADD0 00387D30 90 9F 00 00 */ stw r4, 0(r31) +/* 8038ADD4 00387D34 80 DF 00 00 */ lwz r6, 0(r31) +/* 8038ADD8 00387D38 80 06 00 00 */ lwz r0, 0(r6) +/* 8038ADDC 00387D3C 54 00 07 7B */ rlwinm. r0, r0, 0, 0x1d, 0x1d +/* 8038ADE0 00387D40 40 82 00 94 */ bne lbl_8038AE74 +/* 8038ADE4 00387D44 80 A6 FF FC */ lwz r5, -4(r6) +/* 8038ADE8 00387D48 54 A0 07 BD */ rlwinm. r0, r5, 0, 0x1e, 0x1e +/* 8038ADEC 00387D4C 41 82 00 0C */ beq lbl_8038ADF8 +/* 8038ADF0 00387D50 7C C4 33 78 */ mr r4, r6 +/* 8038ADF4 00387D54 48 00 00 84 */ b lbl_8038AE78 +lbl_8038ADF8: +/* 8038ADF8 00387D58 7C 85 30 50 */ subf r4, r5, r6 +/* 8038ADFC 00387D5C 80 04 00 00 */ lwz r0, 0(r4) +/* 8038AE00 00387D60 54 00 07 7E */ clrlwi r0, r0, 0x1d +/* 8038AE04 00387D64 90 04 00 00 */ stw r0, 0(r4) +/* 8038AE08 00387D68 80 06 00 00 */ lwz r0, 0(r6) +/* 8038AE0C 00387D6C 80 64 00 00 */ lwz r3, 0(r4) +/* 8038AE10 00387D70 54 00 00 38 */ rlwinm r0, r0, 0, 0, 0x1c +/* 8038AE14 00387D74 7C 05 02 14 */ add r0, r5, r0 +/* 8038AE18 00387D78 54 00 00 38 */ rlwinm r0, r0, 0, 0, 0x1c +/* 8038AE1C 00387D7C 7C 60 03 78 */ or r0, r3, r0 +/* 8038AE20 00387D80 90 04 00 00 */ stw r0, 0(r4) +/* 8038AE24 00387D84 80 04 00 00 */ lwz r0, 0(r4) +/* 8038AE28 00387D88 54 00 07 BD */ rlwinm. r0, r0, 0, 0x1e, 0x1e +/* 8038AE2C 00387D8C 40 82 00 18 */ bne lbl_8038AE44 +/* 8038AE30 00387D90 80 06 00 00 */ lwz r0, 0(r6) +/* 8038AE34 00387D94 54 00 00 38 */ rlwinm r0, r0, 0, 0, 0x1c +/* 8038AE38 00387D98 7C 65 02 14 */ add r3, r5, r0 +/* 8038AE3C 00387D9C 38 03 FF FC */ addi r0, r3, -4 +/* 8038AE40 00387DA0 7C 64 01 2E */ stwx r3, r4, r0 +lbl_8038AE44: +/* 8038AE44 00387DA4 80 7F 00 00 */ lwz r3, 0(r31) +/* 8038AE48 00387DA8 7C 03 30 40 */ cmplw r3, r6 +/* 8038AE4C 00387DAC 40 82 00 0C */ bne lbl_8038AE58 +/* 8038AE50 00387DB0 80 03 00 0C */ lwz r0, 0xc(r3) +/* 8038AE54 00387DB4 90 1F 00 00 */ stw r0, 0(r31) +lbl_8038AE58: +/* 8038AE58 00387DB8 80 06 00 08 */ lwz r0, 8(r6) +/* 8038AE5C 00387DBC 80 66 00 0C */ lwz r3, 0xc(r6) +/* 8038AE60 00387DC0 90 03 00 08 */ stw r0, 8(r3) +/* 8038AE64 00387DC4 80 A6 00 0C */ lwz r5, 0xc(r6) +/* 8038AE68 00387DC8 80 65 00 08 */ lwz r3, 8(r5) +/* 8038AE6C 00387DCC 90 A3 00 0C */ stw r5, 0xc(r3) +/* 8038AE70 00387DD0 48 00 00 08 */ b lbl_8038AE78 +lbl_8038AE74: +/* 8038AE74 00387DD4 7C C4 33 78 */ mr r4, r6 +lbl_8038AE78: +/* 8038AE78 00387DD8 90 9F 00 00 */ stw r4, 0(r31) +/* 8038AE7C 00387DDC 7F E4 FB 78 */ mr r4, r31 +/* 8038AE80 00387DE0 80 7F 00 00 */ lwz r3, 0(r31) +/* 8038AE84 00387DE4 4B FF FE 11 */ bl sub_8038ac94 +/* 8038AE88 00387DE8 48 00 00 10 */ b lbl_8038AE98 +lbl_8038AE8C: +/* 8038AE8C 00387DEC 90 9F 00 00 */ stw r4, 0(r31) +/* 8038AE90 00387DF0 90 84 00 08 */ stw r4, 8(r4) +/* 8038AE94 00387DF4 90 84 00 0C */ stw r4, 0xc(r4) +lbl_8038AE98: +/* 8038AE98 00387DF8 80 7F 00 00 */ lwz r3, 0(r31) +/* 8038AE9C 00387DFC 80 9E 00 08 */ lwz r4, 8(r30) +/* 8038AEA0 00387E00 80 03 00 00 */ lwz r0, 0(r3) +/* 8038AEA4 00387E04 54 00 00 38 */ rlwinm r0, r0, 0, 0, 0x1c +/* 8038AEA8 00387E08 7C 04 00 40 */ cmplw r4, r0 +/* 8038AEAC 00387E0C 40 80 00 08 */ bge lbl_8038AEB4 +/* 8038AEB0 00387E10 90 1E 00 08 */ stw r0, 8(r30) +lbl_8038AEB4: +/* 8038AEB4 00387E14 80 01 00 14 */ lwz r0, 0x14(r1) +/* 8038AEB8 00387E18 83 E1 00 0C */ lwz r31, 0xc(r1) +/* 8038AEBC 00387E1C 83 C1 00 08 */ lwz r30, 8(r1) +/* 8038AEC0 00387E20 7C 08 03 A6 */ mtlr r0 +/* 8038AEC4 00387E24 38 21 00 10 */ addi r1, r1, 0x10 +/* 8038AEC8 00387E28 4E 80 00 20 */ blr + +.global sub_8038aecc +sub_8038aecc: +/* 8038AECC 00387E2C 80 03 00 0C */ lwz r0, 0xc(r3) +/* 8038AED0 00387E30 54 05 00 38 */ rlwinm r5, r0, 0, 0, 0x1c +/* 8038AED4 00387E34 38 05 FF FC */ addi r0, r5, -4 +/* 8038AED8 00387E38 7C A3 00 2E */ lwzx r5, r3, r0 +/* 8038AEDC 00387E3C 28 05 00 00 */ cmplwi r5, 0 +/* 8038AEE0 00387E40 40 82 00 0C */ bne lbl_8038AEEC +/* 8038AEE4 00387E44 38 60 00 00 */ li r3, 0 +/* 8038AEE8 00387E48 4E 80 00 20 */ blr +lbl_8038AEEC: +/* 8038AEEC 00387E4C 80 05 00 00 */ lwz r0, 0(r5) +/* 8038AEF0 00387E50 7C A6 2B 78 */ mr r6, r5 +/* 8038AEF4 00387E54 54 00 00 38 */ rlwinm r0, r0, 0, 0, 0x1c +/* 8038AEF8 00387E58 7C 07 03 78 */ mr r7, r0 +/* 8038AEFC 00387E5C 48 00 00 30 */ b lbl_8038AF2C +lbl_8038AF00: +/* 8038AF00 00387E60 80 C6 00 0C */ lwz r6, 0xc(r6) +/* 8038AF04 00387E64 80 06 00 00 */ lwz r0, 0(r6) +/* 8038AF08 00387E68 54 00 00 38 */ rlwinm r0, r0, 0, 0, 0x1c +/* 8038AF0C 00387E6C 7C 07 00 40 */ cmplw r7, r0 +/* 8038AF10 00387E70 40 80 00 08 */ bge lbl_8038AF18 +/* 8038AF14 00387E74 7C 07 03 78 */ mr r7, r0 +lbl_8038AF18: +/* 8038AF18 00387E78 7C 06 28 40 */ cmplw r6, r5 +/* 8038AF1C 00387E7C 40 82 00 10 */ bne lbl_8038AF2C +/* 8038AF20 00387E80 90 E3 00 08 */ stw r7, 8(r3) +/* 8038AF24 00387E84 38 60 00 00 */ li r3, 0 +/* 8038AF28 00387E88 4E 80 00 20 */ blr +lbl_8038AF2C: +/* 8038AF2C 00387E8C 7C 00 20 40 */ cmplw r0, r4 +/* 8038AF30 00387E90 41 80 FF D0 */ blt lbl_8038AF00 +/* 8038AF34 00387E94 7C 04 00 50 */ subf r0, r4, r0 +/* 8038AF38 00387E98 28 00 00 50 */ cmplwi r0, 0x50 +/* 8038AF3C 00387E9C 41 80 00 E0 */ blt lbl_8038B01C +/* 8038AF40 00387EA0 80 06 00 04 */ lwz r0, 4(r6) +/* 8038AF44 00387EA4 7C A6 22 14 */ add r5, r6, r4 +/* 8038AF48 00387EA8 81 26 00 00 */ lwz r9, 0(r6) +/* 8038AF4C 00387EAC 54 07 00 3C */ rlwinm r7, r0, 0, 0, 0x1e +/* 8038AF50 00387EB0 60 EA 00 01 */ ori r10, r7, 1 +/* 8038AF54 00387EB4 55 28 07 BC */ rlwinm r8, r9, 0, 0x1e, 0x1e +/* 8038AF58 00387EB8 55 20 07 7B */ rlwinm. r0, r9, 0, 0x1d, 0x1d +/* 8038AF5C 00387EBC 91 46 00 04 */ stw r10, 4(r6) +/* 8038AF60 00387EC0 7D 07 00 34 */ cntlzw r7, r8 +/* 8038AF64 00387EC4 55 29 00 38 */ rlwinm r9, r9, 0, 0, 0x1c +/* 8038AF68 00387EC8 54 E8 D9 7E */ srwi r8, r7, 5 +/* 8038AF6C 00387ECC 90 86 00 00 */ stw r4, 0(r6) +/* 8038AF70 00387ED0 7D 00 00 34 */ cntlzw r0, r8 +/* 8038AF74 00387ED4 54 07 D9 7E */ srwi r7, r0, 5 +/* 8038AF78 00387ED8 41 82 00 10 */ beq lbl_8038AF88 +/* 8038AF7C 00387EDC 80 06 00 00 */ lwz r0, 0(r6) +/* 8038AF80 00387EE0 60 00 00 04 */ ori r0, r0, 4 +/* 8038AF84 00387EE4 90 06 00 00 */ stw r0, 0(r6) +lbl_8038AF88: +/* 8038AF88 00387EE8 2C 07 00 00 */ cmpwi r7, 0 +/* 8038AF8C 00387EEC 41 82 00 20 */ beq lbl_8038AFAC +/* 8038AF90 00387EF0 80 06 00 00 */ lwz r0, 0(r6) +/* 8038AF94 00387EF4 60 00 00 02 */ ori r0, r0, 2 +/* 8038AF98 00387EF8 90 06 00 00 */ stw r0, 0(r6) +/* 8038AF9C 00387EFC 80 05 00 00 */ lwz r0, 0(r5) +/* 8038AFA0 00387F00 60 00 00 04 */ ori r0, r0, 4 +/* 8038AFA4 00387F04 90 05 00 00 */ stw r0, 0(r5) +/* 8038AFA8 00387F08 48 00 00 08 */ b lbl_8038AFB0 +lbl_8038AFAC: +/* 8038AFAC 00387F0C 90 85 FF FC */ stw r4, -4(r5) +lbl_8038AFB0: +/* 8038AFB0 00387F10 91 45 00 04 */ stw r10, 4(r5) +/* 8038AFB4 00387F14 7C 84 48 50 */ subf r4, r4, r9 +/* 8038AFB8 00387F18 2C 07 00 00 */ cmpwi r7, 0 +/* 8038AFBC 00387F1C 90 85 00 00 */ stw r4, 0(r5) +/* 8038AFC0 00387F20 41 82 00 10 */ beq lbl_8038AFD0 +/* 8038AFC4 00387F24 80 05 00 00 */ lwz r0, 0(r5) +/* 8038AFC8 00387F28 60 00 00 04 */ ori r0, r0, 4 +/* 8038AFCC 00387F2C 90 05 00 00 */ stw r0, 0(r5) +lbl_8038AFD0: +/* 8038AFD0 00387F30 2C 07 00 00 */ cmpwi r7, 0 +/* 8038AFD4 00387F34 41 82 00 20 */ beq lbl_8038AFF4 +/* 8038AFD8 00387F38 80 05 00 00 */ lwz r0, 0(r5) +/* 8038AFDC 00387F3C 60 00 00 02 */ ori r0, r0, 2 +/* 8038AFE0 00387F40 90 05 00 00 */ stw r0, 0(r5) +/* 8038AFE4 00387F44 7C 05 20 2E */ lwzx r0, r5, r4 +/* 8038AFE8 00387F48 60 00 00 04 */ ori r0, r0, 4 +/* 8038AFEC 00387F4C 7C 05 21 2E */ stwx r0, r5, r4 +/* 8038AFF0 00387F50 48 00 00 0C */ b lbl_8038AFFC +lbl_8038AFF4: +/* 8038AFF4 00387F54 38 04 FF FC */ addi r0, r4, -4 +/* 8038AFF8 00387F58 7C 85 01 2E */ stwx r4, r5, r0 +lbl_8038AFFC: +/* 8038AFFC 00387F5C 2C 08 00 00 */ cmpwi r8, 0 +/* 8038B000 00387F60 41 82 00 1C */ beq lbl_8038B01C +/* 8038B004 00387F64 80 06 00 0C */ lwz r0, 0xc(r6) +/* 8038B008 00387F68 90 05 00 0C */ stw r0, 0xc(r5) +/* 8038B00C 00387F6C 80 85 00 0C */ lwz r4, 0xc(r5) +/* 8038B010 00387F70 90 A4 00 08 */ stw r5, 8(r4) +/* 8038B014 00387F74 90 C5 00 08 */ stw r6, 8(r5) +/* 8038B018 00387F78 90 A6 00 0C */ stw r5, 0xc(r6) +lbl_8038B01C: +/* 8038B01C 00387F7C 80 03 00 0C */ lwz r0, 0xc(r3) +/* 8038B020 00387F80 80 A6 00 0C */ lwz r5, 0xc(r6) +/* 8038B024 00387F84 54 04 00 38 */ rlwinm r4, r0, 0, 0, 0x1c +/* 8038B028 00387F88 38 04 FF FC */ addi r0, r4, -4 +/* 8038B02C 00387F8C 7C A3 01 2E */ stwx r5, r3, r0 +/* 8038B030 00387F90 80 86 00 00 */ lwz r4, 0(r6) +/* 8038B034 00387F94 60 80 00 02 */ ori r0, r4, 2 +/* 8038B038 00387F98 54 84 00 38 */ rlwinm r4, r4, 0, 0, 0x1c +/* 8038B03C 00387F9C 90 06 00 00 */ stw r0, 0(r6) +/* 8038B040 00387FA0 7C 06 20 2E */ lwzx r0, r6, r4 +/* 8038B044 00387FA4 60 00 00 04 */ ori r0, r0, 4 +/* 8038B048 00387FA8 7C 06 21 2E */ stwx r0, r6, r4 +/* 8038B04C 00387FAC 80 03 00 0C */ lwz r0, 0xc(r3) +/* 8038B050 00387FB0 54 04 00 38 */ rlwinm r4, r0, 0, 0, 0x1c +/* 8038B054 00387FB4 38 84 FF FC */ addi r4, r4, -4 +/* 8038B058 00387FB8 7C 03 20 2E */ lwzx r0, r3, r4 +/* 8038B05C 00387FBC 7C 00 30 40 */ cmplw r0, r6 +/* 8038B060 00387FC0 40 82 00 0C */ bne lbl_8038B06C +/* 8038B064 00387FC4 80 06 00 0C */ lwz r0, 0xc(r6) +/* 8038B068 00387FC8 7C 03 21 2E */ stwx r0, r3, r4 +lbl_8038B06C: +/* 8038B06C 00387FCC 7C 03 20 2E */ lwzx r0, r3, r4 +/* 8038B070 00387FD0 7C 00 30 40 */ cmplw r0, r6 +/* 8038B074 00387FD4 40 82 00 14 */ bne lbl_8038B088 +/* 8038B078 00387FD8 38 00 00 00 */ li r0, 0 +/* 8038B07C 00387FDC 7C 03 21 2E */ stwx r0, r3, r4 +/* 8038B080 00387FE0 90 03 00 08 */ stw r0, 8(r3) +/* 8038B084 00387FE4 48 00 00 1C */ b lbl_8038B0A0 +lbl_8038B088: +/* 8038B088 00387FE8 80 06 00 08 */ lwz r0, 8(r6) +/* 8038B08C 00387FEC 80 66 00 0C */ lwz r3, 0xc(r6) +/* 8038B090 00387FF0 90 03 00 08 */ stw r0, 8(r3) +/* 8038B094 00387FF4 80 06 00 0C */ lwz r0, 0xc(r6) +/* 8038B098 00387FF8 80 66 00 08 */ lwz r3, 8(r6) +/* 8038B09C 00387FFC 90 03 00 0C */ stw r0, 0xc(r3) +lbl_8038B0A0: +/* 8038B0A0 00388000 7C C3 33 78 */ mr r3, r6 +/* 8038B0A4 00388004 4E 80 00 20 */ blr diff --git a/asm/Runtime/PPCEABI/H/ansi_files.s b/asm/Runtime/PPCEABI/H/ansi_files.s new file mode 100644 index 00000000..cd2c86a5 --- /dev/null +++ b/asm/Runtime/PPCEABI/H/ansi_files.s @@ -0,0 +1,82 @@ +.include "macros.inc" + +.section .text, "ax" + +.global __flush_all +__flush_all: +/* 8038B0A8 00388008 94 21 FF F0 */ stwu r1, -0x10(r1) +/* 8038B0AC 0038800C 7C 08 02 A6 */ mflr r0 +/* 8038B0B0 00388010 3C 60 80 3F */ lis r3, lbl_803F2778@ha +/* 8038B0B4 00388014 90 01 00 14 */ stw r0, 0x14(r1) +/* 8038B0B8 00388018 38 03 27 78 */ addi r0, r3, lbl_803F2778@l +/* 8038B0BC 0038801C 93 E1 00 0C */ stw r31, 0xc(r1) +/* 8038B0C0 00388020 3B E0 00 00 */ li r31, 0 +/* 8038B0C4 00388024 93 C1 00 08 */ stw r30, 8(r1) +/* 8038B0C8 00388028 7C 1E 03 78 */ mr r30, r0 +/* 8038B0CC 0038802C 48 00 00 28 */ b lbl_8038B0F4 +lbl_8038B0D0: +/* 8038B0D0 00388030 A0 1E 00 04 */ lhz r0, 4(r30) +/* 8038B0D4 00388034 54 00 D7 7F */ rlwinm. r0, r0, 0x1a, 0x1d, 0x1f +/* 8038B0D8 00388038 41 82 00 18 */ beq lbl_8038B0F0 +/* 8038B0DC 0038803C 7F C3 F3 78 */ mr r3, r30 +/* 8038B0E0 00388040 48 00 21 95 */ bl fflush +/* 8038B0E4 00388044 2C 03 00 00 */ cmpwi r3, 0 +/* 8038B0E8 00388048 41 82 00 08 */ beq lbl_8038B0F0 +/* 8038B0EC 0038804C 3B E0 FF FF */ li r31, -1 +lbl_8038B0F0: +/* 8038B0F0 00388050 83 DE 00 4C */ lwz r30, 0x4c(r30) +lbl_8038B0F4: +/* 8038B0F4 00388054 28 1E 00 00 */ cmplwi r30, 0 +/* 8038B0F8 00388058 40 82 FF D8 */ bne lbl_8038B0D0 +/* 8038B0FC 0038805C 80 01 00 14 */ lwz r0, 0x14(r1) +/* 8038B100 00388060 7F E3 FB 78 */ mr r3, r31 +/* 8038B104 00388064 83 E1 00 0C */ lwz r31, 0xc(r1) +/* 8038B108 00388068 83 C1 00 08 */ lwz r30, 8(r1) +/* 8038B10C 0038806C 7C 08 03 A6 */ mtlr r0 +/* 8038B110 00388070 38 21 00 10 */ addi r1, r1, 0x10 +/* 8038B114 00388074 4E 80 00 20 */ blr + +.global __close_all +__close_all: +/* 8038B118 00388078 94 21 FF F0 */ stwu r1, -0x10(r1) +/* 8038B11C 0038807C 7C 08 02 A6 */ mflr r0 +/* 8038B120 00388080 3C 60 80 3F */ lis r3, lbl_803F2778@ha +/* 8038B124 00388084 90 01 00 14 */ stw r0, 0x14(r1) +/* 8038B128 00388088 38 03 27 78 */ addi r0, r3, lbl_803F2778@l +/* 8038B12C 0038808C 93 E1 00 0C */ stw r31, 0xc(r1) +/* 8038B130 00388090 7C 1F 03 78 */ mr r31, r0 +/* 8038B134 00388094 48 00 00 60 */ b lbl_8038B194 +lbl_8038B138: +/* 8038B138 00388098 A0 1F 00 04 */ lhz r0, 4(r31) +/* 8038B13C 0038809C 54 00 D7 7F */ rlwinm. r0, r0, 0x1a, 0x1d, 0x1f +/* 8038B140 003880A0 41 82 00 0C */ beq lbl_8038B14C +/* 8038B144 003880A4 7F E3 FB 78 */ mr r3, r31 +/* 8038B148 003880A8 48 00 22 65 */ bl fclose +lbl_8038B14C: +/* 8038B14C 003880AC 7F E3 FB 78 */ mr r3, r31 +/* 8038B150 003880B0 83 FF 00 4C */ lwz r31, 0x4c(r31) +/* 8038B154 003880B4 88 03 00 0C */ lbz r0, 0xc(r3) +/* 8038B158 003880B8 28 00 00 00 */ cmplwi r0, 0 +/* 8038B15C 003880BC 41 82 00 0C */ beq lbl_8038B168 +/* 8038B160 003880C0 4B FF F1 F9 */ bl sub_8038a358 +/* 8038B164 003880C4 48 00 00 30 */ b lbl_8038B194 +lbl_8038B168: +/* 8038B168 003880C8 A0 03 00 04 */ lhz r0, 4(r3) +/* 8038B16C 003880CC 38 80 00 03 */ li r4, 3 +/* 8038B170 003880D0 50 80 35 F2 */ rlwimi r0, r4, 6, 0x17, 0x19 +/* 8038B174 003880D4 28 1F 00 00 */ cmplwi r31, 0 +/* 8038B178 003880D8 B0 03 00 04 */ sth r0, 4(r3) +/* 8038B17C 003880DC 41 82 00 18 */ beq lbl_8038B194 +/* 8038B180 003880E0 88 1F 00 0C */ lbz r0, 0xc(r31) +/* 8038B184 003880E4 28 00 00 00 */ cmplwi r0, 0 +/* 8038B188 003880E8 41 82 00 0C */ beq lbl_8038B194 +/* 8038B18C 003880EC 38 00 00 00 */ li r0, 0 +/* 8038B190 003880F0 90 03 00 4C */ stw r0, 0x4c(r3) +lbl_8038B194: +/* 8038B194 003880F4 28 1F 00 00 */ cmplwi r31, 0 +/* 8038B198 003880F8 40 82 FF A0 */ bne lbl_8038B138 +/* 8038B19C 003880FC 80 01 00 14 */ lwz r0, 0x14(r1) +/* 8038B1A0 00388100 83 E1 00 0C */ lwz r31, 0xc(r1) +/* 8038B1A4 00388104 7C 08 03 A6 */ mtlr r0 +/* 8038B1A8 00388108 38 21 00 10 */ addi r1, r1, 0x10 +/* 8038B1AC 0038810C 4E 80 00 20 */ blr diff --git a/asm/Runtime/PPCEABI/H/ansi_fp.s b/asm/Runtime/PPCEABI/H/ansi_fp.s new file mode 100644 index 00000000..ede7f691 --- /dev/null +++ b/asm/Runtime/PPCEABI/H/ansi_fp.s @@ -0,0 +1,2081 @@ +.include "macros.inc" + +.section .text, "ax" +.global __dec2num +__dec2num: +/* 8038B1B0 00388110 94 21 FE 10 */ stwu r1, -0x1f0(r1) +/* 8038B1B4 00388114 7C 08 02 A6 */ mflr r0 +/* 8038B1B8 00388118 90 01 01 F4 */ stw r0, 0x1f4(r1) +/* 8038B1BC 0038811C DB E1 01 E0 */ stfd f31, 0x1e0(r1) +/* 8038B1C0 00388120 F3 E1 01 E8 */ psq_st f31, 488(r1), 0, qr0 +/* 8038B1C4 00388124 93 E1 01 DC */ stw r31, 0x1dc(r1) +/* 8038B1C8 00388128 93 C1 01 D8 */ stw r30, 0x1d8(r1) +/* 8038B1CC 0038812C 88 03 00 04 */ lbz r0, 4(r3) +/* 8038B1D0 00388130 28 00 00 00 */ cmplwi r0, 0 +/* 8038B1D4 00388134 40 82 00 28 */ bne lbl_8038B1FC +/* 8038B1D8 00388138 88 03 00 00 */ lbz r0, 0(r3) +/* 8038B1DC 0038813C C8 22 CF 40 */ lfd f1, lbl_805AEC60@sda21(r2) +/* 8038B1E0 00388140 7C 00 07 75 */ extsb. r0, r0 +/* 8038B1E4 00388144 40 82 00 0C */ bne lbl_8038B1F0 +/* 8038B1E8 00388148 C8 42 CF 48 */ lfd f2, lbl_805AEC68@sda21(r2) +/* 8038B1EC 0038814C 48 00 00 08 */ b lbl_8038B1F4 +lbl_8038B1F0: +/* 8038B1F0 00388150 C8 42 CF 50 */ lfd f2, lbl_805AEC70@sda21(r2) +lbl_8038B1F4: +/* 8038B1F4 00388154 48 00 91 D5 */ bl copysign +/* 8038B1F8 00388158 48 00 08 EC */ b lbl_8038BAE4 +lbl_8038B1FC: +/* 8038B1FC 0038815C 88 03 00 05 */ lbz r0, 5(r3) +/* 8038B200 00388160 2C 00 00 49 */ cmpwi r0, 0x49 +/* 8038B204 00388164 41 82 00 44 */ beq lbl_8038B248 +/* 8038B208 00388168 40 80 00 10 */ bge lbl_8038B218 +/* 8038B20C 0038816C 2C 00 00 30 */ cmpwi r0, 0x30 +/* 8038B210 00388170 41 82 00 14 */ beq lbl_8038B224 +/* 8038B214 00388174 48 00 01 84 */ b lbl_8038B398 +lbl_8038B218: +/* 8038B218 00388178 2C 00 00 4E */ cmpwi r0, 0x4e +/* 8038B21C 0038817C 41 82 00 54 */ beq lbl_8038B270 +/* 8038B220 00388180 48 00 01 78 */ b lbl_8038B398 +lbl_8038B224: +/* 8038B224 00388184 88 03 00 00 */ lbz r0, 0(r3) +/* 8038B228 00388188 C8 22 CF 40 */ lfd f1, lbl_805AEC60@sda21(r2) +/* 8038B22C 0038818C 7C 00 07 75 */ extsb. r0, r0 +/* 8038B230 00388190 40 82 00 0C */ bne lbl_8038B23C +/* 8038B234 00388194 C8 42 CF 48 */ lfd f2, lbl_805AEC68@sda21(r2) +/* 8038B238 00388198 48 00 00 08 */ b lbl_8038B240 +lbl_8038B23C: +/* 8038B23C 0038819C C8 42 CF 50 */ lfd f2, lbl_805AEC70@sda21(r2) +lbl_8038B240: +/* 8038B240 003881A0 48 00 91 89 */ bl copysign +/* 8038B244 003881A4 48 00 08 A0 */ b lbl_8038BAE4 +lbl_8038B248: +/* 8038B248 003881A8 88 03 00 00 */ lbz r0, 0(r3) +/* 8038B24C 003881AC 3C 60 80 5B */ lis r3, lbl_805A8BA4@ha +/* 8038B250 003881B0 C0 23 8B A4 */ lfs f1, lbl_805A8BA4@l(r3) +/* 8038B254 003881B4 7C 00 07 75 */ extsb. r0, r0 +/* 8038B258 003881B8 40 82 00 0C */ bne lbl_8038B264 +/* 8038B25C 003881BC C8 42 CF 48 */ lfd f2, lbl_805AEC68@sda21(r2) +/* 8038B260 003881C0 48 00 00 08 */ b lbl_8038B268 +lbl_8038B264: +/* 8038B264 003881C4 C8 42 CF 50 */ lfd f2, lbl_805AEC70@sda21(r2) +lbl_8038B268: +/* 8038B268 003881C8 48 00 91 61 */ bl copysign +/* 8038B26C 003881CC 48 00 08 78 */ b lbl_8038BAE4 +lbl_8038B270: +/* 8038B270 003881D0 88 03 00 00 */ lbz r0, 0(r3) +/* 8038B274 003881D4 38 A0 00 00 */ li r5, 0 +/* 8038B278 003881D8 3C 80 7F F0 */ lis r4, 0x7ff0 +/* 8038B27C 003881DC 90 A1 00 2C */ stw r5, 0x2c(r1) +/* 8038B280 003881E0 7C 00 07 75 */ extsb. r0, r0 +/* 8038B284 003881E4 90 81 00 28 */ stw r4, 0x28(r1) +/* 8038B288 003881E8 41 82 00 14 */ beq lbl_8038B29C +/* 8038B28C 003881EC 3C 00 80 00 */ lis r0, 0x8000 +/* 8038B290 003881F0 90 A1 00 2C */ stw r5, 0x2c(r1) +/* 8038B294 003881F4 7C 80 03 78 */ or r0, r4, r0 +/* 8038B298 003881F8 90 01 00 28 */ stw r0, 0x28(r1) +lbl_8038B29C: +/* 8038B29C 003881FC 88 03 00 04 */ lbz r0, 4(r3) +/* 8038B2A0 00388200 28 00 00 01 */ cmplwi r0, 1 +/* 8038B2A4 00388204 40 82 00 18 */ bne lbl_8038B2BC +/* 8038B2A8 00388208 80 61 00 28 */ lwz r3, 0x28(r1) +/* 8038B2AC 0038820C 3C 00 00 08 */ lis r0, 8 +/* 8038B2B0 00388210 7C 60 03 78 */ or r0, r3, r0 +/* 8038B2B4 00388214 90 01 00 28 */ stw r0, 0x28(r1) +/* 8038B2B8 00388218 48 00 00 D8 */ b lbl_8038B390 +lbl_8038B2BC: +/* 8038B2BC 0038821C 2C 00 00 0E */ cmpwi r0, 0xe +/* 8038B2C0 00388220 7C 06 03 78 */ mr r6, r0 +/* 8038B2C4 00388224 38 E1 00 29 */ addi r7, r1, 0x29 +/* 8038B2C8 00388228 39 00 00 00 */ li r8, 0 +/* 8038B2CC 0038822C 39 20 00 01 */ li r9, 1 +/* 8038B2D0 00388230 40 81 00 08 */ ble lbl_8038B2D8 +/* 8038B2D4 00388234 38 C0 00 0E */ li r6, 0xe +lbl_8038B2D8: +/* 8038B2D8 00388238 3C 80 80 3F */ lis r4, lbl_803F2A20@ha +/* 8038B2DC 0038823C 38 06 FF FF */ addi r0, r6, -1 +/* 8038B2E0 00388240 38 A4 2A 20 */ addi r5, r4, lbl_803F2A20@l +/* 8038B2E4 00388244 39 40 00 01 */ li r10, 1 +/* 8038B2E8 00388248 7C 09 03 A6 */ mtctr r0 +/* 8038B2EC 0038824C 2C 06 00 01 */ cmpwi r6, 1 +/* 8038B2F0 00388250 40 81 00 88 */ ble lbl_8038B378 +lbl_8038B2F4: +/* 8038B2F4 00388254 38 0A 00 05 */ addi r0, r10, 5 +/* 8038B2F8 00388258 7C C3 00 AE */ lbzx r6, r3, r0 +/* 8038B2FC 0038825C 7C 05 30 AE */ lbzx r0, r5, r6 +/* 8038B300 00388260 54 00 06 F7 */ rlwinm. r0, r0, 0, 0x1b, 0x1b +/* 8038B304 00388264 41 82 00 0C */ beq lbl_8038B310 +/* 8038B308 00388268 38 86 FF D0 */ addi r4, r6, -48 +/* 8038B30C 0038826C 48 00 00 28 */ b lbl_8038B334 +lbl_8038B310: +/* 8038B310 00388270 2C 06 FF FF */ cmpwi r6, -1 +/* 8038B314 00388274 40 82 00 0C */ bne lbl_8038B320 +/* 8038B318 00388278 38 80 FF FF */ li r4, -1 +/* 8038B31C 0038827C 48 00 00 10 */ b lbl_8038B32C +lbl_8038B320: +/* 8038B320 00388280 3C 80 80 3F */ lis r4, lbl_803F2B20@ha +/* 8038B324 00388284 38 84 2B 20 */ addi r4, r4, lbl_803F2B20@l +/* 8038B328 00388288 7C 84 30 AE */ lbzx r4, r4, r6 +lbl_8038B32C: +/* 8038B32C 0038828C 38 04 FF A9 */ addi r0, r4, -87 +/* 8038B330 00388290 54 04 06 3E */ clrlwi r4, r0, 0x18 +lbl_8038B334: +/* 8038B334 00388294 54 80 06 3F */ clrlwi. r0, r4, 0x18 +/* 8038B338 00388298 41 82 00 08 */ beq lbl_8038B340 +/* 8038B33C 0038829C 39 00 00 01 */ li r8, 1 +lbl_8038B340: +/* 8038B340 003882A0 2C 09 00 00 */ cmpwi r9, 0 +/* 8038B344 003882A4 41 82 00 18 */ beq lbl_8038B35C +/* 8038B348 003882A8 88 07 00 00 */ lbz r0, 0(r7) +/* 8038B34C 003882AC 7C 00 23 78 */ or r0, r0, r4 +/* 8038B350 003882B0 98 07 00 00 */ stb r0, 0(r7) +/* 8038B354 003882B4 38 E7 00 01 */ addi r7, r7, 1 +/* 8038B358 003882B8 48 00 00 0C */ b lbl_8038B364 +lbl_8038B35C: +/* 8038B35C 003882BC 54 80 26 36 */ rlwinm r0, r4, 4, 0x18, 0x1b +/* 8038B360 003882C0 98 07 00 00 */ stb r0, 0(r7) +lbl_8038B364: +/* 8038B364 003882C4 7D 20 00 34 */ cntlzw r0, r9 +/* 8038B368 003882C8 39 4A 00 01 */ addi r10, r10, 1 +/* 8038B36C 003882CC 54 00 D9 7E */ srwi r0, r0, 5 +/* 8038B370 003882D0 7C 09 03 78 */ mr r9, r0 +/* 8038B374 003882D4 42 00 FF 80 */ bdnz lbl_8038B2F4 +lbl_8038B378: +/* 8038B378 003882D8 2C 08 00 00 */ cmpwi r8, 0 +/* 8038B37C 003882DC 40 82 00 14 */ bne lbl_8038B390 +/* 8038B380 003882E0 80 61 00 28 */ lwz r3, 0x28(r1) +/* 8038B384 003882E4 3C 00 00 08 */ lis r0, 8 +/* 8038B388 003882E8 7C 60 03 78 */ or r0, r3, r0 +/* 8038B38C 003882EC 90 01 00 28 */ stw r0, 0x28(r1) +lbl_8038B390: +/* 8038B390 003882F0 C8 21 00 28 */ lfd f1, 0x28(r1) +/* 8038B394 003882F4 48 00 07 50 */ b lbl_8038BAE4 +lbl_8038B398: +/* 8038B398 003882F8 80 83 00 00 */ lwz r4, 0(r3) +/* 8038B39C 003882FC 39 01 01 95 */ addi r8, r1, 0x195 +/* 8038B3A0 00388300 80 03 00 04 */ lwz r0, 4(r3) +/* 8038B3A4 00388304 7D 07 43 78 */ mr r7, r8 +/* 8038B3A8 00388308 90 01 01 94 */ stw r0, 0x194(r1) +/* 8038B3AC 0038830C 90 81 01 90 */ stw r4, 0x190(r1) +/* 8038B3B0 00388310 88 01 01 94 */ lbz r0, 0x194(r1) +/* 8038B3B4 00388314 80 83 00 08 */ lwz r4, 8(r3) +/* 8038B3B8 00388318 80 A3 00 0C */ lwz r5, 0xc(r3) +/* 8038B3BC 0038831C 7C 08 02 14 */ add r0, r8, r0 +/* 8038B3C0 00388320 7C 08 00 40 */ cmplw r8, r0 +/* 8038B3C4 00388324 90 81 01 98 */ stw r4, 0x198(r1) +/* 8038B3C8 00388328 7C 88 00 50 */ subf r4, r8, r0 +/* 8038B3CC 0038832C 90 A1 01 9C */ stw r5, 0x19c(r1) +/* 8038B3D0 00388330 80 C3 00 10 */ lwz r6, 0x10(r3) +/* 8038B3D4 00388334 80 A3 00 14 */ lwz r5, 0x14(r3) +/* 8038B3D8 00388338 90 C1 01 A0 */ stw r6, 0x1a0(r1) +/* 8038B3DC 0038833C 90 A1 01 A4 */ stw r5, 0x1a4(r1) +/* 8038B3E0 00388340 80 C3 00 18 */ lwz r6, 0x18(r3) +/* 8038B3E4 00388344 80 A3 00 1C */ lwz r5, 0x1c(r3) +/* 8038B3E8 00388348 90 C1 01 A8 */ stw r6, 0x1a8(r1) +/* 8038B3EC 0038834C 90 A1 01 AC */ stw r5, 0x1ac(r1) +/* 8038B3F0 00388350 80 C3 00 20 */ lwz r6, 0x20(r3) +/* 8038B3F4 00388354 80 A3 00 24 */ lwz r5, 0x24(r3) +/* 8038B3F8 00388358 90 C1 01 B0 */ stw r6, 0x1b0(r1) +/* 8038B3FC 0038835C 90 A1 01 B4 */ stw r5, 0x1b4(r1) +/* 8038B400 00388360 A0 63 00 28 */ lhz r3, 0x28(r3) +/* 8038B404 00388364 B0 61 01 B8 */ sth r3, 0x1b8(r1) +/* 8038B408 00388368 40 80 00 98 */ bge lbl_8038B4A0 +/* 8038B40C 0038836C 54 83 E8 FF */ rlwinm. r3, r4, 0x1d, 3, 0x1f +/* 8038B410 00388370 7C 69 03 A6 */ mtctr r3 +/* 8038B414 00388374 41 82 00 74 */ beq lbl_8038B488 +lbl_8038B418: +/* 8038B418 00388378 88 67 00 00 */ lbz r3, 0(r7) +/* 8038B41C 0038837C 38 63 FF D0 */ addi r3, r3, -48 +/* 8038B420 00388380 98 67 00 00 */ stb r3, 0(r7) +/* 8038B424 00388384 88 67 00 01 */ lbz r3, 1(r7) +/* 8038B428 00388388 38 63 FF D0 */ addi r3, r3, -48 +/* 8038B42C 0038838C 98 67 00 01 */ stb r3, 1(r7) +/* 8038B430 00388390 88 67 00 02 */ lbz r3, 2(r7) +/* 8038B434 00388394 38 63 FF D0 */ addi r3, r3, -48 +/* 8038B438 00388398 98 67 00 02 */ stb r3, 2(r7) +/* 8038B43C 0038839C 88 67 00 03 */ lbz r3, 3(r7) +/* 8038B440 003883A0 38 63 FF D0 */ addi r3, r3, -48 +/* 8038B444 003883A4 98 67 00 03 */ stb r3, 3(r7) +/* 8038B448 003883A8 88 67 00 04 */ lbz r3, 4(r7) +/* 8038B44C 003883AC 38 63 FF D0 */ addi r3, r3, -48 +/* 8038B450 003883B0 98 67 00 04 */ stb r3, 4(r7) +/* 8038B454 003883B4 88 67 00 05 */ lbz r3, 5(r7) +/* 8038B458 003883B8 38 63 FF D0 */ addi r3, r3, -48 +/* 8038B45C 003883BC 98 67 00 05 */ stb r3, 5(r7) +/* 8038B460 003883C0 88 67 00 06 */ lbz r3, 6(r7) +/* 8038B464 003883C4 38 63 FF D0 */ addi r3, r3, -48 +/* 8038B468 003883C8 98 67 00 06 */ stb r3, 6(r7) +/* 8038B46C 003883CC 88 67 00 07 */ lbz r3, 7(r7) +/* 8038B470 003883D0 38 63 FF D0 */ addi r3, r3, -48 +/* 8038B474 003883D4 98 67 00 07 */ stb r3, 7(r7) +/* 8038B478 003883D8 38 E7 00 08 */ addi r7, r7, 8 +/* 8038B47C 003883DC 42 00 FF 9C */ bdnz lbl_8038B418 +/* 8038B480 003883E0 70 84 00 07 */ andi. r4, r4, 7 +/* 8038B484 003883E4 41 82 00 1C */ beq lbl_8038B4A0 +lbl_8038B488: +/* 8038B488 003883E8 7C 89 03 A6 */ mtctr r4 +lbl_8038B48C: +/* 8038B48C 003883EC 88 67 00 00 */ lbz r3, 0(r7) +/* 8038B490 003883F0 38 63 FF D0 */ addi r3, r3, -48 +/* 8038B494 003883F4 98 67 00 00 */ stb r3, 0(r7) +/* 8038B498 003883F8 38 E7 00 01 */ addi r7, r7, 1 +/* 8038B49C 003883FC 42 00 FF F0 */ bdnz lbl_8038B48C +lbl_8038B4A0: +/* 8038B4A0 00388400 88 81 01 95 */ lbz r4, 0x195(r1) +/* 8038B4A4 00388404 3C E0 43 30 */ lis r7, 0x4330 +/* 8038B4A8 00388408 3C 60 80 3F */ lis r3, lbl_803F28B8@ha +/* 8038B4AC 0038840C 90 E1 01 C0 */ stw r7, 0x1c0(r1) +/* 8038B4B0 00388410 C8 62 CF 60 */ lfd f3, lbl_805AEC80@sda21(r2) +/* 8038B4B4 00388414 39 08 00 01 */ addi r8, r8, 1 +/* 8038B4B8 00388418 90 81 01 C4 */ stw r4, 0x1c4(r1) +/* 8038B4BC 0038841C 38 A3 28 B8 */ addi r5, r3, lbl_803F28B8@l +/* 8038B4C0 00388420 A8 81 01 92 */ lha r4, 0x192(r1) +/* 8038B4C4 00388424 C8 01 01 C0 */ lfd f0, 0x1c0(r1) +/* 8038B4C8 00388428 88 61 01 94 */ lbz r3, 0x194(r1) +/* 8038B4CC 0038842C FC 00 18 28 */ fsub f0, f0, f3 +/* 8038B4D0 00388430 7C 63 22 14 */ add r3, r3, r4 +/* 8038B4D4 00388434 38 83 FF FF */ addi r4, r3, -1 +/* 8038B4D8 00388438 7C 83 07 34 */ extsh r3, r4 +/* 8038B4DC 0038843C B0 81 01 92 */ sth r4, 0x192(r1) +/* 8038B4E0 00388440 7C 7F 1B 78 */ mr r31, r3 +/* 8038B4E4 00388444 D8 01 00 20 */ stfd f0, 0x20(r1) +/* 8038B4E8 00388448 48 00 01 08 */ b lbl_8038B5F0 +lbl_8038B4EC: +/* 8038B4EC 0038844C 7C 88 00 50 */ subf r4, r8, r0 +/* 8038B4F0 00388450 39 20 00 00 */ li r9, 0 +/* 8038B4F4 00388454 54 83 E8 04 */ slwi r3, r4, 0x1d +/* 8038B4F8 00388458 54 84 0F FE */ srwi r4, r4, 0x1f +/* 8038B4FC 0038845C 7C 64 18 50 */ subf r3, r4, r3 +/* 8038B500 00388460 54 63 18 3E */ rotlwi r3, r3, 3 +/* 8038B504 00388464 7D 43 22 15 */ add. r10, r3, r4 +/* 8038B508 00388468 40 82 00 08 */ bne lbl_8038B510 +/* 8038B50C 0038846C 39 40 00 08 */ li r10, 8 +lbl_8038B510: +/* 8038B510 00388470 2C 0A 00 00 */ cmpwi r10, 0 +/* 8038B514 00388474 7D 44 53 78 */ mr r4, r10 +/* 8038B518 00388478 40 81 00 98 */ ble lbl_8038B5B0 +/* 8038B51C 0038847C 55 43 E8 FF */ rlwinm. r3, r10, 0x1d, 3, 0x1f +/* 8038B520 00388480 7C 69 03 A6 */ mtctr r3 +/* 8038B524 00388484 41 82 00 74 */ beq lbl_8038B598 +lbl_8038B528: +/* 8038B528 00388488 1C 69 00 0A */ mulli r3, r9, 0xa +/* 8038B52C 0038848C 88 C8 00 00 */ lbz r6, 0(r8) +/* 8038B530 00388490 7D 26 1A 14 */ add r9, r6, r3 +/* 8038B534 00388494 88 C8 00 01 */ lbz r6, 1(r8) +/* 8038B538 00388498 1C 69 00 0A */ mulli r3, r9, 0xa +/* 8038B53C 0038849C 7D 26 1A 14 */ add r9, r6, r3 +/* 8038B540 003884A0 88 C8 00 02 */ lbz r6, 2(r8) +/* 8038B544 003884A4 1C 69 00 0A */ mulli r3, r9, 0xa +/* 8038B548 003884A8 7D 26 1A 14 */ add r9, r6, r3 +/* 8038B54C 003884AC 88 C8 00 03 */ lbz r6, 3(r8) +/* 8038B550 003884B0 1C 69 00 0A */ mulli r3, r9, 0xa +/* 8038B554 003884B4 7D 26 1A 14 */ add r9, r6, r3 +/* 8038B558 003884B8 88 C8 00 04 */ lbz r6, 4(r8) +/* 8038B55C 003884BC 1C 69 00 0A */ mulli r3, r9, 0xa +/* 8038B560 003884C0 7D 26 1A 14 */ add r9, r6, r3 +/* 8038B564 003884C4 88 C8 00 05 */ lbz r6, 5(r8) +/* 8038B568 003884C8 1C 69 00 0A */ mulli r3, r9, 0xa +/* 8038B56C 003884CC 7D 26 1A 14 */ add r9, r6, r3 +/* 8038B570 003884D0 88 C8 00 06 */ lbz r6, 6(r8) +/* 8038B574 003884D4 1C 69 00 0A */ mulli r3, r9, 0xa +/* 8038B578 003884D8 7D 26 1A 14 */ add r9, r6, r3 +/* 8038B57C 003884DC 88 C8 00 07 */ lbz r6, 7(r8) +/* 8038B580 003884E0 1C 69 00 0A */ mulli r3, r9, 0xa +/* 8038B584 003884E4 39 08 00 08 */ addi r8, r8, 8 +/* 8038B588 003884E8 7D 26 1A 14 */ add r9, r6, r3 +/* 8038B58C 003884EC 42 00 FF 9C */ bdnz lbl_8038B528 +/* 8038B590 003884F0 70 84 00 07 */ andi. r4, r4, 7 +/* 8038B594 003884F4 41 82 00 1C */ beq lbl_8038B5B0 +lbl_8038B598: +/* 8038B598 003884F8 7C 89 03 A6 */ mtctr r4 +lbl_8038B59C: +/* 8038B59C 003884FC 1C 69 00 0A */ mulli r3, r9, 0xa +/* 8038B5A0 00388500 88 C8 00 00 */ lbz r6, 0(r8) +/* 8038B5A4 00388504 39 08 00 01 */ addi r8, r8, 1 +/* 8038B5A8 00388508 7D 26 1A 14 */ add r9, r6, r3 +/* 8038B5AC 0038850C 42 00 FF F0 */ bdnz lbl_8038B59C +lbl_8038B5B0: +/* 8038B5B0 00388510 55 43 18 38 */ slwi r3, r10, 3 +/* 8038B5B4 00388514 91 21 01 C4 */ stw r9, 0x1c4(r1) +/* 8038B5B8 00388518 7C 65 1A 14 */ add r3, r5, r3 +/* 8038B5BC 0038851C C8 41 00 20 */ lfd f2, 0x20(r1) +/* 8038B5C0 00388520 90 E1 01 C0 */ stw r7, 0x1c0(r1) +/* 8038B5C4 00388524 28 09 00 00 */ cmplwi r9, 0 +/* 8038B5C8 00388528 C8 23 FF F8 */ lfd f1, -8(r3) +/* 8038B5CC 0038852C C8 01 01 C0 */ lfd f0, 0x1c0(r1) +/* 8038B5D0 00388530 FC 22 00 72 */ fmul f1, f2, f1 +/* 8038B5D4 00388534 FC 00 18 28 */ fsub f0, f0, f3 +/* 8038B5D8 00388538 FC 01 00 2A */ fadd f0, f1, f0 +/* 8038B5DC 0038853C 41 82 00 0C */ beq lbl_8038B5E8 +/* 8038B5E0 00388540 FC 01 00 00 */ fcmpu cr0, f1, f0 +/* 8038B5E4 00388544 41 82 00 14 */ beq lbl_8038B5F8 +lbl_8038B5E8: +/* 8038B5E8 00388548 D8 01 00 20 */ stfd f0, 0x20(r1) +/* 8038B5EC 0038854C 7F EA F8 50 */ subf r31, r10, r31 +lbl_8038B5F0: +/* 8038B5F0 00388550 7C 08 00 40 */ cmplw r8, r0 +/* 8038B5F4 00388554 41 80 FE F8 */ blt lbl_8038B4EC +lbl_8038B5F8: +/* 8038B5F8 00388558 2C 1F 00 00 */ cmpwi r31, 0 +/* 8038B5FC 0038855C 40 80 00 38 */ bge lbl_8038B634 +/* 8038B600 00388560 7C 7F 00 D0 */ neg r3, r31 +/* 8038B604 00388564 3C 00 43 30 */ lis r0, 0x4330 +/* 8038B608 00388568 6C 63 80 00 */ xoris r3, r3, 0x8000 +/* 8038B60C 0038856C 90 01 01 C0 */ stw r0, 0x1c0(r1) +/* 8038B610 00388570 C8 42 CF 68 */ lfd f2, lbl_805AEC88@sda21(r2) +/* 8038B614 00388574 90 61 01 C4 */ stw r3, 0x1c4(r1) +/* 8038B618 00388578 C8 22 CF 58 */ lfd f1, lbl_805AEC78@sda21(r2) +/* 8038B61C 0038857C C8 01 01 C0 */ lfd f0, 0x1c0(r1) +/* 8038B620 00388580 FC 40 10 28 */ fsub f2, f0, f2 +/* 8038B624 00388584 48 00 96 C9 */ bl pow +/* 8038B628 00388588 C8 01 00 20 */ lfd f0, 0x20(r1) +/* 8038B62C 0038858C FC 20 08 24 */ fdiv f1, f0, f1 +/* 8038B630 00388590 48 00 00 30 */ b lbl_8038B660 +lbl_8038B634: +/* 8038B634 00388594 6F E3 80 00 */ xoris r3, r31, 0x8000 +/* 8038B638 00388598 3C 00 43 30 */ lis r0, 0x4330 +/* 8038B63C 0038859C 90 61 01 CC */ stw r3, 0x1cc(r1) +/* 8038B640 003885A0 C8 42 CF 68 */ lfd f2, lbl_805AEC88@sda21(r2) +/* 8038B644 003885A4 90 01 01 C8 */ stw r0, 0x1c8(r1) +/* 8038B648 003885A8 C8 22 CF 58 */ lfd f1, lbl_805AEC78@sda21(r2) +/* 8038B64C 003885AC C8 01 01 C8 */ lfd f0, 0x1c8(r1) +/* 8038B650 003885B0 FC 40 10 28 */ fsub f2, f0, f2 +/* 8038B654 003885B4 48 00 96 99 */ bl pow +/* 8038B658 003885B8 C8 01 00 20 */ lfd f0, 0x20(r1) +/* 8038B65C 003885BC FC 20 00 72 */ fmul f1, f0, f1 +lbl_8038B660: +/* 8038B660 003885C0 D8 21 00 20 */ stfd f1, 0x20(r1) +/* 8038B664 003885C4 7F E3 FB 78 */ mr r3, r31 +/* 8038B668 003885C8 48 00 90 31 */ bl ldexp +/* 8038B66C 003885CC D8 21 00 18 */ stfd f1, 0x18(r1) +/* 8038B670 003885D0 3C 00 7F F0 */ lis r0, 0x7ff0 +/* 8038B674 003885D4 80 81 00 18 */ lwz r4, 0x18(r1) +/* 8038B678 003885D8 D8 21 00 20 */ stfd f1, 0x20(r1) +/* 8038B67C 003885DC 54 83 00 56 */ rlwinm r3, r4, 0, 1, 0xb +/* 8038B680 003885E0 7C 03 00 00 */ cmpw r3, r0 +/* 8038B684 003885E4 41 82 00 14 */ beq lbl_8038B698 +/* 8038B688 003885E8 40 80 00 58 */ bge lbl_8038B6E0 +/* 8038B68C 003885EC 2C 03 00 00 */ cmpwi r3, 0 +/* 8038B690 003885F0 41 82 00 2C */ beq lbl_8038B6BC +/* 8038B694 003885F4 48 00 00 4C */ b lbl_8038B6E0 +lbl_8038B698: +/* 8038B698 003885F8 54 80 03 3F */ clrlwi. r0, r4, 0xc +/* 8038B69C 003885FC 40 82 00 10 */ bne lbl_8038B6AC +/* 8038B6A0 00388600 80 01 00 1C */ lwz r0, 0x1c(r1) +/* 8038B6A4 00388604 2C 00 00 00 */ cmpwi r0, 0 +/* 8038B6A8 00388608 41 82 00 0C */ beq lbl_8038B6B4 +lbl_8038B6AC: +/* 8038B6AC 0038860C 38 00 00 01 */ li r0, 1 +/* 8038B6B0 00388610 48 00 00 34 */ b lbl_8038B6E4 +lbl_8038B6B4: +/* 8038B6B4 00388614 38 00 00 02 */ li r0, 2 +/* 8038B6B8 00388618 48 00 00 2C */ b lbl_8038B6E4 +lbl_8038B6BC: +/* 8038B6BC 0038861C 54 80 03 3F */ clrlwi. r0, r4, 0xc +/* 8038B6C0 00388620 40 82 00 10 */ bne lbl_8038B6D0 +/* 8038B6C4 00388624 80 01 00 1C */ lwz r0, 0x1c(r1) +/* 8038B6C8 00388628 2C 00 00 00 */ cmpwi r0, 0 +/* 8038B6CC 0038862C 41 82 00 0C */ beq lbl_8038B6D8 +lbl_8038B6D0: +/* 8038B6D0 00388630 38 00 00 05 */ li r0, 5 +/* 8038B6D4 00388634 48 00 00 10 */ b lbl_8038B6E4 +lbl_8038B6D8: +/* 8038B6D8 00388638 38 00 00 03 */ li r0, 3 +/* 8038B6DC 0038863C 48 00 00 08 */ b lbl_8038B6E4 +lbl_8038B6E0: +/* 8038B6E0 00388640 38 00 00 04 */ li r0, 4 +lbl_8038B6E4: +/* 8038B6E4 00388644 2C 00 00 02 */ cmpwi r0, 2 +/* 8038B6E8 00388648 40 82 00 38 */ bne lbl_8038B720 +/* 8038B6EC 0038864C 3C 80 80 3E */ lis r4, lbl_803D85D8@ha +/* 8038B6F0 00388650 38 61 01 64 */ addi r3, r1, 0x164 +/* 8038B6F4 00388654 38 84 85 D8 */ addi r4, r4, lbl_803D85D8@l +/* 8038B6F8 00388658 38 A0 01 34 */ li r5, 0x134 +/* 8038B6FC 0038865C 48 00 12 29 */ bl __str2dec +/* 8038B700 00388660 38 61 01 64 */ addi r3, r1, 0x164 +/* 8038B704 00388664 38 81 01 90 */ addi r4, r1, 0x190 +/* 8038B708 00388668 48 00 0C D9 */ bl __less_dec +/* 8038B70C 0038866C 2C 03 00 00 */ cmpwi r3, 0 +/* 8038B710 00388670 40 82 03 B8 */ bne lbl_8038BAC8 +/* 8038B714 00388674 3C 60 80 5B */ lis r3, lbl_805A8BB0@ha +/* 8038B718 00388678 C8 03 8B B0 */ lfd f0, lbl_805A8BB0@l(r3) +/* 8038B71C 0038867C D8 01 00 20 */ stfd f0, 0x20(r1) +lbl_8038B720: +/* 8038B720 00388680 C8 21 00 20 */ lfd f1, 0x20(r1) +/* 8038B724 00388684 38 61 01 38 */ addi r3, r1, 0x138 +/* 8038B728 00388688 48 00 05 81 */ bl __num2dec_internal +/* 8038B72C 0038868C 38 61 01 38 */ addi r3, r1, 0x138 +/* 8038B730 00388690 38 81 01 90 */ addi r4, r1, 0x190 +/* 8038B734 00388694 48 00 0D A5 */ bl __equals_dec +/* 8038B738 00388698 2C 03 00 00 */ cmpwi r3, 0 +/* 8038B73C 0038869C 40 82 03 8C */ bne lbl_8038BAC8 +/* 8038B740 003886A0 38 61 01 38 */ addi r3, r1, 0x138 +/* 8038B744 003886A4 38 81 01 90 */ addi r4, r1, 0x190 +/* 8038B748 003886A8 48 00 0C 99 */ bl __less_dec +/* 8038B74C 003886AC 2C 03 00 00 */ cmpwi r3, 0 +/* 8038B750 003886B0 41 82 02 44 */ beq lbl_8038B994 +/* 8038B754 003886B4 3C 60 80 5B */ lis r3, lbl_805A8BA4@ha +/* 8038B758 003886B8 C8 21 00 20 */ lfd f1, 0x20(r1) +/* 8038B75C 003886BC C0 43 8B A4 */ lfs f2, lbl_805A8BA4@l(r3) +/* 8038B760 003886C0 48 00 91 F9 */ bl nextafter +/* 8038B764 003886C4 FF E0 08 90 */ fmr f31, f1 +/* 8038B768 003886C8 3C 00 7F F0 */ lis r0, 0x7ff0 +/* 8038B76C 003886CC DB E1 00 10 */ stfd f31, 0x10(r1) +/* 8038B770 003886D0 80 81 00 10 */ lwz r4, 0x10(r1) +/* 8038B774 003886D4 54 83 00 56 */ rlwinm r3, r4, 0, 1, 0xb +/* 8038B778 003886D8 7C 03 00 00 */ cmpw r3, r0 +/* 8038B77C 003886DC 41 82 00 14 */ beq lbl_8038B790 +/* 8038B780 003886E0 40 80 00 58 */ bge lbl_8038B7D8 +/* 8038B784 003886E4 2C 03 00 00 */ cmpwi r3, 0 +/* 8038B788 003886E8 41 82 00 2C */ beq lbl_8038B7B4 +/* 8038B78C 003886EC 48 00 00 4C */ b lbl_8038B7D8 +lbl_8038B790: +/* 8038B790 003886F0 54 80 03 3F */ clrlwi. r0, r4, 0xc +/* 8038B794 003886F4 40 82 00 10 */ bne lbl_8038B7A4 +/* 8038B798 003886F8 80 01 00 14 */ lwz r0, 0x14(r1) +/* 8038B79C 003886FC 2C 00 00 00 */ cmpwi r0, 0 +/* 8038B7A0 00388700 41 82 00 0C */ beq lbl_8038B7AC +lbl_8038B7A4: +/* 8038B7A4 00388704 38 00 00 01 */ li r0, 1 +/* 8038B7A8 00388708 48 00 00 34 */ b lbl_8038B7DC +lbl_8038B7AC: +/* 8038B7AC 0038870C 38 00 00 02 */ li r0, 2 +/* 8038B7B0 00388710 48 00 00 2C */ b lbl_8038B7DC +lbl_8038B7B4: +/* 8038B7B4 00388714 54 80 03 3F */ clrlwi. r0, r4, 0xc +/* 8038B7B8 00388718 40 82 00 10 */ bne lbl_8038B7C8 +/* 8038B7BC 0038871C 80 01 00 14 */ lwz r0, 0x14(r1) +/* 8038B7C0 00388720 2C 00 00 00 */ cmpwi r0, 0 +/* 8038B7C4 00388724 41 82 00 0C */ beq lbl_8038B7D0 +lbl_8038B7C8: +/* 8038B7C8 00388728 38 00 00 05 */ li r0, 5 +/* 8038B7CC 0038872C 48 00 00 10 */ b lbl_8038B7DC +lbl_8038B7D0: +/* 8038B7D0 00388730 38 00 00 03 */ li r0, 3 +/* 8038B7D4 00388734 48 00 00 08 */ b lbl_8038B7DC +lbl_8038B7D8: +/* 8038B7D8 00388738 38 00 00 04 */ li r0, 4 +lbl_8038B7DC: +/* 8038B7DC 0038873C 2C 00 00 02 */ cmpwi r0, 2 +/* 8038B7E0 00388740 40 82 00 0C */ bne lbl_8038B7EC +/* 8038B7E4 00388744 DB E1 00 20 */ stfd f31, 0x20(r1) +/* 8038B7E8 00388748 48 00 02 E0 */ b lbl_8038BAC8 +lbl_8038B7EC: +/* 8038B7EC 0038874C FC 20 F8 90 */ fmr f1, f31 +/* 8038B7F0 00388750 38 61 01 0C */ addi r3, r1, 0x10c +/* 8038B7F4 00388754 48 00 04 B5 */ bl __num2dec_internal +/* 8038B7F8 00388758 3C 60 80 5B */ lis r3, lbl_805A8BA4@ha +/* 8038B7FC 0038875C 3F E0 7F F0 */ lis r31, 0x7ff0 +/* 8038B800 00388760 3B C3 8B A4 */ addi r30, r3, lbl_805A8BA4@l +/* 8038B804 00388764 48 00 00 FC */ b lbl_8038B900 +lbl_8038B808: +/* 8038B808 00388768 81 81 01 0C */ lwz r12, 0x10c(r1) +/* 8038B80C 0038876C FC 20 F8 90 */ fmr f1, f31 +/* 8038B810 00388770 81 61 01 10 */ lwz r11, 0x110(r1) +/* 8038B814 00388774 81 41 01 14 */ lwz r10, 0x114(r1) +/* 8038B818 00388778 81 21 01 18 */ lwz r9, 0x118(r1) +/* 8038B81C 0038877C 81 01 01 1C */ lwz r8, 0x11c(r1) +/* 8038B820 00388780 80 E1 01 20 */ lwz r7, 0x120(r1) +/* 8038B824 00388784 80 C1 01 24 */ lwz r6, 0x124(r1) +/* 8038B828 00388788 80 A1 01 28 */ lwz r5, 0x128(r1) +/* 8038B82C 0038878C 80 81 01 2C */ lwz r4, 0x12c(r1) +/* 8038B830 00388790 80 61 01 30 */ lwz r3, 0x130(r1) +/* 8038B834 00388794 A0 01 01 34 */ lhz r0, 0x134(r1) +/* 8038B838 00388798 91 81 01 38 */ stw r12, 0x138(r1) +/* 8038B83C 0038879C C0 5E 00 00 */ lfs f2, 0(r30) +/* 8038B840 003887A0 91 61 01 3C */ stw r11, 0x13c(r1) +/* 8038B844 003887A4 91 41 01 40 */ stw r10, 0x140(r1) +/* 8038B848 003887A8 91 21 01 44 */ stw r9, 0x144(r1) +/* 8038B84C 003887AC 91 01 01 48 */ stw r8, 0x148(r1) +/* 8038B850 003887B0 90 E1 01 4C */ stw r7, 0x14c(r1) +/* 8038B854 003887B4 90 C1 01 50 */ stw r6, 0x150(r1) +/* 8038B858 003887B8 90 A1 01 54 */ stw r5, 0x154(r1) +/* 8038B85C 003887BC 90 81 01 58 */ stw r4, 0x158(r1) +/* 8038B860 003887C0 90 61 01 5C */ stw r3, 0x15c(r1) +/* 8038B864 003887C4 B0 01 01 60 */ sth r0, 0x160(r1) +/* 8038B868 003887C8 DB E1 00 20 */ stfd f31, 0x20(r1) +/* 8038B86C 003887CC 48 00 90 ED */ bl nextafter +/* 8038B870 003887D0 FF E0 08 90 */ fmr f31, f1 +/* 8038B874 003887D4 DB E1 00 08 */ stfd f31, 8(r1) +/* 8038B878 003887D8 80 61 00 08 */ lwz r3, 8(r1) +/* 8038B87C 003887DC 54 60 00 56 */ rlwinm r0, r3, 0, 1, 0xb +/* 8038B880 003887E0 7C 00 F8 00 */ cmpw r0, r31 +/* 8038B884 003887E4 41 82 00 14 */ beq lbl_8038B898 +/* 8038B888 003887E8 40 80 00 58 */ bge lbl_8038B8E0 +/* 8038B88C 003887EC 2C 00 00 00 */ cmpwi r0, 0 +/* 8038B890 003887F0 41 82 00 2C */ beq lbl_8038B8BC +/* 8038B894 003887F4 48 00 00 4C */ b lbl_8038B8E0 +lbl_8038B898: +/* 8038B898 003887F8 54 60 03 3F */ clrlwi. r0, r3, 0xc +/* 8038B89C 003887FC 40 82 00 10 */ bne lbl_8038B8AC +/* 8038B8A0 00388800 80 01 00 0C */ lwz r0, 0xc(r1) +/* 8038B8A4 00388804 2C 00 00 00 */ cmpwi r0, 0 +/* 8038B8A8 00388808 41 82 00 0C */ beq lbl_8038B8B4 +lbl_8038B8AC: +/* 8038B8AC 0038880C 38 00 00 01 */ li r0, 1 +/* 8038B8B0 00388810 48 00 00 34 */ b lbl_8038B8E4 +lbl_8038B8B4: +/* 8038B8B4 00388814 38 00 00 02 */ li r0, 2 +/* 8038B8B8 00388818 48 00 00 2C */ b lbl_8038B8E4 +lbl_8038B8BC: +/* 8038B8BC 0038881C 54 60 03 3F */ clrlwi. r0, r3, 0xc +/* 8038B8C0 00388820 40 82 00 10 */ bne lbl_8038B8D0 +/* 8038B8C4 00388824 80 01 00 0C */ lwz r0, 0xc(r1) +/* 8038B8C8 00388828 2C 00 00 00 */ cmpwi r0, 0 +/* 8038B8CC 0038882C 41 82 00 0C */ beq lbl_8038B8D8 +lbl_8038B8D0: +/* 8038B8D0 00388830 38 00 00 05 */ li r0, 5 +/* 8038B8D4 00388834 48 00 00 10 */ b lbl_8038B8E4 +lbl_8038B8D8: +/* 8038B8D8 00388838 38 00 00 03 */ li r0, 3 +/* 8038B8DC 0038883C 48 00 00 08 */ b lbl_8038B8E4 +lbl_8038B8E0: +/* 8038B8E0 00388840 38 00 00 04 */ li r0, 4 +lbl_8038B8E4: +/* 8038B8E4 00388844 2C 00 00 02 */ cmpwi r0, 2 +/* 8038B8E8 00388848 40 82 00 0C */ bne lbl_8038B8F4 +/* 8038B8EC 0038884C DB E1 00 20 */ stfd f31, 0x20(r1) +/* 8038B8F0 00388850 48 00 01 D8 */ b lbl_8038BAC8 +lbl_8038B8F4: +/* 8038B8F4 00388854 FC 20 F8 90 */ fmr f1, f31 +/* 8038B8F8 00388858 38 61 01 0C */ addi r3, r1, 0x10c +/* 8038B8FC 0038885C 48 00 03 AD */ bl __num2dec_internal +lbl_8038B900: +/* 8038B900 00388860 38 61 01 0C */ addi r3, r1, 0x10c +/* 8038B904 00388864 38 81 01 90 */ addi r4, r1, 0x190 +/* 8038B908 00388868 48 00 0A D9 */ bl __less_dec +/* 8038B90C 0038886C 2C 03 00 00 */ cmpwi r3, 0 +/* 8038B910 00388870 40 82 FE F8 */ bne lbl_8038B808 +/* 8038B914 00388874 38 61 00 E0 */ addi r3, r1, 0xe0 +/* 8038B918 00388878 38 81 01 90 */ addi r4, r1, 0x190 +/* 8038B91C 0038887C 38 A1 01 38 */ addi r5, r1, 0x138 +/* 8038B920 00388880 48 00 05 C5 */ bl __minus_dec +/* 8038B924 00388884 38 61 00 B4 */ addi r3, r1, 0xb4 +/* 8038B928 00388888 38 81 01 0C */ addi r4, r1, 0x10c +/* 8038B92C 0038888C 38 A1 01 90 */ addi r5, r1, 0x190 +/* 8038B930 00388890 48 00 05 B5 */ bl __minus_dec +/* 8038B934 00388894 38 61 00 E0 */ addi r3, r1, 0xe0 +/* 8038B938 00388898 38 81 00 B4 */ addi r4, r1, 0xb4 +/* 8038B93C 0038889C 48 00 0B 9D */ bl __equals_dec +/* 8038B940 003888A0 2C 03 00 00 */ cmpwi r3, 0 +/* 8038B944 003888A4 41 82 00 34 */ beq lbl_8038B978 +/* 8038B948 003888A8 80 01 00 20 */ lwz r0, 0x20(r1) +/* 8038B94C 003888AC 38 80 00 00 */ li r4, 0 +/* 8038B950 003888B0 80 A1 00 24 */ lwz r5, 0x24(r1) +/* 8038B954 003888B4 38 60 00 01 */ li r3, 1 +/* 8038B958 003888B8 7C 00 20 38 */ and r0, r0, r4 +/* 8038B95C 003888BC 7C A3 18 38 */ and r3, r5, r3 +/* 8038B960 003888C0 7C 63 22 78 */ xor r3, r3, r4 +/* 8038B964 003888C4 7C 00 22 78 */ xor r0, r0, r4 +/* 8038B968 003888C8 7C 60 03 79 */ or. r0, r3, r0 +/* 8038B96C 003888CC 41 82 01 5C */ beq lbl_8038BAC8 +/* 8038B970 003888D0 DB E1 00 20 */ stfd f31, 0x20(r1) +/* 8038B974 003888D4 48 00 01 54 */ b lbl_8038BAC8 +lbl_8038B978: +/* 8038B978 003888D8 38 61 00 E0 */ addi r3, r1, 0xe0 +/* 8038B97C 003888DC 38 81 00 B4 */ addi r4, r1, 0xb4 +/* 8038B980 003888E0 48 00 0A 61 */ bl __less_dec +/* 8038B984 003888E4 2C 03 00 00 */ cmpwi r3, 0 +/* 8038B988 003888E8 40 82 01 40 */ bne lbl_8038BAC8 +/* 8038B98C 003888EC DB E1 00 20 */ stfd f31, 0x20(r1) +/* 8038B990 003888F0 48 00 01 38 */ b lbl_8038BAC8 +lbl_8038B994: +/* 8038B994 003888F4 3C 60 80 5B */ lis r3, lbl_805A8BA4@ha +/* 8038B998 003888F8 C8 21 00 20 */ lfd f1, 0x20(r1) +/* 8038B99C 003888FC C0 03 8B A4 */ lfs f0, lbl_805A8BA4@l(r3) +/* 8038B9A0 00388900 FC 40 00 50 */ fneg f2, f0 +/* 8038B9A4 00388904 48 00 8F B5 */ bl nextafter +/* 8038B9A8 00388908 FF E0 08 90 */ fmr f31, f1 +/* 8038B9AC 0038890C 38 61 00 88 */ addi r3, r1, 0x88 +/* 8038B9B0 00388910 48 00 02 F9 */ bl __num2dec_internal +/* 8038B9B4 00388914 3C 60 80 5B */ lis r3, lbl_805A8BA4@ha +/* 8038B9B8 00388918 3B E3 8B A4 */ addi r31, r3, lbl_805A8BA4@l +/* 8038B9BC 0038891C 48 00 00 7C */ b lbl_8038BA38 +lbl_8038B9C0: +/* 8038B9C0 00388920 C0 1F 00 00 */ lfs f0, 0(r31) +/* 8038B9C4 00388924 FC 20 F8 90 */ fmr f1, f31 +/* 8038B9C8 00388928 81 81 00 88 */ lwz r12, 0x88(r1) +/* 8038B9CC 0038892C 81 61 00 8C */ lwz r11, 0x8c(r1) +/* 8038B9D0 00388930 FC 40 00 50 */ fneg f2, f0 +/* 8038B9D4 00388934 81 41 00 90 */ lwz r10, 0x90(r1) +/* 8038B9D8 00388938 81 21 00 94 */ lwz r9, 0x94(r1) +/* 8038B9DC 0038893C 81 01 00 98 */ lwz r8, 0x98(r1) +/* 8038B9E0 00388940 80 E1 00 9C */ lwz r7, 0x9c(r1) +/* 8038B9E4 00388944 80 C1 00 A0 */ lwz r6, 0xa0(r1) +/* 8038B9E8 00388948 80 A1 00 A4 */ lwz r5, 0xa4(r1) +/* 8038B9EC 0038894C 80 81 00 A8 */ lwz r4, 0xa8(r1) +/* 8038B9F0 00388950 80 61 00 AC */ lwz r3, 0xac(r1) +/* 8038B9F4 00388954 A0 01 00 B0 */ lhz r0, 0xb0(r1) +/* 8038B9F8 00388958 91 81 01 38 */ stw r12, 0x138(r1) +/* 8038B9FC 0038895C 91 61 01 3C */ stw r11, 0x13c(r1) +/* 8038BA00 00388960 91 41 01 40 */ stw r10, 0x140(r1) +/* 8038BA04 00388964 91 21 01 44 */ stw r9, 0x144(r1) +/* 8038BA08 00388968 91 01 01 48 */ stw r8, 0x148(r1) +/* 8038BA0C 0038896C 90 E1 01 4C */ stw r7, 0x14c(r1) +/* 8038BA10 00388970 90 C1 01 50 */ stw r6, 0x150(r1) +/* 8038BA14 00388974 90 A1 01 54 */ stw r5, 0x154(r1) +/* 8038BA18 00388978 90 81 01 58 */ stw r4, 0x158(r1) +/* 8038BA1C 0038897C 90 61 01 5C */ stw r3, 0x15c(r1) +/* 8038BA20 00388980 B0 01 01 60 */ sth r0, 0x160(r1) +/* 8038BA24 00388984 DB E1 00 20 */ stfd f31, 0x20(r1) +/* 8038BA28 00388988 48 00 8F 31 */ bl nextafter +/* 8038BA2C 0038898C FF E0 08 90 */ fmr f31, f1 +/* 8038BA30 00388990 38 61 00 88 */ addi r3, r1, 0x88 +/* 8038BA34 00388994 48 00 02 75 */ bl __num2dec_internal +lbl_8038BA38: +/* 8038BA38 00388998 38 61 01 90 */ addi r3, r1, 0x190 +/* 8038BA3C 0038899C 38 81 00 88 */ addi r4, r1, 0x88 +/* 8038BA40 003889A0 48 00 09 A1 */ bl __less_dec +/* 8038BA44 003889A4 2C 03 00 00 */ cmpwi r3, 0 +/* 8038BA48 003889A8 40 82 FF 78 */ bne lbl_8038B9C0 +/* 8038BA4C 003889AC 38 61 00 5C */ addi r3, r1, 0x5c +/* 8038BA50 003889B0 38 81 01 90 */ addi r4, r1, 0x190 +/* 8038BA54 003889B4 38 A1 00 88 */ addi r5, r1, 0x88 +/* 8038BA58 003889B8 48 00 04 8D */ bl __minus_dec +/* 8038BA5C 003889BC 38 61 00 30 */ addi r3, r1, 0x30 +/* 8038BA60 003889C0 38 81 01 38 */ addi r4, r1, 0x138 +/* 8038BA64 003889C4 38 A1 01 90 */ addi r5, r1, 0x190 +/* 8038BA68 003889C8 48 00 04 7D */ bl __minus_dec +/* 8038BA6C 003889CC 38 61 00 5C */ addi r3, r1, 0x5c +/* 8038BA70 003889D0 38 81 00 30 */ addi r4, r1, 0x30 +/* 8038BA74 003889D4 48 00 0A 65 */ bl __equals_dec +/* 8038BA78 003889D8 2C 03 00 00 */ cmpwi r3, 0 +/* 8038BA7C 003889DC 41 82 00 34 */ beq lbl_8038BAB0 +/* 8038BA80 003889E0 80 01 00 20 */ lwz r0, 0x20(r1) +/* 8038BA84 003889E4 38 80 00 00 */ li r4, 0 +/* 8038BA88 003889E8 80 A1 00 24 */ lwz r5, 0x24(r1) +/* 8038BA8C 003889EC 38 60 00 01 */ li r3, 1 +/* 8038BA90 003889F0 7C 00 20 38 */ and r0, r0, r4 +/* 8038BA94 003889F4 7C A3 18 38 */ and r3, r5, r3 +/* 8038BA98 003889F8 7C 63 22 78 */ xor r3, r3, r4 +/* 8038BA9C 003889FC 7C 00 22 78 */ xor r0, r0, r4 +/* 8038BAA0 00388A00 7C 60 03 79 */ or. r0, r3, r0 +/* 8038BAA4 00388A04 41 82 00 24 */ beq lbl_8038BAC8 +/* 8038BAA8 00388A08 DB E1 00 20 */ stfd f31, 0x20(r1) +/* 8038BAAC 00388A0C 48 00 00 1C */ b lbl_8038BAC8 +lbl_8038BAB0: +/* 8038BAB0 00388A10 38 61 00 5C */ addi r3, r1, 0x5c +/* 8038BAB4 00388A14 38 81 00 30 */ addi r4, r1, 0x30 +/* 8038BAB8 00388A18 48 00 09 29 */ bl __less_dec +/* 8038BABC 00388A1C 2C 03 00 00 */ cmpwi r3, 0 +/* 8038BAC0 00388A20 41 82 00 08 */ beq lbl_8038BAC8 +/* 8038BAC4 00388A24 DB E1 00 20 */ stfd f31, 0x20(r1) +lbl_8038BAC8: +/* 8038BAC8 00388A28 88 01 01 90 */ lbz r0, 0x190(r1) +/* 8038BACC 00388A2C 7C 00 07 75 */ extsb. r0, r0 +/* 8038BAD0 00388A30 41 82 00 10 */ beq lbl_8038BAE0 +/* 8038BAD4 00388A34 C8 01 00 20 */ lfd f0, 0x20(r1) +/* 8038BAD8 00388A38 FC 00 00 50 */ fneg f0, f0 +/* 8038BADC 00388A3C D8 01 00 20 */ stfd f0, 0x20(r1) +lbl_8038BAE0: +/* 8038BAE0 00388A40 C8 21 00 20 */ lfd f1, 0x20(r1) +lbl_8038BAE4: +/* 8038BAE4 00388A44 E3 E1 01 E8 */ psq_l f31, 488(r1), 0, qr0 +/* 8038BAE8 00388A48 80 01 01 F4 */ lwz r0, 0x1f4(r1) +/* 8038BAEC 00388A4C CB E1 01 E0 */ lfd f31, 0x1e0(r1) +/* 8038BAF0 00388A50 83 E1 01 DC */ lwz r31, 0x1dc(r1) +/* 8038BAF4 00388A54 83 C1 01 D8 */ lwz r30, 0x1d8(r1) +/* 8038BAF8 00388A58 7C 08 03 A6 */ mtlr r0 +/* 8038BAFC 00388A5C 38 21 01 F0 */ addi r1, r1, 0x1f0 +/* 8038BB00 00388A60 4E 80 00 20 */ blr + +.global __num2dec +__num2dec: +/* 8038BB04 00388A64 94 21 FF F0 */ stwu r1, -0x10(r1) +/* 8038BB08 00388A68 7C 08 02 A6 */ mflr r0 +/* 8038BB0C 00388A6C 90 01 00 14 */ stw r0, 0x14(r1) +/* 8038BB10 00388A70 93 E1 00 0C */ stw r31, 0xc(r1) +/* 8038BB14 00388A74 7C 9F 23 78 */ mr r31, r4 +/* 8038BB18 00388A78 93 C1 00 08 */ stw r30, 8(r1) +/* 8038BB1C 00388A7C AB C3 00 02 */ lha r30, 2(r3) +/* 8038BB20 00388A80 7F E3 FB 78 */ mr r3, r31 +/* 8038BB24 00388A84 48 00 01 85 */ bl __num2dec_internal +/* 8038BB28 00388A88 88 1F 00 05 */ lbz r0, 5(r31) +/* 8038BB2C 00388A8C 28 00 00 09 */ cmplwi r0, 9 +/* 8038BB30 00388A90 41 81 01 60 */ bgt lbl_8038BC90 +/* 8038BB34 00388A94 7F C0 07 34 */ extsh r0, r30 +/* 8038BB38 00388A98 2C 00 00 24 */ cmpwi r0, 0x24 +/* 8038BB3C 00388A9C 40 81 00 08 */ ble lbl_8038BB44 +/* 8038BB40 00388AA0 3B C0 00 24 */ li r30, 0x24 +lbl_8038BB44: +/* 8038BB44 00388AA4 7F C6 07 35 */ extsh. r6, r30 +/* 8038BB48 00388AA8 40 81 00 E8 */ ble lbl_8038BC30 +/* 8038BB4C 00388AAC 88 1F 00 04 */ lbz r0, 4(r31) +/* 8038BB50 00388AB0 7C 06 00 00 */ cmpw r6, r0 +/* 8038BB54 00388AB4 40 80 00 DC */ bge lbl_8038BC30 +/* 8038BB58 00388AB8 7C BF 32 14 */ add r5, r31, r6 +/* 8038BB5C 00388ABC 88 05 00 05 */ lbz r0, 5(r5) +/* 8038BB60 00388AC0 28 00 00 05 */ cmplwi r0, 5 +/* 8038BB64 00388AC4 40 81 00 0C */ ble lbl_8038BB70 +/* 8038BB68 00388AC8 38 00 00 01 */ li r0, 1 +/* 8038BB6C 00388ACC 48 00 00 64 */ b lbl_8038BBD0 +lbl_8038BB70: +/* 8038BB70 00388AD0 40 80 00 0C */ bge lbl_8038BB7C +/* 8038BB74 00388AD4 38 00 FF FF */ li r0, -1 +/* 8038BB78 00388AD8 48 00 00 58 */ b lbl_8038BBD0 +lbl_8038BB7C: +/* 8038BB7C 00388ADC 88 7F 00 04 */ lbz r3, 4(r31) +/* 8038BB80 00388AE0 38 85 00 06 */ addi r4, r5, 6 +/* 8038BB84 00388AE4 38 63 00 05 */ addi r3, r3, 5 +/* 8038BB88 00388AE8 7C 7F 1A 14 */ add r3, r31, r3 +/* 8038BB8C 00388AEC 7C 04 18 50 */ subf r0, r4, r3 +/* 8038BB90 00388AF0 7C 09 03 A6 */ mtctr r0 +/* 8038BB94 00388AF4 7C 04 18 40 */ cmplw r4, r3 +/* 8038BB98 00388AF8 40 80 00 20 */ bge lbl_8038BBB8 +lbl_8038BB9C: +/* 8038BB9C 00388AFC 88 04 00 00 */ lbz r0, 0(r4) +/* 8038BBA0 00388B00 28 00 00 00 */ cmplwi r0, 0 +/* 8038BBA4 00388B04 41 82 00 0C */ beq lbl_8038BBB0 +/* 8038BBA8 00388B08 38 00 00 01 */ li r0, 1 +/* 8038BBAC 00388B0C 48 00 00 24 */ b lbl_8038BBD0 +lbl_8038BBB0: +/* 8038BBB0 00388B10 38 84 00 01 */ addi r4, r4, 1 +/* 8038BBB4 00388B14 42 00 FF E8 */ bdnz lbl_8038BB9C +lbl_8038BBB8: +/* 8038BBB8 00388B18 88 05 00 04 */ lbz r0, 4(r5) +/* 8038BBBC 00388B1C 54 00 07 FF */ clrlwi. r0, r0, 0x1f +/* 8038BBC0 00388B20 41 82 00 0C */ beq lbl_8038BBCC +/* 8038BBC4 00388B24 38 00 00 01 */ li r0, 1 +/* 8038BBC8 00388B28 48 00 00 08 */ b lbl_8038BBD0 +lbl_8038BBCC: +/* 8038BBCC 00388B2C 38 00 FF FF */ li r0, -1 +lbl_8038BBD0: +/* 8038BBD0 00388B30 2C 00 00 00 */ cmpwi r0, 0 +/* 8038BBD4 00388B34 98 DF 00 04 */ stb r6, 4(r31) +/* 8038BBD8 00388B38 41 80 00 58 */ blt lbl_8038BC30 +/* 8038BBDC 00388B3C 38 BF 00 05 */ addi r5, r31, 5 +/* 8038BBE0 00388B40 38 86 FF FF */ addi r4, r6, -1 +/* 8038BBE4 00388B44 7C 85 22 14 */ add r4, r5, r4 +/* 8038BBE8 00388B48 38 00 00 00 */ li r0, 0 +lbl_8038BBEC: +/* 8038BBEC 00388B4C 88 64 00 00 */ lbz r3, 0(r4) +/* 8038BBF0 00388B50 28 03 00 09 */ cmplwi r3, 9 +/* 8038BBF4 00388B54 40 80 00 10 */ bge lbl_8038BC04 +/* 8038BBF8 00388B58 38 03 00 01 */ addi r0, r3, 1 +/* 8038BBFC 00388B5C 98 04 00 00 */ stb r0, 0(r4) +/* 8038BC00 00388B60 48 00 00 30 */ b lbl_8038BC30 +lbl_8038BC04: +/* 8038BC04 00388B64 7C 04 28 40 */ cmplw r4, r5 +/* 8038BC08 00388B68 40 82 00 1C */ bne lbl_8038BC24 +/* 8038BC0C 00388B6C 38 00 00 01 */ li r0, 1 +/* 8038BC10 00388B70 98 04 00 00 */ stb r0, 0(r4) +/* 8038BC14 00388B74 A8 7F 00 02 */ lha r3, 2(r31) +/* 8038BC18 00388B78 38 03 00 01 */ addi r0, r3, 1 +/* 8038BC1C 00388B7C B0 1F 00 02 */ sth r0, 2(r31) +/* 8038BC20 00388B80 48 00 00 10 */ b lbl_8038BC30 +lbl_8038BC24: +/* 8038BC24 00388B84 98 04 00 00 */ stb r0, 0(r4) +/* 8038BC28 00388B88 38 84 FF FF */ addi r4, r4, -1 +/* 8038BC2C 00388B8C 4B FF FF C0 */ b lbl_8038BBEC +lbl_8038BC30: +/* 8038BC30 00388B90 38 A0 00 00 */ li r5, 0 +/* 8038BC34 00388B94 48 00 00 18 */ b lbl_8038BC4C +lbl_8038BC38: +/* 8038BC38 00388B98 88 9F 00 04 */ lbz r4, 4(r31) +/* 8038BC3C 00388B9C 38 64 00 01 */ addi r3, r4, 1 +/* 8038BC40 00388BA0 38 04 00 05 */ addi r0, r4, 5 +/* 8038BC44 00388BA4 98 7F 00 04 */ stb r3, 4(r31) +/* 8038BC48 00388BA8 7C BF 01 AE */ stbx r5, r31, r0 +lbl_8038BC4C: +/* 8038BC4C 00388BAC 88 7F 00 04 */ lbz r3, 4(r31) +/* 8038BC50 00388BB0 7C 03 30 00 */ cmpw r3, r6 +/* 8038BC54 00388BB4 41 80 FF E4 */ blt lbl_8038BC38 +/* 8038BC58 00388BB8 A8 1F 00 02 */ lha r0, 2(r31) +/* 8038BC5C 00388BBC 38 63 FF FF */ addi r3, r3, -1 +/* 8038BC60 00388BC0 38 A0 00 00 */ li r5, 0 +/* 8038BC64 00388BC4 7C 03 00 50 */ subf r0, r3, r0 +/* 8038BC68 00388BC8 B0 1F 00 02 */ sth r0, 2(r31) +/* 8038BC6C 00388BCC 48 00 00 18 */ b lbl_8038BC84 +lbl_8038BC70: +/* 8038BC70 00388BD0 38 85 00 05 */ addi r4, r5, 5 +/* 8038BC74 00388BD4 38 A5 00 01 */ addi r5, r5, 1 +/* 8038BC78 00388BD8 7C 7F 20 AE */ lbzx r3, r31, r4 +/* 8038BC7C 00388BDC 38 03 00 30 */ addi r0, r3, 0x30 +/* 8038BC80 00388BE0 7C 1F 21 AE */ stbx r0, r31, r4 +lbl_8038BC84: +/* 8038BC84 00388BE4 88 1F 00 04 */ lbz r0, 4(r31) +/* 8038BC88 00388BE8 7C 05 00 00 */ cmpw r5, r0 +/* 8038BC8C 00388BEC 41 80 FF E4 */ blt lbl_8038BC70 +lbl_8038BC90: +/* 8038BC90 00388BF0 80 01 00 14 */ lwz r0, 0x14(r1) +/* 8038BC94 00388BF4 83 E1 00 0C */ lwz r31, 0xc(r1) +/* 8038BC98 00388BF8 83 C1 00 08 */ lwz r30, 8(r1) +/* 8038BC9C 00388BFC 7C 08 03 A6 */ mtlr r0 +/* 8038BCA0 00388C00 38 21 00 10 */ addi r1, r1, 0x10 +/* 8038BCA4 00388C04 4E 80 00 20 */ blr + +.global __num2dec_internal +__num2dec_internal: +/* 8038BCA8 00388C08 94 21 FF 50 */ stwu r1, -0xb0(r1) +/* 8038BCAC 00388C0C 7C 08 02 A6 */ mflr r0 +/* 8038BCB0 00388C10 C8 02 CF 40 */ lfd f0, lbl_805AEC60@sda21(r2) +/* 8038BCB4 00388C14 90 01 00 B4 */ stw r0, 0xb4(r1) +/* 8038BCB8 00388C18 FC 00 08 00 */ fcmpu cr0, f0, f1 +/* 8038BCBC 00388C1C DB E1 00 A8 */ stfd f31, 0xa8(r1) +/* 8038BCC0 00388C20 93 E1 00 A4 */ stw r31, 0xa4(r1) +/* 8038BCC4 00388C24 93 C1 00 A0 */ stw r30, 0xa0(r1) +/* 8038BCC8 00388C28 7C 7E 1B 78 */ mr r30, r3 +/* 8038BCCC 00388C2C D8 21 00 08 */ stfd f1, 8(r1) +/* 8038BCD0 00388C30 80 01 00 08 */ lwz r0, 8(r1) +/* 8038BCD4 00388C34 93 A1 00 9C */ stw r29, 0x9c(r1) +/* 8038BCD8 00388C38 54 00 0F FE */ srwi r0, r0, 0x1f +/* 8038BCDC 00388C3C 7C 1F 07 74 */ extsb r31, r0 +/* 8038BCE0 00388C40 40 82 00 20 */ bne lbl_8038BD00 +/* 8038BCE4 00388C44 9B FE 00 00 */ stb r31, 0(r30) +/* 8038BCE8 00388C48 38 60 00 00 */ li r3, 0 +/* 8038BCEC 00388C4C 38 00 00 01 */ li r0, 1 +/* 8038BCF0 00388C50 B0 7E 00 02 */ sth r3, 2(r30) +/* 8038BCF4 00388C54 98 1E 00 04 */ stb r0, 4(r30) +/* 8038BCF8 00388C58 98 7E 00 05 */ stb r3, 5(r30) +/* 8038BCFC 00388C5C 48 00 01 C8 */ b lbl_8038BEC4 +lbl_8038BD00: +/* 8038BD00 00388C60 D8 21 00 28 */ stfd f1, 0x28(r1) +/* 8038BD04 00388C64 3C 00 7F F0 */ lis r0, 0x7ff0 +/* 8038BD08 00388C68 80 81 00 28 */ lwz r4, 0x28(r1) +/* 8038BD0C 00388C6C 54 83 00 56 */ rlwinm r3, r4, 0, 1, 0xb +/* 8038BD10 00388C70 7C 03 00 00 */ cmpw r3, r0 +/* 8038BD14 00388C74 41 82 00 14 */ beq lbl_8038BD28 +/* 8038BD18 00388C78 40 80 00 58 */ bge lbl_8038BD70 +/* 8038BD1C 00388C7C 2C 03 00 00 */ cmpwi r3, 0 +/* 8038BD20 00388C80 41 82 00 2C */ beq lbl_8038BD4C +/* 8038BD24 00388C84 48 00 00 4C */ b lbl_8038BD70 +lbl_8038BD28: +/* 8038BD28 00388C88 54 80 03 3F */ clrlwi. r0, r4, 0xc +/* 8038BD2C 00388C8C 40 82 00 10 */ bne lbl_8038BD3C +/* 8038BD30 00388C90 80 01 00 2C */ lwz r0, 0x2c(r1) +/* 8038BD34 00388C94 2C 00 00 00 */ cmpwi r0, 0 +/* 8038BD38 00388C98 41 82 00 0C */ beq lbl_8038BD44 +lbl_8038BD3C: +/* 8038BD3C 00388C9C 38 00 00 01 */ li r0, 1 +/* 8038BD40 00388CA0 48 00 00 34 */ b lbl_8038BD74 +lbl_8038BD44: +/* 8038BD44 00388CA4 38 00 00 02 */ li r0, 2 +/* 8038BD48 00388CA8 48 00 00 2C */ b lbl_8038BD74 +lbl_8038BD4C: +/* 8038BD4C 00388CAC 54 80 03 3F */ clrlwi. r0, r4, 0xc +/* 8038BD50 00388CB0 40 82 00 10 */ bne lbl_8038BD60 +/* 8038BD54 00388CB4 80 01 00 2C */ lwz r0, 0x2c(r1) +/* 8038BD58 00388CB8 2C 00 00 00 */ cmpwi r0, 0 +/* 8038BD5C 00388CBC 41 82 00 0C */ beq lbl_8038BD68 +lbl_8038BD60: +/* 8038BD60 00388CC0 38 00 00 05 */ li r0, 5 +/* 8038BD64 00388CC4 48 00 00 10 */ b lbl_8038BD74 +lbl_8038BD68: +/* 8038BD68 00388CC8 38 00 00 03 */ li r0, 3 +/* 8038BD6C 00388CCC 48 00 00 08 */ b lbl_8038BD74 +lbl_8038BD70: +/* 8038BD70 00388CD0 38 00 00 04 */ li r0, 4 +lbl_8038BD74: +/* 8038BD74 00388CD4 2C 00 00 02 */ cmpwi r0, 2 +/* 8038BD78 00388CD8 41 81 00 A8 */ bgt lbl_8038BE20 +/* 8038BD7C 00388CDC C8 01 00 08 */ lfd f0, 8(r1) +/* 8038BD80 00388CE0 38 60 00 00 */ li r3, 0 +/* 8038BD84 00388CE4 9B FE 00 00 */ stb r31, 0(r30) +/* 8038BD88 00388CE8 3C 00 7F F0 */ lis r0, 0x7ff0 +/* 8038BD8C 00388CEC 38 80 00 01 */ li r4, 1 +/* 8038BD90 00388CF0 D8 01 00 20 */ stfd f0, 0x20(r1) +/* 8038BD94 00388CF4 80 A1 00 20 */ lwz r5, 0x20(r1) +/* 8038BD98 00388CF8 B0 7E 00 02 */ sth r3, 2(r30) +/* 8038BD9C 00388CFC 54 A3 00 56 */ rlwinm r3, r5, 0, 1, 0xb +/* 8038BDA0 00388D00 7C 03 00 00 */ cmpw r3, r0 +/* 8038BDA4 00388D04 98 9E 00 04 */ stb r4, 4(r30) +/* 8038BDA8 00388D08 41 82 00 14 */ beq lbl_8038BDBC +/* 8038BDAC 00388D0C 40 80 00 58 */ bge lbl_8038BE04 +/* 8038BDB0 00388D10 2C 03 00 00 */ cmpwi r3, 0 +/* 8038BDB4 00388D14 41 82 00 2C */ beq lbl_8038BDE0 +/* 8038BDB8 00388D18 48 00 00 4C */ b lbl_8038BE04 +lbl_8038BDBC: +/* 8038BDBC 00388D1C 54 A0 03 3F */ clrlwi. r0, r5, 0xc +/* 8038BDC0 00388D20 40 82 00 10 */ bne lbl_8038BDD0 +/* 8038BDC4 00388D24 80 01 00 24 */ lwz r0, 0x24(r1) +/* 8038BDC8 00388D28 2C 00 00 00 */ cmpwi r0, 0 +/* 8038BDCC 00388D2C 41 82 00 0C */ beq lbl_8038BDD8 +lbl_8038BDD0: +/* 8038BDD0 00388D30 38 00 00 01 */ li r0, 1 +/* 8038BDD4 00388D34 48 00 00 34 */ b lbl_8038BE08 +lbl_8038BDD8: +/* 8038BDD8 00388D38 38 00 00 02 */ li r0, 2 +/* 8038BDDC 00388D3C 48 00 00 2C */ b lbl_8038BE08 +lbl_8038BDE0: +/* 8038BDE0 00388D40 54 A0 03 3F */ clrlwi. r0, r5, 0xc +/* 8038BDE4 00388D44 40 82 00 10 */ bne lbl_8038BDF4 +/* 8038BDE8 00388D48 80 01 00 24 */ lwz r0, 0x24(r1) +/* 8038BDEC 00388D4C 2C 00 00 00 */ cmpwi r0, 0 +/* 8038BDF0 00388D50 41 82 00 0C */ beq lbl_8038BDFC +lbl_8038BDF4: +/* 8038BDF4 00388D54 38 00 00 05 */ li r0, 5 +/* 8038BDF8 00388D58 48 00 00 10 */ b lbl_8038BE08 +lbl_8038BDFC: +/* 8038BDFC 00388D5C 38 00 00 03 */ li r0, 3 +/* 8038BE00 00388D60 48 00 00 08 */ b lbl_8038BE08 +lbl_8038BE04: +/* 8038BE04 00388D64 38 00 00 04 */ li r0, 4 +lbl_8038BE08: +/* 8038BE08 00388D68 2C 00 00 01 */ cmpwi r0, 1 +/* 8038BE0C 00388D6C 38 00 00 49 */ li r0, 0x49 +/* 8038BE10 00388D70 40 82 00 08 */ bne lbl_8038BE18 +/* 8038BE14 00388D74 38 00 00 4E */ li r0, 0x4e +lbl_8038BE18: +/* 8038BE18 00388D78 98 1E 00 05 */ stb r0, 5(r30) +/* 8038BE1C 00388D7C 48 00 00 A8 */ b lbl_8038BEC4 +lbl_8038BE20: +/* 8038BE20 00388D80 7F E0 07 75 */ extsb. r0, r31 +/* 8038BE24 00388D84 41 82 00 0C */ beq lbl_8038BE30 +/* 8038BE28 00388D88 FC 00 08 50 */ fneg f0, f1 +/* 8038BE2C 00388D8C D8 01 00 08 */ stfd f0, 8(r1) +lbl_8038BE30: +/* 8038BE30 00388D90 C8 21 00 08 */ lfd f1, 8(r1) +/* 8038BE34 00388D94 38 61 00 10 */ addi r3, r1, 0x10 +/* 8038BE38 00388D98 48 00 87 D5 */ bl frexp +/* 8038BE3C 00388D9C FF E0 08 90 */ fmr f31, f1 +/* 8038BE40 00388DA0 DB E1 00 18 */ stfd f31, 0x18(r1) +/* 8038BE44 00388DA4 80 61 00 1C */ lwz r3, 0x1c(r1) +/* 8038BE48 00388DA8 28 03 00 00 */ cmplwi r3, 0 +/* 8038BE4C 00388DAC 41 82 00 0C */ beq lbl_8038BE58 +/* 8038BE50 00388DB0 48 00 0F 5D */ bl __count_trailing_zerol +/* 8038BE54 00388DB4 48 00 00 14 */ b lbl_8038BE68 +lbl_8038BE58: +/* 8038BE58 00388DB8 80 01 00 18 */ lwz r0, 0x18(r1) +/* 8038BE5C 00388DBC 64 03 00 10 */ oris r3, r0, 0x10 +/* 8038BE60 00388DC0 48 00 0F 4D */ bl __count_trailing_zerol +/* 8038BE64 00388DC4 38 63 00 20 */ addi r3, r3, 0x20 +lbl_8038BE68: +/* 8038BE68 00388DC8 20 63 00 35 */ subfic r3, r3, 0x35 +/* 8038BE6C 00388DCC 80 01 00 10 */ lwz r0, 0x10(r1) +/* 8038BE70 00388DD0 7C 7D 07 34 */ extsh r29, r3 +/* 8038BE74 00388DD4 7C 1D 00 50 */ subf r0, r29, r0 +/* 8038BE78 00388DD8 38 61 00 38 */ addi r3, r1, 0x38 +/* 8038BE7C 00388DDC 7C 04 07 34 */ extsh r4, r0 +/* 8038BE80 00388DE0 48 00 07 65 */ bl __two_exp +/* 8038BE84 00388DE4 FC 20 F8 90 */ fmr f1, f31 +/* 8038BE88 00388DE8 7F A3 EB 78 */ mr r3, r29 +/* 8038BE8C 00388DEC 48 00 88 0D */ bl ldexp +/* 8038BE90 00388DF0 38 61 00 30 */ addi r3, r1, 0x30 +/* 8038BE94 00388DF4 48 00 89 C9 */ bl modf +/* 8038BE98 00388DF8 C8 21 00 30 */ lfd f1, 0x30(r1) +/* 8038BE9C 00388DFC 4B FF E1 7D */ bl __cvt_dbl_usll +/* 8038BEA0 00388E00 7C 65 1B 78 */ mr r5, r3 +/* 8038BEA4 00388E04 7C 86 23 78 */ mr r6, r4 +/* 8038BEA8 00388E08 38 61 00 64 */ addi r3, r1, 0x64 +/* 8038BEAC 00388E0C 48 00 0D F1 */ bl __ull2dec +/* 8038BEB0 00388E10 7F C3 F3 78 */ mr r3, r30 +/* 8038BEB4 00388E14 38 81 00 64 */ addi r4, r1, 0x64 +/* 8038BEB8 00388E18 38 A1 00 38 */ addi r5, r1, 0x38 +/* 8038BEBC 00388E1C 48 00 0B 55 */ bl __timesdec +/* 8038BEC0 00388E20 9B FE 00 00 */ stb r31, 0(r30) +lbl_8038BEC4: +/* 8038BEC4 00388E24 80 01 00 B4 */ lwz r0, 0xb4(r1) +/* 8038BEC8 00388E28 CB E1 00 A8 */ lfd f31, 0xa8(r1) +/* 8038BECC 00388E2C 83 E1 00 A4 */ lwz r31, 0xa4(r1) +/* 8038BED0 00388E30 83 C1 00 A0 */ lwz r30, 0xa0(r1) +/* 8038BED4 00388E34 83 A1 00 9C */ lwz r29, 0x9c(r1) +/* 8038BED8 00388E38 7C 08 03 A6 */ mtlr r0 +/* 8038BEDC 00388E3C 38 21 00 B0 */ addi r1, r1, 0xb0 +/* 8038BEE0 00388E40 4E 80 00 20 */ blr + +.global __minus_dec +__minus_dec: +/* 8038BEE4 00388E44 80 C4 00 00 */ lwz r6, 0(r4) +/* 8038BEE8 00388E48 80 04 00 04 */ lwz r0, 4(r4) +/* 8038BEEC 00388E4C 90 C3 00 00 */ stw r6, 0(r3) +/* 8038BEF0 00388E50 90 03 00 04 */ stw r0, 4(r3) +/* 8038BEF4 00388E54 80 C4 00 08 */ lwz r6, 8(r4) +/* 8038BEF8 00388E58 80 04 00 0C */ lwz r0, 0xc(r4) +/* 8038BEFC 00388E5C 90 C3 00 08 */ stw r6, 8(r3) +/* 8038BF00 00388E60 90 03 00 0C */ stw r0, 0xc(r3) +/* 8038BF04 00388E64 80 C4 00 10 */ lwz r6, 0x10(r4) +/* 8038BF08 00388E68 80 04 00 14 */ lwz r0, 0x14(r4) +/* 8038BF0C 00388E6C 90 C3 00 10 */ stw r6, 0x10(r3) +/* 8038BF10 00388E70 90 03 00 14 */ stw r0, 0x14(r3) +/* 8038BF14 00388E74 80 C4 00 18 */ lwz r6, 0x18(r4) +/* 8038BF18 00388E78 80 04 00 1C */ lwz r0, 0x1c(r4) +/* 8038BF1C 00388E7C 90 C3 00 18 */ stw r6, 0x18(r3) +/* 8038BF20 00388E80 90 03 00 1C */ stw r0, 0x1c(r3) +/* 8038BF24 00388E84 80 C4 00 20 */ lwz r6, 0x20(r4) +/* 8038BF28 00388E88 80 04 00 24 */ lwz r0, 0x24(r4) +/* 8038BF2C 00388E8C 90 C3 00 20 */ stw r6, 0x20(r3) +/* 8038BF30 00388E90 90 03 00 24 */ stw r0, 0x24(r3) +/* 8038BF34 00388E94 A0 04 00 28 */ lhz r0, 0x28(r4) +/* 8038BF38 00388E98 B0 03 00 28 */ sth r0, 0x28(r3) +/* 8038BF3C 00388E9C 88 05 00 05 */ lbz r0, 5(r5) +/* 8038BF40 00388EA0 28 00 00 00 */ cmplwi r0, 0 +/* 8038BF44 00388EA4 4D 82 00 20 */ beqlr +/* 8038BF48 00388EA8 88 83 00 04 */ lbz r4, 4(r3) +/* 8038BF4C 00388EAC 88 05 00 04 */ lbz r0, 4(r5) +/* 8038BF50 00388EB0 7C 88 23 78 */ mr r8, r4 +/* 8038BF54 00388EB4 7C 04 00 00 */ cmpw r4, r0 +/* 8038BF58 00388EB8 40 80 00 08 */ bge lbl_8038BF60 +/* 8038BF5C 00388EBC 7C 08 03 78 */ mr r8, r0 +lbl_8038BF60: +/* 8038BF60 00388EC0 A8 85 00 02 */ lha r4, 2(r5) +/* 8038BF64 00388EC4 A8 03 00 02 */ lha r0, 2(r3) +/* 8038BF68 00388EC8 7C 04 00 50 */ subf r0, r4, r0 +/* 8038BF6C 00388ECC 7D 08 02 14 */ add r8, r8, r0 +/* 8038BF70 00388ED0 2C 08 00 24 */ cmpwi r8, 0x24 +/* 8038BF74 00388ED4 40 81 00 08 */ ble lbl_8038BF7C +/* 8038BF78 00388ED8 39 00 00 24 */ li r8, 0x24 +lbl_8038BF7C: +/* 8038BF7C 00388EDC 38 E0 00 00 */ li r7, 0 +/* 8038BF80 00388EE0 48 00 00 18 */ b lbl_8038BF98 +lbl_8038BF84: +/* 8038BF84 00388EE4 88 83 00 04 */ lbz r4, 4(r3) +/* 8038BF88 00388EE8 38 C4 00 01 */ addi r6, r4, 1 +/* 8038BF8C 00388EEC 38 84 00 05 */ addi r4, r4, 5 +/* 8038BF90 00388EF0 98 C3 00 04 */ stb r6, 4(r3) +/* 8038BF94 00388EF4 7C E3 21 AE */ stbx r7, r3, r4 +lbl_8038BF98: +/* 8038BF98 00388EF8 88 83 00 04 */ lbz r4, 4(r3) +/* 8038BF9C 00388EFC 7C 04 40 00 */ cmpw r4, r8 +/* 8038BFA0 00388F00 41 80 FF E4 */ blt lbl_8038BF84 +/* 8038BFA4 00388F04 88 E5 00 04 */ lbz r7, 4(r5) +/* 8038BFA8 00388F08 38 83 00 05 */ addi r4, r3, 5 +/* 8038BFAC 00388F0C 7C C4 42 14 */ add r6, r4, r8 +/* 8038BFB0 00388F10 7C E7 02 14 */ add r7, r7, r0 +/* 8038BFB4 00388F14 7C 07 40 00 */ cmpw r7, r8 +/* 8038BFB8 00388F18 40 80 00 08 */ bge lbl_8038BFC0 +/* 8038BFBC 00388F1C 7C C4 3A 14 */ add r6, r4, r7 +lbl_8038BFC0: +/* 8038BFC0 00388F20 7C E4 30 50 */ subf r7, r4, r6 +/* 8038BFC4 00388F24 39 25 00 05 */ addi r9, r5, 5 +/* 8038BFC8 00388F28 7C E0 38 50 */ subf r7, r0, r7 +/* 8038BFCC 00388F2C 7D 49 3A 14 */ add r10, r9, r7 +/* 8038BFD0 00388F30 7D 4B 53 78 */ mr r11, r10 +/* 8038BFD4 00388F34 48 00 01 40 */ b lbl_8038C114 +lbl_8038BFD8: +/* 8038BFD8 00388F38 8D 06 FF FF */ lbzu r8, -1(r6) +/* 8038BFDC 00388F3C 8C EA FF FF */ lbzu r7, -1(r10) +/* 8038BFE0 00388F40 7C 08 38 40 */ cmplw r8, r7 +/* 8038BFE4 00388F44 40 80 01 20 */ bge lbl_8038C104 +/* 8038BFE8 00388F48 39 86 FF FF */ addi r12, r6, -1 +/* 8038BFEC 00388F4C 48 00 00 08 */ b lbl_8038BFF4 +lbl_8038BFF0: +/* 8038BFF0 00388F50 39 8C FF FF */ addi r12, r12, -1 +lbl_8038BFF4: +/* 8038BFF4 00388F54 88 EC 00 00 */ lbz r7, 0(r12) +/* 8038BFF8 00388F58 28 07 00 00 */ cmplwi r7, 0 +/* 8038BFFC 00388F5C 41 82 FF F4 */ beq lbl_8038BFF0 +/* 8038C000 00388F60 7C 0C 30 40 */ cmplw r12, r6 +/* 8038C004 00388F64 7D 0C 30 50 */ subf r8, r12, r6 +/* 8038C008 00388F68 41 82 00 FC */ beq lbl_8038C104 +/* 8038C00C 00388F6C 55 07 E8 FF */ rlwinm. r7, r8, 0x1d, 3, 0x1f +/* 8038C010 00388F70 7C E9 03 A6 */ mtctr r7 +/* 8038C014 00388F74 41 82 00 D0 */ beq lbl_8038C0E4 +lbl_8038C018: +/* 8038C018 00388F78 88 EC 00 00 */ lbz r7, 0(r12) +/* 8038C01C 00388F7C 38 E7 FF FF */ addi r7, r7, -1 +/* 8038C020 00388F80 98 EC 00 00 */ stb r7, 0(r12) +/* 8038C024 00388F84 88 EC 00 01 */ lbz r7, 1(r12) +/* 8038C028 00388F88 38 E7 00 0A */ addi r7, r7, 0xa +/* 8038C02C 00388F8C 98 EC 00 01 */ stb r7, 1(r12) +/* 8038C030 00388F90 88 EC 00 01 */ lbz r7, 1(r12) +/* 8038C034 00388F94 38 E7 FF FF */ addi r7, r7, -1 +/* 8038C038 00388F98 98 EC 00 01 */ stb r7, 1(r12) +/* 8038C03C 00388F9C 88 EC 00 02 */ lbz r7, 2(r12) +/* 8038C040 00388FA0 38 E7 00 0A */ addi r7, r7, 0xa +/* 8038C044 00388FA4 98 EC 00 02 */ stb r7, 2(r12) +/* 8038C048 00388FA8 88 EC 00 02 */ lbz r7, 2(r12) +/* 8038C04C 00388FAC 38 E7 FF FF */ addi r7, r7, -1 +/* 8038C050 00388FB0 98 EC 00 02 */ stb r7, 2(r12) +/* 8038C054 00388FB4 88 EC 00 03 */ lbz r7, 3(r12) +/* 8038C058 00388FB8 38 E7 00 0A */ addi r7, r7, 0xa +/* 8038C05C 00388FBC 98 EC 00 03 */ stb r7, 3(r12) +/* 8038C060 00388FC0 88 EC 00 03 */ lbz r7, 3(r12) +/* 8038C064 00388FC4 38 E7 FF FF */ addi r7, r7, -1 +/* 8038C068 00388FC8 98 EC 00 03 */ stb r7, 3(r12) +/* 8038C06C 00388FCC 88 EC 00 04 */ lbz r7, 4(r12) +/* 8038C070 00388FD0 38 E7 00 0A */ addi r7, r7, 0xa +/* 8038C074 00388FD4 98 EC 00 04 */ stb r7, 4(r12) +/* 8038C078 00388FD8 88 EC 00 04 */ lbz r7, 4(r12) +/* 8038C07C 00388FDC 38 E7 FF FF */ addi r7, r7, -1 +/* 8038C080 00388FE0 98 EC 00 04 */ stb r7, 4(r12) +/* 8038C084 00388FE4 88 EC 00 05 */ lbz r7, 5(r12) +/* 8038C088 00388FE8 38 E7 00 0A */ addi r7, r7, 0xa +/* 8038C08C 00388FEC 98 EC 00 05 */ stb r7, 5(r12) +/* 8038C090 00388FF0 88 EC 00 05 */ lbz r7, 5(r12) +/* 8038C094 00388FF4 38 E7 FF FF */ addi r7, r7, -1 +/* 8038C098 00388FF8 98 EC 00 05 */ stb r7, 5(r12) +/* 8038C09C 00388FFC 88 EC 00 06 */ lbz r7, 6(r12) +/* 8038C0A0 00389000 38 E7 00 0A */ addi r7, r7, 0xa +/* 8038C0A4 00389004 98 EC 00 06 */ stb r7, 6(r12) +/* 8038C0A8 00389008 88 EC 00 06 */ lbz r7, 6(r12) +/* 8038C0AC 0038900C 38 E7 FF FF */ addi r7, r7, -1 +/* 8038C0B0 00389010 98 EC 00 06 */ stb r7, 6(r12) +/* 8038C0B4 00389014 88 EC 00 07 */ lbz r7, 7(r12) +/* 8038C0B8 00389018 38 E7 00 0A */ addi r7, r7, 0xa +/* 8038C0BC 0038901C 98 EC 00 07 */ stb r7, 7(r12) +/* 8038C0C0 00389020 88 EC 00 07 */ lbz r7, 7(r12) +/* 8038C0C4 00389024 38 E7 FF FF */ addi r7, r7, -1 +/* 8038C0C8 00389028 98 EC 00 07 */ stb r7, 7(r12) +/* 8038C0CC 0038902C 88 EC 00 08 */ lbz r7, 8(r12) +/* 8038C0D0 00389030 38 E7 00 0A */ addi r7, r7, 0xa +/* 8038C0D4 00389034 9C EC 00 08 */ stbu r7, 8(r12) +/* 8038C0D8 00389038 42 00 FF 40 */ bdnz lbl_8038C018 +/* 8038C0DC 0038903C 71 08 00 07 */ andi. r8, r8, 7 +/* 8038C0E0 00389040 41 82 00 24 */ beq lbl_8038C104 +lbl_8038C0E4: +/* 8038C0E4 00389044 7D 09 03 A6 */ mtctr r8 +lbl_8038C0E8: +/* 8038C0E8 00389048 88 EC 00 00 */ lbz r7, 0(r12) +/* 8038C0EC 0038904C 38 E7 FF FF */ addi r7, r7, -1 +/* 8038C0F0 00389050 98 EC 00 00 */ stb r7, 0(r12) +/* 8038C0F4 00389054 88 EC 00 01 */ lbz r7, 1(r12) +/* 8038C0F8 00389058 38 E7 00 0A */ addi r7, r7, 0xa +/* 8038C0FC 0038905C 9C EC 00 01 */ stbu r7, 1(r12) +/* 8038C100 00389060 42 00 FF E8 */ bdnz lbl_8038C0E8 +lbl_8038C104: +/* 8038C104 00389064 89 0A 00 00 */ lbz r8, 0(r10) +/* 8038C108 00389068 88 E6 00 00 */ lbz r7, 0(r6) +/* 8038C10C 0038906C 7C E8 38 50 */ subf r7, r8, r7 +/* 8038C110 00389070 98 E6 00 00 */ stb r7, 0(r6) +lbl_8038C114: +/* 8038C114 00389074 7C 06 20 40 */ cmplw r6, r4 +/* 8038C118 00389078 40 81 00 0C */ ble lbl_8038C124 +/* 8038C11C 0038907C 7C 0A 48 40 */ cmplw r10, r9 +/* 8038C120 00389080 41 81 FE B8 */ bgt lbl_8038BFD8 +lbl_8038C124: +/* 8038C124 00389084 89 05 00 04 */ lbz r8, 4(r5) +/* 8038C128 00389088 7D 29 58 50 */ subf r9, r9, r11 +/* 8038C12C 0038908C 7C 09 40 00 */ cmpw r9, r8 +/* 8038C130 00389090 40 80 01 A8 */ bge lbl_8038C2D8 +/* 8038C134 00389094 88 EB 00 00 */ lbz r7, 0(r11) +/* 8038C138 00389098 39 40 00 00 */ li r10, 0 +/* 8038C13C 0038909C 28 07 00 05 */ cmplwi r7, 5 +/* 8038C140 003890A0 40 80 00 0C */ bge lbl_8038C14C +/* 8038C144 003890A4 39 40 00 01 */ li r10, 1 +/* 8038C148 003890A8 48 00 00 54 */ b lbl_8038C19C +lbl_8038C14C: +/* 8038C14C 003890AC 40 82 00 50 */ bne lbl_8038C19C +/* 8038C150 003890B0 38 E8 00 05 */ addi r7, r8, 5 +/* 8038C154 003890B4 38 CB 00 01 */ addi r6, r11, 1 +/* 8038C158 003890B8 7C E5 3A 14 */ add r7, r5, r7 +/* 8038C15C 003890BC 7C A6 38 50 */ subf r5, r6, r7 +/* 8038C160 003890C0 7C A9 03 A6 */ mtctr r5 +/* 8038C164 003890C4 7C 06 38 40 */ cmplw r6, r7 +/* 8038C168 003890C8 40 80 00 18 */ bge lbl_8038C180 +lbl_8038C16C: +/* 8038C16C 003890CC 88 A6 00 00 */ lbz r5, 0(r6) +/* 8038C170 003890D0 28 05 00 00 */ cmplwi r5, 0 +/* 8038C174 003890D4 40 82 01 64 */ bne lbl_8038C2D8 +/* 8038C178 003890D8 38 C6 00 01 */ addi r6, r6, 1 +/* 8038C17C 003890DC 42 00 FF F0 */ bdnz lbl_8038C16C +lbl_8038C180: +/* 8038C180 003890E0 7C A9 02 14 */ add r5, r9, r0 +/* 8038C184 003890E4 38 C5 FF FF */ addi r6, r5, -1 +/* 8038C188 003890E8 7C C4 32 14 */ add r6, r4, r6 +/* 8038C18C 003890EC 88 06 00 00 */ lbz r0, 0(r6) +/* 8038C190 003890F0 54 00 07 FF */ clrlwi. r0, r0, 0x1f +/* 8038C194 003890F4 41 82 00 08 */ beq lbl_8038C19C +/* 8038C198 003890F8 39 40 00 01 */ li r10, 1 +lbl_8038C19C: +/* 8038C19C 003890FC 2C 0A 00 00 */ cmpwi r10, 0 +/* 8038C1A0 00389100 41 82 01 38 */ beq lbl_8038C2D8 +/* 8038C1A4 00389104 88 06 00 00 */ lbz r0, 0(r6) +/* 8038C1A8 00389108 28 00 00 01 */ cmplwi r0, 1 +/* 8038C1AC 0038910C 40 80 01 20 */ bge lbl_8038C2CC +/* 8038C1B0 00389110 39 06 FF FF */ addi r8, r6, -1 +/* 8038C1B4 00389114 48 00 00 08 */ b lbl_8038C1BC +lbl_8038C1B8: +/* 8038C1B8 00389118 39 08 FF FF */ addi r8, r8, -1 +lbl_8038C1BC: +/* 8038C1BC 0038911C 88 08 00 00 */ lbz r0, 0(r8) +/* 8038C1C0 00389120 28 00 00 00 */ cmplwi r0, 0 +/* 8038C1C4 00389124 41 82 FF F4 */ beq lbl_8038C1B8 +/* 8038C1C8 00389128 7C 08 30 40 */ cmplw r8, r6 +/* 8038C1CC 0038912C 7C A8 30 50 */ subf r5, r8, r6 +/* 8038C1D0 00389130 41 82 00 FC */ beq lbl_8038C2CC +/* 8038C1D4 00389134 54 A0 E8 FF */ rlwinm. r0, r5, 0x1d, 3, 0x1f +/* 8038C1D8 00389138 7C 09 03 A6 */ mtctr r0 +/* 8038C1DC 0038913C 41 82 00 D0 */ beq lbl_8038C2AC +lbl_8038C1E0: +/* 8038C1E0 00389140 88 E8 00 00 */ lbz r7, 0(r8) +/* 8038C1E4 00389144 38 07 FF FF */ addi r0, r7, -1 +/* 8038C1E8 00389148 98 08 00 00 */ stb r0, 0(r8) +/* 8038C1EC 0038914C 88 E8 00 01 */ lbz r7, 1(r8) +/* 8038C1F0 00389150 38 07 00 0A */ addi r0, r7, 0xa +/* 8038C1F4 00389154 98 08 00 01 */ stb r0, 1(r8) +/* 8038C1F8 00389158 88 E8 00 01 */ lbz r7, 1(r8) +/* 8038C1FC 0038915C 38 07 FF FF */ addi r0, r7, -1 +/* 8038C200 00389160 98 08 00 01 */ stb r0, 1(r8) +/* 8038C204 00389164 88 E8 00 02 */ lbz r7, 2(r8) +/* 8038C208 00389168 38 07 00 0A */ addi r0, r7, 0xa +/* 8038C20C 0038916C 98 08 00 02 */ stb r0, 2(r8) +/* 8038C210 00389170 88 E8 00 02 */ lbz r7, 2(r8) +/* 8038C214 00389174 38 07 FF FF */ addi r0, r7, -1 +/* 8038C218 00389178 98 08 00 02 */ stb r0, 2(r8) +/* 8038C21C 0038917C 88 E8 00 03 */ lbz r7, 3(r8) +/* 8038C220 00389180 38 07 00 0A */ addi r0, r7, 0xa +/* 8038C224 00389184 98 08 00 03 */ stb r0, 3(r8) +/* 8038C228 00389188 88 E8 00 03 */ lbz r7, 3(r8) +/* 8038C22C 0038918C 38 07 FF FF */ addi r0, r7, -1 +/* 8038C230 00389190 98 08 00 03 */ stb r0, 3(r8) +/* 8038C234 00389194 88 E8 00 04 */ lbz r7, 4(r8) +/* 8038C238 00389198 38 07 00 0A */ addi r0, r7, 0xa +/* 8038C23C 0038919C 98 08 00 04 */ stb r0, 4(r8) +/* 8038C240 003891A0 88 E8 00 04 */ lbz r7, 4(r8) +/* 8038C244 003891A4 38 07 FF FF */ addi r0, r7, -1 +/* 8038C248 003891A8 98 08 00 04 */ stb r0, 4(r8) +/* 8038C24C 003891AC 88 E8 00 05 */ lbz r7, 5(r8) +/* 8038C250 003891B0 38 07 00 0A */ addi r0, r7, 0xa +/* 8038C254 003891B4 98 08 00 05 */ stb r0, 5(r8) +/* 8038C258 003891B8 88 E8 00 05 */ lbz r7, 5(r8) +/* 8038C25C 003891BC 38 07 FF FF */ addi r0, r7, -1 +/* 8038C260 003891C0 98 08 00 05 */ stb r0, 5(r8) +/* 8038C264 003891C4 88 E8 00 06 */ lbz r7, 6(r8) +/* 8038C268 003891C8 38 07 00 0A */ addi r0, r7, 0xa +/* 8038C26C 003891CC 98 08 00 06 */ stb r0, 6(r8) +/* 8038C270 003891D0 88 E8 00 06 */ lbz r7, 6(r8) +/* 8038C274 003891D4 38 07 FF FF */ addi r0, r7, -1 +/* 8038C278 003891D8 98 08 00 06 */ stb r0, 6(r8) +/* 8038C27C 003891DC 88 E8 00 07 */ lbz r7, 7(r8) +/* 8038C280 003891E0 38 07 00 0A */ addi r0, r7, 0xa +/* 8038C284 003891E4 98 08 00 07 */ stb r0, 7(r8) +/* 8038C288 003891E8 88 E8 00 07 */ lbz r7, 7(r8) +/* 8038C28C 003891EC 38 07 FF FF */ addi r0, r7, -1 +/* 8038C290 003891F0 98 08 00 07 */ stb r0, 7(r8) +/* 8038C294 003891F4 88 E8 00 08 */ lbz r7, 8(r8) +/* 8038C298 003891F8 38 07 00 0A */ addi r0, r7, 0xa +/* 8038C29C 003891FC 9C 08 00 08 */ stbu r0, 8(r8) +/* 8038C2A0 00389200 42 00 FF 40 */ bdnz lbl_8038C1E0 +/* 8038C2A4 00389204 70 A5 00 07 */ andi. r5, r5, 7 +/* 8038C2A8 00389208 41 82 00 24 */ beq lbl_8038C2CC +lbl_8038C2AC: +/* 8038C2AC 0038920C 7C A9 03 A6 */ mtctr r5 +lbl_8038C2B0: +/* 8038C2B0 00389210 88 E8 00 00 */ lbz r7, 0(r8) +/* 8038C2B4 00389214 38 07 FF FF */ addi r0, r7, -1 +/* 8038C2B8 00389218 98 08 00 00 */ stb r0, 0(r8) +/* 8038C2BC 0038921C 88 E8 00 01 */ lbz r7, 1(r8) +/* 8038C2C0 00389220 38 07 00 0A */ addi r0, r7, 0xa +/* 8038C2C4 00389224 9C 08 00 01 */ stbu r0, 1(r8) +/* 8038C2C8 00389228 42 00 FF E8 */ bdnz lbl_8038C2B0 +lbl_8038C2CC: +/* 8038C2CC 0038922C 88 A6 00 00 */ lbz r5, 0(r6) +/* 8038C2D0 00389230 38 05 FF FF */ addi r0, r5, -1 +/* 8038C2D4 00389234 98 06 00 00 */ stb r0, 0(r6) +lbl_8038C2D8: +/* 8038C2D8 00389238 7C 86 23 78 */ mr r6, r4 +/* 8038C2DC 0038923C 48 00 00 08 */ b lbl_8038C2E4 +lbl_8038C2E0: +/* 8038C2E0 00389240 38 C6 00 01 */ addi r6, r6, 1 +lbl_8038C2E4: +/* 8038C2E4 00389244 88 06 00 00 */ lbz r0, 0(r6) +/* 8038C2E8 00389248 28 00 00 00 */ cmplwi r0, 0 +/* 8038C2EC 0038924C 41 82 FF F4 */ beq lbl_8038C2E0 +/* 8038C2F0 00389250 7C 06 20 40 */ cmplw r6, r4 +/* 8038C2F4 00389254 40 81 00 B0 */ ble lbl_8038C3A4 +/* 8038C2F8 00389258 7C A4 30 50 */ subf r5, r4, r6 +/* 8038C2FC 0038925C A8 03 00 02 */ lha r0, 2(r3) +/* 8038C300 00389260 54 A7 06 3E */ clrlwi r7, r5, 0x18 +/* 8038C304 00389264 7C 07 00 50 */ subf r0, r7, r0 +/* 8038C308 00389268 B0 03 00 02 */ sth r0, 2(r3) +/* 8038C30C 0038926C 88 03 00 04 */ lbz r0, 4(r3) +/* 8038C310 00389270 7C 04 02 14 */ add r0, r4, r0 +/* 8038C314 00389274 7C 06 00 40 */ cmplw r6, r0 +/* 8038C318 00389278 7C A6 00 50 */ subf r5, r6, r0 +/* 8038C31C 0038927C 40 80 00 7C */ bge lbl_8038C398 +/* 8038C320 00389280 54 A0 E8 FF */ rlwinm. r0, r5, 0x1d, 3, 0x1f +/* 8038C324 00389284 7C 09 03 A6 */ mtctr r0 +/* 8038C328 00389288 41 82 00 58 */ beq lbl_8038C380 +lbl_8038C32C: +/* 8038C32C 0038928C 88 06 00 00 */ lbz r0, 0(r6) +/* 8038C330 00389290 98 04 00 00 */ stb r0, 0(r4) +/* 8038C334 00389294 88 06 00 01 */ lbz r0, 1(r6) +/* 8038C338 00389298 98 04 00 01 */ stb r0, 1(r4) +/* 8038C33C 0038929C 88 06 00 02 */ lbz r0, 2(r6) +/* 8038C340 003892A0 98 04 00 02 */ stb r0, 2(r4) +/* 8038C344 003892A4 88 06 00 03 */ lbz r0, 3(r6) +/* 8038C348 003892A8 98 04 00 03 */ stb r0, 3(r4) +/* 8038C34C 003892AC 88 06 00 04 */ lbz r0, 4(r6) +/* 8038C350 003892B0 98 04 00 04 */ stb r0, 4(r4) +/* 8038C354 003892B4 88 06 00 05 */ lbz r0, 5(r6) +/* 8038C358 003892B8 98 04 00 05 */ stb r0, 5(r4) +/* 8038C35C 003892BC 88 06 00 06 */ lbz r0, 6(r6) +/* 8038C360 003892C0 98 04 00 06 */ stb r0, 6(r4) +/* 8038C364 003892C4 88 06 00 07 */ lbz r0, 7(r6) +/* 8038C368 003892C8 38 C6 00 08 */ addi r6, r6, 8 +/* 8038C36C 003892CC 98 04 00 07 */ stb r0, 7(r4) +/* 8038C370 003892D0 38 84 00 08 */ addi r4, r4, 8 +/* 8038C374 003892D4 42 00 FF B8 */ bdnz lbl_8038C32C +/* 8038C378 003892D8 70 A5 00 07 */ andi. r5, r5, 7 +/* 8038C37C 003892DC 41 82 00 1C */ beq lbl_8038C398 +lbl_8038C380: +/* 8038C380 003892E0 7C A9 03 A6 */ mtctr r5 +lbl_8038C384: +/* 8038C384 003892E4 88 06 00 00 */ lbz r0, 0(r6) +/* 8038C388 003892E8 38 C6 00 01 */ addi r6, r6, 1 +/* 8038C38C 003892EC 98 04 00 00 */ stb r0, 0(r4) +/* 8038C390 003892F0 38 84 00 01 */ addi r4, r4, 1 +/* 8038C394 003892F4 42 00 FF F0 */ bdnz lbl_8038C384 +lbl_8038C398: +/* 8038C398 003892F8 88 03 00 04 */ lbz r0, 4(r3) +/* 8038C39C 003892FC 7C 07 00 50 */ subf r0, r7, r0 +/* 8038C3A0 00389300 98 03 00 04 */ stb r0, 4(r3) +lbl_8038C3A4: +/* 8038C3A4 00389304 88 03 00 04 */ lbz r0, 4(r3) +/* 8038C3A8 00389308 38 83 00 05 */ addi r4, r3, 5 +/* 8038C3AC 0038930C 7C A4 02 14 */ add r5, r4, r0 +/* 8038C3B0 00389310 7C 04 28 50 */ subf r0, r4, r5 +/* 8038C3B4 00389314 7C 09 03 A6 */ mtctr r0 +/* 8038C3B8 00389318 7C 05 20 40 */ cmplw r5, r4 +/* 8038C3BC 0038931C 40 81 00 14 */ ble lbl_8038C3D0 +lbl_8038C3C0: +/* 8038C3C0 00389320 8C 05 FF FF */ lbzu r0, -1(r5) +/* 8038C3C4 00389324 28 00 00 00 */ cmplwi r0, 0 +/* 8038C3C8 00389328 40 82 00 08 */ bne lbl_8038C3D0 +/* 8038C3CC 0038932C 42 00 FF F4 */ bdnz lbl_8038C3C0 +lbl_8038C3D0: +/* 8038C3D0 00389330 7C 84 28 50 */ subf r4, r4, r5 +/* 8038C3D4 00389334 38 04 00 01 */ addi r0, r4, 1 +/* 8038C3D8 00389338 98 03 00 04 */ stb r0, 4(r3) +/* 8038C3DC 0038933C 4E 80 00 20 */ blr + +.global __less_dec +__less_dec: +/* 8038C3E0 00389340 88 03 00 05 */ lbz r0, 5(r3) +/* 8038C3E4 00389344 28 00 00 00 */ cmplwi r0, 0 +/* 8038C3E8 00389348 40 82 00 18 */ bne lbl_8038C400 +/* 8038C3EC 0038934C 88 64 00 05 */ lbz r3, 5(r4) +/* 8038C3F0 00389350 7C 03 00 D0 */ neg r0, r3 +/* 8038C3F4 00389354 7C 00 1B 78 */ or r0, r0, r3 +/* 8038C3F8 00389358 54 03 0F FE */ srwi r3, r0, 0x1f +/* 8038C3FC 0038935C 4E 80 00 20 */ blr +lbl_8038C400: +/* 8038C400 00389360 88 04 00 05 */ lbz r0, 5(r4) +/* 8038C404 00389364 28 00 00 00 */ cmplwi r0, 0 +/* 8038C408 00389368 40 82 00 0C */ bne lbl_8038C414 +/* 8038C40C 0038936C 38 60 00 00 */ li r3, 0 +/* 8038C410 00389370 4E 80 00 20 */ blr +lbl_8038C414: +/* 8038C414 00389374 A8 03 00 02 */ lha r0, 2(r3) +/* 8038C418 00389378 A8 A4 00 02 */ lha r5, 2(r4) +/* 8038C41C 0038937C 7C 00 28 00 */ cmpw r0, r5 +/* 8038C420 00389380 40 82 00 A0 */ bne lbl_8038C4C0 +/* 8038C424 00389384 88 E3 00 04 */ lbz r7, 4(r3) +/* 8038C428 00389388 88 A4 00 04 */ lbz r5, 4(r4) +/* 8038C42C 0038938C 7C E9 3B 78 */ mr r9, r7 +/* 8038C430 00389390 7C 07 28 00 */ cmpw r7, r5 +/* 8038C434 00389394 40 81 00 08 */ ble lbl_8038C43C +/* 8038C438 00389398 7C A9 2B 78 */ mr r9, r5 +lbl_8038C43C: +/* 8038C43C 0038939C 39 00 00 00 */ li r8, 0 +/* 8038C440 003893A0 7D 29 03 A6 */ mtctr r9 +/* 8038C444 003893A4 2C 09 00 00 */ cmpwi r9, 0 +/* 8038C448 003893A8 40 81 00 38 */ ble lbl_8038C480 +lbl_8038C44C: +/* 8038C44C 003893AC 38 08 00 05 */ addi r0, r8, 5 +/* 8038C450 003893B0 7C C3 00 AE */ lbzx r6, r3, r0 +/* 8038C454 003893B4 7C 04 00 AE */ lbzx r0, r4, r0 +/* 8038C458 003893B8 7C 06 00 40 */ cmplw r6, r0 +/* 8038C45C 003893BC 40 80 00 0C */ bge lbl_8038C468 +/* 8038C460 003893C0 38 60 00 01 */ li r3, 1 +/* 8038C464 003893C4 4E 80 00 20 */ blr +lbl_8038C468: +/* 8038C468 003893C8 7C 00 30 40 */ cmplw r0, r6 +/* 8038C46C 003893CC 40 80 00 0C */ bge lbl_8038C478 +/* 8038C470 003893D0 38 60 00 00 */ li r3, 0 +/* 8038C474 003893D4 4E 80 00 20 */ blr +lbl_8038C478: +/* 8038C478 003893D8 39 08 00 01 */ addi r8, r8, 1 +/* 8038C47C 003893DC 42 00 FF D0 */ bdnz lbl_8038C44C +lbl_8038C480: +/* 8038C480 003893E0 7C 09 38 00 */ cmpw r9, r7 +/* 8038C484 003893E4 40 82 00 34 */ bne lbl_8038C4B8 +/* 8038C488 003893E8 7C 08 28 50 */ subf r0, r8, r5 +/* 8038C48C 003893EC 7C 09 03 A6 */ mtctr r0 +/* 8038C490 003893F0 7C 08 28 00 */ cmpw r8, r5 +/* 8038C494 003893F4 40 80 00 24 */ bge lbl_8038C4B8 +lbl_8038C498: +/* 8038C498 003893F8 38 08 00 05 */ addi r0, r8, 5 +/* 8038C49C 003893FC 7C 04 00 AE */ lbzx r0, r4, r0 +/* 8038C4A0 00389400 28 00 00 00 */ cmplwi r0, 0 +/* 8038C4A4 00389404 41 82 00 0C */ beq lbl_8038C4B0 +/* 8038C4A8 00389408 38 60 00 01 */ li r3, 1 +/* 8038C4AC 0038940C 4E 80 00 20 */ blr +lbl_8038C4B0: +/* 8038C4B0 00389410 39 08 00 01 */ addi r8, r8, 1 +/* 8038C4B4 00389414 42 00 FF E4 */ bdnz lbl_8038C498 +lbl_8038C4B8: +/* 8038C4B8 00389418 38 60 00 00 */ li r3, 0 +/* 8038C4BC 0038941C 4E 80 00 20 */ blr +lbl_8038C4C0: +/* 8038C4C0 00389420 7C A0 02 78 */ xor r0, r5, r0 +/* 8038C4C4 00389424 7C 03 0E 70 */ srawi r3, r0, 1 +/* 8038C4C8 00389428 7C 00 28 38 */ and r0, r0, r5 +/* 8038C4CC 0038942C 7C 00 18 50 */ subf r0, r0, r3 +/* 8038C4D0 00389430 54 03 0F FE */ srwi r3, r0, 0x1f +/* 8038C4D4 00389434 4E 80 00 20 */ blr + +.global __equals_dec +__equals_dec: +/* 8038C4D8 00389438 88 A3 00 05 */ lbz r5, 5(r3) +/* 8038C4DC 0038943C 28 05 00 00 */ cmplwi r5, 0 +/* 8038C4E0 00389440 40 82 00 14 */ bne lbl_8038C4F4 +/* 8038C4E4 00389444 88 04 00 05 */ lbz r0, 5(r4) +/* 8038C4E8 00389448 7C 00 00 34 */ cntlzw r0, r0 +/* 8038C4EC 0038944C 54 03 D9 7E */ srwi r3, r0, 5 +/* 8038C4F0 00389450 4E 80 00 20 */ blr +lbl_8038C4F4: +/* 8038C4F4 00389454 88 04 00 05 */ lbz r0, 5(r4) +/* 8038C4F8 00389458 28 00 00 00 */ cmplwi r0, 0 +/* 8038C4FC 0038945C 40 82 00 10 */ bne lbl_8038C50C +/* 8038C500 00389460 7C A0 00 34 */ cntlzw r0, r5 +/* 8038C504 00389464 54 03 D9 7E */ srwi r3, r0, 5 +/* 8038C508 00389468 4E 80 00 20 */ blr +lbl_8038C50C: +/* 8038C50C 0038946C A8 A3 00 02 */ lha r5, 2(r3) +/* 8038C510 00389470 A8 04 00 02 */ lha r0, 2(r4) +/* 8038C514 00389474 7C 05 00 00 */ cmpw r5, r0 +/* 8038C518 00389478 40 82 00 C4 */ bne lbl_8038C5DC +/* 8038C51C 0038947C 88 E3 00 04 */ lbz r7, 4(r3) +/* 8038C520 00389480 88 C4 00 04 */ lbz r6, 4(r4) +/* 8038C524 00389484 7C E9 3B 78 */ mr r9, r7 +/* 8038C528 00389488 7C 07 30 00 */ cmpw r7, r6 +/* 8038C52C 0038948C 40 81 00 08 */ ble lbl_8038C534 +/* 8038C530 00389490 7C C9 33 78 */ mr r9, r6 +lbl_8038C534: +/* 8038C534 00389494 39 00 00 00 */ li r8, 0 +/* 8038C538 00389498 7D 29 03 A6 */ mtctr r9 +/* 8038C53C 0038949C 2C 09 00 00 */ cmpwi r9, 0 +/* 8038C540 003894A0 40 81 00 28 */ ble lbl_8038C568 +lbl_8038C544: +/* 8038C544 003894A4 38 08 00 05 */ addi r0, r8, 5 +/* 8038C548 003894A8 7C A3 00 AE */ lbzx r5, r3, r0 +/* 8038C54C 003894AC 7C 04 00 AE */ lbzx r0, r4, r0 +/* 8038C550 003894B0 7C 05 00 40 */ cmplw r5, r0 +/* 8038C554 003894B4 41 82 00 0C */ beq lbl_8038C560 +/* 8038C558 003894B8 38 60 00 00 */ li r3, 0 +/* 8038C55C 003894BC 4E 80 00 20 */ blr +lbl_8038C560: +/* 8038C560 003894C0 39 08 00 01 */ addi r8, r8, 1 +/* 8038C564 003894C4 42 00 FF E0 */ bdnz lbl_8038C544 +lbl_8038C568: +/* 8038C568 003894C8 7C 09 38 00 */ cmpw r9, r7 +/* 8038C56C 003894CC 40 82 00 38 */ bne lbl_8038C5A4 +/* 8038C570 003894D0 7C 08 30 50 */ subf r0, r8, r6 +/* 8038C574 003894D4 7C 09 03 A6 */ mtctr r0 +/* 8038C578 003894D8 7C 08 30 00 */ cmpw r8, r6 +/* 8038C57C 003894DC 40 80 00 58 */ bge lbl_8038C5D4 +lbl_8038C580: +/* 8038C580 003894E0 38 08 00 05 */ addi r0, r8, 5 +/* 8038C584 003894E4 7C 04 00 AE */ lbzx r0, r4, r0 +/* 8038C588 003894E8 28 00 00 00 */ cmplwi r0, 0 +/* 8038C58C 003894EC 41 82 00 0C */ beq lbl_8038C598 +/* 8038C590 003894F0 38 60 00 00 */ li r3, 0 +/* 8038C594 003894F4 4E 80 00 20 */ blr +lbl_8038C598: +/* 8038C598 003894F8 39 08 00 01 */ addi r8, r8, 1 +/* 8038C59C 003894FC 42 00 FF E4 */ bdnz lbl_8038C580 +/* 8038C5A0 00389500 48 00 00 34 */ b lbl_8038C5D4 +lbl_8038C5A4: +/* 8038C5A4 00389504 7C 08 38 50 */ subf r0, r8, r7 +/* 8038C5A8 00389508 7C 09 03 A6 */ mtctr r0 +/* 8038C5AC 0038950C 7C 08 38 00 */ cmpw r8, r7 +/* 8038C5B0 00389510 40 80 00 24 */ bge lbl_8038C5D4 +lbl_8038C5B4: +/* 8038C5B4 00389514 38 08 00 05 */ addi r0, r8, 5 +/* 8038C5B8 00389518 7C 03 00 AE */ lbzx r0, r3, r0 +/* 8038C5BC 0038951C 28 00 00 00 */ cmplwi r0, 0 +/* 8038C5C0 00389520 41 82 00 0C */ beq lbl_8038C5CC +/* 8038C5C4 00389524 38 60 00 00 */ li r3, 0 +/* 8038C5C8 00389528 4E 80 00 20 */ blr +lbl_8038C5CC: +/* 8038C5CC 0038952C 39 08 00 01 */ addi r8, r8, 1 +/* 8038C5D0 00389530 42 00 FF E4 */ bdnz lbl_8038C5B4 +lbl_8038C5D4: +/* 8038C5D4 00389534 38 60 00 01 */ li r3, 1 +/* 8038C5D8 00389538 4E 80 00 20 */ blr +lbl_8038C5DC: +/* 8038C5DC 0038953C 38 60 00 00 */ li r3, 0 +/* 8038C5E0 00389540 4E 80 00 20 */ blr + +.global __two_exp +__two_exp: +/* 8038C5E4 00389544 94 21 FF 30 */ stwu r1, -0xd0(r1) +/* 8038C5E8 00389548 7C 08 02 A6 */ mflr r0 +/* 8038C5EC 0038954C 90 01 00 D4 */ stw r0, 0xd4(r1) +/* 8038C5F0 00389550 93 E1 00 CC */ stw r31, 0xcc(r1) +/* 8038C5F4 00389554 7C 7F 1B 78 */ mr r31, r3 +/* 8038C5F8 00389558 93 C1 00 C8 */ stw r30, 0xc8(r1) +/* 8038C5FC 0038955C 93 A1 00 C4 */ stw r29, 0xc4(r1) +/* 8038C600 00389560 7C 9D 23 78 */ mr r29, r4 +/* 8038C604 00389564 7F BE 07 34 */ extsh r30, r29 +/* 8038C608 00389568 38 1E 00 40 */ addi r0, r30, 0x40 +/* 8038C60C 0038956C 28 00 00 48 */ cmplwi r0, 0x48 +/* 8038C610 00389570 41 81 02 14 */ bgt lbl_8038C824 +/* 8038C614 00389574 3C 80 80 3F */ lis r4, lbl_803F28F8@ha +/* 8038C618 00389578 54 00 10 3A */ slwi r0, r0, 2 +/* 8038C61C 0038957C 38 84 28 F8 */ addi r4, r4, lbl_803F28F8@l +/* 8038C620 00389580 7C 04 00 2E */ lwzx r0, r4, r0 +/* 8038C624 00389584 7C 09 03 A6 */ mtctr r0 +/* 8038C628 00389588 4E 80 04 20 */ bctr +/* 8038C62C 0038958C 3C 80 80 3E */ lis r4, lbl_803D85D8@ha +/* 8038C630 00389590 38 A0 FF EC */ li r5, -20 +/* 8038C634 00389594 38 84 85 D8 */ addi r4, r4, lbl_803D85D8@l +/* 8038C638 00389598 38 84 00 25 */ addi r4, r4, 0x25 +/* 8038C63C 0038959C 48 00 02 E9 */ bl __str2dec +/* 8038C640 003895A0 48 00 02 C8 */ b lbl_8038C908 +/* 8038C644 003895A4 3C 80 80 3E */ lis r4, lbl_803D85D8@ha +/* 8038C648 003895A8 38 A0 FF F0 */ li r5, -16 +/* 8038C64C 003895AC 38 84 85 D8 */ addi r4, r4, lbl_803D85D8@l +/* 8038C650 003895B0 38 84 00 53 */ addi r4, r4, 0x53 +/* 8038C654 003895B4 48 00 02 D1 */ bl __str2dec +/* 8038C658 003895B8 48 00 02 B0 */ b lbl_8038C908 +/* 8038C65C 003895BC 3C 80 80 3E */ lis r4, lbl_803D85D8@ha +/* 8038C660 003895C0 38 A0 FF F6 */ li r5, -10 +/* 8038C664 003895C4 38 84 85 D8 */ addi r4, r4, lbl_803D85D8@l +/* 8038C668 003895C8 38 84 00 7A */ addi r4, r4, 0x7a +/* 8038C66C 003895CC 48 00 02 B9 */ bl __str2dec +/* 8038C670 003895D0 48 00 02 98 */ b lbl_8038C908 +/* 8038C674 003895D4 3C 80 80 3E */ lis r4, lbl_803D85D8@ha +/* 8038C678 003895D8 38 A0 FF FB */ li r5, -5 +/* 8038C67C 003895DC 38 84 85 D8 */ addi r4, r4, lbl_803D85D8@l +/* 8038C680 003895E0 38 84 00 92 */ addi r4, r4, 0x92 +/* 8038C684 003895E4 48 00 02 A1 */ bl __str2dec +/* 8038C688 003895E8 48 00 02 80 */ b lbl_8038C908 +/* 8038C68C 003895EC 3C 80 80 3E */ lis r4, lbl_803D85D8@ha +/* 8038C690 003895F0 38 A0 FF FD */ li r5, -3 +/* 8038C694 003895F4 38 84 85 D8 */ addi r4, r4, lbl_803D85D8@l +/* 8038C698 003895F8 38 84 00 9F */ addi r4, r4, 0x9f +/* 8038C69C 003895FC 48 00 02 89 */ bl __str2dec +/* 8038C6A0 00389600 48 00 02 68 */ b lbl_8038C908 +/* 8038C6A4 00389604 3C 80 80 3E */ lis r4, lbl_803D85D8@ha +/* 8038C6A8 00389608 38 A0 FF FD */ li r5, -3 +/* 8038C6AC 0038960C 38 84 85 D8 */ addi r4, r4, lbl_803D85D8@l +/* 8038C6B0 00389610 38 84 00 A6 */ addi r4, r4, 0xa6 +/* 8038C6B4 00389614 48 00 02 71 */ bl __str2dec +/* 8038C6B8 00389618 48 00 02 50 */ b lbl_8038C908 +/* 8038C6BC 0038961C 3C 80 80 3E */ lis r4, lbl_803D85D8@ha +/* 8038C6C0 00389620 38 A0 FF FE */ li r5, -2 +/* 8038C6C4 00389624 38 84 85 D8 */ addi r4, r4, lbl_803D85D8@l +/* 8038C6C8 00389628 38 84 00 AC */ addi r4, r4, 0xac +/* 8038C6CC 0038962C 48 00 02 59 */ bl __str2dec +/* 8038C6D0 00389630 48 00 02 38 */ b lbl_8038C908 +/* 8038C6D4 00389634 3C 80 80 3E */ lis r4, lbl_803D85D8@ha +/* 8038C6D8 00389638 38 A0 FF FE */ li r5, -2 +/* 8038C6DC 0038963C 38 84 85 D8 */ addi r4, r4, lbl_803D85D8@l +/* 8038C6E0 00389640 38 84 00 B2 */ addi r4, r4, 0xb2 +/* 8038C6E4 00389644 48 00 02 41 */ bl __str2dec +/* 8038C6E8 00389648 48 00 02 20 */ b lbl_8038C908 +/* 8038C6EC 0038964C 3C 80 80 3E */ lis r4, lbl_803D85D8@ha +/* 8038C6F0 00389650 38 A0 FF FE */ li r5, -2 +/* 8038C6F4 00389654 38 84 85 D8 */ addi r4, r4, lbl_803D85D8@l +/* 8038C6F8 00389658 38 84 00 B7 */ addi r4, r4, 0xb7 +/* 8038C6FC 0038965C 48 00 02 29 */ bl __str2dec +/* 8038C700 00389660 48 00 02 08 */ b lbl_8038C908 +/* 8038C704 00389664 3C 80 80 3E */ lis r4, lbl_803D85D8@ha +/* 8038C708 00389668 38 A0 FF FF */ li r5, -1 +/* 8038C70C 0038966C 38 84 85 D8 */ addi r4, r4, lbl_803D85D8@l +/* 8038C710 00389670 38 84 00 BB */ addi r4, r4, 0xbb +/* 8038C714 00389674 48 00 02 11 */ bl __str2dec +/* 8038C718 00389678 48 00 01 F0 */ b lbl_8038C908 +/* 8038C71C 0038967C 3C 80 80 3E */ lis r4, lbl_803D85D8@ha +/* 8038C720 00389680 38 A0 FF FF */ li r5, -1 +/* 8038C724 00389684 38 84 85 D8 */ addi r4, r4, lbl_803D85D8@l +/* 8038C728 00389688 38 84 00 BF */ addi r4, r4, 0xbf +/* 8038C72C 0038968C 48 00 01 F9 */ bl __str2dec +/* 8038C730 00389690 48 00 01 D8 */ b lbl_8038C908 +/* 8038C734 00389694 3C 80 80 3E */ lis r4, lbl_803D85D8@ha +/* 8038C738 00389698 38 A0 FF FF */ li r5, -1 +/* 8038C73C 0038969C 38 84 85 D8 */ addi r4, r4, lbl_803D85D8@l +/* 8038C740 003896A0 38 84 00 C2 */ addi r4, r4, 0xc2 +/* 8038C744 003896A4 48 00 01 E1 */ bl __str2dec +/* 8038C748 003896A8 48 00 01 C0 */ b lbl_8038C908 +/* 8038C74C 003896AC 3C 80 80 3E */ lis r4, lbl_803D85D8@ha +/* 8038C750 003896B0 38 A0 00 00 */ li r5, 0 +/* 8038C754 003896B4 38 84 85 D8 */ addi r4, r4, lbl_803D85D8@l +/* 8038C758 003896B8 38 84 00 C4 */ addi r4, r4, 0xc4 +/* 8038C75C 003896BC 48 00 01 C9 */ bl __str2dec +/* 8038C760 003896C0 48 00 01 A8 */ b lbl_8038C908 +/* 8038C764 003896C4 3C 80 80 3E */ lis r4, lbl_803D85D8@ha +/* 8038C768 003896C8 38 A0 00 00 */ li r5, 0 +/* 8038C76C 003896CC 38 84 85 D8 */ addi r4, r4, lbl_803D85D8@l +/* 8038C770 003896D0 38 84 00 C6 */ addi r4, r4, 0xc6 +/* 8038C774 003896D4 48 00 01 B1 */ bl __str2dec +/* 8038C778 003896D8 48 00 01 90 */ b lbl_8038C908 +/* 8038C77C 003896DC 3C 80 80 3E */ lis r4, lbl_803D85D8@ha +/* 8038C780 003896E0 38 A0 00 00 */ li r5, 0 +/* 8038C784 003896E4 38 84 85 D8 */ addi r4, r4, lbl_803D85D8@l +/* 8038C788 003896E8 38 84 00 C8 */ addi r4, r4, 0xc8 +/* 8038C78C 003896EC 48 00 01 99 */ bl __str2dec +/* 8038C790 003896F0 48 00 01 78 */ b lbl_8038C908 +/* 8038C794 003896F4 3C 80 80 3E */ lis r4, lbl_803D85D8@ha +/* 8038C798 003896F8 38 A0 00 00 */ li r5, 0 +/* 8038C79C 003896FC 38 84 85 D8 */ addi r4, r4, lbl_803D85D8@l +/* 8038C7A0 00389700 38 84 00 CA */ addi r4, r4, 0xca +/* 8038C7A4 00389704 48 00 01 81 */ bl __str2dec +/* 8038C7A8 00389708 48 00 01 60 */ b lbl_8038C908 +/* 8038C7AC 0038970C 3C 80 80 3E */ lis r4, lbl_803D85D8@ha +/* 8038C7B0 00389710 38 A0 00 01 */ li r5, 1 +/* 8038C7B4 00389714 38 84 85 D8 */ addi r4, r4, lbl_803D85D8@l +/* 8038C7B8 00389718 38 84 00 CC */ addi r4, r4, 0xcc +/* 8038C7BC 0038971C 48 00 01 69 */ bl __str2dec +/* 8038C7C0 00389720 48 00 01 48 */ b lbl_8038C908 +/* 8038C7C4 00389724 3C 80 80 3E */ lis r4, lbl_803D85D8@ha +/* 8038C7C8 00389728 38 A0 00 01 */ li r5, 1 +/* 8038C7CC 0038972C 38 84 85 D8 */ addi r4, r4, lbl_803D85D8@l +/* 8038C7D0 00389730 38 84 00 CF */ addi r4, r4, 0xcf +/* 8038C7D4 00389734 48 00 01 51 */ bl __str2dec +/* 8038C7D8 00389738 48 00 01 30 */ b lbl_8038C908 +/* 8038C7DC 0038973C 3C 80 80 3E */ lis r4, lbl_803D85D8@ha +/* 8038C7E0 00389740 38 A0 00 01 */ li r5, 1 +/* 8038C7E4 00389744 38 84 85 D8 */ addi r4, r4, lbl_803D85D8@l +/* 8038C7E8 00389748 38 84 00 D2 */ addi r4, r4, 0xd2 +/* 8038C7EC 0038974C 48 00 01 39 */ bl __str2dec +/* 8038C7F0 00389750 48 00 01 18 */ b lbl_8038C908 +/* 8038C7F4 00389754 3C 80 80 3E */ lis r4, lbl_803D85D8@ha +/* 8038C7F8 00389758 38 A0 00 02 */ li r5, 2 +/* 8038C7FC 0038975C 38 84 85 D8 */ addi r4, r4, lbl_803D85D8@l +/* 8038C800 00389760 38 84 00 D5 */ addi r4, r4, 0xd5 +/* 8038C804 00389764 48 00 01 21 */ bl __str2dec +/* 8038C808 00389768 48 00 01 00 */ b lbl_8038C908 +/* 8038C80C 0038976C 3C 80 80 3E */ lis r4, lbl_803D85D8@ha +/* 8038C810 00389770 38 A0 00 02 */ li r5, 2 +/* 8038C814 00389774 38 84 85 D8 */ addi r4, r4, lbl_803D85D8@l +/* 8038C818 00389778 38 84 00 D9 */ addi r4, r4, 0xd9 +/* 8038C81C 0038977C 48 00 01 09 */ bl __str2dec +/* 8038C820 00389780 48 00 00 E8 */ b lbl_8038C908 +lbl_8038C824: +/* 8038C824 00389784 57 C0 0F FE */ srwi r0, r30, 0x1f +/* 8038C828 00389788 38 61 00 8C */ addi r3, r1, 0x8c +/* 8038C82C 0038978C 7C 00 F2 14 */ add r0, r0, r30 +/* 8038C830 00389790 7C 00 0E 70 */ srawi r0, r0, 1 +/* 8038C834 00389794 7C 04 07 34 */ extsh r4, r0 +/* 8038C838 00389798 4B FF FD AD */ bl __two_exp +/* 8038C83C 0038979C 38 81 00 8C */ addi r4, r1, 0x8c +/* 8038C840 003897A0 7F E3 FB 78 */ mr r3, r31 +/* 8038C844 003897A4 7C 85 23 78 */ mr r5, r4 +/* 8038C848 003897A8 48 00 01 C9 */ bl __timesdec +/* 8038C84C 003897AC 57 C0 07 FF */ clrlwi. r0, r30, 0x1f +/* 8038C850 003897B0 41 82 00 B8 */ beq lbl_8038C908 +/* 8038C854 003897B4 80 7F 00 00 */ lwz r3, 0(r31) +/* 8038C858 003897B8 7F A0 07 35 */ extsh. r0, r29 +/* 8038C85C 003897BC 80 1F 00 04 */ lwz r0, 4(r31) +/* 8038C860 003897C0 90 61 00 60 */ stw r3, 0x60(r1) +/* 8038C864 003897C4 90 01 00 64 */ stw r0, 0x64(r1) +/* 8038C868 003897C8 80 7F 00 08 */ lwz r3, 8(r31) +/* 8038C86C 003897CC 80 1F 00 0C */ lwz r0, 0xc(r31) +/* 8038C870 003897D0 90 61 00 68 */ stw r3, 0x68(r1) +/* 8038C874 003897D4 90 01 00 6C */ stw r0, 0x6c(r1) +/* 8038C878 003897D8 80 7F 00 10 */ lwz r3, 0x10(r31) +/* 8038C87C 003897DC 80 1F 00 14 */ lwz r0, 0x14(r31) +/* 8038C880 003897E0 90 61 00 70 */ stw r3, 0x70(r1) +/* 8038C884 003897E4 90 01 00 74 */ stw r0, 0x74(r1) +/* 8038C888 003897E8 80 7F 00 18 */ lwz r3, 0x18(r31) +/* 8038C88C 003897EC 80 1F 00 1C */ lwz r0, 0x1c(r31) +/* 8038C890 003897F0 90 61 00 78 */ stw r3, 0x78(r1) +/* 8038C894 003897F4 90 01 00 7C */ stw r0, 0x7c(r1) +/* 8038C898 003897F8 80 7F 00 20 */ lwz r3, 0x20(r31) +/* 8038C89C 003897FC 80 1F 00 24 */ lwz r0, 0x24(r31) +/* 8038C8A0 00389800 90 61 00 80 */ stw r3, 0x80(r1) +/* 8038C8A4 00389804 90 01 00 84 */ stw r0, 0x84(r1) +/* 8038C8A8 00389808 A0 1F 00 28 */ lhz r0, 0x28(r31) +/* 8038C8AC 0038980C B0 01 00 88 */ sth r0, 0x88(r1) +/* 8038C8B0 00389810 40 81 00 30 */ ble lbl_8038C8E0 +/* 8038C8B4 00389814 3C 80 80 3E */ lis r4, lbl_803D85D8@ha +/* 8038C8B8 00389818 38 61 00 34 */ addi r3, r1, 0x34 +/* 8038C8BC 0038981C 38 84 85 D8 */ addi r4, r4, lbl_803D85D8@l +/* 8038C8C0 00389820 38 A0 00 00 */ li r5, 0 +/* 8038C8C4 00389824 38 84 00 C6 */ addi r4, r4, 0xc6 +/* 8038C8C8 00389828 48 00 00 5D */ bl __str2dec +/* 8038C8CC 0038982C 7F E3 FB 78 */ mr r3, r31 +/* 8038C8D0 00389830 38 81 00 60 */ addi r4, r1, 0x60 +/* 8038C8D4 00389834 38 A1 00 34 */ addi r5, r1, 0x34 +/* 8038C8D8 00389838 48 00 01 39 */ bl __timesdec +/* 8038C8DC 0038983C 48 00 00 2C */ b lbl_8038C908 +lbl_8038C8E0: +/* 8038C8E0 00389840 3C 80 80 3E */ lis r4, lbl_803D85D8@ha +/* 8038C8E4 00389844 38 61 00 08 */ addi r3, r1, 8 +/* 8038C8E8 00389848 38 84 85 D8 */ addi r4, r4, lbl_803D85D8@l +/* 8038C8EC 0038984C 38 A0 FF FF */ li r5, -1 +/* 8038C8F0 00389850 38 84 00 C2 */ addi r4, r4, 0xc2 +/* 8038C8F4 00389854 48 00 00 31 */ bl __str2dec +/* 8038C8F8 00389858 7F E3 FB 78 */ mr r3, r31 +/* 8038C8FC 0038985C 38 81 00 60 */ addi r4, r1, 0x60 +/* 8038C900 00389860 38 A1 00 08 */ addi r5, r1, 8 +/* 8038C904 00389864 48 00 01 0D */ bl __timesdec +lbl_8038C908: +/* 8038C908 00389868 80 01 00 D4 */ lwz r0, 0xd4(r1) +/* 8038C90C 0038986C 83 E1 00 CC */ lwz r31, 0xcc(r1) +/* 8038C910 00389870 83 C1 00 C8 */ lwz r30, 0xc8(r1) +/* 8038C914 00389874 83 A1 00 C4 */ lwz r29, 0xc4(r1) +/* 8038C918 00389878 7C 08 03 A6 */ mtlr r0 +/* 8038C91C 0038987C 38 21 00 D0 */ addi r1, r1, 0xd0 +/* 8038C920 00389880 4E 80 00 20 */ blr + +.global __str2dec +__str2dec: +/* 8038C924 00389884 B0 A3 00 02 */ sth r5, 2(r3) +/* 8038C928 00389888 38 00 00 00 */ li r0, 0 +/* 8038C92C 0038988C 38 C0 00 00 */ li r6, 0 +/* 8038C930 00389890 98 03 00 00 */ stb r0, 0(r3) +/* 8038C934 00389894 48 00 00 1C */ b lbl_8038C950 +lbl_8038C938: +/* 8038C938 00389898 88 A4 00 00 */ lbz r5, 0(r4) +/* 8038C93C 0038989C 38 06 00 05 */ addi r0, r6, 5 +/* 8038C940 003898A0 38 84 00 01 */ addi r4, r4, 1 +/* 8038C944 003898A4 38 C6 00 01 */ addi r6, r6, 1 +/* 8038C948 003898A8 38 A5 FF D0 */ addi r5, r5, -48 +/* 8038C94C 003898AC 7C A3 01 AE */ stbx r5, r3, r0 +lbl_8038C950: +/* 8038C950 003898B0 2C 06 00 24 */ cmpwi r6, 0x24 +/* 8038C954 003898B4 40 80 00 10 */ bge lbl_8038C964 +/* 8038C958 003898B8 88 04 00 00 */ lbz r0, 0(r4) +/* 8038C95C 003898BC 7C 00 07 75 */ extsb. r0, r0 +/* 8038C960 003898C0 40 82 FF D8 */ bne lbl_8038C938 +lbl_8038C964: +/* 8038C964 003898C4 98 C3 00 04 */ stb r6, 4(r3) +/* 8038C968 003898C8 88 A4 00 00 */ lbz r5, 0(r4) +/* 8038C96C 003898CC 7C A0 07 75 */ extsb. r0, r5 +/* 8038C970 003898D0 4D 82 00 20 */ beqlr +/* 8038C974 003898D4 7C A0 07 74 */ extsb r0, r5 +/* 8038C978 003898D8 2C 00 00 05 */ cmpwi r0, 5 +/* 8038C97C 003898DC 4D 80 00 20 */ bltlr +/* 8038C980 003898E0 38 A4 00 01 */ addi r5, r4, 1 +/* 8038C984 003898E4 48 00 00 14 */ b lbl_8038C998 +lbl_8038C988: +/* 8038C988 003898E8 7C 80 07 74 */ extsb r0, r4 +/* 8038C98C 003898EC 2C 00 00 30 */ cmpwi r0, 0x30 +/* 8038C990 003898F0 40 82 00 24 */ bne lbl_8038C9B4 +/* 8038C994 003898F4 38 A5 00 01 */ addi r5, r5, 1 +lbl_8038C998: +/* 8038C998 003898F8 88 85 00 00 */ lbz r4, 0(r5) +/* 8038C99C 003898FC 7C 80 07 75 */ extsb. r0, r4 +/* 8038C9A0 00389900 40 82 FF E8 */ bne lbl_8038C988 +/* 8038C9A4 00389904 7C 83 32 14 */ add r4, r3, r6 +/* 8038C9A8 00389908 88 04 00 04 */ lbz r0, 4(r4) +/* 8038C9AC 0038990C 54 00 07 FF */ clrlwi. r0, r0, 0x1f +/* 8038C9B0 00389910 4D 82 00 20 */ beqlr +lbl_8038C9B4: +/* 8038C9B4 00389914 88 83 00 04 */ lbz r4, 4(r3) +/* 8038C9B8 00389918 38 C3 00 05 */ addi r6, r3, 5 +/* 8038C9BC 0038991C 38 00 00 00 */ li r0, 0 +/* 8038C9C0 00389920 38 A4 FF FF */ addi r5, r4, -1 +/* 8038C9C4 00389924 7C A6 2A 14 */ add r5, r6, r5 +lbl_8038C9C8: +/* 8038C9C8 00389928 88 85 00 00 */ lbz r4, 0(r5) +/* 8038C9CC 0038992C 28 04 00 09 */ cmplwi r4, 9 +/* 8038C9D0 00389930 40 80 00 10 */ bge lbl_8038C9E0 +/* 8038C9D4 00389934 38 04 00 01 */ addi r0, r4, 1 +/* 8038C9D8 00389938 98 05 00 00 */ stb r0, 0(r5) +/* 8038C9DC 0038993C 4E 80 00 20 */ blr +lbl_8038C9E0: +/* 8038C9E0 00389940 7C 05 30 40 */ cmplw r5, r6 +/* 8038C9E4 00389944 40 82 00 1C */ bne lbl_8038CA00 +/* 8038C9E8 00389948 38 00 00 01 */ li r0, 1 +/* 8038C9EC 0038994C 98 05 00 00 */ stb r0, 0(r5) +/* 8038C9F0 00389950 A8 83 00 02 */ lha r4, 2(r3) +/* 8038C9F4 00389954 38 04 00 01 */ addi r0, r4, 1 +/* 8038C9F8 00389958 B0 03 00 02 */ sth r0, 2(r3) +/* 8038C9FC 0038995C 4E 80 00 20 */ blr +lbl_8038CA00: +/* 8038CA00 00389960 98 05 00 00 */ stb r0, 0(r5) +/* 8038CA04 00389964 38 A5 FF FF */ addi r5, r5, -1 +/* 8038CA08 00389968 4B FF FF C0 */ b lbl_8038C9C8 +/* 8038CA0C 0038996C 4E 80 00 20 */ blr + +.global __timesdec +__timesdec: +/* 8038CA10 00389970 94 21 FF A0 */ stwu r1, -0x60(r1) +/* 8038CA14 00389974 38 00 00 00 */ li r0, 0 +/* 8038CA18 00389978 3C E0 CC CD */ lis r7, 0xCCCCCCCD@ha +/* 8038CA1C 0038997C 39 80 00 00 */ li r12, 0 +/* 8038CA20 00389980 93 E1 00 5C */ stw r31, 0x5c(r1) +/* 8038CA24 00389984 39 01 00 08 */ addi r8, r1, 8 +/* 8038CA28 00389988 93 C1 00 58 */ stw r30, 0x58(r1) +/* 8038CA2C 0038998C 93 A1 00 54 */ stw r29, 0x54(r1) +/* 8038CA30 00389990 88 C5 00 04 */ lbz r6, 4(r5) +/* 8038CA34 00389994 89 24 00 04 */ lbz r9, 4(r4) +/* 8038CA38 00389998 3B E6 FF FF */ addi r31, r6, -1 +/* 8038CA3C 0038999C 7F E9 FA 14 */ add r31, r9, r31 +/* 8038CA40 003899A0 98 03 00 00 */ stb r0, 0(r3) +/* 8038CA44 003899A4 38 DF 00 01 */ addi r6, r31, 1 +/* 8038CA48 003899A8 39 27 CC CD */ addi r9, r7, 0xCCCCCCCD@l +/* 8038CA4C 003899AC 7C C8 32 14 */ add r6, r8, r6 +/* 8038CA50 003899B0 7C C0 33 78 */ mr r0, r6 +/* 8038CA54 003899B4 48 00 01 30 */ b lbl_8038CB84 +lbl_8038CA58: +/* 8038CA58 003899B8 88 E5 00 04 */ lbz r7, 4(r5) +/* 8038CA5C 003899BC 39 07 FF FF */ addi r8, r7, -1 +/* 8038CA60 003899C0 7C E8 F8 50 */ subf r7, r8, r31 +/* 8038CA64 003899C4 35 47 FF FF */ addic. r10, r7, -1 +/* 8038CA68 003899C8 40 80 00 0C */ bge lbl_8038CA74 +/* 8038CA6C 003899CC 39 40 00 00 */ li r10, 0 +/* 8038CA70 003899D0 39 1F FF FF */ addi r8, r31, -1 +lbl_8038CA74: +/* 8038CA74 003899D4 88 E4 00 04 */ lbz r7, 4(r4) +/* 8038CA78 003899D8 3B CA 00 05 */ addi r30, r10, 5 +/* 8038CA7C 003899DC 3B A8 00 05 */ addi r29, r8, 5 +/* 8038CA80 003899E0 39 08 00 01 */ addi r8, r8, 1 +/* 8038CA84 003899E4 7C EA 38 50 */ subf r7, r10, r7 +/* 8038CA88 003899E8 7F C4 F2 14 */ add r30, r4, r30 +/* 8038CA8C 003899EC 7C 08 38 00 */ cmpw r8, r7 +/* 8038CA90 003899F0 7F A5 EA 14 */ add r29, r5, r29 +/* 8038CA94 003899F4 40 81 00 08 */ ble lbl_8038CA9C +/* 8038CA98 003899F8 7C E8 3B 78 */ mr r8, r7 +lbl_8038CA9C: +/* 8038CA9C 003899FC 2C 08 00 00 */ cmpwi r8, 0 +/* 8038CAA0 00389A00 40 81 00 C4 */ ble lbl_8038CB64 +/* 8038CAA4 00389A04 55 07 E8 FF */ rlwinm. r7, r8, 0x1d, 3, 0x1f +/* 8038CAA8 00389A08 7C E9 03 A6 */ mtctr r7 +/* 8038CAAC 00389A0C 41 82 00 98 */ beq lbl_8038CB44 +lbl_8038CAB0: +/* 8038CAB0 00389A10 89 7E 00 00 */ lbz r11, 0(r30) +/* 8038CAB4 00389A14 89 5D 00 00 */ lbz r10, 0(r29) +/* 8038CAB8 00389A18 7C EB 51 D6 */ mullw r7, r11, r10 +/* 8038CABC 00389A1C 89 7E 00 01 */ lbz r11, 1(r30) +/* 8038CAC0 00389A20 89 5D FF FF */ lbz r10, -1(r29) +/* 8038CAC4 00389A24 7D 8C 3A 14 */ add r12, r12, r7 +/* 8038CAC8 00389A28 7C EB 51 D6 */ mullw r7, r11, r10 +/* 8038CACC 00389A2C 89 7E 00 02 */ lbz r11, 2(r30) +/* 8038CAD0 00389A30 89 5D FF FE */ lbz r10, -2(r29) +/* 8038CAD4 00389A34 7D 8C 3A 14 */ add r12, r12, r7 +/* 8038CAD8 00389A38 7C EB 51 D6 */ mullw r7, r11, r10 +/* 8038CADC 00389A3C 89 7E 00 03 */ lbz r11, 3(r30) +/* 8038CAE0 00389A40 89 5D FF FD */ lbz r10, -3(r29) +/* 8038CAE4 00389A44 7D 8C 3A 14 */ add r12, r12, r7 +/* 8038CAE8 00389A48 7C EB 51 D6 */ mullw r7, r11, r10 +/* 8038CAEC 00389A4C 89 7E 00 04 */ lbz r11, 4(r30) +/* 8038CAF0 00389A50 89 5D FF FC */ lbz r10, -4(r29) +/* 8038CAF4 00389A54 7D 8C 3A 14 */ add r12, r12, r7 +/* 8038CAF8 00389A58 7C EB 51 D6 */ mullw r7, r11, r10 +/* 8038CAFC 00389A5C 89 7E 00 05 */ lbz r11, 5(r30) +/* 8038CB00 00389A60 89 5D FF FB */ lbz r10, -5(r29) +/* 8038CB04 00389A64 7D 8C 3A 14 */ add r12, r12, r7 +/* 8038CB08 00389A68 7C EB 51 D6 */ mullw r7, r11, r10 +/* 8038CB0C 00389A6C 89 7E 00 06 */ lbz r11, 6(r30) +/* 8038CB10 00389A70 89 5D FF FA */ lbz r10, -6(r29) +/* 8038CB14 00389A74 7D 8C 3A 14 */ add r12, r12, r7 +/* 8038CB18 00389A78 7C EB 51 D6 */ mullw r7, r11, r10 +/* 8038CB1C 00389A7C 89 7E 00 07 */ lbz r11, 7(r30) +/* 8038CB20 00389A80 89 5D FF F9 */ lbz r10, -7(r29) +/* 8038CB24 00389A84 3B DE 00 08 */ addi r30, r30, 8 +/* 8038CB28 00389A88 3B BD FF F8 */ addi r29, r29, -8 +/* 8038CB2C 00389A8C 7D 8C 3A 14 */ add r12, r12, r7 +/* 8038CB30 00389A90 7C EB 51 D6 */ mullw r7, r11, r10 +/* 8038CB34 00389A94 7D 8C 3A 14 */ add r12, r12, r7 +/* 8038CB38 00389A98 42 00 FF 78 */ bdnz lbl_8038CAB0 +/* 8038CB3C 00389A9C 71 08 00 07 */ andi. r8, r8, 7 +/* 8038CB40 00389AA0 41 82 00 24 */ beq lbl_8038CB64 +lbl_8038CB44: +/* 8038CB44 00389AA4 7D 09 03 A6 */ mtctr r8 +lbl_8038CB48: +/* 8038CB48 00389AA8 89 7E 00 00 */ lbz r11, 0(r30) +/* 8038CB4C 00389AAC 3B DE 00 01 */ addi r30, r30, 1 +/* 8038CB50 00389AB0 89 5D 00 00 */ lbz r10, 0(r29) +/* 8038CB54 00389AB4 3B BD FF FF */ addi r29, r29, -1 +/* 8038CB58 00389AB8 7C EB 51 D6 */ mullw r7, r11, r10 +/* 8038CB5C 00389ABC 7D 8C 3A 14 */ add r12, r12, r7 +/* 8038CB60 00389AC0 42 00 FF E8 */ bdnz lbl_8038CB48 +lbl_8038CB64: +/* 8038CB64 00389AC4 7D 09 60 16 */ mulhwu r8, r9, r12 +/* 8038CB68 00389AC8 38 E0 00 0A */ li r7, 0xa +/* 8038CB6C 00389ACC 3B FF FF FF */ addi r31, r31, -1 +/* 8038CB70 00389AD0 55 08 E8 FE */ srwi r8, r8, 3 +/* 8038CB74 00389AD4 1D 08 00 0A */ mulli r8, r8, 0xa +/* 8038CB78 00389AD8 7D 08 60 50 */ subf r8, r8, r12 +/* 8038CB7C 00389ADC 7D 8C 3B 96 */ divwu r12, r12, r7 +/* 8038CB80 00389AE0 9D 06 FF FF */ stbu r8, -1(r6) +lbl_8038CB84: +/* 8038CB84 00389AE4 2C 1F 00 00 */ cmpwi r31, 0 +/* 8038CB88 00389AE8 41 81 FE D0 */ bgt lbl_8038CA58 +/* 8038CB8C 00389AEC A8 E4 00 02 */ lha r7, 2(r4) +/* 8038CB90 00389AF0 28 0C 00 00 */ cmplwi r12, 0 +/* 8038CB94 00389AF4 A8 85 00 02 */ lha r4, 2(r5) +/* 8038CB98 00389AF8 7C 87 22 14 */ add r4, r7, r4 +/* 8038CB9C 00389AFC B0 83 00 02 */ sth r4, 2(r3) +/* 8038CBA0 00389B00 41 82 00 14 */ beq lbl_8038CBB4 +/* 8038CBA4 00389B04 9D 86 FF FF */ stbu r12, -1(r6) +/* 8038CBA8 00389B08 A8 83 00 02 */ lha r4, 2(r3) +/* 8038CBAC 00389B0C 38 84 00 01 */ addi r4, r4, 1 +/* 8038CBB0 00389B10 B0 83 00 02 */ sth r4, 2(r3) +lbl_8038CBB4: +/* 8038CBB4 00389B14 38 E0 00 00 */ li r7, 0 +/* 8038CBB8 00389B18 48 00 00 18 */ b lbl_8038CBD0 +lbl_8038CBBC: +/* 8038CBBC 00389B1C 88 A6 00 00 */ lbz r5, 0(r6) +/* 8038CBC0 00389B20 38 87 00 05 */ addi r4, r7, 5 +/* 8038CBC4 00389B24 38 E7 00 01 */ addi r7, r7, 1 +/* 8038CBC8 00389B28 38 C6 00 01 */ addi r6, r6, 1 +/* 8038CBCC 00389B2C 7C A3 21 AE */ stbx r5, r3, r4 +lbl_8038CBD0: +/* 8038CBD0 00389B30 2C 07 00 24 */ cmpwi r7, 0x24 +/* 8038CBD4 00389B34 40 80 00 0C */ bge lbl_8038CBE0 +/* 8038CBD8 00389B38 7C 06 00 40 */ cmplw r6, r0 +/* 8038CBDC 00389B3C 41 80 FF E0 */ blt lbl_8038CBBC +lbl_8038CBE0: +/* 8038CBE0 00389B40 7C 06 00 40 */ cmplw r6, r0 +/* 8038CBE4 00389B44 98 E3 00 04 */ stb r7, 4(r3) +/* 8038CBE8 00389B48 40 80 00 A0 */ bge lbl_8038CC88 +/* 8038CBEC 00389B4C 88 86 00 00 */ lbz r4, 0(r6) +/* 8038CBF0 00389B50 28 04 00 05 */ cmplwi r4, 5 +/* 8038CBF4 00389B54 41 80 00 94 */ blt lbl_8038CC88 +/* 8038CBF8 00389B58 40 82 00 38 */ bne lbl_8038CC30 +/* 8038CBFC 00389B5C 38 A6 00 01 */ addi r5, r6, 1 +/* 8038CC00 00389B60 7C 85 00 50 */ subf r4, r5, r0 +/* 8038CC04 00389B64 7C 89 03 A6 */ mtctr r4 +/* 8038CC08 00389B68 7C 05 00 40 */ cmplw r5, r0 +/* 8038CC0C 00389B6C 40 80 00 18 */ bge lbl_8038CC24 +lbl_8038CC10: +/* 8038CC10 00389B70 88 05 00 00 */ lbz r0, 0(r5) +/* 8038CC14 00389B74 28 00 00 00 */ cmplwi r0, 0 +/* 8038CC18 00389B78 40 82 00 18 */ bne lbl_8038CC30 +/* 8038CC1C 00389B7C 38 A5 00 01 */ addi r5, r5, 1 +/* 8038CC20 00389B80 42 00 FF F0 */ bdnz lbl_8038CC10 +lbl_8038CC24: +/* 8038CC24 00389B84 88 06 FF FF */ lbz r0, -1(r6) +/* 8038CC28 00389B88 54 00 07 FF */ clrlwi. r0, r0, 0x1f +/* 8038CC2C 00389B8C 41 82 00 5C */ beq lbl_8038CC88 +lbl_8038CC30: +/* 8038CC30 00389B90 88 83 00 04 */ lbz r4, 4(r3) +/* 8038CC34 00389B94 38 C3 00 05 */ addi r6, r3, 5 +/* 8038CC38 00389B98 38 00 00 00 */ li r0, 0 +/* 8038CC3C 00389B9C 38 A4 FF FF */ addi r5, r4, -1 +/* 8038CC40 00389BA0 7C A6 2A 14 */ add r5, r6, r5 +lbl_8038CC44: +/* 8038CC44 00389BA4 88 85 00 00 */ lbz r4, 0(r5) +/* 8038CC48 00389BA8 28 04 00 09 */ cmplwi r4, 9 +/* 8038CC4C 00389BAC 40 80 00 10 */ bge lbl_8038CC5C +/* 8038CC50 00389BB0 38 04 00 01 */ addi r0, r4, 1 +/* 8038CC54 00389BB4 98 05 00 00 */ stb r0, 0(r5) +/* 8038CC58 00389BB8 48 00 00 30 */ b lbl_8038CC88 +lbl_8038CC5C: +/* 8038CC5C 00389BBC 7C 05 30 40 */ cmplw r5, r6 +/* 8038CC60 00389BC0 40 82 00 1C */ bne lbl_8038CC7C +/* 8038CC64 00389BC4 38 00 00 01 */ li r0, 1 +/* 8038CC68 00389BC8 98 05 00 00 */ stb r0, 0(r5) +/* 8038CC6C 00389BCC A8 83 00 02 */ lha r4, 2(r3) +/* 8038CC70 00389BD0 38 04 00 01 */ addi r0, r4, 1 +/* 8038CC74 00389BD4 B0 03 00 02 */ sth r0, 2(r3) +/* 8038CC78 00389BD8 48 00 00 10 */ b lbl_8038CC88 +lbl_8038CC7C: +/* 8038CC7C 00389BDC 98 05 00 00 */ stb r0, 0(r5) +/* 8038CC80 00389BE0 38 A5 FF FF */ addi r5, r5, -1 +/* 8038CC84 00389BE4 4B FF FF C0 */ b lbl_8038CC44 +lbl_8038CC88: +/* 8038CC88 00389BE8 83 E1 00 5C */ lwz r31, 0x5c(r1) +/* 8038CC8C 00389BEC 83 C1 00 58 */ lwz r30, 0x58(r1) +/* 8038CC90 00389BF0 83 A1 00 54 */ lwz r29, 0x54(r1) +/* 8038CC94 00389BF4 38 21 00 60 */ addi r1, r1, 0x60 +/* 8038CC98 00389BF8 4E 80 00 20 */ blr + +.global __ull2dec +__ull2dec: +/* 8038CC9C 00389BFC 94 21 FF E0 */ stwu r1, -0x20(r1) +/* 8038CCA0 00389C00 7C 08 02 A6 */ mflr r0 +/* 8038CCA4 00389C04 90 01 00 24 */ stw r0, 0x24(r1) +/* 8038CCA8 00389C08 93 E1 00 1C */ stw r31, 0x1c(r1) +/* 8038CCAC 00389C0C 7C 7F 1B 78 */ mr r31, r3 +/* 8038CCB0 00389C10 93 C1 00 18 */ stw r30, 0x18(r1) +/* 8038CCB4 00389C14 3B C0 00 00 */ li r30, 0 +/* 8038CCB8 00389C18 93 A1 00 14 */ stw r29, 0x14(r1) +/* 8038CCBC 00389C1C 7C BD 2B 78 */ mr r29, r5 +/* 8038CCC0 00389C20 7F A0 F2 78 */ xor r0, r29, r30 +/* 8038CCC4 00389C24 93 81 00 10 */ stw r28, 0x10(r1) +/* 8038CCC8 00389C28 7C DC 33 78 */ mr r28, r6 +/* 8038CCCC 00389C2C 7F 83 F2 78 */ xor r3, r28, r30 +/* 8038CCD0 00389C30 7C 60 03 79 */ or. r0, r3, r0 +/* 8038CCD4 00389C34 9B DF 00 00 */ stb r30, 0(r31) +/* 8038CCD8 00389C38 40 82 00 18 */ bne lbl_8038CCF0 +/* 8038CCDC 00389C3C B3 DF 00 02 */ sth r30, 2(r31) +/* 8038CCE0 00389C40 38 00 00 01 */ li r0, 1 +/* 8038CCE4 00389C44 98 1F 00 04 */ stb r0, 4(r31) +/* 8038CCE8 00389C48 9B DF 00 05 */ stb r30, 5(r31) +/* 8038CCEC 00389C4C 48 00 00 A0 */ b lbl_8038CD8C +lbl_8038CCF0: +/* 8038CCF0 00389C50 9B DF 00 04 */ stb r30, 4(r31) +/* 8038CCF4 00389C54 48 00 00 48 */ b lbl_8038CD3C +lbl_8038CCF8: +/* 8038CCF8 00389C58 7F A3 EB 78 */ mr r3, r29 +/* 8038CCFC 00389C5C 7F 84 E3 78 */ mr r4, r28 +/* 8038CD00 00389C60 38 A0 00 00 */ li r5, 0 +/* 8038CD04 00389C64 38 C0 00 0A */ li r6, 0xa +/* 8038CD08 00389C68 4B FF CF FD */ bl __mod2u +/* 8038CD0C 00389C6C 89 1F 00 04 */ lbz r8, 4(r31) +/* 8038CD10 00389C70 7F A3 EB 78 */ mr r3, r29 +/* 8038CD14 00389C74 38 A0 00 00 */ li r5, 0 +/* 8038CD18 00389C78 38 C0 00 0A */ li r6, 0xa +/* 8038CD1C 00389C7C 38 E8 00 01 */ addi r7, r8, 1 +/* 8038CD20 00389C80 38 08 00 05 */ addi r0, r8, 5 +/* 8038CD24 00389C84 98 FF 00 04 */ stb r7, 4(r31) +/* 8038CD28 00389C88 7C 9F 01 AE */ stbx r4, r31, r0 +/* 8038CD2C 00389C8C 7F 84 E3 78 */ mr r4, r28 +/* 8038CD30 00389C90 4B FF CD B1 */ bl __div2u +/* 8038CD34 00389C94 7C 9C 23 78 */ mr r28, r4 +/* 8038CD38 00389C98 7C 7D 1B 78 */ mr r29, r3 +lbl_8038CD3C: +/* 8038CD3C 00389C9C 7F 83 F2 78 */ xor r3, r28, r30 +/* 8038CD40 00389CA0 7F A0 F2 78 */ xor r0, r29, r30 +/* 8038CD44 00389CA4 7C 60 03 79 */ or. r0, r3, r0 +/* 8038CD48 00389CA8 40 82 FF B0 */ bne lbl_8038CCF8 +/* 8038CD4C 00389CAC 88 7F 00 04 */ lbz r3, 4(r31) +/* 8038CD50 00389CB0 38 9F 00 05 */ addi r4, r31, 5 +/* 8038CD54 00389CB4 38 63 00 05 */ addi r3, r3, 5 +/* 8038CD58 00389CB8 7C 7F 1A 14 */ add r3, r31, r3 +/* 8038CD5C 00389CBC 48 00 00 18 */ b lbl_8038CD74 +lbl_8038CD60: +/* 8038CD60 00389CC0 88 A4 00 00 */ lbz r5, 0(r4) +/* 8038CD64 00389CC4 88 03 00 00 */ lbz r0, 0(r3) +/* 8038CD68 00389CC8 98 04 00 00 */ stb r0, 0(r4) +/* 8038CD6C 00389CCC 38 84 00 01 */ addi r4, r4, 1 +/* 8038CD70 00389CD0 98 A3 00 00 */ stb r5, 0(r3) +lbl_8038CD74: +/* 8038CD74 00389CD4 38 63 FF FF */ addi r3, r3, -1 +/* 8038CD78 00389CD8 7C 04 18 40 */ cmplw r4, r3 +/* 8038CD7C 00389CDC 41 80 FF E4 */ blt lbl_8038CD60 +/* 8038CD80 00389CE0 88 7F 00 04 */ lbz r3, 4(r31) +/* 8038CD84 00389CE4 38 03 FF FF */ addi r0, r3, -1 +/* 8038CD88 00389CE8 B0 1F 00 02 */ sth r0, 2(r31) +lbl_8038CD8C: +/* 8038CD8C 00389CEC 80 01 00 24 */ lwz r0, 0x24(r1) +/* 8038CD90 00389CF0 83 E1 00 1C */ lwz r31, 0x1c(r1) +/* 8038CD94 00389CF4 83 C1 00 18 */ lwz r30, 0x18(r1) +/* 8038CD98 00389CF8 83 A1 00 14 */ lwz r29, 0x14(r1) +/* 8038CD9C 00389CFC 83 81 00 10 */ lwz r28, 0x10(r1) +/* 8038CDA0 00389D00 7C 08 03 A6 */ mtlr r0 +/* 8038CDA4 00389D04 38 21 00 20 */ addi r1, r1, 0x20 +/* 8038CDA8 00389D08 4E 80 00 20 */ blr + +.global __count_trailing_zerol +__count_trailing_zerol: +/* 8038CDAC 00389D0C 3C 80 00 01 */ lis r4, 0x0000FFFF@ha +/* 8038CDB0 00389D10 38 A0 00 20 */ li r5, 0x20 +/* 8038CDB4 00389D14 39 04 FF FF */ addi r8, r4, 0x0000FFFF@l +/* 8038CDB8 00389D18 38 C0 00 10 */ li r6, 0x10 +/* 8038CDBC 00389D1C 38 80 00 00 */ li r4, 0 +/* 8038CDC0 00389D20 38 E0 00 10 */ li r7, 0x10 +/* 8038CDC4 00389D24 48 00 00 48 */ b lbl_8038CE0C +lbl_8038CDC8: +/* 8038CDC8 00389D28 7C 60 40 39 */ and. r0, r3, r8 +/* 8038CDCC 00389D2C 40 82 00 14 */ bne lbl_8038CDE0 +/* 8038CDD0 00389D30 7C 84 3A 14 */ add r4, r4, r7 +/* 8038CDD4 00389D34 7C 63 3C 30 */ srw r3, r3, r7 +/* 8038CDD8 00389D38 7C A7 28 50 */ subf r5, r7, r5 +/* 8038CDDC 00389D3C 48 00 00 0C */ b lbl_8038CDE8 +lbl_8038CDE0: +/* 8038CDE0 00389D40 28 08 00 01 */ cmplwi r8, 1 +/* 8038CDE4 00389D44 41 82 00 30 */ beq lbl_8038CE14 +lbl_8038CDE8: +/* 8038CDE8 00389D48 2C 06 00 01 */ cmpwi r6, 1 +/* 8038CDEC 00389D4C 40 81 00 10 */ ble lbl_8038CDFC +/* 8038CDF0 00389D50 54 C0 0F FE */ srwi r0, r6, 0x1f +/* 8038CDF4 00389D54 7C 00 32 14 */ add r0, r0, r6 +/* 8038CDF8 00389D58 7C 06 0E 70 */ srawi r6, r0, 1 +lbl_8038CDFC: +/* 8038CDFC 00389D5C 28 08 00 01 */ cmplwi r8, 1 +/* 8038CE00 00389D60 40 81 00 0C */ ble lbl_8038CE0C +/* 8038CE04 00389D64 7D 08 34 30 */ srw r8, r8, r6 +/* 8038CE08 00389D68 7C E6 38 50 */ subf r7, r6, r7 +lbl_8038CE0C: +/* 8038CE0C 00389D6C 2C 05 00 00 */ cmpwi r5, 0 +/* 8038CE10 00389D70 40 82 FF B8 */ bne lbl_8038CDC8 +lbl_8038CE14: +/* 8038CE14 00389D74 7C 83 23 78 */ mr r3, r4 +/* 8038CE18 00389D78 4E 80 00 20 */ blr + +.if 1 +.global abs +abs: +/* 8038CE1C 00389D7C 7C 64 FE 70 */ srawi r4, r3, 0x1f +/* 8038CE20 00389D80 7C 80 1A 78 */ xor r0, r4, r3 +/* 8038CE24 00389D84 7C 64 00 50 */ subf r3, r4, r0 +/* 8038CE28 00389D88 4E 80 00 20 */ blr +.endif diff --git a/asm/Runtime/PPCEABI/H/arith.s b/asm/Runtime/PPCEABI/H/arith.s new file mode 100644 index 00000000..acc7defd --- /dev/null +++ b/asm/Runtime/PPCEABI/H/arith.s @@ -0,0 +1,12 @@ +.include "macros.inc" + +.section .text, "ax" + +.if 0 +.global abs +abs: +/* 8038CE1C 00389D7C 7C 64 FE 70 */ srawi r4, r3, 0x1f +/* 8038CE20 00389D80 7C 80 1A 78 */ xor r0, r4, r3 +/* 8038CE24 00389D84 7C 64 00 50 */ subf r3, r4, r0 +/* 8038CE28 00389D88 4E 80 00 20 */ blr +.endif diff --git a/asm/Runtime/PPCEABI/H/buffer_io.s b/asm/Runtime/PPCEABI/H/buffer_io.s new file mode 100644 index 00000000..79222d6b --- /dev/null +++ b/asm/Runtime/PPCEABI/H/buffer_io.s @@ -0,0 +1,75 @@ +.include "macros.inc" + +.section .text, "ax" + +.global __flush_buffer +__flush_buffer: +/* 8038CE2C 00389D8C 94 21 FF F0 */ stwu r1, -0x10(r1) +/* 8038CE30 00389D90 7C 08 02 A6 */ mflr r0 +/* 8038CE34 00389D94 90 01 00 14 */ stw r0, 0x14(r1) +/* 8038CE38 00389D98 93 E1 00 0C */ stw r31, 0xc(r1) +/* 8038CE3C 00389D9C 7C 7F 1B 78 */ mr r31, r3 +/* 8038CE40 00389DA0 93 C1 00 08 */ stw r30, 8(r1) +/* 8038CE44 00389DA4 7C 9E 23 78 */ mr r30, r4 +/* 8038CE48 00389DA8 80 63 00 1C */ lwz r3, 0x1c(r3) +/* 8038CE4C 00389DAC 80 1F 00 24 */ lwz r0, 0x24(r31) +/* 8038CE50 00389DB0 7C 03 00 51 */ subf. r0, r3, r0 +/* 8038CE54 00389DB4 41 82 00 50 */ beq lbl_8038CEA4 +/* 8038CE58 00389DB8 90 1F 00 28 */ stw r0, 0x28(r31) +/* 8038CE5C 00389DBC 38 BF 00 28 */ addi r5, r31, 0x28 +/* 8038CE60 00389DC0 81 9F 00 40 */ lwz r12, 0x40(r31) +/* 8038CE64 00389DC4 80 7F 00 00 */ lwz r3, 0(r31) +/* 8038CE68 00389DC8 80 9F 00 1C */ lwz r4, 0x1c(r31) +/* 8038CE6C 00389DCC 80 DF 00 48 */ lwz r6, 0x48(r31) +/* 8038CE70 00389DD0 7D 89 03 A6 */ mtctr r12 +/* 8038CE74 00389DD4 4E 80 04 21 */ bctrl +/* 8038CE78 00389DD8 28 1E 00 00 */ cmplwi r30, 0 +/* 8038CE7C 00389DDC 41 82 00 0C */ beq lbl_8038CE88 +/* 8038CE80 00389DE0 80 1F 00 28 */ lwz r0, 0x28(r31) +/* 8038CE84 00389DE4 90 1E 00 00 */ stw r0, 0(r30) +lbl_8038CE88: +/* 8038CE88 00389DE8 2C 03 00 00 */ cmpwi r3, 0 +/* 8038CE8C 00389DEC 41 82 00 08 */ beq lbl_8038CE94 +/* 8038CE90 00389DF0 48 00 00 48 */ b lbl_8038CED8 +lbl_8038CE94: +/* 8038CE94 00389DF4 80 7F 00 18 */ lwz r3, 0x18(r31) +/* 8038CE98 00389DF8 80 1F 00 28 */ lwz r0, 0x28(r31) +/* 8038CE9C 00389DFC 7C 03 02 14 */ add r0, r3, r0 +/* 8038CEA0 00389E00 90 1F 00 18 */ stw r0, 0x18(r31) +lbl_8038CEA4: +/* 8038CEA4 00389E04 80 1F 00 1C */ lwz r0, 0x1c(r31) +/* 8038CEA8 00389E08 38 60 00 00 */ li r3, 0 +/* 8038CEAC 00389E0C 90 1F 00 24 */ stw r0, 0x24(r31) +/* 8038CEB0 00389E10 80 1F 00 20 */ lwz r0, 0x20(r31) +/* 8038CEB4 00389E14 90 1F 00 28 */ stw r0, 0x28(r31) +/* 8038CEB8 00389E18 80 BF 00 18 */ lwz r5, 0x18(r31) +/* 8038CEBC 00389E1C 80 9F 00 2C */ lwz r4, 0x2c(r31) +/* 8038CEC0 00389E20 80 1F 00 28 */ lwz r0, 0x28(r31) +/* 8038CEC4 00389E24 7C A4 20 38 */ and r4, r5, r4 +/* 8038CEC8 00389E28 7C 04 00 50 */ subf r0, r4, r0 +/* 8038CECC 00389E2C 90 1F 00 28 */ stw r0, 0x28(r31) +/* 8038CED0 00389E30 80 1F 00 18 */ lwz r0, 0x18(r31) +/* 8038CED4 00389E34 90 1F 00 34 */ stw r0, 0x34(r31) +lbl_8038CED8: +/* 8038CED8 00389E38 80 01 00 14 */ lwz r0, 0x14(r1) +/* 8038CEDC 00389E3C 83 E1 00 0C */ lwz r31, 0xc(r1) +/* 8038CEE0 00389E40 83 C1 00 08 */ lwz r30, 8(r1) +/* 8038CEE4 00389E44 7C 08 03 A6 */ mtlr r0 +/* 8038CEE8 00389E48 38 21 00 10 */ addi r1, r1, 0x10 +/* 8038CEEC 00389E4C 4E 80 00 20 */ blr + +.global __prep_buffer +__prep_buffer: +/* 8038CEF0 00389E50 80 03 00 1C */ lwz r0, 0x1c(r3) +/* 8038CEF4 00389E54 90 03 00 24 */ stw r0, 0x24(r3) +/* 8038CEF8 00389E58 80 03 00 20 */ lwz r0, 0x20(r3) +/* 8038CEFC 00389E5C 90 03 00 28 */ stw r0, 0x28(r3) +/* 8038CF00 00389E60 80 A3 00 18 */ lwz r5, 0x18(r3) +/* 8038CF04 00389E64 80 83 00 2C */ lwz r4, 0x2c(r3) +/* 8038CF08 00389E68 80 03 00 28 */ lwz r0, 0x28(r3) +/* 8038CF0C 00389E6C 7C A4 20 38 */ and r4, r5, r4 +/* 8038CF10 00389E70 7C 04 00 50 */ subf r0, r4, r0 +/* 8038CF14 00389E74 90 03 00 28 */ stw r0, 0x28(r3) +/* 8038CF18 00389E78 80 03 00 18 */ lwz r0, 0x18(r3) +/* 8038CF1C 00389E7C 90 03 00 34 */ stw r0, 0x34(r3) +/* 8038CF20 00389E80 4E 80 00 20 */ blr diff --git a/asm/Runtime/PPCEABI/H/ctype.s b/asm/Runtime/PPCEABI/H/ctype.s new file mode 100644 index 00000000..40da7587 --- /dev/null +++ b/asm/Runtime/PPCEABI/H/ctype.s @@ -0,0 +1,16 @@ +.include "macros.inc" + +.section .text, "ax" + +.global tolower +tolower: +/* 8038CF24 00389E84 2C 03 FF FF */ cmpwi r3, -1 +/* 8038CF28 00389E88 40 82 00 0C */ bne lbl_8038CF34 +/* 8038CF2C 00389E8C 38 60 FF FF */ li r3, -1 +/* 8038CF30 00389E90 4E 80 00 20 */ blr +lbl_8038CF34: +/* 8038CF34 00389E94 3C 80 80 3F */ lis r4, lbl_803F2B20@ha +/* 8038CF38 00389E98 54 60 06 3E */ clrlwi r0, r3, 0x18 +/* 8038CF3C 00389E9C 38 64 2B 20 */ addi r3, r4, lbl_803F2B20@l +/* 8038CF40 00389EA0 7C 63 00 AE */ lbzx r3, r3, r0 +/* 8038CF44 00389EA4 4E 80 00 20 */ blr diff --git a/asm/Runtime/PPCEABI/H/direct_io.s b/asm/Runtime/PPCEABI/H/direct_io.s new file mode 100644 index 00000000..9dfcd7f6 --- /dev/null +++ b/asm/Runtime/PPCEABI/H/direct_io.s @@ -0,0 +1,234 @@ +.include "macros.inc" + +.section .text, "ax" + +.global __fwrite +__fwrite: +/* 8038CF48 00389EA8 94 21 FF D0 */ stwu r1, -0x30(r1) +/* 8038CF4C 00389EAC 7C 08 02 A6 */ mflr r0 +/* 8038CF50 00389EB0 90 01 00 34 */ stw r0, 0x34(r1) +/* 8038CF54 00389EB4 BF 21 00 14 */ stmw r25, 0x14(r1) +/* 8038CF58 00389EB8 7C 99 23 78 */ mr r25, r4 +/* 8038CF5C 00389EBC 7C DA 33 78 */ mr r26, r6 +/* 8038CF60 00389EC0 7C 7B 1B 78 */ mr r27, r3 +/* 8038CF64 00389EC4 7C BC 2B 78 */ mr r28, r5 +/* 8038CF68 00389EC8 38 80 00 00 */ li r4, 0 +/* 8038CF6C 00389ECC 7F 43 D3 78 */ mr r3, r26 +/* 8038CF70 00389ED0 48 00 43 D1 */ bl fwide +/* 8038CF74 00389ED4 2C 03 00 00 */ cmpwi r3, 0 +/* 8038CF78 00389ED8 40 82 00 10 */ bne lbl_8038CF88 +/* 8038CF7C 00389EDC 7F 43 D3 78 */ mr r3, r26 +/* 8038CF80 00389EE0 38 80 FF FF */ li r4, -1 +/* 8038CF84 00389EE4 48 00 43 BD */ bl fwide +lbl_8038CF88: +/* 8038CF88 00389EE8 7F B9 E1 D7 */ mullw. r29, r25, r28 +/* 8038CF8C 00389EEC 41 82 00 1C */ beq lbl_8038CFA8 +/* 8038CF90 00389EF0 88 1A 00 0A */ lbz r0, 0xa(r26) +/* 8038CF94 00389EF4 28 00 00 00 */ cmplwi r0, 0 +/* 8038CF98 00389EF8 40 82 00 10 */ bne lbl_8038CFA8 +/* 8038CF9C 00389EFC A0 1A 00 04 */ lhz r0, 4(r26) +/* 8038CFA0 00389F00 54 00 D7 7F */ rlwinm. r0, r0, 0x1a, 0x1d, 0x1f +/* 8038CFA4 00389F04 40 82 00 0C */ bne lbl_8038CFB0 +lbl_8038CFA8: +/* 8038CFA8 00389F08 38 60 00 00 */ li r3, 0 +/* 8038CFAC 00389F0C 48 00 02 94 */ b lbl_8038D240 +lbl_8038CFB0: +/* 8038CFB0 00389F10 28 00 00 02 */ cmplwi r0, 2 +/* 8038CFB4 00389F14 40 82 00 08 */ bne lbl_8038CFBC +/* 8038CFB8 00389F18 48 00 0D 15 */ bl __stdio_atexit +lbl_8038CFBC: +/* 8038CFBC 00389F1C 88 1A 00 05 */ lbz r0, 5(r26) +/* 8038CFC0 00389F20 3B E0 00 01 */ li r31, 1 +/* 8038CFC4 00389F24 38 60 00 00 */ li r3, 0 +/* 8038CFC8 00389F28 54 00 EF FF */ rlwinm. r0, r0, 0x1d, 0x1f, 0x1f +/* 8038CFCC 00389F2C 41 82 00 14 */ beq lbl_8038CFE0 +/* 8038CFD0 00389F30 88 1A 00 04 */ lbz r0, 4(r26) +/* 8038CFD4 00389F34 54 00 FF BE */ rlwinm r0, r0, 0x1f, 0x1e, 0x1f +/* 8038CFD8 00389F38 28 00 00 02 */ cmplwi r0, 2 +/* 8038CFDC 00389F3C 40 82 00 08 */ bne lbl_8038CFE4 +lbl_8038CFE0: +/* 8038CFE0 00389F40 38 60 00 01 */ li r3, 1 +lbl_8038CFE4: +/* 8038CFE4 00389F44 2C 03 00 00 */ cmpwi r3, 0 +/* 8038CFE8 00389F48 40 82 00 18 */ bne lbl_8038D000 +/* 8038CFEC 00389F4C 88 1A 00 04 */ lbz r0, 4(r26) +/* 8038CFF0 00389F50 54 00 FF BE */ rlwinm r0, r0, 0x1f, 0x1e, 0x1f +/* 8038CFF4 00389F54 28 00 00 01 */ cmplwi r0, 1 +/* 8038CFF8 00389F58 41 82 00 08 */ beq lbl_8038D000 +/* 8038CFFC 00389F5C 3B E0 00 00 */ li r31, 0 +lbl_8038D000: +/* 8038D000 00389F60 88 1A 00 08 */ lbz r0, 8(r26) +/* 8038D004 00389F64 54 00 DF 7F */ rlwinm. r0, r0, 0x1b, 0x1d, 0x1f +/* 8038D008 00389F68 40 82 00 54 */ bne lbl_8038D05C +/* 8038D00C 00389F6C 88 7A 00 04 */ lbz r3, 4(r26) +/* 8038D010 00389F70 54 60 EF BD */ rlwinm. r0, r3, 0x1d, 0x1e, 0x1e +/* 8038D014 00389F74 54 63 EF 7E */ rlwinm r3, r3, 0x1d, 0x1d, 0x1f +/* 8038D018 00389F78 41 82 00 44 */ beq lbl_8038D05C +/* 8038D01C 00389F7C 54 60 07 7B */ rlwinm. r0, r3, 0, 0x1d, 0x1d +/* 8038D020 00389F80 41 82 00 24 */ beq lbl_8038D044 +/* 8038D024 00389F84 7F 43 D3 78 */ mr r3, r26 +/* 8038D028 00389F88 38 80 00 00 */ li r4, 0 +/* 8038D02C 00389F8C 38 A0 00 02 */ li r5, 2 +/* 8038D030 00389F90 48 00 04 3D */ bl fseek +/* 8038D034 00389F94 2C 03 00 00 */ cmpwi r3, 0 +/* 8038D038 00389F98 41 82 00 0C */ beq lbl_8038D044 +/* 8038D03C 00389F9C 38 60 00 00 */ li r3, 0 +/* 8038D040 00389FA0 48 00 02 00 */ b lbl_8038D240 +lbl_8038D044: +/* 8038D044 00389FA4 88 1A 00 08 */ lbz r0, 8(r26) +/* 8038D048 00389FA8 38 60 00 01 */ li r3, 1 +/* 8038D04C 00389FAC 50 60 2E 34 */ rlwimi r0, r3, 5, 0x18, 0x1a +/* 8038D050 00389FB0 7F 43 D3 78 */ mr r3, r26 +/* 8038D054 00389FB4 98 1A 00 08 */ stb r0, 8(r26) +/* 8038D058 00389FB8 4B FF FE 99 */ bl __prep_buffer +lbl_8038D05C: +/* 8038D05C 00389FBC 88 1A 00 08 */ lbz r0, 8(r26) +/* 8038D060 00389FC0 54 00 DF 7E */ rlwinm r0, r0, 0x1b, 0x1d, 0x1f +/* 8038D064 00389FC4 28 00 00 01 */ cmplwi r0, 1 +/* 8038D068 00389FC8 41 82 00 1C */ beq lbl_8038D084 +/* 8038D06C 00389FCC 38 60 00 01 */ li r3, 1 +/* 8038D070 00389FD0 38 00 00 00 */ li r0, 0 +/* 8038D074 00389FD4 98 7A 00 0A */ stb r3, 0xa(r26) +/* 8038D078 00389FD8 38 60 00 00 */ li r3, 0 +/* 8038D07C 00389FDC 90 1A 00 28 */ stw r0, 0x28(r26) +/* 8038D080 00389FE0 48 00 01 C0 */ b lbl_8038D240 +lbl_8038D084: +/* 8038D084 00389FE4 28 1D 00 00 */ cmplwi r29, 0 +/* 8038D088 00389FE8 7F 7E DB 78 */ mr r30, r27 +/* 8038D08C 00389FEC 3B 80 00 00 */ li r28, 0 +/* 8038D090 00389FF0 41 82 01 20 */ beq lbl_8038D1B0 +/* 8038D094 00389FF4 80 9A 00 24 */ lwz r4, 0x24(r26) +/* 8038D098 00389FF8 80 7A 00 1C */ lwz r3, 0x1c(r26) +/* 8038D09C 00389FFC 7C 04 18 40 */ cmplw r4, r3 +/* 8038D0A0 0038A000 40 82 00 0C */ bne lbl_8038D0AC +/* 8038D0A4 0038A004 2C 1F 00 00 */ cmpwi r31, 0 +/* 8038D0A8 0038A008 41 82 01 08 */ beq lbl_8038D1B0 +lbl_8038D0AC: +/* 8038D0AC 0038A00C 80 1A 00 20 */ lwz r0, 0x20(r26) +/* 8038D0B0 0038A010 7C 63 20 50 */ subf r3, r3, r4 +/* 8038D0B4 0038A014 7C 03 00 50 */ subf r0, r3, r0 +/* 8038D0B8 0038A018 90 1A 00 28 */ stw r0, 0x28(r26) +lbl_8038D0BC: +/* 8038D0BC 0038A01C 80 1A 00 28 */ lwz r0, 0x28(r26) +/* 8038D0C0 0038A020 3B 60 00 00 */ li r27, 0 +/* 8038D0C4 0038A024 7C 00 E8 40 */ cmplw r0, r29 +/* 8038D0C8 0038A028 90 01 00 08 */ stw r0, 8(r1) +/* 8038D0CC 0038A02C 40 81 00 08 */ ble lbl_8038D0D4 +/* 8038D0D0 0038A030 93 A1 00 08 */ stw r29, 8(r1) +lbl_8038D0D4: +/* 8038D0D4 0038A034 88 1A 00 04 */ lbz r0, 4(r26) +/* 8038D0D8 0038A038 54 00 FF BE */ rlwinm r0, r0, 0x1f, 0x1e, 0x1f +/* 8038D0DC 0038A03C 28 00 00 01 */ cmplwi r0, 1 +/* 8038D0E0 0038A040 40 82 00 30 */ bne lbl_8038D110 +/* 8038D0E4 0038A044 80 A1 00 08 */ lwz r5, 8(r1) +/* 8038D0E8 0038A048 28 05 00 00 */ cmplwi r5, 0 +/* 8038D0EC 0038A04C 41 82 00 24 */ beq lbl_8038D110 +/* 8038D0F0 0038A050 7F C3 F3 78 */ mr r3, r30 +/* 8038D0F4 0038A054 38 80 00 0A */ li r4, 0xa +/* 8038D0F8 0038A058 48 00 07 D1 */ bl __memrchr +/* 8038D0FC 0038A05C 7C 7B 1B 79 */ or. r27, r3, r3 +/* 8038D100 0038A060 41 82 00 10 */ beq lbl_8038D110 +/* 8038D104 0038A064 38 1B 00 01 */ addi r0, r27, 1 +/* 8038D108 0038A068 7C 1E 00 50 */ subf r0, r30, r0 +/* 8038D10C 0038A06C 90 01 00 08 */ stw r0, 8(r1) +lbl_8038D110: +/* 8038D110 0038A070 80 A1 00 08 */ lwz r5, 8(r1) +/* 8038D114 0038A074 28 05 00 00 */ cmplwi r5, 0 +/* 8038D118 0038A078 41 82 00 3C */ beq lbl_8038D154 +/* 8038D11C 0038A07C 80 7A 00 24 */ lwz r3, 0x24(r26) +/* 8038D120 0038A080 7F C4 F3 78 */ mr r4, r30 +/* 8038D124 0038A084 4B C7 63 6D */ bl memcpy +/* 8038D128 0038A088 80 61 00 08 */ lwz r3, 8(r1) +/* 8038D12C 0038A08C 80 1A 00 24 */ lwz r0, 0x24(r26) +/* 8038D130 0038A090 7F DE 1A 14 */ add r30, r30, r3 +/* 8038D134 0038A094 7F 9C 1A 14 */ add r28, r28, r3 +/* 8038D138 0038A098 7C 00 1A 14 */ add r0, r0, r3 +/* 8038D13C 0038A09C 7F A3 E8 50 */ subf r29, r3, r29 +/* 8038D140 0038A0A0 90 1A 00 24 */ stw r0, 0x24(r26) +/* 8038D144 0038A0A4 80 61 00 08 */ lwz r3, 8(r1) +/* 8038D148 0038A0A8 80 1A 00 28 */ lwz r0, 0x28(r26) +/* 8038D14C 0038A0AC 7C 03 00 50 */ subf r0, r3, r0 +/* 8038D150 0038A0B0 90 1A 00 28 */ stw r0, 0x28(r26) +lbl_8038D154: +/* 8038D154 0038A0B4 80 1A 00 28 */ lwz r0, 0x28(r26) +/* 8038D158 0038A0B8 28 00 00 00 */ cmplwi r0, 0 +/* 8038D15C 0038A0BC 41 82 00 18 */ beq lbl_8038D174 +/* 8038D160 0038A0C0 28 1B 00 00 */ cmplwi r27, 0 +/* 8038D164 0038A0C4 40 82 00 10 */ bne lbl_8038D174 +/* 8038D168 0038A0C8 88 1A 00 04 */ lbz r0, 4(r26) +/* 8038D16C 0038A0CC 54 00 FF BF */ rlwinm. r0, r0, 0x1f, 0x1e, 0x1f +/* 8038D170 0038A0D0 40 82 00 30 */ bne lbl_8038D1A0 +lbl_8038D174: +/* 8038D174 0038A0D4 7F 43 D3 78 */ mr r3, r26 +/* 8038D178 0038A0D8 38 80 00 00 */ li r4, 0 +/* 8038D17C 0038A0DC 4B FF FC B1 */ bl __flush_buffer +/* 8038D180 0038A0E0 2C 03 00 00 */ cmpwi r3, 0 +/* 8038D184 0038A0E4 41 82 00 1C */ beq lbl_8038D1A0 +/* 8038D188 0038A0E8 38 60 00 01 */ li r3, 1 +/* 8038D18C 0038A0EC 38 00 00 00 */ li r0, 0 +/* 8038D190 0038A0F0 98 7A 00 0A */ stb r3, 0xa(r26) +/* 8038D194 0038A0F4 3B A0 00 00 */ li r29, 0 +/* 8038D198 0038A0F8 90 1A 00 28 */ stw r0, 0x28(r26) +/* 8038D19C 0038A0FC 48 00 00 14 */ b lbl_8038D1B0 +lbl_8038D1A0: +/* 8038D1A0 0038A100 28 1D 00 00 */ cmplwi r29, 0 +/* 8038D1A4 0038A104 41 82 00 0C */ beq lbl_8038D1B0 +/* 8038D1A8 0038A108 2C 1F 00 00 */ cmpwi r31, 0 +/* 8038D1AC 0038A10C 40 82 FF 10 */ bne lbl_8038D0BC +lbl_8038D1B0: +/* 8038D1B0 0038A110 28 1D 00 00 */ cmplwi r29, 0 +/* 8038D1B4 0038A114 41 82 00 68 */ beq lbl_8038D21C +/* 8038D1B8 0038A118 2C 1F 00 00 */ cmpwi r31, 0 +/* 8038D1BC 0038A11C 40 82 00 60 */ bne lbl_8038D21C +/* 8038D1C0 0038A120 83 7A 00 1C */ lwz r27, 0x1c(r26) +/* 8038D1C4 0038A124 7C 1E EA 14 */ add r0, r30, r29 +/* 8038D1C8 0038A128 83 FA 00 20 */ lwz r31, 0x20(r26) +/* 8038D1CC 0038A12C 7F 43 D3 78 */ mr r3, r26 +/* 8038D1D0 0038A130 38 81 00 08 */ addi r4, r1, 8 +/* 8038D1D4 0038A134 93 DA 00 1C */ stw r30, 0x1c(r26) +/* 8038D1D8 0038A138 93 BA 00 20 */ stw r29, 0x20(r26) +/* 8038D1DC 0038A13C 90 1A 00 24 */ stw r0, 0x24(r26) +/* 8038D1E0 0038A140 4B FF FC 4D */ bl __flush_buffer +/* 8038D1E4 0038A144 2C 03 00 00 */ cmpwi r3, 0 +/* 8038D1E8 0038A148 41 82 00 14 */ beq lbl_8038D1FC +/* 8038D1EC 0038A14C 38 60 00 01 */ li r3, 1 +/* 8038D1F0 0038A150 38 00 00 00 */ li r0, 0 +/* 8038D1F4 0038A154 98 7A 00 0A */ stb r3, 0xa(r26) +/* 8038D1F8 0038A158 90 1A 00 28 */ stw r0, 0x28(r26) +lbl_8038D1FC: +/* 8038D1FC 0038A15C 80 01 00 08 */ lwz r0, 8(r1) +/* 8038D200 0038A160 7F 43 D3 78 */ mr r3, r26 +/* 8038D204 0038A164 93 7A 00 1C */ stw r27, 0x1c(r26) +/* 8038D208 0038A168 7F 9C 02 14 */ add r28, r28, r0 +/* 8038D20C 0038A16C 93 FA 00 20 */ stw r31, 0x20(r26) +/* 8038D210 0038A170 4B FF FC E1 */ bl __prep_buffer +/* 8038D214 0038A174 38 00 00 00 */ li r0, 0 +/* 8038D218 0038A178 90 1A 00 28 */ stw r0, 0x28(r26) +lbl_8038D21C: +/* 8038D21C 0038A17C 88 1A 00 04 */ lbz r0, 4(r26) +/* 8038D220 0038A180 54 00 FF BE */ rlwinm r0, r0, 0x1f, 0x1e, 0x1f +/* 8038D224 0038A184 28 00 00 02 */ cmplwi r0, 2 +/* 8038D228 0038A188 41 82 00 0C */ beq lbl_8038D234 +/* 8038D22C 0038A18C 38 00 00 00 */ li r0, 0 +/* 8038D230 0038A190 90 1A 00 28 */ stw r0, 0x28(r26) +lbl_8038D234: +/* 8038D234 0038A194 38 19 FF FF */ addi r0, r25, -1 +/* 8038D238 0038A198 7C 1C 02 14 */ add r0, r28, r0 +/* 8038D23C 0038A19C 7C 60 CB 96 */ divwu r3, r0, r25 +lbl_8038D240: +/* 8038D240 0038A1A0 BB 21 00 14 */ lmw r25, 0x14(r1) +/* 8038D244 0038A1A4 80 01 00 34 */ lwz r0, 0x34(r1) +/* 8038D248 0038A1A8 7C 08 03 A6 */ mtlr r0 +/* 8038D24C 0038A1AC 38 21 00 30 */ addi r1, r1, 0x30 +/* 8038D250 0038A1B0 4E 80 00 20 */ blr + +.global fwrite +fwrite: +/* 8038D254 0038A1B4 94 21 FF F0 */ stwu r1, -0x10(r1) +/* 8038D258 0038A1B8 7C 08 02 A6 */ mflr r0 +/* 8038D25C 0038A1BC 90 01 00 14 */ stw r0, 0x14(r1) +/* 8038D260 0038A1C0 4B FF FC E9 */ bl __fwrite +/* 8038D264 0038A1C4 80 01 00 14 */ lwz r0, 0x14(r1) +/* 8038D268 0038A1C8 7C 08 03 A6 */ mtlr r0 +/* 8038D26C 0038A1CC 38 21 00 10 */ addi r1, r1, 0x10 +/* 8038D270 0038A1D0 4E 80 00 20 */ blr diff --git a/asm/Runtime/PPCEABI/H/file_io.s b/asm/Runtime/PPCEABI/H/file_io.s new file mode 100644 index 00000000..b8a9433a --- /dev/null +++ b/asm/Runtime/PPCEABI/H/file_io.s @@ -0,0 +1,152 @@ +.include "macros.inc" + +.section .text, "ax" + +.global fflush +fflush: +/* 8038D274 0038A1D4 94 21 FF F0 */ stwu r1, -0x10(r1) +/* 8038D278 0038A1D8 7C 08 02 A6 */ mflr r0 +/* 8038D27C 0038A1DC 90 01 00 14 */ stw r0, 0x14(r1) +/* 8038D280 0038A1E0 93 E1 00 0C */ stw r31, 0xc(r1) +/* 8038D284 0038A1E4 7C 7F 1B 79 */ or. r31, r3, r3 +/* 8038D288 0038A1E8 93 C1 00 08 */ stw r30, 8(r1) +/* 8038D28C 0038A1EC 40 82 00 0C */ bne lbl_8038D298 +/* 8038D290 0038A1F0 4B FF DE 19 */ bl __flush_all +/* 8038D294 0038A1F4 48 00 01 00 */ b lbl_8038D394 +lbl_8038D298: +/* 8038D298 0038A1F8 88 1F 00 0A */ lbz r0, 0xa(r31) +/* 8038D29C 0038A1FC 28 00 00 00 */ cmplwi r0, 0 +/* 8038D2A0 0038A200 40 82 00 10 */ bne lbl_8038D2B0 +/* 8038D2A4 0038A204 A0 1F 00 04 */ lhz r0, 4(r31) +/* 8038D2A8 0038A208 54 00 D7 7F */ rlwinm. r0, r0, 0x1a, 0x1d, 0x1f +/* 8038D2AC 0038A20C 40 82 00 0C */ bne lbl_8038D2B8 +lbl_8038D2B0: +/* 8038D2B0 0038A210 38 60 FF FF */ li r3, -1 +/* 8038D2B4 0038A214 48 00 00 E0 */ b lbl_8038D394 +lbl_8038D2B8: +/* 8038D2B8 0038A218 88 1F 00 04 */ lbz r0, 4(r31) +/* 8038D2BC 0038A21C 54 00 EF 7E */ rlwinm r0, r0, 0x1d, 0x1d, 0x1f +/* 8038D2C0 0038A220 28 00 00 01 */ cmplwi r0, 1 +/* 8038D2C4 0038A224 40 82 00 0C */ bne lbl_8038D2D0 +/* 8038D2C8 0038A228 38 60 00 00 */ li r3, 0 +/* 8038D2CC 0038A22C 48 00 00 C8 */ b lbl_8038D394 +lbl_8038D2D0: +/* 8038D2D0 0038A230 88 7F 00 08 */ lbz r3, 8(r31) +/* 8038D2D4 0038A234 54 60 DF 7E */ rlwinm r0, r3, 0x1b, 0x1d, 0x1f +/* 8038D2D8 0038A238 28 00 00 03 */ cmplwi r0, 3 +/* 8038D2DC 0038A23C 41 80 00 10 */ blt lbl_8038D2EC +/* 8038D2E0 0038A240 38 00 00 02 */ li r0, 2 +/* 8038D2E4 0038A244 50 03 2E 34 */ rlwimi r3, r0, 5, 0x18, 0x1a +/* 8038D2E8 0038A248 98 7F 00 08 */ stb r3, 8(r31) +lbl_8038D2EC: +/* 8038D2EC 0038A24C 88 1F 00 08 */ lbz r0, 8(r31) +/* 8038D2F0 0038A250 54 00 DF 7E */ rlwinm r0, r0, 0x1b, 0x1d, 0x1f +/* 8038D2F4 0038A254 28 00 00 02 */ cmplwi r0, 2 +/* 8038D2F8 0038A258 40 82 00 0C */ bne lbl_8038D304 +/* 8038D2FC 0038A25C 38 00 00 00 */ li r0, 0 +/* 8038D300 0038A260 90 1F 00 28 */ stw r0, 0x28(r31) +lbl_8038D304: +/* 8038D304 0038A264 88 9F 00 08 */ lbz r4, 8(r31) +/* 8038D308 0038A268 54 80 DF 7E */ rlwinm r0, r4, 0x1b, 0x1d, 0x1f +/* 8038D30C 0038A26C 28 00 00 01 */ cmplwi r0, 1 +/* 8038D310 0038A270 41 82 00 18 */ beq lbl_8038D328 +/* 8038D314 0038A274 38 00 00 00 */ li r0, 0 +/* 8038D318 0038A278 38 60 00 00 */ li r3, 0 +/* 8038D31C 0038A27C 50 04 2E 34 */ rlwimi r4, r0, 5, 0x18, 0x1a +/* 8038D320 0038A280 98 9F 00 08 */ stb r4, 8(r31) +/* 8038D324 0038A284 48 00 00 70 */ b lbl_8038D394 +lbl_8038D328: +/* 8038D328 0038A288 A0 1F 00 04 */ lhz r0, 4(r31) +/* 8038D32C 0038A28C 54 00 D7 7E */ rlwinm r0, r0, 0x1a, 0x1d, 0x1f +/* 8038D330 0038A290 28 00 00 01 */ cmplwi r0, 1 +/* 8038D334 0038A294 41 82 00 0C */ beq lbl_8038D340 +/* 8038D338 0038A298 3B C0 00 00 */ li r30, 0 +/* 8038D33C 0038A29C 48 00 00 10 */ b lbl_8038D34C +lbl_8038D340: +/* 8038D340 0038A2A0 7F E3 FB 78 */ mr r3, r31 +/* 8038D344 0038A2A4 48 00 03 85 */ bl ftell +/* 8038D348 0038A2A8 7C 7E 1B 78 */ mr r30, r3 +lbl_8038D34C: +/* 8038D34C 0038A2AC 7F E3 FB 78 */ mr r3, r31 +/* 8038D350 0038A2B0 38 80 00 00 */ li r4, 0 +/* 8038D354 0038A2B4 4B FF FA D9 */ bl __flush_buffer +/* 8038D358 0038A2B8 2C 03 00 00 */ cmpwi r3, 0 +/* 8038D35C 0038A2BC 41 82 00 1C */ beq lbl_8038D378 +/* 8038D360 0038A2C0 38 60 00 01 */ li r3, 1 +/* 8038D364 0038A2C4 38 00 00 00 */ li r0, 0 +/* 8038D368 0038A2C8 98 7F 00 0A */ stb r3, 0xa(r31) +/* 8038D36C 0038A2CC 38 60 FF FF */ li r3, -1 +/* 8038D370 0038A2D0 90 1F 00 28 */ stw r0, 0x28(r31) +/* 8038D374 0038A2D4 48 00 00 20 */ b lbl_8038D394 +lbl_8038D378: +/* 8038D378 0038A2D8 88 1F 00 08 */ lbz r0, 8(r31) +/* 8038D37C 0038A2DC 38 80 00 00 */ li r4, 0 +/* 8038D380 0038A2E0 50 80 2E 34 */ rlwimi r0, r4, 5, 0x18, 0x1a +/* 8038D384 0038A2E4 38 60 00 00 */ li r3, 0 +/* 8038D388 0038A2E8 98 1F 00 08 */ stb r0, 8(r31) +/* 8038D38C 0038A2EC 93 DF 00 18 */ stw r30, 0x18(r31) +/* 8038D390 0038A2F0 90 9F 00 28 */ stw r4, 0x28(r31) +lbl_8038D394: +/* 8038D394 0038A2F4 80 01 00 14 */ lwz r0, 0x14(r1) +/* 8038D398 0038A2F8 83 E1 00 0C */ lwz r31, 0xc(r1) +/* 8038D39C 0038A2FC 83 C1 00 08 */ lwz r30, 8(r1) +/* 8038D3A0 0038A300 7C 08 03 A6 */ mtlr r0 +/* 8038D3A4 0038A304 38 21 00 10 */ addi r1, r1, 0x10 +/* 8038D3A8 0038A308 4E 80 00 20 */ blr + +.global fclose +fclose: +/* 8038D3AC 0038A30C 94 21 FF E0 */ stwu r1, -0x20(r1) +/* 8038D3B0 0038A310 7C 08 02 A6 */ mflr r0 +/* 8038D3B4 0038A314 90 01 00 24 */ stw r0, 0x24(r1) +/* 8038D3B8 0038A318 93 E1 00 1C */ stw r31, 0x1c(r1) +/* 8038D3BC 0038A31C 93 C1 00 18 */ stw r30, 0x18(r1) +/* 8038D3C0 0038A320 93 A1 00 14 */ stw r29, 0x14(r1) +/* 8038D3C4 0038A324 7C 7D 1B 79 */ or. r29, r3, r3 +/* 8038D3C8 0038A328 40 82 00 0C */ bne lbl_8038D3D4 +/* 8038D3CC 0038A32C 38 60 FF FF */ li r3, -1 +/* 8038D3D0 0038A330 48 00 00 80 */ b lbl_8038D450 +lbl_8038D3D4: +/* 8038D3D4 0038A334 A0 1D 00 04 */ lhz r0, 4(r29) +/* 8038D3D8 0038A338 54 00 D7 7F */ rlwinm. r0, r0, 0x1a, 0x1d, 0x1f +/* 8038D3DC 0038A33C 40 82 00 0C */ bne lbl_8038D3E8 +/* 8038D3E0 0038A340 38 60 00 00 */ li r3, 0 +/* 8038D3E4 0038A344 48 00 00 6C */ b lbl_8038D450 +lbl_8038D3E8: +/* 8038D3E8 0038A348 4B FF FE 8D */ bl fflush +/* 8038D3EC 0038A34C 81 9D 00 44 */ lwz r12, 0x44(r29) +/* 8038D3F0 0038A350 7C 7E 1B 78 */ mr r30, r3 +/* 8038D3F4 0038A354 80 7D 00 00 */ lwz r3, 0(r29) +/* 8038D3F8 0038A358 7D 89 03 A6 */ mtctr r12 +/* 8038D3FC 0038A35C 4E 80 04 21 */ bctrl +/* 8038D400 0038A360 A0 1D 00 04 */ lhz r0, 4(r29) +/* 8038D404 0038A364 38 80 00 00 */ li r4, 0 +/* 8038D408 0038A368 50 80 35 F2 */ rlwimi r0, r4, 6, 0x17, 0x19 +/* 8038D40C 0038A36C 7C 7F 1B 78 */ mr r31, r3 +/* 8038D410 0038A370 B0 1D 00 04 */ sth r0, 4(r29) +/* 8038D414 0038A374 90 9D 00 00 */ stw r4, 0(r29) +/* 8038D418 0038A378 88 1D 00 08 */ lbz r0, 8(r29) +/* 8038D41C 0038A37C 54 00 E7 FF */ rlwinm. r0, r0, 0x1c, 0x1f, 0x1f +/* 8038D420 0038A380 41 82 00 0C */ beq lbl_8038D42C +/* 8038D424 0038A384 80 7D 00 1C */ lwz r3, 0x1c(r29) +/* 8038D428 0038A388 4B FF CF 31 */ bl sub_8038a358 +lbl_8038D42C: +/* 8038D42C 0038A38C 2C 1E 00 00 */ cmpwi r30, 0 +/* 8038D430 0038A390 38 60 00 00 */ li r3, 0 +/* 8038D434 0038A394 40 82 00 0C */ bne lbl_8038D440 +/* 8038D438 0038A398 2C 1F 00 00 */ cmpwi r31, 0 +/* 8038D43C 0038A39C 41 82 00 08 */ beq lbl_8038D444 +lbl_8038D440: +/* 8038D440 0038A3A0 38 60 00 01 */ li r3, 1 +lbl_8038D444: +/* 8038D444 0038A3A4 7C 03 00 D0 */ neg r0, r3 +/* 8038D448 0038A3A8 7C 00 1B 78 */ or r0, r0, r3 +/* 8038D44C 0038A3AC 7C 03 FE 70 */ srawi r3, r0, 0x1f +lbl_8038D450: +/* 8038D450 0038A3B0 80 01 00 24 */ lwz r0, 0x24(r1) +/* 8038D454 0038A3B4 83 E1 00 1C */ lwz r31, 0x1c(r1) +/* 8038D458 0038A3B8 83 C1 00 18 */ lwz r30, 0x18(r1) +/* 8038D45C 0038A3BC 83 A1 00 14 */ lwz r29, 0x14(r1) +/* 8038D460 0038A3C0 7C 08 03 A6 */ mtlr r0 +/* 8038D464 0038A3C4 38 21 00 20 */ addi r1, r1, 0x20 +/* 8038D468 0038A3C8 4E 80 00 20 */ blr diff --git a/asm/Runtime/PPCEABI/H/global_destructor_chain.s b/asm/Runtime/PPCEABI/H/global_destructor_chain.s new file mode 100644 index 00000000..e050b04b --- /dev/null +++ b/asm/Runtime/PPCEABI/H/global_destructor_chain.s @@ -0,0 +1,35 @@ +.include "macros.inc" + +.section .text, "ax" + +.global __destroy_global_chain +__destroy_global_chain: +/* 80389644 003865A4 94 21 FF F0 */ stwu r1, -0x10(r1) +/* 80389648 003865A8 7C 08 02 A6 */ mflr r0 +/* 8038964C 003865AC 90 01 00 14 */ stw r0, 0x14(r1) +/* 80389650 003865B0 48 00 00 20 */ b lbl_80389670 +lbl_80389654: +/* 80389654 003865B4 80 03 00 00 */ lwz r0, 0(r3) +/* 80389658 003865B8 38 80 FF FF */ li r4, -1 +/* 8038965C 003865BC 90 0D AD F0 */ stw r0, lbl_805A99B0@sda21(r13) +/* 80389660 003865C0 81 83 00 04 */ lwz r12, 4(r3) +/* 80389664 003865C4 80 63 00 08 */ lwz r3, 8(r3) +/* 80389668 003865C8 7D 89 03 A6 */ mtctr r12 +/* 8038966C 003865CC 4E 80 04 21 */ bctrl +lbl_80389670: +/* 80389670 003865D0 80 6D AD F0 */ lwz r3, lbl_805A99B0@sda21(r13) +/* 80389674 003865D4 28 03 00 00 */ cmplwi r3, 0 +/* 80389678 003865D8 40 82 FF DC */ bne lbl_80389654 +/* 8038967C 003865DC 80 01 00 14 */ lwz r0, 0x14(r1) +/* 80389680 003865E0 7C 08 03 A6 */ mtlr r0 +/* 80389684 003865E4 38 21 00 10 */ addi r1, r1, 0x10 +/* 80389688 003865E8 4E 80 00 20 */ blr + +.global __register_global_object +__register_global_object: +/* 8038968C 003865EC 80 0D AD F0 */ lwz r0, lbl_805A99B0@sda21(r13) +/* 80389690 003865F0 90 05 00 00 */ stw r0, 0(r5) +/* 80389694 003865F4 90 85 00 04 */ stw r4, 4(r5) +/* 80389698 003865F8 90 65 00 08 */ stw r3, 8(r5) +/* 8038969C 003865FC 90 AD AD F0 */ stw r5, lbl_805A99B0@sda21(r13) +/* 803896A0 00386600 4E 80 00 20 */ blr diff --git a/asm/Runtime/PPCEABI/H/mbstring.s b/asm/Runtime/PPCEABI/H/mbstring.s new file mode 100644 index 00000000..a08c251c --- /dev/null +++ b/asm/Runtime/PPCEABI/H/mbstring.s @@ -0,0 +1,106 @@ +.include "macros.inc" + +.section .text, "ax" + +.global wcstombs +wcstombs: +/* 8038D738 0038A698 94 21 FF D0 */ stwu r1, -0x30(r1) +/* 8038D73C 0038A69C 7C 08 02 A6 */ mflr r0 +/* 8038D740 0038A6A0 90 01 00 34 */ stw r0, 0x34(r1) +/* 8038D744 0038A6A4 BF 61 00 1C */ stmw r27, 0x1c(r1) +/* 8038D748 0038A6A8 7C 7B 1B 79 */ or. r27, r3, r3 +/* 8038D74C 0038A6AC 7C BC 2B 78 */ mr r28, r5 +/* 8038D750 0038A6B0 3B C0 00 00 */ li r30, 0 +/* 8038D754 0038A6B4 41 82 00 0C */ beq lbl_8038D760 +/* 8038D758 0038A6B8 28 04 00 00 */ cmplwi r4, 0 +/* 8038D75C 0038A6BC 40 82 00 0C */ bne lbl_8038D768 +lbl_8038D760: +/* 8038D760 0038A6C0 38 60 00 00 */ li r3, 0 +/* 8038D764 0038A6C4 48 00 00 60 */ b lbl_8038D7C4 +lbl_8038D768: +/* 8038D768 0038A6C8 7C 9D 23 78 */ mr r29, r4 +/* 8038D76C 0038A6CC 48 00 00 4C */ b lbl_8038D7B8 +lbl_8038D770: +/* 8038D770 0038A6D0 A0 9D 00 00 */ lhz r4, 0(r29) +/* 8038D774 0038A6D4 28 04 00 00 */ cmplwi r4, 0 +/* 8038D778 0038A6D8 40 82 00 10 */ bne lbl_8038D788 +/* 8038D77C 0038A6DC 38 00 00 00 */ li r0, 0 +/* 8038D780 0038A6E0 7C 1B F1 AE */ stbx r0, r27, r30 +/* 8038D784 0038A6E4 48 00 00 3C */ b lbl_8038D7C0 +lbl_8038D788: +/* 8038D788 0038A6E8 38 61 00 08 */ addi r3, r1, 8 +/* 8038D78C 0038A6EC 3B BD 00 02 */ addi r29, r29, 2 +/* 8038D790 0038A6F0 48 00 00 49 */ bl unicode_to_UTF8 +/* 8038D794 0038A6F4 7C 7F 1B 78 */ mr r31, r3 +/* 8038D798 0038A6F8 7C 1E FA 14 */ add r0, r30, r31 +/* 8038D79C 0038A6FC 7C 00 E0 40 */ cmplw r0, r28 +/* 8038D7A0 0038A700 41 81 00 20 */ bgt lbl_8038D7C0 +/* 8038D7A4 0038A704 7F E5 FB 78 */ mr r5, r31 +/* 8038D7A8 0038A708 7C 7B F2 14 */ add r3, r27, r30 +/* 8038D7AC 0038A70C 38 81 00 08 */ addi r4, r1, 8 +/* 8038D7B0 0038A710 48 00 29 15 */ bl strncpy +/* 8038D7B4 0038A714 7F DE FA 14 */ add r30, r30, r31 +lbl_8038D7B8: +/* 8038D7B8 0038A718 7C 1E E0 40 */ cmplw r30, r28 +/* 8038D7BC 0038A71C 40 81 FF B4 */ ble lbl_8038D770 +lbl_8038D7C0: +/* 8038D7C0 0038A720 7F C3 F3 78 */ mr r3, r30 +lbl_8038D7C4: +/* 8038D7C4 0038A724 BB 61 00 1C */ lmw r27, 0x1c(r1) +/* 8038D7C8 0038A728 80 01 00 34 */ lwz r0, 0x34(r1) +/* 8038D7CC 0038A72C 7C 08 03 A6 */ mtlr r0 +/* 8038D7D0 0038A730 38 21 00 30 */ addi r1, r1, 0x30 +/* 8038D7D4 0038A734 4E 80 00 20 */ blr + +.global unicode_to_UTF8 +unicode_to_UTF8: +/* 8038D7D8 0038A738 94 21 FF F0 */ stwu r1, -0x10(r1) +/* 8038D7DC 0038A73C 28 03 00 00 */ cmplwi r3, 0 +/* 8038D7E0 0038A740 80 02 CF 70 */ lwz r0, lbl_805AEC90@sda21(r2) +/* 8038D7E4 0038A744 90 01 00 08 */ stw r0, 8(r1) +/* 8038D7E8 0038A748 40 82 00 0C */ bne lbl_8038D7F4 +/* 8038D7EC 0038A74C 38 60 00 00 */ li r3, 0 +/* 8038D7F0 0038A750 48 00 00 84 */ b lbl_8038D874 +lbl_8038D7F4: +/* 8038D7F4 0038A754 54 80 04 3E */ clrlwi r0, r4, 0x10 +/* 8038D7F8 0038A758 28 00 00 80 */ cmplwi r0, 0x80 +/* 8038D7FC 0038A75C 40 80 00 0C */ bge lbl_8038D808 +/* 8038D800 0038A760 38 A0 00 01 */ li r5, 1 +/* 8038D804 0038A764 48 00 00 18 */ b lbl_8038D81C +lbl_8038D808: +/* 8038D808 0038A768 28 00 08 00 */ cmplwi r0, 0x800 +/* 8038D80C 0038A76C 40 80 00 0C */ bge lbl_8038D818 +/* 8038D810 0038A770 38 A0 00 02 */ li r5, 2 +/* 8038D814 0038A774 48 00 00 08 */ b lbl_8038D81C +lbl_8038D818: +/* 8038D818 0038A778 38 A0 00 03 */ li r5, 3 +lbl_8038D81C: +/* 8038D81C 0038A77C 2C 05 00 02 */ cmpwi r5, 2 +/* 8038D820 0038A780 7C C3 2A 14 */ add r6, r3, r5 +/* 8038D824 0038A784 41 82 00 2C */ beq lbl_8038D850 +/* 8038D828 0038A788 40 80 00 10 */ bge lbl_8038D838 +/* 8038D82C 0038A78C 2C 05 00 01 */ cmpwi r5, 1 +/* 8038D830 0038A790 40 80 00 30 */ bge lbl_8038D860 +/* 8038D834 0038A794 48 00 00 3C */ b lbl_8038D870 +lbl_8038D838: +/* 8038D838 0038A798 2C 05 00 04 */ cmpwi r5, 4 +/* 8038D83C 0038A79C 40 80 00 34 */ bge lbl_8038D870 +/* 8038D840 0038A7A0 54 80 06 BE */ clrlwi r0, r4, 0x1a +/* 8038D844 0038A7A4 54 84 D5 BE */ rlwinm r4, r4, 0x1a, 0x16, 0x1f +/* 8038D848 0038A7A8 60 00 00 80 */ ori r0, r0, 0x80 +/* 8038D84C 0038A7AC 9C 06 FF FF */ stbu r0, -1(r6) +lbl_8038D850: +/* 8038D850 0038A7B0 54 80 06 BE */ clrlwi r0, r4, 0x1a +/* 8038D854 0038A7B4 54 84 D5 BE */ rlwinm r4, r4, 0x1a, 0x16, 0x1f +/* 8038D858 0038A7B8 60 00 00 80 */ ori r0, r0, 0x80 +/* 8038D85C 0038A7BC 9C 06 FF FF */ stbu r0, -1(r6) +lbl_8038D860: +/* 8038D860 0038A7C0 38 61 00 08 */ addi r3, r1, 8 +/* 8038D864 0038A7C4 7C 03 28 AE */ lbzx r0, r3, r5 +/* 8038D868 0038A7C8 7C 80 03 78 */ or r0, r4, r0 +/* 8038D86C 0038A7CC 98 06 FF FF */ stb r0, -1(r6) +lbl_8038D870: +/* 8038D870 0038A7D0 7C A3 2B 78 */ mr r3, r5 +lbl_8038D874: +/* 8038D874 0038A7D4 38 21 00 10 */ addi r1, r1, 0x10 +/* 8038D878 0038A7D8 4E 80 00 20 */ blr diff --git a/asm/Runtime/PPCEABI/H/ptmf.s b/asm/Runtime/PPCEABI/H/ptmf.s new file mode 100644 index 00000000..75ed0515 --- /dev/null +++ b/asm/Runtime/PPCEABI/H/ptmf.s @@ -0,0 +1,32 @@ +.include "macros.inc" + +.section .text, "ax" + +.global __ptmf_test +__ptmf_test: +/* 803898FC 0038685C 80 A3 00 00 */ lwz r5, 0(r3) +/* 80389900 00386860 80 C3 00 04 */ lwz r6, 4(r3) +/* 80389904 00386864 80 E3 00 08 */ lwz r7, 8(r3) +/* 80389908 00386868 38 60 00 01 */ li r3, 1 +/* 8038990C 0038686C 2C 05 00 00 */ cmpwi r5, 0 +/* 80389910 00386870 2F 06 00 00 */ cmpwi cr6, r6, 0 +/* 80389914 00386874 2F 87 00 00 */ cmpwi cr7, r7, 0 +/* 80389918 00386878 4C 82 00 20 */ bnelr +/* 8038991C 0038687C 4C 9A 00 20 */ bnelr cr6 +/* 80389920 00386880 4C 9E 00 20 */ bnelr cr7 +/* 80389924 00386884 38 60 00 00 */ li r3, 0 +/* 80389928 00386888 4E 80 00 20 */ blr + +.global __ptmf_scall +__ptmf_scall: +/* 8038992C 0038688C 80 0C 00 00 */ lwz r0, 0(r12) +/* 80389930 00386890 81 6C 00 04 */ lwz r11, 4(r12) +/* 80389934 00386894 81 8C 00 08 */ lwz r12, 8(r12) +/* 80389938 00386898 7C 63 02 14 */ add r3, r3, r0 +/* 8038993C 0038689C 2C 0B 00 00 */ cmpwi r11, 0 +/* 80389940 003868A0 41 80 00 0C */ blt lbl_8038994C +/* 80389944 003868A4 7D 83 60 2E */ lwzx r12, r3, r12 +/* 80389948 003868A8 7D 8C 58 2E */ lwzx r12, r12, r11 +lbl_8038994C: +/* 8038994C 003868AC 7D 89 03 A6 */ mtctr r12 +/* 80389950 003868B0 4E 80 04 20 */ bctr diff --git a/asm/Runtime/PPCEABI/H/runtime.s b/asm/Runtime/PPCEABI/H/runtime.s new file mode 100644 index 00000000..8933bed6 --- /dev/null +++ b/asm/Runtime/PPCEABI/H/runtime.s @@ -0,0 +1,687 @@ +.include "macros.inc" + +.section .text, "ax" + +.global __cvt_fp2unsigned +__cvt_fp2unsigned: +/* 80389954 003868B4 94 21 FF F0 */ stwu r1, -0x10(r1) +/* 80389958 003868B8 3C 80 80 3D */ lis r4, lbl_803D85A8@h +/* 8038995C 003868BC 60 84 85 A8 */ ori r4, r4, lbl_803D85A8@l +/* 80389960 003868C0 38 60 00 00 */ li r3, 0 +/* 80389964 003868C4 C8 04 00 00 */ lfd f0, 0(r4) +/* 80389968 003868C8 C8 64 00 08 */ lfd f3, 8(r4) +/* 8038996C 003868CC C8 84 00 10 */ lfd f4, 0x10(r4) +/* 80389970 003868D0 FC 01 00 00 */ fcmpu cr0, f1, f0 +/* 80389974 003868D4 FF 01 18 00 */ fcmpu cr6, f1, f3 +/* 80389978 003868D8 41 80 00 30 */ blt lbl_803899A8 +/* 8038997C 003868DC 38 63 FF FF */ addi r3, r3, -1 +/* 80389980 003868E0 40 98 00 28 */ bge cr6, lbl_803899A8 +/* 80389984 003868E4 FF 81 20 00 */ fcmpu cr7, f1, f4 +/* 80389988 003868E8 FC 40 08 90 */ fmr f2, f1 +/* 8038998C 003868EC 41 9C 00 08 */ blt cr7, lbl_80389994 +/* 80389990 003868F0 FC 41 20 28 */ fsub f2, f1, f4 +lbl_80389994: +/* 80389994 003868F4 FC 40 10 1E */ fctiwz f2, f2 +/* 80389998 003868F8 D8 41 00 08 */ stfd f2, 8(r1) +/* 8038999C 003868FC 80 61 00 0C */ lwz r3, 0xc(r1) +/* 803899A0 00386900 41 9C 00 08 */ blt cr7, lbl_803899A8 +/* 803899A4 00386904 3C 63 80 00 */ addis r3, r3, 0x8000 +lbl_803899A8: +/* 803899A8 00386908 38 21 00 10 */ addi r1, r1, 0x10 +/* 803899AC 0038690C 4E 80 00 20 */ blr + +.global __save_fpr +__save_fpr: +/* 803899B0 00386910 D9 CB FF 70 */ stfd f14, -0x90(r11) +/* 803899B4 00386914 D9 EB FF 78 */ stfd f15, -0x88(r11) +/* 803899B8 00386918 DA 0B FF 80 */ stfd f16, -0x80(r11) +/* 803899BC 0038691C DA 2B FF 88 */ stfd f17, -0x78(r11) + +.global sub_803899c0 +sub_803899c0: +/* 803899C0 00386920 DA 4B FF 90 */ stfd f18, -0x70(r11) +/* 803899C4 00386924 DA 6B FF 98 */ stfd f19, -0x68(r11) +/* 803899C8 00386928 DA 8B FF A0 */ stfd f20, -0x60(r11) + +.global sub_803899cc +sub_803899cc: +/* 803899CC 0038692C DA AB FF A8 */ stfd f21, -0x58(r11) +/* 803899D0 00386930 DA CB FF B0 */ stfd f22, -0x50(r11) +/* 803899D4 00386934 DA EB FF B8 */ stfd f23, -0x48(r11) +/* 803899D8 00386938 DB 0B FF C0 */ stfd f24, -0x40(r11) + +.global sub_803899dc +sub_803899dc: +/* 803899DC 0038693C DB 2B FF C8 */ stfd f25, -0x38(r11) + +.global func_803899E0 +func_803899E0: +/* 803899E0 00386940 DB 4B FF D0 */ stfd f26, -0x30(r11) + +.global func_803899E4 +func_803899E4: +/* 803899E4 00386944 DB 6B FF D8 */ stfd f27, -0x28(r11) + +.global sub_803899e8 +sub_803899e8: +/* 803899E8 00386948 DB 8B FF E0 */ stfd f28, -0x20(r11) +/* 803899EC 0038694C DB AB FF E8 */ stfd f29, -0x18(r11) +/* 803899F0 00386950 DB CB FF F0 */ stfd f30, -0x10(r11) +/* 803899F4 00386954 DB EB FF F8 */ stfd f31, -8(r11) +/* 803899F8 00386958 4E 80 00 20 */ blr + +.global __restore_fpr +__restore_fpr: +/* 803899FC 0038695C C9 CB FF 70 */ lfd f14, -0x90(r11) +/* 80389A00 00386960 C9 EB FF 78 */ lfd f15, -0x88(r11) +/* 80389A04 00386964 CA 0B FF 80 */ lfd f16, -0x80(r11) +/* 80389A08 00386968 CA 2B FF 88 */ lfd f17, -0x78(r11) + +.global sub_80389a0c +sub_80389a0c: +/* 80389A0C 0038696C CA 4B FF 90 */ lfd f18, -0x70(r11) +/* 80389A10 00386970 CA 6B FF 98 */ lfd f19, -0x68(r11) +/* 80389A14 00386974 CA 8B FF A0 */ lfd f20, -0x60(r11) + +.global sub_80389a18 +sub_80389a18: +/* 80389A18 00386978 CA AB FF A8 */ lfd f21, -0x58(r11) +/* 80389A1C 0038697C CA CB FF B0 */ lfd f22, -0x50(r11) +/* 80389A20 00386980 CA EB FF B8 */ lfd f23, -0x48(r11) +/* 80389A24 00386984 CB 0B FF C0 */ lfd f24, -0x40(r11) + +.global sub_80389a28 +sub_80389a28: +/* 80389A28 00386988 CB 2B FF C8 */ lfd f25, -0x38(r11) + +.global func_80389A2C +func_80389A2C: +/* 80389A2C 0038698C CB 4B FF D0 */ lfd f26, -0x30(r11) + +.global func_80389A30 +func_80389A30: +/* 80389A30 00386990 CB 6B FF D8 */ lfd f27, -0x28(r11) + +.global sub_80389a34 +sub_80389a34: +/* 80389A34 00386994 CB 8B FF E0 */ lfd f28, -0x20(r11) +/* 80389A38 00386998 CB AB FF E8 */ lfd f29, -0x18(r11) +/* 80389A3C 0038699C CB CB FF F0 */ lfd f30, -0x10(r11) +/* 80389A40 003869A0 CB EB FF F8 */ lfd f31, -8(r11) +/* 80389A44 003869A4 4E 80 00 20 */ blr + +.global __save_gpr +__save_gpr: +/* 80389A48 003869A8 91 CB FF B8 */ stw r14, -0x48(r11) + +.global func_80389A4C +func_80389A4C: +/* 80389A4C 003869AC 91 EB FF BC */ stw r15, -0x44(r11) + +.global sub_80389a50 +sub_80389a50: +/* 80389A50 003869B0 92 0B FF C0 */ stw r16, -0x40(r11) +/* 80389A54 003869B4 92 2B FF C4 */ stw r17, -0x3c(r11) + +.global func_80389A58 +func_80389A58: +/* 80389A58 003869B8 92 4B FF C8 */ stw r18, -0x38(r11) +/* 80389A5C 003869BC 92 6B FF CC */ stw r19, -0x34(r11) + +.global func_80389A60 +func_80389A60: +/* 80389A60 003869C0 92 8B FF D0 */ stw r20, -0x30(r11) + +.global func_80389A64 +func_80389A64: +/* 80389A64 003869C4 92 AB FF D4 */ stw r21, -0x2c(r11) + +.global sub_80389a68 +sub_80389a68: +/* 80389A68 003869C8 92 CB FF D8 */ stw r22, -0x28(r11) + +.global func_80389A6C +func_80389A6C: +/* 80389A6C 003869CC 92 EB FF DC */ stw r23, -0x24(r11) + +.global func_80389A70 +func_80389A70: +/* 80389A70 003869D0 93 0B FF E0 */ stw r24, -0x20(r11) + +.global func_80389A74 +func_80389A74: +/* 80389A74 003869D4 93 2B FF E4 */ stw r25, -0x1c(r11) + +.global func_80389A78 +func_80389A78: +/* 80389A78 003869D8 93 4B FF E8 */ stw r26, -0x18(r11) + +.global sub_80389a7c +sub_80389a7c: +/* 80389A7C 003869DC 93 6B FF EC */ stw r27, -0x14(r11) +/* 80389A80 003869E0 93 8B FF F0 */ stw r28, -0x10(r11) +/* 80389A84 003869E4 93 AB FF F4 */ stw r29, -0xc(r11) +/* 80389A88 003869E8 93 CB FF F8 */ stw r30, -8(r11) +/* 80389A8C 003869EC 93 EB FF FC */ stw r31, -4(r11) +/* 80389A90 003869F0 4E 80 00 20 */ blr + +.global __restore_gpr +__restore_gpr: +/* 80389A94 003869F4 81 CB FF B8 */ lwz r14, -0x48(r11) + +.global func_80389A98 +func_80389A98: +/* 80389A98 003869F8 81 EB FF BC */ lwz r15, -0x44(r11) + +.global _restgpr_16 +_restgpr_16: +/* 80389A9C 003869FC 82 0B FF C0 */ lwz r16, -0x40(r11) +/* 80389AA0 00386A00 82 2B FF C4 */ lwz r17, -0x3c(r11) + +.global _restgpr_18 +_restgpr_18: +/* 80389AA4 00386A04 82 4B FF C8 */ lwz r18, -0x38(r11) +/* 80389AA8 00386A08 82 6B FF CC */ lwz r19, -0x34(r11) + +.global _restgpr_20 +_restgpr_20: +/* 80389AAC 00386A0C 82 8B FF D0 */ lwz r20, -0x30(r11) + +.global _restgpr_21 +_restgpr_21: +/* 80389AB0 00386A10 82 AB FF D4 */ lwz r21, -0x2c(r11) + +.global _restgpr_22 +_restgpr_22: +/* 80389AB4 00386A14 82 CB FF D8 */ lwz r22, -0x28(r11) + +.global _restgpr_23 +_restgpr_23: +/* 80389AB8 00386A18 82 EB FF DC */ lwz r23, -0x24(r11) + +.global _restgpr_24 +_restgpr_24: +/* 80389ABC 00386A1C 83 0B FF E0 */ lwz r24, -0x20(r11) + +.global _restgpr_25 +_restgpr_25: +/* 80389AC0 00386A20 83 2B FF E4 */ lwz r25, -0x1c(r11) + +.global _restgpr_26 +_restgpr_26: +/* 80389AC4 00386A24 83 4B FF E8 */ lwz r26, -0x18(r11) + +.global _restgpr_27 +_restgpr_27: +/* 80389AC8 00386A28 83 6B FF EC */ lwz r27, -0x14(r11) +/* 80389ACC 00386A2C 83 8B FF F0 */ lwz r28, -0x10(r11) +/* 80389AD0 00386A30 83 AB FF F4 */ lwz r29, -0xc(r11) +/* 80389AD4 00386A34 83 CB FF F8 */ lwz r30, -8(r11) +/* 80389AD8 00386A38 83 EB FF FC */ lwz r31, -4(r11) +/* 80389ADC 00386A3C 4E 80 00 20 */ blr + +.global __div2u +__div2u: +/* 80389AE0 00386A40 2C 03 00 00 */ cmpwi r3, 0 +/* 80389AE4 00386A44 7C 60 00 34 */ cntlzw r0, r3 +/* 80389AE8 00386A48 7C 89 00 34 */ cntlzw r9, r4 +/* 80389AEC 00386A4C 40 82 00 08 */ bne lbl_80389AF4 +/* 80389AF0 00386A50 38 09 00 20 */ addi r0, r9, 0x20 +lbl_80389AF4: +/* 80389AF4 00386A54 2C 05 00 00 */ cmpwi r5, 0 +/* 80389AF8 00386A58 7C A9 00 34 */ cntlzw r9, r5 +/* 80389AFC 00386A5C 7C CA 00 34 */ cntlzw r10, r6 +/* 80389B00 00386A60 40 82 00 08 */ bne lbl_80389B08 +/* 80389B04 00386A64 39 2A 00 20 */ addi r9, r10, 0x20 +lbl_80389B08: +/* 80389B08 00386A68 7C 00 48 00 */ cmpw r0, r9 +/* 80389B0C 00386A6C 21 40 00 40 */ subfic r10, r0, 0x40 +/* 80389B10 00386A70 41 81 00 B0 */ bgt lbl_80389BC0 +/* 80389B14 00386A74 39 29 00 01 */ addi r9, r9, 1 +/* 80389B18 00386A78 21 29 00 40 */ subfic r9, r9, 0x40 +/* 80389B1C 00386A7C 7C 00 4A 14 */ add r0, r0, r9 +/* 80389B20 00386A80 7D 29 50 50 */ subf r9, r9, r10 +/* 80389B24 00386A84 7D 29 03 A6 */ mtctr r9 +/* 80389B28 00386A88 2C 09 00 20 */ cmpwi r9, 0x20 +/* 80389B2C 00386A8C 38 E9 FF E0 */ addi r7, r9, -32 +/* 80389B30 00386A90 41 80 00 10 */ blt lbl_80389B40 +/* 80389B34 00386A94 7C 68 3C 30 */ srw r8, r3, r7 +/* 80389B38 00386A98 38 E0 00 00 */ li r7, 0 +/* 80389B3C 00386A9C 48 00 00 18 */ b lbl_80389B54 +lbl_80389B40: +/* 80389B40 00386AA0 7C 88 4C 30 */ srw r8, r4, r9 +/* 80389B44 00386AA4 20 E9 00 20 */ subfic r7, r9, 0x20 +/* 80389B48 00386AA8 7C 67 38 30 */ slw r7, r3, r7 +/* 80389B4C 00386AAC 7D 08 3B 78 */ or r8, r8, r7 +/* 80389B50 00386AB0 7C 67 4C 30 */ srw r7, r3, r9 +lbl_80389B54: +/* 80389B54 00386AB4 2C 00 00 20 */ cmpwi r0, 0x20 +/* 80389B58 00386AB8 31 20 FF E0 */ addic r9, r0, -32 +/* 80389B5C 00386ABC 41 80 00 10 */ blt lbl_80389B6C +/* 80389B60 00386AC0 7C 83 48 30 */ slw r3, r4, r9 +/* 80389B64 00386AC4 38 80 00 00 */ li r4, 0 +/* 80389B68 00386AC8 48 00 00 18 */ b lbl_80389B80 +lbl_80389B6C: +/* 80389B6C 00386ACC 7C 63 00 30 */ slw r3, r3, r0 +/* 80389B70 00386AD0 21 20 00 20 */ subfic r9, r0, 0x20 +/* 80389B74 00386AD4 7C 89 4C 30 */ srw r9, r4, r9 +/* 80389B78 00386AD8 7C 63 4B 78 */ or r3, r3, r9 +/* 80389B7C 00386ADC 7C 84 00 30 */ slw r4, r4, r0 +lbl_80389B80: +/* 80389B80 00386AE0 39 40 FF FF */ li r10, -1 +/* 80389B84 00386AE4 30 E7 00 00 */ addic r7, r7, 0 +lbl_80389B88: +/* 80389B88 00386AE8 7C 84 21 14 */ adde r4, r4, r4 +/* 80389B8C 00386AEC 7C 63 19 14 */ adde r3, r3, r3 +/* 80389B90 00386AF0 7D 08 41 14 */ adde r8, r8, r8 +/* 80389B94 00386AF4 7C E7 39 14 */ adde r7, r7, r7 +/* 80389B98 00386AF8 7C 06 40 10 */ subfc r0, r6, r8 +/* 80389B9C 00386AFC 7D 25 39 11 */ subfe. r9, r5, r7 +/* 80389BA0 00386B00 41 80 00 10 */ blt lbl_80389BB0 +/* 80389BA4 00386B04 7C 08 03 78 */ mr r8, r0 +/* 80389BA8 00386B08 7D 27 4B 78 */ mr r7, r9 +/* 80389BAC 00386B0C 30 0A 00 01 */ addic r0, r10, 1 +lbl_80389BB0: +/* 80389BB0 00386B10 42 00 FF D8 */ bdnz lbl_80389B88 +/* 80389BB4 00386B14 7C 84 21 14 */ adde r4, r4, r4 +/* 80389BB8 00386B18 7C 63 19 14 */ adde r3, r3, r3 +/* 80389BBC 00386B1C 4E 80 00 20 */ blr +lbl_80389BC0: +/* 80389BC0 00386B20 38 80 00 00 */ li r4, 0 +/* 80389BC4 00386B24 38 60 00 00 */ li r3, 0 +/* 80389BC8 00386B28 4E 80 00 20 */ blr + +.global __div2i +__div2i: +/* 80389BCC 00386B2C 94 21 FF F0 */ stwu r1, -0x10(r1) +/* 80389BD0 00386B30 54 69 00 01 */ rlwinm. r9, r3, 0, 0, 0 +/* 80389BD4 00386B34 41 82 00 0C */ beq lbl_80389BE0 +/* 80389BD8 00386B38 20 84 00 00 */ subfic r4, r4, 0 +/* 80389BDC 00386B3C 7C 63 01 90 */ subfze r3, r3 +lbl_80389BE0: +/* 80389BE0 00386B40 91 21 00 08 */ stw r9, 8(r1) +/* 80389BE4 00386B44 54 AA 00 01 */ rlwinm. r10, r5, 0, 0, 0 +/* 80389BE8 00386B48 41 82 00 0C */ beq lbl_80389BF4 +/* 80389BEC 00386B4C 20 C6 00 00 */ subfic r6, r6, 0 +/* 80389BF0 00386B50 7C A5 01 90 */ subfze r5, r5 +lbl_80389BF4: +/* 80389BF4 00386B54 91 41 00 0C */ stw r10, 0xc(r1) +/* 80389BF8 00386B58 2C 03 00 00 */ cmpwi r3, 0 +/* 80389BFC 00386B5C 7C 60 00 34 */ cntlzw r0, r3 +/* 80389C00 00386B60 7C 89 00 34 */ cntlzw r9, r4 +/* 80389C04 00386B64 40 82 00 08 */ bne lbl_80389C0C +/* 80389C08 00386B68 38 09 00 20 */ addi r0, r9, 0x20 +lbl_80389C0C: +/* 80389C0C 00386B6C 2C 05 00 00 */ cmpwi r5, 0 +/* 80389C10 00386B70 7C A9 00 34 */ cntlzw r9, r5 +/* 80389C14 00386B74 7C CA 00 34 */ cntlzw r10, r6 +/* 80389C18 00386B78 40 82 00 08 */ bne lbl_80389C20 +/* 80389C1C 00386B7C 39 2A 00 20 */ addi r9, r10, 0x20 +lbl_80389C20: +/* 80389C20 00386B80 7C 00 48 00 */ cmpw r0, r9 +/* 80389C24 00386B84 21 40 00 40 */ subfic r10, r0, 0x40 +/* 80389C28 00386B88 41 81 00 CC */ bgt lbl_80389CF4 +/* 80389C2C 00386B8C 39 29 00 01 */ addi r9, r9, 1 +/* 80389C30 00386B90 21 29 00 40 */ subfic r9, r9, 0x40 +/* 80389C34 00386B94 7C 00 4A 14 */ add r0, r0, r9 +/* 80389C38 00386B98 7D 29 50 50 */ subf r9, r9, r10 +/* 80389C3C 00386B9C 7D 29 03 A6 */ mtctr r9 +/* 80389C40 00386BA0 2C 09 00 20 */ cmpwi r9, 0x20 +/* 80389C44 00386BA4 38 E9 FF E0 */ addi r7, r9, -32 +/* 80389C48 00386BA8 41 80 00 10 */ blt lbl_80389C58 +/* 80389C4C 00386BAC 7C 68 3C 30 */ srw r8, r3, r7 +/* 80389C50 00386BB0 38 E0 00 00 */ li r7, 0 +/* 80389C54 00386BB4 48 00 00 18 */ b lbl_80389C6C +lbl_80389C58: +/* 80389C58 00386BB8 7C 88 4C 30 */ srw r8, r4, r9 +/* 80389C5C 00386BBC 20 E9 00 20 */ subfic r7, r9, 0x20 +/* 80389C60 00386BC0 7C 67 38 30 */ slw r7, r3, r7 +/* 80389C64 00386BC4 7D 08 3B 78 */ or r8, r8, r7 +/* 80389C68 00386BC8 7C 67 4C 30 */ srw r7, r3, r9 +lbl_80389C6C: +/* 80389C6C 00386BCC 2C 00 00 20 */ cmpwi r0, 0x20 +/* 80389C70 00386BD0 31 20 FF E0 */ addic r9, r0, -32 +/* 80389C74 00386BD4 41 80 00 10 */ blt lbl_80389C84 +/* 80389C78 00386BD8 7C 83 48 30 */ slw r3, r4, r9 +/* 80389C7C 00386BDC 38 80 00 00 */ li r4, 0 +/* 80389C80 00386BE0 48 00 00 18 */ b lbl_80389C98 +lbl_80389C84: +/* 80389C84 00386BE4 7C 63 00 30 */ slw r3, r3, r0 +/* 80389C88 00386BE8 21 20 00 20 */ subfic r9, r0, 0x20 +/* 80389C8C 00386BEC 7C 89 4C 30 */ srw r9, r4, r9 +/* 80389C90 00386BF0 7C 63 4B 78 */ or r3, r3, r9 +/* 80389C94 00386BF4 7C 84 00 30 */ slw r4, r4, r0 +lbl_80389C98: +/* 80389C98 00386BF8 39 40 FF FF */ li r10, -1 +/* 80389C9C 00386BFC 30 E7 00 00 */ addic r7, r7, 0 +lbl_80389CA0: +/* 80389CA0 00386C00 7C 84 21 14 */ adde r4, r4, r4 +/* 80389CA4 00386C04 7C 63 19 14 */ adde r3, r3, r3 +/* 80389CA8 00386C08 7D 08 41 14 */ adde r8, r8, r8 +/* 80389CAC 00386C0C 7C E7 39 14 */ adde r7, r7, r7 +/* 80389CB0 00386C10 7C 06 40 10 */ subfc r0, r6, r8 +/* 80389CB4 00386C14 7D 25 39 11 */ subfe. r9, r5, r7 +/* 80389CB8 00386C18 41 80 00 10 */ blt lbl_80389CC8 +/* 80389CBC 00386C1C 7C 08 03 78 */ mr r8, r0 +/* 80389CC0 00386C20 7D 27 4B 78 */ mr r7, r9 +/* 80389CC4 00386C24 30 0A 00 01 */ addic r0, r10, 1 +lbl_80389CC8: +/* 80389CC8 00386C28 42 00 FF D8 */ bdnz lbl_80389CA0 +/* 80389CCC 00386C2C 7C 84 21 14 */ adde r4, r4, r4 +/* 80389CD0 00386C30 7C 63 19 14 */ adde r3, r3, r3 +/* 80389CD4 00386C34 81 21 00 08 */ lwz r9, 8(r1) +/* 80389CD8 00386C38 81 41 00 0C */ lwz r10, 0xc(r1) +/* 80389CDC 00386C3C 7D 27 52 79 */ xor. r7, r9, r10 +/* 80389CE0 00386C40 41 82 00 1C */ beq lbl_80389CFC +/* 80389CE4 00386C44 2C 09 00 00 */ cmpwi r9, 0 +/* 80389CE8 00386C48 20 84 00 00 */ subfic r4, r4, 0 +/* 80389CEC 00386C4C 7C 63 01 90 */ subfze r3, r3 +/* 80389CF0 00386C50 48 00 00 0C */ b lbl_80389CFC +lbl_80389CF4: +/* 80389CF4 00386C54 38 80 00 00 */ li r4, 0 +/* 80389CF8 00386C58 38 60 00 00 */ li r3, 0 +lbl_80389CFC: +/* 80389CFC 00386C5C 38 21 00 10 */ addi r1, r1, 0x10 +/* 80389D00 00386C60 4E 80 00 20 */ blr + +.global __mod2u +__mod2u: +/* 80389D04 00386C64 2C 03 00 00 */ cmpwi r3, 0 +/* 80389D08 00386C68 7C 60 00 34 */ cntlzw r0, r3 +/* 80389D0C 00386C6C 7C 89 00 34 */ cntlzw r9, r4 +/* 80389D10 00386C70 40 82 00 08 */ bne lbl_80389D18 +/* 80389D14 00386C74 38 09 00 20 */ addi r0, r9, 0x20 +lbl_80389D18: +/* 80389D18 00386C78 2C 05 00 00 */ cmpwi r5, 0 +/* 80389D1C 00386C7C 7C A9 00 34 */ cntlzw r9, r5 +/* 80389D20 00386C80 7C CA 00 34 */ cntlzw r10, r6 +/* 80389D24 00386C84 40 82 00 08 */ bne lbl_80389D2C +/* 80389D28 00386C88 39 2A 00 20 */ addi r9, r10, 0x20 +lbl_80389D2C: +/* 80389D2C 00386C8C 7C 00 48 00 */ cmpw r0, r9 +/* 80389D30 00386C90 21 40 00 40 */ subfic r10, r0, 0x40 +/* 80389D34 00386C94 4D 81 00 20 */ bgtlr +/* 80389D38 00386C98 39 29 00 01 */ addi r9, r9, 1 +/* 80389D3C 00386C9C 21 29 00 40 */ subfic r9, r9, 0x40 +/* 80389D40 00386CA0 7C 00 4A 14 */ add r0, r0, r9 +/* 80389D44 00386CA4 7D 29 50 50 */ subf r9, r9, r10 +/* 80389D48 00386CA8 7D 29 03 A6 */ mtctr r9 +/* 80389D4C 00386CAC 2C 09 00 20 */ cmpwi r9, 0x20 +/* 80389D50 00386CB0 38 E9 FF E0 */ addi r7, r9, -32 +/* 80389D54 00386CB4 41 80 00 10 */ blt lbl_80389D64 +/* 80389D58 00386CB8 7C 68 3C 30 */ srw r8, r3, r7 +/* 80389D5C 00386CBC 38 E0 00 00 */ li r7, 0 +/* 80389D60 00386CC0 48 00 00 18 */ b lbl_80389D78 +lbl_80389D64: +/* 80389D64 00386CC4 7C 88 4C 30 */ srw r8, r4, r9 +/* 80389D68 00386CC8 20 E9 00 20 */ subfic r7, r9, 0x20 +/* 80389D6C 00386CCC 7C 67 38 30 */ slw r7, r3, r7 +/* 80389D70 00386CD0 7D 08 3B 78 */ or r8, r8, r7 +/* 80389D74 00386CD4 7C 67 4C 30 */ srw r7, r3, r9 +lbl_80389D78: +/* 80389D78 00386CD8 2C 00 00 20 */ cmpwi r0, 0x20 +/* 80389D7C 00386CDC 31 20 FF E0 */ addic r9, r0, -32 +/* 80389D80 00386CE0 41 80 00 10 */ blt lbl_80389D90 +/* 80389D84 00386CE4 7C 83 48 30 */ slw r3, r4, r9 +/* 80389D88 00386CE8 38 80 00 00 */ li r4, 0 +/* 80389D8C 00386CEC 48 00 00 18 */ b lbl_80389DA4 +lbl_80389D90: +/* 80389D90 00386CF0 7C 63 00 30 */ slw r3, r3, r0 +/* 80389D94 00386CF4 21 20 00 20 */ subfic r9, r0, 0x20 +/* 80389D98 00386CF8 7C 89 4C 30 */ srw r9, r4, r9 +/* 80389D9C 00386CFC 7C 63 4B 78 */ or r3, r3, r9 +/* 80389DA0 00386D00 7C 84 00 30 */ slw r4, r4, r0 +lbl_80389DA4: +/* 80389DA4 00386D04 39 40 FF FF */ li r10, -1 +/* 80389DA8 00386D08 30 E7 00 00 */ addic r7, r7, 0 +lbl_80389DAC: +/* 80389DAC 00386D0C 7C 84 21 14 */ adde r4, r4, r4 +/* 80389DB0 00386D10 7C 63 19 14 */ adde r3, r3, r3 +/* 80389DB4 00386D14 7D 08 41 14 */ adde r8, r8, r8 +/* 80389DB8 00386D18 7C E7 39 14 */ adde r7, r7, r7 +/* 80389DBC 00386D1C 7C 06 40 10 */ subfc r0, r6, r8 +/* 80389DC0 00386D20 7D 25 39 11 */ subfe. r9, r5, r7 +/* 80389DC4 00386D24 41 80 00 10 */ blt lbl_80389DD4 +/* 80389DC8 00386D28 7C 08 03 78 */ mr r8, r0 +/* 80389DCC 00386D2C 7D 27 4B 78 */ mr r7, r9 +/* 80389DD0 00386D30 30 0A 00 01 */ addic r0, r10, 1 +lbl_80389DD4: +/* 80389DD4 00386D34 42 00 FF D8 */ bdnz lbl_80389DAC +/* 80389DD8 00386D38 7D 04 43 78 */ mr r4, r8 +/* 80389DDC 00386D3C 7C E3 3B 78 */ mr r3, r7 +/* 80389DE0 00386D40 4E 80 00 20 */ blr + +.global sub_80389de4 +sub_80389de4: +/* 80389DE4 00386D44 4E 80 00 20 */ blr + +.global __mod2i +__mod2i: +/* 80389DE8 00386D48 2F 83 00 00 */ cmpwi cr7, r3, 0 +/* 80389DEC 00386D4C 40 9C 00 0C */ bge cr7, lbl_80389DF8 +/* 80389DF0 00386D50 20 84 00 00 */ subfic r4, r4, 0 +/* 80389DF4 00386D54 7C 63 01 90 */ subfze r3, r3 +lbl_80389DF8: +/* 80389DF8 00386D58 2C 05 00 00 */ cmpwi r5, 0 +/* 80389DFC 00386D5C 40 80 00 0C */ bge lbl_80389E08 +/* 80389E00 00386D60 20 C6 00 00 */ subfic r6, r6, 0 +/* 80389E04 00386D64 7C A5 01 90 */ subfze r5, r5 +lbl_80389E08: +/* 80389E08 00386D68 2C 03 00 00 */ cmpwi r3, 0 +/* 80389E0C 00386D6C 7C 60 00 34 */ cntlzw r0, r3 +/* 80389E10 00386D70 7C 89 00 34 */ cntlzw r9, r4 +/* 80389E14 00386D74 40 82 00 08 */ bne lbl_80389E1C +/* 80389E18 00386D78 38 09 00 20 */ addi r0, r9, 0x20 +lbl_80389E1C: +/* 80389E1C 00386D7C 2C 05 00 00 */ cmpwi r5, 0 +/* 80389E20 00386D80 7C A9 00 34 */ cntlzw r9, r5 +/* 80389E24 00386D84 7C CA 00 34 */ cntlzw r10, r6 +/* 80389E28 00386D88 40 82 00 08 */ bne lbl_80389E30 +/* 80389E2C 00386D8C 39 2A 00 20 */ addi r9, r10, 0x20 +lbl_80389E30: +/* 80389E30 00386D90 7C 00 48 00 */ cmpw r0, r9 +/* 80389E34 00386D94 21 40 00 40 */ subfic r10, r0, 0x40 +/* 80389E38 00386D98 41 81 00 AC */ bgt lbl_80389EE4 +/* 80389E3C 00386D9C 39 29 00 01 */ addi r9, r9, 1 +/* 80389E40 00386DA0 21 29 00 40 */ subfic r9, r9, 0x40 +/* 80389E44 00386DA4 7C 00 4A 14 */ add r0, r0, r9 +/* 80389E48 00386DA8 7D 29 50 50 */ subf r9, r9, r10 +/* 80389E4C 00386DAC 7D 29 03 A6 */ mtctr r9 +/* 80389E50 00386DB0 2C 09 00 20 */ cmpwi r9, 0x20 +/* 80389E54 00386DB4 38 E9 FF E0 */ addi r7, r9, -32 +/* 80389E58 00386DB8 41 80 00 10 */ blt lbl_80389E68 +/* 80389E5C 00386DBC 7C 68 3C 30 */ srw r8, r3, r7 +/* 80389E60 00386DC0 38 E0 00 00 */ li r7, 0 +/* 80389E64 00386DC4 48 00 00 18 */ b lbl_80389E7C +lbl_80389E68: +/* 80389E68 00386DC8 7C 88 4C 30 */ srw r8, r4, r9 +/* 80389E6C 00386DCC 20 E9 00 20 */ subfic r7, r9, 0x20 +/* 80389E70 00386DD0 7C 67 38 30 */ slw r7, r3, r7 +/* 80389E74 00386DD4 7D 08 3B 78 */ or r8, r8, r7 +/* 80389E78 00386DD8 7C 67 4C 30 */ srw r7, r3, r9 +lbl_80389E7C: +/* 80389E7C 00386DDC 2C 00 00 20 */ cmpwi r0, 0x20 +/* 80389E80 00386DE0 31 20 FF E0 */ addic r9, r0, -32 +/* 80389E84 00386DE4 41 80 00 10 */ blt lbl_80389E94 +/* 80389E88 00386DE8 7C 83 48 30 */ slw r3, r4, r9 +/* 80389E8C 00386DEC 38 80 00 00 */ li r4, 0 +/* 80389E90 00386DF0 48 00 00 18 */ b lbl_80389EA8 +lbl_80389E94: +/* 80389E94 00386DF4 7C 63 00 30 */ slw r3, r3, r0 +/* 80389E98 00386DF8 21 20 00 20 */ subfic r9, r0, 0x20 +/* 80389E9C 00386DFC 7C 89 4C 30 */ srw r9, r4, r9 +/* 80389EA0 00386E00 7C 63 4B 78 */ or r3, r3, r9 +/* 80389EA4 00386E04 7C 84 00 30 */ slw r4, r4, r0 +lbl_80389EA8: +/* 80389EA8 00386E08 39 40 FF FF */ li r10, -1 +/* 80389EAC 00386E0C 30 E7 00 00 */ addic r7, r7, 0 +lbl_80389EB0: +/* 80389EB0 00386E10 7C 84 21 14 */ adde r4, r4, r4 +/* 80389EB4 00386E14 7C 63 19 14 */ adde r3, r3, r3 +/* 80389EB8 00386E18 7D 08 41 14 */ adde r8, r8, r8 +/* 80389EBC 00386E1C 7C E7 39 14 */ adde r7, r7, r7 +/* 80389EC0 00386E20 7C 06 40 10 */ subfc r0, r6, r8 +/* 80389EC4 00386E24 7D 25 39 11 */ subfe. r9, r5, r7 +/* 80389EC8 00386E28 41 80 00 10 */ blt lbl_80389ED8 +/* 80389ECC 00386E2C 7C 08 03 78 */ mr r8, r0 +/* 80389ED0 00386E30 7D 27 4B 78 */ mr r7, r9 +/* 80389ED4 00386E34 30 0A 00 01 */ addic r0, r10, 1 +lbl_80389ED8: +/* 80389ED8 00386E38 42 00 FF D8 */ bdnz lbl_80389EB0 +/* 80389EDC 00386E3C 7D 04 43 78 */ mr r4, r8 +/* 80389EE0 00386E40 7C E3 3B 78 */ mr r3, r7 +lbl_80389EE4: +/* 80389EE4 00386E44 4C 9C 00 20 */ bgelr cr7 +/* 80389EE8 00386E48 20 84 00 00 */ subfic r4, r4, 0 +/* 80389EEC 00386E4C 7C 63 01 90 */ subfze r3, r3 +/* 80389EF0 00386E50 4E 80 00 20 */ blr + +.global __shl2i +__shl2i: +/* 80389EF4 00386E54 21 05 00 20 */ subfic r8, r5, 0x20 +/* 80389EF8 00386E58 31 25 FF E0 */ addic r9, r5, -32 +/* 80389EFC 00386E5C 7C 63 28 30 */ slw r3, r3, r5 +/* 80389F00 00386E60 7C 8A 44 30 */ srw r10, r4, r8 +/* 80389F04 00386E64 7C 63 53 78 */ or r3, r3, r10 +/* 80389F08 00386E68 7C 8A 48 30 */ slw r10, r4, r9 +/* 80389F0C 00386E6C 7C 63 53 78 */ or r3, r3, r10 +/* 80389F10 00386E70 7C 84 28 30 */ slw r4, r4, r5 +/* 80389F14 00386E74 4E 80 00 20 */ blr + +.global __shr2u +__shr2u: +/* 80389F18 00386E78 21 05 00 20 */ subfic r8, r5, 0x20 +/* 80389F1C 00386E7C 31 25 FF E0 */ addic r9, r5, -32 +/* 80389F20 00386E80 7C 84 2C 30 */ srw r4, r4, r5 +/* 80389F24 00386E84 7C 6A 40 30 */ slw r10, r3, r8 +/* 80389F28 00386E88 7C 84 53 78 */ or r4, r4, r10 +/* 80389F2C 00386E8C 7C 6A 4C 30 */ srw r10, r3, r9 +/* 80389F30 00386E90 7C 84 53 78 */ or r4, r4, r10 +/* 80389F34 00386E94 7C 63 2C 30 */ srw r3, r3, r5 +/* 80389F38 00386E98 4E 80 00 20 */ blr + +.global __shr2i +__shr2i: +/* 80389F3C 00386E9C 21 05 00 20 */ subfic r8, r5, 0x20 +/* 80389F40 00386EA0 35 25 FF E0 */ addic. r9, r5, -32 +/* 80389F44 00386EA4 7C 84 2C 30 */ srw r4, r4, r5 +/* 80389F48 00386EA8 7C 6A 40 30 */ slw r10, r3, r8 +/* 80389F4C 00386EAC 7C 84 53 78 */ or r4, r4, r10 +/* 80389F50 00386EB0 7C 6A 4E 30 */ sraw r10, r3, r9 +/* 80389F54 00386EB4 40 81 00 08 */ ble lbl_80389F5C +/* 80389F58 00386EB8 7C 84 53 78 */ or r4, r4, r10 +lbl_80389F5C: +/* 80389F5C 00386EBC 7C 63 2E 30 */ sraw r3, r3, r5 +/* 80389F60 00386EC0 4E 80 00 20 */ blr + +.global __cvt_sll_flt +__cvt_sll_flt: +/* 80389F64 00386EC4 94 21 FF F0 */ stwu r1, -0x10(r1) +/* 80389F68 00386EC8 54 65 00 01 */ rlwinm. r5, r3, 0, 0, 0 +/* 80389F6C 00386ECC 41 82 00 0C */ beq lbl_80389F78 +/* 80389F70 00386ED0 20 84 00 00 */ subfic r4, r4, 0 +/* 80389F74 00386ED4 7C 63 01 90 */ subfze r3, r3 +lbl_80389F78: +/* 80389F78 00386ED8 7C 67 23 79 */ or. r7, r3, r4 +/* 80389F7C 00386EDC 38 C0 00 00 */ li r6, 0 +/* 80389F80 00386EE0 41 82 00 80 */ beq lbl_8038A000 +/* 80389F84 00386EE4 7C 67 00 34 */ cntlzw r7, r3 +/* 80389F88 00386EE8 7C 88 00 34 */ cntlzw r8, r4 +/* 80389F8C 00386EEC 54 E9 D0 08 */ rlwinm r9, r7, 0x1a, 0, 4 +/* 80389F90 00386EF0 7D 29 FE 70 */ srawi r9, r9, 0x1f +/* 80389F94 00386EF4 7D 29 40 38 */ and r9, r9, r8 +/* 80389F98 00386EF8 7C E7 4A 14 */ add r7, r7, r9 +/* 80389F9C 00386EFC 21 07 00 20 */ subfic r8, r7, 0x20 +/* 80389FA0 00386F00 31 27 FF E0 */ addic r9, r7, -32 +/* 80389FA4 00386F04 7C 63 38 30 */ slw r3, r3, r7 +/* 80389FA8 00386F08 7C 8A 44 30 */ srw r10, r4, r8 +/* 80389FAC 00386F0C 7C 63 53 78 */ or r3, r3, r10 +/* 80389FB0 00386F10 7C 8A 48 30 */ slw r10, r4, r9 +/* 80389FB4 00386F14 7C 63 53 78 */ or r3, r3, r10 +/* 80389FB8 00386F18 7C 84 38 30 */ slw r4, r4, r7 +/* 80389FBC 00386F1C 7C C7 30 50 */ subf r6, r7, r6 +/* 80389FC0 00386F20 54 87 05 7E */ clrlwi r7, r4, 0x15 +/* 80389FC4 00386F24 2C 07 04 00 */ cmpwi r7, 0x400 +/* 80389FC8 00386F28 38 C6 04 3E */ addi r6, r6, 0x43e +/* 80389FCC 00386F2C 41 80 00 1C */ blt lbl_80389FE8 +/* 80389FD0 00386F30 41 81 00 0C */ bgt lbl_80389FDC +/* 80389FD4 00386F34 54 87 05 29 */ rlwinm. r7, r4, 0, 0x14, 0x14 +/* 80389FD8 00386F38 41 82 00 10 */ beq lbl_80389FE8 +lbl_80389FDC: +/* 80389FDC 00386F3C 30 84 08 00 */ addic r4, r4, 0x800 +/* 80389FE0 00386F40 7C 63 01 94 */ addze r3, r3 +/* 80389FE4 00386F44 7C C6 01 94 */ addze r6, r6 +lbl_80389FE8: +/* 80389FE8 00386F48 54 84 A8 3E */ rotlwi r4, r4, 0x15 +/* 80389FEC 00386F4C 50 64 A8 14 */ rlwimi r4, r3, 0x15, 0, 0xa +/* 80389FF0 00386F50 54 63 AB 3E */ rlwinm r3, r3, 0x15, 0xc, 0x1f +/* 80389FF4 00386F54 54 C6 A0 16 */ slwi r6, r6, 0x14 +/* 80389FF8 00386F58 7C C3 1B 78 */ or r3, r6, r3 +/* 80389FFC 00386F5C 7C A3 1B 78 */ or r3, r5, r3 +lbl_8038A000: +/* 8038A000 00386F60 90 61 00 08 */ stw r3, 8(r1) +/* 8038A004 00386F64 90 81 00 0C */ stw r4, 0xc(r1) +/* 8038A008 00386F68 C8 21 00 08 */ lfd f1, 8(r1) +/* 8038A00C 00386F6C FC 20 08 18 */ frsp f1, f1 +/* 8038A010 00386F70 38 21 00 10 */ addi r1, r1, 0x10 +/* 8038A014 00386F74 4E 80 00 20 */ blr + +.global __cvt_dbl_usll +__cvt_dbl_usll: +/* 8038A018 00386F78 94 21 FF F0 */ stwu r1, -0x10(r1) +/* 8038A01C 00386F7C D8 21 00 08 */ stfd f1, 8(r1) +/* 8038A020 00386F80 80 61 00 08 */ lwz r3, 8(r1) +/* 8038A024 00386F84 80 81 00 0C */ lwz r4, 0xc(r1) +/* 8038A028 00386F88 54 65 65 7E */ rlwinm r5, r3, 0xc, 0x15, 0x1f +/* 8038A02C 00386F8C 28 05 03 FF */ cmplwi r5, 0x3ff +/* 8038A030 00386F90 40 80 00 10 */ bge lbl_8038A040 +/* 8038A034 00386F94 38 60 00 00 */ li r3, 0 +/* 8038A038 00386F98 38 80 00 00 */ li r4, 0 +/* 8038A03C 00386F9C 48 00 00 A0 */ b lbl_8038A0DC +lbl_8038A040: +/* 8038A040 00386FA0 7C 66 1B 78 */ mr r6, r3 +/* 8038A044 00386FA4 54 63 03 3E */ clrlwi r3, r3, 0xc +/* 8038A048 00386FA8 64 63 00 10 */ oris r3, r3, 0x10 +/* 8038A04C 00386FAC 38 A5 FB CD */ addi r5, r5, -1075 +/* 8038A050 00386FB0 2C 05 00 00 */ cmpwi r5, 0 +/* 8038A054 00386FB4 40 80 00 2C */ bge lbl_8038A080 +/* 8038A058 00386FB8 7C A5 00 D0 */ neg r5, r5 +/* 8038A05C 00386FBC 21 05 00 20 */ subfic r8, r5, 0x20 +/* 8038A060 00386FC0 31 25 FF E0 */ addic r9, r5, -32 +/* 8038A064 00386FC4 7C 84 2C 30 */ srw r4, r4, r5 +/* 8038A068 00386FC8 7C 6A 40 30 */ slw r10, r3, r8 +/* 8038A06C 00386FCC 7C 84 53 78 */ or r4, r4, r10 +/* 8038A070 00386FD0 7C 6A 4C 30 */ srw r10, r3, r9 +/* 8038A074 00386FD4 7C 84 53 78 */ or r4, r4, r10 +/* 8038A078 00386FD8 7C 63 2C 30 */ srw r3, r3, r5 +/* 8038A07C 00386FDC 48 00 00 50 */ b lbl_8038A0CC +lbl_8038A080: +/* 8038A080 00386FE0 2C 05 00 0A */ cmpwi r5, 0xa +/* 8038A084 00386FE4 40 A1 00 28 */ ble+ lbl_8038A0AC +/* 8038A088 00386FE8 54 C6 00 01 */ rlwinm. r6, r6, 0, 0, 0 +/* 8038A08C 00386FEC 41 82 00 10 */ beq lbl_8038A09C +/* 8038A090 00386FF0 3C 60 80 00 */ lis r3, 0x8000 +/* 8038A094 00386FF4 38 80 00 00 */ li r4, 0 +/* 8038A098 00386FF8 48 00 00 44 */ b lbl_8038A0DC +lbl_8038A09C: +/* 8038A09C 00386FFC 3C 60 7F FF */ lis r3, 0x7FFFFFFF@h +/* 8038A0A0 00387000 60 63 FF FF */ ori r3, r3, 0x7FFFFFFF@l +/* 8038A0A4 00387004 38 80 FF FF */ li r4, -1 +/* 8038A0A8 00387008 48 00 00 34 */ b lbl_8038A0DC +lbl_8038A0AC: +/* 8038A0AC 0038700C 21 05 00 20 */ subfic r8, r5, 0x20 +/* 8038A0B0 00387010 31 25 FF E0 */ addic r9, r5, -32 +/* 8038A0B4 00387014 7C 63 28 30 */ slw r3, r3, r5 +/* 8038A0B8 00387018 7C 8A 44 30 */ srw r10, r4, r8 +/* 8038A0BC 0038701C 7C 63 53 78 */ or r3, r3, r10 +/* 8038A0C0 00387020 7C 8A 48 30 */ slw r10, r4, r9 +/* 8038A0C4 00387024 7C 63 53 78 */ or r3, r3, r10 +/* 8038A0C8 00387028 7C 84 28 30 */ slw r4, r4, r5 +lbl_8038A0CC: +/* 8038A0CC 0038702C 54 C6 00 01 */ rlwinm. r6, r6, 0, 0, 0 +/* 8038A0D0 00387030 41 82 00 0C */ beq lbl_8038A0DC +/* 8038A0D4 00387034 20 84 00 00 */ subfic r4, r4, 0 +/* 8038A0D8 00387038 7C 63 01 90 */ subfze r3, r3 +lbl_8038A0DC: +/* 8038A0DC 0038703C 38 21 00 10 */ addi r1, r1, 0x10 +/* 8038A0E0 00387040 4E 80 00 20 */ blr diff --git a/asm/Runtime/PPCEABI/H/strtold.s b/asm/Runtime/PPCEABI/H/strtold.s index 7a5f57b3..c4efcf3a 100644 --- a/asm/Runtime/PPCEABI/H/strtold.s +++ b/asm/Runtime/PPCEABI/H/strtold.s @@ -1098,7 +1098,7 @@ lbl_803910C4: lbl_803910D0: /* 803910D0 0038E030 B3 81 00 2E */ sth r28, 0x2e(r1) /* 803910D4 0038E034 38 61 00 2C */ addi r3, r1, 0x2c -/* 803910D8 0038E038 4B FF A0 D9 */ bl sub_8038b1b0 +/* 803910D8 0038E038 4B FF A0 D9 */ bl __dec2num /* 803910DC 0038E03C C8 02 CF 88 */ lfd f0, lbl_805AECA8@sda21(r2) /* 803910E0 0038E040 D8 21 00 18 */ stfd f1, 0x18(r1) /* 803910E4 0038E044 FC 00 08 00 */ fcmpu cr0, f0, f1 diff --git a/asm/Runtime/PPCEABI/H/uart_console_io.s b/asm/Runtime/PPCEABI/H/uart_console_io.s index 588105e7..041975c4 100644 --- a/asm/Runtime/PPCEABI/H/uart_console_io.s +++ b/asm/Runtime/PPCEABI/H/uart_console_io.s @@ -2,9 +2,6 @@ .section .text, "ax" -.if 0 -/* THIS DOESN'T WORK???? */ - .global __close_console __close_console: /* 80391274 0038E1D4 38 60 00 00 */ li r3, 0 @@ -65,4 +62,3 @@ lbl_80391320: /* 80391334 0038E294 7C 08 03 A6 */ mtlr r0 /* 80391338 0038E298 38 21 00 20 */ addi r1, r1, 0x20 /* 8039133C 0038E29C 4E 80 00 20 */ blr -.endif diff --git a/asm/Runtime/PPCEABI/H/widechar_io.s b/asm/Runtime/PPCEABI/H/widechar_io.s index b5ce43d5..def7eeb9 100644 --- a/asm/Runtime/PPCEABI/H/widechar_io.s +++ b/asm/Runtime/PPCEABI/H/widechar_io.s @@ -1,72 +1,7 @@ .include "macros.inc" .section .text, "ax" -.if 1 -/* TODO: Move __close_console and __write_console to their own file (uart_console_io), - * they're here to work around a bug with CW - */ -.global __close_console -__close_console: -/* 80391274 0038E1D4 38 60 00 00 */ li r3, 0 -/* 80391278 0038E1D8 4E 80 00 20 */ blr - -.global __write_console -__write_console: -/* 8039127C 0038E1DC 94 21 FF E0 */ stwu r1, -0x20(r1) -/* 80391280 0038E1E0 7C 08 02 A6 */ mflr r0 -/* 80391284 0038E1E4 90 01 00 24 */ stw r0, 0x24(r1) -/* 80391288 0038E1E8 93 E1 00 1C */ stw r31, 0x1c(r1) -/* 8039128C 0038E1EC 7C DF 33 78 */ mr r31, r6 -/* 80391290 0038E1F0 93 C1 00 18 */ stw r30, 0x18(r1) -/* 80391294 0038E1F4 7C BE 2B 78 */ mr r30, r5 -/* 80391298 0038E1F8 93 A1 00 14 */ stw r29, 0x14(r1) -/* 8039129C 0038E1FC 7C 9D 23 78 */ mr r29, r4 -/* 803912A0 0038E200 93 81 00 10 */ stw r28, 0x10(r1) -/* 803912A4 0038E204 7C 7C 1B 78 */ mr r28, r3 -/* 803912A8 0038E208 38 60 00 00 */ li r3, 0 -/* 803912AC 0038E20C 80 0D AE 18 */ lwz r0, lbl_805A99D8@sda21(r13) -/* 803912B0 0038E210 2C 00 00 00 */ cmpwi r0, 0 -/* 803912B4 0038E214 40 82 00 20 */ bne lbl_803912D4 -/* 803912B8 0038E218 3C 60 00 01 */ lis r3, 0x0000E100@ha -/* 803912BC 0038E21C 38 63 E1 00 */ addi r3, r3, 0x0000E100@l -/* 803912C0 0038E220 48 03 06 31 */ bl InitializeUART -/* 803912C4 0038E224 2C 03 00 00 */ cmpwi r3, 0 -/* 803912C8 0038E228 40 82 00 0C */ bne lbl_803912D4 -/* 803912CC 0038E22C 38 00 00 01 */ li r0, 1 -/* 803912D0 0038E230 90 0D AE 18 */ stw r0, lbl_805A99D8@sda21(r13) -lbl_803912D4: -/* 803912D4 0038E234 2C 03 00 00 */ cmpwi r3, 0 -/* 803912D8 0038E238 41 82 00 0C */ beq lbl_803912E4 -/* 803912DC 0038E23C 38 60 00 01 */ li r3, 1 -/* 803912E0 0038E240 48 00 00 40 */ b lbl_80391320 -lbl_803912E4: -/* 803912E4 0038E244 80 9E 00 00 */ lwz r4, 0(r30) -/* 803912E8 0038E248 7F A3 EB 78 */ mr r3, r29 -/* 803912EC 0038E24C 48 03 06 75 */ bl WriteUARTN -/* 803912F0 0038E250 2C 03 00 00 */ cmpwi r3, 0 -/* 803912F4 0038E254 41 82 00 14 */ beq lbl_80391308 -/* 803912F8 0038E258 38 00 00 00 */ li r0, 0 -/* 803912FC 0038E25C 38 60 00 01 */ li r3, 1 -/* 80391300 0038E260 90 1E 00 00 */ stw r0, 0(r30) -/* 80391304 0038E264 48 00 00 1C */ b lbl_80391320 -lbl_80391308: -/* 80391308 0038E268 7F 83 E3 78 */ mr r3, r28 -/* 8039130C 0038E26C 7F A4 EB 78 */ mr r4, r29 -/* 80391310 0038E270 7F C5 F3 78 */ mr r5, r30 -/* 80391314 0038E274 7F E6 FB 78 */ mr r6, r31 -/* 80391318 0038E278 4B C7 23 39 */ bl sub_80003650 -/* 8039131C 0038E27C 38 60 00 00 */ li r3, 0 -lbl_80391320: -/* 80391320 0038E280 80 01 00 24 */ lwz r0, 0x24(r1) -/* 80391324 0038E284 83 E1 00 1C */ lwz r31, 0x1c(r1) -/* 80391328 0038E288 83 C1 00 18 */ lwz r30, 0x18(r1) -/* 8039132C 0038E28C 83 A1 00 14 */ lwz r29, 0x14(r1) -/* 80391330 0038E290 83 81 00 10 */ lwz r28, 0x10(r1) -/* 80391334 0038E294 7C 08 03 A6 */ mtlr r0 -/* 80391338 0038E298 38 21 00 20 */ addi r1, r1, 0x20 -/* 8039133C 0038E29C 4E 80 00 20 */ blr -.endif .global fwide fwide: /* 80391340 0038E2A0 28 03 00 00 */ cmplwi r3, 0 diff --git a/asm/musyx/hw_dolphin.s b/asm/musyx/hw_dolphin.s index 717c1225..1f064f1b 100644 --- a/asm/musyx/hw_dolphin.s +++ b/asm/musyx/hw_dolphin.s @@ -114,7 +114,7 @@ salInitAi: /* 803B4DB8 003B1D18 98 8D AF D0 */ stb r4, lbl_805A9B90@sda21(r13) /* 803B4DBC 003B1D1C 90 0D AF C0 */ stw r0, lbl_805A9B80@sda21(r13) /* 803B4DC0 003B1D20 93 CD AF D4 */ stw r30, lbl_805A9B94@sda21(r13) -/* 803B4DC4 003B1D24 4B FB 81 79 */ bl sub_8036cf3c +/* 803B4DC4 003B1D24 4B FB 81 79 */ bl AIRegisterDMACallback /* 803B4DC8 003B1D28 88 0D AF D0 */ lbz r0, lbl_805A9B90@sda21(r13) /* 803B4DCC 003B1D2C 38 80 02 80 */ li r4, 0x280 /* 803B4DD0 003B1D30 80 6D AF CC */ lwz r3, lbl_805A9B8C@sda21(r13) @@ -157,7 +157,7 @@ salExitAi: /* 803B4E44 003B1DA4 7C 08 02 A6 */ mflr r0 /* 803B4E48 003B1DA8 38 60 00 00 */ li r3, 0 /* 803B4E4C 003B1DAC 90 01 00 14 */ stw r0, 0x14(r1) -/* 803B4E50 003B1DB0 4B FB 80 ED */ bl sub_8036cf3c +/* 803B4E50 003B1DB0 4B FB 80 ED */ bl AIRegisterDMACallback /* 803B4E54 003B1DB4 4B FB 81 CD */ bl AIStopDMA /* 803B4E58 003B1DB8 80 6D AF CC */ lwz r3, lbl_805A9B8C@sda21(r13) /* 803B4E5C 003B1DBC 48 00 03 01 */ bl salFree diff --git a/asm/os/__ppc_eabi_init_text.s b/asm/os/__ppc_eabi_init_text.s new file mode 100644 index 00000000..e19b5c0c --- /dev/null +++ b/asm/os/__ppc_eabi_init_text.s @@ -0,0 +1,53 @@ +.include "macros.inc" + +.section .text, "ax" + +.global __init_user +__init_user: +/* 80385824 00382784 7C 08 02 A6 */ mflr r0 +/* 80385828 00382788 90 01 00 04 */ stw r0, 4(r1) +/* 8038582C 0038278C 94 21 FF F8 */ stwu r1, -8(r1) +/* 80385830 00382790 48 00 00 15 */ bl __init_cpp +/* 80385834 00382794 80 01 00 0C */ lwz r0, 0xc(r1) +/* 80385838 00382798 38 21 00 08 */ addi r1, r1, 8 +/* 8038583C 0038279C 7C 08 03 A6 */ mtlr r0 +/* 80385840 003827A0 4E 80 00 20 */ blr + +.global __init_cpp +__init_cpp: +/* 80385844 003827A4 7C 08 02 A6 */ mflr r0 +/* 80385848 003827A8 90 01 00 04 */ stw r0, 4(r1) +/* 8038584C 003827AC 94 21 FF F0 */ stwu r1, -0x10(r1) +/* 80385850 003827B0 93 E1 00 0C */ stw r31, 0xc(r1) +/* 80385854 003827B4 3C 60 80 3D */ lis r3, __init_cpp_exceptions_reference@ha +/* 80385858 003827B8 38 03 B1 C0 */ addi r0, r3, __init_cpp_exceptions_reference@l +/* 8038585C 003827BC 7C 1F 03 78 */ mr r31, r0 +/* 80385860 003827C0 48 00 00 04 */ b lbl_80385864 +lbl_80385864: +/* 80385864 003827C4 48 00 00 04 */ b lbl_80385868 +lbl_80385868: +/* 80385868 003827C8 48 00 00 10 */ b lbl_80385878 +lbl_8038586C: +/* 8038586C 003827CC 7D 88 03 A6 */ mtlr r12 +/* 80385870 003827D0 4E 80 00 21 */ blrl +/* 80385874 003827D4 3B FF 00 04 */ addi r31, r31, 4 +lbl_80385878: +/* 80385878 003827D8 81 9F 00 00 */ lwz r12, 0(r31) +/* 8038587C 003827DC 28 0C 00 00 */ cmplwi r12, 0 +/* 80385880 003827E0 40 82 FF EC */ bne lbl_8038586C +/* 80385884 003827E4 80 01 00 14 */ lwz r0, 0x14(r1) +/* 80385888 003827E8 83 E1 00 0C */ lwz r31, 0xc(r1) +/* 8038588C 003827EC 38 21 00 10 */ addi r1, r1, 0x10 +/* 80385890 003827F0 7C 08 03 A6 */ mtlr r0 +/* 80385894 003827F4 4E 80 00 20 */ blr + +.global _ExitProcess +_ExitProcess: +/* 80385898 003827F8 7C 08 02 A6 */ mflr r0 +/* 8038589C 003827FC 90 01 00 04 */ stw r0, 4(r1) +/* 803858A0 00382800 94 21 FF F8 */ stwu r1, -8(r1) +/* 803858A4 00382804 4B FE 9F 71 */ bl PPCHalt +/* 803858A8 00382808 80 01 00 0C */ lwz r0, 0xc(r1) +/* 803858AC 0038280C 38 21 00 08 */ addi r1, r1, 8 +/* 803858B0 00382810 7C 08 03 A6 */ mtlr r0 +/* 803858B4 00382814 4E 80 00 20 */ blr diff --git a/asm/text.s.REMOVED.git-id b/asm/text.s.REMOVED.git-id index c8e799fe..1ee2db7f 100644 --- a/asm/text.s.REMOVED.git-id +++ b/asm/text.s.REMOVED.git-id @@ -1 +1 @@ -01ba38ef46688221f69e6b96d1170a971de797f1 \ No newline at end of file +894721b086fa9f3196cc05c25aab80a37ee48e01 \ No newline at end of file diff --git a/ldscript.lcf b/ldscript.lcf index ef8f3e73..700b9aa6 100644 --- a/ldscript.lcf +++ b/ldscript.lcf @@ -39,4 +39,7 @@ FORCEFILES dtors.o extab.o extabindex.o -} \ No newline at end of file + misc_io.o + printf.o + uart_console_io.o +} diff --git a/obj_files.mk b/obj_files.mk index ff2e2aa3..9b619425 100644 --- a/obj_files.mk +++ b/obj_files.mk @@ -5,8 +5,111 @@ INIT_O_FILES :=\ KYOTO_CWD :=\ $(BUILD_DIR)/asm/Kyoto_CWD/main.o + +AI_FILES :=\ + $(BUILD_DIR)/asm/Dolphin/ai.o + +AR_FILES :=\ + $(BUILD_DIR)/asm/Dolphin/AR/ar.o\ + $(BUILD_DIR)/asm/Dolphin/AR/arq.o + +BASE_FILES :=\ + $(BUILD_DIR)/asm/Dolphin/PPCArch.o + +DB_FILES :=\ + $(BUILD_DIR)/asm/Dolphin/db.o + +DSP_FILES :=\ + $(BUILD_DIR)/asm/Dolphin/DSP/dsp.o\ + $(BUILD_DIR)/asm/Dolphin/DSP/dsp_debug.o\ + $(BUILD_DIR)/asm/Dolphin/DSP/dsp_task.o + +DVD_FILES :=\ + $(BUILD_DIR)/asm/Dolphin/DVD/dvdlow.o\ + $(BUILD_DIR)/asm/Dolphin/DVD/dvdfs.o\ + $(BUILD_DIR)/asm/Dolphin/DVD/dvd.o\ + $(BUILD_DIR)/asm/Dolphin/DVD/dvdqueue.o\ + $(BUILD_DIR)/asm/Dolphin/DVD/dvderror.o\ + $(BUILD_DIR)/asm/Dolphin/DVD/dvdidutils.o\ + $(BUILD_DIR)/asm/Dolphin/DVD/dvdfatal.o\ + $(BUILD_DIR)/asm/Dolphin/DVD/fstload.o + +GX_FILES :=\ + $(BUILD_DIR)/asm/Dolphin/GX/GXInit.o\ + $(BUILD_DIR)/asm/Dolphin/GX/GXFifo.o\ + $(BUILD_DIR)/asm/Dolphin/GX/GXAttr.o\ + $(BUILD_DIR)/asm/Dolphin/GX/GXMisc.o\ + $(BUILD_DIR)/asm/Dolphin/GX/GXGeometry.o\ + $(BUILD_DIR)/asm/Dolphin/GX/GXFrameBuf.o\ + $(BUILD_DIR)/asm/Dolphin/GX/GXLight.o\ + $(BUILD_DIR)/asm/Dolphin/GX/GXTexture.o\ + $(BUILD_DIR)/asm/Dolphin/GX/GXBump.o\ + $(BUILD_DIR)/asm/Dolphin/GX/GXTev.o\ + $(BUILD_DIR)/asm/Dolphin/GX/GXPixel.o\ + $(BUILD_DIR)/asm/Dolphin/GX/GXStubs.o\ + $(BUILD_DIR)/asm/Dolphin/GX/GXDisplayList.o\ + $(BUILD_DIR)/asm/Dolphin/GX/GXTransform.o\ + $(BUILD_DIR)/asm/Dolphin/GX/GXPerf.o + +MTX_FILES :=\ + $(BUILD_DIR)/asm/Dolphin/mtx/mtx.o\ + $(BUILD_DIR)/asm/Dolphin/mtx/mtx44vec.o\ + $(BUILD_DIR)/asm/Dolphin/mtx/mtx44.o\ + $(BUILD_DIR)/asm/Dolphin/mtx/vec.o\ + $(BUILD_DIR)/asm/Dolphin/mtx/psmtx.o + +# TODO: Move __ppc_eabi_init_text into the same source files as __ppc_eabi_init +OS_FILES :=\ + $(BUILD_DIR)/asm/Dolphin/OS/OS.o\ + $(BUILD_DIR)/asm/Dolphin/OS/OSAlarm.o\ + $(BUILD_DIR)/asm/Dolphin/OS/OSArena.o\ + $(BUILD_DIR)/asm/Dolphin/OS/OSAudioSystem.o\ + $(BUILD_DIR)/asm/Dolphin/OS/OSCache.o\ + $(BUILD_DIR)/asm/Dolphin/OS/OSContext.o\ + $(BUILD_DIR)/asm/Dolphin/OS/OSError.o\ + $(BUILD_DIR)/asm/Dolphin/OS/OSFatal.o\ + $(BUILD_DIR)/asm/Dolphin/OS/OSFont.o\ + $(BUILD_DIR)/asm/Dolphin/OS/OSInterrupt.o\ + $(BUILD_DIR)/asm/Dolphin/OS/OSLink.o\ + $(BUILD_DIR)/asm/Dolphin/OS/OSMemory.o\ + $(BUILD_DIR)/asm/Dolphin/OS/OSMutex.o\ + $(BUILD_DIR)/asm/Dolphin/OS/OSReboot.o\ + $(BUILD_DIR)/asm/Dolphin/OS/OSReset.o\ + $(BUILD_DIR)/asm/Dolphin/OS/OSResetSW.o\ + $(BUILD_DIR)/asm/Dolphin/OS/OSRtc.o\ + $(BUILD_DIR)/asm/Dolphin/OS/OSSync.o\ + $(BUILD_DIR)/asm/Dolphin/OS/OSThread.o\ + $(BUILD_DIR)/asm/Dolphin/OS/OSTime.o\ + $(BUILD_DIR)/asm/os/__ppc_eabi_init_text.o + + +PAD_FILES :=\ + $(BUILD_DIR)/asm/Dolphin/PAD/PadClamp.o\ + $(BUILD_DIR)/asm/Dolphin/PAD/pad.o + +VI_FILES :=\ + $(BUILD_DIR)/asm/Dolphin/vi.o MSL_PPCEABI_BARE_H :=\ + $(BUILD_DIR)/asm/Runtime/PPCEABI/H/__va_arg.o\ + $(BUILD_DIR)/asm/Runtime/PPCEABI/H/global_destructor_chain.o\ + $(BUILD_DIR)/asm/Runtime/PPCEABI/H/CPlusLibPPC.o\ + $(BUILD_DIR)/asm/Runtime/PPCEABI/H/NMWException.o\ + $(BUILD_DIR)/asm/Runtime/PPCEABI/H/ptmf.o\ + $(BUILD_DIR)/asm/Runtime/PPCEABI/H/runtime.o\ + $(BUILD_DIR)/asm/Runtime/PPCEABI/H/__init_cpp_exceptions.o\ + $(BUILD_DIR)/asm/Runtime/PPCEABI/H/Gecko_ExceptionPPC.o\ + $(BUILD_DIR)/asm/Runtime/PPCEABI/H/abort_exit.o\ + $(BUILD_DIR)/asm/Runtime/PPCEABI/H/alloc.o\ + $(BUILD_DIR)/asm/Runtime/PPCEABI/H/ansi_files.o\ + $(BUILD_DIR)/asm/Runtime/PPCEABI/H/ansi_fp.o\ + $(BUILD_DIR)/asm/Runtime/PPCEABI/H/arith.o\ + $(BUILD_DIR)/asm/Runtime/PPCEABI/H/buffer_io.o\ + $(BUILD_DIR)/asm/Runtime/PPCEABI/H/ctype.o\ + $(BUILD_DIR)/asm/Runtime/PPCEABI/H/direct_io.o\ + $(BUILD_DIR)/asm/Runtime/PPCEABI/H/file_io.o\ + $(BUILD_DIR)/asm/Runtime/PPCEABI/H/FILE_POS.o\ + $(BUILD_DIR)/asm/Runtime/PPCEABI/H/mbstring.o\ $(BUILD_DIR)/asm/Runtime/PPCEABI/H/mem.o\ $(BUILD_DIR)/asm/Runtime/PPCEABI/H/mem_funcs.o\ $(BUILD_DIR)/asm/Runtime/PPCEABI/H/misc_io.o\ @@ -102,22 +205,22 @@ CARD_FILES :=\ $(BUILD_DIR)/asm/Dolphin/CARD/CARDNet.o SI_FILES :=\ - $(BUILD_DIR)/asm/Dolphin/SIBios.o\ - $(BUILD_DIR)/asm/Dolphin/SISamplingRate.o + $(BUILD_DIR)/asm/Dolphin/SI/SIBios.o\ + $(BUILD_DIR)/asm/Dolphin/SI/SISamplingRate.o EXI_FILES :=\ - $(BUILD_DIR)/asm/Dolphin/EXIBios.o\ - $(BUILD_DIR)/asm/Dolphin/EXIUart.o + $(BUILD_DIR)/asm/Dolphin/EXI/EXIBios.o\ + $(BUILD_DIR)/asm/Dolphin/EXI/EXIUart.o THP_FILES :=\ - $(BUILD_DIR)/asm/Dolphin/THPDec.o\ - $(BUILD_DIR)/asm/Dolphin/THPAudio.o + $(BUILD_DIR)/asm/Dolphin/THP/THPDec.o\ + $(BUILD_DIR)/asm/Dolphin/THP/THPAudio.o GBA_FILES :=\ - $(BUILD_DIR)/asm/Dolphin/GBA.o\ - $(BUILD_DIR)/asm/Dolphin/GBARead.o\ - $(BUILD_DIR)/asm/Dolphin/GBAWrite.o\ - $(BUILD_DIR)/asm/Dolphin/GBAXfer.o + $(BUILD_DIR)/asm/Dolphin/GBA/GBA.o\ + $(BUILD_DIR)/asm/Dolphin/GBA/GBARead.o\ + $(BUILD_DIR)/asm/Dolphin/GBA/GBAWrite.o\ + $(BUILD_DIR)/asm/Dolphin/GBA/GBAXfer.o TEXT_O_FILES :=\ $(BUILD_DIR)/asm/text.o