From 98f99e49567b23456aa7afeb1383e34c942e8f88 Mon Sep 17 00:00:00 2001 From: Cameron Hall Date: Tue, 27 Mar 2018 16:32:57 -0500 Subject: [PATCH] decompile first C file --- .gitignore | 1 + Makefile | 12 +- asm/boot.s | 790 ++++++++++------------------------------ asmdiff.sh | 7 + include/ultra64.h | 6 + include/ultra64/types.h | 13 + ldscript.txt | 10 +- src/boot_main.c | 44 +++ undefined_syms.txt | 306 ++++++++++++++++ 9 files changed, 594 insertions(+), 595 deletions(-) create mode 100755 asmdiff.sh create mode 100644 include/ultra64.h create mode 100644 include/ultra64/types.h create mode 100644 src/boot_main.c create mode 100644 undefined_syms.txt diff --git a/.gitignore b/.gitignore index 458fe58..0610357 100644 --- a/.gitignore +++ b/.gitignore @@ -6,3 +6,4 @@ build/ # Other files we don't want to track baserom +*.dump diff --git a/Makefile b/Makefile index f707d63..d0bb3c6 100644 --- a/Makefile +++ b/Makefile @@ -7,10 +7,11 @@ PROJECT_DIR := $(dir $(realpath $(firstword $(MAKEFILE_LIST)))) AS := $(MIPS_BINUTILS)/bin/mips64-elf-as LD := $(MIPS_BINUTILS)/bin/mips64-elf-ld OBJCOPY := $(MIPS_BINUTILS)/bin/mips64-elf-objcopy -CC := $(QEMU_IRIX) -L $(IRIX_ROOT) $(IRIX_ROOT)/usr/bin/cc -v +CC := $(QEMU_IRIX) -L $(IRIX_ROOT) $(IRIX_ROOT)/usr/bin/cc + +ASFLAGS := -march=vr4300 -32 +CFLAGS := -mips2 -G 0 -O2 -non_shared -Xcpluscomm -I $(PROJECT_DIR)include -I include -I ./include -ASFLAGS := -mtune=vr4300 -march=vr4300 -CFLAGS := -mips2 -G 0 -O0 -I $(PROJECT_DIR)include -I include -I ./include #### Files #### @@ -23,8 +24,10 @@ MAP := $(ROM:.z64=.map) include baserom_files.mk # source code +C_FILES := $(wildcard src/*.c) S_FILES := $(wildcard asm/*.s) O_FILES := $(foreach f,$(S_FILES:.s=.o),build/$f) \ + $(foreach f,$(C_FILES:.c=.o),build/$f) \ $(foreach f,$(BASEROM_FILES),build/$f.o) $(shell mkdir -p build/asm) @@ -55,9 +58,8 @@ clean: build/baserom/%.o: baserom/% $(OBJCOPY) -I binary -O elf32-big $< $@ -# assemble code into object file build/asm/%.o: asm/%.s $(AS) $(ASFLAGS) $^ -o $@ -build/%.o: src/%.c +build/src/%.o: src/%.c $(CC) -c $(CFLAGS) $^ -o $@ diff --git a/asm/boot.s b/asm/boot.s index f951159..7bf6332 100644 --- a/asm/boot.s +++ b/asm/boot.s @@ -9,399 +9,10 @@ .section .text -.equ D_00001060, 0x00001060 -.equ D_00016DA0, 0x00016DA0 -.equ D_00019030, 0x00019030 -.equ D_00BCEF30, 0x00BCEF30 -.equ D_80000004, 0x80000004 -.equ D_80000008, 0x80000008 -.equ D_8000000C, 0x8000000C -.equ D_80000010, 0x80000010 -.equ D_80000020, 0x80000020 -.equ D_80000300, 0x80000300 -.equ D_80000308, 0x80000308 -.equ D_8000030C, 0x8000030C -.equ D_80000318, 0x80000318 -.equ D_8000031C, 0x8000031C -.equ D_80009430, 0x80009430 -.equ D_80009434, 0x80009434 -.equ D_80009438, 0x80009438 -.equ D_8000943C, 0x8000943C -.equ D_80009444, 0x80009444 -.equ D_80009450, 0x80009450 -.equ D_80009460, 0x80009460 -.equ D_80009464, 0x80009464 -.equ D_80009468, 0x80009468 -.equ D_8000946C, 0x8000946C -.equ D_8000AC5C, 0x8000AC5C -.equ D_8000AC60, 0x8000AC60 -.equ D_8000AC70, 0x8000AC70 -.equ D_8000AC80, 0x8000AC80 -.equ D_8000AC84, 0x8000AC84 -.equ D_8000AC90, 0x8000AC90 -.equ D_8000ACA0, 0x8000ACA0 -.equ D_8000ACF0, 0x8000ACF0 -.equ D_8000ACF4, 0x8000ACF4 -.equ D_8000ACF8, 0x8000ACF8 -.equ D_8000ACFC, 0x8000ACFC -.equ D_8000AD00, 0x8000AD00 -.equ D_8000AD10, 0x8000AD10 -.equ D_8000AD38, 0x8000AD38 -.equ D_8000AD40, 0x8000AD40 -.equ D_8000AD48, 0x8000AD48 -.equ D_8000AD4C, 0x8000AD4C -.equ D_8000AD50, 0x8000AD50 -.equ D_8000AD54, 0x8000AD54 -.equ D_8000AD60, 0x8000AD60 -.equ D_8000AD7C, 0x8000AD7C -.equ D_8000AD80, 0x8000AD80 -.equ D_8000AD90, 0x8000AD90 -.equ D_8000ADA0, 0x8000ADA0 -.equ D_8000ADC4, 0x8000ADC4 -.equ D_8000ADF0, 0x8000ADF0 -.equ D_8000AE00, 0x8000AE00 -.equ D_8000AE50, 0x8000AE50 -.equ D_8000AEA0, 0x8000AEA0 -.equ D_8000AED0, 0x8000AED0 -.equ D_8000AF00, 0x8000AF00 -.equ D_8000AF04, 0x8000AF04 -.equ D_8000AF10, 0x8000AF10 -.equ D_8000AF20, 0x8000AF20 -.equ D_8000AF70, 0x8000AF70 -.equ D_8000AF84, 0x8000AF84 -.equ D_8000AFA0, 0x8000AFA0 -.equ D_8000AFBC, 0x8000AFBC -.equ D_8000AFC0, 0x8000AFC0 -.equ D_8000AFC8, 0x8000AFC8 -.equ D_8000AFD0, 0x8000AFD0 -.equ D_8000AFE0, 0x8000AFE0 -.equ D_8000AFFC, 0x8000AFFC -.equ D_8000B008, 0x8000B008 -.equ D_8000B028, 0x8000B028 -.equ D_8000B038, 0x8000B038 -.equ D_8000B058, 0x8000B058 -.equ D_8000B068, 0x8000B068 -.equ D_8000B08C, 0x8000B08C -.equ D_8000B09C, 0x8000B09C -.equ D_8000B0AC, 0x8000B0AC -.equ D_8000B0BC, 0x8000B0BC -.equ D_8000B0C4, 0x8000B0C4 -.equ D_8000B100, 0x8000B100 -.equ D_8000B140, 0x8000B140 -.equ D_8000B168, 0x8000B168 -.equ D_8000B19C, 0x8000B19C -.equ D_8000B1CC, 0x8000B1CC -.equ D_8000B1FC, 0x8000B1FC -.equ D_8000B22C, 0x8000B22C -.equ D_8000B230, 0x8000B230 -.equ D_8000B240, 0x8000B240 -.equ D_8000B260, 0x8000B260 -.equ D_8000FFFF, 0x8000FFFF -.equ D_80010004, 0x80010004 -.equ D_80010005, 0x80010005 -.equ D_80010006, 0x80010006 -.equ D_80010007, 0x80010007 -.equ D_80010008, 0x80010008 -.equ D_80010009, 0x80010009 -.equ D_8001000C, 0x8001000C -.equ D_80010010, 0x80010010 -.equ D_80011714, 0x80011714 -.equ D_80011740, 0x80011740 -.equ D_80011764, 0x80011764 -.equ D_80011784, 0x80011784 -.equ D_800117B0, 0x800117B0 -.equ D_800117D0, 0x800117D0 -.equ D_800117E8, 0x800117E8 -.equ D_800117F8, 0x800117F8 -.equ D_80011810, 0x80011810 -.equ D_80011820, 0x80011820 -.equ D_8001182C, 0x8001182C -.equ D_8001183C, 0x8001183C -.equ D_80011868, 0x80011868 -.equ D_80011870, 0x80011870 -.equ D_80011874, 0x80011874 -.equ D_8001187C, 0x8001187C -.equ D_800118AC, 0x800118AC -.equ D_800118B0, 0x800118B0 -.equ D_800118B4, 0x800118B4 -.equ D_800118C8, 0x800118C8 -.equ D_800118DC, 0x800118DC -.equ D_800118E0, 0x800118E0 -.equ D_800118F4, 0x800118F4 -.equ D_80011918, 0x80011918 -.equ D_8001191C, 0x8001191C -.equ D_8001192C, 0x8001192C -.equ D_80011930, 0x80011930 -.equ D_8001193C, 0x8001193C -.equ D_80011944, 0x80011944 -.equ D_80011978, 0x80011978 -.equ D_80011990, 0x80011990 -.equ D_800119F4, 0x800119F4 -.equ D_80011A0C, 0x80011A0C -.equ D_80011A4C, 0x80011A4C -.equ D_80011A64, 0x80011A64 -.equ D_80011AC4, 0x80011AC4 -.equ D_80011AD8, 0x80011AD8 -.equ D_80011B28, 0x80011B28 -.equ D_80011B94, 0x80011B94 -.equ D_80011BB8, 0x80011BB8 -.equ D_80011BD4, 0x80011BD4 -.equ D_80011BE8, 0x80011BE8 -.equ D_80011BEC, 0x80011BEC -.equ D_80011BF4, 0x80011BF4 -.equ D_80011C34, 0x80011C34 -.equ D_80011C44, 0x80011C44 -.equ D_80011C84, 0x80011C84 -.equ D_80011C88, 0x80011C88 -.equ D_80011C98, 0x80011C98 -.equ D_80011CBC, 0x80011CBC -.equ D_80011CC0, 0x80011CC0 -.equ D_80011CFC, 0x80011CFC -.equ D_80011D0C, 0x80011D0C -.equ D_80011D20, 0x80011D20 -.equ D_80011D2C, 0x80011D2C -.equ D_80011D60, 0x80011D60 -.equ D_80011D70, 0x80011D70 -.equ D_80011D74, 0x80011D74 -.equ D_80011DB0, 0x80011DB0 -.equ D_80011DE4, 0x80011DE4 -.equ D_80011E00, 0x80011E00 -.equ D_80011E20, 0x80011E20 -.equ D_80011E58, 0x80011E58 -.equ D_80011E90, 0x80011E90 -.equ D_80011E98, 0x80011E98 -.equ D_80011EA0, 0x80011EA0 -.equ D_80011EA8, 0x80011EA8 -.equ D_80011EE0, 0x80011EE0 -.equ D_80011EE8, 0x80011EE8 -.equ D_80011EF0, 0x80011EF0 -.equ D_80011F20, 0x80011F20 -.equ D_80011F50, 0x80011F50 -.equ D_80011F60, 0x80011F60 -.equ D_80011FB4, 0x80011FB4 -.equ D_80011FC0, 0x80011FC0 -.equ D_80011FC8, 0x80011FC8 -.equ D_80011FCC, 0x80011FCC -.equ D_80011FD0, 0x80011FD0 -.equ D_80011FD4, 0x80011FD4 -.equ D_80011FD8, 0x80011FD8 -.equ D_80011FDC, 0x80011FDC -.equ D_80012008, 0x80012008 -.equ D_80012040, 0x80012040 -.equ D_8001206C, 0x8001206C -.equ D_8001209C, 0x8001209C -.equ D_800120A8, 0x800120A8 -.equ D_800120D0, 0x800120D0 -.equ D_800120E0, 0x800120E0 -.equ D_80012160, 0x80012160 -.equ D_800121E0, 0x800121E0 -.equ D_800121E4, 0x800121E4 -.equ D_800122E0, 0x800122E0 -.equ D_80012328, 0x80012328 -.equ D_80012330, 0x80012330 -.equ D_80012340, 0x80012340 -.equ D_80012350, 0x80012350 -.equ D_80012364, 0x80012364 -.equ D_80012370, 0x80012370 -.equ D_80012390, 0x80012390 -.equ D_80012540, 0x80012540 -.equ D_80012940, 0x80012940 -.equ D_80012960, 0x80012960 -.equ D_80012D60, 0x80012D60 -.equ D_80012F10, 0x80012F10 -.equ D_80013810, 0x80013810 -.equ D_80013830, 0x80013830 -.equ D_800138F8, 0x800138F8 -.equ D_80013900, 0x80013900 -.equ D_80013910, 0x80013910 -.equ D_80013960, 0x80013960 -.equ D_80013970, 0x80013970 -.equ D_80013990, 0x80013990 -.equ D_800139A8, 0x800139A8 -.equ D_80013A28, 0x80013A28 -.equ D_80013BD8, 0x80013BD8 -.equ D_800140D8, 0x800140D8 -.equ D_800140DC, 0x800140DC -.equ D_800140E0, 0x800140E0 -.equ D_800144E0, 0x800144E0 -.equ D_800144E4, 0x800144E4 -.equ D_800144E8, 0x800144E8 -.equ D_800144EC, 0x800144EC -.equ D_80014508, 0x80014508 -.equ D_8001450C, 0x8001450C -.equ D_8001450E, 0x8001450E -.equ D_80014510, 0x80014510 -.equ D_80014520, 0x80014520 -.equ D_80014534, 0x80014534 -.equ D_800145A0, 0x800145A0 -.equ D_800145A8, 0x800145A8 -.equ D_800145C0, 0x800145C0 -.equ D_800145D4, 0x800145D4 -.equ D_800145D5, 0x800145D5 -.equ D_800145D6, 0x800145D6 -.equ D_800145D7, 0x800145D7 -.equ D_800145D8, 0x800145D8 -.equ D_8001464C, 0x8001464C -.equ D_8001464D, 0x8001464D -.equ D_8001464E, 0x8001464E -.equ D_80014650, 0x80014650 -.equ D_800146C0, 0x800146C0 -.equ D_80015870, 0x80015870 -.equ D_80015888, 0x80015888 -.equ D_80015890, 0x80015890 -.equ D_80015A40, 0x80015A40 -.equ D_80015AE0, 0x80015AE0 -.equ D_80015AE4, 0x80015AE4 -.equ D_80015AE8, 0x80015AE8 -.equ D_80015AEC, 0x80015AEC -.equ D_80015AF0, 0x80015AF0 -.equ D_80015B00, 0x80015B00 -.equ D_80015B14, 0x80015B14 -.equ D_80015B80, 0x80015B80 -.equ D_80016D30, 0x80016D30 -.equ D_80016D48, 0x80016D48 -.equ D_80016D60, 0x80016D60 -.equ D_80016D78, 0x80016D78 -.equ D_80016D90, 0x80016D90 -.equ D_80016DA0, 0x80016DA0 -.equ D_80016DA4, 0x80016DA4 -.equ D_8001CE60, 0x8001CE60 -.equ D_80157D90, 0x80157D90 -.equ D_801668C0, 0x801668C0 -.equ D_801759C0, 0x801759C0 -.equ D_801D89E0, 0x801D89E0 -.equ D_802109E0, 0x802109E0 -.equ D_A4040010, 0xA4040010 -.equ D_A4300008, 0xA4300008 -.equ D_A430000C, 0xA430000C -.equ D_A4400004, 0xA4400004 -.equ D_A4400008, 0xA4400008 -.equ D_A440000C, 0xA440000C -.equ D_A4400010, 0xA4400010 -.equ D_A4400014, 0xA4400014 -.equ D_A4400018, 0xA4400018 -.equ D_A440001C, 0xA440001C -.equ D_A4400020, 0xA4400020 -.equ D_A4400024, 0xA4400024 -.equ D_A4400028, 0xA4400028 -.equ D_A440002C, 0xA440002C -.equ D_A4400030, 0xA4400030 -.equ D_A4400034, 0xA4400034 -.equ D_A4500008, 0xA4500008 -.equ D_A450000C, 0xA450000C -.equ D_A4500010, 0xA4500010 -.equ D_A4500014, 0xA4500014 -.equ D_A4600004, 0xA4600004 -.equ D_A4600005, 0xA4600005 -.equ D_A4600006, 0xA4600006 -.equ D_A4600007, 0xA4600007 -.equ D_A4600008, 0xA4600008 -.equ D_A460000C, 0xA460000C -.equ D_A4600010, 0xA4600010 -.equ D_A4600014, 0xA4600014 -.equ D_A4600018, 0xA4600018 -.equ D_A460001C, 0xA460001C -.equ D_A4600020, 0xA4600020 -.equ D_A4600024, 0xA4600024 -.equ D_A4600028, 0xA4600028 -.equ D_A460002C, 0xA460002C -.equ D_A4600030, 0xA4600030 -.equ D_A4800018, 0xA4800018 -.equ func_800C6E20, 0x800C6E20 -.equ func_800D66B4, 0x800D66B4 -.equ func_800D670C, 0x800D670C -.equ func_84001008, 0x84001008 -.equ func_8400103C, 0x8400103C -.equ func_84001064, 0x84001064 -.equ func_84001094, 0x84001094 - - .global func_80000460 -func_80000460: -/* 001060 80000460 3C0E8000 */ lui $t6, %hi(D_80000318) # $t6, 0x8000 -/* 001064 80000464 8DCE0318 */ lw $t6, %lo(D_80000318)($t6) -/* 001068 80000468 27BDFFE8 */ addiu $sp, $sp, -0x18 -/* 00106C 8000046C 3C0F0001 */ lui $t7, %hi(D_00016DA0) # $t7, 1 -/* 001070 80000470 AFBF0014 */ sw $ra, 0x14($sp) -/* 001074 80000474 25EF6DA0 */ addiu $t7, %lo(D_00016DA0) # addiu $t7, $t7, 0x6da0 -/* 001078 80000478 3C048001 */ lui $a0, %hi(D_80016DA0) # $a0, 0x8001 -/* 00107C 8000047C 24846DA0 */ addiu $a0, %lo(D_80016DA0) # addiu $a0, $a0, 0x6da0 -/* 001080 80000480 0C001114 */ jal func_80004450 -/* 001084 80000484 01CF2823 */ subu $a1, $t6, $t7 -/* 001088 80000488 8FBF0014 */ lw $ra, 0x14($sp) -/* 00108C 8000048C 27BD0018 */ addiu $sp, $sp, 0x18 -/* 001090 80000490 03E00008 */ jr $ra -/* 001094 80000494 00000000 */ nop - -/* 001098 80000498 27BDFFE0 */ addiu $sp, $sp, -0x20 -/* 00109C 8000049C 3C0F8001 */ lui $t7, %hi(D_8000AFC0) # $t7, 0x8001 -/* 0010A0 800004A0 AFBF001C */ sw $ra, 0x1c($sp) -/* 0010A4 800004A4 25EFAFC0 */ addiu $t7, %lo(D_8000AFC0) # addiu $t7, $t7, -0x5040 -/* 0010A8 800004A8 3C048001 */ lui $a0, %hi(D_80012370) # $a0, 0x8001 -/* 0010AC 800004AC 3C058001 */ lui $a1, %hi(D_80012960) # $a1, 0x8001 -/* 0010B0 800004B0 3C068001 */ lui $a2, %hi(D_80012D60) # $a2, 0x8001 -/* 0010B4 800004B4 240EFFFF */ li $t6, -1 -/* 0010B8 800004B8 AFAE0010 */ sw $t6, 0x10($sp) -/* 0010BC 800004BC 24C62D60 */ addiu $a2, %lo(D_80012D60) # addiu $a2, $a2, 0x2d60 -/* 0010C0 800004C0 24A52960 */ addiu $a1, %lo(D_80012960) # addiu $a1, $a1, 0x2960 -/* 0010C4 800004C4 24842370 */ addiu $a0, %lo(D_80012370) # addiu $a0, $a0, 0x2370 -/* 0010C8 800004C8 AFAF0014 */ sw $t7, 0x14($sp) -/* 0010CC 800004CC 0C000998 */ jal func_80002660 -/* 0010D0 800004D0 00003825 */ move $a3, $zero -/* 0010D4 800004D4 0C001440 */ jal func_80005100 -/* 0010D8 800004D8 00000000 */ nop -/* 0010DC 800004DC 3C018000 */ lui $at, %hi(D_80000318) # $at, 0x8000 -/* 0010E0 800004E0 0C000118 */ jal func_80000460 -/* 0010E4 800004E4 AC220318 */ sw $v0, %lo(D_80000318)($at) -/* 0010E8 800004E8 0C000D17 */ jal func_8000345C -/* 0010EC 800004EC 00000000 */ nop -/* 0010F0 800004F0 0C000DC2 */ jal func_80003708 -/* 0010F4 800004F4 00000000 */ nop -/* 0010F8 800004F8 0C001E44 */ jal func_80007910 -/* 0010FC 800004FC 00000000 */ nop -/* 001100 80000500 3C018001 */ lui $at, %hi(D_80009450) # $at, 0x8001 -/* 001104 80000504 0C0008F4 */ jal func_800023D0 -/* 001108 80000508 AC229450 */ sw $v0, %lo(D_80009450)($at) -/* 00110C 8000050C 0C000820 */ jal func_80002080 -/* 001110 80000510 00000000 */ nop -/* 001114 80000514 0C000798 */ jal func_80001E60 -/* 001118 80000518 00000000 */ nop -/* 00111C 8000051C 3C198001 */ lui $t9, %hi(D_8000AFC8) # $t9, 0x8001 -/* 001120 80000520 2739AFC8 */ addiu $t9, %lo(D_8000AFC8) # addiu $t9, $t9, -0x5038 -/* 001124 80000524 3C048001 */ lui $a0, %hi(D_80012940) # $a0, 0x8001 -/* 001128 80000528 3C058001 */ lui $a1, %hi(D_80012540) # $a1, 0x8001 -/* 00112C 8000052C 3C068001 */ lui $a2, %hi(D_80012940) # $a2, 0x8001 -/* 001130 80000530 24180100 */ li $t8, 256 -/* 001134 80000534 AFB80010 */ sw $t8, 0x10($sp) -/* 001138 80000538 24C62940 */ addiu $a2, %lo(D_80012940) # addiu $a2, $a2, 0x2940 -/* 00113C 8000053C 24A52540 */ addiu $a1, %lo(D_80012540) # addiu $a1, $a1, 0x2540 -/* 001140 80000540 24842940 */ addiu $a0, %lo(D_80012940) # addiu $a0, $a0, 0x2940 -/* 001144 80000544 AFB90014 */ sw $t9, 0x14($sp) -/* 001148 80000548 0C000998 */ jal func_80002660 -/* 00114C 8000054C 00003825 */ move $a3, $zero -/* 001150 80000550 3C088001 */ lui $t0, %hi(D_80012940) # $t0, 0x8001 -/* 001154 80000554 25082940 */ addiu $t0, %lo(D_80012940) # addiu $t0, $t0, 0x2940 -/* 001158 80000558 3C048001 */ lui $a0, %hi(D_80012390) # $a0, 0x8001 -/* 00115C 8000055C 3C068000 */ lui $a2, %hi(D_80000694) # $a2, 0x8000 -/* 001160 80000560 2409000A */ li $t1, 10 -/* 001164 80000564 AFA90014 */ sw $t1, 0x14($sp) -/* 001168 80000568 24C60694 */ addiu $a2, %lo(D_80000694) # addiu $a2, $a2, 0x694 -/* 00116C 8000056C 24842390 */ addiu $a0, %lo(D_80012390) # addiu $a0, $a0, 0x2390 -/* 001170 80000570 AFA80010 */ sw $t0, 0x10($sp) -/* 001174 80000574 24050001 */ li $a1, 1 -/* 001178 80000578 0C001154 */ jal func_80004550 -/* 00117C 8000057C 00003825 */ move $a3, $zero -/* 001180 80000580 3C048001 */ lui $a0, %hi(D_80012390) # $a0, 0x8001 -/* 001184 80000584 0C0023F0 */ jal func_80008FC0 -/* 001188 80000588 24842390 */ addiu $a0, %lo(D_80012390) # addiu $a0, $a0, 0x2390 -/* 00118C 8000058C 8FBF001C */ lw $ra, 0x1c($sp) -/* 001190 80000590 27BD0020 */ addiu $sp, $sp, 0x20 -/* 001194 80000594 03E00008 */ jr $ra -/* 001198 80000598 00000000 */ nop - -/* 00119C 8000059C 00000000 */ nop +.set gp=64 .global func_800005A0 -func_800005A0: +glabel func_800005A0 /* 0011A0 800005A0 27BDFFD8 */ addiu $sp, $sp, -0x28 /* 0011A4 800005A4 AFA40028 */ sw $a0, 0x28($sp) /* 0011A8 800005A8 AFBF001C */ sw $ra, 0x1c($sp) @@ -464,7 +75,7 @@ func_800005A0: /* 00128C 8000068C 03E00008 */ jr $ra /* 001290 80000690 00000000 */ nop -D_80000694: +glabel D_80000694 /* 001294 80000694 27BDFFE0 */ addiu $sp, $sp, -0x20 /* 001298 80000698 AFA40020 */ sw $a0, 0x20($sp) /* 00129C 8000069C AFBF001C */ sw $ra, 0x1c($sp) @@ -700,7 +311,7 @@ D_80000694: /* 001608 80000A08 03E00008 */ jr $ra /* 00160C 80000A0C 00000000 */ nop -func_80000A10: +glabel func_80000A10 /* 001610 80000A10 27BDFFE8 */ addiu $sp, $sp, -0x18 /* 001614 80000A14 AFBF0014 */ sw $ra, 0x14($sp) /* 001618 80000A18 10800017 */ beqz $a0, .L80000A78 @@ -786,7 +397,7 @@ func_80000A10: /* 001740 80000B40 03E00008 */ jr $ra /* 001744 80000B44 00000000 */ nop -func_80000B48: +glabel func_80000B48 /* 001748 80000B48 27BDFFE8 */ addiu $sp, $sp, -0x18 /* 00174C 80000B4C 3C0E8001 */ lui $t6, %hi(D_80009434) # $t6, 0x8001 /* 001750 80000B50 AFBF0014 */ sw $ra, 0x14($sp) @@ -808,7 +419,7 @@ func_80000B48: /* 001788 80000B88 00000000 */ nop /* 00178C 80000B8C 00000000 */ nop -func_80000B90: +glabel func_80000B90 /* 001790 80000B90 90820000 */ lbu $v0, ($a0) /* 001794 80000B94 50400012 */ beql $v0, $zero, .L80000BE0 /* 001798 80000B98 90AE0000 */ lbu $t6, ($a1) @@ -845,7 +456,7 @@ func_80000B90: /* 0017F4 80000BF4 03E00008 */ jr $ra /* 0017F8 80000BF8 00000000 */ nop -func_80000BFC: +glabel func_80000BFC /* 0017FC 80000BFC 27BDFF50 */ addiu $sp, $sp, -0xb0 /* 001800 80000C00 AFB00024 */ sw $s0, 0x24($sp) /* 001804 80000C04 3C108001 */ lui $s0, %hi(D_80009464) # $s0, 0x8001 @@ -1117,17 +728,17 @@ D_80000F68: /* 001BF4 80000FF4 0C001A78 */ jal func_800069E0 /* 001BF8 80000FF8 00000000 */ nop /* 001BFC 80000FFC 00402025 */ move $a0, $v0 -func_80001000: +glabel func_80001000 /* 001C00 80001000 00602825 */ move $a1, $v1 /* 001C04 80001004 24060000 */ li $a2, 0 -func_80001008: +glabel func_80001008 /* 001C08 80001008 0C000E1E */ jal func_80003878 /* 001C0C 8000100C 24070040 */ li $a3, 64 /* 001C10 80001010 00402025 */ move $a0, $v0 /* 001C14 80001014 00602825 */ move $a1, $v1 /* 001C18 80001018 24060000 */ li $a2, 0 /* 001C1C 8000101C 0C000DDE */ jal func_80003778 -func_80001020: +glabel func_80001020 /* 001C20 80001020 24070BB8 */ li $a3, 3000 /* 001C24 80001024 8FA90034 */ lw $t1, 0x34($sp) /* 001C28 80001028 3C0D8001 */ lui $t5, %hi(D_80013900) # $t5, 0x8001 @@ -1136,7 +747,7 @@ func_80001020: /* 001C34 80001034 3C048001 */ lui $a0, %hi(D_8001183C) # $a0, 0x8001 /* 001C38 80001038 2484183C */ addiu $a0, %lo(D_8001183C) # addiu $a0, $a0, 0x183c /* 001C3C 8000103C AFAA0010 */ sw $t2, 0x10($sp) -func_80001040: +glabel func_80001040 /* 001C40 80001040 8D2B000C */ lw $t3, 0xc($t1) /* 001C44 80001044 00403025 */ move $a2, $v0 /* 001C48 80001048 00603825 */ move $a3, $v1 @@ -1151,13 +762,13 @@ func_80001040: /* 001C68 80001068 0C001804 */ jal func_80006010 /* 001C6C 8000106C 8FA60038 */ lw $a2, 0x38($sp) /* 001C70 80001070 10400006 */ beqz $v0, .L8000108C -func_80001074: +glabel func_80001074 /* 001C74 80001074 00402825 */ move $a1, $v0 /* 001C78 80001078 3C048001 */ lui $a0, %hi(D_80011868) # $a0, 0x8001 /* 001C7C 8000107C 24841868 */ addiu $a0, %lo(D_80011868) # addiu $a0, $a0, 0x1868 /* 001C80 80001080 0C00084C */ jal func_80002130 /* 001C84 80001084 AFA2002C */ sw $v0, 0x2c($sp) -func_80001088: +glabel func_80001088 /* 001C88 80001088 8FA5002C */ lw $a1, 0x2c($sp) .L8000108C: /* 001C8C 8000108C 8FBF0024 */ lw $ra, 0x24($sp) @@ -1199,7 +810,7 @@ func_80001088: /* 001D18 80001118 0C001804 */ jal func_80006010 /* 001D1C 8000111C AC880014 */ sw $t0, 0x14($a0) /* 001D20 80001120 27A40034 */ addiu $a0, $sp, 0x34 -func_80001124: +glabel func_80001124 /* 001D24 80001124 00002825 */ move $a1, $zero /* 001D28 80001128 0C000CA0 */ jal func_80003280 /* 001D2C 8000112C 24060001 */ li $a2, 1 @@ -1208,7 +819,7 @@ func_80001124: /* 001D38 80001138 03E00008 */ jr $ra /* 001D3C 8000113C 00000000 */ nop -func_80001140: +glabel func_80001140 /* 001D40 80001140 27BDFF20 */ addiu $sp, $sp, -0xe0 /* 001D44 80001144 AFBF001C */ sw $ra, 0x1c($sp) /* 001D48 80001148 AFA400E0 */ sw $a0, 0xe0($sp) @@ -1349,7 +960,7 @@ func_80001140: /* 001F2C 8000132C 00000000 */ nop .global func_80001330 -func_80001330: +glabel func_80001330 /* 001F30 80001330 3C058001 */ lui $a1, 0x8001 /* 001F34 80001334 24A26DA0 */ addiu $v0, $a1, 0x6da0 /* 001F38 80001338 8C4E0004 */ lw $t6, 4($v0) @@ -1379,7 +990,7 @@ func_80001330: /* 001F88 80001388 03E00008 */ jr $ra /* 001F8C 8000138C 00000000 */ nop -func_80001390: +glabel func_80001390 /* 001F90 80001390 27BDFFE0 */ addiu $sp, $sp, -0x20 /* 001F94 80001394 AFBF0014 */ sw $ra, 0x14($sp) /* 001F98 80001398 0C0004CC */ jal func_80001330 @@ -1401,7 +1012,7 @@ func_80001390: /* 001FD4 800013D4 24A51944 */ addiu $a1, %lo(D_80011944) # addiu $a1, $a1, 0x1944 /* 001FD8 800013D8 54400004 */ bnezl $v0, .L800013EC /* 001FDC 800013DC 8FA2001C */ lw $v0, 0x1c($sp) -func_800013E0: +glabel func_800013E0 .L800013E0: /* 001FE0 800013E0 10000002 */ b .L800013EC /* 001FE4 800013E4 00001025 */ move $v0, $zero @@ -1412,7 +1023,7 @@ func_800013E0: /* 001FF4 800013F4 03E00008 */ jr $ra /* 001FF8 800013F8 00000000 */ nop -func_800013FC: +glabel func_800013FC /* 001FFC 800013FC 27BDFFC0 */ addiu $sp, $sp, -0x40 /* 002000 80001400 AFBF001C */ sw $ra, 0x1c($sp) /* 002004 80001404 AFB00018 */ sw $s0, 0x18($sp) @@ -1431,10 +1042,10 @@ func_800013FC: /* 002038 80001438 AFA20020 */ sw $v0, 0x20($sp) /* 00203C 8000143C 8C780004 */ lw $t8, 4($v1) /* 002040 80001440 93A5002B */ lbu $a1, 0x2b($sp) -func_80001444: +glabel func_80001444 /* 002044 80001444 1300004B */ beqz $t8, .L80001574 /* 002048 80001448 00000000 */ nop -func_8000144C: +glabel func_8000144C /* 00204C 8000144C 8C670000 */ lw $a3, ($v1) .L80001450: /* 002050 80001450 0207082B */ sltu $at, $s0, $a3 @@ -1449,7 +1060,7 @@ func_8000144C: /* 002074 80001474 14A00015 */ bnez $a1, .L800014CC /* 002078 80001478 02194021 */ addu $t0, $s0, $t9 /* 00207C 8000147C 0048082B */ sltu $at, $v0, $t0 -func_80001480: +glabel func_80001480 /* 002080 80001480 1020000A */ beqz $at, .L800014AC /* 002084 80001484 8FA40040 */ lw $a0, 0x40($sp) /* 002088 80001488 3C068001 */ lui $a2, %hi(D_80011978) # $a2, 0x8001 @@ -1574,10 +1185,10 @@ D_800015CC: /* 002234 80001634 00003025 */ move $a2, $zero /* 002238 80001638 1000FFF1 */ b .L80001600 /* 00223C 8000163C 02202025 */ move $a0, $s1 -func_80001640: +glabel func_80001640 .L80001640: /* 002240 80001640 3C048001 */ lui $a0, %hi(D_80011B94) # $a0, 0x8001 -func_80001644: +glabel func_80001644 /* 002244 80001644 0C00084C */ jal func_80002130 /* 002248 80001648 24841B94 */ addiu $a0, %lo(D_80011B94) # addiu $a0, $a0, 0x1b94 /* 00224C 8000164C 8FBF0024 */ lw $ra, 0x24($sp) @@ -1587,7 +1198,7 @@ func_80001644: /* 00225C 8000165C 03E00008 */ jr $ra /* 002260 80001660 27BD0038 */ addiu $sp, $sp, 0x38 -func_80001664: +glabel func_80001664 /* 002264 80001664 27BDFFE0 */ addiu $sp, $sp, -0x20 /* 002268 80001668 AFB00018 */ sw $s0, 0x18($sp) /* 00226C 8000166C 00808025 */ move $s0, $a0 @@ -1626,13 +1237,13 @@ func_80001664: /* 0022E8 800016E8 3C028001 */ lui $v0, %hi(D_8000AC5C) # $v0, 0x8001 /* 0022EC 800016EC 3C078001 */ lui $a3, %hi(D_80013990) # $a3, 0x8001 /* 0022F0 800016F0 AE0D0000 */ sw $t5, ($s0) -func_800016F4: +glabel func_800016F4 /* 0022F4 800016F4 8FAE0024 */ lw $t6, 0x24($sp) /* 0022F8 800016F8 24E73990 */ addiu $a3, %lo(D_80013990) # addiu $a3, $a3, 0x3990 /* 0022FC 800016FC AE0E0004 */ sw $t6, 4($s0) /* 002300 80001700 8FB8002C */ lw $t8, 0x2c($sp) /* 002304 80001704 AE000014 */ sw $zero, 0x14($s0) -func_80001708: +glabel func_80001708 /* 002308 80001708 AE180008 */ sw $t8, 8($s0) /* 00230C 8000170C 8FA80034 */ lw $t0, 0x34($sp) /* 002310 80001710 AE080018 */ sw $t0, 0x18($s0) @@ -1681,7 +1292,7 @@ func_80001708: /* 0023B8 800017B8 03E00008 */ jr $ra /* 0023BC 800017BC 00001025 */ move $v0, $zero -func_800017C0: +glabel func_800017C0 /* 0023C0 800017C0 27BDFF98 */ addiu $sp, $sp, -0x68 /* 0023C4 800017C4 AFBF0024 */ sw $ra, 0x24($sp) /* 0023C8 800017C8 AFA40068 */ sw $a0, 0x68($sp) @@ -1700,7 +1311,7 @@ func_800017C0: /* 0023FC 800017FC AFA00010 */ sw $zero, 0x10($sp) /* 002400 80001800 0C000599 */ jal func_80001664 /* 002404 80001804 AFA00018 */ sw $zero, 0x18($sp) -func_80001808: +glabel func_80001808 /* 002408 80001808 2401FFFF */ li $at, -1 /* 00240C 8000180C 14410003 */ bne $v0, $at, .L8000181C /* 002410 80001810 27A40030 */ addiu $a0, $sp, 0x30 @@ -1709,7 +1320,7 @@ func_80001808: .L8000181C: /* 00241C 8000181C 00002825 */ move $a1, $zero /* 002420 80001820 0C000CA0 */ jal func_80003280 -func_80001824: +glabel func_80001824 /* 002424 80001824 24060001 */ li $a2, 1 /* 002428 80001828 00001025 */ move $v0, $zero /* 00242C 8000182C 8FBF0024 */ lw $ra, 0x24($sp) @@ -1718,7 +1329,7 @@ func_80001824: /* 002434 80001834 03E00008 */ jr $ra /* 002438 80001838 00000000 */ nop -func_8000183C: +glabel func_8000183C /* 00243C 8000183C 27BDFFB0 */ addiu $sp, $sp, -0x50 /* 002440 80001840 3C020001 */ lui $v0, 1 /* 002444 80001844 3C0E0002 */ lui $t6, %hi(D_00019030) # $t6, 2 @@ -1732,7 +1343,7 @@ func_8000183C: /* 002464 80001864 AFB4003C */ sw $s4, 0x3c($sp) /* 002468 80001868 AFB30038 */ sw $s3, 0x38($sp) /* 00246C 8000186C AFB20034 */ sw $s2, 0x34($sp) -func_80001870: +glabel func_80001870 /* 002470 80001870 AFB10030 */ sw $s1, 0x30($sp) /* 002474 80001874 AFB0002C */ sw $s0, 0x2c($sp) /* 002478 80001878 24A56DA0 */ addiu $a1, %lo(D_80016DA0) # addiu $a1, $a1, 0x6da0 @@ -1757,7 +1368,7 @@ func_80001870: /* 0024C4 800018C4 36B50001 */ ori $s5, (0x00010001 & 0xFFFF) # ori $s5, $s5, 1 /* 0024C8 800018C8 26D61C98 */ addiu $s6, %lo(D_80011C98) # addiu $s6, $s6, 0x1c98 /* 0024CC 800018CC 26F71CBC */ addiu $s7, %lo(D_80011CBC) # addiu $s7, $s7, 0x1cbc -func_800018D0: +glabel func_800018D0 /* 0024D0 800018D0 24140001 */ li $s4, 1 /* 0024D4 800018D4 8E02000C */ lw $v0, 0xc($s0) .L800018D8: @@ -1833,17 +1444,17 @@ func_800018D0: /* 0025C8 800019C8 3C198001 */ lui $t9, %hi(D_80011D0C) # $t9, 0x8001 /* 0025CC 800019CC 261040D8 */ addiu $s0, %lo(D_800140D8) # addiu $s0, $s0, 0x40d8 /* 0025D0 800019D0 27391D0C */ addiu $t9, %lo(D_80011D0C) # addiu $t9, $t9, 0x1d0c -func_800019D4: +glabel func_800019D4 /* 0025D4 800019D4 3C048001 */ lui $a0, %hi(D_80013970) # $a0, 0x8001 /* 0025D8 800019D8 3C058001 */ lui $a1, %hi(D_80013BD8) # $a1, 0x8001 /* 0025DC 800019DC 24180100 */ li $t8, 256 /* 0025E0 800019E0 AFB80010 */ sw $t8, 0x10($sp) /* 0025E4 800019E4 24A53BD8 */ addiu $a1, %lo(D_80013BD8) # addiu $a1, $a1, 0x3bd8 /* 0025E8 800019E8 24843970 */ addiu $a0, %lo(D_80013970) # addiu $a0, $a0, 0x3970 -func_800019EC: +glabel func_800019EC /* 0025EC 800019EC AFB90014 */ sw $t9, 0x14($sp) /* 0025F0 800019F0 02003025 */ move $a2, $s0 -func_800019F4: +glabel func_800019F4 /* 0025F4 800019F4 0C000998 */ jal func_80002660 /* 0025F8 800019F8 00003825 */ move $a3, $zero /* 0025FC 800019FC 3C118001 */ lui $s1, %hi(D_80013A28) # $s1, 0x8001 @@ -1855,7 +1466,7 @@ func_800019F4: /* 002614 80001A14 02202025 */ move $a0, $s1 /* 002618 80001A18 24050012 */ li $a1, 18 /* 00261C 80001A1C 00003825 */ move $a3, $zero -func_80001A20: +glabel func_80001A20 /* 002620 80001A20 0C001154 */ jal func_80004550 /* 002624 80001A24 AFB00010 */ sw $s0, 0x10($sp) /* 002628 80001A28 0C0023F0 */ jal func_80008FC0 @@ -1867,13 +1478,13 @@ func_80001A20: /* 002640 80001A40 8FB30038 */ lw $s3, 0x38($sp) /* 002644 80001A44 8FB4003C */ lw $s4, 0x3c($sp) /* 002648 80001A48 8FB50040 */ lw $s5, 0x40($sp) -func_80001A4C: +glabel func_80001A4C /* 00264C 80001A4C 8FB60044 */ lw $s6, 0x44($sp) /* 002650 80001A50 8FB70048 */ lw $s7, 0x48($sp) /* 002654 80001A54 03E00008 */ jr $ra /* 002658 80001A58 27BD0050 */ addiu $sp, $sp, 0x50 -func_80001A5C: +glabel func_80001A5C /* 00265C 80001A5C 27BDFFD8 */ addiu $sp, $sp, -0x28 /* 002660 80001A60 8FAE0044 */ lw $t6, 0x44($sp) /* 002664 80001A64 AFBF0024 */ sw $ra, 0x24($sp) @@ -1882,7 +1493,7 @@ func_80001A5C: /* 002670 80001A70 AC8F0010 */ sw $t7, 0x10($a0) /* 002674 80001A74 8FA80040 */ lw $t0, 0x40($sp) /* 002678 80001A78 8FB9003C */ lw $t9, 0x3c($sp) -func_80001A7C: +glabel func_80001A7C /* 00267C 80001A7C 8FB80038 */ lw $t8, 0x38($sp) /* 002680 80001A80 AFA80018 */ sw $t0, 0x18($sp) /* 002684 80001A84 AFB90014 */ sw $t9, 0x14($sp) @@ -1893,7 +1504,7 @@ func_80001A7C: /* 002698 80001A98 03E00008 */ jr $ra /* 00269C 80001A9C 00000000 */ nop -func_80001AA0: +glabel func_80001AA0 /* 0026A0 80001AA0 27BDFF90 */ addiu $sp, $sp, -0x70 /* 0026A4 80001AA4 8FAE0080 */ lw $t6, 0x80($sp) /* 0026A8 80001AA8 AFBF0024 */ sw $ra, 0x24($sp) @@ -1933,12 +1544,12 @@ func_80001AA0: /* 002728 80001B28 00000000 */ nop /* 00272C 80001B2C 00000000 */ nop -func_80001B30: +glabel func_80001B30 /* 002730 80001B30 3C028001 */ lui $v0, %hi(D_800144E0) # $v0, 0x8001 /* 002734 80001B34 8C4244E0 */ lw $v0, %lo(D_800144E0)($v0) /* 002738 80001B38 3C078001 */ lui $a3, %hi(D_800144E8) # $a3, 0x8001 /* 00273C 80001B3C 3C018001 */ lui $at, %hi(D_800144EC) # $at, 0x8001 -func_80001B40: +glabel func_80001B40 /* 002740 80001B40 244EFFE7 */ addiu $t6, $v0, -0x19 /* 002744 80001B44 24E744E8 */ addiu $a3, %lo(D_800144E8) # addiu $a3, $a3, 0x44e8 /* 002748 80001B48 AC2E44EC */ sw $t6, %lo(D_800144EC)($at) @@ -1972,14 +1583,14 @@ func_80001B40: /* 0027B0 80001BB0 03264023 */ subu $t0, $t9, $a2 /* 0027B4 80001BB4 AC780000 */ sw $t8, ($v1) /* 0027B8 80001BB8 ACE80000 */ sw $t0, ($a3) -func_80001BBC: +glabel func_80001BBC /* 0027BC 80001BBC 244240E0 */ addiu $v0, %lo(D_800140E0) # addiu $v0, $v0, 0x40e0 -func_80001BC0: +glabel func_80001BC0 /* 0027C0 80001BC0 03E00008 */ jr $ra -func_80001BC4: +glabel func_80001BC4 /* 0027C4 80001BC4 27BD0028 */ addiu $sp, $sp, 0x28 -func_80001BC8: +glabel func_80001BC8 /* 0027C8 80001BC8 3C0E8001 */ lui $t6, %hi(D_800144E0) # $t6, 0x8001 /* 0027CC 80001BCC 8DCE44E0 */ lw $t6, %lo(D_800144E0)($t6) /* 0027D0 80001BD0 27BDFFD0 */ addiu $sp, $sp, -0x30 @@ -2043,7 +1654,7 @@ func_80001BC8: /* 0028A8 80001CA8 03E00008 */ jr $ra /* 0028AC 80001CAC 27BD0030 */ addiu $sp, $sp, 0x30 -func_80001CB0: +glabel func_80001CB0 /* 0028B0 80001CB0 27BDFFC0 */ addiu $sp, $sp, -0x40 /* 0028B4 80001CB4 AFBF002C */ sw $ra, 0x2c($sp) /* 0028B8 80001CB8 AFB40028 */ sw $s4, 0x28($sp) @@ -2065,7 +1676,7 @@ func_80001CB0: /* 0028F4 80001CF4 54C0000F */ bnezl $a2, .L80001D34 /* 0028F8 80001CF8 30F90080 */ andi $t9, $a3, 0x80 /* 0028FC 80001CFC 8E4F0000 */ lw $t7, ($s2) -func_80001D00: +glabel func_80001D00 /* 002900 80001D00 01F1082B */ sltu $at, $t7, $s1 /* 002904 80001D04 50200008 */ beql $at, $zero, .L80001D28 /* 002908 80001D08 92270000 */ lbu $a3, ($s1) @@ -2112,7 +1723,7 @@ func_80001D00: .L80001D98: /* 002998 80001D98 904CFFFF */ lbu $t4, -1($v0) /* 00299C 80001D9C 2463FFFF */ addiu $v1, $v1, -1 -func_80001DA0: +glabel func_80001DA0 /* 0029A0 80001DA0 26100001 */ addiu $s0, $s0, 1 /* 0029A4 80001DA4 24420001 */ addiu $v0, $v0, 1 /* 0029A8 80001DA8 1483FFFB */ bne $a0, $v1, .L80001D98 @@ -2130,7 +1741,7 @@ func_80001DA0: /* 0029D4 80001DD4 904FFFFD */ lbu $t7, -3($v0) /* 0029D8 80001DD8 A20FFFFE */ sb $t7, -2($s0) /* 0029DC 80001DDC 9058FFFE */ lbu $t8, -2($v0) -func_80001DE0: +glabel func_80001DE0 /* 0029E0 80001DE0 1460FFF5 */ bnez $v1, .L80001DB8 /* 0029E4 80001DE4 A218FFFF */ sb $t8, -1($s0) .L80001DE8: @@ -2146,7 +1757,7 @@ func_80001DE0: /* 002A0C 80001E0C 03E00008 */ jr $ra /* 002A10 80001E10 27BD0040 */ addiu $sp, $sp, 0x40 -func_80001E14: +glabel func_80001E14 /* 002A14 80001E14 3C018001 */ lui $at, %hi(D_800144E4) # $at, 0x8001 /* 002A18 80001E18 AC2444E4 */ sw $a0, %lo(D_800144E4)($at) /* 002A1C 80001E1C 3C018001 */ lui $at, %hi(D_800144E8) # $at, 0x8001 @@ -2168,7 +1779,7 @@ func_80001E14: /* 002A5C 80001E5C 00000000 */ nop .global func_80001E60 -func_80001E60: +glabel func_80001E60 /* 002A60 80001E60 27BDFFE8 */ addiu $sp, $sp, -0x18 /* 002A64 80001E64 AFBF0014 */ sw $ra, 0x14($sp) /* 002A68 80001E68 3C048001 */ lui $a0, %hi(D_80009450) # $a0, 0x8001 @@ -2268,21 +1879,21 @@ func_80001E60: .L80001FAC: /* 002BAC 80001FAC 91F802A8 */ lbu $t8, 0x2a8($t7) /* 002BB0 80001FB0 00001025 */ move $v0, $zero -func_80001FB4: +glabel func_80001FB4 /* 002BB4 80001FB4 33190004 */ andi $t9, $t8, 4 /* 002BB8 80001FB8 13200003 */ beqz $t9, .L80001FC8 /* 002BBC 80001FBC 00000000 */ nop /* 002BC0 80001FC0 03E00008 */ jr $ra /* 002BC4 80001FC4 24020001 */ li $v0, 1 -func_80001FC8: +glabel func_80001FC8 .L80001FC8: /* 002BC8 80001FC8 03E00008 */ jr $ra /* 002BCC 80001FCC 00000000 */ nop /* 002BD0 80001FD0 3C028001 */ lui $v0, %hi(D_8000AC60) # $v0, 0x8001 /* 002BD4 80001FD4 8C42AC60 */ lw $v0, %lo(D_8000AC60)($v0) -func_80001FD8: +glabel func_80001FD8 /* 002BD8 80001FD8 38420003 */ xori $v0, $v0, 3 /* 002BDC 80001FDC 03E00008 */ jr $ra /* 002BE0 80001FE0 2C420001 */ sltiu $v0, $v0, 1 @@ -2290,12 +1901,12 @@ func_80001FD8: /* 002BE4 80001FE4 00000000 */ nop /* 002BE8 80001FE8 00000000 */ nop /* 002BEC 80001FEC 00000000 */ nop -func_80001FF0: +glabel func_80001FF0 /* 002BF0 80001FF0 27BDFED8 */ addiu $sp, $sp, -0x128 /* 002BF4 80001FF4 AFBF001C */ sw $ra, 0x1c($sp) /* 002BF8 80001FF8 AFA40128 */ sw $a0, 0x128($sp) /* 002BFC 80001FFC AFA5012C */ sw $a1, 0x12c($sp) -func_80002000: +glabel func_80002000 /* 002C00 80002000 AFA60130 */ sw $a2, 0x130($sp) /* 002C04 80002004 0C0013C8 */ jal func_80004F20 /* 002C08 80002008 00002025 */ move $a0, $zero @@ -2329,7 +1940,7 @@ func_80002000: /* 002C74 80002074 00000000 */ nop /* 002C78 80002078 00000000 */ nop /* 002C7C 8000207C 00000000 */ nop -func_80002080: +glabel func_80002080 /* 002C80 80002080 27BDFFE8 */ addiu $sp, $sp, -0x18 /* 002C84 80002084 AFBF0014 */ sw $ra, 0x14($sp) /* 002C88 80002088 0C001E44 */ jal func_80007910 @@ -2365,8 +1976,8 @@ func_80002080: /* 002CFC 800020FC AFA50024 */ sw $a1, 0x24($sp) /* 002D00 80002100 AFA60028 */ sw $a2, 0x28($sp) /* 002D04 80002104 AFA7002C */ sw $a3, 0x2c($sp) -/* 002D08 80002108 3C048000 */ lui $a0, %hi(D_800021B0) # $a0, 0x8000 -/* 002D0C 8000210C 248421B0 */ addiu $a0, %lo(D_800021B0) # addiu $a0, $a0, 0x21b0 +/* 002D08 80002108 3C048000 */ lui $a0, %hi(func_800021B0) # $a0, 0x8000 +/* 002D0C 8000210C 248421B0 */ addiu $a0, %lo(func_800021B0) # addiu $a0, $a0, 0x21b0 /* 002D10 80002110 27A70024 */ addiu $a3, $sp, 0x24 /* 002D14 80002114 8FA60020 */ lw $a2, 0x20($sp) /* 002D18 80002118 0C0014B8 */ jal func_800052E0 @@ -2376,15 +1987,15 @@ func_80002080: /* 002D28 80002128 03E00008 */ jr $ra /* 002D2C 8000212C 00000000 */ nop -func_80002130: +glabel func_80002130 /* 002D30 80002130 27BDFFE0 */ addiu $sp, $sp, -0x20 /* 002D34 80002134 AFA40020 */ sw $a0, 0x20($sp) /* 002D38 80002138 AFBF0014 */ sw $ra, 0x14($sp) /* 002D3C 8000213C AFA50024 */ sw $a1, 0x24($sp) /* 002D40 80002140 AFA60028 */ sw $a2, 0x28($sp) /* 002D44 80002144 AFA7002C */ sw $a3, 0x2c($sp) -/* 002D48 80002148 3C048000 */ lui $a0, %hi(D_800021B0) # $a0, 0x8000 -/* 002D4C 8000214C 248421B0 */ addiu $a0, %lo(D_800021B0) # addiu $a0, $a0, 0x21b0 +/* 002D48 80002148 3C048000 */ lui $a0, %hi(func_800021B0) # $a0, 0x8000 +/* 002D4C 8000214C 248421B0 */ addiu $a0, %lo(func_800021B0) # addiu $a0, $a0, 0x21b0 /* 002D50 80002150 27A70024 */ addiu $a3, $sp, 0x24 /* 002D54 80002154 8FA60020 */ lw $a2, 0x20($sp) /* 002D58 80002158 0C0014B8 */ jal func_800052E0 @@ -2400,8 +2011,8 @@ func_80002130: /* 002D7C 8000217C AFA50024 */ sw $a1, 0x24($sp) /* 002D80 80002180 AFA60028 */ sw $a2, 0x28($sp) /* 002D84 80002184 AFA7002C */ sw $a3, 0x2c($sp) -/* 002D88 80002188 3C048000 */ lui $a0, %hi(D_800021B0) # $a0, 0x8000 -/* 002D8C 8000218C 248421B0 */ addiu $a0, %lo(D_800021B0) # addiu $a0, $a0, 0x21b0 +/* 002D88 80002188 3C048000 */ lui $a0, %hi(func_800021B0) # $a0, 0x8000 +/* 002D8C 8000218C 248421B0 */ addiu $a0, %lo(func_800021B0) # addiu $a0, $a0, 0x21b0 /* 002D90 80002190 27A70024 */ addiu $a3, $sp, 0x24 /* 002D94 80002194 8FA60020 */ lw $a2, 0x20($sp) /* 002D98 80002198 0C0014B8 */ jal func_800052E0 @@ -2411,7 +2022,7 @@ func_80002130: /* 002DA8 800021A8 03E00008 */ jr $ra /* 002DAC 800021AC 00000000 */ nop -D_800021B0: +func_800021B0: /* 002DB0 800021B0 27BDFFA0 */ addiu $sp, $sp, -0x60 /* 002DB4 800021B4 AFB40028 */ sw $s4, 0x28($sp) /* 002DB8 800021B8 3C148001 */ lui $s4, %hi(D_80014510) # $s4, 0x8001 @@ -2561,7 +2172,7 @@ D_800021B0: /* 002FC8 800023C8 03E00008 */ jr $ra /* 002FCC 800023CC 00000000 */ nop -func_800023D0: +glabel func_800023D0 /* 002FD0 800023D0 27BDFFE0 */ addiu $sp, $sp, -0x20 /* 002FD4 800023D4 AFBF001C */ sw $ra, 0x1c($sp) /* 002FD8 800023D8 0C000BFC */ jal func_80002FF0 @@ -2738,7 +2349,7 @@ func_800023D0: /* 003254 80002654 1000FFF2 */ b .L80002620 /* 003258 80002658 216B0012 */ addi $t3, $t3, 0x12 /* 00325C 8000265C 00000000 */ nop -func_80002660: +glabel func_80002660 /* 003260 80002660 27BDFFE0 */ addiu $sp, $sp, -0x20 /* 003264 80002664 AFB00018 */ sw $s0, 0x18($sp) /* 003268 80002668 00808025 */ move $s0, $a0 @@ -2861,7 +2472,7 @@ func_80002660: /* 003400 80002800 03E00008 */ jr $ra /* 003404 80002804 00000000 */ nop -func_80002808: +glabel func_80002808 /* 003408 80002808 27BDFFC0 */ addiu $sp, $sp, -0x40 /* 00340C 8000280C AFBF002C */ sw $ra, 0x2c($sp) /* 003410 80002810 AFB00028 */ sw $s0, 0x28($sp) @@ -2957,7 +2568,7 @@ func_80002808: /* 003554 80002954 03E00008 */ jr $ra /* 003558 80002958 27BD0040 */ addiu $sp, $sp, 0x40 -func_8000295C: +glabel func_8000295C /* 00355C 8000295C 27BDFFE0 */ addiu $sp, $sp, -0x20 /* 003560 80002960 AFB00014 */ sw $s0, 0x14($sp) /* 003564 80002964 3C108001 */ lui $s0, %hi(D_8000AC80) # $s0, 0x8001 @@ -2984,7 +2595,7 @@ func_8000295C: /* 0035AC 800029AC 03E00008 */ jr $ra /* 0035B0 800029B0 27BD0020 */ addiu $sp, $sp, 0x20 -func_800029B4: +glabel func_800029B4 /* 0035B4 800029B4 27BDFFE8 */ addiu $sp, $sp, -0x18 /* 0035B8 800029B8 14800005 */ bnez $a0, .L800029D0 /* 0035BC 800029BC AFBF0014 */ sw $ra, 0x14($sp) @@ -3081,7 +2692,7 @@ func_800029B4: /* 003708 80002B08 03E00008 */ jr $ra /* 00370C 80002B0C 00000000 */ nop -func_80002B10: +glabel func_80002B10 /* 003710 80002B10 27BDFFA8 */ addiu $sp, $sp, -0x58 /* 003714 80002B14 AFB00018 */ sw $s0, 0x18($sp) /* 003718 80002B18 00A08025 */ move $s0, $a1 @@ -3245,7 +2856,7 @@ func_80002B10: /* 003958 80002D58 03E00008 */ jr $ra /* 00395C 80002D5C 00000000 */ nop -func_80002D60: +glabel func_80002D60 /* 003960 80002D60 27BDFFE8 */ addiu $sp, $sp, -0x18 /* 003964 80002D64 AFBF0014 */ sw $ra, 0x14($sp) /* 003968 80002D68 AFA40018 */ sw $a0, 0x18($sp) @@ -3264,7 +2875,7 @@ func_80002D60: /* 003998 80002D98 03E00008 */ jr $ra /* 00399C 80002D9C 00000000 */ nop -func_80002DA0: +glabel func_80002DA0 /* 0039A0 80002DA0 27BDFFE0 */ addiu $sp, $sp, -0x20 /* 0039A4 80002DA4 AFBF001C */ sw $ra, 0x1c($sp) /* 0039A8 80002DA8 AFA40020 */ sw $a0, 0x20($sp) @@ -3296,7 +2907,7 @@ func_80002DA0: /* 003A08 80002E08 03E00008 */ jr $ra /* 003A0C 80002E0C 00000000 */ nop -func_80002E10: +glabel func_80002E10 /* 003A10 80002E10 27BDFFE8 */ addiu $sp, $sp, -0x18 /* 003A14 80002E14 AFBF0014 */ sw $ra, 0x14($sp) /* 003A18 80002E18 AFA40018 */ sw $a0, 0x18($sp) @@ -3314,7 +2925,7 @@ func_80002E10: /* 003A48 80002E48 03E00008 */ jr $ra /* 003A4C 80002E4C 00000000 */ nop -func_80002E50: +glabel func_80002E50 /* 003A50 80002E50 27BDFFE8 */ addiu $sp, $sp, -0x18 /* 003A54 80002E54 AFBF0014 */ sw $ra, 0x14($sp) /* 003A58 80002E58 AFA40018 */ sw $a0, 0x18($sp) @@ -3349,7 +2960,7 @@ func_80002E50: /* 003AC8 80002EC8 03E00008 */ jr $ra /* 003ACC 80002ECC 00000000 */ nop -D_80002ED0: +func_80002ED0: /* 003AD0 80002ED0 27BDFFE8 */ addiu $sp, $sp, -0x18 /* 003AD4 80002ED4 AFBF0014 */ sw $ra, 0x14($sp) /* 003AD8 80002ED8 0C001846 */ jal func_80006118 @@ -3366,8 +2977,8 @@ D_80002ED0: /* 003B00 80002F00 00A03025 */ move $a2, $a1 /* 003B04 80002F04 AFBF0014 */ sw $ra, 0x14($sp) /* 003B08 80002F08 AFA5001C */ sw $a1, 0x1c($sp) -/* 003B0C 80002F0C 3C048000 */ lui $a0, %hi(D_80002ED0) # $a0, 0x8000 -/* 003B10 80002F10 24842ED0 */ addiu $a0, %lo(D_80002ED0) # addiu $a0, $a0, 0x2ed0 +/* 003B0C 80002F0C 3C048000 */ lui $a0, %hi(func_80002ED0) # $a0, 0x8000 +/* 003B10 80002F10 24842ED0 */ addiu $a0, %lo(func_80002ED0) # addiu $a0, $a0, 0x2ed0 /* 003B14 80002F14 0C0014B8 */ jal func_800052E0 /* 003B18 80002F18 8FA50018 */ lw $a1, 0x18($sp) /* 003B1C 80002F1C 04400004 */ bltz $v0, .L80002F30 @@ -3382,15 +2993,15 @@ D_80002ED0: /* 003B3C 80002F3C 03E00008 */ jr $ra /* 003B40 80002F40 00000000 */ nop -func_80002F44: +glabel func_80002F44 /* 003B44 80002F44 27BDFFE0 */ addiu $sp, $sp, -0x20 /* 003B48 80002F48 AFA40020 */ sw $a0, 0x20($sp) /* 003B4C 80002F4C AFBF0014 */ sw $ra, 0x14($sp) /* 003B50 80002F50 AFA50024 */ sw $a1, 0x24($sp) /* 003B54 80002F54 AFA60028 */ sw $a2, 0x28($sp) /* 003B58 80002F58 AFA7002C */ sw $a3, 0x2c($sp) -/* 003B5C 80002F5C 3C048000 */ lui $a0, %hi(D_80002ED0) # $a0, 0x8000 -/* 003B60 80002F60 24842ED0 */ addiu $a0, %lo(D_80002ED0) # addiu $a0, $a0, 0x2ed0 +/* 003B5C 80002F5C 3C048000 */ lui $a0, %hi(func_80002ED0) # $a0, 0x8000 +/* 003B60 80002F60 24842ED0 */ addiu $a0, %lo(func_80002ED0) # addiu $a0, $a0, 0x2ed0 /* 003B64 80002F64 27A70028 */ addiu $a3, $sp, 0x28 /* 003B68 80002F68 8FA60024 */ lw $a2, 0x24($sp) /* 003B6C 80002F6C 0C0014B8 */ jal func_800052E0 @@ -3410,7 +3021,7 @@ func_80002F44: /* 003B9C 80002F9C 00000000 */ nop .global func_80002FA0 -func_80002FA0: +glabel func_80002FA0 /* 003BA0 80002FA0 27BDFFE8 */ addiu $sp, $sp, -0x18 /* 003BA4 80002FA4 AFBF0014 */ sw $ra, 0x14($sp) /* 003BA8 80002FA8 240E0001 */ li $t6, 1 @@ -3432,7 +3043,7 @@ func_80002FA0: /* 003BE8 80002FE8 03E00008 */ jr $ra /* 003BEC 80002FEC 00000000 */ nop -func_80002FF0: +glabel func_80002FF0 /* 003BF0 80002FF0 3C0E8001 */ lui $t6, %hi(D_8000AC90) # $t6, 0x8001 /* 003BF4 80002FF4 8DCEAC90 */ lw $t6, %lo(D_8000AC90)($t6) /* 003BF8 80002FF8 27BDFFE0 */ addiu $sp, $sp, -0x20 @@ -3452,7 +3063,7 @@ func_80002FF0: /* 003C2C 8000302C 03E00008 */ jr $ra /* 003C30 80003030 00000000 */ nop -func_80003034: +glabel func_80003034 /* 003C34 80003034 27BDFFE8 */ addiu $sp, $sp, -0x18 /* 003C38 80003038 AFBF0014 */ sw $ra, 0x14($sp) /* 003C3C 8000303C 3C048001 */ lui $a0, %hi(D_800145A8) # $a0, 0x8001 @@ -3465,7 +3076,7 @@ func_80003034: /* 003C58 80003058 03E00008 */ jr $ra /* 003C5C 8000305C 00000000 */ nop -func_80003060: +glabel func_80003060 /* 003C60 80003060 27BDFFC8 */ addiu $sp, $sp, -0x38 /* 003C64 80003064 AFBF0024 */ sw $ra, 0x24($sp) /* 003C68 80003068 AFA40038 */ sw $a0, 0x38($sp) @@ -3559,7 +3170,7 @@ func_80003060: /* 003DA8 800031A8 27BD0038 */ addiu $sp, $sp, 0x38 /* 003DAC 800031AC 00000000 */ nop -func_800031B0: +glabel func_800031B0 /* 003DB0 800031B0 27BDFFC8 */ addiu $sp, $sp, -0x38 /* 003DB4 800031B4 AFBF0024 */ sw $ra, 0x24($sp) /* 003DB8 800031B8 AFA40038 */ sw $a0, 0x38($sp) @@ -3614,13 +3225,13 @@ func_800031B0: /* 003E68 80003268 03E00008 */ jr $ra /* 003E6C 8000326C 27BD0038 */ addiu $sp, $sp, 0x38 -func_80003270: +glabel func_80003270 /* 003E70 80003270 3C018001 */ lui $at, 0x8001 /* 003E74 80003274 03E00008 */ jr $ra /* 003E78 80003278 AC24AFBC */ sw $a0, -0x5044($at) /* 003E7C 8000327C 00000000 */ nop -func_80003280: +glabel func_80003280 /* 003E80 80003280 27BDFFD8 */ addiu $sp, $sp, -0x28 /* 003E84 80003284 AFBF001C */ sw $ra, 0x1c($sp) /* 003E88 80003288 AFA40028 */ sw $a0, 0x28($sp) @@ -3710,7 +3321,7 @@ func_80003280: /* 003FB8 800033B8 00000000 */ nop /* 003FBC 800033BC 00000000 */ nop -func_800033C0: +glabel func_800033C0 /* 003FC0 800033C0 240E0007 */ li $t6, 7 /* 003FC4 800033C4 3C018001 */ lui $at, %hi(D_800145D4) # $at, 0x8001 /* 003FC8 800033C8 A02E45D4 */ sb $t6, %lo(D_800145D4)($at) @@ -3751,7 +3362,7 @@ func_800033C0: /* 004054 80003454 03E00008 */ jr $ra /* 004058 80003458 A02B464F */ sb $t3, 0x464f($at) -func_8000345C: +glabel func_8000345C /* 00405C 8000345C 27BDFFD0 */ addiu $sp, $sp, -0x30 /* 004060 80003460 AFBF001C */ sw $ra, 0x1c($sp) /* 004064 80003464 240E0001 */ li $t6, 1 @@ -3800,30 +3411,30 @@ func_8000345C: /* 004104 80003504 1440FFF9 */ bnez $v0, .L800034EC /* 004108 80003508 00000000 */ nop .L8000350C: -/* 00410C 8000350C 3C088000 */ lui $t0, %hi(D_800039D0) # $t0, 0x8000 -/* 004110 80003510 250839D0 */ addiu $t0, %lo(D_800039D0) # addiu $t0, $t0, 0x39d0 +/* 00410C 8000350C 3C088000 */ lui $t0, %hi(func_800039D0) # $t0, 0x8000 +/* 004110 80003510 250839D0 */ addiu $t0, %lo(func_800039D0) # addiu $t0, $t0, 0x39d0 /* 004114 80003514 8D010000 */ lw $at, ($t0) /* 004118 80003518 3C198000 */ lui $t9, %hi(D_8000000C) # $t9, 0x8000 -/* 00411C 8000351C 3C0D8000 */ lui $t5, %hi(D_800039D0) # $t5, 0x8000 +/* 00411C 8000351C 3C0D8000 */ lui $t5, %hi(func_800039D0) # $t5, 0x8000 /* 004120 80003520 AF210000 */ sw $at, ($t9) /* 004124 80003524 8D0B0004 */ lw $t3, 4($t0) -/* 004128 80003528 25AD39D0 */ addiu $t5, %lo(D_800039D0) # addiu $t5, $t5, 0x39d0 +/* 004128 80003528 25AD39D0 */ addiu $t5, %lo(func_800039D0) # addiu $t5, $t5, 0x39d0 /* 00412C 8000352C 3C0C8000 */ lui $t4, %hi(D_8000000C) # $t4, 0x8000 /* 004130 80003530 AF2B0004 */ sw $t3, %lo(D_80000004)($t9) /* 004134 80003534 8D010008 */ lw $at, 8($t0) /* 004138 80003538 358C0080 */ ori $t4, (0x80000080 & 0xFFFF) # ori $t4, $t4, 0x80 -/* 00413C 8000353C 3C098000 */ lui $t1, %hi(D_800039D0) # $t1, 0x8000 +/* 00413C 8000353C 3C098000 */ lui $t1, %hi(func_800039D0) # $t1, 0x8000 /* 004140 80003540 AF210008 */ sw $at, %lo(D_80000008)($t9) /* 004144 80003544 8D0B000C */ lw $t3, 0xc($t0) -/* 004148 80003548 252939D0 */ addiu $t1, %lo(D_800039D0) # addiu $t1, $t1, 0x39d0 +/* 004148 80003548 252939D0 */ addiu $t1, %lo(func_800039D0) # addiu $t1, $t1, 0x39d0 /* 00414C 8000354C 3C0A8000 */ lui $t2, %hi(D_8000000C) # $t2, 0x8000 /* 004150 80003550 AF2B000C */ sw $t3, %lo(D_8000000C)($t9) /* 004154 80003554 8DA10000 */ lw $at, ($t5) /* 004158 80003558 354A0100 */ ori $t2, (0x80000100 & 0xFFFF) # ori $t2, $t2, 0x100 -/* 00415C 8000355C 3C0E8000 */ lui $t6, %hi(D_800039D0) # $t6, 0x8000 +/* 00415C 8000355C 3C0E8000 */ lui $t6, %hi(func_800039D0) # $t6, 0x8000 /* 004160 80003560 AD810000 */ sw $at, ($t4) /* 004164 80003564 8DB80004 */ lw $t8, 4($t5) -/* 004168 80003568 25CE39D0 */ addiu $t6, %lo(D_800039D0) # addiu $t6, $t6, 0x39d0 +/* 004168 80003568 25CE39D0 */ addiu $t6, %lo(func_800039D0) # addiu $t6, $t6, 0x39d0 /* 00416C 8000356C 3C0F8000 */ lui $t7, %hi(D_8000000C) # $t7, 0x8000 /* 004170 80003570 AD980004 */ sw $t8, %lo(D_80000004)($t4) /* 004174 80003574 8DA10008 */ lw $at, 8($t5) @@ -3935,7 +3546,7 @@ func_8000345C: /* 004304 80003704 00000000 */ nop .global func_80003708 -func_80003708: +glabel func_80003708 /* 004308 80003708 03E00008 */ jr $ra /* 00430C 8000370C 00000000 */ nop @@ -3952,7 +3563,7 @@ func_80003708: /* 004338 80003738 0002103F */ dsra32 $v0, $v0, 0 .global func_8000373C -func_8000373C: +glabel func_8000373C /* 00433C 8000373C AFA40000 */ sw $a0, ($sp) /* 004340 80003740 AFA50004 */ sw $a1, 4($sp) /* 004344 80003744 AFA60008 */ sw $a2, 8($sp) @@ -3970,7 +3581,7 @@ func_8000373C: /* 004370 80003770 03E00008 */ jr $ra /* 004374 80003774 0002103F */ dsra32 $v0, $v0, 0 -func_80003778: +glabel func_80003778 /* 004378 80003778 AFA40000 */ sw $a0, ($sp) /* 00437C 8000377C AFA50004 */ sw $a1, 4($sp) /* 004380 80003780 AFA60008 */ sw $a2, 8($sp) @@ -4017,7 +3628,7 @@ func_80003778: /* 004414 80003814 03E00008 */ jr $ra /* 004418 80003818 0002103F */ dsra32 $v0, $v0, 0 -func_8000381C: +glabel func_8000381C /* 00441C 8000381C AFA40000 */ sw $a0, ($sp) /* 004420 80003820 AFA50004 */ sw $a1, 4($sp) /* 004424 80003824 AFA60008 */ sw $a2, 8($sp) @@ -4044,7 +3655,7 @@ func_8000381C: /* 004470 80003870 03E00008 */ jr $ra /* 004474 80003874 0002103F */ dsra32 $v0, $v0, 0 -func_80003878: +glabel func_80003878 /* 004478 80003878 AFA40000 */ sw $a0, ($sp) /* 00447C 8000387C AFA50004 */ sw $a1, 4($sp) /* 004480 80003880 AFA60008 */ sw $a2, 8($sp) @@ -4142,12 +3753,13 @@ func_80003878: /* 0045C8 800039C8 03E00008 */ jr $ra /* 0045CC 800039CC 0002103F */ dsra32 $v0, $v0, 0 -D_800039D0: -/* 0045D0 800039D0 3C1A8000 */ lui $k0, %hi(D_800039E0) # $k0, 0x8000 -/* 0045D4 800039D4 275A39E0 */ addiu $k0, %lo(D_800039E0) # addiu $k0, $k0, 0x39e0 +func_800039D0: +/* 0045D0 800039D0 3C1A8000 */ lui $k0, %hi(func_800039E0) # $k0, 0x8000 +/* 0045D4 800039D4 275A39E0 */ addiu $k0, %lo(func_800039E0) # addiu $k0, $k0, 0x39e0 /* 0045D8 800039D8 03400008 */ jr $k0 /* 0045DC 800039DC 00000000 */ nop -D_800039E0: + +func_800039E0: /* 0045E0 800039E0 3C1A8001 */ lui $k0, %hi(D_80015890) # $k0, 0x8001 /* 0045E4 800039E4 275A5890 */ addiu $k0, %lo(D_80015890) # addiu $k0, $k0, 0x5890 /* 0045E8 800039E8 FF410020 */ sd $at, 0x20($k0) @@ -4510,7 +4122,7 @@ D_800039E0: /* 004B24 80003F24 0800105D */ j func_80004174 /* 004B28 80003F28 00000000 */ nop -func_80003F2C: +glabel func_80003F2C /* 004B2C 80003F2C 3C0A8001 */ lui $t2, %hi(D_80015A40) # $t2, 0x8001 /* 004B30 80003F30 254A5A40 */ addiu $t2, %lo(D_80015A40) # addiu $t2, $t2, 0x5a40 /* 004B34 80003F34 01445021 */ addu $t2, $t2, $a0 @@ -4568,13 +4180,13 @@ func_80003F2C: /* 004BF4 80003FF4 00000000 */ nop /* 004BF8 80003FF8 8F5B0118 */ lw $k1, 0x118($k0) /* 004BFC 80003FFC 3C012000 */ lui $at, 0x2000 -func_80004000: +glabel func_80004000 /* 004C00 80004000 24090001 */ li $t1, 1 /* 004C04 80004004 0361D825 */ or $k1, $k1, $at /* 004C08 80004008 AF490018 */ sw $t1, 0x18($k0) /* 004C0C 8000400C 1000FFB5 */ b .L80003EE4 /* 004C10 80004010 AF5B0118 */ sw $k1, 0x118($k0) -func_80004014: +glabel func_80004014 /* 004C14 80004014 3C058001 */ lui $a1, %hi(D_8000AD50) # $a1, 0x8001 /* 004C18 80004018 8CA5AD50 */ lw $a1, %lo(D_8000AD50)($a1) /* 004C1C 8000401C 40086000 */ mfc0 $t0, $12 @@ -4644,7 +4256,7 @@ func_80004014: /* 004D0C 8000410C 0800105D */ j func_80004174 /* 004D10 80004110 00000000 */ nop -func_80004114: +glabel func_80004114 /* 004D14 80004114 8C980000 */ lw $t8, ($a0) /* 004D18 80004118 8CAF0004 */ lw $t7, 4($a1) /* 004D1C 8000411C 0080C825 */ move $t9, $a0 @@ -4666,7 +4278,7 @@ func_80004114: /* 004D54 80004154 03E00008 */ jr $ra /* 004D58 80004158 ACA40008 */ sw $a0, 8($a1) -func_8000415C: +glabel func_8000415C /* 004D5C 8000415C 8C820000 */ lw $v0, ($a0) /* 004D60 80004160 8C590000 */ lw $t9, ($v0) /* 004D64 80004164 03E00008 */ jr $ra @@ -4675,7 +4287,7 @@ func_8000415C: /* 004D6C 8000416C 03E00008 */ jr $ra /* 004D70 80004170 00000000 */ nop -func_80004174: +glabel func_80004174 /* 004D74 80004174 3C048001 */ lui $a0, %hi(D_8000AD48) # $a0, 0x8001 /* 004D78 80004178 0C001057 */ jal func_8000415C /* 004D7C 8000417C 2484AD48 */ addiu $a0, %lo(D_8000AD48) # addiu $a0, $a0, -0x52b8 @@ -4772,12 +4384,12 @@ func_80004174: /* 004EE4 800042E4 00000000 */ nop /* 004EE8 800042E8 00000000 */ nop /* 004EEC 800042EC 42000018 */ eret -D_800042F0: +func_800042F0: /* 004EF0 800042F0 0C0010D0 */ jal func_80004340 /* 004EF4 800042F4 00002025 */ move $a0, $zero /* 004EF8 800042F8 00000000 */ nop /* 004EFC 800042FC 00000000 */ nop -func_80004300: +glabel func_80004300 /* 004F00 80004300 00803025 */ move $a2, $a0 /* 004F04 80004304 8CC70000 */ lw $a3, ($a2) /* 004F08 80004308 27BDFFF8 */ addiu $sp, $sp, -8 @@ -4798,7 +4410,7 @@ func_80004300: /* 004F38 80004338 03E00008 */ jr $ra /* 004F3C 8000433C 27BD0008 */ addiu $sp, $sp, 8 -func_80004340: +glabel func_80004340 /* 004F40 80004340 27BDFFC8 */ addiu $sp, $sp, -0x38 /* 004F44 80004344 AFBF0024 */ sw $ra, 0x24($sp) /* 004F48 80004348 AFA40038 */ sw $a0, 0x38($sp) @@ -4877,7 +4489,7 @@ func_80004340: /* 00504C 8000444C 00000000 */ nop .global func_80004450 -func_80004450: +glabel func_80004450 /* 005050 80004450 28A1000C */ slti $at, $a1, 0xc /* 005054 80004454 1420001D */ bnez $at, .L800044CC /* 005058 80004458 00041823 */ negu $v1, $a0 @@ -4950,7 +4562,7 @@ func_80004450: /* 005144 80004544 00000000 */ nop /* 005148 80004548 00000000 */ nop /* 00514C 8000454C 00000000 */ nop -func_80004550: +glabel func_80004550 /* 005150 80004550 27BDFFD8 */ addiu $sp, $sp, -0x28 /* 005154 80004554 AFA40028 */ sw $a0, 0x28($sp) /* 005158 80004558 AFA5002C */ sw $a1, 0x2c($sp) @@ -4979,7 +4591,7 @@ func_80004550: /* 0051B4 800045B4 ADAF003C */ sw $t7, 0x3c($t5) /* 0051B8 800045B8 8FB80038 */ lw $t8, 0x38($sp) /* 0051BC 800045BC 8FB90028 */ lw $t9, 0x28($sp) -/* 0051C0 800045C0 3C0C8000 */ lui $t4, %hi(D_800042F0) # $t4, 0x8000 +/* 0051C0 800045C0 3C0C8000 */ lui $t4, %hi(func_800042F0) # $t4, 0x8000 /* 0051C4 800045C4 03004825 */ move $t1, $t8 /* 0051C8 800045C8 2D210010 */ sltiu $at, $t1, 0x10 /* 0051CC 800045CC 001847C3 */ sra $t0, $t8, 0x1f @@ -4988,7 +4600,7 @@ func_80004550: /* 0051D8 800045D8 AF2B00F4 */ sw $t3, 0xf4($t9) /* 0051DC 800045DC AF2A00F0 */ sw $t2, 0xf0($t9) /* 0051E0 800045E0 8FAD0028 */ lw $t5, 0x28($sp) -/* 0051E4 800045E4 258C42F0 */ addiu $t4, %lo(D_800042F0) # addiu $t4, $t4, 0x42f0 +/* 0051E4 800045E4 258C42F0 */ addiu $t4, %lo(func_800042F0) # addiu $t4, $t4, 0x42f0 /* 0051E8 800045E8 01807825 */ move $t7, $t4 /* 0051EC 800045EC 000C77C3 */ sra $t6, $t4, 0x1f /* 0051F0 800045F0 ADAE0100 */ sw $t6, 0x100($t5) @@ -5036,19 +4648,19 @@ func_80004550: /* 005294 80004694 00000000 */ nop /* 005298 80004698 00000000 */ nop /* 00529C 8000469C 00000000 */ nop -func_800046A0: +glabel func_800046A0 /* 0052A0 800046A0 40846000 */ mtc0 $a0, $12 /* 0052A4 800046A4 00000000 */ nop /* 0052A8 800046A8 03E00008 */ jr $ra /* 0052AC 800046AC 00000000 */ nop -func_800046B0: +glabel func_800046B0 /* 0052B0 800046B0 40026000 */ mfc0 $v0, $12 /* 0052B4 800046B4 03E00008 */ jr $ra /* 0052B8 800046B8 00000000 */ nop /* 0052BC 800046BC 00000000 */ nop -func_800046C0: +glabel func_800046C0 /* 0052C0 800046C0 18A00011 */ blez $a1, .L80004708 /* 0052C4 800046C4 00000000 */ nop /* 0052C8 800046C8 240B2000 */ li $t3, 8192 @@ -5087,7 +4699,7 @@ func_800046C0: /* 005334 80004734 00000000 */ nop /* 005338 80004738 00000000 */ nop /* 00533C 8000473C 00000000 */ nop -func_80004740: +glabel func_80004740 /* 005340 80004740 27BDFFE0 */ addiu $sp, $sp, -0x20 /* 005344 80004744 AFBF0014 */ sw $ra, 0x14($sp) /* 005348 80004748 0C001CA0 */ jal func_80007280 @@ -5105,7 +4717,7 @@ func_80004740: /* 005378 80004778 00000000 */ nop /* 00537C 8000477C 00000000 */ nop -func_80004780: +glabel func_80004780 /* 005380 80004780 27BDFFD0 */ addiu $sp, $sp, -0x30 /* 005384 80004784 AFB00020 */ sw $s0, 0x20($sp) /* 005388 80004788 3C108001 */ lui $s0, %hi(D_8000AD60) # $s0, 0x8001 @@ -5159,14 +4771,14 @@ func_80004780: /* 005440 80004840 3C0A8001 */ lui $t2, %hi(D_80015870) # $t2, 0x8001 /* 005444 80004844 3C0B8001 */ lui $t3, %hi(D_800145A8) # $t3, 0x8001 /* 005448 80004848 3C0C8000 */ lui $t4, %hi(D_80004D10) # $t4, 0x8000 -/* 00544C 8000484C 3C0D8000 */ lui $t5, %hi(D_800066E0) # $t5, 0x8000 +/* 00544C 8000484C 3C0D8000 */ lui $t5, %hi(func_800066E0) # $t5, 0x8000 /* 005450 80004850 3C0E8001 */ lui $t6, %hi(D_80015870) # $t6, 0x8001 /* 005454 80004854 248446C0 */ addiu $a0, %lo(D_800146C0) # addiu $a0, $a0, 0x46c0 /* 005458 80004858 24080001 */ li $t0, 1 /* 00545C 8000485C 254A5870 */ addiu $t2, %lo(D_80015870) # addiu $t2, $t2, 0x5870 /* 005460 80004860 256B45A8 */ addiu $t3, %lo(D_800145A8) # addiu $t3, $t3, 0x45a8 /* 005464 80004864 258C4D10 */ addiu $t4, %lo(D_80004D10) # addiu $t4, $t4, 0x4d10 -/* 005468 80004868 25AD66E0 */ addiu $t5, %lo(D_800066E0) # addiu $t5, $t5, 0x66e0 +/* 005468 80004868 25AD66E0 */ addiu $t5, %lo(func_800066E0) # addiu $t5, $t5, 0x66e0 /* 00546C 8000486C 25CE5870 */ addiu $t6, %lo(D_80015870) # addiu $t6, $t6, 0x5870 /* 005470 80004870 3C068000 */ lui $a2, %hi(D_80004900) # $a2, 0x8000 /* 005474 80004874 AFA2002C */ sw $v0, 0x2c($sp) @@ -5542,7 +5154,7 @@ D_80004D10: /* 0059D8 80004DD8 00000000 */ nop /* 0059DC 80004DDC 00000000 */ nop -func_80004DE0: +glabel func_80004DE0 /* 0059E0 80004DE0 27BDFFE8 */ addiu $sp, $sp, -0x18 /* 0059E4 80004DE4 AFA40018 */ sw $a0, 0x18($sp) /* 0059E8 80004DE8 8FAE0018 */ lw $t6, 0x18($sp) @@ -5579,7 +5191,7 @@ func_80004DE0: /* 005A58 80004E58 00000000 */ nop /* 005A5C 80004E5C 00000000 */ nop -func_80004E60: +glabel func_80004E60 /* 005A60 80004E60 27BDFFE8 */ addiu $sp, $sp, -0x18 /* 005A64 80004E64 AFBF0014 */ sw $ra, 0x14($sp) /* 005A68 80004E68 0C001CA0 */ jal func_80007280 @@ -5611,7 +5223,7 @@ func_80004E60: /* 005AC4 80004EC4 00000000 */ nop /* 005AC8 80004EC8 00000000 */ nop /* 005ACC 80004ECC 00000000 */ nop -func_80004ED0: +glabel func_80004ED0 /* 005AD0 80004ED0 27BDFFE8 */ addiu $sp, $sp, -0x18 /* 005AD4 80004ED4 AFBF0014 */ sw $ra, 0x14($sp) /* 005AD8 80004ED8 AFA40018 */ sw $a0, 0x18($sp) @@ -5635,7 +5247,7 @@ func_80004ED0: /* 005B18 80004F18 00000000 */ nop /* 005B1C 80004F1C 00000000 */ nop -func_80004F20: +glabel func_80004F20 /* 005B20 80004F20 14800003 */ bnez $a0, .L80004F30 /* 005B24 80004F24 00000000 */ nop /* 005B28 80004F28 3C048001 */ lui $a0, %hi(D_8000AD50) # $a0, 0x8001 @@ -5646,7 +5258,7 @@ func_80004F20: /* 005B38 80004F38 00000000 */ nop /* 005B3C 80004F3C 00000000 */ nop -func_80004F40: +glabel func_80004F40 /* 005B40 80004F40 400C6000 */ mfc0 $t4, $12 /* 005B44 80004F44 3182FF01 */ andi $v0, $t4, 0xff01 /* 005B48 80004F48 3C088001 */ lui $t0, %hi(D_8000AD00) # $t0, 0x8001 @@ -5689,7 +5301,7 @@ func_80004F40: /* 005BD8 80004FD8 03E00008 */ jr $ra /* 005BDC 80004FDC 00000000 */ nop -func_80004FE0: +glabel func_80004FE0 /* 005BE0 80004FE0 27BDFFE8 */ addiu $sp, $sp, -0x18 /* 005BE4 80004FE4 AFBF0014 */ sw $ra, 0x14($sp) /* 005BE8 80004FE8 0C001CA0 */ jal func_80007280 @@ -5715,7 +5327,7 @@ func_80004FE0: /* 005C38 80005038 00000000 */ nop /* 005C3C 8000503C 00000000 */ nop -func_80005040: +glabel func_80005040 /* 005C40 80005040 40085000 */ mfc0 $t0, $10 /* 005C44 80005044 310900FF */ andi $t1, $t0, 0xff /* 005C48 80005048 2401E000 */ li $at, -8192 @@ -5769,7 +5381,7 @@ func_80005040: /* 005CF8 800050F8 00000000 */ nop /* 005CFC 800050FC 00000000 */ nop -func_80005100: +glabel func_80005100 /* 005D00 80005100 27BDFFF0 */ addiu $sp, $sp, -0x10 /* 005D04 80005104 3C0E0040 */ lui $t6, 0x40 /* 005D08 80005108 AFAE0008 */ sw $t6, 8($sp) @@ -5847,7 +5459,7 @@ func_80005100: /* 005E14 80005214 00000000 */ nop /* 005E18 80005218 00000000 */ nop /* 005E1C 8000521C 00000000 */ nop -func_80005220: +glabel func_80005220 /* 005E20 80005220 27BDFFD8 */ addiu $sp, $sp, -0x28 /* 005E24 80005224 AFBF001C */ sw $ra, 0x1c($sp) /* 005E28 80005228 AFA40028 */ sw $a0, 0x28($sp) @@ -5899,7 +5511,7 @@ func_80005220: /* 005ED4 800052D4 00000000 */ nop /* 005ED8 800052D8 00000000 */ nop /* 005EDC 800052DC 00000000 */ nop -func_800052E0: +glabel func_800052E0 /* 005EE0 800052E0 27BDFF28 */ addiu $sp, $sp, -0xd8 /* 005EE4 800052E4 AFB70034 */ sw $s7, 0x34($sp) /* 005EE8 800052E8 AFB60030 */ sw $s6, 0x30($sp) @@ -6364,7 +5976,7 @@ func_800052E0: /* 006520 80005920 03E00008 */ jr $ra /* 006524 80005924 27BD00D8 */ addiu $sp, $sp, 0xd8 -func_80005928: +glabel func_80005928 /* 006528 80005928 27BDFFE0 */ addiu $sp, $sp, -0x20 /* 00652C 8000592C AFB10018 */ sw $s1, 0x18($sp) /* 006530 80005930 AFB00014 */ sw $s0, 0x14($sp) @@ -6828,7 +6440,7 @@ func_80005928: /* 006BB8 80005FB8 00000000 */ nop /* 006BBC 80005FBC 00000000 */ nop -func_80005FC0: +glabel func_80005FC0 /* 006BC0 80005FC0 40085000 */ mfc0 $t0, $10 /* 006BC4 80005FC4 2409001E */ li $t1, 30 /* 006BC8 80005FC8 3C0A8000 */ lui $t2, 0x8000 @@ -6851,7 +6463,7 @@ func_80005FC0: /* 006C04 80006004 00000000 */ nop /* 006C08 80006008 00000000 */ nop /* 006C0C 8000600C 00000000 */ nop -func_80006010: +glabel func_80006010 /* 006C10 80006010 3C0E8001 */ lui $t6, %hi(D_8000AD60) # $t6, 0x8001 /* 006C14 80006014 8DCEAD60 */ lw $t6, %lo(D_8000AD60)($t6) /* 006C18 80006018 27BDFFE8 */ addiu $sp, $sp, -0x18 @@ -6899,7 +6511,7 @@ func_80006010: /* 006CA8 800060A8 00000000 */ nop /* 006CAC 800060AC 00000000 */ nop -func_800060B0: +glabel func_800060B0 /* 006CB0 800060B0 90830000 */ lbu $v1, ($a0) /* 006CB4 800060B4 30AE00FF */ andi $t6, $a1, 0xff /* 006CB8 800060B8 30A200FF */ andi $v0, $a1, 0xff @@ -6921,7 +6533,7 @@ func_800060B0: /* 006CE8 800060E8 03E00008 */ jr $ra /* 006CEC 800060EC 00000000 */ nop -func_800060F0: +glabel func_800060F0 /* 006CF0 800060F0 908E0000 */ lbu $t6, ($a0) /* 006CF4 800060F4 00801825 */ move $v1, $a0 /* 006CF8 800060F8 11C00005 */ beqz $t6, .L80006110 @@ -6935,7 +6547,7 @@ func_800060F0: /* 006D10 80006110 03E00008 */ jr $ra /* 006D14 80006114 00641023 */ subu $v0, $v1, $a0 -func_80006118: +glabel func_80006118 /* 006D18 80006118 00801025 */ move $v0, $a0 /* 006D1C 8000611C 10C00007 */ beqz $a2, .L8000613C /* 006D20 80006120 00A01825 */ move $v1, $a1 @@ -6953,7 +6565,7 @@ func_80006118: /* 006D44 80006144 00000000 */ nop /* 006D48 80006148 00000000 */ nop /* 006D4C 8000614C 00000000 */ nop -func_80006150: +glabel func_80006150 /* 006D50 80006150 18A00011 */ blez $a1, .L80006198 /* 006D54 80006154 00000000 */ nop /* 006D58 80006158 240B4000 */ li $t3, 16384 @@ -6992,7 +6604,7 @@ func_80006150: /* 006DC4 800061C4 00000000 */ nop /* 006DC8 800061C8 00000000 */ nop /* 006DCC 800061CC 00000000 */ nop -func_800061D0: +glabel func_800061D0 /* 006DD0 800061D0 3C0E8001 */ lui $t6, %hi(D_8000AD40) # $t6, 0x8001 /* 006DD4 800061D4 3C0F8001 */ lui $t7, %hi(D_8000AD40) # $t7, 0x8001 /* 006DD8 800061D8 25CEAD40 */ addiu $t6, %lo(D_8000AD40) # addiu $t6, $t6, -0x52c0 @@ -7006,7 +6618,7 @@ func_800061D0: /* 006DF8 800061F8 AC850014 */ sw $a1, 0x14($a0) /* 006DFC 800061FC 00000000 */ nop -func_80006200: +glabel func_80006200 /* 006E00 80006200 18A0001F */ blez $a1, .L80006280 /* 006E04 80006204 00000000 */ nop /* 006E08 80006208 240B2000 */ li $t3, 8192 @@ -7058,7 +6670,7 @@ func_80006200: /* 006EA8 800062A8 00000000 */ nop /* 006EAC 800062AC 00000000 */ nop -func_800062B0: +glabel func_800062B0 /* 006EB0 800062B0 3C0EA480 */ lui $t6, %hi(D_A4800018) # $t6, 0xa480 /* 006EB4 800062B4 8DC20018 */ lw $v0, %lo(D_A4800018)($t6) /* 006EB8 800062B8 304F0003 */ andi $t7, $v0, 3 @@ -7074,7 +6686,7 @@ func_800062B0: /* 006ED4 800062D4 00000000 */ nop /* 006ED8 800062D8 00000000 */ nop /* 006EDC 800062DC 00000000 */ nop -func_800062E0: +glabel func_800062E0 /* 006EE0 800062E0 27BDFFD8 */ addiu $sp, $sp, -0x28 /* 006EE4 800062E4 AFBF001C */ sw $ra, 0x1c($sp) /* 006EE8 800062E8 AFA40028 */ sw $a0, 0x28($sp) @@ -7168,7 +6780,7 @@ func_800062E0: /* 007028 80006428 03E00008 */ jr $ra /* 00702C 8000642C 27BD0028 */ addiu $sp, $sp, 0x28 -func_80006430: +glabel func_80006430 /* 007030 80006430 27BDFFD8 */ addiu $sp, $sp, -0x28 /* 007034 80006434 AFBF001C */ sw $ra, 0x1c($sp) /* 007038 80006438 AFA40028 */ sw $a0, 0x28($sp) @@ -7229,7 +6841,7 @@ func_80006430: /* 007108 80006508 03E00008 */ jr $ra /* 00710C 8000650C 00000000 */ nop -func_80006510: +glabel func_80006510 /* 007110 80006510 14800003 */ bnez $a0, .L80006520 /* 007114 80006514 00000000 */ nop /* 007118 80006518 3C048001 */ lui $a0, %hi(D_8000AD50) # $a0, 0x8001 @@ -7240,7 +6852,7 @@ func_80006510: /* 007128 80006528 00000000 */ nop /* 00712C 8000652C 00000000 */ nop -func_80006530: +glabel func_80006530 /* 007130 80006530 3C03A460 */ lui $v1, (0xA4600010 >> 16) # lui $v1, 0xa460 /* 007134 80006534 34630010 */ ori $v1, (0xA4600010 & 0xFFFF) # ori $v1, $v1, 0x10 /* 007138 80006538 8C620000 */ lw $v0, ($v1) @@ -7342,7 +6954,7 @@ func_80006530: /* 007288 80006688 ACCD0000 */ sw $t5, ($a2) /* 00728C 8000668C 00000000 */ nop -func_80006690: +glabel func_80006690 /* 007290 80006690 27BDFFE8 */ addiu $sp, $sp, -0x18 /* 007294 80006694 AFBF0014 */ sw $ra, 0x14($sp) /* 007298 80006698 0C001CA0 */ jal func_80007280 @@ -7364,7 +6976,7 @@ func_80006690: /* 0072D8 800066D8 00000000 */ nop /* 0072DC 800066DC 00000000 */ nop -D_800066E0: +func_800066E0: /* 0072E0 800066E0 27BDFFE0 */ addiu $sp, $sp, -0x20 /* 0072E4 800066E4 3C03A460 */ lui $v1, %hi(D_A4600008) # $v1, 0xa460 /* 0072E8 800066E8 34630010 */ ori $v1, (0xA4600010 & 0xFFFF) # ori $v1, $v1, 0x10 @@ -7502,7 +7114,7 @@ D_800066E0: /* 0074B8 800068B8 03E00008 */ jr $ra /* 0074BC 800068BC 00000000 */ nop -func_800068C0: +glabel func_800068C0 /* 0074C0 800068C0 28C10010 */ slti $at, $a2, 0x10 /* 0074C4 800068C4 14200037 */ bnez $at, .L800069A4 /* 0074C8 800068C8 00851026 */ xor $v0, $a0, $a1 @@ -7587,7 +7199,7 @@ func_800068C0: /* 0075D8 800069D8 24020001 */ li $v0, 1 /* 0075DC 800069DC 00000000 */ nop -func_800069E0: +glabel func_800069E0 /* 0075E0 800069E0 27BDFFC8 */ addiu $sp, $sp, -0x38 /* 0075E4 800069E4 AFBF001C */ sw $ra, 0x1c($sp) /* 0075E8 800069E8 0C001CA0 */ jal func_80007280 @@ -7625,7 +7237,7 @@ func_800069E0: /* 007664 80006A64 00000000 */ nop /* 007668 80006A68 00000000 */ nop /* 00766C 80006A6C 00000000 */ nop -func_80006A70: +glabel func_80006A70 /* 007670 80006A70 3C018001 */ lui $at, %hi(D_80015AE0) # $at, 0x8001 /* 007674 80006A74 240E0000 */ li $t6, 0 /* 007678 80006A78 240F0000 */ li $t7, 0 @@ -7662,7 +7274,7 @@ func_80006A70: /* 0076F4 80006AF4 03E00008 */ jr $ra /* 0076F8 80006AF8 AF00001C */ sw $zero, 0x1c($t8) -func_80006AFC: +glabel func_80006AFC /* 0076FC 80006AFC 3C0E8001 */ lui $t6, %hi(D_8000ADF0) # $t6, 0x8001 /* 007700 80006B00 8DCEADF0 */ lw $t6, %lo(D_8000ADF0)($t6) /* 007704 80006B04 27BDFFD8 */ addiu $sp, $sp, -0x28 @@ -7765,7 +7377,7 @@ func_80006AFC: /* 00786C 80006C6C 03E00008 */ jr $ra /* 007870 80006C70 00000000 */ nop -func_80006C74: +glabel func_80006C74 /* 007874 80006C74 27BDFFD8 */ addiu $sp, $sp, -0x28 /* 007878 80006C78 AFA40028 */ sw $a0, 0x28($sp) /* 00787C 80006C7C 8FAE0028 */ lw $t6, 0x28($sp) @@ -7808,7 +7420,7 @@ func_80006C74: /* 00790C 80006D0C 03E00008 */ jr $ra /* 007910 80006D10 00000000 */ nop -func_80006D14: +glabel func_80006D14 /* 007914 80006D14 27BDFFC8 */ addiu $sp, $sp, -0x38 /* 007918 80006D18 AFBF0014 */ sw $ra, 0x14($sp) /* 00791C 80006D1C 0C001CA0 */ jal func_80007280 @@ -7912,13 +7524,13 @@ func_80006D14: /* 007A98 80006E98 27BD0038 */ addiu $sp, $sp, 0x38 /* 007A9C 80006E9C 00000000 */ nop -func_80006EA0: +glabel func_80006EA0 /* 007AA0 80006EA0 40024800 */ mfc0 $v0, $9 /* 007AA4 80006EA4 03E00008 */ jr $ra /* 007AA8 80006EA8 00000000 */ nop /* 007AAC 80006EAC 00000000 */ nop -func_80006EB0: +glabel func_80006EB0 /* 007AB0 80006EB0 27BDFFD8 */ addiu $sp, $sp, -0x28 /* 007AB4 80006EB4 AFBF001C */ sw $ra, 0x1c($sp) /* 007AB8 80006EB8 AFA40028 */ sw $a0, 0x28($sp) @@ -7940,13 +7552,13 @@ func_80006EB0: /* 007AF8 80006EF8 00000000 */ nop /* 007AFC 80006EFC 00000000 */ nop -func_80006F00: +glabel func_80006F00 /* 007B00 80006F00 40845800 */ mtc0 $a0, $11 /* 007B04 80006F04 03E00008 */ jr $ra /* 007B08 80006F08 00000000 */ nop /* 007B0C 80006F0C 00000000 */ nop -func_80006F10: +glabel func_80006F10 /* 007B10 80006F10 10C0001A */ beqz $a2, .L80006F7C /* 007B14 80006F14 00A03825 */ move $a3, $a1 /* 007B18 80006F18 10850018 */ beq $a0, $a1, .L80006F7C @@ -8168,7 +7780,7 @@ func_80006F10: /* 007E14 80007214 00000000 */ nop /* 007E18 80007218 00000000 */ nop /* 007E1C 8000721C 00000000 */ nop -func_80007220: +glabel func_80007220 /* 007E20 80007220 27BDFFD8 */ addiu $sp, $sp, -0x28 /* 007E24 80007224 AFBF001C */ sw $ra, 0x1c($sp) /* 007E28 80007228 AFA40028 */ sw $a0, 0x28($sp) @@ -8194,7 +7806,7 @@ func_80007220: /* 007E78 80007278 00000000 */ nop /* 007E7C 8000727C 00000000 */ nop -func_80007280: +glabel func_80007280 /* 007E80 80007280 3C0A8001 */ lui $t2, %hi(D_8000AD00) # $t2, 0x8001 /* 007E84 80007284 254AAD00 */ addiu $t2, %lo(D_8000AD00) # addiu $t2, $t2, -0x5300 /* 007E88 80007288 8D4B0000 */ lw $t3, ($t2) @@ -8225,7 +7837,7 @@ func_80007280: /* 007EE8 800072E8 03E00008 */ jr $ra /* 007EEC 800072EC 00000000 */ nop -func_800072F0: +glabel func_800072F0 /* 007EF0 800072F0 40086000 */ mfc0 $t0, $12 /* 007EF4 800072F4 01044025 */ or $t0, $t0, $a0 /* 007EF8 800072F8 40886000 */ mtc0 $t0, $12 @@ -8235,7 +7847,7 @@ func_800072F0: /* 007F08 80007308 00000000 */ nop /* 007F0C 8000730C 00000000 */ nop -func_80007310: +glabel func_80007310 /* 007F10 80007310 27BDFFE8 */ addiu $sp, $sp, -0x18 /* 007F14 80007314 AFBF0014 */ sw $ra, 0x14($sp) /* 007F18 80007318 3C048001 */ lui $a0, %hi(D_8000AEA0) # $a0, 0x8001 @@ -8314,7 +7926,7 @@ func_80007310: /* 008024 80007424 00000000 */ nop /* 008028 80007428 00000000 */ nop /* 00802C 8000742C 00000000 */ nop -func_80007430: +glabel func_80007430 /* 008030 80007430 27BDFFB8 */ addiu $sp, $sp, -0x48 /* 008034 80007434 AFB00018 */ sw $s0, 0x18($sp) /* 008038 80007438 AFBF001C */ sw $ra, 0x1c($sp) @@ -8520,7 +8132,7 @@ func_80007430: /* 008328 80007728 00000000 */ nop /* 00832C 8000772C 00000000 */ nop -func_80007730: +glabel func_80007730 /* 008330 80007730 3C038001 */ lui $v1, %hi(D_8000AD60) # $v1, 0x8001 /* 008334 80007734 2463AD60 */ addiu $v1, %lo(D_8000AD60) # addiu $v1, $v1, -0x52a0 /* 008338 80007738 8C6E0000 */ lw $t6, ($v1) @@ -8536,7 +8148,7 @@ func_80007730: /* 008358 80007758 00000000 */ nop /* 00835C 8000775C 00000000 */ nop -func_80007760: +glabel func_80007760 /* 008360 80007760 27BDFFE0 */ addiu $sp, $sp, -0x20 /* 008364 80007764 AFBF0014 */ sw $ra, 0x14($sp) /* 008368 80007768 AFA40020 */ sw $a0, 0x20($sp) @@ -8558,7 +8170,7 @@ func_80007760: /* 0083A4 800077A4 00000000 */ nop /* 0083A8 800077A8 00000000 */ nop /* 0083AC 800077AC 00000000 */ nop -func_800077B0: +glabel func_800077B0 /* 0083B0 800077B0 27BDFFE8 */ addiu $sp, $sp, -0x18 /* 0083B4 800077B4 AFBF0014 */ sw $ra, 0x14($sp) /* 0083B8 800077B8 0C001CA0 */ jal func_80007280 @@ -8656,7 +8268,7 @@ func_800077B0: /* 008508 80007908 00000000 */ nop /* 00850C 8000790C 00000000 */ nop -func_80007910: +glabel func_80007910 /* 008510 80007910 27BDFFE0 */ addiu $sp, $sp, -0x20 /* 008514 80007914 AFBF001C */ sw $ra, 0x1c($sp) /* 008518 80007918 0C000BFC */ jal func_80002FF0 @@ -8750,19 +8362,19 @@ func_80007910: /* 008664 80007A64 00000000 */ nop /* 008668 80007A68 00000000 */ nop /* 00866C 80007A6C 00000000 */ nop -func_80007A70: +glabel func_80007A70 /* 008670 80007A70 4442F800 */ cfc1 $v0, $31 /* 008674 80007A74 44C4F800 */ ctc1 $a0, $31 /* 008678 80007A78 03E00008 */ jr $ra /* 00867C 80007A7C 00000000 */ nop -func_80007A80: +glabel func_80007A80 /* 008680 80007A80 4442F800 */ cfc1 $v0, $31 /* 008684 80007A84 03E00008 */ jr $ra /* 008688 80007A88 00000000 */ nop /* 00868C 80007A8C 00000000 */ nop -func_80007A90: +glabel func_80007A90 /* 008690 80007A90 27BDFFE0 */ addiu $sp, $sp, -0x20 /* 008694 80007A94 AFBF0014 */ sw $ra, 0x14($sp) /* 008698 80007A98 AFA40020 */ sw $a0, 0x20($sp) @@ -8784,7 +8396,7 @@ func_80007A90: /* 0086D4 80007AD4 00000000 */ nop /* 0086D8 80007AD8 00000000 */ nop /* 0086DC 80007ADC 00000000 */ nop -func_80007AE0: +glabel func_80007AE0 /* 0086E0 80007AE0 40085000 */ mfc0 $t0, $10 /* 0086E4 80007AE4 2409001F */ li $t1, 31 /* 0086E8 80007AE8 40890000 */ mtc0 $t1, $0 @@ -8810,7 +8422,7 @@ func_80007AE0: /* 008738 80007B38 00000000 */ nop /* 00873C 80007B3C 00000000 */ nop -func_80007B40: +glabel func_80007B40 /* 008740 80007B40 27BDFFD8 */ addiu $sp, $sp, -0x28 /* 008744 80007B44 AFBF001C */ sw $ra, 0x1c($sp) /* 008748 80007B48 0C001CA0 */ jal func_80007280 @@ -8832,13 +8444,13 @@ func_80007B40: /* 008788 80007B88 00000000 */ nop /* 00878C 80007B8C 00000000 */ nop -func_80007B90: +glabel func_80007B90 /* 008790 80007B90 40026800 */ mfc0 $v0, $13 /* 008794 80007B94 03E00008 */ jr $ra /* 008798 80007B98 00000000 */ nop /* 00879C 80007B9C 00000000 */ nop -func_80007BA0: +glabel func_80007BA0 /* 0087A0 80007BA0 3C03A460 */ lui $v1, (0xA4600010 >> 16) # lui $v1, 0xa460 /* 0087A4 80007BA4 34630010 */ ori $v1, (0xA4600010 & 0xFFFF) # ori $v1, $v1, 0x10 /* 0087A8 80007BA8 8C620000 */ lw $v0, ($v1) @@ -8940,7 +8552,7 @@ func_80007BA0: /* 0088F8 80007CF8 00000000 */ nop /* 0088FC 80007CFC 00000000 */ nop -func_80007D00: +glabel func_80007D00 /* 008900 80007D00 27BDFF70 */ addiu $sp, $sp, -0x90 /* 008904 80007D04 AFB10020 */ sw $s1, 0x20($sp) /* 008908 80007D08 30A200FF */ andi $v0, $a1, 0xff @@ -9129,7 +8741,7 @@ func_80007D00: /* 008B98 80007F98 00000000 */ nop /* 008B9C 80007F9C 00000000 */ nop -func_80007FA0: +glabel func_80007FA0 /* 008BA0 80007FA0 00A6001A */ div $zero, $a1, $a2 /* 008BA4 80007FA4 00001012 */ mflo $v0 /* 008BA8 80007FA8 27BDFFF8 */ addiu $sp, $sp, -8 @@ -9156,7 +8768,7 @@ func_80007FA0: /* 008BF4 80007FF4 AFA30004 */ sw $v1, 4($sp) /* 008BF8 80007FF8 24420001 */ addiu $v0, $v0, 1 /* 008BFC 80007FFC 00661823 */ subu $v1, $v1, $a2 -func_80008000: +glabel func_80008000 /* 008C00 80008000 AFA30004 */ sw $v1, 4($sp) /* 008C04 80008004 AFA20000 */ sw $v0, ($sp) .L80008008: @@ -9168,7 +8780,7 @@ func_80008000: /* 008C1C 8000801C 03E00008 */ jr $ra /* 008C20 80008020 AC880004 */ sw $t0, 4($a0) -func_80008024: +glabel func_80008024 /* 008C24 80008024 27BDFFD0 */ addiu $sp, $sp, -0x30 /* 008C28 80008028 AFA40030 */ sw $a0, 0x30($sp) /* 008C2C 8000802C AFBF0014 */ sw $ra, 0x14($sp) @@ -9241,7 +8853,7 @@ func_80008024: /* 008D24 80008124 00000000 */ nop /* 008D28 80008128 00000000 */ nop /* 008D2C 8000812C 00000000 */ nop -func_80008130: +glabel func_80008130 /* 008D30 80008130 27BDFF40 */ addiu $sp, $sp, -0xc0 /* 008D34 80008134 AFBF0044 */ sw $ra, 0x44($sp) /* 008D38 80008138 AFB50040 */ sw $s5, 0x40($sp) @@ -9577,7 +9189,7 @@ func_80008130: /* 0091B8 800085B8 03E00008 */ jr $ra /* 0091BC 800085BC 27BD00C0 */ addiu $sp, $sp, 0xc0 -func_800085C0: +glabel func_800085C0 /* 0091C0 800085C0 94A60000 */ lhu $a2, ($a1) /* 0091C4 800085C4 240107FF */ li $at, 2047 /* 0091C8 800085C8 30C37FF0 */ andi $v1, $a2, 0x7ff0 @@ -9634,7 +9246,7 @@ func_800085C0: /* 009270 80008670 03E00008 */ jr $ra /* 009274 80008674 00000000 */ nop -func_80008678: +glabel func_80008678 /* 009278 80008678 27BDFFE0 */ addiu $sp, $sp, -0x20 /* 00927C 8000867C AFA7002C */ sw $a3, 0x2c($sp) /* 009280 80008680 00077400 */ sll $t6, $a3, 0x10 @@ -10047,7 +9659,7 @@ func_80008678: /* 009838 80008C38 03E00008 */ jr $ra /* 00983C 80008C3C 27BD0020 */ addiu $sp, $sp, 0x20 -func_80008C40: +glabel func_80008C40 /* 009840 80008C40 27BDFFE8 */ addiu $sp, $sp, -0x18 /* 009844 80008C44 AFBF0014 */ sw $ra, 0x14($sp) /* 009848 80008C48 AFA40018 */ sw $a0, 0x18($sp) @@ -10075,7 +9687,7 @@ func_80008C40: /* 009894 80008C94 00000000 */ nop /* 009898 80008C98 00000000 */ nop /* 00989C 80008C9C 00000000 */ nop -func_80008CA0: +glabel func_80008CA0 /* 0098A0 80008CA0 27BDFFD0 */ addiu $sp, $sp, -0x30 /* 0098A4 80008CA4 AFB00020 */ sw $s0, 0x20($sp) /* 0098A8 80008CA8 3C108001 */ lui $s0, %hi(D_8000AFA0) # $s0, 0x8001 @@ -10139,7 +9751,7 @@ func_80008CA0: /* 00998C 80008D8C 24636D30 */ addiu $v1, %lo(D_80016D30) # addiu $v1, $v1, 0x6d30 /* 009990 80008D90 24090001 */ li $t1, 1 /* 009994 80008D94 254A6D30 */ addiu $t2, %lo(D_80016D30) # addiu $t2, $t2, 0x6d30 -/* 009998 80008D98 3C068001 */ lui $a2, %hi(D_80008E20) # $a2, 0x8001 +/* 009998 80008D98 3C068001 */ lui $a2, %hi(func_80008E20) # $a2, 0x8001 /* 00999C 80008D9C AFA2002C */ sw $v0, 0x2c($sp) /* 0099A0 80008DA0 AE090000 */ sw $t1, ($s0) /* 0099A4 80008DA4 AE040004 */ sw $a0, 4($s0) @@ -10148,7 +9760,7 @@ func_80008CA0: /* 0099B0 80008DB0 AE000010 */ sw $zero, 0x10($s0) /* 0099B4 80008DB4 AE000014 */ sw $zero, 0x14($s0) /* 0099B8 80008DB8 AE000018 */ sw $zero, 0x18($s0) -/* 0099BC 80008DBC 24C68E20 */ addiu $a2, %lo(D_80008E20) # addiu $a2, $a2, -0x71e0 +/* 0099BC 80008DBC 24C68E20 */ addiu $a2, %lo(func_80008E20) # addiu $a2, $a2, -0x71e0 /* 0099C0 80008DC0 AFAA0010 */ sw $t2, 0x10($sp) /* 0099C4 80008DC4 00002825 */ move $a1, $zero /* 0099C8 80008DC8 02003825 */ move $a3, $s0 @@ -10175,7 +9787,7 @@ func_80008CA0: /* 009A18 80008E18 03E00008 */ jr $ra /* 009A1C 80008E1C 00000000 */ nop -D_80008E20: +func_80008E20: /* 009A20 80008E20 27BDFFB0 */ addiu $sp, $sp, -0x50 /* 009A24 80008E24 AFBF0034 */ sw $ra, 0x34($sp) /* 009A28 80008E28 AFB70030 */ sw $s7, 0x30($sp) @@ -10284,13 +9896,13 @@ D_80008E20: /* 009BA8 80008FA8 27BD0050 */ addiu $sp, $sp, 0x50 /* 009BAC 80008FAC 00000000 */ nop -func_80008FB0: +glabel func_80008FB0 /* 009BB0 80008FB0 3C028001 */ lui $v0, 0x8001 /* 009BB4 80008FB4 03E00008 */ jr $ra /* 009BB8 80008FB8 8C42AF00 */ lw $v0, -0x5100($v0) /* 009BBC 80008FBC 00000000 */ nop -func_80008FC0: +glabel func_80008FC0 /* 009BC0 80008FC0 27BDFFD8 */ addiu $sp, $sp, -0x28 /* 009BC4 80008FC4 AFBF001C */ sw $ra, 0x1c($sp) /* 009BC8 80008FC8 AFA40028 */ sw $a0, 0x28($sp) @@ -10382,7 +9994,7 @@ func_80008FC0: /* 009D08 80009108 03E00008 */ jr $ra /* 009D0C 8000910C 27BD0028 */ addiu $sp, $sp, 0x28 -func_80009110: +glabel func_80009110 /* 009D10 80009110 27BDFFE8 */ addiu $sp, $sp, -0x18 /* 009D14 80009114 AFBF0014 */ sw $ra, 0x14($sp) /* 009D18 80009118 0C001CA0 */ jal func_80007280 @@ -10404,7 +10016,7 @@ func_80009110: /* 009D58 80009158 00000000 */ nop /* 009D5C 8000915C 00000000 */ nop -func_80009160: +glabel func_80009160 /* 009D60 80009160 27BDFFE8 */ addiu $sp, $sp, -0x18 /* 009D64 80009164 AFBF0014 */ sw $ra, 0x14($sp) /* 009D68 80009168 0C001CA0 */ jal func_80007280 @@ -10520,13 +10132,13 @@ func_80009160: /* 009F08 80009308 ACD90000 */ sw $t9, ($a2) /* 009F0C 8000930C 00000000 */ nop -func_80009310: +glabel func_80009310 /* 009F10 80009310 40849000 */ mtc0 $a0, $18 /* 009F14 80009314 00000000 */ nop /* 009F18 80009318 03E00008 */ jr $ra /* 009F1C 8000931C 00000000 */ nop -D_80009320: +func_80009320: /* 009F20 80009320 09000419 */ j func_84001064 /* 009F24 80009324 20010FC0 */ addi $at, $zero, 0xfc0 @@ -10588,7 +10200,7 @@ D_80009320: /* 009FE8 800093E8 00000000 */ nop /* 009FEC 800093EC 00000000 */ nop -D_800093F0: +func_800093F0: /* 009FF0 800093F0 E80C2001 */ swc2 $12, 0x2001($zero) /* 009FF4 800093F4 34014000 */ ori $at, $zero, 16384 /* 009FF8 800093F8 40812000 */ mtc0 $at, $4 diff --git a/asmdiff.sh b/asmdiff.sh new file mode 100755 index 0000000..eadd528 --- /dev/null +++ b/asmdiff.sh @@ -0,0 +1,7 @@ +#!/bin/bash + +OBJDUMP="$MIPS_BINUTILS/bin/mips64-elf-objdump -D -bbinary -mmips -EB" +OPTIONS="--start-address=$(($1)) --stop-address=$(($1 + $2))" +$OBJDUMP $OPTIONS baserom.z64 > baserom.dump +$OBJDUMP $OPTIONS zelda_ocarina_mq_dbg.z64 > zelda_ocarina_mq_dbg.dump +diff baserom.dump zelda_ocarina_mq_dbg.dump diff --git a/include/ultra64.h b/include/ultra64.h new file mode 100644 index 0000000..1a64ac9 --- /dev/null +++ b/include/ultra64.h @@ -0,0 +1,6 @@ +#ifndef _ULTRA64_H_ +#define _ULTRA64_H_ + +#include "ultra64/types.h" + +#endif diff --git a/include/ultra64/types.h b/include/ultra64/types.h new file mode 100644 index 0000000..2d2248a --- /dev/null +++ b/include/ultra64/types.h @@ -0,0 +1,13 @@ +#ifndef _ULTRA64_TYPES_H_ +#define _ULTRA64_TYPES_H_ + +typedef signed char s8; +typedef unsigned char u8; +typedef signed short int s16; +typedef unsigned short int u16; +typedef signed int s32; +typedef unsigned int u32; +typedef signed long long int s64; +typedef unsigned long long int u64; + +#endif diff --git a/ldscript.txt b/ldscript.txt index 3b063b5..d16f19c 100644 --- a/ldscript.txt +++ b/ldscript.txt @@ -1,3 +1,5 @@ +INCLUDE undefined_syms.txt + MEMORY { ROM : ORIGIN = 0, LENGTH = 0x03600000 @@ -6,7 +8,13 @@ MEMORY SECTIONS { makerom 0x80000000 : { build/baserom/makerom.o(.data); } AT>ROM - boot 0x80000460 : { build/asm/boot.o(.text); } AT>ROM + + boot 0x80000460 : + { + build/src/boot_main.o(.text); + build/asm/boot.o(.text); + } AT>ROM + other : { build/baserom/dmadata.o(.data); diff --git a/src/boot_main.c b/src/boot_main.c new file mode 100644 index 0000000..c1733bd --- /dev/null +++ b/src/boot_main.c @@ -0,0 +1,44 @@ +#include "../include/ultra64.h" + +extern u8 *D_80000318; +extern u8 D_80016DA0[]; +extern u8 D_00016DA0[]; +extern u8 D_80012370[]; +extern u8 D_80012960[]; +extern u8 D_80012D60[]; +extern u8 D_8000AFC0[]; +extern u8 D_80012390[]; +extern u8 D_8000AFC8[]; +extern u8 D_80012540[]; +extern u8 D_80012940[]; +extern u8 D_80012940_[]; // these must be defined separately for the code to match +extern u8 D_80000694[]; +extern int D_80009450; + +extern void func_80004450(); +extern void func_80002660(); +extern void *func_80005100(); + +void func_80000460(void) +{ + func_80004450(D_80016DA0, D_80000318 - D_00016DA0); +} + +void func_80000498(void) +{ + func_80002660(D_80012370, D_80012960, D_80012D60, 0, -1, D_8000AFC0); + + D_80000318 = func_80005100(); + func_80000460(); + func_8000345C(); + func_80003708(); + + D_80009450 = func_80007910(); + func_800023D0(); + func_80002080(); + func_80001E60(); + + func_80002660(D_80012940, D_80012540, D_80012940_, 0, 256, D_8000AFC8); + func_80004550(D_80012390, 1, D_80000694, 0, D_80012940, 10); + func_80008FC0(D_80012390); +} diff --git a/undefined_syms.txt b/undefined_syms.txt new file mode 100644 index 0000000..f2e04bb --- /dev/null +++ b/undefined_syms.txt @@ -0,0 +1,306 @@ +D_00001060 = 0x00001060; +D_00016DA0 = 0x00016DA0; +D_00019030 = 0x00019030; +D_00BCEF30 = 0x00BCEF30; +D_80000004 = 0x80000004; +D_80000008 = 0x80000008; +D_8000000C = 0x8000000C; +D_80000010 = 0x80000010; +D_80000020 = 0x80000020; +D_80000300 = 0x80000300; +D_80000308 = 0x80000308; +D_8000030C = 0x8000030C; +D_80000318 = 0x80000318; +D_8000031C = 0x8000031C; +D_80009430 = 0x80009430; +D_80009434 = 0x80009434; +D_80009438 = 0x80009438; +D_8000943C = 0x8000943C; +D_80009444 = 0x80009444; +D_80009450 = 0x80009450; +D_80009460 = 0x80009460; +D_80009464 = 0x80009464; +D_80009468 = 0x80009468; +D_8000946C = 0x8000946C; +D_8000AC5C = 0x8000AC5C; +D_8000AC60 = 0x8000AC60; +D_8000AC70 = 0x8000AC70; +D_8000AC80 = 0x8000AC80; +D_8000AC84 = 0x8000AC84; +D_8000AC90 = 0x8000AC90; +D_8000ACA0 = 0x8000ACA0; +D_8000ACF0 = 0x8000ACF0; +D_8000ACF4 = 0x8000ACF4; +D_8000ACF8 = 0x8000ACF8; +D_8000ACFC = 0x8000ACFC; +D_8000AD00 = 0x8000AD00; +D_8000AD10 = 0x8000AD10; +D_8000AD38 = 0x8000AD38; +D_8000AD40 = 0x8000AD40; +D_8000AD48 = 0x8000AD48; +D_8000AD4C = 0x8000AD4C; +D_8000AD50 = 0x8000AD50; +D_8000AD54 = 0x8000AD54; +D_8000AD60 = 0x8000AD60; +D_8000AD7C = 0x8000AD7C; +D_8000AD80 = 0x8000AD80; +D_8000AD90 = 0x8000AD90; +D_8000ADA0 = 0x8000ADA0; +D_8000ADC4 = 0x8000ADC4; +D_8000ADF0 = 0x8000ADF0; +D_8000AE00 = 0x8000AE00; +D_8000AE50 = 0x8000AE50; +D_8000AEA0 = 0x8000AEA0; +D_8000AED0 = 0x8000AED0; +D_8000AF00 = 0x8000AF00; +D_8000AF04 = 0x8000AF04; +D_8000AF10 = 0x8000AF10; +D_8000AF20 = 0x8000AF20; +D_8000AF70 = 0x8000AF70; +D_8000AF84 = 0x8000AF84; +D_8000AFA0 = 0x8000AFA0; +D_8000AFBC = 0x8000AFBC; +D_8000AFC0 = 0x8000AFC0; +D_8000AFC8 = 0x8000AFC8; +D_8000AFD0 = 0x8000AFD0; +D_8000AFE0 = 0x8000AFE0; +D_8000AFFC = 0x8000AFFC; +D_8000B008 = 0x8000B008; +D_8000B028 = 0x8000B028; +D_8000B038 = 0x8000B038; +D_8000B058 = 0x8000B058; +D_8000B068 = 0x8000B068; +D_8000B08C = 0x8000B08C; +D_8000B09C = 0x8000B09C; +D_8000B0AC = 0x8000B0AC; +D_8000B0BC = 0x8000B0BC; +D_8000B0C4 = 0x8000B0C4; +D_8000B100 = 0x8000B100; +D_8000B140 = 0x8000B140; +D_8000B168 = 0x8000B168; +D_8000B19C = 0x8000B19C; +D_8000B1CC = 0x8000B1CC; +D_8000B1FC = 0x8000B1FC; +D_8000B22C = 0x8000B22C; +D_8000B230 = 0x8000B230; +D_8000B240 = 0x8000B240; +D_8000B260 = 0x8000B260; +D_8000FFFF = 0x8000FFFF; +D_80010004 = 0x80010004; +D_80010005 = 0x80010005; +D_80010006 = 0x80010006; +D_80010007 = 0x80010007; +D_80010008 = 0x80010008; +D_80010009 = 0x80010009; +D_8001000C = 0x8001000C; +D_80010010 = 0x80010010; +D_80011714 = 0x80011714; +D_80011740 = 0x80011740; +D_80011764 = 0x80011764; +D_80011784 = 0x80011784; +D_800117B0 = 0x800117B0; +D_800117D0 = 0x800117D0; +D_800117E8 = 0x800117E8; +D_800117F8 = 0x800117F8; +D_80011810 = 0x80011810; +D_80011820 = 0x80011820; +D_8001182C = 0x8001182C; +D_8001183C = 0x8001183C; +D_80011868 = 0x80011868; +D_80011870 = 0x80011870; +D_80011874 = 0x80011874; +D_8001187C = 0x8001187C; +D_800118AC = 0x800118AC; +D_800118B0 = 0x800118B0; +D_800118B4 = 0x800118B4; +D_800118C8 = 0x800118C8; +D_800118DC = 0x800118DC; +D_800118E0 = 0x800118E0; +D_800118F4 = 0x800118F4; +D_80011918 = 0x80011918; +D_8001191C = 0x8001191C; +D_8001192C = 0x8001192C; +D_80011930 = 0x80011930; +D_8001193C = 0x8001193C; +D_80011944 = 0x80011944; +D_80011978 = 0x80011978; +D_80011990 = 0x80011990; +D_800119F4 = 0x800119F4; +D_80011A0C = 0x80011A0C; +D_80011A4C = 0x80011A4C; +D_80011A64 = 0x80011A64; +D_80011AC4 = 0x80011AC4; +D_80011AD8 = 0x80011AD8; +D_80011B28 = 0x80011B28; +D_80011B94 = 0x80011B94; +D_80011BB8 = 0x80011BB8; +D_80011BD4 = 0x80011BD4; +D_80011BE8 = 0x80011BE8; +D_80011BEC = 0x80011BEC; +D_80011BF4 = 0x80011BF4; +D_80011C34 = 0x80011C34; +D_80011C44 = 0x80011C44; +D_80011C84 = 0x80011C84; +D_80011C88 = 0x80011C88; +D_80011C98 = 0x80011C98; +D_80011CBC = 0x80011CBC; +D_80011CC0 = 0x80011CC0; +D_80011CFC = 0x80011CFC; +D_80011D0C = 0x80011D0C; +D_80011D20 = 0x80011D20; +D_80011D2C = 0x80011D2C; +D_80011D60 = 0x80011D60; +D_80011D70 = 0x80011D70; +D_80011D74 = 0x80011D74; +D_80011DB0 = 0x80011DB0; +D_80011DE4 = 0x80011DE4; +D_80011E00 = 0x80011E00; +D_80011E20 = 0x80011E20; +D_80011E58 = 0x80011E58; +D_80011E90 = 0x80011E90; +D_80011E98 = 0x80011E98; +D_80011EA0 = 0x80011EA0; +D_80011EA8 = 0x80011EA8; +D_80011EE0 = 0x80011EE0; +D_80011EE8 = 0x80011EE8; +D_80011EF0 = 0x80011EF0; +D_80011F20 = 0x80011F20; +D_80011F50 = 0x80011F50; +D_80011F60 = 0x80011F60; +D_80011FB4 = 0x80011FB4; +D_80011FC0 = 0x80011FC0; +D_80011FC8 = 0x80011FC8; +D_80011FCC = 0x80011FCC; +D_80011FD0 = 0x80011FD0; +D_80011FD4 = 0x80011FD4; +D_80011FD8 = 0x80011FD8; +D_80011FDC = 0x80011FDC; +D_80012008 = 0x80012008; +D_80012040 = 0x80012040; +D_8001206C = 0x8001206C; +D_8001209C = 0x8001209C; +D_800120A8 = 0x800120A8; +D_800120D0 = 0x800120D0; +D_800120E0 = 0x800120E0; +D_80012160 = 0x80012160; +D_800121E0 = 0x800121E0; +D_800121E4 = 0x800121E4; +D_800122E0 = 0x800122E0; +D_80012328 = 0x80012328; +D_80012330 = 0x80012330; +D_80012340 = 0x80012340; +D_80012350 = 0x80012350; +D_80012364 = 0x80012364; +D_80012370 = 0x80012370; +D_80012390 = 0x80012390; +D_80012540 = 0x80012540; +D_80012940 = 0x80012940; +D_80012940_ = 0x80012940; +D_80012960 = 0x80012960; +D_80012D60 = 0x80012D60; +D_80012F10 = 0x80012F10; +D_80013810 = 0x80013810; +D_80013830 = 0x80013830; +D_800138F8 = 0x800138F8; +D_80013900 = 0x80013900; +D_80013910 = 0x80013910; +D_80013960 = 0x80013960; +D_80013970 = 0x80013970; +D_80013990 = 0x80013990; +D_800139A8 = 0x800139A8; +D_80013A28 = 0x80013A28; +D_80013BD8 = 0x80013BD8; +D_800140D8 = 0x800140D8; +D_800140DC = 0x800140DC; +D_800140E0 = 0x800140E0; +D_800144E0 = 0x800144E0; +D_800144E4 = 0x800144E4; +D_800144E8 = 0x800144E8; +D_800144EC = 0x800144EC; +D_80014508 = 0x80014508; +D_8001450C = 0x8001450C; +D_8001450E = 0x8001450E; +D_80014510 = 0x80014510; +D_80014520 = 0x80014520; +D_80014534 = 0x80014534; +D_800145A0 = 0x800145A0; +D_800145A8 = 0x800145A8; +D_800145C0 = 0x800145C0; +D_800145D4 = 0x800145D4; +D_800145D5 = 0x800145D5; +D_800145D6 = 0x800145D6; +D_800145D7 = 0x800145D7; +D_800145D8 = 0x800145D8; +D_8001464C = 0x8001464C; +D_8001464D = 0x8001464D; +D_8001464E = 0x8001464E; +D_80014650 = 0x80014650; +D_800146C0 = 0x800146C0; +D_80015870 = 0x80015870; +D_80015888 = 0x80015888; +D_80015890 = 0x80015890; +D_80015A40 = 0x80015A40; +D_80015AE0 = 0x80015AE0; +D_80015AE4 = 0x80015AE4; +D_80015AE8 = 0x80015AE8; +D_80015AEC = 0x80015AEC; +D_80015AF0 = 0x80015AF0; +D_80015B00 = 0x80015B00; +D_80015B14 = 0x80015B14; +D_80015B80 = 0x80015B80; +D_80016D30 = 0x80016D30; +D_80016D48 = 0x80016D48; +D_80016D60 = 0x80016D60; +D_80016D78 = 0x80016D78; +D_80016D90 = 0x80016D90; +D_80016DA0 = 0x80016DA0; +D_80016DA4 = 0x80016DA4; +D_8001CE60 = 0x8001CE60; +D_80157D90 = 0x80157D90; +D_801668C0 = 0x801668C0; +D_801759C0 = 0x801759C0; +D_801D89E0 = 0x801D89E0; +D_802109E0 = 0x802109E0; +D_A4040010 = 0xA4040010; +D_A4300008 = 0xA4300008; +D_A430000C = 0xA430000C; +D_A4400004 = 0xA4400004; +D_A4400008 = 0xA4400008; +D_A440000C = 0xA440000C; +D_A4400010 = 0xA4400010; +D_A4400014 = 0xA4400014; +D_A4400018 = 0xA4400018; +D_A440001C = 0xA440001C; +D_A4400020 = 0xA4400020; +D_A4400024 = 0xA4400024; +D_A4400028 = 0xA4400028; +D_A440002C = 0xA440002C; +D_A4400030 = 0xA4400030; +D_A4400034 = 0xA4400034; +D_A4500008 = 0xA4500008; +D_A450000C = 0xA450000C; +D_A4500010 = 0xA4500010; +D_A4500014 = 0xA4500014; +D_A4600004 = 0xA4600004; +D_A4600005 = 0xA4600005; +D_A4600006 = 0xA4600006; +D_A4600007 = 0xA4600007; +D_A4600008 = 0xA4600008; +D_A460000C = 0xA460000C; +D_A4600010 = 0xA4600010; +D_A4600014 = 0xA4600014; +D_A4600018 = 0xA4600018; +D_A460001C = 0xA460001C; +D_A4600020 = 0xA4600020; +D_A4600024 = 0xA4600024; +D_A4600028 = 0xA4600028; +D_A460002C = 0xA460002C; +D_A4600030 = 0xA4600030; +D_A4800018 = 0xA4800018; +func_800C6E20 = 0x800C6E20; +func_800D66B4 = 0x800D66B4; +func_800D670C = 0x800D670C; +func_84001008 = 0x84001008; +func_8400103C = 0x8400103C; +func_84001064 = 0x84001064; +func_84001094 = 0x84001094;