sm64pc/asm/non_matchings/eu/libultra_unk_802aef80.s
2020-02-03 00:51:26 -05:00

88 lines
4.0 KiB
ArmAsm

glabel func_802aef80
/* 0AEF80 80200000 27BDFFD8 */ addiu $sp, $sp, -0x28
/* 0AEF84 80200004 AFBF001C */ sw $ra, 0x1c($sp)
/* 0AEF88 80200008 AFA40028 */ sw $a0, 0x28($sp)
/* 0AEF8C 8020000C AFA5002C */ sw $a1, 0x2c($sp)
/* 0AEF90 80200010 AFA60030 */ sw $a2, 0x30($sp)
/* 0AEF94 80200014 AFB10018 */ sw $s1, 0x18($sp)
/* 0AEF98 80200018 0C0BD400 */ jal __osDisableInt
/* 0AEF9C 8020001C AFB00014 */ sw $s0, 0x14($sp)
/* 0AEFA0 80200020 8FAE0028 */ lw $t6, 0x28($sp)
/* 0AEFA4 80200024 00408025 */ move $s0, $v0
/* 0AEFA8 80200028 8DCF0008 */ lw $t7, 8($t6)
/* 0AEFAC 8020002C 15E00012 */ bnez $t7, .L80200078
/* 0AEFB0 80200030 00000000 */ nop
.L80200034:
/* 0AEFB4 80200034 8FB80030 */ lw $t8, 0x30($sp)
/* 0AEFB8 80200038 17000005 */ bnez $t8, .L80200050
/* 0AEFBC 8020003C 00000000 */ nop
/* 0AEFC0 80200040 0C0BD408 */ jal __osRestoreInt
/* 0AEFC4 80200044 02002025 */ move $a0, $s0
/* 0AEFC8 80200048 10000036 */ b .L80200124
/* 0AEFCC 8020004C 2402FFFF */ li $v0, -1
.L80200050:
/* 0AEFD0 80200050 3C088030 */ lui $t0, %hi(D_803348A0) # $t0, 0x8030
/* 0AEFD4 80200054 8D082F00 */ lw $t0, %lo(D_803348A0)($t0)
/* 0AEFD8 80200058 24190008 */ li $t9, 8
/* 0AEFDC 8020005C A5190010 */ sh $t9, 0x10($t0)
/* 0AEFE0 80200060 0C0BCFC3 */ jal __osEnqueueAndYield
/* 0AEFE4 80200064 8FA40028 */ lw $a0, 0x28($sp)
/* 0AEFE8 80200068 8FA90028 */ lw $t1, 0x28($sp)
/* 0AEFEC 8020006C 8D2A0008 */ lw $t2, 8($t1)
/* 0AEFF0 80200070 1140FFF0 */ beqz $t2, .L80200034
/* 0AEFF4 80200074 00000000 */ nop
.L80200078:
/* 0AEFF8 80200078 8FAB002C */ lw $t3, 0x2c($sp)
/* 0AEFFC 8020007C 11600008 */ beqz $t3, .L802000A0
/* 0AF000 80200080 00000000 */ nop
/* 0AF004 80200084 8FAC0028 */ lw $t4, 0x28($sp)
/* 0AF008 80200088 8D8E000C */ lw $t6, 0xc($t4)
/* 0AF00C 8020008C 8D8D0014 */ lw $t5, 0x14($t4)
/* 0AF010 80200090 000E7880 */ sll $t7, $t6, 2
/* 0AF014 80200094 01AFC021 */ addu $t8, $t5, $t7
/* 0AF018 80200098 8F190000 */ lw $t9, ($t8)
/* 0AF01C 8020009C AD790000 */ sw $t9, ($t3)
.L802000A0:
/* 0AF020 802000A0 8FA80028 */ lw $t0, 0x28($sp)
/* 0AF024 802000A4 8D09000C */ lw $t1, 0xc($t0)
/* 0AF028 802000A8 8D0C0010 */ lw $t4, 0x10($t0)
/* 0AF02C 802000AC 252A0001 */ addiu $t2, $t1, 1
/* 0AF030 802000B0 014C001A */ div $zero, $t2, $t4
/* 0AF034 802000B4 00007010 */ mfhi $t6
/* 0AF038 802000B8 AD0E000C */ sw $t6, 0xc($t0)
/* 0AF03C 802000BC 8FAD0028 */ lw $t5, 0x28($sp)
/* 0AF040 802000C0 15800002 */ bnez $t4, .L802000CC
/* 0AF044 802000C4 00000000 */ nop
/* 0AF048 802000C8 0007000D */ break 7
.L802000CC:
/* 0AF04C 802000CC 2401FFFF */ li $at, -1
/* 0AF050 802000D0 15810004 */ bne $t4, $at, .L802000E4
/* 0AF054 802000D4 3C018000 */ lui $at, 0x8000
/* 0AF058 802000D8 15410002 */ bne $t2, $at, .L802000E4
/* 0AF05C 802000DC 00000000 */ nop
/* 0AF060 802000E0 0006000D */ break 6
.L802000E4:
/* 0AF064 802000E4 8DAF0008 */ lw $t7, 8($t5)
/* 0AF068 802000E8 25F8FFFF */ addiu $t8, $t7, -1
/* 0AF06C 802000EC ADB80008 */ sw $t8, 8($t5)
/* 0AF070 802000F0 8FB90028 */ lw $t9, 0x28($sp)
/* 0AF074 802000F4 8F2B0004 */ lw $t3, 4($t9)
/* 0AF078 802000F8 8D690000 */ lw $t1, ($t3)
/* 0AF07C 802000FC 11200006 */ beqz $t1, .L80200118
/* 0AF080 80200100 00000000 */ nop
/* 0AF084 80200104 0C0BD015 */ jal __osPopThread
/* 0AF088 80200108 27240004 */ addiu $a0, $t9, 4
/* 0AF08C 8020010C 00408825 */ move $s1, $v0
/* 0AF090 80200110 0C0BBEA0 */ jal osStartThread
/* 0AF094 80200114 02202025 */ move $a0, $s1
.L80200118:
/* 0AF098 80200118 0C0BD408 */ jal __osRestoreInt
/* 0AF09C 8020011C 02002025 */ move $a0, $s0
/* 0AF0A0 80200120 00001025 */ move $v0, $zero
.L80200124:
/* 0AF0A4 80200124 8FBF001C */ lw $ra, 0x1c($sp)
/* 0AF0A8 80200128 8FB00014 */ lw $s0, 0x14($sp)
/* 0AF0AC 8020012C 8FB10018 */ lw $s1, 0x18($sp)
/* 0AF0B0 80200130 03E00008 */ jr $ra
/* 0AF0B4 80200134 27BD0028 */ addiu $sp, $sp, 0x28