papermario/asm/nonmatchings/os/code_45df0_len_970/osEnqueueAndYield.s
2020-08-12 22:37:16 -04:00

73 lines
3.4 KiB
ArmAsm

.set noat # allow manual use of $at
.set noreorder # don't insert nops after branches
glabel osEnqueueAndYield
/* 04646C 8006B06C 3C058009 */ lui $a1, 0x8009
/* 046470 8006B070 8CA54660 */ lw $a1, 0x4660($a1)
/* 046474 8006B074 40086000 */ mfc0 $t0, $12
/* 046478 8006B078 35080002 */ ori $t0, $t0, 2
/* 04647C 8006B07C ACA80118 */ sw $t0, 0x118($a1)
/* 046480 8006B080 FCB00098 */ sd $s0, 0x98($a1)
/* 046484 8006B084 FCB100A0 */ sd $s1, 0xa0($a1)
/* 046488 8006B088 FCB200A8 */ sd $s2, 0xa8($a1)
/* 04648C 8006B08C FCB300B0 */ sd $s3, 0xb0($a1)
/* 046490 8006B090 FCB400B8 */ sd $s4, 0xb8($a1)
/* 046494 8006B094 FCB500C0 */ sd $s5, 0xc0($a1)
/* 046498 8006B098 FCB600C8 */ sd $s6, 0xc8($a1)
/* 04649C 8006B09C FCB700D0 */ sd $s7, 0xd0($a1)
/* 0464A0 8006B0A0 FCBC00E8 */ sd $gp, 0xe8($a1)
/* 0464A4 8006B0A4 FCBD00F0 */ sd $sp, 0xf0($a1)
/* 0464A8 8006B0A8 FCBE00F8 */ sd $fp, 0xf8($a1)
/* 0464AC 8006B0AC FCBF0100 */ sd $ra, 0x100($a1)
/* 0464B0 8006B0B0 ACBF011C */ sw $ra, 0x11c($a1)
/* 0464B4 8006B0B4 8CBB0018 */ lw $k1, 0x18($a1)
/* 0464B8 8006B0B8 1360000A */ beqz $k1, .L8006B0E4
/* 0464BC 8006B0BC 00000000 */ nop
/* 0464C0 8006B0C0 445BF800 */ cfc1 $k1, $31
/* 0464C4 8006B0C4 00000000 */ nop
/* 0464C8 8006B0C8 ACBB012C */ sw $k1, 0x12c($a1)
/* 0464CC 8006B0CC F4B40180 */ sdc1 $f20, 0x180($a1)
/* 0464D0 8006B0D0 F4B60188 */ sdc1 $f22, 0x188($a1)
/* 0464D4 8006B0D4 F4B80190 */ sdc1 $f24, 0x190($a1)
/* 0464D8 8006B0D8 F4BA0198 */ sdc1 $f26, 0x198($a1)
/* 0464DC 8006B0DC F4BC01A0 */ sdc1 $f28, 0x1a0($a1)
/* 0464E0 8006B0E0 F4BE01A8 */ sdc1 $f30, 0x1a8($a1)
.L8006B0E4:
/* 0464E4 8006B0E4 8CBB0118 */ lw $k1, 0x118($a1)
/* 0464E8 8006B0E8 3369FF00 */ andi $t1, $k1, 0xff00
/* 0464EC 8006B0EC 1120000D */ beqz $t1, .L8006B124
/* 0464F0 8006B0F0 00000000 */ nop
/* 0464F4 8006B0F4 3C088009 */ lui $t0, 0x8009
/* 0464F8 8006B0F8 25085900 */ addiu $t0, $t0, 0x5900
/* 0464FC 8006B0FC 8D080000 */ lw $t0, ($t0)
/* 046500 8006B100 2401FFFF */ addiu $at, $zero, -1
/* 046504 8006B104 01014026 */ xor $t0, $t0, $at
/* 046508 8006B108 3108FF00 */ andi $t0, $t0, 0xff00
/* 04650C 8006B10C 01284825 */ or $t1, $t1, $t0
/* 046510 8006B110 3C01FFFF */ lui $at, 0xffff
/* 046514 8006B114 342100FF */ ori $at, $at, 0xff
/* 046518 8006B118 0361D824 */ and $k1, $k1, $at
/* 04651C 8006B11C 0369D825 */ or $k1, $k1, $t1
/* 046520 8006B120 ACBB0118 */ sw $k1, 0x118($a1)
.L8006B124:
/* 046524 8006B124 3C1BA430 */ lui $k1, 0xa430
/* 046528 8006B128 8F7B000C */ lw $k1, 0xc($k1)
/* 04652C 8006B12C 1360000B */ beqz $k1, .L8006B15C
/* 046530 8006B130 00000000 */ nop
/* 046534 8006B134 3C1A8009 */ lui $k0, 0x8009
/* 046538 8006B138 275A5900 */ addiu $k0, $k0, 0x5900
/* 04653C 8006B13C 8F5A0000 */ lw $k0, ($k0)
/* 046540 8006B140 001AD402 */ srl $k0, $k0, 0x10
/* 046544 8006B144 2401FFFF */ addiu $at, $zero, -1
/* 046548 8006B148 0341D026 */ xor $k0, $k0, $at
/* 04654C 8006B14C 335A003F */ andi $k0, $k0, 0x3f
/* 046550 8006B150 8CA80128 */ lw $t0, 0x128($a1)
/* 046554 8006B154 0348D024 */ and $k0, $k0, $t0
/* 046558 8006B158 037AD825 */ or $k1, $k1, $k0
.L8006B15C:
/* 04655C 8006B15C 10800003 */ beqz $a0, .L8006B16C
/* 046560 8006B160 ACBB0128 */ sw $k1, 0x128($a1)
/* 046564 8006B164 0C01AC5D */ jal osEnqueueThread
/* 046568 8006B168 00000000 */ nop