papermario/asm/nonmatchings/code_1f580_len_1940/EnableNpcAux.s
2020-08-12 22:37:16 -04:00

56 lines
2.4 KiB
ArmAsm

.set noat # allow manual use of $at
.set noreorder # don't insert nops after branches
glabel EnableNpcAux
/* 0203F0 80044FF0 27BDFFD8 */ addiu $sp, $sp, -0x28
/* 0203F4 80044FF4 AFB10014 */ sw $s1, 0x14($sp)
/* 0203F8 80044FF8 0080882D */ daddu $s1, $a0, $zero
/* 0203FC 80044FFC AFBF0020 */ sw $ra, 0x20($sp)
/* 020400 80045000 AFB3001C */ sw $s3, 0x1c($sp)
/* 020404 80045004 AFB20018 */ sw $s2, 0x18($sp)
/* 020408 80045008 AFB00010 */ sw $s0, 0x10($sp)
/* 02040C 8004500C 8E30000C */ lw $s0, 0xc($s1)
/* 020410 80045010 8E330148 */ lw $s3, 0x148($s1)
/* 020414 80045014 8E050000 */ lw $a1, ($s0)
/* 020418 80045018 0C0B1EAF */ jal get_variable
/* 02041C 8004501C 26100004 */ addiu $s0, $s0, 4
/* 020420 80045020 0040902D */ daddu $s2, $v0, $zero
/* 020424 80045024 8E050000 */ lw $a1, ($s0)
/* 020428 80045028 0C0B1EAF */ jal get_variable
/* 02042C 8004502C 0220202D */ daddu $a0, $s1, $zero
/* 020430 80045030 0040802D */ daddu $s0, $v0, $zero
/* 020434 80045034 2402FFFF */ addiu $v0, $zero, -1
/* 020438 80045038 16420002 */ bne $s2, $v0, .L80045044
/* 02043C 8004503C 00000000 */ nop
/* 020440 80045040 86720008 */ lh $s2, 8($s3)
.L80045044:
/* 020444 80045044 0C00FB3A */ jal get_enemy
/* 020448 80045048 0240202D */ daddu $a0, $s2, $zero
/* 02044C 8004504C 12000008 */ beqz $s0, .L80045070
/* 020450 80045050 0040982D */ daddu $s3, $v0, $zero
/* 020454 80045054 8E620044 */ lw $v0, 0x44($s3)
/* 020458 80045058 1040000A */ beqz $v0, .L80045084
/* 02045C 8004505C 00000000 */ nop
/* 020460 80045060 0C0B1123 */ jal resume_all_script
/* 020464 80045064 8E64005C */ lw $a0, 0x5c($s3)
/* 020468 80045068 08011421 */ j .L80045084
/* 02046C 8004506C 00000000 */ nop
.L80045070:
/* 020470 80045070 8E620044 */ lw $v0, 0x44($s3)
/* 020474 80045074 10400003 */ beqz $v0, .L80045084
/* 020478 80045078 00000000 */ nop
/* 02047C 8004507C 0C0B1108 */ jal suspend_all_script
/* 020480 80045080 8E64005C */ lw $a0, 0x5c($s3)
.L80045084:
/* 020484 80045084 8FBF0020 */ lw $ra, 0x20($sp)
/* 020488 80045088 8FB3001C */ lw $s3, 0x1c($sp)
/* 02048C 8004508C 8FB20018 */ lw $s2, 0x18($sp)
/* 020490 80045090 8FB10014 */ lw $s1, 0x14($sp)
/* 020494 80045094 8FB00010 */ lw $s0, 0x10($sp)
/* 020498 80045098 24020002 */ addiu $v0, $zero, 2
/* 02049C 8004509C 03E00008 */ jr $ra
/* 0204A0 800450A0 27BD0028 */ addiu $sp, $sp, 0x28