1
0
Fork 0
mirror of https://github.com/zeldaret/oot.git synced 2024-12-27 23:36:22 +00:00
oot/asm/non_matchings/code/sched/Sched_Schedule.s
krimtonz d48792870c
Decompiles sched.c (#145)
* decompile sched.c

* rename Game_AllocEnd to Game_Alloc in z_effect_soft_sprite.c

* pr updates
2020-05-26 11:39:27 -04:00

84 lines
3.9 KiB
ArmAsm

glabel Sched_Schedule
/* B3FC34 800C8A94 27BDFFD8 */ addiu $sp, $sp, -0x28
/* B3FC38 800C8A98 AFBF001C */ sw $ra, 0x1c($sp)
/* B3FC3C 800C8A9C AFB00018 */ sw $s0, 0x18($sp)
/* B3FC40 800C8AA0 AFA5002C */ sw $a1, 0x2c($sp)
/* B3FC44 800C8AA4 AFA60030 */ sw $a2, 0x30($sp)
/* B3FC48 800C8AA8 8C8E023C */ lw $t6, 0x23c($a0)
/* B3FC4C 800C8AAC 00E01825 */ move $v1, $a3
/* B3FC50 800C8AB0 8C900224 */ lw $s0, 0x224($a0)
/* B3FC54 800C8AB4 11C0000E */ beqz $t6, .L800C8AF0
/* B3FC58 800C8AB8 8C820220 */ lw $v0, 0x220($a0)
/* B3FC5C 800C8ABC 30EF0002 */ andi $t7, $a3, 2
/* B3FC60 800C8AC0 11E0000B */ beqz $t7, .L800C8AF0
/* B3FC64 800C8AC4 00000000 */ nop
/* B3FC68 800C8AC8 ACA20000 */ sw $v0, ($a1)
/* B3FC6C 800C8ACC 8C990220 */ lw $t9, 0x220($a0)
/* B3FC70 800C8AD0 AC80023C */ sw $zero, 0x23c($a0)
/* B3FC74 800C8AD4 2401FFFD */ li $at, -3
/* B3FC78 800C8AD8 8F280000 */ lw $t0, ($t9)
/* B3FC7C 800C8ADC 00E11824 */ and $v1, $a3, $at
/* B3FC80 800C8AE0 15000033 */ bnez $t0, .L800C8BB0
/* B3FC84 800C8AE4 AC880220 */ sw $t0, 0x220($a0)
/* B3FC88 800C8AE8 10000031 */ b .L800C8BB0
/* B3FC8C 800C8AEC AC800228 */ sw $zero, 0x228($a0)
.L800C8AF0:
/* B3FC90 800C8AF0 52000030 */ beql $s0, $zero, .L800C8BB4
/* B3FC94 800C8AF4 8FBF001C */ lw $ra, 0x1c($sp)
/* B3FC98 800C8AF8 8E0A0004 */ lw $t2, 4($s0)
/* B3FC9C 800C8AFC 30EE0002 */ andi $t6, $a3, 2
/* B3FCA0 800C8B00 314B0020 */ andi $t3, $t2, 0x20
/* B3FCA4 800C8B04 15600006 */ bnez $t3, .L800C8B20
/* B3FCA8 800C8B08 00000000 */ nop
/* B3FCAC 800C8B0C 8E0C0008 */ lw $t4, 8($s0)
/* B3FCB0 800C8B10 24010003 */ li $at, 3
/* B3FCB4 800C8B14 318D0001 */ andi $t5, $t4, 1
/* B3FCB8 800C8B18 15A0000C */ bnez $t5, .L800C8B4C
/* B3FCBC 800C8B1C 00000000 */ nop
.L800C8B20:
/* B3FCC0 800C8B20 11C00023 */ beqz $t6, .L800C8BB0
/* B3FCC4 800C8B24 8FAF002C */ lw $t7, 0x2c($sp)
/* B3FCC8 800C8B28 ADF00000 */ sw $s0, ($t7)
/* B3FCCC 800C8B2C 8C980224 */ lw $t8, 0x224($a0)
/* B3FCD0 800C8B30 2401FFFD */ li $at, -3
/* B3FCD4 800C8B34 00E11824 */ and $v1, $a3, $at
/* B3FCD8 800C8B38 8F190000 */ lw $t9, ($t8)
/* B3FCDC 800C8B3C 1720001C */ bnez $t9, .L800C8BB0
/* B3FCE0 800C8B40 AC990224 */ sw $t9, 0x224($a0)
/* B3FCE4 800C8B44 1000001A */ b .L800C8BB0
/* B3FCE8 800C8B48 AC80022C */ sw $zero, 0x22c($a0)
.L800C8B4C:
/* B3FCEC 800C8B4C 54E10019 */ bnel $a3, $at, .L800C8BB4
/* B3FCF0 800C8B50 8FBF001C */ lw $ra, 0x1c($sp)
/* B3FCF4 800C8B54 8E09000C */ lw $t1, 0xc($s0)
/* B3FCF8 800C8B58 02002825 */ move $a1, $s0
/* B3FCFC 800C8B5C 5120000A */ beql $t1, $zero, .L800C8B88
/* B3FD00 800C8B60 8FAA0030 */ lw $t2, 0x30($sp)
/* B3FD04 800C8B64 AFA30024 */ sw $v1, 0x24($sp)
/* B3FD08 800C8B68 AFA40028 */ sw $a0, 0x28($sp)
/* B3FD0C 800C8B6C 0C032275 */ jal func_800C89D4
/* B3FD10 800C8B70 AFA70034 */ sw $a3, 0x34($sp)
/* B3FD14 800C8B74 8FA30024 */ lw $v1, 0x24($sp)
/* B3FD18 800C8B78 8FA40028 */ lw $a0, 0x28($sp)
/* B3FD1C 800C8B7C 1040000C */ beqz $v0, .L800C8BB0
/* B3FD20 800C8B80 8FA70034 */ lw $a3, 0x34($sp)
/* B3FD24 800C8B84 8FAA0030 */ lw $t2, 0x30($sp)
.L800C8B88:
/* B3FD28 800C8B88 2401FFFC */ li $at, -4
/* B3FD2C 800C8B8C 00E11824 */ and $v1, $a3, $at
/* B3FD30 800C8B90 AD500000 */ sw $s0, ($t2)
/* B3FD34 800C8B94 8FAB002C */ lw $t3, 0x2c($sp)
/* B3FD38 800C8B98 AD700000 */ sw $s0, ($t3)
/* B3FD3C 800C8B9C 8C8C0224 */ lw $t4, 0x224($a0)
/* B3FD40 800C8BA0 8D8D0000 */ lw $t5, ($t4)
/* B3FD44 800C8BA4 15A00002 */ bnez $t5, .L800C8BB0
/* B3FD48 800C8BA8 AC8D0224 */ sw $t5, 0x224($a0)
/* B3FD4C 800C8BAC AC80022C */ sw $zero, 0x22c($a0)
.L800C8BB0:
/* B3FD50 800C8BB0 8FBF001C */ lw $ra, 0x1c($sp)
.L800C8BB4:
/* B3FD54 800C8BB4 8FB00018 */ lw $s0, 0x18($sp)
/* B3FD58 800C8BB8 27BD0028 */ addiu $sp, $sp, 0x28
/* B3FD5C 800C8BBC 03E00008 */ jr $ra
/* B3FD60 800C8BC0 00601025 */ move $v0, $v1