From f2eabdb6257c09cf2890dac5e9737912728542af Mon Sep 17 00:00:00 2001 From: mrb0nk500 Date: Thu, 2 Feb 2023 17:29:19 -0400 Subject: global: Add rest of Dolphin SDK proper, add MSL, and MetroTRK Finally, it links properly. --- asm/Dolphin/gd/GDBase.s | 121 ++ asm/Dolphin/gd/GDGeometry.s | 1573 ++++++++++++++ asm/Dolphin/gd/GDLight.s | 1125 ++++++++++ asm/Dolphin/gd/GDPixel.s | 450 ++++ asm/Dolphin/gd/GDTev.s | 677 ++++++ asm/Dolphin/gd/GDTransform.s | 259 +++ asm/Dolphin/gx/GXAttr.s | 2086 +++++++++++++++++++ asm/Dolphin/gx/GXBump.s | 501 +++++ asm/Dolphin/gx/GXDisplayList.s | 35 + asm/Dolphin/gx/GXDraw.s | 560 +++++ asm/Dolphin/gx/GXFifo.s | 577 ++++++ asm/Dolphin/gx/GXFrameBuf.s | 1044 ++++++++++ asm/Dolphin/gx/GXGeometry.s | 298 +++ asm/Dolphin/gx/GXInit.s | 1184 +++++++++++ asm/Dolphin/gx/GXLight.s | 653 ++++++ asm/Dolphin/gx/GXMisc.s | 499 +++++ asm/Dolphin/gx/GXPerf.s | 748 +++++++ asm/Dolphin/gx/GXPixel.s | 551 +++++ asm/Dolphin/gx/GXStubs.s | 6 + asm/Dolphin/gx/GXTev.s | 752 +++++++ asm/Dolphin/gx/GXTexture.s | 1431 +++++++++++++ asm/Dolphin/gx/GXTransform.s | 608 ++++++ asm/Dolphin/vi/vi.s | 2054 +++++++++++++++++++ asm/MSL_C.PPCEABI.bare.H/ansi_fp.s | 343 ++++ asm/MSL_C.PPCEABI.bare.H/common_float_tables.s | 338 +++ .../critical_regions.ppc_eabi.s | 6 + asm/MSL_C.PPCEABI.bare.H/exponentialsf.s | 762 +++++++ asm/MSL_C.PPCEABI.bare.H/inverse_trig.s | 345 ++++ asm/MSL_C.PPCEABI.bare.H/printf.s | 2156 ++++++++++++++++++++ asm/MSL_C.PPCEABI.bare.H/scanf.s | 49 + asm/MSL_C.PPCEABI.bare.H/strtoul.s | 387 ++++ asm/MSL_C.PPCEABI.bare.H/trigf.s | 314 +++ asm/MSL_C.PPCEABI.bare.H/uart_console_io.s | 123 ++ asm/OdemuExi2/DebuggerDriver.s | 779 +++++++ asm/Runtime/ExceptionPPC.s | 45 + asm/TRK_MINNOW_DOLPHIN/__exception.s | 2007 ++++++++++++++++++ asm/TRK_MINNOW_DOLPHIN/dispatch.s | 90 + asm/TRK_MINNOW_DOLPHIN/dolphin_trk.s | 206 ++ asm/TRK_MINNOW_DOLPHIN/dolphin_trk_glue.s | 271 +++ asm/TRK_MINNOW_DOLPHIN/flush_cache.s | 20 + asm/TRK_MINNOW_DOLPHIN/main_TRK.s | 28 + asm/TRK_MINNOW_DOLPHIN/mainloop.s | 116 ++ asm/TRK_MINNOW_DOLPHIN/mem_TRK.s | 93 + asm/TRK_MINNOW_DOLPHIN/mpc_7xx_603e.s | 239 +++ asm/TRK_MINNOW_DOLPHIN/msg.s | 15 + asm/TRK_MINNOW_DOLPHIN/msgbuf.s | 643 ++++++ asm/TRK_MINNOW_DOLPHIN/msghndlr.s | 1434 +++++++++++++ asm/TRK_MINNOW_DOLPHIN/mutex_TRK.s | 17 + asm/TRK_MINNOW_DOLPHIN/notify.s | 65 + asm/TRK_MINNOW_DOLPHIN/nubevent.s | 181 ++ asm/TRK_MINNOW_DOLPHIN/nubinit.s | 136 ++ asm/TRK_MINNOW_DOLPHIN/serpoll.s | 149 ++ asm/TRK_MINNOW_DOLPHIN/support.s | 337 +++ asm/TRK_MINNOW_DOLPHIN/targcont.s | 18 + asm/TRK_MINNOW_DOLPHIN/targimpl.s | 1678 +++++++++++++++ asm/TRK_MINNOW_DOLPHIN/usr_put.s | 6 + asm/amcstubs/AmcExi2Stubs.s | 38 + asm/odenotstub/odenotstub.s | 7 + include/MetroTRK/dolphin_trk.h | 8 + include/MetroTRK/intrinsics.h | 12 + include/MetroTRK/mem_TRK.h | 10 + include/Runtime/platform.h | 159 ++ include/global_types.h | 92 + include/libc/stdbool.h | 16 + include/placeholder.h | 9 + obj_files.mk | 69 +- src/Dolphin/dvd/dvd.c | 8 + src/Dolphin/vi/vi.c | 0 src/MSL_C.PPCEABI.bare.H/CPlusLibPPC.cpp | 25 + src/MSL_C.PPCEABI.bare.H/FILE_POS.c | 102 + src/MSL_C.PPCEABI.bare.H/MWCPlusLib.h | 15 + src/MSL_C.PPCEABI.bare.H/abort_exit.c | 38 + src/MSL_C.PPCEABI.bare.H/alloc.c | 7 + src/MSL_C.PPCEABI.bare.H/ansi_files.c | 119 ++ src/MSL_C.PPCEABI.bare.H/arith.c | 15 + src/MSL_C.PPCEABI.bare.H/buffer_io.c | 43 + src/MSL_C.PPCEABI.bare.H/ctype.c | 69 + src/MSL_C.PPCEABI.bare.H/direct_io.c | 114 ++ src/MSL_C.PPCEABI.bare.H/e_acos.c | 107 + src/MSL_C.PPCEABI.bare.H/e_asin.c | 115 ++ src/MSL_C.PPCEABI.bare.H/e_atan2.c | 143 ++ src/MSL_C.PPCEABI.bare.H/e_exp.c | 162 ++ src/MSL_C.PPCEABI.bare.H/e_fmod.c | 167 ++ src/MSL_C.PPCEABI.bare.H/e_log.c | 158 ++ src/MSL_C.PPCEABI.bare.H/e_pow.c | 353 ++++ src/MSL_C.PPCEABI.bare.H/e_rem_pio2.c | 184 ++ src/MSL_C.PPCEABI.bare.H/errno.c | 3 + src/MSL_C.PPCEABI.bare.H/fdlibm.h | 149 ++ src/MSL_C.PPCEABI.bare.H/file_io.c | 70 + src/MSL_C.PPCEABI.bare.H/float.c | 17 + src/MSL_C.PPCEABI.bare.H/hyperbolicsf.c | 1 + src/MSL_C.PPCEABI.bare.H/k_cos.c | 92 + src/MSL_C.PPCEABI.bare.H/k_rem_pio2.c | 349 ++++ src/MSL_C.PPCEABI.bare.H/k_sin.c | 79 + src/MSL_C.PPCEABI.bare.H/k_tan.c | 134 ++ src/MSL_C.PPCEABI.bare.H/locale.c | 33 + src/MSL_C.PPCEABI.bare.H/math_ppc.c | 2 + src/MSL_C.PPCEABI.bare.H/mbstring.c | 115 ++ src/MSL_C.PPCEABI.bare.H/mem.c | 70 + src/MSL_C.PPCEABI.bare.H/mem_funcs.c | 235 +++ src/MSL_C.PPCEABI.bare.H/misc_io.c | 4 + src/MSL_C.PPCEABI.bare.H/qsort.c | 76 + src/MSL_C.PPCEABI.bare.H/rand.c | 10 + src/MSL_C.PPCEABI.bare.H/s_atan.c | 142 ++ src/MSL_C.PPCEABI.bare.H/s_copysign.c | 30 + src/MSL_C.PPCEABI.bare.H/s_cos.c | 75 + src/MSL_C.PPCEABI.bare.H/s_floor.c | 87 + src/MSL_C.PPCEABI.bare.H/s_frexp.c | 57 + src/MSL_C.PPCEABI.bare.H/s_ldexp.c | 54 + src/MSL_C.PPCEABI.bare.H/s_modf.c | 79 + src/MSL_C.PPCEABI.bare.H/s_nextafter.c | 88 + src/MSL_C.PPCEABI.bare.H/s_sin.c | 84 + src/MSL_C.PPCEABI.bare.H/s_tan.c | 73 + src/MSL_C.PPCEABI.bare.H/sscanf.c | 26 + src/MSL_C.PPCEABI.bare.H/string.c | 201 ++ src/MSL_C.PPCEABI.bare.H/uart_console_io.c | 34 + src/MSL_C.PPCEABI.bare.H/w_acos.c | 39 + src/MSL_C.PPCEABI.bare.H/w_asin.c | 40 + src/MSL_C.PPCEABI.bare.H/w_atan2.c | 40 + src/MSL_C.PPCEABI.bare.H/w_exp.c | 49 + src/MSL_C.PPCEABI.bare.H/w_fmod.c | 38 + src/MSL_C.PPCEABI.bare.H/w_log.c | 38 + src/MSL_C.PPCEABI.bare.H/w_pow.c | 58 + src/MSL_C.PPCEABI.bare.H/wchar_io.c | 28 + src/Runtime/NMWException.cpp | 49 + src/Runtime/NMWException.h | 16 - src/Runtime/__mem.c | 85 + src/Runtime/__va_arg.c | 57 + src/Runtime/abort_exit.c | 17 - src/Runtime/global_destructor_chain.c | 36 +- src/Runtime/ptmf.c | 45 + src/Runtime/runtime.c | 842 ++++++++ 132 files changed, 37445 insertions(+), 53 deletions(-) create mode 100644 asm/Dolphin/gd/GDBase.s create mode 100644 asm/Dolphin/gd/GDGeometry.s create mode 100644 asm/Dolphin/gd/GDLight.s create mode 100644 asm/Dolphin/gd/GDPixel.s create mode 100644 asm/Dolphin/gd/GDTev.s create mode 100644 asm/Dolphin/gd/GDTransform.s 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/GXDraw.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/vi/vi.s create mode 100644 asm/MSL_C.PPCEABI.bare.H/ansi_fp.s create mode 100644 asm/MSL_C.PPCEABI.bare.H/common_float_tables.s create mode 100644 asm/MSL_C.PPCEABI.bare.H/critical_regions.ppc_eabi.s create mode 100644 asm/MSL_C.PPCEABI.bare.H/exponentialsf.s create mode 100644 asm/MSL_C.PPCEABI.bare.H/inverse_trig.s create mode 100644 asm/MSL_C.PPCEABI.bare.H/printf.s create mode 100644 asm/MSL_C.PPCEABI.bare.H/scanf.s create mode 100644 asm/MSL_C.PPCEABI.bare.H/strtoul.s create mode 100644 asm/MSL_C.PPCEABI.bare.H/trigf.s create mode 100644 asm/MSL_C.PPCEABI.bare.H/uart_console_io.s create mode 100644 asm/OdemuExi2/DebuggerDriver.s create mode 100644 asm/Runtime/ExceptionPPC.s create mode 100644 asm/TRK_MINNOW_DOLPHIN/__exception.s create mode 100644 asm/TRK_MINNOW_DOLPHIN/dispatch.s create mode 100644 asm/TRK_MINNOW_DOLPHIN/dolphin_trk.s create mode 100644 asm/TRK_MINNOW_DOLPHIN/dolphin_trk_glue.s create mode 100644 asm/TRK_MINNOW_DOLPHIN/flush_cache.s create mode 100644 asm/TRK_MINNOW_DOLPHIN/main_TRK.s create mode 100644 asm/TRK_MINNOW_DOLPHIN/mainloop.s create mode 100644 asm/TRK_MINNOW_DOLPHIN/mem_TRK.s create mode 100644 asm/TRK_MINNOW_DOLPHIN/mpc_7xx_603e.s create mode 100644 asm/TRK_MINNOW_DOLPHIN/msg.s create mode 100644 asm/TRK_MINNOW_DOLPHIN/msgbuf.s create mode 100644 asm/TRK_MINNOW_DOLPHIN/msghndlr.s create mode 100644 asm/TRK_MINNOW_DOLPHIN/mutex_TRK.s create mode 100644 asm/TRK_MINNOW_DOLPHIN/notify.s create mode 100644 asm/TRK_MINNOW_DOLPHIN/nubevent.s create mode 100644 asm/TRK_MINNOW_DOLPHIN/nubinit.s create mode 100644 asm/TRK_MINNOW_DOLPHIN/serpoll.s create mode 100644 asm/TRK_MINNOW_DOLPHIN/support.s create mode 100644 asm/TRK_MINNOW_DOLPHIN/targcont.s create mode 100644 asm/TRK_MINNOW_DOLPHIN/targimpl.s create mode 100644 asm/TRK_MINNOW_DOLPHIN/usr_put.s create mode 100644 asm/amcstubs/AmcExi2Stubs.s create mode 100644 asm/odenotstub/odenotstub.s create mode 100644 include/MetroTRK/dolphin_trk.h create mode 100644 include/MetroTRK/intrinsics.h create mode 100644 include/MetroTRK/mem_TRK.h create mode 100644 include/Runtime/platform.h create mode 100644 include/global_types.h create mode 100644 include/libc/stdbool.h create mode 100644 include/placeholder.h create mode 100644 src/Dolphin/vi/vi.c create mode 100644 src/MSL_C.PPCEABI.bare.H/CPlusLibPPC.cpp create mode 100644 src/MSL_C.PPCEABI.bare.H/FILE_POS.c create mode 100644 src/MSL_C.PPCEABI.bare.H/MWCPlusLib.h create mode 100644 src/MSL_C.PPCEABI.bare.H/abort_exit.c create mode 100644 src/MSL_C.PPCEABI.bare.H/alloc.c create mode 100644 src/MSL_C.PPCEABI.bare.H/ansi_files.c create mode 100644 src/MSL_C.PPCEABI.bare.H/arith.c create mode 100644 src/MSL_C.PPCEABI.bare.H/buffer_io.c create mode 100644 src/MSL_C.PPCEABI.bare.H/ctype.c create mode 100644 src/MSL_C.PPCEABI.bare.H/direct_io.c create mode 100644 src/MSL_C.PPCEABI.bare.H/e_acos.c create mode 100644 src/MSL_C.PPCEABI.bare.H/e_asin.c create mode 100644 src/MSL_C.PPCEABI.bare.H/e_atan2.c create mode 100644 src/MSL_C.PPCEABI.bare.H/e_exp.c create mode 100644 src/MSL_C.PPCEABI.bare.H/e_fmod.c create mode 100644 src/MSL_C.PPCEABI.bare.H/e_log.c create mode 100644 src/MSL_C.PPCEABI.bare.H/e_pow.c create mode 100644 src/MSL_C.PPCEABI.bare.H/e_rem_pio2.c create mode 100644 src/MSL_C.PPCEABI.bare.H/errno.c create mode 100644 src/MSL_C.PPCEABI.bare.H/fdlibm.h create mode 100644 src/MSL_C.PPCEABI.bare.H/file_io.c create mode 100644 src/MSL_C.PPCEABI.bare.H/float.c create mode 100644 src/MSL_C.PPCEABI.bare.H/hyperbolicsf.c create mode 100644 src/MSL_C.PPCEABI.bare.H/k_cos.c create mode 100644 src/MSL_C.PPCEABI.bare.H/k_rem_pio2.c create mode 100644 src/MSL_C.PPCEABI.bare.H/k_sin.c create mode 100644 src/MSL_C.PPCEABI.bare.H/k_tan.c create mode 100644 src/MSL_C.PPCEABI.bare.H/locale.c create mode 100644 src/MSL_C.PPCEABI.bare.H/math_ppc.c create mode 100644 src/MSL_C.PPCEABI.bare.H/mbstring.c create mode 100644 src/MSL_C.PPCEABI.bare.H/mem.c create mode 100644 src/MSL_C.PPCEABI.bare.H/mem_funcs.c create mode 100644 src/MSL_C.PPCEABI.bare.H/misc_io.c create mode 100644 src/MSL_C.PPCEABI.bare.H/qsort.c create mode 100644 src/MSL_C.PPCEABI.bare.H/rand.c create mode 100644 src/MSL_C.PPCEABI.bare.H/s_atan.c create mode 100644 src/MSL_C.PPCEABI.bare.H/s_copysign.c create mode 100644 src/MSL_C.PPCEABI.bare.H/s_cos.c create mode 100644 src/MSL_C.PPCEABI.bare.H/s_floor.c create mode 100644 src/MSL_C.PPCEABI.bare.H/s_frexp.c create mode 100644 src/MSL_C.PPCEABI.bare.H/s_ldexp.c create mode 100644 src/MSL_C.PPCEABI.bare.H/s_modf.c create mode 100644 src/MSL_C.PPCEABI.bare.H/s_nextafter.c create mode 100644 src/MSL_C.PPCEABI.bare.H/s_sin.c create mode 100644 src/MSL_C.PPCEABI.bare.H/s_tan.c create mode 100644 src/MSL_C.PPCEABI.bare.H/sscanf.c create mode 100644 src/MSL_C.PPCEABI.bare.H/string.c create mode 100644 src/MSL_C.PPCEABI.bare.H/uart_console_io.c create mode 100644 src/MSL_C.PPCEABI.bare.H/w_acos.c create mode 100644 src/MSL_C.PPCEABI.bare.H/w_asin.c create mode 100644 src/MSL_C.PPCEABI.bare.H/w_atan2.c create mode 100644 src/MSL_C.PPCEABI.bare.H/w_exp.c create mode 100644 src/MSL_C.PPCEABI.bare.H/w_fmod.c create mode 100644 src/MSL_C.PPCEABI.bare.H/w_log.c create mode 100644 src/MSL_C.PPCEABI.bare.H/w_pow.c create mode 100644 src/MSL_C.PPCEABI.bare.H/wchar_io.c create mode 100644 src/Runtime/NMWException.cpp delete mode 100644 src/Runtime/NMWException.h create mode 100644 src/Runtime/__mem.c create mode 100644 src/Runtime/__va_arg.c delete mode 100644 src/Runtime/abort_exit.c create mode 100644 src/Runtime/ptmf.c create mode 100644 src/Runtime/runtime.c diff --git a/asm/Dolphin/gd/GDBase.s b/asm/Dolphin/gd/GDBase.s new file mode 100644 index 0000000..4066b98 --- /dev/null +++ b/asm/Dolphin/gd/GDBase.s @@ -0,0 +1,121 @@ +.include "macros.inc" + +.section .text, "ax" # 0x80005600 - 0x8036FBA0 +.global GDInitGDLObj +GDInitGDLObj: +/* 800AF018 000ABF58 90 83 00 00 */ stw r4, 0(r3) +/* 800AF01C 000ABF5C 7C 04 2A 14 */ add r0, r4, r5 +/* 800AF020 000ABF60 90 83 00 08 */ stw r4, 8(r3) +/* 800AF024 000ABF64 90 03 00 0C */ stw r0, 0xc(r3) +/* 800AF028 000ABF68 90 A3 00 04 */ stw r5, 4(r3) +/* 800AF02C 000ABF6C 4E 80 00 20 */ blr + +.global GDFlushCurrToMem +GDFlushCurrToMem: +/* 800AF030 000ABF70 7C 08 02 A6 */ mflr r0 +/* 800AF034 000ABF74 90 01 00 04 */ stw r0, 4(r1) +/* 800AF038 000ABF78 94 21 FF F8 */ stwu r1, -8(r1) +/* 800AF03C 000ABF7C 80 8D 95 B8 */ lwz r4, __GDCurrentDL@sda21(r13) +/* 800AF040 000ABF80 80 64 00 00 */ lwz r3, 0(r4) +/* 800AF044 000ABF84 80 84 00 04 */ lwz r4, 4(r4) +/* 800AF048 000ABF88 4B FD EF 65 */ bl DCFlushRange +/* 800AF04C 000ABF8C 80 01 00 0C */ lwz r0, 0xc(r1) +/* 800AF050 000ABF90 38 21 00 08 */ addi r1, r1, 8 +/* 800AF054 000ABF94 7C 08 03 A6 */ mtlr r0 +/* 800AF058 000ABF98 4E 80 00 20 */ blr + +.global GDPadCurr32 +GDPadCurr32: +/* 800AF05C 000ABF9C 80 6D 95 B8 */ lwz r3, __GDCurrentDL@sda21(r13) +/* 800AF060 000ABFA0 80 03 00 08 */ lwz r0, 8(r3) +/* 800AF064 000ABFA4 54 00 06 FF */ clrlwi. r0, r0, 0x1b +/* 800AF068 000ABFA8 4D 82 00 20 */ beqlr +/* 800AF06C 000ABFAC 28 00 00 20 */ cmplwi r0, 0x20 +/* 800AF070 000ABFB0 20 60 00 20 */ subfic r3, r0, 0x20 +/* 800AF074 000ABFB4 38 C0 00 00 */ li r6, 0 +/* 800AF078 000ABFB8 4C 80 00 20 */ bgelr +/* 800AF07C 000ABFBC 54 60 E8 FF */ rlwinm. r0, r3, 0x1d, 3, 0x1f +/* 800AF080 000ABFC0 7C 09 03 A6 */ mtctr r0 +/* 800AF084 000ABFC4 41 82 00 B0 */ beq lbl_800AF134 +lbl_800AF088: +/* 800AF088 000ABFC8 80 AD 95 B8 */ lwz r5, __GDCurrentDL@sda21(r13) +/* 800AF08C 000ABFCC 80 85 00 08 */ lwz r4, 8(r5) +/* 800AF090 000ABFD0 38 04 00 01 */ addi r0, r4, 1 +/* 800AF094 000ABFD4 90 05 00 08 */ stw r0, 8(r5) +/* 800AF098 000ABFD8 98 C4 00 00 */ stb r6, 0(r4) +/* 800AF09C 000ABFDC 80 AD 95 B8 */ lwz r5, __GDCurrentDL@sda21(r13) +/* 800AF0A0 000ABFE0 80 85 00 08 */ lwz r4, 8(r5) +/* 800AF0A4 000ABFE4 38 04 00 01 */ addi r0, r4, 1 +/* 800AF0A8 000ABFE8 90 05 00 08 */ stw r0, 8(r5) +/* 800AF0AC 000ABFEC 98 C4 00 00 */ stb r6, 0(r4) +/* 800AF0B0 000ABFF0 80 AD 95 B8 */ lwz r5, __GDCurrentDL@sda21(r13) +/* 800AF0B4 000ABFF4 80 85 00 08 */ lwz r4, 8(r5) +/* 800AF0B8 000ABFF8 38 04 00 01 */ addi r0, r4, 1 +/* 800AF0BC 000ABFFC 90 05 00 08 */ stw r0, 8(r5) +/* 800AF0C0 000AC000 98 C4 00 00 */ stb r6, 0(r4) +/* 800AF0C4 000AC004 80 AD 95 B8 */ lwz r5, __GDCurrentDL@sda21(r13) +/* 800AF0C8 000AC008 80 85 00 08 */ lwz r4, 8(r5) +/* 800AF0CC 000AC00C 38 04 00 01 */ addi r0, r4, 1 +/* 800AF0D0 000AC010 90 05 00 08 */ stw r0, 8(r5) +/* 800AF0D4 000AC014 98 C4 00 00 */ stb r6, 0(r4) +/* 800AF0D8 000AC018 80 AD 95 B8 */ lwz r5, __GDCurrentDL@sda21(r13) +/* 800AF0DC 000AC01C 80 85 00 08 */ lwz r4, 8(r5) +/* 800AF0E0 000AC020 38 04 00 01 */ addi r0, r4, 1 +/* 800AF0E4 000AC024 90 05 00 08 */ stw r0, 8(r5) +/* 800AF0E8 000AC028 98 C4 00 00 */ stb r6, 0(r4) +/* 800AF0EC 000AC02C 80 AD 95 B8 */ lwz r5, __GDCurrentDL@sda21(r13) +/* 800AF0F0 000AC030 80 85 00 08 */ lwz r4, 8(r5) +/* 800AF0F4 000AC034 38 04 00 01 */ addi r0, r4, 1 +/* 800AF0F8 000AC038 90 05 00 08 */ stw r0, 8(r5) +/* 800AF0FC 000AC03C 98 C4 00 00 */ stb r6, 0(r4) +/* 800AF100 000AC040 80 AD 95 B8 */ lwz r5, __GDCurrentDL@sda21(r13) +/* 800AF104 000AC044 80 85 00 08 */ lwz r4, 8(r5) +/* 800AF108 000AC048 38 04 00 01 */ addi r0, r4, 1 +/* 800AF10C 000AC04C 90 05 00 08 */ stw r0, 8(r5) +/* 800AF110 000AC050 98 C4 00 00 */ stb r6, 0(r4) +/* 800AF114 000AC054 80 AD 95 B8 */ lwz r5, __GDCurrentDL@sda21(r13) +/* 800AF118 000AC058 80 85 00 08 */ lwz r4, 8(r5) +/* 800AF11C 000AC05C 38 04 00 01 */ addi r0, r4, 1 +/* 800AF120 000AC060 90 05 00 08 */ stw r0, 8(r5) +/* 800AF124 000AC064 98 C4 00 00 */ stb r6, 0(r4) +/* 800AF128 000AC068 42 00 FF 60 */ bdnz lbl_800AF088 +/* 800AF12C 000AC06C 70 63 00 07 */ andi. r3, r3, 7 +/* 800AF130 000AC070 4D 82 00 20 */ beqlr +lbl_800AF134: +/* 800AF134 000AC074 7C 69 03 A6 */ mtctr r3 +lbl_800AF138: +/* 800AF138 000AC078 80 AD 95 B8 */ lwz r5, __GDCurrentDL@sda21(r13) +/* 800AF13C 000AC07C 80 85 00 08 */ lwz r4, 8(r5) +/* 800AF140 000AC080 38 04 00 01 */ addi r0, r4, 1 +/* 800AF144 000AC084 90 05 00 08 */ stw r0, 8(r5) +/* 800AF148 000AC088 98 C4 00 00 */ stb r6, 0(r4) +/* 800AF14C 000AC08C 42 00 FF EC */ bdnz lbl_800AF138 +/* 800AF150 000AC090 4E 80 00 20 */ blr + +.global GDOverflowed +GDOverflowed: +/* 800AF154 000AC094 7C 08 02 A6 */ mflr r0 +/* 800AF158 000AC098 90 01 00 04 */ stw r0, 4(r1) +/* 800AF15C 000AC09C 94 21 FF F8 */ stwu r1, -8(r1) +/* 800AF160 000AC0A0 81 8D 95 BC */ lwz r12, overflowcb@sda21(r13) +/* 800AF164 000AC0A4 28 0C 00 00 */ cmplwi r12, 0 +/* 800AF168 000AC0A8 41 82 00 0C */ beq lbl_800AF174 +/* 800AF16C 000AC0AC 7D 88 03 A6 */ mtlr r12 +/* 800AF170 000AC0B0 4E 80 00 21 */ blrl +lbl_800AF174: +/* 800AF174 000AC0B4 80 01 00 0C */ lwz r0, 0xc(r1) +/* 800AF178 000AC0B8 38 21 00 08 */ addi r1, r1, 8 +/* 800AF17C 000AC0BC 7C 08 03 A6 */ mtlr r0 +/* 800AF180 000AC0C0 4E 80 00 20 */ blr + +.global GDSetOverflowCallback +GDSetOverflowCallback: +/* 800AF184 000AC0C4 90 6D 95 BC */ stw r3, overflowcb@sda21(r13) +/* 800AF188 000AC0C8 4E 80 00 20 */ blr + +.section .sbss, "wa" # 0x804097C0 - 0x8040B45C +.global __GDCurrentDL +__GDCurrentDL: + .skip 0x4 +overflowcb: + .skip 0x4 diff --git a/asm/Dolphin/gd/GDGeometry.s b/asm/Dolphin/gd/GDGeometry.s new file mode 100644 index 0000000..e46effa --- /dev/null +++ b/asm/Dolphin/gd/GDGeometry.s @@ -0,0 +1,1573 @@ +.include "macros.inc" + +.section .text, "ax" # 0x80005600 - 0x8036FBA0 +.global GDSetVtxDescv +GDSetVtxDescv: +/* 800AF18C 000AC0CC 7C 08 02 A6 */ mflr r0 +/* 800AF190 000AC0D0 3C 80 80 3B */ lis r4, "@121"@ha +/* 800AF194 000AC0D4 90 01 00 04 */ stw r0, 4(r1) +/* 800AF198 000AC0D8 38 84 1C 48 */ addi r4, r4, "@121"@l +/* 800AF19C 000AC0DC 94 21 FF A8 */ stwu r1, -0x58(r1) +/* 800AF1A0 000AC0E0 BD E1 00 14 */ stmw r15, 0x14(r1) +/* 800AF1A4 000AC0E4 3B E0 00 00 */ li r31, 0 +/* 800AF1A8 000AC0E8 3B C0 00 00 */ li r30, 0 +/* 800AF1AC 000AC0EC 3B A0 00 00 */ li r29, 0 +/* 800AF1B0 000AC0F0 3B 80 00 00 */ li r28, 0 +/* 800AF1B4 000AC0F4 3B 60 00 00 */ li r27, 0 +/* 800AF1B8 000AC0F8 3B 40 00 01 */ li r26, 1 +/* 800AF1BC 000AC0FC 3B 20 00 00 */ li r25, 0 +/* 800AF1C0 000AC100 3B 00 00 00 */ li r24, 0 +/* 800AF1C4 000AC104 3A E0 00 00 */ li r23, 0 +/* 800AF1C8 000AC108 3A C0 00 00 */ li r22, 0 +/* 800AF1CC 000AC10C 3A A0 00 00 */ li r21, 0 +/* 800AF1D0 000AC110 3A 80 00 00 */ li r20, 0 +/* 800AF1D4 000AC114 3A 60 00 00 */ li r19, 0 +/* 800AF1D8 000AC118 3A 40 00 00 */ li r18, 0 +/* 800AF1DC 000AC11C 3A 20 00 00 */ li r17, 0 +/* 800AF1E0 000AC120 3A 00 00 00 */ li r16, 0 +/* 800AF1E4 000AC124 39 E0 00 00 */ li r15, 0 +/* 800AF1E8 000AC128 48 00 02 10 */ b lbl_800AF3F8 +lbl_800AF1EC: +/* 800AF1EC 000AC12C 28 00 00 19 */ cmplwi r0, 0x19 +/* 800AF1F0 000AC130 41 81 02 04 */ bgt lbl_800AF3F4 +/* 800AF1F4 000AC134 54 00 10 3A */ slwi r0, r0, 2 +/* 800AF1F8 000AC138 7C 04 00 2E */ lwzx r0, r4, r0 +/* 800AF1FC 000AC13C 7C 09 03 A6 */ mtctr r0 +/* 800AF200 000AC140 4E 80 04 20 */ bctr +lbl_800AF204: +/* 800AF204 000AC144 83 83 00 04 */ lwz r28, 4(r3) +/* 800AF208 000AC148 48 00 01 EC */ b lbl_800AF3F4 +lbl_800AF20C: +/* 800AF20C 000AC14C 80 03 00 04 */ lwz r0, 4(r3) +/* 800AF210 000AC150 57 65 00 3C */ rlwinm r5, r27, 0, 0, 0x1e +/* 800AF214 000AC154 7C BB 03 78 */ or r27, r5, r0 +/* 800AF218 000AC158 48 00 01 DC */ b lbl_800AF3F4 +lbl_800AF21C: +/* 800AF21C 000AC15C 80 03 00 04 */ lwz r0, 4(r3) +/* 800AF220 000AC160 57 65 07 FA */ rlwinm r5, r27, 0, 0x1f, 0x1d +/* 800AF224 000AC164 54 00 08 3C */ slwi r0, r0, 1 +/* 800AF228 000AC168 7C BB 03 78 */ or r27, r5, r0 +/* 800AF22C 000AC16C 48 00 01 C8 */ b lbl_800AF3F4 +lbl_800AF230: +/* 800AF230 000AC170 80 03 00 04 */ lwz r0, 4(r3) +/* 800AF234 000AC174 57 65 07 B8 */ rlwinm r5, r27, 0, 0x1e, 0x1c +/* 800AF238 000AC178 54 00 10 3A */ slwi r0, r0, 2 +/* 800AF23C 000AC17C 7C BB 03 78 */ or r27, r5, r0 +/* 800AF240 000AC180 48 00 01 B4 */ b lbl_800AF3F4 +lbl_800AF244: +/* 800AF244 000AC184 80 03 00 04 */ lwz r0, 4(r3) +/* 800AF248 000AC188 57 65 07 76 */ rlwinm r5, r27, 0, 0x1d, 0x1b +/* 800AF24C 000AC18C 54 00 18 38 */ slwi r0, r0, 3 +/* 800AF250 000AC190 7C BB 03 78 */ or r27, r5, r0 +/* 800AF254 000AC194 48 00 01 A0 */ b lbl_800AF3F4 +lbl_800AF258: +/* 800AF258 000AC198 80 03 00 04 */ lwz r0, 4(r3) +/* 800AF25C 000AC19C 57 65 07 34 */ rlwinm r5, r27, 0, 0x1c, 0x1a +/* 800AF260 000AC1A0 54 00 20 36 */ slwi r0, r0, 4 +/* 800AF264 000AC1A4 7C BB 03 78 */ or r27, r5, r0 +/* 800AF268 000AC1A8 48 00 01 8C */ b lbl_800AF3F4 +lbl_800AF26C: +/* 800AF26C 000AC1AC 80 03 00 04 */ lwz r0, 4(r3) +/* 800AF270 000AC1B0 57 65 06 F2 */ rlwinm r5, r27, 0, 0x1b, 0x19 +/* 800AF274 000AC1B4 54 00 28 34 */ slwi r0, r0, 5 +/* 800AF278 000AC1B8 7C BB 03 78 */ or r27, r5, r0 +/* 800AF27C 000AC1BC 48 00 01 78 */ b lbl_800AF3F4 +lbl_800AF280: +/* 800AF280 000AC1C0 80 03 00 04 */ lwz r0, 4(r3) +/* 800AF284 000AC1C4 57 65 06 B0 */ rlwinm r5, r27, 0, 0x1a, 0x18 +/* 800AF288 000AC1C8 54 00 30 32 */ slwi r0, r0, 6 +/* 800AF28C 000AC1CC 7C BB 03 78 */ or r27, r5, r0 +/* 800AF290 000AC1D0 48 00 01 64 */ b lbl_800AF3F4 +lbl_800AF294: +/* 800AF294 000AC1D4 80 03 00 04 */ lwz r0, 4(r3) +/* 800AF298 000AC1D8 57 65 06 6E */ rlwinm r5, r27, 0, 0x19, 0x17 +/* 800AF29C 000AC1DC 54 00 38 30 */ slwi r0, r0, 7 +/* 800AF2A0 000AC1E0 7C BB 03 78 */ or r27, r5, r0 +/* 800AF2A4 000AC1E4 48 00 01 50 */ b lbl_800AF3F4 +lbl_800AF2A8: +/* 800AF2A8 000AC1E8 83 43 00 04 */ lwz r26, 4(r3) +/* 800AF2AC 000AC1EC 48 00 01 48 */ b lbl_800AF3F4 +lbl_800AF2B0: +/* 800AF2B0 000AC1F0 80 03 00 04 */ lwz r0, 4(r3) +/* 800AF2B4 000AC1F4 2C 00 00 00 */ cmpwi r0, 0 +/* 800AF2B8 000AC1F8 41 82 01 3C */ beq lbl_800AF3F4 +/* 800AF2BC 000AC1FC 7C 19 03 78 */ mr r25, r0 +/* 800AF2C0 000AC200 3B E0 00 01 */ li r31, 1 +/* 800AF2C4 000AC204 48 00 01 30 */ b lbl_800AF3F4 +lbl_800AF2C8: +/* 800AF2C8 000AC208 80 03 00 04 */ lwz r0, 4(r3) +/* 800AF2CC 000AC20C 2C 00 00 00 */ cmpwi r0, 0 +/* 800AF2D0 000AC210 41 82 01 24 */ beq lbl_800AF3F4 +/* 800AF2D4 000AC214 7C 19 03 78 */ mr r25, r0 +/* 800AF2D8 000AC218 3B E0 00 02 */ li r31, 2 +/* 800AF2DC 000AC21C 48 00 01 18 */ b lbl_800AF3F4 +lbl_800AF2E0: +/* 800AF2E0 000AC220 80 C3 00 04 */ lwz r6, 4(r3) +/* 800AF2E4 000AC224 7C A6 00 D0 */ neg r5, r6 +/* 800AF2E8 000AC228 30 05 FF FF */ addic r0, r5, -1 +/* 800AF2EC 000AC22C 7C 00 29 10 */ subfe r0, r0, r5 +/* 800AF2F0 000AC230 3B 06 00 00 */ addi r24, r6, 0 +/* 800AF2F4 000AC234 7F DE 02 14 */ add r30, r30, r0 +/* 800AF2F8 000AC238 48 00 00 FC */ b lbl_800AF3F4 +lbl_800AF2FC: +/* 800AF2FC 000AC23C 80 C3 00 04 */ lwz r6, 4(r3) +/* 800AF300 000AC240 7C A6 00 D0 */ neg r5, r6 +/* 800AF304 000AC244 30 05 FF FF */ addic r0, r5, -1 +/* 800AF308 000AC248 7C 00 29 10 */ subfe r0, r0, r5 +/* 800AF30C 000AC24C 3A E6 00 00 */ addi r23, r6, 0 +/* 800AF310 000AC250 7F DE 02 14 */ add r30, r30, r0 +/* 800AF314 000AC254 48 00 00 E0 */ b lbl_800AF3F4 +lbl_800AF318: +/* 800AF318 000AC258 80 C3 00 04 */ lwz r6, 4(r3) +/* 800AF31C 000AC25C 7C A6 00 D0 */ neg r5, r6 +/* 800AF320 000AC260 30 05 FF FF */ addic r0, r5, -1 +/* 800AF324 000AC264 7C 00 29 10 */ subfe r0, r0, r5 +/* 800AF328 000AC268 3A C6 00 00 */ addi r22, r6, 0 +/* 800AF32C 000AC26C 7F BD 02 14 */ add r29, r29, r0 +/* 800AF330 000AC270 48 00 00 C4 */ b lbl_800AF3F4 +lbl_800AF334: +/* 800AF334 000AC274 80 C3 00 04 */ lwz r6, 4(r3) +/* 800AF338 000AC278 7C A6 00 D0 */ neg r5, r6 +/* 800AF33C 000AC27C 30 05 FF FF */ addic r0, r5, -1 +/* 800AF340 000AC280 7C 00 29 10 */ subfe r0, r0, r5 +/* 800AF344 000AC284 3A A6 00 00 */ addi r21, r6, 0 +/* 800AF348 000AC288 7F BD 02 14 */ add r29, r29, r0 +/* 800AF34C 000AC28C 48 00 00 A8 */ b lbl_800AF3F4 +lbl_800AF350: +/* 800AF350 000AC290 80 C3 00 04 */ lwz r6, 4(r3) +/* 800AF354 000AC294 7C A6 00 D0 */ neg r5, r6 +/* 800AF358 000AC298 30 05 FF FF */ addic r0, r5, -1 +/* 800AF35C 000AC29C 7C 00 29 10 */ subfe r0, r0, r5 +/* 800AF360 000AC2A0 3A 86 00 00 */ addi r20, r6, 0 +/* 800AF364 000AC2A4 7F BD 02 14 */ add r29, r29, r0 +/* 800AF368 000AC2A8 48 00 00 8C */ b lbl_800AF3F4 +lbl_800AF36C: +/* 800AF36C 000AC2AC 80 C3 00 04 */ lwz r6, 4(r3) +/* 800AF370 000AC2B0 7C A6 00 D0 */ neg r5, r6 +/* 800AF374 000AC2B4 30 05 FF FF */ addic r0, r5, -1 +/* 800AF378 000AC2B8 7C 00 29 10 */ subfe r0, r0, r5 +/* 800AF37C 000AC2BC 3A 66 00 00 */ addi r19, r6, 0 +/* 800AF380 000AC2C0 7F BD 02 14 */ add r29, r29, r0 +/* 800AF384 000AC2C4 48 00 00 70 */ b lbl_800AF3F4 +lbl_800AF388: +/* 800AF388 000AC2C8 80 C3 00 04 */ lwz r6, 4(r3) +/* 800AF38C 000AC2CC 7C A6 00 D0 */ neg r5, r6 +/* 800AF390 000AC2D0 30 05 FF FF */ addic r0, r5, -1 +/* 800AF394 000AC2D4 7C 00 29 10 */ subfe r0, r0, r5 +/* 800AF398 000AC2D8 3A 46 00 00 */ addi r18, r6, 0 +/* 800AF39C 000AC2DC 7F BD 02 14 */ add r29, r29, r0 +/* 800AF3A0 000AC2E0 48 00 00 54 */ b lbl_800AF3F4 +lbl_800AF3A4: +/* 800AF3A4 000AC2E4 80 C3 00 04 */ lwz r6, 4(r3) +/* 800AF3A8 000AC2E8 7C A6 00 D0 */ neg r5, r6 +/* 800AF3AC 000AC2EC 30 05 FF FF */ addic r0, r5, -1 +/* 800AF3B0 000AC2F0 7C 00 29 10 */ subfe r0, r0, r5 +/* 800AF3B4 000AC2F4 3A 26 00 00 */ addi r17, r6, 0 +/* 800AF3B8 000AC2F8 7F BD 02 14 */ add r29, r29, r0 +/* 800AF3BC 000AC2FC 48 00 00 38 */ b lbl_800AF3F4 +lbl_800AF3C0: +/* 800AF3C0 000AC300 80 C3 00 04 */ lwz r6, 4(r3) +/* 800AF3C4 000AC304 7C A6 00 D0 */ neg r5, r6 +/* 800AF3C8 000AC308 30 05 FF FF */ addic r0, r5, -1 +/* 800AF3CC 000AC30C 7C 00 29 10 */ subfe r0, r0, r5 +/* 800AF3D0 000AC310 3A 06 00 00 */ addi r16, r6, 0 +/* 800AF3D4 000AC314 7F BD 02 14 */ add r29, r29, r0 +/* 800AF3D8 000AC318 48 00 00 1C */ b lbl_800AF3F4 +lbl_800AF3DC: +/* 800AF3DC 000AC31C 80 C3 00 04 */ lwz r6, 4(r3) +/* 800AF3E0 000AC320 7C A6 00 D0 */ neg r5, r6 +/* 800AF3E4 000AC324 30 05 FF FF */ addic r0, r5, -1 +/* 800AF3E8 000AC328 7C 00 29 10 */ subfe r0, r0, r5 +/* 800AF3EC 000AC32C 39 E6 00 00 */ addi r15, r6, 0 +/* 800AF3F0 000AC330 7F BD 02 14 */ add r29, r29, r0 +lbl_800AF3F4: +/* 800AF3F4 000AC334 38 63 00 08 */ addi r3, r3, 8 +lbl_800AF3F8: +/* 800AF3F8 000AC338 80 03 00 00 */ lwz r0, 0(r3) +/* 800AF3FC 000AC33C 2C 00 00 FF */ cmpwi r0, 0xff +/* 800AF400 000AC340 40 82 FD EC */ bne lbl_800AF1EC +/* 800AF404 000AC344 80 8D 95 B8 */ lwz r4, __GDCurrentDL@sda21(r13) +/* 800AF408 000AC348 80 64 00 08 */ lwz r3, 8(r4) +/* 800AF40C 000AC34C 80 04 00 0C */ lwz r0, 0xc(r4) +/* 800AF410 000AC350 38 63 00 01 */ addi r3, r3, 1 +/* 800AF414 000AC354 7C 03 00 40 */ cmplw r3, r0 +/* 800AF418 000AC358 40 81 00 08 */ ble lbl_800AF420 +/* 800AF41C 000AC35C 4B FF FD 39 */ bl GDOverflowed +lbl_800AF420: +/* 800AF420 000AC360 80 8D 95 B8 */ lwz r4, __GDCurrentDL@sda21(r13) +/* 800AF424 000AC364 38 A0 00 08 */ li r5, 8 +/* 800AF428 000AC368 80 64 00 08 */ lwz r3, 8(r4) +/* 800AF42C 000AC36C 38 03 00 01 */ addi r0, r3, 1 +/* 800AF430 000AC370 90 04 00 08 */ stw r0, 8(r4) +/* 800AF434 000AC374 98 A3 00 00 */ stb r5, 0(r3) +/* 800AF438 000AC378 80 8D 95 B8 */ lwz r4, __GDCurrentDL@sda21(r13) +/* 800AF43C 000AC37C 80 64 00 08 */ lwz r3, 8(r4) +/* 800AF440 000AC380 80 04 00 0C */ lwz r0, 0xc(r4) +/* 800AF444 000AC384 38 63 00 01 */ addi r3, r3, 1 +/* 800AF448 000AC388 7C 03 00 40 */ cmplw r3, r0 +/* 800AF44C 000AC38C 40 81 00 08 */ ble lbl_800AF454 +/* 800AF450 000AC390 4B FF FD 05 */ bl GDOverflowed +lbl_800AF454: +/* 800AF454 000AC394 80 8D 95 B8 */ lwz r4, __GDCurrentDL@sda21(r13) +/* 800AF458 000AC398 38 A0 00 50 */ li r5, 0x50 +/* 800AF45C 000AC39C 80 64 00 08 */ lwz r3, 8(r4) +/* 800AF460 000AC3A0 38 03 00 01 */ addi r0, r3, 1 +/* 800AF464 000AC3A4 90 04 00 08 */ stw r0, 8(r4) +/* 800AF468 000AC3A8 98 A3 00 00 */ stb r5, 0(r3) +/* 800AF46C 000AC3AC 80 8D 95 B8 */ lwz r4, __GDCurrentDL@sda21(r13) +/* 800AF470 000AC3B0 80 64 00 08 */ lwz r3, 8(r4) +/* 800AF474 000AC3B4 80 04 00 0C */ lwz r0, 0xc(r4) +/* 800AF478 000AC3B8 38 63 00 04 */ addi r3, r3, 4 +/* 800AF47C 000AC3BC 7C 03 00 40 */ cmplw r3, r0 +/* 800AF480 000AC3C0 40 81 00 08 */ ble lbl_800AF488 +/* 800AF484 000AC3C4 4B FF FC D1 */ bl GDOverflowed +lbl_800AF488: +/* 800AF488 000AC3C8 80 8D 95 B8 */ lwz r4, __GDCurrentDL@sda21(r13) +/* 800AF48C 000AC3CC 57 60 08 3C */ slwi r0, r27, 1 +/* 800AF490 000AC3D0 57 45 48 2C */ slwi r5, r26, 9 +/* 800AF494 000AC3D4 80 64 00 08 */ lwz r3, 8(r4) +/* 800AF498 000AC3D8 7F 80 03 78 */ or r0, r28, r0 +/* 800AF49C 000AC3DC 7C A5 03 78 */ or r5, r5, r0 +/* 800AF4A0 000AC3E0 38 03 00 01 */ addi r0, r3, 1 +/* 800AF4A4 000AC3E4 90 04 00 08 */ stw r0, 8(r4) +/* 800AF4A8 000AC3E8 57 26 58 28 */ slwi r6, r25, 0xb +/* 800AF4AC 000AC3EC 57 07 68 24 */ slwi r7, r24, 0xd +/* 800AF4B0 000AC3F0 7C C0 2B 78 */ or r0, r6, r5 +/* 800AF4B4 000AC3F4 56 E4 78 20 */ slwi r4, r23, 0xf +/* 800AF4B8 000AC3F8 7C E0 03 78 */ or r0, r7, r0 +/* 800AF4BC 000AC3FC 7C 87 03 78 */ or r7, r4, r0 +/* 800AF4C0 000AC400 54 E0 46 3E */ srwi r0, r7, 0x18 +/* 800AF4C4 000AC404 98 03 00 00 */ stb r0, 0(r3) +/* 800AF4C8 000AC408 54 E6 86 3E */ rlwinm r6, r7, 0x10, 0x18, 0x1f +/* 800AF4CC 000AC40C 54 E5 C6 3E */ rlwinm r5, r7, 0x18, 0x18, 0x1f +/* 800AF4D0 000AC410 80 8D 95 B8 */ lwz r4, __GDCurrentDL@sda21(r13) +/* 800AF4D4 000AC414 80 64 00 08 */ lwz r3, 8(r4) +/* 800AF4D8 000AC418 38 03 00 01 */ addi r0, r3, 1 +/* 800AF4DC 000AC41C 90 04 00 08 */ stw r0, 8(r4) +/* 800AF4E0 000AC420 98 C3 00 00 */ stb r6, 0(r3) +/* 800AF4E4 000AC424 80 8D 95 B8 */ lwz r4, __GDCurrentDL@sda21(r13) +/* 800AF4E8 000AC428 80 64 00 08 */ lwz r3, 8(r4) +/* 800AF4EC 000AC42C 38 03 00 01 */ addi r0, r3, 1 +/* 800AF4F0 000AC430 90 04 00 08 */ stw r0, 8(r4) +/* 800AF4F4 000AC434 98 A3 00 00 */ stb r5, 0(r3) +/* 800AF4F8 000AC438 80 8D 95 B8 */ lwz r4, __GDCurrentDL@sda21(r13) +/* 800AF4FC 000AC43C 80 64 00 08 */ lwz r3, 8(r4) +/* 800AF500 000AC440 38 03 00 01 */ addi r0, r3, 1 +/* 800AF504 000AC444 90 04 00 08 */ stw r0, 8(r4) +/* 800AF508 000AC448 98 E3 00 00 */ stb r7, 0(r3) +/* 800AF50C 000AC44C 80 8D 95 B8 */ lwz r4, __GDCurrentDL@sda21(r13) +/* 800AF510 000AC450 80 64 00 08 */ lwz r3, 8(r4) +/* 800AF514 000AC454 80 04 00 0C */ lwz r0, 0xc(r4) +/* 800AF518 000AC458 38 63 00 01 */ addi r3, r3, 1 +/* 800AF51C 000AC45C 7C 03 00 40 */ cmplw r3, r0 +/* 800AF520 000AC460 40 81 00 08 */ ble lbl_800AF528 +/* 800AF524 000AC464 4B FF FC 31 */ bl GDOverflowed +lbl_800AF528: +/* 800AF528 000AC468 80 8D 95 B8 */ lwz r4, __GDCurrentDL@sda21(r13) +/* 800AF52C 000AC46C 38 A0 00 08 */ li r5, 8 +/* 800AF530 000AC470 80 64 00 08 */ lwz r3, 8(r4) +/* 800AF534 000AC474 38 03 00 01 */ addi r0, r3, 1 +/* 800AF538 000AC478 90 04 00 08 */ stw r0, 8(r4) +/* 800AF53C 000AC47C 98 A3 00 00 */ stb r5, 0(r3) +/* 800AF540 000AC480 80 8D 95 B8 */ lwz r4, __GDCurrentDL@sda21(r13) +/* 800AF544 000AC484 80 64 00 08 */ lwz r3, 8(r4) +/* 800AF548 000AC488 80 04 00 0C */ lwz r0, 0xc(r4) +/* 800AF54C 000AC48C 38 63 00 01 */ addi r3, r3, 1 +/* 800AF550 000AC490 7C 03 00 40 */ cmplw r3, r0 +/* 800AF554 000AC494 40 81 00 08 */ ble lbl_800AF55C +/* 800AF558 000AC498 4B FF FB FD */ bl GDOverflowed +lbl_800AF55C: +/* 800AF55C 000AC49C 80 8D 95 B8 */ lwz r4, __GDCurrentDL@sda21(r13) +/* 800AF560 000AC4A0 38 A0 00 60 */ li r5, 0x60 +/* 800AF564 000AC4A4 80 64 00 08 */ lwz r3, 8(r4) +/* 800AF568 000AC4A8 38 03 00 01 */ addi r0, r3, 1 +/* 800AF56C 000AC4AC 90 04 00 08 */ stw r0, 8(r4) +/* 800AF570 000AC4B0 98 A3 00 00 */ stb r5, 0(r3) +/* 800AF574 000AC4B4 80 8D 95 B8 */ lwz r4, __GDCurrentDL@sda21(r13) +/* 800AF578 000AC4B8 80 64 00 08 */ lwz r3, 8(r4) +/* 800AF57C 000AC4BC 80 04 00 0C */ lwz r0, 0xc(r4) +/* 800AF580 000AC4C0 38 63 00 04 */ addi r3, r3, 4 +/* 800AF584 000AC4C4 7C 03 00 40 */ cmplw r3, r0 +/* 800AF588 000AC4C8 40 81 00 08 */ ble lbl_800AF590 +/* 800AF58C 000AC4CC 4B FF FB C9 */ bl GDOverflowed +lbl_800AF590: +/* 800AF590 000AC4D0 80 8D 95 B8 */ lwz r4, __GDCurrentDL@sda21(r13) +/* 800AF594 000AC4D4 56 A0 10 3A */ slwi r0, r21, 2 +/* 800AF598 000AC4D8 56 85 20 36 */ slwi r5, r20, 4 +/* 800AF59C 000AC4DC 7E C0 03 78 */ or r0, r22, r0 +/* 800AF5A0 000AC4E0 80 64 00 08 */ lwz r3, 8(r4) +/* 800AF5A4 000AC4E4 56 66 30 32 */ slwi r6, r19, 6 +/* 800AF5A8 000AC4E8 7C A0 03 78 */ or r0, r5, r0 +/* 800AF5AC 000AC4EC 7C C5 03 78 */ or r5, r6, r0 +/* 800AF5B0 000AC4F0 38 03 00 01 */ addi r0, r3, 1 +/* 800AF5B4 000AC4F4 90 04 00 08 */ stw r0, 8(r4) +/* 800AF5B8 000AC4F8 56 47 40 2E */ slwi r7, r18, 8 +/* 800AF5BC 000AC4FC 7C E0 2B 78 */ or r0, r7, r5 +/* 800AF5C0 000AC500 56 26 50 2A */ slwi r6, r17, 0xa +/* 800AF5C4 000AC504 56 04 60 26 */ slwi r4, r16, 0xc +/* 800AF5C8 000AC508 7C C0 03 78 */ or r0, r6, r0 +/* 800AF5CC 000AC50C 55 E5 70 22 */ slwi r5, r15, 0xe +/* 800AF5D0 000AC510 7C 80 03 78 */ or r0, r4, r0 +/* 800AF5D4 000AC514 7C A7 03 78 */ or r7, r5, r0 +/* 800AF5D8 000AC518 54 E0 46 3E */ srwi r0, r7, 0x18 +/* 800AF5DC 000AC51C 98 03 00 00 */ stb r0, 0(r3) +/* 800AF5E0 000AC520 54 E6 86 3E */ rlwinm r6, r7, 0x10, 0x18, 0x1f +/* 800AF5E4 000AC524 54 E5 C6 3E */ rlwinm r5, r7, 0x18, 0x18, 0x1f +/* 800AF5E8 000AC528 80 8D 95 B8 */ lwz r4, __GDCurrentDL@sda21(r13) +/* 800AF5EC 000AC52C 80 64 00 08 */ lwz r3, 8(r4) +/* 800AF5F0 000AC530 38 03 00 01 */ addi r0, r3, 1 +/* 800AF5F4 000AC534 90 04 00 08 */ stw r0, 8(r4) +/* 800AF5F8 000AC538 98 C3 00 00 */ stb r6, 0(r3) +/* 800AF5FC 000AC53C 80 8D 95 B8 */ lwz r4, __GDCurrentDL@sda21(r13) +/* 800AF600 000AC540 80 64 00 08 */ lwz r3, 8(r4) +/* 800AF604 000AC544 38 03 00 01 */ addi r0, r3, 1 +/* 800AF608 000AC548 90 04 00 08 */ stw r0, 8(r4) +/* 800AF60C 000AC54C 98 A3 00 00 */ stb r5, 0(r3) +/* 800AF610 000AC550 80 8D 95 B8 */ lwz r4, __GDCurrentDL@sda21(r13) +/* 800AF614 000AC554 80 64 00 08 */ lwz r3, 8(r4) +/* 800AF618 000AC558 38 03 00 01 */ addi r0, r3, 1 +/* 800AF61C 000AC55C 90 04 00 08 */ stw r0, 8(r4) +/* 800AF620 000AC560 98 E3 00 00 */ stb r7, 0(r3) +/* 800AF624 000AC564 80 8D 95 B8 */ lwz r4, __GDCurrentDL@sda21(r13) +/* 800AF628 000AC568 80 64 00 08 */ lwz r3, 8(r4) +/* 800AF62C 000AC56C 80 04 00 0C */ lwz r0, 0xc(r4) +/* 800AF630 000AC570 38 63 00 01 */ addi r3, r3, 1 +/* 800AF634 000AC574 7C 03 00 40 */ cmplw r3, r0 +/* 800AF638 000AC578 40 81 00 08 */ ble lbl_800AF640 +/* 800AF63C 000AC57C 4B FF FB 19 */ bl GDOverflowed +lbl_800AF640: +/* 800AF640 000AC580 80 8D 95 B8 */ lwz r4, __GDCurrentDL@sda21(r13) +/* 800AF644 000AC584 38 A0 00 10 */ li r5, 0x10 +/* 800AF648 000AC588 80 64 00 08 */ lwz r3, 8(r4) +/* 800AF64C 000AC58C 38 03 00 01 */ addi r0, r3, 1 +/* 800AF650 000AC590 90 04 00 08 */ stw r0, 8(r4) +/* 800AF654 000AC594 98 A3 00 00 */ stb r5, 0(r3) +/* 800AF658 000AC598 80 8D 95 B8 */ lwz r4, __GDCurrentDL@sda21(r13) +/* 800AF65C 000AC59C 80 64 00 08 */ lwz r3, 8(r4) +/* 800AF660 000AC5A0 80 04 00 0C */ lwz r0, 0xc(r4) +/* 800AF664 000AC5A4 38 63 00 02 */ addi r3, r3, 2 +/* 800AF668 000AC5A8 7C 03 00 40 */ cmplw r3, r0 +/* 800AF66C 000AC5AC 40 81 00 08 */ ble lbl_800AF674 +/* 800AF670 000AC5B0 4B FF FA E5 */ bl GDOverflowed +lbl_800AF674: +/* 800AF674 000AC5B4 80 8D 95 B8 */ lwz r4, __GDCurrentDL@sda21(r13) +/* 800AF678 000AC5B8 38 A0 00 00 */ li r5, 0 +/* 800AF67C 000AC5BC 80 64 00 08 */ lwz r3, 8(r4) +/* 800AF680 000AC5C0 38 03 00 01 */ addi r0, r3, 1 +/* 800AF684 000AC5C4 90 04 00 08 */ stw r0, 8(r4) +/* 800AF688 000AC5C8 98 A3 00 00 */ stb r5, 0(r3) +/* 800AF68C 000AC5CC 80 8D 95 B8 */ lwz r4, __GDCurrentDL@sda21(r13) +/* 800AF690 000AC5D0 80 64 00 08 */ lwz r3, 8(r4) +/* 800AF694 000AC5D4 38 03 00 01 */ addi r0, r3, 1 +/* 800AF698 000AC5D8 90 04 00 08 */ stw r0, 8(r4) +/* 800AF69C 000AC5DC 98 A3 00 00 */ stb r5, 0(r3) +/* 800AF6A0 000AC5E0 80 8D 95 B8 */ lwz r4, __GDCurrentDL@sda21(r13) +/* 800AF6A4 000AC5E4 80 64 00 08 */ lwz r3, 8(r4) +/* 800AF6A8 000AC5E8 80 04 00 0C */ lwz r0, 0xc(r4) +/* 800AF6AC 000AC5EC 38 63 00 02 */ addi r3, r3, 2 +/* 800AF6B0 000AC5F0 7C 03 00 40 */ cmplw r3, r0 +/* 800AF6B4 000AC5F4 40 81 00 08 */ ble lbl_800AF6BC +/* 800AF6B8 000AC5F8 4B FF FA 9D */ bl GDOverflowed +lbl_800AF6BC: +/* 800AF6BC 000AC5FC 80 8D 95 B8 */ lwz r4, __GDCurrentDL@sda21(r13) +/* 800AF6C0 000AC600 38 C0 00 10 */ li r6, 0x10 +/* 800AF6C4 000AC604 38 A0 00 08 */ li r5, 8 +/* 800AF6C8 000AC608 80 64 00 08 */ lwz r3, 8(r4) +/* 800AF6CC 000AC60C 38 03 00 01 */ addi r0, r3, 1 +/* 800AF6D0 000AC610 90 04 00 08 */ stw r0, 8(r4) +/* 800AF6D4 000AC614 98 C3 00 00 */ stb r6, 0(r3) +/* 800AF6D8 000AC618 80 8D 95 B8 */ lwz r4, __GDCurrentDL@sda21(r13) +/* 800AF6DC 000AC61C 80 64 00 08 */ lwz r3, 8(r4) +/* 800AF6E0 000AC620 38 03 00 01 */ addi r0, r3, 1 +/* 800AF6E4 000AC624 90 04 00 08 */ stw r0, 8(r4) +/* 800AF6E8 000AC628 98 A3 00 00 */ stb r5, 0(r3) +/* 800AF6EC 000AC62C 80 8D 95 B8 */ lwz r4, __GDCurrentDL@sda21(r13) +/* 800AF6F0 000AC630 80 64 00 08 */ lwz r3, 8(r4) +/* 800AF6F4 000AC634 80 04 00 0C */ lwz r0, 0xc(r4) +/* 800AF6F8 000AC638 38 63 00 04 */ addi r3, r3, 4 +/* 800AF6FC 000AC63C 7C 03 00 40 */ cmplw r3, r0 +/* 800AF700 000AC640 40 81 00 08 */ ble lbl_800AF708 +/* 800AF704 000AC644 4B FF FA 51 */ bl GDOverflowed +lbl_800AF708: +/* 800AF708 000AC648 80 8D 95 B8 */ lwz r4, __GDCurrentDL@sda21(r13) +/* 800AF70C 000AC64C 57 E0 10 3A */ slwi r0, r31, 2 +/* 800AF710 000AC650 57 A5 20 36 */ slwi r5, r29, 4 +/* 800AF714 000AC654 80 64 00 08 */ lwz r3, 8(r4) +/* 800AF718 000AC658 7F C0 03 78 */ or r0, r30, r0 +/* 800AF71C 000AC65C 7C A7 03 78 */ or r7, r5, r0 +/* 800AF720 000AC660 38 03 00 01 */ addi r0, r3, 1 +/* 800AF724 000AC664 90 04 00 08 */ stw r0, 8(r4) +/* 800AF728 000AC668 54 E0 46 3E */ srwi r0, r7, 0x18 +/* 800AF72C 000AC66C 54 E6 86 3E */ rlwinm r6, r7, 0x10, 0x18, 0x1f +/* 800AF730 000AC670 98 03 00 00 */ stb r0, 0(r3) +/* 800AF734 000AC674 54 E5 C6 3E */ rlwinm r5, r7, 0x18, 0x18, 0x1f +/* 800AF738 000AC678 80 8D 95 B8 */ lwz r4, __GDCurrentDL@sda21(r13) +/* 800AF73C 000AC67C 80 64 00 08 */ lwz r3, 8(r4) +/* 800AF740 000AC680 38 03 00 01 */ addi r0, r3, 1 +/* 800AF744 000AC684 90 04 00 08 */ stw r0, 8(r4) +/* 800AF748 000AC688 98 C3 00 00 */ stb r6, 0(r3) +/* 800AF74C 000AC68C 80 8D 95 B8 */ lwz r4, __GDCurrentDL@sda21(r13) +/* 800AF750 000AC690 80 64 00 08 */ lwz r3, 8(r4) +/* 800AF754 000AC694 38 03 00 01 */ addi r0, r3, 1 +/* 800AF758 000AC698 90 04 00 08 */ stw r0, 8(r4) +/* 800AF75C 000AC69C 98 A3 00 00 */ stb r5, 0(r3) +/* 800AF760 000AC6A0 80 8D 95 B8 */ lwz r4, __GDCurrentDL@sda21(r13) +/* 800AF764 000AC6A4 80 64 00 08 */ lwz r3, 8(r4) +/* 800AF768 000AC6A8 38 03 00 01 */ addi r0, r3, 1 +/* 800AF76C 000AC6AC 90 04 00 08 */ stw r0, 8(r4) +/* 800AF770 000AC6B0 98 E3 00 00 */ stb r7, 0(r3) +/* 800AF774 000AC6B4 B9 E1 00 14 */ lmw r15, 0x14(r1) +/* 800AF778 000AC6B8 80 01 00 5C */ lwz r0, 0x5c(r1) +/* 800AF77C 000AC6BC 38 21 00 58 */ addi r1, r1, 0x58 +/* 800AF780 000AC6C0 7C 08 03 A6 */ mtlr r0 +/* 800AF784 000AC6C4 4E 80 00 20 */ blr + +.global GDSetVtxAttrFmtv +GDSetVtxAttrFmtv: +/* 800AF788 000AC6C8 7C 08 02 A6 */ mflr r0 +/* 800AF78C 000AC6CC 3C A0 80 3B */ lis r5, "@207"@ha +/* 800AF790 000AC6D0 90 01 00 04 */ stw r0, 4(r1) +/* 800AF794 000AC6D4 38 00 00 01 */ li r0, 1 +/* 800AF798 000AC6D8 94 21 FF 60 */ stwu r1, -0xa0(r1) +/* 800AF79C 000AC6DC BD C1 00 58 */ stmw r14, 0x58(r1) +/* 800AF7A0 000AC6E0 3B C0 00 00 */ li r30, 0 +/* 800AF7A4 000AC6E4 3B E0 00 00 */ li r31, 0 +/* 800AF7A8 000AC6E8 90 01 00 50 */ stw r0, 0x50(r1) +/* 800AF7AC 000AC6EC 38 00 00 04 */ li r0, 4 +/* 800AF7B0 000AC6F0 3B 00 00 00 */ li r24, 0 +/* 800AF7B4 000AC6F4 90 01 00 4C */ stw r0, 0x4c(r1) +/* 800AF7B8 000AC6F8 38 00 00 00 */ li r0, 0 +/* 800AF7BC 000AC6FC 3A E0 00 01 */ li r23, 1 +/* 800AF7C0 000AC700 90 01 00 48 */ stw r0, 0x48(r1) +/* 800AF7C4 000AC704 38 00 00 04 */ li r0, 4 +/* 800AF7C8 000AC708 3B 20 00 04 */ li r25, 4 +/* 800AF7CC 000AC70C 90 01 00 44 */ stw r0, 0x44(r1) +/* 800AF7D0 000AC710 38 00 00 01 */ li r0, 1 +/* 800AF7D4 000AC714 3A 80 00 00 */ li r20, 0 +/* 800AF7D8 000AC718 90 01 00 40 */ stw r0, 0x40(r1) +/* 800AF7DC 000AC71C 38 00 00 05 */ li r0, 5 +/* 800AF7E0 000AC720 3A A0 00 01 */ li r21, 1 +/* 800AF7E4 000AC724 90 01 00 3C */ stw r0, 0x3c(r1) +/* 800AF7E8 000AC728 38 00 00 01 */ li r0, 1 +/* 800AF7EC 000AC72C 3A C0 00 04 */ li r22, 4 +/* 800AF7F0 000AC730 90 01 00 38 */ stw r0, 0x38(r1) +/* 800AF7F4 000AC734 38 00 00 05 */ li r0, 5 +/* 800AF7F8 000AC738 39 C0 00 00 */ li r14, 0 +/* 800AF7FC 000AC73C 90 01 00 34 */ stw r0, 0x34(r1) +/* 800AF800 000AC740 38 00 00 01 */ li r0, 1 +/* 800AF804 000AC744 39 E0 00 01 */ li r15, 1 +/* 800AF808 000AC748 90 01 00 30 */ stw r0, 0x30(r1) +/* 800AF80C 000AC74C 38 00 00 04 */ li r0, 4 +/* 800AF810 000AC750 3A 00 00 04 */ li r16, 4 +/* 800AF814 000AC754 90 01 00 2C */ stw r0, 0x2c(r1) +/* 800AF818 000AC758 38 00 00 00 */ li r0, 0 +/* 800AF81C 000AC75C 3A 20 00 00 */ li r17, 0 +/* 800AF820 000AC760 90 01 00 28 */ stw r0, 0x28(r1) +/* 800AF824 000AC764 38 00 00 01 */ li r0, 1 +/* 800AF828 000AC768 3A 40 00 01 */ li r18, 1 +/* 800AF82C 000AC76C 90 01 00 24 */ stw r0, 0x24(r1) +/* 800AF830 000AC770 38 00 00 04 */ li r0, 4 +/* 800AF834 000AC774 3A 60 00 04 */ li r19, 4 +/* 800AF838 000AC778 90 01 00 20 */ stw r0, 0x20(r1) +/* 800AF83C 000AC77C 38 00 00 00 */ li r0, 0 +/* 800AF840 000AC780 3B 40 00 00 */ li r26, 0 +/* 800AF844 000AC784 90 01 00 1C */ stw r0, 0x1c(r1) +/* 800AF848 000AC788 38 00 00 01 */ li r0, 1 +/* 800AF84C 000AC78C 3B 60 00 01 */ li r27, 1 +/* 800AF850 000AC790 90 01 00 18 */ stw r0, 0x18(r1) +/* 800AF854 000AC794 38 00 00 04 */ li r0, 4 +/* 800AF858 000AC798 3B 80 00 04 */ li r28, 4 +/* 800AF85C 000AC79C 90 61 00 10 */ stw r3, 0x10(r1) +/* 800AF860 000AC7A0 38 65 1C B0 */ addi r3, r5, "@207"@l +/* 800AF864 000AC7A4 3B A0 00 00 */ li r29, 0 +/* 800AF868 000AC7A8 90 01 00 14 */ stw r0, 0x14(r1) +/* 800AF86C 000AC7AC 48 00 01 30 */ b lbl_800AF99C +lbl_800AF870: +/* 800AF870 000AC7B0 38 05 FF F7 */ addi r0, r5, -9 +/* 800AF874 000AC7B4 28 00 00 10 */ cmplwi r0, 0x10 +/* 800AF878 000AC7B8 41 81 01 20 */ bgt lbl_800AF998 +/* 800AF87C 000AC7BC 54 00 10 3A */ slwi r0, r0, 2 +/* 800AF880 000AC7C0 7C 03 00 2E */ lwzx r0, r3, r0 +/* 800AF884 000AC7C4 7C 09 03 A6 */ mtctr r0 +/* 800AF888 000AC7C8 4E 80 04 20 */ bctr +lbl_800AF88C: +/* 800AF88C 000AC7CC 80 04 00 04 */ lwz r0, 4(r4) +/* 800AF890 000AC7D0 90 01 00 50 */ stw r0, 0x50(r1) +/* 800AF894 000AC7D4 80 04 00 08 */ lwz r0, 8(r4) +/* 800AF898 000AC7D8 90 01 00 4C */ stw r0, 0x4c(r1) +/* 800AF89C 000AC7DC 88 04 00 0C */ lbz r0, 0xc(r4) +/* 800AF8A0 000AC7E0 90 01 00 48 */ stw r0, 0x48(r1) +/* 800AF8A4 000AC7E4 48 00 00 F4 */ b lbl_800AF998 +lbl_800AF8A8: +/* 800AF8A8 000AC7E8 80 A4 00 04 */ lwz r5, 4(r4) +/* 800AF8AC 000AC7EC 80 04 00 08 */ lwz r0, 8(r4) +/* 800AF8B0 000AC7F0 2C 05 00 02 */ cmpwi r5, 2 +/* 800AF8B4 000AC7F4 90 01 00 44 */ stw r0, 0x44(r1) +/* 800AF8B8 000AC7F8 40 82 00 10 */ bne lbl_800AF8C8 +/* 800AF8BC 000AC7FC 3B C0 00 01 */ li r30, 1 +/* 800AF8C0 000AC800 3B E0 00 01 */ li r31, 1 +/* 800AF8C4 000AC804 48 00 00 D4 */ b lbl_800AF998 +lbl_800AF8C8: +/* 800AF8C8 000AC808 3B C5 00 00 */ addi r30, r5, 0 +/* 800AF8CC 000AC80C 3B E0 00 00 */ li r31, 0 +/* 800AF8D0 000AC810 48 00 00 C8 */ b lbl_800AF998 +lbl_800AF8D4: +/* 800AF8D4 000AC814 80 04 00 04 */ lwz r0, 4(r4) +/* 800AF8D8 000AC818 90 01 00 40 */ stw r0, 0x40(r1) +/* 800AF8DC 000AC81C 80 04 00 08 */ lwz r0, 8(r4) +/* 800AF8E0 000AC820 90 01 00 3C */ stw r0, 0x3c(r1) +/* 800AF8E4 000AC824 48 00 00 B4 */ b lbl_800AF998 +lbl_800AF8E8: +/* 800AF8E8 000AC828 80 04 00 04 */ lwz r0, 4(r4) +/* 800AF8EC 000AC82C 90 01 00 38 */ stw r0, 0x38(r1) +/* 800AF8F0 000AC830 80 04 00 08 */ lwz r0, 8(r4) +/* 800AF8F4 000AC834 90 01 00 34 */ stw r0, 0x34(r1) +/* 800AF8F8 000AC838 48 00 00 A0 */ b lbl_800AF998 +lbl_800AF8FC: +/* 800AF8FC 000AC83C 80 04 00 04 */ lwz r0, 4(r4) +/* 800AF900 000AC840 90 01 00 30 */ stw r0, 0x30(r1) +/* 800AF904 000AC844 80 04 00 08 */ lwz r0, 8(r4) +/* 800AF908 000AC848 90 01 00 2C */ stw r0, 0x2c(r1) +/* 800AF90C 000AC84C 88 04 00 0C */ lbz r0, 0xc(r4) +/* 800AF910 000AC850 90 01 00 28 */ stw r0, 0x28(r1) +/* 800AF914 000AC854 48 00 00 84 */ b lbl_800AF998 +lbl_800AF918: +/* 800AF918 000AC858 80 04 00 04 */ lwz r0, 4(r4) +/* 800AF91C 000AC85C 90 01 00 24 */ stw r0, 0x24(r1) +/* 800AF920 000AC860 80 04 00 08 */ lwz r0, 8(r4) +/* 800AF924 000AC864 90 01 00 20 */ stw r0, 0x20(r1) +/* 800AF928 000AC868 88 04 00 0C */ lbz r0, 0xc(r4) +/* 800AF92C 000AC86C 90 01 00 1C */ stw r0, 0x1c(r1) +/* 800AF930 000AC870 48 00 00 68 */ b lbl_800AF998 +lbl_800AF934: +/* 800AF934 000AC874 80 04 00 04 */ lwz r0, 4(r4) +/* 800AF938 000AC878 8B 04 00 0C */ lbz r24, 0xc(r4) +/* 800AF93C 000AC87C 90 01 00 18 */ stw r0, 0x18(r1) +/* 800AF940 000AC880 80 04 00 08 */ lwz r0, 8(r4) +/* 800AF944 000AC884 90 01 00 14 */ stw r0, 0x14(r1) +/* 800AF948 000AC888 48 00 00 50 */ b lbl_800AF998 +lbl_800AF94C: +/* 800AF94C 000AC88C 82 E4 00 04 */ lwz r23, 4(r4) +/* 800AF950 000AC890 83 24 00 08 */ lwz r25, 8(r4) +/* 800AF954 000AC894 8A 84 00 0C */ lbz r20, 0xc(r4) +/* 800AF958 000AC898 48 00 00 40 */ b lbl_800AF998 +lbl_800AF95C: +/* 800AF95C 000AC89C 82 A4 00 04 */ lwz r21, 4(r4) +/* 800AF960 000AC8A0 82 C4 00 08 */ lwz r22, 8(r4) +/* 800AF964 000AC8A4 89 C4 00 0C */ lbz r14, 0xc(r4) +/* 800AF968 000AC8A8 48 00 00 30 */ b lbl_800AF998 +lbl_800AF96C: +/* 800AF96C 000AC8AC 81 E4 00 04 */ lwz r15, 4(r4) +/* 800AF970 000AC8B0 82 04 00 08 */ lwz r16, 8(r4) +/* 800AF974 000AC8B4 8A 24 00 0C */ lbz r17, 0xc(r4) +/* 800AF978 000AC8B8 48 00 00 20 */ b lbl_800AF998 +lbl_800AF97C: +/* 800AF97C 000AC8BC 82 44 00 04 */ lwz r18, 4(r4) +/* 800AF980 000AC8C0 82 64 00 08 */ lwz r19, 8(r4) +/* 800AF984 000AC8C4 8B 44 00 0C */ lbz r26, 0xc(r4) +/* 800AF988 000AC8C8 48 00 00 10 */ b lbl_800AF998 +lbl_800AF98C: +/* 800AF98C 000AC8CC 83 64 00 04 */ lwz r27, 4(r4) +/* 800AF990 000AC8D0 83 84 00 08 */ lwz r28, 8(r4) +/* 800AF994 000AC8D4 8B A4 00 0C */ lbz r29, 0xc(r4) +lbl_800AF998: +/* 800AF998 000AC8D8 38 84 00 10 */ addi r4, r4, 0x10 +lbl_800AF99C: +/* 800AF99C 000AC8DC 80 A4 00 00 */ lwz r5, 0(r4) +/* 800AF9A0 000AC8E0 2C 05 00 FF */ cmpwi r5, 0xff +/* 800AF9A4 000AC8E4 40 82 FE CC */ bne lbl_800AF870 +/* 800AF9A8 000AC8E8 80 8D 95 B8 */ lwz r4, __GDCurrentDL@sda21(r13) +/* 800AF9AC 000AC8EC 80 64 00 08 */ lwz r3, 8(r4) +/* 800AF9B0 000AC8F0 80 04 00 0C */ lwz r0, 0xc(r4) +/* 800AF9B4 000AC8F4 38 63 00 01 */ addi r3, r3, 1 +/* 800AF9B8 000AC8F8 7C 03 00 40 */ cmplw r3, r0 +/* 800AF9BC 000AC8FC 40 81 00 08 */ ble lbl_800AF9C4 +/* 800AF9C0 000AC900 4B FF F7 95 */ bl GDOverflowed +lbl_800AF9C4: +/* 800AF9C4 000AC904 80 8D 95 B8 */ lwz r4, __GDCurrentDL@sda21(r13) +/* 800AF9C8 000AC908 38 00 00 08 */ li r0, 8 +/* 800AF9CC 000AC90C 80 64 00 08 */ lwz r3, 8(r4) +/* 800AF9D0 000AC910 38 A3 00 01 */ addi r5, r3, 1 +/* 800AF9D4 000AC914 90 A4 00 08 */ stw r5, 8(r4) +/* 800AF9D8 000AC918 98 03 00 00 */ stb r0, 0(r3) +/* 800AF9DC 000AC91C 80 8D 95 B8 */ lwz r4, __GDCurrentDL@sda21(r13) +/* 800AF9E0 000AC920 80 64 00 08 */ lwz r3, 8(r4) +/* 800AF9E4 000AC924 80 04 00 0C */ lwz r0, 0xc(r4) +/* 800AF9E8 000AC928 38 63 00 01 */ addi r3, r3, 1 +/* 800AF9EC 000AC92C 7C 03 00 40 */ cmplw r3, r0 +/* 800AF9F0 000AC930 40 81 00 08 */ ble lbl_800AF9F8 +/* 800AF9F4 000AC934 4B FF F7 61 */ bl GDOverflowed +lbl_800AF9F8: +/* 800AF9F8 000AC938 80 61 00 10 */ lwz r3, 0x10(r1) +/* 800AF9FC 000AC93C 80 8D 95 B8 */ lwz r4, __GDCurrentDL@sda21(r13) +/* 800AFA00 000AC940 38 03 00 70 */ addi r0, r3, 0x70 +/* 800AFA04 000AC944 80 64 00 08 */ lwz r3, 8(r4) +/* 800AFA08 000AC948 38 A3 00 01 */ addi r5, r3, 1 +/* 800AFA0C 000AC94C 90 A4 00 08 */ stw r5, 8(r4) +/* 800AFA10 000AC950 98 03 00 00 */ stb r0, 0(r3) +/* 800AFA14 000AC954 80 8D 95 B8 */ lwz r4, __GDCurrentDL@sda21(r13) +/* 800AFA18 000AC958 80 64 00 08 */ lwz r3, 8(r4) +/* 800AFA1C 000AC95C 80 04 00 0C */ lwz r0, 0xc(r4) +/* 800AFA20 000AC960 38 63 00 04 */ addi r3, r3, 4 +/* 800AFA24 000AC964 7C 03 00 40 */ cmplw r3, r0 +/* 800AFA28 000AC968 40 81 00 08 */ ble lbl_800AFA30 +/* 800AFA2C 000AC96C 4B FF F7 29 */ bl GDOverflowed +lbl_800AFA30: +/* 800AFA30 000AC970 80 01 00 4C */ lwz r0, 0x4c(r1) +/* 800AFA34 000AC974 57 C5 48 2C */ slwi r5, r30, 9 +/* 800AFA38 000AC978 80 ED 95 B8 */ lwz r7, __GDCurrentDL@sda21(r13) +/* 800AFA3C 000AC97C 54 03 08 3C */ slwi r3, r0, 1 +/* 800AFA40 000AC980 80 01 00 48 */ lwz r0, 0x48(r1) +/* 800AFA44 000AC984 54 04 20 36 */ slwi r4, r0, 4 +/* 800AFA48 000AC988 80 01 00 50 */ lwz r0, 0x50(r1) +/* 800AFA4C 000AC98C 7C 00 1B 78 */ or r0, r0, r3 +/* 800AFA50 000AC990 80 67 00 08 */ lwz r3, 8(r7) +/* 800AFA54 000AC994 7C 84 03 78 */ or r4, r4, r0 +/* 800AFA58 000AC998 80 01 00 44 */ lwz r0, 0x44(r1) +/* 800AFA5C 000AC99C 7C A5 23 78 */ or r5, r5, r4 +/* 800AFA60 000AC9A0 80 81 00 40 */ lwz r4, 0x40(r1) +/* 800AFA64 000AC9A4 54 00 50 2A */ slwi r0, r0, 0xa +/* 800AFA68 000AC9A8 7C 05 2B 78 */ or r5, r0, r5 +/* 800AFA6C 000AC9AC 80 01 00 3C */ lwz r0, 0x3c(r1) +/* 800AFA70 000AC9B0 54 84 68 24 */ slwi r4, r4, 0xd +/* 800AFA74 000AC9B4 7C 84 2B 78 */ or r4, r4, r5 +/* 800AFA78 000AC9B8 80 A1 00 38 */ lwz r5, 0x38(r1) +/* 800AFA7C 000AC9BC 54 00 70 22 */ slwi r0, r0, 0xe +/* 800AFA80 000AC9C0 7C 04 23 78 */ or r4, r0, r4 +/* 800AFA84 000AC9C4 80 01 00 34 */ lwz r0, 0x34(r1) +/* 800AFA88 000AC9C8 54 A5 88 1C */ slwi r5, r5, 0x11 +/* 800AFA8C 000AC9CC 7C A5 23 78 */ or r5, r5, r4 +/* 800AFA90 000AC9D0 80 81 00 30 */ lwz r4, 0x30(r1) +/* 800AFA94 000AC9D4 54 00 90 1A */ slwi r0, r0, 0x12 +/* 800AFA98 000AC9D8 7C 00 2B 78 */ or r0, r0, r5 +/* 800AFA9C 000AC9DC 80 A1 00 2C */ lwz r5, 0x2c(r1) +/* 800AFAA0 000AC9E0 54 84 A8 14 */ slwi r4, r4, 0x15 +/* 800AFAA4 000AC9E4 7C 84 03 78 */ or r4, r4, r0 +/* 800AFAA8 000AC9E8 80 01 00 28 */ lwz r0, 0x28(r1) +/* 800AFAAC 000AC9EC 54 A5 B0 12 */ slwi r5, r5, 0x16 +/* 800AFAB0 000AC9F0 38 C3 00 01 */ addi r6, r3, 1 +/* 800AFAB4 000AC9F4 54 00 C8 0C */ slwi r0, r0, 0x19 +/* 800AFAB8 000AC9F8 90 C7 00 08 */ stw r6, 8(r7) +/* 800AFABC 000AC9FC 7C A4 23 78 */ or r4, r5, r4 +/* 800AFAC0 000ACA00 7C 00 23 78 */ or r0, r0, r4 +/* 800AFAC4 000ACA04 57 E4 F8 00 */ slwi r4, r31, 0x1f +/* 800AFAC8 000ACA08 64 00 40 00 */ oris r0, r0, 0x4000 +/* 800AFACC 000ACA0C 7C 86 03 78 */ or r6, r4, r0 +/* 800AFAD0 000ACA10 54 C0 46 3E */ srwi r0, r6, 0x18 +/* 800AFAD4 000ACA14 98 03 00 00 */ stb r0, 0(r3) +/* 800AFAD8 000ACA18 54 C5 86 3E */ rlwinm r5, r6, 0x10, 0x18, 0x1f +/* 800AFADC 000ACA1C 54 C7 C6 3E */ rlwinm r7, r6, 0x18, 0x18, 0x1f +/* 800AFAE0 000ACA20 80 8D 95 B8 */ lwz r4, __GDCurrentDL@sda21(r13) +/* 800AFAE4 000ACA24 80 64 00 08 */ lwz r3, 8(r4) +/* 800AFAE8 000ACA28 38 03 00 01 */ addi r0, r3, 1 +/* 800AFAEC 000ACA2C 90 04 00 08 */ stw r0, 8(r4) +/* 800AFAF0 000ACA30 98 A3 00 00 */ stb r5, 0(r3) +/* 800AFAF4 000ACA34 80 8D 95 B8 */ lwz r4, __GDCurrentDL@sda21(r13) +/* 800AFAF8 000ACA38 80 64 00 08 */ lwz r3, 8(r4) +/* 800AFAFC 000ACA3C 38 03 00 01 */ addi r0, r3, 1 +/* 800AFB00 000ACA40 90 04 00 08 */ stw r0, 8(r4) +/* 800AFB04 000ACA44 98 E3 00 00 */ stb r7, 0(r3) +/* 800AFB08 000ACA48 80 8D 95 B8 */ lwz r4, __GDCurrentDL@sda21(r13) +/* 800AFB0C 000ACA4C 80 64 00 08 */ lwz r3, 8(r4) +/* 800AFB10 000ACA50 38 03 00 01 */ addi r0, r3, 1 +/* 800AFB14 000ACA54 90 04 00 08 */ stw r0, 8(r4) +/* 800AFB18 000ACA58 98 C3 00 00 */ stb r6, 0(r3) +/* 800AFB1C 000ACA5C 80 8D 95 B8 */ lwz r4, __GDCurrentDL@sda21(r13) +/* 800AFB20 000ACA60 80 64 00 08 */ lwz r3, 8(r4) +/* 800AFB24 000ACA64 80 04 00 0C */ lwz r0, 0xc(r4) +/* 800AFB28 000ACA68 38 63 00 01 */ addi r3, r3, 1 +/* 800AFB2C 000ACA6C 7C 03 00 40 */ cmplw r3, r0 +/* 800AFB30 000ACA70 40 81 00 08 */ ble lbl_800AFB38 +/* 800AFB34 000ACA74 4B FF F6 21 */ bl GDOverflowed +lbl_800AFB38: +/* 800AFB38 000ACA78 80 8D 95 B8 */ lwz r4, __GDCurrentDL@sda21(r13) +/* 800AFB3C 000ACA7C 38 A0 00 08 */ li r5, 8 +/* 800AFB40 000ACA80 80 64 00 08 */ lwz r3, 8(r4) +/* 800AFB44 000ACA84 38 03 00 01 */ addi r0, r3, 1 +/* 800AFB48 000ACA88 90 04 00 08 */ stw r0, 8(r4) +/* 800AFB4C 000ACA8C 98 A3 00 00 */ stb r5, 0(r3) +/* 800AFB50 000ACA90 80 8D 95 B8 */ lwz r4, __GDCurrentDL@sda21(r13) +/* 800AFB54 000ACA94 80 64 00 08 */ lwz r3, 8(r4) +/* 800AFB58 000ACA98 80 04 00 0C */ lwz r0, 0xc(r4) +/* 800AFB5C 000ACA9C 38 63 00 01 */ addi r3, r3, 1 +/* 800AFB60 000ACAA0 7C 03 00 40 */ cmplw r3, r0 +/* 800AFB64 000ACAA4 40 81 00 08 */ ble lbl_800AFB6C +/* 800AFB68 000ACAA8 4B FF F5 ED */ bl GDOverflowed +lbl_800AFB6C: +/* 800AFB6C 000ACAAC 80 61 00 10 */ lwz r3, 0x10(r1) +/* 800AFB70 000ACAB0 80 8D 95 B8 */ lwz r4, __GDCurrentDL@sda21(r13) +/* 800AFB74 000ACAB4 38 A3 00 80 */ addi r5, r3, 0x80 +/* 800AFB78 000ACAB8 80 64 00 08 */ lwz r3, 8(r4) +/* 800AFB7C 000ACABC 38 03 00 01 */ addi r0, r3, 1 +/* 800AFB80 000ACAC0 90 04 00 08 */ stw r0, 8(r4) +/* 800AFB84 000ACAC4 98 A3 00 00 */ stb r5, 0(r3) +/* 800AFB88 000ACAC8 80 8D 95 B8 */ lwz r4, __GDCurrentDL@sda21(r13) +/* 800AFB8C 000ACACC 80 64 00 08 */ lwz r3, 8(r4) +/* 800AFB90 000ACAD0 80 04 00 0C */ lwz r0, 0xc(r4) +/* 800AFB94 000ACAD4 38 63 00 04 */ addi r3, r3, 4 +/* 800AFB98 000ACAD8 7C 03 00 40 */ cmplw r3, r0 +/* 800AFB9C 000ACADC 40 81 00 08 */ ble lbl_800AFBA4 +/* 800AFBA0 000ACAE0 4B FF F5 B5 */ bl GDOverflowed +lbl_800AFBA4: +/* 800AFBA4 000ACAE4 80 01 00 20 */ lwz r0, 0x20(r1) +/* 800AFBA8 000ACAE8 57 27 98 18 */ slwi r7, r25, 0x13 +/* 800AFBAC 000ACAEC 80 C1 00 18 */ lwz r6, 0x18(r1) +/* 800AFBB0 000ACAF0 54 03 08 3C */ slwi r3, r0, 1 +/* 800AFBB4 000ACAF4 80 01 00 1C */ lwz r0, 0x1c(r1) +/* 800AFBB8 000ACAF8 80 8D 95 B8 */ lwz r4, __GDCurrentDL@sda21(r13) +/* 800AFBBC 000ACAFC 54 C6 48 2C */ slwi r6, r6, 9 +/* 800AFBC0 000ACB00 54 05 20 36 */ slwi r5, r0, 4 +/* 800AFBC4 000ACB04 80 01 00 24 */ lwz r0, 0x24(r1) +/* 800AFBC8 000ACB08 7C 00 1B 78 */ or r0, r0, r3 +/* 800AFBCC 000ACB0C 80 64 00 08 */ lwz r3, 8(r4) +/* 800AFBD0 000ACB10 7C A5 03 78 */ or r5, r5, r0 +/* 800AFBD4 000ACB14 80 01 00 14 */ lwz r0, 0x14(r1) +/* 800AFBD8 000ACB18 7C C5 2B 78 */ or r5, r6, r5 +/* 800AFBDC 000ACB1C 54 00 50 2A */ slwi r0, r0, 0xa +/* 800AFBE0 000ACB20 7C 00 2B 78 */ or r0, r0, r5 +/* 800AFBE4 000ACB24 57 06 68 24 */ slwi r6, r24, 0xd +/* 800AFBE8 000ACB28 7C C6 03 78 */ or r6, r6, r0 +/* 800AFBEC 000ACB2C 38 03 00 01 */ addi r0, r3, 1 +/* 800AFBF0 000ACB30 90 04 00 08 */ stw r0, 8(r4) +/* 800AFBF4 000ACB34 56 E5 90 1A */ slwi r5, r23, 0x12 +/* 800AFBF8 000ACB38 7C A0 33 78 */ or r0, r5, r6 +/* 800AFBFC 000ACB3C 56 84 B0 12 */ slwi r4, r20, 0x16 +/* 800AFC00 000ACB40 7C E0 03 78 */ or r0, r7, r0 +/* 800AFC04 000ACB44 7C 80 03 78 */ or r0, r4, r0 +/* 800AFC08 000ACB48 56 A5 D8 08 */ slwi r5, r21, 0x1b +/* 800AFC0C 000ACB4C 56 C4 E0 06 */ slwi r4, r22, 0x1c +/* 800AFC10 000ACB50 7C A0 03 78 */ or r0, r5, r0 +/* 800AFC14 000ACB54 7C 80 03 78 */ or r0, r4, r0 +/* 800AFC18 000ACB58 64 00 80 00 */ oris r0, r0, 0x8000 +/* 800AFC1C 000ACB5C 54 04 46 3E */ srwi r4, r0, 0x18 +/* 800AFC20 000ACB60 98 83 00 00 */ stb r4, 0(r3) +/* 800AFC24 000ACB64 54 07 86 3E */ rlwinm r7, r0, 0x10, 0x18, 0x1f +/* 800AFC28 000ACB68 54 03 C6 3E */ rlwinm r3, r0, 0x18, 0x18, 0x1f +/* 800AFC2C 000ACB6C 80 CD 95 B8 */ lwz r6, __GDCurrentDL@sda21(r13) +/* 800AFC30 000ACB70 80 A6 00 08 */ lwz r5, 8(r6) +/* 800AFC34 000ACB74 38 85 00 01 */ addi r4, r5, 1 +/* 800AFC38 000ACB78 90 86 00 08 */ stw r4, 8(r6) +/* 800AFC3C 000ACB7C 98 E5 00 00 */ stb r7, 0(r5) +/* 800AFC40 000ACB80 80 AD 95 B8 */ lwz r5, __GDCurrentDL@sda21(r13) +/* 800AFC44 000ACB84 80 85 00 08 */ lwz r4, 8(r5) +/* 800AFC48 000ACB88 38 C4 00 01 */ addi r6, r4, 1 +/* 800AFC4C 000ACB8C 90 C5 00 08 */ stw r6, 8(r5) +/* 800AFC50 000ACB90 98 64 00 00 */ stb r3, 0(r4) +/* 800AFC54 000ACB94 80 8D 95 B8 */ lwz r4, __GDCurrentDL@sda21(r13) +/* 800AFC58 000ACB98 80 64 00 08 */ lwz r3, 8(r4) +/* 800AFC5C 000ACB9C 38 A3 00 01 */ addi r5, r3, 1 +/* 800AFC60 000ACBA0 90 A4 00 08 */ stw r5, 8(r4) +/* 800AFC64 000ACBA4 98 03 00 00 */ stb r0, 0(r3) +/* 800AFC68 000ACBA8 80 8D 95 B8 */ lwz r4, __GDCurrentDL@sda21(r13) +/* 800AFC6C 000ACBAC 80 64 00 08 */ lwz r3, 8(r4) +/* 800AFC70 000ACBB0 80 04 00 0C */ lwz r0, 0xc(r4) +/* 800AFC74 000ACBB4 38 63 00 01 */ addi r3, r3, 1 +/* 800AFC78 000ACBB8 7C 03 00 40 */ cmplw r3, r0 +/* 800AFC7C 000ACBBC 40 81 00 08 */ ble lbl_800AFC84 +/* 800AFC80 000ACBC0 4B FF F4 D5 */ bl GDOverflowed +lbl_800AFC84: +/* 800AFC84 000ACBC4 80 8D 95 B8 */ lwz r4, __GDCurrentDL@sda21(r13) +/* 800AFC88 000ACBC8 38 A0 00 08 */ li r5, 8 +/* 800AFC8C 000ACBCC 80 64 00 08 */ lwz r3, 8(r4) +/* 800AFC90 000ACBD0 38 03 00 01 */ addi r0, r3, 1 +/* 800AFC94 000ACBD4 90 04 00 08 */ stw r0, 8(r4) +/* 800AFC98 000ACBD8 98 A3 00 00 */ stb r5, 0(r3) +/* 800AFC9C 000ACBDC 80 8D 95 B8 */ lwz r4, __GDCurrentDL@sda21(r13) +/* 800AFCA0 000ACBE0 80 64 00 08 */ lwz r3, 8(r4) +/* 800AFCA4 000ACBE4 80 04 00 0C */ lwz r0, 0xc(r4) +/* 800AFCA8 000ACBE8 38 63 00 01 */ addi r3, r3, 1 +/* 800AFCAC 000ACBEC 7C 03 00 40 */ cmplw r3, r0 +/* 800AFCB0 000ACBF0 40 81 00 08 */ ble lbl_800AFCB8 +/* 800AFCB4 000ACBF4 4B FF F4 A1 */ bl GDOverflowed +lbl_800AFCB8: +/* 800AFCB8 000ACBF8 80 81 00 10 */ lwz r4, 0x10(r1) +/* 800AFCBC 000ACBFC 80 6D 95 B8 */ lwz r3, __GDCurrentDL@sda21(r13) +/* 800AFCC0 000ACC00 38 A4 00 90 */ addi r5, r4, 0x90 +/* 800AFCC4 000ACC04 80 83 00 08 */ lwz r4, 8(r3) +/* 800AFCC8 000ACC08 38 04 00 01 */ addi r0, r4, 1 +/* 800AFCCC 000ACC0C 90 03 00 08 */ stw r0, 8(r3) +/* 800AFCD0 000ACC10 98 A4 00 00 */ stb r5, 0(r4) +/* 800AFCD4 000ACC14 80 8D 95 B8 */ lwz r4, __GDCurrentDL@sda21(r13) +/* 800AFCD8 000ACC18 80 64 00 08 */ lwz r3, 8(r4) +/* 800AFCDC 000ACC1C 80 04 00 0C */ lwz r0, 0xc(r4) +/* 800AFCE0 000ACC20 38 63 00 04 */ addi r3, r3, 4 +/* 800AFCE4 000ACC24 7C 03 00 40 */ cmplw r3, r0 +/* 800AFCE8 000ACC28 40 81 00 08 */ ble lbl_800AFCF0 +/* 800AFCEC 000ACC2C 4B FF F4 69 */ bl GDOverflowed +lbl_800AFCF0: +/* 800AFCF0 000ACC30 55 E0 28 34 */ slwi r0, r15, 5 +/* 800AFCF4 000ACC34 80 6D 95 B8 */ lwz r3, __GDCurrentDL@sda21(r13) +/* 800AFCF8 000ACC38 56 04 30 32 */ slwi r4, r16, 6 +/* 800AFCFC 000ACC3C 7D C0 03 78 */ or r0, r14, r0 +/* 800AFD00 000ACC40 80 A3 00 08 */ lwz r5, 8(r3) +/* 800AFD04 000ACC44 7C 80 03 78 */ or r0, r4, r0 +/* 800AFD08 000ACC48 56 26 48 2C */ slwi r6, r17, 9 +/* 800AFD0C 000ACC4C 7C C0 03 78 */ or r0, r6, r0 +/* 800AFD10 000ACC50 56 44 70 22 */ slwi r4, r18, 0xe +/* 800AFD14 000ACC54 7C 84 03 78 */ or r4, r4, r0 +/* 800AFD18 000ACC58 38 05 00 01 */ addi r0, r5, 1 +/* 800AFD1C 000ACC5C 90 03 00 08 */ stw r0, 8(r3) +/* 800AFD20 000ACC60 56 66 78 20 */ slwi r6, r19, 0xf +/* 800AFD24 000ACC64 7C C0 23 78 */ or r0, r6, r4 +/* 800AFD28 000ACC68 57 47 90 1A */ slwi r7, r26, 0x12 +/* 800AFD2C 000ACC6C 57 63 B8 10 */ slwi r3, r27, 0x17 +/* 800AFD30 000ACC70 7C E0 03 78 */ or r0, r7, r0 +/* 800AFD34 000ACC74 7C 60 03 78 */ or r0, r3, r0 +/* 800AFD38 000ACC78 57 84 C0 0E */ slwi r4, r28, 0x18 +/* 800AFD3C 000ACC7C 57 A3 D8 08 */ slwi r3, r29, 0x1b +/* 800AFD40 000ACC80 7C 80 03 78 */ or r0, r4, r0 +/* 800AFD44 000ACC84 7C 60 03 78 */ or r0, r3, r0 +/* 800AFD48 000ACC88 54 03 46 3E */ srwi r3, r0, 0x18 +/* 800AFD4C 000ACC8C 98 65 00 00 */ stb r3, 0(r5) +/* 800AFD50 000ACC90 54 07 86 3E */ rlwinm r7, r0, 0x10, 0x18, 0x1f +/* 800AFD54 000ACC94 54 06 C6 3E */ rlwinm r6, r0, 0x18, 0x18, 0x1f +/* 800AFD58 000ACC98 80 AD 95 B8 */ lwz r5, __GDCurrentDL@sda21(r13) +/* 800AFD5C 000ACC9C 80 85 00 08 */ lwz r4, 8(r5) +/* 800AFD60 000ACCA0 38 64 00 01 */ addi r3, r4, 1 +/* 800AFD64 000ACCA4 90 65 00 08 */ stw r3, 8(r5) +/* 800AFD68 000ACCA8 98 E4 00 00 */ stb r7, 0(r4) +/* 800AFD6C 000ACCAC 80 AD 95 B8 */ lwz r5, __GDCurrentDL@sda21(r13) +/* 800AFD70 000ACCB0 80 85 00 08 */ lwz r4, 8(r5) +/* 800AFD74 000ACCB4 38 64 00 01 */ addi r3, r4, 1 +/* 800AFD78 000ACCB8 90 65 00 08 */ stw r3, 8(r5) +/* 800AFD7C 000ACCBC 98 C4 00 00 */ stb r6, 0(r4) +/* 800AFD80 000ACCC0 80 AD 95 B8 */ lwz r5, __GDCurrentDL@sda21(r13) +/* 800AFD84 000ACCC4 80 85 00 08 */ lwz r4, 8(r5) +/* 800AFD88 000ACCC8 38 64 00 01 */ addi r3, r4, 1 +/* 800AFD8C 000ACCCC 90 65 00 08 */ stw r3, 8(r5) +/* 800AFD90 000ACCD0 98 04 00 00 */ stb r0, 0(r4) +/* 800AFD94 000ACCD4 B9 C1 00 58 */ lmw r14, 0x58(r1) +/* 800AFD98 000ACCD8 80 01 00 A4 */ lwz r0, 0xa4(r1) +/* 800AFD9C 000ACCDC 38 21 00 A0 */ addi r1, r1, 0xa0 +/* 800AFDA0 000ACCE0 7C 08 03 A6 */ mtlr r0 +/* 800AFDA4 000ACCE4 4E 80 00 20 */ blr + +.global GDSetArray +GDSetArray: +/* 800AFDA8 000ACCE8 7C 08 02 A6 */ mflr r0 +/* 800AFDAC 000ACCEC 2C 03 00 19 */ cmpwi r3, 0x19 +/* 800AFDB0 000ACCF0 90 01 00 04 */ stw r0, 4(r1) +/* 800AFDB4 000ACCF4 94 21 FF D8 */ stwu r1, -0x28(r1) +/* 800AFDB8 000ACCF8 93 E1 00 24 */ stw r31, 0x24(r1) +/* 800AFDBC 000ACCFC 93 C1 00 20 */ stw r30, 0x20(r1) +/* 800AFDC0 000ACD00 3B C5 00 00 */ addi r30, r5, 0 +/* 800AFDC4 000ACD04 93 A1 00 1C */ stw r29, 0x1c(r1) +/* 800AFDC8 000ACD08 3B A4 00 00 */ addi r29, r4, 0 +/* 800AFDCC 000ACD0C 40 82 00 0C */ bne lbl_800AFDD8 +/* 800AFDD0 000ACD10 3B E0 00 01 */ li r31, 1 +/* 800AFDD4 000ACD14 48 00 00 08 */ b lbl_800AFDDC +lbl_800AFDD8: +/* 800AFDD8 000ACD18 3B E3 FF F7 */ addi r31, r3, -9 +lbl_800AFDDC: +/* 800AFDDC 000ACD1C 80 8D 95 B8 */ lwz r4, __GDCurrentDL@sda21(r13) +/* 800AFDE0 000ACD20 80 64 00 08 */ lwz r3, 8(r4) +/* 800AFDE4 000ACD24 80 04 00 0C */ lwz r0, 0xc(r4) +/* 800AFDE8 000ACD28 38 63 00 01 */ addi r3, r3, 1 +/* 800AFDEC 000ACD2C 7C 03 00 40 */ cmplw r3, r0 +/* 800AFDF0 000ACD30 40 81 00 08 */ ble lbl_800AFDF8 +/* 800AFDF4 000ACD34 4B FF F3 61 */ bl GDOverflowed +lbl_800AFDF8: +/* 800AFDF8 000ACD38 80 8D 95 B8 */ lwz r4, __GDCurrentDL@sda21(r13) +/* 800AFDFC 000ACD3C 38 A0 00 08 */ li r5, 8 +/* 800AFE00 000ACD40 80 64 00 08 */ lwz r3, 8(r4) +/* 800AFE04 000ACD44 38 03 00 01 */ addi r0, r3, 1 +/* 800AFE08 000ACD48 90 04 00 08 */ stw r0, 8(r4) +/* 800AFE0C 000ACD4C 98 A3 00 00 */ stb r5, 0(r3) +/* 800AFE10 000ACD50 80 8D 95 B8 */ lwz r4, __GDCurrentDL@sda21(r13) +/* 800AFE14 000ACD54 80 64 00 08 */ lwz r3, 8(r4) +/* 800AFE18 000ACD58 80 04 00 0C */ lwz r0, 0xc(r4) +/* 800AFE1C 000ACD5C 38 63 00 01 */ addi r3, r3, 1 +/* 800AFE20 000ACD60 7C 03 00 40 */ cmplw r3, r0 +/* 800AFE24 000ACD64 40 81 00 08 */ ble lbl_800AFE2C +/* 800AFE28 000ACD68 4B FF F3 2D */ bl GDOverflowed +lbl_800AFE2C: +/* 800AFE2C 000ACD6C 80 8D 95 B8 */ lwz r4, __GDCurrentDL@sda21(r13) +/* 800AFE30 000ACD70 38 BF 00 A0 */ addi r5, r31, 0xa0 +/* 800AFE34 000ACD74 80 64 00 08 */ lwz r3, 8(r4) +/* 800AFE38 000ACD78 38 03 00 01 */ addi r0, r3, 1 +/* 800AFE3C 000ACD7C 90 04 00 08 */ stw r0, 8(r4) +/* 800AFE40 000ACD80 98 A3 00 00 */ stb r5, 0(r3) +/* 800AFE44 000ACD84 80 8D 95 B8 */ lwz r4, __GDCurrentDL@sda21(r13) +/* 800AFE48 000ACD88 80 64 00 08 */ lwz r3, 8(r4) +/* 800AFE4C 000ACD8C 80 04 00 0C */ lwz r0, 0xc(r4) +/* 800AFE50 000ACD90 38 63 00 04 */ addi r3, r3, 4 +/* 800AFE54 000ACD94 7C 03 00 40 */ cmplw r3, r0 +/* 800AFE58 000ACD98 40 81 00 08 */ ble lbl_800AFE60 +/* 800AFE5C 000ACD9C 4B FF F2 F9 */ bl GDOverflowed +lbl_800AFE60: +/* 800AFE60 000ACDA0 80 8D 95 B8 */ lwz r4, __GDCurrentDL@sda21(r13) +/* 800AFE64 000ACDA4 3D 1D 80 00 */ addis r8, r29, 0x8000 +/* 800AFE68 000ACDA8 55 07 46 3E */ srwi r7, r8, 0x18 +/* 800AFE6C 000ACDAC 80 64 00 08 */ lwz r3, 8(r4) +/* 800AFE70 000ACDB0 55 06 86 3E */ rlwinm r6, r8, 0x10, 0x18, 0x1f +/* 800AFE74 000ACDB4 55 05 C6 3E */ rlwinm r5, r8, 0x18, 0x18, 0x1f +/* 800AFE78 000ACDB8 38 03 00 01 */ addi r0, r3, 1 +/* 800AFE7C 000ACDBC 90 04 00 08 */ stw r0, 8(r4) +/* 800AFE80 000ACDC0 98 E3 00 00 */ stb r7, 0(r3) +/* 800AFE84 000ACDC4 80 8D 95 B8 */ lwz r4, __GDCurrentDL@sda21(r13) +/* 800AFE88 000ACDC8 80 64 00 08 */ lwz r3, 8(r4) +/* 800AFE8C 000ACDCC 38 03 00 01 */ addi r0, r3, 1 +/* 800AFE90 000ACDD0 90 04 00 08 */ stw r0, 8(r4) +/* 800AFE94 000ACDD4 98 C3 00 00 */ stb r6, 0(r3) +/* 800AFE98 000ACDD8 80 8D 95 B8 */ lwz r4, __GDCurrentDL@sda21(r13) +/* 800AFE9C 000ACDDC 80 64 00 08 */ lwz r3, 8(r4) +/* 800AFEA0 000ACDE0 38 03 00 01 */ addi r0, r3, 1 +/* 800AFEA4 000ACDE4 90 04 00 08 */ stw r0, 8(r4) +/* 800AFEA8 000ACDE8 98 A3 00 00 */ stb r5, 0(r3) +/* 800AFEAC 000ACDEC 80 8D 95 B8 */ lwz r4, __GDCurrentDL@sda21(r13) +/* 800AFEB0 000ACDF0 80 64 00 08 */ lwz r3, 8(r4) +/* 800AFEB4 000ACDF4 38 03 00 01 */ addi r0, r3, 1 +/* 800AFEB8 000ACDF8 90 04 00 08 */ stw r0, 8(r4) +/* 800AFEBC 000ACDFC 99 03 00 00 */ stb r8, 0(r3) +/* 800AFEC0 000ACE00 80 8D 95 B8 */ lwz r4, __GDCurrentDL@sda21(r13) +/* 800AFEC4 000ACE04 80 64 00 08 */ lwz r3, 8(r4) +/* 800AFEC8 000ACE08 80 04 00 0C */ lwz r0, 0xc(r4) +/* 800AFECC 000ACE0C 38 63 00 01 */ addi r3, r3, 1 +/* 800AFED0 000ACE10 7C 03 00 40 */ cmplw r3, r0 +/* 800AFED4 000ACE14 40 81 00 08 */ ble lbl_800AFEDC +/* 800AFED8 000ACE18 4B FF F2 7D */ bl GDOverflowed +lbl_800AFEDC: +/* 800AFEDC 000ACE1C 80 8D 95 B8 */ lwz r4, __GDCurrentDL@sda21(r13) +/* 800AFEE0 000ACE20 38 A0 00 08 */ li r5, 8 +/* 800AFEE4 000ACE24 80 64 00 08 */ lwz r3, 8(r4) +/* 800AFEE8 000ACE28 38 03 00 01 */ addi r0, r3, 1 +/* 800AFEEC 000ACE2C 90 04 00 08 */ stw r0, 8(r4) +/* 800AFEF0 000ACE30 98 A3 00 00 */ stb r5, 0(r3) +/* 800AFEF4 000ACE34 80 8D 95 B8 */ lwz r4, __GDCurrentDL@sda21(r13) +/* 800AFEF8 000ACE38 80 64 00 08 */ lwz r3, 8(r4) +/* 800AFEFC 000ACE3C 80 04 00 0C */ lwz r0, 0xc(r4) +/* 800AFF00 000ACE40 38 63 00 01 */ addi r3, r3, 1 +/* 800AFF04 000ACE44 7C 03 00 40 */ cmplw r3, r0 +/* 800AFF08 000ACE48 40 81 00 08 */ ble lbl_800AFF10 +/* 800AFF0C 000ACE4C 4B FF F2 49 */ bl GDOverflowed +lbl_800AFF10: +/* 800AFF10 000ACE50 80 8D 95 B8 */ lwz r4, __GDCurrentDL@sda21(r13) +/* 800AFF14 000ACE54 38 BF 00 B0 */ addi r5, r31, 0xb0 +/* 800AFF18 000ACE58 80 64 00 08 */ lwz r3, 8(r4) +/* 800AFF1C 000ACE5C 38 03 00 01 */ addi r0, r3, 1 +/* 800AFF20 000ACE60 90 04 00 08 */ stw r0, 8(r4) +/* 800AFF24 000ACE64 98 A3 00 00 */ stb r5, 0(r3) +/* 800AFF28 000ACE68 80 8D 95 B8 */ lwz r4, __GDCurrentDL@sda21(r13) +/* 800AFF2C 000ACE6C 80 64 00 08 */ lwz r3, 8(r4) +/* 800AFF30 000ACE70 80 04 00 0C */ lwz r0, 0xc(r4) +/* 800AFF34 000ACE74 38 63 00 04 */ addi r3, r3, 4 +/* 800AFF38 000ACE78 7C 03 00 40 */ cmplw r3, r0 +/* 800AFF3C 000ACE7C 40 81 00 08 */ ble lbl_800AFF44 +/* 800AFF40 000ACE80 4B FF F2 15 */ bl GDOverflowed +lbl_800AFF44: +/* 800AFF44 000ACE84 80 8D 95 B8 */ lwz r4, __GDCurrentDL@sda21(r13) +/* 800AFF48 000ACE88 38 A0 00 00 */ li r5, 0 +/* 800AFF4C 000ACE8C 80 64 00 08 */ lwz r3, 8(r4) +/* 800AFF50 000ACE90 38 03 00 01 */ addi r0, r3, 1 +/* 800AFF54 000ACE94 90 04 00 08 */ stw r0, 8(r4) +/* 800AFF58 000ACE98 98 A3 00 00 */ stb r5, 0(r3) +/* 800AFF5C 000ACE9C 80 8D 95 B8 */ lwz r4, __GDCurrentDL@sda21(r13) +/* 800AFF60 000ACEA0 80 64 00 08 */ lwz r3, 8(r4) +/* 800AFF64 000ACEA4 38 03 00 01 */ addi r0, r3, 1 +/* 800AFF68 000ACEA8 90 04 00 08 */ stw r0, 8(r4) +/* 800AFF6C 000ACEAC 98 A3 00 00 */ stb r5, 0(r3) +/* 800AFF70 000ACEB0 80 8D 95 B8 */ lwz r4, __GDCurrentDL@sda21(r13) +/* 800AFF74 000ACEB4 80 64 00 08 */ lwz r3, 8(r4) +/* 800AFF78 000ACEB8 38 03 00 01 */ addi r0, r3, 1 +/* 800AFF7C 000ACEBC 90 04 00 08 */ stw r0, 8(r4) +/* 800AFF80 000ACEC0 98 A3 00 00 */ stb r5, 0(r3) +/* 800AFF84 000ACEC4 80 8D 95 B8 */ lwz r4, __GDCurrentDL@sda21(r13) +/* 800AFF88 000ACEC8 80 64 00 08 */ lwz r3, 8(r4) +/* 800AFF8C 000ACECC 38 03 00 01 */ addi r0, r3, 1 +/* 800AFF90 000ACED0 90 04 00 08 */ stw r0, 8(r4) +/* 800AFF94 000ACED4 9B C3 00 00 */ stb r30, 0(r3) +/* 800AFF98 000ACED8 80 01 00 2C */ lwz r0, 0x2c(r1) +/* 800AFF9C 000ACEDC 83 E1 00 24 */ lwz r31, 0x24(r1) +/* 800AFFA0 000ACEE0 83 C1 00 20 */ lwz r30, 0x20(r1) +/* 800AFFA4 000ACEE4 83 A1 00 1C */ lwz r29, 0x1c(r1) +/* 800AFFA8 000ACEE8 38 21 00 28 */ addi r1, r1, 0x28 +/* 800AFFAC 000ACEEC 7C 08 03 A6 */ mtlr r0 +/* 800AFFB0 000ACEF0 4E 80 00 20 */ blr + +.global GDSetArrayRaw +GDSetArrayRaw: +/* 800AFFB4 000ACEF4 7C 08 02 A6 */ mflr r0 +/* 800AFFB8 000ACEF8 2C 03 00 19 */ cmpwi r3, 0x19 +/* 800AFFBC 000ACEFC 90 01 00 04 */ stw r0, 4(r1) +/* 800AFFC0 000ACF00 94 21 FF D8 */ stwu r1, -0x28(r1) +/* 800AFFC4 000ACF04 93 E1 00 24 */ stw r31, 0x24(r1) +/* 800AFFC8 000ACF08 93 C1 00 20 */ stw r30, 0x20(r1) +/* 800AFFCC 000ACF0C 3B C5 00 00 */ addi r30, r5, 0 +/* 800AFFD0 000ACF10 93 A1 00 1C */ stw r29, 0x1c(r1) +/* 800AFFD4 000ACF14 3B A4 00 00 */ addi r29, r4, 0 +/* 800AFFD8 000ACF18 40 82 00 0C */ bne lbl_800AFFE4 +/* 800AFFDC 000ACF1C 3B E0 00 01 */ li r31, 1 +/* 800AFFE0 000ACF20 48 00 00 08 */ b lbl_800AFFE8 +lbl_800AFFE4: +/* 800AFFE4 000ACF24 3B E3 FF F7 */ addi r31, r3, -9 +lbl_800AFFE8: +/* 800AFFE8 000ACF28 80 8D 95 B8 */ lwz r4, __GDCurrentDL@sda21(r13) +/* 800AFFEC 000ACF2C 80 64 00 08 */ lwz r3, 8(r4) +/* 800AFFF0 000ACF30 80 04 00 0C */ lwz r0, 0xc(r4) +/* 800AFFF4 000ACF34 38 63 00 01 */ addi r3, r3, 1 +/* 800AFFF8 000ACF38 7C 03 00 40 */ cmplw r3, r0 +/* 800AFFFC 000ACF3C 40 81 00 08 */ ble lbl_800B0004 +/* 800B0000 000ACF40 4B FF F1 55 */ bl GDOverflowed +lbl_800B0004: +/* 800B0004 000ACF44 80 8D 95 B8 */ lwz r4, __GDCurrentDL@sda21(r13) +/* 800B0008 000ACF48 38 A0 00 08 */ li r5, 8 +/* 800B000C 000ACF4C 80 64 00 08 */ lwz r3, 8(r4) +/* 800B0010 000ACF50 38 03 00 01 */ addi r0, r3, 1 +/* 800B0014 000ACF54 90 04 00 08 */ stw r0, 8(r4) +/* 800B0018 000ACF58 98 A3 00 00 */ stb r5, 0(r3) +/* 800B001C 000ACF5C 80 8D 95 B8 */ lwz r4, __GDCurrentDL@sda21(r13) +/* 800B0020 000ACF60 80 64 00 08 */ lwz r3, 8(r4) +/* 800B0024 000ACF64 80 04 00 0C */ lwz r0, 0xc(r4) +/* 800B0028 000ACF68 38 63 00 01 */ addi r3, r3, 1 +/* 800B002C 000ACF6C 7C 03 00 40 */ cmplw r3, r0 +/* 800B0030 000ACF70 40 81 00 08 */ ble lbl_800B0038 +/* 800B0034 000ACF74 4B FF F1 21 */ bl GDOverflowed +lbl_800B0038: +/* 800B0038 000ACF78 80 8D 95 B8 */ lwz r4, __GDCurrentDL@sda21(r13) +/* 800B003C 000ACF7C 38 BF 00 A0 */ addi r5, r31, 0xa0 +/* 800B0040 000ACF80 80 64 00 08 */ lwz r3, 8(r4) +/* 800B0044 000ACF84 38 03 00 01 */ addi r0, r3, 1 +/* 800B0048 000ACF88 90 04 00 08 */ stw r0, 8(r4) +/* 800B004C 000ACF8C 98 A3 00 00 */ stb r5, 0(r3) +/* 800B0050 000ACF90 80 8D 95 B8 */ lwz r4, __GDCurrentDL@sda21(r13) +/* 800B0054 000ACF94 80 64 00 08 */ lwz r3, 8(r4) +/* 800B0058 000ACF98 80 04 00 0C */ lwz r0, 0xc(r4) +/* 800B005C 000ACF9C 38 63 00 04 */ addi r3, r3, 4 +/* 800B0060 000ACFA0 7C 03 00 40 */ cmplw r3, r0 +/* 800B0064 000ACFA4 40 81 00 08 */ ble lbl_800B006C +/* 800B0068 000ACFA8 4B FF F0 ED */ bl GDOverflowed +lbl_800B006C: +/* 800B006C 000ACFAC 80 8D 95 B8 */ lwz r4, __GDCurrentDL@sda21(r13) +/* 800B0070 000ACFB0 57 A7 46 3E */ srwi r7, r29, 0x18 +/* 800B0074 000ACFB4 57 A6 86 3E */ rlwinm r6, r29, 0x10, 0x18, 0x1f +/* 800B0078 000ACFB8 80 64 00 08 */ lwz r3, 8(r4) +/* 800B007C 000ACFBC 57 A5 C6 3E */ rlwinm r5, r29, 0x18, 0x18, 0x1f +/* 800B0080 000ACFC0 38 03 00 01 */ addi r0, r3, 1 +/* 800B0084 000ACFC4 90 04 00 08 */ stw r0, 8(r4) +/* 800B0088 000ACFC8 98 E3 00 00 */ stb r7, 0(r3) +/* 800B008C 000ACFCC 80 8D 95 B8 */ lwz r4, __GDCurrentDL@sda21(r13) +/* 800B0090 000ACFD0 80 64 00 08 */ lwz r3, 8(r4) +/* 800B0094 000ACFD4 38 03 00 01 */ addi r0, r3, 1 +/* 800B0098 000ACFD8 90 04 00 08 */ stw r0, 8(r4) +/* 800B009C 000ACFDC 98 C3 00 00 */ stb r6, 0(r3) +/* 800B00A0 000ACFE0 80 8D 95 B8 */ lwz r4, __GDCurrentDL@sda21(r13) +/* 800B00A4 000ACFE4 80 64 00 08 */ lwz r3, 8(r4) +/* 800B00A8 000ACFE8 38 03 00 01 */ addi r0, r3, 1 +/* 800B00AC 000ACFEC 90 04 00 08 */ stw r0, 8(r4) +/* 800B00B0 000ACFF0 98 A3 00 00 */ stb r5, 0(r3) +/* 800B00B4 000ACFF4 80 8D 95 B8 */ lwz r4, __GDCurrentDL@sda21(r13) +/* 800B00B8 000ACFF8 80 64 00 08 */ lwz r3, 8(r4) +/* 800B00BC 000ACFFC 38 03 00 01 */ addi r0, r3, 1 +/* 800B00C0 000AD000 90 04 00 08 */ stw r0, 8(r4) +/* 800B00C4 000AD004 9B A3 00 00 */ stb r29, 0(r3) +/* 800B00C8 000AD008 80 8D 95 B8 */ lwz r4, __GDCurrentDL@sda21(r13) +/* 800B00CC 000AD00C 80 64 00 08 */ lwz r3, 8(r4) +/* 800B00D0 000AD010 80 04 00 0C */ lwz r0, 0xc(r4) +/* 800B00D4 000AD014 38 63 00 01 */ addi r3, r3, 1 +/* 800B00D8 000AD018 7C 03 00 40 */ cmplw r3, r0 +/* 800B00DC 000AD01C 40 81 00 08 */ ble lbl_800B00E4 +/* 800B00E0 000AD020 4B FF F0 75 */ bl GDOverflowed +lbl_800B00E4: +/* 800B00E4 000AD024 80 8D 95 B8 */ lwz r4, __GDCurrentDL@sda21(r13) +/* 800B00E8 000AD028 38 A0 00 08 */ li r5, 8 +/* 800B00EC 000AD02C 80 64 00 08 */ lwz r3, 8(r4) +/* 800B00F0 000AD030 38 03 00 01 */ addi r0, r3, 1 +/* 800B00F4 000AD034 90 04 00 08 */ stw r0, 8(r4) +/* 800B00F8 000AD038 98 A3 00 00 */ stb r5, 0(r3) +/* 800B00FC 000AD03C 80 8D 95 B8 */ lwz r4, __GDCurrentDL@sda21(r13) +/* 800B0100 000AD040 80 64 00 08 */ lwz r3, 8(r4) +/* 800B0104 000AD044 80 04 00 0C */ lwz r0, 0xc(r4) +/* 800B0108 000AD048 38 63 00 01 */ addi r3, r3, 1 +/* 800B010C 000AD04C 7C 03 00 40 */ cmplw r3, r0 +/* 800B0110 000AD050 40 81 00 08 */ ble lbl_800B0118 +/* 800B0114 000AD054 4B FF F0 41 */ bl GDOverflowed +lbl_800B0118: +/* 800B0118 000AD058 80 8D 95 B8 */ lwz r4, __GDCurrentDL@sda21(r13) +/* 800B011C 000AD05C 38 BF 00 B0 */ addi r5, r31, 0xb0 +/* 800B0120 000AD060 80 64 00 08 */ lwz r3, 8(r4) +/* 800B0124 000AD064 38 03 00 01 */ addi r0, r3, 1 +/* 800B0128 000AD068 90 04 00 08 */ stw r0, 8(r4) +/* 800B012C 000AD06C 98 A3 00 00 */ stb r5, 0(r3) +/* 800B0130 000AD070 80 8D 95 B8 */ lwz r4, __GDCurrentDL@sda21(r13) +/* 800B0134 000AD074 80 64 00 08 */ lwz r3, 8(r4) +/* 800B0138 000AD078 80 04 00 0C */ lwz r0, 0xc(r4) +/* 800B013C 000AD07C 38 63 00 04 */ addi r3, r3, 4 +/* 800B0140 000AD080 7C 03 00 40 */ cmplw r3, r0 +/* 800B0144 000AD084 40 81 00 08 */ ble lbl_800B014C +/* 800B0148 000AD088 4B FF F0 0D */ bl GDOverflowed +lbl_800B014C: +/* 800B014C 000AD08C 80 8D 95 B8 */ lwz r4, __GDCurrentDL@sda21(r13) +/* 800B0150 000AD090 38 A0 00 00 */ li r5, 0 +/* 800B0154 000AD094 80 64 00 08 */ lwz r3, 8(r4) +/* 800B0158 000AD098 38 03 00 01 */ addi r0, r3, 1 +/* 800B015C 000AD09C 90 04 00 08 */ stw r0, 8(r4) +/* 800B0160 000AD0A0 98 A3 00 00 */ stb r5, 0(r3) +/* 800B0164 000AD0A4 80 8D 95 B8 */ lwz r4, __GDCurrentDL@sda21(r13) +/* 800B0168 000AD0A8 80 64 00 08 */ lwz r3, 8(r4) +/* 800B016C 000AD0AC 38 03 00 01 */ addi r0, r3, 1 +/* 800B0170 000AD0B0 90 04 00 08 */ stw r0, 8(r4) +/* 800B0174 000AD0B4 98 A3 00 00 */ stb r5, 0(r3) +/* 800B0178 000AD0B8 80 8D 95 B8 */ lwz r4, __GDCurrentDL@sda21(r13) +/* 800B017C 000AD0BC 80 64 00 08 */ lwz r3, 8(r4) +/* 800B0180 000AD0C0 38 03 00 01 */ addi r0, r3, 1 +/* 800B0184 000AD0C4 90 04 00 08 */ stw r0, 8(r4) +/* 800B0188 000AD0C8 98 A3 00 00 */ stb r5, 0(r3) +/* 800B018C 000AD0CC 80 8D 95 B8 */ lwz r4, __GDCurrentDL@sda21(r13) +/* 800B0190 000AD0D0 80 64 00 08 */ lwz r3, 8(r4) +/* 800B0194 000AD0D4 38 03 00 01 */ addi r0, r3, 1 +/* 800B0198 000AD0D8 90 04 00 08 */ stw r0, 8(r4) +/* 800B019C 000AD0DC 9B C3 00 00 */ stb r30, 0(r3) +/* 800B01A0 000AD0E0 80 01 00 2C */ lwz r0, 0x2c(r1) +/* 800B01A4 000AD0E4 83 E1 00 24 */ lwz r31, 0x24(r1) +/* 800B01A8 000AD0E8 83 C1 00 20 */ lwz r30, 0x20(r1) +/* 800B01AC 000AD0EC 83 A1 00 1C */ lwz r29, 0x1c(r1) +/* 800B01B0 000AD0F0 38 21 00 28 */ addi r1, r1, 0x28 +/* 800B01B4 000AD0F4 7C 08 03 A6 */ mtlr r0 +/* 800B01B8 000AD0F8 4E 80 00 20 */ blr + +.global GDSetCullMode +GDSetCullMode: +/* 800B01BC 000AD0FC 7C 08 02 A6 */ mflr r0 +/* 800B01C0 000AD100 90 01 00 04 */ stw r0, 4(r1) +/* 800B01C4 000AD104 94 21 FF E8 */ stwu r1, -0x18(r1) +/* 800B01C8 000AD108 93 E1 00 14 */ stw r31, 0x14(r1) +/* 800B01CC 000AD10C 7C 7F 1B 78 */ mr r31, r3 +/* 800B01D0 000AD110 80 8D 95 B8 */ lwz r4, __GDCurrentDL@sda21(r13) +/* 800B01D4 000AD114 80 64 00 08 */ lwz r3, 8(r4) +/* 800B01D8 000AD118 80 04 00 0C */ lwz r0, 0xc(r4) +/* 800B01DC 000AD11C 38 63 00 01 */ addi r3, r3, 1 +/* 800B01E0 000AD120 7C 03 00 40 */ cmplw r3, r0 +/* 800B01E4 000AD124 40 81 00 08 */ ble lbl_800B01EC +/* 800B01E8 000AD128 4B FF EF 6D */ bl GDOverflowed +lbl_800B01EC: +/* 800B01EC 000AD12C 80 8D 95 B8 */ lwz r4, __GDCurrentDL@sda21(r13) +/* 800B01F0 000AD130 38 A0 00 61 */ li r5, 0x61 +/* 800B01F4 000AD134 80 64 00 08 */ lwz r3, 8(r4) +/* 800B01F8 000AD138 38 03 00 01 */ addi r0, r3, 1 +/* 800B01FC 000AD13C 90 04 00 08 */ stw r0, 8(r4) +/* 800B0200 000AD140 98 A3 00 00 */ stb r5, 0(r3) +/* 800B0204 000AD144 80 8D 95 B8 */ lwz r4, __GDCurrentDL@sda21(r13) +/* 800B0208 000AD148 80 64 00 08 */ lwz r3, 8(r4) +/* 800B020C 000AD14C 80 04 00 0C */ lwz r0, 0xc(r4) +/* 800B0210 000AD150 38 63 00 04 */ addi r3, r3, 4 +/* 800B0214 000AD154 7C 03 00 40 */ cmplw r3, r0 +/* 800B0218 000AD158 40 81 00 08 */ ble lbl_800B0220 +/* 800B021C 000AD15C 4B FF EF 39 */ bl GDOverflowed +lbl_800B0220: +/* 800B0220 000AD160 80 AD 95 B8 */ lwz r5, __GDCurrentDL@sda21(r13) +/* 800B0224 000AD164 39 00 00 FE */ li r8, 0xfe +/* 800B0228 000AD168 38 E0 00 00 */ li r7, 0 +/* 800B022C 000AD16C 80 85 00 08 */ lwz r4, 8(r5) +/* 800B0230 000AD170 38 C0 00 C0 */ li r6, 0xc0 +/* 800B0234 000AD174 38 6D 82 F0 */ addi r3, r13, cm2hw$400@sda21 +/* 800B0238 000AD178 38 04 00 01 */ addi r0, r4, 1 +/* 800B023C 000AD17C 90 05 00 08 */ stw r0, 8(r5) +/* 800B0240 000AD180 99 04 00 00 */ stb r8, 0(r4) +/* 800B0244 000AD184 80 AD 95 B8 */ lwz r5, __GDCurrentDL@sda21(r13) +/* 800B0248 000AD188 80 85 00 08 */ lwz r4, 8(r5) +/* 800B024C 000AD18C 38 04 00 01 */ addi r0, r4, 1 +/* 800B0250 000AD190 90 05 00 08 */ stw r0, 8(r5) +/* 800B0254 000AD194 98 E4 00 00 */ stb r7, 0(r4) +/* 800B0258 000AD198 80 AD 95 B8 */ lwz r5, __GDCurrentDL@sda21(r13) +/* 800B025C 000AD19C 80 85 00 08 */ lwz r4, 8(r5) +/* 800B0260 000AD1A0 38 04 00 01 */ addi r0, r4, 1 +/* 800B0264 000AD1A4 90 05 00 08 */ stw r0, 8(r5) +/* 800B0268 000AD1A8 98 C4 00 00 */ stb r6, 0(r4) +/* 800B026C 000AD1AC 80 AD 95 B8 */ lwz r5, __GDCurrentDL@sda21(r13) +/* 800B0270 000AD1B0 80 85 00 08 */ lwz r4, 8(r5) +/* 800B0274 000AD1B4 38 04 00 01 */ addi r0, r4, 1 +/* 800B0278 000AD1B8 90 05 00 08 */ stw r0, 8(r5) +/* 800B027C 000AD1BC 98 E4 00 00 */ stb r7, 0(r4) +/* 800B0280 000AD1C0 80 AD 95 B8 */ lwz r5, __GDCurrentDL@sda21(r13) +/* 800B0284 000AD1C4 7C 83 F8 AE */ lbzx r4, r3, r31 +/* 800B0288 000AD1C8 80 65 00 08 */ lwz r3, 8(r5) +/* 800B028C 000AD1CC 80 05 00 0C */ lwz r0, 0xc(r5) +/* 800B0290 000AD1D0 54 9F 70 22 */ slwi r31, r4, 0xe +/* 800B0294 000AD1D4 38 63 00 01 */ addi r3, r3, 1 +/* 800B0298 000AD1D8 7C 03 00 40 */ cmplw r3, r0 +/* 800B029C 000AD1DC 40 81 00 08 */ ble lbl_800B02A4 +/* 800B02A0 000AD1E0 4B FF EE B5 */ bl GDOverflowed +lbl_800B02A4: +/* 800B02A4 000AD1E4 80 8D 95 B8 */ lwz r4, __GDCurrentDL@sda21(r13) +/* 800B02A8 000AD1E8 38 A0 00 61 */ li r5, 0x61 +/* 800B02AC 000AD1EC 80 64 00 08 */ lwz r3, 8(r4) +/* 800B02B0 000AD1F0 38 03 00 01 */ addi r0, r3, 1 +/* 800B02B4 000AD1F4 90 04 00 08 */ stw r0, 8(r4) +/* 800B02B8 000AD1F8 98 A3 00 00 */ stb r5, 0(r3) +/* 800B02BC 000AD1FC 80 8D 95 B8 */ lwz r4, __GDCurrentDL@sda21(r13) +/* 800B02C0 000AD200 80 64 00 08 */ lwz r3, 8(r4) +/* 800B02C4 000AD204 80 04 00 0C */ lwz r0, 0xc(r4) +/* 800B02C8 000AD208 38 63 00 04 */ addi r3, r3, 4 +/* 800B02CC 000AD20C 7C 03 00 40 */ cmplw r3, r0 +/* 800B02D0 000AD210 40 81 00 08 */ ble lbl_800B02D8 +/* 800B02D4 000AD214 4B FF EE 81 */ bl GDOverflowed +lbl_800B02D8: +/* 800B02D8 000AD218 80 8D 95 B8 */ lwz r4, __GDCurrentDL@sda21(r13) +/* 800B02DC 000AD21C 57 E7 46 3E */ srwi r7, r31, 0x18 +/* 800B02E0 000AD220 57 E6 86 3E */ rlwinm r6, r31, 0x10, 0x18, 0x1f +/* 800B02E4 000AD224 80 64 00 08 */ lwz r3, 8(r4) +/* 800B02E8 000AD228 57 E5 C6 3E */ rlwinm r5, r31, 0x18, 0x18, 0x1f +/* 800B02EC 000AD22C 38 03 00 01 */ addi r0, r3, 1 +/* 800B02F0 000AD230 90 04 00 08 */ stw r0, 8(r4) +/* 800B02F4 000AD234 98 E3 00 00 */ stb r7, 0(r3) +/* 800B02F8 000AD238 80 8D 95 B8 */ lwz r4, __GDCurrentDL@sda21(r13) +/* 800B02FC 000AD23C 80 64 00 08 */ lwz r3, 8(r4) +/* 800B0300 000AD240 38 03 00 01 */ addi r0, r3, 1 +/* 800B0304 000AD244 90 04 00 08 */ stw r0, 8(r4) +/* 800B0308 000AD248 98 C3 00 00 */ stb r6, 0(r3) +/* 800B030C 000AD24C 80 8D 95 B8 */ lwz r4, __GDCurrentDL@sda21(r13) +/* 800B0310 000AD250 80 64 00 08 */ lwz r3, 8(r4) +/* 800B0314 000AD254 38 03 00 01 */ addi r0, r3, 1 +/* 800B0318 000AD258 90 04 00 08 */ stw r0, 8(r4) +/* 800B031C 000AD25C 98 A3 00 00 */ stb r5, 0(r3) +/* 800B0320 000AD260 80 8D 95 B8 */ lwz r4, __GDCurrentDL@sda21(r13) +/* 800B0324 000AD264 80 64 00 08 */ lwz r3, 8(r4) +/* 800B0328 000AD268 38 03 00 01 */ addi r0, r3, 1 +/* 800B032C 000AD26C 90 04 00 08 */ stw r0, 8(r4) +/* 800B0330 000AD270 9B E3 00 00 */ stb r31, 0(r3) +/* 800B0334 000AD274 80 01 00 1C */ lwz r0, 0x1c(r1) +/* 800B0338 000AD278 83 E1 00 14 */ lwz r31, 0x14(r1) +/* 800B033C 000AD27C 38 21 00 18 */ addi r1, r1, 0x18 +/* 800B0340 000AD280 7C 08 03 A6 */ mtlr r0 +/* 800B0344 000AD284 4E 80 00 20 */ blr + +.global GDSetGenMode2 +GDSetGenMode2: +/* 800B0348 000AD288 7C 08 02 A6 */ mflr r0 +/* 800B034C 000AD28C 90 01 00 04 */ stw r0, 4(r1) +/* 800B0350 000AD290 94 21 FF D8 */ stwu r1, -0x28(r1) +/* 800B0354 000AD294 BF 61 00 14 */ stmw r27, 0x14(r1) +/* 800B0358 000AD298 3B A3 00 00 */ addi r29, r3, 0 +/* 800B035C 000AD29C 3B 64 00 00 */ addi r27, r4, 0 +/* 800B0360 000AD2A0 7C BE 2B 78 */ mr r30, r5 +/* 800B0364 000AD2A4 3B 86 00 00 */ addi r28, r6, 0 +/* 800B0368 000AD2A8 3B E7 00 00 */ addi r31, r7, 0 +/* 800B036C 000AD2AC 81 0D 95 B8 */ lwz r8, __GDCurrentDL@sda21(r13) +/* 800B0370 000AD2B0 80 68 00 08 */ lwz r3, 8(r8) +/* 800B0374 000AD2B4 80 08 00 0C */ lwz r0, 0xc(r8) +/* 800B0378 000AD2B8 38 63 00 01 */ addi r3, r3, 1 +/* 800B037C 000AD2BC 7C 03 00 40 */ cmplw r3, r0 +/* 800B0380 000AD2C0 40 81 00 08 */ ble lbl_800B0388 +/* 800B0384 000AD2C4 4B FF ED D1 */ bl GDOverflowed +lbl_800B0388: +/* 800B0388 000AD2C8 80 8D 95 B8 */ lwz r4, __GDCurrentDL@sda21(r13) +/* 800B038C 000AD2CC 38 A0 00 61 */ li r5, 0x61 +/* 800B0390 000AD2D0 80 64 00 08 */ lwz r3, 8(r4) +/* 800B0394 000AD2D4 38 03 00 01 */ addi r0, r3, 1 +/* 800B0398 000AD2D8 90 04 00 08 */ stw r0, 8(r4) +/* 800B039C 000AD2DC 98 A3 00 00 */ stb r5, 0(r3) +/* 800B03A0 000AD2E0 80 8D 95 B8 */ lwz r4, __GDCurrentDL@sda21(r13) +/* 800B03A4 000AD2E4 80 64 00 08 */ lwz r3, 8(r4) +/* 800B03A8 000AD2E8 80 04 00 0C */ lwz r0, 0xc(r4) +/* 800B03AC 000AD2EC 38 63 00 04 */ addi r3, r3, 4 +/* 800B03B0 000AD2F0 7C 03 00 40 */ cmplw r3, r0 +/* 800B03B4 000AD2F4 40 81 00 08 */ ble lbl_800B03BC +/* 800B03B8 000AD2F8 4B FF ED 9D */ bl GDOverflowed +lbl_800B03BC: +/* 800B03BC 000AD2FC 80 AD 95 B8 */ lwz r5, __GDCurrentDL@sda21(r13) +/* 800B03C0 000AD300 57 C3 06 3E */ clrlwi r3, r30, 0x18 +/* 800B03C4 000AD304 38 63 FF FF */ addi r3, r3, -1 +/* 800B03C8 000AD308 80 85 00 08 */ lwz r4, 8(r5) +/* 800B03CC 000AD30C 39 40 00 07 */ li r10, 7 +/* 800B03D0 000AD310 57 BD 06 3E */ clrlwi r29, r29, 0x18 +/* 800B03D4 000AD314 38 04 00 01 */ addi r0, r4, 1 +/* 800B03D8 000AD318 90 05 00 08 */ stw r0, 8(r5) +/* 800B03DC 000AD31C 38 00 00 FE */ li r0, 0xfe +/* 800B03E0 000AD320 54 63 50 2A */ slwi r3, r3, 0xa +/* 800B03E4 000AD324 98 04 00 00 */ stb r0, 0(r4) +/* 800B03E8 000AD328 57 60 25 36 */ rlwinm r0, r27, 4, 0x14, 0x1b +/* 800B03EC 000AD32C 7F A0 03 78 */ or r0, r29, r0 +/* 800B03F0 000AD330 80 ED 95 B8 */ lwz r7, __GDCurrentDL@sda21(r13) +/* 800B03F4 000AD334 39 20 00 FC */ li r9, 0xfc +/* 800B03F8 000AD338 39 00 00 3F */ li r8, 0x3f +/* 800B03FC 000AD33C 80 C7 00 08 */ lwz r6, 8(r7) +/* 800B0400 000AD340 38 AD 82 F4 */ addi r5, r13, cm2hw$515@sda21 +/* 800B0404 000AD344 57 7E 06 3E */ clrlwi r30, r27, 0x18 +/* 800B0408 000AD348 38 86 00 01 */ addi r4, r6, 1 +/* 800B040C 000AD34C 90 87 00 08 */ stw r4, 8(r7) +/* 800B0410 000AD350 7C 64 03 78 */ or r4, r3, r0 +/* 800B0414 000AD354 99 46 00 00 */ stb r10, 0(r6) +/* 800B0418 000AD358 57 86 82 1E */ rlwinm r6, r28, 0x10, 8, 0xf +/* 800B041C 000AD35C 80 ED 95 B8 */ lwz r7, __GDCurrentDL@sda21(r13) +/* 800B0420 000AD360 80 67 00 08 */ lwz r3, 8(r7) +/* 800B0424 000AD364 38 03 00 01 */ addi r0, r3, 1 +/* 800B0428 000AD368 90 07 00 08 */ stw r0, 8(r7) +/* 800B042C 000AD36C 99 23 00 00 */ stb r9, 0(r3) +/* 800B0430 000AD370 80 ED 95 B8 */ lwz r7, __GDCurrentDL@sda21(r13) +/* 800B0434 000AD374 80 67 00 08 */ lwz r3, 8(r7) +/* 800B0438 000AD378 38 03 00 01 */ addi r0, r3, 1 +/* 800B043C 000AD37C 90 07 00 08 */ stw r0, 8(r7) +/* 800B0440 000AD380 99 03 00 00 */ stb r8, 0(r3) +/* 800B0444 000AD384 80 ED 95 B8 */ lwz r7, __GDCurrentDL@sda21(r13) +/* 800B0448 000AD388 7C A5 F8 AE */ lbzx r5, r5, r31 +/* 800B044C 000AD38C 80 67 00 08 */ lwz r3, 8(r7) +/* 800B0450 000AD390 80 07 00 0C */ lwz r0, 0xc(r7) +/* 800B0454 000AD394 54 A5 70 22 */ slwi r5, r5, 0xe +/* 800B0458 000AD398 38 63 00 01 */ addi r3, r3, 1 +/* 800B045C 000AD39C 7C 03 00 40 */ cmplw r3, r0 +/* 800B0460 000AD3A0 7C A0 23 78 */ or r0, r5, r4 +/* 800B0464 000AD3A4 7C DF 03 78 */ or r31, r6, r0 +/* 800B0468 000AD3A8 40 81 00 08 */ ble lbl_800B0470 +/* 800B046C 000AD3AC 4B FF EC E9 */ bl GDOverflowed +lbl_800B0470: +/* 800B0470 000AD3B0 80 8D 95 B8 */ lwz r4, __GDCurrentDL@sda21(r13) +/* 800B0474 000AD3B4 38 A0 00 61 */ li r5, 0x61 +/* 800B0478 000AD3B8 80 64 00 08 */ lwz r3, 8(r4) +/* 800B047C 000AD3BC 38 03 00 01 */ addi r0, r3, 1 +/* 800B0480 000AD3C0 90 04 00 08 */ stw r0, 8(r4) +/* 800B0484 000AD3C4 98 A3 00 00 */ stb r5, 0(r3) +/* 800B0488 000AD3C8 80 8D 95 B8 */ lwz r4, __GDCurrentDL@sda21(r13) +/* 800B048C 000AD3CC 80 64 00 08 */ lwz r3, 8(r4) +/* 800B0490 000AD3D0 80 04 00 0C */ lwz r0, 0xc(r4) +/* 800B0494 000AD3D4 38 63 00 04 */ addi r3, r3, 4 +/* 800B0498 000AD3D8 7C 03 00 40 */ cmplw r3, r0 +/* 800B049C 000AD3DC 40 81 00 08 */ ble lbl_800B04A4 +/* 800B04A0 000AD3E0 4B FF EC B5 */ bl GDOverflowed +lbl_800B04A4: +/* 800B04A4 000AD3E4 80 8D 95 B8 */ lwz r4, __GDCurrentDL@sda21(r13) +/* 800B04A8 000AD3E8 57 E7 46 3E */ srwi r7, r31, 0x18 +/* 800B04AC 000AD3EC 57 E6 86 3E */ rlwinm r6, r31, 0x10, 0x18, 0x1f +/* 800B04B0 000AD3F0 80 64 00 08 */ lwz r3, 8(r4) +/* 800B04B4 000AD3F4 57 E5 C6 3E */ rlwinm r5, r31, 0x18, 0x18, 0x1f +/* 800B04B8 000AD3F8 38 03 00 01 */ addi r0, r3, 1 +/* 800B04BC 000AD3FC 90 04 00 08 */ stw r0, 8(r4) +/* 800B04C0 000AD400 98 E3 00 00 */ stb r7, 0(r3) +/* 800B04C4 000AD404 80 8D 95 B8 */ lwz r4, __GDCurrentDL@sda21(r13) +/* 800B04C8 000AD408 80 64 00 08 */ lwz r3, 8(r4) +/* 800B04CC 000AD40C 38 03 00 01 */ addi r0, r3, 1 +/* 800B04D0 000AD410 90 04 00 08 */ stw r0, 8(r4) +/* 800B04D4 000AD414 98 C3 00 00 */ stb r6, 0(r3) +/* 800B04D8 000AD418 80 8D 95 B8 */ lwz r4, __GDCurrentDL@sda21(r13) +/* 800B04DC 000AD41C 80 64 00 08 */ lwz r3, 8(r4) +/* 800B04E0 000AD420 38 03 00 01 */ addi r0, r3, 1 +/* 800B04E4 000AD424 90 04 00 08 */ stw r0, 8(r4) +/* 800B04E8 000AD428 98 A3 00 00 */ stb r5, 0(r3) +/* 800B04EC 000AD42C 80 8D 95 B8 */ lwz r4, __GDCurrentDL@sda21(r13) +/* 800B04F0 000AD430 80 64 00 08 */ lwz r3, 8(r4) +/* 800B04F4 000AD434 38 03 00 01 */ addi r0, r3, 1 +/* 800B04F8 000AD438 90 04 00 08 */ stw r0, 8(r4) +/* 800B04FC 000AD43C 9B E3 00 00 */ stb r31, 0(r3) +/* 800B0500 000AD440 80 8D 95 B8 */ lwz r4, __GDCurrentDL@sda21(r13) +/* 800B0504 000AD444 80 64 00 08 */ lwz r3, 8(r4) +/* 800B0508 000AD448 80 04 00 0C */ lwz r0, 0xc(r4) +/* 800B050C 000AD44C 38 63 00 01 */ addi r3, r3, 1 +/* 800B0510 000AD450 7C 03 00 40 */ cmplw r3, r0 +/* 800B0514 000AD454 40 81 00 08 */ ble lbl_800B051C +/* 800B0518 000AD458 4B FF EC 3D */ bl GDOverflowed +lbl_800B051C: +/* 800B051C 000AD45C 80 8D 95 B8 */ lwz r4, __GDCurrentDL@sda21(r13) +/* 800B0520 000AD460 38 A0 00 10 */ li r5, 0x10 +/* 800B0524 000AD464 80 64 00 08 */ lwz r3, 8(r4) +/* 800B0528 000AD468 38 03 00 01 */ addi r0, r3, 1 +/* 800B052C 000AD46C 90 04 00 08 */ stw r0, 8(r4) +/* 800B0530 000AD470 98 A3 00 00 */ stb r5, 0(r3) +/* 800B0534 000AD474 80 8D 95 B8 */ lwz r4, __GDCurrentDL@sda21(r13) +/* 800B0538 000AD478 80 64 00 08 */ lwz r3, 8(r4) +/* 800B053C 000AD47C 80 04 00 0C */ lwz r0, 0xc(r4) +/* 800B0540 000AD480 38 63 00 02 */ addi r3, r3, 2 +/* 800B0544 000AD484 7C 03 00 40 */ cmplw r3, r0 +/* 800B0548 000AD488 40 81 00 08 */ ble lbl_800B0550 +/* 800B054C 000AD48C 4B FF EC 09 */ bl GDOverflowed +lbl_800B0550: +/* 800B0550 000AD490 80 8D 95 B8 */ lwz r4, __GDCurrentDL@sda21(r13) +/* 800B0554 000AD494 38 A0 00 00 */ li r5, 0 +/* 800B0558 000AD498 80 64 00 08 */ lwz r3, 8(r4) +/* 800B055C 000AD49C 38 03 00 01 */ addi r0, r3, 1 +/* 800B0560 000AD4A0 90 04 00 08 */ stw r0, 8(r4) +/* 800B0564 000AD4A4 98 A3 00 00 */ stb r5, 0(r3) +/* 800B0568 000AD4A8 80 8D 95 B8 */ lwz r4, __GDCurrentDL@sda21(r13) +/* 800B056C 000AD4AC 80 64 00 08 */ lwz r3, 8(r4) +/* 800B0570 000AD4B0 38 03 00 01 */ addi r0, r3, 1 +/* 800B0574 000AD4B4 90 04 00 08 */ stw r0, 8(r4) +/* 800B0578 000AD4B8 98 A3 00 00 */ stb r5, 0(r3) +/* 800B057C 000AD4BC 80 8D 95 B8 */ lwz r4, __GDCurrentDL@sda21(r13) +/* 800B0580 000AD4C0 80 64 00 08 */ lwz r3, 8(r4) +/* 800B0584 000AD4C4 80 04 00 0C */ lwz r0, 0xc(r4) +/* 800B0588 000AD4C8 38 63 00 02 */ addi r3, r3, 2 +/* 800B058C 000AD4CC 7C 03 00 40 */ cmplw r3, r0 +/* 800B0590 000AD4D0 40 81 00 08 */ ble lbl_800B0598 +/* 800B0594 000AD4D4 4B FF EB C1 */ bl GDOverflowed +lbl_800B0598: +/* 800B0598 000AD4D8 80 8D 95 B8 */ lwz r4, __GDCurrentDL@sda21(r13) +/* 800B059C 000AD4DC 38 C0 00 10 */ li r6, 0x10 +/* 800B05A0 000AD4E0 38 A0 00 09 */ li r5, 9 +/* 800B05A4 000AD4E4 80 64 00 08 */ lwz r3, 8(r4) +/* 800B05A8 000AD4E8 38 03 00 01 */ addi r0, r3, 1 +/* 800B05AC 000AD4EC 90 04 00 08 */ stw r0, 8(r4) +/* 800B05B0 000AD4F0 98 C3 00 00 */ stb r6, 0(r3) +/* 800B05B4 000AD4F4 80 8D 95 B8 */ lwz r4, __GDCurrentDL@sda21(r13) +/* 800B05B8 000AD4F8 80 64 00 08 */ lwz r3, 8(r4) +/* 800B05BC 000AD4FC 38 03 00 01 */ addi r0, r3, 1 +/* 800B05C0 000AD500 90 04 00 08 */ stw r0, 8(r4) +/* 800B05C4 000AD504 98 A3 00 00 */ stb r5, 0(r3) +/* 800B05C8 000AD508 80 8D 95 B8 */ lwz r4, __GDCurrentDL@sda21(r13) +/* 800B05CC 000AD50C 80 64 00 08 */ lwz r3, 8(r4) +/* 800B05D0 000AD510 80 04 00 0C */ lwz r0, 0xc(r4) +/* 800B05D4 000AD514 38 63 00 04 */ addi r3, r3, 4 +/* 800B05D8 000AD518 7C 03 00 40 */ cmplw r3, r0 +/* 800B05DC 000AD51C 40 81 00 08 */ ble lbl_800B05E4 +/* 800B05E0 000AD520 4B FF EB 75 */ bl GDOverflowed +lbl_800B05E4: +/* 800B05E4 000AD524 80 8D 95 B8 */ lwz r4, __GDCurrentDL@sda21(r13) +/* 800B05E8 000AD528 38 A0 00 00 */ li r5, 0 +/* 800B05EC 000AD52C 80 64 00 08 */ lwz r3, 8(r4) +/* 800B05F0 000AD530 38 03 00 01 */ addi r0, r3, 1 +/* 800B05F4 000AD534 90 04 00 08 */ stw r0, 8(r4) +/* 800B05F8 000AD538 98 A3 00 00 */ stb r5, 0(r3) +/* 800B05FC 000AD53C 80 8D 95 B8 */ lwz r4, __GDCurrentDL@sda21(r13) +/* 800B0600 000AD540 80 64 00 08 */ lwz r3, 8(r4) +/* 800B0604 000AD544 38 03 00 01 */ addi r0, r3, 1 +/* 800B0608 000AD548 90 04 00 08 */ stw r0, 8(r4) +/* 800B060C 000AD54C 98 A3 00 00 */ stb r5, 0(r3) +/* 800B0610 000AD550 80 8D 95 B8 */ lwz r4, __GDCurrentDL@sda21(r13) +/* 800B0614 000AD554 80 64 00 08 */ lwz r3, 8(r4) +/* 800B0618 000AD558 38 03 00 01 */ addi r0, r3, 1 +/* 800B061C 000AD55C 90 04 00 08 */ stw r0, 8(r4) +/* 800B0620 000AD560 98 A3 00 00 */ stb r5, 0(r3) +/* 800B0624 000AD564 80 8D 95 B8 */ lwz r4, __GDCurrentDL@sda21(r13) +/* 800B0628 000AD568 80 64 00 08 */ lwz r3, 8(r4) +/* 800B062C 000AD56C 38 03 00 01 */ addi r0, r3, 1 +/* 800B0630 000AD570 90 04 00 08 */ stw r0, 8(r4) +/* 800B0634 000AD574 9B C3 00 00 */ stb r30, 0(r3) +/* 800B0638 000AD578 80 8D 95 B8 */ lwz r4, __GDCurrentDL@sda21(r13) +/* 800B063C 000AD57C 80 64 00 08 */ lwz r3, 8(r4) +/* 800B0640 000AD580 80 04 00 0C */ lwz r0, 0xc(r4) +/* 800B0644 000AD584 38 63 00 01 */ addi r3, r3, 1 +/* 800B0648 000AD588 7C 03 00 40 */ cmplw r3, r0 +/* 800B064C 000AD58C 40 81 00 08 */ ble lbl_800B0654 +/* 800B0650 000AD590 4B FF EB 05 */ bl GDOverflowed +lbl_800B0654: +/* 800B0654 000AD594 80 8D 95 B8 */ lwz r4, __GDCurrentDL@sda21(r13) +/* 800B0658 000AD598 38 A0 00 10 */ li r5, 0x10 +/* 800B065C 000AD59C 80 64 00 08 */ lwz r3, 8(r4) +/* 800B0660 000AD5A0 38 03 00 01 */ addi r0, r3, 1 +/* 800B0664 000AD5A4 90 04 00 08 */ stw r0, 8(r4) +/* 800B0668 000AD5A8 98 A3 00 00 */ stb r5, 0(r3) +/* 800B066C 000AD5AC 80 8D 95 B8 */ lwz r4, __GDCurrentDL@sda21(r13) +/* 800B0670 000AD5B0 80 64 00 08 */ lwz r3, 8(r4) +/* 800B0674 000AD5B4 80 04 00 0C */ lwz r0, 0xc(r4) +/* 800B0678 000AD5B8 38 63 00 02 */ addi r3, r3, 2 +/* 800B067C 000AD5BC 7C 03 00 40 */ cmplw r3, r0 +/* 800B0680 000AD5C0 40 81 00 08 */ ble lbl_800B0688 +/* 800B0684 000AD5C4 4B FF EA D1 */ bl GDOverflowed +lbl_800B0688: +/* 800B0688 000AD5C8 80 8D 95 B8 */ lwz r4, __GDCurrentDL@sda21(r13) +/* 800B068C 000AD5CC 38 A0 00 00 */ li r5, 0 +/* 800B0690 000AD5D0 80 64 00 08 */ lwz r3, 8(r4) +/* 800B0694 000AD5D4 38 03 00 01 */ addi r0, r3, 1 +/* 800B0698 000AD5D8 90 04 00 08 */ stw r0, 8(r4) +/* 800B069C 000AD5DC 98 A3 00 00 */ stb r5, 0(r3) +/* 800B06A0 000AD5E0 80 8D 95 B8 */ lwz r4, __GDCurrentDL@sda21(r13) +/* 800B06A4 000AD5E4 80 64 00 08 */ lwz r3, 8(r4) +/* 800B06A8 000AD5E8 38 03 00 01 */ addi r0, r3, 1 +/* 800B06AC 000AD5EC 90 04 00 08 */ stw r0, 8(r4) +/* 800B06B0 000AD5F0 98 A3 00 00 */ stb r5, 0(r3) +/* 800B06B4 000AD5F4 80 8D 95 B8 */ lwz r4, __GDCurrentDL@sda21(r13) +/* 800B06B8 000AD5F8 80 64 00 08 */ lwz r3, 8(r4) +/* 800B06BC 000AD5FC 80 04 00 0C */ lwz r0, 0xc(r4) +/* 800B06C0 000AD600 38 63 00 02 */ addi r3, r3, 2 +/* 800B06C4 000AD604 7C 03 00 40 */ cmplw r3, r0 +/* 800B06C8 000AD608 40 81 00 08 */ ble lbl_800B06D0 +/* 800B06CC 000AD60C 4B FF EA 89 */ bl GDOverflowed +lbl_800B06D0: +/* 800B06D0 000AD610 80 8D 95 B8 */ lwz r4, __GDCurrentDL@sda21(r13) +/* 800B06D4 000AD614 38 C0 00 10 */ li r6, 0x10 +/* 800B06D8 000AD618 38 A0 00 3F */ li r5, 0x3f +/* 800B06DC 000AD61C 80 64 00 08 */ lwz r3, 8(r4) +/* 800B06E0 000AD620 38 03 00 01 */ addi r0, r3, 1 +/* 800B06E4 000AD624 90 04 00 08 */ stw r0, 8(r4) +/* 800B06E8 000AD628 98 C3 00 00 */ stb r6, 0(r3) +/* 800B06EC 000AD62C 80 8D 95 B8 */ lwz r4, __GDCurrentDL@sda21(r13) +/* 800B06F0 000AD630 80 64 00 08 */ lwz r3, 8(r4) +/* 800B06F4 000AD634 38 03 00 01 */ addi r0, r3, 1 +/* 800B06F8 000AD638 90 04 00 08 */ stw r0, 8(r4) +/* 800B06FC 000AD63C 98 A3 00 00 */ stb r5, 0(r3) +/* 800B0700 000AD640 80 8D 95 B8 */ lwz r4, __GDCurrentDL@sda21(r13) +/* 800B0704 000AD644 80 64 00 08 */ lwz r3, 8(r4) +/* 800B0708 000AD648 80 04 00 0C */ lwz r0, 0xc(r4) +/* 800B070C 000AD64C 38 63 00 04 */ addi r3, r3, 4 +/* 800B0710 000AD650 7C 03 00 40 */ cmplw r3, r0 +/* 800B0714 000AD654 40 81 00 08 */ ble lbl_800B071C +/* 800B0718 000AD658 4B FF EA 3D */ bl GDOverflowed +lbl_800B071C: +/* 800B071C 000AD65C 80 8D 95 B8 */ lwz r4, __GDCurrentDL@sda21(r13) +/* 800B0720 000AD660 38 A0 00 00 */ li r5, 0 +/* 800B0724 000AD664 80 64 00 08 */ lwz r3, 8(r4) +/* 800B0728 000AD668 38 03 00 01 */ addi r0, r3, 1 +/* 800B072C 000AD66C 90 04 00 08 */ stw r0, 8(r4) +/* 800B0730 000AD670 98 A3 00 00 */ stb r5, 0(r3) +/* 800B0734 000AD674 80 8D 95 B8 */ lwz r4, __GDCurrentDL@sda21(r13) +/* 800B0738 000AD678 80 64 00 08 */ lwz r3, 8(r4) +/* 800B073C 000AD67C 38 03 00 01 */ addi r0, r3, 1 +/* 800B0740 000AD680 90 04 00 08 */ stw r0, 8(r4) +/* 800B0744 000AD684 98 A3 00 00 */ stb r5, 0(r3) +/* 800B0748 000AD688 80 8D 95 B8 */ lwz r4, __GDCurrentDL@sda21(r13) +/* 800B074C 000AD68C 80 64 00 08 */ lwz r3, 8(r4) +/* 800B0750 000AD690 38 03 00 01 */ addi r0, r3, 1 +/* 800B0754 000AD694 90 04 00 08 */ stw r0, 8(r4) +/* 800B0758 000AD698 98 A3 00 00 */ stb r5, 0(r3) +/* 800B075C 000AD69C 80 8D 95 B8 */ lwz r4, __GDCurrentDL@sda21(r13) +/* 800B0760 000AD6A0 80 64 00 08 */ lwz r3, 8(r4) +/* 800B0764 000AD6A4 38 03 00 01 */ addi r0, r3, 1 +/* 800B0768 000AD6A8 90 04 00 08 */ stw r0, 8(r4) +/* 800B076C 000AD6AC 9B A3 00 00 */ stb r29, 0(r3) +/* 800B0770 000AD6B0 80 01 00 2C */ lwz r0, 0x2c(r1) +/* 800B0774 000AD6B4 BB 61 00 14 */ lmw r27, 0x14(r1) +/* 800B0778 000AD6B8 38 21 00 28 */ addi r1, r1, 0x28 +/* 800B077C 000AD6BC 7C 08 03 A6 */ mtlr r0 +/* 800B0780 000AD6C0 4E 80 00 20 */ blr + +.section .data, "wa" # 0x803A8380 - 0x803E6000 + .balign 8 +"@121": + .4byte lbl_800AF204 + .4byte lbl_800AF20C + .4byte lbl_800AF21C + .4byte lbl_800AF230 + .4byte lbl_800AF244 + .4byte lbl_800AF258 + .4byte lbl_800AF26C + .4byte lbl_800AF280 + .4byte lbl_800AF294 + .4byte lbl_800AF2A8 + .4byte lbl_800AF2B0 + .4byte lbl_800AF2E0 + .4byte lbl_800AF2FC + .4byte lbl_800AF318 + .4byte lbl_800AF334 + .4byte lbl_800AF350 + .4byte lbl_800AF36C + .4byte lbl_800AF388 + .4byte lbl_800AF3A4 + .4byte lbl_800AF3C0 + .4byte lbl_800AF3DC + .4byte lbl_800AF3F4 + .4byte lbl_800AF3F4 + .4byte lbl_800AF3F4 + .4byte lbl_800AF3F4 + .4byte lbl_800AF2C8 +"@207": + .4byte lbl_800AF88C + .4byte lbl_800AF8A8 + .4byte lbl_800AF8D4 + .4byte lbl_800AF8E8 + .4byte lbl_800AF8FC + .4byte lbl_800AF918 + .4byte lbl_800AF934 + .4byte lbl_800AF94C + .4byte lbl_800AF95C + .4byte lbl_800AF96C + .4byte lbl_800AF97C + .4byte lbl_800AF98C + .4byte lbl_800AF998 + .4byte lbl_800AF998 + .4byte lbl_800AF998 + .4byte lbl_800AF998 + .4byte lbl_800AF8A8 +.section .sdata, "wa" # 0x80408AC0 - 0x804097C0 +cm2hw$400: + .4byte 0x00020103 +cm2hw$515: + .4byte 0x00020103 + .4byte 0 + .4byte 0 diff --git a/asm/Dolphin/gd/GDLight.s b/asm/Dolphin/gd/GDLight.s new file mode 100644 index 0000000..6e2a25d --- /dev/null +++ b/asm/Dolphin/gd/GDLight.s @@ -0,0 +1,1125 @@ +.include "macros.inc" + +.section .text, "ax" # 0x80005600 - 0x8036FBA0 +.global GDSetLightAttn +GDSetLightAttn: +/* 800B0784 000AD6C4 7C 08 02 A6 */ mflr r0 +/* 800B0788 000AD6C8 90 01 00 04 */ stw r0, 4(r1) +/* 800B078C 000AD6CC 7C 60 00 34 */ cntlzw r0, r3 +/* 800B0790 000AD6D0 20 80 00 1F */ subfic r4, r0, 0x1f +/* 800B0794 000AD6D4 94 21 FF 70 */ stwu r1, -0x90(r1) +/* 800B0798 000AD6D8 54 80 04 3E */ clrlwi r0, r4, 0x10 +/* 800B079C 000AD6DC 28 00 00 07 */ cmplwi r0, 7 +/* 800B07A0 000AD6E0 DB E1 00 88 */ stfd f31, 0x88(r1) +/* 800B07A4 000AD6E4 FF E0 30 90 */ fmr f31, f6 +/* 800B07A8 000AD6E8 DB C1 00 80 */ stfd f30, 0x80(r1) +/* 800B07AC 000AD6EC FF C0 28 90 */ fmr f30, f5 +/* 800B07B0 000AD6F0 DB A1 00 78 */ stfd f29, 0x78(r1) +/* 800B07B4 000AD6F4 FF A0 20 90 */ fmr f29, f4 +/* 800B07B8 000AD6F8 DB 81 00 70 */ stfd f28, 0x70(r1) +/* 800B07BC 000AD6FC FF 80 18 90 */ fmr f28, f3 +/* 800B07C0 000AD700 DB 61 00 68 */ stfd f27, 0x68(r1) +/* 800B07C4 000AD704 FF 60 10 90 */ fmr f27, f2 +/* 800B07C8 000AD708 DB 41 00 60 */ stfd f26, 0x60(r1) +/* 800B07CC 000AD70C FF 40 08 90 */ fmr f26, f1 +/* 800B07D0 000AD710 93 E1 00 5C */ stw r31, 0x5c(r1) +/* 800B07D4 000AD714 40 81 00 08 */ ble lbl_800B07DC +/* 800B07D8 000AD718 38 80 00 00 */ li r4, 0 +lbl_800B07DC: +/* 800B07DC 000AD71C 80 AD 95 B8 */ lwz r5, __GDCurrentDL@sda21(r13) +/* 800B07E0 000AD720 54 84 24 36 */ rlwinm r4, r4, 4, 0x10, 0x1b +/* 800B07E4 000AD724 3B E4 06 04 */ addi r31, r4, 0x604 +/* 800B07E8 000AD728 80 65 00 08 */ lwz r3, 8(r5) +/* 800B07EC 000AD72C 80 05 00 0C */ lwz r0, 0xc(r5) +/* 800B07F0 000AD730 38 63 00 01 */ addi r3, r3, 1 +/* 800B07F4 000AD734 7C 03 00 40 */ cmplw r3, r0 +/* 800B07F8 000AD738 40 81 00 08 */ ble lbl_800B0800 +/* 800B07FC 000AD73C 4B FF E9 59 */ bl GDOverflowed +lbl_800B0800: +/* 800B0800 000AD740 80 8D 95 B8 */ lwz r4, __GDCurrentDL@sda21(r13) +/* 800B0804 000AD744 38 A0 00 10 */ li r5, 0x10 +/* 800B0808 000AD748 80 64 00 08 */ lwz r3, 8(r4) +/* 800B080C 000AD74C 38 03 00 01 */ addi r0, r3, 1 +/* 800B0810 000AD750 90 04 00 08 */ stw r0, 8(r4) +/* 800B0814 000AD754 98 A3 00 00 */ stb r5, 0(r3) +/* 800B0818 000AD758 80 8D 95 B8 */ lwz r4, __GDCurrentDL@sda21(r13) +/* 800B081C 000AD75C 80 64 00 08 */ lwz r3, 8(r4) +/* 800B0820 000AD760 80 04 00 0C */ lwz r0, 0xc(r4) +/* 800B0824 000AD764 38 63 00 02 */ addi r3, r3, 2 +/* 800B0828 000AD768 7C 03 00 40 */ cmplw r3, r0 +/* 800B082C 000AD76C 40 81 00 08 */ ble lbl_800B0834 +/* 800B0830 000AD770 4B FF E9 25 */ bl GDOverflowed +lbl_800B0834: +/* 800B0834 000AD774 80 8D 95 B8 */ lwz r4, __GDCurrentDL@sda21(r13) +/* 800B0838 000AD778 38 C0 00 00 */ li r6, 0 +/* 800B083C 000AD77C 38 A0 00 05 */ li r5, 5 +/* 800B0840 000AD780 80 64 00 08 */ lwz r3, 8(r4) +/* 800B0844 000AD784 38 03 00 01 */ addi r0, r3, 1 +/* 800B0848 000AD788 90 04 00 08 */ stw r0, 8(r4) +/* 800B084C 000AD78C 98 C3 00 00 */ stb r6, 0(r3) +/* 800B0850 000AD790 80 8D 95 B8 */ lwz r4, __GDCurrentDL@sda21(r13) +/* 800B0854 000AD794 80 64 00 08 */ lwz r3, 8(r4) +/* 800B0858 000AD798 38 03 00 01 */ addi r0, r3, 1 +/* 800B085C 000AD79C 90 04 00 08 */ stw r0, 8(r4) +/* 800B0860 000AD7A0 98 A3 00 00 */ stb r5, 0(r3) +/* 800B0864 000AD7A4 80 8D 95 B8 */ lwz r4, __GDCurrentDL@sda21(r13) +/* 800B0868 000AD7A8 80 64 00 08 */ lwz r3, 8(r4) +/* 800B086C 000AD7AC 80 04 00 0C */ lwz r0, 0xc(r4) +/* 800B0870 000AD7B0 38 63 00 02 */ addi r3, r3, 2 +/* 800B0874 000AD7B4 7C 03 00 40 */ cmplw r3, r0 +/* 800B0878 000AD7B8 40 81 00 08 */ ble lbl_800B0880 +/* 800B087C 000AD7BC 4B FF E8 D9 */ bl GDOverflowed +lbl_800B0880: +/* 800B0880 000AD7C0 80 8D 95 B8 */ lwz r4, __GDCurrentDL@sda21(r13) +/* 800B0884 000AD7C4 57 E5 C6 3E */ rlwinm r5, r31, 0x18, 0x18, 0x1f +/* 800B0888 000AD7C8 80 64 00 08 */ lwz r3, 8(r4) +/* 800B088C 000AD7CC 38 03 00 01 */ addi r0, r3, 1 +/* 800B0890 000AD7D0 90 04 00 08 */ stw r0, 8(r4) +/* 800B0894 000AD7D4 98 A3 00 00 */ stb r5, 0(r3) +/* 800B0898 000AD7D8 80 8D 95 B8 */ lwz r4, __GDCurrentDL@sda21(r13) +/* 800B089C 000AD7DC 80 64 00 08 */ lwz r3, 8(r4) +/* 800B08A0 000AD7E0 38 03 00 01 */ addi r0, r3, 1 +/* 800B08A4 000AD7E4 90 04 00 08 */ stw r0, 8(r4) +/* 800B08A8 000AD7E8 9B E3 00 00 */ stb r31, 0(r3) +/* 800B08AC 000AD7EC D3 41 00 54 */ stfs f26, 0x54(r1) +/* 800B08B0 000AD7F0 80 8D 95 B8 */ lwz r4, __GDCurrentDL@sda21(r13) +/* 800B08B4 000AD7F4 80 64 00 08 */ lwz r3, 8(r4) +/* 800B08B8 000AD7F8 80 04 00 0C */ lwz r0, 0xc(r4) +/* 800B08BC 000AD7FC 38 63 00 04 */ addi r3, r3, 4 +/* 800B08C0 000AD800 7C 03 00 40 */ cmplw r3, r0 +/* 800B08C4 000AD804 40 81 00 08 */ ble lbl_800B08CC +/* 800B08C8 000AD808 4B FF E8 8D */ bl GDOverflowed +lbl_800B08CC: +/* 800B08CC 000AD80C 80 8D 95 B8 */ lwz r4, __GDCurrentDL@sda21(r13) +/* 800B08D0 000AD810 80 01 00 54 */ lwz r0, 0x54(r1) +/* 800B08D4 000AD814 80 64 00 08 */ lwz r3, 8(r4) +/* 800B08D8 000AD818 54 05 46 3E */ srwi r5, r0, 0x18 +/* 800B08DC 000AD81C 38 03 00 01 */ addi r0, r3, 1 +/* 800B08E0 000AD820 90 04 00 08 */ stw r0, 8(r4) +/* 800B08E4 000AD824 98 A3 00 00 */ stb r5, 0(r3) +/* 800B08E8 000AD828 80 8D 95 B8 */ lwz r4, __GDCurrentDL@sda21(r13) +/* 800B08EC 000AD82C 80 01 00 54 */ lwz r0, 0x54(r1) +/* 800B08F0 000AD830 80 64 00 08 */ lwz r3, 8(r4) +/* 800B08F4 000AD834 54 05 86 3E */ rlwinm r5, r0, 0x10, 0x18, 0x1f +/* 800B08F8 000AD838 38 03 00 01 */ addi r0, r3, 1 +/* 800B08FC 000AD83C 90 04 00 08 */ stw r0, 8(r4) +/* 800B0900 000AD840 98 A3 00 00 */ stb r5, 0(r3) +/* 800B0904 000AD844 80 8D 95 B8 */ lwz r4, __GDCurrentDL@sda21(r13) +/* 800B0908 000AD848 80 01 00 54 */ lwz r0, 0x54(r1) +/* 800B090C 000AD84C 80 64 00 08 */ lwz r3, 8(r4) +/* 800B0910 000AD850 54 05 C6 3E */ rlwinm r5, r0, 0x18, 0x18, 0x1f +/* 800B0914 000AD854 38 03 00 01 */ addi r0, r3, 1 +/* 800B0918 000AD858 90 04 00 08 */ stw r0, 8(r4) +/* 800B091C 000AD85C 98 A3 00 00 */ stb r5, 0(r3) +/* 800B0920 000AD860 80 8D 95 B8 */ lwz r4, __GDCurrentDL@sda21(r13) +/* 800B0924 000AD864 80 A1 00 54 */ lwz r5, 0x54(r1) +/* 800B0928 000AD868 80 64 00 08 */ lwz r3, 8(r4) +/* 800B092C 000AD86C 38 03 00 01 */ addi r0, r3, 1 +/* 800B0930 000AD870 90 04 00 08 */ stw r0, 8(r4) +/* 800B0934 000AD874 98 A3 00 00 */ stb r5, 0(r3) +/* 800B0938 000AD878 D3 61 00 50 */ stfs f27, 0x50(r1) +/* 800B093C 000AD87C 80 8D 95 B8 */ lwz r4, __GDCurrentDL@sda21(r13) +/* 800B0940 000AD880 80 64 00 08 */ lwz r3, 8(r4) +/* 800B0944 000AD884 80 04 00 0C */ lwz r0, 0xc(r4) +/* 800B0948 000AD888 38 63 00 04 */ addi r3, r3, 4 +/* 800B094C 000AD88C 7C 03 00 40 */ cmplw r3, r0 +/* 800B0950 000AD890 40 81 00 08 */ ble lbl_800B0958 +/* 800B0954 000AD894 4B FF E8 01 */ bl GDOverflowed +lbl_800B0958: +/* 800B0958 000AD898 80 8D 95 B8 */ lwz r4, __GDCurrentDL@sda21(r13) +/* 800B095C 000AD89C 80 01 00 50 */ lwz r0, 0x50(r1) +/* 800B0960 000AD8A0 80 64 00 08 */ lwz r3, 8(r4) +/* 800B0964 000AD8A4 54 05 46 3E */ srwi r5, r0, 0x18 +/* 800B0968 000AD8A8 38 03 00 01 */ addi r0, r3, 1 +/* 800B096C 000AD8AC 90 04 00 08 */ stw r0, 8(r4) +/* 800B0970 000AD8B0 98 A3 00 00 */ stb r5, 0(r3) +/* 800B0974 000AD8B4 80 8D 95 B8 */ lwz r4, __GDCurrentDL@sda21(r13) +/* 800B0978 000AD8B8 80 01 00 50 */ lwz r0, 0x50(r1) +/* 800B097C 000AD8BC 80 64 00 08 */ lwz r3, 8(r4) +/* 800B0980 000AD8C0 54 05 86 3E */ rlwinm r5, r0, 0x10, 0x18, 0x1f +/* 800B0984 000AD8C4 38 03 00 01 */ addi r0, r3, 1 +/* 800B0988 000AD8C8 90 04 00 08 */ stw r0, 8(r4) +/* 800B098C 000AD8CC 98 A3 00 00 */ stb r5, 0(r3) +/* 800B0990 000AD8D0 80 8D 95 B8 */ lwz r4, __GDCurrentDL@sda21(r13) +/* 800B0994 000AD8D4 80 01 00 50 */ lwz r0, 0x50(r1) +/* 800B0998 000AD8D8 80 64 00 08 */ lwz r3, 8(r4) +/* 800B099C 000AD8DC 54 05 C6 3E */ rlwinm r5, r0, 0x18, 0x18, 0x1f +/* 800B09A0 000AD8E0 38 03 00 01 */ addi r0, r3, 1 +/* 800B09A4 000AD8E4 90 04 00 08 */ stw r0, 8(r4) +/* 800B09A8 000AD8E8 98 A3 00 00 */ stb r5, 0(r3) +/* 800B09AC 000AD8EC 80 8D 95 B8 */ lwz r4, __GDCurrentDL@sda21(r13) +/* 800B09B0 000AD8F0 80 A1 00 50 */ lwz r5, 0x50(r1) +/* 800B09B4 000AD8F4 80 64 00 08 */ lwz r3, 8(r4) +/* 800B09B8 000AD8F8 38 03 00 01 */ addi r0, r3, 1 +/* 800B09BC 000AD8FC 90 04 00 08 */ stw r0, 8(r4) +/* 800B09C0 000AD900 98 A3 00 00 */ stb r5, 0(r3) +/* 800B09C4 000AD904 D3 81 00 4C */ stfs f28, 0x4c(r1) +/* 800B09C8 000AD908 80 8D 95 B8 */ lwz r4, __GDCurrentDL@sda21(r13) +/* 800B09CC 000AD90C 80 64 00 08 */ lwz r3, 8(r4) +/* 800B09D0 000AD910 80 04 00 0C */ lwz r0, 0xc(r4) +/* 800B09D4 000AD914 38 63 00 04 */ addi r3, r3, 4 +/* 800B09D8 000AD918 7C 03 00 40 */ cmplw r3, r0 +/* 800B09DC 000AD91C 40 81 00 08 */ ble lbl_800B09E4 +/* 800B09E0 000AD920 4B FF E7 75 */ bl GDOverflowed +lbl_800B09E4: +/* 800B09E4 000AD924 80 8D 95 B8 */ lwz r4, __GDCurrentDL@sda21(r13) +/* 800B09E8 000AD928 80 01 00 4C */ lwz r0, 0x4c(r1) +/* 800B09EC 000AD92C 80 64 00 08 */ lwz r3, 8(r4) +/* 800B09F0 000AD930 54 05 46 3E */ srwi r5, r0, 0x18 +/* 800B09F4 000AD934 38 03 00 01 */ addi r0, r3, 1 +/* 800B09F8 000AD938 90 04 00 08 */ stw r0, 8(r4) +/* 800B09FC 000AD93C 98 A3 00 00 */ stb r5, 0(r3) +/* 800B0A00 000AD940 80 8D 95 B8 */ lwz r4, __GDCurrentDL@sda21(r13) +/* 800B0A04 000AD944 80 01 00 4C */ lwz r0, 0x4c(r1) +/* 800B0A08 000AD948 80 64 00 08 */ lwz r3, 8(r4) +/* 800B0A0C 000AD94C 54 05 86 3E */ rlwinm r5, r0, 0x10, 0x18, 0x1f +/* 800B0A10 000AD950 38 03 00 01 */ addi r0, r3, 1 +/* 800B0A14 000AD954 90 04 00 08 */ stw r0, 8(r4) +/* 800B0A18 000AD958 98 A3 00 00 */ stb r5, 0(r3) +/* 800B0A1C 000AD95C 80 8D 95 B8 */ lwz r4, __GDCurrentDL@sda21(r13) +/* 800B0A20 000AD960 80 01 00 4C */ lwz r0, 0x4c(r1) +/* 800B0A24 000AD964 80 64 00 08 */ lwz r3, 8(r4) +/* 800B0A28 000AD968 54 05 C6 3E */ rlwinm r5, r0, 0x18, 0x18, 0x1f +/* 800B0A2C 000AD96C 38 03 00 01 */ addi r0, r3, 1 +/* 800B0A30 000AD970 90 04 00 08 */ stw r0, 8(r4) +/* 800B0A34 000AD974 98 A3 00 00 */ stb r5, 0(r3) +/* 800B0A38 000AD978 80 8D 95 B8 */ lwz r4, __GDCurrentDL@sda21(r13) +/* 800B0A3C 000AD97C 80 A1 00 4C */ lwz r5, 0x4c(r1) +/* 800B0A40 000AD980 80 64 00 08 */ lwz r3, 8(r4) +/* 800B0A44 000AD984 38 03 00 01 */ addi r0, r3, 1 +/* 800B0A48 000AD988 90 04 00 08 */ stw r0, 8(r4) +/* 800B0A4C 000AD98C 98 A3 00 00 */ stb r5, 0(r3) +/* 800B0A50 000AD990 D3 A1 00 48 */ stfs f29, 0x48(r1) +/* 800B0A54 000AD994 80 8D 95 B8 */ lwz r4, __GDCurrentDL@sda21(r13) +/* 800B0A58 000AD998 80 64 00 08 */ lwz r3, 8(r4) +/* 800B0A5C 000AD99C 80 04 00 0C */ lwz r0, 0xc(r4) +/* 800B0A60 000AD9A0 38 63 00 04 */ addi r3, r3, 4 +/* 800B0A64 000AD9A4 7C 03 00 40 */ cmplw r3, r0 +/* 800B0A68 000AD9A8 40 81 00 08 */ ble lbl_800B0A70 +/* 800B0A6C 000AD9AC 4B FF E6 E9 */ bl GDOverflowed +lbl_800B0A70: +/* 800B0A70 000AD9B0 80 8D 95 B8 */ lwz r4, __GDCurrentDL@sda21(r13) +/* 800B0A74 000AD9B4 80 01 00 48 */ lwz r0, 0x48(r1) +/* 800B0A78 000AD9B8 80 64 00 08 */ lwz r3, 8(r4) +/* 800B0A7C 000AD9BC 54 05 46 3E */ srwi r5, r0, 0x18 +/* 800B0A80 000AD9C0 38 03 00 01 */ addi r0, r3, 1 +/* 800B0A84 000AD9C4 90 04 00 08 */ stw r0, 8(r4) +/* 800B0A88 000AD9C8 98 A3 00 00 */ stb r5, 0(r3) +/* 800B0A8C 000AD9CC 80 8D 95 B8 */ lwz r4, __GDCurrentDL@sda21(r13) +/* 800B0A90 000AD9D0 80 01 00 48 */ lwz r0, 0x48(r1) +/* 800B0A94 000AD9D4 80 64 00 08 */ lwz r3, 8(r4) +/* 800B0A98 000AD9D8 54 05 86 3E */ rlwinm r5, r0, 0x10, 0x18, 0x1f +/* 800B0A9C 000AD9DC 38 03 00 01 */ addi r0, r3, 1 +/* 800B0AA0 000AD9E0 90 04 00 08 */ stw r0, 8(r4) +/* 800B0AA4 000AD9E4 98 A3 00 00 */ stb r5, 0(r3) +/* 800B0AA8 000AD9E8 80 8D 95 B8 */ lwz r4, __GDCurrentDL@sda21(r13) +/* 800B0AAC 000AD9EC 80 01 00 48 */ lwz r0, 0x48(r1) +/* 800B0AB0 000AD9F0 80 64 00 08 */ lwz r3, 8(r4) +/* 800B0AB4 000AD9F4 54 05 C6 3E */ rlwinm r5, r0, 0x18, 0x18, 0x1f +/* 800B0AB8 000AD9F8 38 03 00 01 */ addi r0, r3, 1 +/* 800B0ABC 000AD9FC 90 04 00 08 */ stw r0, 8(r4) +/* 800B0AC0 000ADA00 98 A3 00 00 */ stb r5, 0(r3) +/* 800B0AC4 000ADA04 80 8D 95 B8 */ lwz r4, __GDCurrentDL@sda21(r13) +/* 800B0AC8 000ADA08 80 A1 00 48 */ lwz r5, 0x48(r1) +/* 800B0ACC 000ADA0C 80 64 00 08 */ lwz r3, 8(r4) +/* 800B0AD0 000ADA10 38 03 00 01 */ addi r0, r3, 1 +/* 800B0AD4 000ADA14 90 04 00 08 */ stw r0, 8(r4) +/* 800B0AD8 000ADA18 98 A3 00 00 */ stb r5, 0(r3) +/* 800B0ADC 000ADA1C D3 C1 00 44 */ stfs f30, 0x44(r1) +/* 800B0AE0 000ADA20 80 8D 95 B8 */ lwz r4, __GDCurrentDL@sda21(r13) +/* 800B0AE4 000ADA24 80 64 00 08 */ lwz r3, 8(r4) +/* 800B0AE8 000ADA28 80 04 00 0C */ lwz r0, 0xc(r4) +/* 800B0AEC 000ADA2C 38 63 00 04 */ addi r3, r3, 4 +/* 800B0AF0 000ADA30 7C 03 00 40 */ cmplw r3, r0 +/* 800B0AF4 000ADA34 40 81 00 08 */ ble lbl_800B0AFC +/* 800B0AF8 000ADA38 4B FF E6 5D */ bl GDOverflowed +lbl_800B0AFC: +/* 800B0AFC 000ADA3C 80 8D 95 B8 */ lwz r4, __GDCurrentDL@sda21(r13) +/* 800B0B00 000ADA40 80 01 00 44 */ lwz r0, 0x44(r1) +/* 800B0B04 000ADA44 80 64 00 08 */ lwz r3, 8(r4) +/* 800B0B08 000ADA48 54 05 46 3E */ srwi r5, r0, 0x18 +/* 800B0B0C 000ADA4C 38 03 00 01 */ addi r0, r3, 1 +/* 800B0B10 000ADA50 90 04 00 08 */ stw r0, 8(r4) +/* 800B0B14 000ADA54 98 A3 00 00 */ stb r5, 0(r3) +/* 800B0B18 000ADA58 80 8D 95 B8 */ lwz r4, __GDCurrentDL@sda21(r13) +/* 800B0B1C 000ADA5C 80 01 00 44 */ lwz r0, 0x44(r1) +/* 800B0B20 000ADA60 80 64 00 08 */ lwz r3, 8(r4) +/* 800B0B24 000ADA64 54 05 86 3E */ rlwinm r5, r0, 0x10, 0x18, 0x1f +/* 800B0B28 000ADA68 38 03 00 01 */ addi r0, r3, 1 +/* 800B0B2C 000ADA6C 90 04 00 08 */ stw r0, 8(r4) +/* 800B0B30 000ADA70 98 A3 00 00 */ stb r5, 0(r3) +/* 800B0B34 000ADA74 80 8D 95 B8 */ lwz r4, __GDCurrentDL@sda21(r13) +/* 800B0B38 000ADA78 80 01 00 44 */ lwz r0, 0x44(r1) +/* 800B0B3C 000ADA7C 80 64 00 08 */ lwz r3, 8(r4) +/* 800B0B40 000ADA80 54 05 C6 3E */ rlwinm r5, r0, 0x18, 0x18, 0x1f +/* 800B0B44 000ADA84 38 03 00 01 */ addi r0, r3, 1 +/* 800B0B48 000ADA88 90 04 00 08 */ stw r0, 8(r4) +/* 800B0B4C 000ADA8C 98 A3 00 00 */ stb r5, 0(r3) +/* 800B0B50 000ADA90 80 8D 95 B8 */ lwz r4, __GDCurrentDL@sda21(r13) +/* 800B0B54 000ADA94 80 A1 00 44 */ lwz r5, 0x44(r1) +/* 800B0B58 000ADA98 80 64 00 08 */ lwz r3, 8(r4) +/* 800B0B5C 000ADA9C 38 03 00 01 */ addi r0, r3, 1 +/* 800B0B60 000ADAA0 90 04 00 08 */ stw r0, 8(r4) +/* 800B0B64 000ADAA4 98 A3 00 00 */ stb r5, 0(r3) +/* 800B0B68 000ADAA8 D3 E1 00 40 */ stfs f31, 0x40(r1) +/* 800B0B6C 000ADAAC 80 8D 95 B8 */ lwz r4, __GDCurrentDL@sda21(r13) +/* 800B0B70 000ADAB0 80 64 00 08 */ lwz r3, 8(r4) +/* 800B0B74 000ADAB4 80 04 00 0C */ lwz r0, 0xc(r4) +/* 800B0B78 000ADAB8 38 63 00 04 */ addi r3, r3, 4 +/* 800B0B7C 000ADABC 7C 03 00 40 */ cmplw r3, r0 +/* 800B0B80 000ADAC0 40 81 00 08 */ ble lbl_800B0B88 +/* 800B0B84 000ADAC4 4B FF E5 D1 */ bl GDOverflowed +lbl_800B0B88: +/* 800B0B88 000ADAC8 80 8D 95 B8 */ lwz r4, __GDCurrentDL@sda21(r13) +/* 800B0B8C 000ADACC 80 01 00 40 */ lwz r0, 0x40(r1) +/* 800B0B90 000ADAD0 80 64 00 08 */ lwz r3, 8(r4) +/* 800B0B94 000ADAD4 54 05 46 3E */ srwi r5, r0, 0x18 +/* 800B0B98 000ADAD8 38 03 00 01 */ addi r0, r3, 1 +/* 800B0B9C 000ADADC 90 04 00 08 */ stw r0, 8(r4) +/* 800B0BA0 000ADAE0 98 A3 00 00 */ stb r5, 0(r3) +/* 800B0BA4 000ADAE4 80 8D 95 B8 */ lwz r4, __GDCurrentDL@sda21(r13) +/* 800B0BA8 000ADAE8 80 01 00 40 */ lwz r0, 0x40(r1) +/* 800B0BAC 000ADAEC 80 64 00 08 */ lwz r3, 8(r4) +/* 800B0BB0 000ADAF0 54 05 86 3E */ rlwinm r5, r0, 0x10, 0x18, 0x1f +/* 800B0BB4 000ADAF4 38 03 00 01 */ addi r0, r3, 1 +/* 800B0BB8 000ADAF8 90 04 00 08 */ stw r0, 8(r4) +/* 800B0BBC 000ADAFC 98 A3 00 00 */ stb r5, 0(r3) +/* 800B0BC0 000ADB00 80 8D 95 B8 */ lwz r4, __GDCurrentDL@sda21(r13) +/* 800B0BC4 000ADB04 80 01 00 40 */ lwz r0, 0x40(r1) +/* 800B0BC8 000ADB08 80 64 00 08 */ lwz r3, 8(r4) +/* 800B0BCC 000ADB0C 54 05 C6 3E */ rlwinm r5, r0, 0x18, 0x18, 0x1f +/* 800B0BD0 000ADB10 38 03 00 01 */ addi r0, r3, 1 +/* 800B0BD4 000ADB14 90 04 00 08 */ stw r0, 8(r4) +/* 800B0BD8 000ADB18 98 A3 00 00 */ stb r5, 0(r3) +/* 800B0BDC 000ADB1C 80 8D 95 B8 */ lwz r4, __GDCurrentDL@sda21(r13) +/* 800B0BE0 000ADB20 80 A1 00 40 */ lwz r5, 0x40(r1) +/* 800B0BE4 000ADB24 80 64 00 08 */ lwz r3, 8(r4) +/* 800B0BE8 000ADB28 38 03 00 01 */ addi r0, r3, 1 +/* 800B0BEC 000ADB2C 90 04 00 08 */ stw r0, 8(r4) +/* 800B0BF0 000ADB30 98 A3 00 00 */ stb r5, 0(r3) +/* 800B0BF4 000ADB34 80 01 00 94 */ lwz r0, 0x94(r1) +/* 800B0BF8 000ADB38 CB E1 00 88 */ lfd f31, 0x88(r1) +/* 800B0BFC 000ADB3C CB C1 00 80 */ lfd f30, 0x80(r1) +/* 800B0C00 000ADB40 CB A1 00 78 */ lfd f29, 0x78(r1) +/* 800B0C04 000ADB44 CB 81 00 70 */ lfd f28, 0x70(r1) +/* 800B0C08 000ADB48 CB 61 00 68 */ lfd f27, 0x68(r1) +/* 800B0C0C 000ADB4C CB 41 00 60 */ lfd f26, 0x60(r1) +/* 800B0C10 000ADB50 83 E1 00 5C */ lwz r31, 0x5c(r1) +/* 800B0C14 000ADB54 38 21 00 90 */ addi r1, r1, 0x90 +/* 800B0C18 000ADB58 7C 08 03 A6 */ mtlr r0 +/* 800B0C1C 000ADB5C 4E 80 00 20 */ blr + +.global GDSetLightColor +GDSetLightColor: +/* 800B0C20 000ADB60 7C 08 02 A6 */ mflr r0 +/* 800B0C24 000ADB64 90 01 00 04 */ stw r0, 4(r1) +/* 800B0C28 000ADB68 7C 60 00 34 */ cntlzw r0, r3 +/* 800B0C2C 000ADB6C 20 E0 00 1F */ subfic r7, r0, 0x1f +/* 800B0C30 000ADB70 94 21 FF E0 */ stwu r1, -0x20(r1) +/* 800B0C34 000ADB74 54 E0 04 3E */ clrlwi r0, r7, 0x10 +/* 800B0C38 000ADB78 28 00 00 07 */ cmplwi r0, 7 +/* 800B0C3C 000ADB7C 93 E1 00 1C */ stw r31, 0x1c(r1) +/* 800B0C40 000ADB80 93 C1 00 18 */ stw r30, 0x18(r1) +/* 800B0C44 000ADB84 88 64 00 01 */ lbz r3, 1(r4) +/* 800B0C48 000ADB88 88 A4 00 00 */ lbz r5, 0(r4) +/* 800B0C4C 000ADB8C 88 C4 00 02 */ lbz r6, 2(r4) +/* 800B0C50 000ADB90 54 63 80 1E */ slwi r3, r3, 0x10 +/* 800B0C54 000ADB94 50 A3 C0 0E */ rlwimi r3, r5, 0x18, 0, 7 +/* 800B0C58 000ADB98 88 84 00 03 */ lbz r4, 3(r4) +/* 800B0C5C 000ADB9C 50 C3 44 2E */ rlwimi r3, r6, 8, 0x10, 0x17 +/* 800B0C60 000ADBA0 7C 9E 1B 78 */ or r30, r4, r3 +/* 800B0C64 000ADBA4 40 81 00 08 */ ble lbl_800B0C6C +/* 800B0C68 000ADBA8 38 E0 00 00 */ li r7, 0 +lbl_800B0C6C: +/* 800B0C6C 000ADBAC 80 AD 95 B8 */ lwz r5, __GDCurrentDL@sda21(r13) +/* 800B0C70 000ADBB0 54 E4 24 36 */ rlwinm r4, r7, 4, 0x10, 0x1b +/* 800B0C74 000ADBB4 3B E4 06 03 */ addi r31, r4, 0x603 +/* 800B0C78 000ADBB8 80 65 00 08 */ lwz r3, 8(r5) +/* 800B0C7C 000ADBBC 80 05 00 0C */ lwz r0, 0xc(r5) +/* 800B0C80 000ADBC0 38 63 00 01 */ addi r3, r3, 1 +/* 800B0C84 000ADBC4 7C 03 00 40 */ cmplw r3, r0 +/* 800B0C88 000ADBC8 40 81 00 08 */ ble lbl_800B0C90 +/* 800B0C8C 000ADBCC 4B FF E4 C9 */ bl GDOverflowed +lbl_800B0C90: +/* 800B0C90 000ADBD0 80 8D 95 B8 */ lwz r4, __GDCurrentDL@sda21(r13) +/* 800B0C94 000ADBD4 38 A0 00 10 */ li r5, 0x10 +/* 800B0C98 000ADBD8 80 64 00 08 */ lwz r3, 8(r4) +/* 800B0C9C 000ADBDC 38 03 00 01 */ addi r0, r3, 1 +/* 800B0CA0 000ADBE0 90 04 00 08 */ stw r0, 8(r4) +/* 800B0CA4 000ADBE4 98 A3 00 00 */ stb r5, 0(r3) +/* 800B0CA8 000ADBE8 80 8D 95 B8 */ lwz r4, __GDCurrentDL@sda21(r13) +/* 800B0CAC 000ADBEC 80 64 00 08 */ lwz r3, 8(r4) +/* 800B0CB0 000ADBF0 80 04 00 0C */ lwz r0, 0xc(r4) +/* 800B0CB4 000ADBF4 38 63 00 02 */ addi r3, r3, 2 +/* 800B0CB8 000ADBF8 7C 03 00 40 */ cmplw r3, r0 +/* 800B0CBC 000ADBFC 40 81 00 08 */ ble lbl_800B0CC4 +/* 800B0CC0 000ADC00 4B FF E4 95 */ bl GDOverflowed +lbl_800B0CC4: +/* 800B0CC4 000ADC04 80 8D 95 B8 */ lwz r4, __GDCurrentDL@sda21(r13) +/* 800B0CC8 000ADC08 38 A0 00 00 */ li r5, 0 +/* 800B0CCC 000ADC0C 80 64 00 08 */ lwz r3, 8(r4) +/* 800B0CD0 000ADC10 38 03 00 01 */ addi r0, r3, 1 +/* 800B0CD4 000ADC14 90 04 00 08 */ stw r0, 8(r4) +/* 800B0CD8 000ADC18 98 A3 00 00 */ stb r5, 0(r3) +/* 800B0CDC 000ADC1C 80 8D 95 B8 */ lwz r4, __GDCurrentDL@sda21(r13) +/* 800B0CE0 000ADC20 80 64 00 08 */ lwz r3, 8(r4) +/* 800B0CE4 000ADC24 38 03 00 01 */ addi r0, r3, 1 +/* 800B0CE8 000ADC28 90 04 00 08 */ stw r0, 8(r4) +/* 800B0CEC 000ADC2C 98 A3 00 00 */ stb r5, 0(r3) +/* 800B0CF0 000ADC30 80 8D 95 B8 */ lwz r4, __GDCurrentDL@sda21(r13) +/* 800B0CF4 000ADC34 80 64 00 08 */ lwz r3, 8(r4) +/* 800B0CF8 000ADC38 80 04 00 0C */ lwz r0, 0xc(r4) +/* 800B0CFC 000ADC3C 38 63 00 02 */ addi r3, r3, 2 +/* 800B0D00 000ADC40 7C 03 00 40 */ cmplw r3, r0 +/* 800B0D04 000ADC44 40 81 00 08 */ ble lbl_800B0D0C +/* 800B0D08 000ADC48 4B FF E4 4D */ bl GDOverflowed +lbl_800B0D0C: +/* 800B0D0C 000ADC4C 80 8D 95 B8 */ lwz r4, __GDCurrentDL@sda21(r13) +/* 800B0D10 000ADC50 57 E5 C6 3E */ rlwinm r5, r31, 0x18, 0x18, 0x1f +/* 800B0D14 000ADC54 80 64 00 08 */ lwz r3, 8(r4) +/* 800B0D18 000ADC58 38 03 00 01 */ addi r0, r3, 1 +/* 800B0D1C 000ADC5C 90 04 00 08 */ stw r0, 8(r4) +/* 800B0D20 000ADC60 98 A3 00 00 */ stb r5, 0(r3) +/* 800B0D24 000ADC64 80 8D 95 B8 */ lwz r4, __GDCurrentDL@sda21(r13) +/* 800B0D28 000ADC68 80 64 00 08 */ lwz r3, 8(r4) +/* 800B0D2C 000ADC6C 38 03 00 01 */ addi r0, r3, 1 +/* 800B0D30 000ADC70 90 04 00 08 */ stw r0, 8(r4) +/* 800B0D34 000ADC74 9B E3 00 00 */ stb r31, 0(r3) +/* 800B0D38 000ADC78 80 8D 95 B8 */ lwz r4, __GDCurrentDL@sda21(r13) +/* 800B0D3C 000ADC7C 80 64 00 08 */ lwz r3, 8(r4) +/* 800B0D40 000ADC80 80 04 00 0C */ lwz r0, 0xc(r4) +/* 800B0D44 000ADC84 38 63 00 04 */ addi r3, r3, 4 +/* 800B0D48 000ADC88 7C 03 00 40 */ cmplw r3, r0 +/* 800B0D4C 000ADC8C 40 81 00 08 */ ble lbl_800B0D54 +/* 800B0D50 000ADC90 4B FF E4 05 */ bl GDOverflowed +lbl_800B0D54: +/* 800B0D54 000ADC94 80 8D 95 B8 */ lwz r4, __GDCurrentDL@sda21(r13) +/* 800B0D58 000ADC98 57 C7 46 3E */ srwi r7, r30, 0x18 +/* 800B0D5C 000ADC9C 57 C6 86 3E */ rlwinm r6, r30, 0x10, 0x18, 0x1f +/* 800B0D60 000ADCA0 80 64 00 08 */ lwz r3, 8(r4) +/* 800B0D64 000ADCA4 57 C5 C6 3E */ rlwinm r5, r30, 0x18, 0x18, 0x1f +/* 800B0D68 000ADCA8 38 03 00 01 */ addi r0, r3, 1 +/* 800B0D6C 000ADCAC 90 04 00 08 */ stw r0, 8(r4) +/* 800B0D70 000ADCB0 98 E3 00 00 */ stb r7, 0(r3) +/* 800B0D74 000ADCB4 80 8D 95 B8 */ lwz r4, __GDCurrentDL@sda21(r13) +/* 800B0D78 000ADCB8 80 64 00 08 */ lwz r3, 8(r4) +/* 800B0D7C 000ADCBC 38 03 00 01 */ addi r0, r3, 1 +/* 800B0D80 000ADCC0 90 04 00 08 */ stw r0, 8(r4) +/* 800B0D84 000ADCC4 98 C3 00 00 */ stb r6, 0(r3) +/* 800B0D88 000ADCC8 80 8D 95 B8 */ lwz r4, __GDCurrentDL@sda21(r13) +/* 800B0D8C 000ADCCC 80 64 00 08 */ lwz r3, 8(r4) +/* 800B0D90 000ADCD0 38 03 00 01 */ addi r0, r3, 1 +/* 800B0D94 000ADCD4 90 04 00 08 */ stw r0, 8(r4) +/* 800B0D98 000ADCD8 98 A3 00 00 */ stb r5, 0(r3) +/* 800B0D9C 000ADCDC 80 8D 95 B8 */ lwz r4, __GDCurrentDL@sda21(r13) +/* 800B0DA0 000ADCE0 80 64 00 08 */ lwz r3, 8(r4) +/* 800B0DA4 000ADCE4 38 03 00 01 */ addi r0, r3, 1 +/* 800B0DA8 000ADCE8 90 04 00 08 */ stw r0, 8(r4) +/* 800B0DAC 000ADCEC 9B C3 00 00 */ stb r30, 0(r3) +/* 800B0DB0 000ADCF0 80 01 00 24 */ lwz r0, 0x24(r1) +/* 800B0DB4 000ADCF4 83 E1 00 1C */ lwz r31, 0x1c(r1) +/* 800B0DB8 000ADCF8 83 C1 00 18 */ lwz r30, 0x18(r1) +/* 800B0DBC 000ADCFC 38 21 00 20 */ addi r1, r1, 0x20 +/* 800B0DC0 000ADD00 7C 08 03 A6 */ mtlr r0 +/* 800B0DC4 000ADD04 4E 80 00 20 */ blr + +.global GDSetLightPos +GDSetLightPos: +/* 800B0DC8 000ADD08 7C 08 02 A6 */ mflr r0 +/* 800B0DCC 000ADD0C 90 01 00 04 */ stw r0, 4(r1) +/* 800B0DD0 000ADD10 7C 60 00 34 */ cntlzw r0, r3 +/* 800B0DD4 000ADD14 20 80 00 1F */ subfic r4, r0, 0x1f +/* 800B0DD8 000ADD18 94 21 FF A8 */ stwu r1, -0x58(r1) +/* 800B0DDC 000ADD1C 54 80 04 3E */ clrlwi r0, r4, 0x10 +/* 800B0DE0 000ADD20 28 00 00 07 */ cmplwi r0, 7 +/* 800B0DE4 000ADD24 DB E1 00 50 */ stfd f31, 0x50(r1) +/* 800B0DE8 000ADD28 FF E0 18 90 */ fmr f31, f3 +/* 800B0DEC 000ADD2C DB C1 00 48 */ stfd f30, 0x48(r1) +/* 800B0DF0 000ADD30 FF C0 10 90 */ fmr f30, f2 +/* 800B0DF4 000ADD34 DB A1 00 40 */ stfd f29, 0x40(r1) +/* 800B0DF8 000ADD38 FF A0 08 90 */ fmr f29, f1 +/* 800B0DFC 000ADD3C 93 E1 00 3C */ stw r31, 0x3c(r1) +/* 800B0E00 000ADD40 40 81 00 08 */ ble lbl_800B0E08 +/* 800B0E04 000ADD44 38 80 00 00 */ li r4, 0 +lbl_800B0E08: +/* 800B0E08 000ADD48 80 AD 95 B8 */ lwz r5, __GDCurrentDL@sda21(r13) +/* 800B0E0C 000ADD4C 54 84 24 36 */ rlwinm r4, r4, 4, 0x10, 0x1b +/* 800B0E10 000ADD50 3B E4 06 0A */ addi r31, r4, 0x60a +/* 800B0E14 000ADD54 80 65 00 08 */ lwz r3, 8(r5) +/* 800B0E18 000ADD58 80 05 00 0C */ lwz r0, 0xc(r5) +/* 800B0E1C 000ADD5C 38 63 00 01 */ addi r3, r3, 1 +/* 800B0E20 000ADD60 7C 03 00 40 */ cmplw r3, r0 +/* 800B0E24 000ADD64 40 81 00 08 */ ble lbl_800B0E2C +/* 800B0E28 000ADD68 4B FF E3 2D */ bl GDOverflowed +lbl_800B0E2C: +/* 800B0E2C 000ADD6C 80 8D 95 B8 */ lwz r4, __GDCurrentDL@sda21(r13) +/* 800B0E30 000ADD70 38 A0 00 10 */ li r5, 0x10 +/* 800B0E34 000ADD74 80 64 00 08 */ lwz r3, 8(r4) +/* 800B0E38 000ADD78 38 03 00 01 */ addi r0, r3, 1 +/* 800B0E3C 000ADD7C 90 04 00 08 */ stw r0, 8(r4) +/* 800B0E40 000ADD80 98 A3 00 00 */ stb r5, 0(r3) +/* 800B0E44 000ADD84 80 8D 95 B8 */ lwz r4, __GDCurrentDL@sda21(r13) +/* 800B0E48 000ADD88 80 64 00 08 */ lwz r3, 8(r4) +/* 800B0E4C 000ADD8C 80 04 00 0C */ lwz r0, 0xc(r4) +/* 800B0E50 000ADD90 38 63 00 02 */ addi r3, r3, 2 +/* 800B0E54 000ADD94 7C 03 00 40 */ cmplw r3, r0 +/* 800B0E58 000ADD98 40 81 00 08 */ ble lbl_800B0E60 +/* 800B0E5C 000ADD9C 4B FF E2 F9 */ bl GDOverflowed +lbl_800B0E60: +/* 800B0E60 000ADDA0 80 8D 95 B8 */ lwz r4, __GDCurrentDL@sda21(r13) +/* 800B0E64 000ADDA4 38 C0 00 00 */ li r6, 0 +/* 800B0E68 000ADDA8 38 A0 00 02 */ li r5, 2 +/* 800B0E6C 000ADDAC 80 64 00 08 */ lwz r3, 8(r4) +/* 800B0E70 000ADDB0 38 03 00 01 */ addi r0, r3, 1 +/* 800B0E74 000ADDB4 90 04 00 08 */ stw r0, 8(r4) +/* 800B0E78 000ADDB8 98 C3 00 00 */ stb r6, 0(r3) +/* 800B0E7C 000ADDBC 80 8D 95 B8 */ lwz r4, __GDCurrentDL@sda21(r13) +/* 800B0E80 000ADDC0 80 64 00 08 */ lwz r3, 8(r4) +/* 800B0E84 000ADDC4 38 03 00 01 */ addi r0, r3, 1 +/* 800B0E88 000ADDC8 90 04 00 08 */ stw r0, 8(r4) +/* 800B0E8C 000ADDCC 98 A3 00 00 */ stb r5, 0(r3) +/* 800B0E90 000ADDD0 80 8D 95 B8 */ lwz r4, __GDCurrentDL@sda21(r13) +/* 800B0E94 000ADDD4 80 64 00 08 */ lwz r3, 8(r4) +/* 800B0E98 000ADDD8 80 04 00 0C */ lwz r0, 0xc(r4) +/* 800B0E9C 000ADDDC 38 63 00 02 */ addi r3, r3, 2 +/* 800B0EA0 000ADDE0 7C 03 00 40 */ cmplw r3, r0 +/* 800B0EA4 000ADDE4 40 81 00 08 */ ble lbl_800B0EAC +/* 800B0EA8 000ADDE8 4B FF E2 AD */ bl GDOverflowed +lbl_800B0EAC: +/* 800B0EAC 000ADDEC 80 8D 95 B8 */ lwz r4, __GDCurrentDL@sda21(r13) +/* 800B0EB0 000ADDF0 57 E5 C6 3E */ rlwinm r5, r31, 0x18, 0x18, 0x1f +/* 800B0EB4 000ADDF4 80 64 00 08 */ lwz r3, 8(r4) +/* 800B0EB8 000ADDF8 38 03 00 01 */ addi r0, r3, 1 +/* 800B0EBC 000ADDFC 90 04 00 08 */ stw r0, 8(r4) +/* 800B0EC0 000ADE00 98 A3 00 00 */ stb r5, 0(r3) +/* 800B0EC4 000ADE04 80 8D 95 B8 */ lwz r4, __GDCurrentDL@sda21(r13) +/* 800B0EC8 000ADE08 80 64 00 08 */ lwz r3, 8(r4) +/* 800B0ECC 000ADE0C 38 03 00 01 */ addi r0, r3, 1 +/* 800B0ED0 000ADE10 90 04 00 08 */ stw r0, 8(r4) +/* 800B0ED4 000ADE14 9B E3 00 00 */ stb r31, 0(r3) +/* 800B0ED8 000ADE18 D3 A1 00 30 */ stfs f29, 0x30(r1) +/* 800B0EDC 000ADE1C 80 8D 95 B8 */ lwz r4, __GDCurrentDL@sda21(r13) +/* 800B0EE0 000ADE20 80 64 00 08 */ lwz r3, 8(r4) +/* 800B0EE4 000ADE24 80 04 00 0C */ lwz r0, 0xc(r4) +/* 800B0EE8 000ADE28 38 63 00 04 */ addi r3, r3, 4 +/* 800B0EEC 000ADE2C 7C 03 00 40 */ cmplw r3, r0 +/* 800B0EF0 000ADE30 40 81 00 08 */ ble lbl_800B0EF8 +/* 800B0EF4 000ADE34 4B FF E2 61 */ bl GDOverflowed +lbl_800B0EF8: +/* 800B0EF8 000ADE38 80 8D 95 B8 */ lwz r4, __GDCurrentDL@sda21(r13) +/* 800B0EFC 000ADE3C 80 01 00 30 */ lwz r0, 0x30(r1) +/* 800B0F00 000ADE40 80 64 00 08 */ lwz r3, 8(r4) +/* 800B0F04 000ADE44 54 05 46 3E */ srwi r5, r0, 0x18 +/* 800B0F08 000ADE48 38 03 00 01 */ addi r0, r3, 1 +/* 800B0F0C 000ADE4C 90 04 00 08 */ stw r0, 8(r4) +/* 800B0F10 000ADE50 98 A3 00 00 */ stb r5, 0(r3) +/* 800B0F14 000ADE54 80 8D 95 B8 */ lwz r4, __GDCurrentDL@sda21(r13) +/* 800B0F18 000ADE58 80 01 00 30 */ lwz r0, 0x30(r1) +/* 800B0F1C 000ADE5C 80 64 00 08 */ lwz r3, 8(r4) +/* 800B0F20 000ADE60 54 05 86 3E */ rlwinm r5, r0, 0x10, 0x18, 0x1f +/* 800B0F24 000ADE64 38 03 00 01 */ addi r0, r3, 1 +/* 800B0F28 000ADE68 90 04 00 08 */ stw r0, 8(r4) +/* 800B0F2C 000ADE6C 98 A3 00 00 */ stb r5, 0(r3) +/* 800B0F30 000ADE70 80 8D 95 B8 */ lwz r4, __GDCurrentDL@sda21(r13) +/* 800B0F34 000ADE74 80 01 00 30 */ lwz r0, 0x30(r1) +/* 800B0F38 000ADE78 80 64 00 08 */ lwz r3, 8(r4) +/* 800B0F3C 000ADE7C 54 05 C6 3E */ rlwinm r5, r0, 0x18, 0x18, 0x1f +/* 800B0F40 000ADE80 38 03 00 01 */ addi r0, r3, 1 +/* 800B0F44 000ADE84 90 04 00 08 */ stw r0, 8(r4) +/* 800B0F48 000ADE88 98 A3 00 00 */ stb r5, 0(r3) +/* 800B0F4C 000ADE8C 80 8D 95 B8 */ lwz r4, __GDCurrentDL@sda21(r13) +/* 800B0F50 000ADE90 80 A1 00 30 */ lwz r5, 0x30(r1) +/* 800B0F54 000ADE94 80 64 00 08 */ lwz r3, 8(r4) +/* 800B0F58 000ADE98 38 03 00 01 */ addi r0, r3, 1 +/* 800B0F5C 000ADE9C 90 04 00 08 */ stw r0, 8(r4) +/* 800B0F60 000ADEA0 98 A3 00 00 */ stb r5, 0(r3) +/* 800B0F64 000ADEA4 D3 C1 00 2C */ stfs f30, 0x2c(r1) +/* 800B0F68 000ADEA8 80 8D 95 B8 */ lwz r4, __GDCurrentDL@sda21(r13) +/* 800B0F6C 000ADEAC 80 64 00 08 */ lwz r3, 8(r4) +/* 800B0F70 000ADEB0 80 04 00 0C */ lwz r0, 0xc(r4) +/* 800B0F74 000ADEB4 38 63 00 04 */ addi r3, r3, 4 +/* 800B0F78 000ADEB8 7C 03 00 40 */ cmplw r3, r0 +/* 800B0F7C 000ADEBC 40 81 00 08 */ ble lbl_800B0F84 +/* 800B0F80 000ADEC0 4B FF E1 D5 */ bl GDOverflowed +lbl_800B0F84: +/* 800B0F84 000ADEC4 80 8D 95 B8 */ lwz r4, __GDCurrentDL@sda21(r13) +/* 800B0F88 000ADEC8 80 01 00 2C */ lwz r0, 0x2c(r1) +/* 800B0F8C 000ADECC 80 64 00 08 */ lwz r3, 8(r4) +/* 800B0F90 000ADED0 54 05 46 3E */ srwi r5, r0, 0x18 +/* 800B0F94 000ADED4 38 03 00 01 */ addi r0, r3, 1 +/* 800B0F98 000ADED8 90 04 00 08 */ stw r0, 8(r4) +/* 800B0F9C 000ADEDC 98 A3 00 00 */ stb r5, 0(r3) +/* 800B0FA0 000ADEE0 80 8D 95 B8 */ lwz r4, __GDCurrentDL@sda21(r13) +/* 800B0FA4 000ADEE4 80 01 00 2C */ lwz r0, 0x2c(r1) +/* 800B0FA8 000ADEE8 80 64 00 08 */ lwz r3, 8(r4) +/* 800B0FAC 000ADEEC 54 05 86 3E */ rlwinm r5, r0, 0x10, 0x18, 0x1f +/* 800B0FB0 000ADEF0 38 03 00 01 */ addi r0, r3, 1 +/* 800B0FB4 000ADEF4 90 04 00 08 */ stw r0, 8(r4) +/* 800B0FB8 000ADEF8 98 A3 00 00 */ stb r5, 0(r3) +/* 800B0FBC 000ADEFC 80 8D 95 B8 */ lwz r4, __GDCurrentDL@sda21(r13) +/* 800B0FC0 000ADF00 80 01 00 2C */ lwz r0, 0x2c(r1) +/* 800B0FC4 000ADF04 80 64 00 08 */ lwz r3, 8(r4) +/* 800B0FC8 000ADF08 54 05 C6 3E */ rlwinm r5, r0, 0x18, 0x18, 0x1f +/* 800B0FCC 000ADF0C 38 03 00 01 */ addi r0, r3, 1 +/* 800B0FD0 000ADF10 90 04 00 08 */ stw r0, 8(r4) +/* 800B0FD4 000ADF14 98 A3 00 00 */ stb r5, 0(r3) +/* 800B0FD8 000ADF18 80 8D 95 B8 */ lwz r4, __GDCurrentDL@sda21(r13) +/* 800B0FDC 000ADF1C 80 A1 00 2C */ lwz r5, 0x2c(r1) +/* 800B0FE0 000ADF20 80 64 00 08 */ lwz r3, 8(r4) +/* 800B0FE4 000ADF24 38 03 00 01 */ addi r0, r3, 1 +/* 800B0FE8 000ADF28 90 04 00 08 */ stw r0, 8(r4) +/* 800B0FEC 000ADF2C 98 A3 00 00 */ stb r5, 0(r3) +/* 800B0FF0 000ADF30 D3 E1 00 28 */ stfs f31, 0x28(r1) +/* 800B0FF4 000ADF34 80 8D 95 B8 */ lwz r4, __GDCurrentDL@sda21(r13) +/* 800B0FF8 000ADF38 80 64 00 08 */ lwz r3, 8(r4) +/* 800B0FFC 000ADF3C 80 04 00 0C */ lwz r0, 0xc(r4) +/* 800B1000 000ADF40 38 63 00 04 */ addi r3, r3, 4 +/* 800B1004 000ADF44 7C 03 00 40 */ cmplw r3, r0 +/* 800B1008 000ADF48 40 81 00 08 */ ble lbl_800B1010 +/* 800B100C 000ADF4C 4B FF E1 49 */ bl GDOverflowed +lbl_800B1010: +/* 800B1010 000ADF50 80 8D 95 B8 */ lwz r4, __GDCurrentDL@sda21(r13) +/* 800B1014 000ADF54 80 01 00 28 */ lwz r0, 0x28(r1) +/* 800B1018 000ADF58 80 64 00 08 */ lwz r3, 8(r4) +/* 800B101C 000ADF5C 54 05 46 3E */ srwi r5, r0, 0x18 +/* 800B1020 000ADF60 38 03 00 01 */ addi r0, r3, 1 +/* 800B1024 000ADF64 90 04 00 08 */ stw r0, 8(r4) +/* 800B1028 000ADF68 98 A3 00 00 */ stb r5, 0(r3) +/* 800B102C 000ADF6C 80 8D 95 B8 */ lwz r4, __GDCurrentDL@sda21(r13) +/* 800B1030 000ADF70 80 01 00 28 */ lwz r0, 0x28(r1) +/* 800B1034 000ADF74 80 64 00 08 */ lwz r3, 8(r4) +/* 800B1038 000ADF78 54 05 86 3E */ rlwinm r5, r0, 0x10, 0x18, 0x1f +/* 800B103C 000ADF7C 38 03 00 01 */ addi r0, r3, 1 +/* 800B1040 000ADF80 90 04 00 08 */ stw r0, 8(r4) +/* 800B1044 000ADF84 98 A3 00 00 */ stb r5, 0(r3) +/* 800B1048 000ADF88 80 8D 95 B8 */ lwz r4, __GDCurrentDL@sda21(r13) +/* 800B104C 000ADF8C 80 01 00 28 */ lwz r0, 0x28(r1) +/* 800B1050 000ADF90 80 64 00 08 */ lwz r3, 8(r4) +/* 800B1054 000ADF94 54 05 C6 3E */ rlwinm r5, r0, 0x18, 0x18, 0x1f +/* 800B1058 000ADF98 38 03 00 01 */ addi r0, r3, 1 +/* 800B105C 000ADF9C 90 04 00 08 */ stw r0, 8(r4) +/* 800B1060 000ADFA0 98 A3 00 00 */ stb r5, 0(r3) +/* 800B1064 000ADFA4 80 8D 95 B8 */ lwz r4, __GDCurrentDL@sda21(r13) +/* 800B1068 000ADFA8 80 A1 00 28 */ lwz r5, 0x28(r1) +/* 800B106C 000ADFAC 80 64 00 08 */ lwz r3, 8(r4) +/* 800B1070 000ADFB0 38 03 00 01 */ addi r0, r3, 1 +/* 800B1074 000ADFB4 90 04 00 08 */ stw r0, 8(r4) +/* 800B1078 000ADFB8 98 A3 00 00 */ stb r5, 0(r3) +/* 800B107C 000ADFBC 80 01 00 5C */ lwz r0, 0x5c(r1) +/* 800B1080 000ADFC0 CB E1 00 50 */ lfd f31, 0x50(r1) +/* 800B1084 000ADFC4 CB C1 00 48 */ lfd f30, 0x48(r1) +/* 800B1088 000ADFC8 CB A1 00 40 */ lfd f29, 0x40(r1) +/* 800B108C 000ADFCC 83 E1 00 3C */ lwz r31, 0x3c(r1) +/* 800B1090 000ADFD0 38 21 00 58 */ addi r1, r1, 0x58 +/* 800B1094 000ADFD4 7C 08 03 A6 */ mtlr r0 +/* 800B1098 000ADFD8 4E 80 00 20 */ blr + +.global GDSetLightDir +GDSetLightDir: +/* 800B109C 000ADFDC 7C 08 02 A6 */ mflr r0 +/* 800B10A0 000ADFE0 90 01 00 04 */ stw r0, 4(r1) +/* 800B10A4 000ADFE4 7C 60 00 34 */ cntlzw r0, r3 +/* 800B10A8 000ADFE8 20 80 00 1F */ subfic r4, r0, 0x1f +/* 800B10AC 000ADFEC 94 21 FF A8 */ stwu r1, -0x58(r1) +/* 800B10B0 000ADFF0 54 80 04 3E */ clrlwi r0, r4, 0x10 +/* 800B10B4 000ADFF4 28 00 00 07 */ cmplwi r0, 7 +/* 800B10B8 000ADFF8 DB E1 00 50 */ stfd f31, 0x50(r1) +/* 800B10BC 000ADFFC FF E0 18 90 */ fmr f31, f3 +/* 800B10C0 000AE000 DB C1 00 48 */ stfd f30, 0x48(r1) +/* 800B10C4 000AE004 FF C0 10 90 */ fmr f30, f2 +/* 800B10C8 000AE008 DB A1 00 40 */ stfd f29, 0x40(r1) +/* 800B10CC 000AE00C FF A0 08 90 */ fmr f29, f1 +/* 800B10D0 000AE010 93 E1 00 3C */ stw r31, 0x3c(r1) +/* 800B10D4 000AE014 40 81 00 08 */ ble lbl_800B10DC +/* 800B10D8 000AE018 38 80 00 00 */ li r4, 0 +lbl_800B10DC: +/* 800B10DC 000AE01C 80 AD 95 B8 */ lwz r5, __GDCurrentDL@sda21(r13) +/* 800B10E0 000AE020 54 84 24 36 */ rlwinm r4, r4, 4, 0x10, 0x1b +/* 800B10E4 000AE024 3B E4 06 0D */ addi r31, r4, 0x60d +/* 800B10E8 000AE028 80 65 00 08 */ lwz r3, 8(r5) +/* 800B10EC 000AE02C 80 05 00 0C */ lwz r0, 0xc(r5) +/* 800B10F0 000AE030 38 63 00 01 */ addi r3, r3, 1 +/* 800B10F4 000AE034 7C 03 00 40 */ cmplw r3, r0 +/* 800B10F8 000AE038 40 81 00 08 */ ble lbl_800B1100 +/* 800B10FC 000AE03C 4B FF E0 59 */ bl GDOverflowed +lbl_800B1100: +/* 800B1100 000AE040 80 8D 95 B8 */ lwz r4, __GDCurrentDL@sda21(r13) +/* 800B1104 000AE044 38 A0 00 10 */ li r5, 0x10 +/* 800B1108 000AE048 80 64 00 08 */ lwz r3, 8(r4) +/* 800B110C 000AE04C 38 03 00 01 */ addi r0, r3, 1 +/* 800B1110 000AE050 90 04 00 08 */ stw r0, 8(r4) +/* 800B1114 000AE054 98 A3 00 00 */ stb r5, 0(r3) +/* 800B1118 000AE058 80 8D 95 B8 */ lwz r4, __GDCurrentDL@sda21(r13) +/* 800B111C 000AE05C 80 64 00 08 */ lwz r3, 8(r4) +/* 800B1120 000AE060 80 04 00 0C */ lwz r0, 0xc(r4) +/* 800B1124 000AE064 38 63 00 02 */ addi r3, r3, 2 +/* 800B1128 000AE068 7C 03 00 40 */ cmplw r3, r0 +/* 800B112C 000AE06C 40 81 00 08 */ ble lbl_800B1134 +/* 800B1130 000AE070 4B FF E0 25 */ bl GDOverflowed +lbl_800B1134: +/* 800B1134 000AE074 80 8D 95 B8 */ lwz r4, __GDCurrentDL@sda21(r13) +/* 800B1138 000AE078 38 C0 00 00 */ li r6, 0 +/* 800B113C 000AE07C 38 A0 00 02 */ li r5, 2 +/* 800B1140 000AE080 80 64 00 08 */ lwz r3, 8(r4) +/* 800B1144 000AE084 38 03 00 01 */ addi r0, r3, 1 +/* 800B1148 000AE088 90 04 00 08 */ stw r0, 8(r4) +/* 800B114C 000AE08C 98 C3 00 00 */ stb r6, 0(r3) +/* 800B1150 000AE090 80 8D 95 B8 */ lwz r4, __GDCurrentDL@sda21(r13) +/* 800B1154 000AE094 80 64 00 08 */ lwz r3, 8(r4) +/* 800B1158 000AE098 38 03 00 01 */ addi r0, r3, 1 +/* 800B115C 000AE09C 90 04 00 08 */ stw r0, 8(r4) +/* 800B1160 000AE0A0 98 A3 00 00 */ stb r5, 0(r3) +/* 800B1164 000AE0A4 80 8D 95 B8 */ lwz r4, __GDCurrentDL@sda21(r13) +/* 800B1168 000AE0A8 80 64 00 08 */ lwz r3, 8(r4) +/* 800B116C 000AE0AC 80 04 00 0C */ lwz r0, 0xc(r4) +/* 800B1170 000AE0B0 38 63 00 02 */ addi r3, r3, 2 +/* 800B1174 000AE0B4 7C 03 00 40 */ cmplw r3, r0 +/* 800B1178 000AE0B8 40 81 00 08 */ ble lbl_800B1180 +/* 800B117C 000AE0BC 4B FF DF D9 */ bl GDOverflowed +lbl_800B1180: +/* 800B1180 000AE0C0 80 8D 95 B8 */ lwz r4, __GDCurrentDL@sda21(r13) +/* 800B1184 000AE0C4 57 E5 C6 3E */ rlwinm r5, r31, 0x18, 0x18, 0x1f +/* 800B1188 000AE0C8 80 64 00 08 */ lwz r3, 8(r4) +/* 800B118C 000AE0CC 38 03 00 01 */ addi r0, r3, 1 +/* 800B1190 000AE0D0 90 04 00 08 */ stw r0, 8(r4) +/* 800B1194 000AE0D4 98 A3 00 00 */ stb r5, 0(r3) +/* 800B1198 000AE0D8 80 8D 95 B8 */ lwz r4, __GDCurrentDL@sda21(r13) +/* 800B119C 000AE0DC 80 64 00 08 */ lwz r3, 8(r4) +/* 800B11A0 000AE0E0 38 03 00 01 */ addi r0, r3, 1 +/* 800B11A4 000AE0E4 90 04 00 08 */ stw r0, 8(r4) +/* 800B11A8 000AE0E8 9B E3 00 00 */ stb r31, 0(r3) +/* 800B11AC 000AE0EC D3 A1 00 30 */ stfs f29, 0x30(r1) +/* 800B11B0 000AE0F0 80 8D 95 B8 */ lwz r4, __GDCurrentDL@sda21(r13) +/* 800B11B4 000AE0F4 80 64 00 08 */ lwz r3, 8(r4) +/* 800B11B8 000AE0F8 80 04 00 0C */ lwz r0, 0xc(r4) +/* 800B11BC 000AE0FC 38 63 00 04 */ addi r3, r3, 4 +/* 800B11C0 000AE100 7C 03 00 40 */ cmplw r3, r0 +/* 800B11C4 000AE104 40 81 00 08 */ ble lbl_800B11CC +/* 800B11C8 000AE108 4B FF DF 8D */ bl GDOverflowed +lbl_800B11CC: +/* 800B11CC 000AE10C 80 8D 95 B8 */ lwz r4, __GDCurrentDL@sda21(r13) +/* 800B11D0 000AE110 80 01 00 30 */ lwz r0, 0x30(r1) +/* 800B11D4 000AE114 80 64 00 08 */ lwz r3, 8(r4) +/* 800B11D8 000AE118 54 05 46 3E */ srwi r5, r0, 0x18 +/* 800B11DC 000AE11C 38 03 00 01 */ addi r0, r3, 1 +/* 800B11E0 000AE120 90 04 00 08 */ stw r0, 8(r4) +/* 800B11E4 000AE124 98 A3 00 00 */ stb r5, 0(r3) +/* 800B11E8 000AE128 80 8D 95 B8 */ lwz r4, __GDCurrentDL@sda21(r13) +/* 800B11EC 000AE12C 80 01 00 30 */ lwz r0, 0x30(r1) +/* 800B11F0 000AE130 80 64 00 08 */ lwz r3, 8(r4) +/* 800B11F4 000AE134 54 05 86 3E */ rlwinm r5, r0, 0x10, 0x18, 0x1f +/* 800B11F8 000AE138 38 03 00 01 */ addi r0, r3, 1 +/* 800B11FC 000AE13C 90 04 00 08 */ stw r0, 8(r4) +/* 800B1200 000AE140 98 A3 00 00 */ stb r5, 0(r3) +/* 800B1204 000AE144 80 8D 95 B8 */ lwz r4, __GDCurrentDL@sda21(r13) +/* 800B1208 000AE148 80 01 00 30 */ lwz r0, 0x30(r1) +/* 800B120C 000AE14C 80 64 00 08 */ lwz r3, 8(r4) +/* 800B1210 000AE150 54 05 C6 3E */ rlwinm r5, r0, 0x18, 0x18, 0x1f +/* 800B1214 000AE154 38 03 00 01 */ addi r0, r3, 1 +/* 800B1218 000AE158 90 04 00 08 */ stw r0, 8(r4) +/* 800B121C 000AE15C 98 A3 00 00 */ stb r5, 0(r3) +/* 800B1220 000AE160 80 8D 95 B8 */ lwz r4, __GDCurrentDL@sda21(r13) +/* 800B1224 000AE164 80 A1 00 30 */ lwz r5, 0x30(r1) +/* 800B1228 000AE168 80 64 00 08 */ lwz r3, 8(r4) +/* 800B122C 000AE16C 38 03 00 01 */ addi r0, r3, 1 +/* 800B1230 000AE170 90 04 00 08 */ stw r0, 8(r4) +/* 800B1234 000AE174 98 A3 00 00 */ stb r5, 0(r3) +/* 800B1238 000AE178 D3 C1 00 2C */ stfs f30, 0x2c(r1) +/* 800B123C 000AE17C 80 8D 95 B8 */ lwz r4, __GDCurrentDL@sda21(r13) +/* 800B1240 000AE180 80 64 00 08 */ lwz r3, 8(r4) +/* 800B1244 000AE184 80 04 00 0C */ lwz r0, 0xc(r4) +/* 800B1248 000AE188 38 63 00 04 */ addi r3, r3, 4 +/* 800B124C 000AE18C 7C 03 00 40 */ cmplw r3, r0 +/* 800B1250 000AE190 40 81 00 08 */ ble lbl_800B1258 +/* 800B1254 000AE194 4B FF DF 01 */ bl GDOverflowed +lbl_800B1258: +/* 800B1258 000AE198 80 8D 95 B8 */ lwz r4, __GDCurrentDL@sda21(r13) +/* 800B125C 000AE19C 80 01 00 2C */ lwz r0, 0x2c(r1) +/* 800B1260 000AE1A0 80 64 00 08 */ lwz r3, 8(r4) +/* 800B1264 000AE1A4 54 05 46 3E */ srwi r5, r0, 0x18 +/* 800B1268 000AE1A8 38 03 00 01 */ addi r0, r3, 1 +/* 800B126C 000AE1AC 90 04 00 08 */ stw r0, 8(r4) +/* 800B1270 000AE1B0 98 A3 00 00 */ stb r5, 0(r3) +/* 800B1274 000AE1B4 80 8D 95 B8 */ lwz r4, __GDCurrentDL@sda21(r13) +/* 800B1278 000AE1B8 80 01 00 2C */ lwz r0, 0x2c(r1) +/* 800B127C 000AE1BC 80 64 00 08 */ lwz r3, 8(r4) +/* 800B1280 000AE1C0 54 05 86 3E */ rlwinm r5, r0, 0x10, 0x18, 0x1f +/* 800B1284 000AE1C4 38 03 00 01 */ addi r0, r3, 1 +/* 800B1288 000AE1C8 90 04 00 08 */ stw r0, 8(r4) +/* 800B128C 000AE1CC 98 A3 00 00 */ stb r5, 0(r3) +/* 800B1290 000AE1D0 80 8D 95 B8 */ lwz r4, __GDCurrentDL@sda21(r13) +/* 800B1294 000AE1D4 80 01 00 2C */ lwz r0, 0x2c(r1) +/* 800B1298 000AE1D8 80 64 00 08 */ lwz r3, 8(r4) +/* 800B129C 000AE1DC 54 05 C6 3E */ rlwinm r5, r0, 0x18, 0x18, 0x1f +/* 800B12A0 000AE1E0 38 03 00 01 */ addi r0, r3, 1 +/* 800B12A4 000AE1E4 90 04 00 08 */ stw r0, 8(r4) +/* 800B12A8 000AE1E8 98 A3 00 00 */ stb r5, 0(r3) +/* 800B12AC 000AE1EC 80 8D 95 B8 */ lwz r4, __GDCurrentDL@sda21(r13) +/* 800B12B0 000AE1F0 80 A1 00 2C */ lwz r5, 0x2c(r1) +/* 800B12B4 000AE1F4 80 64 00 08 */ lwz r3, 8(r4) +/* 800B12B8 000AE1F8 38 03 00 01 */ addi r0, r3, 1 +/* 800B12BC 000AE1FC 90 04 00 08 */ stw r0, 8(r4) +/* 800B12C0 000AE200 98 A3 00 00 */ stb r5, 0(r3) +/* 800B12C4 000AE204 D3 E1 00 28 */ stfs f31, 0x28(r1) +/* 800B12C8 000AE208 80 8D 95 B8 */ lwz r4, __GDCurrentDL@sda21(r13) +/* 800B12CC 000AE20C 80 64 00 08 */ lwz r3, 8(r4) +/* 800B12D0 000AE210 80 04 00 0C */ lwz r0, 0xc(r4) +/* 800B12D4 000AE214 38 63 00 04 */ addi r3, r3, 4 +/* 800B12D8 000AE218 7C 03 00 40 */ cmplw r3, r0 +/* 800B12DC 000AE21C 40 81 00 08 */ ble lbl_800B12E4 +/* 800B12E0 000AE220 4B FF DE 75 */ bl GDOverflowed +lbl_800B12E4: +/* 800B12E4 000AE224 80 8D 95 B8 */ lwz r4, __GDCurrentDL@sda21(r13) +/* 800B12E8 000AE228 80 01 00 28 */ lwz r0, 0x28(r1) +/* 800B12EC 000AE22C 80 64 00 08 */ lwz r3, 8(r4) +/* 800B12F0 000AE230 54 05 46 3E */ srwi r5, r0, 0x18 +/* 800B12F4 000AE234 38 03 00 01 */ addi r0, r3, 1 +/* 800B12F8 000AE238 90 04 00 08 */ stw r0, 8(r4) +/* 800B12FC 000AE23C 98 A3 00 00 */ stb r5, 0(r3) +/* 800B1300 000AE240 80 8D 95 B8 */ lwz r4, __GDCurrentDL@sda21(r13) +/* 800B1304 000AE244 80 01 00 28 */ lwz r0, 0x28(r1) +/* 800B1308 000AE248 80 64 00 08 */ lwz r3, 8(r4) +/* 800B130C 000AE24C 54 05 86 3E */ rlwinm r5, r0, 0x10, 0x18, 0x1f +/* 800B1310 000AE250 38 03 00 01 */ addi r0, r3, 1 +/* 800B1314 000AE254 90 04 00 08 */ stw r0, 8(r4) +/* 800B1318 000AE258 98 A3 00 00 */ stb r5, 0(r3) +/* 800B131C 000AE25C 80 8D 95 B8 */ lwz r4, __GDCurrentDL@sda21(r13) +/* 800B1320 000AE260 80 01 00 28 */ lwz r0, 0x28(r1) +/* 800B1324 000AE264 80 64 00 08 */ lwz r3, 8(r4) +/* 800B1328 000AE268 54 05 C6 3E */ rlwinm r5, r0, 0x18, 0x18, 0x1f +/* 800B132C 000AE26C 38 03 00 01 */ addi r0, r3, 1 +/* 800B1330 000AE270 90 04 00 08 */ stw r0, 8(r4) +/* 800B1334 000AE274 98 A3 00 00 */ stb r5, 0(r3) +/* 800B1338 000AE278 80 8D 95 B8 */ lwz r4, __GDCurrentDL@sda21(r13) +/* 800B133C 000AE27C 80 A1 00 28 */ lwz r5, 0x28(r1) +/* 800B1340 000AE280 80 64 00 08 */ lwz r3, 8(r4) +/* 800B1344 000AE284 38 03 00 01 */ addi r0, r3, 1 +/* 800B1348 000AE288 90 04 00 08 */ stw r0, 8(r4) +/* 800B134C 000AE28C 98 A3 00 00 */ stb r5, 0(r3) +/* 800B1350 000AE290 80 01 00 5C */ lwz r0, 0x5c(r1) +/* 800B1354 000AE294 CB E1 00 50 */ lfd f31, 0x50(r1) +/* 800B1358 000AE298 CB C1 00 48 */ lfd f30, 0x48(r1) +/* 800B135C 000AE29C CB A1 00 40 */ lfd f29, 0x40(r1) +/* 800B1360 000AE2A0 83 E1 00 3C */ lwz r31, 0x3c(r1) +/* 800B1364 000AE2A4 38 21 00 58 */ addi r1, r1, 0x58 +/* 800B1368 000AE2A8 7C 08 03 A6 */ mtlr r0 +/* 800B136C 000AE2AC 4E 80 00 20 */ blr + +.global GDSetChanMatColor +GDSetChanMatColor: +/* 800B1370 000AE2B0 7C 08 02 A6 */ mflr r0 +/* 800B1374 000AE2B4 90 01 00 04 */ stw r0, 4(r1) +/* 800B1378 000AE2B8 94 21 FF E8 */ stwu r1, -0x18(r1) +/* 800B137C 000AE2BC 93 E1 00 14 */ stw r31, 0x14(r1) +/* 800B1380 000AE2C0 93 C1 00 10 */ stw r30, 0x10(r1) +/* 800B1384 000AE2C4 7C 7E 1B 78 */ mr r30, r3 +/* 800B1388 000AE2C8 81 0D 95 B8 */ lwz r8, __GDCurrentDL@sda21(r13) +/* 800B138C 000AE2CC 88 04 00 01 */ lbz r0, 1(r4) +/* 800B1390 000AE2D0 80 68 00 08 */ lwz r3, 8(r8) +/* 800B1394 000AE2D4 54 05 80 1E */ slwi r5, r0, 0x10 +/* 800B1398 000AE2D8 80 08 00 0C */ lwz r0, 0xc(r8) +/* 800B139C 000AE2DC 88 C4 00 00 */ lbz r6, 0(r4) +/* 800B13A0 000AE2E0 38 63 00 01 */ addi r3, r3, 1 +/* 800B13A4 000AE2E4 88 E4 00 02 */ lbz r7, 2(r4) +/* 800B13A8 000AE2E8 7C 03 00 40 */ cmplw r3, r0 +/* 800B13AC 000AE2EC 50 C5 C0 0E */ rlwimi r5, r6, 0x18, 0, 7 +/* 800B13B0 000AE2F0 88 84 00 03 */ lbz r4, 3(r4) +/* 800B13B4 000AE2F4 50 E5 44 2E */ rlwimi r5, r7, 8, 0x10, 0x17 +/* 800B13B8 000AE2F8 7C 9F 2B 78 */ or r31, r4, r5 +/* 800B13BC 000AE2FC 40 81 00 08 */ ble lbl_800B13C4 +/* 800B13C0 000AE300 4B FF DD 95 */ bl GDOverflowed +lbl_800B13C4: +/* 800B13C4 000AE304 80 8D 95 B8 */ lwz r4, __GDCurrentDL@sda21(r13) +/* 800B13C8 000AE308 38 A0 00 10 */ li r5, 0x10 +/* 800B13CC 000AE30C 80 64 00 08 */ lwz r3, 8(r4) +/* 800B13D0 000AE310 38 03 00 01 */ addi r0, r3, 1 +/* 800B13D4 000AE314 90 04 00 08 */ stw r0, 8(r4) +/* 800B13D8 000AE318 98 A3 00 00 */ stb r5, 0(r3) +/* 800B13DC 000AE31C 80 8D 95 B8 */ lwz r4, __GDCurrentDL@sda21(r13) +/* 800B13E0 000AE320 80 64 00 08 */ lwz r3, 8(r4) +/* 800B13E4 000AE324 80 04 00 0C */ lwz r0, 0xc(r4) +/* 800B13E8 000AE328 38 63 00 02 */ addi r3, r3, 2 +/* 800B13EC 000AE32C 7C 03 00 40 */ cmplw r3, r0 +/* 800B13F0 000AE330 40 81 00 08 */ ble lbl_800B13F8 +/* 800B13F4 000AE334 4B FF DD 61 */ bl GDOverflowed +lbl_800B13F8: +/* 800B13F8 000AE338 80 8D 95 B8 */ lwz r4, __GDCurrentDL@sda21(r13) +/* 800B13FC 000AE33C 38 A0 00 00 */ li r5, 0 +/* 800B1400 000AE340 80 64 00 08 */ lwz r3, 8(r4) +/* 800B1404 000AE344 38 03 00 01 */ addi r0, r3, 1 +/* 800B1408 000AE348 90 04 00 08 */ stw r0, 8(r4) +/* 800B140C 000AE34C 98 A3 00 00 */ stb r5, 0(r3) +/* 800B1410 000AE350 80 8D 95 B8 */ lwz r4, __GDCurrentDL@sda21(r13) +/* 800B1414 000AE354 80 64 00 08 */ lwz r3, 8(r4) +/* 800B1418 000AE358 38 03 00 01 */ addi r0, r3, 1 +/* 800B141C 000AE35C 90 04 00 08 */ stw r0, 8(r4) +/* 800B1420 000AE360 98 A3 00 00 */ stb r5, 0(r3) +/* 800B1424 000AE364 80 8D 95 B8 */ lwz r4, __GDCurrentDL@sda21(r13) +/* 800B1428 000AE368 80 64 00 08 */ lwz r3, 8(r4) +/* 800B142C 000AE36C 80 04 00 0C */ lwz r0, 0xc(r4) +/* 800B1430 000AE370 38 63 00 02 */ addi r3, r3, 2 +/* 800B1434 000AE374 7C 03 00 40 */ cmplw r3, r0 +/* 800B1438 000AE378 40 81 00 08 */ ble lbl_800B1440 +/* 800B143C 000AE37C 4B FF DD 19 */ bl GDOverflowed +lbl_800B1440: +/* 800B1440 000AE380 80 8D 95 B8 */ lwz r4, __GDCurrentDL@sda21(r13) +/* 800B1444 000AE384 57 C3 07 FE */ clrlwi r3, r30, 0x1f +/* 800B1448 000AE388 38 C3 10 0C */ addi r6, r3, 0x100c +/* 800B144C 000AE38C 80 64 00 08 */ lwz r3, 8(r4) +/* 800B1450 000AE390 54 C6 04 3E */ clrlwi r6, r6, 0x10 +/* 800B1454 000AE394 7C C5 46 70 */ srawi r5, r6, 8 +/* 800B1458 000AE398 38 03 00 01 */ addi r0, r3, 1 +/* 800B145C 000AE39C 90 04 00 08 */ stw r0, 8(r4) +/* 800B1460 000AE3A0 98 A3 00 00 */ stb r5, 0(r3) +/* 800B1464 000AE3A4 80 8D 95 B8 */ lwz r4, __GDCurrentDL@sda21(r13) +/* 800B1468 000AE3A8 80 64 00 08 */ lwz r3, 8(r4) +/* 800B146C 000AE3AC 38 03 00 01 */ addi r0, r3, 1 +/* 800B1470 000AE3B0 90 04 00 08 */ stw r0, 8(r4) +/* 800B1474 000AE3B4 98 C3 00 00 */ stb r6, 0(r3) +/* 800B1478 000AE3B8 80 8D 95 B8 */ lwz r4, __GDCurrentDL@sda21(r13) +/* 800B147C 000AE3BC 80 64 00 08 */ lwz r3, 8(r4) +/* 800B1480 000AE3C0 80 04 00 0C */ lwz r0, 0xc(r4) +/* 800B1484 000AE3C4 38 63 00 04 */ addi r3, r3, 4 +/* 800B1488 000AE3C8 7C 03 00 40 */ cmplw r3, r0 +/* 800B148C 000AE3CC 40 81 00 08 */ ble lbl_800B1494 +/* 800B1490 000AE3D0 4B FF DC C5 */ bl GDOverflowed +lbl_800B1494: +/* 800B1494 000AE3D4 80 8D 95 B8 */ lwz r4, __GDCurrentDL@sda21(r13) +/* 800B1498 000AE3D8 57 E7 46 3E */ srwi r7, r31, 0x18 +/* 800B149C 000AE3DC 57 E6 86 3E */ rlwinm r6, r31, 0x10, 0x18, 0x1f +/* 800B14A0 000AE3E0 80 64 00 08 */ lwz r3, 8(r4) +/* 800B14A4 000AE3E4 57 E5 C6 3E */ rlwinm r5, r31, 0x18, 0x18, 0x1f +/* 800B14A8 000AE3E8 38 03 00 01 */ addi r0, r3, 1 +/* 800B14AC 000AE3EC 90 04 00 08 */ stw r0, 8(r4) +/* 800B14B0 000AE3F0 98 E3 00 00 */ stb r7, 0(r3) +/* 800B14B4 000AE3F4 80 8D 95 B8 */ lwz r4, __GDCurrentDL@sda21(r13) +/* 800B14B8 000AE3F8 80 64 00 08 */ lwz r3, 8(r4) +/* 800B14BC 000AE3FC 38 03 00 01 */ addi r0, r3, 1 +/* 800B14C0 000AE400 90 04 00 08 */ stw r0, 8(r4) +/* 800B14C4 000AE404 98 C3 00 00 */ stb r6, 0(r3) +/* 800B14C8 000AE408 80 8D 95 B8 */ lwz r4, __GDCurrentDL@sda21(r13) +/* 800B14CC 000AE40C 80 64 00 08 */ lwz r3, 8(r4) +/* 800B14D0 000AE410 38 03 00 01 */ addi r0, r3, 1 +/* 800B14D4 000AE414 90 04 00 08 */ stw r0, 8(r4) +/* 800B14D8 000AE418 98 A3 00 00 */ stb r5, 0(r3) +/* 800B14DC 000AE41C 80 8D 95 B8 */ lwz r4, __GDCurrentDL@sda21(r13) +/* 800B14E0 000AE420 80 64 00 08 */ lwz r3, 8(r4) +/* 800B14E4 000AE424 38 03 00 01 */ addi r0, r3, 1 +/* 800B14E8 000AE428 90 04 00 08 */ stw r0, 8(r4) +/* 800B14EC 000AE42C 9B E3 00 00 */ stb r31, 0(r3) +/* 800B14F0 000AE430 80 01 00 1C */ lwz r0, 0x1c(r1) +/* 800B14F4 000AE434 83 E1 00 14 */ lwz r31, 0x14(r1) +/* 800B14F8 000AE438 83 C1 00 10 */ lwz r30, 0x10(r1) +/* 800B14FC 000AE43C 38 21 00 18 */ addi r1, r1, 0x18 +/* 800B1500 000AE440 7C 08 03 A6 */ mtlr r0 +/* 800B1504 000AE444 4E 80 00 20 */ blr + +.global GDSetChanCtrl +GDSetChanCtrl: +/* 800B1508 000AE448 7C 08 02 A6 */ mflr r0 +/* 800B150C 000AE44C 2C 09 00 00 */ cmpwi r9, 0 +/* 800B1510 000AE450 90 01 00 04 */ stw r0, 4(r1) +/* 800B1514 000AE454 94 21 FF C0 */ stwu r1, -0x40(r1) +/* 800B1518 000AE458 BF 41 00 28 */ stmw r26, 0x28(r1) +/* 800B151C 000AE45C 3B 43 00 00 */ addi r26, r3, 0 +/* 800B1520 000AE460 40 82 00 08 */ bne lbl_800B1528 +/* 800B1524 000AE464 39 00 00 00 */ li r8, 0 +lbl_800B1528: +/* 800B1528 000AE468 7C 69 00 D0 */ neg r3, r9 +/* 800B152C 000AE46C 81 4D 95 B8 */ lwz r10, __GDCurrentDL@sda21(r13) +/* 800B1530 000AE470 30 03 FF FF */ addic r0, r3, -1 +/* 800B1534 000AE474 7D 60 19 10 */ subfe r11, r0, r3 +/* 800B1538 000AE478 80 6A 00 08 */ lwz r3, 8(r10) +/* 800B153C 000AE47C 80 0A 00 0C */ lwz r0, 0xc(r10) +/* 800B1540 000AE480 21 49 00 02 */ subfic r10, r9, 2 +/* 800B1544 000AE484 54 84 0D FC */ rlwinm r4, r4, 1, 0x17, 0x1e +/* 800B1548 000AE488 31 2A FF FF */ addic r9, r10, -1 +/* 800B154C 000AE48C 7D 49 51 10 */ subfe r10, r9, r10 +/* 800B1550 000AE490 7C C4 23 78 */ or r4, r6, r4 +/* 800B1554 000AE494 54 E9 16 BA */ rlwinm r9, r7, 2, 0x1a, 0x1d +/* 800B1558 000AE498 38 63 00 01 */ addi r3, r3, 1 +/* 800B155C 000AE49C 7C 03 00 40 */ cmplw r3, r0 +/* 800B1560 000AE4A0 54 A5 30 32 */ slwi r5, r5, 6 +/* 800B1564 000AE4A4 7D 24 23 78 */ or r4, r9, r4 +/* 800B1568 000AE4A8 7C A5 23 78 */ or r5, r5, r4 +/* 800B156C 000AE4AC 55 04 38 30 */ slwi r4, r8, 7 +/* 800B1570 000AE4B0 55 46 48 2C */ slwi r6, r10, 9 +/* 800B1574 000AE4B4 7C A4 23 78 */ or r4, r5, r4 +/* 800B1578 000AE4B8 7C C0 23 78 */ or r0, r6, r4 +/* 800B157C 000AE4BC 55 63 50 2A */ slwi r3, r11, 0xa +/* 800B1580 000AE4C0 54 E4 3C 68 */ rlwinm r4, r7, 7, 0x11, 0x14 +/* 800B1584 000AE4C4 7C 60 03 78 */ or r0, r3, r0 +/* 800B1588 000AE4C8 7C 9B 03 78 */ or r27, r4, r0 +/* 800B158C 000AE4CC 40 81 00 08 */ ble lbl_800B1594 +/* 800B1590 000AE4D0 4B FF DB C5 */ bl GDOverflowed +lbl_800B1594: +/* 800B1594 000AE4D4 80 8D 95 B8 */ lwz r4, __GDCurrentDL@sda21(r13) +/* 800B1598 000AE4D8 38 A0 00 10 */ li r5, 0x10 +/* 800B159C 000AE4DC 80 64 00 08 */ lwz r3, 8(r4) +/* 800B15A0 000AE4E0 38 03 00 01 */ addi r0, r3, 1 +/* 800B15A4 000AE4E4 90 04 00 08 */ stw r0, 8(r4) +/* 800B15A8 000AE4E8 98 A3 00 00 */ stb r5, 0(r3) +/* 800B15AC 000AE4EC 80 8D 95 B8 */ lwz r4, __GDCurrentDL@sda21(r13) +/* 800B15B0 000AE4F0 80 64 00 08 */ lwz r3, 8(r4) +/* 800B15B4 000AE4F4 80 04 00 0C */ lwz r0, 0xc(r4) +/* 800B15B8 000AE4F8 38 63 00 02 */ addi r3, r3, 2 +/* 800B15BC 000AE4FC 7C 03 00 40 */ cmplw r3, r0 +/* 800B15C0 000AE500 40 81 00 08 */ ble lbl_800B15C8 +/* 800B15C4 000AE504 4B FF DB 91 */ bl GDOverflowed +lbl_800B15C8: +/* 800B15C8 000AE508 80 8D 95 B8 */ lwz r4, __GDCurrentDL@sda21(r13) +/* 800B15CC 000AE50C 38 A0 00 00 */ li r5, 0 +/* 800B15D0 000AE510 80 64 00 08 */ lwz r3, 8(r4) +/* 800B15D4 000AE514 38 03 00 01 */ addi r0, r3, 1 +/* 800B15D8 000AE518 90 04 00 08 */ stw r0, 8(r4) +/* 800B15DC 000AE51C 98 A3 00 00 */ stb r5, 0(r3) +/* 800B15E0 000AE520 80 8D 95 B8 */ lwz r4, __GDCurrentDL@sda21(r13) +/* 800B15E4 000AE524 80 64 00 08 */ lwz r3, 8(r4) +/* 800B15E8 000AE528 38 03 00 01 */ addi r0, r3, 1 +/* 800B15EC 000AE52C 90 04 00 08 */ stw r0, 8(r4) +/* 800B15F0 000AE530 98 A3 00 00 */ stb r5, 0(r3) +/* 800B15F4 000AE534 80 8D 95 B8 */ lwz r4, __GDCurrentDL@sda21(r13) +/* 800B15F8 000AE538 80 64 00 08 */ lwz r3, 8(r4) +/* 800B15FC 000AE53C 80 04 00 0C */ lwz r0, 0xc(r4) +/* 800B1600 000AE540 38 63 00 02 */ addi r3, r3, 2 +/* 800B1604 000AE544 7C 03 00 40 */ cmplw r3, r0 +/* 800B1608 000AE548 40 81 00 08 */ ble lbl_800B1610 +/* 800B160C 000AE54C 4B FF DB 49 */ bl GDOverflowed +lbl_800B1610: +/* 800B1610 000AE550 80 8D 95 B8 */ lwz r4, __GDCurrentDL@sda21(r13) +/* 800B1614 000AE554 57 43 07 BE */ clrlwi r3, r26, 0x1e +/* 800B1618 000AE558 38 C3 10 0E */ addi r6, r3, 0x100e +/* 800B161C 000AE55C 80 64 00 08 */ lwz r3, 8(r4) +/* 800B1620 000AE560 54 C6 04 3E */ clrlwi r6, r6, 0x10 +/* 800B1624 000AE564 7C C5 46 70 */ srawi r5, r6, 8 +/* 800B1628 000AE568 38 03 00 01 */ addi r0, r3, 1 +/* 800B162C 000AE56C 90 04 00 08 */ stw r0, 8(r4) +/* 800B1630 000AE570 98 A3 00 00 */ stb r5, 0(r3) +/* 800B1634 000AE574 80 8D 95 B8 */ lwz r4, __GDCurrentDL@sda21(r13) +/* 800B1638 000AE578 80 64 00 08 */ lwz r3, 8(r4) +/* 800B163C 000AE57C 38 03 00 01 */ addi r0, r3, 1 +/* 800B1640 000AE580 90 04 00 08 */ stw r0, 8(r4) +/* 800B1644 000AE584 98 C3 00 00 */ stb r6, 0(r3) +/* 800B1648 000AE588 80 8D 95 B8 */ lwz r4, __GDCurrentDL@sda21(r13) +/* 800B164C 000AE58C 80 64 00 08 */ lwz r3, 8(r4) +/* 800B1650 000AE590 80 04 00 0C */ lwz r0, 0xc(r4) +/* 800B1654 000AE594 38 63 00 04 */ addi r3, r3, 4 +/* 800B1658 000AE598 7C 03 00 40 */ cmplw r3, r0 +/* 800B165C 000AE59C 40 81 00 08 */ ble lbl_800B1664 +/* 800B1660 000AE5A0 4B FF DA F5 */ bl GDOverflowed +lbl_800B1664: +/* 800B1664 000AE5A4 80 AD 95 B8 */ lwz r5, __GDCurrentDL@sda21(r13) +/* 800B1668 000AE5A8 38 1A FF FC */ addi r0, r26, -4 +/* 800B166C 000AE5AC 57 7F 46 3E */ srwi r31, r27, 0x18 +/* 800B1670 000AE5B0 80 85 00 08 */ lwz r4, 8(r5) +/* 800B1674 000AE5B4 57 7E 86 3E */ rlwinm r30, r27, 0x10, 0x18, 0x1f +/* 800B1678 000AE5B8 57 7D C6 3E */ rlwinm r29, r27, 0x18, 0x18, 0x1f +/* 800B167C 000AE5BC 38 64 00 01 */ addi r3, r4, 1 +/* 800B1680 000AE5C0 90 65 00 08 */ stw r3, 8(r5) +/* 800B1684 000AE5C4 28 00 00 01 */ cmplwi r0, 1 +/* 800B1688 000AE5C8 57 7C 06 3E */ clrlwi r28, r27, 0x18 +/* 800B168C 000AE5CC 9B E4 00 00 */ stb r31, 0(r4) +/* 800B1690 000AE5D0 80 8D 95 B8 */ lwz r4, __GDCurrentDL@sda21(r13) +/* 800B1694 000AE5D4 80 64 00 08 */ lwz r3, 8(r4) +/* 800B1698 000AE5D8 38 03 00 01 */ addi r0, r3, 1 +/* 800B169C 000AE5DC 90 04 00 08 */ stw r0, 8(r4) +/* 800B16A0 000AE5E0 9B C3 00 00 */ stb r30, 0(r3) +/* 800B16A4 000AE5E4 80 8D 95 B8 */ lwz r4, __GDCurrentDL@sda21(r13) +/* 800B16A8 000AE5E8 80 64 00 08 */ lwz r3, 8(r4) +/* 800B16AC 000AE5EC 38 03 00 01 */ addi r0, r3, 1 +/* 800B16B0 000AE5F0 90 04 00 08 */ stw r0, 8(r4) +/* 800B16B4 000AE5F4 9B A3 00 00 */ stb r29, 0(r3) +/* 800B16B8 000AE5F8 80 8D 95 B8 */ lwz r4, __GDCurrentDL@sda21(r13) +/* 800B16BC 000AE5FC 80 64 00 08 */ lwz r3, 8(r4) +/* 800B16C0 000AE600 38 03 00 01 */ addi r0, r3, 1 +/* 800B16C4 000AE604 90 04 00 08 */ stw r0, 8(r4) +/* 800B16C8 000AE608 9B 63 00 00 */ stb r27, 0(r3) +/* 800B16CC 000AE60C 41 81 01 3C */ bgt lbl_800B1808 +/* 800B16D0 000AE610 80 8D 95 B8 */ lwz r4, __GDCurrentDL@sda21(r13) +/* 800B16D4 000AE614 80 64 00 08 */ lwz r3, 8(r4) +/* 800B16D8 000AE618 80 04 00 0C */ lwz r0, 0xc(r4) +/* 800B16DC 000AE61C 38 63 00 01 */ addi r3, r3, 1 +/* 800B16E0 000AE620 7C 03 00 40 */ cmplw r3, r0 +/* 800B16E4 000AE624 40 81 00 08 */ ble lbl_800B16EC +/* 800B16E8 000AE628 4B FF DA 6D */ bl GDOverflowed +lbl_800B16EC: +/* 800B16EC 000AE62C 80 8D 95 B8 */ lwz r4, __GDCurrentDL@sda21(r13) +/* 800B16F0 000AE630 38 A0 00 10 */ li r5, 0x10 +/* 800B16F4 000AE634 80 64 00 08 */ lwz r3, 8(r4) +/* 800B16F8 000AE638 38 03 00 01 */ addi r0, r3, 1 +/* 800B16FC 000AE63C 90 04 00 08 */ stw r0, 8(r4) +/* 800B1700 000AE640 98 A3 00 00 */ stb r5, 0(r3) +/* 800B1704 000AE644 80 8D 95 B8 */ lwz r4, __GDCurrentDL@sda21(r13) +/* 800B1708 000AE648 80 64 00 08 */ lwz r3, 8(r4) +/* 800B170C 000AE64C 80 04 00 0C */ lwz r0, 0xc(r4) +/* 800B1710 000AE650 38 63 00 02 */ addi r3, r3, 2 +/* 800B1714 000AE654 7C 03 00 40 */ cmplw r3, r0 +/* 800B1718 000AE658 40 81 00 08 */ ble lbl_800B1720 +/* 800B171C 000AE65C 4B FF DA 39 */ bl GDOverflowed +lbl_800B1720: +/* 800B1720 000AE660 80 8D 95 B8 */ lwz r4, __GDCurrentDL@sda21(r13) +/* 800B1724 000AE664 38 A0 00 00 */ li r5, 0 +/* 800B1728 000AE668 80 64 00 08 */ lwz r3, 8(r4) +/* 800B172C 000AE66C 38 03 00 01 */ addi r0, r3, 1 +/* 800B1730 000AE670 90 04 00 08 */ stw r0, 8(r4) +/* 800B1734 000AE674 98 A3 00 00 */ stb r5, 0(r3) +/* 800B1738 000AE678 80 8D 95 B8 */ lwz r4, __GDCurrentDL@sda21(r13) +/* 800B173C 000AE67C 80 64 00 08 */ lwz r3, 8(r4) +/* 800B1740 000AE680 38 03 00 01 */ addi r0, r3, 1 +/* 800B1744 000AE684 90 04 00 08 */ stw r0, 8(r4) +/* 800B1748 000AE688 98 A3 00 00 */ stb r5, 0(r3) +/* 800B174C 000AE68C 80 8D 95 B8 */ lwz r4, __GDCurrentDL@sda21(r13) +/* 800B1750 000AE690 80 64 00 08 */ lwz r3, 8(r4) +/* 800B1754 000AE694 80 04 00 0C */ lwz r0, 0xc(r4) +/* 800B1758 000AE698 38 63 00 02 */ addi r3, r3, 2 +/* 800B175C 000AE69C 7C 03 00 40 */ cmplw r3, r0 +/* 800B1760 000AE6A0 40 81 00 08 */ ble lbl_800B1768 +/* 800B1764 000AE6A4 4B FF D9 F1 */ bl GDOverflowed +lbl_800B1768: +/* 800B1768 000AE6A8 80 8D 95 B8 */ lwz r4, __GDCurrentDL@sda21(r13) +/* 800B176C 000AE6AC 38 DA 10 0C */ addi r6, r26, 0x100c +/* 800B1770 000AE6B0 54 C6 04 3E */ clrlwi r6, r6, 0x10 +/* 800B1774 000AE6B4 80 64 00 08 */ lwz r3, 8(r4) +/* 800B1778 000AE6B8 7C C5 46 70 */ srawi r5, r6, 8 +/* 800B177C 000AE6BC 38 03 00 01 */ addi r0, r3, 1 +/* 800B1780 000AE6C0 90 04 00 08 */ stw r0, 8(r4) +/* 800B1784 000AE6C4 98 A3 00 00 */ stb r5, 0(r3) +/* 800B1788 000AE6C8 80 8D 95 B8 */ lwz r4, __GDCurrentDL@sda21(r13) +/* 800B178C 000AE6CC 80 64 00 08 */ lwz r3, 8(r4) +/* 800B1790 000AE6D0 38 03 00 01 */ addi r0, r3, 1 +/* 800B1794 000AE6D4 90 04 00 08 */ stw r0, 8(r4) +/* 800B1798 000AE6D8 98 C3 00 00 */ stb r6, 0(r3) +/* 800B179C 000AE6DC 80 8D 95 B8 */ lwz r4, __GDCurrentDL@sda21(r13) +/* 800B17A0 000AE6E0 80 64 00 08 */ lwz r3, 8(r4) +/* 800B17A4 000AE6E4 80 04 00 0C */ lwz r0, 0xc(r4) +/* 800B17A8 000AE6E8 38 63 00 04 */ addi r3, r3, 4 +/* 800B17AC 000AE6EC 7C 03 00 40 */ cmplw r3, r0 +/* 800B17B0 000AE6F0 40 81 00 08 */ ble lbl_800B17B8 +/* 800B17B4 000AE6F4 4B FF D9 A1 */ bl GDOverflowed +lbl_800B17B8: +/* 800B17B8 000AE6F8 80 8D 95 B8 */ lwz r4, __GDCurrentDL@sda21(r13) +/* 800B17BC 000AE6FC 80 64 00 08 */ lwz r3, 8(r4) +/* 800B17C0 000AE700 38 03 00 01 */ addi r0, r3, 1 +/* 800B17C4 000AE704 90 04 00 08 */ stw r0, 8(r4) +/* 800B17C8 000AE708 9B E3 00 00 */ stb r31, 0(r3) +/* 800B17CC 000AE70C 80 8D 95 B8 */ lwz r4, __GDCurrentDL@sda21(r13) +/* 800B17D0 000AE710 80 64 00 08 */ lwz r3, 8(r4) +/* 800B17D4 000AE714 38 03 00 01 */ addi r0, r3, 1 +/* 800B17D8 000AE718 90 04 00 08 */ stw r0, 8(r4) +/* 800B17DC 000AE71C 9B C3 00 00 */ stb r30, 0(r3) +/* 800B17E0 000AE720 80 8D 95 B8 */ lwz r4, __GDCurrentDL@sda21(r13) +/* 800B17E4 000AE724 80 64 00 08 */ lwz r3, 8(r4) +/* 800B17E8 000AE728 38 03 00 01 */ addi r0, r3, 1 +/* 800B17EC 000AE72C 90 04 00 08 */ stw r0, 8(r4) +/* 800B17F0 000AE730 9B A3 00 00 */ stb r29, 0(r3) +/* 800B17F4 000AE734 80 8D 95 B8 */ lwz r4, __GDCurrentDL@sda21(r13) +/* 800B17F8 000AE738 80 64 00 08 */ lwz r3, 8(r4) +/* 800B17FC 000AE73C 38 03 00 01 */ addi r0, r3, 1 +/* 800B1800 000AE740 90 04 00 08 */ stw r0, 8(r4) +/* 800B1804 000AE744 9B 83 00 00 */ stb r28, 0(r3) +lbl_800B1808: +/* 800B1808 000AE748 BB 41 00 28 */ lmw r26, 0x28(r1) +/* 800B180C 000AE74C 80 01 00 44 */ lwz r0, 0x44(r1) +/* 800B1810 000AE750 38 21 00 40 */ addi r1, r1, 0x40 +/* 800B1814 000AE754 7C 08 03 A6 */ mtlr r0 +/* 800B1818 000AE758 4E 80 00 20 */ blr diff --git a/asm/Dolphin/gd/GDPixel.s b/asm/Dolphin/gd/GDPixel.s new file mode 100644 index 0000000..95d6f0f --- /dev/null +++ b/asm/Dolphin/gd/GDPixel.s @@ -0,0 +1,450 @@ +.include "macros.inc" + +.section .text, "ax" # 0x80005600 - 0x8036FBA0 +.global GDSetBlendMode +GDSetBlendMode: +/* 800B181C 000AE75C 7C 08 02 A6 */ mflr r0 +/* 800B1820 000AE760 90 01 00 04 */ stw r0, 4(r1) +/* 800B1824 000AE764 94 21 FF D8 */ stwu r1, -0x28(r1) +/* 800B1828 000AE768 93 E1 00 24 */ stw r31, 0x24(r1) +/* 800B182C 000AE76C 3B E6 00 00 */ addi r31, r6, 0 +/* 800B1830 000AE770 93 C1 00 20 */ stw r30, 0x20(r1) +/* 800B1834 000AE774 7C BE 2B 78 */ mr r30, r5 +/* 800B1838 000AE778 93 A1 00 1C */ stw r29, 0x1c(r1) +/* 800B183C 000AE77C 3B A4 00 00 */ addi r29, r4, 0 +/* 800B1840 000AE780 93 81 00 18 */ stw r28, 0x18(r1) +/* 800B1844 000AE784 3B 83 00 00 */ addi r28, r3, 0 +/* 800B1848 000AE788 80 ED 95 B8 */ lwz r7, __GDCurrentDL@sda21(r13) +/* 800B184C 000AE78C 80 67 00 08 */ lwz r3, 8(r7) +/* 800B1850 000AE790 80 07 00 0C */ lwz r0, 0xc(r7) +/* 800B1854 000AE794 38 63 00 01 */ addi r3, r3, 1 +/* 800B1858 000AE798 7C 03 00 40 */ cmplw r3, r0 +/* 800B185C 000AE79C 40 81 00 08 */ ble lbl_800B1864 +/* 800B1860 000AE7A0 4B FF D8 F5 */ bl GDOverflowed +lbl_800B1864: +/* 800B1864 000AE7A4 80 8D 95 B8 */ lwz r4, __GDCurrentDL@sda21(r13) +/* 800B1868 000AE7A8 38 A0 00 61 */ li r5, 0x61 +/* 800B186C 000AE7AC 80 64 00 08 */ lwz r3, 8(r4) +/* 800B1870 000AE7B0 38 03 00 01 */ addi r0, r3, 1 +/* 800B1874 000AE7B4 90 04 00 08 */ stw r0, 8(r4) +/* 800B1878 000AE7B8 98 A3 00 00 */ stb r5, 0(r3) +/* 800B187C 000AE7BC 80 8D 95 B8 */ lwz r4, __GDCurrentDL@sda21(r13) +/* 800B1880 000AE7C0 80 64 00 08 */ lwz r3, 8(r4) +/* 800B1884 000AE7C4 80 04 00 0C */ lwz r0, 0xc(r4) +/* 800B1888 000AE7C8 38 63 00 04 */ addi r3, r3, 4 +/* 800B188C 000AE7CC 7C 03 00 40 */ cmplw r3, r0 +/* 800B1890 000AE7D0 40 81 00 08 */ ble lbl_800B1898 +/* 800B1894 000AE7D4 4B FF D8 C1 */ bl GDOverflowed +lbl_800B1898: +/* 800B1898 000AE7D8 80 8D 95 B8 */ lwz r4, __GDCurrentDL@sda21(r13) +/* 800B189C 000AE7DC 39 00 00 FE */ li r8, 0xfe +/* 800B18A0 000AE7E0 38 E0 00 00 */ li r7, 0 +/* 800B18A4 000AE7E4 80 64 00 08 */ lwz r3, 8(r4) +/* 800B18A8 000AE7E8 38 C0 00 1F */ li r6, 0x1f +/* 800B18AC 000AE7EC 38 A0 00 E3 */ li r5, 0xe3 +/* 800B18B0 000AE7F0 38 03 00 01 */ addi r0, r3, 1 +/* 800B18B4 000AE7F4 90 04 00 08 */ stw r0, 8(r4) +/* 800B18B8 000AE7F8 99 03 00 00 */ stb r8, 0(r3) +/* 800B18BC 000AE7FC 80 8D 95 B8 */ lwz r4, __GDCurrentDL@sda21(r13) +/* 800B18C0 000AE800 80 64 00 08 */ lwz r3, 8(r4) +/* 800B18C4 000AE804 38 03 00 01 */ addi r0, r3, 1 +/* 800B18C8 000AE808 90 04 00 08 */ stw r0, 8(r4) +/* 800B18CC 000AE80C 98 E3 00 00 */ stb r7, 0(r3) +/* 800B18D0 000AE810 80 8D 95 B8 */ lwz r4, __GDCurrentDL@sda21(r13) +/* 800B18D4 000AE814 80 64 00 08 */ lwz r3, 8(r4) +/* 800B18D8 000AE818 38 03 00 01 */ addi r0, r3, 1 +/* 800B18DC 000AE81C 90 04 00 08 */ stw r0, 8(r4) +/* 800B18E0 000AE820 98 C3 00 00 */ stb r6, 0(r3) +/* 800B18E4 000AE824 80 8D 95 B8 */ lwz r4, __GDCurrentDL@sda21(r13) +/* 800B18E8 000AE828 80 64 00 08 */ lwz r3, 8(r4) +/* 800B18EC 000AE82C 38 03 00 01 */ addi r0, r3, 1 +/* 800B18F0 000AE830 90 04 00 08 */ stw r0, 8(r4) +/* 800B18F4 000AE834 98 A3 00 00 */ stb r5, 0(r3) +/* 800B18F8 000AE838 80 8D 95 B8 */ lwz r4, __GDCurrentDL@sda21(r13) +/* 800B18FC 000AE83C 80 64 00 08 */ lwz r3, 8(r4) +/* 800B1900 000AE840 80 04 00 0C */ lwz r0, 0xc(r4) +/* 800B1904 000AE844 38 63 00 01 */ addi r3, r3, 1 +/* 800B1908 000AE848 7C 03 00 40 */ cmplw r3, r0 +/* 800B190C 000AE84C 40 81 00 08 */ ble lbl_800B1914 +/* 800B1910 000AE850 4B FF D8 45 */ bl GDOverflowed +lbl_800B1914: +/* 800B1914 000AE854 80 8D 95 B8 */ lwz r4, __GDCurrentDL@sda21(r13) +/* 800B1918 000AE858 38 A0 00 61 */ li r5, 0x61 +/* 800B191C 000AE85C 80 64 00 08 */ lwz r3, 8(r4) +/* 800B1920 000AE860 38 03 00 01 */ addi r0, r3, 1 +/* 800B1924 000AE864 90 04 00 08 */ stw r0, 8(r4) +/* 800B1928 000AE868 98 A3 00 00 */ stb r5, 0(r3) +/* 800B192C 000AE86C 80 8D 95 B8 */ lwz r4, __GDCurrentDL@sda21(r13) +/* 800B1930 000AE870 80 64 00 08 */ lwz r3, 8(r4) +/* 800B1934 000AE874 80 04 00 0C */ lwz r0, 0xc(r4) +/* 800B1938 000AE878 38 63 00 04 */ addi r3, r3, 4 +/* 800B193C 000AE87C 7C 03 00 40 */ cmplw r3, r0 +/* 800B1940 000AE880 40 81 00 08 */ ble lbl_800B1948 +/* 800B1944 000AE884 4B FF D8 11 */ bl GDOverflowed +lbl_800B1948: +/* 800B1948 000AE888 2C 1C 00 01 */ cmpwi r28, 1 +/* 800B194C 000AE88C 38 80 00 01 */ li r4, 1 +/* 800B1950 000AE890 41 82 00 10 */ beq lbl_800B1960 +/* 800B1954 000AE894 2C 1C 00 03 */ cmpwi r28, 3 +/* 800B1958 000AE898 41 82 00 08 */ beq lbl_800B1960 +/* 800B195C 000AE89C 38 80 00 00 */ li r4, 0 +lbl_800B1960: +/* 800B1960 000AE8A0 20 7C 00 03 */ subfic r3, r28, 3 +/* 800B1964 000AE8A4 80 CD 95 B8 */ lwz r6, __GDCurrentDL@sda21(r13) +/* 800B1968 000AE8A8 20 1C 00 02 */ subfic r0, r28, 2 +/* 800B196C 000AE8AC 7C 00 00 34 */ cntlzw r0, r0 +/* 800B1970 000AE8B0 80 E6 00 08 */ lwz r7, 8(r6) +/* 800B1974 000AE8B4 54 00 E1 3C */ rlwinm r0, r0, 0x1c, 4, 0x1e +/* 800B1978 000AE8B8 7C 69 00 34 */ cntlzw r9, r3 +/* 800B197C 000AE8BC 7C 08 23 78 */ or r8, r0, r4 +/* 800B1980 000AE8C0 38 A7 00 01 */ addi r5, r7, 1 +/* 800B1984 000AE8C4 90 A6 00 08 */ stw r5, 8(r6) +/* 800B1988 000AE8C8 57 C3 28 34 */ slwi r3, r30, 5 +/* 800B198C 000AE8CC 57 A4 40 2E */ slwi r4, r29, 8 +/* 800B1990 000AE8D0 7C 66 43 78 */ or r6, r3, r8 +/* 800B1994 000AE8D4 7C 88 33 78 */ or r8, r4, r6 +/* 800B1998 000AE8D8 55 25 30 28 */ rlwinm r5, r9, 6, 0, 0x14 +/* 800B199C 000AE8DC 57 E6 60 26 */ slwi r6, r31, 0xc +/* 800B19A0 000AE8E0 7C A8 43 78 */ or r8, r5, r8 +/* 800B19A4 000AE8E4 7C C8 43 78 */ or r8, r6, r8 +/* 800B19A8 000AE8E8 65 08 41 00 */ oris r8, r8, 0x4100 +/* 800B19AC 000AE8EC 55 08 46 3E */ srwi r8, r8, 0x18 +/* 800B19B0 000AE8F0 99 07 00 00 */ stb r8, 0(r7) +/* 800B19B4 000AE8F4 2C 1C 00 01 */ cmpwi r28, 1 +/* 800B19B8 000AE8F8 38 E0 00 01 */ li r7, 1 +/* 800B19BC 000AE8FC 41 82 00 10 */ beq lbl_800B19CC +/* 800B19C0 000AE900 2C 1C 00 03 */ cmpwi r28, 3 +/* 800B19C4 000AE904 41 82 00 08 */ beq lbl_800B19CC +/* 800B19C8 000AE908 38 E0 00 00 */ li r7, 0 +lbl_800B19CC: +/* 800B19CC 000AE90C 7C 07 3B 78 */ or r7, r0, r7 +/* 800B19D0 000AE910 81 2D 95 B8 */ lwz r9, __GDCurrentDL@sda21(r13) +/* 800B19D4 000AE914 7C 67 3B 78 */ or r7, r3, r7 +/* 800B19D8 000AE918 7C 87 3B 78 */ or r7, r4, r7 +/* 800B19DC 000AE91C 81 09 00 08 */ lwz r8, 8(r9) +/* 800B19E0 000AE920 7C A7 3B 78 */ or r7, r5, r7 +/* 800B19E4 000AE924 7C CA 3B 78 */ or r10, r6, r7 +/* 800B19E8 000AE928 38 E8 00 01 */ addi r7, r8, 1 +/* 800B19EC 000AE92C 65 4A 41 00 */ oris r10, r10, 0x4100 +/* 800B19F0 000AE930 90 E9 00 08 */ stw r7, 8(r9) +/* 800B19F4 000AE934 55 47 86 3E */ rlwinm r7, r10, 0x10, 0x18, 0x1f +/* 800B19F8 000AE938 2C 1C 00 01 */ cmpwi r28, 1 +/* 800B19FC 000AE93C 98 E8 00 00 */ stb r7, 0(r8) +/* 800B1A00 000AE940 38 E0 00 01 */ li r7, 1 +/* 800B1A04 000AE944 41 82 00 10 */ beq lbl_800B1A14 +/* 800B1A08 000AE948 2C 1C 00 03 */ cmpwi r28, 3 +/* 800B1A0C 000AE94C 41 82 00 08 */ beq lbl_800B1A14 +/* 800B1A10 000AE950 38 E0 00 00 */ li r7, 0 +lbl_800B1A14: +/* 800B1A14 000AE954 7C 07 3B 78 */ or r7, r0, r7 +/* 800B1A18 000AE958 81 2D 95 B8 */ lwz r9, __GDCurrentDL@sda21(r13) +/* 800B1A1C 000AE95C 7C 67 3B 78 */ or r7, r3, r7 +/* 800B1A20 000AE960 7C 87 3B 78 */ or r7, r4, r7 +/* 800B1A24 000AE964 81 09 00 08 */ lwz r8, 8(r9) +/* 800B1A28 000AE968 7C A7 3B 78 */ or r7, r5, r7 +/* 800B1A2C 000AE96C 7C CA 3B 78 */ or r10, r6, r7 +/* 800B1A30 000AE970 38 E8 00 01 */ addi r7, r8, 1 +/* 800B1A34 000AE974 65 4A 41 00 */ oris r10, r10, 0x4100 +/* 800B1A38 000AE978 90 E9 00 08 */ stw r7, 8(r9) +/* 800B1A3C 000AE97C 55 47 C6 3E */ rlwinm r7, r10, 0x18, 0x18, 0x1f +/* 800B1A40 000AE980 2C 1C 00 01 */ cmpwi r28, 1 +/* 800B1A44 000AE984 98 E8 00 00 */ stb r7, 0(r8) +/* 800B1A48 000AE988 38 E0 00 01 */ li r7, 1 +/* 800B1A4C 000AE98C 41 82 00 10 */ beq lbl_800B1A5C +/* 800B1A50 000AE990 2C 1C 00 03 */ cmpwi r28, 3 +/* 800B1A54 000AE994 41 82 00 08 */ beq lbl_800B1A5C +/* 800B1A58 000AE998 38 E0 00 00 */ li r7, 0 +lbl_800B1A5C: +/* 800B1A5C 000AE99C 7C 00 3B 78 */ or r0, r0, r7 +/* 800B1A60 000AE9A0 80 ED 95 B8 */ lwz r7, __GDCurrentDL@sda21(r13) +/* 800B1A64 000AE9A4 7C 60 03 78 */ or r0, r3, r0 +/* 800B1A68 000AE9A8 7C 80 03 78 */ or r0, r4, r0 +/* 800B1A6C 000AE9AC 80 67 00 08 */ lwz r3, 8(r7) +/* 800B1A70 000AE9B0 7C A0 03 78 */ or r0, r5, r0 +/* 800B1A74 000AE9B4 7C C4 03 78 */ or r4, r6, r0 +/* 800B1A78 000AE9B8 38 03 00 01 */ addi r0, r3, 1 +/* 800B1A7C 000AE9BC 90 07 00 08 */ stw r0, 8(r7) +/* 800B1A80 000AE9C0 60 84 00 00 */ ori r4, r4, 0 +/* 800B1A84 000AE9C4 98 83 00 00 */ stb r4, 0(r3) +/* 800B1A88 000AE9C8 80 01 00 2C */ lwz r0, 0x2c(r1) +/* 800B1A8C 000AE9CC 83 E1 00 24 */ lwz r31, 0x24(r1) +/* 800B1A90 000AE9D0 83 C1 00 20 */ lwz r30, 0x20(r1) +/* 800B1A94 000AE9D4 83 A1 00 1C */ lwz r29, 0x1c(r1) +/* 800B1A98 000AE9D8 83 81 00 18 */ lwz r28, 0x18(r1) +/* 800B1A9C 000AE9DC 38 21 00 28 */ addi r1, r1, 0x28 +/* 800B1AA0 000AE9E0 7C 08 03 A6 */ mtlr r0 +/* 800B1AA4 000AE9E4 4E 80 00 20 */ blr + +.global GDSetBlendModeEtc +GDSetBlendModeEtc: +/* 800B1AA8 000AE9E8 7C 08 02 A6 */ mflr r0 +/* 800B1AAC 000AE9EC 90 01 00 04 */ stw r0, 4(r1) +/* 800B1AB0 000AE9F0 94 21 FF C0 */ stwu r1, -0x40(r1) +/* 800B1AB4 000AE9F4 BF 21 00 24 */ stmw r25, 0x24(r1) +/* 800B1AB8 000AE9F8 3B 23 00 00 */ addi r25, r3, 0 +/* 800B1ABC 000AE9FC 3B 44 00 00 */ addi r26, r4, 0 +/* 800B1AC0 000AEA00 7C BB 2B 78 */ mr r27, r5 +/* 800B1AC4 000AEA04 3B 86 00 00 */ addi r28, r6, 0 +/* 800B1AC8 000AEA08 3B A7 00 00 */ addi r29, r7, 0 +/* 800B1ACC 000AEA0C 3B C8 00 00 */ addi r30, r8, 0 +/* 800B1AD0 000AEA10 3B E9 00 00 */ addi r31, r9, 0 +/* 800B1AD4 000AEA14 81 4D 95 B8 */ lwz r10, __GDCurrentDL@sda21(r13) +/* 800B1AD8 000AEA18 80 6A 00 08 */ lwz r3, 8(r10) +/* 800B1ADC 000AEA1C 80 0A 00 0C */ lwz r0, 0xc(r10) +/* 800B1AE0 000AEA20 38 63 00 01 */ addi r3, r3, 1 +/* 800B1AE4 000AEA24 7C 03 00 40 */ cmplw r3, r0 +/* 800B1AE8 000AEA28 40 81 00 08 */ ble lbl_800B1AF0 +/* 800B1AEC 000AEA2C 4B FF D6 69 */ bl GDOverflowed +lbl_800B1AF0: +/* 800B1AF0 000AEA30 80 8D 95 B8 */ lwz r4, __GDCurrentDL@sda21(r13) +/* 800B1AF4 000AEA34 38 A0 00 61 */ li r5, 0x61 +/* 800B1AF8 000AEA38 80 64 00 08 */ lwz r3, 8(r4) +/* 800B1AFC 000AEA3C 38 03 00 01 */ addi r0, r3, 1 +/* 800B1B00 000AEA40 90 04 00 08 */ stw r0, 8(r4) +/* 800B1B04 000AEA44 98 A3 00 00 */ stb r5, 0(r3) +/* 800B1B08 000AEA48 80 8D 95 B8 */ lwz r4, __GDCurrentDL@sda21(r13) +/* 800B1B0C 000AEA4C 80 64 00 08 */ lwz r3, 8(r4) +/* 800B1B10 000AEA50 80 04 00 0C */ lwz r0, 0xc(r4) +/* 800B1B14 000AEA54 38 63 00 04 */ addi r3, r3, 4 +/* 800B1B18 000AEA58 7C 03 00 40 */ cmplw r3, r0 +/* 800B1B1C 000AEA5C 40 81 00 08 */ ble lbl_800B1B24 +/* 800B1B20 000AEA60 4B FF D6 35 */ bl GDOverflowed +lbl_800B1B24: +/* 800B1B24 000AEA64 2C 19 00 01 */ cmpwi r25, 1 +/* 800B1B28 000AEA68 38 80 00 01 */ li r4, 1 +/* 800B1B2C 000AEA6C 41 82 00 10 */ beq lbl_800B1B3C +/* 800B1B30 000AEA70 2C 19 00 03 */ cmpwi r25, 3 +/* 800B1B34 000AEA74 41 82 00 08 */ beq lbl_800B1B3C +/* 800B1B38 000AEA78 38 80 00 00 */ li r4, 0 +lbl_800B1B3C: +/* 800B1B3C 000AEA7C 20 79 00 03 */ subfic r3, r25, 3 +/* 800B1B40 000AEA80 80 CD 95 B8 */ lwz r6, __GDCurrentDL@sda21(r13) +/* 800B1B44 000AEA84 20 19 00 02 */ subfic r0, r25, 2 +/* 800B1B48 000AEA88 7C 00 00 34 */ cntlzw r0, r0 +/* 800B1B4C 000AEA8C 81 46 00 08 */ lwz r10, 8(r6) +/* 800B1B50 000AEA90 54 00 E1 3C */ rlwinm r0, r0, 0x1c, 4, 0x1e +/* 800B1B54 000AEA94 7C 6B 00 34 */ cntlzw r11, r3 +/* 800B1B58 000AEA98 7C 07 23 78 */ or r7, r0, r4 +/* 800B1B5C 000AEA9C 38 AA 00 01 */ addi r5, r10, 1 +/* 800B1B60 000AEAA0 90 A6 00 08 */ stw r5, 8(r6) +/* 800B1B64 000AEAA4 57 E3 15 BA */ rlwinm r3, r31, 2, 0x16, 0x1d +/* 800B1B68 000AEAA8 57 A4 1D 78 */ rlwinm r4, r29, 3, 0x15, 0x1c +/* 800B1B6C 000AEAAC 7C 66 3B 78 */ or r6, r3, r7 +/* 800B1B70 000AEAB0 7C 87 33 78 */ or r7, r4, r6 +/* 800B1B74 000AEAB4 57 C5 25 36 */ rlwinm r5, r30, 4, 0x14, 0x1b +/* 800B1B78 000AEAB8 7C A8 3B 78 */ or r8, r5, r7 +/* 800B1B7C 000AEABC 57 66 28 34 */ slwi r6, r27, 5 +/* 800B1B80 000AEAC0 7C C9 43 78 */ or r9, r6, r8 +/* 800B1B84 000AEAC4 57 47 40 2E */ slwi r7, r26, 8 +/* 800B1B88 000AEAC8 55 68 30 28 */ rlwinm r8, r11, 6, 0, 0x14 +/* 800B1B8C 000AEACC 7C EB 4B 78 */ or r11, r7, r9 +/* 800B1B90 000AEAD0 57 89 60 26 */ slwi r9, r28, 0xc +/* 800B1B94 000AEAD4 7D 0B 5B 78 */ or r11, r8, r11 +/* 800B1B98 000AEAD8 7D 2B 5B 78 */ or r11, r9, r11 +/* 800B1B9C 000AEADC 65 6B 41 00 */ oris r11, r11, 0x4100 +/* 800B1BA0 000AEAE0 55 6B 46 3E */ srwi r11, r11, 0x18 +/* 800B1BA4 000AEAE4 99 6A 00 00 */ stb r11, 0(r10) +/* 800B1BA8 000AEAE8 2C 19 00 01 */ cmpwi r25, 1 +/* 800B1BAC 000AEAEC 39 40 00 01 */ li r10, 1 +/* 800B1BB0 000AEAF0 41 82 00 10 */ beq lbl_800B1BC0 +/* 800B1BB4 000AEAF4 2C 19 00 03 */ cmpwi r25, 3 +/* 800B1BB8 000AEAF8 41 82 00 08 */ beq lbl_800B1BC0 +/* 800B1BBC 000AEAFC 39 40 00 00 */ li r10, 0 +lbl_800B1BC0: +/* 800B1BC0 000AEB00 7C 0A 53 78 */ or r10, r0, r10 +/* 800B1BC4 000AEB04 81 8D 95 B8 */ lwz r12, __GDCurrentDL@sda21(r13) +/* 800B1BC8 000AEB08 7C 6A 53 78 */ or r10, r3, r10 +/* 800B1BCC 000AEB0C 7C 8A 53 78 */ or r10, r4, r10 +/* 800B1BD0 000AEB10 81 6C 00 08 */ lwz r11, 8(r12) +/* 800B1BD4 000AEB14 7C AA 53 78 */ or r10, r5, r10 +/* 800B1BD8 000AEB18 7C CA 53 78 */ or r10, r6, r10 +/* 800B1BDC 000AEB1C 7C EA 53 78 */ or r10, r7, r10 +/* 800B1BE0 000AEB20 7D 0A 53 78 */ or r10, r8, r10 +/* 800B1BE4 000AEB24 7D 3A 53 78 */ or r26, r9, r10 +/* 800B1BE8 000AEB28 39 4B 00 01 */ addi r10, r11, 1 +/* 800B1BEC 000AEB2C 67 5A 41 00 */ oris r26, r26, 0x4100 +/* 800B1BF0 000AEB30 91 4C 00 08 */ stw r10, 8(r12) +/* 800B1BF4 000AEB34 57 4A 86 3E */ rlwinm r10, r26, 0x10, 0x18, 0x1f +/* 800B1BF8 000AEB38 2C 19 00 01 */ cmpwi r25, 1 +/* 800B1BFC 000AEB3C 99 4B 00 00 */ stb r10, 0(r11) +/* 800B1C00 000AEB40 39 40 00 01 */ li r10, 1 +/* 800B1C04 000AEB44 41 82 00 10 */ beq lbl_800B1C14 +/* 800B1C08 000AEB48 2C 19 00 03 */ cmpwi r25, 3 +/* 800B1C0C 000AEB4C 41 82 00 08 */ beq lbl_800B1C14 +/* 800B1C10 000AEB50 39 40 00 00 */ li r10, 0 +lbl_800B1C14: +/* 800B1C14 000AEB54 7C 0A 53 78 */ or r10, r0, r10 +/* 800B1C18 000AEB58 81 8D 95 B8 */ lwz r12, __GDCurrentDL@sda21(r13) +/* 800B1C1C 000AEB5C 7C 6A 53 78 */ or r10, r3, r10 +/* 800B1C20 000AEB60 7C 8A 53 78 */ or r10, r4, r10 +/* 800B1C24 000AEB64 81 6C 00 08 */ lwz r11, 8(r12) +/* 800B1C28 000AEB68 7C AA 53 78 */ or r10, r5, r10 +/* 800B1C2C 000AEB6C 7C CA 53 78 */ or r10, r6, r10 +/* 800B1C30 000AEB70 7C EA 53 78 */ or r10, r7, r10 +/* 800B1C34 000AEB74 7D 0A 53 78 */ or r10, r8, r10 +/* 800B1C38 000AEB78 7D 3A 53 78 */ or r26, r9, r10 +/* 800B1C3C 000AEB7C 39 4B 00 01 */ addi r10, r11, 1 +/* 800B1C40 000AEB80 67 5A 41 00 */ oris r26, r26, 0x4100 +/* 800B1C44 000AEB84 91 4C 00 08 */ stw r10, 8(r12) +/* 800B1C48 000AEB88 57 4A C6 3E */ rlwinm r10, r26, 0x18, 0x18, 0x1f +/* 800B1C4C 000AEB8C 2C 19 00 01 */ cmpwi r25, 1 +/* 800B1C50 000AEB90 99 4B 00 00 */ stb r10, 0(r11) +/* 800B1C54 000AEB94 39 40 00 01 */ li r10, 1 +/* 800B1C58 000AEB98 41 82 00 10 */ beq lbl_800B1C68 +/* 800B1C5C 000AEB9C 2C 19 00 03 */ cmpwi r25, 3 +/* 800B1C60 000AEBA0 41 82 00 08 */ beq lbl_800B1C68 +/* 800B1C64 000AEBA4 39 40 00 00 */ li r10, 0 +lbl_800B1C68: +/* 800B1C68 000AEBA8 7C 00 53 78 */ or r0, r0, r10 +/* 800B1C6C 000AEBAC 81 4D 95 B8 */ lwz r10, __GDCurrentDL@sda21(r13) +/* 800B1C70 000AEBB0 7C 60 03 78 */ or r0, r3, r0 +/* 800B1C74 000AEBB4 7C 80 03 78 */ or r0, r4, r0 +/* 800B1C78 000AEBB8 80 6A 00 08 */ lwz r3, 8(r10) +/* 800B1C7C 000AEBBC 7C A0 03 78 */ or r0, r5, r0 +/* 800B1C80 000AEBC0 7C C0 03 78 */ or r0, r6, r0 +/* 800B1C84 000AEBC4 7C E0 03 78 */ or r0, r7, r0 +/* 800B1C88 000AEBC8 7D 00 03 78 */ or r0, r8, r0 +/* 800B1C8C 000AEBCC 7D 24 03 78 */ or r4, r9, r0 +/* 800B1C90 000AEBD0 38 03 00 01 */ addi r0, r3, 1 +/* 800B1C94 000AEBD4 90 0A 00 08 */ stw r0, 8(r10) +/* 800B1C98 000AEBD8 60 84 00 00 */ ori r4, r4, 0 +/* 800B1C9C 000AEBDC 98 83 00 00 */ stb r4, 0(r3) +/* 800B1CA0 000AEBE0 BB 21 00 24 */ lmw r25, 0x24(r1) +/* 800B1CA4 000AEBE4 80 01 00 44 */ lwz r0, 0x44(r1) +/* 800B1CA8 000AEBE8 38 21 00 40 */ addi r1, r1, 0x40 +/* 800B1CAC 000AEBEC 7C 08 03 A6 */ mtlr r0 +/* 800B1CB0 000AEBF0 4E 80 00 20 */ blr + +.global GDSetZMode +GDSetZMode: +/* 800B1CB4 000AEBF4 7C 08 02 A6 */ mflr r0 +/* 800B1CB8 000AEBF8 90 01 00 04 */ stw r0, 4(r1) +/* 800B1CBC 000AEBFC 94 21 FF D8 */ stwu r1, -0x28(r1) +/* 800B1CC0 000AEC00 93 E1 00 24 */ stw r31, 0x24(r1) +/* 800B1CC4 000AEC04 7C BF 2B 78 */ mr r31, r5 +/* 800B1CC8 000AEC08 93 C1 00 20 */ stw r30, 0x20(r1) +/* 800B1CCC 000AEC0C 3B C4 00 00 */ addi r30, r4, 0 +/* 800B1CD0 000AEC10 93 A1 00 1C */ stw r29, 0x1c(r1) +/* 800B1CD4 000AEC14 3B A3 00 00 */ addi r29, r3, 0 +/* 800B1CD8 000AEC18 80 CD 95 B8 */ lwz r6, __GDCurrentDL@sda21(r13) +/* 800B1CDC 000AEC1C 80 66 00 08 */ lwz r3, 8(r6) +/* 800B1CE0 000AEC20 80 06 00 0C */ lwz r0, 0xc(r6) +/* 800B1CE4 000AEC24 38 63 00 01 */ addi r3, r3, 1 +/* 800B1CE8 000AEC28 7C 03 00 40 */ cmplw r3, r0 +/* 800B1CEC 000AEC2C 40 81 00 08 */ ble lbl_800B1CF4 +/* 800B1CF0 000AEC30 4B FF D4 65 */ bl GDOverflowed +lbl_800B1CF4: +/* 800B1CF4 000AEC34 80 8D 95 B8 */ lwz r4, __GDCurrentDL@sda21(r13) +/* 800B1CF8 000AEC38 38 A0 00 61 */ li r5, 0x61 +/* 800B1CFC 000AEC3C 80 64 00 08 */ lwz r3, 8(r4) +/* 800B1D00 000AEC40 38 03 00 01 */ addi r0, r3, 1 +/* 800B1D04 000AEC44 90 04 00 08 */ stw r0, 8(r4) +/* 800B1D08 000AEC48 98 A3 00 00 */ stb r5, 0(r3) +/* 800B1D0C 000AEC4C 80 8D 95 B8 */ lwz r4, __GDCurrentDL@sda21(r13) +/* 800B1D10 000AEC50 80 64 00 08 */ lwz r3, 8(r4) +/* 800B1D14 000AEC54 80 04 00 0C */ lwz r0, 0xc(r4) +/* 800B1D18 000AEC58 38 63 00 04 */ addi r3, r3, 4 +/* 800B1D1C 000AEC5C 7C 03 00 40 */ cmplw r3, r0 +/* 800B1D20 000AEC60 40 81 00 08 */ ble lbl_800B1D28 +/* 800B1D24 000AEC64 4B FF D4 31 */ bl GDOverflowed +lbl_800B1D28: +/* 800B1D28 000AEC68 80 8D 95 B8 */ lwz r4, __GDCurrentDL@sda21(r13) +/* 800B1D2C 000AEC6C 57 A5 06 3E */ clrlwi r5, r29, 0x18 +/* 800B1D30 000AEC70 57 C0 08 3C */ slwi r0, r30, 1 +/* 800B1D34 000AEC74 80 64 00 08 */ lwz r3, 8(r4) +/* 800B1D38 000AEC78 57 E6 25 36 */ rlwinm r6, r31, 4, 0x14, 0x1b +/* 800B1D3C 000AEC7C 7C A0 03 78 */ or r0, r5, r0 +/* 800B1D40 000AEC80 7C C0 03 78 */ or r0, r6, r0 +/* 800B1D44 000AEC84 64 07 40 00 */ oris r7, r0, 0x4000 +/* 800B1D48 000AEC88 38 03 00 01 */ addi r0, r3, 1 +/* 800B1D4C 000AEC8C 90 04 00 08 */ stw r0, 8(r4) +/* 800B1D50 000AEC90 54 E0 46 3E */ srwi r0, r7, 0x18 +/* 800B1D54 000AEC94 54 E6 86 3E */ rlwinm r6, r7, 0x10, 0x18, 0x1f +/* 800B1D58 000AEC98 98 03 00 00 */ stb r0, 0(r3) +/* 800B1D5C 000AEC9C 54 E5 C6 3E */ rlwinm r5, r7, 0x18, 0x18, 0x1f +/* 800B1D60 000AECA0 80 8D 95 B8 */ lwz r4, __GDCurrentDL@sda21(r13) +/* 800B1D64 000AECA4 80 64 00 08 */ lwz r3, 8(r4) +/* 800B1D68 000AECA8 38 03 00 01 */ addi r0, r3, 1 +/* 800B1D6C 000AECAC 90 04 00 08 */ stw r0, 8(r4) +/* 800B1D70 000AECB0 98 C3 00 00 */ stb r6, 0(r3) +/* 800B1D74 000AECB4 80 8D 95 B8 */ lwz r4, __GDCurrentDL@sda21(r13) +/* 800B1D78 000AECB8 80 64 00 08 */ lwz r3, 8(r4) +/* 800B1D7C 000AECBC 38 03 00 01 */ addi r0, r3, 1 +/* 800B1D80 000AECC0 90 04 00 08 */ stw r0, 8(r4) +/* 800B1D84 000AECC4 98 A3 00 00 */ stb r5, 0(r3) +/* 800B1D88 000AECC8 80 8D 95 B8 */ lwz r4, __GDCurrentDL@sda21(r13) +/* 800B1D8C 000AECCC 80 64 00 08 */ lwz r3, 8(r4) +/* 800B1D90 000AECD0 38 03 00 01 */ addi r0, r3, 1 +/* 800B1D94 000AECD4 90 04 00 08 */ stw r0, 8(r4) +/* 800B1D98 000AECD8 98 E3 00 00 */ stb r7, 0(r3) +/* 800B1D9C 000AECDC 80 01 00 2C */ lwz r0, 0x2c(r1) +/* 800B1DA0 000AECE0 83 E1 00 24 */ lwz r31, 0x24(r1) +/* 800B1DA4 000AECE4 83 C1 00 20 */ lwz r30, 0x20(r1) +/* 800B1DA8 000AECE8 83 A1 00 1C */ lwz r29, 0x1c(r1) +/* 800B1DAC 000AECEC 38 21 00 28 */ addi r1, r1, 0x28 +/* 800B1DB0 000AECF0 7C 08 03 A6 */ mtlr r0 +/* 800B1DB4 000AECF4 4E 80 00 20 */ blr + +.global GDSetDstAlpha +GDSetDstAlpha: +/* 800B1DB8 000AECF8 7C 08 02 A6 */ mflr r0 +/* 800B1DBC 000AECFC 90 01 00 04 */ stw r0, 4(r1) +/* 800B1DC0 000AED00 94 21 FF E8 */ stwu r1, -0x18(r1) +/* 800B1DC4 000AED04 93 E1 00 14 */ stw r31, 0x14(r1) +/* 800B1DC8 000AED08 3B E4 00 00 */ addi r31, r4, 0 +/* 800B1DCC 000AED0C 93 C1 00 10 */ stw r30, 0x10(r1) +/* 800B1DD0 000AED10 3B C3 00 00 */ addi r30, r3, 0 +/* 800B1DD4 000AED14 80 AD 95 B8 */ lwz r5, __GDCurrentDL@sda21(r13) +/* 800B1DD8 000AED18 80 65 00 08 */ lwz r3, 8(r5) +/* 800B1DDC 000AED1C 80 05 00 0C */ lwz r0, 0xc(r5) +/* 800B1DE0 000AED20 38 63 00 01 */ addi r3, r3, 1 +/* 800B1DE4 000AED24 7C 03 00 40 */ cmplw r3, r0 +/* 800B1DE8 000AED28 40 81 00 08 */ ble lbl_800B1DF0 +/* 800B1DEC 000AED2C 4B FF D3 69 */ bl GDOverflowed +lbl_800B1DF0: +/* 800B1DF0 000AED30 80 8D 95 B8 */ lwz r4, __GDCurrentDL@sda21(r13) +/* 800B1DF4 000AED34 38 A0 00 61 */ li r5, 0x61 +/* 800B1DF8 000AED38 80 64 00 08 */ lwz r3, 8(r4) +/* 800B1DFC 000AED3C 38 03 00 01 */ addi r0, r3, 1 +/* 800B1E00 000AED40 90 04 00 08 */ stw r0, 8(r4) +/* 800B1E04 000AED44 98 A3 00 00 */ stb r5, 0(r3) +/* 800B1E08 000AED48 80 8D 95 B8 */ lwz r4, __GDCurrentDL@sda21(r13) +/* 800B1E0C 000AED4C 80 64 00 08 */ lwz r3, 8(r4) +/* 800B1E10 000AED50 80 04 00 0C */ lwz r0, 0xc(r4) +/* 800B1E14 000AED54 38 63 00 04 */ addi r3, r3, 4 +/* 800B1E18 000AED58 7C 03 00 40 */ cmplw r3, r0 +/* 800B1E1C 000AED5C 40 81 00 08 */ ble lbl_800B1E24 +/* 800B1E20 000AED60 4B FF D3 35 */ bl GDOverflowed +lbl_800B1E24: +/* 800B1E24 000AED64 80 8D 95 B8 */ lwz r4, __GDCurrentDL@sda21(r13) +/* 800B1E28 000AED68 57 C5 44 2E */ rlwinm r5, r30, 8, 0x10, 0x17 +/* 800B1E2C 000AED6C 53 E5 06 3E */ rlwimi r5, r31, 0, 0x18, 0x1f +/* 800B1E30 000AED70 80 64 00 08 */ lwz r3, 8(r4) +/* 800B1E34 000AED74 64 A7 42 00 */ oris r7, r5, 0x4200 +/* 800B1E38 000AED78 54 E6 86 3E */ rlwinm r6, r7, 0x10, 0x18, 0x1f +/* 800B1E3C 000AED7C 38 03 00 01 */ addi r0, r3, 1 +/* 800B1E40 000AED80 90 04 00 08 */ stw r0, 8(r4) +/* 800B1E44 000AED84 54 E0 46 3E */ srwi r0, r7, 0x18 +/* 800B1E48 000AED88 54 E5 C6 3E */ rlwinm r5, r7, 0x18, 0x18, 0x1f +/* 800B1E4C 000AED8C 98 03 00 00 */ stb r0, 0(r3) +/* 800B1E50 000AED90 80 8D 95 B8 */ lwz r4, __GDCurrentDL@sda21(r13) +/* 800B1E54 000AED94 80 64 00 08 */ lwz r3, 8(r4) +/* 800B1E58 000AED98 38 03 00 01 */ addi r0, r3, 1 +/* 800B1E5C 000AED9C 90 04 00 08 */ stw r0, 8(r4) +/* 800B1E60 000AEDA0 98 C3 00 00 */ stb r6, 0(r3) +/* 800B1E64 000AEDA4 80 8D 95 B8 */ lwz r4, __GDCurrentDL@sda21(r13) +/* 800B1E68 000AEDA8 80 64 00 08 */ lwz r3, 8(r4) +/* 800B1E6C 000AEDAC 38 03 00 01 */ addi r0, r3, 1 +/* 800B1E70 000AEDB0 90 04 00 08 */ stw r0, 8(r4) +/* 800B1E74 000AEDB4 98 A3 00 00 */ stb r5, 0(r3) +/* 800B1E78 000AEDB8 80 8D 95 B8 */ lwz r4, __GDCurrentDL@sda21(r13) +/* 800B1E7C 000AEDBC 80 64 00 08 */ lwz r3, 8(r4) +/* 800B1E80 000AEDC0 38 03 00 01 */ addi r0, r3, 1 +/* 800B1E84 000AEDC4 90 04 00 08 */ stw r0, 8(r4) +/* 800B1E88 000AEDC8 98 E3 00 00 */ stb r7, 0(r3) +/* 800B1E8C 000AEDCC 80 01 00 1C */ lwz r0, 0x1c(r1) +/* 800B1E90 000AEDD0 83 E1 00 14 */ lwz r31, 0x14(r1) +/* 800B1E94 000AEDD4 83 C1 00 10 */ lwz r30, 0x10(r1) +/* 800B1E98 000AEDD8 38 21 00 18 */ addi r1, r1, 0x18 +/* 800B1E9C 000AEDDC 7C 08 03 A6 */ mtlr r0 +/* 800B1EA0 000AEDE0 4E 80 00 20 */ blr diff --git a/asm/Dolphin/gd/GDTev.s b/asm/Dolphin/gd/GDTev.s new file mode 100644 index 0000000..c9ec42f --- /dev/null +++ b/asm/Dolphin/gd/GDTev.s @@ -0,0 +1,677 @@ +.include "macros.inc" + +.section .text, "ax" # 0x80005600 - 0x8036FBA0 +.global GDSetTevOp +GDSetTevOp: +/* 800B1EA4 000AEDE4 7C 08 02 A6 */ mflr r0 +/* 800B1EA8 000AEDE8 38 C0 00 0A */ li r6, 0xa +/* 800B1EAC 000AEDEC 90 01 00 04 */ stw r0, 4(r1) +/* 800B1EB0 000AEDF0 94 21 FF D0 */ stwu r1, -0x30(r1) +/* 800B1EB4 000AEDF4 93 E1 00 2C */ stw r31, 0x2c(r1) +/* 800B1EB8 000AEDF8 93 C1 00 28 */ stw r30, 0x28(r1) +/* 800B1EBC 000AEDFC 93 A1 00 24 */ stw r29, 0x24(r1) +/* 800B1EC0 000AEE00 3B A0 00 05 */ li r29, 5 +/* 800B1EC4 000AEE04 93 81 00 20 */ stw r28, 0x20(r1) +/* 800B1EC8 000AEE08 7C 7C 1B 79 */ or. r28, r3, r3 +/* 800B1ECC 000AEE0C 41 82 00 0C */ beq lbl_800B1ED8 +/* 800B1ED0 000AEE10 38 C0 00 00 */ li r6, 0 +/* 800B1ED4 000AEE14 3B A0 00 00 */ li r29, 0 +lbl_800B1ED8: +/* 800B1ED8 000AEE18 2C 04 00 02 */ cmpwi r4, 2 +/* 800B1EDC 000AEE1C 41 82 00 FC */ beq lbl_800B1FD8 +/* 800B1EE0 000AEE20 40 80 00 14 */ bge lbl_800B1EF4 +/* 800B1EE4 000AEE24 2C 04 00 00 */ cmpwi r4, 0 +/* 800B1EE8 000AEE28 41 82 00 1C */ beq lbl_800B1F04 +/* 800B1EEC 000AEE2C 40 80 00 80 */ bge lbl_800B1F6C +/* 800B1EF0 000AEE30 48 00 02 28 */ b lbl_800B2118 +lbl_800B1EF4: +/* 800B1EF4 000AEE34 2C 04 00 04 */ cmpwi r4, 4 +/* 800B1EF8 000AEE38 41 82 01 B8 */ beq lbl_800B20B0 +/* 800B1EFC 000AEE3C 40 80 02 1C */ bge lbl_800B2118 +/* 800B1F00 000AEE40 48 00 01 44 */ b lbl_800B2044 +lbl_800B1F04: +/* 800B1F04 000AEE44 3B E0 00 01 */ li r31, 1 +/* 800B1F08 000AEE48 93 E1 00 08 */ stw r31, 8(r1) +/* 800B1F0C 000AEE4C 3B C0 00 00 */ li r30, 0 +/* 800B1F10 000AEE50 38 7C 00 00 */ addi r3, r28, 0 +/* 800B1F14 000AEE54 93 C1 00 0C */ stw r30, 0xc(r1) +/* 800B1F18 000AEE58 38 80 00 0F */ li r4, 0xf +/* 800B1F1C 000AEE5C 38 A0 00 08 */ li r5, 8 +/* 800B1F20 000AEE60 38 E0 00 0F */ li r7, 0xf +/* 800B1F24 000AEE64 39 00 00 00 */ li r8, 0 +/* 800B1F28 000AEE68 39 20 00 00 */ li r9, 0 +/* 800B1F2C 000AEE6C 39 40 00 00 */ li r10, 0 +/* 800B1F30 000AEE70 48 00 02 09 */ bl GDSetTevColorCalc +/* 800B1F34 000AEE74 93 E1 00 08 */ stw r31, 8(r1) +/* 800B1F38 000AEE78 38 7C 00 00 */ addi r3, r28, 0 +/* 800B1F3C 000AEE7C 38 DD 00 00 */ addi r6, r29, 0 +/* 800B1F40 000AEE80 93 C1 00 0C */ stw r30, 0xc(r1) +/* 800B1F44 000AEE84 38 80 00 07 */ li r4, 7 +/* 800B1F48 000AEE88 38 A0 00 04 */ li r5, 4 +/* 800B1F4C 000AEE8C 93 C1 00 10 */ stw r30, 0x10(r1) +/* 800B1F50 000AEE90 38 E0 00 07 */ li r7, 7 +/* 800B1F54 000AEE94 39 00 00 00 */ li r8, 0 +/* 800B1F58 000AEE98 93 C1 00 14 */ stw r30, 0x14(r1) +/* 800B1F5C 000AEE9C 39 20 00 00 */ li r9, 0 +/* 800B1F60 000AEEA0 39 40 00 00 */ li r10, 0 +/* 800B1F64 000AEEA4 48 00 04 21 */ bl GDSetTevAlphaCalcAndSwap +/* 800B1F68 000AEEA8 48 00 01 B0 */ b lbl_800B2118 +lbl_800B1F6C: +/* 800B1F6C 000AEEAC 3B E0 00 01 */ li r31, 1 +/* 800B1F70 000AEEB0 93 E1 00 08 */ stw r31, 8(r1) +/* 800B1F74 000AEEB4 3B C0 00 00 */ li r30, 0 +/* 800B1F78 000AEEB8 38 7C 00 00 */ addi r3, r28, 0 +/* 800B1F7C 000AEEBC 93 C1 00 0C */ stw r30, 0xc(r1) +/* 800B1F80 000AEEC0 38 86 00 00 */ addi r4, r6, 0 +/* 800B1F84 000AEEC4 38 A0 00 08 */ li r5, 8 +/* 800B1F88 000AEEC8 38 C0 00 09 */ li r6, 9 +/* 800B1F8C 000AEECC 38 E0 00 0F */ li r7, 0xf +/* 800B1F90 000AEED0 39 00 00 00 */ li r8, 0 +/* 800B1F94 000AEED4 39 20 00 00 */ li r9, 0 +/* 800B1F98 000AEED8 39 40 00 00 */ li r10, 0 +/* 800B1F9C 000AEEDC 48 00 01 9D */ bl GDSetTevColorCalc +/* 800B1FA0 000AEEE0 93 E1 00 08 */ stw r31, 8(r1) +/* 800B1FA4 000AEEE4 38 7C 00 00 */ addi r3, r28, 0 +/* 800B1FA8 000AEEE8 38 FD 00 00 */ addi r7, r29, 0 +/* 800B1FAC 000AEEEC 93 C1 00 0C */ stw r30, 0xc(r1) +/* 800B1FB0 000AEEF0 38 80 00 07 */ li r4, 7 +/* 800B1FB4 000AEEF4 38 A0 00 07 */ li r5, 7 +/* 800B1FB8 000AEEF8 93 C1 00 10 */ stw r30, 0x10(r1) +/* 800B1FBC 000AEEFC 38 C0 00 07 */ li r6, 7 +/* 800B1FC0 000AEF00 39 00 00 00 */ li r8, 0 +/* 800B1FC4 000AEF04 93 C1 00 14 */ stw r30, 0x14(r1) +/* 800B1FC8 000AEF08 39 20 00 00 */ li r9, 0 +/* 800B1FCC 000AEF0C 39 40 00 00 */ li r10, 0 +/* 800B1FD0 000AEF10 48 00 03 B5 */ bl GDSetTevAlphaCalcAndSwap +/* 800B1FD4 000AEF14 48 00 01 44 */ b lbl_800B2118 +lbl_800B1FD8: +/* 800B1FD8 000AEF18 3B E0 00 01 */ li r31, 1 +/* 800B1FDC 000AEF1C 93 E1 00 08 */ stw r31, 8(r1) +/* 800B1FE0 000AEF20 3B C0 00 00 */ li r30, 0 +/* 800B1FE4 000AEF24 38 7C 00 00 */ addi r3, r28, 0 +/* 800B1FE8 000AEF28 93 C1 00 0C */ stw r30, 0xc(r1) +/* 800B1FEC 000AEF2C 38 86 00 00 */ addi r4, r6, 0 +/* 800B1FF0 000AEF30 38 A0 00 0C */ li r5, 0xc +/* 800B1FF4 000AEF34 38 C0 00 08 */ li r6, 8 +/* 800B1FF8 000AEF38 38 E0 00 0F */ li r7, 0xf +/* 800B1FFC 000AEF3C 39 00 00 00 */ li r8, 0 +/* 800B2000 000AEF40 39 20 00 00 */ li r9, 0 +/* 800B2004 000AEF44 39 40 00 00 */ li r10, 0 +/* 800B2008 000AEF48 48 00 01 31 */ bl GDSetTevColorCalc +/* 800B200C 000AEF4C 93 E1 00 08 */ stw r31, 8(r1) +/* 800B2010 000AEF50 38 7C 00 00 */ addi r3, r28, 0 +/* 800B2014 000AEF54 38 DD 00 00 */ addi r6, r29, 0 +/* 800B2018 000AEF58 93 C1 00 0C */ stw r30, 0xc(r1) +/* 800B201C 000AEF5C 38 80 00 07 */ li r4, 7 +/* 800B2020 000AEF60 38 A0 00 04 */ li r5, 4 +/* 800B2024 000AEF64 93 C1 00 10 */ stw r30, 0x10(r1) +/* 800B2028 000AEF68 38 E0 00 07 */ li r7, 7 +/* 800B202C 000AEF6C 39 00 00 00 */ li r8, 0 +/* 800B2030 000AEF70 93 C1 00 14 */ stw r30, 0x14(r1) +/* 800B2034 000AEF74 39 20 00 00 */ li r9, 0 +/* 800B2038 000AEF78 39 40 00 00 */ li r10, 0 +/* 800B203C 000AEF7C 48 00 03 49 */ bl GDSetTevAlphaCalcAndSwap +/* 800B2040 000AEF80 48 00 00 D8 */ b lbl_800B2118 +lbl_800B2044: +/* 800B2044 000AEF84 3B E0 00 01 */ li r31, 1 +/* 800B2048 000AEF88 93 E1 00 08 */ stw r31, 8(r1) +/* 800B204C 000AEF8C 3B C0 00 00 */ li r30, 0 +/* 800B2050 000AEF90 38 7C 00 00 */ addi r3, r28, 0 +/* 800B2054 000AEF94 93 C1 00 0C */ stw r30, 0xc(r1) +/* 800B2058 000AEF98 38 80 00 0F */ li r4, 0xf +/* 800B205C 000AEF9C 38 A0 00 0F */ li r5, 0xf +/* 800B2060 000AEFA0 38 C0 00 0F */ li r6, 0xf +/* 800B2064 000AEFA4 38 E0 00 08 */ li r7, 8 +/* 800B2068 000AEFA8 39 00 00 00 */ li r8, 0 +/* 800B206C 000AEFAC 39 20 00 00 */ li r9, 0 +/* 800B2070 000AEFB0 39 40 00 00 */ li r10, 0 +/* 800B2074 000AEFB4 48 00 00 C5 */ bl GDSetTevColorCalc +/* 800B2078 000AEFB8 93 E1 00 08 */ stw r31, 8(r1) +/* 800B207C 000AEFBC 38 7C 00 00 */ addi r3, r28, 0 +/* 800B2080 000AEFC0 38 80 00 07 */ li r4, 7 +/* 800B2084 000AEFC4 93 C1 00 0C */ stw r30, 0xc(r1) +/* 800B2088 000AEFC8 38 A0 00 07 */ li r5, 7 +/* 800B208C 000AEFCC 38 C0 00 07 */ li r6, 7 +/* 800B2090 000AEFD0 93 C1 00 10 */ stw r30, 0x10(r1) +/* 800B2094 000AEFD4 38 E0 00 04 */ li r7, 4 +/* 800B2098 000AEFD8 39 00 00 00 */ li r8, 0 +/* 800B209C 000AEFDC 93 C1 00 14 */ stw r30, 0x14(r1) +/* 800B20A0 000AEFE0 39 20 00 00 */ li r9, 0 +/* 800B20A4 000AEFE4 39 40 00 00 */ li r10, 0 +/* 800B20A8 000AEFE8 48 00 02 DD */ bl GDSetTevAlphaCalcAndSwap +/* 800B20AC 000AEFEC 48 00 00 6C */ b lbl_800B2118 +lbl_800B20B0: +/* 800B20B0 000AEFF0 3B C0 00 01 */ li r30, 1 +/* 800B20B4 000AEFF4 93 C1 00 08 */ stw r30, 8(r1) +/* 800B20B8 000AEFF8 3B E0 00 00 */ li r31, 0 +/* 800B20BC 000AEFFC 38 7C 00 00 */ addi r3, r28, 0 +/* 800B20C0 000AF000 93 E1 00 0C */ stw r31, 0xc(r1) +/* 800B20C4 000AF004 38 E6 00 00 */ addi r7, r6, 0 +/* 800B20C8 000AF008 38 80 00 0F */ li r4, 0xf +/* 800B20CC 000AF00C 38 A0 00 0F */ li r5, 0xf +/* 800B20D0 000AF010 38 C0 00 0F */ li r6, 0xf +/* 800B20D4 000AF014 39 00 00 00 */ li r8, 0 +/* 800B20D8 000AF018 39 20 00 00 */ li r9, 0 +/* 800B20DC 000AF01C 39 40 00 00 */ li r10, 0 +/* 800B20E0 000AF020 48 00 00 59 */ bl GDSetTevColorCalc +/* 800B20E4 000AF024 93 C1 00 08 */ stw r30, 8(r1) +/* 800B20E8 000AF028 38 7C 00 00 */ addi r3, r28, 0 +/* 800B20EC 000AF02C 38 FD 00 00 */ addi r7, r29, 0 +/* 800B20F0 000AF030 93 E1 00 0C */ stw r31, 0xc(r1) +/* 800B20F4 000AF034 38 80 00 07 */ li r4, 7 +/* 800B20F8 000AF038 38 A0 00 07 */ li r5, 7 +/* 800B20FC 000AF03C 93 E1 00 10 */ stw r31, 0x10(r1) +/* 800B2100 000AF040 38 C0 00 07 */ li r6, 7 +/* 800B2104 000AF044 39 00 00 00 */ li r8, 0 +/* 800B2108 000AF048 93 E1 00 14 */ stw r31, 0x14(r1) +/* 800B210C 000AF04C 39 20 00 00 */ li r9, 0 +/* 800B2110 000AF050 39 40 00 00 */ li r10, 0 +/* 800B2114 000AF054 48 00 02 71 */ bl GDSetTevAlphaCalcAndSwap +lbl_800B2118: +/* 800B2118 000AF058 80 01 00 34 */ lwz r0, 0x34(r1) +/* 800B211C 000AF05C 83 E1 00 2C */ lwz r31, 0x2c(r1) +/* 800B2120 000AF060 83 C1 00 28 */ lwz r30, 0x28(r1) +/* 800B2124 000AF064 83 A1 00 24 */ lwz r29, 0x24(r1) +/* 800B2128 000AF068 83 81 00 20 */ lwz r28, 0x20(r1) +/* 800B212C 000AF06C 38 21 00 30 */ addi r1, r1, 0x30 +/* 800B2130 000AF070 7C 08 03 A6 */ mtlr r0 +/* 800B2134 000AF074 4E 80 00 20 */ blr + +.global GDSetTevColorCalc +GDSetTevColorCalc: +/* 800B2138 000AF078 7C 08 02 A6 */ mflr r0 +/* 800B213C 000AF07C 90 01 00 04 */ stw r0, 4(r1) +/* 800B2140 000AF080 94 21 FF B0 */ stwu r1, -0x50(r1) +/* 800B2144 000AF084 BE C1 00 28 */ stmw r22, 0x28(r1) +/* 800B2148 000AF088 7D 1B 43 78 */ mr r27, r8 +/* 800B214C 000AF08C 2C 1B 00 01 */ cmpwi r27, 1 +/* 800B2150 000AF090 8B C1 00 5B */ lbz r30, 0x5b(r1) +/* 800B2154 000AF094 83 E1 00 5C */ lwz r31, 0x5c(r1) +/* 800B2158 000AF098 3A C3 00 00 */ addi r22, r3, 0 +/* 800B215C 000AF09C 3A E4 00 00 */ addi r23, r4, 0 +/* 800B2160 000AF0A0 3B 05 00 00 */ addi r24, r5, 0 +/* 800B2164 000AF0A4 3B 26 00 00 */ addi r25, r6, 0 +/* 800B2168 000AF0A8 3B 47 00 00 */ addi r26, r7, 0 +/* 800B216C 000AF0AC 3B 89 00 00 */ addi r28, r9, 0 +/* 800B2170 000AF0B0 3B AA 00 00 */ addi r29, r10, 0 +/* 800B2174 000AF0B4 41 81 01 04 */ bgt lbl_800B2278 +/* 800B2178 000AF0B8 80 8D 95 B8 */ lwz r4, __GDCurrentDL@sda21(r13) +/* 800B217C 000AF0BC 80 64 00 08 */ lwz r3, 8(r4) +/* 800B2180 000AF0C0 80 04 00 0C */ lwz r0, 0xc(r4) +/* 800B2184 000AF0C4 38 63 00 01 */ addi r3, r3, 1 +/* 800B2188 000AF0C8 7C 03 00 40 */ cmplw r3, r0 +/* 800B218C 000AF0CC 40 81 00 08 */ ble lbl_800B2194 +/* 800B2190 000AF0D0 4B FF CF C5 */ bl GDOverflowed +lbl_800B2194: +/* 800B2194 000AF0D4 80 8D 95 B8 */ lwz r4, __GDCurrentDL@sda21(r13) +/* 800B2198 000AF0D8 38 A0 00 61 */ li r5, 0x61 +/* 800B219C 000AF0DC 80 64 00 08 */ lwz r3, 8(r4) +/* 800B21A0 000AF0E0 38 03 00 01 */ addi r0, r3, 1 +/* 800B21A4 000AF0E4 90 04 00 08 */ stw r0, 8(r4) +/* 800B21A8 000AF0E8 98 A3 00 00 */ stb r5, 0(r3) +/* 800B21AC 000AF0EC 80 8D 95 B8 */ lwz r4, __GDCurrentDL@sda21(r13) +/* 800B21B0 000AF0F0 80 64 00 08 */ lwz r3, 8(r4) +/* 800B21B4 000AF0F4 80 04 00 0C */ lwz r0, 0xc(r4) +/* 800B21B8 000AF0F8 38 63 00 04 */ addi r3, r3, 4 +/* 800B21BC 000AF0FC 7C 03 00 40 */ cmplw r3, r0 +/* 800B21C0 000AF100 40 81 00 08 */ ble lbl_800B21C8 +/* 800B21C4 000AF104 4B FF CF 91 */ bl GDOverflowed +lbl_800B21C8: +/* 800B21C8 000AF108 80 8D 95 B8 */ lwz r4, __GDCurrentDL@sda21(r13) +/* 800B21CC 000AF10C 57 20 20 36 */ slwi r0, r25, 4 +/* 800B21D0 000AF110 57 05 40 2E */ slwi r5, r24, 8 +/* 800B21D4 000AF114 80 64 00 08 */ lwz r3, 8(r4) +/* 800B21D8 000AF118 7F 40 03 78 */ or r0, r26, r0 +/* 800B21DC 000AF11C 7C A6 03 78 */ or r6, r5, r0 +/* 800B21E0 000AF120 38 03 00 01 */ addi r0, r3, 1 +/* 800B21E4 000AF124 90 04 00 08 */ stw r0, 8(r4) +/* 800B21E8 000AF128 56 E7 60 26 */ slwi r7, r23, 0xc +/* 800B21EC 000AF12C 7C E0 33 78 */ or r0, r7, r6 +/* 800B21F0 000AF130 57 88 80 1E */ slwi r8, r28, 0x10 +/* 800B21F4 000AF134 56 C5 08 3C */ slwi r5, r22, 1 +/* 800B21F8 000AF138 57 64 93 5A */ rlwinm r4, r27, 0x12, 0xd, 0xd +/* 800B21FC 000AF13C 7D 00 03 78 */ or r0, r8, r0 +/* 800B2200 000AF140 7C 80 03 78 */ or r0, r4, r0 +/* 800B2204 000AF144 57 C6 98 18 */ slwi r6, r30, 0x13 +/* 800B2208 000AF148 7C C0 03 78 */ or r0, r6, r0 +/* 800B220C 000AF14C 57 A4 A0 16 */ slwi r4, r29, 0x14 +/* 800B2210 000AF150 38 A5 00 C0 */ addi r5, r5, 0xc0 +/* 800B2214 000AF154 57 E6 B0 12 */ slwi r6, r31, 0x16 +/* 800B2218 000AF158 7C 80 03 78 */ or r0, r4, r0 +/* 800B221C 000AF15C 7C C4 03 78 */ or r4, r6, r0 +/* 800B2220 000AF160 54 A0 C0 0E */ slwi r0, r5, 0x18 +/* 800B2224 000AF164 7C 87 03 78 */ or r7, r4, r0 +/* 800B2228 000AF168 54 E0 46 3E */ srwi r0, r7, 0x18 +/* 800B222C 000AF16C 98 03 00 00 */ stb r0, 0(r3) +/* 800B2230 000AF170 54 E6 86 3E */ rlwinm r6, r7, 0x10, 0x18, 0x1f +/* 800B2234 000AF174 54 E5 C6 3E */ rlwinm r5, r7, 0x18, 0x18, 0x1f +/* 800B2238 000AF178 80 8D 95 B8 */ lwz r4, __GDCurrentDL@sda21(r13) +/* 800B223C 000AF17C 80 64 00 08 */ lwz r3, 8(r4) +/* 800B2240 000AF180 38 03 00 01 */ addi r0, r3, 1 +/* 800B2244 000AF184 90 04 00 08 */ stw r0, 8(r4) +/* 800B2248 000AF188 98 C3 00 00 */ stb r6, 0(r3) +/* 800B224C 000AF18C 80 8D 95 B8 */ lwz r4, __GDCurrentDL@sda21(r13) +/* 800B2250 000AF190 80 64 00 08 */ lwz r3, 8(r4) +/* 800B2254 000AF194 38 03 00 01 */ addi r0, r3, 1 +/* 800B2258 000AF198 90 04 00 08 */ stw r0, 8(r4) +/* 800B225C 000AF19C 98 A3 00 00 */ stb r5, 0(r3) +/* 800B2260 000AF1A0 80 8D 95 B8 */ lwz r4, __GDCurrentDL@sda21(r13) +/* 800B2264 000AF1A4 80 64 00 08 */ lwz r3, 8(r4) +/* 800B2268 000AF1A8 38 03 00 01 */ addi r0, r3, 1 +/* 800B226C 000AF1AC 90 04 00 08 */ stw r0, 8(r4) +/* 800B2270 000AF1B0 98 E3 00 00 */ stb r7, 0(r3) +/* 800B2274 000AF1B4 48 00 00 FC */ b lbl_800B2370 +lbl_800B2278: +/* 800B2278 000AF1B8 80 8D 95 B8 */ lwz r4, __GDCurrentDL@sda21(r13) +/* 800B227C 000AF1BC 80 64 00 08 */ lwz r3, 8(r4) +/* 800B2280 000AF1C0 80 04 00 0C */ lwz r0, 0xc(r4) +/* 800B2284 000AF1C4 38 63 00 01 */ addi r3, r3, 1 +/* 800B2288 000AF1C8 7C 03 00 40 */ cmplw r3, r0 +/* 800B228C 000AF1CC 40 81 00 08 */ ble lbl_800B2294 +/* 800B2290 000AF1D0 4B FF CE C5 */ bl GDOverflowed +lbl_800B2294: +/* 800B2294 000AF1D4 80 8D 95 B8 */ lwz r4, __GDCurrentDL@sda21(r13) +/* 800B2298 000AF1D8 38 A0 00 61 */ li r5, 0x61 +/* 800B229C 000AF1DC 80 64 00 08 */ lwz r3, 8(r4) +/* 800B22A0 000AF1E0 38 03 00 01 */ addi r0, r3, 1 +/* 800B22A4 000AF1E4 90 04 00 08 */ stw r0, 8(r4) +/* 800B22A8 000AF1E8 98 A3 00 00 */ stb r5, 0(r3) +/* 800B22AC 000AF1EC 80 8D 95 B8 */ lwz r4, __GDCurrentDL@sda21(r13) +/* 800B22B0 000AF1F0 80 64 00 08 */ lwz r3, 8(r4) +/* 800B22B4 000AF1F4 80 04 00 0C */ lwz r0, 0xc(r4) +/* 800B22B8 000AF1F8 38 63 00 04 */ addi r3, r3, 4 +/* 800B22BC 000AF1FC 7C 03 00 40 */ cmplw r3, r0 +/* 800B22C0 000AF200 40 81 00 08 */ ble lbl_800B22C8 +/* 800B22C4 000AF204 4B FF CE 91 */ bl GDOverflowed +lbl_800B22C8: +/* 800B22C8 000AF208 80 8D 95 B8 */ lwz r4, __GDCurrentDL@sda21(r13) +/* 800B22CC 000AF20C 57 20 20 36 */ slwi r0, r25, 4 +/* 800B22D0 000AF210 57 05 40 2E */ slwi r5, r24, 8 +/* 800B22D4 000AF214 7F 40 03 78 */ or r0, r26, r0 +/* 800B22D8 000AF218 80 64 00 08 */ lwz r3, 8(r4) +/* 800B22DC 000AF21C 7C A0 03 78 */ or r0, r5, r0 +/* 800B22E0 000AF220 56 E6 60 26 */ slwi r6, r23, 0xc +/* 800B22E4 000AF224 7C C6 03 78 */ or r6, r6, r0 +/* 800B22E8 000AF228 38 03 00 01 */ addi r0, r3, 1 +/* 800B22EC 000AF22C 90 04 00 08 */ stw r0, 8(r4) +/* 800B22F0 000AF230 64 C0 00 03 */ oris r0, r6, 3 +/* 800B22F4 000AF234 57 67 93 5A */ rlwinm r7, r27, 0x12, 0xd, 0xd +/* 800B22F8 000AF238 56 C5 08 3C */ slwi r5, r22, 1 +/* 800B22FC 000AF23C 57 C4 98 18 */ slwi r4, r30, 0x13 +/* 800B2300 000AF240 7C E0 03 78 */ or r0, r7, r0 +/* 800B2304 000AF244 7C 80 03 78 */ or r0, r4, r0 +/* 800B2308 000AF248 57 66 9A 96 */ rlwinm r6, r27, 0x13, 0xa, 0xb +/* 800B230C 000AF24C 38 A5 00 C0 */ addi r5, r5, 0xc0 +/* 800B2310 000AF250 57 E4 B0 12 */ slwi r4, r31, 0x16 +/* 800B2314 000AF254 7C C0 03 78 */ or r0, r6, r0 +/* 800B2318 000AF258 7C 84 03 78 */ or r4, r4, r0 +/* 800B231C 000AF25C 54 A0 C0 0E */ slwi r0, r5, 0x18 +/* 800B2320 000AF260 7C 87 03 78 */ or r7, r4, r0 +/* 800B2324 000AF264 54 E0 46 3E */ srwi r0, r7, 0x18 +/* 800B2328 000AF268 98 03 00 00 */ stb r0, 0(r3) +/* 800B232C 000AF26C 54 E6 86 3E */ rlwinm r6, r7, 0x10, 0x18, 0x1f +/* 800B2330 000AF270 54 E5 C6 3E */ rlwinm r5, r7, 0x18, 0x18, 0x1f +/* 800B2334 000AF274 80 8D 95 B8 */ lwz r4, __GDCurrentDL@sda21(r13) +/* 800B2338 000AF278 80 64 00 08 */ lwz r3, 8(r4) +/* 800B233C 000AF27C 38 03 00 01 */ addi r0, r3, 1 +/* 800B2340 000AF280 90 04 00 08 */ stw r0, 8(r4) +/* 800B2344 000AF284 98 C3 00 00 */ stb r6, 0(r3) +/* 800B2348 000AF288 80 8D 95 B8 */ lwz r4, __GDCurrentDL@sda21(r13) +/* 800B234C 000AF28C 80 64 00 08 */ lwz r3, 8(r4) +/* 800B2350 000AF290 38 03 00 01 */ addi r0, r3, 1 +/* 800B2354 000AF294 90 04 00 08 */ stw r0, 8(r4) +/* 800B2358 000AF298 98 A3 00 00 */ stb r5, 0(r3) +/* 800B235C 000AF29C 80 8D 95 B8 */ lwz r4, __GDCurrentDL@sda21(r13) +/* 800B2360 000AF2A0 80 64 00 08 */ lwz r3, 8(r4) +/* 800B2364 000AF2A4 38 03 00 01 */ addi r0, r3, 1 +/* 800B2368 000AF2A8 90 04 00 08 */ stw r0, 8(r4) +/* 800B236C 000AF2AC 98 E3 00 00 */ stb r7, 0(r3) +lbl_800B2370: +/* 800B2370 000AF2B0 BA C1 00 28 */ lmw r22, 0x28(r1) +/* 800B2374 000AF2B4 80 01 00 54 */ lwz r0, 0x54(r1) +/* 800B2378 000AF2B8 38 21 00 50 */ addi r1, r1, 0x50 +/* 800B237C 000AF2BC 7C 08 03 A6 */ mtlr r0 +/* 800B2380 000AF2C0 4E 80 00 20 */ blr + +.global GDSetTevAlphaCalcAndSwap +GDSetTevAlphaCalcAndSwap: +/* 800B2384 000AF2C4 7C 08 02 A6 */ mflr r0 +/* 800B2388 000AF2C8 90 01 00 04 */ stw r0, 4(r1) +/* 800B238C 000AF2CC 94 21 FF A8 */ stwu r1, -0x58(r1) +/* 800B2390 000AF2D0 BE 81 00 28 */ stmw r20, 0x28(r1) +/* 800B2394 000AF2D4 7D 19 43 78 */ mr r25, r8 +/* 800B2398 000AF2D8 2C 19 00 01 */ cmpwi r25, 1 +/* 800B239C 000AF2DC 8B 81 00 63 */ lbz r28, 0x63(r1) +/* 800B23A0 000AF2E0 83 A1 00 64 */ lwz r29, 0x64(r1) +/* 800B23A4 000AF2E4 83 C1 00 68 */ lwz r30, 0x68(r1) +/* 800B23A8 000AF2E8 7C 74 1B 78 */ mr r20, r3 +/* 800B23AC 000AF2EC 83 E1 00 6C */ lwz r31, 0x6c(r1) +/* 800B23B0 000AF2F0 3A A4 00 00 */ addi r21, r4, 0 +/* 800B23B4 000AF2F4 3A C5 00 00 */ addi r22, r5, 0 +/* 800B23B8 000AF2F8 3A E6 00 00 */ addi r23, r6, 0 +/* 800B23BC 000AF2FC 3B 07 00 00 */ addi r24, r7, 0 +/* 800B23C0 000AF300 3B 49 00 00 */ addi r26, r9, 0 +/* 800B23C4 000AF304 3B 6A 00 00 */ addi r27, r10, 0 +/* 800B23C8 000AF308 41 81 01 14 */ bgt lbl_800B24DC +/* 800B23CC 000AF30C 80 8D 95 B8 */ lwz r4, __GDCurrentDL@sda21(r13) +/* 800B23D0 000AF310 80 64 00 08 */ lwz r3, 8(r4) +/* 800B23D4 000AF314 80 04 00 0C */ lwz r0, 0xc(r4) +/* 800B23D8 000AF318 38 63 00 01 */ addi r3, r3, 1 +/* 800B23DC 000AF31C 7C 03 00 40 */ cmplw r3, r0 +/* 800B23E0 000AF320 40 81 00 08 */ ble lbl_800B23E8 +/* 800B23E4 000AF324 4B FF CD 71 */ bl GDOverflowed +lbl_800B23E8: +/* 800B23E8 000AF328 80 8D 95 B8 */ lwz r4, __GDCurrentDL@sda21(r13) +/* 800B23EC 000AF32C 38 A0 00 61 */ li r5, 0x61 +/* 800B23F0 000AF330 80 64 00 08 */ lwz r3, 8(r4) +/* 800B23F4 000AF334 38 03 00 01 */ addi r0, r3, 1 +/* 800B23F8 000AF338 90 04 00 08 */ stw r0, 8(r4) +/* 800B23FC 000AF33C 98 A3 00 00 */ stb r5, 0(r3) +/* 800B2400 000AF340 80 8D 95 B8 */ lwz r4, __GDCurrentDL@sda21(r13) +/* 800B2404 000AF344 80 64 00 08 */ lwz r3, 8(r4) +/* 800B2408 000AF348 80 04 00 0C */ lwz r0, 0xc(r4) +/* 800B240C 000AF34C 38 63 00 04 */ addi r3, r3, 4 +/* 800B2410 000AF350 7C 03 00 40 */ cmplw r3, r0 +/* 800B2414 000AF354 40 81 00 08 */ ble lbl_800B241C +/* 800B2418 000AF358 4B FF CD 3D */ bl GDOverflowed +lbl_800B241C: +/* 800B241C 000AF35C 80 8D 95 B8 */ lwz r4, __GDCurrentDL@sda21(r13) +/* 800B2420 000AF360 57 E0 10 3A */ slwi r0, r31, 2 +/* 800B2424 000AF364 57 05 20 36 */ slwi r5, r24, 4 +/* 800B2428 000AF368 7F C0 03 78 */ or r0, r30, r0 +/* 800B242C 000AF36C 80 64 00 08 */ lwz r3, 8(r4) +/* 800B2430 000AF370 7C A0 03 78 */ or r0, r5, r0 +/* 800B2434 000AF374 56 E6 38 30 */ slwi r6, r23, 7 +/* 800B2438 000AF378 7C C6 03 78 */ or r6, r6, r0 +/* 800B243C 000AF37C 38 03 00 01 */ addi r0, r3, 1 +/* 800B2440 000AF380 90 04 00 08 */ stw r0, 8(r4) +/* 800B2444 000AF384 56 C7 50 2A */ slwi r7, r22, 0xa +/* 800B2448 000AF388 7C E0 33 78 */ or r0, r7, r6 +/* 800B244C 000AF38C 56 A8 68 24 */ slwi r8, r21, 0xd +/* 800B2450 000AF390 56 85 08 3C */ slwi r5, r20, 1 +/* 800B2454 000AF394 57 44 80 1E */ slwi r4, r26, 0x10 +/* 800B2458 000AF398 7D 00 03 78 */ or r0, r8, r0 +/* 800B245C 000AF39C 7C 80 03 78 */ or r0, r4, r0 +/* 800B2460 000AF3A0 57 26 93 5A */ rlwinm r6, r25, 0x12, 0xd, 0xd +/* 800B2464 000AF3A4 7C C0 03 78 */ or r0, r6, r0 +/* 800B2468 000AF3A8 57 84 98 18 */ slwi r4, r28, 0x13 +/* 800B246C 000AF3AC 7C 80 03 78 */ or r0, r4, r0 +/* 800B2470 000AF3B0 57 66 A0 16 */ slwi r6, r27, 0x14 +/* 800B2474 000AF3B4 38 A5 00 C1 */ addi r5, r5, 0xc1 +/* 800B2478 000AF3B8 57 A4 B0 12 */ slwi r4, r29, 0x16 +/* 800B247C 000AF3BC 7C C0 03 78 */ or r0, r6, r0 +/* 800B2480 000AF3C0 7C 84 03 78 */ or r4, r4, r0 +/* 800B2484 000AF3C4 54 A0 C0 0E */ slwi r0, r5, 0x18 +/* 800B2488 000AF3C8 7C 87 03 78 */ or r7, r4, r0 +/* 800B248C 000AF3CC 54 E0 46 3E */ srwi r0, r7, 0x18 +/* 800B2490 000AF3D0 98 03 00 00 */ stb r0, 0(r3) +/* 800B2494 000AF3D4 54 E6 86 3E */ rlwinm r6, r7, 0x10, 0x18, 0x1f +/* 800B2498 000AF3D8 54 E5 C6 3E */ rlwinm r5, r7, 0x18, 0x18, 0x1f +/* 800B249C 000AF3DC 80 8D 95 B8 */ lwz r4, __GDCurrentDL@sda21(r13) +/* 800B24A0 000AF3E0 80 64 00 08 */ lwz r3, 8(r4) +/* 800B24A4 000AF3E4 38 03 00 01 */ addi r0, r3, 1 +/* 800B24A8 000AF3E8 90 04 00 08 */ stw r0, 8(r4) +/* 800B24AC 000AF3EC 98 C3 00 00 */ stb r6, 0(r3) +/* 800B24B0 000AF3F0 80 8D 95 B8 */ lwz r4, __GDCurrentDL@sda21(r13) +/* 800B24B4 000AF3F4 80 64 00 08 */ lwz r3, 8(r4) +/* 800B24B8 000AF3F8 38 03 00 01 */ addi r0, r3, 1 +/* 800B24BC 000AF3FC 90 04 00 08 */ stw r0, 8(r4) +/* 800B24C0 000AF400 98 A3 00 00 */ stb r5, 0(r3) +/* 800B24C4 000AF404 80 8D 95 B8 */ lwz r4, __GDCurrentDL@sda21(r13) +/* 800B24C8 000AF408 80 64 00 08 */ lwz r3, 8(r4) +/* 800B24CC 000AF40C 38 03 00 01 */ addi r0, r3, 1 +/* 800B24D0 000AF410 90 04 00 08 */ stw r0, 8(r4) +/* 800B24D4 000AF414 98 E3 00 00 */ stb r7, 0(r3) +/* 800B24D8 000AF418 48 00 01 0C */ b lbl_800B25E4 +lbl_800B24DC: +/* 800B24DC 000AF41C 80 8D 95 B8 */ lwz r4, __GDCurrentDL@sda21(r13) +/* 800B24E0 000AF420 80 64 00 08 */ lwz r3, 8(r4) +/* 800B24E4 000AF424 80 04 00 0C */ lwz r0, 0xc(r4) +/* 800B24E8 000AF428 38 63 00 01 */ addi r3, r3, 1 +/* 800B24EC 000AF42C 7C 03 00 40 */ cmplw r3, r0 +/* 800B24F0 000AF430 40 81 00 08 */ ble lbl_800B24F8 +/* 800B24F4 000AF434 4B FF CC 61 */ bl GDOverflowed +lbl_800B24F8: +/* 800B24F8 000AF438 80 8D 95 B8 */ lwz r4, __GDCurrentDL@sda21(r13) +/* 800B24FC 000AF43C 38 A0 00 61 */ li r5, 0x61 +/* 800B2500 000AF440 80 64 00 08 */ lwz r3, 8(r4) +/* 800B2504 000AF444 38 03 00 01 */ addi r0, r3, 1 +/* 800B2508 000AF448 90 04 00 08 */ stw r0, 8(r4) +/* 800B250C 000AF44C 98 A3 00 00 */ stb r5, 0(r3) +/* 800B2510 000AF450 80 8D 95 B8 */ lwz r4, __GDCurrentDL@sda21(r13) +/* 800B2514 000AF454 80 64 00 08 */ lwz r3, 8(r4) +/* 800B2518 000AF458 80 04 00 0C */ lwz r0, 0xc(r4) +/* 800B251C 000AF45C 38 63 00 04 */ addi r3, r3, 4 +/* 800B2520 000AF460 7C 03 00 40 */ cmplw r3, r0 +/* 800B2524 000AF464 40 81 00 08 */ ble lbl_800B252C +/* 800B2528 000AF468 4B FF CC 2D */ bl GDOverflowed +lbl_800B252C: +/* 800B252C 000AF46C 80 8D 95 B8 */ lwz r4, __GDCurrentDL@sda21(r13) +/* 800B2530 000AF470 57 E0 10 3A */ slwi r0, r31, 2 +/* 800B2534 000AF474 57 05 20 36 */ slwi r5, r24, 4 +/* 800B2538 000AF478 7F C0 03 78 */ or r0, r30, r0 +/* 800B253C 000AF47C 80 64 00 08 */ lwz r3, 8(r4) +/* 800B2540 000AF480 7C A0 03 78 */ or r0, r5, r0 +/* 800B2544 000AF484 56 E6 38 30 */ slwi r6, r23, 7 +/* 800B2548 000AF488 7C C6 03 78 */ or r6, r6, r0 +/* 800B254C 000AF48C 38 03 00 01 */ addi r0, r3, 1 +/* 800B2550 000AF490 90 04 00 08 */ stw r0, 8(r4) +/* 800B2554 000AF494 56 C7 50 2A */ slwi r7, r22, 0xa +/* 800B2558 000AF498 7C E0 33 78 */ or r0, r7, r6 +/* 800B255C 000AF49C 56 A8 68 24 */ slwi r8, r21, 0xd +/* 800B2560 000AF4A0 7D 00 03 78 */ or r0, r8, r0 +/* 800B2564 000AF4A4 56 85 08 3C */ slwi r5, r20, 1 +/* 800B2568 000AF4A8 57 24 93 5A */ rlwinm r4, r25, 0x12, 0xd, 0xd +/* 800B256C 000AF4AC 64 00 00 03 */ oris r0, r0, 3 +/* 800B2570 000AF4B0 7C 80 03 78 */ or r0, r4, r0 +/* 800B2574 000AF4B4 57 86 98 18 */ slwi r6, r28, 0x13 +/* 800B2578 000AF4B8 7C C0 03 78 */ or r0, r6, r0 +/* 800B257C 000AF4BC 57 24 9A 96 */ rlwinm r4, r25, 0x13, 0xa, 0xb +/* 800B2580 000AF4C0 38 A5 00 C1 */ addi r5, r5, 0xc1 +/* 800B2584 000AF4C4 57 A6 B0 12 */ slwi r6, r29, 0x16 +/* 800B2588 000AF4C8 7C 80 03 78 */ or r0, r4, r0 +/* 800B258C 000AF4CC 7C C4 03 78 */ or r4, r6, r0 +/* 800B2590 000AF4D0 54 A0 C0 0E */ slwi r0, r5, 0x18 +/* 800B2594 000AF4D4 7C 87 03 78 */ or r7, r4, r0 +/* 800B2598 000AF4D8 54 E0 46 3E */ srwi r0, r7, 0x18 +/* 800B259C 000AF4DC 98 03 00 00 */ stb r0, 0(r3) +/* 800B25A0 000AF4E0 54 E6 86 3E */ rlwinm r6, r7, 0x10, 0x18, 0x1f +/* 800B25A4 000AF4E4 54 E5 C6 3E */ rlwinm r5, r7, 0x18, 0x18, 0x1f +/* 800B25A8 000AF4E8 80 8D 95 B8 */ lwz r4, __GDCurrentDL@sda21(r13) +/* 800B25AC 000AF4EC 80 64 00 08 */ lwz r3, 8(r4) +/* 800B25B0 000AF4F0 38 03 00 01 */ addi r0, r3, 1 +/* 800B25B4 000AF4F4 90 04 00 08 */ stw r0, 8(r4) +/* 800B25B8 000AF4F8 98 C3 00 00 */ stb r6, 0(r3) +/* 800B25BC 000AF4FC 80 8D 95 B8 */ lwz r4, __GDCurrentDL@sda21(r13) +/* 800B25C0 000AF500 80 64 00 08 */ lwz r3, 8(r4) +/* 800B25C4 000AF504 38 03 00 01 */ addi r0, r3, 1 +/* 800B25C8 000AF508 90 04 00 08 */ stw r0, 8(r4) +/* 800B25CC 000AF50C 98 A3 00 00 */ stb r5, 0(r3) +/* 800B25D0 000AF510 80 8D 95 B8 */ lwz r4, __GDCurrentDL@sda21(r13) +/* 800B25D4 000AF514 80 64 00 08 */ lwz r3, 8(r4) +/* 800B25D8 000AF518 38 03 00 01 */ addi r0, r3, 1 +/* 800B25DC 000AF51C 90 04 00 08 */ stw r0, 8(r4) +/* 800B25E0 000AF520 98 E3 00 00 */ stb r7, 0(r3) +lbl_800B25E4: +/* 800B25E4 000AF524 BA 81 00 28 */ lmw r20, 0x28(r1) +/* 800B25E8 000AF528 80 01 00 5C */ lwz r0, 0x5c(r1) +/* 800B25EC 000AF52C 38 21 00 58 */ addi r1, r1, 0x58 +/* 800B25F0 000AF530 7C 08 03 A6 */ mtlr r0 +/* 800B25F4 000AF534 4E 80 00 20 */ blr + +.global GDSetAlphaCompare +GDSetAlphaCompare: +/* 800B25F8 000AF538 7C 08 02 A6 */ mflr r0 +/* 800B25FC 000AF53C 90 01 00 04 */ stw r0, 4(r1) +/* 800B2600 000AF540 94 21 FF C8 */ stwu r1, -0x38(r1) +/* 800B2604 000AF544 BF 61 00 24 */ stmw r27, 0x24(r1) +/* 800B2608 000AF548 3B 83 00 00 */ addi r28, r3, 0 +/* 800B260C 000AF54C 3B A4 00 00 */ addi r29, r4, 0 +/* 800B2610 000AF550 7C BE 2B 78 */ mr r30, r5 +/* 800B2614 000AF554 3B E6 00 00 */ addi r31, r6, 0 +/* 800B2618 000AF558 3B 67 00 00 */ addi r27, r7, 0 +/* 800B261C 000AF55C 81 0D 95 B8 */ lwz r8, __GDCurrentDL@sda21(r13) +/* 800B2620 000AF560 80 68 00 08 */ lwz r3, 8(r8) +/* 800B2624 000AF564 80 08 00 0C */ lwz r0, 0xc(r8) +/* 800B2628 000AF568 38 63 00 01 */ addi r3, r3, 1 +/* 800B262C 000AF56C 7C 03 00 40 */ cmplw r3, r0 +/* 800B2630 000AF570 40 81 00 08 */ ble lbl_800B2638 +/* 800B2634 000AF574 4B FF CB 21 */ bl GDOverflowed +lbl_800B2638: +/* 800B2638 000AF578 80 8D 95 B8 */ lwz r4, __GDCurrentDL@sda21(r13) +/* 800B263C 000AF57C 38 A0 00 61 */ li r5, 0x61 +/* 800B2640 000AF580 80 64 00 08 */ lwz r3, 8(r4) +/* 800B2644 000AF584 38 03 00 01 */ addi r0, r3, 1 +/* 800B2648 000AF588 90 04 00 08 */ stw r0, 8(r4) +/* 800B264C 000AF58C 98 A3 00 00 */ stb r5, 0(r3) +/* 800B2650 000AF590 80 8D 95 B8 */ lwz r4, __GDCurrentDL@sda21(r13) +/* 800B2654 000AF594 80 64 00 08 */ lwz r3, 8(r4) +/* 800B2658 000AF598 80 04 00 0C */ lwz r0, 0xc(r4) +/* 800B265C 000AF59C 38 63 00 04 */ addi r3, r3, 4 +/* 800B2660 000AF5A0 7C 03 00 40 */ cmplw r3, r0 +/* 800B2664 000AF5A4 40 81 00 08 */ ble lbl_800B266C +/* 800B2668 000AF5A8 4B FF CA ED */ bl GDOverflowed +lbl_800B266C: +/* 800B266C 000AF5AC 80 8D 95 B8 */ lwz r4, __GDCurrentDL@sda21(r13) +/* 800B2670 000AF5B0 57 65 44 2E */ rlwinm r5, r27, 8, 0x10, 0x17 +/* 800B2674 000AF5B4 53 A5 06 3E */ rlwimi r5, r29, 0, 0x18, 0x1f +/* 800B2678 000AF5B8 80 64 00 08 */ lwz r3, 8(r4) +/* 800B267C 000AF5BC 57 E6 98 18 */ slwi r6, r31, 0x13 +/* 800B2680 000AF5C0 53 85 80 1E */ rlwimi r5, r28, 0x10, 0, 0xf +/* 800B2684 000AF5C4 38 03 00 01 */ addi r0, r3, 1 +/* 800B2688 000AF5C8 90 04 00 08 */ stw r0, 8(r4) +/* 800B268C 000AF5CC 57 C4 B0 12 */ slwi r4, r30, 0x16 +/* 800B2690 000AF5D0 7C C0 2B 78 */ or r0, r6, r5 +/* 800B2694 000AF5D4 7C 80 03 78 */ or r0, r4, r0 +/* 800B2698 000AF5D8 64 07 F3 00 */ oris r7, r0, 0xf300 +/* 800B269C 000AF5DC 54 E0 46 3E */ srwi r0, r7, 0x18 +/* 800B26A0 000AF5E0 98 03 00 00 */ stb r0, 0(r3) +/* 800B26A4 000AF5E4 54 E6 86 3E */ rlwinm r6, r7, 0x10, 0x18, 0x1f +/* 800B26A8 000AF5E8 54 E5 C6 3E */ rlwinm r5, r7, 0x18, 0x18, 0x1f +/* 800B26AC 000AF5EC 80 8D 95 B8 */ lwz r4, __GDCurrentDL@sda21(r13) +/* 800B26B0 000AF5F0 80 64 00 08 */ lwz r3, 8(r4) +/* 800B26B4 000AF5F4 38 03 00 01 */ addi r0, r3, 1 +/* 800B26B8 000AF5F8 90 04 00 08 */ stw r0, 8(r4) +/* 800B26BC 000AF5FC 98 C3 00 00 */ stb r6, 0(r3) +/* 800B26C0 000AF600 80 8D 95 B8 */ lwz r4, __GDCurrentDL@sda21(r13) +/* 800B26C4 000AF604 80 64 00 08 */ lwz r3, 8(r4) +/* 800B26C8 000AF608 38 03 00 01 */ addi r0, r3, 1 +/* 800B26CC 000AF60C 90 04 00 08 */ stw r0, 8(r4) +/* 800B26D0 000AF610 98 A3 00 00 */ stb r5, 0(r3) +/* 800B26D4 000AF614 80 8D 95 B8 */ lwz r4, __GDCurrentDL@sda21(r13) +/* 800B26D8 000AF618 80 64 00 08 */ lwz r3, 8(r4) +/* 800B26DC 000AF61C 38 03 00 01 */ addi r0, r3, 1 +/* 800B26E0 000AF620 90 04 00 08 */ stw r0, 8(r4) +/* 800B26E4 000AF624 98 E3 00 00 */ stb r7, 0(r3) +/* 800B26E8 000AF628 BB 61 00 24 */ lmw r27, 0x24(r1) +/* 800B26EC 000AF62C 80 01 00 3C */ lwz r0, 0x3c(r1) +/* 800B26F0 000AF630 38 21 00 38 */ addi r1, r1, 0x38 +/* 800B26F4 000AF634 7C 08 03 A6 */ mtlr r0 +/* 800B26F8 000AF638 4E 80 00 20 */ blr + +.global GDSetTevOrder +GDSetTevOrder: +/* 800B26FC 000AF63C 7C 08 02 A6 */ mflr r0 +/* 800B2700 000AF640 2C 05 00 FF */ cmpwi r5, 0xff +/* 800B2704 000AF644 90 01 00 04 */ stw r0, 4(r1) +/* 800B2708 000AF648 94 21 FF D0 */ stwu r1, -0x30(r1) +/* 800B270C 000AF64C 93 E1 00 2C */ stw r31, 0x2c(r1) +/* 800B2710 000AF650 3B E0 00 00 */ li r31, 0 +/* 800B2714 000AF654 93 C1 00 28 */ stw r30, 0x28(r1) +/* 800B2718 000AF658 41 82 00 10 */ beq lbl_800B2728 +/* 800B271C 000AF65C 54 A0 05 EF */ rlwinm. r0, r5, 0, 0x17, 0x17 +/* 800B2720 000AF660 40 82 00 08 */ bne lbl_800B2728 +/* 800B2724 000AF664 3B E0 00 01 */ li r31, 1 +lbl_800B2728: +/* 800B2728 000AF668 2C 08 00 FF */ cmpwi r8, 0xff +/* 800B272C 000AF66C 38 00 00 00 */ li r0, 0 +/* 800B2730 000AF670 41 82 00 10 */ beq lbl_800B2740 +/* 800B2734 000AF674 55 0A 05 EF */ rlwinm. r10, r8, 0, 0x17, 0x17 +/* 800B2738 000AF678 40 82 00 08 */ bne lbl_800B2740 +/* 800B273C 000AF67C 38 00 00 01 */ li r0, 1 +lbl_800B2740: +/* 800B2740 000AF680 3D 40 80 3B */ lis r10, c2r$382@ha +/* 800B2744 000AF684 83 CD 95 B8 */ lwz r30, __GDCurrentDL@sda21(r13) +/* 800B2748 000AF688 39 8A 1C F8 */ addi r12, r10, c2r$382@l +/* 800B274C 000AF68C 54 C6 07 3E */ clrlwi r6, r6, 0x1c +/* 800B2750 000AF690 81 5E 00 08 */ lwz r10, 8(r30) +/* 800B2754 000AF694 7D 6C 32 14 */ add r11, r12, r6 +/* 800B2758 000AF698 80 DE 00 0C */ lwz r6, 0xc(r30) +/* 800B275C 000AF69C 89 6B 00 00 */ lbz r11, 0(r11) +/* 800B2760 000AF6A0 55 29 07 3E */ clrlwi r9, r9, 0x1c +/* 800B2764 000AF6A4 54 84 1E B8 */ rlwinm r4, r4, 3, 0x1a, 0x1c +/* 800B2768 000AF6A8 50 A4 07 7E */ rlwimi r4, r5, 0, 0x1d, 0x1f +/* 800B276C 000AF6AC 7D 2C 4A 14 */ add r9, r12, r9 +/* 800B2770 000AF6B0 7C 6C 0E 70 */ srawi r12, r3, 1 +/* 800B2774 000AF6B4 89 29 00 00 */ lbz r9, 0(r9) +/* 800B2778 000AF6B8 38 6A 00 01 */ addi r3, r10, 1 +/* 800B277C 000AF6BC 7D 8C 01 94 */ addze r12, r12 +/* 800B2780 000AF6C0 7C 03 30 40 */ cmplw r3, r6 +/* 800B2784 000AF6C4 55 65 38 30 */ slwi r5, r11, 7 +/* 800B2788 000AF6C8 53 E4 30 32 */ rlwimi r4, r31, 6, 0, 0x19 +/* 800B278C 000AF6CC 7C A4 23 78 */ or r4, r5, r4 +/* 800B2790 000AF6D0 55 08 64 66 */ rlwinm r8, r8, 0xc, 0x11, 0x13 +/* 800B2794 000AF6D4 54 E5 7B A0 */ rlwinm r5, r7, 0xf, 0xe, 0x10 +/* 800B2798 000AF6D8 7D 04 23 78 */ or r4, r8, r4 +/* 800B279C 000AF6DC 54 07 90 1A */ slwi r7, r0, 0x12 +/* 800B27A0 000AF6E0 7C A0 23 78 */ or r0, r5, r4 +/* 800B27A4 000AF6E4 39 4C 00 28 */ addi r10, r12, 0x28 +/* 800B27A8 000AF6E8 55 23 98 18 */ slwi r3, r9, 0x13 +/* 800B27AC 000AF6EC 7C E0 03 78 */ or r0, r7, r0 +/* 800B27B0 000AF6F0 55 44 C0 0E */ slwi r4, r10, 0x18 +/* 800B27B4 000AF6F4 7C 60 03 78 */ or r0, r3, r0 +/* 800B27B8 000AF6F8 7C 9F 03 78 */ or r31, r4, r0 +/* 800B27BC 000AF6FC 40 81 00 08 */ ble lbl_800B27C4 +/* 800B27C0 000AF700 4B FF C9 95 */ bl GDOverflowed +lbl_800B27C4: +/* 800B27C4 000AF704 80 8D 95 B8 */ lwz r4, __GDCurrentDL@sda21(r13) +/* 800B27C8 000AF708 38 A0 00 61 */ li r5, 0x61 +/* 800B27CC 000AF70C 80 64 00 08 */ lwz r3, 8(r4) +/* 800B27D0 000AF710 38 03 00 01 */ addi r0, r3, 1 +/* 800B27D4 000AF714 90 04 00 08 */ stw r0, 8(r4) +/* 800B27D8 000AF718 98 A3 00 00 */ stb r5, 0(r3) +/* 800B27DC 000AF71C 80 8D 95 B8 */ lwz r4, __GDCurrentDL@sda21(r13) +/* 800B27E0 000AF720 80 64 00 08 */ lwz r3, 8(r4) +/* 800B27E4 000AF724 80 04 00 0C */ lwz r0, 0xc(r4) +/* 800B27E8 000AF728 38 63 00 04 */ addi r3, r3, 4 +/* 800B27EC 000AF72C 7C 03 00 40 */ cmplw r3, r0 +/* 800B27F0 000AF730 40 81 00 08 */ ble lbl_800B27F8 +/* 800B27F4 000AF734 4B FF C9 61 */ bl GDOverflowed +lbl_800B27F8: +/* 800B27F8 000AF738 80 8D 95 B8 */ lwz r4, __GDCurrentDL@sda21(r13) +/* 800B27FC 000AF73C 57 E7 46 3E */ srwi r7, r31, 0x18 +/* 800B2800 000AF740 57 E6 86 3E */ rlwinm r6, r31, 0x10, 0x18, 0x1f +/* 800B2804 000AF744 80 64 00 08 */ lwz r3, 8(r4) +/* 800B2808 000AF748 57 E5 C6 3E */ rlwinm r5, r31, 0x18, 0x18, 0x1f +/* 800B280C 000AF74C 38 03 00 01 */ addi r0, r3, 1 +/* 800B2810 000AF750 90 04 00 08 */ stw r0, 8(r4) +/* 800B2814 000AF754 98 E3 00 00 */ stb r7, 0(r3) +/* 800B2818 000AF758 80 8D 95 B8 */ lwz r4, __GDCurrentDL@sda21(r13) +/* 800B281C 000AF75C 80 64 00 08 */ lwz r3, 8(r4) +/* 800B2820 000AF760 38 03 00 01 */ addi r0, r3, 1 +/* 800B2824 000AF764 90 04 00 08 */ stw r0, 8(r4) +/* 800B2828 000AF768 98 C3 00 00 */ stb r6, 0(r3) +/* 800B282C 000AF76C 80 8D 95 B8 */ lwz r4, __GDCurrentDL@sda21(r13) +/* 800B2830 000AF770 80 64 00 08 */ lwz r3, 8(r4) +/* 800B2834 000AF774 38 03 00 01 */ addi r0, r3, 1 +/* 800B2838 000AF778 90 04 00 08 */ stw r0, 8(r4) +/* 800B283C 000AF77C 98 A3 00 00 */ stb r5, 0(r3) +/* 800B2840 000AF780 80 8D 95 B8 */ lwz r4, __GDCurrentDL@sda21(r13) +/* 800B2844 000AF784 80 64 00 08 */ lwz r3, 8(r4) +/* 800B2848 000AF788 38 03 00 01 */ addi r0, r3, 1 +/* 800B284C 000AF78C 90 04 00 08 */ stw r0, 8(r4) +/* 800B2850 000AF790 9B E3 00 00 */ stb r31, 0(r3) +/* 800B2854 000AF794 80 01 00 34 */ lwz r0, 0x34(r1) +/* 800B2858 000AF798 83 E1 00 2C */ lwz r31, 0x2c(r1) +/* 800B285C 000AF79C 83 C1 00 28 */ lwz r30, 0x28(r1) +/* 800B2860 000AF7A0 38 21 00 30 */ addi r1, r1, 0x30 +/* 800B2864 000AF7A4 7C 08 03 A6 */ mtlr r0 +/* 800B2868 000AF7A8 4E 80 00 20 */ blr + +.section .data, "wa" # 0x803A8380 - 0x803E6000 + .balign 8 +c2r$382: + .4byte 0x00010001 + .4byte 0x00010705 + .4byte 0x06000000 + .4byte 0x00000007 diff --git a/asm/Dolphin/gd/GDTransform.s b/asm/Dolphin/gd/GDTransform.s new file mode 100644 index 0000000..cea9831 --- /dev/null +++ b/asm/Dolphin/gd/GDTransform.s @@ -0,0 +1,259 @@ +.include "macros.inc" + +.section .text, "ax" # 0x80005600 - 0x8036FBA0 +.global GDSetCurrentMtx +GDSetCurrentMtx: +/* 800B286C 000AF7AC 7C 08 02 A6 */ mflr r0 +/* 800B2870 000AF7B0 54 8B 30 32 */ slwi r11, r4, 6 +/* 800B2874 000AF7B4 90 01 00 04 */ stw r0, 4(r1) +/* 800B2878 000AF7B8 55 29 30 32 */ slwi r9, r9, 6 +/* 800B287C 000AF7BC 54 C6 90 1A */ slwi r6, r6, 0x12 +/* 800B2880 000AF7C0 94 21 FF B0 */ stwu r1, -0x50(r1) +/* 800B2884 000AF7C4 54 E7 C0 0E */ slwi r7, r7, 0x18 +/* 800B2888 000AF7C8 BE E1 00 2C */ stmw r23, 0x2c(r1) +/* 800B288C 000AF7CC 82 E1 00 58 */ lwz r23, 0x58(r1) +/* 800B2890 000AF7D0 81 8D 95 B8 */ lwz r12, __GDCurrentDL@sda21(r13) +/* 800B2894 000AF7D4 80 8C 00 08 */ lwz r4, 8(r12) +/* 800B2898 000AF7D8 80 0C 00 0C */ lwz r0, 0xc(r12) +/* 800B289C 000AF7DC 54 AC 60 26 */ slwi r12, r5, 0xc +/* 800B28A0 000AF7E0 7C 65 5B 78 */ or r5, r3, r11 +/* 800B28A4 000AF7E4 38 64 00 01 */ addi r3, r4, 1 +/* 800B28A8 000AF7E8 7C 03 00 40 */ cmplw r3, r0 +/* 800B28AC 000AF7EC 7D 84 2B 78 */ or r4, r12, r5 +/* 800B28B0 000AF7F0 7C C5 23 78 */ or r5, r6, r4 +/* 800B28B4 000AF7F4 55 43 60 26 */ slwi r3, r10, 0xc +/* 800B28B8 000AF7F8 7D 00 4B 78 */ or r0, r8, r9 +/* 800B28BC 000AF7FC 56 E4 90 1A */ slwi r4, r23, 0x12 +/* 800B28C0 000AF800 7C 60 03 78 */ or r0, r3, r0 +/* 800B28C4 000AF804 7C F8 2B 78 */ or r24, r7, r5 +/* 800B28C8 000AF808 7C 97 03 78 */ or r23, r4, r0 +/* 800B28CC 000AF80C 40 81 00 08 */ ble lbl_800B28D4 +/* 800B28D0 000AF810 4B FF C8 85 */ bl GDOverflowed +lbl_800B28D4: +/* 800B28D4 000AF814 80 8D 95 B8 */ lwz r4, __GDCurrentDL@sda21(r13) +/* 800B28D8 000AF818 38 A0 00 08 */ li r5, 8 +/* 800B28DC 000AF81C 80 64 00 08 */ lwz r3, 8(r4) +/* 800B28E0 000AF820 38 03 00 01 */ addi r0, r3, 1 +/* 800B28E4 000AF824 90 04 00 08 */ stw r0, 8(r4) +/* 800B28E8 000AF828 98 A3 00 00 */ stb r5, 0(r3) +/* 800B28EC 000AF82C 80 8D 95 B8 */ lwz r4, __GDCurrentDL@sda21(r13) +/* 800B28F0 000AF830 80 64 00 08 */ lwz r3, 8(r4) +/* 800B28F4 000AF834 80 04 00 0C */ lwz r0, 0xc(r4) +/* 800B28F8 000AF838 38 63 00 01 */ addi r3, r3, 1 +/* 800B28FC 000AF83C 7C 03 00 40 */ cmplw r3, r0 +/* 800B2900 000AF840 40 81 00 08 */ ble lbl_800B2908 +/* 800B2904 000AF844 4B FF C8 51 */ bl GDOverflowed +lbl_800B2908: +/* 800B2908 000AF848 80 8D 95 B8 */ lwz r4, __GDCurrentDL@sda21(r13) +/* 800B290C 000AF84C 38 A0 00 30 */ li r5, 0x30 +/* 800B2910 000AF850 80 64 00 08 */ lwz r3, 8(r4) +/* 800B2914 000AF854 38 03 00 01 */ addi r0, r3, 1 +/* 800B2918 000AF858 90 04 00 08 */ stw r0, 8(r4) +/* 800B291C 000AF85C 98 A3 00 00 */ stb r5, 0(r3) +/* 800B2920 000AF860 80 8D 95 B8 */ lwz r4, __GDCurrentDL@sda21(r13) +/* 800B2924 000AF864 80 64 00 08 */ lwz r3, 8(r4) +/* 800B2928 000AF868 80 04 00 0C */ lwz r0, 0xc(r4) +/* 800B292C 000AF86C 38 63 00 04 */ addi r3, r3, 4 +/* 800B2930 000AF870 7C 03 00 40 */ cmplw r3, r0 +/* 800B2934 000AF874 40 81 00 08 */ ble lbl_800B293C +/* 800B2938 000AF878 4B FF C8 1D */ bl GDOverflowed +lbl_800B293C: +/* 800B293C 000AF87C 80 8D 95 B8 */ lwz r4, __GDCurrentDL@sda21(r13) +/* 800B2940 000AF880 57 1F 46 3E */ srwi r31, r24, 0x18 +/* 800B2944 000AF884 57 1E 86 3E */ rlwinm r30, r24, 0x10, 0x18, 0x1f +/* 800B2948 000AF888 80 64 00 08 */ lwz r3, 8(r4) +/* 800B294C 000AF88C 57 1D C6 3E */ rlwinm r29, r24, 0x18, 0x18, 0x1f +/* 800B2950 000AF890 57 1C 06 3E */ clrlwi r28, r24, 0x18 +/* 800B2954 000AF894 38 03 00 01 */ addi r0, r3, 1 +/* 800B2958 000AF898 90 04 00 08 */ stw r0, 8(r4) +/* 800B295C 000AF89C 9B E3 00 00 */ stb r31, 0(r3) +/* 800B2960 000AF8A0 80 8D 95 B8 */ lwz r4, __GDCurrentDL@sda21(r13) +/* 800B2964 000AF8A4 80 64 00 08 */ lwz r3, 8(r4) +/* 800B2968 000AF8A8 38 03 00 01 */ addi r0, r3, 1 +/* 800B296C 000AF8AC 90 04 00 08 */ stw r0, 8(r4) +/* 800B2970 000AF8B0 9B C3 00 00 */ stb r30, 0(r3) +/* 800B2974 000AF8B4 80 8D 95 B8 */ lwz r4, __GDCurrentDL@sda21(r13) +/* 800B2978 000AF8B8 80 64 00 08 */ lwz r3, 8(r4) +/* 800B297C 000AF8BC 38 03 00 01 */ addi r0, r3, 1 +/* 800B2980 000AF8C0 90 04 00 08 */ stw r0, 8(r4) +/* 800B2984 000AF8C4 9B A3 00 00 */ stb r29, 0(r3) +/* 800B2988 000AF8C8 80 8D 95 B8 */ lwz r4, __GDCurrentDL@sda21(r13) +/* 800B298C 000AF8CC 80 64 00 08 */ lwz r3, 8(r4) +/* 800B2990 000AF8D0 38 03 00 01 */ addi r0, r3, 1 +/* 800B2994 000AF8D4 90 04 00 08 */ stw r0, 8(r4) +/* 800B2998 000AF8D8 9B 03 00 00 */ stb r24, 0(r3) +/* 800B299C 000AF8DC 80 8D 95 B8 */ lwz r4, __GDCurrentDL@sda21(r13) +/* 800B29A0 000AF8E0 80 64 00 08 */ lwz r3, 8(r4) +/* 800B29A4 000AF8E4 80 04 00 0C */ lwz r0, 0xc(r4) +/* 800B29A8 000AF8E8 38 63 00 01 */ addi r3, r3, 1 +/* 800B29AC 000AF8EC 7C 03 00 40 */ cmplw r3, r0 +/* 800B29B0 000AF8F0 40 81 00 08 */ ble lbl_800B29B8 +/* 800B29B4 000AF8F4 4B FF C7 A1 */ bl GDOverflowed +lbl_800B29B8: +/* 800B29B8 000AF8F8 80 8D 95 B8 */ lwz r4, __GDCurrentDL@sda21(r13) +/* 800B29BC 000AF8FC 38 A0 00 08 */ li r5, 8 +/* 800B29C0 000AF900 80 64 00 08 */ lwz r3, 8(r4) +/* 800B29C4 000AF904 38 03 00 01 */ addi r0, r3, 1 +/* 800B29C8 000AF908 90 04 00 08 */ stw r0, 8(r4) +/* 800B29CC 000AF90C 98 A3 00 00 */ stb r5, 0(r3) +/* 800B29D0 000AF910 80 8D 95 B8 */ lwz r4, __GDCurrentDL@sda21(r13) +/* 800B29D4 000AF914 80 64 00 08 */ lwz r3, 8(r4) +/* 800B29D8 000AF918 80 04 00 0C */ lwz r0, 0xc(r4) +/* 800B29DC 000AF91C 38 63 00 01 */ addi r3, r3, 1 +/* 800B29E0 000AF920 7C 03 00 40 */ cmplw r3, r0 +/* 800B29E4 000AF924 40 81 00 08 */ ble lbl_800B29EC +/* 800B29E8 000AF928 4B FF C7 6D */ bl GDOverflowed +lbl_800B29EC: +/* 800B29EC 000AF92C 80 8D 95 B8 */ lwz r4, __GDCurrentDL@sda21(r13) +/* 800B29F0 000AF930 38 A0 00 40 */ li r5, 0x40 +/* 800B29F4 000AF934 80 64 00 08 */ lwz r3, 8(r4) +/* 800B29F8 000AF938 38 03 00 01 */ addi r0, r3, 1 +/* 800B29FC 000AF93C 90 04 00 08 */ stw r0, 8(r4) +/* 800B2A00 000AF940 98 A3 00 00 */ stb r5, 0(r3) +/* 800B2A04 000AF944 80 8D 95 B8 */ lwz r4, __GDCurrentDL@sda21(r13) +/* 800B2A08 000AF948 80 64 00 08 */ lwz r3, 8(r4) +/* 800B2A0C 000AF94C 80 04 00 0C */ lwz r0, 0xc(r4) +/* 800B2A10 000AF950 38 63 00 04 */ addi r3, r3, 4 +/* 800B2A14 000AF954 7C 03 00 40 */ cmplw r3, r0 +/* 800B2A18 000AF958 40 81 00 08 */ ble lbl_800B2A20 +/* 800B2A1C 000AF95C 4B FF C7 39 */ bl GDOverflowed +lbl_800B2A20: +/* 800B2A20 000AF960 80 8D 95 B8 */ lwz r4, __GDCurrentDL@sda21(r13) +/* 800B2A24 000AF964 56 FB 46 3E */ srwi r27, r23, 0x18 +/* 800B2A28 000AF968 56 FA 86 3E */ rlwinm r26, r23, 0x10, 0x18, 0x1f +/* 800B2A2C 000AF96C 80 64 00 08 */ lwz r3, 8(r4) +/* 800B2A30 000AF970 56 F9 C6 3E */ rlwinm r25, r23, 0x18, 0x18, 0x1f +/* 800B2A34 000AF974 56 F8 06 3E */ clrlwi r24, r23, 0x18 +/* 800B2A38 000AF978 38 03 00 01 */ addi r0, r3, 1 +/* 800B2A3C 000AF97C 90 04 00 08 */ stw r0, 8(r4) +/* 800B2A40 000AF980 9B 63 00 00 */ stb r27, 0(r3) +/* 800B2A44 000AF984 80 8D 95 B8 */ lwz r4, __GDCurrentDL@sda21(r13) +/* 800B2A48 000AF988 80 64 00 08 */ lwz r3, 8(r4) +/* 800B2A4C 000AF98C 38 03 00 01 */ addi r0, r3, 1 +/* 800B2A50 000AF990 90 04 00 08 */ stw r0, 8(r4) +/* 800B2A54 000AF994 9B 43 00 00 */ stb r26, 0(r3) +/* 800B2A58 000AF998 80 8D 95 B8 */ lwz r4, __GDCurrentDL@sda21(r13) +/* 800B2A5C 000AF99C 80 64 00 08 */ lwz r3, 8(r4) +/* 800B2A60 000AF9A0 38 03 00 01 */ addi r0, r3, 1 +/* 800B2A64 000AF9A4 90 04 00 08 */ stw r0, 8(r4) +/* 800B2A68 000AF9A8 9B 23 00 00 */ stb r25, 0(r3) +/* 800B2A6C 000AF9AC 80 8D 95 B8 */ lwz r4, __GDCurrentDL@sda21(r13) +/* 800B2A70 000AF9B0 80 64 00 08 */ lwz r3, 8(r4) +/* 800B2A74 000AF9B4 38 03 00 01 */ addi r0, r3, 1 +/* 800B2A78 000AF9B8 90 04 00 08 */ stw r0, 8(r4) +/* 800B2A7C 000AF9BC 9A E3 00 00 */ stb r23, 0(r3) +/* 800B2A80 000AF9C0 80 8D 95 B8 */ lwz r4, __GDCurrentDL@sda21(r13) +/* 800B2A84 000AF9C4 80 64 00 08 */ lwz r3, 8(r4) +/* 800B2A88 000AF9C8 80 04 00 0C */ lwz r0, 0xc(r4) +/* 800B2A8C 000AF9CC 38 63 00 01 */ addi r3, r3, 1 +/* 800B2A90 000AF9D0 7C 03 00 40 */ cmplw r3, r0 +/* 800B2A94 000AF9D4 40 81 00 08 */ ble lbl_800B2A9C +/* 800B2A98 000AF9D8 4B FF C6 BD */ bl GDOverflowed +lbl_800B2A9C: +/* 800B2A9C 000AF9DC 80 8D 95 B8 */ lwz r4, __GDCurrentDL@sda21(r13) +/* 800B2AA0 000AF9E0 38 A0 00 10 */ li r5, 0x10 +/* 800B2AA4 000AF9E4 80 64 00 08 */ lwz r3, 8(r4) +/* 800B2AA8 000AF9E8 38 03 00 01 */ addi r0, r3, 1 +/* 800B2AAC 000AF9EC 90 04 00 08 */ stw r0, 8(r4) +/* 800B2AB0 000AF9F0 98 A3 00 00 */ stb r5, 0(r3) +/* 800B2AB4 000AF9F4 80 8D 95 B8 */ lwz r4, __GDCurrentDL@sda21(r13) +/* 800B2AB8 000AF9F8 80 64 00 08 */ lwz r3, 8(r4) +/* 800B2ABC 000AF9FC 80 04 00 0C */ lwz r0, 0xc(r4) +/* 800B2AC0 000AFA00 38 63 00 02 */ addi r3, r3, 2 +/* 800B2AC4 000AFA04 7C 03 00 40 */ cmplw r3, r0 +/* 800B2AC8 000AFA08 40 81 00 08 */ ble lbl_800B2AD0 +/* 800B2ACC 000AFA0C 4B FF C6 89 */ bl GDOverflowed +lbl_800B2AD0: +/* 800B2AD0 000AFA10 80 8D 95 B8 */ lwz r4, __GDCurrentDL@sda21(r13) +/* 800B2AD4 000AFA14 38 C0 00 00 */ li r6, 0 +/* 800B2AD8 000AFA18 38 A0 00 01 */ li r5, 1 +/* 800B2ADC 000AFA1C 80 64 00 08 */ lwz r3, 8(r4) +/* 800B2AE0 000AFA20 38 03 00 01 */ addi r0, r3, 1 +/* 800B2AE4 000AFA24 90 04 00 08 */ stw r0, 8(r4) +/* 800B2AE8 000AFA28 98 C3 00 00 */ stb r6, 0(r3) +/* 800B2AEC 000AFA2C 80 8D 95 B8 */ lwz r4, __GDCurrentDL@sda21(r13) +/* 800B2AF0 000AFA30 80 64 00 08 */ lwz r3, 8(r4) +/* 800B2AF4 000AFA34 38 03 00 01 */ addi r0, r3, 1 +/* 800B2AF8 000AFA38 90 04 00 08 */ stw r0, 8(r4) +/* 800B2AFC 000AFA3C 98 A3 00 00 */ stb r5, 0(r3) +/* 800B2B00 000AFA40 80 8D 95 B8 */ lwz r4, __GDCurrentDL@sda21(r13) +/* 800B2B04 000AFA44 80 64 00 08 */ lwz r3, 8(r4) +/* 800B2B08 000AFA48 80 04 00 0C */ lwz r0, 0xc(r4) +/* 800B2B0C 000AFA4C 38 63 00 02 */ addi r3, r3, 2 +/* 800B2B10 000AFA50 7C 03 00 40 */ cmplw r3, r0 +/* 800B2B14 000AFA54 40 81 00 08 */ ble lbl_800B2B1C +/* 800B2B18 000AFA58 4B FF C6 3D */ bl GDOverflowed +lbl_800B2B1C: +/* 800B2B1C 000AFA5C 80 8D 95 B8 */ lwz r4, __GDCurrentDL@sda21(r13) +/* 800B2B20 000AFA60 38 C0 00 10 */ li r6, 0x10 +/* 800B2B24 000AFA64 38 A0 00 18 */ li r5, 0x18 +/* 800B2B28 000AFA68 80 64 00 08 */ lwz r3, 8(r4) +/* 800B2B2C 000AFA6C 38 03 00 01 */ addi r0, r3, 1 +/* 800B2B30 000AFA70 90 04 00 08 */ stw r0, 8(r4) +/* 800B2B34 000AFA74 98 C3 00 00 */ stb r6, 0(r3) +/* 800B2B38 000AFA78 80 8D 95 B8 */ lwz r4, __GDCurrentDL@sda21(r13) +/* 800B2B3C 000AFA7C 80 64 00 08 */ lwz r3, 8(r4) +/* 800B2B40 000AFA80 38 03 00 01 */ addi r0, r3, 1 +/* 800B2B44 000AFA84 90 04 00 08 */ stw r0, 8(r4) +/* 800B2B48 000AFA88 98 A3 00 00 */ stb r5, 0(r3) +/* 800B2B4C 000AFA8C 80 8D 95 B8 */ lwz r4, __GDCurrentDL@sda21(r13) +/* 800B2B50 000AFA90 80 64 00 08 */ lwz r3, 8(r4) +/* 800B2B54 000AFA94 80 04 00 0C */ lwz r0, 0xc(r4) +/* 800B2B58 000AFA98 38 63 00 04 */ addi r3, r3, 4 +/* 800B2B5C 000AFA9C 7C 03 00 40 */ cmplw r3, r0 +/* 800B2B60 000AFAA0 40 81 00 08 */ ble lbl_800B2B68 +/* 800B2B64 000AFAA4 4B FF C5 F1 */ bl GDOverflowed +lbl_800B2B68: +/* 800B2B68 000AFAA8 80 8D 95 B8 */ lwz r4, __GDCurrentDL@sda21(r13) +/* 800B2B6C 000AFAAC 80 64 00 08 */ lwz r3, 8(r4) +/* 800B2B70 000AFAB0 38 03 00 01 */ addi r0, r3, 1 +/* 800B2B74 000AFAB4 90 04 00 08 */ stw r0, 8(r4) +/* 800B2B78 000AFAB8 9B E3 00 00 */ stb r31, 0(r3) +/* 800B2B7C 000AFABC 80 8D 95 B8 */ lwz r4, __GDCurrentDL@sda21(r13) +/* 800B2B80 000AFAC0 80 64 00 08 */ lwz r3, 8(r4) +/* 800B2B84 000AFAC4 38 03 00 01 */ addi r0, r3, 1 +/* 800B2B88 000AFAC8 90 04 00 08 */ stw r0, 8(r4) +/* 800B2B8C 000AFACC 9B C3 00 00 */ stb r30, 0(r3) +/* 800B2B90 000AFAD0 80 8D 95 B8 */ lwz r4, __GDCurrentDL@sda21(r13) +/* 800B2B94 000AFAD4 80 64 00 08 */ lwz r3, 8(r4) +/* 800B2B98 000AFAD8 38 03 00 01 */ addi r0, r3, 1 +/* 800B2B9C 000AFADC 90 04 00 08 */ stw r0, 8(r4) +/* 800B2BA0 000AFAE0 9B A3 00 00 */ stb r29, 0(r3) +/* 800B2BA4 000AFAE4 80 8D 95 B8 */ lwz r4, __GDCurrentDL@sda21(r13) +/* 800B2BA8 000AFAE8 80 64 00 08 */ lwz r3, 8(r4) +/* 800B2BAC 000AFAEC 38 03 00 01 */ addi r0, r3, 1 +/* 800B2BB0 000AFAF0 90 04 00 08 */ stw r0, 8(r4) +/* 800B2BB4 000AFAF4 9B 83 00 00 */ stb r28, 0(r3) +/* 800B2BB8 000AFAF8 80 8D 95 B8 */ lwz r4, __GDCurrentDL@sda21(r13) +/* 800B2BBC 000AFAFC 80 64 00 08 */ lwz r3, 8(r4) +/* 800B2BC0 000AFB00 80 04 00 0C */ lwz r0, 0xc(r4) +/* 800B2BC4 000AFB04 38 63 00 04 */ addi r3, r3, 4 +/* 800B2BC8 000AFB08 7C 03 00 40 */ cmplw r3, r0 +/* 800B2BCC 000AFB0C 40 81 00 08 */ ble lbl_800B2BD4 +/* 800B2BD0 000AFB10 4B FF C5 85 */ bl GDOverflowed +lbl_800B2BD4: +/* 800B2BD4 000AFB14 80 8D 95 B8 */ lwz r4, __GDCurrentDL@sda21(r13) +/* 800B2BD8 000AFB18 80 64 00 08 */ lwz r3, 8(r4) +/* 800B2BDC 000AFB1C 38 03 00 01 */ addi r0, r3, 1 +/* 800B2BE0 000AFB20 90 04 00 08 */ stw r0, 8(r4) +/* 800B2BE4 000AFB24 9B 63 00 00 */ stb r27, 0(r3) +/* 800B2BE8 000AFB28 80 8D 95 B8 */ lwz r4, __GDCurrentDL@sda21(r13) +/* 800B2BEC 000AFB2C 80 64 00 08 */ lwz r3, 8(r4) +/* 800B2BF0 000AFB30 38 03 00 01 */ addi r0, r3, 1 +/* 800B2BF4 000AFB34 90 04 00 08 */ stw r0, 8(r4) +/* 800B2BF8 000AFB38 9B 43 00 00 */ stb r26, 0(r3) +/* 800B2BFC 000AFB3C 80 8D 95 B8 */ lwz r4, __GDCurrentDL@sda21(r13) +/* 800B2C00 000AFB40 80 64 00 08 */ lwz r3, 8(r4) +/* 800B2C04 000AFB44 38 03 00 01 */ addi r0, r3, 1 +/* 800B2C08 000AFB48 90 04 00 08 */ stw r0, 8(r4) +/* 800B2C0C 000AFB4C 9B 23 00 00 */ stb r25, 0(r3) +/* 800B2C10 000AFB50 80 8D 95 B8 */ lwz r4, __GDCurrentDL@sda21(r13) +/* 800B2C14 000AFB54 80 64 00 08 */ lwz r3, 8(r4) +/* 800B2C18 000AFB58 38 03 00 01 */ addi r0, r3, 1 +/* 800B2C1C 000AFB5C 90 04 00 08 */ stw r0, 8(r4) +/* 800B2C20 000AFB60 9B 03 00 00 */ stb r24, 0(r3) +/* 800B2C24 000AFB64 80 01 00 54 */ lwz r0, 0x54(r1) +/* 800B2C28 000AFB68 BA E1 00 2C */ lmw r23, 0x2c(r1) +/* 800B2C2C 000AFB6C 38 21 00 50 */ addi r1, r1, 0x50 +/* 800B2C30 000AFB70 7C 08 03 A6 */ mtlr r0 +/* 800B2C34 000AFB74 4E 80 00 20 */ blr diff --git a/asm/Dolphin/gx/GXAttr.s b/asm/Dolphin/gx/GXAttr.s new file mode 100644 index 0000000..2fa91ae --- /dev/null +++ b/asm/Dolphin/gx/GXAttr.s @@ -0,0 +1,2086 @@ +.include "macros.inc" + +.section .text, "ax" # 0x80005600 - 0x8036FBA0 +.global __GXXfVtxSpecs +__GXXfVtxSpecs: +/* 800A6790 000A36D0 80 AD 82 C8 */ lwz r5, gx@sda21(r13) +/* 800A6794 000A36D4 80 85 00 14 */ lwz r4, 0x14(r5) +/* 800A6798 000A36D8 54 80 9F BF */ rlwinm. r0, r4, 0x13, 0x1e, 0x1f +/* 800A679C 000A36DC 41 82 00 0C */ beq lbl_800A67A8 +/* 800A67A0 000A36E0 38 60 00 01 */ li r3, 1 +/* 800A67A4 000A36E4 48 00 00 08 */ b lbl_800A67AC +lbl_800A67A8: +/* 800A67A8 000A36E8 38 60 00 00 */ li r3, 0 +lbl_800A67AC: +/* 800A67AC 000A36EC 54 80 8F BF */ rlwinm. r0, r4, 0x11, 0x1e, 0x1f +/* 800A67B0 000A36F0 41 82 00 0C */ beq lbl_800A67BC +/* 800A67B4 000A36F4 38 80 00 01 */ li r4, 1 +/* 800A67B8 000A36F8 48 00 00 08 */ b lbl_800A67C0 +lbl_800A67BC: +/* 800A67BC 000A36FC 38 80 00 00 */ li r4, 0 +lbl_800A67C0: +/* 800A67C0 000A3700 88 05 04 1D */ lbz r0, 0x41d(r5) +/* 800A67C4 000A3704 7C E3 22 14 */ add r7, r3, r4 +/* 800A67C8 000A3708 28 00 00 00 */ cmplwi r0, 0 +/* 800A67CC 000A370C 41 82 00 0C */ beq lbl_800A67D8 +/* 800A67D0 000A3710 38 80 00 02 */ li r4, 2 +/* 800A67D4 000A3714 48 00 00 1C */ b lbl_800A67F0 +lbl_800A67D8: +/* 800A67D8 000A3718 88 05 04 1C */ lbz r0, 0x41c(r5) +/* 800A67DC 000A371C 28 00 00 00 */ cmplwi r0, 0 +/* 800A67E0 000A3720 41 82 00 0C */ beq lbl_800A67EC +/* 800A67E4 000A3724 38 80 00 01 */ li r4, 1 +/* 800A67E8 000A3728 48 00 00 08 */ b lbl_800A67F0 +lbl_800A67EC: +/* 800A67EC 000A372C 38 80 00 00 */ li r4, 0 +lbl_800A67F0: +/* 800A67F0 000A3730 80 C5 00 18 */ lwz r6, 0x18(r5) +/* 800A67F4 000A3734 54 C0 07 BF */ clrlwi. r0, r6, 0x1e +/* 800A67F8 000A3738 41 82 00 0C */ beq lbl_800A6804 +/* 800A67FC 000A373C 38 60 00 01 */ li r3, 1 +/* 800A6800 000A3740 48 00 00 08 */ b lbl_800A6808 +lbl_800A6804: +/* 800A6804 000A3744 38 60 00 00 */ li r3, 0 +lbl_800A6808: +/* 800A6808 000A3748 54 C0 F7 BF */ rlwinm. r0, r6, 0x1e, 0x1e, 0x1f +/* 800A680C 000A374C 41 82 00 0C */ beq lbl_800A6818 +/* 800A6810 000A3750 38 A0 00 01 */ li r5, 1 +/* 800A6814 000A3754 48 00 00 08 */ b lbl_800A681C +lbl_800A6818: +/* 800A6818 000A3758 38 A0 00 00 */ li r5, 0 +lbl_800A681C: +/* 800A681C 000A375C 54 C0 E7 BF */ rlwinm. r0, r6, 0x1c, 0x1e, 0x1f +/* 800A6820 000A3760 7D 03 2A 14 */ add r8, r3, r5 +/* 800A6824 000A3764 41 82 00 0C */ beq lbl_800A6830 +/* 800A6828 000A3768 38 60 00 01 */ li r3, 1 +/* 800A682C 000A376C 48 00 00 08 */ b lbl_800A6834 +lbl_800A6830: +/* 800A6830 000A3770 38 60 00 00 */ li r3, 0 +lbl_800A6834: +/* 800A6834 000A3774 54 C0 D7 BF */ rlwinm. r0, r6, 0x1a, 0x1e, 0x1f +/* 800A6838 000A3778 7D 08 1A 14 */ add r8, r8, r3 +/* 800A683C 000A377C 41 82 00 0C */ beq lbl_800A6848 +/* 800A6840 000A3780 38 60 00 01 */ li r3, 1 +/* 800A6844 000A3784 48 00 00 08 */ b lbl_800A684C +lbl_800A6848: +/* 800A6848 000A3788 38 60 00 00 */ li r3, 0 +lbl_800A684C: +/* 800A684C 000A378C 54 C0 C7 BF */ rlwinm. r0, r6, 0x18, 0x1e, 0x1f +/* 800A6850 000A3790 7D 08 1A 14 */ add r8, r8, r3 +/* 800A6854 000A3794 41 82 00 0C */ beq lbl_800A6860 +/* 800A6858 000A3798 38 60 00 01 */ li r3, 1 +/* 800A685C 000A379C 48 00 00 08 */ b lbl_800A6864 +lbl_800A6860: +/* 800A6860 000A37A0 38 60 00 00 */ li r3, 0 +lbl_800A6864: +/* 800A6864 000A37A4 54 C0 B7 BF */ rlwinm. r0, r6, 0x16, 0x1e, 0x1f +/* 800A6868 000A37A8 7D 08 1A 14 */ add r8, r8, r3 +/* 800A686C 000A37AC 41 82 00 0C */ beq lbl_800A6878 +/* 800A6870 000A37B0 38 60 00 01 */ li r3, 1 +/* 800A6874 000A37B4 48 00 00 08 */ b lbl_800A687C +lbl_800A6878: +/* 800A6878 000A37B8 38 60 00 00 */ li r3, 0 +lbl_800A687C: +/* 800A687C 000A37BC 54 C0 A7 BF */ rlwinm. r0, r6, 0x14, 0x1e, 0x1f +/* 800A6880 000A37C0 7D 08 1A 14 */ add r8, r8, r3 +/* 800A6884 000A37C4 41 82 00 0C */ beq lbl_800A6890 +/* 800A6888 000A37C8 38 60 00 01 */ li r3, 1 +/* 800A688C 000A37CC 48 00 00 08 */ b lbl_800A6894 +lbl_800A6890: +/* 800A6890 000A37D0 38 60 00 00 */ li r3, 0 +lbl_800A6894: +/* 800A6894 000A37D4 54 C0 97 BF */ rlwinm. r0, r6, 0x12, 0x1e, 0x1f +/* 800A6898 000A37D8 7D 08 1A 14 */ add r8, r8, r3 +/* 800A689C 000A37DC 41 82 00 0C */ beq lbl_800A68A8 +/* 800A68A0 000A37E0 38 C0 00 01 */ li r6, 1 +/* 800A68A4 000A37E4 48 00 00 08 */ b lbl_800A68AC +lbl_800A68A8: +/* 800A68A8 000A37E8 38 C0 00 00 */ li r6, 0 +lbl_800A68AC: +/* 800A68AC 000A37EC 38 00 00 10 */ li r0, 0x10 +/* 800A68B0 000A37F0 80 6D 82 C8 */ lwz r3, gx@sda21(r13) +/* 800A68B4 000A37F4 3C A0 CC 01 */ lis r5, 0xCC008000@ha +/* 800A68B8 000A37F8 7D 08 32 14 */ add r8, r8, r6 +/* 800A68BC 000A37FC 98 05 80 00 */ stb r0, 0xCC008000@l(r5) +/* 800A68C0 000A3800 54 80 10 3A */ slwi r0, r4, 2 +/* 800A68C4 000A3804 38 80 10 08 */ li r4, 0x1008 +/* 800A68C8 000A3808 90 85 80 00 */ stw r4, -0x8000(r5) +/* 800A68CC 000A380C 55 04 20 36 */ slwi r4, r8, 4 +/* 800A68D0 000A3810 7C E0 03 78 */ or r0, r7, r0 +/* 800A68D4 000A3814 7C 80 03 78 */ or r0, r4, r0 +/* 800A68D8 000A3818 90 05 80 00 */ stw r0, -0x8000(r5) +/* 800A68DC 000A381C 38 00 00 01 */ li r0, 1 +/* 800A68E0 000A3820 B0 03 00 02 */ sth r0, 2(r3) +/* 800A68E4 000A3824 4E 80 00 20 */ blr + +.global GXSetVtxDesc +GXSetVtxDesc: +/* 800A68E8 000A3828 28 03 00 19 */ cmplwi r3, 0x19 +/* 800A68EC 000A382C 41 81 03 00 */ bgt lbl_800A6BEC +/* 800A68F0 000A3830 3C A0 80 3B */ lis r5, "@128"@ha +/* 800A68F4 000A3834 38 A5 15 40 */ addi r5, r5, "@128"@l +/* 800A68F8 000A3838 54 60 10 3A */ slwi r0, r3, 2 +/* 800A68FC 000A383C 7C 05 00 2E */ lwzx r0, r5, r0 +/* 800A6900 000A3840 7C 09 03 A6 */ mtctr r0 +/* 800A6904 000A3844 4E 80 04 20 */ bctr +lbl_800A6908: +/* 800A6908 000A3848 80 6D 82 C8 */ lwz r3, gx@sda21(r13) +/* 800A690C 000A384C 84 03 00 14 */ lwzu r0, 0x14(r3) +/* 800A6910 000A3850 54 00 00 3C */ rlwinm r0, r0, 0, 0, 0x1e +/* 800A6914 000A3854 7C 00 23 78 */ or r0, r0, r4 +/* 800A6918 000A3858 90 03 00 00 */ stw r0, 0(r3) +/* 800A691C 000A385C 48 00 02 D0 */ b lbl_800A6BEC +lbl_800A6920: +/* 800A6920 000A3860 80 6D 82 C8 */ lwz r3, gx@sda21(r13) +/* 800A6924 000A3864 54 80 08 3C */ slwi r0, r4, 1 +/* 800A6928 000A3868 38 83 00 14 */ addi r4, r3, 0x14 +/* 800A692C 000A386C 80 63 00 14 */ lwz r3, 0x14(r3) +/* 800A6930 000A3870 54 63 07 FA */ rlwinm r3, r3, 0, 0x1f, 0x1d +/* 800A6934 000A3874 7C 60 03 78 */ or r0, r3, r0 +/* 800A6938 000A3878 90 04 00 00 */ stw r0, 0(r4) +/* 800A693C 000A387C 48 00 02 B0 */ b lbl_800A6BEC +lbl_800A6940: +/* 800A6940 000A3880 80 6D 82 C8 */ lwz r3, gx@sda21(r13) +/* 800A6944 000A3884 54 80 10 3A */ slwi r0, r4, 2 +/* 800A6948 000A3888 38 83 00 14 */ addi r4, r3, 0x14 +/* 800A694C 000A388C 80 63 00 14 */ lwz r3, 0x14(r3) +/* 800A6950 000A3890 54 63 07 B8 */ rlwinm r3, r3, 0, 0x1e, 0x1c +/* 800A6954 000A3894 7C 60 03 78 */ or r0, r3, r0 +/* 800A6958 000A3898 90 04 00 00 */ stw r0, 0(r4) +/* 800A695C 000A389C 48 00 02 90 */ b lbl_800A6BEC +lbl_800A6960: +/* 800A6960 000A38A0 80 6D 82 C8 */ lwz r3, gx@sda21(r13) +/* 800A6964 000A38A4 54 80 18 38 */ slwi r0, r4, 3 +/* 800A6968 000A38A8 38 83 00 14 */ addi r4, r3, 0x14 +/* 800A696C 000A38AC 80 63 00 14 */ lwz r3, 0x14(r3) +/* 800A6970 000A38B0 54 63 07 76 */ rlwinm r3, r3, 0, 0x1d, 0x1b +/* 800A6974 000A38B4 7C 60 03 78 */ or r0, r3, r0 +/* 800A6978 000A38B8 90 04 00 00 */ stw r0, 0(r4) +/* 800A697C 000A38BC 48 00 02 70 */ b lbl_800A6BEC +lbl_800A6980: +/* 800A6980 000A38C0 80 6D 82 C8 */ lwz r3, gx@sda21(r13) +/* 800A6984 000A38C4 54 80 20 36 */ slwi r0, r4, 4 +/* 800A6988 000A38C8 38 83 00 14 */ addi r4, r3, 0x14 +/* 800A698C 000A38CC 80 63 00 14 */ lwz r3, 0x14(r3) +/* 800A6990 000A38D0 54 63 07 34 */ rlwinm r3, r3, 0, 0x1c, 0x1a +/* 800A6994 000A38D4 7C 60 03 78 */ or r0, r3, r0 +/* 800A6998 000A38D8 90 04 00 00 */ stw r0, 0(r4) +/* 800A699C 000A38DC 48 00 02 50 */ b lbl_800A6BEC +lbl_800A69A0: +/* 800A69A0 000A38E0 80 6D 82 C8 */ lwz r3, gx@sda21(r13) +/* 800A69A4 000A38E4 54 80 28 34 */ slwi r0, r4, 5 +/* 800A69A8 000A38E8 38 83 00 14 */ addi r4, r3, 0x14 +/* 800A69AC 000A38EC 80 63 00 14 */ lwz r3, 0x14(r3) +/* 800A69B0 000A38F0 54 63 06 F2 */ rlwinm r3, r3, 0, 0x1b, 0x19 +/* 800A69B4 000A38F4 7C 60 03 78 */ or r0, r3, r0 +/* 800A69B8 000A38F8 90 04 00 00 */ stw r0, 0(r4) +/* 800A69BC 000A38FC 48 00 02 30 */ b lbl_800A6BEC +lbl_800A69C0: +/* 800A69C0 000A3900 80 6D 82 C8 */ lwz r3, gx@sda21(r13) +/* 800A69C4 000A3904 54 80 30 32 */ slwi r0, r4, 6 +/* 800A69C8 000A3908 38 83 00 14 */ addi r4, r3, 0x14 +/* 800A69CC 000A390C 80 63 00 14 */ lwz r3, 0x14(r3) +/* 800A69D0 000A3910 54 63 06 B0 */ rlwinm r3, r3, 0, 0x1a, 0x18 +/* 800A69D4 000A3914 7C 60 03 78 */ or r0, r3, r0 +/* 800A69D8 000A3918 90 04 00 00 */ stw r0, 0(r4) +/* 800A69DC 000A391C 48 00 02 10 */ b lbl_800A6BEC +lbl_800A69E0: +/* 800A69E0 000A3920 80 6D 82 C8 */ lwz r3, gx@sda21(r13) +/* 800A69E4 000A3924 54 80 38 30 */ slwi r0, r4, 7 +/* 800A69E8 000A3928 38 83 00 14 */ addi r4, r3, 0x14 +/* 800A69EC 000A392C 80 63 00 14 */ lwz r3, 0x14(r3) +/* 800A69F0 000A3930 54 63 06 6E */ rlwinm r3, r3, 0, 0x19, 0x17 +/* 800A69F4 000A3934 7C 60 03 78 */ or r0, r3, r0 +/* 800A69F8 000A3938 90 04 00 00 */ stw r0, 0(r4) +/* 800A69FC 000A393C 48 00 01 F0 */ b lbl_800A6BEC +lbl_800A6A00: +/* 800A6A00 000A3940 80 6D 82 C8 */ lwz r3, gx@sda21(r13) +/* 800A6A04 000A3944 54 80 40 2E */ slwi r0, r4, 8 +/* 800A6A08 000A3948 38 83 00 14 */ addi r4, r3, 0x14 +/* 800A6A0C 000A394C 80 63 00 14 */ lwz r3, 0x14(r3) +/* 800A6A10 000A3950 54 63 06 2C */ rlwinm r3, r3, 0, 0x18, 0x16 +/* 800A6A14 000A3954 7C 60 03 78 */ or r0, r3, r0 +/* 800A6A18 000A3958 90 04 00 00 */ stw r0, 0(r4) +/* 800A6A1C 000A395C 48 00 01 D0 */ b lbl_800A6BEC +lbl_800A6A20: +/* 800A6A20 000A3960 80 6D 82 C8 */ lwz r3, gx@sda21(r13) +/* 800A6A24 000A3964 54 80 48 2C */ slwi r0, r4, 9 +/* 800A6A28 000A3968 38 83 00 14 */ addi r4, r3, 0x14 +/* 800A6A2C 000A396C 80 63 00 14 */ lwz r3, 0x14(r3) +/* 800A6A30 000A3970 54 63 05 E8 */ rlwinm r3, r3, 0, 0x17, 0x14 +/* 800A6A34 000A3974 7C 60 03 78 */ or r0, r3, r0 +/* 800A6A38 000A3978 90 04 00 00 */ stw r0, 0(r4) +/* 800A6A3C 000A397C 48 00 01 B0 */ b lbl_800A6BEC +lbl_800A6A40: +/* 800A6A40 000A3980 2C 04 00 00 */ cmpwi r4, 0 +/* 800A6A44 000A3984 41 82 00 28 */ beq lbl_800A6A6C +/* 800A6A48 000A3988 80 6D 82 C8 */ lwz r3, gx@sda21(r13) +/* 800A6A4C 000A398C 38 A0 00 01 */ li r5, 1 +/* 800A6A50 000A3990 38 00 00 00 */ li r0, 0 +/* 800A6A54 000A3994 98 A3 04 1C */ stb r5, 0x41c(r3) +/* 800A6A58 000A3998 80 6D 82 C8 */ lwz r3, gx@sda21(r13) +/* 800A6A5C 000A399C 98 03 04 1D */ stb r0, 0x41d(r3) +/* 800A6A60 000A39A0 80 6D 82 C8 */ lwz r3, gx@sda21(r13) +/* 800A6A64 000A39A4 90 83 04 18 */ stw r4, 0x418(r3) +/* 800A6A68 000A39A8 48 00 01 84 */ b lbl_800A6BEC +lbl_800A6A6C: +/* 800A6A6C 000A39AC 80 6D 82 C8 */ lwz r3, gx@sda21(r13) +/* 800A6A70 000A39B0 38 00 00 00 */ li r0, 0 +/* 800A6A74 000A39B4 98 03 04 1C */ stb r0, 0x41c(r3) +/* 800A6A78 000A39B8 48 00 01 74 */ b lbl_800A6BEC +lbl_800A6A7C: +/* 800A6A7C 000A39BC 2C 04 00 00 */ cmpwi r4, 0 +/* 800A6A80 000A39C0 41 82 00 28 */ beq lbl_800A6AA8 +/* 800A6A84 000A39C4 80 6D 82 C8 */ lwz r3, gx@sda21(r13) +/* 800A6A88 000A39C8 38 A0 00 01 */ li r5, 1 +/* 800A6A8C 000A39CC 38 00 00 00 */ li r0, 0 +/* 800A6A90 000A39D0 98 A3 04 1D */ stb r5, 0x41d(r3) +/* 800A6A94 000A39D4 80 6D 82 C8 */ lwz r3, gx@sda21(r13) +/* 800A6A98 000A39D8 98 03 04 1C */ stb r0, 0x41c(r3) +/* 800A6A9C 000A39DC 80 6D 82 C8 */ lwz r3, gx@sda21(r13) +/* 800A6AA0 000A39E0 90 83 04 18 */ stw r4, 0x418(r3) +/* 800A6AA4 000A39E4 48 00 01 48 */ b lbl_800A6BEC +lbl_800A6AA8: +/* 800A6AA8 000A39E8 80 6D 82 C8 */ lwz r3, gx@sda21(r13) +/* 800A6AAC 000A39EC 38 00 00 00 */ li r0, 0 +/* 800A6AB0 000A39F0 98 03 04 1D */ stb r0, 0x41d(r3) +/* 800A6AB4 000A39F4 48 00 01 38 */ b lbl_800A6BEC +lbl_800A6AB8: +/* 800A6AB8 000A39F8 80 6D 82 C8 */ lwz r3, gx@sda21(r13) +/* 800A6ABC 000A39FC 54 80 68 24 */ slwi r0, r4, 0xd +/* 800A6AC0 000A3A00 38 83 00 14 */ addi r4, r3, 0x14 +/* 800A6AC4 000A3A04 80 63 00 14 */ lwz r3, 0x14(r3) +/* 800A6AC8 000A3A08 54 63 04 E0 */ rlwinm r3, r3, 0, 0x13, 0x10 +/* 800A6ACC 000A3A0C 7C 60 03 78 */ or r0, r3, r0 +/* 800A6AD0 000A3A10 90 04 00 00 */ stw r0, 0(r4) +/* 800A6AD4 000A3A14 48 00 01 18 */ b lbl_800A6BEC +lbl_800A6AD8: +/* 800A6AD8 000A3A18 80 6D 82 C8 */ lwz r3, gx@sda21(r13) +/* 800A6ADC 000A3A1C 54 80 78 20 */ slwi r0, r4, 0xf +/* 800A6AE0 000A3A20 38 83 00 14 */ addi r4, r3, 0x14 +/* 800A6AE4 000A3A24 80 63 00 14 */ lwz r3, 0x14(r3) +/* 800A6AE8 000A3A28 54 63 04 5C */ rlwinm r3, r3, 0, 0x11, 0xe +/* 800A6AEC 000A3A2C 7C 60 03 78 */ or r0, r3, r0 +/* 800A6AF0 000A3A30 90 04 00 00 */ stw r0, 0(r4) +/* 800A6AF4 000A3A34 48 00 00 F8 */ b lbl_800A6BEC +lbl_800A6AF8: +/* 800A6AF8 000A3A38 80 6D 82 C8 */ lwz r3, gx@sda21(r13) +/* 800A6AFC 000A3A3C 84 03 00 18 */ lwzu r0, 0x18(r3) +/* 800A6B00 000A3A40 54 00 00 3A */ rlwinm r0, r0, 0, 0, 0x1d +/* 800A6B04 000A3A44 7C 00 23 78 */ or r0, r0, r4 +/* 800A6B08 000A3A48 90 03 00 00 */ stw r0, 0(r3) +/* 800A6B0C 000A3A4C 48 00 00 E0 */ b lbl_800A6BEC +lbl_800A6B10: +/* 800A6B10 000A3A50 80 6D 82 C8 */ lwz r3, gx@sda21(r13) +/* 800A6B14 000A3A54 54 80 10 3A */ slwi r0, r4, 2 +/* 800A6B18 000A3A58 38 83 00 18 */ addi r4, r3, 0x18 +/* 800A6B1C 000A3A5C 80 63 00 18 */ lwz r3, 0x18(r3) +/* 800A6B20 000A3A60 54 63 07 B6 */ rlwinm r3, r3, 0, 0x1e, 0x1b +/* 800A6B24 000A3A64 7C 60 03 78 */ or r0, r3, r0 +/* 800A6B28 000A3A68 90 04 00 00 */ stw r0, 0(r4) +/* 800A6B2C 000A3A6C 48 00 00 C0 */ b lbl_800A6BEC +lbl_800A6B30: +/* 800A6B30 000A3A70 80 6D 82 C8 */ lwz r3, gx@sda21(r13) +/* 800A6B34 000A3A74 54 80 20 36 */ slwi r0, r4, 4 +/* 800A6B38 000A3A78 38 83 00 18 */ addi r4, r3, 0x18 +/* 800A6B3C 000A3A7C 80 63 00 18 */ lwz r3, 0x18(r3) +/* 800A6B40 000A3A80 54 63 07 32 */ rlwinm r3, r3, 0, 0x1c, 0x19 +/* 800A6B44 000A3A84 7C 60 03 78 */ or r0, r3, r0 +/* 800A6B48 000A3A88 90 04 00 00 */ stw r0, 0(r4) +/* 800A6B4C 000A3A8C 48 00 00 A0 */ b lbl_800A6BEC +lbl_800A6B50: +/* 800A6B50 000A3A90 80 6D 82 C8 */ lwz r3, gx@sda21(r13) +/* 800A6B54 000A3A94 54 80 30 32 */ slwi r0, r4, 6 +/* 800A6B58 000A3A98 38 83 00 18 */ addi r4, r3, 0x18 +/* 800A6B5C 000A3A9C 80 63 00 18 */ lwz r3, 0x18(r3) +/* 800A6B60 000A3AA0 54 63 06 AE */ rlwinm r3, r3, 0, 0x1a, 0x17 +/* 800A6B64 000A3AA4 7C 60 03 78 */ or r0, r3, r0 +/* 800A6B68 000A3AA8 90 04 00 00 */ stw r0, 0(r4) +/* 800A6B6C 000A3AAC 48 00 00 80 */ b lbl_800A6BEC +lbl_800A6B70: +/* 800A6B70 000A3AB0 80 6D 82 C8 */ lwz r3, gx@sda21(r13) +/* 800A6B74 000A3AB4 54 80 40 2E */ slwi r0, r4, 8 +/* 800A6B78 000A3AB8 38 83 00 18 */ addi r4, r3, 0x18 +/* 800A6B7C 000A3ABC 80 63 00 18 */ lwz r3, 0x18(r3) +/* 800A6B80 000A3AC0 54 63 06 2A */ rlwinm r3, r3, 0, 0x18, 0x15 +/* 800A6B84 000A3AC4 7C 60 03 78 */ or r0, r3, r0 +/* 800A6B88 000A3AC8 90 04 00 00 */ stw r0, 0(r4) +/* 800A6B8C 000A3ACC 48 00 00 60 */ b lbl_800A6BEC +lbl_800A6B90: +/* 800A6B90 000A3AD0 80 6D 82 C8 */ lwz r3, gx@sda21(r13) +/* 800A6B94 000A3AD4 54 80 50 2A */ slwi r0, r4, 0xa +/* 800A6B98 000A3AD8 38 83 00 18 */ addi r4, r3, 0x18 +/* 800A6B9C 000A3ADC 80 63 00 18 */ lwz r3, 0x18(r3) +/* 800A6BA0 000A3AE0 54 63 05 A6 */ rlwinm r3, r3, 0, 0x16, 0x13 +/* 800A6BA4 000A3AE4 7C 60 03 78 */ or r0, r3, r0 +/* 800A6BA8 000A3AE8 90 04 00 00 */ stw r0, 0(r4) +/* 800A6BAC 000A3AEC 48 00 00 40 */ b lbl_800A6BEC +lbl_800A6BB0: +/* 800A6BB0 000A3AF0 80 6D 82 C8 */ lwz r3, gx@sda21(r13) +/* 800A6BB4 000A3AF4 54 80 60 26 */ slwi r0, r4, 0xc +/* 800A6BB8 000A3AF8 38 83 00 18 */ addi r4, r3, 0x18 +/* 800A6BBC 000A3AFC 80 63 00 18 */ lwz r3, 0x18(r3) +/* 800A6BC0 000A3B00 54 63 05 22 */ rlwinm r3, r3, 0, 0x14, 0x11 +/* 800A6BC4 000A3B04 7C 60 03 78 */ or r0, r3, r0 +/* 800A6BC8 000A3B08 90 04 00 00 */ stw r0, 0(r4) +/* 800A6BCC 000A3B0C 48 00 00 20 */ b lbl_800A6BEC +lbl_800A6BD0: +/* 800A6BD0 000A3B10 80 6D 82 C8 */ lwz r3, gx@sda21(r13) +/* 800A6BD4 000A3B14 54 80 70 22 */ slwi r0, r4, 0xe +/* 800A6BD8 000A3B18 38 83 00 18 */ addi r4, r3, 0x18 +/* 800A6BDC 000A3B1C 80 63 00 18 */ lwz r3, 0x18(r3) +/* 800A6BE0 000A3B20 54 63 04 9E */ rlwinm r3, r3, 0, 0x12, 0xf +/* 800A6BE4 000A3B24 7C 60 03 78 */ or r0, r3, r0 +/* 800A6BE8 000A3B28 90 04 00 00 */ stw r0, 0(r4) +lbl_800A6BEC: +/* 800A6BEC 000A3B2C 80 6D 82 C8 */ lwz r3, gx@sda21(r13) +/* 800A6BF0 000A3B30 88 03 04 1C */ lbz r0, 0x41c(r3) +/* 800A6BF4 000A3B34 28 00 00 00 */ cmplwi r0, 0 +/* 800A6BF8 000A3B38 40 82 00 10 */ bne lbl_800A6C08 +/* 800A6BFC 000A3B3C 88 03 04 1D */ lbz r0, 0x41d(r3) +/* 800A6C00 000A3B40 28 00 00 00 */ cmplwi r0, 0 +/* 800A6C04 000A3B44 41 82 00 24 */ beq lbl_800A6C28 +lbl_800A6C08: +/* 800A6C08 000A3B48 38 83 00 14 */ addi r4, r3, 0x14 +/* 800A6C0C 000A3B4C 80 03 04 18 */ lwz r0, 0x418(r3) +/* 800A6C10 000A3B50 80 63 00 14 */ lwz r3, 0x14(r3) +/* 800A6C14 000A3B54 54 00 58 28 */ slwi r0, r0, 0xb +/* 800A6C18 000A3B58 54 63 05 64 */ rlwinm r3, r3, 0, 0x15, 0x12 +/* 800A6C1C 000A3B5C 7C 60 03 78 */ or r0, r3, r0 +/* 800A6C20 000A3B60 90 04 00 00 */ stw r0, 0(r4) +/* 800A6C24 000A3B64 48 00 00 10 */ b lbl_800A6C34 +lbl_800A6C28: +/* 800A6C28 000A3B68 84 03 00 14 */ lwzu r0, 0x14(r3) +/* 800A6C2C 000A3B6C 54 00 05 64 */ rlwinm r0, r0, 0, 0x15, 0x12 +/* 800A6C30 000A3B70 90 03 00 00 */ stw r0, 0(r3) +lbl_800A6C34: +/* 800A6C34 000A3B74 80 6D 82 C8 */ lwz r3, gx@sda21(r13) +/* 800A6C38 000A3B78 80 03 04 F4 */ lwz r0, 0x4f4(r3) +/* 800A6C3C 000A3B7C 60 00 00 08 */ ori r0, r0, 8 +/* 800A6C40 000A3B80 90 03 04 F4 */ stw r0, 0x4f4(r3) +/* 800A6C44 000A3B84 4E 80 00 20 */ blr + +.global GXSetVtxDescv +GXSetVtxDescv: +/* 800A6C48 000A3B88 3C 80 80 3B */ lis r4, "@189"@ha +/* 800A6C4C 000A3B8C 38 84 15 A8 */ addi r4, r4, "@189"@l +/* 800A6C50 000A3B90 48 00 03 14 */ b lbl_800A6F64 +lbl_800A6C54: +/* 800A6C54 000A3B94 80 A3 00 00 */ lwz r5, 0(r3) +/* 800A6C58 000A3B98 80 03 00 04 */ lwz r0, 4(r3) +/* 800A6C5C 000A3B9C 28 05 00 19 */ cmplwi r5, 0x19 +/* 800A6C60 000A3BA0 41 81 03 00 */ bgt lbl_800A6F60 +/* 800A6C64 000A3BA4 54 A5 10 3A */ slwi r5, r5, 2 +/* 800A6C68 000A3BA8 7C A4 28 2E */ lwzx r5, r4, r5 +/* 800A6C6C 000A3BAC 7C A9 03 A6 */ mtctr r5 +/* 800A6C70 000A3BB0 4E 80 04 20 */ bctr +lbl_800A6C74: +/* 800A6C74 000A3BB4 80 AD 82 C8 */ lwz r5, gx@sda21(r13) +/* 800A6C78 000A3BB8 38 C5 00 14 */ addi r6, r5, 0x14 +/* 800A6C7C 000A3BBC 80 A5 00 14 */ lwz r5, 0x14(r5) +/* 800A6C80 000A3BC0 54 A5 00 3C */ rlwinm r5, r5, 0, 0, 0x1e +/* 800A6C84 000A3BC4 7C A0 03 78 */ or r0, r5, r0 +/* 800A6C88 000A3BC8 90 06 00 00 */ stw r0, 0(r6) +/* 800A6C8C 000A3BCC 48 00 02 D4 */ b lbl_800A6F60 +lbl_800A6C90: +/* 800A6C90 000A3BD0 80 AD 82 C8 */ lwz r5, gx@sda21(r13) +/* 800A6C94 000A3BD4 54 00 08 3C */ slwi r0, r0, 1 +/* 800A6C98 000A3BD8 38 C5 00 14 */ addi r6, r5, 0x14 +/* 800A6C9C 000A3BDC 80 A5 00 14 */ lwz r5, 0x14(r5) +/* 800A6CA0 000A3BE0 54 A5 07 FA */ rlwinm r5, r5, 0, 0x1f, 0x1d +/* 800A6CA4 000A3BE4 7C A0 03 78 */ or r0, r5, r0 +/* 800A6CA8 000A3BE8 90 06 00 00 */ stw r0, 0(r6) +/* 800A6CAC 000A3BEC 48 00 02 B4 */ b lbl_800A6F60 +lbl_800A6CB0: +/* 800A6CB0 000A3BF0 80 AD 82 C8 */ lwz r5, gx@sda21(r13) +/* 800A6CB4 000A3BF4 54 00 10 3A */ slwi r0, r0, 2 +/* 800A6CB8 000A3BF8 38 C5 00 14 */ addi r6, r5, 0x14 +/* 800A6CBC 000A3BFC 80 A5 00 14 */ lwz r5, 0x14(r5) +/* 800A6CC0 000A3C00 54 A5 07 B8 */ rlwinm r5, r5, 0, 0x1e, 0x1c +/* 800A6CC4 000A3C04 7C A0 03 78 */ or r0, r5, r0 +/* 800A6CC8 000A3C08 90 06 00 00 */ stw r0, 0(r6) +/* 800A6CCC 000A3C0C 48 00 02 94 */ b lbl_800A6F60 +lbl_800A6CD0: +/* 800A6CD0 000A3C10 80 AD 82 C8 */ lwz r5, gx@sda21(r13) +/* 800A6CD4 000A3C14 54 00 18 38 */ slwi r0, r0, 3 +/* 800A6CD8 000A3C18 38 C5 00 14 */ addi r6, r5, 0x14 +/* 800A6CDC 000A3C1C 80 A5 00 14 */ lwz r5, 0x14(r5) +/* 800A6CE0 000A3C20 54 A5 07 76 */ rlwinm r5, r5, 0, 0x1d, 0x1b +/* 800A6CE4 000A3C24 7C A0 03 78 */ or r0, r5, r0 +/* 800A6CE8 000A3C28 90 06 00 00 */ stw r0, 0(r6) +/* 800A6CEC 000A3C2C 48 00 02 74 */ b lbl_800A6F60 +lbl_800A6CF0: +/* 800A6CF0 000A3C30 80 AD 82 C8 */ lwz r5, gx@sda21(r13) +/* 800A6CF4 000A3C34 54 00 20 36 */ slwi r0, r0, 4 +/* 800A6CF8 000A3C38 38 C5 00 14 */ addi r6, r5, 0x14 +/* 800A6CFC 000A3C3C 80 A5 00 14 */ lwz r5, 0x14(r5) +/* 800A6D00 000A3C40 54 A5 07 34 */ rlwinm r5, r5, 0, 0x1c, 0x1a +/* 800A6D04 000A3C44 7C A0 03 78 */ or r0, r5, r0 +/* 800A6D08 000A3C48 90 06 00 00 */ stw r0, 0(r6) +/* 800A6D0C 000A3C4C 48 00 02 54 */ b lbl_800A6F60 +lbl_800A6D10: +/* 800A6D10 000A3C50 80 AD 82 C8 */ lwz r5, gx@sda21(r13) +/* 800A6D14 000A3C54 54 00 28 34 */ slwi r0, r0, 5 +/* 800A6D18 000A3C58 38 C5 00 14 */ addi r6, r5, 0x14 +/* 800A6D1C 000A3C5C 80 A5 00 14 */ lwz r5, 0x14(r5) +/* 800A6D20 000A3C60 54 A5 06 F2 */ rlwinm r5, r5, 0, 0x1b, 0x19 +/* 800A6D24 000A3C64 7C A0 03 78 */ or r0, r5, r0 +/* 800A6D28 000A3C68 90 06 00 00 */ stw r0, 0(r6) +/* 800A6D2C 000A3C6C 48 00 02 34 */ b lbl_800A6F60 +lbl_800A6D30: +/* 800A6D30 000A3C70 80 AD 82 C8 */ lwz r5, gx@sda21(r13) +/* 800A6D34 000A3C74 54 00 30 32 */ slwi r0, r0, 6 +/* 800A6D38 000A3C78 38 C5 00 14 */ addi r6, r5, 0x14 +/* 800A6D3C 000A3C7C 80 A5 00 14 */ lwz r5, 0x14(r5) +/* 800A6D40 000A3C80 54 A5 06 B0 */ rlwinm r5, r5, 0, 0x1a, 0x18 +/* 800A6D44 000A3C84 7C A0 03 78 */ or r0, r5, r0 +/* 800A6D48 000A3C88 90 06 00 00 */ stw r0, 0(r6) +/* 800A6D4C 000A3C8C 48 00 02 14 */ b lbl_800A6F60 +lbl_800A6D50: +/* 800A6D50 000A3C90 80 AD 82 C8 */ lwz r5, gx@sda21(r13) +/* 800A6D54 000A3C94 54 00 38 30 */ slwi r0, r0, 7 +/* 800A6D58 000A3C98 38 C5 00 14 */ addi r6, r5, 0x14 +/* 800A6D5C 000A3C9C 80 A5 00 14 */ lwz r5, 0x14(r5) +/* 800A6D60 000A3CA0 54 A5 06 6E */ rlwinm r5, r5, 0, 0x19, 0x17 +/* 800A6D64 000A3CA4 7C A0 03 78 */ or r0, r5, r0 +/* 800A6D68 000A3CA8 90 06 00 00 */ stw r0, 0(r6) +/* 800A6D6C 000A3CAC 48 00 01 F4 */ b lbl_800A6F60 +lbl_800A6D70: +/* 800A6D70 000A3CB0 80 AD 82 C8 */ lwz r5, gx@sda21(r13) +/* 800A6D74 000A3CB4 54 00 40 2E */ slwi r0, r0, 8 +/* 800A6D78 000A3CB8 38 C5 00 14 */ addi r6, r5, 0x14 +/* 800A6D7C 000A3CBC 80 A5 00 14 */ lwz r5, 0x14(r5) +/* 800A6D80 000A3CC0 54 A5 06 2C */ rlwinm r5, r5, 0, 0x18, 0x16 +/* 800A6D84 000A3CC4 7C A0 03 78 */ or r0, r5, r0 +/* 800A6D88 000A3CC8 90 06 00 00 */ stw r0, 0(r6) +/* 800A6D8C 000A3CCC 48 00 01 D4 */ b lbl_800A6F60 +lbl_800A6D90: +/* 800A6D90 000A3CD0 80 AD 82 C8 */ lwz r5, gx@sda21(r13) +/* 800A6D94 000A3CD4 54 00 48 2C */ slwi r0, r0, 9 +/* 800A6D98 000A3CD8 38 C5 00 14 */ addi r6, r5, 0x14 +/* 800A6D9C 000A3CDC 80 A5 00 14 */ lwz r5, 0x14(r5) +/* 800A6DA0 000A3CE0 54 A5 05 E8 */ rlwinm r5, r5, 0, 0x17, 0x14 +/* 800A6DA4 000A3CE4 7C A0 03 78 */ or r0, r5, r0 +/* 800A6DA8 000A3CE8 90 06 00 00 */ stw r0, 0(r6) +/* 800A6DAC 000A3CEC 48 00 01 B4 */ b lbl_800A6F60 +lbl_800A6DB0: +/* 800A6DB0 000A3CF0 2C 00 00 00 */ cmpwi r0, 0 +/* 800A6DB4 000A3CF4 41 82 00 28 */ beq lbl_800A6DDC +/* 800A6DB8 000A3CF8 80 AD 82 C8 */ lwz r5, gx@sda21(r13) +/* 800A6DBC 000A3CFC 38 E0 00 01 */ li r7, 1 +/* 800A6DC0 000A3D00 38 C0 00 00 */ li r6, 0 +/* 800A6DC4 000A3D04 98 E5 04 1C */ stb r7, 0x41c(r5) +/* 800A6DC8 000A3D08 80 AD 82 C8 */ lwz r5, gx@sda21(r13) +/* 800A6DCC 000A3D0C 98 C5 04 1D */ stb r6, 0x41d(r5) +/* 800A6DD0 000A3D10 80 AD 82 C8 */ lwz r5, gx@sda21(r13) +/* 800A6DD4 000A3D14 90 05 04 18 */ stw r0, 0x418(r5) +/* 800A6DD8 000A3D18 48 00 01 88 */ b lbl_800A6F60 +lbl_800A6DDC: +/* 800A6DDC 000A3D1C 80 AD 82 C8 */ lwz r5, gx@sda21(r13) +/* 800A6DE0 000A3D20 38 00 00 00 */ li r0, 0 +/* 800A6DE4 000A3D24 98 05 04 1C */ stb r0, 0x41c(r5) +/* 800A6DE8 000A3D28 48 00 01 78 */ b lbl_800A6F60 +lbl_800A6DEC: +/* 800A6DEC 000A3D2C 2C 00 00 00 */ cmpwi r0, 0 +/* 800A6DF0 000A3D30 41 82 00 28 */ beq lbl_800A6E18 +/* 800A6DF4 000A3D34 80 AD 82 C8 */ lwz r5, gx@sda21(r13) +/* 800A6DF8 000A3D38 38 E0 00 01 */ li r7, 1 +/* 800A6DFC 000A3D3C 38 C0 00 00 */ li r6, 0 +/* 800A6E00 000A3D40 98 E5 04 1D */ stb r7, 0x41d(r5) +/* 800A6E04 000A3D44 80 AD 82 C8 */ lwz r5, gx@sda21(r13) +/* 800A6E08 000A3D48 98 C5 04 1C */ stb r6, 0x41c(r5) +/* 800A6E0C 000A3D4C 80 AD 82 C8 */ lwz r5, gx@sda21(r13) +/* 800A6E10 000A3D50 90 05 04 18 */ stw r0, 0x418(r5) +/* 800A6E14 000A3D54 48 00 01 4C */ b lbl_800A6F60 +lbl_800A6E18: +/* 800A6E18 000A3D58 80 AD 82 C8 */ lwz r5, gx@sda21(r13) +/* 800A6E1C 000A3D5C 38 00 00 00 */ li r0, 0 +/* 800A6E20 000A3D60 98 05 04 1D */ stb r0, 0x41d(r5) +/* 800A6E24 000A3D64 48 00 01 3C */ b lbl_800A6F60 +lbl_800A6E28: +/* 800A6E28 000A3D68 80 AD 82 C8 */ lwz r5, gx@sda21(r13) +/* 800A6E2C 000A3D6C 54 00 68 24 */ slwi r0, r0, 0xd +/* 800A6E30 000A3D70 38 C5 00 14 */ addi r6, r5, 0x14 +/* 800A6E34 000A3D74 80 A5 00 14 */ lwz r5, 0x14(r5) +/* 800A6E38 000A3D78 54 A5 04 E0 */ rlwinm r5, r5, 0, 0x13, 0x10 +/* 800A6E3C 000A3D7C 7C A0 03 78 */ or r0, r5, r0 +/* 800A6E40 000A3D80 90 06 00 00 */ stw r0, 0(r6) +/* 800A6E44 000A3D84 48 00 01 1C */ b lbl_800A6F60 +lbl_800A6E48: +/* 800A6E48 000A3D88 80 AD 82 C8 */ lwz r5, gx@sda21(r13) +/* 800A6E4C 000A3D8C 54 00 78 20 */ slwi r0, r0, 0xf +/* 800A6E50 000A3D90 38 C5 00 14 */ addi r6, r5, 0x14 +/* 800A6E54 000A3D94 80 A5 00 14 */ lwz r5, 0x14(r5) +/* 800A6E58 000A3D98 54 A5 04 5C */ rlwinm r5, r5, 0, 0x11, 0xe +/* 800A6E5C 000A3D9C 7C A0 03 78 */ or r0, r5, r0 +/* 800A6E60 000A3DA0 90 06 00 00 */ stw r0, 0(r6) +/* 800A6E64 000A3DA4 48 00 00 FC */ b lbl_800A6F60 +lbl_800A6E68: +/* 800A6E68 000A3DA8 80 AD 82 C8 */ lwz r5, gx@sda21(r13) +/* 800A6E6C 000A3DAC 38 C5 00 18 */ addi r6, r5, 0x18 +/* 800A6E70 000A3DB0 80 A5 00 18 */ lwz r5, 0x18(r5) +/* 800A6E74 000A3DB4 54 A5 00 3A */ rlwinm r5, r5, 0, 0, 0x1d +/* 800A6E78 000A3DB8 7C A0 03 78 */ or r0, r5, r0 +/* 800A6E7C 000A3DBC 90 06 00 00 */ stw r0, 0(r6) +/* 800A6E80 000A3DC0 48 00 00 E0 */ b lbl_800A6F60 +lbl_800A6E84: +/* 800A6E84 000A3DC4 80 AD 82 C8 */ lwz r5, gx@sda21(r13) +/* 800A6E88 000A3DC8 54 00 10 3A */ slwi r0, r0, 2 +/* 800A6E8C 000A3DCC 38 C5 00 18 */ addi r6, r5, 0x18 +/* 800A6E90 000A3DD0 80 A5 00 18 */ lwz r5, 0x18(r5) +/* 800A6E94 000A3DD4 54 A5 07 B6 */ rlwinm r5, r5, 0, 0x1e, 0x1b +/* 800A6E98 000A3DD8 7C A0 03 78 */ or r0, r5, r0 +/* 800A6E9C 000A3DDC 90 06 00 00 */ stw r0, 0(r6) +/* 800A6EA0 000A3DE0 48 00 00 C0 */ b lbl_800A6F60 +lbl_800A6EA4: +/* 800A6EA4 000A3DE4 80 AD 82 C8 */ lwz r5, gx@sda21(r13) +/* 800A6EA8 000A3DE8 54 00 20 36 */ slwi r0, r0, 4 +/* 800A6EAC 000A3DEC 38 C5 00 18 */ addi r6, r5, 0x18 +/* 800A6EB0 000A3DF0 80 A5 00 18 */ lwz r5, 0x18(r5) +/* 800A6EB4 000A3DF4 54 A5 07 32 */ rlwinm r5, r5, 0, 0x1c, 0x19 +/* 800A6EB8 000A3DF8 7C A0 03 78 */ or r0, r5, r0 +/* 800A6EBC 000A3DFC 90 06 00 00 */ stw r0, 0(r6) +/* 800A6EC0 000A3E00 48 00 00 A0 */ b lbl_800A6F60 +lbl_800A6EC4: +/* 800A6EC4 000A3E04 80 AD 82 C8 */ lwz r5, gx@sda21(r13) +/* 800A6EC8 000A3E08 54 00 30 32 */ slwi r0, r0, 6 +/* 800A6ECC 000A3E0C 38 C5 00 18 */ addi r6, r5, 0x18 +/* 800A6ED0 000A3E10 80 A5 00 18 */ lwz r5, 0x18(r5) +/* 800A6ED4 000A3E14 54 A5 06 AE */ rlwinm r5, r5, 0, 0x1a, 0x17 +/* 800A6ED8 000A3E18 7C A0 03 78 */ or r0, r5, r0 +/* 800A6EDC 000A3E1C 90 06 00 00 */ stw r0, 0(r6) +/* 800A6EE0 000A3E20 48 00 00 80 */ b lbl_800A6F60 +lbl_800A6EE4: +/* 800A6EE4 000A3E24 80 AD 82 C8 */ lwz r5, gx@sda21(r13) +/* 800A6EE8 000A3E28 54 00 40 2E */ slwi r0, r0, 8 +/* 800A6EEC 000A3E2C 38 C5 00 18 */ addi r6, r5, 0x18 +/* 800A6EF0 000A3E30 80 A5 00 18 */ lwz r5, 0x18(r5) +/* 800A6EF4 000A3E34 54 A5 06 2A */ rlwinm r5, r5, 0, 0x18, 0x15 +/* 800A6EF8 000A3E38 7C A0 03 78 */ or r0, r5, r0 +/* 800A6EFC 000A3E3C 90 06 00 00 */ stw r0, 0(r6) +/* 800A6F00 000A3E40 48 00 00 60 */ b lbl_800A6F60 +lbl_800A6F04: +/* 800A6F04 000A3E44 80 AD 82 C8 */ lwz r5, gx@sda21(r13) +/* 800A6F08 000A3E48 54 00 50 2A */ slwi r0, r0, 0xa +/* 800A6F0C 000A3E4C 38 C5 00 18 */ addi r6, r5, 0x18 +/* 800A6F10 000A3E50 80 A5 00 18 */ lwz r5, 0x18(r5) +/* 800A6F14 000A3E54 54 A5 05 A6 */ rlwinm r5, r5, 0, 0x16, 0x13 +/* 800A6F18 000A3E58 7C A0 03 78 */ or r0, r5, r0 +/* 800A6F1C 000A3E5C 90 06 00 00 */ stw r0, 0(r6) +/* 800A6F20 000A3E60 48 00 00 40 */ b lbl_800A6F60 +lbl_800A6F24: +/* 800A6F24 000A3E64 80 AD 82 C8 */ lwz r5, gx@sda21(r13) +/* 800A6F28 000A3E68 54 00 60 26 */ slwi r0, r0, 0xc +/* 800A6F2C 000A3E6C 38 C5 00 18 */ addi r6, r5, 0x18 +/* 800A6F30 000A3E70 80 A5 00 18 */ lwz r5, 0x18(r5) +/* 800A6F34 000A3E74 54 A5 05 22 */ rlwinm r5, r5, 0, 0x14, 0x11 +/* 800A6F38 000A3E78 7C A0 03 78 */ or r0, r5, r0 +/* 800A6F3C 000A3E7C 90 06 00 00 */ stw r0, 0(r6) +/* 800A6F40 000A3E80 48 00 00 20 */ b lbl_800A6F60 +lbl_800A6F44: +/* 800A6F44 000A3E84 80 AD 82 C8 */ lwz r5, gx@sda21(r13) +/* 800A6F48 000A3E88 54 00 70 22 */ slwi r0, r0, 0xe +/* 800A6F4C 000A3E8C 38 C5 00 18 */ addi r6, r5, 0x18 +/* 800A6F50 000A3E90 80 A5 00 18 */ lwz r5, 0x18(r5) +/* 800A6F54 000A3E94 54 A5 04 9E */ rlwinm r5, r5, 0, 0x12, 0xf +/* 800A6F58 000A3E98 7C A0 03 78 */ or r0, r5, r0 +/* 800A6F5C 000A3E9C 90 06 00 00 */ stw r0, 0(r6) +lbl_800A6F60: +/* 800A6F60 000A3EA0 38 63 00 08 */ addi r3, r3, 8 +lbl_800A6F64: +/* 800A6F64 000A3EA4 80 03 00 00 */ lwz r0, 0(r3) +/* 800A6F68 000A3EA8 2C 00 00 FF */ cmpwi r0, 0xff +/* 800A6F6C 000A3EAC 40 82 FC E8 */ bne lbl_800A6C54 +/* 800A6F70 000A3EB0 80 6D 82 C8 */ lwz r3, gx@sda21(r13) +/* 800A6F74 000A3EB4 88 03 04 1C */ lbz r0, 0x41c(r3) +/* 800A6F78 000A3EB8 28 00 00 00 */ cmplwi r0, 0 +/* 800A6F7C 000A3EBC 40 82 00 10 */ bne lbl_800A6F8C +/* 800A6F80 000A3EC0 88 03 04 1D */ lbz r0, 0x41d(r3) +/* 800A6F84 000A3EC4 28 00 00 00 */ cmplwi r0, 0 +/* 800A6F88 000A3EC8 41 82 00 24 */ beq lbl_800A6FAC +lbl_800A6F8C: +/* 800A6F8C 000A3ECC 38 83 00 14 */ addi r4, r3, 0x14 +/* 800A6F90 000A3ED0 80 03 04 18 */ lwz r0, 0x418(r3) +/* 800A6F94 000A3ED4 80 63 00 14 */ lwz r3, 0x14(r3) +/* 800A6F98 000A3ED8 54 00 58 28 */ slwi r0, r0, 0xb +/* 800A6F9C 000A3EDC 54 63 05 64 */ rlwinm r3, r3, 0, 0x15, 0x12 +/* 800A6FA0 000A3EE0 7C 60 03 78 */ or r0, r3, r0 +/* 800A6FA4 000A3EE4 90 04 00 00 */ stw r0, 0(r4) +/* 800A6FA8 000A3EE8 48 00 00 10 */ b lbl_800A6FB8 +lbl_800A6FAC: +/* 800A6FAC 000A3EEC 84 03 00 14 */ lwzu r0, 0x14(r3) +/* 800A6FB0 000A3EF0 54 00 05 64 */ rlwinm r0, r0, 0, 0x15, 0x12 +/* 800A6FB4 000A3EF4 90 03 00 00 */ stw r0, 0(r3) +lbl_800A6FB8: +/* 800A6FB8 000A3EF8 80 6D 82 C8 */ lwz r3, gx@sda21(r13) +/* 800A6FBC 000A3EFC 80 03 04 F4 */ lwz r0, 0x4f4(r3) +/* 800A6FC0 000A3F00 60 00 00 08 */ ori r0, r0, 8 +/* 800A6FC4 000A3F04 90 03 04 F4 */ stw r0, 0x4f4(r3) +/* 800A6FC8 000A3F08 4E 80 00 20 */ blr + +.global __GXSetVCD +__GXSetVCD: +/* 800A6FCC 000A3F0C 7C 08 02 A6 */ mflr r0 +/* 800A6FD0 000A3F10 38 C0 00 08 */ li r6, 8 +/* 800A6FD4 000A3F14 90 01 00 04 */ stw r0, 4(r1) +/* 800A6FD8 000A3F18 3C A0 CC 01 */ lis r5, 0xCC008000@ha +/* 800A6FDC 000A3F1C 38 60 00 50 */ li r3, 0x50 +/* 800A6FE0 000A3F20 94 21 FF F8 */ stwu r1, -8(r1) +/* 800A6FE4 000A3F24 38 00 00 60 */ li r0, 0x60 +/* 800A6FE8 000A3F28 98 C5 80 00 */ stb r6, 0xCC008000@l(r5) +/* 800A6FEC 000A3F2C 80 8D 82 C8 */ lwz r4, gx@sda21(r13) +/* 800A6FF0 000A3F30 98 65 80 00 */ stb r3, -0x8000(r5) +/* 800A6FF4 000A3F34 80 64 00 14 */ lwz r3, 0x14(r4) +/* 800A6FF8 000A3F38 90 65 80 00 */ stw r3, -0x8000(r5) +/* 800A6FFC 000A3F3C 98 C5 80 00 */ stb r6, -0x8000(r5) +/* 800A7000 000A3F40 98 05 80 00 */ stb r0, -0x8000(r5) +/* 800A7004 000A3F44 80 04 00 18 */ lwz r0, 0x18(r4) +/* 800A7008 000A3F48 90 05 80 00 */ stw r0, -0x8000(r5) +/* 800A700C 000A3F4C 4B FF F7 85 */ bl __GXXfVtxSpecs +/* 800A7010 000A3F50 80 01 00 0C */ lwz r0, 0xc(r1) +/* 800A7014 000A3F54 38 21 00 08 */ addi r1, r1, 8 +/* 800A7018 000A3F58 7C 08 03 A6 */ mtlr r0 +/* 800A701C 000A3F5C 4E 80 00 20 */ blr + +.global __GXCalculateVLim +__GXCalculateVLim: +/* 800A7020 000A3F60 80 6D 82 C8 */ lwz r3, gx@sda21(r13) +/* 800A7024 000A3F64 A0 03 00 04 */ lhz r0, 4(r3) +/* 800A7028 000A3F68 28 00 00 00 */ cmplwi r0, 0 +/* 800A702C 000A3F6C 4D 82 00 20 */ beqlr +/* 800A7030 000A3F70 81 23 00 14 */ lwz r9, 0x14(r3) +/* 800A7034 000A3F74 38 AD 82 D8 */ addi r5, r13, tbl3$217@sda21 +/* 800A7038 000A3F78 81 03 00 1C */ lwz r8, 0x1c(r3) +/* 800A703C 000A3F7C 55 20 07 FE */ clrlwi r0, r9, 0x1f +/* 800A7040 000A3F80 80 83 00 18 */ lwz r4, 0x18(r3) +/* 800A7044 000A3F84 55 26 FF FE */ rlwinm r6, r9, 0x1f, 0x1f, 0x1f +/* 800A7048 000A3F88 7C 00 32 14 */ add r0, r0, r6 +/* 800A704C 000A3F8C 55 26 F7 FE */ rlwinm r6, r9, 0x1e, 0x1f, 0x1f +/* 800A7050 000A3F90 7C 00 32 14 */ add r0, r0, r6 +/* 800A7054 000A3F94 55 27 EF FE */ rlwinm r7, r9, 0x1d, 0x1f, 0x1f +/* 800A7058 000A3F98 55 26 BF BE */ rlwinm r6, r9, 0x17, 0x1e, 0x1f +/* 800A705C 000A3F9C 7C A5 30 AE */ lbzx r5, r5, r6 +/* 800A7060 000A3FA0 55 08 BF FE */ rlwinm r8, r8, 0x17, 0x1f, 0x1f +/* 800A7064 000A3FA4 7C 00 3A 14 */ add r0, r0, r7 +/* 800A7068 000A3FA8 55 26 E7 FE */ rlwinm r6, r9, 0x1c, 0x1f, 0x1f +/* 800A706C 000A3FAC 7C 00 32 14 */ add r0, r0, r6 +/* 800A7070 000A3FB0 55 26 DF FE */ rlwinm r6, r9, 0x1b, 0x1f, 0x1f +/* 800A7074 000A3FB4 7C 00 32 14 */ add r0, r0, r6 +/* 800A7078 000A3FB8 55 26 D7 FE */ rlwinm r6, r9, 0x1a, 0x1f, 0x1f +/* 800A707C 000A3FBC 7C 00 32 14 */ add r0, r0, r6 +/* 800A7080 000A3FC0 55 26 CF FE */ rlwinm r6, r9, 0x19, 0x1f, 0x1f +/* 800A7084 000A3FC4 7C 00 32 14 */ add r0, r0, r6 +/* 800A7088 000A3FC8 55 26 C7 FE */ rlwinm r6, r9, 0x18, 0x1f, 0x1f +/* 800A708C 000A3FCC 7C 00 32 14 */ add r0, r0, r6 +/* 800A7090 000A3FD0 2C 08 00 01 */ cmpwi r8, 1 +/* 800A7094 000A3FD4 7C 00 2A 14 */ add r0, r0, r5 +/* 800A7098 000A3FD8 40 82 00 0C */ bne lbl_800A70A4 +/* 800A709C 000A3FDC 39 00 00 03 */ li r8, 3 +/* 800A70A0 000A3FE0 48 00 00 08 */ b lbl_800A70A8 +lbl_800A70A4: +/* 800A70A4 000A3FE4 39 00 00 01 */ li r8, 1 +lbl_800A70A8: +/* 800A70A8 000A3FE8 55 26 AF BE */ rlwinm r6, r9, 0x15, 0x1e, 0x1f +/* 800A70AC 000A3FEC 38 AD 82 D8 */ addi r5, r13, tbl3$217@sda21 +/* 800A70B0 000A3FF0 7C C5 30 AE */ lbzx r6, r5, r6 +/* 800A70B4 000A3FF4 55 25 9F BE */ rlwinm r5, r9, 0x13, 0x1e, 0x1f +/* 800A70B8 000A3FF8 38 ED 82 D0 */ addi r7, r13, tbl1$215@sda21 +/* 800A70BC 000A3FFC 7D 06 41 D6 */ mullw r8, r6, r8 +/* 800A70C0 000A4000 7C C7 28 AE */ lbzx r6, r7, r5 +/* 800A70C4 000A4004 7C 00 42 14 */ add r0, r0, r8 +/* 800A70C8 000A4008 55 25 8F BE */ rlwinm r5, r9, 0x11, 0x1e, 0x1f +/* 800A70CC 000A400C 7D 27 28 AE */ lbzx r9, r7, r5 +/* 800A70D0 000A4010 7C 00 32 14 */ add r0, r0, r6 +/* 800A70D4 000A4014 54 86 07 BE */ clrlwi r6, r4, 0x1e +/* 800A70D8 000A4018 39 0D 82 D4 */ addi r8, r13, tbl2$216@sda21 +/* 800A70DC 000A401C 54 85 F7 BE */ rlwinm r5, r4, 0x1e, 0x1e, 0x1f +/* 800A70E0 000A4020 7C E8 30 AE */ lbzx r7, r8, r6 +/* 800A70E4 000A4024 7C 00 4A 14 */ add r0, r0, r9 +/* 800A70E8 000A4028 7C C8 28 AE */ lbzx r6, r8, r5 +/* 800A70EC 000A402C 7C 00 3A 14 */ add r0, r0, r7 +/* 800A70F0 000A4030 54 85 E7 BE */ rlwinm r5, r4, 0x1c, 0x1e, 0x1f +/* 800A70F4 000A4034 7C E8 28 AE */ lbzx r7, r8, r5 +/* 800A70F8 000A4038 7C 00 32 14 */ add r0, r0, r6 +/* 800A70FC 000A403C 54 85 D7 BE */ rlwinm r5, r4, 0x1a, 0x1e, 0x1f +/* 800A7100 000A4040 7C C8 28 AE */ lbzx r6, r8, r5 +/* 800A7104 000A4044 7C 00 3A 14 */ add r0, r0, r7 +/* 800A7108 000A4048 54 85 C7 BE */ rlwinm r5, r4, 0x18, 0x1e, 0x1f +/* 800A710C 000A404C 7C E8 28 AE */ lbzx r7, r8, r5 +/* 800A7110 000A4050 7C 00 32 14 */ add r0, r0, r6 +/* 800A7114 000A4054 54 85 B7 BE */ rlwinm r5, r4, 0x16, 0x1e, 0x1f +/* 800A7118 000A4058 7C C8 28 AE */ lbzx r6, r8, r5 +/* 800A711C 000A405C 54 85 A7 BE */ rlwinm r5, r4, 0x14, 0x1e, 0x1f +/* 800A7120 000A4060 7C 00 3A 14 */ add r0, r0, r7 +/* 800A7124 000A4064 7C A8 28 AE */ lbzx r5, r8, r5 +/* 800A7128 000A4068 54 84 97 BE */ rlwinm r4, r4, 0x12, 0x1e, 0x1f +/* 800A712C 000A406C 7C 00 32 14 */ add r0, r0, r6 +/* 800A7130 000A4070 7C 88 20 AE */ lbzx r4, r8, r4 +/* 800A7134 000A4074 7C 00 2A 14 */ add r0, r0, r5 +/* 800A7138 000A4078 7C 00 22 14 */ add r0, r0, r4 +/* 800A713C 000A407C B0 03 00 06 */ sth r0, 6(r3) +/* 800A7140 000A4080 4E 80 00 20 */ blr + +.global GXGetVtxDesc +GXGetVtxDesc: +/* 800A7144 000A4084 28 03 00 19 */ cmplwi r3, 0x19 +/* 800A7148 000A4088 41 81 01 A4 */ bgt lbl_800A72EC +/* 800A714C 000A408C 3C A0 80 3B */ lis r5, "@256"@ha +/* 800A7150 000A4090 38 A5 16 10 */ addi r5, r5, "@256"@l +/* 800A7154 000A4094 54 60 10 3A */ slwi r0, r3, 2 +/* 800A7158 000A4098 7C 05 00 2E */ lwzx r0, r5, r0 +/* 800A715C 000A409C 7C 09 03 A6 */ mtctr r0 +/* 800A7160 000A40A0 4E 80 04 20 */ bctr +lbl_800A7164: +/* 800A7164 000A40A4 80 6D 82 C8 */ lwz r3, gx@sda21(r13) +/* 800A7168 000A40A8 80 03 00 14 */ lwz r0, 0x14(r3) +/* 800A716C 000A40AC 54 00 07 FE */ clrlwi r0, r0, 0x1f +/* 800A7170 000A40B0 48 00 01 80 */ b lbl_800A72F0 +lbl_800A7174: +/* 800A7174 000A40B4 80 6D 82 C8 */ lwz r3, gx@sda21(r13) +/* 800A7178 000A40B8 80 03 00 14 */ lwz r0, 0x14(r3) +/* 800A717C 000A40BC 54 00 FF FE */ rlwinm r0, r0, 0x1f, 0x1f, 0x1f +/* 800A7180 000A40C0 48 00 01 70 */ b lbl_800A72F0 +lbl_800A7184: +/* 800A7184 000A40C4 80 6D 82 C8 */ lwz r3, gx@sda21(r13) +/* 800A7188 000A40C8 80 03 00 14 */ lwz r0, 0x14(r3) +/* 800A718C 000A40CC 54 00 F7 FE */ rlwinm r0, r0, 0x1e, 0x1f, 0x1f +/* 800A7190 000A40D0 48 00 01 60 */ b lbl_800A72F0 +lbl_800A7194: +/* 800A7194 000A40D4 80 6D 82 C8 */ lwz r3, gx@sda21(r13) +/* 800A7198 000A40D8 80 03 00 14 */ lwz r0, 0x14(r3) +/* 800A719C 000A40DC 54 00 EF FE */ rlwinm r0, r0, 0x1d, 0x1f, 0x1f +/* 800A71A0 000A40E0 48 00 01 50 */ b lbl_800A72F0 +lbl_800A71A4: +/* 800A71A4 000A40E4 80 6D 82 C8 */ lwz r3, gx@sda21(r13) +/* 800A71A8 000A40E8 80 03 00 14 */ lwz r0, 0x14(r3) +/* 800A71AC 000A40EC 54 00 E7 FE */ rlwinm r0, r0, 0x1c, 0x1f, 0x1f +/* 800A71B0 000A40F0 48 00 01 40 */ b lbl_800A72F0 +lbl_800A71B4: +/* 800A71B4 000A40F4 80 6D 82 C8 */ lwz r3, gx@sda21(r13) +/* 800A71B8 000A40F8 80 03 00 14 */ lwz r0, 0x14(r3) +/* 800A71BC 000A40FC 54 00 DF FE */ rlwinm r0, r0, 0x1b, 0x1f, 0x1f +/* 800A71C0 000A4100 48 00 01 30 */ b lbl_800A72F0 +lbl_800A71C4: +/* 800A71C4 000A4104 80 6D 82 C8 */ lwz r3, gx@sda21(r13) +/* 800A71C8 000A4108 80 03 00 14 */ lwz r0, 0x14(r3) +/* 800A71CC 000A410C 54 00 D7 FE */ rlwinm r0, r0, 0x1a, 0x1f, 0x1f +/* 800A71D0 000A4110 48 00 01 20 */ b lbl_800A72F0 +lbl_800A71D4: +/* 800A71D4 000A4114 80 6D 82 C8 */ lwz r3, gx@sda21(r13) +/* 800A71D8 000A4118 80 03 00 14 */ lwz r0, 0x14(r3) +/* 800A71DC 000A411C 54 00 CF FE */ rlwinm r0, r0, 0x19, 0x1f, 0x1f +/* 800A71E0 000A4120 48 00 01 10 */ b lbl_800A72F0 +lbl_800A71E4: +/* 800A71E4 000A4124 80 6D 82 C8 */ lwz r3, gx@sda21(r13) +/* 800A71E8 000A4128 80 03 00 14 */ lwz r0, 0x14(r3) +/* 800A71EC 000A412C 54 00 C7 FE */ rlwinm r0, r0, 0x18, 0x1f, 0x1f +/* 800A71F0 000A4130 48 00 01 00 */ b lbl_800A72F0 +lbl_800A71F4: +/* 800A71F4 000A4134 80 6D 82 C8 */ lwz r3, gx@sda21(r13) +/* 800A71F8 000A4138 80 03 00 14 */ lwz r0, 0x14(r3) +/* 800A71FC 000A413C 54 00 BF BE */ rlwinm r0, r0, 0x17, 0x1e, 0x1f +/* 800A7200 000A4140 48 00 00 F0 */ b lbl_800A72F0 +lbl_800A7204: +/* 800A7204 000A4144 80 6D 82 C8 */ lwz r3, gx@sda21(r13) +/* 800A7208 000A4148 88 03 04 1C */ lbz r0, 0x41c(r3) +/* 800A720C 000A414C 28 00 00 00 */ cmplwi r0, 0 +/* 800A7210 000A4150 41 82 00 10 */ beq lbl_800A7220 +/* 800A7214 000A4154 80 03 00 14 */ lwz r0, 0x14(r3) +/* 800A7218 000A4158 54 00 AF BE */ rlwinm r0, r0, 0x15, 0x1e, 0x1f +/* 800A721C 000A415C 48 00 00 D4 */ b lbl_800A72F0 +lbl_800A7220: +/* 800A7220 000A4160 38 00 00 00 */ li r0, 0 +/* 800A7224 000A4164 48 00 00 CC */ b lbl_800A72F0 +lbl_800A7228: +/* 800A7228 000A4168 80 6D 82 C8 */ lwz r3, gx@sda21(r13) +/* 800A722C 000A416C 88 03 04 1D */ lbz r0, 0x41d(r3) +/* 800A7230 000A4170 28 00 00 00 */ cmplwi r0, 0 +/* 800A7234 000A4174 41 82 00 10 */ beq lbl_800A7244 +/* 800A7238 000A4178 80 03 00 14 */ lwz r0, 0x14(r3) +/* 800A723C 000A417C 54 00 AF BE */ rlwinm r0, r0, 0x15, 0x1e, 0x1f +/* 800A7240 000A4180 48 00 00 B0 */ b lbl_800A72F0 +lbl_800A7244: +/* 800A7244 000A4184 38 00 00 00 */ li r0, 0 +/* 800A7248 000A4188 48 00 00 A8 */ b lbl_800A72F0 +lbl_800A724C: +/* 800A724C 000A418C 80 6D 82 C8 */ lwz r3, gx@sda21(r13) +/* 800A7250 000A4190 80 03 00 14 */ lwz r0, 0x14(r3) +/* 800A7254 000A4194 54 00 9F BE */ rlwinm r0, r0, 0x13, 0x1e, 0x1f +/* 800A7258 000A4198 48 00 00 98 */ b lbl_800A72F0 +lbl_800A725C: +/* 800A725C 000A419C 80 6D 82 C8 */ lwz r3, gx@sda21(r13) +/* 800A7260 000A41A0 80 03 00 14 */ lwz r0, 0x14(r3) +/* 800A7264 000A41A4 54 00 8F BE */ rlwinm r0, r0, 0x11, 0x1e, 0x1f +/* 800A7268 000A41A8 48 00 00 88 */ b lbl_800A72F0 +lbl_800A726C: +/* 800A726C 000A41AC 80 6D 82 C8 */ lwz r3, gx@sda21(r13) +/* 800A7270 000A41B0 80 03 00 18 */ lwz r0, 0x18(r3) +/* 800A7274 000A41B4 54 00 07 BE */ clrlwi r0, r0, 0x1e +/* 800A7278 000A41B8 48 00 00 78 */ b lbl_800A72F0 +lbl_800A727C: +/* 800A727C 000A41BC 80 6D 82 C8 */ lwz r3, gx@sda21(r13) +/* 800A7280 000A41C0 80 03 00 18 */ lwz r0, 0x18(r3) +/* 800A7284 000A41C4 54 00 F7 BE */ rlwinm r0, r0, 0x1e, 0x1e, 0x1f +/* 800A7288 000A41C8 48 00 00 68 */ b lbl_800A72F0 +lbl_800A728C: +/* 800A728C 000A41CC 80 6D 82 C8 */ lwz r3, gx@sda21(r13) +/* 800A7290 000A41D0 80 03 00 18 */ lwz r0, 0x18(r3) +/* 800A7294 000A41D4 54 00 E7 BE */ rlwinm r0, r0, 0x1c, 0x1e, 0x1f +/* 800A7298 000A41D8 48 00 00 58 */ b lbl_800A72F0 +lbl_800A729C: +/* 800A729C 000A41DC 80 6D 82 C8 */ lwz r3, gx@sda21(r13) +/* 800A72A0 000A41E0 80 03 00 18 */ lwz r0, 0x18(r3) +/* 800A72A4 000A41E4 54 00 D7 BE */ rlwinm r0, r0, 0x1a, 0x1e, 0x1f +/* 800A72A8 000A41E8 48 00 00 48 */ b lbl_800A72F0 +lbl_800A72AC: +/* 800A72AC 000A41EC 80 6D 82 C8 */ lwz r3, gx@sda21(r13) +/* 800A72B0 000A41F0 80 03 00 18 */ lwz r0, 0x18(r3) +/* 800A72B4 000A41F4 54 00 C7 BE */ rlwinm r0, r0, 0x18, 0x1e, 0x1f +/* 800A72B8 000A41F8 48 00 00 38 */ b lbl_800A72F0 +lbl_800A72BC: +/* 800A72BC 000A41FC 80 6D 82 C8 */ lwz r3, gx@sda21(r13) +/* 800A72C0 000A4200 80 03 00 18 */ lwz r0, 0x18(r3) +/* 800A72C4 000A4204 54 00 B7 BE */ rlwinm r0, r0, 0x16, 0x1e, 0x1f +/* 800A72C8 000A4208 48 00 00 28 */ b lbl_800A72F0 +lbl_800A72CC: +/* 800A72CC 000A420C 80 6D 82 C8 */ lwz r3, gx@sda21(r13) +/* 800A72D0 000A4210 80 03 00 18 */ lwz r0, 0x18(r3) +/* 800A72D4 000A4214 54 00 A7 BE */ rlwinm r0, r0, 0x14, 0x1e, 0x1f +/* 800A72D8 000A4218 48 00 00 18 */ b lbl_800A72F0 +lbl_800A72DC: +/* 800A72DC 000A421C 80 6D 82 C8 */ lwz r3, gx@sda21(r13) +/* 800A72E0 000A4220 80 03 00 18 */ lwz r0, 0x18(r3) +/* 800A72E4 000A4224 54 00 97 BE */ rlwinm r0, r0, 0x12, 0x1e, 0x1f +/* 800A72E8 000A4228 48 00 00 08 */ b lbl_800A72F0 +lbl_800A72EC: +/* 800A72EC 000A422C 38 00 00 00 */ li r0, 0 +lbl_800A72F0: +/* 800A72F0 000A4230 90 04 00 00 */ stw r0, 0(r4) +/* 800A72F4 000A4234 4E 80 00 20 */ blr + +.global GXGetVtxDescv +GXGetVtxDescv: +/* 800A72F8 000A4238 7C 08 02 A6 */ mflr r0 +/* 800A72FC 000A423C 90 01 00 04 */ stw r0, 4(r1) +/* 800A7300 000A4240 94 21 FF E0 */ stwu r1, -0x20(r1) +/* 800A7304 000A4244 93 E1 00 1C */ stw r31, 0x1c(r1) +/* 800A7308 000A4248 3B E0 00 00 */ li r31, 0 +/* 800A730C 000A424C 93 C1 00 18 */ stw r30, 0x18(r1) +/* 800A7310 000A4250 3B C0 00 00 */ li r30, 0 +/* 800A7314 000A4254 93 A1 00 14 */ stw r29, 0x14(r1) +/* 800A7318 000A4258 3B A3 00 00 */ addi r29, r3, 0 +lbl_800A731C: +/* 800A731C 000A425C 7C 9D FA 14 */ add r4, r29, r31 +/* 800A7320 000A4260 93 C4 00 00 */ stw r30, 0(r4) +/* 800A7324 000A4264 38 7E 00 00 */ addi r3, r30, 0 +/* 800A7328 000A4268 38 84 00 04 */ addi r4, r4, 4 +/* 800A732C 000A426C 4B FF FE 19 */ bl GXGetVtxDesc +/* 800A7330 000A4270 3B DE 00 01 */ addi r30, r30, 1 +/* 800A7334 000A4274 2C 1E 00 1A */ cmpwi r30, 0x1a +/* 800A7338 000A4278 3B FF 00 08 */ addi r31, r31, 8 +/* 800A733C 000A427C 41 80 FF E0 */ blt lbl_800A731C +/* 800A7340 000A4280 57 C0 18 38 */ slwi r0, r30, 3 +/* 800A7344 000A4284 38 60 00 FF */ li r3, 0xff +/* 800A7348 000A4288 7C 7D 01 2E */ stwx r3, r29, r0 +/* 800A734C 000A428C 80 01 00 24 */ lwz r0, 0x24(r1) +/* 800A7350 000A4290 83 E1 00 1C */ lwz r31, 0x1c(r1) +/* 800A7354 000A4294 83 C1 00 18 */ lwz r30, 0x18(r1) +/* 800A7358 000A4298 83 A1 00 14 */ lwz r29, 0x14(r1) +/* 800A735C 000A429C 38 21 00 20 */ addi r1, r1, 0x20 +/* 800A7360 000A42A0 7C 08 03 A6 */ mtlr r0 +/* 800A7364 000A42A4 4E 80 00 20 */ blr + +.global GXClearVtxDesc +GXClearVtxDesc: +/* 800A7368 000A42A8 80 6D 82 C8 */ lwz r3, gx@sda21(r13) +/* 800A736C 000A42AC 38 80 00 00 */ li r4, 0 +/* 800A7370 000A42B0 90 83 00 14 */ stw r4, 0x14(r3) +/* 800A7374 000A42B4 80 6D 82 C8 */ lwz r3, gx@sda21(r13) +/* 800A7378 000A42B8 84 03 00 14 */ lwzu r0, 0x14(r3) +/* 800A737C 000A42BC 54 00 05 E8 */ rlwinm r0, r0, 0, 0x17, 0x14 +/* 800A7380 000A42C0 60 00 02 00 */ ori r0, r0, 0x200 +/* 800A7384 000A42C4 90 03 00 00 */ stw r0, 0(r3) +/* 800A7388 000A42C8 80 6D 82 C8 */ lwz r3, gx@sda21(r13) +/* 800A738C 000A42CC 90 83 00 18 */ stw r4, 0x18(r3) +/* 800A7390 000A42D0 80 6D 82 C8 */ lwz r3, gx@sda21(r13) +/* 800A7394 000A42D4 98 83 04 1C */ stb r4, 0x41c(r3) +/* 800A7398 000A42D8 80 6D 82 C8 */ lwz r3, gx@sda21(r13) +/* 800A739C 000A42DC 98 83 04 1D */ stb r4, 0x41d(r3) +/* 800A73A0 000A42E0 80 6D 82 C8 */ lwz r3, gx@sda21(r13) +/* 800A73A4 000A42E4 80 03 04 F4 */ lwz r0, 0x4f4(r3) +/* 800A73A8 000A42E8 60 00 00 08 */ ori r0, r0, 8 +/* 800A73AC 000A42EC 90 03 04 F4 */ stw r0, 0x4f4(r3) +/* 800A73B0 000A42F0 4E 80 00 20 */ blr + +.global GXSetVtxAttrFmt +GXSetVtxAttrFmt: +/* 800A73B4 000A42F4 38 04 FF F7 */ addi r0, r4, -9 +/* 800A73B8 000A42F8 81 0D 82 C8 */ lwz r8, gx@sda21(r13) +/* 800A73BC 000A42FC 54 64 10 3A */ slwi r4, r3, 2 +/* 800A73C0 000A4300 7D 28 22 14 */ add r9, r8, r4 +/* 800A73C4 000A4304 28 00 00 10 */ cmplwi r0, 0x10 +/* 800A73C8 000A4308 38 89 00 1C */ addi r4, r9, 0x1c +/* 800A73CC 000A430C 39 09 00 3C */ addi r8, r9, 0x3c +/* 800A73D0 000A4310 39 29 00 5C */ addi r9, r9, 0x5c +/* 800A73D4 000A4314 41 81 03 08 */ bgt lbl_800A76DC +/* 800A73D8 000A4318 3D 40 80 3B */ lis r10, "@302"@ha +/* 800A73DC 000A431C 39 4A 16 78 */ addi r10, r10, "@302"@l +/* 800A73E0 000A4320 54 00 10 3A */ slwi r0, r0, 2 +/* 800A73E4 000A4324 7C 0A 00 2E */ lwzx r0, r10, r0 +/* 800A73E8 000A4328 7C 09 03 A6 */ mtctr r0 +/* 800A73EC 000A432C 4E 80 04 20 */ bctr +lbl_800A73F0: +/* 800A73F0 000A4330 80 04 00 00 */ lwz r0, 0(r4) +/* 800A73F4 000A4334 54 C6 08 3C */ slwi r6, r6, 1 +/* 800A73F8 000A4338 54 00 00 3C */ rlwinm r0, r0, 0, 0, 0x1e +/* 800A73FC 000A433C 7C 00 2B 78 */ or r0, r0, r5 +/* 800A7400 000A4340 90 04 00 00 */ stw r0, 0(r4) +/* 800A7404 000A4344 54 E0 25 36 */ rlwinm r0, r7, 4, 0x14, 0x1b +/* 800A7408 000A4348 80 A4 00 00 */ lwz r5, 0(r4) +/* 800A740C 000A434C 54 A5 07 F6 */ rlwinm r5, r5, 0, 0x1f, 0x1b +/* 800A7410 000A4350 7C A5 33 78 */ or r5, r5, r6 +/* 800A7414 000A4354 90 A4 00 00 */ stw r5, 0(r4) +/* 800A7418 000A4358 80 A4 00 00 */ lwz r5, 0(r4) +/* 800A741C 000A435C 54 A5 07 2C */ rlwinm r5, r5, 0, 0x1c, 0x16 +/* 800A7420 000A4360 7C A0 03 78 */ or r0, r5, r0 +/* 800A7424 000A4364 90 04 00 00 */ stw r0, 0(r4) +/* 800A7428 000A4368 48 00 02 B4 */ b lbl_800A76DC +lbl_800A742C: +/* 800A742C 000A436C 80 E4 00 00 */ lwz r7, 0(r4) +/* 800A7430 000A4370 54 C0 50 2A */ slwi r0, r6, 0xa +/* 800A7434 000A4374 2C 05 00 02 */ cmpwi r5, 2 +/* 800A7438 000A4378 54 E6 05 A4 */ rlwinm r6, r7, 0, 0x16, 0x12 +/* 800A743C 000A437C 7C C0 03 78 */ or r0, r6, r0 +/* 800A7440 000A4380 90 04 00 00 */ stw r0, 0(r4) +/* 800A7444 000A4384 40 82 00 28 */ bne lbl_800A746C +/* 800A7448 000A4388 80 04 00 00 */ lwz r0, 0(r4) +/* 800A744C 000A438C 54 00 05 EA */ rlwinm r0, r0, 0, 0x17, 0x15 +/* 800A7450 000A4390 60 00 02 00 */ ori r0, r0, 0x200 +/* 800A7454 000A4394 90 04 00 00 */ stw r0, 0(r4) +/* 800A7458 000A4398 80 04 00 00 */ lwz r0, 0(r4) +/* 800A745C 000A439C 54 00 00 7E */ clrlwi r0, r0, 1 +/* 800A7460 000A43A0 64 00 80 00 */ oris r0, r0, 0x8000 +/* 800A7464 000A43A4 90 04 00 00 */ stw r0, 0(r4) +/* 800A7468 000A43A8 48 00 02 74 */ b lbl_800A76DC +lbl_800A746C: +/* 800A746C 000A43AC 80 C4 00 00 */ lwz r6, 0(r4) +/* 800A7470 000A43B0 54 A0 48 2C */ slwi r0, r5, 9 +/* 800A7474 000A43B4 54 C5 05 EA */ rlwinm r5, r6, 0, 0x17, 0x15 +/* 800A7478 000A43B8 7C A0 03 78 */ or r0, r5, r0 +/* 800A747C 000A43BC 90 04 00 00 */ stw r0, 0(r4) +/* 800A7480 000A43C0 80 04 00 00 */ lwz r0, 0(r4) +/* 800A7484 000A43C4 54 00 00 7E */ clrlwi r0, r0, 1 +/* 800A7488 000A43C8 90 04 00 00 */ stw r0, 0(r4) +/* 800A748C 000A43CC 48 00 02 50 */ b lbl_800A76DC +lbl_800A7490: +/* 800A7490 000A43D0 80 E4 00 00 */ lwz r7, 0(r4) +/* 800A7494 000A43D4 54 A5 68 24 */ slwi r5, r5, 0xd +/* 800A7498 000A43D8 54 C0 70 22 */ slwi r0, r6, 0xe +/* 800A749C 000A43DC 54 E6 04 E2 */ rlwinm r6, r7, 0, 0x13, 0x11 +/* 800A74A0 000A43E0 7C C5 2B 78 */ or r5, r6, r5 +/* 800A74A4 000A43E4 90 A4 00 00 */ stw r5, 0(r4) +/* 800A74A8 000A43E8 80 A4 00 00 */ lwz r5, 0(r4) +/* 800A74AC 000A43EC 54 A5 04 9C */ rlwinm r5, r5, 0, 0x12, 0xe +/* 800A74B0 000A43F0 7C A0 03 78 */ or r0, r5, r0 +/* 800A74B4 000A43F4 90 04 00 00 */ stw r0, 0(r4) +/* 800A74B8 000A43F8 48 00 02 24 */ b lbl_800A76DC +lbl_800A74BC: +/* 800A74BC 000A43FC 80 E4 00 00 */ lwz r7, 0(r4) +/* 800A74C0 000A4400 54 A5 88 1C */ slwi r5, r5, 0x11 +/* 800A74C4 000A4404 54 C0 90 1A */ slwi r0, r6, 0x12 +/* 800A74C8 000A4408 54 E6 03 DA */ rlwinm r6, r7, 0, 0xf, 0xd +/* 800A74CC 000A440C 7C C5 2B 78 */ or r5, r6, r5 +/* 800A74D0 000A4410 90 A4 00 00 */ stw r5, 0(r4) +/* 800A74D4 000A4414 80 A4 00 00 */ lwz r5, 0(r4) +/* 800A74D8 000A4418 54 A5 03 94 */ rlwinm r5, r5, 0, 0xe, 0xa +/* 800A74DC 000A441C 7C A0 03 78 */ or r0, r5, r0 +/* 800A74E0 000A4420 90 04 00 00 */ stw r0, 0(r4) +/* 800A74E4 000A4424 48 00 01 F8 */ b lbl_800A76DC +lbl_800A74E8: +/* 800A74E8 000A4428 81 04 00 00 */ lwz r8, 0(r4) +/* 800A74EC 000A442C 54 A0 A8 14 */ slwi r0, r5, 0x15 +/* 800A74F0 000A4430 55 05 02 D2 */ rlwinm r5, r8, 0, 0xb, 9 +/* 800A74F4 000A4434 7C A0 03 78 */ or r0, r5, r0 +/* 800A74F8 000A4438 90 04 00 00 */ stw r0, 0(r4) +/* 800A74FC 000A443C 54 C5 B0 12 */ slwi r5, r6, 0x16 +/* 800A7500 000A4440 54 E0 C8 0C */ slwi r0, r7, 0x19 +/* 800A7504 000A4444 80 C4 00 00 */ lwz r6, 0(r4) +/* 800A7508 000A4448 54 C6 02 8C */ rlwinm r6, r6, 0, 0xa, 6 +/* 800A750C 000A444C 7C C5 2B 78 */ or r5, r6, r5 +/* 800A7510 000A4450 90 A4 00 00 */ stw r5, 0(r4) +/* 800A7514 000A4454 80 A4 00 00 */ lwz r5, 0(r4) +/* 800A7518 000A4458 54 A5 01 C2 */ rlwinm r5, r5, 0, 7, 1 +/* 800A751C 000A445C 7C A0 03 78 */ or r0, r5, r0 +/* 800A7520 000A4460 90 04 00 00 */ stw r0, 0(r4) +/* 800A7524 000A4464 48 00 01 B8 */ b lbl_800A76DC +lbl_800A7528: +/* 800A7528 000A4468 80 08 00 00 */ lwz r0, 0(r8) +/* 800A752C 000A446C 54 C4 08 3C */ slwi r4, r6, 1 +/* 800A7530 000A4470 54 00 00 3C */ rlwinm r0, r0, 0, 0, 0x1e +/* 800A7534 000A4474 7C 00 2B 78 */ or r0, r0, r5 +/* 800A7538 000A4478 90 08 00 00 */ stw r0, 0(r8) +/* 800A753C 000A447C 54 E0 25 36 */ rlwinm r0, r7, 4, 0x14, 0x1b +/* 800A7540 000A4480 80 A8 00 00 */ lwz r5, 0(r8) +/* 800A7544 000A4484 54 A5 07 F6 */ rlwinm r5, r5, 0, 0x1f, 0x1b +/* 800A7548 000A4488 7C A4 23 78 */ or r4, r5, r4 +/* 800A754C 000A448C 90 88 00 00 */ stw r4, 0(r8) +/* 800A7550 000A4490 80 88 00 00 */ lwz r4, 0(r8) +/* 800A7554 000A4494 54 84 07 2C */ rlwinm r4, r4, 0, 0x1c, 0x16 +/* 800A7558 000A4498 7C 80 03 78 */ or r0, r4, r0 +/* 800A755C 000A449C 90 08 00 00 */ stw r0, 0(r8) +/* 800A7560 000A44A0 48 00 01 7C */ b lbl_800A76DC +lbl_800A7564: +/* 800A7564 000A44A4 80 88 00 00 */ lwz r4, 0(r8) +/* 800A7568 000A44A8 54 A0 48 2C */ slwi r0, r5, 9 +/* 800A756C 000A44AC 54 84 05 EA */ rlwinm r4, r4, 0, 0x17, 0x15 +/* 800A7570 000A44B0 7C 80 03 78 */ or r0, r4, r0 +/* 800A7574 000A44B4 90 08 00 00 */ stw r0, 0(r8) +/* 800A7578 000A44B8 54 C4 50 2A */ slwi r4, r6, 0xa +/* 800A757C 000A44BC 54 E0 6A E4 */ rlwinm r0, r7, 0xd, 0xb, 0x12 +/* 800A7580 000A44C0 80 A8 00 00 */ lwz r5, 0(r8) +/* 800A7584 000A44C4 54 A5 05 A4 */ rlwinm r5, r5, 0, 0x16, 0x12 +/* 800A7588 000A44C8 7C A4 23 78 */ or r4, r5, r4 +/* 800A758C 000A44CC 90 88 00 00 */ stw r4, 0(r8) +/* 800A7590 000A44D0 80 88 00 00 */ lwz r4, 0(r8) +/* 800A7594 000A44D4 54 84 04 DA */ rlwinm r4, r4, 0, 0x13, 0xd +/* 800A7598 000A44D8 7C 80 03 78 */ or r0, r4, r0 +/* 800A759C 000A44DC 90 08 00 00 */ stw r0, 0(r8) +/* 800A75A0 000A44E0 48 00 01 3C */ b lbl_800A76DC +lbl_800A75A4: +/* 800A75A4 000A44E4 80 88 00 00 */ lwz r4, 0(r8) +/* 800A75A8 000A44E8 54 A0 90 1A */ slwi r0, r5, 0x12 +/* 800A75AC 000A44EC 54 84 03 98 */ rlwinm r4, r4, 0, 0xe, 0xc +/* 800A75B0 000A44F0 7C 80 03 78 */ or r0, r4, r0 +/* 800A75B4 000A44F4 90 08 00 00 */ stw r0, 0(r8) +/* 800A75B8 000A44F8 54 C4 98 18 */ slwi r4, r6, 0x13 +/* 800A75BC 000A44FC 54 E0 B0 92 */ rlwinm r0, r7, 0x16, 2, 9 +/* 800A75C0 000A4500 80 A8 00 00 */ lwz r5, 0(r8) +/* 800A75C4 000A4504 54 A5 03 52 */ rlwinm r5, r5, 0, 0xd, 9 +/* 800A75C8 000A4508 7C A4 23 78 */ or r4, r5, r4 +/* 800A75CC 000A450C 90 88 00 00 */ stw r4, 0(r8) +/* 800A75D0 000A4510 80 88 00 00 */ lwz r4, 0(r8) +/* 800A75D4 000A4514 54 84 02 88 */ rlwinm r4, r4, 0, 0xa, 4 +/* 800A75D8 000A4518 7C 80 03 78 */ or r0, r4, r0 +/* 800A75DC 000A451C 90 08 00 00 */ stw r0, 0(r8) +/* 800A75E0 000A4520 48 00 00 FC */ b lbl_800A76DC +lbl_800A75E4: +/* 800A75E4 000A4524 81 48 00 00 */ lwz r10, 0(r8) +/* 800A75E8 000A4528 54 A0 D8 08 */ slwi r0, r5, 0x1b +/* 800A75EC 000A452C 54 C4 E0 06 */ slwi r4, r6, 0x1c +/* 800A75F0 000A4530 55 45 01 46 */ rlwinm r5, r10, 0, 5, 3 +/* 800A75F4 000A4534 7C A0 03 78 */ or r0, r5, r0 +/* 800A75F8 000A4538 90 08 00 00 */ stw r0, 0(r8) +/* 800A75FC 000A453C 54 E0 06 3E */ clrlwi r0, r7, 0x18 +/* 800A7600 000A4540 80 A8 00 00 */ lwz r5, 0(r8) +/* 800A7604 000A4544 54 A5 01 00 */ rlwinm r5, r5, 0, 4, 0 +/* 800A7608 000A4548 7C A4 23 78 */ or r4, r5, r4 +/* 800A760C 000A454C 90 88 00 00 */ stw r4, 0(r8) +/* 800A7610 000A4550 80 89 00 00 */ lwz r4, 0(r9) +/* 800A7614 000A4554 54 84 00 34 */ rlwinm r4, r4, 0, 0, 0x1a +/* 800A7618 000A4558 7C 80 03 78 */ or r0, r4, r0 +/* 800A761C 000A455C 90 09 00 00 */ stw r0, 0(r9) +/* 800A7620 000A4560 48 00 00 BC */ b lbl_800A76DC +lbl_800A7624: +/* 800A7624 000A4564 80 89 00 00 */ lwz r4, 0(r9) +/* 800A7628 000A4568 54 A0 28 34 */ slwi r0, r5, 5 +/* 800A762C 000A456C 54 84 06 F2 */ rlwinm r4, r4, 0, 0x1b, 0x19 +/* 800A7630 000A4570 7C 80 03 78 */ or r0, r4, r0 +/* 800A7634 000A4574 90 09 00 00 */ stw r0, 0(r9) +/* 800A7638 000A4578 54 C4 30 32 */ slwi r4, r6, 6 +/* 800A763C 000A457C 54 E0 4B EC */ rlwinm r0, r7, 9, 0xf, 0x16 +/* 800A7640 000A4580 80 A9 00 00 */ lwz r5, 0(r9) +/* 800A7644 000A4584 54 A5 06 AC */ rlwinm r5, r5, 0, 0x1a, 0x16 +/* 800A7648 000A4588 7C A4 23 78 */ or r4, r5, r4 +/* 800A764C 000A458C 90 89 00 00 */ stw r4, 0(r9) +/* 800A7650 000A4590 80 89 00 00 */ lwz r4, 0(r9) +/* 800A7654 000A4594 54 84 05 E2 */ rlwinm r4, r4, 0, 0x17, 0x11 +/* 800A7658 000A4598 7C 80 03 78 */ or r0, r4, r0 +/* 800A765C 000A459C 90 09 00 00 */ stw r0, 0(r9) +/* 800A7660 000A45A0 48 00 00 7C */ b lbl_800A76DC +lbl_800A7664: +/* 800A7664 000A45A4 80 89 00 00 */ lwz r4, 0(r9) +/* 800A7668 000A45A8 54 A0 70 22 */ slwi r0, r5, 0xe +/* 800A766C 000A45AC 54 84 04 A0 */ rlwinm r4, r4, 0, 0x12, 0x10 +/* 800A7670 000A45B0 7C 80 03 78 */ or r0, r4, r0 +/* 800A7674 000A45B4 90 09 00 00 */ stw r0, 0(r9) +/* 800A7678 000A45B8 54 C4 78 20 */ slwi r4, r6, 0xf +/* 800A767C 000A45BC 54 E0 91 9A */ rlwinm r0, r7, 0x12, 6, 0xd +/* 800A7680 000A45C0 80 A9 00 00 */ lwz r5, 0(r9) +/* 800A7684 000A45C4 54 A5 04 5A */ rlwinm r5, r5, 0, 0x11, 0xd +/* 800A7688 000A45C8 7C A4 23 78 */ or r4, r5, r4 +/* 800A768C 000A45CC 90 89 00 00 */ stw r4, 0(r9) +/* 800A7690 000A45D0 80 89 00 00 */ lwz r4, 0(r9) +/* 800A7694 000A45D4 54 84 03 90 */ rlwinm r4, r4, 0, 0xe, 8 +/* 800A7698 000A45D8 7C 80 03 78 */ or r0, r4, r0 +/* 800A769C 000A45DC 90 09 00 00 */ stw r0, 0(r9) +/* 800A76A0 000A45E0 48 00 00 3C */ b lbl_800A76DC +lbl_800A76A4: +/* 800A76A4 000A45E4 80 89 00 00 */ lwz r4, 0(r9) +/* 800A76A8 000A45E8 54 A0 B8 10 */ slwi r0, r5, 0x17 +/* 800A76AC 000A45EC 54 84 02 4E */ rlwinm r4, r4, 0, 9, 7 +/* 800A76B0 000A45F0 7C 80 03 78 */ or r0, r4, r0 +/* 800A76B4 000A45F4 90 09 00 00 */ stw r0, 0(r9) +/* 800A76B8 000A45F8 54 C0 C0 0E */ slwi r0, r6, 0x18 +/* 800A76BC 000A45FC 80 89 00 00 */ lwz r4, 0(r9) +/* 800A76C0 000A4600 54 84 02 08 */ rlwinm r4, r4, 0, 8, 4 +/* 800A76C4 000A4604 7C 80 03 78 */ or r0, r4, r0 +/* 800A76C8 000A4608 90 09 00 00 */ stw r0, 0(r9) +/* 800A76CC 000A460C 80 09 00 00 */ lwz r0, 0(r9) +/* 800A76D0 000A4610 54 00 01 7E */ clrlwi r0, r0, 5 +/* 800A76D4 000A4614 50 E0 D8 08 */ rlwimi r0, r7, 0x1b, 0, 4 +/* 800A76D8 000A4618 90 09 00 00 */ stw r0, 0(r9) +lbl_800A76DC: +/* 800A76DC 000A461C 80 AD 82 C8 */ lwz r5, gx@sda21(r13) +/* 800A76E0 000A4620 54 60 06 3E */ clrlwi r0, r3, 0x18 +/* 800A76E4 000A4624 38 60 00 01 */ li r3, 1 +/* 800A76E8 000A4628 80 85 04 F4 */ lwz r4, 0x4f4(r5) +/* 800A76EC 000A462C 7C 60 00 30 */ slw r0, r3, r0 +/* 800A76F0 000A4630 54 00 06 3E */ clrlwi r0, r0, 0x18 +/* 800A76F4 000A4634 60 83 00 10 */ ori r3, r4, 0x10 +/* 800A76F8 000A4638 90 65 04 F4 */ stw r3, 0x4f4(r5) +/* 800A76FC 000A463C 80 8D 82 C8 */ lwz r4, gx@sda21(r13) +/* 800A7700 000A4640 88 64 04 F2 */ lbz r3, 0x4f2(r4) +/* 800A7704 000A4644 7C 60 03 78 */ or r0, r3, r0 +/* 800A7708 000A4648 98 04 04 F2 */ stb r0, 0x4f2(r4) +/* 800A770C 000A464C 4E 80 00 20 */ blr + +.global GXSetVtxAttrFmtv +GXSetVtxAttrFmtv: +/* 800A7710 000A4650 80 CD 82 C8 */ lwz r6, gx@sda21(r13) +/* 800A7714 000A4654 54 60 10 3A */ slwi r0, r3, 2 +/* 800A7718 000A4658 3C A0 80 3B */ lis r5, "@329"@ha +/* 800A771C 000A465C 7C C6 02 14 */ add r6, r6, r0 +/* 800A7720 000A4660 39 06 00 1C */ addi r8, r6, 0x1c +/* 800A7724 000A4664 39 26 00 3C */ addi r9, r6, 0x3c +/* 800A7728 000A4668 39 46 00 5C */ addi r10, r6, 0x5c +/* 800A772C 000A466C 38 A5 16 BC */ addi r5, r5, "@329"@l +/* 800A7730 000A4670 48 00 03 1C */ b lbl_800A7A4C +lbl_800A7734: +/* 800A7734 000A4674 80 C4 00 00 */ lwz r6, 0(r4) +/* 800A7738 000A4678 88 E4 00 0C */ lbz r7, 0xc(r4) +/* 800A773C 000A467C 39 66 FF F7 */ addi r11, r6, -9 +/* 800A7740 000A4680 80 C4 00 08 */ lwz r6, 8(r4) +/* 800A7744 000A4684 28 0B 00 10 */ cmplwi r11, 0x10 +/* 800A7748 000A4688 80 04 00 04 */ lwz r0, 4(r4) +/* 800A774C 000A468C 41 81 02 FC */ bgt lbl_800A7A48 +/* 800A7750 000A4690 55 6B 10 3A */ slwi r11, r11, 2 +/* 800A7754 000A4694 7D 65 58 2E */ lwzx r11, r5, r11 +/* 800A7758 000A4698 7D 69 03 A6 */ mtctr r11 +/* 800A775C 000A469C 4E 80 04 20 */ bctr +lbl_800A7760: +/* 800A7760 000A46A0 81 88 00 00 */ lwz r12, 0(r8) +/* 800A7764 000A46A4 54 CB 08 3C */ slwi r11, r6, 1 +/* 800A7768 000A46A8 54 E6 20 36 */ slwi r6, r7, 4 +/* 800A776C 000A46AC 55 87 00 3C */ rlwinm r7, r12, 0, 0, 0x1e +/* 800A7770 000A46B0 7C E0 03 78 */ or r0, r7, r0 +/* 800A7774 000A46B4 90 08 00 00 */ stw r0, 0(r8) +/* 800A7778 000A46B8 80 08 00 00 */ lwz r0, 0(r8) +/* 800A777C 000A46BC 54 00 07 F6 */ rlwinm r0, r0, 0, 0x1f, 0x1b +/* 800A7780 000A46C0 7C 00 5B 78 */ or r0, r0, r11 +/* 800A7784 000A46C4 90 08 00 00 */ stw r0, 0(r8) +/* 800A7788 000A46C8 80 08 00 00 */ lwz r0, 0(r8) +/* 800A778C 000A46CC 54 00 07 2C */ rlwinm r0, r0, 0, 0x1c, 0x16 +/* 800A7790 000A46D0 7C 00 33 78 */ or r0, r0, r6 +/* 800A7794 000A46D4 90 08 00 00 */ stw r0, 0(r8) +/* 800A7798 000A46D8 48 00 02 B0 */ b lbl_800A7A48 +lbl_800A779C: +/* 800A779C 000A46DC 80 E8 00 00 */ lwz r7, 0(r8) +/* 800A77A0 000A46E0 54 C6 50 2A */ slwi r6, r6, 0xa +/* 800A77A4 000A46E4 2C 00 00 02 */ cmpwi r0, 2 +/* 800A77A8 000A46E8 54 E7 05 A4 */ rlwinm r7, r7, 0, 0x16, 0x12 +/* 800A77AC 000A46EC 7C E6 33 78 */ or r6, r7, r6 +/* 800A77B0 000A46F0 90 C8 00 00 */ stw r6, 0(r8) +/* 800A77B4 000A46F4 40 82 00 28 */ bne lbl_800A77DC +/* 800A77B8 000A46F8 80 08 00 00 */ lwz r0, 0(r8) +/* 800A77BC 000A46FC 54 00 05 EA */ rlwinm r0, r0, 0, 0x17, 0x15 +/* 800A77C0 000A4700 60 00 02 00 */ ori r0, r0, 0x200 +/* 800A77C4 000A4704 90 08 00 00 */ stw r0, 0(r8) +/* 800A77C8 000A4708 80 08 00 00 */ lwz r0, 0(r8) +/* 800A77CC 000A470C 54 00 00 7E */ clrlwi r0, r0, 1 +/* 800A77D0 000A4710 64 00 80 00 */ oris r0, r0, 0x8000 +/* 800A77D4 000A4714 90 08 00 00 */ stw r0, 0(r8) +/* 800A77D8 000A4718 48 00 02 70 */ b lbl_800A7A48 +lbl_800A77DC: +/* 800A77DC 000A471C 80 C8 00 00 */ lwz r6, 0(r8) +/* 800A77E0 000A4720 54 00 48 2C */ slwi r0, r0, 9 +/* 800A77E4 000A4724 54 C6 05 EA */ rlwinm r6, r6, 0, 0x17, 0x15 +/* 800A77E8 000A4728 7C C0 03 78 */ or r0, r6, r0 +/* 800A77EC 000A472C 90 08 00 00 */ stw r0, 0(r8) +/* 800A77F0 000A4730 80 08 00 00 */ lwz r0, 0(r8) +/* 800A77F4 000A4734 54 00 00 7E */ clrlwi r0, r0, 1 +/* 800A77F8 000A4738 90 08 00 00 */ stw r0, 0(r8) +/* 800A77FC 000A473C 48 00 02 4C */ b lbl_800A7A48 +lbl_800A7800: +/* 800A7800 000A4740 81 68 00 00 */ lwz r11, 0(r8) +/* 800A7804 000A4744 54 07 68 24 */ slwi r7, r0, 0xd +/* 800A7808 000A4748 54 C0 70 22 */ slwi r0, r6, 0xe +/* 800A780C 000A474C 55 66 04 E2 */ rlwinm r6, r11, 0, 0x13, 0x11 +/* 800A7810 000A4750 7C C6 3B 78 */ or r6, r6, r7 +/* 800A7814 000A4754 90 C8 00 00 */ stw r6, 0(r8) +/* 800A7818 000A4758 80 C8 00 00 */ lwz r6, 0(r8) +/* 800A781C 000A475C 54 C6 04 9C */ rlwinm r6, r6, 0, 0x12, 0xe +/* 800A7820 000A4760 7C C0 03 78 */ or r0, r6, r0 +/* 800A7824 000A4764 90 08 00 00 */ stw r0, 0(r8) +/* 800A7828 000A4768 48 00 02 20 */ b lbl_800A7A48 +lbl_800A782C: +/* 800A782C 000A476C 81 68 00 00 */ lwz r11, 0(r8) +/* 800A7830 000A4770 54 07 88 1C */ slwi r7, r0, 0x11 +/* 800A7834 000A4774 54 C0 90 1A */ slwi r0, r6, 0x12 +/* 800A7838 000A4778 55 66 03 DA */ rlwinm r6, r11, 0, 0xf, 0xd +/* 800A783C 000A477C 7C C6 3B 78 */ or r6, r6, r7 +/* 800A7840 000A4780 90 C8 00 00 */ stw r6, 0(r8) +/* 800A7844 000A4784 80 C8 00 00 */ lwz r6, 0(r8) +/* 800A7848 000A4788 54 C6 03 94 */ rlwinm r6, r6, 0, 0xe, 0xa +/* 800A784C 000A478C 7C C0 03 78 */ or r0, r6, r0 +/* 800A7850 000A4790 90 08 00 00 */ stw r0, 0(r8) +/* 800A7854 000A4794 48 00 01 F4 */ b lbl_800A7A48 +lbl_800A7858: +/* 800A7858 000A4798 81 68 00 00 */ lwz r11, 0(r8) +/* 800A785C 000A479C 54 00 A8 14 */ slwi r0, r0, 0x15 +/* 800A7860 000A47A0 54 C6 B0 12 */ slwi r6, r6, 0x16 +/* 800A7864 000A47A4 55 6B 02 D2 */ rlwinm r11, r11, 0, 0xb, 9 +/* 800A7868 000A47A8 7D 60 03 78 */ or r0, r11, r0 +/* 800A786C 000A47AC 90 08 00 00 */ stw r0, 0(r8) +/* 800A7870 000A47B0 54 E0 C8 0C */ slwi r0, r7, 0x19 +/* 800A7874 000A47B4 80 E8 00 00 */ lwz r7, 0(r8) +/* 800A7878 000A47B8 54 E7 02 8C */ rlwinm r7, r7, 0, 0xa, 6 +/* 800A787C 000A47BC 7C E6 33 78 */ or r6, r7, r6 +/* 800A7880 000A47C0 90 C8 00 00 */ stw r6, 0(r8) +/* 800A7884 000A47C4 80 C8 00 00 */ lwz r6, 0(r8) +/* 800A7888 000A47C8 54 C6 01 C2 */ rlwinm r6, r6, 0, 7, 1 +/* 800A788C 000A47CC 7C C0 03 78 */ or r0, r6, r0 +/* 800A7890 000A47D0 90 08 00 00 */ stw r0, 0(r8) +/* 800A7894 000A47D4 48 00 01 B4 */ b lbl_800A7A48 +lbl_800A7898: +/* 800A7898 000A47D8 81 89 00 00 */ lwz r12, 0(r9) +/* 800A789C 000A47DC 54 CB 08 3C */ slwi r11, r6, 1 +/* 800A78A0 000A47E0 54 E6 20 36 */ slwi r6, r7, 4 +/* 800A78A4 000A47E4 55 87 00 3C */ rlwinm r7, r12, 0, 0, 0x1e +/* 800A78A8 000A47E8 7C E0 03 78 */ or r0, r7, r0 +/* 800A78AC 000A47EC 90 09 00 00 */ stw r0, 0(r9) +/* 800A78B0 000A47F0 80 09 00 00 */ lwz r0, 0(r9) +/* 800A78B4 000A47F4 54 00 07 F6 */ rlwinm r0, r0, 0, 0x1f, 0x1b +/* 800A78B8 000A47F8 7C 00 5B 78 */ or r0, r0, r11 +/* 800A78BC 000A47FC 90 09 00 00 */ stw r0, 0(r9) +/* 800A78C0 000A4800 80 09 00 00 */ lwz r0, 0(r9) +/* 800A78C4 000A4804 54 00 07 2C */ rlwinm r0, r0, 0, 0x1c, 0x16 +/* 800A78C8 000A4808 7C 00 33 78 */ or r0, r0, r6 +/* 800A78CC 000A480C 90 09 00 00 */ stw r0, 0(r9) +/* 800A78D0 000A4810 48 00 01 78 */ b lbl_800A7A48 +lbl_800A78D4: +/* 800A78D4 000A4814 81 69 00 00 */ lwz r11, 0(r9) +/* 800A78D8 000A4818 54 00 48 2C */ slwi r0, r0, 9 +/* 800A78DC 000A481C 54 C6 50 2A */ slwi r6, r6, 0xa +/* 800A78E0 000A4820 55 6B 05 EA */ rlwinm r11, r11, 0, 0x17, 0x15 +/* 800A78E4 000A4824 7D 60 03 78 */ or r0, r11, r0 +/* 800A78E8 000A4828 90 09 00 00 */ stw r0, 0(r9) +/* 800A78EC 000A482C 54 E0 68 24 */ slwi r0, r7, 0xd +/* 800A78F0 000A4830 80 E9 00 00 */ lwz r7, 0(r9) +/* 800A78F4 000A4834 54 E7 05 A4 */ rlwinm r7, r7, 0, 0x16, 0x12 +/* 800A78F8 000A4838 7C E6 33 78 */ or r6, r7, r6 +/* 800A78FC 000A483C 90 C9 00 00 */ stw r6, 0(r9) +/* 800A7900 000A4840 80 C9 00 00 */ lwz r6, 0(r9) +/* 800A7904 000A4844 54 C6 04 DA */ rlwinm r6, r6, 0, 0x13, 0xd +/* 800A7908 000A4848 7C C0 03 78 */ or r0, r6, r0 +/* 800A790C 000A484C 90 09 00 00 */ stw r0, 0(r9) +/* 800A7910 000A4850 48 00 01 38 */ b lbl_800A7A48 +lbl_800A7914: +/* 800A7914 000A4854 81 69 00 00 */ lwz r11, 0(r9) +/* 800A7918 000A4858 54 00 90 1A */ slwi r0, r0, 0x12 +/* 800A791C 000A485C 54 C6 98 18 */ slwi r6, r6, 0x13 +/* 800A7920 000A4860 55 6B 03 98 */ rlwinm r11, r11, 0, 0xe, 0xc +/* 800A7924 000A4864 7D 60 03 78 */ or r0, r11, r0 +/* 800A7928 000A4868 90 09 00 00 */ stw r0, 0(r9) +/* 800A792C 000A486C 54 E0 B0 12 */ slwi r0, r7, 0x16 +/* 800A7930 000A4870 80 E9 00 00 */ lwz r7, 0(r9) +/* 800A7934 000A4874 54 E7 03 52 */ rlwinm r7, r7, 0, 0xd, 9 +/* 800A7938 000A4878 7C E6 33 78 */ or r6, r7, r6 +/* 800A793C 000A487C 90 C9 00 00 */ stw r6, 0(r9) +/* 800A7940 000A4880 80 C9 00 00 */ lwz r6, 0(r9) +/* 800A7944 000A4884 54 C6 02 88 */ rlwinm r6, r6, 0, 0xa, 4 +/* 800A7948 000A4888 7C C0 03 78 */ or r0, r6, r0 +/* 800A794C 000A488C 90 09 00 00 */ stw r0, 0(r9) +/* 800A7950 000A4890 48 00 00 F8 */ b lbl_800A7A48 +lbl_800A7954: +/* 800A7954 000A4894 81 89 00 00 */ lwz r12, 0(r9) +/* 800A7958 000A4898 54 0B D8 08 */ slwi r11, r0, 0x1b +/* 800A795C 000A489C 54 C0 E0 06 */ slwi r0, r6, 0x1c +/* 800A7960 000A48A0 55 86 01 46 */ rlwinm r6, r12, 0, 5, 3 +/* 800A7964 000A48A4 7C C6 5B 78 */ or r6, r6, r11 +/* 800A7968 000A48A8 90 C9 00 00 */ stw r6, 0(r9) +/* 800A796C 000A48AC 80 C9 00 00 */ lwz r6, 0(r9) +/* 800A7970 000A48B0 54 C6 01 00 */ rlwinm r6, r6, 0, 4, 0 +/* 800A7974 000A48B4 7C C0 03 78 */ or r0, r6, r0 +/* 800A7978 000A48B8 90 09 00 00 */ stw r0, 0(r9) +/* 800A797C 000A48BC 80 0A 00 00 */ lwz r0, 0(r10) +/* 800A7980 000A48C0 54 00 00 34 */ rlwinm r0, r0, 0, 0, 0x1a +/* 800A7984 000A48C4 7C 00 3B 78 */ or r0, r0, r7 +/* 800A7988 000A48C8 90 0A 00 00 */ stw r0, 0(r10) +/* 800A798C 000A48CC 48 00 00 BC */ b lbl_800A7A48 +lbl_800A7990: +/* 800A7990 000A48D0 81 6A 00 00 */ lwz r11, 0(r10) +/* 800A7994 000A48D4 54 00 28 34 */ slwi r0, r0, 5 +/* 800A7998 000A48D8 54 C6 30 32 */ slwi r6, r6, 6 +/* 800A799C 000A48DC 55 6B 06 F2 */ rlwinm r11, r11, 0, 0x1b, 0x19 +/* 800A79A0 000A48E0 7D 60 03 78 */ or r0, r11, r0 +/* 800A79A4 000A48E4 90 0A 00 00 */ stw r0, 0(r10) +/* 800A79A8 000A48E8 54 E0 48 2C */ slwi r0, r7, 9 +/* 800A79AC 000A48EC 80 EA 00 00 */ lwz r7, 0(r10) +/* 800A79B0 000A48F0 54 E7 06 AC */ rlwinm r7, r7, 0, 0x1a, 0x16 +/* 800A79B4 000A48F4 7C E6 33 78 */ or r6, r7, r6 +/* 800A79B8 000A48F8 90 CA 00 00 */ stw r6, 0(r10) +/* 800A79BC 000A48FC 80 CA 00 00 */ lwz r6, 0(r10) +/* 800A79C0 000A4900 54 C6 05 E2 */ rlwinm r6, r6, 0, 0x17, 0x11 +/* 800A79C4 000A4904 7C C0 03 78 */ or r0, r6, r0 +/* 800A79C8 000A4908 90 0A 00 00 */ stw r0, 0(r10) +/* 800A79CC 000A490C 48 00 00 7C */ b lbl_800A7A48 +lbl_800A79D0: +/* 800A79D0 000A4910 81 6A 00 00 */ lwz r11, 0(r10) +/* 800A79D4 000A4914 54 00 70 22 */ slwi r0, r0, 0xe +/* 800A79D8 000A4918 54 C6 78 20 */ slwi r6, r6, 0xf +/* 800A79DC 000A491C 55 6B 04 A0 */ rlwinm r11, r11, 0, 0x12, 0x10 +/* 800A79E0 000A4920 7D 60 03 78 */ or r0, r11, r0 +/* 800A79E4 000A4924 90 0A 00 00 */ stw r0, 0(r10) +/* 800A79E8 000A4928 54 E0 90 1A */ slwi r0, r7, 0x12 +/* 800A79EC 000A492C 80 EA 00 00 */ lwz r7, 0(r10) +/* 800A79F0 000A4930 54 E7 04 5A */ rlwinm r7, r7, 0, 0x11, 0xd +/* 800A79F4 000A4934 7C E6 33 78 */ or r6, r7, r6 +/* 800A79F8 000A4938 90 CA 00 00 */ stw r6, 0(r10) +/* 800A79FC 000A493C 80 CA 00 00 */ lwz r6, 0(r10) +/* 800A7A00 000A4940 54 C6 03 90 */ rlwinm r6, r6, 0, 0xe, 8 +/* 800A7A04 000A4944 7C C0 03 78 */ or r0, r6, r0 +/* 800A7A08 000A4948 90 0A 00 00 */ stw r0, 0(r10) +/* 800A7A0C 000A494C 48 00 00 3C */ b lbl_800A7A48 +lbl_800A7A10: +/* 800A7A10 000A4950 81 8A 00 00 */ lwz r12, 0(r10) +/* 800A7A14 000A4954 54 0B B8 10 */ slwi r11, r0, 0x17 +/* 800A7A18 000A4958 54 C0 C0 0E */ slwi r0, r6, 0x18 +/* 800A7A1C 000A495C 55 86 02 4E */ rlwinm r6, r12, 0, 9, 7 +/* 800A7A20 000A4960 7C C6 5B 78 */ or r6, r6, r11 +/* 800A7A24 000A4964 90 CA 00 00 */ stw r6, 0(r10) +/* 800A7A28 000A4968 80 CA 00 00 */ lwz r6, 0(r10) +/* 800A7A2C 000A496C 54 C6 02 08 */ rlwinm r6, r6, 0, 8, 4 +/* 800A7A30 000A4970 7C C0 03 78 */ or r0, r6, r0 +/* 800A7A34 000A4974 90 0A 00 00 */ stw r0, 0(r10) +/* 800A7A38 000A4978 80 0A 00 00 */ lwz r0, 0(r10) +/* 800A7A3C 000A497C 54 00 01 7E */ clrlwi r0, r0, 5 +/* 800A7A40 000A4980 50 E0 D8 08 */ rlwimi r0, r7, 0x1b, 0, 4 +/* 800A7A44 000A4984 90 0A 00 00 */ stw r0, 0(r10) +lbl_800A7A48: +/* 800A7A48 000A4988 38 84 00 10 */ addi r4, r4, 0x10 +lbl_800A7A4C: +/* 800A7A4C 000A498C 80 04 00 00 */ lwz r0, 0(r4) +/* 800A7A50 000A4990 2C 00 00 FF */ cmpwi r0, 0xff +/* 800A7A54 000A4994 40 82 FC E0 */ bne lbl_800A7734 +/* 800A7A58 000A4998 80 AD 82 C8 */ lwz r5, gx@sda21(r13) +/* 800A7A5C 000A499C 54 60 06 3E */ clrlwi r0, r3, 0x18 +/* 800A7A60 000A49A0 38 60 00 01 */ li r3, 1 +/* 800A7A64 000A49A4 80 85 04 F4 */ lwz r4, 0x4f4(r5) +/* 800A7A68 000A49A8 7C 60 00 30 */ slw r0, r3, r0 +/* 800A7A6C 000A49AC 54 00 06 3E */ clrlwi r0, r0, 0x18 +/* 800A7A70 000A49B0 60 83 00 10 */ ori r3, r4, 0x10 +/* 800A7A74 000A49B4 90 65 04 F4 */ stw r3, 0x4f4(r5) +/* 800A7A78 000A49B8 80 8D 82 C8 */ lwz r4, gx@sda21(r13) +/* 800A7A7C 000A49BC 88 64 04 F2 */ lbz r3, 0x4f2(r4) +/* 800A7A80 000A49C0 7C 60 03 78 */ or r0, r3, r0 +/* 800A7A84 000A49C4 98 04 04 F2 */ stb r0, 0x4f2(r4) +/* 800A7A88 000A49C8 4E 80 00 20 */ blr + +.global __GXSetVAT +__GXSetVAT: +/* 800A7A8C 000A49CC 81 4D 82 C8 */ lwz r10, gx@sda21(r13) +/* 800A7A90 000A49D0 39 80 00 00 */ li r12, 0 +/* 800A7A94 000A49D4 39 60 00 00 */ li r11, 0 +/* 800A7A98 000A49D8 3C E0 CC 01 */ lis r7, 0xcc01 +/* 800A7A9C 000A49DC 48 00 00 70 */ b lbl_800A7B0C +lbl_800A7AA0: +/* 800A7AA0 000A49E0 55 89 06 3E */ clrlwi r9, r12, 0x18 +/* 800A7AA4 000A49E4 88 6A 04 F2 */ lbz r3, 0x4f2(r10) +/* 800A7AA8 000A49E8 38 00 00 01 */ li r0, 1 +/* 800A7AAC 000A49EC 7C 00 48 30 */ slw r0, r0, r9 +/* 800A7AB0 000A49F0 7C 60 00 39 */ and. r0, r3, r0 +/* 800A7AB4 000A49F4 41 82 00 50 */ beq lbl_800A7B04 +/* 800A7AB8 000A49F8 39 00 00 08 */ li r8, 8 +/* 800A7ABC 000A49FC 99 07 80 00 */ stb r8, -0x8000(r7) +/* 800A7AC0 000A4A00 61 23 00 70 */ ori r3, r9, 0x70 +/* 800A7AC4 000A4A04 38 0B 00 1C */ addi r0, r11, 0x1c +/* 800A7AC8 000A4A08 98 67 80 00 */ stb r3, -0x8000(r7) +/* 800A7ACC 000A4A0C 61 25 00 80 */ ori r5, r9, 0x80 +/* 800A7AD0 000A4A10 38 8B 00 3C */ addi r4, r11, 0x3c +/* 800A7AD4 000A4A14 7C CA 00 2E */ lwzx r6, r10, r0 +/* 800A7AD8 000A4A18 61 23 00 90 */ ori r3, r9, 0x90 +/* 800A7ADC 000A4A1C 38 0B 00 5C */ addi r0, r11, 0x5c +/* 800A7AE0 000A4A20 90 C7 80 00 */ stw r6, -0x8000(r7) +/* 800A7AE4 000A4A24 99 07 80 00 */ stb r8, -0x8000(r7) +/* 800A7AE8 000A4A28 98 A7 80 00 */ stb r5, -0x8000(r7) +/* 800A7AEC 000A4A2C 7C 8A 20 2E */ lwzx r4, r10, r4 +/* 800A7AF0 000A4A30 90 87 80 00 */ stw r4, -0x8000(r7) +/* 800A7AF4 000A4A34 99 07 80 00 */ stb r8, -0x8000(r7) +/* 800A7AF8 000A4A38 98 67 80 00 */ stb r3, -0x8000(r7) +/* 800A7AFC 000A4A3C 7C 0A 00 2E */ lwzx r0, r10, r0 +/* 800A7B00 000A4A40 90 07 80 00 */ stw r0, -0x8000(r7) +lbl_800A7B04: +/* 800A7B04 000A4A44 39 6B 00 04 */ addi r11, r11, 4 +/* 800A7B08 000A4A48 39 8C 00 01 */ addi r12, r12, 1 +lbl_800A7B0C: +/* 800A7B0C 000A4A4C 55 80 06 3E */ clrlwi r0, r12, 0x18 +/* 800A7B10 000A4A50 28 00 00 08 */ cmplwi r0, 8 +/* 800A7B14 000A4A54 41 80 FF 8C */ blt lbl_800A7AA0 +/* 800A7B18 000A4A58 80 6D 82 C8 */ lwz r3, gx@sda21(r13) +/* 800A7B1C 000A4A5C 38 00 00 00 */ li r0, 0 +/* 800A7B20 000A4A60 98 03 04 F2 */ stb r0, 0x4f2(r3) +/* 800A7B24 000A4A64 4E 80 00 20 */ blr + +.global GXGetVtxAttrFmt +GXGetVtxAttrFmt: +/* 800A7B28 000A4A68 38 04 FF F7 */ addi r0, r4, -9 +/* 800A7B2C 000A4A6C 80 8D 82 C8 */ lwz r4, gx@sda21(r13) +/* 800A7B30 000A4A70 54 63 10 3A */ slwi r3, r3, 2 +/* 800A7B34 000A4A74 7C 84 1A 14 */ add r4, r4, r3 +/* 800A7B38 000A4A78 28 00 00 10 */ cmplwi r0, 0x10 +/* 800A7B3C 000A4A7C 38 64 00 1C */ addi r3, r4, 0x1c +/* 800A7B40 000A4A80 39 04 00 3C */ addi r8, r4, 0x3c +/* 800A7B44 000A4A84 39 24 00 5C */ addi r9, r4, 0x5c +/* 800A7B48 000A4A88 41 81 02 10 */ bgt lbl_800A7D58 +/* 800A7B4C 000A4A8C 3C 80 80 3B */ lis r4, "@393"@ha +/* 800A7B50 000A4A90 38 84 17 00 */ addi r4, r4, "@393"@l +/* 800A7B54 000A4A94 54 00 10 3A */ slwi r0, r0, 2 +/* 800A7B58 000A4A98 7C 04 00 2E */ lwzx r0, r4, r0 +/* 800A7B5C 000A4A9C 7C 09 03 A6 */ mtctr r0 +/* 800A7B60 000A4AA0 4E 80 04 20 */ bctr +lbl_800A7B64: +/* 800A7B64 000A4AA4 80 03 00 00 */ lwz r0, 0(r3) +/* 800A7B68 000A4AA8 54 00 07 FE */ clrlwi r0, r0, 0x1f +/* 800A7B6C 000A4AAC 90 05 00 00 */ stw r0, 0(r5) +/* 800A7B70 000A4AB0 80 03 00 00 */ lwz r0, 0(r3) +/* 800A7B74 000A4AB4 54 00 FF 7E */ rlwinm r0, r0, 0x1f, 0x1d, 0x1f +/* 800A7B78 000A4AB8 90 06 00 00 */ stw r0, 0(r6) +/* 800A7B7C 000A4ABC 80 03 00 00 */ lwz r0, 0(r3) +/* 800A7B80 000A4AC0 54 00 E6 FE */ rlwinm r0, r0, 0x1c, 0x1b, 0x1f +/* 800A7B84 000A4AC4 98 07 00 00 */ stb r0, 0(r7) +/* 800A7B88 000A4AC8 4E 80 00 20 */ blr +lbl_800A7B8C: +/* 800A7B8C 000A4ACC 80 03 00 00 */ lwz r0, 0(r3) +/* 800A7B90 000A4AD0 54 00 BF FE */ rlwinm r0, r0, 0x17, 0x1f, 0x1f +/* 800A7B94 000A4AD4 90 05 00 00 */ stw r0, 0(r5) +/* 800A7B98 000A4AD8 80 05 00 00 */ lwz r0, 0(r5) +/* 800A7B9C 000A4ADC 2C 00 00 01 */ cmpwi r0, 1 +/* 800A7BA0 000A4AE0 40 82 00 18 */ bne lbl_800A7BB8 +/* 800A7BA4 000A4AE4 80 03 00 00 */ lwz r0, 0(r3) +/* 800A7BA8 000A4AE8 54 00 0F FF */ rlwinm. r0, r0, 1, 0x1f, 0x1f +/* 800A7BAC 000A4AEC 41 82 00 0C */ beq lbl_800A7BB8 +/* 800A7BB0 000A4AF0 38 00 00 02 */ li r0, 2 +/* 800A7BB4 000A4AF4 90 05 00 00 */ stw r0, 0(r5) +lbl_800A7BB8: +/* 800A7BB8 000A4AF8 80 63 00 00 */ lwz r3, 0(r3) +/* 800A7BBC 000A4AFC 38 00 00 00 */ li r0, 0 +/* 800A7BC0 000A4B00 54 63 B7 7E */ rlwinm r3, r3, 0x16, 0x1d, 0x1f +/* 800A7BC4 000A4B04 90 66 00 00 */ stw r3, 0(r6) +/* 800A7BC8 000A4B08 98 07 00 00 */ stb r0, 0(r7) +/* 800A7BCC 000A4B0C 4E 80 00 20 */ blr +lbl_800A7BD0: +/* 800A7BD0 000A4B10 80 83 00 00 */ lwz r4, 0(r3) +/* 800A7BD4 000A4B14 38 00 00 00 */ li r0, 0 +/* 800A7BD8 000A4B18 54 84 9F FE */ rlwinm r4, r4, 0x13, 0x1f, 0x1f +/* 800A7BDC 000A4B1C 90 85 00 00 */ stw r4, 0(r5) +/* 800A7BE0 000A4B20 80 63 00 00 */ lwz r3, 0(r3) +/* 800A7BE4 000A4B24 54 63 97 7E */ rlwinm r3, r3, 0x12, 0x1d, 0x1f +/* 800A7BE8 000A4B28 90 66 00 00 */ stw r3, 0(r6) +/* 800A7BEC 000A4B2C 98 07 00 00 */ stb r0, 0(r7) +/* 800A7BF0 000A4B30 4E 80 00 20 */ blr +lbl_800A7BF4: +/* 800A7BF4 000A4B34 80 83 00 00 */ lwz r4, 0(r3) +/* 800A7BF8 000A4B38 38 00 00 00 */ li r0, 0 +/* 800A7BFC 000A4B3C 54 84 7F FE */ rlwinm r4, r4, 0xf, 0x1f, 0x1f +/* 800A7C00 000A4B40 90 85 00 00 */ stw r4, 0(r5) +/* 800A7C04 000A4B44 80 63 00 00 */ lwz r3, 0(r3) +/* 800A7C08 000A4B48 54 63 77 7E */ rlwinm r3, r3, 0xe, 0x1d, 0x1f +/* 800A7C0C 000A4B4C 90 66 00 00 */ stw r3, 0(r6) +/* 800A7C10 000A4B50 98 07 00 00 */ stb r0, 0(r7) +/* 800A7C14 000A4B54 4E 80 00 20 */ blr +lbl_800A7C18: +/* 800A7C18 000A4B58 80 03 00 00 */ lwz r0, 0(r3) +/* 800A7C1C 000A4B5C 54 00 5F FE */ rlwinm r0, r0, 0xb, 0x1f, 0x1f +/* 800A7C20 000A4B60 90 05 00 00 */ stw r0, 0(r5) +/* 800A7C24 000A4B64 80 03 00 00 */ lwz r0, 0(r3) +/* 800A7C28 000A4B68 54 00 57 7E */ rlwinm r0, r0, 0xa, 0x1d, 0x1f +/* 800A7C2C 000A4B6C 90 06 00 00 */ stw r0, 0(r6) +/* 800A7C30 000A4B70 80 03 00 00 */ lwz r0, 0(r3) +/* 800A7C34 000A4B74 54 00 3E FE */ rlwinm r0, r0, 7, 0x1b, 0x1f +/* 800A7C38 000A4B78 98 07 00 00 */ stb r0, 0(r7) +/* 800A7C3C 000A4B7C 4E 80 00 20 */ blr +lbl_800A7C40: +/* 800A7C40 000A4B80 80 08 00 00 */ lwz r0, 0(r8) +/* 800A7C44 000A4B84 54 00 07 FE */ clrlwi r0, r0, 0x1f +/* 800A7C48 000A4B88 90 05 00 00 */ stw r0, 0(r5) +/* 800A7C4C 000A4B8C 80 08 00 00 */ lwz r0, 0(r8) +/* 800A7C50 000A4B90 54 00 FF 7E */ rlwinm r0, r0, 0x1f, 0x1d, 0x1f +/* 800A7C54 000A4B94 90 06 00 00 */ stw r0, 0(r6) +/* 800A7C58 000A4B98 80 08 00 00 */ lwz r0, 0(r8) +/* 800A7C5C 000A4B9C 54 00 E6 FE */ rlwinm r0, r0, 0x1c, 0x1b, 0x1f +/* 800A7C60 000A4BA0 98 07 00 00 */ stb r0, 0(r7) +/* 800A7C64 000A4BA4 4E 80 00 20 */ blr +lbl_800A7C68: +/* 800A7C68 000A4BA8 80 08 00 00 */ lwz r0, 0(r8) +/* 800A7C6C 000A4BAC 54 00 BF FE */ rlwinm r0, r0, 0x17, 0x1f, 0x1f +/* 800A7C70 000A4BB0 90 05 00 00 */ stw r0, 0(r5) +/* 800A7C74 000A4BB4 80 08 00 00 */ lwz r0, 0(r8) +/* 800A7C78 000A4BB8 54 00 B7 7E */ rlwinm r0, r0, 0x16, 0x1d, 0x1f +/* 800A7C7C 000A4BBC 90 06 00 00 */ stw r0, 0(r6) +/* 800A7C80 000A4BC0 80 08 00 00 */ lwz r0, 0(r8) +/* 800A7C84 000A4BC4 54 00 9E FE */ rlwinm r0, r0, 0x13, 0x1b, 0x1f +/* 800A7C88 000A4BC8 98 07 00 00 */ stb r0, 0(r7) +/* 800A7C8C 000A4BCC 4E 80 00 20 */ blr +lbl_800A7C90: +/* 800A7C90 000A4BD0 80 08 00 00 */ lwz r0, 0(r8) +/* 800A7C94 000A4BD4 54 00 77 FE */ rlwinm r0, r0, 0xe, 0x1f, 0x1f +/* 800A7C98 000A4BD8 90 05 00 00 */ stw r0, 0(r5) +/* 800A7C9C 000A4BDC 80 08 00 00 */ lwz r0, 0(r8) +/* 800A7CA0 000A4BE0 54 00 6F 7E */ rlwinm r0, r0, 0xd, 0x1d, 0x1f +/* 800A7CA4 000A4BE4 90 06 00 00 */ stw r0, 0(r6) +/* 800A7CA8 000A4BE8 80 08 00 00 */ lwz r0, 0(r8) +/* 800A7CAC 000A4BEC 54 00 56 FE */ rlwinm r0, r0, 0xa, 0x1b, 0x1f +/* 800A7CB0 000A4BF0 98 07 00 00 */ stb r0, 0(r7) +/* 800A7CB4 000A4BF4 4E 80 00 20 */ blr +lbl_800A7CB8: +/* 800A7CB8 000A4BF8 80 08 00 00 */ lwz r0, 0(r8) +/* 800A7CBC 000A4BFC 54 00 2F FE */ rlwinm r0, r0, 5, 0x1f, 0x1f +/* 800A7CC0 000A4C00 90 05 00 00 */ stw r0, 0(r5) +/* 800A7CC4 000A4C04 80 08 00 00 */ lwz r0, 0(r8) +/* 800A7CC8 000A4C08 54 00 27 7E */ rlwinm r0, r0, 4, 0x1d, 0x1f +/* 800A7CCC 000A4C0C 90 06 00 00 */ stw r0, 0(r6) +/* 800A7CD0 000A4C10 80 09 00 00 */ lwz r0, 0(r9) +/* 800A7CD4 000A4C14 54 00 06 FE */ clrlwi r0, r0, 0x1b +/* 800A7CD8 000A4C18 98 07 00 00 */ stb r0, 0(r7) +/* 800A7CDC 000A4C1C 4E 80 00 20 */ blr +lbl_800A7CE0: +/* 800A7CE0 000A4C20 80 09 00 00 */ lwz r0, 0(r9) +/* 800A7CE4 000A4C24 54 00 DF FE */ rlwinm r0, r0, 0x1b, 0x1f, 0x1f +/* 800A7CE8 000A4C28 90 05 00 00 */ stw r0, 0(r5) +/* 800A7CEC 000A4C2C 80 09 00 00 */ lwz r0, 0(r9) +/* 800A7CF0 000A4C30 54 00 D7 7E */ rlwinm r0, r0, 0x1a, 0x1d, 0x1f +/* 800A7CF4 000A4C34 90 06 00 00 */ stw r0, 0(r6) +/* 800A7CF8 000A4C38 80 09 00 00 */ lwz r0, 0(r9) +/* 800A7CFC 000A4C3C 54 00 BE FE */ rlwinm r0, r0, 0x17, 0x1b, 0x1f +/* 800A7D00 000A4C40 98 07 00 00 */ stb r0, 0(r7) +/* 800A7D04 000A4C44 4E 80 00 20 */ blr +lbl_800A7D08: +/* 800A7D08 000A4C48 80 09 00 00 */ lwz r0, 0(r9) +/* 800A7D0C 000A4C4C 54 00 97 FE */ rlwinm r0, r0, 0x12, 0x1f, 0x1f +/* 800A7D10 000A4C50 90 05 00 00 */ stw r0, 0(r5) +/* 800A7D14 000A4C54 80 09 00 00 */ lwz r0, 0(r9) +/* 800A7D18 000A4C58 54 00 8F 7E */ rlwinm r0, r0, 0x11, 0x1d, 0x1f +/* 800A7D1C 000A4C5C 90 06 00 00 */ stw r0, 0(r6) +/* 800A7D20 000A4C60 80 09 00 00 */ lwz r0, 0(r9) +/* 800A7D24 000A4C64 54 00 76 FE */ rlwinm r0, r0, 0xe, 0x1b, 0x1f +/* 800A7D28 000A4C68 98 07 00 00 */ stb r0, 0(r7) +/* 800A7D2C 000A4C6C 4E 80 00 20 */ blr +lbl_800A7D30: +/* 800A7D30 000A4C70 80 09 00 00 */ lwz r0, 0(r9) +/* 800A7D34 000A4C74 54 00 4F FE */ rlwinm r0, r0, 9, 0x1f, 0x1f +/* 800A7D38 000A4C78 90 05 00 00 */ stw r0, 0(r5) +/* 800A7D3C 000A4C7C 80 09 00 00 */ lwz r0, 0(r9) +/* 800A7D40 000A4C80 54 00 47 7E */ rlwinm r0, r0, 8, 0x1d, 0x1f +/* 800A7D44 000A4C84 90 06 00 00 */ stw r0, 0(r6) +/* 800A7D48 000A4C88 80 09 00 00 */ lwz r0, 0(r9) +/* 800A7D4C 000A4C8C 54 00 2E FE */ srwi r0, r0, 0x1b +/* 800A7D50 000A4C90 98 07 00 00 */ stb r0, 0(r7) +/* 800A7D54 000A4C94 4E 80 00 20 */ blr +lbl_800A7D58: +/* 800A7D58 000A4C98 38 00 00 01 */ li r0, 1 +/* 800A7D5C 000A4C9C 90 05 00 00 */ stw r0, 0(r5) +/* 800A7D60 000A4CA0 38 00 00 00 */ li r0, 0 +/* 800A7D64 000A4CA4 90 06 00 00 */ stw r0, 0(r6) +/* 800A7D68 000A4CA8 98 07 00 00 */ stb r0, 0(r7) +/* 800A7D6C 000A4CAC 4E 80 00 20 */ blr + +.global GXGetVtxAttrFmtv +GXGetVtxAttrFmtv: +/* 800A7D70 000A4CB0 7C 08 02 A6 */ mflr r0 +/* 800A7D74 000A4CB4 90 01 00 04 */ stw r0, 4(r1) +/* 800A7D78 000A4CB8 94 21 FF E0 */ stwu r1, -0x20(r1) +/* 800A7D7C 000A4CBC 93 E1 00 1C */ stw r31, 0x1c(r1) +/* 800A7D80 000A4CC0 3B E0 00 09 */ li r31, 9 +/* 800A7D84 000A4CC4 93 C1 00 18 */ stw r30, 0x18(r1) +/* 800A7D88 000A4CC8 3B C4 00 00 */ addi r30, r4, 0 +/* 800A7D8C 000A4CCC 93 A1 00 14 */ stw r29, 0x14(r1) +/* 800A7D90 000A4CD0 3B A3 00 00 */ addi r29, r3, 0 +lbl_800A7D94: +/* 800A7D94 000A4CD4 93 FE 00 00 */ stw r31, 0(r30) +/* 800A7D98 000A4CD8 38 7D 00 00 */ addi r3, r29, 0 +/* 800A7D9C 000A4CDC 38 9F 00 00 */ addi r4, r31, 0 +/* 800A7DA0 000A4CE0 38 BE 00 04 */ addi r5, r30, 4 +/* 800A7DA4 000A4CE4 38 DE 00 08 */ addi r6, r30, 8 +/* 800A7DA8 000A4CE8 38 FE 00 0C */ addi r7, r30, 0xc +/* 800A7DAC 000A4CEC 4B FF FD 7D */ bl GXGetVtxAttrFmt +/* 800A7DB0 000A4CF0 3B FF 00 01 */ addi r31, r31, 1 +/* 800A7DB4 000A4CF4 2C 1F 00 1A */ cmpwi r31, 0x1a +/* 800A7DB8 000A4CF8 3B DE 00 10 */ addi r30, r30, 0x10 +/* 800A7DBC 000A4CFC 41 80 FF D8 */ blt lbl_800A7D94 +/* 800A7DC0 000A4D00 38 00 00 FF */ li r0, 0xff +/* 800A7DC4 000A4D04 90 1E 00 00 */ stw r0, 0(r30) +/* 800A7DC8 000A4D08 80 01 00 24 */ lwz r0, 0x24(r1) +/* 800A7DCC 000A4D0C 83 E1 00 1C */ lwz r31, 0x1c(r1) +/* 800A7DD0 000A4D10 83 C1 00 18 */ lwz r30, 0x18(r1) +/* 800A7DD4 000A4D14 83 A1 00 14 */ lwz r29, 0x14(r1) +/* 800A7DD8 000A4D18 38 21 00 20 */ addi r1, r1, 0x20 +/* 800A7DDC 000A4D1C 7C 08 03 A6 */ mtlr r0 +/* 800A7DE0 000A4D20 4E 80 00 20 */ blr + +.global GXSetArray +GXSetArray: +/* 800A7DE4 000A4D24 2C 03 00 19 */ cmpwi r3, 0x19 +/* 800A7DE8 000A4D28 40 82 00 08 */ bne lbl_800A7DF0 +/* 800A7DEC 000A4D2C 38 60 00 0A */ li r3, 0xa +lbl_800A7DF0: +/* 800A7DF0 000A4D30 38 00 00 08 */ li r0, 8 +/* 800A7DF4 000A4D34 38 C3 FF F7 */ addi r6, r3, -9 +/* 800A7DF8 000A4D38 3C 60 CC 01 */ lis r3, 0xCC008000@ha +/* 800A7DFC 000A4D3C 98 03 80 00 */ stb r0, 0xCC008000@l(r3) +/* 800A7E00 000A4D40 60 C0 00 A0 */ ori r0, r6, 0xa0 +/* 800A7E04 000A4D44 54 84 00 BE */ clrlwi r4, r4, 2 +/* 800A7E08 000A4D48 98 03 80 00 */ stb r0, -0x8000(r3) +/* 800A7E0C 000A4D4C 34 06 FF F4 */ addic. r0, r6, -12 +/* 800A7E10 000A4D50 90 83 80 00 */ stw r4, -0x8000(r3) +/* 800A7E14 000A4D54 41 80 00 1C */ blt lbl_800A7E30 +/* 800A7E18 000A4D58 2C 00 00 04 */ cmpwi r0, 4 +/* 800A7E1C 000A4D5C 40 80 00 14 */ bge lbl_800A7E30 +/* 800A7E20 000A4D60 80 6D 82 C8 */ lwz r3, gx@sda21(r13) +/* 800A7E24 000A4D64 54 00 10 3A */ slwi r0, r0, 2 +/* 800A7E28 000A4D68 7C 63 02 14 */ add r3, r3, r0 +/* 800A7E2C 000A4D6C 90 83 00 88 */ stw r4, 0x88(r3) +lbl_800A7E30: +/* 800A7E30 000A4D70 38 00 00 08 */ li r0, 8 +/* 800A7E34 000A4D74 3C 60 CC 01 */ lis r3, 0xCC008000@ha +/* 800A7E38 000A4D78 98 03 80 00 */ stb r0, 0xCC008000@l(r3) +/* 800A7E3C 000A4D7C 60 C0 00 B0 */ ori r0, r6, 0xb0 +/* 800A7E40 000A4D80 54 A4 06 3E */ clrlwi r4, r5, 0x18 +/* 800A7E44 000A4D84 98 03 80 00 */ stb r0, -0x8000(r3) +/* 800A7E48 000A4D88 34 06 FF F4 */ addic. r0, r6, -12 +/* 800A7E4C 000A4D8C 90 83 80 00 */ stw r4, -0x8000(r3) +/* 800A7E50 000A4D90 4D 80 00 20 */ bltlr +/* 800A7E54 000A4D94 2C 00 00 04 */ cmpwi r0, 4 +/* 800A7E58 000A4D98 4C 80 00 20 */ bgelr +/* 800A7E5C 000A4D9C 80 6D 82 C8 */ lwz r3, gx@sda21(r13) +/* 800A7E60 000A4DA0 54 00 10 3A */ slwi r0, r0, 2 +/* 800A7E64 000A4DA4 7C 63 02 14 */ add r3, r3, r0 +/* 800A7E68 000A4DA8 90 83 00 98 */ stw r4, 0x98(r3) +/* 800A7E6C 000A4DAC 4E 80 00 20 */ blr + +.global GXInvalidateVtxCache +GXInvalidateVtxCache: +/* 800A7E70 000A4DB0 38 00 00 48 */ li r0, 0x48 +/* 800A7E74 000A4DB4 3C 60 CC 01 */ lis r3, 0xCC008000@ha +/* 800A7E78 000A4DB8 98 03 80 00 */ stb r0, 0xCC008000@l(r3) +/* 800A7E7C 000A4DBC 4E 80 00 20 */ blr + +.global GXSetTexCoordGen2 +GXSetTexCoordGen2: +/* 800A7E80 000A4DC0 7C 08 02 A6 */ mflr r0 +/* 800A7E84 000A4DC4 28 05 00 14 */ cmplwi r5, 0x14 +/* 800A7E88 000A4DC8 90 01 00 04 */ stw r0, 4(r1) +/* 800A7E8C 000A4DCC 39 60 00 00 */ li r11, 0 +/* 800A7E90 000A4DD0 39 80 00 00 */ li r12, 0 +/* 800A7E94 000A4DD4 94 21 FF F8 */ stwu r1, -8(r1) +/* 800A7E98 000A4DD8 39 40 00 05 */ li r10, 5 +/* 800A7E9C 000A4DDC 41 81 00 98 */ bgt lbl_800A7F34 +/* 800A7EA0 000A4DE0 3D 20 80 3B */ lis r9, "@498"@ha +/* 800A7EA4 000A4DE4 39 29 17 60 */ addi r9, r9, "@498"@l +/* 800A7EA8 000A4DE8 54 A0 10 3A */ slwi r0, r5, 2 +/* 800A7EAC 000A4DEC 7C 09 00 2E */ lwzx r0, r9, r0 +/* 800A7EB0 000A4DF0 7C 09 03 A6 */ mtctr r0 +/* 800A7EB4 000A4DF4 4E 80 04 20 */ bctr +lbl_800A7EB8: +/* 800A7EB8 000A4DF8 39 40 00 00 */ li r10, 0 +/* 800A7EBC 000A4DFC 39 80 00 01 */ li r12, 1 +/* 800A7EC0 000A4E00 48 00 00 74 */ b lbl_800A7F34 +lbl_800A7EC4: +/* 800A7EC4 000A4E04 39 40 00 01 */ li r10, 1 +/* 800A7EC8 000A4E08 39 80 00 01 */ li r12, 1 +/* 800A7ECC 000A4E0C 48 00 00 68 */ b lbl_800A7F34 +lbl_800A7ED0: +/* 800A7ED0 000A4E10 39 40 00 03 */ li r10, 3 +/* 800A7ED4 000A4E14 39 80 00 01 */ li r12, 1 +/* 800A7ED8 000A4E18 48 00 00 5C */ b lbl_800A7F34 +lbl_800A7EDC: +/* 800A7EDC 000A4E1C 39 40 00 04 */ li r10, 4 +/* 800A7EE0 000A4E20 39 80 00 01 */ li r12, 1 +/* 800A7EE4 000A4E24 48 00 00 50 */ b lbl_800A7F34 +lbl_800A7EE8: +/* 800A7EE8 000A4E28 39 40 00 02 */ li r10, 2 +/* 800A7EEC 000A4E2C 48 00 00 48 */ b lbl_800A7F34 +lbl_800A7EF0: +/* 800A7EF0 000A4E30 39 40 00 02 */ li r10, 2 +/* 800A7EF4 000A4E34 48 00 00 40 */ b lbl_800A7F34 +lbl_800A7EF8: +/* 800A7EF8 000A4E38 39 40 00 05 */ li r10, 5 +/* 800A7EFC 000A4E3C 48 00 00 38 */ b lbl_800A7F34 +lbl_800A7F00: +/* 800A7F00 000A4E40 39 40 00 06 */ li r10, 6 +/* 800A7F04 000A4E44 48 00 00 30 */ b lbl_800A7F34 +lbl_800A7F08: +/* 800A7F08 000A4E48 39 40 00 07 */ li r10, 7 +/* 800A7F0C 000A4E4C 48 00 00 28 */ b lbl_800A7F34 +lbl_800A7F10: +/* 800A7F10 000A4E50 39 40 00 08 */ li r10, 8 +/* 800A7F14 000A4E54 48 00 00 20 */ b lbl_800A7F34 +lbl_800A7F18: +/* 800A7F18 000A4E58 39 40 00 09 */ li r10, 9 +/* 800A7F1C 000A4E5C 48 00 00 18 */ b lbl_800A7F34 +lbl_800A7F20: +/* 800A7F20 000A4E60 39 40 00 0A */ li r10, 0xa +/* 800A7F24 000A4E64 48 00 00 10 */ b lbl_800A7F34 +lbl_800A7F28: +/* 800A7F28 000A4E68 39 40 00 0B */ li r10, 0xb +/* 800A7F2C 000A4E6C 48 00 00 08 */ b lbl_800A7F34 +lbl_800A7F30: +/* 800A7F30 000A4E70 39 40 00 0C */ li r10, 0xc +lbl_800A7F34: +/* 800A7F34 000A4E74 2C 04 00 01 */ cmpwi r4, 1 +/* 800A7F38 000A4E78 41 82 00 24 */ beq lbl_800A7F5C +/* 800A7F3C 000A4E7C 40 80 00 10 */ bge lbl_800A7F4C +/* 800A7F40 000A4E80 2C 04 00 00 */ cmpwi r4, 0 +/* 800A7F44 000A4E84 40 80 00 2C */ bge lbl_800A7F70 +/* 800A7F48 000A4E88 48 00 00 A4 */ b lbl_800A7FEC +lbl_800A7F4C: +/* 800A7F4C 000A4E8C 2C 04 00 0A */ cmpwi r4, 0xa +/* 800A7F50 000A4E90 41 82 00 74 */ beq lbl_800A7FC4 +/* 800A7F54 000A4E94 40 80 00 98 */ bge lbl_800A7FEC +/* 800A7F58 000A4E98 48 00 00 30 */ b lbl_800A7F88 +lbl_800A7F5C: +/* 800A7F5C 000A4E9C 55 80 10 3A */ slwi r0, r12, 2 +/* 800A7F60 000A4EA0 54 04 07 26 */ rlwinm r4, r0, 0, 0x1c, 0x13 +/* 800A7F64 000A4EA4 55 40 38 30 */ slwi r0, r10, 7 +/* 800A7F68 000A4EA8 7C 8B 03 78 */ or r11, r4, r0 +/* 800A7F6C 000A4EAC 48 00 00 80 */ b lbl_800A7FEC +lbl_800A7F70: +/* 800A7F70 000A4EB0 55 80 10 3A */ slwi r0, r12, 2 +/* 800A7F74 000A4EB4 60 00 00 02 */ ori r0, r0, 2 +/* 800A7F78 000A4EB8 54 04 07 26 */ rlwinm r4, r0, 0, 0x1c, 0x13 +/* 800A7F7C 000A4EBC 55 40 38 30 */ slwi r0, r10, 7 +/* 800A7F80 000A4EC0 7C 8B 03 78 */ or r11, r4, r0 +/* 800A7F84 000A4EC4 48 00 00 68 */ b lbl_800A7FEC +lbl_800A7F88: +/* 800A7F88 000A4EC8 55 80 10 3A */ slwi r0, r12, 2 +/* 800A7F8C 000A4ECC 54 00 07 30 */ rlwinm r0, r0, 0, 0x1c, 0x18 +/* 800A7F90 000A4ED0 60 00 00 10 */ ori r0, r0, 0x10 +/* 800A7F94 000A4ED4 54 09 06 66 */ rlwinm r9, r0, 0, 0x19, 0x13 +/* 800A7F98 000A4ED8 55 40 38 30 */ slwi r0, r10, 7 +/* 800A7F9C 000A4EDC 7D 29 03 78 */ or r9, r9, r0 +/* 800A7FA0 000A4EE0 38 A5 FF F4 */ addi r5, r5, -12 +/* 800A7FA4 000A4EE4 38 04 FF FE */ addi r0, r4, -2 +/* 800A7FA8 000A4EE8 55 29 05 20 */ rlwinm r9, r9, 0, 0x14, 0x10 +/* 800A7FAC 000A4EEC 54 A4 60 26 */ slwi r4, r5, 0xc +/* 800A7FB0 000A4EF0 7D 24 23 78 */ or r4, r9, r4 +/* 800A7FB4 000A4EF4 54 84 04 5A */ rlwinm r4, r4, 0, 0x11, 0xd +/* 800A7FB8 000A4EF8 54 00 78 20 */ slwi r0, r0, 0xf +/* 800A7FBC 000A4EFC 7C 8B 03 78 */ or r11, r4, r0 +/* 800A7FC0 000A4F00 48 00 00 2C */ b lbl_800A7FEC +lbl_800A7FC4: +/* 800A7FC4 000A4F04 2C 05 00 13 */ cmpwi r5, 0x13 +/* 800A7FC8 000A4F08 55 80 10 3A */ slwi r0, r12, 2 +/* 800A7FCC 000A4F0C 40 82 00 10 */ bne lbl_800A7FDC +/* 800A7FD0 000A4F10 54 00 07 30 */ rlwinm r0, r0, 0, 0x1c, 0x18 +/* 800A7FD4 000A4F14 60 00 00 20 */ ori r0, r0, 0x20 +/* 800A7FD8 000A4F18 48 00 00 0C */ b lbl_800A7FE4 +lbl_800A7FDC: +/* 800A7FDC 000A4F1C 54 00 07 30 */ rlwinm r0, r0, 0, 0x1c, 0x18 +/* 800A7FE0 000A4F20 60 00 00 30 */ ori r0, r0, 0x30 +lbl_800A7FE4: +/* 800A7FE4 000A4F24 54 00 06 66 */ rlwinm r0, r0, 0, 0x19, 0x13 +/* 800A7FE8 000A4F28 60 0B 01 00 */ ori r11, r0, 0x100 +lbl_800A7FEC: +/* 800A7FEC 000A4F2C 39 40 00 10 */ li r10, 0x10 +/* 800A7FF0 000A4F30 3D 20 CC 01 */ lis r9, 0xCC008000@ha +/* 800A7FF4 000A4F34 99 49 80 00 */ stb r10, 0xCC008000@l(r9) +/* 800A7FF8 000A4F38 38 03 10 40 */ addi r0, r3, 0x1040 +/* 800A7FFC 000A4F3C 38 88 FF C0 */ addi r4, r8, -64 +/* 800A8000 000A4F40 90 09 80 00 */ stw r0, -0x8000(r9) +/* 800A8004 000A4F44 54 85 06 2C */ rlwinm r5, r4, 0, 0x18, 0x16 +/* 800A8008 000A4F48 54 E4 44 2E */ rlwinm r4, r7, 8, 0x10, 0x17 +/* 800A800C 000A4F4C 91 69 80 00 */ stw r11, -0x8000(r9) +/* 800A8010 000A4F50 38 03 10 50 */ addi r0, r3, 0x1050 +/* 800A8014 000A4F54 28 03 00 06 */ cmplwi r3, 6 +/* 800A8018 000A4F58 99 49 80 00 */ stb r10, -0x8000(r9) +/* 800A801C 000A4F5C 7C A4 23 78 */ or r4, r5, r4 +/* 800A8020 000A4F60 90 09 80 00 */ stw r0, -0x8000(r9) +/* 800A8024 000A4F64 90 89 80 00 */ stw r4, -0x8000(r9) +/* 800A8028 000A4F68 41 81 00 F4 */ bgt lbl_800A811C +/* 800A802C 000A4F6C 3C 80 80 3B */ lis r4, "@499"@ha +/* 800A8030 000A4F70 38 84 17 44 */ addi r4, r4, "@499"@l +/* 800A8034 000A4F74 54 60 10 3A */ slwi r0, r3, 2 +/* 800A8038 000A4F78 7C 04 00 2E */ lwzx r0, r4, r0 +/* 800A803C 000A4F7C 7C 09 03 A6 */ mtctr r0 +/* 800A8040 000A4F80 4E 80 04 20 */ bctr +lbl_800A8044: +/* 800A8044 000A4F84 80 8D 82 C8 */ lwz r4, gx@sda21(r13) +/* 800A8048 000A4F88 54 C0 30 32 */ slwi r0, r6, 6 +/* 800A804C 000A4F8C 38 A4 00 80 */ addi r5, r4, 0x80 +/* 800A8050 000A4F90 80 84 00 80 */ lwz r4, 0x80(r4) +/* 800A8054 000A4F94 54 84 06 A6 */ rlwinm r4, r4, 0, 0x1a, 0x13 +/* 800A8058 000A4F98 7C 80 03 78 */ or r0, r4, r0 +/* 800A805C 000A4F9C 90 05 00 00 */ stw r0, 0(r5) +/* 800A8060 000A4FA0 48 00 00 D8 */ b lbl_800A8138 +lbl_800A8064: +/* 800A8064 000A4FA4 80 8D 82 C8 */ lwz r4, gx@sda21(r13) +/* 800A8068 000A4FA8 54 C0 60 26 */ slwi r0, r6, 0xc +/* 800A806C 000A4FAC 38 A4 00 80 */ addi r5, r4, 0x80 +/* 800A8070 000A4FB0 80 84 00 80 */ lwz r4, 0x80(r4) +/* 800A8074 000A4FB4 54 84 05 1A */ rlwinm r4, r4, 0, 0x14, 0xd +/* 800A8078 000A4FB8 7C 80 03 78 */ or r0, r4, r0 +/* 800A807C 000A4FBC 90 05 00 00 */ stw r0, 0(r5) +/* 800A8080 000A4FC0 48 00 00 B8 */ b lbl_800A8138 +lbl_800A8084: +/* 800A8084 000A4FC4 80 8D 82 C8 */ lwz r4, gx@sda21(r13) +/* 800A8088 000A4FC8 54 C0 90 1A */ slwi r0, r6, 0x12 +/* 800A808C 000A4FCC 38 A4 00 80 */ addi r5, r4, 0x80 +/* 800A8090 000A4FD0 80 84 00 80 */ lwz r4, 0x80(r4) +/* 800A8094 000A4FD4 54 84 03 8E */ rlwinm r4, r4, 0, 0xe, 7 +/* 800A8098 000A4FD8 7C 80 03 78 */ or r0, r4, r0 +/* 800A809C 000A4FDC 90 05 00 00 */ stw r0, 0(r5) +/* 800A80A0 000A4FE0 48 00 00 98 */ b lbl_800A8138 +lbl_800A80A4: +/* 800A80A4 000A4FE4 80 8D 82 C8 */ lwz r4, gx@sda21(r13) +/* 800A80A8 000A4FE8 54 C0 C0 0E */ slwi r0, r6, 0x18 +/* 800A80AC 000A4FEC 38 A4 00 80 */ addi r5, r4, 0x80 +/* 800A80B0 000A4FF0 80 84 00 80 */ lwz r4, 0x80(r4) +/* 800A80B4 000A4FF4 54 84 02 02 */ rlwinm r4, r4, 0, 8, 1 +/* 800A80B8 000A4FF8 7C 80 03 78 */ or r0, r4, r0 +/* 800A80BC 000A4FFC 90 05 00 00 */ stw r0, 0(r5) +/* 800A80C0 000A5000 48 00 00 78 */ b lbl_800A8138 +lbl_800A80C4: +/* 800A80C4 000A5004 80 8D 82 C8 */ lwz r4, gx@sda21(r13) +/* 800A80C8 000A5008 84 04 00 84 */ lwzu r0, 0x84(r4) +/* 800A80CC 000A500C 54 00 00 32 */ rlwinm r0, r0, 0, 0, 0x19 +/* 800A80D0 000A5010 7C 00 33 78 */ or r0, r0, r6 +/* 800A80D4 000A5014 90 04 00 00 */ stw r0, 0(r4) +/* 800A80D8 000A5018 48 00 00 60 */ b lbl_800A8138 +lbl_800A80DC: +/* 800A80DC 000A501C 80 8D 82 C8 */ lwz r4, gx@sda21(r13) +/* 800A80E0 000A5020 54 C0 30 32 */ slwi r0, r6, 6 +/* 800A80E4 000A5024 38 A4 00 84 */ addi r5, r4, 0x84 +/* 800A80E8 000A5028 80 84 00 84 */ lwz r4, 0x84(r4) +/* 800A80EC 000A502C 54 84 06 A6 */ rlwinm r4, r4, 0, 0x1a, 0x13 +/* 800A80F0 000A5030 7C 80 03 78 */ or r0, r4, r0 +/* 800A80F4 000A5034 90 05 00 00 */ stw r0, 0(r5) +/* 800A80F8 000A5038 48 00 00 40 */ b lbl_800A8138 +lbl_800A80FC: +/* 800A80FC 000A503C 80 8D 82 C8 */ lwz r4, gx@sda21(r13) +/* 800A8100 000A5040 54 C0 60 26 */ slwi r0, r6, 0xc +/* 800A8104 000A5044 38 A4 00 84 */ addi r5, r4, 0x84 +/* 800A8108 000A5048 80 84 00 84 */ lwz r4, 0x84(r4) +/* 800A810C 000A504C 54 84 05 1A */ rlwinm r4, r4, 0, 0x14, 0xd +/* 800A8110 000A5050 7C 80 03 78 */ or r0, r4, r0 +/* 800A8114 000A5054 90 05 00 00 */ stw r0, 0(r5) +/* 800A8118 000A5058 48 00 00 20 */ b lbl_800A8138 +lbl_800A811C: +/* 800A811C 000A505C 80 8D 82 C8 */ lwz r4, gx@sda21(r13) +/* 800A8120 000A5060 54 C0 90 1A */ slwi r0, r6, 0x12 +/* 800A8124 000A5064 38 A4 00 84 */ addi r5, r4, 0x84 +/* 800A8128 000A5068 80 84 00 84 */ lwz r4, 0x84(r4) +/* 800A812C 000A506C 54 84 03 8E */ rlwinm r4, r4, 0, 0xe, 7 +/* 800A8130 000A5070 7C 80 03 78 */ or r0, r4, r0 +/* 800A8134 000A5074 90 05 00 00 */ stw r0, 0(r5) +lbl_800A8138: +/* 800A8138 000A5078 38 63 00 01 */ addi r3, r3, 1 +/* 800A813C 000A507C 48 00 5A 39 */ bl __GXSetMatrixIndex +/* 800A8140 000A5080 80 01 00 0C */ lwz r0, 0xc(r1) +/* 800A8144 000A5084 38 21 00 08 */ addi r1, r1, 8 +/* 800A8148 000A5088 7C 08 03 A6 */ mtlr r0 +/* 800A814C 000A508C 4E 80 00 20 */ blr + +.global GXSetNumTexGens +GXSetNumTexGens: +/* 800A8150 000A5090 80 8D 82 C8 */ lwz r4, gx@sda21(r13) +/* 800A8154 000A5094 54 67 06 3E */ clrlwi r7, r3, 0x18 +/* 800A8158 000A5098 38 60 00 10 */ li r3, 0x10 +/* 800A815C 000A509C 38 C4 02 04 */ addi r6, r4, 0x204 +/* 800A8160 000A50A0 80 A4 02 04 */ lwz r5, 0x204(r4) +/* 800A8164 000A50A4 3C 80 CC 01 */ lis r4, 0xCC008000@ha +/* 800A8168 000A50A8 38 00 10 3F */ li r0, 0x103f +/* 800A816C 000A50AC 54 A5 00 36 */ rlwinm r5, r5, 0, 0, 0x1b +/* 800A8170 000A50B0 7C A5 3B 78 */ or r5, r5, r7 +/* 800A8174 000A50B4 90 A6 00 00 */ stw r5, 0(r6) +/* 800A8178 000A50B8 98 64 80 00 */ stb r3, 0xCC008000@l(r4) +/* 800A817C 000A50BC 80 6D 82 C8 */ lwz r3, gx@sda21(r13) +/* 800A8180 000A50C0 90 04 80 00 */ stw r0, -0x8000(r4) +/* 800A8184 000A50C4 90 E4 80 00 */ stw r7, -0x8000(r4) +/* 800A8188 000A50C8 80 03 04 F4 */ lwz r0, 0x4f4(r3) +/* 800A818C 000A50CC 60 00 00 04 */ ori r0, r0, 4 +/* 800A8190 000A50D0 90 03 04 F4 */ stw r0, 0x4f4(r3) +/* 800A8194 000A50D4 4E 80 00 20 */ blr + +.section .data, "wa" # 0x803A8380 - 0x803E6000 +"@128": + .4byte lbl_800A6908 + .4byte lbl_800A6920 + .4byte lbl_800A6940 + .4byte lbl_800A6960 + .4byte lbl_800A6980 + .4byte lbl_800A69A0 + .4byte lbl_800A69C0 + .4byte lbl_800A69E0 + .4byte lbl_800A6A00 + .4byte lbl_800A6A20 + .4byte lbl_800A6A40 + .4byte lbl_800A6AB8 + .4byte lbl_800A6AD8 + .4byte lbl_800A6AF8 + .4byte lbl_800A6B10 + .4byte lbl_800A6B30 + .4byte lbl_800A6B50 + .4byte lbl_800A6B70 + .4byte lbl_800A6B90 + .4byte lbl_800A6BB0 + .4byte lbl_800A6BD0 + .4byte lbl_800A6BEC + .4byte lbl_800A6BEC + .4byte lbl_800A6BEC + .4byte lbl_800A6BEC + .4byte lbl_800A6A7C +"@189": + .4byte lbl_800A6C74 + .4byte lbl_800A6C90 + .4byte lbl_800A6CB0 + .4byte lbl_800A6CD0 + .4byte lbl_800A6CF0 + .4byte lbl_800A6D10 + .4byte lbl_800A6D30 + .4byte lbl_800A6D50 + .4byte lbl_800A6D70 + .4byte lbl_800A6D90 + .4byte lbl_800A6DB0 + .4byte lbl_800A6E28 + .4byte lbl_800A6E48 + .4byte lbl_800A6E68 + .4byte lbl_800A6E84 + .4byte lbl_800A6EA4 + .4byte lbl_800A6EC4 + .4byte lbl_800A6EE4 + .4byte lbl_800A6F04 + .4byte lbl_800A6F24 + .4byte lbl_800A6F44 + .4byte lbl_800A6F60 + .4byte lbl_800A6F60 + .4byte lbl_800A6F60 + .4byte lbl_800A6F60 + .4byte lbl_800A6DEC +"@256": + .4byte lbl_800A7164 + .4byte lbl_800A7174 + .4byte lbl_800A7184 + .4byte lbl_800A7194 + .4byte lbl_800A71A4 + .4byte lbl_800A71B4 + .4byte lbl_800A71C4 + .4byte lbl_800A71D4 + .4byte lbl_800A71E4 + .4byte lbl_800A71F4 + .4byte lbl_800A7204 + .4byte lbl_800A724C + .4byte lbl_800A725C + .4byte lbl_800A726C + .4byte lbl_800A727C + .4byte lbl_800A728C + .4byte lbl_800A729C + .4byte lbl_800A72AC + .4byte lbl_800A72BC + .4byte lbl_800A72CC + .4byte lbl_800A72DC + .4byte lbl_800A72EC + .4byte lbl_800A72EC + .4byte lbl_800A72EC + .4byte lbl_800A72EC + .4byte lbl_800A7228 +"@302": + .4byte lbl_800A73F0 + .4byte lbl_800A742C + .4byte lbl_800A7490 + .4byte lbl_800A74BC + .4byte lbl_800A74E8 + .4byte lbl_800A7528 + .4byte lbl_800A7564 + .4byte lbl_800A75A4 + .4byte lbl_800A75E4 + .4byte lbl_800A7624 + .4byte lbl_800A7664 + .4byte lbl_800A76A4 + .4byte lbl_800A76DC + .4byte lbl_800A76DC + .4byte lbl_800A76DC + .4byte lbl_800A76DC + .4byte lbl_800A742C +"@329": + .4byte lbl_800A7760 + .4byte lbl_800A779C + .4byte lbl_800A7800 + .4byte lbl_800A782C + .4byte lbl_800A7858 + .4byte lbl_800A7898 + .4byte lbl_800A78D4 + .4byte lbl_800A7914 + .4byte lbl_800A7954 + .4byte lbl_800A7990 + .4byte lbl_800A79D0 + .4byte lbl_800A7A10 + .4byte lbl_800A7A48 + .4byte lbl_800A7A48 + .4byte lbl_800A7A48 + .4byte lbl_800A7A48 + .4byte lbl_800A779C +"@393": + .4byte lbl_800A7B64 + .4byte lbl_800A7B8C + .4byte lbl_800A7BD0 + .4byte lbl_800A7BF4 + .4byte lbl_800A7C18 + .4byte lbl_800A7C40 + .4byte lbl_800A7C68 + .4byte lbl_800A7C90 + .4byte lbl_800A7CB8 + .4byte lbl_800A7CE0 + .4byte lbl_800A7D08 + .4byte lbl_800A7D30 + .4byte lbl_800A7D58 + .4byte lbl_800A7D58 + .4byte lbl_800A7D58 + .4byte lbl_800A7D58 + .4byte lbl_800A7B8C +"@499": + .4byte lbl_800A8044 + .4byte lbl_800A8064 + .4byte lbl_800A8084 + .4byte lbl_800A80A4 + .4byte lbl_800A80C4 + .4byte lbl_800A80DC + .4byte lbl_800A80FC +"@498": + .4byte lbl_800A7EB8 + .4byte lbl_800A7EC4 + .4byte lbl_800A7ED0 + .4byte lbl_800A7EDC + .4byte lbl_800A7EF8 + .4byte lbl_800A7F00 + .4byte lbl_800A7F08 + .4byte lbl_800A7F10 + .4byte lbl_800A7F18 + .4byte lbl_800A7F20 + .4byte lbl_800A7F28 + .4byte lbl_800A7F30 + .4byte lbl_800A7F34 + .4byte lbl_800A7F34 + .4byte lbl_800A7F34 + .4byte lbl_800A7F34 + .4byte lbl_800A7F34 + .4byte lbl_800A7F34 + .4byte lbl_800A7F34 + .4byte lbl_800A7EE8 + .4byte lbl_800A7EF0 +.section .sdata, "wa" # 0x80408AC0 - 0x804097C0 +tbl1$215: + .4byte 0x00040102 +tbl2$216: + .4byte 0x00080102 +tbl3$217: + .4byte 0x000C0102 + .4byte 0 diff --git a/asm/Dolphin/gx/GXBump.s b/asm/Dolphin/gx/GXBump.s new file mode 100644 index 0000000..fe3567b --- /dev/null +++ b/asm/Dolphin/gx/GXBump.s @@ -0,0 +1,501 @@ +.include "macros.inc" + +.section .text, "ax" # 0x80005600 - 0x8036FBA0 +.global GXSetTevIndirect +GXSetTevIndirect: +/* 800AB338 000A8278 94 21 FF D8 */ stwu r1, -0x28(r1) +/* 800AB33C 000A827C 54 84 07 B6 */ rlwinm r4, r4, 0, 0x1e, 0x1b +/* 800AB340 000A8280 54 A0 10 3A */ slwi r0, r5, 2 +/* 800AB344 000A8284 7C 80 03 78 */ or r0, r4, r0 +/* 800AB348 000A8288 81 61 00 34 */ lwz r11, 0x34(r1) +/* 800AB34C 000A828C 54 05 07 30 */ rlwinm r5, r0, 0, 0x1c, 0x18 +/* 800AB350 000A8290 89 81 00 33 */ lbz r12, 0x33(r1) +/* 800AB354 000A8294 54 C0 20 36 */ slwi r0, r6, 4 +/* 800AB358 000A8298 80 8D 82 C8 */ lwz r4, gx@sda21(r13) +/* 800AB35C 000A829C 7C A0 03 78 */ or r0, r5, r0 +/* 800AB360 000A82A0 54 05 06 6C */ rlwinm r5, r0, 0, 0x19, 0x16 +/* 800AB364 000A82A4 55 60 38 30 */ slwi r0, r11, 7 +/* 800AB368 000A82A8 7C A0 03 78 */ or r0, r5, r0 +/* 800AB36C 000A82AC 54 05 05 E4 */ rlwinm r5, r0, 0, 0x17, 0x12 +/* 800AB370 000A82B0 54 E0 48 2C */ slwi r0, r7, 9 +/* 800AB374 000A82B4 7C A0 03 78 */ or r0, r5, r0 +/* 800AB378 000A82B8 54 05 04 DE */ rlwinm r5, r0, 0, 0x13, 0xf +/* 800AB37C 000A82BC 55 00 68 24 */ slwi r0, r8, 0xd +/* 800AB380 000A82C0 7C A0 03 78 */ or r0, r5, r0 +/* 800AB384 000A82C4 38 A3 00 10 */ addi r5, r3, 0x10 +/* 800AB388 000A82C8 54 03 04 18 */ rlwinm r3, r0, 0, 0x10, 0xc +/* 800AB38C 000A82CC 55 20 80 1E */ slwi r0, r9, 0x10 +/* 800AB390 000A82D0 7C 60 03 78 */ or r0, r3, r0 +/* 800AB394 000A82D4 54 03 03 56 */ rlwinm r3, r0, 0, 0xd, 0xb +/* 800AB398 000A82D8 55 80 98 18 */ slwi r0, r12, 0x13 +/* 800AB39C 000A82DC 7C 60 03 78 */ or r0, r3, r0 +/* 800AB3A0 000A82E0 54 03 03 14 */ rlwinm r3, r0, 0, 0xc, 0xa +/* 800AB3A4 000A82E4 55 40 A1 16 */ rlwinm r0, r10, 0x14, 4, 0xb +/* 800AB3A8 000A82E8 7C 66 03 78 */ or r6, r3, r0 +/* 800AB3AC 000A82EC 38 00 00 61 */ li r0, 0x61 +/* 800AB3B0 000A82F0 3C 60 CC 01 */ lis r3, 0xCC008000@ha +/* 800AB3B4 000A82F4 98 03 80 00 */ stb r0, 0xCC008000@l(r3) +/* 800AB3B8 000A82F8 54 A0 C0 0E */ slwi r0, r5, 0x18 +/* 800AB3BC 000A82FC 50 C0 02 3E */ rlwimi r0, r6, 0, 8, 0x1f +/* 800AB3C0 000A8300 90 03 80 00 */ stw r0, -0x8000(r3) +/* 800AB3C4 000A8304 38 00 00 00 */ li r0, 0 +/* 800AB3C8 000A8308 B0 04 00 02 */ sth r0, 2(r4) +/* 800AB3CC 000A830C 38 21 00 28 */ addi r1, r1, 0x28 +/* 800AB3D0 000A8310 4E 80 00 20 */ blr + +.global GXSetIndTexMtx +GXSetIndTexMtx: +/* 800AB3D4 000A8314 2C 03 00 08 */ cmpwi r3, 8 +/* 800AB3D8 000A8318 94 21 FF 88 */ stwu r1, -0x78(r1) +/* 800AB3DC 000A831C 41 82 00 44 */ beq lbl_800AB420 +/* 800AB3E0 000A8320 40 80 00 1C */ bge lbl_800AB3FC +/* 800AB3E4 000A8324 2C 03 00 04 */ cmpwi r3, 4 +/* 800AB3E8 000A8328 41 82 00 38 */ beq lbl_800AB420 +/* 800AB3EC 000A832C 40 80 00 24 */ bge lbl_800AB410 +/* 800AB3F0 000A8330 2C 03 00 01 */ cmpwi r3, 1 +/* 800AB3F4 000A8334 40 80 00 14 */ bge lbl_800AB408 +/* 800AB3F8 000A8338 48 00 00 28 */ b lbl_800AB420 +lbl_800AB3FC: +/* 800AB3FC 000A833C 2C 03 00 0C */ cmpwi r3, 0xc +/* 800AB400 000A8340 40 80 00 20 */ bge lbl_800AB420 +/* 800AB404 000A8344 48 00 00 14 */ b lbl_800AB418 +lbl_800AB408: +/* 800AB408 000A8348 38 03 FF FF */ addi r0, r3, -1 +/* 800AB40C 000A834C 48 00 00 18 */ b lbl_800AB424 +lbl_800AB410: +/* 800AB410 000A8350 38 03 FF FB */ addi r0, r3, -5 +/* 800AB414 000A8354 48 00 00 10 */ b lbl_800AB424 +lbl_800AB418: +/* 800AB418 000A8358 38 03 FF F7 */ addi r0, r3, -9 +/* 800AB41C 000A835C 48 00 00 08 */ b lbl_800AB424 +lbl_800AB420: +/* 800AB420 000A8360 38 00 00 00 */ li r0, 0 +lbl_800AB424: +/* 800AB424 000A8364 C0 42 8B 50 */ lfs f2, "@45"@sda21(r2) +/* 800AB428 000A8368 1C 60 00 03 */ mulli r3, r0, 3 +/* 800AB42C 000A836C C0 24 00 00 */ lfs f1, 0(r4) +/* 800AB430 000A8370 C0 04 00 0C */ lfs f0, 0xc(r4) +/* 800AB434 000A8374 EC 22 00 72 */ fmuls f1, f2, f1 +/* 800AB438 000A8378 39 65 00 11 */ addi r11, r5, 0x11 +/* 800AB43C 000A837C EC 02 00 32 */ fmuls f0, f2, f0 +/* 800AB440 000A8380 38 03 00 06 */ addi r0, r3, 6 +/* 800AB444 000A8384 7D 6B 07 74 */ extsb r11, r11 +/* 800AB448 000A8388 FC 20 08 1E */ fctiwz f1, f1 +/* 800AB44C 000A838C 39 40 00 61 */ li r10, 0x61 +/* 800AB450 000A8390 FC 00 00 1E */ fctiwz f0, f0 +/* 800AB454 000A8394 3D 20 CC 01 */ lis r9, 0xCC008000@ha +/* 800AB458 000A8398 99 49 80 00 */ stb r10, 0xCC008000@l(r9) +/* 800AB45C 000A839C D8 21 00 70 */ stfd f1, 0x70(r1) +/* 800AB460 000A83A0 54 00 C0 0E */ slwi r0, r0, 0x18 +/* 800AB464 000A83A4 38 C3 00 07 */ addi r6, r3, 7 +/* 800AB468 000A83A8 D8 01 00 68 */ stfd f0, 0x68(r1) +/* 800AB46C 000A83AC 38 A3 00 08 */ addi r5, r3, 8 +/* 800AB470 000A83B0 81 01 00 74 */ lwz r8, 0x74(r1) +/* 800AB474 000A83B4 80 E1 00 6C */ lwz r7, 0x6c(r1) +/* 800AB478 000A83B8 80 6D 82 C8 */ lwz r3, gx@sda21(r13) +/* 800AB47C 000A83BC 54 E7 5A A8 */ rlwinm r7, r7, 0xb, 0xa, 0x14 +/* 800AB480 000A83C0 51 07 05 7E */ rlwimi r7, r8, 0, 0x15, 0x1f +/* 800AB484 000A83C4 54 E7 02 8E */ rlwinm r7, r7, 0, 0xa, 7 +/* 800AB488 000A83C8 51 67 B2 12 */ rlwimi r7, r11, 0x16, 8, 9 +/* 800AB48C 000A83CC 50 E0 02 3E */ rlwimi r0, r7, 0, 8, 0x1f +/* 800AB490 000A83D0 90 09 80 00 */ stw r0, -0x8000(r9) +/* 800AB494 000A83D4 38 00 00 00 */ li r0, 0 +/* 800AB498 000A83D8 C0 24 00 04 */ lfs f1, 4(r4) +/* 800AB49C 000A83DC C0 04 00 10 */ lfs f0, 0x10(r4) +/* 800AB4A0 000A83E0 EC 22 00 72 */ fmuls f1, f2, f1 +/* 800AB4A4 000A83E4 EC 02 00 32 */ fmuls f0, f2, f0 +/* 800AB4A8 000A83E8 99 49 80 00 */ stb r10, -0x8000(r9) +/* 800AB4AC 000A83EC FC 20 08 1E */ fctiwz f1, f1 +/* 800AB4B0 000A83F0 FC 00 00 1E */ fctiwz f0, f0 +/* 800AB4B4 000A83F4 D8 21 00 60 */ stfd f1, 0x60(r1) +/* 800AB4B8 000A83F8 D8 01 00 58 */ stfd f0, 0x58(r1) +/* 800AB4BC 000A83FC 81 01 00 64 */ lwz r8, 0x64(r1) +/* 800AB4C0 000A8400 80 E1 00 5C */ lwz r7, 0x5c(r1) +/* 800AB4C4 000A8404 54 E7 5A A8 */ rlwinm r7, r7, 0xb, 0xa, 0x14 +/* 800AB4C8 000A8408 51 07 05 7E */ rlwimi r7, r8, 0, 0x15, 0x1f +/* 800AB4CC 000A840C 54 E7 02 8E */ rlwinm r7, r7, 0, 0xa, 7 +/* 800AB4D0 000A8410 51 67 A2 12 */ rlwimi r7, r11, 0x14, 8, 9 +/* 800AB4D4 000A8414 54 E7 02 3E */ clrlwi r7, r7, 8 +/* 800AB4D8 000A8418 50 C7 C0 0E */ rlwimi r7, r6, 0x18, 0, 7 +/* 800AB4DC 000A841C 90 E9 80 00 */ stw r7, -0x8000(r9) +/* 800AB4E0 000A8420 C0 24 00 08 */ lfs f1, 8(r4) +/* 800AB4E4 000A8424 C0 04 00 14 */ lfs f0, 0x14(r4) +/* 800AB4E8 000A8428 EC 22 00 72 */ fmuls f1, f2, f1 +/* 800AB4EC 000A842C EC 02 00 32 */ fmuls f0, f2, f0 +/* 800AB4F0 000A8430 99 49 80 00 */ stb r10, -0x8000(r9) +/* 800AB4F4 000A8434 FC 20 08 1E */ fctiwz f1, f1 +/* 800AB4F8 000A8438 FC 00 00 1E */ fctiwz f0, f0 +/* 800AB4FC 000A843C D8 21 00 50 */ stfd f1, 0x50(r1) +/* 800AB500 000A8440 D8 01 00 48 */ stfd f0, 0x48(r1) +/* 800AB504 000A8444 80 C1 00 54 */ lwz r6, 0x54(r1) +/* 800AB508 000A8448 80 81 00 4C */ lwz r4, 0x4c(r1) +/* 800AB50C 000A844C 54 84 5A A8 */ rlwinm r4, r4, 0xb, 0xa, 0x14 +/* 800AB510 000A8450 50 C4 05 7E */ rlwimi r4, r6, 0, 0x15, 0x1f +/* 800AB514 000A8454 54 84 02 8E */ rlwinm r4, r4, 0, 0xa, 7 +/* 800AB518 000A8458 51 64 92 12 */ rlwimi r4, r11, 0x12, 8, 9 +/* 800AB51C 000A845C 54 84 02 3E */ clrlwi r4, r4, 8 +/* 800AB520 000A8460 50 A4 C0 0E */ rlwimi r4, r5, 0x18, 0, 7 +/* 800AB524 000A8464 90 89 80 00 */ stw r4, -0x8000(r9) +/* 800AB528 000A8468 B0 03 00 02 */ sth r0, 2(r3) +/* 800AB52C 000A846C 38 21 00 78 */ addi r1, r1, 0x78 +/* 800AB530 000A8470 4E 80 00 20 */ blr + +.global GXSetIndTexCoordScale +GXSetIndTexCoordScale: +/* 800AB534 000A8474 2C 03 00 02 */ cmpwi r3, 2 +/* 800AB538 000A8478 41 82 00 F4 */ beq lbl_800AB62C +/* 800AB53C 000A847C 40 80 00 14 */ bge lbl_800AB550 +/* 800AB540 000A8480 2C 03 00 00 */ cmpwi r3, 0 +/* 800AB544 000A8484 41 82 00 18 */ beq lbl_800AB55C +/* 800AB548 000A8488 40 80 00 7C */ bge lbl_800AB5C4 +/* 800AB54C 000A848C 48 00 01 AC */ b lbl_800AB6F8 +lbl_800AB550: +/* 800AB550 000A8490 2C 03 00 04 */ cmpwi r3, 4 +/* 800AB554 000A8494 40 80 01 A4 */ bge lbl_800AB6F8 +/* 800AB558 000A8498 48 00 01 3C */ b lbl_800AB694 +lbl_800AB55C: +/* 800AB55C 000A849C 80 CD 82 C8 */ lwz r6, gx@sda21(r13) +/* 800AB560 000A84A0 54 A3 20 36 */ slwi r3, r5, 4 +/* 800AB564 000A84A4 38 00 00 61 */ li r0, 0x61 +/* 800AB568 000A84A8 38 E6 01 28 */ addi r7, r6, 0x128 +/* 800AB56C 000A84AC 80 C6 01 28 */ lwz r6, 0x128(r6) +/* 800AB570 000A84B0 3C A0 CC 01 */ lis r5, 0xCC008000@ha +/* 800AB574 000A84B4 54 C6 00 36 */ rlwinm r6, r6, 0, 0, 0x1b +/* 800AB578 000A84B8 7C C4 23 78 */ or r4, r6, r4 +/* 800AB57C 000A84BC 90 87 00 00 */ stw r4, 0(r7) +/* 800AB580 000A84C0 80 8D 82 C8 */ lwz r4, gx@sda21(r13) +/* 800AB584 000A84C4 38 C4 01 28 */ addi r6, r4, 0x128 +/* 800AB588 000A84C8 80 84 01 28 */ lwz r4, 0x128(r4) +/* 800AB58C 000A84CC 54 84 07 2E */ rlwinm r4, r4, 0, 0x1c, 0x17 +/* 800AB590 000A84D0 7C 83 1B 78 */ or r3, r4, r3 +/* 800AB594 000A84D4 90 66 00 00 */ stw r3, 0(r6) +/* 800AB598 000A84D8 80 6D 82 C8 */ lwz r3, gx@sda21(r13) +/* 800AB59C 000A84DC 38 83 01 28 */ addi r4, r3, 0x128 +/* 800AB5A0 000A84E0 80 63 01 28 */ lwz r3, 0x128(r3) +/* 800AB5A4 000A84E4 54 63 02 3E */ clrlwi r3, r3, 8 +/* 800AB5A8 000A84E8 64 63 25 00 */ oris r3, r3, 0x2500 +/* 800AB5AC 000A84EC 90 64 00 00 */ stw r3, 0(r4) +/* 800AB5B0 000A84F0 98 05 80 00 */ stb r0, 0xCC008000@l(r5) +/* 800AB5B4 000A84F4 80 6D 82 C8 */ lwz r3, gx@sda21(r13) +/* 800AB5B8 000A84F8 80 03 01 28 */ lwz r0, 0x128(r3) +/* 800AB5BC 000A84FC 90 05 80 00 */ stw r0, -0x8000(r5) +/* 800AB5C0 000A8500 48 00 01 38 */ b lbl_800AB6F8 +lbl_800AB5C4: +/* 800AB5C4 000A8504 80 ED 82 C8 */ lwz r7, gx@sda21(r13) +/* 800AB5C8 000A8508 54 A3 60 26 */ slwi r3, r5, 0xc +/* 800AB5CC 000A850C 84 A7 01 28 */ lwzu r5, 0x128(r7) +/* 800AB5D0 000A8510 54 86 40 2E */ slwi r6, r4, 8 +/* 800AB5D4 000A8514 38 00 00 61 */ li r0, 0x61 +/* 800AB5D8 000A8518 54 A5 06 26 */ rlwinm r5, r5, 0, 0x18, 0x13 +/* 800AB5DC 000A851C 7C A5 33 78 */ or r5, r5, r6 +/* 800AB5E0 000A8520 90 A7 00 00 */ stw r5, 0(r7) +/* 800AB5E4 000A8524 3C 80 CC 01 */ lis r4, 0xCC008000@ha +/* 800AB5E8 000A8528 80 AD 82 C8 */ lwz r5, gx@sda21(r13) +/* 800AB5EC 000A852C 38 C5 01 28 */ addi r6, r5, 0x128 +/* 800AB5F0 000A8530 80 A5 01 28 */ lwz r5, 0x128(r5) +/* 800AB5F4 000A8534 54 A5 05 1E */ rlwinm r5, r5, 0, 0x14, 0xf +/* 800AB5F8 000A8538 7C A3 1B 78 */ or r3, r5, r3 +/* 800AB5FC 000A853C 90 66 00 00 */ stw r3, 0(r6) +/* 800AB600 000A8540 80 6D 82 C8 */ lwz r3, gx@sda21(r13) +/* 800AB604 000A8544 38 A3 01 28 */ addi r5, r3, 0x128 +/* 800AB608 000A8548 80 63 01 28 */ lwz r3, 0x128(r3) +/* 800AB60C 000A854C 54 63 02 3E */ clrlwi r3, r3, 8 +/* 800AB610 000A8550 64 63 25 00 */ oris r3, r3, 0x2500 +/* 800AB614 000A8554 90 65 00 00 */ stw r3, 0(r5) +/* 800AB618 000A8558 98 04 80 00 */ stb r0, 0xCC008000@l(r4) +/* 800AB61C 000A855C 80 6D 82 C8 */ lwz r3, gx@sda21(r13) +/* 800AB620 000A8560 80 03 01 28 */ lwz r0, 0x128(r3) +/* 800AB624 000A8564 90 04 80 00 */ stw r0, -0x8000(r4) +/* 800AB628 000A8568 48 00 00 D0 */ b lbl_800AB6F8 +lbl_800AB62C: +/* 800AB62C 000A856C 80 CD 82 C8 */ lwz r6, gx@sda21(r13) +/* 800AB630 000A8570 54 A3 20 36 */ slwi r3, r5, 4 +/* 800AB634 000A8574 38 00 00 61 */ li r0, 0x61 +/* 800AB638 000A8578 38 E6 01 2C */ addi r7, r6, 0x12c +/* 800AB63C 000A857C 80 C6 01 2C */ lwz r6, 0x12c(r6) +/* 800AB640 000A8580 3C A0 CC 01 */ lis r5, 0xCC008000@ha +/* 800AB644 000A8584 54 C6 00 36 */ rlwinm r6, r6, 0, 0, 0x1b +/* 800AB648 000A8588 7C C4 23 78 */ or r4, r6, r4 +/* 800AB64C 000A858C 90 87 00 00 */ stw r4, 0(r7) +/* 800AB650 000A8590 80 8D 82 C8 */ lwz r4, gx@sda21(r13) +/* 800AB654 000A8594 38 C4 01 2C */ addi r6, r4, 0x12c +/* 800AB658 000A8598 80 84 01 2C */ lwz r4, 0x12c(r4) +/* 800AB65C 000A859C 54 84 07 2E */ rlwinm r4, r4, 0, 0x1c, 0x17 +/* 800AB660 000A85A0 7C 83 1B 78 */ or r3, r4, r3 +/* 800AB664 000A85A4 90 66 00 00 */ stw r3, 0(r6) +/* 800AB668 000A85A8 80 6D 82 C8 */ lwz r3, gx@sda21(r13) +/* 800AB66C 000A85AC 38 83 01 2C */ addi r4, r3, 0x12c +/* 800AB670 000A85B0 80 63 01 2C */ lwz r3, 0x12c(r3) +/* 800AB674 000A85B4 54 63 02 3E */ clrlwi r3, r3, 8 +/* 800AB678 000A85B8 64 63 26 00 */ oris r3, r3, 0x2600 +/* 800AB67C 000A85BC 90 64 00 00 */ stw r3, 0(r4) +/* 800AB680 000A85C0 98 05 80 00 */ stb r0, 0xCC008000@l(r5) +/* 800AB684 000A85C4 80 6D 82 C8 */ lwz r3, gx@sda21(r13) +/* 800AB688 000A85C8 80 03 01 2C */ lwz r0, 0x12c(r3) +/* 800AB68C 000A85CC 90 05 80 00 */ stw r0, -0x8000(r5) +/* 800AB690 000A85D0 48 00 00 68 */ b lbl_800AB6F8 +lbl_800AB694: +/* 800AB694 000A85D4 80 ED 82 C8 */ lwz r7, gx@sda21(r13) +/* 800AB698 000A85D8 54 A3 60 26 */ slwi r3, r5, 0xc +/* 800AB69C 000A85DC 84 A7 01 2C */ lwzu r5, 0x12c(r7) +/* 800AB6A0 000A85E0 54 86 40 2E */ slwi r6, r4, 8 +/* 800AB6A4 000A85E4 38 00 00 61 */ li r0, 0x61 +/* 800AB6A8 000A85E8 54 A5 06 26 */ rlwinm r5, r5, 0, 0x18, 0x13 +/* 800AB6AC 000A85EC 7C A5 33 78 */ or r5, r5, r6 +/* 800AB6B0 000A85F0 90 A7 00 00 */ stw r5, 0(r7) +/* 800AB6B4 000A85F4 3C 80 CC 01 */ lis r4, 0xCC008000@ha +/* 800AB6B8 000A85F8 80 AD 82 C8 */ lwz r5, gx@sda21(r13) +/* 800AB6BC 000A85FC 38 C5 01 2C */ addi r6, r5, 0x12c +/* 800AB6C0 000A8600 80 A5 01 2C */ lwz r5, 0x12c(r5) +/* 800AB6C4 000A8604 54 A5 05 1E */ rlwinm r5, r5, 0, 0x14, 0xf +/* 800AB6C8 000A8608 7C A3 1B 78 */ or r3, r5, r3 +/* 800AB6CC 000A860C 90 66 00 00 */ stw r3, 0(r6) +/* 800AB6D0 000A8610 80 6D 82 C8 */ lwz r3, gx@sda21(r13) +/* 800AB6D4 000A8614 38 A3 01 2C */ addi r5, r3, 0x12c +/* 800AB6D8 000A8618 80 63 01 2C */ lwz r3, 0x12c(r3) +/* 800AB6DC 000A861C 54 63 02 3E */ clrlwi r3, r3, 8 +/* 800AB6E0 000A8620 64 63 26 00 */ oris r3, r3, 0x2600 +/* 800AB6E4 000A8624 90 65 00 00 */ stw r3, 0(r5) +/* 800AB6E8 000A8628 98 04 80 00 */ stb r0, 0xCC008000@l(r4) +/* 800AB6EC 000A862C 80 6D 82 C8 */ lwz r3, gx@sda21(r13) +/* 800AB6F0 000A8630 80 03 01 2C */ lwz r0, 0x12c(r3) +/* 800AB6F4 000A8634 90 04 80 00 */ stw r0, -0x8000(r4) +lbl_800AB6F8: +/* 800AB6F8 000A8638 80 6D 82 C8 */ lwz r3, gx@sda21(r13) +/* 800AB6FC 000A863C 38 00 00 00 */ li r0, 0 +/* 800AB700 000A8640 B0 03 00 02 */ sth r0, 2(r3) +/* 800AB704 000A8644 4E 80 00 20 */ blr + +.global GXSetIndTexOrder +GXSetIndTexOrder: +/* 800AB708 000A8648 2C 03 00 02 */ cmpwi r3, 2 +/* 800AB70C 000A864C 41 82 00 94 */ beq lbl_800AB7A0 +/* 800AB710 000A8650 40 80 00 14 */ bge lbl_800AB724 +/* 800AB714 000A8654 2C 03 00 00 */ cmpwi r3, 0 +/* 800AB718 000A8658 41 82 00 18 */ beq lbl_800AB730 +/* 800AB71C 000A865C 40 80 00 4C */ bge lbl_800AB768 +/* 800AB720 000A8660 48 00 00 EC */ b lbl_800AB80C +lbl_800AB724: +/* 800AB724 000A8664 2C 03 00 04 */ cmpwi r3, 4 +/* 800AB728 000A8668 40 80 00 E4 */ bge lbl_800AB80C +/* 800AB72C 000A866C 48 00 00 AC */ b lbl_800AB7D8 +lbl_800AB730: +/* 800AB730 000A8670 80 6D 82 C8 */ lwz r3, gx@sda21(r13) +/* 800AB734 000A8674 54 80 18 38 */ slwi r0, r4, 3 +/* 800AB738 000A8678 38 83 01 20 */ addi r4, r3, 0x120 +/* 800AB73C 000A867C 80 63 01 20 */ lwz r3, 0x120(r3) +/* 800AB740 000A8680 54 63 00 38 */ rlwinm r3, r3, 0, 0, 0x1c +/* 800AB744 000A8684 7C 63 2B 78 */ or r3, r3, r5 +/* 800AB748 000A8688 90 64 00 00 */ stw r3, 0(r4) +/* 800AB74C 000A868C 80 6D 82 C8 */ lwz r3, gx@sda21(r13) +/* 800AB750 000A8690 38 83 01 20 */ addi r4, r3, 0x120 +/* 800AB754 000A8694 80 63 01 20 */ lwz r3, 0x120(r3) +/* 800AB758 000A8698 54 63 07 72 */ rlwinm r3, r3, 0, 0x1d, 0x19 +/* 800AB75C 000A869C 7C 60 03 78 */ or r0, r3, r0 +/* 800AB760 000A86A0 90 04 00 00 */ stw r0, 0(r4) +/* 800AB764 000A86A4 48 00 00 A8 */ b lbl_800AB80C +lbl_800AB768: +/* 800AB768 000A86A8 80 CD 82 C8 */ lwz r6, gx@sda21(r13) +/* 800AB76C 000A86AC 54 80 48 2C */ slwi r0, r4, 9 +/* 800AB770 000A86B0 54 A3 30 32 */ slwi r3, r5, 6 +/* 800AB774 000A86B4 80 86 01 20 */ lwz r4, 0x120(r6) +/* 800AB778 000A86B8 54 84 06 AC */ rlwinm r4, r4, 0, 0x1a, 0x16 +/* 800AB77C 000A86BC 7C 83 1B 78 */ or r3, r4, r3 +/* 800AB780 000A86C0 90 66 01 20 */ stw r3, 0x120(r6) +/* 800AB784 000A86C4 80 6D 82 C8 */ lwz r3, gx@sda21(r13) +/* 800AB788 000A86C8 38 83 01 20 */ addi r4, r3, 0x120 +/* 800AB78C 000A86CC 80 63 01 20 */ lwz r3, 0x120(r3) +/* 800AB790 000A86D0 54 63 05 E6 */ rlwinm r3, r3, 0, 0x17, 0x13 +/* 800AB794 000A86D4 7C 60 03 78 */ or r0, r3, r0 +/* 800AB798 000A86D8 90 04 00 00 */ stw r0, 0(r4) +/* 800AB79C 000A86DC 48 00 00 70 */ b lbl_800AB80C +lbl_800AB7A0: +/* 800AB7A0 000A86E0 80 CD 82 C8 */ lwz r6, gx@sda21(r13) +/* 800AB7A4 000A86E4 54 80 78 20 */ slwi r0, r4, 0xf +/* 800AB7A8 000A86E8 54 A3 60 26 */ slwi r3, r5, 0xc +/* 800AB7AC 000A86EC 80 86 01 20 */ lwz r4, 0x120(r6) +/* 800AB7B0 000A86F0 54 84 05 20 */ rlwinm r4, r4, 0, 0x14, 0x10 +/* 800AB7B4 000A86F4 7C 83 1B 78 */ or r3, r4, r3 +/* 800AB7B8 000A86F8 90 66 01 20 */ stw r3, 0x120(r6) +/* 800AB7BC 000A86FC 80 6D 82 C8 */ lwz r3, gx@sda21(r13) +/* 800AB7C0 000A8700 38 83 01 20 */ addi r4, r3, 0x120 +/* 800AB7C4 000A8704 80 63 01 20 */ lwz r3, 0x120(r3) +/* 800AB7C8 000A8708 54 63 04 5A */ rlwinm r3, r3, 0, 0x11, 0xd +/* 800AB7CC 000A870C 7C 60 03 78 */ or r0, r3, r0 +/* 800AB7D0 000A8710 90 04 00 00 */ stw r0, 0(r4) +/* 800AB7D4 000A8714 48 00 00 38 */ b lbl_800AB80C +lbl_800AB7D8: +/* 800AB7D8 000A8718 80 CD 82 C8 */ lwz r6, gx@sda21(r13) +/* 800AB7DC 000A871C 54 80 A8 14 */ slwi r0, r4, 0x15 +/* 800AB7E0 000A8720 54 A3 90 1A */ slwi r3, r5, 0x12 +/* 800AB7E4 000A8724 80 86 01 20 */ lwz r4, 0x120(r6) +/* 800AB7E8 000A8728 54 84 03 94 */ rlwinm r4, r4, 0, 0xe, 0xa +/* 800AB7EC 000A872C 7C 83 1B 78 */ or r3, r4, r3 +/* 800AB7F0 000A8730 90 66 01 20 */ stw r3, 0x120(r6) +/* 800AB7F4 000A8734 80 6D 82 C8 */ lwz r3, gx@sda21(r13) +/* 800AB7F8 000A8738 38 83 01 20 */ addi r4, r3, 0x120 +/* 800AB7FC 000A873C 80 63 01 20 */ lwz r3, 0x120(r3) +/* 800AB800 000A8740 54 63 02 CE */ rlwinm r3, r3, 0, 0xb, 7 +/* 800AB804 000A8744 7C 60 03 78 */ or r0, r3, r0 +/* 800AB808 000A8748 90 04 00 00 */ stw r0, 0(r4) +lbl_800AB80C: +/* 800AB80C 000A874C 38 00 00 61 */ li r0, 0x61 +/* 800AB810 000A8750 80 8D 82 C8 */ lwz r4, gx@sda21(r13) +/* 800AB814 000A8754 3C A0 CC 01 */ lis r5, 0xCC008000@ha +/* 800AB818 000A8758 98 05 80 00 */ stb r0, 0xCC008000@l(r5) +/* 800AB81C 000A875C 38 00 00 00 */ li r0, 0 +/* 800AB820 000A8760 80 64 01 20 */ lwz r3, 0x120(r4) +/* 800AB824 000A8764 90 65 80 00 */ stw r3, -0x8000(r5) +/* 800AB828 000A8768 80 64 04 F4 */ lwz r3, 0x4f4(r4) +/* 800AB82C 000A876C 60 63 00 03 */ ori r3, r3, 3 +/* 800AB830 000A8770 90 64 04 F4 */ stw r3, 0x4f4(r4) +/* 800AB834 000A8774 80 6D 82 C8 */ lwz r3, gx@sda21(r13) +/* 800AB838 000A8778 B0 03 00 02 */ sth r0, 2(r3) +/* 800AB83C 000A877C 4E 80 00 20 */ blr + +.global GXSetNumIndStages +GXSetNumIndStages: +/* 800AB840 000A8780 80 8D 82 C8 */ lwz r4, gx@sda21(r13) +/* 800AB844 000A8784 54 60 82 1E */ rlwinm r0, r3, 0x10, 8, 0xf +/* 800AB848 000A8788 84 64 02 04 */ lwzu r3, 0x204(r4) +/* 800AB84C 000A878C 54 63 04 18 */ rlwinm r3, r3, 0, 0x10, 0xc +/* 800AB850 000A8790 7C 60 03 78 */ or r0, r3, r0 +/* 800AB854 000A8794 90 04 00 00 */ stw r0, 0(r4) +/* 800AB858 000A8798 80 6D 82 C8 */ lwz r3, gx@sda21(r13) +/* 800AB85C 000A879C 80 03 04 F4 */ lwz r0, 0x4f4(r3) +/* 800AB860 000A87A0 60 00 00 06 */ ori r0, r0, 6 +/* 800AB864 000A87A4 90 03 04 F4 */ stw r0, 0x4f4(r3) +/* 800AB868 000A87A8 4E 80 00 20 */ blr + +.global GXSetTevDirect +GXSetTevDirect: +/* 800AB86C 000A87AC 7C 08 02 A6 */ mflr r0 +/* 800AB870 000A87B0 38 80 00 00 */ li r4, 0 +/* 800AB874 000A87B4 90 01 00 04 */ stw r0, 4(r1) +/* 800AB878 000A87B8 38 00 00 00 */ li r0, 0 +/* 800AB87C 000A87BC 38 A0 00 00 */ li r5, 0 +/* 800AB880 000A87C0 94 21 FF E8 */ stwu r1, -0x18(r1) +/* 800AB884 000A87C4 38 C0 00 00 */ li r6, 0 +/* 800AB888 000A87C8 38 E0 00 00 */ li r7, 0 +/* 800AB88C 000A87CC 90 01 00 08 */ stw r0, 8(r1) +/* 800AB890 000A87D0 39 00 00 00 */ li r8, 0 +/* 800AB894 000A87D4 39 20 00 00 */ li r9, 0 +/* 800AB898 000A87D8 90 01 00 0C */ stw r0, 0xc(r1) +/* 800AB89C 000A87DC 39 40 00 00 */ li r10, 0 +/* 800AB8A0 000A87E0 4B FF FA 99 */ bl GXSetTevIndirect +/* 800AB8A4 000A87E4 80 01 00 1C */ lwz r0, 0x1c(r1) +/* 800AB8A8 000A87E8 38 21 00 18 */ addi r1, r1, 0x18 +/* 800AB8AC 000A87EC 7C 08 03 A6 */ mtlr r0 +/* 800AB8B0 000A87F0 4E 80 00 20 */ blr + +.global GXSetTevIndWarp +GXSetTevIndWarp: +/* 800AB8B4 000A87F4 7C 08 02 A6 */ mflr r0 +/* 800AB8B8 000A87F8 90 01 00 04 */ stw r0, 4(r1) +/* 800AB8BC 000A87FC 54 C0 06 3F */ clrlwi. r0, r6, 0x18 +/* 800AB8C0 000A8800 94 21 FF E0 */ stwu r1, -0x20(r1) +/* 800AB8C4 000A8804 41 82 00 0C */ beq lbl_800AB8D0 +/* 800AB8C8 000A8808 38 C0 00 06 */ li r6, 6 +/* 800AB8CC 000A880C 48 00 00 08 */ b lbl_800AB8D4 +lbl_800AB8D0: +/* 800AB8D0 000A8810 38 C0 00 00 */ li r6, 0 +lbl_800AB8D4: +/* 800AB8D4 000A8814 54 A0 06 3F */ clrlwi. r0, r5, 0x18 +/* 800AB8D8 000A8818 39 06 00 00 */ addi r8, r6, 0 +/* 800AB8DC 000A881C 41 82 00 0C */ beq lbl_800AB8E8 +/* 800AB8E0 000A8820 38 C0 00 07 */ li r6, 7 +/* 800AB8E4 000A8824 48 00 00 08 */ b lbl_800AB8EC +lbl_800AB8E8: +/* 800AB8E8 000A8828 38 C0 00 00 */ li r6, 0 +lbl_800AB8EC: +/* 800AB8EC 000A882C 38 00 00 00 */ li r0, 0 +/* 800AB8F0 000A8830 90 01 00 08 */ stw r0, 8(r1) +/* 800AB8F4 000A8834 39 28 00 00 */ addi r9, r8, 0 +/* 800AB8F8 000A8838 38 A0 00 00 */ li r5, 0 +/* 800AB8FC 000A883C 90 01 00 0C */ stw r0, 0xc(r1) +/* 800AB900 000A8840 39 40 00 00 */ li r10, 0 +/* 800AB904 000A8844 4B FF FA 35 */ bl GXSetTevIndirect +/* 800AB908 000A8848 80 01 00 24 */ lwz r0, 0x24(r1) +/* 800AB90C 000A884C 38 21 00 20 */ addi r1, r1, 0x20 +/* 800AB910 000A8850 7C 08 03 A6 */ mtlr r0 +/* 800AB914 000A8854 4E 80 00 20 */ blr + +.global __GXUpdateBPMask +__GXUpdateBPMask: +/* 800AB918 000A8858 80 6D 82 C8 */ lwz r3, gx@sda21(r13) +/* 800AB91C 000A885C 38 C0 00 00 */ li r6, 0 +/* 800AB920 000A8860 38 80 00 00 */ li r4, 0 +/* 800AB924 000A8864 80 03 02 04 */ lwz r0, 0x204(r3) +/* 800AB928 000A8868 54 00 87 7E */ rlwinm r0, r0, 0x10, 0x1d, 0x1f +/* 800AB92C 000A886C 28 00 00 00 */ cmplwi r0, 0 +/* 800AB930 000A8870 7C 09 03 A6 */ mtctr r0 +/* 800AB934 000A8874 40 81 00 6C */ ble lbl_800AB9A0 +lbl_800AB938: +/* 800AB938 000A8878 2C 04 00 02 */ cmpwi r4, 2 +/* 800AB93C 000A887C 41 82 00 3C */ beq lbl_800AB978 +/* 800AB940 000A8880 40 80 00 14 */ bge lbl_800AB954 +/* 800AB944 000A8884 2C 04 00 00 */ cmpwi r4, 0 +/* 800AB948 000A8888 41 82 00 18 */ beq lbl_800AB960 +/* 800AB94C 000A888C 40 80 00 20 */ bge lbl_800AB96C +/* 800AB950 000A8890 48 00 00 3C */ b lbl_800AB98C +lbl_800AB954: +/* 800AB954 000A8894 2C 04 00 04 */ cmpwi r4, 4 +/* 800AB958 000A8898 40 80 00 34 */ bge lbl_800AB98C +/* 800AB95C 000A889C 48 00 00 28 */ b lbl_800AB984 +lbl_800AB960: +/* 800AB960 000A88A0 80 03 01 20 */ lwz r0, 0x120(r3) +/* 800AB964 000A88A4 54 05 07 7E */ clrlwi r5, r0, 0x1d +/* 800AB968 000A88A8 48 00 00 24 */ b lbl_800AB98C +lbl_800AB96C: +/* 800AB96C 000A88AC 80 03 01 20 */ lwz r0, 0x120(r3) +/* 800AB970 000A88B0 54 05 D7 7E */ rlwinm r5, r0, 0x1a, 0x1d, 0x1f +/* 800AB974 000A88B4 48 00 00 18 */ b lbl_800AB98C +lbl_800AB978: +/* 800AB978 000A88B8 80 03 01 20 */ lwz r0, 0x120(r3) +/* 800AB97C 000A88BC 54 05 A7 7E */ rlwinm r5, r0, 0x14, 0x1d, 0x1f +/* 800AB980 000A88C0 48 00 00 0C */ b lbl_800AB98C +lbl_800AB984: +/* 800AB984 000A88C4 80 03 01 20 */ lwz r0, 0x120(r3) +/* 800AB988 000A88C8 54 05 77 7E */ rlwinm r5, r0, 0xe, 0x1d, 0x1f +lbl_800AB98C: +/* 800AB98C 000A88CC 38 00 00 01 */ li r0, 1 +/* 800AB990 000A88D0 7C 00 28 30 */ slw r0, r0, r5 +/* 800AB994 000A88D4 7C C6 03 78 */ or r6, r6, r0 +/* 800AB998 000A88D8 38 84 00 01 */ addi r4, r4, 1 +/* 800AB99C 000A88DC 42 00 FF 9C */ bdnz lbl_800AB938 +lbl_800AB9A0: +/* 800AB9A0 000A88E0 38 83 01 24 */ addi r4, r3, 0x124 +/* 800AB9A4 000A88E4 80 63 01 24 */ lwz r3, 0x124(r3) +/* 800AB9A8 000A88E8 54 60 06 3E */ clrlwi r0, r3, 0x18 +/* 800AB9AC 000A88EC 7C 00 30 40 */ cmplw r0, r6 +/* 800AB9B0 000A88F0 4D 82 00 20 */ beqlr +/* 800AB9B4 000A88F4 54 60 00 2E */ rlwinm r0, r3, 0, 0, 0x17 +/* 800AB9B8 000A88F8 7C 00 33 78 */ or r0, r0, r6 +/* 800AB9BC 000A88FC 90 04 00 00 */ stw r0, 0(r4) +/* 800AB9C0 000A8900 38 00 00 61 */ li r0, 0x61 +/* 800AB9C4 000A8904 3C A0 CC 01 */ lis r5, 0xCC008000@ha +/* 800AB9C8 000A8908 98 05 80 00 */ stb r0, 0xCC008000@l(r5) +/* 800AB9CC 000A890C 38 00 00 00 */ li r0, 0 +/* 800AB9D0 000A8910 80 8D 82 C8 */ lwz r4, gx@sda21(r13) +/* 800AB9D4 000A8914 80 64 01 24 */ lwz r3, 0x124(r4) +/* 800AB9D8 000A8918 90 65 80 00 */ stw r3, -0x8000(r5) +/* 800AB9DC 000A891C B0 04 00 02 */ sth r0, 2(r4) +/* 800AB9E0 000A8920 4E 80 00 20 */ blr + +.global __GXFlushTextureState +__GXFlushTextureState: +/* 800AB9E4 000A8924 38 00 00 61 */ li r0, 0x61 +/* 800AB9E8 000A8928 80 8D 82 C8 */ lwz r4, gx@sda21(r13) +/* 800AB9EC 000A892C 3C A0 CC 01 */ lis r5, 0xCC008000@ha +/* 800AB9F0 000A8930 98 05 80 00 */ stb r0, 0xCC008000@l(r5) +/* 800AB9F4 000A8934 38 00 00 00 */ li r0, 0 +/* 800AB9F8 000A8938 80 64 01 24 */ lwz r3, 0x124(r4) +/* 800AB9FC 000A893C 90 65 80 00 */ stw r3, -0x8000(r5) +/* 800ABA00 000A8940 B0 04 00 02 */ sth r0, 2(r4) +/* 800ABA04 000A8944 4E 80 00 20 */ blr + +.section .sdata2, "a" # 0x8040B460 - 0x80414020 +.balign 8 +"@45": + .4byte 0x44800000 + .4byte 0 diff --git a/asm/Dolphin/gx/GXDisplayList.s b/asm/Dolphin/gx/GXDisplayList.s new file mode 100644 index 0000000..82f353e --- /dev/null +++ b/asm/Dolphin/gx/GXDisplayList.s @@ -0,0 +1,35 @@ +.include "macros.inc" + +.section .text, "ax" # 0x80005600 - 0x8036FBA0 +.global GXCallDisplayList +GXCallDisplayList: +/* 800AD370 000AA2B0 7C 08 02 A6 */ mflr r0 +/* 800AD374 000AA2B4 90 01 00 04 */ stw r0, 4(r1) +/* 800AD378 000AA2B8 94 21 FF E8 */ stwu r1, -0x18(r1) +/* 800AD37C 000AA2BC 93 E1 00 14 */ stw r31, 0x14(r1) +/* 800AD380 000AA2C0 3B E4 00 00 */ addi r31, r4, 0 +/* 800AD384 000AA2C4 93 C1 00 10 */ stw r30, 0x10(r1) +/* 800AD388 000AA2C8 3B C3 00 00 */ addi r30, r3, 0 +/* 800AD38C 000AA2CC 80 AD 82 C8 */ lwz r5, gx@sda21(r13) +/* 800AD390 000AA2D0 80 05 04 F4 */ lwz r0, 0x4f4(r5) +/* 800AD394 000AA2D4 28 00 00 00 */ cmplwi r0, 0 +/* 800AD398 000AA2D8 41 82 00 08 */ beq lbl_800AD3A0 +/* 800AD39C 000AA2DC 4B FF B4 6D */ bl __GXSetDirtyState +lbl_800AD3A0: +/* 800AD3A0 000AA2E0 80 6D 82 C8 */ lwz r3, gx@sda21(r13) +/* 800AD3A4 000AA2E4 80 03 00 00 */ lwz r0, 0(r3) +/* 800AD3A8 000AA2E8 28 00 00 00 */ cmplwi r0, 0 +/* 800AD3AC 000AA2EC 40 82 00 08 */ bne lbl_800AD3B4 +/* 800AD3B0 000AA2F0 4B FF B5 E9 */ bl __GXSendFlushPrim +lbl_800AD3B4: +/* 800AD3B4 000AA2F4 38 00 00 40 */ li r0, 0x40 +/* 800AD3B8 000AA2F8 3C 60 CC 01 */ lis r3, 0xCC008000@ha +/* 800AD3BC 000AA2FC 98 03 80 00 */ stb r0, 0xCC008000@l(r3) +/* 800AD3C0 000AA300 93 C3 80 00 */ stw r30, -0x8000(r3) +/* 800AD3C4 000AA304 93 E3 80 00 */ stw r31, -0x8000(r3) +/* 800AD3C8 000AA308 80 01 00 1C */ lwz r0, 0x1c(r1) +/* 800AD3CC 000AA30C 83 E1 00 14 */ lwz r31, 0x14(r1) +/* 800AD3D0 000AA310 83 C1 00 10 */ lwz r30, 0x10(r1) +/* 800AD3D4 000AA314 38 21 00 18 */ addi r1, r1, 0x18 +/* 800AD3D8 000AA318 7C 08 03 A6 */ mtlr r0 +/* 800AD3DC 000AA31C 4E 80 00 20 */ blr diff --git a/asm/Dolphin/gx/GXDraw.s b/asm/Dolphin/gx/GXDraw.s new file mode 100644 index 0000000..9ad6d12 --- /dev/null +++ b/asm/Dolphin/gx/GXDraw.s @@ -0,0 +1,560 @@ +.include "macros.inc" + +.section .text, "ax" # 0x80005600 - 0x8036FBA0 +.global GXDrawSphere +GXDrawSphere: +/* 800ACB88 000A9AC8 7C 08 02 A6 */ mflr r0 +/* 800ACB8C 000A9ACC 90 01 00 04 */ stw r0, 4(r1) +/* 800ACB90 000A9AD0 54 80 06 3E */ clrlwi r0, r4, 0x18 +/* 800ACB94 000A9AD4 94 21 FF 30 */ stwu r1, -0xd0(r1) +/* 800ACB98 000A9AD8 DB E1 00 C8 */ stfd f31, 0xc8(r1) +/* 800ACB9C 000A9ADC DB C1 00 C0 */ stfd f30, 0xc0(r1) +/* 800ACBA0 000A9AE0 DB A1 00 B8 */ stfd f29, 0xb8(r1) +/* 800ACBA4 000A9AE4 DB 81 00 B0 */ stfd f28, 0xb0(r1) +/* 800ACBA8 000A9AE8 DB 61 00 A8 */ stfd f27, 0xa8(r1) +/* 800ACBAC 000A9AEC DB 41 00 A0 */ stfd f26, 0xa0(r1) +/* 800ACBB0 000A9AF0 DB 21 00 98 */ stfd f25, 0x98(r1) +/* 800ACBB4 000A9AF4 DB 01 00 90 */ stfd f24, 0x90(r1) +/* 800ACBB8 000A9AF8 DA E1 00 88 */ stfd f23, 0x88(r1) +/* 800ACBBC 000A9AFC DA C1 00 80 */ stfd f22, 0x80(r1) +/* 800ACBC0 000A9B00 DA A1 00 78 */ stfd f21, 0x78(r1) +/* 800ACBC4 000A9B04 DA 81 00 70 */ stfd f20, 0x70(r1) +/* 800ACBC8 000A9B08 DA 61 00 68 */ stfd f19, 0x68(r1) +/* 800ACBCC 000A9B0C BE A1 00 3C */ stmw r21, 0x3c(r1) +/* 800ACBD0 000A9B10 7C 76 1B 78 */ mr r22, r3 +/* 800ACBD4 000A9B14 54 63 06 3E */ clrlwi r3, r3, 0x18 +/* 800ACBD8 000A9B18 90 61 00 34 */ stw r3, 0x34(r1) +/* 800ACBDC 000A9B1C 3C 60 43 30 */ lis r3, 0x4330 +/* 800ACBE0 000A9B20 7C 95 23 78 */ mr r21, r4 +/* 800ACBE4 000A9B24 90 01 00 2C */ stw r0, 0x2c(r1) +/* 800ACBE8 000A9B28 3C 80 80 3F */ lis r4, vcd@ha +/* 800ACBEC 000A9B2C 3B 44 C7 18 */ addi r26, r4, vcd@l +/* 800ACBF0 000A9B30 90 61 00 30 */ stw r3, 0x30(r1) +/* 800ACBF4 000A9B34 38 81 00 10 */ addi r4, r1, 0x10 +/* 800ACBF8 000A9B38 90 61 00 28 */ stw r3, 0x28(r1) +/* 800ACBFC 000A9B3C 38 60 00 0D */ li r3, 0xd +/* 800ACC00 000A9B40 C8 41 00 30 */ lfd f2, 0x30(r1) +/* 800ACC04 000A9B44 C8 01 00 28 */ lfd f0, 0x28(r1) +/* 800ACC08 000A9B48 C8 62 8B A0 */ lfd f3, "@364"@sda21(r2) +/* 800ACC0C 000A9B4C C0 82 8B 90 */ lfs f4, "@358"@sda21(r2) +/* 800ACC10 000A9B50 EC 42 18 28 */ fsubs f2, f2, f3 +/* 800ACC14 000A9B54 C0 22 8B A8 */ lfs f1, "@405"@sda21(r2) +/* 800ACC18 000A9B58 EC 00 18 28 */ fsubs f0, f0, f3 +/* 800ACC1C 000A9B5C EF 24 10 24 */ fdivs f25, f4, f2 +/* 800ACC20 000A9B60 EF 01 00 24 */ fdivs f24, f1, f0 +/* 800ACC24 000A9B64 4B FF A5 21 */ bl GXGetVtxDesc +/* 800ACC28 000A9B68 7F 43 D3 78 */ mr r3, r26 +/* 800ACC2C 000A9B6C 4B FF A6 CD */ bl GXGetVtxDescv +/* 800ACC30 000A9B70 38 60 00 03 */ li r3, 3 +/* 800ACC34 000A9B74 38 9A 00 D8 */ addi r4, r26, 0xd8 +/* 800ACC38 000A9B78 4B FF B1 39 */ bl GXGetVtxAttrFmtv +/* 800ACC3C 000A9B7C 4B FF A7 2D */ bl GXClearVtxDesc +/* 800ACC40 000A9B80 38 60 00 09 */ li r3, 9 +/* 800ACC44 000A9B84 38 80 00 01 */ li r4, 1 +/* 800ACC48 000A9B88 4B FF 9C A1 */ bl GXSetVtxDesc +/* 800ACC4C 000A9B8C 38 60 00 0A */ li r3, 0xa +/* 800ACC50 000A9B90 38 80 00 01 */ li r4, 1 +/* 800ACC54 000A9B94 4B FF 9C 95 */ bl GXSetVtxDesc +/* 800ACC58 000A9B98 38 60 00 03 */ li r3, 3 +/* 800ACC5C 000A9B9C 38 80 00 09 */ li r4, 9 +/* 800ACC60 000A9BA0 38 A0 00 01 */ li r5, 1 +/* 800ACC64 000A9BA4 38 C0 00 04 */ li r6, 4 +/* 800ACC68 000A9BA8 38 E0 00 00 */ li r7, 0 +/* 800ACC6C 000A9BAC 4B FF A7 49 */ bl GXSetVtxAttrFmt +/* 800ACC70 000A9BB0 38 60 00 03 */ li r3, 3 +/* 800ACC74 000A9BB4 38 80 00 0A */ li r4, 0xa +/* 800ACC78 000A9BB8 38 A0 00 00 */ li r5, 0 +/* 800ACC7C 000A9BBC 38 C0 00 04 */ li r6, 4 +/* 800ACC80 000A9BC0 38 E0 00 00 */ li r7, 0 +/* 800ACC84 000A9BC4 4B FF A7 31 */ bl GXSetVtxAttrFmt +/* 800ACC88 000A9BC8 80 01 00 10 */ lwz r0, 0x10(r1) +/* 800ACC8C 000A9BCC 2C 00 00 00 */ cmpwi r0, 0 +/* 800ACC90 000A9BD0 41 82 00 28 */ beq lbl_800ACCB8 +/* 800ACC94 000A9BD4 38 60 00 0D */ li r3, 0xd +/* 800ACC98 000A9BD8 38 80 00 01 */ li r4, 1 +/* 800ACC9C 000A9BDC 4B FF 9C 4D */ bl GXSetVtxDesc +/* 800ACCA0 000A9BE0 38 60 00 03 */ li r3, 3 +/* 800ACCA4 000A9BE4 38 80 00 0D */ li r4, 0xd +/* 800ACCA8 000A9BE8 38 A0 00 01 */ li r5, 1 +/* 800ACCAC 000A9BEC 38 C0 00 04 */ li r6, 4 +/* 800ACCB0 000A9BF0 38 E0 00 00 */ li r7, 0 +/* 800ACCB4 000A9BF4 4B FF A7 01 */ bl GXSetVtxAttrFmt +lbl_800ACCB8: +/* 800ACCB8 000A9BF8 56 B7 06 3E */ clrlwi r23, r21, 0x18 +/* 800ACCBC 000A9BFC CB 42 8B 98 */ lfd f26, "@362"@sda21(r2) +/* 800ACCC0 000A9C00 38 17 00 01 */ addi r0, r23, 1 +/* 800ACCC4 000A9C04 C3 82 8B 8C */ lfs f28, "@357"@sda21(r2) +/* 800ACCC8 000A9C08 CB C2 8B A0 */ lfd f30, "@364"@sda21(r2) +/* 800ACCCC 000A9C0C 54 19 08 3C */ slwi r25, r0, 1 +/* 800ACCD0 000A9C10 56 D8 06 3E */ clrlwi r24, r22, 0x18 +/* 800ACCD4 000A9C14 3A C0 00 00 */ li r22, 0 +/* 800ACCD8 000A9C18 3F A0 43 30 */ lis r29, 0x4330 +/* 800ACCDC 000A9C1C 3F C0 CC 01 */ lis r30, 0xcc01 +/* 800ACCE0 000A9C20 48 00 01 C0 */ b lbl_800ACEA0 +lbl_800ACCE4: +/* 800ACCE4 000A9C24 6E DB 80 00 */ xoris r27, r22, 0x8000 +/* 800ACCE8 000A9C28 93 61 00 2C */ stw r27, 0x2c(r1) +/* 800ACCEC 000A9C2C 93 A1 00 28 */ stw r29, 0x28(r1) +/* 800ACCF0 000A9C30 C8 01 00 28 */ lfd f0, 0x28(r1) +/* 800ACCF4 000A9C34 EC 00 D0 28 */ fsubs f0, f0, f26 +/* 800ACCF8 000A9C38 EE 80 06 72 */ fmuls f20, f0, f25 +/* 800ACCFC 000A9C3C FC 20 A0 90 */ fmr f1, f20 +/* 800ACD00 000A9C40 EF 74 C8 2A */ fadds f27, f20, f25 +/* 800ACD04 000A9C44 4B FD A4 01 */ bl sinf +/* 800ACD08 000A9C48 EE FC 00 72 */ fmuls f23, f28, f1 +/* 800ACD0C 000A9C4C FC 20 D8 90 */ fmr f1, f27 +/* 800ACD10 000A9C50 4B FD A3 F5 */ bl sinf +/* 800ACD14 000A9C54 EE DC 00 72 */ fmuls f22, f28, f1 +/* 800ACD18 000A9C58 FC 20 A0 90 */ fmr f1, f20 +/* 800ACD1C 000A9C5C 4B FD A2 55 */ bl cosf +/* 800ACD20 000A9C60 EE BC 00 72 */ fmuls f21, f28, f1 +/* 800ACD24 000A9C64 FC 20 D8 90 */ fmr f1, f27 +/* 800ACD28 000A9C68 4B FD A2 49 */ bl cosf +/* 800ACD2C 000A9C6C EE 9C 00 72 */ fmuls f20, f28, f1 +/* 800ACD30 000A9C70 57 25 04 3E */ clrlwi r5, r25, 0x10 +/* 800ACD34 000A9C74 38 60 00 98 */ li r3, 0x98 +/* 800ACD38 000A9C78 38 80 00 03 */ li r4, 3 +/* 800ACD3C 000A9C7C 4B FF BB 6D */ bl GXBegin +/* 800ACD40 000A9C80 EF B4 E0 24 */ fdivs f29, f20, f28 +/* 800ACD44 000A9C84 38 16 00 01 */ addi r0, r22, 1 +/* 800ACD48 000A9C88 6C 1F 80 00 */ xoris r31, r0, 0x8000 +/* 800ACD4C 000A9C8C 3A A0 00 00 */ li r21, 0 +/* 800ACD50 000A9C90 EF F5 E0 24 */ fdivs f31, f21, f28 +/* 800ACD54 000A9C94 48 00 01 40 */ b lbl_800ACE94 +lbl_800ACD58: +/* 800ACD58 000A9C98 6E BC 80 00 */ xoris r28, r21, 0x8000 +/* 800ACD5C 000A9C9C 93 81 00 2C */ stw r28, 0x2c(r1) +/* 800ACD60 000A9CA0 93 A1 00 28 */ stw r29, 0x28(r1) +/* 800ACD64 000A9CA4 C8 01 00 28 */ lfd f0, 0x28(r1) +/* 800ACD68 000A9CA8 EC 00 D0 28 */ fsubs f0, f0, f26 +/* 800ACD6C 000A9CAC EE 60 06 32 */ fmuls f19, f0, f24 +/* 800ACD70 000A9CB0 FC 20 98 90 */ fmr f1, f19 +/* 800ACD74 000A9CB4 4B FD A1 FD */ bl cosf +/* 800ACD78 000A9CB8 FF 60 08 90 */ fmr f27, f1 +/* 800ACD7C 000A9CBC FC 20 98 90 */ fmr f1, f19 +/* 800ACD80 000A9CC0 4B FD A3 85 */ bl sinf +/* 800ACD84 000A9CC4 EC 1B 05 B2 */ fmuls f0, f27, f22 +/* 800ACD88 000A9CC8 80 01 00 10 */ lwz r0, 0x10(r1) +/* 800ACD8C 000A9CCC EC 61 05 B2 */ fmuls f3, f1, f22 +/* 800ACD90 000A9CD0 2C 00 00 00 */ cmpwi r0, 0 +/* 800ACD94 000A9CD4 EC 40 E0 24 */ fdivs f2, f0, f28 +/* 800ACD98 000A9CD8 D0 1E 80 00 */ stfs f0, -0x8000(r30) +/* 800ACD9C 000A9CDC D0 7E 80 00 */ stfs f3, -0x8000(r30) +/* 800ACDA0 000A9CE0 D2 9E 80 00 */ stfs f20, -0x8000(r30) +/* 800ACDA4 000A9CE4 EC 03 E0 24 */ fdivs f0, f3, f28 +/* 800ACDA8 000A9CE8 D0 5E 80 00 */ stfs f2, -0x8000(r30) +/* 800ACDAC 000A9CEC D0 1E 80 00 */ stfs f0, -0x8000(r30) +/* 800ACDB0 000A9CF0 D3 BE 80 00 */ stfs f29, -0x8000(r30) +/* 800ACDB4 000A9CF4 41 82 00 54 */ beq lbl_800ACE08 +/* 800ACDB8 000A9CF8 93 81 00 2C */ stw r28, 0x2c(r1) +/* 800ACDBC 000A9CFC 92 E1 00 34 */ stw r23, 0x34(r1) +/* 800ACDC0 000A9D00 93 A1 00 28 */ stw r29, 0x28(r1) +/* 800ACDC4 000A9D04 93 A1 00 30 */ stw r29, 0x30(r1) +/* 800ACDC8 000A9D08 C8 41 00 28 */ lfd f2, 0x28(r1) +/* 800ACDCC 000A9D0C 93 E1 00 24 */ stw r31, 0x24(r1) +/* 800ACDD0 000A9D10 C8 01 00 30 */ lfd f0, 0x30(r1) +/* 800ACDD4 000A9D14 EC 42 D0 28 */ fsubs f2, f2, f26 +/* 800ACDD8 000A9D18 93 01 00 1C */ stw r24, 0x1c(r1) +/* 800ACDDC 000A9D1C EC 00 F0 28 */ fsubs f0, f0, f30 +/* 800ACDE0 000A9D20 93 A1 00 20 */ stw r29, 0x20(r1) +/* 800ACDE4 000A9D24 93 A1 00 18 */ stw r29, 0x18(r1) +/* 800ACDE8 000A9D28 EC 62 00 24 */ fdivs f3, f2, f0 +/* 800ACDEC 000A9D2C C8 41 00 20 */ lfd f2, 0x20(r1) +/* 800ACDF0 000A9D30 C8 01 00 18 */ lfd f0, 0x18(r1) +/* 800ACDF4 000A9D34 EC 42 D0 28 */ fsubs f2, f2, f26 +/* 800ACDF8 000A9D38 D0 7E 80 00 */ stfs f3, -0x8000(r30) +/* 800ACDFC 000A9D3C EC 00 F0 28 */ fsubs f0, f0, f30 +/* 800ACE00 000A9D40 EC 02 00 24 */ fdivs f0, f2, f0 +/* 800ACE04 000A9D44 D0 1E 80 00 */ stfs f0, -0x8000(r30) +lbl_800ACE08: +/* 800ACE08 000A9D48 EC 1B 05 F2 */ fmuls f0, f27, f23 +/* 800ACE0C 000A9D4C 80 01 00 10 */ lwz r0, 0x10(r1) +/* 800ACE10 000A9D50 EC 41 05 F2 */ fmuls f2, f1, f23 +/* 800ACE14 000A9D54 2C 00 00 00 */ cmpwi r0, 0 +/* 800ACE18 000A9D58 EC 20 E0 24 */ fdivs f1, f0, f28 +/* 800ACE1C 000A9D5C D0 1E 80 00 */ stfs f0, -0x8000(r30) +/* 800ACE20 000A9D60 D0 5E 80 00 */ stfs f2, -0x8000(r30) +/* 800ACE24 000A9D64 D2 BE 80 00 */ stfs f21, -0x8000(r30) +/* 800ACE28 000A9D68 EC 02 E0 24 */ fdivs f0, f2, f28 +/* 800ACE2C 000A9D6C D0 3E 80 00 */ stfs f1, -0x8000(r30) +/* 800ACE30 000A9D70 D0 1E 80 00 */ stfs f0, -0x8000(r30) +/* 800ACE34 000A9D74 D3 FE 80 00 */ stfs f31, -0x8000(r30) +/* 800ACE38 000A9D78 41 82 00 58 */ beq lbl_800ACE90 +/* 800ACE3C 000A9D7C 6E A0 80 00 */ xoris r0, r21, 0x8000 +/* 800ACE40 000A9D80 92 E1 00 24 */ stw r23, 0x24(r1) +/* 800ACE44 000A9D84 90 01 00 1C */ stw r0, 0x1c(r1) +/* 800ACE48 000A9D88 93 A1 00 18 */ stw r29, 0x18(r1) +/* 800ACE4C 000A9D8C 93 A1 00 20 */ stw r29, 0x20(r1) +/* 800ACE50 000A9D90 C8 21 00 18 */ lfd f1, 0x18(r1) +/* 800ACE54 000A9D94 93 61 00 2C */ stw r27, 0x2c(r1) +/* 800ACE58 000A9D98 C8 01 00 20 */ lfd f0, 0x20(r1) +/* 800ACE5C 000A9D9C EC 21 D0 28 */ fsubs f1, f1, f26 +/* 800ACE60 000A9DA0 93 01 00 34 */ stw r24, 0x34(r1) +/* 800ACE64 000A9DA4 EC 00 F0 28 */ fsubs f0, f0, f30 +/* 800ACE68 000A9DA8 93 A1 00 28 */ stw r29, 0x28(r1) +/* 800ACE6C 000A9DAC 93 A1 00 30 */ stw r29, 0x30(r1) +/* 800ACE70 000A9DB0 EC 41 00 24 */ fdivs f2, f1, f0 +/* 800ACE74 000A9DB4 C8 21 00 28 */ lfd f1, 0x28(r1) +/* 800ACE78 000A9DB8 C8 01 00 30 */ lfd f0, 0x30(r1) +/* 800ACE7C 000A9DBC EC 21 D0 28 */ fsubs f1, f1, f26 +/* 800ACE80 000A9DC0 D0 5E 80 00 */ stfs f2, -0x8000(r30) +/* 800ACE84 000A9DC4 EC 00 F0 28 */ fsubs f0, f0, f30 +/* 800ACE88 000A9DC8 EC 01 00 24 */ fdivs f0, f1, f0 +/* 800ACE8C 000A9DCC D0 1E 80 00 */ stfs f0, -0x8000(r30) +lbl_800ACE90: +/* 800ACE90 000A9DD0 3A B5 00 01 */ addi r21, r21, 1 +lbl_800ACE94: +/* 800ACE94 000A9DD4 7C 15 B8 00 */ cmpw r21, r23 +/* 800ACE98 000A9DD8 40 81 FE C0 */ ble lbl_800ACD58 +/* 800ACE9C 000A9DDC 3A D6 00 01 */ addi r22, r22, 1 +lbl_800ACEA0: +/* 800ACEA0 000A9DE0 7C 16 C0 00 */ cmpw r22, r24 +/* 800ACEA4 000A9DE4 41 80 FE 40 */ blt lbl_800ACCE4 +/* 800ACEA8 000A9DE8 7F 43 D3 78 */ mr r3, r26 +/* 800ACEAC 000A9DEC 4B FF 9D 9D */ bl GXSetVtxDescv +/* 800ACEB0 000A9DF0 38 60 00 03 */ li r3, 3 +/* 800ACEB4 000A9DF4 38 9A 00 D8 */ addi r4, r26, 0xd8 +/* 800ACEB8 000A9DF8 4B FF A8 59 */ bl GXSetVtxAttrFmtv +/* 800ACEBC 000A9DFC BA A1 00 3C */ lmw r21, 0x3c(r1) +/* 800ACEC0 000A9E00 80 01 00 D4 */ lwz r0, 0xd4(r1) +/* 800ACEC4 000A9E04 CB E1 00 C8 */ lfd f31, 0xc8(r1) +/* 800ACEC8 000A9E08 CB C1 00 C0 */ lfd f30, 0xc0(r1) +/* 800ACECC 000A9E0C CB A1 00 B8 */ lfd f29, 0xb8(r1) +/* 800ACED0 000A9E10 CB 81 00 B0 */ lfd f28, 0xb0(r1) +/* 800ACED4 000A9E14 CB 61 00 A8 */ lfd f27, 0xa8(r1) +/* 800ACED8 000A9E18 CB 41 00 A0 */ lfd f26, 0xa0(r1) +/* 800ACEDC 000A9E1C CB 21 00 98 */ lfd f25, 0x98(r1) +/* 800ACEE0 000A9E20 CB 01 00 90 */ lfd f24, 0x90(r1) +/* 800ACEE4 000A9E24 CA E1 00 88 */ lfd f23, 0x88(r1) +/* 800ACEE8 000A9E28 CA C1 00 80 */ lfd f22, 0x80(r1) +/* 800ACEEC 000A9E2C CA A1 00 78 */ lfd f21, 0x78(r1) +/* 800ACEF0 000A9E30 CA 81 00 70 */ lfd f20, 0x70(r1) +/* 800ACEF4 000A9E34 CA 61 00 68 */ lfd f19, 0x68(r1) +/* 800ACEF8 000A9E38 38 21 00 D0 */ addi r1, r1, 0xd0 +/* 800ACEFC 000A9E3C 7C 08 03 A6 */ mtlr r0 +/* 800ACF00 000A9E40 4E 80 00 20 */ blr + +.global GXDrawCubeFace +GXDrawCubeFace: +/* 800ACF04 000A9E44 94 21 FF A8 */ stwu r1, -0x58(r1) +/* 800ACF08 000A9E48 ED 22 28 2A */ fadds f9, f2, f5 +/* 800ACF0C 000A9E4C EC 01 20 2A */ fadds f0, f1, f4 +/* 800ACF10 000A9E50 3C A0 CC 01 */ lis r5, 0xCC008000@ha +/* 800ACF14 000A9E54 DB E1 00 50 */ stfd f31, 0x50(r1) +/* 800ACF18 000A9E58 ED 43 30 2A */ fadds f10, f3, f6 +/* 800ACF1C 000A9E5C DB C1 00 48 */ stfd f30, 0x48(r1) +/* 800ACF20 000A9E60 C1 61 00 60 */ lfs f11, 0x60(r1) +/* 800ACF24 000A9E64 EF C7 00 2A */ fadds f30, f7, f0 +/* 800ACF28 000A9E68 DB A1 00 40 */ stfd f29, 0x40(r1) +/* 800ACF2C 000A9E6C ED A8 48 2A */ fadds f13, f8, f9 +/* 800ACF30 000A9E70 2C 03 00 00 */ cmpwi r3, 0 +/* 800ACF34 000A9E74 DB 81 00 38 */ stfd f28, 0x38(r1) +/* 800ACF38 000A9E78 ED 8B 50 2A */ fadds f12, f11, f10 +/* 800ACF3C 000A9E7C DB 61 00 30 */ stfd f27, 0x30(r1) +/* 800ACF40 000A9E80 C3 E2 8B AC */ lfs f31, "@493"@sda21(r2) +/* 800ACF44 000A9E84 EF DF 07 B2 */ fmuls f30, f31, f30 +/* 800ACF48 000A9E88 ED BF 03 72 */ fmuls f13, f31, f13 +/* 800ACF4C 000A9E8C ED 9F 03 32 */ fmuls f12, f31, f12 +/* 800ACF50 000A9E90 D3 C5 80 00 */ stfs f30, 0xCC008000@l(r5) +/* 800ACF54 000A9E94 D1 A5 80 00 */ stfs f13, -0x8000(r5) +/* 800ACF58 000A9E98 D1 85 80 00 */ stfs f12, -0x8000(r5) +/* 800ACF5C 000A9E9C D0 25 80 00 */ stfs f1, -0x8000(r5) +/* 800ACF60 000A9EA0 D0 45 80 00 */ stfs f2, -0x8000(r5) +/* 800ACF64 000A9EA4 D0 65 80 00 */ stfs f3, -0x8000(r5) +/* 800ACF68 000A9EA8 41 82 00 1C */ beq lbl_800ACF84 +/* 800ACF6C 000A9EAC D0 85 80 00 */ stfs f4, -0x8000(r5) +/* 800ACF70 000A9EB0 D0 A5 80 00 */ stfs f5, -0x8000(r5) +/* 800ACF74 000A9EB4 D0 C5 80 00 */ stfs f6, -0x8000(r5) +/* 800ACF78 000A9EB8 D0 E5 80 00 */ stfs f7, -0x8000(r5) +/* 800ACF7C 000A9EBC D1 05 80 00 */ stfs f8, -0x8000(r5) +/* 800ACF80 000A9EC0 D1 65 80 00 */ stfs f11, -0x8000(r5) +lbl_800ACF84: +/* 800ACF84 000A9EC4 2C 04 00 00 */ cmpwi r4, 0 +/* 800ACF88 000A9EC8 41 82 00 14 */ beq lbl_800ACF9C +/* 800ACF8C 000A9ECC 38 00 00 01 */ li r0, 1 +/* 800ACF90 000A9ED0 3C A0 CC 01 */ lis r5, 0xCC008000@ha +/* 800ACF94 000A9ED4 98 05 80 00 */ stb r0, 0xCC008000@l(r5) +/* 800ACF98 000A9ED8 98 05 80 00 */ stb r0, -0x8000(r5) +lbl_800ACF9C: +/* 800ACF9C 000A9EDC EF A1 20 28 */ fsubs f29, f1, f4 +/* 800ACFA0 000A9EE0 C3 E2 8B AC */ lfs f31, "@493"@sda21(r2) +/* 800ACFA4 000A9EE4 EF 82 28 28 */ fsubs f28, f2, f5 +/* 800ACFA8 000A9EE8 3C A0 CC 01 */ lis r5, 0xCC008000@ha +/* 800ACFAC 000A9EEC EF 63 30 28 */ fsubs f27, f3, f6 +/* 800ACFB0 000A9EF0 EF C7 E8 2A */ fadds f30, f7, f29 +/* 800ACFB4 000A9EF4 2C 03 00 00 */ cmpwi r3, 0 +/* 800ACFB8 000A9EF8 ED A8 E0 2A */ fadds f13, f8, f28 +/* 800ACFBC 000A9EFC ED 8B D8 2A */ fadds f12, f11, f27 +/* 800ACFC0 000A9F00 EF DF 07 B2 */ fmuls f30, f31, f30 +/* 800ACFC4 000A9F04 ED BF 03 72 */ fmuls f13, f31, f13 +/* 800ACFC8 000A9F08 ED 9F 03 32 */ fmuls f12, f31, f12 +/* 800ACFCC 000A9F0C D3 C5 80 00 */ stfs f30, 0xCC008000@l(r5) +/* 800ACFD0 000A9F10 D1 A5 80 00 */ stfs f13, -0x8000(r5) +/* 800ACFD4 000A9F14 D1 85 80 00 */ stfs f12, -0x8000(r5) +/* 800ACFD8 000A9F18 D0 25 80 00 */ stfs f1, -0x8000(r5) +/* 800ACFDC 000A9F1C D0 45 80 00 */ stfs f2, -0x8000(r5) +/* 800ACFE0 000A9F20 D0 65 80 00 */ stfs f3, -0x8000(r5) +/* 800ACFE4 000A9F24 41 82 00 1C */ beq lbl_800AD000 +/* 800ACFE8 000A9F28 D0 85 80 00 */ stfs f4, -0x8000(r5) +/* 800ACFEC 000A9F2C D0 A5 80 00 */ stfs f5, -0x8000(r5) +/* 800ACFF0 000A9F30 D0 C5 80 00 */ stfs f6, -0x8000(r5) +/* 800ACFF4 000A9F34 D0 E5 80 00 */ stfs f7, -0x8000(r5) +/* 800ACFF8 000A9F38 D1 05 80 00 */ stfs f8, -0x8000(r5) +/* 800ACFFC 000A9F3C D1 65 80 00 */ stfs f11, -0x8000(r5) +lbl_800AD000: +/* 800AD000 000A9F40 2C 04 00 00 */ cmpwi r4, 0 +/* 800AD004 000A9F44 41 82 00 18 */ beq lbl_800AD01C +/* 800AD008 000A9F48 38 00 00 00 */ li r0, 0 +/* 800AD00C 000A9F4C 3C A0 CC 01 */ lis r5, 0xCC008000@ha +/* 800AD010 000A9F50 98 05 80 00 */ stb r0, 0xCC008000@l(r5) +/* 800AD014 000A9F54 38 00 00 01 */ li r0, 1 +/* 800AD018 000A9F58 98 05 80 00 */ stb r0, -0x8000(r5) +lbl_800AD01C: +/* 800AD01C 000A9F5C EF FD 38 28 */ fsubs f31, f29, f7 +/* 800AD020 000A9F60 C3 C2 8B AC */ lfs f30, "@493"@sda21(r2) +/* 800AD024 000A9F64 ED BC 40 28 */ fsubs f13, f28, f8 +/* 800AD028 000A9F68 3C A0 CC 01 */ lis r5, 0xCC008000@ha +/* 800AD02C 000A9F6C ED 9B 58 28 */ fsubs f12, f27, f11 +/* 800AD030 000A9F70 EF FE 07 F2 */ fmuls f31, f30, f31 +/* 800AD034 000A9F74 2C 03 00 00 */ cmpwi r3, 0 +/* 800AD038 000A9F78 ED BE 03 72 */ fmuls f13, f30, f13 +/* 800AD03C 000A9F7C ED 9E 03 32 */ fmuls f12, f30, f12 +/* 800AD040 000A9F80 D3 E5 80 00 */ stfs f31, 0xCC008000@l(r5) +/* 800AD044 000A9F84 D1 A5 80 00 */ stfs f13, -0x8000(r5) +/* 800AD048 000A9F88 D1 85 80 00 */ stfs f12, -0x8000(r5) +/* 800AD04C 000A9F8C D0 25 80 00 */ stfs f1, -0x8000(r5) +/* 800AD050 000A9F90 D0 45 80 00 */ stfs f2, -0x8000(r5) +/* 800AD054 000A9F94 D0 65 80 00 */ stfs f3, -0x8000(r5) +/* 800AD058 000A9F98 41 82 00 1C */ beq lbl_800AD074 +/* 800AD05C 000A9F9C D0 85 80 00 */ stfs f4, -0x8000(r5) +/* 800AD060 000A9FA0 D0 A5 80 00 */ stfs f5, -0x8000(r5) +/* 800AD064 000A9FA4 D0 C5 80 00 */ stfs f6, -0x8000(r5) +/* 800AD068 000A9FA8 D0 E5 80 00 */ stfs f7, -0x8000(r5) +/* 800AD06C 000A9FAC D1 05 80 00 */ stfs f8, -0x8000(r5) +/* 800AD070 000A9FB0 D1 65 80 00 */ stfs f11, -0x8000(r5) +lbl_800AD074: +/* 800AD074 000A9FB4 2C 04 00 00 */ cmpwi r4, 0 +/* 800AD078 000A9FB8 41 82 00 14 */ beq lbl_800AD08C +/* 800AD07C 000A9FBC 38 00 00 00 */ li r0, 0 +/* 800AD080 000A9FC0 3C A0 CC 01 */ lis r5, 0xCC008000@ha +/* 800AD084 000A9FC4 98 05 80 00 */ stb r0, 0xCC008000@l(r5) +/* 800AD088 000A9FC8 98 05 80 00 */ stb r0, -0x8000(r5) +lbl_800AD08C: +/* 800AD08C 000A9FCC ED 80 38 28 */ fsubs f12, f0, f7 +/* 800AD090 000A9FD0 C1 A2 8B AC */ lfs f13, "@493"@sda21(r2) +/* 800AD094 000A9FD4 ED 29 40 28 */ fsubs f9, f9, f8 +/* 800AD098 000A9FD8 3C A0 CC 01 */ lis r5, 0xCC008000@ha +/* 800AD09C 000A9FDC EC 0A 58 28 */ fsubs f0, f10, f11 +/* 800AD0A0 000A9FE0 ED 4D 03 32 */ fmuls f10, f13, f12 +/* 800AD0A4 000A9FE4 2C 03 00 00 */ cmpwi r3, 0 +/* 800AD0A8 000A9FE8 ED 2D 02 72 */ fmuls f9, f13, f9 +/* 800AD0AC 000A9FEC EC 0D 00 32 */ fmuls f0, f13, f0 +/* 800AD0B0 000A9FF0 D1 45 80 00 */ stfs f10, 0xCC008000@l(r5) +/* 800AD0B4 000A9FF4 D1 25 80 00 */ stfs f9, -0x8000(r5) +/* 800AD0B8 000A9FF8 D0 05 80 00 */ stfs f0, -0x8000(r5) +/* 800AD0BC 000A9FFC D0 25 80 00 */ stfs f1, -0x8000(r5) +/* 800AD0C0 000AA000 D0 45 80 00 */ stfs f2, -0x8000(r5) +/* 800AD0C4 000AA004 D0 65 80 00 */ stfs f3, -0x8000(r5) +/* 800AD0C8 000AA008 41 82 00 1C */ beq lbl_800AD0E4 +/* 800AD0CC 000AA00C D0 85 80 00 */ stfs f4, -0x8000(r5) +/* 800AD0D0 000AA010 D0 A5 80 00 */ stfs f5, -0x8000(r5) +/* 800AD0D4 000AA014 D0 C5 80 00 */ stfs f6, -0x8000(r5) +/* 800AD0D8 000AA018 D0 E5 80 00 */ stfs f7, -0x8000(r5) +/* 800AD0DC 000AA01C D1 05 80 00 */ stfs f8, -0x8000(r5) +/* 800AD0E0 000AA020 D1 65 80 00 */ stfs f11, -0x8000(r5) +lbl_800AD0E4: +/* 800AD0E4 000AA024 2C 04 00 00 */ cmpwi r4, 0 +/* 800AD0E8 000AA028 41 82 00 18 */ beq lbl_800AD100 +/* 800AD0EC 000AA02C 38 00 00 01 */ li r0, 1 +/* 800AD0F0 000AA030 3C 60 CC 01 */ lis r3, 0xCC008000@ha +/* 800AD0F4 000AA034 98 03 80 00 */ stb r0, 0xCC008000@l(r3) +/* 800AD0F8 000AA038 38 00 00 00 */ li r0, 0 +/* 800AD0FC 000AA03C 98 03 80 00 */ stb r0, -0x8000(r3) +lbl_800AD100: +/* 800AD100 000AA040 CB E1 00 50 */ lfd f31, 0x50(r1) +/* 800AD104 000AA044 CB C1 00 48 */ lfd f30, 0x48(r1) +/* 800AD108 000AA048 CB A1 00 40 */ lfd f29, 0x40(r1) +/* 800AD10C 000AA04C CB 81 00 38 */ lfd f28, 0x38(r1) +/* 800AD110 000AA050 CB 61 00 30 */ lfd f27, 0x30(r1) +/* 800AD114 000AA054 38 21 00 58 */ addi r1, r1, 0x58 +/* 800AD118 000AA058 4E 80 00 20 */ blr + +.global GXDrawCube +GXDrawCube: +/* 800AD11C 000AA05C 7C 08 02 A6 */ mflr r0 +/* 800AD120 000AA060 3C 60 80 3F */ lis r3, vcd@ha +/* 800AD124 000AA064 90 01 00 04 */ stw r0, 4(r1) +/* 800AD128 000AA068 94 21 FF E0 */ stwu r1, -0x20(r1) +/* 800AD12C 000AA06C 93 E1 00 1C */ stw r31, 0x1c(r1) +/* 800AD130 000AA070 3B E3 C7 18 */ addi r31, r3, vcd@l +/* 800AD134 000AA074 38 81 00 14 */ addi r4, r1, 0x14 +/* 800AD138 000AA078 38 60 00 19 */ li r3, 0x19 +/* 800AD13C 000AA07C 4B FF A0 09 */ bl GXGetVtxDesc +/* 800AD140 000AA080 38 60 00 0D */ li r3, 0xd +/* 800AD144 000AA084 38 81 00 10 */ addi r4, r1, 0x10 +/* 800AD148 000AA088 4B FF 9F FD */ bl GXGetVtxDesc +/* 800AD14C 000AA08C 7F E3 FB 78 */ mr r3, r31 +/* 800AD150 000AA090 4B FF A1 A9 */ bl GXGetVtxDescv +/* 800AD154 000AA094 38 60 00 03 */ li r3, 3 +/* 800AD158 000AA098 38 9F 00 D8 */ addi r4, r31, 0xd8 +/* 800AD15C 000AA09C 4B FF AC 15 */ bl GXGetVtxAttrFmtv +/* 800AD160 000AA0A0 4B FF A2 09 */ bl GXClearVtxDesc +/* 800AD164 000AA0A4 38 60 00 09 */ li r3, 9 +/* 800AD168 000AA0A8 38 80 00 01 */ li r4, 1 +/* 800AD16C 000AA0AC 4B FF 97 7D */ bl GXSetVtxDesc +/* 800AD170 000AA0B0 38 60 00 0A */ li r3, 0xa +/* 800AD174 000AA0B4 38 80 00 01 */ li r4, 1 +/* 800AD178 000AA0B8 4B FF 97 71 */ bl GXSetVtxDesc +/* 800AD17C 000AA0BC 38 60 00 03 */ li r3, 3 +/* 800AD180 000AA0C0 38 80 00 09 */ li r4, 9 +/* 800AD184 000AA0C4 38 A0 00 01 */ li r5, 1 +/* 800AD188 000AA0C8 38 C0 00 04 */ li r6, 4 +/* 800AD18C 000AA0CC 38 E0 00 00 */ li r7, 0 +/* 800AD190 000AA0D0 4B FF A2 25 */ bl GXSetVtxAttrFmt +/* 800AD194 000AA0D4 38 60 00 03 */ li r3, 3 +/* 800AD198 000AA0D8 38 80 00 0A */ li r4, 0xa +/* 800AD19C 000AA0DC 38 A0 00 00 */ li r5, 0 +/* 800AD1A0 000AA0E0 38 C0 00 04 */ li r6, 4 +/* 800AD1A4 000AA0E4 38 E0 00 00 */ li r7, 0 +/* 800AD1A8 000AA0E8 4B FF A2 0D */ bl GXSetVtxAttrFmt +/* 800AD1AC 000AA0EC 80 01 00 14 */ lwz r0, 0x14(r1) +/* 800AD1B0 000AA0F0 2C 00 00 00 */ cmpwi r0, 0 +/* 800AD1B4 000AA0F4 41 82 00 28 */ beq lbl_800AD1DC +/* 800AD1B8 000AA0F8 38 60 00 19 */ li r3, 0x19 +/* 800AD1BC 000AA0FC 38 80 00 01 */ li r4, 1 +/* 800AD1C0 000AA100 4B FF 97 29 */ bl GXSetVtxDesc +/* 800AD1C4 000AA104 38 60 00 03 */ li r3, 3 +/* 800AD1C8 000AA108 38 80 00 19 */ li r4, 0x19 +/* 800AD1CC 000AA10C 38 A0 00 01 */ li r5, 1 +/* 800AD1D0 000AA110 38 C0 00 04 */ li r6, 4 +/* 800AD1D4 000AA114 38 E0 00 00 */ li r7, 0 +/* 800AD1D8 000AA118 4B FF A1 DD */ bl GXSetVtxAttrFmt +lbl_800AD1DC: +/* 800AD1DC 000AA11C 80 01 00 10 */ lwz r0, 0x10(r1) +/* 800AD1E0 000AA120 2C 00 00 00 */ cmpwi r0, 0 +/* 800AD1E4 000AA124 41 82 00 28 */ beq lbl_800AD20C +/* 800AD1E8 000AA128 38 60 00 0D */ li r3, 0xd +/* 800AD1EC 000AA12C 38 80 00 01 */ li r4, 1 +/* 800AD1F0 000AA130 4B FF 96 F9 */ bl GXSetVtxDesc +/* 800AD1F4 000AA134 38 60 00 03 */ li r3, 3 +/* 800AD1F8 000AA138 38 80 00 0D */ li r4, 0xd +/* 800AD1FC 000AA13C 38 A0 00 01 */ li r5, 1 +/* 800AD200 000AA140 38 C0 00 01 */ li r6, 1 +/* 800AD204 000AA144 38 E0 00 00 */ li r7, 0 +/* 800AD208 000AA148 4B FF A1 AD */ bl GXSetVtxAttrFmt +lbl_800AD20C: +/* 800AD20C 000AA14C 38 60 00 80 */ li r3, 0x80 +/* 800AD210 000AA150 38 80 00 03 */ li r4, 3 +/* 800AD214 000AA154 38 A0 00 18 */ li r5, 0x18 +/* 800AD218 000AA158 4B FF B6 91 */ bl GXBegin +/* 800AD21C 000AA15C C0 42 8B 88 */ lfs f2, "@133"@sda21(r2) +/* 800AD220 000AA160 D0 41 00 08 */ stfs f2, 8(r1) +/* 800AD224 000AA164 FC 60 10 90 */ fmr f3, f2 +/* 800AD228 000AA168 FC 80 10 90 */ fmr f4, f2 +/* 800AD22C 000AA16C C0 22 8B 94 */ lfs f1, "@360"@sda21(r2) +/* 800AD230 000AA170 FC A0 10 90 */ fmr f5, f2 +/* 800AD234 000AA174 FC E0 10 90 */ fmr f7, f2 +/* 800AD238 000AA178 FC C0 08 90 */ fmr f6, f1 +/* 800AD23C 000AA17C C1 02 8B 8C */ lfs f8, "@357"@sda21(r2) +/* 800AD240 000AA180 80 61 00 14 */ lwz r3, 0x14(r1) +/* 800AD244 000AA184 80 81 00 10 */ lwz r4, 0x10(r1) +/* 800AD248 000AA188 4B FF FC BD */ bl GXDrawCubeFace +/* 800AD24C 000AA18C C0 02 8B 94 */ lfs f0, "@360"@sda21(r2) +/* 800AD250 000AA190 D0 01 00 08 */ stfs f0, 8(r1) +/* 800AD254 000AA194 C0 42 8B 88 */ lfs f2, "@133"@sda21(r2) +/* 800AD258 000AA198 C0 22 8B 8C */ lfs f1, "@357"@sda21(r2) +/* 800AD25C 000AA19C FC 60 10 90 */ fmr f3, f2 +/* 800AD260 000AA1A0 80 61 00 14 */ lwz r3, 0x14(r1) +/* 800AD264 000AA1A4 FC 80 10 90 */ fmr f4, f2 +/* 800AD268 000AA1A8 80 81 00 10 */ lwz r4, 0x10(r1) +/* 800AD26C 000AA1AC FC A0 08 90 */ fmr f5, f1 +/* 800AD270 000AA1B0 FC C0 10 90 */ fmr f6, f2 +/* 800AD274 000AA1B4 FC E0 10 90 */ fmr f7, f2 +/* 800AD278 000AA1B8 FD 00 10 90 */ fmr f8, f2 +/* 800AD27C 000AA1BC 4B FF FC 89 */ bl GXDrawCubeFace +/* 800AD280 000AA1C0 C0 02 8B 8C */ lfs f0, "@357"@sda21(r2) +/* 800AD284 000AA1C4 D0 01 00 08 */ stfs f0, 8(r1) +/* 800AD288 000AA1C8 C0 22 8B 88 */ lfs f1, "@133"@sda21(r2) +/* 800AD28C 000AA1CC C0 42 8B 94 */ lfs f2, "@360"@sda21(r2) +/* 800AD290 000AA1D0 FC 60 08 90 */ fmr f3, f1 +/* 800AD294 000AA1D4 80 61 00 14 */ lwz r3, 0x14(r1) +/* 800AD298 000AA1D8 FC 80 10 90 */ fmr f4, f2 +/* 800AD29C 000AA1DC 80 81 00 10 */ lwz r4, 0x10(r1) +/* 800AD2A0 000AA1E0 FC A0 08 90 */ fmr f5, f1 +/* 800AD2A4 000AA1E4 FC C0 08 90 */ fmr f6, f1 +/* 800AD2A8 000AA1E8 FC E0 08 90 */ fmr f7, f1 +/* 800AD2AC 000AA1EC FD 00 08 90 */ fmr f8, f1 +/* 800AD2B0 000AA1F0 4B FF FC 55 */ bl GXDrawCubeFace +/* 800AD2B4 000AA1F4 C0 22 8B 88 */ lfs f1, "@133"@sda21(r2) +/* 800AD2B8 000AA1F8 D0 21 00 08 */ stfs f1, 8(r1) +/* 800AD2BC 000AA1FC FC 60 08 90 */ fmr f3, f1 +/* 800AD2C0 000AA200 FC 80 08 90 */ fmr f4, f1 +/* 800AD2C4 000AA204 C0 42 8B 8C */ lfs f2, "@357"@sda21(r2) +/* 800AD2C8 000AA208 FC A0 08 90 */ fmr f5, f1 +/* 800AD2CC 000AA20C FD 00 08 90 */ fmr f8, f1 +/* 800AD2D0 000AA210 FC C0 10 90 */ fmr f6, f2 +/* 800AD2D4 000AA214 C0 E2 8B 94 */ lfs f7, "@360"@sda21(r2) +/* 800AD2D8 000AA218 80 61 00 14 */ lwz r3, 0x14(r1) +/* 800AD2DC 000AA21C 80 81 00 10 */ lwz r4, 0x10(r1) +/* 800AD2E0 000AA220 4B FF FC 25 */ bl GXDrawCubeFace +/* 800AD2E4 000AA224 C0 22 8B 88 */ lfs f1, "@133"@sda21(r2) +/* 800AD2E8 000AA228 D0 21 00 08 */ stfs f1, 8(r1) +/* 800AD2EC 000AA22C FC 40 08 90 */ fmr f2, f1 +/* 800AD2F0 000AA230 FC 80 08 90 */ fmr f4, f1 +/* 800AD2F4 000AA234 C0 62 8B 94 */ lfs f3, "@360"@sda21(r2) +/* 800AD2F8 000AA238 FC C0 08 90 */ fmr f6, f1 +/* 800AD2FC 000AA23C FD 00 08 90 */ fmr f8, f1 +/* 800AD300 000AA240 FC A0 18 90 */ fmr f5, f3 +/* 800AD304 000AA244 C0 E2 8B 8C */ lfs f7, "@357"@sda21(r2) +/* 800AD308 000AA248 80 61 00 14 */ lwz r3, 0x14(r1) +/* 800AD30C 000AA24C 80 81 00 10 */ lwz r4, 0x10(r1) +/* 800AD310 000AA250 4B FF FB F5 */ bl GXDrawCubeFace +/* 800AD314 000AA254 C0 22 8B 88 */ lfs f1, "@133"@sda21(r2) +/* 800AD318 000AA258 D0 21 00 08 */ stfs f1, 8(r1) +/* 800AD31C 000AA25C FC 40 08 90 */ fmr f2, f1 +/* 800AD320 000AA260 FC A0 08 90 */ fmr f5, f1 +/* 800AD324 000AA264 C0 62 8B 8C */ lfs f3, "@357"@sda21(r2) +/* 800AD328 000AA268 FC C0 08 90 */ fmr f6, f1 +/* 800AD32C 000AA26C FC E0 08 90 */ fmr f7, f1 +/* 800AD330 000AA270 FC 80 18 90 */ fmr f4, f3 +/* 800AD334 000AA274 C1 02 8B 94 */ lfs f8, "@360"@sda21(r2) +/* 800AD338 000AA278 80 61 00 14 */ lwz r3, 0x14(r1) +/* 800AD33C 000AA27C 80 81 00 10 */ lwz r4, 0x10(r1) +/* 800AD340 000AA280 4B FF FB C5 */ bl GXDrawCubeFace +/* 800AD344 000AA284 7F E3 FB 78 */ mr r3, r31 +/* 800AD348 000AA288 4B FF 99 01 */ bl GXSetVtxDescv +/* 800AD34C 000AA28C 38 60 00 03 */ li r3, 3 +/* 800AD350 000AA290 38 9F 00 D8 */ addi r4, r31, 0xd8 +/* 800AD354 000AA294 4B FF A3 BD */ bl GXSetVtxAttrFmtv +/* 800AD358 000AA298 80 01 00 24 */ lwz r0, 0x24(r1) +/* 800AD35C 000AA29C 83 E1 00 1C */ lwz r31, 0x1c(r1) +/* 800AD360 000AA2A0 38 21 00 20 */ addi r1, r1, 0x20 +/* 800AD364 000AA2A4 7C 08 03 A6 */ mtlr r0 +/* 800AD368 000AA2A8 4E 80 00 20 */ blr + +.section .sdata2, "a" # 0x8040B460 - 0x80414020 +.balign 8 +"@133": + .4byte 0 +"@357": + .4byte 0x3F800000 +"@358": + .4byte 0x40490FDB +"@360": + .4byte 0xBF800000 +"@362": + .4byte 0x43300000 + .4byte 0x80000000 +"@364": + .4byte 0x43300000 + .4byte 0 +"@405": + .4byte 0x40C90FDB +"@493": + .4byte 0x3F13CD3A + +.section .bss, "wa" # 0x803E6000 - 0x80408AC0 +vcd: + .skip 0xD8 +vat: + .skip 0x1B0 diff --git a/asm/Dolphin/gx/GXFifo.s b/asm/Dolphin/gx/GXFifo.s new file mode 100644 index 0000000..23df893 --- /dev/null +++ b/asm/Dolphin/gx/GXFifo.s @@ -0,0 +1,577 @@ +.include "macros.inc" + +.section .text, "ax" # 0x80005600 - 0x8036FBA0 +.global GXCPInterruptHandler +GXCPInterruptHandler: +/* 800A5FD4 000A2F14 7C 08 02 A6 */ mflr r0 +/* 800A5FD8 000A2F18 90 01 00 04 */ stw r0, 4(r1) +/* 800A5FDC 000A2F1C 94 21 FD 20 */ stwu r1, -0x2e0(r1) +/* 800A5FE0 000A2F20 93 E1 02 DC */ stw r31, 0x2dc(r1) +/* 800A5FE4 000A2F24 7C 9F 23 78 */ mr r31, r4 +/* 800A5FE8 000A2F28 80 AD 95 5C */ lwz r5, __cpReg@sda21(r13) +/* 800A5FEC 000A2F2C 80 6D 82 C8 */ lwz r3, gx@sda21(r13) +/* 800A5FF0 000A2F30 A0 05 00 00 */ lhz r0, 0(r5) +/* 800A5FF4 000A2F34 90 03 00 0C */ stw r0, 0xc(r3) +/* 800A5FF8 000A2F38 80 6D 82 C8 */ lwz r3, gx@sda21(r13) +/* 800A5FFC 000A2F3C 80 03 00 08 */ lwz r0, 8(r3) +/* 800A6000 000A2F40 54 00 EF FF */ rlwinm. r0, r0, 0x1d, 0x1f, 0x1f +/* 800A6004 000A2F44 41 82 00 38 */ beq lbl_800A603C +/* 800A6008 000A2F48 80 03 00 0C */ lwz r0, 0xc(r3) +/* 800A600C 000A2F4C 54 00 FF FF */ rlwinm. r0, r0, 0x1f, 0x1f, 0x1f +/* 800A6010 000A2F50 41 82 00 2C */ beq lbl_800A603C +/* 800A6014 000A2F54 80 6D 95 70 */ lwz r3, __GXCurrentThread@sda21(r13) +/* 800A6018 000A2F58 4B FE D7 F1 */ bl OSResumeThread +/* 800A601C 000A2F5C 38 00 00 00 */ li r0, 0 +/* 800A6020 000A2F60 90 0D 95 78 */ stw r0, GXOverflowSuspendInProgress@sda21(r13) +/* 800A6024 000A2F64 38 60 00 01 */ li r3, 1 +/* 800A6028 000A2F68 38 80 00 01 */ li r4, 1 +/* 800A602C 000A2F6C 48 00 07 11 */ bl __GXWriteFifoIntReset +/* 800A6030 000A2F70 38 60 00 01 */ li r3, 1 +/* 800A6034 000A2F74 38 80 00 00 */ li r4, 0 +/* 800A6038 000A2F78 48 00 06 B9 */ bl __GXWriteFifoIntEnable +lbl_800A603C: +/* 800A603C 000A2F7C 80 6D 82 C8 */ lwz r3, gx@sda21(r13) +/* 800A6040 000A2F80 80 03 00 08 */ lwz r0, 8(r3) +/* 800A6044 000A2F84 54 00 F7 FF */ rlwinm. r0, r0, 0x1e, 0x1f, 0x1f +/* 800A6048 000A2F88 41 82 00 44 */ beq lbl_800A608C +/* 800A604C 000A2F8C 80 03 00 0C */ lwz r0, 0xc(r3) +/* 800A6050 000A2F90 54 00 07 FF */ clrlwi. r0, r0, 0x1f +/* 800A6054 000A2F94 41 82 00 38 */ beq lbl_800A608C +/* 800A6058 000A2F98 80 AD 95 80 */ lwz r5, __GXOverflowCount@sda21(r13) +/* 800A605C 000A2F9C 38 60 00 00 */ li r3, 0 +/* 800A6060 000A2FA0 38 80 00 01 */ li r4, 1 +/* 800A6064 000A2FA4 38 05 00 01 */ addi r0, r5, 1 +/* 800A6068 000A2FA8 90 0D 95 80 */ stw r0, __GXOverflowCount@sda21(r13) +/* 800A606C 000A2FAC 48 00 06 85 */ bl __GXWriteFifoIntEnable +/* 800A6070 000A2FB0 38 60 00 01 */ li r3, 1 +/* 800A6074 000A2FB4 38 80 00 00 */ li r4, 0 +/* 800A6078 000A2FB8 48 00 06 C5 */ bl __GXWriteFifoIntReset +/* 800A607C 000A2FBC 38 00 00 01 */ li r0, 1 +/* 800A6080 000A2FC0 80 6D 95 70 */ lwz r3, __GXCurrentThread@sda21(r13) +/* 800A6084 000A2FC4 90 0D 95 78 */ stw r0, GXOverflowSuspendInProgress@sda21(r13) +/* 800A6088 000A2FC8 4B FE DA 09 */ bl OSSuspendThread +lbl_800A608C: +/* 800A608C 000A2FCC 80 6D 82 C8 */ lwz r3, gx@sda21(r13) +/* 800A6090 000A2FD0 80 83 00 08 */ lwz r4, 8(r3) +/* 800A6094 000A2FD4 38 A3 00 08 */ addi r5, r3, 8 +/* 800A6098 000A2FD8 54 80 DF FF */ rlwinm. r0, r4, 0x1b, 0x1f, 0x1f +/* 800A609C 000A2FDC 41 82 00 60 */ beq lbl_800A60FC +/* 800A60A0 000A2FE0 80 03 00 0C */ lwz r0, 0xc(r3) +/* 800A60A4 000A2FE4 54 00 E7 FF */ rlwinm. r0, r0, 0x1c, 0x1f, 0x1f +/* 800A60A8 000A2FE8 41 82 00 54 */ beq lbl_800A60FC +/* 800A60AC 000A2FEC 54 80 06 F2 */ rlwinm r0, r4, 0, 0x1b, 0x19 +/* 800A60B0 000A2FF0 90 05 00 00 */ stw r0, 0(r5) +/* 800A60B4 000A2FF4 80 8D 82 C8 */ lwz r4, gx@sda21(r13) +/* 800A60B8 000A2FF8 80 6D 95 5C */ lwz r3, __cpReg@sda21(r13) +/* 800A60BC 000A2FFC 80 04 00 08 */ lwz r0, 8(r4) +/* 800A60C0 000A3000 B0 03 00 02 */ sth r0, 2(r3) +/* 800A60C4 000A3004 80 0D 95 7C */ lwz r0, BreakPointCB@sda21(r13) +/* 800A60C8 000A3008 28 00 00 00 */ cmplwi r0, 0 +/* 800A60CC 000A300C 41 82 00 30 */ beq lbl_800A60FC +/* 800A60D0 000A3010 38 61 00 10 */ addi r3, r1, 0x10 +/* 800A60D4 000A3014 4B FE 89 11 */ bl OSClearContext +/* 800A60D8 000A3018 38 61 00 10 */ addi r3, r1, 0x10 +/* 800A60DC 000A301C 4B FE 87 41 */ bl OSSetCurrentContext +/* 800A60E0 000A3020 81 8D 95 7C */ lwz r12, BreakPointCB@sda21(r13) +/* 800A60E4 000A3024 7D 88 03 A6 */ mtlr r12 +/* 800A60E8 000A3028 4E 80 00 21 */ blrl +/* 800A60EC 000A302C 38 61 00 10 */ addi r3, r1, 0x10 +/* 800A60F0 000A3030 4B FE 88 F5 */ bl OSClearContext +/* 800A60F4 000A3034 7F E3 FB 78 */ mr r3, r31 +/* 800A60F8 000A3038 4B FE 87 25 */ bl OSSetCurrentContext +lbl_800A60FC: +/* 800A60FC 000A303C 80 01 02 E4 */ lwz r0, 0x2e4(r1) +/* 800A6100 000A3040 83 E1 02 DC */ lwz r31, 0x2dc(r1) +/* 800A6104 000A3044 38 21 02 E0 */ addi r1, r1, 0x2e0 +/* 800A6108 000A3048 7C 08 03 A6 */ mtlr r0 +/* 800A610C 000A304C 4E 80 00 20 */ blr + +.global GXInitFifoBase +GXInitFifoBase: +/* 800A6110 000A3050 7C 08 02 A6 */ mflr r0 +/* 800A6114 000A3054 90 01 00 04 */ stw r0, 4(r1) +/* 800A6118 000A3058 38 05 FF FC */ addi r0, r5, -4 +/* 800A611C 000A305C 94 21 FF E0 */ stwu r1, -0x20(r1) +/* 800A6120 000A3060 93 E1 00 1C */ stw r31, 0x1c(r1) +/* 800A6124 000A3064 3B E4 00 00 */ addi r31, r4, 0 +/* 800A6128 000A3068 7C 1F 02 14 */ add r0, r31, r0 +/* 800A612C 000A306C 93 C1 00 18 */ stw r30, 0x18(r1) +/* 800A6130 000A3070 3B C3 00 00 */ addi r30, r3, 0 +/* 800A6134 000A3074 38 85 C0 00 */ addi r4, r5, -16384 +/* 800A6138 000A3078 93 E3 00 00 */ stw r31, 0(r3) +/* 800A613C 000A307C 90 03 00 04 */ stw r0, 4(r3) +/* 800A6140 000A3080 38 00 00 00 */ li r0, 0 +/* 800A6144 000A3084 90 A3 00 08 */ stw r5, 8(r3) +/* 800A6148 000A3088 54 A5 F8 74 */ rlwinm r5, r5, 0x1f, 1, 0x1a +/* 800A614C 000A308C 90 1E 00 1C */ stw r0, 0x1c(r30) +/* 800A6150 000A3090 48 00 00 9D */ bl GXInitFifoLimits +/* 800A6154 000A3094 38 7E 00 00 */ addi r3, r30, 0 +/* 800A6158 000A3098 38 9F 00 00 */ addi r4, r31, 0 +/* 800A615C 000A309C 38 BF 00 00 */ addi r5, r31, 0 +/* 800A6160 000A30A0 48 00 00 1D */ bl GXInitFifoPtrs +/* 800A6164 000A30A4 80 01 00 24 */ lwz r0, 0x24(r1) +/* 800A6168 000A30A8 83 E1 00 1C */ lwz r31, 0x1c(r1) +/* 800A616C 000A30AC 83 C1 00 18 */ lwz r30, 0x18(r1) +/* 800A6170 000A30B0 38 21 00 20 */ addi r1, r1, 0x20 +/* 800A6174 000A30B4 7C 08 03 A6 */ mtlr r0 +/* 800A6178 000A30B8 4E 80 00 20 */ blr + +.global GXInitFifoPtrs +GXInitFifoPtrs: +/* 800A617C 000A30BC 7C 08 02 A6 */ mflr r0 +/* 800A6180 000A30C0 90 01 00 04 */ stw r0, 4(r1) +/* 800A6184 000A30C4 94 21 FF D8 */ stwu r1, -0x28(r1) +/* 800A6188 000A30C8 93 E1 00 24 */ stw r31, 0x24(r1) +/* 800A618C 000A30CC 3B E5 00 00 */ addi r31, r5, 0 +/* 800A6190 000A30D0 93 C1 00 20 */ stw r30, 0x20(r1) +/* 800A6194 000A30D4 3B C4 00 00 */ addi r30, r4, 0 +/* 800A6198 000A30D8 93 A1 00 1C */ stw r29, 0x1c(r1) +/* 800A619C 000A30DC 3B A3 00 00 */ addi r29, r3, 0 +/* 800A61A0 000A30E0 4B FE A0 2D */ bl OSDisableInterrupts +/* 800A61A4 000A30E4 93 DD 00 14 */ stw r30, 0x14(r29) +/* 800A61A8 000A30E8 7C 1E F8 50 */ subf r0, r30, r31 +/* 800A61AC 000A30EC 93 FD 00 18 */ stw r31, 0x18(r29) +/* 800A61B0 000A30F0 90 1D 00 1C */ stw r0, 0x1c(r29) +/* 800A61B4 000A30F4 80 9D 00 1C */ lwz r4, 0x1c(r29) +/* 800A61B8 000A30F8 2C 04 00 00 */ cmpwi r4, 0 +/* 800A61BC 000A30FC 40 80 00 10 */ bge lbl_800A61CC +/* 800A61C0 000A3100 80 1D 00 08 */ lwz r0, 8(r29) +/* 800A61C4 000A3104 7C 04 02 14 */ add r0, r4, r0 +/* 800A61C8 000A3108 90 1D 00 1C */ stw r0, 0x1c(r29) +lbl_800A61CC: +/* 800A61CC 000A310C 4B FE A0 29 */ bl OSRestoreInterrupts +/* 800A61D0 000A3110 80 01 00 2C */ lwz r0, 0x2c(r1) +/* 800A61D4 000A3114 83 E1 00 24 */ lwz r31, 0x24(r1) +/* 800A61D8 000A3118 83 C1 00 20 */ lwz r30, 0x20(r1) +/* 800A61DC 000A311C 83 A1 00 1C */ lwz r29, 0x1c(r1) +/* 800A61E0 000A3120 38 21 00 28 */ addi r1, r1, 0x28 +/* 800A61E4 000A3124 7C 08 03 A6 */ mtlr r0 +/* 800A61E8 000A3128 4E 80 00 20 */ blr + +.global GXInitFifoLimits +GXInitFifoLimits: +/* 800A61EC 000A312C 90 83 00 0C */ stw r4, 0xc(r3) +/* 800A61F0 000A3130 90 A3 00 10 */ stw r5, 0x10(r3) +/* 800A61F4 000A3134 4E 80 00 20 */ blr + +.global GXSetCPUFifo +GXSetCPUFifo: +/* 800A61F8 000A3138 7C 08 02 A6 */ mflr r0 +/* 800A61FC 000A313C 90 01 00 04 */ stw r0, 4(r1) +/* 800A6200 000A3140 94 21 FF E8 */ stwu r1, -0x18(r1) +/* 800A6204 000A3144 93 E1 00 14 */ stw r31, 0x14(r1) +/* 800A6208 000A3148 93 C1 00 10 */ stw r30, 0x10(r1) +/* 800A620C 000A314C 7C 7E 1B 78 */ mr r30, r3 +/* 800A6210 000A3150 4B FE 9F BD */ bl OSDisableInterrupts +/* 800A6214 000A3154 80 0D 95 6C */ lwz r0, GPFifo@sda21(r13) +/* 800A6218 000A3158 3B E3 00 00 */ addi r31, r3, 0 +/* 800A621C 000A315C 93 CD 95 68 */ stw r30, CPUFifo@sda21(r13) +/* 800A6220 000A3160 7C 1E 00 40 */ cmplw r30, r0 +/* 800A6224 000A3164 40 82 00 64 */ bne lbl_800A6288 +/* 800A6228 000A3168 80 BE 00 00 */ lwz r5, 0(r30) +/* 800A622C 000A316C 38 00 00 01 */ li r0, 1 +/* 800A6230 000A3170 80 8D 95 58 */ lwz r4, __piReg@sda21(r13) +/* 800A6234 000A3174 38 60 00 01 */ li r3, 1 +/* 800A6238 000A3178 54 A5 00 BE */ clrlwi r5, r5, 2 +/* 800A623C 000A317C 90 A4 00 0C */ stw r5, 0xc(r4) +/* 800A6240 000A3180 38 80 00 01 */ li r4, 1 +/* 800A6244 000A3184 80 DE 00 04 */ lwz r6, 4(r30) +/* 800A6248 000A3188 80 AD 95 58 */ lwz r5, __piReg@sda21(r13) +/* 800A624C 000A318C 54 C6 00 BE */ clrlwi r6, r6, 2 +/* 800A6250 000A3190 90 C5 00 10 */ stw r6, 0x10(r5) +/* 800A6254 000A3194 80 DE 00 18 */ lwz r6, 0x18(r30) +/* 800A6258 000A3198 80 AD 95 58 */ lwz r5, __piReg@sda21(r13) +/* 800A625C 000A319C 54 C6 00 B4 */ rlwinm r6, r6, 0, 2, 0x1a +/* 800A6260 000A31A0 54 C6 01 88 */ rlwinm r6, r6, 0, 6, 4 +/* 800A6264 000A31A4 90 C5 00 14 */ stw r6, 0x14(r5) +/* 800A6268 000A31A8 98 0D 95 74 */ stb r0, CPGPLinked@sda21(r13) +/* 800A626C 000A31AC 48 00 04 D1 */ bl __GXWriteFifoIntReset +/* 800A6270 000A31B0 38 60 00 01 */ li r3, 1 +/* 800A6274 000A31B4 38 80 00 00 */ li r4, 0 +/* 800A6278 000A31B8 48 00 04 79 */ bl __GXWriteFifoIntEnable +/* 800A627C 000A31BC 38 60 00 01 */ li r3, 1 +/* 800A6280 000A31C0 48 00 04 2D */ bl __GXFifoLink +/* 800A6284 000A31C4 48 00 00 60 */ b lbl_800A62E4 +lbl_800A6288: +/* 800A6288 000A31C8 88 0D 95 74 */ lbz r0, CPGPLinked@sda21(r13) +/* 800A628C 000A31CC 28 00 00 00 */ cmplwi r0, 0 +/* 800A6290 000A31D0 41 82 00 14 */ beq lbl_800A62A4 +/* 800A6294 000A31D4 38 60 00 00 */ li r3, 0 +/* 800A6298 000A31D8 48 00 04 15 */ bl __GXFifoLink +/* 800A629C 000A31DC 38 00 00 00 */ li r0, 0 +/* 800A62A0 000A31E0 98 0D 95 74 */ stb r0, CPGPLinked@sda21(r13) +lbl_800A62A4: +/* 800A62A4 000A31E4 38 60 00 00 */ li r3, 0 +/* 800A62A8 000A31E8 38 80 00 00 */ li r4, 0 +/* 800A62AC 000A31EC 48 00 04 45 */ bl __GXWriteFifoIntEnable +/* 800A62B0 000A31F0 80 1E 00 00 */ lwz r0, 0(r30) +/* 800A62B4 000A31F4 80 6D 95 58 */ lwz r3, __piReg@sda21(r13) +/* 800A62B8 000A31F8 54 00 00 BE */ clrlwi r0, r0, 2 +/* 800A62BC 000A31FC 90 03 00 0C */ stw r0, 0xc(r3) +/* 800A62C0 000A3200 80 1E 00 04 */ lwz r0, 4(r30) +/* 800A62C4 000A3204 80 6D 95 58 */ lwz r3, __piReg@sda21(r13) +/* 800A62C8 000A3208 54 00 00 BE */ clrlwi r0, r0, 2 +/* 800A62CC 000A320C 90 03 00 10 */ stw r0, 0x10(r3) +/* 800A62D0 000A3210 80 1E 00 18 */ lwz r0, 0x18(r30) +/* 800A62D4 000A3214 80 6D 95 58 */ lwz r3, __piReg@sda21(r13) +/* 800A62D8 000A3218 54 00 00 B4 */ rlwinm r0, r0, 0, 2, 0x1a +/* 800A62DC 000A321C 54 00 01 88 */ rlwinm r0, r0, 0, 6, 4 +/* 800A62E0 000A3220 90 03 00 14 */ stw r0, 0x14(r3) +lbl_800A62E4: +/* 800A62E4 000A3224 7C 00 04 AC */ sync 0 +/* 800A62E8 000A3228 7F E3 FB 78 */ mr r3, r31 +/* 800A62EC 000A322C 4B FE 9F 09 */ bl OSRestoreInterrupts +/* 800A62F0 000A3230 80 01 00 1C */ lwz r0, 0x1c(r1) +/* 800A62F4 000A3234 83 E1 00 14 */ lwz r31, 0x14(r1) +/* 800A62F8 000A3238 83 C1 00 10 */ lwz r30, 0x10(r1) +/* 800A62FC 000A323C 38 21 00 18 */ addi r1, r1, 0x18 +/* 800A6300 000A3240 7C 08 03 A6 */ mtlr r0 +/* 800A6304 000A3244 4E 80 00 20 */ blr + +.global GXSetGPFifo +GXSetGPFifo: +/* 800A6308 000A3248 7C 08 02 A6 */ mflr r0 +/* 800A630C 000A324C 90 01 00 04 */ stw r0, 4(r1) +/* 800A6310 000A3250 94 21 FF E8 */ stwu r1, -0x18(r1) +/* 800A6314 000A3254 93 E1 00 14 */ stw r31, 0x14(r1) +/* 800A6318 000A3258 93 C1 00 10 */ stw r30, 0x10(r1) +/* 800A631C 000A325C 7C 7E 1B 78 */ mr r30, r3 +/* 800A6320 000A3260 4B FE 9E AD */ bl OSDisableInterrupts +/* 800A6324 000A3264 7C 7F 1B 78 */ mr r31, r3 +/* 800A6328 000A3268 48 00 03 61 */ bl __GXFifoReadDisable +/* 800A632C 000A326C 38 60 00 00 */ li r3, 0 +/* 800A6330 000A3270 38 80 00 00 */ li r4, 0 +/* 800A6334 000A3274 48 00 03 BD */ bl __GXWriteFifoIntEnable +/* 800A6338 000A3278 93 CD 95 6C */ stw r30, GPFifo@sda21(r13) +/* 800A633C 000A327C 80 6D 95 5C */ lwz r3, __cpReg@sda21(r13) +/* 800A6340 000A3280 80 1E 00 00 */ lwz r0, 0(r30) +/* 800A6344 000A3284 B0 03 00 20 */ sth r0, 0x20(r3) +/* 800A6348 000A3288 80 1E 00 04 */ lwz r0, 4(r30) +/* 800A634C 000A328C 80 6D 95 5C */ lwz r3, __cpReg@sda21(r13) +/* 800A6350 000A3290 B0 03 00 24 */ sth r0, 0x24(r3) +/* 800A6354 000A3294 80 1E 00 1C */ lwz r0, 0x1c(r30) +/* 800A6358 000A3298 80 6D 95 5C */ lwz r3, __cpReg@sda21(r13) +/* 800A635C 000A329C B0 03 00 30 */ sth r0, 0x30(r3) +/* 800A6360 000A32A0 80 1E 00 18 */ lwz r0, 0x18(r30) +/* 800A6364 000A32A4 80 6D 95 5C */ lwz r3, __cpReg@sda21(r13) +/* 800A6368 000A32A8 B0 03 00 34 */ sth r0, 0x34(r3) +/* 800A636C 000A32AC 80 1E 00 14 */ lwz r0, 0x14(r30) +/* 800A6370 000A32B0 80 6D 95 5C */ lwz r3, __cpReg@sda21(r13) +/* 800A6374 000A32B4 B0 03 00 38 */ sth r0, 0x38(r3) +/* 800A6378 000A32B8 80 1E 00 0C */ lwz r0, 0xc(r30) +/* 800A637C 000A32BC 80 6D 95 5C */ lwz r3, __cpReg@sda21(r13) +/* 800A6380 000A32C0 B0 03 00 28 */ sth r0, 0x28(r3) +/* 800A6384 000A32C4 80 1E 00 10 */ lwz r0, 0x10(r30) +/* 800A6388 000A32C8 80 6D 95 5C */ lwz r3, __cpReg@sda21(r13) +/* 800A638C 000A32CC B0 03 00 2C */ sth r0, 0x2c(r3) +/* 800A6390 000A32D0 80 1E 00 00 */ lwz r0, 0(r30) +/* 800A6394 000A32D4 80 6D 95 5C */ lwz r3, __cpReg@sda21(r13) +/* 800A6398 000A32D8 54 00 84 BE */ rlwinm r0, r0, 0x10, 0x12, 0x1f +/* 800A639C 000A32DC B0 03 00 22 */ sth r0, 0x22(r3) +/* 800A63A0 000A32E0 80 1E 00 04 */ lwz r0, 4(r30) +/* 800A63A4 000A32E4 80 6D 95 5C */ lwz r3, __cpReg@sda21(r13) +/* 800A63A8 000A32E8 54 00 84 BE */ rlwinm r0, r0, 0x10, 0x12, 0x1f +/* 800A63AC 000A32EC B0 03 00 26 */ sth r0, 0x26(r3) +/* 800A63B0 000A32F0 80 1E 00 1C */ lwz r0, 0x1c(r30) +/* 800A63B4 000A32F4 80 6D 95 5C */ lwz r3, __cpReg@sda21(r13) +/* 800A63B8 000A32F8 7C 00 86 70 */ srawi r0, r0, 0x10 +/* 800A63BC 000A32FC B0 03 00 32 */ sth r0, 0x32(r3) +/* 800A63C0 000A3300 80 1E 00 18 */ lwz r0, 0x18(r30) +/* 800A63C4 000A3304 80 6D 95 5C */ lwz r3, __cpReg@sda21(r13) +/* 800A63C8 000A3308 54 00 84 BE */ rlwinm r0, r0, 0x10, 0x12, 0x1f +/* 800A63CC 000A330C B0 03 00 36 */ sth r0, 0x36(r3) +/* 800A63D0 000A3310 80 1E 00 14 */ lwz r0, 0x14(r30) +/* 800A63D4 000A3314 80 6D 95 5C */ lwz r3, __cpReg@sda21(r13) +/* 800A63D8 000A3318 54 00 84 BE */ rlwinm r0, r0, 0x10, 0x12, 0x1f +/* 800A63DC 000A331C B0 03 00 3A */ sth r0, 0x3a(r3) +/* 800A63E0 000A3320 80 1E 00 0C */ lwz r0, 0xc(r30) +/* 800A63E4 000A3324 80 6D 95 5C */ lwz r3, __cpReg@sda21(r13) +/* 800A63E8 000A3328 54 00 84 3E */ srwi r0, r0, 0x10 +/* 800A63EC 000A332C B0 03 00 2A */ sth r0, 0x2a(r3) +/* 800A63F0 000A3330 80 1E 00 10 */ lwz r0, 0x10(r30) +/* 800A63F4 000A3334 80 6D 95 5C */ lwz r3, __cpReg@sda21(r13) +/* 800A63F8 000A3338 54 00 84 3E */ srwi r0, r0, 0x10 +/* 800A63FC 000A333C B0 03 00 2E */ sth r0, 0x2e(r3) +/* 800A6400 000A3340 7C 00 04 AC */ sync 0 +/* 800A6404 000A3344 80 6D 95 68 */ lwz r3, CPUFifo@sda21(r13) +/* 800A6408 000A3348 80 0D 95 6C */ lwz r0, GPFifo@sda21(r13) +/* 800A640C 000A334C 7C 03 00 40 */ cmplw r3, r0 +/* 800A6410 000A3350 40 82 00 24 */ bne lbl_800A6434 +/* 800A6414 000A3354 38 00 00 01 */ li r0, 1 +/* 800A6418 000A3358 98 0D 95 74 */ stb r0, CPGPLinked@sda21(r13) +/* 800A641C 000A335C 38 60 00 01 */ li r3, 1 +/* 800A6420 000A3360 38 80 00 00 */ li r4, 0 +/* 800A6424 000A3364 48 00 02 CD */ bl __GXWriteFifoIntEnable +/* 800A6428 000A3368 38 60 00 01 */ li r3, 1 +/* 800A642C 000A336C 48 00 02 81 */ bl __GXFifoLink +/* 800A6430 000A3370 48 00 00 20 */ b lbl_800A6450 +lbl_800A6434: +/* 800A6434 000A3374 38 00 00 00 */ li r0, 0 +/* 800A6438 000A3378 98 0D 95 74 */ stb r0, CPGPLinked@sda21(r13) +/* 800A643C 000A337C 38 60 00 00 */ li r3, 0 +/* 800A6440 000A3380 38 80 00 00 */ li r4, 0 +/* 800A6444 000A3384 48 00 02 AD */ bl __GXWriteFifoIntEnable +/* 800A6448 000A3388 38 60 00 00 */ li r3, 0 +/* 800A644C 000A338C 48 00 02 61 */ bl __GXFifoLink +lbl_800A6450: +/* 800A6450 000A3390 38 60 00 01 */ li r3, 1 +/* 800A6454 000A3394 38 80 00 01 */ li r4, 1 +/* 800A6458 000A3398 48 00 02 E5 */ bl __GXWriteFifoIntReset +/* 800A645C 000A339C 48 00 02 05 */ bl __GXFifoReadEnable +/* 800A6460 000A33A0 7F E3 FB 78 */ mr r3, r31 +/* 800A6464 000A33A4 4B FE 9D 91 */ bl OSRestoreInterrupts +/* 800A6468 000A33A8 80 01 00 1C */ lwz r0, 0x1c(r1) +/* 800A646C 000A33AC 83 E1 00 14 */ lwz r31, 0x14(r1) +/* 800A6470 000A33B0 83 C1 00 10 */ lwz r30, 0x10(r1) +/* 800A6474 000A33B4 38 21 00 18 */ addi r1, r1, 0x18 +/* 800A6478 000A33B8 7C 08 03 A6 */ mtlr r0 +/* 800A647C 000A33BC 4E 80 00 20 */ blr + +.global GXGetFifoPtrs +GXGetFifoPtrs: +/* 800A6480 000A33C0 80 0D 95 68 */ lwz r0, CPUFifo@sda21(r13) +/* 800A6484 000A33C4 7C 03 00 40 */ cmplw r3, r0 +/* 800A6488 000A33C8 40 82 00 18 */ bne lbl_800A64A0 +/* 800A648C 000A33CC 80 CD 95 58 */ lwz r6, __piReg@sda21(r13) +/* 800A6490 000A33D0 80 06 00 14 */ lwz r0, 0x14(r6) +/* 800A6494 000A33D4 54 06 01 88 */ rlwinm r6, r0, 0, 6, 4 +/* 800A6498 000A33D8 3C 06 80 00 */ addis r0, r6, 0x8000 +/* 800A649C 000A33DC 90 03 00 18 */ stw r0, 0x18(r3) +lbl_800A64A0: +/* 800A64A0 000A33E0 80 0D 95 6C */ lwz r0, GPFifo@sda21(r13) +/* 800A64A4 000A33E4 7C 03 00 40 */ cmplw r3, r0 +/* 800A64A8 000A33E8 40 82 00 34 */ bne lbl_800A64DC +/* 800A64AC 000A33EC 80 ED 95 5C */ lwz r7, __cpReg@sda21(r13) +/* 800A64B0 000A33F0 A0 C7 00 3A */ lhz r6, 0x3a(r7) +/* 800A64B4 000A33F4 A0 E7 00 38 */ lhz r7, 0x38(r7) +/* 800A64B8 000A33F8 50 C7 80 1E */ rlwimi r7, r6, 0x10, 0, 0xf +/* 800A64BC 000A33FC 3C 07 80 00 */ addis r0, r7, 0x8000 +/* 800A64C0 000A3400 90 03 00 14 */ stw r0, 0x14(r3) +/* 800A64C4 000A3404 80 ED 95 5C */ lwz r7, __cpReg@sda21(r13) +/* 800A64C8 000A3408 A0 C7 00 32 */ lhz r6, 0x32(r7) +/* 800A64CC 000A340C A0 07 00 30 */ lhz r0, 0x30(r7) +/* 800A64D0 000A3410 50 C0 80 1E */ rlwimi r0, r6, 0x10, 0, 0xf +/* 800A64D4 000A3414 90 03 00 1C */ stw r0, 0x1c(r3) +/* 800A64D8 000A3418 48 00 00 2C */ b lbl_800A6504 +lbl_800A64DC: +/* 800A64DC 000A341C 80 C3 00 14 */ lwz r6, 0x14(r3) +/* 800A64E0 000A3420 80 03 00 18 */ lwz r0, 0x18(r3) +/* 800A64E4 000A3424 7C 06 00 50 */ subf r0, r6, r0 +/* 800A64E8 000A3428 90 03 00 1C */ stw r0, 0x1c(r3) +/* 800A64EC 000A342C 80 C3 00 1C */ lwz r6, 0x1c(r3) +/* 800A64F0 000A3430 2C 06 00 00 */ cmpwi r6, 0 +/* 800A64F4 000A3434 40 80 00 10 */ bge lbl_800A6504 +/* 800A64F8 000A3438 80 03 00 08 */ lwz r0, 8(r3) +/* 800A64FC 000A343C 7C 06 02 14 */ add r0, r6, r0 +/* 800A6500 000A3440 90 03 00 1C */ stw r0, 0x1c(r3) +lbl_800A6504: +/* 800A6504 000A3444 80 03 00 14 */ lwz r0, 0x14(r3) +/* 800A6508 000A3448 90 04 00 00 */ stw r0, 0(r4) +/* 800A650C 000A344C 80 03 00 18 */ lwz r0, 0x18(r3) +/* 800A6510 000A3450 90 05 00 00 */ stw r0, 0(r5) +/* 800A6514 000A3454 4E 80 00 20 */ blr + +.global GXEnableBreakPt +GXEnableBreakPt: +/* 800A6518 000A3458 7C 08 02 A6 */ mflr r0 +/* 800A651C 000A345C 90 01 00 04 */ stw r0, 4(r1) +/* 800A6520 000A3460 94 21 FF E8 */ stwu r1, -0x18(r1) +/* 800A6524 000A3464 93 E1 00 14 */ stw r31, 0x14(r1) +/* 800A6528 000A3468 7C 7F 1B 78 */ mr r31, r3 +/* 800A652C 000A346C 93 C1 00 10 */ stw r30, 0x10(r1) +/* 800A6530 000A3470 4B FE 9C 9D */ bl OSDisableInterrupts +/* 800A6534 000A3474 7C 7E 1B 78 */ mr r30, r3 +/* 800A6538 000A3478 48 00 01 51 */ bl __GXFifoReadDisable +/* 800A653C 000A347C 80 6D 95 5C */ lwz r3, __cpReg@sda21(r13) +/* 800A6540 000A3480 57 E0 84 BE */ rlwinm r0, r31, 0x10, 0x12, 0x1f +/* 800A6544 000A3484 B3 E3 00 3C */ sth r31, 0x3c(r3) +/* 800A6548 000A3488 80 6D 95 5C */ lwz r3, __cpReg@sda21(r13) +/* 800A654C 000A348C B0 03 00 3E */ sth r0, 0x3e(r3) +/* 800A6550 000A3490 80 6D 82 C8 */ lwz r3, gx@sda21(r13) +/* 800A6554 000A3494 84 03 00 08 */ lwzu r0, 8(r3) +/* 800A6558 000A3498 54 00 07 FA */ rlwinm r0, r0, 0, 0x1f, 0x1d +/* 800A655C 000A349C 60 00 00 02 */ ori r0, r0, 2 +/* 800A6560 000A34A0 90 03 00 00 */ stw r0, 0(r3) +/* 800A6564 000A34A4 80 6D 82 C8 */ lwz r3, gx@sda21(r13) +/* 800A6568 000A34A8 84 03 00 08 */ lwzu r0, 8(r3) +/* 800A656C 000A34AC 54 00 06 F2 */ rlwinm r0, r0, 0, 0x1b, 0x19 +/* 800A6570 000A34B0 60 00 00 20 */ ori r0, r0, 0x20 +/* 800A6574 000A34B4 90 03 00 00 */ stw r0, 0(r3) +/* 800A6578 000A34B8 80 8D 82 C8 */ lwz r4, gx@sda21(r13) +/* 800A657C 000A34BC 80 6D 95 5C */ lwz r3, __cpReg@sda21(r13) +/* 800A6580 000A34C0 80 04 00 08 */ lwz r0, 8(r4) +/* 800A6584 000A34C4 B0 03 00 02 */ sth r0, 2(r3) +/* 800A6588 000A34C8 93 ED 95 84 */ stw r31, __GXCurrentBP@sda21(r13) +/* 800A658C 000A34CC 48 00 00 D5 */ bl __GXFifoReadEnable +/* 800A6590 000A34D0 7F C3 F3 78 */ mr r3, r30 +/* 800A6594 000A34D4 4B FE 9C 61 */ bl OSRestoreInterrupts +/* 800A6598 000A34D8 80 01 00 1C */ lwz r0, 0x1c(r1) +/* 800A659C 000A34DC 83 E1 00 14 */ lwz r31, 0x14(r1) +/* 800A65A0 000A34E0 83 C1 00 10 */ lwz r30, 0x10(r1) +/* 800A65A4 000A34E4 38 21 00 18 */ addi r1, r1, 0x18 +/* 800A65A8 000A34E8 7C 08 03 A6 */ mtlr r0 +/* 800A65AC 000A34EC 4E 80 00 20 */ blr + +.global GXDisableBreakPt +GXDisableBreakPt: +/* 800A65B0 000A34F0 7C 08 02 A6 */ mflr r0 +/* 800A65B4 000A34F4 90 01 00 04 */ stw r0, 4(r1) +/* 800A65B8 000A34F8 94 21 FF F8 */ stwu r1, -8(r1) +/* 800A65BC 000A34FC 4B FE 9C 11 */ bl OSDisableInterrupts +/* 800A65C0 000A3500 80 8D 82 C8 */ lwz r4, gx@sda21(r13) +/* 800A65C4 000A3504 38 00 00 00 */ li r0, 0 +/* 800A65C8 000A3508 38 A4 00 08 */ addi r5, r4, 8 +/* 800A65CC 000A350C 80 84 00 08 */ lwz r4, 8(r4) +/* 800A65D0 000A3510 54 84 07 FA */ rlwinm r4, r4, 0, 0x1f, 0x1d +/* 800A65D4 000A3514 90 85 00 00 */ stw r4, 0(r5) +/* 800A65D8 000A3518 80 8D 82 C8 */ lwz r4, gx@sda21(r13) +/* 800A65DC 000A351C 38 A4 00 08 */ addi r5, r4, 8 +/* 800A65E0 000A3520 80 84 00 08 */ lwz r4, 8(r4) +/* 800A65E4 000A3524 54 84 06 F2 */ rlwinm r4, r4, 0, 0x1b, 0x19 +/* 800A65E8 000A3528 90 85 00 00 */ stw r4, 0(r5) +/* 800A65EC 000A352C 80 AD 82 C8 */ lwz r5, gx@sda21(r13) +/* 800A65F0 000A3530 80 8D 95 5C */ lwz r4, __cpReg@sda21(r13) +/* 800A65F4 000A3534 80 A5 00 08 */ lwz r5, 8(r5) +/* 800A65F8 000A3538 B0 A4 00 02 */ sth r5, 2(r4) +/* 800A65FC 000A353C 90 0D 95 84 */ stw r0, __GXCurrentBP@sda21(r13) +/* 800A6600 000A3540 4B FE 9B F5 */ bl OSRestoreInterrupts +/* 800A6604 000A3544 80 01 00 0C */ lwz r0, 0xc(r1) +/* 800A6608 000A3548 38 21 00 08 */ addi r1, r1, 8 +/* 800A660C 000A354C 7C 08 03 A6 */ mtlr r0 +/* 800A6610 000A3550 4E 80 00 20 */ blr + +.global __GXFifoInit +__GXFifoInit: +/* 800A6614 000A3554 7C 08 02 A6 */ mflr r0 +/* 800A6618 000A3558 3C 60 80 0A */ lis r3, GXCPInterruptHandler@ha +/* 800A661C 000A355C 90 01 00 04 */ stw r0, 4(r1) +/* 800A6620 000A3560 38 83 5F D4 */ addi r4, r3, GXCPInterruptHandler@l +/* 800A6624 000A3564 38 60 00 11 */ li r3, 0x11 +/* 800A6628 000A3568 94 21 FF F8 */ stwu r1, -8(r1) +/* 800A662C 000A356C 4B FE 9B ED */ bl __OSSetInterruptHandler +/* 800A6630 000A3570 38 60 40 00 */ li r3, 0x4000 +/* 800A6634 000A3574 4B FE 9F E9 */ bl __OSUnmaskInterrupts +/* 800A6638 000A3578 4B FE C6 51 */ bl OSGetCurrentThread +/* 800A663C 000A357C 38 00 00 00 */ li r0, 0 +/* 800A6640 000A3580 90 6D 95 70 */ stw r3, __GXCurrentThread@sda21(r13) +/* 800A6644 000A3584 90 0D 95 78 */ stw r0, GXOverflowSuspendInProgress@sda21(r13) +/* 800A6648 000A3588 90 0D 95 68 */ stw r0, CPUFifo@sda21(r13) +/* 800A664C 000A358C 90 0D 95 6C */ stw r0, GPFifo@sda21(r13) +/* 800A6650 000A3590 80 01 00 0C */ lwz r0, 0xc(r1) +/* 800A6654 000A3594 38 21 00 08 */ addi r1, r1, 8 +/* 800A6658 000A3598 7C 08 03 A6 */ mtlr r0 +/* 800A665C 000A359C 4E 80 00 20 */ blr + +.global __GXFifoReadEnable +__GXFifoReadEnable: +/* 800A6660 000A35A0 80 6D 82 C8 */ lwz r3, gx@sda21(r13) +/* 800A6664 000A35A4 84 03 00 08 */ lwzu r0, 8(r3) +/* 800A6668 000A35A8 54 00 00 3C */ rlwinm r0, r0, 0, 0, 0x1e +/* 800A666C 000A35AC 60 00 00 01 */ ori r0, r0, 1 +/* 800A6670 000A35B0 90 03 00 00 */ stw r0, 0(r3) +/* 800A6674 000A35B4 80 8D 82 C8 */ lwz r4, gx@sda21(r13) +/* 800A6678 000A35B8 80 6D 95 5C */ lwz r3, __cpReg@sda21(r13) +/* 800A667C 000A35BC 80 04 00 08 */ lwz r0, 8(r4) +/* 800A6680 000A35C0 B0 03 00 02 */ sth r0, 2(r3) +/* 800A6684 000A35C4 4E 80 00 20 */ blr + +.global __GXFifoReadDisable +__GXFifoReadDisable: +/* 800A6688 000A35C8 80 6D 82 C8 */ lwz r3, gx@sda21(r13) +/* 800A668C 000A35CC 84 03 00 08 */ lwzu r0, 8(r3) +/* 800A6690 000A35D0 54 00 00 3C */ rlwinm r0, r0, 0, 0, 0x1e +/* 800A6694 000A35D4 90 03 00 00 */ stw r0, 0(r3) +/* 800A6698 000A35D8 80 8D 82 C8 */ lwz r4, gx@sda21(r13) +/* 800A669C 000A35DC 80 6D 95 5C */ lwz r3, __cpReg@sda21(r13) +/* 800A66A0 000A35E0 80 04 00 08 */ lwz r0, 8(r4) +/* 800A66A4 000A35E4 B0 03 00 02 */ sth r0, 2(r3) +/* 800A66A8 000A35E8 4E 80 00 20 */ blr + +.global __GXFifoLink +__GXFifoLink: +/* 800A66AC 000A35EC 54 60 06 3F */ clrlwi. r0, r3, 0x18 +/* 800A66B0 000A35F0 41 82 00 0C */ beq lbl_800A66BC +/* 800A66B4 000A35F4 38 00 00 01 */ li r0, 1 +/* 800A66B8 000A35F8 48 00 00 08 */ b lbl_800A66C0 +lbl_800A66BC: +/* 800A66BC 000A35FC 38 00 00 00 */ li r0, 0 +lbl_800A66C0: +/* 800A66C0 000A3600 80 6D 82 C8 */ lwz r3, gx@sda21(r13) +/* 800A66C4 000A3604 54 00 20 36 */ slwi r0, r0, 4 +/* 800A66C8 000A3608 38 83 00 08 */ addi r4, r3, 8 +/* 800A66CC 000A360C 80 63 00 08 */ lwz r3, 8(r3) +/* 800A66D0 000A3610 54 63 07 34 */ rlwinm r3, r3, 0, 0x1c, 0x1a +/* 800A66D4 000A3614 7C 60 03 78 */ or r0, r3, r0 +/* 800A66D8 000A3618 90 04 00 00 */ stw r0, 0(r4) +/* 800A66DC 000A361C 80 8D 82 C8 */ lwz r4, gx@sda21(r13) +/* 800A66E0 000A3620 80 6D 95 5C */ lwz r3, __cpReg@sda21(r13) +/* 800A66E4 000A3624 80 04 00 08 */ lwz r0, 8(r4) +/* 800A66E8 000A3628 B0 03 00 02 */ sth r0, 2(r3) +/* 800A66EC 000A362C 4E 80 00 20 */ blr + +.global __GXWriteFifoIntEnable +__GXWriteFifoIntEnable: +/* 800A66F0 000A3630 80 AD 82 C8 */ lwz r5, gx@sda21(r13) +/* 800A66F4 000A3634 54 63 15 BA */ rlwinm r3, r3, 2, 0x16, 0x1d +/* 800A66F8 000A3638 54 80 1D 78 */ rlwinm r0, r4, 3, 0x15, 0x1c +/* 800A66FC 000A363C 38 C5 00 08 */ addi r6, r5, 8 +/* 800A6700 000A3640 80 A5 00 08 */ lwz r5, 8(r5) +/* 800A6704 000A3644 54 A4 07 B8 */ rlwinm r4, r5, 0, 0x1e, 0x1c +/* 800A6708 000A3648 7C 83 1B 78 */ or r3, r4, r3 +/* 800A670C 000A364C 90 66 00 00 */ stw r3, 0(r6) +/* 800A6710 000A3650 80 6D 82 C8 */ lwz r3, gx@sda21(r13) +/* 800A6714 000A3654 38 83 00 08 */ addi r4, r3, 8 +/* 800A6718 000A3658 80 63 00 08 */ lwz r3, 8(r3) +/* 800A671C 000A365C 54 63 07 76 */ rlwinm r3, r3, 0, 0x1d, 0x1b +/* 800A6720 000A3660 7C 60 03 78 */ or r0, r3, r0 +/* 800A6724 000A3664 90 04 00 00 */ stw r0, 0(r4) +/* 800A6728 000A3668 80 8D 82 C8 */ lwz r4, gx@sda21(r13) +/* 800A672C 000A366C 80 6D 95 5C */ lwz r3, __cpReg@sda21(r13) +/* 800A6730 000A3670 80 04 00 08 */ lwz r0, 8(r4) +/* 800A6734 000A3674 B0 03 00 02 */ sth r0, 2(r3) +/* 800A6738 000A3678 4E 80 00 20 */ blr + +.global __GXWriteFifoIntReset +__GXWriteFifoIntReset: +/* 800A673C 000A367C 80 AD 82 C8 */ lwz r5, gx@sda21(r13) +/* 800A6740 000A3680 54 63 06 3E */ clrlwi r3, r3, 0x18 +/* 800A6744 000A3684 54 80 0D FC */ rlwinm r0, r4, 1, 0x17, 0x1e +/* 800A6748 000A3688 38 C5 00 10 */ addi r6, r5, 0x10 +/* 800A674C 000A368C 80 A5 00 10 */ lwz r5, 0x10(r5) +/* 800A6750 000A3690 54 A4 00 3C */ rlwinm r4, r5, 0, 0, 0x1e +/* 800A6754 000A3694 7C 83 1B 78 */ or r3, r4, r3 +/* 800A6758 000A3698 90 66 00 00 */ stw r3, 0(r6) +/* 800A675C 000A369C 80 6D 82 C8 */ lwz r3, gx@sda21(r13) +/* 800A6760 000A36A0 38 83 00 10 */ addi r4, r3, 0x10 +/* 800A6764 000A36A4 80 63 00 10 */ lwz r3, 0x10(r3) +/* 800A6768 000A36A8 54 63 07 FA */ rlwinm r3, r3, 0, 0x1f, 0x1d +/* 800A676C 000A36AC 7C 60 03 78 */ or r0, r3, r0 +/* 800A6770 000A36B0 90 04 00 00 */ stw r0, 0(r4) +/* 800A6774 000A36B4 80 8D 82 C8 */ lwz r4, gx@sda21(r13) +/* 800A6778 000A36B8 80 6D 95 5C */ lwz r3, __cpReg@sda21(r13) +/* 800A677C 000A36BC 80 04 00 10 */ lwz r0, 0x10(r4) +/* 800A6780 000A36C0 B0 03 00 04 */ sth r0, 4(r3) +/* 800A6784 000A36C4 4E 80 00 20 */ blr + +.global GXGetCPUFifo +GXGetCPUFifo: +/* 800A6788 000A36C8 80 6D 95 68 */ lwz r3, CPUFifo@sda21(r13) +/* 800A678C 000A36CC 4E 80 00 20 */ blr + +.section .sbss, "wa" # 0x804097C0 - 0x8040B45C +CPUFifo: + .skip 0x4 +GPFifo: + .skip 0x4 +__GXCurrentThread: + .skip 0x4 +CPGPLinked: + .skip 0x4 +GXOverflowSuspendInProgress: + .skip 0x4 +BreakPointCB: + .skip 0x4 +__GXOverflowCount: + .skip 0x4 +__GXCurrentBP: + .skip 0x4 diff --git a/asm/Dolphin/gx/GXFrameBuf.s b/asm/Dolphin/gx/GXFrameBuf.s new file mode 100644 index 0000000..55751bd --- /dev/null +++ b/asm/Dolphin/gx/GXFrameBuf.s @@ -0,0 +1,1044 @@ +.include "macros.inc" + +.section .text, "ax" # 0x80005600 - 0x8036FBA0 +.global GXSetDispCopySrc +GXSetDispCopySrc: +/* 800A8BE8 000A5B28 80 ED 82 C8 */ lwz r7, gx@sda21(r13) +/* 800A8BEC 000A5B2C 39 00 00 00 */ li r8, 0 +/* 800A8BF0 000A5B30 54 84 51 AA */ rlwinm r4, r4, 0xa, 6, 0x15 +/* 800A8BF4 000A5B34 91 07 01 E0 */ stw r8, 0x1e0(r7) +/* 800A8BF8 000A5B38 54 A7 04 3E */ clrlwi r7, r5, 0x10 +/* 800A8BFC 000A5B3C 54 C5 04 3E */ clrlwi r5, r6, 0x10 +/* 800A8C00 000A5B40 80 CD 82 C8 */ lwz r6, gx@sda21(r13) +/* 800A8C04 000A5B44 38 05 FF FF */ addi r0, r5, -1 +/* 800A8C08 000A5B48 54 65 04 3E */ clrlwi r5, r3, 0x10 +/* 800A8C0C 000A5B4C 39 26 01 E0 */ addi r9, r6, 0x1e0 +/* 800A8C10 000A5B50 80 C6 01 E0 */ lwz r6, 0x1e0(r6) +/* 800A8C14 000A5B54 38 67 FF FF */ addi r3, r7, -1 +/* 800A8C18 000A5B58 54 C6 00 2A */ rlwinm r6, r6, 0, 0, 0x15 +/* 800A8C1C 000A5B5C 7C C5 2B 78 */ or r5, r6, r5 +/* 800A8C20 000A5B60 90 A9 00 00 */ stw r5, 0(r9) +/* 800A8C24 000A5B64 54 00 50 2A */ slwi r0, r0, 0xa +/* 800A8C28 000A5B68 80 AD 82 C8 */ lwz r5, gx@sda21(r13) +/* 800A8C2C 000A5B6C 38 C5 01 E0 */ addi r6, r5, 0x1e0 +/* 800A8C30 000A5B70 80 A5 01 E0 */ lwz r5, 0x1e0(r5) +/* 800A8C34 000A5B74 54 A5 05 96 */ rlwinm r5, r5, 0, 0x16, 0xb +/* 800A8C38 000A5B78 7C A4 23 78 */ or r4, r5, r4 +/* 800A8C3C 000A5B7C 90 86 00 00 */ stw r4, 0(r6) +/* 800A8C40 000A5B80 80 8D 82 C8 */ lwz r4, gx@sda21(r13) +/* 800A8C44 000A5B84 38 A4 01 E0 */ addi r5, r4, 0x1e0 +/* 800A8C48 000A5B88 80 84 01 E0 */ lwz r4, 0x1e0(r4) +/* 800A8C4C 000A5B8C 54 84 02 3E */ clrlwi r4, r4, 8 +/* 800A8C50 000A5B90 64 84 49 00 */ oris r4, r4, 0x4900 +/* 800A8C54 000A5B94 90 85 00 00 */ stw r4, 0(r5) +/* 800A8C58 000A5B98 80 8D 82 C8 */ lwz r4, gx@sda21(r13) +/* 800A8C5C 000A5B9C 91 04 01 E4 */ stw r8, 0x1e4(r4) +/* 800A8C60 000A5BA0 80 8D 82 C8 */ lwz r4, gx@sda21(r13) +/* 800A8C64 000A5BA4 38 A4 01 E4 */ addi r5, r4, 0x1e4 +/* 800A8C68 000A5BA8 80 84 01 E4 */ lwz r4, 0x1e4(r4) +/* 800A8C6C 000A5BAC 54 84 00 2A */ rlwinm r4, r4, 0, 0, 0x15 +/* 800A8C70 000A5BB0 7C 83 1B 78 */ or r3, r4, r3 +/* 800A8C74 000A5BB4 90 65 00 00 */ stw r3, 0(r5) +/* 800A8C78 000A5BB8 80 6D 82 C8 */ lwz r3, gx@sda21(r13) +/* 800A8C7C 000A5BBC 38 83 01 E4 */ addi r4, r3, 0x1e4 +/* 800A8C80 000A5BC0 80 63 01 E4 */ lwz r3, 0x1e4(r3) +/* 800A8C84 000A5BC4 54 63 05 96 */ rlwinm r3, r3, 0, 0x16, 0xb +/* 800A8C88 000A5BC8 7C 60 03 78 */ or r0, r3, r0 +/* 800A8C8C 000A5BCC 90 04 00 00 */ stw r0, 0(r4) +/* 800A8C90 000A5BD0 80 6D 82 C8 */ lwz r3, gx@sda21(r13) +/* 800A8C94 000A5BD4 84 03 01 E4 */ lwzu r0, 0x1e4(r3) +/* 800A8C98 000A5BD8 54 00 02 3E */ clrlwi r0, r0, 8 +/* 800A8C9C 000A5BDC 64 00 4A 00 */ oris r0, r0, 0x4a00 +/* 800A8CA0 000A5BE0 90 03 00 00 */ stw r0, 0(r3) +/* 800A8CA4 000A5BE4 4E 80 00 20 */ blr + +.global GXSetTexCopySrc +GXSetTexCopySrc: +/* 800A8CA8 000A5BE8 80 ED 82 C8 */ lwz r7, gx@sda21(r13) +/* 800A8CAC 000A5BEC 39 00 00 00 */ li r8, 0 +/* 800A8CB0 000A5BF0 54 84 51 AA */ rlwinm r4, r4, 0xa, 6, 0x15 +/* 800A8CB4 000A5BF4 91 07 01 F0 */ stw r8, 0x1f0(r7) +/* 800A8CB8 000A5BF8 54 A7 04 3E */ clrlwi r7, r5, 0x10 +/* 800A8CBC 000A5BFC 54 C5 04 3E */ clrlwi r5, r6, 0x10 +/* 800A8CC0 000A5C00 80 CD 82 C8 */ lwz r6, gx@sda21(r13) +/* 800A8CC4 000A5C04 38 05 FF FF */ addi r0, r5, -1 +/* 800A8CC8 000A5C08 54 65 04 3E */ clrlwi r5, r3, 0x10 +/* 800A8CCC 000A5C0C 39 26 01 F0 */ addi r9, r6, 0x1f0 +/* 800A8CD0 000A5C10 80 C6 01 F0 */ lwz r6, 0x1f0(r6) +/* 800A8CD4 000A5C14 38 67 FF FF */ addi r3, r7, -1 +/* 800A8CD8 000A5C18 54 C6 00 2A */ rlwinm r6, r6, 0, 0, 0x15 +/* 800A8CDC 000A5C1C 7C C5 2B 78 */ or r5, r6, r5 +/* 800A8CE0 000A5C20 90 A9 00 00 */ stw r5, 0(r9) +/* 800A8CE4 000A5C24 54 00 50 2A */ slwi r0, r0, 0xa +/* 800A8CE8 000A5C28 80 AD 82 C8 */ lwz r5, gx@sda21(r13) +/* 800A8CEC 000A5C2C 38 C5 01 F0 */ addi r6, r5, 0x1f0 +/* 800A8CF0 000A5C30 80 A5 01 F0 */ lwz r5, 0x1f0(r5) +/* 800A8CF4 000A5C34 54 A5 05 96 */ rlwinm r5, r5, 0, 0x16, 0xb +/* 800A8CF8 000A5C38 7C A4 23 78 */ or r4, r5, r4 +/* 800A8CFC 000A5C3C 90 86 00 00 */ stw r4, 0(r6) +/* 800A8D00 000A5C40 80 8D 82 C8 */ lwz r4, gx@sda21(r13) +/* 800A8D04 000A5C44 38 A4 01 F0 */ addi r5, r4, 0x1f0 +/* 800A8D08 000A5C48 80 84 01 F0 */ lwz r4, 0x1f0(r4) +/* 800A8D0C 000A5C4C 54 84 02 3E */ clrlwi r4, r4, 8 +/* 800A8D10 000A5C50 64 84 49 00 */ oris r4, r4, 0x4900 +/* 800A8D14 000A5C54 90 85 00 00 */ stw r4, 0(r5) +/* 800A8D18 000A5C58 80 8D 82 C8 */ lwz r4, gx@sda21(r13) +/* 800A8D1C 000A5C5C 91 04 01 F4 */ stw r8, 0x1f4(r4) +/* 800A8D20 000A5C60 80 8D 82 C8 */ lwz r4, gx@sda21(r13) +/* 800A8D24 000A5C64 38 A4 01 F4 */ addi r5, r4, 0x1f4 +/* 800A8D28 000A5C68 80 84 01 F4 */ lwz r4, 0x1f4(r4) +/* 800A8D2C 000A5C6C 54 84 00 2A */ rlwinm r4, r4, 0, 0, 0x15 +/* 800A8D30 000A5C70 7C 83 1B 78 */ or r3, r4, r3 +/* 800A8D34 000A5C74 90 65 00 00 */ stw r3, 0(r5) +/* 800A8D38 000A5C78 80 6D 82 C8 */ lwz r3, gx@sda21(r13) +/* 800A8D3C 000A5C7C 38 83 01 F4 */ addi r4, r3, 0x1f4 +/* 800A8D40 000A5C80 80 63 01 F4 */ lwz r3, 0x1f4(r3) +/* 800A8D44 000A5C84 54 63 05 96 */ rlwinm r3, r3, 0, 0x16, 0xb +/* 800A8D48 000A5C88 7C 60 03 78 */ or r0, r3, r0 +/* 800A8D4C 000A5C8C 90 04 00 00 */ stw r0, 0(r4) +/* 800A8D50 000A5C90 80 6D 82 C8 */ lwz r3, gx@sda21(r13) +/* 800A8D54 000A5C94 84 03 01 F4 */ lwzu r0, 0x1f4(r3) +/* 800A8D58 000A5C98 54 00 02 3E */ clrlwi r0, r0, 8 +/* 800A8D5C 000A5C9C 64 00 4A 00 */ oris r0, r0, 0x4a00 +/* 800A8D60 000A5CA0 90 03 00 00 */ stw r0, 0(r3) +/* 800A8D64 000A5CA4 4E 80 00 20 */ blr + +.global GXSetDispCopyDst +GXSetDispCopyDst: +/* 800A8D68 000A5CA8 80 8D 82 C8 */ lwz r4, gx@sda21(r13) +/* 800A8D6C 000A5CAC 38 00 00 00 */ li r0, 0 +/* 800A8D70 000A5CB0 90 04 01 E8 */ stw r0, 0x1e8(r4) +/* 800A8D74 000A5CB4 54 60 0C 3C */ rlwinm r0, r3, 1, 0x10, 0x1e +/* 800A8D78 000A5CB8 7C 00 2E 70 */ srawi r0, r0, 5 +/* 800A8D7C 000A5CBC 80 6D 82 C8 */ lwz r3, gx@sda21(r13) +/* 800A8D80 000A5CC0 38 83 01 E8 */ addi r4, r3, 0x1e8 +/* 800A8D84 000A5CC4 80 63 01 E8 */ lwz r3, 0x1e8(r3) +/* 800A8D88 000A5CC8 54 63 00 2A */ rlwinm r3, r3, 0, 0, 0x15 +/* 800A8D8C 000A5CCC 7C 60 03 78 */ or r0, r3, r0 +/* 800A8D90 000A5CD0 90 04 00 00 */ stw r0, 0(r4) +/* 800A8D94 000A5CD4 80 6D 82 C8 */ lwz r3, gx@sda21(r13) +/* 800A8D98 000A5CD8 84 03 01 E8 */ lwzu r0, 0x1e8(r3) +/* 800A8D9C 000A5CDC 54 00 02 3E */ clrlwi r0, r0, 8 +/* 800A8DA0 000A5CE0 64 00 4D 00 */ oris r0, r0, 0x4d00 +/* 800A8DA4 000A5CE4 90 03 00 00 */ stw r0, 0(r3) +/* 800A8DA8 000A5CE8 4E 80 00 20 */ blr + +.global GXSetTexCopyDst +GXSetTexCopyDst: +/* 800A8DAC 000A5CEC 7C 08 02 A6 */ mflr r0 +/* 800A8DB0 000A5CF0 2C 05 00 13 */ cmpwi r5, 0x13 +/* 800A8DB4 000A5CF4 90 01 00 04 */ stw r0, 4(r1) +/* 800A8DB8 000A5CF8 38 00 00 00 */ li r0, 0 +/* 800A8DBC 000A5CFC 39 03 00 00 */ addi r8, r3, 0 +/* 800A8DC0 000A5D00 94 21 FF D0 */ stwu r1, -0x30(r1) +/* 800A8DC4 000A5D04 93 E1 00 2C */ stw r31, 0x2c(r1) +/* 800A8DC8 000A5D08 54 BF 07 3E */ clrlwi r31, r5, 0x1c +/* 800A8DCC 000A5D0C 93 C1 00 28 */ stw r30, 0x28(r1) +/* 800A8DD0 000A5D10 3B C6 00 00 */ addi r30, r6, 0 +/* 800A8DD4 000A5D14 80 ED 82 C8 */ lwz r7, gx@sda21(r13) +/* 800A8DD8 000A5D18 98 07 02 00 */ stb r0, 0x200(r7) +/* 800A8DDC 000A5D1C 38 E4 00 00 */ addi r7, r4, 0 +/* 800A8DE0 000A5D20 40 82 00 08 */ bne lbl_800A8DE8 +/* 800A8DE4 000A5D24 3B E0 00 0B */ li r31, 0xb +lbl_800A8DE8: +/* 800A8DE8 000A5D28 2C 05 00 26 */ cmpwi r5, 0x26 +/* 800A8DEC 000A5D2C 41 82 00 1C */ beq lbl_800A8E08 +/* 800A8DF0 000A5D30 40 80 00 34 */ bge lbl_800A8E24 +/* 800A8DF4 000A5D34 2C 05 00 04 */ cmpwi r5, 4 +/* 800A8DF8 000A5D38 40 80 00 2C */ bge lbl_800A8E24 +/* 800A8DFC 000A5D3C 2C 05 00 00 */ cmpwi r5, 0 +/* 800A8E00 000A5D40 40 80 00 08 */ bge lbl_800A8E08 +/* 800A8E04 000A5D44 48 00 00 20 */ b lbl_800A8E24 +lbl_800A8E08: +/* 800A8E08 000A5D48 80 6D 82 C8 */ lwz r3, gx@sda21(r13) +/* 800A8E0C 000A5D4C 84 03 01 FC */ lwzu r0, 0x1fc(r3) +/* 800A8E10 000A5D50 54 00 04 5C */ rlwinm r0, r0, 0, 0x11, 0xe +/* 800A8E14 000A5D54 64 00 00 01 */ oris r0, r0, 1 +/* 800A8E18 000A5D58 60 00 80 00 */ ori r0, r0, 0x8000 +/* 800A8E1C 000A5D5C 90 03 00 00 */ stw r0, 0(r3) +/* 800A8E20 000A5D60 48 00 00 18 */ b lbl_800A8E38 +lbl_800A8E24: +/* 800A8E24 000A5D64 80 6D 82 C8 */ lwz r3, gx@sda21(r13) +/* 800A8E28 000A5D68 84 03 01 FC */ lwzu r0, 0x1fc(r3) +/* 800A8E2C 000A5D6C 54 00 04 5C */ rlwinm r0, r0, 0, 0x11, 0xe +/* 800A8E30 000A5D70 64 00 00 01 */ oris r0, r0, 1 +/* 800A8E34 000A5D74 90 03 00 00 */ stw r0, 0(r3) +lbl_800A8E38: +/* 800A8E38 000A5D78 54 A4 06 F6 */ rlwinm r4, r5, 0, 0x1b, 0x1b +/* 800A8E3C 000A5D7C 80 6D 82 C8 */ lwz r3, gx@sda21(r13) +/* 800A8E40 000A5D80 38 04 FF F0 */ addi r0, r4, -16 +/* 800A8E44 000A5D84 7C 00 00 34 */ cntlzw r0, r0 +/* 800A8E48 000A5D88 54 00 DE 3E */ rlwinm r0, r0, 0x1b, 0x18, 0x1f +/* 800A8E4C 000A5D8C 98 03 02 00 */ stb r0, 0x200(r3) +/* 800A8E50 000A5D90 38 65 00 00 */ addi r3, r5, 0 +/* 800A8E54 000A5D94 38 A7 00 00 */ addi r5, r7, 0 +/* 800A8E58 000A5D98 80 8D 82 C8 */ lwz r4, gx@sda21(r13) +/* 800A8E5C 000A5D9C 38 E1 00 1C */ addi r7, r1, 0x1c +/* 800A8E60 000A5DA0 80 04 01 FC */ lwz r0, 0x1fc(r4) +/* 800A8E64 000A5DA4 38 C4 01 FC */ addi r6, r4, 0x1fc +/* 800A8E68 000A5DA8 38 88 00 00 */ addi r4, r8, 0 +/* 800A8E6C 000A5DAC 54 00 07 76 */ rlwinm r0, r0, 0, 0x1d, 0x1b +/* 800A8E70 000A5DB0 53 E0 07 38 */ rlwimi r0, r31, 0, 0x1c, 0x1c +/* 800A8E74 000A5DB4 90 06 00 00 */ stw r0, 0(r6) +/* 800A8E78 000A5DB8 57 FF 07 7E */ clrlwi r31, r31, 0x1d +/* 800A8E7C 000A5DBC 38 C1 00 20 */ addi r6, r1, 0x20 +/* 800A8E80 000A5DC0 39 01 00 18 */ addi r8, r1, 0x18 +/* 800A8E84 000A5DC4 48 00 14 AD */ bl __GetImageTileCount +/* 800A8E88 000A5DC8 80 6D 82 C8 */ lwz r3, gx@sda21(r13) +/* 800A8E8C 000A5DCC 38 00 00 00 */ li r0, 0 +/* 800A8E90 000A5DD0 90 03 01 F8 */ stw r0, 0x1f8(r3) +/* 800A8E94 000A5DD4 57 C3 4B EC */ rlwinm r3, r30, 9, 0xf, 0x16 +/* 800A8E98 000A5DD8 57 E0 20 36 */ slwi r0, r31, 4 +/* 800A8E9C 000A5DDC 80 A1 00 20 */ lwz r5, 0x20(r1) +/* 800A8EA0 000A5DE0 80 81 00 18 */ lwz r4, 0x18(r1) +/* 800A8EA4 000A5DE4 80 CD 82 C8 */ lwz r6, gx@sda21(r13) +/* 800A8EA8 000A5DE8 7C 85 21 D6 */ mullw r4, r5, r4 +/* 800A8EAC 000A5DEC 84 A6 01 F8 */ lwzu r5, 0x1f8(r6) +/* 800A8EB0 000A5DF0 54 A5 00 2A */ rlwinm r5, r5, 0, 0, 0x15 +/* 800A8EB4 000A5DF4 7C A4 23 78 */ or r4, r5, r4 +/* 800A8EB8 000A5DF8 90 86 00 00 */ stw r4, 0(r6) +/* 800A8EBC 000A5DFC 80 8D 82 C8 */ lwz r4, gx@sda21(r13) +/* 800A8EC0 000A5E00 38 A4 01 F8 */ addi r5, r4, 0x1f8 +/* 800A8EC4 000A5E04 80 84 01 F8 */ lwz r4, 0x1f8(r4) +/* 800A8EC8 000A5E08 54 84 02 3E */ clrlwi r4, r4, 8 +/* 800A8ECC 000A5E0C 64 84 4D 00 */ oris r4, r4, 0x4d00 +/* 800A8ED0 000A5E10 90 85 00 00 */ stw r4, 0(r5) +/* 800A8ED4 000A5E14 80 8D 82 C8 */ lwz r4, gx@sda21(r13) +/* 800A8ED8 000A5E18 38 A4 01 FC */ addi r5, r4, 0x1fc +/* 800A8EDC 000A5E1C 80 84 01 FC */ lwz r4, 0x1fc(r4) +/* 800A8EE0 000A5E20 54 84 05 EA */ rlwinm r4, r4, 0, 0x17, 0x15 +/* 800A8EE4 000A5E24 7C 83 1B 78 */ or r3, r4, r3 +/* 800A8EE8 000A5E28 90 65 00 00 */ stw r3, 0(r5) +/* 800A8EEC 000A5E2C 80 6D 82 C8 */ lwz r3, gx@sda21(r13) +/* 800A8EF0 000A5E30 38 83 01 FC */ addi r4, r3, 0x1fc +/* 800A8EF4 000A5E34 80 63 01 FC */ lwz r3, 0x1fc(r3) +/* 800A8EF8 000A5E38 54 63 07 30 */ rlwinm r3, r3, 0, 0x1c, 0x18 +/* 800A8EFC 000A5E3C 7C 60 03 78 */ or r0, r3, r0 +/* 800A8F00 000A5E40 90 04 00 00 */ stw r0, 0(r4) +/* 800A8F04 000A5E44 80 01 00 34 */ lwz r0, 0x34(r1) +/* 800A8F08 000A5E48 83 E1 00 2C */ lwz r31, 0x2c(r1) +/* 800A8F0C 000A5E4C 83 C1 00 28 */ lwz r30, 0x28(r1) +/* 800A8F10 000A5E50 38 21 00 30 */ addi r1, r1, 0x30 +/* 800A8F14 000A5E54 7C 08 03 A6 */ mtlr r0 +/* 800A8F18 000A5E58 4E 80 00 20 */ blr + +.global GXSetDispCopyFrame2Field +GXSetDispCopyFrame2Field: +/* 800A8F1C 000A5E5C 80 8D 82 C8 */ lwz r4, gx@sda21(r13) +/* 800A8F20 000A5E60 54 60 60 26 */ slwi r0, r3, 0xc +/* 800A8F24 000A5E64 84 64 01 EC */ lwzu r3, 0x1ec(r4) +/* 800A8F28 000A5E68 54 63 05 22 */ rlwinm r3, r3, 0, 0x14, 0x11 +/* 800A8F2C 000A5E6C 7C 60 03 78 */ or r0, r3, r0 +/* 800A8F30 000A5E70 90 04 00 00 */ stw r0, 0(r4) +/* 800A8F34 000A5E74 80 6D 82 C8 */ lwz r3, gx@sda21(r13) +/* 800A8F38 000A5E78 84 03 01 FC */ lwzu r0, 0x1fc(r3) +/* 800A8F3C 000A5E7C 54 00 05 22 */ rlwinm r0, r0, 0, 0x14, 0x11 +/* 800A8F40 000A5E80 90 03 00 00 */ stw r0, 0(r3) +/* 800A8F44 000A5E84 4E 80 00 20 */ blr + +.global GXSetCopyClamp +GXSetCopyClamp: +/* 800A8F48 000A5E88 80 AD 82 C8 */ lwz r5, gx@sda21(r13) +/* 800A8F4C 000A5E8C 54 64 07 FE */ clrlwi r4, r3, 0x1f +/* 800A8F50 000A5E90 38 04 FF FF */ addi r0, r4, -1 +/* 800A8F54 000A5E94 80 85 01 EC */ lwz r4, 0x1ec(r5) +/* 800A8F58 000A5E98 38 C5 01 EC */ addi r6, r5, 0x1ec +/* 800A8F5C 000A5E9C 7C 00 00 34 */ cntlzw r0, r0 +/* 800A8F60 000A5EA0 54 85 00 3C */ rlwinm r5, r4, 0, 0, 0x1e +/* 800A8F64 000A5EA4 54 04 DE 3E */ rlwinm r4, r0, 0x1b, 0x18, 0x1f +/* 800A8F68 000A5EA8 7C A0 23 78 */ or r0, r5, r4 +/* 800A8F6C 000A5EAC 90 06 00 00 */ stw r0, 0(r6) +/* 800A8F70 000A5EB0 54 63 07 BC */ rlwinm r3, r3, 0, 0x1e, 0x1e +/* 800A8F74 000A5EB4 38 03 FF FE */ addi r0, r3, -2 +/* 800A8F78 000A5EB8 80 6D 82 C8 */ lwz r3, gx@sda21(r13) +/* 800A8F7C 000A5EBC 7C 00 00 34 */ cntlzw r0, r0 +/* 800A8F80 000A5EC0 54 06 E5 FC */ rlwinm r6, r0, 0x1c, 0x17, 0x1e +/* 800A8F84 000A5EC4 38 A3 01 EC */ addi r5, r3, 0x1ec +/* 800A8F88 000A5EC8 80 63 01 EC */ lwz r3, 0x1ec(r3) +/* 800A8F8C 000A5ECC 54 60 07 FA */ rlwinm r0, r3, 0, 0x1f, 0x1d +/* 800A8F90 000A5ED0 7C 00 33 78 */ or r0, r0, r6 +/* 800A8F94 000A5ED4 90 05 00 00 */ stw r0, 0(r5) +/* 800A8F98 000A5ED8 80 6D 82 C8 */ lwz r3, gx@sda21(r13) +/* 800A8F9C 000A5EDC 84 03 01 FC */ lwzu r0, 0x1fc(r3) +/* 800A8FA0 000A5EE0 54 00 00 3C */ rlwinm r0, r0, 0, 0, 0x1e +/* 800A8FA4 000A5EE4 7C 00 23 78 */ or r0, r0, r4 +/* 800A8FA8 000A5EE8 90 03 00 00 */ stw r0, 0(r3) +/* 800A8FAC 000A5EEC 80 6D 82 C8 */ lwz r3, gx@sda21(r13) +/* 800A8FB0 000A5EF0 84 03 01 FC */ lwzu r0, 0x1fc(r3) +/* 800A8FB4 000A5EF4 54 00 07 FA */ rlwinm r0, r0, 0, 0x1f, 0x1d +/* 800A8FB8 000A5EF8 7C 00 33 78 */ or r0, r0, r6 +/* 800A8FBC 000A5EFC 90 03 00 00 */ stw r0, 0(r3) +/* 800A8FC0 000A5F00 4E 80 00 20 */ blr + +.global GXGetNumXfbLines +GXGetNumXfbLines: +/* 800A8FC4 000A5F04 7C 08 02 A6 */ mflr r0 +/* 800A8FC8 000A5F08 90 01 00 04 */ stw r0, 4(r1) +/* 800A8FCC 000A5F0C 94 21 FF E0 */ stwu r1, -0x20(r1) +/* 800A8FD0 000A5F10 93 E1 00 1C */ stw r31, 0x1c(r1) +/* 800A8FD4 000A5F14 7C 7F 1B 78 */ mr r31, r3 +/* 800A8FD8 000A5F18 C0 02 8A F0 */ lfs f0, "@83"@sda21(r2) +/* 800A8FDC 000A5F1C EC 20 08 24 */ fdivs f1, f0, f1 +/* 800A8FE0 000A5F20 4B FD 9B DD */ bl __cvt_fp2unsigned +/* 800A8FE4 000A5F24 57 E5 04 3E */ clrlwi r5, r31, 0x10 +/* 800A8FE8 000A5F28 38 05 FF FF */ addi r0, r5, -1 +/* 800A8FEC 000A5F2C 54 64 05 FE */ clrlwi r4, r3, 0x17 +/* 800A8FF0 000A5F30 54 00 40 2E */ slwi r0, r0, 8 +/* 800A8FF4 000A5F34 7C 60 23 96 */ divwu r3, r0, r4 +/* 800A8FF8 000A5F38 28 04 00 80 */ cmplwi r4, 0x80 +/* 800A8FFC 000A5F3C 38 63 00 01 */ addi r3, r3, 1 +/* 800A9000 000A5F40 40 81 00 30 */ ble lbl_800A9030 +/* 800A9004 000A5F44 28 04 01 00 */ cmplwi r4, 0x100 +/* 800A9008 000A5F48 40 80 00 28 */ bge lbl_800A9030 +/* 800A900C 000A5F4C 48 00 00 08 */ b lbl_800A9014 +lbl_800A9010: +/* 800A9010 000A5F50 54 84 F8 7E */ srwi r4, r4, 1 +lbl_800A9014: +/* 800A9014 000A5F54 54 80 07 FF */ clrlwi. r0, r4, 0x1f +/* 800A9018 000A5F58 41 82 FF F8 */ beq lbl_800A9010 +/* 800A901C 000A5F5C 7C 05 23 96 */ divwu r0, r5, r4 +/* 800A9020 000A5F60 7C 00 21 D6 */ mullw r0, r0, r4 +/* 800A9024 000A5F64 7C 00 28 51 */ subf. r0, r0, r5 +/* 800A9028 000A5F68 40 82 00 08 */ bne lbl_800A9030 +/* 800A902C 000A5F6C 38 63 00 01 */ addi r3, r3, 1 +lbl_800A9030: +/* 800A9030 000A5F70 28 03 04 00 */ cmplwi r3, 0x400 +/* 800A9034 000A5F74 40 81 00 08 */ ble lbl_800A903C +/* 800A9038 000A5F78 38 60 04 00 */ li r3, 0x400 +lbl_800A903C: +/* 800A903C 000A5F7C 80 01 00 24 */ lwz r0, 0x24(r1) +/* 800A9040 000A5F80 54 63 04 3E */ clrlwi r3, r3, 0x10 +/* 800A9044 000A5F84 83 E1 00 1C */ lwz r31, 0x1c(r1) +/* 800A9048 000A5F88 38 21 00 20 */ addi r1, r1, 0x20 +/* 800A904C 000A5F8C 7C 08 03 A6 */ mtlr r0 +/* 800A9050 000A5F90 4E 80 00 20 */ blr + +.global GXGetYScaleFactor +GXGetYScaleFactor: +/* 800A9054 000A5F94 7C 08 02 A6 */ mflr r0 +/* 800A9058 000A5F98 90 01 00 04 */ stw r0, 4(r1) +/* 800A905C 000A5F9C 3C 00 43 30 */ lis r0, 0x4330 +/* 800A9060 000A5FA0 94 21 FF 88 */ stwu r1, -0x78(r1) +/* 800A9064 000A5FA4 DB E1 00 70 */ stfd f31, 0x70(r1) +/* 800A9068 000A5FA8 DB C1 00 68 */ stfd f30, 0x68(r1) +/* 800A906C 000A5FAC DB A1 00 60 */ stfd f29, 0x60(r1) +/* 800A9070 000A5FB0 DB 81 00 58 */ stfd f28, 0x58(r1) +/* 800A9074 000A5FB4 BF 21 00 3C */ stmw r25, 0x3c(r1) +/* 800A9078 000A5FB8 54 9C 04 3E */ clrlwi r28, r4, 0x10 +/* 800A907C 000A5FBC 54 7F 04 3E */ clrlwi r31, r3, 0x10 +/* 800A9080 000A5FC0 93 81 00 34 */ stw r28, 0x34(r1) +/* 800A9084 000A5FC4 7C 7B 1B 78 */ mr r27, r3 +/* 800A9088 000A5FC8 7C 99 23 78 */ mr r25, r4 +/* 800A908C 000A5FCC 93 E1 00 2C */ stw r31, 0x2c(r1) +/* 800A9090 000A5FD0 90 01 00 30 */ stw r0, 0x30(r1) +/* 800A9094 000A5FD4 90 01 00 28 */ stw r0, 0x28(r1) +/* 800A9098 000A5FD8 C8 62 8A F8 */ lfd f3, "@138"@sda21(r2) +/* 800A909C 000A5FDC C8 41 00 30 */ lfd f2, 0x30(r1) +/* 800A90A0 000A5FE0 C8 21 00 28 */ lfd f1, 0x28(r1) +/* 800A90A4 000A5FE4 EC 42 18 28 */ fsubs f2, f2, f3 +/* 800A90A8 000A5FE8 C0 02 8A F0 */ lfs f0, "@83"@sda21(r2) +/* 800A90AC 000A5FEC EC 21 18 28 */ fsubs f1, f1, f3 +/* 800A90B0 000A5FF0 EC 42 08 24 */ fdivs f2, f2, f1 +/* 800A90B4 000A5FF4 EC 20 10 24 */ fdivs f1, f0, f2 +/* 800A90B8 000A5FF8 FF 80 10 90 */ fmr f28, f2 +/* 800A90BC 000A5FFC 4B FD 9B 01 */ bl __cvt_fp2unsigned +/* 800A90C0 000A6000 38 1F FF FF */ addi r0, r31, -1 +/* 800A90C4 000A6004 54 64 05 FE */ clrlwi r4, r3, 0x17 +/* 800A90C8 000A6008 54 1E 40 2E */ slwi r30, r0, 8 +/* 800A90CC 000A600C 7C 7E 23 96 */ divwu r3, r30, r4 +/* 800A90D0 000A6010 28 04 00 80 */ cmplwi r4, 0x80 +/* 800A90D4 000A6014 38 63 00 01 */ addi r3, r3, 1 +/* 800A90D8 000A6018 40 81 00 30 */ ble lbl_800A9108 +/* 800A90DC 000A601C 28 04 01 00 */ cmplwi r4, 0x100 +/* 800A90E0 000A6020 40 80 00 28 */ bge lbl_800A9108 +/* 800A90E4 000A6024 48 00 00 08 */ b lbl_800A90EC +lbl_800A90E8: +/* 800A90E8 000A6028 54 84 F8 7E */ srwi r4, r4, 1 +lbl_800A90EC: +/* 800A90EC 000A602C 54 80 07 FF */ clrlwi. r0, r4, 0x1f +/* 800A90F0 000A6030 41 82 FF F8 */ beq lbl_800A90E8 +/* 800A90F4 000A6034 7C 1F 23 96 */ divwu r0, r31, r4 +/* 800A90F8 000A6038 7C 00 21 D6 */ mullw r0, r0, r4 +/* 800A90FC 000A603C 7C 00 F8 51 */ subf. r0, r0, r31 +/* 800A9100 000A6040 40 82 00 08 */ bne lbl_800A9108 +/* 800A9104 000A6044 38 63 00 01 */ addi r3, r3, 1 +lbl_800A9108: +/* 800A9108 000A6048 28 03 04 00 */ cmplwi r3, 0x400 +/* 800A910C 000A604C 40 81 00 08 */ ble lbl_800A9114 +/* 800A9110 000A6050 38 60 04 00 */ li r3, 0x400 +lbl_800A9114: +/* 800A9114 000A6054 CB E2 8A F8 */ lfd f31, "@138"@sda21(r2) +/* 800A9118 000A6058 7C 60 1B 78 */ mr r0, r3 +/* 800A911C 000A605C C3 C2 8A F0 */ lfs f30, "@83"@sda21(r2) +/* 800A9120 000A6060 57 3D 04 3E */ clrlwi r29, r25, 0x10 +/* 800A9124 000A6064 57 7A 04 3E */ clrlwi r26, r27, 0x10 +/* 800A9128 000A6068 3F 20 43 30 */ lis r25, 0x4330 +/* 800A912C 000A606C 48 00 00 88 */ b lbl_800A91B4 +lbl_800A9130: +/* 800A9130 000A6070 3B 9C FF FF */ addi r28, r28, -1 +/* 800A9134 000A6074 93 41 00 34 */ stw r26, 0x34(r1) +/* 800A9138 000A6078 93 81 00 2C */ stw r28, 0x2c(r1) +/* 800A913C 000A607C 93 21 00 28 */ stw r25, 0x28(r1) +/* 800A9140 000A6080 93 21 00 30 */ stw r25, 0x30(r1) +/* 800A9144 000A6084 C8 21 00 28 */ lfd f1, 0x28(r1) +/* 800A9148 000A6088 C8 01 00 30 */ lfd f0, 0x30(r1) +/* 800A914C 000A608C EC 21 F8 28 */ fsubs f1, f1, f31 +/* 800A9150 000A6090 EC 00 F8 28 */ fsubs f0, f0, f31 +/* 800A9154 000A6094 EC 01 00 24 */ fdivs f0, f1, f0 +/* 800A9158 000A6098 EC 3E 00 24 */ fdivs f1, f30, f0 +/* 800A915C 000A609C FF 80 00 90 */ fmr f28, f0 +/* 800A9160 000A60A0 4B FD 9A 5D */ bl __cvt_fp2unsigned +/* 800A9164 000A60A4 54 64 05 FE */ clrlwi r4, r3, 0x17 +/* 800A9168 000A60A8 7C 7E 23 96 */ divwu r3, r30, r4 +/* 800A916C 000A60AC 28 04 00 80 */ cmplwi r4, 0x80 +/* 800A9170 000A60B0 38 63 00 01 */ addi r3, r3, 1 +/* 800A9174 000A60B4 40 81 00 30 */ ble lbl_800A91A4 +/* 800A9178 000A60B8 28 04 01 00 */ cmplwi r4, 0x100 +/* 800A917C 000A60BC 40 80 00 28 */ bge lbl_800A91A4 +/* 800A9180 000A60C0 48 00 00 08 */ b lbl_800A9188 +lbl_800A9184: +/* 800A9184 000A60C4 54 84 F8 7E */ srwi r4, r4, 1 +lbl_800A9188: +/* 800A9188 000A60C8 54 80 07 FF */ clrlwi. r0, r4, 0x1f +/* 800A918C 000A60CC 41 82 FF F8 */ beq lbl_800A9184 +/* 800A9190 000A60D0 7C 1F 23 96 */ divwu r0, r31, r4 +/* 800A9194 000A60D4 7C 00 21 D6 */ mullw r0, r0, r4 +/* 800A9198 000A60D8 7C 00 F8 51 */ subf. r0, r0, r31 +/* 800A919C 000A60DC 40 82 00 08 */ bne lbl_800A91A4 +/* 800A91A0 000A60E0 38 63 00 01 */ addi r3, r3, 1 +lbl_800A91A4: +/* 800A91A4 000A60E4 28 03 04 00 */ cmplwi r3, 0x400 +/* 800A91A8 000A60E8 40 81 00 08 */ ble lbl_800A91B0 +/* 800A91AC 000A60EC 38 60 04 00 */ li r3, 0x400 +lbl_800A91B0: +/* 800A91B0 000A60F0 7C 60 1B 78 */ mr r0, r3 +lbl_800A91B4: +/* 800A91B4 000A60F4 7C 00 E8 40 */ cmplw r0, r29 +/* 800A91B8 000A60F8 41 81 FF 78 */ bgt lbl_800A9130 +/* 800A91BC 000A60FC FF A0 E0 90 */ fmr f29, f28 +/* 800A91C0 000A6100 CB C2 8A F8 */ lfd f30, "@138"@sda21(r2) +/* 800A91C4 000A6104 C3 E2 8A F0 */ lfs f31, "@83"@sda21(r2) +/* 800A91C8 000A6108 57 7B 04 3E */ clrlwi r27, r27, 0x10 +/* 800A91CC 000A610C 3F 40 43 30 */ lis r26, 0x4330 +/* 800A91D0 000A6110 48 00 00 8C */ b lbl_800A925C +lbl_800A91D4: +/* 800A91D4 000A6114 3B 9C 00 01 */ addi r28, r28, 1 +/* 800A91D8 000A6118 93 61 00 34 */ stw r27, 0x34(r1) +/* 800A91DC 000A611C FF A0 E0 90 */ fmr f29, f28 +/* 800A91E0 000A6120 93 81 00 2C */ stw r28, 0x2c(r1) +/* 800A91E4 000A6124 93 41 00 28 */ stw r26, 0x28(r1) +/* 800A91E8 000A6128 93 41 00 30 */ stw r26, 0x30(r1) +/* 800A91EC 000A612C C8 21 00 28 */ lfd f1, 0x28(r1) +/* 800A91F0 000A6130 C8 01 00 30 */ lfd f0, 0x30(r1) +/* 800A91F4 000A6134 EC 21 F0 28 */ fsubs f1, f1, f30 +/* 800A91F8 000A6138 EC 00 F0 28 */ fsubs f0, f0, f30 +/* 800A91FC 000A613C EC 01 00 24 */ fdivs f0, f1, f0 +/* 800A9200 000A6140 EC 3F 00 24 */ fdivs f1, f31, f0 +/* 800A9204 000A6144 FF 80 00 90 */ fmr f28, f0 +/* 800A9208 000A6148 4B FD 99 B5 */ bl __cvt_fp2unsigned +/* 800A920C 000A614C 54 64 05 FE */ clrlwi r4, r3, 0x17 +/* 800A9210 000A6150 7C 7E 23 96 */ divwu r3, r30, r4 +/* 800A9214 000A6154 28 04 00 80 */ cmplwi r4, 0x80 +/* 800A9218 000A6158 38 63 00 01 */ addi r3, r3, 1 +/* 800A921C 000A615C 40 81 00 30 */ ble lbl_800A924C +/* 800A9220 000A6160 28 04 01 00 */ cmplwi r4, 0x100 +/* 800A9224 000A6164 40 80 00 28 */ bge lbl_800A924C +/* 800A9228 000A6168 48 00 00 08 */ b lbl_800A9230 +lbl_800A922C: +/* 800A922C 000A616C 54 84 F8 7E */ srwi r4, r4, 1 +lbl_800A9230: +/* 800A9230 000A6170 54 80 07 FF */ clrlwi. r0, r4, 0x1f +/* 800A9234 000A6174 41 82 FF F8 */ beq lbl_800A922C +/* 800A9238 000A6178 7C 1F 23 96 */ divwu r0, r31, r4 +/* 800A923C 000A617C 7C 00 21 D6 */ mullw r0, r0, r4 +/* 800A9240 000A6180 7C 00 F8 51 */ subf. r0, r0, r31 +/* 800A9244 000A6184 40 82 00 08 */ bne lbl_800A924C +/* 800A9248 000A6188 38 63 00 01 */ addi r3, r3, 1 +lbl_800A924C: +/* 800A924C 000A618C 28 03 04 00 */ cmplwi r3, 0x400 +/* 800A9250 000A6190 40 81 00 08 */ ble lbl_800A9258 +/* 800A9254 000A6194 38 60 04 00 */ li r3, 0x400 +lbl_800A9258: +/* 800A9258 000A6198 7C 60 1B 78 */ mr r0, r3 +lbl_800A925C: +/* 800A925C 000A619C 7C 00 E8 40 */ cmplw r0, r29 +/* 800A9260 000A61A0 41 80 FF 74 */ blt lbl_800A91D4 +/* 800A9264 000A61A4 BB 21 00 3C */ lmw r25, 0x3c(r1) +/* 800A9268 000A61A8 FC 20 E8 90 */ fmr f1, f29 +/* 800A926C 000A61AC 80 01 00 7C */ lwz r0, 0x7c(r1) +/* 800A9270 000A61B0 CB E1 00 70 */ lfd f31, 0x70(r1) +/* 800A9274 000A61B4 CB C1 00 68 */ lfd f30, 0x68(r1) +/* 800A9278 000A61B8 CB A1 00 60 */ lfd f29, 0x60(r1) +/* 800A927C 000A61BC CB 81 00 58 */ lfd f28, 0x58(r1) +/* 800A9280 000A61C0 38 21 00 78 */ addi r1, r1, 0x78 +/* 800A9284 000A61C4 7C 08 03 A6 */ mtlr r0 +/* 800A9288 000A61C8 4E 80 00 20 */ blr + +.global GXSetDispCopyYScale +GXSetDispCopyYScale: +/* 800A928C 000A61CC 7C 08 02 A6 */ mflr r0 +/* 800A9290 000A61D0 90 01 00 04 */ stw r0, 4(r1) +/* 800A9294 000A61D4 94 21 FF F8 */ stwu r1, -8(r1) +/* 800A9298 000A61D8 C0 02 8A F0 */ lfs f0, "@83"@sda21(r2) +/* 800A929C 000A61DC EC 20 08 24 */ fdivs f1, f0, f1 +/* 800A92A0 000A61E0 4B FD 99 1D */ bl __cvt_fp2unsigned +/* 800A92A4 000A61E4 54 66 05 FE */ clrlwi r6, r3, 0x17 +/* 800A92A8 000A61E8 80 8D 82 C8 */ lwz r4, gx@sda21(r13) +/* 800A92AC 000A61EC 38 00 00 61 */ li r0, 0x61 +/* 800A92B0 000A61F0 3C 60 CC 01 */ lis r3, 0xCC008000@ha +/* 800A92B4 000A61F4 98 03 80 00 */ stb r0, 0xCC008000@l(r3) +/* 800A92B8 000A61F8 64 C0 4E 00 */ oris r0, r6, 0x4e00 +/* 800A92BC 000A61FC 38 A0 00 00 */ li r5, 0 +/* 800A92C0 000A6200 90 03 80 00 */ stw r0, -0x8000(r3) +/* 800A92C4 000A6204 20 66 01 00 */ subfic r3, r6, 0x100 +/* 800A92C8 000A6208 30 03 FF FF */ addic r0, r3, -1 +/* 800A92CC 000A620C B0 A4 00 02 */ sth r5, 2(r4) +/* 800A92D0 000A6210 7C 00 19 10 */ subfe r0, r0, r3 +/* 800A92D4 000A6214 54 00 53 AA */ rlwinm r0, r0, 0xa, 0xe, 0x15 +/* 800A92D8 000A6218 80 6D 82 C8 */ lwz r3, gx@sda21(r13) +/* 800A92DC 000A621C 28 06 00 80 */ cmplwi r6, 0x80 +/* 800A92E0 000A6220 38 86 00 00 */ addi r4, r6, 0 +/* 800A92E4 000A6224 38 A3 01 EC */ addi r5, r3, 0x1ec +/* 800A92E8 000A6228 80 63 01 EC */ lwz r3, 0x1ec(r3) +/* 800A92EC 000A622C 54 63 05 A8 */ rlwinm r3, r3, 0, 0x16, 0x14 +/* 800A92F0 000A6230 7C 60 03 78 */ or r0, r3, r0 +/* 800A92F4 000A6234 90 05 00 00 */ stw r0, 0(r5) +/* 800A92F8 000A6238 80 6D 82 C8 */ lwz r3, gx@sda21(r13) +/* 800A92FC 000A623C 80 03 01 E4 */ lwz r0, 0x1e4(r3) +/* 800A9300 000A6240 54 05 B5 BE */ rlwinm r5, r0, 0x16, 0x16, 0x1f +/* 800A9304 000A6244 54 00 F3 AE */ rlwinm r0, r0, 0x1e, 0xe, 0x17 +/* 800A9308 000A6248 7C 60 33 96 */ divwu r3, r0, r6 +/* 800A930C 000A624C 38 A5 00 01 */ addi r5, r5, 1 +/* 800A9310 000A6250 38 63 00 01 */ addi r3, r3, 1 +/* 800A9314 000A6254 40 81 00 30 */ ble lbl_800A9344 +/* 800A9318 000A6258 28 06 01 00 */ cmplwi r6, 0x100 +/* 800A931C 000A625C 40 80 00 28 */ bge lbl_800A9344 +/* 800A9320 000A6260 48 00 00 08 */ b lbl_800A9328 +lbl_800A9324: +/* 800A9324 000A6264 54 84 F8 7E */ srwi r4, r4, 1 +lbl_800A9328: +/* 800A9328 000A6268 54 80 07 FF */ clrlwi. r0, r4, 0x1f +/* 800A932C 000A626C 41 82 FF F8 */ beq lbl_800A9324 +/* 800A9330 000A6270 7C 05 23 96 */ divwu r0, r5, r4 +/* 800A9334 000A6274 7C 00 21 D6 */ mullw r0, r0, r4 +/* 800A9338 000A6278 7C 00 28 51 */ subf. r0, r0, r5 +/* 800A933C 000A627C 40 82 00 08 */ bne lbl_800A9344 +/* 800A9340 000A6280 38 63 00 01 */ addi r3, r3, 1 +lbl_800A9344: +/* 800A9344 000A6284 28 03 04 00 */ cmplwi r3, 0x400 +/* 800A9348 000A6288 40 81 00 08 */ ble lbl_800A9350 +/* 800A934C 000A628C 38 60 04 00 */ li r3, 0x400 +lbl_800A9350: +/* 800A9350 000A6290 80 01 00 0C */ lwz r0, 0xc(r1) +/* 800A9354 000A6294 38 21 00 08 */ addi r1, r1, 8 +/* 800A9358 000A6298 7C 08 03 A6 */ mtlr r0 +/* 800A935C 000A629C 4E 80 00 20 */ blr + +.global GXSetCopyClear +GXSetCopyClear: +/* 800A9360 000A62A0 54 80 02 3E */ clrlwi r0, r4, 8 +/* 800A9364 000A62A4 88 83 00 03 */ lbz r4, 3(r3) +/* 800A9368 000A62A8 88 A3 00 00 */ lbz r5, 0(r3) +/* 800A936C 000A62AC 38 C0 00 61 */ li r6, 0x61 +/* 800A9370 000A62B0 54 87 40 2E */ slwi r7, r4, 8 +/* 800A9374 000A62B4 80 8D 82 C8 */ lwz r4, gx@sda21(r13) +/* 800A9378 000A62B8 50 A7 06 3E */ rlwimi r7, r5, 0, 0x18, 0x1f +/* 800A937C 000A62BC 3C A0 CC 01 */ lis r5, 0xCC008000@ha +/* 800A9380 000A62C0 54 E7 02 3E */ clrlwi r7, r7, 8 +/* 800A9384 000A62C4 98 C5 80 00 */ stb r6, 0xCC008000@l(r5) +/* 800A9388 000A62C8 64 E7 4F 00 */ oris r7, r7, 0x4f00 +/* 800A938C 000A62CC 90 E5 80 00 */ stw r7, -0x8000(r5) +/* 800A9390 000A62D0 64 07 51 00 */ oris r7, r0, 0x5100 +/* 800A9394 000A62D4 38 00 00 00 */ li r0, 0 +/* 800A9398 000A62D8 89 03 00 02 */ lbz r8, 2(r3) +/* 800A939C 000A62DC 88 63 00 01 */ lbz r3, 1(r3) +/* 800A93A0 000A62E0 54 63 40 2E */ slwi r3, r3, 8 +/* 800A93A4 000A62E4 98 C5 80 00 */ stb r6, -0x8000(r5) +/* 800A93A8 000A62E8 51 03 06 3E */ rlwimi r3, r8, 0, 0x18, 0x1f +/* 800A93AC 000A62EC 54 63 02 3E */ clrlwi r3, r3, 8 +/* 800A93B0 000A62F0 64 63 50 00 */ oris r3, r3, 0x5000 +/* 800A93B4 000A62F4 90 65 80 00 */ stw r3, -0x8000(r5) +/* 800A93B8 000A62F8 98 C5 80 00 */ stb r6, -0x8000(r5) +/* 800A93BC 000A62FC 90 E5 80 00 */ stw r7, -0x8000(r5) +/* 800A93C0 000A6300 B0 04 00 02 */ sth r0, 2(r4) +/* 800A93C4 000A6304 4E 80 00 20 */ blr + +.global GXSetCopyFilter +GXSetCopyFilter: +/* 800A93C8 000A6308 94 21 FF B0 */ stwu r1, -0x50(r1) +/* 800A93CC 000A630C 54 60 06 3F */ clrlwi. r0, r3, 0x18 +/* 800A93D0 000A6310 BE E1 00 2C */ stmw r23, 0x2c(r1) +/* 800A93D4 000A6314 41 82 01 28 */ beq lbl_800A94FC +/* 800A93D8 000A6318 88 04 00 01 */ lbz r0, 1(r4) +/* 800A93DC 000A631C 88 64 00 07 */ lbz r3, 7(r4) +/* 800A93E0 000A6320 54 1E 20 36 */ slwi r30, r0, 4 +/* 800A93E4 000A6324 89 04 00 00 */ lbz r8, 0(r4) +/* 800A93E8 000A6328 88 04 00 13 */ lbz r0, 0x13(r4) +/* 800A93EC 000A632C 54 79 20 36 */ slwi r25, r3, 4 +/* 800A93F0 000A6330 89 44 00 06 */ lbz r10, 6(r4) +/* 800A93F4 000A6334 51 1E 07 3E */ rlwimi r30, r8, 0, 0x1c, 0x1f +/* 800A93F8 000A6338 89 64 00 02 */ lbz r11, 2(r4) +/* 800A93FC 000A633C 88 E4 00 0D */ lbz r7, 0xd(r4) +/* 800A9400 000A6340 51 59 07 3E */ rlwimi r25, r10, 0, 0x1c, 0x1f +/* 800A9404 000A6344 55 7B 40 2E */ slwi r27, r11, 8 +/* 800A9408 000A6348 89 24 00 08 */ lbz r9, 8(r4) +/* 800A940C 000A634C 88 64 00 0E */ lbz r3, 0xe(r4) +/* 800A9410 000A6350 55 3A 40 2E */ slwi r26, r9, 8 +/* 800A9414 000A6354 8B 84 00 03 */ lbz r28, 3(r4) +/* 800A9418 000A6358 53 DB 06 3E */ rlwimi r27, r30, 0, 0x18, 0x1f +/* 800A941C 000A635C 89 24 00 10 */ lbz r9, 0x10(r4) +/* 800A9420 000A6360 54 F7 20 36 */ slwi r23, r7, 4 +/* 800A9424 000A6364 89 84 00 0C */ lbz r12, 0xc(r4) +/* 800A9428 000A6368 88 E4 00 15 */ lbz r7, 0x15(r4) +/* 800A942C 000A636C 54 78 40 2E */ slwi r24, r3, 8 +/* 800A9430 000A6370 51 97 07 3E */ rlwimi r23, r12, 0, 0x1c, 0x1f +/* 800A9434 000A6374 8B A4 00 12 */ lbz r29, 0x12(r4) +/* 800A9438 000A6378 54 00 20 36 */ slwi r0, r0, 4 +/* 800A943C 000A637C 53 A0 07 3E */ rlwimi r0, r29, 0, 0x1c, 0x1f +/* 800A9440 000A6380 89 04 00 14 */ lbz r8, 0x14(r4) +/* 800A9444 000A6384 57 9C 60 26 */ slwi r28, r28, 0xc +/* 800A9448 000A6388 8B E4 00 09 */ lbz r31, 9(r4) +/* 800A944C 000A638C 53 7C 05 3E */ rlwimi r28, r27, 0, 0x14, 0x1f +/* 800A9450 000A6390 8B A4 00 04 */ lbz r29, 4(r4) +/* 800A9454 000A6394 52 F8 06 3E */ rlwimi r24, r23, 0, 0x18, 0x1f +/* 800A9458 000A6398 89 44 00 0F */ lbz r10, 0xf(r4) +/* 800A945C 000A639C 55 17 40 2E */ slwi r23, r8, 8 +/* 800A9460 000A63A0 89 84 00 0A */ lbz r12, 0xa(r4) +/* 800A9464 000A63A4 53 3A 06 3E */ rlwimi r26, r25, 0, 0x18, 0x1f +/* 800A9468 000A63A8 88 64 00 16 */ lbz r3, 0x16(r4) +/* 800A946C 000A63AC 55 59 60 26 */ slwi r25, r10, 0xc +/* 800A9470 000A63B0 8B C4 00 05 */ lbz r30, 5(r4) +/* 800A9474 000A63B4 50 17 06 3E */ rlwimi r23, r0, 0, 0x18, 0x1f +/* 800A9478 000A63B8 88 04 00 17 */ lbz r0, 0x17(r4) +/* 800A947C 000A63BC 57 FB 60 26 */ slwi r27, r31, 0xc +/* 800A9480 000A63C0 89 64 00 0B */ lbz r11, 0xb(r4) +/* 800A9484 000A63C4 89 04 00 11 */ lbz r8, 0x11(r4) +/* 800A9488 000A63C8 57 A4 80 1E */ slwi r4, r29, 0x10 +/* 800A948C 000A63CC 54 E7 60 26 */ slwi r7, r7, 0xc +/* 800A9490 000A63D0 55 8A 80 1E */ slwi r10, r12, 0x10 +/* 800A9494 000A63D4 53 5B 05 3E */ rlwimi r27, r26, 0, 0x14, 0x1f +/* 800A9498 000A63D8 54 6C 80 1E */ slwi r12, r3, 0x10 +/* 800A949C 000A63DC 52 E7 05 3E */ rlwimi r7, r23, 0, 0x14, 0x1f +/* 800A94A0 000A63E0 53 84 04 3E */ rlwimi r4, r28, 0, 0x10, 0x1f +/* 800A94A4 000A63E4 57 C3 A0 16 */ slwi r3, r30, 0x14 +/* 800A94A8 000A63E8 53 19 05 3E */ rlwimi r25, r24, 0, 0x14, 0x1f +/* 800A94AC 000A63EC 55 29 80 1E */ slwi r9, r9, 0x10 +/* 800A94B0 000A63F0 53 6A 04 3E */ rlwimi r10, r27, 0, 0x10, 0x1f +/* 800A94B4 000A63F4 50 83 03 3E */ rlwimi r3, r4, 0, 0xc, 0x1f +/* 800A94B8 000A63F8 50 EC 04 3E */ rlwimi r12, r7, 0, 0x10, 0x1f +/* 800A94BC 000A63FC 54 67 02 3E */ clrlwi r7, r3, 8 +/* 800A94C0 000A6400 55 63 A0 16 */ slwi r3, r11, 0x14 +/* 800A94C4 000A6404 51 43 03 3E */ rlwimi r3, r10, 0, 0xc, 0x1f +/* 800A94C8 000A6408 54 64 02 3E */ clrlwi r4, r3, 8 +/* 800A94CC 000A640C 55 03 A0 16 */ slwi r3, r8, 0x14 +/* 800A94D0 000A6410 53 29 04 3E */ rlwimi r9, r25, 0, 0x10, 0x1f +/* 800A94D4 000A6414 51 23 03 3E */ rlwimi r3, r9, 0, 0xc, 0x1f +/* 800A94D8 000A6418 54 00 A0 16 */ slwi r0, r0, 0x14 +/* 800A94DC 000A641C 51 80 03 3E */ rlwimi r0, r12, 0, 0xc, 0x1f +/* 800A94E0 000A6420 54 63 02 3E */ clrlwi r3, r3, 8 +/* 800A94E4 000A6424 54 00 02 3E */ clrlwi r0, r0, 8 +/* 800A94E8 000A6428 64 E8 01 00 */ oris r8, r7, 0x100 +/* 800A94EC 000A642C 64 87 02 00 */ oris r7, r4, 0x200 +/* 800A94F0 000A6430 64 69 03 00 */ oris r9, r3, 0x300 +/* 800A94F4 000A6434 64 0A 04 00 */ oris r10, r0, 0x400 +/* 800A94F8 000A6438 48 00 00 24 */ b lbl_800A951C +lbl_800A94FC: +/* 800A94FC 000A643C 3D 00 01 66 */ lis r8, 0x01666666@ha +/* 800A9500 000A6440 3C E0 02 66 */ lis r7, 0x02666666@ha +/* 800A9504 000A6444 3C 80 03 66 */ lis r4, 0x03666666@ha +/* 800A9508 000A6448 3C 60 04 66 */ lis r3, 0x04666666@ha +/* 800A950C 000A644C 39 08 66 66 */ addi r8, r8, 0x01666666@l +/* 800A9510 000A6450 38 E7 66 66 */ addi r7, r7, 0x02666666@l +/* 800A9514 000A6454 39 24 66 66 */ addi r9, r4, 0x03666666@l +/* 800A9518 000A6458 39 43 66 66 */ addi r10, r3, 0x04666666@l +lbl_800A951C: +/* 800A951C 000A645C 38 80 00 61 */ li r4, 0x61 +/* 800A9520 000A6460 3C 60 CC 01 */ lis r3, 0xCC008000@ha +/* 800A9524 000A6464 98 83 80 00 */ stb r4, 0xCC008000@l(r3) +/* 800A9528 000A6468 54 A0 06 3F */ clrlwi. r0, r5, 0x18 +/* 800A952C 000A646C 91 03 80 00 */ stw r8, -0x8000(r3) +/* 800A9530 000A6470 98 83 80 00 */ stb r4, -0x8000(r3) +/* 800A9534 000A6474 90 E3 80 00 */ stw r7, -0x8000(r3) +/* 800A9538 000A6478 98 83 80 00 */ stb r4, -0x8000(r3) +/* 800A953C 000A647C 91 23 80 00 */ stw r9, -0x8000(r3) +/* 800A9540 000A6480 98 83 80 00 */ stb r4, -0x8000(r3) +/* 800A9544 000A6484 91 43 80 00 */ stw r10, -0x8000(r3) +/* 800A9548 000A6488 41 82 00 68 */ beq lbl_800A95B0 +/* 800A954C 000A648C 88 06 00 00 */ lbz r0, 0(r6) +/* 800A9550 000A6490 88 66 00 01 */ lbz r3, 1(r6) +/* 800A9554 000A6494 64 05 53 00 */ oris r5, r0, 0x5300 +/* 800A9558 000A6498 88 06 00 04 */ lbz r0, 4(r6) +/* 800A955C 000A649C 88 86 00 02 */ lbz r4, 2(r6) +/* 800A9560 000A64A0 54 A7 06 A6 */ rlwinm r7, r5, 0, 0x1a, 0x13 +/* 800A9564 000A64A4 54 65 30 32 */ slwi r5, r3, 6 +/* 800A9568 000A64A8 88 66 00 05 */ lbz r3, 5(r6) +/* 800A956C 000A64AC 7C E7 2B 78 */ or r7, r7, r5 +/* 800A9570 000A64B0 64 08 54 00 */ oris r8, r0, 0x5400 +/* 800A9574 000A64B4 88 A6 00 03 */ lbz r5, 3(r6) +/* 800A9578 000A64B8 88 06 00 06 */ lbz r0, 6(r6) +/* 800A957C 000A64BC 54 E6 05 1A */ rlwinm r6, r7, 0, 0x14, 0xd +/* 800A9580 000A64C0 54 84 60 26 */ slwi r4, r4, 0xc +/* 800A9584 000A64C4 7C C6 23 78 */ or r6, r6, r4 +/* 800A9588 000A64C8 55 04 06 A6 */ rlwinm r4, r8, 0, 0x1a, 0x13 +/* 800A958C 000A64CC 54 63 30 32 */ slwi r3, r3, 6 +/* 800A9590 000A64D0 7C 83 1B 78 */ or r3, r4, r3 +/* 800A9594 000A64D4 54 C6 03 8E */ rlwinm r6, r6, 0, 0xe, 7 +/* 800A9598 000A64D8 54 A4 90 1A */ slwi r4, r5, 0x12 +/* 800A959C 000A64DC 54 63 05 1A */ rlwinm r3, r3, 0, 0x14, 0xd +/* 800A95A0 000A64E0 54 00 60 26 */ slwi r0, r0, 0xc +/* 800A95A4 000A64E4 7C C6 23 78 */ or r6, r6, r4 +/* 800A95A8 000A64E8 7C 67 03 78 */ or r7, r3, r0 +/* 800A95AC 000A64EC 48 00 00 14 */ b lbl_800A95C0 +lbl_800A95B0: +/* 800A95B0 000A64F0 3C 80 53 59 */ lis r4, 0x53595000@ha +/* 800A95B4 000A64F4 3C 60 54 00 */ lis r3, 0x54000015@ha +/* 800A95B8 000A64F8 38 C4 50 00 */ addi r6, r4, 0x53595000@l +/* 800A95BC 000A64FC 38 E3 00 15 */ addi r7, r3, 0x54000015@l +lbl_800A95C0: +/* 800A95C0 000A6500 38 A0 00 61 */ li r5, 0x61 +/* 800A95C4 000A6504 80 6D 82 C8 */ lwz r3, gx@sda21(r13) +/* 800A95C8 000A6508 3C 80 CC 01 */ lis r4, 0xCC008000@ha +/* 800A95CC 000A650C 98 A4 80 00 */ stb r5, 0xCC008000@l(r4) +/* 800A95D0 000A6510 38 00 00 00 */ li r0, 0 +/* 800A95D4 000A6514 90 C4 80 00 */ stw r6, -0x8000(r4) +/* 800A95D8 000A6518 98 A4 80 00 */ stb r5, -0x8000(r4) +/* 800A95DC 000A651C 90 E4 80 00 */ stw r7, -0x8000(r4) +/* 800A95E0 000A6520 B0 03 00 02 */ sth r0, 2(r3) +/* 800A95E4 000A6524 BA E1 00 2C */ lmw r23, 0x2c(r1) +/* 800A95E8 000A6528 38 21 00 50 */ addi r1, r1, 0x50 +/* 800A95EC 000A652C 4E 80 00 20 */ blr + +.global GXSetDispCopyGamma +GXSetDispCopyGamma: +/* 800A95F0 000A6530 80 8D 82 C8 */ lwz r4, gx@sda21(r13) +/* 800A95F4 000A6534 54 60 38 30 */ slwi r0, r3, 7 +/* 800A95F8 000A6538 84 64 01 EC */ lwzu r3, 0x1ec(r4) +/* 800A95FC 000A653C 54 63 06 6C */ rlwinm r3, r3, 0, 0x19, 0x16 +/* 800A9600 000A6540 7C 60 03 78 */ or r0, r3, r0 +/* 800A9604 000A6544 90 04 00 00 */ stw r0, 0(r4) +/* 800A9608 000A6548 4E 80 00 20 */ blr + +.global GXCopyDisp +GXCopyDisp: +/* 800A960C 000A654C 54 80 06 3F */ clrlwi. r0, r4, 0x18 +/* 800A9610 000A6550 41 82 00 3C */ beq lbl_800A964C +/* 800A9614 000A6554 80 ED 82 C8 */ lwz r7, gx@sda21(r13) +/* 800A9618 000A6558 38 00 00 61 */ li r0, 0x61 +/* 800A961C 000A655C 3C A0 CC 01 */ lis r5, 0xCC008000@ha +/* 800A9620 000A6560 80 C7 01 D8 */ lwz r6, 0x1d8(r7) +/* 800A9624 000A6564 54 C6 00 3C */ rlwinm r6, r6, 0, 0, 0x1e +/* 800A9628 000A6568 98 05 80 00 */ stb r0, 0xCC008000@l(r5) +/* 800A962C 000A656C 60 C6 00 01 */ ori r6, r6, 1 +/* 800A9630 000A6570 54 C6 07 F6 */ rlwinm r6, r6, 0, 0x1f, 0x1b +/* 800A9634 000A6574 60 C6 00 0E */ ori r6, r6, 0xe +/* 800A9638 000A6578 90 C5 80 00 */ stw r6, -0x8000(r5) +/* 800A963C 000A657C 80 C7 01 D0 */ lwz r6, 0x1d0(r7) +/* 800A9640 000A6580 98 05 80 00 */ stb r0, -0x8000(r5) +/* 800A9644 000A6584 54 C0 00 3A */ rlwinm r0, r6, 0, 0, 0x1d +/* 800A9648 000A6588 90 05 80 00 */ stw r0, -0x8000(r5) +lbl_800A964C: +/* 800A964C 000A658C 54 80 06 3F */ clrlwi. r0, r4, 0x18 +/* 800A9650 000A6590 38 00 00 00 */ li r0, 0 +/* 800A9654 000A6594 40 82 00 18 */ bne lbl_800A966C +/* 800A9658 000A6598 80 AD 82 C8 */ lwz r5, gx@sda21(r13) +/* 800A965C 000A659C 80 A5 01 DC */ lwz r5, 0x1dc(r5) +/* 800A9660 000A65A0 54 A5 07 7E */ clrlwi r5, r5, 0x1d +/* 800A9664 000A65A4 28 05 00 03 */ cmplwi r5, 3 +/* 800A9668 000A65A8 40 82 00 30 */ bne lbl_800A9698 +lbl_800A966C: +/* 800A966C 000A65AC 80 AD 82 C8 */ lwz r5, gx@sda21(r13) +/* 800A9670 000A65B0 80 E5 01 DC */ lwz r7, 0x1dc(r5) +/* 800A9674 000A65B4 54 E5 D7 FE */ rlwinm r5, r7, 0x1a, 0x1f, 0x1f +/* 800A9678 000A65B8 28 05 00 01 */ cmplwi r5, 1 +/* 800A967C 000A65BC 40 82 00 1C */ bne lbl_800A9698 +/* 800A9680 000A65C0 38 00 00 61 */ li r0, 0x61 +/* 800A9684 000A65C4 3C C0 CC 01 */ lis r6, 0xCC008000@ha +/* 800A9688 000A65C8 98 06 80 00 */ stb r0, 0xCC008000@l(r6) +/* 800A968C 000A65CC 54 E5 06 B0 */ rlwinm r5, r7, 0, 0x1a, 0x18 +/* 800A9690 000A65D0 38 00 00 01 */ li r0, 1 +/* 800A9694 000A65D4 90 A6 80 00 */ stw r5, -0x8000(r6) +lbl_800A9698: +/* 800A9698 000A65D8 39 20 00 61 */ li r9, 0x61 +/* 800A969C 000A65DC 80 ED 82 C8 */ lwz r7, gx@sda21(r13) +/* 800A96A0 000A65E0 3D 00 CC 01 */ lis r8, 0xCC008000@ha +/* 800A96A4 000A65E4 99 28 80 00 */ stb r9, 0xCC008000@l(r8) +/* 800A96A8 000A65E8 54 63 DA 3E */ rlwinm r3, r3, 0x1b, 8, 0x1f +/* 800A96AC 000A65EC 64 6A 4B 00 */ oris r10, r3, 0x4b00 +/* 800A96B0 000A65F0 80 C7 01 E0 */ lwz r6, 0x1e0(r7) +/* 800A96B4 000A65F4 54 85 06 3F */ clrlwi. r5, r4, 0x18 +/* 800A96B8 000A65F8 54 83 5B 68 */ rlwinm r3, r4, 0xb, 0xd, 0x14 +/* 800A96BC 000A65FC 90 C8 80 00 */ stw r6, -0x8000(r8) +/* 800A96C0 000A6600 99 28 80 00 */ stb r9, -0x8000(r8) +/* 800A96C4 000A6604 80 87 01 E4 */ lwz r4, 0x1e4(r7) +/* 800A96C8 000A6608 90 88 80 00 */ stw r4, -0x8000(r8) +/* 800A96CC 000A660C 99 28 80 00 */ stb r9, -0x8000(r8) +/* 800A96D0 000A6610 80 87 01 E8 */ lwz r4, 0x1e8(r7) +/* 800A96D4 000A6614 90 88 80 00 */ stw r4, -0x8000(r8) +/* 800A96D8 000A6618 99 28 80 00 */ stb r9, -0x8000(r8) +/* 800A96DC 000A661C 91 48 80 00 */ stw r10, -0x8000(r8) +/* 800A96E0 000A6620 80 87 01 EC */ lwz r4, 0x1ec(r7) +/* 800A96E4 000A6624 54 84 05 66 */ rlwinm r4, r4, 0, 0x15, 0x13 +/* 800A96E8 000A6628 7C 83 1B 78 */ or r3, r4, r3 +/* 800A96EC 000A662C 90 67 01 EC */ stw r3, 0x1ec(r7) +/* 800A96F0 000A6630 80 6D 82 C8 */ lwz r3, gx@sda21(r13) +/* 800A96F4 000A6634 38 83 01 EC */ addi r4, r3, 0x1ec +/* 800A96F8 000A6638 80 63 01 EC */ lwz r3, 0x1ec(r3) +/* 800A96FC 000A663C 54 63 04 A0 */ rlwinm r3, r3, 0, 0x12, 0x10 +/* 800A9700 000A6640 60 63 40 00 */ ori r3, r3, 0x4000 +/* 800A9704 000A6644 90 64 00 00 */ stw r3, 0(r4) +/* 800A9708 000A6648 80 6D 82 C8 */ lwz r3, gx@sda21(r13) +/* 800A970C 000A664C 38 83 01 EC */ addi r4, r3, 0x1ec +/* 800A9710 000A6650 80 63 01 EC */ lwz r3, 0x1ec(r3) +/* 800A9714 000A6654 54 63 02 3E */ clrlwi r3, r3, 8 +/* 800A9718 000A6658 64 63 52 00 */ oris r3, r3, 0x5200 +/* 800A971C 000A665C 90 64 00 00 */ stw r3, 0(r4) +/* 800A9720 000A6660 99 28 80 00 */ stb r9, -0x8000(r8) +/* 800A9724 000A6664 80 8D 82 C8 */ lwz r4, gx@sda21(r13) +/* 800A9728 000A6668 80 64 01 EC */ lwz r3, 0x1ec(r4) +/* 800A972C 000A666C 90 68 80 00 */ stw r3, -0x8000(r8) +/* 800A9730 000A6670 41 82 00 1C */ beq lbl_800A974C +/* 800A9734 000A6674 99 28 80 00 */ stb r9, -0x8000(r8) +/* 800A9738 000A6678 80 64 01 D8 */ lwz r3, 0x1d8(r4) +/* 800A973C 000A667C 90 68 80 00 */ stw r3, -0x8000(r8) +/* 800A9740 000A6680 99 28 80 00 */ stb r9, -0x8000(r8) +/* 800A9744 000A6684 80 64 01 D0 */ lwz r3, 0x1d0(r4) +/* 800A9748 000A6688 90 68 80 00 */ stw r3, -0x8000(r8) +lbl_800A974C: +/* 800A974C 000A668C 54 00 06 3F */ clrlwi. r0, r0, 0x18 +/* 800A9750 000A6690 41 82 00 1C */ beq lbl_800A976C +/* 800A9754 000A6694 38 00 00 61 */ li r0, 0x61 +/* 800A9758 000A6698 80 6D 82 C8 */ lwz r3, gx@sda21(r13) +/* 800A975C 000A669C 3C 80 CC 01 */ lis r4, 0xCC008000@ha +/* 800A9760 000A66A0 98 04 80 00 */ stb r0, 0xCC008000@l(r4) +/* 800A9764 000A66A4 80 03 01 DC */ lwz r0, 0x1dc(r3) +/* 800A9768 000A66A8 90 04 80 00 */ stw r0, -0x8000(r4) +lbl_800A976C: +/* 800A976C 000A66AC 80 6D 82 C8 */ lwz r3, gx@sda21(r13) +/* 800A9770 000A66B0 38 00 00 00 */ li r0, 0 +/* 800A9774 000A66B4 B0 03 00 02 */ sth r0, 2(r3) +/* 800A9778 000A66B8 4E 80 00 20 */ blr + +.global GXCopyTex +GXCopyTex: +/* 800A977C 000A66BC 54 80 06 3F */ clrlwi. r0, r4, 0x18 +/* 800A9780 000A66C0 41 82 00 3C */ beq lbl_800A97BC +/* 800A9784 000A66C4 80 ED 82 C8 */ lwz r7, gx@sda21(r13) +/* 800A9788 000A66C8 38 00 00 61 */ li r0, 0x61 +/* 800A978C 000A66CC 3C A0 CC 01 */ lis r5, 0xCC008000@ha +/* 800A9790 000A66D0 80 C7 01 D8 */ lwz r6, 0x1d8(r7) +/* 800A9794 000A66D4 54 C6 00 3C */ rlwinm r6, r6, 0, 0, 0x1e +/* 800A9798 000A66D8 98 05 80 00 */ stb r0, 0xCC008000@l(r5) +/* 800A979C 000A66DC 60 C6 00 01 */ ori r6, r6, 1 +/* 800A97A0 000A66E0 54 C6 07 F6 */ rlwinm r6, r6, 0, 0x1f, 0x1b +/* 800A97A4 000A66E4 60 C6 00 0E */ ori r6, r6, 0xe +/* 800A97A8 000A66E8 90 C5 80 00 */ stw r6, -0x8000(r5) +/* 800A97AC 000A66EC 80 C7 01 D0 */ lwz r6, 0x1d0(r7) +/* 800A97B0 000A66F0 98 05 80 00 */ stb r0, -0x8000(r5) +/* 800A97B4 000A66F4 54 C0 00 3A */ rlwinm r0, r6, 0, 0, 0x1d +/* 800A97B8 000A66F8 90 05 80 00 */ stw r0, -0x8000(r5) +lbl_800A97BC: +/* 800A97BC 000A66FC 80 CD 82 C8 */ lwz r6, gx@sda21(r13) +/* 800A97C0 000A6700 38 00 00 00 */ li r0, 0 +/* 800A97C4 000A6704 88 A6 02 00 */ lbz r5, 0x200(r6) +/* 800A97C8 000A6708 80 E6 01 DC */ lwz r7, 0x1dc(r6) +/* 800A97CC 000A670C 28 05 00 00 */ cmplwi r5, 0 +/* 800A97D0 000A6710 41 82 00 1C */ beq lbl_800A97EC +/* 800A97D4 000A6714 54 E5 07 7E */ clrlwi r5, r7, 0x1d +/* 800A97D8 000A6718 28 05 00 03 */ cmplwi r5, 3 +/* 800A97DC 000A671C 41 82 00 10 */ beq lbl_800A97EC +/* 800A97E0 000A6720 54 E0 00 38 */ rlwinm r0, r7, 0, 0, 0x1c +/* 800A97E4 000A6724 60 07 00 03 */ ori r7, r0, 3 +/* 800A97E8 000A6728 38 00 00 01 */ li r0, 1 +lbl_800A97EC: +/* 800A97EC 000A672C 54 85 06 3F */ clrlwi. r5, r4, 0x18 +/* 800A97F0 000A6730 40 82 00 10 */ bne lbl_800A9800 +/* 800A97F4 000A6734 54 E5 07 7E */ clrlwi r5, r7, 0x1d +/* 800A97F8 000A6738 28 05 00 03 */ cmplwi r5, 3 +/* 800A97FC 000A673C 40 82 00 18 */ bne lbl_800A9814 +lbl_800A9800: +/* 800A9800 000A6740 54 E5 D7 FE */ rlwinm r5, r7, 0x1a, 0x1f, 0x1f +/* 800A9804 000A6744 28 05 00 01 */ cmplwi r5, 1 +/* 800A9808 000A6748 40 82 00 0C */ bne lbl_800A9814 +/* 800A980C 000A674C 38 00 00 01 */ li r0, 1 +/* 800A9810 000A6750 54 E7 06 B0 */ rlwinm r7, r7, 0, 0x1a, 0x18 +lbl_800A9814: +/* 800A9814 000A6754 54 05 06 3F */ clrlwi. r5, r0, 0x18 +/* 800A9818 000A6758 41 82 00 14 */ beq lbl_800A982C +/* 800A981C 000A675C 38 C0 00 61 */ li r6, 0x61 +/* 800A9820 000A6760 3C A0 CC 01 */ lis r5, 0xCC008000@ha +/* 800A9824 000A6764 98 C5 80 00 */ stb r6, 0xCC008000@l(r5) +/* 800A9828 000A6768 90 E5 80 00 */ stw r7, -0x8000(r5) +lbl_800A982C: +/* 800A982C 000A676C 39 20 00 61 */ li r9, 0x61 +/* 800A9830 000A6770 80 ED 82 C8 */ lwz r7, gx@sda21(r13) +/* 800A9834 000A6774 3D 00 CC 01 */ lis r8, 0xCC008000@ha +/* 800A9838 000A6778 99 28 80 00 */ stb r9, 0xCC008000@l(r8) +/* 800A983C 000A677C 54 63 DA 3E */ rlwinm r3, r3, 0x1b, 8, 0x1f +/* 800A9840 000A6780 64 6A 4B 00 */ oris r10, r3, 0x4b00 +/* 800A9844 000A6784 80 C7 01 F0 */ lwz r6, 0x1f0(r7) +/* 800A9848 000A6788 54 85 06 3F */ clrlwi. r5, r4, 0x18 +/* 800A984C 000A678C 54 83 5B 68 */ rlwinm r3, r4, 0xb, 0xd, 0x14 +/* 800A9850 000A6790 90 C8 80 00 */ stw r6, -0x8000(r8) +/* 800A9854 000A6794 99 28 80 00 */ stb r9, -0x8000(r8) +/* 800A9858 000A6798 80 87 01 F4 */ lwz r4, 0x1f4(r7) +/* 800A985C 000A679C 90 88 80 00 */ stw r4, -0x8000(r8) +/* 800A9860 000A67A0 99 28 80 00 */ stb r9, -0x8000(r8) +/* 800A9864 000A67A4 80 87 01 F8 */ lwz r4, 0x1f8(r7) +/* 800A9868 000A67A8 90 88 80 00 */ stw r4, -0x8000(r8) +/* 800A986C 000A67AC 99 28 80 00 */ stb r9, -0x8000(r8) +/* 800A9870 000A67B0 91 48 80 00 */ stw r10, -0x8000(r8) +/* 800A9874 000A67B4 80 87 01 FC */ lwz r4, 0x1fc(r7) +/* 800A9878 000A67B8 54 84 05 66 */ rlwinm r4, r4, 0, 0x15, 0x13 +/* 800A987C 000A67BC 7C 83 1B 78 */ or r3, r4, r3 +/* 800A9880 000A67C0 90 67 01 FC */ stw r3, 0x1fc(r7) +/* 800A9884 000A67C4 80 6D 82 C8 */ lwz r3, gx@sda21(r13) +/* 800A9888 000A67C8 38 83 01 FC */ addi r4, r3, 0x1fc +/* 800A988C 000A67CC 80 63 01 FC */ lwz r3, 0x1fc(r3) +/* 800A9890 000A67D0 54 63 04 A0 */ rlwinm r3, r3, 0, 0x12, 0x10 +/* 800A9894 000A67D4 90 64 00 00 */ stw r3, 0(r4) +/* 800A9898 000A67D8 80 6D 82 C8 */ lwz r3, gx@sda21(r13) +/* 800A989C 000A67DC 38 83 01 FC */ addi r4, r3, 0x1fc +/* 800A98A0 000A67E0 80 63 01 FC */ lwz r3, 0x1fc(r3) +/* 800A98A4 000A67E4 54 63 02 3E */ clrlwi r3, r3, 8 +/* 800A98A8 000A67E8 64 63 52 00 */ oris r3, r3, 0x5200 +/* 800A98AC 000A67EC 90 64 00 00 */ stw r3, 0(r4) +/* 800A98B0 000A67F0 99 28 80 00 */ stb r9, -0x8000(r8) +/* 800A98B4 000A67F4 80 8D 82 C8 */ lwz r4, gx@sda21(r13) +/* 800A98B8 000A67F8 80 64 01 FC */ lwz r3, 0x1fc(r4) +/* 800A98BC 000A67FC 90 68 80 00 */ stw r3, -0x8000(r8) +/* 800A98C0 000A6800 41 82 00 1C */ beq lbl_800A98DC +/* 800A98C4 000A6804 99 28 80 00 */ stb r9, -0x8000(r8) +/* 800A98C8 000A6808 80 64 01 D8 */ lwz r3, 0x1d8(r4) +/* 800A98CC 000A680C 90 68 80 00 */ stw r3, -0x8000(r8) +/* 800A98D0 000A6810 99 28 80 00 */ stb r9, -0x8000(r8) +/* 800A98D4 000A6814 80 64 01 D0 */ lwz r3, 0x1d0(r4) +/* 800A98D8 000A6818 90 68 80 00 */ stw r3, -0x8000(r8) +lbl_800A98DC: +/* 800A98DC 000A681C 54 00 06 3F */ clrlwi. r0, r0, 0x18 +/* 800A98E0 000A6820 41 82 00 1C */ beq lbl_800A98FC +/* 800A98E4 000A6824 38 00 00 61 */ li r0, 0x61 +/* 800A98E8 000A6828 80 6D 82 C8 */ lwz r3, gx@sda21(r13) +/* 800A98EC 000A682C 3C 80 CC 01 */ lis r4, 0xCC008000@ha +/* 800A98F0 000A6830 98 04 80 00 */ stb r0, 0xCC008000@l(r4) +/* 800A98F4 000A6834 80 03 01 DC */ lwz r0, 0x1dc(r3) +/* 800A98F8 000A6838 90 04 80 00 */ stw r0, -0x8000(r4) +lbl_800A98FC: +/* 800A98FC 000A683C 80 6D 82 C8 */ lwz r3, gx@sda21(r13) +/* 800A9900 000A6840 38 00 00 00 */ li r0, 0 +/* 800A9904 000A6844 B0 03 00 02 */ sth r0, 2(r3) +/* 800A9908 000A6848 4E 80 00 20 */ blr + +.global GXClearBoundingBox +GXClearBoundingBox: +/* 800A990C 000A684C 38 C0 00 61 */ li r6, 0x61 +/* 800A9910 000A6850 80 6D 82 C8 */ lwz r3, gx@sda21(r13) +/* 800A9914 000A6854 3C A0 CC 01 */ lis r5, 0xCC008000@ha +/* 800A9918 000A6858 3C 80 55 00 */ lis r4, 0x550003FF@ha +/* 800A991C 000A685C 98 C5 80 00 */ stb r6, 0xCC008000@l(r5) +/* 800A9920 000A6860 38 04 03 FF */ addi r0, r4, 0x550003FF@l +/* 800A9924 000A6864 90 05 80 00 */ stw r0, -0x8000(r5) +/* 800A9928 000A6868 3C 80 56 00 */ lis r4, 0x560003FF@ha +/* 800A992C 000A686C 38 84 03 FF */ addi r4, r4, 0x560003FF@l +/* 800A9930 000A6870 98 C5 80 00 */ stb r6, -0x8000(r5) +/* 800A9934 000A6874 38 00 00 00 */ li r0, 0 +/* 800A9938 000A6878 90 85 80 00 */ stw r4, -0x8000(r5) +/* 800A993C 000A687C B0 03 00 02 */ sth r0, 2(r3) +/* 800A9940 000A6880 4E 80 00 20 */ blr + +.section .data, "wa" # 0x803A8380 - 0x803E6000 + .balign 8 +.global GXNtsc480IntDf +GXNtsc480IntDf: + .4byte 0 + .4byte 0x028001E0 + .4byte 0x01E00028 + .4byte 0x00000280 + .4byte 0x01E00000 + .4byte 0x00000001 + .4byte 0x00000606 + .4byte 0x06060606 + .4byte 0x06060606 + .4byte 0x06060606 + .4byte 0x06060606 + .4byte 0x06060606 + .4byte 0x06060808 + .4byte 0x0A0C0A08 + .4byte 0x08000000 +.global GXNtsc480Int +GXNtsc480Int: + .4byte 0 + .4byte 0x028001E0 + .4byte 0x01E00028 + .4byte 0x00000280 + .4byte 0x01E00000 + .4byte 0x00000001 + .4byte 0x00000606 + .4byte 0x06060606 + .4byte 0x06060606 + .4byte 0x06060606 + .4byte 0x06060606 + .4byte 0x06060606 + .4byte 0x06060000 + .4byte 0x15161500 + .4byte 0 +.global GXMpal480IntDf +GXMpal480IntDf: + .4byte 0x00000008 + .4byte 0x028001E0 + .4byte 0x01E00028 + .4byte 0x00000280 + .4byte 0x01E00000 + .4byte 0x00000001 + .4byte 0x00000606 + .4byte 0x06060606 + .4byte 0x06060606 + .4byte 0x06060606 + .4byte 0x06060606 + .4byte 0x06060606 + .4byte 0x06060808 + .4byte 0x0A0C0A08 + .4byte 0x08000000 +.global GXPal528IntDf +GXPal528IntDf: + .4byte 0x00000004 + .4byte 0x02800210 + .4byte 0x02100028 + .4byte 0x00170280 + .4byte 0x02100000 + .4byte 0x00000001 + .4byte 0x00000606 + .4byte 0x06060606 + .4byte 0x06060606 + .4byte 0x06060606 + .4byte 0x06060606 + .4byte 0x06060606 + .4byte 0x06060808 + .4byte 0x0A0C0A08 + .4byte 0x08000000 +.global GXEurgb60Hz480IntDf +GXEurgb60Hz480IntDf: + .4byte 0x00000014 + .4byte 0x028001E0 + .4byte 0x01E00028 + .4byte 0x00000280 + .4byte 0x01E00000 + .4byte 0x00000001 + .4byte 0x00000606 + .4byte 0x06060606 + .4byte 0x06060606 + .4byte 0x06060606 + .4byte 0x06060606 + .4byte 0x06060606 + .4byte 0x06060808 + .4byte 0x0A0C0A08 + .4byte 0x08000000 + .4byte 0 + +.section .sdata2, "a" # 0x8040B460 - 0x80414020 +.balign 8 +"@83": + .4byte 0x43800000 + .4byte 0 +"@138": + .4byte 0x43300000 + .4byte 0 diff --git a/asm/Dolphin/gx/GXGeometry.s b/asm/Dolphin/gx/GXGeometry.s new file mode 100644 index 0000000..995f3bc --- /dev/null +++ b/asm/Dolphin/gx/GXGeometry.s @@ -0,0 +1,298 @@ +.include "macros.inc" + +.section .text, "ax" # 0x80005600 - 0x8036FBA0 +.global __GXSetDirtyState +__GXSetDirtyState: +/* 800A8808 000A5748 7C 08 02 A6 */ mflr r0 +/* 800A880C 000A574C 90 01 00 04 */ stw r0, 4(r1) +/* 800A8810 000A5750 94 21 FF F8 */ stwu r1, -8(r1) +/* 800A8814 000A5754 80 6D 82 C8 */ lwz r3, gx@sda21(r13) +/* 800A8818 000A5758 80 03 04 F4 */ lwz r0, 0x4f4(r3) +/* 800A881C 000A575C 54 00 07 FF */ clrlwi. r0, r0, 0x1f +/* 800A8820 000A5760 41 82 00 08 */ beq lbl_800A8828 +/* 800A8824 000A5764 48 00 27 59 */ bl __GXSetSUTexRegs +lbl_800A8828: +/* 800A8828 000A5768 80 6D 82 C8 */ lwz r3, gx@sda21(r13) +/* 800A882C 000A576C 80 03 04 F4 */ lwz r0, 0x4f4(r3) +/* 800A8830 000A5770 54 00 07 BD */ rlwinm. r0, r0, 0, 0x1e, 0x1e +/* 800A8834 000A5774 41 82 00 08 */ beq lbl_800A883C +/* 800A8838 000A5778 48 00 30 E1 */ bl __GXUpdateBPMask +lbl_800A883C: +/* 800A883C 000A577C 80 6D 82 C8 */ lwz r3, gx@sda21(r13) +/* 800A8840 000A5780 80 03 04 F4 */ lwz r0, 0x4f4(r3) +/* 800A8844 000A5784 54 00 07 7B */ rlwinm. r0, r0, 0, 0x1d, 0x1d +/* 800A8848 000A5788 41 82 00 08 */ beq lbl_800A8850 +/* 800A884C 000A578C 48 00 03 79 */ bl __GXSetGenMode +lbl_800A8850: +/* 800A8850 000A5790 80 6D 82 C8 */ lwz r3, gx@sda21(r13) +/* 800A8854 000A5794 80 03 04 F4 */ lwz r0, 0x4f4(r3) +/* 800A8858 000A5798 54 00 07 39 */ rlwinm. r0, r0, 0, 0x1c, 0x1c +/* 800A885C 000A579C 41 82 00 08 */ beq lbl_800A8864 +/* 800A8860 000A57A0 4B FF E7 6D */ bl __GXSetVCD +lbl_800A8864: +/* 800A8864 000A57A4 80 6D 82 C8 */ lwz r3, gx@sda21(r13) +/* 800A8868 000A57A8 80 03 04 F4 */ lwz r0, 0x4f4(r3) +/* 800A886C 000A57AC 54 00 06 F7 */ rlwinm. r0, r0, 0, 0x1b, 0x1b +/* 800A8870 000A57B0 41 82 00 08 */ beq lbl_800A8878 +/* 800A8874 000A57B4 4B FF F2 19 */ bl __GXSetVAT +lbl_800A8878: +/* 800A8878 000A57B8 80 6D 82 C8 */ lwz r3, gx@sda21(r13) +/* 800A887C 000A57BC 80 03 04 F4 */ lwz r0, 0x4f4(r3) +/* 800A8880 000A57C0 54 00 06 F9 */ rlwinm. r0, r0, 0, 0x1b, 0x1c +/* 800A8884 000A57C4 41 82 00 08 */ beq lbl_800A888C +/* 800A8888 000A57C8 4B FF E7 99 */ bl __GXCalculateVLim +lbl_800A888C: +/* 800A888C 000A57CC 80 6D 82 C8 */ lwz r3, gx@sda21(r13) +/* 800A8890 000A57D0 38 00 00 00 */ li r0, 0 +/* 800A8894 000A57D4 90 03 04 F4 */ stw r0, 0x4f4(r3) +/* 800A8898 000A57D8 80 01 00 0C */ lwz r0, 0xc(r1) +/* 800A889C 000A57DC 38 21 00 08 */ addi r1, r1, 8 +/* 800A88A0 000A57E0 7C 08 03 A6 */ mtlr r0 +/* 800A88A4 000A57E4 4E 80 00 20 */ blr + +.global GXBegin +GXBegin: +/* 800A88A8 000A57E8 7C 08 02 A6 */ mflr r0 +/* 800A88AC 000A57EC 90 01 00 04 */ stw r0, 4(r1) +/* 800A88B0 000A57F0 94 21 FF D8 */ stwu r1, -0x28(r1) +/* 800A88B4 000A57F4 93 E1 00 24 */ stw r31, 0x24(r1) +/* 800A88B8 000A57F8 3B E5 00 00 */ addi r31, r5, 0 +/* 800A88BC 000A57FC 93 C1 00 20 */ stw r30, 0x20(r1) +/* 800A88C0 000A5800 3B C4 00 00 */ addi r30, r4, 0 +/* 800A88C4 000A5804 93 A1 00 1C */ stw r29, 0x1c(r1) +/* 800A88C8 000A5808 3B A3 00 00 */ addi r29, r3, 0 +/* 800A88CC 000A580C 80 CD 82 C8 */ lwz r6, gx@sda21(r13) +/* 800A88D0 000A5810 80 06 04 F4 */ lwz r0, 0x4f4(r6) +/* 800A88D4 000A5814 28 00 00 00 */ cmplwi r0, 0 +/* 800A88D8 000A5818 41 82 00 80 */ beq lbl_800A8958 +/* 800A88DC 000A581C 54 00 07 FF */ clrlwi. r0, r0, 0x1f +/* 800A88E0 000A5820 41 82 00 08 */ beq lbl_800A88E8 +/* 800A88E4 000A5824 48 00 26 99 */ bl __GXSetSUTexRegs +lbl_800A88E8: +/* 800A88E8 000A5828 80 6D 82 C8 */ lwz r3, gx@sda21(r13) +/* 800A88EC 000A582C 80 03 04 F4 */ lwz r0, 0x4f4(r3) +/* 800A88F0 000A5830 54 00 07 BD */ rlwinm. r0, r0, 0, 0x1e, 0x1e +/* 800A88F4 000A5834 41 82 00 08 */ beq lbl_800A88FC +/* 800A88F8 000A5838 48 00 30 21 */ bl __GXUpdateBPMask +lbl_800A88FC: +/* 800A88FC 000A583C 80 6D 82 C8 */ lwz r3, gx@sda21(r13) +/* 800A8900 000A5840 80 03 04 F4 */ lwz r0, 0x4f4(r3) +/* 800A8904 000A5844 54 00 07 7B */ rlwinm. r0, r0, 0, 0x1d, 0x1d +/* 800A8908 000A5848 41 82 00 08 */ beq lbl_800A8910 +/* 800A890C 000A584C 48 00 02 B9 */ bl __GXSetGenMode +lbl_800A8910: +/* 800A8910 000A5850 80 6D 82 C8 */ lwz r3, gx@sda21(r13) +/* 800A8914 000A5854 80 03 04 F4 */ lwz r0, 0x4f4(r3) +/* 800A8918 000A5858 54 00 07 39 */ rlwinm. r0, r0, 0, 0x1c, 0x1c +/* 800A891C 000A585C 41 82 00 08 */ beq lbl_800A8924 +/* 800A8920 000A5860 4B FF E6 AD */ bl __GXSetVCD +lbl_800A8924: +/* 800A8924 000A5864 80 6D 82 C8 */ lwz r3, gx@sda21(r13) +/* 800A8928 000A5868 80 03 04 F4 */ lwz r0, 0x4f4(r3) +/* 800A892C 000A586C 54 00 06 F7 */ rlwinm. r0, r0, 0, 0x1b, 0x1b +/* 800A8930 000A5870 41 82 00 08 */ beq lbl_800A8938 +/* 800A8934 000A5874 4B FF F1 59 */ bl __GXSetVAT +lbl_800A8938: +/* 800A8938 000A5878 80 6D 82 C8 */ lwz r3, gx@sda21(r13) +/* 800A893C 000A587C 80 03 04 F4 */ lwz r0, 0x4f4(r3) +/* 800A8940 000A5880 54 00 06 F9 */ rlwinm. r0, r0, 0, 0x1b, 0x1c +/* 800A8944 000A5884 41 82 00 08 */ beq lbl_800A894C +/* 800A8948 000A5888 4B FF E6 D9 */ bl __GXCalculateVLim +lbl_800A894C: +/* 800A894C 000A588C 80 6D 82 C8 */ lwz r3, gx@sda21(r13) +/* 800A8950 000A5890 38 00 00 00 */ li r0, 0 +/* 800A8954 000A5894 90 03 04 F4 */ stw r0, 0x4f4(r3) +lbl_800A8958: +/* 800A8958 000A5898 80 6D 82 C8 */ lwz r3, gx@sda21(r13) +/* 800A895C 000A589C 80 03 00 00 */ lwz r0, 0(r3) +/* 800A8960 000A58A0 28 00 00 00 */ cmplwi r0, 0 +/* 800A8964 000A58A4 40 82 00 08 */ bne lbl_800A896C +/* 800A8968 000A58A8 48 00 00 31 */ bl __GXSendFlushPrim +lbl_800A896C: +/* 800A896C 000A58AC 7F C0 EB 78 */ or r0, r30, r29 +/* 800A8970 000A58B0 3C 60 CC 01 */ lis r3, 0xCC008000@ha +/* 800A8974 000A58B4 98 03 80 00 */ stb r0, 0xCC008000@l(r3) +/* 800A8978 000A58B8 B3 E3 80 00 */ sth r31, -0x8000(r3) +/* 800A897C 000A58BC 80 01 00 2C */ lwz r0, 0x2c(r1) +/* 800A8980 000A58C0 83 E1 00 24 */ lwz r31, 0x24(r1) +/* 800A8984 000A58C4 83 C1 00 20 */ lwz r30, 0x20(r1) +/* 800A8988 000A58C8 83 A1 00 1C */ lwz r29, 0x1c(r1) +/* 800A898C 000A58CC 38 21 00 28 */ addi r1, r1, 0x28 +/* 800A8990 000A58D0 7C 08 03 A6 */ mtlr r0 +/* 800A8994 000A58D4 4E 80 00 20 */ blr + +.global __GXSendFlushPrim +__GXSendFlushPrim: +/* 800A8998 000A58D8 80 6D 82 C8 */ lwz r3, gx@sda21(r13) +/* 800A899C 000A58DC 38 00 00 98 */ li r0, 0x98 +/* 800A89A0 000A58E0 3C A0 CC 01 */ lis r5, 0xCC008000@ha +/* 800A89A4 000A58E4 A0 C3 00 04 */ lhz r6, 4(r3) +/* 800A89A8 000A58E8 38 80 00 00 */ li r4, 0 +/* 800A89AC 000A58EC A0 63 00 06 */ lhz r3, 6(r3) +/* 800A89B0 000A58F0 7C E6 19 D6 */ mullw r7, r6, r3 +/* 800A89B4 000A58F4 98 05 80 00 */ stb r0, 0xCC008000@l(r5) +/* 800A89B8 000A58F8 B0 C5 80 00 */ sth r6, -0x8000(r5) +/* 800A89BC 000A58FC 38 67 00 03 */ addi r3, r7, 3 +/* 800A89C0 000A5900 28 07 00 00 */ cmplwi r7, 0 +/* 800A89C4 000A5904 54 63 F0 BE */ srwi r3, r3, 2 +/* 800A89C8 000A5908 40 81 00 48 */ ble lbl_800A8A10 +/* 800A89CC 000A590C 54 60 E8 FF */ rlwinm. r0, r3, 0x1d, 3, 0x1f +/* 800A89D0 000A5910 7C 09 03 A6 */ mtctr r0 +/* 800A89D4 000A5914 41 82 00 30 */ beq lbl_800A8A04 +lbl_800A89D8: +/* 800A89D8 000A5918 90 85 80 00 */ stw r4, -0x8000(r5) +/* 800A89DC 000A591C 90 85 80 00 */ stw r4, -0x8000(r5) +/* 800A89E0 000A5920 90 85 80 00 */ stw r4, -0x8000(r5) +/* 800A89E4 000A5924 90 85 80 00 */ stw r4, -0x8000(r5) +/* 800A89E8 000A5928 90 85 80 00 */ stw r4, -0x8000(r5) +/* 800A89EC 000A592C 90 85 80 00 */ stw r4, -0x8000(r5) +/* 800A89F0 000A5930 90 85 80 00 */ stw r4, -0x8000(r5) +/* 800A89F4 000A5934 90 85 80 00 */ stw r4, -0x8000(r5) +/* 800A89F8 000A5938 42 00 FF E0 */ bdnz lbl_800A89D8 +/* 800A89FC 000A593C 70 63 00 07 */ andi. r3, r3, 7 +/* 800A8A00 000A5940 41 82 00 10 */ beq lbl_800A8A10 +lbl_800A8A04: +/* 800A8A04 000A5944 7C 69 03 A6 */ mtctr r3 +lbl_800A8A08: +/* 800A8A08 000A5948 90 85 80 00 */ stw r4, -0x8000(r5) +/* 800A8A0C 000A594C 42 00 FF FC */ bdnz lbl_800A8A08 +lbl_800A8A10: +/* 800A8A10 000A5950 80 6D 82 C8 */ lwz r3, gx@sda21(r13) +/* 800A8A14 000A5954 38 00 00 01 */ li r0, 1 +/* 800A8A18 000A5958 B0 03 00 02 */ sth r0, 2(r3) +/* 800A8A1C 000A595C 4E 80 00 20 */ blr + +.global GXSetLineWidth +GXSetLineWidth: +/* 800A8A20 000A5960 80 AD 82 C8 */ lwz r5, gx@sda21(r13) +/* 800A8A24 000A5964 54 86 80 1E */ slwi r6, r4, 0x10 +/* 800A8A28 000A5968 38 80 00 61 */ li r4, 0x61 +/* 800A8A2C 000A596C 80 05 00 7C */ lwz r0, 0x7c(r5) +/* 800A8A30 000A5970 38 E5 00 7C */ addi r7, r5, 0x7c +/* 800A8A34 000A5974 3C A0 CC 01 */ lis r5, 0xCC008000@ha +/* 800A8A38 000A5978 54 00 00 2E */ rlwinm r0, r0, 0, 0, 0x17 +/* 800A8A3C 000A597C 50 60 06 3E */ rlwimi r0, r3, 0, 0x18, 0x1f +/* 800A8A40 000A5980 90 07 00 00 */ stw r0, 0(r7) +/* 800A8A44 000A5984 38 00 00 00 */ li r0, 0 +/* 800A8A48 000A5988 80 6D 82 C8 */ lwz r3, gx@sda21(r13) +/* 800A8A4C 000A598C 38 E3 00 7C */ addi r7, r3, 0x7c +/* 800A8A50 000A5990 80 63 00 7C */ lwz r3, 0x7c(r3) +/* 800A8A54 000A5994 54 63 04 18 */ rlwinm r3, r3, 0, 0x10, 0xc +/* 800A8A58 000A5998 7C 63 33 78 */ or r3, r3, r6 +/* 800A8A5C 000A599C 90 67 00 00 */ stw r3, 0(r7) +/* 800A8A60 000A59A0 98 85 80 00 */ stb r4, 0xCC008000@l(r5) +/* 800A8A64 000A59A4 80 8D 82 C8 */ lwz r4, gx@sda21(r13) +/* 800A8A68 000A59A8 80 64 00 7C */ lwz r3, 0x7c(r4) +/* 800A8A6C 000A59AC 90 65 80 00 */ stw r3, -0x8000(r5) +/* 800A8A70 000A59B0 B0 04 00 02 */ sth r0, 2(r4) +/* 800A8A74 000A59B4 4E 80 00 20 */ blr + +.global GXSetPointSize +GXSetPointSize: +/* 800A8A78 000A59B8 80 AD 82 C8 */ lwz r5, gx@sda21(r13) +/* 800A8A7C 000A59BC 54 86 98 18 */ slwi r6, r4, 0x13 +/* 800A8A80 000A59C0 84 05 00 7C */ lwzu r0, 0x7c(r5) +/* 800A8A84 000A59C4 38 80 00 61 */ li r4, 0x61 +/* 800A8A88 000A59C8 54 00 06 1E */ rlwinm r0, r0, 0, 0x18, 0xf +/* 800A8A8C 000A59CC 50 60 44 2E */ rlwimi r0, r3, 8, 0x10, 0x17 +/* 800A8A90 000A59D0 90 05 00 00 */ stw r0, 0(r5) +/* 800A8A94 000A59D4 3C A0 CC 01 */ lis r5, 0xCC008000@ha +/* 800A8A98 000A59D8 38 00 00 00 */ li r0, 0 +/* 800A8A9C 000A59DC 80 6D 82 C8 */ lwz r3, gx@sda21(r13) +/* 800A8AA0 000A59E0 38 E3 00 7C */ addi r7, r3, 0x7c +/* 800A8AA4 000A59E4 80 63 00 7C */ lwz r3, 0x7c(r3) +/* 800A8AA8 000A59E8 54 63 03 52 */ rlwinm r3, r3, 0, 0xd, 9 +/* 800A8AAC 000A59EC 7C 63 33 78 */ or r3, r3, r6 +/* 800A8AB0 000A59F0 90 67 00 00 */ stw r3, 0(r7) +/* 800A8AB4 000A59F4 98 85 80 00 */ stb r4, 0xCC008000@l(r5) +/* 800A8AB8 000A59F8 80 8D 82 C8 */ lwz r4, gx@sda21(r13) +/* 800A8ABC 000A59FC 80 64 00 7C */ lwz r3, 0x7c(r4) +/* 800A8AC0 000A5A00 90 65 80 00 */ stw r3, -0x8000(r5) +/* 800A8AC4 000A5A04 B0 04 00 02 */ sth r0, 2(r4) +/* 800A8AC8 000A5A08 4E 80 00 20 */ blr + +.global GXEnableTexOffsets +GXEnableTexOffsets: +/* 800A8ACC 000A5A0C 80 0D 82 C8 */ lwz r0, gx@sda21(r13) +/* 800A8AD0 000A5A10 54 67 10 3A */ slwi r7, r3, 2 +/* 800A8AD4 000A5A14 7C C0 3A 14 */ add r6, r0, r7 +/* 800A8AD8 000A5A18 80 66 00 B8 */ lwz r3, 0xb8(r6) +/* 800A8ADC 000A5A1C 54 80 91 9A */ rlwinm r0, r4, 0x12, 6, 0xd +/* 800A8AE0 000A5A20 54 A4 99 58 */ rlwinm r4, r5, 0x13, 5, 0xc +/* 800A8AE4 000A5A24 54 63 03 98 */ rlwinm r3, r3, 0, 0xe, 0xc +/* 800A8AE8 000A5A28 7C 60 03 78 */ or r0, r3, r0 +/* 800A8AEC 000A5A2C 90 06 00 B8 */ stw r0, 0xb8(r6) +/* 800A8AF0 000A5A30 38 60 00 61 */ li r3, 0x61 +/* 800A8AF4 000A5A34 3C A0 CC 01 */ lis r5, 0xCC008000@ha +/* 800A8AF8 000A5A38 80 CD 82 C8 */ lwz r6, gx@sda21(r13) +/* 800A8AFC 000A5A3C 38 00 00 00 */ li r0, 0 +/* 800A8B00 000A5A40 7D 06 3A 14 */ add r8, r6, r7 +/* 800A8B04 000A5A44 80 C8 00 B8 */ lwz r6, 0xb8(r8) +/* 800A8B08 000A5A48 54 C6 03 56 */ rlwinm r6, r6, 0, 0xd, 0xb +/* 800A8B0C 000A5A4C 7C C4 23 78 */ or r4, r6, r4 +/* 800A8B10 000A5A50 90 88 00 B8 */ stw r4, 0xb8(r8) +/* 800A8B14 000A5A54 80 8D 82 C8 */ lwz r4, gx@sda21(r13) +/* 800A8B18 000A5A58 98 65 80 00 */ stb r3, 0xCC008000@l(r5) +/* 800A8B1C 000A5A5C 7C 64 3A 14 */ add r3, r4, r7 +/* 800A8B20 000A5A60 80 63 00 B8 */ lwz r3, 0xb8(r3) +/* 800A8B24 000A5A64 90 65 80 00 */ stw r3, -0x8000(r5) +/* 800A8B28 000A5A68 B0 04 00 02 */ sth r0, 2(r4) +/* 800A8B2C 000A5A6C 4E 80 00 20 */ blr + +.global GXSetCullMode +GXSetCullMode: +/* 800A8B30 000A5A70 2C 03 00 02 */ cmpwi r3, 2 +/* 800A8B34 000A5A74 41 82 00 1C */ beq lbl_800A8B50 +/* 800A8B38 000A5A78 40 80 00 1C */ bge lbl_800A8B54 +/* 800A8B3C 000A5A7C 2C 03 00 01 */ cmpwi r3, 1 +/* 800A8B40 000A5A80 40 80 00 08 */ bge lbl_800A8B48 +/* 800A8B44 000A5A84 48 00 00 10 */ b lbl_800A8B54 +lbl_800A8B48: +/* 800A8B48 000A5A88 38 60 00 02 */ li r3, 2 +/* 800A8B4C 000A5A8C 48 00 00 08 */ b lbl_800A8B54 +lbl_800A8B50: +/* 800A8B50 000A5A90 38 60 00 01 */ li r3, 1 +lbl_800A8B54: +/* 800A8B54 000A5A94 80 8D 82 C8 */ lwz r4, gx@sda21(r13) +/* 800A8B58 000A5A98 54 60 70 22 */ slwi r0, r3, 0xe +/* 800A8B5C 000A5A9C 84 64 02 04 */ lwzu r3, 0x204(r4) +/* 800A8B60 000A5AA0 54 63 04 9E */ rlwinm r3, r3, 0, 0x12, 0xf +/* 800A8B64 000A5AA4 7C 60 03 78 */ or r0, r3, r0 +/* 800A8B68 000A5AA8 90 04 00 00 */ stw r0, 0(r4) +/* 800A8B6C 000A5AAC 80 6D 82 C8 */ lwz r3, gx@sda21(r13) +/* 800A8B70 000A5AB0 80 03 04 F4 */ lwz r0, 0x4f4(r3) +/* 800A8B74 000A5AB4 60 00 00 04 */ ori r0, r0, 4 +/* 800A8B78 000A5AB8 90 03 04 F4 */ stw r0, 0x4f4(r3) +/* 800A8B7C 000A5ABC 4E 80 00 20 */ blr + +.global GXSetCoPlanar +GXSetCoPlanar: +/* 800A8B80 000A5AC0 80 8D 82 C8 */ lwz r4, gx@sda21(r13) +/* 800A8B84 000A5AC4 54 60 99 58 */ rlwinm r0, r3, 0x13, 5, 0xc +/* 800A8B88 000A5AC8 38 A0 00 61 */ li r5, 0x61 +/* 800A8B8C 000A5ACC 80 64 02 04 */ lwz r3, 0x204(r4) +/* 800A8B90 000A5AD0 38 C4 02 04 */ addi r6, r4, 0x204 +/* 800A8B94 000A5AD4 3C 80 CC 01 */ lis r4, 0xCC008000@ha +/* 800A8B98 000A5AD8 54 63 03 56 */ rlwinm r3, r3, 0, 0xd, 0xb +/* 800A8B9C 000A5ADC 7C 60 03 78 */ or r0, r3, r0 +/* 800A8BA0 000A5AE0 90 06 00 00 */ stw r0, 0(r6) +/* 800A8BA4 000A5AE4 3C 00 FE 08 */ lis r0, 0xfe08 +/* 800A8BA8 000A5AE8 98 A4 80 00 */ stb r5, 0xCC008000@l(r4) +/* 800A8BAC 000A5AEC 80 6D 82 C8 */ lwz r3, gx@sda21(r13) +/* 800A8BB0 000A5AF0 90 04 80 00 */ stw r0, -0x8000(r4) +/* 800A8BB4 000A5AF4 98 A4 80 00 */ stb r5, -0x8000(r4) +/* 800A8BB8 000A5AF8 80 03 02 04 */ lwz r0, 0x204(r3) +/* 800A8BBC 000A5AFC 90 04 80 00 */ stw r0, -0x8000(r4) +/* 800A8BC0 000A5B00 4E 80 00 20 */ blr + +.global __GXSetGenMode +__GXSetGenMode: +/* 800A8BC4 000A5B04 38 00 00 61 */ li r0, 0x61 +/* 800A8BC8 000A5B08 80 8D 82 C8 */ lwz r4, gx@sda21(r13) +/* 800A8BCC 000A5B0C 3C A0 CC 01 */ lis r5, 0xCC008000@ha +/* 800A8BD0 000A5B10 98 05 80 00 */ stb r0, 0xCC008000@l(r5) +/* 800A8BD4 000A5B14 38 00 00 00 */ li r0, 0 +/* 800A8BD8 000A5B18 80 64 02 04 */ lwz r3, 0x204(r4) +/* 800A8BDC 000A5B1C 90 65 80 00 */ stw r3, -0x8000(r5) +/* 800A8BE0 000A5B20 B0 04 00 02 */ sth r0, 2(r4) +/* 800A8BE4 000A5B24 4E 80 00 20 */ blr diff --git a/asm/Dolphin/gx/GXInit.s b/asm/Dolphin/gx/GXInit.s new file mode 100644 index 0000000..55e6ea1 --- /dev/null +++ b/asm/Dolphin/gx/GXInit.s @@ -0,0 +1,1184 @@ +.include "macros.inc" + +.section .text, "ax" # 0x80005600 - 0x8036FBA0 +.global __GXDefaultTexRegionCallback +__GXDefaultTexRegionCallback: +/* 800A4EE4 000A1E24 7C 08 02 A6 */ mflr r0 +/* 800A4EE8 000A1E28 90 01 00 04 */ stw r0, 4(r1) +/* 800A4EEC 000A1E2C 94 21 FF F8 */ stwu r1, -8(r1) +/* 800A4EF0 000A1E30 48 00 59 E1 */ bl GXGetTexObjFmt +/* 800A4EF4 000A1E34 2C 03 00 08 */ cmpwi r3, 8 +/* 800A4EF8 000A1E38 41 82 00 38 */ beq lbl_800A4F30 +/* 800A4EFC 000A1E3C 2C 03 00 09 */ cmpwi r3, 9 +/* 800A4F00 000A1E40 41 82 00 30 */ beq lbl_800A4F30 +/* 800A4F04 000A1E44 2C 03 00 0A */ cmpwi r3, 0xa +/* 800A4F08 000A1E48 41 82 00 28 */ beq lbl_800A4F30 +/* 800A4F0C 000A1E4C 80 AD 82 C8 */ lwz r5, gx@sda21(r13) +/* 800A4F10 000A1E50 80 65 02 C8 */ lwz r3, 0x2c8(r5) +/* 800A4F14 000A1E54 54 60 07 7E */ clrlwi r0, r3, 0x1d +/* 800A4F18 000A1E58 38 83 00 01 */ addi r4, r3, 1 +/* 800A4F1C 000A1E5C 54 03 20 36 */ slwi r3, r0, 4 +/* 800A4F20 000A1E60 90 85 02 C8 */ stw r4, 0x2c8(r5) +/* 800A4F24 000A1E64 38 63 02 08 */ addi r3, r3, 0x208 +/* 800A4F28 000A1E68 7C 65 1A 14 */ add r3, r5, r3 +/* 800A4F2C 000A1E6C 48 00 00 24 */ b lbl_800A4F50 +lbl_800A4F30: +/* 800A4F30 000A1E70 80 AD 82 C8 */ lwz r5, gx@sda21(r13) +/* 800A4F34 000A1E74 80 65 02 CC */ lwz r3, 0x2cc(r5) +/* 800A4F38 000A1E78 54 60 07 BE */ clrlwi r0, r3, 0x1e +/* 800A4F3C 000A1E7C 38 83 00 01 */ addi r4, r3, 1 +/* 800A4F40 000A1E80 54 03 20 36 */ slwi r3, r0, 4 +/* 800A4F44 000A1E84 90 85 02 CC */ stw r4, 0x2cc(r5) +/* 800A4F48 000A1E88 38 63 02 88 */ addi r3, r3, 0x288 +/* 800A4F4C 000A1E8C 7C 65 1A 14 */ add r3, r5, r3 +lbl_800A4F50: +/* 800A4F50 000A1E90 80 01 00 0C */ lwz r0, 0xc(r1) +/* 800A4F54 000A1E94 38 21 00 08 */ addi r1, r1, 8 +/* 800A4F58 000A1E98 7C 08 03 A6 */ mtlr r0 +/* 800A4F5C 000A1E9C 4E 80 00 20 */ blr + +.global __GXDefaultTlutRegionCallback +__GXDefaultTlutRegionCallback: +/* 800A4F60 000A1EA0 28 03 00 14 */ cmplwi r3, 0x14 +/* 800A4F64 000A1EA4 41 80 00 0C */ blt lbl_800A4F70 +/* 800A4F68 000A1EA8 38 60 00 00 */ li r3, 0 +/* 800A4F6C 000A1EAC 48 00 00 14 */ b lbl_800A4F80 +lbl_800A4F70: +/* 800A4F70 000A1EB0 54 63 20 36 */ slwi r3, r3, 4 +/* 800A4F74 000A1EB4 80 0D 82 C8 */ lwz r0, gx@sda21(r13) +/* 800A4F78 000A1EB8 38 63 02 D0 */ addi r3, r3, 0x2d0 +/* 800A4F7C 000A1EBC 7C 60 1A 14 */ add r3, r0, r3 +lbl_800A4F80: +/* 800A4F80 000A1EC0 4E 80 00 20 */ blr + +.global GXInit +GXInit: +/* 800A4F84 000A1EC4 7C 08 02 A6 */ mflr r0 +/* 800A4F88 000A1EC8 90 01 00 04 */ stw r0, 4(r1) +/* 800A4F8C 000A1ECC 94 21 FF B8 */ stwu r1, -0x48(r1) +/* 800A4F90 000A1ED0 BF 41 00 30 */ stmw r26, 0x30(r1) +/* 800A4F94 000A1ED4 7C 7B 1B 78 */ mr r27, r3 +/* 800A4F98 000A1ED8 7C 9A 23 78 */ mr r26, r4 +/* 800A4F9C 000A1EDC 80 6D 82 C8 */ lwz r3, gx@sda21(r13) +/* 800A4FA0 000A1EE0 3B E0 00 00 */ li r31, 0 +/* 800A4FA4 000A1EE4 3C 80 80 3F */ lis r4, gxData@ha +/* 800A4FA8 000A1EE8 9B E3 04 F0 */ stb r31, 0x4f0(r3) +/* 800A4FAC 000A1EEC 38 00 00 01 */ li r0, 1 +/* 800A4FB0 000A1EF0 3B C4 C1 A0 */ addi r30, r4, gxData@l +/* 800A4FB4 000A1EF4 80 AD 82 C8 */ lwz r5, gx@sda21(r13) +/* 800A4FB8 000A1EF8 38 60 00 01 */ li r3, 1 +/* 800A4FBC 000A1EFC 38 80 00 00 */ li r4, 0 +/* 800A4FC0 000A1F00 98 05 04 F1 */ stb r0, 0x4f1(r5) +/* 800A4FC4 000A1F04 80 AD 82 C8 */ lwz r5, gx@sda21(r13) +/* 800A4FC8 000A1F08 93 E5 04 DC */ stw r31, 0x4dc(r5) +/* 800A4FCC 000A1F0C 80 AD 82 C8 */ lwz r5, gx@sda21(r13) +/* 800A4FD0 000A1F10 93 E5 04 E0 */ stw r31, 0x4e0(r5) +/* 800A4FD4 000A1F14 48 00 31 C5 */ bl GXSetMisc +/* 800A4FD8 000A1F18 3C 80 CC 00 */ lis r4, 0xCC003000@ha +/* 800A4FDC 000A1F1C 38 A4 30 00 */ addi r5, r4, 0xCC003000@l +/* 800A4FE0 000A1F20 90 8D 95 5C */ stw r4, __cpReg@sda21(r13) +/* 800A4FE4 000A1F24 38 64 10 00 */ addi r3, r4, 0x1000 +/* 800A4FE8 000A1F28 38 04 40 00 */ addi r0, r4, 0x4000 +/* 800A4FEC 000A1F2C 90 AD 95 58 */ stw r5, __piReg@sda21(r13) +/* 800A4FF0 000A1F30 90 6D 95 60 */ stw r3, __peReg@sda21(r13) +/* 800A4FF4 000A1F34 90 0D 95 64 */ stw r0, __memReg@sda21(r13) +/* 800A4FF8 000A1F38 48 00 16 1D */ bl __GXFifoInit +/* 800A4FFC 000A1F3C 7F 64 DB 78 */ mr r4, r27 +/* 800A5000 000A1F40 7F 45 D3 78 */ mr r5, r26 +/* 800A5004 000A1F44 38 7E 04 F8 */ addi r3, r30, 0x4f8 +/* 800A5008 000A1F48 48 00 11 09 */ bl GXInitFifoBase +/* 800A500C 000A1F4C 38 7E 04 F8 */ addi r3, r30, 0x4f8 +/* 800A5010 000A1F50 48 00 11 E9 */ bl GXSetCPUFifo +/* 800A5014 000A1F54 38 7E 04 F8 */ addi r3, r30, 0x4f8 +/* 800A5018 000A1F58 48 00 12 F1 */ bl GXSetGPFifo +/* 800A501C 000A1F5C 48 00 37 6D */ bl __GXPEInit +/* 800A5020 000A1F60 4B FE 73 D5 */ bl PPCMfhid2 +/* 800A5024 000A1F64 3C 80 0C 01 */ lis r4, 0x0C008000@ha +/* 800A5028 000A1F68 7C 7A 1B 78 */ mr r26, r3 +/* 800A502C 000A1F6C 38 64 80 00 */ addi r3, r4, 0x0C008000@l +/* 800A5030 000A1F70 4B FE 73 D5 */ bl PPCMtwpar +/* 800A5034 000A1F74 67 43 40 00 */ oris r3, r26, 0x4000 +/* 800A5038 000A1F78 4B FE 73 C5 */ bl PPCMthid2 +/* 800A503C 000A1F7C 80 6D 82 C8 */ lwz r3, gx@sda21(r13) +/* 800A5040 000A1F80 38 00 00 FF */ li r0, 0xff +/* 800A5044 000A1F84 38 E0 00 00 */ li r7, 0 +/* 800A5048 000A1F88 93 E3 02 04 */ stw r31, 0x204(r3) +/* 800A504C 000A1F8C 38 60 00 C0 */ li r3, 0xc0 +/* 800A5050 000A1F90 38 80 00 C1 */ li r4, 0xc1 +/* 800A5054 000A1F94 80 AD 82 C8 */ lwz r5, gx@sda21(r13) +/* 800A5058 000A1F98 38 C5 02 04 */ addi r6, r5, 0x204 +/* 800A505C 000A1F9C 80 A6 00 00 */ lwz r5, 0(r6) +/* 800A5060 000A1FA0 54 A5 02 3E */ clrlwi r5, r5, 8 +/* 800A5064 000A1FA4 90 A6 00 00 */ stw r5, 0(r6) +/* 800A5068 000A1FA8 80 AD 82 C8 */ lwz r5, gx@sda21(r13) +/* 800A506C 000A1FAC 90 05 01 24 */ stw r0, 0x124(r5) +/* 800A5070 000A1FB0 80 AD 82 C8 */ lwz r5, gx@sda21(r13) +/* 800A5074 000A1FB4 38 A5 01 24 */ addi r5, r5, 0x124 +/* 800A5078 000A1FB8 80 05 00 00 */ lwz r0, 0(r5) +/* 800A507C 000A1FBC 54 00 02 3E */ clrlwi r0, r0, 8 +/* 800A5080 000A1FC0 64 00 0F 00 */ oris r0, r0, 0xf00 +/* 800A5084 000A1FC4 90 05 00 00 */ stw r0, 0(r5) +/* 800A5088 000A1FC8 80 AD 82 C8 */ lwz r5, gx@sda21(r13) +/* 800A508C 000A1FCC 93 E5 00 7C */ stw r31, 0x7c(r5) +/* 800A5090 000A1FD0 80 AD 82 C8 */ lwz r5, gx@sda21(r13) +/* 800A5094 000A1FD4 38 A5 00 7C */ addi r5, r5, 0x7c +/* 800A5098 000A1FD8 80 05 00 00 */ lwz r0, 0(r5) +/* 800A509C 000A1FDC 54 00 02 3E */ clrlwi r0, r0, 8 +/* 800A50A0 000A1FE0 64 00 22 00 */ oris r0, r0, 0x2200 +/* 800A50A4 000A1FE4 90 05 00 00 */ stw r0, 0(r5) +/* 800A50A8 000A1FE8 48 00 00 04 */ b lbl_800A50AC +lbl_800A50AC: +/* 800A50AC 000A1FEC 38 00 00 10 */ li r0, 0x10 +/* 800A50B0 000A1FF0 7C 09 03 A6 */ mtctr r0 +/* 800A50B4 000A1FF4 48 00 00 04 */ b lbl_800A50B8 +lbl_800A50B8: +/* 800A50B8 000A1FF8 48 00 00 04 */ b lbl_800A50BC +lbl_800A50BC: +/* 800A50BC 000A1FFC 80 CD 82 C8 */ lwz r6, gx@sda21(r13) +/* 800A50C0 000A2000 54 E8 F8 7E */ srwi r8, r7, 1 +/* 800A50C4 000A2004 3B 5F 01 30 */ addi r26, r31, 0x130 +/* 800A50C8 000A2008 38 A0 00 00 */ li r5, 0 +/* 800A50CC 000A200C 7C A6 D1 2E */ stwx r5, r6, r26 +/* 800A50D0 000A2010 55 1C 10 3A */ slwi r28, r8, 2 +/* 800A50D4 000A2014 54 6B C0 0E */ slwi r11, r3, 0x18 +/* 800A50D8 000A2018 80 CD 82 C8 */ lwz r6, gx@sda21(r13) +/* 800A50DC 000A201C 3B 7F 01 70 */ addi r27, r31, 0x170 +/* 800A50E0 000A2020 39 9F 04 9C */ addi r12, r31, 0x49c +/* 800A50E4 000A2024 7C A6 D9 2E */ stwx r5, r6, r27 +/* 800A50E8 000A2028 54 8A C0 0E */ slwi r10, r4, 0x18 +/* 800A50EC 000A202C 39 28 00 F6 */ addi r9, r8, 0xf6 +/* 800A50F0 000A2030 80 CD 82 C8 */ lwz r6, gx@sda21(r13) +/* 800A50F4 000A2034 38 1C 01 00 */ addi r0, r28, 0x100 +/* 800A50F8 000A2038 39 08 00 28 */ addi r8, r8, 0x28 +/* 800A50FC 000A203C 7C A6 01 2E */ stwx r5, r6, r0 +/* 800A5100 000A2040 3B A0 00 FF */ li r29, 0xff +/* 800A5104 000A2044 38 DC 01 B0 */ addi r6, r28, 0x1b0 +/* 800A5108 000A2048 83 8D 82 C8 */ lwz r28, gx@sda21(r13) +/* 800A510C 000A204C 55 29 C0 0E */ slwi r9, r9, 0x18 +/* 800A5110 000A2050 55 08 C0 0E */ slwi r8, r8, 0x18 +/* 800A5114 000A2054 7F BC 61 2E */ stwx r29, r28, r12 +/* 800A5118 000A2058 3B FF 00 04 */ addi r31, r31, 4 +/* 800A511C 000A205C 38 63 00 02 */ addi r3, r3, 2 +/* 800A5120 000A2060 81 8D 82 C8 */ lwz r12, gx@sda21(r13) +/* 800A5124 000A2064 38 84 00 02 */ addi r4, r4, 2 +/* 800A5128 000A2068 38 E7 00 01 */ addi r7, r7, 1 +/* 800A512C 000A206C 7F 4C D2 14 */ add r26, r12, r26 +/* 800A5130 000A2070 81 9A 00 00 */ lwz r12, 0(r26) +/* 800A5134 000A2074 55 8C 02 3E */ clrlwi r12, r12, 8 +/* 800A5138 000A2078 7D 8B 5B 78 */ or r11, r12, r11 +/* 800A513C 000A207C 91 7A 00 00 */ stw r11, 0(r26) +/* 800A5140 000A2080 81 6D 82 C8 */ lwz r11, gx@sda21(r13) +/* 800A5144 000A2084 7D 8B DA 14 */ add r12, r11, r27 +/* 800A5148 000A2088 81 6C 00 00 */ lwz r11, 0(r12) +/* 800A514C 000A208C 55 6B 02 3E */ clrlwi r11, r11, 8 +/* 800A5150 000A2090 7D 6A 53 78 */ or r10, r11, r10 +/* 800A5154 000A2094 91 4C 00 00 */ stw r10, 0(r12) +/* 800A5158 000A2098 81 4D 82 C8 */ lwz r10, gx@sda21(r13) +/* 800A515C 000A209C 7C CA 32 14 */ add r6, r10, r6 +/* 800A5160 000A20A0 81 46 00 00 */ lwz r10, 0(r6) +/* 800A5164 000A20A4 55 4A 02 3E */ clrlwi r10, r10, 8 +/* 800A5168 000A20A8 7D 49 4B 78 */ or r9, r10, r9 +/* 800A516C 000A20AC 91 26 00 00 */ stw r9, 0(r6) +/* 800A5170 000A20B0 80 CD 82 C8 */ lwz r6, gx@sda21(r13) +/* 800A5174 000A20B4 7C C6 02 14 */ add r6, r6, r0 +/* 800A5178 000A20B8 80 06 00 00 */ lwz r0, 0(r6) +/* 800A517C 000A20BC 54 00 02 3E */ clrlwi r0, r0, 8 +/* 800A5180 000A20C0 7C 00 43 78 */ or r0, r0, r8 +/* 800A5184 000A20C4 90 06 00 00 */ stw r0, 0(r6) +/* 800A5188 000A20C8 42 00 FF 34 */ bdnz lbl_800A50BC +/* 800A518C 000A20CC 80 6D 82 C8 */ lwz r3, gx@sda21(r13) +/* 800A5190 000A20D0 39 00 00 30 */ li r8, 0x30 +/* 800A5194 000A20D4 39 20 00 31 */ li r9, 0x31 +/* 800A5198 000A20D8 90 A3 01 20 */ stw r5, 0x120(r3) +/* 800A519C 000A20DC 80 6D 82 C8 */ lwz r3, gx@sda21(r13) +/* 800A51A0 000A20E0 38 63 01 20 */ addi r3, r3, 0x120 +/* 800A51A4 000A20E4 80 03 00 00 */ lwz r0, 0(r3) +/* 800A51A8 000A20E8 54 00 02 3E */ clrlwi r0, r0, 8 +/* 800A51AC 000A20EC 64 00 27 00 */ oris r0, r0, 0x2700 +/* 800A51B0 000A20F0 90 03 00 00 */ stw r0, 0(r3) +/* 800A51B4 000A20F4 48 00 00 04 */ b lbl_800A51B8 +lbl_800A51B8: +/* 800A51B8 000A20F8 38 00 00 04 */ li r0, 4 +/* 800A51BC 000A20FC 7C 09 03 A6 */ mtctr r0 +/* 800A51C0 000A2100 48 00 00 04 */ b lbl_800A51C4 +lbl_800A51C4: +/* 800A51C4 000A2104 48 00 00 04 */ b lbl_800A51C8 +lbl_800A51C8: +/* 800A51C8 000A2108 80 6D 82 C8 */ lwz r3, gx@sda21(r13) +/* 800A51CC 000A210C 55 04 C0 0E */ slwi r4, r8, 0x18 +/* 800A51D0 000A2110 38 E5 00 B8 */ addi r7, r5, 0xb8 +/* 800A51D4 000A2114 3B A0 00 00 */ li r29, 0 +/* 800A51D8 000A2118 7F A3 39 2E */ stwx r29, r3, r7 +/* 800A51DC 000A211C 38 C5 00 D8 */ addi r6, r5, 0xd8 +/* 800A51E0 000A2120 55 20 C0 0E */ slwi r0, r9, 0x18 +/* 800A51E4 000A2124 80 6D 82 C8 */ lwz r3, gx@sda21(r13) +/* 800A51E8 000A2128 38 A5 00 04 */ addi r5, r5, 4 +/* 800A51EC 000A212C 39 08 00 02 */ addi r8, r8, 2 +/* 800A51F0 000A2130 7F A3 31 2E */ stwx r29, r3, r6 +/* 800A51F4 000A2134 39 29 00 02 */ addi r9, r9, 2 +/* 800A51F8 000A2138 80 6D 82 C8 */ lwz r3, gx@sda21(r13) +/* 800A51FC 000A213C 7D 43 3A 14 */ add r10, r3, r7 +/* 800A5200 000A2140 80 6A 00 00 */ lwz r3, 0(r10) +/* 800A5204 000A2144 38 E5 00 B8 */ addi r7, r5, 0xb8 +/* 800A5208 000A2148 54 63 02 3E */ clrlwi r3, r3, 8 +/* 800A520C 000A214C 7C 63 23 78 */ or r3, r3, r4 +/* 800A5210 000A2150 90 6A 00 00 */ stw r3, 0(r10) +/* 800A5214 000A2154 55 04 C0 0E */ slwi r4, r8, 0x18 +/* 800A5218 000A2158 39 08 00 02 */ addi r8, r8, 2 +/* 800A521C 000A215C 80 6D 82 C8 */ lwz r3, gx@sda21(r13) +/* 800A5220 000A2160 7D 43 32 14 */ add r10, r3, r6 +/* 800A5224 000A2164 80 6A 00 00 */ lwz r3, 0(r10) +/* 800A5228 000A2168 38 C5 00 D8 */ addi r6, r5, 0xd8 +/* 800A522C 000A216C 38 A5 00 04 */ addi r5, r5, 4 +/* 800A5230 000A2170 54 63 02 3E */ clrlwi r3, r3, 8 +/* 800A5234 000A2174 7C 60 03 78 */ or r0, r3, r0 +/* 800A5238 000A2178 90 0A 00 00 */ stw r0, 0(r10) +/* 800A523C 000A217C 55 20 C0 0E */ slwi r0, r9, 0x18 +/* 800A5240 000A2180 39 29 00 02 */ addi r9, r9, 2 +/* 800A5244 000A2184 80 6D 82 C8 */ lwz r3, gx@sda21(r13) +/* 800A5248 000A2188 7F A3 39 2E */ stwx r29, r3, r7 +/* 800A524C 000A218C 80 6D 82 C8 */ lwz r3, gx@sda21(r13) +/* 800A5250 000A2190 7F A3 31 2E */ stwx r29, r3, r6 +/* 800A5254 000A2194 80 6D 82 C8 */ lwz r3, gx@sda21(r13) +/* 800A5258 000A2198 7D 43 3A 14 */ add r10, r3, r7 +/* 800A525C 000A219C 80 6A 00 00 */ lwz r3, 0(r10) +/* 800A5260 000A21A0 54 63 02 3E */ clrlwi r3, r3, 8 +/* 800A5264 000A21A4 7C 63 23 78 */ or r3, r3, r4 +/* 800A5268 000A21A8 90 6A 00 00 */ stw r3, 0(r10) +/* 800A526C 000A21AC 80 6D 82 C8 */ lwz r3, gx@sda21(r13) +/* 800A5270 000A21B0 7D 43 32 14 */ add r10, r3, r6 +/* 800A5274 000A21B4 80 6A 00 00 */ lwz r3, 0(r10) +/* 800A5278 000A21B8 54 63 02 3E */ clrlwi r3, r3, 8 +/* 800A527C 000A21BC 7C 60 03 78 */ or r0, r3, r0 +/* 800A5280 000A21C0 90 0A 00 00 */ stw r0, 0(r10) +/* 800A5284 000A21C4 42 00 FF 44 */ bdnz lbl_800A51C8 +/* 800A5288 000A21C8 80 AD 82 C8 */ lwz r5, gx@sda21(r13) +/* 800A528C 000A21CC 3C 60 10 62 */ lis r3, 0x10624DD3@ha +/* 800A5290 000A21D0 3C 80 80 00 */ lis r4, 0x800000F8@ha +/* 800A5294 000A21D4 38 A5 00 F8 */ addi r5, r5, 0xf8 +/* 800A5298 000A21D8 80 05 00 00 */ lwz r0, 0(r5) +/* 800A529C 000A21DC 38 63 4D D3 */ addi r3, r3, 0x10624DD3@l +/* 800A52A0 000A21E0 54 00 02 3E */ clrlwi r0, r0, 8 +/* 800A52A4 000A21E4 64 00 20 00 */ oris r0, r0, 0x2000 +/* 800A52A8 000A21E8 90 05 00 00 */ stw r0, 0(r5) +/* 800A52AC 000A21EC 80 AD 82 C8 */ lwz r5, gx@sda21(r13) +/* 800A52B0 000A21F0 38 A5 00 FC */ addi r5, r5, 0xfc +/* 800A52B4 000A21F4 80 05 00 00 */ lwz r0, 0(r5) +/* 800A52B8 000A21F8 54 00 02 3E */ clrlwi r0, r0, 8 +/* 800A52BC 000A21FC 64 00 21 00 */ oris r0, r0, 0x2100 +/* 800A52C0 000A2200 90 05 00 00 */ stw r0, 0(r5) +/* 800A52C4 000A2204 80 AD 82 C8 */ lwz r5, gx@sda21(r13) +/* 800A52C8 000A2208 38 A5 01 D0 */ addi r5, r5, 0x1d0 +/* 800A52CC 000A220C 80 05 00 00 */ lwz r0, 0(r5) +/* 800A52D0 000A2210 54 00 02 3E */ clrlwi r0, r0, 8 +/* 800A52D4 000A2214 64 00 41 00 */ oris r0, r0, 0x4100 +/* 800A52D8 000A2218 90 05 00 00 */ stw r0, 0(r5) +/* 800A52DC 000A221C 80 AD 82 C8 */ lwz r5, gx@sda21(r13) +/* 800A52E0 000A2220 38 A5 01 D4 */ addi r5, r5, 0x1d4 +/* 800A52E4 000A2224 80 05 00 00 */ lwz r0, 0(r5) +/* 800A52E8 000A2228 54 00 02 3E */ clrlwi r0, r0, 8 +/* 800A52EC 000A222C 64 00 42 00 */ oris r0, r0, 0x4200 +/* 800A52F0 000A2230 90 05 00 00 */ stw r0, 0(r5) +/* 800A52F4 000A2234 80 AD 82 C8 */ lwz r5, gx@sda21(r13) +/* 800A52F8 000A2238 38 A5 01 D8 */ addi r5, r5, 0x1d8 +/* 800A52FC 000A223C 80 05 00 00 */ lwz r0, 0(r5) +/* 800A5300 000A2240 54 00 02 3E */ clrlwi r0, r0, 8 +/* 800A5304 000A2244 64 00 40 00 */ oris r0, r0, 0x4000 +/* 800A5308 000A2248 90 05 00 00 */ stw r0, 0(r5) +/* 800A530C 000A224C 80 AD 82 C8 */ lwz r5, gx@sda21(r13) +/* 800A5310 000A2250 38 A5 01 DC */ addi r5, r5, 0x1dc +/* 800A5314 000A2254 80 05 00 00 */ lwz r0, 0(r5) +/* 800A5318 000A2258 54 00 02 3E */ clrlwi r0, r0, 8 +/* 800A531C 000A225C 64 00 43 00 */ oris r0, r0, 0x4300 +/* 800A5320 000A2260 90 05 00 00 */ stw r0, 0(r5) +/* 800A5324 000A2264 80 AD 82 C8 */ lwz r5, gx@sda21(r13) +/* 800A5328 000A2268 38 A5 01 FC */ addi r5, r5, 0x1fc +/* 800A532C 000A226C 80 05 00 00 */ lwz r0, 0(r5) +/* 800A5330 000A2270 54 00 06 6C */ rlwinm r0, r0, 0, 0x19, 0x16 +/* 800A5334 000A2274 90 05 00 00 */ stw r0, 0(r5) +/* 800A5338 000A2278 80 AD 82 C8 */ lwz r5, gx@sda21(r13) +/* 800A533C 000A227C 93 A5 04 F4 */ stw r29, 0x4f4(r5) +/* 800A5340 000A2280 80 AD 82 C8 */ lwz r5, gx@sda21(r13) +/* 800A5344 000A2284 9B A5 04 F2 */ stb r29, 0x4f2(r5) +/* 800A5348 000A2288 80 04 00 F8 */ lwz r0, 0x800000F8@l(r4) +/* 800A534C 000A228C 7C 03 00 16 */ mulhwu r0, r3, r0 +/* 800A5350 000A2290 54 1A D9 7E */ srwi r26, r0, 5 +/* 800A5354 000A2294 48 00 66 91 */ bl __GXFlushTextureState +/* 800A5358 000A2298 57 40 AA FE */ srwi r0, r26, 0xb +/* 800A535C 000A229C 64 00 69 00 */ oris r0, r0, 0x6900 +/* 800A5360 000A22A0 3B 80 00 61 */ li r28, 0x61 +/* 800A5364 000A22A4 3F E0 CC 01 */ lis r31, 0xCC008000@ha +/* 800A5368 000A22A8 9B 9F 80 00 */ stb r28, 0xCC008000@l(r31) +/* 800A536C 000A22AC 60 00 04 00 */ ori r0, r0, 0x400 +/* 800A5370 000A22B0 90 1F 80 00 */ stw r0, -0x8000(r31) +/* 800A5374 000A22B4 48 00 66 71 */ bl __GXFlushTextureState +/* 800A5378 000A22B8 3C 60 3E 10 */ lis r3, 0x3E0F83E1@ha +/* 800A537C 000A22BC 9B 9F 80 00 */ stb r28, -0x8000(r31) +/* 800A5380 000A22C0 38 03 83 E1 */ addi r0, r3, 0x3E0F83E1@l +/* 800A5384 000A22C4 7C 00 D0 16 */ mulhwu r0, r0, r26 +/* 800A5388 000A22C8 54 00 B2 BE */ srwi r0, r0, 0xa +/* 800A538C 000A22CC 64 00 46 00 */ oris r0, r0, 0x4600 +/* 800A5390 000A22D0 60 00 02 00 */ ori r0, r0, 0x200 +/* 800A5394 000A22D4 90 1F 80 00 */ stw r0, -0x8000(r31) +/* 800A5398 000A22D8 7F A7 EB 78 */ mr r7, r29 +/* 800A539C 000A22DC 48 00 00 04 */ b lbl_800A53A0 +lbl_800A53A0: +/* 800A53A0 000A22E0 38 00 00 02 */ li r0, 2 +/* 800A53A4 000A22E4 7C 09 03 A6 */ mtctr r0 +/* 800A53A8 000A22E8 48 00 00 04 */ b lbl_800A53AC +lbl_800A53AC: +/* 800A53AC 000A22EC 48 00 00 04 */ b lbl_800A53B0 +lbl_800A53B0: +/* 800A53B0 000A22F0 80 0D 82 C8 */ lwz r0, gx@sda21(r13) +/* 800A53B4 000A22F4 39 07 00 1C */ addi r8, r7, 0x1c +/* 800A53B8 000A22F8 63 A5 00 80 */ ori r5, r29, 0x80 +/* 800A53BC 000A22FC 7D 00 42 14 */ add r8, r0, r8 +/* 800A53C0 000A2300 80 08 00 00 */ lwz r0, 0(r8) +/* 800A53C4 000A2304 39 27 00 3C */ addi r9, r7, 0x3c +/* 800A53C8 000A2308 38 67 00 3C */ addi r3, r7, 0x3c +/* 800A53CC 000A230C 54 00 00 80 */ rlwinm r0, r0, 0, 2, 0 +/* 800A53D0 000A2310 64 00 40 00 */ oris r0, r0, 0x4000 +/* 800A53D4 000A2314 90 08 00 00 */ stw r0, 0(r8) +/* 800A53D8 000A2318 38 E7 00 04 */ addi r7, r7, 4 +/* 800A53DC 000A231C 38 C0 00 08 */ li r6, 8 +/* 800A53E0 000A2320 80 0D 82 C8 */ lwz r0, gx@sda21(r13) +/* 800A53E4 000A2324 39 07 00 1C */ addi r8, r7, 0x1c +/* 800A53E8 000A2328 3B BD 00 01 */ addi r29, r29, 1 +/* 800A53EC 000A232C 7D 20 4A 14 */ add r9, r0, r9 +/* 800A53F0 000A2330 80 09 00 00 */ lwz r0, 0(r9) +/* 800A53F4 000A2334 54 00 00 7E */ clrlwi r0, r0, 1 +/* 800A53F8 000A2338 64 00 80 00 */ oris r0, r0, 0x8000 +/* 800A53FC 000A233C 90 09 00 00 */ stw r0, 0(r9) +/* 800A5400 000A2340 39 27 00 3C */ addi r9, r7, 0x3c +/* 800A5404 000A2344 98 DF 80 00 */ stb r6, -0x8000(r31) +/* 800A5408 000A2348 80 8D 82 C8 */ lwz r4, gx@sda21(r13) +/* 800A540C 000A234C 98 BF 80 00 */ stb r5, -0x8000(r31) +/* 800A5410 000A2350 63 A5 00 80 */ ori r5, r29, 0x80 +/* 800A5414 000A2354 7D 04 42 14 */ add r8, r4, r8 +/* 800A5418 000A2358 7C 04 18 2E */ lwzx r0, r4, r3 +/* 800A541C 000A235C 38 67 00 3C */ addi r3, r7, 0x3c +/* 800A5420 000A2360 38 E7 00 04 */ addi r7, r7, 4 +/* 800A5424 000A2364 90 1F 80 00 */ stw r0, -0x8000(r31) +/* 800A5428 000A2368 3B BD 00 01 */ addi r29, r29, 1 +/* 800A542C 000A236C 80 08 00 00 */ lwz r0, 0(r8) +/* 800A5430 000A2370 54 00 00 80 */ rlwinm r0, r0, 0, 2, 0 +/* 800A5434 000A2374 64 00 40 00 */ oris r0, r0, 0x4000 +/* 800A5438 000A2378 90 08 00 00 */ stw r0, 0(r8) +/* 800A543C 000A237C 39 07 00 1C */ addi r8, r7, 0x1c +/* 800A5440 000A2380 80 0D 82 C8 */ lwz r0, gx@sda21(r13) +/* 800A5444 000A2384 7D 20 4A 14 */ add r9, r0, r9 +/* 800A5448 000A2388 80 09 00 00 */ lwz r0, 0(r9) +/* 800A544C 000A238C 54 00 00 7E */ clrlwi r0, r0, 1 +/* 800A5450 000A2390 64 00 80 00 */ oris r0, r0, 0x8000 +/* 800A5454 000A2394 90 09 00 00 */ stw r0, 0(r9) +/* 800A5458 000A2398 39 27 00 3C */ addi r9, r7, 0x3c +/* 800A545C 000A239C 98 DF 80 00 */ stb r6, -0x8000(r31) +/* 800A5460 000A23A0 80 8D 82 C8 */ lwz r4, gx@sda21(r13) +/* 800A5464 000A23A4 98 BF 80 00 */ stb r5, -0x8000(r31) +/* 800A5468 000A23A8 63 A5 00 80 */ ori r5, r29, 0x80 +/* 800A546C 000A23AC 7D 04 42 14 */ add r8, r4, r8 +/* 800A5470 000A23B0 7C 04 18 2E */ lwzx r0, r4, r3 +/* 800A5474 000A23B4 38 67 00 3C */ addi r3, r7, 0x3c +/* 800A5478 000A23B8 38 E7 00 04 */ addi r7, r7, 4 +/* 800A547C 000A23BC 90 1F 80 00 */ stw r0, -0x8000(r31) +/* 800A5480 000A23C0 3B BD 00 01 */ addi r29, r29, 1 +/* 800A5484 000A23C4 80 08 00 00 */ lwz r0, 0(r8) +/* 800A5488 000A23C8 54 00 00 80 */ rlwinm r0, r0, 0, 2, 0 +/* 800A548C 000A23CC 64 00 40 00 */ oris r0, r0, 0x4000 +/* 800A5490 000A23D0 90 08 00 00 */ stw r0, 0(r8) +/* 800A5494 000A23D4 39 07 00 1C */ addi r8, r7, 0x1c +/* 800A5498 000A23D8 80 0D 82 C8 */ lwz r0, gx@sda21(r13) +/* 800A549C 000A23DC 7D 20 4A 14 */ add r9, r0, r9 +/* 800A54A0 000A23E0 80 09 00 00 */ lwz r0, 0(r9) +/* 800A54A4 000A23E4 54 00 00 7E */ clrlwi r0, r0, 1 +/* 800A54A8 000A23E8 64 00 80 00 */ oris r0, r0, 0x8000 +/* 800A54AC 000A23EC 90 09 00 00 */ stw r0, 0(r9) +/* 800A54B0 000A23F0 39 27 00 3C */ addi r9, r7, 0x3c +/* 800A54B4 000A23F4 98 DF 80 00 */ stb r6, -0x8000(r31) +/* 800A54B8 000A23F8 80 8D 82 C8 */ lwz r4, gx@sda21(r13) +/* 800A54BC 000A23FC 98 BF 80 00 */ stb r5, -0x8000(r31) +/* 800A54C0 000A2400 63 A5 00 80 */ ori r5, r29, 0x80 +/* 800A54C4 000A2404 7D 04 42 14 */ add r8, r4, r8 +/* 800A54C8 000A2408 7C 04 18 2E */ lwzx r0, r4, r3 +/* 800A54CC 000A240C 38 67 00 3C */ addi r3, r7, 0x3c +/* 800A54D0 000A2410 38 E7 00 04 */ addi r7, r7, 4 +/* 800A54D4 000A2414 90 1F 80 00 */ stw r0, -0x8000(r31) +/* 800A54D8 000A2418 3B BD 00 01 */ addi r29, r29, 1 +/* 800A54DC 000A241C 80 08 00 00 */ lwz r0, 0(r8) +/* 800A54E0 000A2420 54 00 00 80 */ rlwinm r0, r0, 0, 2, 0 +/* 800A54E4 000A2424 64 00 40 00 */ oris r0, r0, 0x4000 +/* 800A54E8 000A2428 90 08 00 00 */ stw r0, 0(r8) +/* 800A54EC 000A242C 80 0D 82 C8 */ lwz r0, gx@sda21(r13) +/* 800A54F0 000A2430 7D 20 4A 14 */ add r9, r0, r9 +/* 800A54F4 000A2434 80 09 00 00 */ lwz r0, 0(r9) +/* 800A54F8 000A2438 54 00 00 7E */ clrlwi r0, r0, 1 +/* 800A54FC 000A243C 64 00 80 00 */ oris r0, r0, 0x8000 +/* 800A5500 000A2440 90 09 00 00 */ stw r0, 0(r9) +/* 800A5504 000A2444 98 DF 80 00 */ stb r6, -0x8000(r31) +/* 800A5508 000A2448 80 8D 82 C8 */ lwz r4, gx@sda21(r13) +/* 800A550C 000A244C 98 BF 80 00 */ stb r5, -0x8000(r31) +/* 800A5510 000A2450 7C 04 18 2E */ lwzx r0, r4, r3 +/* 800A5514 000A2454 90 1F 80 00 */ stw r0, -0x8000(r31) +/* 800A5518 000A2458 42 00 FE 98 */ bdnz lbl_800A53B0 +/* 800A551C 000A245C 38 80 00 10 */ li r4, 0x10 +/* 800A5520 000A2460 3C C0 CC 01 */ lis r6, 0xCC008000@ha +/* 800A5524 000A2464 98 86 80 00 */ stb r4, 0xCC008000@l(r6) +/* 800A5528 000A2468 38 00 10 00 */ li r0, 0x1000 +/* 800A552C 000A246C 3B A0 00 00 */ li r29, 0 +/* 800A5530 000A2470 90 06 80 00 */ stw r0, -0x8000(r6) +/* 800A5534 000A2474 38 00 00 3F */ li r0, 0x3f +/* 800A5538 000A2478 57 BC 78 20 */ slwi r28, r29, 0xf +/* 800A553C 000A247C 90 06 80 00 */ stw r0, -0x8000(r6) +/* 800A5540 000A2480 38 00 10 12 */ li r0, 0x1012 +/* 800A5544 000A2484 38 A0 00 01 */ li r5, 1 +/* 800A5548 000A2488 98 86 80 00 */ stb r4, -0x8000(r6) +/* 800A554C 000A248C 38 80 00 61 */ li r4, 0x61 +/* 800A5550 000A2490 3C 60 58 00 */ lis r3, 0x5800000F@ha +/* 800A5554 000A2494 90 06 80 00 */ stw r0, -0x8000(r6) +/* 800A5558 000A2498 38 03 00 0F */ addi r0, r3, 0x5800000F@l +/* 800A555C 000A249C 3F 5C 00 08 */ addis r26, r28, 8 +/* 800A5560 000A24A0 90 A6 80 00 */ stw r5, -0x8000(r6) +/* 800A5564 000A24A4 57 BB 20 36 */ slwi r27, r29, 4 +/* 800A5568 000A24A8 98 86 80 00 */ stb r4, -0x8000(r6) +/* 800A556C 000A24AC 90 06 80 00 */ stw r0, -0x8000(r6) +/* 800A5570 000A24B0 48 00 00 04 */ b lbl_800A5574 +lbl_800A5574: +/* 800A5574 000A24B4 48 00 00 04 */ b lbl_800A5578 +lbl_800A5578: +/* 800A5578 000A24B8 48 00 00 04 */ b lbl_800A557C +lbl_800A557C: +/* 800A557C 000A24BC 80 0D 82 C8 */ lwz r0, gx@sda21(r13) +/* 800A5580 000A24C0 38 7B 02 08 */ addi r3, r27, 0x208 +/* 800A5584 000A24C4 7F 85 E3 78 */ mr r5, r28 +/* 800A5588 000A24C8 7F 47 D3 78 */ mr r7, r26 +/* 800A558C 000A24CC 7C 60 1A 14 */ add r3, r0, r3 +/* 800A5590 000A24D0 38 80 00 00 */ li r4, 0 +/* 800A5594 000A24D4 38 C0 00 00 */ li r6, 0 +/* 800A5598 000A24D8 39 00 00 00 */ li r8, 0 +/* 800A559C 000A24DC 48 00 56 1D */ bl GXInitTexCacheRegion +/* 800A55A0 000A24E0 3F 5A 00 01 */ addis r26, r26, 1 +/* 800A55A4 000A24E4 3F 9C 00 01 */ addis r28, r28, 1 +/* 800A55A8 000A24E8 3B 5A 80 00 */ addi r26, r26, -32768 +/* 800A55AC 000A24EC 3B 9C 80 00 */ addi r28, r28, -32768 +/* 800A55B0 000A24F0 3B 7B 00 10 */ addi r27, r27, 0x10 +/* 800A55B4 000A24F4 3B BD 00 01 */ addi r29, r29, 1 +/* 800A55B8 000A24F8 28 1D 00 08 */ cmplwi r29, 8 +/* 800A55BC 000A24FC 41 80 FF C0 */ blt lbl_800A557C +/* 800A55C0 000A2500 3B A0 00 00 */ li r29, 0 +/* 800A55C4 000A2504 57 A3 08 3C */ slwi r3, r29, 1 +/* 800A55C8 000A2508 3B 43 00 09 */ addi r26, r3, 9 +/* 800A55CC 000A250C 3B 63 00 08 */ addi r27, r3, 8 +/* 800A55D0 000A2510 57 BC 20 36 */ slwi r28, r29, 4 +/* 800A55D4 000A2514 48 00 00 04 */ b lbl_800A55D8 +lbl_800A55D8: +/* 800A55D8 000A2518 48 00 00 04 */ b lbl_800A55DC +lbl_800A55DC: +/* 800A55DC 000A251C 48 00 00 04 */ b lbl_800A55E0 +lbl_800A55E0: +/* 800A55E0 000A2520 80 0D 82 C8 */ lwz r0, gx@sda21(r13) +/* 800A55E4 000A2524 38 7C 02 88 */ addi r3, r28, 0x288 +/* 800A55E8 000A2528 57 65 78 20 */ slwi r5, r27, 0xf +/* 800A55EC 000A252C 7C 60 1A 14 */ add r3, r0, r3 +/* 800A55F0 000A2530 57 47 78 20 */ slwi r7, r26, 0xf +/* 800A55F4 000A2534 38 80 00 00 */ li r4, 0 +/* 800A55F8 000A2538 38 C0 00 00 */ li r6, 0 +/* 800A55FC 000A253C 39 00 00 00 */ li r8, 0 +/* 800A5600 000A2540 48 00 55 B9 */ bl GXInitTexCacheRegion +/* 800A5604 000A2544 3B 5A 00 02 */ addi r26, r26, 2 +/* 800A5608 000A2548 3B 7B 00 02 */ addi r27, r27, 2 +/* 800A560C 000A254C 3B 9C 00 10 */ addi r28, r28, 0x10 +/* 800A5610 000A2550 3B BD 00 01 */ addi r29, r29, 1 +/* 800A5614 000A2554 28 1D 00 04 */ cmplwi r29, 4 +/* 800A5618 000A2558 41 80 FF C8 */ blt lbl_800A55E0 +/* 800A561C 000A255C 3B 80 00 00 */ li r28, 0 +/* 800A5620 000A2560 57 83 68 24 */ slwi r3, r28, 0xd +/* 800A5624 000A2564 3F 43 00 0C */ addis r26, r3, 0xc +/* 800A5628 000A2568 57 9B 20 36 */ slwi r27, r28, 4 +/* 800A562C 000A256C 48 00 00 04 */ b lbl_800A5630 +lbl_800A5630: +/* 800A5630 000A2570 48 00 00 04 */ b lbl_800A5634 +lbl_800A5634: +/* 800A5634 000A2574 48 00 00 04 */ b lbl_800A5638 +lbl_800A5638: +/* 800A5638 000A2578 80 0D 82 C8 */ lwz r0, gx@sda21(r13) +/* 800A563C 000A257C 38 7B 02 D0 */ addi r3, r27, 0x2d0 +/* 800A5640 000A2580 7F 44 D3 78 */ mr r4, r26 +/* 800A5644 000A2584 7C 60 1A 14 */ add r3, r0, r3 +/* 800A5648 000A2588 38 A0 00 10 */ li r5, 0x10 +/* 800A564C 000A258C 48 00 56 8D */ bl GXInitTlutRegion +/* 800A5650 000A2590 3B 5A 20 00 */ addi r26, r26, 0x2000 +/* 800A5654 000A2594 3B 7B 00 10 */ addi r27, r27, 0x10 +/* 800A5658 000A2598 3B 9C 00 01 */ addi r28, r28, 1 +/* 800A565C 000A259C 28 1C 00 10 */ cmplwi r28, 0x10 +/* 800A5660 000A25A0 41 80 FF D8 */ blt lbl_800A5638 +/* 800A5664 000A25A4 3B 60 00 00 */ li r27, 0 +/* 800A5668 000A25A8 57 63 78 20 */ slwi r3, r27, 0xf +/* 800A566C 000A25AC 3F 43 00 0E */ addis r26, r3, 0xe +/* 800A5670 000A25B0 48 00 00 04 */ b lbl_800A5674 +lbl_800A5674: +/* 800A5674 000A25B4 48 00 00 04 */ b lbl_800A5678 +lbl_800A5678: +/* 800A5678 000A25B8 48 00 00 04 */ b lbl_800A567C +lbl_800A567C: +/* 800A567C 000A25BC 38 1B 00 10 */ addi r0, r27, 0x10 +/* 800A5680 000A25C0 80 AD 82 C8 */ lwz r5, gx@sda21(r13) +/* 800A5684 000A25C4 54 03 20 36 */ slwi r3, r0, 4 +/* 800A5688 000A25C8 38 63 02 D0 */ addi r3, r3, 0x2d0 +/* 800A568C 000A25CC 7F 44 D3 78 */ mr r4, r26 +/* 800A5690 000A25D0 7C 65 1A 14 */ add r3, r5, r3 +/* 800A5694 000A25D4 38 A0 00 40 */ li r5, 0x40 +/* 800A5698 000A25D8 48 00 56 41 */ bl GXInitTlutRegion +/* 800A569C 000A25DC 3F 5A 00 01 */ addis r26, r26, 1 +/* 800A56A0 000A25E0 3B 5A 80 00 */ addi r26, r26, -32768 +/* 800A56A4 000A25E4 3B 7B 00 01 */ addi r27, r27, 1 +/* 800A56A8 000A25E8 28 1B 00 04 */ cmplwi r27, 4 +/* 800A56AC 000A25EC 41 80 FF D0 */ blt lbl_800A567C +/* 800A56B0 000A25F0 80 8D 95 5C */ lwz r4, __cpReg@sda21(r13) +/* 800A56B4 000A25F4 39 80 00 00 */ li r12, 0 +/* 800A56B8 000A25F8 38 60 00 08 */ li r3, 8 +/* 800A56BC 000A25FC B1 84 00 06 */ sth r12, 6(r4) +/* 800A56C0 000A2600 3D 60 CC 01 */ lis r11, 0xCC008000@ha +/* 800A56C4 000A2604 39 40 00 20 */ li r10, 0x20 +/* 800A56C8 000A2608 80 8D 82 C8 */ lwz r4, gx@sda21(r13) +/* 800A56CC 000A260C 39 00 00 10 */ li r8, 0x10 +/* 800A56D0 000A2610 38 E0 10 06 */ li r7, 0x1006 +/* 800A56D4 000A2614 38 84 04 EC */ addi r4, r4, 0x4ec +/* 800A56D8 000A2618 80 04 00 00 */ lwz r0, 0(r4) +/* 800A56DC 000A261C 38 C0 00 61 */ li r6, 0x61 +/* 800A56E0 000A2620 3C A0 23 00 */ lis r5, 0x2300 +/* 800A56E4 000A2624 54 00 07 2E */ rlwinm r0, r0, 0, 0x1c, 0x17 +/* 800A56E8 000A2628 90 04 00 00 */ stw r0, 0(r4) +/* 800A56EC 000A262C 3C 80 24 00 */ lis r4, 0x2400 +/* 800A56F0 000A2630 3C 00 67 00 */ lis r0, 0x6700 +/* 800A56F4 000A2634 98 6B 80 00 */ stb r3, 0xCC008000@l(r11) +/* 800A56F8 000A2638 38 60 00 00 */ li r3, 0 +/* 800A56FC 000A263C 81 2D 82 C8 */ lwz r9, gx@sda21(r13) +/* 800A5700 000A2640 99 4B 80 00 */ stb r10, -0x8000(r11) +/* 800A5704 000A2644 81 29 04 EC */ lwz r9, 0x4ec(r9) +/* 800A5708 000A2648 91 2B 80 00 */ stw r9, -0x8000(r11) +/* 800A570C 000A264C 99 0B 80 00 */ stb r8, -0x8000(r11) +/* 800A5710 000A2650 90 EB 80 00 */ stw r7, -0x8000(r11) +/* 800A5714 000A2654 91 8B 80 00 */ stw r12, -0x8000(r11) +/* 800A5718 000A2658 98 CB 80 00 */ stb r6, -0x8000(r11) +/* 800A571C 000A265C 90 AB 80 00 */ stw r5, -0x8000(r11) +/* 800A5720 000A2660 98 CB 80 00 */ stb r6, -0x8000(r11) +/* 800A5724 000A2664 90 8B 80 00 */ stw r4, -0x8000(r11) +/* 800A5728 000A2668 98 CB 80 00 */ stb r6, -0x8000(r11) +/* 800A572C 000A266C 90 0B 80 00 */ stw r0, -0x8000(r11) +/* 800A5730 000A2670 48 00 59 C9 */ bl __GXSetTmemConfig +/* 800A5734 000A2674 48 00 00 1D */ bl __GXInitGX +/* 800A5738 000A2678 38 7E 04 F8 */ addi r3, r30, 0x4f8 +/* 800A573C 000A267C BB 41 00 30 */ lmw r26, 0x30(r1) +/* 800A5740 000A2680 80 01 00 4C */ lwz r0, 0x4c(r1) +/* 800A5744 000A2684 38 21 00 48 */ addi r1, r1, 0x48 +/* 800A5748 000A2688 7C 08 03 A6 */ mtlr r0 +/* 800A574C 000A268C 4E 80 00 20 */ blr + +.global __GXInitGX +__GXInitGX: +/* 800A5750 000A2690 7C 08 02 A6 */ mflr r0 +/* 800A5754 000A2694 90 01 00 04 */ stw r0, 4(r1) +/* 800A5758 000A2698 94 21 FF 88 */ stwu r1, -0x78(r1) +/* 800A575C 000A269C 93 E1 00 74 */ stw r31, 0x74(r1) +/* 800A5760 000A26A0 93 C1 00 70 */ stw r30, 0x70(r1) +/* 800A5764 000A26A4 80 82 8A D0 */ lwz r4, "@121"@sda21(r2) +/* 800A5768 000A26A8 80 62 8A D4 */ lwz r3, "@122"@sda21(r2) +/* 800A576C 000A26AC 80 02 8A D8 */ lwz r0, "@123"@sda21(r2) +/* 800A5770 000A26B0 90 81 00 28 */ stw r4, 0x28(r1) +/* 800A5774 000A26B4 90 61 00 24 */ stw r3, 0x24(r1) +/* 800A5778 000A26B8 90 01 00 20 */ stw r0, 0x20(r1) +/* 800A577C 000A26BC 4B FF 58 41 */ bl VIGetTvFormat +/* 800A5780 000A26C0 2C 03 00 02 */ cmpwi r3, 2 +/* 800A5784 000A26C4 41 82 00 54 */ beq lbl_800A57D8 +/* 800A5788 000A26C8 40 80 00 14 */ bge lbl_800A579C +/* 800A578C 000A26CC 2C 03 00 00 */ cmpwi r3, 0 +/* 800A5790 000A26D0 41 82 00 18 */ beq lbl_800A57A8 +/* 800A5794 000A26D4 40 80 00 24 */ bge lbl_800A57B8 +/* 800A5798 000A26D8 48 00 00 50 */ b lbl_800A57E8 +lbl_800A579C: +/* 800A579C 000A26DC 2C 03 00 05 */ cmpwi r3, 5 +/* 800A57A0 000A26E0 41 82 00 28 */ beq lbl_800A57C8 +/* 800A57A4 000A26E4 48 00 00 44 */ b lbl_800A57E8 +lbl_800A57A8: +/* 800A57A8 000A26E8 3C 60 80 3B */ lis r3, GXNtsc480IntDf@ha +/* 800A57AC 000A26EC 38 03 17 B8 */ addi r0, r3, GXNtsc480IntDf@l +/* 800A57B0 000A26F0 7C 1F 03 78 */ mr r31, r0 +/* 800A57B4 000A26F4 48 00 00 40 */ b lbl_800A57F4 +lbl_800A57B8: +/* 800A57B8 000A26F8 3C 60 80 3B */ lis r3, GXPal528IntDf@ha +/* 800A57BC 000A26FC 38 03 18 6C */ addi r0, r3, GXPal528IntDf@l +/* 800A57C0 000A2700 7C 1F 03 78 */ mr r31, r0 +/* 800A57C4 000A2704 48 00 00 30 */ b lbl_800A57F4 +lbl_800A57C8: +/* 800A57C8 000A2708 3C 60 80 3B */ lis r3, GXEurgb60Hz480IntDf@ha +/* 800A57CC 000A270C 38 03 18 A8 */ addi r0, r3, GXEurgb60Hz480IntDf@l +/* 800A57D0 000A2710 7C 1F 03 78 */ mr r31, r0 +/* 800A57D4 000A2714 48 00 00 20 */ b lbl_800A57F4 +lbl_800A57D8: +/* 800A57D8 000A2718 3C 60 80 3B */ lis r3, GXMpal480IntDf@ha +/* 800A57DC 000A271C 38 03 18 30 */ addi r0, r3, GXMpal480IntDf@l +/* 800A57E0 000A2720 7C 1F 03 78 */ mr r31, r0 +/* 800A57E4 000A2724 48 00 00 10 */ b lbl_800A57F4 +lbl_800A57E8: +/* 800A57E8 000A2728 3C 60 80 3B */ lis r3, GXNtsc480IntDf@ha +/* 800A57EC 000A272C 38 03 17 B8 */ addi r0, r3, GXNtsc480IntDf@l +/* 800A57F0 000A2730 7C 1F 03 78 */ mr r31, r0 +lbl_800A57F4: +/* 800A57F4 000A2734 80 01 00 28 */ lwz r0, 0x28(r1) +/* 800A57F8 000A2738 3C 80 01 00 */ lis r4, 0x00FFFFFF@ha +/* 800A57FC 000A273C 38 61 00 1C */ addi r3, r1, 0x1c +/* 800A5800 000A2740 90 01 00 1C */ stw r0, 0x1c(r1) +/* 800A5804 000A2744 38 84 FF FF */ addi r4, r4, 0x00FFFFFF@l +/* 800A5808 000A2748 48 00 3B 59 */ bl GXSetCopyClear +/* 800A580C 000A274C 38 60 00 00 */ li r3, 0 +/* 800A5810 000A2750 38 80 00 01 */ li r4, 1 +/* 800A5814 000A2754 38 A0 00 04 */ li r5, 4 +/* 800A5818 000A2758 38 C0 00 3C */ li r6, 0x3c +/* 800A581C 000A275C 38 E0 00 00 */ li r7, 0 +/* 800A5820 000A2760 39 00 00 7D */ li r8, 0x7d +/* 800A5824 000A2764 48 00 26 5D */ bl GXSetTexCoordGen2 +/* 800A5828 000A2768 38 60 00 01 */ li r3, 1 +/* 800A582C 000A276C 38 80 00 01 */ li r4, 1 +/* 800A5830 000A2770 38 A0 00 05 */ li r5, 5 +/* 800A5834 000A2774 38 C0 00 3C */ li r6, 0x3c +/* 800A5838 000A2778 38 E0 00 00 */ li r7, 0 +/* 800A583C 000A277C 39 00 00 7D */ li r8, 0x7d +/* 800A5840 000A2780 48 00 26 41 */ bl GXSetTexCoordGen2 +/* 800A5844 000A2784 38 60 00 02 */ li r3, 2 +/* 800A5848 000A2788 38 80 00 01 */ li r4, 1 +/* 800A584C 000A278C 38 A0 00 06 */ li r5, 6 +/* 800A5850 000A2790 38 C0 00 3C */ li r6, 0x3c +/* 800A5854 000A2794 38 E0 00 00 */ li r7, 0 +/* 800A5858 000A2798 39 00 00 7D */ li r8, 0x7d +/* 800A585C 000A279C 48 00 26 25 */ bl GXSetTexCoordGen2 +/* 800A5860 000A27A0 38 60 00 03 */ li r3, 3 +/* 800A5864 000A27A4 38 80 00 01 */ li r4, 1 +/* 800A5868 000A27A8 38 A0 00 07 */ li r5, 7 +/* 800A586C 000A27AC 38 C0 00 3C */ li r6, 0x3c +/* 800A5870 000A27B0 38 E0 00 00 */ li r7, 0 +/* 800A5874 000A27B4 39 00 00 7D */ li r8, 0x7d +/* 800A5878 000A27B8 48 00 26 09 */ bl GXSetTexCoordGen2 +/* 800A587C 000A27BC 38 60 00 04 */ li r3, 4 +/* 800A5880 000A27C0 38 80 00 01 */ li r4, 1 +/* 800A5884 000A27C4 38 A0 00 08 */ li r5, 8 +/* 800A5888 000A27C8 38 C0 00 3C */ li r6, 0x3c +/* 800A588C 000A27CC 38 E0 00 00 */ li r7, 0 +/* 800A5890 000A27D0 39 00 00 7D */ li r8, 0x7d +/* 800A5894 000A27D4 48 00 25 ED */ bl GXSetTexCoordGen2 +/* 800A5898 000A27D8 38 60 00 05 */ li r3, 5 +/* 800A589C 000A27DC 38 80 00 01 */ li r4, 1 +/* 800A58A0 000A27E0 38 A0 00 09 */ li r5, 9 +/* 800A58A4 000A27E4 38 C0 00 3C */ li r6, 0x3c +/* 800A58A8 000A27E8 38 E0 00 00 */ li r7, 0 +/* 800A58AC 000A27EC 39 00 00 7D */ li r8, 0x7d +/* 800A58B0 000A27F0 48 00 25 D1 */ bl GXSetTexCoordGen2 +/* 800A58B4 000A27F4 38 60 00 06 */ li r3, 6 +/* 800A58B8 000A27F8 38 80 00 01 */ li r4, 1 +/* 800A58BC 000A27FC 38 A0 00 0A */ li r5, 0xa +/* 800A58C0 000A2800 38 C0 00 3C */ li r6, 0x3c +/* 800A58C4 000A2804 38 E0 00 00 */ li r7, 0 +/* 800A58C8 000A2808 39 00 00 7D */ li r8, 0x7d +/* 800A58CC 000A280C 48 00 25 B5 */ bl GXSetTexCoordGen2 +/* 800A58D0 000A2810 38 60 00 07 */ li r3, 7 +/* 800A58D4 000A2814 38 80 00 01 */ li r4, 1 +/* 800A58D8 000A2818 38 A0 00 0B */ li r5, 0xb +/* 800A58DC 000A281C 38 C0 00 3C */ li r6, 0x3c +/* 800A58E0 000A2820 38 E0 00 00 */ li r7, 0 +/* 800A58E4 000A2824 39 00 00 7D */ li r8, 0x7d +/* 800A58E8 000A2828 48 00 25 99 */ bl GXSetTexCoordGen2 +/* 800A58EC 000A282C 38 60 00 01 */ li r3, 1 +/* 800A58F0 000A2830 48 00 28 61 */ bl GXSetNumTexGens +/* 800A58F4 000A2834 48 00 1A 75 */ bl GXClearVtxDesc +/* 800A58F8 000A2838 48 00 25 79 */ bl GXInvalidateVtxCache +/* 800A58FC 000A283C 3B C0 00 09 */ li r30, 9 +/* 800A5900 000A2840 48 00 00 04 */ b lbl_800A5904 +lbl_800A5904: +/* 800A5904 000A2844 48 00 00 04 */ b lbl_800A5908 +lbl_800A5908: +/* 800A5908 000A2848 48 00 00 04 */ b lbl_800A590C +lbl_800A590C: +/* 800A590C 000A284C 80 8D 82 C8 */ lwz r4, gx@sda21(r13) +/* 800A5910 000A2850 7F C3 F3 78 */ mr r3, r30 +/* 800A5914 000A2854 38 A0 00 00 */ li r5, 0 +/* 800A5918 000A2858 48 00 24 CD */ bl GXSetArray +/* 800A591C 000A285C 3B DE 00 01 */ addi r30, r30, 1 +/* 800A5920 000A2860 28 1E 00 18 */ cmplwi r30, 0x18 +/* 800A5924 000A2864 40 81 FF E8 */ ble lbl_800A590C +/* 800A5928 000A2868 38 60 00 06 */ li r3, 6 +/* 800A592C 000A286C 38 80 00 00 */ li r4, 0 +/* 800A5930 000A2870 48 00 30 F1 */ bl GXSetLineWidth +/* 800A5934 000A2874 38 60 00 06 */ li r3, 6 +/* 800A5938 000A2878 38 80 00 00 */ li r4, 0 +/* 800A593C 000A287C 48 00 31 3D */ bl GXSetPointSize +/* 800A5940 000A2880 38 60 00 00 */ li r3, 0 +/* 800A5944 000A2884 38 80 00 00 */ li r4, 0 +/* 800A5948 000A2888 38 A0 00 00 */ li r5, 0 +/* 800A594C 000A288C 48 00 31 81 */ bl GXEnableTexOffsets +/* 800A5950 000A2890 38 60 00 01 */ li r3, 1 +/* 800A5954 000A2894 38 80 00 00 */ li r4, 0 +/* 800A5958 000A2898 38 A0 00 00 */ li r5, 0 +/* 800A595C 000A289C 48 00 31 71 */ bl GXEnableTexOffsets +/* 800A5960 000A28A0 38 60 00 02 */ li r3, 2 +/* 800A5964 000A28A4 38 80 00 00 */ li r4, 0 +/* 800A5968 000A28A8 38 A0 00 00 */ li r5, 0 +/* 800A596C 000A28AC 48 00 31 61 */ bl GXEnableTexOffsets +/* 800A5970 000A28B0 38 60 00 03 */ li r3, 3 +/* 800A5974 000A28B4 38 80 00 00 */ li r4, 0 +/* 800A5978 000A28B8 38 A0 00 00 */ li r5, 0 +/* 800A597C 000A28BC 48 00 31 51 */ bl GXEnableTexOffsets +/* 800A5980 000A28C0 38 60 00 04 */ li r3, 4 +/* 800A5984 000A28C4 38 80 00 00 */ li r4, 0 +/* 800A5988 000A28C8 38 A0 00 00 */ li r5, 0 +/* 800A598C 000A28CC 48 00 31 41 */ bl GXEnableTexOffsets +/* 800A5990 000A28D0 38 60 00 05 */ li r3, 5 +/* 800A5994 000A28D4 38 80 00 00 */ li r4, 0 +/* 800A5998 000A28D8 38 A0 00 00 */ li r5, 0 +/* 800A599C 000A28DC 48 00 31 31 */ bl GXEnableTexOffsets +/* 800A59A0 000A28E0 38 60 00 06 */ li r3, 6 +/* 800A59A4 000A28E4 38 80 00 00 */ li r4, 0 +/* 800A59A8 000A28E8 38 A0 00 00 */ li r5, 0 +/* 800A59AC 000A28EC 48 00 31 21 */ bl GXEnableTexOffsets +/* 800A59B0 000A28F0 38 60 00 07 */ li r3, 7 +/* 800A59B4 000A28F4 38 80 00 00 */ li r4, 0 +/* 800A59B8 000A28F8 38 A0 00 00 */ li r5, 0 +/* 800A59BC 000A28FC 48 00 31 11 */ bl GXEnableTexOffsets +/* 800A59C0 000A2900 C0 22 8A DC */ lfs f1, "@177"@sda21(r2) +/* 800A59C4 000A2904 38 61 00 2C */ addi r3, r1, 0x2c +/* 800A59C8 000A2908 C0 02 8A E0 */ lfs f0, "@178"@sda21(r2) +/* 800A59CC 000A290C 38 80 00 00 */ li r4, 0 +/* 800A59D0 000A2910 D0 21 00 2C */ stfs f1, 0x2c(r1) +/* 800A59D4 000A2914 D0 01 00 30 */ stfs f0, 0x30(r1) +/* 800A59D8 000A2918 D0 01 00 34 */ stfs f0, 0x34(r1) +/* 800A59DC 000A291C D0 01 00 38 */ stfs f0, 0x38(r1) +/* 800A59E0 000A2920 D0 01 00 3C */ stfs f0, 0x3c(r1) +/* 800A59E4 000A2924 D0 21 00 40 */ stfs f1, 0x40(r1) +/* 800A59E8 000A2928 D0 01 00 44 */ stfs f0, 0x44(r1) +/* 800A59EC 000A292C D0 01 00 48 */ stfs f0, 0x48(r1) +/* 800A59F0 000A2930 D0 01 00 4C */ stfs f0, 0x4c(r1) +/* 800A59F4 000A2934 D0 01 00 50 */ stfs f0, 0x50(r1) +/* 800A59F8 000A2938 D0 21 00 54 */ stfs f1, 0x54(r1) +/* 800A59FC 000A293C D0 01 00 58 */ stfs f0, 0x58(r1) +/* 800A5A00 000A2940 48 00 7D 2D */ bl GXLoadPosMtxImm +/* 800A5A04 000A2944 38 61 00 2C */ addi r3, r1, 0x2c +/* 800A5A08 000A2948 38 80 00 00 */ li r4, 0 +/* 800A5A0C 000A294C 48 00 7D 8D */ bl GXLoadNrmMtxImm +/* 800A5A10 000A2950 38 60 00 00 */ li r3, 0 +/* 800A5A14 000A2954 48 00 7D F9 */ bl GXSetCurrentMtx +/* 800A5A18 000A2958 38 61 00 2C */ addi r3, r1, 0x2c +/* 800A5A1C 000A295C 38 80 00 3C */ li r4, 0x3c +/* 800A5A20 000A2960 38 A0 00 00 */ li r5, 0 +/* 800A5A24 000A2964 48 00 7E 25 */ bl GXLoadTexMtxImm +/* 800A5A28 000A2968 38 61 00 2C */ addi r3, r1, 0x2c +/* 800A5A2C 000A296C 38 80 00 7D */ li r4, 0x7d +/* 800A5A30 000A2970 38 A0 00 00 */ li r5, 0 +/* 800A5A34 000A2974 48 00 7E 15 */ bl GXLoadTexMtxImm +/* 800A5A38 000A2978 A0 9F 00 04 */ lhz r4, 4(r31) +/* 800A5A3C 000A297C 3C 60 43 30 */ lis r3, 0x4330 +/* 800A5A40 000A2980 A0 1F 00 08 */ lhz r0, 8(r31) +/* 800A5A44 000A2984 90 81 00 6C */ stw r4, 0x6c(r1) +/* 800A5A48 000A2988 C0 22 8A E0 */ lfs f1, "@178"@sda21(r2) +/* 800A5A4C 000A298C 90 01 00 64 */ stw r0, 0x64(r1) +/* 800A5A50 000A2990 C8 82 8A E8 */ lfd f4, "@181"@sda21(r2) +/* 800A5A54 000A2994 FC 40 08 90 */ fmr f2, f1 +/* 800A5A58 000A2998 90 61 00 68 */ stw r3, 0x68(r1) +/* 800A5A5C 000A299C FC A0 08 90 */ fmr f5, f1 +/* 800A5A60 000A29A0 C0 C2 8A DC */ lfs f6, "@177"@sda21(r2) +/* 800A5A64 000A29A4 90 61 00 60 */ stw r3, 0x60(r1) +/* 800A5A68 000A29A8 C8 61 00 68 */ lfd f3, 0x68(r1) +/* 800A5A6C 000A29AC C8 01 00 60 */ lfd f0, 0x60(r1) +/* 800A5A70 000A29B0 EC 63 20 28 */ fsubs f3, f3, f4 +/* 800A5A74 000A29B4 EC 80 20 28 */ fsubs f4, f0, f4 +/* 800A5A78 000A29B8 48 00 7F 71 */ bl GXSetViewport +/* 800A5A7C 000A29BC 38 60 00 00 */ li r3, 0 +/* 800A5A80 000A29C0 48 00 31 01 */ bl GXSetCoPlanar +/* 800A5A84 000A29C4 38 60 00 02 */ li r3, 2 +/* 800A5A88 000A29C8 48 00 30 A9 */ bl GXSetCullMode +/* 800A5A8C 000A29CC 38 60 00 00 */ li r3, 0 +/* 800A5A90 000A29D0 48 00 80 BD */ bl GXSetClipMode +/* 800A5A94 000A29D4 A0 BF 00 04 */ lhz r5, 4(r31) +/* 800A5A98 000A29D8 38 60 00 00 */ li r3, 0 +/* 800A5A9C 000A29DC A0 DF 00 06 */ lhz r6, 6(r31) +/* 800A5AA0 000A29E0 38 80 00 00 */ li r4, 0 +/* 800A5AA4 000A29E4 48 00 7F B5 */ bl GXSetScissor +/* 800A5AA8 000A29E8 38 60 00 00 */ li r3, 0 +/* 800A5AAC 000A29EC 38 80 00 00 */ li r4, 0 +/* 800A5AB0 000A29F0 48 00 80 59 */ bl GXSetScissorBoxOffset +/* 800A5AB4 000A29F4 38 60 00 00 */ li r3, 0 +/* 800A5AB8 000A29F8 48 00 44 ED */ bl GXSetNumChans +/* 800A5ABC 000A29FC 38 60 00 04 */ li r3, 4 +/* 800A5AC0 000A2A00 38 80 00 00 */ li r4, 0 +/* 800A5AC4 000A2A04 38 A0 00 00 */ li r5, 0 +/* 800A5AC8 000A2A08 38 C0 00 01 */ li r6, 1 +/* 800A5ACC 000A2A0C 38 E0 00 00 */ li r7, 0 +/* 800A5AD0 000A2A10 39 00 00 00 */ li r8, 0 +/* 800A5AD4 000A2A14 39 20 00 02 */ li r9, 2 +/* 800A5AD8 000A2A18 48 00 45 19 */ bl GXSetChanCtrl +/* 800A5ADC 000A2A1C 80 01 00 24 */ lwz r0, 0x24(r1) +/* 800A5AE0 000A2A20 38 81 00 18 */ addi r4, r1, 0x18 +/* 800A5AE4 000A2A24 38 60 00 04 */ li r3, 4 +/* 800A5AE8 000A2A28 90 01 00 18 */ stw r0, 0x18(r1) +/* 800A5AEC 000A2A2C 48 00 41 E9 */ bl GXSetChanAmbColor +/* 800A5AF0 000A2A30 80 01 00 20 */ lwz r0, 0x20(r1) +/* 800A5AF4 000A2A34 38 81 00 14 */ addi r4, r1, 0x14 +/* 800A5AF8 000A2A38 38 60 00 04 */ li r3, 4 +/* 800A5AFC 000A2A3C 90 01 00 14 */ stw r0, 0x14(r1) +/* 800A5B00 000A2A40 48 00 43 3D */ bl GXSetChanMatColor +/* 800A5B04 000A2A44 38 60 00 05 */ li r3, 5 +/* 800A5B08 000A2A48 38 80 00 00 */ li r4, 0 +/* 800A5B0C 000A2A4C 38 A0 00 00 */ li r5, 0 +/* 800A5B10 000A2A50 38 C0 00 01 */ li r6, 1 +/* 800A5B14 000A2A54 38 E0 00 00 */ li r7, 0 +/* 800A5B18 000A2A58 39 00 00 00 */ li r8, 0 +/* 800A5B1C 000A2A5C 39 20 00 02 */ li r9, 2 +/* 800A5B20 000A2A60 48 00 44 D1 */ bl GXSetChanCtrl +/* 800A5B24 000A2A64 80 01 00 24 */ lwz r0, 0x24(r1) +/* 800A5B28 000A2A68 38 81 00 10 */ addi r4, r1, 0x10 +/* 800A5B2C 000A2A6C 38 60 00 05 */ li r3, 5 +/* 800A5B30 000A2A70 90 01 00 10 */ stw r0, 0x10(r1) +/* 800A5B34 000A2A74 48 00 41 A1 */ bl GXSetChanAmbColor +/* 800A5B38 000A2A78 80 01 00 20 */ lwz r0, 0x20(r1) +/* 800A5B3C 000A2A7C 38 81 00 0C */ addi r4, r1, 0xc +/* 800A5B40 000A2A80 38 60 00 05 */ li r3, 5 +/* 800A5B44 000A2A84 90 01 00 0C */ stw r0, 0xc(r1) +/* 800A5B48 000A2A88 48 00 42 F5 */ bl GXSetChanMatColor +/* 800A5B4C 000A2A8C 48 00 51 D5 */ bl GXInvalidateTexAll +/* 800A5B50 000A2A90 80 8D 82 C8 */ lwz r4, gx@sda21(r13) +/* 800A5B54 000A2A94 3B C0 00 00 */ li r30, 0 +/* 800A5B58 000A2A98 3C 60 80 0A */ lis r3, __GXDefaultTexRegionCallback@ha +/* 800A5B5C 000A2A9C 93 C4 02 C8 */ stw r30, 0x2c8(r4) +/* 800A5B60 000A2AA0 38 63 4E E4 */ addi r3, r3, __GXDefaultTexRegionCallback@l +/* 800A5B64 000A2AA4 80 8D 82 C8 */ lwz r4, gx@sda21(r13) +/* 800A5B68 000A2AA8 93 C4 02 CC */ stw r30, 0x2cc(r4) +/* 800A5B6C 000A2AAC 48 00 51 FD */ bl GXSetTexRegionCallback +/* 800A5B70 000A2AB0 3C 60 80 0A */ lis r3, __GXDefaultTlutRegionCallback@ha +/* 800A5B74 000A2AB4 38 63 4F 60 */ addi r3, r3, __GXDefaultTlutRegionCallback@l +/* 800A5B78 000A2AB8 48 00 52 05 */ bl GXSetTlutRegionCallback +/* 800A5B7C 000A2ABC 38 60 00 00 */ li r3, 0 +/* 800A5B80 000A2AC0 38 80 00 00 */ li r4, 0 +/* 800A5B84 000A2AC4 38 A0 00 00 */ li r5, 0 +/* 800A5B88 000A2AC8 38 C0 00 04 */ li r6, 4 +/* 800A5B8C 000A2ACC 48 00 66 A5 */ bl GXSetTevOrder +/* 800A5B90 000A2AD0 38 60 00 01 */ li r3, 1 +/* 800A5B94 000A2AD4 38 80 00 01 */ li r4, 1 +/* 800A5B98 000A2AD8 38 A0 00 01 */ li r5, 1 +/* 800A5B9C 000A2ADC 38 C0 00 04 */ li r6, 4 +/* 800A5BA0 000A2AE0 48 00 66 91 */ bl GXSetTevOrder +/* 800A5BA4 000A2AE4 38 60 00 02 */ li r3, 2 +/* 800A5BA8 000A2AE8 38 80 00 02 */ li r4, 2 +/* 800A5BAC 000A2AEC 38 A0 00 02 */ li r5, 2 +/* 800A5BB0 000A2AF0 38 C0 00 04 */ li r6, 4 +/* 800A5BB4 000A2AF4 48 00 66 7D */ bl GXSetTevOrder +/* 800A5BB8 000A2AF8 38 60 00 03 */ li r3, 3 +/* 800A5BBC 000A2AFC 38 80 00 03 */ li r4, 3 +/* 800A5BC0 000A2B00 38 A0 00 03 */ li r5, 3 +/* 800A5BC4 000A2B04 38 C0 00 04 */ li r6, 4 +/* 800A5BC8 000A2B08 48 00 66 69 */ bl GXSetTevOrder +/* 800A5BCC 000A2B0C 38 60 00 04 */ li r3, 4 +/* 800A5BD0 000A2B10 38 80 00 04 */ li r4, 4 +/* 800A5BD4 000A2B14 38 A0 00 04 */ li r5, 4 +/* 800A5BD8 000A2B18 38 C0 00 04 */ li r6, 4 +/* 800A5BDC 000A2B1C 48 00 66 55 */ bl GXSetTevOrder +/* 800A5BE0 000A2B20 38 60 00 05 */ li r3, 5 +/* 800A5BE4 000A2B24 38 80 00 05 */ li r4, 5 +/* 800A5BE8 000A2B28 38 A0 00 05 */ li r5, 5 +/* 800A5BEC 000A2B2C 38 C0 00 04 */ li r6, 4 +/* 800A5BF0 000A2B30 48 00 66 41 */ bl GXSetTevOrder +/* 800A5BF4 000A2B34 38 60 00 06 */ li r3, 6 +/* 800A5BF8 000A2B38 38 80 00 06 */ li r4, 6 +/* 800A5BFC 000A2B3C 38 A0 00 06 */ li r5, 6 +/* 800A5C00 000A2B40 38 C0 00 04 */ li r6, 4 +/* 800A5C04 000A2B44 48 00 66 2D */ bl GXSetTevOrder +/* 800A5C08 000A2B48 38 60 00 07 */ li r3, 7 +/* 800A5C0C 000A2B4C 38 80 00 07 */ li r4, 7 +/* 800A5C10 000A2B50 38 A0 00 07 */ li r5, 7 +/* 800A5C14 000A2B54 38 C0 00 04 */ li r6, 4 +/* 800A5C18 000A2B58 48 00 66 19 */ bl GXSetTevOrder +/* 800A5C1C 000A2B5C 38 60 00 08 */ li r3, 8 +/* 800A5C20 000A2B60 38 80 00 FF */ li r4, 0xff +/* 800A5C24 000A2B64 38 A0 00 FF */ li r5, 0xff +/* 800A5C28 000A2B68 38 C0 00 FF */ li r6, 0xff +/* 800A5C2C 000A2B6C 48 00 66 05 */ bl GXSetTevOrder +/* 800A5C30 000A2B70 38 60 00 09 */ li r3, 9 +/* 800A5C34 000A2B74 38 80 00 FF */ li r4, 0xff +/* 800A5C38 000A2B78 38 A0 00 FF */ li r5, 0xff +/* 800A5C3C 000A2B7C 38 C0 00 FF */ li r6, 0xff +/* 800A5C40 000A2B80 48 00 65 F1 */ bl GXSetTevOrder +/* 800A5C44 000A2B84 38 60 00 0A */ li r3, 0xa +/* 800A5C48 000A2B88 38 80 00 FF */ li r4, 0xff +/* 800A5C4C 000A2B8C 38 A0 00 FF */ li r5, 0xff +/* 800A5C50 000A2B90 38 C0 00 FF */ li r6, 0xff +/* 800A5C54 000A2B94 48 00 65 DD */ bl GXSetTevOrder +/* 800A5C58 000A2B98 38 60 00 0B */ li r3, 0xb +/* 800A5C5C 000A2B9C 38 80 00 FF */ li r4, 0xff +/* 800A5C60 000A2BA0 38 A0 00 FF */ li r5, 0xff +/* 800A5C64 000A2BA4 38 C0 00 FF */ li r6, 0xff +/* 800A5C68 000A2BA8 48 00 65 C9 */ bl GXSetTevOrder +/* 800A5C6C 000A2BAC 38 60 00 0C */ li r3, 0xc +/* 800A5C70 000A2BB0 38 80 00 FF */ li r4, 0xff +/* 800A5C74 000A2BB4 38 A0 00 FF */ li r5, 0xff +/* 800A5C78 000A2BB8 38 C0 00 FF */ li r6, 0xff +/* 800A5C7C 000A2BBC 48 00 65 B5 */ bl GXSetTevOrder +/* 800A5C80 000A2BC0 38 60 00 0D */ li r3, 0xd +/* 800A5C84 000A2BC4 38 80 00 FF */ li r4, 0xff +/* 800A5C88 000A2BC8 38 A0 00 FF */ li r5, 0xff +/* 800A5C8C 000A2BCC 38 C0 00 FF */ li r6, 0xff +/* 800A5C90 000A2BD0 48 00 65 A1 */ bl GXSetTevOrder +/* 800A5C94 000A2BD4 38 60 00 0E */ li r3, 0xe +/* 800A5C98 000A2BD8 38 80 00 FF */ li r4, 0xff +/* 800A5C9C 000A2BDC 38 A0 00 FF */ li r5, 0xff +/* 800A5CA0 000A2BE0 38 C0 00 FF */ li r6, 0xff +/* 800A5CA4 000A2BE4 48 00 65 8D */ bl GXSetTevOrder +/* 800A5CA8 000A2BE8 38 60 00 0F */ li r3, 0xf +/* 800A5CAC 000A2BEC 38 80 00 FF */ li r4, 0xff +/* 800A5CB0 000A2BF0 38 A0 00 FF */ li r5, 0xff +/* 800A5CB4 000A2BF4 38 C0 00 FF */ li r6, 0xff +/* 800A5CB8 000A2BF8 48 00 65 79 */ bl GXSetTevOrder +/* 800A5CBC 000A2BFC 38 60 00 01 */ li r3, 1 +/* 800A5CC0 000A2C00 48 00 67 4D */ bl GXSetNumTevStages +/* 800A5CC4 000A2C04 38 60 00 00 */ li r3, 0 +/* 800A5CC8 000A2C08 38 80 00 03 */ li r4, 3 +/* 800A5CCC 000A2C0C 48 00 5D 3D */ bl GXSetTevOp +/* 800A5CD0 000A2C10 38 60 00 07 */ li r3, 7 +/* 800A5CD4 000A2C14 38 80 00 00 */ li r4, 0 +/* 800A5CD8 000A2C18 38 A0 00 00 */ li r5, 0 +/* 800A5CDC 000A2C1C 38 C0 00 07 */ li r6, 7 +/* 800A5CE0 000A2C20 38 E0 00 00 */ li r7, 0 +/* 800A5CE4 000A2C24 48 00 64 79 */ bl GXSetAlphaCompare +/* 800A5CE8 000A2C28 38 60 00 00 */ li r3, 0 +/* 800A5CEC 000A2C2C 38 80 00 11 */ li r4, 0x11 +/* 800A5CF0 000A2C30 38 A0 00 00 */ li r5, 0 +/* 800A5CF4 000A2C34 48 00 64 B9 */ bl GXSetZTexture +/* 800A5CF8 000A2C38 48 00 00 04 */ b lbl_800A5CFC +lbl_800A5CFC: +/* 800A5CFC 000A2C3C 48 00 00 04 */ b lbl_800A5D00 +lbl_800A5D00: +/* 800A5D00 000A2C40 48 00 00 04 */ b lbl_800A5D04 +lbl_800A5D04: +/* 800A5D04 000A2C44 7F C3 F3 78 */ mr r3, r30 +/* 800A5D08 000A2C48 38 80 00 06 */ li r4, 6 +/* 800A5D0C 000A2C4C 48 00 62 81 */ bl GXSetTevKColorSel +/* 800A5D10 000A2C50 7F C3 F3 78 */ mr r3, r30 +/* 800A5D14 000A2C54 38 80 00 00 */ li r4, 0 +/* 800A5D18 000A2C58 48 00 62 E1 */ bl GXSetTevKAlphaSel +/* 800A5D1C 000A2C5C 7F C3 F3 78 */ mr r3, r30 +/* 800A5D20 000A2C60 38 80 00 00 */ li r4, 0 +/* 800A5D24 000A2C64 38 A0 00 00 */ li r5, 0 +/* 800A5D28 000A2C68 48 00 63 3D */ bl GXSetTevSwapMode +/* 800A5D2C 000A2C6C 3B DE 00 01 */ addi r30, r30, 1 +/* 800A5D30 000A2C70 28 1E 00 10 */ cmplwi r30, 0x10 +/* 800A5D34 000A2C74 41 80 FF D0 */ blt lbl_800A5D04 +/* 800A5D38 000A2C78 38 60 00 00 */ li r3, 0 +/* 800A5D3C 000A2C7C 38 80 00 00 */ li r4, 0 +/* 800A5D40 000A2C80 38 A0 00 01 */ li r5, 1 +/* 800A5D44 000A2C84 38 C0 00 02 */ li r6, 2 +/* 800A5D48 000A2C88 38 E0 00 03 */ li r7, 3 +/* 800A5D4C 000A2C8C 48 00 63 71 */ bl GXSetTevSwapModeTable +/* 800A5D50 000A2C90 38 60 00 01 */ li r3, 1 +/* 800A5D54 000A2C94 38 80 00 00 */ li r4, 0 +/* 800A5D58 000A2C98 38 A0 00 00 */ li r5, 0 +/* 800A5D5C 000A2C9C 38 C0 00 00 */ li r6, 0 +/* 800A5D60 000A2CA0 38 E0 00 03 */ li r7, 3 +/* 800A5D64 000A2CA4 48 00 63 59 */ bl GXSetTevSwapModeTable +/* 800A5D68 000A2CA8 38 60 00 02 */ li r3, 2 +/* 800A5D6C 000A2CAC 38 80 00 01 */ li r4, 1 +/* 800A5D70 000A2CB0 38 A0 00 01 */ li r5, 1 +/* 800A5D74 000A2CB4 38 C0 00 01 */ li r6, 1 +/* 800A5D78 000A2CB8 38 E0 00 03 */ li r7, 3 +/* 800A5D7C 000A2CBC 48 00 63 41 */ bl GXSetTevSwapModeTable +/* 800A5D80 000A2CC0 38 60 00 03 */ li r3, 3 +/* 800A5D84 000A2CC4 38 80 00 02 */ li r4, 2 +/* 800A5D88 000A2CC8 38 A0 00 02 */ li r5, 2 +/* 800A5D8C 000A2CCC 38 C0 00 02 */ li r6, 2 +/* 800A5D90 000A2CD0 38 E0 00 03 */ li r7, 3 +/* 800A5D94 000A2CD4 48 00 63 29 */ bl GXSetTevSwapModeTable +/* 800A5D98 000A2CD8 3B C0 00 00 */ li r30, 0 +/* 800A5D9C 000A2CDC 48 00 00 04 */ b lbl_800A5DA0 +lbl_800A5DA0: +/* 800A5DA0 000A2CE0 48 00 00 04 */ b lbl_800A5DA4 +lbl_800A5DA4: +/* 800A5DA4 000A2CE4 48 00 00 04 */ b lbl_800A5DA8 +lbl_800A5DA8: +/* 800A5DA8 000A2CE8 7F C3 F3 78 */ mr r3, r30 +/* 800A5DAC 000A2CEC 48 00 5A C1 */ bl GXSetTevDirect +/* 800A5DB0 000A2CF0 3B DE 00 01 */ addi r30, r30, 1 +/* 800A5DB4 000A2CF4 28 1E 00 10 */ cmplwi r30, 0x10 +/* 800A5DB8 000A2CF8 41 80 FF F0 */ blt lbl_800A5DA8 +/* 800A5DBC 000A2CFC 38 60 00 00 */ li r3, 0 +/* 800A5DC0 000A2D00 48 00 5A 81 */ bl GXSetNumIndStages +/* 800A5DC4 000A2D04 38 60 00 00 */ li r3, 0 +/* 800A5DC8 000A2D08 38 80 00 00 */ li r4, 0 +/* 800A5DCC 000A2D0C 38 A0 00 00 */ li r5, 0 +/* 800A5DD0 000A2D10 48 00 57 65 */ bl GXSetIndTexCoordScale +/* 800A5DD4 000A2D14 38 60 00 01 */ li r3, 1 +/* 800A5DD8 000A2D18 38 80 00 00 */ li r4, 0 +/* 800A5DDC 000A2D1C 38 A0 00 00 */ li r5, 0 +/* 800A5DE0 000A2D20 48 00 57 55 */ bl GXSetIndTexCoordScale +/* 800A5DE4 000A2D24 38 60 00 02 */ li r3, 2 +/* 800A5DE8 000A2D28 38 80 00 00 */ li r4, 0 +/* 800A5DEC 000A2D2C 38 A0 00 00 */ li r5, 0 +/* 800A5DF0 000A2D30 48 00 57 45 */ bl GXSetIndTexCoordScale +/* 800A5DF4 000A2D34 38 60 00 03 */ li r3, 3 +/* 800A5DF8 000A2D38 38 80 00 00 */ li r4, 0 +/* 800A5DFC 000A2D3C 38 A0 00 00 */ li r5, 0 +/* 800A5E00 000A2D40 48 00 57 35 */ bl GXSetIndTexCoordScale +/* 800A5E04 000A2D44 C0 42 8A DC */ lfs f2, "@177"@sda21(r2) +/* 800A5E08 000A2D48 38 81 00 08 */ addi r4, r1, 8 +/* 800A5E0C 000A2D4C 80 01 00 24 */ lwz r0, 0x24(r1) +/* 800A5E10 000A2D50 38 60 00 00 */ li r3, 0 +/* 800A5E14 000A2D54 FC 80 10 90 */ fmr f4, f2 +/* 800A5E18 000A2D58 90 01 00 08 */ stw r0, 8(r1) +/* 800A5E1C 000A2D5C C0 22 8A E0 */ lfs f1, "@178"@sda21(r2) +/* 800A5E20 000A2D60 C0 62 8A E4 */ lfs f3, "@179"@sda21(r2) +/* 800A5E24 000A2D64 48 00 66 1D */ bl GXSetFog +/* 800A5E28 000A2D68 38 60 00 00 */ li r3, 0 +/* 800A5E2C 000A2D6C 38 80 00 00 */ li r4, 0 +/* 800A5E30 000A2D70 38 A0 00 00 */ li r5, 0 +/* 800A5E34 000A2D74 48 00 67 BD */ bl GXSetFogRangeAdj +/* 800A5E38 000A2D78 38 60 00 00 */ li r3, 0 +/* 800A5E3C 000A2D7C 38 80 00 04 */ li r4, 4 +/* 800A5E40 000A2D80 38 A0 00 05 */ li r5, 5 +/* 800A5E44 000A2D84 38 C0 00 00 */ li r6, 0 +/* 800A5E48 000A2D88 48 00 68 A9 */ bl GXSetBlendMode +/* 800A5E4C 000A2D8C 38 60 00 01 */ li r3, 1 +/* 800A5E50 000A2D90 48 00 69 A5 */ bl GXSetColorUpdate +/* 800A5E54 000A2D94 38 60 00 01 */ li r3, 1 +/* 800A5E58 000A2D98 48 00 69 DD */ bl GXSetAlphaUpdate +/* 800A5E5C 000A2D9C 38 60 00 01 */ li r3, 1 +/* 800A5E60 000A2DA0 38 80 00 03 */ li r4, 3 +/* 800A5E64 000A2DA4 38 A0 00 01 */ li r5, 1 +/* 800A5E68 000A2DA8 48 00 6A 0D */ bl GXSetZMode +/* 800A5E6C 000A2DAC 38 60 00 01 */ li r3, 1 +/* 800A5E70 000A2DB0 48 00 6A 7D */ bl GXSetZCompLoc +/* 800A5E74 000A2DB4 38 60 00 01 */ li r3, 1 +/* 800A5E78 000A2DB8 48 00 6B C5 */ bl GXSetDither +/* 800A5E7C 000A2DBC 38 60 00 00 */ li r3, 0 +/* 800A5E80 000A2DC0 38 80 00 00 */ li r4, 0 +/* 800A5E84 000A2DC4 48 00 6B F9 */ bl GXSetDstAlpha +/* 800A5E88 000A2DC8 38 60 00 00 */ li r3, 0 +/* 800A5E8C 000A2DCC 38 80 00 00 */ li r4, 0 +/* 800A5E90 000A2DD0 48 00 6A 9D */ bl GXSetPixelFmt +/* 800A5E94 000A2DD4 38 60 00 01 */ li r3, 1 +/* 800A5E98 000A2DD8 38 80 00 01 */ li r4, 1 +/* 800A5E9C 000A2DDC 48 00 6C 35 */ bl GXSetFieldMask +/* 800A5EA0 000A2DE0 A0 1F 00 08 */ lhz r0, 8(r31) +/* 800A5EA4 000A2DE4 A0 7F 00 10 */ lhz r3, 0x10(r31) +/* 800A5EA8 000A2DE8 54 00 08 3C */ slwi r0, r0, 1 +/* 800A5EAC 000A2DEC 7C 03 00 00 */ cmpw r3, r0 +/* 800A5EB0 000A2DF0 40 82 00 0C */ bne lbl_800A5EBC +/* 800A5EB4 000A2DF4 38 80 00 01 */ li r4, 1 +/* 800A5EB8 000A2DF8 48 00 00 08 */ b lbl_800A5EC0 +lbl_800A5EBC: +/* 800A5EBC 000A2DFC 38 80 00 00 */ li r4, 0 +lbl_800A5EC0: +/* 800A5EC0 000A2E00 88 7F 00 18 */ lbz r3, 0x18(r31) +/* 800A5EC4 000A2E04 48 00 6C 45 */ bl GXSetFieldMode +/* 800A5EC8 000A2E08 A0 BF 00 04 */ lhz r5, 4(r31) +/* 800A5ECC 000A2E0C 38 60 00 00 */ li r3, 0 +/* 800A5ED0 000A2E10 A0 DF 00 06 */ lhz r6, 6(r31) +/* 800A5ED4 000A2E14 38 80 00 00 */ li r4, 0 +/* 800A5ED8 000A2E18 48 00 2D 11 */ bl GXSetDispCopySrc +/* 800A5EDC 000A2E1C A0 7F 00 04 */ lhz r3, 4(r31) +/* 800A5EE0 000A2E20 A0 9F 00 06 */ lhz r4, 6(r31) +/* 800A5EE4 000A2E24 48 00 2E 85 */ bl GXSetDispCopyDst +/* 800A5EE8 000A2E28 A0 9F 00 08 */ lhz r4, 8(r31) +/* 800A5EEC 000A2E2C 3C 60 43 30 */ lis r3, 0x4330 +/* 800A5EF0 000A2E30 A0 1F 00 06 */ lhz r0, 6(r31) +/* 800A5EF4 000A2E34 90 81 00 64 */ stw r4, 0x64(r1) +/* 800A5EF8 000A2E38 C8 42 8A E8 */ lfd f2, "@181"@sda21(r2) +/* 800A5EFC 000A2E3C 90 01 00 6C */ stw r0, 0x6c(r1) +/* 800A5F00 000A2E40 90 61 00 60 */ stw r3, 0x60(r1) +/* 800A5F04 000A2E44 90 61 00 68 */ stw r3, 0x68(r1) +/* 800A5F08 000A2E48 C8 21 00 60 */ lfd f1, 0x60(r1) +/* 800A5F0C 000A2E4C C8 01 00 68 */ lfd f0, 0x68(r1) +/* 800A5F10 000A2E50 EC 21 10 28 */ fsubs f1, f1, f2 +/* 800A5F14 000A2E54 EC 00 10 28 */ fsubs f0, f0, f2 +/* 800A5F18 000A2E58 EC 21 00 24 */ fdivs f1, f1, f0 +/* 800A5F1C 000A2E5C 48 00 33 71 */ bl GXSetDispCopyYScale +/* 800A5F20 000A2E60 38 60 00 03 */ li r3, 3 +/* 800A5F24 000A2E64 48 00 30 25 */ bl GXSetCopyClamp +/* 800A5F28 000A2E68 88 7F 00 19 */ lbz r3, 0x19(r31) +/* 800A5F2C 000A2E6C 38 9F 00 1A */ addi r4, r31, 0x1a +/* 800A5F30 000A2E70 38 DF 00 32 */ addi r6, r31, 0x32 +/* 800A5F34 000A2E74 38 A0 00 01 */ li r5, 1 +/* 800A5F38 000A2E78 48 00 34 91 */ bl GXSetCopyFilter +/* 800A5F3C 000A2E7C 38 60 00 00 */ li r3, 0 +/* 800A5F40 000A2E80 48 00 36 B1 */ bl GXSetDispCopyGamma +/* 800A5F44 000A2E84 38 60 00 00 */ li r3, 0 +/* 800A5F48 000A2E88 48 00 2F D5 */ bl GXSetDispCopyFrame2Field +/* 800A5F4C 000A2E8C 48 00 39 C1 */ bl GXClearBoundingBox +/* 800A5F50 000A2E90 38 60 00 01 */ li r3, 1 +/* 800A5F54 000A2E94 48 00 26 25 */ bl GXPokeColorUpdate +/* 800A5F58 000A2E98 38 60 00 01 */ li r3, 1 +/* 800A5F5C 000A2E9C 48 00 25 79 */ bl GXPokeAlphaUpdate +/* 800A5F60 000A2EA0 38 60 00 00 */ li r3, 0 +/* 800A5F64 000A2EA4 48 00 26 45 */ bl GXPokeDither +/* 800A5F68 000A2EA8 38 60 00 00 */ li r3, 0 +/* 800A5F6C 000A2EAC 38 80 00 00 */ li r4, 0 +/* 800A5F70 000A2EB0 38 A0 00 01 */ li r5, 1 +/* 800A5F74 000A2EB4 38 C0 00 0F */ li r6, 0xf +/* 800A5F78 000A2EB8 48 00 25 79 */ bl GXPokeBlendMode +/* 800A5F7C 000A2EBC 38 60 00 07 */ li r3, 7 +/* 800A5F80 000A2EC0 38 80 00 00 */ li r4, 0 +/* 800A5F84 000A2EC4 48 00 25 29 */ bl GXPokeAlphaMode +/* 800A5F88 000A2EC8 38 60 00 01 */ li r3, 1 +/* 800A5F8C 000A2ECC 48 00 25 35 */ bl GXPokeAlphaRead +/* 800A5F90 000A2ED0 38 60 00 00 */ li r3, 0 +/* 800A5F94 000A2ED4 38 80 00 00 */ li r4, 0 +/* 800A5F98 000A2ED8 48 00 25 FD */ bl GXPokeDstAlpha +/* 800A5F9C 000A2EDC 38 60 00 01 */ li r3, 1 +/* 800A5FA0 000A2EE0 38 80 00 07 */ li r4, 7 +/* 800A5FA4 000A2EE4 38 A0 00 01 */ li r5, 1 +/* 800A5FA8 000A2EE8 48 00 26 1D */ bl GXPokeZMode +/* 800A5FAC 000A2EEC 38 60 00 23 */ li r3, 0x23 +/* 800A5FB0 000A2EF0 38 80 00 16 */ li r4, 0x16 +/* 800A5FB4 000A2EF4 48 00 7C 45 */ bl GXSetGPMetric +/* 800A5FB8 000A2EF8 48 00 84 D9 */ bl GXClearGPMetric +/* 800A5FBC 000A2EFC 80 01 00 7C */ lwz r0, 0x7c(r1) +/* 800A5FC0 000A2F00 83 E1 00 74 */ lwz r31, 0x74(r1) +/* 800A5FC4 000A2F04 83 C1 00 70 */ lwz r30, 0x70(r1) +/* 800A5FC8 000A2F08 38 21 00 78 */ addi r1, r1, 0x78 +/* 800A5FCC 000A2F0C 7C 08 03 A6 */ mtlr r0 +/* 800A5FD0 000A2F10 4E 80 00 20 */ blr + +.section .sdata, "wa" # 0x80408AC0 - 0x804097C0 +.global gx +gx: + .4byte gxData + .4byte 0 + +.section .sdata2, "a" # 0x8040B460 - 0x80414020 +.balign 8 +"@121": + .4byte 0x404040FF +"@122": + .4byte 0 +"@123": + .4byte -1 +"@177": + .4byte 0x3F800000 +"@178": + .4byte 0 +"@179": + .4byte 0x3DCCCCCD +"@181": + .4byte 0x43300000 + .4byte 0 + +.section .bss, "wa" # 0x803E6000 - 0x80408AC0 +gxData: + .skip 0x4F8 +FifoObj: + .skip 0x80 + +.section .sbss, "wa" # 0x804097C0 - 0x8040B45C +.global __piReg +__piReg: + .skip 0x4 +.global __cpReg +__cpReg: + .skip 0x4 +.global __peReg +__peReg: + .skip 0x4 +__memReg: + .skip 0x4 diff --git a/asm/Dolphin/gx/GXLight.s b/asm/Dolphin/gx/GXLight.s new file mode 100644 index 0000000..526d56d --- /dev/null +++ b/asm/Dolphin/gx/GXLight.s @@ -0,0 +1,653 @@ +.include "macros.inc" + +.section .text, "ax" # 0x80005600 - 0x8036FBA0 +.global GXInitLightAttn +GXInitLightAttn: +/* 800A9944 000A6884 D0 23 00 10 */ stfs f1, 0x10(r3) +/* 800A9948 000A6888 D0 43 00 14 */ stfs f2, 0x14(r3) +/* 800A994C 000A688C D0 63 00 18 */ stfs f3, 0x18(r3) +/* 800A9950 000A6890 D0 83 00 1C */ stfs f4, 0x1c(r3) +/* 800A9954 000A6894 D0 A3 00 20 */ stfs f5, 0x20(r3) +/* 800A9958 000A6898 D0 C3 00 24 */ stfs f6, 0x24(r3) +/* 800A995C 000A689C 4E 80 00 20 */ blr + +.global GXInitLightAttnA +GXInitLightAttnA: +/* 800A9960 000A68A0 D0 23 00 10 */ stfs f1, 0x10(r3) +/* 800A9964 000A68A4 D0 43 00 14 */ stfs f2, 0x14(r3) +/* 800A9968 000A68A8 D0 63 00 18 */ stfs f3, 0x18(r3) +/* 800A996C 000A68AC 4E 80 00 20 */ blr + +.global GXInitLightAttnK +GXInitLightAttnK: +/* 800A9970 000A68B0 D0 23 00 1C */ stfs f1, 0x1c(r3) +/* 800A9974 000A68B4 D0 43 00 20 */ stfs f2, 0x20(r3) +/* 800A9978 000A68B8 D0 63 00 24 */ stfs f3, 0x24(r3) +/* 800A997C 000A68BC 4E 80 00 20 */ blr + +.global GXInitLightDistAttn +GXInitLightDistAttn: +/* 800A9980 000A68C0 C0 02 8B 00 */ lfs f0, "@121"@sda21(r2) +/* 800A9984 000A68C4 FC 01 00 40 */ fcmpo cr0, f1, f0 +/* 800A9988 000A68C8 40 80 00 08 */ bge lbl_800A9990 +/* 800A998C 000A68CC 38 80 00 00 */ li r4, 0 +lbl_800A9990: +/* 800A9990 000A68D0 C0 02 8B 00 */ lfs f0, "@121"@sda21(r2) +/* 800A9994 000A68D4 FC 02 00 40 */ fcmpo cr0, f2, f0 +/* 800A9998 000A68D8 4C 40 13 82 */ cror 2, 0, 2 +/* 800A999C 000A68DC 41 82 00 14 */ beq lbl_800A99B0 +/* 800A99A0 000A68E0 C0 02 8B 04 */ lfs f0, "@127"@sda21(r2) +/* 800A99A4 000A68E4 FC 02 00 40 */ fcmpo cr0, f2, f0 +/* 800A99A8 000A68E8 4C 41 13 82 */ cror 2, 1, 2 +/* 800A99AC 000A68EC 40 82 00 08 */ bne lbl_800A99B4 +lbl_800A99B0: +/* 800A99B0 000A68F0 38 80 00 00 */ li r4, 0 +lbl_800A99B4: +/* 800A99B4 000A68F4 2C 04 00 02 */ cmpwi r4, 2 +/* 800A99B8 000A68F8 41 82 00 3C */ beq lbl_800A99F4 +/* 800A99BC 000A68FC 40 80 00 14 */ bge lbl_800A99D0 +/* 800A99C0 000A6900 2C 04 00 00 */ cmpwi r4, 0 +/* 800A99C4 000A6904 41 82 00 70 */ beq lbl_800A9A34 +/* 800A99C8 000A6908 40 80 00 14 */ bge lbl_800A99DC +/* 800A99CC 000A690C 48 00 00 68 */ b lbl_800A9A34 +lbl_800A99D0: +/* 800A99D0 000A6910 2C 04 00 04 */ cmpwi r4, 4 +/* 800A99D4 000A6914 40 80 00 60 */ bge lbl_800A9A34 +/* 800A99D8 000A6918 48 00 00 40 */ b lbl_800A9A18 +lbl_800A99DC: +/* 800A99DC 000A691C C0 A2 8B 04 */ lfs f5, "@127"@sda21(r2) +/* 800A99E0 000A6920 EC 02 00 72 */ fmuls f0, f2, f1 +/* 800A99E4 000A6924 C0 82 8B 00 */ lfs f4, "@121"@sda21(r2) +/* 800A99E8 000A6928 EC 25 10 28 */ fsubs f1, f5, f2 +/* 800A99EC 000A692C EC 61 00 24 */ fdivs f3, f1, f0 +/* 800A99F0 000A6930 48 00 00 50 */ b lbl_800A9A40 +lbl_800A99F4: +/* 800A99F4 000A6934 C0 A2 8B 04 */ lfs f5, "@127"@sda21(r2) +/* 800A99F8 000A6938 EC 82 00 72 */ fmuls f4, f2, f1 +/* 800A99FC 000A693C C0 62 8B 08 */ lfs f3, "@148"@sda21(r2) +/* 800A9A00 000A6940 EC 45 10 28 */ fsubs f2, f5, f2 +/* 800A9A04 000A6944 EC 01 01 32 */ fmuls f0, f1, f4 +/* 800A9A08 000A6948 EC 23 00 B2 */ fmuls f1, f3, f2 +/* 800A9A0C 000A694C EC 61 20 24 */ fdivs f3, f1, f4 +/* 800A9A10 000A6950 EC 81 00 24 */ fdivs f4, f1, f0 +/* 800A9A14 000A6954 48 00 00 2C */ b lbl_800A9A40 +lbl_800A9A18: +/* 800A9A18 000A6958 EC 02 00 72 */ fmuls f0, f2, f1 +/* 800A9A1C 000A695C C0 A2 8B 04 */ lfs f5, "@127"@sda21(r2) +/* 800A9A20 000A6960 C0 62 8B 00 */ lfs f3, "@121"@sda21(r2) +/* 800A9A24 000A6964 EC 45 10 28 */ fsubs f2, f5, f2 +/* 800A9A28 000A6968 EC 01 00 32 */ fmuls f0, f1, f0 +/* 800A9A2C 000A696C EC 82 00 24 */ fdivs f4, f2, f0 +/* 800A9A30 000A6970 48 00 00 10 */ b lbl_800A9A40 +lbl_800A9A34: +/* 800A9A34 000A6974 C0 62 8B 00 */ lfs f3, "@121"@sda21(r2) +/* 800A9A38 000A6978 C0 A2 8B 04 */ lfs f5, "@127"@sda21(r2) +/* 800A9A3C 000A697C FC 80 18 90 */ fmr f4, f3 +lbl_800A9A40: +/* 800A9A40 000A6980 D0 A3 00 1C */ stfs f5, 0x1c(r3) +/* 800A9A44 000A6984 D0 63 00 20 */ stfs f3, 0x20(r3) +/* 800A9A48 000A6988 D0 83 00 24 */ stfs f4, 0x24(r3) +/* 800A9A4C 000A698C 4E 80 00 20 */ blr + +.global GXInitLightPos +GXInitLightPos: +/* 800A9A50 000A6990 D0 23 00 28 */ stfs f1, 0x28(r3) +/* 800A9A54 000A6994 D0 43 00 2C */ stfs f2, 0x2c(r3) +/* 800A9A58 000A6998 D0 63 00 30 */ stfs f3, 0x30(r3) +/* 800A9A5C 000A699C 4E 80 00 20 */ blr + +.global GXInitSpecularDir +GXInitSpecularDir: +/* 800A9A60 000A69A0 94 21 FF E0 */ stwu r1, -0x20(r1) +/* 800A9A64 000A69A4 FC 00 08 50 */ fneg f0, f1 +/* 800A9A68 000A69A8 FC 20 10 50 */ fneg f1, f2 +/* 800A9A6C 000A69AC C0 A2 8B 04 */ lfs f5, "@127"@sda21(r2) +/* 800A9A70 000A69B0 EC C0 00 32 */ fmuls f6, f0, f0 +/* 800A9A74 000A69B4 C0 82 8B 00 */ lfs f4, "@121"@sda21(r2) +/* 800A9A78 000A69B8 EC 45 18 28 */ fsubs f2, f5, f3 +/* 800A9A7C 000A69BC EC A1 00 72 */ fmuls f5, f1, f1 +/* 800A9A80 000A69C0 EC E2 00 B2 */ fmuls f7, f2, f2 +/* 800A9A84 000A69C4 EC A6 28 2A */ fadds f5, f6, f5 +/* 800A9A88 000A69C8 ED 07 28 2A */ fadds f8, f7, f5 +/* 800A9A8C 000A69CC FC 08 20 40 */ fcmpo cr0, f8, f4 +/* 800A9A90 000A69D0 40 81 00 5C */ ble lbl_800A9AEC +/* 800A9A94 000A69D4 FC A0 40 34 */ frsqrte f5, f8 +/* 800A9A98 000A69D8 C8 E2 8B 10 */ lfd f7, "@165"@sda21(r2) +/* 800A9A9C 000A69DC C8 C2 8B 18 */ lfd f6, "@166"@sda21(r2) +/* 800A9AA0 000A69E0 FC 85 01 72 */ fmul f4, f5, f5 +/* 800A9AA4 000A69E4 FC A7 01 72 */ fmul f5, f7, f5 +/* 800A9AA8 000A69E8 FC 88 01 32 */ fmul f4, f8, f4 +/* 800A9AAC 000A69EC FC 86 20 28 */ fsub f4, f6, f4 +/* 800A9AB0 000A69F0 FC A5 01 32 */ fmul f5, f5, f4 +/* 800A9AB4 000A69F4 FC 85 01 72 */ fmul f4, f5, f5 +/* 800A9AB8 000A69F8 FC A7 01 72 */ fmul f5, f7, f5 +/* 800A9ABC 000A69FC FC 88 01 32 */ fmul f4, f8, f4 +/* 800A9AC0 000A6A00 FC 86 20 28 */ fsub f4, f6, f4 +/* 800A9AC4 000A6A04 FC A5 01 32 */ fmul f5, f5, f4 +/* 800A9AC8 000A6A08 FC 85 01 72 */ fmul f4, f5, f5 +/* 800A9ACC 000A6A0C FC A7 01 72 */ fmul f5, f7, f5 +/* 800A9AD0 000A6A10 FC 88 01 32 */ fmul f4, f8, f4 +/* 800A9AD4 000A6A14 FC 86 20 28 */ fsub f4, f6, f4 +/* 800A9AD8 000A6A18 FC 85 01 32 */ fmul f4, f5, f4 +/* 800A9ADC 000A6A1C FC 88 01 32 */ fmul f4, f8, f4 +/* 800A9AE0 000A6A20 FC 80 20 18 */ frsp f4, f4 +/* 800A9AE4 000A6A24 D0 81 00 18 */ stfs f4, 0x18(r1) +/* 800A9AE8 000A6A28 C1 01 00 18 */ lfs f8, 0x18(r1) +lbl_800A9AEC: +/* 800A9AEC 000A6A2C C0 82 8B 04 */ lfs f4, "@127"@sda21(r2) +/* 800A9AF0 000A6A30 FC 60 18 50 */ fneg f3, f3 +/* 800A9AF4 000A6A34 EC C4 40 24 */ fdivs f6, f4, f8 +/* 800A9AF8 000A6A38 EC A0 01 B2 */ fmuls f5, f0, f6 +/* 800A9AFC 000A6A3C EC 81 01 B2 */ fmuls f4, f1, f6 +/* 800A9B00 000A6A40 EC 42 01 B2 */ fmuls f2, f2, f6 +/* 800A9B04 000A6A44 D0 A3 00 34 */ stfs f5, 0x34(r3) +/* 800A9B08 000A6A48 D0 83 00 38 */ stfs f4, 0x38(r3) +/* 800A9B0C 000A6A4C D0 43 00 3C */ stfs f2, 0x3c(r3) +/* 800A9B10 000A6A50 C0 82 8B 20 */ lfs f4, "@167"@sda21(r2) +/* 800A9B14 000A6A54 EC 44 00 32 */ fmuls f2, f4, f0 +/* 800A9B18 000A6A58 EC 24 00 72 */ fmuls f1, f4, f1 +/* 800A9B1C 000A6A5C EC 04 00 F2 */ fmuls f0, f4, f3 +/* 800A9B20 000A6A60 D0 43 00 28 */ stfs f2, 0x28(r3) +/* 800A9B24 000A6A64 D0 23 00 2C */ stfs f1, 0x2c(r3) +/* 800A9B28 000A6A68 D0 03 00 30 */ stfs f0, 0x30(r3) +/* 800A9B2C 000A6A6C 38 21 00 20 */ addi r1, r1, 0x20 +/* 800A9B30 000A6A70 4E 80 00 20 */ blr + +.global GXInitLightColor +GXInitLightColor: +/* 800A9B34 000A6A74 88 04 00 01 */ lbz r0, 1(r4) +/* 800A9B38 000A6A78 88 A4 00 00 */ lbz r5, 0(r4) +/* 800A9B3C 000A6A7C 88 C4 00 02 */ lbz r6, 2(r4) +/* 800A9B40 000A6A80 54 00 80 1E */ slwi r0, r0, 0x10 +/* 800A9B44 000A6A84 50 A0 C0 0E */ rlwimi r0, r5, 0x18, 0, 7 +/* 800A9B48 000A6A88 88 84 00 03 */ lbz r4, 3(r4) +/* 800A9B4C 000A6A8C 50 C0 44 2E */ rlwimi r0, r6, 8, 0x10, 0x17 +/* 800A9B50 000A6A90 7C 80 03 78 */ or r0, r4, r0 +/* 800A9B54 000A6A94 90 03 00 0C */ stw r0, 0xc(r3) +/* 800A9B58 000A6A98 4E 80 00 20 */ blr + +.global GXGetLightColor +GXGetLightColor: +/* 800A9B5C 000A6A9C 80 03 00 0C */ lwz r0, 0xc(r3) +/* 800A9B60 000A6AA0 54 00 46 3E */ srwi r0, r0, 0x18 +/* 800A9B64 000A6AA4 98 04 00 00 */ stb r0, 0(r4) +/* 800A9B68 000A6AA8 80 03 00 0C */ lwz r0, 0xc(r3) +/* 800A9B6C 000A6AAC 54 00 86 3E */ rlwinm r0, r0, 0x10, 0x18, 0x1f +/* 800A9B70 000A6AB0 98 04 00 01 */ stb r0, 1(r4) +/* 800A9B74 000A6AB4 80 03 00 0C */ lwz r0, 0xc(r3) +/* 800A9B78 000A6AB8 54 00 C6 3E */ rlwinm r0, r0, 0x18, 0x18, 0x1f +/* 800A9B7C 000A6ABC 98 04 00 02 */ stb r0, 2(r4) +/* 800A9B80 000A6AC0 80 03 00 0C */ lwz r0, 0xc(r3) +/* 800A9B84 000A6AC4 98 04 00 03 */ stb r0, 3(r4) +/* 800A9B88 000A6AC8 4E 80 00 20 */ blr + +.global GXLoadLightObjImm +GXLoadLightObjImm: +/* 800A9B8C 000A6ACC 2C 04 00 10 */ cmpwi r4, 0x10 +/* 800A9B90 000A6AD0 41 82 00 7C */ beq lbl_800A9C0C +/* 800A9B94 000A6AD4 40 80 00 34 */ bge lbl_800A9BC8 +/* 800A9B98 000A6AD8 2C 04 00 04 */ cmpwi r4, 4 +/* 800A9B9C 000A6ADC 41 82 00 60 */ beq lbl_800A9BFC +/* 800A9BA0 000A6AE0 40 80 00 1C */ bge lbl_800A9BBC +/* 800A9BA4 000A6AE4 2C 04 00 02 */ cmpwi r4, 2 +/* 800A9BA8 000A6AE8 41 82 00 4C */ beq lbl_800A9BF4 +/* 800A9BAC 000A6AEC 40 80 00 80 */ bge lbl_800A9C2C +/* 800A9BB0 000A6AF0 2C 04 00 01 */ cmpwi r4, 1 +/* 800A9BB4 000A6AF4 40 80 00 38 */ bge lbl_800A9BEC +/* 800A9BB8 000A6AF8 48 00 00 74 */ b lbl_800A9C2C +lbl_800A9BBC: +/* 800A9BBC 000A6AFC 2C 04 00 08 */ cmpwi r4, 8 +/* 800A9BC0 000A6B00 41 82 00 44 */ beq lbl_800A9C04 +/* 800A9BC4 000A6B04 48 00 00 68 */ b lbl_800A9C2C +lbl_800A9BC8: +/* 800A9BC8 000A6B08 2C 04 00 40 */ cmpwi r4, 0x40 +/* 800A9BCC 000A6B0C 41 82 00 50 */ beq lbl_800A9C1C +/* 800A9BD0 000A6B10 40 80 00 10 */ bge lbl_800A9BE0 +/* 800A9BD4 000A6B14 2C 04 00 20 */ cmpwi r4, 0x20 +/* 800A9BD8 000A6B18 41 82 00 3C */ beq lbl_800A9C14 +/* 800A9BDC 000A6B1C 48 00 00 50 */ b lbl_800A9C2C +lbl_800A9BE0: +/* 800A9BE0 000A6B20 2C 04 00 80 */ cmpwi r4, 0x80 +/* 800A9BE4 000A6B24 41 82 00 40 */ beq lbl_800A9C24 +/* 800A9BE8 000A6B28 48 00 00 44 */ b lbl_800A9C2C +lbl_800A9BEC: +/* 800A9BEC 000A6B2C 38 00 00 00 */ li r0, 0 +/* 800A9BF0 000A6B30 48 00 00 40 */ b lbl_800A9C30 +lbl_800A9BF4: +/* 800A9BF4 000A6B34 38 00 00 01 */ li r0, 1 +/* 800A9BF8 000A6B38 48 00 00 38 */ b lbl_800A9C30 +lbl_800A9BFC: +/* 800A9BFC 000A6B3C 38 00 00 02 */ li r0, 2 +/* 800A9C00 000A6B40 48 00 00 30 */ b lbl_800A9C30 +lbl_800A9C04: +/* 800A9C04 000A6B44 38 00 00 03 */ li r0, 3 +/* 800A9C08 000A6B48 48 00 00 28 */ b lbl_800A9C30 +lbl_800A9C0C: +/* 800A9C0C 000A6B4C 38 00 00 04 */ li r0, 4 +/* 800A9C10 000A6B50 48 00 00 20 */ b lbl_800A9C30 +lbl_800A9C14: +/* 800A9C14 000A6B54 38 00 00 05 */ li r0, 5 +/* 800A9C18 000A6B58 48 00 00 18 */ b lbl_800A9C30 +lbl_800A9C1C: +/* 800A9C1C 000A6B5C 38 00 00 06 */ li r0, 6 +/* 800A9C20 000A6B60 48 00 00 10 */ b lbl_800A9C30 +lbl_800A9C24: +/* 800A9C24 000A6B64 38 00 00 07 */ li r0, 7 +/* 800A9C28 000A6B68 48 00 00 08 */ b lbl_800A9C30 +lbl_800A9C2C: +/* 800A9C2C 000A6B6C 38 00 00 00 */ li r0, 0 +lbl_800A9C30: +/* 800A9C30 000A6B70 54 05 20 36 */ slwi r5, r0, 4 +/* 800A9C34 000A6B74 80 8D 82 C8 */ lwz r4, gx@sda21(r13) +/* 800A9C38 000A6B78 38 05 06 00 */ addi r0, r5, 0x600 +/* 800A9C3C 000A6B7C 38 A0 00 10 */ li r5, 0x10 +/* 800A9C40 000A6B80 3C C0 CC 01 */ lis r6, 0xCC008000@ha +/* 800A9C44 000A6B84 98 A6 80 00 */ stb r5, 0xCC008000@l(r6) +/* 800A9C48 000A6B88 64 00 00 0F */ oris r0, r0, 0xf +/* 800A9C4C 000A6B8C 38 A0 00 00 */ li r5, 0 +/* 800A9C50 000A6B90 90 06 80 00 */ stw r0, -0x8000(r6) +/* 800A9C54 000A6B94 38 00 00 01 */ li r0, 1 +/* 800A9C58 000A6B98 90 A6 80 00 */ stw r5, -0x8000(r6) +/* 800A9C5C 000A6B9C 90 A6 80 00 */ stw r5, -0x8000(r6) +/* 800A9C60 000A6BA0 90 A6 80 00 */ stw r5, -0x8000(r6) +/* 800A9C64 000A6BA4 80 A3 00 0C */ lwz r5, 0xc(r3) +/* 800A9C68 000A6BA8 90 A6 80 00 */ stw r5, -0x8000(r6) +/* 800A9C6C 000A6BAC C0 03 00 10 */ lfs f0, 0x10(r3) +/* 800A9C70 000A6BB0 D0 06 80 00 */ stfs f0, -0x8000(r6) +/* 800A9C74 000A6BB4 C0 03 00 14 */ lfs f0, 0x14(r3) +/* 800A9C78 000A6BB8 D0 06 80 00 */ stfs f0, -0x8000(r6) +/* 800A9C7C 000A6BBC C0 03 00 18 */ lfs f0, 0x18(r3) +/* 800A9C80 000A6BC0 D0 06 80 00 */ stfs f0, -0x8000(r6) +/* 800A9C84 000A6BC4 C0 03 00 1C */ lfs f0, 0x1c(r3) +/* 800A9C88 000A6BC8 D0 06 80 00 */ stfs f0, -0x8000(r6) +/* 800A9C8C 000A6BCC C0 03 00 20 */ lfs f0, 0x20(r3) +/* 800A9C90 000A6BD0 D0 06 80 00 */ stfs f0, -0x8000(r6) +/* 800A9C94 000A6BD4 C0 03 00 24 */ lfs f0, 0x24(r3) +/* 800A9C98 000A6BD8 D0 06 80 00 */ stfs f0, -0x8000(r6) +/* 800A9C9C 000A6BDC C0 03 00 28 */ lfs f0, 0x28(r3) +/* 800A9CA0 000A6BE0 D0 06 80 00 */ stfs f0, -0x8000(r6) +/* 800A9CA4 000A6BE4 C0 03 00 2C */ lfs f0, 0x2c(r3) +/* 800A9CA8 000A6BE8 D0 06 80 00 */ stfs f0, -0x8000(r6) +/* 800A9CAC 000A6BEC C0 03 00 30 */ lfs f0, 0x30(r3) +/* 800A9CB0 000A6BF0 D0 06 80 00 */ stfs f0, -0x8000(r6) +/* 800A9CB4 000A6BF4 C0 03 00 34 */ lfs f0, 0x34(r3) +/* 800A9CB8 000A6BF8 D0 06 80 00 */ stfs f0, -0x8000(r6) +/* 800A9CBC 000A6BFC C0 03 00 38 */ lfs f0, 0x38(r3) +/* 800A9CC0 000A6C00 D0 06 80 00 */ stfs f0, -0x8000(r6) +/* 800A9CC4 000A6C04 C0 03 00 3C */ lfs f0, 0x3c(r3) +/* 800A9CC8 000A6C08 D0 06 80 00 */ stfs f0, -0x8000(r6) +/* 800A9CCC 000A6C0C B0 04 00 02 */ sth r0, 2(r4) +/* 800A9CD0 000A6C10 4E 80 00 20 */ blr + +.global GXSetChanAmbColor +GXSetChanAmbColor: +/* 800A9CD4 000A6C14 2C 03 00 03 */ cmpwi r3, 3 +/* 800A9CD8 000A6C18 41 82 00 B0 */ beq lbl_800A9D88 +/* 800A9CDC 000A6C1C 40 80 00 1C */ bge lbl_800A9CF8 +/* 800A9CE0 000A6C20 2C 03 00 01 */ cmpwi r3, 1 +/* 800A9CE4 000A6C24 41 82 00 58 */ beq lbl_800A9D3C +/* 800A9CE8 000A6C28 40 80 00 88 */ bge lbl_800A9D70 +/* 800A9CEC 000A6C2C 2C 03 00 00 */ cmpwi r3, 0 +/* 800A9CF0 000A6C30 40 80 00 18 */ bge lbl_800A9D08 +/* 800A9CF4 000A6C34 4E 80 00 20 */ blr +lbl_800A9CF8: +/* 800A9CF8 000A6C38 2C 03 00 05 */ cmpwi r3, 5 +/* 800A9CFC 000A6C3C 41 82 00 D4 */ beq lbl_800A9DD0 +/* 800A9D00 000A6C40 4C 80 00 20 */ bgelr +/* 800A9D04 000A6C44 48 00 00 9C */ b lbl_800A9DA0 +lbl_800A9D08: +/* 800A9D08 000A6C48 80 AD 82 C8 */ lwz r5, gx@sda21(r13) +/* 800A9D0C 000A6C4C 38 60 00 00 */ li r3, 0 +/* 800A9D10 000A6C50 88 C4 00 02 */ lbz r6, 2(r4) +/* 800A9D14 000A6C54 80 E5 00 A8 */ lwz r7, 0xa8(r5) +/* 800A9D18 000A6C58 88 A4 00 01 */ lbz r5, 1(r4) +/* 800A9D1C 000A6C5C 88 04 00 00 */ lbz r0, 0(r4) +/* 800A9D20 000A6C60 54 E7 06 3E */ clrlwi r7, r7, 0x18 +/* 800A9D24 000A6C64 50 C7 44 2E */ rlwimi r7, r6, 8, 0x10, 0x17 +/* 800A9D28 000A6C68 54 A4 80 1E */ slwi r4, r5, 0x10 +/* 800A9D2C 000A6C6C 50 E4 04 3E */ rlwimi r4, r7, 0, 0x10, 0x1f +/* 800A9D30 000A6C70 54 07 C0 0E */ slwi r7, r0, 0x18 +/* 800A9D34 000A6C74 50 87 02 3E */ rlwimi r7, r4, 0, 8, 0x1f +/* 800A9D38 000A6C78 48 00 00 CC */ b lbl_800A9E04 +lbl_800A9D3C: +/* 800A9D3C 000A6C7C 80 AD 82 C8 */ lwz r5, gx@sda21(r13) +/* 800A9D40 000A6C80 38 60 00 01 */ li r3, 1 +/* 800A9D44 000A6C84 88 C4 00 02 */ lbz r6, 2(r4) +/* 800A9D48 000A6C88 80 E5 00 AC */ lwz r7, 0xac(r5) +/* 800A9D4C 000A6C8C 88 A4 00 01 */ lbz r5, 1(r4) +/* 800A9D50 000A6C90 88 04 00 00 */ lbz r0, 0(r4) +/* 800A9D54 000A6C94 54 E7 06 3E */ clrlwi r7, r7, 0x18 +/* 800A9D58 000A6C98 50 C7 44 2E */ rlwimi r7, r6, 8, 0x10, 0x17 +/* 800A9D5C 000A6C9C 54 A4 80 1E */ slwi r4, r5, 0x10 +/* 800A9D60 000A6CA0 50 E4 04 3E */ rlwimi r4, r7, 0, 0x10, 0x1f +/* 800A9D64 000A6CA4 54 07 C0 0E */ slwi r7, r0, 0x18 +/* 800A9D68 000A6CA8 50 87 02 3E */ rlwimi r7, r4, 0, 8, 0x1f +/* 800A9D6C 000A6CAC 48 00 00 98 */ b lbl_800A9E04 +lbl_800A9D70: +/* 800A9D70 000A6CB0 80 AD 82 C8 */ lwz r5, gx@sda21(r13) +/* 800A9D74 000A6CB4 38 60 00 00 */ li r3, 0 +/* 800A9D78 000A6CB8 88 E4 00 03 */ lbz r7, 3(r4) +/* 800A9D7C 000A6CBC 80 05 00 A8 */ lwz r0, 0xa8(r5) +/* 800A9D80 000A6CC0 50 07 00 2E */ rlwimi r7, r0, 0, 0, 0x17 +/* 800A9D84 000A6CC4 48 00 00 80 */ b lbl_800A9E04 +lbl_800A9D88: +/* 800A9D88 000A6CC8 80 AD 82 C8 */ lwz r5, gx@sda21(r13) +/* 800A9D8C 000A6CCC 38 60 00 01 */ li r3, 1 +/* 800A9D90 000A6CD0 88 E4 00 03 */ lbz r7, 3(r4) +/* 800A9D94 000A6CD4 80 05 00 AC */ lwz r0, 0xac(r5) +/* 800A9D98 000A6CD8 50 07 00 2E */ rlwimi r7, r0, 0, 0, 0x17 +/* 800A9D9C 000A6CDC 48 00 00 68 */ b lbl_800A9E04 +lbl_800A9DA0: +/* 800A9DA0 000A6CE0 88 04 00 02 */ lbz r0, 2(r4) +/* 800A9DA4 000A6CE4 38 60 00 00 */ li r3, 0 +/* 800A9DA8 000A6CE8 88 E4 00 03 */ lbz r7, 3(r4) +/* 800A9DAC 000A6CEC 54 06 40 2E */ slwi r6, r0, 8 +/* 800A9DB0 000A6CF0 88 A4 00 01 */ lbz r5, 1(r4) +/* 800A9DB4 000A6CF4 88 04 00 00 */ lbz r0, 0(r4) +/* 800A9DB8 000A6CF8 50 E6 06 3E */ rlwimi r6, r7, 0, 0x18, 0x1f +/* 800A9DBC 000A6CFC 54 A4 80 1E */ slwi r4, r5, 0x10 +/* 800A9DC0 000A6D00 50 C4 04 3E */ rlwimi r4, r6, 0, 0x10, 0x1f +/* 800A9DC4 000A6D04 54 07 C0 0E */ slwi r7, r0, 0x18 +/* 800A9DC8 000A6D08 50 87 02 3E */ rlwimi r7, r4, 0, 8, 0x1f +/* 800A9DCC 000A6D0C 48 00 00 38 */ b lbl_800A9E04 +lbl_800A9DD0: +/* 800A9DD0 000A6D10 88 04 00 02 */ lbz r0, 2(r4) +/* 800A9DD4 000A6D14 38 60 00 01 */ li r3, 1 +/* 800A9DD8 000A6D18 88 E4 00 03 */ lbz r7, 3(r4) +/* 800A9DDC 000A6D1C 54 06 40 2E */ slwi r6, r0, 8 +/* 800A9DE0 000A6D20 88 A4 00 01 */ lbz r5, 1(r4) +/* 800A9DE4 000A6D24 88 04 00 00 */ lbz r0, 0(r4) +/* 800A9DE8 000A6D28 50 E6 06 3E */ rlwimi r6, r7, 0, 0x18, 0x1f +/* 800A9DEC 000A6D2C 54 A4 80 1E */ slwi r4, r5, 0x10 +/* 800A9DF0 000A6D30 50 C4 04 3E */ rlwimi r4, r6, 0, 0x10, 0x1f +/* 800A9DF4 000A6D34 54 07 C0 0E */ slwi r7, r0, 0x18 +/* 800A9DF8 000A6D38 50 87 02 3E */ rlwimi r7, r4, 0, 8, 0x1f +/* 800A9DFC 000A6D3C 48 00 00 08 */ b lbl_800A9E04 +/* 800A9E00 000A6D40 4E 80 00 20 */ blr +lbl_800A9E04: +/* 800A9E04 000A6D44 38 00 00 10 */ li r0, 0x10 +/* 800A9E08 000A6D48 80 8D 82 C8 */ lwz r4, gx@sda21(r13) +/* 800A9E0C 000A6D4C 3C C0 CC 01 */ lis r6, 0xCC008000@ha +/* 800A9E10 000A6D50 98 06 80 00 */ stb r0, 0xCC008000@l(r6) +/* 800A9E14 000A6D54 38 03 10 0A */ addi r0, r3, 0x100a +/* 800A9E18 000A6D58 38 A0 00 01 */ li r5, 1 +/* 800A9E1C 000A6D5C 90 06 80 00 */ stw r0, -0x8000(r6) +/* 800A9E20 000A6D60 54 60 10 3A */ slwi r0, r3, 2 +/* 800A9E24 000A6D64 90 E6 80 00 */ stw r7, -0x8000(r6) +/* 800A9E28 000A6D68 B0 A4 00 02 */ sth r5, 2(r4) +/* 800A9E2C 000A6D6C 80 6D 82 C8 */ lwz r3, gx@sda21(r13) +/* 800A9E30 000A6D70 7C 63 02 14 */ add r3, r3, r0 +/* 800A9E34 000A6D74 90 E3 00 A8 */ stw r7, 0xa8(r3) +/* 800A9E38 000A6D78 4E 80 00 20 */ blr + +.global GXSetChanMatColor +GXSetChanMatColor: +/* 800A9E3C 000A6D7C 2C 03 00 03 */ cmpwi r3, 3 +/* 800A9E40 000A6D80 41 82 00 B0 */ beq lbl_800A9EF0 +/* 800A9E44 000A6D84 40 80 00 1C */ bge lbl_800A9E60 +/* 800A9E48 000A6D88 2C 03 00 01 */ cmpwi r3, 1 +/* 800A9E4C 000A6D8C 41 82 00 58 */ beq lbl_800A9EA4 +/* 800A9E50 000A6D90 40 80 00 88 */ bge lbl_800A9ED8 +/* 800A9E54 000A6D94 2C 03 00 00 */ cmpwi r3, 0 +/* 800A9E58 000A6D98 40 80 00 18 */ bge lbl_800A9E70 +/* 800A9E5C 000A6D9C 4E 80 00 20 */ blr +lbl_800A9E60: +/* 800A9E60 000A6DA0 2C 03 00 05 */ cmpwi r3, 5 +/* 800A9E64 000A6DA4 41 82 00 D4 */ beq lbl_800A9F38 +/* 800A9E68 000A6DA8 4C 80 00 20 */ bgelr +/* 800A9E6C 000A6DAC 48 00 00 9C */ b lbl_800A9F08 +lbl_800A9E70: +/* 800A9E70 000A6DB0 80 AD 82 C8 */ lwz r5, gx@sda21(r13) +/* 800A9E74 000A6DB4 38 60 00 00 */ li r3, 0 +/* 800A9E78 000A6DB8 88 C4 00 02 */ lbz r6, 2(r4) +/* 800A9E7C 000A6DBC 80 E5 00 B0 */ lwz r7, 0xb0(r5) +/* 800A9E80 000A6DC0 88 A4 00 01 */ lbz r5, 1(r4) +/* 800A9E84 000A6DC4 88 04 00 00 */ lbz r0, 0(r4) +/* 800A9E88 000A6DC8 54 E7 06 3E */ clrlwi r7, r7, 0x18 +/* 800A9E8C 000A6DCC 50 C7 44 2E */ rlwimi r7, r6, 8, 0x10, 0x17 +/* 800A9E90 000A6DD0 54 A4 80 1E */ slwi r4, r5, 0x10 +/* 800A9E94 000A6DD4 50 E4 04 3E */ rlwimi r4, r7, 0, 0x10, 0x1f +/* 800A9E98 000A6DD8 54 07 C0 0E */ slwi r7, r0, 0x18 +/* 800A9E9C 000A6DDC 50 87 02 3E */ rlwimi r7, r4, 0, 8, 0x1f +/* 800A9EA0 000A6DE0 48 00 00 CC */ b lbl_800A9F6C +lbl_800A9EA4: +/* 800A9EA4 000A6DE4 80 AD 82 C8 */ lwz r5, gx@sda21(r13) +/* 800A9EA8 000A6DE8 38 60 00 01 */ li r3, 1 +/* 800A9EAC 000A6DEC 88 C4 00 02 */ lbz r6, 2(r4) +/* 800A9EB0 000A6DF0 80 E5 00 B4 */ lwz r7, 0xb4(r5) +/* 800A9EB4 000A6DF4 88 A4 00 01 */ lbz r5, 1(r4) +/* 800A9EB8 000A6DF8 88 04 00 00 */ lbz r0, 0(r4) +/* 800A9EBC 000A6DFC 54 E7 06 3E */ clrlwi r7, r7, 0x18 +/* 800A9EC0 000A6E00 50 C7 44 2E */ rlwimi r7, r6, 8, 0x10, 0x17 +/* 800A9EC4 000A6E04 54 A4 80 1E */ slwi r4, r5, 0x10 +/* 800A9EC8 000A6E08 50 E4 04 3E */ rlwimi r4, r7, 0, 0x10, 0x1f +/* 800A9ECC 000A6E0C 54 07 C0 0E */ slwi r7, r0, 0x18 +/* 800A9ED0 000A6E10 50 87 02 3E */ rlwimi r7, r4, 0, 8, 0x1f +/* 800A9ED4 000A6E14 48 00 00 98 */ b lbl_800A9F6C +lbl_800A9ED8: +/* 800A9ED8 000A6E18 80 AD 82 C8 */ lwz r5, gx@sda21(r13) +/* 800A9EDC 000A6E1C 38 60 00 00 */ li r3, 0 +/* 800A9EE0 000A6E20 88 E4 00 03 */ lbz r7, 3(r4) +/* 800A9EE4 000A6E24 80 05 00 B0 */ lwz r0, 0xb0(r5) +/* 800A9EE8 000A6E28 50 07 00 2E */ rlwimi r7, r0, 0, 0, 0x17 +/* 800A9EEC 000A6E2C 48 00 00 80 */ b lbl_800A9F6C +lbl_800A9EF0: +/* 800A9EF0 000A6E30 80 AD 82 C8 */ lwz r5, gx@sda21(r13) +/* 800A9EF4 000A6E34 38 60 00 01 */ li r3, 1 +/* 800A9EF8 000A6E38 88 E4 00 03 */ lbz r7, 3(r4) +/* 800A9EFC 000A6E3C 80 05 00 B4 */ lwz r0, 0xb4(r5) +/* 800A9F00 000A6E40 50 07 00 2E */ rlwimi r7, r0, 0, 0, 0x17 +/* 800A9F04 000A6E44 48 00 00 68 */ b lbl_800A9F6C +lbl_800A9F08: +/* 800A9F08 000A6E48 88 04 00 02 */ lbz r0, 2(r4) +/* 800A9F0C 000A6E4C 38 60 00 00 */ li r3, 0 +/* 800A9F10 000A6E50 88 E4 00 03 */ lbz r7, 3(r4) +/* 800A9F14 000A6E54 54 06 40 2E */ slwi r6, r0, 8 +/* 800A9F18 000A6E58 88 A4 00 01 */ lbz r5, 1(r4) +/* 800A9F1C 000A6E5C 88 04 00 00 */ lbz r0, 0(r4) +/* 800A9F20 000A6E60 50 E6 06 3E */ rlwimi r6, r7, 0, 0x18, 0x1f +/* 800A9F24 000A6E64 54 A4 80 1E */ slwi r4, r5, 0x10 +/* 800A9F28 000A6E68 50 C4 04 3E */ rlwimi r4, r6, 0, 0x10, 0x1f +/* 800A9F2C 000A6E6C 54 07 C0 0E */ slwi r7, r0, 0x18 +/* 800A9F30 000A6E70 50 87 02 3E */ rlwimi r7, r4, 0, 8, 0x1f +/* 800A9F34 000A6E74 48 00 00 38 */ b lbl_800A9F6C +lbl_800A9F38: +/* 800A9F38 000A6E78 88 04 00 02 */ lbz r0, 2(r4) +/* 800A9F3C 000A6E7C 38 60 00 01 */ li r3, 1 +/* 800A9F40 000A6E80 88 E4 00 03 */ lbz r7, 3(r4) +/* 800A9F44 000A6E84 54 06 40 2E */ slwi r6, r0, 8 +/* 800A9F48 000A6E88 88 A4 00 01 */ lbz r5, 1(r4) +/* 800A9F4C 000A6E8C 88 04 00 00 */ lbz r0, 0(r4) +/* 800A9F50 000A6E90 50 E6 06 3E */ rlwimi r6, r7, 0, 0x18, 0x1f +/* 800A9F54 000A6E94 54 A4 80 1E */ slwi r4, r5, 0x10 +/* 800A9F58 000A6E98 50 C4 04 3E */ rlwimi r4, r6, 0, 0x10, 0x1f +/* 800A9F5C 000A6E9C 54 07 C0 0E */ slwi r7, r0, 0x18 +/* 800A9F60 000A6EA0 50 87 02 3E */ rlwimi r7, r4, 0, 8, 0x1f +/* 800A9F64 000A6EA4 48 00 00 08 */ b lbl_800A9F6C +/* 800A9F68 000A6EA8 4E 80 00 20 */ blr +lbl_800A9F6C: +/* 800A9F6C 000A6EAC 38 00 00 10 */ li r0, 0x10 +/* 800A9F70 000A6EB0 80 8D 82 C8 */ lwz r4, gx@sda21(r13) +/* 800A9F74 000A6EB4 3C C0 CC 01 */ lis r6, 0xCC008000@ha +/* 800A9F78 000A6EB8 98 06 80 00 */ stb r0, 0xCC008000@l(r6) +/* 800A9F7C 000A6EBC 38 03 10 0C */ addi r0, r3, 0x100c +/* 800A9F80 000A6EC0 38 A0 00 01 */ li r5, 1 +/* 800A9F84 000A6EC4 90 06 80 00 */ stw r0, -0x8000(r6) +/* 800A9F88 000A6EC8 54 60 10 3A */ slwi r0, r3, 2 +/* 800A9F8C 000A6ECC 90 E6 80 00 */ stw r7, -0x8000(r6) +/* 800A9F90 000A6ED0 B0 A4 00 02 */ sth r5, 2(r4) +/* 800A9F94 000A6ED4 80 6D 82 C8 */ lwz r3, gx@sda21(r13) +/* 800A9F98 000A6ED8 7C 63 02 14 */ add r3, r3, r0 +/* 800A9F9C 000A6EDC 90 E3 00 B0 */ stw r7, 0xb0(r3) +/* 800A9FA0 000A6EE0 4E 80 00 20 */ blr + +.global GXSetNumChans +GXSetNumChans: +/* 800A9FA4 000A6EE4 80 8D 82 C8 */ lwz r4, gx@sda21(r13) +/* 800A9FA8 000A6EE8 54 67 06 3E */ clrlwi r7, r3, 0x18 +/* 800A9FAC 000A6EEC 54 60 25 36 */ rlwinm r0, r3, 4, 0x14, 0x1b +/* 800A9FB0 000A6EF0 38 C4 02 04 */ addi r6, r4, 0x204 +/* 800A9FB4 000A6EF4 80 A4 02 04 */ lwz r5, 0x204(r4) +/* 800A9FB8 000A6EF8 38 60 00 10 */ li r3, 0x10 +/* 800A9FBC 000A6EFC 3C 80 CC 01 */ lis r4, 0xCC008000@ha +/* 800A9FC0 000A6F00 54 A5 07 30 */ rlwinm r5, r5, 0, 0x1c, 0x18 +/* 800A9FC4 000A6F04 7C A0 03 78 */ or r0, r5, r0 +/* 800A9FC8 000A6F08 90 06 00 00 */ stw r0, 0(r6) +/* 800A9FCC 000A6F0C 38 00 10 09 */ li r0, 0x1009 +/* 800A9FD0 000A6F10 98 64 80 00 */ stb r3, 0xCC008000@l(r4) +/* 800A9FD4 000A6F14 80 6D 82 C8 */ lwz r3, gx@sda21(r13) +/* 800A9FD8 000A6F18 90 04 80 00 */ stw r0, -0x8000(r4) +/* 800A9FDC 000A6F1C 90 E4 80 00 */ stw r7, -0x8000(r4) +/* 800A9FE0 000A6F20 80 03 04 F4 */ lwz r0, 0x4f4(r3) +/* 800A9FE4 000A6F24 60 00 00 04 */ ori r0, r0, 4 +/* 800A9FE8 000A6F28 90 03 04 F4 */ stw r0, 0x4f4(r3) +/* 800A9FEC 000A6F2C 4E 80 00 20 */ blr + +.global GXSetChanCtrl +GXSetChanCtrl: +/* 800A9FF0 000A6F30 94 21 FF C8 */ stwu r1, -0x38(r1) +/* 800A9FF4 000A6F34 2C 03 00 04 */ cmpwi r3, 4 +/* 800A9FF8 000A6F38 93 E1 00 34 */ stw r31, 0x34(r1) +/* 800A9FFC 000A6F3C 93 C1 00 30 */ stw r30, 0x30(r1) +/* 800AA000 000A6F40 93 A1 00 2C */ stw r29, 0x2c(r1) +/* 800AA004 000A6F44 93 81 00 28 */ stw r28, 0x28(r1) +/* 800AA008 000A6F48 40 82 00 0C */ bne lbl_800AA014 +/* 800AA00C 000A6F4C 39 60 00 00 */ li r11, 0 +/* 800AA010 000A6F50 48 00 00 18 */ b lbl_800AA028 +lbl_800AA014: +/* 800AA014 000A6F54 2C 03 00 05 */ cmpwi r3, 5 +/* 800AA018 000A6F58 40 82 00 0C */ bne lbl_800AA024 +/* 800AA01C 000A6F5C 39 60 00 01 */ li r11, 1 +/* 800AA020 000A6F60 48 00 00 08 */ b lbl_800AA028 +lbl_800AA024: +/* 800AA024 000A6F64 7C 6B 1B 78 */ mr r11, r3 +lbl_800AA028: +/* 800AA028 000A6F68 54 84 0D FC */ rlwinm r4, r4, 1, 0x17, 0x1e +/* 800AA02C 000A6F6C 7C 8A 33 78 */ or r10, r4, r6 +/* 800AA030 000A6F70 54 E0 07 FE */ clrlwi r0, r7, 0x1f +/* 800AA034 000A6F74 7C C0 00 D0 */ neg r6, r0 +/* 800AA038 000A6F78 30 86 FF FF */ addic r4, r6, -1 +/* 800AA03C 000A6F7C 54 E0 07 BC */ rlwinm r0, r7, 0, 0x1e, 0x1e +/* 800AA040 000A6F80 7D 80 00 D0 */ neg r12, r0 +/* 800AA044 000A6F84 7C C4 31 10 */ subfe r6, r4, r6 +/* 800AA048 000A6F88 30 8C FF FF */ addic r4, r12, -1 +/* 800AA04C 000A6F8C 7C 84 61 10 */ subfe r4, r4, r12 +/* 800AA050 000A6F90 54 E0 07 7A */ rlwinm r0, r7, 0, 0x1d, 0x1d +/* 800AA054 000A6F94 7F 80 00 D0 */ neg r28, r0 +/* 800AA058 000A6F98 30 1C FF FF */ addic r0, r28, -1 +/* 800AA05C 000A6F9C 54 EC 07 38 */ rlwinm r12, r7, 0, 0x1c, 0x1c +/* 800AA060 000A6FA0 7C 00 E1 10 */ subfe r0, r0, r28 +/* 800AA064 000A6FA4 7F AC 00 D0 */ neg r29, r12 +/* 800AA068 000A6FA8 33 9D FF FF */ addic r28, r29, -1 +/* 800AA06C 000A6FAC 54 EC 06 F6 */ rlwinm r12, r7, 0, 0x1b, 0x1b +/* 800AA070 000A6FB0 7F CC 00 D0 */ neg r30, r12 +/* 800AA074 000A6FB4 7F 9C E9 10 */ subfe r28, r28, r29 +/* 800AA078 000A6FB8 33 BE FF FF */ addic r29, r30, -1 +/* 800AA07C 000A6FBC 54 EC 06 B4 */ rlwinm r12, r7, 0, 0x1a, 0x1a +/* 800AA080 000A6FC0 7F EC 00 D0 */ neg r31, r12 +/* 800AA084 000A6FC4 7F BD F1 10 */ subfe r29, r29, r30 +/* 800AA088 000A6FC8 33 DF FF FF */ addic r30, r31, -1 +/* 800AA08C 000A6FCC 54 EC 06 72 */ rlwinm r12, r7, 0, 0x19, 0x19 +/* 800AA090 000A6FD0 7F DE F9 10 */ subfe r30, r30, r31 +/* 800AA094 000A6FD4 7F EC 00 D0 */ neg r31, r12 +/* 800AA098 000A6FD8 31 9F FF FF */ addic r12, r31, -1 +/* 800AA09C 000A6FDC 55 4A 06 B0 */ rlwinm r10, r10, 0, 0x1a, 0x18 +/* 800AA0A0 000A6FE0 54 A5 30 32 */ slwi r5, r5, 6 +/* 800AA0A4 000A6FE4 7D 45 2B 78 */ or r5, r10, r5 +/* 800AA0A8 000A6FE8 54 AA 07 B8 */ rlwinm r10, r5, 0, 0x1e, 0x1c +/* 800AA0AC 000A6FEC 54 C5 10 3A */ slwi r5, r6, 2 +/* 800AA0B0 000A6FF0 7D 45 2B 78 */ or r5, r10, r5 +/* 800AA0B4 000A6FF4 54 A5 07 76 */ rlwinm r5, r5, 0, 0x1d, 0x1b +/* 800AA0B8 000A6FF8 54 84 18 38 */ slwi r4, r4, 3 +/* 800AA0BC 000A6FFC 7C A4 23 78 */ or r4, r5, r4 +/* 800AA0C0 000A7000 54 84 07 34 */ rlwinm r4, r4, 0, 0x1c, 0x1a +/* 800AA0C4 000A7004 54 00 20 36 */ slwi r0, r0, 4 +/* 800AA0C8 000A7008 7C 80 03 78 */ or r0, r4, r0 +/* 800AA0CC 000A700C 54 04 06 F2 */ rlwinm r4, r0, 0, 0x1b, 0x19 +/* 800AA0D0 000A7010 57 80 28 34 */ slwi r0, r28, 5 +/* 800AA0D4 000A7014 7C 80 03 78 */ or r0, r4, r0 +/* 800AA0D8 000A7018 54 04 05 66 */ rlwinm r4, r0, 0, 0x15, 0x13 +/* 800AA0DC 000A701C 57 A0 58 28 */ slwi r0, r29, 0xb +/* 800AA0E0 000A7020 7C 80 03 78 */ or r0, r4, r0 +/* 800AA0E4 000A7024 54 04 05 24 */ rlwinm r4, r0, 0, 0x14, 0x12 +/* 800AA0E8 000A7028 57 C0 60 26 */ slwi r0, r30, 0xc +/* 800AA0EC 000A702C 7C 80 03 78 */ or r0, r4, r0 +/* 800AA0F0 000A7030 54 E7 06 30 */ rlwinm r7, r7, 0, 0x18, 0x18 +/* 800AA0F4 000A7034 7F EC F9 10 */ subfe r31, r12, r31 +/* 800AA0F8 000A7038 7D 87 00 D0 */ neg r12, r7 +/* 800AA0FC 000A703C 30 EC FF FF */ addic r7, r12, -1 +/* 800AA100 000A7040 54 04 04 E2 */ rlwinm r4, r0, 0, 0x13, 0x11 +/* 800AA104 000A7044 57 E0 68 24 */ slwi r0, r31, 0xd +/* 800AA108 000A7048 7C 80 03 78 */ or r0, r4, r0 +/* 800AA10C 000A704C 7C E7 61 10 */ subfe r7, r7, r12 +/* 800AA110 000A7050 54 04 04 A0 */ rlwinm r4, r0, 0, 0x12, 0x10 +/* 800AA114 000A7054 54 E0 70 22 */ slwi r0, r7, 0xe +/* 800AA118 000A7058 2C 09 00 00 */ cmpwi r9, 0 +/* 800AA11C 000A705C 7C 86 03 78 */ or r6, r4, r0 +/* 800AA120 000A7060 40 82 00 08 */ bne lbl_800AA128 +/* 800AA124 000A7064 39 00 00 00 */ li r8, 0 +lbl_800AA128: +/* 800AA128 000A7068 20 A9 00 02 */ subfic r5, r9, 2 +/* 800AA12C 000A706C 80 8D 82 C8 */ lwz r4, gx@sda21(r13) +/* 800AA130 000A7070 30 05 FF FF */ addic r0, r5, -1 +/* 800AA134 000A7074 7D 40 29 10 */ subfe r10, r0, r5 +/* 800AA138 000A7078 7C A9 00 D0 */ neg r5, r9 +/* 800AA13C 000A707C 30 05 FF FF */ addic r0, r5, -1 +/* 800AA140 000A7080 7C E0 29 10 */ subfe r7, r0, r5 +/* 800AA144 000A7084 54 C5 06 6C */ rlwinm r5, r6, 0, 0x19, 0x16 +/* 800AA148 000A7088 55 00 38 30 */ slwi r0, r8, 7 +/* 800AA14C 000A708C 7C A8 03 78 */ or r8, r5, r0 +/* 800AA150 000A7090 38 C0 00 10 */ li r6, 0x10 +/* 800AA154 000A7094 3C A0 CC 01 */ lis r5, 0xCC008000@ha +/* 800AA158 000A7098 98 C5 80 00 */ stb r6, 0xCC008000@l(r5) +/* 800AA15C 000A709C 38 0B 10 0E */ addi r0, r11, 0x100e +/* 800AA160 000A70A0 55 09 05 EA */ rlwinm r9, r8, 0, 0x17, 0x15 +/* 800AA164 000A70A4 55 48 48 2C */ slwi r8, r10, 9 +/* 800AA168 000A70A8 90 05 80 00 */ stw r0, -0x8000(r5) +/* 800AA16C 000A70AC 7D 20 43 78 */ or r0, r9, r8 +/* 800AA170 000A70B0 54 08 05 A8 */ rlwinm r8, r0, 0, 0x16, 0x14 +/* 800AA174 000A70B4 54 E0 50 2A */ slwi r0, r7, 0xa +/* 800AA178 000A70B8 7D 07 03 78 */ or r7, r8, r0 +/* 800AA17C 000A70BC 90 E5 80 00 */ stw r7, -0x8000(r5) +/* 800AA180 000A70C0 38 00 00 01 */ li r0, 1 +/* 800AA184 000A70C4 2C 03 00 04 */ cmpwi r3, 4 +/* 800AA188 000A70C8 B0 04 00 02 */ sth r0, 2(r4) +/* 800AA18C 000A70CC 40 82 00 18 */ bne lbl_800AA1A4 +/* 800AA190 000A70D0 98 C5 80 00 */ stb r6, -0x8000(r5) +/* 800AA194 000A70D4 38 00 10 10 */ li r0, 0x1010 +/* 800AA198 000A70D8 90 05 80 00 */ stw r0, -0x8000(r5) +/* 800AA19C 000A70DC 90 E5 80 00 */ stw r7, -0x8000(r5) +/* 800AA1A0 000A70E0 48 00 00 1C */ b lbl_800AA1BC +lbl_800AA1A4: +/* 800AA1A4 000A70E4 2C 03 00 05 */ cmpwi r3, 5 +/* 800AA1A8 000A70E8 40 82 00 14 */ bne lbl_800AA1BC +/* 800AA1AC 000A70EC 98 C5 80 00 */ stb r6, -0x8000(r5) +/* 800AA1B0 000A70F0 38 00 10 11 */ li r0, 0x1011 +/* 800AA1B4 000A70F4 90 05 80 00 */ stw r0, -0x8000(r5) +/* 800AA1B8 000A70F8 90 E5 80 00 */ stw r7, -0x8000(r5) +lbl_800AA1BC: +/* 800AA1BC 000A70FC 83 E1 00 34 */ lwz r31, 0x34(r1) +/* 800AA1C0 000A7100 83 C1 00 30 */ lwz r30, 0x30(r1) +/* 800AA1C4 000A7104 83 A1 00 2C */ lwz r29, 0x2c(r1) +/* 800AA1C8 000A7108 83 81 00 28 */ lwz r28, 0x28(r1) +/* 800AA1CC 000A710C 38 21 00 38 */ addi r1, r1, 0x38 +/* 800AA1D0 000A7110 4E 80 00 20 */ blr + +.section .sdata2, "a" # 0x8040B460 - 0x80414020 +.balign 8 +"@121": + .4byte 0 +"@127": + .4byte 0x3F800000 +"@148": + .4byte 0x3F000000 + .4byte 0 +"@165": + .4byte 0x3FE00000 + .4byte 0 +"@166": + .4byte 0x40080000 + .4byte 0 +"@167": + .4byte 0x49800000 + .4byte 0 diff --git a/asm/Dolphin/gx/GXMisc.s b/asm/Dolphin/gx/GXMisc.s new file mode 100644 index 0000000..d1ba191 --- /dev/null +++ b/asm/Dolphin/gx/GXMisc.s @@ -0,0 +1,499 @@ +.include "macros.inc" + +.section .text, "ax" # 0x80005600 - 0x8036FBA0 +.global GXSetMisc +GXSetMisc: +/* 800A8198 000A50D8 2C 03 00 01 */ cmpwi r3, 1 +/* 800A819C 000A50DC 41 82 00 14 */ beq lbl_800A81B0 +/* 800A81A0 000A50E0 4D 80 00 20 */ bltlr +/* 800A81A4 000A50E4 2C 03 00 03 */ cmpwi r3, 3 +/* 800A81A8 000A50E8 4C 80 00 20 */ bgelr +/* 800A81AC 000A50EC 48 00 00 4C */ b lbl_800A81F8 +lbl_800A81B0: +/* 800A81B0 000A50F0 80 6D 82 C8 */ lwz r3, gx@sda21(r13) +/* 800A81B4 000A50F4 38 00 00 01 */ li r0, 1 +/* 800A81B8 000A50F8 B0 83 00 04 */ sth r4, 4(r3) +/* 800A81BC 000A50FC 80 8D 82 C8 */ lwz r4, gx@sda21(r13) +/* 800A81C0 000A5100 A0 64 00 04 */ lhz r3, 4(r4) +/* 800A81C4 000A5104 7C 63 00 34 */ cntlzw r3, r3 +/* 800A81C8 000A5108 54 63 DC 3E */ rlwinm r3, r3, 0x1b, 0x10, 0x1f +/* 800A81CC 000A510C B0 64 00 00 */ sth r3, 0(r4) +/* 800A81D0 000A5110 80 6D 82 C8 */ lwz r3, gx@sda21(r13) +/* 800A81D4 000A5114 B0 03 00 02 */ sth r0, 2(r3) +/* 800A81D8 000A5118 80 6D 82 C8 */ lwz r3, gx@sda21(r13) +/* 800A81DC 000A511C A0 03 00 04 */ lhz r0, 4(r3) +/* 800A81E0 000A5120 28 00 00 00 */ cmplwi r0, 0 +/* 800A81E4 000A5124 4D 82 00 20 */ beqlr +/* 800A81E8 000A5128 80 03 04 F4 */ lwz r0, 0x4f4(r3) +/* 800A81EC 000A512C 60 00 00 08 */ ori r0, r0, 8 +/* 800A81F0 000A5130 90 03 04 F4 */ stw r0, 0x4f4(r3) +/* 800A81F4 000A5134 4E 80 00 20 */ blr +lbl_800A81F8: +/* 800A81F8 000A5138 7C 84 00 D0 */ neg r4, r4 +/* 800A81FC 000A513C 80 6D 82 C8 */ lwz r3, gx@sda21(r13) +/* 800A8200 000A5140 30 04 FF FF */ addic r0, r4, -1 +/* 800A8204 000A5144 7C 00 21 10 */ subfe r0, r0, r4 +/* 800A8208 000A5148 98 03 04 F1 */ stb r0, 0x4f1(r3) +/* 800A820C 000A514C 4E 80 00 20 */ blr + +.global GXFlush +GXFlush: +/* 800A8210 000A5150 7C 08 02 A6 */ mflr r0 +/* 800A8214 000A5154 90 01 00 04 */ stw r0, 4(r1) +/* 800A8218 000A5158 94 21 FF F8 */ stwu r1, -8(r1) +/* 800A821C 000A515C 80 6D 82 C8 */ lwz r3, gx@sda21(r13) +/* 800A8220 000A5160 80 03 04 F4 */ lwz r0, 0x4f4(r3) +/* 800A8224 000A5164 28 00 00 00 */ cmplwi r0, 0 +/* 800A8228 000A5168 41 82 00 08 */ beq lbl_800A8230 +/* 800A822C 000A516C 48 00 05 DD */ bl __GXSetDirtyState +lbl_800A8230: +/* 800A8230 000A5170 38 00 00 00 */ li r0, 0 +/* 800A8234 000A5174 3C 60 CC 01 */ lis r3, 0xCC008000@ha +/* 800A8238 000A5178 90 03 80 00 */ stw r0, 0xCC008000@l(r3) +/* 800A823C 000A517C 90 03 80 00 */ stw r0, -0x8000(r3) +/* 800A8240 000A5180 90 03 80 00 */ stw r0, -0x8000(r3) +/* 800A8244 000A5184 90 03 80 00 */ stw r0, -0x8000(r3) +/* 800A8248 000A5188 90 03 80 00 */ stw r0, -0x8000(r3) +/* 800A824C 000A518C 90 03 80 00 */ stw r0, -0x8000(r3) +/* 800A8250 000A5190 90 03 80 00 */ stw r0, -0x8000(r3) +/* 800A8254 000A5194 90 03 80 00 */ stw r0, -0x8000(r3) +/* 800A8258 000A5198 4B FE 41 81 */ bl PPCSync +/* 800A825C 000A519C 80 01 00 0C */ lwz r0, 0xc(r1) +/* 800A8260 000A51A0 38 21 00 08 */ addi r1, r1, 8 +/* 800A8264 000A51A4 7C 08 03 A6 */ mtlr r0 +/* 800A8268 000A51A8 4E 80 00 20 */ blr + +.global GXSetDrawSync +GXSetDrawSync: +/* 800A826C 000A51AC 7C 08 02 A6 */ mflr r0 +/* 800A8270 000A51B0 90 01 00 04 */ stw r0, 4(r1) +/* 800A8274 000A51B4 94 21 FF E8 */ stwu r1, -0x18(r1) +/* 800A8278 000A51B8 93 E1 00 14 */ stw r31, 0x14(r1) +/* 800A827C 000A51BC 93 C1 00 10 */ stw r30, 0x10(r1) +/* 800A8280 000A51C0 7C 7E 1B 78 */ mr r30, r3 +/* 800A8284 000A51C4 4B FE 7F 49 */ bl OSDisableInterrupts +/* 800A8288 000A51C8 38 C0 00 61 */ li r6, 0x61 +/* 800A828C 000A51CC 80 8D 82 C8 */ lwz r4, gx@sda21(r13) +/* 800A8290 000A51D0 3C A0 CC 01 */ lis r5, 0xCC008000@ha +/* 800A8294 000A51D4 57 C0 04 3E */ clrlwi r0, r30, 0x10 +/* 800A8298 000A51D8 98 C5 80 00 */ stb r6, 0xCC008000@l(r5) +/* 800A829C 000A51DC 64 00 48 00 */ oris r0, r0, 0x4800 +/* 800A82A0 000A51E0 90 05 80 00 */ stw r0, -0x8000(r5) +/* 800A82A4 000A51E4 54 00 00 1E */ rlwinm r0, r0, 0, 0, 0xf +/* 800A82A8 000A51E8 53 C0 04 3E */ rlwimi r0, r30, 0, 0x10, 0x1f +/* 800A82AC 000A51EC 54 00 02 3E */ clrlwi r0, r0, 8 +/* 800A82B0 000A51F0 98 C5 80 00 */ stb r6, -0x8000(r5) +/* 800A82B4 000A51F4 64 00 47 00 */ oris r0, r0, 0x4700 +/* 800A82B8 000A51F8 90 05 80 00 */ stw r0, -0x8000(r5) +/* 800A82BC 000A51FC 7C 7E 1B 78 */ mr r30, r3 +/* 800A82C0 000A5200 80 04 04 F4 */ lwz r0, 0x4f4(r4) +/* 800A82C4 000A5204 28 00 00 00 */ cmplwi r0, 0 +/* 800A82C8 000A5208 41 82 00 08 */ beq lbl_800A82D0 +/* 800A82CC 000A520C 48 00 05 3D */ bl __GXSetDirtyState +lbl_800A82D0: +/* 800A82D0 000A5210 3B E0 00 00 */ li r31, 0 +/* 800A82D4 000A5214 3C 60 CC 01 */ lis r3, 0xCC008000@ha +/* 800A82D8 000A5218 93 E3 80 00 */ stw r31, 0xCC008000@l(r3) +/* 800A82DC 000A521C 93 E3 80 00 */ stw r31, -0x8000(r3) +/* 800A82E0 000A5220 93 E3 80 00 */ stw r31, -0x8000(r3) +/* 800A82E4 000A5224 93 E3 80 00 */ stw r31, -0x8000(r3) +/* 800A82E8 000A5228 93 E3 80 00 */ stw r31, -0x8000(r3) +/* 800A82EC 000A522C 93 E3 80 00 */ stw r31, -0x8000(r3) +/* 800A82F0 000A5230 93 E3 80 00 */ stw r31, -0x8000(r3) +/* 800A82F4 000A5234 93 E3 80 00 */ stw r31, -0x8000(r3) +/* 800A82F8 000A5238 4B FE 40 E1 */ bl PPCSync +/* 800A82FC 000A523C 7F C3 F3 78 */ mr r3, r30 +/* 800A8300 000A5240 4B FE 7E F5 */ bl OSRestoreInterrupts +/* 800A8304 000A5244 80 6D 82 C8 */ lwz r3, gx@sda21(r13) +/* 800A8308 000A5248 B3 E3 00 02 */ sth r31, 2(r3) +/* 800A830C 000A524C 80 01 00 1C */ lwz r0, 0x1c(r1) +/* 800A8310 000A5250 83 E1 00 14 */ lwz r31, 0x14(r1) +/* 800A8314 000A5254 83 C1 00 10 */ lwz r30, 0x10(r1) +/* 800A8318 000A5258 38 21 00 18 */ addi r1, r1, 0x18 +/* 800A831C 000A525C 7C 08 03 A6 */ mtlr r0 +/* 800A8320 000A5260 4E 80 00 20 */ blr + +.global GXSetDrawDone +GXSetDrawDone: +/* 800A8324 000A5264 7C 08 02 A6 */ mflr r0 +/* 800A8328 000A5268 90 01 00 04 */ stw r0, 4(r1) +/* 800A832C 000A526C 94 21 FF E8 */ stwu r1, -0x18(r1) +/* 800A8330 000A5270 93 E1 00 14 */ stw r31, 0x14(r1) +/* 800A8334 000A5274 93 C1 00 10 */ stw r30, 0x10(r1) +/* 800A8338 000A5278 4B FE 7E 95 */ bl OSDisableInterrupts +/* 800A833C 000A527C 38 00 00 61 */ li r0, 0x61 +/* 800A8340 000A5280 80 8D 82 C8 */ lwz r4, gx@sda21(r13) +/* 800A8344 000A5284 3C C0 CC 01 */ lis r6, 0xCC008000@ha +/* 800A8348 000A5288 3C A0 45 00 */ lis r5, 0x45000002@ha +/* 800A834C 000A528C 98 06 80 00 */ stb r0, 0xCC008000@l(r6) +/* 800A8350 000A5290 38 05 00 02 */ addi r0, r5, 0x45000002@l +/* 800A8354 000A5294 90 06 80 00 */ stw r0, -0x8000(r6) +/* 800A8358 000A5298 7C 7E 1B 78 */ mr r30, r3 +/* 800A835C 000A529C 80 04 04 F4 */ lwz r0, 0x4f4(r4) +/* 800A8360 000A52A0 28 00 00 00 */ cmplwi r0, 0 +/* 800A8364 000A52A4 41 82 00 08 */ beq lbl_800A836C +/* 800A8368 000A52A8 48 00 04 A1 */ bl __GXSetDirtyState +lbl_800A836C: +/* 800A836C 000A52AC 3B E0 00 00 */ li r31, 0 +/* 800A8370 000A52B0 3C 60 CC 01 */ lis r3, 0xCC008000@ha +/* 800A8374 000A52B4 93 E3 80 00 */ stw r31, 0xCC008000@l(r3) +/* 800A8378 000A52B8 93 E3 80 00 */ stw r31, -0x8000(r3) +/* 800A837C 000A52BC 93 E3 80 00 */ stw r31, -0x8000(r3) +/* 800A8380 000A52C0 93 E3 80 00 */ stw r31, -0x8000(r3) +/* 800A8384 000A52C4 93 E3 80 00 */ stw r31, -0x8000(r3) +/* 800A8388 000A52C8 93 E3 80 00 */ stw r31, -0x8000(r3) +/* 800A838C 000A52CC 93 E3 80 00 */ stw r31, -0x8000(r3) +/* 800A8390 000A52D0 93 E3 80 00 */ stw r31, -0x8000(r3) +/* 800A8394 000A52D4 4B FE 40 45 */ bl PPCSync +/* 800A8398 000A52D8 9B ED 95 90 */ stb r31, DrawDone@sda21(r13) +/* 800A839C 000A52DC 7F C3 F3 78 */ mr r3, r30 +/* 800A83A0 000A52E0 4B FE 7E 55 */ bl OSRestoreInterrupts +/* 800A83A4 000A52E4 80 01 00 1C */ lwz r0, 0x1c(r1) +/* 800A83A8 000A52E8 83 E1 00 14 */ lwz r31, 0x14(r1) +/* 800A83AC 000A52EC 83 C1 00 10 */ lwz r30, 0x10(r1) +/* 800A83B0 000A52F0 38 21 00 18 */ addi r1, r1, 0x18 +/* 800A83B4 000A52F4 7C 08 03 A6 */ mtlr r0 +/* 800A83B8 000A52F8 4E 80 00 20 */ blr + +.global GXWaitDrawDone +GXWaitDrawDone: +/* 800A83BC 000A52FC 7C 08 02 A6 */ mflr r0 +/* 800A83C0 000A5300 90 01 00 04 */ stw r0, 4(r1) +/* 800A83C4 000A5304 94 21 FF F0 */ stwu r1, -0x10(r1) +/* 800A83C8 000A5308 93 E1 00 0C */ stw r31, 0xc(r1) +/* 800A83CC 000A530C 4B FE 7E 01 */ bl OSDisableInterrupts +/* 800A83D0 000A5310 7C 7F 1B 78 */ mr r31, r3 +/* 800A83D4 000A5314 48 00 00 0C */ b lbl_800A83E0 +lbl_800A83D8: +/* 800A83D8 000A5318 38 6D 95 94 */ addi r3, r13, FinishQueue@sda21 +/* 800A83DC 000A531C 4B FE B8 25 */ bl OSSleepThread +lbl_800A83E0: +/* 800A83E0 000A5320 88 0D 95 90 */ lbz r0, DrawDone@sda21(r13) +/* 800A83E4 000A5324 28 00 00 00 */ cmplwi r0, 0 +/* 800A83E8 000A5328 41 82 FF F0 */ beq lbl_800A83D8 +/* 800A83EC 000A532C 7F E3 FB 78 */ mr r3, r31 +/* 800A83F0 000A5330 4B FE 7E 05 */ bl OSRestoreInterrupts +/* 800A83F4 000A5334 80 01 00 14 */ lwz r0, 0x14(r1) +/* 800A83F8 000A5338 83 E1 00 0C */ lwz r31, 0xc(r1) +/* 800A83FC 000A533C 38 21 00 10 */ addi r1, r1, 0x10 +/* 800A8400 000A5340 7C 08 03 A6 */ mtlr r0 +/* 800A8404 000A5344 4E 80 00 20 */ blr + +.global GXDrawDone +GXDrawDone: +/* 800A8408 000A5348 7C 08 02 A6 */ mflr r0 +/* 800A840C 000A534C 90 01 00 04 */ stw r0, 4(r1) +/* 800A8410 000A5350 94 21 FF E8 */ stwu r1, -0x18(r1) +/* 800A8414 000A5354 93 E1 00 14 */ stw r31, 0x14(r1) +/* 800A8418 000A5358 4B FE 7D B5 */ bl OSDisableInterrupts +/* 800A841C 000A535C 38 00 00 61 */ li r0, 0x61 +/* 800A8420 000A5360 3C A0 CC 01 */ lis r5, 0xCC008000@ha +/* 800A8424 000A5364 3C 80 45 00 */ lis r4, 0x45000002@ha +/* 800A8428 000A5368 98 05 80 00 */ stb r0, 0xCC008000@l(r5) +/* 800A842C 000A536C 38 04 00 02 */ addi r0, r4, 0x45000002@l +/* 800A8430 000A5370 90 05 80 00 */ stw r0, -0x8000(r5) +/* 800A8434 000A5374 7C 7F 1B 78 */ mr r31, r3 +/* 800A8438 000A5378 4B FF FD D9 */ bl GXFlush +/* 800A843C 000A537C 38 00 00 00 */ li r0, 0 +/* 800A8440 000A5380 98 0D 95 90 */ stb r0, DrawDone@sda21(r13) +/* 800A8444 000A5384 7F E3 FB 78 */ mr r3, r31 +/* 800A8448 000A5388 4B FE 7D AD */ bl OSRestoreInterrupts +/* 800A844C 000A538C 4B FE 7D 81 */ bl OSDisableInterrupts +/* 800A8450 000A5390 7C 7F 1B 78 */ mr r31, r3 +/* 800A8454 000A5394 48 00 00 0C */ b lbl_800A8460 +lbl_800A8458: +/* 800A8458 000A5398 38 6D 95 94 */ addi r3, r13, FinishQueue@sda21 +/* 800A845C 000A539C 4B FE B7 A5 */ bl OSSleepThread +lbl_800A8460: +/* 800A8460 000A53A0 88 0D 95 90 */ lbz r0, DrawDone@sda21(r13) +/* 800A8464 000A53A4 28 00 00 00 */ cmplwi r0, 0 +/* 800A8468 000A53A8 41 82 FF F0 */ beq lbl_800A8458 +/* 800A846C 000A53AC 7F E3 FB 78 */ mr r3, r31 +/* 800A8470 000A53B0 4B FE 7D 85 */ bl OSRestoreInterrupts +/* 800A8474 000A53B4 80 01 00 1C */ lwz r0, 0x1c(r1) +/* 800A8478 000A53B8 83 E1 00 14 */ lwz r31, 0x14(r1) +/* 800A847C 000A53BC 38 21 00 18 */ addi r1, r1, 0x18 +/* 800A8480 000A53C0 7C 08 03 A6 */ mtlr r0 +/* 800A8484 000A53C4 4E 80 00 20 */ blr + +.global GXPixModeSync +GXPixModeSync: +/* 800A8488 000A53C8 38 00 00 61 */ li r0, 0x61 +/* 800A848C 000A53CC 80 8D 82 C8 */ lwz r4, gx@sda21(r13) +/* 800A8490 000A53D0 3C A0 CC 01 */ lis r5, 0xCC008000@ha +/* 800A8494 000A53D4 98 05 80 00 */ stb r0, 0xCC008000@l(r5) +/* 800A8498 000A53D8 38 00 00 00 */ li r0, 0 +/* 800A849C 000A53DC 80 64 01 DC */ lwz r3, 0x1dc(r4) +/* 800A84A0 000A53E0 90 65 80 00 */ stw r3, -0x8000(r5) +/* 800A84A4 000A53E4 B0 04 00 02 */ sth r0, 2(r4) +/* 800A84A8 000A53E8 4E 80 00 20 */ blr + +.global GXPokeAlphaMode +GXPokeAlphaMode: +/* 800A84AC 000A53EC 80 AD 95 60 */ lwz r5, __peReg@sda21(r13) +/* 800A84B0 000A53F0 54 80 06 3E */ clrlwi r0, r4, 0x18 +/* 800A84B4 000A53F4 50 60 40 2E */ rlwimi r0, r3, 8, 0, 0x17 +/* 800A84B8 000A53F8 B0 05 00 06 */ sth r0, 6(r5) +/* 800A84BC 000A53FC 4E 80 00 20 */ blr + +.global GXPokeAlphaRead +GXPokeAlphaRead: +/* 800A84C0 000A5400 54 60 07 B8 */ rlwinm r0, r3, 0, 0x1e, 0x1c +/* 800A84C4 000A5404 80 6D 95 60 */ lwz r3, __peReg@sda21(r13) +/* 800A84C8 000A5408 60 00 00 04 */ ori r0, r0, 4 +/* 800A84CC 000A540C B0 03 00 08 */ sth r0, 8(r3) +/* 800A84D0 000A5410 4E 80 00 20 */ blr + +.global GXPokeAlphaUpdate +GXPokeAlphaUpdate: +/* 800A84D4 000A5414 80 8D 95 60 */ lwz r4, __peReg@sda21(r13) +/* 800A84D8 000A5418 54 60 25 36 */ rlwinm r0, r3, 4, 0x14, 0x1b +/* 800A84DC 000A541C A4 64 00 02 */ lhzu r3, 2(r4) +/* 800A84E0 000A5420 54 63 07 34 */ rlwinm r3, r3, 0, 0x1c, 0x1a +/* 800A84E4 000A5424 7C 60 03 78 */ or r0, r3, r0 +/* 800A84E8 000A5428 B0 04 00 00 */ sth r0, 0(r4) +/* 800A84EC 000A542C 4E 80 00 20 */ blr + +.global GXPokeBlendMode +GXPokeBlendMode: +/* 800A84F0 000A5430 80 ED 95 60 */ lwz r7, __peReg@sda21(r13) +/* 800A84F4 000A5434 2C 03 00 01 */ cmpwi r3, 1 +/* 800A84F8 000A5438 39 20 00 01 */ li r9, 1 +/* 800A84FC 000A543C 39 47 00 02 */ addi r10, r7, 2 +/* 800A8500 000A5440 A0 E7 00 02 */ lhz r7, 2(r7) +/* 800A8504 000A5444 41 82 00 10 */ beq lbl_800A8514 +/* 800A8508 000A5448 2C 03 00 03 */ cmpwi r3, 3 +/* 800A850C 000A544C 41 82 00 08 */ beq lbl_800A8514 +/* 800A8510 000A5450 39 20 00 00 */ li r9, 0 +lbl_800A8514: +/* 800A8514 000A5454 54 E8 00 3C */ rlwinm r8, r7, 0, 0, 0x1e +/* 800A8518 000A5458 20 03 00 03 */ subfic r0, r3, 3 +/* 800A851C 000A545C 7C 07 00 34 */ cntlzw r7, r0 +/* 800A8520 000A5460 20 03 00 02 */ subfic r0, r3, 2 +/* 800A8524 000A5464 7D 08 4B 78 */ or r8, r8, r9 +/* 800A8528 000A5468 7C 00 00 34 */ cntlzw r0, r0 +/* 800A852C 000A546C 55 08 05 66 */ rlwinm r8, r8, 0, 0x15, 0x13 +/* 800A8530 000A5470 54 E3 30 28 */ rlwinm r3, r7, 6, 0, 0x14 +/* 800A8534 000A5474 7D 03 1B 78 */ or r3, r8, r3 +/* 800A8538 000A5478 54 63 07 FA */ rlwinm r3, r3, 0, 0x1f, 0x1d +/* 800A853C 000A547C 54 00 E1 3C */ rlwinm r0, r0, 0x1c, 4, 0x1e +/* 800A8540 000A5480 7C 60 03 78 */ or r0, r3, r0 +/* 800A8544 000A5484 54 03 05 1E */ rlwinm r3, r0, 0, 0x14, 0xf +/* 800A8548 000A5488 54 C0 60 26 */ slwi r0, r6, 0xc +/* 800A854C 000A548C 7C 60 03 78 */ or r0, r3, r0 +/* 800A8550 000A5490 54 03 06 28 */ rlwinm r3, r0, 0, 0x18, 0x14 +/* 800A8554 000A5494 54 80 40 2E */ slwi r0, r4, 8 +/* 800A8558 000A5498 7C 60 03 78 */ or r0, r3, r0 +/* 800A855C 000A549C 54 03 06 EE */ rlwinm r3, r0, 0, 0x1b, 0x17 +/* 800A8560 000A54A0 54 A0 28 34 */ slwi r0, r5, 5 +/* 800A8564 000A54A4 7C 60 03 78 */ or r0, r3, r0 +/* 800A8568 000A54A8 54 00 02 3E */ clrlwi r0, r0, 8 +/* 800A856C 000A54AC 64 00 41 00 */ oris r0, r0, 0x4100 +/* 800A8570 000A54B0 B0 0A 00 00 */ sth r0, 0(r10) +/* 800A8574 000A54B4 4E 80 00 20 */ blr + +.global GXPokeColorUpdate +GXPokeColorUpdate: +/* 800A8578 000A54B8 80 8D 95 60 */ lwz r4, __peReg@sda21(r13) +/* 800A857C 000A54BC 54 60 1D 78 */ rlwinm r0, r3, 3, 0x15, 0x1c +/* 800A8580 000A54C0 A4 64 00 02 */ lhzu r3, 2(r4) +/* 800A8584 000A54C4 54 63 07 76 */ rlwinm r3, r3, 0, 0x1d, 0x1b +/* 800A8588 000A54C8 7C 60 03 78 */ or r0, r3, r0 +/* 800A858C 000A54CC B0 04 00 00 */ sth r0, 0(r4) +/* 800A8590 000A54D0 4E 80 00 20 */ blr + +.global GXPokeDstAlpha +GXPokeDstAlpha: +/* 800A8594 000A54D4 80 AD 95 60 */ lwz r5, __peReg@sda21(r13) +/* 800A8598 000A54D8 54 60 44 2E */ rlwinm r0, r3, 8, 0x10, 0x17 +/* 800A859C 000A54DC 50 80 06 3E */ rlwimi r0, r4, 0, 0x18, 0x1f +/* 800A85A0 000A54E0 B0 05 00 04 */ sth r0, 4(r5) +/* 800A85A4 000A54E4 4E 80 00 20 */ blr + +.global GXPokeDither +GXPokeDither: +/* 800A85A8 000A54E8 80 8D 95 60 */ lwz r4, __peReg@sda21(r13) +/* 800A85AC 000A54EC 54 60 15 BA */ rlwinm r0, r3, 2, 0x16, 0x1d +/* 800A85B0 000A54F0 A4 64 00 02 */ lhzu r3, 2(r4) +/* 800A85B4 000A54F4 54 63 07 B8 */ rlwinm r3, r3, 0, 0x1e, 0x1c +/* 800A85B8 000A54F8 7C 60 03 78 */ or r0, r3, r0 +/* 800A85BC 000A54FC B0 04 00 00 */ sth r0, 0(r4) +/* 800A85C0 000A5500 4E 80 00 20 */ blr + +.global GXPokeZMode +GXPokeZMode: +/* 800A85C4 000A5504 54 60 06 3E */ clrlwi r0, r3, 0x18 +/* 800A85C8 000A5508 80 6D 95 60 */ lwz r3, __peReg@sda21(r13) +/* 800A85CC 000A550C 54 06 07 F6 */ rlwinm r6, r0, 0, 0x1f, 0x1b +/* 800A85D0 000A5510 54 80 08 3C */ slwi r0, r4, 1 +/* 800A85D4 000A5514 7C C0 03 78 */ or r0, r6, r0 +/* 800A85D8 000A5518 54 04 07 34 */ rlwinm r4, r0, 0, 0x1c, 0x1a +/* 800A85DC 000A551C 54 A0 25 36 */ rlwinm r0, r5, 4, 0x14, 0x1b +/* 800A85E0 000A5520 7C 80 03 78 */ or r0, r4, r0 +/* 800A85E4 000A5524 B0 03 00 00 */ sth r0, 0(r3) +/* 800A85E8 000A5528 4E 80 00 20 */ blr + +.global GXPeekARGB +GXPeekARGB: +/* 800A85EC 000A552C 54 60 13 BA */ rlwinm r0, r3, 2, 0xe, 0x1d +/* 800A85F0 000A5530 64 00 C8 00 */ oris r0, r0, 0xc800 +/* 800A85F4 000A5534 54 03 05 12 */ rlwinm r3, r0, 0, 0x14, 9 +/* 800A85F8 000A5538 54 80 61 26 */ rlwinm r0, r4, 0xc, 4, 0x13 +/* 800A85FC 000A553C 7C 60 03 78 */ or r0, r3, r0 +/* 800A8600 000A5540 54 03 02 8E */ rlwinm r3, r0, 0, 0xa, 7 +/* 800A8604 000A5544 80 03 00 00 */ lwz r0, 0(r3) +/* 800A8608 000A5548 90 05 00 00 */ stw r0, 0(r5) +/* 800A860C 000A554C 4E 80 00 20 */ blr + +.global GXPeekZ +GXPeekZ: +/* 800A8610 000A5550 54 60 13 BA */ rlwinm r0, r3, 2, 0xe, 0x1d +/* 800A8614 000A5554 64 00 C8 00 */ oris r0, r0, 0xc800 +/* 800A8618 000A5558 54 03 05 12 */ rlwinm r3, r0, 0, 0x14, 9 +/* 800A861C 000A555C 54 80 61 26 */ rlwinm r0, r4, 0xc, 4, 0x13 +/* 800A8620 000A5560 7C 60 03 78 */ or r0, r3, r0 +/* 800A8624 000A5564 54 00 02 8E */ rlwinm r0, r0, 0, 0xa, 7 +/* 800A8628 000A5568 64 03 00 40 */ oris r3, r0, 0x40 +/* 800A862C 000A556C 80 03 00 00 */ lwz r0, 0(r3) +/* 800A8630 000A5570 90 05 00 00 */ stw r0, 0(r5) +/* 800A8634 000A5574 4E 80 00 20 */ blr + +.global GXSetDrawSyncCallback +GXSetDrawSyncCallback: +/* 800A8638 000A5578 7C 08 02 A6 */ mflr r0 +/* 800A863C 000A557C 90 01 00 04 */ stw r0, 4(r1) +/* 800A8640 000A5580 94 21 FF E8 */ stwu r1, -0x18(r1) +/* 800A8644 000A5584 93 E1 00 14 */ stw r31, 0x14(r1) +/* 800A8648 000A5588 93 C1 00 10 */ stw r30, 0x10(r1) +/* 800A864C 000A558C 7C 7E 1B 78 */ mr r30, r3 +/* 800A8650 000A5590 83 ED 95 88 */ lwz r31, TokenCB@sda21(r13) +/* 800A8654 000A5594 4B FE 7B 79 */ bl OSDisableInterrupts +/* 800A8658 000A5598 93 CD 95 88 */ stw r30, TokenCB@sda21(r13) +/* 800A865C 000A559C 4B FE 7B 99 */ bl OSRestoreInterrupts +/* 800A8660 000A55A0 7F E3 FB 78 */ mr r3, r31 +/* 800A8664 000A55A4 80 01 00 1C */ lwz r0, 0x1c(r1) +/* 800A8668 000A55A8 83 E1 00 14 */ lwz r31, 0x14(r1) +/* 800A866C 000A55AC 83 C1 00 10 */ lwz r30, 0x10(r1) +/* 800A8670 000A55B0 38 21 00 18 */ addi r1, r1, 0x18 +/* 800A8674 000A55B4 7C 08 03 A6 */ mtlr r0 +/* 800A8678 000A55B8 4E 80 00 20 */ blr + +.global GXTokenInterruptHandler +GXTokenInterruptHandler: +/* 800A867C 000A55BC 7C 08 02 A6 */ mflr r0 +/* 800A8680 000A55C0 90 01 00 04 */ stw r0, 4(r1) +/* 800A8684 000A55C4 94 21 FD 20 */ stwu r1, -0x2e0(r1) +/* 800A8688 000A55C8 93 E1 02 DC */ stw r31, 0x2dc(r1) +/* 800A868C 000A55CC 93 C1 02 D8 */ stw r30, 0x2d8(r1) +/* 800A8690 000A55D0 7C 9E 23 78 */ mr r30, r4 +/* 800A8694 000A55D4 80 0D 95 88 */ lwz r0, TokenCB@sda21(r13) +/* 800A8698 000A55D8 80 6D 95 60 */ lwz r3, __peReg@sda21(r13) +/* 800A869C 000A55DC 28 00 00 00 */ cmplwi r0, 0 +/* 800A86A0 000A55E0 A3 E3 00 0E */ lhz r31, 0xe(r3) +/* 800A86A4 000A55E4 41 82 00 34 */ beq lbl_800A86D8 +/* 800A86A8 000A55E8 38 61 00 10 */ addi r3, r1, 0x10 +/* 800A86AC 000A55EC 4B FE 63 39 */ bl OSClearContext +/* 800A86B0 000A55F0 38 61 00 10 */ addi r3, r1, 0x10 +/* 800A86B4 000A55F4 4B FE 61 69 */ bl OSSetCurrentContext +/* 800A86B8 000A55F8 81 8D 95 88 */ lwz r12, TokenCB@sda21(r13) +/* 800A86BC 000A55FC 38 7F 00 00 */ addi r3, r31, 0 +/* 800A86C0 000A5600 7D 88 03 A6 */ mtlr r12 +/* 800A86C4 000A5604 4E 80 00 21 */ blrl +/* 800A86C8 000A5608 38 61 00 10 */ addi r3, r1, 0x10 +/* 800A86CC 000A560C 4B FE 63 19 */ bl OSClearContext +/* 800A86D0 000A5610 7F C3 F3 78 */ mr r3, r30 +/* 800A86D4 000A5614 4B FE 61 49 */ bl OSSetCurrentContext +lbl_800A86D8: +/* 800A86D8 000A5618 80 6D 95 60 */ lwz r3, __peReg@sda21(r13) +/* 800A86DC 000A561C A4 03 00 0A */ lhzu r0, 0xa(r3) +/* 800A86E0 000A5620 54 00 07 B8 */ rlwinm r0, r0, 0, 0x1e, 0x1c +/* 800A86E4 000A5624 60 00 00 04 */ ori r0, r0, 4 +/* 800A86E8 000A5628 B0 03 00 00 */ sth r0, 0(r3) +/* 800A86EC 000A562C 80 01 02 E4 */ lwz r0, 0x2e4(r1) +/* 800A86F0 000A5630 83 E1 02 DC */ lwz r31, 0x2dc(r1) +/* 800A86F4 000A5634 83 C1 02 D8 */ lwz r30, 0x2d8(r1) +/* 800A86F8 000A5638 38 21 02 E0 */ addi r1, r1, 0x2e0 +/* 800A86FC 000A563C 7C 08 03 A6 */ mtlr r0 +/* 800A8700 000A5640 4E 80 00 20 */ blr + +.global GXFinishInterruptHandler +GXFinishInterruptHandler: +/* 800A8704 000A5644 7C 08 02 A6 */ mflr r0 +/* 800A8708 000A5648 38 60 00 01 */ li r3, 1 +/* 800A870C 000A564C 90 01 00 04 */ stw r0, 4(r1) +/* 800A8710 000A5650 94 21 FD 20 */ stwu r1, -0x2e0(r1) +/* 800A8714 000A5654 93 E1 02 DC */ stw r31, 0x2dc(r1) +/* 800A8718 000A5658 3B E4 00 00 */ addi r31, r4, 0 +/* 800A871C 000A565C 80 AD 95 60 */ lwz r5, __peReg@sda21(r13) +/* 800A8720 000A5660 A0 05 00 0A */ lhz r0, 0xa(r5) +/* 800A8724 000A5664 54 00 07 76 */ rlwinm r0, r0, 0, 0x1d, 0x1b +/* 800A8728 000A5668 60 00 00 08 */ ori r0, r0, 8 +/* 800A872C 000A566C B0 05 00 0A */ sth r0, 0xa(r5) +/* 800A8730 000A5670 80 0D 95 8C */ lwz r0, DrawDoneCB@sda21(r13) +/* 800A8734 000A5674 98 6D 95 90 */ stb r3, DrawDone@sda21(r13) +/* 800A8738 000A5678 28 00 00 00 */ cmplwi r0, 0 +/* 800A873C 000A567C 41 82 00 30 */ beq lbl_800A876C +/* 800A8740 000A5680 38 61 00 10 */ addi r3, r1, 0x10 +/* 800A8744 000A5684 4B FE 62 A1 */ bl OSClearContext +/* 800A8748 000A5688 38 61 00 10 */ addi r3, r1, 0x10 +/* 800A874C 000A568C 4B FE 60 D1 */ bl OSSetCurrentContext +/* 800A8750 000A5690 81 8D 95 8C */ lwz r12, DrawDoneCB@sda21(r13) +/* 800A8754 000A5694 7D 88 03 A6 */ mtlr r12 +/* 800A8758 000A5698 4E 80 00 21 */ blrl +/* 800A875C 000A569C 38 61 00 10 */ addi r3, r1, 0x10 +/* 800A8760 000A56A0 4B FE 62 85 */ bl OSClearContext +/* 800A8764 000A56A4 7F E3 FB 78 */ mr r3, r31 +/* 800A8768 000A56A8 4B FE 60 B5 */ bl OSSetCurrentContext +lbl_800A876C: +/* 800A876C 000A56AC 38 6D 95 94 */ addi r3, r13, FinishQueue@sda21 +/* 800A8770 000A56B0 4B FE B5 7D */ bl OSWakeupThread +/* 800A8774 000A56B4 80 01 02 E4 */ lwz r0, 0x2e4(r1) +/* 800A8778 000A56B8 83 E1 02 DC */ lwz r31, 0x2dc(r1) +/* 800A877C 000A56BC 38 21 02 E0 */ addi r1, r1, 0x2e0 +/* 800A8780 000A56C0 7C 08 03 A6 */ mtlr r0 +/* 800A8784 000A56C4 4E 80 00 20 */ blr + +.global __GXPEInit +__GXPEInit: +/* 800A8788 000A56C8 7C 08 02 A6 */ mflr r0 +/* 800A878C 000A56CC 3C 60 80 0B */ lis r3, GXTokenInterruptHandler@ha +/* 800A8790 000A56D0 90 01 00 04 */ stw r0, 4(r1) +/* 800A8794 000A56D4 38 83 86 7C */ addi r4, r3, GXTokenInterruptHandler@l +/* 800A8798 000A56D8 38 60 00 12 */ li r3, 0x12 +/* 800A879C 000A56DC 94 21 FF F8 */ stwu r1, -8(r1) +/* 800A87A0 000A56E0 4B FE 7A 79 */ bl __OSSetInterruptHandler +/* 800A87A4 000A56E4 3C 60 80 0B */ lis r3, GXFinishInterruptHandler@ha +/* 800A87A8 000A56E8 38 83 87 04 */ addi r4, r3, GXFinishInterruptHandler@l +/* 800A87AC 000A56EC 38 60 00 13 */ li r3, 0x13 +/* 800A87B0 000A56F0 4B FE 7A 69 */ bl __OSSetInterruptHandler +/* 800A87B4 000A56F4 38 6D 95 94 */ addi r3, r13, FinishQueue@sda21 +/* 800A87B8 000A56F8 4B FE A4 C1 */ bl OSInitThreadQueue +/* 800A87BC 000A56FC 38 60 20 00 */ li r3, 0x2000 +/* 800A87C0 000A5700 4B FE 7E 5D */ bl __OSUnmaskInterrupts +/* 800A87C4 000A5704 38 60 10 00 */ li r3, 0x1000 +/* 800A87C8 000A5708 4B FE 7E 55 */ bl __OSUnmaskInterrupts +/* 800A87CC 000A570C 80 6D 95 60 */ lwz r3, __peReg@sda21(r13) +/* 800A87D0 000A5710 A4 03 00 0A */ lhzu r0, 0xa(r3) +/* 800A87D4 000A5714 54 00 07 B8 */ rlwinm r0, r0, 0, 0x1e, 0x1c +/* 800A87D8 000A5718 60 00 00 04 */ ori r0, r0, 4 +/* 800A87DC 000A571C 54 00 07 76 */ rlwinm r0, r0, 0, 0x1d, 0x1b +/* 800A87E0 000A5720 60 00 00 08 */ ori r0, r0, 8 +/* 800A87E4 000A5724 54 00 00 3C */ rlwinm r0, r0, 0, 0, 0x1e +/* 800A87E8 000A5728 60 00 00 01 */ ori r0, r0, 1 +/* 800A87EC 000A572C 54 00 07 FA */ rlwinm r0, r0, 0, 0x1f, 0x1d +/* 800A87F0 000A5730 60 00 00 02 */ ori r0, r0, 2 +/* 800A87F4 000A5734 B0 03 00 00 */ sth r0, 0(r3) +/* 800A87F8 000A5738 80 01 00 0C */ lwz r0, 0xc(r1) +/* 800A87FC 000A573C 38 21 00 08 */ addi r1, r1, 8 +/* 800A8800 000A5740 7C 08 03 A6 */ mtlr r0 +/* 800A8804 000A5744 4E 80 00 20 */ blr + +.section .sbss, "wa" # 0x804097C0 - 0x8040B45C +TokenCB: + .skip 0x4 +DrawDoneCB: + .skip 0x4 +DrawDone: + .skip 0x4 +FinishQueue: + .skip 0xC diff --git a/asm/Dolphin/gx/GXPerf.s b/asm/Dolphin/gx/GXPerf.s new file mode 100644 index 0000000..560ef72 --- /dev/null +++ b/asm/Dolphin/gx/GXPerf.s @@ -0,0 +1,748 @@ +.include "macros.inc" + +.section .text, "ax" # 0x80005600 - 0x8036FBA0 +.global GXSetGPMetric +GXSetGPMetric: +/* 800ADBF8 000AAB38 80 AD 82 C8 */ lwz r5, gx@sda21(r13) +/* 800ADBFC 000AAB3C 80 05 04 E4 */ lwz r0, 0x4e4(r5) +/* 800ADC00 000AAB40 2C 00 00 22 */ cmpwi r0, 0x22 +/* 800ADC04 000AAB44 41 82 00 2C */ beq lbl_800ADC30 +/* 800ADC08 000AAB48 40 80 00 74 */ bge lbl_800ADC7C +/* 800ADC0C 000AAB4C 2C 00 00 0B */ cmpwi r0, 0xb +/* 800ADC10 000AAB50 40 80 00 10 */ bge lbl_800ADC20 +/* 800ADC14 000AAB54 2C 00 00 00 */ cmpwi r0, 0 +/* 800ADC18 000AAB58 40 80 00 18 */ bge lbl_800ADC30 +/* 800ADC1C 000AAB5C 48 00 00 60 */ b lbl_800ADC7C +lbl_800ADC20: +/* 800ADC20 000AAB60 2C 00 00 1B */ cmpwi r0, 0x1b +/* 800ADC24 000AAB64 40 80 00 44 */ bge lbl_800ADC68 +/* 800ADC28 000AAB68 48 00 00 28 */ b lbl_800ADC50 +/* 800ADC2C 000AAB6C 48 00 00 50 */ b lbl_800ADC7C +lbl_800ADC30: +/* 800ADC30 000AAB70 38 00 00 10 */ li r0, 0x10 +/* 800ADC34 000AAB74 3C C0 CC 01 */ lis r6, 0xCC008000@ha +/* 800ADC38 000AAB78 98 06 80 00 */ stb r0, 0xCC008000@l(r6) +/* 800ADC3C 000AAB7C 38 A0 10 06 */ li r5, 0x1006 +/* 800ADC40 000AAB80 38 00 00 00 */ li r0, 0 +/* 800ADC44 000AAB84 90 A6 80 00 */ stw r5, -0x8000(r6) +/* 800ADC48 000AAB88 90 06 80 00 */ stw r0, -0x8000(r6) +/* 800ADC4C 000AAB8C 48 00 00 30 */ b lbl_800ADC7C +lbl_800ADC50: +/* 800ADC50 000AAB90 38 00 00 61 */ li r0, 0x61 +/* 800ADC54 000AAB94 3C A0 CC 01 */ lis r5, 0xCC008000@ha +/* 800ADC58 000AAB98 98 05 80 00 */ stb r0, 0xCC008000@l(r5) +/* 800ADC5C 000AAB9C 3C 00 23 00 */ lis r0, 0x2300 +/* 800ADC60 000AABA0 90 05 80 00 */ stw r0, -0x8000(r5) +/* 800ADC64 000AABA4 48 00 00 18 */ b lbl_800ADC7C +lbl_800ADC68: +/* 800ADC68 000AABA8 38 00 00 61 */ li r0, 0x61 +/* 800ADC6C 000AABAC 3C A0 CC 01 */ lis r5, 0xCC008000@ha +/* 800ADC70 000AABB0 98 05 80 00 */ stb r0, 0xCC008000@l(r5) +/* 800ADC74 000AABB4 3C 00 24 00 */ lis r0, 0x2400 +/* 800ADC78 000AABB8 90 05 80 00 */ stw r0, -0x8000(r5) +lbl_800ADC7C: +/* 800ADC7C 000AABBC 80 AD 82 C8 */ lwz r5, gx@sda21(r13) +/* 800ADC80 000AABC0 80 05 04 E8 */ lwz r0, 0x4e8(r5) +/* 800ADC84 000AABC4 2C 00 00 15 */ cmpwi r0, 0x15 +/* 800ADC88 000AABC8 41 82 00 2C */ beq lbl_800ADCB4 +/* 800ADC8C 000AABCC 40 80 00 80 */ bge lbl_800ADD0C +/* 800ADC90 000AABD0 2C 00 00 09 */ cmpwi r0, 9 +/* 800ADC94 000AABD4 40 80 00 10 */ bge lbl_800ADCA4 +/* 800ADC98 000AABD8 2C 00 00 00 */ cmpwi r0, 0 +/* 800ADC9C 000AABDC 40 80 00 18 */ bge lbl_800ADCB4 +/* 800ADCA0 000AABE0 48 00 00 6C */ b lbl_800ADD0C +lbl_800ADCA4: +/* 800ADCA4 000AABE4 2C 00 00 11 */ cmpwi r0, 0x11 +/* 800ADCA8 000AABE8 40 80 00 58 */ bge lbl_800ADD00 +/* 800ADCAC 000AABEC 48 00 00 20 */ b lbl_800ADCCC +/* 800ADCB0 000AABF0 48 00 00 5C */ b lbl_800ADD0C +lbl_800ADCB4: +/* 800ADCB4 000AABF4 38 00 00 61 */ li r0, 0x61 +/* 800ADCB8 000AABF8 3C A0 CC 01 */ lis r5, 0xCC008000@ha +/* 800ADCBC 000AABFC 98 05 80 00 */ stb r0, 0xCC008000@l(r5) +/* 800ADCC0 000AAC00 3C 00 67 00 */ lis r0, 0x6700 +/* 800ADCC4 000AAC04 90 05 80 00 */ stw r0, -0x8000(r5) +/* 800ADCC8 000AAC08 48 00 00 44 */ b lbl_800ADD0C +lbl_800ADCCC: +/* 800ADCCC 000AAC0C 38 E5 04 EC */ addi r7, r5, 0x4ec +/* 800ADCD0 000AAC10 80 05 04 EC */ lwz r0, 0x4ec(r5) +/* 800ADCD4 000AAC14 38 A0 00 08 */ li r5, 8 +/* 800ADCD8 000AAC18 3C C0 CC 01 */ lis r6, 0xCC008000@ha +/* 800ADCDC 000AAC1C 54 00 07 2E */ rlwinm r0, r0, 0, 0x1c, 0x17 +/* 800ADCE0 000AAC20 90 07 00 00 */ stw r0, 0(r7) +/* 800ADCE4 000AAC24 38 00 00 20 */ li r0, 0x20 +/* 800ADCE8 000AAC28 98 A6 80 00 */ stb r5, 0xCC008000@l(r6) +/* 800ADCEC 000AAC2C 80 AD 82 C8 */ lwz r5, gx@sda21(r13) +/* 800ADCF0 000AAC30 98 06 80 00 */ stb r0, -0x8000(r6) +/* 800ADCF4 000AAC34 80 05 04 EC */ lwz r0, 0x4ec(r5) +/* 800ADCF8 000AAC38 90 06 80 00 */ stw r0, -0x8000(r6) +/* 800ADCFC 000AAC3C 48 00 00 10 */ b lbl_800ADD0C +lbl_800ADD00: +/* 800ADD00 000AAC40 80 AD 95 5C */ lwz r5, __cpReg@sda21(r13) +/* 800ADD04 000AAC44 38 00 00 00 */ li r0, 0 +/* 800ADD08 000AAC48 B0 05 00 06 */ sth r0, 6(r5) +lbl_800ADD0C: +/* 800ADD0C 000AAC4C 80 AD 82 C8 */ lwz r5, gx@sda21(r13) +/* 800ADD10 000AAC50 90 65 04 E4 */ stw r3, 0x4e4(r5) +/* 800ADD14 000AAC54 80 6D 82 C8 */ lwz r3, gx@sda21(r13) +/* 800ADD18 000AAC58 80 03 04 E4 */ lwz r0, 0x4e4(r3) +/* 800ADD1C 000AAC5C 28 00 00 23 */ cmplwi r0, 0x23 +/* 800ADD20 000AAC60 41 81 04 1C */ bgt lbl_800AE13C +/* 800ADD24 000AAC64 3C 60 80 3B */ lis r3, "@241"@ha +/* 800ADD28 000AAC68 38 63 1B B4 */ addi r3, r3, "@241"@l +/* 800ADD2C 000AAC6C 54 00 10 3A */ slwi r0, r0, 2 +/* 800ADD30 000AAC70 7C 03 00 2E */ lwzx r0, r3, r0 +/* 800ADD34 000AAC74 7C 09 03 A6 */ mtctr r0 +/* 800ADD38 000AAC78 4E 80 04 20 */ bctr +lbl_800ADD3C: +/* 800ADD3C 000AAC7C 38 00 00 10 */ li r0, 0x10 +/* 800ADD40 000AAC80 3C A0 CC 01 */ lis r5, 0xCC008000@ha +/* 800ADD44 000AAC84 98 05 80 00 */ stb r0, 0xCC008000@l(r5) +/* 800ADD48 000AAC88 38 60 10 06 */ li r3, 0x1006 +/* 800ADD4C 000AAC8C 38 00 02 73 */ li r0, 0x273 +/* 800ADD50 000AAC90 90 65 80 00 */ stw r3, -0x8000(r5) +/* 800ADD54 000AAC94 90 05 80 00 */ stw r0, -0x8000(r5) +/* 800ADD58 000AAC98 48 00 03 E4 */ b lbl_800AE13C +lbl_800ADD5C: +/* 800ADD5C 000AAC9C 38 00 00 10 */ li r0, 0x10 +/* 800ADD60 000AACA0 3C A0 CC 01 */ lis r5, 0xCC008000@ha +/* 800ADD64 000AACA4 98 05 80 00 */ stb r0, 0xCC008000@l(r5) +/* 800ADD68 000AACA8 38 60 10 06 */ li r3, 0x1006 +/* 800ADD6C 000AACAC 38 00 01 4A */ li r0, 0x14a +/* 800ADD70 000AACB0 90 65 80 00 */ stw r3, -0x8000(r5) +/* 800ADD74 000AACB4 90 05 80 00 */ stw r0, -0x8000(r5) +/* 800ADD78 000AACB8 48 00 03 C4 */ b lbl_800AE13C +lbl_800ADD7C: +/* 800ADD7C 000AACBC 38 00 00 10 */ li r0, 0x10 +/* 800ADD80 000AACC0 3C A0 CC 01 */ lis r5, 0xCC008000@ha +/* 800ADD84 000AACC4 98 05 80 00 */ stb r0, 0xCC008000@l(r5) +/* 800ADD88 000AACC8 38 60 10 06 */ li r3, 0x1006 +/* 800ADD8C 000AACCC 38 00 01 6B */ li r0, 0x16b +/* 800ADD90 000AACD0 90 65 80 00 */ stw r3, -0x8000(r5) +/* 800ADD94 000AACD4 90 05 80 00 */ stw r0, -0x8000(r5) +/* 800ADD98 000AACD8 48 00 03 A4 */ b lbl_800AE13C +lbl_800ADD9C: +/* 800ADD9C 000AACDC 38 00 00 10 */ li r0, 0x10 +/* 800ADDA0 000AACE0 3C A0 CC 01 */ lis r5, 0xCC008000@ha +/* 800ADDA4 000AACE4 98 05 80 00 */ stb r0, 0xCC008000@l(r5) +/* 800ADDA8 000AACE8 38 60 10 06 */ li r3, 0x1006 +/* 800ADDAC 000AACEC 38 00 00 84 */ li r0, 0x84 +/* 800ADDB0 000AACF0 90 65 80 00 */ stw r3, -0x8000(r5) +/* 800ADDB4 000AACF4 90 05 80 00 */ stw r0, -0x8000(r5) +/* 800ADDB8 000AACF8 48 00 03 84 */ b lbl_800AE13C +lbl_800ADDBC: +/* 800ADDBC 000AACFC 38 00 00 10 */ li r0, 0x10 +/* 800ADDC0 000AAD00 3C A0 CC 01 */ lis r5, 0xCC008000@ha +/* 800ADDC4 000AAD04 98 05 80 00 */ stb r0, 0xCC008000@l(r5) +/* 800ADDC8 000AAD08 38 60 10 06 */ li r3, 0x1006 +/* 800ADDCC 000AAD0C 38 00 00 C6 */ li r0, 0xc6 +/* 800ADDD0 000AAD10 90 65 80 00 */ stw r3, -0x8000(r5) +/* 800ADDD4 000AAD14 90 05 80 00 */ stw r0, -0x8000(r5) +/* 800ADDD8 000AAD18 48 00 03 64 */ b lbl_800AE13C +lbl_800ADDDC: +/* 800ADDDC 000AAD1C 38 00 00 10 */ li r0, 0x10 +/* 800ADDE0 000AAD20 3C A0 CC 01 */ lis r5, 0xCC008000@ha +/* 800ADDE4 000AAD24 98 05 80 00 */ stb r0, 0xCC008000@l(r5) +/* 800ADDE8 000AAD28 38 60 10 06 */ li r3, 0x1006 +/* 800ADDEC 000AAD2C 38 00 02 10 */ li r0, 0x210 +/* 800ADDF0 000AAD30 90 65 80 00 */ stw r3, -0x8000(r5) +/* 800ADDF4 000AAD34 90 05 80 00 */ stw r0, -0x8000(r5) +/* 800ADDF8 000AAD38 48 00 03 44 */ b lbl_800AE13C +lbl_800ADDFC: +/* 800ADDFC 000AAD3C 38 00 00 10 */ li r0, 0x10 +/* 800ADE00 000AAD40 3C A0 CC 01 */ lis r5, 0xCC008000@ha +/* 800ADE04 000AAD44 98 05 80 00 */ stb r0, 0xCC008000@l(r5) +/* 800ADE08 000AAD48 38 60 10 06 */ li r3, 0x1006 +/* 800ADE0C 000AAD4C 38 00 02 52 */ li r0, 0x252 +/* 800ADE10 000AAD50 90 65 80 00 */ stw r3, -0x8000(r5) +/* 800ADE14 000AAD54 90 05 80 00 */ stw r0, -0x8000(r5) +/* 800ADE18 000AAD58 48 00 03 24 */ b lbl_800AE13C +lbl_800ADE1C: +/* 800ADE1C 000AAD5C 38 00 00 10 */ li r0, 0x10 +/* 800ADE20 000AAD60 3C A0 CC 01 */ lis r5, 0xCC008000@ha +/* 800ADE24 000AAD64 98 05 80 00 */ stb r0, 0xCC008000@l(r5) +/* 800ADE28 000AAD68 38 60 10 06 */ li r3, 0x1006 +/* 800ADE2C 000AAD6C 38 00 02 31 */ li r0, 0x231 +/* 800ADE30 000AAD70 90 65 80 00 */ stw r3, -0x8000(r5) +/* 800ADE34 000AAD74 90 05 80 00 */ stw r0, -0x8000(r5) +/* 800ADE38 000AAD78 48 00 03 04 */ b lbl_800AE13C +lbl_800ADE3C: +/* 800ADE3C 000AAD7C 38 00 00 10 */ li r0, 0x10 +/* 800ADE40 000AAD80 3C A0 CC 01 */ lis r5, 0xCC008000@ha +/* 800ADE44 000AAD84 98 05 80 00 */ stb r0, 0xCC008000@l(r5) +/* 800ADE48 000AAD88 38 60 10 06 */ li r3, 0x1006 +/* 800ADE4C 000AAD8C 38 00 01 AD */ li r0, 0x1ad +/* 800ADE50 000AAD90 90 65 80 00 */ stw r3, -0x8000(r5) +/* 800ADE54 000AAD94 90 05 80 00 */ stw r0, -0x8000(r5) +/* 800ADE58 000AAD98 48 00 02 E4 */ b lbl_800AE13C +lbl_800ADE5C: +/* 800ADE5C 000AAD9C 38 00 00 10 */ li r0, 0x10 +/* 800ADE60 000AADA0 3C A0 CC 01 */ lis r5, 0xCC008000@ha +/* 800ADE64 000AADA4 98 05 80 00 */ stb r0, 0xCC008000@l(r5) +/* 800ADE68 000AADA8 38 60 10 06 */ li r3, 0x1006 +/* 800ADE6C 000AADAC 38 00 01 CE */ li r0, 0x1ce +/* 800ADE70 000AADB0 90 65 80 00 */ stw r3, -0x8000(r5) +/* 800ADE74 000AADB4 90 05 80 00 */ stw r0, -0x8000(r5) +/* 800ADE78 000AADB8 48 00 02 C4 */ b lbl_800AE13C +lbl_800ADE7C: +/* 800ADE7C 000AADBC 38 00 00 10 */ li r0, 0x10 +/* 800ADE80 000AADC0 3C A0 CC 01 */ lis r5, 0xCC008000@ha +/* 800ADE84 000AADC4 98 05 80 00 */ stb r0, 0xCC008000@l(r5) +/* 800ADE88 000AADC8 38 60 10 06 */ li r3, 0x1006 +/* 800ADE8C 000AADCC 38 00 00 21 */ li r0, 0x21 +/* 800ADE90 000AADD0 90 65 80 00 */ stw r3, -0x8000(r5) +/* 800ADE94 000AADD4 90 05 80 00 */ stw r0, -0x8000(r5) +/* 800ADE98 000AADD8 48 00 02 A4 */ b lbl_800AE13C +lbl_800ADE9C: +/* 800ADE9C 000AADDC 38 00 00 10 */ li r0, 0x10 +/* 800ADEA0 000AADE0 3C A0 CC 01 */ lis r5, 0xCC008000@ha +/* 800ADEA4 000AADE4 98 05 80 00 */ stb r0, 0xCC008000@l(r5) +/* 800ADEA8 000AADE8 38 60 10 06 */ li r3, 0x1006 +/* 800ADEAC 000AADEC 38 00 01 53 */ li r0, 0x153 +/* 800ADEB0 000AADF0 90 65 80 00 */ stw r3, -0x8000(r5) +/* 800ADEB4 000AADF4 90 05 80 00 */ stw r0, -0x8000(r5) +/* 800ADEB8 000AADF8 48 00 02 84 */ b lbl_800AE13C +lbl_800ADEBC: +/* 800ADEBC 000AADFC 38 00 00 61 */ li r0, 0x61 +/* 800ADEC0 000AAE00 3C A0 CC 01 */ lis r5, 0xCC008000@ha +/* 800ADEC4 000AAE04 3C 60 23 01 */ lis r3, 0x2300AE7F@ha +/* 800ADEC8 000AAE08 98 05 80 00 */ stb r0, 0xCC008000@l(r5) +/* 800ADECC 000AAE0C 38 03 AE 7F */ addi r0, r3, 0x2300AE7F@l +/* 800ADED0 000AAE10 90 05 80 00 */ stw r0, -0x8000(r5) +/* 800ADED4 000AAE14 48 00 02 68 */ b lbl_800AE13C +lbl_800ADED8: +/* 800ADED8 000AAE18 38 00 00 61 */ li r0, 0x61 +/* 800ADEDC 000AAE1C 3C A0 CC 01 */ lis r5, 0xCC008000@ha +/* 800ADEE0 000AAE20 3C 60 23 01 */ lis r3, 0x23008E7F@ha +/* 800ADEE4 000AAE24 98 05 80 00 */ stb r0, 0xCC008000@l(r5) +/* 800ADEE8 000AAE28 38 03 8E 7F */ addi r0, r3, 0x23008E7F@l +/* 800ADEEC 000AAE2C 90 05 80 00 */ stw r0, -0x8000(r5) +/* 800ADEF0 000AAE30 48 00 02 4C */ b lbl_800AE13C +lbl_800ADEF4: +/* 800ADEF4 000AAE34 38 00 00 61 */ li r0, 0x61 +/* 800ADEF8 000AAE38 3C A0 CC 01 */ lis r5, 0xCC008000@ha +/* 800ADEFC 000AAE3C 3C 60 23 01 */ lis r3, 0x23009E7F@ha +/* 800ADF00 000AAE40 98 05 80 00 */ stb r0, 0xCC008000@l(r5) +/* 800ADF04 000AAE44 38 03 9E 7F */ addi r0, r3, 0x23009E7F@l +/* 800ADF08 000AAE48 90 05 80 00 */ stw r0, -0x8000(r5) +/* 800ADF0C 000AAE4C 48 00 02 30 */ b lbl_800AE13C +lbl_800ADF10: +/* 800ADF10 000AAE50 38 00 00 61 */ li r0, 0x61 +/* 800ADF14 000AAE54 3C A0 CC 01 */ lis r5, 0xCC008000@ha +/* 800ADF18 000AAE58 3C 60 23 00 */ lis r3, 0x23001E7F@ha +/* 800ADF1C 000AAE5C 98 05 80 00 */ stb r0, 0xCC008000@l(r5) +/* 800ADF20 000AAE60 38 03 1E 7F */ addi r0, r3, 0x23001E7F@l +/* 800ADF24 000AAE64 90 05 80 00 */ stw r0, -0x8000(r5) +/* 800ADF28 000AAE68 48 00 02 14 */ b lbl_800AE13C +lbl_800ADF2C: +/* 800ADF2C 000AAE6C 38 00 00 61 */ li r0, 0x61 +/* 800ADF30 000AAE70 3C A0 CC 01 */ lis r5, 0xCC008000@ha +/* 800ADF34 000AAE74 3C 60 23 01 */ lis r3, 0x2300AC3F@ha +/* 800ADF38 000AAE78 98 05 80 00 */ stb r0, 0xCC008000@l(r5) +/* 800ADF3C 000AAE7C 38 03 AC 3F */ addi r0, r3, 0x2300AC3F@l +/* 800ADF40 000AAE80 90 05 80 00 */ stw r0, -0x8000(r5) +/* 800ADF44 000AAE84 48 00 01 F8 */ b lbl_800AE13C +lbl_800ADF48: +/* 800ADF48 000AAE88 38 00 00 61 */ li r0, 0x61 +/* 800ADF4C 000AAE8C 3C A0 CC 01 */ lis r5, 0xCC008000@ha +/* 800ADF50 000AAE90 3C 60 23 01 */ lis r3, 0x2300AC7F@ha +/* 800ADF54 000AAE94 98 05 80 00 */ stb r0, 0xCC008000@l(r5) +/* 800ADF58 000AAE98 38 03 AC 7F */ addi r0, r3, 0x2300AC7F@l +/* 800ADF5C 000AAE9C 90 05 80 00 */ stw r0, -0x8000(r5) +/* 800ADF60 000AAEA0 48 00 01 DC */ b lbl_800AE13C +lbl_800ADF64: +/* 800ADF64 000AAEA4 38 00 00 61 */ li r0, 0x61 +/* 800ADF68 000AAEA8 3C A0 CC 01 */ lis r5, 0xCC008000@ha +/* 800ADF6C 000AAEAC 3C 60 23 01 */ lis r3, 0x2300ACBF@ha +/* 800ADF70 000AAEB0 98 05 80 00 */ stb r0, 0xCC008000@l(r5) +/* 800ADF74 000AAEB4 38 03 AC BF */ addi r0, r3, 0x2300ACBF@l +/* 800ADF78 000AAEB8 90 05 80 00 */ stw r0, -0x8000(r5) +/* 800ADF7C 000AAEBC 48 00 01 C0 */ b lbl_800AE13C +lbl_800ADF80: +/* 800ADF80 000AAEC0 38 00 00 61 */ li r0, 0x61 +/* 800ADF84 000AAEC4 3C A0 CC 01 */ lis r5, 0xCC008000@ha +/* 800ADF88 000AAEC8 3C 60 23 01 */ lis r3, 0x2300ACFF@ha +/* 800ADF8C 000AAECC 98 05 80 00 */ stb r0, 0xCC008000@l(r5) +/* 800ADF90 000AAED0 38 03 AC FF */ addi r0, r3, 0x2300ACFF@l +/* 800ADF94 000AAED4 90 05 80 00 */ stw r0, -0x8000(r5) +/* 800ADF98 000AAED8 48 00 01 A4 */ b lbl_800AE13C +lbl_800ADF9C: +/* 800ADF9C 000AAEDC 38 00 00 61 */ li r0, 0x61 +/* 800ADFA0 000AAEE0 3C A0 CC 01 */ lis r5, 0xCC008000@ha +/* 800ADFA4 000AAEE4 3C 60 23 01 */ lis r3, 0x2300AD3F@ha +/* 800ADFA8 000AAEE8 98 05 80 00 */ stb r0, 0xCC008000@l(r5) +/* 800ADFAC 000AAEEC 38 03 AD 3F */ addi r0, r3, 0x2300AD3F@l +/* 800ADFB0 000AAEF0 90 05 80 00 */ stw r0, -0x8000(r5) +/* 800ADFB4 000AAEF4 48 00 01 88 */ b lbl_800AE13C +lbl_800ADFB8: +/* 800ADFB8 000AAEF8 38 00 00 61 */ li r0, 0x61 +/* 800ADFBC 000AAEFC 3C A0 CC 01 */ lis r5, 0xCC008000@ha +/* 800ADFC0 000AAF00 3C 60 23 01 */ lis r3, 0x2300AD7F@ha +/* 800ADFC4 000AAF04 98 05 80 00 */ stb r0, 0xCC008000@l(r5) +/* 800ADFC8 000AAF08 38 03 AD 7F */ addi r0, r3, 0x2300AD7F@l +/* 800ADFCC 000AAF0C 90 05 80 00 */ stw r0, -0x8000(r5) +/* 800ADFD0 000AAF10 48 00 01 6C */ b lbl_800AE13C +lbl_800ADFD4: +/* 800ADFD4 000AAF14 38 00 00 61 */ li r0, 0x61 +/* 800ADFD8 000AAF18 3C A0 CC 01 */ lis r5, 0xCC008000@ha +/* 800ADFDC 000AAF1C 3C 60 23 01 */ lis r3, 0x2300ADBF@ha +/* 800ADFE0 000AAF20 98 05 80 00 */ stb r0, 0xCC008000@l(r5) +/* 800ADFE4 000AAF24 38 03 AD BF */ addi r0, r3, 0x2300ADBF@l +/* 800ADFE8 000AAF28 90 05 80 00 */ stw r0, -0x8000(r5) +/* 800ADFEC 000AAF2C 48 00 01 50 */ b lbl_800AE13C +lbl_800ADFF0: +/* 800ADFF0 000AAF30 38 00 00 61 */ li r0, 0x61 +/* 800ADFF4 000AAF34 3C A0 CC 01 */ lis r5, 0xCC008000@ha +/* 800ADFF8 000AAF38 3C 60 23 01 */ lis r3, 0x2300ADFF@ha +/* 800ADFFC 000AAF3C 98 05 80 00 */ stb r0, 0xCC008000@l(r5) +/* 800AE000 000AAF40 38 03 AD FF */ addi r0, r3, 0x2300ADFF@l +/* 800AE004 000AAF44 90 05 80 00 */ stw r0, -0x8000(r5) +/* 800AE008 000AAF48 48 00 01 34 */ b lbl_800AE13C +lbl_800AE00C: +/* 800AE00C 000AAF4C 38 00 00 61 */ li r0, 0x61 +/* 800AE010 000AAF50 3C A0 CC 01 */ lis r5, 0xCC008000@ha +/* 800AE014 000AAF54 3C 60 23 01 */ lis r3, 0x2300AE3F@ha +/* 800AE018 000AAF58 98 05 80 00 */ stb r0, 0xCC008000@l(r5) +/* 800AE01C 000AAF5C 38 03 AE 3F */ addi r0, r3, 0x2300AE3F@l +/* 800AE020 000AAF60 90 05 80 00 */ stw r0, -0x8000(r5) +/* 800AE024 000AAF64 48 00 01 18 */ b lbl_800AE13C +lbl_800AE028: +/* 800AE028 000AAF68 38 00 00 61 */ li r0, 0x61 +/* 800AE02C 000AAF6C 3C A0 CC 01 */ lis r5, 0xCC008000@ha +/* 800AE030 000AAF70 3C 60 23 01 */ lis r3, 0x2300A27F@ha +/* 800AE034 000AAF74 98 05 80 00 */ stb r0, 0xCC008000@l(r5) +/* 800AE038 000AAF78 38 03 A2 7F */ addi r0, r3, 0x2300A27F@l +/* 800AE03C 000AAF7C 90 05 80 00 */ stw r0, -0x8000(r5) +/* 800AE040 000AAF80 48 00 00 FC */ b lbl_800AE13C +lbl_800AE044: +/* 800AE044 000AAF84 38 00 00 61 */ li r0, 0x61 +/* 800AE048 000AAF88 3C A0 CC 01 */ lis r5, 0xCC008000@ha +/* 800AE04C 000AAF8C 3C 60 23 01 */ lis r3, 0x2300A67F@ha +/* 800AE050 000AAF90 98 05 80 00 */ stb r0, 0xCC008000@l(r5) +/* 800AE054 000AAF94 38 03 A6 7F */ addi r0, r3, 0x2300A67F@l +/* 800AE058 000AAF98 90 05 80 00 */ stw r0, -0x8000(r5) +/* 800AE05C 000AAF9C 48 00 00 E0 */ b lbl_800AE13C +lbl_800AE060: +/* 800AE060 000AAFA0 38 00 00 61 */ li r0, 0x61 +/* 800AE064 000AAFA4 3C A0 CC 01 */ lis r5, 0xCC008000@ha +/* 800AE068 000AAFA8 3C 60 23 01 */ lis r3, 0x2300AA7F@ha +/* 800AE06C 000AAFAC 98 05 80 00 */ stb r0, 0xCC008000@l(r5) +/* 800AE070 000AAFB0 38 03 AA 7F */ addi r0, r3, 0x2300AA7F@l +/* 800AE074 000AAFB4 90 05 80 00 */ stw r0, -0x8000(r5) +/* 800AE078 000AAFB8 48 00 00 C4 */ b lbl_800AE13C +lbl_800AE07C: +/* 800AE07C 000AAFBC 38 00 00 61 */ li r0, 0x61 +/* 800AE080 000AAFC0 3C A0 CC 01 */ lis r5, 0xCC008000@ha +/* 800AE084 000AAFC4 3C 60 24 03 */ lis r3, 0x2402C0C6@ha +/* 800AE088 000AAFC8 98 05 80 00 */ stb r0, 0xCC008000@l(r5) +/* 800AE08C 000AAFCC 38 03 C0 C6 */ addi r0, r3, 0x2402C0C6@l +/* 800AE090 000AAFD0 90 05 80 00 */ stw r0, -0x8000(r5) +/* 800AE094 000AAFD4 48 00 00 A8 */ b lbl_800AE13C +lbl_800AE098: +/* 800AE098 000AAFD8 38 00 00 61 */ li r0, 0x61 +/* 800AE09C 000AAFDC 3C A0 CC 01 */ lis r5, 0xCC008000@ha +/* 800AE0A0 000AAFE0 3C 60 24 03 */ lis r3, 0x2402C16B@ha +/* 800AE0A4 000AAFE4 98 05 80 00 */ stb r0, 0xCC008000@l(r5) +/* 800AE0A8 000AAFE8 38 03 C1 6B */ addi r0, r3, 0x2402C16B@l +/* 800AE0AC 000AAFEC 90 05 80 00 */ stw r0, -0x8000(r5) +/* 800AE0B0 000AAFF0 48 00 00 8C */ b lbl_800AE13C +lbl_800AE0B4: +/* 800AE0B4 000AAFF4 38 00 00 61 */ li r0, 0x61 +/* 800AE0B8 000AAFF8 3C A0 CC 01 */ lis r5, 0xCC008000@ha +/* 800AE0BC 000AAFFC 3C 60 24 03 */ lis r3, 0x2402C0E7@ha +/* 800AE0C0 000AB000 98 05 80 00 */ stb r0, 0xCC008000@l(r5) +/* 800AE0C4 000AB004 38 03 C0 E7 */ addi r0, r3, 0x2402C0E7@l +/* 800AE0C8 000AB008 90 05 80 00 */ stw r0, -0x8000(r5) +/* 800AE0CC 000AB00C 48 00 00 70 */ b lbl_800AE13C +lbl_800AE0D0: +/* 800AE0D0 000AB010 38 00 00 61 */ li r0, 0x61 +/* 800AE0D4 000AB014 3C A0 CC 01 */ lis r5, 0xCC008000@ha +/* 800AE0D8 000AB018 3C 60 24 03 */ lis r3, 0x2402C108@ha +/* 800AE0DC 000AB01C 98 05 80 00 */ stb r0, 0xCC008000@l(r5) +/* 800AE0E0 000AB020 38 03 C1 08 */ addi r0, r3, 0x2402C108@l +/* 800AE0E4 000AB024 90 05 80 00 */ stw r0, -0x8000(r5) +/* 800AE0E8 000AB028 48 00 00 54 */ b lbl_800AE13C +lbl_800AE0EC: +/* 800AE0EC 000AB02C 38 00 00 61 */ li r0, 0x61 +/* 800AE0F0 000AB030 3C A0 CC 01 */ lis r5, 0xCC008000@ha +/* 800AE0F4 000AB034 3C 60 24 03 */ lis r3, 0x2402C129@ha +/* 800AE0F8 000AB038 98 05 80 00 */ stb r0, 0xCC008000@l(r5) +/* 800AE0FC 000AB03C 38 03 C1 29 */ addi r0, r3, 0x2402C129@l +/* 800AE100 000AB040 90 05 80 00 */ stw r0, -0x8000(r5) +/* 800AE104 000AB044 48 00 00 38 */ b lbl_800AE13C +lbl_800AE108: +/* 800AE108 000AB048 38 00 00 61 */ li r0, 0x61 +/* 800AE10C 000AB04C 3C A0 CC 01 */ lis r5, 0xCC008000@ha +/* 800AE110 000AB050 3C 60 24 03 */ lis r3, 0x2402C14A@ha +/* 800AE114 000AB054 98 05 80 00 */ stb r0, 0xCC008000@l(r5) +/* 800AE118 000AB058 38 03 C1 4A */ addi r0, r3, 0x2402C14A@l +/* 800AE11C 000AB05C 90 05 80 00 */ stw r0, -0x8000(r5) +/* 800AE120 000AB060 48 00 00 1C */ b lbl_800AE13C +lbl_800AE124: +/* 800AE124 000AB064 38 00 00 61 */ li r0, 0x61 +/* 800AE128 000AB068 3C A0 CC 01 */ lis r5, 0xCC008000@ha +/* 800AE12C 000AB06C 3C 60 24 03 */ lis r3, 0x2402C1AD@ha +/* 800AE130 000AB070 98 05 80 00 */ stb r0, 0xCC008000@l(r5) +/* 800AE134 000AB074 38 03 C1 AD */ addi r0, r3, 0x2402C1AD@l +/* 800AE138 000AB078 90 05 80 00 */ stw r0, -0x8000(r5) +lbl_800AE13C: +/* 800AE13C 000AB07C 80 6D 82 C8 */ lwz r3, gx@sda21(r13) +/* 800AE140 000AB080 90 83 04 E8 */ stw r4, 0x4e8(r3) +/* 800AE144 000AB084 80 8D 82 C8 */ lwz r4, gx@sda21(r13) +/* 800AE148 000AB088 80 04 04 E8 */ lwz r0, 0x4e8(r4) +/* 800AE14C 000AB08C 28 00 00 16 */ cmplwi r0, 0x16 +/* 800AE150 000AB090 41 81 03 30 */ bgt lbl_800AE480 +/* 800AE154 000AB094 3C 60 80 3B */ lis r3, "@242"@ha +/* 800AE158 000AB098 38 63 1B 58 */ addi r3, r3, "@242"@l +/* 800AE15C 000AB09C 54 00 10 3A */ slwi r0, r0, 2 +/* 800AE160 000AB0A0 7C 03 00 2E */ lwzx r0, r3, r0 +/* 800AE164 000AB0A4 7C 09 03 A6 */ mtctr r0 +/* 800AE168 000AB0A8 4E 80 04 20 */ bctr +lbl_800AE16C: +/* 800AE16C 000AB0AC 38 00 00 61 */ li r0, 0x61 +/* 800AE170 000AB0B0 3C 80 CC 01 */ lis r4, 0xCC008000@ha +/* 800AE174 000AB0B4 3C 60 67 00 */ lis r3, 0x67000042@ha +/* 800AE178 000AB0B8 98 04 80 00 */ stb r0, 0xCC008000@l(r4) +/* 800AE17C 000AB0BC 38 03 00 42 */ addi r0, r3, 0x67000042@l +/* 800AE180 000AB0C0 90 04 80 00 */ stw r0, -0x8000(r4) +/* 800AE184 000AB0C4 48 00 02 FC */ b lbl_800AE480 +lbl_800AE188: +/* 800AE188 000AB0C8 38 00 00 61 */ li r0, 0x61 +/* 800AE18C 000AB0CC 3C 80 CC 01 */ lis r4, 0xCC008000@ha +/* 800AE190 000AB0D0 3C 60 67 00 */ lis r3, 0x67000084@ha +/* 800AE194 000AB0D4 98 04 80 00 */ stb r0, 0xCC008000@l(r4) +/* 800AE198 000AB0D8 38 03 00 84 */ addi r0, r3, 0x67000084@l +/* 800AE19C 000AB0DC 90 04 80 00 */ stw r0, -0x8000(r4) +/* 800AE1A0 000AB0E0 48 00 02 E0 */ b lbl_800AE480 +lbl_800AE1A4: +/* 800AE1A4 000AB0E4 38 00 00 61 */ li r0, 0x61 +/* 800AE1A8 000AB0E8 3C 80 CC 01 */ lis r4, 0xCC008000@ha +/* 800AE1AC 000AB0EC 3C 60 67 00 */ lis r3, 0x67000063@ha +/* 800AE1B0 000AB0F0 98 04 80 00 */ stb r0, 0xCC008000@l(r4) +/* 800AE1B4 000AB0F4 38 03 00 63 */ addi r0, r3, 0x67000063@l +/* 800AE1B8 000AB0F8 90 04 80 00 */ stw r0, -0x8000(r4) +/* 800AE1BC 000AB0FC 48 00 02 C4 */ b lbl_800AE480 +lbl_800AE1C0: +/* 800AE1C0 000AB100 38 00 00 61 */ li r0, 0x61 +/* 800AE1C4 000AB104 3C 80 CC 01 */ lis r4, 0xCC008000@ha +/* 800AE1C8 000AB108 3C 60 67 00 */ lis r3, 0x67000129@ha +/* 800AE1CC 000AB10C 98 04 80 00 */ stb r0, 0xCC008000@l(r4) +/* 800AE1D0 000AB110 38 03 01 29 */ addi r0, r3, 0x67000129@l +/* 800AE1D4 000AB114 90 04 80 00 */ stw r0, -0x8000(r4) +/* 800AE1D8 000AB118 48 00 02 A8 */ b lbl_800AE480 +lbl_800AE1DC: +/* 800AE1DC 000AB11C 38 00 00 61 */ li r0, 0x61 +/* 800AE1E0 000AB120 3C 80 CC 01 */ lis r4, 0xCC008000@ha +/* 800AE1E4 000AB124 3C 60 67 00 */ lis r3, 0x67000252@ha +/* 800AE1E8 000AB128 98 04 80 00 */ stb r0, 0xCC008000@l(r4) +/* 800AE1EC 000AB12C 38 03 02 52 */ addi r0, r3, 0x67000252@l +/* 800AE1F0 000AB130 90 04 80 00 */ stw r0, -0x8000(r4) +/* 800AE1F4 000AB134 48 00 02 8C */ b lbl_800AE480 +lbl_800AE1F8: +/* 800AE1F8 000AB138 38 00 00 61 */ li r0, 0x61 +/* 800AE1FC 000AB13C 3C 80 CC 01 */ lis r4, 0xCC008000@ha +/* 800AE200 000AB140 3C 60 67 00 */ lis r3, 0x67000021@ha +/* 800AE204 000AB144 98 04 80 00 */ stb r0, 0xCC008000@l(r4) +/* 800AE208 000AB148 38 03 00 21 */ addi r0, r3, 0x67000021@l +/* 800AE20C 000AB14C 90 04 80 00 */ stw r0, -0x8000(r4) +/* 800AE210 000AB150 48 00 02 70 */ b lbl_800AE480 +lbl_800AE214: +/* 800AE214 000AB154 38 00 00 61 */ li r0, 0x61 +/* 800AE218 000AB158 3C 80 CC 01 */ lis r4, 0xCC008000@ha +/* 800AE21C 000AB15C 3C 60 67 00 */ lis r3, 0x6700014B@ha +/* 800AE220 000AB160 98 04 80 00 */ stb r0, 0xCC008000@l(r4) +/* 800AE224 000AB164 38 03 01 4B */ addi r0, r3, 0x6700014B@l +/* 800AE228 000AB168 90 04 80 00 */ stw r0, -0x8000(r4) +/* 800AE22C 000AB16C 48 00 02 54 */ b lbl_800AE480 +lbl_800AE230: +/* 800AE230 000AB170 38 00 00 61 */ li r0, 0x61 +/* 800AE234 000AB174 3C 80 CC 01 */ lis r4, 0xCC008000@ha +/* 800AE238 000AB178 3C 60 67 00 */ lis r3, 0x6700018D@ha +/* 800AE23C 000AB17C 98 04 80 00 */ stb r0, 0xCC008000@l(r4) +/* 800AE240 000AB180 38 03 01 8D */ addi r0, r3, 0x6700018D@l +/* 800AE244 000AB184 90 04 80 00 */ stw r0, -0x8000(r4) +/* 800AE248 000AB188 48 00 02 38 */ b lbl_800AE480 +lbl_800AE24C: +/* 800AE24C 000AB18C 38 00 00 61 */ li r0, 0x61 +/* 800AE250 000AB190 3C 80 CC 01 */ lis r4, 0xCC008000@ha +/* 800AE254 000AB194 3C 60 67 00 */ lis r3, 0x670001CF@ha +/* 800AE258 000AB198 98 04 80 00 */ stb r0, 0xCC008000@l(r4) +/* 800AE25C 000AB19C 38 03 01 CF */ addi r0, r3, 0x670001CF@l +/* 800AE260 000AB1A0 90 04 80 00 */ stw r0, -0x8000(r4) +/* 800AE264 000AB1A4 48 00 02 1C */ b lbl_800AE480 +lbl_800AE268: +/* 800AE268 000AB1A8 38 00 00 61 */ li r0, 0x61 +/* 800AE26C 000AB1AC 3C 80 CC 01 */ lis r4, 0xCC008000@ha +/* 800AE270 000AB1B0 3C 60 67 00 */ lis r3, 0x67000211@ha +/* 800AE274 000AB1B4 98 04 80 00 */ stb r0, 0xCC008000@l(r4) +/* 800AE278 000AB1B8 38 03 02 11 */ addi r0, r3, 0x67000211@l +/* 800AE27C 000AB1BC 90 04 80 00 */ stw r0, -0x8000(r4) +/* 800AE280 000AB1C0 48 00 02 00 */ b lbl_800AE480 +lbl_800AE284: +/* 800AE284 000AB1C4 38 A4 04 EC */ addi r5, r4, 0x4ec +/* 800AE288 000AB1C8 80 04 04 EC */ lwz r0, 0x4ec(r4) +/* 800AE28C 000AB1CC 38 60 00 08 */ li r3, 8 +/* 800AE290 000AB1D0 3C 80 CC 01 */ lis r4, 0xCC008000@ha +/* 800AE294 000AB1D4 54 00 07 2E */ rlwinm r0, r0, 0, 0x1c, 0x17 +/* 800AE298 000AB1D8 60 00 00 20 */ ori r0, r0, 0x20 +/* 800AE29C 000AB1DC 90 05 00 00 */ stw r0, 0(r5) +/* 800AE2A0 000AB1E0 38 00 00 20 */ li r0, 0x20 +/* 800AE2A4 000AB1E4 98 64 80 00 */ stb r3, 0xCC008000@l(r4) +/* 800AE2A8 000AB1E8 80 6D 82 C8 */ lwz r3, gx@sda21(r13) +/* 800AE2AC 000AB1EC 98 04 80 00 */ stb r0, -0x8000(r4) +/* 800AE2B0 000AB1F0 80 03 04 EC */ lwz r0, 0x4ec(r3) +/* 800AE2B4 000AB1F4 90 04 80 00 */ stw r0, -0x8000(r4) +/* 800AE2B8 000AB1F8 48 00 01 C8 */ b lbl_800AE480 +lbl_800AE2BC: +/* 800AE2BC 000AB1FC 38 A4 04 EC */ addi r5, r4, 0x4ec +/* 800AE2C0 000AB200 80 04 04 EC */ lwz r0, 0x4ec(r4) +/* 800AE2C4 000AB204 38 60 00 08 */ li r3, 8 +/* 800AE2C8 000AB208 3C 80 CC 01 */ lis r4, 0xCC008000@ha +/* 800AE2CC 000AB20C 54 00 07 2E */ rlwinm r0, r0, 0, 0x1c, 0x17 +/* 800AE2D0 000AB210 60 00 00 30 */ ori r0, r0, 0x30 +/* 800AE2D4 000AB214 90 05 00 00 */ stw r0, 0(r5) +/* 800AE2D8 000AB218 38 00 00 20 */ li r0, 0x20 +/* 800AE2DC 000AB21C 98 64 80 00 */ stb r3, 0xCC008000@l(r4) +/* 800AE2E0 000AB220 80 6D 82 C8 */ lwz r3, gx@sda21(r13) +/* 800AE2E4 000AB224 98 04 80 00 */ stb r0, -0x8000(r4) +/* 800AE2E8 000AB228 80 03 04 EC */ lwz r0, 0x4ec(r3) +/* 800AE2EC 000AB22C 90 04 80 00 */ stw r0, -0x8000(r4) +/* 800AE2F0 000AB230 48 00 01 90 */ b lbl_800AE480 +lbl_800AE2F4: +/* 800AE2F4 000AB234 38 A4 04 EC */ addi r5, r4, 0x4ec +/* 800AE2F8 000AB238 80 04 04 EC */ lwz r0, 0x4ec(r4) +/* 800AE2FC 000AB23C 38 60 00 08 */ li r3, 8 +/* 800AE300 000AB240 3C 80 CC 01 */ lis r4, 0xCC008000@ha +/* 800AE304 000AB244 54 00 07 2E */ rlwinm r0, r0, 0, 0x1c, 0x17 +/* 800AE308 000AB248 60 00 00 40 */ ori r0, r0, 0x40 +/* 800AE30C 000AB24C 90 05 00 00 */ stw r0, 0(r5) +/* 800AE310 000AB250 38 00 00 20 */ li r0, 0x20 +/* 800AE314 000AB254 98 64 80 00 */ stb r3, 0xCC008000@l(r4) +/* 800AE318 000AB258 80 6D 82 C8 */ lwz r3, gx@sda21(r13) +/* 800AE31C 000AB25C 98 04 80 00 */ stb r0, -0x8000(r4) +/* 800AE320 000AB260 80 03 04 EC */ lwz r0, 0x4ec(r3) +/* 800AE324 000AB264 90 04 80 00 */ stw r0, -0x8000(r4) +/* 800AE328 000AB268 48 00 01 58 */ b lbl_800AE480 +lbl_800AE32C: +/* 800AE32C 000AB26C 38 A4 04 EC */ addi r5, r4, 0x4ec +/* 800AE330 000AB270 80 04 04 EC */ lwz r0, 0x4ec(r4) +/* 800AE334 000AB274 38 60 00 08 */ li r3, 8 +/* 800AE338 000AB278 3C 80 CC 01 */ lis r4, 0xCC008000@ha +/* 800AE33C 000AB27C 54 00 07 2E */ rlwinm r0, r0, 0, 0x1c, 0x17 +/* 800AE340 000AB280 60 00 00 50 */ ori r0, r0, 0x50 +/* 800AE344 000AB284 90 05 00 00 */ stw r0, 0(r5) +/* 800AE348 000AB288 38 00 00 20 */ li r0, 0x20 +/* 800AE34C 000AB28C 98 64 80 00 */ stb r3, 0xCC008000@l(r4) +/* 800AE350 000AB290 80 6D 82 C8 */ lwz r3, gx@sda21(r13) +/* 800AE354 000AB294 98 04 80 00 */ stb r0, -0x8000(r4) +/* 800AE358 000AB298 80 03 04 EC */ lwz r0, 0x4ec(r3) +/* 800AE35C 000AB29C 90 04 80 00 */ stw r0, -0x8000(r4) +/* 800AE360 000AB2A0 48 00 01 20 */ b lbl_800AE480 +lbl_800AE364: +/* 800AE364 000AB2A4 38 A4 04 EC */ addi r5, r4, 0x4ec +/* 800AE368 000AB2A8 80 04 04 EC */ lwz r0, 0x4ec(r4) +/* 800AE36C 000AB2AC 38 60 00 08 */ li r3, 8 +/* 800AE370 000AB2B0 3C 80 CC 01 */ lis r4, 0xCC008000@ha +/* 800AE374 000AB2B4 54 00 07 2E */ rlwinm r0, r0, 0, 0x1c, 0x17 +/* 800AE378 000AB2B8 60 00 00 60 */ ori r0, r0, 0x60 +/* 800AE37C 000AB2BC 90 05 00 00 */ stw r0, 0(r5) +/* 800AE380 000AB2C0 38 00 00 20 */ li r0, 0x20 +/* 800AE384 000AB2C4 98 64 80 00 */ stb r3, 0xCC008000@l(r4) +/* 800AE388 000AB2C8 80 6D 82 C8 */ lwz r3, gx@sda21(r13) +/* 800AE38C 000AB2CC 98 04 80 00 */ stb r0, -0x8000(r4) +/* 800AE390 000AB2D0 80 03 04 EC */ lwz r0, 0x4ec(r3) +/* 800AE394 000AB2D4 90 04 80 00 */ stw r0, -0x8000(r4) +/* 800AE398 000AB2D8 48 00 00 E8 */ b lbl_800AE480 +lbl_800AE39C: +/* 800AE39C 000AB2DC 38 A4 04 EC */ addi r5, r4, 0x4ec +/* 800AE3A0 000AB2E0 80 04 04 EC */ lwz r0, 0x4ec(r4) +/* 800AE3A4 000AB2E4 38 60 00 08 */ li r3, 8 +/* 800AE3A8 000AB2E8 3C 80 CC 01 */ lis r4, 0xCC008000@ha +/* 800AE3AC 000AB2EC 54 00 07 2E */ rlwinm r0, r0, 0, 0x1c, 0x17 +/* 800AE3B0 000AB2F0 60 00 00 70 */ ori r0, r0, 0x70 +/* 800AE3B4 000AB2F4 90 05 00 00 */ stw r0, 0(r5) +/* 800AE3B8 000AB2F8 38 00 00 20 */ li r0, 0x20 +/* 800AE3BC 000AB2FC 98 64 80 00 */ stb r3, 0xCC008000@l(r4) +/* 800AE3C0 000AB300 80 6D 82 C8 */ lwz r3, gx@sda21(r13) +/* 800AE3C4 000AB304 98 04 80 00 */ stb r0, -0x8000(r4) +/* 800AE3C8 000AB308 80 03 04 EC */ lwz r0, 0x4ec(r3) +/* 800AE3CC 000AB30C 90 04 80 00 */ stw r0, -0x8000(r4) +/* 800AE3D0 000AB310 48 00 00 B0 */ b lbl_800AE480 +lbl_800AE3D4: +/* 800AE3D4 000AB314 38 A4 04 EC */ addi r5, r4, 0x4ec +/* 800AE3D8 000AB318 80 04 04 EC */ lwz r0, 0x4ec(r4) +/* 800AE3DC 000AB31C 38 60 00 08 */ li r3, 8 +/* 800AE3E0 000AB320 3C 80 CC 01 */ lis r4, 0xCC008000@ha +/* 800AE3E4 000AB324 54 00 07 2E */ rlwinm r0, r0, 0, 0x1c, 0x17 +/* 800AE3E8 000AB328 60 00 00 90 */ ori r0, r0, 0x90 +/* 800AE3EC 000AB32C 90 05 00 00 */ stw r0, 0(r5) +/* 800AE3F0 000AB330 38 00 00 20 */ li r0, 0x20 +/* 800AE3F4 000AB334 98 64 80 00 */ stb r3, 0xCC008000@l(r4) +/* 800AE3F8 000AB338 80 6D 82 C8 */ lwz r3, gx@sda21(r13) +/* 800AE3FC 000AB33C 98 04 80 00 */ stb r0, -0x8000(r4) +/* 800AE400 000AB340 80 03 04 EC */ lwz r0, 0x4ec(r3) +/* 800AE404 000AB344 90 04 80 00 */ stw r0, -0x8000(r4) +/* 800AE408 000AB348 48 00 00 78 */ b lbl_800AE480 +lbl_800AE40C: +/* 800AE40C 000AB34C 38 A4 04 EC */ addi r5, r4, 0x4ec +/* 800AE410 000AB350 80 04 04 EC */ lwz r0, 0x4ec(r4) +/* 800AE414 000AB354 38 60 00 08 */ li r3, 8 +/* 800AE418 000AB358 3C 80 CC 01 */ lis r4, 0xCC008000@ha +/* 800AE41C 000AB35C 54 00 07 2E */ rlwinm r0, r0, 0, 0x1c, 0x17 +/* 800AE420 000AB360 60 00 00 80 */ ori r0, r0, 0x80 +/* 800AE424 000AB364 90 05 00 00 */ stw r0, 0(r5) +/* 800AE428 000AB368 38 00 00 20 */ li r0, 0x20 +/* 800AE42C 000AB36C 98 64 80 00 */ stb r3, 0xCC008000@l(r4) +/* 800AE430 000AB370 80 6D 82 C8 */ lwz r3, gx@sda21(r13) +/* 800AE434 000AB374 98 04 80 00 */ stb r0, -0x8000(r4) +/* 800AE438 000AB378 80 03 04 EC */ lwz r0, 0x4ec(r3) +/* 800AE43C 000AB37C 90 04 80 00 */ stw r0, -0x8000(r4) +/* 800AE440 000AB380 48 00 00 40 */ b lbl_800AE480 +lbl_800AE444: +/* 800AE444 000AB384 80 6D 95 5C */ lwz r3, __cpReg@sda21(r13) +/* 800AE448 000AB388 38 00 00 02 */ li r0, 2 +/* 800AE44C 000AB38C B0 03 00 06 */ sth r0, 6(r3) +/* 800AE450 000AB390 48 00 00 30 */ b lbl_800AE480 +lbl_800AE454: +/* 800AE454 000AB394 80 6D 95 5C */ lwz r3, __cpReg@sda21(r13) +/* 800AE458 000AB398 38 00 00 03 */ li r0, 3 +/* 800AE45C 000AB39C B0 03 00 06 */ sth r0, 6(r3) +/* 800AE460 000AB3A0 48 00 00 20 */ b lbl_800AE480 +lbl_800AE464: +/* 800AE464 000AB3A4 80 6D 95 5C */ lwz r3, __cpReg@sda21(r13) +/* 800AE468 000AB3A8 38 00 00 04 */ li r0, 4 +/* 800AE46C 000AB3AC B0 03 00 06 */ sth r0, 6(r3) +/* 800AE470 000AB3B0 48 00 00 10 */ b lbl_800AE480 +lbl_800AE474: +/* 800AE474 000AB3B4 80 6D 95 5C */ lwz r3, __cpReg@sda21(r13) +/* 800AE478 000AB3B8 38 00 00 05 */ li r0, 5 +/* 800AE47C 000AB3BC B0 03 00 06 */ sth r0, 6(r3) +lbl_800AE480: +/* 800AE480 000AB3C0 80 6D 82 C8 */ lwz r3, gx@sda21(r13) +/* 800AE484 000AB3C4 38 00 00 00 */ li r0, 0 +/* 800AE488 000AB3C8 B0 03 00 02 */ sth r0, 2(r3) +/* 800AE48C 000AB3CC 4E 80 00 20 */ blr + +.global GXClearGPMetric +GXClearGPMetric: +/* 800AE490 000AB3D0 80 6D 95 5C */ lwz r3, __cpReg@sda21(r13) +/* 800AE494 000AB3D4 38 00 00 04 */ li r0, 4 +/* 800AE498 000AB3D8 B0 03 00 04 */ sth r0, 4(r3) +/* 800AE49C 000AB3DC 4E 80 00 20 */ blr + +.global GXReadPixMetric +GXReadPixMetric: +/* 800AE4A0 000AB3E0 81 2D 95 60 */ lwz r9, __peReg@sda21(r13) +/* 800AE4A4 000AB3E4 A1 49 00 1A */ lhz r10, 0x1a(r9) +/* 800AE4A8 000AB3E8 A0 09 00 18 */ lhz r0, 0x18(r9) +/* 800AE4AC 000AB3EC 51 40 80 1E */ rlwimi r0, r10, 0x10, 0, 0xf +/* 800AE4B0 000AB3F0 54 00 10 3A */ slwi r0, r0, 2 +/* 800AE4B4 000AB3F4 90 03 00 00 */ stw r0, 0(r3) +/* 800AE4B8 000AB3F8 80 6D 95 60 */ lwz r3, __peReg@sda21(r13) +/* 800AE4BC 000AB3FC A1 23 00 1E */ lhz r9, 0x1e(r3) +/* 800AE4C0 000AB400 A0 03 00 1C */ lhz r0, 0x1c(r3) +/* 800AE4C4 000AB404 51 20 80 1E */ rlwimi r0, r9, 0x10, 0, 0xf +/* 800AE4C8 000AB408 54 00 10 3A */ slwi r0, r0, 2 +/* 800AE4CC 000AB40C 90 04 00 00 */ stw r0, 0(r4) +/* 800AE4D0 000AB410 80 6D 95 60 */ lwz r3, __peReg@sda21(r13) +/* 800AE4D4 000AB414 A0 83 00 22 */ lhz r4, 0x22(r3) +/* 800AE4D8 000AB418 A0 03 00 20 */ lhz r0, 0x20(r3) +/* 800AE4DC 000AB41C 50 80 80 1E */ rlwimi r0, r4, 0x10, 0, 0xf +/* 800AE4E0 000AB420 54 00 10 3A */ slwi r0, r0, 2 +/* 800AE4E4 000AB424 90 05 00 00 */ stw r0, 0(r5) +/* 800AE4E8 000AB428 80 6D 95 60 */ lwz r3, __peReg@sda21(r13) +/* 800AE4EC 000AB42C A0 83 00 26 */ lhz r4, 0x26(r3) +/* 800AE4F0 000AB430 A0 03 00 24 */ lhz r0, 0x24(r3) +/* 800AE4F4 000AB434 50 80 80 1E */ rlwimi r0, r4, 0x10, 0, 0xf +/* 800AE4F8 000AB438 54 00 10 3A */ slwi r0, r0, 2 +/* 800AE4FC 000AB43C 90 06 00 00 */ stw r0, 0(r6) +/* 800AE500 000AB440 80 6D 95 60 */ lwz r3, __peReg@sda21(r13) +/* 800AE504 000AB444 A0 03 00 2A */ lhz r0, 0x2a(r3) +/* 800AE508 000AB448 A0 63 00 28 */ lhz r3, 0x28(r3) +/* 800AE50C 000AB44C 50 03 80 1E */ rlwimi r3, r0, 0x10, 0, 0xf +/* 800AE510 000AB450 54 60 10 3A */ slwi r0, r3, 2 +/* 800AE514 000AB454 90 07 00 00 */ stw r0, 0(r7) +/* 800AE518 000AB458 80 8D 95 60 */ lwz r4, __peReg@sda21(r13) +/* 800AE51C 000AB45C A0 64 00 2E */ lhz r3, 0x2e(r4) +/* 800AE520 000AB460 A0 04 00 2C */ lhz r0, 0x2c(r4) +/* 800AE524 000AB464 50 60 80 1E */ rlwimi r0, r3, 0x10, 0, 0xf +/* 800AE528 000AB468 90 08 00 00 */ stw r0, 0(r8) +/* 800AE52C 000AB46C 4E 80 00 20 */ blr + +.global GXClearPixMetric +GXClearPixMetric: +/* 800AE530 000AB470 38 E0 00 61 */ li r7, 0x61 +/* 800AE534 000AB474 80 6D 82 C8 */ lwz r3, gx@sda21(r13) +/* 800AE538 000AB478 3C C0 CC 01 */ lis r6, 0xCC008000@ha +/* 800AE53C 000AB47C 3C A0 57 00 */ lis r5, 0x57000AAA@ha +/* 800AE540 000AB480 98 E6 80 00 */ stb r7, 0xCC008000@l(r6) +/* 800AE544 000AB484 38 85 0A AA */ addi r4, r5, 0x57000AAA@l +/* 800AE548 000AB488 90 A6 80 00 */ stw r5, -0x8000(r6) +/* 800AE54C 000AB48C 38 00 00 00 */ li r0, 0 +/* 800AE550 000AB490 98 E6 80 00 */ stb r7, -0x8000(r6) +/* 800AE554 000AB494 90 86 80 00 */ stw r4, -0x8000(r6) +/* 800AE558 000AB498 B0 03 00 02 */ sth r0, 2(r3) +/* 800AE55C 000AB49C 4E 80 00 20 */ blr + +.section .data, "wa" # 0x803A8380 - 0x803E6000 +"@242": + .4byte lbl_800AE16C + .4byte lbl_800AE188 + .4byte lbl_800AE1A4 + .4byte lbl_800AE1C0 + .4byte lbl_800AE214 + .4byte lbl_800AE230 + .4byte lbl_800AE24C + .4byte lbl_800AE268 + .4byte lbl_800AE1DC + .4byte lbl_800AE284 + .4byte lbl_800AE2BC + .4byte lbl_800AE2F4 + .4byte lbl_800AE32C + .4byte lbl_800AE364 + .4byte lbl_800AE39C + .4byte lbl_800AE3D4 + .4byte lbl_800AE40C + .4byte lbl_800AE444 + .4byte lbl_800AE454 + .4byte lbl_800AE464 + .4byte lbl_800AE474 + .4byte lbl_800AE1F8 + .4byte lbl_800AE480 +"@241": + .4byte lbl_800ADD3C + .4byte lbl_800ADD5C + .4byte lbl_800ADD7C + .4byte lbl_800ADD9C + .4byte lbl_800ADDBC + .4byte lbl_800ADDDC + .4byte lbl_800ADDFC + .4byte lbl_800ADE1C + .4byte lbl_800ADE3C + .4byte lbl_800ADE5C + .4byte lbl_800ADE9C + .4byte lbl_800ADEBC + .4byte lbl_800ADED8 + .4byte lbl_800ADEF4 + .4byte lbl_800ADF10 + .4byte lbl_800ADF2C + .4byte lbl_800ADF48 + .4byte lbl_800ADF64 + .4byte lbl_800ADF80 + .4byte lbl_800ADF9C + .4byte lbl_800ADFB8 + .4byte lbl_800ADFD4 + .4byte lbl_800ADFF0 + .4byte lbl_800AE00C + .4byte lbl_800AE028 + .4byte lbl_800AE044 + .4byte lbl_800AE060 + .4byte lbl_800AE07C + .4byte lbl_800AE098 + .4byte lbl_800AE0B4 + .4byte lbl_800AE0D0 + .4byte lbl_800AE0EC + .4byte lbl_800AE108 + .4byte lbl_800AE124 + .4byte lbl_800ADE7C + .4byte lbl_800AE13C diff --git a/asm/Dolphin/gx/GXPixel.s b/asm/Dolphin/gx/GXPixel.s new file mode 100644 index 0000000..f5a6912 --- /dev/null +++ b/asm/Dolphin/gx/GXPixel.s @@ -0,0 +1,551 @@ +.include "macros.inc" + +.section .text, "ax" # 0x80005600 - 0x8036FBA0 +.global GXSetFog +GXSetFog: +/* 800AC440 000A9380 7C 08 02 A6 */ mflr r0 +/* 800AC444 000A9384 FC 04 18 00 */ fcmpu cr0, f4, f3 +/* 800AC448 000A9388 90 01 00 04 */ stw r0, 4(r1) +/* 800AC44C 000A938C 94 21 FF B8 */ stwu r1, -0x48(r1) +/* 800AC450 000A9390 93 E1 00 44 */ stw r31, 0x44(r1) +/* 800AC454 000A9394 3B E3 00 00 */ addi r31, r3, 0 +/* 800AC458 000A9398 93 C1 00 40 */ stw r30, 0x40(r1) +/* 800AC45C 000A939C 93 A1 00 3C */ stw r29, 0x3c(r1) +/* 800AC460 000A93A0 3B A4 00 00 */ addi r29, r4, 0 +/* 800AC464 000A93A4 41 82 00 0C */ beq lbl_800AC470 +/* 800AC468 000A93A8 FC 02 08 00 */ fcmpu cr0, f2, f1 +/* 800AC46C 000A93AC 40 82 00 14 */ bne lbl_800AC480 +lbl_800AC470: +/* 800AC470 000A93B0 C0 62 8B 58 */ lfs f3, "@125"@sda21(r2) +/* 800AC474 000A93B4 C0 82 8B 5C */ lfs f4, "@126"@sda21(r2) +/* 800AC478 000A93B8 FC A0 18 90 */ fmr f5, f3 +/* 800AC47C 000A93BC 48 00 00 20 */ b lbl_800AC49C +lbl_800AC480: +/* 800AC480 000A93C0 EC 04 18 28 */ fsubs f0, f4, f3 +/* 800AC484 000A93C4 EC A2 08 28 */ fsubs f5, f2, f1 +/* 800AC488 000A93C8 EC 44 00 F2 */ fmuls f2, f4, f3 +/* 800AC48C 000A93CC EC 84 00 24 */ fdivs f4, f4, f0 +/* 800AC490 000A93D0 EC 00 01 72 */ fmuls f0, f0, f5 +/* 800AC494 000A93D4 EC A1 28 24 */ fdivs f5, f1, f5 +/* 800AC498 000A93D8 EC 62 00 24 */ fdivs f3, f2, f0 +lbl_800AC49C: +/* 800AC49C 000A93DC C0 22 8B 5C */ lfs f1, "@126"@sda21(r2) +/* 800AC4A0 000A93E0 38 60 00 00 */ li r3, 0 +/* 800AC4A4 000A93E4 C8 02 8B 60 */ lfd f0, "@127"@sda21(r2) +/* 800AC4A8 000A93E8 48 00 00 0C */ b lbl_800AC4B4 +lbl_800AC4AC: +/* 800AC4AC 000A93EC EC 84 00 72 */ fmuls f4, f4, f1 +/* 800AC4B0 000A93F0 38 63 00 01 */ addi r3, r3, 1 +lbl_800AC4B4: +/* 800AC4B4 000A93F4 FC 04 00 40 */ fcmpo cr0, f4, f0 +/* 800AC4B8 000A93F8 41 81 FF F4 */ bgt lbl_800AC4AC +/* 800AC4BC 000A93FC C8 02 8B 70 */ lfd f0, "@129"@sda21(r2) +/* 800AC4C0 000A9400 C0 42 8B 68 */ lfs f2, "@128"@sda21(r2) +/* 800AC4C4 000A9404 C0 22 8B 58 */ lfs f1, "@125"@sda21(r2) +/* 800AC4C8 000A9408 48 00 00 0C */ b lbl_800AC4D4 +lbl_800AC4CC: +/* 800AC4CC 000A940C EC 84 00 B2 */ fmuls f4, f4, f2 +/* 800AC4D0 000A9410 38 63 FF FF */ addi r3, r3, -1 +lbl_800AC4D4: +/* 800AC4D4 000A9414 FC 04 08 40 */ fcmpo cr0, f4, f1 +/* 800AC4D8 000A9418 40 81 00 0C */ ble lbl_800AC4E4 +/* 800AC4DC 000A941C FC 04 00 40 */ fcmpo cr0, f4, f0 +/* 800AC4E0 000A9420 41 80 FF EC */ blt lbl_800AC4CC +lbl_800AC4E4: +/* 800AC4E4 000A9424 3B C3 00 01 */ addi r30, r3, 1 +/* 800AC4E8 000A9428 C0 02 8B 78 */ lfs f0, "@130"@sda21(r2) +/* 800AC4EC 000A942C 38 00 00 01 */ li r0, 1 +/* 800AC4F0 000A9430 C8 42 8B 80 */ lfd f2, "@132"@sda21(r2) +/* 800AC4F4 000A9434 7C 00 F0 30 */ slw r0, r0, r30 +/* 800AC4F8 000A9438 EC 20 01 32 */ fmuls f1, f0, f4 +/* 800AC4FC 000A943C 6C 03 80 00 */ xoris r3, r0, 0x8000 +/* 800AC500 000A9440 D0 A1 00 28 */ stfs f5, 0x28(r1) +/* 800AC504 000A9444 3C 00 43 30 */ lis r0, 0x4330 +/* 800AC508 000A9448 90 61 00 34 */ stw r3, 0x34(r1) +/* 800AC50C 000A944C 90 01 00 30 */ stw r0, 0x30(r1) +/* 800AC510 000A9450 C8 01 00 30 */ lfd f0, 0x30(r1) +/* 800AC514 000A9454 EC 00 10 28 */ fsubs f0, f0, f2 +/* 800AC518 000A9458 EC 03 00 24 */ fdivs f0, f3, f0 +/* 800AC51C 000A945C D0 01 00 2C */ stfs f0, 0x2c(r1) +/* 800AC520 000A9460 4B FD 66 9D */ bl __cvt_fp2unsigned +/* 800AC524 000A9464 80 01 00 2C */ lwz r0, 0x2c(r1) +/* 800AC528 000A9468 54 69 02 3E */ clrlwi r9, r3, 8 +/* 800AC52C 000A946C 88 DD 00 01 */ lbz r6, 1(r29) +/* 800AC530 000A9470 57 C8 02 3E */ clrlwi r8, r30, 8 +/* 800AC534 000A9474 54 04 A3 68 */ rlwinm r4, r0, 0x14, 0xd, 0x14 +/* 800AC538 000A9478 50 04 A5 7E */ rlwimi r4, r0, 0x14, 0x15, 0x1f +/* 800AC53C 000A947C 89 7D 00 02 */ lbz r11, 2(r29) +/* 800AC540 000A9480 54 00 A3 18 */ rlwinm r0, r0, 0x14, 0xc, 0xc +/* 800AC544 000A9484 88 BD 00 00 */ lbz r5, 0(r29) +/* 800AC548 000A9488 50 80 03 7E */ rlwimi r0, r4, 0, 0xd, 0x1f +/* 800AC54C 000A948C 81 81 00 28 */ lwz r12, 0x28(r1) +/* 800AC550 000A9490 54 07 02 3E */ clrlwi r7, r0, 8 +/* 800AC554 000A9494 80 6D 82 C8 */ lwz r3, gx@sda21(r13) +/* 800AC558 000A9498 64 EA EE 00 */ oris r10, r7, 0xee00 +/* 800AC55C 000A949C 38 00 00 61 */ li r0, 0x61 +/* 800AC560 000A94A0 3C 80 CC 01 */ lis r4, 0xCC008000@ha +/* 800AC564 000A94A4 98 04 80 00 */ stb r0, 0xCC008000@l(r4) +/* 800AC568 000A94A8 65 27 EF 00 */ oris r7, r9, 0xef00 +/* 800AC56C 000A94AC 54 C6 40 2E */ slwi r6, r6, 8 +/* 800AC570 000A94B0 91 44 80 00 */ stw r10, -0x8000(r4) +/* 800AC574 000A94B4 55 8A A3 68 */ rlwinm r10, r12, 0x14, 0xd, 0x14 +/* 800AC578 000A94B8 51 8A A5 7E */ rlwimi r10, r12, 0x14, 0x15, 0x1f +/* 800AC57C 000A94BC 98 04 80 00 */ stb r0, -0x8000(r4) +/* 800AC580 000A94C0 55 89 A3 18 */ rlwinm r9, r12, 0x14, 0xc, 0xc +/* 800AC584 000A94C4 51 49 03 7E */ rlwimi r9, r10, 0, 0xd, 0x1f +/* 800AC588 000A94C8 90 E4 80 00 */ stw r7, -0x8000(r4) +/* 800AC58C 000A94CC 65 07 F0 00 */ oris r7, r8, 0xf000 +/* 800AC590 000A94D0 51 66 06 3E */ rlwimi r6, r11, 0, 0x18, 0x1f +/* 800AC594 000A94D4 98 04 80 00 */ stb r0, -0x8000(r4) +/* 800AC598 000A94D8 90 E4 80 00 */ stw r7, -0x8000(r4) +/* 800AC59C 000A94DC 57 E7 A8 14 */ slwi r7, r31, 0x15 +/* 800AC5A0 000A94E0 51 27 03 3E */ rlwimi r7, r9, 0, 0xc, 0x1f +/* 800AC5A4 000A94E4 54 E7 02 3E */ clrlwi r7, r7, 8 +/* 800AC5A8 000A94E8 98 04 80 00 */ stb r0, -0x8000(r4) +/* 800AC5AC 000A94EC 64 E7 F1 00 */ oris r7, r7, 0xf100 +/* 800AC5B0 000A94F0 90 E4 80 00 */ stw r7, -0x8000(r4) +/* 800AC5B4 000A94F4 98 04 80 00 */ stb r0, -0x8000(r4) +/* 800AC5B8 000A94F8 54 A0 80 1E */ slwi r0, r5, 0x10 +/* 800AC5BC 000A94FC 50 C0 04 3E */ rlwimi r0, r6, 0, 0x10, 0x1f +/* 800AC5C0 000A9500 54 00 02 3E */ clrlwi r0, r0, 8 +/* 800AC5C4 000A9504 64 00 F2 00 */ oris r0, r0, 0xf200 +/* 800AC5C8 000A9508 90 04 80 00 */ stw r0, -0x8000(r4) +/* 800AC5CC 000A950C 38 00 00 00 */ li r0, 0 +/* 800AC5D0 000A9510 B0 03 00 02 */ sth r0, 2(r3) +/* 800AC5D4 000A9514 80 01 00 4C */ lwz r0, 0x4c(r1) +/* 800AC5D8 000A9518 83 E1 00 44 */ lwz r31, 0x44(r1) +/* 800AC5DC 000A951C 83 C1 00 40 */ lwz r30, 0x40(r1) +/* 800AC5E0 000A9520 83 A1 00 3C */ lwz r29, 0x3c(r1) +/* 800AC5E4 000A9524 38 21 00 48 */ addi r1, r1, 0x48 +/* 800AC5E8 000A9528 7C 08 03 A6 */ mtlr r0 +/* 800AC5EC 000A952C 4E 80 00 20 */ blr + +.global GXSetFogRangeAdj +GXSetFogRangeAdj: +/* 800AC5F0 000A9530 54 60 06 3F */ clrlwi. r0, r3, 0x18 +/* 800AC5F4 000A9534 41 82 00 C0 */ beq lbl_800AC6B4 +/* 800AC5F8 000A9538 A1 05 00 02 */ lhz r8, 2(r5) +/* 800AC5FC 000A953C 38 00 00 61 */ li r0, 0x61 +/* 800AC600 000A9540 A1 45 00 00 */ lhz r10, 0(r5) +/* 800AC604 000A9544 3C C0 CC 01 */ lis r6, 0xCC008000@ha +/* 800AC608 000A9548 55 08 60 26 */ slwi r8, r8, 0xc +/* 800AC60C 000A954C 51 48 05 3E */ rlwimi r8, r10, 0, 0x14, 0x1f +/* 800AC610 000A9550 98 06 80 00 */ stb r0, 0xCC008000@l(r6) +/* 800AC614 000A9554 38 E0 00 E9 */ li r7, 0xe9 +/* 800AC618 000A9558 55 09 02 3E */ clrlwi r9, r8, 8 +/* 800AC61C 000A955C 50 E9 C0 0E */ rlwimi r9, r7, 0x18, 0, 7 +/* 800AC620 000A9560 91 26 80 00 */ stw r9, -0x8000(r6) +/* 800AC624 000A9564 38 E0 00 EA */ li r7, 0xea +/* 800AC628 000A9568 54 E9 C0 0E */ slwi r9, r7, 0x18 +/* 800AC62C 000A956C A5 45 00 04 */ lhzu r10, 4(r5) +/* 800AC630 000A9570 38 E0 00 EB */ li r7, 0xeb +/* 800AC634 000A9574 A1 05 00 02 */ lhz r8, 2(r5) +/* 800AC638 000A9578 55 08 60 26 */ slwi r8, r8, 0xc +/* 800AC63C 000A957C 98 06 80 00 */ stb r0, -0x8000(r6) +/* 800AC640 000A9580 51 48 05 3E */ rlwimi r8, r10, 0, 0x14, 0x1f +/* 800AC644 000A9584 51 09 02 3E */ rlwimi r9, r8, 0, 8, 0x1f +/* 800AC648 000A9588 91 26 80 00 */ stw r9, -0x8000(r6) +/* 800AC64C 000A958C 54 E9 C0 0E */ slwi r9, r7, 0x18 +/* 800AC650 000A9590 38 E0 00 EC */ li r7, 0xec +/* 800AC654 000A9594 A1 05 00 06 */ lhz r8, 6(r5) +/* 800AC658 000A9598 A1 45 00 04 */ lhz r10, 4(r5) +/* 800AC65C 000A959C 55 08 60 26 */ slwi r8, r8, 0xc +/* 800AC660 000A95A0 51 48 05 3E */ rlwimi r8, r10, 0, 0x14, 0x1f +/* 800AC664 000A95A4 98 06 80 00 */ stb r0, -0x8000(r6) +/* 800AC668 000A95A8 51 09 02 3E */ rlwimi r9, r8, 0, 8, 0x1f +/* 800AC66C 000A95AC 91 26 80 00 */ stw r9, -0x8000(r6) +/* 800AC670 000A95B0 54 E9 C0 0E */ slwi r9, r7, 0x18 +/* 800AC674 000A95B4 38 E0 00 ED */ li r7, 0xed +/* 800AC678 000A95B8 A1 05 00 0A */ lhz r8, 0xa(r5) +/* 800AC67C 000A95BC A1 45 00 08 */ lhz r10, 8(r5) +/* 800AC680 000A95C0 55 08 60 26 */ slwi r8, r8, 0xc +/* 800AC684 000A95C4 51 48 05 3E */ rlwimi r8, r10, 0, 0x14, 0x1f +/* 800AC688 000A95C8 98 06 80 00 */ stb r0, -0x8000(r6) +/* 800AC68C 000A95CC 51 09 02 3E */ rlwimi r9, r8, 0, 8, 0x1f +/* 800AC690 000A95D0 91 26 80 00 */ stw r9, -0x8000(r6) +/* 800AC694 000A95D4 A1 05 00 0E */ lhz r8, 0xe(r5) +/* 800AC698 000A95D8 A1 45 00 0C */ lhz r10, 0xc(r5) +/* 800AC69C 000A95DC 55 08 60 26 */ slwi r8, r8, 0xc +/* 800AC6A0 000A95E0 51 48 05 3E */ rlwimi r8, r10, 0, 0x14, 0x1f +/* 800AC6A4 000A95E4 98 06 80 00 */ stb r0, -0x8000(r6) +/* 800AC6A8 000A95E8 55 09 02 3E */ clrlwi r9, r8, 8 +/* 800AC6AC 000A95EC 50 E9 C0 0E */ rlwimi r9, r7, 0x18, 0, 7 +/* 800AC6B0 000A95F0 91 26 80 00 */ stw r9, -0x8000(r6) +lbl_800AC6B4: +/* 800AC6B4 000A95F4 54 85 04 3E */ clrlwi r5, r4, 0x10 +/* 800AC6B8 000A95F8 80 8D 82 C8 */ lwz r4, gx@sda21(r13) +/* 800AC6BC 000A95FC 38 05 01 56 */ addi r0, r5, 0x156 +/* 800AC6C0 000A9600 54 05 05 A8 */ rlwinm r5, r0, 0, 0x16, 0x14 +/* 800AC6C4 000A9604 54 60 53 AA */ rlwinm r0, r3, 0xa, 0xe, 0x15 +/* 800AC6C8 000A9608 7C A0 03 78 */ or r0, r5, r0 +/* 800AC6CC 000A960C 54 05 02 3E */ clrlwi r5, r0, 8 +/* 800AC6D0 000A9610 38 00 00 61 */ li r0, 0x61 +/* 800AC6D4 000A9614 3C 60 CC 01 */ lis r3, 0xCC008000@ha +/* 800AC6D8 000A9618 98 03 80 00 */ stb r0, 0xCC008000@l(r3) +/* 800AC6DC 000A961C 64 A5 E8 00 */ oris r5, r5, 0xe800 +/* 800AC6E0 000A9620 38 00 00 00 */ li r0, 0 +/* 800AC6E4 000A9624 90 A3 80 00 */ stw r5, -0x8000(r3) +/* 800AC6E8 000A9628 B0 04 00 02 */ sth r0, 2(r4) +/* 800AC6EC 000A962C 4E 80 00 20 */ blr + +.global GXSetBlendMode +GXSetBlendMode: +/* 800AC6F0 000A9630 2C 03 00 01 */ cmpwi r3, 1 +/* 800AC6F4 000A9634 39 20 00 01 */ li r9, 1 +/* 800AC6F8 000A9638 41 82 00 10 */ beq lbl_800AC708 +/* 800AC6FC 000A963C 2C 03 00 03 */ cmpwi r3, 3 +/* 800AC700 000A9640 41 82 00 08 */ beq lbl_800AC708 +/* 800AC704 000A9644 39 20 00 00 */ li r9, 0 +lbl_800AC708: +/* 800AC708 000A9648 81 0D 82 C8 */ lwz r8, gx@sda21(r13) +/* 800AC70C 000A964C 20 03 00 03 */ subfic r0, r3, 3 +/* 800AC710 000A9650 7C 07 00 34 */ cntlzw r7, r0 +/* 800AC714 000A9654 39 48 01 D0 */ addi r10, r8, 0x1d0 +/* 800AC718 000A9658 81 08 01 D0 */ lwz r8, 0x1d0(r8) +/* 800AC71C 000A965C 20 03 00 02 */ subfic r0, r3, 2 +/* 800AC720 000A9660 55 03 00 3C */ rlwinm r3, r8, 0, 0, 0x1e +/* 800AC724 000A9664 7C 63 4B 78 */ or r3, r3, r9 +/* 800AC728 000A9668 90 6A 00 00 */ stw r3, 0(r10) +/* 800AC72C 000A966C 7C 00 00 34 */ cntlzw r0, r0 +/* 800AC730 000A9670 54 E3 30 28 */ rlwinm r3, r7, 6, 0, 0x14 +/* 800AC734 000A9674 81 2D 82 C8 */ lwz r9, gx@sda21(r13) +/* 800AC738 000A9678 54 08 E1 3C */ rlwinm r8, r0, 0x1c, 4, 0x1e +/* 800AC73C 000A967C 84 09 01 D0 */ lwzu r0, 0x1d0(r9) +/* 800AC740 000A9680 54 C7 60 26 */ slwi r7, r6, 0xc +/* 800AC744 000A9684 54 86 40 2E */ slwi r6, r4, 8 +/* 800AC748 000A9688 54 00 05 66 */ rlwinm r0, r0, 0, 0x15, 0x13 +/* 800AC74C 000A968C 7C 00 1B 78 */ or r0, r0, r3 +/* 800AC750 000A9690 90 09 00 00 */ stw r0, 0(r9) +/* 800AC754 000A9694 54 A4 28 34 */ slwi r4, r5, 5 +/* 800AC758 000A9698 38 60 00 61 */ li r3, 0x61 +/* 800AC75C 000A969C 81 2D 82 C8 */ lwz r9, gx@sda21(r13) +/* 800AC760 000A96A0 3C A0 CC 01 */ lis r5, 0xCC008000@ha +/* 800AC764 000A96A4 38 00 00 00 */ li r0, 0 +/* 800AC768 000A96A8 39 49 01 D0 */ addi r10, r9, 0x1d0 +/* 800AC76C 000A96AC 81 29 01 D0 */ lwz r9, 0x1d0(r9) +/* 800AC770 000A96B0 55 29 07 FA */ rlwinm r9, r9, 0, 0x1f, 0x1d +/* 800AC774 000A96B4 7D 28 43 78 */ or r8, r9, r8 +/* 800AC778 000A96B8 91 0A 00 00 */ stw r8, 0(r10) +/* 800AC77C 000A96BC 81 0D 82 C8 */ lwz r8, gx@sda21(r13) +/* 800AC780 000A96C0 39 28 01 D0 */ addi r9, r8, 0x1d0 +/* 800AC784 000A96C4 81 08 01 D0 */ lwz r8, 0x1d0(r8) +/* 800AC788 000A96C8 55 08 05 1E */ rlwinm r8, r8, 0, 0x14, 0xf +/* 800AC78C 000A96CC 7D 07 3B 78 */ or r7, r8, r7 +/* 800AC790 000A96D0 90 E9 00 00 */ stw r7, 0(r9) +/* 800AC794 000A96D4 80 ED 82 C8 */ lwz r7, gx@sda21(r13) +/* 800AC798 000A96D8 39 07 01 D0 */ addi r8, r7, 0x1d0 +/* 800AC79C 000A96DC 80 E7 01 D0 */ lwz r7, 0x1d0(r7) +/* 800AC7A0 000A96E0 54 E7 06 28 */ rlwinm r7, r7, 0, 0x18, 0x14 +/* 800AC7A4 000A96E4 7C E6 33 78 */ or r6, r7, r6 +/* 800AC7A8 000A96E8 90 C8 00 00 */ stw r6, 0(r8) +/* 800AC7AC 000A96EC 80 CD 82 C8 */ lwz r6, gx@sda21(r13) +/* 800AC7B0 000A96F0 38 E6 01 D0 */ addi r7, r6, 0x1d0 +/* 800AC7B4 000A96F4 80 C6 01 D0 */ lwz r6, 0x1d0(r6) +/* 800AC7B8 000A96F8 54 C6 06 EE */ rlwinm r6, r6, 0, 0x1b, 0x17 +/* 800AC7BC 000A96FC 7C C4 23 78 */ or r4, r6, r4 +/* 800AC7C0 000A9700 90 87 00 00 */ stw r4, 0(r7) +/* 800AC7C4 000A9704 80 8D 82 C8 */ lwz r4, gx@sda21(r13) +/* 800AC7C8 000A9708 38 C4 01 D0 */ addi r6, r4, 0x1d0 +/* 800AC7CC 000A970C 80 84 01 D0 */ lwz r4, 0x1d0(r4) +/* 800AC7D0 000A9710 54 84 02 3E */ clrlwi r4, r4, 8 +/* 800AC7D4 000A9714 64 84 41 00 */ oris r4, r4, 0x4100 +/* 800AC7D8 000A9718 90 86 00 00 */ stw r4, 0(r6) +/* 800AC7DC 000A971C 98 65 80 00 */ stb r3, 0xCC008000@l(r5) +/* 800AC7E0 000A9720 80 8D 82 C8 */ lwz r4, gx@sda21(r13) +/* 800AC7E4 000A9724 80 64 01 D0 */ lwz r3, 0x1d0(r4) +/* 800AC7E8 000A9728 90 65 80 00 */ stw r3, -0x8000(r5) +/* 800AC7EC 000A972C B0 04 00 02 */ sth r0, 2(r4) +/* 800AC7F0 000A9730 4E 80 00 20 */ blr + +.global GXSetColorUpdate +GXSetColorUpdate: +/* 800AC7F4 000A9734 80 8D 82 C8 */ lwz r4, gx@sda21(r13) +/* 800AC7F8 000A9738 54 60 1D 78 */ rlwinm r0, r3, 3, 0x15, 0x1c +/* 800AC7FC 000A973C 38 60 00 61 */ li r3, 0x61 +/* 800AC800 000A9740 38 C4 01 D0 */ addi r6, r4, 0x1d0 +/* 800AC804 000A9744 80 84 01 D0 */ lwz r4, 0x1d0(r4) +/* 800AC808 000A9748 3C A0 CC 01 */ lis r5, 0xCC008000@ha +/* 800AC80C 000A974C 54 84 07 76 */ rlwinm r4, r4, 0, 0x1d, 0x1b +/* 800AC810 000A9750 7C 80 03 78 */ or r0, r4, r0 +/* 800AC814 000A9754 90 06 00 00 */ stw r0, 0(r6) +/* 800AC818 000A9758 38 00 00 00 */ li r0, 0 +/* 800AC81C 000A975C 98 65 80 00 */ stb r3, 0xCC008000@l(r5) +/* 800AC820 000A9760 80 8D 82 C8 */ lwz r4, gx@sda21(r13) +/* 800AC824 000A9764 80 64 01 D0 */ lwz r3, 0x1d0(r4) +/* 800AC828 000A9768 90 65 80 00 */ stw r3, -0x8000(r5) +/* 800AC82C 000A976C B0 04 00 02 */ sth r0, 2(r4) +/* 800AC830 000A9770 4E 80 00 20 */ blr + +.global GXSetAlphaUpdate +GXSetAlphaUpdate: +/* 800AC834 000A9774 80 8D 82 C8 */ lwz r4, gx@sda21(r13) +/* 800AC838 000A9778 54 60 25 36 */ rlwinm r0, r3, 4, 0x14, 0x1b +/* 800AC83C 000A977C 38 60 00 61 */ li r3, 0x61 +/* 800AC840 000A9780 38 C4 01 D0 */ addi r6, r4, 0x1d0 +/* 800AC844 000A9784 80 84 01 D0 */ lwz r4, 0x1d0(r4) +/* 800AC848 000A9788 3C A0 CC 01 */ lis r5, 0xCC008000@ha +/* 800AC84C 000A978C 54 84 07 34 */ rlwinm r4, r4, 0, 0x1c, 0x1a +/* 800AC850 000A9790 7C 80 03 78 */ or r0, r4, r0 +/* 800AC854 000A9794 90 06 00 00 */ stw r0, 0(r6) +/* 800AC858 000A9798 38 00 00 00 */ li r0, 0 +/* 800AC85C 000A979C 98 65 80 00 */ stb r3, 0xCC008000@l(r5) +/* 800AC860 000A97A0 80 8D 82 C8 */ lwz r4, gx@sda21(r13) +/* 800AC864 000A97A4 80 64 01 D0 */ lwz r3, 0x1d0(r4) +/* 800AC868 000A97A8 90 65 80 00 */ stw r3, -0x8000(r5) +/* 800AC86C 000A97AC B0 04 00 02 */ sth r0, 2(r4) +/* 800AC870 000A97B0 4E 80 00 20 */ blr + +.global GXSetZMode +GXSetZMode: +/* 800AC874 000A97B4 80 CD 82 C8 */ lwz r6, gx@sda21(r13) +/* 800AC878 000A97B8 54 60 06 3E */ clrlwi r0, r3, 0x18 +/* 800AC87C 000A97BC 80 66 01 D8 */ lwz r3, 0x1d8(r6) +/* 800AC880 000A97C0 38 E6 01 D8 */ addi r7, r6, 0x1d8 +/* 800AC884 000A97C4 54 86 08 3C */ slwi r6, r4, 1 +/* 800AC888 000A97C8 54 63 00 3C */ rlwinm r3, r3, 0, 0, 0x1e +/* 800AC88C 000A97CC 7C 60 03 78 */ or r0, r3, r0 +/* 800AC890 000A97D0 90 07 00 00 */ stw r0, 0(r7) +/* 800AC894 000A97D4 54 A4 25 36 */ rlwinm r4, r5, 4, 0x14, 0x1b +/* 800AC898 000A97D8 38 60 00 61 */ li r3, 0x61 +/* 800AC89C 000A97DC 80 ED 82 C8 */ lwz r7, gx@sda21(r13) +/* 800AC8A0 000A97E0 3C A0 CC 01 */ lis r5, 0xCC008000@ha +/* 800AC8A4 000A97E4 38 00 00 00 */ li r0, 0 +/* 800AC8A8 000A97E8 39 07 01 D8 */ addi r8, r7, 0x1d8 +/* 800AC8AC 000A97EC 80 E7 01 D8 */ lwz r7, 0x1d8(r7) +/* 800AC8B0 000A97F0 54 E7 07 F6 */ rlwinm r7, r7, 0, 0x1f, 0x1b +/* 800AC8B4 000A97F4 7C E6 33 78 */ or r6, r7, r6 +/* 800AC8B8 000A97F8 90 C8 00 00 */ stw r6, 0(r8) +/* 800AC8BC 000A97FC 80 CD 82 C8 */ lwz r6, gx@sda21(r13) +/* 800AC8C0 000A9800 38 E6 01 D8 */ addi r7, r6, 0x1d8 +/* 800AC8C4 000A9804 80 C6 01 D8 */ lwz r6, 0x1d8(r6) +/* 800AC8C8 000A9808 54 C6 07 34 */ rlwinm r6, r6, 0, 0x1c, 0x1a +/* 800AC8CC 000A980C 7C C4 23 78 */ or r4, r6, r4 +/* 800AC8D0 000A9810 90 87 00 00 */ stw r4, 0(r7) +/* 800AC8D4 000A9814 98 65 80 00 */ stb r3, 0xCC008000@l(r5) +/* 800AC8D8 000A9818 80 8D 82 C8 */ lwz r4, gx@sda21(r13) +/* 800AC8DC 000A981C 80 64 01 D8 */ lwz r3, 0x1d8(r4) +/* 800AC8E0 000A9820 90 65 80 00 */ stw r3, -0x8000(r5) +/* 800AC8E4 000A9824 B0 04 00 02 */ sth r0, 2(r4) +/* 800AC8E8 000A9828 4E 80 00 20 */ blr + +.global GXSetZCompLoc +GXSetZCompLoc: +/* 800AC8EC 000A982C 80 8D 82 C8 */ lwz r4, gx@sda21(r13) +/* 800AC8F0 000A9830 54 60 34 B2 */ rlwinm r0, r3, 6, 0x12, 0x19 +/* 800AC8F4 000A9834 38 60 00 61 */ li r3, 0x61 +/* 800AC8F8 000A9838 38 C4 01 DC */ addi r6, r4, 0x1dc +/* 800AC8FC 000A983C 80 84 01 DC */ lwz r4, 0x1dc(r4) +/* 800AC900 000A9840 3C A0 CC 01 */ lis r5, 0xCC008000@ha +/* 800AC904 000A9844 54 84 06 B0 */ rlwinm r4, r4, 0, 0x1a, 0x18 +/* 800AC908 000A9848 7C 80 03 78 */ or r0, r4, r0 +/* 800AC90C 000A984C 90 06 00 00 */ stw r0, 0(r6) +/* 800AC910 000A9850 38 00 00 00 */ li r0, 0 +/* 800AC914 000A9854 98 65 80 00 */ stb r3, 0xCC008000@l(r5) +/* 800AC918 000A9858 80 8D 82 C8 */ lwz r4, gx@sda21(r13) +/* 800AC91C 000A985C 80 64 01 DC */ lwz r3, 0x1dc(r4) +/* 800AC920 000A9860 90 65 80 00 */ stw r3, -0x8000(r5) +/* 800AC924 000A9864 B0 04 00 02 */ sth r0, 2(r4) +/* 800AC928 000A9868 4E 80 00 20 */ blr + +.global GXSetPixelFmt +GXSetPixelFmt: +/* 800AC92C 000A986C 80 ED 82 C8 */ lwz r7, gx@sda21(r13) +/* 800AC930 000A9870 3C A0 80 3B */ lis r5, p2f$194@ha +/* 800AC934 000A9874 54 66 10 3A */ slwi r6, r3, 2 +/* 800AC938 000A9878 39 07 01 DC */ addi r8, r7, 0x1dc +/* 800AC93C 000A987C 38 05 1B 38 */ addi r0, r5, p2f$194@l +/* 800AC940 000A9880 80 E7 01 DC */ lwz r7, 0x1dc(r7) +/* 800AC944 000A9884 7D 20 32 14 */ add r9, r0, r6 +/* 800AC948 000A9888 80 A9 00 00 */ lwz r5, 0(r9) +/* 800AC94C 000A988C 54 E6 00 38 */ rlwinm r6, r7, 0, 0, 0x1c +/* 800AC950 000A9890 54 80 18 38 */ slwi r0, r4, 3 +/* 800AC954 000A9894 7C C4 2B 78 */ or r4, r6, r5 +/* 800AC958 000A9898 90 88 00 00 */ stw r4, 0(r8) +/* 800AC95C 000A989C 80 8D 82 C8 */ lwz r4, gx@sda21(r13) +/* 800AC960 000A98A0 38 A4 01 DC */ addi r5, r4, 0x1dc +/* 800AC964 000A98A4 80 84 01 DC */ lwz r4, 0x1dc(r4) +/* 800AC968 000A98A8 54 84 07 72 */ rlwinm r4, r4, 0, 0x1d, 0x19 +/* 800AC96C 000A98AC 7C 80 03 78 */ or r0, r4, r0 +/* 800AC970 000A98B0 90 05 00 00 */ stw r0, 0(r5) +/* 800AC974 000A98B4 80 8D 82 C8 */ lwz r4, gx@sda21(r13) +/* 800AC978 000A98B8 80 A4 01 DC */ lwz r5, 0x1dc(r4) +/* 800AC97C 000A98BC 7C 07 28 40 */ cmplw r7, r5 +/* 800AC980 000A98C0 41 82 00 54 */ beq lbl_800AC9D4 +/* 800AC984 000A98C4 38 00 00 61 */ li r0, 0x61 +/* 800AC988 000A98C8 3C 80 CC 01 */ lis r4, 0xCC008000@ha +/* 800AC98C 000A98CC 98 04 80 00 */ stb r0, 0xCC008000@l(r4) +/* 800AC990 000A98D0 2C 03 00 02 */ cmpwi r3, 2 +/* 800AC994 000A98D4 90 A4 80 00 */ stw r5, -0x8000(r4) +/* 800AC998 000A98D8 40 82 00 0C */ bne lbl_800AC9A4 +/* 800AC99C 000A98DC 38 00 00 01 */ li r0, 1 +/* 800AC9A0 000A98E0 48 00 00 08 */ b lbl_800AC9A8 +lbl_800AC9A4: +/* 800AC9A4 000A98E4 38 00 00 00 */ li r0, 0 +lbl_800AC9A8: +/* 800AC9A8 000A98E8 80 8D 82 C8 */ lwz r4, gx@sda21(r13) +/* 800AC9AC 000A98EC 54 00 4B EC */ rlwinm r0, r0, 9, 0xf, 0x16 +/* 800AC9B0 000A98F0 38 A4 02 04 */ addi r5, r4, 0x204 +/* 800AC9B4 000A98F4 80 84 02 04 */ lwz r4, 0x204(r4) +/* 800AC9B8 000A98F8 54 84 05 EA */ rlwinm r4, r4, 0, 0x17, 0x15 +/* 800AC9BC 000A98FC 7C 80 03 78 */ or r0, r4, r0 +/* 800AC9C0 000A9900 90 05 00 00 */ stw r0, 0(r5) +/* 800AC9C4 000A9904 80 8D 82 C8 */ lwz r4, gx@sda21(r13) +/* 800AC9C8 000A9908 80 04 04 F4 */ lwz r0, 0x4f4(r4) +/* 800AC9CC 000A990C 60 00 00 04 */ ori r0, r0, 4 +/* 800AC9D0 000A9910 90 04 04 F4 */ stw r0, 0x4f4(r4) +lbl_800AC9D4: +/* 800AC9D4 000A9914 80 09 00 00 */ lwz r0, 0(r9) +/* 800AC9D8 000A9918 28 00 00 04 */ cmplwi r0, 4 +/* 800AC9DC 000A991C 40 82 00 50 */ bne lbl_800ACA2C +/* 800AC9E0 000A9920 80 8D 82 C8 */ lwz r4, gx@sda21(r13) +/* 800AC9E4 000A9924 38 63 FF FC */ addi r3, r3, -4 +/* 800AC9E8 000A9928 38 00 00 61 */ li r0, 0x61 +/* 800AC9EC 000A992C 38 A4 01 D4 */ addi r5, r4, 0x1d4 +/* 800AC9F0 000A9930 80 84 01 D4 */ lwz r4, 0x1d4(r4) +/* 800AC9F4 000A9934 54 84 05 E8 */ rlwinm r4, r4, 0, 0x17, 0x14 +/* 800AC9F8 000A9938 50 64 4D 6C */ rlwimi r4, r3, 9, 0x15, 0x16 +/* 800AC9FC 000A993C 90 85 00 00 */ stw r4, 0(r5) +/* 800ACA00 000A9940 3C 80 CC 01 */ lis r4, 0xCC008000@ha +/* 800ACA04 000A9944 80 6D 82 C8 */ lwz r3, gx@sda21(r13) +/* 800ACA08 000A9948 38 A3 01 D4 */ addi r5, r3, 0x1d4 +/* 800ACA0C 000A994C 80 63 01 D4 */ lwz r3, 0x1d4(r3) +/* 800ACA10 000A9950 54 63 02 3E */ clrlwi r3, r3, 8 +/* 800ACA14 000A9954 64 63 42 00 */ oris r3, r3, 0x4200 +/* 800ACA18 000A9958 90 65 00 00 */ stw r3, 0(r5) +/* 800ACA1C 000A995C 98 04 80 00 */ stb r0, 0xCC008000@l(r4) +/* 800ACA20 000A9960 80 6D 82 C8 */ lwz r3, gx@sda21(r13) +/* 800ACA24 000A9964 80 03 01 D4 */ lwz r0, 0x1d4(r3) +/* 800ACA28 000A9968 90 04 80 00 */ stw r0, -0x8000(r4) +lbl_800ACA2C: +/* 800ACA2C 000A996C 80 6D 82 C8 */ lwz r3, gx@sda21(r13) +/* 800ACA30 000A9970 38 00 00 00 */ li r0, 0 +/* 800ACA34 000A9974 B0 03 00 02 */ sth r0, 2(r3) +/* 800ACA38 000A9978 4E 80 00 20 */ blr + +.global GXSetDither +GXSetDither: +/* 800ACA3C 000A997C 80 8D 82 C8 */ lwz r4, gx@sda21(r13) +/* 800ACA40 000A9980 54 60 15 BA */ rlwinm r0, r3, 2, 0x16, 0x1d +/* 800ACA44 000A9984 38 60 00 61 */ li r3, 0x61 +/* 800ACA48 000A9988 38 C4 01 D0 */ addi r6, r4, 0x1d0 +/* 800ACA4C 000A998C 80 84 01 D0 */ lwz r4, 0x1d0(r4) +/* 800ACA50 000A9990 3C A0 CC 01 */ lis r5, 0xCC008000@ha +/* 800ACA54 000A9994 54 84 07 B8 */ rlwinm r4, r4, 0, 0x1e, 0x1c +/* 800ACA58 000A9998 7C 80 03 78 */ or r0, r4, r0 +/* 800ACA5C 000A999C 90 06 00 00 */ stw r0, 0(r6) +/* 800ACA60 000A99A0 38 00 00 00 */ li r0, 0 +/* 800ACA64 000A99A4 98 65 80 00 */ stb r3, 0xCC008000@l(r5) +/* 800ACA68 000A99A8 80 8D 82 C8 */ lwz r4, gx@sda21(r13) +/* 800ACA6C 000A99AC 80 64 01 D0 */ lwz r3, 0x1d0(r4) +/* 800ACA70 000A99B0 90 65 80 00 */ stw r3, -0x8000(r5) +/* 800ACA74 000A99B4 B0 04 00 02 */ sth r0, 2(r4) +/* 800ACA78 000A99B8 4E 80 00 20 */ blr + +.global GXSetDstAlpha +GXSetDstAlpha: +/* 800ACA7C 000A99BC 80 AD 82 C8 */ lwz r5, gx@sda21(r13) +/* 800ACA80 000A99C0 54 66 44 2E */ rlwinm r6, r3, 8, 0x10, 0x17 +/* 800ACA84 000A99C4 84 05 01 D4 */ lwzu r0, 0x1d4(r5) +/* 800ACA88 000A99C8 38 60 00 61 */ li r3, 0x61 +/* 800ACA8C 000A99CC 54 00 00 2E */ rlwinm r0, r0, 0, 0, 0x17 +/* 800ACA90 000A99D0 50 80 06 3E */ rlwimi r0, r4, 0, 0x18, 0x1f +/* 800ACA94 000A99D4 90 05 00 00 */ stw r0, 0(r5) +/* 800ACA98 000A99D8 3C A0 CC 01 */ lis r5, 0xCC008000@ha +/* 800ACA9C 000A99DC 38 00 00 00 */ li r0, 0 +/* 800ACAA0 000A99E0 80 8D 82 C8 */ lwz r4, gx@sda21(r13) +/* 800ACAA4 000A99E4 38 E4 01 D4 */ addi r7, r4, 0x1d4 +/* 800ACAA8 000A99E8 80 84 01 D4 */ lwz r4, 0x1d4(r4) +/* 800ACAAC 000A99EC 54 84 06 2C */ rlwinm r4, r4, 0, 0x18, 0x16 +/* 800ACAB0 000A99F0 7C 84 33 78 */ or r4, r4, r6 +/* 800ACAB4 000A99F4 90 87 00 00 */ stw r4, 0(r7) +/* 800ACAB8 000A99F8 98 65 80 00 */ stb r3, 0xCC008000@l(r5) +/* 800ACABC 000A99FC 80 8D 82 C8 */ lwz r4, gx@sda21(r13) +/* 800ACAC0 000A9A00 80 64 01 D4 */ lwz r3, 0x1d4(r4) +/* 800ACAC4 000A9A04 90 65 80 00 */ stw r3, -0x8000(r5) +/* 800ACAC8 000A9A08 B0 04 00 02 */ sth r0, 2(r4) +/* 800ACACC 000A9A0C 4E 80 00 20 */ blr + +.global GXSetFieldMask +GXSetFieldMask: +/* 800ACAD0 000A9A10 54 80 06 3E */ clrlwi r0, r4, 0x18 +/* 800ACAD4 000A9A14 80 8D 82 C8 */ lwz r4, gx@sda21(r13) +/* 800ACAD8 000A9A18 54 05 07 FA */ rlwinm r5, r0, 0, 0x1f, 0x1d +/* 800ACADC 000A9A1C 54 60 0D FC */ rlwinm r0, r3, 1, 0x17, 0x1e +/* 800ACAE0 000A9A20 7C A0 03 78 */ or r0, r5, r0 +/* 800ACAE4 000A9A24 54 05 02 3E */ clrlwi r5, r0, 8 +/* 800ACAE8 000A9A28 38 00 00 61 */ li r0, 0x61 +/* 800ACAEC 000A9A2C 3C 60 CC 01 */ lis r3, 0xCC008000@ha +/* 800ACAF0 000A9A30 98 03 80 00 */ stb r0, 0xCC008000@l(r3) +/* 800ACAF4 000A9A34 64 A5 44 00 */ oris r5, r5, 0x4400 +/* 800ACAF8 000A9A38 38 00 00 00 */ li r0, 0 +/* 800ACAFC 000A9A3C 90 A3 80 00 */ stw r5, -0x8000(r3) +/* 800ACB00 000A9A40 B0 04 00 02 */ sth r0, 2(r4) +/* 800ACB04 000A9A44 4E 80 00 20 */ blr + +.global GXSetFieldMode +GXSetFieldMode: +/* 800ACB08 000A9A48 7C 08 02 A6 */ mflr r0 +/* 800ACB0C 000A9A4C 90 01 00 04 */ stw r0, 4(r1) +/* 800ACB10 000A9A50 54 80 B0 92 */ rlwinm r0, r4, 0x16, 2, 9 +/* 800ACB14 000A9A54 94 21 FF E0 */ stwu r1, -0x20(r1) +/* 800ACB18 000A9A58 93 E1 00 1C */ stw r31, 0x1c(r1) +/* 800ACB1C 000A9A5C 3F E0 CC 01 */ lis r31, 0xCC008000@ha +/* 800ACB20 000A9A60 93 C1 00 18 */ stw r30, 0x18(r1) +/* 800ACB24 000A9A64 3B C0 00 61 */ li r30, 0x61 +/* 800ACB28 000A9A68 93 A1 00 14 */ stw r29, 0x14(r1) +/* 800ACB2C 000A9A6C 7C 7D 1B 78 */ mr r29, r3 +/* 800ACB30 000A9A70 80 AD 82 C8 */ lwz r5, gx@sda21(r13) +/* 800ACB34 000A9A74 84 85 00 7C */ lwzu r4, 0x7c(r5) +/* 800ACB38 000A9A78 54 84 02 90 */ rlwinm r4, r4, 0, 0xa, 8 +/* 800ACB3C 000A9A7C 7C 80 03 78 */ or r0, r4, r0 +/* 800ACB40 000A9A80 90 05 00 00 */ stw r0, 0(r5) +/* 800ACB44 000A9A84 9B DF 80 00 */ stb r30, 0xCC008000@l(r31) +/* 800ACB48 000A9A88 80 6D 82 C8 */ lwz r3, gx@sda21(r13) +/* 800ACB4C 000A9A8C 80 03 00 7C */ lwz r0, 0x7c(r3) +/* 800ACB50 000A9A90 90 1F 80 00 */ stw r0, -0x8000(r31) +/* 800ACB54 000A9A94 4B FF EE 91 */ bl __GXFlushTextureState +/* 800ACB58 000A9A98 57 A0 06 3E */ clrlwi r0, r29, 0x18 +/* 800ACB5C 000A9A9C 9B DF 80 00 */ stb r30, -0x8000(r31) +/* 800ACB60 000A9AA0 64 00 68 00 */ oris r0, r0, 0x6800 +/* 800ACB64 000A9AA4 90 1F 80 00 */ stw r0, -0x8000(r31) +/* 800ACB68 000A9AA8 4B FF EE 7D */ bl __GXFlushTextureState +/* 800ACB6C 000A9AAC 80 01 00 24 */ lwz r0, 0x24(r1) +/* 800ACB70 000A9AB0 83 E1 00 1C */ lwz r31, 0x1c(r1) +/* 800ACB74 000A9AB4 83 C1 00 18 */ lwz r30, 0x18(r1) +/* 800ACB78 000A9AB8 83 A1 00 14 */ lwz r29, 0x14(r1) +/* 800ACB7C 000A9ABC 38 21 00 20 */ addi r1, r1, 0x20 +/* 800ACB80 000A9AC0 7C 08 03 A6 */ mtlr r0 +/* 800ACB84 000A9AC4 4E 80 00 20 */ blr + +.section .data, "wa" # 0x803A8380 - 0x803E6000 +p2f$194: + .4byte 0 + .4byte 0x00000001 + .4byte 0x00000002 + .4byte 0x00000003 + .4byte 0x00000004 + .4byte 0x00000004 + .4byte 0x00000004 + .4byte 0x00000005 + +.section .sdata2, "a" # 0x8040B460 - 0x80414020 +.balign 8 +"@125": + .4byte 0 +"@126": + .4byte 0x3F000000 +"@127": + .4byte 0x3FF00000 + .4byte 0 +"@128": + .4byte 0x40000000 + .4byte 0 +"@129": + .4byte 0x3FE00000 + .4byte 0 +"@130": + .4byte 0x4B00001E + .4byte 0 +"@132": + .4byte 0x43300000 + .4byte 0x80000000 diff --git a/asm/Dolphin/gx/GXStubs.s b/asm/Dolphin/gx/GXStubs.s new file mode 100644 index 0000000..ce0dc0f --- /dev/null +++ b/asm/Dolphin/gx/GXStubs.s @@ -0,0 +1,6 @@ +.include "macros.inc" + +.section .text, "ax" # 0x80005600 - 0x8036FBA0 +.global __GXSetRange +__GXSetRange: +/* 800AD36C 000AA2AC 4E 80 00 20 */ blr diff --git a/asm/Dolphin/gx/GXTev.s b/asm/Dolphin/gx/GXTev.s new file mode 100644 index 0000000..7002c3c --- /dev/null +++ b/asm/Dolphin/gx/GXTev.s @@ -0,0 +1,752 @@ +.include "macros.inc" + +.section .text, "ax" # 0x80005600 - 0x8036FBA0 +.global GXSetTevOp +GXSetTevOp: +/* 800ABA08 000A8948 7C 08 02 A6 */ mflr r0 +/* 800ABA0C 000A894C 38 C0 00 0A */ li r6, 0xa +/* 800ABA10 000A8950 90 01 00 04 */ stw r0, 4(r1) +/* 800ABA14 000A8954 94 21 FF E8 */ stwu r1, -0x18(r1) +/* 800ABA18 000A8958 93 E1 00 14 */ stw r31, 0x14(r1) +/* 800ABA1C 000A895C 3B E0 00 05 */ li r31, 5 +/* 800ABA20 000A8960 93 C1 00 10 */ stw r30, 0x10(r1) +/* 800ABA24 000A8964 7C 7E 1B 79 */ or. r30, r3, r3 +/* 800ABA28 000A8968 41 82 00 0C */ beq lbl_800ABA34 +/* 800ABA2C 000A896C 38 C0 00 00 */ li r6, 0 +/* 800ABA30 000A8970 3B E0 00 00 */ li r31, 0 +lbl_800ABA34: +/* 800ABA34 000A8974 2C 04 00 02 */ cmpwi r4, 2 +/* 800ABA38 000A8978 41 82 00 8C */ beq lbl_800ABAC4 +/* 800ABA3C 000A897C 40 80 00 14 */ bge lbl_800ABA50 +/* 800ABA40 000A8980 2C 04 00 00 */ cmpwi r4, 0 +/* 800ABA44 000A8984 41 82 00 1C */ beq lbl_800ABA60 +/* 800ABA48 000A8988 40 80 00 48 */ bge lbl_800ABA90 +/* 800ABA4C 000A898C 48 00 01 10 */ b lbl_800ABB5C +lbl_800ABA50: +/* 800ABA50 000A8990 2C 04 00 04 */ cmpwi r4, 4 +/* 800ABA54 000A8994 41 82 00 D8 */ beq lbl_800ABB2C +/* 800ABA58 000A8998 40 80 01 04 */ bge lbl_800ABB5C +/* 800ABA5C 000A899C 48 00 00 9C */ b lbl_800ABAF8 +lbl_800ABA60: +/* 800ABA60 000A89A0 38 7E 00 00 */ addi r3, r30, 0 +/* 800ABA64 000A89A4 38 80 00 0F */ li r4, 0xf +/* 800ABA68 000A89A8 38 A0 00 08 */ li r5, 8 +/* 800ABA6C 000A89AC 38 E0 00 0F */ li r7, 0xf +/* 800ABA70 000A89B0 48 00 01 3D */ bl GXSetTevColorIn +/* 800ABA74 000A89B4 38 7E 00 00 */ addi r3, r30, 0 +/* 800ABA78 000A89B8 38 DF 00 00 */ addi r6, r31, 0 +/* 800ABA7C 000A89BC 38 80 00 07 */ li r4, 7 +/* 800ABA80 000A89C0 38 A0 00 04 */ li r5, 4 +/* 800ABA84 000A89C4 38 E0 00 07 */ li r7, 7 +/* 800ABA88 000A89C8 48 00 01 A5 */ bl GXSetTevAlphaIn +/* 800ABA8C 000A89CC 48 00 00 D0 */ b lbl_800ABB5C +lbl_800ABA90: +/* 800ABA90 000A89D0 38 7E 00 00 */ addi r3, r30, 0 +/* 800ABA94 000A89D4 38 86 00 00 */ addi r4, r6, 0 +/* 800ABA98 000A89D8 38 A0 00 08 */ li r5, 8 +/* 800ABA9C 000A89DC 38 C0 00 09 */ li r6, 9 +/* 800ABAA0 000A89E0 38 E0 00 0F */ li r7, 0xf +/* 800ABAA4 000A89E4 48 00 01 09 */ bl GXSetTevColorIn +/* 800ABAA8 000A89E8 38 7E 00 00 */ addi r3, r30, 0 +/* 800ABAAC 000A89EC 38 FF 00 00 */ addi r7, r31, 0 +/* 800ABAB0 000A89F0 38 80 00 07 */ li r4, 7 +/* 800ABAB4 000A89F4 38 A0 00 07 */ li r5, 7 +/* 800ABAB8 000A89F8 38 C0 00 07 */ li r6, 7 +/* 800ABABC 000A89FC 48 00 01 71 */ bl GXSetTevAlphaIn +/* 800ABAC0 000A8A00 48 00 00 9C */ b lbl_800ABB5C +lbl_800ABAC4: +/* 800ABAC4 000A8A04 38 7E 00 00 */ addi r3, r30, 0 +/* 800ABAC8 000A8A08 38 86 00 00 */ addi r4, r6, 0 +/* 800ABACC 000A8A0C 38 A0 00 0C */ li r5, 0xc +/* 800ABAD0 000A8A10 38 C0 00 08 */ li r6, 8 +/* 800ABAD4 000A8A14 38 E0 00 0F */ li r7, 0xf +/* 800ABAD8 000A8A18 48 00 00 D5 */ bl GXSetTevColorIn +/* 800ABADC 000A8A1C 38 7E 00 00 */ addi r3, r30, 0 +/* 800ABAE0 000A8A20 38 DF 00 00 */ addi r6, r31, 0 +/* 800ABAE4 000A8A24 38 80 00 07 */ li r4, 7 +/* 800ABAE8 000A8A28 38 A0 00 04 */ li r5, 4 +/* 800ABAEC 000A8A2C 38 E0 00 07 */ li r7, 7 +/* 800ABAF0 000A8A30 48 00 01 3D */ bl GXSetTevAlphaIn +/* 800ABAF4 000A8A34 48 00 00 68 */ b lbl_800ABB5C +lbl_800ABAF8: +/* 800ABAF8 000A8A38 38 7E 00 00 */ addi r3, r30, 0 +/* 800ABAFC 000A8A3C 38 80 00 0F */ li r4, 0xf +/* 800ABB00 000A8A40 38 A0 00 0F */ li r5, 0xf +/* 800ABB04 000A8A44 38 C0 00 0F */ li r6, 0xf +/* 800ABB08 000A8A48 38 E0 00 08 */ li r7, 8 +/* 800ABB0C 000A8A4C 48 00 00 A1 */ bl GXSetTevColorIn +/* 800ABB10 000A8A50 38 7E 00 00 */ addi r3, r30, 0 +/* 800ABB14 000A8A54 38 80 00 07 */ li r4, 7 +/* 800ABB18 000A8A58 38 A0 00 07 */ li r5, 7 +/* 800ABB1C 000A8A5C 38 C0 00 07 */ li r6, 7 +/* 800ABB20 000A8A60 38 E0 00 04 */ li r7, 4 +/* 800ABB24 000A8A64 48 00 01 09 */ bl GXSetTevAlphaIn +/* 800ABB28 000A8A68 48 00 00 34 */ b lbl_800ABB5C +lbl_800ABB2C: +/* 800ABB2C 000A8A6C 38 7E 00 00 */ addi r3, r30, 0 +/* 800ABB30 000A8A70 38 E6 00 00 */ addi r7, r6, 0 +/* 800ABB34 000A8A74 38 80 00 0F */ li r4, 0xf +/* 800ABB38 000A8A78 38 A0 00 0F */ li r5, 0xf +/* 800ABB3C 000A8A7C 38 C0 00 0F */ li r6, 0xf +/* 800ABB40 000A8A80 48 00 00 6D */ bl GXSetTevColorIn +/* 800ABB44 000A8A84 38 7E 00 00 */ addi r3, r30, 0 +/* 800ABB48 000A8A88 38 FF 00 00 */ addi r7, r31, 0 +/* 800ABB4C 000A8A8C 38 80 00 07 */ li r4, 7 +/* 800ABB50 000A8A90 38 A0 00 07 */ li r5, 7 +/* 800ABB54 000A8A94 38 C0 00 07 */ li r6, 7 +/* 800ABB58 000A8A98 48 00 00 D5 */ bl GXSetTevAlphaIn +lbl_800ABB5C: +/* 800ABB5C 000A8A9C 38 7E 00 00 */ addi r3, r30, 0 +/* 800ABB60 000A8AA0 38 80 00 00 */ li r4, 0 +/* 800ABB64 000A8AA4 38 A0 00 00 */ li r5, 0 +/* 800ABB68 000A8AA8 38 C0 00 00 */ li r6, 0 +/* 800ABB6C 000A8AAC 38 E0 00 01 */ li r7, 1 +/* 800ABB70 000A8AB0 39 00 00 00 */ li r8, 0 +/* 800ABB74 000A8AB4 48 00 01 3D */ bl GXSetTevColorOp +/* 800ABB78 000A8AB8 38 7E 00 00 */ addi r3, r30, 0 +/* 800ABB7C 000A8ABC 38 80 00 00 */ li r4, 0 +/* 800ABB80 000A8AC0 38 A0 00 00 */ li r5, 0 +/* 800ABB84 000A8AC4 38 C0 00 00 */ li r6, 0 +/* 800ABB88 000A8AC8 38 E0 00 01 */ li r7, 1 +/* 800ABB8C 000A8ACC 39 00 00 00 */ li r8, 0 +/* 800ABB90 000A8AD0 48 00 01 E1 */ bl GXSetTevAlphaOp +/* 800ABB94 000A8AD4 80 01 00 1C */ lwz r0, 0x1c(r1) +/* 800ABB98 000A8AD8 83 E1 00 14 */ lwz r31, 0x14(r1) +/* 800ABB9C 000A8ADC 83 C1 00 10 */ lwz r30, 0x10(r1) +/* 800ABBA0 000A8AE0 38 21 00 18 */ addi r1, r1, 0x18 +/* 800ABBA4 000A8AE4 7C 08 03 A6 */ mtlr r0 +/* 800ABBA8 000A8AE8 4E 80 00 20 */ blr + +.global GXSetTevColorIn +GXSetTevColorIn: +/* 800ABBAC 000A8AEC 54 63 10 3A */ slwi r3, r3, 2 +/* 800ABBB0 000A8AF0 80 0D 82 C8 */ lwz r0, gx@sda21(r13) +/* 800ABBB4 000A8AF4 39 23 01 30 */ addi r9, r3, 0x130 +/* 800ABBB8 000A8AF8 7D 20 4A 14 */ add r9, r0, r9 +/* 800ABBBC 000A8AFC 80 69 00 00 */ lwz r3, 0(r9) +/* 800ABBC0 000A8B00 54 80 60 26 */ slwi r0, r4, 0xc +/* 800ABBC4 000A8B04 54 A8 40 2E */ slwi r8, r5, 8 +/* 800ABBC8 000A8B08 54 63 05 1E */ rlwinm r3, r3, 0, 0x14, 0xf +/* 800ABBCC 000A8B0C 7C 60 03 78 */ or r0, r3, r0 +/* 800ABBD0 000A8B10 90 09 00 00 */ stw r0, 0(r9) +/* 800ABBD4 000A8B14 54 C4 20 36 */ slwi r4, r6, 4 +/* 800ABBD8 000A8B18 38 60 00 61 */ li r3, 0x61 +/* 800ABBDC 000A8B1C 80 C9 00 00 */ lwz r6, 0(r9) +/* 800ABBE0 000A8B20 3C A0 CC 01 */ lis r5, 0xCC008000@ha +/* 800ABBE4 000A8B24 38 00 00 00 */ li r0, 0 +/* 800ABBE8 000A8B28 54 C6 06 26 */ rlwinm r6, r6, 0, 0x18, 0x13 +/* 800ABBEC 000A8B2C 7C C6 43 78 */ or r6, r6, r8 +/* 800ABBF0 000A8B30 90 C9 00 00 */ stw r6, 0(r9) +/* 800ABBF4 000A8B34 80 C9 00 00 */ lwz r6, 0(r9) +/* 800ABBF8 000A8B38 54 C6 07 2E */ rlwinm r6, r6, 0, 0x1c, 0x17 +/* 800ABBFC 000A8B3C 7C C4 23 78 */ or r4, r6, r4 +/* 800ABC00 000A8B40 90 89 00 00 */ stw r4, 0(r9) +/* 800ABC04 000A8B44 80 89 00 00 */ lwz r4, 0(r9) +/* 800ABC08 000A8B48 54 84 00 36 */ rlwinm r4, r4, 0, 0, 0x1b +/* 800ABC0C 000A8B4C 7C 84 3B 78 */ or r4, r4, r7 +/* 800ABC10 000A8B50 90 89 00 00 */ stw r4, 0(r9) +/* 800ABC14 000A8B54 98 65 80 00 */ stb r3, 0xCC008000@l(r5) +/* 800ABC18 000A8B58 80 6D 82 C8 */ lwz r3, gx@sda21(r13) +/* 800ABC1C 000A8B5C 80 89 00 00 */ lwz r4, 0(r9) +/* 800ABC20 000A8B60 90 85 80 00 */ stw r4, -0x8000(r5) +/* 800ABC24 000A8B64 B0 03 00 02 */ sth r0, 2(r3) +/* 800ABC28 000A8B68 4E 80 00 20 */ blr + +.global GXSetTevAlphaIn +GXSetTevAlphaIn: +/* 800ABC2C 000A8B6C 54 63 10 3A */ slwi r3, r3, 2 +/* 800ABC30 000A8B70 80 0D 82 C8 */ lwz r0, gx@sda21(r13) +/* 800ABC34 000A8B74 39 23 01 70 */ addi r9, r3, 0x170 +/* 800ABC38 000A8B78 7D 20 4A 14 */ add r9, r0, r9 +/* 800ABC3C 000A8B7C 81 09 00 00 */ lwz r8, 0(r9) +/* 800ABC40 000A8B80 54 83 68 24 */ slwi r3, r4, 0xd +/* 800ABC44 000A8B84 54 A0 50 2A */ slwi r0, r5, 0xa +/* 800ABC48 000A8B88 55 04 04 DE */ rlwinm r4, r8, 0, 0x13, 0xf +/* 800ABC4C 000A8B8C 7C 83 1B 78 */ or r3, r4, r3 +/* 800ABC50 000A8B90 90 69 00 00 */ stw r3, 0(r9) +/* 800ABC54 000A8B94 54 C6 38 30 */ slwi r6, r6, 7 +/* 800ABC58 000A8B98 54 E4 20 36 */ slwi r4, r7, 4 +/* 800ABC5C 000A8B9C 80 E9 00 00 */ lwz r7, 0(r9) +/* 800ABC60 000A8BA0 38 60 00 61 */ li r3, 0x61 +/* 800ABC64 000A8BA4 3C A0 CC 01 */ lis r5, 0xCC008000@ha +/* 800ABC68 000A8BA8 54 E7 05 A4 */ rlwinm r7, r7, 0, 0x16, 0x12 +/* 800ABC6C 000A8BAC 7C E0 03 78 */ or r0, r7, r0 +/* 800ABC70 000A8BB0 90 09 00 00 */ stw r0, 0(r9) +/* 800ABC74 000A8BB4 38 00 00 00 */ li r0, 0 +/* 800ABC78 000A8BB8 80 E9 00 00 */ lwz r7, 0(r9) +/* 800ABC7C 000A8BBC 54 E7 06 6A */ rlwinm r7, r7, 0, 0x19, 0x15 +/* 800ABC80 000A8BC0 7C E6 33 78 */ or r6, r7, r6 +/* 800ABC84 000A8BC4 90 C9 00 00 */ stw r6, 0(r9) +/* 800ABC88 000A8BC8 80 C9 00 00 */ lwz r6, 0(r9) +/* 800ABC8C 000A8BCC 54 C6 07 30 */ rlwinm r6, r6, 0, 0x1c, 0x18 +/* 800ABC90 000A8BD0 7C C4 23 78 */ or r4, r6, r4 +/* 800ABC94 000A8BD4 90 89 00 00 */ stw r4, 0(r9) +/* 800ABC98 000A8BD8 98 65 80 00 */ stb r3, 0xCC008000@l(r5) +/* 800ABC9C 000A8BDC 80 6D 82 C8 */ lwz r3, gx@sda21(r13) +/* 800ABCA0 000A8BE0 80 89 00 00 */ lwz r4, 0(r9) +/* 800ABCA4 000A8BE4 90 85 80 00 */ stw r4, -0x8000(r5) +/* 800ABCA8 000A8BE8 B0 03 00 02 */ sth r0, 2(r3) +/* 800ABCAC 000A8BEC 4E 80 00 20 */ blr + +.global GXSetTevColorOp +GXSetTevColorOp: +/* 800ABCB0 000A8BF0 54 63 10 3A */ slwi r3, r3, 2 +/* 800ABCB4 000A8BF4 80 0D 82 C8 */ lwz r0, gx@sda21(r13) +/* 800ABCB8 000A8BF8 38 63 01 30 */ addi r3, r3, 0x130 +/* 800ABCBC 000A8BFC 7C 60 1A 14 */ add r3, r0, r3 +/* 800ABCC0 000A8C00 80 03 00 00 */ lwz r0, 0(r3) +/* 800ABCC4 000A8C04 2C 04 00 01 */ cmpwi r4, 1 +/* 800ABCC8 000A8C08 54 00 03 98 */ rlwinm r0, r0, 0, 0xe, 0xc +/* 800ABCCC 000A8C0C 50 80 93 5A */ rlwimi r0, r4, 0x12, 0xd, 0xd +/* 800ABCD0 000A8C10 90 03 00 00 */ stw r0, 0(r3) +/* 800ABCD4 000A8C14 41 81 00 30 */ bgt lbl_800ABD04 +/* 800ABCD8 000A8C18 81 23 00 00 */ lwz r9, 0(r3) +/* 800ABCDC 000A8C1C 54 C4 A0 16 */ slwi r4, r6, 0x14 +/* 800ABCE0 000A8C20 54 A0 80 1E */ slwi r0, r5, 0x10 +/* 800ABCE4 000A8C24 55 25 03 12 */ rlwinm r5, r9, 0, 0xc, 9 +/* 800ABCE8 000A8C28 7C A4 23 78 */ or r4, r5, r4 +/* 800ABCEC 000A8C2C 90 83 00 00 */ stw r4, 0(r3) +/* 800ABCF0 000A8C30 80 83 00 00 */ lwz r4, 0(r3) +/* 800ABCF4 000A8C34 54 84 04 1A */ rlwinm r4, r4, 0, 0x10, 0xd +/* 800ABCF8 000A8C38 7C 80 03 78 */ or r0, r4, r0 +/* 800ABCFC 000A8C3C 90 03 00 00 */ stw r0, 0(r3) +/* 800ABD00 000A8C40 48 00 00 24 */ b lbl_800ABD24 +lbl_800ABD04: +/* 800ABD04 000A8C44 80 03 00 00 */ lwz r0, 0(r3) +/* 800ABD08 000A8C48 54 00 03 12 */ rlwinm r0, r0, 0, 0xc, 9 +/* 800ABD0C 000A8C4C 50 80 9A 96 */ rlwimi r0, r4, 0x13, 0xa, 0xb +/* 800ABD10 000A8C50 90 03 00 00 */ stw r0, 0(r3) +/* 800ABD14 000A8C54 80 03 00 00 */ lwz r0, 0(r3) +/* 800ABD18 000A8C58 54 00 04 1A */ rlwinm r0, r0, 0, 0x10, 0xd +/* 800ABD1C 000A8C5C 64 00 00 03 */ oris r0, r0, 3 +/* 800ABD20 000A8C60 90 03 00 00 */ stw r0, 0(r3) +lbl_800ABD24: +/* 800ABD24 000A8C64 80 83 00 00 */ lwz r4, 0(r3) +/* 800ABD28 000A8C68 54 E0 99 58 */ rlwinm r0, r7, 0x13, 5, 0xc +/* 800ABD2C 000A8C6C 55 06 B0 12 */ slwi r6, r8, 0x16 +/* 800ABD30 000A8C70 54 84 03 56 */ rlwinm r4, r4, 0, 0xd, 0xb +/* 800ABD34 000A8C74 7C 80 03 78 */ or r0, r4, r0 +/* 800ABD38 000A8C78 90 03 00 00 */ stw r0, 0(r3) +/* 800ABD3C 000A8C7C 38 80 00 61 */ li r4, 0x61 +/* 800ABD40 000A8C80 3C A0 CC 01 */ lis r5, 0xCC008000@ha +/* 800ABD44 000A8C84 80 E3 00 00 */ lwz r7, 0(r3) +/* 800ABD48 000A8C88 38 00 00 00 */ li r0, 0 +/* 800ABD4C 000A8C8C 54 E7 02 8E */ rlwinm r7, r7, 0, 0xa, 7 +/* 800ABD50 000A8C90 7C E6 33 78 */ or r6, r7, r6 +/* 800ABD54 000A8C94 90 C3 00 00 */ stw r6, 0(r3) +/* 800ABD58 000A8C98 98 85 80 00 */ stb r4, 0xCC008000@l(r5) +/* 800ABD5C 000A8C9C 80 8D 82 C8 */ lwz r4, gx@sda21(r13) +/* 800ABD60 000A8CA0 80 63 00 00 */ lwz r3, 0(r3) +/* 800ABD64 000A8CA4 90 65 80 00 */ stw r3, -0x8000(r5) +/* 800ABD68 000A8CA8 B0 04 00 02 */ sth r0, 2(r4) +/* 800ABD6C 000A8CAC 4E 80 00 20 */ blr + +.global GXSetTevAlphaOp +GXSetTevAlphaOp: +/* 800ABD70 000A8CB0 54 63 10 3A */ slwi r3, r3, 2 +/* 800ABD74 000A8CB4 80 0D 82 C8 */ lwz r0, gx@sda21(r13) +/* 800ABD78 000A8CB8 38 63 01 70 */ addi r3, r3, 0x170 +/* 800ABD7C 000A8CBC 7C 60 1A 14 */ add r3, r0, r3 +/* 800ABD80 000A8CC0 80 03 00 00 */ lwz r0, 0(r3) +/* 800ABD84 000A8CC4 2C 04 00 01 */ cmpwi r4, 1 +/* 800ABD88 000A8CC8 54 00 03 98 */ rlwinm r0, r0, 0, 0xe, 0xc +/* 800ABD8C 000A8CCC 50 80 93 5A */ rlwimi r0, r4, 0x12, 0xd, 0xd +/* 800ABD90 000A8CD0 90 03 00 00 */ stw r0, 0(r3) +/* 800ABD94 000A8CD4 41 81 00 30 */ bgt lbl_800ABDC4 +/* 800ABD98 000A8CD8 81 23 00 00 */ lwz r9, 0(r3) +/* 800ABD9C 000A8CDC 54 C4 A0 16 */ slwi r4, r6, 0x14 +/* 800ABDA0 000A8CE0 54 A0 80 1E */ slwi r0, r5, 0x10 +/* 800ABDA4 000A8CE4 55 25 03 12 */ rlwinm r5, r9, 0, 0xc, 9 +/* 800ABDA8 000A8CE8 7C A4 23 78 */ or r4, r5, r4 +/* 800ABDAC 000A8CEC 90 83 00 00 */ stw r4, 0(r3) +/* 800ABDB0 000A8CF0 80 83 00 00 */ lwz r4, 0(r3) +/* 800ABDB4 000A8CF4 54 84 04 1A */ rlwinm r4, r4, 0, 0x10, 0xd +/* 800ABDB8 000A8CF8 7C 80 03 78 */ or r0, r4, r0 +/* 800ABDBC 000A8CFC 90 03 00 00 */ stw r0, 0(r3) +/* 800ABDC0 000A8D00 48 00 00 24 */ b lbl_800ABDE4 +lbl_800ABDC4: +/* 800ABDC4 000A8D04 80 03 00 00 */ lwz r0, 0(r3) +/* 800ABDC8 000A8D08 54 00 03 12 */ rlwinm r0, r0, 0, 0xc, 9 +/* 800ABDCC 000A8D0C 50 80 9A 96 */ rlwimi r0, r4, 0x13, 0xa, 0xb +/* 800ABDD0 000A8D10 90 03 00 00 */ stw r0, 0(r3) +/* 800ABDD4 000A8D14 80 03 00 00 */ lwz r0, 0(r3) +/* 800ABDD8 000A8D18 54 00 04 1A */ rlwinm r0, r0, 0, 0x10, 0xd +/* 800ABDDC 000A8D1C 64 00 00 03 */ oris r0, r0, 3 +/* 800ABDE0 000A8D20 90 03 00 00 */ stw r0, 0(r3) +lbl_800ABDE4: +/* 800ABDE4 000A8D24 80 83 00 00 */ lwz r4, 0(r3) +/* 800ABDE8 000A8D28 54 E0 99 58 */ rlwinm r0, r7, 0x13, 5, 0xc +/* 800ABDEC 000A8D2C 55 06 B0 12 */ slwi r6, r8, 0x16 +/* 800ABDF0 000A8D30 54 84 03 56 */ rlwinm r4, r4, 0, 0xd, 0xb +/* 800ABDF4 000A8D34 7C 80 03 78 */ or r0, r4, r0 +/* 800ABDF8 000A8D38 90 03 00 00 */ stw r0, 0(r3) +/* 800ABDFC 000A8D3C 38 80 00 61 */ li r4, 0x61 +/* 800ABE00 000A8D40 3C A0 CC 01 */ lis r5, 0xCC008000@ha +/* 800ABE04 000A8D44 80 E3 00 00 */ lwz r7, 0(r3) +/* 800ABE08 000A8D48 38 00 00 00 */ li r0, 0 +/* 800ABE0C 000A8D4C 54 E7 02 8E */ rlwinm r7, r7, 0, 0xa, 7 +/* 800ABE10 000A8D50 7C E6 33 78 */ or r6, r7, r6 +/* 800ABE14 000A8D54 90 C3 00 00 */ stw r6, 0(r3) +/* 800ABE18 000A8D58 98 85 80 00 */ stb r4, 0xCC008000@l(r5) +/* 800ABE1C 000A8D5C 80 8D 82 C8 */ lwz r4, gx@sda21(r13) +/* 800ABE20 000A8D60 80 63 00 00 */ lwz r3, 0(r3) +/* 800ABE24 000A8D64 90 65 80 00 */ stw r3, -0x8000(r5) +/* 800ABE28 000A8D68 B0 04 00 02 */ sth r0, 2(r4) +/* 800ABE2C 000A8D6C 4E 80 00 20 */ blr + +.global GXSetTevColor +GXSetTevColor: +/* 800ABE30 000A8D70 88 04 00 03 */ lbz r0, 3(r4) +/* 800ABE34 000A8D74 54 68 08 3C */ slwi r8, r3, 1 +/* 800ABE38 000A8D78 88 A4 00 00 */ lbz r5, 0(r4) +/* 800ABE3C 000A8D7C 38 E8 00 E0 */ addi r7, r8, 0xe0 +/* 800ABE40 000A8D80 54 09 60 26 */ slwi r9, r0, 0xc +/* 800ABE44 000A8D84 50 A9 06 3E */ rlwimi r9, r5, 0, 0x18, 0x1f +/* 800ABE48 000A8D88 89 44 00 02 */ lbz r10, 2(r4) +/* 800ABE4C 000A8D8C 88 C4 00 01 */ lbz r6, 1(r4) +/* 800ABE50 000A8D90 54 E7 C0 0E */ slwi r7, r7, 0x18 +/* 800ABE54 000A8D94 38 A0 00 61 */ li r5, 0x61 +/* 800ABE58 000A8D98 80 6D 82 C8 */ lwz r3, gx@sda21(r13) +/* 800ABE5C 000A8D9C 3C 80 CC 01 */ lis r4, 0xCC008000@ha +/* 800ABE60 000A8DA0 98 A4 80 00 */ stb r5, 0xCC008000@l(r4) +/* 800ABE64 000A8DA4 51 27 03 3E */ rlwimi r7, r9, 0, 0xc, 0x1f +/* 800ABE68 000A8DA8 38 08 00 E1 */ addi r0, r8, 0xe1 +/* 800ABE6C 000A8DAC 90 E4 80 00 */ stw r7, -0x8000(r4) +/* 800ABE70 000A8DB0 54 C7 60 26 */ slwi r7, r6, 0xc +/* 800ABE74 000A8DB4 54 06 C0 0E */ slwi r6, r0, 0x18 +/* 800ABE78 000A8DB8 51 47 06 3E */ rlwimi r7, r10, 0, 0x18, 0x1f +/* 800ABE7C 000A8DBC 98 A4 80 00 */ stb r5, -0x8000(r4) +/* 800ABE80 000A8DC0 50 E6 03 3E */ rlwimi r6, r7, 0, 0xc, 0x1f +/* 800ABE84 000A8DC4 90 C4 80 00 */ stw r6, -0x8000(r4) +/* 800ABE88 000A8DC8 38 00 00 00 */ li r0, 0 +/* 800ABE8C 000A8DCC 98 A4 80 00 */ stb r5, -0x8000(r4) +/* 800ABE90 000A8DD0 90 C4 80 00 */ stw r6, -0x8000(r4) +/* 800ABE94 000A8DD4 98 A4 80 00 */ stb r5, -0x8000(r4) +/* 800ABE98 000A8DD8 90 C4 80 00 */ stw r6, -0x8000(r4) +/* 800ABE9C 000A8DDC B0 03 00 02 */ sth r0, 2(r3) +/* 800ABEA0 000A8DE0 4E 80 00 20 */ blr + +.global GXSetTevColorS10 +GXSetTevColorS10: +/* 800ABEA4 000A8DE4 A8 04 00 06 */ lha r0, 6(r4) +/* 800ABEA8 000A8DE8 54 69 08 3C */ slwi r9, r3, 1 +/* 800ABEAC 000A8DEC A8 A4 00 00 */ lha r5, 0(r4) +/* 800ABEB0 000A8DF0 39 09 00 E0 */ addi r8, r9, 0xe0 +/* 800ABEB4 000A8DF4 54 0A 62 66 */ rlwinm r10, r0, 0xc, 9, 0x13 +/* 800ABEB8 000A8DF8 50 AA 05 7E */ rlwimi r10, r5, 0, 0x15, 0x1f +/* 800ABEBC 000A8DFC A8 E4 00 04 */ lha r7, 4(r4) +/* 800ABEC0 000A8E00 A8 C4 00 02 */ lha r6, 2(r4) +/* 800ABEC4 000A8E04 55 08 C0 0E */ slwi r8, r8, 0x18 +/* 800ABEC8 000A8E08 38 A0 00 61 */ li r5, 0x61 +/* 800ABECC 000A8E0C 80 6D 82 C8 */ lwz r3, gx@sda21(r13) +/* 800ABED0 000A8E10 3C 80 CC 01 */ lis r4, 0xCC008000@ha +/* 800ABED4 000A8E14 98 A4 80 00 */ stb r5, 0xCC008000@l(r4) +/* 800ABED8 000A8E18 51 48 02 7E */ rlwimi r8, r10, 0, 9, 0x1f +/* 800ABEDC 000A8E1C 38 09 00 E1 */ addi r0, r9, 0xe1 +/* 800ABEE0 000A8E20 91 04 80 00 */ stw r8, -0x8000(r4) +/* 800ABEE4 000A8E24 54 C8 62 66 */ rlwinm r8, r6, 0xc, 9, 0x13 +/* 800ABEE8 000A8E28 54 06 C0 0E */ slwi r6, r0, 0x18 +/* 800ABEEC 000A8E2C 50 E8 05 7E */ rlwimi r8, r7, 0, 0x15, 0x1f +/* 800ABEF0 000A8E30 98 A4 80 00 */ stb r5, -0x8000(r4) +/* 800ABEF4 000A8E34 51 06 02 7E */ rlwimi r6, r8, 0, 9, 0x1f +/* 800ABEF8 000A8E38 90 C4 80 00 */ stw r6, -0x8000(r4) +/* 800ABEFC 000A8E3C 38 00 00 00 */ li r0, 0 +/* 800ABF00 000A8E40 98 A4 80 00 */ stb r5, -0x8000(r4) +/* 800ABF04 000A8E44 90 C4 80 00 */ stw r6, -0x8000(r4) +/* 800ABF08 000A8E48 98 A4 80 00 */ stb r5, -0x8000(r4) +/* 800ABF0C 000A8E4C 90 C4 80 00 */ stw r6, -0x8000(r4) +/* 800ABF10 000A8E50 B0 03 00 02 */ sth r0, 2(r3) +/* 800ABF14 000A8E54 4E 80 00 20 */ blr + +.global GXSetTevKColor +GXSetTevKColor: +/* 800ABF18 000A8E58 88 04 00 03 */ lbz r0, 3(r4) +/* 800ABF1C 000A8E5C 54 65 08 3C */ slwi r5, r3, 1 +/* 800ABF20 000A8E60 88 C4 00 00 */ lbz r6, 0(r4) +/* 800ABF24 000A8E64 38 E5 00 E0 */ addi r7, r5, 0xe0 +/* 800ABF28 000A8E68 54 00 60 26 */ slwi r0, r0, 0xc +/* 800ABF2C 000A8E6C 50 C0 06 3E */ rlwimi r0, r6, 0, 0x18, 0x1f +/* 800ABF30 000A8E70 88 C4 00 01 */ lbz r6, 1(r4) +/* 800ABF34 000A8E74 89 24 00 02 */ lbz r9, 2(r4) +/* 800ABF38 000A8E78 54 00 03 0E */ rlwinm r0, r0, 0, 0xc, 7 +/* 800ABF3C 000A8E7C 64 08 00 80 */ oris r8, r0, 0x80 +/* 800ABF40 000A8E80 80 6D 82 C8 */ lwz r3, gx@sda21(r13) +/* 800ABF44 000A8E84 54 E7 C0 0E */ slwi r7, r7, 0x18 +/* 800ABF48 000A8E88 38 00 00 61 */ li r0, 0x61 +/* 800ABF4C 000A8E8C 3C 80 CC 01 */ lis r4, 0xCC008000@ha +/* 800ABF50 000A8E90 54 C6 60 26 */ slwi r6, r6, 0xc +/* 800ABF54 000A8E94 98 04 80 00 */ stb r0, 0xCC008000@l(r4) +/* 800ABF58 000A8E98 51 07 02 3E */ rlwimi r7, r8, 0, 8, 0x1f +/* 800ABF5C 000A8E9C 90 E4 80 00 */ stw r7, -0x8000(r4) +/* 800ABF60 000A8EA0 51 26 06 3E */ rlwimi r6, r9, 0, 0x18, 0x1f +/* 800ABF64 000A8EA4 38 A5 00 E1 */ addi r5, r5, 0xe1 +/* 800ABF68 000A8EA8 98 04 80 00 */ stb r0, -0x8000(r4) +/* 800ABF6C 000A8EAC 54 C0 03 0E */ rlwinm r0, r6, 0, 0xc, 7 +/* 800ABF70 000A8EB0 64 06 00 80 */ oris r6, r0, 0x80 +/* 800ABF74 000A8EB4 54 A0 C0 0E */ slwi r0, r5, 0x18 +/* 800ABF78 000A8EB8 50 C0 02 3E */ rlwimi r0, r6, 0, 8, 0x1f +/* 800ABF7C 000A8EBC 90 04 80 00 */ stw r0, -0x8000(r4) +/* 800ABF80 000A8EC0 38 00 00 00 */ li r0, 0 +/* 800ABF84 000A8EC4 B0 03 00 02 */ sth r0, 2(r3) +/* 800ABF88 000A8EC8 4E 80 00 20 */ blr + +.global GXSetTevKColorSel +GXSetTevKColorSel: +/* 800ABF8C 000A8ECC 7C 65 0E 70 */ srawi r5, r3, 1 +/* 800ABF90 000A8ED0 80 CD 82 C8 */ lwz r6, gx@sda21(r13) +/* 800ABF94 000A8ED4 54 60 07 FF */ clrlwi. r0, r3, 0x1f +/* 800ABF98 000A8ED8 54 A3 10 3A */ slwi r3, r5, 2 +/* 800ABF9C 000A8EDC 38 E3 01 B0 */ addi r7, r3, 0x1b0 +/* 800ABFA0 000A8EE0 7C E6 3A 14 */ add r7, r6, r7 +/* 800ABFA4 000A8EE4 41 82 00 1C */ beq lbl_800ABFC0 +/* 800ABFA8 000A8EE8 80 67 00 00 */ lwz r3, 0(r7) +/* 800ABFAC 000A8EEC 54 80 70 22 */ slwi r0, r4, 0xe +/* 800ABFB0 000A8EF0 54 63 04 98 */ rlwinm r3, r3, 0, 0x12, 0xc +/* 800ABFB4 000A8EF4 7C 60 03 78 */ or r0, r3, r0 +/* 800ABFB8 000A8EF8 90 07 00 00 */ stw r0, 0(r7) +/* 800ABFBC 000A8EFC 48 00 00 18 */ b lbl_800ABFD4 +lbl_800ABFC0: +/* 800ABFC0 000A8F00 80 67 00 00 */ lwz r3, 0(r7) +/* 800ABFC4 000A8F04 54 80 20 36 */ slwi r0, r4, 4 +/* 800ABFC8 000A8F08 54 63 07 2C */ rlwinm r3, r3, 0, 0x1c, 0x16 +/* 800ABFCC 000A8F0C 7C 60 03 78 */ or r0, r3, r0 +/* 800ABFD0 000A8F10 90 07 00 00 */ stw r0, 0(r7) +lbl_800ABFD4: +/* 800ABFD4 000A8F14 38 00 00 61 */ li r0, 0x61 +/* 800ABFD8 000A8F18 80 6D 82 C8 */ lwz r3, gx@sda21(r13) +/* 800ABFDC 000A8F1C 3C A0 CC 01 */ lis r5, 0xCC008000@ha +/* 800ABFE0 000A8F20 98 05 80 00 */ stb r0, 0xCC008000@l(r5) +/* 800ABFE4 000A8F24 38 00 00 00 */ li r0, 0 +/* 800ABFE8 000A8F28 80 87 00 00 */ lwz r4, 0(r7) +/* 800ABFEC 000A8F2C 90 85 80 00 */ stw r4, -0x8000(r5) +/* 800ABFF0 000A8F30 B0 03 00 02 */ sth r0, 2(r3) +/* 800ABFF4 000A8F34 4E 80 00 20 */ blr + +.global GXSetTevKAlphaSel +GXSetTevKAlphaSel: +/* 800ABFF8 000A8F38 7C 65 0E 70 */ srawi r5, r3, 1 +/* 800ABFFC 000A8F3C 80 CD 82 C8 */ lwz r6, gx@sda21(r13) +/* 800AC000 000A8F40 54 60 07 FF */ clrlwi. r0, r3, 0x1f +/* 800AC004 000A8F44 54 A3 10 3A */ slwi r3, r5, 2 +/* 800AC008 000A8F48 38 E3 01 B0 */ addi r7, r3, 0x1b0 +/* 800AC00C 000A8F4C 7C E6 3A 14 */ add r7, r6, r7 +/* 800AC010 000A8F50 41 82 00 1C */ beq lbl_800AC02C +/* 800AC014 000A8F54 80 67 00 00 */ lwz r3, 0(r7) +/* 800AC018 000A8F58 54 80 98 18 */ slwi r0, r4, 0x13 +/* 800AC01C 000A8F5C 54 63 03 4E */ rlwinm r3, r3, 0, 0xd, 7 +/* 800AC020 000A8F60 7C 60 03 78 */ or r0, r3, r0 +/* 800AC024 000A8F64 90 07 00 00 */ stw r0, 0(r7) +/* 800AC028 000A8F68 48 00 00 18 */ b lbl_800AC040 +lbl_800AC02C: +/* 800AC02C 000A8F6C 80 67 00 00 */ lwz r3, 0(r7) +/* 800AC030 000A8F70 54 80 48 2C */ slwi r0, r4, 9 +/* 800AC034 000A8F74 54 63 05 E2 */ rlwinm r3, r3, 0, 0x17, 0x11 +/* 800AC038 000A8F78 7C 60 03 78 */ or r0, r3, r0 +/* 800AC03C 000A8F7C 90 07 00 00 */ stw r0, 0(r7) +lbl_800AC040: +/* 800AC040 000A8F80 38 00 00 61 */ li r0, 0x61 +/* 800AC044 000A8F84 80 6D 82 C8 */ lwz r3, gx@sda21(r13) +/* 800AC048 000A8F88 3C A0 CC 01 */ lis r5, 0xCC008000@ha +/* 800AC04C 000A8F8C 98 05 80 00 */ stb r0, 0xCC008000@l(r5) +/* 800AC050 000A8F90 38 00 00 00 */ li r0, 0 +/* 800AC054 000A8F94 80 87 00 00 */ lwz r4, 0(r7) +/* 800AC058 000A8F98 90 85 80 00 */ stw r4, -0x8000(r5) +/* 800AC05C 000A8F9C B0 03 00 02 */ sth r0, 2(r3) +/* 800AC060 000A8FA0 4E 80 00 20 */ blr + +.global GXSetTevSwapMode +GXSetTevSwapMode: +/* 800AC064 000A8FA4 54 63 10 3A */ slwi r3, r3, 2 +/* 800AC068 000A8FA8 80 0D 82 C8 */ lwz r0, gx@sda21(r13) +/* 800AC06C 000A8FAC 38 E3 01 70 */ addi r7, r3, 0x170 +/* 800AC070 000A8FB0 7C E0 3A 14 */ add r7, r0, r7 +/* 800AC074 000A8FB4 80 07 00 00 */ lwz r0, 0(r7) +/* 800AC078 000A8FB8 54 A6 10 3A */ slwi r6, r5, 2 +/* 800AC07C 000A8FBC 38 60 00 61 */ li r3, 0x61 +/* 800AC080 000A8FC0 54 00 00 3A */ rlwinm r0, r0, 0, 0, 0x1d +/* 800AC084 000A8FC4 7C 00 23 78 */ or r0, r0, r4 +/* 800AC088 000A8FC8 90 07 00 00 */ stw r0, 0(r7) +/* 800AC08C 000A8FCC 3C A0 CC 01 */ lis r5, 0xCC008000@ha +/* 800AC090 000A8FD0 38 00 00 00 */ li r0, 0 +/* 800AC094 000A8FD4 80 87 00 00 */ lwz r4, 0(r7) +/* 800AC098 000A8FD8 54 84 07 B6 */ rlwinm r4, r4, 0, 0x1e, 0x1b +/* 800AC09C 000A8FDC 7C 84 33 78 */ or r4, r4, r6 +/* 800AC0A0 000A8FE0 90 87 00 00 */ stw r4, 0(r7) +/* 800AC0A4 000A8FE4 98 65 80 00 */ stb r3, 0xCC008000@l(r5) +/* 800AC0A8 000A8FE8 80 6D 82 C8 */ lwz r3, gx@sda21(r13) +/* 800AC0AC 000A8FEC 80 87 00 00 */ lwz r4, 0(r7) +/* 800AC0B0 000A8FF0 90 85 80 00 */ stw r4, -0x8000(r5) +/* 800AC0B4 000A8FF4 B0 03 00 02 */ sth r0, 2(r3) +/* 800AC0B8 000A8FF8 4E 80 00 20 */ blr + +.global GXSetTevSwapModeTable +GXSetTevSwapModeTable: +/* 800AC0BC 000A8FFC 54 69 08 3C */ slwi r9, r3, 1 +/* 800AC0C0 000A9000 80 0D 82 C8 */ lwz r0, gx@sda21(r13) +/* 800AC0C4 000A9004 54 63 18 38 */ slwi r3, r3, 3 +/* 800AC0C8 000A9008 39 63 01 B0 */ addi r11, r3, 0x1b0 +/* 800AC0CC 000A900C 7D 60 5A 14 */ add r11, r0, r11 +/* 800AC0D0 000A9010 81 0B 00 00 */ lwz r8, 0(r11) +/* 800AC0D4 000A9014 38 09 00 01 */ addi r0, r9, 1 +/* 800AC0D8 000A9018 54 03 10 3A */ slwi r3, r0, 2 +/* 800AC0DC 000A901C 55 00 00 3A */ rlwinm r0, r8, 0, 0, 0x1d +/* 800AC0E0 000A9020 7C 00 23 78 */ or r0, r0, r4 +/* 800AC0E4 000A9024 90 0B 00 00 */ stw r0, 0(r11) +/* 800AC0E8 000A9028 54 A0 10 3A */ slwi r0, r5, 2 +/* 800AC0EC 000A902C 39 20 00 61 */ li r9, 0x61 +/* 800AC0F0 000A9030 80 8B 00 00 */ lwz r4, 0(r11) +/* 800AC0F4 000A9034 3D 00 CC 01 */ lis r8, 0xCC008000@ha +/* 800AC0F8 000A9038 39 43 01 B0 */ addi r10, r3, 0x1b0 +/* 800AC0FC 000A903C 54 83 07 B6 */ rlwinm r3, r4, 0, 0x1e, 0x1b +/* 800AC100 000A9040 7C 60 03 78 */ or r0, r3, r0 +/* 800AC104 000A9044 90 0B 00 00 */ stw r0, 0(r11) +/* 800AC108 000A9048 54 E3 10 3A */ slwi r3, r7, 2 +/* 800AC10C 000A904C 38 00 00 00 */ li r0, 0 +/* 800AC110 000A9050 99 28 80 00 */ stb r9, 0xCC008000@l(r8) +/* 800AC114 000A9054 80 8D 82 C8 */ lwz r4, gx@sda21(r13) +/* 800AC118 000A9058 80 AB 00 00 */ lwz r5, 0(r11) +/* 800AC11C 000A905C 7D 44 52 14 */ add r10, r4, r10 +/* 800AC120 000A9060 90 A8 80 00 */ stw r5, -0x8000(r8) +/* 800AC124 000A9064 80 8A 00 00 */ lwz r4, 0(r10) +/* 800AC128 000A9068 54 84 00 3A */ rlwinm r4, r4, 0, 0, 0x1d +/* 800AC12C 000A906C 7C 84 33 78 */ or r4, r4, r6 +/* 800AC130 000A9070 90 8A 00 00 */ stw r4, 0(r10) +/* 800AC134 000A9074 80 8A 00 00 */ lwz r4, 0(r10) +/* 800AC138 000A9078 54 84 07 B6 */ rlwinm r4, r4, 0, 0x1e, 0x1b +/* 800AC13C 000A907C 7C 83 1B 78 */ or r3, r4, r3 +/* 800AC140 000A9080 90 6A 00 00 */ stw r3, 0(r10) +/* 800AC144 000A9084 99 28 80 00 */ stb r9, -0x8000(r8) +/* 800AC148 000A9088 80 6D 82 C8 */ lwz r3, gx@sda21(r13) +/* 800AC14C 000A908C 80 8A 00 00 */ lwz r4, 0(r10) +/* 800AC150 000A9090 90 88 80 00 */ stw r4, -0x8000(r8) +/* 800AC154 000A9094 B0 03 00 02 */ sth r0, 2(r3) +/* 800AC158 000A9098 4E 80 00 20 */ blr + +.global GXSetAlphaCompare +GXSetAlphaCompare: +/* 800AC15C 000A909C 54 E7 44 2E */ rlwinm r7, r7, 8, 0x10, 0x17 +/* 800AC160 000A90A0 81 0D 82 C8 */ lwz r8, gx@sda21(r13) +/* 800AC164 000A90A4 50 87 06 3E */ rlwimi r7, r4, 0, 0x18, 0x1f +/* 800AC168 000A90A8 54 60 80 1E */ slwi r0, r3, 0x10 +/* 800AC16C 000A90AC 50 E0 04 3E */ rlwimi r0, r7, 0, 0x10, 0x1f +/* 800AC170 000A90B0 54 03 03 52 */ rlwinm r3, r0, 0, 0xd, 9 +/* 800AC174 000A90B4 54 C0 98 18 */ slwi r0, r6, 0x13 +/* 800AC178 000A90B8 7C 60 03 78 */ or r0, r3, r0 +/* 800AC17C 000A90BC 54 03 02 8E */ rlwinm r3, r0, 0, 0xa, 7 +/* 800AC180 000A90C0 54 A0 B0 12 */ slwi r0, r5, 0x16 +/* 800AC184 000A90C4 7C 60 03 78 */ or r0, r3, r0 +/* 800AC188 000A90C8 54 04 02 3E */ clrlwi r4, r0, 8 +/* 800AC18C 000A90CC 38 00 00 61 */ li r0, 0x61 +/* 800AC190 000A90D0 3C 60 CC 01 */ lis r3, 0xCC008000@ha +/* 800AC194 000A90D4 98 03 80 00 */ stb r0, 0xCC008000@l(r3) +/* 800AC198 000A90D8 64 84 F3 00 */ oris r4, r4, 0xf300 +/* 800AC19C 000A90DC 38 00 00 00 */ li r0, 0 +/* 800AC1A0 000A90E0 90 83 80 00 */ stw r4, -0x8000(r3) +/* 800AC1A4 000A90E4 B0 08 00 02 */ sth r0, 2(r8) +/* 800AC1A8 000A90E8 4E 80 00 20 */ blr + +.global GXSetZTexture +GXSetZTexture: +/* 800AC1AC 000A90EC 2C 04 00 13 */ cmpwi r4, 0x13 +/* 800AC1B0 000A90F0 54 A0 02 3E */ clrlwi r0, r5, 8 +/* 800AC1B4 000A90F4 64 07 F4 00 */ oris r7, r0, 0xf400 +/* 800AC1B8 000A90F8 41 82 00 28 */ beq lbl_800AC1E0 +/* 800AC1BC 000A90FC 40 80 00 10 */ bge lbl_800AC1CC +/* 800AC1C0 000A9100 2C 04 00 11 */ cmpwi r4, 0x11 +/* 800AC1C4 000A9104 41 82 00 14 */ beq lbl_800AC1D8 +/* 800AC1C8 000A9108 48 00 00 28 */ b lbl_800AC1F0 +lbl_800AC1CC: +/* 800AC1CC 000A910C 2C 04 00 16 */ cmpwi r4, 0x16 +/* 800AC1D0 000A9110 41 82 00 18 */ beq lbl_800AC1E8 +/* 800AC1D4 000A9114 48 00 00 1C */ b lbl_800AC1F0 +lbl_800AC1D8: +/* 800AC1D8 000A9118 38 C0 00 00 */ li r6, 0 +/* 800AC1DC 000A911C 48 00 00 18 */ b lbl_800AC1F4 +lbl_800AC1E0: +/* 800AC1E0 000A9120 38 C0 00 01 */ li r6, 1 +/* 800AC1E4 000A9124 48 00 00 10 */ b lbl_800AC1F4 +lbl_800AC1E8: +/* 800AC1E8 000A9128 38 C0 00 02 */ li r6, 2 +/* 800AC1EC 000A912C 48 00 00 08 */ b lbl_800AC1F4 +lbl_800AC1F0: +/* 800AC1F0 000A9130 38 C0 00 02 */ li r6, 2 +lbl_800AC1F4: +/* 800AC1F4 000A9134 38 00 00 61 */ li r0, 0x61 +/* 800AC1F8 000A9138 80 8D 82 C8 */ lwz r4, gx@sda21(r13) +/* 800AC1FC 000A913C 3C A0 CC 01 */ lis r5, 0xCC008000@ha +/* 800AC200 000A9140 98 05 80 00 */ stb r0, 0xCC008000@l(r5) +/* 800AC204 000A9144 54 C6 07 B6 */ rlwinm r6, r6, 0, 0x1e, 0x1b +/* 800AC208 000A9148 54 63 10 3A */ slwi r3, r3, 2 +/* 800AC20C 000A914C 90 E5 80 00 */ stw r7, -0x8000(r5) +/* 800AC210 000A9150 7C C3 1B 78 */ or r3, r6, r3 +/* 800AC214 000A9154 54 63 02 3E */ clrlwi r3, r3, 8 +/* 800AC218 000A9158 98 05 80 00 */ stb r0, -0x8000(r5) +/* 800AC21C 000A915C 64 63 F5 00 */ oris r3, r3, 0xf500 +/* 800AC220 000A9160 38 00 00 00 */ li r0, 0 +/* 800AC224 000A9164 90 65 80 00 */ stw r3, -0x8000(r5) +/* 800AC228 000A9168 B0 04 00 02 */ sth r0, 2(r4) +/* 800AC22C 000A916C 4E 80 00 20 */ blr + +.global GXSetTevOrder +GXSetTevOrder: +/* 800AC230 000A9170 7C 67 0E 70 */ srawi r7, r3, 1 +/* 800AC234 000A9174 81 2D 82 C8 */ lwz r9, gx@sda21(r13) +/* 800AC238 000A9178 54 AA 06 2C */ rlwinm r10, r5, 0, 0x18, 0x16 +/* 800AC23C 000A917C 7C E7 01 94 */ addze r7, r7 +/* 800AC240 000A9180 54 60 10 3A */ slwi r0, r3, 2 +/* 800AC244 000A9184 7D 09 02 14 */ add r8, r9, r0 +/* 800AC248 000A9188 54 E7 10 3A */ slwi r7, r7, 2 +/* 800AC24C 000A918C 90 A8 04 9C */ stw r5, 0x49c(r8) +/* 800AC250 000A9190 38 E7 01 00 */ addi r7, r7, 0x100 +/* 800AC254 000A9194 28 0A 00 08 */ cmplwi r10, 8 +/* 800AC258 000A9198 38 0A 00 00 */ addi r0, r10, 0 +/* 800AC25C 000A919C 7C E9 3A 14 */ add r7, r9, r7 +/* 800AC260 000A91A0 41 80 00 0C */ blt lbl_800AC26C +/* 800AC264 000A91A4 39 20 00 00 */ li r9, 0 +/* 800AC268 000A91A8 48 00 00 08 */ b lbl_800AC270 +lbl_800AC26C: +/* 800AC26C 000A91AC 7C 09 03 78 */ mr r9, r0 +lbl_800AC270: +/* 800AC270 000A91B0 2C 04 00 08 */ cmpwi r4, 8 +/* 800AC274 000A91B4 41 80 00 28 */ blt lbl_800AC29C +/* 800AC278 000A91B8 80 8D 82 C8 */ lwz r4, gx@sda21(r13) +/* 800AC27C 000A91BC 38 00 00 01 */ li r0, 1 +/* 800AC280 000A91C0 7C 00 18 30 */ slw r0, r0, r3 +/* 800AC284 000A91C4 81 04 04 E0 */ lwz r8, 0x4e0(r4) +/* 800AC288 000A91C8 39 44 04 E0 */ addi r10, r4, 0x4e0 +/* 800AC28C 000A91CC 38 80 00 00 */ li r4, 0 +/* 800AC290 000A91D0 7D 00 00 78 */ andc r0, r8, r0 +/* 800AC294 000A91D4 90 0A 00 00 */ stw r0, 0(r10) +/* 800AC298 000A91D8 48 00 00 20 */ b lbl_800AC2B8 +lbl_800AC29C: +/* 800AC29C 000A91DC 81 0D 82 C8 */ lwz r8, gx@sda21(r13) +/* 800AC2A0 000A91E0 38 00 00 01 */ li r0, 1 +/* 800AC2A4 000A91E4 7C 00 18 30 */ slw r0, r0, r3 +/* 800AC2A8 000A91E8 39 48 04 E0 */ addi r10, r8, 0x4e0 +/* 800AC2AC 000A91EC 81 08 04 E0 */ lwz r8, 0x4e0(r8) +/* 800AC2B0 000A91F0 7D 00 03 78 */ or r0, r8, r0 +/* 800AC2B4 000A91F4 90 0A 00 00 */ stw r0, 0(r10) +lbl_800AC2B8: +/* 800AC2B8 000A91F8 54 60 07 FF */ clrlwi. r0, r3, 0x1f +/* 800AC2BC 000A91FC 41 82 00 94 */ beq lbl_800AC350 +/* 800AC2C0 000A9200 81 07 00 00 */ lwz r8, 0(r7) +/* 800AC2C4 000A9204 55 23 60 26 */ slwi r3, r9, 0xc +/* 800AC2C8 000A9208 54 80 78 20 */ slwi r0, r4, 0xf +/* 800AC2CC 000A920C 55 04 05 20 */ rlwinm r4, r8, 0, 0x14, 0x10 +/* 800AC2D0 000A9210 7C 83 1B 78 */ or r3, r4, r3 +/* 800AC2D4 000A9214 90 67 00 00 */ stw r3, 0(r7) +/* 800AC2D8 000A9218 2C 06 00 FF */ cmpwi r6, 0xff +/* 800AC2DC 000A921C 80 67 00 00 */ lwz r3, 0(r7) +/* 800AC2E0 000A9220 54 63 04 5A */ rlwinm r3, r3, 0, 0x11, 0xd +/* 800AC2E4 000A9224 7C 60 03 78 */ or r0, r3, r0 +/* 800AC2E8 000A9228 90 07 00 00 */ stw r0, 0(r7) +/* 800AC2EC 000A922C 40 82 00 0C */ bne lbl_800AC2F8 +/* 800AC2F0 000A9230 38 00 00 07 */ li r0, 7 +/* 800AC2F4 000A9234 48 00 00 18 */ b lbl_800AC30C +lbl_800AC2F8: +/* 800AC2F8 000A9238 3C 60 80 3B */ lis r3, c2r$71@ha +/* 800AC2FC 000A923C 54 C4 10 3A */ slwi r4, r6, 2 +/* 800AC300 000A9240 38 03 1B 10 */ addi r0, r3, c2r$71@l +/* 800AC304 000A9244 7C 60 22 14 */ add r3, r0, r4 +/* 800AC308 000A9248 80 03 00 00 */ lwz r0, 0(r3) +lbl_800AC30C: +/* 800AC30C 000A924C 80 67 00 00 */ lwz r3, 0(r7) +/* 800AC310 000A9250 54 00 98 18 */ slwi r0, r0, 0x13 +/* 800AC314 000A9254 2C 05 00 FF */ cmpwi r5, 0xff +/* 800AC318 000A9258 54 63 03 52 */ rlwinm r3, r3, 0, 0xd, 9 +/* 800AC31C 000A925C 7C 60 03 78 */ or r0, r3, r0 +/* 800AC320 000A9260 90 07 00 00 */ stw r0, 0(r7) +/* 800AC324 000A9264 38 80 00 00 */ li r4, 0 +/* 800AC328 000A9268 41 82 00 10 */ beq lbl_800AC338 +/* 800AC32C 000A926C 54 A0 05 EF */ rlwinm. r0, r5, 0, 0x17, 0x17 +/* 800AC330 000A9270 40 82 00 08 */ bne lbl_800AC338 +/* 800AC334 000A9274 38 80 00 01 */ li r4, 1 +lbl_800AC338: +/* 800AC338 000A9278 80 67 00 00 */ lwz r3, 0(r7) +/* 800AC33C 000A927C 54 80 90 1A */ slwi r0, r4, 0x12 +/* 800AC340 000A9280 54 63 03 98 */ rlwinm r3, r3, 0, 0xe, 0xc +/* 800AC344 000A9284 7C 60 03 78 */ or r0, r3, r0 +/* 800AC348 000A9288 90 07 00 00 */ stw r0, 0(r7) +/* 800AC34C 000A928C 48 00 00 8C */ b lbl_800AC3D8 +lbl_800AC350: +/* 800AC350 000A9290 80 67 00 00 */ lwz r3, 0(r7) +/* 800AC354 000A9294 54 80 18 38 */ slwi r0, r4, 3 +/* 800AC358 000A9298 2C 06 00 FF */ cmpwi r6, 0xff +/* 800AC35C 000A929C 54 63 00 38 */ rlwinm r3, r3, 0, 0, 0x1c +/* 800AC360 000A92A0 7C 63 4B 78 */ or r3, r3, r9 +/* 800AC364 000A92A4 90 67 00 00 */ stw r3, 0(r7) +/* 800AC368 000A92A8 80 67 00 00 */ lwz r3, 0(r7) +/* 800AC36C 000A92AC 54 63 07 72 */ rlwinm r3, r3, 0, 0x1d, 0x19 +/* 800AC370 000A92B0 7C 60 03 78 */ or r0, r3, r0 +/* 800AC374 000A92B4 90 07 00 00 */ stw r0, 0(r7) +/* 800AC378 000A92B8 40 82 00 0C */ bne lbl_800AC384 +/* 800AC37C 000A92BC 38 00 00 07 */ li r0, 7 +/* 800AC380 000A92C0 48 00 00 18 */ b lbl_800AC398 +lbl_800AC384: +/* 800AC384 000A92C4 3C 60 80 3B */ lis r3, c2r$71@ha +/* 800AC388 000A92C8 54 C4 10 3A */ slwi r4, r6, 2 +/* 800AC38C 000A92CC 38 03 1B 10 */ addi r0, r3, c2r$71@l +/* 800AC390 000A92D0 7C 60 22 14 */ add r3, r0, r4 +/* 800AC394 000A92D4 80 03 00 00 */ lwz r0, 0(r3) +lbl_800AC398: +/* 800AC398 000A92D8 80 67 00 00 */ lwz r3, 0(r7) +/* 800AC39C 000A92DC 54 00 38 30 */ slwi r0, r0, 7 +/* 800AC3A0 000A92E0 2C 05 00 FF */ cmpwi r5, 0xff +/* 800AC3A4 000A92E4 54 63 06 6A */ rlwinm r3, r3, 0, 0x19, 0x15 +/* 800AC3A8 000A92E8 7C 60 03 78 */ or r0, r3, r0 +/* 800AC3AC 000A92EC 90 07 00 00 */ stw r0, 0(r7) +/* 800AC3B0 000A92F0 38 80 00 00 */ li r4, 0 +/* 800AC3B4 000A92F4 41 82 00 10 */ beq lbl_800AC3C4 +/* 800AC3B8 000A92F8 54 A0 05 EF */ rlwinm. r0, r5, 0, 0x17, 0x17 +/* 800AC3BC 000A92FC 40 82 00 08 */ bne lbl_800AC3C4 +/* 800AC3C0 000A9300 38 80 00 01 */ li r4, 1 +lbl_800AC3C4: +/* 800AC3C4 000A9304 80 67 00 00 */ lwz r3, 0(r7) +/* 800AC3C8 000A9308 54 80 30 32 */ slwi r0, r4, 6 +/* 800AC3CC 000A930C 54 63 06 B0 */ rlwinm r3, r3, 0, 0x1a, 0x18 +/* 800AC3D0 000A9310 7C 60 03 78 */ or r0, r3, r0 +/* 800AC3D4 000A9314 90 07 00 00 */ stw r0, 0(r7) +lbl_800AC3D8: +/* 800AC3D8 000A9318 38 00 00 61 */ li r0, 0x61 +/* 800AC3DC 000A931C 80 6D 82 C8 */ lwz r3, gx@sda21(r13) +/* 800AC3E0 000A9320 3C A0 CC 01 */ lis r5, 0xCC008000@ha +/* 800AC3E4 000A9324 98 05 80 00 */ stb r0, 0xCC008000@l(r5) +/* 800AC3E8 000A9328 38 00 00 00 */ li r0, 0 +/* 800AC3EC 000A932C 80 87 00 00 */ lwz r4, 0(r7) +/* 800AC3F0 000A9330 90 85 80 00 */ stw r4, -0x8000(r5) +/* 800AC3F4 000A9334 B0 03 00 02 */ sth r0, 2(r3) +/* 800AC3F8 000A9338 80 6D 82 C8 */ lwz r3, gx@sda21(r13) +/* 800AC3FC 000A933C 80 03 04 F4 */ lwz r0, 0x4f4(r3) +/* 800AC400 000A9340 60 00 00 01 */ ori r0, r0, 1 +/* 800AC404 000A9344 90 03 04 F4 */ stw r0, 0x4f4(r3) +/* 800AC408 000A9348 4E 80 00 20 */ blr + +.global GXSetNumTevStages +GXSetNumTevStages: +/* 800AC40C 000A934C 54 63 06 3E */ clrlwi r3, r3, 0x18 +/* 800AC410 000A9350 80 8D 82 C8 */ lwz r4, gx@sda21(r13) +/* 800AC414 000A9354 38 03 FF FF */ addi r0, r3, -1 +/* 800AC418 000A9358 84 64 02 04 */ lwzu r3, 0x204(r4) +/* 800AC41C 000A935C 54 00 50 2A */ slwi r0, r0, 0xa +/* 800AC420 000A9360 54 63 05 A2 */ rlwinm r3, r3, 0, 0x16, 0x11 +/* 800AC424 000A9364 7C 60 03 78 */ or r0, r3, r0 +/* 800AC428 000A9368 90 04 00 00 */ stw r0, 0(r4) +/* 800AC42C 000A936C 80 6D 82 C8 */ lwz r3, gx@sda21(r13) +/* 800AC430 000A9370 80 03 04 F4 */ lwz r0, 0x4f4(r3) +/* 800AC434 000A9374 60 00 00 04 */ ori r0, r0, 4 +/* 800AC438 000A9378 90 03 04 F4 */ stw r0, 0x4f4(r3) +/* 800AC43C 000A937C 4E 80 00 20 */ blr + +.section .data, "wa" # 0x803A8380 - 0x803E6000 + .balign 8 +c2r$71: + .4byte 0 + .4byte 0x00000001 + .4byte 0 + .4byte 0x00000001 + .4byte 0 + .4byte 0x00000001 + .4byte 0x00000007 + .4byte 0x00000005 + .4byte 0x00000006 + .4byte 0 diff --git a/asm/Dolphin/gx/GXTexture.s b/asm/Dolphin/gx/GXTexture.s new file mode 100644 index 0000000..d73aaaf --- /dev/null +++ b/asm/Dolphin/gx/GXTexture.s @@ -0,0 +1,1431 @@ +.include "macros.inc" + +.section .text, "ax" # 0x80005600 - 0x8036FBA0 +.global GXGetTexBufferSize +GXGetTexBufferSize: +/* 800AA1D4 000A7114 94 21 FF D8 */ stwu r1, -0x28(r1) +/* 800AA1D8 000A7118 28 05 00 3C */ cmplwi r5, 0x3c +/* 800AA1DC 000A711C 93 E1 00 24 */ stw r31, 0x24(r1) +/* 800AA1E0 000A7120 41 81 00 40 */ bgt lbl_800AA220 +/* 800AA1E4 000A7124 3D 00 80 3B */ lis r8, "@92"@ha +/* 800AA1E8 000A7128 39 08 18 E8 */ addi r8, r8, "@92"@l +/* 800AA1EC 000A712C 54 A0 10 3A */ slwi r0, r5, 2 +/* 800AA1F0 000A7130 7C 08 00 2E */ lwzx r0, r8, r0 +/* 800AA1F4 000A7134 7C 09 03 A6 */ mtctr r0 +/* 800AA1F8 000A7138 4E 80 04 20 */ bctr +lbl_800AA1FC: +/* 800AA1FC 000A713C 38 00 00 03 */ li r0, 3 +/* 800AA200 000A7140 39 00 00 03 */ li r8, 3 +/* 800AA204 000A7144 48 00 00 24 */ b lbl_800AA228 +lbl_800AA208: +/* 800AA208 000A7148 38 00 00 03 */ li r0, 3 +/* 800AA20C 000A714C 39 00 00 02 */ li r8, 2 +/* 800AA210 000A7150 48 00 00 18 */ b lbl_800AA228 +lbl_800AA214: +/* 800AA214 000A7154 38 00 00 02 */ li r0, 2 +/* 800AA218 000A7158 39 00 00 02 */ li r8, 2 +/* 800AA21C 000A715C 48 00 00 0C */ b lbl_800AA228 +lbl_800AA220: +/* 800AA220 000A7160 39 00 00 00 */ li r8, 0 +/* 800AA224 000A7164 38 00 00 00 */ li r0, 0 +lbl_800AA228: +/* 800AA228 000A7168 28 05 00 06 */ cmplwi r5, 6 +/* 800AA22C 000A716C 41 82 00 0C */ beq lbl_800AA238 +/* 800AA230 000A7170 28 05 00 16 */ cmplwi r5, 0x16 +/* 800AA234 000A7174 40 82 00 0C */ bne lbl_800AA240 +lbl_800AA238: +/* 800AA238 000A7178 38 A0 00 40 */ li r5, 0x40 +/* 800AA23C 000A717C 48 00 00 08 */ b lbl_800AA244 +lbl_800AA240: +/* 800AA240 000A7180 38 A0 00 20 */ li r5, 0x20 +lbl_800AA244: +/* 800AA244 000A7184 54 C6 06 3E */ clrlwi r6, r6, 0x18 +/* 800AA248 000A7188 28 06 00 01 */ cmplwi r6, 1 +/* 800AA24C 000A718C 40 82 00 A0 */ bne lbl_800AA2EC +/* 800AA250 000A7190 54 E9 06 3E */ clrlwi r9, r7, 0x18 +/* 800AA254 000A7194 38 C0 00 01 */ li r6, 1 +/* 800AA258 000A7198 7D 29 03 A6 */ mtctr r9 +/* 800AA25C 000A719C 7C C7 40 30 */ slw r7, r6, r8 +/* 800AA260 000A71A0 7C C6 00 30 */ slw r6, r6, r0 +/* 800AA264 000A71A4 28 09 00 00 */ cmplwi r9, 0 +/* 800AA268 000A71A8 39 46 FF FF */ addi r10, r6, -1 +/* 800AA26C 000A71AC 38 E7 FF FF */ addi r7, r7, -1 +/* 800AA270 000A71B0 3B E0 00 00 */ li r31, 0 +/* 800AA274 000A71B4 40 81 00 AC */ ble lbl_800AA320 +lbl_800AA278: +/* 800AA278 000A71B8 54 6B 04 3E */ clrlwi r11, r3, 0x10 +/* 800AA27C 000A71BC 7C CB 52 14 */ add r6, r11, r10 +/* 800AA280 000A71C0 54 8C 04 3E */ clrlwi r12, r4, 0x10 +/* 800AA284 000A71C4 7C C9 06 30 */ sraw r9, r6, r0 +/* 800AA288 000A71C8 7C CC 3A 14 */ add r6, r12, r7 +/* 800AA28C 000A71CC 7C C6 46 30 */ sraw r6, r6, r8 +/* 800AA290 000A71D0 7C C9 31 D6 */ mullw r6, r9, r6 +/* 800AA294 000A71D4 7C C5 31 D6 */ mullw r6, r5, r6 +/* 800AA298 000A71D8 28 0B 00 01 */ cmplwi r11, 1 +/* 800AA29C 000A71DC 7F FF 32 14 */ add r31, r31, r6 +/* 800AA2A0 000A71E0 40 82 00 0C */ bne lbl_800AA2AC +/* 800AA2A4 000A71E4 28 0C 00 01 */ cmplwi r12, 1 +/* 800AA2A8 000A71E8 41 82 00 78 */ beq lbl_800AA320 +lbl_800AA2AC: +/* 800AA2AC 000A71EC 54 63 04 3E */ clrlwi r3, r3, 0x10 +/* 800AA2B0 000A71F0 28 03 00 01 */ cmplwi r3, 1 +/* 800AA2B4 000A71F4 40 81 00 0C */ ble lbl_800AA2C0 +/* 800AA2B8 000A71F8 7D 66 0E 70 */ srawi r6, r11, 1 +/* 800AA2BC 000A71FC 48 00 00 08 */ b lbl_800AA2C4 +lbl_800AA2C0: +/* 800AA2C0 000A7200 38 C0 00 01 */ li r6, 1 +lbl_800AA2C4: +/* 800AA2C4 000A7204 54 83 04 3E */ clrlwi r3, r4, 0x10 +/* 800AA2C8 000A7208 28 03 00 01 */ cmplwi r3, 1 +/* 800AA2CC 000A720C 54 C3 04 3E */ clrlwi r3, r6, 0x10 +/* 800AA2D0 000A7210 40 81 00 0C */ ble lbl_800AA2DC +/* 800AA2D4 000A7214 7D 84 0E 70 */ srawi r4, r12, 1 +/* 800AA2D8 000A7218 48 00 00 08 */ b lbl_800AA2E0 +lbl_800AA2DC: +/* 800AA2DC 000A721C 38 80 00 01 */ li r4, 1 +lbl_800AA2E0: +/* 800AA2E0 000A7220 54 84 04 3E */ clrlwi r4, r4, 0x10 +/* 800AA2E4 000A7224 42 00 FF 94 */ bdnz lbl_800AA278 +/* 800AA2E8 000A7228 48 00 00 38 */ b lbl_800AA320 +lbl_800AA2EC: +/* 800AA2EC 000A722C 38 C0 00 01 */ li r6, 1 +/* 800AA2F0 000A7230 7C C7 00 30 */ slw r7, r6, r0 +/* 800AA2F4 000A7234 7C C6 40 30 */ slw r6, r6, r8 +/* 800AA2F8 000A7238 54 69 04 3E */ clrlwi r9, r3, 0x10 +/* 800AA2FC 000A723C 38 67 FF FF */ addi r3, r7, -1 +/* 800AA300 000A7240 7C E9 1A 14 */ add r7, r9, r3 +/* 800AA304 000A7244 54 84 04 3E */ clrlwi r4, r4, 0x10 +/* 800AA308 000A7248 38 66 FF FF */ addi r3, r6, -1 +/* 800AA30C 000A724C 7C E6 06 30 */ sraw r6, r7, r0 +/* 800AA310 000A7250 7C 04 1A 14 */ add r0, r4, r3 +/* 800AA314 000A7254 7C 00 46 30 */ sraw r0, r0, r8 +/* 800AA318 000A7258 7C 06 01 D6 */ mullw r0, r6, r0 +/* 800AA31C 000A725C 7F E5 01 D6 */ mullw r31, r5, r0 +lbl_800AA320: +/* 800AA320 000A7260 7F E3 FB 78 */ mr r3, r31 +/* 800AA324 000A7264 83 E1 00 24 */ lwz r31, 0x24(r1) +/* 800AA328 000A7268 38 21 00 28 */ addi r1, r1, 0x28 +/* 800AA32C 000A726C 4E 80 00 20 */ blr + +.global __GetImageTileCount +__GetImageTileCount: +/* 800AA330 000A7270 28 03 00 3C */ cmplwi r3, 0x3c +/* 800AA334 000A7274 41 81 00 40 */ bgt lbl_800AA374 +/* 800AA338 000A7278 3D 20 80 3B */ lis r9, "@133"@ha +/* 800AA33C 000A727C 39 29 19 DC */ addi r9, r9, "@133"@l +/* 800AA340 000A7280 54 60 10 3A */ slwi r0, r3, 2 +/* 800AA344 000A7284 7C 09 00 2E */ lwzx r0, r9, r0 +/* 800AA348 000A7288 7C 09 03 A6 */ mtctr r0 +/* 800AA34C 000A728C 4E 80 04 20 */ bctr +lbl_800AA350: +/* 800AA350 000A7290 39 60 00 03 */ li r11, 3 +/* 800AA354 000A7294 39 80 00 03 */ li r12, 3 +/* 800AA358 000A7298 48 00 00 24 */ b lbl_800AA37C +lbl_800AA35C: +/* 800AA35C 000A729C 39 60 00 03 */ li r11, 3 +/* 800AA360 000A72A0 39 80 00 02 */ li r12, 2 +/* 800AA364 000A72A4 48 00 00 18 */ b lbl_800AA37C +lbl_800AA368: +/* 800AA368 000A72A8 39 60 00 02 */ li r11, 2 +/* 800AA36C 000A72AC 39 80 00 02 */ li r12, 2 +/* 800AA370 000A72B0 48 00 00 0C */ b lbl_800AA37C +lbl_800AA374: +/* 800AA374 000A72B4 39 80 00 00 */ li r12, 0 +/* 800AA378 000A72B8 39 60 00 00 */ li r11, 0 +lbl_800AA37C: +/* 800AA37C 000A72BC 54 80 04 3F */ clrlwi. r0, r4, 0x10 +/* 800AA380 000A72C0 40 82 00 08 */ bne lbl_800AA388 +/* 800AA384 000A72C4 38 80 00 01 */ li r4, 1 +lbl_800AA388: +/* 800AA388 000A72C8 54 A0 04 3F */ clrlwi. r0, r5, 0x10 +/* 800AA38C 000A72CC 40 82 00 08 */ bne lbl_800AA394 +/* 800AA390 000A72D0 38 A0 00 01 */ li r5, 1 +lbl_800AA394: +/* 800AA394 000A72D4 39 40 00 01 */ li r10, 1 +/* 800AA398 000A72D8 7D 49 58 30 */ slw r9, r10, r11 +/* 800AA39C 000A72DC 54 84 04 3E */ clrlwi r4, r4, 0x10 +/* 800AA3A0 000A72E0 38 09 FF FF */ addi r0, r9, -1 +/* 800AA3A4 000A72E4 7C 04 02 14 */ add r0, r4, r0 +/* 800AA3A8 000A72E8 7C 00 5E 30 */ sraw r0, r0, r11 +/* 800AA3AC 000A72EC 7D 44 60 30 */ slw r4, r10, r12 +/* 800AA3B0 000A72F0 90 06 00 00 */ stw r0, 0(r6) +/* 800AA3B4 000A72F4 54 A5 04 3E */ clrlwi r5, r5, 0x10 +/* 800AA3B8 000A72F8 38 04 FF FF */ addi r0, r4, -1 +/* 800AA3BC 000A72FC 7C 05 02 14 */ add r0, r5, r0 +/* 800AA3C0 000A7300 7C 00 66 30 */ sraw r0, r0, r12 +/* 800AA3C4 000A7304 2C 03 00 06 */ cmpwi r3, 6 +/* 800AA3C8 000A7308 90 07 00 00 */ stw r0, 0(r7) +/* 800AA3CC 000A730C 41 82 00 10 */ beq lbl_800AA3DC +/* 800AA3D0 000A7310 2C 03 00 16 */ cmpwi r3, 0x16 +/* 800AA3D4 000A7314 41 82 00 08 */ beq lbl_800AA3DC +/* 800AA3D8 000A7318 39 40 00 00 */ li r10, 0 +lbl_800AA3DC: +/* 800AA3DC 000A731C 2C 0A 00 00 */ cmpwi r10, 0 +/* 800AA3E0 000A7320 41 82 00 0C */ beq lbl_800AA3EC +/* 800AA3E4 000A7324 38 00 00 02 */ li r0, 2 +/* 800AA3E8 000A7328 48 00 00 08 */ b lbl_800AA3F0 +lbl_800AA3EC: +/* 800AA3EC 000A732C 38 00 00 01 */ li r0, 1 +lbl_800AA3F0: +/* 800AA3F0 000A7330 90 08 00 00 */ stw r0, 0(r8) +/* 800AA3F4 000A7334 4E 80 00 20 */ blr + +.global GXInitTexObj +GXInitTexObj: +/* 800AA3F8 000A7338 7C 08 02 A6 */ mflr r0 +/* 800AA3FC 000A733C 90 01 00 04 */ stw r0, 4(r1) +/* 800AA400 000A7340 94 21 FF A0 */ stwu r1, -0x60(r1) +/* 800AA404 000A7344 BF 01 00 40 */ stmw r24, 0x40(r1) +/* 800AA408 000A7348 3B 64 00 00 */ addi r27, r4, 0 +/* 800AA40C 000A734C 3B 85 00 00 */ addi r28, r5, 0 +/* 800AA410 000A7350 3B E3 00 00 */ addi r31, r3, 0 +/* 800AA414 000A7354 3B A6 00 00 */ addi r29, r6, 0 +/* 800AA418 000A7358 3B C7 00 00 */ addi r30, r7, 0 +/* 800AA41C 000A735C 3B 08 00 00 */ addi r24, r8, 0 +/* 800AA420 000A7360 3B 29 00 00 */ addi r25, r9, 0 +/* 800AA424 000A7364 3B 4A 00 00 */ addi r26, r10, 0 +/* 800AA428 000A7368 38 80 00 00 */ li r4, 0 +/* 800AA42C 000A736C 38 A0 00 20 */ li r5, 0x20 +/* 800AA430 000A7370 4B F5 8C D1 */ bl memset +/* 800AA434 000A7374 80 9F 00 00 */ lwz r4, 0(r31) +/* 800AA438 000A7378 57 40 06 3F */ clrlwi. r0, r26, 0x18 +/* 800AA43C 000A737C 57 23 10 3A */ slwi r3, r25, 2 +/* 800AA440 000A7380 54 84 00 3A */ rlwinm r4, r4, 0, 0, 0x1d +/* 800AA444 000A7384 7C 84 C3 78 */ or r4, r4, r24 +/* 800AA448 000A7388 90 9F 00 00 */ stw r4, 0(r31) +/* 800AA44C 000A738C 80 1F 00 00 */ lwz r0, 0(r31) +/* 800AA450 000A7390 54 00 07 B6 */ rlwinm r0, r0, 0, 0x1e, 0x1b +/* 800AA454 000A7394 7C 00 1B 78 */ or r0, r0, r3 +/* 800AA458 000A7398 90 1F 00 00 */ stw r0, 0(r31) +/* 800AA45C 000A739C 80 1F 00 00 */ lwz r0, 0(r31) +/* 800AA460 000A73A0 54 00 07 34 */ rlwinm r0, r0, 0, 0x1c, 0x1a +/* 800AA464 000A73A4 60 00 00 10 */ ori r0, r0, 0x10 +/* 800AA468 000A73A8 90 1F 00 00 */ stw r0, 0(r31) +/* 800AA46C 000A73AC 41 82 00 A4 */ beq lbl_800AA510 +/* 800AA470 000A73B0 88 7F 00 1F */ lbz r3, 0x1f(r31) +/* 800AA474 000A73B4 38 1E FF F8 */ addi r0, r30, -8 +/* 800AA478 000A73B8 28 00 00 02 */ cmplwi r0, 2 +/* 800AA47C 000A73BC 60 60 00 01 */ ori r0, r3, 1 +/* 800AA480 000A73C0 98 1F 00 1F */ stb r0, 0x1f(r31) +/* 800AA484 000A73C4 41 81 00 18 */ bgt lbl_800AA49C +/* 800AA488 000A73C8 80 1F 00 00 */ lwz r0, 0(r31) +/* 800AA48C 000A73CC 54 00 06 EE */ rlwinm r0, r0, 0, 0x1b, 0x17 +/* 800AA490 000A73D0 60 00 00 A0 */ ori r0, r0, 0xa0 +/* 800AA494 000A73D4 90 1F 00 00 */ stw r0, 0(r31) +/* 800AA498 000A73D8 48 00 00 14 */ b lbl_800AA4AC +lbl_800AA49C: +/* 800AA49C 000A73DC 80 1F 00 00 */ lwz r0, 0(r31) +/* 800AA4A0 000A73E0 54 00 06 EE */ rlwinm r0, r0, 0, 0x1b, 0x17 +/* 800AA4A4 000A73E4 60 00 00 C0 */ ori r0, r0, 0xc0 +/* 800AA4A8 000A73E8 90 1F 00 00 */ stw r0, 0(r31) +lbl_800AA4AC: +/* 800AA4AC 000A73EC 57 83 04 3E */ clrlwi r3, r28, 0x10 +/* 800AA4B0 000A73F0 57 A0 04 3E */ clrlwi r0, r29, 0x10 +/* 800AA4B4 000A73F4 7C 03 00 40 */ cmplw r3, r0 +/* 800AA4B8 000A73F8 40 81 00 10 */ ble lbl_800AA4C8 +/* 800AA4BC 000A73FC 7C 60 00 34 */ cntlzw r0, r3 +/* 800AA4C0 000A7400 20 00 00 1F */ subfic r0, r0, 0x1f +/* 800AA4C4 000A7404 48 00 00 0C */ b lbl_800AA4D0 +lbl_800AA4C8: +/* 800AA4C8 000A7408 7C 00 00 34 */ cntlzw r0, r0 +/* 800AA4CC 000A740C 20 00 00 1F */ subfic r0, r0, 0x1f +lbl_800AA4D0: +/* 800AA4D0 000A7410 90 01 00 3C */ stw r0, 0x3c(r1) +/* 800AA4D4 000A7414 3C 00 43 30 */ lis r0, 0x4330 +/* 800AA4D8 000A7418 80 7F 00 04 */ lwz r3, 4(r31) +/* 800AA4DC 000A741C 90 01 00 38 */ stw r0, 0x38(r1) +/* 800AA4E0 000A7420 C8 22 8B 30 */ lfd f1, "@166"@sda21(r2) +/* 800AA4E4 000A7424 54 63 06 1E */ rlwinm r3, r3, 0, 0x18, 0xf +/* 800AA4E8 000A7428 C8 01 00 38 */ lfd f0, 0x38(r1) +/* 800AA4EC 000A742C C0 42 8B 28 */ lfs f2, "@164"@sda21(r2) +/* 800AA4F0 000A7430 EC 00 08 28 */ fsubs f0, f0, f1 +/* 800AA4F4 000A7434 EC 02 00 32 */ fmuls f0, f2, f0 +/* 800AA4F8 000A7438 FC 00 00 1E */ fctiwz f0, f0 +/* 800AA4FC 000A743C D8 01 00 30 */ stfd f0, 0x30(r1) +/* 800AA500 000A7440 80 01 00 34 */ lwz r0, 0x34(r1) +/* 800AA504 000A7444 50 03 44 2E */ rlwimi r3, r0, 8, 0x10, 0x17 +/* 800AA508 000A7448 90 7F 00 04 */ stw r3, 4(r31) +/* 800AA50C 000A744C 48 00 00 14 */ b lbl_800AA520 +lbl_800AA510: +/* 800AA510 000A7450 80 1F 00 00 */ lwz r0, 0(r31) +/* 800AA514 000A7454 54 00 06 EE */ rlwinm r0, r0, 0, 0x1b, 0x17 +/* 800AA518 000A7458 60 00 00 80 */ ori r0, r0, 0x80 +/* 800AA51C 000A745C 90 1F 00 00 */ stw r0, 0(r31) +lbl_800AA520: +/* 800AA520 000A7460 93 DF 00 14 */ stw r30, 0x14(r31) +/* 800AA524 000A7464 57 A3 04 3E */ clrlwi r3, r29, 0x10 +/* 800AA528 000A7468 57 C7 07 3E */ clrlwi r7, r30, 0x1c +/* 800AA52C 000A746C 80 BF 00 08 */ lwz r5, 8(r31) +/* 800AA530 000A7470 57 84 04 3E */ clrlwi r4, r28, 0x10 +/* 800AA534 000A7474 38 03 FF FF */ addi r0, r3, -1 +/* 800AA538 000A7478 54 A6 00 2A */ rlwinm r6, r5, 0, 0, 0x15 +/* 800AA53C 000A747C 38 A4 FF FF */ addi r5, r4, -1 +/* 800AA540 000A7480 7C C5 2B 78 */ or r5, r6, r5 +/* 800AA544 000A7484 90 BF 00 08 */ stw r5, 8(r31) +/* 800AA548 000A7488 54 05 50 2A */ slwi r5, r0, 0xa +/* 800AA54C 000A748C 57 60 D9 FE */ rlwinm r0, r27, 0x1b, 7, 0x1f +/* 800AA550 000A7490 80 DF 00 08 */ lwz r6, 8(r31) +/* 800AA554 000A7494 28 07 00 0E */ cmplwi r7, 0xe +/* 800AA558 000A7498 54 C6 05 96 */ rlwinm r6, r6, 0, 0x16, 0xb +/* 800AA55C 000A749C 7C C5 2B 78 */ or r5, r6, r5 +/* 800AA560 000A74A0 90 BF 00 08 */ stw r5, 8(r31) +/* 800AA564 000A74A4 80 BF 00 08 */ lwz r5, 8(r31) +/* 800AA568 000A74A8 54 A5 03 0E */ rlwinm r5, r5, 0, 0xc, 7 +/* 800AA56C 000A74AC 53 C5 A2 16 */ rlwimi r5, r30, 0x14, 8, 0xb +/* 800AA570 000A74B0 90 BF 00 08 */ stw r5, 8(r31) +/* 800AA574 000A74B4 80 BF 00 0C */ lwz r5, 0xc(r31) +/* 800AA578 000A74B8 54 A5 00 14 */ rlwinm r5, r5, 0, 0, 0xa +/* 800AA57C 000A74BC 7C A0 03 78 */ or r0, r5, r0 +/* 800AA580 000A74C0 90 1F 00 0C */ stw r0, 0xc(r31) +/* 800AA584 000A74C4 41 81 00 80 */ bgt lbl_800AA604 +/* 800AA588 000A74C8 3C A0 80 3B */ lis r5, "@168"@ha +/* 800AA58C 000A74CC 38 A5 1A D0 */ addi r5, r5, "@168"@l +/* 800AA590 000A74D0 54 E0 10 3A */ slwi r0, r7, 2 +/* 800AA594 000A74D4 7C 05 00 2E */ lwzx r0, r5, r0 +/* 800AA598 000A74D8 7C 09 03 A6 */ mtctr r0 +/* 800AA59C 000A74DC 4E 80 04 20 */ bctr +lbl_800AA5A0: +/* 800AA5A0 000A74E0 38 00 00 01 */ li r0, 1 +/* 800AA5A4 000A74E4 98 1F 00 1E */ stb r0, 0x1e(r31) +/* 800AA5A8 000A74E8 38 00 00 03 */ li r0, 3 +/* 800AA5AC 000A74EC 38 E0 00 03 */ li r7, 3 +/* 800AA5B0 000A74F0 48 00 00 64 */ b lbl_800AA614 +lbl_800AA5B4: +/* 800AA5B4 000A74F4 38 00 00 02 */ li r0, 2 +/* 800AA5B8 000A74F8 98 1F 00 1E */ stb r0, 0x1e(r31) +/* 800AA5BC 000A74FC 38 00 00 03 */ li r0, 3 +/* 800AA5C0 000A7500 38 E0 00 02 */ li r7, 2 +/* 800AA5C4 000A7504 48 00 00 50 */ b lbl_800AA614 +lbl_800AA5C8: +/* 800AA5C8 000A7508 38 00 00 02 */ li r0, 2 +/* 800AA5CC 000A750C 98 1F 00 1E */ stb r0, 0x1e(r31) +/* 800AA5D0 000A7510 38 00 00 02 */ li r0, 2 +/* 800AA5D4 000A7514 38 E0 00 02 */ li r7, 2 +/* 800AA5D8 000A7518 48 00 00 3C */ b lbl_800AA614 +lbl_800AA5DC: +/* 800AA5DC 000A751C 38 00 00 03 */ li r0, 3 +/* 800AA5E0 000A7520 98 1F 00 1E */ stb r0, 0x1e(r31) +/* 800AA5E4 000A7524 38 00 00 02 */ li r0, 2 +/* 800AA5E8 000A7528 38 E0 00 02 */ li r7, 2 +/* 800AA5EC 000A752C 48 00 00 28 */ b lbl_800AA614 +lbl_800AA5F0: +/* 800AA5F0 000A7530 38 00 00 00 */ li r0, 0 +/* 800AA5F4 000A7534 98 1F 00 1E */ stb r0, 0x1e(r31) +/* 800AA5F8 000A7538 38 00 00 03 */ li r0, 3 +/* 800AA5FC 000A753C 38 E0 00 03 */ li r7, 3 +/* 800AA600 000A7540 48 00 00 14 */ b lbl_800AA614 +lbl_800AA604: +/* 800AA604 000A7544 38 00 00 02 */ li r0, 2 +/* 800AA608 000A7548 98 1F 00 1E */ stb r0, 0x1e(r31) +/* 800AA60C 000A754C 38 00 00 02 */ li r0, 2 +/* 800AA610 000A7550 38 E0 00 02 */ li r7, 2 +lbl_800AA614: +/* 800AA614 000A7554 54 08 04 3E */ clrlwi r8, r0, 0x10 +/* 800AA618 000A7558 38 C0 00 01 */ li r6, 1 +/* 800AA61C 000A755C 7C C5 40 30 */ slw r5, r6, r8 +/* 800AA620 000A7560 54 E7 04 3E */ clrlwi r7, r7, 0x10 +/* 800AA624 000A7564 38 05 FF FF */ addi r0, r5, -1 +/* 800AA628 000A7568 7C C5 38 30 */ slw r5, r6, r7 +/* 800AA62C 000A756C 7C 84 02 14 */ add r4, r4, r0 +/* 800AA630 000A7570 38 05 FF FF */ addi r0, r5, -1 +/* 800AA634 000A7574 7C 84 46 30 */ sraw r4, r4, r8 +/* 800AA638 000A7578 7C 03 02 14 */ add r0, r3, r0 +/* 800AA63C 000A757C 7C 00 3E 30 */ sraw r0, r0, r7 +/* 800AA640 000A7580 7C 04 01 D6 */ mullw r0, r4, r0 +/* 800AA644 000A7584 54 00 04 7E */ clrlwi r0, r0, 0x11 +/* 800AA648 000A7588 B0 1F 00 1C */ sth r0, 0x1c(r31) +/* 800AA64C 000A758C 88 1F 00 1F */ lbz r0, 0x1f(r31) +/* 800AA650 000A7590 60 00 00 02 */ ori r0, r0, 2 +/* 800AA654 000A7594 98 1F 00 1F */ stb r0, 0x1f(r31) +/* 800AA658 000A7598 80 01 00 64 */ lwz r0, 0x64(r1) +/* 800AA65C 000A759C BB 01 00 40 */ lmw r24, 0x40(r1) +/* 800AA660 000A75A0 38 21 00 60 */ addi r1, r1, 0x60 +/* 800AA664 000A75A4 7C 08 03 A6 */ mtlr r0 +/* 800AA668 000A75A8 4E 80 00 20 */ blr + +.global GXInitTexObjCI +GXInitTexObjCI: +/* 800AA66C 000A75AC 7C 08 02 A6 */ mflr r0 +/* 800AA670 000A75B0 90 01 00 04 */ stw r0, 4(r1) +/* 800AA674 000A75B4 94 21 FF D0 */ stwu r1, -0x30(r1) +/* 800AA678 000A75B8 93 E1 00 2C */ stw r31, 0x2c(r1) +/* 800AA67C 000A75BC 83 E1 00 38 */ lwz r31, 0x38(r1) +/* 800AA680 000A75C0 93 C1 00 28 */ stw r30, 0x28(r1) +/* 800AA684 000A75C4 7C 7E 1B 78 */ mr r30, r3 +/* 800AA688 000A75C8 4B FF FD 71 */ bl GXInitTexObj +/* 800AA68C 000A75CC 88 1E 00 1F */ lbz r0, 0x1f(r30) +/* 800AA690 000A75D0 54 00 07 FA */ rlwinm r0, r0, 0, 0x1f, 0x1d +/* 800AA694 000A75D4 98 1E 00 1F */ stb r0, 0x1f(r30) +/* 800AA698 000A75D8 93 FE 00 18 */ stw r31, 0x18(r30) +/* 800AA69C 000A75DC 80 01 00 34 */ lwz r0, 0x34(r1) +/* 800AA6A0 000A75E0 83 E1 00 2C */ lwz r31, 0x2c(r1) +/* 800AA6A4 000A75E4 83 C1 00 28 */ lwz r30, 0x28(r1) +/* 800AA6A8 000A75E8 38 21 00 30 */ addi r1, r1, 0x30 +/* 800AA6AC 000A75EC 7C 08 03 A6 */ mtlr r0 +/* 800AA6B0 000A75F0 4E 80 00 20 */ blr + +.global GXInitTexObjLOD +GXInitTexObjLOD: +/* 800AA6B4 000A75F4 94 21 FF C8 */ stwu r1, -0x38(r1) +/* 800AA6B8 000A75F8 C0 02 8B 38 */ lfs f0, "@192"@sda21(r2) +/* 800AA6BC 000A75FC FC 03 00 40 */ fcmpo cr0, f3, f0 +/* 800AA6C0 000A7600 40 80 00 0C */ bge lbl_800AA6CC +/* 800AA6C4 000A7604 FC 60 00 90 */ fmr f3, f0 +/* 800AA6C8 000A7608 48 00 00 18 */ b lbl_800AA6E0 +lbl_800AA6CC: +/* 800AA6CC 000A760C C0 02 8B 3C */ lfs f0, "@193"@sda21(r2) +/* 800AA6D0 000A7610 FC 03 00 40 */ fcmpo cr0, f3, f0 +/* 800AA6D4 000A7614 4C 41 13 82 */ cror 2, 1, 2 +/* 800AA6D8 000A7618 40 82 00 08 */ bne lbl_800AA6E0 +/* 800AA6DC 000A761C C0 62 8B 40 */ lfs f3, "@194"@sda21(r2) +lbl_800AA6E0: +/* 800AA6E0 000A7620 C0 02 8B 44 */ lfs f0, "@195"@sda21(r2) +/* 800AA6E4 000A7624 2C 05 00 01 */ cmpwi r5, 1 +/* 800AA6E8 000A7628 80 03 00 00 */ lwz r0, 0(r3) +/* 800AA6EC 000A762C EC 00 00 F2 */ fmuls f0, f0, f3 +/* 800AA6F0 000A7630 54 05 05 DC */ rlwinm r5, r0, 0, 0x17, 0xe +/* 800AA6F4 000A7634 FC 00 00 1E */ fctiwz f0, f0 +/* 800AA6F8 000A7638 D8 01 00 30 */ stfd f0, 0x30(r1) +/* 800AA6FC 000A763C 80 01 00 34 */ lwz r0, 0x34(r1) +/* 800AA700 000A7640 50 05 4B EC */ rlwimi r5, r0, 9, 0xf, 0x16 +/* 800AA704 000A7644 90 A3 00 00 */ stw r5, 0(r3) +/* 800AA708 000A7648 40 82 00 0C */ bne lbl_800AA714 +/* 800AA70C 000A764C 38 A0 00 01 */ li r5, 1 +/* 800AA710 000A7650 48 00 00 08 */ b lbl_800AA718 +lbl_800AA714: +/* 800AA714 000A7654 38 A0 00 00 */ li r5, 0 +lbl_800AA718: +/* 800AA718 000A7658 81 23 00 00 */ lwz r9, 0(r3) +/* 800AA71C 000A765C 54 E0 06 3F */ clrlwi. r0, r7, 0x18 +/* 800AA720 000A7660 54 A5 20 36 */ slwi r5, r5, 4 +/* 800AA724 000A7664 55 27 07 34 */ rlwinm r7, r9, 0, 0x1c, 0x1a +/* 800AA728 000A7668 7C E5 2B 78 */ or r5, r7, r5 +/* 800AA72C 000A766C 90 A3 00 00 */ stw r5, 0(r3) +/* 800AA730 000A7670 38 AD 82 E0 */ addi r5, r13, GX2HWFiltConv@sda21 +/* 800AA734 000A7674 7C 05 20 AE */ lbzx r0, r5, r4 +/* 800AA738 000A7678 80 E3 00 00 */ lwz r7, 0(r3) +/* 800AA73C 000A767C 54 00 28 34 */ slwi r0, r0, 5 +/* 800AA740 000A7680 54 E4 06 EE */ rlwinm r4, r7, 0, 0x1b, 0x17 +/* 800AA744 000A7684 7C 80 03 78 */ or r0, r4, r0 +/* 800AA748 000A7688 90 03 00 00 */ stw r0, 0(r3) +/* 800AA74C 000A768C 41 82 00 0C */ beq lbl_800AA758 +/* 800AA750 000A7690 38 00 00 00 */ li r0, 0 +/* 800AA754 000A7694 48 00 00 08 */ b lbl_800AA75C +lbl_800AA758: +/* 800AA758 000A7698 38 00 00 01 */ li r0, 1 +lbl_800AA75C: +/* 800AA75C 000A769C 80 83 00 00 */ lwz r4, 0(r3) +/* 800AA760 000A76A0 54 00 40 2E */ slwi r0, r0, 8 +/* 800AA764 000A76A4 54 84 06 2C */ rlwinm r4, r4, 0, 0x18, 0x16 +/* 800AA768 000A76A8 7C 80 03 78 */ or r0, r4, r0 +/* 800AA76C 000A76AC 90 03 00 00 */ stw r0, 0(r3) +/* 800AA770 000A76B0 55 04 98 18 */ slwi r4, r8, 0x13 +/* 800AA774 000A76B4 54 C0 A8 D4 */ rlwinm r0, r6, 0x15, 3, 0xa +/* 800AA778 000A76B8 80 A3 00 00 */ lwz r5, 0(r3) +/* 800AA77C 000A76BC 54 A5 03 DA */ rlwinm r5, r5, 0, 0xf, 0xd +/* 800AA780 000A76C0 90 A3 00 00 */ stw r5, 0(r3) +/* 800AA784 000A76C4 80 A3 00 00 */ lwz r5, 0(r3) +/* 800AA788 000A76C8 54 A5 03 98 */ rlwinm r5, r5, 0, 0xe, 0xc +/* 800AA78C 000A76CC 90 A3 00 00 */ stw r5, 0(r3) +/* 800AA790 000A76D0 80 A3 00 00 */ lwz r5, 0(r3) +/* 800AA794 000A76D4 54 A5 03 54 */ rlwinm r5, r5, 0, 0xd, 0xa +/* 800AA798 000A76D8 7C A4 23 78 */ or r4, r5, r4 +/* 800AA79C 000A76DC 90 83 00 00 */ stw r4, 0(r3) +/* 800AA7A0 000A76E0 80 83 00 00 */ lwz r4, 0(r3) +/* 800AA7A4 000A76E4 54 84 02 D2 */ rlwinm r4, r4, 0, 0xb, 9 +/* 800AA7A8 000A76E8 7C 80 03 78 */ or r0, r4, r0 +/* 800AA7AC 000A76EC 90 03 00 00 */ stw r0, 0(r3) +/* 800AA7B0 000A76F0 C0 02 8B 48 */ lfs f0, "@196"@sda21(r2) +/* 800AA7B4 000A76F4 FC 01 00 40 */ fcmpo cr0, f1, f0 +/* 800AA7B8 000A76F8 40 80 00 0C */ bge lbl_800AA7C4 +/* 800AA7BC 000A76FC FC 20 00 90 */ fmr f1, f0 +/* 800AA7C0 000A7700 48 00 00 14 */ b lbl_800AA7D4 +lbl_800AA7C4: +/* 800AA7C4 000A7704 C0 02 8B 4C */ lfs f0, "@197"@sda21(r2) +/* 800AA7C8 000A7708 FC 01 00 40 */ fcmpo cr0, f1, f0 +/* 800AA7CC 000A770C 40 81 00 08 */ ble lbl_800AA7D4 +/* 800AA7D0 000A7710 FC 20 00 90 */ fmr f1, f0 +lbl_800AA7D4: +/* 800AA7D4 000A7714 C0 62 8B 28 */ lfs f3, "@164"@sda21(r2) +/* 800AA7D8 000A7718 C0 02 8B 48 */ lfs f0, "@196"@sda21(r2) +/* 800AA7DC 000A771C EC 23 00 72 */ fmuls f1, f3, f1 +/* 800AA7E0 000A7720 FC 02 00 40 */ fcmpo cr0, f2, f0 +/* 800AA7E4 000A7724 FC 20 08 1E */ fctiwz f1, f1 +/* 800AA7E8 000A7728 D8 21 00 30 */ stfd f1, 0x30(r1) +/* 800AA7EC 000A772C 80 81 00 34 */ lwz r4, 0x34(r1) +/* 800AA7F0 000A7730 40 80 00 0C */ bge lbl_800AA7FC +/* 800AA7F4 000A7734 FC 40 00 90 */ fmr f2, f0 +/* 800AA7F8 000A7738 48 00 00 14 */ b lbl_800AA80C +lbl_800AA7FC: +/* 800AA7FC 000A773C C0 02 8B 4C */ lfs f0, "@197"@sda21(r2) +/* 800AA800 000A7740 FC 02 00 40 */ fcmpo cr0, f2, f0 +/* 800AA804 000A7744 40 81 00 08 */ ble lbl_800AA80C +/* 800AA808 000A7748 FC 40 00 90 */ fmr f2, f0 +lbl_800AA80C: +/* 800AA80C 000A774C 80 03 00 04 */ lwz r0, 4(r3) +/* 800AA810 000A7750 54 00 00 2E */ rlwinm r0, r0, 0, 0, 0x17 +/* 800AA814 000A7754 50 80 06 3E */ rlwimi r0, r4, 0, 0x18, 0x1f +/* 800AA818 000A7758 90 03 00 04 */ stw r0, 4(r3) +/* 800AA81C 000A775C C0 02 8B 28 */ lfs f0, "@164"@sda21(r2) +/* 800AA820 000A7760 80 03 00 04 */ lwz r0, 4(r3) +/* 800AA824 000A7764 EC 00 00 B2 */ fmuls f0, f0, f2 +/* 800AA828 000A7768 54 04 06 1E */ rlwinm r4, r0, 0, 0x18, 0xf +/* 800AA82C 000A776C FC 00 00 1E */ fctiwz f0, f0 +/* 800AA830 000A7770 D8 01 00 30 */ stfd f0, 0x30(r1) +/* 800AA834 000A7774 80 01 00 34 */ lwz r0, 0x34(r1) +/* 800AA838 000A7778 50 04 44 2E */ rlwimi r4, r0, 8, 0x10, 0x17 +/* 800AA83C 000A777C 90 83 00 04 */ stw r4, 4(r3) +/* 800AA840 000A7780 38 21 00 38 */ addi r1, r1, 0x38 +/* 800AA844 000A7784 4E 80 00 20 */ blr + +.global GXGetTexObjAll +GXGetTexObjAll: +/* 800AA848 000A7788 80 03 00 0C */ lwz r0, 0xc(r3) +/* 800AA84C 000A778C 54 00 29 B4 */ rlwinm r0, r0, 5, 6, 0x1a +/* 800AA850 000A7790 90 04 00 00 */ stw r0, 0(r4) +/* 800AA854 000A7794 80 03 00 08 */ lwz r0, 8(r3) +/* 800AA858 000A7798 54 04 05 BE */ clrlwi r4, r0, 0x16 +/* 800AA85C 000A779C 38 04 00 01 */ addi r0, r4, 1 +/* 800AA860 000A77A0 B0 05 00 00 */ sth r0, 0(r5) +/* 800AA864 000A77A4 80 03 00 08 */ lwz r0, 8(r3) +/* 800AA868 000A77A8 54 04 B5 BE */ rlwinm r4, r0, 0x16, 0x16, 0x1f +/* 800AA86C 000A77AC 38 04 00 01 */ addi r0, r4, 1 +/* 800AA870 000A77B0 B0 06 00 00 */ sth r0, 0(r6) +/* 800AA874 000A77B4 80 03 00 14 */ lwz r0, 0x14(r3) +/* 800AA878 000A77B8 90 07 00 00 */ stw r0, 0(r7) +/* 800AA87C 000A77BC 80 03 00 00 */ lwz r0, 0(r3) +/* 800AA880 000A77C0 54 00 07 BE */ clrlwi r0, r0, 0x1e +/* 800AA884 000A77C4 90 08 00 00 */ stw r0, 0(r8) +/* 800AA888 000A77C8 80 03 00 00 */ lwz r0, 0(r3) +/* 800AA88C 000A77CC 54 00 F7 BE */ rlwinm r0, r0, 0x1e, 0x1e, 0x1f +/* 800AA890 000A77D0 90 09 00 00 */ stw r0, 0(r9) +/* 800AA894 000A77D4 88 03 00 1F */ lbz r0, 0x1f(r3) +/* 800AA898 000A77D8 54 03 07 FE */ clrlwi r3, r0, 0x1f +/* 800AA89C 000A77DC 38 03 FF FF */ addi r0, r3, -1 +/* 800AA8A0 000A77E0 7C 00 00 34 */ cntlzw r0, r0 +/* 800AA8A4 000A77E4 54 00 DE 3E */ rlwinm r0, r0, 0x1b, 0x18, 0x1f +/* 800AA8A8 000A77E8 98 0A 00 00 */ stb r0, 0(r10) +/* 800AA8AC 000A77EC 4E 80 00 20 */ blr + +.global GXGetTexObjWidth +GXGetTexObjWidth: +/* 800AA8B0 000A77F0 80 03 00 08 */ lwz r0, 8(r3) +/* 800AA8B4 000A77F4 54 03 05 BE */ clrlwi r3, r0, 0x16 +/* 800AA8B8 000A77F8 38 63 00 01 */ addi r3, r3, 1 +/* 800AA8BC 000A77FC 4E 80 00 20 */ blr + +.global GXGetTexObjHeight +GXGetTexObjHeight: +/* 800AA8C0 000A7800 80 03 00 08 */ lwz r0, 8(r3) +/* 800AA8C4 000A7804 54 03 B5 BE */ rlwinm r3, r0, 0x16, 0x16, 0x1f +/* 800AA8C8 000A7808 38 63 00 01 */ addi r3, r3, 1 +/* 800AA8CC 000A780C 4E 80 00 20 */ blr + +.global GXGetTexObjFmt +GXGetTexObjFmt: +/* 800AA8D0 000A7810 80 63 00 14 */ lwz r3, 0x14(r3) +/* 800AA8D4 000A7814 4E 80 00 20 */ blr + +.global GXLoadTexObjPreLoaded +GXLoadTexObjPreLoaded: +/* 800AA8D8 000A7818 7C 08 02 A6 */ mflr r0 +/* 800AA8DC 000A781C 38 ED 80 48 */ addi r7, r13, GXTexImage0Ids@sda21 +/* 800AA8E0 000A7820 90 01 00 04 */ stw r0, 4(r1) +/* 800AA8E4 000A7824 94 21 FF D8 */ stwu r1, -0x28(r1) +/* 800AA8E8 000A7828 93 E1 00 24 */ stw r31, 0x24(r1) +/* 800AA8EC 000A782C 3F E0 CC 01 */ lis r31, 0xCC008000@ha +/* 800AA8F0 000A7830 93 C1 00 20 */ stw r30, 0x20(r1) +/* 800AA8F4 000A7834 3B C0 00 61 */ li r30, 0x61 +/* 800AA8F8 000A7838 93 A1 00 1C */ stw r29, 0x1c(r1) +/* 800AA8FC 000A783C 3B A5 00 00 */ addi r29, r5, 0 +/* 800AA900 000A7840 38 AD 80 58 */ addi r5, r13, GXTexImage2Ids@sda21 +/* 800AA904 000A7844 93 81 00 18 */ stw r28, 0x18(r1) +/* 800AA908 000A7848 7C 7C 1B 78 */ mr r28, r3 +/* 800AA90C 000A784C 80 C3 00 00 */ lwz r6, 0(r3) +/* 800AA910 000A7850 38 6D 80 38 */ addi r3, r13, GXTexMode0Ids@sda21 +/* 800AA914 000A7854 7C 03 E8 AE */ lbzx r0, r3, r29 +/* 800AA918 000A7858 38 6D 80 40 */ addi r3, r13, GXTexMode1Ids@sda21 +/* 800AA91C 000A785C 54 00 C0 0E */ slwi r0, r0, 0x18 +/* 800AA920 000A7860 50 C0 02 3E */ rlwimi r0, r6, 0, 8, 0x1f +/* 800AA924 000A7864 90 1C 00 00 */ stw r0, 0(r28) +/* 800AA928 000A7868 38 CD 80 50 */ addi r6, r13, GXTexImage1Ids@sda21 +/* 800AA92C 000A786C 7C 03 E8 AE */ lbzx r0, r3, r29 +/* 800AA930 000A7870 38 6D 80 60 */ addi r3, r13, GXTexImage3Ids@sda21 +/* 800AA934 000A7874 81 1C 00 04 */ lwz r8, 4(r28) +/* 800AA938 000A7878 54 00 C0 0E */ slwi r0, r0, 0x18 +/* 800AA93C 000A787C 51 00 02 3E */ rlwimi r0, r8, 0, 8, 0x1f +/* 800AA940 000A7880 90 1C 00 04 */ stw r0, 4(r28) +/* 800AA944 000A7884 7C 07 E8 AE */ lbzx r0, r7, r29 +/* 800AA948 000A7888 81 1C 00 08 */ lwz r8, 8(r28) +/* 800AA94C 000A788C 54 00 C0 0E */ slwi r0, r0, 0x18 +/* 800AA950 000A7890 51 00 02 3E */ rlwimi r0, r8, 0, 8, 0x1f +/* 800AA954 000A7894 90 1C 00 08 */ stw r0, 8(r28) +/* 800AA958 000A7898 7C 06 E8 AE */ lbzx r0, r6, r29 +/* 800AA95C 000A789C 80 E4 00 00 */ lwz r7, 0(r4) +/* 800AA960 000A78A0 54 00 C0 0E */ slwi r0, r0, 0x18 +/* 800AA964 000A78A4 50 E0 02 3E */ rlwimi r0, r7, 0, 8, 0x1f +/* 800AA968 000A78A8 90 04 00 00 */ stw r0, 0(r4) +/* 800AA96C 000A78AC 7C 05 E8 AE */ lbzx r0, r5, r29 +/* 800AA970 000A78B0 80 C4 00 04 */ lwz r6, 4(r4) +/* 800AA974 000A78B4 54 00 C0 0E */ slwi r0, r0, 0x18 +/* 800AA978 000A78B8 50 C0 02 3E */ rlwimi r0, r6, 0, 8, 0x1f +/* 800AA97C 000A78BC 90 04 00 04 */ stw r0, 4(r4) +/* 800AA980 000A78C0 7C 03 E8 AE */ lbzx r0, r3, r29 +/* 800AA984 000A78C4 80 BC 00 0C */ lwz r5, 0xc(r28) +/* 800AA988 000A78C8 54 00 C0 0E */ slwi r0, r0, 0x18 +/* 800AA98C 000A78CC 50 A0 02 3E */ rlwimi r0, r5, 0, 8, 0x1f +/* 800AA990 000A78D0 90 1C 00 0C */ stw r0, 0xc(r28) +/* 800AA994 000A78D4 9B DF 80 00 */ stb r30, 0xCC008000@l(r31) +/* 800AA998 000A78D8 80 1C 00 00 */ lwz r0, 0(r28) +/* 800AA99C 000A78DC 90 1F 80 00 */ stw r0, -0x8000(r31) +/* 800AA9A0 000A78E0 9B DF 80 00 */ stb r30, -0x8000(r31) +/* 800AA9A4 000A78E4 80 1C 00 04 */ lwz r0, 4(r28) +/* 800AA9A8 000A78E8 90 1F 80 00 */ stw r0, -0x8000(r31) +/* 800AA9AC 000A78EC 9B DF 80 00 */ stb r30, -0x8000(r31) +/* 800AA9B0 000A78F0 80 1C 00 08 */ lwz r0, 8(r28) +/* 800AA9B4 000A78F4 90 1F 80 00 */ stw r0, -0x8000(r31) +/* 800AA9B8 000A78F8 9B DF 80 00 */ stb r30, -0x8000(r31) +/* 800AA9BC 000A78FC 80 04 00 00 */ lwz r0, 0(r4) +/* 800AA9C0 000A7900 90 1F 80 00 */ stw r0, -0x8000(r31) +/* 800AA9C4 000A7904 9B DF 80 00 */ stb r30, -0x8000(r31) +/* 800AA9C8 000A7908 80 04 00 04 */ lwz r0, 4(r4) +/* 800AA9CC 000A790C 90 1F 80 00 */ stw r0, -0x8000(r31) +/* 800AA9D0 000A7910 9B DF 80 00 */ stb r30, -0x8000(r31) +/* 800AA9D4 000A7914 80 1C 00 0C */ lwz r0, 0xc(r28) +/* 800AA9D8 000A7918 90 1F 80 00 */ stw r0, -0x8000(r31) +/* 800AA9DC 000A791C 88 1C 00 1F */ lbz r0, 0x1f(r28) +/* 800AA9E0 000A7920 54 00 07 BD */ rlwinm. r0, r0, 0, 0x1e, 0x1e +/* 800AA9E4 000A7924 40 82 00 3C */ bne lbl_800AAA20 +/* 800AA9E8 000A7928 80 8D 82 C8 */ lwz r4, gx@sda21(r13) +/* 800AA9EC 000A792C 80 7C 00 18 */ lwz r3, 0x18(r28) +/* 800AA9F0 000A7930 81 84 04 14 */ lwz r12, 0x414(r4) +/* 800AA9F4 000A7934 7D 88 03 A6 */ mtlr r12 +/* 800AA9F8 000A7938 4E 80 00 21 */ blrl +/* 800AA9FC 000A793C 38 8D 80 68 */ addi r4, r13, GXTexTlutIds@sda21 +/* 800AAA00 000A7940 80 A3 00 04 */ lwz r5, 4(r3) +/* 800AAA04 000A7944 7C 04 E8 AE */ lbzx r0, r4, r29 +/* 800AAA08 000A7948 54 00 C0 0E */ slwi r0, r0, 0x18 +/* 800AAA0C 000A794C 50 A0 02 3E */ rlwimi r0, r5, 0, 8, 0x1f +/* 800AAA10 000A7950 90 03 00 04 */ stw r0, 4(r3) +/* 800AAA14 000A7954 9B DF 80 00 */ stb r30, -0x8000(r31) +/* 800AAA18 000A7958 80 03 00 04 */ lwz r0, 4(r3) +/* 800AAA1C 000A795C 90 1F 80 00 */ stw r0, -0x8000(r31) +lbl_800AAA20: +/* 800AAA20 000A7960 80 6D 82 C8 */ lwz r3, gx@sda21(r13) +/* 800AAA24 000A7964 57 A5 10 3A */ slwi r5, r29, 2 +/* 800AAA28 000A7968 80 9C 00 08 */ lwz r4, 8(r28) +/* 800AAA2C 000A796C 38 00 00 00 */ li r0, 0 +/* 800AAA30 000A7970 7C 63 2A 14 */ add r3, r3, r5 +/* 800AAA34 000A7974 90 83 04 5C */ stw r4, 0x45c(r3) +/* 800AAA38 000A7978 80 6D 82 C8 */ lwz r3, gx@sda21(r13) +/* 800AAA3C 000A797C 80 9C 00 00 */ lwz r4, 0(r28) +/* 800AAA40 000A7980 7C 63 2A 14 */ add r3, r3, r5 +/* 800AAA44 000A7984 90 83 04 7C */ stw r4, 0x47c(r3) +/* 800AAA48 000A7988 80 8D 82 C8 */ lwz r4, gx@sda21(r13) +/* 800AAA4C 000A798C 80 64 04 F4 */ lwz r3, 0x4f4(r4) +/* 800AAA50 000A7990 60 63 00 01 */ ori r3, r3, 1 +/* 800AAA54 000A7994 90 64 04 F4 */ stw r3, 0x4f4(r4) +/* 800AAA58 000A7998 80 6D 82 C8 */ lwz r3, gx@sda21(r13) +/* 800AAA5C 000A799C B0 03 00 02 */ sth r0, 2(r3) +/* 800AAA60 000A79A0 80 01 00 2C */ lwz r0, 0x2c(r1) +/* 800AAA64 000A79A4 83 E1 00 24 */ lwz r31, 0x24(r1) +/* 800AAA68 000A79A8 83 C1 00 20 */ lwz r30, 0x20(r1) +/* 800AAA6C 000A79AC 83 A1 00 1C */ lwz r29, 0x1c(r1) +/* 800AAA70 000A79B0 83 81 00 18 */ lwz r28, 0x18(r1) +/* 800AAA74 000A79B4 38 21 00 28 */ addi r1, r1, 0x28 +/* 800AAA78 000A79B8 7C 08 03 A6 */ mtlr r0 +/* 800AAA7C 000A79BC 4E 80 00 20 */ blr + +.global GXLoadTexObj +GXLoadTexObj: +/* 800AAA80 000A79C0 7C 08 02 A6 */ mflr r0 +/* 800AAA84 000A79C4 90 01 00 04 */ stw r0, 4(r1) +/* 800AAA88 000A79C8 94 21 FF E8 */ stwu r1, -0x18(r1) +/* 800AAA8C 000A79CC 93 E1 00 14 */ stw r31, 0x14(r1) +/* 800AAA90 000A79D0 3B E4 00 00 */ addi r31, r4, 0 +/* 800AAA94 000A79D4 93 C1 00 10 */ stw r30, 0x10(r1) +/* 800AAA98 000A79D8 3B C3 00 00 */ addi r30, r3, 0 +/* 800AAA9C 000A79DC 80 AD 82 C8 */ lwz r5, gx@sda21(r13) +/* 800AAAA0 000A79E0 81 85 04 10 */ lwz r12, 0x410(r5) +/* 800AAAA4 000A79E4 7D 88 03 A6 */ mtlr r12 +/* 800AAAA8 000A79E8 4E 80 00 21 */ blrl +/* 800AAAAC 000A79EC 38 83 00 00 */ addi r4, r3, 0 +/* 800AAAB0 000A79F0 38 7E 00 00 */ addi r3, r30, 0 +/* 800AAAB4 000A79F4 38 BF 00 00 */ addi r5, r31, 0 +/* 800AAAB8 000A79F8 4B FF FE 21 */ bl GXLoadTexObjPreLoaded +/* 800AAABC 000A79FC 80 01 00 1C */ lwz r0, 0x1c(r1) +/* 800AAAC0 000A7A00 83 E1 00 14 */ lwz r31, 0x14(r1) +/* 800AAAC4 000A7A04 83 C1 00 10 */ lwz r30, 0x10(r1) +/* 800AAAC8 000A7A08 38 21 00 18 */ addi r1, r1, 0x18 +/* 800AAACC 000A7A0C 7C 08 03 A6 */ mtlr r0 +/* 800AAAD0 000A7A10 4E 80 00 20 */ blr + +.global GXInitTlutObj +GXInitTlutObj: +/* 800AAAD4 000A7A14 38 00 00 00 */ li r0, 0 +/* 800AAAD8 000A7A18 90 03 00 00 */ stw r0, 0(r3) +/* 800AAADC 000A7A1C 54 A5 50 2A */ slwi r5, r5, 0xa +/* 800AAAE0 000A7A20 54 80 D9 FE */ rlwinm r0, r4, 0x1b, 7, 0x1f +/* 800AAAE4 000A7A24 80 E3 00 00 */ lwz r7, 0(r3) +/* 800AAAE8 000A7A28 54 E4 05 A6 */ rlwinm r4, r7, 0, 0x16, 0x13 +/* 800AAAEC 000A7A2C 7C 84 2B 78 */ or r4, r4, r5 +/* 800AAAF0 000A7A30 90 83 00 00 */ stw r4, 0(r3) +/* 800AAAF4 000A7A34 80 83 00 04 */ lwz r4, 4(r3) +/* 800AAAF8 000A7A38 54 84 00 14 */ rlwinm r4, r4, 0, 0, 0xa +/* 800AAAFC 000A7A3C 7C 80 03 78 */ or r0, r4, r0 +/* 800AAB00 000A7A40 90 03 00 04 */ stw r0, 4(r3) +/* 800AAB04 000A7A44 80 03 00 04 */ lwz r0, 4(r3) +/* 800AAB08 000A7A48 54 00 02 3E */ clrlwi r0, r0, 8 +/* 800AAB0C 000A7A4C 64 00 64 00 */ oris r0, r0, 0x6400 +/* 800AAB10 000A7A50 90 03 00 04 */ stw r0, 4(r3) +/* 800AAB14 000A7A54 B0 C3 00 08 */ sth r6, 8(r3) +/* 800AAB18 000A7A58 4E 80 00 20 */ blr + +.global GXLoadTlut +GXLoadTlut: +/* 800AAB1C 000A7A5C 7C 08 02 A6 */ mflr r0 +/* 800AAB20 000A7A60 90 01 00 04 */ stw r0, 4(r1) +/* 800AAB24 000A7A64 94 21 FF E0 */ stwu r1, -0x20(r1) +/* 800AAB28 000A7A68 93 E1 00 1C */ stw r31, 0x1c(r1) +/* 800AAB2C 000A7A6C 93 C1 00 18 */ stw r30, 0x18(r1) +/* 800AAB30 000A7A70 7C 7E 1B 78 */ mr r30, r3 +/* 800AAB34 000A7A74 38 64 00 00 */ addi r3, r4, 0 +/* 800AAB38 000A7A78 80 AD 82 C8 */ lwz r5, gx@sda21(r13) +/* 800AAB3C 000A7A7C 81 85 04 14 */ lwz r12, 0x414(r5) +/* 800AAB40 000A7A80 7D 88 03 A6 */ mtlr r12 +/* 800AAB44 000A7A84 4E 80 00 21 */ blrl +/* 800AAB48 000A7A88 7C 7F 1B 78 */ mr r31, r3 +/* 800AAB4C 000A7A8C 48 00 0E 99 */ bl __GXFlushTextureState +/* 800AAB50 000A7A90 38 80 00 61 */ li r4, 0x61 +/* 800AAB54 000A7A94 3C 60 CC 01 */ lis r3, 0xCC008000@ha +/* 800AAB58 000A7A98 98 83 80 00 */ stb r4, 0xCC008000@l(r3) +/* 800AAB5C 000A7A9C 80 1E 00 04 */ lwz r0, 4(r30) +/* 800AAB60 000A7AA0 90 03 80 00 */ stw r0, -0x8000(r3) +/* 800AAB64 000A7AA4 98 83 80 00 */ stb r4, -0x8000(r3) +/* 800AAB68 000A7AA8 80 1F 00 00 */ lwz r0, 0(r31) +/* 800AAB6C 000A7AAC 90 03 80 00 */ stw r0, -0x8000(r3) +/* 800AAB70 000A7AB0 48 00 0E 75 */ bl __GXFlushTextureState +/* 800AAB74 000A7AB4 80 1F 00 00 */ lwz r0, 0(r31) +/* 800AAB78 000A7AB8 80 7E 00 00 */ lwz r3, 0(r30) +/* 800AAB7C 000A7ABC 54 00 05 BE */ clrlwi r0, r0, 0x16 +/* 800AAB80 000A7AC0 50 60 00 2A */ rlwimi r0, r3, 0, 0, 0x15 +/* 800AAB84 000A7AC4 90 1E 00 00 */ stw r0, 0(r30) +/* 800AAB88 000A7AC8 80 7E 00 00 */ lwz r3, 0(r30) +/* 800AAB8C 000A7ACC 80 1E 00 04 */ lwz r0, 4(r30) +/* 800AAB90 000A7AD0 90 7F 00 04 */ stw r3, 4(r31) +/* 800AAB94 000A7AD4 90 1F 00 08 */ stw r0, 8(r31) +/* 800AAB98 000A7AD8 80 1E 00 08 */ lwz r0, 8(r30) +/* 800AAB9C 000A7ADC 90 1F 00 0C */ stw r0, 0xc(r31) +/* 800AABA0 000A7AE0 80 01 00 24 */ lwz r0, 0x24(r1) +/* 800AABA4 000A7AE4 83 E1 00 1C */ lwz r31, 0x1c(r1) +/* 800AABA8 000A7AE8 83 C1 00 18 */ lwz r30, 0x18(r1) +/* 800AABAC 000A7AEC 38 21 00 20 */ addi r1, r1, 0x20 +/* 800AABB0 000A7AF0 7C 08 03 A6 */ mtlr r0 +/* 800AABB4 000A7AF4 4E 80 00 20 */ blr + +.global GXInitTexCacheRegion +GXInitTexCacheRegion: +/* 800AABB8 000A7AF8 2C 06 00 01 */ cmpwi r6, 1 +/* 800AABBC 000A7AFC 41 82 00 28 */ beq lbl_800AABE4 +/* 800AABC0 000A7B00 40 80 00 10 */ bge lbl_800AABD0 +/* 800AABC4 000A7B04 2C 06 00 00 */ cmpwi r6, 0 +/* 800AABC8 000A7B08 40 80 00 14 */ bge lbl_800AABDC +/* 800AABCC 000A7B0C 48 00 00 24 */ b lbl_800AABF0 +lbl_800AABD0: +/* 800AABD0 000A7B10 2C 06 00 03 */ cmpwi r6, 3 +/* 800AABD4 000A7B14 40 80 00 1C */ bge lbl_800AABF0 +/* 800AABD8 000A7B18 48 00 00 14 */ b lbl_800AABEC +lbl_800AABDC: +/* 800AABDC 000A7B1C 39 40 00 03 */ li r10, 3 +/* 800AABE0 000A7B20 48 00 00 10 */ b lbl_800AABF0 +lbl_800AABE4: +/* 800AABE4 000A7B24 39 40 00 04 */ li r10, 4 +/* 800AABE8 000A7B28 48 00 00 08 */ b lbl_800AABF0 +lbl_800AABEC: +/* 800AABEC 000A7B2C 39 40 00 05 */ li r10, 5 +lbl_800AABF0: +/* 800AABF0 000A7B30 38 00 00 00 */ li r0, 0 +/* 800AABF4 000A7B34 90 03 00 00 */ stw r0, 0(r3) +/* 800AABF8 000A7B38 54 A6 D9 7E */ srwi r6, r5, 5 +/* 800AABFC 000A7B3C 55 45 78 20 */ slwi r5, r10, 0xf +/* 800AAC00 000A7B40 81 23 00 00 */ lwz r9, 0(r3) +/* 800AAC04 000A7B44 55 40 90 1A */ slwi r0, r10, 0x12 +/* 800AAC08 000A7B48 2C 08 00 02 */ cmpwi r8, 2 +/* 800AAC0C 000A7B4C 55 29 00 20 */ rlwinm r9, r9, 0, 0, 0x10 +/* 800AAC10 000A7B50 7D 26 33 78 */ or r6, r9, r6 +/* 800AAC14 000A7B54 90 C3 00 00 */ stw r6, 0(r3) +/* 800AAC18 000A7B58 80 C3 00 00 */ lwz r6, 0(r3) +/* 800AAC1C 000A7B5C 54 C6 04 5A */ rlwinm r6, r6, 0, 0x11, 0xd +/* 800AAC20 000A7B60 7C C5 2B 78 */ or r5, r6, r5 +/* 800AAC24 000A7B64 90 A3 00 00 */ stw r5, 0(r3) +/* 800AAC28 000A7B68 80 A3 00 00 */ lwz r5, 0(r3) +/* 800AAC2C 000A7B6C 54 A5 03 94 */ rlwinm r5, r5, 0, 0xe, 0xa +/* 800AAC30 000A7B70 7C A0 03 78 */ or r0, r5, r0 +/* 800AAC34 000A7B74 90 03 00 00 */ stw r0, 0(r3) +/* 800AAC38 000A7B78 80 03 00 00 */ lwz r0, 0(r3) +/* 800AAC3C 000A7B7C 54 00 02 D2 */ rlwinm r0, r0, 0, 0xb, 9 +/* 800AAC40 000A7B80 90 03 00 00 */ stw r0, 0(r3) +/* 800AAC44 000A7B84 41 82 00 34 */ beq lbl_800AAC78 +/* 800AAC48 000A7B88 40 80 00 14 */ bge lbl_800AAC5C +/* 800AAC4C 000A7B8C 2C 08 00 00 */ cmpwi r8, 0 +/* 800AAC50 000A7B90 41 82 00 18 */ beq lbl_800AAC68 +/* 800AAC54 000A7B94 40 80 00 1C */ bge lbl_800AAC70 +/* 800AAC58 000A7B98 48 00 00 2C */ b lbl_800AAC84 +lbl_800AAC5C: +/* 800AAC5C 000A7B9C 2C 08 00 04 */ cmpwi r8, 4 +/* 800AAC60 000A7BA0 40 80 00 24 */ bge lbl_800AAC84 +/* 800AAC64 000A7BA4 48 00 00 1C */ b lbl_800AAC80 +lbl_800AAC68: +/* 800AAC68 000A7BA8 39 40 00 03 */ li r10, 3 +/* 800AAC6C 000A7BAC 48 00 00 18 */ b lbl_800AAC84 +lbl_800AAC70: +/* 800AAC70 000A7BB0 39 40 00 04 */ li r10, 4 +/* 800AAC74 000A7BB4 48 00 00 10 */ b lbl_800AAC84 +lbl_800AAC78: +/* 800AAC78 000A7BB8 39 40 00 05 */ li r10, 5 +/* 800AAC7C 000A7BBC 48 00 00 08 */ b lbl_800AAC84 +lbl_800AAC80: +/* 800AAC80 000A7BC0 39 40 00 00 */ li r10, 0 +lbl_800AAC84: +/* 800AAC84 000A7BC4 38 00 00 00 */ li r0, 0 +/* 800AAC88 000A7BC8 90 03 00 04 */ stw r0, 4(r3) +/* 800AAC8C 000A7BCC 54 E7 D9 7E */ srwi r7, r7, 5 +/* 800AAC90 000A7BD0 55 46 78 20 */ slwi r6, r10, 0xf +/* 800AAC94 000A7BD4 81 03 00 04 */ lwz r8, 4(r3) +/* 800AAC98 000A7BD8 55 45 90 1A */ slwi r5, r10, 0x12 +/* 800AAC9C 000A7BDC 38 00 00 01 */ li r0, 1 +/* 800AACA0 000A7BE0 55 08 00 20 */ rlwinm r8, r8, 0, 0, 0x10 +/* 800AACA4 000A7BE4 7D 07 3B 78 */ or r7, r8, r7 +/* 800AACA8 000A7BE8 90 E3 00 04 */ stw r7, 4(r3) +/* 800AACAC 000A7BEC 80 E3 00 04 */ lwz r7, 4(r3) +/* 800AACB0 000A7BF0 54 E7 04 5A */ rlwinm r7, r7, 0, 0x11, 0xd +/* 800AACB4 000A7BF4 7C E6 33 78 */ or r6, r7, r6 +/* 800AACB8 000A7BF8 90 C3 00 04 */ stw r6, 4(r3) +/* 800AACBC 000A7BFC 80 C3 00 04 */ lwz r6, 4(r3) +/* 800AACC0 000A7C00 54 C6 03 94 */ rlwinm r6, r6, 0, 0xe, 0xa +/* 800AACC4 000A7C04 7C C5 2B 78 */ or r5, r6, r5 +/* 800AACC8 000A7C08 90 A3 00 04 */ stw r5, 4(r3) +/* 800AACCC 000A7C0C 98 83 00 0C */ stb r4, 0xc(r3) +/* 800AACD0 000A7C10 98 03 00 0D */ stb r0, 0xd(r3) +/* 800AACD4 000A7C14 4E 80 00 20 */ blr + +.global GXInitTlutRegion +GXInitTlutRegion: +/* 800AACD8 000A7C18 38 00 00 00 */ li r0, 0 +/* 800AACDC 000A7C1C 90 03 00 00 */ stw r0, 0(r3) +/* 800AACE0 000A7C20 3C 04 FF F8 */ addis r0, r4, 0xfff8 +/* 800AACE4 000A7C24 54 04 BA 7E */ srwi r4, r0, 9 +/* 800AACE8 000A7C28 80 C3 00 00 */ lwz r6, 0(r3) +/* 800AACEC 000A7C2C 54 A0 50 2A */ slwi r0, r5, 0xa +/* 800AACF0 000A7C30 54 C5 00 2A */ rlwinm r5, r6, 0, 0, 0x15 +/* 800AACF4 000A7C34 7C A4 23 78 */ or r4, r5, r4 +/* 800AACF8 000A7C38 90 83 00 00 */ stw r4, 0(r3) +/* 800AACFC 000A7C3C 80 83 00 00 */ lwz r4, 0(r3) +/* 800AAD00 000A7C40 54 84 05 94 */ rlwinm r4, r4, 0, 0x16, 0xa +/* 800AAD04 000A7C44 7C 80 03 78 */ or r0, r4, r0 +/* 800AAD08 000A7C48 90 03 00 00 */ stw r0, 0(r3) +/* 800AAD0C 000A7C4C 80 03 00 00 */ lwz r0, 0(r3) +/* 800AAD10 000A7C50 54 00 02 3E */ clrlwi r0, r0, 8 +/* 800AAD14 000A7C54 64 00 65 00 */ oris r0, r0, 0x6500 +/* 800AAD18 000A7C58 90 03 00 00 */ stw r0, 0(r3) +/* 800AAD1C 000A7C5C 4E 80 00 20 */ blr + +.global GXInvalidateTexAll +GXInvalidateTexAll: +/* 800AAD20 000A7C60 7C 08 02 A6 */ mflr r0 +/* 800AAD24 000A7C64 90 01 00 04 */ stw r0, 4(r1) +/* 800AAD28 000A7C68 94 21 FF F8 */ stwu r1, -8(r1) +/* 800AAD2C 000A7C6C 48 00 0C B9 */ bl __GXFlushTextureState +/* 800AAD30 000A7C70 38 C0 00 61 */ li r6, 0x61 +/* 800AAD34 000A7C74 3C 60 66 00 */ lis r3, 0x66001000@ha +/* 800AAD38 000A7C78 3C A0 CC 01 */ lis r5, 0xCC008000@ha +/* 800AAD3C 000A7C7C 98 C5 80 00 */ stb r6, 0xCC008000@l(r5) +/* 800AAD40 000A7C80 38 83 10 00 */ addi r4, r3, 0x66001000@l +/* 800AAD44 000A7C84 38 03 11 00 */ addi r0, r3, 0x1100 +/* 800AAD48 000A7C88 90 85 80 00 */ stw r4, -0x8000(r5) +/* 800AAD4C 000A7C8C 98 C5 80 00 */ stb r6, -0x8000(r5) +/* 800AAD50 000A7C90 90 05 80 00 */ stw r0, -0x8000(r5) +/* 800AAD54 000A7C94 48 00 0C 91 */ bl __GXFlushTextureState +/* 800AAD58 000A7C98 80 01 00 0C */ lwz r0, 0xc(r1) +/* 800AAD5C 000A7C9C 38 21 00 08 */ addi r1, r1, 8 +/* 800AAD60 000A7CA0 7C 08 03 A6 */ mtlr r0 +/* 800AAD64 000A7CA4 4E 80 00 20 */ blr + +.global GXSetTexRegionCallback +GXSetTexRegionCallback: +/* 800AAD68 000A7CA8 80 8D 82 C8 */ lwz r4, gx@sda21(r13) +/* 800AAD6C 000A7CAC 84 04 04 10 */ lwzu r0, 0x410(r4) +/* 800AAD70 000A7CB0 90 64 00 00 */ stw r3, 0(r4) +/* 800AAD74 000A7CB4 7C 03 03 78 */ mr r3, r0 +/* 800AAD78 000A7CB8 4E 80 00 20 */ blr + +.global GXSetTlutRegionCallback +GXSetTlutRegionCallback: +/* 800AAD7C 000A7CBC 80 8D 82 C8 */ lwz r4, gx@sda21(r13) +/* 800AAD80 000A7CC0 84 04 04 14 */ lwzu r0, 0x414(r4) +/* 800AAD84 000A7CC4 90 64 00 00 */ stw r3, 0(r4) +/* 800AAD88 000A7CC8 7C 03 03 78 */ mr r3, r0 +/* 800AAD8C 000A7CCC 4E 80 00 20 */ blr + +.global GXSetTexCoordScaleManually +GXSetTexCoordScaleManually: +/* 800AAD90 000A7CD0 80 ED 82 C8 */ lwz r7, gx@sda21(r13) +/* 800AAD94 000A7CD4 38 00 00 01 */ li r0, 1 +/* 800AAD98 000A7CD8 54 84 06 3F */ clrlwi. r4, r4, 0x18 +/* 800AAD9C 000A7CDC 39 07 04 DC */ addi r8, r7, 0x4dc +/* 800AADA0 000A7CE0 80 E7 04 DC */ lwz r7, 0x4dc(r7) +/* 800AADA4 000A7CE4 7C 00 18 30 */ slw r0, r0, r3 +/* 800AADA8 000A7CE8 7C E7 00 78 */ andc r7, r7, r0 +/* 800AADAC 000A7CEC 7C 80 18 30 */ slw r0, r4, r3 +/* 800AADB0 000A7CF0 7C E0 03 78 */ or r0, r7, r0 +/* 800AADB4 000A7CF4 90 08 00 00 */ stw r0, 0(r8) +/* 800AADB8 000A7CF8 4D 82 00 20 */ beqlr +/* 800AADBC 000A7CFC 80 8D 82 C8 */ lwz r4, gx@sda21(r13) +/* 800AADC0 000A7D00 54 68 10 3A */ slwi r8, r3, 2 +/* 800AADC4 000A7D04 38 05 FF FF */ addi r0, r5, -1 +/* 800AADC8 000A7D08 7C A4 42 14 */ add r5, r4, r8 +/* 800AADCC 000A7D0C 80 85 00 B8 */ lwz r4, 0xb8(r5) +/* 800AADD0 000A7D10 38 66 FF FF */ addi r3, r6, -1 +/* 800AADD4 000A7D14 38 E0 00 61 */ li r7, 0x61 +/* 800AADD8 000A7D18 54 84 00 1E */ rlwinm r4, r4, 0, 0, 0xf +/* 800AADDC 000A7D1C 50 04 04 3E */ rlwimi r4, r0, 0, 0x10, 0x1f +/* 800AADE0 000A7D20 90 85 00 B8 */ stw r4, 0xb8(r5) +/* 800AADE4 000A7D24 3C C0 CC 01 */ lis r6, 0xCC008000@ha +/* 800AADE8 000A7D28 38 00 00 00 */ li r0, 0 +/* 800AADEC 000A7D2C 80 8D 82 C8 */ lwz r4, gx@sda21(r13) +/* 800AADF0 000A7D30 7C A4 42 14 */ add r5, r4, r8 +/* 800AADF4 000A7D34 80 85 00 D8 */ lwz r4, 0xd8(r5) +/* 800AADF8 000A7D38 54 84 00 1E */ rlwinm r4, r4, 0, 0, 0xf +/* 800AADFC 000A7D3C 50 64 04 3E */ rlwimi r4, r3, 0, 0x10, 0x1f +/* 800AAE00 000A7D40 90 85 00 D8 */ stw r4, 0xd8(r5) +/* 800AAE04 000A7D44 80 AD 82 C8 */ lwz r5, gx@sda21(r13) +/* 800AAE08 000A7D48 98 E6 80 00 */ stb r7, 0xCC008000@l(r6) +/* 800AAE0C 000A7D4C 7C 85 42 14 */ add r4, r5, r8 +/* 800AAE10 000A7D50 80 64 00 B8 */ lwz r3, 0xb8(r4) +/* 800AAE14 000A7D54 90 66 80 00 */ stw r3, -0x8000(r6) +/* 800AAE18 000A7D58 98 E6 80 00 */ stb r7, -0x8000(r6) +/* 800AAE1C 000A7D5C 80 64 00 D8 */ lwz r3, 0xd8(r4) +/* 800AAE20 000A7D60 90 66 80 00 */ stw r3, -0x8000(r6) +/* 800AAE24 000A7D64 B0 05 00 02 */ sth r0, 2(r5) +/* 800AAE28 000A7D68 4E 80 00 20 */ blr + +.global GXSetTexCoordCylWrap +GXSetTexCoordCylWrap: +/* 800AAE2C 000A7D6C 80 0D 82 C8 */ lwz r0, gx@sda21(r13) +/* 800AAE30 000A7D70 54 68 10 3A */ slwi r8, r3, 2 +/* 800AAE34 000A7D74 54 84 89 DC */ rlwinm r4, r4, 0x11, 7, 0xe +/* 800AAE38 000A7D78 7C E0 42 14 */ add r7, r0, r8 +/* 800AAE3C 000A7D7C 80 C7 00 B8 */ lwz r6, 0xb8(r7) +/* 800AAE40 000A7D80 38 00 00 01 */ li r0, 1 +/* 800AAE44 000A7D84 7C 00 18 30 */ slw r0, r0, r3 +/* 800AAE48 000A7D88 54 C6 03 DA */ rlwinm r6, r6, 0, 0xf, 0xd +/* 800AAE4C 000A7D8C 7C C4 23 78 */ or r4, r6, r4 +/* 800AAE50 000A7D90 90 87 00 B8 */ stw r4, 0xb8(r7) +/* 800AAE54 000A7D94 54 A4 89 DC */ rlwinm r4, r5, 0x11, 7, 0xe +/* 800AAE58 000A7D98 80 6D 82 C8 */ lwz r3, gx@sda21(r13) +/* 800AAE5C 000A7D9C 7C A3 42 14 */ add r5, r3, r8 +/* 800AAE60 000A7DA0 80 65 00 D8 */ lwz r3, 0xd8(r5) +/* 800AAE64 000A7DA4 54 63 03 DA */ rlwinm r3, r3, 0, 0xf, 0xd +/* 800AAE68 000A7DA8 7C 63 23 78 */ or r3, r3, r4 +/* 800AAE6C 000A7DAC 90 65 00 D8 */ stw r3, 0xd8(r5) +/* 800AAE70 000A7DB0 80 ED 82 C8 */ lwz r7, gx@sda21(r13) +/* 800AAE74 000A7DB4 80 67 04 DC */ lwz r3, 0x4dc(r7) +/* 800AAE78 000A7DB8 7C 60 00 39 */ and. r0, r3, r0 +/* 800AAE7C 000A7DBC 4D 82 00 20 */ beqlr +/* 800AAE80 000A7DC0 38 C0 00 61 */ li r6, 0x61 +/* 800AAE84 000A7DC4 3C A0 CC 01 */ lis r5, 0xCC008000@ha +/* 800AAE88 000A7DC8 98 C5 80 00 */ stb r6, 0xCC008000@l(r5) +/* 800AAE8C 000A7DCC 7C 87 42 14 */ add r4, r7, r8 +/* 800AAE90 000A7DD0 38 00 00 00 */ li r0, 0 +/* 800AAE94 000A7DD4 80 64 00 B8 */ lwz r3, 0xb8(r4) +/* 800AAE98 000A7DD8 90 65 80 00 */ stw r3, -0x8000(r5) +/* 800AAE9C 000A7DDC 98 C5 80 00 */ stb r6, -0x8000(r5) +/* 800AAEA0 000A7DE0 80 64 00 D8 */ lwz r3, 0xd8(r4) +/* 800AAEA4 000A7DE4 90 65 80 00 */ stw r3, -0x8000(r5) +/* 800AAEA8 000A7DE8 B0 07 00 02 */ sth r0, 2(r7) +/* 800AAEAC 000A7DEC 4E 80 00 20 */ blr + +.global __SetSURegs +__SetSURegs: +/* 800AAEB0 000A7DF0 80 AD 82 C8 */ lwz r5, gx@sda21(r13) +/* 800AAEB4 000A7DF4 54 80 10 3A */ slwi r0, r4, 2 +/* 800AAEB8 000A7DF8 54 69 10 3A */ slwi r9, r3, 2 +/* 800AAEBC 000A7DFC 7C 85 02 14 */ add r4, r5, r0 +/* 800AAEC0 000A7E00 7C 65 4A 14 */ add r3, r5, r9 +/* 800AAEC4 000A7E04 80 A3 04 5C */ lwz r5, 0x45c(r3) +/* 800AAEC8 000A7E08 38 E0 00 61 */ li r7, 0x61 +/* 800AAECC 000A7E0C 80 64 00 B8 */ lwz r3, 0xb8(r4) +/* 800AAED0 000A7E10 3C C0 CC 01 */ lis r6, 0xCC008000@ha +/* 800AAED4 000A7E14 54 63 00 1E */ rlwinm r3, r3, 0, 0, 0xf +/* 800AAED8 000A7E18 50 A3 05 BE */ rlwimi r3, r5, 0, 0x16, 0x1f +/* 800AAEDC 000A7E1C 90 64 00 B8 */ stw r3, 0xb8(r4) +/* 800AAEE0 000A7E20 38 60 00 00 */ li r3, 0 +/* 800AAEE4 000A7E24 80 8D 82 C8 */ lwz r4, gx@sda21(r13) +/* 800AAEE8 000A7E28 7D 04 02 14 */ add r8, r4, r0 +/* 800AAEEC 000A7E2C 80 88 00 D8 */ lwz r4, 0xd8(r8) +/* 800AAEF0 000A7E30 54 84 00 1E */ rlwinm r4, r4, 0, 0, 0xf +/* 800AAEF4 000A7E34 50 A4 B5 BE */ rlwimi r4, r5, 0x16, 0x16, 0x1f +/* 800AAEF8 000A7E38 90 88 00 D8 */ stw r4, 0xd8(r8) +/* 800AAEFC 000A7E3C 80 AD 82 C8 */ lwz r5, gx@sda21(r13) +/* 800AAF00 000A7E40 7C 85 4A 14 */ add r4, r5, r9 +/* 800AAF04 000A7E44 81 24 04 7C */ lwz r9, 0x47c(r4) +/* 800AAF08 000A7E48 7D 45 02 14 */ add r10, r5, r0 +/* 800AAF0C 000A7E4C 80 AA 00 B8 */ lwz r5, 0xb8(r10) +/* 800AAF10 000A7E50 55 24 F7 BE */ rlwinm r4, r9, 0x1e, 0x1e, 0x1f +/* 800AAF14 000A7E54 21 04 00 01 */ subfic r8, r4, 1 +/* 800AAF18 000A7E58 55 24 07 BE */ clrlwi r4, r9, 0x1e +/* 800AAF1C 000A7E5C 20 84 00 01 */ subfic r4, r4, 1 +/* 800AAF20 000A7E60 7C 84 00 34 */ cntlzw r4, r4 +/* 800AAF24 000A7E64 54 A5 04 1C */ rlwinm r5, r5, 0, 0x10, 0xe +/* 800AAF28 000A7E68 54 84 5A 1E */ rlwinm r4, r4, 0xb, 8, 0xf +/* 800AAF2C 000A7E6C 7C A4 23 78 */ or r4, r5, r4 +/* 800AAF30 000A7E70 90 8A 00 B8 */ stw r4, 0xb8(r10) +/* 800AAF34 000A7E74 7D 04 00 34 */ cntlzw r4, r8 +/* 800AAF38 000A7E78 54 84 5A 1E */ rlwinm r4, r4, 0xb, 8, 0xf +/* 800AAF3C 000A7E7C 80 AD 82 C8 */ lwz r5, gx@sda21(r13) +/* 800AAF40 000A7E80 7D 05 02 14 */ add r8, r5, r0 +/* 800AAF44 000A7E84 80 A8 00 D8 */ lwz r5, 0xd8(r8) +/* 800AAF48 000A7E88 54 A5 04 1C */ rlwinm r5, r5, 0, 0x10, 0xe +/* 800AAF4C 000A7E8C 7C A4 23 78 */ or r4, r5, r4 +/* 800AAF50 000A7E90 90 88 00 D8 */ stw r4, 0xd8(r8) +/* 800AAF54 000A7E94 80 AD 82 C8 */ lwz r5, gx@sda21(r13) +/* 800AAF58 000A7E98 98 E6 80 00 */ stb r7, 0xCC008000@l(r6) +/* 800AAF5C 000A7E9C 7C 85 02 14 */ add r4, r5, r0 +/* 800AAF60 000A7EA0 80 04 00 B8 */ lwz r0, 0xb8(r4) +/* 800AAF64 000A7EA4 90 06 80 00 */ stw r0, -0x8000(r6) +/* 800AAF68 000A7EA8 98 E6 80 00 */ stb r7, -0x8000(r6) +/* 800AAF6C 000A7EAC 80 04 00 D8 */ lwz r0, 0xd8(r4) +/* 800AAF70 000A7EB0 90 06 80 00 */ stw r0, -0x8000(r6) +/* 800AAF74 000A7EB4 B0 65 00 02 */ sth r3, 2(r5) +/* 800AAF78 000A7EB8 4E 80 00 20 */ blr + +.global __GXSetSUTexRegs +__GXSetSUTexRegs: +/* 800AAF7C 000A7EBC 7C 08 02 A6 */ mflr r0 +/* 800AAF80 000A7EC0 90 01 00 04 */ stw r0, 4(r1) +/* 800AAF84 000A7EC4 94 21 FF D8 */ stwu r1, -0x28(r1) +/* 800AAF88 000A7EC8 BF 61 00 14 */ stmw r27, 0x14(r1) +/* 800AAF8C 000A7ECC 80 6D 82 C8 */ lwz r3, gx@sda21(r13) +/* 800AAF90 000A7ED0 80 03 04 DC */ lwz r0, 0x4dc(r3) +/* 800AAF94 000A7ED4 28 00 00 FF */ cmplwi r0, 0xff +/* 800AAF98 000A7ED8 41 82 01 4C */ beq lbl_800AB0E4 +/* 800AAF9C 000A7EDC 80 03 02 04 */ lwz r0, 0x204(r3) +/* 800AAFA0 000A7EE0 3B E0 00 00 */ li r31, 0 +/* 800AAFA4 000A7EE4 54 03 B7 3E */ rlwinm r3, r0, 0x16, 0x1c, 0x1f +/* 800AAFA8 000A7EE8 3B C3 00 01 */ addi r30, r3, 1 +/* 800AAFAC 000A7EEC 54 1B 87 7E */ rlwinm r27, r0, 0x10, 0x1d, 0x1f +/* 800AAFB0 000A7EF0 48 00 00 A0 */ b lbl_800AB050 +lbl_800AAFB4: +/* 800AAFB4 000A7EF4 2C 1F 00 02 */ cmpwi r31, 2 +/* 800AAFB8 000A7EF8 41 82 00 4C */ beq lbl_800AB004 +/* 800AAFBC 000A7EFC 40 80 00 14 */ bge lbl_800AAFD0 +/* 800AAFC0 000A7F00 2C 1F 00 00 */ cmpwi r31, 0 +/* 800AAFC4 000A7F04 41 82 00 18 */ beq lbl_800AAFDC +/* 800AAFC8 000A7F08 40 80 00 28 */ bge lbl_800AAFF0 +/* 800AAFCC 000A7F0C 48 00 00 5C */ b lbl_800AB028 +lbl_800AAFD0: +/* 800AAFD0 000A7F10 2C 1F 00 04 */ cmpwi r31, 4 +/* 800AAFD4 000A7F14 40 80 00 54 */ bge lbl_800AB028 +/* 800AAFD8 000A7F18 48 00 00 40 */ b lbl_800AB018 +lbl_800AAFDC: +/* 800AAFDC 000A7F1C 80 6D 82 C8 */ lwz r3, gx@sda21(r13) +/* 800AAFE0 000A7F20 80 03 01 20 */ lwz r0, 0x120(r3) +/* 800AAFE4 000A7F24 54 1D 07 7E */ clrlwi r29, r0, 0x1d +/* 800AAFE8 000A7F28 54 1C EF 7E */ rlwinm r28, r0, 0x1d, 0x1d, 0x1f +/* 800AAFEC 000A7F2C 48 00 00 3C */ b lbl_800AB028 +lbl_800AAFF0: +/* 800AAFF0 000A7F30 80 6D 82 C8 */ lwz r3, gx@sda21(r13) +/* 800AAFF4 000A7F34 80 03 01 20 */ lwz r0, 0x120(r3) +/* 800AAFF8 000A7F38 54 1D D7 7E */ rlwinm r29, r0, 0x1a, 0x1d, 0x1f +/* 800AAFFC 000A7F3C 54 1C BF 7E */ rlwinm r28, r0, 0x17, 0x1d, 0x1f +/* 800AB000 000A7F40 48 00 00 28 */ b lbl_800AB028 +lbl_800AB004: +/* 800AB004 000A7F44 80 6D 82 C8 */ lwz r3, gx@sda21(r13) +/* 800AB008 000A7F48 80 03 01 20 */ lwz r0, 0x120(r3) +/* 800AB00C 000A7F4C 54 1D A7 7E */ rlwinm r29, r0, 0x14, 0x1d, 0x1f +/* 800AB010 000A7F50 54 1C 8F 7E */ rlwinm r28, r0, 0x11, 0x1d, 0x1f +/* 800AB014 000A7F54 48 00 00 14 */ b lbl_800AB028 +lbl_800AB018: +/* 800AB018 000A7F58 80 6D 82 C8 */ lwz r3, gx@sda21(r13) +/* 800AB01C 000A7F5C 80 03 01 20 */ lwz r0, 0x120(r3) +/* 800AB020 000A7F60 54 1D 77 7E */ rlwinm r29, r0, 0xe, 0x1d, 0x1f +/* 800AB024 000A7F64 54 1C 5F 7E */ rlwinm r28, r0, 0xb, 0x1d, 0x1f +lbl_800AB028: +/* 800AB028 000A7F68 80 6D 82 C8 */ lwz r3, gx@sda21(r13) +/* 800AB02C 000A7F6C 38 00 00 01 */ li r0, 1 +/* 800AB030 000A7F70 7C 00 E0 30 */ slw r0, r0, r28 +/* 800AB034 000A7F74 80 63 04 DC */ lwz r3, 0x4dc(r3) +/* 800AB038 000A7F78 7C 60 00 39 */ and. r0, r3, r0 +/* 800AB03C 000A7F7C 40 82 00 10 */ bne lbl_800AB04C +/* 800AB040 000A7F80 38 7D 00 00 */ addi r3, r29, 0 +/* 800AB044 000A7F84 38 9C 00 00 */ addi r4, r28, 0 +/* 800AB048 000A7F88 4B FF FE 69 */ bl __SetSURegs +lbl_800AB04C: +/* 800AB04C 000A7F8C 3B FF 00 01 */ addi r31, r31, 1 +lbl_800AB050: +/* 800AB050 000A7F90 7C 1F D8 40 */ cmplw r31, r27 +/* 800AB054 000A7F94 41 80 FF 60 */ blt lbl_800AAFB4 +/* 800AB058 000A7F98 3B E0 00 00 */ li r31, 0 +/* 800AB05C 000A7F9C 3B 7F 00 00 */ addi r27, r31, 0 +/* 800AB060 000A7FA0 48 00 00 7C */ b lbl_800AB0DC +lbl_800AB064: +/* 800AB064 000A7FA4 80 AD 82 C8 */ lwz r5, gx@sda21(r13) +/* 800AB068 000A7FA8 38 7B 04 9C */ addi r3, r27, 0x49c +/* 800AB06C 000A7FAC 57 E4 08 3A */ rlwinm r4, r31, 1, 0, 0x1d +/* 800AB070 000A7FB0 7C 65 18 2E */ lwzx r3, r5, r3 +/* 800AB074 000A7FB4 57 E0 07 FF */ clrlwi. r0, r31, 0x1f +/* 800AB078 000A7FB8 38 84 01 00 */ addi r4, r4, 0x100 +/* 800AB07C 000A7FBC 7C 85 22 14 */ add r4, r5, r4 +/* 800AB080 000A7FC0 54 7D 06 2C */ rlwinm r29, r3, 0, 0x18, 0x16 +/* 800AB084 000A7FC4 41 82 00 10 */ beq lbl_800AB094 +/* 800AB088 000A7FC8 80 04 00 00 */ lwz r0, 0(r4) +/* 800AB08C 000A7FCC 54 1C 8F 7E */ rlwinm r28, r0, 0x11, 0x1d, 0x1f +/* 800AB090 000A7FD0 48 00 00 0C */ b lbl_800AB09C +lbl_800AB094: +/* 800AB094 000A7FD4 80 04 00 00 */ lwz r0, 0(r4) +/* 800AB098 000A7FD8 54 1C EF 7E */ rlwinm r28, r0, 0x1d, 0x1d, 0x1f +lbl_800AB09C: +/* 800AB09C 000A7FDC 28 1D 00 FF */ cmplwi r29, 0xff +/* 800AB0A0 000A7FE0 41 82 00 34 */ beq lbl_800AB0D4 +/* 800AB0A4 000A7FE4 38 80 00 01 */ li r4, 1 +/* 800AB0A8 000A7FE8 80 65 04 DC */ lwz r3, 0x4dc(r5) +/* 800AB0AC 000A7FEC 7C 80 E0 30 */ slw r0, r4, r28 +/* 800AB0B0 000A7FF0 7C 60 00 39 */ and. r0, r3, r0 +/* 800AB0B4 000A7FF4 40 82 00 20 */ bne lbl_800AB0D4 +/* 800AB0B8 000A7FF8 80 65 04 E0 */ lwz r3, 0x4e0(r5) +/* 800AB0BC 000A7FFC 7C 80 F8 30 */ slw r0, r4, r31 +/* 800AB0C0 000A8000 7C 60 00 39 */ and. r0, r3, r0 +/* 800AB0C4 000A8004 41 82 00 10 */ beq lbl_800AB0D4 +/* 800AB0C8 000A8008 38 7D 00 00 */ addi r3, r29, 0 +/* 800AB0CC 000A800C 38 9C 00 00 */ addi r4, r28, 0 +/* 800AB0D0 000A8010 4B FF FD E1 */ bl __SetSURegs +lbl_800AB0D4: +/* 800AB0D4 000A8014 3B 7B 00 04 */ addi r27, r27, 4 +/* 800AB0D8 000A8018 3B FF 00 01 */ addi r31, r31, 1 +lbl_800AB0DC: +/* 800AB0DC 000A801C 7C 1F F0 40 */ cmplw r31, r30 +/* 800AB0E0 000A8020 41 80 FF 84 */ blt lbl_800AB064 +lbl_800AB0E4: +/* 800AB0E4 000A8024 BB 61 00 14 */ lmw r27, 0x14(r1) +/* 800AB0E8 000A8028 80 01 00 2C */ lwz r0, 0x2c(r1) +/* 800AB0EC 000A802C 38 21 00 28 */ addi r1, r1, 0x28 +/* 800AB0F0 000A8030 7C 08 03 A6 */ mtlr r0 +/* 800AB0F4 000A8034 4E 80 00 20 */ blr + +.global __GXSetTmemConfig +__GXSetTmemConfig: +/* 800AB0F8 000A8038 94 21 FF E8 */ stwu r1, -0x18(r1) +/* 800AB0FC 000A803C 2C 03 00 01 */ cmpwi r3, 1 +/* 800AB100 000A8040 93 E1 00 14 */ stw r31, 0x14(r1) +/* 800AB104 000A8044 93 C1 00 10 */ stw r30, 0x10(r1) +/* 800AB108 000A8048 41 82 00 0C */ beq lbl_800AB114 +/* 800AB10C 000A804C 40 80 01 14 */ bge lbl_800AB220 +/* 800AB110 000A8050 48 00 01 10 */ b lbl_800AB220 +lbl_800AB114: +/* 800AB114 000A8054 38 00 00 61 */ li r0, 0x61 +/* 800AB118 000A8058 3C 60 CC 01 */ lis r3, 0xCC008000@ha +/* 800AB11C 000A805C 3C 80 8C 0E */ lis r4, 0x8C0D8000@ha +/* 800AB120 000A8060 98 03 80 00 */ stb r0, 0xCC008000@l(r3) +/* 800AB124 000A8064 38 84 80 00 */ addi r4, r4, 0x8C0D8000@l +/* 800AB128 000A8068 90 83 80 00 */ stw r4, -0x8000(r3) +/* 800AB12C 000A806C 3C 80 90 0E */ lis r4, 0x900DC000@ha +/* 800AB130 000A8070 3C E0 8D 0E */ lis r7, 0x8D0D8800@ha +/* 800AB134 000A8074 98 03 80 00 */ stb r0, -0x8000(r3) +/* 800AB138 000A8078 38 84 C0 00 */ addi r4, r4, 0x900DC000@l +/* 800AB13C 000A807C 3C C0 91 0E */ lis r6, 0x910DC800@ha +/* 800AB140 000A8080 90 83 80 00 */ stw r4, -0x8000(r3) +/* 800AB144 000A8084 3C A0 8E 0E */ lis r5, 0x8E0D9000@ha +/* 800AB148 000A8088 3C 80 92 0E */ lis r4, 0x920DD000@ha +/* 800AB14C 000A808C 98 03 80 00 */ stb r0, -0x8000(r3) +/* 800AB150 000A8090 38 E7 88 00 */ addi r7, r7, 0x8D0D8800@l +/* 800AB154 000A8094 3F C0 8F 0E */ lis r30, 0x8F0D9800@ha +/* 800AB158 000A8098 90 E3 80 00 */ stw r7, -0x8000(r3) +/* 800AB15C 000A809C 3D 80 93 0E */ lis r12, 0x930DD800@ha +/* 800AB160 000A80A0 3D 60 AC 0E */ lis r11, 0xAC0DA000@ha +/* 800AB164 000A80A4 98 03 80 00 */ stb r0, -0x8000(r3) +/* 800AB168 000A80A8 38 C6 C8 00 */ addi r6, r6, 0x910DC800@l +/* 800AB16C 000A80AC 3D 40 B0 0E */ lis r10, 0xB00DE000@ha +/* 800AB170 000A80B0 90 C3 80 00 */ stw r6, -0x8000(r3) +/* 800AB174 000A80B4 3D 20 AD 0E */ lis r9, 0xAD0DA800@ha +/* 800AB178 000A80B8 3D 00 B1 0E */ lis r8, 0xB10DE800@ha +/* 800AB17C 000A80BC 98 03 80 00 */ stb r0, -0x8000(r3) +/* 800AB180 000A80C0 38 A5 90 00 */ addi r5, r5, 0x8E0D9000@l +/* 800AB184 000A80C4 3C E0 AE 0E */ lis r7, 0xAE0DB000@ha +/* 800AB188 000A80C8 90 A3 80 00 */ stw r5, -0x8000(r3) +/* 800AB18C 000A80CC 3C C0 B2 0E */ lis r6, 0xB20DF000@ha +/* 800AB190 000A80D0 3C A0 AF 0E */ lis r5, 0xAF0DB800@ha +/* 800AB194 000A80D4 98 03 80 00 */ stb r0, -0x8000(r3) +/* 800AB198 000A80D8 3B E4 D0 00 */ addi r31, r4, 0x920DD000@l +/* 800AB19C 000A80DC 3C 80 B3 0E */ lis r4, 0xB30DF800@ha +/* 800AB1A0 000A80E0 93 E3 80 00 */ stw r31, -0x8000(r3) +/* 800AB1A4 000A80E4 3B DE 98 00 */ addi r30, r30, 0x8F0D9800@l +/* 800AB1A8 000A80E8 39 8C D8 00 */ addi r12, r12, 0x930DD800@l +/* 800AB1AC 000A80EC 98 03 80 00 */ stb r0, -0x8000(r3) +/* 800AB1B0 000A80F0 39 6B A0 00 */ addi r11, r11, 0xAC0DA000@l +/* 800AB1B4 000A80F4 39 4A E0 00 */ addi r10, r10, 0xB00DE000@l +/* 800AB1B8 000A80F8 93 C3 80 00 */ stw r30, -0x8000(r3) +/* 800AB1BC 000A80FC 39 29 A8 00 */ addi r9, r9, 0xAD0DA800@l +/* 800AB1C0 000A8100 39 08 E8 00 */ addi r8, r8, 0xB10DE800@l +/* 800AB1C4 000A8104 98 03 80 00 */ stb r0, -0x8000(r3) +/* 800AB1C8 000A8108 38 E7 B0 00 */ addi r7, r7, 0xAE0DB000@l +/* 800AB1CC 000A810C 38 C6 F0 00 */ addi r6, r6, 0xB20DF000@l +/* 800AB1D0 000A8110 91 83 80 00 */ stw r12, -0x8000(r3) +/* 800AB1D4 000A8114 38 A5 B8 00 */ addi r5, r5, 0xAF0DB800@l +/* 800AB1D8 000A8118 38 84 F8 00 */ addi r4, r4, 0xB30DF800@l +/* 800AB1DC 000A811C 98 03 80 00 */ stb r0, -0x8000(r3) +/* 800AB1E0 000A8120 91 63 80 00 */ stw r11, -0x8000(r3) +/* 800AB1E4 000A8124 98 03 80 00 */ stb r0, -0x8000(r3) +/* 800AB1E8 000A8128 91 43 80 00 */ stw r10, -0x8000(r3) +/* 800AB1EC 000A812C 98 03 80 00 */ stb r0, -0x8000(r3) +/* 800AB1F0 000A8130 91 23 80 00 */ stw r9, -0x8000(r3) +/* 800AB1F4 000A8134 98 03 80 00 */ stb r0, -0x8000(r3) +/* 800AB1F8 000A8138 91 03 80 00 */ stw r8, -0x8000(r3) +/* 800AB1FC 000A813C 98 03 80 00 */ stb r0, -0x8000(r3) +/* 800AB200 000A8140 90 E3 80 00 */ stw r7, -0x8000(r3) +/* 800AB204 000A8144 98 03 80 00 */ stb r0, -0x8000(r3) +/* 800AB208 000A8148 90 C3 80 00 */ stw r6, -0x8000(r3) +/* 800AB20C 000A814C 98 03 80 00 */ stb r0, -0x8000(r3) +/* 800AB210 000A8150 90 A3 80 00 */ stw r5, -0x8000(r3) +/* 800AB214 000A8154 98 03 80 00 */ stb r0, -0x8000(r3) +/* 800AB218 000A8158 90 83 80 00 */ stw r4, -0x8000(r3) +/* 800AB21C 000A815C 48 00 01 0C */ b lbl_800AB328 +lbl_800AB220: +/* 800AB220 000A8160 38 00 00 61 */ li r0, 0x61 +/* 800AB224 000A8164 3C 60 CC 01 */ lis r3, 0xCC008000@ha +/* 800AB228 000A8168 3C 80 8C 0E */ lis r4, 0x8C0D8000@ha +/* 800AB22C 000A816C 98 03 80 00 */ stb r0, 0xCC008000@l(r3) +/* 800AB230 000A8170 38 84 80 00 */ addi r4, r4, 0x8C0D8000@l +/* 800AB234 000A8174 90 83 80 00 */ stw r4, -0x8000(r3) +/* 800AB238 000A8178 3C 80 90 0E */ lis r4, 0x900DC000@ha +/* 800AB23C 000A817C 3C E0 8D 0E */ lis r7, 0x8D0D8400@ha +/* 800AB240 000A8180 98 03 80 00 */ stb r0, -0x8000(r3) +/* 800AB244 000A8184 38 84 C0 00 */ addi r4, r4, 0x900DC000@l +/* 800AB248 000A8188 3C C0 91 0E */ lis r6, 0x910DC400@ha +/* 800AB24C 000A818C 90 83 80 00 */ stw r4, -0x8000(r3) +/* 800AB250 000A8190 3C A0 8E 0E */ lis r5, 0x8E0D8800@ha +/* 800AB254 000A8194 3C 80 92 0E */ lis r4, 0x920DC800@ha +/* 800AB258 000A8198 98 03 80 00 */ stb r0, -0x8000(r3) +/* 800AB25C 000A819C 38 E7 84 00 */ addi r7, r7, 0x8D0D8400@l +/* 800AB260 000A81A0 3F E0 8F 0E */ lis r31, 0x8F0D8C00@ha +/* 800AB264 000A81A4 90 E3 80 00 */ stw r7, -0x8000(r3) +/* 800AB268 000A81A8 3D 80 93 0E */ lis r12, 0x930DCC00@ha +/* 800AB26C 000A81AC 3D 60 AC 0E */ lis r11, 0xAC0D9000@ha +/* 800AB270 000A81B0 98 03 80 00 */ stb r0, -0x8000(r3) +/* 800AB274 000A81B4 38 C6 C4 00 */ addi r6, r6, 0x910DC400@l +/* 800AB278 000A81B8 3D 40 B0 0E */ lis r10, 0xB00DD000@ha +/* 800AB27C 000A81BC 90 C3 80 00 */ stw r6, -0x8000(r3) +/* 800AB280 000A81C0 3D 20 AD 0E */ lis r9, 0xAD0D9400@ha +/* 800AB284 000A81C4 3D 00 B1 0E */ lis r8, 0xB10DD400@ha +/* 800AB288 000A81C8 98 03 80 00 */ stb r0, -0x8000(r3) +/* 800AB28C 000A81CC 38 A5 88 00 */ addi r5, r5, 0x8E0D8800@l +/* 800AB290 000A81D0 3C E0 AE 0E */ lis r7, 0xAE0D9800@ha +/* 800AB294 000A81D4 90 A3 80 00 */ stw r5, -0x8000(r3) +/* 800AB298 000A81D8 3C C0 B2 0E */ lis r6, 0xB20DD800@ha +/* 800AB29C 000A81DC 3C A0 AF 0E */ lis r5, 0xAF0D9C00@ha +/* 800AB2A0 000A81E0 98 03 80 00 */ stb r0, -0x8000(r3) +/* 800AB2A4 000A81E4 3B C4 C8 00 */ addi r30, r4, 0x920DC800@l +/* 800AB2A8 000A81E8 3C 80 B3 0E */ lis r4, 0xB30DDC00@ha +/* 800AB2AC 000A81EC 93 C3 80 00 */ stw r30, -0x8000(r3) +/* 800AB2B0 000A81F0 3B FF 8C 00 */ addi r31, r31, 0x8F0D8C00@l +/* 800AB2B4 000A81F4 39 8C CC 00 */ addi r12, r12, 0x930DCC00@l +/* 800AB2B8 000A81F8 98 03 80 00 */ stb r0, -0x8000(r3) +/* 800AB2BC 000A81FC 39 6B 90 00 */ addi r11, r11, 0xAC0D9000@l +/* 800AB2C0 000A8200 39 4A D0 00 */ addi r10, r10, 0xB00DD000@l +/* 800AB2C4 000A8204 93 E3 80 00 */ stw r31, -0x8000(r3) +/* 800AB2C8 000A8208 39 29 94 00 */ addi r9, r9, 0xAD0D9400@l +/* 800AB2CC 000A820C 39 08 D4 00 */ addi r8, r8, 0xB10DD400@l +/* 800AB2D0 000A8210 98 03 80 00 */ stb r0, -0x8000(r3) +/* 800AB2D4 000A8214 38 E7 98 00 */ addi r7, r7, 0xAE0D9800@l +/* 800AB2D8 000A8218 38 C6 D8 00 */ addi r6, r6, 0xB20DD800@l +/* 800AB2DC 000A821C 91 83 80 00 */ stw r12, -0x8000(r3) +/* 800AB2E0 000A8220 38 A5 9C 00 */ addi r5, r5, 0xAF0D9C00@l +/* 800AB2E4 000A8224 38 84 DC 00 */ addi r4, r4, 0xB30DDC00@l +/* 800AB2E8 000A8228 98 03 80 00 */ stb r0, -0x8000(r3) +/* 800AB2EC 000A822C 91 63 80 00 */ stw r11, -0x8000(r3) +/* 800AB2F0 000A8230 98 03 80 00 */ stb r0, -0x8000(r3) +/* 800AB2F4 000A8234 91 43 80 00 */ stw r10, -0x8000(r3) +/* 800AB2F8 000A8238 98 03 80 00 */ stb r0, -0x8000(r3) +/* 800AB2FC 000A823C 91 23 80 00 */ stw r9, -0x8000(r3) +/* 800AB300 000A8240 98 03 80 00 */ stb r0, -0x8000(r3) +/* 800AB304 000A8244 91 03 80 00 */ stw r8, -0x8000(r3) +/* 800AB308 000A8248 98 03 80 00 */ stb r0, -0x8000(r3) +/* 800AB30C 000A824C 90 E3 80 00 */ stw r7, -0x8000(r3) +/* 800AB310 000A8250 98 03 80 00 */ stb r0, -0x8000(r3) +/* 800AB314 000A8254 90 C3 80 00 */ stw r6, -0x8000(r3) +/* 800AB318 000A8258 98 03 80 00 */ stb r0, -0x8000(r3) +/* 800AB31C 000A825C 90 A3 80 00 */ stw r5, -0x8000(r3) +/* 800AB320 000A8260 98 03 80 00 */ stb r0, -0x8000(r3) +/* 800AB324 000A8264 90 83 80 00 */ stw r4, -0x8000(r3) +lbl_800AB328: +/* 800AB328 000A8268 83 E1 00 14 */ lwz r31, 0x14(r1) +/* 800AB32C 000A826C 83 C1 00 10 */ lwz r30, 0x10(r1) +/* 800AB330 000A8270 38 21 00 18 */ addi r1, r1, 0x18 +/* 800AB334 000A8274 4E 80 00 20 */ blr + +.section .data, "wa" # 0x803A8380 - 0x803E6000 +"@92": + .4byte lbl_800AA1FC + .4byte lbl_800AA208 + .4byte lbl_800AA208 + .4byte lbl_800AA214 + .4byte lbl_800AA214 + .4byte lbl_800AA214 + .4byte lbl_800AA214 + .4byte lbl_800AA220 + .4byte lbl_800AA1FC + .4byte lbl_800AA208 + .4byte lbl_800AA214 + .4byte lbl_800AA220 + .4byte lbl_800AA220 + .4byte lbl_800AA220 + .4byte lbl_800AA1FC + .4byte lbl_800AA220 + .4byte lbl_800AA220 + .4byte lbl_800AA208 + .4byte lbl_800AA220 + .4byte lbl_800AA214 + .4byte lbl_800AA220 + .4byte lbl_800AA220 + .4byte lbl_800AA214 + .4byte lbl_800AA220 + .4byte lbl_800AA220 + .4byte lbl_800AA220 + .4byte lbl_800AA220 + .4byte lbl_800AA220 + .4byte lbl_800AA220 + .4byte lbl_800AA220 + .4byte lbl_800AA220 + .4byte lbl_800AA220 + .4byte lbl_800AA1FC + .4byte lbl_800AA220 + .4byte lbl_800AA208 + .4byte lbl_800AA214 + .4byte lbl_800AA220 + .4byte lbl_800AA220 + .4byte lbl_800AA220 + .4byte lbl_800AA208 + .4byte lbl_800AA208 + .4byte lbl_800AA208 + .4byte lbl_800AA208 + .4byte lbl_800AA214 + .4byte lbl_800AA214 + .4byte lbl_800AA220 + .4byte lbl_800AA220 + .4byte lbl_800AA220 + .4byte lbl_800AA1FC + .4byte lbl_800AA220 + .4byte lbl_800AA220 + .4byte lbl_800AA220 + .4byte lbl_800AA220 + .4byte lbl_800AA220 + .4byte lbl_800AA220 + .4byte lbl_800AA220 + .4byte lbl_800AA220 + .4byte lbl_800AA208 + .4byte lbl_800AA208 + .4byte lbl_800AA220 + .4byte lbl_800AA214 +"@133": + .4byte lbl_800AA350 + .4byte lbl_800AA35C + .4byte lbl_800AA35C + .4byte lbl_800AA368 + .4byte lbl_800AA368 + .4byte lbl_800AA368 + .4byte lbl_800AA368 + .4byte lbl_800AA374 + .4byte lbl_800AA350 + .4byte lbl_800AA35C + .4byte lbl_800AA368 + .4byte lbl_800AA374 + .4byte lbl_800AA374 + .4byte lbl_800AA374 + .4byte lbl_800AA350 + .4byte lbl_800AA374 + .4byte lbl_800AA374 + .4byte lbl_800AA35C + .4byte lbl_800AA374 + .4byte lbl_800AA368 + .4byte lbl_800AA374 + .4byte lbl_800AA374 + .4byte lbl_800AA368 + .4byte lbl_800AA374 + .4byte lbl_800AA374 + .4byte lbl_800AA374 + .4byte lbl_800AA374 + .4byte lbl_800AA374 + .4byte lbl_800AA374 + .4byte lbl_800AA374 + .4byte lbl_800AA374 + .4byte lbl_800AA374 + .4byte lbl_800AA350 + .4byte lbl_800AA374 + .4byte lbl_800AA35C + .4byte lbl_800AA368 + .4byte lbl_800AA374 + .4byte lbl_800AA374 + .4byte lbl_800AA374 + .4byte lbl_800AA35C + .4byte lbl_800AA35C + .4byte lbl_800AA35C + .4byte lbl_800AA35C + .4byte lbl_800AA368 + .4byte lbl_800AA368 + .4byte lbl_800AA374 + .4byte lbl_800AA374 + .4byte lbl_800AA374 + .4byte lbl_800AA350 + .4byte lbl_800AA374 + .4byte lbl_800AA374 + .4byte lbl_800AA374 + .4byte lbl_800AA374 + .4byte lbl_800AA374 + .4byte lbl_800AA374 + .4byte lbl_800AA374 + .4byte lbl_800AA374 + .4byte lbl_800AA35C + .4byte lbl_800AA35C + .4byte lbl_800AA374 + .4byte lbl_800AA368 +"@168": + .4byte lbl_800AA5A0 + .4byte lbl_800AA5B4 + .4byte lbl_800AA5B4 + .4byte lbl_800AA5C8 + .4byte lbl_800AA5C8 + .4byte lbl_800AA5C8 + .4byte lbl_800AA5DC + .4byte lbl_800AA604 + .4byte lbl_800AA5A0 + .4byte lbl_800AA5B4 + .4byte lbl_800AA5C8 + .4byte lbl_800AA604 + .4byte lbl_800AA604 + .4byte lbl_800AA604 + .4byte lbl_800AA5F0 + +.section .sdata, "wa" # 0x80408AC0 - 0x804097C0 +GX2HWFiltConv: + .4byte 0x00040105 + .4byte 0x02060000 + +.section .sdata2, "a" # 0x8040B460 - 0x80414020 +.balign 8 +"@164": + .4byte 0x41800000 + .4byte 0 +"@166": + .4byte 0x43300000 + .4byte 0 +"@192": + .4byte 0xC0800000 +"@193": + .4byte 0x40800000 +"@194": + .4byte 0x407F5C29 +"@195": + .4byte 0x42000000 +"@196": + .4byte 0 +"@197": + .4byte 0x41200000 diff --git a/asm/Dolphin/gx/GXTransform.s b/asm/Dolphin/gx/GXTransform.s new file mode 100644 index 0000000..6fd845a --- /dev/null +++ b/asm/Dolphin/gx/GXTransform.s @@ -0,0 +1,608 @@ +.include "macros.inc" + +.section .text, "ax" # 0x80005600 - 0x8036FBA0 +.global GXProject +GXProject: +/* 800AD3E0 000AA320 C0 83 00 00 */ lfs f4, 0(r3) +/* 800AD3E4 000AA324 C0 03 00 04 */ lfs f0, 4(r3) +/* 800AD3E8 000AA328 C0 C3 00 10 */ lfs f6, 0x10(r3) +/* 800AD3EC 000AA32C ED 44 00 72 */ fmuls f10, f4, f1 +/* 800AD3F0 000AA330 C0 A3 00 14 */ lfs f5, 0x14(r3) +/* 800AD3F4 000AA334 ED 20 00 B2 */ fmuls f9, f0, f2 +/* 800AD3F8 000AA338 C0 83 00 20 */ lfs f4, 0x20(r3) +/* 800AD3FC 000AA33C C0 03 00 24 */ lfs f0, 0x24(r3) +/* 800AD400 000AA340 C1 63 00 08 */ lfs f11, 8(r3) +/* 800AD404 000AA344 EC E6 00 72 */ fmuls f7, f6, f1 +/* 800AD408 000AA348 EC C5 00 B2 */ fmuls f6, f5, f2 +/* 800AD40C 000AA34C C1 03 00 18 */ lfs f8, 0x18(r3) +/* 800AD410 000AA350 C0 A3 00 28 */ lfs f5, 0x28(r3) +/* 800AD414 000AA354 EC 84 00 72 */ fmuls f4, f4, f1 +/* 800AD418 000AA358 EC 40 00 B2 */ fmuls f2, f0, f2 +/* 800AD41C 000AA35C ED 6B 00 F2 */ fmuls f11, f11, f3 +/* 800AD420 000AA360 C0 22 8B B0 */ lfs f1, "@14"@sda21(r2) +/* 800AD424 000AA364 ED 2A 48 2A */ fadds f9, f10, f9 +/* 800AD428 000AA368 C0 04 00 00 */ lfs f0, 0(r4) +/* 800AD42C 000AA36C ED 08 00 F2 */ fmuls f8, f8, f3 +/* 800AD430 000AA370 EC C7 30 2A */ fadds f6, f7, f6 +/* 800AD434 000AA374 C1 43 00 0C */ lfs f10, 0xc(r3) +/* 800AD438 000AA378 ED 2B 48 2A */ fadds f9, f11, f9 +/* 800AD43C 000AA37C C0 E3 00 1C */ lfs f7, 0x1c(r3) +/* 800AD440 000AA380 EC C8 30 2A */ fadds f6, f8, f6 +/* 800AD444 000AA384 EC 65 00 F2 */ fmuls f3, f5, f3 +/* 800AD448 000AA388 C0 A3 00 2C */ lfs f5, 0x2c(r3) +/* 800AD44C 000AA38C EC 44 10 2A */ fadds f2, f4, f2 +/* 800AD450 000AA390 FC 01 00 00 */ fcmpu cr0, f1, f0 +/* 800AD454 000AA394 ED 0A 48 2A */ fadds f8, f10, f9 +/* 800AD458 000AA398 EC 03 10 2A */ fadds f0, f3, f2 +/* 800AD45C 000AA39C EC E7 30 2A */ fadds f7, f7, f6 +/* 800AD460 000AA3A0 ED 25 00 2A */ fadds f9, f5, f0 +/* 800AD464 000AA3A4 40 82 00 4C */ bne lbl_800AD4B0 +/* 800AD468 000AA3A8 FC 00 48 50 */ fneg f0, f9 +/* 800AD46C 000AA3AC C0 22 8B B4 */ lfs f1, "@15"@sda21(r2) +/* 800AD470 000AA3B0 C0 C4 00 04 */ lfs f6, 4(r4) +/* 800AD474 000AA3B4 C0 A4 00 08 */ lfs f5, 8(r4) +/* 800AD478 000AA3B8 EC 01 00 24 */ fdivs f0, f1, f0 +/* 800AD47C 000AA3BC C0 84 00 0C */ lfs f4, 0xc(r4) +/* 800AD480 000AA3C0 C0 64 00 10 */ lfs f3, 0x10(r4) +/* 800AD484 000AA3C4 C0 24 00 14 */ lfs f1, 0x14(r4) +/* 800AD488 000AA3C8 C0 44 00 18 */ lfs f2, 0x18(r4) +/* 800AD48C 000AA3CC EC 29 00 72 */ fmuls f1, f9, f1 +/* 800AD490 000AA3D0 EC C8 01 B2 */ fmuls f6, f8, f6 +/* 800AD494 000AA3D4 EC A9 01 72 */ fmuls f5, f9, f5 +/* 800AD498 000AA3D8 EC 87 01 32 */ fmuls f4, f7, f4 +/* 800AD49C 000AA3DC EC 69 00 F2 */ fmuls f3, f9, f3 +/* 800AD4A0 000AA3E0 EC C6 28 2A */ fadds f6, f6, f5 +/* 800AD4A4 000AA3E4 EC E2 08 2A */ fadds f7, f2, f1 +/* 800AD4A8 000AA3E8 EC 64 18 2A */ fadds f3, f4, f3 +/* 800AD4AC 000AA3EC 48 00 00 38 */ b lbl_800AD4E4 +lbl_800AD4B0: +/* 800AD4B0 000AA3F0 C0 44 00 04 */ lfs f2, 4(r4) +/* 800AD4B4 000AA3F4 C0 24 00 0C */ lfs f1, 0xc(r4) +/* 800AD4B8 000AA3F8 C0 04 00 14 */ lfs f0, 0x14(r4) +/* 800AD4BC 000AA3FC EC A8 00 B2 */ fmuls f5, f8, f2 +/* 800AD4C0 000AA400 C0 C4 00 08 */ lfs f6, 8(r4) +/* 800AD4C4 000AA404 EC 67 00 72 */ fmuls f3, f7, f1 +/* 800AD4C8 000AA408 C0 84 00 10 */ lfs f4, 0x10(r4) +/* 800AD4CC 000AA40C EC 29 00 32 */ fmuls f1, f9, f0 +/* 800AD4D0 000AA410 C0 44 00 18 */ lfs f2, 0x18(r4) +/* 800AD4D4 000AA414 EC C6 28 2A */ fadds f6, f6, f5 +/* 800AD4D8 000AA418 EC 64 18 2A */ fadds f3, f4, f3 +/* 800AD4DC 000AA41C C0 02 8B B4 */ lfs f0, "@15"@sda21(r2) +/* 800AD4E0 000AA420 EC E2 08 2A */ fadds f7, f2, f1 +lbl_800AD4E4: +/* 800AD4E4 000AA424 C0 85 00 08 */ lfs f4, 8(r5) +/* 800AD4E8 000AA428 FC 20 18 50 */ fneg f1, f3 +/* 800AD4EC 000AA42C C0 A2 8B B8 */ lfs f5, "@16"@sda21(r2) +/* 800AD4F0 000AA430 EC 46 01 32 */ fmuls f2, f6, f4 +/* 800AD4F4 000AA434 C0 65 00 00 */ lfs f3, 0(r5) +/* 800AD4F8 000AA438 EC 84 01 72 */ fmuls f4, f4, f5 +/* 800AD4FC 000AA43C EC 42 01 72 */ fmuls f2, f2, f5 +/* 800AD500 000AA440 EC 40 00 B2 */ fmuls f2, f0, f2 +/* 800AD504 000AA444 EC 43 10 2A */ fadds f2, f3, f2 +/* 800AD508 000AA448 EC 44 10 2A */ fadds f2, f4, f2 +/* 800AD50C 000AA44C D0 46 00 00 */ stfs f2, 0(r6) +/* 800AD510 000AA450 C0 65 00 0C */ lfs f3, 0xc(r5) +/* 800AD514 000AA454 C0 45 00 04 */ lfs f2, 4(r5) +/* 800AD518 000AA458 EC 21 00 F2 */ fmuls f1, f1, f3 +/* 800AD51C 000AA45C EC 63 01 72 */ fmuls f3, f3, f5 +/* 800AD520 000AA460 EC 21 01 72 */ fmuls f1, f1, f5 +/* 800AD524 000AA464 EC 20 00 72 */ fmuls f1, f0, f1 +/* 800AD528 000AA468 EC 22 08 2A */ fadds f1, f2, f1 +/* 800AD52C 000AA46C EC 23 08 2A */ fadds f1, f3, f1 +/* 800AD530 000AA470 D0 27 00 00 */ stfs f1, 0(r7) +/* 800AD534 000AA474 C0 45 00 14 */ lfs f2, 0x14(r5) +/* 800AD538 000AA478 C0 25 00 10 */ lfs f1, 0x10(r5) +/* 800AD53C 000AA47C EC 22 08 28 */ fsubs f1, f2, f1 +/* 800AD540 000AA480 EC 27 00 72 */ fmuls f1, f7, f1 +/* 800AD544 000AA484 EC 00 00 72 */ fmuls f0, f0, f1 +/* 800AD548 000AA488 EC 02 00 2A */ fadds f0, f2, f0 +/* 800AD54C 000AA48C D0 08 00 00 */ stfs f0, 0(r8) +/* 800AD550 000AA490 4E 80 00 20 */ blr + +.global GXSetProjection +GXSetProjection: +/* 800AD554 000AA494 80 AD 82 C8 */ lwz r5, gx@sda21(r13) +/* 800AD558 000AA498 2C 04 00 01 */ cmpwi r4, 1 +/* 800AD55C 000AA49C 90 85 04 20 */ stw r4, 0x420(r5) +/* 800AD560 000AA4A0 C0 03 00 00 */ lfs f0, 0(r3) +/* 800AD564 000AA4A4 80 8D 82 C8 */ lwz r4, gx@sda21(r13) +/* 800AD568 000AA4A8 D0 04 04 24 */ stfs f0, 0x424(r4) +/* 800AD56C 000AA4AC C0 03 00 14 */ lfs f0, 0x14(r3) +/* 800AD570 000AA4B0 80 8D 82 C8 */ lwz r4, gx@sda21(r13) +/* 800AD574 000AA4B4 D0 04 04 2C */ stfs f0, 0x42c(r4) +/* 800AD578 000AA4B8 C0 03 00 28 */ lfs f0, 0x28(r3) +/* 800AD57C 000AA4BC 80 8D 82 C8 */ lwz r4, gx@sda21(r13) +/* 800AD580 000AA4C0 D0 04 04 34 */ stfs f0, 0x434(r4) +/* 800AD584 000AA4C4 C0 03 00 2C */ lfs f0, 0x2c(r3) +/* 800AD588 000AA4C8 80 8D 82 C8 */ lwz r4, gx@sda21(r13) +/* 800AD58C 000AA4CC D0 04 04 38 */ stfs f0, 0x438(r4) +/* 800AD590 000AA4D0 40 82 00 20 */ bne lbl_800AD5B0 +/* 800AD594 000AA4D4 C0 03 00 0C */ lfs f0, 0xc(r3) +/* 800AD598 000AA4D8 80 8D 82 C8 */ lwz r4, gx@sda21(r13) +/* 800AD59C 000AA4DC D0 04 04 28 */ stfs f0, 0x428(r4) +/* 800AD5A0 000AA4E0 C0 03 00 1C */ lfs f0, 0x1c(r3) +/* 800AD5A4 000AA4E4 80 6D 82 C8 */ lwz r3, gx@sda21(r13) +/* 800AD5A8 000AA4E8 D0 03 04 30 */ stfs f0, 0x430(r3) +/* 800AD5AC 000AA4EC 48 00 00 1C */ b lbl_800AD5C8 +lbl_800AD5B0: +/* 800AD5B0 000AA4F0 C0 03 00 08 */ lfs f0, 8(r3) +/* 800AD5B4 000AA4F4 80 8D 82 C8 */ lwz r4, gx@sda21(r13) +/* 800AD5B8 000AA4F8 D0 04 04 28 */ stfs f0, 0x428(r4) +/* 800AD5BC 000AA4FC C0 03 00 18 */ lfs f0, 0x18(r3) +/* 800AD5C0 000AA500 80 6D 82 C8 */ lwz r3, gx@sda21(r13) +/* 800AD5C4 000AA504 D0 03 04 30 */ stfs f0, 0x430(r3) +lbl_800AD5C8: +/* 800AD5C8 000AA508 38 00 00 10 */ li r0, 0x10 +/* 800AD5CC 000AA50C 80 8D 82 C8 */ lwz r4, gx@sda21(r13) +/* 800AD5D0 000AA510 3C A0 CC 01 */ lis r5, 0xCC008000@ha +/* 800AD5D4 000AA514 3C 60 00 06 */ lis r3, 0x00061020@ha +/* 800AD5D8 000AA518 98 05 80 00 */ stb r0, 0xCC008000@l(r5) +/* 800AD5DC 000AA51C 38 03 10 20 */ addi r0, r3, 0x00061020@l +/* 800AD5E0 000AA520 90 05 80 00 */ stw r0, -0x8000(r5) +/* 800AD5E4 000AA524 38 00 00 01 */ li r0, 1 +/* 800AD5E8 000AA528 C0 04 04 24 */ lfs f0, 0x424(r4) +/* 800AD5EC 000AA52C D0 05 80 00 */ stfs f0, -0x8000(r5) +/* 800AD5F0 000AA530 C0 04 04 28 */ lfs f0, 0x428(r4) +/* 800AD5F4 000AA534 D0 05 80 00 */ stfs f0, -0x8000(r5) +/* 800AD5F8 000AA538 C0 04 04 2C */ lfs f0, 0x42c(r4) +/* 800AD5FC 000AA53C D0 05 80 00 */ stfs f0, -0x8000(r5) +/* 800AD600 000AA540 C0 04 04 30 */ lfs f0, 0x430(r4) +/* 800AD604 000AA544 D0 05 80 00 */ stfs f0, -0x8000(r5) +/* 800AD608 000AA548 C0 04 04 34 */ lfs f0, 0x434(r4) +/* 800AD60C 000AA54C D0 05 80 00 */ stfs f0, -0x8000(r5) +/* 800AD610 000AA550 C0 04 04 38 */ lfs f0, 0x438(r4) +/* 800AD614 000AA554 D0 05 80 00 */ stfs f0, -0x8000(r5) +/* 800AD618 000AA558 80 64 04 20 */ lwz r3, 0x420(r4) +/* 800AD61C 000AA55C 90 65 80 00 */ stw r3, -0x8000(r5) +/* 800AD620 000AA560 B0 04 00 02 */ sth r0, 2(r4) +/* 800AD624 000AA564 4E 80 00 20 */ blr + +.global GXGetProjectionv +GXGetProjectionv: +/* 800AD628 000AA568 94 21 FF E8 */ stwu r1, -0x18(r1) +/* 800AD62C 000AA56C 3C 00 43 30 */ lis r0, 0x4330 +/* 800AD630 000AA570 80 8D 82 C8 */ lwz r4, gx@sda21(r13) +/* 800AD634 000AA574 C8 22 8B C0 */ lfd f1, "@24"@sda21(r2) +/* 800AD638 000AA578 80 84 04 20 */ lwz r4, 0x420(r4) +/* 800AD63C 000AA57C 90 81 00 14 */ stw r4, 0x14(r1) +/* 800AD640 000AA580 90 01 00 10 */ stw r0, 0x10(r1) +/* 800AD644 000AA584 C8 01 00 10 */ lfd f0, 0x10(r1) +/* 800AD648 000AA588 EC 00 08 28 */ fsubs f0, f0, f1 +/* 800AD64C 000AA58C D0 03 00 00 */ stfs f0, 0(r3) +/* 800AD650 000AA590 80 8D 82 C8 */ lwz r4, gx@sda21(r13) +/* 800AD654 000AA594 C0 04 04 24 */ lfs f0, 0x424(r4) +/* 800AD658 000AA598 D0 03 00 04 */ stfs f0, 4(r3) +/* 800AD65C 000AA59C 80 8D 82 C8 */ lwz r4, gx@sda21(r13) +/* 800AD660 000AA5A0 C0 04 04 28 */ lfs f0, 0x428(r4) +/* 800AD664 000AA5A4 D0 03 00 08 */ stfs f0, 8(r3) +/* 800AD668 000AA5A8 80 8D 82 C8 */ lwz r4, gx@sda21(r13) +/* 800AD66C 000AA5AC C0 04 04 2C */ lfs f0, 0x42c(r4) +/* 800AD670 000AA5B0 D0 03 00 0C */ stfs f0, 0xc(r3) +/* 800AD674 000AA5B4 80 8D 82 C8 */ lwz r4, gx@sda21(r13) +/* 800AD678 000AA5B8 C0 04 04 30 */ lfs f0, 0x430(r4) +/* 800AD67C 000AA5BC D0 03 00 10 */ stfs f0, 0x10(r3) +/* 800AD680 000AA5C0 80 8D 82 C8 */ lwz r4, gx@sda21(r13) +/* 800AD684 000AA5C4 C0 04 04 34 */ lfs f0, 0x434(r4) +/* 800AD688 000AA5C8 D0 03 00 14 */ stfs f0, 0x14(r3) +/* 800AD68C 000AA5CC 80 8D 82 C8 */ lwz r4, gx@sda21(r13) +/* 800AD690 000AA5D0 C0 04 04 38 */ lfs f0, 0x438(r4) +/* 800AD694 000AA5D4 D0 03 00 18 */ stfs f0, 0x18(r3) +/* 800AD698 000AA5D8 38 21 00 18 */ addi r1, r1, 0x18 +/* 800AD69C 000AA5DC 4E 80 00 20 */ blr + +.global WriteMTXPS4x3 +WriteMTXPS4x3: +/* 800AD6A0 000AA5E0 E0 03 00 00 */ psq_l f0, 0(r3), 0, qr0 +/* 800AD6A4 000AA5E4 E0 23 00 08 */ psq_l f1, 8(r3), 0, qr0 +/* 800AD6A8 000AA5E8 E0 43 00 10 */ psq_l f2, 16(r3), 0, qr0 +/* 800AD6AC 000AA5EC E0 63 00 18 */ psq_l f3, 24(r3), 0, qr0 +/* 800AD6B0 000AA5F0 E0 83 00 20 */ psq_l f4, 32(r3), 0, qr0 +/* 800AD6B4 000AA5F4 E0 A3 00 28 */ psq_l f5, 40(r3), 0, qr0 +/* 800AD6B8 000AA5F8 F0 04 00 00 */ psq_st f0, 0(r4), 0, qr0 +/* 800AD6BC 000AA5FC F0 24 00 00 */ psq_st f1, 0(r4), 0, qr0 +/* 800AD6C0 000AA600 F0 44 00 00 */ psq_st f2, 0(r4), 0, qr0 +/* 800AD6C4 000AA604 F0 64 00 00 */ psq_st f3, 0(r4), 0, qr0 +/* 800AD6C8 000AA608 F0 84 00 00 */ psq_st f4, 0(r4), 0, qr0 +/* 800AD6CC 000AA60C F0 A4 00 00 */ psq_st f5, 0(r4), 0, qr0 +/* 800AD6D0 000AA610 4E 80 00 20 */ blr + +.global WriteMTXPS3x3from3x4 +WriteMTXPS3x3from3x4: +/* 800AD6D4 000AA614 E0 03 00 00 */ psq_l f0, 0(r3), 0, qr0 +/* 800AD6D8 000AA618 C0 23 00 08 */ lfs f1, 8(r3) +/* 800AD6DC 000AA61C E0 43 00 10 */ psq_l f2, 16(r3), 0, qr0 +/* 800AD6E0 000AA620 C0 63 00 18 */ lfs f3, 0x18(r3) +/* 800AD6E4 000AA624 E0 83 00 20 */ psq_l f4, 32(r3), 0, qr0 +/* 800AD6E8 000AA628 C0 A3 00 28 */ lfs f5, 0x28(r3) +/* 800AD6EC 000AA62C F0 04 00 00 */ psq_st f0, 0(r4), 0, qr0 +/* 800AD6F0 000AA630 D0 24 00 00 */ stfs f1, 0(r4) +/* 800AD6F4 000AA634 F0 44 00 00 */ psq_st f2, 0(r4), 0, qr0 +/* 800AD6F8 000AA638 D0 64 00 00 */ stfs f3, 0(r4) +/* 800AD6FC 000AA63C F0 84 00 00 */ psq_st f4, 0(r4), 0, qr0 +/* 800AD700 000AA640 D0 A4 00 00 */ stfs f5, 0(r4) +/* 800AD704 000AA644 4E 80 00 20 */ blr + +.global WriteMTXPS4x2 +WriteMTXPS4x2: +/* 800AD708 000AA648 E0 03 00 00 */ psq_l f0, 0(r3), 0, qr0 +/* 800AD70C 000AA64C E0 23 00 08 */ psq_l f1, 8(r3), 0, qr0 +/* 800AD710 000AA650 E0 43 00 10 */ psq_l f2, 16(r3), 0, qr0 +/* 800AD714 000AA654 E0 63 00 18 */ psq_l f3, 24(r3), 0, qr0 +/* 800AD718 000AA658 F0 04 00 00 */ psq_st f0, 0(r4), 0, qr0 +/* 800AD71C 000AA65C F0 24 00 00 */ psq_st f1, 0(r4), 0, qr0 +/* 800AD720 000AA660 F0 44 00 00 */ psq_st f2, 0(r4), 0, qr0 +/* 800AD724 000AA664 F0 64 00 00 */ psq_st f3, 0(r4), 0, qr0 +/* 800AD728 000AA668 4E 80 00 20 */ blr + +.global GXLoadPosMtxImm +GXLoadPosMtxImm: +/* 800AD72C 000AA66C 7C 08 02 A6 */ mflr r0 +/* 800AD730 000AA670 90 01 00 04 */ stw r0, 4(r1) +/* 800AD734 000AA674 94 21 FF F8 */ stwu r1, -8(r1) +/* 800AD738 000AA678 38 C0 00 10 */ li r6, 0x10 +/* 800AD73C 000AA67C 3C A0 CC 01 */ lis r5, 0xCC008000@ha +/* 800AD740 000AA680 54 80 10 3A */ slwi r0, r4, 2 +/* 800AD744 000AA684 98 C5 80 00 */ stb r6, 0xCC008000@l(r5) +/* 800AD748 000AA688 64 00 00 0B */ oris r0, r0, 0xb +/* 800AD74C 000AA68C 90 05 80 00 */ stw r0, -0x8000(r5) +/* 800AD750 000AA690 38 85 80 00 */ addi r4, r5, -32768 +/* 800AD754 000AA694 4B FF FF 4D */ bl WriteMTXPS4x3 +/* 800AD758 000AA698 80 01 00 0C */ lwz r0, 0xc(r1) +/* 800AD75C 000AA69C 38 21 00 08 */ addi r1, r1, 8 +/* 800AD760 000AA6A0 7C 08 03 A6 */ mtlr r0 +/* 800AD764 000AA6A4 4E 80 00 20 */ blr + +.global GXLoadPosMtxIndx +GXLoadPosMtxIndx: +/* 800AD768 000AA6A8 54 80 10 3A */ slwi r0, r4, 2 +/* 800AD76C 000AA6AC 54 00 05 1E */ rlwinm r0, r0, 0, 0x14, 0xf +/* 800AD770 000AA6B0 60 05 B0 00 */ ori r5, r0, 0xb000 +/* 800AD774 000AA6B4 54 64 04 3E */ clrlwi r4, r3, 0x10 +/* 800AD778 000AA6B8 38 00 00 20 */ li r0, 0x20 +/* 800AD77C 000AA6BC 3C 60 CC 01 */ lis r3, 0xCC008000@ha +/* 800AD780 000AA6C0 98 03 80 00 */ stb r0, 0xCC008000@l(r3) +/* 800AD784 000AA6C4 54 A5 04 3E */ clrlwi r5, r5, 0x10 +/* 800AD788 000AA6C8 54 80 80 1E */ slwi r0, r4, 0x10 +/* 800AD78C 000AA6CC 7C A0 03 78 */ or r0, r5, r0 +/* 800AD790 000AA6D0 90 03 80 00 */ stw r0, -0x8000(r3) +/* 800AD794 000AA6D4 4E 80 00 20 */ blr + +.global GXLoadNrmMtxImm +GXLoadNrmMtxImm: +/* 800AD798 000AA6D8 7C 08 02 A6 */ mflr r0 +/* 800AD79C 000AA6DC 90 01 00 04 */ stw r0, 4(r1) +/* 800AD7A0 000AA6E0 94 21 FF F8 */ stwu r1, -8(r1) +/* 800AD7A4 000AA6E4 1C 84 00 03 */ mulli r4, r4, 3 +/* 800AD7A8 000AA6E8 38 04 04 00 */ addi r0, r4, 0x400 +/* 800AD7AC 000AA6EC 3C A0 CC 01 */ lis r5, 0xCC008000@ha +/* 800AD7B0 000AA6F0 38 C0 00 10 */ li r6, 0x10 +/* 800AD7B4 000AA6F4 98 C5 80 00 */ stb r6, 0xCC008000@l(r5) +/* 800AD7B8 000AA6F8 64 00 00 08 */ oris r0, r0, 8 +/* 800AD7BC 000AA6FC 38 85 80 00 */ addi r4, r5, -32768 +/* 800AD7C0 000AA700 90 05 80 00 */ stw r0, -0x8000(r5) +/* 800AD7C4 000AA704 4B FF FF 11 */ bl WriteMTXPS3x3from3x4 +/* 800AD7C8 000AA708 80 01 00 0C */ lwz r0, 0xc(r1) +/* 800AD7CC 000AA70C 38 21 00 08 */ addi r1, r1, 8 +/* 800AD7D0 000AA710 7C 08 03 A6 */ mtlr r0 +/* 800AD7D4 000AA714 4E 80 00 20 */ blr + +.global GXLoadNrmMtxIndx3x3 +GXLoadNrmMtxIndx3x3: +/* 800AD7D8 000AA718 1C 84 00 03 */ mulli r4, r4, 3 +/* 800AD7DC 000AA71C 38 04 04 00 */ addi r0, r4, 0x400 +/* 800AD7E0 000AA720 54 00 05 1E */ rlwinm r0, r0, 0, 0x14, 0xf +/* 800AD7E4 000AA724 60 05 80 00 */ ori r5, r0, 0x8000 +/* 800AD7E8 000AA728 54 64 04 3E */ clrlwi r4, r3, 0x10 +/* 800AD7EC 000AA72C 38 00 00 28 */ li r0, 0x28 +/* 800AD7F0 000AA730 3C 60 CC 01 */ lis r3, 0xCC008000@ha +/* 800AD7F4 000AA734 98 03 80 00 */ stb r0, 0xCC008000@l(r3) +/* 800AD7F8 000AA738 54 A5 04 3E */ clrlwi r5, r5, 0x10 +/* 800AD7FC 000AA73C 54 80 80 1E */ slwi r0, r4, 0x10 +/* 800AD800 000AA740 7C A0 03 78 */ or r0, r5, r0 +/* 800AD804 000AA744 90 03 80 00 */ stw r0, -0x8000(r3) +/* 800AD808 000AA748 4E 80 00 20 */ blr + +.global GXSetCurrentMtx +GXSetCurrentMtx: +/* 800AD80C 000AA74C 7C 08 02 A6 */ mflr r0 +/* 800AD810 000AA750 90 01 00 04 */ stw r0, 4(r1) +/* 800AD814 000AA754 94 21 FF F8 */ stwu r1, -8(r1) +/* 800AD818 000AA758 80 8D 82 C8 */ lwz r4, gx@sda21(r13) +/* 800AD81C 000AA75C 38 84 00 80 */ addi r4, r4, 0x80 +/* 800AD820 000AA760 80 04 00 00 */ lwz r0, 0(r4) +/* 800AD824 000AA764 54 00 00 32 */ rlwinm r0, r0, 0, 0, 0x19 +/* 800AD828 000AA768 7C 00 1B 78 */ or r0, r0, r3 +/* 800AD82C 000AA76C 90 04 00 00 */ stw r0, 0(r4) +/* 800AD830 000AA770 38 60 00 00 */ li r3, 0 +/* 800AD834 000AA774 48 00 03 41 */ bl __GXSetMatrixIndex +/* 800AD838 000AA778 80 01 00 0C */ lwz r0, 0xc(r1) +/* 800AD83C 000AA77C 38 21 00 08 */ addi r1, r1, 8 +/* 800AD840 000AA780 7C 08 03 A6 */ mtlr r0 +/* 800AD844 000AA784 4E 80 00 20 */ blr + +.global GXLoadTexMtxImm +GXLoadTexMtxImm: +/* 800AD848 000AA788 7C 08 02 A6 */ mflr r0 +/* 800AD84C 000AA78C 90 01 00 04 */ stw r0, 4(r1) +/* 800AD850 000AA790 94 21 FF F8 */ stwu r1, -8(r1) +/* 800AD854 000AA794 28 04 00 40 */ cmplwi r4, 0x40 +/* 800AD858 000AA798 41 80 00 14 */ blt lbl_800AD86C +/* 800AD85C 000AA79C 38 04 FF C0 */ addi r0, r4, -64 +/* 800AD860 000AA7A0 54 04 10 3A */ slwi r4, r0, 2 +/* 800AD864 000AA7A4 38 E4 05 00 */ addi r7, r4, 0x500 +/* 800AD868 000AA7A8 48 00 00 08 */ b lbl_800AD870 +lbl_800AD86C: +/* 800AD86C 000AA7AC 54 87 10 3A */ slwi r7, r4, 2 +lbl_800AD870: +/* 800AD870 000AA7B0 2C 05 00 01 */ cmpwi r5, 1 +/* 800AD874 000AA7B4 40 82 00 0C */ bne lbl_800AD880 +/* 800AD878 000AA7B8 38 80 00 08 */ li r4, 8 +/* 800AD87C 000AA7BC 48 00 00 08 */ b lbl_800AD884 +lbl_800AD880: +/* 800AD880 000AA7C0 38 80 00 0C */ li r4, 0xc +lbl_800AD884: +/* 800AD884 000AA7C4 38 04 FF FF */ addi r0, r4, -1 +/* 800AD888 000AA7C8 54 00 80 1E */ slwi r0, r0, 0x10 +/* 800AD88C 000AA7CC 38 C0 00 10 */ li r6, 0x10 +/* 800AD890 000AA7D0 3C 80 CC 01 */ lis r4, 0xCC008000@ha +/* 800AD894 000AA7D4 98 C4 80 00 */ stb r6, 0xCC008000@l(r4) +/* 800AD898 000AA7D8 7C E0 03 78 */ or r0, r7, r0 +/* 800AD89C 000AA7DC 2C 05 00 00 */ cmpwi r5, 0 +/* 800AD8A0 000AA7E0 90 04 80 00 */ stw r0, -0x8000(r4) +/* 800AD8A4 000AA7E4 40 82 00 10 */ bne lbl_800AD8B4 +/* 800AD8A8 000AA7E8 38 84 80 00 */ addi r4, r4, -32768 +/* 800AD8AC 000AA7EC 4B FF FD F5 */ bl WriteMTXPS4x3 +/* 800AD8B0 000AA7F0 48 00 00 0C */ b lbl_800AD8BC +lbl_800AD8B4: +/* 800AD8B4 000AA7F4 38 84 80 00 */ addi r4, r4, -32768 +/* 800AD8B8 000AA7F8 4B FF FE 51 */ bl WriteMTXPS4x2 +lbl_800AD8BC: +/* 800AD8BC 000AA7FC 80 01 00 0C */ lwz r0, 0xc(r1) +/* 800AD8C0 000AA800 38 21 00 08 */ addi r1, r1, 8 +/* 800AD8C4 000AA804 7C 08 03 A6 */ mtlr r0 +/* 800AD8C8 000AA808 4E 80 00 20 */ blr + +.global GXSetViewportJitter +GXSetViewportJitter: +/* 800AD8CC 000AA80C 7C 08 02 A6 */ mflr r0 +/* 800AD8D0 000AA810 90 01 00 04 */ stw r0, 4(r1) +/* 800AD8D4 000AA814 94 21 FF A0 */ stwu r1, -0x60(r1) +/* 800AD8D8 000AA818 DB E1 00 58 */ stfd f31, 0x58(r1) +/* 800AD8DC 000AA81C DB C1 00 50 */ stfd f30, 0x50(r1) +/* 800AD8E0 000AA820 DB A1 00 48 */ stfd f29, 0x48(r1) +/* 800AD8E4 000AA824 DB 81 00 40 */ stfd f28, 0x40(r1) +/* 800AD8E8 000AA828 DB 61 00 38 */ stfd f27, 0x38(r1) +/* 800AD8EC 000AA82C DB 41 00 30 */ stfd f26, 0x30(r1) +/* 800AD8F0 000AA830 28 03 00 00 */ cmplwi r3, 0 +/* 800AD8F4 000AA834 40 82 00 0C */ bne lbl_800AD900 +/* 800AD8F8 000AA838 C0 02 8B B8 */ lfs f0, "@16"@sda21(r2) +/* 800AD8FC 000AA83C EC 42 00 28 */ fsubs f2, f2, f0 +lbl_800AD900: +/* 800AD900 000AA840 C1 62 8B B8 */ lfs f11, "@16"@sda21(r2) +/* 800AD904 000AA844 FD 40 20 50 */ fneg f10, f4 +/* 800AD908 000AA848 C0 02 8B CC */ lfs f0, "@64"@sda21(r2) +/* 800AD90C 000AA84C C1 22 8B C8 */ lfs f9, "@63"@sda21(r2) +/* 800AD910 000AA850 EF E3 02 F2 */ fmuls f31, f3, f11 +/* 800AD914 000AA854 80 6D 82 C8 */ lwz r3, gx@sda21(r13) +/* 800AD918 000AA858 EC E4 02 F2 */ fmuls f7, f4, f11 +/* 800AD91C 000AA85C D0 23 04 3C */ stfs f1, 0x43c(r3) +/* 800AD920 000AA860 ED 01 F8 2A */ fadds f8, f1, f31 +/* 800AD924 000AA864 EF C0 01 B2 */ fmuls f30, f0, f6 +/* 800AD928 000AA868 80 6D 82 C8 */ lwz r3, gx@sda21(r13) +/* 800AD92C 000AA86C EC 22 38 2A */ fadds f1, f2, f7 +/* 800AD930 000AA870 D0 43 04 40 */ stfs f2, 0x440(r3) +/* 800AD934 000AA874 EC 00 01 72 */ fmuls f0, f0, f5 +/* 800AD938 000AA878 EF AA 02 F2 */ fmuls f29, f10, f11 +/* 800AD93C 000AA87C 80 6D 82 C8 */ lwz r3, gx@sda21(r13) +/* 800AD940 000AA880 EF 69 40 2A */ fadds f27, f9, f8 +/* 800AD944 000AA884 D0 63 04 44 */ stfs f3, 0x444(r3) +/* 800AD948 000AA888 EF 49 08 2A */ fadds f26, f9, f1 +/* 800AD94C 000AA88C EF 9E 00 28 */ fsubs f28, f30, f0 +/* 800AD950 000AA890 80 6D 82 C8 */ lwz r3, gx@sda21(r13) +/* 800AD954 000AA894 D0 83 04 48 */ stfs f4, 0x448(r3) +/* 800AD958 000AA898 80 6D 82 C8 */ lwz r3, gx@sda21(r13) +/* 800AD95C 000AA89C D0 A3 04 4C */ stfs f5, 0x44c(r3) +/* 800AD960 000AA8A0 80 6D 82 C8 */ lwz r3, gx@sda21(r13) +/* 800AD964 000AA8A4 D0 C3 04 50 */ stfs f6, 0x450(r3) +/* 800AD968 000AA8A8 80 6D 82 C8 */ lwz r3, gx@sda21(r13) +/* 800AD96C 000AA8AC 88 03 04 54 */ lbz r0, 0x454(r3) +/* 800AD970 000AA8B0 28 00 00 00 */ cmplwi r0, 0 +/* 800AD974 000AA8B4 41 82 00 10 */ beq lbl_800AD984 +/* 800AD978 000AA8B8 FC 20 28 90 */ fmr f1, f5 +/* 800AD97C 000AA8BC C0 43 04 58 */ lfs f2, 0x458(r3) +/* 800AD980 000AA8C0 4B FF F9 ED */ bl __GXSetRange +lbl_800AD984: +/* 800AD984 000AA8C4 38 00 00 10 */ li r0, 0x10 +/* 800AD988 000AA8C8 80 6D 82 C8 */ lwz r3, gx@sda21(r13) +/* 800AD98C 000AA8CC 3C A0 CC 01 */ lis r5, 0xCC008000@ha +/* 800AD990 000AA8D0 3C 80 00 05 */ lis r4, 0x0005101A@ha +/* 800AD994 000AA8D4 98 05 80 00 */ stb r0, 0xCC008000@l(r5) +/* 800AD998 000AA8D8 38 04 10 1A */ addi r0, r4, 0x0005101A@l +/* 800AD99C 000AA8DC 90 05 80 00 */ stw r0, -0x8000(r5) +/* 800AD9A0 000AA8E0 38 00 00 01 */ li r0, 1 +/* 800AD9A4 000AA8E4 D3 E5 80 00 */ stfs f31, -0x8000(r5) +/* 800AD9A8 000AA8E8 D3 A5 80 00 */ stfs f29, -0x8000(r5) +/* 800AD9AC 000AA8EC D3 85 80 00 */ stfs f28, -0x8000(r5) +/* 800AD9B0 000AA8F0 D3 65 80 00 */ stfs f27, -0x8000(r5) +/* 800AD9B4 000AA8F4 D3 45 80 00 */ stfs f26, -0x8000(r5) +/* 800AD9B8 000AA8F8 D3 C5 80 00 */ stfs f30, -0x8000(r5) +/* 800AD9BC 000AA8FC B0 03 00 02 */ sth r0, 2(r3) +/* 800AD9C0 000AA900 80 01 00 64 */ lwz r0, 0x64(r1) +/* 800AD9C4 000AA904 CB E1 00 58 */ lfd f31, 0x58(r1) +/* 800AD9C8 000AA908 CB C1 00 50 */ lfd f30, 0x50(r1) +/* 800AD9CC 000AA90C CB A1 00 48 */ lfd f29, 0x48(r1) +/* 800AD9D0 000AA910 CB 81 00 40 */ lfd f28, 0x40(r1) +/* 800AD9D4 000AA914 CB 61 00 38 */ lfd f27, 0x38(r1) +/* 800AD9D8 000AA918 CB 41 00 30 */ lfd f26, 0x30(r1) +/* 800AD9DC 000AA91C 38 21 00 60 */ addi r1, r1, 0x60 +/* 800AD9E0 000AA920 7C 08 03 A6 */ mtlr r0 +/* 800AD9E4 000AA924 4E 80 00 20 */ blr + +.global GXSetViewport +GXSetViewport: +/* 800AD9E8 000AA928 7C 08 02 A6 */ mflr r0 +/* 800AD9EC 000AA92C 90 01 00 04 */ stw r0, 4(r1) +/* 800AD9F0 000AA930 94 21 FF F8 */ stwu r1, -8(r1) +/* 800AD9F4 000AA934 38 60 00 01 */ li r3, 1 +/* 800AD9F8 000AA938 4B FF FE D5 */ bl GXSetViewportJitter +/* 800AD9FC 000AA93C 80 01 00 0C */ lwz r0, 0xc(r1) +/* 800ADA00 000AA940 38 21 00 08 */ addi r1, r1, 8 +/* 800ADA04 000AA944 7C 08 03 A6 */ mtlr r0 +/* 800ADA08 000AA948 4E 80 00 20 */ blr + +.global GXGetViewportv +GXGetViewportv: +/* 800ADA0C 000AA94C 80 8D 82 C8 */ lwz r4, gx@sda21(r13) +/* 800ADA10 000AA950 C0 04 04 3C */ lfs f0, 0x43c(r4) +/* 800ADA14 000AA954 D0 03 00 00 */ stfs f0, 0(r3) +/* 800ADA18 000AA958 80 8D 82 C8 */ lwz r4, gx@sda21(r13) +/* 800ADA1C 000AA95C C0 04 04 40 */ lfs f0, 0x440(r4) +/* 800ADA20 000AA960 D0 03 00 04 */ stfs f0, 4(r3) +/* 800ADA24 000AA964 80 8D 82 C8 */ lwz r4, gx@sda21(r13) +/* 800ADA28 000AA968 C0 04 04 44 */ lfs f0, 0x444(r4) +/* 800ADA2C 000AA96C D0 03 00 08 */ stfs f0, 8(r3) +/* 800ADA30 000AA970 80 8D 82 C8 */ lwz r4, gx@sda21(r13) +/* 800ADA34 000AA974 C0 04 04 48 */ lfs f0, 0x448(r4) +/* 800ADA38 000AA978 D0 03 00 0C */ stfs f0, 0xc(r3) +/* 800ADA3C 000AA97C 80 8D 82 C8 */ lwz r4, gx@sda21(r13) +/* 800ADA40 000AA980 C0 04 04 4C */ lfs f0, 0x44c(r4) +/* 800ADA44 000AA984 D0 03 00 10 */ stfs f0, 0x10(r3) +/* 800ADA48 000AA988 80 8D 82 C8 */ lwz r4, gx@sda21(r13) +/* 800ADA4C 000AA98C C0 04 04 50 */ lfs f0, 0x450(r4) +/* 800ADA50 000AA990 D0 03 00 14 */ stfs f0, 0x14(r3) +/* 800ADA54 000AA994 4E 80 00 20 */ blr + +.global GXSetScissor +GXSetScissor: +/* 800ADA58 000AA998 80 ED 82 C8 */ lwz r7, gx@sda21(r13) +/* 800ADA5C 000AA99C 39 03 01 56 */ addi r8, r3, 0x156 +/* 800ADA60 000AA9A0 38 05 FF FF */ addi r0, r5, -1 +/* 800ADA64 000AA9A4 38 A7 00 F8 */ addi r5, r7, 0xf8 +/* 800ADA68 000AA9A8 80 65 00 00 */ lwz r3, 0(r5) +/* 800ADA6C 000AA9AC 7C 08 02 14 */ add r0, r8, r0 +/* 800ADA70 000AA9B0 38 84 01 56 */ addi r4, r4, 0x156 +/* 800ADA74 000AA9B4 54 63 00 28 */ rlwinm r3, r3, 0, 0, 0x14 +/* 800ADA78 000AA9B8 7C 63 23 78 */ or r3, r3, r4 +/* 800ADA7C 000AA9BC 90 65 00 00 */ stw r3, 0(r5) +/* 800ADA80 000AA9C0 38 66 FF FF */ addi r3, r6, -1 +/* 800ADA84 000AA9C4 55 07 60 26 */ slwi r7, r8, 0xc +/* 800ADA88 000AA9C8 80 AD 82 C8 */ lwz r5, gx@sda21(r13) +/* 800ADA8C 000AA9CC 7C 84 1A 14 */ add r4, r4, r3 +/* 800ADA90 000AA9D0 54 03 60 26 */ slwi r3, r0, 0xc +/* 800ADA94 000AA9D4 39 05 00 F8 */ addi r8, r5, 0xf8 +/* 800ADA98 000AA9D8 80 08 00 00 */ lwz r0, 0(r8) +/* 800ADA9C 000AA9DC 38 C0 00 61 */ li r6, 0x61 +/* 800ADAA0 000AA9E0 3C A0 CC 01 */ lis r5, 0xCC008000@ha +/* 800ADAA4 000AA9E4 54 00 05 10 */ rlwinm r0, r0, 0, 0x14, 8 +/* 800ADAA8 000AA9E8 7C 00 3B 78 */ or r0, r0, r7 +/* 800ADAAC 000AA9EC 90 08 00 00 */ stw r0, 0(r8) +/* 800ADAB0 000AA9F0 38 00 00 00 */ li r0, 0 +/* 800ADAB4 000AA9F4 80 ED 82 C8 */ lwz r7, gx@sda21(r13) +/* 800ADAB8 000AA9F8 39 07 00 FC */ addi r8, r7, 0xfc +/* 800ADABC 000AA9FC 80 E8 00 00 */ lwz r7, 0(r8) +/* 800ADAC0 000AAA00 54 E7 00 28 */ rlwinm r7, r7, 0, 0, 0x14 +/* 800ADAC4 000AAA04 7C E4 23 78 */ or r4, r7, r4 +/* 800ADAC8 000AAA08 90 88 00 00 */ stw r4, 0(r8) +/* 800ADACC 000AAA0C 80 8D 82 C8 */ lwz r4, gx@sda21(r13) +/* 800ADAD0 000AAA10 38 E4 00 FC */ addi r7, r4, 0xfc +/* 800ADAD4 000AAA14 80 87 00 00 */ lwz r4, 0(r7) +/* 800ADAD8 000AAA18 54 84 05 10 */ rlwinm r4, r4, 0, 0x14, 8 +/* 800ADADC 000AAA1C 7C 83 1B 78 */ or r3, r4, r3 +/* 800ADAE0 000AAA20 90 67 00 00 */ stw r3, 0(r7) +/* 800ADAE4 000AAA24 98 C5 80 00 */ stb r6, 0xCC008000@l(r5) +/* 800ADAE8 000AAA28 80 8D 82 C8 */ lwz r4, gx@sda21(r13) +/* 800ADAEC 000AAA2C 80 64 00 F8 */ lwz r3, 0xf8(r4) +/* 800ADAF0 000AAA30 90 65 80 00 */ stw r3, -0x8000(r5) +/* 800ADAF4 000AAA34 98 C5 80 00 */ stb r6, -0x8000(r5) +/* 800ADAF8 000AAA38 80 64 00 FC */ lwz r3, 0xfc(r4) +/* 800ADAFC 000AAA3C 90 65 80 00 */ stw r3, -0x8000(r5) +/* 800ADB00 000AAA40 B0 04 00 02 */ sth r0, 2(r4) +/* 800ADB04 000AAA44 4E 80 00 20 */ blr + +.global GXSetScissorBoxOffset +GXSetScissorBoxOffset: +/* 800ADB08 000AAA48 38 A3 01 56 */ addi r5, r3, 0x156 +/* 800ADB0C 000AAA4C 80 6D 82 C8 */ lwz r3, gx@sda21(r13) +/* 800ADB10 000AAA50 38 04 01 56 */ addi r0, r4, 0x156 +/* 800ADB14 000AAA54 54 A4 F8 7E */ srwi r4, r5, 1 +/* 800ADB18 000AAA58 54 00 F8 7E */ srwi r0, r0, 1 +/* 800ADB1C 000AAA5C 54 84 05 96 */ rlwinm r4, r4, 0, 0x16, 0xb +/* 800ADB20 000AAA60 54 00 50 2A */ slwi r0, r0, 0xa +/* 800ADB24 000AAA64 7C 80 03 78 */ or r0, r4, r0 +/* 800ADB28 000AAA68 54 05 02 3E */ clrlwi r5, r0, 8 +/* 800ADB2C 000AAA6C 38 00 00 61 */ li r0, 0x61 +/* 800ADB30 000AAA70 3C 80 CC 01 */ lis r4, 0xCC008000@ha +/* 800ADB34 000AAA74 98 04 80 00 */ stb r0, 0xCC008000@l(r4) +/* 800ADB38 000AAA78 64 A5 59 00 */ oris r5, r5, 0x5900 +/* 800ADB3C 000AAA7C 38 00 00 00 */ li r0, 0 +/* 800ADB40 000AAA80 90 A4 80 00 */ stw r5, -0x8000(r4) +/* 800ADB44 000AAA84 B0 03 00 02 */ sth r0, 2(r3) +/* 800ADB48 000AAA88 4E 80 00 20 */ blr + +.global GXSetClipMode +GXSetClipMode: +/* 800ADB4C 000AAA8C 38 00 00 10 */ li r0, 0x10 +/* 800ADB50 000AAA90 80 8D 82 C8 */ lwz r4, gx@sda21(r13) +/* 800ADB54 000AAA94 3C C0 CC 01 */ lis r6, 0xCC008000@ha +/* 800ADB58 000AAA98 98 06 80 00 */ stb r0, 0xCC008000@l(r6) +/* 800ADB5C 000AAA9C 38 A0 10 05 */ li r5, 0x1005 +/* 800ADB60 000AAAA0 38 00 00 01 */ li r0, 1 +/* 800ADB64 000AAAA4 90 A6 80 00 */ stw r5, -0x8000(r6) +/* 800ADB68 000AAAA8 90 66 80 00 */ stw r3, -0x8000(r6) +/* 800ADB6C 000AAAAC B0 04 00 02 */ sth r0, 2(r4) +/* 800ADB70 000AAAB0 4E 80 00 20 */ blr + +.global __GXSetMatrixIndex +__GXSetMatrixIndex: +/* 800ADB74 000AAAB4 2C 03 00 05 */ cmpwi r3, 5 +/* 800ADB78 000AAAB8 40 80 00 3C */ bge lbl_800ADBB4 +/* 800ADB7C 000AAABC 38 00 00 08 */ li r0, 8 +/* 800ADB80 000AAAC0 80 8D 82 C8 */ lwz r4, gx@sda21(r13) +/* 800ADB84 000AAAC4 3C A0 CC 01 */ lis r5, 0xCC008000@ha +/* 800ADB88 000AAAC8 98 05 80 00 */ stb r0, 0xCC008000@l(r5) +/* 800ADB8C 000AAACC 38 00 00 30 */ li r0, 0x30 +/* 800ADB90 000AAAD0 38 60 00 10 */ li r3, 0x10 +/* 800ADB94 000AAAD4 98 05 80 00 */ stb r0, -0x8000(r5) +/* 800ADB98 000AAAD8 38 00 10 18 */ li r0, 0x1018 +/* 800ADB9C 000AAADC 80 84 00 80 */ lwz r4, 0x80(r4) +/* 800ADBA0 000AAAE0 90 85 80 00 */ stw r4, -0x8000(r5) +/* 800ADBA4 000AAAE4 98 65 80 00 */ stb r3, -0x8000(r5) +/* 800ADBA8 000AAAE8 90 05 80 00 */ stw r0, -0x8000(r5) +/* 800ADBAC 000AAAEC 90 85 80 00 */ stw r4, -0x8000(r5) +/* 800ADBB0 000AAAF0 48 00 00 38 */ b lbl_800ADBE8 +lbl_800ADBB4: +/* 800ADBB4 000AAAF4 38 00 00 08 */ li r0, 8 +/* 800ADBB8 000AAAF8 80 8D 82 C8 */ lwz r4, gx@sda21(r13) +/* 800ADBBC 000AAAFC 3C A0 CC 01 */ lis r5, 0xCC008000@ha +/* 800ADBC0 000AAB00 98 05 80 00 */ stb r0, 0xCC008000@l(r5) +/* 800ADBC4 000AAB04 38 00 00 40 */ li r0, 0x40 +/* 800ADBC8 000AAB08 38 60 00 10 */ li r3, 0x10 +/* 800ADBCC 000AAB0C 98 05 80 00 */ stb r0, -0x8000(r5) +/* 800ADBD0 000AAB10 38 00 10 19 */ li r0, 0x1019 +/* 800ADBD4 000AAB14 80 84 00 84 */ lwz r4, 0x84(r4) +/* 800ADBD8 000AAB18 90 85 80 00 */ stw r4, -0x8000(r5) +/* 800ADBDC 000AAB1C 98 65 80 00 */ stb r3, -0x8000(r5) +/* 800ADBE0 000AAB20 90 05 80 00 */ stw r0, -0x8000(r5) +/* 800ADBE4 000AAB24 90 85 80 00 */ stw r4, -0x8000(r5) +lbl_800ADBE8: +/* 800ADBE8 000AAB28 80 6D 82 C8 */ lwz r3, gx@sda21(r13) +/* 800ADBEC 000AAB2C 38 00 00 01 */ li r0, 1 +/* 800ADBF0 000AAB30 B0 03 00 02 */ sth r0, 2(r3) +/* 800ADBF4 000AAB34 4E 80 00 20 */ blr + +.section .sdata2, "a" # 0x8040B460 - 0x80414020 +.balign 8 +"@14": + .4byte 0 +"@15": + .4byte 0x3F800000 +"@16": + .4byte 0x3F000000 + .4byte 0 +"@24": + .4byte 0x43300000 + .4byte 0 +"@63": + .4byte 0x43AB0000 +"@64": + .4byte 0x4B7FFFFF diff --git a/asm/Dolphin/vi/vi.s b/asm/Dolphin/vi/vi.s new file mode 100644 index 0000000..c3d120c --- /dev/null +++ b/asm/Dolphin/vi/vi.s @@ -0,0 +1,2054 @@ +.include "macros.inc" + +.section .text, "ax" # 0x80005600 - 0x8036FBA0 +.global __VIRetraceHandler +__VIRetraceHandler: +/* 80099638 00096578 7C 08 02 A6 */ mflr r0 +/* 8009963C 0009657C 3C 60 CC 00 */ lis r3, 0xCC002000@ha +/* 80099640 00096580 90 01 00 04 */ stw r0, 4(r1) +/* 80099644 00096584 38 A3 20 00 */ addi r5, r3, 0xCC002000@l +/* 80099648 00096588 3C 60 80 3F */ lis r3, regs@ha +/* 8009964C 0009658C 94 21 FD 08 */ stwu r1, -0x2f8(r1) +/* 80099650 00096590 38 E0 00 00 */ li r7, 0 +/* 80099654 00096594 BF 61 02 E4 */ stmw r27, 0x2e4(r1) +/* 80099658 00096598 3B C4 00 00 */ addi r30, r4, 0 +/* 8009965C 0009659C 3B E3 BD C8 */ addi r31, r3, regs@l +/* 80099660 000965A0 A4 C5 00 30 */ lhzu r6, 0x30(r5) +/* 80099664 000965A4 54 C0 04 21 */ rlwinm. r0, r6, 0, 0x10, 0x10 +/* 80099668 000965A8 41 82 00 10 */ beq lbl_80099678 +/* 8009966C 000965AC 54 C0 04 5E */ rlwinm r0, r6, 0, 0x11, 0xf +/* 80099670 000965B0 B0 05 00 00 */ sth r0, 0(r5) +/* 80099674 000965B4 60 E7 00 01 */ ori r7, r7, 1 +lbl_80099678: +/* 80099678 000965B8 3C 60 CC 00 */ lis r3, 0xCC002034@ha +/* 8009967C 000965BC A4 83 20 34 */ lhzu r4, 0xCC002034@l(r3) +/* 80099680 000965C0 54 80 04 21 */ rlwinm. r0, r4, 0, 0x10, 0x10 +/* 80099684 000965C4 41 82 00 10 */ beq lbl_80099694 +/* 80099688 000965C8 54 80 04 5E */ rlwinm r0, r4, 0, 0x11, 0xf +/* 8009968C 000965CC B0 03 00 00 */ sth r0, 0(r3) +/* 80099690 000965D0 60 E7 00 02 */ ori r7, r7, 2 +lbl_80099694: +/* 80099694 000965D4 3C 60 CC 00 */ lis r3, 0xCC002038@ha +/* 80099698 000965D8 A4 83 20 38 */ lhzu r4, 0xCC002038@l(r3) +/* 8009969C 000965DC 54 80 04 21 */ rlwinm. r0, r4, 0, 0x10, 0x10 +/* 800996A0 000965E0 41 82 00 10 */ beq lbl_800996B0 +/* 800996A4 000965E4 54 80 04 5E */ rlwinm r0, r4, 0, 0x11, 0xf +/* 800996A8 000965E8 B0 03 00 00 */ sth r0, 0(r3) +/* 800996AC 000965EC 60 E7 00 04 */ ori r7, r7, 4 +lbl_800996B0: +/* 800996B0 000965F0 3C 60 CC 00 */ lis r3, 0xCC00203C@ha +/* 800996B4 000965F4 A4 83 20 3C */ lhzu r4, 0xCC00203C@l(r3) +/* 800996B8 000965F8 54 80 04 21 */ rlwinm. r0, r4, 0, 0x10, 0x10 +/* 800996BC 000965FC 41 82 00 10 */ beq lbl_800996CC +/* 800996C0 00096600 54 80 04 5E */ rlwinm r0, r4, 0, 0x11, 0xf +/* 800996C4 00096604 B0 03 00 00 */ sth r0, 0(r3) +/* 800996C8 00096608 60 E7 00 08 */ ori r7, r7, 8 +lbl_800996CC: +/* 800996CC 0009660C 54 E0 07 7B */ rlwinm. r0, r7, 0, 0x1d, 0x1d +/* 800996D0 00096610 40 82 00 0C */ bne lbl_800996DC +/* 800996D4 00096614 54 E0 07 39 */ rlwinm. r0, r7, 0, 0x1c, 0x1c +/* 800996D8 00096618 41 82 00 10 */ beq lbl_800996E8 +lbl_800996DC: +/* 800996DC 0009661C 7F C3 F3 78 */ mr r3, r30 +/* 800996E0 00096620 4B FF 51 3D */ bl OSSetCurrentContext +/* 800996E4 00096624 48 00 01 68 */ b lbl_8009984C +lbl_800996E8: +/* 800996E8 00096628 80 8D 94 40 */ lwz r4, retraceCount@sda21(r13) +/* 800996EC 0009662C 38 61 00 18 */ addi r3, r1, 0x18 +/* 800996F0 00096630 38 04 00 01 */ addi r0, r4, 1 +/* 800996F4 00096634 90 0D 94 40 */ stw r0, retraceCount@sda21(r13) +/* 800996F8 00096638 4B FF 52 ED */ bl OSClearContext +/* 800996FC 0009663C 38 61 00 18 */ addi r3, r1, 0x18 +/* 80099700 00096640 4B FF 51 1D */ bl OSSetCurrentContext +/* 80099704 00096644 81 8D 94 50 */ lwz r12, PreCB@sda21(r13) +/* 80099708 00096648 28 0C 00 00 */ cmplwi r12, 0 +/* 8009970C 0009664C 41 82 00 10 */ beq lbl_8009971C +/* 80099710 00096650 80 6D 94 40 */ lwz r3, retraceCount@sda21(r13) +/* 80099714 00096654 7D 88 03 A6 */ mtlr r12 +/* 80099718 00096658 4E 80 00 21 */ blrl +lbl_8009971C: +/* 8009971C 0009665C 80 0D 94 44 */ lwz r0, flushFlag@sda21(r13) +/* 80099720 00096660 28 00 00 00 */ cmplwi r0, 0 +/* 80099724 00096664 41 82 00 EC */ beq lbl_80099810 +/* 80099728 00096668 80 0D 94 70 */ lwz r0, shdwChangeMode@sda21(r13) +/* 8009972C 0009666C 28 00 00 01 */ cmplwi r0, 1 +/* 80099730 00096670 40 82 00 10 */ bne lbl_80099740 +/* 80099734 00096674 48 00 16 E1 */ bl getCurrentFieldEvenOdd +/* 80099738 00096678 28 03 00 00 */ cmplwi r3, 0 +/* 8009973C 0009667C 41 82 00 BC */ beq lbl_800997F8 +lbl_80099740: +/* 80099740 00096680 3C 60 CC 00 */ lis r3, 0xCC002000@ha +/* 80099744 00096684 3B A3 20 00 */ addi r29, r3, 0xCC002000@l +/* 80099748 00096688 48 00 00 78 */ b lbl_800997C0 +lbl_8009974C: +/* 8009974C 0009668C 80 6D 94 78 */ lwz r3, shdwChanged@sda21(r13) +/* 80099750 00096690 38 A0 00 20 */ li r5, 0x20 +/* 80099754 00096694 83 6D 94 7C */ lwz r27, lbl_80409F3C@sda21(r13) +/* 80099758 00096698 38 9B 00 00 */ addi r4, r27, 0 +/* 8009975C 0009669C 4B FE 98 F5 */ bl __shr2u +/* 80099760 000966A0 7C 84 00 34 */ cntlzw r4, r4 +/* 80099764 000966A4 2C 04 00 20 */ cmpwi r4, 0x20 +/* 80099768 000966A8 38 00 FF FF */ li r0, -1 +/* 8009976C 000966AC 7F 60 00 38 */ and r0, r27, r0 +/* 80099770 000966B0 40 80 00 08 */ bge lbl_80099778 +/* 80099774 000966B4 48 00 00 0C */ b lbl_80099780 +lbl_80099778: +/* 80099778 000966B8 7C 03 00 34 */ cntlzw r3, r0 +/* 8009977C 000966BC 38 83 00 20 */ addi r4, r3, 0x20 +lbl_80099780: +/* 80099780 000966C0 54 86 08 3C */ slwi r6, r4, 1 +/* 80099784 000966C4 7C 7F 32 14 */ add r3, r31, r6 +/* 80099788 000966C8 A0 03 00 78 */ lhz r0, 0x78(r3) +/* 8009978C 000966CC 20 A4 00 3F */ subfic r5, r4, 0x3f +/* 80099790 000966D0 38 60 00 00 */ li r3, 0 +/* 80099794 000966D4 7C 1D 33 2E */ sthx r0, r29, r6 +/* 80099798 000966D8 38 80 00 01 */ li r4, 1 +/* 8009979C 000966DC 4B FE 98 91 */ bl __shl2i +/* 800997A0 000966E0 80 0D 94 78 */ lwz r0, shdwChanged@sda21(r13) +/* 800997A4 000966E4 7C 65 18 F8 */ nor r5, r3, r3 +/* 800997A8 000966E8 7C 84 20 F8 */ nor r4, r4, r4 +/* 800997AC 000966EC 80 6D 94 7C */ lwz r3, lbl_80409F3C@sda21(r13) +/* 800997B0 000966F0 7C 00 28 38 */ and r0, r0, r5 +/* 800997B4 000966F4 7C 63 20 38 */ and r3, r3, r4 +/* 800997B8 000966F8 90 6D 94 7C */ stw r3, lbl_80409F3C@sda21(r13) +/* 800997BC 000966FC 90 0D 94 78 */ stw r0, shdwChanged@sda21(r13) +lbl_800997C0: +/* 800997C0 00096700 80 0D 94 78 */ lwz r0, shdwChanged@sda21(r13) +/* 800997C4 00096704 38 80 00 00 */ li r4, 0 +/* 800997C8 00096708 80 6D 94 7C */ lwz r3, lbl_80409F3C@sda21(r13) +/* 800997CC 0009670C 7C 00 22 78 */ xor r0, r0, r4 +/* 800997D0 00096710 7C 63 22 78 */ xor r3, r3, r4 +/* 800997D4 00096714 7C 60 03 79 */ or. r0, r3, r0 +/* 800997D8 00096718 40 82 FF 74 */ bne lbl_8009974C +/* 800997DC 0009671C 90 8D 94 70 */ stw r4, shdwChangeMode@sda21(r13) +/* 800997E0 00096720 38 60 00 01 */ li r3, 1 +/* 800997E4 00096724 80 1F 01 44 */ lwz r0, 0x144(r31) +/* 800997E8 00096728 90 0D 94 80 */ stw r0, CurrTiming@sda21(r13) +/* 800997EC 0009672C 80 1F 01 18 */ lwz r0, 0x118(r31) +/* 800997F0 00096730 90 0D 94 84 */ stw r0, CurrTvMode@sda21(r13) +/* 800997F4 00096734 48 00 00 08 */ b lbl_800997FC +lbl_800997F8: +/* 800997F8 00096738 38 60 00 00 */ li r3, 0 +lbl_800997FC: +/* 800997FC 0009673C 2C 03 00 00 */ cmpwi r3, 0 +/* 80099800 00096740 41 82 00 10 */ beq lbl_80099810 +/* 80099804 00096744 38 00 00 00 */ li r0, 0 +/* 80099808 00096748 90 0D 94 44 */ stw r0, flushFlag@sda21(r13) +/* 8009980C 0009674C 48 01 AB F1 */ bl SIRefreshSamplingRate +lbl_80099810: +/* 80099810 00096750 80 0D 94 54 */ lwz r0, PostCB@sda21(r13) +/* 80099814 00096754 28 00 00 00 */ cmplwi r0, 0 +/* 80099818 00096758 41 82 00 1C */ beq lbl_80099834 +/* 8009981C 0009675C 38 61 00 18 */ addi r3, r1, 0x18 +/* 80099820 00096760 4B FF 51 C5 */ bl OSClearContext +/* 80099824 00096764 81 8D 94 54 */ lwz r12, PostCB@sda21(r13) +/* 80099828 00096768 80 6D 94 40 */ lwz r3, retraceCount@sda21(r13) +/* 8009982C 0009676C 7D 88 03 A6 */ mtlr r12 +/* 80099830 00096770 4E 80 00 21 */ blrl +lbl_80099834: +/* 80099834 00096774 38 6D 94 48 */ addi r3, r13, retraceQueue@sda21 +/* 80099838 00096778 4B FF A4 B5 */ bl OSWakeupThread +/* 8009983C 0009677C 38 61 00 18 */ addi r3, r1, 0x18 +/* 80099840 00096780 4B FF 51 A5 */ bl OSClearContext +/* 80099844 00096784 7F C3 F3 78 */ mr r3, r30 +/* 80099848 00096788 4B FF 4F D5 */ bl OSSetCurrentContext +lbl_8009984C: +/* 8009984C 0009678C BB 61 02 E4 */ lmw r27, 0x2e4(r1) +/* 80099850 00096790 80 01 02 FC */ lwz r0, 0x2fc(r1) +/* 80099854 00096794 38 21 02 F8 */ addi r1, r1, 0x2f8 +/* 80099858 00096798 7C 08 03 A6 */ mtlr r0 +/* 8009985C 0009679C 4E 80 00 20 */ blr + +.global VISetPostRetraceCallback +VISetPostRetraceCallback: +/* 80099860 000967A0 7C 08 02 A6 */ mflr r0 +/* 80099864 000967A4 90 01 00 04 */ stw r0, 4(r1) +/* 80099868 000967A8 94 21 FF E8 */ stwu r1, -0x18(r1) +/* 8009986C 000967AC 93 E1 00 14 */ stw r31, 0x14(r1) +/* 80099870 000967B0 93 C1 00 10 */ stw r30, 0x10(r1) +/* 80099874 000967B4 7C 7E 1B 78 */ mr r30, r3 +/* 80099878 000967B8 83 ED 94 54 */ lwz r31, PostCB@sda21(r13) +/* 8009987C 000967BC 4B FF 69 51 */ bl OSDisableInterrupts +/* 80099880 000967C0 93 CD 94 54 */ stw r30, PostCB@sda21(r13) +/* 80099884 000967C4 4B FF 69 71 */ bl OSRestoreInterrupts +/* 80099888 000967C8 7F E3 FB 78 */ mr r3, r31 +/* 8009988C 000967CC 80 01 00 1C */ lwz r0, 0x1c(r1) +/* 80099890 000967D0 83 E1 00 14 */ lwz r31, 0x14(r1) +/* 80099894 000967D4 83 C1 00 10 */ lwz r30, 0x10(r1) +/* 80099898 000967D8 38 21 00 18 */ addi r1, r1, 0x18 +/* 8009989C 000967DC 7C 08 03 A6 */ mtlr r0 +/* 800998A0 000967E0 4E 80 00 20 */ blr + +.global getTiming +getTiming: +/* 800998A4 000967E4 28 03 00 15 */ cmplwi r3, 0x15 +/* 800998A8 000967E8 3C 80 80 3B */ lis r4, timing@ha +/* 800998AC 000967EC 38 A4 0F 30 */ addi r5, r4, timing@l +/* 800998B0 000967F0 41 81 00 7C */ bgt lbl_8009992C +/* 800998B4 000967F4 3C 80 80 3B */ lis r4, "@92"@ha +/* 800998B8 000967F8 38 84 10 94 */ addi r4, r4, "@92"@l +/* 800998BC 000967FC 54 60 10 3A */ slwi r0, r3, 2 +/* 800998C0 00096800 7C 04 00 2E */ lwzx r0, r4, r0 +/* 800998C4 00096804 7C 09 03 A6 */ mtctr r0 +/* 800998C8 00096808 4E 80 04 20 */ bctr +lbl_800998CC: +/* 800998CC 0009680C 7C A3 2B 78 */ mr r3, r5 +/* 800998D0 00096810 4E 80 00 20 */ blr +lbl_800998D4: +/* 800998D4 00096814 38 65 00 26 */ addi r3, r5, 0x26 +/* 800998D8 00096818 4E 80 00 20 */ blr +lbl_800998DC: +/* 800998DC 0009681C 38 65 00 4C */ addi r3, r5, 0x4c +/* 800998E0 00096820 4E 80 00 20 */ blr +lbl_800998E4: +/* 800998E4 00096824 38 65 00 72 */ addi r3, r5, 0x72 +/* 800998E8 00096828 4E 80 00 20 */ blr +lbl_800998EC: +/* 800998EC 0009682C 7C A3 2B 78 */ mr r3, r5 +/* 800998F0 00096830 4E 80 00 20 */ blr +lbl_800998F4: +/* 800998F4 00096834 38 65 00 26 */ addi r3, r5, 0x26 +/* 800998F8 00096838 4E 80 00 20 */ blr +lbl_800998FC: +/* 800998FC 0009683C 38 65 00 98 */ addi r3, r5, 0x98 +/* 80099900 00096840 4E 80 00 20 */ blr +lbl_80099904: +/* 80099904 00096844 38 65 00 BE */ addi r3, r5, 0xbe +/* 80099908 00096848 4E 80 00 20 */ blr +lbl_8009990C: +/* 8009990C 0009684C 38 65 00 E4 */ addi r3, r5, 0xe4 +/* 80099910 00096850 4E 80 00 20 */ blr +lbl_80099914: +/* 80099914 00096854 38 65 01 0A */ addi r3, r5, 0x10a +/* 80099918 00096858 4E 80 00 20 */ blr +lbl_8009991C: +/* 8009991C 0009685C 38 65 00 4C */ addi r3, r5, 0x4c +/* 80099920 00096860 4E 80 00 20 */ blr +lbl_80099924: +/* 80099924 00096864 38 65 00 72 */ addi r3, r5, 0x72 +/* 80099928 00096868 4E 80 00 20 */ blr +lbl_8009992C: +/* 8009992C 0009686C 38 60 00 00 */ li r3, 0 +/* 80099930 00096870 4E 80 00 20 */ blr + +.global __VIInit +__VIInit: +/* 80099934 00096874 7C 08 02 A6 */ mflr r0 +/* 80099938 00096878 90 01 00 04 */ stw r0, 4(r1) +/* 8009993C 0009687C 94 21 FF D0 */ stwu r1, -0x30(r1) +/* 80099940 00096880 93 E1 00 2C */ stw r31, 0x2c(r1) +/* 80099944 00096884 54 7F F0 BE */ srwi r31, r3, 2 +/* 80099948 00096888 93 C1 00 28 */ stw r30, 0x28(r1) +/* 8009994C 0009688C 93 A1 00 24 */ stw r29, 0x24(r1) +/* 80099950 00096890 3B A3 00 00 */ addi r29, r3, 0 +/* 80099954 00096894 3C 60 80 00 */ lis r3, 0x800000CC@ha +/* 80099958 00096898 93 E3 00 CC */ stw r31, 0x800000CC@l(r3) +/* 8009995C 0009689C 38 7D 00 00 */ addi r3, r29, 0 +/* 80099960 000968A0 57 BE 07 BC */ rlwinm r30, r29, 0, 0x1e, 0x1e +/* 80099964 000968A4 4B FF FF 41 */ bl getTiming +/* 80099968 000968A8 3C 80 CC 00 */ lis r4, 0xCC002000@ha +/* 8009996C 000968AC 38 00 00 02 */ li r0, 2 +/* 80099970 000968B0 38 A4 20 00 */ addi r5, r4, 0xCC002000@l +/* 80099974 000968B4 B4 05 00 02 */ sthu r0, 2(r5) +/* 80099978 000968B8 38 00 00 00 */ li r0, 0 +/* 8009997C 000968BC 90 01 00 1C */ stw r0, 0x1c(r1) +/* 80099980 000968C0 80 01 00 1C */ lwz r0, 0x1c(r1) +/* 80099984 000968C4 28 00 03 E8 */ cmplwi r0, 0x3e8 +/* 80099988 000968C8 40 80 00 20 */ bge lbl_800999A8 +/* 8009998C 000968CC 48 00 00 10 */ b lbl_8009999C +lbl_80099990: +/* 80099990 000968D0 80 81 00 1C */ lwz r4, 0x1c(r1) +/* 80099994 000968D4 38 04 00 08 */ addi r0, r4, 8 +/* 80099998 000968D8 90 01 00 1C */ stw r0, 0x1c(r1) +lbl_8009999C: +/* 8009999C 000968DC 80 01 00 1C */ lwz r0, 0x1c(r1) +/* 800999A0 000968E0 28 00 03 E8 */ cmplwi r0, 0x3e8 +/* 800999A4 000968E4 41 80 FF EC */ blt lbl_80099990 +lbl_800999A8: +/* 800999A8 000968E8 38 00 00 00 */ li r0, 0 +/* 800999AC 000968EC B0 05 00 00 */ sth r0, 0(r5) +/* 800999B0 000968F0 3D 80 CC 00 */ lis r12, 0xCC002006@ha +/* 800999B4 000968F4 39 00 28 28 */ li r8, 0x2828 +/* 800999B8 000968F8 A0 C3 00 1A */ lhz r6, 0x1a(r3) +/* 800999BC 000968FC 38 E0 00 01 */ li r7, 1 +/* 800999C0 00096900 2C 1D 00 02 */ cmpwi r29, 2 +/* 800999C4 00096904 B0 CC 20 06 */ sth r6, 0xCC002006@l(r12) +/* 800999C8 00096908 38 C0 10 01 */ li r6, 0x1001 +/* 800999CC 0009690C 38 8C 20 00 */ addi r4, r12, 0x2000 +/* 800999D0 00096910 89 23 00 1D */ lbz r9, 0x1d(r3) +/* 800999D4 00096914 89 43 00 1E */ lbz r10, 0x1e(r3) +/* 800999D8 00096918 51 2A 44 2E */ rlwimi r10, r9, 8, 0x10, 0x17 +/* 800999DC 0009691C B1 4C 20 04 */ sth r10, 0x2004(r12) +/* 800999E0 00096920 89 23 00 1F */ lbz r9, 0x1f(r3) +/* 800999E4 00096924 89 43 00 1C */ lbz r10, 0x1c(r3) +/* 800999E8 00096928 55 29 38 30 */ slwi r9, r9, 7 +/* 800999EC 0009692C 7D 49 4B 78 */ or r9, r10, r9 +/* 800999F0 00096930 B1 2C 20 0A */ sth r9, 0x200a(r12) +/* 800999F4 00096934 A1 23 00 20 */ lhz r9, 0x20(r3) +/* 800999F8 00096938 55 29 0C 3C */ rlwinm r9, r9, 1, 0x10, 0x1e +/* 800999FC 0009693C B1 2C 20 08 */ sth r9, 0x2008(r12) +/* 80099A00 00096940 A1 23 00 02 */ lhz r9, 2(r3) +/* 80099A04 00096944 89 63 00 00 */ lbz r11, 0(r3) +/* 80099A08 00096948 55 29 08 3C */ slwi r9, r9, 1 +/* 80099A0C 0009694C A1 43 00 04 */ lhz r10, 4(r3) +/* 80099A10 00096950 39 29 FF FE */ addi r9, r9, -2 +/* 80099A14 00096954 B1 6C 20 00 */ sth r11, 0x2000(r12) +/* 80099A18 00096958 7D 2A 4A 14 */ add r9, r10, r9 +/* 80099A1C 0009695C B1 2C 20 0E */ sth r9, 0x200e(r12) +/* 80099A20 00096960 A1 23 00 08 */ lhz r9, 8(r3) +/* 80099A24 00096964 39 29 00 02 */ addi r9, r9, 2 +/* 80099A28 00096968 B1 2C 20 0C */ sth r9, 0x200c(r12) +/* 80099A2C 0009696C A1 23 00 02 */ lhz r9, 2(r3) +/* 80099A30 00096970 A1 43 00 06 */ lhz r10, 6(r3) +/* 80099A34 00096974 55 29 08 3C */ slwi r9, r9, 1 +/* 80099A38 00096978 39 29 FF FE */ addi r9, r9, -2 +/* 80099A3C 0009697C 7D 2A 4A 14 */ add r9, r10, r9 +/* 80099A40 00096980 B1 2C 20 12 */ sth r9, 0x2012(r12) +/* 80099A44 00096984 A1 23 00 0A */ lhz r9, 0xa(r3) +/* 80099A48 00096988 39 29 00 02 */ addi r9, r9, 2 +/* 80099A4C 0009698C B1 2C 20 10 */ sth r9, 0x2010(r12) +/* 80099A50 00096990 A1 23 00 10 */ lhz r9, 0x10(r3) +/* 80099A54 00096994 89 43 00 0C */ lbz r10, 0xc(r3) +/* 80099A58 00096998 55 29 28 34 */ slwi r9, r9, 5 +/* 80099A5C 0009699C 7D 49 4B 78 */ or r9, r10, r9 +/* 80099A60 000969A0 B1 2C 20 16 */ sth r9, 0x2016(r12) +/* 80099A64 000969A4 A1 23 00 14 */ lhz r9, 0x14(r3) +/* 80099A68 000969A8 89 43 00 0E */ lbz r10, 0xe(r3) +/* 80099A6C 000969AC 55 29 28 34 */ slwi r9, r9, 5 +/* 80099A70 000969B0 7D 49 4B 78 */ or r9, r10, r9 +/* 80099A74 000969B4 B1 2C 20 14 */ sth r9, 0x2014(r12) +/* 80099A78 000969B8 A1 23 00 12 */ lhz r9, 0x12(r3) +/* 80099A7C 000969BC 89 43 00 0D */ lbz r10, 0xd(r3) +/* 80099A80 000969C0 55 29 28 34 */ slwi r9, r9, 5 +/* 80099A84 000969C4 7D 49 4B 78 */ or r9, r10, r9 +/* 80099A88 000969C8 B1 2C 20 1A */ sth r9, 0x201a(r12) +/* 80099A8C 000969CC A1 23 00 16 */ lhz r9, 0x16(r3) +/* 80099A90 000969D0 89 43 00 0F */ lbz r10, 0xf(r3) +/* 80099A94 000969D4 55 29 28 34 */ slwi r9, r9, 5 +/* 80099A98 000969D8 7D 49 4B 78 */ or r9, r10, r9 +/* 80099A9C 000969DC B1 2C 20 18 */ sth r9, 0x2018(r12) +/* 80099AA0 000969E0 B1 0C 20 48 */ sth r8, 0x2048(r12) +/* 80099AA4 000969E4 B0 EC 20 36 */ sth r7, 0x2036(r12) +/* 80099AA8 000969E8 B0 CC 20 34 */ sth r6, 0x2034(r12) +/* 80099AAC 000969EC A0 C3 00 18 */ lhz r6, 0x18(r3) +/* 80099AB0 000969F0 A0 63 00 1A */ lhz r3, 0x1a(r3) +/* 80099AB4 000969F4 7C C6 0E 70 */ srawi r6, r6, 1 +/* 80099AB8 000969F8 38 63 00 01 */ addi r3, r3, 1 +/* 80099ABC 000969FC 7C C6 01 94 */ addze r6, r6 +/* 80099AC0 00096A00 B0 6C 20 32 */ sth r3, 0x2032(r12) +/* 80099AC4 00096A04 38 C6 00 01 */ addi r6, r6, 1 +/* 80099AC8 00096A08 60 C3 10 00 */ ori r3, r6, 0x1000 +/* 80099ACC 00096A0C B0 6C 20 30 */ sth r3, 0x2030(r12) +/* 80099AD0 00096A10 41 82 00 28 */ beq lbl_80099AF8 +/* 80099AD4 00096A14 2C 1D 00 03 */ cmpwi r29, 3 +/* 80099AD8 00096A18 41 82 00 20 */ beq lbl_80099AF8 +/* 80099ADC 00096A1C 57 C3 10 3A */ slwi r3, r30, 2 +/* 80099AE0 00096A20 60 66 00 01 */ ori r6, r3, 1 +/* 80099AE4 00096A24 57 E3 40 2E */ slwi r3, r31, 8 +/* 80099AE8 00096A28 7C C3 1B 78 */ or r3, r6, r3 +/* 80099AEC 00096A2C B0 65 00 00 */ sth r3, 0(r5) +/* 80099AF0 00096A30 B0 04 00 6C */ sth r0, 0x6c(r4) +/* 80099AF4 00096A34 48 00 00 1C */ b lbl_80099B10 +lbl_80099AF8: +/* 80099AF8 00096A38 57 E0 40 2E */ slwi r0, r31, 8 +/* 80099AFC 00096A3C 60 00 00 05 */ ori r0, r0, 5 +/* 80099B00 00096A40 B0 05 00 00 */ sth r0, 0(r5) +/* 80099B04 00096A44 3C 60 CC 00 */ lis r3, 0xCC00206C@ha +/* 80099B08 00096A48 38 00 00 01 */ li r0, 1 +/* 80099B0C 00096A4C B0 03 20 6C */ sth r0, 0xCC00206C@l(r3) +lbl_80099B10: +/* 80099B10 00096A50 80 01 00 34 */ lwz r0, 0x34(r1) +/* 80099B14 00096A54 83 E1 00 2C */ lwz r31, 0x2c(r1) +/* 80099B18 00096A58 83 C1 00 28 */ lwz r30, 0x28(r1) +/* 80099B1C 00096A5C 83 A1 00 24 */ lwz r29, 0x24(r1) +/* 80099B20 00096A60 38 21 00 30 */ addi r1, r1, 0x30 +/* 80099B24 00096A64 7C 08 03 A6 */ mtlr r0 +/* 80099B28 00096A68 4E 80 00 20 */ blr + +.global VIInit +VIInit: +/* 80099B2C 00096A6C 7C 08 02 A6 */ mflr r0 +/* 80099B30 00096A70 3C 60 CC 00 */ lis r3, 0xCC002000@ha +/* 80099B34 00096A74 90 01 00 04 */ stw r0, 4(r1) +/* 80099B38 00096A78 38 00 00 01 */ li r0, 1 +/* 80099B3C 00096A7C 3C 80 80 3B */ lis r4, timing@ha +/* 80099B40 00096A80 94 21 FF E8 */ stwu r1, -0x18(r1) +/* 80099B44 00096A84 93 E1 00 14 */ stw r31, 0x14(r1) +/* 80099B48 00096A88 93 C1 00 10 */ stw r30, 0x10(r1) +/* 80099B4C 00096A8C 3B C4 0F 30 */ addi r30, r4, timing@l +/* 80099B50 00096A90 93 A1 00 0C */ stw r29, 0xc(r1) +/* 80099B54 00096A94 93 81 00 08 */ stw r28, 8(r1) +/* 80099B58 00096A98 3B 83 20 00 */ addi r28, r3, 0xCC002000@l +/* 80099B5C 00096A9C 3C 60 80 3F */ lis r3, regs@ha +/* 80099B60 00096AA0 90 0D 94 58 */ stw r0, encoderType@sda21(r13) +/* 80099B64 00096AA4 3B E3 BD C8 */ addi r31, r3, regs@l +/* 80099B68 00096AA8 A4 1C 00 02 */ lhzu r0, 2(r28) +/* 80099B6C 00096AAC 54 00 07 FF */ clrlwi. r0, r0, 0x1f +/* 80099B70 00096AB0 40 82 00 0C */ bne lbl_80099B7C +/* 80099B74 00096AB4 38 60 00 00 */ li r3, 0 +/* 80099B78 00096AB8 4B FF FD BD */ bl __VIInit +lbl_80099B7C: +/* 80099B7C 00096ABC 3B A0 00 00 */ li r29, 0 +/* 80099B80 00096AC0 93 AD 94 40 */ stw r29, retraceCount@sda21(r13) +/* 80099B84 00096AC4 3C 60 CC 00 */ lis r3, 0xCC002000@ha +/* 80099B88 00096AC8 38 63 20 00 */ addi r3, r3, 0xCC002000@l +/* 80099B8C 00096ACC 93 AD 94 6C */ stw r29, lbl_80409F2C@sda21(r13) +/* 80099B90 00096AD0 38 00 02 80 */ li r0, 0x280 +/* 80099B94 00096AD4 93 AD 94 68 */ stw r29, changed@sda21(r13) +/* 80099B98 00096AD8 93 AD 94 7C */ stw r29, lbl_80409F3C@sda21(r13) +/* 80099B9C 00096ADC 93 AD 94 78 */ stw r29, shdwChanged@sda21(r13) +/* 80099BA0 00096AE0 93 AD 94 60 */ stw r29, changeMode@sda21(r13) +/* 80099BA4 00096AE4 93 AD 94 70 */ stw r29, shdwChangeMode@sda21(r13) +/* 80099BA8 00096AE8 93 AD 94 44 */ stw r29, flushFlag@sda21(r13) +/* 80099BAC 00096AEC A0 BE 01 32 */ lhz r5, 0x132(r30) +/* 80099BB0 00096AF0 A0 DE 01 30 */ lhz r6, 0x130(r30) +/* 80099BB4 00096AF4 54 A5 54 2A */ rlwinm r5, r5, 0xa, 0x10, 0x15 +/* 80099BB8 00096AF8 7C C5 2B 78 */ or r5, r6, r5 +/* 80099BBC 00096AFC B0 A3 00 4E */ sth r5, 0x4e(r3) +/* 80099BC0 00096B00 A0 DE 01 32 */ lhz r6, 0x132(r30) +/* 80099BC4 00096B04 A0 BE 01 34 */ lhz r5, 0x134(r30) +/* 80099BC8 00096B08 7C C6 36 70 */ srawi r6, r6, 6 +/* 80099BCC 00096B0C 54 A5 20 36 */ slwi r5, r5, 4 +/* 80099BD0 00096B10 7C C5 2B 78 */ or r5, r6, r5 +/* 80099BD4 00096B14 B0 A3 00 4C */ sth r5, 0x4c(r3) +/* 80099BD8 00096B18 A0 BE 01 38 */ lhz r5, 0x138(r30) +/* 80099BDC 00096B1C A0 DE 01 36 */ lhz r6, 0x136(r30) +/* 80099BE0 00096B20 54 A5 54 2A */ rlwinm r5, r5, 0xa, 0x10, 0x15 +/* 80099BE4 00096B24 7C C5 2B 78 */ or r5, r6, r5 +/* 80099BE8 00096B28 B0 A3 00 52 */ sth r5, 0x52(r3) +/* 80099BEC 00096B2C A0 DE 01 38 */ lhz r6, 0x138(r30) +/* 80099BF0 00096B30 A0 BE 01 3A */ lhz r5, 0x13a(r30) +/* 80099BF4 00096B34 7C C6 36 70 */ srawi r6, r6, 6 +/* 80099BF8 00096B38 54 A5 20 36 */ slwi r5, r5, 4 +/* 80099BFC 00096B3C 7C C5 2B 78 */ or r5, r6, r5 +/* 80099C00 00096B40 B0 A3 00 50 */ sth r5, 0x50(r3) +/* 80099C04 00096B44 A0 BE 01 3E */ lhz r5, 0x13e(r30) +/* 80099C08 00096B48 A0 DE 01 3C */ lhz r6, 0x13c(r30) +/* 80099C0C 00096B4C 54 A5 54 2A */ rlwinm r5, r5, 0xa, 0x10, 0x15 +/* 80099C10 00096B50 7C C5 2B 78 */ or r5, r6, r5 +/* 80099C14 00096B54 B0 A3 00 56 */ sth r5, 0x56(r3) +/* 80099C18 00096B58 A0 BE 01 3E */ lhz r5, 0x13e(r30) +/* 80099C1C 00096B5C A0 9E 01 40 */ lhz r4, 0x140(r30) +/* 80099C20 00096B60 7C A5 36 70 */ srawi r5, r5, 6 +/* 80099C24 00096B64 54 84 20 36 */ slwi r4, r4, 4 +/* 80099C28 00096B68 7C A4 23 78 */ or r4, r5, r4 +/* 80099C2C 00096B6C B0 83 00 54 */ sth r4, 0x54(r3) +/* 80099C30 00096B70 A0 9E 01 44 */ lhz r4, 0x144(r30) +/* 80099C34 00096B74 A0 BE 01 42 */ lhz r5, 0x142(r30) +/* 80099C38 00096B78 54 84 40 2E */ slwi r4, r4, 8 +/* 80099C3C 00096B7C 7C A4 23 78 */ or r4, r5, r4 +/* 80099C40 00096B80 B0 83 00 5A */ sth r4, 0x5a(r3) +/* 80099C44 00096B84 A0 9E 01 48 */ lhz r4, 0x148(r30) +/* 80099C48 00096B88 A0 BE 01 46 */ lhz r5, 0x146(r30) +/* 80099C4C 00096B8C 54 84 40 2E */ slwi r4, r4, 8 +/* 80099C50 00096B90 7C A4 23 78 */ or r4, r5, r4 +/* 80099C54 00096B94 B0 83 00 58 */ sth r4, 0x58(r3) +/* 80099C58 00096B98 A0 9E 01 4C */ lhz r4, 0x14c(r30) +/* 80099C5C 00096B9C A0 BE 01 4A */ lhz r5, 0x14a(r30) +/* 80099C60 00096BA0 54 84 40 2E */ slwi r4, r4, 8 +/* 80099C64 00096BA4 7C A4 23 78 */ or r4, r5, r4 +/* 80099C68 00096BA8 B0 83 00 5E */ sth r4, 0x5e(r3) +/* 80099C6C 00096BAC A0 9E 01 50 */ lhz r4, 0x150(r30) +/* 80099C70 00096BB0 A0 BE 01 4E */ lhz r5, 0x14e(r30) +/* 80099C74 00096BB4 54 84 40 2E */ slwi r4, r4, 8 +/* 80099C78 00096BB8 7C A4 23 78 */ or r4, r5, r4 +/* 80099C7C 00096BBC B0 83 00 5C */ sth r4, 0x5c(r3) +/* 80099C80 00096BC0 A0 9E 01 54 */ lhz r4, 0x154(r30) +/* 80099C84 00096BC4 A0 BE 01 52 */ lhz r5, 0x152(r30) +/* 80099C88 00096BC8 54 84 40 2E */ slwi r4, r4, 8 +/* 80099C8C 00096BCC 7C A4 23 78 */ or r4, r5, r4 +/* 80099C90 00096BD0 B0 83 00 62 */ sth r4, 0x62(r3) +/* 80099C94 00096BD4 A0 9E 01 58 */ lhz r4, 0x158(r30) +/* 80099C98 00096BD8 A0 BE 01 56 */ lhz r5, 0x156(r30) +/* 80099C9C 00096BDC 54 84 40 2E */ slwi r4, r4, 8 +/* 80099CA0 00096BE0 7C A4 23 78 */ or r4, r5, r4 +/* 80099CA4 00096BE4 B0 83 00 60 */ sth r4, 0x60(r3) +/* 80099CA8 00096BE8 A0 9E 01 5C */ lhz r4, 0x15c(r30) +/* 80099CAC 00096BEC A0 BE 01 5A */ lhz r5, 0x15a(r30) +/* 80099CB0 00096BF0 54 84 40 2E */ slwi r4, r4, 8 +/* 80099CB4 00096BF4 7C A4 23 78 */ or r4, r5, r4 +/* 80099CB8 00096BF8 B0 83 00 66 */ sth r4, 0x66(r3) +/* 80099CBC 00096BFC A0 9E 01 60 */ lhz r4, 0x160(r30) +/* 80099CC0 00096C00 A0 BE 01 5E */ lhz r5, 0x15e(r30) +/* 80099CC4 00096C04 54 84 40 2E */ slwi r4, r4, 8 +/* 80099CC8 00096C08 7C A4 23 78 */ or r4, r5, r4 +/* 80099CCC 00096C0C B0 83 00 64 */ sth r4, 0x64(r3) +/* 80099CD0 00096C10 B0 03 00 70 */ sth r0, 0x70(r3) +/* 80099CD4 00096C14 4B FF 83 89 */ bl __OSLockSram +/* 80099CD8 00096C18 88 03 00 10 */ lbz r0, 0x10(r3) +/* 80099CDC 00096C1C 38 60 00 00 */ li r3, 0 +/* 80099CE0 00096C20 7C 00 07 74 */ extsb r0, r0 +/* 80099CE4 00096C24 B3 AD 94 5E */ sth r29, displayOffsetV@sda21(r13) +/* 80099CE8 00096C28 B0 0D 94 5C */ sth r0, displayOffsetH@sda21(r13) +/* 80099CEC 00096C2C 4B FF 87 31 */ bl __OSUnlockSram +/* 80099CF0 00096C30 A3 DC 00 00 */ lhz r30, 0(r28) +/* 80099CF4 00096C34 38 7F 01 14 */ addi r3, r31, 0x114 +/* 80099CF8 00096C38 3B 9F 01 18 */ addi r28, r31, 0x118 +/* 80099CFC 00096C3C 57 C0 F7 FE */ rlwinm r0, r30, 0x1e, 0x1f, 0x1f +/* 80099D00 00096C40 90 1F 01 14 */ stw r0, 0x114(r31) +/* 80099D04 00096C44 57 C0 C7 BE */ rlwinm r0, r30, 0x18, 0x1e, 0x1f +/* 80099D08 00096C48 90 1F 01 18 */ stw r0, 0x118(r31) +/* 80099D0C 00096C4C 80 1F 01 18 */ lwz r0, 0x118(r31) +/* 80099D10 00096C50 28 00 00 03 */ cmplwi r0, 3 +/* 80099D14 00096C54 40 82 00 08 */ bne lbl_80099D1C +/* 80099D18 00096C58 48 00 00 08 */ b lbl_80099D20 +lbl_80099D1C: +/* 80099D1C 00096C5C 7C 1D 03 78 */ mr r29, r0 +lbl_80099D20: +/* 80099D20 00096C60 80 03 00 00 */ lwz r0, 0(r3) +/* 80099D24 00096C64 57 A3 10 3A */ slwi r3, r29, 2 +/* 80099D28 00096C68 7C 63 02 14 */ add r3, r3, r0 +/* 80099D2C 00096C6C 4B FF FB 79 */ bl getTiming +/* 80099D30 00096C70 90 7F 01 44 */ stw r3, 0x144(r31) +/* 80099D34 00096C74 38 9F 01 44 */ addi r4, r31, 0x144 +/* 80099D38 00096C78 38 00 02 80 */ li r0, 0x280 +/* 80099D3C 00096C7C B3 DF 00 02 */ sth r30, 2(r31) +/* 80099D40 00096C80 39 00 00 00 */ li r8, 0 +/* 80099D44 00096C84 38 DF 00 F6 */ addi r6, r31, 0xf6 +/* 80099D48 00096C88 80 84 00 00 */ lwz r4, 0(r4) +/* 80099D4C 00096C8C 38 7F 00 F2 */ addi r3, r31, 0xf2 +/* 80099D50 00096C90 90 8D 94 80 */ stw r4, CurrTiming@sda21(r13) +/* 80099D54 00096C94 80 9C 00 00 */ lwz r4, 0(r28) +/* 80099D58 00096C98 90 8D 94 84 */ stw r4, CurrTvMode@sda21(r13) +/* 80099D5C 00096C9C B0 1F 00 F4 */ sth r0, 0xf4(r31) +/* 80099D60 00096CA0 80 8D 94 80 */ lwz r4, CurrTiming@sda21(r13) +/* 80099D64 00096CA4 A4 04 00 02 */ lhzu r0, 2(r4) +/* 80099D68 00096CA8 54 00 0C 3C */ rlwinm r0, r0, 1, 0x10, 0x1e +/* 80099D6C 00096CAC B0 1F 00 F6 */ sth r0, 0xf6(r31) +/* 80099D70 00096CB0 A0 1F 00 F4 */ lhz r0, 0xf4(r31) +/* 80099D74 00096CB4 20 00 02 D0 */ subfic r0, r0, 0x2d0 +/* 80099D78 00096CB8 7C 00 0E 70 */ srawi r0, r0, 1 +/* 80099D7C 00096CBC 7C 00 01 94 */ addze r0, r0 +/* 80099D80 00096CC0 B0 1F 00 F0 */ sth r0, 0xf0(r31) +/* 80099D84 00096CC4 B1 1F 00 F2 */ sth r8, 0xf2(r31) +/* 80099D88 00096CC8 A0 1F 00 F4 */ lhz r0, 0xf4(r31) +/* 80099D8C 00096CCC A8 FF 00 F0 */ lha r7, 0xf0(r31) +/* 80099D90 00096CD0 A8 AD 94 5C */ lha r5, displayOffsetH@sda21(r13) +/* 80099D94 00096CD4 20 00 02 D0 */ subfic r0, r0, 0x2d0 +/* 80099D98 00096CD8 A1 24 00 00 */ lhz r9, 0(r4) +/* 80099D9C 00096CDC 7C A7 2A 14 */ add r5, r7, r5 +/* 80099DA0 00096CE0 7C 05 00 00 */ cmpw r5, r0 +/* 80099DA4 00096CE4 40 81 00 08 */ ble lbl_80099DAC +/* 80099DA8 00096CE8 48 00 00 18 */ b lbl_80099DC0 +lbl_80099DAC: +/* 80099DAC 00096CEC 2C 05 00 00 */ cmpwi r5, 0 +/* 80099DB0 00096CF0 40 80 00 08 */ bge lbl_80099DB8 +/* 80099DB4 00096CF4 48 00 00 08 */ b lbl_80099DBC +lbl_80099DB8: +/* 80099DB8 00096CF8 7C A8 2B 78 */ mr r8, r5 +lbl_80099DBC: +/* 80099DBC 00096CFC 7D 00 43 78 */ mr r0, r8 +lbl_80099DC0: +/* 80099DC0 00096D00 B0 1F 00 F8 */ sth r0, 0xf8(r31) +/* 80099DC4 00096D04 39 1F 01 10 */ addi r8, r31, 0x110 +/* 80099DC8 00096D08 80 1F 01 10 */ lwz r0, 0x110(r31) +/* 80099DCC 00096D0C 2C 00 00 00 */ cmpwi r0, 0 +/* 80099DD0 00096D10 40 82 00 0C */ bne lbl_80099DDC +/* 80099DD4 00096D14 39 60 00 02 */ li r11, 2 +/* 80099DD8 00096D18 48 00 00 08 */ b lbl_80099DE0 +lbl_80099DDC: +/* 80099DDC 00096D1C 39 60 00 01 */ li r11, 1 +lbl_80099DE0: +/* 80099DE0 00096D20 A0 03 00 00 */ lhz r0, 0(r3) +/* 80099DE4 00096D24 A8 AD 94 5E */ lha r5, displayOffsetV@sda21(r13) +/* 80099DE8 00096D28 7C 07 07 34 */ extsh r7, r0 +/* 80099DEC 00096D2C 54 00 07 FE */ clrlwi r0, r0, 0x1f +/* 80099DF0 00096D30 7C E7 2A 14 */ add r7, r7, r5 +/* 80099DF4 00096D34 7C 07 00 00 */ cmpw r7, r0 +/* 80099DF8 00096D38 40 81 00 08 */ ble lbl_80099E00 +/* 80099DFC 00096D3C 48 00 00 08 */ b lbl_80099E04 +lbl_80099E00: +/* 80099E00 00096D40 7C 07 03 78 */ mr r7, r0 +lbl_80099E04: +/* 80099E04 00096D44 B0 FF 00 FA */ sth r7, 0xfa(r31) +/* 80099E08 00096D48 7D 27 07 34 */ extsh r7, r9 +/* 80099E0C 00096D4C 54 E7 08 3C */ slwi r7, r7, 1 +/* 80099E10 00096D50 A3 86 00 00 */ lhz r28, 0(r6) +/* 80099E14 00096D54 7D 80 38 50 */ subf r12, r0, r7 +/* 80099E18 00096D58 A9 43 00 00 */ lha r10, 0(r3) +/* 80099E1C 00096D5C 7F 87 07 34 */ extsh r7, r28 +/* 80099E20 00096D60 7D 27 2A 14 */ add r9, r7, r5 +/* 80099E24 00096D64 7D 2A 4A 14 */ add r9, r10, r9 +/* 80099E28 00096D68 7C EC 48 51 */ subf. r7, r12, r9 +/* 80099E2C 00096D6C 40 81 00 0C */ ble lbl_80099E38 +/* 80099E30 00096D70 7D 2C 48 50 */ subf r9, r12, r9 +/* 80099E34 00096D74 48 00 00 08 */ b lbl_80099E3C +lbl_80099E38: +/* 80099E38 00096D78 39 20 00 00 */ li r9, 0 +lbl_80099E3C: +/* 80099E3C 00096D7C 7D 4A 2A 14 */ add r10, r10, r5 +/* 80099E40 00096D80 7C E0 50 51 */ subf. r7, r0, r10 +/* 80099E44 00096D84 40 80 00 0C */ bge lbl_80099E50 +/* 80099E48 00096D88 7C E0 50 50 */ subf r7, r0, r10 +/* 80099E4C 00096D8C 48 00 00 08 */ b lbl_80099E54 +lbl_80099E50: +/* 80099E50 00096D90 38 E0 00 00 */ li r7, 0 +lbl_80099E54: +/* 80099E54 00096D94 7C FC 3A 14 */ add r7, r28, r7 +/* 80099E58 00096D98 7C E9 38 50 */ subf r7, r9, r7 +/* 80099E5C 00096D9C B0 FF 00 FC */ sth r7, 0xfc(r31) +/* 80099E60 00096DA0 A8 E3 00 00 */ lha r7, 0(r3) +/* 80099E64 00096DA4 7D 27 2A 14 */ add r9, r7, r5 +/* 80099E68 00096DA8 7C E0 48 51 */ subf. r7, r0, r9 +/* 80099E6C 00096DAC 40 80 00 0C */ bge lbl_80099E78 +/* 80099E70 00096DB0 7C E0 48 50 */ subf r7, r0, r9 +/* 80099E74 00096DB4 48 00 00 08 */ b lbl_80099E7C +lbl_80099E78: +/* 80099E78 00096DB8 38 E0 00 00 */ li r7, 0 +lbl_80099E7C: +/* 80099E7C 00096DBC 7D 47 5B D6 */ divw r10, r7, r11 +/* 80099E80 00096DC0 38 FF 01 08 */ addi r7, r31, 0x108 +/* 80099E84 00096DC4 A1 3F 01 08 */ lhz r9, 0x108(r31) +/* 80099E88 00096DC8 7D 2A 48 50 */ subf r9, r10, r9 +/* 80099E8C 00096DCC B1 3F 00 FE */ sth r9, 0xfe(r31) +/* 80099E90 00096DD0 A8 C6 00 00 */ lha r6, 0(r6) +/* 80099E94 00096DD4 A9 23 00 00 */ lha r9, 0(r3) +/* 80099E98 00096DD8 7C C6 2A 14 */ add r6, r6, r5 +/* 80099E9C 00096DDC 7C C9 32 14 */ add r6, r9, r6 +/* 80099EA0 00096DE0 7C 6C 30 51 */ subf. r3, r12, r6 +/* 80099EA4 00096DE4 40 81 00 0C */ ble lbl_80099EB0 +/* 80099EA8 00096DE8 7C CC 30 50 */ subf r6, r12, r6 +/* 80099EAC 00096DEC 48 00 00 08 */ b lbl_80099EB4 +lbl_80099EB0: +/* 80099EB0 00096DF0 38 C0 00 00 */ li r6, 0 +lbl_80099EB4: +/* 80099EB4 00096DF4 7C A9 2A 14 */ add r5, r9, r5 +/* 80099EB8 00096DF8 7C 60 28 51 */ subf. r3, r0, r5 +/* 80099EBC 00096DFC 40 80 00 0C */ bge lbl_80099EC8 +/* 80099EC0 00096E00 7C 00 28 50 */ subf r0, r0, r5 +/* 80099EC4 00096E04 48 00 00 08 */ b lbl_80099ECC +lbl_80099EC8: +/* 80099EC8 00096E08 38 00 00 00 */ li r0, 0 +lbl_80099ECC: +/* 80099ECC 00096E0C 7C 00 5B D6 */ divw r0, r0, r11 +/* 80099ED0 00096E10 A0 7F 01 0C */ lhz r3, 0x10c(r31) +/* 80099ED4 00096E14 7C 03 02 14 */ add r0, r3, r0 +/* 80099ED8 00096E18 7C A6 5B D6 */ divw r5, r6, r11 +/* 80099EDC 00096E1C 7C 05 00 50 */ subf r0, r5, r0 +/* 80099EE0 00096E20 B0 1F 01 00 */ sth r0, 0x100(r31) +/* 80099EE4 00096E24 39 20 02 80 */ li r9, 0x280 +/* 80099EE8 00096E28 3B 80 00 00 */ li r28, 0 +/* 80099EEC 00096E2C B1 3F 01 02 */ sth r9, 0x102(r31) +/* 80099EF0 00096E30 38 A0 00 28 */ li r5, 0x28 +/* 80099EF4 00096E34 38 00 00 01 */ li r0, 1 +/* 80099EF8 00096E38 A0 C4 00 00 */ lhz r6, 0(r4) +/* 80099EFC 00096E3C 38 6D 94 48 */ addi r3, r13, retraceQueue@sda21 +/* 80099F00 00096E40 54 C6 0C 3C */ rlwinm r6, r6, 1, 0x10, 0x1e +/* 80099F04 00096E44 B0 DF 01 04 */ sth r6, 0x104(r31) +/* 80099F08 00096E48 B3 9F 01 06 */ sth r28, 0x106(r31) +/* 80099F0C 00096E4C B3 87 00 00 */ sth r28, 0(r7) +/* 80099F10 00096E50 B1 3F 01 0A */ sth r9, 0x10a(r31) +/* 80099F14 00096E54 A0 84 00 00 */ lhz r4, 0(r4) +/* 80099F18 00096E58 54 84 0C 3C */ rlwinm r4, r4, 1, 0x10, 0x1e +/* 80099F1C 00096E5C B0 9F 01 0C */ sth r4, 0x10c(r31) +/* 80099F20 00096E60 93 88 00 00 */ stw r28, 0(r8) +/* 80099F24 00096E64 98 BF 01 1C */ stb r5, 0x11c(r31) +/* 80099F28 00096E68 98 BF 01 1D */ stb r5, 0x11d(r31) +/* 80099F2C 00096E6C 98 BF 01 1E */ stb r5, 0x11e(r31) +/* 80099F30 00096E70 9B 9F 01 2C */ stb r28, 0x12c(r31) +/* 80099F34 00096E74 90 1F 01 30 */ stw r0, 0x130(r31) +/* 80099F38 00096E78 93 9F 01 34 */ stw r28, 0x134(r31) +/* 80099F3C 00096E7C 4B FF 8D 3D */ bl OSInitThreadQueue +/* 80099F40 00096E80 3C 60 CC 00 */ lis r3, 0xCC002030@ha +/* 80099F44 00096E84 A0 03 20 30 */ lhz r0, 0xCC002030@l(r3) +/* 80099F48 00096E88 38 83 20 00 */ addi r4, r3, 0x2000 +/* 80099F4C 00096E8C 38 A3 20 00 */ addi r5, r3, 0x2000 +/* 80099F50 00096E90 54 00 04 7E */ clrlwi r0, r0, 0x11 +/* 80099F54 00096E94 B0 04 00 30 */ sth r0, 0x30(r4) +/* 80099F58 00096E98 3C 60 80 0A */ lis r3, __VIRetraceHandler@ha +/* 80099F5C 00096E9C 38 83 96 38 */ addi r4, r3, __VIRetraceHandler@l +/* 80099F60 00096EA0 A0 05 00 34 */ lhz r0, 0x34(r5) +/* 80099F64 00096EA4 38 60 00 18 */ li r3, 0x18 +/* 80099F68 00096EA8 54 00 04 7E */ clrlwi r0, r0, 0x11 +/* 80099F6C 00096EAC B0 05 00 34 */ sth r0, 0x34(r5) +/* 80099F70 00096EB0 93 8D 94 50 */ stw r28, PreCB@sda21(r13) +/* 80099F74 00096EB4 93 8D 94 54 */ stw r28, PostCB@sda21(r13) +/* 80099F78 00096EB8 4B FF 62 A1 */ bl __OSSetInterruptHandler +/* 80099F7C 00096EBC 38 60 00 80 */ li r3, 0x80 +/* 80099F80 00096EC0 4B FF 66 9D */ bl __OSUnmaskInterrupts +/* 80099F84 00096EC4 80 01 00 1C */ lwz r0, 0x1c(r1) +/* 80099F88 00096EC8 83 E1 00 14 */ lwz r31, 0x14(r1) +/* 80099F8C 00096ECC 83 C1 00 10 */ lwz r30, 0x10(r1) +/* 80099F90 00096ED0 83 A1 00 0C */ lwz r29, 0xc(r1) +/* 80099F94 00096ED4 83 81 00 08 */ lwz r28, 8(r1) +/* 80099F98 00096ED8 38 21 00 18 */ addi r1, r1, 0x18 +/* 80099F9C 00096EDC 7C 08 03 A6 */ mtlr r0 +/* 80099FA0 00096EE0 4E 80 00 20 */ blr + +.global VIWaitForRetrace +VIWaitForRetrace: +/* 80099FA4 00096EE4 7C 08 02 A6 */ mflr r0 +/* 80099FA8 00096EE8 90 01 00 04 */ stw r0, 4(r1) +/* 80099FAC 00096EEC 94 21 FF F0 */ stwu r1, -0x10(r1) +/* 80099FB0 00096EF0 93 E1 00 0C */ stw r31, 0xc(r1) +/* 80099FB4 00096EF4 93 C1 00 08 */ stw r30, 8(r1) +/* 80099FB8 00096EF8 4B FF 62 15 */ bl OSDisableInterrupts +/* 80099FBC 00096EFC 83 CD 94 40 */ lwz r30, retraceCount@sda21(r13) +/* 80099FC0 00096F00 7C 7F 1B 78 */ mr r31, r3 +lbl_80099FC4: +/* 80099FC4 00096F04 38 6D 94 48 */ addi r3, r13, retraceQueue@sda21 +/* 80099FC8 00096F08 4B FF 9C 39 */ bl OSSleepThread +/* 80099FCC 00096F0C 80 0D 94 40 */ lwz r0, retraceCount@sda21(r13) +/* 80099FD0 00096F10 7C 1E 00 40 */ cmplw r30, r0 +/* 80099FD4 00096F14 41 82 FF F0 */ beq lbl_80099FC4 +/* 80099FD8 00096F18 7F E3 FB 78 */ mr r3, r31 +/* 80099FDC 00096F1C 4B FF 62 19 */ bl OSRestoreInterrupts +/* 80099FE0 00096F20 80 01 00 14 */ lwz r0, 0x14(r1) +/* 80099FE4 00096F24 83 E1 00 0C */ lwz r31, 0xc(r1) +/* 80099FE8 00096F28 83 C1 00 08 */ lwz r30, 8(r1) +/* 80099FEC 00096F2C 38 21 00 10 */ addi r1, r1, 0x10 +/* 80099FF0 00096F30 7C 08 03 A6 */ mtlr r0 +/* 80099FF4 00096F34 4E 80 00 20 */ blr + +.global setFbbRegs +setFbbRegs: +/* 80099FF8 00096F38 94 21 FF B8 */ stwu r1, -0x48(r1) +/* 80099FFC 00096F3C 3D 20 80 3F */ lis r9, regs@ha +/* 8009A000 00096F40 39 29 BD C8 */ addi r9, r9, regs@l +/* 8009A004 00096F44 93 E1 00 44 */ stw r31, 0x44(r1) +/* 8009A008 00096F48 89 03 00 2C */ lbz r8, 0x2c(r3) +/* 8009A00C 00096F4C A0 03 00 0E */ lhz r0, 0xe(r3) +/* 8009A010 00096F50 55 1F 28 34 */ slwi r31, r8, 5 +/* 8009A014 00096F54 A1 03 00 16 */ lhz r8, 0x16(r3) +/* 8009A018 00096F58 7C 1F 01 D6 */ mullw r0, r31, r0 +/* 8009A01C 00096F5C 81 63 00 20 */ lwz r11, 0x20(r3) +/* 8009A020 00096F60 81 43 00 30 */ lwz r10, 0x30(r3) +/* 8009A024 00096F64 A1 83 00 0A */ lhz r12, 0xa(r3) +/* 8009A028 00096F68 55 08 08 34 */ rlwinm r8, r8, 1, 0, 0x1a +/* 8009A02C 00096F6C 7C 08 02 14 */ add r0, r8, r0 +/* 8009A030 00096F70 7C 0A 02 14 */ add r0, r10, r0 +/* 8009A034 00096F74 2C 0B 00 00 */ cmpwi r11, 0 +/* 8009A038 00096F78 90 04 00 00 */ stw r0, 0(r4) +/* 8009A03C 00096F7C 40 82 00 0C */ bne lbl_8009A048 +/* 8009A040 00096F80 81 04 00 00 */ lwz r8, 0(r4) +/* 8009A044 00096F84 48 00 00 0C */ b lbl_8009A050 +lbl_8009A048: +/* 8009A048 00096F88 80 04 00 00 */ lwz r0, 0(r4) +/* 8009A04C 00096F8C 7D 00 FA 14 */ add r8, r0, r31 +lbl_8009A050: +/* 8009A050 00096F90 7D 80 0E 70 */ srawi r0, r12, 1 +/* 8009A054 00096F94 91 05 00 00 */ stw r8, 0(r5) +/* 8009A058 00096F98 7C 00 01 94 */ addze r0, r0 +/* 8009A05C 00096F9C 54 00 08 3C */ slwi r0, r0, 1 +/* 8009A060 00096FA0 7C 00 60 10 */ subfc r0, r0, r12 +/* 8009A064 00096FA4 2C 00 00 01 */ cmpwi r0, 1 +/* 8009A068 00096FA8 40 82 00 14 */ bne lbl_8009A07C +/* 8009A06C 00096FAC 81 04 00 00 */ lwz r8, 0(r4) +/* 8009A070 00096FB0 80 05 00 00 */ lwz r0, 0(r5) +/* 8009A074 00096FB4 90 04 00 00 */ stw r0, 0(r4) +/* 8009A078 00096FB8 91 05 00 00 */ stw r8, 0(r5) +lbl_8009A07C: +/* 8009A07C 00096FBC 80 04 00 00 */ lwz r0, 0(r4) +/* 8009A080 00096FC0 54 00 00 BE */ clrlwi r0, r0, 2 +/* 8009A084 00096FC4 90 04 00 00 */ stw r0, 0(r4) +/* 8009A088 00096FC8 80 05 00 00 */ lwz r0, 0(r5) +/* 8009A08C 00096FCC 54 00 00 BE */ clrlwi r0, r0, 2 +/* 8009A090 00096FD0 90 05 00 00 */ stw r0, 0(r5) +/* 8009A094 00096FD4 80 03 00 44 */ lwz r0, 0x44(r3) +/* 8009A098 00096FD8 2C 00 00 00 */ cmpwi r0, 0 +/* 8009A09C 00096FDC 41 82 00 90 */ beq lbl_8009A12C +/* 8009A0A0 00096FE0 89 03 00 2C */ lbz r8, 0x2c(r3) +/* 8009A0A4 00096FE4 A0 03 00 0E */ lhz r0, 0xe(r3) +/* 8009A0A8 00096FE8 55 1F 28 34 */ slwi r31, r8, 5 +/* 8009A0AC 00096FEC A1 03 00 16 */ lhz r8, 0x16(r3) +/* 8009A0B0 00096FF0 7C 1F 01 D6 */ mullw r0, r31, r0 +/* 8009A0B4 00096FF4 81 63 00 20 */ lwz r11, 0x20(r3) +/* 8009A0B8 00096FF8 81 43 00 48 */ lwz r10, 0x48(r3) +/* 8009A0BC 00096FFC A1 83 00 0A */ lhz r12, 0xa(r3) +/* 8009A0C0 00097000 55 08 08 34 */ rlwinm r8, r8, 1, 0, 0x1a +/* 8009A0C4 00097004 7C 08 02 14 */ add r0, r8, r0 +/* 8009A0C8 00097008 7C 0A 02 14 */ add r0, r10, r0 +/* 8009A0CC 0009700C 2C 0B 00 00 */ cmpwi r11, 0 +/* 8009A0D0 00097010 90 06 00 00 */ stw r0, 0(r6) +/* 8009A0D4 00097014 40 82 00 0C */ bne lbl_8009A0E0 +/* 8009A0D8 00097018 81 06 00 00 */ lwz r8, 0(r6) +/* 8009A0DC 0009701C 48 00 00 0C */ b lbl_8009A0E8 +lbl_8009A0E0: +/* 8009A0E0 00097020 80 06 00 00 */ lwz r0, 0(r6) +/* 8009A0E4 00097024 7D 00 FA 14 */ add r8, r0, r31 +lbl_8009A0E8: +/* 8009A0E8 00097028 7D 80 0E 70 */ srawi r0, r12, 1 +/* 8009A0EC 0009702C 91 07 00 00 */ stw r8, 0(r7) +/* 8009A0F0 00097030 7C 00 01 94 */ addze r0, r0 +/* 8009A0F4 00097034 54 00 08 3C */ slwi r0, r0, 1 +/* 8009A0F8 00097038 7C 00 60 10 */ subfc r0, r0, r12 +/* 8009A0FC 0009703C 2C 00 00 01 */ cmpwi r0, 1 +/* 8009A100 00097040 40 82 00 14 */ bne lbl_8009A114 +/* 8009A104 00097044 81 06 00 00 */ lwz r8, 0(r6) +/* 8009A108 00097048 80 07 00 00 */ lwz r0, 0(r7) +/* 8009A10C 0009704C 90 06 00 00 */ stw r0, 0(r6) +/* 8009A110 00097050 91 07 00 00 */ stw r8, 0(r7) +lbl_8009A114: +/* 8009A114 00097054 80 06 00 00 */ lwz r0, 0(r6) +/* 8009A118 00097058 54 00 00 BE */ clrlwi r0, r0, 2 +/* 8009A11C 0009705C 90 06 00 00 */ stw r0, 0(r6) +/* 8009A120 00097060 80 07 00 00 */ lwz r0, 0(r7) +/* 8009A124 00097064 54 00 00 BE */ clrlwi r0, r0, 2 +/* 8009A128 00097068 90 07 00 00 */ stw r0, 0(r7) +lbl_8009A12C: +/* 8009A12C 0009706C 80 04 00 00 */ lwz r0, 0(r4) +/* 8009A130 00097070 3D 00 01 00 */ lis r8, 0x100 +/* 8009A134 00097074 7C 00 40 40 */ cmplw r0, r8 +/* 8009A138 00097078 40 80 00 30 */ bge lbl_8009A168 +/* 8009A13C 0009707C 80 05 00 00 */ lwz r0, 0(r5) +/* 8009A140 00097080 7C 00 40 40 */ cmplw r0, r8 +/* 8009A144 00097084 40 80 00 24 */ bge lbl_8009A168 +/* 8009A148 00097088 80 06 00 00 */ lwz r0, 0(r6) +/* 8009A14C 0009708C 7C 00 40 40 */ cmplw r0, r8 +/* 8009A150 00097090 40 80 00 18 */ bge lbl_8009A168 +/* 8009A154 00097094 80 07 00 00 */ lwz r0, 0(r7) +/* 8009A158 00097098 7C 00 40 40 */ cmplw r0, r8 +/* 8009A15C 0009709C 40 80 00 0C */ bge lbl_8009A168 +/* 8009A160 000970A0 39 40 00 00 */ li r10, 0 +/* 8009A164 000970A4 48 00 00 08 */ b lbl_8009A16C +lbl_8009A168: +/* 8009A168 000970A8 39 40 00 01 */ li r10, 1 +lbl_8009A16C: +/* 8009A16C 000970AC 28 0A 00 00 */ cmplwi r10, 0 +/* 8009A170 000970B0 41 82 00 34 */ beq lbl_8009A1A4 +/* 8009A174 000970B4 80 04 00 00 */ lwz r0, 0(r4) +/* 8009A178 000970B8 54 00 D9 7E */ srwi r0, r0, 5 +/* 8009A17C 000970BC 90 04 00 00 */ stw r0, 0(r4) +/* 8009A180 000970C0 80 05 00 00 */ lwz r0, 0(r5) +/* 8009A184 000970C4 54 00 D9 7E */ srwi r0, r0, 5 +/* 8009A188 000970C8 90 05 00 00 */ stw r0, 0(r5) +/* 8009A18C 000970CC 80 06 00 00 */ lwz r0, 0(r6) +/* 8009A190 000970D0 54 00 D9 7E */ srwi r0, r0, 5 +/* 8009A194 000970D4 90 06 00 00 */ stw r0, 0(r6) +/* 8009A198 000970D8 80 07 00 00 */ lwz r0, 0(r7) +/* 8009A19C 000970DC 54 00 D9 7E */ srwi r0, r0, 5 +/* 8009A1A0 000970E0 90 07 00 00 */ stw r0, 0(r7) +lbl_8009A1A4: +/* 8009A1A4 000970E4 80 04 00 00 */ lwz r0, 0(r4) +/* 8009A1A8 000970E8 55 4B 60 26 */ slwi r11, r10, 0xc +/* 8009A1AC 000970EC 3D 00 00 01 */ lis r8, 1 +/* 8009A1B0 000970F0 B0 09 00 1E */ sth r0, 0x1e(r9) +/* 8009A1B4 000970F4 3C 00 00 02 */ lis r0, 2 +/* 8009A1B8 000970F8 81 4D 94 68 */ lwz r10, changed@sda21(r13) +/* 8009A1BC 000970FC 81 8D 94 6C */ lwz r12, lbl_80409F2C@sda21(r13) +/* 8009A1C0 00097100 7D 4A 43 78 */ or r10, r10, r8 +/* 8009A1C4 00097104 91 8D 94 6C */ stw r12, lbl_80409F2C@sda21(r13) +/* 8009A1C8 00097108 91 4D 94 68 */ stw r10, changed@sda21(r13) +/* 8009A1CC 0009710C 81 44 00 00 */ lwz r10, 0(r4) +/* 8009A1D0 00097110 88 83 00 3C */ lbz r4, 0x3c(r3) +/* 8009A1D4 00097114 55 4A 84 3E */ srwi r10, r10, 0x10 +/* 8009A1D8 00097118 54 84 40 2E */ slwi r4, r4, 8 +/* 8009A1DC 0009711C 7D 44 23 78 */ or r4, r10, r4 +/* 8009A1E0 00097120 7D 64 23 78 */ or r4, r11, r4 +/* 8009A1E4 00097124 B0 89 00 1C */ sth r4, 0x1c(r9) +/* 8009A1E8 00097128 80 8D 94 68 */ lwz r4, changed@sda21(r13) +/* 8009A1EC 0009712C 81 4D 94 6C */ lwz r10, lbl_80409F2C@sda21(r13) +/* 8009A1F0 00097130 7C 80 03 78 */ or r0, r4, r0 +/* 8009A1F4 00097134 91 4D 94 6C */ stw r10, lbl_80409F2C@sda21(r13) +/* 8009A1F8 00097138 90 0D 94 68 */ stw r0, changed@sda21(r13) +/* 8009A1FC 0009713C 80 05 00 00 */ lwz r0, 0(r5) +/* 8009A200 00097140 B0 09 00 26 */ sth r0, 0x26(r9) +/* 8009A204 00097144 80 0D 94 68 */ lwz r0, changed@sda21(r13) +/* 8009A208 00097148 80 8D 94 6C */ lwz r4, lbl_80409F2C@sda21(r13) +/* 8009A20C 0009714C 60 00 10 00 */ ori r0, r0, 0x1000 +/* 8009A210 00097150 90 8D 94 6C */ stw r4, lbl_80409F2C@sda21(r13) +/* 8009A214 00097154 90 0D 94 68 */ stw r0, changed@sda21(r13) +/* 8009A218 00097158 80 05 00 00 */ lwz r0, 0(r5) +/* 8009A21C 0009715C 54 00 84 3E */ srwi r0, r0, 0x10 +/* 8009A220 00097160 B0 09 00 24 */ sth r0, 0x24(r9) +/* 8009A224 00097164 80 0D 94 68 */ lwz r0, changed@sda21(r13) +/* 8009A228 00097168 80 8D 94 6C */ lwz r4, lbl_80409F2C@sda21(r13) +/* 8009A22C 0009716C 60 00 20 00 */ ori r0, r0, 0x2000 +/* 8009A230 00097170 90 8D 94 6C */ stw r4, lbl_80409F2C@sda21(r13) +/* 8009A234 00097174 90 0D 94 68 */ stw r0, changed@sda21(r13) +/* 8009A238 00097178 80 03 00 44 */ lwz r0, 0x44(r3) +/* 8009A23C 0009717C 2C 00 00 00 */ cmpwi r0, 0 +/* 8009A240 00097180 41 82 00 80 */ beq lbl_8009A2C0 +/* 8009A244 00097184 80 66 00 00 */ lwz r3, 0(r6) +/* 8009A248 00097188 38 08 80 00 */ addi r0, r8, -32768 +/* 8009A24C 0009718C B0 69 00 22 */ sth r3, 0x22(r9) +/* 8009A250 00097190 80 6D 94 68 */ lwz r3, changed@sda21(r13) +/* 8009A254 00097194 80 8D 94 6C */ lwz r4, lbl_80409F2C@sda21(r13) +/* 8009A258 00097198 60 63 40 00 */ ori r3, r3, 0x4000 +/* 8009A25C 0009719C 90 8D 94 6C */ stw r4, lbl_80409F2C@sda21(r13) +/* 8009A260 000971A0 90 6D 94 68 */ stw r3, changed@sda21(r13) +/* 8009A264 000971A4 80 66 00 00 */ lwz r3, 0(r6) +/* 8009A268 000971A8 54 63 84 3E */ srwi r3, r3, 0x10 +/* 8009A26C 000971AC B0 69 00 20 */ sth r3, 0x20(r9) +/* 8009A270 000971B0 80 6D 94 68 */ lwz r3, changed@sda21(r13) +/* 8009A274 000971B4 80 8D 94 6C */ lwz r4, lbl_80409F2C@sda21(r13) +/* 8009A278 000971B8 7C 60 03 78 */ or r0, r3, r0 +/* 8009A27C 000971BC 90 8D 94 6C */ stw r4, lbl_80409F2C@sda21(r13) +/* 8009A280 000971C0 90 0D 94 68 */ stw r0, changed@sda21(r13) +/* 8009A284 000971C4 80 07 00 00 */ lwz r0, 0(r7) +/* 8009A288 000971C8 B0 09 00 2A */ sth r0, 0x2a(r9) +/* 8009A28C 000971CC 80 0D 94 68 */ lwz r0, changed@sda21(r13) +/* 8009A290 000971D0 80 6D 94 6C */ lwz r3, lbl_80409F2C@sda21(r13) +/* 8009A294 000971D4 60 00 04 00 */ ori r0, r0, 0x400 +/* 8009A298 000971D8 90 6D 94 6C */ stw r3, lbl_80409F2C@sda21(r13) +/* 8009A29C 000971DC 90 0D 94 68 */ stw r0, changed@sda21(r13) +/* 8009A2A0 000971E0 80 07 00 00 */ lwz r0, 0(r7) +/* 8009A2A4 000971E4 54 00 84 3E */ srwi r0, r0, 0x10 +/* 8009A2A8 000971E8 B0 09 00 28 */ sth r0, 0x28(r9) +/* 8009A2AC 000971EC 80 0D 94 68 */ lwz r0, changed@sda21(r13) +/* 8009A2B0 000971F0 80 6D 94 6C */ lwz r3, lbl_80409F2C@sda21(r13) +/* 8009A2B4 000971F4 60 00 08 00 */ ori r0, r0, 0x800 +/* 8009A2B8 000971F8 90 6D 94 6C */ stw r3, lbl_80409F2C@sda21(r13) +/* 8009A2BC 000971FC 90 0D 94 68 */ stw r0, changed@sda21(r13) +lbl_8009A2C0: +/* 8009A2C0 00097200 83 E1 00 44 */ lwz r31, 0x44(r1) +/* 8009A2C4 00097204 38 21 00 48 */ addi r1, r1, 0x48 +/* 8009A2C8 00097208 4E 80 00 20 */ blr + +.global setVerticalRegs +setVerticalRegs: +/* 8009A2CC 0009720C 94 21 FF D8 */ stwu r1, -0x28(r1) +/* 8009A2D0 00097210 54 A0 06 3E */ clrlwi r0, r5, 0x18 +/* 8009A2D4 00097214 3D 60 80 3F */ lis r11, regs@ha +/* 8009A2D8 00097218 93 E1 00 24 */ stw r31, 0x24(r1) +/* 8009A2DC 0009721C 28 00 00 0A */ cmplwi r0, 0xa +/* 8009A2E0 00097220 83 E1 00 30 */ lwz r31, 0x30(r1) +/* 8009A2E4 00097224 39 6B BD C8 */ addi r11, r11, regs@l +/* 8009A2E8 00097228 93 C1 00 20 */ stw r30, 0x20(r1) +/* 8009A2EC 0009722C 93 A1 00 1C */ stw r29, 0x1c(r1) +/* 8009A2F0 00097230 41 80 00 10 */ blt lbl_8009A300 +/* 8009A2F4 00097234 39 80 00 01 */ li r12, 1 +/* 8009A2F8 00097238 3B A0 00 02 */ li r29, 2 +/* 8009A2FC 0009723C 48 00 00 0C */ b lbl_8009A308 +lbl_8009A300: +/* 8009A300 00097240 39 80 00 02 */ li r12, 2 +/* 8009A304 00097244 3B A0 00 01 */ li r29, 1 +lbl_8009A308: +/* 8009A308 00097248 54 7E 04 3E */ clrlwi r30, r3, 0x10 +/* 8009A30C 0009724C 7F C0 0E 70 */ srawi r0, r30, 1 +/* 8009A310 00097250 7C 00 01 94 */ addze r0, r0 +/* 8009A314 00097254 54 00 08 3C */ slwi r0, r0, 1 +/* 8009A318 00097258 7C 00 F0 11 */ subfc. r0, r0, r30 +/* 8009A31C 0009725C 40 82 00 3C */ bne lbl_8009A358 +/* 8009A320 00097260 55 83 04 3E */ clrlwi r3, r12, 0x10 +/* 8009A324 00097264 54 C0 04 3E */ clrlwi r0, r6, 0x10 +/* 8009A328 00097268 7C 03 01 D6 */ mullw r0, r3, r0 +/* 8009A32C 0009726C 54 83 04 3E */ clrlwi r3, r4, 0x10 +/* 8009A330 00097270 7C 03 00 50 */ subf r0, r3, r0 +/* 8009A334 00097274 57 A3 04 3E */ clrlwi r3, r29, 0x10 +/* 8009A338 00097278 7F A3 F1 D6 */ mullw r29, r3, r30 +/* 8009A33C 0009727C 7C 1E 00 50 */ subf r0, r30, r0 +/* 8009A340 00097280 7F C3 01 D6 */ mullw r30, r3, r0 +/* 8009A344 00097284 7C 07 EA 14 */ add r0, r7, r29 +/* 8009A348 00097288 7C C9 F2 14 */ add r6, r9, r30 +/* 8009A34C 0009728C 7C 68 EA 14 */ add r3, r8, r29 +/* 8009A350 00097290 7C EA F2 14 */ add r7, r10, r30 +/* 8009A354 00097294 48 00 00 38 */ b lbl_8009A38C +lbl_8009A358: +/* 8009A358 00097298 55 83 04 3E */ clrlwi r3, r12, 0x10 +/* 8009A35C 0009729C 54 C0 04 3E */ clrlwi r0, r6, 0x10 +/* 8009A360 000972A0 7C 03 01 D6 */ mullw r0, r3, r0 +/* 8009A364 000972A4 54 83 04 3E */ clrlwi r3, r4, 0x10 +/* 8009A368 000972A8 7C 03 00 50 */ subf r0, r3, r0 +/* 8009A36C 000972AC 57 A3 04 3E */ clrlwi r3, r29, 0x10 +/* 8009A370 000972B0 7F A3 F1 D6 */ mullw r29, r3, r30 +/* 8009A374 000972B4 7C 1E 00 50 */ subf r0, r30, r0 +/* 8009A378 000972B8 7F C3 01 D6 */ mullw r30, r3, r0 +/* 8009A37C 000972BC 7C 08 EA 14 */ add r0, r8, r29 +/* 8009A380 000972C0 7C CA F2 14 */ add r6, r10, r30 +/* 8009A384 000972C4 7C 67 EA 14 */ add r3, r7, r29 +/* 8009A388 000972C8 7C E9 F2 14 */ add r7, r9, r30 +lbl_8009A38C: +/* 8009A38C 000972CC 54 88 04 3E */ clrlwi r8, r4, 0x10 +/* 8009A390 000972D0 55 84 04 3E */ clrlwi r4, r12, 0x10 +/* 8009A394 000972D4 7C 88 23 D6 */ divw r4, r8, r4 +/* 8009A398 000972D8 2C 1F 00 00 */ cmpwi r31, 0 +/* 8009A39C 000972DC 54 84 04 3E */ clrlwi r4, r4, 0x10 +/* 8009A3A0 000972E0 41 82 00 20 */ beq lbl_8009A3C0 +/* 8009A3A4 000972E4 54 84 08 3C */ slwi r4, r4, 1 +/* 8009A3A8 000972E8 38 84 FF FE */ addi r4, r4, -2 +/* 8009A3AC 000972EC 7C 00 22 14 */ add r0, r0, r4 +/* 8009A3B0 000972F0 7C 63 22 14 */ add r3, r3, r4 +/* 8009A3B4 000972F4 38 80 00 00 */ li r4, 0 +/* 8009A3B8 000972F8 38 C6 00 02 */ addi r6, r6, 2 +/* 8009A3BC 000972FC 38 E7 00 02 */ addi r7, r7, 2 +lbl_8009A3C0: +/* 8009A3C0 00097300 54 A5 06 3E */ clrlwi r5, r5, 0x18 +/* 8009A3C4 00097304 54 84 23 36 */ rlwinm r4, r4, 4, 0xc, 0x1b +/* 8009A3C8 00097308 7C A4 23 78 */ or r4, r5, r4 +/* 8009A3CC 0009730C B0 8B 00 00 */ sth r4, 0(r11) +/* 8009A3D0 00097310 3C 80 80 00 */ lis r4, 0x8000 +/* 8009A3D4 00097314 3D 20 01 00 */ lis r9, 0x100 +/* 8009A3D8 00097318 80 AD 94 68 */ lwz r5, changed@sda21(r13) +/* 8009A3DC 0009731C 3D 00 02 00 */ lis r8, 0x200 +/* 8009A3E0 00097320 81 4D 94 6C */ lwz r10, lbl_80409F2C@sda21(r13) +/* 8009A3E4 00097324 7C A4 23 78 */ or r4, r5, r4 +/* 8009A3E8 00097328 3C A0 00 40 */ lis r5, 0x40 +/* 8009A3EC 0009732C 91 4D 94 6C */ stw r10, lbl_80409F2C@sda21(r13) +/* 8009A3F0 00097330 90 8D 94 68 */ stw r4, changed@sda21(r13) +/* 8009A3F4 00097334 3C 80 00 80 */ lis r4, 0x80 +/* 8009A3F8 00097338 B0 0B 00 0E */ sth r0, 0xe(r11) +/* 8009A3FC 0009733C 80 0D 94 68 */ lwz r0, changed@sda21(r13) +/* 8009A400 00097340 81 4D 94 6C */ lwz r10, lbl_80409F2C@sda21(r13) +/* 8009A404 00097344 7C 00 4B 78 */ or r0, r0, r9 +/* 8009A408 00097348 91 4D 94 6C */ stw r10, lbl_80409F2C@sda21(r13) +/* 8009A40C 0009734C 90 0D 94 68 */ stw r0, changed@sda21(r13) +/* 8009A410 00097350 B0 CB 00 0C */ sth r6, 0xc(r11) +/* 8009A414 00097354 80 0D 94 68 */ lwz r0, changed@sda21(r13) +/* 8009A418 00097358 80 CD 94 6C */ lwz r6, lbl_80409F2C@sda21(r13) +/* 8009A41C 0009735C 7C 00 43 78 */ or r0, r0, r8 +/* 8009A420 00097360 90 CD 94 6C */ stw r6, lbl_80409F2C@sda21(r13) +/* 8009A424 00097364 90 0D 94 68 */ stw r0, changed@sda21(r13) +/* 8009A428 00097368 B0 6B 00 12 */ sth r3, 0x12(r11) +/* 8009A42C 0009736C 80 0D 94 68 */ lwz r0, changed@sda21(r13) +/* 8009A430 00097370 80 6D 94 6C */ lwz r3, lbl_80409F2C@sda21(r13) +/* 8009A434 00097374 7C 00 2B 78 */ or r0, r0, r5 +/* 8009A438 00097378 90 6D 94 6C */ stw r3, lbl_80409F2C@sda21(r13) +/* 8009A43C 0009737C 90 0D 94 68 */ stw r0, changed@sda21(r13) +/* 8009A440 00097380 B0 EB 00 10 */ sth r7, 0x10(r11) +/* 8009A444 00097384 80 0D 94 68 */ lwz r0, changed@sda21(r13) +/* 8009A448 00097388 80 6D 94 6C */ lwz r3, lbl_80409F2C@sda21(r13) +/* 8009A44C 0009738C 7C 00 23 78 */ or r0, r0, r4 +/* 8009A450 00097390 90 6D 94 6C */ stw r3, lbl_80409F2C@sda21(r13) +/* 8009A454 00097394 90 0D 94 68 */ stw r0, changed@sda21(r13) +/* 8009A458 00097398 83 E1 00 24 */ lwz r31, 0x24(r1) +/* 8009A45C 0009739C 83 C1 00 20 */ lwz r30, 0x20(r1) +/* 8009A460 000973A0 83 A1 00 1C */ lwz r29, 0x1c(r1) +/* 8009A464 000973A4 38 21 00 28 */ addi r1, r1, 0x28 +/* 8009A468 000973A8 4E 80 00 20 */ blr + +.global VIConfigure +VIConfigure: +/* 8009A46C 000973AC 7C 08 02 A6 */ mflr r0 +/* 8009A470 000973B0 3C A0 80 3B */ lis r5, timing@ha +/* 8009A474 000973B4 90 01 00 04 */ stw r0, 4(r1) +/* 8009A478 000973B8 3C 80 80 3F */ lis r4, regs@ha +/* 8009A47C 000973BC 94 21 FF 88 */ stwu r1, -0x78(r1) +/* 8009A480 000973C0 BD C1 00 30 */ stmw r14, 0x30(r1) +/* 8009A484 000973C4 3B E3 00 00 */ addi r31, r3, 0 +/* 8009A488 000973C8 39 E5 0F 30 */ addi r15, r5, timing@l +/* 8009A48C 000973CC 3B A4 BD C8 */ addi r29, r4, regs@l +/* 8009A490 000973D0 4B FF 5D 3D */ bl OSDisableInterrupts +/* 8009A494 000973D4 80 9F 00 00 */ lwz r4, 0(r31) +/* 8009A498 000973D8 3B 9D 01 14 */ addi r28, r29, 0x114 +/* 8009A49C 000973DC 80 1D 01 14 */ lwz r0, 0x114(r29) +/* 8009A4A0 000973E0 39 C3 00 00 */ addi r14, r3, 0 +/* 8009A4A4 000973E4 54 84 07 BE */ clrlwi r4, r4, 0x1e +/* 8009A4A8 000973E8 7C 00 20 40 */ cmplw r0, r4 +/* 8009A4AC 000973EC 41 82 00 10 */ beq lbl_8009A4BC +/* 8009A4B0 000973F0 38 00 00 01 */ li r0, 1 +/* 8009A4B4 000973F4 90 0D 94 60 */ stw r0, changeMode@sda21(r13) +/* 8009A4B8 000973F8 90 9C 00 00 */ stw r4, 0(r28) +lbl_8009A4BC: +/* 8009A4BC 000973FC 80 1F 00 00 */ lwz r0, 0(r31) +/* 8009A4C0 00097400 3C 60 80 00 */ lis r3, 0x800000CC@ha +/* 8009A4C4 00097404 82 23 00 CC */ lwz r17, 0x800000CC@l(r3) +/* 8009A4C8 00097408 54 10 F0 BE */ srwi r16, r0, 2 +/* 8009A4CC 0009740C 28 10 00 04 */ cmplwi r16, 4 +/* 8009A4D0 00097410 40 82 00 6C */ bne lbl_8009A53C +/* 8009A4D4 00097414 80 0D 94 8C */ lwz r0, message$332@sda21(r13) +/* 8009A4D8 00097418 28 00 00 00 */ cmplwi r0, 0 +/* 8009A4DC 0009741C 40 82 00 60 */ bne lbl_8009A53C +/* 8009A4E0 00097420 38 00 00 01 */ li r0, 1 +/* 8009A4E4 00097424 4C C6 31 82 */ crclr 6 +/* 8009A4E8 00097428 90 0D 94 8C */ stw r0, message$332@sda21(r13) +/* 8009A4EC 0009742C 38 6F 01 BC */ addi r3, r15, 0x1bc +/* 8009A4F0 00097430 4B FF 4A 75 */ bl OSReport +/* 8009A4F4 00097434 38 6F 01 E8 */ addi r3, r15, 0x1e8 +/* 8009A4F8 00097438 4C C6 31 82 */ crclr 6 +/* 8009A4FC 0009743C 4B FF 4A 69 */ bl OSReport +/* 8009A500 00097440 38 6F 02 14 */ addi r3, r15, 0x214 +/* 8009A504 00097444 4C C6 31 82 */ crclr 6 +/* 8009A508 00097448 4B FF 4A 5D */ bl OSReport +/* 8009A50C 0009744C 38 6F 02 40 */ addi r3, r15, 0x240 +/* 8009A510 00097450 4C C6 31 82 */ crclr 6 +/* 8009A514 00097454 4B FF 4A 51 */ bl OSReport +/* 8009A518 00097458 38 6F 02 6C */ addi r3, r15, 0x26c +/* 8009A51C 0009745C 4C C6 31 82 */ crclr 6 +/* 8009A520 00097460 4B FF 4A 45 */ bl OSReport +/* 8009A524 00097464 38 6F 02 98 */ addi r3, r15, 0x298 +/* 8009A528 00097468 4C C6 31 82 */ crclr 6 +/* 8009A52C 0009746C 4B FF 4A 39 */ bl OSReport +/* 8009A530 00097470 38 6F 01 BC */ addi r3, r15, 0x1bc +/* 8009A534 00097474 4C C6 31 82 */ crclr 6 +/* 8009A538 00097478 4B FF 4A 2D */ bl OSReport +lbl_8009A53C: +/* 8009A53C 0009747C 28 10 00 00 */ cmplwi r16, 0 +/* 8009A540 00097480 41 82 00 0C */ beq lbl_8009A54C +/* 8009A544 00097484 28 10 00 02 */ cmplwi r16, 2 +/* 8009A548 00097488 40 82 00 0C */ bne lbl_8009A554 +lbl_8009A54C: +/* 8009A54C 0009748C 92 3D 01 18 */ stw r17, 0x118(r29) +/* 8009A550 00097490 48 00 00 08 */ b lbl_8009A558 +lbl_8009A554: +/* 8009A554 00097494 92 1D 01 18 */ stw r16, 0x118(r29) +lbl_8009A558: +/* 8009A558 00097498 A0 1F 00 0A */ lhz r0, 0xa(r31) +/* 8009A55C 0009749C B0 1D 00 F0 */ sth r0, 0xf0(r29) +/* 8009A560 000974A0 80 1C 00 00 */ lwz r0, 0(r28) +/* 8009A564 000974A4 28 00 00 01 */ cmplwi r0, 1 +/* 8009A568 000974A8 40 82 00 10 */ bne lbl_8009A578 +/* 8009A56C 000974AC A0 1F 00 0C */ lhz r0, 0xc(r31) +/* 8009A570 000974B0 54 00 0C 3C */ rlwinm r0, r0, 1, 0x10, 0x1e +/* 8009A574 000974B4 48 00 00 08 */ b lbl_8009A57C +lbl_8009A578: +/* 8009A578 000974B8 A0 1F 00 0C */ lhz r0, 0xc(r31) +lbl_8009A57C: +/* 8009A57C 000974BC B0 1D 00 F2 */ sth r0, 0xf2(r29) +/* 8009A580 000974C0 3A FD 00 F2 */ addi r23, r29, 0xf2 +/* 8009A584 000974C4 3B 1D 00 F4 */ addi r24, r29, 0xf4 +/* 8009A588 000974C8 A0 1F 00 0E */ lhz r0, 0xe(r31) +/* 8009A58C 000974CC 3B 7D 01 02 */ addi r27, r29, 0x102 +/* 8009A590 000974D0 3B 3D 01 10 */ addi r25, r29, 0x110 +/* 8009A594 000974D4 B0 1D 00 F4 */ sth r0, 0xf4(r29) +/* 8009A598 000974D8 38 00 00 00 */ li r0, 0 +/* 8009A59C 000974DC 3A 1D 01 0A */ addi r16, r29, 0x10a +/* 8009A5A0 000974E0 A0 7F 00 04 */ lhz r3, 4(r31) +/* 8009A5A4 000974E4 3B 5D 01 0C */ addi r26, r29, 0x10c +/* 8009A5A8 000974E8 39 FD 01 06 */ addi r15, r29, 0x106 +/* 8009A5AC 000974EC B0 7D 01 02 */ sth r3, 0x102(r29) +/* 8009A5B0 000974F0 3A 3D 01 08 */ addi r17, r29, 0x108 +/* 8009A5B4 000974F4 A0 7F 00 08 */ lhz r3, 8(r31) +/* 8009A5B8 000974F8 B0 7D 01 04 */ sth r3, 0x104(r29) +/* 8009A5BC 000974FC 80 7F 00 14 */ lwz r3, 0x14(r31) +/* 8009A5C0 00097500 90 7D 01 10 */ stw r3, 0x110(r29) +/* 8009A5C4 00097504 A0 7D 01 02 */ lhz r3, 0x102(r29) +/* 8009A5C8 00097508 B0 7D 01 0A */ sth r3, 0x10a(r29) +/* 8009A5CC 0009750C A0 7D 01 04 */ lhz r3, 0x104(r29) +/* 8009A5D0 00097510 B0 7D 01 0C */ sth r3, 0x10c(r29) +/* 8009A5D4 00097514 B0 1D 01 06 */ sth r0, 0x106(r29) +/* 8009A5D8 00097518 B0 1D 01 08 */ sth r0, 0x108(r29) +/* 8009A5DC 0009751C 80 1C 00 00 */ lwz r0, 0(r28) +/* 8009A5E0 00097520 28 00 00 02 */ cmplwi r0, 2 +/* 8009A5E4 00097524 40 82 00 0C */ bne lbl_8009A5F0 +/* 8009A5E8 00097528 A0 1A 00 00 */ lhz r0, 0(r26) +/* 8009A5EC 0009752C 48 00 00 30 */ b lbl_8009A61C +lbl_8009A5F0: +/* 8009A5F0 00097530 28 00 00 03 */ cmplwi r0, 3 +/* 8009A5F4 00097534 40 82 00 0C */ bne lbl_8009A600 +/* 8009A5F8 00097538 A0 1A 00 00 */ lhz r0, 0(r26) +/* 8009A5FC 0009753C 48 00 00 20 */ b lbl_8009A61C +lbl_8009A600: +/* 8009A600 00097540 80 19 00 00 */ lwz r0, 0(r25) +/* 8009A604 00097544 2C 00 00 00 */ cmpwi r0, 0 +/* 8009A608 00097548 40 82 00 10 */ bne lbl_8009A618 +/* 8009A60C 0009754C A0 1A 00 00 */ lhz r0, 0(r26) +/* 8009A610 00097550 54 00 0C 3C */ rlwinm r0, r0, 1, 0x10, 0x1e +/* 8009A614 00097554 48 00 00 08 */ b lbl_8009A61C +lbl_8009A618: +/* 8009A618 00097558 A0 1A 00 00 */ lhz r0, 0(r26) +lbl_8009A61C: +/* 8009A61C 0009755C 3A DD 00 F6 */ addi r22, r29, 0xf6 +/* 8009A620 00097560 B0 1D 00 F6 */ sth r0, 0xf6(r29) +/* 8009A624 00097564 80 1C 00 00 */ lwz r0, 0(r28) +/* 8009A628 00097568 28 00 00 03 */ cmplwi r0, 3 +/* 8009A62C 0009756C 40 82 00 0C */ bne lbl_8009A638 +/* 8009A630 00097570 38 00 00 01 */ li r0, 1 +/* 8009A634 00097574 48 00 00 08 */ b lbl_8009A63C +lbl_8009A638: +/* 8009A638 00097578 38 00 00 00 */ li r0, 0 +lbl_8009A63C: +/* 8009A63C 0009757C 3A 5D 01 34 */ addi r18, r29, 0x134 +/* 8009A640 00097580 90 1D 01 34 */ stw r0, 0x134(r29) +/* 8009A644 00097584 3A BD 01 18 */ addi r21, r29, 0x118 +/* 8009A648 00097588 80 7D 01 18 */ lwz r3, 0x118(r29) +/* 8009A64C 0009758C 80 1C 00 00 */ lwz r0, 0(r28) +/* 8009A650 00097590 54 63 10 3A */ slwi r3, r3, 2 +/* 8009A654 00097594 7C 63 02 14 */ add r3, r3, r0 +/* 8009A658 00097598 4B FF F2 4D */ bl getTiming +/* 8009A65C 0009759C 7C 7E 1B 78 */ mr r30, r3 +/* 8009A660 000975A0 93 DD 01 44 */ stw r30, 0x144(r29) +/* 8009A664 000975A4 A0 18 00 00 */ lhz r0, 0(r24) +/* 8009A668 000975A8 A8 9D 00 F0 */ lha r4, 0xf0(r29) +/* 8009A66C 000975AC A8 6D 94 5C */ lha r3, displayOffsetH@sda21(r13) +/* 8009A670 000975B0 20 A0 02 D0 */ subfic r5, r0, 0x2d0 +/* 8009A674 000975B4 A0 1E 00 02 */ lhz r0, 2(r30) +/* 8009A678 000975B8 7C 64 1A 14 */ add r3, r4, r3 +/* 8009A67C 000975BC 7C 03 28 00 */ cmpw r3, r5 +/* 8009A680 000975C0 40 81 00 08 */ ble lbl_8009A688 +/* 8009A684 000975C4 48 00 00 14 */ b lbl_8009A698 +lbl_8009A688: +/* 8009A688 000975C8 2C 03 00 00 */ cmpwi r3, 0 +/* 8009A68C 000975CC 40 80 00 08 */ bge lbl_8009A694 +/* 8009A690 000975D0 38 60 00 00 */ li r3, 0 +lbl_8009A694: +/* 8009A694 000975D4 7C 65 1B 78 */ mr r5, r3 +lbl_8009A698: +/* 8009A698 000975D8 B0 BD 00 F8 */ sth r5, 0xf8(r29) +/* 8009A69C 000975DC 38 7D 00 F8 */ addi r3, r29, 0xf8 +/* 8009A6A0 000975E0 80 99 00 00 */ lwz r4, 0(r25) +/* 8009A6A4 000975E4 2C 04 00 00 */ cmpwi r4, 0 +/* 8009A6A8 000975E8 40 82 00 0C */ bne lbl_8009A6B4 +/* 8009A6AC 000975EC 38 80 00 02 */ li r4, 2 +/* 8009A6B0 000975F0 48 00 00 08 */ b lbl_8009A6B8 +lbl_8009A6B4: +/* 8009A6B4 000975F4 38 80 00 01 */ li r4, 1 +lbl_8009A6B8: +/* 8009A6B8 000975F8 A0 B7 00 00 */ lhz r5, 0(r23) +/* 8009A6BC 000975FC A8 CD 94 5E */ lha r6, displayOffsetV@sda21(r13) +/* 8009A6C0 00097600 7C A7 07 34 */ extsh r7, r5 +/* 8009A6C4 00097604 54 A5 07 FE */ clrlwi r5, r5, 0x1f +/* 8009A6C8 00097608 7C E7 32 14 */ add r7, r7, r6 +/* 8009A6CC 0009760C 7C 07 28 00 */ cmpw r7, r5 +/* 8009A6D0 00097610 40 81 00 08 */ ble lbl_8009A6D8 +/* 8009A6D4 00097614 48 00 00 08 */ b lbl_8009A6DC +lbl_8009A6D8: +/* 8009A6D8 00097618 7C A7 2B 78 */ mr r7, r5 +lbl_8009A6DC: +/* 8009A6DC 0009761C B0 FD 00 FA */ sth r7, 0xfa(r29) +/* 8009A6E0 00097620 7C 00 07 34 */ extsh r0, r0 +/* 8009A6E4 00097624 54 00 08 3C */ slwi r0, r0, 1 +/* 8009A6E8 00097628 A1 16 00 00 */ lhz r8, 0(r22) +/* 8009A6EC 0009762C 7C 05 00 50 */ subf r0, r5, r0 +/* 8009A6F0 00097630 A8 F7 00 00 */ lha r7, 0(r23) +/* 8009A6F4 00097634 3A 7D 00 FA */ addi r19, r29, 0xfa +/* 8009A6F8 00097638 7D 09 07 34 */ extsh r9, r8 +/* 8009A6FC 0009763C 7D 49 32 14 */ add r10, r9, r6 +/* 8009A700 00097640 7D 47 52 14 */ add r10, r7, r10 +/* 8009A704 00097644 7D 20 50 51 */ subf. r9, r0, r10 +/* 8009A708 00097648 40 81 00 0C */ ble lbl_8009A714 +/* 8009A70C 0009764C 7D 20 50 50 */ subf r9, r0, r10 +/* 8009A710 00097650 48 00 00 08 */ b lbl_8009A718 +lbl_8009A714: +/* 8009A714 00097654 39 20 00 00 */ li r9, 0 +lbl_8009A718: +/* 8009A718 00097658 7D 47 32 14 */ add r10, r7, r6 +/* 8009A71C 0009765C 7C E5 50 51 */ subf. r7, r5, r10 +/* 8009A720 00097660 40 80 00 0C */ bge lbl_8009A72C +/* 8009A724 00097664 7C E5 50 50 */ subf r7, r5, r10 +/* 8009A728 00097668 48 00 00 08 */ b lbl_8009A730 +lbl_8009A72C: +/* 8009A72C 0009766C 38 E0 00 00 */ li r7, 0 +lbl_8009A730: +/* 8009A730 00097670 7C E8 3A 14 */ add r7, r8, r7 +/* 8009A734 00097674 7C E9 38 50 */ subf r7, r9, r7 +/* 8009A738 00097678 3A 9D 00 FC */ addi r20, r29, 0xfc +/* 8009A73C 0009767C B0 FD 00 FC */ sth r7, 0xfc(r29) +/* 8009A740 00097680 A8 F7 00 00 */ lha r7, 0(r23) +/* 8009A744 00097684 7D 07 32 14 */ add r8, r7, r6 +/* 8009A748 00097688 7C E5 40 51 */ subf. r7, r5, r8 +/* 8009A74C 0009768C 40 80 00 0C */ bge lbl_8009A758 +/* 8009A750 00097690 7C E5 40 50 */ subf r7, r5, r8 +/* 8009A754 00097694 48 00 00 08 */ b lbl_8009A75C +lbl_8009A758: +/* 8009A758 00097698 38 E0 00 00 */ li r7, 0 +lbl_8009A75C: +/* 8009A75C 0009769C 7D 07 23 D6 */ divw r8, r7, r4 +/* 8009A760 000976A0 A0 F1 00 00 */ lhz r7, 0(r17) +/* 8009A764 000976A4 7C E8 38 50 */ subf r7, r8, r7 +/* 8009A768 000976A8 B0 FD 00 FE */ sth r7, 0xfe(r29) +/* 8009A76C 000976AC A8 F6 00 00 */ lha r7, 0(r22) +/* 8009A770 000976B0 A9 37 00 00 */ lha r9, 0(r23) +/* 8009A774 000976B4 7D 07 32 14 */ add r8, r7, r6 +/* 8009A778 000976B8 7D 09 42 14 */ add r8, r9, r8 +/* 8009A77C 000976BC 7C E0 40 51 */ subf. r7, r0, r8 +/* 8009A780 000976C0 40 81 00 0C */ ble lbl_8009A78C +/* 8009A784 000976C4 7C E0 40 50 */ subf r7, r0, r8 +/* 8009A788 000976C8 48 00 00 08 */ b lbl_8009A790 +lbl_8009A78C: +/* 8009A78C 000976CC 38 E0 00 00 */ li r7, 0 +lbl_8009A790: +/* 8009A790 000976D0 7C C9 32 14 */ add r6, r9, r6 +/* 8009A794 000976D4 7C 05 30 51 */ subf. r0, r5, r6 +/* 8009A798 000976D8 40 80 00 0C */ bge lbl_8009A7A4 +/* 8009A79C 000976DC 7C 05 30 50 */ subf r0, r5, r6 +/* 8009A7A0 000976E0 48 00 00 08 */ b lbl_8009A7A8 +lbl_8009A7A4: +/* 8009A7A4 000976E4 38 00 00 00 */ li r0, 0 +lbl_8009A7A8: +/* 8009A7A8 000976E8 7C 00 23 D6 */ divw r0, r0, r4 +/* 8009A7AC 000976EC A0 BA 00 00 */ lhz r5, 0(r26) +/* 8009A7B0 000976F0 7C 87 23 D6 */ divw r4, r7, r4 +/* 8009A7B4 000976F4 7C 05 02 14 */ add r0, r5, r0 +/* 8009A7B8 000976F8 7C 04 00 50 */ subf r0, r4, r0 +/* 8009A7BC 000976FC B0 1D 01 00 */ sth r0, 0x100(r29) +/* 8009A7C0 00097700 80 0D 94 58 */ lwz r0, encoderType@sda21(r13) +/* 8009A7C4 00097704 28 00 00 00 */ cmplwi r0, 0 +/* 8009A7C8 00097708 40 82 00 0C */ bne lbl_8009A7D4 +/* 8009A7CC 0009770C 38 00 00 03 */ li r0, 3 +/* 8009A7D0 00097710 90 15 00 00 */ stw r0, 0(r21) +lbl_8009A7D4: +/* 8009A7D4 00097714 A0 BE 00 18 */ lhz r5, 0x18(r30) +/* 8009A7D8 00097718 7C A4 0E 70 */ srawi r4, r5, 1 +/* 8009A7DC 0009771C 7C 84 01 94 */ addze r4, r4 +/* 8009A7E0 00097720 7C A0 0E 70 */ srawi r0, r5, 1 +/* 8009A7E4 00097724 7C 00 01 94 */ addze r0, r0 +/* 8009A7E8 00097728 54 00 08 3C */ slwi r0, r0, 1 +/* 8009A7EC 0009772C 7C 00 28 10 */ subfc r0, r0, r5 +/* 8009A7F0 00097730 54 00 04 3F */ clrlwi. r0, r0, 0x10 +/* 8009A7F4 00097734 54 84 04 3E */ clrlwi r4, r4, 0x10 +/* 8009A7F8 00097738 41 82 00 0C */ beq lbl_8009A804 +/* 8009A7FC 0009773C A0 BE 00 1A */ lhz r5, 0x1a(r30) +/* 8009A800 00097740 48 00 00 08 */ b lbl_8009A808 +lbl_8009A804: +/* 8009A804 00097744 38 A0 00 00 */ li r5, 0 +lbl_8009A808: +/* 8009A808 00097748 38 05 00 01 */ addi r0, r5, 1 +/* 8009A80C 0009774C B0 1D 00 32 */ sth r0, 0x32(r29) +/* 8009A810 00097750 38 04 00 01 */ addi r0, r4, 1 +/* 8009A814 00097754 60 00 10 00 */ ori r0, r0, 0x1000 +/* 8009A818 00097758 80 AD 94 68 */ lwz r5, changed@sda21(r13) +/* 8009A81C 0009775C 38 9D 00 02 */ addi r4, r29, 2 +/* 8009A820 00097760 80 CD 94 6C */ lwz r6, lbl_80409F2C@sda21(r13) +/* 8009A824 00097764 60 A5 00 40 */ ori r5, r5, 0x40 +/* 8009A828 00097768 90 CD 94 6C */ stw r6, lbl_80409F2C@sda21(r13) +/* 8009A82C 0009776C 90 AD 94 68 */ stw r5, changed@sda21(r13) +/* 8009A830 00097770 B0 1D 00 30 */ sth r0, 0x30(r29) +/* 8009A834 00097774 80 0D 94 68 */ lwz r0, changed@sda21(r13) +/* 8009A838 00097778 80 AD 94 6C */ lwz r5, lbl_80409F2C@sda21(r13) +/* 8009A83C 0009777C 60 00 00 80 */ ori r0, r0, 0x80 +/* 8009A840 00097780 90 AD 94 6C */ stw r5, lbl_80409F2C@sda21(r13) +/* 8009A844 00097784 90 0D 94 68 */ stw r0, changed@sda21(r13) +/* 8009A848 00097788 80 1C 00 00 */ lwz r0, 0(r28) +/* 8009A84C 0009778C A0 BD 00 02 */ lhz r5, 2(r29) +/* 8009A850 00097790 28 00 00 02 */ cmplwi r0, 2 +/* 8009A854 00097794 41 82 00 0C */ beq lbl_8009A860 +/* 8009A858 00097798 28 00 00 03 */ cmplwi r0, 3 +/* 8009A85C 0009779C 40 82 00 10 */ bne lbl_8009A86C +lbl_8009A860: +/* 8009A860 000977A0 54 A0 07 B8 */ rlwinm r0, r5, 0, 0x1e, 0x1c +/* 8009A864 000977A4 60 05 00 04 */ ori r5, r0, 4 +/* 8009A868 000977A8 48 00 00 0C */ b lbl_8009A874 +lbl_8009A86C: +/* 8009A86C 000977AC 54 A5 07 B8 */ rlwinm r5, r5, 0, 0x1e, 0x1c +/* 8009A870 000977B0 50 05 17 7A */ rlwimi r5, r0, 2, 0x1d, 0x1d +lbl_8009A874: +/* 8009A874 000977B4 80 D5 00 00 */ lwz r6, 0(r21) +/* 8009A878 000977B8 54 A5 07 76 */ rlwinm r5, r5, 0, 0x1d, 0x1b +/* 8009A87C 000977BC 80 F2 00 00 */ lwz r7, 0(r18) +/* 8009A880 000977C0 28 06 00 04 */ cmplwi r6, 4 +/* 8009A884 000977C4 54 E0 18 38 */ slwi r0, r7, 3 +/* 8009A888 000977C8 7C A0 03 78 */ or r0, r5, r0 +/* 8009A88C 000977CC 41 82 00 0C */ beq lbl_8009A898 +/* 8009A890 000977D0 28 06 00 05 */ cmplwi r6, 5 +/* 8009A894 000977D4 40 82 00 0C */ bne lbl_8009A8A0 +lbl_8009A898: +/* 8009A898 000977D8 54 00 06 2A */ rlwinm r0, r0, 0, 0x18, 0x15 +/* 8009A89C 000977DC 48 00 00 10 */ b lbl_8009A8AC +lbl_8009A8A0: +/* 8009A8A0 000977E0 54 05 06 2A */ rlwinm r5, r0, 0, 0x18, 0x15 +/* 8009A8A4 000977E4 54 C0 40 2E */ slwi r0, r6, 8 +/* 8009A8A8 000977E8 7C A0 03 78 */ or r0, r5, r0 +lbl_8009A8AC: +/* 8009A8AC 000977EC B0 04 00 00 */ sth r0, 0(r4) +/* 8009A8B0 000977F0 3C 00 40 00 */ lis r0, 0x4000 +/* 8009A8B4 000977F4 38 DD 00 6C */ addi r6, r29, 0x6c +/* 8009A8B8 000977F8 80 8D 94 68 */ lwz r4, changed@sda21(r13) +/* 8009A8BC 000977FC 80 AD 94 6C */ lwz r5, lbl_80409F2C@sda21(r13) +/* 8009A8C0 00097800 7C 80 03 78 */ or r0, r4, r0 +/* 8009A8C4 00097804 90 AD 94 6C */ stw r5, lbl_80409F2C@sda21(r13) +/* 8009A8C8 00097808 90 0D 94 68 */ stw r0, changed@sda21(r13) +/* 8009A8CC 0009780C 80 1F 00 00 */ lwz r0, 0(r31) +/* 8009A8D0 00097810 A0 9D 00 6C */ lhz r4, 0x6c(r29) +/* 8009A8D4 00097814 2C 00 00 02 */ cmpwi r0, 2 +/* 8009A8D8 00097818 41 82 00 0C */ beq lbl_8009A8E4 +/* 8009A8DC 0009781C 2C 00 00 03 */ cmpwi r0, 3 +/* 8009A8E0 00097820 40 82 00 10 */ bne lbl_8009A8F0 +lbl_8009A8E4: +/* 8009A8E4 00097824 54 80 00 3C */ rlwinm r0, r4, 0, 0, 0x1e +/* 8009A8E8 00097828 60 00 00 01 */ ori r0, r0, 1 +/* 8009A8EC 0009782C 48 00 00 08 */ b lbl_8009A8F4 +lbl_8009A8F0: +/* 8009A8F0 00097830 54 80 00 3C */ rlwinm r0, r4, 0, 0, 0x1e +lbl_8009A8F4: +/* 8009A8F4 00097834 B0 06 00 00 */ sth r0, 0(r6) +/* 8009A8F8 00097838 2C 07 00 00 */ cmpwi r7, 0 +/* 8009A8FC 0009783C 80 8D 94 68 */ lwz r4, changed@sda21(r13) +/* 8009A900 00097840 80 0D 94 6C */ lwz r0, lbl_80409F2C@sda21(r13) +/* 8009A904 00097844 60 00 02 00 */ ori r0, r0, 0x200 +/* 8009A908 00097848 90 0D 94 6C */ stw r0, lbl_80409F2C@sda21(r13) +/* 8009A90C 0009784C 90 8D 94 68 */ stw r4, changed@sda21(r13) +/* 8009A910 00097850 A0 98 00 00 */ lhz r4, 0(r24) +/* 8009A914 00097854 A0 B0 00 00 */ lhz r5, 0(r16) +/* 8009A918 00097858 41 82 00 0C */ beq lbl_8009A924 +/* 8009A91C 0009785C 54 A0 08 3C */ slwi r0, r5, 1 +/* 8009A920 00097860 48 00 00 08 */ b lbl_8009A928 +lbl_8009A924: +/* 8009A924 00097864 7C A0 2B 78 */ mr r0, r5 +lbl_8009A928: +/* 8009A928 00097868 54 08 04 3E */ clrlwi r8, r0, 0x10 +/* 8009A92C 0009786C 7C 08 20 40 */ cmplw r8, r4 +/* 8009A930 00097870 40 80 00 50 */ bge lbl_8009A980 +/* 8009A934 00097874 55 06 40 2E */ slwi r6, r8, 8 +/* 8009A938 00097878 38 06 FF FF */ addi r0, r6, -1 +/* 8009A93C 0009787C 7C 04 02 14 */ add r0, r4, r0 +/* 8009A940 00097880 7C 00 23 96 */ divwu r0, r0, r4 +/* 8009A944 00097884 60 00 10 00 */ ori r0, r0, 0x1000 +/* 8009A948 00097888 B0 1D 00 4A */ sth r0, 0x4a(r29) +/* 8009A94C 0009788C 3C 00 04 00 */ lis r0, 0x400 +/* 8009A950 00097890 80 CD 94 68 */ lwz r6, changed@sda21(r13) +/* 8009A954 00097894 80 ED 94 6C */ lwz r7, lbl_80409F2C@sda21(r13) +/* 8009A958 00097898 7C E0 03 78 */ or r0, r7, r0 +/* 8009A95C 0009789C 90 0D 94 6C */ stw r0, lbl_80409F2C@sda21(r13) +/* 8009A960 000978A0 90 CD 94 68 */ stw r6, changed@sda21(r13) +/* 8009A964 000978A4 B1 1D 00 70 */ sth r8, 0x70(r29) +/* 8009A968 000978A8 80 CD 94 68 */ lwz r6, changed@sda21(r13) +/* 8009A96C 000978AC 80 0D 94 6C */ lwz r0, lbl_80409F2C@sda21(r13) +/* 8009A970 000978B0 60 00 00 80 */ ori r0, r0, 0x80 +/* 8009A974 000978B4 90 0D 94 6C */ stw r0, lbl_80409F2C@sda21(r13) +/* 8009A978 000978B8 90 CD 94 68 */ stw r6, changed@sda21(r13) +/* 8009A97C 000978BC 48 00 00 24 */ b lbl_8009A9A0 +lbl_8009A980: +/* 8009A980 000978C0 38 00 01 00 */ li r0, 0x100 +/* 8009A984 000978C4 B0 1D 00 4A */ sth r0, 0x4a(r29) +/* 8009A988 000978C8 3C 00 04 00 */ lis r0, 0x400 +/* 8009A98C 000978CC 80 CD 94 68 */ lwz r6, changed@sda21(r13) +/* 8009A990 000978D0 80 ED 94 6C */ lwz r7, lbl_80409F2C@sda21(r13) +/* 8009A994 000978D4 7C E0 03 78 */ or r0, r7, r0 +/* 8009A998 000978D8 90 0D 94 6C */ stw r0, lbl_80409F2C@sda21(r13) +/* 8009A99C 000978DC 90 CD 94 68 */ stw r6, changed@sda21(r13) +lbl_8009A9A0: +/* 8009A9A0 000978E0 A0 03 00 00 */ lhz r0, 0(r3) +/* 8009A9A4 000978E4 21 84 02 D0 */ subfic r12, r4, 0x2d0 +/* 8009A9A8 000978E8 A0 DE 00 1A */ lhz r6, 0x1a(r30) +/* 8009A9AC 000978EC 3C 60 10 00 */ lis r3, 0x1000 +/* 8009A9B0 000978F0 3D 00 20 00 */ lis r8, 0x2000 +/* 8009A9B4 000978F4 B0 DD 00 06 */ sth r6, 6(r29) +/* 8009A9B8 000978F8 3D 20 04 00 */ lis r9, 0x400 +/* 8009A9BC 000978FC 3C E0 08 00 */ lis r7, 0x800 +/* 8009A9C0 00097900 81 4D 94 68 */ lwz r10, changed@sda21(r13) +/* 8009A9C4 00097904 3C C0 00 10 */ lis r6, 0x10 +/* 8009A9C8 00097908 3C 80 00 20 */ lis r4, 0x20 +/* 8009A9CC 0009790C 81 6D 94 6C */ lwz r11, lbl_80409F2C@sda21(r13) +/* 8009A9D0 00097910 7D 4A 1B 78 */ or r10, r10, r3 +/* 8009A9D4 00097914 3C 60 00 04 */ lis r3, 4 +/* 8009A9D8 00097918 91 6D 94 6C */ stw r11, lbl_80409F2C@sda21(r13) +/* 8009A9DC 0009791C 91 4D 94 68 */ stw r10, changed@sda21(r13) +/* 8009A9E0 00097920 89 5E 00 1D */ lbz r10, 0x1d(r30) +/* 8009A9E4 00097924 89 7E 00 1E */ lbz r11, 0x1e(r30) +/* 8009A9E8 00097928 51 4B 44 2E */ rlwimi r11, r10, 8, 0x10, 0x17 +/* 8009A9EC 0009792C B1 7D 00 04 */ sth r11, 4(r29) +/* 8009A9F0 00097930 81 4D 94 68 */ lwz r10, changed@sda21(r13) +/* 8009A9F4 00097934 81 6D 94 6C */ lwz r11, lbl_80409F2C@sda21(r13) +/* 8009A9F8 00097938 7D 48 43 78 */ or r8, r10, r8 +/* 8009A9FC 0009793C 91 6D 94 6C */ stw r11, lbl_80409F2C@sda21(r13) +/* 8009AA00 00097940 91 0D 94 68 */ stw r8, changed@sda21(r13) +/* 8009AA04 00097944 89 1E 00 1F */ lbz r8, 0x1f(r30) +/* 8009AA08 00097948 89 5E 00 1C */ lbz r10, 0x1c(r30) +/* 8009AA0C 0009794C 7E 08 02 14 */ add r16, r8, r0 +/* 8009AA10 00097950 A1 7E 00 20 */ lhz r11, 0x20(r30) +/* 8009AA14 00097954 3A 10 FF D8 */ addi r16, r16, -40 +/* 8009AA18 00097958 56 08 3C 30 */ rlwinm r8, r16, 7, 0x10, 0x18 +/* 8009AA1C 0009795C 7D 48 43 78 */ or r8, r10, r8 +/* 8009AA20 00097960 B1 1D 00 0A */ sth r8, 0xa(r29) +/* 8009AA24 00097964 7D 0B 02 14 */ add r8, r11, r0 +/* 8009AA28 00097968 38 08 00 28 */ addi r0, r8, 0x28 +/* 8009AA2C 0009796C 81 4D 94 68 */ lwz r10, changed@sda21(r13) +/* 8009AA30 00097970 7C 0C 00 50 */ subf r0, r12, r0 +/* 8009AA34 00097974 56 08 BA 7E */ srwi r8, r16, 9 +/* 8009AA38 00097978 81 6D 94 6C */ lwz r11, lbl_80409F2C@sda21(r13) +/* 8009AA3C 0009797C 54 00 08 3C */ slwi r0, r0, 1 +/* 8009AA40 00097980 7D 49 4B 78 */ or r9, r10, r9 +/* 8009AA44 00097984 91 6D 94 6C */ stw r11, lbl_80409F2C@sda21(r13) +/* 8009AA48 00097988 7D 00 03 78 */ or r0, r8, r0 +/* 8009AA4C 0009798C 91 2D 94 68 */ stw r9, changed@sda21(r13) +/* 8009AA50 00097990 B0 1D 00 08 */ sth r0, 8(r29) +/* 8009AA54 00097994 80 0D 94 68 */ lwz r0, changed@sda21(r13) +/* 8009AA58 00097998 81 0D 94 6C */ lwz r8, lbl_80409F2C@sda21(r13) +/* 8009AA5C 0009799C 7C 00 3B 78 */ or r0, r0, r7 +/* 8009AA60 000979A0 91 0D 94 6C */ stw r8, lbl_80409F2C@sda21(r13) +/* 8009AA64 000979A4 90 0D 94 68 */ stw r0, changed@sda21(r13) +/* 8009AA68 000979A8 A0 1E 00 10 */ lhz r0, 0x10(r30) +/* 8009AA6C 000979AC 88 FE 00 0C */ lbz r7, 0xc(r30) +/* 8009AA70 000979B0 54 00 28 34 */ slwi r0, r0, 5 +/* 8009AA74 000979B4 7C E0 03 78 */ or r0, r7, r0 +/* 8009AA78 000979B8 B0 1D 00 16 */ sth r0, 0x16(r29) +/* 8009AA7C 000979BC 80 0D 94 68 */ lwz r0, changed@sda21(r13) +/* 8009AA80 000979C0 80 ED 94 6C */ lwz r7, lbl_80409F2C@sda21(r13) +/* 8009AA84 000979C4 7C 00 33 78 */ or r0, r0, r6 +/* 8009AA88 000979C8 90 ED 94 6C */ stw r7, lbl_80409F2C@sda21(r13) +/* 8009AA8C 000979CC 90 0D 94 68 */ stw r0, changed@sda21(r13) +/* 8009AA90 000979D0 A0 1E 00 14 */ lhz r0, 0x14(r30) +/* 8009AA94 000979D4 88 DE 00 0E */ lbz r6, 0xe(r30) +/* 8009AA98 000979D8 54 00 28 34 */ slwi r0, r0, 5 +/* 8009AA9C 000979DC 7C C0 03 78 */ or r0, r6, r0 +/* 8009AAA0 000979E0 B0 1D 00 14 */ sth r0, 0x14(r29) +/* 8009AAA4 000979E4 80 0D 94 68 */ lwz r0, changed@sda21(r13) +/* 8009AAA8 000979E8 80 CD 94 6C */ lwz r6, lbl_80409F2C@sda21(r13) +/* 8009AAAC 000979EC 7C 00 23 78 */ or r0, r0, r4 +/* 8009AAB0 000979F0 90 CD 94 6C */ stw r6, lbl_80409F2C@sda21(r13) +/* 8009AAB4 000979F4 90 0D 94 68 */ stw r0, changed@sda21(r13) +/* 8009AAB8 000979F8 A0 1E 00 12 */ lhz r0, 0x12(r30) +/* 8009AABC 000979FC 88 9E 00 0D */ lbz r4, 0xd(r30) +/* 8009AAC0 00097A00 54 00 28 34 */ slwi r0, r0, 5 +/* 8009AAC4 00097A04 7C 80 03 78 */ or r0, r4, r0 +/* 8009AAC8 00097A08 B0 1D 00 1A */ sth r0, 0x1a(r29) +/* 8009AACC 00097A0C 80 0D 94 68 */ lwz r0, changed@sda21(r13) +/* 8009AAD0 00097A10 80 8D 94 6C */ lwz r4, lbl_80409F2C@sda21(r13) +/* 8009AAD4 00097A14 7C 00 1B 78 */ or r0, r0, r3 +/* 8009AAD8 00097A18 90 8D 94 6C */ stw r4, lbl_80409F2C@sda21(r13) +/* 8009AADC 00097A1C 90 0D 94 68 */ stw r0, changed@sda21(r13) +/* 8009AAE0 00097A20 A0 1E 00 16 */ lhz r0, 0x16(r30) +/* 8009AAE4 00097A24 88 7E 00 0F */ lbz r3, 0xf(r30) +/* 8009AAE8 00097A28 54 00 28 34 */ slwi r0, r0, 5 +/* 8009AAEC 00097A2C 7C 60 03 78 */ or r0, r3, r0 +/* 8009AAF0 00097A30 B0 1D 00 18 */ sth r0, 0x18(r29) +/* 8009AAF4 00097A34 80 6D 94 68 */ lwz r3, changed@sda21(r13) +/* 8009AAF8 00097A38 3C 00 00 08 */ lis r0, 8 +/* 8009AAFC 00097A3C 38 DD 01 1C */ addi r6, r29, 0x11c +/* 8009AB00 00097A40 80 8D 94 6C */ lwz r4, lbl_80409F2C@sda21(r13) +/* 8009AB04 00097A44 7C 60 03 78 */ or r0, r3, r0 +/* 8009AB08 00097A48 90 8D 94 6C */ stw r4, lbl_80409F2C@sda21(r13) +/* 8009AB0C 00097A4C 90 0D 94 68 */ stw r0, changed@sda21(r13) +/* 8009AB10 00097A50 A0 7B 00 00 */ lhz r3, 0(r27) +/* 8009AB14 00097A54 80 99 00 00 */ lwz r4, 0(r25) +/* 8009AB18 00097A58 38 03 00 0F */ addi r0, r3, 0xf +/* 8009AB1C 00097A5C A0 6F 00 00 */ lhz r3, 0(r15) +/* 8009AB20 00097A60 7C 00 26 70 */ srawi r0, r0, 4 +/* 8009AB24 00097A64 7C 00 01 94 */ addze r0, r0 +/* 8009AB28 00097A68 2C 04 00 00 */ cmpwi r4, 0 +/* 8009AB2C 00097A6C 98 1D 01 1C */ stb r0, 0x11c(r29) +/* 8009AB30 00097A70 40 82 00 0C */ bne lbl_8009AB3C +/* 8009AB34 00097A74 88 86 00 00 */ lbz r4, 0(r6) +/* 8009AB38 00097A78 48 00 00 0C */ b lbl_8009AB44 +lbl_8009AB3C: +/* 8009AB3C 00097A7C 88 06 00 00 */ lbz r0, 0(r6) +/* 8009AB40 00097A80 54 04 0E 3C */ rlwinm r4, r0, 1, 0x18, 0x1e +lbl_8009AB44: +/* 8009AB44 00097A84 7C 60 26 70 */ srawi r0, r3, 4 +/* 8009AB48 00097A88 98 9D 01 1D */ stb r4, 0x11d(r29) +/* 8009AB4C 00097A8C 7C 00 01 94 */ addze r0, r0 +/* 8009AB50 00097A90 54 00 20 36 */ slwi r0, r0, 4 +/* 8009AB54 00097A94 7C 00 18 10 */ subfc r0, r0, r3 +/* 8009AB58 00097A98 98 1D 01 2C */ stb r0, 0x12c(r29) +/* 8009AB5C 00097A9C 38 05 00 0F */ addi r0, r5, 0xf +/* 8009AB60 00097AA0 3C 60 08 00 */ lis r3, 0x800 +/* 8009AB64 00097AA4 88 9D 01 2C */ lbz r4, 0x12c(r29) +/* 8009AB68 00097AA8 7C 04 02 14 */ add r0, r4, r0 +/* 8009AB6C 00097AAC 7C 00 26 70 */ srawi r0, r0, 4 +/* 8009AB70 00097AB0 7C 00 01 94 */ addze r0, r0 +/* 8009AB74 00097AB4 98 1D 01 1E */ stb r0, 0x11e(r29) +/* 8009AB78 00097AB8 88 1D 01 1E */ lbz r0, 0x11e(r29) +/* 8009AB7C 00097ABC 88 9D 01 1D */ lbz r4, 0x11d(r29) +/* 8009AB80 00097AC0 50 04 44 2E */ rlwimi r4, r0, 8, 0x10, 0x17 +/* 8009AB84 00097AC4 B0 9D 00 48 */ sth r4, 0x48(r29) +/* 8009AB88 00097AC8 80 8D 94 68 */ lwz r4, changed@sda21(r13) +/* 8009AB8C 00097ACC 80 0D 94 88 */ lwz r0, FBSet@sda21(r13) +/* 8009AB90 00097AD0 80 AD 94 6C */ lwz r5, lbl_80409F2C@sda21(r13) +/* 8009AB94 00097AD4 28 00 00 00 */ cmplwi r0, 0 +/* 8009AB98 00097AD8 7C A0 1B 78 */ or r0, r5, r3 +/* 8009AB9C 00097ADC 90 0D 94 6C */ stw r0, lbl_80409F2C@sda21(r13) +/* 8009ABA0 00097AE0 90 8D 94 68 */ stw r4, changed@sda21(r13) +/* 8009ABA4 00097AE4 41 82 00 1C */ beq lbl_8009ABC0 +/* 8009ABA8 00097AE8 38 7D 00 F0 */ addi r3, r29, 0xf0 +/* 8009ABAC 00097AEC 38 9D 01 24 */ addi r4, r29, 0x124 +/* 8009ABB0 00097AF0 38 BD 01 28 */ addi r5, r29, 0x128 +/* 8009ABB4 00097AF4 38 DD 01 3C */ addi r6, r29, 0x13c +/* 8009ABB8 00097AF8 38 FD 01 40 */ addi r7, r29, 0x140 +/* 8009ABBC 00097AFC 4B FF F4 3D */ bl setFbbRegs +lbl_8009ABC0: +/* 8009ABC0 00097B00 80 1D 01 30 */ lwz r0, 0x130(r29) +/* 8009ABC4 00097B04 90 01 00 08 */ stw r0, 8(r1) +/* 8009ABC8 00097B08 A0 73 00 00 */ lhz r3, 0(r19) +/* 8009ABCC 00097B0C A0 94 00 00 */ lhz r4, 0(r20) +/* 8009ABD0 00097B10 88 BE 00 00 */ lbz r5, 0(r30) +/* 8009ABD4 00097B14 A0 DE 00 02 */ lhz r6, 2(r30) +/* 8009ABD8 00097B18 A0 FE 00 04 */ lhz r7, 4(r30) +/* 8009ABDC 00097B1C A1 1E 00 06 */ lhz r8, 6(r30) +/* 8009ABE0 00097B20 A1 3E 00 08 */ lhz r9, 8(r30) +/* 8009ABE4 00097B24 A1 5E 00 0A */ lhz r10, 0xa(r30) +/* 8009ABE8 00097B28 4B FF F6 E5 */ bl setVerticalRegs +/* 8009ABEC 00097B2C 7D C3 73 78 */ mr r3, r14 +/* 8009ABF0 00097B30 4B FF 56 05 */ bl OSRestoreInterrupts +/* 8009ABF4 00097B34 B9 C1 00 30 */ lmw r14, 0x30(r1) +/* 8009ABF8 00097B38 80 01 00 7C */ lwz r0, 0x7c(r1) +/* 8009ABFC 00097B3C 38 21 00 78 */ addi r1, r1, 0x78 +/* 8009AC00 00097B40 7C 08 03 A6 */ mtlr r0 +/* 8009AC04 00097B44 4E 80 00 20 */ blr + +.global VIFlush +VIFlush: +/* 8009AC08 00097B48 7C 08 02 A6 */ mflr r0 +/* 8009AC0C 00097B4C 90 01 00 04 */ stw r0, 4(r1) +/* 8009AC10 00097B50 94 21 FF D8 */ stwu r1, -0x28(r1) +/* 8009AC14 00097B54 BF 61 00 14 */ stmw r27, 0x14(r1) +/* 8009AC18 00097B58 4B FF 55 B5 */ bl OSDisableInterrupts +/* 8009AC1C 00097B5C 80 ED 94 70 */ lwz r7, shdwChangeMode@sda21(r13) +/* 8009AC20 00097B60 3C 80 80 3F */ lis r4, shdwRegs@ha +/* 8009AC24 00097B64 3C A0 80 3F */ lis r5, regs@ha +/* 8009AC28 00097B68 80 CD 94 60 */ lwz r6, changeMode@sda21(r13) +/* 8009AC2C 00097B6C 38 00 00 00 */ li r0, 0 +/* 8009AC30 00097B70 3B A4 BE 40 */ addi r29, r4, shdwRegs@l +/* 8009AC34 00097B74 7C E6 33 78 */ or r6, r7, r6 +/* 8009AC38 00097B78 90 CD 94 70 */ stw r6, shdwChangeMode@sda21(r13) +/* 8009AC3C 00097B7C 3B E5 BD C8 */ addi r31, r5, regs@l +/* 8009AC40 00097B80 3B C3 00 00 */ addi r30, r3, 0 +/* 8009AC44 00097B84 90 0D 94 60 */ stw r0, changeMode@sda21(r13) +/* 8009AC48 00097B88 80 8D 94 78 */ lwz r4, shdwChanged@sda21(r13) +/* 8009AC4C 00097B8C 80 AD 94 7C */ lwz r5, lbl_80409F3C@sda21(r13) +/* 8009AC50 00097B90 80 0D 94 68 */ lwz r0, changed@sda21(r13) +/* 8009AC54 00097B94 80 6D 94 6C */ lwz r3, lbl_80409F2C@sda21(r13) +/* 8009AC58 00097B98 7C 80 03 78 */ or r0, r4, r0 +/* 8009AC5C 00097B9C 7C A3 1B 78 */ or r3, r5, r3 +/* 8009AC60 00097BA0 90 6D 94 7C */ stw r3, lbl_80409F3C@sda21(r13) +/* 8009AC64 00097BA4 90 0D 94 78 */ stw r0, shdwChanged@sda21(r13) +/* 8009AC68 00097BA8 48 00 00 7C */ b lbl_8009ACE4 +lbl_8009AC6C: +/* 8009AC6C 00097BAC 80 6D 94 68 */ lwz r3, changed@sda21(r13) +/* 8009AC70 00097BB0 38 A0 00 20 */ li r5, 0x20 +/* 8009AC74 00097BB4 83 6D 94 6C */ lwz r27, lbl_80409F2C@sda21(r13) +/* 8009AC78 00097BB8 38 9B 00 00 */ addi r4, r27, 0 +/* 8009AC7C 00097BBC 4B FE 83 D5 */ bl __shr2u +/* 8009AC80 00097BC0 7C 84 00 34 */ cntlzw r4, r4 +/* 8009AC84 00097BC4 2C 04 00 20 */ cmpwi r4, 0x20 +/* 8009AC88 00097BC8 38 00 FF FF */ li r0, -1 +/* 8009AC8C 00097BCC 7F 60 00 38 */ and r0, r27, r0 +/* 8009AC90 00097BD0 40 80 00 08 */ bge lbl_8009AC98 +/* 8009AC94 00097BD4 48 00 00 0C */ b lbl_8009ACA0 +lbl_8009AC98: +/* 8009AC98 00097BD8 7C 03 00 34 */ cntlzw r3, r0 +/* 8009AC9C 00097BDC 38 83 00 20 */ addi r4, r3, 0x20 +lbl_8009ACA0: +/* 8009ACA0 00097BE0 54 85 08 3C */ slwi r5, r4, 1 +/* 8009ACA4 00097BE4 7C 7F 2A 14 */ add r3, r31, r5 +/* 8009ACA8 00097BE8 A0 03 00 00 */ lhz r0, 0(r3) +/* 8009ACAC 00097BEC 7C 7D 2A 14 */ add r3, r29, r5 +/* 8009ACB0 00097BF0 20 A4 00 3F */ subfic r5, r4, 0x3f +/* 8009ACB4 00097BF4 B0 03 00 00 */ sth r0, 0(r3) +/* 8009ACB8 00097BF8 38 60 00 00 */ li r3, 0 +/* 8009ACBC 00097BFC 38 80 00 01 */ li r4, 1 +/* 8009ACC0 00097C00 4B FE 83 6D */ bl __shl2i +/* 8009ACC4 00097C04 80 0D 94 68 */ lwz r0, changed@sda21(r13) +/* 8009ACC8 00097C08 7C 65 18 F8 */ nor r5, r3, r3 +/* 8009ACCC 00097C0C 7C 84 20 F8 */ nor r4, r4, r4 +/* 8009ACD0 00097C10 80 6D 94 6C */ lwz r3, lbl_80409F2C@sda21(r13) +/* 8009ACD4 00097C14 7C 00 28 38 */ and r0, r0, r5 +/* 8009ACD8 00097C18 7C 63 20 38 */ and r3, r3, r4 +/* 8009ACDC 00097C1C 90 6D 94 6C */ stw r3, lbl_80409F2C@sda21(r13) +/* 8009ACE0 00097C20 90 0D 94 68 */ stw r0, changed@sda21(r13) +lbl_8009ACE4: +/* 8009ACE4 00097C24 80 0D 94 68 */ lwz r0, changed@sda21(r13) +/* 8009ACE8 00097C28 38 60 00 00 */ li r3, 0 +/* 8009ACEC 00097C2C 80 8D 94 6C */ lwz r4, lbl_80409F2C@sda21(r13) +/* 8009ACF0 00097C30 7C 00 1A 78 */ xor r0, r0, r3 +/* 8009ACF4 00097C34 7C 83 1A 78 */ xor r3, r4, r3 +/* 8009ACF8 00097C38 7C 60 03 79 */ or. r0, r3, r0 +/* 8009ACFC 00097C3C 40 82 FF 70 */ bne lbl_8009AC6C +/* 8009AD00 00097C40 38 00 00 01 */ li r0, 1 +/* 8009AD04 00097C44 90 0D 94 44 */ stw r0, flushFlag@sda21(r13) +/* 8009AD08 00097C48 7F C3 F3 78 */ mr r3, r30 +/* 8009AD0C 00097C4C 4B FF 54 E9 */ bl OSRestoreInterrupts +/* 8009AD10 00097C50 BB 61 00 14 */ lmw r27, 0x14(r1) +/* 8009AD14 00097C54 80 01 00 2C */ lwz r0, 0x2c(r1) +/* 8009AD18 00097C58 38 21 00 28 */ addi r1, r1, 0x28 +/* 8009AD1C 00097C5C 7C 08 03 A6 */ mtlr r0 +/* 8009AD20 00097C60 4E 80 00 20 */ blr + +.global VISetNextFrameBuffer +VISetNextFrameBuffer: +/* 8009AD24 00097C64 7C 08 02 A6 */ mflr r0 +/* 8009AD28 00097C68 3C 80 80 3F */ lis r4, regs@ha +/* 8009AD2C 00097C6C 90 01 00 04 */ stw r0, 4(r1) +/* 8009AD30 00097C70 94 21 FF E8 */ stwu r1, -0x18(r1) +/* 8009AD34 00097C74 93 E1 00 14 */ stw r31, 0x14(r1) +/* 8009AD38 00097C78 3B E4 BD C8 */ addi r31, r4, regs@l +/* 8009AD3C 00097C7C 93 C1 00 10 */ stw r30, 0x10(r1) +/* 8009AD40 00097C80 3B C3 00 00 */ addi r30, r3, 0 +/* 8009AD44 00097C84 4B FF 54 89 */ bl OSDisableInterrupts +/* 8009AD48 00097C88 93 DF 01 20 */ stw r30, 0x120(r31) +/* 8009AD4C 00097C8C 38 00 00 01 */ li r0, 1 +/* 8009AD50 00097C90 3B C3 00 00 */ addi r30, r3, 0 +/* 8009AD54 00097C94 90 0D 94 88 */ stw r0, FBSet@sda21(r13) +/* 8009AD58 00097C98 38 7F 00 F0 */ addi r3, r31, 0xf0 +/* 8009AD5C 00097C9C 38 9F 01 24 */ addi r4, r31, 0x124 +/* 8009AD60 00097CA0 38 BF 01 28 */ addi r5, r31, 0x128 +/* 8009AD64 00097CA4 38 DF 01 3C */ addi r6, r31, 0x13c +/* 8009AD68 00097CA8 38 FF 01 40 */ addi r7, r31, 0x140 +/* 8009AD6C 00097CAC 4B FF F2 8D */ bl setFbbRegs +/* 8009AD70 00097CB0 7F C3 F3 78 */ mr r3, r30 +/* 8009AD74 00097CB4 4B FF 54 81 */ bl OSRestoreInterrupts +/* 8009AD78 00097CB8 80 01 00 1C */ lwz r0, 0x1c(r1) +/* 8009AD7C 00097CBC 83 E1 00 14 */ lwz r31, 0x14(r1) +/* 8009AD80 00097CC0 83 C1 00 10 */ lwz r30, 0x10(r1) +/* 8009AD84 00097CC4 38 21 00 18 */ addi r1, r1, 0x18 +/* 8009AD88 00097CC8 7C 08 03 A6 */ mtlr r0 +/* 8009AD8C 00097CCC 4E 80 00 20 */ blr + +.global VISetBlack +VISetBlack: +/* 8009AD90 00097CD0 7C 08 02 A6 */ mflr r0 +/* 8009AD94 00097CD4 3C 80 80 3F */ lis r4, regs@ha +/* 8009AD98 00097CD8 90 01 00 04 */ stw r0, 4(r1) +/* 8009AD9C 00097CDC 94 21 FF E0 */ stwu r1, -0x20(r1) +/* 8009ADA0 00097CE0 93 E1 00 1C */ stw r31, 0x1c(r1) +/* 8009ADA4 00097CE4 3B E4 BD C8 */ addi r31, r4, regs@l +/* 8009ADA8 00097CE8 93 C1 00 18 */ stw r30, 0x18(r1) +/* 8009ADAC 00097CEC 3B C3 00 00 */ addi r30, r3, 0 +/* 8009ADB0 00097CF0 4B FF 54 1D */ bl OSDisableInterrupts +/* 8009ADB4 00097CF4 93 DF 01 30 */ stw r30, 0x130(r31) +/* 8009ADB8 00097CF8 7C 7E 1B 78 */ mr r30, r3 +/* 8009ADBC 00097CFC 81 5F 01 44 */ lwz r10, 0x144(r31) +/* 8009ADC0 00097D00 80 1F 01 30 */ lwz r0, 0x130(r31) +/* 8009ADC4 00097D04 90 01 00 08 */ stw r0, 8(r1) +/* 8009ADC8 00097D08 A0 7F 00 FA */ lhz r3, 0xfa(r31) +/* 8009ADCC 00097D0C A0 9F 00 F6 */ lhz r4, 0xf6(r31) +/* 8009ADD0 00097D10 88 AA 00 00 */ lbz r5, 0(r10) +/* 8009ADD4 00097D14 A0 CA 00 02 */ lhz r6, 2(r10) +/* 8009ADD8 00097D18 A0 EA 00 04 */ lhz r7, 4(r10) +/* 8009ADDC 00097D1C A1 0A 00 06 */ lhz r8, 6(r10) +/* 8009ADE0 00097D20 A1 2A 00 08 */ lhz r9, 8(r10) +/* 8009ADE4 00097D24 A1 4A 00 0A */ lhz r10, 0xa(r10) +/* 8009ADE8 00097D28 4B FF F4 E5 */ bl setVerticalRegs +/* 8009ADEC 00097D2C 7F C3 F3 78 */ mr r3, r30 +/* 8009ADF0 00097D30 4B FF 54 05 */ bl OSRestoreInterrupts +/* 8009ADF4 00097D34 80 01 00 24 */ lwz r0, 0x24(r1) +/* 8009ADF8 00097D38 83 E1 00 1C */ lwz r31, 0x1c(r1) +/* 8009ADFC 00097D3C 83 C1 00 18 */ lwz r30, 0x18(r1) +/* 8009AE00 00097D40 38 21 00 20 */ addi r1, r1, 0x20 +/* 8009AE04 00097D44 7C 08 03 A6 */ mtlr r0 +/* 8009AE08 00097D48 4E 80 00 20 */ blr + +.global VIGetRetraceCount +VIGetRetraceCount: +/* 8009AE0C 00097D4C 80 6D 94 40 */ lwz r3, retraceCount@sda21(r13) +/* 8009AE10 00097D50 4E 80 00 20 */ blr + +.global getCurrentFieldEvenOdd +getCurrentFieldEvenOdd: +/* 8009AE14 00097D54 3C 60 CC 00 */ lis r3, 0xCC002000@ha +/* 8009AE18 00097D58 38 E3 20 00 */ addi r7, r3, 0xCC002000@l +/* 8009AE1C 00097D5C A4 07 00 2C */ lhzu r0, 0x2c(r7) +/* 8009AE20 00097D60 38 83 20 00 */ addi r4, r3, 0x2000 +/* 8009AE24 00097D64 54 05 05 7E */ clrlwi r5, r0, 0x15 +lbl_8009AE28: +/* 8009AE28 00097D68 A0 07 00 00 */ lhz r0, 0(r7) +/* 8009AE2C 00097D6C 7C A6 2B 78 */ mr r6, r5 +/* 8009AE30 00097D70 A0 64 00 2E */ lhz r3, 0x2e(r4) +/* 8009AE34 00097D74 54 05 05 7E */ clrlwi r5, r0, 0x15 +/* 8009AE38 00097D78 7C 06 28 40 */ cmplw r6, r5 +/* 8009AE3C 00097D7C 54 63 05 7E */ clrlwi r3, r3, 0x15 +/* 8009AE40 00097D80 40 82 FF E8 */ bne lbl_8009AE28 +/* 8009AE44 00097D84 80 CD 94 80 */ lwz r6, CurrTiming@sda21(r13) +/* 8009AE48 00097D88 38 05 FF FF */ addi r0, r5, -1 +/* 8009AE4C 00097D8C 38 83 FF FF */ addi r4, r3, -1 +/* 8009AE50 00097D90 A0 66 00 1A */ lhz r3, 0x1a(r6) +/* 8009AE54 00097D94 54 05 08 3C */ slwi r5, r0, 1 +/* 8009AE58 00097D98 A0 06 00 18 */ lhz r0, 0x18(r6) +/* 8009AE5C 00097D9C 7C 64 1B 96 */ divwu r3, r4, r3 +/* 8009AE60 00097DA0 7C 65 1A 14 */ add r3, r5, r3 +/* 8009AE64 00097DA4 7C 03 00 40 */ cmplw r3, r0 +/* 8009AE68 00097DA8 40 80 00 0C */ bge lbl_8009AE74 +/* 8009AE6C 00097DAC 38 60 00 01 */ li r3, 1 +/* 8009AE70 00097DB0 4E 80 00 20 */ blr +lbl_8009AE74: +/* 8009AE74 00097DB4 38 60 00 00 */ li r3, 0 +/* 8009AE78 00097DB8 4E 80 00 20 */ blr + +.global VIGetNextField +VIGetNextField: +/* 8009AE7C 00097DBC 7C 08 02 A6 */ mflr r0 +/* 8009AE80 00097DC0 90 01 00 04 */ stw r0, 4(r1) +/* 8009AE84 00097DC4 94 21 FF E0 */ stwu r1, -0x20(r1) +/* 8009AE88 00097DC8 93 E1 00 1C */ stw r31, 0x1c(r1) +/* 8009AE8C 00097DCC 4B FF 53 41 */ bl OSDisableInterrupts +/* 8009AE90 00097DD0 3C 80 CC 00 */ lis r4, 0xCC002000@ha +/* 8009AE94 00097DD4 39 04 20 00 */ addi r8, r4, 0xCC002000@l +/* 8009AE98 00097DD8 A4 08 00 2C */ lhzu r0, 0x2c(r8) +/* 8009AE9C 00097DDC 38 A4 20 00 */ addi r5, r4, 0x2000 +/* 8009AEA0 00097DE0 54 06 05 7E */ clrlwi r6, r0, 0x15 +lbl_8009AEA4: +/* 8009AEA4 00097DE4 A0 08 00 00 */ lhz r0, 0(r8) +/* 8009AEA8 00097DE8 7C C7 33 78 */ mr r7, r6 +/* 8009AEAC 00097DEC A0 85 00 2E */ lhz r4, 0x2e(r5) +/* 8009AEB0 00097DF0 54 06 05 7E */ clrlwi r6, r0, 0x15 +/* 8009AEB4 00097DF4 7C 07 30 40 */ cmplw r7, r6 +/* 8009AEB8 00097DF8 54 84 05 7E */ clrlwi r4, r4, 0x15 +/* 8009AEBC 00097DFC 40 82 FF E8 */ bne lbl_8009AEA4 +/* 8009AEC0 00097E00 80 ED 94 80 */ lwz r7, CurrTiming@sda21(r13) +/* 8009AEC4 00097E04 38 06 FF FF */ addi r0, r6, -1 +/* 8009AEC8 00097E08 38 A4 FF FF */ addi r5, r4, -1 +/* 8009AECC 00097E0C A0 87 00 1A */ lhz r4, 0x1a(r7) +/* 8009AED0 00097E10 54 06 08 3C */ slwi r6, r0, 1 +/* 8009AED4 00097E14 A0 07 00 18 */ lhz r0, 0x18(r7) +/* 8009AED8 00097E18 7C 85 23 96 */ divwu r4, r5, r4 +/* 8009AEDC 00097E1C 7C 86 22 14 */ add r4, r6, r4 +/* 8009AEE0 00097E20 7C 04 00 40 */ cmplw r4, r0 +/* 8009AEE4 00097E24 40 80 00 0C */ bge lbl_8009AEF0 +/* 8009AEE8 00097E28 3B E0 00 01 */ li r31, 1 +/* 8009AEEC 00097E2C 48 00 00 08 */ b lbl_8009AEF4 +lbl_8009AEF0: +/* 8009AEF0 00097E30 3B E0 00 00 */ li r31, 0 +lbl_8009AEF4: +/* 8009AEF4 00097E34 4B FF 53 01 */ bl OSRestoreInterrupts +/* 8009AEF8 00097E38 3C 60 80 3F */ lis r3, HorVer@ha +/* 8009AEFC 00097E3C 38 63 BE B8 */ addi r3, r3, HorVer@l +/* 8009AF00 00097E40 A0 03 00 0A */ lhz r0, 0xa(r3) +/* 8009AF04 00097E44 6B E3 00 01 */ xori r3, r31, 1 +/* 8009AF08 00097E48 54 00 07 FE */ clrlwi r0, r0, 0x1f +/* 8009AF0C 00097E4C 7C 63 02 78 */ xor r3, r3, r0 +/* 8009AF10 00097E50 80 01 00 24 */ lwz r0, 0x24(r1) +/* 8009AF14 00097E54 83 E1 00 1C */ lwz r31, 0x1c(r1) +/* 8009AF18 00097E58 38 21 00 20 */ addi r1, r1, 0x20 +/* 8009AF1C 00097E5C 7C 08 03 A6 */ mtlr r0 +/* 8009AF20 00097E60 4E 80 00 20 */ blr + +.global VIGetCurrentLine +VIGetCurrentLine: +/* 8009AF24 00097E64 7C 08 02 A6 */ mflr r0 +/* 8009AF28 00097E68 90 01 00 04 */ stw r0, 4(r1) +/* 8009AF2C 00097E6C 94 21 FF F0 */ stwu r1, -0x10(r1) +/* 8009AF30 00097E70 93 E1 00 0C */ stw r31, 0xc(r1) +/* 8009AF34 00097E74 93 C1 00 08 */ stw r30, 8(r1) +/* 8009AF38 00097E78 83 ED 94 80 */ lwz r31, CurrTiming@sda21(r13) +/* 8009AF3C 00097E7C 4B FF 52 91 */ bl OSDisableInterrupts +/* 8009AF40 00097E80 3C 80 CC 00 */ lis r4, 0xCC002000@ha +/* 8009AF44 00097E84 39 04 20 00 */ addi r8, r4, 0xCC002000@l +/* 8009AF48 00097E88 A4 08 00 2C */ lhzu r0, 0x2c(r8) +/* 8009AF4C 00097E8C 38 A4 20 00 */ addi r5, r4, 0x2000 +/* 8009AF50 00097E90 54 06 05 7E */ clrlwi r6, r0, 0x15 +lbl_8009AF54: +/* 8009AF54 00097E94 A0 08 00 00 */ lhz r0, 0(r8) +/* 8009AF58 00097E98 7C C7 33 78 */ mr r7, r6 +/* 8009AF5C 00097E9C A0 85 00 2E */ lhz r4, 0x2e(r5) +/* 8009AF60 00097EA0 54 06 05 7E */ clrlwi r6, r0, 0x15 +/* 8009AF64 00097EA4 7C 07 30 40 */ cmplw r7, r6 +/* 8009AF68 00097EA8 54 87 05 7E */ clrlwi r7, r4, 0x15 +/* 8009AF6C 00097EAC 40 82 FF E8 */ bne lbl_8009AF54 +/* 8009AF70 00097EB0 80 8D 94 80 */ lwz r4, CurrTiming@sda21(r13) +/* 8009AF74 00097EB4 38 A7 FF FF */ addi r5, r7, -1 +/* 8009AF78 00097EB8 38 C6 FF FF */ addi r6, r6, -1 +/* 8009AF7C 00097EBC A0 04 00 1A */ lhz r0, 0x1a(r4) +/* 8009AF80 00097EC0 54 C4 08 3C */ slwi r4, r6, 1 +/* 8009AF84 00097EC4 7C 05 03 96 */ divwu r0, r5, r0 +/* 8009AF88 00097EC8 7F C4 02 14 */ add r30, r4, r0 +/* 8009AF8C 00097ECC 4B FF 52 69 */ bl OSRestoreInterrupts +/* 8009AF90 00097ED0 A0 1F 00 18 */ lhz r0, 0x18(r31) +/* 8009AF94 00097ED4 7C 1E 00 40 */ cmplw r30, r0 +/* 8009AF98 00097ED8 41 80 00 08 */ blt lbl_8009AFA0 +/* 8009AF9C 00097EDC 7F C0 F0 50 */ subf r30, r0, r30 +lbl_8009AFA0: +/* 8009AFA0 00097EE0 57 C3 F8 7E */ srwi r3, r30, 1 +/* 8009AFA4 00097EE4 80 01 00 14 */ lwz r0, 0x14(r1) +/* 8009AFA8 00097EE8 83 E1 00 0C */ lwz r31, 0xc(r1) +/* 8009AFAC 00097EEC 83 C1 00 08 */ lwz r30, 8(r1) +/* 8009AFB0 00097EF0 38 21 00 10 */ addi r1, r1, 0x10 +/* 8009AFB4 00097EF4 7C 08 03 A6 */ mtlr r0 +/* 8009AFB8 00097EF8 4E 80 00 20 */ blr + +.global VIGetTvFormat +VIGetTvFormat: +/* 8009AFBC 00097EFC 7C 08 02 A6 */ mflr r0 +/* 8009AFC0 00097F00 90 01 00 04 */ stw r0, 4(r1) +/* 8009AFC4 00097F04 94 21 FF F0 */ stwu r1, -0x10(r1) +/* 8009AFC8 00097F08 93 E1 00 0C */ stw r31, 0xc(r1) +/* 8009AFCC 00097F0C 4B FF 52 01 */ bl OSDisableInterrupts +/* 8009AFD0 00097F10 80 0D 94 84 */ lwz r0, CurrTvMode@sda21(r13) +/* 8009AFD4 00097F14 2C 00 00 03 */ cmpwi r0, 3 +/* 8009AFD8 00097F18 41 82 00 30 */ beq lbl_8009B008 +/* 8009AFDC 00097F1C 40 80 00 1C */ bge lbl_8009AFF8 +/* 8009AFE0 00097F20 2C 00 00 01 */ cmpwi r0, 1 +/* 8009AFE4 00097F24 41 82 00 2C */ beq lbl_8009B010 +/* 8009AFE8 00097F28 40 80 00 30 */ bge lbl_8009B018 +/* 8009AFEC 00097F2C 2C 00 00 00 */ cmpwi r0, 0 +/* 8009AFF0 00097F30 40 80 00 18 */ bge lbl_8009B008 +/* 8009AFF4 00097F34 48 00 00 28 */ b lbl_8009B01C +lbl_8009AFF8: +/* 8009AFF8 00097F38 2C 00 00 05 */ cmpwi r0, 5 +/* 8009AFFC 00097F3C 41 82 00 1C */ beq lbl_8009B018 +/* 8009B000 00097F40 40 80 00 1C */ bge lbl_8009B01C +/* 8009B004 00097F44 48 00 00 0C */ b lbl_8009B010 +lbl_8009B008: +/* 8009B008 00097F48 3B E0 00 00 */ li r31, 0 +/* 8009B00C 00097F4C 48 00 00 10 */ b lbl_8009B01C +lbl_8009B010: +/* 8009B010 00097F50 3B E0 00 01 */ li r31, 1 +/* 8009B014 00097F54 48 00 00 08 */ b lbl_8009B01C +lbl_8009B018: +/* 8009B018 00097F58 7C 1F 03 78 */ mr r31, r0 +lbl_8009B01C: +/* 8009B01C 00097F5C 4B FF 51 D9 */ bl OSRestoreInterrupts +/* 8009B020 00097F60 7F E3 FB 78 */ mr r3, r31 +/* 8009B024 00097F64 80 01 00 14 */ lwz r0, 0x14(r1) +/* 8009B028 00097F68 83 E1 00 0C */ lwz r31, 0xc(r1) +/* 8009B02C 00097F6C 38 21 00 10 */ addi r1, r1, 0x10 +/* 8009B030 00097F70 7C 08 03 A6 */ mtlr r0 +/* 8009B034 00097F74 4E 80 00 20 */ blr + +.global VIGetDTVStatus +VIGetDTVStatus: +/* 8009B038 00097F78 7C 08 02 A6 */ mflr r0 +/* 8009B03C 00097F7C 90 01 00 04 */ stw r0, 4(r1) +/* 8009B040 00097F80 94 21 FF F0 */ stwu r1, -0x10(r1) +/* 8009B044 00097F84 93 E1 00 0C */ stw r31, 0xc(r1) +/* 8009B048 00097F88 4B FF 51 85 */ bl OSDisableInterrupts +/* 8009B04C 00097F8C 3C 80 CC 00 */ lis r4, 0xCC00206E@ha +/* 8009B050 00097F90 A0 04 20 6E */ lhz r0, 0xCC00206E@l(r4) +/* 8009B054 00097F94 54 1F 07 BE */ clrlwi r31, r0, 0x1e +/* 8009B058 00097F98 4B FF 51 9D */ bl OSRestoreInterrupts +/* 8009B05C 00097F9C 57 E3 07 FE */ clrlwi r3, r31, 0x1f +/* 8009B060 00097FA0 80 01 00 14 */ lwz r0, 0x14(r1) +/* 8009B064 00097FA4 83 E1 00 0C */ lwz r31, 0xc(r1) +/* 8009B068 00097FA8 38 21 00 10 */ addi r1, r1, 0x10 +/* 8009B06C 00097FAC 7C 08 03 A6 */ mtlr r0 +/* 8009B070 00097FB0 4E 80 00 20 */ blr + +.section .data, "wa" # 0x803A8380 - 0x803E6000 +timing: + .4byte 0x060000F0 + .4byte 0x00180019 + .4byte 0x00030002 + .4byte 0x0C0D0C0D + .4byte 0x02080207 + .4byte 0x02080207 + .4byte 0x020D01AD + .4byte 0x404769A2 + .4byte 0x01757A00 + .4byte 0x019C0600 + .4byte 0x00F00018 + .4byte 0x00180004 + .4byte 0x00040C0C + .4byte 0x0C0C0208 + .4byte 0x02080208 + .4byte 0x0208020E + .4byte 0x01AD4047 + .4byte 0x69A20175 + .4byte 0x7A00019C + .4byte 0x0500011F + .4byte 0x00230024 + .4byte 0x00010000 + .4byte 0x0D0C0B0A + .4byte 0x026B026A + .4byte 0x0269026C + .4byte 0x027101B0 + .4byte 0x404B6AAC + .4byte 0x017C8500 + .4byte 0x01A40500 + .4byte 0x011F0021 + .4byte 0x00210002 + .4byte 0x00020D0B + .4byte 0x0D0B026B + .4byte 0x026D026B + .4byte 0x026D0270 + .4byte 0x01B0404B + .4byte 0x6AAC017C + .4byte 0x850001A4 + .4byte 0x060000F0 + .4byte 0x00180019 + .4byte 0x00030002 + .4byte 0x100F0E0D + .4byte 0x02060205 + .4byte 0x02040207 + .4byte 0x020D01AD + .4byte 0x404E70A2 + .4byte 0x01757A00 + .4byte 0x019C0600 + .4byte 0x00F00018 + .4byte 0x00180004 + .4byte 0x0004100E + .4byte 0x100E0206 + .4byte 0x02080206 + .4byte 0x0208020E + .4byte 0x01AD404E + .4byte 0x70A20175 + .4byte 0x7A00019C + .4byte 0x0C0001E0 + .4byte 0x00300030 + .4byte 0x00060006 + .4byte 0x18181818 + .4byte 0x040E040E + .4byte 0x040E040E + .4byte 0x041A01AD + .4byte 0x404769A2 + .4byte 0x01757A00 + .4byte 0x019C0C00 + .4byte 0x01E0002C + .4byte 0x002C000A + .4byte 0x000A1818 + .4byte 0x1818040E + .4byte 0x040E040E + .4byte 0x040E041A + .4byte 0x01AD4047 + .4byte 0x69A8017B + .4byte 0x7A00019C +taps: + .4byte 0x01F001DC + .4byte 0x01AE0174 + .4byte 0x012900DB + .4byte 0x008E0046 + .4byte 0x000C00E2 + .4byte 0x00CB00C0 + .4byte 0x00C400CF + .4byte 0x00DE00EC + .4byte 0x00FC0008 + .4byte 0x000F0013 + .4byte 0x0013000F + .4byte 0x000C0008 + .4byte 0x00010000 +"@92": + .4byte lbl_800998CC + .4byte lbl_800998D4 + .4byte lbl_8009990C + .4byte lbl_80099914 + .4byte lbl_800998DC + .4byte lbl_800998E4 + .4byte lbl_8009992C + .4byte lbl_8009992C + .4byte lbl_800998FC + .4byte lbl_80099904 + .4byte lbl_8009992C + .4byte lbl_8009992C + .4byte lbl_8009992C + .4byte lbl_8009992C + .4byte lbl_8009992C + .4byte lbl_8009992C + .4byte lbl_8009991C + .4byte lbl_80099924 + .4byte lbl_8009992C + .4byte lbl_8009992C + .4byte lbl_800998EC + .4byte lbl_800998F4 +"@336": + .asciz "***************************************\n" + .balign 4 +"@337": + .asciz " ! ! ! C A U T I O N ! ! ! \n" + .balign 4 +"@338": + .asciz "This TV format \"DEBUG_PAL\" is only for \n" + .balign 4 +"@339": + .asciz "temporary solution until PAL DAC board \n" + .balign 4 +"@340": + .asciz "is available. Please do NOT use this \n" + .balign 4 +"@341": + .asciz "mode in real games!!! \n" + .balign 4 + .4byte 0 + +.section .bss, "wa" # 0x803E6000 - 0x80408AC0 +regs: + .skip 0x78 +shdwRegs: + .skip 0x78 +HorVer: + .skip 0x58 + +.section .sbss, "wa" # 0x804097C0 - 0x8040B45C +retraceCount: + .skip 0x4 +flushFlag: + .skip 0x4 +retraceQueue: + .skip 0x8 +PreCB: + .skip 0x4 +PostCB: + .skip 0x4 +encoderType: + .skip 0x4 +displayOffsetH: + .skip 0x2 +displayOffsetV: + .skip 0x2 +changeMode: + .skip 0x8 +changed: + .skip 0x4 +lbl_80409F2C: + .skip 0x4 +shdwChangeMode: + .skip 0x8 +shdwChanged: + .skip 0x4 +lbl_80409F3C: + .skip 0x4 +CurrTiming: + .skip 0x4 +CurrTvMode: + .skip 0x4 +FBSet: + .skip 0x4 +message$332: + .skip 0x4 diff --git a/asm/MSL_C.PPCEABI.bare.H/ansi_fp.s b/asm/MSL_C.PPCEABI.bare.H/ansi_fp.s new file mode 100644 index 0000000..641a10f --- /dev/null +++ b/asm/MSL_C.PPCEABI.bare.H/ansi_fp.s @@ -0,0 +1,343 @@ +.include "macros.inc" + +.section .text, "ax" # 0x80005600 - 0x8036FBA0 +.global __num2dec +__num2dec: +/* 800833A4 000802E4 7C 08 02 A6 */ mflr r0 +/* 800833A8 000802E8 90 01 00 04 */ stw r0, 4(r1) +/* 800833AC 000802EC 94 21 FF 98 */ stwu r1, -0x68(r1) +/* 800833B0 000802F0 DB E1 00 60 */ stfd f31, 0x60(r1) +/* 800833B4 000802F4 FF E0 08 90 */ fmr f31, f1 +/* 800833B8 000802F8 93 E1 00 5C */ stw r31, 0x5c(r1) +/* 800833BC 000802FC 93 C1 00 58 */ stw r30, 0x58(r1) +/* 800833C0 00080300 3B C4 00 00 */ addi r30, r4, 0 +/* 800833C4 00080304 93 A1 00 54 */ stw r29, 0x54(r1) +/* 800833C8 00080308 7C 7D 1B 78 */ mr r29, r3 +/* 800833CC 0008030C A8 03 00 02 */ lha r0, 2(r3) +/* 800833D0 00080310 2C 00 00 10 */ cmpwi r0, 0x10 +/* 800833D4 00080314 7C 1F 03 78 */ mr r31, r0 +/* 800833D8 00080318 40 81 00 08 */ ble lbl_800833E0 +/* 800833DC 0008031C 3B E0 00 10 */ li r31, 0x10 +lbl_800833E0: +/* 800833E0 00080320 38 60 00 00 */ li r3, 0 +/* 800833E4 00080324 98 7E 00 00 */ stb r3, 0(r30) +/* 800833E8 00080328 38 00 00 01 */ li r0, 1 +/* 800833EC 0008032C B0 7E 00 02 */ sth r3, 2(r30) +/* 800833F0 00080330 98 1E 00 04 */ stb r0, 4(r30) +/* 800833F4 00080334 C8 02 89 58 */ lfd f0, "@268"@sda21(r2) +/* 800833F8 00080338 FC 00 F8 00 */ fcmpu cr0, f0, f31 +/* 800833FC 0008033C 40 82 00 10 */ bne lbl_8008340C +/* 80083400 00080340 38 00 00 30 */ li r0, 0x30 +/* 80083404 00080344 98 1E 00 05 */ stb r0, 5(r30) +/* 80083408 00080348 48 00 03 30 */ b lbl_80083738 +lbl_8008340C: +/* 8008340C 0008034C DB E1 00 28 */ stfd f31, 0x28(r1) +/* 80083410 00080350 3C 00 7F F0 */ lis r0, 0x7ff0 +/* 80083414 00080354 80 81 00 28 */ lwz r4, 0x28(r1) +/* 80083418 00080358 54 83 00 56 */ rlwinm r3, r4, 0, 1, 0xb +/* 8008341C 0008035C 7C 03 00 00 */ cmpw r3, r0 +/* 80083420 00080360 41 82 00 14 */ beq lbl_80083434 +/* 80083424 00080364 40 80 00 58 */ bge lbl_8008347C +/* 80083428 00080368 2C 03 00 00 */ cmpwi r3, 0 +/* 8008342C 0008036C 41 82 00 2C */ beq lbl_80083458 +/* 80083430 00080370 48 00 00 4C */ b lbl_8008347C +lbl_80083434: +/* 80083434 00080374 54 80 03 3F */ clrlwi. r0, r4, 0xc +/* 80083438 00080378 40 82 00 10 */ bne lbl_80083448 +/* 8008343C 0008037C 80 01 00 2C */ lwz r0, 0x2c(r1) +/* 80083440 00080380 2C 00 00 00 */ cmpwi r0, 0 +/* 80083444 00080384 41 82 00 0C */ beq lbl_80083450 +lbl_80083448: +/* 80083448 00080388 38 00 00 01 */ li r0, 1 +/* 8008344C 0008038C 48 00 00 34 */ b lbl_80083480 +lbl_80083450: +/* 80083450 00080390 38 00 00 02 */ li r0, 2 +/* 80083454 00080394 48 00 00 2C */ b lbl_80083480 +lbl_80083458: +/* 80083458 00080398 54 80 03 3F */ clrlwi. r0, r4, 0xc +/* 8008345C 0008039C 40 82 00 10 */ bne lbl_8008346C +/* 80083460 000803A0 80 01 00 2C */ lwz r0, 0x2c(r1) +/* 80083464 000803A4 2C 00 00 00 */ cmpwi r0, 0 +/* 80083468 000803A8 41 82 00 0C */ beq lbl_80083474 +lbl_8008346C: +/* 8008346C 000803AC 38 00 00 05 */ li r0, 5 +/* 80083470 000803B0 48 00 00 10 */ b lbl_80083480 +lbl_80083474: +/* 80083474 000803B4 38 00 00 03 */ li r0, 3 +/* 80083478 000803B8 48 00 00 08 */ b lbl_80083480 +lbl_8008347C: +/* 8008347C 000803BC 38 00 00 04 */ li r0, 4 +lbl_80083480: +/* 80083480 000803C0 2C 00 00 02 */ cmpwi r0, 2 +/* 80083484 000803C4 41 81 00 94 */ bgt lbl_80083518 +/* 80083488 000803C8 DB E1 00 20 */ stfd f31, 0x20(r1) +/* 8008348C 000803CC 3C 00 7F F0 */ lis r0, 0x7ff0 +/* 80083490 000803D0 80 81 00 20 */ lwz r4, 0x20(r1) +/* 80083494 000803D4 54 83 00 56 */ rlwinm r3, r4, 0, 1, 0xb +/* 80083498 000803D8 7C 03 00 00 */ cmpw r3, r0 +/* 8008349C 000803DC 41 82 00 14 */ beq lbl_800834B0 +/* 800834A0 000803E0 40 80 00 58 */ bge lbl_800834F8 +/* 800834A4 000803E4 2C 03 00 00 */ cmpwi r3, 0 +/* 800834A8 000803E8 41 82 00 2C */ beq lbl_800834D4 +/* 800834AC 000803EC 48 00 00 4C */ b lbl_800834F8 +lbl_800834B0: +/* 800834B0 000803F0 54 80 03 3F */ clrlwi. r0, r4, 0xc +/* 800834B4 000803F4 40 82 00 10 */ bne lbl_800834C4 +/* 800834B8 000803F8 80 01 00 24 */ lwz r0, 0x24(r1) +/* 800834BC 000803FC 2C 00 00 00 */ cmpwi r0, 0 +/* 800834C0 00080400 41 82 00 0C */ beq lbl_800834CC +lbl_800834C4: +/* 800834C4 00080404 38 00 00 01 */ li r0, 1 +/* 800834C8 00080408 48 00 00 34 */ b lbl_800834FC +lbl_800834CC: +/* 800834CC 0008040C 38 00 00 02 */ li r0, 2 +/* 800834D0 00080410 48 00 00 2C */ b lbl_800834FC +lbl_800834D4: +/* 800834D4 00080414 54 80 03 3F */ clrlwi. r0, r4, 0xc +/* 800834D8 00080418 40 82 00 10 */ bne lbl_800834E8 +/* 800834DC 0008041C 80 01 00 24 */ lwz r0, 0x24(r1) +/* 800834E0 00080420 2C 00 00 00 */ cmpwi r0, 0 +/* 800834E4 00080424 41 82 00 0C */ beq lbl_800834F0 +lbl_800834E8: +/* 800834E8 00080428 38 00 00 05 */ li r0, 5 +/* 800834EC 0008042C 48 00 00 10 */ b lbl_800834FC +lbl_800834F0: +/* 800834F0 00080430 38 00 00 03 */ li r0, 3 +/* 800834F4 00080434 48 00 00 08 */ b lbl_800834FC +lbl_800834F8: +/* 800834F8 00080438 38 00 00 04 */ li r0, 4 +lbl_800834FC: +/* 800834FC 0008043C 2C 00 00 01 */ cmpwi r0, 1 +/* 80083500 00080440 40 82 00 0C */ bne lbl_8008350C +/* 80083504 00080444 38 00 00 4E */ li r0, 0x4e +/* 80083508 00080448 48 00 00 08 */ b lbl_80083510 +lbl_8008350C: +/* 8008350C 0008044C 38 00 00 49 */ li r0, 0x49 +lbl_80083510: +/* 80083510 00080450 98 1E 00 05 */ stb r0, 5(r30) +/* 80083514 00080454 48 00 02 24 */ b lbl_80083738 +lbl_80083518: +/* 80083518 00080458 38 00 00 00 */ li r0, 0 +/* 8008351C 0008045C 98 1E 00 04 */ stb r0, 4(r30) +/* 80083520 00080460 C8 02 89 58 */ lfd f0, "@268"@sda21(r2) +/* 80083524 00080464 FC 1F 00 40 */ fcmpo cr0, f31, f0 +/* 80083528 00080468 40 80 00 10 */ bge lbl_80083538 +/* 8008352C 0008046C 38 00 00 01 */ li r0, 1 +/* 80083530 00080470 FF E0 F8 50 */ fneg f31, f31 +/* 80083534 00080474 98 1E 00 00 */ stb r0, 0(r30) +lbl_80083538: +/* 80083538 00080478 FC 20 F8 90 */ fmr f1, f31 +/* 8008353C 0008047C 38 61 00 30 */ addi r3, r1, 0x30 +/* 80083540 00080480 48 00 35 49 */ bl frexp +/* 80083544 00080484 3C 60 00 05 */ lis r3, 0x000497E5@ha +/* 80083548 00080488 80 81 00 30 */ lwz r4, 0x30(r1) +/* 8008354C 0008048C 38 03 97 E5 */ addi r0, r3, 0x000497E5@l +/* 80083550 00080490 7C 04 01 D6 */ mullw r0, r4, r0 +/* 80083554 00080494 3C 60 43 1C */ lis r3, 0x431BDE83@ha +/* 80083558 00080498 38 63 DE 83 */ addi r3, r3, 0x431BDE83@l +/* 8008355C 0008049C 7C 03 00 96 */ mulhw r0, r3, r0 +/* 80083560 000804A0 7C 00 96 70 */ srawi r0, r0, 0x12 +/* 80083564 000804A4 54 03 0F FE */ srwi r3, r0, 0x1f +/* 80083568 000804A8 7C 80 1A 15 */ add. r4, r0, r3 +/* 8008356C 000804AC 3C 60 80 37 */ lis r3, bit_values@ha +/* 80083570 000804B0 38 03 15 98 */ addi r0, r3, bit_values@l +/* 80083574 000804B4 38 64 00 00 */ addi r3, r4, 0 +/* 80083578 000804B8 7C 05 03 78 */ mr r5, r0 +/* 8008357C 000804BC 40 80 00 30 */ bge lbl_800835AC +/* 80083580 000804C0 7C 84 00 D0 */ neg r4, r4 +/* 80083584 000804C4 48 00 00 1C */ b lbl_800835A0 +lbl_80083588: +/* 80083588 000804C8 54 80 07 FF */ clrlwi. r0, r4, 0x1f +/* 8008358C 000804CC 41 82 00 0C */ beq lbl_80083598 +/* 80083590 000804D0 C8 05 00 00 */ lfd f0, 0(r5) +/* 80083594 000804D4 FF FF 00 32 */ fmul f31, f31, f0 +lbl_80083598: +/* 80083598 000804D8 7C 84 0E 70 */ srawi r4, r4, 1 +/* 8008359C 000804DC 38 A5 00 08 */ addi r5, r5, 8 +lbl_800835A0: +/* 800835A0 000804E0 2C 04 00 00 */ cmpwi r4, 0 +/* 800835A4 000804E4 40 82 FF E4 */ bne lbl_80083588 +/* 800835A8 000804E8 48 00 00 34 */ b lbl_800835DC +lbl_800835AC: +/* 800835AC 000804EC 40 81 00 30 */ ble lbl_800835DC +/* 800835B0 000804F0 C8 22 89 60 */ lfd f1, "@270"@sda21(r2) +/* 800835B4 000804F4 48 00 00 1C */ b lbl_800835D0 +lbl_800835B8: +/* 800835B8 000804F8 54 80 07 FF */ clrlwi. r0, r4, 0x1f +/* 800835BC 000804FC 41 82 00 0C */ beq lbl_800835C8 +/* 800835C0 00080500 C8 05 00 00 */ lfd f0, 0(r5) +/* 800835C4 00080504 FC 21 00 32 */ fmul f1, f1, f0 +lbl_800835C8: +/* 800835C8 00080508 7C 84 0E 70 */ srawi r4, r4, 1 +/* 800835CC 0008050C 38 A5 00 08 */ addi r5, r5, 8 +lbl_800835D0: +/* 800835D0 00080510 2C 04 00 00 */ cmpwi r4, 0 +/* 800835D4 00080514 40 82 FF E4 */ bne lbl_800835B8 +/* 800835D8 00080518 FF FF 08 24 */ fdiv f31, f31, f1 +lbl_800835DC: +/* 800835DC 0008051C C8 22 89 70 */ lfd f1, "@362"@sda21(r2) +/* 800835E0 00080520 C8 02 89 60 */ lfd f0, "@270"@sda21(r2) +/* 800835E4 00080524 48 00 00 0C */ b lbl_800835F0 +lbl_800835E8: +/* 800835E8 00080528 FF FF 00 72 */ fmul f31, f31, f1 +/* 800835EC 0008052C 38 63 00 01 */ addi r3, r3, 1 +lbl_800835F0: +/* 800835F0 00080530 FC 1F 00 40 */ fcmpo cr0, f31, f0 +/* 800835F4 00080534 4C 41 13 82 */ cror 2, 1, 2 +/* 800835F8 00080538 41 82 FF F0 */ beq lbl_800835E8 +/* 800835FC 0008053C C8 22 89 78 */ lfd f1, "@363"@sda21(r2) +/* 80083600 00080540 C8 02 89 70 */ lfd f0, "@362"@sda21(r2) +/* 80083604 00080544 48 00 00 0C */ b lbl_80083610 +lbl_80083608: +/* 80083608 00080548 FF FF 00 72 */ fmul f31, f31, f1 +/* 8008360C 0008054C 38 63 FF FF */ addi r3, r3, -1 +lbl_80083610: +/* 80083610 00080550 FC 1F 00 40 */ fcmpo cr0, f31, f0 +/* 80083614 00080554 41 80 FF F4 */ blt lbl_80083608 +/* 80083618 00080558 3C A0 66 66 */ lis r5, 0x66666667@ha +/* 8008361C 0008055C C8 22 89 68 */ lfd f1, "@272"@sda21(r2) +/* 80083620 00080560 3C C0 80 37 */ lis r6, digit_values@ha +/* 80083624 00080564 38 9E 00 05 */ addi r4, r30, 5 +/* 80083628 00080568 38 E5 66 67 */ addi r7, r5, 0x66666667@l +/* 8008362C 0008056C 39 46 15 E0 */ addi r10, r6, digit_values@l +/* 80083630 00080570 3D 20 43 30 */ lis r9, 0x4330 +/* 80083634 00080574 48 00 00 AC */ b lbl_800836E0 +lbl_80083638: +/* 80083638 00080578 2C 1F 00 08 */ cmpwi r31, 8 +/* 8008363C 0008057C 39 9F 00 00 */ addi r12, r31, 0 +/* 80083640 00080580 40 81 00 08 */ ble lbl_80083648 +/* 80083644 00080584 39 80 00 08 */ li r12, 8 +lbl_80083648: +/* 80083648 00080588 88 DE 00 04 */ lbz r6, 4(r30) +/* 8008364C 0008058C 55 80 18 38 */ slwi r0, r12, 3 +/* 80083650 00080590 7C AA 02 14 */ add r5, r10, r0 +/* 80083654 00080594 7C 06 62 14 */ add r0, r6, r12 +/* 80083658 00080598 98 1E 00 04 */ stb r0, 4(r30) +/* 8008365C 0008059C 7F EC F8 50 */ subf r31, r12, r31 +/* 80083660 000805A0 7C 6C 18 50 */ subf r3, r12, r3 +/* 80083664 000805A4 C8 05 FF F8 */ lfd f0, -8(r5) +/* 80083668 000805A8 7C 84 62 14 */ add r4, r4, r12 +/* 8008366C 000805AC 39 6C 00 01 */ addi r11, r12, 1 +/* 80083670 000805B0 FF FF 00 32 */ fmul f31, f31, f0 +/* 80083674 000805B4 FC 00 F8 1E */ fctiwz f0, f31 +/* 80083678 000805B8 D8 01 00 40 */ stfd f0, 0x40(r1) +/* 8008367C 000805BC 80 01 00 44 */ lwz r0, 0x44(r1) +/* 80083680 000805C0 D8 01 00 48 */ stfd f0, 0x48(r1) +/* 80083684 000805C4 6C 00 80 00 */ xoris r0, r0, 0x8000 +/* 80083688 000805C8 90 01 00 3C */ stw r0, 0x3c(r1) +/* 8008368C 000805CC 80 C1 00 4C */ lwz r6, 0x4c(r1) +/* 80083690 000805D0 91 21 00 38 */ stw r9, 0x38(r1) +/* 80083694 000805D4 C8 01 00 38 */ lfd f0, 0x38(r1) +/* 80083698 000805D8 FC 00 08 28 */ fsub f0, f0, f1 +/* 8008369C 000805DC FF FF 00 28 */ fsub f31, f31, f0 +/* 800836A0 000805E0 48 00 00 34 */ b lbl_800836D4 +lbl_800836A4: +/* 800836A4 000805E4 7D 07 30 96 */ mulhw r8, r7, r6 +/* 800836A8 000805E8 7D 00 16 70 */ srawi r0, r8, 2 +/* 800836AC 000805EC 54 05 0F FE */ srwi r5, r0, 0x1f +/* 800836B0 000805F0 7C 00 2A 14 */ add r0, r0, r5 +/* 800836B4 000805F4 1C 00 00 0A */ mulli r0, r0, 0xa +/* 800836B8 000805F8 7C C0 30 50 */ subf r6, r0, r6 +/* 800836BC 000805FC 7D 00 16 70 */ srawi r0, r8, 2 +/* 800836C0 00080600 38 C6 00 30 */ addi r6, r6, 0x30 +/* 800836C4 00080604 98 C4 FF FF */ stb r6, -1(r4) +/* 800836C8 00080608 54 05 0F FE */ srwi r5, r0, 0x1f +/* 800836CC 0008060C 7C C0 2A 14 */ add r6, r0, r5 +/* 800836D0 00080610 38 84 FF FF */ addi r4, r4, -1 +lbl_800836D4: +/* 800836D4 00080614 35 6B FF FF */ addic. r11, r11, -1 +/* 800836D8 00080618 40 82 FF CC */ bne lbl_800836A4 +/* 800836DC 0008061C 7C 84 62 14 */ add r4, r4, r12 +lbl_800836E0: +/* 800836E0 00080620 2C 1F 00 00 */ cmpwi r31, 0 +/* 800836E4 00080624 40 82 FF 54 */ bne lbl_80083638 +/* 800836E8 00080628 A8 BD 00 02 */ lha r5, 2(r29) +/* 800836EC 0008062C 2C 05 00 24 */ cmpwi r5, 0x24 +/* 800836F0 00080630 40 81 00 08 */ ble lbl_800836F8 +/* 800836F4 00080634 38 A0 00 24 */ li r5, 0x24 +lbl_800836F8: +/* 800836F8 00080638 88 1E 00 04 */ lbz r0, 4(r30) +/* 800836FC 0008063C 7C A0 28 51 */ subf. r5, r0, r5 +/* 80083700 00080640 40 81 00 30 */ ble lbl_80083730 +/* 80083704 00080644 38 C5 00 01 */ addi r6, r5, 1 +/* 80083708 00080648 38 00 00 30 */ li r0, 0x30 +/* 8008370C 0008064C 48 00 00 0C */ b lbl_80083718 +lbl_80083710: +/* 80083710 00080650 98 04 00 00 */ stb r0, 0(r4) +/* 80083714 00080654 38 84 00 01 */ addi r4, r4, 1 +lbl_80083718: +/* 80083718 00080658 34 C6 FF FF */ addic. r6, r6, -1 +/* 8008371C 0008065C 40 82 FF F4 */ bne lbl_80083710 +/* 80083720 00080660 88 1E 00 04 */ lbz r0, 4(r30) +/* 80083724 00080664 7C 65 18 50 */ subf r3, r5, r3 +/* 80083728 00080668 7C 00 2A 14 */ add r0, r0, r5 +/* 8008372C 0008066C 98 1E 00 04 */ stb r0, 4(r30) +lbl_80083730: +/* 80083730 00080670 7C 60 07 34 */ extsh r0, r3 +/* 80083734 00080674 B0 1E 00 02 */ sth r0, 2(r30) +lbl_80083738: +/* 80083738 00080678 80 01 00 6C */ lwz r0, 0x6c(r1) +/* 8008373C 0008067C CB E1 00 60 */ lfd f31, 0x60(r1) +/* 80083740 00080680 83 E1 00 5C */ lwz r31, 0x5c(r1) +/* 80083744 00080684 7C 08 03 A6 */ mtlr r0 +/* 80083748 00080688 83 C1 00 58 */ lwz r30, 0x58(r1) +/* 8008374C 0008068C 83 A1 00 54 */ lwz r29, 0x54(r1) +/* 80083750 00080690 38 21 00 68 */ addi r1, r1, 0x68 +/* 80083754 00080694 4E 80 00 20 */ blr + +.section .rodata, "a" # 0x8036FFA0 - 0x803A8380 +.balign 8 +bit_values: + .4byte 0x40240000 + .4byte 0 + .4byte 0x40590000 + .4byte 0 + .4byte 0x40C38800 + .4byte 0 + .4byte 0x4197D784 + .4byte 0 + .4byte 0x4341C379 + .4byte 0x37E08000 + .4byte 0x4693B8B5 + .4byte 0xB5056E17 + .4byte 0x4D384F03 + .4byte 0xE93FF9F5 + .4byte 0x5A827748 + .4byte 0xF9301D32 + .4byte 0x75154FDD + .4byte 0x7F73BF3C +digit_values: + .4byte 0x40240000 + .4byte 0 + .4byte 0x40590000 + .4byte 0 + .4byte 0x408F4000 + .4byte 0 + .4byte 0x40C38800 + .4byte 0 + .4byte 0x40F86A00 + .4byte 0 + .4byte 0x412E8480 + .4byte 0 + .4byte 0x416312D0 + .4byte 0 + .4byte 0x4197D784 + .4byte 0 + +.section .sdata2, "a" # 0x8040B460 - 0x80414020 +.balign 8 +"@268": + .4byte 0 + .4byte 0 +"@270": + .4byte 0x3FF00000 + .4byte 0 +"@272": + .4byte 0x43300000 + .4byte 0x80000000 +"@362": + .4byte 0x3FB99999 + .4byte 0x9999999A +"@363": + .4byte 0x40240000 + .4byte 0 diff --git a/asm/MSL_C.PPCEABI.bare.H/common_float_tables.s b/asm/MSL_C.PPCEABI.bare.H/common_float_tables.s new file mode 100644 index 0000000..3437bd6 --- /dev/null +++ b/asm/MSL_C.PPCEABI.bare.H/common_float_tables.s @@ -0,0 +1,338 @@ +.include "macros.inc" + +.section .rodata, "a" # 0x8036FFA0 - 0x803A8380 +.balign 8 +.global __two_to_log2e_m1_tI +__two_to_log2e_m1_tI: + .4byte 0x2C03DB89 + .4byte 0x2C333687 + .4byte 0x2C739362 + .4byte 0x2CA586E0 + .4byte 0x2CE0F96D + .4byte 0x2D18E2CB + .4byte 0x2D4FCB22 + .4byte 0x2D8D35D7 + .4byte 0x2DBFECBA + .4byte 0x2E026D27 + .4byte 0x2E314490 + .4byte 0x2E70EE94 + .4byte 0x2EA3BAF0 + .4byte 0x2EDE884F + .4byte 0x2F1739FB + .4byte 0x2F4D89C1 + .4byte 0x2F8BAD78 + .4byte 0x2FBDD771 + .4byte 0x300102BF + .4byte 0x302F5800 + .4byte 0x306E511E + .4byte 0x30A1F3FE + .4byte 0x30DC1DF9 + .4byte 0x311595C7 + .4byte 0x314B4EA4 + .4byte 0x318A295C + .4byte 0x31BBC7F1 + .4byte 0x31FF388B + .4byte 0x322D70C9 + .4byte 0x326BBAEC + .4byte 0x32A031FC + .4byte 0x32D9BA5A + .4byte 0x3313F623 + .4byte 0x334919B9 + .4byte 0x3388A975 + .4byte 0x33B9BE2B + .4byte 0x33FC7361 + .4byte 0x342B8EDC + .4byte 0x34692BEB + .4byte 0x349E74DD + .4byte 0x34D75D5D + .4byte 0x35125B02 + .4byte 0x3546EAF1 + .4byte 0x35872DBA + .4byte 0x35B7BA0F + .4byte 0x35F9B5EA + .4byte 0x3629B229 + .4byte 0x3666A405 + .4byte 0x369CBC92 + .4byte 0x36D506F2 + .4byte 0x3710C457 + .4byte 0x3744C239 + .4byte 0x3785B61D + .4byte 0x37B5BB8D + .4byte 0x37F7000F + .4byte 0x3827DAA4 + .4byte 0x38642328 + .4byte 0x389B090F + .4byte 0x38D2B706 + .4byte 0x390F3216 + .4byte 0x39429F81 + .4byte 0x39844295 + .4byte 0x39B3C295 + .4byte 0x39F451BD + .4byte 0x3A26083D + .4byte 0x3A61A93F + .4byte 0x3A995A46 + .4byte 0x3AD06D87 + .4byte 0x3B0DA433 + .4byte 0x3B4082B8 + .4byte 0x3B82D314 + .4byte 0x3BB1CF19 + .4byte 0x3BF1AADE + .4byte 0x3C243AE5 + .4byte 0x3C5F3638 + .4byte 0x3C97B02A + .4byte 0x3CCE2A62 + .4byte 0x3D0C1AA1 + .4byte 0x3D3E6BCE + .4byte 0x3D816791 + .4byte 0x3DAFE108 + .4byte 0x3DEF0B5D + .4byte 0x3E227290 + .4byte 0x3E5CC9FF + .4byte 0x3E960AAE + .4byte 0x3ECBED86 + .4byte 0x3F0A9555 + .4byte 0x3F3C5AB2 + .4byte 0x3F800000 + .4byte 0x3FADF854 + .4byte 0x3FEC7326 + .4byte 0x4020AF2E + .4byte 0x405A6481 + .4byte 0x409469C5 + .4byte 0x40C9B6E3 + .4byte 0x41091443 + .4byte 0x413A4F54 + .4byte 0x417D38AC + .4byte 0x41AC14EE + .4byte 0x41E9E224 + .4byte 0x421EF0B3 + .4byte 0x425805AD + .4byte 0x4292CD62 + .4byte 0x42C78665 + .4byte 0x4307975F + .4byte 0x433849A4 + .4byte 0x437A7910 + .4byte 0x43AA36C8 + .4byte 0x43E75844 + .4byte 0x441D3710 + .4byte 0x4455AD6E + .4byte 0x4491357A + .4byte 0x44C55BFE + .4byte 0x45061E9D + .4byte 0x45364993 + .4byte 0x4577C118 + .4byte 0x45A85DD2 + .4byte 0x45E4D572 + .4byte 0x461B8238 + .4byte 0x46535BB3 + .4byte 0x468FA1FE + .4byte 0x46C3379A + .4byte 0x4704A9F1 + .4byte 0x47344F11 + .4byte 0x477510AD + .4byte 0x47A689FE + .4byte 0x47E2599A + .4byte 0x4819D21F + .4byte 0x4851106A + .4byte 0x488E12E4 + .4byte 0x48C1192B + .4byte 0x49033952 + .4byte 0x49325A0E + .4byte 0x497267BB + .4byte 0x49A4BB3E + .4byte 0x49DFE4A9 + .4byte 0x4A1826B5 + .4byte 0x4A4ECB81 + .4byte 0x4A8C881F + .4byte 0x4ABF009E + .4byte 0x4B01CCB3 + .4byte 0x4B306A7C + .4byte 0x4B6FC62E + .4byte 0x4BA2F184 + .4byte 0x4BDD768B + .4byte 0x4C167FF0 + .4byte 0x4C4C8CE5 + .4byte 0x4C8B01A3 + .4byte 0x4CBCEDE5 + .4byte 0x4D006408 + .4byte 0x4D2E804A + .4byte 0x4D6D2BEF + .4byte 0x4DA12CC1 + .4byte 0x4DDB0F2E + .4byte 0x4E14DDC1 + .4byte 0x4E4A5487 + .4byte 0x4E897F64 + .4byte 0x4EBAE0EE + .4byte 0x4EFDFE91 + .4byte 0x4F2C9B6A + .4byte 0x4F6A98EC + .4byte 0x4F9F6CE9 + .4byte 0x4FD8AE7F + .4byte 0x5013401C + .4byte 0x50482254 + .4byte 0x50880156 + .4byte 0x50B8D9AA + .4byte 0x50FB3CCF + .4byte 0x512ABBCE + .4byte 0x51680D11 + .4byte 0x519DB1ED + .4byte 0x51D6546B + .4byte 0x5211A6F5 + .4byte 0x5245F63B + .4byte 0x5286876D + .4byte 0x52B6D809 + .4byte 0x52F882B7 + .4byte 0x5328E166 +.global __one_over_F +__one_over_F: + .4byte 0x3F800000 + .4byte 0x3F7E03F8 + .4byte 0x3F7C0FC1 + .4byte 0x3F7A232D + .4byte 0x3F783E10 + .4byte 0x3F76603E + .4byte 0x3F74898D + .4byte 0x3F72B9D6 + .4byte 0x3F70F0F1 + .4byte 0x3F6F2EB7 + .4byte 0x3F6D7304 + .4byte 0x3F6BBDB3 + .4byte 0x3F6A0EA1 + .4byte 0x3F6865AC + .4byte 0x3F66C2B4 + .4byte 0x3F652598 + .4byte 0x3F638E39 + .4byte 0x3F61FC78 + .4byte 0x3F607038 + .4byte 0x3F5EE95C + .4byte 0x3F5D67C9 + .4byte 0x3F5BEB62 + .4byte 0x3F5A740E + .4byte 0x3F5901B2 + .4byte 0x3F579436 + .4byte 0x3F562B81 + .4byte 0x3F54C77B + .4byte 0x3F53680D + .4byte 0x3F520D21 + .4byte 0x3F50B6A0 + .4byte 0x3F4F6475 + .4byte 0x3F4E168A + .4byte 0x3F4CCCCD + .4byte 0x3F4B8728 + .4byte 0x3F4A4588 + .4byte 0x3F4907DA + .4byte 0x3F47CE0C + .4byte 0x3F46980C + .4byte 0x3F4565C8 + .4byte 0x3F443730 + .4byte 0x3F430C31 + .4byte 0x3F41E4BC + .4byte 0x3F40C0C1 + .4byte 0x3F3FA030 + .4byte 0x3F3E82FA + .4byte 0x3F3D6910 + .4byte 0x3F3C5264 + .4byte 0x3F3B3EE7 + .4byte 0x3F3A2E8C + .4byte 0x3F392144 + .4byte 0x3F381703 + .4byte 0x3F370FBB + .4byte 0x3F360B61 + .4byte 0x3F3509E7 + .4byte 0x3F340B41 + .4byte 0x3F330F63 + .4byte 0x3F321643 + .4byte 0x3F311FD4 + .4byte 0x3F302C0B + .4byte 0x3F2F3ADE + .4byte 0x3F2E4C41 + .4byte 0x3F2D602B + .4byte 0x3F2C7692 + .4byte 0x3F2B8F6A + .4byte 0x3F2AAAAB + .4byte 0x3F29C84A + .4byte 0x3F28E83F + .4byte 0x3F280A81 + .4byte 0x3F272F05 + .4byte 0x3F2655C4 + .4byte 0x3F257EB5 + .4byte 0x3F24A9CF + .4byte 0x3F23D70A + .4byte 0x3F23065E + .4byte 0x3F2237C3 + .4byte 0x3F216B31 + .4byte 0x3F20A0A1 + .4byte 0x3F1FD80A + .4byte 0x3F1F1166 + .4byte 0x3F1E4CAD + .4byte 0x3F1D89D9 + .4byte 0x3F1CC8E1 + .4byte 0x3F1C09C1 + .4byte 0x3F1B4C70 + .4byte 0x3F1A90E8 + .4byte 0x3F19D723 + .4byte 0x3F191F1A + .4byte 0x3F1868C8 + .4byte 0x3F17B426 + .4byte 0x3F17012E + .4byte 0x3F164FDA + .4byte 0x3F15A025 + .4byte 0x3F14F209 + .4byte 0x3F144581 + .4byte 0x3F139A86 + .4byte 0x3F12F114 + .4byte 0x3F124925 + .4byte 0x3F11A2B4 + .4byte 0x3F10FDBC + .4byte 0x3F105A38 + .4byte 0x3F0FB824 + .4byte 0x3F0F177A + .4byte 0x3F0E7835 + .4byte 0x3F0DDA52 + .4byte 0x3F0D3DCB + .4byte 0x3F0CA29C + .4byte 0x3F0C08C1 + .4byte 0x3F0B7034 + .4byte 0x3F0AD8F3 + .4byte 0x3F0A42F8 + .4byte 0x3F09AE41 + .4byte 0x3F091AC7 + .4byte 0x3F088889 + .4byte 0x3F07F781 + .4byte 0x3F0767AB + .4byte 0x3F06D905 + .4byte 0x3F064B8A + .4byte 0x3F05BF37 + .4byte 0x3F053408 + .4byte 0x3F04A9FA + .4byte 0x3F042108 + .4byte 0x3F039930 + .4byte 0x3F03126F + .4byte 0x3F028CC0 + .4byte 0x3F020821 + .4byte 0x3F01848E + .4byte 0x3F010204 + .4byte 0x3F008080 + .4byte 0x3F000000 +.global __sincos_on_quadrant +__sincos_on_quadrant: + .4byte 0 + .4byte 0x3F800000 + .4byte 0x3F800000 + .4byte 0 + .4byte 0 + .4byte 0xBF800000 + .4byte 0xBF800000 + .4byte 0 +.global __sincos_poly +__sincos_poly: + .4byte 0x366CCFAA + .4byte 0x34A5E129 + .4byte 0xB9AAE275 + .4byte 0xB8196543 + .4byte 0x3C81E0ED + .4byte 0x3B2335DD + .4byte 0xBE9DE9E6 + .4byte 0xBDA55DE7 + .4byte 0x3F800000 + .4byte 0x3F490FDB + .4byte 0 diff --git a/asm/MSL_C.PPCEABI.bare.H/critical_regions.ppc_eabi.s b/asm/MSL_C.PPCEABI.bare.H/critical_regions.ppc_eabi.s new file mode 100644 index 0000000..6d0f74c --- /dev/null +++ b/asm/MSL_C.PPCEABI.bare.H/critical_regions.ppc_eabi.s @@ -0,0 +1,6 @@ +.include "macros.inc" + +.section .text, "ax" # 0x80005600 - 0x8036FBA0 +.global __kill_critical_regions +__kill_critical_regions: +/* 80083858 00080798 4E 80 00 20 */ blr diff --git a/asm/MSL_C.PPCEABI.bare.H/exponentialsf.s b/asm/MSL_C.PPCEABI.bare.H/exponentialsf.s new file mode 100644 index 0000000..ebf0950 --- /dev/null +++ b/asm/MSL_C.PPCEABI.bare.H/exponentialsf.s @@ -0,0 +1,762 @@ +.include "macros.inc" + +.section .text, "ax" # 0x80005600 - 0x8036FBA0 +.global powf +powf: +/* 800872D8 00084218 94 21 FF 70 */ stwu r1, -0x90(r1) +/* 800872DC 0008421C 3C 60 80 37 */ lis r3, __log2_F@ha +/* 800872E0 00084220 38 63 1F A8 */ addi r3, r3, __log2_F@l +/* 800872E4 00084224 C0 62 8A 60 */ lfs f3, "@246"@sda21(r2) +/* 800872E8 00084228 FC 01 18 40 */ fcmpo cr0, f1, f3 +/* 800872EC 0008422C 40 81 01 E4 */ ble lbl_800874D0 +/* 800872F0 00084230 D0 21 00 60 */ stfs f1, 0x60(r1) +/* 800872F4 00084234 80 02 8A 50 */ lwz r0, "@93"@sda21(r2) +/* 800872F8 00084238 81 21 00 60 */ lwz r9, 0x60(r1) +/* 800872FC 0008423C 90 01 00 68 */ stw r0, 0x68(r1) +/* 80087300 00084240 80 A2 8A 54 */ lwz r5, lbl_8040BEB4@sda21(r2) +/* 80087304 00084244 55 20 04 3F */ clrlwi. r0, r9, 0x10 +/* 80087308 00084248 55 24 4D FE */ srwi r4, r9, 0x17 +/* 8008730C 0008424C 90 A1 00 6C */ stw r5, 0x6c(r1) +/* 80087310 00084250 55 26 02 7E */ clrlwi r6, r9, 9 +/* 80087314 00084254 39 04 FF 80 */ addi r8, r4, -128 +/* 80087318 00084258 55 27 86 7E */ rlwinm r7, r9, 0x10, 0x19, 0x1f +/* 8008731C 0008425C 41 82 00 B4 */ beq lbl_800873D0 +/* 80087320 00084260 55 24 02 5E */ rlwinm r4, r9, 0, 9, 0xf +/* 80087324 00084264 64 85 3F 80 */ oris r5, r4, 0x3f80 +/* 80087328 00084268 64 C4 3F 80 */ oris r4, r6, 0x3f80 +/* 8008732C 0008426C 90 A1 00 64 */ stw r5, 0x64(r1) +/* 80087330 00084270 55 20 04 21 */ rlwinm. r0, r9, 0, 0x10, 0x10 +/* 80087334 00084274 90 81 00 74 */ stw r4, 0x74(r1) +/* 80087338 00084278 41 82 00 14 */ beq lbl_8008734C +/* 8008733C 0008427C 80 81 00 64 */ lwz r4, 0x64(r1) +/* 80087340 00084280 38 E7 00 01 */ addi r7, r7, 1 +/* 80087344 00084284 3C 04 00 01 */ addis r0, r4, 1 +/* 80087348 00084288 90 01 00 64 */ stw r0, 0x64(r1) +lbl_8008734C: +/* 8008734C 0008428C 3C 80 80 37 */ lis r4, __one_over_F@ha +/* 80087350 00084290 C0 61 00 74 */ lfs f3, 0x74(r1) +/* 80087354 00084294 C0 01 00 64 */ lfs f0, 0x64(r1) +/* 80087358 00084298 54 E5 10 3A */ slwi r5, r7, 2 +/* 8008735C 0008429C 38 04 1D 58 */ addi r0, r4, __one_over_F@l +/* 80087360 000842A0 C0 21 00 6C */ lfs f1, 0x6c(r1) +/* 80087364 000842A4 7C 80 2A 14 */ add r4, r0, r5 +/* 80087368 000842A8 ED 03 00 28 */ fsubs f8, f3, f0 +/* 8008736C 000842AC C0 64 00 00 */ lfs f3, 0(r4) +/* 80087370 000842B0 38 82 8A 48 */ addi r4, r2, __log2e_m1$localstatic0$__log2f__Ff@sda21 +/* 80087374 000842B4 C0 01 00 68 */ lfs f0, 0x68(r1) +/* 80087378 000842B8 6D 00 80 00 */ xoris r0, r8, 0x8000 +/* 8008737C 000842BC ED 08 00 F2 */ fmuls f8, f8, f3 +/* 80087380 000842C0 C0 84 00 04 */ lfs f4, 4(r4) +/* 80087384 000842C4 90 01 00 8C */ stw r0, 0x8c(r1) +/* 80087388 000842C8 3C 00 43 30 */ lis r0, 0x4330 +/* 8008738C 000842CC C0 A2 8A 48 */ lfs f5, __log2e_m1$localstatic0$__log2f__Ff@sda21(r2) +/* 80087390 000842D0 EC 68 02 32 */ fmuls f3, f8, f8 +/* 80087394 000842D4 90 01 00 88 */ stw r0, 0x88(r1) +/* 80087398 000842D8 EC 08 00 7A */ fmadds f0, f8, f1, f0 +/* 8008739C 000842DC C8 C2 8A 78 */ lfd f6, "@253"@sda21(r2) +/* 800873A0 000842E0 C8 21 00 88 */ lfd f1, 0x88(r1) +/* 800873A4 000842E4 EC 03 00 32 */ fmuls f0, f3, f0 +/* 800873A8 000842E8 C0 E2 8A 64 */ lfs f7, "@247"@sda21(r2) +/* 800873AC 000842EC EC 61 30 28 */ fsubs f3, f1, f6 +/* 800873B0 000842F0 7C 23 2C 2E */ lfsx f1, r3, r5 +/* 800873B4 000842F4 EC 04 02 3A */ fmadds f0, f4, f8, f0 +/* 800873B8 000842F8 EC 67 18 2A */ fadds f3, f7, f3 +/* 800873BC 000842FC EC 05 02 3A */ fmadds f0, f5, f8, f0 +/* 800873C0 00084300 EC 08 00 2A */ fadds f0, f8, f0 +/* 800873C4 00084304 EC 01 00 2A */ fadds f0, f1, f0 +/* 800873C8 00084308 EC 03 00 2A */ fadds f0, f3, f0 +/* 800873CC 0008430C 48 00 00 34 */ b lbl_80087400 +lbl_800873D0: +/* 800873D0 00084310 6D 00 80 00 */ xoris r0, r8, 0x8000 +/* 800873D4 00084314 C8 62 8A 78 */ lfd f3, "@253"@sda21(r2) +/* 800873D8 00084318 90 01 00 8C */ stw r0, 0x8c(r1) +/* 800873DC 0008431C 3C 80 43 30 */ lis r4, 0x4330 +/* 800873E0 00084320 54 E0 10 3A */ slwi r0, r7, 2 +/* 800873E4 00084324 C0 82 8A 64 */ lfs f4, "@247"@sda21(r2) +/* 800873E8 00084328 90 81 00 88 */ stw r4, 0x88(r1) +/* 800873EC 0008432C 7C 03 04 2E */ lfsx f0, r3, r0 +/* 800873F0 00084330 C8 21 00 88 */ lfd f1, 0x88(r1) +/* 800873F4 00084334 EC 21 18 28 */ fsubs f1, f1, f3 +/* 800873F8 00084338 EC 24 08 2A */ fadds f1, f4, f1 +/* 800873FC 0008433C EC 01 00 2A */ fadds f0, f1, f0 +lbl_80087400: +/* 80087400 00084340 EC 42 00 32 */ fmuls f2, f2, f0 +/* 80087404 00084344 3C 00 43 30 */ lis r0, 0x4330 +/* 80087408 00084348 C8 22 8A 78 */ lfd f1, "@253"@sda21(r2) +/* 8008740C 0008434C FC 00 10 1E */ fctiwz f0, f2 +/* 80087410 00084350 D8 01 00 88 */ stfd f0, 0x88(r1) +/* 80087414 00084354 80 81 00 8C */ lwz r4, 0x8c(r1) +/* 80087418 00084358 90 81 00 58 */ stw r4, 0x58(r1) +/* 8008741C 0008435C 80 A1 00 58 */ lwz r5, 0x58(r1) +/* 80087420 00084360 6C A4 80 00 */ xoris r4, r5, 0x8000 +/* 80087424 00084364 90 81 00 84 */ stw r4, 0x84(r1) +/* 80087428 00084368 2C 05 00 80 */ cmpwi r5, 0x80 +/* 8008742C 0008436C 90 01 00 80 */ stw r0, 0x80(r1) +/* 80087430 00084370 C8 01 00 80 */ lfd f0, 0x80(r1) +/* 80087434 00084374 EC 00 08 28 */ fsubs f0, f0, f1 +/* 80087438 00084378 ED 22 00 28 */ fsubs f9, f2, f0 +/* 8008743C 0008437C 40 81 00 0C */ ble lbl_80087448 +/* 80087440 00084380 C0 22 8A 58 */ lfs f1, _inf@sda21(r2) +/* 80087444 00084384 48 00 05 CC */ b lbl_80087A10 +lbl_80087448: +/* 80087448 00084388 2C 05 FF 81 */ cmpwi r5, -127 +/* 8008744C 0008438C 40 80 00 0C */ bge lbl_80087458 +/* 80087450 00084390 C0 22 8A 60 */ lfs f1, "@246"@sda21(r2) +/* 80087454 00084394 48 00 05 BC */ b lbl_80087A10 +lbl_80087458: +/* 80087458 00084398 38 05 00 7F */ addi r0, r5, 0x7f +/* 8008745C 0008439C C0 C2 8A 6C */ lfs f6, "@249"@sda21(r2) +/* 80087460 000843A0 90 01 00 58 */ stw r0, 0x58(r1) +/* 80087464 000843A4 C0 E2 8A 68 */ lfs f7, "@248"@sda21(r2) +/* 80087468 000843A8 80 01 00 58 */ lwz r0, 0x58(r1) +/* 8008746C 000843AC 54 00 B8 10 */ slwi r0, r0, 0x17 +/* 80087470 000843B0 90 01 00 58 */ stw r0, 0x58(r1) +/* 80087474 000843B4 C0 43 02 24 */ lfs f2, 0x224(r3) +/* 80087478 000843B8 C0 03 02 20 */ lfs f0, 0x220(r3) +/* 8008747C 000843BC C0 23 02 1C */ lfs f1, 0x21c(r3) +/* 80087480 000843C0 EC 49 00 BA */ fmadds f2, f9, f2, f0 +/* 80087484 000843C4 C0 03 02 18 */ lfs f0, 0x218(r3) +/* 80087488 000843C8 C0 83 02 14 */ lfs f4, 0x214(r3) +/* 8008748C 000843CC C0 63 02 10 */ lfs f3, 0x210(r3) +/* 80087490 000843D0 EC A9 08 BA */ fmadds f5, f9, f2, f1 +/* 80087494 000843D4 C0 43 02 0C */ lfs f2, 0x20c(r3) +/* 80087498 000843D8 C0 23 02 08 */ lfs f1, 0x208(r3) +/* 8008749C 000843DC EC A9 01 7A */ fmadds f5, f9, f5, f0 +/* 800874A0 000843E0 C0 03 02 04 */ lfs f0, 0x204(r3) +/* 800874A4 000843E4 C1 01 00 58 */ lfs f8, 0x58(r1) +/* 800874A8 000843E8 EC 89 21 7A */ fmadds f4, f9, f5, f4 +/* 800874AC 000843EC EC 69 19 3A */ fmadds f3, f9, f4, f3 +/* 800874B0 000843F0 EC 49 10 FA */ fmadds f2, f9, f3, f2 +/* 800874B4 000843F4 EC 29 08 BA */ fmadds f1, f9, f2, f1 +/* 800874B8 000843F8 EC 09 00 7A */ fmadds f0, f9, f1, f0 +/* 800874BC 000843FC EC 09 00 32 */ fmuls f0, f9, f0 +/* 800874C0 00084400 EC 06 00 2A */ fadds f0, f6, f0 +/* 800874C4 00084404 EC 07 00 2A */ fadds f0, f7, f0 +/* 800874C8 00084408 EC 28 00 32 */ fmuls f1, f8, f0 +/* 800874CC 0008440C 48 00 05 44 */ b lbl_80087A10 +lbl_800874D0: +/* 800874D0 00084410 40 80 04 18 */ bge lbl_800878E8 +/* 800874D4 00084414 FC 00 10 1E */ fctiwz f0, f2 +/* 800874D8 00084418 3C A0 43 30 */ lis r5, 0x4330 +/* 800874DC 0008441C C8 82 8A 78 */ lfd f4, "@253"@sda21(r2) +/* 800874E0 00084420 D8 01 00 88 */ stfd f0, 0x88(r1) +/* 800874E4 00084424 80 01 00 8C */ lwz r0, 0x8c(r1) +/* 800874E8 00084428 D8 01 00 80 */ stfd f0, 0x80(r1) +/* 800874EC 0008442C 6C 00 80 00 */ xoris r0, r0, 0x8000 +/* 800874F0 00084430 90 01 00 7C */ stw r0, 0x7c(r1) +/* 800874F4 00084434 80 81 00 84 */ lwz r4, 0x84(r1) +/* 800874F8 00084438 90 A1 00 78 */ stw r5, 0x78(r1) +/* 800874FC 0008443C C8 01 00 78 */ lfd f0, 0x78(r1) +/* 80087500 00084440 EC 00 20 28 */ fsubs f0, f0, f4 +/* 80087504 00084444 EC 02 00 28 */ fsubs f0, f2, f0 +/* 80087508 00084448 FC 00 18 00 */ fcmpu cr0, f0, f3 +/* 8008750C 0008444C 41 82 00 0C */ beq lbl_80087518 +/* 80087510 00084450 C0 22 8A 5C */ lfs f1, _nan@sda21(r2) +/* 80087514 00084454 48 00 04 FC */ b lbl_80087A10 +lbl_80087518: +/* 80087518 00084458 7C 80 0E 70 */ srawi r0, r4, 1 +/* 8008751C 0008445C 7C 00 01 94 */ addze r0, r0 +/* 80087520 00084460 54 00 08 3C */ slwi r0, r0, 1 +/* 80087524 00084464 7C 00 20 11 */ subfc. r0, r0, r4 +/* 80087528 00084468 41 82 01 E4 */ beq lbl_8008770C +/* 8008752C 0008446C FC 00 08 50 */ fneg f0, f1 +/* 80087530 00084470 80 82 8A 50 */ lwz r4, "@93"@sda21(r2) +/* 80087534 00084474 80 02 8A 54 */ lwz r0, lbl_8040BEB4@sda21(r2) +/* 80087538 00084478 90 81 00 48 */ stw r4, 0x48(r1) +/* 8008753C 0008447C D0 01 00 40 */ stfs f0, 0x40(r1) +/* 80087540 00084480 81 21 00 40 */ lwz r9, 0x40(r1) +/* 80087544 00084484 90 01 00 4C */ stw r0, 0x4c(r1) +/* 80087548 00084488 55 24 4D FE */ srwi r4, r9, 0x17 +/* 8008754C 0008448C 55 20 04 3F */ clrlwi. r0, r9, 0x10 +/* 80087550 00084490 55 26 02 7E */ clrlwi r6, r9, 9 +/* 80087554 00084494 39 04 FF 80 */ addi r8, r4, -128 +/* 80087558 00084498 55 27 86 7E */ rlwinm r7, r9, 0x10, 0x19, 0x1f +/* 8008755C 0008449C 41 82 00 B4 */ beq lbl_80087610 +/* 80087560 000844A0 55 24 02 5E */ rlwinm r4, r9, 0, 9, 0xf +/* 80087564 000844A4 64 85 3F 80 */ oris r5, r4, 0x3f80 +/* 80087568 000844A8 64 C4 3F 80 */ oris r4, r6, 0x3f80 +/* 8008756C 000844AC 90 A1 00 44 */ stw r5, 0x44(r1) +/* 80087570 000844B0 55 20 04 21 */ rlwinm. r0, r9, 0, 0x10, 0x10 +/* 80087574 000844B4 90 81 00 54 */ stw r4, 0x54(r1) +/* 80087578 000844B8 41 82 00 14 */ beq lbl_8008758C +/* 8008757C 000844BC 80 81 00 44 */ lwz r4, 0x44(r1) +/* 80087580 000844C0 38 E7 00 01 */ addi r7, r7, 1 +/* 80087584 000844C4 3C 04 00 01 */ addis r0, r4, 1 +/* 80087588 000844C8 90 01 00 44 */ stw r0, 0x44(r1) +lbl_8008758C: +/* 8008758C 000844CC 3C 80 80 37 */ lis r4, __one_over_F@ha +/* 80087590 000844D0 C0 61 00 54 */ lfs f3, 0x54(r1) +/* 80087594 000844D4 C0 01 00 44 */ lfs f0, 0x44(r1) +/* 80087598 000844D8 54 E5 10 3A */ slwi r5, r7, 2 +/* 8008759C 000844DC 38 04 1D 58 */ addi r0, r4, __one_over_F@l +/* 800875A0 000844E0 C0 21 00 4C */ lfs f1, 0x4c(r1) +/* 800875A4 000844E4 7C 80 2A 14 */ add r4, r0, r5 +/* 800875A8 000844E8 ED 03 00 28 */ fsubs f8, f3, f0 +/* 800875AC 000844EC C0 64 00 00 */ lfs f3, 0(r4) +/* 800875B0 000844F0 38 82 8A 48 */ addi r4, r2, __log2e_m1$localstatic0$__log2f__Ff@sda21 +/* 800875B4 000844F4 C0 01 00 48 */ lfs f0, 0x48(r1) +/* 800875B8 000844F8 6D 00 80 00 */ xoris r0, r8, 0x8000 +/* 800875BC 000844FC ED 08 00 F2 */ fmuls f8, f8, f3 +/* 800875C0 00084500 C0 84 00 04 */ lfs f4, 4(r4) +/* 800875C4 00084504 90 01 00 7C */ stw r0, 0x7c(r1) +/* 800875C8 00084508 3C 00 43 30 */ lis r0, 0x4330 +/* 800875CC 0008450C C0 A2 8A 48 */ lfs f5, __log2e_m1$localstatic0$__log2f__Ff@sda21(r2) +/* 800875D0 00084510 EC 68 02 32 */ fmuls f3, f8, f8 +/* 800875D4 00084514 90 01 00 78 */ stw r0, 0x78(r1) +/* 800875D8 00084518 EC 08 00 7A */ fmadds f0, f8, f1, f0 +/* 800875DC 0008451C C8 C2 8A 78 */ lfd f6, "@253"@sda21(r2) +/* 800875E0 00084520 C8 21 00 78 */ lfd f1, 0x78(r1) +/* 800875E4 00084524 EC 03 00 32 */ fmuls f0, f3, f0 +/* 800875E8 00084528 C0 E2 8A 64 */ lfs f7, "@247"@sda21(r2) +/* 800875EC 0008452C EC 61 30 28 */ fsubs f3, f1, f6 +/* 800875F0 00084530 7C 23 2C 2E */ lfsx f1, r3, r5 +/* 800875F4 00084534 EC 04 02 3A */ fmadds f0, f4, f8, f0 +/* 800875F8 00084538 EC 67 18 2A */ fadds f3, f7, f3 +/* 800875FC 0008453C EC 05 02 3A */ fmadds f0, f5, f8, f0 +/* 80087600 00084540 EC 08 00 2A */ fadds f0, f8, f0 +/* 80087604 00084544 EC 01 00 2A */ fadds f0, f1, f0 +/* 80087608 00084548 EC 03 00 2A */ fadds f0, f3, f0 +/* 8008760C 0008454C 48 00 00 2C */ b lbl_80087638 +lbl_80087610: +/* 80087610 00084550 6D 00 80 00 */ xoris r0, r8, 0x8000 +/* 80087614 00084554 C0 62 8A 64 */ lfs f3, "@247"@sda21(r2) +/* 80087618 00084558 90 01 00 7C */ stw r0, 0x7c(r1) +/* 8008761C 0008455C 54 E0 10 3A */ slwi r0, r7, 2 +/* 80087620 00084560 7C 03 04 2E */ lfsx f0, r3, r0 +/* 80087624 00084564 90 A1 00 78 */ stw r5, 0x78(r1) +/* 80087628 00084568 C8 21 00 78 */ lfd f1, 0x78(r1) +/* 8008762C 0008456C EC 21 20 28 */ fsubs f1, f1, f4 +/* 80087630 00084570 EC 23 08 2A */ fadds f1, f3, f1 +/* 80087634 00084574 EC 01 00 2A */ fadds f0, f1, f0 +lbl_80087638: +/* 80087638 00084578 EC 42 00 32 */ fmuls f2, f2, f0 +/* 8008763C 0008457C 3C 00 43 30 */ lis r0, 0x4330 +/* 80087640 00084580 C8 22 8A 78 */ lfd f1, "@253"@sda21(r2) +/* 80087644 00084584 FC 00 10 1E */ fctiwz f0, f2 +/* 80087648 00084588 D8 01 00 78 */ stfd f0, 0x78(r1) +/* 8008764C 0008458C 80 81 00 7C */ lwz r4, 0x7c(r1) +/* 80087650 00084590 90 81 00 38 */ stw r4, 0x38(r1) +/* 80087654 00084594 80 A1 00 38 */ lwz r5, 0x38(r1) +/* 80087658 00084598 6C A4 80 00 */ xoris r4, r5, 0x8000 +/* 8008765C 0008459C 90 81 00 84 */ stw r4, 0x84(r1) +/* 80087660 000845A0 2C 05 00 80 */ cmpwi r5, 0x80 +/* 80087664 000845A4 90 01 00 80 */ stw r0, 0x80(r1) +/* 80087668 000845A8 C8 01 00 80 */ lfd f0, 0x80(r1) +/* 8008766C 000845AC EC 00 08 28 */ fsubs f0, f0, f1 +/* 80087670 000845B0 ED 22 00 28 */ fsubs f9, f2, f0 +/* 80087674 000845B4 40 81 00 0C */ ble lbl_80087680 +/* 80087678 000845B8 C0 02 8A 58 */ lfs f0, _inf@sda21(r2) +/* 8008767C 000845BC 48 00 00 88 */ b lbl_80087704 +lbl_80087680: +/* 80087680 000845C0 2C 05 FF 81 */ cmpwi r5, -127 +/* 80087684 000845C4 40 80 00 0C */ bge lbl_80087690 +/* 80087688 000845C8 C0 02 8A 60 */ lfs f0, "@246"@sda21(r2) +/* 8008768C 000845CC 48 00 00 78 */ b lbl_80087704 +lbl_80087690: +/* 80087690 000845D0 38 05 00 7F */ addi r0, r5, 0x7f +/* 80087694 000845D4 C0 C2 8A 6C */ lfs f6, "@249"@sda21(r2) +/* 80087698 000845D8 90 01 00 38 */ stw r0, 0x38(r1) +/* 8008769C 000845DC C0 E2 8A 68 */ lfs f7, "@248"@sda21(r2) +/* 800876A0 000845E0 80 01 00 38 */ lwz r0, 0x38(r1) +/* 800876A4 000845E4 54 00 B8 10 */ slwi r0, r0, 0x17 +/* 800876A8 000845E8 90 01 00 38 */ stw r0, 0x38(r1) +/* 800876AC 000845EC C0 43 02 24 */ lfs f2, 0x224(r3) +/* 800876B0 000845F0 C0 03 02 20 */ lfs f0, 0x220(r3) +/* 800876B4 000845F4 C0 23 02 1C */ lfs f1, 0x21c(r3) +/* 800876B8 000845F8 EC 49 00 BA */ fmadds f2, f9, f2, f0 +/* 800876BC 000845FC C0 03 02 18 */ lfs f0, 0x218(r3) +/* 800876C0 00084600 C0 83 02 14 */ lfs f4, 0x214(r3) +/* 800876C4 00084604 C0 63 02 10 */ lfs f3, 0x210(r3) +/* 800876C8 00084608 EC A9 08 BA */ fmadds f5, f9, f2, f1 +/* 800876CC 0008460C C0 43 02 0C */ lfs f2, 0x20c(r3) +/* 800876D0 00084610 C0 23 02 08 */ lfs f1, 0x208(r3) +/* 800876D4 00084614 EC A9 01 7A */ fmadds f5, f9, f5, f0 +/* 800876D8 00084618 C0 03 02 04 */ lfs f0, 0x204(r3) +/* 800876DC 0008461C C1 01 00 38 */ lfs f8, 0x38(r1) +/* 800876E0 00084620 EC 89 21 7A */ fmadds f4, f9, f5, f4 +/* 800876E4 00084624 EC 69 19 3A */ fmadds f3, f9, f4, f3 +/* 800876E8 00084628 EC 49 10 FA */ fmadds f2, f9, f3, f2 +/* 800876EC 0008462C EC 29 08 BA */ fmadds f1, f9, f2, f1 +/* 800876F0 00084630 EC 09 00 7A */ fmadds f0, f9, f1, f0 +/* 800876F4 00084634 EC 09 00 32 */ fmuls f0, f9, f0 +/* 800876F8 00084638 EC 06 00 2A */ fadds f0, f6, f0 +/* 800876FC 0008463C EC 07 00 2A */ fadds f0, f7, f0 +/* 80087700 00084640 EC 08 00 32 */ fmuls f0, f8, f0 +lbl_80087704: +/* 80087704 00084644 FC 20 00 50 */ fneg f1, f0 +/* 80087708 00084648 48 00 03 08 */ b lbl_80087A10 +lbl_8008770C: +/* 8008770C 0008464C FC 00 08 50 */ fneg f0, f1 +/* 80087710 00084650 80 82 8A 50 */ lwz r4, "@93"@sda21(r2) +/* 80087714 00084654 80 02 8A 54 */ lwz r0, lbl_8040BEB4@sda21(r2) +/* 80087718 00084658 90 81 00 28 */ stw r4, 0x28(r1) +/* 8008771C 0008465C D0 01 00 20 */ stfs f0, 0x20(r1) +/* 80087720 00084660 81 21 00 20 */ lwz r9, 0x20(r1) +/* 80087724 00084664 90 01 00 2C */ stw r0, 0x2c(r1) +/* 80087728 00084668 55 24 4D FE */ srwi r4, r9, 0x17 +/* 8008772C 0008466C 55 20 04 3F */ clrlwi. r0, r9, 0x10 +/* 80087730 00084670 55 26 02 7E */ clrlwi r6, r9, 9 +/* 80087734 00084674 39 04 FF 80 */ addi r8, r4, -128 +/* 80087738 00084678 55 27 86 7E */ rlwinm r7, r9, 0x10, 0x19, 0x1f +/* 8008773C 0008467C 41 82 00 B4 */ beq lbl_800877F0 +/* 80087740 00084680 55 24 02 5E */ rlwinm r4, r9, 0, 9, 0xf +/* 80087744 00084684 64 85 3F 80 */ oris r5, r4, 0x3f80 +/* 80087748 00084688 64 C4 3F 80 */ oris r4, r6, 0x3f80 +/* 8008774C 0008468C 90 A1 00 24 */ stw r5, 0x24(r1) +/* 80087750 00084690 55 20 04 21 */ rlwinm. r0, r9, 0, 0x10, 0x10 +/* 80087754 00084694 90 81 00 34 */ stw r4, 0x34(r1) +/* 80087758 00084698 41 82 00 14 */ beq lbl_8008776C +/* 8008775C 0008469C 80 81 00 24 */ lwz r4, 0x24(r1) +/* 80087760 000846A0 38 E7 00 01 */ addi r7, r7, 1 +/* 80087764 000846A4 3C 04 00 01 */ addis r0, r4, 1 +/* 80087768 000846A8 90 01 00 24 */ stw r0, 0x24(r1) +lbl_8008776C: +/* 8008776C 000846AC 3C 80 80 37 */ lis r4, __one_over_F@ha +/* 80087770 000846B0 C0 61 00 34 */ lfs f3, 0x34(r1) +/* 80087774 000846B4 C0 01 00 24 */ lfs f0, 0x24(r1) +/* 80087778 000846B8 54 E5 10 3A */ slwi r5, r7, 2 +/* 8008777C 000846BC 38 04 1D 58 */ addi r0, r4, __one_over_F@l +/* 80087780 000846C0 C0 21 00 2C */ lfs f1, 0x2c(r1) +/* 80087784 000846C4 7C 80 2A 14 */ add r4, r0, r5 +/* 80087788 000846C8 ED 03 00 28 */ fsubs f8, f3, f0 +/* 8008778C 000846CC C0 64 00 00 */ lfs f3, 0(r4) +/* 80087790 000846D0 38 82 8A 48 */ addi r4, r2, __log2e_m1$localstatic0$__log2f__Ff@sda21 +/* 80087794 000846D4 C0 01 00 28 */ lfs f0, 0x28(r1) +/* 80087798 000846D8 6D 00 80 00 */ xoris r0, r8, 0x8000 +/* 8008779C 000846DC ED 08 00 F2 */ fmuls f8, f8, f3 +/* 800877A0 000846E0 C0 84 00 04 */ lfs f4, 4(r4) +/* 800877A4 000846E4 90 01 00 7C */ stw r0, 0x7c(r1) +/* 800877A8 000846E8 3C 00 43 30 */ lis r0, 0x4330 +/* 800877AC 000846EC C0 A2 8A 48 */ lfs f5, __log2e_m1$localstatic0$__log2f__Ff@sda21(r2) +/* 800877B0 000846F0 EC 68 02 32 */ fmuls f3, f8, f8 +/* 800877B4 000846F4 90 01 00 78 */ stw r0, 0x78(r1) +/* 800877B8 000846F8 EC 08 00 7A */ fmadds f0, f8, f1, f0 +/* 800877BC 000846FC C8 C2 8A 78 */ lfd f6, "@253"@sda21(r2) +/* 800877C0 00084700 C8 21 00 78 */ lfd f1, 0x78(r1) +/* 800877C4 00084704 EC 03 00 32 */ fmuls f0, f3, f0 +/* 800877C8 00084708 C0 E2 8A 64 */ lfs f7, "@247"@sda21(r2) +/* 800877CC 0008470C EC 61 30 28 */ fsubs f3, f1, f6 +/* 800877D0 00084710 7C 23 2C 2E */ lfsx f1, r3, r5 +/* 800877D4 00084714 EC 04 02 3A */ fmadds f0, f4, f8, f0 +/* 800877D8 00084718 EC 67 18 2A */ fadds f3, f7, f3 +/* 800877DC 0008471C EC 05 02 3A */ fmadds f0, f5, f8, f0 +/* 800877E0 00084720 EC 08 00 2A */ fadds f0, f8, f0 +/* 800877E4 00084724 EC 01 00 2A */ fadds f0, f1, f0 +/* 800877E8 00084728 EC 03 00 2A */ fadds f0, f3, f0 +/* 800877EC 0008472C 48 00 00 2C */ b lbl_80087818 +lbl_800877F0: +/* 800877F0 00084730 6D 00 80 00 */ xoris r0, r8, 0x8000 +/* 800877F4 00084734 C0 62 8A 64 */ lfs f3, "@247"@sda21(r2) +/* 800877F8 00084738 90 01 00 7C */ stw r0, 0x7c(r1) +/* 800877FC 0008473C 54 E0 10 3A */ slwi r0, r7, 2 +/* 80087800 00084740 7C 03 04 2E */ lfsx f0, r3, r0 +/* 80087804 00084744 90 A1 00 78 */ stw r5, 0x78(r1) +/* 80087808 00084748 C8 21 00 78 */ lfd f1, 0x78(r1) +/* 8008780C 0008474C EC 21 20 28 */ fsubs f1, f1, f4 +/* 80087810 00084750 EC 23 08 2A */ fadds f1, f3, f1 +/* 80087814 00084754 EC 01 00 2A */ fadds f0, f1, f0 +lbl_80087818: +/* 80087818 00084758 EC 42 00 32 */ fmuls f2, f2, f0 +/* 8008781C 0008475C 3C 00 43 30 */ lis r0, 0x4330 +/* 80087820 00084760 C8 22 8A 78 */ lfd f1, "@253"@sda21(r2) +/* 80087824 00084764 FC 00 10 1E */ fctiwz f0, f2 +/* 80087828 00084768 D8 01 00 78 */ stfd f0, 0x78(r1) +/* 8008782C 0008476C 80 81 00 7C */ lwz r4, 0x7c(r1) +/* 80087830 00084770 90 81 00 18 */ stw r4, 0x18(r1) +/* 80087834 00084774 80 A1 00 18 */ lwz r5, 0x18(r1) +/* 80087838 00084778 6C A4 80 00 */ xoris r4, r5, 0x8000 +/* 8008783C 0008477C 90 81 00 84 */ stw r4, 0x84(r1) +/* 80087840 00084780 2C 05 00 80 */ cmpwi r5, 0x80 +/* 80087844 00084784 90 01 00 80 */ stw r0, 0x80(r1) +/* 80087848 00084788 C8 01 00 80 */ lfd f0, 0x80(r1) +/* 8008784C 0008478C EC 00 08 28 */ fsubs f0, f0, f1 +/* 80087850 00084790 ED 22 00 28 */ fsubs f9, f2, f0 +/* 80087854 00084794 40 81 00 0C */ ble lbl_80087860 +/* 80087858 00084798 C0 22 8A 58 */ lfs f1, _inf@sda21(r2) +/* 8008785C 0008479C 48 00 01 B4 */ b lbl_80087A10 +lbl_80087860: +/* 80087860 000847A0 2C 05 FF 81 */ cmpwi r5, -127 +/* 80087864 000847A4 40 80 00 0C */ bge lbl_80087870 +/* 80087868 000847A8 C0 22 8A 60 */ lfs f1, "@246"@sda21(r2) +/* 8008786C 000847AC 48 00 01 A4 */ b lbl_80087A10 +lbl_80087870: +/* 80087870 000847B0 38 05 00 7F */ addi r0, r5, 0x7f +/* 80087874 000847B4 C0 C2 8A 6C */ lfs f6, "@249"@sda21(r2) +/* 80087878 000847B8 90 01 00 18 */ stw r0, 0x18(r1) +/* 8008787C 000847BC C0 E2 8A 68 */ lfs f7, "@248"@sda21(r2) +/* 80087880 000847C0 80 01 00 18 */ lwz r0, 0x18(r1) +/* 80087884 000847C4 54 00 B8 10 */ slwi r0, r0, 0x17 +/* 80087888 000847C8 90 01 00 18 */ stw r0, 0x18(r1) +/* 8008788C 000847CC C0 43 02 24 */ lfs f2, 0x224(r3) +/* 80087890 000847D0 C0 03 02 20 */ lfs f0, 0x220(r3) +/* 80087894 000847D4 C0 23 02 1C */ lfs f1, 0x21c(r3) +/* 80087898 000847D8 EC 49 00 BA */ fmadds f2, f9, f2, f0 +/* 8008789C 000847DC C0 03 02 18 */ lfs f0, 0x218(r3) +/* 800878A0 000847E0 C0 83 02 14 */ lfs f4, 0x214(r3) +/* 800878A4 000847E4 C0 63 02 10 */ lfs f3, 0x210(r3) +/* 800878A8 000847E8 EC A9 08 BA */ fmadds f5, f9, f2, f1 +/* 800878AC 000847EC C0 43 02 0C */ lfs f2, 0x20c(r3) +/* 800878B0 000847F0 C0 23 02 08 */ lfs f1, 0x208(r3) +/* 800878B4 000847F4 EC A9 01 7A */ fmadds f5, f9, f5, f0 +/* 800878B8 000847F8 C0 03 02 04 */ lfs f0, 0x204(r3) +/* 800878BC 000847FC C1 01 00 18 */ lfs f8, 0x18(r1) +/* 800878C0 00084800 EC 89 21 7A */ fmadds f4, f9, f5, f4 +/* 800878C4 00084804 EC 69 19 3A */ fmadds f3, f9, f4, f3 +/* 800878C8 00084808 EC 49 10 FA */ fmadds f2, f9, f3, f2 +/* 800878CC 0008480C EC 29 08 BA */ fmadds f1, f9, f2, f1 +/* 800878D0 00084810 EC 09 00 7A */ fmadds f0, f9, f1, f0 +/* 800878D4 00084814 EC 09 00 32 */ fmuls f0, f9, f0 +/* 800878D8 00084818 EC 06 00 2A */ fadds f0, f6, f0 +/* 800878DC 0008481C EC 07 00 2A */ fadds f0, f7, f0 +/* 800878E0 00084820 EC 28 00 32 */ fmuls f1, f8, f0 +/* 800878E4 00084824 48 00 01 2C */ b lbl_80087A10 +lbl_800878E8: +/* 800878E8 00084828 D0 21 00 14 */ stfs f1, 0x14(r1) +/* 800878EC 0008482C 3C 00 7F 80 */ lis r0, 0x7f80 +/* 800878F0 00084830 80 81 00 14 */ lwz r4, 0x14(r1) +/* 800878F4 00084834 54 83 00 50 */ rlwinm r3, r4, 0, 1, 8 +/* 800878F8 00084838 7C 03 00 00 */ cmpw r3, r0 +/* 800878FC 0008483C 41 82 00 14 */ beq lbl_80087910 +/* 80087900 00084840 40 80 00 40 */ bge lbl_80087940 +/* 80087904 00084844 2C 03 00 00 */ cmpwi r3, 0 +/* 80087908 00084848 41 82 00 20 */ beq lbl_80087928 +/* 8008790C 0008484C 48 00 00 34 */ b lbl_80087940 +lbl_80087910: +/* 80087910 00084850 54 80 02 7F */ clrlwi. r0, r4, 9 +/* 80087914 00084854 41 82 00 0C */ beq lbl_80087920 +/* 80087918 00084858 38 00 00 01 */ li r0, 1 +/* 8008791C 0008485C 48 00 00 28 */ b lbl_80087944 +lbl_80087920: +/* 80087920 00084860 38 00 00 02 */ li r0, 2 +/* 80087924 00084864 48 00 00 20 */ b lbl_80087944 +lbl_80087928: +/* 80087928 00084868 54 80 02 7F */ clrlwi. r0, r4, 9 +/* 8008792C 0008486C 41 82 00 0C */ beq lbl_80087938 +/* 80087930 00084870 38 00 00 05 */ li r0, 5 +/* 80087934 00084874 48 00 00 10 */ b lbl_80087944 +lbl_80087938: +/* 80087938 00084878 38 00 00 03 */ li r0, 3 +/* 8008793C 0008487C 48 00 00 08 */ b lbl_80087944 +lbl_80087940: +/* 80087940 00084880 38 00 00 04 */ li r0, 4 +lbl_80087944: +/* 80087944 00084884 2C 00 00 01 */ cmpwi r0, 1 +/* 80087948 00084888 40 82 00 08 */ bne lbl_80087950 +/* 8008794C 0008488C 48 00 00 C4 */ b lbl_80087A10 +lbl_80087950: +/* 80087950 00084890 D0 41 00 10 */ stfs f2, 0x10(r1) +/* 80087954 00084894 3C 00 7F 80 */ lis r0, 0x7f80 +/* 80087958 00084898 80 81 00 10 */ lwz r4, 0x10(r1) +/* 8008795C 0008489C 54 83 00 50 */ rlwinm r3, r4, 0, 1, 8 +/* 80087960 000848A0 7C 03 00 00 */ cmpw r3, r0 +/* 80087964 000848A4 41 82 00 14 */ beq lbl_80087978 +/* 80087968 000848A8 40 80 00 40 */ bge lbl_800879A8 +/* 8008796C 000848AC 2C 03 00 00 */ cmpwi r3, 0 +/* 80087970 000848B0 41 82 00 20 */ beq lbl_80087990 +/* 80087974 000848B4 48 00 00 34 */ b lbl_800879A8 +lbl_80087978: +/* 80087978 000848B8 54 80 02 7F */ clrlwi. r0, r4, 9 +/* 8008797C 000848BC 41 82 00 0C */ beq lbl_80087988 +/* 80087980 000848C0 38 00 00 01 */ li r0, 1 +/* 80087984 000848C4 48 00 00 28 */ b lbl_800879AC +lbl_80087988: +/* 80087988 000848C8 38 00 00 02 */ li r0, 2 +/* 8008798C 000848CC 48 00 00 20 */ b lbl_800879AC +lbl_80087990: +/* 80087990 000848D0 54 80 02 7F */ clrlwi. r0, r4, 9 +/* 80087994 000848D4 41 82 00 0C */ beq lbl_800879A0 +/* 80087998 000848D8 38 00 00 05 */ li r0, 5 +/* 8008799C 000848DC 48 00 00 10 */ b lbl_800879AC +lbl_800879A0: +/* 800879A0 000848E0 38 00 00 03 */ li r0, 3 +/* 800879A4 000848E4 48 00 00 08 */ b lbl_800879AC +lbl_800879A8: +/* 800879A8 000848E8 38 00 00 04 */ li r0, 4 +lbl_800879AC: +/* 800879AC 000848EC 2C 00 00 03 */ cmpwi r0, 3 +/* 800879B0 000848F0 41 82 00 20 */ beq lbl_800879D0 +/* 800879B4 000848F4 40 80 00 10 */ bge lbl_800879C4 +/* 800879B8 000848F8 2C 00 00 01 */ cmpwi r0, 1 +/* 800879BC 000848FC 40 80 00 1C */ bge lbl_800879D8 +/* 800879C0 00084900 48 00 00 4C */ b lbl_80087A0C +lbl_800879C4: +/* 800879C4 00084904 2C 00 00 06 */ cmpwi r0, 6 +/* 800879C8 00084908 40 80 00 44 */ bge lbl_80087A0C +/* 800879CC 0008490C 48 00 00 14 */ b lbl_800879E0 +lbl_800879D0: +/* 800879D0 00084910 C0 22 8A 70 */ lfs f1, "@250"@sda21(r2) +/* 800879D4 00084914 48 00 00 3C */ b lbl_80087A10 +lbl_800879D8: +/* 800879D8 00084918 C0 22 8A 5C */ lfs f1, _nan@sda21(r2) +/* 800879DC 0008491C 48 00 00 34 */ b lbl_80087A10 +lbl_800879E0: +/* 800879E0 00084920 C0 02 8A 60 */ lfs f0, "@246"@sda21(r2) +/* 800879E4 00084924 FC 02 00 40 */ fcmpo cr0, f2, f0 +/* 800879E8 00084928 40 80 00 24 */ bge lbl_80087A0C +/* 800879EC 0008492C C0 02 8A 74 */ lfs f0, "@251"@sda21(r2) +/* 800879F0 00084930 FC 00 08 00 */ fcmpu cr0, f0, f1 +/* 800879F4 00084934 40 82 00 10 */ bne lbl_80087A04 +/* 800879F8 00084938 C0 02 8A 58 */ lfs f0, _inf@sda21(r2) +/* 800879FC 0008493C FC 20 00 50 */ fneg f1, f0 +/* 80087A00 00084940 48 00 00 10 */ b lbl_80087A10 +lbl_80087A04: +/* 80087A04 00084944 C0 22 8A 58 */ lfs f1, _inf@sda21(r2) +/* 80087A08 00084948 48 00 00 08 */ b lbl_80087A10 +lbl_80087A0C: +/* 80087A0C 0008494C C0 22 8A 60 */ lfs f1, "@246"@sda21(r2) +lbl_80087A10: +/* 80087A10 00084950 38 21 00 90 */ addi r1, r1, 0x90 +/* 80087A14 00084954 4E 80 00 20 */ blr + +.global expf +expf: +/* 80087A18 00084958 94 21 FF D8 */ stwu r1, -0x28(r1) +/* 80087A1C 0008495C 3C 60 80 37 */ lis r3, __log2_F@ha +/* 80087A20 00084960 38 A3 1F A8 */ addi r5, r3, __log2_F@l +/* 80087A24 00084964 C0 02 8A 80 */ lfs f0, "@259"@sda21(r2) +/* 80087A28 00084968 FC 01 00 40 */ fcmpo cr0, f1, f0 +/* 80087A2C 0008496C 40 81 00 0C */ ble lbl_80087A38 +/* 80087A30 00084970 C0 22 8A 58 */ lfs f1, _inf@sda21(r2) +/* 80087A34 00084974 48 00 00 C4 */ b lbl_80087AF8 +lbl_80087A38: +/* 80087A38 00084978 C0 02 8A 84 */ lfs f0, "@260"@sda21(r2) +/* 80087A3C 0008497C FC 01 00 40 */ fcmpo cr0, f1, f0 +/* 80087A40 00084980 40 80 00 0C */ bge lbl_80087A4C +/* 80087A44 00084984 C0 22 8A 60 */ lfs f1, "@246"@sda21(r2) +/* 80087A48 00084988 48 00 00 B0 */ b lbl_80087AF8 +lbl_80087A4C: +/* 80087A4C 0008498C FC 00 08 1E */ fctiwz f0, f1 +/* 80087A50 00084990 3C 60 80 37 */ lis r3, __two_to_log2e_m1_tI@ha +/* 80087A54 00084994 3C 80 43 30 */ lis r4, 0x4330 +/* 80087A58 00084998 C8 42 8A 78 */ lfd f2, "@253"@sda21(r2) +/* 80087A5C 0008499C C0 C2 8A 8C */ lfs f6, "@262"@sda21(r2) +/* 80087A60 000849A0 D8 01 00 20 */ stfd f0, 0x20(r1) +/* 80087A64 000849A4 38 03 1A 90 */ addi r0, r3, __two_to_log2e_m1_tI@l +/* 80087A68 000849A8 C0 E2 8A 88 */ lfs f7, "@261"@sda21(r2) +/* 80087A6C 000849AC 80 C1 00 24 */ lwz r6, 0x24(r1) +/* 80087A70 000849B0 6C C3 80 00 */ xoris r3, r6, 0x8000 +/* 80087A74 000849B4 90 61 00 1C */ stw r3, 0x1c(r1) +/* 80087A78 000849B8 38 C6 00 58 */ addi r6, r6, 0x58 +/* 80087A7C 000849BC 38 66 00 27 */ addi r3, r6, 0x27 +/* 80087A80 000849C0 90 81 00 18 */ stw r4, 0x18(r1) +/* 80087A84 000849C4 54 64 B8 10 */ slwi r4, r3, 0x17 +/* 80087A88 000849C8 54 C3 10 3A */ slwi r3, r6, 2 +/* 80087A8C 000849CC C8 01 00 18 */ lfd f0, 0x18(r1) +/* 80087A90 000849D0 7C 60 1A 14 */ add r3, r0, r3 +/* 80087A94 000849D4 90 81 00 10 */ stw r4, 0x10(r1) +/* 80087A98 000849D8 EC 00 10 28 */ fsubs f0, f0, f2 +/* 80087A9C 000849DC C0 A5 02 44 */ lfs f5, 0x244(r5) +/* 80087AA0 000849E0 C0 45 02 40 */ lfs f2, 0x240(r5) +/* 80087AA4 000849E4 ED 41 00 28 */ fsubs f10, f1, f0 +/* 80087AA8 000849E8 C0 05 02 3C */ lfs f0, 0x23c(r5) +/* 80087AAC 000849EC C0 85 02 38 */ lfs f4, 0x238(r5) +/* 80087AB0 000849F0 C0 65 02 34 */ lfs f3, 0x234(r5) +/* 80087AB4 000849F4 EC AA 11 7A */ fmadds f5, f10, f5, f2 +/* 80087AB8 000849F8 C0 45 02 30 */ lfs f2, 0x230(r5) +/* 80087ABC 000849FC C0 25 02 2C */ lfs f1, 0x22c(r5) +/* 80087AC0 00084A00 EC AA 01 7A */ fmadds f5, f10, f5, f0 +/* 80087AC4 00084A04 C0 05 02 28 */ lfs f0, 0x228(r5) +/* 80087AC8 00084A08 C1 01 00 10 */ lfs f8, 0x10(r1) +/* 80087ACC 00084A0C C1 23 00 00 */ lfs f9, 0(r3) +/* 80087AD0 00084A10 EC 8A 21 7A */ fmadds f4, f10, f5, f4 +/* 80087AD4 00084A14 EC 6A 19 3A */ fmadds f3, f10, f4, f3 +/* 80087AD8 00084A18 EC 4A 10 FA */ fmadds f2, f10, f3, f2 +/* 80087ADC 00084A1C EC 2A 08 BA */ fmadds f1, f10, f2, f1 +/* 80087AE0 00084A20 EC 0A 00 7A */ fmadds f0, f10, f1, f0 +/* 80087AE4 00084A24 EC 0A 00 32 */ fmuls f0, f10, f0 +/* 80087AE8 00084A28 EC 06 00 2A */ fadds f0, f6, f0 +/* 80087AEC 00084A2C EC 07 00 2A */ fadds f0, f7, f0 +/* 80087AF0 00084A30 EC 08 00 32 */ fmuls f0, f8, f0 +/* 80087AF4 00084A34 EC 29 00 32 */ fmuls f1, f9, f0 +lbl_80087AF8: +/* 80087AF8 00084A38 38 21 00 28 */ addi r1, r1, 0x28 +/* 80087AFC 00084A3C 4E 80 00 20 */ blr + +.section .rodata, "a" # 0x8036FFA0 - 0x803A8380 +.balign 8 +__log2_F: + .4byte 0xBEC00000 + .4byte 0xBEBA406C + .4byte 0xBEB48C35 + .4byte 0xBEAEE32E + .4byte 0xBEA9452D + .4byte 0xBEA3B205 + .4byte 0xBE9E298F + .4byte 0xBE98ABA0 + .4byte 0xBE933812 + .4byte 0xBE8DCEBD + .4byte 0xBE886F7B + .4byte 0xBE831A28 + .4byte 0xBE7B9D3C + .4byte 0xBE711973 + .4byte 0xBE66A8B1 + .4byte 0xBE5C4AB0 + .4byte 0xBE51FF2E + .4byte 0xBE47C5E9 + .4byte 0xBE3D9EA1 + .4byte 0xBE338918 + .4byte 0xBE29850F + .4byte 0xBE1F924A + .4byte 0xBE15B08E + .4byte 0xBE0BDFA1 + .4byte 0xBE021F4A + .4byte 0xBDF0DEA4 + .4byte 0xBDDD9F05 + .4byte 0xBDCA7F4A + .4byte 0xBDB77F0B + .4byte 0xBDA49DE0 + .4byte 0xBD91DB66 + .4byte 0xBD7E6E71 + .4byte 0xBD5961ED + .4byte 0xBD349081 + .4byte 0xBD0FF971 + .4byte 0xBCD7380E + .4byte 0xBC8EEF19 + .4byte 0xBC0E2D45 + .4byte 0x38256316 + .4byte 0x3C0E9C73 + .4byte 0x3C8DDD45 + .4byte 0x3CD4011D + .4byte 0x3D0CDD83 + .4byte 0x3D2F861E + .4byte 0x3D51FAFE + .4byte 0x3D743CBA + .4byte 0x3D8B25F6 + .4byte 0x3D9C1492 + .4byte 0x3DACEA7C + .4byte 0x3DBDA7FB + .4byte 0x3DCE4D54 + .4byte 0x3DDEDACE + .4byte 0x3DEF50AD + .4byte 0x3DFFAF33 + .4byte 0x3E07FB51 + .4byte 0x3E10139E + .4byte 0x3E1820A0 + .4byte 0x3E202276 + .4byte 0x3E28193F + .4byte 0x3E30051A + .4byte 0x3E37E624 + .4byte 0x3E3FBC7A + .4byte 0x3E47883A + .4byte 0x3E4F4981 + .4byte 0x3E570069 + .4byte 0x3E5EAD0F + .4byte 0x3E664F8D + .4byte 0x3E6DE7FF + .4byte 0x3E75767F + .4byte 0x3E7CFB27 + .4byte 0x3E823B08 + .4byte 0x3E85F3AA + .4byte 0x3E89A785 + .4byte 0x3E8D56A6 + .4byte 0x3E910118 + .4byte 0x3E94A6E9 + .4byte 0x3E984822 + .4byte 0x3E9BE4D1 + .4byte 0x3E9F7CFF + .4byte 0x3EA310B9 + .4byte 0x3EA6A009 + .4byte 0x3EAA2AFA + .4byte 0x3EADB197 + .4byte 0x3EB133EA + .4byte 0x3EB4B1FD + .4byte 0x3EB82BDC + .4byte 0x3EBBA190 + .4byte 0x3EBF1322 + .4byte 0x3EC2809D + .4byte 0x3EC5EA0B + .4byte 0x3EC94F75 + .4byte 0x3ECCB0E4 + .4byte 0x3ED00E61 + .4byte 0x3ED367F7 + .4byte 0x3ED6BDAD + .4byte 0x3EDA0F8D + .4byte 0x3EDD5DA0 + .4byte 0x3EE0A7EE + .4byte 0x3EE3EE7F + .4byte 0x3EE7315D + .4byte 0x3EEA708F + .4byte 0x3EEDAC1E + .4byte 0x3EF0E412 + .4byte 0x3EF41873 + .4byte 0x3EF74949 + .4byte 0x3EFA769B + .4byte 0x3EFDA072 + .4byte 0x3F00636A + .4byte 0x3F01F4E5 + .4byte 0x3F0384AD + .4byte 0x3F0512C7 + .4byte 0x3F069F35 + .4byte 0x3F0829FB + .4byte 0x3F09B31E + .4byte 0x3F0B3A9F + .4byte 0x3F0CC083 + .4byte 0x3F0E44CD + .4byte 0x3F0FC781 + .4byte 0x3F1148A1 + .4byte 0x3F12C832 + .4byte 0x3F144636 + .4byte 0x3F15C2B0 + .4byte 0x3F173DA4 + .4byte 0x3F18B714 + .4byte 0x3F1A2F04 + .4byte 0x3F1BA578 + .4byte 0x3F1D1A71 + .4byte 0x3F1E8DF2 + .4byte 0x3F200000 +__two_to_x: + .4byte 0x3F317218 + .4byte 0x3E75FDF0 + .4byte 0x3D635854 + .4byte 0x3C1D9561 + .4byte 0x3AAEBE2F + .4byte 0x3921805E + .4byte 0x3781E214 + .4byte 0x35B3C15F + .4byte 0x33DD30D7 +__exp_to_x$105: + .4byte 0x3F7FFFFE + .4byte 0x3EFFFFFF + .4byte 0x3E2AAB03 + .4byte 0x3D2AAAE6 + .4byte 0x3C0874AA + .4byte 0x3AB5F6D0 + .4byte 0x3956A4B8 + .4byte 0x37D5E715 + +.section .sdata2, "a" # 0x8040B460 - 0x80414020 +.balign 8 +__log2e_m1$localstatic0$__log2f__Ff: + .4byte 0x3ED20000 + .4byte 0x3D054765 +"@93": + .4byte 0xBF38AA80 +lbl_8040BEB4: + .4byte 0x3EF637A6 +_inf: + .4byte 0x7F800000 +_nan: + .4byte 0x7FFFFFFF +"@246": + .4byte 0 +"@247": + .4byte 0x3FB00000 +"@248": + .4byte 0x3F400000 +"@249": + .4byte 0x3E800000 +"@250": + .4byte 0x3F800000 +"@251": + .4byte 0x80000000 +"@253": + .4byte 0x43300000 + .4byte 0x80000000 +"@259": + .4byte 0x42B17218 +"@260": + .4byte 0xC2AEAC50 +"@261": + .4byte 0x3F7E0000 +"@262": + .4byte 0x3C000001 diff --git a/asm/MSL_C.PPCEABI.bare.H/inverse_trig.s b/asm/MSL_C.PPCEABI.bare.H/inverse_trig.s new file mode 100644 index 0000000..81f6f68 --- /dev/null +++ b/asm/MSL_C.PPCEABI.bare.H/inverse_trig.s @@ -0,0 +1,345 @@ +.include "macros.inc" + +.section .text, "ax" # 0x80005600 - 0x8036FBA0 +.global atanf +atanf: +/* 80086B4C 00083A8C 94 21 FF F0 */ stwu r1, -0x10(r1) +/* 80086B50 00083A90 3C 60 80 37 */ lis r3, atan_coeff$96@ha +/* 80086B54 00083A94 38 83 19 C8 */ addi r4, r3, atan_coeff$96@l +/* 80086B58 00083A98 D0 21 00 08 */ stfs f1, 8(r1) +/* 80086B5C 00083A9C 38 C0 FF FF */ li r6, -1 +/* 80086B60 00083AA0 C0 02 8A 10 */ lfs f0, "@156"@sda21(r2) +/* 80086B64 00083AA4 38 E0 00 00 */ li r7, 0 +/* 80086B68 00083AA8 80 61 00 08 */ lwz r3, 8(r1) +/* 80086B6C 00083AAC 54 60 00 7E */ clrlwi r0, r3, 1 +/* 80086B70 00083AB0 90 01 00 08 */ stw r0, 8(r1) +/* 80086B74 00083AB4 54 68 00 00 */ rlwinm r8, r3, 0, 0, 0 +/* 80086B78 00083AB8 C0 41 00 08 */ lfs f2, 8(r1) +/* 80086B7C 00083ABC FC 02 00 40 */ fcmpo cr0, f2, f0 +/* 80086B80 00083AC0 4C 41 13 82 */ cror 2, 1, 2 +/* 80086B84 00083AC4 40 82 00 18 */ bne lbl_80086B9C +/* 80086B88 00083AC8 C0 02 8A 14 */ lfs f0, "@157"@sda21(r2) +/* 80086B8C 00083ACC 38 E0 00 01 */ li r7, 1 +/* 80086B90 00083AD0 EC 00 10 24 */ fdivs f0, f0, f2 +/* 80086B94 00083AD4 D0 01 00 0C */ stfs f0, 0xc(r1) +/* 80086B98 00083AD8 48 00 00 F4 */ b lbl_80086C8C +lbl_80086B9C: +/* 80086B9C 00083ADC C0 02 8A 18 */ lfs f0, "@158"@sda21(r2) +/* 80086BA0 00083AE0 FC 00 10 40 */ fcmpo cr0, f0, f2 +/* 80086BA4 00083AE4 40 80 00 E4 */ bge lbl_80086C88 +/* 80086BA8 00083AE8 80 A1 00 08 */ lwz r5, 8(r1) +/* 80086BAC 00083AEC 3C 00 3F 80 */ lis r0, 0x3f80 +/* 80086BB0 00083AF0 38 C0 00 00 */ li r6, 0 +/* 80086BB4 00083AF4 54 A3 00 50 */ rlwinm r3, r5, 0, 1, 8 +/* 80086BB8 00083AF8 7C 03 00 00 */ cmpw r3, r0 +/* 80086BBC 00083AFC 41 82 00 54 */ beq lbl_80086C10 +/* 80086BC0 00083B00 40 80 00 14 */ bge lbl_80086BD4 +/* 80086BC4 00083B04 3C 00 3F 00 */ lis r0, 0x3f00 +/* 80086BC8 00083B08 7C 03 00 00 */ cmpw r3, r0 +/* 80086BCC 00083B0C 41 82 00 18 */ beq lbl_80086BE4 +/* 80086BD0 00083B10 48 00 00 74 */ b lbl_80086C44 +lbl_80086BD4: +/* 80086BD4 00083B14 3C 00 40 00 */ lis r0, 0x4000 +/* 80086BD8 00083B18 7C 03 00 00 */ cmpw r3, r0 +/* 80086BDC 00083B1C 41 82 00 64 */ beq lbl_80086C40 +/* 80086BE0 00083B20 48 00 00 64 */ b lbl_80086C44 +lbl_80086BE4: +/* 80086BE4 00083B24 3C 60 3F 09 */ lis r3, 0x3F08D5B9@ha +/* 80086BE8 00083B28 38 03 D5 B9 */ addi r0, r3, 0x3F08D5B9@l +/* 80086BEC 00083B2C 7C 05 00 00 */ cmpw r5, r0 +/* 80086BF0 00083B30 41 80 00 08 */ blt lbl_80086BF8 +/* 80086BF4 00083B34 38 C0 00 01 */ li r6, 1 +lbl_80086BF8: +/* 80086BF8 00083B38 3C 60 3F 52 */ lis r3, 0x3F521801@ha +/* 80086BFC 00083B3C 38 03 18 01 */ addi r0, r3, 0x3F521801@l +/* 80086C00 00083B40 7C 05 00 00 */ cmpw r5, r0 +/* 80086C04 00083B44 41 80 00 40 */ blt lbl_80086C44 +/* 80086C08 00083B48 38 C6 00 01 */ addi r6, r6, 1 +/* 80086C0C 00083B4C 48 00 00 38 */ b lbl_80086C44 +lbl_80086C10: +/* 80086C10 00083B50 3C 60 3F 9C */ lis r3, 0x3F9BF7EC@ha +/* 80086C14 00083B54 38 03 F7 EC */ addi r0, r3, 0x3F9BF7EC@l +/* 80086C18 00083B58 7C 05 00 00 */ cmpw r5, r0 +/* 80086C1C 00083B5C 38 C0 00 02 */ li r6, 2 +/* 80086C20 00083B60 41 80 00 08 */ blt lbl_80086C28 +/* 80086C24 00083B64 38 C0 00 03 */ li r6, 3 +lbl_80086C28: +/* 80086C28 00083B68 3C 60 3F EF */ lis r3, 0x3FEF789E@ha +/* 80086C2C 00083B6C 38 03 78 9E */ addi r0, r3, 0x3FEF789E@l +/* 80086C30 00083B70 7C 05 00 00 */ cmpw r5, r0 +/* 80086C34 00083B74 41 80 00 10 */ blt lbl_80086C44 +/* 80086C38 00083B78 38 C6 00 01 */ addi r6, r6, 1 +/* 80086C3C 00083B7C 48 00 00 08 */ b lbl_80086C44 +lbl_80086C40: +/* 80086C40 00083B80 38 C0 00 04 */ li r6, 4 +lbl_80086C44: +/* 80086C44 00083B84 54 C0 10 3A */ slwi r0, r6, 2 +/* 80086C48 00083B88 C0 22 8A 14 */ lfs f1, "@157"@sda21(r2) +/* 80086C4C 00083B8C 7C 64 02 14 */ add r3, r4, r0 +/* 80086C50 00083B90 C0 63 00 9C */ lfs f3, 0x9c(r3) +/* 80086C54 00083B94 C0 83 00 84 */ lfs f4, 0x84(r3) +/* 80086C58 00083B98 EC 02 18 2A */ fadds f0, f2, f3 +/* 80086C5C 00083B9C EC 04 00 2A */ fadds f0, f4, f0 +/* 80086C60 00083BA0 EC 01 00 24 */ fdivs f0, f1, f0 +/* 80086C64 00083BA4 D0 01 00 0C */ stfs f0, 0xc(r1) +/* 80086C68 00083BA8 C0 41 00 0C */ lfs f2, 0xc(r1) +/* 80086C6C 00083BAC C0 23 00 1C */ lfs f1, 0x1c(r3) +/* 80086C70 00083BB0 C0 03 00 34 */ lfs f0, 0x34(r3) +/* 80086C74 00083BB4 EC 22 20 7C */ fnmsubs f1, f2, f1, f4 +/* 80086C78 00083BB8 EC 02 18 3C */ fnmsubs f0, f2, f0, f3 +/* 80086C7C 00083BBC EC 01 00 2A */ fadds f0, f1, f0 +/* 80086C80 00083BC0 D0 01 00 0C */ stfs f0, 0xc(r1) +/* 80086C84 00083BC4 48 00 00 08 */ b lbl_80086C8C +lbl_80086C88: +/* 80086C88 00083BC8 D0 41 00 0C */ stfs f2, 0xc(r1) +lbl_80086C8C: +/* 80086C8C 00083BCC C0 A1 00 0C */ lfs f5, 0xc(r1) +/* 80086C90 00083BD0 54 C0 10 3A */ slwi r0, r6, 2 +/* 80086C94 00083BD4 C0 44 00 18 */ lfs f2, 0x18(r4) +/* 80086C98 00083BD8 7C 64 02 14 */ add r3, r4, r0 +/* 80086C9C 00083BDC EC C5 01 72 */ fmuls f6, f5, f5 +/* 80086CA0 00083BE0 C0 24 00 14 */ lfs f1, 0x14(r4) +/* 80086CA4 00083BE4 2C 07 00 00 */ cmpwi r7, 0 +/* 80086CA8 00083BE8 C0 04 00 10 */ lfs f0, 0x10(r4) +/* 80086CAC 00083BEC EC 66 08 BA */ fmadds f3, f6, f2, f1 +/* 80086CB0 00083BF0 C0 44 00 0C */ lfs f2, 0xc(r4) +/* 80086CB4 00083BF4 EC 85 01 B2 */ fmuls f4, f5, f6 +/* 80086CB8 00083BF8 C0 24 00 08 */ lfs f1, 8(r4) +/* 80086CBC 00083BFC EC 66 00 FA */ fmadds f3, f6, f3, f0 +/* 80086CC0 00083C00 C0 04 00 04 */ lfs f0, 4(r4) +/* 80086CC4 00083C04 EC 46 10 FA */ fmadds f2, f6, f3, f2 +/* 80086CC8 00083C08 EC 26 08 BA */ fmadds f1, f6, f2, f1 +/* 80086CCC 00083C0C EC 06 00 7A */ fmadds f0, f6, f1, f0 +/* 80086CD0 00083C10 EC 04 28 3A */ fmadds f0, f4, f0, f5 +/* 80086CD4 00083C14 D0 01 00 0C */ stfs f0, 0xc(r1) +/* 80086CD8 00083C18 C0 21 00 0C */ lfs f1, 0xc(r1) +/* 80086CDC 00083C1C C0 03 00 6C */ lfs f0, 0x6c(r3) +/* 80086CE0 00083C20 EC 01 00 2A */ fadds f0, f1, f0 +/* 80086CE4 00083C24 D0 01 00 0C */ stfs f0, 0xc(r1) +/* 80086CE8 00083C28 C0 21 00 0C */ lfs f1, 0xc(r1) +/* 80086CEC 00083C2C C0 03 00 50 */ lfs f0, 0x50(r3) +/* 80086CF0 00083C30 EC 01 00 2A */ fadds f0, f1, f0 +/* 80086CF4 00083C34 D0 01 00 0C */ stfs f0, 0xc(r1) +/* 80086CF8 00083C38 41 82 00 30 */ beq lbl_80086D28 +/* 80086CFC 00083C3C C0 21 00 0C */ lfs f1, 0xc(r1) +/* 80086D00 00083C40 2C 08 00 00 */ cmpwi r8, 0 +/* 80086D04 00083C44 C0 02 8A 1C */ lfs f0, "@159"@sda21(r2) +/* 80086D08 00083C48 EC 01 00 28 */ fsubs f0, f1, f0 +/* 80086D0C 00083C4C D0 01 00 0C */ stfs f0, 0xc(r1) +/* 80086D10 00083C50 41 82 00 0C */ beq lbl_80086D1C +/* 80086D14 00083C54 C0 21 00 0C */ lfs f1, 0xc(r1) +/* 80086D18 00083C58 48 00 00 20 */ b lbl_80086D38 +lbl_80086D1C: +/* 80086D1C 00083C5C C0 01 00 0C */ lfs f0, 0xc(r1) +/* 80086D20 00083C60 FC 20 00 50 */ fneg f1, f0 +/* 80086D24 00083C64 48 00 00 14 */ b lbl_80086D38 +lbl_80086D28: +/* 80086D28 00083C68 80 01 00 0C */ lwz r0, 0xc(r1) +/* 80086D2C 00083C6C 7C 00 43 78 */ or r0, r0, r8 +/* 80086D30 00083C70 90 01 00 0C */ stw r0, 0xc(r1) +/* 80086D34 00083C74 C0 21 00 0C */ lfs f1, 0xc(r1) +lbl_80086D38: +/* 80086D38 00083C78 38 21 00 10 */ addi r1, r1, 0x10 +/* 80086D3C 00083C7C 4E 80 00 20 */ blr + +.global atan__Ff +atan__Ff: +/* 80086D40 00083C80 7C 08 02 A6 */ mflr r0 +/* 80086D44 00083C84 90 01 00 04 */ stw r0, 4(r1) +/* 80086D48 00083C88 94 21 FF F8 */ stwu r1, -8(r1) +/* 80086D4C 00083C8C 4B FF FE 01 */ bl atanf +/* 80086D50 00083C90 80 01 00 0C */ lwz r0, 0xc(r1) +/* 80086D54 00083C94 38 21 00 08 */ addi r1, r1, 8 +/* 80086D58 00083C98 7C 08 03 A6 */ mtlr r0 +/* 80086D5C 00083C9C 4E 80 00 20 */ blr + +.global _inv_sqrtf +_inv_sqrtf: +/* 80086D60 00083CA0 C0 02 8A 20 */ lfs f0, "@168"@sda21(r2) +/* 80086D64 00083CA4 FC 01 00 40 */ fcmpo cr0, f1, f0 +/* 80086D68 00083CA8 40 81 00 48 */ ble lbl_80086DB0 +/* 80086D6C 00083CAC FC 40 08 34 */ frsqrte f2, f1 +/* 80086D70 00083CB0 C0 82 8A 24 */ lfs f4, "@169"@sda21(r2) +/* 80086D74 00083CB4 C0 62 8A 28 */ lfs f3, "@170"@sda21(r2) +/* 80086D78 00083CB8 FC 40 10 18 */ frsp f2, f2 +/* 80086D7C 00083CBC EC 02 00 B2 */ fmuls f0, f2, f2 +/* 80086D80 00083CC0 EC 44 00 B2 */ fmuls f2, f4, f2 +/* 80086D84 00083CC4 EC 01 18 3C */ fnmsubs f0, f1, f0, f3 +/* 80086D88 00083CC8 EC 42 00 32 */ fmuls f2, f2, f0 +/* 80086D8C 00083CCC EC 02 00 B2 */ fmuls f0, f2, f2 +/* 80086D90 00083CD0 EC 44 00 B2 */ fmuls f2, f4, f2 +/* 80086D94 00083CD4 EC 01 18 3C */ fnmsubs f0, f1, f0, f3 +/* 80086D98 00083CD8 EC 42 00 32 */ fmuls f2, f2, f0 +/* 80086D9C 00083CDC EC 02 00 B2 */ fmuls f0, f2, f2 +/* 80086DA0 00083CE0 EC 44 00 B2 */ fmuls f2, f4, f2 +/* 80086DA4 00083CE4 EC 01 18 3C */ fnmsubs f0, f1, f0, f3 +/* 80086DA8 00083CE8 EC 22 00 32 */ fmuls f1, f2, f0 +/* 80086DAC 00083CEC 4E 80 00 20 */ blr +lbl_80086DB0: +/* 80086DB0 00083CF0 FC 01 00 00 */ fcmpu cr0, f1, f0 +/* 80086DB4 00083CF4 41 82 00 10 */ beq lbl_80086DC4 +/* 80086DB8 00083CF8 3C 60 80 3B */ lis r3, __float_nan@ha +/* 80086DBC 00083CFC C0 23 EF 40 */ lfs f1, __float_nan@l(r3) +/* 80086DC0 00083D00 4E 80 00 20 */ blr +lbl_80086DC4: +/* 80086DC4 00083D04 3C 60 80 3B */ lis r3, __float_huge@ha +/* 80086DC8 00083D08 C0 23 EF 44 */ lfs f1, __float_huge@l(r3) +/* 80086DCC 00083D0C 4E 80 00 20 */ blr + +.global acosf +acosf: +/* 80086DD0 00083D10 7C 08 02 A6 */ mflr r0 +/* 80086DD4 00083D14 90 01 00 04 */ stw r0, 4(r1) +/* 80086DD8 00083D18 94 21 FF E8 */ stwu r1, -0x18(r1) +/* 80086DDC 00083D1C DB E1 00 10 */ stfd f31, 0x10(r1) +/* 80086DE0 00083D20 FF E0 08 90 */ fmr f31, f1 +/* 80086DE4 00083D24 C0 02 8A 14 */ lfs f0, "@157"@sda21(r2) +/* 80086DE8 00083D28 EC 3F 07 FC */ fnmsubs f1, f31, f31, f0 +/* 80086DEC 00083D2C 4B FF FF 75 */ bl _inv_sqrtf +/* 80086DF0 00083D30 EC 3F 00 72 */ fmuls f1, f31, f1 +/* 80086DF4 00083D34 4B FF FF 4D */ bl atan__Ff +/* 80086DF8 00083D38 C0 02 8A 1C */ lfs f0, "@159"@sda21(r2) +/* 80086DFC 00083D3C 80 01 00 1C */ lwz r0, 0x1c(r1) +/* 80086E00 00083D40 EC 20 08 28 */ fsubs f1, f0, f1 +/* 80086E04 00083D44 CB E1 00 10 */ lfd f31, 0x10(r1) +/* 80086E08 00083D48 7C 08 03 A6 */ mtlr r0 +/* 80086E0C 00083D4C 38 21 00 18 */ addi r1, r1, 0x18 +/* 80086E10 00083D50 4E 80 00 20 */ blr + +.global atan2f +atan2f: +/* 80086E14 00083D54 7C 08 02 A6 */ mflr r0 +/* 80086E18 00083D58 90 01 00 04 */ stw r0, 4(r1) +/* 80086E1C 00083D5C 94 21 FF F0 */ stwu r1, -0x10(r1) +/* 80086E20 00083D60 D0 21 00 08 */ stfs f1, 8(r1) +/* 80086E24 00083D64 D0 41 00 0C */ stfs f2, 0xc(r1) +/* 80086E28 00083D68 80 01 00 08 */ lwz r0, 8(r1) +/* 80086E2C 00083D6C 80 61 00 0C */ lwz r3, 0xc(r1) +/* 80086E30 00083D70 54 04 00 00 */ rlwinm r4, r0, 0, 0, 0 +/* 80086E34 00083D74 54 60 00 00 */ rlwinm r0, r3, 0, 0, 0 +/* 80086E38 00083D78 7C 00 20 00 */ cmpw r0, r4 +/* 80086E3C 00083D7C 40 82 00 50 */ bne lbl_80086E8C +/* 80086E40 00083D80 2C 00 00 00 */ cmpwi r0, 0 +/* 80086E44 00083D84 41 82 00 20 */ beq lbl_80086E64 +/* 80086E48 00083D88 C0 21 00 08 */ lfs f1, 8(r1) +/* 80086E4C 00083D8C C0 01 00 0C */ lfs f0, 0xc(r1) +/* 80086E50 00083D90 EC 21 00 24 */ fdivs f1, f1, f0 +/* 80086E54 00083D94 4B FF FC F9 */ bl atanf +/* 80086E58 00083D98 C0 02 8A 2C */ lfs f0, "@188"@sda21(r2) +/* 80086E5C 00083D9C EC 21 00 28 */ fsubs f1, f1, f0 +/* 80086E60 00083DA0 48 00 00 7C */ b lbl_80086EDC +lbl_80086E64: +/* 80086E64 00083DA4 C0 21 00 0C */ lfs f1, 0xc(r1) +/* 80086E68 00083DA8 C0 02 8A 20 */ lfs f0, "@168"@sda21(r2) +/* 80086E6C 00083DAC FC 01 00 00 */ fcmpu cr0, f1, f0 +/* 80086E70 00083DB0 41 82 00 14 */ beq lbl_80086E84 +/* 80086E74 00083DB4 C0 01 00 08 */ lfs f0, 8(r1) +/* 80086E78 00083DB8 EC 20 08 24 */ fdivs f1, f0, f1 +/* 80086E7C 00083DBC 4B FF FC D1 */ bl atanf +/* 80086E80 00083DC0 48 00 00 5C */ b lbl_80086EDC +lbl_80086E84: +/* 80086E84 00083DC4 C0 22 8A 1C */ lfs f1, "@159"@sda21(r2) +/* 80086E88 00083DC8 48 00 00 54 */ b lbl_80086EDC +lbl_80086E8C: +/* 80086E8C 00083DCC C0 21 00 0C */ lfs f1, 0xc(r1) +/* 80086E90 00083DD0 C0 02 8A 20 */ lfs f0, "@168"@sda21(r2) +/* 80086E94 00083DD4 FC 01 00 40 */ fcmpo cr0, f1, f0 +/* 80086E98 00083DD8 40 80 00 1C */ bge lbl_80086EB4 +/* 80086E9C 00083DDC C0 01 00 08 */ lfs f0, 8(r1) +/* 80086EA0 00083DE0 EC 20 08 24 */ fdivs f1, f0, f1 +/* 80086EA4 00083DE4 4B FF FC A9 */ bl atanf +/* 80086EA8 00083DE8 C0 02 8A 2C */ lfs f0, "@188"@sda21(r2) +/* 80086EAC 00083DEC EC 20 08 2A */ fadds f1, f0, f1 +/* 80086EB0 00083DF0 48 00 00 2C */ b lbl_80086EDC +lbl_80086EB4: +/* 80086EB4 00083DF4 FC 01 00 00 */ fcmpu cr0, f1, f0 +/* 80086EB8 00083DF8 41 82 00 14 */ beq lbl_80086ECC +/* 80086EBC 00083DFC C0 01 00 08 */ lfs f0, 8(r1) +/* 80086EC0 00083E00 EC 20 08 24 */ fdivs f1, f0, f1 +/* 80086EC4 00083E04 4B FF FC 89 */ bl atanf +/* 80086EC8 00083E08 48 00 00 14 */ b lbl_80086EDC +lbl_80086ECC: +/* 80086ECC 00083E0C 3C 64 3F C9 */ addis r3, r4, 0x3fc9 +/* 80086ED0 00083E10 38 03 0F DB */ addi r0, r3, 0xfdb +/* 80086ED4 00083E14 90 01 00 08 */ stw r0, 8(r1) +/* 80086ED8 00083E18 C0 21 00 08 */ lfs f1, 8(r1) +lbl_80086EDC: +/* 80086EDC 00083E1C 80 01 00 14 */ lwz r0, 0x14(r1) +/* 80086EE0 00083E20 38 21 00 10 */ addi r1, r1, 0x10 +/* 80086EE4 00083E24 7C 08 03 A6 */ mtlr r0 +/* 80086EE8 00083E28 4E 80 00 20 */ blr + +.section .rodata, "a" # 0x8036FFA0 - 0x803A8380 +.balign 8 +atan_coeff$96: + .4byte 0x3F800000 + .4byte 0xBEAAAAAA + .4byte 0x3E4CCC81 + .4byte 0xBE123E7D + .4byte 0x3DE21F95 + .4byte 0xBDAD417C + .4byte 0x3D41186D +onep_one_over_xisqr_hi$97: + .4byte 0x40DA826B + .asciz "@OYX@" + .balign 4 + .4byte 0x3FB925AB + .4byte 0x3F95F61A + .4byte 0x3F851081 +onep_one_over_xisqr_lo$98: + .4byte 0x36EF692F + .4byte 0x355C1DF9 + .4byte 0 + .4byte 0x35291D45 + .4byte 0 + .4byte 0 +atan_xi_hi$99: + .4byte 0 + .4byte 0x3EC90EAA + .4byte 0x3F16CBE4 + .4byte 0x3F490FDA + .4byte 0x3F7B53C5 + .4byte 0x3F96CBE2 + .4byte 0x3FAFEDD9 +atan_xi_lo$100: + .4byte 0 + .4byte 0x37185D99 + .4byte 0x32C59189 + .4byte 0x33874A9E + .4byte 0x353CFA83 + .4byte 0x348637BD + .4byte 0x35541063 +one_over_xi_hi$101: + .4byte 0x401A8277 + .4byte 0x3FBF90C7 + .4byte 0x3F800000 + .4byte 0x3F2B0DC1 + .4byte 0x3ED413CD + .4byte 0x3E4BAFAF +one_over_xi_lo$102: + .4byte 0x3516DC59 + .4byte 0 + .4byte 0 + .4byte 0 + .4byte 0 + .4byte 0 + .4byte 0 + +.section .sdata2, "a" # 0x8040B460 - 0x80414020 +.balign 8 +"@156": + .4byte 0x401A827A +"@157": + .4byte 0x3F800000 +"@158": + .4byte 0x3ED413CD +"@159": + .4byte 0x3FC90FDB +"@168": + .4byte 0 +"@169": + .4byte 0x3F000000 +"@170": + .4byte 0x40400000 +"@188": + .4byte 0x40490FDB diff --git a/asm/MSL_C.PPCEABI.bare.H/printf.s b/asm/MSL_C.PPCEABI.bare.H/printf.s new file mode 100644 index 0000000..d6540b7 --- /dev/null +++ b/asm/MSL_C.PPCEABI.bare.H/printf.s @@ -0,0 +1,2156 @@ +.include "macros.inc" + +.section .text, "ax" # 0x80005600 - 0x8036FBA0 +.global sprintf +sprintf: +/* 80083FF0 00080F30 7C 08 02 A6 */ mflr r0 +/* 80083FF4 00080F34 90 01 00 04 */ stw r0, 4(r1) +/* 80083FF8 00080F38 94 21 FF 70 */ stwu r1, -0x90(r1) +/* 80083FFC 00080F3C 93 E1 00 8C */ stw r31, 0x8c(r1) +/* 80084000 00080F40 93 C1 00 88 */ stw r30, 0x88(r1) +/* 80084004 00080F44 40 86 00 24 */ bne cr1, lbl_80084028 +/* 80084008 00080F48 D8 21 00 28 */ stfd f1, 0x28(r1) +/* 8008400C 00080F4C D8 41 00 30 */ stfd f2, 0x30(r1) +/* 80084010 00080F50 D8 61 00 38 */ stfd f3, 0x38(r1) +/* 80084014 00080F54 D8 81 00 40 */ stfd f4, 0x40(r1) +/* 80084018 00080F58 D8 A1 00 48 */ stfd f5, 0x48(r1) +/* 8008401C 00080F5C D8 C1 00 50 */ stfd f6, 0x50(r1) +/* 80084020 00080F60 D8 E1 00 58 */ stfd f7, 0x58(r1) +/* 80084024 00080F64 D9 01 00 60 */ stfd f8, 0x60(r1) +lbl_80084028: +/* 80084028 00080F68 90 61 00 08 */ stw r3, 8(r1) +/* 8008402C 00080F6C 3C 00 02 00 */ lis r0, 0x200 +/* 80084030 00080F70 3B C3 00 00 */ addi r30, r3, 0 +/* 80084034 00080F74 90 81 00 0C */ stw r4, 0xc(r1) +/* 80084038 00080F78 3B E0 FF FF */ li r31, -1 +/* 8008403C 00080F7C 90 A1 00 10 */ stw r5, 0x10(r1) +/* 80084040 00080F80 3C A0 80 08 */ lis r5, __StringWrite@ha +/* 80084044 00080F84 38 65 42 80 */ addi r3, r5, __StringWrite@l +/* 80084048 00080F88 90 C1 00 14 */ stw r6, 0x14(r1) +/* 8008404C 00080F8C 38 A4 00 00 */ addi r5, r4, 0 +/* 80084050 00080F90 38 C1 00 7C */ addi r6, r1, 0x7c +/* 80084054 00080F94 90 E1 00 18 */ stw r7, 0x18(r1) +/* 80084058 00080F98 38 81 00 70 */ addi r4, r1, 0x70 +/* 8008405C 00080F9C 91 01 00 1C */ stw r8, 0x1c(r1) +/* 80084060 00080FA0 91 21 00 20 */ stw r9, 0x20(r1) +/* 80084064 00080FA4 91 41 00 24 */ stw r10, 0x24(r1) +/* 80084068 00080FA8 90 01 00 7C */ stw r0, 0x7c(r1) +/* 8008406C 00080FAC 38 01 00 98 */ addi r0, r1, 0x98 +/* 80084070 00080FB0 90 01 00 80 */ stw r0, 0x80(r1) +/* 80084074 00080FB4 38 01 00 08 */ addi r0, r1, 8 +/* 80084078 00080FB8 90 01 00 84 */ stw r0, 0x84(r1) +/* 8008407C 00080FBC 38 00 00 00 */ li r0, 0 +/* 80084080 00080FC0 93 C1 00 70 */ stw r30, 0x70(r1) +/* 80084084 00080FC4 93 E1 00 74 */ stw r31, 0x74(r1) +/* 80084088 00080FC8 90 01 00 78 */ stw r0, 0x78(r1) +/* 8008408C 00080FCC 48 00 02 B9 */ bl __pformatter +/* 80084090 00080FD0 7C 03 F8 40 */ cmplw r3, r31 +/* 80084094 00080FD4 40 80 00 0C */ bge lbl_800840A0 +/* 80084098 00080FD8 7C 64 1B 78 */ mr r4, r3 +/* 8008409C 00080FDC 48 00 00 08 */ b lbl_800840A4 +lbl_800840A0: +/* 800840A0 00080FE0 38 80 FF FE */ li r4, -2 +lbl_800840A4: +/* 800840A4 00080FE4 38 00 00 00 */ li r0, 0 +/* 800840A8 00080FE8 7C 1E 21 AE */ stbx r0, r30, r4 +/* 800840AC 00080FEC 80 01 00 94 */ lwz r0, 0x94(r1) +/* 800840B0 00080FF0 83 E1 00 8C */ lwz r31, 0x8c(r1) +/* 800840B4 00080FF4 83 C1 00 88 */ lwz r30, 0x88(r1) +/* 800840B8 00080FF8 7C 08 03 A6 */ mtlr r0 +/* 800840BC 00080FFC 38 21 00 90 */ addi r1, r1, 0x90 +/* 800840C0 00081000 4E 80 00 20 */ blr + +.global snprintf +snprintf: +/* 800840C4 00081004 7C 08 02 A6 */ mflr r0 +/* 800840C8 00081008 90 01 00 04 */ stw r0, 4(r1) +/* 800840CC 0008100C 94 21 FF 68 */ stwu r1, -0x98(r1) +/* 800840D0 00081010 93 E1 00 94 */ stw r31, 0x94(r1) +/* 800840D4 00081014 93 C1 00 90 */ stw r30, 0x90(r1) +/* 800840D8 00081018 40 86 00 24 */ bne cr1, lbl_800840FC +/* 800840DC 0008101C D8 21 00 28 */ stfd f1, 0x28(r1) +/* 800840E0 00081020 D8 41 00 30 */ stfd f2, 0x30(r1) +/* 800840E4 00081024 D8 61 00 38 */ stfd f3, 0x38(r1) +/* 800840E8 00081028 D8 81 00 40 */ stfd f4, 0x40(r1) +/* 800840EC 0008102C D8 A1 00 48 */ stfd f5, 0x48(r1) +/* 800840F0 00081030 D8 C1 00 50 */ stfd f6, 0x50(r1) +/* 800840F4 00081034 D8 E1 00 58 */ stfd f7, 0x58(r1) +/* 800840F8 00081038 D9 01 00 60 */ stfd f8, 0x60(r1) +lbl_800840FC: +/* 800840FC 0008103C 90 61 00 08 */ stw r3, 8(r1) +/* 80084100 00081040 3C 00 03 00 */ lis r0, 0x300 +/* 80084104 00081044 7C 7E 1B 78 */ mr r30, r3 +/* 80084108 00081048 90 81 00 0C */ stw r4, 0xc(r1) +/* 8008410C 0008104C 3B E4 00 00 */ addi r31, r4, 0 +/* 80084110 00081050 3C 80 80 08 */ lis r4, __StringWrite@ha +/* 80084114 00081054 90 A1 00 10 */ stw r5, 0x10(r1) +/* 80084118 00081058 38 64 42 80 */ addi r3, r4, __StringWrite@l +/* 8008411C 0008105C 38 81 00 74 */ addi r4, r1, 0x74 +/* 80084120 00081060 90 C1 00 14 */ stw r6, 0x14(r1) +/* 80084124 00081064 38 C1 00 80 */ addi r6, r1, 0x80 +/* 80084128 00081068 90 E1 00 18 */ stw r7, 0x18(r1) +/* 8008412C 0008106C 91 01 00 1C */ stw r8, 0x1c(r1) +/* 80084130 00081070 91 21 00 20 */ stw r9, 0x20(r1) +/* 80084134 00081074 91 41 00 24 */ stw r10, 0x24(r1) +/* 80084138 00081078 90 01 00 80 */ stw r0, 0x80(r1) +/* 8008413C 0008107C 38 01 00 A0 */ addi r0, r1, 0xa0 +/* 80084140 00081080 90 01 00 84 */ stw r0, 0x84(r1) +/* 80084144 00081084 38 01 00 08 */ addi r0, r1, 8 +/* 80084148 00081088 90 01 00 88 */ stw r0, 0x88(r1) +/* 8008414C 0008108C 38 00 00 00 */ li r0, 0 +/* 80084150 00081090 93 C1 00 74 */ stw r30, 0x74(r1) +/* 80084154 00081094 93 E1 00 78 */ stw r31, 0x78(r1) +/* 80084158 00081098 90 01 00 7C */ stw r0, 0x7c(r1) +/* 8008415C 0008109C 48 00 01 E9 */ bl __pformatter +/* 80084160 000810A0 7C 03 F8 40 */ cmplw r3, r31 +/* 80084164 000810A4 40 80 00 0C */ bge lbl_80084170 +/* 80084168 000810A8 7C 64 1B 78 */ mr r4, r3 +/* 8008416C 000810AC 48 00 00 08 */ b lbl_80084174 +lbl_80084170: +/* 80084170 000810B0 38 9F FF FF */ addi r4, r31, -1 +lbl_80084174: +/* 80084174 000810B4 38 00 00 00 */ li r0, 0 +/* 80084178 000810B8 7C 1E 21 AE */ stbx r0, r30, r4 +/* 8008417C 000810BC 80 01 00 9C */ lwz r0, 0x9c(r1) +/* 80084180 000810C0 83 E1 00 94 */ lwz r31, 0x94(r1) +/* 80084184 000810C4 83 C1 00 90 */ lwz r30, 0x90(r1) +/* 80084188 000810C8 7C 08 03 A6 */ mtlr r0 +/* 8008418C 000810CC 38 21 00 98 */ addi r1, r1, 0x98 +/* 80084190 000810D0 4E 80 00 20 */ blr + +.global vsnprintf +vsnprintf: +/* 80084194 000810D4 7C 08 02 A6 */ mflr r0 +/* 80084198 000810D8 90 01 00 04 */ stw r0, 4(r1) +/* 8008419C 000810DC 38 00 00 00 */ li r0, 0 +/* 800841A0 000810E0 94 21 FF D0 */ stwu r1, -0x30(r1) +/* 800841A4 000810E4 93 E1 00 2C */ stw r31, 0x2c(r1) +/* 800841A8 000810E8 3B E4 00 00 */ addi r31, r4, 0 +/* 800841AC 000810EC 38 81 00 18 */ addi r4, r1, 0x18 +/* 800841B0 000810F0 93 C1 00 28 */ stw r30, 0x28(r1) +/* 800841B4 000810F4 7C 7E 1B 78 */ mr r30, r3 +/* 800841B8 000810F8 3C 60 80 08 */ lis r3, __StringWrite@ha +/* 800841BC 000810FC 93 C1 00 18 */ stw r30, 0x18(r1) +/* 800841C0 00081100 38 63 42 80 */ addi r3, r3, __StringWrite@l +/* 800841C4 00081104 93 E1 00 1C */ stw r31, 0x1c(r1) +/* 800841C8 00081108 90 01 00 20 */ stw r0, 0x20(r1) +/* 800841CC 0008110C 48 00 01 79 */ bl __pformatter +/* 800841D0 00081110 7C 03 F8 40 */ cmplw r3, r31 +/* 800841D4 00081114 40 80 00 0C */ bge lbl_800841E0 +/* 800841D8 00081118 7C 64 1B 78 */ mr r4, r3 +/* 800841DC 0008111C 48 00 00 08 */ b lbl_800841E4 +lbl_800841E0: +/* 800841E0 00081120 38 9F FF FF */ addi r4, r31, -1 +lbl_800841E4: +/* 800841E4 00081124 38 00 00 00 */ li r0, 0 +/* 800841E8 00081128 7C 1E 21 AE */ stbx r0, r30, r4 +/* 800841EC 0008112C 80 01 00 34 */ lwz r0, 0x34(r1) +/* 800841F0 00081130 83 E1 00 2C */ lwz r31, 0x2c(r1) +/* 800841F4 00081134 83 C1 00 28 */ lwz r30, 0x28(r1) +/* 800841F8 00081138 7C 08 03 A6 */ mtlr r0 +/* 800841FC 0008113C 38 21 00 30 */ addi r1, r1, 0x30 +/* 80084200 00081140 4E 80 00 20 */ blr + +.global vprintf +vprintf: +/* 80084204 00081144 7C 08 02 A6 */ mflr r0 +/* 80084208 00081148 3C A0 80 3B */ lis r5, __files@ha +/* 8008420C 0008114C 90 01 00 04 */ stw r0, 4(r1) +/* 80084210 00081150 38 A5 EC 00 */ addi r5, r5, __files@l +/* 80084214 00081154 94 21 FF E0 */ stwu r1, -0x20(r1) +/* 80084218 00081158 93 E1 00 1C */ stw r31, 0x1c(r1) +/* 8008421C 0008115C 3B E5 00 48 */ addi r31, r5, 0x48 +/* 80084220 00081160 93 C1 00 18 */ stw r30, 0x18(r1) +/* 80084224 00081164 3B C4 00 00 */ addi r30, r4, 0 +/* 80084228 00081168 38 80 FF FF */ li r4, -1 +/* 8008422C 0008116C 93 A1 00 14 */ stw r29, 0x14(r1) +/* 80084230 00081170 3B A3 00 00 */ addi r29, r3, 0 +/* 80084234 00081174 38 7F 00 00 */ addi r3, r31, 0 +/* 80084238 00081178 48 00 22 F1 */ bl fwide +/* 8008423C 0008117C 2C 03 00 00 */ cmpwi r3, 0 +/* 80084240 00081180 41 80 00 0C */ blt lbl_8008424C +/* 80084244 00081184 38 60 FF FF */ li r3, -1 +/* 80084248 00081188 48 00 00 1C */ b lbl_80084264 +lbl_8008424C: +/* 8008424C 0008118C 3C 60 80 08 */ lis r3, __FileWrite@ha +/* 80084250 00081190 38 63 42 EC */ addi r3, r3, __FileWrite@l +/* 80084254 00081194 38 9F 00 00 */ addi r4, r31, 0 +/* 80084258 00081198 38 BD 00 00 */ addi r5, r29, 0 +/* 8008425C 0008119C 38 DE 00 00 */ addi r6, r30, 0 +/* 80084260 000811A0 48 00 00 E5 */ bl __pformatter +lbl_80084264: +/* 80084264 000811A4 80 01 00 24 */ lwz r0, 0x24(r1) +/* 80084268 000811A8 83 E1 00 1C */ lwz r31, 0x1c(r1) +/* 8008426C 000811AC 83 C1 00 18 */ lwz r30, 0x18(r1) +/* 80084270 000811B0 7C 08 03 A6 */ mtlr r0 +/* 80084274 000811B4 83 A1 00 14 */ lwz r29, 0x14(r1) +/* 80084278 000811B8 38 21 00 20 */ addi r1, r1, 0x20 +/* 8008427C 000811BC 4E 80 00 20 */ blr + +.global __StringWrite +__StringWrite: +/* 80084280 000811C0 7C 08 02 A6 */ mflr r0 +/* 80084284 000811C4 90 01 00 04 */ stw r0, 4(r1) +/* 80084288 000811C8 94 21 FF E0 */ stwu r1, -0x20(r1) +/* 8008428C 000811CC 93 E1 00 1C */ stw r31, 0x1c(r1) +/* 80084290 000811D0 93 C1 00 18 */ stw r30, 0x18(r1) +/* 80084294 000811D4 7C 7E 1B 78 */ mr r30, r3 +/* 80084298 000811D8 80 63 00 08 */ lwz r3, 8(r3) +/* 8008429C 000811DC 80 DE 00 04 */ lwz r6, 4(r30) +/* 800842A0 000811E0 7C 03 2A 14 */ add r0, r3, r5 +/* 800842A4 000811E4 7C 00 30 40 */ cmplw r0, r6 +/* 800842A8 000811E8 41 81 00 0C */ bgt lbl_800842B4 +/* 800842AC 000811EC 7C BF 2B 78 */ mr r31, r5 +/* 800842B0 000811F0 48 00 00 08 */ b lbl_800842B8 +lbl_800842B4: +/* 800842B4 000811F4 7F E3 30 50 */ subf r31, r3, r6 +lbl_800842B8: +/* 800842B8 000811F8 80 1E 00 00 */ lwz r0, 0(r30) +/* 800842BC 000811FC 38 BF 00 00 */ addi r5, r31, 0 +/* 800842C0 00081200 7C 60 1A 14 */ add r3, r0, r3 +/* 800842C4 00081204 4B F7 EF 31 */ bl memcpy +/* 800842C8 00081208 80 1E 00 08 */ lwz r0, 8(r30) +/* 800842CC 0008120C 7C 00 FA 14 */ add r0, r0, r31 +/* 800842D0 00081210 90 1E 00 08 */ stw r0, 8(r30) +/* 800842D4 00081214 80 01 00 24 */ lwz r0, 0x24(r1) +/* 800842D8 00081218 83 E1 00 1C */ lwz r31, 0x1c(r1) +/* 800842DC 0008121C 83 C1 00 18 */ lwz r30, 0x18(r1) +/* 800842E0 00081220 7C 08 03 A6 */ mtlr r0 +/* 800842E4 00081224 38 21 00 20 */ addi r1, r1, 0x20 +/* 800842E8 00081228 4E 80 00 20 */ blr + +.global __FileWrite +__FileWrite: +/* 800842EC 0008122C 7C 08 02 A6 */ mflr r0 +/* 800842F0 00081230 90 01 00 04 */ stw r0, 4(r1) +/* 800842F4 00081234 94 21 FF E0 */ stwu r1, -0x20(r1) +/* 800842F8 00081238 93 E1 00 1C */ stw r31, 0x1c(r1) +/* 800842FC 0008123C 3B E5 00 00 */ addi r31, r5, 0 +/* 80084300 00081240 93 C1 00 18 */ stw r30, 0x18(r1) +/* 80084304 00081244 3B C3 00 00 */ addi r30, r3, 0 +/* 80084308 00081248 38 64 00 00 */ addi r3, r4, 0 +/* 8008430C 0008124C 38 DE 00 00 */ addi r6, r30, 0 +/* 80084310 00081250 38 80 00 01 */ li r4, 1 +/* 80084314 00081254 4B FF F5 99 */ bl fwrite +/* 80084318 00081258 7C 1F 18 40 */ cmplw r31, r3 +/* 8008431C 0008125C 40 82 00 0C */ bne lbl_80084328 +/* 80084320 00081260 7F C3 F3 78 */ mr r3, r30 +/* 80084324 00081264 48 00 00 08 */ b lbl_8008432C +lbl_80084328: +/* 80084328 00081268 38 60 00 00 */ li r3, 0 +lbl_8008432C: +/* 8008432C 0008126C 80 01 00 24 */ lwz r0, 0x24(r1) +/* 80084330 00081270 83 E1 00 1C */ lwz r31, 0x1c(r1) +/* 80084334 00081274 83 C1 00 18 */ lwz r30, 0x18(r1) +/* 80084338 00081278 7C 08 03 A6 */ mtlr r0 +/* 8008433C 0008127C 38 21 00 20 */ addi r1, r1, 0x20 +/* 80084340 00081280 4E 80 00 20 */ blr + +.global __pformatter +__pformatter: +/* 80084344 00081284 7C 08 02 A6 */ mflr r0 +/* 80084348 00081288 3C E0 80 37 */ lis r7, "@stringBase0"@ha +/* 8008434C 0008128C 90 01 00 04 */ stw r0, 4(r1) +/* 80084350 00081290 38 00 00 20 */ li r0, 0x20 +/* 80084354 00081294 94 21 FD 98 */ stwu r1, -0x268(r1) +/* 80084358 00081298 BE 41 02 30 */ stmw r18, 0x230(r1) +/* 8008435C 0008129C 3B E3 00 00 */ addi r31, r3, 0 +/* 80084360 000812A0 3B C4 00 00 */ addi r30, r4, 0 +/* 80084364 000812A4 3B 86 00 00 */ addi r28, r6, 0 +/* 80084368 000812A8 3B 25 00 00 */ addi r25, r5, 0 +/* 8008436C 000812AC 3B 41 02 1C */ addi r26, r1, 0x21c +/* 80084370 000812B0 3A E1 02 1B */ addi r23, r1, 0x21b +/* 80084374 000812B4 3A 87 19 20 */ addi r20, r7, "@stringBase0"@l +/* 80084378 000812B8 3B 60 00 00 */ li r27, 0 +/* 8008437C 000812BC 98 01 00 19 */ stb r0, 0x19(r1) +/* 80084380 000812C0 48 00 05 D0 */ b lbl_80084950 +lbl_80084384: +/* 80084384 000812C4 38 79 00 00 */ addi r3, r25, 0 +/* 80084388 000812C8 38 80 00 25 */ li r4, 0x25 +/* 8008438C 000812CC 48 00 18 A1 */ bl strchr +/* 80084390 000812D0 7C 78 1B 79 */ or. r24, r3, r3 +/* 80084394 000812D4 40 82 00 3C */ bne lbl_800843D0 +/* 80084398 000812D8 7F 23 CB 78 */ mr r3, r25 +/* 8008439C 000812DC 48 00 1B 09 */ bl strlen +/* 800843A0 000812E0 7C 65 1B 79 */ or. r5, r3, r3 +/* 800843A4 000812E4 7F 7B 2A 14 */ add r27, r27, r5 +/* 800843A8 000812E8 41 82 05 B4 */ beq lbl_8008495C +/* 800843AC 000812EC 39 9F 00 00 */ addi r12, r31, 0 +/* 800843B0 000812F0 7D 88 03 A6 */ mtlr r12 +/* 800843B4 000812F4 38 7E 00 00 */ addi r3, r30, 0 +/* 800843B8 000812F8 38 99 00 00 */ addi r4, r25, 0 +/* 800843BC 000812FC 4E 80 00 21 */ blrl +/* 800843C0 00081300 28 03 00 00 */ cmplwi r3, 0 +/* 800843C4 00081304 40 82 05 98 */ bne lbl_8008495C +/* 800843C8 00081308 38 60 FF FF */ li r3, -1 +/* 800843CC 0008130C 48 00 05 94 */ b lbl_80084960 +lbl_800843D0: +/* 800843D0 00081310 7C B9 C0 51 */ subf. r5, r25, r24 +/* 800843D4 00081314 7F 7B 2A 14 */ add r27, r27, r5 +/* 800843D8 00081318 41 82 00 28 */ beq lbl_80084400 +/* 800843DC 0008131C 39 9F 00 00 */ addi r12, r31, 0 +/* 800843E0 00081320 7D 88 03 A6 */ mtlr r12 +/* 800843E4 00081324 38 7E 00 00 */ addi r3, r30, 0 +/* 800843E8 00081328 38 99 00 00 */ addi r4, r25, 0 +/* 800843EC 0008132C 4E 80 00 21 */ blrl +/* 800843F0 00081330 28 03 00 00 */ cmplwi r3, 0 +/* 800843F4 00081334 40 82 00 0C */ bne lbl_80084400 +/* 800843F8 00081338 38 60 FF FF */ li r3, -1 +/* 800843FC 0008133C 48 00 05 64 */ b lbl_80084960 +lbl_80084400: +/* 80084400 00081340 38 78 00 00 */ addi r3, r24, 0 +/* 80084404 00081344 38 9C 00 00 */ addi r4, r28, 0 +/* 80084408 00081348 38 A1 02 1C */ addi r5, r1, 0x21c +/* 8008440C 0008134C 48 00 11 D9 */ bl parse_format +/* 80084410 00081350 88 01 02 21 */ lbz r0, 0x221(r1) +/* 80084414 00081354 3B 23 00 00 */ addi r25, r3, 0 +/* 80084418 00081358 2C 00 00 69 */ cmpwi r0, 0x69 +/* 8008441C 0008135C 41 82 00 A4 */ beq lbl_800844C0 +/* 80084420 00081360 40 80 00 58 */ bge lbl_80084478 +/* 80084424 00081364 2C 00 00 58 */ cmpwi r0, 0x58 +/* 80084428 00081368 41 82 01 54 */ beq lbl_8008457C +/* 8008442C 0008136C 40 80 00 28 */ bge lbl_80084454 +/* 80084430 00081370 2C 00 00 45 */ cmpwi r0, 0x45 +/* 80084434 00081374 41 82 02 04 */ beq lbl_80084638 +/* 80084438 00081378 40 80 00 10 */ bge lbl_80084448 +/* 8008443C 0008137C 2C 00 00 25 */ cmpwi r0, 0x25 +/* 80084440 00081380 41 82 03 7C */ beq lbl_800847BC +/* 80084444 00081384 48 00 03 8C */ b lbl_800847D0 +lbl_80084448: +/* 80084448 00081388 2C 00 00 47 */ cmpwi r0, 0x47 +/* 8008444C 0008138C 41 82 01 EC */ beq lbl_80084638 +/* 80084450 00081390 48 00 03 80 */ b lbl_800847D0 +lbl_80084454: +/* 80084454 00081394 2C 00 00 64 */ cmpwi r0, 0x64 +/* 80084458 00081398 41 82 00 68 */ beq lbl_800844C0 +/* 8008445C 0008139C 40 80 00 10 */ bge lbl_8008446C +/* 80084460 000813A0 2C 00 00 63 */ cmpwi r0, 0x63 +/* 80084464 000813A4 40 80 03 34 */ bge lbl_80084798 +/* 80084468 000813A8 48 00 03 68 */ b lbl_800847D0 +lbl_8008446C: +/* 8008446C 000813AC 2C 00 00 68 */ cmpwi r0, 0x68 +/* 80084470 000813B0 40 80 03 60 */ bge lbl_800847D0 +/* 80084474 000813B4 48 00 01 C4 */ b lbl_80084638 +lbl_80084478: +/* 80084478 000813B8 2C 00 00 75 */ cmpwi r0, 0x75 +/* 8008447C 000813BC 41 82 01 00 */ beq lbl_8008457C +/* 80084480 000813C0 40 80 00 28 */ bge lbl_800844A8 +/* 80084484 000813C4 2C 00 00 6F */ cmpwi r0, 0x6f +/* 80084488 000813C8 41 82 00 F4 */ beq lbl_8008457C +/* 8008448C 000813CC 40 80 00 10 */ bge lbl_8008449C +/* 80084490 000813D0 2C 00 00 6E */ cmpwi r0, 0x6e +/* 80084494 000813D4 40 80 02 9C */ bge lbl_80084730 +/* 80084498 000813D8 48 00 03 38 */ b lbl_800847D0 +lbl_8008449C: +/* 8008449C 000813DC 2C 00 00 73 */ cmpwi r0, 0x73 +/* 800844A0 000813E0 41 82 01 BC */ beq lbl_8008465C +/* 800844A4 000813E4 48 00 03 2C */ b lbl_800847D0 +lbl_800844A8: +/* 800844A8 000813E8 2C 00 00 FF */ cmpwi r0, 0xff +/* 800844AC 000813EC 41 82 03 24 */ beq lbl_800847D0 +/* 800844B0 000813F0 40 80 03 20 */ bge lbl_800847D0 +/* 800844B4 000813F4 2C 00 00 78 */ cmpwi r0, 0x78 +/* 800844B8 000813F8 41 82 00 C4 */ beq lbl_8008457C +/* 800844BC 000813FC 48 00 03 14 */ b lbl_800847D0 +lbl_800844C0: +/* 800844C0 00081400 88 01 02 20 */ lbz r0, 0x220(r1) +/* 800844C4 00081404 28 00 00 03 */ cmplwi r0, 3 +/* 800844C8 00081408 40 82 00 18 */ bne lbl_800844E0 +/* 800844CC 0008140C 38 7C 00 00 */ addi r3, r28, 0 +/* 800844D0 00081410 38 80 00 01 */ li r4, 1 +/* 800844D4 00081414 4B FF E1 19 */ bl __va_arg +/* 800844D8 00081418 83 A3 00 00 */ lwz r29, 0(r3) +/* 800844DC 0008141C 48 00 00 34 */ b lbl_80084510 +lbl_800844E0: +/* 800844E0 00081420 28 00 00 04 */ cmplwi r0, 4 +/* 800844E4 00081424 40 82 00 1C */ bne lbl_80084500 +/* 800844E8 00081428 38 7C 00 00 */ addi r3, r28, 0 +/* 800844EC 0008142C 38 80 00 02 */ li r4, 2 +/* 800844F0 00081430 4B FF E0 FD */ bl __va_arg +/* 800844F4 00081434 82 A3 00 00 */ lwz r21, 0(r3) +/* 800844F8 00081438 82 C3 00 04 */ lwz r22, 4(r3) +/* 800844FC 0008143C 48 00 00 14 */ b lbl_80084510 +lbl_80084500: +/* 80084500 00081440 38 7C 00 00 */ addi r3, r28, 0 +/* 80084504 00081444 38 80 00 01 */ li r4, 1 +/* 80084508 00081448 4B FF E0 E5 */ bl __va_arg +/* 8008450C 0008144C 83 A3 00 00 */ lwz r29, 0(r3) +lbl_80084510: +/* 80084510 00081450 88 61 02 20 */ lbz r3, 0x220(r1) +/* 80084514 00081454 28 03 00 02 */ cmplwi r3, 2 +/* 80084518 00081458 40 82 00 0C */ bne lbl_80084524 +/* 8008451C 0008145C 7F A0 07 34 */ extsh r0, r29 +/* 80084520 00081460 7C 1D 03 78 */ mr r29, r0 +lbl_80084524: +/* 80084524 00081464 28 03 00 01 */ cmplwi r3, 1 +/* 80084528 00081468 40 82 00 0C */ bne lbl_80084534 +/* 8008452C 0008146C 7F A0 07 74 */ extsb r0, r29 +/* 80084530 00081470 7C 1D 03 78 */ mr r29, r0 +lbl_80084534: +/* 80084534 00081474 28 03 00 04 */ cmplwi r3, 4 +/* 80084538 00081478 40 82 00 24 */ bne lbl_8008455C +/* 8008453C 0008147C 38 96 00 00 */ addi r4, r22, 0 +/* 80084540 00081480 38 75 00 00 */ addi r3, r21, 0 +/* 80084544 00081484 38 BA 00 00 */ addi r5, r26, 0 +/* 80084548 00081488 38 C1 02 1C */ addi r6, r1, 0x21c +/* 8008454C 0008148C 48 00 0B 95 */ bl longlong2str +/* 80084550 00081490 7C 73 1B 79 */ or. r19, r3, r3 +/* 80084554 00081494 41 82 02 7C */ beq lbl_800847D0 +/* 80084558 00081498 48 00 00 1C */ b lbl_80084574 +lbl_8008455C: +/* 8008455C 0008149C 38 7D 00 00 */ addi r3, r29, 0 +/* 80084560 000814A0 38 9A 00 00 */ addi r4, r26, 0 +/* 80084564 000814A4 38 A1 02 1C */ addi r5, r1, 0x21c +/* 80084568 000814A8 48 00 0E 59 */ bl long2str +/* 8008456C 000814AC 7C 73 1B 79 */ or. r19, r3, r3 +/* 80084570 000814B0 41 82 02 60 */ beq lbl_800847D0 +lbl_80084574: +/* 80084574 000814B4 7F 13 B8 50 */ subf r24, r19, r23 +/* 80084578 000814B8 48 00 02 98 */ b lbl_80084810 +lbl_8008457C: +/* 8008457C 000814BC 88 01 02 20 */ lbz r0, 0x220(r1) +/* 80084580 000814C0 28 00 00 03 */ cmplwi r0, 3 +/* 80084584 000814C4 40 82 00 18 */ bne lbl_8008459C +/* 80084588 000814C8 38 7C 00 00 */ addi r3, r28, 0 +/* 8008458C 000814CC 38 80 00 01 */ li r4, 1 +/* 80084590 000814D0 4B FF E0 5D */ bl __va_arg +/* 80084594 000814D4 83 A3 00 00 */ lwz r29, 0(r3) +/* 80084598 000814D8 48 00 00 34 */ b lbl_800845CC +lbl_8008459C: +/* 8008459C 000814DC 28 00 00 04 */ cmplwi r0, 4 +/* 800845A0 000814E0 40 82 00 1C */ bne lbl_800845BC +/* 800845A4 000814E4 38 7C 00 00 */ addi r3, r28, 0 +/* 800845A8 000814E8 38 80 00 02 */ li r4, 2 +/* 800845AC 000814EC 4B FF E0 41 */ bl __va_arg +/* 800845B0 000814F0 82 A3 00 00 */ lwz r21, 0(r3) +/* 800845B4 000814F4 82 C3 00 04 */ lwz r22, 4(r3) +/* 800845B8 000814F8 48 00 00 14 */ b lbl_800845CC +lbl_800845BC: +/* 800845BC 000814FC 38 7C 00 00 */ addi r3, r28, 0 +/* 800845C0 00081500 38 80 00 01 */ li r4, 1 +/* 800845C4 00081504 4B FF E0 29 */ bl __va_arg +/* 800845C8 00081508 83 A3 00 00 */ lwz r29, 0(r3) +lbl_800845CC: +/* 800845CC 0008150C 88 61 02 20 */ lbz r3, 0x220(r1) +/* 800845D0 00081510 28 03 00 02 */ cmplwi r3, 2 +/* 800845D4 00081514 40 82 00 0C */ bne lbl_800845E0 +/* 800845D8 00081518 57 A0 04 3E */ clrlwi r0, r29, 0x10 +/* 800845DC 0008151C 7C 1D 03 78 */ mr r29, r0 +lbl_800845E0: +/* 800845E0 00081520 28 03 00 01 */ cmplwi r3, 1 +/* 800845E4 00081524 40 82 00 0C */ bne lbl_800845F0 +/* 800845E8 00081528 57 A0 06 3E */ clrlwi r0, r29, 0x18 +/* 800845EC 0008152C 7C 1D 03 78 */ mr r29, r0 +lbl_800845F0: +/* 800845F0 00081530 28 03 00 04 */ cmplwi r3, 4 +/* 800845F4 00081534 40 82 00 24 */ bne lbl_80084618 +/* 800845F8 00081538 38 96 00 00 */ addi r4, r22, 0 +/* 800845FC 0008153C 38 75 00 00 */ addi r3, r21, 0 +/* 80084600 00081540 38 BA 00 00 */ addi r5, r26, 0 +/* 80084604 00081544 38 C1 02 1C */ addi r6, r1, 0x21c +/* 80084608 00081548 48 00 0A D9 */ bl longlong2str +/* 8008460C 0008154C 7C 73 1B 79 */ or. r19, r3, r3 +/* 80084610 00081550 41 82 01 C0 */ beq lbl_800847D0 +/* 80084614 00081554 48 00 00 1C */ b lbl_80084630 +lbl_80084618: +/* 80084618 00081558 38 7D 00 00 */ addi r3, r29, 0 +/* 8008461C 0008155C 38 9A 00 00 */ addi r4, r26, 0 +/* 80084620 00081560 38 A1 02 1C */ addi r5, r1, 0x21c +/* 80084624 00081564 48 00 0D 9D */ bl long2str +/* 80084628 00081568 7C 73 1B 79 */ or. r19, r3, r3 +/* 8008462C 0008156C 41 82 01 A4 */ beq lbl_800847D0 +lbl_80084630: +/* 80084630 00081570 7F 13 B8 50 */ subf r24, r19, r23 +/* 80084634 00081574 48 00 01 DC */ b lbl_80084810 +lbl_80084638: +/* 80084638 00081578 38 7C 00 00 */ addi r3, r28, 0 +/* 8008463C 0008157C 38 9A 00 00 */ addi r4, r26, 0 +/* 80084640 00081580 38 A1 02 1C */ addi r5, r1, 0x21c +/* 80084644 00081584 38 C0 00 00 */ li r6, 0 +/* 80084648 00081588 48 00 03 2D */ bl float2str +/* 8008464C 0008158C 7C 73 1B 79 */ or. r19, r3, r3 +/* 80084650 00081590 41 82 01 80 */ beq lbl_800847D0 +/* 80084654 00081594 7F 13 B8 50 */ subf r24, r19, r23 +/* 80084658 00081598 48 00 01 B8 */ b lbl_80084810 +lbl_8008465C: +/* 8008465C 0008159C 88 01 02 20 */ lbz r0, 0x220(r1) +/* 80084660 000815A0 28 00 00 06 */ cmplwi r0, 6 +/* 80084664 000815A4 40 82 00 3C */ bne lbl_800846A0 +/* 80084668 000815A8 38 7C 00 00 */ addi r3, r28, 0 +/* 8008466C 000815AC 38 80 00 01 */ li r4, 1 +/* 80084670 000815B0 4B FF DF 7D */ bl __va_arg +/* 80084674 000815B4 80 83 00 00 */ lwz r4, 0(r3) +/* 80084678 000815B8 28 04 00 00 */ cmplwi r4, 0 +/* 8008467C 000815BC 40 82 00 08 */ bne lbl_80084684 +/* 80084680 000815C0 38 8D 82 28 */ addi r4, r13, "@wstringBase0"@sda21 +lbl_80084684: +/* 80084684 000815C4 38 61 00 1C */ addi r3, r1, 0x1c +/* 80084688 000815C8 38 A0 02 00 */ li r5, 0x200 +/* 8008468C 000815CC 4B FF F4 FD */ bl wcstombs +/* 80084690 000815D0 2C 03 00 00 */ cmpwi r3, 0 +/* 80084694 000815D4 41 80 01 3C */ blt lbl_800847D0 +/* 80084698 000815D8 3A 61 00 1C */ addi r19, r1, 0x1c +/* 8008469C 000815DC 48 00 00 14 */ b lbl_800846B0 +lbl_800846A0: +/* 800846A0 000815E0 38 7C 00 00 */ addi r3, r28, 0 +/* 800846A4 000815E4 38 80 00 01 */ li r4, 1 +/* 800846A8 000815E8 4B FF DF 45 */ bl __va_arg +/* 800846AC 000815EC 82 63 00 00 */ lwz r19, 0(r3) +lbl_800846B0: +/* 800846B0 000815F0 28 13 00 00 */ cmplwi r19, 0 +/* 800846B4 000815F4 40 82 00 08 */ bne lbl_800846BC +/* 800846B8 000815F8 7E 93 A3 78 */ mr r19, r20 +lbl_800846BC: +/* 800846BC 000815FC 88 01 02 1F */ lbz r0, 0x21f(r1) +/* 800846C0 00081600 28 00 00 00 */ cmplwi r0, 0 +/* 800846C4 00081604 41 82 00 2C */ beq lbl_800846F0 +/* 800846C8 00081608 88 01 02 1E */ lbz r0, 0x21e(r1) +/* 800846CC 0008160C 8B 13 00 00 */ lbz r24, 0(r19) +/* 800846D0 00081610 3A 73 00 01 */ addi r19, r19, 1 +/* 800846D4 00081614 28 00 00 00 */ cmplwi r0, 0 +/* 800846D8 00081618 41 82 01 38 */ beq lbl_80084810 +/* 800846DC 0008161C 80 01 02 28 */ lwz r0, 0x228(r1) +/* 800846E0 00081620 7C 18 00 00 */ cmpw r24, r0 +/* 800846E4 00081624 40 81 01 2C */ ble lbl_80084810 +/* 800846E8 00081628 7C 18 03 78 */ mr r24, r0 +/* 800846EC 0008162C 48 00 01 24 */ b lbl_80084810 +lbl_800846F0: +/* 800846F0 00081630 88 01 02 1E */ lbz r0, 0x21e(r1) +/* 800846F4 00081634 28 00 00 00 */ cmplwi r0, 0 +/* 800846F8 00081638 41 82 00 28 */ beq lbl_80084720 +/* 800846FC 0008163C 83 01 02 28 */ lwz r24, 0x228(r1) +/* 80084700 00081640 38 73 00 00 */ addi r3, r19, 0 +/* 80084704 00081644 38 80 00 00 */ li r4, 0 +/* 80084708 00081648 38 B8 00 00 */ addi r5, r24, 0 +/* 8008470C 0008164C 4B FF F4 FD */ bl memchr +/* 80084710 00081650 28 03 00 00 */ cmplwi r3, 0 +/* 80084714 00081654 41 82 00 FC */ beq lbl_80084810 +/* 80084718 00081658 7F 13 18 50 */ subf r24, r19, r3 +/* 8008471C 0008165C 48 00 00 F4 */ b lbl_80084810 +lbl_80084720: +/* 80084720 00081660 7E 63 9B 78 */ mr r3, r19 +/* 80084724 00081664 48 00 17 81 */ bl strlen +/* 80084728 00081668 7C 78 1B 78 */ mr r24, r3 +/* 8008472C 0008166C 48 00 00 E4 */ b lbl_80084810 +lbl_80084730: +/* 80084730 00081670 38 7C 00 00 */ addi r3, r28, 0 +/* 80084734 00081674 38 80 00 01 */ li r4, 1 +/* 80084738 00081678 4B FF DE B5 */ bl __va_arg +/* 8008473C 0008167C 88 01 02 20 */ lbz r0, 0x220(r1) +/* 80084740 00081680 80 63 00 00 */ lwz r3, 0(r3) +/* 80084744 00081684 2C 00 00 02 */ cmpwi r0, 2 +/* 80084748 00081688 41 82 00 2C */ beq lbl_80084774 +/* 8008474C 0008168C 40 80 00 10 */ bge lbl_8008475C +/* 80084750 00081690 2C 00 00 00 */ cmpwi r0, 0 +/* 80084754 00081694 41 82 00 18 */ beq lbl_8008476C +/* 80084758 00081698 48 00 01 F8 */ b lbl_80084950 +lbl_8008475C: +/* 8008475C 0008169C 2C 00 00 04 */ cmpwi r0, 4 +/* 80084760 000816A0 41 82 00 28 */ beq lbl_80084788 +/* 80084764 000816A4 40 80 01 EC */ bge lbl_80084950 +/* 80084768 000816A8 48 00 00 18 */ b lbl_80084780 +lbl_8008476C: +/* 8008476C 000816AC 93 63 00 00 */ stw r27, 0(r3) +/* 80084770 000816B0 48 00 01 E0 */ b lbl_80084950 +lbl_80084774: +/* 80084774 000816B4 7F 60 07 34 */ extsh r0, r27 +/* 80084778 000816B8 B0 03 00 00 */ sth r0, 0(r3) +/* 8008477C 000816BC 48 00 01 D4 */ b lbl_80084950 +lbl_80084780: +/* 80084780 000816C0 93 63 00 00 */ stw r27, 0(r3) +/* 80084784 000816C4 48 00 01 CC */ b lbl_80084950 +lbl_80084788: +/* 80084788 000816C8 93 63 00 04 */ stw r27, 4(r3) +/* 8008478C 000816CC 7F 60 FE 70 */ srawi r0, r27, 0x1f +/* 80084790 000816D0 90 03 00 00 */ stw r0, 0(r3) +/* 80084794 000816D4 48 00 01 BC */ b lbl_80084950 +lbl_80084798: +/* 80084798 000816D8 38 7C 00 00 */ addi r3, r28, 0 +/* 8008479C 000816DC 3A 61 00 1C */ addi r19, r1, 0x1c +/* 800847A0 000816E0 38 80 00 01 */ li r4, 1 +/* 800847A4 000816E4 4B FF DE 49 */ bl __va_arg +/* 800847A8 000816E8 80 03 00 00 */ lwz r0, 0(r3) +/* 800847AC 000816EC 3B 00 00 01 */ li r24, 1 +/* 800847B0 000816F0 7C 00 07 74 */ extsb r0, r0 +/* 800847B4 000816F4 98 01 00 1C */ stb r0, 0x1c(r1) +/* 800847B8 000816F8 48 00 00 58 */ b lbl_80084810 +lbl_800847BC: +/* 800847BC 000816FC 38 00 00 25 */ li r0, 0x25 +/* 800847C0 00081700 98 01 00 1C */ stb r0, 0x1c(r1) +/* 800847C4 00081704 3A 61 00 1C */ addi r19, r1, 0x1c +/* 800847C8 00081708 3B 00 00 01 */ li r24, 1 +/* 800847CC 0008170C 48 00 00 44 */ b lbl_80084810 +lbl_800847D0: +/* 800847D0 00081710 7F 03 C3 78 */ mr r3, r24 +/* 800847D4 00081714 48 00 16 D1 */ bl strlen +/* 800847D8 00081718 7C 65 1B 79 */ or. r5, r3, r3 +/* 800847DC 0008171C 7F 7B 2A 14 */ add r27, r27, r5 +/* 800847E0 00081720 41 82 00 28 */ beq lbl_80084808 +/* 800847E4 00081724 39 9F 00 00 */ addi r12, r31, 0 +/* 800847E8 00081728 7D 88 03 A6 */ mtlr r12 +/* 800847EC 0008172C 38 7E 00 00 */ addi r3, r30, 0 +/* 800847F0 00081730 38 98 00 00 */ addi r4, r24, 0 +/* 800847F4 00081734 4E 80 00 21 */ blrl +/* 800847F8 00081738 28 03 00 00 */ cmplwi r3, 0 +/* 800847FC 0008173C 40 82 00 0C */ bne lbl_80084808 +/* 80084800 00081740 38 60 FF FF */ li r3, -1 +/* 80084804 00081744 48 00 01 5C */ b lbl_80084960 +lbl_80084808: +/* 80084808 00081748 7F 63 DB 78 */ mr r3, r27 +/* 8008480C 0008174C 48 00 01 54 */ b lbl_80084960 +lbl_80084810: +/* 80084810 00081750 88 01 02 1C */ lbz r0, 0x21c(r1) +/* 80084814 00081754 3A 58 00 00 */ addi r18, r24, 0 +/* 80084818 00081758 28 00 00 00 */ cmplwi r0, 0 +/* 8008481C 0008175C 41 82 00 B0 */ beq lbl_800848CC +/* 80084820 00081760 28 00 00 02 */ cmplwi r0, 2 +/* 80084824 00081764 40 82 00 0C */ bne lbl_80084830 +/* 80084828 00081768 38 00 00 30 */ li r0, 0x30 +/* 8008482C 0008176C 48 00 00 08 */ b lbl_80084834 +lbl_80084830: +/* 80084830 00081770 38 00 00 20 */ li r0, 0x20 +lbl_80084834: +/* 80084834 00081774 7C 00 07 74 */ extsb r0, r0 +/* 80084838 00081778 98 01 00 19 */ stb r0, 0x19(r1) +/* 8008483C 0008177C 88 13 00 00 */ lbz r0, 0(r19) +/* 80084840 00081780 7C 00 07 74 */ extsb r0, r0 +/* 80084844 00081784 2C 00 00 2B */ cmpwi r0, 0x2b +/* 80084848 00081788 41 82 00 0C */ beq lbl_80084854 +/* 8008484C 0008178C 2C 00 00 2D */ cmpwi r0, 0x2d +/* 80084850 00081790 40 82 00 70 */ bne lbl_800848C0 +lbl_80084854: +/* 80084854 00081794 88 01 00 19 */ lbz r0, 0x19(r1) +/* 80084858 00081798 2C 00 00 30 */ cmpwi r0, 0x30 +/* 8008485C 0008179C 40 82 00 64 */ bne lbl_800848C0 +/* 80084860 000817A0 39 9F 00 00 */ addi r12, r31, 0 +/* 80084864 000817A4 7D 88 03 A6 */ mtlr r12 +/* 80084868 000817A8 38 7E 00 00 */ addi r3, r30, 0 +/* 8008486C 000817AC 38 93 00 00 */ addi r4, r19, 0 +/* 80084870 000817B0 38 A0 00 01 */ li r5, 1 +/* 80084874 000817B4 4E 80 00 21 */ blrl +/* 80084878 000817B8 28 03 00 00 */ cmplwi r3, 0 +/* 8008487C 000817BC 40 82 00 0C */ bne lbl_80084888 +/* 80084880 000817C0 38 60 FF FF */ li r3, -1 +/* 80084884 000817C4 48 00 00 DC */ b lbl_80084960 +lbl_80084888: +/* 80084888 000817C8 3A 73 00 01 */ addi r19, r19, 1 +/* 8008488C 000817CC 3B 18 FF FF */ addi r24, r24, -1 +/* 80084890 000817D0 48 00 00 30 */ b lbl_800848C0 +lbl_80084894: +/* 80084894 000817D4 39 9F 00 00 */ addi r12, r31, 0 +/* 80084898 000817D8 7D 88 03 A6 */ mtlr r12 +/* 8008489C 000817DC 38 7E 00 00 */ addi r3, r30, 0 +/* 800848A0 000817E0 38 81 00 19 */ addi r4, r1, 0x19 +/* 800848A4 000817E4 38 A0 00 01 */ li r5, 1 +/* 800848A8 000817E8 4E 80 00 21 */ blrl +/* 800848AC 000817EC 28 03 00 00 */ cmplwi r3, 0 +/* 800848B0 000817F0 40 82 00 0C */ bne lbl_800848BC +/* 800848B4 000817F4 38 60 FF FF */ li r3, -1 +/* 800848B8 000817F8 48 00 00 A8 */ b lbl_80084960 +lbl_800848BC: +/* 800848BC 000817FC 3A 52 00 01 */ addi r18, r18, 1 +lbl_800848C0: +/* 800848C0 00081800 80 01 02 24 */ lwz r0, 0x224(r1) +/* 800848C4 00081804 7C 12 00 00 */ cmpw r18, r0 +/* 800848C8 00081808 41 80 FF CC */ blt lbl_80084894 +lbl_800848CC: +/* 800848CC 0008180C 2C 18 00 00 */ cmpwi r24, 0 +/* 800848D0 00081810 41 82 00 2C */ beq lbl_800848FC +/* 800848D4 00081814 39 9F 00 00 */ addi r12, r31, 0 +/* 800848D8 00081818 7D 88 03 A6 */ mtlr r12 +/* 800848DC 0008181C 38 7E 00 00 */ addi r3, r30, 0 +/* 800848E0 00081820 38 93 00 00 */ addi r4, r19, 0 +/* 800848E4 00081824 38 B8 00 00 */ addi r5, r24, 0 +/* 800848E8 00081828 4E 80 00 21 */ blrl +/* 800848EC 0008182C 28 03 00 00 */ cmplwi r3, 0 +/* 800848F0 00081830 40 82 00 0C */ bne lbl_800848FC +/* 800848F4 00081834 38 60 FF FF */ li r3, -1 +/* 800848F8 00081838 48 00 00 68 */ b lbl_80084960 +lbl_800848FC: +/* 800848FC 0008183C 88 01 02 1C */ lbz r0, 0x21c(r1) +/* 80084900 00081840 28 00 00 00 */ cmplwi r0, 0 +/* 80084904 00081844 40 82 00 48 */ bne lbl_8008494C +/* 80084908 00081848 3A 60 00 20 */ li r19, 0x20 +/* 8008490C 0008184C 48 00 00 34 */ b lbl_80084940 +lbl_80084910: +/* 80084910 00081850 7F EC FB 78 */ mr r12, r31 +/* 80084914 00081854 9A 61 00 18 */ stb r19, 0x18(r1) +/* 80084918 00081858 7D 88 03 A6 */ mtlr r12 +/* 8008491C 0008185C 38 7E 00 00 */ addi r3, r30, 0 +/* 80084920 00081860 38 81 00 18 */ addi r4, r1, 0x18 +/* 80084924 00081864 38 A0 00 01 */ li r5, 1 +/* 80084928 00081868 4E 80 00 21 */ blrl +/* 8008492C 0008186C 28 03 00 00 */ cmplwi r3, 0 +/* 80084930 00081870 40 82 00 0C */ bne lbl_8008493C +/* 80084934 00081874 38 60 FF FF */ li r3, -1 +/* 80084938 00081878 48 00 00 28 */ b lbl_80084960 +lbl_8008493C: +/* 8008493C 0008187C 3A 52 00 01 */ addi r18, r18, 1 +lbl_80084940: +/* 80084940 00081880 80 01 02 24 */ lwz r0, 0x224(r1) +/* 80084944 00081884 7C 12 00 00 */ cmpw r18, r0 +/* 80084948 00081888 41 80 FF C8 */ blt lbl_80084910 +lbl_8008494C: +/* 8008494C 0008188C 7F 7B 92 14 */ add r27, r27, r18 +lbl_80084950: +/* 80084950 00081890 88 19 00 00 */ lbz r0, 0(r25) +/* 80084954 00081894 7C 00 07 75 */ extsb. r0, r0 +/* 80084958 00081898 40 82 FA 2C */ bne lbl_80084384 +lbl_8008495C: +/* 8008495C 0008189C 7F 63 DB 78 */ mr r3, r27 +lbl_80084960: +/* 80084960 000818A0 BA 41 02 30 */ lmw r18, 0x230(r1) +/* 80084964 000818A4 80 01 02 6C */ lwz r0, 0x26c(r1) +/* 80084968 000818A8 38 21 02 68 */ addi r1, r1, 0x268 +/* 8008496C 000818AC 7C 08 03 A6 */ mtlr r0 +/* 80084970 000818B0 4E 80 00 20 */ blr + +.global float2str +float2str: +/* 80084974 000818B4 7C 08 02 A6 */ mflr r0 +/* 80084978 000818B8 90 01 00 04 */ stw r0, 4(r1) +/* 8008497C 000818BC 94 21 FF A0 */ stwu r1, -0x60(r1) +/* 80084980 000818C0 DB E1 00 58 */ stfd f31, 0x58(r1) +/* 80084984 000818C4 93 E1 00 54 */ stw r31, 0x54(r1) +/* 80084988 000818C8 93 C1 00 50 */ stw r30, 0x50(r1) +/* 8008498C 000818CC 93 A1 00 4C */ stw r29, 0x4c(r1) +/* 80084990 000818D0 7C BD 2B 78 */ mr r29, r5 +/* 80084994 000818D4 93 81 00 48 */ stw r28, 0x48(r1) +/* 80084998 000818D8 3B 84 00 00 */ addi r28, r4, 0 +/* 8008499C 000818DC 88 05 00 04 */ lbz r0, 4(r5) +/* 800849A0 000818E0 28 00 00 05 */ cmplwi r0, 5 +/* 800849A4 000818E4 40 82 00 14 */ bne lbl_800849B8 +/* 800849A8 000818E8 38 80 00 03 */ li r4, 3 +/* 800849AC 000818EC 4B FF DC 41 */ bl __va_arg +/* 800849B0 000818F0 CB E3 00 00 */ lfd f31, 0(r3) +/* 800849B4 000818F4 48 00 00 10 */ b lbl_800849C4 +lbl_800849B8: +/* 800849B8 000818F8 38 80 00 03 */ li r4, 3 +/* 800849BC 000818FC 4B FF DC 31 */ bl __va_arg +/* 800849C0 00081900 CB E3 00 00 */ lfd f31, 0(r3) +lbl_800849C4: +/* 800849C4 00081904 80 1D 00 0C */ lwz r0, 0xc(r29) +/* 800849C8 00081908 2C 00 01 FD */ cmpwi r0, 0x1fd +/* 800849CC 0008190C 40 81 00 0C */ ble lbl_800849D8 +/* 800849D0 00081910 38 60 00 00 */ li r3, 0 +/* 800849D4 00081914 48 00 05 B4 */ b lbl_80084F88 +lbl_800849D8: +/* 800849D8 00081918 38 00 00 00 */ li r0, 0 +/* 800849DC 0008191C FC 20 F8 90 */ fmr f1, f31 +/* 800849E0 00081920 98 01 00 18 */ stb r0, 0x18(r1) +/* 800849E4 00081924 38 00 00 20 */ li r0, 0x20 +/* 800849E8 00081928 38 61 00 18 */ addi r3, r1, 0x18 +/* 800849EC 0008192C B0 01 00 1A */ sth r0, 0x1a(r1) +/* 800849F0 00081930 38 81 00 1C */ addi r4, r1, 0x1c +/* 800849F4 00081934 4B FF E9 B1 */ bl __num2dec +/* 800849F8 00081938 88 01 00 20 */ lbz r0, 0x20(r1) +/* 800849FC 0008193C 3B E1 00 21 */ addi r31, r1, 0x21 +/* 80084A00 00081940 7C 9F 02 14 */ add r4, r31, r0 +/* 80084A04 00081944 48 00 00 1C */ b lbl_80084A20 +lbl_80084A08: +/* 80084A08 00081948 88 61 00 20 */ lbz r3, 0x20(r1) +/* 80084A0C 0008194C 38 03 FF FF */ addi r0, r3, -1 +/* 80084A10 00081950 98 01 00 20 */ stb r0, 0x20(r1) +/* 80084A14 00081954 A8 61 00 1E */ lha r3, 0x1e(r1) +/* 80084A18 00081958 38 03 00 01 */ addi r0, r3, 1 +/* 80084A1C 0008195C B0 01 00 1E */ sth r0, 0x1e(r1) +lbl_80084A20: +/* 80084A20 00081960 88 01 00 20 */ lbz r0, 0x20(r1) +/* 80084A24 00081964 28 00 00 01 */ cmplwi r0, 1 +/* 80084A28 00081968 40 81 00 10 */ ble lbl_80084A38 +/* 80084A2C 0008196C 8C 04 FF FF */ lbzu r0, -1(r4) +/* 80084A30 00081970 2C 00 00 30 */ cmpwi r0, 0x30 +/* 80084A34 00081974 41 82 FF D4 */ beq lbl_80084A08 +lbl_80084A38: +/* 80084A38 00081978 88 01 00 21 */ lbz r0, 0x21(r1) +/* 80084A3C 0008197C 2C 00 00 49 */ cmpwi r0, 0x49 +/* 80084A40 00081980 41 82 00 2C */ beq lbl_80084A6C +/* 80084A44 00081984 40 80 00 10 */ bge lbl_80084A54 +/* 80084A48 00081988 2C 00 00 30 */ cmpwi r0, 0x30 +/* 80084A4C 0008198C 41 82 00 14 */ beq lbl_80084A60 +/* 80084A50 00081990 48 00 00 84 */ b lbl_80084AD4 +lbl_80084A54: +/* 80084A54 00081994 2C 00 00 4E */ cmpwi r0, 0x4e +/* 80084A58 00081998 41 82 00 5C */ beq lbl_80084AB4 +/* 80084A5C 0008199C 48 00 00 78 */ b lbl_80084AD4 +lbl_80084A60: +/* 80084A60 000819A0 38 00 00 00 */ li r0, 0 +/* 80084A64 000819A4 B0 01 00 1E */ sth r0, 0x1e(r1) +/* 80084A68 000819A8 48 00 00 6C */ b lbl_80084AD4 +lbl_80084A6C: +/* 80084A6C 000819AC C8 02 89 80 */ lfd f0, "@919"@sda21(r2) +/* 80084A70 000819B0 FC 1F 00 40 */ fcmpo cr0, f31, f0 +/* 80084A74 000819B4 40 80 00 20 */ bge lbl_80084A94 +/* 80084A78 000819B8 3C 60 80 37 */ lis r3, "@stringBase0"@ha +/* 80084A7C 000819BC 3B 9C FF FB */ addi r28, r28, -5 +/* 80084A80 000819C0 38 83 19 20 */ addi r4, r3, "@stringBase0"@l +/* 80084A84 000819C4 38 7C 00 00 */ addi r3, r28, 0 +/* 80084A88 000819C8 38 84 00 01 */ addi r4, r4, 1 +/* 80084A8C 000819CC 48 00 13 65 */ bl strcpy +/* 80084A90 000819D0 48 00 00 1C */ b lbl_80084AAC +lbl_80084A94: +/* 80084A94 000819D4 3C 60 80 37 */ lis r3, "@stringBase0"@ha +/* 80084A98 000819D8 3B 9C FF FC */ addi r28, r28, -4 +/* 80084A9C 000819DC 38 83 19 20 */ addi r4, r3, "@stringBase0"@l +/* 80084AA0 000819E0 38 7C 00 00 */ addi r3, r28, 0 +/* 80084AA4 000819E4 38 84 00 06 */ addi r4, r4, 6 +/* 80084AA8 000819E8 48 00 13 49 */ bl strcpy +lbl_80084AAC: +/* 80084AAC 000819EC 7F 83 E3 78 */ mr r3, r28 +/* 80084AB0 000819F0 48 00 04 D8 */ b lbl_80084F88 +lbl_80084AB4: +/* 80084AB4 000819F4 3C 60 80 37 */ lis r3, "@stringBase0"@ha +/* 80084AB8 000819F8 3B 9C FF FC */ addi r28, r28, -4 +/* 80084ABC 000819FC 38 83 19 20 */ addi r4, r3, "@stringBase0"@l +/* 80084AC0 00081A00 38 7C 00 00 */ addi r3, r28, 0 +/* 80084AC4 00081A04 38 84 00 0A */ addi r4, r4, 0xa +/* 80084AC8 00081A08 48 00 13 29 */ bl strcpy +/* 80084ACC 00081A0C 7F 83 E3 78 */ mr r3, r28 +/* 80084AD0 00081A10 48 00 04 B8 */ b lbl_80084F88 +lbl_80084AD4: +/* 80084AD4 00081A14 A8 81 00 1E */ lha r4, 0x1e(r1) +/* 80084AD8 00081A18 38 00 00 00 */ li r0, 0 +/* 80084ADC 00081A1C 88 61 00 20 */ lbz r3, 0x20(r1) +/* 80084AE0 00081A20 3B DC FF FF */ addi r30, r28, -1 +/* 80084AE4 00081A24 7C 63 22 14 */ add r3, r3, r4 +/* 80084AE8 00081A28 38 63 FF FF */ addi r3, r3, -1 +/* 80084AEC 00081A2C B0 61 00 1E */ sth r3, 0x1e(r1) +/* 80084AF0 00081A30 98 1C FF FF */ stb r0, -1(r28) +/* 80084AF4 00081A34 88 1D 00 05 */ lbz r0, 5(r29) +/* 80084AF8 00081A38 2C 00 00 65 */ cmpwi r0, 0x65 +/* 80084AFC 00081A3C 41 82 00 F4 */ beq lbl_80084BF0 +/* 80084B00 00081A40 40 80 00 28 */ bge lbl_80084B28 +/* 80084B04 00081A44 2C 00 00 46 */ cmpwi r0, 0x46 +/* 80084B08 00081A48 41 82 04 7C */ beq lbl_80084F84 +/* 80084B0C 00081A4C 40 80 00 10 */ bge lbl_80084B1C +/* 80084B10 00081A50 2C 00 00 45 */ cmpwi r0, 0x45 +/* 80084B14 00081A54 40 80 00 DC */ bge lbl_80084BF0 +/* 80084B18 00081A58 48 00 04 6C */ b lbl_80084F84 +lbl_80084B1C: +/* 80084B1C 00081A5C 2C 00 00 48 */ cmpwi r0, 0x48 +/* 80084B20 00081A60 40 80 04 64 */ bge lbl_80084F84 +/* 80084B24 00081A64 48 00 00 14 */ b lbl_80084B38 +lbl_80084B28: +/* 80084B28 00081A68 2C 00 00 67 */ cmpwi r0, 0x67 +/* 80084B2C 00081A6C 41 82 00 0C */ beq lbl_80084B38 +/* 80084B30 00081A70 40 80 04 54 */ bge lbl_80084F84 +/* 80084B34 00081A74 48 00 02 2C */ b lbl_80084D60 +lbl_80084B38: +/* 80084B38 00081A78 88 01 00 20 */ lbz r0, 0x20(r1) +/* 80084B3C 00081A7C 80 9D 00 0C */ lwz r4, 0xc(r29) +/* 80084B40 00081A80 7C 00 20 00 */ cmpw r0, r4 +/* 80084B44 00081A84 40 81 00 0C */ ble lbl_80084B50 +/* 80084B48 00081A88 38 61 00 1C */ addi r3, r1, 0x1c +/* 80084B4C 00081A8C 48 00 04 61 */ bl round_decimal +lbl_80084B50: +/* 80084B50 00081A90 A8 81 00 1E */ lha r4, 0x1e(r1) +/* 80084B54 00081A94 2C 04 FF FC */ cmpwi r4, -4 +/* 80084B58 00081A98 41 80 00 10 */ blt lbl_80084B68 +/* 80084B5C 00081A9C 80 7D 00 0C */ lwz r3, 0xc(r29) +/* 80084B60 00081AA0 7C 04 18 00 */ cmpw r4, r3 +/* 80084B64 00081AA4 41 80 00 50 */ blt lbl_80084BB4 +lbl_80084B68: +/* 80084B68 00081AA8 88 1D 00 03 */ lbz r0, 3(r29) +/* 80084B6C 00081AAC 28 00 00 00 */ cmplwi r0, 0 +/* 80084B70 00081AB0 41 82 00 14 */ beq lbl_80084B84 +/* 80084B74 00081AB4 80 7D 00 0C */ lwz r3, 0xc(r29) +/* 80084B78 00081AB8 38 03 FF FF */ addi r0, r3, -1 +/* 80084B7C 00081ABC 90 1D 00 0C */ stw r0, 0xc(r29) +/* 80084B80 00081AC0 48 00 00 10 */ b lbl_80084B90 +lbl_80084B84: +/* 80084B84 00081AC4 88 61 00 20 */ lbz r3, 0x20(r1) +/* 80084B88 00081AC8 38 03 FF FF */ addi r0, r3, -1 +/* 80084B8C 00081ACC 90 1D 00 0C */ stw r0, 0xc(r29) +lbl_80084B90: +/* 80084B90 00081AD0 88 1D 00 05 */ lbz r0, 5(r29) +/* 80084B94 00081AD4 28 00 00 67 */ cmplwi r0, 0x67 +/* 80084B98 00081AD8 40 82 00 10 */ bne lbl_80084BA8 +/* 80084B9C 00081ADC 38 00 00 65 */ li r0, 0x65 +/* 80084BA0 00081AE0 98 1D 00 05 */ stb r0, 5(r29) +/* 80084BA4 00081AE4 48 00 00 4C */ b lbl_80084BF0 +lbl_80084BA8: +/* 80084BA8 00081AE8 38 00 00 45 */ li r0, 0x45 +/* 80084BAC 00081AEC 98 1D 00 05 */ stb r0, 5(r29) +/* 80084BB0 00081AF0 48 00 00 40 */ b lbl_80084BF0 +lbl_80084BB4: +/* 80084BB4 00081AF4 88 1D 00 03 */ lbz r0, 3(r29) +/* 80084BB8 00081AF8 28 00 00 00 */ cmplwi r0, 0 +/* 80084BBC 00081AFC 41 82 00 14 */ beq lbl_80084BD0 +/* 80084BC0 00081B00 38 04 00 01 */ addi r0, r4, 1 +/* 80084BC4 00081B04 7C 00 18 50 */ subf r0, r0, r3 +/* 80084BC8 00081B08 90 1D 00 0C */ stw r0, 0xc(r29) +/* 80084BCC 00081B0C 48 00 01 94 */ b lbl_80084D60 +lbl_80084BD0: +/* 80084BD0 00081B10 88 01 00 20 */ lbz r0, 0x20(r1) +/* 80084BD4 00081B14 38 64 00 01 */ addi r3, r4, 1 +/* 80084BD8 00081B18 7C 03 00 51 */ subf. r0, r3, r0 +/* 80084BDC 00081B1C 90 1D 00 0C */ stw r0, 0xc(r29) +/* 80084BE0 00081B20 40 80 01 80 */ bge lbl_80084D60 +/* 80084BE4 00081B24 38 00 00 00 */ li r0, 0 +/* 80084BE8 00081B28 90 1D 00 0C */ stw r0, 0xc(r29) +/* 80084BEC 00081B2C 48 00 01 74 */ b lbl_80084D60 +lbl_80084BF0: +/* 80084BF0 00081B30 80 7D 00 0C */ lwz r3, 0xc(r29) +/* 80084BF4 00081B34 88 01 00 20 */ lbz r0, 0x20(r1) +/* 80084BF8 00081B38 38 83 00 01 */ addi r4, r3, 1 +/* 80084BFC 00081B3C 7C 00 20 00 */ cmpw r0, r4 +/* 80084C00 00081B40 40 81 00 0C */ ble lbl_80084C0C +/* 80084C04 00081B44 38 61 00 1C */ addi r3, r1, 0x1c +/* 80084C08 00081B48 48 00 03 A5 */ bl round_decimal +lbl_80084C0C: +/* 80084C0C 00081B4C A8 01 00 1E */ lha r0, 0x1e(r1) +/* 80084C10 00081B50 39 00 00 2B */ li r8, 0x2b +/* 80084C14 00081B54 2C 00 00 00 */ cmpwi r0, 0 +/* 80084C18 00081B58 7C 04 03 78 */ mr r4, r0 +/* 80084C1C 00081B5C 40 80 00 0C */ bge lbl_80084C28 +/* 80084C20 00081B60 7C 84 00 D0 */ neg r4, r4 +/* 80084C24 00081B64 39 00 00 2D */ li r8, 0x2d +lbl_80084C28: +/* 80084C28 00081B68 3C 60 66 66 */ lis r3, 0x66666667@ha +/* 80084C2C 00081B6C 38 A3 66 67 */ addi r5, r3, 0x66666667@l +/* 80084C30 00081B70 38 E0 00 00 */ li r7, 0 +/* 80084C34 00081B74 48 00 00 38 */ b lbl_80084C6C +lbl_80084C38: +/* 80084C38 00081B78 7C C5 20 96 */ mulhw r6, r5, r4 +/* 80084C3C 00081B7C 7C C0 16 70 */ srawi r0, r6, 2 +/* 80084C40 00081B80 54 03 0F FE */ srwi r3, r0, 0x1f +/* 80084C44 00081B84 7C 00 1A 14 */ add r0, r0, r3 +/* 80084C48 00081B88 1C 00 00 0A */ mulli r0, r0, 0xa +/* 80084C4C 00081B8C 7C 80 20 50 */ subf r4, r0, r4 +/* 80084C50 00081B90 7C C0 16 70 */ srawi r0, r6, 2 +/* 80084C54 00081B94 38 84 00 30 */ addi r4, r4, 0x30 +/* 80084C58 00081B98 98 9E FF FF */ stb r4, -1(r30) +/* 80084C5C 00081B9C 54 03 0F FE */ srwi r3, r0, 0x1f +/* 80084C60 00081BA0 7C 80 1A 14 */ add r4, r0, r3 +/* 80084C64 00081BA4 38 E7 00 01 */ addi r7, r7, 1 +/* 80084C68 00081BA8 3B DE FF FF */ addi r30, r30, -1 +lbl_80084C6C: +/* 80084C6C 00081BAC 2C 04 00 00 */ cmpwi r4, 0 +/* 80084C70 00081BB0 40 82 FF C8 */ bne lbl_80084C38 +/* 80084C74 00081BB4 2C 07 00 02 */ cmpwi r7, 2 +/* 80084C78 00081BB8 41 80 FF C0 */ blt lbl_80084C38 +/* 80084C7C 00081BBC 7D 00 07 74 */ extsb r0, r8 +/* 80084C80 00081BC0 98 1E FF FF */ stb r0, -1(r30) +/* 80084C84 00081BC4 3B DE FF FE */ addi r30, r30, -2 +/* 80084C88 00081BC8 7C 1E E0 50 */ subf r0, r30, r28 +/* 80084C8C 00081BCC 88 7D 00 05 */ lbz r3, 5(r29) +/* 80084C90 00081BD0 98 7E 00 00 */ stb r3, 0(r30) +/* 80084C94 00081BD4 80 7D 00 0C */ lwz r3, 0xc(r29) +/* 80084C98 00081BD8 7C 03 02 14 */ add r0, r3, r0 +/* 80084C9C 00081BDC 2C 00 01 FD */ cmpwi r0, 0x1fd +/* 80084CA0 00081BE0 40 81 00 0C */ ble lbl_80084CAC +/* 80084CA4 00081BE4 38 60 00 00 */ li r3, 0 +/* 80084CA8 00081BE8 48 00 02 E0 */ b lbl_80084F88 +lbl_80084CAC: +/* 80084CAC 00081BEC 88 81 00 20 */ lbz r4, 0x20(r1) +/* 80084CB0 00081BF0 38 03 00 01 */ addi r0, r3, 1 +/* 80084CB4 00081BF4 7C 04 00 00 */ cmpw r4, r0 +/* 80084CB8 00081BF8 40 80 00 20 */ bge lbl_80084CD8 +/* 80084CBC 00081BFC 38 03 00 02 */ addi r0, r3, 2 +/* 80084CC0 00081C00 7C 64 00 50 */ subf r3, r4, r0 +/* 80084CC4 00081C04 38 00 00 30 */ li r0, 0x30 +/* 80084CC8 00081C08 48 00 00 08 */ b lbl_80084CD0 +lbl_80084CCC: +/* 80084CCC 00081C0C 9C 1E FF FF */ stbu r0, -1(r30) +lbl_80084CD0: +/* 80084CD0 00081C10 34 63 FF FF */ addic. r3, r3, -1 +/* 80084CD4 00081C14 40 82 FF F8 */ bne lbl_80084CCC +lbl_80084CD8: +/* 80084CD8 00081C18 88 61 00 20 */ lbz r3, 0x20(r1) +/* 80084CDC 00081C1C 7C 9F 1A 14 */ add r4, r31, r3 +/* 80084CE0 00081C20 48 00 00 0C */ b lbl_80084CEC +lbl_80084CE4: +/* 80084CE4 00081C24 8C 04 FF FF */ lbzu r0, -1(r4) +/* 80084CE8 00081C28 9C 1E FF FF */ stbu r0, -1(r30) +lbl_80084CEC: +/* 80084CEC 00081C2C 34 63 FF FF */ addic. r3, r3, -1 +/* 80084CF0 00081C30 40 82 FF F4 */ bne lbl_80084CE4 +/* 80084CF4 00081C34 80 1D 00 0C */ lwz r0, 0xc(r29) +/* 80084CF8 00081C38 2C 00 00 00 */ cmpwi r0, 0 +/* 80084CFC 00081C3C 40 82 00 10 */ bne lbl_80084D0C +/* 80084D00 00081C40 88 1D 00 03 */ lbz r0, 3(r29) +/* 80084D04 00081C44 28 00 00 00 */ cmplwi r0, 0 +/* 80084D08 00081C48 41 82 00 0C */ beq lbl_80084D14 +lbl_80084D0C: +/* 80084D0C 00081C4C 38 00 00 2E */ li r0, 0x2e +/* 80084D10 00081C50 9C 1E FF FF */ stbu r0, -1(r30) +lbl_80084D14: +/* 80084D14 00081C54 88 01 00 21 */ lbz r0, 0x21(r1) +/* 80084D18 00081C58 9C 1E FF FF */ stbu r0, -1(r30) +/* 80084D1C 00081C5C 88 01 00 1C */ lbz r0, 0x1c(r1) +/* 80084D20 00081C60 7C 00 07 75 */ extsb. r0, r0 +/* 80084D24 00081C64 41 82 00 10 */ beq lbl_80084D34 +/* 80084D28 00081C68 38 00 00 2D */ li r0, 0x2d +/* 80084D2C 00081C6C 9C 1E FF FF */ stbu r0, -1(r30) +/* 80084D30 00081C70 48 00 02 54 */ b lbl_80084F84 +lbl_80084D34: +/* 80084D34 00081C74 88 1D 00 01 */ lbz r0, 1(r29) +/* 80084D38 00081C78 28 00 00 01 */ cmplwi r0, 1 +/* 80084D3C 00081C7C 40 82 00 10 */ bne lbl_80084D4C +/* 80084D40 00081C80 38 00 00 2B */ li r0, 0x2b +/* 80084D44 00081C84 9C 1E FF FF */ stbu r0, -1(r30) +/* 80084D48 00081C88 48 00 02 3C */ b lbl_80084F84 +lbl_80084D4C: +/* 80084D4C 00081C8C 28 00 00 02 */ cmplwi r0, 2 +/* 80084D50 00081C90 40 82 02 34 */ bne lbl_80084F84 +/* 80084D54 00081C94 38 00 00 20 */ li r0, 0x20 +/* 80084D58 00081C98 9C 1E FF FF */ stbu r0, -1(r30) +/* 80084D5C 00081C9C 48 00 02 28 */ b lbl_80084F84 +lbl_80084D60: +/* 80084D60 00081CA0 A8 01 00 1E */ lha r0, 0x1e(r1) +/* 80084D64 00081CA4 88 81 00 20 */ lbz r4, 0x20(r1) +/* 80084D68 00081CA8 7C 00 20 50 */ subf r0, r0, r4 +/* 80084D6C 00081CAC 34 E0 FF FF */ addic. r7, r0, -1 +/* 80084D70 00081CB0 40 80 00 08 */ bge lbl_80084D78 +/* 80084D74 00081CB4 38 E0 00 00 */ li r7, 0 +lbl_80084D78: +/* 80084D78 00081CB8 80 1D 00 0C */ lwz r0, 0xc(r29) +/* 80084D7C 00081CBC 7C 07 00 00 */ cmpw r7, r0 +/* 80084D80 00081CC0 40 81 00 2C */ ble lbl_80084DAC +/* 80084D84 00081CC4 7C 00 38 50 */ subf r0, r0, r7 +/* 80084D88 00081CC8 38 61 00 1C */ addi r3, r1, 0x1c +/* 80084D8C 00081CCC 7C 80 20 50 */ subf r4, r0, r4 +/* 80084D90 00081CD0 48 00 02 1D */ bl round_decimal +/* 80084D94 00081CD4 A8 61 00 1E */ lha r3, 0x1e(r1) +/* 80084D98 00081CD8 88 01 00 20 */ lbz r0, 0x20(r1) +/* 80084D9C 00081CDC 7C 03 00 50 */ subf r0, r3, r0 +/* 80084DA0 00081CE0 34 E0 FF FF */ addic. r7, r0, -1 +/* 80084DA4 00081CE4 40 80 00 08 */ bge lbl_80084DAC +/* 80084DA8 00081CE8 38 E0 00 00 */ li r7, 0 +lbl_80084DAC: +/* 80084DAC 00081CEC A8 01 00 1E */ lha r0, 0x1e(r1) +/* 80084DB0 00081CF0 34 C0 00 01 */ addic. r6, r0, 1 +/* 80084DB4 00081CF4 40 80 00 08 */ bge lbl_80084DBC +/* 80084DB8 00081CF8 38 C0 00 00 */ li r6, 0 +lbl_80084DBC: +/* 80084DBC 00081CFC 7C 06 3A 14 */ add r0, r6, r7 +/* 80084DC0 00081D00 2C 00 01 FD */ cmpwi r0, 0x1fd +/* 80084DC4 00081D04 40 81 00 0C */ ble lbl_80084DD0 +/* 80084DC8 00081D08 38 60 00 00 */ li r3, 0 +/* 80084DCC 00081D0C 48 00 01 BC */ b lbl_80084F88 +lbl_80084DD0: +/* 80084DD0 00081D10 88 01 00 20 */ lbz r0, 0x20(r1) +/* 80084DD4 00081D14 38 80 00 00 */ li r4, 0 +/* 80084DD8 00081D18 38 60 00 30 */ li r3, 0x30 +/* 80084DDC 00081D1C 7C BF 02 14 */ add r5, r31, r0 +/* 80084DE0 00081D20 48 00 00 0C */ b lbl_80084DEC +lbl_80084DE4: +/* 80084DE4 00081D24 9C 7E FF FF */ stbu r3, -1(r30) +/* 80084DE8 00081D28 38 84 00 01 */ addi r4, r4, 1 +lbl_80084DEC: +/* 80084DEC 00081D2C 80 1D 00 0C */ lwz r0, 0xc(r29) +/* 80084DF0 00081D30 7C 07 00 50 */ subf r0, r7, r0 +/* 80084DF4 00081D34 7C 04 00 00 */ cmpw r4, r0 +/* 80084DF8 00081D38 41 80 FF EC */ blt lbl_80084DE4 +/* 80084DFC 00081D3C 38 60 00 00 */ li r3, 0 +/* 80084E00 00081D40 48 00 00 10 */ b lbl_80084E10 +lbl_80084E04: +/* 80084E04 00081D44 8C 05 FF FF */ lbzu r0, -1(r5) +/* 80084E08 00081D48 38 63 00 01 */ addi r3, r3, 1 +/* 80084E0C 00081D4C 9C 1E FF FF */ stbu r0, -1(r30) +lbl_80084E10: +/* 80084E10 00081D50 7C 03 38 00 */ cmpw r3, r7 +/* 80084E14 00081D54 40 80 00 10 */ bge lbl_80084E24 +/* 80084E18 00081D58 88 01 00 20 */ lbz r0, 0x20(r1) +/* 80084E1C 00081D5C 7C 03 00 00 */ cmpw r3, r0 +/* 80084E20 00081D60 41 80 FF E4 */ blt lbl_80084E04 +lbl_80084E24: +/* 80084E24 00081D64 7C 03 38 00 */ cmpw r3, r7 +/* 80084E28 00081D68 7C 63 38 50 */ subf r3, r3, r7 +/* 80084E2C 00081D6C 38 80 00 30 */ li r4, 0x30 +/* 80084E30 00081D70 40 80 00 48 */ bge lbl_80084E78 +/* 80084E34 00081D74 54 60 E8 FF */ rlwinm. r0, r3, 0x1d, 3, 0x1f +/* 80084E38 00081D78 7C 09 03 A6 */ mtctr r0 +/* 80084E3C 00081D7C 41 82 00 30 */ beq lbl_80084E6C +lbl_80084E40: +/* 80084E40 00081D80 98 9E FF FF */ stb r4, -1(r30) +/* 80084E44 00081D84 98 9E FF FE */ stb r4, -2(r30) +/* 80084E48 00081D88 98 9E FF FD */ stb r4, -3(r30) +/* 80084E4C 00081D8C 98 9E FF FC */ stb r4, -4(r30) +/* 80084E50 00081D90 98 9E FF FB */ stb r4, -5(r30) +/* 80084E54 00081D94 98 9E FF FA */ stb r4, -6(r30) +/* 80084E58 00081D98 98 9E FF F9 */ stb r4, -7(r30) +/* 80084E5C 00081D9C 9C 9E FF F8 */ stbu r4, -8(r30) +/* 80084E60 00081DA0 42 00 FF E0 */ bdnz lbl_80084E40 +/* 80084E64 00081DA4 70 63 00 07 */ andi. r3, r3, 7 +/* 80084E68 00081DA8 41 82 00 10 */ beq lbl_80084E78 +lbl_80084E6C: +/* 80084E6C 00081DAC 7C 69 03 A6 */ mtctr r3 +lbl_80084E70: +/* 80084E70 00081DB0 9C 9E FF FF */ stbu r4, -1(r30) +/* 80084E74 00081DB4 42 00 FF FC */ bdnz lbl_80084E70 +lbl_80084E78: +/* 80084E78 00081DB8 80 1D 00 0C */ lwz r0, 0xc(r29) +/* 80084E7C 00081DBC 2C 00 00 00 */ cmpwi r0, 0 +/* 80084E80 00081DC0 40 82 00 10 */ bne lbl_80084E90 +/* 80084E84 00081DC4 88 1D 00 03 */ lbz r0, 3(r29) +/* 80084E88 00081DC8 28 00 00 00 */ cmplwi r0, 0 +/* 80084E8C 00081DCC 41 82 00 0C */ beq lbl_80084E98 +lbl_80084E90: +/* 80084E90 00081DD0 38 00 00 2E */ li r0, 0x2e +/* 80084E94 00081DD4 9C 1E FF FF */ stbu r0, -1(r30) +lbl_80084E98: +/* 80084E98 00081DD8 2C 06 00 00 */ cmpwi r6, 0 +/* 80084E9C 00081DDC 41 82 00 A0 */ beq lbl_80084F3C +/* 80084EA0 00081DE0 38 80 00 00 */ li r4, 0 +/* 80084EA4 00081DE4 38 60 00 30 */ li r3, 0x30 +/* 80084EA8 00081DE8 48 00 00 0C */ b lbl_80084EB4 +lbl_80084EAC: +/* 80084EAC 00081DEC 9C 7E FF FF */ stbu r3, -1(r30) +/* 80084EB0 00081DF0 38 84 00 01 */ addi r4, r4, 1 +lbl_80084EB4: +/* 80084EB4 00081DF4 88 01 00 20 */ lbz r0, 0x20(r1) +/* 80084EB8 00081DF8 7C 00 30 50 */ subf r0, r0, r6 +/* 80084EBC 00081DFC 7C 04 00 00 */ cmpw r4, r0 +/* 80084EC0 00081E00 41 80 FF EC */ blt lbl_80084EAC +/* 80084EC4 00081E04 7C 04 30 00 */ cmpw r4, r6 +/* 80084EC8 00081E08 7C 64 30 50 */ subf r3, r4, r6 +/* 80084ECC 00081E0C 40 80 00 78 */ bge lbl_80084F44 +/* 80084ED0 00081E10 54 60 E8 FF */ rlwinm. r0, r3, 0x1d, 3, 0x1f +/* 80084ED4 00081E14 7C 09 03 A6 */ mtctr r0 +/* 80084ED8 00081E18 41 82 00 50 */ beq lbl_80084F28 +lbl_80084EDC: +/* 80084EDC 00081E1C 88 05 FF FF */ lbz r0, -1(r5) +/* 80084EE0 00081E20 98 1E FF FF */ stb r0, -1(r30) +/* 80084EE4 00081E24 88 05 FF FE */ lbz r0, -2(r5) +/* 80084EE8 00081E28 98 1E FF FE */ stb r0, -2(r30) +/* 80084EEC 00081E2C 88 05 FF FD */ lbz r0, -3(r5) +/* 80084EF0 00081E30 98 1E FF FD */ stb r0, -3(r30) +/* 80084EF4 00081E34 88 05 FF FC */ lbz r0, -4(r5) +/* 80084EF8 00081E38 98 1E FF FC */ stb r0, -4(r30) +/* 80084EFC 00081E3C 88 05 FF FB */ lbz r0, -5(r5) +/* 80084F00 00081E40 98 1E FF FB */ stb r0, -5(r30) +/* 80084F04 00081E44 88 05 FF FA */ lbz r0, -6(r5) +/* 80084F08 00081E48 98 1E FF FA */ stb r0, -6(r30) +/* 80084F0C 00081E4C 88 05 FF F9 */ lbz r0, -7(r5) +/* 80084F10 00081E50 98 1E FF F9 */ stb r0, -7(r30) +/* 80084F14 00081E54 8C 05 FF F8 */ lbzu r0, -8(r5) +/* 80084F18 00081E58 9C 1E FF F8 */ stbu r0, -8(r30) +/* 80084F1C 00081E5C 42 00 FF C0 */ bdnz lbl_80084EDC +/* 80084F20 00081E60 70 63 00 07 */ andi. r3, r3, 7 +/* 80084F24 00081E64 41 82 00 20 */ beq lbl_80084F44 +lbl_80084F28: +/* 80084F28 00081E68 7C 69 03 A6 */ mtctr r3 +lbl_80084F2C: +/* 80084F2C 00081E6C 8C 05 FF FF */ lbzu r0, -1(r5) +/* 80084F30 00081E70 9C 1E FF FF */ stbu r0, -1(r30) +/* 80084F34 00081E74 42 00 FF F8 */ bdnz lbl_80084F2C +/* 80084F38 00081E78 48 00 00 0C */ b lbl_80084F44 +lbl_80084F3C: +/* 80084F3C 00081E7C 38 00 00 30 */ li r0, 0x30 +/* 80084F40 00081E80 9C 1E FF FF */ stbu r0, -1(r30) +lbl_80084F44: +/* 80084F44 00081E84 88 01 00 1C */ lbz r0, 0x1c(r1) +/* 80084F48 00081E88 7C 00 07 75 */ extsb. r0, r0 +/* 80084F4C 00081E8C 41 82 00 10 */ beq lbl_80084F5C +/* 80084F50 00081E90 38 00 00 2D */ li r0, 0x2d +/* 80084F54 00081E94 9C 1E FF FF */ stbu r0, -1(r30) +/* 80084F58 00081E98 48 00 00 2C */ b lbl_80084F84 +lbl_80084F5C: +/* 80084F5C 00081E9C 88 1D 00 01 */ lbz r0, 1(r29) +/* 80084F60 00081EA0 28 00 00 01 */ cmplwi r0, 1 +/* 80084F64 00081EA4 40 82 00 10 */ bne lbl_80084F74 +/* 80084F68 00081EA8 38 00 00 2B */ li r0, 0x2b +/* 80084F6C 00081EAC 9C 1E FF FF */ stbu r0, -1(r30) +/* 80084F70 00081EB0 48 00 00 14 */ b lbl_80084F84 +lbl_80084F74: +/* 80084F74 00081EB4 28 00 00 02 */ cmplwi r0, 2 +/* 80084F78 00081EB8 40 82 00 0C */ bne lbl_80084F84 +/* 80084F7C 00081EBC 38 00 00 20 */ li r0, 0x20 +/* 80084F80 00081EC0 9C 1E FF FF */ stbu r0, -1(r30) +lbl_80084F84: +/* 80084F84 00081EC4 7F C3 F3 78 */ mr r3, r30 +lbl_80084F88: +/* 80084F88 00081EC8 80 01 00 64 */ lwz r0, 0x64(r1) +/* 80084F8C 00081ECC CB E1 00 58 */ lfd f31, 0x58(r1) +/* 80084F90 00081ED0 83 E1 00 54 */ lwz r31, 0x54(r1) +/* 80084F94 00081ED4 7C 08 03 A6 */ mtlr r0 +/* 80084F98 00081ED8 83 C1 00 50 */ lwz r30, 0x50(r1) +/* 80084F9C 00081EDC 83 A1 00 4C */ lwz r29, 0x4c(r1) +/* 80084FA0 00081EE0 83 81 00 48 */ lwz r28, 0x48(r1) +/* 80084FA4 00081EE4 38 21 00 60 */ addi r1, r1, 0x60 +/* 80084FA8 00081EE8 4E 80 00 20 */ blr + +.global round_decimal +round_decimal: +/* 80084FAC 00081EEC 2C 04 00 00 */ cmpwi r4, 0 +/* 80084FB0 00081EF0 40 80 00 24 */ bge lbl_80084FD4 +lbl_80084FB4: +/* 80084FB4 00081EF4 38 A0 00 00 */ li r5, 0 +/* 80084FB8 00081EF8 98 A3 00 00 */ stb r5, 0(r3) +/* 80084FBC 00081EFC 38 80 00 01 */ li r4, 1 +/* 80084FC0 00081F00 38 00 00 30 */ li r0, 0x30 +/* 80084FC4 00081F04 B0 A3 00 02 */ sth r5, 2(r3) +/* 80084FC8 00081F08 98 83 00 04 */ stb r4, 4(r3) +/* 80084FCC 00081F0C 98 03 00 05 */ stb r0, 5(r3) +/* 80084FD0 00081F10 4E 80 00 20 */ blr +lbl_80084FD4: +/* 80084FD4 00081F14 88 03 00 04 */ lbz r0, 4(r3) +/* 80084FD8 00081F18 7C 04 00 00 */ cmpw r4, r0 +/* 80084FDC 00081F1C 4C 80 00 20 */ bgelr +/* 80084FE0 00081F20 7C A3 22 14 */ add r5, r3, r4 +/* 80084FE4 00081F24 39 05 00 06 */ addi r8, r5, 6 +/* 80084FE8 00081F28 8C A8 FF FF */ lbzu r5, -1(r8) +/* 80084FEC 00081F2C 38 A5 FF D0 */ addi r5, r5, -48 +/* 80084FF0 00081F30 7C A6 07 74 */ extsb r6, r5 +/* 80084FF4 00081F34 2C 06 00 05 */ cmpwi r6, 5 +/* 80084FF8 00081F38 40 82 00 44 */ bne lbl_8008503C +/* 80084FFC 00081F3C 7C A3 02 14 */ add r5, r3, r0 +/* 80085000 00081F40 38 A5 00 05 */ addi r5, r5, 5 +lbl_80085004: +/* 80085004 00081F44 38 A5 FF FF */ addi r5, r5, -1 +/* 80085008 00081F48 7C 05 40 40 */ cmplw r5, r8 +/* 8008500C 00081F4C 40 81 00 10 */ ble lbl_8008501C +/* 80085010 00081F50 88 05 00 00 */ lbz r0, 0(r5) +/* 80085014 00081F54 2C 00 00 30 */ cmpwi r0, 0x30 +/* 80085018 00081F58 41 82 FF EC */ beq lbl_80085004 +lbl_8008501C: +/* 8008501C 00081F5C 7C 05 40 40 */ cmplw r5, r8 +/* 80085020 00081F60 40 82 00 10 */ bne lbl_80085030 +/* 80085024 00081F64 88 08 FF FF */ lbz r0, -1(r8) +/* 80085028 00081F68 54 00 07 FE */ clrlwi r0, r0, 0x1f +/* 8008502C 00081F6C 48 00 00 08 */ b lbl_80085034 +lbl_80085030: +/* 80085030 00081F70 38 00 00 01 */ li r0, 1 +lbl_80085034: +/* 80085034 00081F74 7C 05 03 78 */ mr r5, r0 +/* 80085038 00081F78 48 00 00 64 */ b lbl_8008509C +lbl_8008503C: +/* 8008503C 00081F7C 38 A0 00 05 */ li r5, 5 +/* 80085040 00081F80 7C C0 2A 38 */ eqv r0, r6, r5 +/* 80085044 00081F84 7C A6 28 10 */ subfc r5, r6, r5 +/* 80085048 00081F88 54 00 0F FE */ srwi r0, r0, 0x1f +/* 8008504C 00081F8C 7C A0 01 94 */ addze r5, r0 +/* 80085050 00081F90 54 A5 07 FE */ clrlwi r5, r5, 0x1f +/* 80085054 00081F94 48 00 00 48 */ b lbl_8008509C +lbl_80085058: +/* 80085058 00081F98 8C 08 FF FF */ lbzu r0, -1(r8) +/* 8008505C 00081F9C 7C E0 2A 14 */ add r7, r0, r5 +/* 80085060 00081FA0 38 E7 FF D0 */ addi r7, r7, -48 +/* 80085064 00081FA4 7C E5 07 74 */ extsb r5, r7 +/* 80085068 00081FA8 7C A0 32 38 */ eqv r0, r5, r6 +/* 8008506C 00081FAC 7C A5 30 10 */ subfc r5, r5, r6 +/* 80085070 00081FB0 54 00 0F FE */ srwi r0, r0, 0x1f +/* 80085074 00081FB4 7C A0 01 94 */ addze r5, r0 +/* 80085078 00081FB8 54 A5 07 FF */ clrlwi. r5, r5, 0x1f +/* 8008507C 00081FBC 40 82 00 0C */ bne lbl_80085088 +/* 80085080 00081FC0 7C E0 07 75 */ extsb. r0, r7 +/* 80085084 00081FC4 40 82 00 0C */ bne lbl_80085090 +lbl_80085088: +/* 80085088 00081FC8 38 84 FF FF */ addi r4, r4, -1 +/* 8008508C 00081FCC 48 00 00 14 */ b lbl_800850A0 +lbl_80085090: +/* 80085090 00081FD0 38 07 00 30 */ addi r0, r7, 0x30 +/* 80085094 00081FD4 98 08 00 00 */ stb r0, 0(r8) +/* 80085098 00081FD8 48 00 00 10 */ b lbl_800850A8 +lbl_8008509C: +/* 8008509C 00081FDC 38 C0 00 09 */ li r6, 9 +lbl_800850A0: +/* 800850A0 00081FE0 2C 04 00 00 */ cmpwi r4, 0 +/* 800850A4 00081FE4 40 82 FF B4 */ bne lbl_80085058 +lbl_800850A8: +/* 800850A8 00081FE8 2C 05 00 00 */ cmpwi r5, 0 +/* 800850AC 00081FEC 41 82 00 24 */ beq lbl_800850D0 +/* 800850B0 00081FF0 A8 A3 00 02 */ lha r5, 2(r3) +/* 800850B4 00081FF4 38 80 00 01 */ li r4, 1 +/* 800850B8 00081FF8 38 00 00 31 */ li r0, 0x31 +/* 800850BC 00081FFC 38 A5 00 01 */ addi r5, r5, 1 +/* 800850C0 00082000 B0 A3 00 02 */ sth r5, 2(r3) +/* 800850C4 00082004 98 83 00 04 */ stb r4, 4(r3) +/* 800850C8 00082008 98 03 00 05 */ stb r0, 5(r3) +/* 800850CC 0008200C 4E 80 00 20 */ blr +lbl_800850D0: +/* 800850D0 00082010 2C 04 00 00 */ cmpwi r4, 0 +/* 800850D4 00082014 41 82 FE E0 */ beq lbl_80084FB4 +/* 800850D8 00082018 98 83 00 04 */ stb r4, 4(r3) +/* 800850DC 0008201C 4E 80 00 20 */ blr + +.global longlong2str +longlong2str: +/* 800850E0 00082020 7C 08 02 A6 */ mflr r0 +/* 800850E4 00082024 90 01 00 04 */ stw r0, 4(r1) +/* 800850E8 00082028 38 00 00 00 */ li r0, 0 +/* 800850EC 0008202C 94 21 FF C0 */ stwu r1, -0x40(r1) +/* 800850F0 00082030 BE C1 00 18 */ stmw r22, 0x18(r1) +/* 800850F4 00082034 3A E5 00 00 */ addi r23, r5, 0 +/* 800850F8 00082038 7C 85 02 78 */ xor r5, r4, r0 +/* 800850FC 0008203C 3B 77 FF FF */ addi r27, r23, -1 +/* 80085100 00082040 3B 06 00 00 */ addi r24, r6, 0 +/* 80085104 00082044 3B C4 00 00 */ addi r30, r4, 0 +/* 80085108 00082048 3B E3 00 00 */ addi r31, r3, 0 +/* 8008510C 0008204C 3B 20 00 00 */ li r25, 0 +/* 80085110 00082050 3B 40 00 00 */ li r26, 0 +/* 80085114 00082054 98 17 FF FF */ stb r0, -1(r23) +/* 80085118 00082058 7C 60 02 78 */ xor r0, r3, r0 +/* 8008511C 0008205C 7C A0 03 79 */ or. r0, r5, r0 +/* 80085120 00082060 40 82 00 30 */ bne lbl_80085150 +/* 80085124 00082064 80 18 00 0C */ lwz r0, 0xc(r24) +/* 80085128 00082068 2C 00 00 00 */ cmpwi r0, 0 +/* 8008512C 0008206C 40 82 00 24 */ bne lbl_80085150 +/* 80085130 00082070 88 18 00 03 */ lbz r0, 3(r24) +/* 80085134 00082074 28 00 00 00 */ cmplwi r0, 0 +/* 80085138 00082078 41 82 00 10 */ beq lbl_80085148 +/* 8008513C 0008207C 88 18 00 05 */ lbz r0, 5(r24) +/* 80085140 00082080 28 00 00 6F */ cmplwi r0, 0x6f +/* 80085144 00082084 41 82 00 0C */ beq lbl_80085150 +lbl_80085148: +/* 80085148 00082088 7F 63 DB 78 */ mr r3, r27 +/* 8008514C 0008208C 48 00 02 60 */ b lbl_800853AC +lbl_80085150: +/* 80085150 00082090 88 B8 00 05 */ lbz r5, 5(r24) +/* 80085154 00082094 38 05 FF A8 */ addi r0, r5, -88 +/* 80085158 00082098 28 00 00 20 */ cmplwi r0, 0x20 +/* 8008515C 0008209C 41 81 00 8C */ bgt lbl_800851E8 +/* 80085160 000820A0 3C A0 80 3B */ lis r5, "@1009"@ha +/* 80085164 000820A4 38 A5 EC D8 */ addi r5, r5, "@1009"@l +/* 80085168 000820A8 54 00 10 3A */ slwi r0, r0, 2 +/* 8008516C 000820AC 7C 05 00 2E */ lwzx r0, r5, r0 +/* 80085170 000820B0 7C 09 03 A6 */ mtctr r0 +/* 80085174 000820B4 4E 80 04 20 */ bctr +lbl_80085178: +/* 80085178 000820B8 38 00 00 00 */ li r0, 0 +/* 8008517C 000820BC 6C 65 80 00 */ xoris r5, r3, 0x8000 +/* 80085180 000820C0 6C 03 80 00 */ xoris r3, r0, 0x8000 +/* 80085184 000820C4 7C 00 20 10 */ subfc r0, r0, r4 +/* 80085188 000820C8 7C 63 29 10 */ subfe r3, r3, r5 +/* 8008518C 000820CC 7C 65 29 10 */ subfe r3, r5, r5 +/* 80085190 000820D0 7C 63 00 D1 */ neg. r3, r3 +/* 80085194 000820D4 3B 80 00 0A */ li r28, 0xa +/* 80085198 000820D8 3B A0 00 00 */ li r29, 0 +/* 8008519C 000820DC 41 82 00 4C */ beq lbl_800851E8 +/* 800851A0 000820E0 23 DE 00 00 */ subfic r30, r30, 0 +/* 800851A4 000820E4 7F FF 01 90 */ subfze r31, r31 +/* 800851A8 000820E8 3B 20 00 01 */ li r25, 1 +/* 800851AC 000820EC 48 00 00 3C */ b lbl_800851E8 +lbl_800851B0: +/* 800851B0 000820F0 38 00 00 00 */ li r0, 0 +/* 800851B4 000820F4 98 18 00 01 */ stb r0, 1(r24) +/* 800851B8 000820F8 3B 80 00 08 */ li r28, 8 +/* 800851BC 000820FC 3B A0 00 00 */ li r29, 0 +/* 800851C0 00082100 48 00 00 28 */ b lbl_800851E8 +lbl_800851C4: +/* 800851C4 00082104 38 00 00 00 */ li r0, 0 +/* 800851C8 00082108 98 18 00 01 */ stb r0, 1(r24) +/* 800851CC 0008210C 3B 80 00 0A */ li r28, 0xa +/* 800851D0 00082110 3B A0 00 00 */ li r29, 0 +/* 800851D4 00082114 48 00 00 14 */ b lbl_800851E8 +lbl_800851D8: +/* 800851D8 00082118 38 00 00 00 */ li r0, 0 +/* 800851DC 0008211C 98 18 00 01 */ stb r0, 1(r24) +/* 800851E0 00082120 3B 80 00 10 */ li r28, 0x10 +/* 800851E4 00082124 3B A0 00 00 */ li r29, 0 +lbl_800851E8: +/* 800851E8 00082128 38 7F 00 00 */ addi r3, r31, 0 +/* 800851EC 0008212C 38 9E 00 00 */ addi r4, r30, 0 +/* 800851F0 00082130 38 BD 00 00 */ addi r5, r29, 0 +/* 800851F4 00082134 38 DC 00 00 */ addi r6, r28, 0 +/* 800851F8 00082138 4B FF DC 45 */ bl __mod2u +/* 800851FC 0008213C 3A C4 00 00 */ addi r22, r4, 0 +/* 80085200 00082140 38 7F 00 00 */ addi r3, r31, 0 +/* 80085204 00082144 38 9E 00 00 */ addi r4, r30, 0 +/* 80085208 00082148 38 BD 00 00 */ addi r5, r29, 0 +/* 8008520C 0008214C 38 DC 00 00 */ addi r6, r28, 0 +/* 80085210 00082150 4B FF DA 09 */ bl __div2u +/* 80085214 00082154 2C 16 00 0A */ cmpwi r22, 0xa +/* 80085218 00082158 3B C4 00 00 */ addi r30, r4, 0 +/* 8008521C 0008215C 3B E3 00 00 */ addi r31, r3, 0 +/* 80085220 00082160 40 80 00 0C */ bge lbl_8008522C +/* 80085224 00082164 38 B6 00 30 */ addi r5, r22, 0x30 +/* 80085228 00082168 48 00 00 1C */ b lbl_80085244 +lbl_8008522C: +/* 8008522C 0008216C 88 18 00 05 */ lbz r0, 5(r24) +/* 80085230 00082170 28 00 00 78 */ cmplwi r0, 0x78 +/* 80085234 00082174 40 82 00 0C */ bne lbl_80085240 +/* 80085238 00082178 38 B6 00 57 */ addi r5, r22, 0x57 +/* 8008523C 0008217C 48 00 00 08 */ b lbl_80085244 +lbl_80085240: +/* 80085240 00082180 38 B6 00 37 */ addi r5, r22, 0x37 +lbl_80085244: +/* 80085244 00082184 38 80 00 00 */ li r4, 0 +/* 80085248 00082188 7F C3 22 78 */ xor r3, r30, r4 +/* 8008524C 0008218C 7F E0 22 78 */ xor r0, r31, r4 +/* 80085250 00082190 7C 60 03 79 */ or. r0, r3, r0 +/* 80085254 00082194 7C A0 07 74 */ extsb r0, r5 +/* 80085258 00082198 3B 5A 00 01 */ addi r26, r26, 1 +/* 8008525C 0008219C 9C 1B FF FF */ stbu r0, -1(r27) +/* 80085260 000821A0 40 82 FF 88 */ bne lbl_800851E8 +/* 80085264 000821A4 38 00 00 08 */ li r0, 8 +/* 80085268 000821A8 7F 83 02 78 */ xor r3, r28, r0 +/* 8008526C 000821AC 7F A0 22 78 */ xor r0, r29, r4 +/* 80085270 000821B0 7C 60 03 79 */ or. r0, r3, r0 +/* 80085274 000821B4 40 82 00 28 */ bne lbl_8008529C +/* 80085278 000821B8 88 18 00 03 */ lbz r0, 3(r24) +/* 8008527C 000821BC 28 00 00 00 */ cmplwi r0, 0 +/* 80085280 000821C0 41 82 00 1C */ beq lbl_8008529C +/* 80085284 000821C4 88 1B 00 00 */ lbz r0, 0(r27) +/* 80085288 000821C8 2C 00 00 30 */ cmpwi r0, 0x30 +/* 8008528C 000821CC 41 82 00 10 */ beq lbl_8008529C +/* 80085290 000821D0 38 00 00 30 */ li r0, 0x30 +/* 80085294 000821D4 9C 1B FF FF */ stbu r0, -1(r27) +/* 80085298 000821D8 3B 5A 00 01 */ addi r26, r26, 1 +lbl_8008529C: +/* 8008529C 000821DC 88 18 00 00 */ lbz r0, 0(r24) +/* 800852A0 000821E0 28 00 00 02 */ cmplwi r0, 2 +/* 800852A4 000821E4 40 82 00 5C */ bne lbl_80085300 +/* 800852A8 000821E8 80 18 00 08 */ lwz r0, 8(r24) +/* 800852AC 000821EC 2C 19 00 00 */ cmpwi r25, 0 +/* 800852B0 000821F0 90 18 00 0C */ stw r0, 0xc(r24) +/* 800852B4 000821F4 40 82 00 10 */ bne lbl_800852C4 +/* 800852B8 000821F8 88 18 00 01 */ lbz r0, 1(r24) +/* 800852BC 000821FC 28 00 00 00 */ cmplwi r0, 0 +/* 800852C0 00082200 41 82 00 10 */ beq lbl_800852D0 +lbl_800852C4: +/* 800852C4 00082204 80 78 00 0C */ lwz r3, 0xc(r24) +/* 800852C8 00082208 38 03 FF FF */ addi r0, r3, -1 +/* 800852CC 0008220C 90 18 00 0C */ stw r0, 0xc(r24) +lbl_800852D0: +/* 800852D0 00082210 38 60 00 10 */ li r3, 0x10 +/* 800852D4 00082214 38 00 00 00 */ li r0, 0 +/* 800852D8 00082218 7F 83 1A 78 */ xor r3, r28, r3 +/* 800852DC 0008221C 7F A0 02 78 */ xor r0, r29, r0 +/* 800852E0 00082220 7C 60 03 79 */ or. r0, r3, r0 +/* 800852E4 00082224 40 82 00 1C */ bne lbl_80085300 +/* 800852E8 00082228 88 18 00 03 */ lbz r0, 3(r24) +/* 800852EC 0008222C 28 00 00 00 */ cmplwi r0, 0 +/* 800852F0 00082230 41 82 00 10 */ beq lbl_80085300 +/* 800852F4 00082234 80 78 00 0C */ lwz r3, 0xc(r24) +/* 800852F8 00082238 38 03 FF FE */ addi r0, r3, -2 +/* 800852FC 0008223C 90 18 00 0C */ stw r0, 0xc(r24) +lbl_80085300: +/* 80085300 00082240 80 78 00 0C */ lwz r3, 0xc(r24) +/* 80085304 00082244 7C 1B B8 50 */ subf r0, r27, r23 +/* 80085308 00082248 7C 03 02 14 */ add r0, r3, r0 +/* 8008530C 0008224C 2C 00 01 FD */ cmpwi r0, 0x1fd +/* 80085310 00082250 40 81 00 0C */ ble lbl_8008531C +/* 80085314 00082254 38 60 00 00 */ li r3, 0 +/* 80085318 00082258 48 00 00 94 */ b lbl_800853AC +lbl_8008531C: +/* 8008531C 0008225C 38 60 00 30 */ li r3, 0x30 +/* 80085320 00082260 48 00 00 0C */ b lbl_8008532C +lbl_80085324: +/* 80085324 00082264 9C 7B FF FF */ stbu r3, -1(r27) +/* 80085328 00082268 3B 5A 00 01 */ addi r26, r26, 1 +lbl_8008532C: +/* 8008532C 0008226C 80 18 00 0C */ lwz r0, 0xc(r24) +/* 80085330 00082270 7C 1A 00 00 */ cmpw r26, r0 +/* 80085334 00082274 41 80 FF F0 */ blt lbl_80085324 +/* 80085338 00082278 38 60 00 10 */ li r3, 0x10 +/* 8008533C 0008227C 38 00 00 00 */ li r0, 0 +/* 80085340 00082280 7F 83 1A 78 */ xor r3, r28, r3 +/* 80085344 00082284 7F A0 02 78 */ xor r0, r29, r0 +/* 80085348 00082288 7C 60 03 79 */ or. r0, r3, r0 +/* 8008534C 0008228C 40 82 00 20 */ bne lbl_8008536C +/* 80085350 00082290 88 18 00 03 */ lbz r0, 3(r24) +/* 80085354 00082294 28 00 00 00 */ cmplwi r0, 0 +/* 80085358 00082298 41 82 00 14 */ beq lbl_8008536C +/* 8008535C 0008229C 88 78 00 05 */ lbz r3, 5(r24) +/* 80085360 000822A0 38 00 00 30 */ li r0, 0x30 +/* 80085364 000822A4 98 7B FF FF */ stb r3, -1(r27) +/* 80085368 000822A8 9C 1B FF FE */ stbu r0, -2(r27) +lbl_8008536C: +/* 8008536C 000822AC 2C 19 00 00 */ cmpwi r25, 0 +/* 80085370 000822B0 41 82 00 10 */ beq lbl_80085380 +/* 80085374 000822B4 38 00 00 2D */ li r0, 0x2d +/* 80085378 000822B8 9C 1B FF FF */ stbu r0, -1(r27) +/* 8008537C 000822BC 48 00 00 2C */ b lbl_800853A8 +lbl_80085380: +/* 80085380 000822C0 88 18 00 01 */ lbz r0, 1(r24) +/* 80085384 000822C4 28 00 00 01 */ cmplwi r0, 1 +/* 80085388 000822C8 40 82 00 10 */ bne lbl_80085398 +/* 8008538C 000822CC 38 00 00 2B */ li r0, 0x2b +/* 80085390 000822D0 9C 1B FF FF */ stbu r0, -1(r27) +/* 80085394 000822D4 48 00 00 14 */ b lbl_800853A8 +lbl_80085398: +/* 80085398 000822D8 28 00 00 02 */ cmplwi r0, 2 +/* 8008539C 000822DC 40 82 00 0C */ bne lbl_800853A8 +/* 800853A0 000822E0 38 00 00 20 */ li r0, 0x20 +/* 800853A4 000822E4 9C 1B FF FF */ stbu r0, -1(r27) +lbl_800853A8: +/* 800853A8 000822E8 7F 63 DB 78 */ mr r3, r27 +lbl_800853AC: +/* 800853AC 000822EC BA C1 00 18 */ lmw r22, 0x18(r1) +/* 800853B0 000822F0 80 01 00 44 */ lwz r0, 0x44(r1) +/* 800853B4 000822F4 38 21 00 40 */ addi r1, r1, 0x40 +/* 800853B8 000822F8 7C 08 03 A6 */ mtlr r0 +/* 800853BC 000822FC 4E 80 00 20 */ blr + +.global long2str +long2str: +/* 800853C0 00082300 38 E0 00 00 */ li r7, 0 +/* 800853C4 00082304 98 E4 FF FF */ stb r7, -1(r4) +/* 800853C8 00082308 2C 03 00 00 */ cmpwi r3, 0 +/* 800853CC 0008230C 38 C4 FF FF */ addi r6, r4, -1 +/* 800853D0 00082310 39 00 00 00 */ li r8, 0 +/* 800853D4 00082314 38 E0 00 00 */ li r7, 0 +/* 800853D8 00082318 40 82 00 30 */ bne lbl_80085408 +/* 800853DC 0008231C 81 25 00 0C */ lwz r9, 0xc(r5) +/* 800853E0 00082320 2C 09 00 00 */ cmpwi r9, 0 +/* 800853E4 00082324 40 82 00 24 */ bne lbl_80085408 +/* 800853E8 00082328 89 25 00 03 */ lbz r9, 3(r5) +/* 800853EC 0008232C 28 09 00 00 */ cmplwi r9, 0 +/* 800853F0 00082330 41 82 00 10 */ beq lbl_80085400 +/* 800853F4 00082334 89 25 00 05 */ lbz r9, 5(r5) +/* 800853F8 00082338 28 09 00 6F */ cmplwi r9, 0x6f +/* 800853FC 0008233C 41 82 00 0C */ beq lbl_80085408 +lbl_80085400: +/* 80085400 00082340 7C C3 33 78 */ mr r3, r6 +/* 80085404 00082344 4E 80 00 20 */ blr +lbl_80085408: +/* 80085408 00082348 89 25 00 05 */ lbz r9, 5(r5) +/* 8008540C 0008234C 39 49 FF A8 */ addi r10, r9, -88 +/* 80085410 00082350 28 0A 00 20 */ cmplwi r10, 0x20 +/* 80085414 00082354 41 81 00 60 */ bgt lbl_80085474 +/* 80085418 00082358 3D 20 80 3B */ lis r9, "@1066"@ha +/* 8008541C 0008235C 39 29 ED 5C */ addi r9, r9, "@1066"@l +/* 80085420 00082360 55 4A 10 3A */ slwi r10, r10, 2 +/* 80085424 00082364 7D 29 50 2E */ lwzx r9, r9, r10 +/* 80085428 00082368 7D 29 03 A6 */ mtctr r9 +/* 8008542C 0008236C 4E 80 04 20 */ bctr +lbl_80085430: +/* 80085430 00082370 2C 03 00 00 */ cmpwi r3, 0 +/* 80085434 00082374 38 00 00 0A */ li r0, 0xa +/* 80085438 00082378 40 80 00 3C */ bge lbl_80085474 +/* 8008543C 0008237C 7C 63 00 D0 */ neg r3, r3 +/* 80085440 00082380 39 00 00 01 */ li r8, 1 +/* 80085444 00082384 48 00 00 30 */ b lbl_80085474 +lbl_80085448: +/* 80085448 00082388 38 00 00 00 */ li r0, 0 +/* 8008544C 0008238C 98 05 00 01 */ stb r0, 1(r5) +/* 80085450 00082390 38 00 00 08 */ li r0, 8 +/* 80085454 00082394 48 00 00 20 */ b lbl_80085474 +lbl_80085458: +/* 80085458 00082398 38 00 00 00 */ li r0, 0 +/* 8008545C 0008239C 98 05 00 01 */ stb r0, 1(r5) +/* 80085460 000823A0 38 00 00 0A */ li r0, 0xa +/* 80085464 000823A4 48 00 00 10 */ b lbl_80085474 +lbl_80085468: +/* 80085468 000823A8 38 00 00 00 */ li r0, 0 +/* 8008546C 000823AC 98 05 00 01 */ stb r0, 1(r5) +/* 80085470 000823B0 38 00 00 10 */ li r0, 0x10 +lbl_80085474: +/* 80085474 000823B4 7D 23 03 96 */ divwu r9, r3, r0 +/* 80085478 000823B8 7D 29 01 D6 */ mullw r9, r9, r0 +/* 8008547C 000823BC 7D 49 18 50 */ subf r10, r9, r3 +/* 80085480 000823C0 7C 63 03 96 */ divwu r3, r3, r0 +/* 80085484 000823C4 2C 0A 00 0A */ cmpwi r10, 0xa +/* 80085488 000823C8 40 80 00 0C */ bge lbl_80085494 +/* 8008548C 000823CC 39 4A 00 30 */ addi r10, r10, 0x30 +/* 80085490 000823D0 48 00 00 1C */ b lbl_800854AC +lbl_80085494: +/* 80085494 000823D4 89 25 00 05 */ lbz r9, 5(r5) +/* 80085498 000823D8 28 09 00 78 */ cmplwi r9, 0x78 +/* 8008549C 000823DC 40 82 00 0C */ bne lbl_800854A8 +/* 800854A0 000823E0 39 4A 00 57 */ addi r10, r10, 0x57 +/* 800854A4 000823E4 48 00 00 08 */ b lbl_800854AC +lbl_800854A8: +/* 800854A8 000823E8 39 4A 00 37 */ addi r10, r10, 0x37 +lbl_800854AC: +/* 800854AC 000823EC 7D 49 07 74 */ extsb r9, r10 +/* 800854B0 000823F0 99 26 FF FF */ stb r9, -1(r6) +/* 800854B4 000823F4 28 03 00 00 */ cmplwi r3, 0 +/* 800854B8 000823F8 38 C6 FF FF */ addi r6, r6, -1 +/* 800854BC 000823FC 38 E7 00 01 */ addi r7, r7, 1 +/* 800854C0 00082400 40 82 FF B4 */ bne lbl_80085474 +/* 800854C4 00082404 28 00 00 08 */ cmplwi r0, 8 +/* 800854C8 00082408 40 82 00 28 */ bne lbl_800854F0 +/* 800854CC 0008240C 88 65 00 03 */ lbz r3, 3(r5) +/* 800854D0 00082410 28 03 00 00 */ cmplwi r3, 0 +/* 800854D4 00082414 41 82 00 1C */ beq lbl_800854F0 +/* 800854D8 00082418 88 66 00 00 */ lbz r3, 0(r6) +/* 800854DC 0008241C 2C 03 00 30 */ cmpwi r3, 0x30 +/* 800854E0 00082420 41 82 00 10 */ beq lbl_800854F0 +/* 800854E4 00082424 38 60 00 30 */ li r3, 0x30 +/* 800854E8 00082428 9C 66 FF FF */ stbu r3, -1(r6) +/* 800854EC 0008242C 38 E7 00 01 */ addi r7, r7, 1 +lbl_800854F0: +/* 800854F0 00082430 88 65 00 00 */ lbz r3, 0(r5) +/* 800854F4 00082434 28 03 00 02 */ cmplwi r3, 2 +/* 800854F8 00082438 40 82 00 4C */ bne lbl_80085544 +/* 800854FC 0008243C 80 65 00 08 */ lwz r3, 8(r5) +/* 80085500 00082440 2C 08 00 00 */ cmpwi r8, 0 +/* 80085504 00082444 90 65 00 0C */ stw r3, 0xc(r5) +/* 80085508 00082448 40 82 00 10 */ bne lbl_80085518 +/* 8008550C 0008244C 88 65 00 01 */ lbz r3, 1(r5) +/* 80085510 00082450 28 03 00 00 */ cmplwi r3, 0 +/* 80085514 00082454 41 82 00 10 */ beq lbl_80085524 +lbl_80085518: +/* 80085518 00082458 80 65 00 0C */ lwz r3, 0xc(r5) +/* 8008551C 0008245C 38 63 FF FF */ addi r3, r3, -1 +/* 80085520 00082460 90 65 00 0C */ stw r3, 0xc(r5) +lbl_80085524: +/* 80085524 00082464 28 00 00 10 */ cmplwi r0, 0x10 +/* 80085528 00082468 40 82 00 1C */ bne lbl_80085544 +/* 8008552C 0008246C 88 65 00 03 */ lbz r3, 3(r5) +/* 80085530 00082470 28 03 00 00 */ cmplwi r3, 0 +/* 80085534 00082474 41 82 00 10 */ beq lbl_80085544 +/* 80085538 00082478 80 65 00 0C */ lwz r3, 0xc(r5) +/* 8008553C 0008247C 38 63 FF FE */ addi r3, r3, -2 +/* 80085540 00082480 90 65 00 0C */ stw r3, 0xc(r5) +lbl_80085544: +/* 80085544 00082484 81 25 00 0C */ lwz r9, 0xc(r5) +/* 80085548 00082488 7C 66 20 50 */ subf r3, r6, r4 +/* 8008554C 0008248C 7C 69 1A 14 */ add r3, r9, r3 +/* 80085550 00082490 2C 03 01 FD */ cmpwi r3, 0x1fd +/* 80085554 00082494 40 81 00 0C */ ble lbl_80085560 +/* 80085558 00082498 38 60 00 00 */ li r3, 0 +/* 8008555C 0008249C 4E 80 00 20 */ blr +lbl_80085560: +/* 80085560 000824A0 38 80 00 30 */ li r4, 0x30 +/* 80085564 000824A4 48 00 00 0C */ b lbl_80085570 +lbl_80085568: +/* 80085568 000824A8 9C 86 FF FF */ stbu r4, -1(r6) +/* 8008556C 000824AC 38 E7 00 01 */ addi r7, r7, 1 +lbl_80085570: +/* 80085570 000824B0 80 65 00 0C */ lwz r3, 0xc(r5) +/* 80085574 000824B4 7C 07 18 00 */ cmpw r7, r3 +/* 80085578 000824B8 41 80 FF F0 */ blt lbl_80085568 +/* 8008557C 000824BC 28 00 00 10 */ cmplwi r0, 0x10 +/* 80085580 000824C0 40 82 00 20 */ bne lbl_800855A0 +/* 80085584 000824C4 88 05 00 03 */ lbz r0, 3(r5) +/* 80085588 000824C8 28 00 00 00 */ cmplwi r0, 0 +/* 8008558C 000824CC 41 82 00 14 */ beq lbl_800855A0 +/* 80085590 000824D0 88 65 00 05 */ lbz r3, 5(r5) +/* 80085594 000824D4 38 00 00 30 */ li r0, 0x30 +/* 80085598 000824D8 98 66 FF FF */ stb r3, -1(r6) +/* 8008559C 000824DC 9C 06 FF FE */ stbu r0, -2(r6) +lbl_800855A0: +/* 800855A0 000824E0 2C 08 00 00 */ cmpwi r8, 0 +/* 800855A4 000824E4 41 82 00 10 */ beq lbl_800855B4 +/* 800855A8 000824E8 38 00 00 2D */ li r0, 0x2d +/* 800855AC 000824EC 9C 06 FF FF */ stbu r0, -1(r6) +/* 800855B0 000824F0 48 00 00 2C */ b lbl_800855DC +lbl_800855B4: +/* 800855B4 000824F4 88 05 00 01 */ lbz r0, 1(r5) +/* 800855B8 000824F8 28 00 00 01 */ cmplwi r0, 1 +/* 800855BC 000824FC 40 82 00 10 */ bne lbl_800855CC +/* 800855C0 00082500 38 00 00 2B */ li r0, 0x2b +/* 800855C4 00082504 9C 06 FF FF */ stbu r0, -1(r6) +/* 800855C8 00082508 48 00 00 14 */ b lbl_800855DC +lbl_800855CC: +/* 800855CC 0008250C 28 00 00 02 */ cmplwi r0, 2 +/* 800855D0 00082510 40 82 00 0C */ bne lbl_800855DC +/* 800855D4 00082514 38 00 00 20 */ li r0, 0x20 +/* 800855D8 00082518 9C 06 FF FF */ stbu r0, -1(r6) +lbl_800855DC: +/* 800855DC 0008251C 7C C3 33 78 */ mr r3, r6 +/* 800855E0 00082520 4E 80 00 20 */ blr + +.global parse_format +parse_format: +/* 800855E4 00082524 7C 08 02 A6 */ mflr r0 +/* 800855E8 00082528 90 01 00 04 */ stw r0, 4(r1) +/* 800855EC 0008252C 38 00 00 01 */ li r0, 1 +/* 800855F0 00082530 94 21 FF C8 */ stwu r1, -0x38(r1) +/* 800855F4 00082534 93 E1 00 34 */ stw r31, 0x34(r1) +/* 800855F8 00082538 3B E3 00 01 */ addi r31, r3, 1 +/* 800855FC 0008253C 93 C1 00 30 */ stw r30, 0x30(r1) +/* 80085600 00082540 3B C5 00 00 */ addi r30, r5, 0 +/* 80085604 00082544 93 A1 00 2C */ stw r29, 0x2c(r1) +/* 80085608 00082548 3B A4 00 00 */ addi r29, r4, 0 +/* 8008560C 0008254C 98 01 00 14 */ stb r0, 0x14(r1) +/* 80085610 00082550 38 00 00 00 */ li r0, 0 +/* 80085614 00082554 98 01 00 15 */ stb r0, 0x15(r1) +/* 80085618 00082558 98 01 00 16 */ stb r0, 0x16(r1) +/* 8008561C 0008255C 98 01 00 17 */ stb r0, 0x17(r1) +/* 80085620 00082560 98 01 00 18 */ stb r0, 0x18(r1) +/* 80085624 00082564 90 01 00 1C */ stw r0, 0x1c(r1) +/* 80085628 00082568 90 01 00 20 */ stw r0, 0x20(r1) +/* 8008562C 0008256C 88 63 00 01 */ lbz r3, 1(r3) +/* 80085630 00082570 7C 63 07 74 */ extsb r3, r3 +/* 80085634 00082574 2C 03 00 25 */ cmpwi r3, 0x25 +/* 80085638 00082578 40 82 00 30 */ bne lbl_80085668 +/* 8008563C 0008257C 98 61 00 19 */ stb r3, 0x19(r1) +/* 80085640 00082580 38 7F 00 01 */ addi r3, r31, 1 +/* 80085644 00082584 80 81 00 14 */ lwz r4, 0x14(r1) +/* 80085648 00082588 80 01 00 18 */ lwz r0, 0x18(r1) +/* 8008564C 0008258C 90 9E 00 00 */ stw r4, 0(r30) +/* 80085650 00082590 90 1E 00 04 */ stw r0, 4(r30) +/* 80085654 00082594 80 81 00 1C */ lwz r4, 0x1c(r1) +/* 80085658 00082598 80 01 00 20 */ lwz r0, 0x20(r1) +/* 8008565C 0008259C 90 9E 00 08 */ stw r4, 8(r30) +/* 80085660 000825A0 90 1E 00 0C */ stw r0, 0xc(r30) +/* 80085664 000825A4 48 00 04 3C */ b lbl_80085AA0 +lbl_80085668: +/* 80085668 000825A8 3C 80 80 3B */ lis r4, "@1185"@ha +/* 8008566C 000825AC 38 84 EE B0 */ addi r4, r4, "@1185"@l +lbl_80085670: +/* 80085670 000825B0 38 03 FF E0 */ addi r0, r3, -32 +/* 80085674 000825B4 28 00 00 10 */ cmplwi r0, 0x10 +/* 80085678 000825B8 38 A0 00 01 */ li r5, 1 +/* 8008567C 000825BC 41 81 00 68 */ bgt lbl_800856E4 +/* 80085680 000825C0 54 00 10 3A */ slwi r0, r0, 2 +/* 80085684 000825C4 7C 04 00 2E */ lwzx r0, r4, r0 +/* 80085688 000825C8 7C 09 03 A6 */ mtctr r0 +/* 8008568C 000825CC 4E 80 04 20 */ bctr +lbl_80085690: +/* 80085690 000825D0 38 00 00 00 */ li r0, 0 +/* 80085694 000825D4 98 01 00 14 */ stb r0, 0x14(r1) +/* 80085698 000825D8 48 00 00 50 */ b lbl_800856E8 +lbl_8008569C: +/* 8008569C 000825DC 38 00 00 01 */ li r0, 1 +/* 800856A0 000825E0 98 01 00 15 */ stb r0, 0x15(r1) +/* 800856A4 000825E4 48 00 00 44 */ b lbl_800856E8 +lbl_800856A8: +/* 800856A8 000825E8 88 01 00 15 */ lbz r0, 0x15(r1) +/* 800856AC 000825EC 28 00 00 01 */ cmplwi r0, 1 +/* 800856B0 000825F0 41 82 00 38 */ beq lbl_800856E8 +/* 800856B4 000825F4 38 00 00 02 */ li r0, 2 +/* 800856B8 000825F8 98 01 00 15 */ stb r0, 0x15(r1) +/* 800856BC 000825FC 48 00 00 2C */ b lbl_800856E8 +lbl_800856C0: +/* 800856C0 00082600 38 00 00 01 */ li r0, 1 +/* 800856C4 00082604 98 01 00 17 */ stb r0, 0x17(r1) +/* 800856C8 00082608 48 00 00 20 */ b lbl_800856E8 +lbl_800856CC: +/* 800856CC 0008260C 88 01 00 14 */ lbz r0, 0x14(r1) +/* 800856D0 00082610 28 00 00 00 */ cmplwi r0, 0 +/* 800856D4 00082614 41 82 00 14 */ beq lbl_800856E8 +/* 800856D8 00082618 38 00 00 02 */ li r0, 2 +/* 800856DC 0008261C 98 01 00 14 */ stb r0, 0x14(r1) +/* 800856E0 00082620 48 00 00 08 */ b lbl_800856E8 +lbl_800856E4: +/* 800856E4 00082624 38 A0 00 00 */ li r5, 0 +lbl_800856E8: +/* 800856E8 00082628 2C 05 00 00 */ cmpwi r5, 0 +/* 800856EC 0008262C 41 82 00 10 */ beq lbl_800856FC +/* 800856F0 00082630 8C 7F 00 01 */ lbzu r3, 1(r31) +/* 800856F4 00082634 7C 63 07 74 */ extsb r3, r3 +/* 800856F8 00082638 4B FF FF 78 */ b lbl_80085670 +lbl_800856FC: +/* 800856FC 0008263C 2C 03 00 2A */ cmpwi r3, 0x2a +/* 80085700 00082640 40 82 00 40 */ bne lbl_80085740 +/* 80085704 00082644 38 7D 00 00 */ addi r3, r29, 0 +/* 80085708 00082648 38 80 00 01 */ li r4, 1 +/* 8008570C 0008264C 4B FF CE E1 */ bl __va_arg +/* 80085710 00082650 80 03 00 00 */ lwz r0, 0(r3) +/* 80085714 00082654 2C 00 00 00 */ cmpwi r0, 0 +/* 80085718 00082658 90 01 00 1C */ stw r0, 0x1c(r1) +/* 8008571C 0008265C 40 80 00 18 */ bge lbl_80085734 +/* 80085720 00082660 38 00 00 00 */ li r0, 0 +/* 80085724 00082664 98 01 00 14 */ stb r0, 0x14(r1) +/* 80085728 00082668 80 01 00 1C */ lwz r0, 0x1c(r1) +/* 8008572C 0008266C 7C 00 00 D0 */ neg r0, r0 +/* 80085730 00082670 90 01 00 1C */ stw r0, 0x1c(r1) +lbl_80085734: +/* 80085734 00082674 8C 7F 00 01 */ lbzu r3, 1(r31) +/* 80085738 00082678 7C 63 07 74 */ extsb r3, r3 +/* 8008573C 0008267C 48 00 00 40 */ b lbl_8008577C +lbl_80085740: +/* 80085740 00082680 3C 80 80 37 */ lis r4, __ctype_map@ha +/* 80085744 00082684 38 A4 16 20 */ addi r5, r4, __ctype_map@l +/* 80085748 00082688 48 00 00 20 */ b lbl_80085768 +lbl_8008574C: +/* 8008574C 0008268C 80 01 00 1C */ lwz r0, 0x1c(r1) +/* 80085750 00082690 1C 00 00 0A */ mulli r0, r0, 0xa +/* 80085754 00082694 7C 63 02 14 */ add r3, r3, r0 +/* 80085758 00082698 38 03 FF D0 */ addi r0, r3, -48 +/* 8008575C 0008269C 90 01 00 1C */ stw r0, 0x1c(r1) +/* 80085760 000826A0 8C 7F 00 01 */ lbzu r3, 1(r31) +/* 80085764 000826A4 7C 63 07 74 */ extsb r3, r3 +lbl_80085768: +/* 80085768 000826A8 54 60 06 3E */ clrlwi r0, r3, 0x18 +/* 8008576C 000826AC 7C 85 02 14 */ add r4, r5, r0 +/* 80085770 000826B0 88 04 00 00 */ lbz r0, 0(r4) +/* 80085774 000826B4 54 00 06 F7 */ rlwinm. r0, r0, 0, 0x1b, 0x1b +/* 80085778 000826B8 40 82 FF D4 */ bne lbl_8008574C +lbl_8008577C: +/* 8008577C 000826BC 80 01 00 1C */ lwz r0, 0x1c(r1) +/* 80085780 000826C0 2C 00 01 FD */ cmpwi r0, 0x1fd +/* 80085784 000826C4 40 81 00 34 */ ble lbl_800857B8 +/* 80085788 000826C8 38 00 00 FF */ li r0, 0xff +/* 8008578C 000826CC 98 01 00 19 */ stb r0, 0x19(r1) +/* 80085790 000826D0 38 7F 00 01 */ addi r3, r31, 1 +/* 80085794 000826D4 80 81 00 14 */ lwz r4, 0x14(r1) +/* 80085798 000826D8 80 01 00 18 */ lwz r0, 0x18(r1) +/* 8008579C 000826DC 90 9E 00 00 */ stw r4, 0(r30) +/* 800857A0 000826E0 90 1E 00 04 */ stw r0, 4(r30) +/* 800857A4 000826E4 80 81 00 1C */ lwz r4, 0x1c(r1) +/* 800857A8 000826E8 80 01 00 20 */ lwz r0, 0x20(r1) +/* 800857AC 000826EC 90 9E 00 08 */ stw r4, 8(r30) +/* 800857B0 000826F0 90 1E 00 0C */ stw r0, 0xc(r30) +/* 800857B4 000826F4 48 00 02 EC */ b lbl_80085AA0 +lbl_800857B8: +/* 800857B8 000826F8 2C 03 00 2E */ cmpwi r3, 0x2e +/* 800857BC 000826FC 40 82 00 88 */ bne lbl_80085844 +/* 800857C0 00082700 38 00 00 01 */ li r0, 1 +/* 800857C4 00082704 98 01 00 16 */ stb r0, 0x16(r1) +/* 800857C8 00082708 8C 7F 00 01 */ lbzu r3, 1(r31) +/* 800857CC 0008270C 7C 63 07 74 */ extsb r3, r3 +/* 800857D0 00082710 2C 03 00 2A */ cmpwi r3, 0x2a +/* 800857D4 00082714 40 82 00 34 */ bne lbl_80085808 +/* 800857D8 00082718 38 7D 00 00 */ addi r3, r29, 0 +/* 800857DC 0008271C 38 80 00 01 */ li r4, 1 +/* 800857E0 00082720 4B FF CE 0D */ bl __va_arg +/* 800857E4 00082724 80 03 00 00 */ lwz r0, 0(r3) +/* 800857E8 00082728 2C 00 00 00 */ cmpwi r0, 0 +/* 800857EC 0008272C 90 01 00 20 */ stw r0, 0x20(r1) +/* 800857F0 00082730 40 80 00 0C */ bge lbl_800857FC +/* 800857F4 00082734 38 00 00 00 */ li r0, 0 +/* 800857F8 00082738 98 01 00 16 */ stb r0, 0x16(r1) +lbl_800857FC: +/* 800857FC 0008273C 8C 7F 00 01 */ lbzu r3, 1(r31) +/* 80085800 00082740 7C 63 07 74 */ extsb r3, r3 +/* 80085804 00082744 48 00 00 40 */ b lbl_80085844 +lbl_80085808: +/* 80085808 00082748 3C 80 80 37 */ lis r4, __ctype_map@ha +/* 8008580C 0008274C 38 A4 16 20 */ addi r5, r4, __ctype_map@l +/* 80085810 00082750 48 00 00 20 */ b lbl_80085830 +lbl_80085814: +/* 80085814 00082754 80 01 00 20 */ lwz r0, 0x20(r1) +/* 80085818 00082758 1C 00 00 0A */ mulli r0, r0, 0xa +/* 8008581C 0008275C 7C 63 02 14 */ add r3, r3, r0 +/* 80085820 00082760 38 03 FF D0 */ addi r0, r3, -48 +/* 80085824 00082764 90 01 00 20 */ stw r0, 0x20(r1) +/* 80085828 00082768 8C 7F 00 01 */ lbzu r3, 1(r31) +/* 8008582C 0008276C 7C 63 07 74 */ extsb r3, r3 +lbl_80085830: +/* 80085830 00082770 54 60 06 3E */ clrlwi r0, r3, 0x18 +/* 80085834 00082774 7C 85 02 14 */ add r4, r5, r0 +/* 80085838 00082778 88 04 00 00 */ lbz r0, 0(r4) +/* 8008583C 0008277C 54 00 06 F7 */ rlwinm. r0, r0, 0, 0x1b, 0x1b +/* 80085840 00082780 40 82 FF D4 */ bne lbl_80085814 +lbl_80085844: +/* 80085844 00082784 2C 03 00 68 */ cmpwi r3, 0x68 +/* 80085848 00082788 38 80 00 01 */ li r4, 1 +/* 8008584C 0008278C 41 82 00 20 */ beq lbl_8008586C +/* 80085850 00082790 40 80 00 10 */ bge lbl_80085860 +/* 80085854 00082794 2C 03 00 4C */ cmpwi r3, 0x4c +/* 80085858 00082798 41 82 00 60 */ beq lbl_800858B8 +/* 8008585C 0008279C 48 00 00 68 */ b lbl_800858C4 +lbl_80085860: +/* 80085860 000827A0 2C 03 00 6C */ cmpwi r3, 0x6c +/* 80085864 000827A4 41 82 00 2C */ beq lbl_80085890 +/* 80085868 000827A8 48 00 00 5C */ b lbl_800858C4 +lbl_8008586C: +/* 8008586C 000827AC 38 00 00 02 */ li r0, 2 +/* 80085870 000827B0 98 01 00 18 */ stb r0, 0x18(r1) +/* 80085874 000827B4 88 1F 00 01 */ lbz r0, 1(r31) +/* 80085878 000827B8 2C 00 00 68 */ cmpwi r0, 0x68 +/* 8008587C 000827BC 40 82 00 4C */ bne lbl_800858C8 +/* 80085880 000827C0 98 81 00 18 */ stb r4, 0x18(r1) +/* 80085884 000827C4 8C 7F 00 01 */ lbzu r3, 1(r31) +/* 80085888 000827C8 7C 63 07 74 */ extsb r3, r3 +/* 8008588C 000827CC 48 00 00 3C */ b lbl_800858C8 +lbl_80085890: +/* 80085890 000827D0 38 00 00 03 */ li r0, 3 +/* 80085894 000827D4 98 01 00 18 */ stb r0, 0x18(r1) +/* 80085898 000827D8 88 1F 00 01 */ lbz r0, 1(r31) +/* 8008589C 000827DC 2C 00 00 6C */ cmpwi r0, 0x6c +/* 800858A0 000827E0 40 82 00 28 */ bne lbl_800858C8 +/* 800858A4 000827E4 38 00 00 04 */ li r0, 4 +/* 800858A8 000827E8 98 01 00 18 */ stb r0, 0x18(r1) +/* 800858AC 000827EC 8C 7F 00 01 */ lbzu r3, 1(r31) +/* 800858B0 000827F0 7C 63 07 74 */ extsb r3, r3 +/* 800858B4 000827F4 48 00 00 14 */ b lbl_800858C8 +lbl_800858B8: +/* 800858B8 000827F8 38 00 00 05 */ li r0, 5 +/* 800858BC 000827FC 98 01 00 18 */ stb r0, 0x18(r1) +/* 800858C0 00082800 48 00 00 08 */ b lbl_800858C8 +lbl_800858C4: +/* 800858C4 00082804 38 80 00 00 */ li r4, 0 +lbl_800858C8: +/* 800858C8 00082808 2C 04 00 00 */ cmpwi r4, 0 +/* 800858CC 0008280C 41 82 00 0C */ beq lbl_800858D8 +/* 800858D0 00082810 8C 7F 00 01 */ lbzu r3, 1(r31) +/* 800858D4 00082814 7C 63 07 74 */ extsb r3, r3 +lbl_800858D8: +/* 800858D8 00082818 38 03 FF BB */ addi r0, r3, -69 +/* 800858DC 0008281C 98 61 00 19 */ stb r3, 0x19(r1) +/* 800858E0 00082820 28 00 00 33 */ cmplwi r0, 0x33 +/* 800858E4 00082824 41 81 01 90 */ bgt lbl_80085A74 +/* 800858E8 00082828 3C 60 80 3B */ lis r3, "@1186"@ha +/* 800858EC 0008282C 38 63 ED E0 */ addi r3, r3, "@1186"@l +/* 800858F0 00082830 54 00 10 3A */ slwi r0, r0, 2 +/* 800858F4 00082834 7C 03 00 2E */ lwzx r0, r3, r0 +/* 800858F8 00082838 7C 09 03 A6 */ mtctr r0 +/* 800858FC 0008283C 4E 80 04 20 */ bctr +lbl_80085900: +/* 80085900 00082840 88 01 00 18 */ lbz r0, 0x18(r1) +/* 80085904 00082844 28 00 00 05 */ cmplwi r0, 5 +/* 80085908 00082848 40 82 00 10 */ bne lbl_80085918 +/* 8008590C 0008284C 38 00 00 FF */ li r0, 0xff +/* 80085910 00082850 98 01 00 19 */ stb r0, 0x19(r1) +/* 80085914 00082854 48 00 01 68 */ b lbl_80085A7C +lbl_80085918: +/* 80085918 00082858 88 01 00 16 */ lbz r0, 0x16(r1) +/* 8008591C 0008285C 28 00 00 00 */ cmplwi r0, 0 +/* 80085920 00082860 40 82 00 10 */ bne lbl_80085930 +/* 80085924 00082864 38 00 00 01 */ li r0, 1 +/* 80085928 00082868 90 01 00 20 */ stw r0, 0x20(r1) +/* 8008592C 0008286C 48 00 01 50 */ b lbl_80085A7C +lbl_80085930: +/* 80085930 00082870 88 01 00 14 */ lbz r0, 0x14(r1) +/* 80085934 00082874 28 00 00 02 */ cmplwi r0, 2 +/* 80085938 00082878 40 82 01 44 */ bne lbl_80085A7C +/* 8008593C 0008287C 38 00 00 01 */ li r0, 1 +/* 80085940 00082880 98 01 00 14 */ stb r0, 0x14(r1) +/* 80085944 00082884 48 00 01 38 */ b lbl_80085A7C +lbl_80085948: +/* 80085948 00082888 88 01 00 18 */ lbz r0, 0x18(r1) +/* 8008594C 0008288C 28 00 00 02 */ cmplwi r0, 2 +/* 80085950 00082890 41 82 00 0C */ beq lbl_8008595C +/* 80085954 00082894 28 00 00 04 */ cmplwi r0, 4 +/* 80085958 00082898 40 82 00 10 */ bne lbl_80085968 +lbl_8008595C: +/* 8008595C 0008289C 38 00 00 FF */ li r0, 0xff +/* 80085960 000828A0 98 01 00 19 */ stb r0, 0x19(r1) +/* 80085964 000828A4 48 00 01 18 */ b lbl_80085A7C +lbl_80085968: +/* 80085968 000828A8 88 01 00 16 */ lbz r0, 0x16(r1) +/* 8008596C 000828AC 28 00 00 00 */ cmplwi r0, 0 +/* 80085970 000828B0 40 82 01 0C */ bne lbl_80085A7C +/* 80085974 000828B4 38 00 00 06 */ li r0, 6 +/* 80085978 000828B8 90 01 00 20 */ stw r0, 0x20(r1) +/* 8008597C 000828BC 48 00 01 00 */ b lbl_80085A7C +lbl_80085980: +/* 80085980 000828C0 80 01 00 20 */ lwz r0, 0x20(r1) +/* 80085984 000828C4 2C 00 00 00 */ cmpwi r0, 0 +/* 80085988 000828C8 40 82 00 0C */ bne lbl_80085994 +/* 8008598C 000828CC 38 00 00 01 */ li r0, 1 +/* 80085990 000828D0 90 01 00 20 */ stw r0, 0x20(r1) +lbl_80085994: +/* 80085994 000828D4 88 01 00 18 */ lbz r0, 0x18(r1) +/* 80085998 000828D8 28 00 00 02 */ cmplwi r0, 2 +/* 8008599C 000828DC 41 82 00 14 */ beq lbl_800859B0 +/* 800859A0 000828E0 28 00 00 04 */ cmplwi r0, 4 +/* 800859A4 000828E4 41 82 00 0C */ beq lbl_800859B0 +/* 800859A8 000828E8 28 00 00 01 */ cmplwi r0, 1 +/* 800859AC 000828EC 40 82 00 10 */ bne lbl_800859BC +lbl_800859B0: +/* 800859B0 000828F0 38 00 00 FF */ li r0, 0xff +/* 800859B4 000828F4 98 01 00 19 */ stb r0, 0x19(r1) +/* 800859B8 000828F8 48 00 00 C4 */ b lbl_80085A7C +lbl_800859BC: +/* 800859BC 000828FC 88 01 00 16 */ lbz r0, 0x16(r1) +/* 800859C0 00082900 28 00 00 00 */ cmplwi r0, 0 +/* 800859C4 00082904 40 82 00 B8 */ bne lbl_80085A7C +/* 800859C8 00082908 38 00 00 06 */ li r0, 6 +/* 800859CC 0008290C 90 01 00 20 */ stw r0, 0x20(r1) +/* 800859D0 00082910 48 00 00 AC */ b lbl_80085A7C +lbl_800859D4: +/* 800859D4 00082914 38 00 00 78 */ li r0, 0x78 +/* 800859D8 00082918 98 01 00 19 */ stb r0, 0x19(r1) +/* 800859DC 0008291C 38 00 00 01 */ li r0, 1 +/* 800859E0 00082920 38 60 00 03 */ li r3, 3 +/* 800859E4 00082924 98 01 00 17 */ stb r0, 0x17(r1) +/* 800859E8 00082928 38 00 00 08 */ li r0, 8 +/* 800859EC 0008292C 98 61 00 18 */ stb r3, 0x18(r1) +/* 800859F0 00082930 90 01 00 20 */ stw r0, 0x20(r1) +/* 800859F4 00082934 48 00 00 88 */ b lbl_80085A7C +lbl_800859F8: +/* 800859F8 00082938 88 61 00 18 */ lbz r3, 0x18(r1) +/* 800859FC 0008293C 28 03 00 03 */ cmplwi r3, 3 +/* 80085A00 00082940 40 82 00 10 */ bne lbl_80085A10 +/* 80085A04 00082944 38 00 00 06 */ li r0, 6 +/* 80085A08 00082948 98 01 00 18 */ stb r0, 0x18(r1) +/* 80085A0C 0008294C 48 00 00 70 */ b lbl_80085A7C +lbl_80085A10: +/* 80085A10 00082950 88 01 00 16 */ lbz r0, 0x16(r1) +/* 80085A14 00082954 28 00 00 00 */ cmplwi r0, 0 +/* 80085A18 00082958 40 82 00 0C */ bne lbl_80085A24 +/* 80085A1C 0008295C 28 03 00 00 */ cmplwi r3, 0 +/* 80085A20 00082960 41 82 00 5C */ beq lbl_80085A7C +lbl_80085A24: +/* 80085A24 00082964 38 00 00 FF */ li r0, 0xff +/* 80085A28 00082968 98 01 00 19 */ stb r0, 0x19(r1) +/* 80085A2C 0008296C 48 00 00 50 */ b lbl_80085A7C +lbl_80085A30: +/* 80085A30 00082970 88 01 00 18 */ lbz r0, 0x18(r1) +/* 80085A34 00082974 28 00 00 03 */ cmplwi r0, 3 +/* 80085A38 00082978 40 82 00 10 */ bne lbl_80085A48 +/* 80085A3C 0008297C 38 00 00 06 */ li r0, 6 +/* 80085A40 00082980 98 01 00 18 */ stb r0, 0x18(r1) +/* 80085A44 00082984 48 00 00 38 */ b lbl_80085A7C +lbl_80085A48: +/* 80085A48 00082988 28 00 00 00 */ cmplwi r0, 0 +/* 80085A4C 0008298C 41 82 00 30 */ beq lbl_80085A7C +/* 80085A50 00082990 38 00 00 FF */ li r0, 0xff +/* 80085A54 00082994 98 01 00 19 */ stb r0, 0x19(r1) +/* 80085A58 00082998 48 00 00 24 */ b lbl_80085A7C +lbl_80085A5C: +/* 80085A5C 0008299C 88 01 00 18 */ lbz r0, 0x18(r1) +/* 80085A60 000829A0 28 00 00 05 */ cmplwi r0, 5 +/* 80085A64 000829A4 40 82 00 18 */ bne lbl_80085A7C +/* 80085A68 000829A8 38 00 00 FF */ li r0, 0xff +/* 80085A6C 000829AC 98 01 00 19 */ stb r0, 0x19(r1) +/* 80085A70 000829B0 48 00 00 0C */ b lbl_80085A7C +lbl_80085A74: +/* 80085A74 000829B4 38 00 00 FF */ li r0, 0xff +/* 80085A78 000829B8 98 01 00 19 */ stb r0, 0x19(r1) +lbl_80085A7C: +/* 80085A7C 000829BC 80 81 00 14 */ lwz r4, 0x14(r1) +/* 80085A80 000829C0 38 7F 00 01 */ addi r3, r31, 1 +/* 80085A84 000829C4 80 01 00 18 */ lwz r0, 0x18(r1) +/* 80085A88 000829C8 90 9E 00 00 */ stw r4, 0(r30) +/* 80085A8C 000829CC 90 1E 00 04 */ stw r0, 4(r30) +/* 80085A90 000829D0 80 81 00 1C */ lwz r4, 0x1c(r1) +/* 80085A94 000829D4 80 01 00 20 */ lwz r0, 0x20(r1) +/* 80085A98 000829D8 90 9E 00 08 */ stw r4, 8(r30) +/* 80085A9C 000829DC 90 1E 00 0C */ stw r0, 0xc(r30) +lbl_80085AA0: +/* 80085AA0 000829E0 80 01 00 3C */ lwz r0, 0x3c(r1) +/* 80085AA4 000829E4 83 E1 00 34 */ lwz r31, 0x34(r1) +/* 80085AA8 000829E8 83 C1 00 30 */ lwz r30, 0x30(r1) +/* 80085AAC 000829EC 7C 08 03 A6 */ mtlr r0 +/* 80085AB0 000829F0 83 A1 00 2C */ lwz r29, 0x2c(r1) +/* 80085AB4 000829F4 38 21 00 38 */ addi r1, r1, 0x38 +/* 80085AB8 000829F8 4E 80 00 20 */ blr + +.section .rodata, "a" # 0x8036FFA0 - 0x803A8380 +.balign 8 +"@stringBase0": + .4byte 0x002D496E + .4byte 0x6600496E + .4byte 0x66004E61 + .4byte 0x4E000000 + +.section .data, "wa" # 0x803A8380 - 0x803E6000 +"@1009": + .4byte lbl_800851D8 + .4byte lbl_800851E8 + .4byte lbl_800851E8 + .4byte lbl_800851E8 + .4byte lbl_800851E8 + .4byte lbl_800851E8 + .4byte lbl_800851E8 + .4byte lbl_800851E8 + .4byte lbl_800851E8 + .4byte lbl_800851E8 + .4byte lbl_800851E8 + .4byte lbl_800851E8 + .4byte lbl_80085178 + .4byte lbl_800851E8 + .4byte lbl_800851E8 + .4byte lbl_800851E8 + .4byte lbl_800851E8 + .4byte lbl_80085178 + .4byte lbl_800851E8 + .4byte lbl_800851E8 + .4byte lbl_800851E8 + .4byte lbl_800851E8 + .4byte lbl_800851E8 + .4byte lbl_800851B0 + .4byte lbl_800851E8 + .4byte lbl_800851E8 + .4byte lbl_800851E8 + .4byte lbl_800851E8 + .4byte lbl_800851E8 + .4byte lbl_800851C4 + .4byte lbl_800851E8 + .4byte lbl_800851E8 + .4byte lbl_800851D8 +"@1066": + .4byte lbl_80085468 + .4byte lbl_80085474 + .4byte lbl_80085474 + .4byte lbl_80085474 + .4byte lbl_80085474 + .4byte lbl_80085474 + .4byte lbl_80085474 + .4byte lbl_80085474 + .4byte lbl_80085474 + .4byte lbl_80085474 + .4byte lbl_80085474 + .4byte lbl_80085474 + .4byte lbl_80085430 + .4byte lbl_80085474 + .4byte lbl_80085474 + .4byte lbl_80085474 + .4byte lbl_80085474 + .4byte lbl_80085430 + .4byte lbl_80085474 + .4byte lbl_80085474 + .4byte lbl_80085474 + .4byte lbl_80085474 + .4byte lbl_80085474 + .4byte lbl_80085448 + .4byte lbl_80085474 + .4byte lbl_80085474 + .4byte lbl_80085474 + .4byte lbl_80085474 + .4byte lbl_80085474 + .4byte lbl_80085458 + .4byte lbl_80085474 + .4byte lbl_80085474 + .4byte lbl_80085468 +"@1186": + .4byte lbl_80085994 + .4byte lbl_80085A74 + .4byte lbl_80085980 + .4byte lbl_80085A74 + .4byte lbl_80085A74 + .4byte lbl_80085A74 + .4byte lbl_80085A74 + .4byte lbl_80085A74 + .4byte lbl_80085A74 + .4byte lbl_80085A74 + .4byte lbl_80085A74 + .4byte lbl_80085A74 + .4byte lbl_80085A74 + .4byte lbl_80085A74 + .4byte lbl_80085A74 + .4byte lbl_80085A74 + .4byte lbl_80085A74 + .4byte lbl_80085A74 + .4byte lbl_80085A74 + .4byte lbl_80085900 + .4byte lbl_80085A74 + .4byte lbl_80085A74 + .4byte lbl_80085A74 + .4byte lbl_80085A74 + .4byte lbl_80085A74 + .4byte lbl_80085A74 + .4byte lbl_80085A74 + .4byte lbl_80085A74 + .4byte lbl_80085A74 + .4byte lbl_80085A74 + .4byte lbl_800859F8 + .4byte lbl_80085900 + .4byte lbl_80085994 + .4byte lbl_80085948 + .4byte lbl_80085980 + .4byte lbl_80085A74 + .4byte lbl_80085900 + .4byte lbl_80085A74 + .4byte lbl_80085A74 + .4byte lbl_80085A74 + .4byte lbl_80085A74 + .4byte lbl_80085A5C + .4byte lbl_80085900 + .4byte lbl_800859D4 + .4byte lbl_80085A74 + .4byte lbl_80085A74 + .4byte lbl_80085A30 + .4byte lbl_80085A74 + .4byte lbl_80085900 + .4byte lbl_80085A74 + .4byte lbl_80085A74 + .4byte lbl_80085900 +"@1185": + .4byte lbl_800856A8 + .4byte lbl_800856E4 + .4byte lbl_800856E4 + .4byte lbl_800856C0 + .4byte lbl_800856E4 + .4byte lbl_800856E4 + .4byte lbl_800856E4 + .4byte lbl_800856E4 + .4byte lbl_800856E4 + .4byte lbl_800856E4 + .4byte lbl_800856E4 + .4byte lbl_8008569C + .4byte lbl_800856E4 + .4byte lbl_80085690 + .4byte lbl_800856E4 + .4byte lbl_800856E4 + .4byte lbl_800856CC +.section .sdata, "wa" # 0x80408AC0 - 0x804097C0 +"@wstringBase0": + .4byte 0 + .4byte 0 + +.section .sdata2, "a" # 0x8040B460 - 0x80414020 +.balign 8 +"@919": + .4byte 0 + .4byte 0 diff --git a/asm/MSL_C.PPCEABI.bare.H/scanf.s b/asm/MSL_C.PPCEABI.bare.H/scanf.s new file mode 100644 index 0000000..8c028c9 --- /dev/null +++ b/asm/MSL_C.PPCEABI.bare.H/scanf.s @@ -0,0 +1,49 @@ +.include "macros.inc" + +.section .text, "ax" # 0x80005600 - 0x8036FBA0 +.global __StringRead +__StringRead: +/* 80085AE8 00082A28 2C 05 00 01 */ cmpwi r5, 1 +/* 80085AEC 00082A2C 41 82 00 50 */ beq lbl_80085B3C +/* 80085AF0 00082A30 40 80 00 10 */ bge lbl_80085B00 +/* 80085AF4 00082A34 2C 05 00 00 */ cmpwi r5, 0 +/* 80085AF8 00082A38 40 80 00 14 */ bge lbl_80085B0C +/* 80085AFC 00082A3C 48 00 00 74 */ b lbl_80085B70 +lbl_80085B00: +/* 80085B00 00082A40 2C 05 00 03 */ cmpwi r5, 3 +/* 80085B04 00082A44 40 80 00 6C */ bge lbl_80085B70 +/* 80085B08 00082A48 48 00 00 60 */ b lbl_80085B68 +lbl_80085B0C: +/* 80085B0C 00082A4C 80 83 00 00 */ lwz r4, 0(r3) +/* 80085B10 00082A50 88 A4 00 00 */ lbz r5, 0(r4) +/* 80085B14 00082A54 7C A0 07 75 */ extsb. r0, r5 +/* 80085B18 00082A58 40 82 00 14 */ bne lbl_80085B2C +/* 80085B1C 00082A5C 38 00 00 01 */ li r0, 1 +/* 80085B20 00082A60 90 03 00 04 */ stw r0, 4(r3) +/* 80085B24 00082A64 38 60 FF FF */ li r3, -1 +/* 80085B28 00082A68 4E 80 00 20 */ blr +lbl_80085B2C: +/* 80085B2C 00082A6C 38 04 00 01 */ addi r0, r4, 1 +/* 80085B30 00082A70 90 03 00 00 */ stw r0, 0(r3) +/* 80085B34 00082A74 7C A3 07 74 */ extsb r3, r5 +/* 80085B38 00082A78 4E 80 00 20 */ blr +lbl_80085B3C: +/* 80085B3C 00082A7C 80 03 00 04 */ lwz r0, 4(r3) +/* 80085B40 00082A80 2C 00 00 00 */ cmpwi r0, 0 +/* 80085B44 00082A84 40 82 00 14 */ bne lbl_80085B58 +/* 80085B48 00082A88 80 A3 00 00 */ lwz r5, 0(r3) +/* 80085B4C 00082A8C 38 05 FF FF */ addi r0, r5, -1 +/* 80085B50 00082A90 90 03 00 00 */ stw r0, 0(r3) +/* 80085B54 00082A94 48 00 00 0C */ b lbl_80085B60 +lbl_80085B58: +/* 80085B58 00082A98 38 00 00 00 */ li r0, 0 +/* 80085B5C 00082A9C 90 03 00 04 */ stw r0, 4(r3) +lbl_80085B60: +/* 80085B60 00082AA0 7C 83 23 78 */ mr r3, r4 +/* 80085B64 00082AA4 4E 80 00 20 */ blr +lbl_80085B68: +/* 80085B68 00082AA8 80 63 00 04 */ lwz r3, 4(r3) +/* 80085B6C 00082AAC 4E 80 00 20 */ blr +lbl_80085B70: +/* 80085B70 00082AB0 38 60 00 00 */ li r3, 0 +/* 80085B74 00082AB4 4E 80 00 20 */ blr diff --git a/asm/MSL_C.PPCEABI.bare.H/strtoul.s b/asm/MSL_C.PPCEABI.bare.H/strtoul.s new file mode 100644 index 0000000..ec66ea2 --- /dev/null +++ b/asm/MSL_C.PPCEABI.bare.H/strtoul.s @@ -0,0 +1,387 @@ +.include "macros.inc" + +.section .text, "ax" # 0x80005600 - 0x8036FBA0 +.global strtol +strtol: +/* 80085EC4 00082E04 7C 08 02 A6 */ mflr r0 +/* 80085EC8 00082E08 3C C0 80 00 */ lis r6, 0x7FFFFFFF@ha +/* 80085ECC 00082E0C 90 01 00 04 */ stw r0, 4(r1) +/* 80085ED0 00082E10 38 00 00 00 */ li r0, 0 +/* 80085ED4 00082E14 94 21 FF D0 */ stwu r1, -0x30(r1) +/* 80085ED8 00082E18 93 E1 00 2C */ stw r31, 0x2c(r1) +/* 80085EDC 00082E1C 3B E4 00 00 */ addi r31, r4, 0 +/* 80085EE0 00082E20 38 86 FF FF */ addi r4, r6, 0x7FFFFFFF@l +/* 80085EE4 00082E24 93 C1 00 28 */ stw r30, 0x28(r1) +/* 80085EE8 00082E28 7C 7E 1B 78 */ mr r30, r3 +/* 80085EEC 00082E2C 3C 60 80 08 */ lis r3, __StringRead@ha +/* 80085EF0 00082E30 93 C1 00 14 */ stw r30, 0x14(r1) +/* 80085EF4 00082E34 38 C1 00 14 */ addi r6, r1, 0x14 +/* 80085EF8 00082E38 38 E1 00 24 */ addi r7, r1, 0x24 +/* 80085EFC 00082E3C 90 01 00 18 */ stw r0, 0x18(r1) +/* 80085F00 00082E40 38 03 5A E8 */ addi r0, r3, __StringRead@l +/* 80085F04 00082E44 38 65 00 00 */ addi r3, r5, 0 +/* 80085F08 00082E48 7C 05 03 78 */ mr r5, r0 +/* 80085F0C 00082E4C 39 01 00 20 */ addi r8, r1, 0x20 +/* 80085F10 00082E50 39 21 00 1C */ addi r9, r1, 0x1c +/* 80085F14 00082E54 48 00 01 4D */ bl __strtoul +/* 80085F18 00082E58 28 1F 00 00 */ cmplwi r31, 0 +/* 80085F1C 00082E5C 41 82 00 10 */ beq lbl_80085F2C +/* 80085F20 00082E60 80 01 00 24 */ lwz r0, 0x24(r1) +/* 80085F24 00082E64 7C 1E 02 14 */ add r0, r30, r0 +/* 80085F28 00082E68 90 1F 00 00 */ stw r0, 0(r31) +lbl_80085F2C: +/* 80085F2C 00082E6C 80 01 00 1C */ lwz r0, 0x1c(r1) +/* 80085F30 00082E70 2C 00 00 00 */ cmpwi r0, 0 +/* 80085F34 00082E74 40 82 00 34 */ bne lbl_80085F68 +/* 80085F38 00082E78 80 A1 00 20 */ lwz r5, 0x20(r1) +/* 80085F3C 00082E7C 2C 05 00 00 */ cmpwi r5, 0 +/* 80085F40 00082E80 40 82 00 14 */ bne lbl_80085F54 +/* 80085F44 00082E84 3C 80 80 00 */ lis r4, 0x7FFFFFFF@ha +/* 80085F48 00082E88 38 04 FF FF */ addi r0, r4, 0x7FFFFFFF@l +/* 80085F4C 00082E8C 7C 03 00 40 */ cmplw r3, r0 +/* 80085F50 00082E90 41 81 00 18 */ bgt lbl_80085F68 +lbl_80085F54: +/* 80085F54 00082E94 2C 05 00 00 */ cmpwi r5, 0 +/* 80085F58 00082E98 41 82 00 38 */ beq lbl_80085F90 +/* 80085F5C 00082E9C 3C 00 80 00 */ lis r0, 0x8000 +/* 80085F60 00082EA0 7C 03 00 40 */ cmplw r3, r0 +/* 80085F64 00082EA4 40 81 00 2C */ ble lbl_80085F90 +lbl_80085F68: +/* 80085F68 00082EA8 80 01 00 20 */ lwz r0, 0x20(r1) +/* 80085F6C 00082EAC 2C 00 00 00 */ cmpwi r0, 0 +/* 80085F70 00082EB0 41 82 00 0C */ beq lbl_80085F7C +/* 80085F74 00082EB4 3C 60 80 00 */ lis r3, 0x8000 +/* 80085F78 00082EB8 48 00 00 0C */ b lbl_80085F84 +lbl_80085F7C: +/* 80085F7C 00082EBC 3C 60 80 00 */ lis r3, 0x7FFFFFFF@ha +/* 80085F80 00082EC0 38 63 FF FF */ addi r3, r3, 0x7FFFFFFF@l +lbl_80085F84: +/* 80085F84 00082EC4 38 00 00 22 */ li r0, 0x22 +/* 80085F88 00082EC8 90 0D 92 A8 */ stw r0, errno@sda21(r13) +/* 80085F8C 00082ECC 48 00 00 10 */ b lbl_80085F9C +lbl_80085F90: +/* 80085F90 00082ED0 2C 05 00 00 */ cmpwi r5, 0 +/* 80085F94 00082ED4 41 82 00 08 */ beq lbl_80085F9C +/* 80085F98 00082ED8 7C 63 00 D0 */ neg r3, r3 +lbl_80085F9C: +/* 80085F9C 00082EDC 80 01 00 34 */ lwz r0, 0x34(r1) +/* 80085FA0 00082EE0 83 E1 00 2C */ lwz r31, 0x2c(r1) +/* 80085FA4 00082EE4 83 C1 00 28 */ lwz r30, 0x28(r1) +/* 80085FA8 00082EE8 7C 08 03 A6 */ mtlr r0 +/* 80085FAC 00082EEC 38 21 00 30 */ addi r1, r1, 0x30 +/* 80085FB0 00082EF0 4E 80 00 20 */ blr + +.global strtoul +strtoul: +/* 80085FB4 00082EF4 7C 08 02 A6 */ mflr r0 +/* 80085FB8 00082EF8 3C C0 80 00 */ lis r6, 0x7FFFFFFF@ha +/* 80085FBC 00082EFC 90 01 00 04 */ stw r0, 4(r1) +/* 80085FC0 00082F00 38 00 00 00 */ li r0, 0 +/* 80085FC4 00082F04 94 21 FF D0 */ stwu r1, -0x30(r1) +/* 80085FC8 00082F08 93 E1 00 2C */ stw r31, 0x2c(r1) +/* 80085FCC 00082F0C 3B E4 00 00 */ addi r31, r4, 0 +/* 80085FD0 00082F10 38 86 FF FF */ addi r4, r6, 0x7FFFFFFF@l +/* 80085FD4 00082F14 93 C1 00 28 */ stw r30, 0x28(r1) +/* 80085FD8 00082F18 7C 7E 1B 78 */ mr r30, r3 +/* 80085FDC 00082F1C 3C 60 80 08 */ lis r3, __StringRead@ha +/* 80085FE0 00082F20 93 C1 00 14 */ stw r30, 0x14(r1) +/* 80085FE4 00082F24 38 C1 00 14 */ addi r6, r1, 0x14 +/* 80085FE8 00082F28 38 E1 00 24 */ addi r7, r1, 0x24 +/* 80085FEC 00082F2C 90 01 00 18 */ stw r0, 0x18(r1) +/* 80085FF0 00082F30 38 03 5A E8 */ addi r0, r3, __StringRead@l +/* 80085FF4 00082F34 38 65 00 00 */ addi r3, r5, 0 +/* 80085FF8 00082F38 7C 05 03 78 */ mr r5, r0 +/* 80085FFC 00082F3C 39 01 00 20 */ addi r8, r1, 0x20 +/* 80086000 00082F40 39 21 00 1C */ addi r9, r1, 0x1c +/* 80086004 00082F44 48 00 00 5D */ bl __strtoul +/* 80086008 00082F48 28 1F 00 00 */ cmplwi r31, 0 +/* 8008600C 00082F4C 41 82 00 10 */ beq lbl_8008601C +/* 80086010 00082F50 80 01 00 24 */ lwz r0, 0x24(r1) +/* 80086014 00082F54 7C 1E 02 14 */ add r0, r30, r0 +/* 80086018 00082F58 90 1F 00 00 */ stw r0, 0(r31) +lbl_8008601C: +/* 8008601C 00082F5C 80 01 00 1C */ lwz r0, 0x1c(r1) +/* 80086020 00082F60 2C 00 00 00 */ cmpwi r0, 0 +/* 80086024 00082F64 41 82 00 14 */ beq lbl_80086038 +/* 80086028 00082F68 38 00 00 22 */ li r0, 0x22 +/* 8008602C 00082F6C 90 0D 92 A8 */ stw r0, errno@sda21(r13) +/* 80086030 00082F70 38 60 FF FF */ li r3, -1 +/* 80086034 00082F74 48 00 00 14 */ b lbl_80086048 +lbl_80086038: +/* 80086038 00082F78 80 01 00 20 */ lwz r0, 0x20(r1) +/* 8008603C 00082F7C 2C 00 00 00 */ cmpwi r0, 0 +/* 80086040 00082F80 41 82 00 08 */ beq lbl_80086048 +/* 80086044 00082F84 7C 63 00 D0 */ neg r3, r3 +lbl_80086048: +/* 80086048 00082F88 80 01 00 34 */ lwz r0, 0x34(r1) +/* 8008604C 00082F8C 83 E1 00 2C */ lwz r31, 0x2c(r1) +/* 80086050 00082F90 83 C1 00 28 */ lwz r30, 0x28(r1) +/* 80086054 00082F94 7C 08 03 A6 */ mtlr r0 +/* 80086058 00082F98 38 21 00 30 */ addi r1, r1, 0x30 +/* 8008605C 00082F9C 4E 80 00 20 */ blr + +.global __strtoul +__strtoul: +/* 80086060 00082FA0 7C 08 02 A6 */ mflr r0 +/* 80086064 00082FA4 90 01 00 04 */ stw r0, 4(r1) +/* 80086068 00082FA8 38 00 00 00 */ li r0, 0 +/* 8008606C 00082FAC 94 21 FF A0 */ stwu r1, -0x60(r1) +/* 80086070 00082FB0 BE 41 00 28 */ stmw r18, 0x28(r1) +/* 80086074 00082FB4 7C 7C 1B 79 */ or. r28, r3, r3 +/* 80086078 00082FB8 3A E9 00 00 */ addi r23, r9, 0 +/* 8008607C 00082FBC 7D 15 43 78 */ mr r21, r8 +/* 80086080 00082FC0 3A C4 00 00 */ addi r22, r4, 0 +/* 80086084 00082FC4 3B A5 00 00 */ addi r29, r5, 0 +/* 80086088 00082FC8 3B C6 00 00 */ addi r30, r6, 0 +/* 8008608C 00082FCC 3A 67 00 00 */ addi r19, r7, 0 +/* 80086090 00082FD0 3B 00 00 01 */ li r24, 1 +/* 80086094 00082FD4 3B E0 00 00 */ li r31, 0 +/* 80086098 00082FD8 3B 60 00 00 */ li r27, 0 +/* 8008609C 00082FDC 3B 40 00 00 */ li r26, 0 +/* 800860A0 00082FE0 90 09 00 00 */ stw r0, 0(r9) +/* 800860A4 00082FE4 90 08 00 00 */ stw r0, 0(r8) +/* 800860A8 00082FE8 41 80 00 1C */ blt lbl_800860C4 +/* 800860AC 00082FEC 2C 1C 00 01 */ cmpwi r28, 1 +/* 800860B0 00082FF0 41 82 00 14 */ beq lbl_800860C4 +/* 800860B4 00082FF4 2C 1C 00 24 */ cmpwi r28, 0x24 +/* 800860B8 00082FF8 41 81 00 0C */ bgt lbl_800860C4 +/* 800860BC 00082FFC 2C 16 00 01 */ cmpwi r22, 1 +/* 800860C0 00083000 40 80 00 0C */ bge lbl_800860CC +lbl_800860C4: +/* 800860C4 00083004 3B 00 00 40 */ li r24, 0x40 +/* 800860C8 00083008 48 00 00 24 */ b lbl_800860EC +lbl_800860CC: +/* 800860CC 0008300C 39 9D 00 00 */ addi r12, r29, 0 +/* 800860D0 00083010 7D 88 03 A6 */ mtlr r12 +/* 800860D4 00083014 38 7E 00 00 */ addi r3, r30, 0 +/* 800860D8 00083018 3B E0 00 01 */ li r31, 1 +/* 800860DC 0008301C 38 80 00 00 */ li r4, 0 +/* 800860E0 00083020 38 A0 00 00 */ li r5, 0 +/* 800860E4 00083024 4E 80 00 21 */ blrl +/* 800860E8 00083028 7C 72 1B 78 */ mr r18, r3 +lbl_800860EC: +/* 800860EC 0008302C 2C 1C 00 00 */ cmpwi r28, 0 +/* 800860F0 00083030 41 82 00 0C */ beq lbl_800860FC +/* 800860F4 00083034 38 00 FF FF */ li r0, -1 +/* 800860F8 00083038 7F 40 E3 96 */ divwu r26, r0, r28 +lbl_800860FC: +/* 800860FC 0008303C 3C 60 80 37 */ lis r3, __ctype_map@ha +/* 80086100 00083040 3C 80 80 3B */ lis r4, "@410"@ha +/* 80086104 00083044 3B 23 16 20 */ addi r25, r3, __ctype_map@l +/* 80086108 00083048 3A 84 EE F8 */ addi r20, r4, "@410"@l +/* 8008610C 0008304C 48 00 02 38 */ b lbl_80086344 +lbl_80086110: +/* 80086110 00083050 28 18 00 10 */ cmplwi r24, 0x10 +/* 80086114 00083054 41 81 02 30 */ bgt lbl_80086344 +/* 80086118 00083058 57 00 10 3A */ slwi r0, r24, 2 +/* 8008611C 0008305C 7C 14 00 2E */ lwzx r0, r20, r0 +/* 80086120 00083060 7C 09 03 A6 */ mtctr r0 +/* 80086124 00083064 4E 80 04 20 */ bctr +lbl_80086128: +/* 80086128 00083068 56 40 06 3E */ clrlwi r0, r18, 0x18 +/* 8008612C 0008306C 7C 79 02 14 */ add r3, r25, r0 +/* 80086130 00083070 88 03 00 00 */ lbz r0, 0(r3) +/* 80086134 00083074 54 00 07 7D */ rlwinm. r0, r0, 0, 0x1d, 0x1e +/* 80086138 00083078 41 82 00 28 */ beq lbl_80086160 +/* 8008613C 0008307C 39 9D 00 00 */ addi r12, r29, 0 +/* 80086140 00083080 7D 88 03 A6 */ mtlr r12 +/* 80086144 00083084 38 7E 00 00 */ addi r3, r30, 0 +/* 80086148 00083088 38 80 00 00 */ li r4, 0 +/* 8008614C 0008308C 38 A0 00 00 */ li r5, 0 +/* 80086150 00083090 3B FF 00 01 */ addi r31, r31, 1 +/* 80086154 00083094 4E 80 00 21 */ blrl +/* 80086158 00083098 7C 72 1B 78 */ mr r18, r3 +/* 8008615C 0008309C 48 00 01 E8 */ b lbl_80086344 +lbl_80086160: +/* 80086160 000830A0 2C 12 00 2B */ cmpwi r18, 0x2b +/* 80086164 000830A4 40 82 00 28 */ bne lbl_8008618C +/* 80086168 000830A8 39 9D 00 00 */ addi r12, r29, 0 +/* 8008616C 000830AC 7D 88 03 A6 */ mtlr r12 +/* 80086170 000830B0 38 7E 00 00 */ addi r3, r30, 0 +/* 80086174 000830B4 38 80 00 00 */ li r4, 0 +/* 80086178 000830B8 38 A0 00 00 */ li r5, 0 +/* 8008617C 000830BC 3B FF 00 01 */ addi r31, r31, 1 +/* 80086180 000830C0 4E 80 00 21 */ blrl +/* 80086184 000830C4 7C 72 1B 78 */ mr r18, r3 +/* 80086188 000830C8 48 00 00 34 */ b lbl_800861BC +lbl_8008618C: +/* 8008618C 000830CC 2C 12 00 2D */ cmpwi r18, 0x2d +/* 80086190 000830D0 40 82 00 2C */ bne lbl_800861BC +/* 80086194 000830D4 39 9D 00 00 */ addi r12, r29, 0 +/* 80086198 000830D8 7D 88 03 A6 */ mtlr r12 +/* 8008619C 000830DC 38 7E 00 00 */ addi r3, r30, 0 +/* 800861A0 000830E0 38 80 00 00 */ li r4, 0 +/* 800861A4 000830E4 38 A0 00 00 */ li r5, 0 +/* 800861A8 000830E8 3B FF 00 01 */ addi r31, r31, 1 +/* 800861AC 000830EC 4E 80 00 21 */ blrl +/* 800861B0 000830F0 38 00 00 01 */ li r0, 1 +/* 800861B4 000830F4 90 15 00 00 */ stw r0, 0(r21) +/* 800861B8 000830F8 7C 72 1B 78 */ mr r18, r3 +lbl_800861BC: +/* 800861BC 000830FC 3B 00 00 02 */ li r24, 2 +/* 800861C0 00083100 48 00 01 84 */ b lbl_80086344 +lbl_800861C4: +/* 800861C4 00083104 2C 1C 00 00 */ cmpwi r28, 0 +/* 800861C8 00083108 41 82 00 0C */ beq lbl_800861D4 +/* 800861CC 0008310C 2C 1C 00 10 */ cmpwi r28, 0x10 +/* 800861D0 00083110 40 82 00 34 */ bne lbl_80086204 +lbl_800861D4: +/* 800861D4 00083114 2C 12 00 30 */ cmpwi r18, 0x30 +/* 800861D8 00083118 40 82 00 2C */ bne lbl_80086204 +/* 800861DC 0008311C 39 9D 00 00 */ addi r12, r29, 0 +/* 800861E0 00083120 7D 88 03 A6 */ mtlr r12 +/* 800861E4 00083124 38 7E 00 00 */ addi r3, r30, 0 +/* 800861E8 00083128 3B 00 00 04 */ li r24, 4 +/* 800861EC 0008312C 38 80 00 00 */ li r4, 0 +/* 800861F0 00083130 38 A0 00 00 */ li r5, 0 +/* 800861F4 00083134 3B FF 00 01 */ addi r31, r31, 1 +/* 800861F8 00083138 4E 80 00 21 */ blrl +/* 800861FC 0008313C 7C 72 1B 78 */ mr r18, r3 +/* 80086200 00083140 48 00 01 44 */ b lbl_80086344 +lbl_80086204: +/* 80086204 00083144 3B 00 00 08 */ li r24, 8 +/* 80086208 00083148 48 00 01 3C */ b lbl_80086344 +lbl_8008620C: +/* 8008620C 0008314C 2C 12 00 58 */ cmpwi r18, 0x58 +/* 80086210 00083150 41 82 00 0C */ beq lbl_8008621C +/* 80086214 00083154 2C 12 00 78 */ cmpwi r18, 0x78 +/* 80086218 00083158 40 82 00 30 */ bne lbl_80086248 +lbl_8008621C: +/* 8008621C 0008315C 39 9D 00 00 */ addi r12, r29, 0 +/* 80086220 00083160 7D 88 03 A6 */ mtlr r12 +/* 80086224 00083164 38 7E 00 00 */ addi r3, r30, 0 +/* 80086228 00083168 3B 80 00 10 */ li r28, 0x10 +/* 8008622C 0008316C 3B 00 00 08 */ li r24, 8 +/* 80086230 00083170 38 80 00 00 */ li r4, 0 +/* 80086234 00083174 38 A0 00 00 */ li r5, 0 +/* 80086238 00083178 3B FF 00 01 */ addi r31, r31, 1 +/* 8008623C 0008317C 4E 80 00 21 */ blrl +/* 80086240 00083180 7C 72 1B 78 */ mr r18, r3 +/* 80086244 00083184 48 00 01 00 */ b lbl_80086344 +lbl_80086248: +/* 80086248 00083188 2C 1C 00 00 */ cmpwi r28, 0 +/* 8008624C 0008318C 40 82 00 08 */ bne lbl_80086254 +/* 80086250 00083190 3B 80 00 08 */ li r28, 8 +lbl_80086254: +/* 80086254 00083194 3B 00 00 10 */ li r24, 0x10 +/* 80086258 00083198 48 00 00 EC */ b lbl_80086344 +lbl_8008625C: +/* 8008625C 0008319C 2C 1C 00 00 */ cmpwi r28, 0 +/* 80086260 000831A0 40 82 00 08 */ bne lbl_80086268 +/* 80086264 000831A4 3B 80 00 0A */ li r28, 0xa +lbl_80086268: +/* 80086268 000831A8 28 1A 00 00 */ cmplwi r26, 0 +/* 8008626C 000831AC 40 82 00 0C */ bne lbl_80086278 +/* 80086270 000831B0 38 00 FF FF */ li r0, -1 +/* 80086274 000831B4 7F 40 E3 96 */ divwu r26, r0, r28 +lbl_80086278: +/* 80086278 000831B8 56 40 06 3E */ clrlwi r0, r18, 0x18 +/* 8008627C 000831BC 7C 79 02 14 */ add r3, r25, r0 +/* 80086280 000831C0 88 63 00 00 */ lbz r3, 0(r3) +/* 80086284 000831C4 54 60 06 F7 */ rlwinm. r0, r3, 0, 0x1b, 0x1b +/* 80086288 000831C8 41 82 00 2C */ beq lbl_800862B4 +/* 8008628C 000831CC 3A 52 FF D0 */ addi r18, r18, -48 +/* 80086290 000831D0 7C 12 E0 00 */ cmpw r18, r28 +/* 80086294 000831D4 41 80 00 60 */ blt lbl_800862F4 +/* 80086298 000831D8 2C 18 00 10 */ cmpwi r24, 0x10 +/* 8008629C 000831DC 40 82 00 0C */ bne lbl_800862A8 +/* 800862A0 000831E0 3B 00 00 20 */ li r24, 0x20 +/* 800862A4 000831E4 48 00 00 08 */ b lbl_800862AC +lbl_800862A8: +/* 800862A8 000831E8 3B 00 00 40 */ li r24, 0x40 +lbl_800862AC: +/* 800862AC 000831EC 3A 52 00 30 */ addi r18, r18, 0x30 +/* 800862B0 000831F0 48 00 00 94 */ b lbl_80086344 +lbl_800862B4: +/* 800862B4 000831F4 54 60 06 33 */ rlwinm. r0, r3, 0, 0x18, 0x19 +/* 800862B8 000831F8 41 82 00 18 */ beq lbl_800862D0 +/* 800862BC 000831FC 7E 43 93 78 */ mr r3, r18 +/* 800862C0 00083200 4B FF D5 9D */ bl toupper +/* 800862C4 00083204 38 03 FF C9 */ addi r0, r3, -55 +/* 800862C8 00083208 7C 00 E0 00 */ cmpw r0, r28 +/* 800862CC 0008320C 41 80 00 1C */ blt lbl_800862E8 +lbl_800862D0: +/* 800862D0 00083210 2C 18 00 10 */ cmpwi r24, 0x10 +/* 800862D4 00083214 40 82 00 0C */ bne lbl_800862E0 +/* 800862D8 00083218 3B 00 00 20 */ li r24, 0x20 +/* 800862DC 0008321C 48 00 00 68 */ b lbl_80086344 +lbl_800862E0: +/* 800862E0 00083220 3B 00 00 40 */ li r24, 0x40 +/* 800862E4 00083224 48 00 00 60 */ b lbl_80086344 +lbl_800862E8: +/* 800862E8 00083228 7E 43 93 78 */ mr r3, r18 +/* 800862EC 0008322C 4B FF D5 71 */ bl toupper +/* 800862F0 00083230 3A 43 FF C9 */ addi r18, r3, -55 +lbl_800862F4: +/* 800862F4 00083234 7C 1B D0 40 */ cmplw r27, r26 +/* 800862F8 00083238 40 81 00 0C */ ble lbl_80086304 +/* 800862FC 0008323C 38 00 00 01 */ li r0, 1 +/* 80086300 00083240 90 17 00 00 */ stw r0, 0(r23) +lbl_80086304: +/* 80086304 00083244 7F 7B E1 D6 */ mullw r27, r27, r28 +/* 80086308 00083248 20 1B FF FF */ subfic r0, r27, -1 +/* 8008630C 0008324C 7C 12 00 40 */ cmplw r18, r0 +/* 80086310 00083250 40 81 00 0C */ ble lbl_8008631C +/* 80086314 00083254 38 00 00 01 */ li r0, 1 +/* 80086318 00083258 90 17 00 00 */ stw r0, 0(r23) +lbl_8008631C: +/* 8008631C 0008325C 39 9D 00 00 */ addi r12, r29, 0 +/* 80086320 00083260 7D 88 03 A6 */ mtlr r12 +/* 80086324 00083264 38 7E 00 00 */ addi r3, r30, 0 +/* 80086328 00083268 7F 7B 92 14 */ add r27, r27, r18 +/* 8008632C 0008326C 3B 00 00 10 */ li r24, 0x10 +/* 80086330 00083270 38 80 00 00 */ li r4, 0 +/* 80086334 00083274 38 A0 00 00 */ li r5, 0 +/* 80086338 00083278 3B FF 00 01 */ addi r31, r31, 1 +/* 8008633C 0008327C 4E 80 00 21 */ blrl +/* 80086340 00083280 7C 72 1B 78 */ mr r18, r3 +lbl_80086344: +/* 80086344 00083284 7C 1F B0 00 */ cmpw r31, r22 +/* 80086348 00083288 41 81 00 14 */ bgt lbl_8008635C +/* 8008634C 0008328C 2C 12 FF FF */ cmpwi r18, -1 +/* 80086350 00083290 41 82 00 0C */ beq lbl_8008635C +/* 80086354 00083294 57 00 06 75 */ rlwinm. r0, r24, 0, 0x19, 0x1a +/* 80086358 00083298 41 82 FD B8 */ beq lbl_80086110 +lbl_8008635C: +/* 8008635C 0008329C 73 00 00 34 */ andi. r0, r24, 0x34 +/* 80086360 000832A0 40 82 00 10 */ bne lbl_80086370 +/* 80086364 000832A4 3B 60 00 00 */ li r27, 0 +/* 80086368 000832A8 3B E0 00 00 */ li r31, 0 +/* 8008636C 000832AC 48 00 00 08 */ b lbl_80086374 +lbl_80086370: +/* 80086370 000832B0 3B FF FF FF */ addi r31, r31, -1 +lbl_80086374: +/* 80086374 000832B4 7F AC EB 78 */ mr r12, r29 +/* 80086378 000832B8 93 F3 00 00 */ stw r31, 0(r19) +/* 8008637C 000832BC 7D 88 03 A6 */ mtlr r12 +/* 80086380 000832C0 38 7E 00 00 */ addi r3, r30, 0 +/* 80086384 000832C4 38 92 00 00 */ addi r4, r18, 0 +/* 80086388 000832C8 38 A0 00 01 */ li r5, 1 +/* 8008638C 000832CC 4E 80 00 21 */ blrl +/* 80086390 000832D0 7F 63 DB 78 */ mr r3, r27 +/* 80086394 000832D4 BA 41 00 28 */ lmw r18, 0x28(r1) +/* 80086398 000832D8 80 01 00 64 */ lwz r0, 0x64(r1) +/* 8008639C 000832DC 38 21 00 60 */ addi r1, r1, 0x60 +/* 800863A0 000832E0 7C 08 03 A6 */ mtlr r0 +/* 800863A4 000832E4 4E 80 00 20 */ blr + +.section .data, "wa" # 0x803A8380 - 0x803E6000 + .balign 8 +"@410": + .4byte lbl_80086344 + .4byte lbl_80086128 + .4byte lbl_800861C4 + .4byte lbl_80086344 + .4byte lbl_8008620C + .4byte lbl_80086344 + .4byte lbl_80086344 + .4byte lbl_80086344 + .4byte lbl_8008625C + .4byte lbl_80086344 + .4byte lbl_80086344 + .4byte lbl_80086344 + .4byte lbl_80086344 + .4byte lbl_80086344 + .4byte lbl_80086344 + .4byte lbl_80086344 + .4byte lbl_8008625C diff --git a/asm/MSL_C.PPCEABI.bare.H/trigf.s b/asm/MSL_C.PPCEABI.bare.H/trigf.s new file mode 100644 index 0000000..5168e4b --- /dev/null +++ b/asm/MSL_C.PPCEABI.bare.H/trigf.s @@ -0,0 +1,314 @@ +.include "macros.inc" + +.section .text, "ax" # 0x80005600 - 0x8036FBA0 + +.global cos__Ff +cos__Ff: +/* 80086F30 00083E70 7C 08 02 A6 */ mflr r0 +/* 80086F34 00083E74 90 01 00 04 */ stw r0, 4(r1) +/* 80086F38 00083E78 94 21 FF F8 */ stwu r1, -8(r1) +/* 80086F3C 00083E7C 48 00 00 35 */ bl cosf +/* 80086F40 00083E80 80 01 00 0C */ lwz r0, 0xc(r1) +/* 80086F44 00083E84 38 21 00 08 */ addi r1, r1, 8 +/* 80086F48 00083E88 7C 08 03 A6 */ mtlr r0 +/* 80086F4C 00083E8C 4E 80 00 20 */ blr + +.global sin__Ff +sin__Ff: +/* 80086F50 00083E90 7C 08 02 A6 */ mflr r0 +/* 80086F54 00083E94 90 01 00 04 */ stw r0, 4(r1) +/* 80086F58 00083E98 94 21 FF F8 */ stwu r1, -8(r1) +/* 80086F5C 00083E9C 48 00 01 A9 */ bl sinf +/* 80086F60 00083EA0 80 01 00 0C */ lwz r0, 0xc(r1) +/* 80086F64 00083EA4 38 21 00 08 */ addi r1, r1, 8 +/* 80086F68 00083EA8 7C 08 03 A6 */ mtlr r0 +/* 80086F6C 00083EAC 4E 80 00 20 */ blr + +.global tanf +tanf: +/* 80086EEC 00083E2C 7C 08 02 A6 */ mflr r0 +/* 80086EF0 00083E30 90 01 00 04 */ stw r0, 4(r1) +/* 80086EF4 00083E34 94 21 FF E0 */ stwu r1, -0x20(r1) +/* 80086EF8 00083E38 DB E1 00 18 */ stfd f31, 0x18(r1) +/* 80086EFC 00083E3C DB C1 00 10 */ stfd f30, 0x10(r1) +/* 80086F00 00083E40 FF C0 08 90 */ fmr f30, f1 +/* 80086F04 00083E44 48 00 00 2D */ bl cos__Ff +/* 80086F08 00083E48 FF E0 08 90 */ fmr f31, f1 +/* 80086F0C 00083E4C FC 20 F0 90 */ fmr f1, f30 +/* 80086F10 00083E50 48 00 00 41 */ bl sin__Ff +/* 80086F14 00083E54 EC 21 F8 24 */ fdivs f1, f1, f31 +/* 80086F18 00083E58 80 01 00 24 */ lwz r0, 0x24(r1) +/* 80086F1C 00083E5C CB E1 00 18 */ lfd f31, 0x18(r1) +/* 80086F20 00083E60 CB C1 00 10 */ lfd f30, 0x10(r1) +/* 80086F24 00083E64 7C 08 03 A6 */ mtlr r0 +/* 80086F28 00083E68 38 21 00 20 */ addi r1, r1, 0x20 +/* 80086F2C 00083E6C 4E 80 00 20 */ blr + +.global sinf +sinf: +/* 80087104 00084044 7C 08 02 A6 */ mflr r0 +/* 80087108 00084048 3C 60 80 3B */ lis r3, __four_over_pi_m1@ha +/* 8008710C 0008404C 90 01 00 04 */ stw r0, 4(r1) +/* 80087110 00084050 38 63 EF 48 */ addi r3, r3, __four_over_pi_m1@l +/* 80087114 00084054 94 21 FF D8 */ stwu r1, -0x28(r1) +/* 80087118 00084058 DB E1 00 20 */ stfd f31, 0x20(r1) +/* 8008711C 0008405C 93 E1 00 1C */ stw r31, 0x1c(r1) +/* 80087120 00084060 D0 21 00 08 */ stfs f1, 8(r1) +/* 80087124 00084064 C0 02 8A 30 */ lfs f0, "@106"@sda21(r2) +/* 80087128 00084068 80 01 00 08 */ lwz r0, 8(r1) +/* 8008712C 0008406C C0 C1 00 08 */ lfs f6, 8(r1) +/* 80087130 00084070 54 00 00 01 */ rlwinm. r0, r0, 0, 0, 0 +/* 80087134 00084074 EC 20 01 B2 */ fmuls f1, f0, f6 +/* 80087138 00084078 41 82 00 1C */ beq lbl_80087154 +/* 8008713C 0008407C C0 02 8A 34 */ lfs f0, "@107"@sda21(r2) +/* 80087140 00084080 EC 01 00 28 */ fsubs f0, f1, f0 +/* 80087144 00084084 FC 00 00 1E */ fctiwz f0, f0 +/* 80087148 00084088 D8 01 00 10 */ stfd f0, 0x10(r1) +/* 8008714C 0008408C 80 81 00 14 */ lwz r4, 0x14(r1) +/* 80087150 00084090 48 00 00 18 */ b lbl_80087168 +lbl_80087154: +/* 80087154 00084094 C0 02 8A 34 */ lfs f0, "@107"@sda21(r2) +/* 80087158 00084098 EC 00 08 2A */ fadds f0, f0, f1 +/* 8008715C 0008409C FC 00 00 1E */ fctiwz f0, f0 +/* 80087160 000840A0 D8 01 00 10 */ stfd f0, 0x10(r1) +/* 80087164 000840A4 80 81 00 14 */ lwz r4, 0x14(r1) +lbl_80087168: +/* 80087168 000840A8 54 80 08 3C */ slwi r0, r4, 1 +/* 8008716C 000840AC C8 22 8A 40 */ lfd f1, "@110"@sda21(r2) +/* 80087170 000840B0 6C 00 80 00 */ xoris r0, r0, 0x8000 +/* 80087174 000840B4 C0 43 00 00 */ lfs f2, 0(r3) +/* 80087178 000840B8 90 01 00 14 */ stw r0, 0x14(r1) +/* 8008717C 000840BC 3C 00 43 30 */ lis r0, 0x4330 +/* 80087180 000840C0 C0 63 00 04 */ lfs f3, 4(r3) +/* 80087184 000840C4 54 9F 07 BE */ clrlwi r31, r4, 0x1e +/* 80087188 000840C8 90 01 00 10 */ stw r0, 0x10(r1) +/* 8008718C 000840CC C0 83 00 08 */ lfs f4, 8(r3) +/* 80087190 000840D0 C8 01 00 10 */ lfd f0, 0x10(r1) +/* 80087194 000840D4 C0 A3 00 0C */ lfs f5, 0xc(r3) +/* 80087198 000840D8 EC 00 08 28 */ fsubs f0, f0, f1 +/* 8008719C 000840DC EC 06 00 28 */ fsubs f0, f6, f0 +/* 800871A0 000840E0 EC 02 01 BA */ fmadds f0, f2, f6, f0 +/* 800871A4 000840E4 EC 03 01 BA */ fmadds f0, f3, f6, f0 +/* 800871A8 000840E8 EC 04 01 BA */ fmadds f0, f4, f6, f0 +/* 800871AC 000840EC EF E5 01 BA */ fmadds f31, f5, f6, f0 +/* 800871B0 000840F0 FC 20 F8 90 */ fmr f1, f31 +/* 800871B4 000840F4 4B FF F9 91 */ bl fabsf__Ff +/* 800871B8 000840F8 C0 02 8A 38 */ lfs f0, "@108"@sda21(r2) +/* 800871BC 000840FC FC 01 00 40 */ fcmpo cr0, f1, f0 +/* 800871C0 00084100 40 80 00 34 */ bge lbl_800871F4 +/* 800871C4 00084104 3C 60 80 37 */ lis r3, __sincos_on_quadrant@ha +/* 800871C8 00084108 57 E4 18 38 */ slwi r4, r31, 3 +/* 800871CC 0008410C 38 03 1F 5C */ addi r0, r3, __sincos_on_quadrant@l +/* 800871D0 00084110 7C 60 22 14 */ add r3, r0, r4 +/* 800871D4 00084114 C0 23 00 04 */ lfs f1, 4(r3) +/* 800871D8 00084118 3C 80 80 37 */ lis r4, __sincos_poly@ha +/* 800871DC 0008411C 38 84 1F 7C */ addi r4, r4, __sincos_poly@l +/* 800871E0 00084120 C0 03 00 00 */ lfs f0, 0(r3) +/* 800871E4 00084124 EC 3F 00 72 */ fmuls f1, f31, f1 +/* 800871E8 00084128 C0 44 00 24 */ lfs f2, 0x24(r4) +/* 800871EC 0008412C EC 22 00 7A */ fmadds f1, f2, f1, f0 +/* 800871F0 00084130 48 00 00 A0 */ b lbl_80087290 +lbl_800871F4: +/* 800871F4 00084134 57 E0 07 FF */ clrlwi. r0, r31, 0x1f +/* 800871F8 00084138 EC 9F 07 F2 */ fmuls f4, f31, f31 +/* 800871FC 0008413C 41 82 00 4C */ beq lbl_80087248 +/* 80087200 00084140 3C 60 80 37 */ lis r3, __sincos_poly@ha +/* 80087204 00084144 38 83 1F 7C */ addi r4, r3, __sincos_poly@l +/* 80087208 00084148 C0 44 00 00 */ lfs f2, 0(r4) +/* 8008720C 0008414C 3C 60 80 37 */ lis r3, __sincos_on_quadrant@ha +/* 80087210 00084150 C0 24 00 08 */ lfs f1, 8(r4) +/* 80087214 00084154 38 03 1F 5C */ addi r0, r3, __sincos_on_quadrant@l +/* 80087218 00084158 C0 04 00 10 */ lfs f0, 0x10(r4) +/* 8008721C 0008415C EC 62 09 3A */ fmadds f3, f2, f4, f1 +/* 80087220 00084160 C0 44 00 18 */ lfs f2, 0x18(r4) +/* 80087224 00084164 C0 24 00 20 */ lfs f1, 0x20(r4) +/* 80087228 00084168 57 E4 18 38 */ slwi r4, r31, 3 +/* 8008722C 0008416C 7C 60 22 14 */ add r3, r0, r4 +/* 80087230 00084170 EC 64 00 FA */ fmadds f3, f4, f3, f0 +/* 80087234 00084174 C0 03 00 00 */ lfs f0, 0(r3) +/* 80087238 00084178 EC 44 10 FA */ fmadds f2, f4, f3, f2 +/* 8008723C 0008417C EC 24 08 BA */ fmadds f1, f4, f2, f1 +/* 80087240 00084180 EC 21 00 32 */ fmuls f1, f1, f0 +/* 80087244 00084184 48 00 00 4C */ b lbl_80087290 +lbl_80087248: +/* 80087248 00084188 3C 60 80 37 */ lis r3, __sincos_poly@ha +/* 8008724C 0008418C 38 83 1F 7C */ addi r4, r3, __sincos_poly@l +/* 80087250 00084190 C0 44 00 04 */ lfs f2, 4(r4) +/* 80087254 00084194 3C 60 80 37 */ lis r3, __sincos_on_quadrant@ha +/* 80087258 00084198 C0 24 00 0C */ lfs f1, 0xc(r4) +/* 8008725C 0008419C 38 63 1F 5C */ addi r3, r3, __sincos_on_quadrant@l +/* 80087260 000841A0 57 E0 18 38 */ slwi r0, r31, 3 +/* 80087264 000841A4 EC 62 09 3A */ fmadds f3, f2, f4, f1 +/* 80087268 000841A8 C0 04 00 14 */ lfs f0, 0x14(r4) +/* 8008726C 000841AC C0 44 00 1C */ lfs f2, 0x1c(r4) +/* 80087270 000841B0 7C 63 02 14 */ add r3, r3, r0 +/* 80087274 000841B4 C0 24 00 24 */ lfs f1, 0x24(r4) +/* 80087278 000841B8 EC 64 00 FA */ fmadds f3, f4, f3, f0 +/* 8008727C 000841BC C0 03 00 04 */ lfs f0, 4(r3) +/* 80087280 000841C0 EC 44 10 FA */ fmadds f2, f4, f3, f2 +/* 80087284 000841C4 EC 24 08 BA */ fmadds f1, f4, f2, f1 +/* 80087288 000841C8 EC 3F 00 72 */ fmuls f1, f31, f1 +/* 8008728C 000841CC EC 21 00 32 */ fmuls f1, f1, f0 +lbl_80087290: +/* 80087290 000841D0 80 01 00 2C */ lwz r0, 0x2c(r1) +/* 80087294 000841D4 CB E1 00 20 */ lfd f31, 0x20(r1) +/* 80087298 000841D8 83 E1 00 1C */ lwz r31, 0x1c(r1) +/* 8008729C 000841DC 7C 08 03 A6 */ mtlr r0 +/* 800872A0 000841E0 38 21 00 28 */ addi r1, r1, 0x28 +/* 800872A4 000841E4 4E 80 00 20 */ blr + +.global cosf +cosf: +/* 80086F70 00083EB0 7C 08 02 A6 */ mflr r0 +/* 80086F74 00083EB4 3C 60 80 3B */ lis r3, __four_over_pi_m1@ha +/* 80086F78 00083EB8 90 01 00 04 */ stw r0, 4(r1) +/* 80086F7C 00083EBC 38 63 EF 48 */ addi r3, r3, __four_over_pi_m1@l +/* 80086F80 00083EC0 94 21 FF D8 */ stwu r1, -0x28(r1) +/* 80086F84 00083EC4 DB E1 00 20 */ stfd f31, 0x20(r1) +/* 80086F88 00083EC8 93 E1 00 1C */ stw r31, 0x1c(r1) +/* 80086F8C 00083ECC D0 21 00 08 */ stfs f1, 8(r1) +/* 80086F90 00083ED0 C0 02 8A 30 */ lfs f0, "@106"@sda21(r2) +/* 80086F94 00083ED4 80 01 00 08 */ lwz r0, 8(r1) +/* 80086F98 00083ED8 C0 C1 00 08 */ lfs f6, 8(r1) +/* 80086F9C 00083EDC 54 00 00 01 */ rlwinm. r0, r0, 0, 0, 0 +/* 80086FA0 00083EE0 EC 20 01 B2 */ fmuls f1, f0, f6 +/* 80086FA4 00083EE4 41 82 00 1C */ beq lbl_80086FC0 +/* 80086FA8 00083EE8 C0 02 8A 34 */ lfs f0, "@107"@sda21(r2) +/* 80086FAC 00083EEC EC 01 00 28 */ fsubs f0, f1, f0 +/* 80086FB0 00083EF0 FC 00 00 1E */ fctiwz f0, f0 +/* 80086FB4 00083EF4 D8 01 00 10 */ stfd f0, 0x10(r1) +/* 80086FB8 00083EF8 80 81 00 14 */ lwz r4, 0x14(r1) +/* 80086FBC 00083EFC 48 00 00 18 */ b lbl_80086FD4 +lbl_80086FC0: +/* 80086FC0 00083F00 C0 02 8A 34 */ lfs f0, "@107"@sda21(r2) +/* 80086FC4 00083F04 EC 00 08 2A */ fadds f0, f0, f1 +/* 80086FC8 00083F08 FC 00 00 1E */ fctiwz f0, f0 +/* 80086FCC 00083F0C D8 01 00 10 */ stfd f0, 0x10(r1) +/* 80086FD0 00083F10 80 81 00 14 */ lwz r4, 0x14(r1) +lbl_80086FD4: +/* 80086FD4 00083F14 54 80 08 3C */ slwi r0, r4, 1 +/* 80086FD8 00083F18 C8 22 8A 40 */ lfd f1, "@110"@sda21(r2) +/* 80086FDC 00083F1C 6C 00 80 00 */ xoris r0, r0, 0x8000 +/* 80086FE0 00083F20 C0 43 00 00 */ lfs f2, 0(r3) +/* 80086FE4 00083F24 90 01 00 14 */ stw r0, 0x14(r1) +/* 80086FE8 00083F28 3C 00 43 30 */ lis r0, 0x4330 +/* 80086FEC 00083F2C C0 63 00 04 */ lfs f3, 4(r3) +/* 80086FF0 00083F30 54 9F 07 BE */ clrlwi r31, r4, 0x1e +/* 80086FF4 00083F34 90 01 00 10 */ stw r0, 0x10(r1) +/* 80086FF8 00083F38 C0 83 00 08 */ lfs f4, 8(r3) +/* 80086FFC 00083F3C C8 01 00 10 */ lfd f0, 0x10(r1) +/* 80087000 00083F40 C0 A3 00 0C */ lfs f5, 0xc(r3) +/* 80087004 00083F44 EC 00 08 28 */ fsubs f0, f0, f1 +/* 80087008 00083F48 EC 06 00 28 */ fsubs f0, f6, f0 +/* 8008700C 00083F4C EC 02 01 BA */ fmadds f0, f2, f6, f0 +/* 80087010 00083F50 EC 03 01 BA */ fmadds f0, f3, f6, f0 +/* 80087014 00083F54 EC 04 01 BA */ fmadds f0, f4, f6, f0 +/* 80087018 00083F58 EF E5 01 BA */ fmadds f31, f5, f6, f0 +/* 8008701C 00083F5C FC 20 F8 90 */ fmr f1, f31 +/* 80087020 00083F60 4B FF FB 25 */ bl fabsf__Ff +/* 80087024 00083F64 C0 02 8A 38 */ lfs f0, "@108"@sda21(r2) +/* 80087028 00083F68 FC 01 00 40 */ fcmpo cr0, f1, f0 +/* 8008702C 00083F6C 40 80 00 24 */ bge lbl_80087050 +/* 80087030 00083F70 3C 60 80 37 */ lis r3, __sincos_on_quadrant@ha +/* 80087034 00083F74 57 E4 18 38 */ slwi r4, r31, 3 +/* 80087038 00083F78 38 03 1F 5C */ addi r0, r3, __sincos_on_quadrant@l +/* 8008703C 00083F7C 7C 60 22 14 */ add r3, r0, r4 +/* 80087040 00083F80 C0 23 00 00 */ lfs f1, 0(r3) +/* 80087044 00083F84 C0 03 00 04 */ lfs f0, 4(r3) +/* 80087048 00083F88 EC 3F 00 7C */ fnmsubs f1, f31, f1, f0 +/* 8008704C 00083F8C 48 00 00 A0 */ b lbl_800870EC +lbl_80087050: +/* 80087050 00083F90 57 E0 07 FF */ clrlwi. r0, r31, 0x1f +/* 80087054 00083F94 EC 9F 07 F2 */ fmuls f4, f31, f31 +/* 80087058 00083F98 41 82 00 50 */ beq lbl_800870A8 +/* 8008705C 00083F9C 3C 60 80 37 */ lis r3, __sincos_poly@ha +/* 80087060 00083FA0 38 83 1F 7C */ addi r4, r3, __sincos_poly@l +/* 80087064 00083FA4 C0 44 00 04 */ lfs f2, 4(r4) +/* 80087068 00083FA8 3C 60 80 37 */ lis r3, __sincos_on_quadrant@ha +/* 8008706C 00083FAC C0 24 00 0C */ lfs f1, 0xc(r4) +/* 80087070 00083FB0 38 03 1F 5C */ addi r0, r3, __sincos_on_quadrant@l +/* 80087074 00083FB4 C0 04 00 14 */ lfs f0, 0x14(r4) +/* 80087078 00083FB8 EC 62 09 3A */ fmadds f3, f2, f4, f1 +/* 8008707C 00083FBC C0 44 00 1C */ lfs f2, 0x1c(r4) +/* 80087080 00083FC0 C0 24 00 24 */ lfs f1, 0x24(r4) +/* 80087084 00083FC4 57 E4 18 38 */ slwi r4, r31, 3 +/* 80087088 00083FC8 7C 60 22 14 */ add r3, r0, r4 +/* 8008708C 00083FCC EC 64 00 FA */ fmadds f3, f4, f3, f0 +/* 80087090 00083FD0 C0 03 00 00 */ lfs f0, 0(r3) +/* 80087094 00083FD4 EC 44 10 FA */ fmadds f2, f4, f3, f2 +/* 80087098 00083FD8 EC 24 08 BE */ fnmadds f1, f4, f2, f1 +/* 8008709C 00083FDC EC 3F 00 72 */ fmuls f1, f31, f1 +/* 800870A0 00083FE0 EC 21 00 32 */ fmuls f1, f1, f0 +/* 800870A4 00083FE4 48 00 00 48 */ b lbl_800870EC +lbl_800870A8: +/* 800870A8 00083FE8 3C 60 80 37 */ lis r3, __sincos_poly@ha +/* 800870AC 00083FEC 38 83 1F 7C */ addi r4, r3, __sincos_poly@l +/* 800870B0 00083FF0 C0 44 00 00 */ lfs f2, 0(r4) +/* 800870B4 00083FF4 3C 60 80 37 */ lis r3, __sincos_on_quadrant@ha +/* 800870B8 00083FF8 C0 24 00 08 */ lfs f1, 8(r4) +/* 800870BC 00083FFC 38 63 1F 5C */ addi r3, r3, __sincos_on_quadrant@l +/* 800870C0 00084000 57 E0 18 38 */ slwi r0, r31, 3 +/* 800870C4 00084004 EC 62 09 3A */ fmadds f3, f2, f4, f1 +/* 800870C8 00084008 C0 04 00 10 */ lfs f0, 0x10(r4) +/* 800870CC 0008400C C0 44 00 18 */ lfs f2, 0x18(r4) +/* 800870D0 00084010 7C 63 02 14 */ add r3, r3, r0 +/* 800870D4 00084014 C0 24 00 20 */ lfs f1, 0x20(r4) +/* 800870D8 00084018 EC 64 00 FA */ fmadds f3, f4, f3, f0 +/* 800870DC 0008401C C0 03 00 04 */ lfs f0, 4(r3) +/* 800870E0 00084020 EC 44 10 FA */ fmadds f2, f4, f3, f2 +/* 800870E4 00084024 EC 24 08 BA */ fmadds f1, f4, f2, f1 +/* 800870E8 00084028 EC 21 00 32 */ fmuls f1, f1, f0 +lbl_800870EC: +/* 800870EC 0008402C 80 01 00 2C */ lwz r0, 0x2c(r1) +/* 800870F0 00084030 CB E1 00 20 */ lfd f31, 0x20(r1) +/* 800870F4 00084034 83 E1 00 1C */ lwz r31, 0x1c(r1) +/* 800870F8 00084038 7C 08 03 A6 */ mtlr r0 +/* 800870FC 0008403C 38 21 00 28 */ addi r1, r1, 0x28 +/* 80087100 00084040 4E 80 00 20 */ blr + +.global __sinit_trigf_c +__sinit_trigf_c: +/* 800872A8 000841E8 3C 60 80 37 */ lis r3, tmp_float@ha +/* 800872AC 000841EC 38 83 1A 80 */ addi r4, r3, tmp_float@l +/* 800872B0 000841F0 C0 04 00 00 */ lfs f0, 0(r4) +/* 800872B4 000841F4 3C 60 80 3B */ lis r3, __four_over_pi_m1@ha +/* 800872B8 000841F8 D4 03 EF 48 */ stfsu f0, __four_over_pi_m1@l(r3) +/* 800872BC 000841FC C0 04 00 04 */ lfs f0, 4(r4) +/* 800872C0 00084200 D0 03 00 04 */ stfs f0, 4(r3) +/* 800872C4 00084204 C0 04 00 08 */ lfs f0, 8(r4) +/* 800872C8 00084208 D0 03 00 08 */ stfs f0, 8(r3) +/* 800872CC 0008420C C0 04 00 0C */ lfs f0, 0xc(r4) +/* 800872D0 00084210 D0 03 00 0C */ stfs f0, 0xc(r3) +/* 800872D4 00084214 4E 80 00 20 */ blr + +.section .ctors, "wa" # 0x8036FBA0 - 0x8036FF80 +lbl_constructor: + .4byte __sinit_trigf_c + +.section .rodata, "a" # 0x8036FFA0 - 0x803A8380 +.balign 8 +tmp_float: + .4byte 0x3E800000 + .4byte 0x3CBE6080 + .4byte 0x34372200 + .4byte 0x2DA44152 + +.section .data, "wa" # 0x803A8380 - 0x803E6000 +__four_over_pi_m1: + .4byte 0 + .4byte 0 + .4byte 0 + .4byte 0 + +.section .sdata2, "a" # 0x8040B460 - 0x80414020 +.balign 8 +"@106": + .4byte 0x3F22F983 +"@107": + .4byte 0x3F000000 +"@108": + .4byte 0x39B504F3 + .4byte 0 +"@110": + .4byte 0x43300000 + .4byte 0x80000000 diff --git a/asm/MSL_C.PPCEABI.bare.H/uart_console_io.s b/asm/MSL_C.PPCEABI.bare.H/uart_console_io.s new file mode 100644 index 0000000..671c827 --- /dev/null +++ b/asm/MSL_C.PPCEABI.bare.H/uart_console_io.s @@ -0,0 +1,123 @@ +.include "macros.inc" + +.section .text, "ax" # 0x80005600 - 0x8036FBA0 +.global __close_console +__close_console: +/* 800863A8 000832E8 38 60 00 00 */ li r3, 0 +/* 800863AC 000832EC 4E 80 00 20 */ blr + +.global __write_console +__write_console: +/* 800863B0 000832F0 7C 08 02 A6 */ mflr r0 +/* 800863B4 000832F4 38 60 00 00 */ li r3, 0 +/* 800863B8 000832F8 90 01 00 04 */ stw r0, 4(r1) +/* 800863BC 000832FC 94 21 FF D8 */ stwu r1, -0x28(r1) +/* 800863C0 00083300 93 E1 00 24 */ stw r31, 0x24(r1) +/* 800863C4 00083304 3B E5 00 00 */ addi r31, r5, 0 +/* 800863C8 00083308 93 C1 00 20 */ stw r30, 0x20(r1) +/* 800863CC 0008330C 3B C4 00 00 */ addi r30, r4, 0 +/* 800863D0 00083310 80 0D 92 B0 */ lwz r0, initialized$16@sda21(r13) +/* 800863D4 00083314 2C 00 00 00 */ cmpwi r0, 0 +/* 800863D8 00083318 40 82 00 20 */ bne lbl_800863F8 +/* 800863DC 0008331C 3C 60 00 01 */ lis r3, 0x0000E100@ha +/* 800863E0 00083320 38 63 E1 00 */ addi r3, r3, 0x0000E100@l +/* 800863E4 00083324 48 02 F9 09 */ bl InitializeUART +/* 800863E8 00083328 2C 03 00 00 */ cmpwi r3, 0 +/* 800863EC 0008332C 40 82 00 0C */ bne lbl_800863F8 +/* 800863F0 00083330 38 00 00 01 */ li r0, 1 +/* 800863F4 00083334 90 0D 92 B0 */ stw r0, initialized$16@sda21(r13) +lbl_800863F8: +/* 800863F8 00083338 2C 03 00 00 */ cmpwi r3, 0 +/* 800863FC 0008333C 41 82 00 0C */ beq lbl_80086408 +/* 80086400 00083340 38 60 00 01 */ li r3, 1 +/* 80086404 00083344 48 00 00 2C */ b lbl_80086430 +lbl_80086408: +/* 80086408 00083348 7F C3 F3 78 */ mr r3, r30 +/* 8008640C 0008334C 80 9F 00 00 */ lwz r4, 0(r31) +/* 80086410 00083350 48 02 F9 55 */ bl WriteUARTN +/* 80086414 00083354 2C 03 00 00 */ cmpwi r3, 0 +/* 80086418 00083358 41 82 00 14 */ beq lbl_8008642C +/* 8008641C 0008335C 38 00 00 00 */ li r0, 0 +/* 80086420 00083360 90 1F 00 00 */ stw r0, 0(r31) +/* 80086424 00083364 38 60 00 01 */ li r3, 1 +/* 80086428 00083368 48 00 00 08 */ b lbl_80086430 +lbl_8008642C: +/* 8008642C 0008336C 38 60 00 00 */ li r3, 0 +lbl_80086430: +/* 80086430 00083370 80 01 00 2C */ lwz r0, 0x2c(r1) +/* 80086434 00083374 83 E1 00 24 */ lwz r31, 0x24(r1) +/* 80086438 00083378 83 C1 00 20 */ lwz r30, 0x20(r1) +/* 8008643C 0008337C 7C 08 03 A6 */ mtlr r0 +/* 80086440 00083380 38 21 00 28 */ addi r1, r1, 0x28 +/* 80086444 00083384 4E 80 00 20 */ blr + +.global __read_console +__read_console: +/* 80086448 00083388 7C 08 02 A6 */ mflr r0 +/* 8008644C 0008338C 38 60 00 00 */ li r3, 0 +/* 80086450 00083390 90 01 00 04 */ stw r0, 4(r1) +/* 80086454 00083394 94 21 FF D0 */ stwu r1, -0x30(r1) +/* 80086458 00083398 93 E1 00 2C */ stw r31, 0x2c(r1) +/* 8008645C 0008339C 93 C1 00 28 */ stw r30, 0x28(r1) +/* 80086460 000833A0 3B C5 00 00 */ addi r30, r5, 0 +/* 80086464 000833A4 93 A1 00 24 */ stw r29, 0x24(r1) +/* 80086468 000833A8 3B A4 00 00 */ addi r29, r4, 0 +/* 8008646C 000833AC 80 0D 92 B0 */ lwz r0, initialized$16@sda21(r13) +/* 80086470 000833B0 2C 00 00 00 */ cmpwi r0, 0 +/* 80086474 000833B4 40 82 00 20 */ bne lbl_80086494 +/* 80086478 000833B8 3C 60 00 01 */ lis r3, 0x0000E100@ha +/* 8008647C 000833BC 38 63 E1 00 */ addi r3, r3, 0x0000E100@l +/* 80086480 000833C0 48 02 F8 6D */ bl InitializeUART +/* 80086484 000833C4 2C 03 00 00 */ cmpwi r3, 0 +/* 80086488 000833C8 40 82 00 0C */ bne lbl_80086494 +/* 8008648C 000833CC 38 00 00 01 */ li r0, 1 +/* 80086490 000833D0 90 0D 92 B0 */ stw r0, initialized$16@sda21(r13) +lbl_80086494: +/* 80086494 000833D4 2C 03 00 00 */ cmpwi r3, 0 +/* 80086498 000833D8 41 82 00 0C */ beq lbl_800864A4 +/* 8008649C 000833DC 38 60 00 01 */ li r3, 1 +/* 800864A0 000833E0 48 00 00 6C */ b lbl_8008650C +lbl_800864A4: +/* 800864A4 000833E4 83 FE 00 00 */ lwz r31, 0(r30) +/* 800864A8 000833E8 38 00 00 00 */ li r0, 0 +/* 800864AC 000833EC 38 60 00 00 */ li r3, 0 +/* 800864B0 000833F0 90 1E 00 00 */ stw r0, 0(r30) +/* 800864B4 000833F4 48 00 00 2C */ b lbl_800864E0 +lbl_800864B8: +/* 800864B8 000833F8 38 7D 00 00 */ addi r3, r29, 0 +/* 800864BC 000833FC 38 80 00 01 */ li r4, 1 +/* 800864C0 00083400 48 02 F8 9D */ bl ReadUARTN +/* 800864C4 00083404 80 9E 00 00 */ lwz r4, 0(r30) +/* 800864C8 00083408 38 04 00 01 */ addi r0, r4, 1 +/* 800864CC 0008340C 90 1E 00 00 */ stw r0, 0(r30) +/* 800864D0 00083410 88 1D 00 00 */ lbz r0, 0(r29) +/* 800864D4 00083414 28 00 00 0D */ cmplwi r0, 0xd +/* 800864D8 00083418 41 82 00 1C */ beq lbl_800864F4 +/* 800864DC 0008341C 3B BD 00 01 */ addi r29, r29, 1 +lbl_800864E0: +/* 800864E0 00083420 80 1E 00 00 */ lwz r0, 0(r30) +/* 800864E4 00083424 7C 00 F8 40 */ cmplw r0, r31 +/* 800864E8 00083428 41 81 00 0C */ bgt lbl_800864F4 +/* 800864EC 0008342C 2C 03 00 00 */ cmpwi r3, 0 +/* 800864F0 00083430 41 82 FF C8 */ beq lbl_800864B8 +lbl_800864F4: +/* 800864F4 00083434 2C 03 00 00 */ cmpwi r3, 0 +/* 800864F8 00083438 40 82 00 0C */ bne lbl_80086504 +/* 800864FC 0008343C 38 00 00 00 */ li r0, 0 +/* 80086500 00083440 48 00 00 08 */ b lbl_80086508 +lbl_80086504: +/* 80086504 00083444 38 00 00 01 */ li r0, 1 +lbl_80086508: +/* 80086508 00083448 54 03 06 3E */ clrlwi r3, r0, 0x18 +lbl_8008650C: +/* 8008650C 0008344C 80 01 00 34 */ lwz r0, 0x34(r1) +/* 80086510 00083450 83 E1 00 2C */ lwz r31, 0x2c(r1) +/* 80086514 00083454 83 C1 00 28 */ lwz r30, 0x28(r1) +/* 80086518 00083458 7C 08 03 A6 */ mtlr r0 +/* 8008651C 0008345C 83 A1 00 24 */ lwz r29, 0x24(r1) +/* 80086520 00083460 38 21 00 30 */ addi r1, r1, 0x30 +/* 80086524 00083464 4E 80 00 20 */ blr + +.section .sbss, "wa" # 0x804097C0 - 0x8040B45C +initialized$16: + .skip 0x8 diff --git a/asm/OdemuExi2/DebuggerDriver.s b/asm/OdemuExi2/DebuggerDriver.s new file mode 100644 index 0000000..f7e5143 --- /dev/null +++ b/asm/OdemuExi2/DebuggerDriver.s @@ -0,0 +1,779 @@ +.include "macros.inc" + +.section .text, "ax" # 0x80005600 - 0x8036FBA0 +.global DBClose +DBClose: +/* 800AE560 000AB4A0 4E 80 00 20 */ blr + +.global DBOpen +DBOpen: +/* 800AE564 000AB4A4 4E 80 00 20 */ blr + +.global DBWrite +DBWrite: +/* 800AE568 000AB4A8 7C 08 02 A6 */ mflr r0 +/* 800AE56C 000AB4AC 90 01 00 04 */ stw r0, 4(r1) +/* 800AE570 000AB4B0 94 21 FF 88 */ stwu r1, -0x78(r1) +/* 800AE574 000AB4B4 BF 01 00 58 */ stmw r24, 0x58(r1) +/* 800AE578 000AB4B8 3B 43 00 00 */ addi r26, r3, 0 +/* 800AE57C 000AB4BC 3B 64 00 00 */ addi r27, r4, 0 +/* 800AE580 000AB4C0 4B FE 1C 4D */ bl OSDisableInterrupts +/* 800AE584 000AB4C4 3B 83 00 00 */ addi r28, r3, 0 +/* 800AE588 000AB4C8 3F 20 CC 00 */ lis r25, 0xCC006828@ha +/* 800AE58C 000AB4CC 3F E0 40 00 */ lis r31, 0x4000 +lbl_800AE590: +/* 800AE590 000AB4D0 80 19 68 28 */ lwz r0, 0xCC006828@l(r25) +/* 800AE594 000AB4D4 3B D9 68 00 */ addi r30, r25, 0x6800 +/* 800AE598 000AB4D8 38 61 00 50 */ addi r3, r1, 0x50 +/* 800AE59C 000AB4DC 70 00 04 05 */ andi. r0, r0, 0x405 +/* 800AE5A0 000AB4E0 38 80 00 02 */ li r4, 2 +/* 800AE5A4 000AB4E4 38 A0 00 01 */ li r5, 1 +/* 800AE5A8 000AB4E8 60 00 00 C0 */ ori r0, r0, 0xc0 +/* 800AE5AC 000AB4EC 94 1E 00 28 */ stwu r0, 0x28(r30) +/* 800AE5B0 000AB4F0 93 E1 00 50 */ stw r31, 0x50(r1) +/* 800AE5B4 000AB4F4 48 00 07 95 */ bl DBGEXIImm +/* 800AE5B8 000AB4F8 7C 60 00 34 */ cntlzw r0, r3 +/* 800AE5BC 000AB4FC 54 18 D9 7E */ srwi r24, r0, 5 +lbl_800AE5C0: +/* 800AE5C0 000AB500 3B B9 68 00 */ addi r29, r25, 0x6800 +/* 800AE5C4 000AB504 84 1D 00 34 */ lwzu r0, 0x34(r29) +/* 800AE5C8 000AB508 54 00 07 FF */ clrlwi. r0, r0, 0x1f +/* 800AE5CC 000AB50C 40 82 FF F4 */ bne lbl_800AE5C0 +/* 800AE5D0 000AB510 38 61 00 54 */ addi r3, r1, 0x54 +/* 800AE5D4 000AB514 38 80 00 04 */ li r4, 4 +/* 800AE5D8 000AB518 38 A0 00 00 */ li r5, 0 +/* 800AE5DC 000AB51C 48 00 07 6D */ bl DBGEXIImm +lbl_800AE5E0: +/* 800AE5E0 000AB520 80 1D 00 00 */ lwz r0, 0(r29) +/* 800AE5E4 000AB524 54 00 07 FF */ clrlwi. r0, r0, 0x1f +/* 800AE5E8 000AB528 40 82 FF F8 */ bne lbl_800AE5E0 +/* 800AE5EC 000AB52C 80 1E 00 00 */ lwz r0, 0(r30) +/* 800AE5F0 000AB530 70 00 04 05 */ andi. r0, r0, 0x405 +/* 800AE5F4 000AB534 90 1E 00 00 */ stw r0, 0(r30) +/* 800AE5F8 000AB538 80 01 00 54 */ lwz r0, 0x54(r1) +/* 800AE5FC 000AB53C 54 00 07 BD */ rlwinm. r0, r0, 0, 0x1e, 0x1e +/* 800AE600 000AB540 40 82 FF 90 */ bne lbl_800AE590 +/* 800AE604 000AB544 88 6D 82 E8 */ lbz r3, SendCount@sda21(r13) +/* 800AE608 000AB548 38 03 00 01 */ addi r0, r3, 1 +/* 800AE60C 000AB54C 98 0D 82 E8 */ stb r0, SendCount@sda21(r13) +/* 800AE610 000AB550 88 0D 82 E8 */ lbz r0, SendCount@sda21(r13) +/* 800AE614 000AB554 54 00 07 FF */ clrlwi. r0, r0, 0x1f +/* 800AE618 000AB558 41 82 00 0C */ beq lbl_800AE624 +/* 800AE61C 000AB55C 38 60 10 00 */ li r3, 0x1000 +/* 800AE620 000AB560 48 00 00 08 */ b lbl_800AE628 +lbl_800AE624: +/* 800AE624 000AB564 38 60 00 00 */ li r3, 0 +lbl_800AE628: +/* 800AE628 000AB568 38 1B 00 03 */ addi r0, r27, 3 +/* 800AE62C 000AB56C 64 79 00 01 */ oris r25, r3, 1 +/* 800AE630 000AB570 54 18 00 3A */ rlwinm r24, r0, 0, 0, 0x1d +/* 800AE634 000AB574 63 39 C0 00 */ ori r25, r25, 0xc000 +lbl_800AE638: +/* 800AE638 000AB578 38 79 00 00 */ addi r3, r25, 0 +/* 800AE63C 000AB57C 38 9A 00 00 */ addi r4, r26, 0 +/* 800AE640 000AB580 38 B8 00 00 */ addi r5, r24, 0 +/* 800AE644 000AB584 48 00 04 A1 */ bl DBGWrite +/* 800AE648 000AB588 2C 03 00 00 */ cmpwi r3, 0 +/* 800AE64C 000AB58C 41 82 FF EC */ beq lbl_800AE638 +/* 800AE650 000AB590 3F E0 40 00 */ lis r31, 0x4000 +lbl_800AE654: +/* 800AE654 000AB594 80 1E 00 00 */ lwz r0, 0(r30) +/* 800AE658 000AB598 38 61 00 4C */ addi r3, r1, 0x4c +/* 800AE65C 000AB59C 38 80 00 02 */ li r4, 2 +/* 800AE660 000AB5A0 70 00 04 05 */ andi. r0, r0, 0x405 +/* 800AE664 000AB5A4 38 A0 00 01 */ li r5, 1 +/* 800AE668 000AB5A8 60 00 00 C0 */ ori r0, r0, 0xc0 +/* 800AE66C 000AB5AC 90 1E 00 00 */ stw r0, 0(r30) +/* 800AE670 000AB5B0 93 E1 00 4C */ stw r31, 0x4c(r1) +/* 800AE674 000AB5B4 48 00 06 D5 */ bl DBGEXIImm +/* 800AE678 000AB5B8 7C 60 00 34 */ cntlzw r0, r3 +/* 800AE67C 000AB5BC 54 1A D9 7E */ srwi r26, r0, 5 +lbl_800AE680: +/* 800AE680 000AB5C0 80 1D 00 00 */ lwz r0, 0(r29) +/* 800AE684 000AB5C4 54 00 07 FF */ clrlwi. r0, r0, 0x1f +/* 800AE688 000AB5C8 40 82 FF F8 */ bne lbl_800AE680 +/* 800AE68C 000AB5CC 38 61 00 54 */ addi r3, r1, 0x54 +/* 800AE690 000AB5D0 38 80 00 04 */ li r4, 4 +/* 800AE694 000AB5D4 38 A0 00 00 */ li r5, 0 +/* 800AE698 000AB5D8 48 00 06 B1 */ bl DBGEXIImm +lbl_800AE69C: +/* 800AE69C 000AB5DC 80 1D 00 00 */ lwz r0, 0(r29) +/* 800AE6A0 000AB5E0 54 00 07 FF */ clrlwi. r0, r0, 0x1f +/* 800AE6A4 000AB5E4 40 82 FF F8 */ bne lbl_800AE69C +/* 800AE6A8 000AB5E8 80 1E 00 00 */ lwz r0, 0(r30) +/* 800AE6AC 000AB5EC 70 00 04 05 */ andi. r0, r0, 0x405 +/* 800AE6B0 000AB5F0 90 1E 00 00 */ stw r0, 0(r30) +/* 800AE6B4 000AB5F4 80 01 00 54 */ lwz r0, 0x54(r1) +/* 800AE6B8 000AB5F8 54 00 07 BD */ rlwinm. r0, r0, 0, 0x1e, 0x1e +/* 800AE6BC 000AB5FC 40 82 FF 98 */ bne lbl_800AE654 +/* 800AE6C0 000AB600 88 0D 82 E8 */ lbz r0, SendCount@sda21(r13) +/* 800AE6C4 000AB604 54 00 80 1E */ slwi r0, r0, 0x10 +/* 800AE6C8 000AB608 64 00 1F 00 */ oris r0, r0, 0x1f00 +/* 800AE6CC 000AB60C 7C 00 DB 78 */ or r0, r0, r27 +/* 800AE6D0 000AB610 54 00 00 FE */ clrlwi r0, r0, 3 +/* 800AE6D4 000AB614 64 18 C0 00 */ oris r24, r0, 0xc000 +lbl_800AE6D8: +/* 800AE6D8 000AB618 80 1E 00 00 */ lwz r0, 0(r30) +/* 800AE6DC 000AB61C 38 61 00 44 */ addi r3, r1, 0x44 +/* 800AE6E0 000AB620 38 80 00 04 */ li r4, 4 +/* 800AE6E4 000AB624 70 00 04 05 */ andi. r0, r0, 0x405 +/* 800AE6E8 000AB628 38 A0 00 01 */ li r5, 1 +/* 800AE6EC 000AB62C 60 00 00 C0 */ ori r0, r0, 0xc0 +/* 800AE6F0 000AB630 90 1E 00 00 */ stw r0, 0(r30) +/* 800AE6F4 000AB634 93 01 00 44 */ stw r24, 0x44(r1) +/* 800AE6F8 000AB638 48 00 06 51 */ bl DBGEXIImm +/* 800AE6FC 000AB63C 7C 60 00 34 */ cntlzw r0, r3 +/* 800AE700 000AB640 54 03 D9 7E */ srwi r3, r0, 5 +lbl_800AE704: +/* 800AE704 000AB644 80 1D 00 00 */ lwz r0, 0(r29) +/* 800AE708 000AB648 54 00 07 FF */ clrlwi. r0, r0, 0x1f +/* 800AE70C 000AB64C 40 82 FF F8 */ bne lbl_800AE704 +/* 800AE710 000AB650 80 1E 00 00 */ lwz r0, 0(r30) +/* 800AE714 000AB654 70 00 04 05 */ andi. r0, r0, 0x405 +/* 800AE718 000AB658 2C 03 00 00 */ cmpwi r3, 0 +/* 800AE71C 000AB65C 90 1E 00 00 */ stw r0, 0(r30) +/* 800AE720 000AB660 40 82 FF B8 */ bne lbl_800AE6D8 +/* 800AE724 000AB664 3F 60 40 00 */ lis r27, 0x4000 +lbl_800AE728: +/* 800AE728 000AB668 80 1E 00 00 */ lwz r0, 0(r30) +/* 800AE72C 000AB66C 38 61 00 3C */ addi r3, r1, 0x3c +/* 800AE730 000AB670 38 80 00 02 */ li r4, 2 +/* 800AE734 000AB674 70 00 04 05 */ andi. r0, r0, 0x405 +/* 800AE738 000AB678 38 A0 00 01 */ li r5, 1 +/* 800AE73C 000AB67C 60 00 00 C0 */ ori r0, r0, 0xc0 +/* 800AE740 000AB680 90 1E 00 00 */ stw r0, 0(r30) +/* 800AE744 000AB684 93 61 00 3C */ stw r27, 0x3c(r1) +/* 800AE748 000AB688 48 00 06 01 */ bl DBGEXIImm +/* 800AE74C 000AB68C 7C 60 00 34 */ cntlzw r0, r3 +/* 800AE750 000AB690 54 1A D9 7E */ srwi r26, r0, 5 +lbl_800AE754: +/* 800AE754 000AB694 80 1D 00 00 */ lwz r0, 0(r29) +/* 800AE758 000AB698 54 00 07 FF */ clrlwi. r0, r0, 0x1f +/* 800AE75C 000AB69C 40 82 FF F8 */ bne lbl_800AE754 +/* 800AE760 000AB6A0 38 61 00 54 */ addi r3, r1, 0x54 +/* 800AE764 000AB6A4 38 80 00 04 */ li r4, 4 +/* 800AE768 000AB6A8 38 A0 00 00 */ li r5, 0 +/* 800AE76C 000AB6AC 48 00 05 DD */ bl DBGEXIImm +/* 800AE770 000AB6B0 7C 60 00 34 */ cntlzw r0, r3 +/* 800AE774 000AB6B4 54 00 D9 7E */ srwi r0, r0, 5 +/* 800AE778 000AB6B8 7F 43 03 78 */ or r3, r26, r0 +lbl_800AE77C: +/* 800AE77C 000AB6BC 80 1D 00 00 */ lwz r0, 0(r29) +/* 800AE780 000AB6C0 54 00 07 FF */ clrlwi. r0, r0, 0x1f +/* 800AE784 000AB6C4 40 82 FF F8 */ bne lbl_800AE77C +/* 800AE788 000AB6C8 80 1E 00 00 */ lwz r0, 0(r30) +/* 800AE78C 000AB6CC 70 00 04 05 */ andi. r0, r0, 0x405 +/* 800AE790 000AB6D0 2C 03 00 00 */ cmpwi r3, 0 +/* 800AE794 000AB6D4 90 1E 00 00 */ stw r0, 0(r30) +/* 800AE798 000AB6D8 40 82 FF 90 */ bne lbl_800AE728 +/* 800AE79C 000AB6DC 80 01 00 54 */ lwz r0, 0x54(r1) +/* 800AE7A0 000AB6E0 54 00 07 BD */ rlwinm. r0, r0, 0, 0x1e, 0x1e +/* 800AE7A4 000AB6E4 40 82 FF 84 */ bne lbl_800AE728 +/* 800AE7A8 000AB6E8 7F 83 E3 78 */ mr r3, r28 +/* 800AE7AC 000AB6EC 4B FE 1A 49 */ bl OSRestoreInterrupts +/* 800AE7B0 000AB6F0 BB 01 00 58 */ lmw r24, 0x58(r1) +/* 800AE7B4 000AB6F4 38 60 00 00 */ li r3, 0 +/* 800AE7B8 000AB6F8 80 01 00 7C */ lwz r0, 0x7c(r1) +/* 800AE7BC 000AB6FC 38 21 00 78 */ addi r1, r1, 0x78 +/* 800AE7C0 000AB700 7C 08 03 A6 */ mtlr r0 +/* 800AE7C4 000AB704 4E 80 00 20 */ blr + +.global DBRead +DBRead: +/* 800AE7C8 000AB708 7C 08 02 A6 */ mflr r0 +/* 800AE7CC 000AB70C 90 01 00 04 */ stw r0, 4(r1) +/* 800AE7D0 000AB710 94 21 FF E0 */ stwu r1, -0x20(r1) +/* 800AE7D4 000AB714 93 E1 00 1C */ stw r31, 0x1c(r1) +/* 800AE7D8 000AB718 93 C1 00 18 */ stw r30, 0x18(r1) +/* 800AE7DC 000AB71C 3B C4 00 00 */ addi r30, r4, 0 +/* 800AE7E0 000AB720 93 A1 00 14 */ stw r29, 0x14(r1) +/* 800AE7E4 000AB724 3B A3 00 00 */ addi r29, r3, 0 +/* 800AE7E8 000AB728 4B FE 19 E5 */ bl OSDisableInterrupts +/* 800AE7EC 000AB72C 80 0D 95 A8 */ lwz r0, SendMailData@sda21(r13) +/* 800AE7F0 000AB730 3B E3 00 00 */ addi r31, r3, 0 +/* 800AE7F4 000AB734 54 00 03 DF */ rlwinm. r0, r0, 0, 0xf, 0xf +/* 800AE7F8 000AB738 41 82 00 0C */ beq lbl_800AE804 +/* 800AE7FC 000AB73C 38 60 10 00 */ li r3, 0x1000 +/* 800AE800 000AB740 48 00 00 08 */ b lbl_800AE808 +lbl_800AE804: +/* 800AE804 000AB744 38 60 00 00 */ li r3, 0 +lbl_800AE808: +/* 800AE808 000AB748 3C 63 00 02 */ addis r3, r3, 2 +/* 800AE80C 000AB74C 38 1E 00 03 */ addi r0, r30, 3 +/* 800AE810 000AB750 38 9D 00 00 */ addi r4, r29, 0 +/* 800AE814 000AB754 54 05 00 3A */ rlwinm r5, r0, 0, 0, 0x1d +/* 800AE818 000AB758 38 63 E0 00 */ addi r3, r3, -8192 +/* 800AE81C 000AB75C 48 00 03 A5 */ bl DBGRead +/* 800AE820 000AB760 38 00 00 00 */ li r0, 0 +/* 800AE824 000AB764 90 0D 95 AC */ stw r0, RecvDataLeng@sda21(r13) +/* 800AE828 000AB768 7F E3 FB 78 */ mr r3, r31 +/* 800AE82C 000AB76C 98 0D 95 B4 */ stb r0, EXIInputFlag@sda21(r13) +/* 800AE830 000AB770 4B FE 19 C5 */ bl OSRestoreInterrupts +/* 800AE834 000AB774 80 01 00 24 */ lwz r0, 0x24(r1) +/* 800AE838 000AB778 38 60 00 00 */ li r3, 0 +/* 800AE83C 000AB77C 83 E1 00 1C */ lwz r31, 0x1c(r1) +/* 800AE840 000AB780 83 C1 00 18 */ lwz r30, 0x18(r1) +/* 800AE844 000AB784 83 A1 00 14 */ lwz r29, 0x14(r1) +/* 800AE848 000AB788 38 21 00 20 */ addi r1, r1, 0x20 +/* 800AE84C 000AB78C 7C 08 03 A6 */ mtlr r0 +/* 800AE850 000AB790 4E 80 00 20 */ blr + +.global DBQueryData +DBQueryData: +/* 800AE854 000AB794 7C 08 02 A6 */ mflr r0 +/* 800AE858 000AB798 38 60 00 00 */ li r3, 0 +/* 800AE85C 000AB79C 90 01 00 04 */ stw r0, 4(r1) +/* 800AE860 000AB7A0 94 21 FF E8 */ stwu r1, -0x18(r1) +/* 800AE864 000AB7A4 93 E1 00 14 */ stw r31, 0x14(r1) +/* 800AE868 000AB7A8 80 0D 95 AC */ lwz r0, RecvDataLeng@sda21(r13) +/* 800AE86C 000AB7AC 98 6D 95 B4 */ stb r3, EXIInputFlag@sda21(r13) +/* 800AE870 000AB7B0 2C 00 00 00 */ cmpwi r0, 0 +/* 800AE874 000AB7B4 40 82 00 64 */ bne lbl_800AE8D8 +/* 800AE878 000AB7B8 4B FE 19 55 */ bl OSDisableInterrupts +/* 800AE87C 000AB7BC 3B E3 00 00 */ addi r31, r3, 0 +/* 800AE880 000AB7C0 38 61 00 08 */ addi r3, r1, 8 +/* 800AE884 000AB7C4 48 00 01 B5 */ bl DBGReadStatus +/* 800AE888 000AB7C8 80 01 00 08 */ lwz r0, 8(r1) +/* 800AE88C 000AB7CC 54 00 07 FF */ clrlwi. r0, r0, 0x1f +/* 800AE890 000AB7D0 41 82 00 40 */ beq lbl_800AE8D0 +/* 800AE894 000AB7D4 38 61 00 08 */ addi r3, r1, 8 +/* 800AE898 000AB7D8 48 00 04 05 */ bl DBGReadMailbox +/* 800AE89C 000AB7DC 80 01 00 08 */ lwz r0, 8(r1) +/* 800AE8A0 000AB7E0 54 00 00 FE */ clrlwi r0, r0, 3 +/* 800AE8A4 000AB7E4 90 01 00 08 */ stw r0, 8(r1) +/* 800AE8A8 000AB7E8 80 81 00 08 */ lwz r4, 8(r1) +/* 800AE8AC 000AB7EC 54 83 00 CE */ rlwinm r3, r4, 0, 3, 7 +/* 800AE8B0 000AB7F0 3C 03 E1 00 */ addis r0, r3, 0xe100 +/* 800AE8B4 000AB7F4 28 00 00 00 */ cmplwi r0, 0 +/* 800AE8B8 000AB7F8 40 82 00 18 */ bne lbl_800AE8D0 +/* 800AE8BC 000AB7FC 54 83 04 7E */ clrlwi r3, r4, 0x11 +/* 800AE8C0 000AB800 90 8D 95 A8 */ stw r4, SendMailData@sda21(r13) +/* 800AE8C4 000AB804 38 00 00 01 */ li r0, 1 +/* 800AE8C8 000AB808 90 6D 95 AC */ stw r3, RecvDataLeng@sda21(r13) +/* 800AE8CC 000AB80C 98 0D 95 B4 */ stb r0, EXIInputFlag@sda21(r13) +lbl_800AE8D0: +/* 800AE8D0 000AB810 7F E3 FB 78 */ mr r3, r31 +/* 800AE8D4 000AB814 4B FE 19 21 */ bl OSRestoreInterrupts +lbl_800AE8D8: +/* 800AE8D8 000AB818 80 6D 95 AC */ lwz r3, RecvDataLeng@sda21(r13) +/* 800AE8DC 000AB81C 80 01 00 1C */ lwz r0, 0x1c(r1) +/* 800AE8E0 000AB820 83 E1 00 14 */ lwz r31, 0x14(r1) +/* 800AE8E4 000AB824 38 21 00 18 */ addi r1, r1, 0x18 +/* 800AE8E8 000AB828 7C 08 03 A6 */ mtlr r0 +/* 800AE8EC 000AB82C 4E 80 00 20 */ blr + +.global DBInitInterrupts +DBInitInterrupts: +/* 800AE8F0 000AB830 7C 08 02 A6 */ mflr r0 +/* 800AE8F4 000AB834 3C 60 00 02 */ lis r3, 0x00018000@ha +/* 800AE8F8 000AB838 90 01 00 04 */ stw r0, 4(r1) +/* 800AE8FC 000AB83C 38 63 80 00 */ addi r3, r3, 0x00018000@l +/* 800AE900 000AB840 94 21 FF F8 */ stwu r1, -8(r1) +/* 800AE904 000AB844 4B FE 1C 91 */ bl __OSMaskInterrupts +/* 800AE908 000AB848 38 60 00 40 */ li r3, 0x40 +/* 800AE90C 000AB84C 4B FE 1C 89 */ bl __OSMaskInterrupts +/* 800AE910 000AB850 3C 60 80 0B */ lis r3, MWCallback@ha +/* 800AE914 000AB854 38 03 E9 FC */ addi r0, r3, MWCallback@l +/* 800AE918 000AB858 3C 60 80 0B */ lis r3, DBGHandler@ha +/* 800AE91C 000AB85C 90 0D 95 A4 */ stw r0, DBGCallback@sda21(r13) +/* 800AE920 000AB860 38 83 E9 BC */ addi r4, r3, DBGHandler@l +/* 800AE924 000AB864 38 60 00 19 */ li r3, 0x19 +/* 800AE928 000AB868 4B FE 18 F1 */ bl __OSSetInterruptHandler +/* 800AE92C 000AB86C 38 60 00 40 */ li r3, 0x40 +/* 800AE930 000AB870 4B FE 1C ED */ bl __OSUnmaskInterrupts +/* 800AE934 000AB874 80 01 00 0C */ lwz r0, 0xc(r1) +/* 800AE938 000AB878 38 21 00 08 */ addi r1, r1, 8 +/* 800AE93C 000AB87C 7C 08 03 A6 */ mtlr r0 +/* 800AE940 000AB880 4E 80 00 20 */ blr + +.global DBInitComm +DBInitComm: +/* 800AE944 000AB884 7C 08 02 A6 */ mflr r0 +/* 800AE948 000AB888 90 01 00 04 */ stw r0, 4(r1) +/* 800AE94C 000AB88C 94 21 FF E0 */ stwu r1, -0x20(r1) +/* 800AE950 000AB890 93 E1 00 1C */ stw r31, 0x1c(r1) +/* 800AE954 000AB894 93 C1 00 18 */ stw r30, 0x18(r1) +/* 800AE958 000AB898 3B C4 00 00 */ addi r30, r4, 0 +/* 800AE95C 000AB89C 93 A1 00 14 */ stw r29, 0x14(r1) +/* 800AE960 000AB8A0 3B A3 00 00 */ addi r29, r3, 0 +/* 800AE964 000AB8A4 4B FE 18 69 */ bl OSDisableInterrupts +/* 800AE968 000AB8A8 38 0D 95 B4 */ addi r0, r13, EXIInputFlag@sda21 +/* 800AE96C 000AB8AC 90 0D 95 B0 */ stw r0, pEXIInputFlag@sda21(r13) +/* 800AE970 000AB8B0 3C 80 00 02 */ lis r4, 0x00018000@ha +/* 800AE974 000AB8B4 3B E3 00 00 */ addi r31, r3, 0 +/* 800AE978 000AB8B8 80 0D 95 B0 */ lwz r0, pEXIInputFlag@sda21(r13) +/* 800AE97C 000AB8BC 38 64 80 00 */ addi r3, r4, 0x00018000@l +/* 800AE980 000AB8C0 90 1D 00 00 */ stw r0, 0(r29) +/* 800AE984 000AB8C4 93 CD 95 A0 */ stw r30, MTRCallback@sda21(r13) +/* 800AE988 000AB8C8 4B FE 1C 0D */ bl __OSMaskInterrupts +/* 800AE98C 000AB8CC 3C 60 CC 00 */ lis r3, 0xCC006828@ha +/* 800AE990 000AB8D0 38 00 00 00 */ li r0, 0 +/* 800AE994 000AB8D4 90 03 68 28 */ stw r0, 0xCC006828@l(r3) +/* 800AE998 000AB8D8 7F E3 FB 78 */ mr r3, r31 +/* 800AE99C 000AB8DC 4B FE 18 59 */ bl OSRestoreInterrupts +/* 800AE9A0 000AB8E0 80 01 00 24 */ lwz r0, 0x24(r1) +/* 800AE9A4 000AB8E4 83 E1 00 1C */ lwz r31, 0x1c(r1) +/* 800AE9A8 000AB8E8 83 C1 00 18 */ lwz r30, 0x18(r1) +/* 800AE9AC 000AB8EC 83 A1 00 14 */ lwz r29, 0x14(r1) +/* 800AE9B0 000AB8F0 38 21 00 20 */ addi r1, r1, 0x20 +/* 800AE9B4 000AB8F4 7C 08 03 A6 */ mtlr r0 +/* 800AE9B8 000AB8F8 4E 80 00 20 */ blr + +.global DBGHandler +DBGHandler: +/* 800AE9BC 000AB8FC 7C 08 02 A6 */ mflr r0 +/* 800AE9C0 000AB900 3C A0 CC 00 */ lis r5, 0xCC003000@ha +/* 800AE9C4 000AB904 90 01 00 04 */ stw r0, 4(r1) +/* 800AE9C8 000AB908 38 00 10 00 */ li r0, 0x1000 +/* 800AE9CC 000AB90C 94 21 FF F8 */ stwu r1, -8(r1) +/* 800AE9D0 000AB910 81 8D 95 A4 */ lwz r12, DBGCallback@sda21(r13) +/* 800AE9D4 000AB914 90 05 30 00 */ stw r0, 0xCC003000@l(r5) +/* 800AE9D8 000AB918 28 0C 00 00 */ cmplwi r12, 0 +/* 800AE9DC 000AB91C 41 82 00 10 */ beq lbl_800AE9EC +/* 800AE9E0 000AB920 7D 88 03 A6 */ mtlr r12 +/* 800AE9E4 000AB924 7C 63 07 34 */ extsh r3, r3 +/* 800AE9E8 000AB928 4E 80 00 21 */ blrl +lbl_800AE9EC: +/* 800AE9EC 000AB92C 80 01 00 0C */ lwz r0, 0xc(r1) +/* 800AE9F0 000AB930 38 21 00 08 */ addi r1, r1, 8 +/* 800AE9F4 000AB934 7C 08 03 A6 */ mtlr r0 +/* 800AE9F8 000AB938 4E 80 00 20 */ blr + +.global MWCallback +MWCallback: +/* 800AE9FC 000AB93C 7C 08 02 A6 */ mflr r0 +/* 800AEA00 000AB940 90 01 00 04 */ stw r0, 4(r1) +/* 800AEA04 000AB944 38 00 00 01 */ li r0, 1 +/* 800AEA08 000AB948 94 21 FF F8 */ stwu r1, -8(r1) +/* 800AEA0C 000AB94C 81 8D 95 A0 */ lwz r12, MTRCallback@sda21(r13) +/* 800AEA10 000AB950 98 0D 95 B4 */ stb r0, EXIInputFlag@sda21(r13) +/* 800AEA14 000AB954 28 0C 00 00 */ cmplwi r12, 0 +/* 800AEA18 000AB958 41 82 00 10 */ beq lbl_800AEA28 +/* 800AEA1C 000AB95C 7D 88 03 A6 */ mtlr r12 +/* 800AEA20 000AB960 38 60 00 00 */ li r3, 0 +/* 800AEA24 000AB964 4E 80 00 21 */ blrl +lbl_800AEA28: +/* 800AEA28 000AB968 80 01 00 0C */ lwz r0, 0xc(r1) +/* 800AEA2C 000AB96C 38 21 00 08 */ addi r1, r1, 8 +/* 800AEA30 000AB970 7C 08 03 A6 */ mtlr r0 +/* 800AEA34 000AB974 4E 80 00 20 */ blr + +.global DBGReadStatus +DBGReadStatus: +/* 800AEA38 000AB978 7C 08 02 A6 */ mflr r0 +/* 800AEA3C 000AB97C 38 80 00 02 */ li r4, 2 +/* 800AEA40 000AB980 90 01 00 04 */ stw r0, 4(r1) +/* 800AEA44 000AB984 3C 00 40 00 */ lis r0, 0x4000 +/* 800AEA48 000AB988 94 21 FF C8 */ stwu r1, -0x38(r1) +/* 800AEA4C 000AB98C BF 61 00 24 */ stmw r27, 0x24(r1) +/* 800AEA50 000AB990 3F C0 CC 00 */ lis r30, 0xCC006800@ha +/* 800AEA54 000AB994 3B 63 00 00 */ addi r27, r3, 0 +/* 800AEA58 000AB998 3B BE 68 00 */ addi r29, r30, 0xCC006800@l +/* 800AEA5C 000AB99C 38 61 00 18 */ addi r3, r1, 0x18 +/* 800AEA60 000AB9A0 80 BE 68 28 */ lwz r5, 0x6828(r30) +/* 800AEA64 000AB9A4 70 A5 04 05 */ andi. r5, r5, 0x405 +/* 800AEA68 000AB9A8 60 A5 00 C0 */ ori r5, r5, 0xc0 +/* 800AEA6C 000AB9AC 94 BD 00 28 */ stwu r5, 0x28(r29) +/* 800AEA70 000AB9B0 38 A0 00 01 */ li r5, 1 +/* 800AEA74 000AB9B4 90 01 00 18 */ stw r0, 0x18(r1) +/* 800AEA78 000AB9B8 48 00 02 D1 */ bl DBGEXIImm +/* 800AEA7C 000AB9BC 7C 60 00 34 */ cntlzw r0, r3 +/* 800AEA80 000AB9C0 54 1F D9 7E */ srwi r31, r0, 5 +lbl_800AEA84: +/* 800AEA84 000AB9C4 3B 9E 68 00 */ addi r28, r30, 0x6800 +/* 800AEA88 000AB9C8 84 1C 00 34 */ lwzu r0, 0x34(r28) +/* 800AEA8C 000AB9CC 54 00 07 FF */ clrlwi. r0, r0, 0x1f +/* 800AEA90 000AB9D0 40 82 FF F4 */ bne lbl_800AEA84 +/* 800AEA94 000AB9D4 38 7B 00 00 */ addi r3, r27, 0 +/* 800AEA98 000AB9D8 38 80 00 04 */ li r4, 4 +/* 800AEA9C 000AB9DC 38 A0 00 00 */ li r5, 0 +/* 800AEAA0 000AB9E0 48 00 02 A9 */ bl DBGEXIImm +/* 800AEAA4 000AB9E4 7C 60 00 34 */ cntlzw r0, r3 +/* 800AEAA8 000AB9E8 54 00 D9 7E */ srwi r0, r0, 5 +/* 800AEAAC 000AB9EC 7F E3 03 78 */ or r3, r31, r0 +lbl_800AEAB0: +/* 800AEAB0 000AB9F0 80 1C 00 00 */ lwz r0, 0(r28) +/* 800AEAB4 000AB9F4 54 00 07 FF */ clrlwi. r0, r0, 0x1f +/* 800AEAB8 000AB9F8 40 82 FF F8 */ bne lbl_800AEAB0 +/* 800AEABC 000AB9FC 80 9D 00 00 */ lwz r4, 0(r29) +/* 800AEAC0 000ABA00 7C 60 00 34 */ cntlzw r0, r3 +/* 800AEAC4 000ABA04 54 03 D9 7E */ srwi r3, r0, 5 +/* 800AEAC8 000ABA08 70 80 04 05 */ andi. r0, r4, 0x405 +/* 800AEACC 000ABA0C 90 1D 00 00 */ stw r0, 0(r29) +/* 800AEAD0 000ABA10 BB 61 00 24 */ lmw r27, 0x24(r1) +/* 800AEAD4 000ABA14 80 01 00 3C */ lwz r0, 0x3c(r1) +/* 800AEAD8 000ABA18 38 21 00 38 */ addi r1, r1, 0x38 +/* 800AEADC 000ABA1C 7C 08 03 A6 */ mtlr r0 +/* 800AEAE0 000ABA20 4E 80 00 20 */ blr + +.global DBGWrite +DBGWrite: +/* 800AEAE4 000ABA24 7C 08 02 A6 */ mflr r0 +/* 800AEAE8 000ABA28 90 01 00 04 */ stw r0, 4(r1) +/* 800AEAEC 000ABA2C 54 60 41 EA */ rlwinm r0, r3, 8, 7, 0x15 +/* 800AEAF0 000ABA30 64 00 A0 00 */ oris r0, r0, 0xa000 +/* 800AEAF4 000ABA34 94 21 FF C0 */ stwu r1, -0x40(r1) +/* 800AEAF8 000ABA38 BF 41 00 28 */ stmw r26, 0x28(r1) +/* 800AEAFC 000ABA3C 3F A0 CC 00 */ lis r29, 0xCC006800@ha +/* 800AEB00 000ABA40 3B C5 00 00 */ addi r30, r5, 0 +/* 800AEB04 000ABA44 3B 44 00 00 */ addi r26, r4, 0 +/* 800AEB08 000ABA48 3B FD 68 00 */ addi r31, r29, 0xCC006800@l +/* 800AEB0C 000ABA4C 38 61 00 24 */ addi r3, r1, 0x24 +/* 800AEB10 000ABA50 38 80 00 04 */ li r4, 4 +/* 800AEB14 000ABA54 38 A0 00 01 */ li r5, 1 +/* 800AEB18 000ABA58 80 DD 68 28 */ lwz r6, 0x6828(r29) +/* 800AEB1C 000ABA5C 70 C6 04 05 */ andi. r6, r6, 0x405 +/* 800AEB20 000ABA60 60 C6 00 C0 */ ori r6, r6, 0xc0 +/* 800AEB24 000ABA64 94 DF 00 28 */ stwu r6, 0x28(r31) +/* 800AEB28 000ABA68 90 01 00 24 */ stw r0, 0x24(r1) +/* 800AEB2C 000ABA6C 48 00 02 1D */ bl DBGEXIImm +/* 800AEB30 000ABA70 7C 60 00 34 */ cntlzw r0, r3 +/* 800AEB34 000ABA74 54 00 D9 7E */ srwi r0, r0, 5 +/* 800AEB38 000ABA78 7C 1B 03 78 */ mr r27, r0 +lbl_800AEB3C: +/* 800AEB3C 000ABA7C 3B 9D 68 00 */ addi r28, r29, 0x6800 +/* 800AEB40 000ABA80 84 1C 00 34 */ lwzu r0, 0x34(r28) +/* 800AEB44 000ABA84 54 00 07 FF */ clrlwi. r0, r0, 0x1f +/* 800AEB48 000ABA88 40 82 FF F4 */ bne lbl_800AEB3C +/* 800AEB4C 000ABA8C 48 00 00 44 */ b lbl_800AEB90 +lbl_800AEB50: +/* 800AEB50 000ABA90 80 1A 00 00 */ lwz r0, 0(r26) +/* 800AEB54 000ABA94 38 61 00 20 */ addi r3, r1, 0x20 +/* 800AEB58 000ABA98 38 80 00 04 */ li r4, 4 +/* 800AEB5C 000ABA9C 90 01 00 20 */ stw r0, 0x20(r1) +/* 800AEB60 000ABAA0 38 A0 00 01 */ li r5, 1 +/* 800AEB64 000ABAA4 3B 5A 00 04 */ addi r26, r26, 4 +/* 800AEB68 000ABAA8 48 00 01 E1 */ bl DBGEXIImm +/* 800AEB6C 000ABAAC 7C 60 00 34 */ cntlzw r0, r3 +/* 800AEB70 000ABAB0 54 00 D9 7E */ srwi r0, r0, 5 +/* 800AEB74 000ABAB4 7F 7B 03 78 */ or r27, r27, r0 +lbl_800AEB78: +/* 800AEB78 000ABAB8 80 1C 00 00 */ lwz r0, 0(r28) +/* 800AEB7C 000ABABC 54 00 07 FF */ clrlwi. r0, r0, 0x1f +/* 800AEB80 000ABAC0 40 82 FF F8 */ bne lbl_800AEB78 +/* 800AEB84 000ABAC4 37 DE FF FC */ addic. r30, r30, -4 +/* 800AEB88 000ABAC8 40 80 00 08 */ bge lbl_800AEB90 +/* 800AEB8C 000ABACC 3B C0 00 00 */ li r30, 0 +lbl_800AEB90: +/* 800AEB90 000ABAD0 2C 1E 00 00 */ cmpwi r30, 0 +/* 800AEB94 000ABAD4 40 82 FF BC */ bne lbl_800AEB50 +/* 800AEB98 000ABAD8 80 9F 00 00 */ lwz r4, 0(r31) +/* 800AEB9C 000ABADC 7F 60 00 34 */ cntlzw r0, r27 +/* 800AEBA0 000ABAE0 54 03 D9 7E */ srwi r3, r0, 5 +/* 800AEBA4 000ABAE4 70 80 04 05 */ andi. r0, r4, 0x405 +/* 800AEBA8 000ABAE8 90 1F 00 00 */ stw r0, 0(r31) +/* 800AEBAC 000ABAEC BB 41 00 28 */ lmw r26, 0x28(r1) +/* 800AEBB0 000ABAF0 80 01 00 44 */ lwz r0, 0x44(r1) +/* 800AEBB4 000ABAF4 38 21 00 40 */ addi r1, r1, 0x40 +/* 800AEBB8 000ABAF8 7C 08 03 A6 */ mtlr r0 +/* 800AEBBC 000ABAFC 4E 80 00 20 */ blr + +.global DBGRead +DBGRead: +/* 800AEBC0 000ABB00 7C 08 02 A6 */ mflr r0 +/* 800AEBC4 000ABB04 90 01 00 04 */ stw r0, 4(r1) +/* 800AEBC8 000ABB08 54 60 41 EA */ rlwinm r0, r3, 8, 7, 0x15 +/* 800AEBCC 000ABB0C 64 00 20 00 */ oris r0, r0, 0x2000 +/* 800AEBD0 000ABB10 94 21 FF C0 */ stwu r1, -0x40(r1) +/* 800AEBD4 000ABB14 BF 41 00 28 */ stmw r26, 0x28(r1) +/* 800AEBD8 000ABB18 3F A0 CC 00 */ lis r29, 0xCC006800@ha +/* 800AEBDC 000ABB1C 3B C5 00 00 */ addi r30, r5, 0 +/* 800AEBE0 000ABB20 3B 44 00 00 */ addi r26, r4, 0 +/* 800AEBE4 000ABB24 3B FD 68 00 */ addi r31, r29, 0xCC006800@l +/* 800AEBE8 000ABB28 38 61 00 24 */ addi r3, r1, 0x24 +/* 800AEBEC 000ABB2C 38 80 00 04 */ li r4, 4 +/* 800AEBF0 000ABB30 38 A0 00 01 */ li r5, 1 +/* 800AEBF4 000ABB34 80 DD 68 28 */ lwz r6, 0x6828(r29) +/* 800AEBF8 000ABB38 70 C6 04 05 */ andi. r6, r6, 0x405 +/* 800AEBFC 000ABB3C 60 C6 00 C0 */ ori r6, r6, 0xc0 +/* 800AEC00 000ABB40 94 DF 00 28 */ stwu r6, 0x28(r31) +/* 800AEC04 000ABB44 90 01 00 24 */ stw r0, 0x24(r1) +/* 800AEC08 000ABB48 48 00 01 41 */ bl DBGEXIImm +/* 800AEC0C 000ABB4C 7C 60 00 34 */ cntlzw r0, r3 +/* 800AEC10 000ABB50 54 00 D9 7E */ srwi r0, r0, 5 +/* 800AEC14 000ABB54 7C 1B 03 78 */ mr r27, r0 +lbl_800AEC18: +/* 800AEC18 000ABB58 3B 9D 68 00 */ addi r28, r29, 0x6800 +/* 800AEC1C 000ABB5C 84 1C 00 34 */ lwzu r0, 0x34(r28) +/* 800AEC20 000ABB60 54 00 07 FF */ clrlwi. r0, r0, 0x1f +/* 800AEC24 000ABB64 40 82 FF F4 */ bne lbl_800AEC18 +/* 800AEC28 000ABB68 48 00 00 44 */ b lbl_800AEC6C +lbl_800AEC2C: +/* 800AEC2C 000ABB6C 38 61 00 20 */ addi r3, r1, 0x20 +/* 800AEC30 000ABB70 38 80 00 04 */ li r4, 4 +/* 800AEC34 000ABB74 38 A0 00 00 */ li r5, 0 +/* 800AEC38 000ABB78 48 00 01 11 */ bl DBGEXIImm +/* 800AEC3C 000ABB7C 7C 60 00 34 */ cntlzw r0, r3 +/* 800AEC40 000ABB80 54 00 D9 7E */ srwi r0, r0, 5 +/* 800AEC44 000ABB84 7F 7B 03 78 */ or r27, r27, r0 +lbl_800AEC48: +/* 800AEC48 000ABB88 80 1C 00 00 */ lwz r0, 0(r28) +/* 800AEC4C 000ABB8C 54 00 07 FF */ clrlwi. r0, r0, 0x1f +/* 800AEC50 000ABB90 40 82 FF F8 */ bne lbl_800AEC48 +/* 800AEC54 000ABB94 80 01 00 20 */ lwz r0, 0x20(r1) +/* 800AEC58 000ABB98 37 DE FF FC */ addic. r30, r30, -4 +/* 800AEC5C 000ABB9C 90 1A 00 00 */ stw r0, 0(r26) +/* 800AEC60 000ABBA0 3B 5A 00 04 */ addi r26, r26, 4 +/* 800AEC64 000ABBA4 40 80 00 08 */ bge lbl_800AEC6C +/* 800AEC68 000ABBA8 3B C0 00 00 */ li r30, 0 +lbl_800AEC6C: +/* 800AEC6C 000ABBAC 2C 1E 00 00 */ cmpwi r30, 0 +/* 800AEC70 000ABBB0 40 82 FF BC */ bne lbl_800AEC2C +/* 800AEC74 000ABBB4 80 9F 00 00 */ lwz r4, 0(r31) +/* 800AEC78 000ABBB8 7F 60 00 34 */ cntlzw r0, r27 +/* 800AEC7C 000ABBBC 54 03 D9 7E */ srwi r3, r0, 5 +/* 800AEC80 000ABBC0 70 80 04 05 */ andi. r0, r4, 0x405 +/* 800AEC84 000ABBC4 90 1F 00 00 */ stw r0, 0(r31) +/* 800AEC88 000ABBC8 BB 41 00 28 */ lmw r26, 0x28(r1) +/* 800AEC8C 000ABBCC 80 01 00 44 */ lwz r0, 0x44(r1) +/* 800AEC90 000ABBD0 38 21 00 40 */ addi r1, r1, 0x40 +/* 800AEC94 000ABBD4 7C 08 03 A6 */ mtlr r0 +/* 800AEC98 000ABBD8 4E 80 00 20 */ blr + +.global DBGReadMailbox +DBGReadMailbox: +/* 800AEC9C 000ABBDC 7C 08 02 A6 */ mflr r0 +/* 800AECA0 000ABBE0 38 80 00 02 */ li r4, 2 +/* 800AECA4 000ABBE4 90 01 00 04 */ stw r0, 4(r1) +/* 800AECA8 000ABBE8 3C 00 60 00 */ lis r0, 0x6000 +/* 800AECAC 000ABBEC 94 21 FF C8 */ stwu r1, -0x38(r1) +/* 800AECB0 000ABBF0 BF 61 00 24 */ stmw r27, 0x24(r1) +/* 800AECB4 000ABBF4 3F C0 CC 00 */ lis r30, 0xCC006800@ha +/* 800AECB8 000ABBF8 3B 63 00 00 */ addi r27, r3, 0 +/* 800AECBC 000ABBFC 3B BE 68 00 */ addi r29, r30, 0xCC006800@l +/* 800AECC0 000ABC00 38 61 00 18 */ addi r3, r1, 0x18 +/* 800AECC4 000ABC04 80 BE 68 28 */ lwz r5, 0x6828(r30) +/* 800AECC8 000ABC08 70 A5 04 05 */ andi. r5, r5, 0x405 +/* 800AECCC 000ABC0C 60 A5 00 C0 */ ori r5, r5, 0xc0 +/* 800AECD0 000ABC10 94 BD 00 28 */ stwu r5, 0x28(r29) +/* 800AECD4 000ABC14 38 A0 00 01 */ li r5, 1 +/* 800AECD8 000ABC18 90 01 00 18 */ stw r0, 0x18(r1) +/* 800AECDC 000ABC1C 48 00 00 6D */ bl DBGEXIImm +/* 800AECE0 000ABC20 7C 60 00 34 */ cntlzw r0, r3 +/* 800AECE4 000ABC24 54 1F D9 7E */ srwi r31, r0, 5 +lbl_800AECE8: +/* 800AECE8 000ABC28 3B 9E 68 00 */ addi r28, r30, 0x6800 +/* 800AECEC 000ABC2C 84 1C 00 34 */ lwzu r0, 0x34(r28) +/* 800AECF0 000ABC30 54 00 07 FF */ clrlwi. r0, r0, 0x1f +/* 800AECF4 000ABC34 40 82 FF F4 */ bne lbl_800AECE8 +/* 800AECF8 000ABC38 38 7B 00 00 */ addi r3, r27, 0 +/* 800AECFC 000ABC3C 38 80 00 04 */ li r4, 4 +/* 800AED00 000ABC40 38 A0 00 00 */ li r5, 0 +/* 800AED04 000ABC44 48 00 00 45 */ bl DBGEXIImm +/* 800AED08 000ABC48 7C 60 00 34 */ cntlzw r0, r3 +/* 800AED0C 000ABC4C 54 00 D9 7E */ srwi r0, r0, 5 +/* 800AED10 000ABC50 7F E3 03 78 */ or r3, r31, r0 +lbl_800AED14: +/* 800AED14 000ABC54 80 1C 00 00 */ lwz r0, 0(r28) +/* 800AED18 000ABC58 54 00 07 FF */ clrlwi. r0, r0, 0x1f +/* 800AED1C 000ABC5C 40 82 FF F8 */ bne lbl_800AED14 +/* 800AED20 000ABC60 80 9D 00 00 */ lwz r4, 0(r29) +/* 800AED24 000ABC64 7C 60 00 34 */ cntlzw r0, r3 +/* 800AED28 000ABC68 54 03 D9 7E */ srwi r3, r0, 5 +/* 800AED2C 000ABC6C 70 80 04 05 */ andi. r0, r4, 0x405 +/* 800AED30 000ABC70 90 1D 00 00 */ stw r0, 0(r29) +/* 800AED34 000ABC74 BB 61 00 24 */ lmw r27, 0x24(r1) +/* 800AED38 000ABC78 80 01 00 3C */ lwz r0, 0x3c(r1) +/* 800AED3C 000ABC7C 38 21 00 38 */ addi r1, r1, 0x38 +/* 800AED40 000ABC80 7C 08 03 A6 */ mtlr r0 +/* 800AED44 000ABC84 4E 80 00 20 */ blr + +.global DBGEXIImm +DBGEXIImm: +/* 800AED48 000ABC88 94 21 FF B8 */ stwu r1, -0x48(r1) +/* 800AED4C 000ABC8C 28 05 00 00 */ cmplwi r5, 0 +/* 800AED50 000ABC90 BE C1 00 20 */ stmw r22, 0x20(r1) +/* 800AED54 000ABC94 41 82 01 38 */ beq lbl_800AEE8C +/* 800AED58 000ABC98 3B A0 00 00 */ li r29, 0 +/* 800AED5C 000ABC9C 7C 1D 20 00 */ cmpw r29, r4 +/* 800AED60 000ABCA0 3B C0 00 00 */ li r30, 0 +/* 800AED64 000ABCA4 40 80 01 20 */ bge lbl_800AEE84 +/* 800AED68 000ABCA8 2C 04 00 08 */ cmpwi r4, 8 +/* 800AED6C 000ABCAC 38 C4 FF F8 */ addi r6, r4, -8 +/* 800AED70 000ABCB0 40 81 02 5C */ ble lbl_800AEFCC +/* 800AED74 000ABCB4 38 06 00 07 */ addi r0, r6, 7 +/* 800AED78 000ABCB8 54 00 E8 FE */ srwi r0, r0, 3 +/* 800AED7C 000ABCBC 2C 06 00 00 */ cmpwi r6, 0 +/* 800AED80 000ABCC0 7C 09 03 A6 */ mtctr r0 +/* 800AED84 000ABCC4 3B E3 00 00 */ addi r31, r3, 0 +/* 800AED88 000ABCC8 40 81 02 44 */ ble lbl_800AEFCC +lbl_800AED8C: +/* 800AED8C 000ABCCC 20 DD 00 03 */ subfic r6, r29, 3 +/* 800AED90 000ABCD0 89 9F 00 00 */ lbz r12, 0(r31) +/* 800AED94 000ABCD4 38 1D 00 01 */ addi r0, r29, 1 +/* 800AED98 000ABCD8 89 7F 00 01 */ lbz r11, 1(r31) +/* 800AED9C 000ABCDC 54 CA 18 38 */ slwi r10, r6, 3 +/* 800AEDA0 000ABCE0 89 3F 00 02 */ lbz r9, 2(r31) +/* 800AEDA4 000ABCE4 21 00 00 03 */ subfic r8, r0, 3 +/* 800AEDA8 000ABCE8 88 FF 00 03 */ lbz r7, 3(r31) +/* 800AEDAC 000ABCEC 38 DD 00 02 */ addi r6, r29, 2 +/* 800AEDB0 000ABCF0 88 1F 00 04 */ lbz r0, 4(r31) +/* 800AEDB4 000ABCF4 7D 8C 50 30 */ slw r12, r12, r10 +/* 800AEDB8 000ABCF8 8A FF 00 05 */ lbz r23, 5(r31) +/* 800AEDBC 000ABCFC 55 0A 18 38 */ slwi r10, r8, 3 +/* 800AEDC0 000ABD00 8B 3F 00 06 */ lbz r25, 6(r31) +/* 800AEDC4 000ABD04 20 C6 00 03 */ subfic r6, r6, 3 +/* 800AEDC8 000ABD08 8B 7F 00 07 */ lbz r27, 7(r31) +/* 800AEDCC 000ABD0C 54 C8 18 38 */ slwi r8, r6, 3 +/* 800AEDD0 000ABD10 7C DD 00 D0 */ neg r6, r29 +/* 800AEDD4 000ABD14 3A DD 00 04 */ addi r22, r29, 4 +/* 800AEDD8 000ABD18 54 C6 18 38 */ slwi r6, r6, 3 +/* 800AEDDC 000ABD1C 22 D6 00 03 */ subfic r22, r22, 3 +/* 800AEDE0 000ABD20 3B 1D 00 05 */ addi r24, r29, 5 +/* 800AEDE4 000ABD24 56 D6 18 38 */ slwi r22, r22, 3 +/* 800AEDE8 000ABD28 23 18 00 03 */ subfic r24, r24, 3 +/* 800AEDEC 000ABD2C 3B 5D 00 06 */ addi r26, r29, 6 +/* 800AEDF0 000ABD30 57 18 18 38 */ slwi r24, r24, 3 +/* 800AEDF4 000ABD34 23 5A 00 03 */ subfic r26, r26, 3 +/* 800AEDF8 000ABD38 3B 9D 00 07 */ addi r28, r29, 7 +/* 800AEDFC 000ABD3C 57 5A 18 38 */ slwi r26, r26, 3 +/* 800AEE00 000ABD40 23 9C 00 03 */ subfic r28, r28, 3 +/* 800AEE04 000ABD44 57 9C 18 38 */ slwi r28, r28, 3 +/* 800AEE08 000ABD48 7F DE 63 78 */ or r30, r30, r12 +/* 800AEE0C 000ABD4C 7D 6A 50 30 */ slw r10, r11, r10 +/* 800AEE10 000ABD50 7F DE 53 78 */ or r30, r30, r10 +/* 800AEE14 000ABD54 7D 28 40 30 */ slw r8, r9, r8 +/* 800AEE18 000ABD58 7F DE 43 78 */ or r30, r30, r8 +/* 800AEE1C 000ABD5C 7C E6 30 30 */ slw r6, r7, r6 +/* 800AEE20 000ABD60 7F DE 33 78 */ or r30, r30, r6 +/* 800AEE24 000ABD64 7C 00 B0 30 */ slw r0, r0, r22 +/* 800AEE28 000ABD68 7F DE 03 78 */ or r30, r30, r0 +/* 800AEE2C 000ABD6C 7E E0 C0 30 */ slw r0, r23, r24 +/* 800AEE30 000ABD70 7F DE 03 78 */ or r30, r30, r0 +/* 800AEE34 000ABD74 7F 20 D0 30 */ slw r0, r25, r26 +/* 800AEE38 000ABD78 7F DE 03 78 */ or r30, r30, r0 +/* 800AEE3C 000ABD7C 7F 60 E0 30 */ slw r0, r27, r28 +/* 800AEE40 000ABD80 7F DE 03 78 */ or r30, r30, r0 +/* 800AEE44 000ABD84 3B FF 00 08 */ addi r31, r31, 8 +/* 800AEE48 000ABD88 3B BD 00 08 */ addi r29, r29, 8 +/* 800AEE4C 000ABD8C 42 00 FF 40 */ bdnz lbl_800AED8C +/* 800AEE50 000ABD90 48 00 01 7C */ b lbl_800AEFCC +lbl_800AEE54: +/* 800AEE54 000ABD94 7C 1D 20 50 */ subf r0, r29, r4 +/* 800AEE58 000ABD98 7C 1D 20 00 */ cmpw r29, r4 +/* 800AEE5C 000ABD9C 7C 09 03 A6 */ mtctr r0 +/* 800AEE60 000ABDA0 40 80 00 24 */ bge lbl_800AEE84 +lbl_800AEE64: +/* 800AEE64 000ABDA4 20 1D 00 03 */ subfic r0, r29, 3 +/* 800AEE68 000ABDA8 88 C7 00 00 */ lbz r6, 0(r7) +/* 800AEE6C 000ABDAC 54 00 18 38 */ slwi r0, r0, 3 +/* 800AEE70 000ABDB0 7C C0 00 30 */ slw r0, r6, r0 +/* 800AEE74 000ABDB4 7F DE 03 78 */ or r30, r30, r0 +/* 800AEE78 000ABDB8 38 E7 00 01 */ addi r7, r7, 1 +/* 800AEE7C 000ABDBC 3B BD 00 01 */ addi r29, r29, 1 +/* 800AEE80 000ABDC0 42 00 FF E4 */ bdnz lbl_800AEE64 +lbl_800AEE84: +/* 800AEE84 000ABDC4 3C C0 CC 00 */ lis r6, 0xCC006838@ha +/* 800AEE88 000ABDC8 93 C6 68 38 */ stw r30, 0xCC006838@l(r6) +lbl_800AEE8C: +/* 800AEE8C 000ABDCC 38 04 FF FF */ addi r0, r4, -1 +/* 800AEE90 000ABDD0 3C C0 CC 00 */ lis r6, 0xCC006800@ha +/* 800AEE94 000ABDD4 54 A7 10 3A */ slwi r7, r5, 2 +/* 800AEE98 000ABDD8 39 06 68 00 */ addi r8, r6, 0xCC006800@l +/* 800AEE9C 000ABDDC 60 E6 00 01 */ ori r6, r7, 1 +/* 800AEEA0 000ABDE0 54 00 20 36 */ slwi r0, r0, 4 +/* 800AEEA4 000ABDE4 7C C0 03 78 */ or r0, r6, r0 +/* 800AEEA8 000ABDE8 94 08 00 34 */ stwu r0, 0x34(r8) +lbl_800AEEAC: +/* 800AEEAC 000ABDEC 80 08 00 00 */ lwz r0, 0(r8) +/* 800AEEB0 000ABDF0 54 00 07 FF */ clrlwi. r0, r0, 0x1f +/* 800AEEB4 000ABDF4 40 82 FF F8 */ bne lbl_800AEEAC +/* 800AEEB8 000ABDF8 28 05 00 00 */ cmplwi r5, 0 +/* 800AEEBC 000ABDFC 40 82 01 08 */ bne lbl_800AEFC4 +/* 800AEEC0 000ABE00 38 A0 00 00 */ li r5, 0 +/* 800AEEC4 000ABE04 3C C0 CC 00 */ lis r6, 0xCC006838@ha +/* 800AEEC8 000ABE08 7C 05 20 00 */ cmpw r5, r4 +/* 800AEECC 000ABE0C 80 06 68 38 */ lwz r0, 0xCC006838@l(r6) +/* 800AEED0 000ABE10 40 80 00 F4 */ bge lbl_800AEFC4 +/* 800AEED4 000ABE14 2C 04 00 08 */ cmpwi r4, 8 +/* 800AEED8 000ABE18 38 E4 FF F8 */ addi r7, r4, -8 +/* 800AEEDC 000ABE1C 40 81 00 BC */ ble lbl_800AEF98 +/* 800AEEE0 000ABE20 38 C7 00 07 */ addi r6, r7, 7 +/* 800AEEE4 000ABE24 54 C6 E8 FE */ srwi r6, r6, 3 +/* 800AEEE8 000ABE28 2C 07 00 00 */ cmpwi r7, 0 +/* 800AEEEC 000ABE2C 7C C9 03 A6 */ mtctr r6 +/* 800AEEF0 000ABE30 40 81 00 A8 */ ble lbl_800AEF98 +lbl_800AEEF4: +/* 800AEEF4 000ABE34 20 C5 00 03 */ subfic r6, r5, 3 +/* 800AEEF8 000ABE38 54 C7 18 38 */ slwi r7, r6, 3 +/* 800AEEFC 000ABE3C 38 C5 00 01 */ addi r6, r5, 1 +/* 800AEF00 000ABE40 7C 08 3C 30 */ srw r8, r0, r7 +/* 800AEF04 000ABE44 20 C6 00 03 */ subfic r6, r6, 3 +/* 800AEF08 000ABE48 99 03 00 00 */ stb r8, 0(r3) +/* 800AEF0C 000ABE4C 54 C7 18 38 */ slwi r7, r6, 3 +/* 800AEF10 000ABE50 38 C5 00 02 */ addi r6, r5, 2 +/* 800AEF14 000ABE54 7C 0C 3C 30 */ srw r12, r0, r7 +/* 800AEF18 000ABE58 20 C6 00 03 */ subfic r6, r6, 3 +/* 800AEF1C 000ABE5C 99 83 00 01 */ stb r12, 1(r3) +/* 800AEF20 000ABE60 54 C6 18 38 */ slwi r6, r6, 3 +/* 800AEF24 000ABE64 7C 0B 34 30 */ srw r11, r0, r6 +/* 800AEF28 000ABE68 7C C5 00 D0 */ neg r6, r5 +/* 800AEF2C 000ABE6C 99 63 00 02 */ stb r11, 2(r3) +/* 800AEF30 000ABE70 54 C7 18 38 */ slwi r7, r6, 3 +/* 800AEF34 000ABE74 38 C5 00 04 */ addi r6, r5, 4 +/* 800AEF38 000ABE78 7C 0A 3C 30 */ srw r10, r0, r7 +/* 800AEF3C 000ABE7C 20 C6 00 03 */ subfic r6, r6, 3 +/* 800AEF40 000ABE80 99 43 00 03 */ stb r10, 3(r3) +/* 800AEF44 000ABE84 54 C7 18 38 */ slwi r7, r6, 3 +/* 800AEF48 000ABE88 38 C5 00 05 */ addi r6, r5, 5 +/* 800AEF4C 000ABE8C 7C 09 3C 30 */ srw r9, r0, r7 +/* 800AEF50 000ABE90 20 C6 00 03 */ subfic r6, r6, 3 +/* 800AEF54 000ABE94 99 23 00 04 */ stb r9, 4(r3) +/* 800AEF58 000ABE98 54 C7 18 38 */ slwi r7, r6, 3 +/* 800AEF5C 000ABE9C 7C 08 3C 30 */ srw r8, r0, r7 +/* 800AEF60 000ABEA0 38 C5 00 06 */ addi r6, r5, 6 +/* 800AEF64 000ABEA4 99 03 00 05 */ stb r8, 5(r3) +/* 800AEF68 000ABEA8 20 E6 00 03 */ subfic r7, r6, 3 +/* 800AEF6C 000ABEAC 38 C5 00 07 */ addi r6, r5, 7 +/* 800AEF70 000ABEB0 54 E7 18 38 */ slwi r7, r7, 3 +/* 800AEF74 000ABEB4 7C 07 3C 30 */ srw r7, r0, r7 +/* 800AEF78 000ABEB8 20 C6 00 03 */ subfic r6, r6, 3 +/* 800AEF7C 000ABEBC 98 E3 00 06 */ stb r7, 6(r3) +/* 800AEF80 000ABEC0 54 C6 18 38 */ slwi r6, r6, 3 +/* 800AEF84 000ABEC4 7C 06 34 30 */ srw r6, r0, r6 +/* 800AEF88 000ABEC8 98 C3 00 07 */ stb r6, 7(r3) +/* 800AEF8C 000ABECC 38 63 00 08 */ addi r3, r3, 8 +/* 800AEF90 000ABED0 38 A5 00 08 */ addi r5, r5, 8 +/* 800AEF94 000ABED4 42 00 FF 60 */ bdnz lbl_800AEEF4 +lbl_800AEF98: +/* 800AEF98 000ABED8 7C C5 20 50 */ subf r6, r5, r4 +/* 800AEF9C 000ABEDC 7C 05 20 00 */ cmpw r5, r4 +/* 800AEFA0 000ABEE0 7C C9 03 A6 */ mtctr r6 +/* 800AEFA4 000ABEE4 40 80 00 20 */ bge lbl_800AEFC4 +lbl_800AEFA8: +/* 800AEFA8 000ABEE8 20 85 00 03 */ subfic r4, r5, 3 +/* 800AEFAC 000ABEEC 54 84 18 38 */ slwi r4, r4, 3 +/* 800AEFB0 000ABEF0 7C 04 24 30 */ srw r4, r0, r4 +/* 800AEFB4 000ABEF4 98 83 00 00 */ stb r4, 0(r3) +/* 800AEFB8 000ABEF8 38 63 00 01 */ addi r3, r3, 1 +/* 800AEFBC 000ABEFC 38 A5 00 01 */ addi r5, r5, 1 +/* 800AEFC0 000ABF00 42 00 FF E8 */ bdnz lbl_800AEFA8 +lbl_800AEFC4: +/* 800AEFC4 000ABF04 38 60 00 01 */ li r3, 1 +/* 800AEFC8 000ABF08 48 00 00 0C */ b lbl_800AEFD4 +lbl_800AEFCC: +/* 800AEFCC 000ABF0C 7C E3 EA 14 */ add r7, r3, r29 +/* 800AEFD0 000ABF10 4B FF FE 84 */ b lbl_800AEE54 +lbl_800AEFD4: +/* 800AEFD4 000ABF14 BA C1 00 20 */ lmw r22, 0x20(r1) +/* 800AEFD8 000ABF18 38 21 00 48 */ addi r1, r1, 0x48 +/* 800AEFDC 000ABF1C 4E 80 00 20 */ blr + +.section .sdata, "wa" # 0x80408AC0 - 0x804097C0 +SendCount: + .4byte 0x80000000 + .4byte 0 + +.section .sbss, "wa" # 0x804097C0 - 0x8040B45C +MTRCallback: + .skip 0x4 +DBGCallback: + .skip 0x4 +SendMailData: + .skip 0x4 +RecvDataLeng: + .skip 0x4 +pEXIInputFlag: + .skip 0x4 +EXIInputFlag: + .skip 0x4 diff --git a/asm/Runtime/ExceptionPPC.s b/asm/Runtime/ExceptionPPC.s new file mode 100644 index 0000000..7da9581 --- /dev/null +++ b/asm/Runtime/ExceptionPPC.s @@ -0,0 +1,45 @@ +.include "macros.inc" + +.section .text, "ax" # 0x80005600 - 0x8036FBA0 +.global __unregister_fragment +__unregister_fragment: +/* 80082B4C 0007FA8C 2C 03 00 00 */ cmpwi r3, 0 +/* 80082B50 0007FA90 41 80 00 2C */ blt lbl_80082B7C +/* 80082B54 0007FA94 2C 03 00 01 */ cmpwi r3, 1 +/* 80082B58 0007FA98 40 80 00 24 */ bge lbl_80082B7C +/* 80082B5C 0007FA9C 1C 83 00 0C */ mulli r4, r3, 0xc +/* 80082B60 0007FAA0 3C 60 80 3F */ lis r3, fragmentinfo@ha +/* 80082B64 0007FAA4 38 03 8E D0 */ addi r0, r3, fragmentinfo@l +/* 80082B68 0007FAA8 7C 60 22 14 */ add r3, r0, r4 +/* 80082B6C 0007FAAC 38 00 00 00 */ li r0, 0 +/* 80082B70 0007FAB0 90 03 00 00 */ stw r0, 0(r3) +/* 80082B74 0007FAB4 90 03 00 04 */ stw r0, 4(r3) +/* 80082B78 0007FAB8 90 03 00 08 */ stw r0, 8(r3) +lbl_80082B7C: +/* 80082B7C 0007FABC 4E 80 00 20 */ blr + +.global __register_fragment +__register_fragment: +/* 80082B80 0007FAC0 3C A0 80 3F */ lis r5, fragmentinfo@ha +/* 80082B84 0007FAC4 38 A5 8E D0 */ addi r5, r5, fragmentinfo@l +/* 80082B88 0007FAC8 48 00 00 04 */ b lbl_80082B8C +lbl_80082B8C: +/* 80082B8C 0007FACC 48 00 00 04 */ b lbl_80082B90 +lbl_80082B90: +/* 80082B90 0007FAD0 80 05 00 08 */ lwz r0, 8(r5) +/* 80082B94 0007FAD4 2C 00 00 00 */ cmpwi r0, 0 +/* 80082B98 0007FAD8 40 82 00 1C */ bne lbl_80082BB4 +/* 80082B9C 0007FADC 90 65 00 00 */ stw r3, 0(r5) +/* 80082BA0 0007FAE0 38 00 00 01 */ li r0, 1 +/* 80082BA4 0007FAE4 38 60 00 00 */ li r3, 0 +/* 80082BA8 0007FAE8 90 85 00 04 */ stw r4, 4(r5) +/* 80082BAC 0007FAEC 90 05 00 08 */ stw r0, 8(r5) +/* 80082BB0 0007FAF0 48 00 00 08 */ b lbl_80082BB8 +lbl_80082BB4: +/* 80082BB4 0007FAF4 38 60 FF FF */ li r3, -1 +lbl_80082BB8: +/* 80082BB8 0007FAF8 4E 80 00 20 */ blr + +.section .bss, "wa" # 0x803E6000 - 0x80408AC0 +fragmentinfo: + .skip 0x10 diff --git a/asm/TRK_MINNOW_DOLPHIN/__exception.s b/asm/TRK_MINNOW_DOLPHIN/__exception.s new file mode 100644 index 0000000..72f56f9 --- /dev/null +++ b/asm/TRK_MINNOW_DOLPHIN/__exception.s @@ -0,0 +1,2007 @@ +.include "macros.inc" + +.section .init, "ax" # 0x80003100 - 0x80005540 +.global lbl_80003298 +lbl_80003298: +/* 80003298 00000298 4D 65 74 72 */ .4byte 0x4D657472 /* unknown instruction */ +/* 8000329C 0000029C 6F 77 65 72 */ xoris r23, r27, 0x6572 +/* 800032A0 000002A0 6B 73 20 54 */ xori r19, r27, 0x2054 +/* 800032A4 000002A4 61 72 67 65 */ ori r18, r11, 0x6765 +/* 800032A8 000002A8 74 20 52 65 */ andis. r0, r1, 0x5265 +/* 800032AC 000002AC 73 69 64 65 */ andi. r9, r27, 0x6465 +/* 800032B0 000002B0 6E 74 20 4B */ xoris r20, r19, 0x204b +/* 800032B4 000002B4 65 72 6E 65 */ oris r18, r11, 0x6e65 +/* 800032B8 000002B8 6C 20 66 6F */ xoris r0, r1, 0x666f +/* 800032BC 000002BC 72 20 50 6F */ andi. r0, r17, 0x506f +/* 800032C0 000002C0 77 65 72 50 */ andis. r5, r27, 0x7250 +lbl_800032C4: +/* 800032C4 000002C4 43 00 00 00 */ .4byte 0x43000000 /* unknown instruction */ +/* 800032C8 000002C8 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 800032CC 000002CC 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 800032D0 000002D0 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 800032D4 000002D4 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 800032D8 000002D8 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 800032DC 000002DC 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 800032E0 000002E0 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 800032E4 000002E4 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 800032E8 000002E8 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 800032EC 000002EC 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 800032F0 000002F0 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 800032F4 000002F4 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 800032F8 000002F8 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 800032FC 000002FC 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003300 00000300 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003304 00000304 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003308 00000308 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 8000330C 0000030C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003310 00000310 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003314 00000314 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003318 00000318 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 8000331C 0000031C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003320 00000320 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003324 00000324 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003328 00000328 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 8000332C 0000032C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003330 00000330 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003334 00000334 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003338 00000338 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 8000333C 0000033C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003340 00000340 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003344 00000344 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003348 00000348 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 8000334C 0000034C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003350 00000350 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003354 00000354 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003358 00000358 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 8000335C 0000035C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003360 00000360 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003364 00000364 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003368 00000368 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 8000336C 0000036C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003370 00000370 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003374 00000374 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003378 00000378 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 8000337C 0000037C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003380 00000380 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003384 00000384 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003388 00000388 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 8000338C 0000038C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003390 00000390 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003394 00000394 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003398 00000398 48 00 1E 34 */ b __TRK_reset +/* 8000339C 0000039C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 800033A0 000003A0 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 800033A4 000003A4 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 800033A8 000003A8 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 800033AC 000003AC 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 800033B0 000003B0 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 800033B4 000003B4 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 800033B8 000003B8 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 800033BC 000003BC 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 800033C0 000003C0 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 800033C4 000003C4 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 800033C8 000003C8 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 800033CC 000003CC 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 800033D0 000003D0 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 800033D4 000003D4 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 800033D8 000003D8 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 800033DC 000003DC 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 800033E0 000003E0 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 800033E4 000003E4 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 800033E8 000003E8 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 800033EC 000003EC 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 800033F0 000003F0 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 800033F4 000003F4 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 800033F8 000003F8 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 800033FC 000003FC 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003400 00000400 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003404 00000404 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003408 00000408 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 8000340C 0000040C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003410 00000410 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003414 00000414 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003418 00000418 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 8000341C 0000041C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003420 00000420 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003424 00000424 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003428 00000428 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 8000342C 0000042C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003430 00000430 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003434 00000434 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003438 00000438 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 8000343C 0000043C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003440 00000440 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003444 00000444 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003448 00000448 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 8000344C 0000044C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003450 00000450 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003454 00000454 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003458 00000458 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 8000345C 0000045C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003460 00000460 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003464 00000464 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003468 00000468 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 8000346C 0000046C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003470 00000470 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003474 00000474 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003478 00000478 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 8000347C 0000047C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003480 00000480 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003484 00000484 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003488 00000488 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 8000348C 0000048C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003490 00000490 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003494 00000494 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003498 00000498 7C 51 43 A6 */ mtspr 0x111, r2 +/* 8000349C 0000049C 7C 5A 02 A6 */ mfspr r2, 0x1a +/* 800034A0 000004A0 7C 00 17 AC */ icbi 0, r2 +/* 800034A4 000004A4 7C 53 02 A6 */ mfdar r2 +/* 800034A8 000004A8 7C 00 13 AC */ dcbi 0, r2 +/* 800034AC 000004AC 7C 51 42 A6 */ mfspr r2, 0x111 +/* 800034B0 000004B0 7C 51 43 A6 */ mtspr 0x111, r2 +/* 800034B4 000004B4 7C 72 43 A6 */ mtspr 0x112, r3 +/* 800034B8 000004B8 7C 93 43 A6 */ mtspr 0x113, r4 +/* 800034BC 000004BC 7C 5A 02 A6 */ mfspr r2, 0x1a +/* 800034C0 000004C0 7C 9B 02 A6 */ mfspr r4, 0x1b +/* 800034C4 000004C4 7C 60 00 A6 */ mfmsr r3 +/* 800034C8 000004C8 60 63 00 30 */ ori r3, r3, 0x30 +/* 800034CC 000004CC 7C 7B 03 A6 */ mtspr 0x1b, r3 +/* 800034D0 000004D0 3C 60 80 08 */ lis r3, TRKInterruptHandler@h +/* 800034D4 000004D4 60 63 AD D8 */ ori r3, r3, TRKInterruptHandler@l +/* 800034D8 000004D8 7C 7A 03 A6 */ mtspr 0x1a, r3 +/* 800034DC 000004DC 38 60 02 00 */ li r3, 0x200 +/* 800034E0 000004E0 4C 00 00 64 */ rfi +/* 800034E4 000004E4 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 800034E8 000004E8 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 800034EC 000004EC 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 800034F0 000004F0 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 800034F4 000004F4 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 800034F8 000004F8 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 800034FC 000004FC 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003500 00000500 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003504 00000504 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003508 00000508 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 8000350C 0000050C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003510 00000510 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003514 00000514 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003518 00000518 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 8000351C 0000051C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003520 00000520 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003524 00000524 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003528 00000528 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 8000352C 0000052C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003530 00000530 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003534 00000534 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003538 00000538 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 8000353C 0000053C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003540 00000540 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003544 00000544 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003548 00000548 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 8000354C 0000054C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003550 00000550 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003554 00000554 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003558 00000558 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 8000355C 0000055C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003560 00000560 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003564 00000564 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003568 00000568 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 8000356C 0000056C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003570 00000570 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003574 00000574 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003578 00000578 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 8000357C 0000057C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003580 00000580 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003584 00000584 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003588 00000588 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 8000358C 0000058C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003590 00000590 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003594 00000594 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003598 00000598 7C 51 43 A6 */ mtspr 0x111, r2 +/* 8000359C 0000059C 7C 72 43 A6 */ mtspr 0x112, r3 +/* 800035A0 000005A0 7C 93 43 A6 */ mtspr 0x113, r4 +/* 800035A4 000005A4 7C 5A 02 A6 */ mfspr r2, 0x1a +/* 800035A8 000005A8 7C 9B 02 A6 */ mfspr r4, 0x1b +/* 800035AC 000005AC 7C 60 00 A6 */ mfmsr r3 +/* 800035B0 000005B0 60 63 00 30 */ ori r3, r3, 0x30 +/* 800035B4 000005B4 7C 7B 03 A6 */ mtspr 0x1b, r3 +/* 800035B8 000005B8 3C 60 80 08 */ lis r3, TRKInterruptHandler@h +/* 800035BC 000005BC 60 63 AD D8 */ ori r3, r3, TRKInterruptHandler@l +/* 800035C0 000005C0 7C 7A 03 A6 */ mtspr 0x1a, r3 +/* 800035C4 000005C4 38 60 03 00 */ li r3, 0x300 +/* 800035C8 000005C8 4C 00 00 64 */ rfi +/* 800035CC 000005CC 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 800035D0 000005D0 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 800035D4 000005D4 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 800035D8 000005D8 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 800035DC 000005DC 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 800035E0 000005E0 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 800035E4 000005E4 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 800035E8 000005E8 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 800035EC 000005EC 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 800035F0 000005F0 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 800035F4 000005F4 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 800035F8 000005F8 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 800035FC 000005FC 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003600 00000600 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003604 00000604 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003608 00000608 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 8000360C 0000060C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003610 00000610 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003614 00000614 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003618 00000618 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 8000361C 0000061C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003620 00000620 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003624 00000624 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003628 00000628 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 8000362C 0000062C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003630 00000630 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003634 00000634 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003638 00000638 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 8000363C 0000063C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003640 00000640 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003644 00000644 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003648 00000648 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 8000364C 0000064C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003650 00000650 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003654 00000654 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003658 00000658 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 8000365C 0000065C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003660 00000660 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003664 00000664 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003668 00000668 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 8000366C 0000066C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003670 00000670 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003674 00000674 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003678 00000678 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 8000367C 0000067C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003680 00000680 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003684 00000684 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003688 00000688 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 8000368C 0000068C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003690 00000690 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003694 00000694 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003698 00000698 7C 51 43 A6 */ mtspr 0x111, r2 +/* 8000369C 0000069C 7C 72 43 A6 */ mtspr 0x112, r3 +/* 800036A0 000006A0 7C 93 43 A6 */ mtspr 0x113, r4 +/* 800036A4 000006A4 7C 5A 02 A6 */ mfspr r2, 0x1a +/* 800036A8 000006A8 7C 9B 02 A6 */ mfspr r4, 0x1b +/* 800036AC 000006AC 7C 60 00 A6 */ mfmsr r3 +/* 800036B0 000006B0 60 63 00 30 */ ori r3, r3, 0x30 +/* 800036B4 000006B4 7C 7B 03 A6 */ mtspr 0x1b, r3 +/* 800036B8 000006B8 3C 60 80 08 */ lis r3, TRKInterruptHandler@h +/* 800036BC 000006BC 60 63 AD D8 */ ori r3, r3, TRKInterruptHandler@l +/* 800036C0 000006C0 7C 7A 03 A6 */ mtspr 0x1a, r3 +/* 800036C4 000006C4 38 60 04 00 */ li r3, 0x400 +/* 800036C8 000006C8 4C 00 00 64 */ rfi +/* 800036CC 000006CC 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 800036D0 000006D0 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 800036D4 000006D4 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 800036D8 000006D8 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 800036DC 000006DC 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 800036E0 000006E0 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 800036E4 000006E4 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 800036E8 000006E8 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 800036EC 000006EC 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 800036F0 000006F0 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 800036F4 000006F4 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 800036F8 000006F8 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 800036FC 000006FC 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003700 00000700 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003704 00000704 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003708 00000708 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 8000370C 0000070C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003710 00000710 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003714 00000714 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003718 00000718 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 8000371C 0000071C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003720 00000720 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003724 00000724 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003728 00000728 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 8000372C 0000072C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003730 00000730 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003734 00000734 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003738 00000738 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 8000373C 0000073C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003740 00000740 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003744 00000744 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003748 00000748 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 8000374C 0000074C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003750 00000750 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003754 00000754 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003758 00000758 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 8000375C 0000075C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003760 00000760 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003764 00000764 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003768 00000768 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 8000376C 0000076C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003770 00000770 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003774 00000774 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003778 00000778 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 8000377C 0000077C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003780 00000780 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003784 00000784 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003788 00000788 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 8000378C 0000078C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003790 00000790 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003794 00000794 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003798 00000798 7C 51 43 A6 */ mtspr 0x111, r2 +/* 8000379C 0000079C 7C 72 43 A6 */ mtspr 0x112, r3 +/* 800037A0 000007A0 7C 93 43 A6 */ mtspr 0x113, r4 +/* 800037A4 000007A4 7C 5A 02 A6 */ mfspr r2, 0x1a +/* 800037A8 000007A8 7C 9B 02 A6 */ mfspr r4, 0x1b +/* 800037AC 000007AC 7C 60 00 A6 */ mfmsr r3 +/* 800037B0 000007B0 60 63 00 30 */ ori r3, r3, 0x30 +/* 800037B4 000007B4 7C 7B 03 A6 */ mtspr 0x1b, r3 +/* 800037B8 000007B8 3C 60 80 08 */ lis r3, TRKInterruptHandler@h +/* 800037BC 000007BC 60 63 AD D8 */ ori r3, r3, TRKInterruptHandler@l +/* 800037C0 000007C0 7C 7A 03 A6 */ mtspr 0x1a, r3 +/* 800037C4 000007C4 38 60 05 00 */ li r3, 0x500 +/* 800037C8 000007C8 4C 00 00 64 */ rfi +/* 800037CC 000007CC 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 800037D0 000007D0 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 800037D4 000007D4 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 800037D8 000007D8 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 800037DC 000007DC 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 800037E0 000007E0 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 800037E4 000007E4 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 800037E8 000007E8 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 800037EC 000007EC 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 800037F0 000007F0 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 800037F4 000007F4 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 800037F8 000007F8 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 800037FC 000007FC 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003800 00000800 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003804 00000804 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003808 00000808 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 8000380C 0000080C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003810 00000810 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003814 00000814 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003818 00000818 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 8000381C 0000081C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003820 00000820 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003824 00000824 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003828 00000828 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 8000382C 0000082C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003830 00000830 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003834 00000834 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003838 00000838 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 8000383C 0000083C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003840 00000840 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003844 00000844 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003848 00000848 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 8000384C 0000084C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003850 00000850 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003854 00000854 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003858 00000858 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 8000385C 0000085C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003860 00000860 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003864 00000864 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003868 00000868 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 8000386C 0000086C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003870 00000870 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003874 00000874 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003878 00000878 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 8000387C 0000087C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003880 00000880 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003884 00000884 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003888 00000888 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 8000388C 0000088C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003890 00000890 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003894 00000894 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003898 00000898 7C 51 43 A6 */ mtspr 0x111, r2 +/* 8000389C 0000089C 7C 72 43 A6 */ mtspr 0x112, r3 +/* 800038A0 000008A0 7C 93 43 A6 */ mtspr 0x113, r4 +/* 800038A4 000008A4 7C 5A 02 A6 */ mfspr r2, 0x1a +/* 800038A8 000008A8 7C 9B 02 A6 */ mfspr r4, 0x1b +/* 800038AC 000008AC 7C 60 00 A6 */ mfmsr r3 +/* 800038B0 000008B0 60 63 00 30 */ ori r3, r3, 0x30 +/* 800038B4 000008B4 7C 7B 03 A6 */ mtspr 0x1b, r3 +/* 800038B8 000008B8 3C 60 80 08 */ lis r3, TRKInterruptHandler@h +/* 800038BC 000008BC 60 63 AD D8 */ ori r3, r3, TRKInterruptHandler@l +/* 800038C0 000008C0 7C 7A 03 A6 */ mtspr 0x1a, r3 +/* 800038C4 000008C4 38 60 06 00 */ li r3, 0x600 +/* 800038C8 000008C8 4C 00 00 64 */ rfi +/* 800038CC 000008CC 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 800038D0 000008D0 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 800038D4 000008D4 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 800038D8 000008D8 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 800038DC 000008DC 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 800038E0 000008E0 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 800038E4 000008E4 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 800038E8 000008E8 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 800038EC 000008EC 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 800038F0 000008F0 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 800038F4 000008F4 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 800038F8 000008F8 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 800038FC 000008FC 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003900 00000900 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003904 00000904 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003908 00000908 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 8000390C 0000090C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003910 00000910 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003914 00000914 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003918 00000918 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 8000391C 0000091C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003920 00000920 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003924 00000924 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003928 00000928 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 8000392C 0000092C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003930 00000930 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003934 00000934 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003938 00000938 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 8000393C 0000093C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003940 00000940 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003944 00000944 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003948 00000948 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 8000394C 0000094C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003950 00000950 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003954 00000954 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003958 00000958 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 8000395C 0000095C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003960 00000960 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003964 00000964 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003968 00000968 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 8000396C 0000096C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003970 00000970 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003974 00000974 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003978 00000978 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 8000397C 0000097C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003980 00000980 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003984 00000984 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003988 00000988 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 8000398C 0000098C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003990 00000990 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003994 00000994 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003998 00000998 7C 51 43 A6 */ mtspr 0x111, r2 +/* 8000399C 0000099C 7C 72 43 A6 */ mtspr 0x112, r3 +/* 800039A0 000009A0 7C 93 43 A6 */ mtspr 0x113, r4 +/* 800039A4 000009A4 7C 5A 02 A6 */ mfspr r2, 0x1a +/* 800039A8 000009A8 7C 9B 02 A6 */ mfspr r4, 0x1b +/* 800039AC 000009AC 7C 60 00 A6 */ mfmsr r3 +/* 800039B0 000009B0 60 63 00 30 */ ori r3, r3, 0x30 +/* 800039B4 000009B4 7C 7B 03 A6 */ mtspr 0x1b, r3 +/* 800039B8 000009B8 3C 60 80 08 */ lis r3, TRKInterruptHandler@h +/* 800039BC 000009BC 60 63 AD D8 */ ori r3, r3, TRKInterruptHandler@l +/* 800039C0 000009C0 7C 7A 03 A6 */ mtspr 0x1a, r3 +/* 800039C4 000009C4 38 60 07 00 */ li r3, 0x700 +/* 800039C8 000009C8 4C 00 00 64 */ rfi +/* 800039CC 000009CC 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 800039D0 000009D0 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 800039D4 000009D4 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 800039D8 000009D8 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 800039DC 000009DC 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 800039E0 000009E0 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 800039E4 000009E4 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 800039E8 000009E8 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 800039EC 000009EC 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 800039F0 000009F0 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 800039F4 000009F4 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 800039F8 000009F8 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 800039FC 000009FC 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003A00 00000A00 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003A04 00000A04 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003A08 00000A08 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003A0C 00000A0C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003A10 00000A10 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003A14 00000A14 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003A18 00000A18 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003A1C 00000A1C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003A20 00000A20 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003A24 00000A24 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003A28 00000A28 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003A2C 00000A2C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003A30 00000A30 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003A34 00000A34 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003A38 00000A38 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003A3C 00000A3C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003A40 00000A40 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003A44 00000A44 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003A48 00000A48 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003A4C 00000A4C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003A50 00000A50 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003A54 00000A54 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003A58 00000A58 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003A5C 00000A5C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003A60 00000A60 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003A64 00000A64 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003A68 00000A68 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003A6C 00000A6C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003A70 00000A70 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003A74 00000A74 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003A78 00000A78 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003A7C 00000A7C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003A80 00000A80 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003A84 00000A84 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003A88 00000A88 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003A8C 00000A8C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003A90 00000A90 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003A94 00000A94 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003A98 00000A98 7C 51 43 A6 */ mtspr 0x111, r2 +/* 80003A9C 00000A9C 7C 72 43 A6 */ mtspr 0x112, r3 +/* 80003AA0 00000AA0 7C 93 43 A6 */ mtspr 0x113, r4 +/* 80003AA4 00000AA4 7C 5A 02 A6 */ mfspr r2, 0x1a +/* 80003AA8 00000AA8 7C 9B 02 A6 */ mfspr r4, 0x1b +/* 80003AAC 00000AAC 7C 60 00 A6 */ mfmsr r3 +/* 80003AB0 00000AB0 60 63 00 30 */ ori r3, r3, 0x30 +/* 80003AB4 00000AB4 7C 7B 03 A6 */ mtspr 0x1b, r3 +/* 80003AB8 00000AB8 3C 60 80 08 */ lis r3, TRKInterruptHandler@h +/* 80003ABC 00000ABC 60 63 AD D8 */ ori r3, r3, TRKInterruptHandler@l +/* 80003AC0 00000AC0 7C 7A 03 A6 */ mtspr 0x1a, r3 +/* 80003AC4 00000AC4 38 60 08 00 */ li r3, 0x800 +/* 80003AC8 00000AC8 4C 00 00 64 */ rfi +/* 80003ACC 00000ACC 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003AD0 00000AD0 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003AD4 00000AD4 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003AD8 00000AD8 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003ADC 00000ADC 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003AE0 00000AE0 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003AE4 00000AE4 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003AE8 00000AE8 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003AEC 00000AEC 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003AF0 00000AF0 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003AF4 00000AF4 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003AF8 00000AF8 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003AFC 00000AFC 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003B00 00000B00 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003B04 00000B04 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003B08 00000B08 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003B0C 00000B0C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003B10 00000B10 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003B14 00000B14 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003B18 00000B18 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003B1C 00000B1C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003B20 00000B20 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003B24 00000B24 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003B28 00000B28 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003B2C 00000B2C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003B30 00000B30 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003B34 00000B34 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003B38 00000B38 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003B3C 00000B3C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003B40 00000B40 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003B44 00000B44 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003B48 00000B48 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003B4C 00000B4C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003B50 00000B50 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003B54 00000B54 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003B58 00000B58 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003B5C 00000B5C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003B60 00000B60 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003B64 00000B64 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003B68 00000B68 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003B6C 00000B6C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003B70 00000B70 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003B74 00000B74 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003B78 00000B78 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003B7C 00000B7C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003B80 00000B80 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003B84 00000B84 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003B88 00000B88 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003B8C 00000B8C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003B90 00000B90 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003B94 00000B94 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003B98 00000B98 7C 51 43 A6 */ mtspr 0x111, r2 +/* 80003B9C 00000B9C 7C 72 43 A6 */ mtspr 0x112, r3 +/* 80003BA0 00000BA0 7C 93 43 A6 */ mtspr 0x113, r4 +/* 80003BA4 00000BA4 7C 5A 02 A6 */ mfspr r2, 0x1a +/* 80003BA8 00000BA8 7C 9B 02 A6 */ mfspr r4, 0x1b +/* 80003BAC 00000BAC 7C 60 00 A6 */ mfmsr r3 +/* 80003BB0 00000BB0 60 63 00 30 */ ori r3, r3, 0x30 +/* 80003BB4 00000BB4 7C 7B 03 A6 */ mtspr 0x1b, r3 +/* 80003BB8 00000BB8 3C 60 80 08 */ lis r3, TRKInterruptHandler@h +/* 80003BBC 00000BBC 60 63 AD D8 */ ori r3, r3, TRKInterruptHandler@l +/* 80003BC0 00000BC0 7C 7A 03 A6 */ mtspr 0x1a, r3 +/* 80003BC4 00000BC4 38 60 09 00 */ li r3, 0x900 +/* 80003BC8 00000BC8 4C 00 00 64 */ rfi +/* 80003BCC 00000BCC 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003BD0 00000BD0 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003BD4 00000BD4 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003BD8 00000BD8 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003BDC 00000BDC 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003BE0 00000BE0 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003BE4 00000BE4 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003BE8 00000BE8 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003BEC 00000BEC 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003BF0 00000BF0 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003BF4 00000BF4 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003BF8 00000BF8 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003BFC 00000BFC 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003C00 00000C00 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003C04 00000C04 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003C08 00000C08 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003C0C 00000C0C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003C10 00000C10 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003C14 00000C14 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003C18 00000C18 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003C1C 00000C1C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003C20 00000C20 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003C24 00000C24 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003C28 00000C28 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003C2C 00000C2C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003C30 00000C30 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003C34 00000C34 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003C38 00000C38 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003C3C 00000C3C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003C40 00000C40 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003C44 00000C44 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003C48 00000C48 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003C4C 00000C4C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003C50 00000C50 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003C54 00000C54 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003C58 00000C58 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003C5C 00000C5C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003C60 00000C60 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003C64 00000C64 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003C68 00000C68 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003C6C 00000C6C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003C70 00000C70 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003C74 00000C74 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003C78 00000C78 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003C7C 00000C7C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003C80 00000C80 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003C84 00000C84 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003C88 00000C88 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003C8C 00000C8C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003C90 00000C90 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003C94 00000C94 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003C98 00000C98 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003C9C 00000C9C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003CA0 00000CA0 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003CA4 00000CA4 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003CA8 00000CA8 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003CAC 00000CAC 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003CB0 00000CB0 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003CB4 00000CB4 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003CB8 00000CB8 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003CBC 00000CBC 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003CC0 00000CC0 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003CC4 00000CC4 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003CC8 00000CC8 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003CCC 00000CCC 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003CD0 00000CD0 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003CD4 00000CD4 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003CD8 00000CD8 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003CDC 00000CDC 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003CE0 00000CE0 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003CE4 00000CE4 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003CE8 00000CE8 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003CEC 00000CEC 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003CF0 00000CF0 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003CF4 00000CF4 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003CF8 00000CF8 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003CFC 00000CFC 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003D00 00000D00 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003D04 00000D04 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003D08 00000D08 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003D0C 00000D0C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003D10 00000D10 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003D14 00000D14 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003D18 00000D18 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003D1C 00000D1C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003D20 00000D20 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003D24 00000D24 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003D28 00000D28 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003D2C 00000D2C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003D30 00000D30 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003D34 00000D34 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003D38 00000D38 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003D3C 00000D3C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003D40 00000D40 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003D44 00000D44 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003D48 00000D48 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003D4C 00000D4C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003D50 00000D50 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003D54 00000D54 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003D58 00000D58 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003D5C 00000D5C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003D60 00000D60 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003D64 00000D64 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003D68 00000D68 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003D6C 00000D6C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003D70 00000D70 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003D74 00000D74 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003D78 00000D78 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003D7C 00000D7C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003D80 00000D80 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003D84 00000D84 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003D88 00000D88 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003D8C 00000D8C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003D90 00000D90 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003D94 00000D94 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003D98 00000D98 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003D9C 00000D9C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003DA0 00000DA0 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003DA4 00000DA4 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003DA8 00000DA8 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003DAC 00000DAC 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003DB0 00000DB0 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003DB4 00000DB4 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003DB8 00000DB8 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003DBC 00000DBC 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003DC0 00000DC0 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003DC4 00000DC4 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003DC8 00000DC8 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003DCC 00000DCC 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003DD0 00000DD0 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003DD4 00000DD4 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003DD8 00000DD8 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003DDC 00000DDC 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003DE0 00000DE0 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003DE4 00000DE4 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003DE8 00000DE8 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003DEC 00000DEC 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003DF0 00000DF0 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003DF4 00000DF4 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003DF8 00000DF8 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003DFC 00000DFC 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003E00 00000E00 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003E04 00000E04 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003E08 00000E08 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003E0C 00000E0C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003E10 00000E10 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003E14 00000E14 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003E18 00000E18 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003E1C 00000E1C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003E20 00000E20 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003E24 00000E24 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003E28 00000E28 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003E2C 00000E2C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003E30 00000E30 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003E34 00000E34 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003E38 00000E38 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003E3C 00000E3C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003E40 00000E40 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003E44 00000E44 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003E48 00000E48 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003E4C 00000E4C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003E50 00000E50 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003E54 00000E54 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003E58 00000E58 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003E5C 00000E5C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003E60 00000E60 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003E64 00000E64 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003E68 00000E68 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003E6C 00000E6C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003E70 00000E70 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003E74 00000E74 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003E78 00000E78 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003E7C 00000E7C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003E80 00000E80 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003E84 00000E84 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003E88 00000E88 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003E8C 00000E8C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003E90 00000E90 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003E94 00000E94 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003E98 00000E98 7C 51 43 A6 */ mtspr 0x111, r2 +/* 80003E9C 00000E9C 7C 72 43 A6 */ mtspr 0x112, r3 +/* 80003EA0 00000EA0 7C 93 43 A6 */ mtspr 0x113, r4 +/* 80003EA4 00000EA4 7C 5A 02 A6 */ mfspr r2, 0x1a +/* 80003EA8 00000EA8 7C 9B 02 A6 */ mfspr r4, 0x1b +/* 80003EAC 00000EAC 7C 60 00 A6 */ mfmsr r3 +/* 80003EB0 00000EB0 60 63 00 30 */ ori r3, r3, 0x30 +/* 80003EB4 00000EB4 7C 7B 03 A6 */ mtspr 0x1b, r3 +/* 80003EB8 00000EB8 3C 60 80 08 */ lis r3, TRKInterruptHandler@h +/* 80003EBC 00000EBC 60 63 AD D8 */ ori r3, r3, TRKInterruptHandler@l +/* 80003EC0 00000EC0 7C 7A 03 A6 */ mtspr 0x1a, r3 +/* 80003EC4 00000EC4 38 60 0C 00 */ li r3, 0xc00 +/* 80003EC8 00000EC8 4C 00 00 64 */ rfi +/* 80003ECC 00000ECC 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003ED0 00000ED0 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003ED4 00000ED4 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003ED8 00000ED8 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003EDC 00000EDC 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003EE0 00000EE0 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003EE4 00000EE4 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003EE8 00000EE8 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003EEC 00000EEC 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003EF0 00000EF0 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003EF4 00000EF4 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003EF8 00000EF8 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003EFC 00000EFC 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003F00 00000F00 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003F04 00000F04 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003F08 00000F08 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003F0C 00000F0C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003F10 00000F10 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003F14 00000F14 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003F18 00000F18 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003F1C 00000F1C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003F20 00000F20 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003F24 00000F24 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003F28 00000F28 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003F2C 00000F2C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003F30 00000F30 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003F34 00000F34 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003F38 00000F38 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003F3C 00000F3C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003F40 00000F40 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003F44 00000F44 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003F48 00000F48 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003F4C 00000F4C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003F50 00000F50 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003F54 00000F54 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003F58 00000F58 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003F5C 00000F5C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003F60 00000F60 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003F64 00000F64 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003F68 00000F68 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003F6C 00000F6C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003F70 00000F70 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003F74 00000F74 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003F78 00000F78 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003F7C 00000F7C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003F80 00000F80 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003F84 00000F84 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003F88 00000F88 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003F8C 00000F8C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003F90 00000F90 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003F94 00000F94 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003F98 00000F98 7C 51 43 A6 */ mtspr 0x111, r2 +/* 80003F9C 00000F9C 7C 72 43 A6 */ mtspr 0x112, r3 +/* 80003FA0 00000FA0 7C 93 43 A6 */ mtspr 0x113, r4 +/* 80003FA4 00000FA4 7C 5A 02 A6 */ mfspr r2, 0x1a +/* 80003FA8 00000FA8 7C 9B 02 A6 */ mfspr r4, 0x1b +/* 80003FAC 00000FAC 7C 60 00 A6 */ mfmsr r3 +/* 80003FB0 00000FB0 60 63 00 30 */ ori r3, r3, 0x30 +/* 80003FB4 00000FB4 7C 7B 03 A6 */ mtspr 0x1b, r3 +/* 80003FB8 00000FB8 3C 60 80 08 */ lis r3, TRKInterruptHandler@h +/* 80003FBC 00000FBC 60 63 AD D8 */ ori r3, r3, TRKInterruptHandler@l +/* 80003FC0 00000FC0 7C 7A 03 A6 */ mtspr 0x1a, r3 +/* 80003FC4 00000FC4 38 60 0D 00 */ li r3, 0xd00 +/* 80003FC8 00000FC8 4C 00 00 64 */ rfi +/* 80003FCC 00000FCC 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003FD0 00000FD0 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003FD4 00000FD4 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003FD8 00000FD8 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003FDC 00000FDC 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003FE0 00000FE0 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003FE4 00000FE4 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003FE8 00000FE8 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003FEC 00000FEC 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003FF0 00000FF0 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003FF4 00000FF4 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003FF8 00000FF8 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80003FFC 00000FFC 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004000 00001000 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004004 00001004 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004008 00001008 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 8000400C 0000100C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004010 00001010 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004014 00001014 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004018 00001018 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 8000401C 0000101C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004020 00001020 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004024 00001024 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004028 00001028 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 8000402C 0000102C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004030 00001030 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004034 00001034 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004038 00001038 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 8000403C 0000103C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004040 00001040 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004044 00001044 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004048 00001048 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 8000404C 0000104C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004050 00001050 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004054 00001054 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004058 00001058 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 8000405C 0000105C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004060 00001060 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004064 00001064 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004068 00001068 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 8000406C 0000106C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004070 00001070 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004074 00001074 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004078 00001078 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 8000407C 0000107C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004080 00001080 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004084 00001084 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004088 00001088 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 8000408C 0000108C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004090 00001090 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004094 00001094 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004098 00001098 7C 51 43 A6 */ mtspr 0x111, r2 +/* 8000409C 0000109C 7C 72 43 A6 */ mtspr 0x112, r3 +/* 800040A0 000010A0 7C 93 43 A6 */ mtspr 0x113, r4 +/* 800040A4 000010A4 7C 5A 02 A6 */ mfspr r2, 0x1a +/* 800040A8 000010A8 7C 9B 02 A6 */ mfspr r4, 0x1b +/* 800040AC 000010AC 7C 60 00 A6 */ mfmsr r3 +/* 800040B0 000010B0 60 63 00 30 */ ori r3, r3, 0x30 +/* 800040B4 000010B4 7C 7B 03 A6 */ mtspr 0x1b, r3 +/* 800040B8 000010B8 3C 60 80 08 */ lis r3, TRKInterruptHandler@h +/* 800040BC 000010BC 60 63 AD D8 */ ori r3, r3, TRKInterruptHandler@l +/* 800040C0 000010C0 7C 7A 03 A6 */ mtspr 0x1a, r3 +/* 800040C4 000010C4 38 60 0E 00 */ li r3, 0xe00 +/* 800040C8 000010C8 4C 00 00 64 */ rfi +/* 800040CC 000010CC 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 800040D0 000010D0 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 800040D4 000010D4 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 800040D8 000010D8 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 800040DC 000010DC 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 800040E0 000010E0 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 800040E4 000010E4 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 800040E8 000010E8 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 800040EC 000010EC 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 800040F0 000010F0 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 800040F4 000010F4 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 800040F8 000010F8 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 800040FC 000010FC 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004100 00001100 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004104 00001104 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004108 00001108 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 8000410C 0000110C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004110 00001110 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004114 00001114 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004118 00001118 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 8000411C 0000111C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004120 00001120 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004124 00001124 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004128 00001128 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 8000412C 0000112C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004130 00001130 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004134 00001134 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004138 00001138 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 8000413C 0000113C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004140 00001140 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004144 00001144 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004148 00001148 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 8000414C 0000114C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004150 00001150 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004154 00001154 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004158 00001158 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 8000415C 0000115C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004160 00001160 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004164 00001164 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004168 00001168 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 8000416C 0000116C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004170 00001170 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004174 00001174 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004178 00001178 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 8000417C 0000117C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004180 00001180 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004184 00001184 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004188 00001188 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 8000418C 0000118C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004190 00001190 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004194 00001194 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004198 00001198 48 00 00 54 */ b lbl_800041EC +/* 8000419C 0000119C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 800041A0 000011A0 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 800041A4 000011A4 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 800041A8 000011A8 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 800041AC 000011AC 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 800041B0 000011B0 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 800041B4 000011B4 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 800041B8 000011B8 7C 51 43 A6 */ mtspr 0x111, r2 +/* 800041BC 000011BC 7C 72 43 A6 */ mtspr 0x112, r3 +/* 800041C0 000011C0 7C 93 43 A6 */ mtspr 0x113, r4 +/* 800041C4 000011C4 7C 5A 02 A6 */ mfspr r2, 0x1a +/* 800041C8 000011C8 7C 9B 02 A6 */ mfspr r4, 0x1b +/* 800041CC 000011CC 7C 60 00 A6 */ mfmsr r3 +/* 800041D0 000011D0 60 63 00 30 */ ori r3, r3, 0x30 +/* 800041D4 000011D4 7C 7B 03 A6 */ mtspr 0x1b, r3 +/* 800041D8 000011D8 3C 60 80 08 */ lis r3, TRKInterruptHandler@h +/* 800041DC 000011DC 60 63 AD D8 */ ori r3, r3, TRKInterruptHandler@l +/* 800041E0 000011E0 7C 7A 03 A6 */ mtspr 0x1a, r3 +/* 800041E4 000011E4 38 60 0F 20 */ li r3, 0xf20 +/* 800041E8 000011E8 4C 00 00 64 */ rfi +lbl_800041EC: +/* 800041EC 000011EC 7C 51 43 A6 */ mtspr 0x111, r2 +/* 800041F0 000011F0 7C 72 43 A6 */ mtspr 0x112, r3 +/* 800041F4 000011F4 7C 93 43 A6 */ mtspr 0x113, r4 +/* 800041F8 000011F8 7C 5A 02 A6 */ mfspr r2, 0x1a +/* 800041FC 000011FC 7C 9B 02 A6 */ mfspr r4, 0x1b +/* 80004200 00001200 7C 60 00 A6 */ mfmsr r3 +/* 80004204 00001204 60 63 00 30 */ ori r3, r3, 0x30 +/* 80004208 00001208 7C 7B 03 A6 */ mtspr 0x1b, r3 +/* 8000420C 0000120C 3C 60 80 08 */ lis r3, TRKInterruptHandler@h +/* 80004210 00001210 60 63 AD D8 */ ori r3, r3, TRKInterruptHandler@l +/* 80004214 00001214 7C 7A 03 A6 */ mtspr 0x1a, r3 +/* 80004218 00001218 38 60 0F 00 */ li r3, 0xf00 +/* 8000421C 0000121C 4C 00 00 64 */ rfi +/* 80004220 00001220 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004224 00001224 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004228 00001228 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 8000422C 0000122C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004230 00001230 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004234 00001234 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004238 00001238 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 8000423C 0000123C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004240 00001240 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004244 00001244 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004248 00001248 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 8000424C 0000124C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004250 00001250 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004254 00001254 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004258 00001258 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 8000425C 0000125C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004260 00001260 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004264 00001264 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004268 00001268 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 8000426C 0000126C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004270 00001270 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004274 00001274 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004278 00001278 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 8000427C 0000127C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004280 00001280 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004284 00001284 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004288 00001288 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 8000428C 0000128C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004290 00001290 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004294 00001294 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004298 00001298 7C 51 43 A6 */ mtspr 0x111, r2 +/* 8000429C 0000129C 7C 40 00 26 */ mfcr r2 +/* 800042A0 000012A0 7C 52 43 A6 */ mtspr 0x112, r2 +/* 800042A4 000012A4 7C 40 00 A6 */ mfmsr r2 +/* 800042A8 000012A8 74 42 00 02 */ andis. r2, r2, 2 +/* 800042AC 000012AC 41 82 00 1C */ beq lbl_800042C8 +/* 800042B0 000012B0 7C 40 00 A6 */ mfmsr r2 +/* 800042B4 000012B4 6C 42 00 02 */ xoris r2, r2, 2 +/* 800042B8 000012B8 7C 00 04 AC */ sync 0 +/* 800042BC 000012BC 7C 40 01 24 */ mtmsr r2 +/* 800042C0 000012C0 7C 00 04 AC */ sync 0 +/* 800042C4 000012C4 7C 51 43 A6 */ mtspr 0x111, r2 +lbl_800042C8: +/* 800042C8 000012C8 7C 52 42 A6 */ mfspr r2, 0x112 +/* 800042CC 000012CC 7C 4F F1 20 */ mtcrf 0xff, r2 +/* 800042D0 000012D0 7C 51 42 A6 */ mfspr r2, 0x111 +/* 800042D4 000012D4 7C 51 43 A6 */ mtspr 0x111, r2 +/* 800042D8 000012D8 7C 72 43 A6 */ mtspr 0x112, r3 +/* 800042DC 000012DC 7C 93 43 A6 */ mtspr 0x113, r4 +/* 800042E0 000012E0 7C 5A 02 A6 */ mfspr r2, 0x1a +/* 800042E4 000012E4 7C 9B 02 A6 */ mfspr r4, 0x1b +/* 800042E8 000012E8 7C 60 00 A6 */ mfmsr r3 +/* 800042EC 000012EC 60 63 00 30 */ ori r3, r3, 0x30 +/* 800042F0 000012F0 7C 7B 03 A6 */ mtspr 0x1b, r3 +/* 800042F4 000012F4 3C 60 80 08 */ lis r3, TRKInterruptHandler@h +/* 800042F8 000012F8 60 63 AD D8 */ ori r3, r3, TRKInterruptHandler@l +/* 800042FC 000012FC 7C 7A 03 A6 */ mtspr 0x1a, r3 +/* 80004300 00001300 38 60 10 00 */ li r3, 0x1000 +/* 80004304 00001304 4C 00 00 64 */ rfi +/* 80004308 00001308 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 8000430C 0000130C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004310 00001310 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004314 00001314 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004318 00001318 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 8000431C 0000131C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004320 00001320 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004324 00001324 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004328 00001328 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 8000432C 0000132C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004330 00001330 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004334 00001334 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004338 00001338 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 8000433C 0000133C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004340 00001340 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004344 00001344 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004348 00001348 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 8000434C 0000134C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004350 00001350 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004354 00001354 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004358 00001358 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 8000435C 0000135C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004360 00001360 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004364 00001364 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004368 00001368 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 8000436C 0000136C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004370 00001370 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004374 00001374 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004378 00001378 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 8000437C 0000137C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004380 00001380 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004384 00001384 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004388 00001388 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 8000438C 0000138C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004390 00001390 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004394 00001394 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004398 00001398 7C 51 43 A6 */ mtspr 0x111, r2 +/* 8000439C 0000139C 7C 40 00 26 */ mfcr r2 +/* 800043A0 000013A0 7C 52 43 A6 */ mtspr 0x112, r2 +/* 800043A4 000013A4 7C 40 00 A6 */ mfmsr r2 +/* 800043A8 000013A8 74 42 00 02 */ andis. r2, r2, 2 +/* 800043AC 000013AC 41 82 00 1C */ beq lbl_800043C8 +/* 800043B0 000013B0 7C 40 00 A6 */ mfmsr r2 +/* 800043B4 000013B4 6C 42 00 02 */ xoris r2, r2, 2 +/* 800043B8 000013B8 7C 00 04 AC */ sync 0 +/* 800043BC 000013BC 7C 40 01 24 */ mtmsr r2 +/* 800043C0 000013C0 7C 00 04 AC */ sync 0 +/* 800043C4 000013C4 7C 51 43 A6 */ mtspr 0x111, r2 +lbl_800043C8: +/* 800043C8 000013C8 7C 52 42 A6 */ mfspr r2, 0x112 +/* 800043CC 000013CC 7C 4F F1 20 */ mtcrf 0xff, r2 +/* 800043D0 000013D0 7C 51 42 A6 */ mfspr r2, 0x111 +/* 800043D4 000013D4 7C 51 43 A6 */ mtspr 0x111, r2 +/* 800043D8 000013D8 7C 72 43 A6 */ mtspr 0x112, r3 +/* 800043DC 000013DC 7C 93 43 A6 */ mtspr 0x113, r4 +/* 800043E0 000013E0 7C 5A 02 A6 */ mfspr r2, 0x1a +/* 800043E4 000013E4 7C 9B 02 A6 */ mfspr r4, 0x1b +/* 800043E8 000013E8 7C 60 00 A6 */ mfmsr r3 +/* 800043EC 000013EC 60 63 00 30 */ ori r3, r3, 0x30 +/* 800043F0 000013F0 7C 7B 03 A6 */ mtspr 0x1b, r3 +/* 800043F4 000013F4 3C 60 80 08 */ lis r3, TRKInterruptHandler@h +/* 800043F8 000013F8 60 63 AD D8 */ ori r3, r3, TRKInterruptHandler@l +/* 800043FC 000013FC 7C 7A 03 A6 */ mtspr 0x1a, r3 +/* 80004400 00001400 38 60 11 00 */ li r3, 0x1100 +/* 80004404 00001404 4C 00 00 64 */ rfi +/* 80004408 00001408 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 8000440C 0000140C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004410 00001410 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004414 00001414 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004418 00001418 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 8000441C 0000141C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004420 00001420 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004424 00001424 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004428 00001428 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 8000442C 0000142C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004430 00001430 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004434 00001434 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004438 00001438 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 8000443C 0000143C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004440 00001440 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004444 00001444 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004448 00001448 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 8000444C 0000144C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004450 00001450 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004454 00001454 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004458 00001458 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 8000445C 0000145C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004460 00001460 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004464 00001464 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004468 00001468 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 8000446C 0000146C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004470 00001470 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004474 00001474 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004478 00001478 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 8000447C 0000147C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004480 00001480 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004484 00001484 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004488 00001488 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 8000448C 0000148C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004490 00001490 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004494 00001494 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004498 00001498 7C 51 43 A6 */ mtspr 0x111, r2 +/* 8000449C 0000149C 7C 40 00 26 */ mfcr r2 +/* 800044A0 000014A0 7C 52 43 A6 */ mtspr 0x112, r2 +/* 800044A4 000014A4 7C 40 00 A6 */ mfmsr r2 +/* 800044A8 000014A8 74 42 00 02 */ andis. r2, r2, 2 +/* 800044AC 000014AC 41 82 00 1C */ beq lbl_800044C8 +/* 800044B0 000014B0 7C 40 00 A6 */ mfmsr r2 +/* 800044B4 000014B4 6C 42 00 02 */ xoris r2, r2, 2 +/* 800044B8 000014B8 7C 00 04 AC */ sync 0 +/* 800044BC 000014BC 7C 40 01 24 */ mtmsr r2 +/* 800044C0 000014C0 7C 00 04 AC */ sync 0 +/* 800044C4 000014C4 7C 51 43 A6 */ mtspr 0x111, r2 +lbl_800044C8: +/* 800044C8 000014C8 7C 52 42 A6 */ mfspr r2, 0x112 +/* 800044CC 000014CC 7C 4F F1 20 */ mtcrf 0xff, r2 +/* 800044D0 000014D0 7C 51 42 A6 */ mfspr r2, 0x111 +/* 800044D4 000014D4 7C 51 43 A6 */ mtspr 0x111, r2 +/* 800044D8 000014D8 7C 72 43 A6 */ mtspr 0x112, r3 +/* 800044DC 000014DC 7C 93 43 A6 */ mtspr 0x113, r4 +/* 800044E0 000014E0 7C 5A 02 A6 */ mfspr r2, 0x1a +/* 800044E4 000014E4 7C 9B 02 A6 */ mfspr r4, 0x1b +/* 800044E8 000014E8 7C 60 00 A6 */ mfmsr r3 +/* 800044EC 000014EC 60 63 00 30 */ ori r3, r3, 0x30 +/* 800044F0 000014F0 7C 7B 03 A6 */ mtspr 0x1b, r3 +/* 800044F4 000014F4 3C 60 80 08 */ lis r3, TRKInterruptHandler@h +/* 800044F8 000014F8 60 63 AD D8 */ ori r3, r3, TRKInterruptHandler@l +/* 800044FC 000014FC 7C 7A 03 A6 */ mtspr 0x1a, r3 +/* 80004500 00001500 38 60 12 00 */ li r3, 0x1200 +/* 80004504 00001504 4C 00 00 64 */ rfi +/* 80004508 00001508 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 8000450C 0000150C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004510 00001510 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004514 00001514 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004518 00001518 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 8000451C 0000151C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004520 00001520 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004524 00001524 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004528 00001528 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 8000452C 0000152C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004530 00001530 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004534 00001534 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004538 00001538 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 8000453C 0000153C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004540 00001540 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004544 00001544 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004548 00001548 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 8000454C 0000154C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004550 00001550 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004554 00001554 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004558 00001558 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 8000455C 0000155C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004560 00001560 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004564 00001564 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004568 00001568 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 8000456C 0000156C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004570 00001570 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004574 00001574 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004578 00001578 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 8000457C 0000157C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004580 00001580 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004584 00001584 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004588 00001588 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 8000458C 0000158C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004590 00001590 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004594 00001594 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004598 00001598 7C 51 43 A6 */ mtspr 0x111, r2 +/* 8000459C 0000159C 7C 72 43 A6 */ mtspr 0x112, r3 +/* 800045A0 000015A0 7C 93 43 A6 */ mtspr 0x113, r4 +/* 800045A4 000015A4 7C 5A 02 A6 */ mfspr r2, 0x1a +/* 800045A8 000015A8 7C 9B 02 A6 */ mfspr r4, 0x1b +/* 800045AC 000015AC 7C 60 00 A6 */ mfmsr r3 +/* 800045B0 000015B0 60 63 00 30 */ ori r3, r3, 0x30 +/* 800045B4 000015B4 7C 7B 03 A6 */ mtspr 0x1b, r3 +/* 800045B8 000015B8 3C 60 80 08 */ lis r3, TRKInterruptHandler@h +/* 800045BC 000015BC 60 63 AD D8 */ ori r3, r3, TRKInterruptHandler@l +/* 800045C0 000015C0 7C 7A 03 A6 */ mtspr 0x1a, r3 +/* 800045C4 000015C4 38 60 13 00 */ li r3, 0x1300 +/* 800045C8 000015C8 4C 00 00 64 */ rfi +/* 800045CC 000015CC 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 800045D0 000015D0 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 800045D4 000015D4 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 800045D8 000015D8 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 800045DC 000015DC 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 800045E0 000015E0 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 800045E4 000015E4 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 800045E8 000015E8 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 800045EC 000015EC 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 800045F0 000015F0 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 800045F4 000015F4 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 800045F8 000015F8 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 800045FC 000015FC 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004600 00001600 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004604 00001604 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004608 00001608 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 8000460C 0000160C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004610 00001610 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004614 00001614 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004618 00001618 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 8000461C 0000161C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004620 00001620 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004624 00001624 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004628 00001628 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 8000462C 0000162C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004630 00001630 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004634 00001634 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004638 00001638 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 8000463C 0000163C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004640 00001640 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004644 00001644 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004648 00001648 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 8000464C 0000164C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004650 00001650 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004654 00001654 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004658 00001658 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 8000465C 0000165C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004660 00001660 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004664 00001664 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004668 00001668 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 8000466C 0000166C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004670 00001670 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004674 00001674 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004678 00001678 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 8000467C 0000167C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004680 00001680 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004684 00001684 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004688 00001688 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 8000468C 0000168C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004690 00001690 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004694 00001694 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004698 00001698 7C 51 43 A6 */ mtspr 0x111, r2 +/* 8000469C 0000169C 7C 72 43 A6 */ mtspr 0x112, r3 +/* 800046A0 000016A0 7C 93 43 A6 */ mtspr 0x113, r4 +/* 800046A4 000016A4 7C 5A 02 A6 */ mfspr r2, 0x1a +/* 800046A8 000016A8 7C 9B 02 A6 */ mfspr r4, 0x1b +/* 800046AC 000016AC 7C 60 00 A6 */ mfmsr r3 +/* 800046B0 000016B0 60 63 00 30 */ ori r3, r3, 0x30 +/* 800046B4 000016B4 7C 7B 03 A6 */ mtspr 0x1b, r3 +/* 800046B8 000016B8 3C 60 80 08 */ lis r3, TRKInterruptHandler@h +/* 800046BC 000016BC 60 63 AD D8 */ ori r3, r3, TRKInterruptHandler@l +/* 800046C0 000016C0 7C 7A 03 A6 */ mtspr 0x1a, r3 +/* 800046C4 000016C4 38 60 14 00 */ li r3, 0x1400 +/* 800046C8 000016C8 4C 00 00 64 */ rfi +/* 800046CC 000016CC 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 800046D0 000016D0 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 800046D4 000016D4 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 800046D8 000016D8 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 800046DC 000016DC 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 800046E0 000016E0 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 800046E4 000016E4 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 800046E8 000016E8 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 800046EC 000016EC 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 800046F0 000016F0 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 800046F4 000016F4 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 800046F8 000016F8 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 800046FC 000016FC 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004700 00001700 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004704 00001704 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004708 00001708 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 8000470C 0000170C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004710 00001710 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004714 00001714 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004718 00001718 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 8000471C 0000171C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004720 00001720 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004724 00001724 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004728 00001728 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 8000472C 0000172C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004730 00001730 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004734 00001734 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004738 00001738 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 8000473C 0000173C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004740 00001740 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004744 00001744 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004748 00001748 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 8000474C 0000174C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004750 00001750 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004754 00001754 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004758 00001758 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 8000475C 0000175C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004760 00001760 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004764 00001764 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004768 00001768 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 8000476C 0000176C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004770 00001770 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004774 00001774 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004778 00001778 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 8000477C 0000177C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004780 00001780 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004784 00001784 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004788 00001788 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 8000478C 0000178C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004790 00001790 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004794 00001794 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004798 00001798 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 8000479C 0000179C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 800047A0 000017A0 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 800047A4 000017A4 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 800047A8 000017A8 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 800047AC 000017AC 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 800047B0 000017B0 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 800047B4 000017B4 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 800047B8 000017B8 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 800047BC 000017BC 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 800047C0 000017C0 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 800047C4 000017C4 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 800047C8 000017C8 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 800047CC 000017CC 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 800047D0 000017D0 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 800047D4 000017D4 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 800047D8 000017D8 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 800047DC 000017DC 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 800047E0 000017E0 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 800047E4 000017E4 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 800047E8 000017E8 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 800047EC 000017EC 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 800047F0 000017F0 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 800047F4 000017F4 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 800047F8 000017F8 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 800047FC 000017FC 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004800 00001800 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004804 00001804 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004808 00001808 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 8000480C 0000180C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004810 00001810 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004814 00001814 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004818 00001818 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 8000481C 0000181C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004820 00001820 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004824 00001824 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004828 00001828 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 8000482C 0000182C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004830 00001830 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004834 00001834 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004838 00001838 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 8000483C 0000183C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004840 00001840 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004844 00001844 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004848 00001848 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 8000484C 0000184C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004850 00001850 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004854 00001854 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004858 00001858 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 8000485C 0000185C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004860 00001860 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004864 00001864 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004868 00001868 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 8000486C 0000186C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004870 00001870 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004874 00001874 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004878 00001878 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 8000487C 0000187C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004880 00001880 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004884 00001884 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004888 00001888 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 8000488C 0000188C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004890 00001890 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004894 00001894 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004898 00001898 7C 51 43 A6 */ mtspr 0x111, r2 +/* 8000489C 0000189C 7C 72 43 A6 */ mtspr 0x112, r3 +/* 800048A0 000018A0 7C 93 43 A6 */ mtspr 0x113, r4 +/* 800048A4 000018A4 7C 5A 02 A6 */ mfspr r2, 0x1a +/* 800048A8 000018A8 7C 9B 02 A6 */ mfspr r4, 0x1b +/* 800048AC 000018AC 7C 60 00 A6 */ mfmsr r3 +/* 800048B0 000018B0 60 63 00 30 */ ori r3, r3, 0x30 +/* 800048B4 000018B4 7C 7B 03 A6 */ mtspr 0x1b, r3 +/* 800048B8 000018B8 3C 60 80 08 */ lis r3, TRKInterruptHandler@h +/* 800048BC 000018BC 60 63 AD D8 */ ori r3, r3, TRKInterruptHandler@l +/* 800048C0 000018C0 7C 7A 03 A6 */ mtspr 0x1a, r3 +/* 800048C4 000018C4 38 60 16 00 */ li r3, 0x1600 +/* 800048C8 000018C8 4C 00 00 64 */ rfi +/* 800048CC 000018CC 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 800048D0 000018D0 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 800048D4 000018D4 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 800048D8 000018D8 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 800048DC 000018DC 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 800048E0 000018E0 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 800048E4 000018E4 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 800048E8 000018E8 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 800048EC 000018EC 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 800048F0 000018F0 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 800048F4 000018F4 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 800048F8 000018F8 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 800048FC 000018FC 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004900 00001900 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004904 00001904 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004908 00001908 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 8000490C 0000190C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004910 00001910 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004914 00001914 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004918 00001918 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 8000491C 0000191C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004920 00001920 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004924 00001924 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004928 00001928 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 8000492C 0000192C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004930 00001930 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004934 00001934 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004938 00001938 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 8000493C 0000193C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004940 00001940 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004944 00001944 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004948 00001948 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 8000494C 0000194C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004950 00001950 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004954 00001954 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004958 00001958 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 8000495C 0000195C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004960 00001960 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004964 00001964 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004968 00001968 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 8000496C 0000196C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004970 00001970 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004974 00001974 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004978 00001978 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 8000497C 0000197C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004980 00001980 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004984 00001984 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004988 00001988 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 8000498C 0000198C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004990 00001990 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004994 00001994 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004998 00001998 7C 51 43 A6 */ mtspr 0x111, r2 +/* 8000499C 0000199C 7C 72 43 A6 */ mtspr 0x112, r3 +/* 800049A0 000019A0 7C 93 43 A6 */ mtspr 0x113, r4 +/* 800049A4 000019A4 7C 5A 02 A6 */ mfspr r2, 0x1a +/* 800049A8 000019A8 7C 9B 02 A6 */ mfspr r4, 0x1b +/* 800049AC 000019AC 7C 60 00 A6 */ mfmsr r3 +/* 800049B0 000019B0 60 63 00 30 */ ori r3, r3, 0x30 +/* 800049B4 000019B4 7C 7B 03 A6 */ mtspr 0x1b, r3 +/* 800049B8 000019B8 3C 60 80 08 */ lis r3, TRKInterruptHandler@h +/* 800049BC 000019BC 60 63 AD D8 */ ori r3, r3, TRKInterruptHandler@l +/* 800049C0 000019C0 7C 7A 03 A6 */ mtspr 0x1a, r3 +/* 800049C4 000019C4 38 60 17 00 */ li r3, 0x1700 +/* 800049C8 000019C8 4C 00 00 64 */ rfi +/* 800049CC 000019CC 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 800049D0 000019D0 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 800049D4 000019D4 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 800049D8 000019D8 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 800049DC 000019DC 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 800049E0 000019E0 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 800049E4 000019E4 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 800049E8 000019E8 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 800049EC 000019EC 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 800049F0 000019F0 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 800049F4 000019F4 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 800049F8 000019F8 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 800049FC 000019FC 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004A00 00001A00 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004A04 00001A04 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004A08 00001A08 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004A0C 00001A0C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004A10 00001A10 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004A14 00001A14 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004A18 00001A18 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004A1C 00001A1C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004A20 00001A20 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004A24 00001A24 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004A28 00001A28 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004A2C 00001A2C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004A30 00001A30 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004A34 00001A34 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004A38 00001A38 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004A3C 00001A3C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004A40 00001A40 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004A44 00001A44 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004A48 00001A48 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004A4C 00001A4C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004A50 00001A50 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004A54 00001A54 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004A58 00001A58 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004A5C 00001A5C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004A60 00001A60 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004A64 00001A64 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004A68 00001A68 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004A6C 00001A6C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004A70 00001A70 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004A74 00001A74 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004A78 00001A78 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004A7C 00001A7C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004A80 00001A80 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004A84 00001A84 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004A88 00001A88 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004A8C 00001A8C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004A90 00001A90 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004A94 00001A94 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004A98 00001A98 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004A9C 00001A9C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004AA0 00001AA0 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004AA4 00001AA4 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004AA8 00001AA8 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004AAC 00001AAC 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004AB0 00001AB0 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004AB4 00001AB4 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004AB8 00001AB8 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004ABC 00001ABC 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004AC0 00001AC0 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004AC4 00001AC4 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004AC8 00001AC8 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004ACC 00001ACC 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004AD0 00001AD0 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004AD4 00001AD4 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004AD8 00001AD8 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004ADC 00001ADC 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004AE0 00001AE0 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004AE4 00001AE4 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004AE8 00001AE8 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004AEC 00001AEC 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004AF0 00001AF0 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004AF4 00001AF4 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004AF8 00001AF8 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004AFC 00001AFC 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004B00 00001B00 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004B04 00001B04 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004B08 00001B08 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004B0C 00001B0C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004B10 00001B10 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004B14 00001B14 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004B18 00001B18 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004B1C 00001B1C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004B20 00001B20 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004B24 00001B24 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004B28 00001B28 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004B2C 00001B2C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004B30 00001B30 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004B34 00001B34 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004B38 00001B38 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004B3C 00001B3C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004B40 00001B40 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004B44 00001B44 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004B48 00001B48 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004B4C 00001B4C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004B50 00001B50 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004B54 00001B54 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004B58 00001B58 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004B5C 00001B5C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004B60 00001B60 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004B64 00001B64 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004B68 00001B68 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004B6C 00001B6C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004B70 00001B70 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004B74 00001B74 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004B78 00001B78 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004B7C 00001B7C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004B80 00001B80 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004B84 00001B84 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004B88 00001B88 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004B8C 00001B8C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004B90 00001B90 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004B94 00001B94 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004B98 00001B98 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004B9C 00001B9C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004BA0 00001BA0 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004BA4 00001BA4 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004BA8 00001BA8 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004BAC 00001BAC 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004BB0 00001BB0 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004BB4 00001BB4 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004BB8 00001BB8 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004BBC 00001BBC 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004BC0 00001BC0 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004BC4 00001BC4 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004BC8 00001BC8 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004BCC 00001BCC 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004BD0 00001BD0 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004BD4 00001BD4 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004BD8 00001BD8 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004BDC 00001BDC 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004BE0 00001BE0 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004BE4 00001BE4 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004BE8 00001BE8 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004BEC 00001BEC 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004BF0 00001BF0 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004BF4 00001BF4 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004BF8 00001BF8 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004BFC 00001BFC 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004C00 00001C00 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004C04 00001C04 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004C08 00001C08 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004C0C 00001C0C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004C10 00001C10 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004C14 00001C14 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004C18 00001C18 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004C1C 00001C1C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004C20 00001C20 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004C24 00001C24 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004C28 00001C28 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004C2C 00001C2C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004C30 00001C30 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004C34 00001C34 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004C38 00001C38 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004C3C 00001C3C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004C40 00001C40 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004C44 00001C44 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004C48 00001C48 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004C4C 00001C4C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004C50 00001C50 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004C54 00001C54 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004C58 00001C58 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004C5C 00001C5C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004C60 00001C60 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004C64 00001C64 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004C68 00001C68 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004C6C 00001C6C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004C70 00001C70 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004C74 00001C74 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004C78 00001C78 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004C7C 00001C7C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004C80 00001C80 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004C84 00001C84 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004C88 00001C88 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004C8C 00001C8C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004C90 00001C90 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004C94 00001C94 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004C98 00001C98 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004C9C 00001C9C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004CA0 00001CA0 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004CA4 00001CA4 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004CA8 00001CA8 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004CAC 00001CAC 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004CB0 00001CB0 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004CB4 00001CB4 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004CB8 00001CB8 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004CBC 00001CBC 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004CC0 00001CC0 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004CC4 00001CC4 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004CC8 00001CC8 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004CCC 00001CCC 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004CD0 00001CD0 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004CD4 00001CD4 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004CD8 00001CD8 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004CDC 00001CDC 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004CE0 00001CE0 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004CE4 00001CE4 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004CE8 00001CE8 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004CEC 00001CEC 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004CF0 00001CF0 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004CF4 00001CF4 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004CF8 00001CF8 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004CFC 00001CFC 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004D00 00001D00 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004D04 00001D04 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004D08 00001D08 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004D0C 00001D0C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004D10 00001D10 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004D14 00001D14 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004D18 00001D18 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004D1C 00001D1C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004D20 00001D20 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004D24 00001D24 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004D28 00001D28 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004D2C 00001D2C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004D30 00001D30 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004D34 00001D34 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004D38 00001D38 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004D3C 00001D3C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004D40 00001D40 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004D44 00001D44 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004D48 00001D48 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004D4C 00001D4C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004D50 00001D50 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004D54 00001D54 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004D58 00001D58 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004D5C 00001D5C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004D60 00001D60 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004D64 00001D64 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004D68 00001D68 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004D6C 00001D6C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004D70 00001D70 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004D74 00001D74 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004D78 00001D78 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004D7C 00001D7C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004D80 00001D80 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004D84 00001D84 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004D88 00001D88 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004D8C 00001D8C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004D90 00001D90 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004D94 00001D94 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004D98 00001D98 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004D9C 00001D9C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004DA0 00001DA0 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004DA4 00001DA4 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004DA8 00001DA8 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004DAC 00001DAC 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004DB0 00001DB0 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004DB4 00001DB4 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004DB8 00001DB8 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004DBC 00001DBC 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004DC0 00001DC0 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004DC4 00001DC4 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004DC8 00001DC8 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004DCC 00001DCC 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004DD0 00001DD0 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004DD4 00001DD4 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004DD8 00001DD8 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004DDC 00001DDC 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004DE0 00001DE0 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004DE4 00001DE4 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004DE8 00001DE8 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004DEC 00001DEC 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004DF0 00001DF0 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004DF4 00001DF4 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004DF8 00001DF8 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004DFC 00001DFC 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004E00 00001E00 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004E04 00001E04 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004E08 00001E08 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004E0C 00001E0C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004E10 00001E10 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004E14 00001E14 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004E18 00001E18 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004E1C 00001E1C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004E20 00001E20 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004E24 00001E24 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004E28 00001E28 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004E2C 00001E2C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004E30 00001E30 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004E34 00001E34 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004E38 00001E38 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004E3C 00001E3C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004E40 00001E40 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004E44 00001E44 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004E48 00001E48 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004E4C 00001E4C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004E50 00001E50 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004E54 00001E54 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004E58 00001E58 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004E5C 00001E5C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004E60 00001E60 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004E64 00001E64 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004E68 00001E68 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004E6C 00001E6C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004E70 00001E70 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004E74 00001E74 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004E78 00001E78 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004E7C 00001E7C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004E80 00001E80 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004E84 00001E84 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004E88 00001E88 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004E8C 00001E8C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004E90 00001E90 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004E94 00001E94 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004E98 00001E98 7C 51 43 A6 */ mtspr 0x111, r2 +/* 80004E9C 00001E9C 7C 72 43 A6 */ mtspr 0x112, r3 +/* 80004EA0 00001EA0 7C 93 43 A6 */ mtspr 0x113, r4 +/* 80004EA4 00001EA4 7C 5A 02 A6 */ mfspr r2, 0x1a +/* 80004EA8 00001EA8 7C 9B 02 A6 */ mfspr r4, 0x1b +/* 80004EAC 00001EAC 7C 60 00 A6 */ mfmsr r3 +/* 80004EB0 00001EB0 60 63 00 30 */ ori r3, r3, 0x30 +/* 80004EB4 00001EB4 7C 7B 03 A6 */ mtspr 0x1b, r3 +/* 80004EB8 00001EB8 3C 60 80 08 */ lis r3, TRKInterruptHandler@h +/* 80004EBC 00001EBC 60 63 AD D8 */ ori r3, r3, TRKInterruptHandler@l +/* 80004EC0 00001EC0 7C 7A 03 A6 */ mtspr 0x1a, r3 +/* 80004EC4 00001EC4 38 60 1C 00 */ li r3, 0x1c00 +/* 80004EC8 00001EC8 4C 00 00 64 */ rfi +/* 80004ECC 00001ECC 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004ED0 00001ED0 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004ED4 00001ED4 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004ED8 00001ED8 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004EDC 00001EDC 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004EE0 00001EE0 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004EE4 00001EE4 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004EE8 00001EE8 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004EEC 00001EEC 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004EF0 00001EF0 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004EF4 00001EF4 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004EF8 00001EF8 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004EFC 00001EFC 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004F00 00001F00 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004F04 00001F04 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004F08 00001F08 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004F0C 00001F0C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004F10 00001F10 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004F14 00001F14 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004F18 00001F18 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004F1C 00001F1C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004F20 00001F20 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004F24 00001F24 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004F28 00001F28 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004F2C 00001F2C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004F30 00001F30 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004F34 00001F34 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004F38 00001F38 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004F3C 00001F3C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004F40 00001F40 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004F44 00001F44 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004F48 00001F48 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004F4C 00001F4C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004F50 00001F50 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004F54 00001F54 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004F58 00001F58 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004F5C 00001F5C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004F60 00001F60 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004F64 00001F64 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004F68 00001F68 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004F6C 00001F6C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004F70 00001F70 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004F74 00001F74 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004F78 00001F78 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004F7C 00001F7C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004F80 00001F80 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004F84 00001F84 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004F88 00001F88 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004F8C 00001F8C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004F90 00001F90 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004F94 00001F94 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004F98 00001F98 7C 51 43 A6 */ mtspr 0x111, r2 +/* 80004F9C 00001F9C 7C 72 43 A6 */ mtspr 0x112, r3 +/* 80004FA0 00001FA0 7C 93 43 A6 */ mtspr 0x113, r4 +/* 80004FA4 00001FA4 7C 5A 02 A6 */ mfspr r2, 0x1a +/* 80004FA8 00001FA8 7C 9B 02 A6 */ mfspr r4, 0x1b +/* 80004FAC 00001FAC 7C 60 00 A6 */ mfmsr r3 +/* 80004FB0 00001FB0 60 63 00 30 */ ori r3, r3, 0x30 +/* 80004FB4 00001FB4 7C 7B 03 A6 */ mtspr 0x1b, r3 +/* 80004FB8 00001FB8 3C 60 80 08 */ lis r3, TRKInterruptHandler@h +/* 80004FBC 00001FBC 60 63 AD D8 */ ori r3, r3, TRKInterruptHandler@l +/* 80004FC0 00001FC0 7C 7A 03 A6 */ mtspr 0x1a, r3 +/* 80004FC4 00001FC4 38 60 1D 00 */ li r3, 0x1d00 +/* 80004FC8 00001FC8 4C 00 00 64 */ rfi +/* 80004FCC 00001FCC 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004FD0 00001FD0 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004FD4 00001FD4 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004FD8 00001FD8 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004FDC 00001FDC 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004FE0 00001FE0 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004FE4 00001FE4 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004FE8 00001FE8 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004FEC 00001FEC 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004FF0 00001FF0 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004FF4 00001FF4 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004FF8 00001FF8 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004FFC 00001FFC 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005000 00002000 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005004 00002004 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005008 00002008 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 8000500C 0000200C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005010 00002010 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005014 00002014 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005018 00002018 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 8000501C 0000201C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005020 00002020 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005024 00002024 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005028 00002028 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 8000502C 0000202C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005030 00002030 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005034 00002034 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005038 00002038 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 8000503C 0000203C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005040 00002040 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005044 00002044 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005048 00002048 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 8000504C 0000204C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005050 00002050 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005054 00002054 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005058 00002058 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 8000505C 0000205C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005060 00002060 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005064 00002064 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005068 00002068 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 8000506C 0000206C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005070 00002070 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005074 00002074 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005078 00002078 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 8000507C 0000207C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005080 00002080 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005084 00002084 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005088 00002088 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 8000508C 0000208C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005090 00002090 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005094 00002094 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005098 00002098 7C 51 43 A6 */ mtspr 0x111, r2 +/* 8000509C 0000209C 7C 72 43 A6 */ mtspr 0x112, r3 +/* 800050A0 000020A0 7C 93 43 A6 */ mtspr 0x113, r4 +/* 800050A4 000020A4 7C 5A 02 A6 */ mfspr r2, 0x1a +/* 800050A8 000020A8 7C 9B 02 A6 */ mfspr r4, 0x1b +/* 800050AC 000020AC 7C 60 00 A6 */ mfmsr r3 +/* 800050B0 000020B0 60 63 00 30 */ ori r3, r3, 0x30 +/* 800050B4 000020B4 7C 7B 03 A6 */ mtspr 0x1b, r3 +/* 800050B8 000020B8 3C 60 80 08 */ lis r3, TRKInterruptHandler@h +/* 800050BC 000020BC 60 63 AD D8 */ ori r3, r3, TRKInterruptHandler@l +/* 800050C0 000020C0 7C 7A 03 A6 */ mtspr 0x1a, r3 +/* 800050C4 000020C4 38 60 1E 00 */ li r3, 0x1e00 +/* 800050C8 000020C8 4C 00 00 64 */ rfi +/* 800050CC 000020CC 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 800050D0 000020D0 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 800050D4 000020D4 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 800050D8 000020D8 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 800050DC 000020DC 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 800050E0 000020E0 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 800050E4 000020E4 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 800050E8 000020E8 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 800050EC 000020EC 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 800050F0 000020F0 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 800050F4 000020F4 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 800050F8 000020F8 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 800050FC 000020FC 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005100 00002100 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005104 00002104 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005108 00002108 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 8000510C 0000210C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005110 00002110 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005114 00002114 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005118 00002118 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 8000511C 0000211C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005120 00002120 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005124 00002124 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005128 00002128 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 8000512C 0000212C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005130 00002130 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005134 00002134 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005138 00002138 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 8000513C 0000213C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005140 00002140 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005144 00002144 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005148 00002148 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 8000514C 0000214C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005150 00002150 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005154 00002154 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005158 00002158 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 8000515C 0000215C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005160 00002160 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005164 00002164 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005168 00002168 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 8000516C 0000216C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005170 00002170 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005174 00002174 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005178 00002178 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 8000517C 0000217C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005180 00002180 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005184 00002184 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005188 00002188 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 8000518C 0000218C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005190 00002190 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005194 00002194 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005198 00002198 7C 51 43 A6 */ mtspr 0x111, r2 +/* 8000519C 0000219C 7C 72 43 A6 */ mtspr 0x112, r3 +/* 800051A0 000021A0 7C 93 43 A6 */ mtspr 0x113, r4 +/* 800051A4 000021A4 7C 5A 02 A6 */ mfspr r2, 0x1a +/* 800051A8 000021A8 7C 9B 02 A6 */ mfspr r4, 0x1b +/* 800051AC 000021AC 7C 60 00 A6 */ mfmsr r3 +/* 800051B0 000021B0 60 63 00 30 */ ori r3, r3, 0x30 +/* 800051B4 000021B4 7C 7B 03 A6 */ mtspr 0x1b, r3 +/* 800051B8 000021B8 3C 60 80 08 */ lis r3, TRKInterruptHandler@h +/* 800051BC 000021BC 60 63 AD D8 */ ori r3, r3, TRKInterruptHandler@l +/* 800051C0 000021C0 7C 7A 03 A6 */ mtspr 0x1a, r3 +/* 800051C4 000021C4 38 60 1F 00 */ li r3, 0x1f00 +/* 800051C8 000021C8 4C 00 00 64 */ rfi diff --git a/asm/TRK_MINNOW_DOLPHIN/dispatch.s b/asm/TRK_MINNOW_DOLPHIN/dispatch.s new file mode 100644 index 0000000..4d79595 --- /dev/null +++ b/asm/TRK_MINNOW_DOLPHIN/dispatch.s @@ -0,0 +1,90 @@ +.include "macros.inc" + +.section .text, "ax" # 0x80005600 - 0x8036FBA0 +.global TRKInitializeDispatcher +TRKInitializeDispatcher: +/* 80088A94 000859D4 3C 60 80 3F */ lis r3, gTRKDispatchTableSize@ha +/* 80088A98 000859D8 38 00 00 20 */ li r0, 0x20 +/* 80088A9C 000859DC 90 03 AA D8 */ stw r0, gTRKDispatchTableSize@l(r3) +/* 80088AA0 000859E0 38 60 00 00 */ li r3, 0 +/* 80088AA4 000859E4 4E 80 00 20 */ blr + +.global TRKDispatchMessage +TRKDispatchMessage: +/* 80088AA8 000859E8 7C 08 02 A6 */ mflr r0 +/* 80088AAC 000859EC 38 80 00 00 */ li r4, 0 +/* 80088AB0 000859F0 90 01 00 04 */ stw r0, 4(r1) +/* 80088AB4 000859F4 94 21 FF E8 */ stwu r1, -0x18(r1) +/* 80088AB8 000859F8 93 E1 00 14 */ stw r31, 0x14(r1) +/* 80088ABC 000859FC 3B E0 05 00 */ li r31, 0x500 +/* 80088AC0 00085A00 93 C1 00 10 */ stw r30, 0x10(r1) +/* 80088AC4 00085A04 3B C3 00 00 */ addi r30, r3, 0 +/* 80088AC8 00085A08 4B FF F7 A9 */ bl TRKSetBufferPosition +/* 80088ACC 00085A0C 38 7E 00 00 */ addi r3, r30, 0 +/* 80088AD0 00085A10 38 81 00 08 */ addi r4, r1, 8 +/* 80088AD4 00085A14 4B FF FB 21 */ bl TRKReadBuffer1_ui8 +/* 80088AD8 00085A18 3C 60 80 3F */ lis r3, gTRKDispatchTableSize@ha +/* 80088ADC 00085A1C 88 81 00 08 */ lbz r4, 8(r1) +/* 80088AE0 00085A20 80 03 AA D8 */ lwz r0, gTRKDispatchTableSize@l(r3) +/* 80088AE4 00085A24 7C 04 00 40 */ cmplw r4, r0 +/* 80088AE8 00085A28 40 80 00 28 */ bge lbl_80088B10 +/* 80088AEC 00085A2C 3C 60 80 3B */ lis r3, gTRKDispatchTable@ha +/* 80088AF0 00085A30 54 84 10 3A */ slwi r4, r4, 2 +/* 80088AF4 00085A34 38 03 EF 58 */ addi r0, r3, gTRKDispatchTable@l +/* 80088AF8 00085A38 7C 60 22 14 */ add r3, r0, r4 +/* 80088AFC 00085A3C 81 83 00 00 */ lwz r12, 0(r3) +/* 80088B00 00085A40 38 7E 00 00 */ addi r3, r30, 0 +/* 80088B04 00085A44 7D 88 03 A6 */ mtlr r12 +/* 80088B08 00085A48 4E 80 00 21 */ blrl +/* 80088B0C 00085A4C 7C 7F 1B 78 */ mr r31, r3 +lbl_80088B10: +/* 80088B10 00085A50 7F E3 FB 78 */ mr r3, r31 +/* 80088B14 00085A54 83 E1 00 14 */ lwz r31, 0x14(r1) +/* 80088B18 00085A58 83 C1 00 10 */ lwz r30, 0x10(r1) +/* 80088B1C 00085A5C 38 21 00 18 */ addi r1, r1, 0x18 +/* 80088B20 00085A60 80 01 00 04 */ lwz r0, 4(r1) +/* 80088B24 00085A64 7C 08 03 A6 */ mtlr r0 +/* 80088B28 00085A68 4E 80 00 20 */ blr + +.section .data, "wa" # 0x803A8380 - 0x803E6000 +.global gTRKDispatchTable +gTRKDispatchTable: + .4byte TRKDoUnsupported + .4byte TRKDoConnect + .4byte TRKDoDisconnect + .4byte TRKDoReset + .4byte TRKDoVersions + .4byte TRKDoSupportMask + .4byte TRKDoCPUType + .4byte TRKDoUnsupported + .4byte TRKDoUnsupported + .4byte TRKDoUnsupported + .4byte TRKDoUnsupported + .4byte TRKDoUnsupported + .4byte TRKDoUnsupported + .4byte TRKDoUnsupported + .4byte TRKDoUnsupported + .4byte TRKDoUnsupported + .4byte TRKDoReadMemory + .4byte TRKDoWriteMemory + .4byte TRKDoReadRegisters + .4byte TRKDoWriteRegisters + .4byte TRKDoUnsupported + .4byte TRKDoUnsupported + .4byte TRKDoFlushCache + .4byte TRKDoUnsupported + .4byte TRKDoContinue + .4byte TRKDoStep + .4byte TRKDoStop + .4byte TRKDoUnsupported + .4byte TRKDoUnsupported + .4byte TRKDoUnsupported + .4byte TRKDoUnsupported + .4byte TRKDoUnsupported + .4byte 0 + .4byte 0 + +.section .bss, "wa" # 0x803E6000 - 0x80408AC0 +.global gTRKDispatchTableSize +gTRKDispatchTableSize: + .skip 0x8 diff --git a/asm/TRK_MINNOW_DOLPHIN/dolphin_trk.s b/asm/TRK_MINNOW_DOLPHIN/dolphin_trk.s new file mode 100644 index 0000000..785fa4f --- /dev/null +++ b/asm/TRK_MINNOW_DOLPHIN/dolphin_trk.s @@ -0,0 +1,206 @@ +.include "macros.inc" + +.section .init, "ax" # 0x80003100 - 0x80005540 +.global __TRK_reset +__TRK_reset: +/* 800051CC 000021CC 7C 08 02 A6 */ mflr r0 +/* 800051D0 000021D0 90 01 00 04 */ stw r0, 4(r1) +/* 800051D4 000021D4 94 21 FF F8 */ stwu r1, -8(r1) +/* 800051D8 000021D8 48 08 69 99 */ bl __TRK_copy_vectors +/* 800051DC 000021DC 38 21 00 08 */ addi r1, r1, 8 +/* 800051E0 000021E0 80 01 00 04 */ lwz r0, 4(r1) +/* 800051E4 000021E4 7C 08 03 A6 */ mtlr r0 +/* 800051E8 000021E8 4E 80 00 20 */ blr + +.section .text, "ax" # 0x80005600 - 0x8036FBA0 +.global InitMetroTRK +InitMetroTRK: +/* 8008BA14 00088954 38 21 FF FC */ addi r1, r1, -4 +/* 8008BA18 00088958 90 61 00 00 */ stw r3, 0(r1) +/* 8008BA1C 0008895C 3C 60 80 3E */ lis r3, gTRKCPUState@h +/* 8008BA20 00088960 60 63 AC 30 */ ori r3, r3, gTRKCPUState@l +/* 8008BA24 00088964 BC 03 00 00 */ stmw r0, 0(r3) +/* 8008BA28 00088968 80 81 00 00 */ lwz r4, 0(r1) +/* 8008BA2C 0008896C 38 21 00 04 */ addi r1, r1, 4 +/* 8008BA30 00088970 90 23 00 04 */ stw r1, 4(r3) +/* 8008BA34 00088974 90 83 00 0C */ stw r4, 0xc(r3) +/* 8008BA38 00088978 7C 88 02 A6 */ mflr r4 +/* 8008BA3C 0008897C 90 83 00 84 */ stw r4, 0x84(r3) +/* 8008BA40 00088980 90 83 00 80 */ stw r4, 0x80(r3) +/* 8008BA44 00088984 7C 80 00 26 */ mfcr r4 +/* 8008BA48 00088988 90 83 00 88 */ stw r4, 0x88(r3) +/* 8008BA4C 0008898C 7C 80 00 A6 */ mfmsr r4 +/* 8008BA50 00088990 60 83 80 00 */ ori r3, r4, 0x8000 +/* 8008BA54 00088994 68 63 80 00 */ xori r3, r3, 0x8000 +/* 8008BA58 00088998 7C 60 01 24 */ mtmsr r3 +/* 8008BA5C 0008899C 7C 9B 03 A6 */ mtspr 0x1b, r4 +/* 8008BA60 000889A0 48 00 01 F5 */ bl TRKSaveExtended1Block +/* 8008BA64 000889A4 3C 60 80 3E */ lis r3, gTRKCPUState@h +/* 8008BA68 000889A8 60 63 AC 30 */ ori r3, r3, gTRKCPUState@l +/* 8008BA6C 000889AC B8 03 00 00 */ .4byte 0xB8030000 /* illegal lmw r0, 0(r3) */ +/* 8008BA70 000889B0 38 00 00 00 */ li r0, 0 +/* 8008BA74 000889B4 7C 12 FB A6 */ mtspr 0x3f2, r0 +/* 8008BA78 000889B8 7C 15 FB A6 */ mtspr 0x3f5, r0 +/* 8008BA7C 000889BC 3C 20 80 42 */ lis r1, 0x80426008@h +/* 8008BA80 000889C0 60 21 60 08 */ ori r1, r1, 0x80426008@l +/* 8008BA84 000889C4 7C A3 2B 78 */ mr r3, r5 +/* 8008BA88 000889C8 48 00 06 4D */ bl InitMetroTRKCommTable +/* 8008BA8C 000889CC 2C 03 00 01 */ cmpwi r3, 1 +/* 8008BA90 000889D0 40 82 00 14 */ bne lbl_8008BAA4 +/* 8008BA94 000889D4 80 83 00 84 */ lwz r4, 0x84(r3) +/* 8008BA98 000889D8 7C 88 03 A6 */ mtlr r4 +/* 8008BA9C 000889DC B8 03 00 00 */ .4byte 0xB8030000 /* illegal lmw r0, 0(r3) */ +/* 8008BAA0 000889E0 4E 80 00 20 */ blr +lbl_8008BAA4: +/* 8008BAA4 000889E4 48 00 05 28 */ b TRK_main + +.global EnableMetroTRKInterrupts +EnableMetroTRKInterrupts: +/* 8008BAA8 000889E8 7C 08 02 A6 */ mflr r0 +/* 8008BAAC 000889EC 90 01 00 04 */ stw r0, 4(r1) +/* 8008BAB0 000889F0 94 21 FF F8 */ stwu r1, -8(r1) +/* 8008BAB4 000889F4 48 00 07 4D */ bl EnableEXI2Interrupts +/* 8008BAB8 000889F8 38 21 00 08 */ addi r1, r1, 8 +/* 8008BABC 000889FC 80 01 00 04 */ lwz r0, 4(r1) +/* 8008BAC0 00088A00 7C 08 03 A6 */ mtlr r0 +/* 8008BAC4 00088A04 4E 80 00 20 */ blr + +.global TRKTargetTranslate +TRKTargetTranslate: +/* 8008BAC8 00088A08 3C 80 80 3F */ lis r4, lc_base@ha +/* 8008BACC 00088A0C 38 84 B0 60 */ addi r4, r4, lc_base@l +/* 8008BAD0 00088A10 80 84 00 00 */ lwz r4, 0(r4) +/* 8008BAD4 00088A14 7C 03 20 40 */ cmplw r3, r4 +/* 8008BAD8 00088A18 41 80 00 2C */ blt lbl_8008BB04 +/* 8008BADC 00088A1C 38 04 40 00 */ addi r0, r4, 0x4000 +/* 8008BAE0 00088A20 7C 03 00 40 */ cmplw r3, r0 +/* 8008BAE4 00088A24 40 80 00 20 */ bge lbl_8008BB04 +/* 8008BAE8 00088A28 3C 80 80 3F */ lis r4, gTRKCPUState@ha +/* 8008BAEC 00088A2C 38 84 AC 30 */ addi r4, r4, gTRKCPUState@l +/* 8008BAF0 00088A30 80 04 02 38 */ lwz r0, 0x238(r4) +/* 8008BAF4 00088A34 54 00 07 BE */ clrlwi r0, r0, 0x1e +/* 8008BAF8 00088A38 28 00 00 00 */ cmplwi r0, 0 +/* 8008BAFC 00088A3C 41 82 00 08 */ beq lbl_8008BB04 +/* 8008BB00 00088A40 48 00 00 0C */ b lbl_8008BB0C +lbl_8008BB04: +/* 8008BB04 00088A44 54 60 00 BE */ clrlwi r0, r3, 2 +/* 8008BB08 00088A48 64 03 80 00 */ oris r3, r0, 0x8000 +lbl_8008BB0C: +/* 8008BB0C 00088A4C 4E 80 00 20 */ blr + +.global TRK_copy_vector +TRK_copy_vector: +/* 8008BB10 00088A50 7C 08 02 A6 */ mflr r0 +/* 8008BB14 00088A54 90 01 00 04 */ stw r0, 4(r1) +/* 8008BB18 00088A58 94 21 FF F0 */ stwu r1, -0x10(r1) +/* 8008BB1C 00088A5C 93 E1 00 0C */ stw r31, 0xc(r1) +/* 8008BB20 00088A60 93 C1 00 08 */ stw r30, 8(r1) +/* 8008BB24 00088A64 7C 7E 1B 78 */ mr r30, r3 +/* 8008BB28 00088A68 7F C3 F3 78 */ mr r3, r30 +/* 8008BB2C 00088A6C 4B FF FF 9D */ bl TRKTargetTranslate +/* 8008BB30 00088A70 3C 80 80 00 */ lis r4, lbl_80003298@ha +/* 8008BB34 00088A74 38 04 32 98 */ addi r0, r4, lbl_80003298@l +/* 8008BB38 00088A78 7C 7F 1B 78 */ mr r31, r3 +/* 8008BB3C 00088A7C 7C 80 F2 14 */ add r4, r0, r30 +/* 8008BB40 00088A80 7F E3 FB 78 */ mr r3, r31 +/* 8008BB44 00088A84 38 A0 01 00 */ li r5, 0x100 +/* 8008BB48 00088A88 4B F7 76 FD */ bl TRK_memcpy +/* 8008BB4C 00088A8C 7F E3 FB 78 */ mr r3, r31 +/* 8008BB50 00088A90 38 80 01 00 */ li r4, 0x100 +/* 8008BB54 00088A94 4B FF E7 E9 */ bl TRK_flush_cache +/* 8008BB58 00088A98 83 E1 00 0C */ lwz r31, 0xc(r1) +/* 8008BB5C 00088A9C 83 C1 00 08 */ lwz r30, 8(r1) +/* 8008BB60 00088AA0 38 21 00 10 */ addi r1, r1, 0x10 +/* 8008BB64 00088AA4 80 01 00 04 */ lwz r0, 4(r1) +/* 8008BB68 00088AA8 7C 08 03 A6 */ mtlr r0 +/* 8008BB6C 00088AAC 4E 80 00 20 */ blr + +.global __TRK_copy_vectors +__TRK_copy_vectors: +/* 8008BB70 00088AB0 7C 08 02 A6 */ mflr r0 +/* 8008BB74 00088AB4 90 01 00 04 */ stw r0, 4(r1) +/* 8008BB78 00088AB8 94 21 FF E8 */ stwu r1, -0x18(r1) +/* 8008BB7C 00088ABC 93 E1 00 14 */ stw r31, 0x14(r1) +/* 8008BB80 00088AC0 93 C1 00 10 */ stw r30, 0x10(r1) +/* 8008BB84 00088AC4 93 A1 00 0C */ stw r29, 0xc(r1) +/* 8008BB88 00088AC8 93 81 00 08 */ stw r28, 8(r1) +/* 8008BB8C 00088ACC 38 60 00 44 */ li r3, 0x44 +/* 8008BB90 00088AD0 4B FF FF 39 */ bl TRKTargetTranslate +/* 8008BB94 00088AD4 3B A0 00 00 */ li r29, 0 +/* 8008BB98 00088AD8 83 83 00 00 */ lwz r28, 0(r3) +/* 8008BB9C 00088ADC 3C 60 80 3B */ lis r3, TRK_ISR_OFFSETS@ha +/* 8008BBA0 00088AE0 57 A4 10 3A */ slwi r4, r29, 2 +/* 8008BBA4 00088AE4 38 03 F0 48 */ addi r0, r3, TRK_ISR_OFFSETS@l +/* 8008BBA8 00088AE8 7F C0 22 14 */ add r30, r0, r4 +/* 8008BBAC 00088AEC 48 00 00 04 */ b lbl_8008BBB0 +lbl_8008BBB0: +/* 8008BBB0 00088AF0 3B E0 00 01 */ li r31, 1 +/* 8008BBB4 00088AF4 48 00 00 04 */ b lbl_8008BBB8 +lbl_8008BBB8: +/* 8008BBB8 00088AF8 48 00 00 04 */ b lbl_8008BBBC +lbl_8008BBBC: +/* 8008BBBC 00088AFC 7F E0 E8 30 */ slw r0, r31, r29 +/* 8008BBC0 00088B00 7F 80 00 38 */ and r0, r28, r0 +/* 8008BBC4 00088B04 28 00 00 00 */ cmplwi r0, 0 +/* 8008BBC8 00088B08 41 82 00 0C */ beq lbl_8008BBD4 +/* 8008BBCC 00088B0C 80 7E 00 00 */ lwz r3, 0(r30) +/* 8008BBD0 00088B10 4B FF FF 41 */ bl TRK_copy_vector +lbl_8008BBD4: +/* 8008BBD4 00088B14 3B DE 00 04 */ addi r30, r30, 4 +/* 8008BBD8 00088B18 3B BD 00 01 */ addi r29, r29, 1 +/* 8008BBDC 00088B1C 2C 1D 00 0E */ cmpwi r29, 0xe +/* 8008BBE0 00088B20 40 81 FF DC */ ble lbl_8008BBBC +/* 8008BBE4 00088B24 83 E1 00 14 */ lwz r31, 0x14(r1) +/* 8008BBE8 00088B28 83 C1 00 10 */ lwz r30, 0x10(r1) +/* 8008BBEC 00088B2C 83 A1 00 0C */ lwz r29, 0xc(r1) +/* 8008BBF0 00088B30 83 81 00 08 */ lwz r28, 8(r1) +/* 8008BBF4 00088B34 38 21 00 18 */ addi r1, r1, 0x18 +/* 8008BBF8 00088B38 80 01 00 04 */ lwz r0, 4(r1) +/* 8008BBFC 00088B3C 7C 08 03 A6 */ mtlr r0 +/* 8008BC00 00088B40 4E 80 00 20 */ blr + +.global TRKInitializeTarget +TRKInitializeTarget: +/* 8008BC04 00088B44 7C 08 02 A6 */ mflr r0 +/* 8008BC08 00088B48 90 01 00 04 */ stw r0, 4(r1) +/* 8008BC0C 00088B4C 94 21 FF F0 */ stwu r1, -0x10(r1) +/* 8008BC10 00088B50 93 E1 00 0C */ stw r31, 0xc(r1) +/* 8008BC14 00088B54 3C 60 80 3F */ lis r3, gTRKState@ha +/* 8008BC18 00088B58 3B E3 AB 88 */ addi r31, r3, gTRKState@l +/* 8008BC1C 00088B5C 38 00 00 01 */ li r0, 1 +/* 8008BC20 00088B60 90 1F 00 98 */ stw r0, 0x98(r31) +/* 8008BC24 00088B64 4B FF E8 15 */ bl __TRK_get_MSR +/* 8008BC28 00088B68 90 7F 00 8C */ stw r3, 0x8c(r31) +/* 8008BC2C 00088B6C 3C 60 80 3F */ lis r3, lc_base@ha +/* 8008BC30 00088B70 38 63 B0 60 */ addi r3, r3, lc_base@l +/* 8008BC34 00088B74 3C 00 E0 00 */ lis r0, 0xe000 +/* 8008BC38 00088B78 90 03 00 00 */ stw r0, 0(r3) +/* 8008BC3C 00088B7C 38 60 00 00 */ li r3, 0 +/* 8008BC40 00088B80 83 E1 00 0C */ lwz r31, 0xc(r1) +/* 8008BC44 00088B84 38 21 00 10 */ addi r1, r1, 0x10 +/* 8008BC48 00088B88 80 01 00 04 */ lwz r0, 4(r1) +/* 8008BC4C 00088B8C 7C 08 03 A6 */ mtlr r0 +/* 8008BC50 00088B90 4E 80 00 20 */ blr + +.section .data, "wa" # 0x803A8380 - 0x803E6000 +TRK_ISR_OFFSETS: + .4byte 0x00000100 + .4byte 0x00000200 + .4byte 0x00000300 + .4byte 0x00000400 + .4byte 0x00000500 + .4byte 0x00000600 + .4byte 0x00000700 + .4byte 0x00000800 + .4byte 0x00000900 + .4byte 0x00000C00 + .4byte 0x00000D00 + .4byte 0x00000F00 + .4byte 0x00001300 + .4byte 0x00001400 + .4byte 0x00001700 + .4byte 0 + +.section .bss, "wa" # 0x803E6000 - 0x80408AC0 +lc_base: + .skip 0x8 diff --git a/asm/TRK_MINNOW_DOLPHIN/dolphin_trk_glue.s b/asm/TRK_MINNOW_DOLPHIN/dolphin_trk_glue.s new file mode 100644 index 0000000..05d9227 --- /dev/null +++ b/asm/TRK_MINNOW_DOLPHIN/dolphin_trk_glue.s @@ -0,0 +1,271 @@ +.include "macros.inc" + +.section .text, "ax" # 0x80005600 - 0x8036FBA0 +.global TRKLoadContext +TRKLoadContext: +/* 8008C014 00088F54 80 03 00 00 */ lwz r0, 0(r3) +/* 8008C018 00088F58 80 23 00 04 */ lwz r1, 4(r3) +/* 8008C01C 00088F5C 80 43 00 08 */ lwz r2, 8(r3) +/* 8008C020 00088F60 A0 A3 01 A2 */ lhz r5, 0x1a2(r3) +/* 8008C024 00088F64 54 A6 07 BD */ rlwinm. r6, r5, 0, 0x1e, 0x1e +/* 8008C028 00088F68 41 82 00 14 */ beq lbl_8008C03C +/* 8008C02C 00088F6C 54 A5 07 FA */ rlwinm r5, r5, 0, 0x1f, 0x1d +/* 8008C030 00088F70 B0 A3 01 A2 */ sth r5, 0x1a2(r3) +/* 8008C034 00088F74 B8 A3 00 14 */ lmw r5, 0x14(r3) +/* 8008C038 00088F78 48 00 00 08 */ b lbl_8008C040 +lbl_8008C03C: +/* 8008C03C 00088F7C B9 A3 00 34 */ lmw r13, 0x34(r3) +lbl_8008C040: +/* 8008C040 00088F80 7C 7F 1B 78 */ mr r31, r3 +/* 8008C044 00088F84 7C 83 23 78 */ mr r3, r4 +/* 8008C048 00088F88 80 9F 00 80 */ lwz r4, 0x80(r31) +/* 8008C04C 00088F8C 7C 8F F1 20 */ mtcrf 0xff, r4 +/* 8008C050 00088F90 80 9F 00 84 */ lwz r4, 0x84(r31) +/* 8008C054 00088F94 7C 88 03 A6 */ mtlr r4 +/* 8008C058 00088F98 80 9F 00 88 */ lwz r4, 0x88(r31) +/* 8008C05C 00088F9C 7C 89 03 A6 */ mtctr r4 +/* 8008C060 00088FA0 80 9F 00 8C */ lwz r4, 0x8c(r31) +/* 8008C064 00088FA4 7C 81 03 A6 */ mtxer r4 +/* 8008C068 00088FA8 7C 80 00 A6 */ mfmsr r4 +/* 8008C06C 00088FAC 54 84 04 5E */ rlwinm r4, r4, 0, 0x11, 0xf +/* 8008C070 00088FB0 54 84 07 FA */ rlwinm r4, r4, 0, 0x1f, 0x1d +/* 8008C074 00088FB4 7C 80 01 24 */ mtmsr r4 +/* 8008C078 00088FB8 7C 51 43 A6 */ mtspr 0x111, r2 +/* 8008C07C 00088FBC 80 9F 00 0C */ lwz r4, 0xc(r31) +/* 8008C080 00088FC0 7C 92 43 A6 */ mtspr 0x112, r4 +/* 8008C084 00088FC4 80 9F 00 10 */ lwz r4, 0x10(r31) +/* 8008C088 00088FC8 7C 93 43 A6 */ mtspr 0x113, r4 +/* 8008C08C 00088FCC 80 5F 01 98 */ lwz r2, 0x198(r31) +/* 8008C090 00088FD0 80 9F 01 9C */ lwz r4, 0x19c(r31) +/* 8008C094 00088FD4 83 FF 00 7C */ lwz r31, 0x7c(r31) +/* 8008C098 00088FD8 4B FF ED 40 */ b TRKInterruptHandler + +.global TRKEXICallBack +TRKEXICallBack: +/* 8008C09C 00088FDC 7C 08 02 A6 */ mflr r0 +/* 8008C0A0 00088FE0 90 01 00 04 */ stw r0, 4(r1) +/* 8008C0A4 00088FE4 94 21 FF F0 */ stwu r1, -0x10(r1) +/* 8008C0A8 00088FE8 93 E1 00 0C */ stw r31, 0xc(r1) +/* 8008C0AC 00088FEC 7C 9F 23 78 */ mr r31, r4 +/* 8008C0B0 00088FF0 48 00 6C 59 */ bl OSEnableScheduler +/* 8008C0B4 00088FF4 7F E3 FB 78 */ mr r3, r31 +/* 8008C0B8 00088FF8 38 80 05 00 */ li r4, 0x500 +/* 8008C0BC 00088FFC 4B FF FF 59 */ bl TRKLoadContext +/* 8008C0C0 00089000 83 E1 00 0C */ lwz r31, 0xc(r1) +/* 8008C0C4 00089004 38 21 00 10 */ addi r1, r1, 0x10 +/* 8008C0C8 00089008 80 01 00 04 */ lwz r0, 4(r1) +/* 8008C0CC 0008900C 7C 08 03 A6 */ mtlr r0 +/* 8008C0D0 00089010 4E 80 00 20 */ blr + +.global InitMetroTRKCommTable +InitMetroTRKCommTable: +/* 8008C0D4 00089014 7C 08 02 A6 */ mflr r0 +/* 8008C0D8 00089018 90 01 00 04 */ stw r0, 4(r1) +/* 8008C0DC 0008901C 94 21 FF F8 */ stwu r1, -8(r1) +/* 8008C0E0 00089020 2C 03 00 01 */ cmpwi r3, 1 +/* 8008C0E4 00089024 40 82 00 68 */ bne lbl_8008C14C +/* 8008C0E8 00089028 48 02 2F 29 */ bl Hu_IsStub +/* 8008C0EC 0008902C 3C A0 80 0B */ lis r5, DBInitComm@ha +/* 8008C0F0 00089030 3C 80 80 3B */ lis r4, gDBCommTable@ha +/* 8008C0F4 00089034 38 05 E9 44 */ addi r0, r5, DBInitComm@l +/* 8008C0F8 00089038 38 A4 F0 88 */ addi r5, r4, gDBCommTable@l +/* 8008C0FC 0008903C 3C 80 80 0B */ lis r4, DBInitInterrupts@ha +/* 8008C100 00089040 90 05 00 00 */ stw r0, 0(r5) +/* 8008C104 00089044 38 04 E8 F0 */ addi r0, r4, DBInitInterrupts@l +/* 8008C108 00089048 3C 80 80 0B */ lis r4, DBQueryData@ha +/* 8008C10C 0008904C 90 05 00 04 */ stw r0, 4(r5) +/* 8008C110 00089050 38 04 E8 54 */ addi r0, r4, DBQueryData@l +/* 8008C114 00089054 3C 80 80 0B */ lis r4, DBRead@ha +/* 8008C118 00089058 90 05 00 08 */ stw r0, 8(r5) +/* 8008C11C 0008905C 38 04 E7 C8 */ addi r0, r4, DBRead@l +/* 8008C120 00089060 3C 80 80 0B */ lis r4, DBWrite@ha +/* 8008C124 00089064 90 05 00 0C */ stw r0, 0xc(r5) +/* 8008C128 00089068 38 04 E5 68 */ addi r0, r4, DBWrite@l +/* 8008C12C 0008906C 3C 80 80 0B */ lis r4, DBOpen@ha +/* 8008C130 00089070 90 05 00 10 */ stw r0, 0x10(r5) +/* 8008C134 00089074 38 04 E5 64 */ addi r0, r4, DBOpen@l +/* 8008C138 00089078 3C 80 80 0B */ lis r4, DBClose@ha +/* 8008C13C 0008907C 90 05 00 14 */ stw r0, 0x14(r5) +/* 8008C140 00089080 38 04 E5 60 */ addi r0, r4, DBClose@l +/* 8008C144 00089084 90 05 00 18 */ stw r0, 0x18(r5) +/* 8008C148 00089088 48 00 00 64 */ b lbl_8008C1AC +lbl_8008C14C: +/* 8008C14C 0008908C 48 02 2E BD */ bl AMC_IsStub +/* 8008C150 00089090 3C A0 80 0B */ lis r5, EXI2_Init@ha +/* 8008C154 00089094 3C 80 80 3B */ lis r4, gDBCommTable@ha +/* 8008C158 00089098 38 05 EF E0 */ addi r0, r5, EXI2_Init@l +/* 8008C15C 0008909C 38 A4 F0 88 */ addi r5, r4, gDBCommTable@l +/* 8008C160 000890A0 3C 80 80 0B */ lis r4, EXI2_EnableInterrupts@ha +/* 8008C164 000890A4 90 05 00 00 */ stw r0, 0(r5) +/* 8008C168 000890A8 38 04 EF E4 */ addi r0, r4, EXI2_EnableInterrupts@l +/* 8008C16C 000890AC 3C 80 80 0B */ lis r4, EXI2_Poll@ha +/* 8008C170 000890B0 90 05 00 04 */ stw r0, 4(r5) +/* 8008C174 000890B4 38 04 EF E8 */ addi r0, r4, EXI2_Poll@l +/* 8008C178 000890B8 3C 80 80 0B */ lis r4, EXI2_ReadN@ha +/* 8008C17C 000890BC 90 05 00 08 */ stw r0, 8(r5) +/* 8008C180 000890C0 38 04 EF F0 */ addi r0, r4, EXI2_ReadN@l +/* 8008C184 000890C4 3C 80 80 0B */ lis r4, EXI2_WriteN@ha +/* 8008C188 000890C8 90 05 00 0C */ stw r0, 0xc(r5) +/* 8008C18C 000890CC 38 04 EF F8 */ addi r0, r4, EXI2_WriteN@l +/* 8008C190 000890D0 3C 80 80 0B */ lis r4, EXI2_Reserve@ha +/* 8008C194 000890D4 90 05 00 10 */ stw r0, 0x10(r5) +/* 8008C198 000890D8 38 04 F0 00 */ addi r0, r4, EXI2_Reserve@l +/* 8008C19C 000890DC 3C 80 80 0B */ lis r4, EXI2_Unreserve@ha +/* 8008C1A0 000890E0 90 05 00 14 */ stw r0, 0x14(r5) +/* 8008C1A4 000890E4 38 04 F0 04 */ addi r0, r4, EXI2_Unreserve@l +/* 8008C1A8 000890E8 90 05 00 18 */ stw r0, 0x18(r5) +lbl_8008C1AC: +/* 8008C1AC 000890EC 38 21 00 08 */ addi r1, r1, 8 +/* 8008C1B0 000890F0 80 01 00 04 */ lwz r0, 4(r1) +/* 8008C1B4 000890F4 7C 08 03 A6 */ mtlr r0 +/* 8008C1B8 000890F8 4E 80 00 20 */ blr + +.global TRKUARTInterruptHandler +TRKUARTInterruptHandler: +/* 8008C1BC 000890FC 4E 80 00 20 */ blr + +.global TRKInitializeIntDrivenUART +TRKInitializeIntDrivenUART: +/* 8008C1C0 00089100 7C 08 02 A6 */ mflr r0 +/* 8008C1C4 00089104 90 01 00 04 */ stw r0, 4(r1) +/* 8008C1C8 00089108 94 21 FF F8 */ stwu r1, -8(r1) +/* 8008C1CC 0008910C 3C 60 80 3B */ lis r3, gDBCommTable@ha +/* 8008C1D0 00089110 38 63 F0 88 */ addi r3, r3, gDBCommTable@l +/* 8008C1D4 00089114 3C 80 80 09 */ lis r4, TRKEXICallBack@ha +/* 8008C1D8 00089118 81 83 00 00 */ lwz r12, 0(r3) +/* 8008C1DC 0008911C 38 84 C0 9C */ addi r4, r4, TRKEXICallBack@l +/* 8008C1E0 00089120 7C C3 33 78 */ mr r3, r6 +/* 8008C1E4 00089124 7D 88 03 A6 */ mtlr r12 +/* 8008C1E8 00089128 4E 80 00 21 */ blrl +/* 8008C1EC 0008912C 38 60 00 00 */ li r3, 0 +/* 8008C1F0 00089130 38 21 00 08 */ addi r1, r1, 8 +/* 8008C1F4 00089134 80 01 00 04 */ lwz r0, 4(r1) +/* 8008C1F8 00089138 7C 08 03 A6 */ mtlr r0 +/* 8008C1FC 0008913C 4E 80 00 20 */ blr + +.global EnableEXI2Interrupts +EnableEXI2Interrupts: +/* 8008C200 00089140 7C 08 02 A6 */ mflr r0 +/* 8008C204 00089144 90 01 00 04 */ stw r0, 4(r1) +/* 8008C208 00089148 94 21 FF F8 */ stwu r1, -8(r1) +/* 8008C20C 0008914C 3C 60 80 3B */ lis r3, gDBCommTable@ha +/* 8008C210 00089150 38 63 F0 88 */ addi r3, r3, gDBCommTable@l +/* 8008C214 00089154 81 83 00 04 */ lwz r12, 4(r3) +/* 8008C218 00089158 7D 88 03 A6 */ mtlr r12 +/* 8008C21C 0008915C 4E 80 00 21 */ blrl +/* 8008C220 00089160 38 21 00 08 */ addi r1, r1, 8 +/* 8008C224 00089164 80 01 00 04 */ lwz r0, 4(r1) +/* 8008C228 00089168 7C 08 03 A6 */ mtlr r0 +/* 8008C22C 0008916C 4E 80 00 20 */ blr + +.global TRKPollUART +TRKPollUART: +/* 8008C230 00089170 7C 08 02 A6 */ mflr r0 +/* 8008C234 00089174 90 01 00 04 */ stw r0, 4(r1) +/* 8008C238 00089178 94 21 FF F8 */ stwu r1, -8(r1) +/* 8008C23C 0008917C 3C 60 80 3B */ lis r3, gDBCommTable@ha +/* 8008C240 00089180 38 63 F0 88 */ addi r3, r3, gDBCommTable@l +/* 8008C244 00089184 81 83 00 08 */ lwz r12, 8(r3) +/* 8008C248 00089188 7D 88 03 A6 */ mtlr r12 +/* 8008C24C 0008918C 4E 80 00 21 */ blrl +/* 8008C250 00089190 38 21 00 08 */ addi r1, r1, 8 +/* 8008C254 00089194 80 01 00 04 */ lwz r0, 4(r1) +/* 8008C258 00089198 7C 08 03 A6 */ mtlr r0 +/* 8008C25C 0008919C 4E 80 00 20 */ blr + +.global TRKReadUARTN +TRKReadUARTN: +/* 8008C260 000891A0 7C 08 02 A6 */ mflr r0 +/* 8008C264 000891A4 90 01 00 04 */ stw r0, 4(r1) +/* 8008C268 000891A8 94 21 FF F8 */ stwu r1, -8(r1) +/* 8008C26C 000891AC 3C A0 80 3B */ lis r5, gDBCommTable@ha +/* 8008C270 000891B0 38 A5 F0 88 */ addi r5, r5, gDBCommTable@l +/* 8008C274 000891B4 81 85 00 0C */ lwz r12, 0xc(r5) +/* 8008C278 000891B8 7D 88 03 A6 */ mtlr r12 +/* 8008C27C 000891BC 4E 80 00 21 */ blrl +/* 8008C280 000891C0 2C 03 00 00 */ cmpwi r3, 0 +/* 8008C284 000891C4 40 82 00 0C */ bne lbl_8008C290 +/* 8008C288 000891C8 38 60 00 00 */ li r3, 0 +/* 8008C28C 000891CC 48 00 00 08 */ b lbl_8008C294 +lbl_8008C290: +/* 8008C290 000891D0 38 60 FF FF */ li r3, -1 +lbl_8008C294: +/* 8008C294 000891D4 38 21 00 08 */ addi r1, r1, 8 +/* 8008C298 000891D8 80 01 00 04 */ lwz r0, 4(r1) +/* 8008C29C 000891DC 7C 08 03 A6 */ mtlr r0 +/* 8008C2A0 000891E0 4E 80 00 20 */ blr + +.global TRKWriteUARTN +TRKWriteUARTN: +/* 8008C2A4 000891E4 7C 08 02 A6 */ mflr r0 +/* 8008C2A8 000891E8 90 01 00 04 */ stw r0, 4(r1) +/* 8008C2AC 000891EC 94 21 FF F8 */ stwu r1, -8(r1) +/* 8008C2B0 000891F0 3C A0 80 3B */ lis r5, gDBCommTable@ha +/* 8008C2B4 000891F4 38 A5 F0 88 */ addi r5, r5, gDBCommTable@l +/* 8008C2B8 000891F8 81 85 00 10 */ lwz r12, 0x10(r5) +/* 8008C2BC 000891FC 7D 88 03 A6 */ mtlr r12 +/* 8008C2C0 00089200 4E 80 00 21 */ blrl +/* 8008C2C4 00089204 2C 03 00 00 */ cmpwi r3, 0 +/* 8008C2C8 00089208 40 82 00 0C */ bne lbl_8008C2D4 +/* 8008C2CC 0008920C 38 60 00 00 */ li r3, 0 +/* 8008C2D0 00089210 48 00 00 08 */ b lbl_8008C2D8 +lbl_8008C2D4: +/* 8008C2D4 00089214 38 60 FF FF */ li r3, -1 +lbl_8008C2D8: +/* 8008C2D8 00089218 38 21 00 08 */ addi r1, r1, 8 +/* 8008C2DC 0008921C 80 01 00 04 */ lwz r0, 4(r1) +/* 8008C2E0 00089220 7C 08 03 A6 */ mtlr r0 +/* 8008C2E4 00089224 4E 80 00 20 */ blr + +.global ReserveEXI2Port +ReserveEXI2Port: +/* 8008C2E8 00089228 7C 08 02 A6 */ mflr r0 +/* 8008C2EC 0008922C 90 01 00 04 */ stw r0, 4(r1) +/* 8008C2F0 00089230 94 21 FF F8 */ stwu r1, -8(r1) +/* 8008C2F4 00089234 3C 60 80 3B */ lis r3, gDBCommTable@ha +/* 8008C2F8 00089238 38 63 F0 88 */ addi r3, r3, gDBCommTable@l +/* 8008C2FC 0008923C 81 83 00 14 */ lwz r12, 0x14(r3) +/* 8008C300 00089240 7D 88 03 A6 */ mtlr r12 +/* 8008C304 00089244 4E 80 00 21 */ blrl +/* 8008C308 00089248 38 21 00 08 */ addi r1, r1, 8 +/* 8008C30C 0008924C 80 01 00 04 */ lwz r0, 4(r1) +/* 8008C310 00089250 7C 08 03 A6 */ mtlr r0 +/* 8008C314 00089254 4E 80 00 20 */ blr + +.global UnreserveEXI2Port +UnreserveEXI2Port: +/* 8008C318 00089258 7C 08 02 A6 */ mflr r0 +/* 8008C31C 0008925C 90 01 00 04 */ stw r0, 4(r1) +/* 8008C320 00089260 94 21 FF F8 */ stwu r1, -8(r1) +/* 8008C324 00089264 3C 60 80 3B */ lis r3, gDBCommTable@ha +/* 8008C328 00089268 38 63 F0 88 */ addi r3, r3, gDBCommTable@l +/* 8008C32C 0008926C 81 83 00 18 */ lwz r12, 0x18(r3) +/* 8008C330 00089270 7D 88 03 A6 */ mtlr r12 +/* 8008C334 00089274 4E 80 00 21 */ blrl +/* 8008C338 00089278 38 21 00 08 */ addi r1, r1, 8 +/* 8008C33C 0008927C 80 01 00 04 */ lwz r0, 4(r1) +/* 8008C340 00089280 7C 08 03 A6 */ mtlr r0 +/* 8008C344 00089284 4E 80 00 20 */ blr + +.global TRK_board_display +TRK_board_display: +/* 8008C348 00089288 7C 08 02 A6 */ mflr r0 +/* 8008C34C 0008928C 90 01 00 04 */ stw r0, 4(r1) +/* 8008C350 00089290 94 21 FF F8 */ stwu r1, -8(r1) +/* 8008C354 00089294 4C C6 31 82 */ crclr 6 +/* 8008C358 00089298 48 00 2C 0D */ bl OSReport +/* 8008C35C 0008929C 38 21 00 08 */ addi r1, r1, 8 +/* 8008C360 000892A0 80 01 00 04 */ lwz r0, 4(r1) +/* 8008C364 000892A4 7C 08 03 A6 */ mtlr r0 +/* 8008C368 000892A8 4E 80 00 20 */ blr + +.section .data, "wa" # 0x803A8380 - 0x803E6000 +gDBCommTable: + .4byte 0 + .4byte 0 + .4byte 0 + .4byte 0 + .4byte 0 + .4byte 0 + .4byte 0 + .4byte 0 diff --git a/asm/TRK_MINNOW_DOLPHIN/flush_cache.s b/asm/TRK_MINNOW_DOLPHIN/flush_cache.s new file mode 100644 index 0000000..46dd87f --- /dev/null +++ b/asm/TRK_MINNOW_DOLPHIN/flush_cache.s @@ -0,0 +1,20 @@ +.include "macros.inc" + +.section .text, "ax" # 0x80005600 - 0x8036FBA0 +.global TRK_flush_cache +TRK_flush_cache: +/* 8008A33C 0008727C 3C A0 FF FF */ lis r5, 0xFFFFFFF1@h +/* 8008A340 00087280 60 A5 FF F1 */ ori r5, r5, 0xFFFFFFF1@l +/* 8008A344 00087284 7C A5 18 38 */ and r5, r5, r3 +/* 8008A348 00087288 7C 65 18 50 */ subf r3, r5, r3 +/* 8008A34C 0008728C 7C 84 1A 14 */ add r4, r4, r3 +lbl_8008A350: +/* 8008A350 00087290 7C 00 28 6C */ dcbst 0, r5 +/* 8008A354 00087294 7C 00 28 AC */ dcbf 0, r5 +/* 8008A358 00087298 7C 00 04 AC */ sync 0 +/* 8008A35C 0008729C 7C 00 2F AC */ icbi 0, r5 +/* 8008A360 000872A0 30 A5 00 08 */ addic r5, r5, 8 +/* 8008A364 000872A4 34 84 FF F8 */ addic. r4, r4, -8 +/* 8008A368 000872A8 40 80 FF E8 */ bge lbl_8008A350 +/* 8008A36C 000872AC 4C 00 01 2C */ isync +/* 8008A370 000872B0 4E 80 00 20 */ blr diff --git a/asm/TRK_MINNOW_DOLPHIN/main_TRK.s b/asm/TRK_MINNOW_DOLPHIN/main_TRK.s new file mode 100644 index 0000000..0cda882 --- /dev/null +++ b/asm/TRK_MINNOW_DOLPHIN/main_TRK.s @@ -0,0 +1,28 @@ +.include "macros.inc" + +.section .text, "ax" # 0x80005600 - 0x8036FBA0 +.global TRK_main +TRK_main: +/* 8008BFCC 00088F0C 7C 08 02 A6 */ mflr r0 +/* 8008BFD0 00088F10 90 01 00 04 */ stw r0, 4(r1) +/* 8008BFD4 00088F14 94 21 FF F8 */ stwu r1, -8(r1) +/* 8008BFD8 00088F18 4B FF BE ED */ bl TRKInitializeNub +/* 8008BFDC 00088F1C 3C 80 80 3F */ lis r4, TRK_mainError@ha +/* 8008BFE0 00088F20 94 64 B0 68 */ stwu r3, TRK_mainError@l(r4) +/* 8008BFE4 00088F24 80 04 00 00 */ lwz r0, 0(r4) +/* 8008BFE8 00088F28 2C 00 00 00 */ cmpwi r0, 0 +/* 8008BFEC 00088F2C 40 82 00 0C */ bne lbl_8008BFF8 +/* 8008BFF0 00088F30 4B FF BF CD */ bl TRKNubWelcome +/* 8008BFF4 00088F34 4B FF BB 81 */ bl TRKNubMainLoop +lbl_8008BFF8: +/* 8008BFF8 00088F38 4B FF BF A1 */ bl TRKTerminateNub +/* 8008BFFC 00088F3C 3C 80 80 3F */ lis r4, TRK_mainError@ha +/* 8008C000 00088F40 90 64 B0 68 */ stw r3, TRK_mainError@l(r4) +/* 8008C004 00088F44 38 21 00 08 */ addi r1, r1, 8 +/* 8008C008 00088F48 80 01 00 04 */ lwz r0, 4(r1) +/* 8008C00C 00088F4C 7C 08 03 A6 */ mtlr r0 +/* 8008C010 00088F50 4E 80 00 20 */ blr + +.section .bss, "wa" # 0x803E6000 - 0x80408AC0 +TRK_mainError: + .skip 0x18 diff --git a/asm/TRK_MINNOW_DOLPHIN/mainloop.s b/asm/TRK_MINNOW_DOLPHIN/mainloop.s new file mode 100644 index 0000000..8265cf9 --- /dev/null +++ b/asm/TRK_MINNOW_DOLPHIN/mainloop.s @@ -0,0 +1,116 @@ +.include "macros.inc" + +.section .text, "ax" # 0x80005600 - 0x8036FBA0 +.global TRKHandleRequestEvent +TRKHandleRequestEvent: +/* 80087B00 00084A40 7C 08 02 A6 */ mflr r0 +/* 80087B04 00084A44 90 01 00 04 */ stw r0, 4(r1) +/* 80087B08 00084A48 94 21 FF F8 */ stwu r1, -8(r1) +/* 80087B0C 00084A4C 80 63 00 08 */ lwz r3, 8(r3) +/* 80087B10 00084A50 48 00 06 8D */ bl TRKGetBuffer +/* 80087B14 00084A54 48 00 0F 95 */ bl TRKDispatchMessage +/* 80087B18 00084A58 38 21 00 08 */ addi r1, r1, 8 +/* 80087B1C 00084A5C 80 01 00 04 */ lwz r0, 4(r1) +/* 80087B20 00084A60 7C 08 03 A6 */ mtlr r0 +/* 80087B24 00084A64 4E 80 00 20 */ blr + +.global TRKHandleSupportEvent +TRKHandleSupportEvent: +/* 80087B28 00084A68 7C 08 02 A6 */ mflr r0 +/* 80087B2C 00084A6C 90 01 00 04 */ stw r0, 4(r1) +/* 80087B30 00084A70 94 21 FF F8 */ stwu r1, -8(r1) +/* 80087B34 00084A74 48 00 3A 4D */ bl TRKTargetSupportRequest +/* 80087B38 00084A78 38 21 00 08 */ addi r1, r1, 8 +/* 80087B3C 00084A7C 80 01 00 04 */ lwz r0, 4(r1) +/* 80087B40 00084A80 7C 08 03 A6 */ mtlr r0 +/* 80087B44 00084A84 4E 80 00 20 */ blr + +.global TRKIdle +TRKIdle: +/* 80087B48 00084A88 7C 08 02 A6 */ mflr r0 +/* 80087B4C 00084A8C 90 01 00 04 */ stw r0, 4(r1) +/* 80087B50 00084A90 94 21 FF F8 */ stwu r1, -8(r1) +/* 80087B54 00084A94 48 00 3B 59 */ bl TRKTargetStopped +/* 80087B58 00084A98 2C 03 00 00 */ cmpwi r3, 0 +/* 80087B5C 00084A9C 40 82 00 08 */ bne lbl_80087B64 +/* 80087B60 00084AA0 48 00 48 0D */ bl TRKTargetContinue +lbl_80087B64: +/* 80087B64 00084AA4 38 21 00 08 */ addi r1, r1, 8 +/* 80087B68 00084AA8 80 01 00 04 */ lwz r0, 4(r1) +/* 80087B6C 00084AAC 7C 08 03 A6 */ mtlr r0 +/* 80087B70 00084AB0 4E 80 00 20 */ blr + +.global TRKNubMainLoop +TRKNubMainLoop: +/* 80087B74 00084AB4 7C 08 02 A6 */ mflr r0 +/* 80087B78 00084AB8 3C 60 80 3F */ lis r3, gTRKInputPendingPtr@ha +/* 80087B7C 00084ABC 90 01 00 04 */ stw r0, 4(r1) +/* 80087B80 00084AC0 94 21 FF E0 */ stwu r1, -0x20(r1) +/* 80087B84 00084AC4 93 E1 00 1C */ stw r31, 0x1c(r1) +/* 80087B88 00084AC8 3B E3 AA D4 */ addi r31, r3, gTRKInputPendingPtr@l +/* 80087B8C 00084ACC 93 C1 00 18 */ stw r30, 0x18(r1) +/* 80087B90 00084AD0 3B C0 00 00 */ li r30, 0 +/* 80087B94 00084AD4 93 A1 00 14 */ stw r29, 0x14(r1) +/* 80087B98 00084AD8 3B A0 00 00 */ li r29, 0 +/* 80087B9C 00084ADC 48 00 00 A8 */ b lbl_80087C44 +lbl_80087BA0: +/* 80087BA0 00084AE0 38 61 00 08 */ addi r3, r1, 8 +/* 80087BA4 00084AE4 48 00 01 45 */ bl TRKGetNextEvent +/* 80087BA8 00084AE8 2C 03 00 00 */ cmpwi r3, 0 +/* 80087BAC 00084AEC 41 82 00 6C */ beq lbl_80087C18 +/* 80087BB0 00084AF0 88 01 00 08 */ lbz r0, 8(r1) +/* 80087BB4 00084AF4 3B A0 00 00 */ li r29, 0 +/* 80087BB8 00084AF8 2C 00 00 02 */ cmpwi r0, 2 +/* 80087BBC 00084AFC 41 82 00 28 */ beq lbl_80087BE4 +/* 80087BC0 00084B00 40 80 00 14 */ bge lbl_80087BD4 +/* 80087BC4 00084B04 2C 00 00 00 */ cmpwi r0, 0 +/* 80087BC8 00084B08 41 82 00 44 */ beq lbl_80087C0C +/* 80087BCC 00084B0C 40 80 00 24 */ bge lbl_80087BF0 +/* 80087BD0 00084B10 48 00 00 3C */ b lbl_80087C0C +lbl_80087BD4: +/* 80087BD4 00084B14 2C 00 00 05 */ cmpwi r0, 5 +/* 80087BD8 00084B18 41 82 00 2C */ beq lbl_80087C04 +/* 80087BDC 00084B1C 40 80 00 30 */ bge lbl_80087C0C +/* 80087BE0 00084B20 48 00 00 18 */ b lbl_80087BF8 +lbl_80087BE4: +/* 80087BE4 00084B24 38 61 00 08 */ addi r3, r1, 8 +/* 80087BE8 00084B28 4B FF FF 19 */ bl TRKHandleRequestEvent +/* 80087BEC 00084B2C 48 00 00 20 */ b lbl_80087C0C +lbl_80087BF0: +/* 80087BF0 00084B30 3B C0 00 01 */ li r30, 1 +/* 80087BF4 00084B34 48 00 00 18 */ b lbl_80087C0C +lbl_80087BF8: +/* 80087BF8 00084B38 38 61 00 08 */ addi r3, r1, 8 +/* 80087BFC 00084B3C 48 00 35 D5 */ bl TRKTargetInterrupt +/* 80087C00 00084B40 48 00 00 0C */ b lbl_80087C0C +lbl_80087C04: +/* 80087C04 00084B44 38 61 00 08 */ addi r3, r1, 8 +/* 80087C08 00084B48 4B FF FF 21 */ bl TRKHandleSupportEvent +lbl_80087C0C: +/* 80087C0C 00084B4C 38 61 00 08 */ addi r3, r1, 8 +/* 80087C10 00084B50 48 00 02 91 */ bl TRKDestructEvent +/* 80087C14 00084B54 48 00 00 30 */ b lbl_80087C44 +lbl_80087C18: +/* 80087C18 00084B58 2C 1D 00 00 */ cmpwi r29, 0 +/* 80087C1C 00084B5C 41 82 00 14 */ beq lbl_80087C30 +/* 80087C20 00084B60 80 7F 00 00 */ lwz r3, 0(r31) +/* 80087C24 00084B64 88 03 00 00 */ lbz r0, 0(r3) +/* 80087C28 00084B68 28 00 00 00 */ cmplwi r0, 0 +/* 80087C2C 00084B6C 41 82 00 10 */ beq lbl_80087C3C +lbl_80087C30: +/* 80087C30 00084B70 3B A0 00 01 */ li r29, 1 +/* 80087C34 00084B74 48 00 0D 65 */ bl TRKGetInput +/* 80087C38 00084B78 48 00 00 0C */ b lbl_80087C44 +lbl_80087C3C: +/* 80087C3C 00084B7C 4B FF FF 0D */ bl TRKIdle +/* 80087C40 00084B80 3B A0 00 00 */ li r29, 0 +lbl_80087C44: +/* 80087C44 00084B84 2C 1E 00 00 */ cmpwi r30, 0 +/* 80087C48 00084B88 41 82 FF 58 */ beq lbl_80087BA0 +/* 80087C4C 00084B8C 83 E1 00 1C */ lwz r31, 0x1c(r1) +/* 80087C50 00084B90 83 C1 00 18 */ lwz r30, 0x18(r1) +/* 80087C54 00084B94 83 A1 00 14 */ lwz r29, 0x14(r1) +/* 80087C58 00084B98 38 21 00 20 */ addi r1, r1, 0x20 +/* 80087C5C 00084B9C 80 01 00 04 */ lwz r0, 4(r1) +/* 80087C60 00084BA0 7C 08 03 A6 */ mtlr r0 +/* 80087C64 00084BA4 4E 80 00 20 */ blr diff --git a/asm/TRK_MINNOW_DOLPHIN/mem_TRK.s b/asm/TRK_MINNOW_DOLPHIN/mem_TRK.s new file mode 100644 index 0000000..9105a18 --- /dev/null +++ b/asm/TRK_MINNOW_DOLPHIN/mem_TRK.s @@ -0,0 +1,93 @@ +.include "macros.inc" + +.section .init, "ax" # 0x80003100 - 0x80005540 +.global TRK_memcpy +TRK_memcpy: +/* 80003244 00000244 38 84 FF FF */ addi r4, r4, -1 +/* 80003248 00000248 38 C3 FF FF */ addi r6, r3, -1 +/* 8000324C 0000024C 38 A5 00 01 */ addi r5, r5, 1 +/* 80003250 00000250 48 00 00 0C */ b lbl_8000325C +lbl_80003254: +/* 80003254 00000254 8C 04 00 01 */ lbzu r0, 1(r4) +/* 80003258 00000258 9C 06 00 01 */ stbu r0, 1(r6) +lbl_8000325C: +/* 8000325C 0000025C 34 A5 FF FF */ addic. r5, r5, -1 +/* 80003260 00000260 40 82 FF F4 */ bne lbl_80003254 +/* 80003264 00000264 4E 80 00 20 */ blr + +.global TRK_memset +TRK_memset: +/* 80003268 00000268 7C 08 02 A6 */ mflr r0 +/* 8000326C 0000026C 90 01 00 04 */ stw r0, 4(r1) +/* 80003270 00000270 94 21 FF F0 */ stwu r1, -0x10(r1) +/* 80003274 00000274 93 E1 00 0C */ stw r31, 0xc(r1) +/* 80003278 00000278 7C 7F 1B 78 */ mr r31, r3 +/* 8000327C 0000027C 48 08 70 F9 */ bl TRK_fill_mem +/* 80003280 00000280 7F E3 FB 78 */ mr r3, r31 +/* 80003284 00000284 83 E1 00 0C */ lwz r31, 0xc(r1) +/* 80003288 00000288 38 21 00 10 */ addi r1, r1, 0x10 +/* 8000328C 0000028C 80 01 00 04 */ lwz r0, 4(r1) +/* 80003290 00000290 7C 08 03 A6 */ mtlr r0 +/* 80003294 00000294 4E 80 00 20 */ blr + +.section .text, "ax" # 0x80005600 - 0x8036FBA0 +.global TRK_fill_mem +TRK_fill_mem: +/* 8008A374 000872B4 28 05 00 20 */ cmplwi r5, 0x20 +/* 8008A378 000872B8 38 C3 FF FF */ addi r6, r3, -1 +/* 8008A37C 000872BC 54 80 06 3E */ clrlwi r0, r4, 0x18 +/* 8008A380 000872C0 7C 07 03 78 */ mr r7, r0 +/* 8008A384 000872C4 41 80 00 98 */ blt lbl_8008A41C +/* 8008A388 000872C8 7C C0 30 F8 */ nor r0, r6, r6 +/* 8008A38C 000872CC 54 00 07 BF */ clrlwi. r0, r0, 0x1e +/* 8008A390 000872D0 7C 03 03 78 */ mr r3, r0 +/* 8008A394 000872D4 41 82 00 18 */ beq lbl_8008A3AC +/* 8008A398 000872D8 7C A3 28 50 */ subf r5, r3, r5 +/* 8008A39C 000872DC 54 E0 06 3E */ clrlwi r0, r7, 0x18 +lbl_8008A3A0: +/* 8008A3A0 000872E0 34 63 FF FF */ addic. r3, r3, -1 +/* 8008A3A4 000872E4 9C 06 00 01 */ stbu r0, 1(r6) +/* 8008A3A8 000872E8 40 82 FF F8 */ bne lbl_8008A3A0 +lbl_8008A3AC: +/* 8008A3AC 000872EC 28 07 00 00 */ cmplwi r7, 0 +/* 8008A3B0 000872F0 41 82 00 1C */ beq lbl_8008A3CC +/* 8008A3B4 000872F4 54 E3 C0 0E */ slwi r3, r7, 0x18 +/* 8008A3B8 000872F8 54 E0 80 1E */ slwi r0, r7, 0x10 +/* 8008A3BC 000872FC 54 E4 40 2E */ slwi r4, r7, 8 +/* 8008A3C0 00087300 7C 60 03 78 */ or r0, r3, r0 +/* 8008A3C4 00087304 7C 80 03 78 */ or r0, r4, r0 +/* 8008A3C8 00087308 7C E7 03 78 */ or r7, r7, r0 +lbl_8008A3CC: +/* 8008A3CC 0008730C 54 A0 D9 7F */ rlwinm. r0, r5, 0x1b, 5, 0x1f +/* 8008A3D0 00087310 38 66 FF FD */ addi r3, r6, -3 +/* 8008A3D4 00087314 41 82 00 2C */ beq lbl_8008A400 +lbl_8008A3D8: +/* 8008A3D8 00087318 90 E3 00 04 */ stw r7, 4(r3) +/* 8008A3DC 0008731C 34 00 FF FF */ addic. r0, r0, -1 +/* 8008A3E0 00087320 90 E3 00 08 */ stw r7, 8(r3) +/* 8008A3E4 00087324 90 E3 00 0C */ stw r7, 0xc(r3) +/* 8008A3E8 00087328 90 E3 00 10 */ stw r7, 0x10(r3) +/* 8008A3EC 0008732C 90 E3 00 14 */ stw r7, 0x14(r3) +/* 8008A3F0 00087330 90 E3 00 18 */ stw r7, 0x18(r3) +/* 8008A3F4 00087334 90 E3 00 1C */ stw r7, 0x1c(r3) +/* 8008A3F8 00087338 94 E3 00 20 */ stwu r7, 0x20(r3) +/* 8008A3FC 0008733C 40 82 FF DC */ bne lbl_8008A3D8 +lbl_8008A400: +/* 8008A400 00087340 54 A0 F7 7F */ rlwinm. r0, r5, 0x1e, 0x1d, 0x1f +/* 8008A404 00087344 41 82 00 10 */ beq lbl_8008A414 +lbl_8008A408: +/* 8008A408 00087348 34 00 FF FF */ addic. r0, r0, -1 +/* 8008A40C 0008734C 94 E3 00 04 */ stwu r7, 4(r3) +/* 8008A410 00087350 40 82 FF F8 */ bne lbl_8008A408 +lbl_8008A414: +/* 8008A414 00087354 38 C3 00 03 */ addi r6, r3, 3 +/* 8008A418 00087358 54 A5 07 BE */ clrlwi r5, r5, 0x1e +lbl_8008A41C: +/* 8008A41C 0008735C 28 05 00 00 */ cmplwi r5, 0 +/* 8008A420 00087360 4D 82 00 20 */ beqlr +/* 8008A424 00087364 54 E0 06 3E */ clrlwi r0, r7, 0x18 +lbl_8008A428: +/* 8008A428 00087368 34 A5 FF FF */ addic. r5, r5, -1 +/* 8008A42C 0008736C 9C 06 00 01 */ stbu r0, 1(r6) +/* 8008A430 00087370 40 82 FF F8 */ bne lbl_8008A428 +/* 8008A434 00087374 4E 80 00 20 */ blr diff --git a/asm/TRK_MINNOW_DOLPHIN/mpc_7xx_603e.s b/asm/TRK_MINNOW_DOLPHIN/mpc_7xx_603e.s new file mode 100644 index 0000000..541e6cf --- /dev/null +++ b/asm/TRK_MINNOW_DOLPHIN/mpc_7xx_603e.s @@ -0,0 +1,239 @@ +.include "macros.inc" + +.section .text, "ax" # 0x80005600 - 0x8036FBA0 +.global TRKSaveExtended1Block +TRKSaveExtended1Block: +/* 8008BC54 00088B94 3C 40 80 3E */ lis r2, gTRKCPUState@h +/* 8008BC58 00088B98 60 42 AC 30 */ ori r2, r2, gTRKCPUState@l +/* 8008BC5C 00088B9C 7E 00 04 A6 */ mfsr r16, 0 +/* 8008BC60 00088BA0 7E 21 04 A6 */ mfsr r17, 1 +/* 8008BC64 00088BA4 7E 42 04 A6 */ mfsr r18, 2 +/* 8008BC68 00088BA8 7E 63 04 A6 */ mfsr r19, 3 +/* 8008BC6C 00088BAC 7E 84 04 A6 */ mfsr r20, 4 +/* 8008BC70 00088BB0 7E A5 04 A6 */ mfsr r21, 5 +/* 8008BC74 00088BB4 7E C6 04 A6 */ mfsr r22, 6 +/* 8008BC78 00088BB8 7E E7 04 A6 */ mfsr r23, 7 +/* 8008BC7C 00088BBC 7F 08 04 A6 */ mfsr r24, 8 +/* 8008BC80 00088BC0 7F 29 04 A6 */ mfsr r25, 9 +/* 8008BC84 00088BC4 7F 4A 04 A6 */ mfsr r26, 0xa +/* 8008BC88 00088BC8 7F 6B 04 A6 */ mfsr r27, 0xb +/* 8008BC8C 00088BCC 7F 8C 04 A6 */ mfsr r28, 0xc +/* 8008BC90 00088BD0 7F AD 04 A6 */ mfsr r29, 0xd +/* 8008BC94 00088BD4 7F CE 04 A6 */ mfsr r30, 0xe +/* 8008BC98 00088BD8 7F EF 04 A6 */ mfsr r31, 0xf +/* 8008BC9C 00088BDC BE 02 01 A8 */ stmw r16, 0x1a8(r2) +/* 8008BCA0 00088BE0 7D 4C 42 E6 */ mftb r10, 0x10c +/* 8008BCA4 00088BE4 7D 6D 42 E6 */ mftbu r11 +/* 8008BCA8 00088BE8 7D 90 FA A6 */ mfspr r12, 0x3f0 +/* 8008BCAC 00088BEC 7D B1 FA A6 */ mfspr r13, 0x3f1 +/* 8008BCB0 00088BF0 7D DB 02 A6 */ mfspr r14, 0x1b +/* 8008BCB4 00088BF4 7D FF 42 A6 */ mfpvr r15 +/* 8008BCB8 00088BF8 7E 10 82 A6 */ mfibatu r16, 0 +/* 8008BCBC 00088BFC 7E 31 82 A6 */ mfibatl r17, 0 +/* 8008BCC0 00088C00 7E 52 82 A6 */ mfibatu r18, 1 +/* 8008BCC4 00088C04 7E 73 82 A6 */ mfibatl r19, 1 +/* 8008BCC8 00088C08 7E 94 82 A6 */ mfibatu r20, 2 +/* 8008BCCC 00088C0C 7E B5 82 A6 */ mfibatl r21, 2 +/* 8008BCD0 00088C10 7E D6 82 A6 */ mfibatu r22, 3 +/* 8008BCD4 00088C14 7E F7 82 A6 */ mfibatl r23, 3 +/* 8008BCD8 00088C18 7F 18 82 A6 */ mfdbatu r24, 0 +/* 8008BCDC 00088C1C 7F 39 82 A6 */ mfdbatl r25, 0 +/* 8008BCE0 00088C20 7F 5A 82 A6 */ mfdbatu r26, 1 +/* 8008BCE4 00088C24 7F 7B 82 A6 */ mfdbatl r27, 1 +/* 8008BCE8 00088C28 7F 9C 82 A6 */ mfdbatu r28, 2 +/* 8008BCEC 00088C2C 7F BD 82 A6 */ mfdbatl r29, 2 +/* 8008BCF0 00088C30 7F DE 82 A6 */ mfdbatu r30, 3 +/* 8008BCF4 00088C34 7F FF 82 A6 */ mfdbatl r31, 3 +/* 8008BCF8 00088C38 BD 42 01 E8 */ stmw r10, 0x1e8(r2) +/* 8008BCFC 00088C3C 7E D9 02 A6 */ mfspr r22, 0x19 +/* 8008BD00 00088C40 7E F3 02 A6 */ mfdar r23 +/* 8008BD04 00088C44 7F 12 02 A6 */ mfdsisr r24 +/* 8008BD08 00088C48 7F 30 42 A6 */ mfspr r25, 0x110 +/* 8008BD0C 00088C4C 7F 51 42 A6 */ mfspr r26, 0x111 +/* 8008BD10 00088C50 7F 72 42 A6 */ mfspr r27, 0x112 +/* 8008BD14 00088C54 7F 93 42 A6 */ mfspr r28, 0x113 +/* 8008BD18 00088C58 3B A0 00 00 */ li r29, 0 +/* 8008BD1C 00088C5C 7F D2 FA A6 */ mfspr r30, 0x3f2 +/* 8008BD20 00088C60 7F FA 42 A6 */ mfspr r31, 0x11a +/* 8008BD24 00088C64 BE C2 02 5C */ stmw r22, 0x25c(r2) +/* 8008BD28 00088C68 7E 90 E2 A6 */ mfspr r20, 0x390 +/* 8008BD2C 00088C6C 7E B1 E2 A6 */ mfspr r21, 0x391 +/* 8008BD30 00088C70 7E D2 E2 A6 */ mfspr r22, 0x392 +/* 8008BD34 00088C74 7E F3 E2 A6 */ mfspr r23, 0x393 +/* 8008BD38 00088C78 7F 14 E2 A6 */ mfspr r24, 0x394 +/* 8008BD3C 00088C7C 7F 35 E2 A6 */ mfspr r25, 0x395 +/* 8008BD40 00088C80 7F 56 E2 A6 */ mfspr r26, 0x396 +/* 8008BD44 00088C84 7F 77 E2 A6 */ mfspr r27, 0x397 +/* 8008BD48 00088C88 7F 98 E2 A6 */ mfspr r28, 0x398 +/* 8008BD4C 00088C8C 7F B9 E2 A6 */ mfspr r29, 0x399 +/* 8008BD50 00088C90 7F DA E2 A6 */ mfspr r30, 0x39a +/* 8008BD54 00088C94 7F FB E2 A6 */ mfspr r31, 0x39b +/* 8008BD58 00088C98 BE 82 02 FC */ stmw r20, 0x2fc(r2) +/* 8008BD5C 00088C9C 48 00 00 48 */ b lbl_8008BDA4 +/* 8008BD60 00088CA0 7E 00 EA A6 */ mfspr r16, 0x3a0 +/* 8008BD64 00088CA4 7E 27 EA A6 */ mfspr r17, 0x3a7 +/* 8008BD68 00088CA8 7E 48 EA A6 */ mfspr r18, 0x3a8 +/* 8008BD6C 00088CAC 7E 69 EA A6 */ mfspr r19, 0x3a9 +/* 8008BD70 00088CB0 7E 8A EA A6 */ mfspr r20, 0x3aa +/* 8008BD74 00088CB4 7E AB EA A6 */ mfspr r21, 0x3ab +/* 8008BD78 00088CB8 7E CC EA A6 */ mfspr r22, 0x3ac +/* 8008BD7C 00088CBC 7E ED EA A6 */ mfspr r23, 0x3ad +/* 8008BD80 00088CC0 7F 0E EA A6 */ mfspr r24, 0x3ae +/* 8008BD84 00088CC4 7F 2F EA A6 */ mfspr r25, 0x3af +/* 8008BD88 00088CC8 7F 50 EA A6 */ mfspr r26, 0x3b0 +/* 8008BD8C 00088CCC 7F 77 EA A6 */ mfspr r27, 0x3b7 +/* 8008BD90 00088CD0 7F 9F EA A6 */ mfspr r28, 0x3bf +/* 8008BD94 00088CD4 7F B6 FA A6 */ mfspr r29, 0x3f6 +/* 8008BD98 00088CD8 7F D7 FA A6 */ mfspr r30, 0x3f7 +/* 8008BD9C 00088CDC 7F FF FA A6 */ mfspr r31, 0x3ff +/* 8008BDA0 00088CE0 BE 02 02 B8 */ stmw r16, 0x2b8(r2) +lbl_8008BDA4: +/* 8008BDA4 00088CE4 7E 75 FA A6 */ mfspr r19, 0x3f5 +/* 8008BDA8 00088CE8 7E 99 EA A6 */ mfspr r20, 0x3b9 +/* 8008BDAC 00088CEC 7E BA EA A6 */ mfspr r21, 0x3ba +/* 8008BDB0 00088CF0 7E DD EA A6 */ mfspr r22, 0x3bd +/* 8008BDB4 00088CF4 7E FE EA A6 */ mfspr r23, 0x3be +/* 8008BDB8 00088CF8 7F 1B EA A6 */ mfspr r24, 0x3bb +/* 8008BDBC 00088CFC 7F 38 EA A6 */ mfspr r25, 0x3b8 +/* 8008BDC0 00088D00 7F 5C EA A6 */ mfspr r26, 0x3bc +/* 8008BDC4 00088D04 7F 7C FA A6 */ mfspr r27, 0x3fc +/* 8008BDC8 00088D08 7F 9D FA A6 */ mfspr r28, 0x3fd +/* 8008BDCC 00088D0C 7F BE FA A6 */ mfspr r29, 0x3fe +/* 8008BDD0 00088D10 7F DB FA A6 */ mfspr r30, 0x3FB +/* 8008BDD4 00088D14 7F F9 FA A6 */ mfspr r31, 0x3f9 +/* 8008BDD8 00088D18 BE 62 02 84 */ stmw r19, 0x284(r2) +/* 8008BDDC 00088D1C 48 00 00 2C */ b lbl_8008BE08 +/* 8008BDE0 00088D20 7F 30 F2 A6 */ mfspr r25, 0x3d0 +/* 8008BDE4 00088D24 7F 51 F2 A6 */ mfspr r26, 0x3d1 +/* 8008BDE8 00088D28 7F 72 F2 A6 */ mfspr r27, 0x3d2 +/* 8008BDEC 00088D2C 7F 93 F2 A6 */ mfspr r28, 0x3d3 +/* 8008BDF0 00088D30 7F B4 F2 A6 */ mfspr r29, 0x3D4 +/* 8008BDF4 00088D34 7F D5 F2 A6 */ mfspr r30, 0x3D5 +/* 8008BDF8 00088D38 7F F6 F2 A6 */ mfspr r31, 0x3d6 +/* 8008BDFC 00088D3C BF 22 02 40 */ stmw r25, 0x240(r2) +/* 8008BE00 00088D40 7F F6 02 A6 */ mfspr r31, 0x16 +/* 8008BE04 00088D44 93 E2 02 78 */ stw r31, 0x278(r2) +lbl_8008BE08: +/* 8008BE08 00088D48 4E 80 00 20 */ blr + +.global TRKRestoreExtended1Block +TRKRestoreExtended1Block: +/* 8008BE0C 00088D4C 3C 40 80 3E */ lis r2, gTRKCPUState@h +/* 8008BE10 00088D50 60 42 AC 30 */ ori r2, r2, gTRKCPUState@l +/* 8008BE14 00088D54 3C A0 80 3A */ lis r5, gTRKRestoreFlags@h +/* 8008BE18 00088D58 60 A5 F0 18 */ ori r5, r5, gTRKRestoreFlags@l +/* 8008BE1C 00088D5C 88 65 00 00 */ lbz r3, 0(r5) +/* 8008BE20 00088D60 88 C5 00 01 */ lbz r6, 1(r5) +/* 8008BE24 00088D64 38 00 00 00 */ li r0, 0 +/* 8008BE28 00088D68 98 05 00 00 */ stb r0, 0(r5) +/* 8008BE2C 00088D6C 98 05 00 01 */ stb r0, 1(r5) +/* 8008BE30 00088D70 2C 03 00 00 */ cmpwi r3, 0 +/* 8008BE34 00088D74 41 82 00 14 */ beq lbl_8008BE48 +/* 8008BE38 00088D78 83 02 01 E8 */ lwz r24, 0x1e8(r2) +/* 8008BE3C 00088D7C 83 22 01 EC */ lwz r25, 0x1ec(r2) +/* 8008BE40 00088D80 7F 1C 43 A6 */ mttbl r24 +/* 8008BE44 00088D84 7F 3D 43 A6 */ mttbu r25 +lbl_8008BE48: +/* 8008BE48 00088D88 BA 82 02 FC */ lmw r20, 0x2fc(r2) +/* 8008BE4C 00088D8C 7E 90 E3 A6 */ mtspr 0x390, r20 +/* 8008BE50 00088D90 7E B1 E3 A6 */ mtspr 0x391, r21 +/* 8008BE54 00088D94 7E D2 E3 A6 */ mtspr 0x392, r22 +/* 8008BE58 00088D98 7E F3 E3 A6 */ mtspr 0x393, r23 +/* 8008BE5C 00088D9C 7F 14 E3 A6 */ mtspr 0x394, r24 +/* 8008BE60 00088DA0 7F 35 E3 A6 */ mtspr 0x395, r25 +/* 8008BE64 00088DA4 7F 56 E3 A6 */ mtspr 0x396, r26 +/* 8008BE68 00088DA8 7F 77 E3 A6 */ mtspr 0x397, r27 +/* 8008BE6C 00088DAC 7F 98 E3 A6 */ mtspr 0x398, r28 +/* 8008BE70 00088DB0 7F DA E3 A6 */ mtspr 0x39a, r30 +/* 8008BE74 00088DB4 7F FB E3 A6 */ mtspr 0x39b, r31 +/* 8008BE78 00088DB8 48 00 00 1C */ b lbl_8008BE94 +/* 8008BE7C 00088DBC BB 42 02 E0 */ lmw r26, 0x2e0(r2) +/* 8008BE80 00088DC0 7F 50 EB A6 */ mtspr 0x3b0, r26 +/* 8008BE84 00088DC4 7F 77 EB A6 */ mtspr 0x3b7, r27 +/* 8008BE88 00088DC8 7F B6 FB A6 */ mtspr 0x3f6, r29 +/* 8008BE8C 00088DCC 7F D7 FB A6 */ mtspr 0x3f7, r30 +/* 8008BE90 00088DD0 7F FF FB A6 */ mtspr 0x3ff, r31 +lbl_8008BE94: +/* 8008BE94 00088DD4 BA 62 02 84 */ lmw r19, 0x284(r2) +/* 8008BE98 00088DD8 7E 75 FB A6 */ mtspr 0x3f5, r19 +/* 8008BE9C 00088DDC 7E 99 EB A6 */ mtspr 0x3b9, r20 +/* 8008BEA0 00088DE0 7E BA EB A6 */ mtspr 0x3ba, r21 +/* 8008BEA4 00088DE4 7E DD EB A6 */ mtspr 0x3bd, r22 +/* 8008BEA8 00088DE8 7E FE EB A6 */ mtspr 0x3be, r23 +/* 8008BEAC 00088DEC 7F 1B EB A6 */ mtspr 0x3bb, r24 +/* 8008BEB0 00088DF0 7F 38 EB A6 */ mtspr 0x3b8, r25 +/* 8008BEB4 00088DF4 7F 5C EB A6 */ mtspr 0x3bc, r26 +/* 8008BEB8 00088DF8 7F 7C FB A6 */ mtspr 0x3fc, r27 +/* 8008BEBC 00088DFC 7F 9D FB A6 */ mtspr 0x3fd, r28 +/* 8008BEC0 00088E00 7F BE FB A6 */ mtspr 0x3fe, r29 +/* 8008BEC4 00088E04 7F DB FB A6 */ mtictc r30 +/* 8008BEC8 00088E08 7F F9 FB A6 */ mtspr 0x3f9, r31 +/* 8008BECC 00088E0C 48 00 00 34 */ b lbl_8008BF00 +/* 8008BED0 00088E10 2C 06 00 00 */ cmpwi r6, 0 +/* 8008BED4 00088E14 41 82 00 0C */ beq lbl_8008BEE0 +/* 8008BED8 00088E18 83 42 02 78 */ lwz r26, 0x278(r2) +/* 8008BEDC 00088E1C 7F 56 03 A6 */ mtspr 0x16, r26 +lbl_8008BEE0: +/* 8008BEE0 00088E20 BB 22 02 40 */ lmw r25, 0x240(r2) +/* 8008BEE4 00088E24 7F 30 F3 A6 */ mtspr 0x3d0, r25 +/* 8008BEE8 00088E28 7F 51 F3 A6 */ mtspr 0x3d1, r26 +/* 8008BEEC 00088E2C 7F 72 F3 A6 */ mtspr 0x3d2, r27 +/* 8008BEF0 00088E30 7F 93 F3 A6 */ mtspr 0x3d3, r28 +/* 8008BEF4 00088E34 7F B4 F3 A6 */ mtspr 0x3D4, r29 +/* 8008BEF8 00088E38 7F D5 F3 A6 */ mtspr 0x3D5, r30 +/* 8008BEFC 00088E3C 7F F6 F3 A6 */ mtspr 0x3d6, r31 +lbl_8008BF00: +/* 8008BF00 00088E40 BA 02 01 A8 */ lmw r16, 0x1a8(r2) +/* 8008BF04 00088E44 7E 00 01 A4 */ mtsr 0, r16 +/* 8008BF08 00088E48 7E 21 01 A4 */ mtsr 1, r17 +/* 8008BF0C 00088E4C 7E 42 01 A4 */ mtsr 2, r18 +/* 8008BF10 00088E50 7E 63 01 A4 */ mtsr 3, r19 +/* 8008BF14 00088E54 7E 84 01 A4 */ mtsr 4, r20 +/* 8008BF18 00088E58 7E A5 01 A4 */ mtsr 5, r21 +/* 8008BF1C 00088E5C 7E C6 01 A4 */ mtsr 6, r22 +/* 8008BF20 00088E60 7E E7 01 A4 */ mtsr 7, r23 +/* 8008BF24 00088E64 7F 08 01 A4 */ mtsr 8, r24 +/* 8008BF28 00088E68 7F 29 01 A4 */ mtsr 9, r25 +/* 8008BF2C 00088E6C 7F 4A 01 A4 */ mtsr 0xa, r26 +/* 8008BF30 00088E70 7F 6B 01 A4 */ mtsr 0xb, r27 +/* 8008BF34 00088E74 7F 8C 01 A4 */ mtsr 0xc, r28 +/* 8008BF38 00088E78 7F AD 01 A4 */ mtsr 0xd, r29 +/* 8008BF3C 00088E7C 7F CE 01 A4 */ mtsr 0xe, r30 +/* 8008BF40 00088E80 7F EF 01 A4 */ mtsr 0xf, r31 +/* 8008BF44 00088E84 B9 82 01 F0 */ lmw r12, 0x1f0(r2) +/* 8008BF48 00088E88 7D 90 FB A6 */ mtspr 0x3f0, r12 +/* 8008BF4C 00088E8C 7D B1 FB A6 */ mtspr 0x3f1, r13 +/* 8008BF50 00088E90 7D DB 03 A6 */ mtspr 0x1b, r14 +/* 8008BF54 00088E94 7D FF 43 A6 */ mtspr 0x11f, r15 +/* 8008BF58 00088E98 7E 10 83 A6 */ mtibatu 0, r16 +/* 8008BF5C 00088E9C 7E 31 83 A6 */ mtibatl 0, r17 +/* 8008BF60 00088EA0 7E 52 83 A6 */ mtibatu 1, r18 +/* 8008BF64 00088EA4 7E 73 83 A6 */ mtibatl 1, r19 +/* 8008BF68 00088EA8 7E 94 83 A6 */ mtibatu 2, r20 +/* 8008BF6C 00088EAC 7E B5 83 A6 */ mtibatl 2, r21 +/* 8008BF70 00088EB0 7E D6 83 A6 */ mtibatu 3, r22 +/* 8008BF74 00088EB4 7E F7 83 A6 */ mtibatl 3, r23 +/* 8008BF78 00088EB8 7F 18 83 A6 */ mtdbatu 0, r24 +/* 8008BF7C 00088EBC 7F 39 83 A6 */ mtdbatl 0, r25 +/* 8008BF80 00088EC0 7F 5A 83 A6 */ mtdbatu 1, r26 +/* 8008BF84 00088EC4 7F 7B 83 A6 */ mtdbatl 1, r27 +/* 8008BF88 00088EC8 7F 9C 83 A6 */ mtdbatu 2, r28 +/* 8008BF8C 00088ECC 7F BD 83 A6 */ mtdbatl 2, r29 +/* 8008BF90 00088ED0 7F DE 83 A6 */ mtdbatu 3, r30 +/* 8008BF94 00088ED4 7F FF 83 A6 */ mtdbatl 3, r31 +/* 8008BF98 00088ED8 BA C2 02 5C */ lmw r22, 0x25c(r2) +/* 8008BF9C 00088EDC 7E D9 03 A6 */ mtspr 0x19, r22 +/* 8008BFA0 00088EE0 7E F3 03 A6 */ mtdar r23 +/* 8008BFA4 00088EE4 7F 12 03 A6 */ mtdsisr r24 +/* 8008BFA8 00088EE8 7F 30 43 A6 */ mtspr 0x110, r25 +/* 8008BFAC 00088EEC 7F 51 43 A6 */ mtspr 0x111, r26 +/* 8008BFB0 00088EF0 7F 72 43 A6 */ mtspr 0x112, r27 +/* 8008BFB4 00088EF4 7F 93 43 A6 */ mtspr 0x113, r28 +/* 8008BFB8 00088EF8 7F D2 FB A6 */ mtspr 0x3f2, r30 +/* 8008BFBC 00088EFC 7F FA 43 A6 */ mtspr 0x11a, r31 +/* 8008BFC0 00088F00 4E 80 00 20 */ blr + +.global TRKTargetCPUMinorType +TRKTargetCPUMinorType: +/* 8008BFC4 00088F04 38 60 00 54 */ li r3, 0x54 +/* 8008BFC8 00088F08 4E 80 00 20 */ blr diff --git a/asm/TRK_MINNOW_DOLPHIN/msg.s b/asm/TRK_MINNOW_DOLPHIN/msg.s new file mode 100644 index 0000000..99b8591 --- /dev/null +++ b/asm/TRK_MINNOW_DOLPHIN/msg.s @@ -0,0 +1,15 @@ +.include "macros.inc" + +.section .text, "ax" # 0x80005600 - 0x8036FBA0 +.global TRKMessageSend +TRKMessageSend: +/* 80088058 00084F98 7C 08 02 A6 */ mflr r0 +/* 8008805C 00084F9C 90 01 00 04 */ stw r0, 4(r1) +/* 80088060 00084FA0 94 21 FF F8 */ stwu r1, -8(r1) +/* 80088064 00084FA4 80 83 00 08 */ lwz r4, 8(r3) +/* 80088068 00084FA8 38 63 00 10 */ addi r3, r3, 0x10 +/* 8008806C 00084FAC 48 00 42 39 */ bl TRKWriteUARTN +/* 80088070 00084FB0 38 21 00 08 */ addi r1, r1, 8 +/* 80088074 00084FB4 80 01 00 04 */ lwz r0, 4(r1) +/* 80088078 00084FB8 7C 08 03 A6 */ mtlr r0 +/* 8008807C 00084FBC 4E 80 00 20 */ blr diff --git a/asm/TRK_MINNOW_DOLPHIN/msgbuf.s b/asm/TRK_MINNOW_DOLPHIN/msgbuf.s new file mode 100644 index 0000000..f137c70 --- /dev/null +++ b/asm/TRK_MINNOW_DOLPHIN/msgbuf.s @@ -0,0 +1,643 @@ +.include "macros.inc" + +.section .text, "ax" # 0x80005600 - 0x8036FBA0 +.global TRKSetBufferUsed +TRKSetBufferUsed: +/* 80088080 00084FC0 90 83 00 04 */ stw r4, 4(r3) +/* 80088084 00084FC4 4E 80 00 20 */ blr + +.global TRKInitializeMessageBuffers +TRKInitializeMessageBuffers: +/* 80088088 00084FC8 7C 08 02 A6 */ mflr r0 +/* 8008808C 00084FCC 3C 60 80 3F */ lis r3, gTRKMsgBufs@ha +/* 80088090 00084FD0 90 01 00 04 */ stw r0, 4(r1) +/* 80088094 00084FD4 38 03 91 10 */ addi r0, r3, gTRKMsgBufs@l +/* 80088098 00084FD8 94 21 FF F0 */ stwu r1, -0x10(r1) +/* 8008809C 00084FDC 93 E1 00 0C */ stw r31, 0xc(r1) +/* 800880A0 00084FE0 93 C1 00 08 */ stw r30, 8(r1) +/* 800880A4 00084FE4 3B C0 00 00 */ li r30, 0 +/* 800880A8 00084FE8 1C 9E 08 90 */ mulli r4, r30, 0x890 +/* 800880AC 00084FEC 7F E0 22 14 */ add r31, r0, r4 +lbl_800880B0: +/* 800880B0 00084FF0 7F E3 FB 78 */ mr r3, r31 +/* 800880B4 00084FF4 48 00 21 99 */ bl TRKInitializeMutex +/* 800880B8 00084FF8 7F E3 FB 78 */ mr r3, r31 +/* 800880BC 00084FFC 48 00 21 99 */ bl TRKAcquireMutex +/* 800880C0 00085000 38 7F 00 00 */ addi r3, r31, 0 +/* 800880C4 00085004 38 80 00 00 */ li r4, 0 +/* 800880C8 00085008 4B FF FF B9 */ bl TRKSetBufferUsed +/* 800880CC 0008500C 7F E3 FB 78 */ mr r3, r31 +/* 800880D0 00085010 48 00 21 8D */ bl TRKReleaseMutex +/* 800880D4 00085014 3B DE 00 01 */ addi r30, r30, 1 +/* 800880D8 00085018 3B FF 08 90 */ addi r31, r31, 0x890 +/* 800880DC 0008501C 2C 1E 00 03 */ cmpwi r30, 3 +/* 800880E0 00085020 41 80 FF D0 */ blt lbl_800880B0 +/* 800880E4 00085024 83 E1 00 0C */ lwz r31, 0xc(r1) +/* 800880E8 00085028 38 60 00 00 */ li r3, 0 +/* 800880EC 0008502C 83 C1 00 08 */ lwz r30, 8(r1) +/* 800880F0 00085030 38 21 00 10 */ addi r1, r1, 0x10 +/* 800880F4 00085034 80 01 00 04 */ lwz r0, 4(r1) +/* 800880F8 00085038 7C 08 03 A6 */ mtlr r0 +/* 800880FC 0008503C 4E 80 00 20 */ blr + +.global TRKGetFreeBuffer +TRKGetFreeBuffer: +/* 80088100 00085040 7C 08 02 A6 */ mflr r0 +/* 80088104 00085044 90 01 00 04 */ stw r0, 4(r1) +/* 80088108 00085048 38 00 00 00 */ li r0, 0 +/* 8008810C 0008504C 94 21 FF E0 */ stwu r1, -0x20(r1) +/* 80088110 00085050 BF 61 00 0C */ stmw r27, 0xc(r1) +/* 80088114 00085054 3B 84 00 00 */ addi r28, r4, 0 +/* 80088118 00085058 3B 63 00 00 */ addi r27, r3, 0 +/* 8008811C 0008505C 3B E0 03 00 */ li r31, 0x300 +/* 80088120 00085060 3B C0 00 00 */ li r30, 0 +/* 80088124 00085064 90 04 00 00 */ stw r0, 0(r4) +/* 80088128 00085068 48 00 00 54 */ b lbl_8008817C +lbl_8008812C: +/* 8008812C 0008506C 7F C3 F3 78 */ mr r3, r30 +/* 80088130 00085070 48 00 00 6D */ bl TRKGetBuffer +/* 80088134 00085074 7C 7D 1B 78 */ mr r29, r3 +/* 80088138 00085078 48 00 21 1D */ bl TRKAcquireMutex +/* 8008813C 0008507C 80 1D 00 04 */ lwz r0, 4(r29) +/* 80088140 00085080 2C 00 00 00 */ cmpwi r0, 0 +/* 80088144 00085084 40 82 00 2C */ bne lbl_80088170 +/* 80088148 00085088 38 7D 00 00 */ addi r3, r29, 0 +/* 8008814C 0008508C 38 80 00 01 */ li r4, 1 +/* 80088150 00085090 48 00 00 E1 */ bl TRKResetBuffer +/* 80088154 00085094 38 7D 00 00 */ addi r3, r29, 0 +/* 80088158 00085098 38 80 00 01 */ li r4, 1 +/* 8008815C 0008509C 4B FF FF 25 */ bl TRKSetBufferUsed +/* 80088160 000850A0 93 BC 00 00 */ stw r29, 0(r28) +/* 80088164 000850A4 3B E0 00 00 */ li r31, 0 +/* 80088168 000850A8 93 DB 00 00 */ stw r30, 0(r27) +/* 8008816C 000850AC 3B C0 00 03 */ li r30, 3 +lbl_80088170: +/* 80088170 000850B0 7F A3 EB 78 */ mr r3, r29 +/* 80088174 000850B4 48 00 20 E9 */ bl TRKReleaseMutex +/* 80088178 000850B8 3B DE 00 01 */ addi r30, r30, 1 +lbl_8008817C: +/* 8008817C 000850BC 2C 1E 00 03 */ cmpwi r30, 3 +/* 80088180 000850C0 41 80 FF AC */ blt lbl_8008812C +/* 80088184 000850C4 7F E3 FB 78 */ mr r3, r31 +/* 80088188 000850C8 BB 61 00 0C */ lmw r27, 0xc(r1) +/* 8008818C 000850CC 38 21 00 20 */ addi r1, r1, 0x20 +/* 80088190 000850D0 80 01 00 04 */ lwz r0, 4(r1) +/* 80088194 000850D4 7C 08 03 A6 */ mtlr r0 +/* 80088198 000850D8 4E 80 00 20 */ blr + +.global TRKGetBuffer +TRKGetBuffer: +/* 8008819C 000850DC 2C 03 00 00 */ cmpwi r3, 0 +/* 800881A0 000850E0 38 00 00 00 */ li r0, 0 +/* 800881A4 000850E4 41 80 00 1C */ blt lbl_800881C0 +/* 800881A8 000850E8 2C 03 00 03 */ cmpwi r3, 3 +/* 800881AC 000850EC 40 80 00 14 */ bge lbl_800881C0 +/* 800881B0 000850F0 1C 83 08 90 */ mulli r4, r3, 0x890 +/* 800881B4 000850F4 3C 60 80 3F */ lis r3, gTRKMsgBufs@ha +/* 800881B8 000850F8 38 03 91 10 */ addi r0, r3, gTRKMsgBufs@l +/* 800881BC 000850FC 7C 00 22 14 */ add r0, r0, r4 +lbl_800881C0: +/* 800881C0 00085100 7C 03 03 78 */ mr r3, r0 +/* 800881C4 00085104 4E 80 00 20 */ blr + +.global TRKReleaseBuffer +TRKReleaseBuffer: +/* 800881C8 00085108 7C 08 02 A6 */ mflr r0 +/* 800881CC 0008510C 2C 03 FF FF */ cmpwi r3, -1 +/* 800881D0 00085110 90 01 00 04 */ stw r0, 4(r1) +/* 800881D4 00085114 94 21 FF F0 */ stwu r1, -0x10(r1) +/* 800881D8 00085118 93 E1 00 0C */ stw r31, 0xc(r1) +/* 800881DC 0008511C 41 82 00 40 */ beq lbl_8008821C +/* 800881E0 00085120 2C 03 00 00 */ cmpwi r3, 0 +/* 800881E4 00085124 41 80 00 38 */ blt lbl_8008821C +/* 800881E8 00085128 2C 03 00 03 */ cmpwi r3, 3 +/* 800881EC 0008512C 40 80 00 30 */ bge lbl_8008821C +/* 800881F0 00085130 1C 83 08 90 */ mulli r4, r3, 0x890 +/* 800881F4 00085134 3C 60 80 3F */ lis r3, gTRKMsgBufs@ha +/* 800881F8 00085138 38 03 91 10 */ addi r0, r3, gTRKMsgBufs@l +/* 800881FC 0008513C 7F E0 22 14 */ add r31, r0, r4 +/* 80088200 00085140 38 7F 00 00 */ addi r3, r31, 0 +/* 80088204 00085144 48 00 20 51 */ bl TRKAcquireMutex +/* 80088208 00085148 38 7F 00 00 */ addi r3, r31, 0 +/* 8008820C 0008514C 38 80 00 00 */ li r4, 0 +/* 80088210 00085150 4B FF FE 71 */ bl TRKSetBufferUsed +/* 80088214 00085154 7F E3 FB 78 */ mr r3, r31 +/* 80088218 00085158 48 00 20 45 */ bl TRKReleaseMutex +lbl_8008821C: +/* 8008821C 0008515C 83 E1 00 0C */ lwz r31, 0xc(r1) +/* 80088220 00085160 38 21 00 10 */ addi r1, r1, 0x10 +/* 80088224 00085164 80 01 00 04 */ lwz r0, 4(r1) +/* 80088228 00085168 7C 08 03 A6 */ mtlr r0 +/* 8008822C 0008516C 4E 80 00 20 */ blr + +.global TRKResetBuffer +TRKResetBuffer: +/* 80088230 00085170 7C 08 02 A6 */ mflr r0 +/* 80088234 00085174 38 A0 00 00 */ li r5, 0 +/* 80088238 00085178 90 01 00 04 */ stw r0, 4(r1) +/* 8008823C 0008517C 54 80 06 3F */ clrlwi. r0, r4, 0x18 +/* 80088240 00085180 94 21 FF F8 */ stwu r1, -8(r1) +/* 80088244 00085184 90 A3 00 08 */ stw r5, 8(r3) +/* 80088248 00085188 90 A3 00 0C */ stw r5, 0xc(r3) +/* 8008824C 0008518C 40 82 00 14 */ bne lbl_80088260 +/* 80088250 00085190 38 63 00 10 */ addi r3, r3, 0x10 +/* 80088254 00085194 38 80 00 00 */ li r4, 0 +/* 80088258 00085198 38 A0 08 80 */ li r5, 0x880 +/* 8008825C 0008519C 4B F7 B0 0D */ bl TRK_memset +lbl_80088260: +/* 80088260 000851A0 38 21 00 08 */ addi r1, r1, 8 +/* 80088264 000851A4 80 01 00 04 */ lwz r0, 4(r1) +/* 80088268 000851A8 7C 08 03 A6 */ mtlr r0 +/* 8008826C 000851AC 4E 80 00 20 */ blr + +.global TRKSetBufferPosition +TRKSetBufferPosition: +/* 80088270 000851B0 28 04 08 80 */ cmplwi r4, 0x880 +/* 80088274 000851B4 38 A0 00 00 */ li r5, 0 +/* 80088278 000851B8 40 81 00 0C */ ble lbl_80088284 +/* 8008827C 000851BC 38 A0 03 01 */ li r5, 0x301 +/* 80088280 000851C0 48 00 00 18 */ b lbl_80088298 +lbl_80088284: +/* 80088284 000851C4 90 83 00 0C */ stw r4, 0xc(r3) +/* 80088288 000851C8 80 03 00 08 */ lwz r0, 8(r3) +/* 8008828C 000851CC 7C 04 00 40 */ cmplw r4, r0 +/* 80088290 000851D0 40 81 00 08 */ ble lbl_80088298 +/* 80088294 000851D4 90 83 00 08 */ stw r4, 8(r3) +lbl_80088298: +/* 80088298 000851D8 7C A3 2B 78 */ mr r3, r5 +/* 8008829C 000851DC 4E 80 00 20 */ blr + +.global TRKAppendBuffer +TRKAppendBuffer: +/* 800882A0 000851E0 7C 08 02 A6 */ mflr r0 +/* 800882A4 000851E4 90 01 00 04 */ stw r0, 4(r1) +/* 800882A8 000851E8 94 21 FF E8 */ stwu r1, -0x18(r1) +/* 800882AC 000851EC 93 E1 00 14 */ stw r31, 0x14(r1) +/* 800882B0 000851F0 3B E0 00 00 */ li r31, 0 +/* 800882B4 000851F4 93 C1 00 10 */ stw r30, 0x10(r1) +/* 800882B8 000851F8 7C BE 2B 79 */ or. r30, r5, r5 +/* 800882BC 000851FC 93 A1 00 0C */ stw r29, 0xc(r1) +/* 800882C0 00085200 3B A3 00 00 */ addi r29, r3, 0 +/* 800882C4 00085204 40 82 00 0C */ bne lbl_800882D0 +/* 800882C8 00085208 38 60 00 00 */ li r3, 0 +/* 800882CC 0008520C 48 00 00 5C */ b lbl_80088328 +lbl_800882D0: +/* 800882D0 00085210 80 7D 00 0C */ lwz r3, 0xc(r29) +/* 800882D4 00085214 20 03 08 80 */ subfic r0, r3, 0x880 +/* 800882D8 00085218 7C 00 F0 40 */ cmplw r0, r30 +/* 800882DC 0008521C 40 80 00 0C */ bge lbl_800882E8 +/* 800882E0 00085220 3B E0 03 01 */ li r31, 0x301 +/* 800882E4 00085224 7C 1E 03 78 */ mr r30, r0 +lbl_800882E8: +/* 800882E8 00085228 28 1E 00 01 */ cmplwi r30, 1 +/* 800882EC 0008522C 40 82 00 14 */ bne lbl_80088300 +/* 800882F0 00085230 88 04 00 00 */ lbz r0, 0(r4) +/* 800882F4 00085234 7C 7D 1A 14 */ add r3, r29, r3 +/* 800882F8 00085238 98 03 00 10 */ stb r0, 0x10(r3) +/* 800882FC 0008523C 48 00 00 14 */ b lbl_80088310 +lbl_80088300: +/* 80088300 00085240 38 63 00 10 */ addi r3, r3, 0x10 +/* 80088304 00085244 38 BE 00 00 */ addi r5, r30, 0 +/* 80088308 00085248 7C 7D 1A 14 */ add r3, r29, r3 +/* 8008830C 0008524C 4B F7 AF 39 */ bl TRK_memcpy +lbl_80088310: +/* 80088310 00085250 80 1D 00 0C */ lwz r0, 0xc(r29) +/* 80088314 00085254 38 7F 00 00 */ addi r3, r31, 0 +/* 80088318 00085258 7C 00 F2 14 */ add r0, r0, r30 +/* 8008831C 0008525C 90 1D 00 0C */ stw r0, 0xc(r29) +/* 80088320 00085260 80 1D 00 0C */ lwz r0, 0xc(r29) +/* 80088324 00085264 90 1D 00 08 */ stw r0, 8(r29) +lbl_80088328: +/* 80088328 00085268 83 E1 00 14 */ lwz r31, 0x14(r1) +/* 8008832C 0008526C 83 C1 00 10 */ lwz r30, 0x10(r1) +/* 80088330 00085270 83 A1 00 0C */ lwz r29, 0xc(r1) +/* 80088334 00085274 38 21 00 18 */ addi r1, r1, 0x18 +/* 80088338 00085278 80 01 00 04 */ lwz r0, 4(r1) +/* 8008833C 0008527C 7C 08 03 A6 */ mtlr r0 +/* 80088340 00085280 4E 80 00 20 */ blr + +.global TRKReadBuffer +TRKReadBuffer: +/* 80088344 00085284 7C 08 02 A6 */ mflr r0 +/* 80088348 00085288 90 01 00 04 */ stw r0, 4(r1) +/* 8008834C 0008528C 94 21 FF E8 */ stwu r1, -0x18(r1) +/* 80088350 00085290 93 E1 00 14 */ stw r31, 0x14(r1) +/* 80088354 00085294 3B E0 00 00 */ li r31, 0 +/* 80088358 00085298 93 C1 00 10 */ stw r30, 0x10(r1) +/* 8008835C 0008529C 7C BE 2B 79 */ or. r30, r5, r5 +/* 80088360 000852A0 93 A1 00 0C */ stw r29, 0xc(r1) +/* 80088364 000852A4 3B A3 00 00 */ addi r29, r3, 0 +/* 80088368 000852A8 38 64 00 00 */ addi r3, r4, 0 +/* 8008836C 000852AC 40 82 00 0C */ bne lbl_80088378 +/* 80088370 000852B0 38 60 00 00 */ li r3, 0 +/* 80088374 000852B4 48 00 00 40 */ b lbl_800883B4 +lbl_80088378: +/* 80088378 000852B8 80 9D 00 0C */ lwz r4, 0xc(r29) +/* 8008837C 000852BC 80 1D 00 08 */ lwz r0, 8(r29) +/* 80088380 000852C0 7C 04 00 50 */ subf r0, r4, r0 +/* 80088384 000852C4 7C 1E 00 40 */ cmplw r30, r0 +/* 80088388 000852C8 40 81 00 0C */ ble lbl_80088394 +/* 8008838C 000852CC 3B E0 03 02 */ li r31, 0x302 +/* 80088390 000852D0 7C 1E 03 78 */ mr r30, r0 +lbl_80088394: +/* 80088394 000852D4 38 84 00 10 */ addi r4, r4, 0x10 +/* 80088398 000852D8 38 BE 00 00 */ addi r5, r30, 0 +/* 8008839C 000852DC 7C 9D 22 14 */ add r4, r29, r4 +/* 800883A0 000852E0 4B F7 AE A5 */ bl TRK_memcpy +/* 800883A4 000852E4 80 1D 00 0C */ lwz r0, 0xc(r29) +/* 800883A8 000852E8 38 7F 00 00 */ addi r3, r31, 0 +/* 800883AC 000852EC 7C 00 F2 14 */ add r0, r0, r30 +/* 800883B0 000852F0 90 1D 00 0C */ stw r0, 0xc(r29) +lbl_800883B4: +/* 800883B4 000852F4 83 E1 00 14 */ lwz r31, 0x14(r1) +/* 800883B8 000852F8 83 C1 00 10 */ lwz r30, 0x10(r1) +/* 800883BC 000852FC 83 A1 00 0C */ lwz r29, 0xc(r1) +/* 800883C0 00085300 38 21 00 18 */ addi r1, r1, 0x18 +/* 800883C4 00085304 80 01 00 04 */ lwz r0, 4(r1) +/* 800883C8 00085308 7C 08 03 A6 */ mtlr r0 +/* 800883CC 0008530C 4E 80 00 20 */ blr + +.global TRKAppendBuffer1_ui16 +TRKAppendBuffer1_ui16: +/* 800883D0 00085310 7C 08 02 A6 */ mflr r0 +/* 800883D4 00085314 3C A0 80 3F */ lis r5, gTRKBigEndian@ha +/* 800883D8 00085318 90 01 00 04 */ stw r0, 4(r1) +/* 800883DC 0008531C 94 21 FF F0 */ stwu r1, -0x10(r1) +/* 800883E0 00085320 B0 81 00 08 */ sth r4, 8(r1) +/* 800883E4 00085324 80 05 91 08 */ lwz r0, gTRKBigEndian@l(r5) +/* 800883E8 00085328 2C 00 00 00 */ cmpwi r0, 0 +/* 800883EC 0008532C 41 82 00 0C */ beq lbl_800883F8 +/* 800883F0 00085330 38 81 00 08 */ addi r4, r1, 8 +/* 800883F4 00085334 48 00 00 18 */ b lbl_8008840C +lbl_800883F8: +/* 800883F8 00085338 88 01 00 09 */ lbz r0, 9(r1) +/* 800883FC 0008533C 38 81 00 0C */ addi r4, r1, 0xc +/* 80088400 00085340 98 01 00 0C */ stb r0, 0xc(r1) +/* 80088404 00085344 88 01 00 08 */ lbz r0, 8(r1) +/* 80088408 00085348 98 01 00 0D */ stb r0, 0xd(r1) +lbl_8008840C: +/* 8008840C 0008534C 38 A0 00 02 */ li r5, 2 +/* 80088410 00085350 4B FF FE 91 */ bl TRKAppendBuffer +/* 80088414 00085354 38 21 00 10 */ addi r1, r1, 0x10 +/* 80088418 00085358 80 01 00 04 */ lwz r0, 4(r1) +/* 8008841C 0008535C 7C 08 03 A6 */ mtlr r0 +/* 80088420 00085360 4E 80 00 20 */ blr + +.global TRKAppendBuffer1_ui32 +TRKAppendBuffer1_ui32: +/* 80088424 00085364 7C 08 02 A6 */ mflr r0 +/* 80088428 00085368 3C A0 80 3F */ lis r5, gTRKBigEndian@ha +/* 8008842C 0008536C 90 01 00 04 */ stw r0, 4(r1) +/* 80088430 00085370 94 21 FF F0 */ stwu r1, -0x10(r1) +/* 80088434 00085374 90 81 00 08 */ stw r4, 8(r1) +/* 80088438 00085378 80 05 91 08 */ lwz r0, gTRKBigEndian@l(r5) +/* 8008843C 0008537C 2C 00 00 00 */ cmpwi r0, 0 +/* 80088440 00085380 41 82 00 0C */ beq lbl_8008844C +/* 80088444 00085384 38 81 00 08 */ addi r4, r1, 8 +/* 80088448 00085388 48 00 00 28 */ b lbl_80088470 +lbl_8008844C: +/* 8008844C 0008538C 88 01 00 0B */ lbz r0, 0xb(r1) +/* 80088450 00085390 38 81 00 0C */ addi r4, r1, 0xc +/* 80088454 00085394 98 01 00 0C */ stb r0, 0xc(r1) +/* 80088458 00085398 88 01 00 0A */ lbz r0, 0xa(r1) +/* 8008845C 0008539C 98 01 00 0D */ stb r0, 0xd(r1) +/* 80088460 000853A0 88 01 00 09 */ lbz r0, 9(r1) +/* 80088464 000853A4 98 01 00 0E */ stb r0, 0xe(r1) +/* 80088468 000853A8 88 01 00 08 */ lbz r0, 8(r1) +/* 8008846C 000853AC 98 01 00 0F */ stb r0, 0xf(r1) +lbl_80088470: +/* 80088470 000853B0 38 A0 00 04 */ li r5, 4 +/* 80088474 000853B4 4B FF FE 2D */ bl TRKAppendBuffer +/* 80088478 000853B8 38 21 00 10 */ addi r1, r1, 0x10 +/* 8008847C 000853BC 80 01 00 04 */ lwz r0, 4(r1) +/* 80088480 000853C0 7C 08 03 A6 */ mtlr r0 +/* 80088484 000853C4 4E 80 00 20 */ blr + +.global TRKAppendBuffer1_ui64 +TRKAppendBuffer1_ui64: +/* 80088488 000853C8 7C 08 02 A6 */ mflr r0 +/* 8008848C 000853CC 3C 80 80 3F */ lis r4, gTRKBigEndian@ha +/* 80088490 000853D0 90 01 00 04 */ stw r0, 4(r1) +/* 80088494 000853D4 94 21 FF E8 */ stwu r1, -0x18(r1) +/* 80088498 000853D8 90 A1 00 08 */ stw r5, 8(r1) +/* 8008849C 000853DC 90 C1 00 0C */ stw r6, 0xc(r1) +/* 800884A0 000853E0 80 04 91 08 */ lwz r0, gTRKBigEndian@l(r4) +/* 800884A4 000853E4 2C 00 00 00 */ cmpwi r0, 0 +/* 800884A8 000853E8 41 82 00 0C */ beq lbl_800884B4 +/* 800884AC 000853EC 38 81 00 08 */ addi r4, r1, 8 +/* 800884B0 000853F0 48 00 00 48 */ b lbl_800884F8 +lbl_800884B4: +/* 800884B4 000853F4 88 01 00 0F */ lbz r0, 0xf(r1) +/* 800884B8 000853F8 38 81 00 10 */ addi r4, r1, 0x10 +/* 800884BC 000853FC 98 01 00 10 */ stb r0, 0x10(r1) +/* 800884C0 00085400 88 01 00 0E */ lbz r0, 0xe(r1) +/* 800884C4 00085404 98 01 00 11 */ stb r0, 0x11(r1) +/* 800884C8 00085408 88 01 00 0D */ lbz r0, 0xd(r1) +/* 800884CC 0008540C 98 01 00 12 */ stb r0, 0x12(r1) +/* 800884D0 00085410 88 01 00 0C */ lbz r0, 0xc(r1) +/* 800884D4 00085414 98 01 00 13 */ stb r0, 0x13(r1) +/* 800884D8 00085418 88 01 00 0B */ lbz r0, 0xb(r1) +/* 800884DC 0008541C 98 01 00 14 */ stb r0, 0x14(r1) +/* 800884E0 00085420 88 01 00 0A */ lbz r0, 0xa(r1) +/* 800884E4 00085424 98 01 00 15 */ stb r0, 0x15(r1) +/* 800884E8 00085428 88 01 00 09 */ lbz r0, 9(r1) +/* 800884EC 0008542C 98 01 00 16 */ stb r0, 0x16(r1) +/* 800884F0 00085430 88 01 00 08 */ lbz r0, 8(r1) +/* 800884F4 00085434 98 01 00 17 */ stb r0, 0x17(r1) +lbl_800884F8: +/* 800884F8 00085438 38 A0 00 08 */ li r5, 8 +/* 800884FC 0008543C 4B FF FD A5 */ bl TRKAppendBuffer +/* 80088500 00085440 38 21 00 18 */ addi r1, r1, 0x18 +/* 80088504 00085444 80 01 00 04 */ lwz r0, 4(r1) +/* 80088508 00085448 7C 08 03 A6 */ mtlr r0 +/* 8008850C 0008544C 4E 80 00 20 */ blr + +.global TRKAppendBuffer_ui8 +TRKAppendBuffer_ui8: +/* 80088510 00085450 39 20 00 00 */ li r9, 0 +/* 80088514 00085454 38 00 00 00 */ li r0, 0 +/* 80088518 00085458 48 00 00 48 */ b lbl_80088560 +lbl_8008851C: +/* 8008851C 0008545C 80 E3 00 0C */ lwz r7, 0xc(r3) +/* 80088520 00085460 89 04 00 00 */ lbz r8, 0(r4) +/* 80088524 00085464 28 07 08 80 */ cmplwi r7, 0x880 +/* 80088528 00085468 41 80 00 0C */ blt lbl_80088534 +/* 8008852C 0008546C 38 E0 03 01 */ li r7, 0x301 +/* 80088530 00085470 48 00 00 24 */ b lbl_80088554 +lbl_80088534: +/* 80088534 00085474 38 C7 00 01 */ addi r6, r7, 1 +/* 80088538 00085478 38 07 00 10 */ addi r0, r7, 0x10 +/* 8008853C 0008547C 90 C3 00 0C */ stw r6, 0xc(r3) +/* 80088540 00085480 38 E0 00 00 */ li r7, 0 +/* 80088544 00085484 7D 03 01 AE */ stbx r8, r3, r0 +/* 80088548 00085488 80 C3 00 08 */ lwz r6, 8(r3) +/* 8008854C 0008548C 38 06 00 01 */ addi r0, r6, 1 +/* 80088550 00085490 90 03 00 08 */ stw r0, 8(r3) +lbl_80088554: +/* 80088554 00085494 38 07 00 00 */ addi r0, r7, 0 +/* 80088558 00085498 39 29 00 01 */ addi r9, r9, 1 +/* 8008855C 0008549C 38 84 00 01 */ addi r4, r4, 1 +lbl_80088560: +/* 80088560 000854A0 2C 00 00 00 */ cmpwi r0, 0 +/* 80088564 000854A4 40 82 00 0C */ bne lbl_80088570 +/* 80088568 000854A8 7C 09 28 00 */ cmpw r9, r5 +/* 8008856C 000854AC 41 80 FF B0 */ blt lbl_8008851C +lbl_80088570: +/* 80088570 000854B0 7C 03 03 78 */ mr r3, r0 +/* 80088574 000854B4 4E 80 00 20 */ blr + +.global TRKAppendBuffer_ui32 +TRKAppendBuffer_ui32: +/* 80088578 000854B8 7C 08 02 A6 */ mflr r0 +/* 8008857C 000854BC 90 01 00 04 */ stw r0, 4(r1) +/* 80088580 000854C0 94 21 FF E8 */ stwu r1, -0x18(r1) +/* 80088584 000854C4 93 E1 00 14 */ stw r31, 0x14(r1) +/* 80088588 000854C8 93 C1 00 10 */ stw r30, 0x10(r1) +/* 8008858C 000854CC 3B C0 00 00 */ li r30, 0 +/* 80088590 000854D0 57 C0 10 3A */ slwi r0, r30, 2 +/* 80088594 000854D4 93 A1 00 0C */ stw r29, 0xc(r1) +/* 80088598 000854D8 7F E4 02 14 */ add r31, r4, r0 +/* 8008859C 000854DC 3B A5 00 00 */ addi r29, r5, 0 +/* 800885A0 000854E0 93 81 00 08 */ stw r28, 8(r1) +/* 800885A4 000854E4 3B 83 00 00 */ addi r28, r3, 0 +/* 800885A8 000854E8 38 60 00 00 */ li r3, 0 +/* 800885AC 000854EC 48 00 00 18 */ b lbl_800885C4 +lbl_800885B0: +/* 800885B0 000854F0 7F 83 E3 78 */ mr r3, r28 +/* 800885B4 000854F4 80 9F 00 00 */ lwz r4, 0(r31) +/* 800885B8 000854F8 4B FF FE 6D */ bl TRKAppendBuffer1_ui32 +/* 800885BC 000854FC 3B DE 00 01 */ addi r30, r30, 1 +/* 800885C0 00085500 3B FF 00 04 */ addi r31, r31, 4 +lbl_800885C4: +/* 800885C4 00085504 2C 03 00 00 */ cmpwi r3, 0 +/* 800885C8 00085508 40 82 00 0C */ bne lbl_800885D4 +/* 800885CC 0008550C 7C 1E E8 00 */ cmpw r30, r29 +/* 800885D0 00085510 41 80 FF E0 */ blt lbl_800885B0 +lbl_800885D4: +/* 800885D4 00085514 83 E1 00 14 */ lwz r31, 0x14(r1) +/* 800885D8 00085518 83 C1 00 10 */ lwz r30, 0x10(r1) +/* 800885DC 0008551C 83 A1 00 0C */ lwz r29, 0xc(r1) +/* 800885E0 00085520 83 81 00 08 */ lwz r28, 8(r1) +/* 800885E4 00085524 38 21 00 18 */ addi r1, r1, 0x18 +/* 800885E8 00085528 80 01 00 04 */ lwz r0, 4(r1) +/* 800885EC 0008552C 7C 08 03 A6 */ mtlr r0 +/* 800885F0 00085530 4E 80 00 20 */ blr + +.global TRKReadBuffer1_ui8 +TRKReadBuffer1_ui8: +/* 800885F4 00085534 7C 08 02 A6 */ mflr r0 +/* 800885F8 00085538 38 A0 00 01 */ li r5, 1 +/* 800885FC 0008553C 90 01 00 04 */ stw r0, 4(r1) +/* 80088600 00085540 94 21 FF F8 */ stwu r1, -8(r1) +/* 80088604 00085544 4B FF FD 41 */ bl TRKReadBuffer +/* 80088608 00085548 38 21 00 08 */ addi r1, r1, 8 +/* 8008860C 0008554C 80 01 00 04 */ lwz r0, 4(r1) +/* 80088610 00085550 7C 08 03 A6 */ mtlr r0 +/* 80088614 00085554 4E 80 00 20 */ blr + +.global TRKReadBuffer1_ui16 +TRKReadBuffer1_ui16: +/* 80088618 00085558 7C 08 02 A6 */ mflr r0 +/* 8008861C 0008555C 3C A0 80 3F */ lis r5, gTRKBigEndian@ha +/* 80088620 00085560 90 01 00 04 */ stw r0, 4(r1) +/* 80088624 00085564 94 21 FF E8 */ stwu r1, -0x18(r1) +/* 80088628 00085568 93 E1 00 14 */ stw r31, 0x14(r1) +/* 8008862C 0008556C 93 C1 00 10 */ stw r30, 0x10(r1) +/* 80088630 00085570 3B C4 00 00 */ addi r30, r4, 0 +/* 80088634 00085574 80 05 91 08 */ lwz r0, gTRKBigEndian@l(r5) +/* 80088638 00085578 2C 00 00 00 */ cmpwi r0, 0 +/* 8008863C 0008557C 41 82 00 0C */ beq lbl_80088648 +/* 80088640 00085580 7F DF F3 78 */ mr r31, r30 +/* 80088644 00085584 48 00 00 08 */ b lbl_8008864C +lbl_80088648: +/* 80088648 00085588 3B E1 00 08 */ addi r31, r1, 8 +lbl_8008864C: +/* 8008864C 0008558C 38 9F 00 00 */ addi r4, r31, 0 +/* 80088650 00085590 38 A0 00 02 */ li r5, 2 +/* 80088654 00085594 4B FF FC F1 */ bl TRKReadBuffer +/* 80088658 00085598 3C 80 80 3F */ lis r4, gTRKBigEndian@ha +/* 8008865C 0008559C 80 04 91 08 */ lwz r0, gTRKBigEndian@l(r4) +/* 80088660 000855A0 2C 00 00 00 */ cmpwi r0, 0 +/* 80088664 000855A4 40 82 00 1C */ bne lbl_80088680 +/* 80088668 000855A8 2C 03 00 00 */ cmpwi r3, 0 +/* 8008866C 000855AC 40 82 00 14 */ bne lbl_80088680 +/* 80088670 000855B0 88 1F 00 01 */ lbz r0, 1(r31) +/* 80088674 000855B4 98 1E 00 00 */ stb r0, 0(r30) +/* 80088678 000855B8 88 1F 00 00 */ lbz r0, 0(r31) +/* 8008867C 000855BC 98 1E 00 01 */ stb r0, 1(r30) +lbl_80088680: +/* 80088680 000855C0 83 E1 00 14 */ lwz r31, 0x14(r1) +/* 80088684 000855C4 83 C1 00 10 */ lwz r30, 0x10(r1) +/* 80088688 000855C8 38 21 00 18 */ addi r1, r1, 0x18 +/* 8008868C 000855CC 80 01 00 04 */ lwz r0, 4(r1) +/* 80088690 000855D0 7C 08 03 A6 */ mtlr r0 +/* 80088694 000855D4 4E 80 00 20 */ blr + +.global TRKReadBuffer1_ui32 +TRKReadBuffer1_ui32: +/* 80088698 000855D8 7C 08 02 A6 */ mflr r0 +/* 8008869C 000855DC 3C A0 80 3F */ lis r5, gTRKBigEndian@ha +/* 800886A0 000855E0 90 01 00 04 */ stw r0, 4(r1) +/* 800886A4 000855E4 94 21 FF E8 */ stwu r1, -0x18(r1) +/* 800886A8 000855E8 93 E1 00 14 */ stw r31, 0x14(r1) +/* 800886AC 000855EC 93 C1 00 10 */ stw r30, 0x10(r1) +/* 800886B0 000855F0 3B C4 00 00 */ addi r30, r4, 0 +/* 800886B4 000855F4 80 05 91 08 */ lwz r0, gTRKBigEndian@l(r5) +/* 800886B8 000855F8 2C 00 00 00 */ cmpwi r0, 0 +/* 800886BC 000855FC 41 82 00 0C */ beq lbl_800886C8 +/* 800886C0 00085600 7F DF F3 78 */ mr r31, r30 +/* 800886C4 00085604 48 00 00 08 */ b lbl_800886CC +lbl_800886C8: +/* 800886C8 00085608 3B E1 00 08 */ addi r31, r1, 8 +lbl_800886CC: +/* 800886CC 0008560C 38 9F 00 00 */ addi r4, r31, 0 +/* 800886D0 00085610 38 A0 00 04 */ li r5, 4 +/* 800886D4 00085614 4B FF FC 71 */ bl TRKReadBuffer +/* 800886D8 00085618 3C 80 80 3F */ lis r4, gTRKBigEndian@ha +/* 800886DC 0008561C 80 04 91 08 */ lwz r0, gTRKBigEndian@l(r4) +/* 800886E0 00085620 2C 00 00 00 */ cmpwi r0, 0 +/* 800886E4 00085624 40 82 00 2C */ bne lbl_80088710 +/* 800886E8 00085628 2C 03 00 00 */ cmpwi r3, 0 +/* 800886EC 0008562C 40 82 00 24 */ bne lbl_80088710 +/* 800886F0 00085630 88 1F 00 03 */ lbz r0, 3(r31) +/* 800886F4 00085634 98 1E 00 00 */ stb r0, 0(r30) +/* 800886F8 00085638 88 1F 00 02 */ lbz r0, 2(r31) +/* 800886FC 0008563C 98 1E 00 01 */ stb r0, 1(r30) +/* 80088700 00085640 88 1F 00 01 */ lbz r0, 1(r31) +/* 80088704 00085644 98 1E 00 02 */ stb r0, 2(r30) +/* 80088708 00085648 88 1F 00 00 */ lbz r0, 0(r31) +/* 8008870C 0008564C 98 1E 00 03 */ stb r0, 3(r30) +lbl_80088710: +/* 80088710 00085650 83 E1 00 14 */ lwz r31, 0x14(r1) +/* 80088714 00085654 83 C1 00 10 */ lwz r30, 0x10(r1) +/* 80088718 00085658 38 21 00 18 */ addi r1, r1, 0x18 +/* 8008871C 0008565C 80 01 00 04 */ lwz r0, 4(r1) +/* 80088720 00085660 7C 08 03 A6 */ mtlr r0 +/* 80088724 00085664 4E 80 00 20 */ blr + +.global TRKReadBuffer1_ui64 +TRKReadBuffer1_ui64: +/* 80088728 00085668 7C 08 02 A6 */ mflr r0 +/* 8008872C 0008566C 3C A0 80 3F */ lis r5, gTRKBigEndian@ha +/* 80088730 00085670 90 01 00 04 */ stw r0, 4(r1) +/* 80088734 00085674 94 21 FF E8 */ stwu r1, -0x18(r1) +/* 80088738 00085678 93 E1 00 14 */ stw r31, 0x14(r1) +/* 8008873C 0008567C 93 C1 00 10 */ stw r30, 0x10(r1) +/* 80088740 00085680 3B C4 00 00 */ addi r30, r4, 0 +/* 80088744 00085684 80 05 91 08 */ lwz r0, gTRKBigEndian@l(r5) +/* 80088748 00085688 2C 00 00 00 */ cmpwi r0, 0 +/* 8008874C 0008568C 41 82 00 0C */ beq lbl_80088758 +/* 80088750 00085690 7F DF F3 78 */ mr r31, r30 +/* 80088754 00085694 48 00 00 08 */ b lbl_8008875C +lbl_80088758: +/* 80088758 00085698 3B E1 00 08 */ addi r31, r1, 8 +lbl_8008875C: +/* 8008875C 0008569C 38 9F 00 00 */ addi r4, r31, 0 +/* 80088760 000856A0 38 A0 00 08 */ li r5, 8 +/* 80088764 000856A4 4B FF FB E1 */ bl TRKReadBuffer +/* 80088768 000856A8 3C 80 80 3F */ lis r4, gTRKBigEndian@ha +/* 8008876C 000856AC 80 04 91 08 */ lwz r0, gTRKBigEndian@l(r4) +/* 80088770 000856B0 2C 00 00 00 */ cmpwi r0, 0 +/* 80088774 000856B4 40 82 00 4C */ bne lbl_800887C0 +/* 80088778 000856B8 2C 03 00 00 */ cmpwi r3, 0 +/* 8008877C 000856BC 40 82 00 44 */ bne lbl_800887C0 +/* 80088780 000856C0 88 1F 00 07 */ lbz r0, 7(r31) +/* 80088784 000856C4 98 1E 00 00 */ stb r0, 0(r30) +/* 80088788 000856C8 88 1F 00 06 */ lbz r0, 6(r31) +/* 8008878C 000856CC 98 1E 00 01 */ stb r0, 1(r30) +/* 80088790 000856D0 88 1F 00 05 */ lbz r0, 5(r31) +/* 80088794 000856D4 98 1E 00 02 */ stb r0, 2(r30) +/* 80088798 000856D8 88 1F 00 04 */ lbz r0, 4(r31) +/* 8008879C 000856DC 98 1E 00 03 */ stb r0, 3(r30) +/* 800887A0 000856E0 88 1F 00 03 */ lbz r0, 3(r31) +/* 800887A4 000856E4 98 1E 00 04 */ stb r0, 4(r30) +/* 800887A8 000856E8 88 1F 00 02 */ lbz r0, 2(r31) +/* 800887AC 000856EC 98 1E 00 05 */ stb r0, 5(r30) +/* 800887B0 000856F0 88 1F 00 01 */ lbz r0, 1(r31) +/* 800887B4 000856F4 98 1E 00 06 */ stb r0, 6(r30) +/* 800887B8 000856F8 88 1F 00 00 */ lbz r0, 0(r31) +/* 800887BC 000856FC 98 1E 00 07 */ stb r0, 7(r30) +lbl_800887C0: +/* 800887C0 00085700 83 E1 00 14 */ lwz r31, 0x14(r1) +/* 800887C4 00085704 83 C1 00 10 */ lwz r30, 0x10(r1) +/* 800887C8 00085708 38 21 00 18 */ addi r1, r1, 0x18 +/* 800887CC 0008570C 80 01 00 04 */ lwz r0, 4(r1) +/* 800887D0 00085710 7C 08 03 A6 */ mtlr r0 +/* 800887D4 00085714 4E 80 00 20 */ blr + +.global TRKReadBuffer_ui8 +TRKReadBuffer_ui8: +/* 800887D8 00085718 7C 08 02 A6 */ mflr r0 +/* 800887DC 0008571C 90 01 00 04 */ stw r0, 4(r1) +/* 800887E0 00085720 94 21 FF E8 */ stwu r1, -0x18(r1) +/* 800887E4 00085724 93 E1 00 14 */ stw r31, 0x14(r1) +/* 800887E8 00085728 3B E0 00 00 */ li r31, 0 +/* 800887EC 0008572C 93 C1 00 10 */ stw r30, 0x10(r1) +/* 800887F0 00085730 3B C5 00 00 */ addi r30, r5, 0 +/* 800887F4 00085734 93 A1 00 0C */ stw r29, 0xc(r1) +/* 800887F8 00085738 3B A4 00 00 */ addi r29, r4, 0 +/* 800887FC 0008573C 93 81 00 08 */ stw r28, 8(r1) +/* 80088800 00085740 3B 83 00 00 */ addi r28, r3, 0 +/* 80088804 00085744 38 60 00 00 */ li r3, 0 +/* 80088808 00085748 48 00 00 14 */ b lbl_8008881C +lbl_8008880C: +/* 8008880C 0008574C 38 7C 00 00 */ addi r3, r28, 0 +/* 80088810 00085750 7C 9D FA 14 */ add r4, r29, r31 +/* 80088814 00085754 4B FF FD E1 */ bl TRKReadBuffer1_ui8 +/* 80088818 00085758 3B FF 00 01 */ addi r31, r31, 1 +lbl_8008881C: +/* 8008881C 0008575C 2C 03 00 00 */ cmpwi r3, 0 +/* 80088820 00085760 40 82 00 0C */ bne lbl_8008882C +/* 80088824 00085764 7C 1F F0 00 */ cmpw r31, r30 +/* 80088828 00085768 41 80 FF E4 */ blt lbl_8008880C +lbl_8008882C: +/* 8008882C 0008576C 83 E1 00 14 */ lwz r31, 0x14(r1) +/* 80088830 00085770 83 C1 00 10 */ lwz r30, 0x10(r1) +/* 80088834 00085774 83 A1 00 0C */ lwz r29, 0xc(r1) +/* 80088838 00085778 83 81 00 08 */ lwz r28, 8(r1) +/* 8008883C 0008577C 38 21 00 18 */ addi r1, r1, 0x18 +/* 80088840 00085780 80 01 00 04 */ lwz r0, 4(r1) +/* 80088844 00085784 7C 08 03 A6 */ mtlr r0 +/* 80088848 00085788 4E 80 00 20 */ blr + +.global TRKReadBuffer_ui32 +TRKReadBuffer_ui32: +/* 8008884C 0008578C 7C 08 02 A6 */ mflr r0 +/* 80088850 00085790 90 01 00 04 */ stw r0, 4(r1) +/* 80088854 00085794 94 21 FF E8 */ stwu r1, -0x18(r1) +/* 80088858 00085798 93 E1 00 14 */ stw r31, 0x14(r1) +/* 8008885C 0008579C 93 C1 00 10 */ stw r30, 0x10(r1) +/* 80088860 000857A0 3B C0 00 00 */ li r30, 0 +/* 80088864 000857A4 57 C0 10 3A */ slwi r0, r30, 2 +/* 80088868 000857A8 93 A1 00 0C */ stw r29, 0xc(r1) +/* 8008886C 000857AC 7F E4 02 14 */ add r31, r4, r0 +/* 80088870 000857B0 3B A5 00 00 */ addi r29, r5, 0 +/* 80088874 000857B4 93 81 00 08 */ stw r28, 8(r1) +/* 80088878 000857B8 3B 83 00 00 */ addi r28, r3, 0 +/* 8008887C 000857BC 38 60 00 00 */ li r3, 0 +/* 80088880 000857C0 48 00 00 18 */ b lbl_80088898 +lbl_80088884: +/* 80088884 000857C4 38 7C 00 00 */ addi r3, r28, 0 +/* 80088888 000857C8 38 9F 00 00 */ addi r4, r31, 0 +/* 8008888C 000857CC 4B FF FE 0D */ bl TRKReadBuffer1_ui32 +/* 80088890 000857D0 3B DE 00 01 */ addi r30, r30, 1 +/* 80088894 000857D4 3B FF 00 04 */ addi r31, r31, 4 +lbl_80088898: +/* 80088898 000857D8 2C 03 00 00 */ cmpwi r3, 0 +/* 8008889C 000857DC 40 82 00 0C */ bne lbl_800888A8 +/* 800888A0 000857E0 7C 1E E8 00 */ cmpw r30, r29 +/* 800888A4 000857E4 41 80 FF E0 */ blt lbl_80088884 +lbl_800888A8: +/* 800888A8 000857E8 83 E1 00 14 */ lwz r31, 0x14(r1) +/* 800888AC 000857EC 83 C1 00 10 */ lwz r30, 0x10(r1) +/* 800888B0 000857F0 83 A1 00 0C */ lwz r29, 0xc(r1) +/* 800888B4 000857F4 83 81 00 08 */ lwz r28, 8(r1) +/* 800888B8 000857F8 38 21 00 18 */ addi r1, r1, 0x18 +/* 800888BC 000857FC 80 01 00 04 */ lwz r0, 4(r1) +/* 800888C0 00085800 7C 08 03 A6 */ mtlr r0 +/* 800888C4 00085804 4E 80 00 20 */ blr + +.section .bss, "wa" # 0x803E6000 - 0x80408AC0 +.global gTRKMsgBufs +gTRKMsgBufs: + .skip 0x19B0 diff --git a/asm/TRK_MINNOW_DOLPHIN/msghndlr.s b/asm/TRK_MINNOW_DOLPHIN/msghndlr.s new file mode 100644 index 0000000..69b3e1d --- /dev/null +++ b/asm/TRK_MINNOW_DOLPHIN/msghndlr.s @@ -0,0 +1,1434 @@ +.include "macros.inc" + +.section .text, "ax" # 0x80005600 - 0x8036FBA0 +.global TRKMessageIntoReply +TRKMessageIntoReply: +/* 80088B2C 00085A6C 7C 08 02 A6 */ mflr r0 +/* 80088B30 00085A70 90 01 00 04 */ stw r0, 4(r1) +/* 80088B34 00085A74 94 21 FF E8 */ stwu r1, -0x18(r1) +/* 80088B38 00085A78 93 E1 00 14 */ stw r31, 0x14(r1) +/* 80088B3C 00085A7C 3B E5 00 00 */ addi r31, r5, 0 +/* 80088B40 00085A80 93 C1 00 10 */ stw r30, 0x10(r1) +/* 80088B44 00085A84 3B C4 00 00 */ addi r30, r4, 0 +/* 80088B48 00085A88 38 80 00 01 */ li r4, 1 +/* 80088B4C 00085A8C 93 A1 00 0C */ stw r29, 0xc(r1) +/* 80088B50 00085A90 3B A3 00 00 */ addi r29, r3, 0 +/* 80088B54 00085A94 4B FF F6 DD */ bl TRKResetBuffer +/* 80088B58 00085A98 80 7D 00 0C */ lwz r3, 0xc(r29) +/* 80088B5C 00085A9C 28 03 08 80 */ cmplwi r3, 0x880 +/* 80088B60 00085AA0 40 80 00 20 */ bge lbl_80088B80 +/* 80088B64 00085AA4 38 03 00 01 */ addi r0, r3, 1 +/* 80088B68 00085AA8 7C 7D 1A 14 */ add r3, r29, r3 +/* 80088B6C 00085AAC 90 1D 00 0C */ stw r0, 0xc(r29) +/* 80088B70 00085AB0 9B C3 00 10 */ stb r30, 0x10(r3) +/* 80088B74 00085AB4 80 7D 00 08 */ lwz r3, 8(r29) +/* 80088B78 00085AB8 38 03 00 01 */ addi r0, r3, 1 +/* 80088B7C 00085ABC 90 1D 00 08 */ stw r0, 8(r29) +lbl_80088B80: +/* 80088B80 00085AC0 80 7D 00 0C */ lwz r3, 0xc(r29) +/* 80088B84 00085AC4 28 03 08 80 */ cmplwi r3, 0x880 +/* 80088B88 00085AC8 40 80 00 20 */ bge lbl_80088BA8 +/* 80088B8C 00085ACC 38 03 00 01 */ addi r0, r3, 1 +/* 80088B90 00085AD0 7C 7D 1A 14 */ add r3, r29, r3 +/* 80088B94 00085AD4 90 1D 00 0C */ stw r0, 0xc(r29) +/* 80088B98 00085AD8 9B E3 00 10 */ stb r31, 0x10(r3) +/* 80088B9C 00085ADC 80 7D 00 08 */ lwz r3, 8(r29) +/* 80088BA0 00085AE0 38 03 00 01 */ addi r0, r3, 1 +/* 80088BA4 00085AE4 90 1D 00 08 */ stw r0, 8(r29) +lbl_80088BA8: +/* 80088BA8 00085AE8 83 E1 00 14 */ lwz r31, 0x14(r1) +/* 80088BAC 00085AEC 83 C1 00 10 */ lwz r30, 0x10(r1) +/* 80088BB0 00085AF0 83 A1 00 0C */ lwz r29, 0xc(r1) +/* 80088BB4 00085AF4 38 21 00 18 */ addi r1, r1, 0x18 +/* 80088BB8 00085AF8 80 01 00 04 */ lwz r0, 4(r1) +/* 80088BBC 00085AFC 7C 08 03 A6 */ mtlr r0 +/* 80088BC0 00085B00 4E 80 00 20 */ blr + +.global TRKSendACK +TRKSendACK: +/* 80088BC4 00085B04 7C 08 02 A6 */ mflr r0 +/* 80088BC8 00085B08 90 01 00 04 */ stw r0, 4(r1) +/* 80088BCC 00085B0C 94 21 FF F0 */ stwu r1, -0x10(r1) +/* 80088BD0 00085B10 93 E1 00 0C */ stw r31, 0xc(r1) +/* 80088BD4 00085B14 3B E0 00 03 */ li r31, 3 +/* 80088BD8 00085B18 93 C1 00 08 */ stw r30, 8(r1) +/* 80088BDC 00085B1C 3B C3 00 00 */ addi r30, r3, 0 +lbl_80088BE0: +/* 80088BE0 00085B20 7F C3 F3 78 */ mr r3, r30 +/* 80088BE4 00085B24 4B FF F4 75 */ bl TRKMessageSend +/* 80088BE8 00085B28 2C 03 00 00 */ cmpwi r3, 0 +/* 80088BEC 00085B2C 3B FF FF FF */ addi r31, r31, -1 +/* 80088BF0 00085B30 41 82 00 0C */ beq lbl_80088BFC +/* 80088BF4 00085B34 2C 1F 00 00 */ cmpwi r31, 0 +/* 80088BF8 00085B38 41 81 FF E8 */ bgt lbl_80088BE0 +lbl_80088BFC: +/* 80088BFC 00085B3C 83 E1 00 0C */ lwz r31, 0xc(r1) +/* 80088C00 00085B40 83 C1 00 08 */ lwz r30, 8(r1) +/* 80088C04 00085B44 38 21 00 10 */ addi r1, r1, 0x10 +/* 80088C08 00085B48 80 01 00 04 */ lwz r0, 4(r1) +/* 80088C0C 00085B4C 7C 08 03 A6 */ mtlr r0 +/* 80088C10 00085B50 4E 80 00 20 */ blr + +.global TRKStandardACK +TRKStandardACK: +/* 80088C14 00085B54 7C 08 02 A6 */ mflr r0 +/* 80088C18 00085B58 90 01 00 04 */ stw r0, 4(r1) +/* 80088C1C 00085B5C 94 21 FF F0 */ stwu r1, -0x10(r1) +/* 80088C20 00085B60 93 E1 00 0C */ stw r31, 0xc(r1) +/* 80088C24 00085B64 7C 7F 1B 78 */ mr r31, r3 +/* 80088C28 00085B68 4B FF FF 05 */ bl TRKMessageIntoReply +/* 80088C2C 00085B6C 7F E3 FB 78 */ mr r3, r31 +/* 80088C30 00085B70 4B FF FF 95 */ bl TRKSendACK +/* 80088C34 00085B74 83 E1 00 0C */ lwz r31, 0xc(r1) +/* 80088C38 00085B78 38 21 00 10 */ addi r1, r1, 0x10 +/* 80088C3C 00085B7C 80 01 00 04 */ lwz r0, 4(r1) +/* 80088C40 00085B80 7C 08 03 A6 */ mtlr r0 +/* 80088C44 00085B84 4E 80 00 20 */ blr + +.global TRKDoUnsupported +TRKDoUnsupported: +/* 80088C48 00085B88 7C 08 02 A6 */ mflr r0 +/* 80088C4C 00085B8C 38 80 00 80 */ li r4, 0x80 +/* 80088C50 00085B90 90 01 00 04 */ stw r0, 4(r1) +/* 80088C54 00085B94 38 A0 00 10 */ li r5, 0x10 +/* 80088C58 00085B98 94 21 FF F8 */ stwu r1, -8(r1) +/* 80088C5C 00085B9C 4B FF FF B9 */ bl TRKStandardACK +/* 80088C60 00085BA0 38 21 00 08 */ addi r1, r1, 8 +/* 80088C64 00085BA4 80 01 00 04 */ lwz r0, 4(r1) +/* 80088C68 00085BA8 7C 08 03 A6 */ mtlr r0 +/* 80088C6C 00085BAC 4E 80 00 20 */ blr + +.global TRKDoConnect +TRKDoConnect: +/* 80088C70 00085BB0 7C 08 02 A6 */ mflr r0 +/* 80088C74 00085BB4 38 80 00 80 */ li r4, 0x80 +/* 80088C78 00085BB8 90 01 00 04 */ stw r0, 4(r1) +/* 80088C7C 00085BBC 38 A0 00 00 */ li r5, 0 +/* 80088C80 00085BC0 94 21 FF F8 */ stwu r1, -8(r1) +/* 80088C84 00085BC4 4B FF FF 91 */ bl TRKStandardACK +/* 80088C88 00085BC8 38 21 00 08 */ addi r1, r1, 8 +/* 80088C8C 00085BCC 80 01 00 04 */ lwz r0, 4(r1) +/* 80088C90 00085BD0 7C 08 03 A6 */ mtlr r0 +/* 80088C94 00085BD4 4E 80 00 20 */ blr + +.global TRKDoDisconnect +TRKDoDisconnect: +/* 80088C98 00085BD8 7C 08 02 A6 */ mflr r0 +/* 80088C9C 00085BDC 38 80 00 80 */ li r4, 0x80 +/* 80088CA0 00085BE0 90 01 00 04 */ stw r0, 4(r1) +/* 80088CA4 00085BE4 38 A0 00 00 */ li r5, 0 +/* 80088CA8 00085BE8 94 21 FF E8 */ stwu r1, -0x18(r1) +/* 80088CAC 00085BEC 93 E1 00 14 */ stw r31, 0x14(r1) +/* 80088CB0 00085BF0 4B FF FF 65 */ bl TRKStandardACK +/* 80088CB4 00085BF4 7C 7F 1B 79 */ or. r31, r3, r3 +/* 80088CB8 00085BF8 40 82 00 18 */ bne lbl_80088CD0 +/* 80088CBC 00085BFC 38 61 00 08 */ addi r3, r1, 8 +/* 80088CC0 00085C00 38 80 00 01 */ li r4, 1 +/* 80088CC4 00085C04 4B FF F1 C5 */ bl TRKConstructEvent +/* 80088CC8 00085C08 38 61 00 08 */ addi r3, r1, 8 +/* 80088CCC 00085C0C 4B FF F0 DD */ bl TRKPostEvent +lbl_80088CD0: +/* 80088CD0 00085C10 7F E3 FB 78 */ mr r3, r31 +/* 80088CD4 00085C14 83 E1 00 14 */ lwz r31, 0x14(r1) +/* 80088CD8 00085C18 38 21 00 18 */ addi r1, r1, 0x18 +/* 80088CDC 00085C1C 80 01 00 04 */ lwz r0, 4(r1) +/* 80088CE0 00085C20 7C 08 03 A6 */ mtlr r0 +/* 80088CE4 00085C24 4E 80 00 20 */ blr + +.global TRKDoReset +TRKDoReset: +/* 80088CE8 00085C28 7C 08 02 A6 */ mflr r0 +/* 80088CEC 00085C2C 38 80 00 80 */ li r4, 0x80 +/* 80088CF0 00085C30 90 01 00 04 */ stw r0, 4(r1) +/* 80088CF4 00085C34 38 A0 00 00 */ li r5, 0 +/* 80088CF8 00085C38 94 21 FF F8 */ stwu r1, -8(r1) +/* 80088CFC 00085C3C 4B FF FF 19 */ bl TRKStandardACK +/* 80088D00 00085C40 4B F7 C4 CD */ bl __TRK_reset +/* 80088D04 00085C44 38 60 00 00 */ li r3, 0 +/* 80088D08 00085C48 38 21 00 08 */ addi r1, r1, 8 +/* 80088D0C 00085C4C 80 01 00 04 */ lwz r0, 4(r1) +/* 80088D10 00085C50 7C 08 03 A6 */ mtlr r0 +/* 80088D14 00085C54 4E 80 00 20 */ blr + +.global TRKDoVersions +TRKDoVersions: +/* 80088D18 00085C58 7C 08 02 A6 */ mflr r0 +/* 80088D1C 00085C5C 90 01 00 04 */ stw r0, 4(r1) +/* 80088D20 00085C60 94 21 FF F0 */ stwu r1, -0x10(r1) +/* 80088D24 00085C64 93 E1 00 0C */ stw r31, 0xc(r1) +/* 80088D28 00085C68 7C 7F 1B 78 */ mr r31, r3 +/* 80088D2C 00085C6C 80 03 00 08 */ lwz r0, 8(r3) +/* 80088D30 00085C70 28 00 00 01 */ cmplwi r0, 1 +/* 80088D34 00085C74 41 82 00 18 */ beq lbl_80088D4C +/* 80088D38 00085C78 38 7F 00 00 */ addi r3, r31, 0 +/* 80088D3C 00085C7C 38 80 00 80 */ li r4, 0x80 +/* 80088D40 00085C80 38 A0 00 02 */ li r5, 2 +/* 80088D44 00085C84 4B FF FE D1 */ bl TRKStandardACK +/* 80088D48 00085C88 48 00 01 40 */ b lbl_80088E88 +lbl_80088D4C: +/* 80088D4C 00085C8C 38 7F 00 00 */ addi r3, r31, 0 +/* 80088D50 00085C90 38 80 00 80 */ li r4, 0x80 +/* 80088D54 00085C94 38 A0 00 00 */ li r5, 0 +/* 80088D58 00085C98 4B FF FD D5 */ bl TRKMessageIntoReply +/* 80088D5C 00085C9C 38 61 00 08 */ addi r3, r1, 8 +/* 80088D60 00085CA0 48 00 1F 45 */ bl TRKTargetVersions +/* 80088D64 00085CA4 2C 03 00 00 */ cmpwi r3, 0 +/* 80088D68 00085CA8 40 82 00 3C */ bne lbl_80088DA4 +/* 80088D6C 00085CAC 80 7F 00 0C */ lwz r3, 0xc(r31) +/* 80088D70 00085CB0 88 A1 00 08 */ lbz r5, 8(r1) +/* 80088D74 00085CB4 28 03 08 80 */ cmplwi r3, 0x880 +/* 80088D78 00085CB8 41 80 00 0C */ blt lbl_80088D84 +/* 80088D7C 00085CBC 38 60 03 01 */ li r3, 0x301 +/* 80088D80 00085CC0 48 00 00 24 */ b lbl_80088DA4 +lbl_80088D84: +/* 80088D84 00085CC4 38 03 00 01 */ addi r0, r3, 1 +/* 80088D88 00085CC8 7C 9F 1A 14 */ add r4, r31, r3 +/* 80088D8C 00085CCC 90 1F 00 0C */ stw r0, 0xc(r31) +/* 80088D90 00085CD0 38 60 00 00 */ li r3, 0 +/* 80088D94 00085CD4 98 A4 00 10 */ stb r5, 0x10(r4) +/* 80088D98 00085CD8 80 9F 00 08 */ lwz r4, 8(r31) +/* 80088D9C 00085CDC 38 04 00 01 */ addi r0, r4, 1 +/* 80088DA0 00085CE0 90 1F 00 08 */ stw r0, 8(r31) +lbl_80088DA4: +/* 80088DA4 00085CE4 2C 03 00 00 */ cmpwi r3, 0 +/* 80088DA8 00085CE8 40 82 00 3C */ bne lbl_80088DE4 +/* 80088DAC 00085CEC 80 7F 00 0C */ lwz r3, 0xc(r31) +/* 80088DB0 00085CF0 88 A1 00 09 */ lbz r5, 9(r1) +/* 80088DB4 00085CF4 28 03 08 80 */ cmplwi r3, 0x880 +/* 80088DB8 00085CF8 41 80 00 0C */ blt lbl_80088DC4 +/* 80088DBC 00085CFC 38 60 03 01 */ li r3, 0x301 +/* 80088DC0 00085D00 48 00 00 24 */ b lbl_80088DE4 +lbl_80088DC4: +/* 80088DC4 00085D04 38 03 00 01 */ addi r0, r3, 1 +/* 80088DC8 00085D08 7C 9F 1A 14 */ add r4, r31, r3 +/* 80088DCC 00085D0C 90 1F 00 0C */ stw r0, 0xc(r31) +/* 80088DD0 00085D10 38 60 00 00 */ li r3, 0 +/* 80088DD4 00085D14 98 A4 00 10 */ stb r5, 0x10(r4) +/* 80088DD8 00085D18 80 9F 00 08 */ lwz r4, 8(r31) +/* 80088DDC 00085D1C 38 04 00 01 */ addi r0, r4, 1 +/* 80088DE0 00085D20 90 1F 00 08 */ stw r0, 8(r31) +lbl_80088DE4: +/* 80088DE4 00085D24 2C 03 00 00 */ cmpwi r3, 0 +/* 80088DE8 00085D28 40 82 00 3C */ bne lbl_80088E24 +/* 80088DEC 00085D2C 80 7F 00 0C */ lwz r3, 0xc(r31) +/* 80088DF0 00085D30 88 A1 00 0A */ lbz r5, 0xa(r1) +/* 80088DF4 00085D34 28 03 08 80 */ cmplwi r3, 0x880 +/* 80088DF8 00085D38 41 80 00 0C */ blt lbl_80088E04 +/* 80088DFC 00085D3C 38 60 03 01 */ li r3, 0x301 +/* 80088E00 00085D40 48 00 00 24 */ b lbl_80088E24 +lbl_80088E04: +/* 80088E04 00085D44 38 03 00 01 */ addi r0, r3, 1 +/* 80088E08 00085D48 7C 9F 1A 14 */ add r4, r31, r3 +/* 80088E0C 00085D4C 90 1F 00 0C */ stw r0, 0xc(r31) +/* 80088E10 00085D50 38 60 00 00 */ li r3, 0 +/* 80088E14 00085D54 98 A4 00 10 */ stb r5, 0x10(r4) +/* 80088E18 00085D58 80 9F 00 08 */ lwz r4, 8(r31) +/* 80088E1C 00085D5C 38 04 00 01 */ addi r0, r4, 1 +/* 80088E20 00085D60 90 1F 00 08 */ stw r0, 8(r31) +lbl_80088E24: +/* 80088E24 00085D64 2C 03 00 00 */ cmpwi r3, 0 +/* 80088E28 00085D68 40 82 00 3C */ bne lbl_80088E64 +/* 80088E2C 00085D6C 80 7F 00 0C */ lwz r3, 0xc(r31) +/* 80088E30 00085D70 88 A1 00 0B */ lbz r5, 0xb(r1) +/* 80088E34 00085D74 28 03 08 80 */ cmplwi r3, 0x880 +/* 80088E38 00085D78 41 80 00 0C */ blt lbl_80088E44 +/* 80088E3C 00085D7C 38 60 03 01 */ li r3, 0x301 +/* 80088E40 00085D80 48 00 00 24 */ b lbl_80088E64 +lbl_80088E44: +/* 80088E44 00085D84 38 03 00 01 */ addi r0, r3, 1 +/* 80088E48 00085D88 7C 9F 1A 14 */ add r4, r31, r3 +/* 80088E4C 00085D8C 90 1F 00 0C */ stw r0, 0xc(r31) +/* 80088E50 00085D90 38 60 00 00 */ li r3, 0 +/* 80088E54 00085D94 98 A4 00 10 */ stb r5, 0x10(r4) +/* 80088E58 00085D98 80 9F 00 08 */ lwz r4, 8(r31) +/* 80088E5C 00085D9C 38 04 00 01 */ addi r0, r4, 1 +/* 80088E60 00085DA0 90 1F 00 08 */ stw r0, 8(r31) +lbl_80088E64: +/* 80088E64 00085DA4 2C 03 00 00 */ cmpwi r3, 0 +/* 80088E68 00085DA8 41 82 00 18 */ beq lbl_80088E80 +/* 80088E6C 00085DAC 38 7F 00 00 */ addi r3, r31, 0 +/* 80088E70 00085DB0 38 80 00 80 */ li r4, 0x80 +/* 80088E74 00085DB4 38 A0 00 03 */ li r5, 3 +/* 80088E78 00085DB8 4B FF FD 9D */ bl TRKStandardACK +/* 80088E7C 00085DBC 48 00 00 0C */ b lbl_80088E88 +lbl_80088E80: +/* 80088E80 00085DC0 7F E3 FB 78 */ mr r3, r31 +/* 80088E84 00085DC4 4B FF FD 41 */ bl TRKSendACK +lbl_80088E88: +/* 80088E88 00085DC8 83 E1 00 0C */ lwz r31, 0xc(r1) +/* 80088E8C 00085DCC 38 21 00 10 */ addi r1, r1, 0x10 +/* 80088E90 00085DD0 80 01 00 04 */ lwz r0, 4(r1) +/* 80088E94 00085DD4 7C 08 03 A6 */ mtlr r0 +/* 80088E98 00085DD8 4E 80 00 20 */ blr + +.global TRKDoSupportMask +TRKDoSupportMask: +/* 80088E9C 00085DDC 7C 08 02 A6 */ mflr r0 +/* 80088EA0 00085DE0 90 01 00 04 */ stw r0, 4(r1) +/* 80088EA4 00085DE4 94 21 FF D0 */ stwu r1, -0x30(r1) +/* 80088EA8 00085DE8 93 E1 00 2C */ stw r31, 0x2c(r1) +/* 80088EAC 00085DEC 7C 7F 1B 78 */ mr r31, r3 +/* 80088EB0 00085DF0 80 03 00 08 */ lwz r0, 8(r3) +/* 80088EB4 00085DF4 28 00 00 01 */ cmplwi r0, 1 +/* 80088EB8 00085DF8 41 82 00 18 */ beq lbl_80088ED0 +/* 80088EBC 00085DFC 38 7F 00 00 */ addi r3, r31, 0 +/* 80088EC0 00085E00 38 80 00 80 */ li r4, 0x80 +/* 80088EC4 00085E04 38 A0 00 02 */ li r5, 2 +/* 80088EC8 00085E08 4B FF FD 4D */ bl TRKStandardACK +/* 80088ECC 00085E0C 48 00 00 98 */ b lbl_80088F64 +lbl_80088ED0: +/* 80088ED0 00085E10 38 7F 00 00 */ addi r3, r31, 0 +/* 80088ED4 00085E14 38 80 00 80 */ li r4, 0x80 +/* 80088ED8 00085E18 38 A0 00 00 */ li r5, 0 +/* 80088EDC 00085E1C 4B FF FC 51 */ bl TRKMessageIntoReply +/* 80088EE0 00085E20 38 61 00 08 */ addi r3, r1, 8 +/* 80088EE4 00085E24 48 00 1D E9 */ bl TRKTargetSupportMask +/* 80088EE8 00085E28 2C 03 00 00 */ cmpwi r3, 0 +/* 80088EEC 00085E2C 40 82 00 14 */ bne lbl_80088F00 +/* 80088EF0 00085E30 38 7F 00 00 */ addi r3, r31, 0 +/* 80088EF4 00085E34 38 81 00 08 */ addi r4, r1, 8 +/* 80088EF8 00085E38 38 A0 00 20 */ li r5, 0x20 +/* 80088EFC 00085E3C 4B FF F3 A5 */ bl TRKAppendBuffer +lbl_80088F00: +/* 80088F00 00085E40 2C 03 00 00 */ cmpwi r3, 0 +/* 80088F04 00085E44 40 82 00 3C */ bne lbl_80088F40 +/* 80088F08 00085E48 80 7F 00 0C */ lwz r3, 0xc(r31) +/* 80088F0C 00085E4C 28 03 08 80 */ cmplwi r3, 0x880 +/* 80088F10 00085E50 41 80 00 0C */ blt lbl_80088F1C +/* 80088F14 00085E54 38 60 03 01 */ li r3, 0x301 +/* 80088F18 00085E58 48 00 00 28 */ b lbl_80088F40 +lbl_80088F1C: +/* 80088F1C 00085E5C 38 03 00 01 */ addi r0, r3, 1 +/* 80088F20 00085E60 7C 9F 1A 14 */ add r4, r31, r3 +/* 80088F24 00085E64 90 1F 00 0C */ stw r0, 0xc(r31) +/* 80088F28 00085E68 38 00 00 02 */ li r0, 2 +/* 80088F2C 00085E6C 38 60 00 00 */ li r3, 0 +/* 80088F30 00085E70 98 04 00 10 */ stb r0, 0x10(r4) +/* 80088F34 00085E74 80 9F 00 08 */ lwz r4, 8(r31) +/* 80088F38 00085E78 38 04 00 01 */ addi r0, r4, 1 +/* 80088F3C 00085E7C 90 1F 00 08 */ stw r0, 8(r31) +lbl_80088F40: +/* 80088F40 00085E80 2C 03 00 00 */ cmpwi r3, 0 +/* 80088F44 00085E84 41 82 00 18 */ beq lbl_80088F5C +/* 80088F48 00085E88 38 7F 00 00 */ addi r3, r31, 0 +/* 80088F4C 00085E8C 38 80 00 80 */ li r4, 0x80 +/* 80088F50 00085E90 38 A0 00 03 */ li r5, 3 +/* 80088F54 00085E94 4B FF FC C1 */ bl TRKStandardACK +/* 80088F58 00085E98 48 00 00 0C */ b lbl_80088F64 +lbl_80088F5C: +/* 80088F5C 00085E9C 7F E3 FB 78 */ mr r3, r31 +/* 80088F60 00085EA0 4B FF FC 65 */ bl TRKSendACK +lbl_80088F64: +/* 80088F64 00085EA4 83 E1 00 2C */ lwz r31, 0x2c(r1) +/* 80088F68 00085EA8 38 21 00 30 */ addi r1, r1, 0x30 +/* 80088F6C 00085EAC 80 01 00 04 */ lwz r0, 4(r1) +/* 80088F70 00085EB0 7C 08 03 A6 */ mtlr r0 +/* 80088F74 00085EB4 4E 80 00 20 */ blr + +.global TRKDoCPUType +TRKDoCPUType: +/* 80088F78 00085EB8 7C 08 02 A6 */ mflr r0 +/* 80088F7C 00085EBC 90 01 00 04 */ stw r0, 4(r1) +/* 80088F80 00085EC0 94 21 FF E8 */ stwu r1, -0x18(r1) +/* 80088F84 00085EC4 93 E1 00 14 */ stw r31, 0x14(r1) +/* 80088F88 00085EC8 7C 7F 1B 78 */ mr r31, r3 +/* 80088F8C 00085ECC 80 03 00 08 */ lwz r0, 8(r3) +/* 80088F90 00085ED0 28 00 00 01 */ cmplwi r0, 1 +/* 80088F94 00085ED4 41 82 00 18 */ beq lbl_80088FAC +/* 80088F98 00085ED8 38 7F 00 00 */ addi r3, r31, 0 +/* 80088F9C 00085EDC 38 80 00 80 */ li r4, 0x80 +/* 80088FA0 00085EE0 38 A0 00 02 */ li r5, 2 +/* 80088FA4 00085EE4 4B FF FC 71 */ bl TRKStandardACK +/* 80088FA8 00085EE8 48 00 02 00 */ b lbl_800891A8 +lbl_80088FAC: +/* 80088FAC 00085EEC 38 7F 00 00 */ addi r3, r31, 0 +/* 80088FB0 00085EF0 38 80 00 80 */ li r4, 0x80 +/* 80088FB4 00085EF4 38 A0 00 00 */ li r5, 0 +/* 80088FB8 00085EF8 4B FF FB 75 */ bl TRKMessageIntoReply +/* 80088FBC 00085EFC 38 61 00 08 */ addi r3, r1, 8 +/* 80088FC0 00085F00 48 00 1D B1 */ bl TRKTargetCPUType +/* 80088FC4 00085F04 2C 03 00 00 */ cmpwi r3, 0 +/* 80088FC8 00085F08 40 82 00 3C */ bne lbl_80089004 +/* 80088FCC 00085F0C 80 7F 00 0C */ lwz r3, 0xc(r31) +/* 80088FD0 00085F10 88 A1 00 08 */ lbz r5, 8(r1) +/* 80088FD4 00085F14 28 03 08 80 */ cmplwi r3, 0x880 +/* 80088FD8 00085F18 41 80 00 0C */ blt lbl_80088FE4 +/* 80088FDC 00085F1C 38 60 03 01 */ li r3, 0x301 +/* 80088FE0 00085F20 48 00 00 24 */ b lbl_80089004 +lbl_80088FE4: +/* 80088FE4 00085F24 38 03 00 01 */ addi r0, r3, 1 +/* 80088FE8 00085F28 7C 9F 1A 14 */ add r4, r31, r3 +/* 80088FEC 00085F2C 90 1F 00 0C */ stw r0, 0xc(r31) +/* 80088FF0 00085F30 38 60 00 00 */ li r3, 0 +/* 80088FF4 00085F34 98 A4 00 10 */ stb r5, 0x10(r4) +/* 80088FF8 00085F38 80 9F 00 08 */ lwz r4, 8(r31) +/* 80088FFC 00085F3C 38 04 00 01 */ addi r0, r4, 1 +/* 80089000 00085F40 90 1F 00 08 */ stw r0, 8(r31) +lbl_80089004: +/* 80089004 00085F44 2C 03 00 00 */ cmpwi r3, 0 +/* 80089008 00085F48 40 82 00 3C */ bne lbl_80089044 +/* 8008900C 00085F4C 80 7F 00 0C */ lwz r3, 0xc(r31) +/* 80089010 00085F50 88 A1 00 09 */ lbz r5, 9(r1) +/* 80089014 00085F54 28 03 08 80 */ cmplwi r3, 0x880 +/* 80089018 00085F58 41 80 00 0C */ blt lbl_80089024 +/* 8008901C 00085F5C 38 60 03 01 */ li r3, 0x301 +/* 80089020 00085F60 48 00 00 24 */ b lbl_80089044 +lbl_80089024: +/* 80089024 00085F64 38 03 00 01 */ addi r0, r3, 1 +/* 80089028 00085F68 7C 9F 1A 14 */ add r4, r31, r3 +/* 8008902C 00085F6C 90 1F 00 0C */ stw r0, 0xc(r31) +/* 80089030 00085F70 38 60 00 00 */ li r3, 0 +/* 80089034 00085F74 98 A4 00 10 */ stb r5, 0x10(r4) +/* 80089038 00085F78 80 9F 00 08 */ lwz r4, 8(r31) +/* 8008903C 00085F7C 38 04 00 01 */ addi r0, r4, 1 +/* 80089040 00085F80 90 1F 00 08 */ stw r0, 8(r31) +lbl_80089044: +/* 80089044 00085F84 2C 03 00 00 */ cmpwi r3, 0 +/* 80089048 00085F88 40 82 00 3C */ bne lbl_80089084 +/* 8008904C 00085F8C 80 7F 00 0C */ lwz r3, 0xc(r31) +/* 80089050 00085F90 88 A1 00 0A */ lbz r5, 0xa(r1) +/* 80089054 00085F94 28 03 08 80 */ cmplwi r3, 0x880 +/* 80089058 00085F98 41 80 00 0C */ blt lbl_80089064 +/* 8008905C 00085F9C 38 60 03 01 */ li r3, 0x301 +/* 80089060 00085FA0 48 00 00 24 */ b lbl_80089084 +lbl_80089064: +/* 80089064 00085FA4 38 03 00 01 */ addi r0, r3, 1 +/* 80089068 00085FA8 7C 9F 1A 14 */ add r4, r31, r3 +/* 8008906C 00085FAC 90 1F 00 0C */ stw r0, 0xc(r31) +/* 80089070 00085FB0 38 60 00 00 */ li r3, 0 +/* 80089074 00085FB4 98 A4 00 10 */ stb r5, 0x10(r4) +/* 80089078 00085FB8 80 9F 00 08 */ lwz r4, 8(r31) +/* 8008907C 00085FBC 38 04 00 01 */ addi r0, r4, 1 +/* 80089080 00085FC0 90 1F 00 08 */ stw r0, 8(r31) +lbl_80089084: +/* 80089084 00085FC4 2C 03 00 00 */ cmpwi r3, 0 +/* 80089088 00085FC8 40 82 00 3C */ bne lbl_800890C4 +/* 8008908C 00085FCC 80 7F 00 0C */ lwz r3, 0xc(r31) +/* 80089090 00085FD0 88 A1 00 0B */ lbz r5, 0xb(r1) +/* 80089094 00085FD4 28 03 08 80 */ cmplwi r3, 0x880 +/* 80089098 00085FD8 41 80 00 0C */ blt lbl_800890A4 +/* 8008909C 00085FDC 38 60 03 01 */ li r3, 0x301 +/* 800890A0 00085FE0 48 00 00 24 */ b lbl_800890C4 +lbl_800890A4: +/* 800890A4 00085FE4 38 03 00 01 */ addi r0, r3, 1 +/* 800890A8 00085FE8 7C 9F 1A 14 */ add r4, r31, r3 +/* 800890AC 00085FEC 90 1F 00 0C */ stw r0, 0xc(r31) +/* 800890B0 00085FF0 38 60 00 00 */ li r3, 0 +/* 800890B4 00085FF4 98 A4 00 10 */ stb r5, 0x10(r4) +/* 800890B8 00085FF8 80 9F 00 08 */ lwz r4, 8(r31) +/* 800890BC 00085FFC 38 04 00 01 */ addi r0, r4, 1 +/* 800890C0 00086000 90 1F 00 08 */ stw r0, 8(r31) +lbl_800890C4: +/* 800890C4 00086004 2C 03 00 00 */ cmpwi r3, 0 +/* 800890C8 00086008 40 82 00 3C */ bne lbl_80089104 +/* 800890CC 0008600C 80 7F 00 0C */ lwz r3, 0xc(r31) +/* 800890D0 00086010 88 A1 00 0C */ lbz r5, 0xc(r1) +/* 800890D4 00086014 28 03 08 80 */ cmplwi r3, 0x880 +/* 800890D8 00086018 41 80 00 0C */ blt lbl_800890E4 +/* 800890DC 0008601C 38 60 03 01 */ li r3, 0x301 +/* 800890E0 00086020 48 00 00 24 */ b lbl_80089104 +lbl_800890E4: +/* 800890E4 00086024 38 03 00 01 */ addi r0, r3, 1 +/* 800890E8 00086028 7C 9F 1A 14 */ add r4, r31, r3 +/* 800890EC 0008602C 90 1F 00 0C */ stw r0, 0xc(r31) +/* 800890F0 00086030 38 60 00 00 */ li r3, 0 +/* 800890F4 00086034 98 A4 00 10 */ stb r5, 0x10(r4) +/* 800890F8 00086038 80 9F 00 08 */ lwz r4, 8(r31) +/* 800890FC 0008603C 38 04 00 01 */ addi r0, r4, 1 +/* 80089100 00086040 90 1F 00 08 */ stw r0, 8(r31) +lbl_80089104: +/* 80089104 00086044 2C 03 00 00 */ cmpwi r3, 0 +/* 80089108 00086048 40 82 00 3C */ bne lbl_80089144 +/* 8008910C 0008604C 80 7F 00 0C */ lwz r3, 0xc(r31) +/* 80089110 00086050 88 A1 00 0D */ lbz r5, 0xd(r1) +/* 80089114 00086054 28 03 08 80 */ cmplwi r3, 0x880 +/* 80089118 00086058 41 80 00 0C */ blt lbl_80089124 +/* 8008911C 0008605C 38 60 03 01 */ li r3, 0x301 +/* 80089120 00086060 48 00 00 24 */ b lbl_80089144 +lbl_80089124: +/* 80089124 00086064 38 03 00 01 */ addi r0, r3, 1 +/* 80089128 00086068 7C 9F 1A 14 */ add r4, r31, r3 +/* 8008912C 0008606C 90 1F 00 0C */ stw r0, 0xc(r31) +/* 80089130 00086070 38 60 00 00 */ li r3, 0 +/* 80089134 00086074 98 A4 00 10 */ stb r5, 0x10(r4) +/* 80089138 00086078 80 9F 00 08 */ lwz r4, 8(r31) +/* 8008913C 0008607C 38 04 00 01 */ addi r0, r4, 1 +/* 80089140 00086080 90 1F 00 08 */ stw r0, 8(r31) +lbl_80089144: +/* 80089144 00086084 2C 03 00 00 */ cmpwi r3, 0 +/* 80089148 00086088 40 82 00 3C */ bne lbl_80089184 +/* 8008914C 0008608C 80 7F 00 0C */ lwz r3, 0xc(r31) +/* 80089150 00086090 88 A1 00 0E */ lbz r5, 0xe(r1) +/* 80089154 00086094 28 03 08 80 */ cmplwi r3, 0x880 +/* 80089158 00086098 41 80 00 0C */ blt lbl_80089164 +/* 8008915C 0008609C 38 60 03 01 */ li r3, 0x301 +/* 80089160 000860A0 48 00 00 24 */ b lbl_80089184 +lbl_80089164: +/* 80089164 000860A4 38 03 00 01 */ addi r0, r3, 1 +/* 80089168 000860A8 7C 9F 1A 14 */ add r4, r31, r3 +/* 8008916C 000860AC 90 1F 00 0C */ stw r0, 0xc(r31) +/* 80089170 000860B0 38 60 00 00 */ li r3, 0 +/* 80089174 000860B4 98 A4 00 10 */ stb r5, 0x10(r4) +/* 80089178 000860B8 80 9F 00 08 */ lwz r4, 8(r31) +/* 8008917C 000860BC 38 04 00 01 */ addi r0, r4, 1 +/* 80089180 000860C0 90 1F 00 08 */ stw r0, 8(r31) +lbl_80089184: +/* 80089184 000860C4 2C 03 00 00 */ cmpwi r3, 0 +/* 80089188 000860C8 41 82 00 18 */ beq lbl_800891A0 +/* 8008918C 000860CC 38 7F 00 00 */ addi r3, r31, 0 +/* 80089190 000860D0 38 80 00 80 */ li r4, 0x80 +/* 80089194 000860D4 38 A0 00 03 */ li r5, 3 +/* 80089198 000860D8 4B FF FA 7D */ bl TRKStandardACK +/* 8008919C 000860DC 48 00 00 0C */ b lbl_800891A8 +lbl_800891A0: +/* 800891A0 000860E0 7F E3 FB 78 */ mr r3, r31 +/* 800891A4 000860E4 4B FF FA 21 */ bl TRKSendACK +lbl_800891A8: +/* 800891A8 000860E8 83 E1 00 14 */ lwz r31, 0x14(r1) +/* 800891AC 000860EC 38 21 00 18 */ addi r1, r1, 0x18 +/* 800891B0 000860F0 80 01 00 04 */ lwz r0, 4(r1) +/* 800891B4 000860F4 7C 08 03 A6 */ mtlr r0 +/* 800891B8 000860F8 4E 80 00 20 */ blr + +.global TRKDoReadMemory +TRKDoReadMemory: +/* 800891BC 000860FC 7C 08 02 A6 */ mflr r0 +/* 800891C0 00086100 90 01 00 04 */ stw r0, 4(r1) +/* 800891C4 00086104 94 21 F7 E0 */ stwu r1, -0x820(r1) +/* 800891C8 00086108 93 E1 08 1C */ stw r31, 0x81c(r1) +/* 800891CC 0008610C 7C 7F 1B 78 */ mr r31, r3 +/* 800891D0 00086110 93 C1 08 18 */ stw r30, 0x818(r1) +/* 800891D4 00086114 80 03 00 08 */ lwz r0, 8(r3) +/* 800891D8 00086118 28 00 00 08 */ cmplwi r0, 8 +/* 800891DC 0008611C 41 82 00 18 */ beq lbl_800891F4 +/* 800891E0 00086120 38 7F 00 00 */ addi r3, r31, 0 +/* 800891E4 00086124 38 80 00 80 */ li r4, 0x80 +/* 800891E8 00086128 38 A0 00 02 */ li r5, 2 +/* 800891EC 0008612C 4B FF FA 29 */ bl TRKStandardACK +/* 800891F0 00086130 48 00 01 9C */ b lbl_8008938C +lbl_800891F4: +/* 800891F4 00086134 38 7F 00 00 */ addi r3, r31, 0 +/* 800891F8 00086138 38 80 00 00 */ li r4, 0 +/* 800891FC 0008613C 4B FF F0 75 */ bl TRKSetBufferPosition +/* 80089200 00086140 38 7F 00 00 */ addi r3, r31, 0 +/* 80089204 00086144 38 81 00 08 */ addi r4, r1, 8 +/* 80089208 00086148 4B FF F3 ED */ bl TRKReadBuffer1_ui8 +/* 8008920C 0008614C 7C 7E 1B 79 */ or. r30, r3, r3 +/* 80089210 00086150 40 82 00 14 */ bne lbl_80089224 +/* 80089214 00086154 38 7F 00 00 */ addi r3, r31, 0 +/* 80089218 00086158 38 81 00 09 */ addi r4, r1, 9 +/* 8008921C 0008615C 4B FF F3 D9 */ bl TRKReadBuffer1_ui8 +/* 80089220 00086160 7C 7E 1B 78 */ mr r30, r3 +lbl_80089224: +/* 80089224 00086164 2C 1E 00 00 */ cmpwi r30, 0 +/* 80089228 00086168 40 82 00 14 */ bne lbl_8008923C +/* 8008922C 0008616C 38 7F 00 00 */ addi r3, r31, 0 +/* 80089230 00086170 38 81 00 0A */ addi r4, r1, 0xa +/* 80089234 00086174 4B FF F3 E5 */ bl TRKReadBuffer1_ui16 +/* 80089238 00086178 7C 7E 1B 78 */ mr r30, r3 +lbl_8008923C: +/* 8008923C 0008617C 2C 1E 00 00 */ cmpwi r30, 0 +/* 80089240 00086180 40 82 00 14 */ bne lbl_80089254 +/* 80089244 00086184 38 7F 00 00 */ addi r3, r31, 0 +/* 80089248 00086188 38 81 00 0C */ addi r4, r1, 0xc +/* 8008924C 0008618C 4B FF F4 4D */ bl TRKReadBuffer1_ui32 +/* 80089250 00086190 7C 7E 1B 78 */ mr r30, r3 +lbl_80089254: +/* 80089254 00086194 88 01 00 09 */ lbz r0, 9(r1) +/* 80089258 00086198 54 00 07 BD */ rlwinm. r0, r0, 0, 0x1e, 0x1e +/* 8008925C 0008619C 41 82 00 18 */ beq lbl_80089274 +/* 80089260 000861A0 38 7F 00 00 */ addi r3, r31, 0 +/* 80089264 000861A4 38 80 00 80 */ li r4, 0x80 +/* 80089268 000861A8 38 A0 00 12 */ li r5, 0x12 +/* 8008926C 000861AC 4B FF F9 A9 */ bl TRKStandardACK +/* 80089270 000861B0 48 00 01 1C */ b lbl_8008938C +lbl_80089274: +/* 80089274 000861B4 A0 01 00 0A */ lhz r0, 0xa(r1) +/* 80089278 000861B8 28 00 08 00 */ cmplwi r0, 0x800 +/* 8008927C 000861BC 40 81 00 18 */ ble lbl_80089294 +/* 80089280 000861C0 38 7F 00 00 */ addi r3, r31, 0 +/* 80089284 000861C4 38 80 00 80 */ li r4, 0x80 +/* 80089288 000861C8 38 A0 00 11 */ li r5, 0x11 +/* 8008928C 000861CC 4B FF F9 89 */ bl TRKStandardACK +/* 80089290 000861D0 48 00 00 FC */ b lbl_8008938C +lbl_80089294: +/* 80089294 000861D4 38 7F 00 00 */ addi r3, r31, 0 +/* 80089298 000861D8 38 80 00 80 */ li r4, 0x80 +/* 8008929C 000861DC 38 A0 00 00 */ li r5, 0 +/* 800892A0 000861E0 4B FF F8 8D */ bl TRKMessageIntoReply +/* 800892A4 000861E4 2C 1E 00 00 */ cmpwi r30, 0 +/* 800892A8 000861E8 40 82 00 74 */ bne lbl_8008931C +/* 800892AC 000861EC 88 01 00 09 */ lbz r0, 9(r1) +/* 800892B0 000861F0 A0 61 00 0A */ lhz r3, 0xa(r1) +/* 800892B4 000861F4 54 00 07 39 */ rlwinm. r0, r0, 0, 0x1c, 0x1c +/* 800892B8 000861F8 90 61 00 10 */ stw r3, 0x10(r1) +/* 800892BC 000861FC 41 82 00 0C */ beq lbl_800892C8 +/* 800892C0 00086200 38 C0 00 00 */ li r6, 0 +/* 800892C4 00086204 48 00 00 08 */ b lbl_800892CC +lbl_800892C8: +/* 800892C8 00086208 38 C0 00 01 */ li r6, 1 +lbl_800892CC: +/* 800892CC 0008620C 80 81 00 0C */ lwz r4, 0xc(r1) +/* 800892D0 00086210 38 61 00 14 */ addi r3, r1, 0x14 +/* 800892D4 00086214 38 A1 00 10 */ addi r5, r1, 0x10 +/* 800892D8 00086218 38 E0 00 01 */ li r7, 1 +/* 800892DC 0008621C 48 00 12 E1 */ bl TRKTargetAccessMemory +/* 800892E0 00086220 80 01 00 10 */ lwz r0, 0x10(r1) +/* 800892E4 00086224 7C 7E 1B 79 */ or. r30, r3, r3 +/* 800892E8 00086228 B0 01 00 0A */ sth r0, 0xa(r1) +/* 800892EC 0008622C 40 82 00 14 */ bne lbl_80089300 +/* 800892F0 00086230 7F E3 FB 78 */ mr r3, r31 +/* 800892F4 00086234 A0 81 00 0A */ lhz r4, 0xa(r1) +/* 800892F8 00086238 4B FF F0 D9 */ bl TRKAppendBuffer1_ui16 +/* 800892FC 0008623C 7C 7E 1B 78 */ mr r30, r3 +lbl_80089300: +/* 80089300 00086240 2C 1E 00 00 */ cmpwi r30, 0 +/* 80089304 00086244 40 82 00 18 */ bne lbl_8008931C +/* 80089308 00086248 80 A1 00 10 */ lwz r5, 0x10(r1) +/* 8008930C 0008624C 38 7F 00 00 */ addi r3, r31, 0 +/* 80089310 00086250 38 81 00 14 */ addi r4, r1, 0x14 +/* 80089314 00086254 4B FF EF 8D */ bl TRKAppendBuffer +/* 80089318 00086258 7C 7E 1B 78 */ mr r30, r3 +lbl_8008931C: +/* 8008931C 0008625C 2C 1E 00 00 */ cmpwi r30, 0 +/* 80089320 00086260 41 82 00 64 */ beq lbl_80089384 +/* 80089324 00086264 38 1E F9 00 */ addi r0, r30, -1792 +/* 80089328 00086268 28 00 00 06 */ cmplwi r0, 6 +/* 8008932C 0008626C 41 81 00 44 */ bgt lbl_80089370 +/* 80089330 00086270 3C 60 80 3B */ lis r3, "@175"@ha +/* 80089334 00086274 38 63 EF E0 */ addi r3, r3, "@175"@l +/* 80089338 00086278 54 00 10 3A */ slwi r0, r0, 2 +/* 8008933C 0008627C 7C 03 00 2E */ lwzx r0, r3, r0 +/* 80089340 00086280 7C 09 03 A6 */ mtctr r0 +/* 80089344 00086284 4E 80 04 20 */ bctr +lbl_80089348: +/* 80089348 00086288 38 A0 00 15 */ li r5, 0x15 +/* 8008934C 0008628C 48 00 00 28 */ b lbl_80089374 +lbl_80089350: +/* 80089350 00086290 38 A0 00 13 */ li r5, 0x13 +/* 80089354 00086294 48 00 00 20 */ b lbl_80089374 +lbl_80089358: +/* 80089358 00086298 38 A0 00 21 */ li r5, 0x21 +/* 8008935C 0008629C 48 00 00 18 */ b lbl_80089374 +lbl_80089360: +/* 80089360 000862A0 38 A0 00 22 */ li r5, 0x22 +/* 80089364 000862A4 48 00 00 10 */ b lbl_80089374 +lbl_80089368: +/* 80089368 000862A8 38 A0 00 20 */ li r5, 0x20 +/* 8008936C 000862AC 48 00 00 08 */ b lbl_80089374 +lbl_80089370: +/* 80089370 000862B0 38 A0 00 03 */ li r5, 3 +lbl_80089374: +/* 80089374 000862B4 38 7F 00 00 */ addi r3, r31, 0 +/* 80089378 000862B8 38 80 00 80 */ li r4, 0x80 +/* 8008937C 000862BC 4B FF F8 99 */ bl TRKStandardACK +/* 80089380 000862C0 48 00 00 0C */ b lbl_8008938C +lbl_80089384: +/* 80089384 000862C4 7F E3 FB 78 */ mr r3, r31 +/* 80089388 000862C8 4B FF F8 3D */ bl TRKSendACK +lbl_8008938C: +/* 8008938C 000862CC 83 E1 08 1C */ lwz r31, 0x81c(r1) +/* 80089390 000862D0 83 C1 08 18 */ lwz r30, 0x818(r1) +/* 80089394 000862D4 38 21 08 20 */ addi r1, r1, 0x820 +/* 80089398 000862D8 80 01 00 04 */ lwz r0, 4(r1) +/* 8008939C 000862DC 7C 08 03 A6 */ mtlr r0 +/* 800893A0 000862E0 4E 80 00 20 */ blr + +.global TRKDoWriteMemory +TRKDoWriteMemory: +/* 800893A4 000862E4 7C 08 02 A6 */ mflr r0 +/* 800893A8 000862E8 90 01 00 04 */ stw r0, 4(r1) +/* 800893AC 000862EC 94 21 F7 E0 */ stwu r1, -0x820(r1) +/* 800893B0 000862F0 93 E1 08 1C */ stw r31, 0x81c(r1) +/* 800893B4 000862F4 7C 7F 1B 78 */ mr r31, r3 +/* 800893B8 000862F8 93 C1 08 18 */ stw r30, 0x818(r1) +/* 800893BC 000862FC 80 03 00 08 */ lwz r0, 8(r3) +/* 800893C0 00086300 28 00 00 08 */ cmplwi r0, 8 +/* 800893C4 00086304 41 81 00 18 */ bgt lbl_800893DC +/* 800893C8 00086308 38 7F 00 00 */ addi r3, r31, 0 +/* 800893CC 0008630C 38 80 00 80 */ li r4, 0x80 +/* 800893D0 00086310 38 A0 00 02 */ li r5, 2 +/* 800893D4 00086314 4B FF F8 41 */ bl TRKStandardACK +/* 800893D8 00086318 48 00 01 B0 */ b lbl_80089588 +lbl_800893DC: +/* 800893DC 0008631C 38 7F 00 00 */ addi r3, r31, 0 +/* 800893E0 00086320 38 80 00 00 */ li r4, 0 +/* 800893E4 00086324 4B FF EE 8D */ bl TRKSetBufferPosition +/* 800893E8 00086328 38 7F 00 00 */ addi r3, r31, 0 +/* 800893EC 0008632C 38 81 00 08 */ addi r4, r1, 8 +/* 800893F0 00086330 4B FF F2 05 */ bl TRKReadBuffer1_ui8 +/* 800893F4 00086334 7C 7E 1B 79 */ or. r30, r3, r3 +/* 800893F8 00086338 40 82 00 14 */ bne lbl_8008940C +/* 800893FC 0008633C 38 7F 00 00 */ addi r3, r31, 0 +/* 80089400 00086340 38 81 00 09 */ addi r4, r1, 9 +/* 80089404 00086344 4B FF F1 F1 */ bl TRKReadBuffer1_ui8 +/* 80089408 00086348 7C 7E 1B 78 */ mr r30, r3 +lbl_8008940C: +/* 8008940C 0008634C 2C 1E 00 00 */ cmpwi r30, 0 +/* 80089410 00086350 40 82 00 14 */ bne lbl_80089424 +/* 80089414 00086354 38 7F 00 00 */ addi r3, r31, 0 +/* 80089418 00086358 38 81 00 0A */ addi r4, r1, 0xa +/* 8008941C 0008635C 4B FF F1 FD */ bl TRKReadBuffer1_ui16 +/* 80089420 00086360 7C 7E 1B 78 */ mr r30, r3 +lbl_80089424: +/* 80089424 00086364 2C 1E 00 00 */ cmpwi r30, 0 +/* 80089428 00086368 40 82 00 14 */ bne lbl_8008943C +/* 8008942C 0008636C 38 7F 00 00 */ addi r3, r31, 0 +/* 80089430 00086370 38 81 00 0C */ addi r4, r1, 0xc +/* 80089434 00086374 4B FF F2 65 */ bl TRKReadBuffer1_ui32 +/* 80089438 00086378 7C 7E 1B 78 */ mr r30, r3 +lbl_8008943C: +/* 8008943C 0008637C 88 01 00 09 */ lbz r0, 9(r1) +/* 80089440 00086380 54 00 07 BD */ rlwinm. r0, r0, 0, 0x1e, 0x1e +/* 80089444 00086384 41 82 00 18 */ beq lbl_8008945C +/* 80089448 00086388 38 7F 00 00 */ addi r3, r31, 0 +/* 8008944C 0008638C 38 80 00 80 */ li r4, 0x80 +/* 80089450 00086390 38 A0 00 12 */ li r5, 0x12 +/* 80089454 00086394 4B FF F7 C1 */ bl TRKStandardACK +/* 80089458 00086398 48 00 01 30 */ b lbl_80089588 +lbl_8008945C: +/* 8008945C 0008639C A0 81 00 0A */ lhz r4, 0xa(r1) +/* 80089460 000863A0 80 7F 00 08 */ lwz r3, 8(r31) +/* 80089464 000863A4 38 04 00 08 */ addi r0, r4, 8 +/* 80089468 000863A8 7C 03 00 40 */ cmplw r3, r0 +/* 8008946C 000863AC 40 82 00 0C */ bne lbl_80089478 +/* 80089470 000863B0 28 04 08 00 */ cmplwi r4, 0x800 +/* 80089474 000863B4 40 81 00 18 */ ble lbl_8008948C +lbl_80089478: +/* 80089478 000863B8 38 7F 00 00 */ addi r3, r31, 0 +/* 8008947C 000863BC 38 80 00 80 */ li r4, 0x80 +/* 80089480 000863C0 38 A0 00 11 */ li r5, 0x11 +/* 80089484 000863C4 4B FF F7 91 */ bl TRKStandardACK +/* 80089488 000863C8 48 00 01 00 */ b lbl_80089588 +lbl_8008948C: +/* 8008948C 000863CC 2C 1E 00 00 */ cmpwi r30, 0 +/* 80089490 000863D0 40 82 00 58 */ bne lbl_800894E8 +/* 80089494 000863D4 90 81 00 10 */ stw r4, 0x10(r1) +/* 80089498 000863D8 38 7F 00 00 */ addi r3, r31, 0 +/* 8008949C 000863DC 38 81 00 14 */ addi r4, r1, 0x14 +/* 800894A0 000863E0 80 A1 00 10 */ lwz r5, 0x10(r1) +/* 800894A4 000863E4 4B FF EE A1 */ bl TRKReadBuffer +/* 800894A8 000863E8 7C 7E 1B 79 */ or. r30, r3, r3 +/* 800894AC 000863EC 40 82 00 34 */ bne lbl_800894E0 +/* 800894B0 000863F0 88 01 00 09 */ lbz r0, 9(r1) +/* 800894B4 000863F4 54 00 07 39 */ rlwinm. r0, r0, 0, 0x1c, 0x1c +/* 800894B8 000863F8 41 82 00 0C */ beq lbl_800894C4 +/* 800894BC 000863FC 38 C0 00 00 */ li r6, 0 +/* 800894C0 00086400 48 00 00 08 */ b lbl_800894C8 +lbl_800894C4: +/* 800894C4 00086404 38 C0 00 01 */ li r6, 1 +lbl_800894C8: +/* 800894C8 00086408 80 81 00 0C */ lwz r4, 0xc(r1) +/* 800894CC 0008640C 38 61 00 14 */ addi r3, r1, 0x14 +/* 800894D0 00086410 38 A1 00 10 */ addi r5, r1, 0x10 +/* 800894D4 00086414 38 E0 00 00 */ li r7, 0 +/* 800894D8 00086418 48 00 10 E5 */ bl TRKTargetAccessMemory +/* 800894DC 0008641C 7C 7E 1B 78 */ mr r30, r3 +lbl_800894E0: +/* 800894E0 00086420 80 01 00 10 */ lwz r0, 0x10(r1) +/* 800894E4 00086424 B0 01 00 0A */ sth r0, 0xa(r1) +lbl_800894E8: +/* 800894E8 00086428 2C 1E 00 00 */ cmpwi r30, 0 +/* 800894EC 0008642C 40 82 00 14 */ bne lbl_80089500 +/* 800894F0 00086430 38 7F 00 00 */ addi r3, r31, 0 +/* 800894F4 00086434 38 80 00 80 */ li r4, 0x80 +/* 800894F8 00086438 38 A0 00 00 */ li r5, 0 +/* 800894FC 0008643C 4B FF F6 31 */ bl TRKMessageIntoReply +lbl_80089500: +/* 80089500 00086440 2C 1E 00 00 */ cmpwi r30, 0 +/* 80089504 00086444 40 82 00 14 */ bne lbl_80089518 +/* 80089508 00086448 7F E3 FB 78 */ mr r3, r31 +/* 8008950C 0008644C A0 81 00 0A */ lhz r4, 0xa(r1) +/* 80089510 00086450 4B FF EE C1 */ bl TRKAppendBuffer1_ui16 +/* 80089514 00086454 7C 7E 1B 78 */ mr r30, r3 +lbl_80089518: +/* 80089518 00086458 2C 1E 00 00 */ cmpwi r30, 0 +/* 8008951C 0008645C 41 82 00 64 */ beq lbl_80089580 +/* 80089520 00086460 38 1E F9 00 */ addi r0, r30, -1792 +/* 80089524 00086464 28 00 00 06 */ cmplwi r0, 6 +/* 80089528 00086468 41 81 00 44 */ bgt lbl_8008956C +/* 8008952C 0008646C 3C 60 80 3B */ lis r3, "@214"@ha +/* 80089530 00086470 38 63 EF FC */ addi r3, r3, "@214"@l +/* 80089534 00086474 54 00 10 3A */ slwi r0, r0, 2 +/* 80089538 00086478 7C 03 00 2E */ lwzx r0, r3, r0 +/* 8008953C 0008647C 7C 09 03 A6 */ mtctr r0 +/* 80089540 00086480 4E 80 04 20 */ bctr +lbl_80089544: +/* 80089544 00086484 38 A0 00 15 */ li r5, 0x15 +/* 80089548 00086488 48 00 00 28 */ b lbl_80089570 +lbl_8008954C: +/* 8008954C 0008648C 38 A0 00 13 */ li r5, 0x13 +/* 80089550 00086490 48 00 00 20 */ b lbl_80089570 +lbl_80089554: +/* 80089554 00086494 38 A0 00 21 */ li r5, 0x21 +/* 80089558 00086498 48 00 00 18 */ b lbl_80089570 +lbl_8008955C: +/* 8008955C 0008649C 38 A0 00 22 */ li r5, 0x22 +/* 80089560 000864A0 48 00 00 10 */ b lbl_80089570 +lbl_80089564: +/* 80089564 000864A4 38 A0 00 20 */ li r5, 0x20 +/* 80089568 000864A8 48 00 00 08 */ b lbl_80089570 +lbl_8008956C: +/* 8008956C 000864AC 38 A0 00 03 */ li r5, 3 +lbl_80089570: +/* 80089570 000864B0 38 7F 00 00 */ addi r3, r31, 0 +/* 80089574 000864B4 38 80 00 80 */ li r4, 0x80 +/* 80089578 000864B8 4B FF F6 9D */ bl TRKStandardACK +/* 8008957C 000864BC 48 00 00 0C */ b lbl_80089588 +lbl_80089580: +/* 80089580 000864C0 7F E3 FB 78 */ mr r3, r31 +/* 80089584 000864C4 4B FF F6 41 */ bl TRKSendACK +lbl_80089588: +/* 80089588 000864C8 83 E1 08 1C */ lwz r31, 0x81c(r1) +/* 8008958C 000864CC 83 C1 08 18 */ lwz r30, 0x818(r1) +/* 80089590 000864D0 38 21 08 20 */ addi r1, r1, 0x820 +/* 80089594 000864D4 80 01 00 04 */ lwz r0, 4(r1) +/* 80089598 000864D8 7C 08 03 A6 */ mtlr r0 +/* 8008959C 000864DC 4E 80 00 20 */ blr + +.global TRKDoReadRegisters +TRKDoReadRegisters: +/* 800895A0 000864E0 7C 08 02 A6 */ mflr r0 +/* 800895A4 000864E4 90 01 00 04 */ stw r0, 4(r1) +/* 800895A8 000864E8 94 21 FF E8 */ stwu r1, -0x18(r1) +/* 800895AC 000864EC 93 E1 00 14 */ stw r31, 0x14(r1) +/* 800895B0 000864F0 7C 7F 1B 78 */ mr r31, r3 +/* 800895B4 000864F4 80 03 00 08 */ lwz r0, 8(r3) +/* 800895B8 000864F8 28 00 00 06 */ cmplwi r0, 6 +/* 800895BC 000864FC 41 82 00 18 */ beq lbl_800895D4 +/* 800895C0 00086500 38 7F 00 00 */ addi r3, r31, 0 +/* 800895C4 00086504 38 80 00 80 */ li r4, 0x80 +/* 800895C8 00086508 38 A0 00 02 */ li r5, 2 +/* 800895CC 0008650C 4B FF F6 49 */ bl TRKStandardACK +/* 800895D0 00086510 48 00 01 C0 */ b lbl_80089790 +lbl_800895D4: +/* 800895D4 00086514 38 7F 00 00 */ addi r3, r31, 0 +/* 800895D8 00086518 38 80 00 00 */ li r4, 0 +/* 800895DC 0008651C 4B FF EC 95 */ bl TRKSetBufferPosition +/* 800895E0 00086520 38 7F 00 00 */ addi r3, r31, 0 +/* 800895E4 00086524 38 81 00 08 */ addi r4, r1, 8 +/* 800895E8 00086528 4B FF F0 0D */ bl TRKReadBuffer1_ui8 +/* 800895EC 0008652C 2C 03 00 00 */ cmpwi r3, 0 +/* 800895F0 00086530 40 82 00 10 */ bne lbl_80089600 +/* 800895F4 00086534 38 7F 00 00 */ addi r3, r31, 0 +/* 800895F8 00086538 38 81 00 09 */ addi r4, r1, 9 +/* 800895FC 0008653C 4B FF EF F9 */ bl TRKReadBuffer1_ui8 +lbl_80089600: +/* 80089600 00086540 2C 03 00 00 */ cmpwi r3, 0 +/* 80089604 00086544 40 82 00 10 */ bne lbl_80089614 +/* 80089608 00086548 38 7F 00 00 */ addi r3, r31, 0 +/* 8008960C 0008654C 38 81 00 0A */ addi r4, r1, 0xa +/* 80089610 00086550 4B FF F0 09 */ bl TRKReadBuffer1_ui16 +lbl_80089614: +/* 80089614 00086554 2C 03 00 00 */ cmpwi r3, 0 +/* 80089618 00086558 40 82 00 10 */ bne lbl_80089628 +/* 8008961C 0008655C 38 7F 00 00 */ addi r3, r31, 0 +/* 80089620 00086560 38 81 00 0C */ addi r4, r1, 0xc +/* 80089624 00086564 4B FF EF F5 */ bl TRKReadBuffer1_ui16 +lbl_80089628: +/* 80089628 00086568 A0 81 00 0A */ lhz r4, 0xa(r1) +/* 8008962C 0008656C A0 01 00 0C */ lhz r0, 0xc(r1) +/* 80089630 00086570 7C 04 00 40 */ cmplw r4, r0 +/* 80089634 00086574 40 81 00 18 */ ble lbl_8008964C +/* 80089638 00086578 38 7F 00 00 */ addi r3, r31, 0 +/* 8008963C 0008657C 38 80 00 80 */ li r4, 0x80 +/* 80089640 00086580 38 A0 00 14 */ li r5, 0x14 +/* 80089644 00086584 4B FF F5 D1 */ bl TRKStandardACK +/* 80089648 00086588 48 00 01 48 */ b lbl_80089790 +lbl_8008964C: +/* 8008964C 0008658C 2C 03 00 00 */ cmpwi r3, 0 +/* 80089650 00086590 40 82 00 14 */ bne lbl_80089664 +/* 80089654 00086594 38 7F 00 00 */ addi r3, r31, 0 +/* 80089658 00086598 38 80 00 80 */ li r4, 0x80 +/* 8008965C 0008659C 38 A0 00 00 */ li r5, 0 +/* 80089660 000865A0 4B FF F4 CD */ bl TRKMessageIntoReply +lbl_80089664: +/* 80089664 000865A4 88 01 00 09 */ lbz r0, 9(r1) +/* 80089668 000865A8 54 00 07 7E */ clrlwi r0, r0, 0x1d +/* 8008966C 000865AC 2C 00 00 02 */ cmpwi r0, 2 +/* 80089670 000865B0 41 82 00 5C */ beq lbl_800896CC +/* 80089674 000865B4 40 80 00 14 */ bge lbl_80089688 +/* 80089678 000865B8 2C 00 00 00 */ cmpwi r0, 0 +/* 8008967C 000865BC 41 82 00 18 */ beq lbl_80089694 +/* 80089680 000865C0 40 80 00 30 */ bge lbl_800896B0 +/* 80089684 000865C4 48 00 00 80 */ b lbl_80089704 +lbl_80089688: +/* 80089688 000865C8 2C 00 00 04 */ cmpwi r0, 4 +/* 8008968C 000865CC 40 80 00 78 */ bge lbl_80089704 +/* 80089690 000865D0 48 00 00 58 */ b lbl_800896E8 +lbl_80089694: +/* 80089694 000865D4 A0 61 00 0A */ lhz r3, 0xa(r1) +/* 80089698 000865D8 7F E5 FB 78 */ mr r5, r31 +/* 8008969C 000865DC A0 81 00 0C */ lhz r4, 0xc(r1) +/* 800896A0 000865E0 38 C1 00 10 */ addi r6, r1, 0x10 +/* 800896A4 000865E4 38 E0 00 01 */ li r7, 1 +/* 800896A8 000865E8 48 00 10 C5 */ bl TRKTargetAccessDefault +/* 800896AC 000865EC 48 00 00 5C */ b lbl_80089708 +lbl_800896B0: +/* 800896B0 000865F0 A0 61 00 0A */ lhz r3, 0xa(r1) +/* 800896B4 000865F4 7F E5 FB 78 */ mr r5, r31 +/* 800896B8 000865F8 A0 81 00 0C */ lhz r4, 0xc(r1) +/* 800896BC 000865FC 38 C1 00 10 */ addi r6, r1, 0x10 +/* 800896C0 00086600 38 E0 00 01 */ li r7, 1 +/* 800896C4 00086604 48 00 11 A5 */ bl TRKTargetAccessFP +/* 800896C8 00086608 48 00 00 40 */ b lbl_80089708 +lbl_800896CC: +/* 800896CC 0008660C A0 61 00 0A */ lhz r3, 0xa(r1) +/* 800896D0 00086610 7F E5 FB 78 */ mr r5, r31 +/* 800896D4 00086614 A0 81 00 0C */ lhz r4, 0xc(r1) +/* 800896D8 00086618 38 C1 00 10 */ addi r6, r1, 0x10 +/* 800896DC 0008661C 38 E0 00 01 */ li r7, 1 +/* 800896E0 00086620 48 00 12 D1 */ bl TRKTargetAccessExtended1 +/* 800896E4 00086624 48 00 00 24 */ b lbl_80089708 +lbl_800896E8: +/* 800896E8 00086628 A0 61 00 0A */ lhz r3, 0xa(r1) +/* 800896EC 0008662C 7F E5 FB 78 */ mr r5, r31 +/* 800896F0 00086630 A0 81 00 0C */ lhz r4, 0xc(r1) +/* 800896F4 00086634 38 C1 00 10 */ addi r6, r1, 0x10 +/* 800896F8 00086638 38 E0 00 01 */ li r7, 1 +/* 800896FC 0008663C 48 00 14 2D */ bl TRKTargetAccessExtended2 +/* 80089700 00086640 48 00 00 08 */ b lbl_80089708 +lbl_80089704: +/* 80089704 00086644 38 60 07 03 */ li r3, 0x703 +lbl_80089708: +/* 80089708 00086648 2C 03 00 00 */ cmpwi r3, 0 +/* 8008970C 0008664C 41 82 00 7C */ beq lbl_80089788 +/* 80089710 00086650 2C 03 07 04 */ cmpwi r3, 0x704 +/* 80089714 00086654 41 82 00 48 */ beq lbl_8008975C +/* 80089718 00086658 40 80 00 1C */ bge lbl_80089734 +/* 8008971C 0008665C 2C 03 07 02 */ cmpwi r3, 0x702 +/* 80089720 00086660 41 82 00 34 */ beq lbl_80089754 +/* 80089724 00086664 40 80 00 20 */ bge lbl_80089744 +/* 80089728 00086668 2C 03 07 01 */ cmpwi r3, 0x701 +/* 8008972C 0008666C 40 80 00 20 */ bge lbl_8008974C +/* 80089730 00086670 48 00 00 44 */ b lbl_80089774 +lbl_80089734: +/* 80089734 00086674 2C 03 07 06 */ cmpwi r3, 0x706 +/* 80089738 00086678 41 82 00 34 */ beq lbl_8008976C +/* 8008973C 0008667C 40 80 00 38 */ bge lbl_80089774 +/* 80089740 00086680 48 00 00 24 */ b lbl_80089764 +lbl_80089744: +/* 80089744 00086684 38 A0 00 12 */ li r5, 0x12 +/* 80089748 00086688 48 00 00 30 */ b lbl_80089778 +lbl_8008974C: +/* 8008974C 0008668C 38 A0 00 14 */ li r5, 0x14 +/* 80089750 00086690 48 00 00 28 */ b lbl_80089778 +lbl_80089754: +/* 80089754 00086694 38 A0 00 15 */ li r5, 0x15 +/* 80089758 00086698 48 00 00 20 */ b lbl_80089778 +lbl_8008975C: +/* 8008975C 0008669C 38 A0 00 21 */ li r5, 0x21 +/* 80089760 000866A0 48 00 00 18 */ b lbl_80089778 +lbl_80089764: +/* 80089764 000866A4 38 A0 00 22 */ li r5, 0x22 +/* 80089768 000866A8 48 00 00 10 */ b lbl_80089778 +lbl_8008976C: +/* 8008976C 000866AC 38 A0 00 20 */ li r5, 0x20 +/* 80089770 000866B0 48 00 00 08 */ b lbl_80089778 +lbl_80089774: +/* 80089774 000866B4 38 A0 00 03 */ li r5, 3 +lbl_80089778: +/* 80089778 000866B8 38 7F 00 00 */ addi r3, r31, 0 +/* 8008977C 000866BC 38 80 00 80 */ li r4, 0x80 +/* 80089780 000866C0 4B FF F4 95 */ bl TRKStandardACK +/* 80089784 000866C4 48 00 00 0C */ b lbl_80089790 +lbl_80089788: +/* 80089788 000866C8 7F E3 FB 78 */ mr r3, r31 +/* 8008978C 000866CC 4B FF F4 39 */ bl TRKSendACK +lbl_80089790: +/* 80089790 000866D0 83 E1 00 14 */ lwz r31, 0x14(r1) +/* 80089794 000866D4 38 21 00 18 */ addi r1, r1, 0x18 +/* 80089798 000866D8 80 01 00 04 */ lwz r0, 4(r1) +/* 8008979C 000866DC 7C 08 03 A6 */ mtlr r0 +/* 800897A0 000866E0 4E 80 00 20 */ blr + +.global TRKDoWriteRegisters +TRKDoWriteRegisters: +/* 800897A4 000866E4 7C 08 02 A6 */ mflr r0 +/* 800897A8 000866E8 90 01 00 04 */ stw r0, 4(r1) +/* 800897AC 000866EC 94 21 FF E0 */ stwu r1, -0x20(r1) +/* 800897B0 000866F0 93 E1 00 1C */ stw r31, 0x1c(r1) +/* 800897B4 000866F4 93 C1 00 18 */ stw r30, 0x18(r1) +/* 800897B8 000866F8 7C 7E 1B 78 */ mr r30, r3 +/* 800897BC 000866FC 80 03 00 08 */ lwz r0, 8(r3) +/* 800897C0 00086700 28 00 00 06 */ cmplwi r0, 6 +/* 800897C4 00086704 41 81 00 18 */ bgt lbl_800897DC +/* 800897C8 00086708 38 7E 00 00 */ addi r3, r30, 0 +/* 800897CC 0008670C 38 80 00 80 */ li r4, 0x80 +/* 800897D0 00086710 38 A0 00 02 */ li r5, 2 +/* 800897D4 00086714 4B FF F4 41 */ bl TRKStandardACK +/* 800897D8 00086718 48 00 01 BC */ b lbl_80089994 +lbl_800897DC: +/* 800897DC 0008671C 38 7E 00 00 */ addi r3, r30, 0 +/* 800897E0 00086720 38 80 00 00 */ li r4, 0 +/* 800897E4 00086724 4B FF EA 8D */ bl TRKSetBufferPosition +/* 800897E8 00086728 38 7E 00 00 */ addi r3, r30, 0 +/* 800897EC 0008672C 38 81 00 08 */ addi r4, r1, 8 +/* 800897F0 00086730 4B FF EE 05 */ bl TRKReadBuffer1_ui8 +/* 800897F4 00086734 2C 03 00 00 */ cmpwi r3, 0 +/* 800897F8 00086738 40 82 00 10 */ bne lbl_80089808 +/* 800897FC 0008673C 38 7E 00 00 */ addi r3, r30, 0 +/* 80089800 00086740 38 81 00 09 */ addi r4, r1, 9 +/* 80089804 00086744 4B FF ED F1 */ bl TRKReadBuffer1_ui8 +lbl_80089808: +/* 80089808 00086748 2C 03 00 00 */ cmpwi r3, 0 +/* 8008980C 0008674C 40 82 00 10 */ bne lbl_8008981C +/* 80089810 00086750 38 7E 00 00 */ addi r3, r30, 0 +/* 80089814 00086754 38 81 00 0A */ addi r4, r1, 0xa +/* 80089818 00086758 4B FF EE 01 */ bl TRKReadBuffer1_ui16 +lbl_8008981C: +/* 8008981C 0008675C 2C 03 00 00 */ cmpwi r3, 0 +/* 80089820 00086760 40 82 00 10 */ bne lbl_80089830 +/* 80089824 00086764 38 7E 00 00 */ addi r3, r30, 0 +/* 80089828 00086768 38 81 00 0C */ addi r4, r1, 0xc +/* 8008982C 0008676C 4B FF ED ED */ bl TRKReadBuffer1_ui16 +lbl_80089830: +/* 80089830 00086770 A0 61 00 0A */ lhz r3, 0xa(r1) +/* 80089834 00086774 A0 81 00 0C */ lhz r4, 0xc(r1) +/* 80089838 00086778 7C 03 20 40 */ cmplw r3, r4 +/* 8008983C 0008677C 40 81 00 18 */ ble lbl_80089854 +/* 80089840 00086780 38 7E 00 00 */ addi r3, r30, 0 +/* 80089844 00086784 38 80 00 80 */ li r4, 0x80 +/* 80089848 00086788 38 A0 00 14 */ li r5, 0x14 +/* 8008984C 0008678C 4B FF F3 C9 */ bl TRKStandardACK +/* 80089850 00086790 48 00 01 44 */ b lbl_80089994 +lbl_80089854: +/* 80089854 00086794 88 01 00 09 */ lbz r0, 9(r1) +/* 80089858 00086798 2C 00 00 02 */ cmpwi r0, 2 +/* 8008985C 0008679C 41 82 00 54 */ beq lbl_800898B0 +/* 80089860 000867A0 40 80 00 14 */ bge lbl_80089874 +/* 80089864 000867A4 2C 00 00 00 */ cmpwi r0, 0 +/* 80089868 000867A8 41 82 00 18 */ beq lbl_80089880 +/* 8008986C 000867AC 40 80 00 2C */ bge lbl_80089898 +/* 80089870 000867B0 48 00 00 70 */ b lbl_800898E0 +lbl_80089874: +/* 80089874 000867B4 2C 00 00 04 */ cmpwi r0, 4 +/* 80089878 000867B8 40 80 00 68 */ bge lbl_800898E0 +/* 8008987C 000867BC 48 00 00 4C */ b lbl_800898C8 +lbl_80089880: +/* 80089880 000867C0 38 C1 00 10 */ addi r6, r1, 0x10 +/* 80089884 000867C4 38 BE 00 00 */ addi r5, r30, 0 +/* 80089888 000867C8 38 E0 00 00 */ li r7, 0 +/* 8008988C 000867CC 48 00 0E E1 */ bl TRKTargetAccessDefault +/* 80089890 000867D0 7C 7F 1B 78 */ mr r31, r3 +/* 80089894 000867D4 48 00 00 50 */ b lbl_800898E4 +lbl_80089898: +/* 80089898 000867D8 38 C1 00 10 */ addi r6, r1, 0x10 +/* 8008989C 000867DC 38 BE 00 00 */ addi r5, r30, 0 +/* 800898A0 000867E0 38 E0 00 00 */ li r7, 0 +/* 800898A4 000867E4 48 00 0F C5 */ bl TRKTargetAccessFP +/* 800898A8 000867E8 7C 7F 1B 78 */ mr r31, r3 +/* 800898AC 000867EC 48 00 00 38 */ b lbl_800898E4 +lbl_800898B0: +/* 800898B0 000867F0 38 C1 00 10 */ addi r6, r1, 0x10 +/* 800898B4 000867F4 38 BE 00 00 */ addi r5, r30, 0 +/* 800898B8 000867F8 38 E0 00 00 */ li r7, 0 +/* 800898BC 000867FC 48 00 10 F5 */ bl TRKTargetAccessExtended1 +/* 800898C0 00086800 7C 7F 1B 78 */ mr r31, r3 +/* 800898C4 00086804 48 00 00 20 */ b lbl_800898E4 +lbl_800898C8: +/* 800898C8 00086808 38 C1 00 10 */ addi r6, r1, 0x10 +/* 800898CC 0008680C 38 BE 00 00 */ addi r5, r30, 0 +/* 800898D0 00086810 38 E0 00 00 */ li r7, 0 +/* 800898D4 00086814 48 00 12 55 */ bl TRKTargetAccessExtended2 +/* 800898D8 00086818 7C 7F 1B 78 */ mr r31, r3 +/* 800898DC 0008681C 48 00 00 08 */ b lbl_800898E4 +lbl_800898E0: +/* 800898E0 00086820 3B E0 07 03 */ li r31, 0x703 +lbl_800898E4: +/* 800898E4 00086824 2C 1F 00 00 */ cmpwi r31, 0 +/* 800898E8 00086828 40 82 00 14 */ bne lbl_800898FC +/* 800898EC 0008682C 38 7E 00 00 */ addi r3, r30, 0 +/* 800898F0 00086830 38 80 00 80 */ li r4, 0x80 +/* 800898F4 00086834 38 A0 00 00 */ li r5, 0 +/* 800898F8 00086838 4B FF F2 35 */ bl TRKMessageIntoReply +lbl_800898FC: +/* 800898FC 0008683C 2C 1F 00 00 */ cmpwi r31, 0 +/* 80089900 00086840 41 82 00 8C */ beq lbl_8008998C +/* 80089904 00086844 2C 1F 07 03 */ cmpwi r31, 0x703 +/* 80089908 00086848 41 82 00 38 */ beq lbl_80089940 +/* 8008990C 0008684C 40 80 00 1C */ bge lbl_80089928 +/* 80089910 00086850 2C 1F 07 01 */ cmpwi r31, 0x701 +/* 80089914 00086854 41 82 00 34 */ beq lbl_80089948 +/* 80089918 00086858 40 80 00 40 */ bge lbl_80089958 +/* 8008991C 0008685C 2C 1F 03 02 */ cmpwi r31, 0x302 +/* 80089920 00086860 41 82 00 30 */ beq lbl_80089950 +/* 80089924 00086864 48 00 00 54 */ b lbl_80089978 +lbl_80089928: +/* 80089928 00086868 2C 1F 07 06 */ cmpwi r31, 0x706 +/* 8008992C 0008686C 41 82 00 44 */ beq lbl_80089970 +/* 80089930 00086870 40 80 00 48 */ bge lbl_80089978 +/* 80089934 00086874 2C 1F 07 05 */ cmpwi r31, 0x705 +/* 80089938 00086878 40 80 00 30 */ bge lbl_80089968 +/* 8008993C 0008687C 48 00 00 24 */ b lbl_80089960 +lbl_80089940: +/* 80089940 00086880 38 A0 00 12 */ li r5, 0x12 +/* 80089944 00086884 48 00 00 38 */ b lbl_8008997C +lbl_80089948: +/* 80089948 00086888 38 A0 00 14 */ li r5, 0x14 +/* 8008994C 0008688C 48 00 00 30 */ b lbl_8008997C +lbl_80089950: +/* 80089950 00086890 38 A0 00 02 */ li r5, 2 +/* 80089954 00086894 48 00 00 28 */ b lbl_8008997C +lbl_80089958: +/* 80089958 00086898 38 A0 00 15 */ li r5, 0x15 +/* 8008995C 0008689C 48 00 00 20 */ b lbl_8008997C +lbl_80089960: +/* 80089960 000868A0 38 A0 00 21 */ li r5, 0x21 +/* 80089964 000868A4 48 00 00 18 */ b lbl_8008997C +lbl_80089968: +/* 80089968 000868A8 38 A0 00 22 */ li r5, 0x22 +/* 8008996C 000868AC 48 00 00 10 */ b lbl_8008997C +lbl_80089970: +/* 80089970 000868B0 38 A0 00 20 */ li r5, 0x20 +/* 80089974 000868B4 48 00 00 08 */ b lbl_8008997C +lbl_80089978: +/* 80089978 000868B8 38 A0 00 03 */ li r5, 3 +lbl_8008997C: +/* 8008997C 000868BC 38 7E 00 00 */ addi r3, r30, 0 +/* 80089980 000868C0 38 80 00 80 */ li r4, 0x80 +/* 80089984 000868C4 4B FF F2 91 */ bl TRKStandardACK +/* 80089988 000868C8 48 00 00 0C */ b lbl_80089994 +lbl_8008998C: +/* 8008998C 000868CC 7F C3 F3 78 */ mr r3, r30 +/* 80089990 000868D0 4B FF F2 35 */ bl TRKSendACK +lbl_80089994: +/* 80089994 000868D4 83 E1 00 1C */ lwz r31, 0x1c(r1) +/* 80089998 000868D8 83 C1 00 18 */ lwz r30, 0x18(r1) +/* 8008999C 000868DC 38 21 00 20 */ addi r1, r1, 0x20 +/* 800899A0 000868E0 80 01 00 04 */ lwz r0, 4(r1) +/* 800899A4 000868E4 7C 08 03 A6 */ mtlr r0 +/* 800899A8 000868E8 4E 80 00 20 */ blr + +.global TRKDoFlushCache +TRKDoFlushCache: +/* 800899AC 000868EC 7C 08 02 A6 */ mflr r0 +/* 800899B0 000868F0 90 01 00 04 */ stw r0, 4(r1) +/* 800899B4 000868F4 94 21 FF E0 */ stwu r1, -0x20(r1) +/* 800899B8 000868F8 93 E1 00 1C */ stw r31, 0x1c(r1) +/* 800899BC 000868FC 93 C1 00 18 */ stw r30, 0x18(r1) +/* 800899C0 00086900 7C 7E 1B 78 */ mr r30, r3 +/* 800899C4 00086904 80 03 00 08 */ lwz r0, 8(r3) +/* 800899C8 00086908 28 00 00 0A */ cmplwi r0, 0xa +/* 800899CC 0008690C 41 82 00 18 */ beq lbl_800899E4 +/* 800899D0 00086910 38 7E 00 00 */ addi r3, r30, 0 +/* 800899D4 00086914 38 80 00 80 */ li r4, 0x80 +/* 800899D8 00086918 38 A0 00 02 */ li r5, 2 +/* 800899DC 0008691C 4B FF F2 39 */ bl TRKStandardACK +/* 800899E0 00086920 48 00 00 EC */ b lbl_80089ACC +lbl_800899E4: +/* 800899E4 00086924 38 7E 00 00 */ addi r3, r30, 0 +/* 800899E8 00086928 38 80 00 00 */ li r4, 0 +/* 800899EC 0008692C 4B FF E8 85 */ bl TRKSetBufferPosition +/* 800899F0 00086930 38 7E 00 00 */ addi r3, r30, 0 +/* 800899F4 00086934 38 81 00 08 */ addi r4, r1, 8 +/* 800899F8 00086938 4B FF EB FD */ bl TRKReadBuffer1_ui8 +/* 800899FC 0008693C 7C 7F 1B 79 */ or. r31, r3, r3 +/* 80089A00 00086940 40 82 00 14 */ bne lbl_80089A14 +/* 80089A04 00086944 38 7E 00 00 */ addi r3, r30, 0 +/* 80089A08 00086948 38 81 00 09 */ addi r4, r1, 9 +/* 80089A0C 0008694C 4B FF EB E9 */ bl TRKReadBuffer1_ui8 +/* 80089A10 00086950 7C 7F 1B 78 */ mr r31, r3 +lbl_80089A14: +/* 80089A14 00086954 2C 1F 00 00 */ cmpwi r31, 0 +/* 80089A18 00086958 40 82 00 14 */ bne lbl_80089A2C +/* 80089A1C 0008695C 38 7E 00 00 */ addi r3, r30, 0 +/* 80089A20 00086960 38 81 00 0C */ addi r4, r1, 0xc +/* 80089A24 00086964 4B FF EC 75 */ bl TRKReadBuffer1_ui32 +/* 80089A28 00086968 7C 7F 1B 78 */ mr r31, r3 +lbl_80089A2C: +/* 80089A2C 0008696C 2C 1F 00 00 */ cmpwi r31, 0 +/* 80089A30 00086970 40 82 00 14 */ bne lbl_80089A44 +/* 80089A34 00086974 38 7E 00 00 */ addi r3, r30, 0 +/* 80089A38 00086978 38 81 00 10 */ addi r4, r1, 0x10 +/* 80089A3C 0008697C 4B FF EC 5D */ bl TRKReadBuffer1_ui32 +/* 80089A40 00086980 7C 7F 1B 78 */ mr r31, r3 +lbl_80089A44: +/* 80089A44 00086984 80 81 00 0C */ lwz r4, 0xc(r1) +/* 80089A48 00086988 80 A1 00 10 */ lwz r5, 0x10(r1) +/* 80089A4C 0008698C 7C 04 28 40 */ cmplw r4, r5 +/* 80089A50 00086990 40 81 00 18 */ ble lbl_80089A68 +/* 80089A54 00086994 38 7E 00 00 */ addi r3, r30, 0 +/* 80089A58 00086998 38 80 00 80 */ li r4, 0x80 +/* 80089A5C 0008699C 38 A0 00 13 */ li r5, 0x13 +/* 80089A60 000869A0 4B FF F1 B5 */ bl TRKStandardACK +/* 80089A64 000869A4 48 00 00 68 */ b lbl_80089ACC +lbl_80089A68: +/* 80089A68 000869A8 2C 1F 00 00 */ cmpwi r31, 0 +/* 80089A6C 000869AC 40 82 00 10 */ bne lbl_80089A7C +/* 80089A70 000869B0 88 61 00 09 */ lbz r3, 9(r1) +/* 80089A74 000869B4 48 00 1B FD */ bl TRKTargetFlushCache +/* 80089A78 000869B8 7C 7F 1B 78 */ mr r31, r3 +lbl_80089A7C: +/* 80089A7C 000869BC 2C 1F 00 00 */ cmpwi r31, 0 +/* 80089A80 000869C0 40 82 00 14 */ bne lbl_80089A94 +/* 80089A84 000869C4 38 7E 00 00 */ addi r3, r30, 0 +/* 80089A88 000869C8 38 80 00 80 */ li r4, 0x80 +/* 80089A8C 000869CC 38 A0 00 00 */ li r5, 0 +/* 80089A90 000869D0 4B FF F0 9D */ bl TRKMessageIntoReply +lbl_80089A94: +/* 80089A94 000869D4 2C 1F 00 00 */ cmpwi r31, 0 +/* 80089A98 000869D8 41 82 00 2C */ beq lbl_80089AC4 +/* 80089A9C 000869DC 2C 1F 07 03 */ cmpwi r31, 0x703 +/* 80089AA0 000869E0 41 82 00 08 */ beq lbl_80089AA8 +/* 80089AA4 000869E4 48 00 00 0C */ b lbl_80089AB0 +lbl_80089AA8: +/* 80089AA8 000869E8 38 A0 00 12 */ li r5, 0x12 +/* 80089AAC 000869EC 48 00 00 08 */ b lbl_80089AB4 +lbl_80089AB0: +/* 80089AB0 000869F0 38 A0 00 03 */ li r5, 3 +lbl_80089AB4: +/* 80089AB4 000869F4 38 7E 00 00 */ addi r3, r30, 0 +/* 80089AB8 000869F8 38 80 00 80 */ li r4, 0x80 +/* 80089ABC 000869FC 4B FF F1 59 */ bl TRKStandardACK +/* 80089AC0 00086A00 48 00 00 0C */ b lbl_80089ACC +lbl_80089AC4: +/* 80089AC4 00086A04 7F C3 F3 78 */ mr r3, r30 +/* 80089AC8 00086A08 4B FF F0 FD */ bl TRKSendACK +lbl_80089ACC: +/* 80089ACC 00086A0C 83 E1 00 1C */ lwz r31, 0x1c(r1) +/* 80089AD0 00086A10 83 C1 00 18 */ lwz r30, 0x18(r1) +/* 80089AD4 00086A14 38 21 00 20 */ addi r1, r1, 0x20 +/* 80089AD8 00086A18 80 01 00 04 */ lwz r0, 4(r1) +/* 80089ADC 00086A1C 7C 08 03 A6 */ mtlr r0 +/* 80089AE0 00086A20 4E 80 00 20 */ blr + +.global TRKDoContinue +TRKDoContinue: +/* 80089AE4 00086A24 7C 08 02 A6 */ mflr r0 +/* 80089AE8 00086A28 90 01 00 04 */ stw r0, 4(r1) +/* 80089AEC 00086A2C 94 21 FF F0 */ stwu r1, -0x10(r1) +/* 80089AF0 00086A30 93 E1 00 0C */ stw r31, 0xc(r1) +/* 80089AF4 00086A34 7C 7F 1B 78 */ mr r31, r3 +/* 80089AF8 00086A38 48 00 1B B5 */ bl TRKTargetStopped +/* 80089AFC 00086A3C 2C 03 00 00 */ cmpwi r3, 0 +/* 80089B00 00086A40 40 82 00 18 */ bne lbl_80089B18 +/* 80089B04 00086A44 38 7F 00 00 */ addi r3, r31, 0 +/* 80089B08 00086A48 38 80 00 80 */ li r4, 0x80 +/* 80089B0C 00086A4C 38 A0 00 16 */ li r5, 0x16 +/* 80089B10 00086A50 4B FF F1 05 */ bl TRKStandardACK +/* 80089B14 00086A54 48 00 00 20 */ b lbl_80089B34 +lbl_80089B18: +/* 80089B18 00086A58 38 7F 00 00 */ addi r3, r31, 0 +/* 80089B1C 00086A5C 38 80 00 80 */ li r4, 0x80 +/* 80089B20 00086A60 38 A0 00 00 */ li r5, 0 +/* 80089B24 00086A64 4B FF F0 F1 */ bl TRKStandardACK +/* 80089B28 00086A68 2C 03 00 00 */ cmpwi r3, 0 +/* 80089B2C 00086A6C 40 82 00 08 */ bne lbl_80089B34 +/* 80089B30 00086A70 48 00 28 3D */ bl TRKTargetContinue +lbl_80089B34: +/* 80089B34 00086A74 83 E1 00 0C */ lwz r31, 0xc(r1) +/* 80089B38 00086A78 38 21 00 10 */ addi r1, r1, 0x10 +/* 80089B3C 00086A7C 80 01 00 04 */ lwz r0, 4(r1) +/* 80089B40 00086A80 7C 08 03 A6 */ mtlr r0 +/* 80089B44 00086A84 4E 80 00 20 */ blr + +.global TRKDoStep +TRKDoStep: +/* 80089B48 00086A88 7C 08 02 A6 */ mflr r0 +/* 80089B4C 00086A8C 90 01 00 04 */ stw r0, 4(r1) +/* 80089B50 00086A90 94 21 FF E8 */ stwu r1, -0x18(r1) +/* 80089B54 00086A94 93 E1 00 14 */ stw r31, 0x14(r1) +/* 80089B58 00086A98 7C 7F 1B 78 */ mr r31, r3 +/* 80089B5C 00086A9C 80 03 00 08 */ lwz r0, 8(r3) +/* 80089B60 00086AA0 28 00 00 03 */ cmplwi r0, 3 +/* 80089B64 00086AA4 40 80 00 18 */ bge lbl_80089B7C +/* 80089B68 00086AA8 38 7F 00 00 */ addi r3, r31, 0 +/* 80089B6C 00086AAC 38 80 00 80 */ li r4, 0x80 +/* 80089B70 00086AB0 38 A0 00 02 */ li r5, 2 +/* 80089B74 00086AB4 4B FF F0 A1 */ bl TRKStandardACK +/* 80089B78 00086AB8 48 00 01 C0 */ b lbl_80089D38 +lbl_80089B7C: +/* 80089B7C 00086ABC 38 7F 00 00 */ addi r3, r31, 0 +/* 80089B80 00086AC0 38 80 00 00 */ li r4, 0 +/* 80089B84 00086AC4 4B FF E6 ED */ bl TRKSetBufferPosition +/* 80089B88 00086AC8 38 7F 00 00 */ addi r3, r31, 0 +/* 80089B8C 00086ACC 38 81 00 08 */ addi r4, r1, 8 +/* 80089B90 00086AD0 4B FF EA 65 */ bl TRKReadBuffer1_ui8 +/* 80089B94 00086AD4 2C 03 00 00 */ cmpwi r3, 0 +/* 80089B98 00086AD8 40 82 00 10 */ bne lbl_80089BA8 +/* 80089B9C 00086ADC 38 7F 00 00 */ addi r3, r31, 0 +/* 80089BA0 00086AE0 38 81 00 09 */ addi r4, r1, 9 +/* 80089BA4 00086AE4 4B FF EA 51 */ bl TRKReadBuffer1_ui8 +lbl_80089BA8: +/* 80089BA8 00086AE8 88 01 00 09 */ lbz r0, 9(r1) +/* 80089BAC 00086AEC 2C 00 00 10 */ cmpwi r0, 0x10 +/* 80089BB0 00086AF0 41 82 00 2C */ beq lbl_80089BDC +/* 80089BB4 00086AF4 40 80 00 1C */ bge lbl_80089BD0 +/* 80089BB8 00086AF8 2C 00 00 01 */ cmpwi r0, 1 +/* 80089BBC 00086AFC 41 82 00 54 */ beq lbl_80089C10 +/* 80089BC0 00086B00 40 80 00 C8 */ bge lbl_80089C88 +/* 80089BC4 00086B04 2C 00 00 00 */ cmpwi r0, 0 +/* 80089BC8 00086B08 40 80 00 14 */ bge lbl_80089BDC +/* 80089BCC 00086B0C 48 00 00 BC */ b lbl_80089C88 +lbl_80089BD0: +/* 80089BD0 00086B10 2C 00 00 12 */ cmpwi r0, 0x12 +/* 80089BD4 00086B14 40 80 00 B4 */ bge lbl_80089C88 +/* 80089BD8 00086B18 48 00 00 38 */ b lbl_80089C10 +lbl_80089BDC: +/* 80089BDC 00086B1C 2C 03 00 00 */ cmpwi r3, 0 +/* 80089BE0 00086B20 40 82 00 10 */ bne lbl_80089BF0 +/* 80089BE4 00086B24 38 7F 00 00 */ addi r3, r31, 0 +/* 80089BE8 00086B28 38 81 00 0A */ addi r4, r1, 0xa +/* 80089BEC 00086B2C 4B FF EA 09 */ bl TRKReadBuffer1_ui8 +lbl_80089BF0: +/* 80089BF0 00086B30 88 01 00 0A */ lbz r0, 0xa(r1) +/* 80089BF4 00086B34 28 00 00 01 */ cmplwi r0, 1 +/* 80089BF8 00086B38 40 80 00 A4 */ bge lbl_80089C9C +/* 80089BFC 00086B3C 38 7F 00 00 */ addi r3, r31, 0 +/* 80089C00 00086B40 38 80 00 80 */ li r4, 0x80 +/* 80089C04 00086B44 38 A0 00 11 */ li r5, 0x11 +/* 80089C08 00086B48 4B FF F0 0D */ bl TRKStandardACK +/* 80089C0C 00086B4C 48 00 01 2C */ b lbl_80089D38 +lbl_80089C10: +/* 80089C10 00086B50 80 1F 00 08 */ lwz r0, 8(r31) +/* 80089C14 00086B54 28 00 00 0A */ cmplwi r0, 0xa +/* 80089C18 00086B58 41 82 00 18 */ beq lbl_80089C30 +/* 80089C1C 00086B5C 38 7F 00 00 */ addi r3, r31, 0 +/* 80089C20 00086B60 38 80 00 80 */ li r4, 0x80 +/* 80089C24 00086B64 38 A0 00 02 */ li r5, 2 +/* 80089C28 00086B68 4B FF EF ED */ bl TRKStandardACK +/* 80089C2C 00086B6C 48 00 01 0C */ b lbl_80089D38 +lbl_80089C30: +/* 80089C30 00086B70 2C 03 00 00 */ cmpwi r3, 0 +/* 80089C34 00086B74 40 82 00 10 */ bne lbl_80089C44 +/* 80089C38 00086B78 38 7F 00 00 */ addi r3, r31, 0 +/* 80089C3C 00086B7C 38 81 00 0C */ addi r4, r1, 0xc +/* 80089C40 00086B80 4B FF EA 59 */ bl TRKReadBuffer1_ui32 +lbl_80089C44: +/* 80089C44 00086B84 2C 03 00 00 */ cmpwi r3, 0 +/* 80089C48 00086B88 40 82 00 10 */ bne lbl_80089C58 +/* 80089C4C 00086B8C 38 7F 00 00 */ addi r3, r31, 0 +/* 80089C50 00086B90 38 81 00 10 */ addi r4, r1, 0x10 +/* 80089C54 00086B94 4B FF EA 45 */ bl TRKReadBuffer1_ui32 +lbl_80089C58: +/* 80089C58 00086B98 48 00 19 19 */ bl TRKTargetGetPC +/* 80089C5C 00086B9C 80 01 00 0C */ lwz r0, 0xc(r1) +/* 80089C60 00086BA0 7C 03 00 40 */ cmplw r3, r0 +/* 80089C64 00086BA4 41 80 00 10 */ blt lbl_80089C74 +/* 80089C68 00086BA8 80 01 00 10 */ lwz r0, 0x10(r1) +/* 80089C6C 00086BAC 7C 03 00 40 */ cmplw r3, r0 +/* 80089C70 00086BB0 40 81 00 2C */ ble lbl_80089C9C +lbl_80089C74: +/* 80089C74 00086BB4 38 7F 00 00 */ addi r3, r31, 0 +/* 80089C78 00086BB8 38 80 00 80 */ li r4, 0x80 +/* 80089C7C 00086BBC 38 A0 00 11 */ li r5, 0x11 +/* 80089C80 00086BC0 4B FF EF 95 */ bl TRKStandardACK +/* 80089C84 00086BC4 48 00 00 B4 */ b lbl_80089D38 +lbl_80089C88: +/* 80089C88 00086BC8 38 7F 00 00 */ addi r3, r31, 0 +/* 80089C8C 00086BCC 38 80 00 80 */ li r4, 0x80 +/* 80089C90 00086BD0 38 A0 00 12 */ li r5, 0x12 +/* 80089C94 00086BD4 4B FF EF 81 */ bl TRKStandardACK +/* 80089C98 00086BD8 48 00 00 A0 */ b lbl_80089D38 +lbl_80089C9C: +/* 80089C9C 00086BDC 48 00 1A 11 */ bl TRKTargetStopped +/* 80089CA0 00086BE0 2C 03 00 00 */ cmpwi r3, 0 +/* 80089CA4 00086BE4 40 82 00 18 */ bne lbl_80089CBC +/* 80089CA8 00086BE8 38 7F 00 00 */ addi r3, r31, 0 +/* 80089CAC 00086BEC 38 80 00 80 */ li r4, 0x80 +/* 80089CB0 00086BF0 38 A0 00 16 */ li r5, 0x16 +/* 80089CB4 00086BF4 4B FF EF 61 */ bl TRKStandardACK +/* 80089CB8 00086BF8 48 00 00 80 */ b lbl_80089D38 +lbl_80089CBC: +/* 80089CBC 00086BFC 38 7F 00 00 */ addi r3, r31, 0 +/* 80089CC0 00086C00 38 80 00 80 */ li r4, 0x80 +/* 80089CC4 00086C04 38 A0 00 00 */ li r5, 0 +/* 80089CC8 00086C08 4B FF EF 4D */ bl TRKStandardACK +/* 80089CCC 00086C0C 2C 03 00 00 */ cmpwi r3, 0 +/* 80089CD0 00086C10 40 82 00 68 */ bne lbl_80089D38 +/* 80089CD4 00086C14 88 01 00 09 */ lbz r0, 9(r1) +/* 80089CD8 00086C18 2C 00 00 10 */ cmpwi r0, 0x10 +/* 80089CDC 00086C1C 41 82 00 2C */ beq lbl_80089D08 +/* 80089CE0 00086C20 40 80 00 1C */ bge lbl_80089CFC +/* 80089CE4 00086C24 2C 00 00 01 */ cmpwi r0, 1 +/* 80089CE8 00086C28 41 82 00 38 */ beq lbl_80089D20 +/* 80089CEC 00086C2C 40 80 00 4C */ bge lbl_80089D38 +/* 80089CF0 00086C30 2C 00 00 00 */ cmpwi r0, 0 +/* 80089CF4 00086C34 40 80 00 14 */ bge lbl_80089D08 +/* 80089CF8 00086C38 48 00 00 40 */ b lbl_80089D38 +lbl_80089CFC: +/* 80089CFC 00086C3C 2C 00 00 12 */ cmpwi r0, 0x12 +/* 80089D00 00086C40 40 80 00 38 */ bge lbl_80089D38 +/* 80089D04 00086C44 48 00 00 1C */ b lbl_80089D20 +lbl_80089D08: +/* 80089D08 00086C48 20 00 00 10 */ subfic r0, r0, 0x10 +/* 80089D0C 00086C4C 88 61 00 0A */ lbz r3, 0xa(r1) +/* 80089D10 00086C50 7C 00 00 34 */ cntlzw r0, r0 +/* 80089D14 00086C54 54 04 D9 7E */ srwi r4, r0, 5 +/* 80089D18 00086C58 48 00 17 CD */ bl TRKTargetSingleStep +/* 80089D1C 00086C5C 48 00 00 1C */ b lbl_80089D38 +lbl_80089D20: +/* 80089D20 00086C60 20 00 00 11 */ subfic r0, r0, 0x11 +/* 80089D24 00086C64 80 61 00 0C */ lwz r3, 0xc(r1) +/* 80089D28 00086C68 7C 00 00 34 */ cntlzw r0, r0 +/* 80089D2C 00086C6C 80 81 00 10 */ lwz r4, 0x10(r1) +/* 80089D30 00086C70 54 05 D9 7E */ srwi r5, r0, 5 +/* 80089D34 00086C74 48 00 17 F5 */ bl TRKTargetStepOutOfRange +lbl_80089D38: +/* 80089D38 00086C78 83 E1 00 14 */ lwz r31, 0x14(r1) +/* 80089D3C 00086C7C 38 21 00 18 */ addi r1, r1, 0x18 +/* 80089D40 00086C80 80 01 00 04 */ lwz r0, 4(r1) +/* 80089D44 00086C84 7C 08 03 A6 */ mtlr r0 +/* 80089D48 00086C88 4E 80 00 20 */ blr + +.global TRKDoStop +TRKDoStop: +/* 80089D4C 00086C8C 7C 08 02 A6 */ mflr r0 +/* 80089D50 00086C90 90 01 00 04 */ stw r0, 4(r1) +/* 80089D54 00086C94 94 21 FF F0 */ stwu r1, -0x10(r1) +/* 80089D58 00086C98 93 E1 00 0C */ stw r31, 0xc(r1) +/* 80089D5C 00086C9C 7C 7F 1B 78 */ mr r31, r3 +/* 80089D60 00086CA0 48 00 19 6D */ bl TRKTargetStop +/* 80089D64 00086CA4 2C 03 07 04 */ cmpwi r3, 0x704 +/* 80089D68 00086CA8 41 82 00 2C */ beq lbl_80089D94 +/* 80089D6C 00086CAC 40 80 00 10 */ bge lbl_80089D7C +/* 80089D70 00086CB0 2C 03 00 00 */ cmpwi r3, 0 +/* 80089D74 00086CB4 41 82 00 18 */ beq lbl_80089D8C +/* 80089D78 00086CB8 48 00 00 34 */ b lbl_80089DAC +lbl_80089D7C: +/* 80089D7C 00086CBC 2C 03 07 06 */ cmpwi r3, 0x706 +/* 80089D80 00086CC0 41 82 00 24 */ beq lbl_80089DA4 +/* 80089D84 00086CC4 40 80 00 28 */ bge lbl_80089DAC +/* 80089D88 00086CC8 48 00 00 14 */ b lbl_80089D9C +lbl_80089D8C: +/* 80089D8C 00086CCC 38 A0 00 00 */ li r5, 0 +/* 80089D90 00086CD0 48 00 00 20 */ b lbl_80089DB0 +lbl_80089D94: +/* 80089D94 00086CD4 38 A0 00 21 */ li r5, 0x21 +/* 80089D98 00086CD8 48 00 00 18 */ b lbl_80089DB0 +lbl_80089D9C: +/* 80089D9C 00086CDC 38 A0 00 22 */ li r5, 0x22 +/* 80089DA0 00086CE0 48 00 00 10 */ b lbl_80089DB0 +lbl_80089DA4: +/* 80089DA4 00086CE4 38 A0 00 20 */ li r5, 0x20 +/* 80089DA8 00086CE8 48 00 00 08 */ b lbl_80089DB0 +lbl_80089DAC: +/* 80089DAC 00086CEC 38 A0 00 01 */ li r5, 1 +lbl_80089DB0: +/* 80089DB0 00086CF0 38 7F 00 00 */ addi r3, r31, 0 +/* 80089DB4 00086CF4 38 80 00 80 */ li r4, 0x80 +/* 80089DB8 00086CF8 4B FF EE 5D */ bl TRKStandardACK +/* 80089DBC 00086CFC 83 E1 00 0C */ lwz r31, 0xc(r1) +/* 80089DC0 00086D00 38 21 00 10 */ addi r1, r1, 0x10 +/* 80089DC4 00086D04 80 01 00 04 */ lwz r0, 4(r1) +/* 80089DC8 00086D08 7C 08 03 A6 */ mtlr r0 +/* 80089DCC 00086D0C 4E 80 00 20 */ blr + +.section .data, "wa" # 0x803A8380 - 0x803E6000 +"@175": + .4byte lbl_80089350 + .4byte lbl_80089370 + .4byte lbl_80089348 + .4byte lbl_80089370 + .4byte lbl_80089358 + .4byte lbl_80089360 + .4byte lbl_80089368 +"@214": + .4byte lbl_8008954C + .4byte lbl_8008956C + .4byte lbl_80089544 + .4byte lbl_8008956C + .4byte lbl_80089554 + .4byte lbl_8008955C + .4byte lbl_80089564 diff --git a/asm/TRK_MINNOW_DOLPHIN/mutex_TRK.s b/asm/TRK_MINNOW_DOLPHIN/mutex_TRK.s new file mode 100644 index 0000000..0d70ce4 --- /dev/null +++ b/asm/TRK_MINNOW_DOLPHIN/mutex_TRK.s @@ -0,0 +1,17 @@ +.include "macros.inc" + +.section .text, "ax" # 0x80005600 - 0x8036FBA0 +.global TRKInitializeMutex +TRKInitializeMutex: +/* 8008A24C 0008718C 38 60 00 00 */ li r3, 0 +/* 8008A250 00087190 4E 80 00 20 */ blr + +.global TRKAcquireMutex +TRKAcquireMutex: +/* 8008A254 00087194 38 60 00 00 */ li r3, 0 +/* 8008A258 00087198 4E 80 00 20 */ blr + +.global TRKReleaseMutex +TRKReleaseMutex: +/* 8008A25C 0008719C 38 60 00 00 */ li r3, 0 +/* 8008A260 000871A0 4E 80 00 20 */ blr diff --git a/asm/TRK_MINNOW_DOLPHIN/notify.s b/asm/TRK_MINNOW_DOLPHIN/notify.s new file mode 100644 index 0000000..58e7805 --- /dev/null +++ b/asm/TRK_MINNOW_DOLPHIN/notify.s @@ -0,0 +1,65 @@ +.include "macros.inc" + +.section .text, "ax" # 0x80005600 - 0x8036FBA0 +.global TRKDoNotifyStopped +TRKDoNotifyStopped: +/* 8008A264 000871A4 7C 08 02 A6 */ mflr r0 +/* 8008A268 000871A8 90 01 00 04 */ stw r0, 4(r1) +/* 8008A26C 000871AC 94 21 FF E0 */ stwu r1, -0x20(r1) +/* 8008A270 000871B0 93 E1 00 1C */ stw r31, 0x1c(r1) +/* 8008A274 000871B4 38 81 00 0C */ addi r4, r1, 0xc +/* 8008A278 000871B8 93 C1 00 18 */ stw r30, 0x18(r1) +/* 8008A27C 000871BC 3B C3 00 00 */ addi r30, r3, 0 +/* 8008A280 000871C0 38 61 00 08 */ addi r3, r1, 8 +/* 8008A284 000871C4 4B FF DE 7D */ bl TRKGetFreeBuffer +/* 8008A288 000871C8 7C 7F 1B 79 */ or. r31, r3, r3 +/* 8008A28C 000871CC 40 82 00 94 */ bne lbl_8008A320 +/* 8008A290 000871D0 80 A1 00 0C */ lwz r5, 0xc(r1) +/* 8008A294 000871D4 80 65 00 0C */ lwz r3, 0xc(r5) +/* 8008A298 000871D8 28 03 08 80 */ cmplwi r3, 0x880 +/* 8008A29C 000871DC 41 80 00 0C */ blt lbl_8008A2A8 +/* 8008A2A0 000871E0 38 80 03 01 */ li r4, 0x301 +/* 8008A2A4 000871E4 48 00 00 24 */ b lbl_8008A2C8 +lbl_8008A2A8: +/* 8008A2A8 000871E8 38 03 00 01 */ addi r0, r3, 1 +/* 8008A2AC 000871EC 7C 65 1A 14 */ add r3, r5, r3 +/* 8008A2B0 000871F0 90 05 00 0C */ stw r0, 0xc(r5) +/* 8008A2B4 000871F4 38 80 00 00 */ li r4, 0 +/* 8008A2B8 000871F8 9B C3 00 10 */ stb r30, 0x10(r3) +/* 8008A2BC 000871FC 80 65 00 08 */ lwz r3, 8(r5) +/* 8008A2C0 00087200 38 03 00 01 */ addi r0, r3, 1 +/* 8008A2C4 00087204 90 05 00 08 */ stw r0, 8(r5) +lbl_8008A2C8: +/* 8008A2C8 00087208 2C 04 00 00 */ cmpwi r4, 0 +/* 8008A2CC 0008720C 40 82 00 24 */ bne lbl_8008A2F0 +/* 8008A2D0 00087210 57 C0 06 3E */ clrlwi r0, r30, 0x18 +/* 8008A2D4 00087214 28 00 00 90 */ cmplwi r0, 0x90 +/* 8008A2D8 00087218 40 82 00 10 */ bne lbl_8008A2E8 +/* 8008A2DC 0008721C 80 61 00 0C */ lwz r3, 0xc(r1) +/* 8008A2E0 00087220 48 00 0F 55 */ bl TRKTargetAddStopInfo +/* 8008A2E4 00087224 48 00 00 0C */ b lbl_8008A2F0 +lbl_8008A2E8: +/* 8008A2E8 00087228 80 61 00 0C */ lwz r3, 0xc(r1) +/* 8008A2EC 0008722C 48 00 0F D9 */ bl TRKTargetAddExceptionInfo +lbl_8008A2F0: +/* 8008A2F0 00087230 80 61 00 0C */ lwz r3, 0xc(r1) +/* 8008A2F4 00087234 38 81 00 10 */ addi r4, r1, 0x10 +/* 8008A2F8 00087238 38 A0 00 02 */ li r5, 2 +/* 8008A2FC 0008723C 38 C0 00 03 */ li r6, 3 +/* 8008A300 00087240 38 E0 00 01 */ li r7, 1 +/* 8008A304 00087244 4B FF FD A5 */ bl TRKRequestSend +/* 8008A308 00087248 7C 7F 1B 79 */ or. r31, r3, r3 +/* 8008A30C 0008724C 40 82 00 0C */ bne lbl_8008A318 +/* 8008A310 00087250 80 61 00 10 */ lwz r3, 0x10(r1) +/* 8008A314 00087254 4B FF DE B5 */ bl TRKReleaseBuffer +lbl_8008A318: +/* 8008A318 00087258 80 61 00 08 */ lwz r3, 8(r1) +/* 8008A31C 0008725C 4B FF DE AD */ bl TRKReleaseBuffer +lbl_8008A320: +/* 8008A320 00087260 7F E3 FB 78 */ mr r3, r31 +/* 8008A324 00087264 83 E1 00 1C */ lwz r31, 0x1c(r1) +/* 8008A328 00087268 83 C1 00 18 */ lwz r30, 0x18(r1) +/* 8008A32C 0008726C 38 21 00 20 */ addi r1, r1, 0x20 +/* 8008A330 00087270 80 01 00 04 */ lwz r0, 4(r1) +/* 8008A334 00087274 7C 08 03 A6 */ mtlr r0 +/* 8008A338 00087278 4E 80 00 20 */ blr diff --git a/asm/TRK_MINNOW_DOLPHIN/nubevent.s b/asm/TRK_MINNOW_DOLPHIN/nubevent.s new file mode 100644 index 0000000..1e540bf --- /dev/null +++ b/asm/TRK_MINNOW_DOLPHIN/nubevent.s @@ -0,0 +1,181 @@ +.include "macros.inc" + +.section .text, "ax" # 0x80005600 - 0x8036FBA0 +.global TRKInitializeEventQueue +TRKInitializeEventQueue: +/* 80087C68 00084BA8 7C 08 02 A6 */ mflr r0 +/* 80087C6C 00084BAC 3C 60 80 3F */ lis r3, gTRKEventQueue@ha +/* 80087C70 00084BB0 90 01 00 04 */ stw r0, 4(r1) +/* 80087C74 00084BB4 94 21 FF F0 */ stwu r1, -0x10(r1) +/* 80087C78 00084BB8 93 E1 00 0C */ stw r31, 0xc(r1) +/* 80087C7C 00084BBC 3B E3 90 E0 */ addi r31, r3, gTRKEventQueue@l +/* 80087C80 00084BC0 38 7F 00 00 */ addi r3, r31, 0 +/* 80087C84 00084BC4 48 00 25 C9 */ bl TRKInitializeMutex +/* 80087C88 00084BC8 7F E3 FB 78 */ mr r3, r31 +/* 80087C8C 00084BCC 48 00 25 C9 */ bl TRKAcquireMutex +/* 80087C90 00084BD0 38 60 00 00 */ li r3, 0 +/* 80087C94 00084BD4 90 7F 00 04 */ stw r3, 4(r31) +/* 80087C98 00084BD8 38 00 01 00 */ li r0, 0x100 +/* 80087C9C 00084BDC 90 7F 00 08 */ stw r3, 8(r31) +/* 80087CA0 00084BE0 7F E3 FB 78 */ mr r3, r31 +/* 80087CA4 00084BE4 90 1F 00 24 */ stw r0, 0x24(r31) +/* 80087CA8 00084BE8 48 00 25 B5 */ bl TRKReleaseMutex +/* 80087CAC 00084BEC 38 60 00 00 */ li r3, 0 +/* 80087CB0 00084BF0 83 E1 00 0C */ lwz r31, 0xc(r1) +/* 80087CB4 00084BF4 38 21 00 10 */ addi r1, r1, 0x10 +/* 80087CB8 00084BF8 80 01 00 04 */ lwz r0, 4(r1) +/* 80087CBC 00084BFC 7C 08 03 A6 */ mtlr r0 +/* 80087CC0 00084C00 4E 80 00 20 */ blr + +.global TRKCopyEvent +TRKCopyEvent: +/* 80087CC4 00084C04 7C 08 02 A6 */ mflr r0 +/* 80087CC8 00084C08 38 A0 00 0C */ li r5, 0xc +/* 80087CCC 00084C0C 90 01 00 04 */ stw r0, 4(r1) +/* 80087CD0 00084C10 94 21 FF F8 */ stwu r1, -8(r1) +/* 80087CD4 00084C14 4B F7 B5 71 */ bl TRK_memcpy +/* 80087CD8 00084C18 38 21 00 08 */ addi r1, r1, 8 +/* 80087CDC 00084C1C 80 01 00 04 */ lwz r0, 4(r1) +/* 80087CE0 00084C20 7C 08 03 A6 */ mtlr r0 +/* 80087CE4 00084C24 4E 80 00 20 */ blr + +.global TRKGetNextEvent +TRKGetNextEvent: +/* 80087CE8 00084C28 7C 08 02 A6 */ mflr r0 +/* 80087CEC 00084C2C 3C 80 80 3F */ lis r4, gTRKEventQueue@ha +/* 80087CF0 00084C30 90 01 00 04 */ stw r0, 4(r1) +/* 80087CF4 00084C34 94 21 FF E8 */ stwu r1, -0x18(r1) +/* 80087CF8 00084C38 93 E1 00 14 */ stw r31, 0x14(r1) +/* 80087CFC 00084C3C 3B E4 90 E0 */ addi r31, r4, gTRKEventQueue@l +/* 80087D00 00084C40 93 C1 00 10 */ stw r30, 0x10(r1) +/* 80087D04 00084C44 93 A1 00 0C */ stw r29, 0xc(r1) +/* 80087D08 00084C48 3B A0 00 00 */ li r29, 0 +/* 80087D0C 00084C4C 93 81 00 08 */ stw r28, 8(r1) +/* 80087D10 00084C50 3B 83 00 00 */ addi r28, r3, 0 +/* 80087D14 00084C54 38 7F 00 00 */ addi r3, r31, 0 +/* 80087D18 00084C58 48 00 25 3D */ bl TRKAcquireMutex +/* 80087D1C 00084C5C 3B DF 00 04 */ addi r30, r31, 4 +/* 80087D20 00084C60 80 1F 00 04 */ lwz r0, 4(r31) +/* 80087D24 00084C64 2C 00 00 00 */ cmpwi r0, 0 +/* 80087D28 00084C68 40 81 00 50 */ ble lbl_80087D78 +/* 80087D2C 00084C6C 3B BF 00 08 */ addi r29, r31, 8 +/* 80087D30 00084C70 80 1F 00 08 */ lwz r0, 8(r31) +/* 80087D34 00084C74 38 7C 00 00 */ addi r3, r28, 0 +/* 80087D38 00084C78 1C 00 00 0C */ mulli r0, r0, 0xc +/* 80087D3C 00084C7C 7C 9F 02 14 */ add r4, r31, r0 +/* 80087D40 00084C80 38 84 00 0C */ addi r4, r4, 0xc +/* 80087D44 00084C84 4B FF FF 81 */ bl TRKCopyEvent +/* 80087D48 00084C88 80 7E 00 00 */ lwz r3, 0(r30) +/* 80087D4C 00084C8C 38 03 FF FF */ addi r0, r3, -1 +/* 80087D50 00084C90 90 1E 00 00 */ stw r0, 0(r30) +/* 80087D54 00084C94 80 7D 00 00 */ lwz r3, 0(r29) +/* 80087D58 00084C98 38 03 00 01 */ addi r0, r3, 1 +/* 80087D5C 00084C9C 90 1D 00 00 */ stw r0, 0(r29) +/* 80087D60 00084CA0 80 1D 00 00 */ lwz r0, 0(r29) +/* 80087D64 00084CA4 2C 00 00 02 */ cmpwi r0, 2 +/* 80087D68 00084CA8 40 82 00 0C */ bne lbl_80087D74 +/* 80087D6C 00084CAC 38 00 00 00 */ li r0, 0 +/* 80087D70 00084CB0 90 1D 00 00 */ stw r0, 0(r29) +lbl_80087D74: +/* 80087D74 00084CB4 3B A0 00 01 */ li r29, 1 +lbl_80087D78: +/* 80087D78 00084CB8 3C 60 80 3F */ lis r3, gTRKEventQueue@ha +/* 80087D7C 00084CBC 38 63 90 E0 */ addi r3, r3, gTRKEventQueue@l +/* 80087D80 00084CC0 48 00 24 DD */ bl TRKReleaseMutex +/* 80087D84 00084CC4 7F A3 EB 78 */ mr r3, r29 +/* 80087D88 00084CC8 83 E1 00 14 */ lwz r31, 0x14(r1) +/* 80087D8C 00084CCC 83 C1 00 10 */ lwz r30, 0x10(r1) +/* 80087D90 00084CD0 83 A1 00 0C */ lwz r29, 0xc(r1) +/* 80087D94 00084CD4 83 81 00 08 */ lwz r28, 8(r1) +/* 80087D98 00084CD8 38 21 00 18 */ addi r1, r1, 0x18 +/* 80087D9C 00084CDC 80 01 00 04 */ lwz r0, 4(r1) +/* 80087DA0 00084CE0 7C 08 03 A6 */ mtlr r0 +/* 80087DA4 00084CE4 4E 80 00 20 */ blr + +.global TRKPostEvent +TRKPostEvent: +/* 80087DA8 00084CE8 7C 08 02 A6 */ mflr r0 +/* 80087DAC 00084CEC 3C 80 80 3F */ lis r4, gTRKEventQueue@ha +/* 80087DB0 00084CF0 90 01 00 04 */ stw r0, 4(r1) +/* 80087DB4 00084CF4 94 21 FF E8 */ stwu r1, -0x18(r1) +/* 80087DB8 00084CF8 93 E1 00 14 */ stw r31, 0x14(r1) +/* 80087DBC 00084CFC 3B E3 00 00 */ addi r31, r3, 0 +/* 80087DC0 00084D00 93 C1 00 10 */ stw r30, 0x10(r1) +/* 80087DC4 00084D04 3B C4 90 E0 */ addi r30, r4, gTRKEventQueue@l +/* 80087DC8 00084D08 38 7E 00 00 */ addi r3, r30, 0 +/* 80087DCC 00084D0C 93 A1 00 0C */ stw r29, 0xc(r1) +/* 80087DD0 00084D10 93 81 00 08 */ stw r28, 8(r1) +/* 80087DD4 00084D14 3B 80 00 00 */ li r28, 0 +/* 80087DD8 00084D18 48 00 24 7D */ bl TRKAcquireMutex +/* 80087DDC 00084D1C 3B BE 00 04 */ addi r29, r30, 4 +/* 80087DE0 00084D20 80 7E 00 04 */ lwz r3, 4(r30) +/* 80087DE4 00084D24 2C 03 00 02 */ cmpwi r3, 2 +/* 80087DE8 00084D28 40 82 00 0C */ bne lbl_80087DF4 +/* 80087DEC 00084D2C 3B 80 01 00 */ li r28, 0x100 +/* 80087DF0 00084D30 48 00 00 68 */ b lbl_80087E58 +lbl_80087DF4: +/* 80087DF4 00084D34 80 1E 00 08 */ lwz r0, 8(r30) +/* 80087DF8 00084D38 38 9F 00 00 */ addi r4, r31, 0 +/* 80087DFC 00084D3C 7C 00 1A 14 */ add r0, r0, r3 +/* 80087E00 00084D40 7C 03 0E 70 */ srawi r3, r0, 1 +/* 80087E04 00084D44 7C 63 01 94 */ addze r3, r3 +/* 80087E08 00084D48 54 63 08 3C */ slwi r3, r3, 1 +/* 80087E0C 00084D4C 7C 63 00 10 */ subfc r3, r3, r0 +/* 80087E10 00084D50 1C 03 00 0C */ mulli r0, r3, 0xc +/* 80087E14 00084D54 7F FE 02 14 */ add r31, r30, r0 +/* 80087E18 00084D58 38 7F 00 0C */ addi r3, r31, 0xc +/* 80087E1C 00084D5C 4B FF FE A9 */ bl TRKCopyEvent +/* 80087E20 00084D60 38 9E 00 24 */ addi r4, r30, 0x24 +/* 80087E24 00084D64 80 1E 00 24 */ lwz r0, 0x24(r30) +/* 80087E28 00084D68 90 1F 00 10 */ stw r0, 0x10(r31) +/* 80087E2C 00084D6C 80 7E 00 24 */ lwz r3, 0x24(r30) +/* 80087E30 00084D70 38 03 00 01 */ addi r0, r3, 1 +/* 80087E34 00084D74 90 1E 00 24 */ stw r0, 0x24(r30) +/* 80087E38 00084D78 80 1E 00 24 */ lwz r0, 0x24(r30) +/* 80087E3C 00084D7C 28 00 01 00 */ cmplwi r0, 0x100 +/* 80087E40 00084D80 40 80 00 0C */ bge lbl_80087E4C +/* 80087E44 00084D84 38 00 01 00 */ li r0, 0x100 +/* 80087E48 00084D88 90 04 00 00 */ stw r0, 0(r4) +lbl_80087E4C: +/* 80087E4C 00084D8C 80 7D 00 00 */ lwz r3, 0(r29) +/* 80087E50 00084D90 38 03 00 01 */ addi r0, r3, 1 +/* 80087E54 00084D94 90 1D 00 00 */ stw r0, 0(r29) +lbl_80087E58: +/* 80087E58 00084D98 3C 60 80 3F */ lis r3, gTRKEventQueue@ha +/* 80087E5C 00084D9C 38 63 90 E0 */ addi r3, r3, gTRKEventQueue@l +/* 80087E60 00084DA0 48 00 23 FD */ bl TRKReleaseMutex +/* 80087E64 00084DA4 7F 83 E3 78 */ mr r3, r28 +/* 80087E68 00084DA8 83 E1 00 14 */ lwz r31, 0x14(r1) +/* 80087E6C 00084DAC 83 C1 00 10 */ lwz r30, 0x10(r1) +/* 80087E70 00084DB0 83 A1 00 0C */ lwz r29, 0xc(r1) +/* 80087E74 00084DB4 83 81 00 08 */ lwz r28, 8(r1) +/* 80087E78 00084DB8 38 21 00 18 */ addi r1, r1, 0x18 +/* 80087E7C 00084DBC 80 01 00 04 */ lwz r0, 4(r1) +/* 80087E80 00084DC0 7C 08 03 A6 */ mtlr r0 +/* 80087E84 00084DC4 4E 80 00 20 */ blr + +.global TRKConstructEvent +TRKConstructEvent: +/* 80087E88 00084DC8 98 83 00 00 */ stb r4, 0(r3) +/* 80087E8C 00084DCC 38 80 00 00 */ li r4, 0 +/* 80087E90 00084DD0 38 00 FF FF */ li r0, -1 +/* 80087E94 00084DD4 90 83 00 04 */ stw r4, 4(r3) +/* 80087E98 00084DD8 90 03 00 08 */ stw r0, 8(r3) +/* 80087E9C 00084DDC 4E 80 00 20 */ blr + +.global TRKDestructEvent +TRKDestructEvent: +/* 80087EA0 00084DE0 7C 08 02 A6 */ mflr r0 +/* 80087EA4 00084DE4 90 01 00 04 */ stw r0, 4(r1) +/* 80087EA8 00084DE8 94 21 FF F8 */ stwu r1, -8(r1) +/* 80087EAC 00084DEC 80 63 00 08 */ lwz r3, 8(r3) +/* 80087EB0 00084DF0 48 00 03 19 */ bl TRKReleaseBuffer +/* 80087EB4 00084DF4 38 21 00 08 */ addi r1, r1, 8 +/* 80087EB8 00084DF8 80 01 00 04 */ lwz r0, 4(r1) +/* 80087EBC 00084DFC 7C 08 03 A6 */ mtlr r0 +/* 80087EC0 00084E00 4E 80 00 20 */ blr + +.section .bss, "wa" # 0x803E6000 - 0x80408AC0 +.global gTRKEventQueue +gTRKEventQueue: + .skip 0x28 diff --git a/asm/TRK_MINNOW_DOLPHIN/nubinit.s b/asm/TRK_MINNOW_DOLPHIN/nubinit.s new file mode 100644 index 0000000..38c1598 --- /dev/null +++ b/asm/TRK_MINNOW_DOLPHIN/nubinit.s @@ -0,0 +1,136 @@ +.include "macros.inc" + +.section .text, "ax" # 0x80005600 - 0x8036FBA0 +.global TRKInitializeNub +TRKInitializeNub: +/* 80087EC4 00084E04 7C 08 02 A6 */ mflr r0 +/* 80087EC8 00084E08 90 01 00 04 */ stw r0, 4(r1) +/* 80087ECC 00084E0C 94 21 FF F0 */ stwu r1, -0x10(r1) +/* 80087ED0 00084E10 93 E1 00 0C */ stw r31, 0xc(r1) +/* 80087ED4 00084E14 93 C1 00 08 */ stw r30, 8(r1) +/* 80087ED8 00084E18 48 00 01 0D */ bl TRKInitializeEndian +/* 80087EDC 00084E1C 7C 7E 1B 79 */ or. r30, r3, r3 +/* 80087EE0 00084E20 40 82 00 08 */ bne lbl_80087EE8 +/* 80087EE4 00084E24 48 00 0B AD */ bl usr_put_initialize +lbl_80087EE8: +/* 80087EE8 00084E28 2C 1E 00 00 */ cmpwi r30, 0 +/* 80087EEC 00084E2C 40 82 00 0C */ bne lbl_80087EF8 +/* 80087EF0 00084E30 4B FF FD 79 */ bl TRKInitializeEventQueue +/* 80087EF4 00084E34 7C 7E 1B 78 */ mr r30, r3 +lbl_80087EF8: +/* 80087EF8 00084E38 2C 1E 00 00 */ cmpwi r30, 0 +/* 80087EFC 00084E3C 40 82 00 0C */ bne lbl_80087F08 +/* 80087F00 00084E40 48 00 01 89 */ bl TRKInitializeMessageBuffers +/* 80087F04 00084E44 7C 7E 1B 78 */ mr r30, r3 +lbl_80087F08: +/* 80087F08 00084E48 2C 1E 00 00 */ cmpwi r30, 0 +/* 80087F0C 00084E4C 40 82 00 0C */ bne lbl_80087F18 +/* 80087F10 00084E50 48 00 0B 85 */ bl TRKInitializeDispatcher +/* 80087F14 00084E54 7C 7E 1B 78 */ mr r30, r3 +lbl_80087F18: +/* 80087F18 00084E58 2C 1E 00 00 */ cmpwi r30, 0 +/* 80087F1C 00084E5C 40 82 00 40 */ bne lbl_80087F5C +/* 80087F20 00084E60 3C 60 80 3F */ lis r3, gTRKInputPendingPtr@ha +/* 80087F24 00084E64 3B E3 AA D4 */ addi r31, r3, gTRKInputPendingPtr@l +/* 80087F28 00084E68 3C 60 00 01 */ lis r3, 0x0000E100@ha +/* 80087F2C 00084E6C 38 DF 00 00 */ addi r6, r31, 0 +/* 80087F30 00084E70 38 63 E1 00 */ addi r3, r3, 0x0000E100@l +/* 80087F34 00084E74 38 80 00 01 */ li r4, 1 +/* 80087F38 00084E78 38 A0 00 00 */ li r5, 0 +/* 80087F3C 00084E7C 48 00 42 85 */ bl TRKInitializeIntDrivenUART +/* 80087F40 00084E80 7C 60 1B 78 */ mr r0, r3 +/* 80087F44 00084E84 80 7F 00 00 */ lwz r3, 0(r31) +/* 80087F48 00084E88 7C 1F 03 78 */ mr r31, r0 +/* 80087F4C 00084E8C 48 00 3A B9 */ bl TRKTargetSetInputPendingPtr +/* 80087F50 00084E90 2C 1F 00 00 */ cmpwi r31, 0 +/* 80087F54 00084E94 41 82 00 08 */ beq lbl_80087F5C +/* 80087F58 00084E98 7F FE FB 78 */ mr r30, r31 +lbl_80087F5C: +/* 80087F5C 00084E9C 2C 1E 00 00 */ cmpwi r30, 0 +/* 80087F60 00084EA0 40 82 00 0C */ bne lbl_80087F6C +/* 80087F64 00084EA4 48 00 0B 01 */ bl TRKInitializeSerialHandler +/* 80087F68 00084EA8 7C 7E 1B 78 */ mr r30, r3 +lbl_80087F6C: +/* 80087F6C 00084EAC 2C 1E 00 00 */ cmpwi r30, 0 +/* 80087F70 00084EB0 40 82 00 0C */ bne lbl_80087F7C +/* 80087F74 00084EB4 48 00 3C 91 */ bl TRKInitializeTarget +/* 80087F78 00084EB8 7C 7E 1B 78 */ mr r30, r3 +lbl_80087F7C: +/* 80087F7C 00084EBC 7F C3 F3 78 */ mr r3, r30 +/* 80087F80 00084EC0 83 E1 00 0C */ lwz r31, 0xc(r1) +/* 80087F84 00084EC4 83 C1 00 08 */ lwz r30, 8(r1) +/* 80087F88 00084EC8 38 21 00 10 */ addi r1, r1, 0x10 +/* 80087F8C 00084ECC 80 01 00 04 */ lwz r0, 4(r1) +/* 80087F90 00084ED0 7C 08 03 A6 */ mtlr r0 +/* 80087F94 00084ED4 4E 80 00 20 */ blr + +.global TRKTerminateNub +TRKTerminateNub: +/* 80087F98 00084ED8 7C 08 02 A6 */ mflr r0 +/* 80087F9C 00084EDC 90 01 00 04 */ stw r0, 4(r1) +/* 80087FA0 00084EE0 94 21 FF F8 */ stwu r1, -8(r1) +/* 80087FA4 00084EE4 48 00 0A E5 */ bl TRKTerminateSerialHandler +/* 80087FA8 00084EE8 38 60 00 00 */ li r3, 0 +/* 80087FAC 00084EEC 38 21 00 08 */ addi r1, r1, 8 +/* 80087FB0 00084EF0 80 01 00 04 */ lwz r0, 4(r1) +/* 80087FB4 00084EF4 7C 08 03 A6 */ mtlr r0 +/* 80087FB8 00084EF8 4E 80 00 20 */ blr + +.global TRKNubWelcome +TRKNubWelcome: +/* 80087FBC 00084EFC 7C 08 02 A6 */ mflr r0 +/* 80087FC0 00084F00 3C 60 80 37 */ lis r3, "@40"@ha +/* 80087FC4 00084F04 90 01 00 04 */ stw r0, 4(r1) +/* 80087FC8 00084F08 38 63 21 F0 */ addi r3, r3, "@40"@l +/* 80087FCC 00084F0C 94 21 FF F8 */ stwu r1, -8(r1) +/* 80087FD0 00084F10 48 00 43 79 */ bl TRK_board_display +/* 80087FD4 00084F14 38 21 00 08 */ addi r1, r1, 8 +/* 80087FD8 00084F18 80 01 00 04 */ lwz r0, 4(r1) +/* 80087FDC 00084F1C 7C 08 03 A6 */ mtlr r0 +/* 80087FE0 00084F20 4E 80 00 20 */ blr + +.global TRKInitializeEndian +TRKInitializeEndian: +/* 80087FE4 00084F24 3C 60 80 3F */ lis r3, gTRKBigEndian@ha +/* 80087FE8 00084F28 94 21 FF F0 */ stwu r1, -0x10(r1) +/* 80087FEC 00084F2C 38 A3 91 08 */ addi r5, r3, gTRKBigEndian@l +/* 80087FF0 00084F30 38 C0 00 01 */ li r6, 1 +/* 80087FF4 00084F34 90 C5 00 00 */ stw r6, 0(r5) +/* 80087FF8 00084F38 38 00 00 12 */ li r0, 0x12 +/* 80087FFC 00084F3C 38 60 00 34 */ li r3, 0x34 +/* 80088000 00084F40 98 01 00 08 */ stb r0, 8(r1) +/* 80088004 00084F44 38 80 00 56 */ li r4, 0x56 +/* 80088008 00084F48 38 00 00 78 */ li r0, 0x78 +/* 8008800C 00084F4C 98 61 00 09 */ stb r3, 9(r1) +/* 80088010 00084F50 38 60 00 00 */ li r3, 0 +/* 80088014 00084F54 98 81 00 0A */ stb r4, 0xa(r1) +/* 80088018 00084F58 98 01 00 0B */ stb r0, 0xb(r1) +/* 8008801C 00084F5C 80 81 00 08 */ lwz r4, 8(r1) +/* 80088020 00084F60 3C 04 ED CC */ addis r0, r4, 0xedcc +/* 80088024 00084F64 28 00 56 78 */ cmplwi r0, 0x5678 +/* 80088028 00084F68 40 82 00 0C */ bne lbl_80088034 +/* 8008802C 00084F6C 90 C5 00 00 */ stw r6, 0(r5) +/* 80088030 00084F70 48 00 00 20 */ b lbl_80088050 +lbl_80088034: +/* 80088034 00084F74 3C 04 87 AA */ addis r0, r4, 0x87aa +/* 80088038 00084F78 28 00 34 12 */ cmplwi r0, 0x3412 +/* 8008803C 00084F7C 40 82 00 10 */ bne lbl_8008804C +/* 80088040 00084F80 38 00 00 00 */ li r0, 0 +/* 80088044 00084F84 90 05 00 00 */ stw r0, 0(r5) +/* 80088048 00084F88 48 00 00 08 */ b lbl_80088050 +lbl_8008804C: +/* 8008804C 00084F8C 38 60 00 01 */ li r3, 1 +lbl_80088050: +/* 80088050 00084F90 38 21 00 10 */ addi r1, r1, 0x10 +/* 80088054 00084F94 4E 80 00 20 */ blr + +.section .rodata, "a" # 0x8036FFA0 - 0x803A8380 +.balign 8 +"@40": + .asciz "MetroTRK for Dolphin v0.8" +.balign 8 + +.section .bss, "wa" # 0x803E6000 - 0x80408AC0 +.global gTRKBigEndian +gTRKBigEndian: + .skip 0x8 diff --git a/asm/TRK_MINNOW_DOLPHIN/serpoll.s b/asm/TRK_MINNOW_DOLPHIN/serpoll.s new file mode 100644 index 0000000..9025e26 --- /dev/null +++ b/asm/TRK_MINNOW_DOLPHIN/serpoll.s @@ -0,0 +1,149 @@ +.include "macros.inc" + +.section .text, "ax" # 0x80005600 - 0x8036FBA0 +.global TRKTestForPacket +TRKTestForPacket: +/* 800888C8 00085808 7C 08 02 A6 */ mflr r0 +/* 800888CC 0008580C 90 01 00 04 */ stw r0, 4(r1) +/* 800888D0 00085810 94 21 FF E8 */ stwu r1, -0x18(r1) +/* 800888D4 00085814 93 E1 00 14 */ stw r31, 0x14(r1) +/* 800888D8 00085818 93 C1 00 10 */ stw r30, 0x10(r1) +/* 800888DC 0008581C 48 00 39 55 */ bl TRKPollUART +/* 800888E0 00085820 7C 7E 1B 79 */ or. r30, r3, r3 +/* 800888E4 00085824 40 81 00 88 */ ble lbl_8008896C +/* 800888E8 00085828 38 61 00 08 */ addi r3, r1, 8 +/* 800888EC 0008582C 38 81 00 0C */ addi r4, r1, 0xc +/* 800888F0 00085830 4B FF F8 11 */ bl TRKGetFreeBuffer +/* 800888F4 00085834 2C 1E 08 80 */ cmpwi r30, 0x880 +/* 800888F8 00085838 40 81 00 4C */ ble lbl_80088944 +/* 800888FC 0008583C 48 00 00 2C */ b lbl_80088928 +lbl_80088900: +/* 80088900 00085840 2C 1E 08 80 */ cmpwi r30, 0x880 +/* 80088904 00085844 40 81 00 0C */ ble lbl_80088910 +/* 80088908 00085848 3B E0 08 80 */ li r31, 0x880 +/* 8008890C 0008584C 48 00 00 08 */ b lbl_80088914 +lbl_80088910: +/* 80088910 00085850 7F DF F3 78 */ mr r31, r30 +lbl_80088914: +/* 80088914 00085854 80 61 00 0C */ lwz r3, 0xc(r1) +/* 80088918 00085858 38 9F 00 00 */ addi r4, r31, 0 +/* 8008891C 0008585C 38 63 00 10 */ addi r3, r3, 0x10 +/* 80088920 00085860 48 00 39 41 */ bl TRKReadUARTN +/* 80088924 00085864 7F DF F0 50 */ subf r30, r31, r30 +lbl_80088928: +/* 80088928 00085868 2C 1E 00 00 */ cmpwi r30, 0 +/* 8008892C 0008586C 41 81 FF D4 */ bgt lbl_80088900 +/* 80088930 00085870 80 61 00 0C */ lwz r3, 0xc(r1) +/* 80088934 00085874 38 80 00 FF */ li r4, 0xff +/* 80088938 00085878 38 A0 00 06 */ li r5, 6 +/* 8008893C 0008587C 48 00 02 D9 */ bl TRKStandardACK +/* 80088940 00085880 48 00 00 2C */ b lbl_8008896C +lbl_80088944: +/* 80088944 00085884 80 61 00 0C */ lwz r3, 0xc(r1) +/* 80088948 00085888 38 9E 00 00 */ addi r4, r30, 0 +/* 8008894C 0008588C 38 63 00 10 */ addi r3, r3, 0x10 +/* 80088950 00085890 48 00 39 11 */ bl TRKReadUARTN +/* 80088954 00085894 2C 03 00 00 */ cmpwi r3, 0 +/* 80088958 00085898 40 82 00 14 */ bne lbl_8008896C +/* 8008895C 0008589C 80 61 00 0C */ lwz r3, 0xc(r1) +/* 80088960 000858A0 93 C3 00 08 */ stw r30, 8(r3) +/* 80088964 000858A4 80 61 00 08 */ lwz r3, 8(r1) +/* 80088968 000858A8 48 00 00 18 */ b lbl_80088980 +lbl_8008896C: +/* 8008896C 000858AC 80 61 00 08 */ lwz r3, 8(r1) +/* 80088970 000858B0 2C 03 FF FF */ cmpwi r3, -1 +/* 80088974 000858B4 41 82 00 08 */ beq lbl_8008897C +/* 80088978 000858B8 4B FF F8 51 */ bl TRKReleaseBuffer +lbl_8008897C: +/* 8008897C 000858BC 38 60 FF FF */ li r3, -1 +lbl_80088980: +/* 80088980 000858C0 83 E1 00 14 */ lwz r31, 0x14(r1) +/* 80088984 000858C4 83 C1 00 10 */ lwz r30, 0x10(r1) +/* 80088988 000858C8 38 21 00 18 */ addi r1, r1, 0x18 +/* 8008898C 000858CC 80 01 00 04 */ lwz r0, 4(r1) +/* 80088990 000858D0 7C 08 03 A6 */ mtlr r0 +/* 80088994 000858D4 4E 80 00 20 */ blr + +.global TRKGetInput +TRKGetInput: +/* 80088998 000858D8 7C 08 02 A6 */ mflr r0 +/* 8008899C 000858DC 90 01 00 04 */ stw r0, 4(r1) +/* 800889A0 000858E0 94 21 FF E8 */ stwu r1, -0x18(r1) +/* 800889A4 000858E4 93 E1 00 14 */ stw r31, 0x14(r1) +/* 800889A8 000858E8 93 C1 00 10 */ stw r30, 0x10(r1) +/* 800889AC 000858EC 4B FF FF 1D */ bl TRKTestForPacket +/* 800889B0 000858F0 3B C3 00 00 */ addi r30, r3, 0 +/* 800889B4 000858F4 2C 1E FF FF */ cmpwi r30, -1 +/* 800889B8 000858F8 41 82 00 44 */ beq lbl_800889FC +/* 800889BC 000858FC 7F C3 F3 78 */ mr r3, r30 +/* 800889C0 00085900 4B FF F7 DD */ bl TRKGetBuffer +/* 800889C4 00085904 3B E3 00 00 */ addi r31, r3, 0 +/* 800889C8 00085908 38 80 00 00 */ li r4, 0 +/* 800889CC 0008590C 4B FF F8 A5 */ bl TRKSetBufferPosition +/* 800889D0 00085910 38 7F 00 00 */ addi r3, r31, 0 +/* 800889D4 00085914 38 81 00 08 */ addi r4, r1, 8 +/* 800889D8 00085918 4B FF FC 1D */ bl TRKReadBuffer1_ui8 +/* 800889DC 0008591C 88 01 00 08 */ lbz r0, 8(r1) +/* 800889E0 00085920 28 00 00 80 */ cmplwi r0, 0x80 +/* 800889E4 00085924 40 80 00 10 */ bge lbl_800889F4 +/* 800889E8 00085928 7F C3 F3 78 */ mr r3, r30 +/* 800889EC 0008592C 48 00 00 29 */ bl TRKProcessInput +/* 800889F0 00085930 48 00 00 0C */ b lbl_800889FC +lbl_800889F4: +/* 800889F4 00085934 7F C3 F3 78 */ mr r3, r30 +/* 800889F8 00085938 4B FF F7 D1 */ bl TRKReleaseBuffer +lbl_800889FC: +/* 800889FC 0008593C 83 E1 00 14 */ lwz r31, 0x14(r1) +/* 80088A00 00085940 83 C1 00 10 */ lwz r30, 0x10(r1) +/* 80088A04 00085944 38 21 00 18 */ addi r1, r1, 0x18 +/* 80088A08 00085948 80 01 00 04 */ lwz r0, 4(r1) +/* 80088A0C 0008594C 7C 08 03 A6 */ mtlr r0 +/* 80088A10 00085950 4E 80 00 20 */ blr + +.global TRKProcessInput +TRKProcessInput: +/* 80088A14 00085954 7C 08 02 A6 */ mflr r0 +/* 80088A18 00085958 38 80 00 02 */ li r4, 2 +/* 80088A1C 0008595C 90 01 00 04 */ stw r0, 4(r1) +/* 80088A20 00085960 94 21 FF E8 */ stwu r1, -0x18(r1) +/* 80088A24 00085964 93 E1 00 14 */ stw r31, 0x14(r1) +/* 80088A28 00085968 3B E3 00 00 */ addi r31, r3, 0 +/* 80088A2C 0008596C 38 61 00 08 */ addi r3, r1, 8 +/* 80088A30 00085970 4B FF F4 59 */ bl TRKConstructEvent +/* 80088A34 00085974 3C 60 80 3F */ lis r3, gTRKFramingState@ha +/* 80088A38 00085978 93 E1 00 10 */ stw r31, 0x10(r1) +/* 80088A3C 0008597C 38 83 AA C0 */ addi r4, r3, gTRKFramingState@l +/* 80088A40 00085980 38 61 00 08 */ addi r3, r1, 8 +/* 80088A44 00085984 38 00 FF FF */ li r0, -1 +/* 80088A48 00085988 90 04 00 00 */ stw r0, 0(r4) +/* 80088A4C 0008598C 4B FF F3 5D */ bl TRKPostEvent +/* 80088A50 00085990 83 E1 00 14 */ lwz r31, 0x14(r1) +/* 80088A54 00085994 38 21 00 18 */ addi r1, r1, 0x18 +/* 80088A58 00085998 80 01 00 04 */ lwz r0, 4(r1) +/* 80088A5C 0008599C 7C 08 03 A6 */ mtlr r0 +/* 80088A60 000859A0 4E 80 00 20 */ blr + +.global TRKInitializeSerialHandler +TRKInitializeSerialHandler: +/* 80088A64 000859A4 3C 60 80 3F */ lis r3, gTRKFramingState@ha +/* 80088A68 000859A8 38 83 AA C0 */ addi r4, r3, gTRKFramingState@l +/* 80088A6C 000859AC 38 00 FF FF */ li r0, -1 +/* 80088A70 000859B0 90 04 00 00 */ stw r0, 0(r4) +/* 80088A74 000859B4 38 00 00 00 */ li r0, 0 +/* 80088A78 000859B8 38 60 00 00 */ li r3, 0 +/* 80088A7C 000859BC 98 04 00 08 */ stb r0, 8(r4) +/* 80088A80 000859C0 90 04 00 0C */ stw r0, 0xc(r4) +/* 80088A84 000859C4 4E 80 00 20 */ blr + +.global TRKTerminateSerialHandler +TRKTerminateSerialHandler: +/* 80088A88 000859C8 38 60 00 00 */ li r3, 0 +/* 80088A8C 000859CC 4E 80 00 20 */ blr + +.section .bss, "wa" # 0x803E6000 - 0x80408AC0 +.global gTRKFramingState +gTRKFramingState: + .skip 0x14 +.global gTRKInputPendingPtr +gTRKInputPendingPtr: + .skip 0x4 diff --git a/asm/TRK_MINNOW_DOLPHIN/support.s b/asm/TRK_MINNOW_DOLPHIN/support.s new file mode 100644 index 0000000..fd15ef5 --- /dev/null +++ b/asm/TRK_MINNOW_DOLPHIN/support.s @@ -0,0 +1,337 @@ +.include "macros.inc" + +.section .text, "ax" # 0x80005600 - 0x8036FBA0 +.global TRKSuppAccessFile +TRKSuppAccessFile: +/* 80089DD0 00086D10 7C 08 02 A6 */ mflr r0 +/* 80089DD4 00086D14 90 01 00 04 */ stw r0, 4(r1) +/* 80089DD8 00086D18 94 21 FF B8 */ stwu r1, -0x48(r1) +/* 80089DDC 00086D1C BE A1 00 1C */ stmw r21, 0x1c(r1) +/* 80089DE0 00086D20 7C 9B 23 79 */ or. r27, r4, r4 +/* 80089DE4 00086D24 3B 23 00 00 */ addi r25, r3, 0 +/* 80089DE8 00086D28 3A E5 00 00 */ addi r23, r5, 0 +/* 80089DEC 00086D2C 3B 46 00 00 */ addi r26, r6, 0 +/* 80089DF0 00086D30 3A C7 00 00 */ addi r22, r7, 0 +/* 80089DF4 00086D34 3B C8 00 00 */ addi r30, r8, 0 +/* 80089DF8 00086D38 41 82 00 10 */ beq lbl_80089E08 +/* 80089DFC 00086D3C 80 17 00 00 */ lwz r0, 0(r23) +/* 80089E00 00086D40 28 00 00 00 */ cmplwi r0, 0 +/* 80089E04 00086D44 40 82 00 0C */ bne lbl_80089E10 +lbl_80089E08: +/* 80089E08 00086D48 38 60 00 02 */ li r3, 2 +/* 80089E0C 00086D4C 48 00 02 88 */ b lbl_8008A094 +lbl_80089E10: +/* 80089E10 00086D50 38 00 00 00 */ li r0, 0 +/* 80089E14 00086D54 98 1A 00 00 */ stb r0, 0(r26) +/* 80089E18 00086D58 3B 00 00 00 */ li r24, 0 +/* 80089E1C 00086D5C 3B 80 00 00 */ li r28, 0 +/* 80089E20 00086D60 3A A0 00 00 */ li r21, 0 +/* 80089E24 00086D64 48 00 02 40 */ b lbl_8008A064 +lbl_80089E28: +/* 80089E28 00086D68 7C 1C 18 50 */ subf r0, r28, r3 +/* 80089E2C 00086D6C 28 00 08 00 */ cmplwi r0, 0x800 +/* 80089E30 00086D70 40 81 00 0C */ ble lbl_80089E3C +/* 80089E34 00086D74 3B E0 08 00 */ li r31, 0x800 +/* 80089E38 00086D78 48 00 00 08 */ b lbl_80089E40 +lbl_80089E3C: +/* 80089E3C 00086D7C 7C 1F 03 78 */ mr r31, r0 +lbl_80089E40: +/* 80089E40 00086D80 38 61 00 0C */ addi r3, r1, 0xc +/* 80089E44 00086D84 38 81 00 10 */ addi r4, r1, 0x10 +/* 80089E48 00086D88 4B FF E2 B9 */ bl TRKGetFreeBuffer +/* 80089E4C 00086D8C 7C 75 1B 79 */ or. r21, r3, r3 +/* 80089E50 00086D90 40 82 00 58 */ bne lbl_80089EA8 +/* 80089E54 00086D94 80 E1 00 10 */ lwz r7, 0x10(r1) +/* 80089E58 00086D98 80 07 00 0C */ lwz r0, 0xc(r7) +/* 80089E5C 00086D9C 28 00 08 80 */ cmplwi r0, 0x880 +/* 80089E60 00086DA0 41 80 00 0C */ blt lbl_80089E6C +/* 80089E64 00086DA4 38 A0 03 01 */ li r5, 0x301 +/* 80089E68 00086DA8 48 00 00 3C */ b lbl_80089EA4 +lbl_80089E6C: +/* 80089E6C 00086DAC 2C 1E 00 00 */ cmpwi r30, 0 +/* 80089E70 00086DB0 41 82 00 0C */ beq lbl_80089E7C +/* 80089E74 00086DB4 38 C0 00 D1 */ li r6, 0xd1 +/* 80089E78 00086DB8 48 00 00 08 */ b lbl_80089E80 +lbl_80089E7C: +/* 80089E7C 00086DBC 38 C0 00 D0 */ li r6, 0xd0 +lbl_80089E80: +/* 80089E80 00086DC0 80 87 00 0C */ lwz r4, 0xc(r7) +/* 80089E84 00086DC4 38 A0 00 00 */ li r5, 0 +/* 80089E88 00086DC8 38 64 00 01 */ addi r3, r4, 1 +/* 80089E8C 00086DCC 38 04 00 10 */ addi r0, r4, 0x10 +/* 80089E90 00086DD0 90 67 00 0C */ stw r3, 0xc(r7) +/* 80089E94 00086DD4 7C C7 01 AE */ stbx r6, r7, r0 +/* 80089E98 00086DD8 80 67 00 08 */ lwz r3, 8(r7) +/* 80089E9C 00086DDC 38 03 00 01 */ addi r0, r3, 1 +/* 80089EA0 00086DE0 90 07 00 08 */ stw r0, 8(r7) +lbl_80089EA4: +/* 80089EA4 00086DE4 7C B5 2B 78 */ mr r21, r5 +lbl_80089EA8: +/* 80089EA8 00086DE8 2C 15 00 00 */ cmpwi r21, 0 +/* 80089EAC 00086DEC 40 82 00 14 */ bne lbl_80089EC0 +/* 80089EB0 00086DF0 80 61 00 10 */ lwz r3, 0x10(r1) +/* 80089EB4 00086DF4 7F 24 CB 78 */ mr r4, r25 +/* 80089EB8 00086DF8 4B FF E5 6D */ bl TRKAppendBuffer1_ui32 +/* 80089EBC 00086DFC 7C 75 1B 78 */ mr r21, r3 +lbl_80089EC0: +/* 80089EC0 00086E00 2C 15 00 00 */ cmpwi r21, 0 +/* 80089EC4 00086E04 40 82 00 14 */ bne lbl_80089ED8 +/* 80089EC8 00086E08 80 61 00 10 */ lwz r3, 0x10(r1) +/* 80089ECC 00086E0C 57 E4 04 3E */ clrlwi r4, r31, 0x10 +/* 80089ED0 00086E10 4B FF E5 01 */ bl TRKAppendBuffer1_ui16 +/* 80089ED4 00086E14 7C 75 1B 78 */ mr r21, r3 +lbl_80089ED8: +/* 80089ED8 00086E18 2C 1E 00 00 */ cmpwi r30, 0 +/* 80089EDC 00086E1C 40 82 00 20 */ bne lbl_80089EFC +/* 80089EE0 00086E20 2C 15 00 00 */ cmpwi r21, 0 +/* 80089EE4 00086E24 40 82 00 18 */ bne lbl_80089EFC +/* 80089EE8 00086E28 80 61 00 10 */ lwz r3, 0x10(r1) +/* 80089EEC 00086E2C 38 BF 00 00 */ addi r5, r31, 0 +/* 80089EF0 00086E30 7C 9B E2 14 */ add r4, r27, r28 +/* 80089EF4 00086E34 4B FF E6 1D */ bl TRKAppendBuffer_ui8 +/* 80089EF8 00086E38 7C 75 1B 78 */ mr r21, r3 +lbl_80089EFC: +/* 80089EFC 00086E3C 2C 15 00 00 */ cmpwi r21, 0 +/* 80089F00 00086E40 40 82 01 58 */ bne lbl_8008A058 +/* 80089F04 00086E44 2C 16 00 00 */ cmpwi r22, 0 +/* 80089F08 00086E48 41 82 01 44 */ beq lbl_8008A04C +/* 80089F0C 00086E4C 38 00 00 00 */ li r0, 0 +/* 80089F10 00086E50 2C 1E 00 00 */ cmpwi r30, 0 +/* 80089F14 00086E54 B0 01 00 0A */ sth r0, 0xa(r1) +/* 80089F18 00086E58 98 01 00 08 */ stb r0, 8(r1) +/* 80089F1C 00086E5C 41 82 00 10 */ beq lbl_80089F2C +/* 80089F20 00086E60 28 19 00 00 */ cmplwi r25, 0 +/* 80089F24 00086E64 40 82 00 08 */ bne lbl_80089F2C +/* 80089F28 00086E68 38 00 00 01 */ li r0, 1 +lbl_80089F2C: +/* 80089F2C 00086E6C 2C 1E 00 00 */ cmpwi r30, 0 +/* 80089F30 00086E70 41 82 00 0C */ beq lbl_80089F3C +/* 80089F34 00086E74 38 A0 00 05 */ li r5, 5 +/* 80089F38 00086E78 48 00 00 08 */ b lbl_80089F40 +lbl_80089F3C: +/* 80089F3C 00086E7C 38 A0 00 05 */ li r5, 5 +lbl_80089F40: +/* 80089F40 00086E80 7C 00 00 34 */ cntlzw r0, r0 +/* 80089F44 00086E84 80 61 00 10 */ lwz r3, 0x10(r1) +/* 80089F48 00086E88 54 07 D9 7E */ srwi r7, r0, 5 +/* 80089F4C 00086E8C 38 81 00 14 */ addi r4, r1, 0x14 +/* 80089F50 00086E90 38 C0 00 03 */ li r6, 3 +/* 80089F54 00086E94 48 00 01 55 */ bl TRKRequestSend +/* 80089F58 00086E98 7C 75 1B 79 */ or. r21, r3, r3 +/* 80089F5C 00086E9C 40 82 00 18 */ bne lbl_80089F74 +/* 80089F60 00086EA0 80 61 00 14 */ lwz r3, 0x14(r1) +/* 80089F64 00086EA4 4B FF E2 39 */ bl TRKGetBuffer +/* 80089F68 00086EA8 3B A3 00 00 */ addi r29, r3, 0 +/* 80089F6C 00086EAC 38 80 00 02 */ li r4, 2 +/* 80089F70 00086EB0 4B FF E3 01 */ bl TRKSetBufferPosition +lbl_80089F74: +/* 80089F74 00086EB4 2C 15 00 00 */ cmpwi r21, 0 +/* 80089F78 00086EB8 40 82 00 14 */ bne lbl_80089F8C +/* 80089F7C 00086EBC 38 7D 00 00 */ addi r3, r29, 0 +/* 80089F80 00086EC0 38 81 00 08 */ addi r4, r1, 8 +/* 80089F84 00086EC4 4B FF E6 71 */ bl TRKReadBuffer1_ui8 +/* 80089F88 00086EC8 7C 75 1B 78 */ mr r21, r3 +lbl_80089F8C: +/* 80089F8C 00086ECC 2C 15 00 00 */ cmpwi r21, 0 +/* 80089F90 00086ED0 40 82 00 14 */ bne lbl_80089FA4 +/* 80089F94 00086ED4 38 7D 00 00 */ addi r3, r29, 0 +/* 80089F98 00086ED8 38 81 00 0A */ addi r4, r1, 0xa +/* 80089F9C 00086EDC 4B FF E6 7D */ bl TRKReadBuffer1_ui16 +/* 80089FA0 00086EE0 7C 75 1B 78 */ mr r21, r3 +lbl_80089FA4: +/* 80089FA4 00086EE4 2C 1E 00 00 */ cmpwi r30, 0 +/* 80089FA8 00086EE8 41 82 00 58 */ beq lbl_8008A000 +/* 80089FAC 00086EEC 2C 15 00 00 */ cmpwi r21, 0 +/* 80089FB0 00086EF0 40 82 00 50 */ bne lbl_8008A000 +/* 80089FB4 00086EF4 A0 61 00 0A */ lhz r3, 0xa(r1) +/* 80089FB8 00086EF8 80 9D 00 08 */ lwz r4, 8(r29) +/* 80089FBC 00086EFC 38 03 00 05 */ addi r0, r3, 5 +/* 80089FC0 00086F00 7C 04 00 40 */ cmplw r4, r0 +/* 80089FC4 00086F04 41 82 00 20 */ beq lbl_80089FE4 +/* 80089FC8 00086F08 88 01 00 08 */ lbz r0, 8(r1) +/* 80089FCC 00086F0C 38 64 FF FB */ addi r3, r4, -5 +/* 80089FD0 00086F10 B0 61 00 0A */ sth r3, 0xa(r1) +/* 80089FD4 00086F14 28 00 00 00 */ cmplwi r0, 0 +/* 80089FD8 00086F18 40 82 00 0C */ bne lbl_80089FE4 +/* 80089FDC 00086F1C 38 00 00 01 */ li r0, 1 +/* 80089FE0 00086F20 98 01 00 08 */ stb r0, 8(r1) +lbl_80089FE4: +/* 80089FE4 00086F24 A0 A1 00 0A */ lhz r5, 0xa(r1) +/* 80089FE8 00086F28 7C 05 F8 40 */ cmplw r5, r31 +/* 80089FEC 00086F2C 41 81 00 14 */ bgt lbl_8008A000 +/* 80089FF0 00086F30 38 7D 00 00 */ addi r3, r29, 0 +/* 80089FF4 00086F34 7C 9B E2 14 */ add r4, r27, r28 +/* 80089FF8 00086F38 4B FF E7 E1 */ bl TRKReadBuffer_ui8 +/* 80089FFC 00086F3C 7C 75 1B 78 */ mr r21, r3 +lbl_8008A000: +/* 8008A000 00086F40 A0 61 00 0A */ lhz r3, 0xa(r1) +/* 8008A004 00086F44 7C 03 F8 40 */ cmplw r3, r31 +/* 8008A008 00086F48 41 82 00 30 */ beq lbl_8008A038 +/* 8008A00C 00086F4C 2C 1E 00 00 */ cmpwi r30, 0 +/* 8008A010 00086F50 41 82 00 0C */ beq lbl_8008A01C +/* 8008A014 00086F54 7C 03 F8 40 */ cmplw r3, r31 +/* 8008A018 00086F58 41 80 00 18 */ blt lbl_8008A030 +lbl_8008A01C: +/* 8008A01C 00086F5C 88 01 00 08 */ lbz r0, 8(r1) +/* 8008A020 00086F60 28 00 00 00 */ cmplwi r0, 0 +/* 8008A024 00086F64 40 82 00 0C */ bne lbl_8008A030 +/* 8008A028 00086F68 38 00 00 01 */ li r0, 1 +/* 8008A02C 00086F6C 98 01 00 08 */ stb r0, 8(r1) +lbl_8008A030: +/* 8008A030 00086F70 3B E3 00 00 */ addi r31, r3, 0 +/* 8008A034 00086F74 3B 00 00 01 */ li r24, 1 +lbl_8008A038: +/* 8008A038 00086F78 88 01 00 08 */ lbz r0, 8(r1) +/* 8008A03C 00086F7C 98 1A 00 00 */ stb r0, 0(r26) +/* 8008A040 00086F80 80 61 00 14 */ lwz r3, 0x14(r1) +/* 8008A044 00086F84 4B FF E1 85 */ bl TRKReleaseBuffer +/* 8008A048 00086F88 48 00 00 10 */ b lbl_8008A058 +lbl_8008A04C: +/* 8008A04C 00086F8C 80 61 00 10 */ lwz r3, 0x10(r1) +/* 8008A050 00086F90 4B FF E0 09 */ bl TRKMessageSend +/* 8008A054 00086F94 7C 75 1B 78 */ mr r21, r3 +lbl_8008A058: +/* 8008A058 00086F98 80 61 00 0C */ lwz r3, 0xc(r1) +/* 8008A05C 00086F9C 4B FF E1 6D */ bl TRKReleaseBuffer +/* 8008A060 00086FA0 7F 9C FA 14 */ add r28, r28, r31 +lbl_8008A064: +/* 8008A064 00086FA4 2C 18 00 00 */ cmpwi r24, 0 +/* 8008A068 00086FA8 40 82 00 24 */ bne lbl_8008A08C +/* 8008A06C 00086FAC 80 77 00 00 */ lwz r3, 0(r23) +/* 8008A070 00086FB0 7C 1C 18 40 */ cmplw r28, r3 +/* 8008A074 00086FB4 40 80 00 18 */ bge lbl_8008A08C +/* 8008A078 00086FB8 2C 15 00 00 */ cmpwi r21, 0 +/* 8008A07C 00086FBC 40 82 00 10 */ bne lbl_8008A08C +/* 8008A080 00086FC0 88 1A 00 00 */ lbz r0, 0(r26) +/* 8008A084 00086FC4 28 00 00 00 */ cmplwi r0, 0 +/* 8008A088 00086FC8 41 82 FD A0 */ beq lbl_80089E28 +lbl_8008A08C: +/* 8008A08C 00086FCC 93 97 00 00 */ stw r28, 0(r23) +/* 8008A090 00086FD0 7E A3 AB 78 */ mr r3, r21 +lbl_8008A094: +/* 8008A094 00086FD4 BA A1 00 1C */ lmw r21, 0x1c(r1) +/* 8008A098 00086FD8 38 21 00 48 */ addi r1, r1, 0x48 +/* 8008A09C 00086FDC 80 01 00 04 */ lwz r0, 4(r1) +/* 8008A0A0 00086FE0 7C 08 03 A6 */ mtlr r0 +/* 8008A0A4 00086FE4 4E 80 00 20 */ blr + +.global TRKRequestSend +TRKRequestSend: +/* 8008A0A8 00086FE8 7C 08 02 A6 */ mflr r0 +/* 8008A0AC 00086FEC 90 01 00 04 */ stw r0, 4(r1) +/* 8008A0B0 00086FF0 38 00 FF FF */ li r0, -1 +/* 8008A0B4 00086FF4 94 21 FF C8 */ stwu r1, -0x38(r1) +/* 8008A0B8 00086FF8 BE C1 00 10 */ stmw r22, 0x10(r1) +/* 8008A0BC 00086FFC 3A E4 00 00 */ addi r23, r4, 0 +/* 8008A0C0 00087000 3C 80 04 C5 */ lis r4, 0x04C4B3EC@ha +/* 8008A0C4 00087004 3B 66 00 01 */ addi r27, r6, 1 +/* 8008A0C8 00087008 3A C3 00 00 */ addi r22, r3, 0 +/* 8008A0CC 0008700C 3B E4 B3 EC */ addi r31, r4, 0x04C4B3EC@l +/* 8008A0D0 00087010 3B 05 00 00 */ addi r24, r5, 0 +/* 8008A0D4 00087014 3B 27 00 00 */ addi r25, r7, 0 +/* 8008A0D8 00087018 3B C0 00 00 */ li r30, 0 +/* 8008A0DC 0008701C 3B 40 00 01 */ li r26, 1 +/* 8008A0E0 00087020 90 17 00 00 */ stw r0, 0(r23) +/* 8008A0E4 00087024 48 00 01 24 */ b lbl_8008A208 +lbl_8008A0E8: +/* 8008A0E8 00087028 7E C3 B3 78 */ mr r3, r22 +/* 8008A0EC 0008702C 4B FF DF 6D */ bl TRKMessageSend +/* 8008A0F0 00087030 7C 7E 1B 79 */ or. r30, r3, r3 +/* 8008A0F4 00087034 40 82 01 10 */ bne lbl_8008A204 +/* 8008A0F8 00087038 2C 19 00 00 */ cmpwi r25, 0 +/* 8008A0FC 0008703C 41 82 00 08 */ beq lbl_8008A104 +/* 8008A100 00087040 3B 80 00 00 */ li r28, 0 +lbl_8008A104: +/* 8008A104 00087044 4B FF E7 C5 */ bl TRKTestForPacket +/* 8008A108 00087048 90 77 00 00 */ stw r3, 0(r23) +/* 8008A10C 0008704C 80 77 00 00 */ lwz r3, 0(r23) +/* 8008A110 00087050 2C 03 FF FF */ cmpwi r3, -1 +/* 8008A114 00087054 40 82 00 18 */ bne lbl_8008A12C +/* 8008A118 00087058 2C 19 00 00 */ cmpwi r25, 0 +/* 8008A11C 0008705C 41 82 FF E8 */ beq lbl_8008A104 +/* 8008A120 00087060 3B 9C 00 01 */ addi r28, r28, 1 +/* 8008A124 00087064 7C 1C F8 40 */ cmplw r28, r31 +/* 8008A128 00087068 41 80 FF DC */ blt lbl_8008A104 +lbl_8008A12C: +/* 8008A12C 0008706C 2C 03 FF FF */ cmpwi r3, -1 +/* 8008A130 00087070 41 82 00 4C */ beq lbl_8008A17C +/* 8008A134 00087074 3B 40 00 00 */ li r26, 0 +/* 8008A138 00087078 4B FF E0 65 */ bl TRKGetBuffer +/* 8008A13C 0008707C 3B A3 00 00 */ addi r29, r3, 0 +/* 8008A140 00087080 38 80 00 00 */ li r4, 0 +/* 8008A144 00087084 4B FF E1 2D */ bl TRKSetBufferPosition +/* 8008A148 00087088 38 7D 00 00 */ addi r3, r29, 0 +/* 8008A14C 0008708C 38 81 00 08 */ addi r4, r1, 8 +/* 8008A150 00087090 4B FF E4 A5 */ bl TRKReadBuffer1_ui8 +/* 8008A154 00087094 7C 7E 1B 79 */ or. r30, r3, r3 +/* 8008A158 00087098 40 82 00 24 */ bne lbl_8008A17C +/* 8008A15C 0008709C 88 01 00 08 */ lbz r0, 8(r1) +/* 8008A160 000870A0 28 00 00 80 */ cmplwi r0, 0x80 +/* 8008A164 000870A4 40 80 00 18 */ bge lbl_8008A17C +/* 8008A168 000870A8 80 77 00 00 */ lwz r3, 0(r23) +/* 8008A16C 000870AC 4B FF E8 A9 */ bl TRKProcessInput +/* 8008A170 000870B0 38 00 FF FF */ li r0, -1 +/* 8008A174 000870B4 90 17 00 00 */ stw r0, 0(r23) +/* 8008A178 000870B8 4B FF FF 8C */ b lbl_8008A104 +lbl_8008A17C: +/* 8008A17C 000870BC 80 17 00 00 */ lwz r0, 0(r23) +/* 8008A180 000870C0 2C 00 FF FF */ cmpwi r0, -1 +/* 8008A184 000870C4 41 82 00 80 */ beq lbl_8008A204 +/* 8008A188 000870C8 80 1D 00 08 */ lwz r0, 8(r29) +/* 8008A18C 000870CC 7C 00 C0 40 */ cmplw r0, r24 +/* 8008A190 000870D0 40 80 00 08 */ bge lbl_8008A198 +/* 8008A194 000870D4 3B 40 00 01 */ li r26, 1 +lbl_8008A198: +/* 8008A198 000870D8 2C 1E 00 00 */ cmpwi r30, 0 +/* 8008A19C 000870DC 40 82 00 1C */ bne lbl_8008A1B8 +/* 8008A1A0 000870E0 2C 1A 00 00 */ cmpwi r26, 0 +/* 8008A1A4 000870E4 40 82 00 14 */ bne lbl_8008A1B8 +/* 8008A1A8 000870E8 38 7D 00 00 */ addi r3, r29, 0 +/* 8008A1AC 000870EC 38 81 00 09 */ addi r4, r1, 9 +/* 8008A1B0 000870F0 4B FF E4 45 */ bl TRKReadBuffer1_ui8 +/* 8008A1B4 000870F4 7C 7E 1B 78 */ mr r30, r3 +lbl_8008A1B8: +/* 8008A1B8 000870F8 2C 1E 00 00 */ cmpwi r30, 0 +/* 8008A1BC 000870FC 40 82 00 28 */ bne lbl_8008A1E4 +/* 8008A1C0 00087100 2C 1A 00 00 */ cmpwi r26, 0 +/* 8008A1C4 00087104 40 82 00 20 */ bne lbl_8008A1E4 +/* 8008A1C8 00087108 88 01 00 08 */ lbz r0, 8(r1) +/* 8008A1CC 0008710C 28 00 00 80 */ cmplwi r0, 0x80 +/* 8008A1D0 00087110 40 82 00 10 */ bne lbl_8008A1E0 +/* 8008A1D4 00087114 88 01 00 09 */ lbz r0, 9(r1) +/* 8008A1D8 00087118 28 00 00 00 */ cmplwi r0, 0 +/* 8008A1DC 0008711C 41 82 00 08 */ beq lbl_8008A1E4 +lbl_8008A1E0: +/* 8008A1E0 00087120 3B 40 00 01 */ li r26, 1 +lbl_8008A1E4: +/* 8008A1E4 00087124 2C 1E 00 00 */ cmpwi r30, 0 +/* 8008A1E8 00087128 40 82 00 0C */ bne lbl_8008A1F4 +/* 8008A1EC 0008712C 2C 1A 00 00 */ cmpwi r26, 0 +/* 8008A1F0 00087130 41 82 00 14 */ beq lbl_8008A204 +lbl_8008A1F4: +/* 8008A1F4 00087134 80 77 00 00 */ lwz r3, 0(r23) +/* 8008A1F8 00087138 4B FF DF D1 */ bl TRKReleaseBuffer +/* 8008A1FC 0008713C 38 00 FF FF */ li r0, -1 +/* 8008A200 00087140 90 17 00 00 */ stw r0, 0(r23) +lbl_8008A204: +/* 8008A204 00087144 3B 7B FF FF */ addi r27, r27, -1 +lbl_8008A208: +/* 8008A208 00087148 2C 1B 00 00 */ cmpwi r27, 0 +/* 8008A20C 0008714C 41 82 00 18 */ beq lbl_8008A224 +/* 8008A210 00087150 80 17 00 00 */ lwz r0, 0(r23) +/* 8008A214 00087154 2C 00 FF FF */ cmpwi r0, -1 +/* 8008A218 00087158 40 82 00 0C */ bne lbl_8008A224 +/* 8008A21C 0008715C 2C 1E 00 00 */ cmpwi r30, 0 +/* 8008A220 00087160 41 82 FE C8 */ beq lbl_8008A0E8 +lbl_8008A224: +/* 8008A224 00087164 80 17 00 00 */ lwz r0, 0(r23) +/* 8008A228 00087168 2C 00 FF FF */ cmpwi r0, -1 +/* 8008A22C 0008716C 40 82 00 08 */ bne lbl_8008A234 +/* 8008A230 00087170 3B C0 08 00 */ li r30, 0x800 +lbl_8008A234: +/* 8008A234 00087174 7F C3 F3 78 */ mr r3, r30 +/* 8008A238 00087178 BA C1 00 10 */ lmw r22, 0x10(r1) +/* 8008A23C 0008717C 38 21 00 38 */ addi r1, r1, 0x38 +/* 8008A240 00087180 80 01 00 04 */ lwz r0, 4(r1) +/* 8008A244 00087184 7C 08 03 A6 */ mtlr r0 +/* 8008A248 00087188 4E 80 00 20 */ blr diff --git a/asm/TRK_MINNOW_DOLPHIN/targcont.s b/asm/TRK_MINNOW_DOLPHIN/targcont.s new file mode 100644 index 0000000..ea84de0 --- /dev/null +++ b/asm/TRK_MINNOW_DOLPHIN/targcont.s @@ -0,0 +1,18 @@ +.include "macros.inc" + +.section .text, "ax" # 0x80005600 - 0x8036FBA0 +.global TRKTargetContinue +TRKTargetContinue: +/* 8008C36C 000892AC 7C 08 02 A6 */ mflr r0 +/* 8008C370 000892B0 38 60 00 00 */ li r3, 0 +/* 8008C374 000892B4 90 01 00 04 */ stw r0, 4(r1) +/* 8008C378 000892B8 94 21 FF F8 */ stwu r1, -8(r1) +/* 8008C37C 000892BC 4B FF F3 41 */ bl TRKTargetSetStopped +/* 8008C380 000892C0 4B FF FF 99 */ bl UnreserveEXI2Port +/* 8008C384 000892C4 4B FF ED 35 */ bl TRKSwapAndGo +/* 8008C388 000892C8 4B FF FF 61 */ bl ReserveEXI2Port +/* 8008C38C 000892CC 38 60 00 00 */ li r3, 0 +/* 8008C390 000892D0 38 21 00 08 */ addi r1, r1, 8 +/* 8008C394 000892D4 80 01 00 04 */ lwz r0, 4(r1) +/* 8008C398 000892D8 7C 08 03 A6 */ mtlr r0 +/* 8008C39C 000892DC 4E 80 00 20 */ blr diff --git a/asm/TRK_MINNOW_DOLPHIN/targimpl.s b/asm/TRK_MINNOW_DOLPHIN/targimpl.s new file mode 100644 index 0000000..ce5b958 --- /dev/null +++ b/asm/TRK_MINNOW_DOLPHIN/targimpl.s @@ -0,0 +1,1678 @@ +.include "macros.inc" + +.section .text, "ax" # 0x80005600 - 0x8036FBA0 +.global __TRK_get_MSR +__TRK_get_MSR: +/* 8008A438 00087378 7C 60 00 A6 */ mfmsr r3 +/* 8008A43C 0008737C 4E 80 00 20 */ blr + +.global __TRK_set_MSR +__TRK_set_MSR: +/* 8008A440 00087380 7C 60 01 24 */ mtmsr r3 +/* 8008A444 00087384 4E 80 00 20 */ blr + +.global TRKValidMemory32 +TRKValidMemory32: +/* 8008A448 00087388 7C 08 02 A6 */ mflr r0 +/* 8008A44C 0008738C 90 01 00 04 */ stw r0, 4(r1) +/* 8008A450 00087390 94 21 FF E8 */ stwu r1, -0x18(r1) +/* 8008A454 00087394 93 E1 00 14 */ stw r31, 0x14(r1) +/* 8008A458 00087398 93 C1 00 10 */ stw r30, 0x10(r1) +/* 8008A45C 0008739C 93 A1 00 0C */ stw r29, 0xc(r1) +/* 8008A460 000873A0 7C BE 2B 78 */ mr r30, r5 +/* 8008A464 000873A4 7F E4 1A 14 */ add r31, r4, r3 +/* 8008A468 000873A8 3B FF FF FF */ addi r31, r31, -1 +/* 8008A46C 000873AC 7C 1F 18 40 */ cmplw r31, r3 +/* 8008A470 000873B0 38 A0 07 00 */ li r5, 0x700 +/* 8008A474 000873B4 40 80 00 0C */ bge lbl_8008A480 +/* 8008A478 000873B8 38 60 07 00 */ li r3, 0x700 +/* 8008A47C 000873BC 48 00 00 E8 */ b lbl_8008A564 +lbl_8008A480: +/* 8008A480 000873C0 3C 80 80 37 */ lis r4, gTRKMemMap@ha +/* 8008A484 000873C4 38 84 22 10 */ addi r4, r4, gTRKMemMap@l +/* 8008A488 000873C8 38 C0 00 00 */ li r6, 0 +/* 8008A48C 000873CC 48 00 00 04 */ b lbl_8008A490 +lbl_8008A490: +/* 8008A490 000873D0 48 00 00 04 */ b lbl_8008A494 +lbl_8008A494: +/* 8008A494 000873D4 80 04 00 04 */ lwz r0, 4(r4) +/* 8008A498 000873D8 7C 03 00 40 */ cmplw r3, r0 +/* 8008A49C 000873DC 41 81 00 C4 */ bgt lbl_8008A560 +/* 8008A4A0 000873E0 80 04 00 00 */ lwz r0, 0(r4) +/* 8008A4A4 000873E4 7C 1F 00 40 */ cmplw r31, r0 +/* 8008A4A8 000873E8 41 80 00 B8 */ blt lbl_8008A560 +/* 8008A4AC 000873EC 57 C0 06 3E */ clrlwi r0, r30, 0x18 +/* 8008A4B0 000873F0 28 00 00 00 */ cmplwi r0, 0 +/* 8008A4B4 000873F4 40 82 00 18 */ bne lbl_8008A4CC +/* 8008A4B8 000873F8 54 C0 20 36 */ slwi r0, r6, 4 +/* 8008A4BC 000873FC 7C 84 02 14 */ add r4, r4, r0 +/* 8008A4C0 00087400 80 04 00 08 */ lwz r0, 8(r4) +/* 8008A4C4 00087404 2C 00 00 00 */ cmpwi r0, 0 +/* 8008A4C8 00087408 41 82 00 2C */ beq lbl_8008A4F4 +lbl_8008A4CC: +/* 8008A4CC 0008740C 57 C0 06 3E */ clrlwi r0, r30, 0x18 +/* 8008A4D0 00087410 28 00 00 01 */ cmplwi r0, 1 +/* 8008A4D4 00087414 40 82 00 28 */ bne lbl_8008A4FC +/* 8008A4D8 00087418 3C 80 80 37 */ lis r4, gTRKMemMap@ha +/* 8008A4DC 0008741C 38 84 22 10 */ addi r4, r4, gTRKMemMap@l +/* 8008A4E0 00087420 54 C0 20 36 */ slwi r0, r6, 4 +/* 8008A4E4 00087424 7C 84 02 14 */ add r4, r4, r0 +/* 8008A4E8 00087428 80 04 00 0C */ lwz r0, 0xc(r4) +/* 8008A4EC 0008742C 2C 00 00 00 */ cmpwi r0, 0 +/* 8008A4F0 00087430 40 82 00 0C */ bne lbl_8008A4FC +lbl_8008A4F4: +/* 8008A4F4 00087434 38 A0 07 00 */ li r5, 0x700 +/* 8008A4F8 00087438 48 00 00 68 */ b lbl_8008A560 +lbl_8008A4FC: +/* 8008A4FC 0008743C 3C 80 80 37 */ lis r4, gTRKMemMap@ha +/* 8008A500 00087440 54 DD 20 36 */ slwi r29, r6, 4 +/* 8008A504 00087444 38 04 22 10 */ addi r0, r4, gTRKMemMap@l +/* 8008A508 00087448 7C 80 EA 14 */ add r4, r0, r29 +/* 8008A50C 0008744C 80 04 00 00 */ lwz r0, 0(r4) +/* 8008A510 00087450 38 A0 00 00 */ li r5, 0 +/* 8008A514 00087454 7C 03 00 40 */ cmplw r3, r0 +/* 8008A518 00087458 40 80 00 14 */ bge lbl_8008A52C +/* 8008A51C 0008745C 7F C5 F3 78 */ mr r5, r30 +/* 8008A520 00087460 7C 83 00 50 */ subf r4, r3, r0 +/* 8008A524 00087464 4B FF FF 25 */ bl TRKValidMemory32 +/* 8008A528 00087468 7C 65 1B 78 */ mr r5, r3 +lbl_8008A52C: +/* 8008A52C 0008746C 2C 05 00 00 */ cmpwi r5, 0 +/* 8008A530 00087470 40 82 00 30 */ bne lbl_8008A560 +/* 8008A534 00087474 3C 60 80 37 */ lis r3, gTRKMemMap@ha +/* 8008A538 00087478 38 03 22 10 */ addi r0, r3, gTRKMemMap@l +/* 8008A53C 0008747C 7C 60 EA 14 */ add r3, r0, r29 +/* 8008A540 00087480 80 63 00 04 */ lwz r3, 4(r3) +/* 8008A544 00087484 7C 1F 18 40 */ cmplw r31, r3 +/* 8008A548 00087488 40 81 00 18 */ ble lbl_8008A560 +/* 8008A54C 0008748C 7F C5 F3 78 */ mr r5, r30 +/* 8008A550 00087490 7C 83 F8 50 */ subf r4, r3, r31 +/* 8008A554 00087494 4B FF FE F5 */ bl TRKValidMemory32 +/* 8008A558 00087498 7C 65 1B 78 */ mr r5, r3 +/* 8008A55C 0008749C 48 00 00 04 */ b lbl_8008A560 +lbl_8008A560: +/* 8008A560 000874A0 7C A3 2B 78 */ mr r3, r5 +lbl_8008A564: +/* 8008A564 000874A4 83 E1 00 14 */ lwz r31, 0x14(r1) +/* 8008A568 000874A8 83 C1 00 10 */ lwz r30, 0x10(r1) +/* 8008A56C 000874AC 83 A1 00 0C */ lwz r29, 0xc(r1) +/* 8008A570 000874B0 38 21 00 18 */ addi r1, r1, 0x18 +/* 8008A574 000874B4 80 01 00 04 */ lwz r0, 4(r1) +/* 8008A578 000874B8 7C 08 03 A6 */ mtlr r0 +/* 8008A57C 000874BC 4E 80 00 20 */ blr + +.global TRK_ppc_memcpy +TRK_ppc_memcpy: +/* 8008A580 000874C0 7D 00 00 A6 */ mfmsr r8 +/* 8008A584 000874C4 39 40 00 00 */ li r10, 0 +lbl_8008A588: +/* 8008A588 000874C8 7C 0A 28 00 */ cmpw r10, r5 +/* 8008A58C 000874CC 41 82 00 24 */ beq lbl_8008A5B0 +/* 8008A590 000874D0 7C E0 01 24 */ mtmsr r7 +/* 8008A594 000874D4 7C 00 04 AC */ sync 0 +/* 8008A598 000874D8 7D 2A 20 AE */ lbzx r9, r10, r4 +/* 8008A59C 000874DC 7C C0 01 24 */ mtmsr r6 +/* 8008A5A0 000874E0 7C 00 04 AC */ sync 0 +/* 8008A5A4 000874E4 7D 2A 19 AE */ stbx r9, r10, r3 +/* 8008A5A8 000874E8 39 4A 00 01 */ addi r10, r10, 1 +/* 8008A5AC 000874EC 4B FF FF DC */ b lbl_8008A588 +lbl_8008A5B0: +/* 8008A5B0 000874F0 7D 00 01 24 */ mtmsr r8 +/* 8008A5B4 000874F4 7C 00 04 AC */ sync 0 +/* 8008A5B8 000874F8 4E 80 00 20 */ blr + +.global TRKTargetAccessMemory +TRKTargetAccessMemory: +/* 8008A5BC 000874FC 7C 08 02 A6 */ mflr r0 +/* 8008A5C0 00087500 90 01 00 04 */ stw r0, 4(r1) +/* 8008A5C4 00087504 94 21 FF C8 */ stwu r1, -0x38(r1) +/* 8008A5C8 00087508 BF 21 00 1C */ stmw r25, 0x1c(r1) +/* 8008A5CC 0008750C 7C 7A 1B 78 */ mr r26, r3 +/* 8008A5D0 00087510 7C 9B 23 78 */ mr r27, r4 +/* 8008A5D4 00087514 7C BC 2B 78 */ mr r28, r5 +/* 8008A5D8 00087518 7C FD 3B 78 */ mr r29, r7 +/* 8008A5DC 0008751C 3C 60 80 3B */ lis r3, gTRKExceptionStatus@ha +/* 8008A5E0 00087520 38 A3 F0 24 */ addi r5, r3, gTRKExceptionStatus@l +/* 8008A5E4 00087524 80 85 00 00 */ lwz r4, 0(r5) +/* 8008A5E8 00087528 3B E5 00 0D */ addi r31, r5, 0xd +/* 8008A5EC 0008752C 80 05 00 04 */ lwz r0, 4(r5) +/* 8008A5F0 00087530 3B C0 00 00 */ li r30, 0 +/* 8008A5F4 00087534 7F 63 DB 78 */ mr r3, r27 +/* 8008A5F8 00087538 90 81 00 08 */ stw r4, 8(r1) +/* 8008A5FC 0008753C 90 01 00 0C */ stw r0, 0xc(r1) +/* 8008A600 00087540 80 85 00 08 */ lwz r4, 8(r5) +/* 8008A604 00087544 80 05 00 0C */ lwz r0, 0xc(r5) +/* 8008A608 00087548 90 81 00 10 */ stw r4, 0x10(r1) +/* 8008A60C 0008754C 90 01 00 14 */ stw r0, 0x14(r1) +/* 8008A610 00087550 9B DF 00 00 */ stb r30, 0(r31) +/* 8008A614 00087554 48 00 14 B5 */ bl TRKTargetTranslate +/* 8008A618 00087558 2C 1D 00 00 */ cmpwi r29, 0 +/* 8008A61C 0008755C 7C 79 1B 78 */ mr r25, r3 +/* 8008A620 00087560 41 82 00 08 */ beq lbl_8008A628 +/* 8008A624 00087564 48 00 00 08 */ b lbl_8008A62C +lbl_8008A628: +/* 8008A628 00087568 3B C0 00 01 */ li r30, 1 +lbl_8008A62C: +/* 8008A62C 0008756C 80 9C 00 00 */ lwz r4, 0(r28) +/* 8008A630 00087570 7F 23 CB 78 */ mr r3, r25 +/* 8008A634 00087574 7F C5 F3 78 */ mr r5, r30 +/* 8008A638 00087578 4B FF FE 11 */ bl TRKValidMemory32 +/* 8008A63C 0008757C 7C 7E 1B 78 */ mr r30, r3 +/* 8008A640 00087580 2C 1E 00 00 */ cmpwi r30, 0 +/* 8008A644 00087584 41 82 00 10 */ beq lbl_8008A654 +/* 8008A648 00087588 38 00 00 00 */ li r0, 0 +/* 8008A64C 0008758C 90 1C 00 00 */ stw r0, 0(r28) +/* 8008A650 00087590 48 00 00 78 */ b lbl_8008A6C8 +lbl_8008A654: +/* 8008A654 00087594 4B FF FD E5 */ bl __TRK_get_MSR +/* 8008A658 00087598 3C 80 80 3F */ lis r4, gTRKCPUState@ha +/* 8008A65C 0008759C 2C 1D 00 00 */ cmpwi r29, 0 +/* 8008A660 000875A0 38 84 AC 30 */ addi r4, r4, gTRKCPUState@l +/* 8008A664 000875A4 80 04 01 F8 */ lwz r0, 0x1f8(r4) +/* 8008A668 000875A8 7C 68 1B 78 */ mr r8, r3 +/* 8008A66C 000875AC 54 00 06 F6 */ rlwinm r0, r0, 0, 0x1b, 0x1b +/* 8008A670 000875B0 7D 07 03 78 */ or r7, r8, r0 +/* 8008A674 000875B4 41 82 00 1C */ beq lbl_8008A690 +/* 8008A678 000875B8 80 BC 00 00 */ lwz r5, 0(r28) +/* 8008A67C 000875BC 7F 43 D3 78 */ mr r3, r26 +/* 8008A680 000875C0 7F 24 CB 78 */ mr r4, r25 +/* 8008A684 000875C4 7D 06 43 78 */ mr r6, r8 +/* 8008A688 000875C8 4B FF FE F9 */ bl TRK_ppc_memcpy +/* 8008A68C 000875CC 48 00 00 3C */ b lbl_8008A6C8 +lbl_8008A690: +/* 8008A690 000875D0 80 BC 00 00 */ lwz r5, 0(r28) +/* 8008A694 000875D4 7F 23 CB 78 */ mr r3, r25 +/* 8008A698 000875D8 7F 44 D3 78 */ mr r4, r26 +/* 8008A69C 000875DC 7C E6 3B 78 */ mr r6, r7 +/* 8008A6A0 000875E0 7D 07 43 78 */ mr r7, r8 +/* 8008A6A4 000875E4 4B FF FE DD */ bl TRK_ppc_memcpy +/* 8008A6A8 000875E8 7F 23 CB 78 */ mr r3, r25 +/* 8008A6AC 000875EC 80 9C 00 00 */ lwz r4, 0(r28) +/* 8008A6B0 000875F0 4B FF FC 8D */ bl TRK_flush_cache +/* 8008A6B4 000875F4 7C 1B C8 40 */ cmplw r27, r25 +/* 8008A6B8 000875F8 41 82 00 10 */ beq lbl_8008A6C8 +/* 8008A6BC 000875FC 7F 63 DB 78 */ mr r3, r27 +/* 8008A6C0 00087600 80 9C 00 00 */ lwz r4, 0(r28) +/* 8008A6C4 00087604 4B FF FC 79 */ bl TRK_flush_cache +lbl_8008A6C8: +/* 8008A6C8 00087608 88 1F 00 00 */ lbz r0, 0(r31) +/* 8008A6CC 0008760C 28 00 00 00 */ cmplwi r0, 0 +/* 8008A6D0 00087610 41 82 00 10 */ beq lbl_8008A6E0 +/* 8008A6D4 00087614 38 00 00 00 */ li r0, 0 +/* 8008A6D8 00087618 90 1C 00 00 */ stw r0, 0(r28) +/* 8008A6DC 0008761C 3B C0 07 02 */ li r30, 0x702 +lbl_8008A6E0: +/* 8008A6E0 00087620 3C 60 80 3B */ lis r3, gTRKExceptionStatus@ha +/* 8008A6E4 00087624 80 81 00 08 */ lwz r4, 8(r1) +/* 8008A6E8 00087628 80 01 00 0C */ lwz r0, 0xc(r1) +/* 8008A6EC 0008762C 38 A3 F0 24 */ addi r5, r3, gTRKExceptionStatus@l +/* 8008A6F0 00087630 7F C3 F3 78 */ mr r3, r30 +/* 8008A6F4 00087634 90 85 00 00 */ stw r4, 0(r5) +/* 8008A6F8 00087638 90 05 00 04 */ stw r0, 4(r5) +/* 8008A6FC 0008763C 80 81 00 10 */ lwz r4, 0x10(r1) +/* 8008A700 00087640 80 01 00 14 */ lwz r0, 0x14(r1) +/* 8008A704 00087644 90 85 00 08 */ stw r4, 8(r5) +/* 8008A708 00087648 90 05 00 0C */ stw r0, 0xc(r5) +/* 8008A70C 0008764C BB 21 00 1C */ lmw r25, 0x1c(r1) +/* 8008A710 00087650 38 21 00 38 */ addi r1, r1, 0x38 +/* 8008A714 00087654 80 01 00 04 */ lwz r0, 4(r1) +/* 8008A718 00087658 7C 08 03 A6 */ mtlr r0 +/* 8008A71C 0008765C 4E 80 00 20 */ blr + +.global TRKTargetReadInstruction +TRKTargetReadInstruction: +/* 8008A720 00087660 7C 08 02 A6 */ mflr r0 +/* 8008A724 00087664 90 01 00 04 */ stw r0, 4(r1) +/* 8008A728 00087668 94 21 FF F0 */ stwu r1, -0x10(r1) +/* 8008A72C 0008766C 38 00 00 04 */ li r0, 4 +/* 8008A730 00087670 38 A1 00 08 */ addi r5, r1, 8 +/* 8008A734 00087674 90 01 00 08 */ stw r0, 8(r1) +/* 8008A738 00087678 38 C0 00 00 */ li r6, 0 +/* 8008A73C 0008767C 38 E0 00 01 */ li r7, 1 +/* 8008A740 00087680 4B FF FE 7D */ bl TRKTargetAccessMemory +/* 8008A744 00087684 2C 03 00 00 */ cmpwi r3, 0 +/* 8008A748 00087688 40 82 00 14 */ bne lbl_8008A75C +/* 8008A74C 0008768C 80 01 00 08 */ lwz r0, 8(r1) +/* 8008A750 00087690 28 00 00 04 */ cmplwi r0, 4 +/* 8008A754 00087694 41 82 00 08 */ beq lbl_8008A75C +/* 8008A758 00087698 38 60 07 00 */ li r3, 0x700 +lbl_8008A75C: +/* 8008A75C 0008769C 38 21 00 10 */ addi r1, r1, 0x10 +/* 8008A760 000876A0 80 01 00 04 */ lwz r0, 4(r1) +/* 8008A764 000876A4 7C 08 03 A6 */ mtlr r0 +/* 8008A768 000876A8 4E 80 00 20 */ blr + +.global TRKTargetAccessDefault +TRKTargetAccessDefault: +/* 8008A76C 000876AC 7C 08 02 A6 */ mflr r0 +/* 8008A770 000876B0 90 01 00 04 */ stw r0, 4(r1) +/* 8008A774 000876B4 94 21 FF E0 */ stwu r1, -0x20(r1) +/* 8008A778 000876B8 93 E1 00 1C */ stw r31, 0x1c(r1) +/* 8008A77C 000876BC 93 C1 00 18 */ stw r30, 0x18(r1) +/* 8008A780 000876C0 7C DF 33 78 */ mr r31, r6 +/* 8008A784 000876C4 28 04 00 24 */ cmplwi r4, 0x24 +/* 8008A788 000876C8 40 81 00 0C */ ble lbl_8008A794 +/* 8008A78C 000876CC 38 60 07 01 */ li r3, 0x701 +/* 8008A790 000876D0 48 00 00 C0 */ b lbl_8008A850 +lbl_8008A794: +/* 8008A794 000876D4 3C C0 80 3B */ lis r6, gTRKExceptionStatus@ha +/* 8008A798 000876D8 2C 07 00 00 */ cmpwi r7, 0 +/* 8008A79C 000876DC 39 06 F0 24 */ addi r8, r6, gTRKExceptionStatus@l +/* 8008A7A0 000876E0 80 08 00 00 */ lwz r0, 0(r8) +/* 8008A7A4 000876E4 7C 83 20 50 */ subf r4, r3, r4 +/* 8008A7A8 000876E8 80 E8 00 04 */ lwz r7, 4(r8) +/* 8008A7AC 000876EC 39 24 00 01 */ addi r9, r4, 1 +/* 8008A7B0 000876F0 3C 80 80 3F */ lis r4, gTRKCPUState@ha +/* 8008A7B4 000876F4 90 01 00 08 */ stw r0, 8(r1) +/* 8008A7B8 000876F8 38 04 AC 30 */ addi r0, r4, gTRKCPUState@l +/* 8008A7BC 000876FC 54 63 10 3A */ slwi r3, r3, 2 +/* 8008A7C0 00087700 3B C8 00 0D */ addi r30, r8, 0xd +/* 8008A7C4 00087704 90 E1 00 0C */ stw r7, 0xc(r1) +/* 8008A7C8 00087708 7C 80 1A 14 */ add r4, r0, r3 +/* 8008A7CC 0008770C 80 E8 00 08 */ lwz r7, 8(r8) +/* 8008A7D0 00087710 38 C0 00 00 */ li r6, 0 +/* 8008A7D4 00087714 80 68 00 0C */ lwz r3, 0xc(r8) +/* 8008A7D8 00087718 55 20 10 3A */ slwi r0, r9, 2 +/* 8008A7DC 0008771C 90 E1 00 10 */ stw r7, 0x10(r1) +/* 8008A7E0 00087720 7D 27 4B 78 */ mr r7, r9 +/* 8008A7E4 00087724 90 61 00 14 */ stw r3, 0x14(r1) +/* 8008A7E8 00087728 98 DE 00 00 */ stb r6, 0(r30) +/* 8008A7EC 0008772C 90 1F 00 00 */ stw r0, 0(r31) +/* 8008A7F0 00087730 41 82 00 14 */ beq lbl_8008A804 +/* 8008A7F4 00087734 7C A3 2B 78 */ mr r3, r5 +/* 8008A7F8 00087738 7C E5 3B 78 */ mr r5, r7 +/* 8008A7FC 0008773C 4B FF DD 7D */ bl TRKAppendBuffer_ui32 +/* 8008A800 00087740 48 00 00 10 */ b lbl_8008A810 +lbl_8008A804: +/* 8008A804 00087744 7C A3 2B 78 */ mr r3, r5 +/* 8008A808 00087748 7C E5 3B 78 */ mr r5, r7 +/* 8008A80C 0008774C 4B FF E0 41 */ bl TRKReadBuffer_ui32 +lbl_8008A810: +/* 8008A810 00087750 88 1E 00 00 */ lbz r0, 0(r30) +/* 8008A814 00087754 28 00 00 00 */ cmplwi r0, 0 +/* 8008A818 00087758 41 82 00 10 */ beq lbl_8008A828 +/* 8008A81C 0008775C 38 00 00 00 */ li r0, 0 +/* 8008A820 00087760 90 1F 00 00 */ stw r0, 0(r31) +/* 8008A824 00087764 38 60 07 02 */ li r3, 0x702 +lbl_8008A828: +/* 8008A828 00087768 3C A0 80 3B */ lis r5, gTRKExceptionStatus@ha +/* 8008A82C 0008776C 80 81 00 08 */ lwz r4, 8(r1) +/* 8008A830 00087770 80 01 00 0C */ lwz r0, 0xc(r1) +/* 8008A834 00087774 38 A5 F0 24 */ addi r5, r5, gTRKExceptionStatus@l +/* 8008A838 00087778 90 85 00 00 */ stw r4, 0(r5) +/* 8008A83C 0008777C 90 05 00 04 */ stw r0, 4(r5) +/* 8008A840 00087780 80 81 00 10 */ lwz r4, 0x10(r1) +/* 8008A844 00087784 80 01 00 14 */ lwz r0, 0x14(r1) +/* 8008A848 00087788 90 85 00 08 */ stw r4, 8(r5) +/* 8008A84C 0008778C 90 05 00 0C */ stw r0, 0xc(r5) +lbl_8008A850: +/* 8008A850 00087790 83 E1 00 1C */ lwz r31, 0x1c(r1) +/* 8008A854 00087794 83 C1 00 18 */ lwz r30, 0x18(r1) +/* 8008A858 00087798 38 21 00 20 */ addi r1, r1, 0x20 +/* 8008A85C 0008779C 80 01 00 04 */ lwz r0, 4(r1) +/* 8008A860 000877A0 7C 08 03 A6 */ mtlr r0 +/* 8008A864 000877A4 4E 80 00 20 */ blr + +.global TRKTargetAccessFP +TRKTargetAccessFP: +/* 8008A868 000877A8 7C 08 02 A6 */ mflr r0 +/* 8008A86C 000877AC 90 01 00 04 */ stw r0, 4(r1) +/* 8008A870 000877B0 94 21 FF C0 */ stwu r1, -0x40(r1) +/* 8008A874 000877B4 BF 21 00 24 */ stmw r25, 0x24(r1) +/* 8008A878 000877B8 7C 79 1B 78 */ mr r25, r3 +/* 8008A87C 000877BC 7C 9C 23 78 */ mr r28, r4 +/* 8008A880 000877C0 7C BD 2B 78 */ mr r29, r5 +/* 8008A884 000877C4 7C DE 33 78 */ mr r30, r6 +/* 8008A888 000877C8 7C FF 3B 78 */ mr r31, r7 +/* 8008A88C 000877CC 28 1C 00 21 */ cmplwi r28, 0x21 +/* 8008A890 000877D0 40 81 00 0C */ ble lbl_8008A89C +/* 8008A894 000877D4 38 60 07 01 */ li r3, 0x701 +/* 8008A898 000877D8 48 00 01 04 */ b lbl_8008A99C +lbl_8008A89C: +/* 8008A89C 000877DC 3C 60 80 3B */ lis r3, gTRKExceptionStatus@ha +/* 8008A8A0 000877E0 38 83 F0 24 */ addi r4, r3, gTRKExceptionStatus@l +/* 8008A8A4 000877E4 80 64 00 00 */ lwz r3, 0(r4) +/* 8008A8A8 000877E8 3B 44 00 0D */ addi r26, r4, 0xd +/* 8008A8AC 000877EC 80 04 00 04 */ lwz r0, 4(r4) +/* 8008A8B0 000877F0 3B 60 00 00 */ li r27, 0 +/* 8008A8B4 000877F4 90 61 00 08 */ stw r3, 8(r1) +/* 8008A8B8 000877F8 90 01 00 0C */ stw r0, 0xc(r1) +/* 8008A8BC 000877FC 80 64 00 08 */ lwz r3, 8(r4) +/* 8008A8C0 00087800 80 04 00 0C */ lwz r0, 0xc(r4) +/* 8008A8C4 00087804 90 61 00 10 */ stw r3, 0x10(r1) +/* 8008A8C8 00087808 90 01 00 14 */ stw r0, 0x14(r1) +/* 8008A8CC 0008780C 9B 7A 00 00 */ stb r27, 0(r26) +/* 8008A8D0 00087810 4B FF FB 69 */ bl __TRK_get_MSR +/* 8008A8D4 00087814 60 63 20 00 */ ori r3, r3, 0x2000 +/* 8008A8D8 00087818 4B FF FB 69 */ bl __TRK_set_MSR +/* 8008A8DC 0008781C 93 7E 00 00 */ stw r27, 0(r30) +/* 8008A8E0 00087820 7F 3B CB 78 */ mr r27, r25 +/* 8008A8E4 00087824 38 60 00 00 */ li r3, 0 +/* 8008A8E8 00087828 48 00 00 04 */ b lbl_8008A8EC +lbl_8008A8EC: +/* 8008A8EC 0008782C 48 00 00 04 */ b lbl_8008A8F0 +lbl_8008A8F0: +/* 8008A8F0 00087830 48 00 00 5C */ b lbl_8008A94C +lbl_8008A8F4: +/* 8008A8F4 00087834 2C 1F 00 00 */ cmpwi r31, 0 +/* 8008A8F8 00087838 41 82 00 28 */ beq lbl_8008A920 +/* 8008A8FC 0008783C 7F 64 DB 78 */ mr r4, r27 +/* 8008A900 00087840 38 61 00 18 */ addi r3, r1, 0x18 +/* 8008A904 00087844 7F E5 FB 78 */ mr r5, r31 +/* 8008A908 00087848 48 00 0F 15 */ bl TRKPPCAccessFPRegister +/* 8008A90C 0008784C 80 A1 00 18 */ lwz r5, 0x18(r1) +/* 8008A910 00087850 7F A3 EB 78 */ mr r3, r29 +/* 8008A914 00087854 80 C1 00 1C */ lwz r6, 0x1c(r1) +/* 8008A918 00087858 4B FF DB 71 */ bl TRKAppendBuffer1_ui64 +/* 8008A91C 0008785C 48 00 00 20 */ b lbl_8008A93C +lbl_8008A920: +/* 8008A920 00087860 7F A3 EB 78 */ mr r3, r29 +/* 8008A924 00087864 38 81 00 18 */ addi r4, r1, 0x18 +/* 8008A928 00087868 4B FF DE 01 */ bl TRKReadBuffer1_ui64 +/* 8008A92C 0008786C 7F 64 DB 78 */ mr r4, r27 +/* 8008A930 00087870 38 61 00 18 */ addi r3, r1, 0x18 +/* 8008A934 00087874 7F E5 FB 78 */ mr r5, r31 +/* 8008A938 00087878 48 00 0E E5 */ bl TRKPPCAccessFPRegister +lbl_8008A93C: +/* 8008A93C 0008787C 80 9E 00 00 */ lwz r4, 0(r30) +/* 8008A940 00087880 3B 7B 00 01 */ addi r27, r27, 1 +/* 8008A944 00087884 38 04 00 08 */ addi r0, r4, 8 +/* 8008A948 00087888 90 1E 00 00 */ stw r0, 0(r30) +lbl_8008A94C: +/* 8008A94C 0008788C 7C 1B E0 40 */ cmplw r27, r28 +/* 8008A950 00087890 41 81 00 0C */ bgt lbl_8008A95C +/* 8008A954 00087894 2C 03 00 00 */ cmpwi r3, 0 +/* 8008A958 00087898 41 82 FF 9C */ beq lbl_8008A8F4 +lbl_8008A95C: +/* 8008A95C 0008789C 88 1A 00 00 */ lbz r0, 0(r26) +/* 8008A960 000878A0 28 00 00 00 */ cmplwi r0, 0 +/* 8008A964 000878A4 41 82 00 10 */ beq lbl_8008A974 +/* 8008A968 000878A8 38 00 00 00 */ li r0, 0 +/* 8008A96C 000878AC 90 1E 00 00 */ stw r0, 0(r30) +/* 8008A970 000878B0 38 60 07 02 */ li r3, 0x702 +lbl_8008A974: +/* 8008A974 000878B4 3C A0 80 3B */ lis r5, gTRKExceptionStatus@ha +/* 8008A978 000878B8 80 81 00 08 */ lwz r4, 8(r1) +/* 8008A97C 000878BC 80 01 00 0C */ lwz r0, 0xc(r1) +/* 8008A980 000878C0 38 A5 F0 24 */ addi r5, r5, gTRKExceptionStatus@l +/* 8008A984 000878C4 90 85 00 00 */ stw r4, 0(r5) +/* 8008A988 000878C8 90 05 00 04 */ stw r0, 4(r5) +/* 8008A98C 000878CC 80 81 00 10 */ lwz r4, 0x10(r1) +/* 8008A990 000878D0 80 01 00 14 */ lwz r0, 0x14(r1) +/* 8008A994 000878D4 90 85 00 08 */ stw r4, 8(r5) +/* 8008A998 000878D8 90 05 00 0C */ stw r0, 0xc(r5) +lbl_8008A99C: +/* 8008A99C 000878DC BB 21 00 24 */ lmw r25, 0x24(r1) +/* 8008A9A0 000878E0 38 21 00 40 */ addi r1, r1, 0x40 +/* 8008A9A4 000878E4 80 01 00 04 */ lwz r0, 4(r1) +/* 8008A9A8 000878E8 7C 08 03 A6 */ mtlr r0 +/* 8008A9AC 000878EC 4E 80 00 20 */ blr + +.global TRKTargetAccessExtended1 +TRKTargetAccessExtended1: +/* 8008A9B0 000878F0 7C 08 02 A6 */ mflr r0 +/* 8008A9B4 000878F4 90 01 00 04 */ stw r0, 4(r1) +/* 8008A9B8 000878F8 94 21 FF E0 */ stwu r1, -0x20(r1) +/* 8008A9BC 000878FC 93 E1 00 1C */ stw r31, 0x1c(r1) +/* 8008A9C0 00087900 93 C1 00 18 */ stw r30, 0x18(r1) +/* 8008A9C4 00087904 7C DE 33 78 */ mr r30, r6 +/* 8008A9C8 00087908 28 04 00 60 */ cmplwi r4, 0x60 +/* 8008A9CC 0008790C 40 81 00 0C */ ble lbl_8008A9D8 +/* 8008A9D0 00087910 38 60 07 01 */ li r3, 0x701 +/* 8008A9D4 00087914 48 00 01 3C */ b lbl_8008AB10 +lbl_8008A9D8: +/* 8008A9D8 00087918 3C C0 80 3B */ lis r6, gTRKExceptionStatus@ha +/* 8008A9DC 0008791C 7C 03 20 40 */ cmplw r3, r4 +/* 8008A9E0 00087920 39 26 F0 24 */ addi r9, r6, gTRKExceptionStatus@l +/* 8008A9E4 00087924 81 09 00 00 */ lwz r8, 0(r9) +/* 8008A9E8 00087928 3B E9 00 0D */ addi r31, r9, 0xd +/* 8008A9EC 0008792C 80 C9 00 04 */ lwz r6, 4(r9) +/* 8008A9F0 00087930 38 00 00 00 */ li r0, 0 +/* 8008A9F4 00087934 91 01 00 08 */ stw r8, 8(r1) +/* 8008A9F8 00087938 90 C1 00 0C */ stw r6, 0xc(r1) +/* 8008A9FC 0008793C 81 09 00 08 */ lwz r8, 8(r9) +/* 8008AA00 00087940 80 C9 00 0C */ lwz r6, 0xc(r9) +/* 8008AA04 00087944 91 01 00 10 */ stw r8, 0x10(r1) +/* 8008AA08 00087948 90 C1 00 14 */ stw r6, 0x14(r1) +/* 8008AA0C 0008794C 98 1F 00 00 */ stb r0, 0(r31) +/* 8008AA10 00087950 90 1E 00 00 */ stw r0, 0(r30) +/* 8008AA14 00087954 41 81 00 BC */ bgt lbl_8008AAD0 +/* 8008AA18 00087958 7C 83 20 50 */ subf r4, r3, r4 +/* 8008AA1C 0008795C 80 1E 00 00 */ lwz r0, 0(r30) +/* 8008AA20 00087960 39 04 00 01 */ addi r8, r4, 1 +/* 8008AA24 00087964 2C 07 00 00 */ cmpwi r7, 0 +/* 8008AA28 00087968 55 06 10 3A */ slwi r6, r8, 2 +/* 8008AA2C 0008796C 3C 80 80 3F */ lis r4, gTRKCPUState@ha +/* 8008AA30 00087970 7C 00 32 14 */ add r0, r0, r6 +/* 8008AA34 00087974 90 1E 00 00 */ stw r0, 0(r30) +/* 8008AA38 00087978 38 E4 AC 30 */ addi r7, r4, gTRKCPUState@l +/* 8008AA3C 0008797C 54 60 10 3A */ slwi r0, r3, 2 +/* 8008AA40 00087980 7C 87 02 14 */ add r4, r7, r0 +/* 8008AA44 00087984 38 84 01 A8 */ addi r4, r4, 0x1a8 +/* 8008AA48 00087988 41 82 00 14 */ beq lbl_8008AA5C +/* 8008AA4C 0008798C 7C A3 2B 78 */ mr r3, r5 +/* 8008AA50 00087990 7D 05 43 78 */ mr r5, r8 +/* 8008AA54 00087994 4B FF DB 25 */ bl TRKAppendBuffer_ui32 +/* 8008AA58 00087998 48 00 00 78 */ b lbl_8008AAD0 +lbl_8008AA5C: +/* 8008AA5C 0008799C 38 07 01 EC */ addi r0, r7, 0x1ec +/* 8008AA60 000879A0 7C 04 00 40 */ cmplw r4, r0 +/* 8008AA64 000879A4 41 81 00 28 */ bgt lbl_8008AA8C +/* 8008AA68 000879A8 38 66 FF FC */ addi r3, r6, -4 +/* 8008AA6C 000879AC 38 07 01 E8 */ addi r0, r7, 0x1e8 +/* 8008AA70 000879B0 7C 64 1A 14 */ add r3, r4, r3 +/* 8008AA74 000879B4 7C 03 00 40 */ cmplw r3, r0 +/* 8008AA78 000879B8 41 80 00 14 */ blt lbl_8008AA8C +/* 8008AA7C 000879BC 3C 60 80 3B */ lis r3, gTRKRestoreFlags@ha +/* 8008AA80 000879C0 38 63 F0 18 */ addi r3, r3, gTRKRestoreFlags@l +/* 8008AA84 000879C4 38 00 00 01 */ li r0, 1 +/* 8008AA88 000879C8 98 03 00 00 */ stb r0, 0(r3) +lbl_8008AA8C: +/* 8008AA8C 000879CC 3C 60 80 3F */ lis r3, gTRKCPUState@ha +/* 8008AA90 000879D0 38 63 AC 30 */ addi r3, r3, gTRKCPUState@l +/* 8008AA94 000879D4 38 C3 02 78 */ addi r6, r3, 0x278 +/* 8008AA98 000879D8 7C 04 30 40 */ cmplw r4, r6 +/* 8008AA9C 000879DC 41 81 00 28 */ bgt lbl_8008AAC4 +/* 8008AAA0 000879E0 55 03 10 3A */ slwi r3, r8, 2 +/* 8008AAA4 000879E4 38 03 FF FC */ addi r0, r3, -4 +/* 8008AAA8 000879E8 7C 04 02 14 */ add r0, r4, r0 +/* 8008AAAC 000879EC 7C 00 30 40 */ cmplw r0, r6 +/* 8008AAB0 000879F0 41 80 00 14 */ blt lbl_8008AAC4 +/* 8008AAB4 000879F4 3C 60 80 3B */ lis r3, gTRKRestoreFlags@ha +/* 8008AAB8 000879F8 38 63 F0 18 */ addi r3, r3, gTRKRestoreFlags@l +/* 8008AABC 000879FC 38 00 00 01 */ li r0, 1 +/* 8008AAC0 00087A00 98 03 00 01 */ stb r0, 1(r3) +lbl_8008AAC4: +/* 8008AAC4 00087A04 7C A3 2B 78 */ mr r3, r5 +/* 8008AAC8 00087A08 7D 05 43 78 */ mr r5, r8 +/* 8008AACC 00087A0C 4B FF DD 81 */ bl TRKReadBuffer_ui32 +lbl_8008AAD0: +/* 8008AAD0 00087A10 88 1F 00 00 */ lbz r0, 0(r31) +/* 8008AAD4 00087A14 28 00 00 00 */ cmplwi r0, 0 +/* 8008AAD8 00087A18 41 82 00 10 */ beq lbl_8008AAE8 +/* 8008AADC 00087A1C 38 00 00 00 */ li r0, 0 +/* 8008AAE0 00087A20 90 1E 00 00 */ stw r0, 0(r30) +/* 8008AAE4 00087A24 38 60 07 02 */ li r3, 0x702 +lbl_8008AAE8: +/* 8008AAE8 00087A28 3C A0 80 3B */ lis r5, gTRKExceptionStatus@ha +/* 8008AAEC 00087A2C 80 81 00 08 */ lwz r4, 8(r1) +/* 8008AAF0 00087A30 80 01 00 0C */ lwz r0, 0xc(r1) +/* 8008AAF4 00087A34 38 A5 F0 24 */ addi r5, r5, gTRKExceptionStatus@l +/* 8008AAF8 00087A38 90 85 00 00 */ stw r4, 0(r5) +/* 8008AAFC 00087A3C 90 05 00 04 */ stw r0, 4(r5) +/* 8008AB00 00087A40 80 81 00 10 */ lwz r4, 0x10(r1) +/* 8008AB04 00087A44 80 01 00 14 */ lwz r0, 0x14(r1) +/* 8008AB08 00087A48 90 85 00 08 */ stw r4, 8(r5) +/* 8008AB0C 00087A4C 90 05 00 0C */ stw r0, 0xc(r5) +lbl_8008AB10: +/* 8008AB10 00087A50 83 E1 00 1C */ lwz r31, 0x1c(r1) +/* 8008AB14 00087A54 83 C1 00 18 */ lwz r30, 0x18(r1) +/* 8008AB18 00087A58 38 21 00 20 */ addi r1, r1, 0x20 +/* 8008AB1C 00087A5C 80 01 00 04 */ lwz r0, 4(r1) +/* 8008AB20 00087A60 7C 08 03 A6 */ mtlr r0 +/* 8008AB24 00087A64 4E 80 00 20 */ blr + +.global TRKTargetAccessExtended2 +TRKTargetAccessExtended2: +/* 8008AB28 00087A68 7C 08 02 A6 */ mflr r0 +/* 8008AB2C 00087A6C 90 01 00 04 */ stw r0, 4(r1) +/* 8008AB30 00087A70 94 21 FF C0 */ stwu r1, -0x40(r1) +/* 8008AB34 00087A74 BF 21 00 24 */ stmw r25, 0x24(r1) +/* 8008AB38 00087A78 7C 79 1B 78 */ mr r25, r3 +/* 8008AB3C 00087A7C 7C 9B 23 78 */ mr r27, r4 +/* 8008AB40 00087A80 7C BC 2B 78 */ mr r28, r5 +/* 8008AB44 00087A84 7C DD 33 78 */ mr r29, r6 +/* 8008AB48 00087A88 7C FE 3B 78 */ mr r30, r7 +/* 8008AB4C 00087A8C 28 1B 00 1F */ cmplwi r27, 0x1f +/* 8008AB50 00087A90 40 81 00 0C */ ble lbl_8008AB5C +/* 8008AB54 00087A94 38 60 07 01 */ li r3, 0x701 +/* 8008AB58 00087A98 48 00 01 38 */ b lbl_8008AC90 +lbl_8008AB5C: +/* 8008AB5C 00087A9C 3C 80 80 3B */ lis r4, gTRKExceptionStatus@ha +/* 8008AB60 00087AA0 38 61 00 08 */ addi r3, r1, 8 +/* 8008AB64 00087AA4 38 E4 F0 24 */ addi r7, r4, gTRKExceptionStatus@l +/* 8008AB68 00087AA8 80 A7 00 00 */ lwz r5, 0(r7) +/* 8008AB6C 00087AAC 3B E7 00 0D */ addi r31, r7, 0xd +/* 8008AB70 00087AB0 80 07 00 04 */ lwz r0, 4(r7) +/* 8008AB74 00087AB4 3B 40 00 00 */ li r26, 0 +/* 8008AB78 00087AB8 38 80 03 98 */ li r4, 0x398 +/* 8008AB7C 00087ABC 90 A1 00 0C */ stw r5, 0xc(r1) +/* 8008AB80 00087AC0 38 A0 00 01 */ li r5, 1 +/* 8008AB84 00087AC4 90 01 00 10 */ stw r0, 0x10(r1) +/* 8008AB88 00087AC8 80 C7 00 08 */ lwz r6, 8(r7) +/* 8008AB8C 00087ACC 80 07 00 0C */ lwz r0, 0xc(r7) +/* 8008AB90 00087AD0 90 C1 00 14 */ stw r6, 0x14(r1) +/* 8008AB94 00087AD4 90 01 00 18 */ stw r0, 0x18(r1) +/* 8008AB98 00087AD8 9B 5F 00 00 */ stb r26, 0(r31) +/* 8008AB9C 00087ADC 48 00 0B 59 */ bl TRKPPCAccessSPR +/* 8008ABA0 00087AE0 80 01 00 08 */ lwz r0, 8(r1) +/* 8008ABA4 00087AE4 38 61 00 08 */ addi r3, r1, 8 +/* 8008ABA8 00087AE8 38 80 03 98 */ li r4, 0x398 +/* 8008ABAC 00087AEC 64 00 A0 00 */ oris r0, r0, 0xa000 +/* 8008ABB0 00087AF0 90 01 00 08 */ stw r0, 8(r1) +/* 8008ABB4 00087AF4 38 A0 00 00 */ li r5, 0 +/* 8008ABB8 00087AF8 48 00 0B 3D */ bl TRKPPCAccessSPR +/* 8008ABBC 00087AFC 93 41 00 08 */ stw r26, 8(r1) +/* 8008ABC0 00087B00 38 61 00 08 */ addi r3, r1, 8 +/* 8008ABC4 00087B04 38 80 03 90 */ li r4, 0x390 +/* 8008ABC8 00087B08 38 A0 00 00 */ li r5, 0 +/* 8008ABCC 00087B0C 48 00 0B 29 */ bl TRKPPCAccessSPR +/* 8008ABD0 00087B10 93 5D 00 00 */ stw r26, 0(r29) +/* 8008ABD4 00087B14 7F 3A CB 78 */ mr r26, r25 +/* 8008ABD8 00087B18 38 60 00 00 */ li r3, 0 +/* 8008ABDC 00087B1C 48 00 00 04 */ b lbl_8008ABE0 +lbl_8008ABE0: +/* 8008ABE0 00087B20 48 00 00 04 */ b lbl_8008ABE4 +lbl_8008ABE4: +/* 8008ABE4 00087B24 48 00 00 5C */ b lbl_8008AC40 +lbl_8008ABE8: +/* 8008ABE8 00087B28 2C 1E 00 00 */ cmpwi r30, 0 +/* 8008ABEC 00087B2C 41 82 00 28 */ beq lbl_8008AC14 +/* 8008ABF0 00087B30 7F 44 D3 78 */ mr r4, r26 +/* 8008ABF4 00087B34 38 61 00 1C */ addi r3, r1, 0x1c +/* 8008ABF8 00087B38 7F C5 F3 78 */ mr r5, r30 +/* 8008ABFC 00087B3C 48 00 0B A9 */ bl TRKPPCAccessPairedSingleRegister +/* 8008AC00 00087B40 80 A1 00 1C */ lwz r5, 0x1c(r1) +/* 8008AC04 00087B44 7F 83 E3 78 */ mr r3, r28 +/* 8008AC08 00087B48 80 C1 00 20 */ lwz r6, 0x20(r1) +/* 8008AC0C 00087B4C 4B FF D8 7D */ bl TRKAppendBuffer1_ui64 +/* 8008AC10 00087B50 48 00 00 20 */ b lbl_8008AC30 +lbl_8008AC14: +/* 8008AC14 00087B54 7F 83 E3 78 */ mr r3, r28 +/* 8008AC18 00087B58 38 81 00 1C */ addi r4, r1, 0x1c +/* 8008AC1C 00087B5C 4B FF DB 0D */ bl TRKReadBuffer1_ui64 +/* 8008AC20 00087B60 7F 44 D3 78 */ mr r4, r26 +/* 8008AC24 00087B64 38 61 00 1C */ addi r3, r1, 0x1c +/* 8008AC28 00087B68 7F C5 F3 78 */ mr r5, r30 +/* 8008AC2C 00087B6C 48 00 0B 79 */ bl TRKPPCAccessPairedSingleRegister +lbl_8008AC30: +/* 8008AC30 00087B70 80 9D 00 00 */ lwz r4, 0(r29) +/* 8008AC34 00087B74 3B 5A 00 01 */ addi r26, r26, 1 +/* 8008AC38 00087B78 38 04 00 08 */ addi r0, r4, 8 +/* 8008AC3C 00087B7C 90 1D 00 00 */ stw r0, 0(r29) +lbl_8008AC40: +/* 8008AC40 00087B80 7C 1A D8 40 */ cmplw r26, r27 +/* 8008AC44 00087B84 41 81 00 0C */ bgt lbl_8008AC50 +/* 8008AC48 00087B88 2C 03 00 00 */ cmpwi r3, 0 +/* 8008AC4C 00087B8C 41 82 FF 9C */ beq lbl_8008ABE8 +lbl_8008AC50: +/* 8008AC50 00087B90 88 1F 00 00 */ lbz r0, 0(r31) +/* 8008AC54 00087B94 28 00 00 00 */ cmplwi r0, 0 +/* 8008AC58 00087B98 41 82 00 10 */ beq lbl_8008AC68 +/* 8008AC5C 00087B9C 38 00 00 00 */ li r0, 0 +/* 8008AC60 00087BA0 90 1D 00 00 */ stw r0, 0(r29) +/* 8008AC64 00087BA4 38 60 07 02 */ li r3, 0x702 +lbl_8008AC68: +/* 8008AC68 00087BA8 3C A0 80 3B */ lis r5, gTRKExceptionStatus@ha +/* 8008AC6C 00087BAC 80 81 00 0C */ lwz r4, 0xc(r1) +/* 8008AC70 00087BB0 80 01 00 10 */ lwz r0, 0x10(r1) +/* 8008AC74 00087BB4 38 A5 F0 24 */ addi r5, r5, gTRKExceptionStatus@l +/* 8008AC78 00087BB8 90 85 00 00 */ stw r4, 0(r5) +/* 8008AC7C 00087BBC 90 05 00 04 */ stw r0, 4(r5) +/* 8008AC80 00087BC0 80 81 00 14 */ lwz r4, 0x14(r1) +/* 8008AC84 00087BC4 80 01 00 18 */ lwz r0, 0x18(r1) +/* 8008AC88 00087BC8 90 85 00 08 */ stw r4, 8(r5) +/* 8008AC8C 00087BCC 90 05 00 0C */ stw r0, 0xc(r5) +lbl_8008AC90: +/* 8008AC90 00087BD0 BB 21 00 24 */ lmw r25, 0x24(r1) +/* 8008AC94 00087BD4 38 21 00 40 */ addi r1, r1, 0x40 +/* 8008AC98 00087BD8 80 01 00 04 */ lwz r0, 4(r1) +/* 8008AC9C 00087BDC 7C 08 03 A6 */ mtlr r0 +/* 8008ACA0 00087BE0 4E 80 00 20 */ blr + +.global TRKTargetVersions +TRKTargetVersions: +/* 8008ACA4 00087BE4 38 00 00 00 */ li r0, 0 +/* 8008ACA8 00087BE8 98 03 00 00 */ stb r0, 0(r3) +/* 8008ACAC 00087BEC 38 00 00 08 */ li r0, 8 +/* 8008ACB0 00087BF0 38 80 00 01 */ li r4, 1 +/* 8008ACB4 00087BF4 98 03 00 01 */ stb r0, 1(r3) +/* 8008ACB8 00087BF8 38 00 00 0A */ li r0, 0xa +/* 8008ACBC 00087BFC 98 83 00 02 */ stb r4, 2(r3) +/* 8008ACC0 00087C00 98 03 00 03 */ stb r0, 3(r3) +/* 8008ACC4 00087C04 38 60 00 00 */ li r3, 0 +/* 8008ACC8 00087C08 4E 80 00 20 */ blr + +.global TRKTargetSupportMask +TRKTargetSupportMask: +/* 8008ACCC 00087C0C 38 00 00 7A */ li r0, 0x7a +/* 8008ACD0 00087C10 98 03 00 00 */ stb r0, 0(r3) +/* 8008ACD4 00087C14 38 E0 00 00 */ li r7, 0 +/* 8008ACD8 00087C18 38 00 00 4F */ li r0, 0x4f +/* 8008ACDC 00087C1C 98 E3 00 01 */ stb r7, 1(r3) +/* 8008ACE0 00087C20 38 C0 00 07 */ li r6, 7 +/* 8008ACE4 00087C24 38 A0 00 01 */ li r5, 1 +/* 8008ACE8 00087C28 98 03 00 02 */ stb r0, 2(r3) +/* 8008ACEC 00087C2C 38 80 00 03 */ li r4, 3 +/* 8008ACF0 00087C30 38 00 00 80 */ li r0, 0x80 +/* 8008ACF4 00087C34 98 C3 00 03 */ stb r6, 3(r3) +/* 8008ACF8 00087C38 98 E3 00 04 */ stb r7, 4(r3) +/* 8008ACFC 00087C3C 98 E3 00 05 */ stb r7, 5(r3) +/* 8008AD00 00087C40 98 E3 00 06 */ stb r7, 6(r3) +/* 8008AD04 00087C44 98 E3 00 07 */ stb r7, 7(r3) +/* 8008AD08 00087C48 98 E3 00 08 */ stb r7, 8(r3) +/* 8008AD0C 00087C4C 98 E3 00 09 */ stb r7, 9(r3) +/* 8008AD10 00087C50 98 E3 00 0A */ stb r7, 0xa(r3) +/* 8008AD14 00087C54 98 E3 00 0B */ stb r7, 0xb(r3) +/* 8008AD18 00087C58 98 E3 00 0C */ stb r7, 0xc(r3) +/* 8008AD1C 00087C5C 98 E3 00 0D */ stb r7, 0xd(r3) +/* 8008AD20 00087C60 98 E3 00 0E */ stb r7, 0xe(r3) +/* 8008AD24 00087C64 98 E3 00 0F */ stb r7, 0xf(r3) +/* 8008AD28 00087C68 98 A3 00 10 */ stb r5, 0x10(r3) +/* 8008AD2C 00087C6C 98 E3 00 11 */ stb r7, 0x11(r3) +/* 8008AD30 00087C70 98 83 00 12 */ stb r4, 0x12(r3) +/* 8008AD34 00087C74 98 E3 00 13 */ stb r7, 0x13(r3) +/* 8008AD38 00087C78 98 E3 00 14 */ stb r7, 0x14(r3) +/* 8008AD3C 00087C7C 98 E3 00 15 */ stb r7, 0x15(r3) +/* 8008AD40 00087C80 98 E3 00 16 */ stb r7, 0x16(r3) +/* 8008AD44 00087C84 98 E3 00 17 */ stb r7, 0x17(r3) +/* 8008AD48 00087C88 98 E3 00 18 */ stb r7, 0x18(r3) +/* 8008AD4C 00087C8C 98 E3 00 19 */ stb r7, 0x19(r3) +/* 8008AD50 00087C90 98 83 00 1A */ stb r4, 0x1a(r3) +/* 8008AD54 00087C94 98 E3 00 1B */ stb r7, 0x1b(r3) +/* 8008AD58 00087C98 98 E3 00 1C */ stb r7, 0x1c(r3) +/* 8008AD5C 00087C9C 98 E3 00 1D */ stb r7, 0x1d(r3) +/* 8008AD60 00087CA0 98 E3 00 1E */ stb r7, 0x1e(r3) +/* 8008AD64 00087CA4 98 03 00 1F */ stb r0, 0x1f(r3) +/* 8008AD68 00087CA8 38 60 00 00 */ li r3, 0 +/* 8008AD6C 00087CAC 4E 80 00 20 */ blr + +.global TRKTargetCPUType +TRKTargetCPUType: +/* 8008AD70 00087CB0 7C 08 02 A6 */ mflr r0 +/* 8008AD74 00087CB4 90 01 00 04 */ stw r0, 4(r1) +/* 8008AD78 00087CB8 94 21 FF F0 */ stwu r1, -0x10(r1) +/* 8008AD7C 00087CBC 93 E1 00 0C */ stw r31, 0xc(r1) +/* 8008AD80 00087CC0 7C 7F 1B 78 */ mr r31, r3 +/* 8008AD84 00087CC4 38 00 00 00 */ li r0, 0 +/* 8008AD88 00087CC8 98 1F 00 00 */ stb r0, 0(r31) +/* 8008AD8C 00087CCC 48 00 12 39 */ bl TRKTargetCPUMinorType +/* 8008AD90 00087CD0 98 7F 00 01 */ stb r3, 1(r31) +/* 8008AD94 00087CD4 3C 60 80 3F */ lis r3, gTRKBigEndian@ha +/* 8008AD98 00087CD8 38 63 91 08 */ addi r3, r3, gTRKBigEndian@l +/* 8008AD9C 00087CDC 80 63 00 00 */ lwz r3, 0(r3) +/* 8008ADA0 00087CE0 38 80 00 04 */ li r4, 4 +/* 8008ADA4 00087CE4 38 00 00 08 */ li r0, 8 +/* 8008ADA8 00087CE8 54 63 06 3E */ clrlwi r3, r3, 0x18 +/* 8008ADAC 00087CEC 98 7F 00 02 */ stb r3, 2(r31) +/* 8008ADB0 00087CF0 38 60 00 00 */ li r3, 0 +/* 8008ADB4 00087CF4 98 9F 00 03 */ stb r4, 3(r31) +/* 8008ADB8 00087CF8 98 1F 00 04 */ stb r0, 4(r31) +/* 8008ADBC 00087CFC 98 9F 00 05 */ stb r4, 5(r31) +/* 8008ADC0 00087D00 98 1F 00 06 */ stb r0, 6(r31) +/* 8008ADC4 00087D04 83 E1 00 0C */ lwz r31, 0xc(r1) +/* 8008ADC8 00087D08 38 21 00 10 */ addi r1, r1, 0x10 +/* 8008ADCC 00087D0C 80 01 00 04 */ lwz r0, 4(r1) +/* 8008ADD0 00087D10 7C 08 03 A6 */ mtlr r0 +/* 8008ADD4 00087D14 4E 80 00 20 */ blr + +.global TRKInterruptHandler +TRKInterruptHandler: +/* 8008ADD8 00087D18 7C 5A 03 A6 */ mtspr 0x1a, r2 +/* 8008ADDC 00087D1C 7C 9B 03 A6 */ mtspr 0x1b, r4 +/* 8008ADE0 00087D20 7C 93 42 A6 */ mfspr r4, 0x113 +/* 8008ADE4 00087D24 7C 40 00 26 */ mfcr r2 +/* 8008ADE8 00087D28 7C 53 43 A6 */ mtspr 0x113, r2 +/* 8008ADEC 00087D2C 3C 40 80 3E */ lis r2, gTRKState@h +/* 8008ADF0 00087D30 60 42 AB 88 */ ori r2, r2, gTRKState@l +/* 8008ADF4 00087D34 80 42 00 8C */ lwz r2, 0x8c(r2) +/* 8008ADF8 00087D38 60 42 80 02 */ ori r2, r2, 0x8002 +/* 8008ADFC 00087D3C 68 42 80 02 */ xori r2, r2, 0x8002 +/* 8008AE00 00087D40 7C 00 04 AC */ sync 0 +/* 8008AE04 00087D44 7C 40 01 24 */ mtmsr r2 +/* 8008AE08 00087D48 7C 00 04 AC */ sync 0 +/* 8008AE0C 00087D4C 3C 40 80 3E */ lis r2, TRK_saved_exceptionID@h +/* 8008AE10 00087D50 60 42 AA E0 */ ori r2, r2, TRK_saved_exceptionID@l +/* 8008AE14 00087D54 B0 62 00 00 */ sth r3, 0x0(r2) +/* 8008AE18 00087D58 2C 03 05 00 */ cmpwi r3, 0x500 +/* 8008AE1C 00087D5C 40 82 00 84 */ bne lbl_8008AEA0 +/* 8008AE20 00087D60 3C 40 80 3E */ lis r2, gTRKCPUState@h +/* 8008AE24 00087D64 60 42 AC 30 */ ori r2, r2, gTRKCPUState@l +/* 8008AE28 00087D68 7C 68 02 A6 */ mflr r3 +/* 8008AE2C 00087D6C 90 62 04 2C */ stw r3, 0x42c(r2) +/* 8008AE30 00087D70 48 00 13 8D */ bl TRKUARTInterruptHandler +/* 8008AE34 00087D74 3C 40 80 3E */ lis r2, gTRKCPUState@h +/* 8008AE38 00087D78 60 42 AC 30 */ ori r2, r2, gTRKCPUState@l +/* 8008AE3C 00087D7C 80 62 04 2C */ lwz r3, 0x42c(r2) +/* 8008AE40 00087D80 7C 68 03 A6 */ mtlr r3 +/* 8008AE44 00087D84 3C 40 80 3E */ lis r2, gTRKState@h +/* 8008AE48 00087D88 60 42 AB 88 */ ori r2, r2, gTRKState@l +/* 8008AE4C 00087D8C 80 42 00 A0 */ lwz r2, 0xa0(r2) +/* 8008AE50 00087D90 88 42 00 00 */ lbz r2, 0x0(r2) +/* 8008AE54 00087D94 2C 02 00 00 */ cmpwi r2, 0 +/* 8008AE58 00087D98 41 82 00 2C */ beq lbl_8008AE84 +/* 8008AE5C 00087D9C 3C 40 80 3A */ lis r2, gTRKExceptionStatus@h +/* 8008AE60 00087DA0 60 42 F0 24 */ ori r2, r2, gTRKExceptionStatus@l +/* 8008AE64 00087DA4 88 42 00 0C */ lbz r2, 0xc(r2) +/* 8008AE68 00087DA8 2C 02 00 01 */ cmpwi r2, 1 +/* 8008AE6C 00087DAC 41 82 00 18 */ beq lbl_8008AE84 +/* 8008AE70 00087DB0 3C 40 80 3E */ lis r2, gTRKState@h +/* 8008AE74 00087DB4 60 42 AB 88 */ ori r2, r2, gTRKState@l +/* 8008AE78 00087DB8 38 60 00 01 */ li r3, 1 +/* 8008AE7C 00087DBC 98 62 00 9C */ stb r3, 0x9c(r2) +/* 8008AE80 00087DC0 48 00 00 20 */ b lbl_8008AEA0 +lbl_8008AE84: +/* 8008AE84 00087DC4 3C 40 80 3E */ lis r2, gTRKSaveState@h +/* 8008AE88 00087DC8 60 42 AA E4 */ ori r2, r2, gTRKSaveState@l +/* 8008AE8C 00087DCC 80 62 00 88 */ lwz r3, 0x88(r2) +/* 8008AE90 00087DD0 7C 6F F1 20 */ mtcrf 0xff, r3 +/* 8008AE94 00087DD4 80 62 00 0C */ lwz r3, 0xc(r2) +/* 8008AE98 00087DD8 80 42 00 08 */ lwz r2, 0x8(r2) +/* 8008AE9C 00087DDC 4C 00 00 64 */ rfi +lbl_8008AEA0: +/* 8008AEA0 00087DE0 3C 40 80 3E */ lis r2, TRK_saved_exceptionID@h +/* 8008AEA4 00087DE4 60 42 AA E0 */ ori r2, r2, TRK_saved_exceptionID@l +/* 8008AEA8 00087DE8 A0 62 00 00 */ lhz r3, 0x0(r2) +/* 8008AEAC 00087DEC 3C 40 80 3A */ lis r2, gTRKExceptionStatus@h +/* 8008AEB0 00087DF0 60 42 F0 24 */ ori r2, r2, gTRKExceptionStatus@l +/* 8008AEB4 00087DF4 88 42 00 0C */ lbz r2, 0xc(r2) +/* 8008AEB8 00087DF8 2C 02 00 00 */ cmpwi r2, 0 +/* 8008AEBC 00087DFC 40 82 00 B0 */ bne TRKExceptionHandler +/* 8008AEC0 00087E00 3C 40 80 3E */ lis r2, gTRKCPUState@h +/* 8008AEC4 00087E04 60 42 AC 30 */ ori r2, r2, gTRKCPUState@l +/* 8008AEC8 00087E08 90 02 00 00 */ stw r0, 0x0(r2) +/* 8008AECC 00087E0C 90 22 00 04 */ stw r1, 0x4(r2) +/* 8008AED0 00087E10 7C 11 42 A6 */ mfspr r0, 0x111 +/* 8008AED4 00087E14 90 02 00 08 */ stw r0, 0x8(r2) +/* 8008AED8 00087E18 B0 62 02 F8 */ sth r3, 0x2f8(r2) +/* 8008AEDC 00087E1C B0 62 02 FA */ sth r3, 0x2fa(r2) +/* 8008AEE0 00087E20 7C 12 42 A6 */ mfspr r0, 0x112 +/* 8008AEE4 00087E24 90 02 00 0C */ stw r0, 0xc(r2) +/* 8008AEE8 00087E28 BC 82 00 10 */ stmw r4, 0x10(r2) +/* 8008AEEC 00087E2C 7F 7A 02 A6 */ mfspr r27, 0x1a +/* 8008AEF0 00087E30 7F 88 02 A6 */ mflr r28 +/* 8008AEF4 00087E34 7F B3 42 A6 */ mfspr r29, 0x113 +/* 8008AEF8 00087E38 7F C9 02 A6 */ mfctr r30 +/* 8008AEFC 00087E3C 7F E1 02 A6 */ mfxer r31 +/* 8008AF00 00087E40 BF 62 00 80 */ stmw r27, 0x80(r2) +/* 8008AF04 00087E44 48 00 0D 51 */ bl TRKSaveExtended1Block +/* 8008AF08 00087E48 3C 40 80 3A */ lis r2, gTRKExceptionStatus@h +/* 8008AF0C 00087E4C 60 42 F0 24 */ ori r2, r2, gTRKExceptionStatus@l +/* 8008AF10 00087E50 38 60 00 01 */ li r3, 1 +/* 8008AF14 00087E54 98 62 00 0C */ stb r3, 0xc(r2) +/* 8008AF18 00087E58 3C 40 80 3E */ lis r2, gTRKState@h +/* 8008AF1C 00087E5C 60 42 AB 88 */ ori r2, r2, gTRKState@l +/* 8008AF20 00087E60 80 02 00 8C */ lwz r0, 0x8c(r2) +/* 8008AF24 00087E64 7C 00 04 AC */ sync 0 +/* 8008AF28 00087E68 7C 00 01 24 */ mtmsr r0 +/* 8008AF2C 00087E6C 7C 00 04 AC */ sync 0 +/* 8008AF30 00087E70 80 02 00 80 */ lwz r0, 0x80(r2) +/* 8008AF34 00087E74 7C 08 03 A6 */ mtlr r0 +/* 8008AF38 00087E78 80 02 00 84 */ lwz r0, 0x84(r2) +/* 8008AF3C 00087E7C 7C 09 03 A6 */ mtctr r0 +/* 8008AF40 00087E80 80 02 00 88 */ lwz r0, 0x88(r2) +/* 8008AF44 00087E84 7C 01 03 A6 */ mtxer r0 +/* 8008AF48 00087E88 80 02 00 94 */ lwz r0, 0x94(r2) +/* 8008AF4C 00087E8C 7C 12 03 A6 */ mtdsisr r0 +/* 8008AF50 00087E90 80 02 00 90 */ lwz r0, 0x90(r2) +/* 8008AF54 00087E94 7C 13 03 A6 */ mtdar r0 +/* 8008AF58 00087E98 B8 62 00 0C */ lmw r3, 0xc(r2) +/* 8008AF5C 00087E9C 80 02 00 00 */ lwz r0, 0x0(r2) +/* 8008AF60 00087EA0 80 22 00 04 */ lwz r1, 0x4(r2) +/* 8008AF64 00087EA4 80 42 00 08 */ lwz r2, 0x8(r2) +/* 8008AF68 00087EA8 48 00 00 A0 */ b TRKPostInterruptEvent + +.global TRKExceptionHandler +TRKExceptionHandler: +/* 8008AF6C 00087EAC 3C 40 80 3A */ lis r2, gTRKExceptionStatus@h +/* 8008AF70 00087EB0 60 42 F0 24 */ ori r2, r2, gTRKExceptionStatus@l +/* 8008AF74 00087EB4 B0 62 00 08 */ sth r3, 0x8(r2) +/* 8008AF78 00087EB8 7C 7A 02 A6 */ mfspr r3, 0x1a +/* 8008AF7C 00087EBC 90 62 00 00 */ stw r3, 0x0(r2) +/* 8008AF80 00087EC0 A0 62 00 08 */ lhz r3, 0x8(r2) +/* 8008AF84 00087EC4 2C 03 02 00 */ cmpwi r3, 0x200 +/* 8008AF88 00087EC8 41 82 00 50 */ beq lbl_8008AFD8 +/* 8008AF8C 00087ECC 2C 03 03 00 */ cmpwi r3, 0x300 +/* 8008AF90 00087ED0 41 82 00 48 */ beq lbl_8008AFD8 +/* 8008AF94 00087ED4 2C 03 04 00 */ cmpwi r3, 0x400 +/* 8008AF98 00087ED8 41 82 00 40 */ beq lbl_8008AFD8 +/* 8008AF9C 00087EDC 2C 03 06 00 */ cmpwi r3, 0x600 +/* 8008AFA0 00087EE0 41 82 00 38 */ beq lbl_8008AFD8 +/* 8008AFA4 00087EE4 2C 03 07 00 */ cmpwi r3, 0x700 +/* 8008AFA8 00087EE8 41 82 00 30 */ beq lbl_8008AFD8 +/* 8008AFAC 00087EEC 2C 03 08 00 */ cmpwi r3, 0x800 +/* 8008AFB0 00087EF0 41 82 00 28 */ beq lbl_8008AFD8 +/* 8008AFB4 00087EF4 2C 03 10 00 */ cmpwi r3, 0x1000 +/* 8008AFB8 00087EF8 41 82 00 20 */ beq lbl_8008AFD8 +/* 8008AFBC 00087EFC 2C 03 11 00 */ cmpwi r3, 0x1100 +/* 8008AFC0 00087F00 41 82 00 18 */ beq lbl_8008AFD8 +/* 8008AFC4 00087F04 2C 03 12 00 */ cmpwi r3, 0x1200 +/* 8008AFC8 00087F08 41 82 00 10 */ beq lbl_8008AFD8 +/* 8008AFCC 00087F0C 2C 03 13 00 */ cmpwi r3, 0x1300 +/* 8008AFD0 00087F10 41 82 00 08 */ beq lbl_8008AFD8 +/* 8008AFD4 00087F14 48 00 00 10 */ b lbl_8008AFE4 +lbl_8008AFD8: +/* 8008AFD8 00087F18 7C 7A 02 A6 */ mfspr r3, 0x1a +/* 8008AFDC 00087F1C 38 63 00 04 */ addi r3, r3, 4 +/* 8008AFE0 00087F20 7C 7A 03 A6 */ mtspr 0x1a, r3 +lbl_8008AFE4: +/* 8008AFE4 00087F24 3C 40 80 3A */ lis r2, gTRKExceptionStatus@h +/* 8008AFE8 00087F28 60 42 F0 24 */ ori r2, r2, gTRKExceptionStatus@l +/* 8008AFEC 00087F2C 38 60 00 01 */ li r3, 1 +/* 8008AFF0 00087F30 98 62 00 0D */ stb r3, 0xd(r2) +/* 8008AFF4 00087F34 7C 73 42 A6 */ mfspr r3, 0x113 +/* 8008AFF8 00087F38 7C 6F F1 20 */ mtcrf 0xff, r3 +/* 8008AFFC 00087F3C 7C 51 42 A6 */ mfspr r2, 0x111 +/* 8008B000 00087F40 7C 72 42 A6 */ mfspr r3, 0x112 +/* 8008B004 00087F44 4C 00 00 64 */ rfi + +.global TRKPostInterruptEvent +TRKPostInterruptEvent: +/* 8008B008 00087F48 7C 08 02 A6 */ mflr r0 +/* 8008B00C 00087F4C 90 01 00 04 */ stw r0, 4(r1) +/* 8008B010 00087F50 94 21 FF E8 */ stwu r1, -0x18(r1) +/* 8008B014 00087F54 3C 60 80 3F */ lis r3, gTRKState@ha +/* 8008B018 00087F58 38 63 AB 88 */ addi r3, r3, gTRKState@l +/* 8008B01C 00087F5C 38 63 00 9C */ addi r3, r3, 0x9c +/* 8008B020 00087F60 80 03 00 00 */ lwz r0, 0(r3) +/* 8008B024 00087F64 2C 00 00 00 */ cmpwi r0, 0 +/* 8008B028 00087F68 41 82 00 10 */ beq lbl_8008B038 +/* 8008B02C 00087F6C 38 00 00 00 */ li r0, 0 +/* 8008B030 00087F70 90 03 00 00 */ stw r0, 0(r3) +/* 8008B034 00087F74 48 00 00 74 */ b lbl_8008B0A8 +lbl_8008B038: +/* 8008B038 00087F78 3C 60 80 3F */ lis r3, gTRKCPUState@ha +/* 8008B03C 00087F7C 38 63 AC 30 */ addi r3, r3, gTRKCPUState@l +/* 8008B040 00087F80 80 03 02 F8 */ lwz r0, 0x2f8(r3) +/* 8008B044 00087F84 54 00 04 3E */ clrlwi r0, r0, 0x10 +/* 8008B048 00087F88 2C 00 0D 00 */ cmpwi r0, 0xd00 +/* 8008B04C 00087F8C 41 82 00 14 */ beq lbl_8008B060 +/* 8008B050 00087F90 40 80 00 44 */ bge lbl_8008B094 +/* 8008B054 00087F94 2C 00 07 00 */ cmpwi r0, 0x700 +/* 8008B058 00087F98 41 82 00 08 */ beq lbl_8008B060 +/* 8008B05C 00087F9C 48 00 00 38 */ b lbl_8008B094 +lbl_8008B060: +/* 8008B060 00087FA0 3C 80 80 3F */ lis r4, gTRKCPUState@ha +/* 8008B064 00087FA4 38 61 00 08 */ addi r3, r1, 8 +/* 8008B068 00087FA8 38 84 AC 30 */ addi r4, r4, gTRKCPUState@l +/* 8008B06C 00087FAC 80 84 00 80 */ lwz r4, 0x80(r4) +/* 8008B070 00087FB0 4B FF F6 B1 */ bl TRKTargetReadInstruction +/* 8008B074 00087FB4 80 61 00 08 */ lwz r3, 8(r1) +/* 8008B078 00087FB8 3C 03 F0 20 */ addis r0, r3, 0xf020 +/* 8008B07C 00087FBC 28 00 00 00 */ cmplwi r0, 0 +/* 8008B080 00087FC0 40 82 00 0C */ bne lbl_8008B08C +/* 8008B084 00087FC4 38 80 00 05 */ li r4, 5 +/* 8008B088 00087FC8 48 00 00 10 */ b lbl_8008B098 +lbl_8008B08C: +/* 8008B08C 00087FCC 38 80 00 03 */ li r4, 3 +/* 8008B090 00087FD0 48 00 00 08 */ b lbl_8008B098 +lbl_8008B094: +/* 8008B094 00087FD4 38 80 00 04 */ li r4, 4 +lbl_8008B098: +/* 8008B098 00087FD8 38 61 00 0C */ addi r3, r1, 0xc +/* 8008B09C 00087FDC 4B FF CD ED */ bl TRKConstructEvent +/* 8008B0A0 00087FE0 38 61 00 0C */ addi r3, r1, 0xc +/* 8008B0A4 00087FE4 4B FF CD 05 */ bl TRKPostEvent +lbl_8008B0A8: +/* 8008B0A8 00087FE8 38 21 00 18 */ addi r1, r1, 0x18 +/* 8008B0AC 00087FEC 80 01 00 04 */ lwz r0, 4(r1) +/* 8008B0B0 00087FF0 7C 08 03 A6 */ mtlr r0 +/* 8008B0B4 00087FF4 4E 80 00 20 */ blr + +.global TRKSwapAndGo +TRKSwapAndGo: +/* 8008B0B8 00087FF8 3C 60 80 3E */ lis r3, gTRKState@h +/* 8008B0BC 00087FFC 60 63 AB 88 */ ori r3, r3, gTRKState@l +/* 8008B0C0 00088000 BC 03 00 00 */ stmw r0, 0(r3) +/* 8008B0C4 00088004 7C 00 00 A6 */ mfmsr r0 +/* 8008B0C8 00088008 90 03 00 8C */ stw r0, 0x8c(r3) +/* 8008B0CC 0008800C 7C 08 02 A6 */ mflr r0 +/* 8008B0D0 00088010 90 03 00 80 */ stw r0, 0x80(r3) +/* 8008B0D4 00088014 7C 09 02 A6 */ mfctr r0 +/* 8008B0D8 00088018 90 03 00 84 */ stw r0, 0x84(r3) +/* 8008B0DC 0008801C 7C 01 02 A6 */ mfxer r0 +/* 8008B0E0 00088020 90 03 00 88 */ stw r0, 0x88(r3) +/* 8008B0E4 00088024 7C 12 02 A6 */ mfdsisr r0 +/* 8008B0E8 00088028 90 03 00 94 */ stw r0, 0x94(r3) +/* 8008B0EC 0008802C 7C 13 02 A6 */ mfdar r0 +/* 8008B0F0 00088030 90 03 00 90 */ stw r0, 0x90(r3) +/* 8008B0F4 00088034 38 20 80 02 */ li r1, -32766 +/* 8008B0F8 00088038 7C 21 08 F8 */ nor r1, r1, r1 +/* 8008B0FC 0008803C 7C 60 00 A6 */ mfmsr r3 +/* 8008B100 00088040 7C 63 08 38 */ and r3, r3, r1 +/* 8008B104 00088044 7C 60 01 24 */ mtmsr r3 +/* 8008B108 00088048 3C 40 80 3E */ lis r2, gTRKState@h +/* 8008B10C 0008804C 60 42 AB 88 */ ori r2, r2, gTRKState@l +/* 8008B110 00088050 80 42 00 A0 */ lwz r2, 0xa0(r2) +/* 8008B114 00088054 88 42 00 00 */ lbz r2, 0x0(r2) +/* 8008B118 00088058 2C 02 00 00 */ cmpwi r2, 0 +/* 8008B11C 0008805C 41 82 00 18 */ beq lbl_8008B134 +/* 8008B120 00088060 3C 40 80 3E */ lis r2, gTRKState@h +/* 8008B124 00088064 60 42 AB 88 */ ori r2, r2, gTRKState@l +/* 8008B128 00088068 38 60 00 01 */ li r3, 1 +/* 8008B12C 0008806C 98 62 00 9C */ stb r3, 0x9c(r2) +/* 8008B130 00088070 48 00 00 4C */ b TRKInterruptHandlerEnableInterrupts +lbl_8008B134: +/* 8008B134 00088074 3C 40 80 3A */ lis r2, gTRKExceptionStatus@h +/* 8008B138 00088078 60 42 F0 24 */ ori r2, r2, gTRKExceptionStatus@l +/* 8008B13C 0008807C 38 60 00 00 */ li r3, 0 +/* 8008B140 00088080 98 62 00 0C */ stb r3, 0xc(r2) +/* 8008B144 00088084 48 00 0C C9 */ bl TRKRestoreExtended1Block +/* 8008B148 00088088 3C 40 80 3E */ lis r2, gTRKCPUState@h +/* 8008B14C 0008808C 60 42 AC 30 */ ori r2, r2, gTRKCPUState@l +/* 8008B150 00088090 BB 62 00 80 */ lmw r27, 0x80(r2) +/* 8008B154 00088094 7F 7A 03 A6 */ mtspr 0x1a, r27 +/* 8008B158 00088098 7F 88 03 A6 */ mtlr r28 +/* 8008B15C 0008809C 7F AF F1 20 */ mtcrf 0xff, r29 +/* 8008B160 000880A0 7F C9 03 A6 */ mtctr r30 +/* 8008B164 000880A4 7F E1 03 A6 */ mtxer r31 +/* 8008B168 000880A8 B8 62 00 0C */ lmw r3, 0xc(r2) +/* 8008B16C 000880AC 80 02 00 00 */ lwz r0, 0x0(r2) +/* 8008B170 000880B0 80 22 00 04 */ lwz r1, 0x4(r2) +/* 8008B174 000880B4 80 42 00 08 */ lwz r2, 0x8(r2) +/* 8008B178 000880B8 4C 00 00 64 */ rfi + +.global TRKInterruptHandlerEnableInterrupts +TRKInterruptHandlerEnableInterrupts: +/* 8008B17C 000880BC 3C 40 80 3E */ lis r2, gTRKState@h +/* 8008B180 000880C0 60 42 AB 88 */ ori r2, r2, gTRKState@l +/* 8008B184 000880C4 80 02 00 8C */ lwz r0, 0x8c(r2) +/* 8008B188 000880C8 7C 00 04 AC */ sync 0 +/* 8008B18C 000880CC 7C 00 01 24 */ mtmsr r0 +/* 8008B190 000880D0 7C 00 04 AC */ sync 0 +/* 8008B194 000880D4 80 02 00 80 */ lwz r0, 0x80(r2) +/* 8008B198 000880D8 7C 08 03 A6 */ mtlr r0 +/* 8008B19C 000880DC 80 02 00 84 */ lwz r0, 0x84(r2) +/* 8008B1A0 000880E0 7C 09 03 A6 */ mtctr r0 +/* 8008B1A4 000880E4 80 02 00 88 */ lwz r0, 0x88(r2) +/* 8008B1A8 000880E8 7C 01 03 A6 */ mtxer r0 +/* 8008B1AC 000880EC 80 02 00 94 */ lwz r0, 0x94(r2) +/* 8008B1B0 000880F0 7C 12 03 A6 */ mtdsisr r0 +/* 8008B1B4 000880F4 80 02 00 90 */ lwz r0, 0x90(r2) +/* 8008B1B8 000880F8 7C 13 03 A6 */ mtdar r0 +/* 8008B1BC 000880FC B8 62 00 0C */ lmw r3, 0xc(r2) +/* 8008B1C0 00088100 80 02 00 00 */ lwz r0, 0x0(r2) +/* 8008B1C4 00088104 80 22 00 04 */ lwz r1, 0x4(r2) +/* 8008B1C8 00088108 80 42 00 08 */ lwz r2, 0x8(r2) +/* 8008B1CC 0008810C 4B FF FE 3C */ b TRKPostInterruptEvent + +.global TRKTargetInterrupt +TRKTargetInterrupt: +/* 8008B1D0 00088110 7C 08 02 A6 */ mflr r0 +/* 8008B1D4 00088114 90 01 00 04 */ stw r0, 4(r1) +/* 8008B1D8 00088118 94 21 FF F0 */ stwu r1, -0x10(r1) +/* 8008B1DC 0008811C 93 E1 00 0C */ stw r31, 0xc(r1) +/* 8008B1E0 00088120 88 03 00 00 */ lbz r0, 0(r3) +/* 8008B1E4 00088124 3B E0 00 00 */ li r31, 0 +/* 8008B1E8 00088128 2C 00 00 05 */ cmpwi r0, 5 +/* 8008B1EC 0008812C 40 80 00 30 */ bge lbl_8008B21C +/* 8008B1F0 00088130 2C 00 00 03 */ cmpwi r0, 3 +/* 8008B1F4 00088134 40 80 00 08 */ bge lbl_8008B1FC +/* 8008B1F8 00088138 48 00 00 24 */ b lbl_8008B21C +lbl_8008B1FC: +/* 8008B1FC 0008813C 48 00 02 81 */ bl TRKTargetCheckStep +/* 8008B200 00088140 2C 03 00 00 */ cmpwi r3, 0 +/* 8008B204 00088144 40 82 00 18 */ bne lbl_8008B21C +/* 8008B208 00088148 38 60 00 01 */ li r3, 1 +/* 8008B20C 0008814C 48 00 04 B1 */ bl TRKTargetSetStopped +/* 8008B210 00088150 38 60 00 90 */ li r3, 0x90 +/* 8008B214 00088154 4B FF F0 51 */ bl TRKDoNotifyStopped +/* 8008B218 00088158 7C 7F 1B 78 */ mr r31, r3 +lbl_8008B21C: +/* 8008B21C 0008815C 7F E3 FB 78 */ mr r3, r31 +/* 8008B220 00088160 83 E1 00 0C */ lwz r31, 0xc(r1) +/* 8008B224 00088164 38 21 00 10 */ addi r1, r1, 0x10 +/* 8008B228 00088168 80 01 00 04 */ lwz r0, 4(r1) +/* 8008B22C 0008816C 7C 08 03 A6 */ mtlr r0 +/* 8008B230 00088170 4E 80 00 20 */ blr + +.global TRKTargetAddStopInfo +TRKTargetAddStopInfo: +/* 8008B234 00088174 7C 08 02 A6 */ mflr r0 +/* 8008B238 00088178 90 01 00 04 */ stw r0, 4(r1) +/* 8008B23C 0008817C 94 21 FF E8 */ stwu r1, -0x18(r1) +/* 8008B240 00088180 93 E1 00 14 */ stw r31, 0x14(r1) +/* 8008B244 00088184 93 C1 00 10 */ stw r30, 0x10(r1) +/* 8008B248 00088188 7C 7E 1B 78 */ mr r30, r3 +/* 8008B24C 0008818C 3C 60 80 3F */ lis r3, gTRKCPUState@ha +/* 8008B250 00088190 38 63 AC 30 */ addi r3, r3, gTRKCPUState@l +/* 8008B254 00088194 3B E3 00 80 */ addi r31, r3, 0x80 +/* 8008B258 00088198 80 9F 00 00 */ lwz r4, 0(r31) +/* 8008B25C 0008819C 7F C3 F3 78 */ mr r3, r30 +/* 8008B260 000881A0 4B FF D1 C5 */ bl TRKAppendBuffer1_ui32 +/* 8008B264 000881A4 2C 03 00 00 */ cmpwi r3, 0 +/* 8008B268 000881A8 40 82 00 10 */ bne lbl_8008B278 +/* 8008B26C 000881AC 38 61 00 08 */ addi r3, r1, 8 +/* 8008B270 000881B0 80 9F 00 00 */ lwz r4, 0(r31) +/* 8008B274 000881B4 4B FF F4 AD */ bl TRKTargetReadInstruction +lbl_8008B278: +/* 8008B278 000881B8 2C 03 00 00 */ cmpwi r3, 0 +/* 8008B27C 000881BC 40 82 00 10 */ bne lbl_8008B28C +/* 8008B280 000881C0 7F C3 F3 78 */ mr r3, r30 +/* 8008B284 000881C4 80 81 00 08 */ lwz r4, 8(r1) +/* 8008B288 000881C8 4B FF D1 9D */ bl TRKAppendBuffer1_ui32 +lbl_8008B28C: +/* 8008B28C 000881CC 2C 03 00 00 */ cmpwi r3, 0 +/* 8008B290 000881D0 40 82 00 1C */ bne lbl_8008B2AC +/* 8008B294 000881D4 3C 60 80 3F */ lis r3, gTRKCPUState@ha +/* 8008B298 000881D8 38 63 AC 30 */ addi r3, r3, gTRKCPUState@l +/* 8008B29C 000881DC 80 03 02 F8 */ lwz r0, 0x2f8(r3) +/* 8008B2A0 000881E0 7F C3 F3 78 */ mr r3, r30 +/* 8008B2A4 000881E4 54 04 04 3E */ clrlwi r4, r0, 0x10 +/* 8008B2A8 000881E8 4B FF D1 29 */ bl TRKAppendBuffer1_ui16 +lbl_8008B2AC: +/* 8008B2AC 000881EC 83 E1 00 14 */ lwz r31, 0x14(r1) +/* 8008B2B0 000881F0 83 C1 00 10 */ lwz r30, 0x10(r1) +/* 8008B2B4 000881F4 38 21 00 18 */ addi r1, r1, 0x18 +/* 8008B2B8 000881F8 80 01 00 04 */ lwz r0, 4(r1) +/* 8008B2BC 000881FC 7C 08 03 A6 */ mtlr r0 +/* 8008B2C0 00088200 4E 80 00 20 */ blr + +.global TRKTargetAddExceptionInfo +TRKTargetAddExceptionInfo: +/* 8008B2C4 00088204 7C 08 02 A6 */ mflr r0 +/* 8008B2C8 00088208 90 01 00 04 */ stw r0, 4(r1) +/* 8008B2CC 0008820C 94 21 FF E8 */ stwu r1, -0x18(r1) +/* 8008B2D0 00088210 93 E1 00 14 */ stw r31, 0x14(r1) +/* 8008B2D4 00088214 93 C1 00 10 */ stw r30, 0x10(r1) +/* 8008B2D8 00088218 7C 7E 1B 78 */ mr r30, r3 +/* 8008B2DC 0008821C 3C 60 80 3B */ lis r3, gTRKExceptionStatus@ha +/* 8008B2E0 00088220 3B E3 F0 24 */ addi r31, r3, gTRKExceptionStatus@l +/* 8008B2E4 00088224 80 9F 00 00 */ lwz r4, 0(r31) +/* 8008B2E8 00088228 7F C3 F3 78 */ mr r3, r30 +/* 8008B2EC 0008822C 4B FF D1 39 */ bl TRKAppendBuffer1_ui32 +/* 8008B2F0 00088230 2C 03 00 00 */ cmpwi r3, 0 +/* 8008B2F4 00088234 40 82 00 10 */ bne lbl_8008B304 +/* 8008B2F8 00088238 38 61 00 08 */ addi r3, r1, 8 +/* 8008B2FC 0008823C 80 9F 00 00 */ lwz r4, 0(r31) +/* 8008B300 00088240 4B FF F4 21 */ bl TRKTargetReadInstruction +lbl_8008B304: +/* 8008B304 00088244 2C 03 00 00 */ cmpwi r3, 0 +/* 8008B308 00088248 40 82 00 10 */ bne lbl_8008B318 +/* 8008B30C 0008824C 7F C3 F3 78 */ mr r3, r30 +/* 8008B310 00088250 80 81 00 08 */ lwz r4, 8(r1) +/* 8008B314 00088254 4B FF D1 11 */ bl TRKAppendBuffer1_ui32 +lbl_8008B318: +/* 8008B318 00088258 2C 03 00 00 */ cmpwi r3, 0 +/* 8008B31C 0008825C 40 82 00 18 */ bne lbl_8008B334 +/* 8008B320 00088260 3C 60 80 3B */ lis r3, gTRKExceptionStatus@ha +/* 8008B324 00088264 38 63 F0 24 */ addi r3, r3, gTRKExceptionStatus@l +/* 8008B328 00088268 A0 83 00 08 */ lhz r4, 8(r3) +/* 8008B32C 0008826C 7F C3 F3 78 */ mr r3, r30 +/* 8008B330 00088270 4B FF D0 A1 */ bl TRKAppendBuffer1_ui16 +lbl_8008B334: +/* 8008B334 00088274 83 E1 00 14 */ lwz r31, 0x14(r1) +/* 8008B338 00088278 83 C1 00 10 */ lwz r30, 0x10(r1) +/* 8008B33C 0008827C 38 21 00 18 */ addi r1, r1, 0x18 +/* 8008B340 00088280 80 01 00 04 */ lwz r0, 4(r1) +/* 8008B344 00088284 7C 08 03 A6 */ mtlr r0 +/* 8008B348 00088288 4E 80 00 20 */ blr + +.global TRKTargetEnableTrace +TRKTargetEnableTrace: +/* 8008B34C 0008828C 2C 03 00 00 */ cmpwi r3, 0 +/* 8008B350 00088290 41 82 00 1C */ beq lbl_8008B36C +/* 8008B354 00088294 3C 60 80 3F */ lis r3, gTRKCPUState@ha +/* 8008B358 00088298 38 63 AC 30 */ addi r3, r3, gTRKCPUState@l +/* 8008B35C 0008829C 80 03 01 F8 */ lwz r0, 0x1f8(r3) +/* 8008B360 000882A0 60 00 04 00 */ ori r0, r0, 0x400 +/* 8008B364 000882A4 90 03 01 F8 */ stw r0, 0x1f8(r3) +/* 8008B368 000882A8 48 00 00 18 */ b lbl_8008B380 +lbl_8008B36C: +/* 8008B36C 000882AC 3C 60 80 3F */ lis r3, gTRKCPUState@ha +/* 8008B370 000882B0 38 63 AC 30 */ addi r3, r3, gTRKCPUState@l +/* 8008B374 000882B4 80 03 01 F8 */ lwz r0, 0x1f8(r3) +/* 8008B378 000882B8 54 00 05 A8 */ rlwinm r0, r0, 0, 0x16, 0x14 +/* 8008B37C 000882BC 90 03 01 F8 */ stw r0, 0x1f8(r3) +lbl_8008B380: +/* 8008B380 000882C0 38 60 00 00 */ li r3, 0 +/* 8008B384 000882C4 4E 80 00 20 */ blr + +.global TRKTargetStepDone +TRKTargetStepDone: +/* 8008B388 000882C8 3C 60 80 3B */ lis r3, gTRKStepStatus@ha +/* 8008B38C 000882CC 38 A3 F0 34 */ addi r5, r3, gTRKStepStatus@l +/* 8008B390 000882D0 80 05 00 00 */ lwz r0, 0(r5) +/* 8008B394 000882D4 38 60 00 01 */ li r3, 1 +/* 8008B398 000882D8 2C 00 00 00 */ cmpwi r0, 0 +/* 8008B39C 000882DC 41 82 00 6C */ beq lbl_8008B408 +/* 8008B3A0 000882E0 3C 80 80 3F */ lis r4, gTRKCPUState@ha +/* 8008B3A4 000882E4 38 84 AC 30 */ addi r4, r4, gTRKCPUState@l +/* 8008B3A8 000882E8 80 04 02 F8 */ lwz r0, 0x2f8(r4) +/* 8008B3AC 000882EC 54 00 04 3E */ clrlwi r0, r0, 0x10 +/* 8008B3B0 000882F0 28 00 0D 00 */ cmplwi r0, 0xd00 +/* 8008B3B4 000882F4 40 82 00 54 */ bne lbl_8008B408 +/* 8008B3B8 000882F8 88 05 00 04 */ lbz r0, 4(r5) +/* 8008B3BC 000882FC 2C 00 00 01 */ cmpwi r0, 1 +/* 8008B3C0 00088300 41 82 00 28 */ beq lbl_8008B3E8 +/* 8008B3C4 00088304 40 80 00 44 */ bge lbl_8008B408 +/* 8008B3C8 00088308 2C 00 00 00 */ cmpwi r0, 0 +/* 8008B3CC 0008830C 40 80 00 08 */ bge lbl_8008B3D4 +/* 8008B3D0 00088310 48 00 00 38 */ b lbl_8008B408 +lbl_8008B3D4: +/* 8008B3D4 00088314 80 05 00 08 */ lwz r0, 8(r5) +/* 8008B3D8 00088318 28 00 00 00 */ cmplwi r0, 0 +/* 8008B3DC 0008831C 41 82 00 2C */ beq lbl_8008B408 +/* 8008B3E0 00088320 38 60 00 00 */ li r3, 0 +/* 8008B3E4 00088324 48 00 00 24 */ b lbl_8008B408 +lbl_8008B3E8: +/* 8008B3E8 00088328 80 84 00 80 */ lwz r4, 0x80(r4) +/* 8008B3EC 0008832C 80 05 00 0C */ lwz r0, 0xc(r5) +/* 8008B3F0 00088330 7C 04 00 40 */ cmplw r4, r0 +/* 8008B3F4 00088334 41 80 00 14 */ blt lbl_8008B408 +/* 8008B3F8 00088338 80 05 00 10 */ lwz r0, 0x10(r5) +/* 8008B3FC 0008833C 7C 04 00 40 */ cmplw r4, r0 +/* 8008B400 00088340 41 81 00 08 */ bgt lbl_8008B408 +/* 8008B404 00088344 38 60 00 00 */ li r3, 0 +lbl_8008B408: +/* 8008B408 00088348 4E 80 00 20 */ blr + +.global TRKTargetDoStep +TRKTargetDoStep: +/* 8008B40C 0008834C 7C 08 02 A6 */ mflr r0 +/* 8008B410 00088350 90 01 00 04 */ stw r0, 4(r1) +/* 8008B414 00088354 94 21 FF F0 */ stwu r1, -0x10(r1) +/* 8008B418 00088358 93 E1 00 0C */ stw r31, 0xc(r1) +/* 8008B41C 0008835C 3C 60 80 3B */ lis r3, gTRKStepStatus@ha +/* 8008B420 00088360 3B E3 F0 34 */ addi r31, r3, gTRKStepStatus@l +/* 8008B424 00088364 38 00 00 01 */ li r0, 1 +/* 8008B428 00088368 90 1F 00 00 */ stw r0, 0(r31) +/* 8008B42C 0008836C 38 60 00 01 */ li r3, 1 +/* 8008B430 00088370 4B FF FF 1D */ bl TRKTargetEnableTrace +/* 8008B434 00088374 88 1F 00 04 */ lbz r0, 4(r31) +/* 8008B438 00088378 28 00 00 00 */ cmplwi r0, 0 +/* 8008B43C 0008837C 41 82 00 0C */ beq lbl_8008B448 +/* 8008B440 00088380 28 00 00 10 */ cmplwi r0, 0x10 +/* 8008B444 00088384 40 82 00 18 */ bne lbl_8008B45C +lbl_8008B448: +/* 8008B448 00088388 3C 60 80 3B */ lis r3, gTRKStepStatus@ha +/* 8008B44C 0008838C 38 83 F0 34 */ addi r4, r3, gTRKStepStatus@l +/* 8008B450 00088390 80 64 00 08 */ lwz r3, 8(r4) +/* 8008B454 00088394 38 03 FF FF */ addi r0, r3, -1 +/* 8008B458 00088398 90 04 00 08 */ stw r0, 8(r4) +lbl_8008B45C: +/* 8008B45C 0008839C 38 60 00 00 */ li r3, 0 +/* 8008B460 000883A0 48 00 02 5D */ bl TRKTargetSetStopped +/* 8008B464 000883A4 38 60 00 00 */ li r3, 0 +/* 8008B468 000883A8 83 E1 00 0C */ lwz r31, 0xc(r1) +/* 8008B46C 000883AC 38 21 00 10 */ addi r1, r1, 0x10 +/* 8008B470 000883B0 80 01 00 04 */ lwz r0, 4(r1) +/* 8008B474 000883B4 7C 08 03 A6 */ mtlr r0 +/* 8008B478 000883B8 4E 80 00 20 */ blr + +.global TRKTargetCheckStep +TRKTargetCheckStep: +/* 8008B47C 000883BC 7C 08 02 A6 */ mflr r0 +/* 8008B480 000883C0 90 01 00 04 */ stw r0, 4(r1) +/* 8008B484 000883C4 94 21 FF F0 */ stwu r1, -0x10(r1) +/* 8008B488 000883C8 93 E1 00 0C */ stw r31, 0xc(r1) +/* 8008B48C 000883CC 3C 60 80 3B */ lis r3, gTRKStepStatus@ha +/* 8008B490 000883D0 3B E3 F0 34 */ addi r31, r3, gTRKStepStatus@l +/* 8008B494 000883D4 80 1F 00 00 */ lwz r0, 0(r31) +/* 8008B498 000883D8 2C 00 00 00 */ cmpwi r0, 0 +/* 8008B49C 000883DC 41 82 00 28 */ beq lbl_8008B4C4 +/* 8008B4A0 000883E0 38 60 00 00 */ li r3, 0 +/* 8008B4A4 000883E4 4B FF FE A9 */ bl TRKTargetEnableTrace +/* 8008B4A8 000883E8 4B FF FE E1 */ bl TRKTargetStepDone +/* 8008B4AC 000883EC 2C 03 00 00 */ cmpwi r3, 0 +/* 8008B4B0 000883F0 41 82 00 10 */ beq lbl_8008B4C0 +/* 8008B4B4 000883F4 38 00 00 00 */ li r0, 0 +/* 8008B4B8 000883F8 90 1F 00 00 */ stw r0, 0(r31) +/* 8008B4BC 000883FC 48 00 00 08 */ b lbl_8008B4C4 +lbl_8008B4C0: +/* 8008B4C0 00088400 4B FF FF 4D */ bl TRKTargetDoStep +lbl_8008B4C4: +/* 8008B4C4 00088404 3C 60 80 3B */ lis r3, gTRKStepStatus@ha +/* 8008B4C8 00088408 38 63 F0 34 */ addi r3, r3, gTRKStepStatus@l +/* 8008B4CC 0008840C 80 63 00 00 */ lwz r3, 0(r3) +/* 8008B4D0 00088410 83 E1 00 0C */ lwz r31, 0xc(r1) +/* 8008B4D4 00088414 38 21 00 10 */ addi r1, r1, 0x10 +/* 8008B4D8 00088418 80 01 00 04 */ lwz r0, 4(r1) +/* 8008B4DC 0008841C 7C 08 03 A6 */ mtlr r0 +/* 8008B4E0 00088420 4E 80 00 20 */ blr + +.global TRKTargetSingleStep +TRKTargetSingleStep: +/* 8008B4E4 00088424 7C 08 02 A6 */ mflr r0 +/* 8008B4E8 00088428 90 01 00 04 */ stw r0, 4(r1) +/* 8008B4EC 0008842C 94 21 FF F8 */ stwu r1, -8(r1) +/* 8008B4F0 00088430 2C 04 00 00 */ cmpwi r4, 0 +/* 8008B4F4 00088434 41 82 00 0C */ beq lbl_8008B500 +/* 8008B4F8 00088438 38 60 07 03 */ li r3, 0x703 +/* 8008B4FC 0008843C 48 00 00 1C */ b lbl_8008B518 +lbl_8008B500: +/* 8008B500 00088440 3C 80 80 3B */ lis r4, gTRKStepStatus@ha +/* 8008B504 00088444 38 84 F0 34 */ addi r4, r4, gTRKStepStatus@l +/* 8008B508 00088448 38 00 00 00 */ li r0, 0 +/* 8008B50C 0008844C 98 04 00 04 */ stb r0, 4(r4) +/* 8008B510 00088450 90 64 00 08 */ stw r3, 8(r4) +/* 8008B514 00088454 4B FF FE F9 */ bl TRKTargetDoStep +lbl_8008B518: +/* 8008B518 00088458 38 21 00 08 */ addi r1, r1, 8 +/* 8008B51C 0008845C 80 01 00 04 */ lwz r0, 4(r1) +/* 8008B520 00088460 7C 08 03 A6 */ mtlr r0 +/* 8008B524 00088464 4E 80 00 20 */ blr + +.global TRKTargetStepOutOfRange +TRKTargetStepOutOfRange: +/* 8008B528 00088468 7C 08 02 A6 */ mflr r0 +/* 8008B52C 0008846C 90 01 00 04 */ stw r0, 4(r1) +/* 8008B530 00088470 94 21 FF F8 */ stwu r1, -8(r1) +/* 8008B534 00088474 2C 05 00 00 */ cmpwi r5, 0 +/* 8008B538 00088478 41 82 00 0C */ beq lbl_8008B544 +/* 8008B53C 0008847C 38 60 07 03 */ li r3, 0x703 +/* 8008B540 00088480 48 00 00 20 */ b lbl_8008B560 +lbl_8008B544: +/* 8008B544 00088484 3C A0 80 3B */ lis r5, gTRKStepStatus@ha +/* 8008B548 00088488 38 A5 F0 34 */ addi r5, r5, gTRKStepStatus@l +/* 8008B54C 0008848C 38 00 00 01 */ li r0, 1 +/* 8008B550 00088490 98 05 00 04 */ stb r0, 4(r5) +/* 8008B554 00088494 90 65 00 0C */ stw r3, 0xc(r5) +/* 8008B558 00088498 90 85 00 10 */ stw r4, 0x10(r5) +/* 8008B55C 0008849C 4B FF FE B1 */ bl TRKTargetDoStep +lbl_8008B560: +/* 8008B560 000884A0 38 21 00 08 */ addi r1, r1, 8 +/* 8008B564 000884A4 80 01 00 04 */ lwz r0, 4(r1) +/* 8008B568 000884A8 7C 08 03 A6 */ mtlr r0 +/* 8008B56C 000884AC 4E 80 00 20 */ blr + +.global TRKTargetGetPC +TRKTargetGetPC: +/* 8008B570 000884B0 3C 60 80 3F */ lis r3, gTRKCPUState@ha +/* 8008B574 000884B4 38 63 AC 30 */ addi r3, r3, gTRKCPUState@l +/* 8008B578 000884B8 80 63 00 80 */ lwz r3, 0x80(r3) +/* 8008B57C 000884BC 4E 80 00 20 */ blr + +.global TRKTargetSupportRequest +TRKTargetSupportRequest: +/* 8008B580 000884C0 7C 08 02 A6 */ mflr r0 +/* 8008B584 000884C4 90 01 00 04 */ stw r0, 4(r1) +/* 8008B588 000884C8 94 21 FF D0 */ stwu r1, -0x30(r1) +/* 8008B58C 000884CC BF 61 00 1C */ stmw r27, 0x1c(r1) +/* 8008B590 000884D0 3C 60 80 3F */ lis r3, gTRKCPUState@ha +/* 8008B594 000884D4 38 63 AC 30 */ addi r3, r3, gTRKCPUState@l +/* 8008B598 000884D8 3B E3 00 0C */ addi r31, r3, 0xc +/* 8008B59C 000884DC 80 1F 00 00 */ lwz r0, 0(r31) +/* 8008B5A0 000884E0 54 1B 06 3E */ clrlwi r27, r0, 0x18 +/* 8008B5A4 000884E4 28 1B 00 D1 */ cmplwi r27, 0xd1 +/* 8008B5A8 000884E8 41 82 00 28 */ beq lbl_8008B5D0 +/* 8008B5AC 000884EC 28 1B 00 D0 */ cmplwi r27, 0xd0 +/* 8008B5B0 000884F0 41 82 00 20 */ beq lbl_8008B5D0 +/* 8008B5B4 000884F4 38 61 00 0C */ addi r3, r1, 0xc +/* 8008B5B8 000884F8 38 80 00 04 */ li r4, 4 +/* 8008B5BC 000884FC 4B FF C8 CD */ bl TRKConstructEvent +/* 8008B5C0 00088500 38 61 00 0C */ addi r3, r1, 0xc +/* 8008B5C4 00088504 4B FF C7 E5 */ bl TRKPostEvent +/* 8008B5C8 00088508 38 60 00 00 */ li r3, 0 +/* 8008B5CC 0008850C 48 00 00 90 */ b lbl_8008B65C +lbl_8008B5D0: +/* 8008B5D0 00088510 3C 60 80 3F */ lis r3, gTRKCPUState@ha +/* 8008B5D4 00088514 38 C1 00 08 */ addi r6, r1, 8 +/* 8008B5D8 00088518 38 83 AC 30 */ addi r4, r3, gTRKCPUState@l +/* 8008B5DC 0008851C 80 64 00 10 */ lwz r3, 0x10(r4) +/* 8008B5E0 00088520 20 1B 00 D1 */ subfic r0, r27, 0xd1 +/* 8008B5E4 00088524 83 84 00 14 */ lwz r28, 0x14(r4) +/* 8008B5E8 00088528 3B C4 00 18 */ addi r30, r4, 0x18 +/* 8008B5EC 0008852C 7C 00 00 34 */ cntlzw r0, r0 +/* 8008B5F0 00088530 80 9E 00 00 */ lwz r4, 0(r30) +/* 8008B5F4 00088534 54 63 06 3E */ clrlwi r3, r3, 0x18 +/* 8008B5F8 00088538 7F 85 E3 78 */ mr r5, r28 +/* 8008B5FC 0008853C 54 08 D9 7E */ srwi r8, r0, 5 +/* 8008B600 00088540 38 E0 00 01 */ li r7, 1 +/* 8008B604 00088544 4B FF E7 CD */ bl TRKSuppAccessFile +/* 8008B608 00088548 88 01 00 08 */ lbz r0, 8(r1) +/* 8008B60C 0008854C 7C 7D 1B 78 */ mr r29, r3 +/* 8008B610 00088550 28 00 00 00 */ cmplwi r0, 0 +/* 8008B614 00088554 40 82 00 14 */ bne lbl_8008B628 +/* 8008B618 00088558 2C 1D 00 00 */ cmpwi r29, 0 +/* 8008B61C 0008855C 41 82 00 0C */ beq lbl_8008B628 +/* 8008B620 00088560 38 00 00 01 */ li r0, 1 +/* 8008B624 00088564 98 01 00 08 */ stb r0, 8(r1) +lbl_8008B628: +/* 8008B628 00088568 88 01 00 08 */ lbz r0, 8(r1) +/* 8008B62C 0008856C 28 1B 00 D1 */ cmplwi r27, 0xd1 +/* 8008B630 00088570 90 1F 00 00 */ stw r0, 0(r31) +/* 8008B634 00088574 40 82 00 10 */ bne lbl_8008B644 +/* 8008B638 00088578 80 7E 00 00 */ lwz r3, 0(r30) +/* 8008B63C 0008857C 80 9C 00 00 */ lwz r4, 0(r28) +/* 8008B640 00088580 4B FF EC FD */ bl TRK_flush_cache +lbl_8008B644: +/* 8008B644 00088584 3C 60 80 3F */ lis r3, gTRKCPUState@ha +/* 8008B648 00088588 38 A3 AC 30 */ addi r5, r3, gTRKCPUState@l +/* 8008B64C 0008858C 80 85 00 80 */ lwz r4, 0x80(r5) +/* 8008B650 00088590 7F A3 EB 78 */ mr r3, r29 +/* 8008B654 00088594 38 04 00 04 */ addi r0, r4, 4 +/* 8008B658 00088598 90 05 00 80 */ stw r0, 0x80(r5) +lbl_8008B65C: +/* 8008B65C 0008859C BB 61 00 1C */ lmw r27, 0x1c(r1) +/* 8008B660 000885A0 38 21 00 30 */ addi r1, r1, 0x30 +/* 8008B664 000885A4 80 01 00 04 */ lwz r0, 4(r1) +/* 8008B668 000885A8 7C 08 03 A6 */ mtlr r0 +/* 8008B66C 000885AC 4E 80 00 20 */ blr + +.global TRKTargetFlushCache +TRKTargetFlushCache: +/* 8008B670 000885B0 7C 08 02 A6 */ mflr r0 +/* 8008B674 000885B4 90 01 00 04 */ stw r0, 4(r1) +/* 8008B678 000885B8 94 21 FF F8 */ stwu r1, -8(r1) +/* 8008B67C 000885BC 7C 04 28 40 */ cmplw r4, r5 +/* 8008B680 000885C0 40 80 00 18 */ bge lbl_8008B698 +/* 8008B684 000885C4 7C 83 23 78 */ mr r3, r4 +/* 8008B688 000885C8 7C 84 28 50 */ subf r4, r4, r5 +/* 8008B68C 000885CC 4B FF EC B1 */ bl TRK_flush_cache +/* 8008B690 000885D0 38 60 00 00 */ li r3, 0 +/* 8008B694 000885D4 48 00 00 08 */ b lbl_8008B69C +lbl_8008B698: +/* 8008B698 000885D8 38 60 07 00 */ li r3, 0x700 +lbl_8008B69C: +/* 8008B69C 000885DC 38 21 00 08 */ addi r1, r1, 8 +/* 8008B6A0 000885E0 80 01 00 04 */ lwz r0, 4(r1) +/* 8008B6A4 000885E4 7C 08 03 A6 */ mtlr r0 +/* 8008B6A8 000885E8 4E 80 00 20 */ blr + +.global TRKTargetStopped +TRKTargetStopped: +/* 8008B6AC 000885EC 3C 60 80 3F */ lis r3, gTRKState@ha +/* 8008B6B0 000885F0 38 63 AB 88 */ addi r3, r3, gTRKState@l +/* 8008B6B4 000885F4 80 63 00 98 */ lwz r3, 0x98(r3) +/* 8008B6B8 000885F8 4E 80 00 20 */ blr + +.global TRKTargetSetStopped +TRKTargetSetStopped: +/* 8008B6BC 000885FC 3C 80 80 3F */ lis r4, gTRKState@ha +/* 8008B6C0 00088600 38 84 AB 88 */ addi r4, r4, gTRKState@l +/* 8008B6C4 00088604 90 64 00 98 */ stw r3, 0x98(r4) +/* 8008B6C8 00088608 4E 80 00 20 */ blr + +.global TRKTargetStop +TRKTargetStop: +/* 8008B6CC 0008860C 7C 08 02 A6 */ mflr r0 +/* 8008B6D0 00088610 90 01 00 04 */ stw r0, 4(r1) +/* 8008B6D4 00088614 94 21 FF F8 */ stwu r1, -8(r1) +/* 8008B6D8 00088618 38 60 00 01 */ li r3, 1 +/* 8008B6DC 0008861C 4B FF FF E1 */ bl TRKTargetSetStopped +/* 8008B6E0 00088620 38 60 00 00 */ li r3, 0 +/* 8008B6E4 00088624 38 21 00 08 */ addi r1, r1, 8 +/* 8008B6E8 00088628 80 01 00 04 */ lwz r0, 4(r1) +/* 8008B6EC 0008862C 7C 08 03 A6 */ mtlr r0 +/* 8008B6F0 00088630 4E 80 00 20 */ blr + +.global TRKPPCAccessSPR +TRKPPCAccessSPR: +/* 8008B6F4 00088634 7C 08 02 A6 */ mflr r0 +/* 8008B6F8 00088638 90 01 00 04 */ stw r0, 4(r1) +/* 8008B6FC 0008863C 94 21 FF E0 */ stwu r1, -0x20(r1) +/* 8008B700 00088640 3C C0 80 37 */ lis r6, "@233"@ha +/* 8008B704 00088644 2C 05 00 00 */ cmpwi r5, 0 +/* 8008B708 00088648 38 E6 22 20 */ addi r7, r6, "@233"@l +/* 8008B70C 0008864C 80 C7 00 00 */ lwz r6, 0(r7) +/* 8008B710 00088650 80 07 00 04 */ lwz r0, 4(r7) +/* 8008B714 00088654 90 C1 00 08 */ stw r6, 8(r1) +/* 8008B718 00088658 90 01 00 0C */ stw r0, 0xc(r1) +/* 8008B71C 0008865C 80 C7 00 08 */ lwz r6, 8(r7) +/* 8008B720 00088660 80 07 00 0C */ lwz r0, 0xc(r7) +/* 8008B724 00088664 90 C1 00 10 */ stw r6, 0x10(r1) +/* 8008B728 00088668 90 01 00 14 */ stw r0, 0x14(r1) +/* 8008B72C 0008866C 80 07 00 10 */ lwz r0, 0x10(r7) +/* 8008B730 00088670 90 01 00 18 */ stw r0, 0x18(r1) +/* 8008B734 00088674 41 82 00 30 */ beq lbl_8008B764 +/* 8008B738 00088678 54 80 05 34 */ rlwinm r0, r4, 0, 0x14, 0x1a +/* 8008B73C 0008867C 54 06 30 32 */ slwi r6, r0, 6 +/* 8008B740 00088680 54 80 06 FE */ clrlwi r0, r4, 0x1b +/* 8008B744 00088684 64 C4 7C 80 */ oris r4, r6, 0x7c80 +/* 8008B748 00088688 54 00 80 1E */ slwi r0, r0, 0x10 +/* 8008B74C 0008868C 7C 80 03 78 */ or r0, r4, r0 +/* 8008B750 00088690 60 00 02 A6 */ ori r0, r0, 0x2a6 +/* 8008B754 00088694 90 01 00 08 */ stw r0, 8(r1) +/* 8008B758 00088698 3C 00 90 83 */ lis r0, 0x9083 +/* 8008B75C 0008869C 90 01 00 0C */ stw r0, 0xc(r1) +/* 8008B760 000886A0 48 00 00 2C */ b lbl_8008B78C +lbl_8008B764: +/* 8008B764 000886A4 54 80 05 34 */ rlwinm r0, r4, 0, 0x14, 0x1a +/* 8008B768 000886A8 54 06 30 32 */ slwi r6, r0, 6 +/* 8008B76C 000886AC 54 80 06 FE */ clrlwi r0, r4, 0x1b +/* 8008B770 000886B0 3C E0 80 83 */ lis r7, 0x8083 +/* 8008B774 000886B4 64 C4 7C 80 */ oris r4, r6, 0x7c80 +/* 8008B778 000886B8 90 E1 00 08 */ stw r7, 8(r1) +/* 8008B77C 000886BC 54 00 80 1E */ slwi r0, r0, 0x10 +/* 8008B780 000886C0 7C 80 03 78 */ or r0, r4, r0 +/* 8008B784 000886C4 60 00 03 A6 */ ori r0, r0, 0x3a6 +/* 8008B788 000886C8 90 01 00 0C */ stw r0, 0xc(r1) +lbl_8008B78C: +/* 8008B78C 000886CC 38 81 00 08 */ addi r4, r1, 8 +/* 8008B790 000886D0 48 00 02 0D */ bl TRKPPCAccessSpecialReg +/* 8008B794 000886D4 38 21 00 20 */ addi r1, r1, 0x20 +/* 8008B798 000886D8 80 01 00 04 */ lwz r0, 4(r1) +/* 8008B79C 000886DC 7C 08 03 A6 */ mtlr r0 +/* 8008B7A0 000886E0 4E 80 00 20 */ blr + +.global TRKPPCAccessPairedSingleRegister +TRKPPCAccessPairedSingleRegister: +/* 8008B7A4 000886E4 7C 08 02 A6 */ mflr r0 +/* 8008B7A8 000886E8 90 01 00 04 */ stw r0, 4(r1) +/* 8008B7AC 000886EC 94 21 FF E0 */ stwu r1, -0x20(r1) +/* 8008B7B0 000886F0 3C C0 80 37 */ lis r6, "@238"@ha +/* 8008B7B4 000886F4 2C 05 00 00 */ cmpwi r5, 0 +/* 8008B7B8 000886F8 38 E6 22 34 */ addi r7, r6, "@238"@l +/* 8008B7BC 000886FC 80 C7 00 00 */ lwz r6, 0(r7) +/* 8008B7C0 00088700 80 07 00 04 */ lwz r0, 4(r7) +/* 8008B7C4 00088704 90 C1 00 08 */ stw r6, 8(r1) +/* 8008B7C8 00088708 90 01 00 0C */ stw r0, 0xc(r1) +/* 8008B7CC 0008870C 80 C7 00 08 */ lwz r6, 8(r7) +/* 8008B7D0 00088710 80 07 00 0C */ lwz r0, 0xc(r7) +/* 8008B7D4 00088714 90 C1 00 10 */ stw r6, 0x10(r1) +/* 8008B7D8 00088718 90 01 00 14 */ stw r0, 0x14(r1) +/* 8008B7DC 0008871C 80 07 00 10 */ lwz r0, 0x10(r7) +/* 8008B7E0 00088720 90 01 00 18 */ stw r0, 0x18(r1) +/* 8008B7E4 00088724 41 82 00 14 */ beq lbl_8008B7F8 +/* 8008B7E8 00088728 54 80 A8 14 */ slwi r0, r4, 0x15 +/* 8008B7EC 0008872C 64 00 F0 03 */ oris r0, r0, 0xf003 +/* 8008B7F0 00088730 90 01 00 08 */ stw r0, 8(r1) +/* 8008B7F4 00088734 48 00 00 10 */ b lbl_8008B804 +lbl_8008B7F8: +/* 8008B7F8 00088738 54 80 A8 14 */ slwi r0, r4, 0x15 +/* 8008B7FC 0008873C 64 00 E0 03 */ oris r0, r0, 0xe003 +/* 8008B800 00088740 90 01 00 08 */ stw r0, 8(r1) +lbl_8008B804: +/* 8008B804 00088744 38 81 00 08 */ addi r4, r1, 8 +/* 8008B808 00088748 48 00 01 95 */ bl TRKPPCAccessSpecialReg +/* 8008B80C 0008874C 38 21 00 20 */ addi r1, r1, 0x20 +/* 8008B810 00088750 80 01 00 04 */ lwz r0, 4(r1) +/* 8008B814 00088754 7C 08 03 A6 */ mtlr r0 +/* 8008B818 00088758 4E 80 00 20 */ blr + +.global TRKPPCAccessFPRegister +TRKPPCAccessFPRegister: +/* 8008B81C 0008875C 7C 08 02 A6 */ mflr r0 +/* 8008B820 00088760 90 01 00 04 */ stw r0, 4(r1) +/* 8008B824 00088764 94 21 FF D8 */ stwu r1, -0x28(r1) +/* 8008B828 00088768 93 E1 00 24 */ stw r31, 0x24(r1) +/* 8008B82C 0008876C 93 C1 00 20 */ stw r30, 0x20(r1) +/* 8008B830 00088770 7C 7E 1B 78 */ mr r30, r3 +/* 8008B834 00088774 7C BF 2B 78 */ mr r31, r5 +/* 8008B838 00088778 3C 60 80 37 */ lis r3, "@243"@ha +/* 8008B83C 0008877C 28 04 00 20 */ cmplwi r4, 0x20 +/* 8008B840 00088780 38 C3 22 48 */ addi r6, r3, "@243"@l +/* 8008B844 00088784 80 A6 00 00 */ lwz r5, 0(r6) +/* 8008B848 00088788 38 60 00 00 */ li r3, 0 +/* 8008B84C 0008878C 80 06 00 04 */ lwz r0, 4(r6) +/* 8008B850 00088790 90 A1 00 08 */ stw r5, 8(r1) +/* 8008B854 00088794 90 01 00 0C */ stw r0, 0xc(r1) +/* 8008B858 00088798 80 A6 00 08 */ lwz r5, 8(r6) +/* 8008B85C 0008879C 80 06 00 0C */ lwz r0, 0xc(r6) +/* 8008B860 000887A0 90 A1 00 10 */ stw r5, 0x10(r1) +/* 8008B864 000887A4 90 01 00 14 */ stw r0, 0x14(r1) +/* 8008B868 000887A8 80 06 00 10 */ lwz r0, 0x10(r6) +/* 8008B86C 000887AC 90 01 00 18 */ stw r0, 0x18(r1) +/* 8008B870 000887B0 40 80 00 3C */ bge lbl_8008B8AC +/* 8008B874 000887B4 2C 1F 00 00 */ cmpwi r31, 0 +/* 8008B878 000887B8 41 82 00 14 */ beq lbl_8008B88C +/* 8008B87C 000887BC 54 80 A8 14 */ slwi r0, r4, 0x15 +/* 8008B880 000887C0 64 00 D8 03 */ oris r0, r0, 0xd803 +/* 8008B884 000887C4 90 01 00 08 */ stw r0, 8(r1) +/* 8008B888 000887C8 48 00 00 10 */ b lbl_8008B898 +lbl_8008B88C: +/* 8008B88C 000887CC 54 80 A8 14 */ slwi r0, r4, 0x15 +/* 8008B890 000887D0 64 00 C8 03 */ oris r0, r0, 0xc803 +/* 8008B894 000887D4 90 01 00 08 */ stw r0, 8(r1) +lbl_8008B898: +/* 8008B898 000887D8 7F C3 F3 78 */ mr r3, r30 +/* 8008B89C 000887DC 38 81 00 08 */ addi r4, r1, 8 +/* 8008B8A0 000887E0 7F E5 FB 78 */ mr r5, r31 +/* 8008B8A4 000887E4 48 00 00 F9 */ bl TRKPPCAccessSpecialReg +/* 8008B8A8 000887E8 48 00 00 DC */ b lbl_8008B984 +lbl_8008B8AC: +/* 8008B8AC 000887EC 40 82 00 8C */ bne lbl_8008B938 +/* 8008B8B0 000887F0 2C 1F 00 00 */ cmpwi r31, 0 +/* 8008B8B4 000887F4 41 82 00 2C */ beq lbl_8008B8E0 +/* 8008B8B8 000887F8 3C 00 D8 24 */ lis r0, 0xd824 +/* 8008B8BC 000887FC 3C 60 FC 20 */ lis r3, 0xFC20048E@ha +/* 8008B8C0 00088800 90 01 00 08 */ stw r0, 8(r1) +/* 8008B8C4 00088804 38 03 04 8E */ addi r0, r3, 0xFC20048E@l +/* 8008B8C8 00088808 90 01 00 0C */ stw r0, 0xc(r1) +/* 8008B8CC 0008880C 3C 60 D8 23 */ lis r3, 0xd823 +/* 8008B8D0 00088810 3C 00 C8 24 */ lis r0, 0xc824 +/* 8008B8D4 00088814 90 61 00 10 */ stw r3, 0x10(r1) +/* 8008B8D8 00088818 90 01 00 14 */ stw r0, 0x14(r1) +/* 8008B8DC 0008881C 48 00 00 28 */ b lbl_8008B904 +lbl_8008B8E0: +/* 8008B8E0 00088820 3C 00 D8 24 */ lis r0, 0xd824 +/* 8008B8E4 00088824 90 01 00 08 */ stw r0, 8(r1) +/* 8008B8E8 00088828 3C 00 C8 23 */ lis r0, 0xc823 +/* 8008B8EC 0008882C 3C 60 FD FE */ lis r3, 0xFDFE0D8E@ha +/* 8008B8F0 00088830 90 01 00 0C */ stw r0, 0xc(r1) +/* 8008B8F4 00088834 38 63 0D 8E */ addi r3, r3, 0xFDFE0D8E@l +/* 8008B8F8 00088838 3C 00 C8 24 */ lis r0, 0xc824 +/* 8008B8FC 0008883C 90 61 00 10 */ stw r3, 0x10(r1) +/* 8008B900 00088840 90 01 00 14 */ stw r0, 0x14(r1) +lbl_8008B904: +/* 8008B904 00088844 7F C3 F3 78 */ mr r3, r30 +/* 8008B908 00088848 38 81 00 08 */ addi r4, r1, 8 +/* 8008B90C 0008884C 7F E5 FB 78 */ mr r5, r31 +/* 8008B910 00088850 48 00 00 8D */ bl TRKPPCAccessSpecialReg +/* 8008B914 00088854 80 DE 00 04 */ lwz r6, 4(r30) +/* 8008B918 00088858 38 00 FF FF */ li r0, -1 +/* 8008B91C 0008885C 80 BE 00 00 */ lwz r5, 0(r30) +/* 8008B920 00088860 38 80 00 00 */ li r4, 0 +/* 8008B924 00088864 7C C0 00 38 */ and r0, r6, r0 +/* 8008B928 00088868 90 1E 00 04 */ stw r0, 4(r30) +/* 8008B92C 0008886C 7C A0 20 38 */ and r0, r5, r4 +/* 8008B930 00088870 90 1E 00 00 */ stw r0, 0(r30) +/* 8008B934 00088874 48 00 00 50 */ b lbl_8008B984 +lbl_8008B938: +/* 8008B938 00088878 28 04 00 21 */ cmplwi r4, 0x21 +/* 8008B93C 0008887C 40 82 00 48 */ bne lbl_8008B984 +/* 8008B940 00088880 2C 1F 00 00 */ cmpwi r31, 0 +/* 8008B944 00088884 40 82 00 0C */ bne lbl_8008B950 +/* 8008B948 00088888 80 1E 00 04 */ lwz r0, 4(r30) +/* 8008B94C 0008888C 90 1E 00 00 */ stw r0, 0(r30) +lbl_8008B950: +/* 8008B950 00088890 7F C3 F3 78 */ mr r3, r30 +/* 8008B954 00088894 7F E5 FB 78 */ mr r5, r31 +/* 8008B958 00088898 38 80 03 FE */ li r4, 0x3fe +/* 8008B95C 0008889C 4B FF FD 99 */ bl TRKPPCAccessSPR +/* 8008B960 000888A0 2C 1F 00 00 */ cmpwi r31, 0 +/* 8008B964 000888A4 41 82 00 20 */ beq lbl_8008B984 +/* 8008B968 000888A8 80 BE 00 00 */ lwz r5, 0(r30) +/* 8008B96C 000888AC 38 00 FF FF */ li r0, -1 +/* 8008B970 000888B0 38 80 00 00 */ li r4, 0 +/* 8008B974 000888B4 7C A0 00 38 */ and r0, r5, r0 +/* 8008B978 000888B8 90 1E 00 04 */ stw r0, 4(r30) +/* 8008B97C 000888BC 7C 80 20 38 */ and r0, r4, r4 +/* 8008B980 000888C0 90 1E 00 00 */ stw r0, 0(r30) +lbl_8008B984: +/* 8008B984 000888C4 83 E1 00 24 */ lwz r31, 0x24(r1) +/* 8008B988 000888C8 83 C1 00 20 */ lwz r30, 0x20(r1) +/* 8008B98C 000888CC 38 21 00 28 */ addi r1, r1, 0x28 +/* 8008B990 000888D0 80 01 00 04 */ lwz r0, 4(r1) +/* 8008B994 000888D4 7C 08 03 A6 */ mtlr r0 +/* 8008B998 000888D8 4E 80 00 20 */ blr + +.global TRKPPCAccessSpecialReg +TRKPPCAccessSpecialReg: +/* 8008B99C 000888DC 7C 08 02 A6 */ mflr r0 +/* 8008B9A0 000888E0 90 01 00 04 */ stw r0, 4(r1) +/* 8008B9A4 000888E4 94 21 FF F0 */ stwu r1, -0x10(r1) +/* 8008B9A8 000888E8 93 E1 00 0C */ stw r31, 0xc(r1) +/* 8008B9AC 000888EC 93 C1 00 08 */ stw r30, 8(r1) +/* 8008B9B0 000888F0 7C 7E 1B 78 */ mr r30, r3 +/* 8008B9B4 000888F4 7C 9F 23 78 */ mr r31, r4 +/* 8008B9B8 000888F8 3C 60 4E 80 */ lis r3, 0x4E800020@ha +/* 8008B9BC 000888FC 38 03 00 20 */ addi r0, r3, 0x4E800020@l +/* 8008B9C0 00088900 90 1F 00 10 */ stw r0, 0x10(r31) +/* 8008B9C4 00088904 7F E3 FB 78 */ mr r3, r31 +/* 8008B9C8 00088908 38 80 00 14 */ li r4, 0x14 +/* 8008B9CC 0008890C 4B FF E9 71 */ bl TRK_flush_cache +/* 8008B9D0 00088910 3C 60 80 3F */ lis r3, TRKvalue128_temp@ha +/* 8008B9D4 00088914 38 83 AB 78 */ addi r4, r3, TRKvalue128_temp@l +/* 8008B9D8 00088918 7F C3 F3 78 */ mr r3, r30 +/* 8008B9DC 0008891C 7F EC FB 78 */ mr r12, r31 +/* 8008B9E0 00088920 7D 88 03 A6 */ mtlr r12 +/* 8008B9E4 00088924 4E 80 00 21 */ blrl +/* 8008B9E8 00088928 38 60 00 00 */ li r3, 0 +/* 8008B9EC 0008892C 83 E1 00 0C */ lwz r31, 0xc(r1) +/* 8008B9F0 00088930 83 C1 00 08 */ lwz r30, 8(r1) +/* 8008B9F4 00088934 38 21 00 10 */ addi r1, r1, 0x10 +/* 8008B9F8 00088938 80 01 00 04 */ lwz r0, 4(r1) +/* 8008B9FC 0008893C 7C 08 03 A6 */ mtlr r0 +/* 8008BA00 00088940 4E 80 00 20 */ blr + +.global TRKTargetSetInputPendingPtr +TRKTargetSetInputPendingPtr: +/* 8008BA04 00088944 3C 80 80 3F */ lis r4, gTRKState@ha +/* 8008BA08 00088948 38 84 AB 88 */ addi r4, r4, gTRKState@l +/* 8008BA0C 0008894C 90 64 00 A0 */ stw r3, 0xa0(r4) +/* 8008BA10 00088950 4E 80 00 20 */ blr + +.section .rodata, "a" # 0x8036FFA0 - 0x803A8380 +.balign 8 +.global gTRKMemMap +gTRKMemMap: + .4byte 0 + .4byte 0xFFFFFFFF + .4byte 0x00000001 + .4byte 0x00000001 +"@233": + .4byte 0x60000000 + .4byte 0x60000000 + .4byte 0x60000000 + .4byte 0x60000000 + .4byte 0x60000000 +"@238": + .4byte 0x60000000 + .4byte 0x60000000 + .4byte 0x60000000 + .4byte 0x60000000 + .4byte 0x60000000 +"@243": + .4byte 0x60000000 + .4byte 0x60000000 + .4byte 0x60000000 + .4byte 0x60000000 + .4byte 0x60000000 + .4byte 0 + +.section .data, "wa" # 0x803A8380 - 0x803E6000 +.global gTRKRestoreFlags +gTRKRestoreFlags: + .4byte 0 + .4byte 0 + .4byte 0 +.global gTRKExceptionStatus +gTRKExceptionStatus: + .4byte 0 + .4byte 0 + .4byte 0 + .4byte 0x01000000 +.global gTRKStepStatus +gTRKStepStatus: + .4byte 0 + .4byte 0 + .4byte 0 + .4byte 0 + .4byte 0 + +.section .bss, "wa" # 0x803E6000 - 0x80408AC0 +TRK_saved_exceptionID: + .skip 0x4 +.global gTRKSaveState +gTRKSaveState: + .skip 0x94 +TRKvalue128_temp: + .skip 0x10 +.global gTRKState +gTRKState: + .skip 0xA8 +.global gTRKCPUState +gTRKCPUState: + .skip 0x430 diff --git a/asm/TRK_MINNOW_DOLPHIN/usr_put.s b/asm/TRK_MINNOW_DOLPHIN/usr_put.s new file mode 100644 index 0000000..56ca53d --- /dev/null +++ b/asm/TRK_MINNOW_DOLPHIN/usr_put.s @@ -0,0 +1,6 @@ +.include "macros.inc" + +.section .text, "ax" # 0x80005600 - 0x8036FBA0 +.global usr_put_initialize +usr_put_initialize: +/* 80088A90 000859D0 4E 80 00 20 */ blr diff --git a/asm/amcstubs/AmcExi2Stubs.s b/asm/amcstubs/AmcExi2Stubs.s new file mode 100644 index 0000000..d7df861 --- /dev/null +++ b/asm/amcstubs/AmcExi2Stubs.s @@ -0,0 +1,38 @@ +.include "macros.inc" + +.section .text, "ax" # 0x80005600 - 0x8036FBA0 +.global EXI2_Init +EXI2_Init: +/* 800AEFE0 000ABF20 4E 80 00 20 */ blr + +.global EXI2_EnableInterrupts +EXI2_EnableInterrupts: +/* 800AEFE4 000ABF24 4E 80 00 20 */ blr + +.global EXI2_Poll +EXI2_Poll: +/* 800AEFE8 000ABF28 38 60 00 00 */ li r3, 0 +/* 800AEFEC 000ABF2C 4E 80 00 20 */ blr + +.global EXI2_ReadN +EXI2_ReadN: +/* 800AEFF0 000ABF30 38 60 00 00 */ li r3, 0 +/* 800AEFF4 000ABF34 4E 80 00 20 */ blr + +.global EXI2_WriteN +EXI2_WriteN: +/* 800AEFF8 000ABF38 38 60 00 00 */ li r3, 0 +/* 800AEFFC 000ABF3C 4E 80 00 20 */ blr + +.global EXI2_Reserve +EXI2_Reserve: +/* 800AF000 000ABF40 4E 80 00 20 */ blr + +.global EXI2_Unreserve +EXI2_Unreserve: +/* 800AF004 000ABF44 4E 80 00 20 */ blr + +.global AMC_IsStub +AMC_IsStub: +/* 800AF008 000ABF48 38 60 00 01 */ li r3, 1 +/* 800AF00C 000ABF4C 4E 80 00 20 */ blr diff --git a/asm/odenotstub/odenotstub.s b/asm/odenotstub/odenotstub.s new file mode 100644 index 0000000..6b167f7 --- /dev/null +++ b/asm/odenotstub/odenotstub.s @@ -0,0 +1,7 @@ +.include "macros.inc" + +.section .text, "ax" # 0x80005600 - 0x8036FBA0 +.global Hu_IsStub +Hu_IsStub: +/* 800AF010 000ABF50 38 60 00 00 */ li r3, 0 +/* 800AF014 000ABF54 4E 80 00 20 */ blr diff --git a/include/MetroTRK/dolphin_trk.h b/include/MetroTRK/dolphin_trk.h new file mode 100644 index 0000000..9cbc683 --- /dev/null +++ b/include/MetroTRK/dolphin_trk.h @@ -0,0 +1,8 @@ +#ifndef METROTRK_DOLPHIN_TRK_H +#define METROTRK_DOLPHIN_TRK_H + +#include + +void EnableMetroTRKInterrupts(void); + +#endif diff --git a/include/MetroTRK/intrinsics.h b/include/MetroTRK/intrinsics.h new file mode 100644 index 0000000..d9b067f --- /dev/null +++ b/include/MetroTRK/intrinsics.h @@ -0,0 +1,12 @@ +#ifndef METROTRK_INTRINSICS_H +#define METROTRK_INTRINSICS_H + +void __sync(void); +void __isync(void); +int __cntlzw(unsigned int); +float sqrtf__Ff(float); +float __fnmsubs(float, float, float); +double __fabs(double); +float __fabsf(float); + +#endif diff --git a/include/MetroTRK/mem_TRK.h b/include/MetroTRK/mem_TRK.h new file mode 100644 index 0000000..bd1946a --- /dev/null +++ b/include/MetroTRK/mem_TRK.h @@ -0,0 +1,10 @@ +#ifndef __MEM_TRK_H__ +#define __MEM_TRK_H__ + +#include + +SECTION_INIT void* TRK_memcpy(void* dst, const void* src, unsigned long n); + +SECTION_INIT void* TRK_memset(void* dst, int val, unsigned long n); + +#endif diff --git a/include/Runtime/platform.h b/include/Runtime/platform.h new file mode 100644 index 0000000..ef6538b --- /dev/null +++ b/include/Runtime/platform.h @@ -0,0 +1,159 @@ +#ifndef INCLUDE_RUNTIME_PLATFORM_H +#define INCLUDE_RUNTIME_PLATFORM_H + +#if defined(__MWERKS__) || defined(__GNUC__) +#define MWERKS_GNUC +#endif + +#include +#include + +/// A signed 8-bit integer +typedef signed char s8; + +/// A signed 16-bit integer +typedef signed short s16; + +/// A signed 32-bit integer +typedef signed long s32; + +/// A signed 64-bit integer +typedef signed long long s64; + +/// An unsigned 8-bit integer +typedef unsigned char u8; + +/// An unsigned 16-bit integer +typedef unsigned short u16; + +/// An unsigned 32-bit integer +typedef unsigned long u32; + +/// An unsigned 64-bit integer +typedef unsigned long long u64; + +/// An unsigned integer of platform-dependent size +typedef unsigned int uint; + +/// A volatile, unsigned 8-bit integer +typedef volatile u8 vu8; + +/// A volatile, unsigned 16-bit integer +typedef volatile u16 vu16; + +/// A volatile, unsigned 32-bit integer +typedef volatile u32 vu32; + +/// A volatile, unsigned 64-bit integer +typedef volatile u64 vu64; + +/// A volatile, signed 8-bit integer +typedef volatile s8 vs8; + +/// A volatile, signed 16-bit integer +typedef volatile s16 vs16; + +/// A volatile, signed 32-bit integer +typedef volatile s32 vs32; + +/// A volatile, signed 64-bit integer +typedef volatile s64 vs64; + +/// A 32-bit floating-point number +typedef float f32; + +/// A 64-bit floating-point number +typedef double f64; + +/// A volatile 32-bit floating-point number +typedef volatile f32 vf32; + +/// A volatile 64-bit floating-point number +typedef volatile f64 vf64; + +/// The underlying type of an @c enum, used as a placeholder +typedef int enum_t; + +/// A pointer to an unknown type +typedef void* unk_t; + +/// A pointer to an unspecified type, used for polymorphic data +typedef void* any_t; + +/// A label in a jump table +typedef void (*jmp_t)(void); + +/// A jump table +typedef jmp_t jtbl_t[]; + +/// A @c void callback with no arguments. +typedef void (*Event)(void); + +#if defined(__MWERKS__) && defined(__PPCGEKKO__) +#define MWERKS_GEKKO +#endif + +#ifndef ATTRIBUTE_ALIGN +#if defined(__MWERKS__) || defined(__GNUC__) +#define ATTRIBUTE_ALIGN(num) __attribute__((aligned(num))) +#elif defined(_MSC_VER) +#define ATTRIBUTE_ALIGN(num) +#else +#error unknown compiler +#endif +#endif + +#ifndef SECTION_INIT +#if defined(__MWERKS__) && !defined(M2CTX) +#define SECTION_INIT __declspec(section ".init") +#else +#define SECTION_INIT +#endif +#endif + +#ifndef ATTRIBUTE_NORETURN +#if defined(__clang__) || defined(__GNUC__) +#define ATTRIBUTE_NORETURN __attribute__((noreturn)) +#else +#define ATTRIBUTE_NORETURN +#endif +#endif + +#ifdef PERMUTER +#define AT_ADDRESS(x) = FIXEDADDR(x) +#elif defined(__MWERKS__) && !defined(M2CTX) +#define AT_ADDRESS(x) : (x) +#else +#define AT_ADDRESS(x) +#endif + +#ifndef UNK_SIZE_ARRAY +#if defined(__MWERKS__) && !defined(M2CTX) +#define UNK_SIZE_ARRAY [] +#else +#define UNK_SIZE_ARRAY [0] +#endif +#endif + +#ifdef __PPCGEKKO__ +#define qr0 0 +#define qr1 1 +#define qr2 2 +#define qr3 3 +#define qr4 4 +#define qr5 5 +#define qr6 6 +#define qr7 7 +#endif + +#define U8_MAX 0xFF +#define U16_MAX 0xFFFF +#define U32_MAX 0xFFFFFFFF +#define F32_MAX 3.4028235E38 + +#define FLAGS_ZERO 0 +#define FLAGS_ANY(value, flag) ((value) & (flag)) +#define FLAGS_NONE(value, flag) (!((value) & (flag))) +#define FLAGS_ALL(value, flag) (((value) & (flag)) == (flag)) + +#endif diff --git a/include/global_types.h b/include/global_types.h new file mode 100644 index 0000000..77e1053 --- /dev/null +++ b/include/global_types.h @@ -0,0 +1,92 @@ +// This file was taken from the Metroid Prime decompilation project. +// https://github.com/PrimeDecomp/prime/blob/main/include/dolphin/types.h +#ifndef _DOLPHIN_TYPES +#define _DOLPHIN_TYPES + +#ifdef TARGET_PC +#include +typedef int8_t s8; +typedef int16_t s16; +typedef int32_t s32; +typedef int64_t s64; +typedef uint8_t u8; +typedef uint16_t u16; +typedef uint32_t u32; +typedef uint64_t u64; +#else +typedef signed char s8; +typedef signed short int s16; +typedef signed long s32; +typedef signed long long int s64; +typedef unsigned char u8; +typedef unsigned short int u16; +typedef unsigned long u32; +typedef unsigned long long int u64; +#endif + +typedef volatile u8 vu8; +typedef volatile u16 vu16; +typedef volatile u32 vu32; +typedef volatile u64 vu64; + +typedef volatile s8 vs8; +typedef volatile s16 vs16; +typedef volatile s32 vs32; +typedef volatile s64 vs64; + +typedef float f32; +typedef double f64; + +typedef volatile f32 vf32; +typedef volatile f64 vf64; + +#if defined(TARGET_PC) && !defined(_WIN32) +#include +typedef bool BOOL; +#ifndef FALSE +#define FALSE false +#endif +#ifndef TRUE +#define TRUE true +#endif +#else +typedef int BOOL; +#ifndef FALSE +#define FALSE 0 +#endif +#ifndef TRUE +#define TRUE 1 +#endif +#endif + +#ifdef TARGET_PC +#include +#else +#ifndef NULL +#define NULL 0 +#endif +#endif +#if !defined(__cplusplus) || __cplusplus < 201103L +#ifndef nullptr +#define nullptr NULL +#endif + +#if defined(__MWERKS__) +#ifndef override +#define override +#endif +#endif + +#endif + +#ifndef ATTRIBUTE_ALIGN +#if defined(__MWERKS__) || defined(__GNUC__) +#define ATTRIBUTE_ALIGN(num) __attribute__((aligned(num))) +#elif defined(_MSC_VER) +#define ATTRIBUTE_ALIGN(num) +#else +#error unknown compiler +#endif +#endif + +#endif // _DOLPHIN_TYPES diff --git a/include/libc/stdbool.h b/include/libc/stdbool.h new file mode 100644 index 0000000..1c12915 --- /dev/null +++ b/include/libc/stdbool.h @@ -0,0 +1,16 @@ +/// @file +/// @todo Assumes @c __PPCGEKKO__. +#ifndef STDBOOL_H +#define STDBOOL_H + +/// A signed integer used to contain boolean values +/// @todo Maybe some versions of MetroWerks support @c _Bool? +typedef int bool; + +/// #bool true +#define true 1 + +/// #bool false +#define false 0 + +#endif diff --git a/include/placeholder.h b/include/placeholder.h new file mode 100644 index 0000000..fca55d6 --- /dev/null +++ b/include/placeholder.h @@ -0,0 +1,9 @@ +#ifndef PLACEHOLDER_H +#define PLACEHOLDER_H + +#include + +#define NOT_IMPLEMENTED \ + OSPanic(__FILE__, __LINE__, "%s is not implemented!", __func__) + +#endif diff --git a/obj_files.mk b/obj_files.mk index 57edbc9..5c65ec8 100644 --- a/obj_files.mk +++ b/obj_files.mk @@ -2,10 +2,14 @@ O_FILES := $(BUILD_DIR)/src/main.o \ $(BUILD_DIR)/src/pso/TMainTask.o \ $(BUILD_DIR)/src/pso/TObject.o \ $(BUILD_DIR)/src/pso/TObject2.o \ + $(BUILD_DIR)/src/Runtime/__va_arg.o \ $(BUILD_DIR)/src/Runtime/global_destructor_chain.o \ - $(BUILD_DIR)/src/Runtime/Gecko_ExceptionPPC.o \ + $(BUILD_DIR)/src/Runtime/NMWException.o \ + $(BUILD_DIR)/src/Runtime/ptmf.o \ + $(BUILD_DIR)/asm/Runtime/ExceptionPPC.o \ + $(BUILD_DIR)/src/Runtime/runtime.o \ $(BUILD_DIR)/src/Runtime/__init_cpp_exceptions.o \ - $(BUILD_DIR)/src/Runtime/abort_exit.o \ + $(BUILD_DIR)/src/Runtime/__mem.o \ $(BUILD_DIR)/src/Dolphin/os/__start.o \ $(BUILD_DIR)/src/Dolphin/PPCArch.o \ $(BUILD_DIR)/src/Dolphin/db.o \ @@ -41,7 +45,7 @@ O_FILES := $(BUILD_DIR)/src/main.o \ $(BUILD_DIR)/src/Dolphin/dvd/dvdqueue.o \ $(BUILD_DIR)/src/Dolphin/dvd/dvderror.o \ $(BUILD_DIR)/src/Dolphin/dvd/fstload.o \ - $(BUILD_DIR)/src/Dolphin/vi/vi.o \ + $(BUILD_DIR)/asm/Dolphin/vi/vi.o \ $(BUILD_DIR)/src/Dolphin/pad/pad.o \ $(BUILD_DIR)/src/Dolphin/ai.o \ $(BUILD_DIR)/src/Dolphin/ar/ar.o \ @@ -88,4 +92,61 @@ O_FILES := $(BUILD_DIR)/src/main.o \ $(BUILD_DIR)/src/Dolphin/si/SIBios.o \ $(BUILD_DIR)/src/Dolphin/si/SISamplingRate.o \ $(BUILD_DIR)/src/Dolphin/exi/EXIBios.o \ - $(BUILD_DIR)/src/Dolphin/exi/EXIUart.o + $(BUILD_DIR)/src/Dolphin/exi/EXIUart.o \ + $(BUILD_DIR)/asm/TRK_MINNOW_DOLPHIN/mainloop.o \ + $(BUILD_DIR)/asm/TRK_MINNOW_DOLPHIN/nubevent.o \ + $(BUILD_DIR)/asm/TRK_MINNOW_DOLPHIN/nubinit.o \ + $(BUILD_DIR)/asm/TRK_MINNOW_DOLPHIN/msg.o \ + $(BUILD_DIR)/asm/TRK_MINNOW_DOLPHIN/msgbuf.o \ + $(BUILD_DIR)/asm/TRK_MINNOW_DOLPHIN/serpoll.o \ + $(BUILD_DIR)/asm/TRK_MINNOW_DOLPHIN/usr_put.o \ + $(BUILD_DIR)/asm/TRK_MINNOW_DOLPHIN/dispatch.o \ + $(BUILD_DIR)/asm/TRK_MINNOW_DOLPHIN/msghndlr.o \ + $(BUILD_DIR)/asm/TRK_MINNOW_DOLPHIN/support.o \ + $(BUILD_DIR)/asm/TRK_MINNOW_DOLPHIN/mutex_TRK.o \ + $(BUILD_DIR)/asm/TRK_MINNOW_DOLPHIN/notify.o \ + $(BUILD_DIR)/asm/TRK_MINNOW_DOLPHIN/flush_cache.o \ + $(BUILD_DIR)/asm/TRK_MINNOW_DOLPHIN/mem_TRK.o \ + $(BUILD_DIR)/asm/TRK_MINNOW_DOLPHIN/targimpl.o \ + $(BUILD_DIR)/asm/TRK_MINNOW_DOLPHIN/__exception.o \ + $(BUILD_DIR)/asm/TRK_MINNOW_DOLPHIN/dolphin_trk.o \ + $(BUILD_DIR)/asm/TRK_MINNOW_DOLPHIN/mpc_7xx_603e.o \ + $(BUILD_DIR)/asm/TRK_MINNOW_DOLPHIN/main_TRK.o \ + $(BUILD_DIR)/asm/TRK_MINNOW_DOLPHIN/dolphin_trk_glue.o \ + $(BUILD_DIR)/asm/TRK_MINNOW_DOLPHIN/targcont.o \ + $(BUILD_DIR)/src/MSL_C.PPCEABI.bare.H/abort_exit.o \ + $(BUILD_DIR)/src/MSL_C.PPCEABI.bare.H/alloc.o \ + $(BUILD_DIR)/src/MSL_C.PPCEABI.bare.H/ansi_files.o \ + $(BUILD_DIR)/asm/MSL_C.PPCEABI.bare.H/ansi_fp.o \ + $(BUILD_DIR)/src/MSL_C.PPCEABI.bare.H/buffer_io.o \ + $(BUILD_DIR)/asm/MSL_C.PPCEABI.bare.H/critical_regions.ppc_eabi.o \ + $(BUILD_DIR)/src/MSL_C.PPCEABI.bare.H/ctype.o \ + $(BUILD_DIR)/src/MSL_C.PPCEABI.bare.H/direct_io.o \ + $(BUILD_DIR)/src/MSL_C.PPCEABI.bare.H/file_io.o \ + $(BUILD_DIR)/src/MSL_C.PPCEABI.bare.H/errno.o \ + $(BUILD_DIR)/src/MSL_C.PPCEABI.bare.H/FILE_POS.o \ + $(BUILD_DIR)/src/MSL_C.PPCEABI.bare.H/mbstring.o \ + $(BUILD_DIR)/src/MSL_C.PPCEABI.bare.H/mem.o \ + $(BUILD_DIR)/src/MSL_C.PPCEABI.bare.H/mem_funcs.o \ + $(BUILD_DIR)/src/MSL_C.PPCEABI.bare.H/misc_io.o \ + $(BUILD_DIR)/asm/MSL_C.PPCEABI.bare.H/printf.o \ + $(BUILD_DIR)/src/MSL_C.PPCEABI.bare.H/rand.o \ + $(BUILD_DIR)/asm/MSL_C.PPCEABI.bare.H/scanf.o \ + $(BUILD_DIR)/src/MSL_C.PPCEABI.bare.H/string.o \ + $(BUILD_DIR)/asm/MSL_C.PPCEABI.bare.H/strtoul.o \ + $(BUILD_DIR)/asm/MSL_C.PPCEABI.bare.H/uart_console_io.o \ + $(BUILD_DIR)/src/MSL_C.PPCEABI.bare.H/wchar_io.o \ + $(BUILD_DIR)/src/MSL_C.PPCEABI.bare.H/e_asin.o \ + $(BUILD_DIR)/src/MSL_C.PPCEABI.bare.H/e_atan2.o \ + $(BUILD_DIR)/src/MSL_C.PPCEABI.bare.H/s_atan.o \ + $(BUILD_DIR)/src/MSL_C.PPCEABI.bare.H/s_frexp.o \ + $(BUILD_DIR)/src/MSL_C.PPCEABI.bare.H/w_atan2.o \ + $(BUILD_DIR)/src/MSL_C.PPCEABI.bare.H/float.o \ + $(BUILD_DIR)/src/MSL_C.PPCEABI.bare.H/hyperbolicsf.o \ + $(BUILD_DIR)/asm/MSL_C.PPCEABI.bare.H/inverse_trig.o \ + $(BUILD_DIR)/asm/MSL_C.PPCEABI.bare.H/trigf.o \ + $(BUILD_DIR)/asm/amcstubs/AmcExi2Stubs.o \ + $(BUILD_DIR)/asm/OdemuExi2/DebuggerDriver.o \ + $(BUILD_DIR)/asm/odenotstub/odenotstub.o \ + $(BUILD_DIR)/asm/MSL_C.PPCEABI.bare.H/common_float_tables.o \ + $(BUILD_DIR)/asm/MSL_C.PPCEABI.bare.H/exponentialsf.o diff --git a/src/Dolphin/dvd/dvd.c b/src/Dolphin/dvd/dvd.c index 176ee49..72f7ef5 100644 --- a/src/Dolphin/dvd/dvd.c +++ b/src/Dolphin/dvd/dvd.c @@ -77,6 +77,14 @@ static DVDOptionalCommandChecker checkOptionalCommand = defaultOptionalCommandCh extern void __DVDInterruptHandler(__OSInterrupt interrupt, OSContext* context); +void __DVDPrintFatalMessage() { + +} + +int DVDCompareDiskID(DVDDiskID *lol, DVDDiskID *lol2) { + return 0; +} + static void defaultOptionalCommandChecker(DVDCommandBlock* block, DVDLowCallback cb) {} void DVDInit() { diff --git a/src/Dolphin/vi/vi.c b/src/Dolphin/vi/vi.c new file mode 100644 index 0000000..e69de29 diff --git a/src/MSL_C.PPCEABI.bare.H/CPlusLibPPC.cpp b/src/MSL_C.PPCEABI.bare.H/CPlusLibPPC.cpp new file mode 100644 index 0000000..4a0b5b9 --- /dev/null +++ b/src/MSL_C.PPCEABI.bare.H/CPlusLibPPC.cpp @@ -0,0 +1,25 @@ +#include "MWCPlusLib.h" + +#ifdef __cplusplus +extern "C" { +#endif + +void* __copy(char* to, char* from, size_t size) { + char* p; + + if (to && size) { + p = to; + do { + *p = *from; + ++p; + ++from; + --size; + } while (size > 0); + } + + return to; +} + +#ifdef __cplusplus +} +#endif diff --git a/src/MSL_C.PPCEABI.bare.H/FILE_POS.c b/src/MSL_C.PPCEABI.bare.H/FILE_POS.c new file mode 100644 index 0000000..6413447 --- /dev/null +++ b/src/MSL_C.PPCEABI.bare.H/FILE_POS.c @@ -0,0 +1,102 @@ +#include +#include + +inline fpos_t _ftell(FILE* file) { + int charsInUndoBuffer = 0; + fpos_t position; + + unsigned char tmp_kind = file->mode.file_kind; + if (!(tmp_kind == __disk_file || tmp_kind == __console_file) || file->state.error) { + errno = EFPOS; + return (-1L); + } + + if (file->state.io_state == __neutral) + return (file->position); + + position = file->buffer_pos + (file->buffer_ptr - file->buffer); + + if (file->state.io_state >= __rereading) { + charsInUndoBuffer = file->state.io_state - __rereading + 1; + position -= charsInUndoBuffer; + } + + return (position); +} + +long ftell(FILE* file) { + long retval; + + retval = (long)_ftell(file); + + return retval; +} + +int _fseek(FILE* file, fpos_t offset, int mode) { + fpos_t position; + __pos_proc pos_proc; + + unsigned char tmp_kind = file->mode.file_kind; + if (!(tmp_kind == __disk_file) || file->state.error) { + errno = EFPOS; + return (-1); + } + + if (file->state.io_state == __writing) { + if (__flush_buffer(file, NULL) != __no_io_error) { + set_error(file); + errno = EFPOS; + return (-1); + } + } + + if (mode == SEEK_CUR) { + + mode = SEEK_SET; + + if ((position = _ftell(file)) < 0) + position = 0; + + offset += position; + } + + if ((mode != SEEK_END) && (file->mode.io_mode != __read_write) && + ((file->state.io_state == __reading) || (file->state.io_state == __rereading))) { + if ((offset >= file->position) || offset < file->buffer_pos) { + file->state.io_state = __neutral; + } else { + file->buffer_ptr = file->buffer + (offset - file->buffer_pos); + file->buffer_len = file->position - offset; + file->state.io_state = __reading; + } + } else { + file->state.io_state = __neutral; + } + + if (file->state.io_state == __neutral) { + if ((pos_proc = file->position_proc) != 0 && + (*pos_proc)(file->handle, &offset, mode, file->idle_proc)) { + set_error(file); + errno = EFPOS; + return (-1); + } + + file->state.eof = 0; + file->position = offset; + file->buffer_len = 0; + } + + return 0; +} + +int fseek(FILE * file, long offset, int mode) +{ + fpos_t real_offset = (fpos_t)offset; + int retval; + + + retval = _fseek(file, real_offset, mode); + + + return(retval); +} diff --git a/src/MSL_C.PPCEABI.bare.H/MWCPlusLib.h b/src/MSL_C.PPCEABI.bare.H/MWCPlusLib.h new file mode 100644 index 0000000..f268016 --- /dev/null +++ b/src/MSL_C.PPCEABI.bare.H/MWCPlusLib.h @@ -0,0 +1,15 @@ +#ifndef _MWCPLUSLIB +#define _MWCPLUSLIB + +#include + +#ifdef __cplusplus +extern "C" { +#endif +void* __copy(char* to, char* from, size_t size); + +#ifdef __cplusplus +} +#endif + +#endif // _MWCPLUSLIB diff --git a/src/MSL_C.PPCEABI.bare.H/abort_exit.c b/src/MSL_C.PPCEABI.bare.H/abort_exit.c new file mode 100644 index 0000000..b0ebade --- /dev/null +++ b/src/MSL_C.PPCEABI.bare.H/abort_exit.c @@ -0,0 +1,38 @@ +#include + +void __destroy_global_chain(void); +void _ExitProcess(void); + +extern void (*_dtors[])(void); + +static void (*__console_exit)(void); +void (*__stdio_exit)(void); +static int __atexit_curr_func; +int __aborting; + +static void (*__atexit_funcs[64])(void); + +void exit(int status) { + int i; + void (**dtor)(void); + + if (!__aborting) { + __destroy_global_chain(); + dtor = _dtors; + while (*dtor != NULL) { + (*dtor)(); + dtor++; + } + if (__stdio_exit != NULL) { + __stdio_exit(); + __stdio_exit = NULL; + } + } + while (__atexit_curr_func > 0) + __atexit_funcs[--__atexit_curr_func](); + if (__console_exit != NULL) { + __console_exit(); + __console_exit = NULL; + } + _ExitProcess(); +} diff --git a/src/MSL_C.PPCEABI.bare.H/alloc.c b/src/MSL_C.PPCEABI.bare.H/alloc.c new file mode 100644 index 0000000..e72740c --- /dev/null +++ b/src/MSL_C.PPCEABI.bare.H/alloc.c @@ -0,0 +1,7 @@ +void free(void *ptr) { + +} + +void *malloc(int size) { + +} diff --git a/src/MSL_C.PPCEABI.bare.H/ansi_files.c b/src/MSL_C.PPCEABI.bare.H/ansi_files.c new file mode 100644 index 0000000..14cd868 --- /dev/null +++ b/src/MSL_C.PPCEABI.bare.H/ansi_files.c @@ -0,0 +1,119 @@ +#include "ansi_files.h" + +static unsigned char stdin_buff[0x100]; +static unsigned char stdout_buff[0x100]; +static unsigned char stderr_buff[0x100]; + +extern int fclose(FILE*); +extern int __read_console(__file_handle file, unsigned char* buff, size_t* count, + __idle_proc idle_proc); +extern int __write_console(__file_handle file, unsigned char* buff, size_t* count, + __idle_proc idle_proc); +extern int __close_console(__file_handle file); + +FILE __files[4] = { + {0, + {0, 1, 1, 2, 0}, + {0, 0, 0, 0}, + 0, + 0, + 0, + {0, 0}, + {0, 0}, + 0, + stdin_buff, + sizeof(stdin_buff), + stdin_buff, + 0, + 0, + 0, + 0, + NULL, + &__read_console, + &__write_console, + &__close_console, + 0, + &__files[1]}, + {1, + {0, 2, 1, 2, 0}, + {0, 0, 0, 0}, + 0, + 0, + 0, + {0, 0}, + {0, 0}, + 0, + stdout_buff, + sizeof(stdout_buff), + stdout_buff, + 0, + 0, + 0, + 0, + NULL, + &__read_console, + &__write_console, + &__close_console, + 0, + &__files[2]}, + {2, + {0, 2, 0, 2, 0}, + {0, 0, 0, 0}, + 0, + 0, + 0, + {0, 0}, + {0, 0}, + 0, + stderr_buff, + sizeof(stderr_buff), + stderr_buff, + 0, + 0, + 0, + 0, + NULL, + &__read_console, + &__write_console, + &__close_console, + 0, + &__files[3]}, +}; + +void __close_all() { + FILE* p = &__files[0]; + FILE* plast; + + // __begin_critical_region(2); + + while (p != NULL) { + if (p->mode.file_kind != __closed_file) { + fclose(p); + } + + plast = p; + p = p->next_file_struct; + if (plast->is_dynamically_allocated) + free(plast); + else { + plast->mode.file_kind = __unavailable_file; + if ((p != NULL) && p->is_dynamically_allocated) + plast->next_file_struct = NULL; + } + } + + // __end_critical_region(2); +} + +int __flush_all() { + int retval = 0; + FILE* __stream; + __stream = &__files[0]; + while (__stream) { + if ((__stream->mode.file_kind) && (fflush(__stream))) { + retval = -1; + } + __stream = __stream->next_file_struct; + }; + return retval; +} diff --git a/src/MSL_C.PPCEABI.bare.H/arith.c b/src/MSL_C.PPCEABI.bare.H/arith.c new file mode 100644 index 0000000..a21df7e --- /dev/null +++ b/src/MSL_C.PPCEABI.bare.H/arith.c @@ -0,0 +1,15 @@ +#include + +int abs(int n) { + if (n < 0) + return (-n); + else + return (n); +} + +long labs(long n) { + if (n < 0) + return (-n); + else + return (n); +} diff --git a/src/MSL_C.PPCEABI.bare.H/buffer_io.c b/src/MSL_C.PPCEABI.bare.H/buffer_io.c new file mode 100644 index 0000000..e760ba8 --- /dev/null +++ b/src/MSL_C.PPCEABI.bare.H/buffer_io.c @@ -0,0 +1,43 @@ +#include "buffer_io.h" + +void __convert_from_newlines(unsigned char* buf, size_t* n) { +} + +void __convert_to_newlines(unsigned char* buf, size_t* n) { +} + +void __prep_buffer(FILE* file) { + file->buffer_ptr = file->buffer; + file->buffer_len = file->buffer_size; + file->buffer_len -= file->position & file->buffer_alignment; + file->buffer_pos = file->position; +} + +int __flush_buffer(FILE* file, size_t* bytes_flushed) { + size_t buffer_len; + int ioresult; + + buffer_len = file->buffer_ptr - file->buffer; + + if (buffer_len) { + file->buffer_len = buffer_len; + + if (!file->mode.binary_io) + __convert_from_newlines(file->buffer, (size_t*)&file->buffer_len); + + ioresult = (*file->write_proc)(file->handle, file->buffer, (size_t*)&file->buffer_len, + file->idle_proc); + + if (bytes_flushed) + *bytes_flushed = file->buffer_len; + + if (ioresult) + return (ioresult); + + file->position += file->buffer_len; + } + + __prep_buffer(file); + + return 0; +} diff --git a/src/MSL_C.PPCEABI.bare.H/ctype.c b/src/MSL_C.PPCEABI.bare.H/ctype.c new file mode 100644 index 0000000..29581eb --- /dev/null +++ b/src/MSL_C.PPCEABI.bare.H/ctype.c @@ -0,0 +1,69 @@ +#define _CTYPE_INLINE __declspec(weak) +#include +#include + +#define ctrl __control_char +#define motn __motion_char +#define spac __space_char +#define punc __punctuation +#define digi __digit +#define hexd __hex_digit +#define lowc __lower_case +#define uppc __upper_case +#define dhex (hexd | digi) +#define uhex (hexd | uppc) +#define lhex (hexd | lowc) + +unsigned char __ctype_map[256] = { + // clang-format off + ctrl, ctrl, ctrl, ctrl, ctrl, ctrl, ctrl, ctrl, ctrl, motn, motn, motn, motn, motn, ctrl, ctrl, + ctrl, ctrl, ctrl, ctrl, ctrl, ctrl, ctrl, ctrl, ctrl, ctrl, ctrl, ctrl, ctrl, ctrl, ctrl, ctrl, + spac, punc, punc, punc, punc, punc, punc, punc, punc, punc, punc, punc, punc, punc, punc, punc, + dhex, dhex, dhex, dhex, dhex, dhex, dhex, dhex, dhex, dhex, punc, punc, punc, punc, punc, punc, + punc, uhex, uhex, uhex, uhex, uhex, uhex, uppc, uppc, uppc, uppc, uppc, uppc, uppc, uppc, uppc, + uppc, uppc, uppc, uppc, uppc, uppc, uppc, uppc, uppc, uppc, uppc, punc, punc, punc, punc, punc, + punc, lhex, lhex, lhex, lhex, lhex, lhex, lowc, lowc, lowc, lowc, lowc, lowc, lowc, lowc, lowc, + lowc, lowc, lowc, lowc, lowc, lowc, lowc, lowc, lowc, lowc, lowc, punc, punc, punc, punc, ctrl, + // clang-format on +}; + +unsigned char __lower_map[256] = { + // clang-format off + 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0A, 0x0B, 0x0C, 0x0D, 0x0E, 0x0F, + 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, 0x19, 0x1A, 0x1B, 0x1C, 0x1D, 0x1E, 0x1F, + ' ', '!', '"', '#', '$', '%', '&', '\'', '(', ')', '*', '+', ',', '-', '.', '/', + '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', ':', ';', '<', '=', '>', '?', + '@', 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', + 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z', '[', '\\', ']', '^', '_', + '`', 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', + 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z', '{', '|', '}', '~', 0x7F, + 0x80, 0x81, 0x82, 0x83, 0x84, 0x85, 0x86, 0x87, 0x88, 0x89, 0x8A, 0x8B, 0x8C, 0x8D, 0x8E, 0x8F, + 0x90, 0x91, 0x92, 0x93, 0x94, 0x95, 0x96, 0x97, 0x98, 0x99, 0x9A, 0x9B, 0x9C, 0x9D, 0x9E, 0x9F, + 0xA0, 0xA1, 0xA2, 0xA3, 0xA4, 0xA5, 0xA6, 0xA7, 0xA8, 0xA9, 0xAA, 0xAB, 0xAC, 0xAD, 0xAE, 0xAF, + 0xB0, 0xB1, 0xB2, 0xB3, 0xB4, 0xB5, 0xB6, 0xB7, 0xB8, 0xB9, 0xBA, 0xBB, 0xBC, 0xBD, 0xBE, 0xBF, + 0xC0, 0xC1, 0xC2, 0xC3, 0xC4, 0xC5, 0xC6, 0xC7, 0xC8, 0xC9, 0xCA, 0xCB, 0xCC, 0xCD, 0xCE, 0xCF, + 0xD0, 0xD1, 0xD2, 0xD3, 0xD4, 0xD5, 0xD6, 0xD7, 0xD8, 0xD9, 0xDA, 0xDB, 0xDC, 0xDD, 0xDE, 0xDF, + 0xE0, 0xE1, 0xE2, 0xE3, 0xE4, 0xE5, 0xE6, 0xE7, 0xE8, 0xE9, 0xEA, 0xEB, 0xEC, 0xED, 0xEE, 0xEF, + 0xF0, 0xF1, 0xF2, 0xF3, 0xF4, 0xF5, 0xF6, 0xF7, 0xF8, 0xF9, 0xFA, 0xFB, 0xFC, 0xFD, 0xFE, 0xFF, + // clang-format on +}; + +unsigned char __upper_map[256] = { + 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0A, 0x0B, 0x0C, 0x0D, 0x0E, 0x0F, + 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, 0x19, 0x1A, 0x1B, 0x1C, 0x1D, 0x1E, 0x1F, + ' ', '!', '"', '#', '$', '%', '&', '\'', '(', ')', '*', '+', ',', '-', '.', '/', + '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', ':', ';', '<', '=', '>', '?', + '@', 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', + 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z', '[', '\\', ']', '^', '_', + '`', 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', + 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z', '{', '|', '}', '~', 0x7F, + 0x80, 0x81, 0x82, 0x83, 0x84, 0x85, 0x86, 0x87, 0x88, 0x89, 0x8A, 0x8B, 0x8C, 0x8D, 0x8E, 0x8F, + 0x90, 0x91, 0x92, 0x93, 0x94, 0x95, 0x96, 0x97, 0x98, 0x99, 0x9A, 0x9B, 0x9C, 0x9D, 0x9E, 0x9F, + 0xA0, 0xA1, 0xA2, 0xA3, 0xA4, 0xA5, 0xA6, 0xA7, 0xA8, 0xA9, 0xAA, 0xAB, 0xAC, 0xAD, 0xAE, 0xAF, + 0xB0, 0xB1, 0xB2, 0xB3, 0xB4, 0xB5, 0xB6, 0xB7, 0xB8, 0xB9, 0xBA, 0xBB, 0xBC, 0xBD, 0xBE, 0xBF, + 0xC0, 0xC1, 0xC2, 0xC3, 0xC4, 0xC5, 0xC6, 0xC7, 0xC8, 0xC9, 0xCA, 0xCB, 0xCC, 0xCD, 0xCE, 0xCF, + 0xD0, 0xD1, 0xD2, 0xD3, 0xD4, 0xD5, 0xD6, 0xD7, 0xD8, 0xD9, 0xDA, 0xDB, 0xDC, 0xDD, 0xDE, 0xDF, + 0xE0, 0xE1, 0xE2, 0xE3, 0xE4, 0xE5, 0xE6, 0xE7, 0xE8, 0xE9, 0xEA, 0xEB, 0xEC, 0xED, 0xEE, 0xEF, + 0xF0, 0xF1, 0xF2, 0xF3, 0xF4, 0xF5, 0xF6, 0xF7, 0xF8, 0xF9, 0xFA, 0xFB, 0xFC, 0xFD, 0xFE, 0xFF, + // clang-format on +}; diff --git a/src/MSL_C.PPCEABI.bare.H/direct_io.c b/src/MSL_C.PPCEABI.bare.H/direct_io.c new file mode 100644 index 0000000..a98d19c --- /dev/null +++ b/src/MSL_C.PPCEABI.bare.H/direct_io.c @@ -0,0 +1,114 @@ +#include +#include + +size_t fwrite(const void* ptr, size_t memb_size, size_t num_memb, FILE* file) { + size_t retval; + retval = __fwrite(ptr, memb_size, num_memb, file); + return (retval); +} + +size_t __fwrite(const void* ptr, size_t memb_size, size_t num_memb, FILE* file) { + unsigned char* write_ptr; + size_t num_bytes, bytes_to_go, bytes_written; + int ioresult, always_buffer; + +#ifndef __NO_WIDE_CHAR + if (fwide(file, 0) == 0) + fwide(file, -1); +#endif + + bytes_to_go = memb_size * num_memb; + + if (!bytes_to_go || file->state.error || file->mode.file_kind == __closed_file) + return 0; + + if (file->mode.file_kind == __console_file) + __stdio_atexit(); + + always_buffer = + !file->mode.binary_io || file->mode.buffer_mode == _IOFBF || file->mode.buffer_mode == _IOLBF; + + if (file->state.io_state == __neutral) { + if (file->mode.io_mode & __write) { + if (file->mode.io_mode & __append) { + if (fseek(file, 0, SEEK_END)) + return 0; + } + file->state.io_state = __writing; + + __prep_buffer(file); + } + } + + if (file->state.io_state != __writing) { + set_error(file); + return 0; + } + + write_ptr = (unsigned char*)ptr; + bytes_written = 0; + + if (bytes_to_go && (file->buffer_ptr != file->buffer || always_buffer)) { + file->buffer_len = file->buffer_size - (file->buffer_ptr - file->buffer); + + do { + unsigned char* newline = NULL; + + num_bytes = file->buffer_len; + + if (num_bytes > bytes_to_go) + num_bytes = bytes_to_go; + if (file->mode.buffer_mode == _IOLBF && num_bytes) + if ((newline = (unsigned char*)__memrchr(write_ptr, '\n', num_bytes)) != NULL) + num_bytes = newline + 1 - write_ptr; + + if (num_bytes) { + memcpy(file->buffer_ptr, write_ptr, num_bytes); + + write_ptr += num_bytes; + bytes_written += num_bytes; + bytes_to_go -= num_bytes; + + file->buffer_ptr += num_bytes; + file->buffer_len -= num_bytes; + } + if (!file->buffer_len || newline != NULL || + (file->mode.buffer_mode == _IONBF)) + { + ioresult = __flush_buffer(file, NULL); + + if (ioresult) { + set_error(file); + bytes_to_go = 0; + break; + } + } + } while (bytes_to_go && always_buffer); + } + + if (bytes_to_go && !always_buffer) { + unsigned char* save_buffer = file->buffer; + size_t save_size = file->buffer_size; + + file->buffer = write_ptr; + file->buffer_size = bytes_to_go; + file->buffer_ptr = write_ptr + bytes_to_go; + + if (__flush_buffer(file, &num_bytes) != __no_io_error) + set_error(file); + + bytes_written += num_bytes; + + file->buffer = save_buffer; + file->buffer_size = save_size; + + __prep_buffer(file); + + file->buffer_len = 0; + } + + if (file->mode.buffer_mode != _IOFBF) + file->buffer_len = 0; + + return ((bytes_written + memb_size - 1) / memb_size); +} diff --git a/src/MSL_C.PPCEABI.bare.H/e_acos.c b/src/MSL_C.PPCEABI.bare.H/e_acos.c new file mode 100644 index 0000000..e464e99 --- /dev/null +++ b/src/MSL_C.PPCEABI.bare.H/e_acos.c @@ -0,0 +1,107 @@ +/* @(#)e_acos.c 1.2 95/01/04 */ +/* + * ==================================================== + * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. + * + * Developed at SunPro, a Sun Microsystems, Inc. business. + * Permission to use, copy, modify, and distribute this + * software is freely granted, provided that this notice + * is preserved. + * ==================================================== + */ + +/* __ieee754_acos(x) + * Method : + * acos(x) = pi/2 - asin(x) + * acos(-x) = pi/2 + asin(x) + * For |x|<=0.5 + * acos(x) = pi/2 - (x + x*x^2*R(x^2)) (see asin.c) + * For x>0.5 + * acos(x) = pi/2 - (pi/2 - 2asin(sqrt((1-x)/2))) + * = 2asin(sqrt((1-x)/2)) + * = 2s + 2s*z*R(z) ...z=(1-x)/2, s=sqrt(z) + * = 2f + (2c + 2s*z*R(z)) + * where f=hi part of s, and c = (z-f*f)/(s+f) is the correction term + * for f so that f+c ~ sqrt(z). + * For x<-0.5 + * acos(x) = pi - 2asin(sqrt((1-|x|)/2)) + * = pi - 0.5*(s+s*z*R(z)), where z=(1-|x|)/2,s=sqrt(z) + * + * Special cases: + * if x is NaN, return x itself; + * if |x|>1, return NaN with invalid signal. + * + * Function needed: sqrt + */ + +#include "fdlibm.h" + +#ifdef __STDC__ +static const double +#else +static double +#endif + one = 1.00000000000000000000e+00, /* 0x3FF00000, 0x00000000 */ + pi = 3.14159265358979311600e+00, /* 0x400921FB, 0x54442D18 */ + pio2_hi = 1.57079632679489655800e+00, /* 0x3FF921FB, 0x54442D18 */ + pio2_lo = 6.12323399573676603587e-17, /* 0x3C91A626, 0x33145C07 */ + pS0 = 1.66666666666666657415e-01, /* 0x3FC55555, 0x55555555 */ + pS1 = -3.25565818622400915405e-01, /* 0xBFD4D612, 0x03EB6F7D */ + pS2 = 2.01212532134862925881e-01, /* 0x3FC9C155, 0x0E884455 */ + pS3 = -4.00555345006794114027e-02, /* 0xBFA48228, 0xB5688F3B */ + pS4 = 7.91534994289814532176e-04, /* 0x3F49EFE0, 0x7501B288 */ + pS5 = 3.47933107596021167570e-05, /* 0x3F023DE1, 0x0DFDF709 */ + qS1 = -2.40339491173441421878e+00, /* 0xC0033A27, 0x1C8A2D4B */ + qS2 = 2.02094576023350569471e+00, /* 0x40002AE5, 0x9C598AC8 */ + qS3 = -6.88283971605453293030e-01, /* 0xBFE6066C, 0x1B8D0159 */ + qS4 = 7.70381505559019352791e-02; /* 0x3FB3B8C5, 0xB12E9282 */ + +#ifdef __STDC__ +double __ieee754_acos(double x) +#else +double __ieee754_acos(x) +double x; +#endif +{ + double z, p, q, r, w, s, c, df; + _INT32 hx, ix; + hx = __HI(x); + ix = hx & 0x7fffffff; + if (ix >= 0x3ff00000) { /* |x| >= 1 */ + if (((ix - 0x3ff00000) | __LO(x)) == 0) { /* |x|==1 */ + if (hx > 0) + return 0.0; /* acos(1) = 0 */ + else + return pi + 2.0 * pio2_lo; /* acos(-1)= pi */ + } + return NAN; /* acos(|x|>1) is NaN */ + } + if (ix < 0x3fe00000) { /* |x| < 0.5 */ + if (ix <= 0x3c600000) + return pio2_hi + pio2_lo; /*if|x|<2**-57*/ + z = x * x; + p = z * (pS0 + z * (pS1 + z * (pS2 + z * (pS3 + z * (pS4 + z * pS5))))); + q = one + z * (qS1 + z * (qS2 + z * (qS3 + z * qS4))); + r = p / q; + return pio2_hi - (x - (pio2_lo - x * r)); + } else if (hx < 0) { /* x < -0.5 */ + z = (one + x) * 0.5; + p = z * (pS0 + z * (pS1 + z * (pS2 + z * (pS3 + z * (pS4 + z * pS5))))); + q = one + z * (qS1 + z * (qS2 + z * (qS3 + z * qS4))); + s = sqrt(z); + r = p / q; + w = r * s - pio2_lo; + return pi - 2.0 * (s + w); + } else { /* x > 0.5 */ + z = (one - x) * 0.5; + s = sqrt(z); + df = s; + __LO(df) = 0; + c = (z - df * df) / (s + df); + p = z * (pS0 + z * (pS1 + z * (pS2 + z * (pS3 + z * (pS4 + z * pS5))))); + q = one + z * (qS1 + z * (qS2 + z * (qS3 + z * qS4))); + r = p / q; + w = r * s + c; + return 2.0 * (df + w); + } +} diff --git a/src/MSL_C.PPCEABI.bare.H/e_asin.c b/src/MSL_C.PPCEABI.bare.H/e_asin.c new file mode 100644 index 0000000..b8ad60b --- /dev/null +++ b/src/MSL_C.PPCEABI.bare.H/e_asin.c @@ -0,0 +1,115 @@ +/* @(#)e_asin.c 1.2 95/01/04 */ +/* + * ==================================================== + * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. + * + * Developed at SunPro, a Sun Microsystems, Inc. business. + * Permission to use, copy, modify, and distribute this + * software is freely granted, provided that this notice + * is preserved. + * ==================================================== + */ + +/* __ieee754_asin(x) + * Method : + * Since asin(x) = x + x^3/6 + x^5*3/40 + x^7*15/336 + ... + * we approximate asin(x) on [0,0.5] by + * asin(x) = x + x*x^2*R(x^2) + * where + * R(x^2) is a rational approximation of (asin(x)-x)/x^3 + * and its remez error is bounded by + * |(asin(x)-x)/x^3 - R(x^2)| < 2^(-58.75) + * + * For x in [0.5,1] + * asin(x) = pi/2-2*asin(sqrt((1-x)/2)) + * Let y = (1-x), z = y/2, s := sqrt(z), and pio2_hi+pio2_lo=pi/2; + * then for x>0.98 + * asin(x) = pi/2 - 2*(s+s*z*R(z)) + * = pio2_hi - (2*(s+s*z*R(z)) - pio2_lo) + * For x<=0.98, let pio4_hi = pio2_hi/2, then + * f = hi part of s; + * c = sqrt(z) - f = (z-f*f)/(s+f) ...f+c=sqrt(z) + * and + * asin(x) = pi/2 - 2*(s+s*z*R(z)) + * = pio4_hi+(pio4-2s)-(2s*z*R(z)-pio2_lo) + * = pio4_hi+(pio4-2f)-(2s*z*R(z)-(pio2_lo+2c)) + * + * Special cases: + * if x is NaN, return x itself; + * if |x|>1, return NaN with invalid signal. + * + */ + +#include + +#ifdef __STDC__ +static const double +#else +static double +#endif + one = 1.00000000000000000000e+00, /* 0x3FF00000, 0x00000000 */ + big = 1.000e+300, pio2_hi = 1.57079632679489655800e+00, /* 0x3FF921FB, 0x54442D18 */ + pio2_lo = 6.12323399573676603587e-17, /* 0x3C91A626, 0x33145C07 */ + pio4_hi = 7.85398163397448278999e-01, /* 0x3FE921FB, 0x54442D18 */ + /* coefficient for R(x^2) */ + pS0 = 1.66666666666666657415e-01, /* 0x3FC55555, 0x55555555 */ + pS1 = -3.25565818622400915405e-01, /* 0xBFD4D612, 0x03EB6F7D */ + pS2 = 2.01212532134862925881e-01, /* 0x3FC9C155, 0x0E884455 */ + pS3 = -4.00555345006794114027e-02, /* 0xBFA48228, 0xB5688F3B */ + pS4 = 7.91534994289814532176e-04, /* 0x3F49EFE0, 0x7501B288 */ + pS5 = 3.47933107596021167570e-05, /* 0x3F023DE1, 0x0DFDF709 */ + qS1 = -2.40339491173441421878e+00, /* 0xC0033A27, 0x1C8A2D4B */ + qS2 = 2.02094576023350569471e+00, /* 0x40002AE5, 0x9C598AC8 */ + qS3 = -6.88283971605453293030e-01, /* 0xBFE6066C, 0x1B8D0159 */ + qS4 = 7.70381505559019352791e-02; /* 0x3FB3B8C5, 0xB12E9282 */ + +#ifdef __STDC__ +double __ieee754_asin(double x) +#else +double __ieee754_asin(x) +double x; +#endif +{ + double t, w, p, q, c, r, s; + _INT32 hx, ix; + hx = __HI(x); + ix = hx & 0x7fffffff; + if (ix >= 0x3ff00000) { /* |x|>= 1 */ + if (((ix - 0x3ff00000) | __LO(x)) == 0) + /* asin(1)=+-pi/2 with inexact */ + return x * pio2_hi + x * pio2_lo; + return NAN; /* asin(|x|>1) is NaN */ + } else if (ix < 0x3fe00000) { /* |x|<0.5 */ + if (ix < 0x3e400000) { /* if |x| < 2**-27 */ + if (big + x > one) + return x; /* return x with inexact if x!=0*/ + } else + t = x * x; + p = t * (pS0 + t * (pS1 + t * (pS2 + t * (pS3 + t * (pS4 + t * pS5))))); + q = one + t * (qS1 + t * (qS2 + t * (qS3 + t * qS4))); + w = p / q; + return x + x * w; + } + /* 1> |x|>= 0.5 */ + w = one - fabs(x); + t = w * 0.5; + p = t * (pS0 + t * (pS1 + t * (pS2 + t * (pS3 + t * (pS4 + t * pS5))))); + q = one + t * (qS1 + t * (qS2 + t * (qS3 + t * qS4))); + s = sqrt(t); + if (ix >= 0x3FEF3333) { /* if |x| > 0.975 */ + w = p / q; + t = pio2_hi - (2.0 * (s + s * w) - pio2_lo); + } else { + w = s; + __LO(w) = 0; + c = (t - w * w) / (s + w); + r = p / q; + p = 2.0 * s * r - (pio2_lo - 2.0 * c); + q = pio4_hi - 2.0 * w; + t = pio4_hi - (p - q); + } + if (hx > 0) + return t; + else + return -t; +} diff --git a/src/MSL_C.PPCEABI.bare.H/e_atan2.c b/src/MSL_C.PPCEABI.bare.H/e_atan2.c new file mode 100644 index 0000000..2902bd8 --- /dev/null +++ b/src/MSL_C.PPCEABI.bare.H/e_atan2.c @@ -0,0 +1,143 @@ +/* @(#)e_atan2.c 1.2 95/01/04 */ +/* + * ==================================================== + * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. + * + * Developed at SunPro, a Sun Microsystems, Inc. business. + * Permission to use, copy, modify, and distribute this + * software is freely granted, provided that this notice + * is preserved. + * ==================================================== + * + */ + +/* __ieee754_atan2(y,x) + * Method : + * 1. Reduce y to positive by atan2(y,x)=-atan2(-y,x). + * 2. Reduce x to positive by (if x and y are unexceptional): + * ARG (x+iy) = arctan(y/x) ... if x > 0, + * ARG (x+iy) = pi - arctan[y/(-x)] ... if x < 0, + * + * Special cases: + * + * ATAN2((anything), NaN ) is NaN; + * ATAN2(NAN , (anything) ) is NaN; + * ATAN2(+-0, +(anything but NaN)) is +-0 ; + * ATAN2(+-0, -(anything but NaN)) is +-pi ; + * ATAN2(+-(anything but 0 and NaN), 0) is +-pi/2; + * ATAN2(+-(anything but INF and NaN), +INF) is +-0 ; + * ATAN2(+-(anything but INF and NaN), -INF) is +-pi; + * ATAN2(+-INF,+INF ) is +-pi/4 ; + * ATAN2(+-INF,-INF ) is +-3pi/4; + * ATAN2(+-INF, (anything but,0,NaN, and INF)) is +-pi/2; + * + * Constants: + * The hexadecimal values are the intended ones for the following + * constants. The decimal values may be used, provided that the + * compiler will convert from decimal to binary accurately enough + * to produce the hexadecimal values shown. + */ + +#include "fdlibm.h" + +#ifdef __STDC__ +static const double +#else +static double +#endif + tiny = 1.0e-300, + zero = 0.0, pi_o_4 = 7.8539816339744827900E-01, /* 0x3FE921FB, 0x54442D18 */ + pi_o_2 = 1.5707963267948965580E+00, /* 0x3FF921FB, 0x54442D18 */ + pi = 3.1415926535897931160E+00, /* 0x400921FB, 0x54442D18 */ + pi_lo = 1.2246467991473531772E-16; /* 0x3CA1A626, 0x33145C07 */ + +#ifdef __STDC__ +double __ieee754_atan2(double y, double x) +#else +double __ieee754_atan2(y, x) +double y, x; +#endif +{ + double z; + _INT32 k, m, hx, hy, ix, iy; + _UINT32 lx, ly; + + hx = __HI(x); + ix = hx & 0x7fffffff; + lx = __LO(x); + hy = __HI(y); + iy = hy & 0x7fffffff; + ly = __LO(y); + if (((ix | ((lx | -lx) >> 31)) > 0x7ff00000) || + ((iy | ((ly | -ly) >> 31)) > 0x7ff00000)) /* x or y is NaN */ + return x + y; + if ((hx - 0x3ff00000 | lx) == 0) + return atan(y); /* x=1.0 */ + m = ((hy >> 31) & 1) | ((hx >> 30) & 2); /* 2*sign(x)+sign(y) */ + + /* when y = 0 */ + if ((iy | ly) == 0) { + switch (m) { + case 0: + case 1: + return y; /* atan(+-0,+anything)=+-0 */ + case 2: + return pi + tiny; /* atan(+0,-anything) = pi */ + case 3: + return -pi - tiny; /* atan(-0,-anything) =-pi */ + } + } + /* when x = 0 */ + if ((ix | lx) == 0) + return (hy < 0) ? -pi_o_2 - tiny : pi_o_2 + tiny; + + /* when x is INF */ + if (ix == 0x7ff00000) { + if (iy == 0x7ff00000) { + switch (m) { + case 0: + return pi_o_4 + tiny; /* atan(+INF,+INF) */ + case 1: + return -pi_o_4 - tiny; /* atan(-INF,+INF) */ + case 2: + return 3.0 * pi_o_4 + tiny; /*atan(+INF,-INF)*/ + case 3: + return -3.0 * pi_o_4 - tiny; /*atan(-INF,-INF)*/ + } + } else { + switch (m) { + case 0: + return zero; /* atan(+...,+INF) */ + case 1: + return -zero; /* atan(-...,+INF) */ + case 2: + return pi + tiny; /* atan(+...,-INF) */ + case 3: + return -pi - tiny; /* atan(-...,-INF) */ + } + } + } + /* when y is INF */ + if (iy == 0x7ff00000) + return (hy < 0) ? -pi_o_2 - tiny : pi_o_2 + tiny; + + /* compute y/x */ + k = (iy - ix) >> 20; + if (k > 60) + z = pi_o_2 + 0.5 * pi_lo; /* |y/x| > 2**60 */ + else if (hx < 0 && k < -60) + z = 0.0; /* |y|/x < -2**60 */ + else + z = atan(fabs(y / x)); /* safe to do y/x */ + switch (m) { + case 0: + return z; /* atan(+,+) */ + case 1: + __HI(z) ^= 0x80000000; + return z; /* atan(-,+) */ + case 2: + return pi - (z - pi_lo); /* atan(+,-) */ + default: /* case 3 */ + return (z - pi_lo) - pi; /* atan(-,-) */ + } +} diff --git a/src/MSL_C.PPCEABI.bare.H/e_exp.c b/src/MSL_C.PPCEABI.bare.H/e_exp.c new file mode 100644 index 0000000..9a52d13 --- /dev/null +++ b/src/MSL_C.PPCEABI.bare.H/e_exp.c @@ -0,0 +1,162 @@ +/* @(#)e_exp.c 1.6 04/04/22 */ +/* + * ==================================================== + * Copyright (C) 2004 by Sun Microsystems, Inc. All rights reserved. + * + * Permission to use, copy, modify, and distribute this + * software is freely granted, provided that this notice + * is preserved. + * ==================================================== + */ +/* __ieee754_exp(x) + * Returns the exponential of x. + * + * Method + * 1. Argument reduction: + * Reduce x to an r so that |r| <= 0.5*ln2 ~ 0.34658. + * Given x, find r and integer k such that + * + * x = k*ln2 + r, |r| <= 0.5*ln2. + * + * Here r will be represented as r = hi-lo for better + * accuracy. + * + * 2. Approximation of ieee_exp(r) by a special rational function on + * the interval [0,0.34658]: + * Write + * R(r**2) = r*(ieee_exp(r)+1)/(ieee_exp(r)-1) = 2 + r*r/6 - r**4/360 + ... + * We use a special Remes algorithm on [0,0.34658] to generate + * a polynomial of degree 5 to approximate R. The maximum error + * of this polynomial approximation is bounded by 2**-59. In + * other words, + * R(z) ~ 2.0 + P1*z + P2*z**2 + P3*z**3 + P4*z**4 + P5*z**5 + * (where z=r*r, and the values of P1 to P5 are listed below) + * and + * | 5 | -59 + * | 2.0+P1*z+...+P5*z - R(z) | <= 2 + * | | + * The computation of ieee_exp(r) thus becomes + * 2*r + * exp(r) = 1 + ------- + * R - r + * r*R1(r) + * = 1 + r + ----------- (for better accuracy) + * 2 - R1(r) + * where + * 2 4 10 + * R1(r) = r - (P1*r + P2*r + ... + P5*r ). + * + * 3. Scale back to obtain ieee_exp(x): + * From step 1, we have + * ieee_exp(x) = 2^k * ieee_exp(r) + * + * Special cases: + * exp(INF) is INF, ieee_exp(NaN) is NaN; + * exp(-INF) is 0, and + * for finite argument, only ieee_exp(0)=1 is exact. + * + * Accuracy: + * according to an error analysis, the error is always less than + * 1 ulp (unit in the last place). + * + * Misc. info. + * For IEEE double + * if x > 7.09782712893383973096e+02 then ieee_exp(x) overflow + * if x < -7.45133219101941108420e+02 then ieee_exp(x) underflow + * + * Constants: + * The hexadecimal values are the intended ones for the following + * constants. The decimal values may be used, provided that the + * compiler will convert from decimal to binary accurately enough + * to produce the hexadecimal values shown. + */ +#include "fdlibm.h" +#ifdef __STDC__ +static const double +#else +static double +#endif + one = 1.0, + halF[2] = + { + 0.5, + -0.5, +}, + huge = 1.0e+300, twom1000 = 9.33263618503218878990e-302, /* 2**-1000=0x01700000,0*/ + o_threshold = 7.09782712893383973096e+02, /* 0x40862E42, 0xFEFA39EF */ + u_threshold = -7.45133219101941108420e+02, /* 0xc0874910, 0xD52D3051 */ + ln2HI[2] = + { + 6.93147180369123816490e-01, /* 0x3fe62e42, 0xfee00000 */ + -6.93147180369123816490e-01, +}, /* 0xbfe62e42, 0xfee00000 */ + ln2LO[2] = + { + 1.90821492927058770002e-10, /* 0x3dea39ef, 0x35793c76 */ + -1.90821492927058770002e-10, +}, /* 0xbdea39ef, 0x35793c76 */ + invln2 = 1.44269504088896338700e+00, /* 0x3ff71547, 0x652b82fe */ + P1 = 1.66666666666666019037e-01, /* 0x3FC55555, 0x5555553E */ + P2 = -2.77777777770155933842e-03, /* 0xBF66C16C, 0x16BEBD93 */ + P3 = 6.61375632143793436117e-05, /* 0x3F11566A, 0xAF25DE2C */ + P4 = -1.65339022054652515390e-06, /* 0xBEBBBD41, 0xC5D26BF1 */ + P5 = 4.13813679705723846039e-08; /* 0x3E663769, 0x72BEA4D0 */ +#ifdef __STDC__ +double __ieee754_exp(double x) /* default IEEE double exp */ +#else +double __ieee754_exp(x) /* default IEEE double exp */ +double x; +#endif +{ + double y, hi, lo, c, t; + int k, xsb; + unsigned hx; + hx = __HI(x); /* high word of x */ + xsb = (hx >> 31) & 1; /* sign bit of x */ + hx &= 0x7fffffff; /* high word of |x| */ + /* filter out non-finite argument */ + if (hx >= 0x40862E42) { /* if |x|>=709.78... */ + if (hx >= 0x7ff00000) { + if (((hx & 0xfffff) | __LO(x)) != 0) + return x + x; /* NaN */ + else + return (xsb == 0) ? x : 0.0; /* ieee_exp(+-inf)={inf,0} */ + } + if (x > o_threshold) + return huge * huge; /* overflow */ + if (x < u_threshold) + return twom1000 * twom1000; /* underflow */ + } + /* argument reduction */ + if (hx > 0x3fd62e42) { /* if |x| > 0.5 ln2 */ + if (hx < 0x3FF0A2B2) { /* and |x| < 1.5 ln2 */ + hi = x - ln2HI[xsb]; + lo = ln2LO[xsb]; + k = 1 - xsb - xsb; + } else { + k = (int)(invln2 * x + halF[xsb]); + t = k; + hi = x - t * ln2HI[0]; /* t*ln2HI is exact here */ + lo = t * ln2LO[0]; + } + x = hi - lo; + } else if (hx < 0x3e300000) { /* when |x|<2**-28 */ + if (huge + x > one) + return one + x; /* trigger inexact */ + } else + k = 0; + /* x is now in primary range */ + t = x * x; + c = x - t * (P1 + t * (P2 + t * (P3 + t * (P4 + t * P5)))); + if (k == 0) + return one - ((x * c) / (c - 2.0) - x); + else + y = one - ((lo - (x * c) / (2.0 - c)) - hi); + if (k >= -1021) { + __HI(y) += (k << 20); /* add k to y's exponent */ + return y; + } else { + __HI(y) += ((k + 1000) << 20); /* add k to y's exponent */ + return y * twom1000; + } +} diff --git a/src/MSL_C.PPCEABI.bare.H/e_fmod.c b/src/MSL_C.PPCEABI.bare.H/e_fmod.c new file mode 100644 index 0000000..b0f2524 --- /dev/null +++ b/src/MSL_C.PPCEABI.bare.H/e_fmod.c @@ -0,0 +1,167 @@ +/* @(#)e_fmod.c 1.2 95/01/04 */ +/* + * ==================================================== + * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. + * + * Developed at SunPro, a Sun Microsystems, Inc. business. + * Permission to use, copy, modify, and distribute this + * software is freely granted, provided that this notice + * is preserved. + * ==================================================== + */ + +/* + * __ieee754_fmod(x,y) + * Return x mod y in exact arithmetic + * Method: shift and subtract + */ + +#include "fdlibm.h" + +#ifdef __STDC__ +static const double one = 1.0, Zero[] = { + 0.0, + -0.0, +}; +#else +static double one = 1.0, Zero[] = { + 0.0, + -0.0, +}; +#endif + +#ifdef __STDC__ +double __ieee754_fmod(double x, double y) +#else +double __ieee754_fmod(x, y) +double x, y; +#endif +{ + _INT32 n, hx, hy, hz, ix, iy, sx, i; + _UINT32 lx, ly, lz; + + hx = __HI(x); /* high word of x */ + lx = __LO(x); /* low word of x */ + hy = __HI(y); /* high word of y */ + ly = __LO(y); /* low word of y */ + sx = hx & 0x80000000; /* sign of x */ + hx ^= sx; /* |x| */ + hy &= 0x7fffffff; /* |y| */ + + /* purge off exception values */ + if ((hy | ly) == 0 || (hx >= 0x7ff00000) || /* y=0,or x not finite */ + ((hy | ((ly | -ly) >> 31)) > 0x7ff00000)) /* or y is NaN */ + return (x * y) / (x * y); + if (hx <= hy) { + if ((hx < hy) || (lx < ly)) + return x; /* |x|<|y| return x */ + if (lx == ly) + return Zero[(_UINT32)sx >> 31]; /* |x|=|y| return x*0*/ + } + + /* determine ix = ilogb(x) */ + if (hx < 0x00100000) { /* subnormal x */ + if (hx == 0) { + for (ix = -1043, i = lx; i > 0; i <<= 1) + ix -= 1; + } else { + for (ix = -1022, i = (hx << 11); i > 0; i <<= 1) + ix -= 1; + } + } else + ix = (hx >> 20) - 1023; + + /* determine iy = ilogb(y) */ + if (hy < 0x00100000) { /* subnormal y */ + if (hy == 0) { + for (iy = -1043, i = ly; i > 0; i <<= 1) + iy -= 1; + } else { + for (iy = -1022, i = (hy << 11); i > 0; i <<= 1) + iy -= 1; + } + } else + iy = (hy >> 20) - 1023; + + /* set up {hx,lx}, {hy,ly} and align y to x */ + if (ix >= -1022) + hx = 0x00100000 | (0x000fffff & hx); + else { /* subnormal x, shift x to normal */ + n = -1022 - ix; + if (n <= 31) { + hx = (hx << n) | (lx >> (32 - n)); + lx <<= n; + } else { + hx = lx << (n - 32); + lx = 0; + } + } + if (iy >= -1022) + hy = 0x00100000 | (0x000fffff & hy); + else { /* subnormal y, shift y to normal */ + n = -1022 - iy; + if (n <= 31) { + hy = (hy << n) | (ly >> (32 - n)); + ly <<= n; + } else { + hy = ly << (n - 32); + ly = 0; + } + } + + /* fix point fmod */ + n = ix - iy; + while (n--) { + hz = hx - hy; + lz = lx - ly; + if (lx < ly) + hz -= 1; + if (hz < 0) { + hx = hx + hx + (lx >> 31); + lx = lx + lx; + } else { + if ((hz | lz) == 0) /* return sign(x)*0 */ + return Zero[(_UINT32)sx >> 31]; + hx = hz + hz + (lz >> 31); + lx = lz + lz; + } + } + hz = hx - hy; + lz = lx - ly; + if (lx < ly) + hz -= 1; + if (hz >= 0) { + hx = hz; + lx = lz; + } + + /* convert back to floating value and restore the sign */ + if ((hx | lx) == 0) /* return sign(x)*0 */ + return Zero[(_UINT32)sx >> 31]; + while (hx < 0x00100000) { /* normalize x */ + hx = hx + hx + (lx >> 31); + lx = lx + lx; + iy -= 1; + } + if (iy >= -1022) { /* normalize output */ + hx = ((hx - 0x00100000) | ((iy + 1023) << 20)); + __HI(x) = hx | sx; + __LO(x) = lx; + } else { /* subnormal output */ + n = -1022 - iy; + if (n <= 20) { + lx = (lx >> n) | ((_UINT32)hx << (32 - n)); + hx >>= n; + } else if (n <= 31) { + lx = (hx << (32 - n)) | (lx >> n); + hx = sx; + } else { + lx = hx >> (n - 32); + hx = sx; + } + __HI(x) = hx | sx; + __LO(x) = lx; + x *= one; /* create necessary signal */ + } + return x; /* exact output */ +} diff --git a/src/MSL_C.PPCEABI.bare.H/e_log.c b/src/MSL_C.PPCEABI.bare.H/e_log.c new file mode 100644 index 0000000..abeb901 --- /dev/null +++ b/src/MSL_C.PPCEABI.bare.H/e_log.c @@ -0,0 +1,158 @@ +/* @(#)e_log.c 1.2 95/01/04 */ +/* + * ==================================================== + * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. + * + * Developed at SunPro, a Sun Microsystems, Inc. business. + * Permission to use, copy, modify, and distribute this + * software is freely granted, provided that this notice + * is preserved. + * ==================================================== + */ + +/* __ieee754_log(x) + * Return the logrithm of x + * + * Method : + * 1. Argument Reduction: find k and f such that + * x = 2^k * (1+f), + * where sqrt(2)/2 < 1+f < sqrt(2) . + * + * 2. Approximation of log(1+f). + * Let s = f/(2+f) ; based on log(1+f) = log(1+s) - log(1-s) + * = 2s + 2/3 s**3 + 2/5 s**5 + ....., + * = 2s + s*R + * We use a special Reme algorithm on [0,0.1716] to generate + * a polynomial of degree 14 to approximate R The maximum error + * of this polynomial approximation is bounded by 2**-58.45. In + * other words, + * 2 4 6 8 10 12 14 + * R(z) ~ Lg1*s +Lg2*s +Lg3*s +Lg4*s +Lg5*s +Lg6*s +Lg7*s + * (the values of Lg1 to Lg7 are listed in the program) + * and + * | 2 14 | -58.45 + * | Lg1*s +...+Lg7*s - R(z) | <= 2 + * | | + * Note that 2s = f - s*f = f - hfsq + s*hfsq, where hfsq = f*f/2. + * In order to guarantee error in log below 1ulp, we compute log + * by + * log(1+f) = f - s*(f - R) (if f is not too large) + * log(1+f) = f - (hfsq - s*(hfsq+R)). (better accuracy) + * + * 3. Finally, log(x) = k*ln2 + log(1+f). + * = k*ln2_hi+(f-(hfsq-(s*(hfsq+R)+k*ln2_lo))) + * Here ln2 is split into two floating point number: + * ln2_hi + ln2_lo, + * where n*ln2_hi is always exact for |n| < 2000. + * + * Special cases: + * log(x) is NaN with signal if x < 0 (including -INF) ; + * log(+INF) is +INF; log(0) is -INF with signal; + * log(NaN) is that NaN with no signal. + * + * Accuracy: + * according to an error analysis, the error is always less than + * 1 ulp (unit in the last place). + * + * Constants: + * The hexadecimal values are the intended ones for the following + * constants. The decimal values may be used, provided that the + * compiler will convert from decimal to binary accurately enough + * to produce the hexadecimal values shown. + */ + +#include "fdlibm.h" + +#ifdef __STDC__ +static const double +#else +static double +#endif + ln2_hi = 6.93147180369123816490e-01, /* 3fe62e42 fee00000 */ + ln2_lo = 1.90821492927058770002e-10, /* 3dea39ef 35793c76 */ + two54 = 1.80143985094819840000e+16, /* 43500000 00000000 */ + Lg1 = 6.666666666666735130e-01, /* 3FE55555 55555593 */ + Lg2 = 3.999999999940941908e-01, /* 3FD99999 9997FA04 */ + Lg3 = 2.857142874366239149e-01, /* 3FD24924 94229359 */ + Lg4 = 2.222219843214978396e-01, /* 3FCC71C5 1D8E78AF */ + Lg5 = 1.818357216161805012e-01, /* 3FC74664 96CB03DE */ + Lg6 = 1.531383769920937332e-01, /* 3FC39A09 D078C69F */ + Lg7 = 1.479819860511658591e-01; /* 3FC2F112 DF3E5244 */ + +static double zero = 0.0; + +#ifdef __STDC__ +double __ieee754_log(double x) +#else +double __ieee754_log(x) +double x; +#endif +{ + double hfsq, f, s, z, R, w, t1, t2, dk; + _INT32 k, hx, i, j; + _UINT32 lx; + + hx = __HI(x); /* high word of x */ + lx = __LO(x); /* low word of x */ + + k = 0; + if (hx < 0x00100000) { /* x < 2**-1022 */ + if (((hx & 0x7fffffff) | lx) == 0) + return -two54 / zero; /* log(+-0)=-inf */ + if (hx < 0) { +#ifdef __STDC__ + errno = EDOM; +#endif + return (x - x) / zero; /* log(-#) = NaN */ + } + k -= 54; + x *= two54; /* subnormal number, scale up x */ + hx = __HI(x); /* high word of x */ + } + if (hx >= 0x7ff00000) + return x + x; + k += (hx >> 20) - 1023; + hx &= 0x000fffff; + i = (hx + 0x95f64) & 0x100000; + __HI(x) = hx | (i ^ 0x3ff00000); /* normalize x or x/2 */ + k += (i >> 20); + f = x - 1.0; + if ((0x000fffff & (2 + hx)) < 3) { /* |f| < 2**-20 */ + if (f == zero) + if (k == 0) + return zero; + else { + dk = (double)k; + return dk * ln2_hi + dk * ln2_lo; + } + R = f * f * (0.5 - 0.33333333333333333 * f); + if (k == 0) + return f - R; + else { + dk = (double)k; + return dk * ln2_hi - ((R - dk * ln2_lo) - f); + } + } + s = f / (2.0 + f); + dk = (double)k; + z = s * s; + i = hx - 0x6147a; + w = z * z; + j = 0x6b851 - hx; + t1 = w * (Lg2 + w * (Lg4 + w * Lg6)); + t2 = z * (Lg1 + w * (Lg3 + w * (Lg5 + w * Lg7))); + i |= j; + R = t2 + t1; + if (i > 0) { + hfsq = 0.5 * f * f; + if (k == 0) + return f - (hfsq - s * (hfsq + R)); + else + return dk * ln2_hi - ((hfsq - (s * (hfsq + R) + dk * ln2_lo)) - f); + } else { + if (k == 0) + return f - s * (f - R); + else + return dk * ln2_hi - ((s * (f - R) - dk * ln2_lo) - f); + } +} diff --git a/src/MSL_C.PPCEABI.bare.H/e_pow.c b/src/MSL_C.PPCEABI.bare.H/e_pow.c new file mode 100644 index 0000000..335679d --- /dev/null +++ b/src/MSL_C.PPCEABI.bare.H/e_pow.c @@ -0,0 +1,353 @@ +/* @(#)e_pow.c 1.2 95/01/04 */ +/* + * ==================================================== + * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. + * + * Developed at SunPro, a Sun Microsystems, Inc. business. + * Permission to use, copy, modify, and distribute this + * software is freely granted, provided that this notice + * is preserved. + * ==================================================== + */ + +/* __ieee754_pow(x,y) return x**y + * + * n + * Method: Let x = 2 * (1+f) + * 1. Compute and return log2(x) in two pieces: + * log2(x) = w1 + w2, + * where w1 has 53-24 = 29 bit trailing zeros. + * 2. Perform y*log2(x) = n+y' by simulating muti-precision + * arithmetic, where |y'|<=0.5. + * 3. Return x**y = 2**n*exp(y'*log2) + * + * Special cases: + * 1. (anything) ** 0 is 1 + * 2. (anything) ** 1 is itself + * 3. (anything) ** NAN is NAN + * 4. NAN ** (anything except 0) is NAN + * 5. +-(|x| > 1) ** +INF is +INF + * 6. +-(|x| > 1) ** -INF is +0 + * 7. +-(|x| < 1) ** +INF is +0 + * 8. +-(|x| < 1) ** -INF is +INF + * 9. +-1 ** +-INF is NAN + * 10. +0 ** (+anything except 0, NAN) is +0 + * 11. -0 ** (+anything except 0, NAN, odd integer) is +0 + * 12. +0 ** (-anything except 0, NAN) is +INF + * 13. -0 ** (-anything except 0, NAN, odd integer) is +INF + * 14. -0 ** (odd integer) = -( +0 ** (odd integer) ) + * 15. +INF ** (+anything except 0,NAN) is +INF + * 16. +INF ** (-anything except 0,NAN) is +0 + * 17. -INF ** (anything) = -0 ** (-anything) + * 18. (-anything) ** (integer) is (-1)**(integer)*(+anything**integer) + * 19. (-anything except 0 and inf) ** (non-integer) is NAN + * + * Accuracy: + * pow(x,y) returns x**y nearly rounded. In particular + * pow(integer,integer) + * always returns the correct integer provided it is + * representable. + * + * Constants : + * The hexadecimal values are the intended ones for the following + * constants. The decimal values may be used, provided that the + * compiler will convert from decimal to binary accurately enough + * to produce the hexadecimal values shown. + */ + +#include "fdlibm.h" +#ifdef __STDC__ +static const double +#else +static double +#endif + bp[] = + { + 1.0, + 1.5, +}, + dp_h[] = + { + 0.0, + 5.84962487220764160156e-01, +}, /* 0x3FE2B803, 0x40000000 */ + dp_l[] = + { + 0.0, + 1.35003920212974897128e-08, +}, /* 0x3E4CFDEB, 0x43CFD006 */ + zero = 0.0, one = 1.0, two = 2.0, two53 = 9007199254740992.0, /* 0x43400000, 0x00000000 */ + big = 1.0e300, tiny = 1.0e-300, + /* poly coefs for (3/2)*(log(x)-2s-2/3*s**3 */ + L1 = 5.99999999999994648725e-01, /* 0x3FE33333, 0x33333303 */ + L2 = 4.28571428578550184252e-01, /* 0x3FDB6DB6, 0xDB6FABFF */ + L3 = 3.33333329818377432918e-01, /* 0x3FD55555, 0x518F264D */ + L4 = 2.72728123808534006489e-01, /* 0x3FD17460, 0xA91D4101 */ + L5 = 2.30660745775561754067e-01, /* 0x3FCD864A, 0x93C9DB65 */ + L6 = 2.06975017800338417784e-01, /* 0x3FCA7E28, 0x4A454EEF */ + P1 = 1.66666666666666019037e-01, /* 0x3FC55555, 0x5555553E */ + P2 = -2.77777777770155933842e-03, /* 0xBF66C16C, 0x16BEBD93 */ + P3 = 6.61375632143793436117e-05, /* 0x3F11566A, 0xAF25DE2C */ + P4 = -1.65339022054652515390e-06, /* 0xBEBBBD41, 0xC5D26BF1 */ + P5 = 4.13813679705723846039e-08, /* 0x3E663769, 0x72BEA4D0 */ + lg2 = 6.93147180559945286227e-01, /* 0x3FE62E42, 0xFEFA39EF */ + lg2_h = 6.93147182464599609375e-01, /* 0x3FE62E43, 0x00000000 */ + lg2_l = -1.90465429995776804525e-09, /* 0xBE205C61, 0x0CA86C39 */ + ovt = 8.0085662595372944372e-0017, /* -(1024-log2(ovfl+.5ulp)) */ + cp = 9.61796693925975554329e-01, /* 0x3FEEC709, 0xDC3A03FD =2/(3ln2) */ + cp_h = 9.61796700954437255859e-01, /* 0x3FEEC709, 0xE0000000 =(float)cp */ + cp_l = -7.02846165095275826516e-09, /* 0xBE3E2FE0, 0x145B01F5 =tail of cp_h*/ + ivln2 = 1.44269504088896338700e+00, /* 0x3FF71547, 0x652B82FE =1/ln2 */ + ivln2_h = 1.44269502162933349609e+00, /* 0x3FF71547, 0x60000000 =24b 1/ln2*/ + ivln2_l = 1.92596299112661746887e-08; /* 0x3E54AE0B, 0xF85DDF44 =1/ln2 tail*/ + +#ifdef __STDC__ +double __ieee754_pow(double x, double y) +#else +double __ieee754_pow(x, y) +double x, y; +#endif +{ + double z, ax, z_h, z_l, p_h, p_l; + double y1, t1, t2, r, s, t, u, v, w; + _INT32 i, j, k, yisint, n; + _INT32 hx, hy, ix, iy; + _UINT32 lx, ly; + + hx = __HI(x); + lx = __LO(x); + hy = __HI(y); + ly = __LO(y); + ix = hx & 0x7fffffff; + iy = hy & 0x7fffffff; + + /* y==zero: x**0 = 1 */ + if ((iy | ly) == 0) + return one; + + /* +-NaN return x+y */ + if (ix > 0x7ff00000 || ((ix == 0x7ff00000) && (lx != 0)) || iy > 0x7ff00000 || + ((iy == 0x7ff00000) && (ly != 0))) { + return x + y; +#ifdef __STDC__ + errno = EDOM; /* mf-- added to conform to old ANSI standard */ +#endif + } + + /* determine if y is an odd int when x < 0 + * yisint = 0 ... y is not an integer + * yisint = 1 ... y is an odd int + * yisint = 2 ... y is an even int + */ + yisint = 0; + if (hx < 0) { + if (iy >= 0x43400000) + yisint = 2; /* even integer y */ + else if (iy >= 0x3ff00000) { + k = (iy >> 20) - 0x3ff; /* exponent */ + if (k > 20) { + j = ly >> (52 - k); + if ((j << (52 - k)) == ly) + yisint = 2 - (j & 1); + } else if (ly == 0) { + j = iy >> (20 - k); + if ((j << (20 - k)) == iy) + yisint = 2 - (j & 1); + } + } + } + + /* special value of y */ + if (ly == 0) { + if (iy == 0x7ff00000) { + + /* y is +-inf */ + if (((ix - 0x3ff00000) | lx) == 0) + return y - y; /* inf**+-1 is NaN */ + else if (ix >= 0x3ff00000) /* (|x|>1)**+-inf = inf,0 */ + return (hy >= 0) ? y : zero; + else /* (|x|<1)**-,+inf = inf,0 */ + return (hy < 0) ? -y : zero; + } + if (iy == 0x3ff00000) { + /* y is +-1 */ + if (hy < 0) + return one / x; + else + return x; + } + if (hy == 0x40000000) + return x * x; /* y is 2 */ + if (hy == 0x3fe00000) { /* y is 0.5 */ + if (hx >= 0) /* x >= +0 */ + return sqrt(x); + } + } + + ax = fabs(x); + /* special value of x */ + if (lx == 0) { + if (ix == 0x7ff00000 || ix == 0 || ix == 0x3ff00000) { + z = ax; /*x is +-0,+-inf,+-1*/ + if (hy < 0) + z = one / z; /* z = (1/|x|) */ + if (hx < 0) { + if (((ix - 0x3ff00000) | yisint) == 0) { + z = (z - z) / (z - z); /* (-1)**non-int is NaN */ + } else if (yisint == 1) + z = -z; /* (x<0)**odd = -(|x|**odd) */ + } + return z; + } + } + + /* (x<0)**(non-int) is NaN */ + if ((((hx >> 31) + 1) | yisint) == 0) { +#ifdef __STDC__ + errno = EDOM; /* mf-- added to conform to old ANSI standard */ +#endif + return NAN; + } + + /* |y| is big */ + if (iy > 0x41e00000) { /* if |y| > 2**31 */ + if (iy > 0x43f00000) { /* if |y| > 2**64, must o/uflow */ + if (ix <= 0x3fefffff) + return (hy < 0) ? big * big : tiny * tiny; + if (ix >= 0x3ff00000) + return (hy > 0) ? big * big : tiny * tiny; + } + /* over/underflow if x is not close to one */ + if (ix < 0x3fefffff) + return (hy < 0) ? big * big : tiny * tiny; + if (ix > 0x3ff00000) + return (hy > 0) ? big * big : tiny * tiny; + /* now |1-x| is tiny <= 2**-20, suffice to compute + log(x) by x-x^2/2+x^3/3-x^4/4 */ + t = x - 1; /* t has 20 trailing zeros */ + w = (t * t) * (0.5 - t * (0.3333333333333333333333 - t * 0.25)); + u = ivln2_h * t; /* ivln2_h has 21 sig. bits */ + v = t * ivln2_l - w * ivln2; + t1 = u + v; + __LO(t1) = 0; + t2 = v - (t1 - u); + } else { + double s2, s_h, s_l, t_h, t_l; + n = 0; + /* take care subnormal number */ + if (ix < 0x00100000) { + ax *= two53; + n -= 53; + ix = __HI(ax); + } + n += ((ix) >> 20) - 0x3ff; + j = ix & 0x000fffff; + /* determine interval */ + ix = j | 0x3ff00000; /* normalize ix */ + if (j <= 0x3988E) + k = 0; /* |x|> 1) | 0x20000000) + 0x00080000 + (k << 18); + t_l = ax - (t_h - bp[k]); + s_l = v * ((u - s_h * t_h) - s_h * t_l); + /* compute log(ax) */ + s2 = s * s; + r = s2 * s2 * (L1 + s2 * (L2 + s2 * (L3 + s2 * (L4 + s2 * (L5 + s2 * L6))))); + r += s_l * (s_h + s); + s2 = s_h * s_h; + t_h = 3.0 + s2 + r; + __LO(t_h) = 0; + t_l = r - ((t_h - 3.0) - s2); + /* u+v = s*(1+...) */ + u = s_h * t_h; + v = s_l * t_h + t_l * s; + /* 2/(3log2)*(s+...) */ + p_h = u + v; + __LO(p_h) = 0; + p_l = v - (p_h - u); + z_h = cp_h * p_h; /* cp_h+cp_l = 2/(3*log2) */ + z_l = cp_l * p_h + p_l * cp + dp_l[k]; + /* log2(ax) = (s+..)*2/(3*log2) = n + dp_h + z_h + z_l */ + t = (double)n; + t1 = (((z_h + z_l) + dp_h[k]) + t); + __LO(t1) = 0; + t2 = z_l - (((t1 - t) - dp_h[k]) - z_h); + } + + s = one; /* s (sign of result -ve**odd) = -1 else = 1 */ + if ((((hx >> 31) + 1) | (yisint - 1)) == 0) + s = -one; /* (-ve)**(odd int) */ + + /* split up y into y1+y2 and compute (y1+y2)*(t1+t2) */ + y1 = y; + __LO(y1) = 0; + p_l = (y - y1) * t1 + y * t2; + p_h = y1 * t1; + z = p_l + p_h; + j = __HI(z); + i = __LO(z); + if (j >= 0x40900000) { /* z >= 1024 */ + if (((j - 0x40900000) | i) != 0) /* if z > 1024 */ + return s * big * big; /* overflow */ + else { + if (p_l + ovt > z - p_h) + return s * big * big; /* overflow */ + } + } else if ((j & 0x7fffffff) >= 0x4090cc00) { /* z <= -1075 */ + if (((j - 0xc090cc00) | i) != 0) /* z < -1075 */ + return s * tiny * tiny; /* underflow */ + else { + if (p_l <= z - p_h) + return s * tiny * tiny; /* underflow */ + } + } + /* + * compute 2**(p_h+p_l) + */ + i = j & 0x7fffffff; + k = (i >> 20) - 0x3ff; + n = 0; + if (i > 0x3fe00000) { /* if |z| > 0.5, set n = [z+0.5] */ + n = j + (0x00100000 >> (k + 1)); + k = ((n & 0x7fffffff) >> 20) - 0x3ff; /* new k for n */ + t = zero; + __HI(t) = (n & ~(0x000fffff >> k)); + n = ((n & 0x000fffff) | 0x00100000) >> (20 - k); + if (j < 0) + n = -n; + p_h -= t; + } + t = p_l + p_h; + __LO(t) = 0; + u = t * lg2_h; + v = (p_l - (t - p_h)) * lg2 + t * lg2_l; + z = u + v; + w = v - (z - u); + t = z * z; + t1 = z - t * (P1 + t * (P2 + t * (P3 + t * (P4 + t * P5)))); + r = (z * t1) / (t1 - two) - (w + z * w); + z = one - (r - z); + j = __HI(z); + j += (n << 20); + if ((j >> 20) <= 0) + z = scalbn(z, n); /* subnormal output */ + else + __HI(z) += (n << 20); + return s * z; +} diff --git a/src/MSL_C.PPCEABI.bare.H/e_rem_pio2.c b/src/MSL_C.PPCEABI.bare.H/e_rem_pio2.c new file mode 100644 index 0000000..6bdf342 --- /dev/null +++ b/src/MSL_C.PPCEABI.bare.H/e_rem_pio2.c @@ -0,0 +1,184 @@ +/* @(#)e_rem_pio2.c 1.3 95/01/04 */ +/* + * ==================================================== + * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. + * + * Developed at SunPro, a Sun Microsystems, Inc. business. + * Permission to use, copy, modify, and distribute this + * software is freely granted, provided that this notice + * is preserved. + * ==================================================== + * + */ + +/* __ieee754_rem_pio2(x,y) + * + * return the remainder of x rem pi/2 in y[0]+y[1] + * use __kernel_rem_pio2() + */ + +#include "fdlibm.h" + +/* + * Table of constants for 2/pi, 396 Hex digits (476 decimal) of 2/pi + */ + +#ifdef __STDC__ +static const _INT32 two_over_pi[] = { +#else +static _INT32 two_over_pi[] = { +#endif + 0xA2F983, 0x6E4E44, 0x1529FC, 0x2757D1, 0xF534DD, 0xC0DB62, 0x95993C, 0x439041, 0xFE5163, + 0xABDEBB, 0xC561B7, 0x246E3A, 0x424DD2, 0xE00649, 0x2EEA09, 0xD1921C, 0xFE1DEB, 0x1CB129, + 0xA73EE8, 0x8235F5, 0x2EBB44, 0x84E99C, 0x7026B4, 0x5F7E41, 0x3991D6, 0x398353, 0x39F49C, + 0x845F8B, 0xBDF928, 0x3B1FF8, 0x97FFDE, 0x05980F, 0xEF2F11, 0x8B5A0A, 0x6D1F6D, 0x367ECF, + 0x27CB09, 0xB74F46, 0x3F669E, 0x5FEA2D, 0x7527BA, 0xC7EBE5, 0xF17B3D, 0x0739F7, 0x8A5292, + 0xEA6BFB, 0x5FB11F, 0x8D5D08, 0x560330, 0x46FC7B, 0x6BABF0, 0xCFBC20, 0x9AF436, 0x1DA9E3, + 0x91615E, 0xE61B08, 0x659985, 0x5F14A0, 0x68408D, 0xFFD880, 0x4D7327, 0x310606, 0x1556CA, + 0x73A8C9, 0x60E27B, 0xC08C6B, +}; + +#ifdef __STDC__ +static const _INT32 npio2_hw[] = { +#else +static _INT32 npio2_hw[] = { +#endif + 0x3FF921FB, 0x400921FB, 0x4012D97C, 0x401921FB, 0x401F6A7A, 0x4022D97C, 0x4025FDBB, 0x402921FB, + 0x402C463A, 0x402F6A7A, 0x4031475C, 0x4032D97C, 0x40346B9C, 0x4035FDBB, 0x40378FDB, 0x403921FB, + 0x403AB41B, 0x403C463A, 0x403DD85A, 0x403F6A7A, 0x40407E4C, 0x4041475C, 0x4042106C, 0x4042D97C, + 0x4043A28C, 0x40446B9C, 0x404534AC, 0x4045FDBB, 0x4046C6CB, 0x40478FDB, 0x404858EB, 0x404921FB, +}; + +/* + * invpio2: 53 bits of 2/pi + * pio2_1: first 33 bit of pi/2 + * pio2_1t: pi/2 - pio2_1 + * pio2_2: second 33 bit of pi/2 + * pio2_2t: pi/2 - (pio2_1+pio2_2) + * pio2_3: third 33 bit of pi/2 + * pio2_3t: pi/2 - (pio2_1+pio2_2+pio2_3) + */ + +#ifdef __STDC__ +static const double +#else +static double +#endif + zero = 0.00000000000000000000e+00, /* 0x00000000, 0x00000000 */ + half = 5.00000000000000000000e-01, /* 0x3FE00000, 0x00000000 */ + two24 = 1.67772160000000000000e+07, /* 0x41700000, 0x00000000 */ + invpio2 = 6.36619772367581382433e-01, /* 0x3FE45F30, 0x6DC9C883 */ + pio2_1 = 1.57079632673412561417e+00, /* 0x3FF921FB, 0x54400000 */ + pio2_1t = 6.07710050650619224932e-11, /* 0x3DD0B461, 0x1A626331 */ + pio2_2 = 6.07710050630396597660e-11, /* 0x3DD0B461, 0x1A600000 */ + pio2_2t = 2.02226624879595063154e-21, /* 0x3BA3198A, 0x2E037073 */ + pio2_3 = 2.02226624871116645580e-21, /* 0x3BA3198A, 0x2E000000 */ + pio2_3t = 8.47842766036889956997e-32; /* 0x397B839A, 0x252049C1 */ + +#ifdef __STDC__ +_INT32 __ieee754_rem_pio2(double x, double* y) +#else +_INT32 __ieee754_rem_pio2(x, y) +double x, y[]; +#endif +{ + double z, w, t, r, fn; + double tx[3]; + _INT32 e0, i, j, nx, n, ix, hx; + + hx = __HI(x); /* high word of x */ + ix = hx & 0x7fffffff; + if (ix <= 0x3fe921fb) /* |x| ~<= pi/4 , no need for reduction */ + { + y[0] = x; + y[1] = 0; + return 0; + } + if (ix < 0x4002d97c) { /* |x| < 3pi/4, special case with n=+-1 */ + if (hx > 0) { + z = x - pio2_1; + if (ix != 0x3ff921fb) { /* 33+53 bit pi is good enough */ + y[0] = z - pio2_1t; + y[1] = (z - y[0]) - pio2_1t; + } else { /* near pi/2, use 33+33+53 bit pi */ + z -= pio2_2; + y[0] = z - pio2_2t; + y[1] = (z - y[0]) - pio2_2t; + } + return 1; + } else { /* negative x */ + z = x + pio2_1; + if (ix != 0x3ff921fb) { /* 33+53 bit pi is good enough */ + y[0] = z + pio2_1t; + y[1] = (z - y[0]) + pio2_1t; + } else { /* near pi/2, use 33+33+53 bit pi */ + z += pio2_2; + y[0] = z + pio2_2t; + y[1] = (z - y[0]) + pio2_2t; + } + return -1; + } + } + if (ix <= 0x413921fb) { /* |x| ~<= 2^19*(pi/2), medium size */ + t = fabs(x); + n = (_INT32)(t * invpio2 + half); + fn = (double)n; + r = t - fn * pio2_1; + w = fn * pio2_1t; /* 1st round good to 85 bit */ + if (n < 32 && ix != npio2_hw[n - 1]) { + y[0] = r - w; /* quick check no cancellation */ + } else { + j = ix >> 20; + y[0] = r - w; + i = j - (((__HI(y[0])) >> 20) & 0x7ff); + if (i > 16) { /* 2nd iteration needed, good to 118 */ + t = r; + w = fn * pio2_2; + r = t - w; + w = fn * pio2_2t - ((t - r) - w); + y[0] = r - w; + i = j - (((__HI(y[0])) >> 20) & 0x7ff); + if (i > 49) { /* 3rd iteration need, 151 bits acc */ + t = r; /* will cover all possible cases */ + w = fn * pio2_3; + r = t - w; + w = fn * pio2_3t - ((t - r) - w); + y[0] = r - w; + } + } + } + y[1] = (r - y[0]) - w; + if (hx < 0) { + y[0] = -y[0]; + y[1] = -y[1]; + return -n; + } else + return n; + } + /* + * all other (large) arguments + */ + if (ix >= 0x7ff00000) { /* x is inf or NaN */ + y[0] = y[1] = x - x; + return 0; + } + /* set z = scalbn(|x|,ilogb(x)-23) */ + __LO(z) = __LO(x); + e0 = (ix >> 20) - 1046; /* e0 = ilogb(z)-23; */ + __HI(z) = ix - (e0 << 20); + for (i = 0; i < 2; i++) { + tx[i] = (double)((_INT32)(z)); + z = (z - tx[i]) * two24; + } + tx[2] = z; + nx = 3; + while (tx[nx - 1] == zero) + nx--; /* skip zero term */ + n = __kernel_rem_pio2(tx, y, e0, nx, 2, two_over_pi); + if (hx < 0) { + y[0] = -y[0]; + y[1] = -y[1]; + return -n; + } + return n; +} diff --git a/src/MSL_C.PPCEABI.bare.H/errno.c b/src/MSL_C.PPCEABI.bare.H/errno.c new file mode 100644 index 0000000..d013499 --- /dev/null +++ b/src/MSL_C.PPCEABI.bare.H/errno.c @@ -0,0 +1,3 @@ +#include + +int errno; diff --git a/src/MSL_C.PPCEABI.bare.H/fdlibm.h b/src/MSL_C.PPCEABI.bare.H/fdlibm.h new file mode 100644 index 0000000..5040cae --- /dev/null +++ b/src/MSL_C.PPCEABI.bare.H/fdlibm.h @@ -0,0 +1,149 @@ +/* @(#)fdlibm.h 1.2 95/01/04 */ +/* + * ==================================================== + * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. + * + * Developed at SunPro, a Sun Microsystems, Inc. business. + * Permission to use, copy, modify, and distribute this + * software is freely granted, provided that this notice + * is preserved. + * ==================================================== + */ +#ifdef __STDC__ +#include +#include +#endif + +#define _IEEE_LIBM + +#if __option(little_endian) +#define __HIp(x) *(1 + (_INT32*)x) +#define __LOp(x) *(_INT32*)x +#else +#define __HIp(x) *(_INT32*)x +#define __LOp(x) *(1 + (_INT32*)x) +#endif + +#ifdef __STDC__ +#define __P(p) p +#else +#define __P(p) () +#endif + +/* + * ANSI/POSIX + */ + +extern int signgam; + +#define MAXFLOAT ((float)3.40282346638528860e+38) + +enum fdversion { fdlibm_ieee = -1, fdlibm_svid, fdlibm_xopen, fdlibm_posix }; + +#define _LIB_VERSION_TYPE enum fdversion +#define _LIB_VERSION _fdlib_version + +/* if global variable _LIB_VERSION is not desirable, one may + * change the following to be a constant by: + * #define _LIB_VERSION_TYPE const enum version + * In that case, after one initializes the value _LIB_VERSION (see + * s_lib_version.c) during compile time, it cannot be modified + * in the middle of a program + */ +extern _LIB_VERSION_TYPE _LIB_VERSION; + +#define _IEEE_ fdlibm_ieee +#define _SVID_ fdlibm_svid +#define _XOPEN_ fdlibm_xopen +#define _POSIX_ fdlibm_posix + +struct exception { + int type; + char* name; + double arg1; + double arg2; + double retval; +}; + +#define HUGE MAXFLOAT + +/* + * set X_TLOSS = pi*2**52, which is possibly defined in + * (one may replace the following line by "#include ") + */ + +#define X_TLOSS 1.41484755040568800000e+16 + +#define DOMAIN 1 +#define SING 2 +#define OVERFLOW 3 +#define UNDERFLOW 4 +#define TLOSS 5 +#define PLOSS 6 + +/* + * ANSI/POSIX + */ + +extern int matherr __P((struct exception*)); + +/* + * IEEE Test Vector + */ +extern double significand __P((double)); + +/* + * Functions callable from C, intended to support IEEE arithmetic. + */ + +extern int ilogb __P((double)); + +/* + * BSD math library entry points + */ + +/* + * Reentrant version of gamma & lgamma; passes signgam back by reference + * as the second argument; user must allocate space for signgam. + */ +#ifdef _REENTRANT +extern double gamma_r __P((double, int*)); +extern double lgamma_r __P((double, int*)); +#endif /* _REENTRANT */ + +/* ieee style elementary functions */ +extern double __ieee754_sqrt __P((double)); +extern double __ieee754_acos __P((double)); +extern double __ieee754_acosh __P((double)); +extern double __ieee754_log __P((double)); +extern double __ieee754_atanh __P((double)); +extern double __ieee754_asin __P((double)); +extern double __ieee754_atan2 __P((double, double)); +extern double __ieee754_exp __P((double)); +extern double __ieee754_cosh __P((double)); +extern double __ieee754_fmod __P((double, double)); +extern double __ieee754_pow __P((double, double)); +extern double __ieee754_lgamma_r __P((double, int*)); +extern double __ieee754_gamma_r __P((double, int*)); +extern double __ieee754_lgamma __P((double)); +extern double __ieee754_gamma __P((double)); +extern double __ieee754_log10 __P((double)); +extern double __ieee754_sinh __P((double)); +extern double __ieee754_hypot __P((double, double)); +extern double __ieee754_j0 __P((double)); +extern double __ieee754_j1 __P((double)); +extern double __ieee754_y0 __P((double)); +extern double __ieee754_y1 __P((double)); +extern double __ieee754_jn __P((int, double)); +extern double __ieee754_yn __P((int, double)); +extern double __ieee754_remainder __P((double, double)); +extern int __ieee754_rem_pio2 __P((double, double*)); + +extern double __ieee754_scalb __P((double, int)); + +/* fdlibm kernel function */ +extern double __kernel_standard __P((double, double, int)); +extern double __kernel_sin __P((double, double, int)); +extern double __kernel_cos __P((double, double)); +extern double __kernel_tan __P((double, double, int)); +extern int __kernel_rem_pio2 __P((double*, double*, int, int, int, const int*)); diff --git a/src/MSL_C.PPCEABI.bare.H/file_io.c b/src/MSL_C.PPCEABI.bare.H/file_io.c new file mode 100644 index 0000000..a05a7ab --- /dev/null +++ b/src/MSL_C.PPCEABI.bare.H/file_io.c @@ -0,0 +1,70 @@ +#include "ansi_files.h" +#include "types.h" + +#pragma dont_inline on +int fclose(FILE* file) { + int flush_result, close_result; + + if (file == nullptr) + return (-1); + if (file->mode.file_kind == __closed_file) + return (0); + + flush_result = fflush(file); + + close_result = (*file->close_proc)(file->handle); + + file->mode.file_kind = __closed_file; + file->handle = NULL; + + if (file->state.free_buffer) + free(file->buffer); + return ((flush_result || close_result) ? -1 : 0); +} + +int fflush(FILE* file) { + int pos; + + if (file == nullptr) { + return __flush_all(); + } + + if (file->state.error != 0 || file->mode.file_kind == __closed_file) { + return -1; + } + + if (file->mode.io_mode == 1) { + return 0; + } + + if (file->state.io_state >= 3) { + file->state.io_state = 2; + } + + if (file->state.io_state == 2) { + file->buffer_len = 0; + } + + if (file->state.io_state != 1) { + file->state.io_state = 0; + return 0; + } + + if (file->mode.file_kind != __disk_file) { + pos = 0; + } else { + pos = ftell(file); + } + + if (__flush_buffer(file, 0) != 0) { + file->state.error = 1; + file->buffer_len = 0; + return -1; + } + + file->state.io_state = 0; + file->position = pos; + file->buffer_len = 0; + return 0; +} +#pragma dont_inline reset diff --git a/src/MSL_C.PPCEABI.bare.H/float.c b/src/MSL_C.PPCEABI.bare.H/float.c new file mode 100644 index 0000000..333680a --- /dev/null +++ b/src/MSL_C.PPCEABI.bare.H/float.c @@ -0,0 +1,17 @@ + +#include "math.h" + +_INT32 __float_nan[] = {0x7FFFFFFF}; +_INT32 __float_huge[] = {0x7F800000}; +_INT32 __double_min[] = {0x00100000, 0}; +_INT32 __double_max[] = {0x7fefffff, 0xffffffff}; +_INT32 __double_epsilon[] = {0x3cb00000, 0}; +_INT32 __double_tiny[] = {0, 1}; +_INT32 __double_huge[] = {0x7FF00000, 0}; +_INT32 __double_nan[] = {0x7FFFFFFF, 0xFFFFFFFF}; +_INT32 __extended_min[] = {0x00100000, 0}; +_INT32 __extended_max[] = {0x7fefffff, 0xffffffff}; +_INT32 __extended_epsilon[] = {0x3cb00000, 0}; +_INT32 __extended_tiny[] = {0, 1}; +_INT32 __extended_huge[] = {0x7FF00000, 0}; +_INT32 __extended_nan[] = {0x7FFFFFFF, 0xFFFFFFFF}; diff --git a/src/MSL_C.PPCEABI.bare.H/hyperbolicsf.c b/src/MSL_C.PPCEABI.bare.H/hyperbolicsf.c new file mode 100644 index 0000000..404e9e9 --- /dev/null +++ b/src/MSL_C.PPCEABI.bare.H/hyperbolicsf.c @@ -0,0 +1 @@ +double fabsf__Ff(float f1) { return __fabs(f1); } diff --git a/src/MSL_C.PPCEABI.bare.H/k_cos.c b/src/MSL_C.PPCEABI.bare.H/k_cos.c new file mode 100644 index 0000000..6780afe --- /dev/null +++ b/src/MSL_C.PPCEABI.bare.H/k_cos.c @@ -0,0 +1,92 @@ +/* @(#)k_cos.c 1.2 95/01/04 */ +/* + * ==================================================== + * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. + * + * Developed at SunPro, a Sun Microsystems, Inc. business. + * Permission to use, copy, modify, and distribute this + * software is freely granted, provided that this notice + * is preserved. + * ==================================================== + */ + +/* + * __kernel_cos( x, y ) + * kernel cos function on [-pi/4, pi/4], pi/4 ~ 0.785398164 + * Input x is assumed to be bounded by ~pi/4 in magnitude. + * Input y is the tail of x. + * + * Algorithm + * 1. Since cos(-x) = cos(x), we need only to consider positive x. + * 2. if x < 2^-27 (hx<0x3e400000 0), return 1 with inexact if x!=0. + * 3. cos(x) is approximated by a polynomial of degree 14 on + * [0,pi/4] + * 4 14 + * cos(x) ~ 1 - x*x/2 + C1*x + ... + C6*x + * where the remez error is + * + * | 2 4 6 8 10 12 14 | -58 + * |cos(x)-(1-.5*x +C1*x +C2*x +C3*x +C4*x +C5*x +C6*x )| <= 2 + * | | + * + * 4 6 8 10 12 14 + * 4. let r = C1*x +C2*x +C3*x +C4*x +C5*x +C6*x , then + * cos(x) = 1 - x*x/2 + r + * since cos(x+y) ~ cos(x) - sin(x)*y + * ~ cos(x) - x*y, + * a correction term is necessary in cos(x) and hence + * cos(x+y) = 1 - (x*x/2 - (r - x*y)) + * For better accuracy when x > 0.3, let qx = |x|/4 with + * the last 32 bits mask off, and if x > 0.78125, let qx = 0.28125. + * Then + * cos(x+y) = (1-qx) - ((x*x/2-qx) - (r-x*y)). + * Note that 1-qx and (x*x/2-qx) is EXACT here, and the + * magnitude of the latter is at least a quarter of x*x/2, + * thus, reducing the rounding error in the subtraction. + */ + +#include "fdlibm.h" + +#ifdef __STDC__ +static const double +#else +static double +#endif + one = 1.00000000000000000000e+00, /* 0x3FF00000, 0x00000000 */ + C1 = 4.16666666666666019037e-02, /* 0x3FA55555, 0x5555554C */ + C2 = -1.38888888888741095749e-03, /* 0xBF56C16C, 0x16C15177 */ + C3 = 2.48015872894767294178e-05, /* 0x3EFA01A0, 0x19CB1590 */ + C4 = -2.75573143513906633035e-07, /* 0xBE927E4F, 0x809C52AD */ + C5 = 2.08757232129817482790e-09, /* 0x3E21EE9E, 0xBDB4B1C4 */ + C6 = -1.13596475577881948265e-11; /* 0xBDA8FAE9, 0xBE8838D4 */ + +#ifdef __STDC__ +double __kernel_cos(double x, double y) +#else +double __kernel_cos(x, y) +double x, y; +#endif +{ + double a, hz, z, r, qx; + int ix; + ix = __HI(x) & 0x7fffffff; /* ix = |x|'s high word*/ + if (ix < 0x3e400000) { /* if x < 2**27 */ + if (((int)x) == 0) + return one; /* generate inexact */ + } + z = x * x; + r = z * (C1 + z * (C2 + z * (C3 + z * (C4 + z * (C5 + z * C6))))); + if (ix < 0x3FD33333) /* if |x| < 0.3 */ + return one - (0.5 * z - (z * r - x * y)); + else { + if (ix > 0x3fe90000) { /* x > 0.78125 */ + qx = 0.28125; + } else { + __HI(qx) = ix - 0x00200000; /* x/4 */ + __LO(qx) = 0; + } + hz = 0.5 * z - qx; + a = one - qx; + return a - (hz - (z * r - x * y)); + } +} diff --git a/src/MSL_C.PPCEABI.bare.H/k_rem_pio2.c b/src/MSL_C.PPCEABI.bare.H/k_rem_pio2.c new file mode 100644 index 0000000..ffde5d7 --- /dev/null +++ b/src/MSL_C.PPCEABI.bare.H/k_rem_pio2.c @@ -0,0 +1,349 @@ +/* @(#)k_rem_pio2.c 1.2 95/01/04 */ +/* + * ==================================================== + * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. + * + * Developed at SunPro, a Sun Microsystems, Inc. business. + * Permission to use, copy, modify, and distribute this + * software is freely granted, provided that this notice + * is preserved. + * ==================================================== + */ + +/* + * __kernel_rem_pio2(x,y,e0,nx,prec,ipio2) + * double x[],y[]; int e0,nx,prec; int ipio2[]; + * + * __kernel_rem_pio2 return the last three digits of N with + * y = x - N*pi/2 + * so that |y| < pi/2. + * + * The method is to compute the integer (mod 8) and fraction parts of + * (2/pi)*x without doing the full multiplication. In general we + * skip the part of the product that are known to be a huge integer ( + * more accurately, = 0 mod 8 ). Thus the number of operations are + * independent of the exponent of the input. + * + * (2/pi) is represented by an array of 24-bit integers in ipio2[]. + * + * Input parameters: + * x[] The input value (must be positive) is broken into nx + * pieces of 24-bit integers in double precision format. + * x[i] will be the i-th 24 bit of x. The scaled exponent + * of x[0] is given in input parameter e0 (i.e., x[0]*2^e0 + * match x's up to 24 bits. + * + * Example of breaking a double positive z into x[0]+x[1]+x[2]: + * e0 = ilogb(z)-23 + * z = scalbn(z,-e0) + * for i = 0,1,2 + * x[i] = floor(z) + * z = (z-x[i])*2**24 + * + * + * y[] ouput result in an array of double precision numbers. + * The dimension of y[] is: + * 24-bit precision 1 + * 53-bit precision 2 + * 64-bit precision 2 + * 113-bit precision 3 + * The actual value is the sum of them. Thus for 113-bit + * precison, one may have to do something like: + * + * long double t,w,r_head, r_tail; + * t = (long double)y[2] + (long double)y[1]; + * w = (long double)y[0]; + * r_head = t+w; + * r_tail = w - (r_head - t); + * + * e0 The exponent of x[0] + * + * nx dimension of x[] + * + * prec an integer indicating the precision: + * 0 24 bits (single) + * 1 53 bits (double) + * 2 64 bits (extended) + * 3 113 bits (quad) + * + * ipio2[] + * integer array, contains the (24*i)-th to (24*i+23)-th + * bit of 2/pi after binary point. The corresponding + * floating value is + * + * ipio2[i] * 2^(-24(i+1)). + * + * External function: + * double scalbn(), floor(); + * + * + * Here is the description of some local variables: + * + * jk jk+1 is the initial number of terms of ipio2[] needed + * in the computation. The recommended value is 2,3,4, + * 6 for single, double, extended,and quad. + * + * jz local integer variable indicating the number of + * terms of ipio2[] used. + * + * jx nx - 1 + * + * jv index for pointing to the suitable ipio2[] for the + * computation. In general, we want + * ( 2^e0*x[0] * ipio2[jv-1]*2^(-24jv) )/8 + * is an integer. Thus + * e0-3-24*jv >= 0 or (e0-3)/24 >= jv + * Hence jv = max(0,(e0-3)/24). + * + * jp jp+1 is the number of terms in PIo2[] needed, jp = jk. + * + * q[] double array with integral value, representing the + * 24-bits chunk of the product of x and 2/pi. + * + * q0 the corresponding exponent of q[0]. Note that the + * exponent for q[i] would be q0-24*i. + * + * PIo2[] double precision array, obtained by cutting pi/2 + * into 24 bits chunks. + * + * f[] ipio2[] in floating point + * + * iq[] integer array by breaking up q[] in 24-bits chunk. + * + * fq[] final product of x*(2/pi) in fq[0],..,fq[jk] + * + * ih integer. If >0 it indicates q[] is >= 0.5, hence + * it also indicates the *sign* of the result. + * + */ + +/* + * Constants: + * The hexadecimal values are the intended ones for the following + * constants. The decimal values may be used, provided that the + * compiler will convert from decimal to binary accurately enough + * to produce the hexadecimal values shown. + */ + +#include "fdlibm.h" + +#ifdef __STDC__ +static const _INT32 init_jk[] = {2, 3, 4, 6}; /* initial value for jk */ +#else +static _INT32 init_jk[] = {2, 3, 4, 6}; +#endif + +#ifdef __STDC__ +static const double PIo2[] = { +#else +static double PIo2[] = { +#endif + 1.57079625129699707031e+00, /* 0x3FF921FB, 0x40000000 */ + 7.54978941586159635335e-08, /* 0x3E74442D, 0x00000000 */ + 5.39030252995776476554e-15, /* 0x3CF84698, 0x80000000 */ + 3.28200341580791294123e-22, /* 0x3B78CC51, 0x60000000 */ + 1.27065575308067607349e-29, /* 0x39F01B83, 0x80000000 */ + 1.22933308981111328932e-36, /* 0x387A2520, 0x40000000 */ + 2.73370053816464559624e-44, /* 0x36E38222, 0x80000000 */ + 2.16741683877804819444e-51, /* 0x3569F31D, 0x00000000 */ +}; + +#ifdef __STDC__ +static const double +#else +static double +#endif + zero = 0.0, + one = 1.0, two24 = 1.67772160000000000000e+07, /* 0x41700000, 0x00000000 */ + twon24 = 5.96046447753906250000e-08; /* 0x3E700000, 0x00000000 */ + +#ifdef __STDC__ +_INT32 __kernel_rem_pio2(double* x, double* y, _INT32 e0, _INT32 nx, _INT32 prec, + const _INT32* ipio2) +#else +_INT32 __kernel_rem_pio2(x, y, e0, nx, prec, ipio2) +double x[], y[]; +_INT32 e0, nx, prec; +_INT32 ipio2[]; +#endif +{ + _INT32 jz, jx, jv, jp, jk, carry, n, iq[20], i, j, k, m, q0, ih; + double z, fw, f[20], fq[20], q[20]; + + /* initialize jk*/ + jk = init_jk[prec]; + jp = jk; + + /* determine jx,jv,q0, note that 3>q0 */ + jx = nx - 1; + jv = (e0 - 3) / 24; + if (jv < 0) + jv = 0; + q0 = e0 - 24 * (jv + 1); + + /* set up f[0] to f[jx+jk] where f[jx+jk] = ipio2[jv+jk] */ + j = jv - jx; + m = jx + jk; + for (i = 0; i <= m; i++, j++) + f[i] = (j < 0) ? zero : (double)ipio2[j]; + + /* compute q[0],q[1],...q[jk] */ + for (i = 0; i <= jk; i++) { + for (j = 0, fw = 0.0; j <= jx; j++) + fw += x[j] * f[jx + i - j]; + q[i] = fw; + } + + jz = jk; +recompute: + /* distill q[] into iq[] reversingly */ + for (i = 0, j = jz, z = q[jz]; j > 0; i++, j--) { + fw = (double)((_INT32)(twon24 * z)); + iq[i] = (_INT32)(z - two24 * fw); + z = q[j - 1] + fw; + } + + /* compute n */ + z = scalbn(z, q0); /* actual value of z */ + z -= 8.0 * floor(z * 0.125); /* trim off integer >= 8 */ + n = (_INT32)z; + z -= (double)n; + ih = 0; + if (q0 > 0) { /* need iq[jz-1] to determine n */ + i = (iq[jz - 1] >> (24 - q0)); + n += i; + iq[jz - 1] -= i << (24 - q0); + ih = iq[jz - 1] >> (23 - q0); + } else if (q0 == 0) + ih = iq[jz - 1] >> 23; + else if (z >= 0.5) + ih = 2; + + if (ih > 0) { /* q > 0.5 */ + n += 1; + carry = 0; + for (i = 0; i < jz; i++) { /* compute 1-q */ + j = iq[i]; + if (carry == 0) { + if (j != 0) { + carry = 1; + iq[i] = 0x1000000 - j; + } + } else + iq[i] = 0xffffff - j; + } + if (q0 > 0) { /* rare case: chance is 1 in 12 */ + switch (q0) { + case 1: + iq[jz - 1] &= 0x7fffff; + break; + case 2: + iq[jz - 1] &= 0x3fffff; + break; + } + } + if (ih == 2) { + z = one - z; + if (carry != 0) + z -= scalbn(one, q0); + } + } + + /* check if recomputation is needed */ + if (z == zero) { + j = 0; + for (i = jz - 1; i >= jk; i--) + j |= iq[i]; + if (j == 0) { /* need recomputation */ + for (k = 1; iq[jk - k] == 0; k++) + ; /* k = no. of terms needed */ + + for (i = jz + 1; i <= jz + k; i++) { /* add q[jz+1] to q[jz+k] */ + f[jx + i] = (double)ipio2[jv + i]; + for (j = 0, fw = 0.0; j <= jx; j++) + fw += x[j] * f[jx + i - j]; + q[i] = fw; + } + jz += k; + goto recompute; + } + } + + /* chop off zero terms */ + if (z == 0.0) { + jz -= 1; + q0 -= 24; + while (iq[jz] == 0) { + jz--; + q0 -= 24; + } + } else { /* break z into 24-bit if necessary */ + z = scalbn(z, -q0); + if (z >= two24) { + fw = (double)((_INT32)(twon24 * z)); + iq[jz] = (_INT32)(z - two24 * fw); + jz += 1; + q0 += 24; + iq[jz] = (_INT32)fw; + } else + iq[jz] = (_INT32)z; + } + + /* convert integer "bit" chunk to floating-point value */ + fw = scalbn(one, q0); + for (i = jz; i >= 0; i--) { + q[i] = fw * (double)iq[i]; + fw *= twon24; + } + + /* compute PIo2[0,...,jp]*q[jz,...,0] */ + for (i = jz; i >= 0; i--) { + for (fw = 0.0, k = 0; k <= jp && k <= jz - i; k++) + fw += PIo2[k] * q[i + k]; + fq[jz - i] = fw; + } + + /* compress fq[] into y[] */ + switch (prec) { + case 0: + fw = 0.0; + for (i = jz; i >= 0; i--) + fw += fq[i]; + y[0] = (ih == 0) ? fw : -fw; + break; + case 1: + case 2: + fw = 0.0; + for (i = jz; i >= 0; i--) + fw += fq[i]; + y[0] = (ih == 0) ? fw : -fw; + fw = fq[0] - fw; + for (i = 1; i <= jz; i++) + fw += fq[i]; + y[1] = (ih == 0) ? fw : -fw; + break; + case 3: /* painful */ + for (i = jz; i > 0; i--) { + fw = fq[i - 1] + fq[i]; + fq[i] += fq[i - 1] - fw; + fq[i - 1] = fw; + } + for (i = jz; i > 1; i--) { + fw = fq[i - 1] + fq[i]; + fq[i] += fq[i - 1] - fw; + fq[i - 1] = fw; + } + for (fw = 0.0, i = jz; i >= 2; i--) + fw += fq[i]; + if (ih == 0) { + y[0] = fq[0]; + y[1] = fq[1]; + y[2] = fw; + } else { + y[0] = -fq[0]; + y[1] = -fq[1]; + y[2] = -fw; + } + } + return n & 7; +} diff --git a/src/MSL_C.PPCEABI.bare.H/k_sin.c b/src/MSL_C.PPCEABI.bare.H/k_sin.c new file mode 100644 index 0000000..6c4ded3 --- /dev/null +++ b/src/MSL_C.PPCEABI.bare.H/k_sin.c @@ -0,0 +1,79 @@ +/* @(#)k_sin.c 1.2 95/01/04 */ +/* + * ==================================================== + * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. + * + * Developed at SunPro, a Sun Microsystems, Inc. business. + * Permission to use, copy, modify, and distribute this + * software is freely granted, provided that this notice + * is preserved. + * ==================================================== + */ + +/* __kernel_sin( x, y, iy) + * kernel sin function on [-pi/4, pi/4], pi/4 ~ 0.7854 + * Input x is assumed to be bounded by ~pi/4 in magnitude. + * Input y is the tail of x. + * Input iy indicates whether y is 0. (if iy=0, y assume to be 0). + * + * Algorithm + * 1. Since sin(-x) = -sin(x), we need only to consider positive x. + * 2. if x < 2^-27 (hx<0x3e400000 0), return x with inexact if x!=0. + * 3. sin(x) is approximated by a polynomial of degree 13 on + * [0,pi/4] + * 3 13 + * sin(x) ~ x + S1*x + ... + S6*x + * where + * + * |sin(x) 2 4 6 8 10 12 | -58 + * |----- - (1+S1*x +S2*x +S3*x +S4*x +S5*x +S6*x )| <= 2 + * | x | + * + * 4. sin(x+y) = sin(x) + sin'(x')*y + * ~ sin(x) + (1-x*x/2)*y + * For better accuracy, let + * 3 2 2 2 2 + * r = x *(S2+x *(S3+x *(S4+x *(S5+x *S6)))) + * then 3 2 + * sin(x) = x + (S1*x + (x *(r-y/2)+y)) + */ + +#include "fdlibm.h" + +#ifdef __STDC__ +static const double +#else +static double +#endif + half = 5.00000000000000000000e-01, /* 0x3FE00000, 0x00000000 */ + S1 = -1.66666666666666324348e-01, /* 0xBFC55555, 0x55555549 */ + S2 = 8.33333333332248946124e-03, /* 0x3F811111, 0x1110F8A6 */ + S3 = -1.98412698298579493134e-04, /* 0xBF2A01A0, 0x19C161D5 */ + S4 = 2.75573137070700676789e-06, /* 0x3EC71DE3, 0x57B1FE7D */ + S5 = -2.50507602534068634195e-08, /* 0xBE5AE5E6, 0x8A2B9CEB */ + S6 = 1.58969099521155010221e-10; /* 0x3DE5D93A, 0x5ACFD57C */ + +#ifdef __STDC__ +double __kernel_sin(double x, double y, int iy) +#else +double __kernel_sin(x, y, iy) +double x, y; +int iy; /* iy=0 if y is zero */ +#endif +{ + double z, r, v; + int ix; + ix = __HI(x) & 0x7fffffff; /* high word of x */ + if (ix < 0x3e400000) /* |x| < 2**-27 */ + { + if ((int)x == 0) + return x; + } /* generate inexact */ + z = x * x; + v = z * x; + r = S2 + z * (S3 + z * (S4 + z * (S5 + z * S6))); + if (iy == 0) + return x + v * (S1 + z * r); + else + return x - ((z * (half * y - v * r) - y) - v * S1); +} diff --git a/src/MSL_C.PPCEABI.bare.H/k_tan.c b/src/MSL_C.PPCEABI.bare.H/k_tan.c new file mode 100644 index 0000000..0c50c8e --- /dev/null +++ b/src/MSL_C.PPCEABI.bare.H/k_tan.c @@ -0,0 +1,134 @@ +/* @(#)k_tan.c 1.2 95/01/04 */ +/* + * ==================================================== + * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. + * + * Developed at SunPro, a Sun Microsystems, Inc. business. + * Permission to use, copy, modify, and distribute this + * software is freely granted, provided that this notice + * is preserved. + * ==================================================== + */ + +/* __kernel_tan( x, y, k ) + * kernel tan function on [-pi/4, pi/4], pi/4 ~ 0.7854 + * Input x is assumed to be bounded by ~pi/4 in magnitude. + * Input y is the tail of x. + * Input k indicates whether tan (if k=1) or + * -1/tan (if k= -1) is returned. + * + * Algorithm + * 1. Since tan(-x) = -tan(x), we need only to consider positive x. + * 2. if x < 2^-28 (hx<0x3e300000 0), return x with inexact if x!=0. + * 3. tan(x) is approximated by a odd polynomial of degree 27 on + * [0,0.67434] + * 3 27 + * tan(x) ~ x + T1*x + ... + T13*x + * where + * + * |tan(x) 2 4 26 | -59.2 + * |----- - (1+T1*x +T2*x +.... +T13*x )| <= 2 + * | x | + * + * Note: tan(x+y) = tan(x) + tan'(x)*y + * ~ tan(x) + (1+x*x)*y + * Therefore, for better accuracy in computing tan(x+y), let + * 3 2 2 2 2 + * r = x *(T2+x *(T3+x *(...+x *(T12+x *T13)))) + * then + * 3 2 + * tan(x+y) = x + (T1*x + (x *(r+y)+y)) + * + * 4. For x in [0.67434,pi/4], let y = pi/4 - x, then + * tan(x) = tan(pi/4-y) = (1-tan(y))/(1+tan(y)) + * = 1 - 2*(tan(y) - (tan(y)^2)/(1+tan(y))) + */ + +#include "fdlibm.h" + +#ifdef __STDC__ +static const double +#else +static double +#endif + one = 1.00000000000000000000e+00, /* 0x3FF00000, 0x00000000 */ + pio4 = 7.85398163397448278999e-01, /* 0x3FE921FB, 0x54442D18 */ + pio4lo = 3.06161699786838301793e-17, /* 0x3C81A626, 0x33145C07 */ + T[] = { + 3.33333333333334091986e-01, /* 0x3FD55555, 0x55555563 */ + 1.33333333333201242699e-01, /* 0x3FC11111, 0x1110FE7A */ + 5.39682539762260521377e-02, /* 0x3FABA1BA, 0x1BB341FE */ + 2.18694882948595424599e-02, /* 0x3F9664F4, 0x8406D637 */ + 8.86323982359930005737e-03, /* 0x3F8226E3, 0xE96E8493 */ + 3.59207910759131235356e-03, /* 0x3F6D6D22, 0xC9560328 */ + 1.45620945432529025516e-03, /* 0x3F57DBC8, 0xFEE08315 */ + 5.88041240820264096874e-04, /* 0x3F4344D8, 0xF2F26501 */ + 2.46463134818469906812e-04, /* 0x3F3026F7, 0x1A8D1068 */ + 7.81794442939557092300e-05, /* 0x3F147E88, 0xA03792A6 */ + 7.14072491382608190305e-05, /* 0x3F12B80F, 0x32F0A7E9 */ + -1.85586374855275456654e-05, /* 0xBEF375CB, 0xDB605373 */ + 2.59073051863633712884e-05, /* 0x3EFB2A70, 0x74BF7AD4 */ +}; + +#ifdef __STDC__ +double __kernel_tan(double x, double y, _INT32 iy) +#else +double __kernel_tan(x, y, iy) +double x, y; +_INT32 iy; +#endif +{ + double z, r, v, w, s; + _INT32 ix, hx; + hx = __HI(x); /* high word of x */ + ix = hx & 0x7fffffff; /* high word of |x| */ + if (ix < 0x3e300000) /* x < 2**-28 */ + { + if ((_INT32)x == 0) { /* generate inexact */ + if (((ix | __LO(x)) | (iy + 1)) == 0) + return one / fabs(x); + else + return (iy == 1) ? x : -one / x; + } + } + if (ix >= 0x3FE59428) { /* |x|>=0.6744 */ + if (hx < 0) { + x = -x; + y = -y; + } + z = pio4 - x; + w = pio4lo - y; + x = z + w; + y = 0.0; + } + z = x * x; + w = z * z; + /* Break x^5*(T[1]+x^2*T[2]+...) into + * x^5(T[1]+x^4*T[3]+...+x^20*T[11]) + + * x^5(x^2*(T[2]+x^4*T[4]+...+x^22*[T12])) + */ + r = T[1] + w * (T[3] + w * (T[5] + w * (T[7] + w * (T[9] + w * T[11])))); + v = z * (T[2] + w * (T[4] + w * (T[6] + w * (T[8] + w * (T[10] + w * T[12]))))); + s = z * x; + r = y + z * (s * (r + v) + y); + r += T[0] * s; + w = x + r; + if (ix >= 0x3FE59428) { + v = (double)iy; + return (double)(1 - ((hx >> 30) & 2)) * (v - 2.0 * (x - (w * w / (w + v) - r))); + } + if (iy == 1) + return w; + else { /* if allow error up to 2 ulp, + simply return -1.0/(x+r) here */ + /* compute -1.0/(x+r) accurately */ + double a, t; + z = w; + __LO(z) = 0; + v = r - (z - x); /* z+v = r+x */ + t = a = -1.0 / w; /* a = -1.0/w */ + __LO(t) = 0; + s = 1.0 + t * z; + return t + a * (s + t * v); + } +} diff --git a/src/MSL_C.PPCEABI.bare.H/locale.c b/src/MSL_C.PPCEABI.bare.H/locale.c new file mode 100644 index 0000000..e265db0 --- /dev/null +++ b/src/MSL_C.PPCEABI.bare.H/locale.c @@ -0,0 +1,33 @@ +#include +#include + +struct lconv __lconv = { + ".", // decimal_point + "", // thousands_sep + "", // grouping + "", // mon_decimal_point + "", // mon_thousands_sep + "", // mon_grouping + "", // positive_sign + "", // negative_sign + "", // currency_symbol + CHAR_MAX, // frac_digits + CHAR_MAX, // p_cs_precedes + CHAR_MAX, // n_cs_precedes + CHAR_MAX, // p_sep_by_space + CHAR_MAX, // n_sep_by_space + CHAR_MAX, // p_sign_posn + CHAR_MAX, // n_sign_posn + "", // int_curr_symbol + CHAR_MAX, // int_frac_digits + CHAR_MAX, // int_p_cs_precedes + CHAR_MAX, // int_n_cs_precedes + CHAR_MAX, // int_p_sep_by_space + CHAR_MAX, // int_n_sep_by_space + CHAR_MAX, // int_p_sign_posn + CHAR_MAX, // int_n_sign_posn +}; + +// Just here to generate the extra string, +// the real usage is inside setlocale, which is stripped +static char* locale_name = "C"; diff --git a/src/MSL_C.PPCEABI.bare.H/math_ppc.c b/src/MSL_C.PPCEABI.bare.H/math_ppc.c new file mode 100644 index 0000000..5304c61 --- /dev/null +++ b/src/MSL_C.PPCEABI.bare.H/math_ppc.c @@ -0,0 +1,2 @@ +#define _MATH_INLINE +#include diff --git a/src/MSL_C.PPCEABI.bare.H/mbstring.c b/src/MSL_C.PPCEABI.bare.H/mbstring.c new file mode 100644 index 0000000..9e95ff1 --- /dev/null +++ b/src/MSL_C.PPCEABI.bare.H/mbstring.c @@ -0,0 +1,115 @@ +#include "errno.h" +#include "stdio.h" +#include "string.h" + +#pragma ANSI_strict off + +#ifndef __WINT_TYPE__ +#define __WINT_TYPE__ unsigned int +#endif + +typedef struct { + int __count; + union { + __WINT_TYPE__ __wch; + char __wchb[4]; + } __value; /* Value so far. */ +} mbstate_t; + +static int is_utf8_complete(const char* s, size_t n); +static int is_utf8_complete(const char* s, size_t n) { + if (n <= 0) /* 0 or fewer characters do not form a valid multibyte character */ + return (-1); + + if (*s == 0x00) + return (0); + + if ((*s & 0x80) == 0x00) + return (1); + else if ((*s & 0xe0) == 0xc0) /* need 2 bytes */ + if (n >= 2) + if (((*(s + 1) & 0x80) == 0x80)) + return (2); + else + return (-1); + else + return (-2); + + else if ((*s & 0xf0) == 0xe0) + if (n >= 3) + if (((*(s + 1) & 0x80) == 0x80) && ((*(s + 2) & 0x80) == 0x80)) + return (3); + else + return (-1); + else if (((n == 2) && ((*(s + 1) & 0x80) == 0x80)) || (n == 1)) + return (-2); + else + return (-1); + else + return (-1); +} + +#pragma dont_inline on +static int unicode_to_UTF8(char* s, wchar_t wchar) { + int number_of_bytes; + wchar_t wide_char; + char* target_ptr; + char first_byte_mark[4] = {0x00, 0x00, 0xc0, 0xe0}; + + if (!s) { + return 0; + } + + wide_char = wchar; + if (wide_char < 0x0080) + number_of_bytes = 1; + else if (wide_char < 0x0800) + number_of_bytes = 2; + else + number_of_bytes = 3; + + target_ptr = s + number_of_bytes; + + switch (number_of_bytes) { + case 3: + *--target_ptr = (wide_char & 0x003f) | 0x80; + wide_char >>= 6; + case 2: + *--target_ptr = (wide_char & 0x003f) | 0x80; + wide_char >>= 6; + case 1: + *--target_ptr = wide_char | first_byte_mark[number_of_bytes]; + } + + return (number_of_bytes); +} +#pragma dont_inline reset + +int wctomb(char* s, wchar_t wchar) { return (unicode_to_UTF8(s, wchar)); } + +size_t wcstombs(char* s, const wchar_t* pwcs, size_t n) { + int chars_written = 0; + int result; + char temp[3]; + wchar_t* source; + + if (!s || !pwcs) + return (0); + + source = (wchar_t*)pwcs; + while (chars_written <= n) { + if (!*source) { + *(s + chars_written) = '\0'; + break; + } else { + result = wctomb(temp, *source++); + if ((chars_written + result) <= n) { + strncpy(s + chars_written, temp, result); + chars_written += result; + } else + break; + } + } + + return (chars_written); +} diff --git a/src/MSL_C.PPCEABI.bare.H/mem.c b/src/MSL_C.PPCEABI.bare.H/mem.c new file mode 100644 index 0000000..f2ed7b7 --- /dev/null +++ b/src/MSL_C.PPCEABI.bare.H/mem.c @@ -0,0 +1,70 @@ +#include + +#include "mem_funcs.h" + +void* memmove(void* dst, const void* src, size_t n) { + const char* p; + char* q; + int rev = ((unsigned long)src < (unsigned long)dst); + + if (n >= __min_bytes_for_long_copy) { + if ((((int)dst ^ (int)src)) & 3) + if (!rev) + __copy_longs_unaligned(dst, src, n); + else + __copy_longs_rev_unaligned(dst, src, n); + else if (!rev) + __copy_longs_aligned(dst, src, n); + else + __copy_longs_rev_aligned(dst, src, n); + + return dst; + } + + if (!rev) { + + for (p = (const char*)src - 1, q = (char*)dst - 1, n++; --n;) + *++q = *++p; + + } else { + for (p = (const char*)src + n, q = (char*)dst + n, n++; --n;) + *--q = *--p; + } + + return dst; +} + +void* memchr(const void* src, int val, size_t n) { + const unsigned char* p; + + unsigned long v = (val & 0xff); + + for (p = (unsigned char*)src - 1, n++; --n;) + if ((*++p & 0xff) == v) + return (void*)p; + + return NULL; +} + +void* __memrchr(const void* src, int val, size_t n) { + const unsigned char* p; + + unsigned long v = (val & 0xff); + + for (p = (unsigned char*)src + n, n++; --n;) + if (*--p == v) + return (void*)p; + + return NULL; +} + +int memcmp(const void* src1, const void* src2, size_t n) { + const unsigned char* p1; + const unsigned char* p2; + + for (p1 = (const unsigned char*)src1 - 1, p2 = (const unsigned char*)src2 - 1, n++; --n;) + if (*++p1 != *++p2) + return ((*p1 < *p2) ? -1 : +1); + + return 0; +} diff --git a/src/MSL_C.PPCEABI.bare.H/mem_funcs.c b/src/MSL_C.PPCEABI.bare.H/mem_funcs.c new file mode 100644 index 0000000..c1ce8ea --- /dev/null +++ b/src/MSL_C.PPCEABI.bare.H/mem_funcs.c @@ -0,0 +1,235 @@ +#include "mem_funcs.h" + +#pragma ANSI_strict off + +#define cps ((unsigned char*)src) +#define cpd ((unsigned char*)dst) +#define lps ((unsigned long*)src) +#define lpd ((unsigned long*)dst) +#define deref_auto_inc(p) *++(p) + +void __copy_longs_aligned(void* dst, const void* src, unsigned long n) { + unsigned long i; + + i = (-(unsigned long)dst) & 3; + + cps = ((unsigned char*)src) - 1; + cpd = ((unsigned char*)dst) - 1; + + if (i) { + n -= i; + + do + deref_auto_inc(cpd) = deref_auto_inc(cps); + while (--i); + } + + lps = ((unsigned long*)(cps + 1)) - 1; + lpd = ((unsigned long*)(cpd + 1)) - 1; + + i = n >> 5; + + if (i) + do { + deref_auto_inc(lpd) = deref_auto_inc(lps); + deref_auto_inc(lpd) = deref_auto_inc(lps); + deref_auto_inc(lpd) = deref_auto_inc(lps); + deref_auto_inc(lpd) = deref_auto_inc(lps); + deref_auto_inc(lpd) = deref_auto_inc(lps); + deref_auto_inc(lpd) = deref_auto_inc(lps); + deref_auto_inc(lpd) = deref_auto_inc(lps); + deref_auto_inc(lpd) = deref_auto_inc(lps); + } while (--i); + + i = (n & 31) >> 2; + + if (i) + do + deref_auto_inc(lpd) = deref_auto_inc(lps); + while (--i); + + cps = ((unsigned char*)(lps + 1)) - 1; + cpd = ((unsigned char*)(lpd + 1)) - 1; + +#ifdef PRIME1 + n &= 3ULL; +#else + n &= 3; +#endif + + if (n) + do + deref_auto_inc(cpd) = deref_auto_inc(cps); + while (--n); + + return; +} + +void __copy_longs_rev_aligned(void* dst, const void* src, unsigned long n) { + unsigned long i; + + cps = ((unsigned char*)src) + n; + cpd = ((unsigned char*)dst) + n; + + i = ((unsigned long)cpd) & 3; + + if (i) { + n -= i; + + do + *--cpd = *--cps; + while (--i); + } + + i = n >> 5; + + if (i) + do { + *--lpd = *--lps; + *--lpd = *--lps; + *--lpd = *--lps; + *--lpd = *--lps; + *--lpd = *--lps; + *--lpd = *--lps; + *--lpd = *--lps; + *--lpd = *--lps; + } while (--i); + + i = (n & 31) >> 2; + + if (i) + do + *--lpd = *--lps; + while (--i); + +#ifdef PRIME1 + n &= 3ULL; +#else + n &= 3; +#endif + + if (n) + do + *--cpd = *--cps; + while (--n); + + return; +} + +void __copy_longs_unaligned(void* dst, const void* src, unsigned long n) { + unsigned long i, v1, v2; + unsigned int src_offset, left_shift, right_shift; + + i = (-(unsigned long)dst) & 3; + + cps = ((unsigned char*)src) - 1; + cpd = ((unsigned char*)dst) - 1; + + if (i) { + n -= i; + + do + deref_auto_inc(cpd) = deref_auto_inc(cps); + while (--i); + } + + src_offset = ((unsigned int)(cps + 1)) & 3; + + left_shift = src_offset << 3; + right_shift = 32 - left_shift; + + cps -= src_offset; + + lps = ((unsigned long*)(cps + 1)) - 1; + lpd = ((unsigned long*)(cpd + 1)) - 1; + + i = n >> 3; + + v1 = deref_auto_inc(lps); + + do { + v2 = deref_auto_inc(lps); + deref_auto_inc(lpd) = (v1 << left_shift) | (v2 >> right_shift); + v1 = deref_auto_inc(lps); + deref_auto_inc(lpd) = (v2 << left_shift) | (v1 >> right_shift); + } while (--i); + + if (n & 4) { + v2 = deref_auto_inc(lps); + deref_auto_inc(lpd) = (v1 << left_shift) | (v2 >> right_shift); + } + + cps = ((unsigned char*)(lps + 1)) - 1; + cpd = ((unsigned char*)(lpd + 1)) - 1; + +#ifdef PRIME1 + n &= 3ULL; +#else + n &= 3; +#endif + + if (n) { + cps -= 4 - src_offset; + do + deref_auto_inc(cpd) = deref_auto_inc(cps); + while (--n); + } + + return; +} + +void __copy_longs_rev_unaligned(void* dst, const void* src, unsigned long n) { + unsigned long i, v1, v2; + unsigned int src_offset, left_shift, right_shift; + + cps = ((unsigned char*)src) + n; + cpd = ((unsigned char*)dst) + n; + + i = ((unsigned long)cpd) & 3; + + if (i) { + n -= i; + + do + *--cpd = *--cps; + while (--i); + } + + src_offset = ((unsigned int)cps) & 3; + + left_shift = src_offset << 3; + right_shift = 32 - left_shift; + + cps += 4 - src_offset; + + i = n >> 3; + + v1 = *--lps; + + do { + v2 = *--lps; + *--lpd = (v2 << left_shift) | (v1 >> right_shift); + v1 = *--lps; + *--lpd = (v1 << left_shift) | (v2 >> right_shift); + } while (--i); + + if (n & 4) { + v2 = *--lps; + *--lpd = (v2 << left_shift) | (v1 >> right_shift); + } + +#ifdef PRIME1 + n &= 3ULL; +#else + n &= 3; +#endif + + if (n) { + cps += src_offset; + do + *--cpd = *--cps; + while (--n); + } + + return; +} diff --git a/src/MSL_C.PPCEABI.bare.H/misc_io.c b/src/MSL_C.PPCEABI.bare.H/misc_io.c new file mode 100644 index 0000000..6b4060a --- /dev/null +++ b/src/MSL_C.PPCEABI.bare.H/misc_io.c @@ -0,0 +1,4 @@ +extern void (*__stdio_exit)(void); +void __close_all(void); + +void __stdio_atexit(void) { __stdio_exit = __close_all; } diff --git a/src/MSL_C.PPCEABI.bare.H/qsort.c b/src/MSL_C.PPCEABI.bare.H/qsort.c new file mode 100644 index 0000000..98e8624 --- /dev/null +++ b/src/MSL_C.PPCEABI.bare.H/qsort.c @@ -0,0 +1,76 @@ +#include + +#define table_ptr(i) (((char*)table_base) + (member_size * ((i)-1))) + +#define swap(dst, src, cnt) \ + do { \ + char* p; \ + char* q; \ + size_t n = cnt; \ + \ + unsigned long tmp; \ + \ + for (p = (char*)src - 1, q = (char*)dst - 1, n++; --n;) { \ + tmp = *++q; \ + *q = *++p; \ + *p = tmp; \ + } \ + } while (0) + +void qsort(void* table_base, size_t num_members, size_t member_size, + _compare_function compare_members) { + size_t l, r, j; + char* lp; + char* rp; + char* ip; + char* jp; + char* kp; + + if (num_members < 2) + return; + + r = num_members; + l = (r / 2) + 1; + + lp = table_ptr(l); + rp = table_ptr(r); + + for (;;) { + if (l > 1) { + l--; + lp -= member_size; + } else { + swap(lp, rp, member_size); + + if (--r == 1) + return; + + rp -= member_size; + } + + j = l; + + jp = table_ptr(j); + + while (j * 2 <= r) { + j *= 2; + + ip = jp; + jp = table_ptr(j); + + if (j < r) { + kp = jp + member_size; + + if (compare_members(jp, kp) < 0) { + j++; + jp = kp; + } + } + + if (compare_members(ip, jp) < 0) + swap(ip, jp, member_size); + else + break; + } + } +} diff --git a/src/MSL_C.PPCEABI.bare.H/rand.c b/src/MSL_C.PPCEABI.bare.H/rand.c new file mode 100644 index 0000000..9d02257 --- /dev/null +++ b/src/MSL_C.PPCEABI.bare.H/rand.c @@ -0,0 +1,10 @@ +#include + +static unsigned long int next = 1; + +int rand(void) { + next = next * 1103515245 + 12345; + return (next >> 16) & 0x7FFF; +} + +void srand(unsigned int seed) { next = seed; } diff --git a/src/MSL_C.PPCEABI.bare.H/s_atan.c b/src/MSL_C.PPCEABI.bare.H/s_atan.c new file mode 100644 index 0000000..31976b8 --- /dev/null +++ b/src/MSL_C.PPCEABI.bare.H/s_atan.c @@ -0,0 +1,142 @@ +/* @(#)s_atan.c 1.2 95/01/04 */ +/* + * ==================================================== + * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. + * + * Developed at SunPro, a Sun Microsystems, Inc. business. + * Permission to use, copy, modify, and distribute this + * software is freely granted, provided that this notice + * is preserved. + * ==================================================== + * + */ + +/* atan(x) + * Method + * 1. Reduce x to positive by atan(x) = -atan(-x). + * 2. According to the integer k=4t+0.25 chopped, t=x, the argument + * is further reduced to one of the following intervals and the + * arctangent of t is evaluated by the corresponding formula: + * + * [0,7/16] atan(x) = t-t^3*(a1+t^2*(a2+...(a10+t^2*a11)...) + * [7/16,11/16] atan(x) = atan(1/2) + atan( (t-0.5)/(1+t/2) ) + * [11/16.19/16] atan(x) = atan( 1 ) + atan( (t-1)/(1+t) ) + * [19/16,39/16] atan(x) = atan(3/2) + atan( (t-1.5)/(1+1.5t) ) + * [39/16,INF] atan(x) = atan(INF) + atan( -1/t ) + * + * Constants: + * The hexadecimal values are the intended ones for the following + * constants. The decimal values may be used, provided that the + * compiler will convert from decimal to binary accurately enough + * to produce the hexadecimal values shown. + */ + +#include "fdlibm.h" + +#ifdef __STDC__ +static const double atanhi[] = { +#else +static double atanhi[] = { +#endif + 4.63647609000806093515e-01, /* atan(0.5)hi 0x3FDDAC67, 0x0561BB4F */ + 7.85398163397448278999e-01, /* atan(1.0)hi 0x3FE921FB, 0x54442D18 */ + 9.82793723247329054082e-01, /* atan(1.5)hi 0x3FEF730B, 0xD281F69B */ + 1.57079632679489655800e+00, /* atan(inf)hi 0x3FF921FB, 0x54442D18 */ +}; + +#ifdef __STDC__ +static const double atanlo[] = { +#else +static double atanlo[] = { +#endif + 2.26987774529616870924e-17, /* atan(0.5)lo 0x3C7A2B7F, 0x222F65E2 */ + 3.06161699786838301793e-17, /* atan(1.0)lo 0x3C81A626, 0x33145C07 */ + 1.39033110312309984516e-17, /* atan(1.5)lo 0x3C700788, 0x7AF0CBBD */ + 6.12323399573676603587e-17, /* atan(inf)lo 0x3C91A626, 0x33145C07 */ +}; + +#ifdef __STDC__ +static const double aT[] = { +#else +static double aT[] = { +#endif + 3.33333333333329318027e-01, /* 0x3FD55555, 0x5555550D */ + -1.99999999998764832476e-01, /* 0xBFC99999, 0x9998EBC4 */ + 1.42857142725034663711e-01, /* 0x3FC24924, 0x920083FF */ + -1.11111104054623557880e-01, /* 0xBFBC71C6, 0xFE231671 */ + 9.09088713343650656196e-02, /* 0x3FB745CD, 0xC54C206E */ + -7.69187620504482999495e-02, /* 0xBFB3B0F2, 0xAF749A6D */ + 6.66107313738753120669e-02, /* 0x3FB10D66, 0xA0D03D51 */ + -5.83357013379057348645e-02, /* 0xBFADDE2D, 0x52DEFD9A */ + 4.97687799461593236017e-02, /* 0x3FA97B4B, 0x24760DEB */ + -3.65315727442169155270e-02, /* 0xBFA2B444, 0x2C6A6C2F */ + 1.62858201153657823623e-02, /* 0x3F90AD3A, 0xE322DA11 */ +}; + +#ifdef __STDC__ +static const double +#else +static double +#endif + one = 1.0, + big = 1.0e300; + +#ifdef __STDC__ +double atan(double x) +#else +double atan(x) +double x; +#endif +{ + double w, s1, s2, z; + _INT32 ix, hx, id; + + hx = __HI(x); + ix = hx & 0x7fffffff; + if (ix >= 0x44100000) { /* if |x| >= 2^66 */ + if (ix > 0x7ff00000 || (ix == 0x7ff00000 && (__LO(x) != 0))) + return x + x; /* NaN */ + if (hx > 0) + return atanhi[3] + atanlo[3]; + else + return -atanhi[3] - atanlo[3]; + } + if (ix < 0x3fdc0000) { /* |x| < 0.4375 */ + if (ix < 0x3e200000) { /* |x| < 2^-29 */ + if (big + x > one) + return x; /* raise inexact */ + } + id = -1; + } else { + x = fabs(x); + if (ix < 0x3ff30000) { /* |x| < 1.1875 */ + if (ix < 0x3fe60000) { /* 7/16 <=|x|<11/16 */ + id = 0; + x = (2.0 * x - one) / (2.0 + x); + } else { /* 11/16<=|x|< 19/16 */ + id = 1; + x = (x - one) / (x + one); + } + } else { + if (ix < 0x40038000) { /* |x| < 2.4375 */ + id = 2; + x = (x - 1.5) / (one + 1.5 * x); + } else { /* 2.4375 <= |x| < 2^66 */ + id = 3; + x = -1.0 / x; + } + } + } + /* end of argument reduction */ + z = x * x; + w = z * z; + /* break sum from i=0 to 10 aT[i]z**(i+1) into odd and even poly */ + s1 = z * (aT[0] + w * (aT[2] + w * (aT[4] + w * (aT[6] + w * (aT[8] + w * aT[10]))))); + s2 = w * (aT[1] + w * (aT[3] + w * (aT[5] + w * (aT[7] + w * aT[9])))); + if (id < 0) + return x - x * (s1 + s2); + else { + z = atanhi[id] - ((x * (s1 + s2) - atanlo[id]) - x); + return (hx < 0) ? -z : z; + } +} diff --git a/src/MSL_C.PPCEABI.bare.H/s_copysign.c b/src/MSL_C.PPCEABI.bare.H/s_copysign.c new file mode 100644 index 0000000..38b88a3 --- /dev/null +++ b/src/MSL_C.PPCEABI.bare.H/s_copysign.c @@ -0,0 +1,30 @@ +/* @(#)s_copysign.c 1.2 95/01/04 */ +/* + * ==================================================== + * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. + * + * Developed at SunPro, a Sun Microsystems, Inc. business. + * Permission to use, copy, modify, and distribute this + * software is freely granted, provided that this notice + * is preserved. + * ==================================================== + */ + +/* + * copysign(double x, double y) + * copysign(x,y) returns a value with the magnitude of x and + * with the sign bit of y. + */ + +#include "fdlibm.h" + +#ifdef __STDC__ +double copysign(double x, double y) +#else +double __copysign(x, y) +double x, y; +#endif +{ + __HI(x) = (__HI(x) & 0x7fffffff) | (__HI(y) & 0x80000000); + return x; +} diff --git a/src/MSL_C.PPCEABI.bare.H/s_cos.c b/src/MSL_C.PPCEABI.bare.H/s_cos.c new file mode 100644 index 0000000..833d871 --- /dev/null +++ b/src/MSL_C.PPCEABI.bare.H/s_cos.c @@ -0,0 +1,75 @@ +/* @(#)s_cos.c 1.3 95/01/18 */ +/* + * ==================================================== + * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. + * + * Developed at SunSoft, a Sun Microsystems, Inc. business. + * Permission to use, copy, modify, and distribute this + * software is freely granted, provided that this notice + * is preserved. + * ==================================================== + */ +/* cos(x) + * Return cosine function of x. + * + * kernel function: + * __kernel_sin ... sine function on [-pi/4,pi/4] + * __kernel_cos ... cosine function on [-pi/4,pi/4] + * __ieee754_rem_pio2 ... argument reduction routine + * + * Method. + * Let S,C and T denote the sin, cos and tan respectively on + * [-PI/4, +PI/4]. Reduce the argument x to y1+y2 = x-k*pi/2 + * in [-pi/4 , +pi/4], and let n = k mod 4. + * We have + * + * n sin(x) cos(x) tan(x) + * ---------------------------------------------------------- + * 0 S C T + * 1 C -S -1/T + * 2 -S -C T + * 3 -C S -1/T + * ---------------------------------------------------------- + * + * Special cases: + * Let trig be any of sin, cos, or tan. + * trig(+-INF) is NaN, with signals; + * trig(NaN) is that NaN; + * + * Accuracy: + * TRIG(x) returns trig(x) nearly rounded + */ +#include "fdlibm.h" +#ifdef __STDC__ +double cos(double x) +#else +double cos(x) +double x; +#endif +{ + double y[2], z = 0.0; + int n, ix; + /* High word of x. */ + ix = __HI(x); + /* |x| ~< pi/4 */ + ix &= 0x7fffffff; + if (ix <= 0x3fe921fb) + return __kernel_cos(x, z); + /* cos(Inf or NaN) is NaN */ + else if (ix >= 0x7ff00000) + return x - x; + /* argument reduction needed */ + else { + n = __ieee754_rem_pio2(x, y); + switch (n & 3) { + case 0: + return __kernel_cos(y[0], y[1]); + case 1: + return -__kernel_sin(y[0], y[1], 1); + case 2: + return -__kernel_cos(y[0], y[1]); + default: + return __kernel_sin(y[0], y[1], 1); + } + } +} diff --git a/src/MSL_C.PPCEABI.bare.H/s_floor.c b/src/MSL_C.PPCEABI.bare.H/s_floor.c new file mode 100644 index 0000000..bac24bc --- /dev/null +++ b/src/MSL_C.PPCEABI.bare.H/s_floor.c @@ -0,0 +1,87 @@ +/* @(#)s_floor.c 1.3 95/01/18 */ +/* + * ==================================================== + * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. + * + * Developed at SunSoft, a Sun Microsystems, Inc. business. + * Permission to use, copy, modify, and distribute this + * software is freely granted, provided that this notice + * is preserved. + * ==================================================== + */ +/* + * floor(x) + * Return x rounded toward -inf to integral value + * Method: + * Bit twiddling. + * Exception: + * Inexact flag raised if x not equal to floor(x). + */ +#include "fdlibm.h" + +#ifdef __STDC__ +static const double huge = 1.0e300; +#else +static double huge = 1.0e300; +#endif + +#ifdef __STDC__ +double floor(double x) +#else +double floor(x) +double x; +#endif +{ + int i0, i1, j0; + unsigned i, j; + i0 = __HI(x); + i1 = __LO(x); + j0 = ((i0 >> 20) & 0x7ff) - 0x3ff; + if (j0 < 20) { + if (j0 < 0) { /* raise inexact if x != 0 */ + if (huge + x > 0.0) { /* return 0*sign(x) if |x|<1 */ + if (i0 >= 0) { + i0 = i1 = 0; + } else if (((i0 & 0x7fffffff) | i1) != 0) { + i0 = 0xbff00000; + i1 = 0; + } + } + } else { + i = (0x000fffff) >> j0; + if (((i0 & i) | i1) == 0) + return x; /* x is integral */ + if (huge + x > 0.0) { /* raise inexact flag */ + if (i0 < 0) + i0 += (0x00100000) >> j0; + i0 &= (~i); + i1 = 0; + } + } + } else if (j0 > 51) { + if (j0 == 0x400) + return x + x; /* inf or NaN */ + else + return x; /* x is integral */ + } else { + i = ((unsigned)(0xffffffff)) >> (j0 - 20); + if ((i1 & i) == 0) + return x; /* x is integral */ + if (huge + x > 0.0) { /* raise inexact flag */ + if (i0 < 0) { + if (j0 == 20) + i0 += 1; + else { + j = i1 + (1 << (52 - j0)); + if (j < i1) + i0 += 1; /* got a carry */ + i1 = j; + } + } + i1 &= (~i); + } + } + __HI(x) = i0; + __LO(x) = i1; + return x; +} diff --git a/src/MSL_C.PPCEABI.bare.H/s_frexp.c b/src/MSL_C.PPCEABI.bare.H/s_frexp.c new file mode 100644 index 0000000..dcc1a26 --- /dev/null +++ b/src/MSL_C.PPCEABI.bare.H/s_frexp.c @@ -0,0 +1,57 @@ +/* @(#)s_frexp.c 1.3 95/01/04 */ +/* + * ==================================================== + * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. + * + * Developed at SunPro, a Sun Microsystems, Inc. business. + * Permission to use, copy, modify, and distribute this + * software is freely granted, provided that this notice + * is preserved. + * ==================================================== + */ + +/* + * for non-zero x + * x = frexp(arg,&exp); + * return a double fp quantity x such that 0.5 <= |x| <1.0 + * and the corresponding binary exponent "exp". That is + * arg = x*2^exp. + * If arg is inf, 0.0, or NaN, then frexp(arg,&exp) returns arg + * with *exp=0. + */ + +#include "fdlibm.h" + +#ifdef __STDC__ +static const double +#else +static double +#endif + two54 = 1.80143985094819840000e+16; /* 0x43500000, 0x00000000 */ + +#ifdef __STDC__ +double frexp(double x, int* eptr) +#else +double frexp(x, eptr) +double x; +int* eptr; +#endif +{ + int hx, ix, lx; + hx = __HI(x); + ix = 0x7fffffff & hx; + lx = __LO(x); + *eptr = 0; + if (ix >= 0x7ff00000 || ((ix | lx) == 0)) + return x; /* 0,inf,nan */ + if (ix < 0x00100000) { /* subnormal */ + x *= two54; + hx = __HI(x); + ix = hx & 0x7fffffff; + *eptr = -54; + } + *eptr += (ix >> 20) - 1022; + hx = (hx & 0x800fffff) | 0x3fe00000; + __HI(x) = hx; + return x; +} diff --git a/src/MSL_C.PPCEABI.bare.H/s_ldexp.c b/src/MSL_C.PPCEABI.bare.H/s_ldexp.c new file mode 100644 index 0000000..aeeda31 --- /dev/null +++ b/src/MSL_C.PPCEABI.bare.H/s_ldexp.c @@ -0,0 +1,54 @@ +/* @(#)s_ldexp.c 1.2 95/01/04 */ +/* + * ==================================================== + * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. + * + * Developed at SunPro, a Sun Microsystems, Inc. business. + * Permission to use, copy, modify, and distribute this + * software is freely granted, provided that this notice + * is preserved. + * ==================================================== + */ + +#include "fdlibm.h" + +static const double two54 = 1.80143985094819840000e+16, /* 0x43500000, 0x00000000 */ + twom54 = 5.55111512312578270212e-17, /* 0x3C900000, 0x00000000 */ + big = 1.0e+300, tiny = 1.0e-300; + +double ldexp(double x, int n) { + _INT32 k, hx, lx; + if (!isfinite(x) || x == 0.0) + return x; + + hx = __HI(x); + lx = __LO(x); + k = (hx & 0x7ff00000) >> 20; /* extract exponent */ + if (k == 0) { /* 0 or subnormal x */ + if ((lx | (hx & 0x7fffffff)) == 0) + return x; /* +-0 */ + x *= two54; + hx = __HI(x); + k = ((hx & 0x7ff00000) >> 20) - 54; + if (n < -50000) + return tiny * x; /*underflow*/ + } + if (k == 0x7ff) + return x + x; /* NaN or Inf */ + k = k + n; + if (k > 0x7fe) + return big * copysign(big, x); /* overflow */ + if (k > 0) /* normal result */ + { + __HI(x) = (hx & 0x800fffff) | (k << 20); + return x; + } + if (k <= -54) + if (n > 50000) /* in case integer overflow in n+k */ + return big * copysign(big, x); /*overflow*/ + else + return tiny * copysign(tiny, x); /*underflow*/ + k += 54; /* subnormal result */ + __HI(x) = (hx & 0x800fffff) | (k << 20); + return x * twom54; +} diff --git a/src/MSL_C.PPCEABI.bare.H/s_modf.c b/src/MSL_C.PPCEABI.bare.H/s_modf.c new file mode 100644 index 0000000..9352e72 --- /dev/null +++ b/src/MSL_C.PPCEABI.bare.H/s_modf.c @@ -0,0 +1,79 @@ +/* @(#)s_modf.c 1.2 95/01/04 */ +/* + * ==================================================== + * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. + * + * Developed at SunPro, a Sun Microsystems, Inc. business. + * Permission to use, copy, modify, and distribute this + * software is freely granted, provided that this notice + * is preserved. + * ==================================================== + */ + +/* + * modf(double x, double *iptr) + * return fraction part of x, and return x's integral part in *iptr. + * Method: + * Bit twiddling. + * + * Exception: + * No exception. + */ + +#include "fdlibm.h" + +#ifdef __STDC__ +static const double one = 1.0; +#else +static double one = 1.0; +#endif + +#ifdef __STDC__ +double modf(double x, double* iptr) +#else +double modf(x, iptr) +double x, *iptr; +#endif +{ + _INT32 i0, i1, j0; + _UINT32 i; + i0 = __HI(x); /* high x */ + i1 = __LO(x); /* low x */ + j0 = ((i0 >> 20) & 0x7ff) - 0x3ff; /* exponent of x */ + if (j0 < 20) { /* integer part in high x */ + if (j0 < 0) { /* |x|<1 */ + __HIp(iptr) = i0 & 0x80000000; + __LOp(iptr) = 0; /* *iptr = +-0 */ + return x; + } else { + i = (0x000fffff) >> j0; + if (((i0 & i) | i1) == 0) { /* x is integral */ + *iptr = x; + __HI(x) &= 0x80000000; + __LO(x) = 0; /* return +-0 */ + return x; + } else { + __HIp(iptr) = i0 & (~i); + __LOp(iptr) = 0; + return x - *iptr; + } + } + } else if (j0 > 51) { /* no fraction part */ + *iptr = x * one; + __HI(x) &= 0x80000000; + __LO(x) = 0; /* return +-0 */ + return x; + } else { /* fraction part in low x */ + i = ((_UINT32)(0xffffffff)) >> (j0 - 20); + if ((i1 & i) == 0) { /* x is integral */ + *iptr = x; + __HI(x) &= 0x80000000; + __LO(x) = 0; /* return +-0 */ + return x; + } else { + __HIp(iptr) = i0; + __LOp(iptr) = i1 & (~i); + return x - *iptr; + } + } +} diff --git a/src/MSL_C.PPCEABI.bare.H/s_nextafter.c b/src/MSL_C.PPCEABI.bare.H/s_nextafter.c new file mode 100644 index 0000000..44ce353 --- /dev/null +++ b/src/MSL_C.PPCEABI.bare.H/s_nextafter.c @@ -0,0 +1,88 @@ +/* @(#)s_nextafter.c 1.2 95/01/04 */ +/* + * ==================================================== + * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. + * + * Developed at SunPro, a Sun Microsystems, Inc. business. + * Permission to use, copy, modify, and distribute this + * software is freely granted, provided that this notice + * is preserved. + * ==================================================== + */ + +/* IEEE functions + * nextafter(x,y) + * return the next machine floating-point number of x in the + * direction toward y. + * Special cases: + */ + +#include "fdlibm.h" + +#ifdef __STDC__ +double nextafter(double x, double y) +#else +double nextafter(x, y) +double x, y; +#endif +{ + _INT32 hx, hy, ix, iy; + _UINT32 lx, ly; + + hx = __HI(x); /* high word of x */ + lx = __LO(x); /* low word of x */ + hy = __HI(y); /* high word of y */ + ly = __LO(y); /* low word of y */ + ix = hx & 0x7fffffff; /* |x| */ + iy = hy & 0x7fffffff; /* |y| */ + + if (((ix >= 0x7ff00000) && ((ix - 0x7ff00000) | lx) != 0) || /* x is nan */ + ((iy >= 0x7ff00000) && ((iy - 0x7ff00000) | ly) != 0)) /* y is nan */ + return x + y; + if (x == y) + return x; /* x=y, return x */ + if ((ix | lx) == 0) { /* x == 0 */ + __HI(x) = hy & 0x80000000; /* return +-minsubnormal */ + __LO(x) = 1; + y = x * x; + if (y == x) + return y; + else + return x; /* raise underflow flag */ + } + if (hx >= 0) { /* x > 0 */ + if (hx > hy || ((hx == hy) && (lx > ly))) { /* x > y, x -= ulp */ + if (lx == 0) + hx -= 1; + lx -= 1; + } else { /* x < y, x += ulp */ + lx += 1; + if (lx == 0) + hx += 1; + } + } else { /* x < 0 */ + if (hy >= 0 || hx > hy || ((hx == hy) && (lx > ly))) { /* x < y, x -= ulp */ + if (lx == 0) + hx -= 1; + lx -= 1; + } else { /* x > y, x += ulp */ + lx += 1; + if (lx == 0) + hx += 1; + } + } + hy = hx & 0x7ff00000; + if (hy >= 0x7ff00000) + return x + x; /* overflow */ + if (hy < 0x00100000) { /* underflow */ + y = x * x; + if (y != x) { /* raise underflow flag */ + __HI(y) = hx; + __LO(y) = lx; + return y; + } + } + __HI(x) = hx; + __LO(x) = lx; + return x; +} diff --git a/src/MSL_C.PPCEABI.bare.H/s_sin.c b/src/MSL_C.PPCEABI.bare.H/s_sin.c new file mode 100644 index 0000000..ebb4dee --- /dev/null +++ b/src/MSL_C.PPCEABI.bare.H/s_sin.c @@ -0,0 +1,84 @@ +/* @(#)s_sin.c 1.2 95/01/04 */ +/* + * ==================================================== + * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. + * + * Developed at SunPro, a Sun Microsystems, Inc. business. + * Permission to use, copy, modify, and distribute this + * software is freely granted, provided that this notice + * is preserved. + * ==================================================== + */ + +/* sin(x) + * Return sine function of x. + * + * kernel function: + * __kernel_sin ... sine function on [-pi/4,pi/4] + * __kernel_cos ... cose function on [-pi/4,pi/4] + * __ieee754_rem_pio2 ... argument reduction routine + * + * Method. + * Let S,C and T denote the sin, cos and tan respectively on + * [-PI/4, +PI/4]. Reduce the argument x to y1+y2 = x-k*pi/2 + * in [-pi/4 , +pi/4], and let n = k mod 4. + * We have + * + * n sin(x) cos(x) tan(x) + * ---------------------------------------------------------- + * 0 S C T + * 1 C -S -1/T + * 2 -S -C T + * 3 -C S -1/T + * ---------------------------------------------------------- + * + * Special cases: + * Let trig be any of sin, cos, or tan. + * trig(+-INF) is NaN, with signals; + * trig(NaN) is that NaN; + * + * Accuracy: + * TRIG(x) returns trig(x) nearly rounded + */ + +#include "fdlibm.h" + +#ifdef __STDC__ +double sin(double x) +#else +double sin(x) +double x; +#endif +{ + double y[2], z = 0.0; + int n, ix; + + /* High word of x. */ + ix = __HI(x); + + /* |x| ~< pi/4 */ + ix &= 0x7fffffff; + if (ix <= 0x3fe921fb) + return __kernel_sin(x, z, 0); + + /* sin(Inf or NaN) is NaN */ + else if (ix >= 0x7ff00000) + return x - x; + + /* argument reduction needed */ + else { + + n = __ieee754_rem_pio2(x, y); + + switch (n & 3) { + case 0: + return __kernel_sin(y[0], y[1], 1); + case 1: + return __kernel_cos(y[0], y[1]); + case 2: + return -__kernel_sin(y[0], y[1], 1); + default: + return -__kernel_cos(y[0], y[1]); + } + } +} diff --git a/src/MSL_C.PPCEABI.bare.H/s_tan.c b/src/MSL_C.PPCEABI.bare.H/s_tan.c new file mode 100644 index 0000000..6edb666 --- /dev/null +++ b/src/MSL_C.PPCEABI.bare.H/s_tan.c @@ -0,0 +1,73 @@ +/* @(#)s_tan.c 1.2 95/01/04 */ +/* + * ==================================================== + * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. + * + * Developed at SunPro, a Sun Microsystems, Inc. business. + * Permission to use, copy, modify, and distribute this + * software is freely granted, provided that this notice + * is preserved. + * ==================================================== + */ + +/* tan(x) + * Return tangent function of x. + * + * kernel function: + * __kernel_tan ... tangent function on [-pi/4,pi/4] + * __ieee754_rem_pio2 ... argument reduction routine + * + * Method. + * Let S,C and T denote the sin, cos and tan respectively on + * [-PI/4, +PI/4]. Reduce the argument x to y1+y2 = x-k*pi/2 + * in [-pi/4 , +pi/4], and let n = k mod 4. + * We have + * + * n sin(x) cos(x) tan(x) + * ---------------------------------------------------------- + * 0 S C T + * 1 C -S -1/T + * 2 -S -C T + * 3 -C S -1/T + * ---------------------------------------------------------- + * + * Special cases: + * Let trig be any of sin, cos, or tan. + * trig(+-INF) is NaN, with signals; + * trig(NaN) is that NaN; + * + * Accuracy: + * TRIG(x) returns trig(x) nearly rounded + */ + +#include "fdlibm.h" + +#ifdef __STDC__ +double tan(double x) +#else +double tan(x) +double x; +#endif +{ + double y[2], z = 0.0; + _INT32 n, ix; + + /* High word of x. */ + ix = __HI(x); + + /* |x| ~< pi/4 */ + ix &= 0x7fffffff; + if (ix <= 0x3fe921fb) + return __kernel_tan(x, z, 1); + + /* tan(Inf or NaN) is NaN */ + else if (ix >= 0x7ff00000) + return x - x; /* NaN */ + + /* argument reduction needed */ + else { + n = __ieee754_rem_pio2(x, y); + return __kernel_tan(y[0], y[1], 1 - ((n & 1) << 1)); /* 1 -- n even + -1 -- n odd */ + } +} diff --git a/src/MSL_C.PPCEABI.bare.H/sscanf.c b/src/MSL_C.PPCEABI.bare.H/sscanf.c new file mode 100644 index 0000000..171ee58 --- /dev/null +++ b/src/MSL_C.PPCEABI.bare.H/sscanf.c @@ -0,0 +1,26 @@ +#include "stdio.h" + +int __StringRead(void* isc, int ch, int Action) { + char ret; + __InStrCtrl* iscp = (__InStrCtrl*)isc; + switch (Action) { + case __GetChar: + ret = *(iscp->NextChar); + if (ret == '\0') { + iscp->NullCharDetected = 1; + return (EOF); + } else { + iscp->NextChar++; + return ((unsigned char)ret); + } + case __UngetChar: + if (!iscp->NullCharDetected) + iscp->NextChar--; + else + iscp->NullCharDetected = 0; + return (ch); + case __CheckForError: + return (iscp->NullCharDetected); + } + return 0; +} diff --git a/src/MSL_C.PPCEABI.bare.H/string.c b/src/MSL_C.PPCEABI.bare.H/string.c new file mode 100644 index 0000000..82ca568 --- /dev/null +++ b/src/MSL_C.PPCEABI.bare.H/string.c @@ -0,0 +1,201 @@ +#include "string.h" + +size_t strlen(const char* str) { + size_t len = -1; + unsigned char* p = (unsigned char*)str - 1; + do { + len++; + } while (*++p); + return len; +} + +char*(strcpy)(char* dst, const char* src) { + unsigned char *destb, *fromb; + unsigned int w, t, align; + unsigned int k1; + unsigned int k2; + + fromb = (unsigned char*)src; + destb = (unsigned char*)dst; + + if ((align = ((int)fromb & 3)) != ((int)destb & 3)) { + goto bytecopy; + } + + if (align) { + if ((*destb = *fromb) == 0) { + return dst; + } + + for (align = 3 - align; align; align--) { + if ((*(++destb) = *(++fromb)) == 0) { + return dst; + } + } + ++destb; + ++fromb; + } + + k1 = 0x80808080; + k2 = 0xfefefeff; + + w = *((int*)(fromb)); + t = w + k2; + t &= k1; + if (t) { + goto bytecopy; + } + + --((int*)(destb)); + + do { + *(++((int*)(destb))) = w; + w = *(++((int*)(fromb))); + + t = w + k2; + t &= k1; + if (t) + goto adjust; + } while (1); + +adjust: + ++((int*)(destb)); + +bytecopy: + if ((*destb = *fromb) == 0) + return (dst); + do { + if ((*(++destb) = *(++fromb)) == 0) + return dst; + } while (1); + + return dst; +} + +char* strncpy(char* dst, const char* src, size_t n) { + const unsigned char* p = (const unsigned char*)src - 1; + unsigned char* q = (unsigned char*)dst - 1; + unsigned char zero = 0; + + n++; + + while (--n) + if (!(*++q = *++p)) { + while (--n) + *++q = 0; + break; + } + + return dst; +} + +int strcmp(const char* str1, const char* str2) { + unsigned char* left = (unsigned char*)str1; + unsigned char* right = (unsigned char*)str2; + unsigned int k1, k2, align, l1, r1, x; + + l1 = *left; + r1 = *right; + if (l1 - r1) { + return l1 - r1; + } + + if ((align = ((int)left & 3)) != ((int)right & 3)) { + goto bytecopy; + } + if (align) { + if (l1 == 0) { + return 0; + } + for (align = 3 - align; align; align--) { + l1 = *(++left); + r1 = *(++right); + if (l1 - r1) { + return l1 - r1; + } + if (l1 == 0) { + return 0; + } + } + left++; + right++; + } + + k1 = 0x80808080; + k2 = 0xfefefeff; + + l1 = *(int*)left; + r1 = *(int*)right; + x = l1 + k2; + if (x & k1) { + goto adjust; + } + while (l1 == r1) { + l1 = *(++((int*)(left))); + r1 = *(++((int*)(right))); + x = l1 + k2; + if (x & k1) { + goto adjust; + } + } + + if (l1 > r1) { + return 1; + } + + return -1; + +adjust: + l1 = *left; + r1 = *right; + if (l1 - r1) { + return l1 - r1; + } + +bytecopy: + if (l1 == 0) { + return 0; + } + + do { + l1 = *(++left); + r1 = *(++right); + if (l1 - r1) { + return l1 - r1; + } + if (l1 == 0) { + return 0; + } + } while (1); +} + +int strncmp(const char* str1, const char* str2, size_t n) { + const unsigned char* p1 = (unsigned char*)str1 - 1; + const unsigned char* p2 = (unsigned char*)str2 - 1; + unsigned long c1, c2; + + n++; + + while (--n) { + if ((c1 = *++p1) != (c2 = *++p2)) { + return (c1 - c2); + } else if (!c1) { + break; + } + } + + return 0; +} + +char* strchr(const char* str, int chr) { + const unsigned char* p = (unsigned char*)str - 1; + unsigned long c = (chr & 0xff); + unsigned long ch; + + while (ch = *++p) { + if (ch == c) + return ((char*)p); + } + + return (c ? 0 : (char*)p); +} diff --git a/src/MSL_C.PPCEABI.bare.H/uart_console_io.c b/src/MSL_C.PPCEABI.bare.H/uart_console_io.c new file mode 100644 index 0000000..1aff7dc --- /dev/null +++ b/src/MSL_C.PPCEABI.bare.H/uart_console_io.c @@ -0,0 +1,34 @@ +#include "console_io.h" + +int __TRK_write_console(__file_handle handle, unsigned char* buffer, size_t* count, + __idle_proc idle_proc); + +static inline int __init_uart_console(void) { + int err = 0; + static int initialized = 0; + + if (initialized == 0) { + err = InitializeUART(57600); + + if (err == 0) + initialized = 1; + } + + return (err); +} +int __write_console(__file_handle handle, unsigned char* buffer, size_t* count, + __idle_proc idle_proc) { + if (__init_uart_console() != 0) { + return 1; + } + + if (WriteUARTN(buffer, *count) != 0) { + *count = 0; + return 1; + } + + __TRK_write_console(handle, buffer, count, idle_proc); + return 0; +} + +int __close_console() { return 0; } diff --git a/src/MSL_C.PPCEABI.bare.H/w_acos.c b/src/MSL_C.PPCEABI.bare.H/w_acos.c new file mode 100644 index 0000000..1d9a9ce --- /dev/null +++ b/src/MSL_C.PPCEABI.bare.H/w_acos.c @@ -0,0 +1,39 @@ + +/* @(#)w_acos.c 1.2 95/01/04 */ +/* + * ==================================================== + * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. + * + * Developed at SunPro, a Sun Microsystems, Inc. business. + * Permission to use, copy, modify, and distribute this + * software is freely granted, provided that this notice + * is preserved. + * ==================================================== + */ + +/* + * wrap_acos(x) + */ + +#include "fdlibm.h" + +#ifdef __STDC__ +double acos(double x) /* wrapper acos */ +#else +double acos(x) /* wrapper acos */ +double x; +#endif +{ +#ifdef _IEEE_LIBM + return __ieee754_acos(x); +#else + double z; + z = __ieee754_acos(x); + if (_LIB_VERSION == _IEEE_ || isnan(x)) + return z; + if (fabs(x) > 1.0) { + return __kernel_standard(x, x, 1); /* acos(|x|>1) */ + } else + return z; +#endif +} diff --git a/src/MSL_C.PPCEABI.bare.H/w_asin.c b/src/MSL_C.PPCEABI.bare.H/w_asin.c new file mode 100644 index 0000000..5519bc7 --- /dev/null +++ b/src/MSL_C.PPCEABI.bare.H/w_asin.c @@ -0,0 +1,40 @@ + +/* @(#)w_asin.c 1.2 95/01/04 */ +/* + * ==================================================== + * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. + * + * Developed at SunPro, a Sun Microsystems, Inc. business. + * Permission to use, copy, modify, and distribute this + * software is freely granted, provided that this notice + * is preserved. + * ==================================================== + * + */ + +/* + * wrapper asin(x) + */ + +#include "fdlibm.h" + +#ifdef __STDC__ +double asin(double x) /* wrapper asin */ +#else +double asin(x) /* wrapper asin */ +double x; +#endif +{ +#ifdef _IEEE_LIBM + return __ieee754_asin(x); +#else + double z; + z = __ieee754_asin(x); + if (_LIB_VERSION == _IEEE_ || isnan(x)) + return z; + if (fabs(x) > 1.0) { + return __kernel_standard(x, x, 2); /* asin(|x|>1) */ + } else + return z; +#endif +} diff --git a/src/MSL_C.PPCEABI.bare.H/w_atan2.c b/src/MSL_C.PPCEABI.bare.H/w_atan2.c new file mode 100644 index 0000000..890f130 --- /dev/null +++ b/src/MSL_C.PPCEABI.bare.H/w_atan2.c @@ -0,0 +1,40 @@ + +/* @(#)w_atan2.c 1.2 95/01/04 */ +/* + * ==================================================== + * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. + * + * Developed at SunPro, a Sun Microsystems, Inc. business. + * Permission to use, copy, modify, and distribute this + * software is freely granted, provided that this notice + * is preserved. + * ==================================================== + * + */ + +/* + * wrapper atan2(y,x) + */ + +#include "fdlibm.h" + +#ifdef __STDC__ +double atan2(double y, double x) /* wrapper atan2 */ +#else +double atan2(y, x) /* wrapper atan2 */ +double y, x; +#endif +{ +#ifdef _IEEE_LIBM + return __ieee754_atan2(y, x); +#else + double z; + z = __ieee754_atan2(y, x); + if (_LIB_VERSION == _IEEE_ || isnan(x) || isnan(y)) + return z; + if (x == 0.0 && y == 0.0) { + return __kernel_standard(y, x, 3); /* atan2(+-0,+-0) */ + } else + return z; +#endif +} diff --git a/src/MSL_C.PPCEABI.bare.H/w_exp.c b/src/MSL_C.PPCEABI.bare.H/w_exp.c new file mode 100644 index 0000000..c8ed38b --- /dev/null +++ b/src/MSL_C.PPCEABI.bare.H/w_exp.c @@ -0,0 +1,49 @@ +/* @(#)w_exp.c 1.2 95/01/04 */ +/* + * ==================================================== + * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. + * + * Developed at SunPro, a Sun Microsystems, Inc. business. + * Permission to use, copy, modify, and distribute this + * software is freely granted, provided that this notice + * is preserved. + * ==================================================== + */ + +/* + * wrapper exp(x) + */ + +#include "fdlibm.h" + +#ifdef __STDC__ +static const double +#else +static double +#endif + o_threshold = 7.09782712893383973096e+02, /* 0x40862E42, 0xFEFA39EF */ + u_threshold = -7.45133219101941108420e+02; /* 0xc0874910, 0xD52D3051 */ + +#ifdef __STDC__ +double exp(double x) /* wrapper pow */ +#else +double exp(x) /* wrapper exp */ +double x; +#endif +{ +#ifdef _IEEE_LIBM + return __ieee754_exp(x); +#else + double z; + z = __ieee754_exp(x); + if (_LIB_VERSION == _IEEE_) + return z; + if (isfinite(x)) { + if (x > o_threshold) + return __kernel_standard(x, x, 6); /* exp overflow */ + else if (x < u_threshold) + return __kernel_standard(x, x, 7); /* exp underflow */ + } + return z; +#endif +} diff --git a/src/MSL_C.PPCEABI.bare.H/w_fmod.c b/src/MSL_C.PPCEABI.bare.H/w_fmod.c new file mode 100644 index 0000000..6a0f07a --- /dev/null +++ b/src/MSL_C.PPCEABI.bare.H/w_fmod.c @@ -0,0 +1,38 @@ +/* @(#)w_fmod.c 1.2 95/01/04 */ +/* + * ==================================================== + * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. + * + * Developed at SunPro, a Sun Microsystems, Inc. business. + * Permission to use, copy, modify, and distribute this + * software is freely granted, provided that this notice + * is preserved. + * ==================================================== + */ + +/* + * wrapper fmod(x,y) + */ + +#include "fdlibm.h" + +#ifdef __STDC__ +double fmod(double x, double y) /* wrapper fmod */ +#else +double fmod(x, y) /* wrapper fmod */ +double x, y; +#endif +{ +#ifdef _IEEE_LIBM + return __ieee754_fmod(x, y); +#else + double z; + z = __ieee754_fmod(x, y); + if (_LIB_VERSION == _IEEE_ || isnan(y) || isnan(x)) + return z; + if (y == 0.0) { + return __kernel_standard(x, y, 27); /* fmod(x,0) */ + } else + return z; +#endif +} diff --git a/src/MSL_C.PPCEABI.bare.H/w_log.c b/src/MSL_C.PPCEABI.bare.H/w_log.c new file mode 100644 index 0000000..f4baac3 --- /dev/null +++ b/src/MSL_C.PPCEABI.bare.H/w_log.c @@ -0,0 +1,38 @@ +/* @(#)w_log.c 1.2 95/01/04 */ +/* + * ==================================================== + * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. + * + * Developed at SunPro, a Sun Microsystems, Inc. business. + * Permission to use, copy, modify, and distribute this + * software is freely granted, provided that this notice + * is preserved. + * ==================================================== + */ + +/* + * wrapper log(x) + */ + +#include "fdlibm.h" + +#ifdef __STDC__ +double log(double x) /* wrapper pow */ +#else +double log(x) /* wrapper log */ +double x; +#endif +{ +#ifdef _IEEE_LIBM + return __ieee754_log(x); +#else + double z; + z = __ieee754_log(x); + if (_LIB_VERSION == _IEEE_ || isnan(x) || x > 0.0) + return z; + if (x == 0.0) + return __kernel_standard(x, x, 16); /* log(0) */ + else + return __kernel_standard(x, x, 17); /* log(x<0) */ +#endif +} diff --git a/src/MSL_C.PPCEABI.bare.H/w_pow.c b/src/MSL_C.PPCEABI.bare.H/w_pow.c new file mode 100644 index 0000000..0c05ac8 --- /dev/null +++ b/src/MSL_C.PPCEABI.bare.H/w_pow.c @@ -0,0 +1,58 @@ +/* @(#)w_pow.c 1.2 95/01/04 */ +/* + * ==================================================== + * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. + * + * Developed at SunPro, a Sun Microsystems, Inc. business. + * Permission to use, copy, modify, and distribute this + * software is freely granted, provided that this notice + * is preserved. + * ==================================================== + */ + +/* + * wrapper pow(x,y) return x**y + */ + +#include "fdlibm.h" + +#ifdef __STDC__ +double pow(double x, double y) /* wrapper pow */ +#else +double pow(x, y) /* wrapper pow */ +double x, y; +#endif +{ +#ifdef _IEEE_LIBM + return __ieee754_pow(x, y); +#else + double z; + z = __ieee754_pow(x, y); + if (_LIB_VERSION == _IEEE_ || isnan(y)) + return z; + if (isnan(x)) { + if (y == 0.0) + return __kernel_standard(x, y, 42); /* pow(NaN,0.0) */ + else + return z; + } + if (x == 0.0) { + if (y == 0.0) + return __kernel_standard(x, y, 20); /* pow(0.0,0.0) */ + if (isfinite(y) && y < 0.0) + return __kernel_standard(x, y, 23); /* pow(0.0,negative) */ + return z; + } + if (!isfinite(z)) { + if (isfinite(x) && isfinite(y)) { + if (isnan(z)) + return __kernel_standard(x, y, 24); /* pow neg**non-int */ + else + return __kernel_standard(x, y, 21); /* pow overflow */ + } + } + if (z == 0.0 && isfinite(x) && isfinite(y)) + return __kernel_standard(x, y, 22); /* pow underflow */ + return z; +#endif +} diff --git a/src/MSL_C.PPCEABI.bare.H/wchar_io.c b/src/MSL_C.PPCEABI.bare.H/wchar_io.c new file mode 100644 index 0000000..87da4af --- /dev/null +++ b/src/MSL_C.PPCEABI.bare.H/wchar_io.c @@ -0,0 +1,28 @@ +#include + +int fwide(FILE* stream, int mode) { + int orientation; + int result; + + if ((stream == NULL) || (stream->mode.file_kind == __closed_file)) + return 0; + orientation = stream->mode.file_orientation; + switch (orientation) { + case __unoriented: + if (mode > 0) + stream->mode.file_orientation = __wide_oriented; + else if (mode < 0) + stream->mode.file_orientation = __char_oriented; + result = mode; + break; + + case __wide_oriented: + result = 1; + break; + + case __char_oriented: + result = -1; + break; + } + return result; +} diff --git a/src/Runtime/NMWException.cpp b/src/Runtime/NMWException.cpp new file mode 100644 index 0000000..1ccbad1 --- /dev/null +++ b/src/Runtime/NMWException.cpp @@ -0,0 +1,49 @@ +#include +#pragma exceptions on + +class __partial_array_destructor { +private: + void* p; + size_t size; + size_t n; + void* dtor; + +public: + size_t i; + + __partial_array_destructor(void* array, size_t elementsize, size_t nelements, void* destructor) { + p = array; + size = elementsize; + n = nelements; + dtor = destructor; + i = n; + } + + ~__partial_array_destructor() { + char* ptr; + + if (i < n && dtor) { + for (ptr = (char*)p + size * i; i > 0; i--) { + ptr -= size; + DTORCALL_COMPLETE(dtor, ptr); + } + } + } +}; + +extern "C" void __construct_array(void* ptr, void* ctor, void* dtor, size_t size, size_t n) { + __partial_array_destructor pad(ptr, size, n, dtor); + char* p; + + for (pad.i = 0, p = (char*)ptr; pad.i < n; pad.i++, p += size) + CTORCALL_COMPLETE(ctor, p); +} + +extern "C" void __destroy_arr(void* block, void* dtor, size_t size, size_t n) { + char* p; + + for (p = (char*)block + size * n; n > 0; n--) { + p -= size; + DTORCALL_COMPLETE(dtor, p); + } +} diff --git a/src/Runtime/NMWException.h b/src/Runtime/NMWException.h deleted file mode 100644 index 49b623e..0000000 --- a/src/Runtime/NMWException.h +++ /dev/null @@ -1,16 +0,0 @@ -#ifndef NMWEXCEPTION_H -#define NMWEXCEPTION_H - -typedef void (dtor_func)(void *object, int free_object); -typedef struct destructor_chain dtor_chain; - -struct destructor_chain { - dtor_chain *next; - dtor_func *destructor; - void *object; -}; - -void *__register_global_object(void *object, dtor_func *destructor, dtor_chain *regmem); -void __destroy_global_chain(); - -#endif diff --git a/src/Runtime/__mem.c b/src/Runtime/__mem.c new file mode 100644 index 0000000..a5ef6c1 --- /dev/null +++ b/src/Runtime/__mem.c @@ -0,0 +1,85 @@ +#include "string.h" + +void* memcpy(void* dst, const void* src, size_t n) { + const char* p; + char* q; + int rev = ((unsigned long)src < (unsigned long)dst); + + if (!rev) { + + for (p = (const char*)src - 1, q = (char*)dst - 1, n++; --n;) + *++q = *++p; + + } else { + for (p = (const char*)src + n, q = (char*)dst + n, n++; --n;) + *--q = *--p; + } + return (dst); +} + +#define cps ((unsigned char*)src) +#define cpd ((unsigned char*)dst) +#define lps ((unsigned long*)src) +#define lpd ((unsigned long*)dst) +#define deref_auto_inc(p) *++(p) + +void __fill_mem(void* dst, int val, size_t n) { + unsigned long v = (unsigned char)val; + unsigned long i; + + cpd = ((unsigned char*)dst) - 1; + + if (n >= 32) { + i = (~(unsigned long)dst) & 3; + + if (i) { + n -= i; + + do + deref_auto_inc(cpd) = v; + while (--i); + } + + if (v) + v |= v << 24 | v << 16 | v << 8; + + lpd = ((unsigned long*)(cpd + 1)) - 1; + + i = n >> 5; + + if (i) + do { + deref_auto_inc(lpd) = v; + deref_auto_inc(lpd) = v; + deref_auto_inc(lpd) = v; + deref_auto_inc(lpd) = v; + deref_auto_inc(lpd) = v; + deref_auto_inc(lpd) = v; + deref_auto_inc(lpd) = v; + deref_auto_inc(lpd) = v; + } while (--i); + + i = (n & 31) >> 2; + + if (i) + do + deref_auto_inc(lpd) = v; + while (--i); + + cpd = ((unsigned char*)(lpd + 1)) - 1; + + n &= 3; + } + + if (n) + do + deref_auto_inc(cpd) = v; + while (--n); + + return; +} + +void* memset(void* str, int c, size_t n) { + __fill_mem(str, c, n); + return str; +} diff --git a/src/Runtime/__va_arg.c b/src/Runtime/__va_arg.c new file mode 100644 index 0000000..fd0e182 --- /dev/null +++ b/src/Runtime/__va_arg.c @@ -0,0 +1,57 @@ +typedef struct { + char gpr; + char fpr; + char reserved[2]; + char* input_arg_area; + char* reg_save_area; +} va_list[1]; + +typedef enum { + ARGPOINTER, + WORD, + DOUBLEWORD, + REAL, +} _va_arg_type; + +#define ALIGN(addr, amount) (((unsigned int)(addr) + ((amount)-1)) & ~((amount)-1)) + +void* __va_arg(va_list ap, _va_arg_type type) { + char* addr; + char* curGprPtr = &(ap->gpr); + int curGpr = ap->gpr; + int max = 8; + int size = 4; + int inc = 1; + int even = 0; + int fprOffset = 0; + int regSize = 4; + + if (type == 3) { + curGprPtr = &(ap->fpr); + curGpr = ap->fpr; + size = 8; + fprOffset = 8 * 4; + regSize = 8; + } + if (type == 2) { + size = 8; + max = max - 1; + if (curGpr & 1) + even = 1; + inc = 2; + } + if (curGpr < max) { + curGpr += even; + addr = ap->reg_save_area + fprOffset + (curGpr * regSize); + *curGprPtr = curGpr + inc; + } else { + *curGprPtr = 8; + addr = ap->input_arg_area; + addr = (char*)ALIGN(addr, size); + ap->input_arg_area = addr + size; + } + if (type == ARGPOINTER) + addr = *((char**)addr); + + return addr; +} diff --git a/src/Runtime/abort_exit.c b/src/Runtime/abort_exit.c deleted file mode 100644 index 43b1a0c..0000000 --- a/src/Runtime/abort_exit.c +++ /dev/null @@ -1,17 +0,0 @@ -void __destroy_global_chain(); - -extern void (*_dtors[])(void); - -int __aborting; - - -void exit(int state) { - void (**dtor)(void); - if (!__aborting) { - dtor = _dtors; - while (*dtor != 0) { - (*dtor)(); - dtor++; - } - } -} diff --git a/src/Runtime/global_destructor_chain.c b/src/Runtime/global_destructor_chain.c index 1f3790d..7c24b76 100644 --- a/src/Runtime/global_destructor_chain.c +++ b/src/Runtime/global_destructor_chain.c @@ -1,22 +1,26 @@ #include "NMWException.h" -dtor_chain *__global_destructor_chain; - -extern void *__register_global_object(void *object, dtor_func *destructor, dtor_chain *regmem) { - regmem->next = __global_destructor_chain; - regmem->destructor = destructor; - regmem->object = object; - __global_destructor_chain = regmem; - return object; + + +DestructorChain* __global_destructor_chain; + +extern void* __register_global_object(void* object, void* destructor, void* regmem) { + ((DestructorChain*)regmem)->next = __global_destructor_chain; + ((DestructorChain*)regmem)->destructor = destructor; + ((DestructorChain*)regmem)->object = object; + __global_destructor_chain = (DestructorChain*)regmem; + + return object; } -void __destroy_global_chain() { - dtor_chain *iter = __global_destructor_chain; - while (__global_destructor_chain != 0) { - iter = __global_destructor_chain; - __global_destructor_chain = __global_destructor_chain->next; - iter->destructor(iter->object, -1); - } +void __destroy_global_chain(void) { + DestructorChain* iter; + + while ((iter=__global_destructor_chain) != 0) { + __global_destructor_chain = iter->next; + DTORCALL_COMPLETE(iter->destructor, iter->object); + } } -__declspec(section ".dtors") static void* const __destroy_global_chain_reference = __destroy_global_chain; +__declspec(section + ".dtors") static void* const __destroy_global_chain_reference = __destroy_global_chain; diff --git a/src/Runtime/ptmf.c b/src/Runtime/ptmf.c new file mode 100644 index 0000000..b9e8a90 --- /dev/null +++ b/src/Runtime/ptmf.c @@ -0,0 +1,45 @@ + +typedef struct PTMF { + long this_delta; // delta to this pointer + long vtbl_offset; // offset in vtable (-1: not a virtual function) + union { + void* func_addr; //nonvirtual function address + long ventry_offset; // of virtual function entry in vtable + } func_data; +} PTMF; + +const PTMF __ptmf_null = {0, 0, 0}; + +/* clang-format off */ +asm void __ptmf_test(register PTMF* ptmf) { + nofralloc + + lwz r5, PTMF.this_delta(ptmf) + lwz r6, PTMF.vtbl_offset(ptmf) + lwz r7, PTMF.func_data(ptmf) + li r3, 1 + cmpwi cr0, r5, 0 + cmpwi cr6, r6, 0 + cmpwi cr7, r7, 0 + bnelr cr0 + bnelr cr6 + bnelr cr7 + li r3, 0 + blr +} + +asm void __ptmf_scall(...) { + nofralloc + lwz r0, PTMF.this_delta(r12) + lwz r11, PTMF.vtbl_offset(r12) + lwz r12, PTMF.func_data(r12) + add r3, r3, r0 + cmpwi r11, 0 + blt @1 + lwzx r12, r3, r12 + lwzx r12, r12, r11 +@1 + mtctr r12 + bctr +} +/* clang-format - on*/ diff --git a/src/Runtime/runtime.c b/src/Runtime/runtime.c new file mode 100644 index 0000000..16fd6ed --- /dev/null +++ b/src/Runtime/runtime.c @@ -0,0 +1,842 @@ +/* clang-format off */ +#define SAVE_FPR(reg) _savefpr_ ## reg +#define RESTORE_FPR(reg) _restfpr_ ## reg +#define SAVE_GPR(reg) _savegpr_ ## reg +#define RESTORE_GPR(reg) _restgpr_ ## reg + +#define ENTRY_SAVE_FPR(reg) entry SAVE_FPR(reg) +#define ENTRY_RESTORE_FPR(reg) entry RESTORE_FPR(reg) +#define ENTRY_SAVE_GPR(reg) entry SAVE_GPR(reg) +#define ENTRY_RESTORE_GPR(reg) entry RESTORE_GPR(reg) + +#define SAVE_FPR2(reg) _savef ## reg +#define RESTORE_FPR2(reg) _restf ## reg +#define ENTRY_SAVE_FPR2(reg) +#define ENTRY_RESTORE_FPR2(reg) + + +#ifdef __cplusplus +extern "C" { +#endif + +void SAVE_FPR(14)(void); +void SAVE_FPR(15)(void); +void SAVE_FPR(16)(void); +void SAVE_FPR(17)(void); +void SAVE_FPR(18)(void); +void SAVE_FPR(19)(void); +void SAVE_FPR(20)(void); +void SAVE_FPR(21)(void); +void SAVE_FPR(22)(void); +void SAVE_FPR(23)(void); +void SAVE_FPR(24)(void); +void SAVE_FPR(25)(void); +void SAVE_FPR(26)(void); +void SAVE_FPR(27)(void); +void SAVE_FPR(28)(void); +void SAVE_FPR(29)(void); +void SAVE_FPR(30)(void); +void SAVE_FPR(31)(void); +void SAVE_FPR2(14)(void); +void SAVE_FPR2(15)(void); +void SAVE_FPR2(16)(void); +void SAVE_FPR2(17)(void); +void SAVE_FPR2(18)(void); +void SAVE_FPR2(19)(void); +void SAVE_FPR2(20)(void); +void SAVE_FPR2(21)(void); +void SAVE_FPR2(22)(void); +void SAVE_FPR2(23)(void); +void SAVE_FPR2(24)(void); +void SAVE_FPR2(25)(void); +void SAVE_FPR2(26)(void); +void SAVE_FPR2(27)(void); +void SAVE_FPR2(28)(void); +void SAVE_FPR2(29)(void); +void SAVE_FPR2(30)(void); +void SAVE_FPR2(31)(void); +void RESTORE_FPR(14)(void); +void RESTORE_FPR(15)(void); +void RESTORE_FPR(16)(void); +void RESTORE_FPR(17)(void); +void RESTORE_FPR(18)(void); +void RESTORE_FPR(19)(void); +void RESTORE_FPR(20)(void); +void RESTORE_FPR(21)(void); +void RESTORE_FPR(22)(void); +void RESTORE_FPR(23)(void); +void RESTORE_FPR(24)(void); +void RESTORE_FPR(25)(void); +void RESTORE_FPR(26)(void); +void RESTORE_FPR(27)(void); +void RESTORE_FPR(28)(void); +void RESTORE_FPR(29)(void); +void RESTORE_FPR(30)(void); +void RESTORE_FPR(31)(void); +void RESTORE_FPR2(14)(void); +void RESTORE_FPR2(15)(void); +void RESTORE_FPR2(16)(void); +void RESTORE_FPR2(17)(void); +void RESTORE_FPR2(18)(void); +void RESTORE_FPR2(19)(void); +void RESTORE_FPR2(20)(void); +void RESTORE_FPR2(21)(void); +void RESTORE_FPR2(22)(void); +void RESTORE_FPR2(23)(void); +void RESTORE_FPR2(24)(void); +void RESTORE_FPR2(25)(void); +void RESTORE_FPR2(26)(void); +void RESTORE_FPR2(27)(void); +void RESTORE_FPR2(28)(void); +void RESTORE_FPR2(29)(void); +void RESTORE_FPR2(30)(void); +void RESTORE_FPR2(31)(void); + +void SAVE_GPR(14)(void); +void SAVE_GPR(15)(void); +void SAVE_GPR(16)(void); +void SAVE_GPR(17)(void); +void SAVE_GPR(18)(void); +void SAVE_GPR(19)(void); +void SAVE_GPR(20)(void); +void SAVE_GPR(21)(void); +void SAVE_GPR(22)(void); +void SAVE_GPR(23)(void); +void SAVE_GPR(24)(void); +void SAVE_GPR(25)(void); +void SAVE_GPR(26)(void); +void SAVE_GPR(27)(void); +void SAVE_GPR(28)(void); +void SAVE_GPR(29)(void); +void SAVE_GPR(30)(void); +void SAVE_GPR(31)(void); +void RESTORE_GPR(14)(void); +void RESTORE_GPR(15)(void); +void RESTORE_GPR(16)(void); +void RESTORE_GPR(17)(void); +void RESTORE_GPR(18)(void); +void RESTORE_GPR(19)(void); +void RESTORE_GPR(20)(void); +void RESTORE_GPR(21)(void); +void RESTORE_GPR(22)(void); +void RESTORE_GPR(23)(void); +void RESTORE_GPR(24)(void); +void RESTORE_GPR(25)(void); +void RESTORE_GPR(26)(void); +void RESTORE_GPR(27)(void); +void RESTORE_GPR(28)(void); +void RESTORE_GPR(29)(void); +void RESTORE_GPR(30)(void); +void RESTORE_GPR(31)(void); + +static const unsigned long long __constants[] = { + 0x0000000000000000, // 0.0 + 0x41F0000000000000, // 2**32 + 0x41E0000000000000, // 2**31 +}; + + +asm unsigned long __cvt_fp2unsigned(register double d) { + nofralloc + stwu r1, -0x10(r1) + lis r4, __constants@h + ori r4, r4, __constants@l + li r3, 0 + lfd f0, 0(r4) + lfd f3, 8(r4) + lfd f4, 0x10(r4) + fcmpu cr0, f1, f0 + fcmpu cr6, f1, f3 + blt lbl_803899A8 + addi r3, r3, -1 + bge cr6, lbl_803899A8 + fcmpu cr7, f1, f4 + fmr f2, f1 + blt cr7, lbl_80389994 + fsub f2, f1, f4 +lbl_80389994: + fctiwz f2, f2 + stfd f2, 8(r1) + lwz r3, 0xc(r1) + blt cr7, lbl_803899A8 + addis r3, r3, 0x8000 +lbl_803899A8: + addi r1, r1, 0x10 + blr +} + + +asm void __save_fpr() { + ENTRY_SAVE_FPR(14) + ENTRY_SAVE_FPR2(14) + stfd fp14,-144 (r11) + ENTRY_SAVE_FPR(15) + ENTRY_SAVE_FPR2(15) + stfd fp15,-136 (r11) + ENTRY_SAVE_FPR(16) + ENTRY_SAVE_FPR2(16) + stfd fp16,-128 (r11) + ENTRY_SAVE_FPR(17) + ENTRY_SAVE_FPR2(17) + stfd fp17,-120 (r11) + ENTRY_SAVE_FPR(18) + ENTRY_SAVE_FPR2(18) + stfd fp18,-112 (r11) + ENTRY_SAVE_FPR(19) + ENTRY_SAVE_FPR2(19) + stfd fp19,-104 (r11) + ENTRY_SAVE_FPR(20) + ENTRY_SAVE_FPR2(20) + stfd fp20,-96 (r11) + ENTRY_SAVE_FPR(21) + ENTRY_SAVE_FPR2(21) + stfd fp21,-88 (r11) + ENTRY_SAVE_FPR(22) + ENTRY_SAVE_FPR2(22) + stfd fp22,-80(r11) + ENTRY_SAVE_FPR(23) + ENTRY_SAVE_FPR2(23) + stfd fp23,-72(r11) + ENTRY_SAVE_FPR(24) + ENTRY_SAVE_FPR2(24) + stfd fp24,-64(r11) + ENTRY_SAVE_FPR(25) + ENTRY_SAVE_FPR2(25) + stfd fp25,-56(r11) + ENTRY_SAVE_FPR(26) + ENTRY_SAVE_FPR2(26) + stfd fp26,-48(r11) + ENTRY_SAVE_FPR(27) + ENTRY_SAVE_FPR2(27) + stfd fp27,-40(r11) + ENTRY_SAVE_FPR(28) + ENTRY_SAVE_FPR2(28) + stfd fp28,-32(r11) + ENTRY_SAVE_FPR(29) + ENTRY_SAVE_FPR2(29) + stfd fp29,-24(r11) + ENTRY_SAVE_FPR(30) + ENTRY_SAVE_FPR2(30) + stfd fp30,-16(r11) + ENTRY_SAVE_FPR(31) + ENTRY_SAVE_FPR2(31) + stfd fp31,-8(r11) + blr +} + +asm void __restore_fpr(void) { + nofralloc + ENTRY_RESTORE_FPR(14) + ENTRY_RESTORE_FPR2(14) + lfd fp14,-144(r11) + ENTRY_RESTORE_FPR(15) + ENTRY_RESTORE_FPR2(15) + lfd fp15,-136(r11) + ENTRY_RESTORE_FPR(16) + ENTRY_RESTORE_FPR2(16) + lfd fp16,-128(r11) + ENTRY_RESTORE_FPR(17) + ENTRY_RESTORE_FPR2(17) + lfd fp17,-120(r11) + ENTRY_RESTORE_FPR(18) + ENTRY_RESTORE_FPR2(18) + lfd fp18,-112(r11) + ENTRY_RESTORE_FPR(19) + ENTRY_RESTORE_FPR2(19) + lfd fp19,-104(r11) + ENTRY_RESTORE_FPR(20) + ENTRY_RESTORE_FPR2(20) + lfd fp20,-96(r11) + ENTRY_RESTORE_FPR(21) + ENTRY_RESTORE_FPR2(21) + lfd fp21,-88(r11) + ENTRY_RESTORE_FPR(22) + ENTRY_RESTORE_FPR2(22) + lfd fp22,-80(r11) + ENTRY_RESTORE_FPR(23) + ENTRY_RESTORE_FPR2(23) + lfd fp23,-72(r11) + ENTRY_RESTORE_FPR(24) + ENTRY_RESTORE_FPR2(24) + lfd fp24,-64(r11) + ENTRY_RESTORE_FPR(25) + ENTRY_RESTORE_FPR2(25) + lfd fp25,-56(r11) + ENTRY_RESTORE_FPR(26) + ENTRY_RESTORE_FPR2(26) + lfd fp26,-48(r11) + ENTRY_RESTORE_FPR(27) + ENTRY_RESTORE_FPR2(27) + lfd fp27,-40(r11) + ENTRY_RESTORE_FPR(28) + ENTRY_RESTORE_FPR2(28) + lfd fp28,-32(r11) + ENTRY_RESTORE_FPR(29) + ENTRY_RESTORE_FPR2(29) + lfd fp29,-24(r11) + ENTRY_RESTORE_FPR(30) + ENTRY_RESTORE_FPR2(30) + lfd fp30,-16(r11) + ENTRY_RESTORE_FPR(31) + ENTRY_RESTORE_FPR2(31) + lfd fp31,-8(r11) + blr +} + +asm void __save_gpr(void) { + nofralloc + ENTRY_SAVE_GPR(14) + stw r14,-72(r11) + ENTRY_SAVE_GPR(15) + stw r15,-68(r11) + ENTRY_SAVE_GPR(16) + stw r16,-64(r11) + ENTRY_SAVE_GPR(17) + stw r17,-60(r11) + ENTRY_SAVE_GPR(18) + stw r18,-56(r11) + ENTRY_SAVE_GPR(19) + stw r19,-52(r11) + ENTRY_SAVE_GPR(20) + stw r20,-48(r11) + ENTRY_SAVE_GPR(21) + stw r21,-44(r11) + ENTRY_SAVE_GPR(22) + stw r22,-40(r11) + ENTRY_SAVE_GPR(23) + stw r23,-36(r11) + ENTRY_SAVE_GPR(24) + stw r24,-32(r11) + ENTRY_SAVE_GPR(25) + stw r25,-28(r11) + ENTRY_SAVE_GPR(26) + stw r26,-24(r11) + ENTRY_SAVE_GPR(27) + stw r27,-20(r11) + ENTRY_SAVE_GPR(28) + stw r28,-16(r11) + ENTRY_SAVE_GPR(29) + stw r29,-12(r11) + ENTRY_SAVE_GPR(30) + stw r30,-8(r11) + ENTRY_SAVE_GPR(31) + stw r31,-4(r11) + blr +} + +asm void __restore_gpr(void) { + nofralloc + ENTRY_RESTORE_GPR(14) + lwz r14,-72(r11) + ENTRY_RESTORE_GPR(15) + lwz r15,-68(r11) + ENTRY_RESTORE_GPR(16) + lwz r16,-64(r11) + ENTRY_RESTORE_GPR(17) + lwz r17,-60(r11) + ENTRY_RESTORE_GPR(18) + lwz r18,-56(r11) + ENTRY_RESTORE_GPR(19) + lwz r19,-52(r11) + ENTRY_RESTORE_GPR(20) + lwz r20,-48(r11) + ENTRY_RESTORE_GPR(21) + lwz r21,-44(r11) + ENTRY_RESTORE_GPR(22) + lwz r22,-40(r11) + ENTRY_RESTORE_GPR(23) + lwz r23,-36(r11) + ENTRY_RESTORE_GPR(24) + lwz r24,-32(r11) + ENTRY_RESTORE_GPR(25) + lwz r25,-28(r11) + ENTRY_RESTORE_GPR(26) + lwz r26,-24(r11) + ENTRY_RESTORE_GPR(27) + lwz r27,-20(r11) + ENTRY_RESTORE_GPR(28) + lwz r28,-16(r11) + ENTRY_RESTORE_GPR(29) + lwz r29,-12(r11) + ENTRY_RESTORE_GPR(30) + lwz r30,-8(r11) + ENTRY_RESTORE_GPR(31) + lwz r31,-4(r11) + blr +} + +asm void __div2u(void) { + nofralloc + cmpwi r3, 0 + cntlzw r0, r3 + cntlzw r9, r4 + bne lbl_80389AF4 + addi r0, r9, 0x20 +lbl_80389AF4: + cmpwi r5, 0 + cntlzw r9, r5 + cntlzw r10, r6 + bne lbl_80389B08 + addi r9, r10, 0x20 +lbl_80389B08: + cmpw r0, r9 + subfic r10, r0, 0x40 + bgt lbl_80389BC0 + addi r9, r9, 1 + subfic r9, r9, 0x40 + add r0, r0, r9 + subf r9, r9, r10 + mtctr r9 + cmpwi r9, 0x20 + addi r7, r9, -32 + blt lbl_80389B40 + srw r8, r3, r7 + li r7, 0 + b lbl_80389B54 +lbl_80389B40: + srw r8, r4, r9 + subfic r7, r9, 0x20 + slw r7, r3, r7 + or r8, r8, r7 + srw r7, r3, r9 +lbl_80389B54: + cmpwi r0, 0x20 + addic r9, r0, -32 + blt lbl_80389B6C + slw r3, r4, r9 + li r4, 0 + b lbl_80389B80 +lbl_80389B6C: + slw r3, r3, r0 + subfic r9, r0, 0x20 + srw r9, r4, r9 + or r3, r3, r9 + slw r4, r4, r0 +lbl_80389B80: + li r10, -1 + addic r7, r7, 0 +lbl_80389B88: + adde r4, r4, r4 + adde r3, r3, r3 + adde r8, r8, r8 + adde r7, r7, r7 + subfc r0, r6, r8 + subfe. r9, r5, r7 + blt lbl_80389BB0 + mr r8, r0 + mr r7, r9 + addic r0, r10, 1 +lbl_80389BB0: + bdnz lbl_80389B88 + adde r4, r4, r4 + adde r3, r3, r3 + blr +lbl_80389BC0: + li r4, 0 + li r3, 0 + blr +} + +asm void __div2i(void) { + nofralloc + stwu r1, -0x10(r1) + rlwinm. r9, r3, 0, 0, 0 + beq lbl_80389BE0 + subfic r4, r4, 0 + subfze r3, r3 +lbl_80389BE0: + stw r9, 8(r1) + rlwinm. r10, r5, 0, 0, 0 + beq lbl_80389BF4 + subfic r6, r6, 0 + subfze r5, r5 +lbl_80389BF4: + stw r10, 0xc(r1) + cmpwi r3, 0 + cntlzw r0, r3 + cntlzw r9, r4 + bne lbl_80389C0C + addi r0, r9, 0x20 +lbl_80389C0C: + cmpwi r5, 0 + cntlzw r9, r5 + cntlzw r10, r6 + bne lbl_80389C20 + addi r9, r10, 0x20 +lbl_80389C20: + cmpw r0, r9 + subfic r10, r0, 0x40 + bgt lbl_80389CF4 + addi r9, r9, 1 + subfic r9, r9, 0x40 + add r0, r0, r9 + subf r9, r9, r10 + mtctr r9 + cmpwi r9, 0x20 + addi r7, r9, -32 + blt lbl_80389C58 + srw r8, r3, r7 + li r7, 0 + b lbl_80389C6C +lbl_80389C58: + srw r8, r4, r9 + subfic r7, r9, 0x20 + slw r7, r3, r7 + or r8, r8, r7 + srw r7, r3, r9 +lbl_80389C6C: + cmpwi r0, 0x20 + addic r9, r0, -32 + blt lbl_80389C84 + slw r3, r4, r9 + li r4, 0 + b lbl_80389C98 +lbl_80389C84: + slw r3, r3, r0 + subfic r9, r0, 0x20 + srw r9, r4, r9 + or r3, r3, r9 + slw r4, r4, r0 +lbl_80389C98: + li r10, -1 + addic r7, r7, 0 +lbl_80389CA0: + adde r4, r4, r4 + adde r3, r3, r3 + adde r8, r8, r8 + adde r7, r7, r7 + subfc r0, r6, r8 + subfe. r9, r5, r7 + blt lbl_80389CC8 + mr r8, r0 + mr r7, r9 + addic r0, r10, 1 +lbl_80389CC8: + bdnz lbl_80389CA0 + adde r4, r4, r4 + adde r3, r3, r3 + lwz r9, 8(r1) + lwz r10, 0xc(r1) + xor. r7, r9, r10 + beq lbl_80389CFC + cmpwi r9, 0 + subfic r4, r4, 0 + subfze r3, r3 + b lbl_80389CFC +lbl_80389CF4: + li r4, 0 + li r3, 0 +lbl_80389CFC: + addi r1, r1, 0x10 + blr +} + +asm void __mod2u() { + nofralloc + cmpwi r3, 0 + cntlzw r0, r3 + cntlzw r9, r4 + bne lbl_80389D18 + addi r0, r9, 0x20 +lbl_80389D18: + cmpwi r5, 0 + cntlzw r9, r5 + cntlzw r10, r6 + bne lbl_80389D2C + addi r9, r10, 0x20 +lbl_80389D2C: + cmpw r0, r9 + subfic r10, r0, 0x40 + bgtlr + addi r9, r9, 1 + subfic r9, r9, 0x40 + add r0, r0, r9 + subf r9, r9, r10 + mtctr r9 + cmpwi r9, 0x20 + addi r7, r9, -32 + blt lbl_80389D64 + srw r8, r3, r7 + li r7, 0 + b lbl_80389D78 +lbl_80389D64: + srw r8, r4, r9 + subfic r7, r9, 0x20 + slw r7, r3, r7 + or r8, r8, r7 + srw r7, r3, r9 +lbl_80389D78: + cmpwi r0, 0x20 + addic r9, r0, -32 + blt lbl_80389D90 + slw r3, r4, r9 + li r4, 0 + b lbl_80389DA4 +lbl_80389D90: + slw r3, r3, r0 + subfic r9, r0, 0x20 + srw r9, r4, r9 + or r3, r3, r9 + slw r4, r4, r0 +lbl_80389DA4: + li r10, -1 + addic r7, r7, 0 +lbl_80389DAC: + adde r4, r4, r4 + adde r3, r3, r3 + adde r8, r8, r8 + adde r7, r7, r7 + subfc r0, r6, r8 + subfe. r9, r5, r7 + blt lbl_80389DD4 + mr r8, r0 + mr r7, r9 + addic r0, r10, 1 +lbl_80389DD4: + bdnz lbl_80389DAC + mr r4, r8 + mr r3, r7 + blr + blr +} + +asm void __mod2i(void) { + nofralloc + cmpwi cr7, r3, 0 + bge cr7, lbl_80389DF8 + subfic r4, r4, 0 + subfze r3, r3 +lbl_80389DF8: + cmpwi r5, 0 + bge lbl_80389E08 + subfic r6, r6, 0 + subfze r5, r5 +lbl_80389E08: + cmpwi r3, 0 + cntlzw r0, r3 + cntlzw r9, r4 + bne lbl_80389E1C + addi r0, r9, 0x20 +lbl_80389E1C: + cmpwi r5, 0 + cntlzw r9, r5 + cntlzw r10, r6 + bne lbl_80389E30 + addi r9, r10, 0x20 +lbl_80389E30: + cmpw r0, r9 + subfic r10, r0, 0x40 + bgt lbl_80389EE4 + addi r9, r9, 1 + subfic r9, r9, 0x40 + add r0, r0, r9 + subf r9, r9, r10 + mtctr r9 + cmpwi r9, 0x20 + addi r7, r9, -32 + blt lbl_80389E68 + srw r8, r3, r7 + li r7, 0 + b lbl_80389E7C +lbl_80389E68: + srw r8, r4, r9 + subfic r7, r9, 0x20 + slw r7, r3, r7 + or r8, r8, r7 + srw r7, r3, r9 +lbl_80389E7C: + cmpwi r0, 0x20 + addic r9, r0, -32 + blt lbl_80389E94 + slw r3, r4, r9 + li r4, 0 + b lbl_80389EA8 +lbl_80389E94: + slw r3, r3, r0 + subfic r9, r0, 0x20 + srw r9, r4, r9 + or r3, r3, r9 + slw r4, r4, r0 +lbl_80389EA8: + li r10, -1 + addic r7, r7, 0 +lbl_80389EB0: + adde r4, r4, r4 + adde r3, r3, r3 + adde r8, r8, r8 + adde r7, r7, r7 + subfc r0, r6, r8 + subfe. r9, r5, r7 + blt lbl_80389ED8 + mr r8, r0 + mr r7, r9 + addic r0, r10, 1 +lbl_80389ED8: + bdnz lbl_80389EB0 + mr r4, r8 + mr r3, r7 +lbl_80389EE4: + bgelr cr7 + subfic r4, r4, 0 + subfze r3, r3 + blr +} + +asm void __shl2i() { + nofralloc + subfic r8, r5, 0x20 + addic r9, r5, -32 + slw r3, r3, r5 + srw r10, r4, r8 + or r3, r3, r10 + slw r10, r4, r9 + or r3, r3, r10 + slw r4, r4, r5 + blr +} + +asm void __shr2u() { + nofralloc + subfic r8, r5, 0x20 + addic r9, r5, -32 + srw r4, r4, r5 + slw r10, r3, r8 + or r4, r4, r10 + srw r10, r3, r9 + or r4, r4, r10 + srw r3, r3, r5 + blr +} + +asm void __shr2i() { + nofralloc + subfic r8, r5, 0x20 + addic. r9, r5, -32 + srw r4, r4, r5 + slw r10, r3, r8 + or r4, r4, r10 + sraw r10, r3, r9 + ble lbl_80389F5C + or r4, r4, r10 +lbl_80389F5C: + sraw r3, r3, r5 + blr +} + +asm void __cvt_sll_flt(void) { + nofralloc + stwu r1, -0x10(r1) + rlwinm. r5, r3, 0, 0, 0 + beq lbl_80389F78 + subfic r4, r4, 0 + subfze r3, r3 +lbl_80389F78: + or. r7, r3, r4 + li r6, 0 + beq lbl_8038A000 + cntlzw r7, r3 + cntlzw r8, r4 + rlwinm r9, r7, 0x1a, 0, 4 + srawi r9, r9, 0x1f + and r9, r9, r8 + add r7, r7, r9 + subfic r8, r7, 0x20 + addic r9, r7, -32 + slw r3, r3, r7 + srw r10, r4, r8 + or r3, r3, r10 + slw r10, r4, r9 + or r3, r3, r10 + slw r4, r4, r7 + subf r6, r7, r6 + clrlwi r7, r4, 0x15 + cmpwi r7, 0x400 + addi r6, r6, 0x43e + blt lbl_80389FE8 + bgt lbl_80389FDC + rlwinm. r7, r4, 0, 0x14, 0x14 + beq lbl_80389FE8 +lbl_80389FDC: + addic r4, r4, 0x800 + addze r3, r3 + addze r6, r6 +lbl_80389FE8: + rotlwi r4, r4, 0x15 + rlwimi r4, r3, 0x15, 0, 0xa + rlwinm r3, r3, 0x15, 0xc, 0x1f + slwi r6, r6, 0x14 + or r3, r6, r3 + or r3, r5, r3 +lbl_8038A000: + stw r3, 8(r1) + stw r4, 0xc(r1) + lfd f1, 8(r1) + frsp f1, f1 + addi r1, r1, 0x10 + blr +} + +asm unsigned long __cvt_dbl_usll(register double d) { + nofralloc + stwu r1, -0x10(r1) + stfd f1, 8(r1) + lwz r3, 8(r1) + lwz r4, 0xc(r1) + rlwinm r5, r3, 0xc, 0x15, 0x1f + cmplwi r5, 0x3ff + bge lbl_8038A040 + li r3, 0 + li r4, 0 + b lbl_8038A0DC +lbl_8038A040: + mr r6, r3 + clrlwi r3, r3, 0xc + oris r3, r3, 0x10 + addi r5, r5, -1075 + cmpwi r5, 0 + bge lbl_8038A080 + neg r5, r5 + subfic r8, r5, 0x20 + addic r9, r5, -32 + srw r4, r4, r5 + slw r10, r3, r8 + or r4, r4, r10 + srw r10, r3, r9 + or r4, r4, r10 + srw r3, r3, r5 + b lbl_8038A0CC +lbl_8038A080: + cmpwi r5, 0xa + ble+ lbl_8038A0AC + rlwinm. r6, r6, 0, 0, 0 + beq lbl_8038A09C + lis r3, 0x8000 + li r4, 0 + b lbl_8038A0DC +lbl_8038A09C: + lis r3, 0x7FFFFFFF@h + ori r3, r3, 0x7FFFFFFF@l + li r4, -1 + b lbl_8038A0DC +lbl_8038A0AC: + subfic r8, r5, 0x20 + addic r9, r5, -32 + slw r3, r3, r5 + srw r10, r4, r8 + or r3, r3, r10 + slw r10, r4, r9 + or r3, r3, r10 + slw r4, r4, r5 +lbl_8038A0CC: + rlwinm. r6, r6, 0, 0, 0 + beq lbl_8038A0DC + subfic r4, r4, 0 + subfze r3, r3 +lbl_8038A0DC: + addi r1, r1, 0x10 + blr +} + +#ifdef __cplusplus +} +#endif -- cgit v1.2.3-13-gbd6f