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

263 lines
13 KiB
ArmAsm

.set noat # allow manual use of $at
.set noreorder # don't insert nops after branches
glabel func_80121EB8
/* 0B85B8 80121EB8 27BDFF60 */ addiu $sp, $sp, -0xa0
/* 0B85BC 80121EBC 0080402D */ daddu $t0, $a0, $zero
/* 0B85C0 80121EC0 AFB1008C */ sw $s1, 0x8c($sp)
/* 0B85C4 80121EC4 27B10028 */ addiu $s1, $sp, 0x28
/* 0B85C8 80121EC8 3C09800A */ lui $t1, 0x800a
/* 0B85CC 80121ECC 8529A634 */ lh $t1, -0x59cc($t1)
/* 0B85D0 80121ED0 3C04800B */ lui $a0, 0x800b
/* 0B85D4 80121ED4 24841D80 */ addiu $a0, $a0, 0x1d80
/* 0B85D8 80121ED8 AFBF0094 */ sw $ra, 0x94($sp)
/* 0B85DC 80121EDC AFB20090 */ sw $s2, 0x90($sp)
/* 0B85E0 80121EE0 AFB00088 */ sw $s0, 0x88($sp)
/* 0B85E4 80121EE4 F7B40098 */ sdc1 $f20, 0x98($sp)
/* 0B85E8 80121EE8 00091080 */ sll $v0, $t1, 2
/* 0B85EC 80121EEC 00491021 */ addu $v0, $v0, $t1
/* 0B85F0 80121EF0 00021080 */ sll $v0, $v0, 2
/* 0B85F4 80121EF4 00491023 */ subu $v0, $v0, $t1
/* 0B85F8 80121EF8 000218C0 */ sll $v1, $v0, 3
/* 0B85FC 80121EFC 00431021 */ addu $v0, $v0, $v1
/* 0B8600 80121F00 3C038007 */ lui $v1, 0x8007
/* 0B8604 80121F04 8C63419C */ lw $v1, 0x419c($v1)
/* 0B8608 80121F08 000210C0 */ sll $v0, $v0, 3
/* 0B860C 80121F0C 80630070 */ lb $v1, 0x70($v1)
/* 0B8610 80121F10 10600004 */ beqz $v1, .L80121F24
/* 0B8614 80121F14 00449021 */ addu $s2, $v0, $a0
/* 0B8618 80121F18 31020800 */ andi $v0, $t0, 0x800
/* 0B861C 80121F1C 10400053 */ beqz $v0, .L8012206C
/* 0B8620 80121F20 00000000 */ nop
.L80121F24:
/* 0B8624 80121F24 2402F7FF */ addiu $v0, $zero, -0x801
/* 0B8628 80121F28 01024024 */ and $t0, $t0, $v0
/* 0B862C 80121F2C 3C038015 */ lui $v1, 0x8015
/* 0B8630 80121F30 8C634370 */ lw $v1, 0x4370($v1)
/* 0B8634 80121F34 00081080 */ sll $v0, $t0, 2
/* 0B8638 80121F38 00431021 */ addu $v0, $v0, $v1
/* 0B863C 80121F3C 8C500000 */ lw $s0, ($v0)
/* 0B8640 80121F40 1200004A */ beqz $s0, .L8012206C
/* 0B8644 80121F44 00000000 */ nop
/* 0B8648 80121F48 8E030000 */ lw $v1, ($s0)
/* 0B864C 80121F4C 10600047 */ beqz $v1, .L8012206C
/* 0B8650 80121F50 30620100 */ andi $v0, $v1, 0x100
/* 0B8654 80121F54 14400045 */ bnez $v0, .L8012206C
/* 0B8658 80121F58 30620020 */ andi $v0, $v1, 0x20
/* 0B865C 80121F5C 14400043 */ bnez $v0, .L8012206C
/* 0B8660 80121F60 24020001 */ addiu $v0, $zero, 1
/* 0B8664 80121F64 01221004 */ sllv $v0, $v0, $t1
/* 0B8668 80121F68 00621024 */ and $v0, $v1, $v0
/* 0B866C 80121F6C 1040003F */ beqz $v0, .L8012206C
/* 0B8670 80121F70 26030018 */ addiu $v1, $s0, 0x18
/* 0B8674 80121F74 00A0102D */ daddu $v0, $a1, $zero
/* 0B8678 80121F78 24A40040 */ addiu $a0, $a1, 0x40
.L80121F7C:
/* 0B867C 80121F7C 8C4A0000 */ lw $t2, ($v0)
/* 0B8680 80121F80 8C4B0004 */ lw $t3, 4($v0)
/* 0B8684 80121F84 8C4C0008 */ lw $t4, 8($v0)
/* 0B8688 80121F88 8C4D000C */ lw $t5, 0xc($v0)
/* 0B868C 80121F8C AC6A0000 */ sw $t2, ($v1)
/* 0B8690 80121F90 AC6B0004 */ sw $t3, 4($v1)
/* 0B8694 80121F94 AC6C0008 */ sw $t4, 8($v1)
/* 0B8698 80121F98 AC6D000C */ sw $t5, 0xc($v1)
/* 0B869C 80121F9C 24420010 */ addiu $v0, $v0, 0x10
/* 0B86A0 80121FA0 1444FFF6 */ bne $v0, $a0, .L80121F7C
/* 0B86A4 80121FA4 24630010 */ addiu $v1, $v1, 0x10
/* 0B86A8 80121FA8 27A40038 */ addiu $a0, $sp, 0x38
/* 0B86AC 80121FAC 3C018015 */ lui $at, 0x8015
/* 0B86B0 80121FB0 AC264374 */ sw $a2, 0x4374($at)
/* 0B86B4 80121FB4 0C019D60 */ jal guMtxL2F
/* 0B86B8 80121FB8 AE07005C */ sw $a3, 0x5c($s0)
/* 0B86BC 80121FBC 264400D4 */ addiu $a0, $s2, 0xd4
/* 0B86C0 80121FC0 C7A00068 */ lwc1 $f0, 0x68($sp)
/* 0B86C4 80121FC4 C7A2006C */ lwc1 $f2, 0x6c($sp)
/* 0B86C8 80121FC8 C7B40070 */ lwc1 $f20, 0x70($sp)
/* 0B86CC 80121FCC 27A20078 */ addiu $v0, $sp, 0x78
/* 0B86D0 80121FD0 AFA20014 */ sw $v0, 0x14($sp)
/* 0B86D4 80121FD4 27A2007C */ addiu $v0, $sp, 0x7c
/* 0B86D8 80121FD8 AFA20018 */ sw $v0, 0x18($sp)
/* 0B86DC 80121FDC 27A20080 */ addiu $v0, $sp, 0x80
/* 0B86E0 80121FE0 AFA2001C */ sw $v0, 0x1c($sp)
/* 0B86E4 80121FE4 44050000 */ mfc1 $a1, $f0
/* 0B86E8 80121FE8 3C013F80 */ lui $at, 0x3f80
/* 0B86EC 80121FEC 44810000 */ mtc1 $at, $f0
/* 0B86F0 80121FF0 44061000 */ mfc1 $a2, $f2
/* 0B86F4 80121FF4 4407A000 */ mfc1 $a3, $f20
/* 0B86F8 80121FF8 27A20084 */ addiu $v0, $sp, 0x84
/* 0B86FC 80121FFC AFA20020 */ sw $v0, 0x20($sp)
/* 0B8700 80122000 0C00A588 */ jal transform_point
/* 0B8704 80122004 E7A00010 */ swc1 $f0, 0x10($sp)
/* 0B8708 80122008 82030004 */ lb $v1, 4($s0)
/* 0B870C 8012200C 3C028012 */ lui $v0, 0x8012
/* 0B8710 80122010 24421184 */ addiu $v0, $v0, 0x1184
/* 0B8714 80122014 AE300008 */ sw $s0, 8($s1)
/* 0B8718 80122018 AE22000C */ sw $v0, 0xc($s1)
/* 0B871C 8012201C AE230000 */ sw $v1, ($s1)
/* 0B8720 80122020 8E020000 */ lw $v0, ($s0)
/* 0B8724 80122024 3042F000 */ andi $v0, $v0, 0xf000
/* 0B8728 80122028 00021202 */ srl $v0, $v0, 8
/* 0B872C 8012202C 44821000 */ mtc1 $v0, $f2
/* 0B8730 80122030 00000000 */ nop
/* 0B8734 80122034 468010A1 */ cvt.d.w $f2, $f2
/* 0B8738 80122038 04430007 */ bgezl $v0, .L80122058
/* 0B873C 8012203C 46201020 */ cvt.s.d $f0, $f2
/* 0B8740 80122040 3C0141F0 */ lui $at, 0x41f0
/* 0B8744 80122044 44810800 */ mtc1 $at, $f1
/* 0B8748 80122048 44800000 */ mtc1 $zero, $f0
/* 0B874C 8012204C 00000000 */ nop
/* 0B8750 80122050 46201080 */ add.d $f2, $f2, $f0
/* 0B8754 80122054 46201020 */ cvt.s.d $f0, $f2
.L80122058:
/* 0B8758 80122058 46140000 */ add.s $f0, $f0, $f20
/* 0B875C 8012205C 0220202D */ daddu $a0, $s1, $zero
/* 0B8760 80122060 4600010D */ trunc.w.s $f4, $f0
/* 0B8764 80122064 0C047644 */ jal queue_render_task
/* 0B8768 80122068 E4840004 */ swc1 $f4, 4($a0)
.L8012206C:
/* 0B876C 8012206C 8FBF0094 */ lw $ra, 0x94($sp)
/* 0B8770 80122070 8FB20090 */ lw $s2, 0x90($sp)
/* 0B8774 80122074 8FB1008C */ lw $s1, 0x8c($sp)
/* 0B8778 80122078 8FB00088 */ lw $s0, 0x88($sp)
/* 0B877C 8012207C D7B40098 */ ldc1 $f20, 0x98($sp)
/* 0B8780 80122080 03E00008 */ jr $ra
/* 0B8784 80122084 27BD00A0 */ addiu $sp, $sp, 0xa0
/* 0B8788 80122088 3C028007 */ lui $v0, 0x8007
/* 0B878C 8012208C 8C42419C */ lw $v0, 0x419c($v0)
/* 0B8790 80122090 27BDFFD8 */ addiu $sp, $sp, -0x28
/* 0B8794 80122094 AFBF0020 */ sw $ra, 0x20($sp)
/* 0B8798 80122098 80420070 */ lb $v0, 0x70($v0)
/* 0B879C 8012209C 10400004 */ beqz $v0, .L801220B0
/* 0B87A0 801220A0 27A80010 */ addiu $t0, $sp, 0x10
/* 0B87A4 801220A4 30820800 */ andi $v0, $a0, 0x800
/* 0B87A8 801220A8 10400034 */ beqz $v0, .L8012217C
/* 0B87AC 801220AC 00000000 */ nop
.L801220B0:
/* 0B87B0 801220B0 2402F7FF */ addiu $v0, $zero, -0x801
/* 0B87B4 801220B4 00822024 */ and $a0, $a0, $v0
/* 0B87B8 801220B8 3C038015 */ lui $v1, 0x8015
/* 0B87BC 801220BC 8C634370 */ lw $v1, 0x4370($v1)
/* 0B87C0 801220C0 00041080 */ sll $v0, $a0, 2
/* 0B87C4 801220C4 00431021 */ addu $v0, $v0, $v1
/* 0B87C8 801220C8 8C470000 */ lw $a3, ($v0)
/* 0B87CC 801220CC 10E0002B */ beqz $a3, .L8012217C
/* 0B87D0 801220D0 00000000 */ nop
/* 0B87D4 801220D4 8CE60000 */ lw $a2, ($a3)
/* 0B87D8 801220D8 10C00028 */ beqz $a2, .L8012217C
/* 0B87DC 801220DC 30C20100 */ andi $v0, $a2, 0x100
/* 0B87E0 801220E0 14400026 */ bnez $v0, .L8012217C
/* 0B87E4 801220E4 30C20020 */ andi $v0, $a2, 0x20
/* 0B87E8 801220E8 14400024 */ bnez $v0, .L8012217C
/* 0B87EC 801220EC 30C20040 */ andi $v0, $a2, 0x40
/* 0B87F0 801220F0 14400022 */ bnez $v0, .L8012217C
/* 0B87F4 801220F4 24020001 */ addiu $v0, $zero, 1
/* 0B87F8 801220F8 3C03800A */ lui $v1, 0x800a
/* 0B87FC 801220FC 8463A634 */ lh $v1, -0x59cc($v1)
/* 0B8800 80122100 00621004 */ sllv $v0, $v0, $v1
/* 0B8804 80122104 00C21024 */ and $v0, $a2, $v0
/* 0B8808 80122108 1040001C */ beqz $v0, .L8012217C
/* 0B880C 8012210C 34C20200 */ ori $v0, $a2, 0x200
/* 0B8810 80122110 ACE20000 */ sw $v0, ($a3)
/* 0B8814 80122114 24E20018 */ addiu $v0, $a3, 0x18
/* 0B8818 80122118 24A30040 */ addiu $v1, $a1, 0x40
.L8012211C:
/* 0B881C 8012211C 8CA90000 */ lw $t1, ($a1)
/* 0B8820 80122120 8CAA0004 */ lw $t2, 4($a1)
/* 0B8824 80122124 8CAB0008 */ lw $t3, 8($a1)
/* 0B8828 80122128 8CAC000C */ lw $t4, 0xc($a1)
/* 0B882C 8012212C AC490000 */ sw $t1, ($v0)
/* 0B8830 80122130 AC4A0004 */ sw $t2, 4($v0)
/* 0B8834 80122134 AC4B0008 */ sw $t3, 8($v0)
/* 0B8838 80122138 AC4C000C */ sw $t4, 0xc($v0)
/* 0B883C 8012213C 24A50010 */ addiu $a1, $a1, 0x10
/* 0B8840 80122140 14A3FFF6 */ bne $a1, $v1, .L8012211C
/* 0B8844 80122144 24420010 */ addiu $v0, $v0, 0x10
/* 0B8848 80122148 80E30004 */ lb $v1, 4($a3)
/* 0B884C 8012214C 3C028012 */ lui $v0, 0x8012
/* 0B8850 80122150 24421184 */ addiu $v0, $v0, 0x1184
/* 0B8854 80122154 ACE0005C */ sw $zero, 0x5c($a3)
/* 0B8858 80122158 AD070008 */ sw $a3, 8($t0)
/* 0B885C 8012215C AD02000C */ sw $v0, 0xc($t0)
/* 0B8860 80122160 AD030000 */ sw $v1, ($t0)
/* 0B8864 80122164 8CE20000 */ lw $v0, ($a3)
/* 0B8868 80122168 0100202D */ daddu $a0, $t0, $zero
/* 0B886C 8012216C 3042F000 */ andi $v0, $v0, 0xf000
/* 0B8870 80122170 00021202 */ srl $v0, $v0, 8
/* 0B8874 80122174 0C047644 */ jal queue_render_task
/* 0B8878 80122178 AD020004 */ sw $v0, 4($t0)
.L8012217C:
/* 0B887C 8012217C 8FBF0020 */ lw $ra, 0x20($sp)
/* 0B8880 80122180 03E00008 */ jr $ra
/* 0B8884 80122184 27BD0028 */ addiu $sp, $sp, 0x28
/* 0B8888 80122188 3C028007 */ lui $v0, 0x8007
/* 0B888C 8012218C 8C42419C */ lw $v0, 0x419c($v0)
/* 0B8890 80122190 27BDFFD8 */ addiu $sp, $sp, -0x28
/* 0B8894 80122194 AFBF0020 */ sw $ra, 0x20($sp)
/* 0B8898 80122198 80420070 */ lb $v0, 0x70($v0)
/* 0B889C 8012219C 10400004 */ beqz $v0, .L801221B0
/* 0B88A0 801221A0 27AA0010 */ addiu $t2, $sp, 0x10
/* 0B88A4 801221A4 30820800 */ andi $v0, $a0, 0x800
/* 0B88A8 801221A8 10400034 */ beqz $v0, .L8012227C
/* 0B88AC 801221AC 00000000 */ nop
.L801221B0:
/* 0B88B0 801221B0 2402F7FF */ addiu $v0, $zero, -0x801
/* 0B88B4 801221B4 00822024 */ and $a0, $a0, $v0
/* 0B88B8 801221B8 3C038015 */ lui $v1, 0x8015
/* 0B88BC 801221BC 8C634370 */ lw $v1, 0x4370($v1)
/* 0B88C0 801221C0 00041080 */ sll $v0, $a0, 2
/* 0B88C4 801221C4 00431021 */ addu $v0, $v0, $v1
/* 0B88C8 801221C8 8C490000 */ lw $t1, ($v0)
/* 0B88CC 801221CC 1120002B */ beqz $t1, .L8012227C
/* 0B88D0 801221D0 00000000 */ nop
/* 0B88D4 801221D4 8D280000 */ lw $t0, ($t1)
/* 0B88D8 801221D8 11000028 */ beqz $t0, .L8012227C
/* 0B88DC 801221DC 31020100 */ andi $v0, $t0, 0x100
/* 0B88E0 801221E0 14400026 */ bnez $v0, .L8012227C
/* 0B88E4 801221E4 31020020 */ andi $v0, $t0, 0x20
/* 0B88E8 801221E8 14400024 */ bnez $v0, .L8012227C
/* 0B88EC 801221EC 24020001 */ addiu $v0, $zero, 1
/* 0B88F0 801221F0 3C03800A */ lui $v1, 0x800a
/* 0B88F4 801221F4 8463A634 */ lh $v1, -0x59cc($v1)
/* 0B88F8 801221F8 00621004 */ sllv $v0, $v0, $v1
/* 0B88FC 801221FC 01021024 */ and $v0, $t0, $v0
/* 0B8900 80122200 1040001E */ beqz $v0, .L8012227C
/* 0B8904 80122204 35020200 */ ori $v0, $t0, 0x200
/* 0B8908 80122208 AD220000 */ sw $v0, ($t1)
/* 0B890C 8012220C 25220018 */ addiu $v0, $t1, 0x18
/* 0B8910 80122210 24A30040 */ addiu $v1, $a1, 0x40
.L80122214:
/* 0B8914 80122214 8CAB0000 */ lw $t3, ($a1)
/* 0B8918 80122218 8CAC0004 */ lw $t4, 4($a1)
/* 0B891C 8012221C 8CAD0008 */ lw $t5, 8($a1)
/* 0B8920 80122220 8CAE000C */ lw $t6, 0xc($a1)
/* 0B8924 80122224 AC4B0000 */ sw $t3, ($v0)
/* 0B8928 80122228 AC4C0004 */ sw $t4, 4($v0)
/* 0B892C 8012222C AC4D0008 */ sw $t5, 8($v0)
/* 0B8930 80122230 AC4E000C */ sw $t6, 0xc($v0)
/* 0B8934 80122234 24A50010 */ addiu $a1, $a1, 0x10
/* 0B8938 80122238 14A3FFF6 */ bne $a1, $v1, .L80122214
/* 0B893C 8012223C 24420010 */ addiu $v0, $v0, 0x10
/* 0B8940 80122240 3C018015 */ lui $at, 0x8015
/* 0B8944 80122244 AC264374 */ sw $a2, 0x4374($at)
/* 0B8948 80122248 81230004 */ lb $v1, 4($t1)
/* 0B894C 8012224C 3C028012 */ lui $v0, 0x8012
/* 0B8950 80122250 24421184 */ addiu $v0, $v0, 0x1184
/* 0B8954 80122254 AD27005C */ sw $a3, 0x5c($t1)
/* 0B8958 80122258 AD490008 */ sw $t1, 8($t2)
/* 0B895C 8012225C AD42000C */ sw $v0, 0xc($t2)
/* 0B8960 80122260 AD430000 */ sw $v1, ($t2)
/* 0B8964 80122264 8D220000 */ lw $v0, ($t1)
/* 0B8968 80122268 0140202D */ daddu $a0, $t2, $zero
/* 0B896C 8012226C 3042F000 */ andi $v0, $v0, 0xf000
/* 0B8970 80122270 00021202 */ srl $v0, $v0, 8
/* 0B8974 80122274 0C047644 */ jal queue_render_task
/* 0B8978 80122278 AD420004 */ sw $v0, 4($t2)
.L8012227C:
/* 0B897C 8012227C 8FBF0020 */ lw $ra, 0x20($sp)
/* 0B8980 80122280 03E00008 */ jr $ra
/* 0B8984 80122284 27BD0028 */ addiu $sp, $sp, 0x28