papermario/asm/nonmatchings/code_355EE0/func_E00462C0.s
2021-01-11 21:40:52 +09:00

217 lines
12 KiB
ArmAsm
Generated

.set noat # allow manual use of $at
.set noreorder # don't insert nops after branches
glabel func_E00462C0
/* 3561A0 E00462C0 27BDFF48 */ addiu $sp, $sp, -0xb8
/* 3561A4 E00462C4 3C05DB06 */ lui $a1, 0xdb06
/* 3561A8 E00462C8 3C09800A */ lui $t1, %hi(gMasterGfxPos)
/* 3561AC E00462CC 2529A66C */ addiu $t1, $t1, %lo(gMasterGfxPos)
/* 3561B0 E00462D0 34A50024 */ ori $a1, $a1, 0x24
/* 3561B4 E00462D4 3C02E700 */ lui $v0, 0xe700
/* 3561B8 E00462D8 AFBF00B4 */ sw $ra, 0xb4($sp)
/* 3561BC E00462DC AFB400B0 */ sw $s4, 0xb0($sp)
/* 3561C0 E00462E0 AFB300AC */ sw $s3, 0xac($sp)
/* 3561C4 E00462E4 AFB200A8 */ sw $s2, 0xa8($sp)
/* 3561C8 E00462E8 AFB100A4 */ sw $s1, 0xa4($sp)
/* 3561CC E00462EC AFB000A0 */ sw $s0, 0xa0($sp)
/* 3561D0 E00462F0 8D280000 */ lw $t0, ($t1)
/* 3561D4 E00462F4 8C93000C */ lw $s3, 0xc($a0)
/* 3561D8 E00462F8 0100182D */ daddu $v1, $t0, $zero
/* 3561DC E00462FC 8E74001C */ lw $s4, 0x1c($s3)
/* 3561E0 E0046300 25080008 */ addiu $t0, $t0, 8
/* 3561E4 E0046304 AC620000 */ sw $v0, ($v1)
/* 3561E8 E0046308 AC600004 */ sw $zero, 4($v1)
/* 3561EC E004630C AD050000 */ sw $a1, ($t0)
/* 3561F0 E0046310 8C820010 */ lw $v0, 0x10($a0)
/* 3561F4 E0046314 AD280000 */ sw $t0, ($t1)
/* 3561F8 E0046318 8C42001C */ lw $v0, 0x1c($v0)
/* 3561FC E004631C 3C038000 */ lui $v1, 0x8000
/* 356200 E0046320 00431021 */ addu $v0, $v0, $v1
/* 356204 E0046324 AD020004 */ sw $v0, 4($t0)
/* 356208 E0046328 C6620008 */ lwc1 $f2, 8($s3)
/* 35620C E004632C C6600024 */ lwc1 $f0, 0x24($s3)
/* 356210 E0046330 25020008 */ addiu $v0, $t0, 8
/* 356214 E0046334 4602003E */ c.le.s $f0, $f2
/* 356218 E0046338 00000000 */ nop
/* 35621C E004633C 45000032 */ bc1f .LE0046408
/* 356220 E0046340 AD220000 */ sw $v0, ($t1)
/* 356224 E0046344 3C047F7F */ lui $a0, 0x7f7f
/* 356228 E0046348 25020010 */ addiu $v0, $t0, 0x10
/* 35622C E004634C AD220000 */ sw $v0, ($t1)
/* 356230 E0046350 3C02DE00 */ lui $v0, 0xde00
/* 356234 E0046354 AD020008 */ sw $v0, 8($t0)
/* 356238 E0046358 25020018 */ addiu $v0, $t0, 0x18
/* 35623C E004635C AD220000 */ sw $v0, ($t1)
/* 356240 E0046360 3C02FA00 */ lui $v0, 0xfa00
/* 356244 E0046364 3C03E004 */ lui $v1, %hi(D_E0046614)
/* 356248 E0046368 8C636614 */ lw $v1, %lo(D_E0046614)($v1)
/* 35624C E004636C 34847F00 */ ori $a0, $a0, 0x7f00
/* 356250 E0046370 AD020010 */ sw $v0, 0x10($t0)
/* 356254 E0046374 AD03000C */ sw $v1, 0xc($t0)
/* 356258 E0046378 92620017 */ lbu $v0, 0x17($s3)
/* 35625C E004637C 3C05F200 */ lui $a1, 0xf200
/* 356260 E0046380 00441025 */ or $v0, $v0, $a0
/* 356264 E0046384 AD020014 */ sw $v0, 0x14($t0)
/* 356268 E0046388 8E630020 */ lw $v1, 0x20($s3)
/* 35626C E004638C 27A40020 */ addiu $a0, $sp, 0x20
/* 356270 E0046390 00031080 */ sll $v0, $v1, 2
/* 356274 E0046394 30420FFF */ andi $v0, $v0, 0xfff
/* 356278 E0046398 00451025 */ or $v0, $v0, $a1
/* 35627C E004639C 3C050008 */ lui $a1, 8
/* 356280 E00463A0 24630020 */ addiu $v1, $v1, 0x20
/* 356284 E00463A4 00031880 */ sll $v1, $v1, 2
/* 356288 E00463A8 30630FFF */ andi $v1, $v1, 0xfff
/* 35628C E00463AC AD020018 */ sw $v0, 0x18($t0)
/* 356290 E00463B0 3C020100 */ lui $v0, 0x100
/* 356294 E00463B4 00621825 */ or $v1, $v1, $v0
/* 356298 E00463B8 00651825 */ or $v1, $v1, $a1
/* 35629C E00463BC AD03001C */ sw $v1, 0x1c($t0)
/* 3562A0 E00463C0 8E650004 */ lw $a1, 4($s3)
/* 3562A4 E00463C4 8E660008 */ lw $a2, 8($s3)
/* 3562A8 E00463C8 8E67000C */ lw $a3, 0xc($s3)
/* 3562AC E00463CC 25020020 */ addiu $v0, $t0, 0x20
/* 3562B0 E00463D0 0C080108 */ jal func_E0200420
/* 3562B4 E00463D4 AD220000 */ sw $v0, ($t1)
/* 3562B8 E00463D8 27B00060 */ addiu $s0, $sp, 0x60
/* 3562BC E00463DC 0200202D */ daddu $a0, $s0, $zero
/* 3562C0 E00463E0 8E650010 */ lw $a1, 0x10($s3)
/* 3562C4 E00463E4 3C063F80 */ lui $a2, 0x3f80
/* 3562C8 E00463E8 0C080110 */ jal func_E0200440
/* 3562CC E00463EC 00A0382D */ daddu $a3, $a1, $zero
/* 3562D0 E00463F0 0200202D */ daddu $a0, $s0, $zero
/* 3562D4 E00463F4 27A50020 */ addiu $a1, $sp, 0x20
/* 3562D8 E00463F8 0C080114 */ jal func_E0200450
/* 3562DC E00463FC 00A0302D */ daddu $a2, $a1, $zero
/* 3562E0 E0046400 08011936 */ j .LE00464D8
/* 3562E4 E0046404 3C120001 */ lui $s2, 1
.LE0046408:
/* 3562E8 E0046408 3C048080 */ lui $a0, 0x8080
/* 3562EC E004640C 3484FF00 */ ori $a0, $a0, 0xff00
/* 3562F0 E0046410 44800000 */ mtc1 $zero, $f0
/* 3562F4 E0046414 25020010 */ addiu $v0, $t0, 0x10
/* 3562F8 E0046418 AD220000 */ sw $v0, ($t1)
/* 3562FC E004641C 3C02DE00 */ lui $v0, 0xde00
/* 356300 E0046420 AD020008 */ sw $v0, 8($t0)
/* 356304 E0046424 25020018 */ addiu $v0, $t0, 0x18
/* 356308 E0046428 AD220000 */ sw $v0, ($t1)
/* 35630C E004642C 3C03E004 */ lui $v1, %hi(D_E0046618)
/* 356310 E0046430 8C636618 */ lw $v1, %lo(D_E0046618)($v1)
/* 356314 E0046434 3C02FA00 */ lui $v0, 0xfa00
/* 356318 E0046438 AD020010 */ sw $v0, 0x10($t0)
/* 35631C E004643C AD03000C */ sw $v1, 0xc($t0)
/* 356320 E0046440 92630017 */ lbu $v1, 0x17($s3)
/* 356324 E0046444 25020020 */ addiu $v0, $t0, 0x20
/* 356328 E0046448 AD220000 */ sw $v0, ($t1)
/* 35632C E004644C 3C02FB00 */ lui $v0, 0xfb00
/* 356330 E0046450 AD020018 */ sw $v0, 0x18($t0)
/* 356334 E0046454 2402FF00 */ addiu $v0, $zero, -0x100
/* 356338 E0046458 44050000 */ mfc1 $a1, $f0
/* 35633C E004645C 00621825 */ or $v1, $v1, $v0
/* 356340 E0046460 AD030014 */ sw $v1, 0x14($t0)
/* 356344 E0046464 92620017 */ lbu $v0, 0x17($s3)
/* 356348 E0046468 3C038007 */ lui $v1, %hi(gCurrentCameraID)
/* 35634C E004646C 8C637410 */ lw $v1, %lo(gCurrentCameraID)($v1)
/* 356350 E0046470 00441025 */ or $v0, $v0, $a0
/* 356354 E0046474 AD02001C */ sw $v0, 0x1c($t0)
/* 356358 E0046478 00031080 */ sll $v0, $v1, 2
/* 35635C E004647C 00431021 */ addu $v0, $v0, $v1
/* 356360 E0046480 00021080 */ sll $v0, $v0, 2
/* 356364 E0046484 00431023 */ subu $v0, $v0, $v1
/* 356368 E0046488 000218C0 */ sll $v1, $v0, 3
/* 35636C E004648C 00431021 */ addu $v0, $v0, $v1
/* 356370 E0046490 000210C0 */ sll $v0, $v0, 3
/* 356374 E0046494 3C01800B */ lui $at, %hi(D_800B1DEC)
/* 356378 E0046498 00220821 */ addu $at, $at, $v0
/* 35637C E004649C C4221DEC */ lwc1 $f2, %lo(D_800B1DEC)($at)
/* 356380 E00464A0 C6600010 */ lwc1 $f0, 0x10($s3)
/* 356384 E00464A4 46001087 */ neg.s $f2, $f2
/* 356388 E00464A8 E7A00010 */ swc1 $f0, 0x10($sp)
/* 35638C E00464AC C6600004 */ lwc1 $f0, 4($s3)
/* 356390 E00464B0 44061000 */ mfc1 $a2, $f2
/* 356394 E00464B4 E7A00014 */ swc1 $f0, 0x14($sp)
/* 356398 E00464B8 C6600008 */ lwc1 $f0, 8($s3)
/* 35639C E00464BC 00A0382D */ daddu $a3, $a1, $zero
/* 3563A0 E00464C0 E7A00018 */ swc1 $f0, 0x18($sp)
/* 3563A4 E00464C4 C660000C */ lwc1 $f0, 0xc($s3)
/* 3563A8 E00464C8 27A40020 */ addiu $a0, $sp, 0x20
/* 3563AC E00464CC 0C080180 */ jal func_E0200600
/* 3563B0 E00464D0 E7A0001C */ swc1 $f0, 0x1c($sp)
/* 3563B4 E00464D4 3C120001 */ lui $s2, 1
.LE00464D8:
/* 3563B8 E00464D8 36521630 */ ori $s2, $s2, 0x1630
/* 3563BC E00464DC 27A40020 */ addiu $a0, $sp, 0x20
/* 3563C0 E00464E0 3C108007 */ lui $s0, %hi(gMatrixListPos)
/* 3563C4 E00464E4 261041F0 */ addiu $s0, $s0, %lo(gMatrixListPos)
/* 3563C8 E00464E8 3C11800A */ lui $s1, %hi(gDisplayContext)
/* 3563CC E00464EC 2631A674 */ addiu $s1, $s1, %lo(gDisplayContext)
/* 3563D0 E00464F0 96050000 */ lhu $a1, ($s0)
/* 3563D4 E00464F4 8E220000 */ lw $v0, ($s1)
/* 3563D8 E00464F8 00052980 */ sll $a1, $a1, 6
/* 3563DC E00464FC 00B22821 */ addu $a1, $a1, $s2
/* 3563E0 E0046500 0C080118 */ jal func_E0200460
/* 3563E4 E0046504 00452821 */ addu $a1, $v0, $a1
/* 3563E8 E0046508 3C07800A */ lui $a3, %hi(gMasterGfxPos)
/* 3563EC E004650C 24E7A66C */ addiu $a3, $a3, %lo(gMasterGfxPos)
/* 3563F0 E0046510 8CE60000 */ lw $a2, ($a3)
/* 3563F4 E0046514 00C0282D */ daddu $a1, $a2, $zero
/* 3563F8 E0046518 24C60008 */ addiu $a2, $a2, 8
/* 3563FC E004651C ACE60000 */ sw $a2, ($a3)
/* 356400 E0046520 96040000 */ lhu $a0, ($s0)
/* 356404 E0046524 3C02DA38 */ lui $v0, 0xda38
/* 356408 E0046528 ACA20000 */ sw $v0, ($a1)
/* 35640C E004652C 8E230000 */ lw $v1, ($s1)
/* 356410 E0046530 3082FFFF */ andi $v0, $a0, 0xffff
/* 356414 E0046534 00021180 */ sll $v0, $v0, 6
/* 356418 E0046538 00521021 */ addu $v0, $v0, $s2
/* 35641C E004653C 00621821 */ addu $v1, $v1, $v0
/* 356420 E0046540 ACA30004 */ sw $v1, 4($a1)
/* 356424 E0046544 C6620008 */ lwc1 $f2, 8($s3)
/* 356428 E0046548 C6600024 */ lwc1 $f0, 0x24($s3)
/* 35642C E004654C 24840001 */ addiu $a0, $a0, 1
/* 356430 E0046550 4602003E */ c.le.s $f0, $f2
/* 356434 E0046554 00000000 */ nop
/* 356438 E0046558 45000007 */ bc1f .LE0046578
/* 35643C E004655C A6040000 */ sh $a0, ($s0)
/* 356440 E0046560 3C02DE00 */ lui $v0, 0xde00
/* 356444 E0046564 ACC20000 */ sw $v0, ($a2)
/* 356448 E0046568 3C03E004 */ lui $v1, %hi(D_E0046600)
/* 35644C E004656C 8C636600 */ lw $v1, %lo(D_E0046600)($v1)
/* 356450 E0046570 08011966 */ j .LE0046598
/* 356454 E0046574 24C20008 */ addiu $v0, $a2, 8
.LE0046578:
/* 356458 E0046578 3C02DE00 */ lui $v0, 0xde00
/* 35645C E004657C ACC20000 */ sw $v0, ($a2)
/* 356460 E0046580 00141040 */ sll $v0, $s4, 1
/* 356464 E0046584 3042000C */ andi $v0, $v0, 0xc
/* 356468 E0046588 3C03E004 */ lui $v1, %hi(D_E0046604)
/* 35646C E004658C 00621821 */ addu $v1, $v1, $v0
/* 356470 E0046590 8C636604 */ lw $v1, %lo(D_E0046604)($v1)
/* 356474 E0046594 24C20008 */ addiu $v0, $a2, 8
.LE0046598:
/* 356478 E0046598 ACE20000 */ sw $v0, ($a3)
/* 35647C E004659C ACC30004 */ sw $v1, 4($a2)
/* 356480 E00465A0 3C03D838 */ lui $v1, 0xd838
/* 356484 E00465A4 3C04800A */ lui $a0, %hi(gMasterGfxPos)
/* 356488 E00465A8 2484A66C */ addiu $a0, $a0, %lo(gMasterGfxPos)
/* 35648C E00465AC 8C820000 */ lw $v0, ($a0)
/* 356490 E00465B0 34630002 */ ori $v1, $v1, 2
/* 356494 E00465B4 0040282D */ daddu $a1, $v0, $zero
/* 356498 E00465B8 24420008 */ addiu $v0, $v0, 8
/* 35649C E00465BC AC820000 */ sw $v0, ($a0)
/* 3564A0 E00465C0 ACA30000 */ sw $v1, ($a1)
/* 3564A4 E00465C4 24030040 */ addiu $v1, $zero, 0x40
/* 3564A8 E00465C8 ACA30004 */ sw $v1, 4($a1)
/* 3564AC E00465CC 24430008 */ addiu $v1, $v0, 8
/* 3564B0 E00465D0 AC830000 */ sw $v1, ($a0)
/* 3564B4 E00465D4 3C03E700 */ lui $v1, 0xe700
/* 3564B8 E00465D8 AC430000 */ sw $v1, ($v0)
/* 3564BC E00465DC AC400004 */ sw $zero, 4($v0)
/* 3564C0 E00465E0 8FBF00B4 */ lw $ra, 0xb4($sp)
/* 3564C4 E00465E4 8FB400B0 */ lw $s4, 0xb0($sp)
/* 3564C8 E00465E8 8FB300AC */ lw $s3, 0xac($sp)
/* 3564CC E00465EC 8FB200A8 */ lw $s2, 0xa8($sp)
/* 3564D0 E00465F0 8FB100A4 */ lw $s1, 0xa4($sp)
/* 3564D4 E00465F4 8FB000A0 */ lw $s0, 0xa0($sp)
/* 3564D8 E00465F8 03E00008 */ jr $ra
/* 3564DC E00465FC 27BD00B8 */ addiu $sp, $sp, 0xb8