.set noat # allow manual use of $at .set noreorder # don't insert nops after branches glabel func_80218490_557870 /* 557870 80218490 27BDFF30 */ addiu $sp, $sp, -0xd0 /* 557874 80218494 AFB500AC */ sw $s5, 0xac($sp) /* 557878 80218498 AFBF00B0 */ sw $ra, 0xb0($sp) /* 55787C 8021849C AFB400A8 */ sw $s4, 0xa8($sp) /* 557880 802184A0 AFB300A4 */ sw $s3, 0xa4($sp) /* 557884 802184A4 AFB200A0 */ sw $s2, 0xa0($sp) /* 557888 802184A8 AFB1009C */ sw $s1, 0x9c($sp) /* 55788C 802184AC AFB00098 */ sw $s0, 0x98($sp) /* 557890 802184B0 F7B800C8 */ sdc1 $f24, 0xc8($sp) /* 557894 802184B4 F7B600C0 */ sdc1 $f22, 0xc0($sp) /* 557898 802184B8 F7B400B8 */ sdc1 $f20, 0xb8($sp) /* 55789C 802184BC 10A0001F */ beqz $a1, .L8021853C /* 5578A0 802184C0 0080A82D */ daddu $s5, $a0, $zero /* 5578A4 802184C4 0C00AB39 */ jal heap_malloc /* 5578A8 802184C8 24040018 */ addiu $a0, $zero, 0x18 /* 5578AC 802184CC 0040902D */ daddu $s2, $v0, $zero /* 5578B0 802184D0 0000A02D */ daddu $s4, $zero, $zero /* 5578B4 802184D4 2650000C */ addiu $s0, $s2, 0xc /* 5578B8 802184D8 3C138022 */ lui $s3, %hi(D_8021B254) /* 5578BC 802184DC 2673B254 */ addiu $s3, $s3, %lo(D_8021B254) /* 5578C0 802184E0 3C014060 */ lui $at, 0x4060 /* 5578C4 802184E4 4481A000 */ mtc1 $at, $f20 /* 5578C8 802184E8 3C118022 */ lui $s1, %hi(D_8021B250) /* 5578CC 802184EC 2631B250 */ addiu $s1, $s1, %lo(D_8021B250) /* 5578D0 802184F0 AEB20070 */ sw $s2, 0x70($s5) .L802184F4: /* 5578D4 802184F4 8E220000 */ lw $v0, ($s1) /* 5578D8 802184F8 26310004 */ addiu $s1, $s1, 4 /* 5578DC 802184FC 26940001 */ addiu $s4, $s4, 1 /* 5578E0 80218500 AE020004 */ sw $v0, 4($s0) /* 5578E4 80218504 0040202D */ daddu $a0, $v0, $zero /* 5578E8 80218508 8E620000 */ lw $v0, ($s3) /* 5578EC 8021850C 26730004 */ addiu $s3, $s3, 4 /* 5578F0 80218510 0C046C04 */ jal get_model_list_index_from_tree_index /* 5578F4 80218514 AE020008 */ sw $v0, 8($s0) /* 5578F8 80218518 0C046B4C */ jal get_model_from_list_index /* 5578FC 8021851C 0040202D */ daddu $a0, $v0, $zero /* 557900 80218520 AE400000 */ sw $zero, ($s2) /* 557904 80218524 AE00FFF8 */ sw $zero, -8($s0) /* 557908 80218528 E614FFFC */ swc1 $f20, -4($s0) /* 55790C 8021852C AE000000 */ sw $zero, ($s0) /* 557910 80218530 26100018 */ addiu $s0, $s0, 0x18 /* 557914 80218534 1280FFEF */ beqz $s4, .L802184F4 /* 557918 80218538 26520018 */ addiu $s2, $s2, 0x18 .L8021853C: /* 55791C 8021853C 0000A02D */ daddu $s4, $zero, $zero /* 557920 80218540 27B30058 */ addiu $s3, $sp, 0x58 /* 557924 80218544 8EB20070 */ lw $s2, 0x70($s5) /* 557928 80218548 4480C000 */ mtc1 $zero, $f24 /* 55792C 8021854C 26510004 */ addiu $s1, $s2, 4 .L80218550: /* 557930 80218550 C62C0008 */ lwc1 $f12, 8($s1) /* 557934 80218554 C6200004 */ lwc1 $f0, 4($s1) /* 557938 80218558 46006300 */ add.s $f12, $f12, $f0 /* 55793C 8021855C 0C00A6C9 */ jal clamp_angle /* 557940 80218560 E62C0008 */ swc1 $f12, 8($s1) /* 557944 80218564 3C014048 */ lui $at, 0x4048 /* 557948 80218568 3421F5C3 */ ori $at, $at, 0xf5c3 /* 55794C 8021856C 44816000 */ mtc1 $at, $f12 /* 557950 80218570 00000000 */ nop /* 557954 80218574 460C0302 */ mul.s $f12, $f0, $f12 /* 557958 80218578 00000000 */ nop /* 55795C 8021857C 3C014334 */ lui $at, 0x4334 /* 557960 80218580 44811000 */ mtc1 $at, $f2 /* 557964 80218584 E6200008 */ swc1 $f0, 8($s1) /* 557968 80218588 0C00A85B */ jal sin_rad /* 55796C 8021858C 46026303 */ div.s $f12, $f12, $f2 /* 557970 80218590 3C0141A0 */ lui $at, 0x41a0 /* 557974 80218594 44811000 */ mtc1 $at, $f2 /* 557978 80218598 00000000 */ nop /* 55797C 8021859C 46020502 */ mul.s $f20, $f0, $f2 /* 557980 802185A0 00000000 */ nop /* 557984 802185A4 4614A582 */ mul.s $f22, $f20, $f20 /* 557988 802185A8 00000000 */ nop /* 55798C 802185AC 26940001 */ addiu $s4, $s4, 1 /* 557990 802185B0 3C0142B4 */ lui $at, 0x42b4 /* 557994 802185B4 44810000 */ mtc1 $at, $f0 /* 557998 802185B8 8E24000C */ lw $a0, 0xc($s1) /* 55799C 802185BC 0C046C04 */ jal get_model_list_index_from_tree_index /* 5579A0 802185C0 4600B583 */ div.s $f22, $f22, $f0 /* 5579A4 802185C4 0C046B4C */ jal get_model_from_list_index /* 5579A8 802185C8 0040202D */ daddu $a0, $v0, $zero /* 5579AC 802185CC 0040802D */ daddu $s0, $v0, $zero /* 5579B0 802185D0 96020000 */ lhu $v0, ($s0) /* 5579B4 802185D4 4406C000 */ mfc1 $a2, $f24 /* 5579B8 802185D8 34421400 */ ori $v0, $v0, 0x1400 /* 5579BC 802185DC A6020000 */ sh $v0, ($s0) /* 5579C0 802185E0 C6400000 */ lwc1 $f0, ($s2) /* 5579C4 802185E4 C6220000 */ lwc1 $f2, ($s1) /* 5579C8 802185E8 46000007 */ neg.s $f0, $f0 /* 5579CC 802185EC 46001087 */ neg.s $f2, $f2 /* 5579D0 802185F0 44050000 */ mfc1 $a1, $f0 /* 5579D4 802185F4 44071000 */ mfc1 $a3, $f2 /* 5579D8 802185F8 0C019E40 */ jal guTranslateF /* 5579DC 802185FC 27A40018 */ addiu $a0, $sp, 0x18 /* 5579E0 80218600 4405A000 */ mfc1 $a1, $f20 /* 5579E4 80218604 4406C000 */ mfc1 $a2, $f24 /* 5579E8 80218608 4407C000 */ mfc1 $a3, $f24 /* 5579EC 8021860C 3C013F80 */ lui $at, 0x3f80 /* 5579F0 80218610 44810000 */ mtc1 $at, $f0 /* 5579F4 80218614 0260202D */ daddu $a0, $s3, $zero /* 5579F8 80218618 0C019EC8 */ jal guRotateF /* 5579FC 8021861C E7A00010 */ swc1 $f0, 0x10($sp) /* 557A00 80218620 27A40018 */ addiu $a0, $sp, 0x18 /* 557A04 80218624 0260282D */ daddu $a1, $s3, $zero /* 557A08 80218628 26100058 */ addiu $s0, $s0, 0x58 /* 557A0C 8021862C 0C019D80 */ jal guMtxCatF /* 557A10 80218630 0200302D */ daddu $a2, $s0, $zero /* 557A14 80218634 27A40018 */ addiu $a0, $sp, 0x18 /* 557A18 80218638 8E270000 */ lw $a3, ($s1) /* 557A1C 8021863C 26310018 */ addiu $s1, $s1, 0x18 /* 557A20 80218640 8E450000 */ lw $a1, ($s2) /* 557A24 80218644 4406B000 */ mfc1 $a2, $f22 /* 557A28 80218648 0C019E40 */ jal guTranslateF /* 557A2C 8021864C 26520018 */ addiu $s2, $s2, 0x18 /* 557A30 80218650 0200202D */ daddu $a0, $s0, $zero /* 557A34 80218654 27A50018 */ addiu $a1, $sp, 0x18 /* 557A38 80218658 0C019D80 */ jal guMtxCatF /* 557A3C 8021865C 0080302D */ daddu $a2, $a0, $zero /* 557A40 80218660 1280FFBB */ beqz $s4, .L80218550 /* 557A44 80218664 0000102D */ daddu $v0, $zero, $zero /* 557A48 80218668 8FBF00B0 */ lw $ra, 0xb0($sp) /* 557A4C 8021866C 8FB500AC */ lw $s5, 0xac($sp) /* 557A50 80218670 8FB400A8 */ lw $s4, 0xa8($sp) /* 557A54 80218674 8FB300A4 */ lw $s3, 0xa4($sp) /* 557A58 80218678 8FB200A0 */ lw $s2, 0xa0($sp) /* 557A5C 8021867C 8FB1009C */ lw $s1, 0x9c($sp) /* 557A60 80218680 8FB00098 */ lw $s0, 0x98($sp) /* 557A64 80218684 D7B800C8 */ ldc1 $f24, 0xc8($sp) /* 557A68 80218688 D7B600C0 */ ldc1 $f22, 0xc0($sp) /* 557A6C 8021868C D7B400B8 */ ldc1 $f20, 0xb8($sp) /* 557A70 80218690 03E00008 */ jr $ra /* 557A74 80218694 27BD00D0 */ addiu $sp, $sp, 0xd0 /* 557A78 80218698 00000000 */ nop /* 557A7C 8021869C 00000000 */ nop