papermario/asm/nonmatchings/code_344A10/func_E0034310.s
Ethan Roseman a8e550dd9a yee
2020-10-17 22:27:25 -04:00

292 lines
16 KiB
ArmAsm

.set noat # allow manual use of $at
.set noreorder # don't insert nops after branches
glabel func_E0034310
/* 344D20 E0034310 27BDFEE8 */ addiu $sp, $sp, -0x118
/* 344D24 E0034314 3C03DB06 */ lui $v1, 0xdb06
/* 344D28 E0034318 AFB600F8 */ sw $s6, 0xf8($sp)
/* 344D2C E003431C 3C16800A */ lui $s6, 0x800a
/* 344D30 E0034320 26D6A66C */ addiu $s6, $s6, -0x5994
/* 344D34 E0034324 34630024 */ ori $v1, $v1, 0x24
/* 344D38 E0034328 AFBF0104 */ sw $ra, 0x104($sp)
/* 344D3C E003432C AFBE0100 */ sw $fp, 0x100($sp)
/* 344D40 E0034330 AFB700FC */ sw $s7, 0xfc($sp)
/* 344D44 E0034334 AFB500F4 */ sw $s5, 0xf4($sp)
/* 344D48 E0034338 AFB400F0 */ sw $s4, 0xf0($sp)
/* 344D4C E003433C AFB300EC */ sw $s3, 0xec($sp)
/* 344D50 E0034340 AFB200E8 */ sw $s2, 0xe8($sp)
/* 344D54 E0034344 AFB100E4 */ sw $s1, 0xe4($sp)
/* 344D58 E0034348 AFB000E0 */ sw $s0, 0xe0($sp)
/* 344D5C E003434C F7B60110 */ sdc1 $f22, 0x110($sp)
/* 344D60 E0034350 F7B40108 */ sdc1 $f20, 0x108($sp)
/* 344D64 E0034354 8EC80000 */ lw $t0, ($s6)
/* 344D68 E0034358 8C94000C */ lw $s4, 0xc($a0)
/* 344D6C E003435C 0100102D */ daddu $v0, $t0, $zero
/* 344D70 E0034360 25080008 */ addiu $t0, $t0, 8
/* 344D74 E0034364 8E900000 */ lw $s0, ($s4)
/* 344D78 E0034368 3C0BE700 */ lui $t3, 0xe700
/* 344D7C E003436C AC4B0000 */ sw $t3, ($v0)
/* 344D80 E0034370 AC400004 */ sw $zero, 4($v0)
/* 344D84 E0034374 AD030000 */ sw $v1, ($t0)
/* 344D88 E0034378 8C820010 */ lw $v0, 0x10($a0)
/* 344D8C E003437C 27A40018 */ addiu $a0, $sp, 0x18
/* 344D90 E0034380 AEC80000 */ sw $t0, ($s6)
/* 344D94 E0034384 8C43001C */ lw $v1, 0x1c($v0)
/* 344D98 E0034388 3C0BDE00 */ lui $t3, 0xde00
/* 344D9C E003438C 3C028000 */ lui $v0, 0x8000
/* 344DA0 E0034390 AD0B0008 */ sw $t3, 8($t0)
/* 344DA4 E0034394 00105880 */ sll $t3, $s0, 2
/* 344DA8 E0034398 00621821 */ addu $v1, $v1, $v0
/* 344DAC E003439C AD030004 */ sw $v1, 4($t0)
/* 344DB0 E00343A0 AFAB00D8 */ sw $t3, 0xd8($sp)
/* 344DB4 E00343A4 3C03E003 */ lui $v1, 0xe003
/* 344DB8 E00343A8 006B1821 */ addu $v1, $v1, $t3
/* 344DBC E00343AC 8C634788 */ lw $v1, 0x4788($v1)
/* 344DC0 E00343B0 25020008 */ addiu $v0, $t0, 8
/* 344DC4 E00343B4 AEC20000 */ sw $v0, ($s6)
/* 344DC8 E00343B8 AD03000C */ sw $v1, 0xc($t0)
/* 344DCC E00343BC 8E850004 */ lw $a1, 4($s4)
/* 344DD0 E00343C0 8E860008 */ lw $a2, 8($s4)
/* 344DD4 E00343C4 8E87000C */ lw $a3, 0xc($s4)
/* 344DD8 E00343C8 25080010 */ addiu $t0, $t0, 0x10
/* 344DDC E00343CC 0C080108 */ jal func_E0200420
/* 344DE0 E00343D0 AEC80000 */ sw $t0, ($s6)
/* 344DE4 E00343D4 27B50058 */ addiu $s5, $sp, 0x58
/* 344DE8 E00343D8 4480A000 */ mtc1 $zero, $f20
/* 344DEC E00343DC 3C038007 */ lui $v1, %hi(gCurrentCameraID)
/* 344DF0 E00343E0 8C637410 */ lw $v1, %lo(gCurrentCameraID)($v1)
/* 344DF4 E00343E4 3C013F80 */ lui $at, 0x3f80
/* 344DF8 E00343E8 4481B000 */ mtc1 $at, $f22
/* 344DFC E00343EC 00031080 */ sll $v0, $v1, 2
/* 344E00 E00343F0 00431021 */ addu $v0, $v0, $v1
/* 344E04 E00343F4 00021080 */ sll $v0, $v0, 2
/* 344E08 E00343F8 00431023 */ subu $v0, $v0, $v1
/* 344E0C E00343FC 000218C0 */ sll $v1, $v0, 3
/* 344E10 E0034400 00431021 */ addu $v0, $v0, $v1
/* 344E14 E0034404 000210C0 */ sll $v0, $v0, 3
/* 344E18 E0034408 4406A000 */ mfc1 $a2, $f20
/* 344E1C E003440C 3C01800B */ lui $at, 0x800b
/* 344E20 E0034410 00220821 */ addu $at, $at, $v0
/* 344E24 E0034414 C4201DEC */ lwc1 $f0, 0x1dec($at)
/* 344E28 E0034418 4407B000 */ mfc1 $a3, $f22
/* 344E2C E003441C 46000007 */ neg.s $f0, $f0
/* 344E30 E0034420 44050000 */ mfc1 $a1, $f0
/* 344E34 E0034424 02A0202D */ daddu $a0, $s5, $zero
/* 344E38 E0034428 0C080104 */ jal func_E0200410
/* 344E3C E003442C E7B40010 */ swc1 $f20, 0x10($sp)
/* 344E40 E0034430 02A0202D */ daddu $a0, $s5, $zero
/* 344E44 E0034434 27A50018 */ addiu $a1, $sp, 0x18
/* 344E48 E0034438 27BE0098 */ addiu $fp, $sp, 0x98
/* 344E4C E003443C 0C080114 */ jal func_E0200450
/* 344E50 E0034440 03C0302D */ daddu $a2, $fp, $zero
/* 344E54 E0034444 8E830030 */ lw $v1, 0x30($s4)
/* 344E58 E0034448 8E970028 */ lw $s7, 0x28($s4)
/* 344E5C E003444C 00031040 */ sll $v0, $v1, 1
/* 344E60 E0034450 16000054 */ bnez $s0, .LE00345A4
/* 344E64 E0034454 00439821 */ addu $s3, $v0, $v1
/* 344E68 E0034458 02A0202D */ daddu $a0, $s5, $zero
/* 344E6C E003445C 3C120001 */ lui $s2, 1
/* 344E70 E0034460 8E850020 */ lw $a1, 0x20($s4)
/* 344E74 E0034464 36521630 */ ori $s2, $s2, 0x1630
/* 344E78 E0034468 00A0302D */ daddu $a2, $a1, $zero
/* 344E7C E003446C 0C080110 */ jal func_E0200440
/* 344E80 E0034470 00A0382D */ daddu $a3, $a1, $zero
/* 344E84 E0034474 02A0202D */ daddu $a0, $s5, $zero
/* 344E88 E0034478 03C0282D */ daddu $a1, $fp, $zero
/* 344E8C E003447C 0C080114 */ jal func_E0200450
/* 344E90 E0034480 27A60018 */ addiu $a2, $sp, 0x18
/* 344E94 E0034484 27A40018 */ addiu $a0, $sp, 0x18
/* 344E98 E0034488 3C108007 */ lui $s0, 0x8007
/* 344E9C E003448C 261041F0 */ addiu $s0, $s0, 0x41f0
/* 344EA0 E0034490 3C11800A */ lui $s1, 0x800a
/* 344EA4 E0034494 2631A674 */ addiu $s1, $s1, -0x598c
/* 344EA8 E0034498 96050000 */ lhu $a1, ($s0)
/* 344EAC E003449C 8E220000 */ lw $v0, ($s1)
/* 344EB0 E00344A0 00052980 */ sll $a1, $a1, 6
/* 344EB4 E00344A4 00B22821 */ addu $a1, $a1, $s2
/* 344EB8 E00344A8 0C080118 */ jal func_E0200460
/* 344EBC E00344AC 00452821 */ addu $a1, $v0, $a1
/* 344EC0 E00344B0 3C022AAA */ lui $v0, 0x2aaa
/* 344EC4 E00344B4 3442AAAB */ ori $v0, $v0, 0xaaab
/* 344EC8 E00344B8 3C09D838 */ lui $t1, 0xd838
/* 344ECC E00344BC 35290002 */ ori $t1, $t1, 2
/* 344ED0 E00344C0 02620018 */ mult $s3, $v0
/* 344ED4 E00344C4 8EC50000 */ lw $a1, ($s6)
/* 344ED8 E00344C8 3C02FA00 */ lui $v0, 0xfa00
/* 344EDC E00344CC 00A0402D */ daddu $t0, $a1, $zero
/* 344EE0 E00344D0 24A50008 */ addiu $a1, $a1, 8
/* 344EE4 E00344D4 AEC50000 */ sw $a1, ($s6)
/* 344EE8 E00344D8 AD020000 */ sw $v0, ($t0)
/* 344EEC E00344DC 001317C3 */ sra $v0, $s3, 0x1f
/* 344EF0 E00344E0 96040000 */ lhu $a0, ($s0)
/* 344EF4 E00344E4 00005810 */ mfhi $t3
/* 344EF8 E00344E8 000B1883 */ sra $v1, $t3, 2
/* 344EFC E00344EC 00621823 */ subu $v1, $v1, $v0
/* 344F00 E00344F0 00031040 */ sll $v0, $v1, 1
/* 344F04 E00344F4 00431021 */ addu $v0, $v0, $v1
/* 344F08 E00344F8 000210C0 */ sll $v0, $v0, 3
/* 344F0C E00344FC 02629823 */ subu $s3, $s3, $v0
/* 344F10 E0034500 3C03E003 */ lui $v1, 0xe003
/* 344F14 E0034504 00731821 */ addu $v1, $v1, $s3
/* 344F18 E0034508 90634790 */ lbu $v1, 0x4790($v1)
/* 344F1C E003450C 3C06E003 */ lui $a2, 0xe003
/* 344F20 E0034510 00D33021 */ addu $a2, $a2, $s3
/* 344F24 E0034514 90C64791 */ lbu $a2, 0x4791($a2)
/* 344F28 E0034518 3C07E003 */ lui $a3, 0xe003
/* 344F2C E003451C 00F33821 */ addu $a3, $a3, $s3
/* 344F30 E0034520 90E74792 */ lbu $a3, 0x4792($a3)
/* 344F34 E0034524 24A20008 */ addiu $v0, $a1, 8
/* 344F38 E0034528 AEC20000 */ sw $v0, ($s6)
/* 344F3C E003452C 24820001 */ addiu $v0, $a0, 1
/* 344F40 E0034530 A6020000 */ sh $v0, ($s0)
/* 344F44 E0034534 24A20010 */ addiu $v0, $a1, 0x10
/* 344F48 E0034538 AEC20000 */ sw $v0, ($s6)
/* 344F4C E003453C 32E200FF */ andi $v0, $s7, 0xff
/* 344F50 E0034540 3084FFFF */ andi $a0, $a0, 0xffff
/* 344F54 E0034544 00042180 */ sll $a0, $a0, 6
/* 344F58 E0034548 00922021 */ addu $a0, $a0, $s2
/* 344F5C E003454C 00031E00 */ sll $v1, $v1, 0x18
/* 344F60 E0034550 00063400 */ sll $a2, $a2, 0x10
/* 344F64 E0034554 00661825 */ or $v1, $v1, $a2
/* 344F68 E0034558 00073A00 */ sll $a3, $a3, 8
/* 344F6C E003455C 00671825 */ or $v1, $v1, $a3
/* 344F70 E0034560 00621825 */ or $v1, $v1, $v0
/* 344F74 E0034564 3C02DA38 */ lui $v0, 0xda38
/* 344F78 E0034568 AD030004 */ sw $v1, 4($t0)
/* 344F7C E003456C ACA20000 */ sw $v0, ($a1)
/* 344F80 E0034570 8E220000 */ lw $v0, ($s1)
/* 344F84 E0034574 3C0BDE00 */ lui $t3, 0xde00
/* 344F88 E0034578 ACAB0008 */ sw $t3, 8($a1)
/* 344F8C E003457C 00441021 */ addu $v0, $v0, $a0
/* 344F90 E0034580 ACA20004 */ sw $v0, 4($a1)
/* 344F94 E0034584 3C03E003 */ lui $v1, 0xe003
/* 344F98 E0034588 8C634780 */ lw $v1, 0x4780($v1)
/* 344F9C E003458C 24A20018 */ addiu $v0, $a1, 0x18
/* 344FA0 E0034590 AEC20000 */ sw $v0, ($s6)
/* 344FA4 E0034594 24020040 */ addiu $v0, $zero, 0x40
/* 344FA8 E0034598 ACA90010 */ sw $t1, 0x10($a1)
/* 344FAC E003459C ACA20014 */ sw $v0, 0x14($a1)
/* 344FB0 E00345A0 ACA3000C */ sw $v1, 0xc($a1)
.LE00345A4:
/* 344FB4 E00345A4 8E970024 */ lw $s7, 0x24($s4)
/* 344FB8 E00345A8 2AE20100 */ slti $v0, $s7, 0x100
/* 344FBC E00345AC 50400001 */ beql $v0, $zero, .LE00345B4
/* 344FC0 E00345B0 241700FF */ addiu $s7, $zero, 0xff
.LE00345B4:
/* 344FC4 E00345B4 1AE0005A */ blez $s7, .LE0034720
/* 344FC8 E00345B8 02A0202D */ daddu $a0, $s5, $zero
/* 344FCC E00345BC 3C120001 */ lui $s2, 1
/* 344FD0 E00345C0 8E850018 */ lw $a1, 0x18($s4)
/* 344FD4 E00345C4 36521630 */ ori $s2, $s2, 0x1630
/* 344FD8 E00345C8 00A0302D */ daddu $a2, $a1, $zero
/* 344FDC E00345CC 0C080110 */ jal func_E0200440
/* 344FE0 E00345D0 00A0382D */ daddu $a3, $a1, $zero
/* 344FE4 E00345D4 02A0202D */ daddu $a0, $s5, $zero
/* 344FE8 E00345D8 03C0282D */ daddu $a1, $fp, $zero
/* 344FEC E00345DC 0C080114 */ jal func_E0200450
/* 344FF0 E00345E0 27A60018 */ addiu $a2, $sp, 0x18
/* 344FF4 E00345E4 4406A000 */ mfc1 $a2, $f20
/* 344FF8 E00345E8 02A0202D */ daddu $a0, $s5, $zero
/* 344FFC E00345EC E7B60010 */ swc1 $f22, 0x10($sp)
/* 345000 E00345F0 8E850010 */ lw $a1, 0x10($s4)
/* 345004 E00345F4 0C080104 */ jal func_E0200410
/* 345008 E00345F8 00C0382D */ daddu $a3, $a2, $zero
/* 34500C E00345FC 02A0202D */ daddu $a0, $s5, $zero
/* 345010 E0034600 27A50018 */ addiu $a1, $sp, 0x18
/* 345014 E0034604 0C080114 */ jal func_E0200450
/* 345018 E0034608 00A0302D */ daddu $a2, $a1, $zero
/* 34501C E003460C 27A40018 */ addiu $a0, $sp, 0x18
/* 345020 E0034610 3C108007 */ lui $s0, 0x8007
/* 345024 E0034614 261041F0 */ addiu $s0, $s0, 0x41f0
/* 345028 E0034618 3C11800A */ lui $s1, 0x800a
/* 34502C E003461C 2631A674 */ addiu $s1, $s1, -0x598c
/* 345030 E0034620 96050000 */ lhu $a1, ($s0)
/* 345034 E0034624 8E220000 */ lw $v0, ($s1)
/* 345038 E0034628 00052980 */ sll $a1, $a1, 6
/* 34503C E003462C 00B22821 */ addu $a1, $a1, $s2
/* 345040 E0034630 0C080118 */ jal func_E0200460
/* 345044 E0034634 00452821 */ addu $a1, $v0, $a1
/* 345048 E0034638 3C0AD838 */ lui $t2, 0xd838
/* 34504C E003463C 8EC50000 */ lw $a1, ($s6)
/* 345050 E0034640 3C08FA00 */ lui $t0, 0xfa00
/* 345054 E0034644 00A0482D */ daddu $t1, $a1, $zero
/* 345058 E0034648 24A50008 */ addiu $a1, $a1, 8
/* 34505C E003464C AEC50000 */ sw $a1, ($s6)
/* 345060 E0034650 AD280000 */ sw $t0, ($t1)
/* 345064 E0034654 3C04E003 */ lui $a0, 0xe003
/* 345068 E0034658 00932021 */ addu $a0, $a0, $s3
/* 34506C E003465C 90844790 */ lbu $a0, 0x4790($a0)
/* 345070 E0034660 3C03E003 */ lui $v1, 0xe003
/* 345074 E0034664 00731821 */ addu $v1, $v1, $s3
/* 345078 E0034668 90634791 */ lbu $v1, 0x4791($v1)
/* 34507C E003466C 3C07E003 */ lui $a3, 0xe003
/* 345080 E0034670 00F33821 */ addu $a3, $a3, $s3
/* 345084 E0034674 90E74792 */ lbu $a3, 0x4792($a3)
/* 345088 E0034678 24A20008 */ addiu $v0, $a1, 8
/* 34508C E003467C AEC20000 */ sw $v0, ($s6)
/* 345090 E0034680 96060000 */ lhu $a2, ($s0)
/* 345094 E0034684 24A20010 */ addiu $v0, $a1, 0x10
/* 345098 E0034688 AEC20000 */ sw $v0, ($s6)
/* 34509C E003468C 24C20001 */ addiu $v0, $a2, 1
/* 3450A0 E0034690 A6020000 */ sh $v0, ($s0)
/* 3450A4 E0034694 24A20018 */ addiu $v0, $a1, 0x18
/* 3450A8 E0034698 00042600 */ sll $a0, $a0, 0x18
/* 3450AC E003469C 00031C00 */ sll $v1, $v1, 0x10
/* 3450B0 E00346A0 00832025 */ or $a0, $a0, $v1
/* 3450B4 E00346A4 00073A00 */ sll $a3, $a3, 8
/* 3450B8 E00346A8 00872025 */ or $a0, $a0, $a3
/* 3450BC E00346AC 32E300FF */ andi $v1, $s7, 0xff
/* 3450C0 E00346B0 00832025 */ or $a0, $a0, $v1
/* 3450C4 E00346B4 AEC20000 */ sw $v0, ($s6)
/* 3450C8 E00346B8 2402FF00 */ addiu $v0, $zero, -0x100
/* 3450CC E00346BC 00621825 */ or $v1, $v1, $v0
/* 3450D0 E00346C0 3C02DA38 */ lui $v0, 0xda38
/* 3450D4 E00346C4 30C6FFFF */ andi $a2, $a2, 0xffff
/* 3450D8 E00346C8 00063180 */ sll $a2, $a2, 6
/* 3450DC E00346CC 00D23021 */ addu $a2, $a2, $s2
/* 3450E0 E00346D0 AD240004 */ sw $a0, 4($t1)
/* 3450E4 E00346D4 ACA80000 */ sw $t0, ($a1)
/* 3450E8 E00346D8 ACA30004 */ sw $v1, 4($a1)
/* 3450EC E00346DC ACA20008 */ sw $v0, 8($a1)
/* 3450F0 E00346E0 8E220000 */ lw $v0, ($s1)
/* 3450F4 E00346E4 3C0BDE00 */ lui $t3, 0xde00
/* 3450F8 E00346E8 ACAB0010 */ sw $t3, 0x10($a1)
/* 3450FC E00346EC 00461021 */ addu $v0, $v0, $a2
/* 345100 E00346F0 ACA2000C */ sw $v0, 0xc($a1)
/* 345104 E00346F4 8FAB00D8 */ lw $t3, 0xd8($sp)
/* 345108 E00346F8 354A0002 */ ori $t2, $t2, 2
/* 34510C E00346FC 3C03E003 */ lui $v1, 0xe003
/* 345110 E0034700 006B1821 */ addu $v1, $v1, $t3
/* 345114 E0034704 8C634780 */ lw $v1, 0x4780($v1)
/* 345118 E0034708 24A20020 */ addiu $v0, $a1, 0x20
/* 34511C E003470C AEC20000 */ sw $v0, ($s6)
/* 345120 E0034710 24020040 */ addiu $v0, $zero, 0x40
/* 345124 E0034714 ACAA0018 */ sw $t2, 0x18($a1)
/* 345128 E0034718 ACA2001C */ sw $v0, 0x1c($a1)
/* 34512C E003471C ACA30014 */ sw $v1, 0x14($a1)
.LE0034720:
/* 345130 E0034720 8EC20000 */ lw $v0, ($s6)
/* 345134 E0034724 0040182D */ daddu $v1, $v0, $zero
/* 345138 E0034728 24420008 */ addiu $v0, $v0, 8
/* 34513C E003472C 3C0BE700 */ lui $t3, 0xe700
/* 345140 E0034730 AEC20000 */ sw $v0, ($s6)
/* 345144 E0034734 AC6B0000 */ sw $t3, ($v1)
/* 345148 E0034738 AC600004 */ sw $zero, 4($v1)
/* 34514C E003473C 8FBF0104 */ lw $ra, 0x104($sp)
/* 345150 E0034740 8FBE0100 */ lw $fp, 0x100($sp)
/* 345154 E0034744 8FB700FC */ lw $s7, 0xfc($sp)
/* 345158 E0034748 8FB600F8 */ lw $s6, 0xf8($sp)
/* 34515C E003474C 8FB500F4 */ lw $s5, 0xf4($sp)
/* 345160 E0034750 8FB400F0 */ lw $s4, 0xf0($sp)
/* 345164 E0034754 8FB300EC */ lw $s3, 0xec($sp)
/* 345168 E0034758 8FB200E8 */ lw $s2, 0xe8($sp)
/* 34516C E003475C 8FB100E4 */ lw $s1, 0xe4($sp)
/* 345170 E0034760 8FB000E0 */ lw $s0, 0xe0($sp)
/* 345174 E0034764 D7B60110 */ ldc1 $f22, 0x110($sp)
/* 345178 E0034768 D7B40108 */ ldc1 $f20, 0x108($sp)
/* 34517C E003476C 03E00008 */ jr $ra
/* 345180 E0034770 27BD0118 */ addiu $sp, $sp, 0x118
/* 345184 E0034774 00000000 */ nop
/* 345188 E0034778 00000000 */ nop
/* 34518C E003477C 00000000 */ nop