mdl_project_tex_coords (#978)

* mdl_project_tex_coords

Co-authored-by: Unnunu <serge_zorkin@mail.ru>

* move 0 to 0

---------

Co-authored-by: Unnunu <serge_zorkin@mail.ru>
This commit is contained in:
Ethan Roseman 2023-03-14 23:42:11 +09:00 committed by GitHub
parent c1d9bbbd2a
commit 8f19afcd26
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 127 additions and 784 deletions

View File

@ -3036,7 +3036,6 @@ void appendGfx_model(void* data) {
s8 renderMode; s8 renderMode;
s32 texturingMode; s32 texturingMode;
s32 renderModeIdx; s32 renderModeIdx;
s32 new_var;
s32 flags = model->flags; s32 flags = model->flags;
ModelNode* modelNode; ModelNode* modelNode;
@ -5690,64 +5689,47 @@ Gfx* mdl_get_copied_gfx(s32 copyIndex) {
return gfxCopy; return gfxCopy;
} }
#ifdef WIP void mdl_project_tex_coords(s32 modelID, Gfx* arg1, Matrix4f arg2, Vtx* arg3) {
void mdl_project_tex_coords(s32 modelID, Gfx* destGfx, f32 (*destMtx)[4], void* destVertices) { s32 sp18;
s32 numVertices;
Vtx* baseVtx; Vtx* baseVtx;
s32 gfxCount; s32 sp20;
f32 v1tc1;
f32 v2tc1;
f32 sp2C; f32 sp2C;
f32 v0tc1;
f32 sp40; f32 sp40;
Vtx* temp_a0; f32 v1tc0;
f32 temp_f10; f32 v1ob2;
f32 temp_f12; f32 ob2;
f32 temp_f12_2; f32 ob1;
f32 temp_f14;
f32 temp_f14_2;
f32 temp_f2;
f32 temp_f2_2;
f32 temp_f4_2;
f32 temp_f4_3;
f32 temp_f8;
f32 temp_f8_3;
f32 var_f0;
f32 var_f10;
f32 var_f24;
f32 var_f26;
f32 var_f2;
f32 var_f30;
f32 var_f6;
f32 var_f6_2;
f32 v0ob0; f32 v0ob0;
f32 v0ob2; f32 v0ob2;
f32 v0tc0; f32 v0tc0;
f32 v0tc1;
f32 v1ob0;
f32 v1ob2;
f32 v2ob0; f32 v2ob0;
f32 v1tc0;
f32 v1tc1;
f32 v2ob2;
f32 v2tc0; f32 v2tc0;
f32 v2tc1; f32 v1ob0;
f32 v2ob2;
f32 ob0; f32 ob0;
f32 ob1; f32 var_f10;
f32 ob2; f32 var_f24;
f32 var_f26;
f32 tc0;
f32 tc1; f32 tc1;
f32 var_f30;
s32 cn0; f32 tc0;
s32 cn1; f32 var_f6_2;
s32 cn2;
s32 cmd;
s32 i; s32 i;
u32 cnB;
u32 cnG;
u32 cnR;
f32 var_f20;
s32 listIndex; s32 listIndex;
Model* model; Model* model;
Gfx* dlist; Gfx* dlist;
s32 cmd;
Vtx* tempVert;
s8 zero = 0; // TODO needed to match
listIndex = get_model_list_index_from_tree_index(modelID & 0xFFFF); listIndex = get_model_list_index_from_tree_index(modelID & 0xFFFF);
model = get_model_from_list_index(listIndex); model = get_model_from_list_index(listIndex);
@ -5755,22 +5737,21 @@ void mdl_project_tex_coords(s32 modelID, Gfx* destGfx, f32 (*destMtx)[4], void*
while (TRUE) { while (TRUE) {
cmd = dlist->words.w0 >> 0x18; cmd = dlist->words.w0 >> 0x18;
//temp_a0 = var_v0->words.w1; tempVert = (Vtx*)dlist->words.w1;
if (cmd == G_ENDDL) { if (cmd == G_ENDDL) {
break; break;
} }
if (cmd == G_VTX) { if (cmd == G_VTX) {
baseVtx = dlist->words.w1; baseVtx = tempVert;
break; break;
} }
dlist++; dlist++;
} }
v0ob0 = baseVtx[0].v.ob[0]; v0ob0 = baseVtx[zero].v.ob[0];
v0ob2 = baseVtx[0].v.ob[2]; v0ob2 = baseVtx[zero].v.ob[2];
v0tc0 = baseVtx[0].v.tc[0]; v0tc0 = baseVtx[zero].v.tc[0];
v0tc1 = baseVtx[0].v.tc[1]; v0tc1 = baseVtx[zero].v.tc[1];
v1ob0 = baseVtx[1].v.ob[0]; v1ob0 = baseVtx[1].v.ob[0];
v1ob2 = baseVtx[1].v.ob[2]; v1ob2 = baseVtx[1].v.ob[2];
@ -5782,59 +5763,81 @@ void mdl_project_tex_coords(s32 modelID, Gfx* destGfx, f32 (*destMtx)[4], void*
v2tc0 = baseVtx[2].v.tc[0]; v2tc0 = baseVtx[2].v.tc[0];
v2tc1 = baseVtx[2].v.tc[1]; v2tc1 = baseVtx[2].v.tc[1];
cn0 = baseVtx[0].v.cn[0]; cnR = baseVtx[0].v.cn[0];
cn1 = baseVtx[0].v.cn[1]; cnG = baseVtx[0].v.cn[1];
cn2 = baseVtx[0].v.cn[2]; cnB = baseVtx[0].v.cn[2];
if (v0ob0 != v1ob0) { if (v0ob0 != v1ob0) {
temp_f14_2 = v0ob0 - v1ob0; f32 f2 = v0ob0 - v2ob0;
temp_f8_3 = v0tc0 - v1tc0; f32 f14 = v0ob0 - v1ob0;
temp_f2_2 = (v0ob0 - v2ob0) / temp_f14_2; f32 f8 = v0tc0 - v1tc0;
temp_f12_2 = v0ob2 - v1ob2; f32 f2a = f2 / f14;
temp_f10 = (temp_f2_2 * temp_f12_2) - (v0ob2 - v2ob2); f32 f0 = f2a * f8;
sp40 = ((temp_f2_2 * temp_f8_3) - (v0tc0 - v2tc0)) / temp_f10; f32 f12 = v0ob2 - v1ob2;
temp_f4_3 = v0tc1 - v1tc1; f32 f10 = f2a * f12;
var_f30 = (temp_f8_3 - (temp_f12_2 * sp40)) / temp_f14_2; f32 f4 = v0tc0 - v2tc0;
var_f26 = ((temp_f2_2 * temp_f4_3) - (v0tc1 - v2tc1)) / temp_f10; f32 f6 = v0ob2 - v2ob2;
var_f2 = var_f26 * v0ob2; f32 f0a = f0 - f4;
var_f24 = (temp_f4_3 - (temp_f12_2 * var_f26)) / temp_f14_2; f32 f10a = f10 - f6;
var_f6 = (v0tc0 - (var_f30 * v0ob0)) - (sp40 * v0ob2);
var_f0 = v0tc1 - (var_f24 * v0ob0); f32 f0b, f4a, f2b, f8a, f6a, f0c, f8b, f2c, f12a, f2d, f4b, f0d, f6b, f0e;
sp40 = f0a / f10a; // used later
f0b = f12 * sp40;
f4a = v0tc1 - v1tc1;
f2b = f2a * f4a;
f8a = f8 - f0b;
var_f30 = f8a / f14; // used later
f6a = var_f30 * v0ob0;
f0c = v0tc1 - v2tc1;
f2c = f2b - f0c;
var_f26 = f2c / f10a; // used later
f12a = f12 * var_f26;
var_f24 = (f4a - f12a) / f14; // used later
sp2C = v0tc0 - f6a - sp40 * v0ob2; // used later
var_f20 = v0tc1 - var_f24 * v0ob0 - var_f26 * v0ob2; // used later
} else { } else {
temp_f14 = (v0ob2 - v1ob2); f32 f2 = v0ob2 - v2ob2;
temp_f8 = v0tc0 - v1tc0; f32 f14 = v0ob2 - v1ob2;
temp_f2 = (v0ob2 - v2ob2) / temp_f14; f32 f8 = v0tc0 - v1tc0;
temp_f12 = v0ob0 - v1ob0; f32 f12 = v0ob0 - v1ob0;
temp_f10 = (temp_f2 * temp_f12) - (v0ob0 - v2ob0); f32 f4 = v0tc0 - v2tc0;
var_f30 = ((temp_f2 * temp_f8) - (v0tc0 - v2tc0)) / temp_f10; f32 f6 = v0ob0 - v2ob0;
temp_f4_2 = v0tc1 - v1tc1; f32 f0 = f2 / f14 * f8;
sp40 = (temp_f8 - (temp_f12 * var_f30)) / temp_f14; f32 f10 = f2 / f14 * f12;
var_f24 = ((temp_f2 * temp_f4_2) - (v0tc1 - v2tc1)) / temp_f10;
var_f26 = (temp_f4_2 - (temp_f12 * var_f24)) / temp_f14; f32 f0b, f4a, f2b, f8a, f6a, f0c, f8b, f2c, f12a, f2d, f4b, f0d, f6b, f0e;
var_f2 = var_f26 * v0ob2;
var_f6 = (v0tc0 - (var_f30 * v0ob0)) - (sp40 * v0ob2); var_f30 = (f0 - f4) / (f10 - f6); // used later
var_f0 = v0tc1 - (var_f24 * v0ob0); f0b = f12 * var_f30;
f6a = var_f30 * v0ob0;
f4a = v0tc1 - v1tc1;
f2b = f2 / f14 * f4a;
f8a = f8 - f0b;
sp40 = f8a / f14; // used later
f8b = sp40 * v0ob2;
f0c = v0tc1 - v2tc1;
var_f24 = (f2b - f0c) / (f10 - f6); // used later
var_f26 = (f4a - f12 * var_f24) / f14; // used later
sp2C = v0tc0 - f6a - f8b; // used later
var_f20 = v0tc1 - var_f24 * v0ob0 - var_f26 * v0ob2; // used later
} }
sp2C = var_f6;
mdl_get_vertex_count(destGfx, &numVertices, &baseVtx, &gfxCount, destVertices); mdl_get_vertex_count(arg1, &sp18, &baseVtx, &sp20, arg3);
for (i = 0; i < numVertices; i++) { for (i = 0; i < sp18; i++) {
ob0 = baseVtx->v.ob[0]; ob0 = baseVtx->v.ob[0];
ob1 = baseVtx->v.ob[1]; ob1 = baseVtx->v.ob[1];
ob2 = baseVtx->v.ob[2]; ob2 = baseVtx->v.ob[2];
if (arg2 != NULL) {
if (destMtx != NULL) { var_f10 = (arg2[0][0] * ob0) + (arg2[1][0] * ob1) + (arg2[2][0] * ob2) + arg2[3][0];
var_f10 = (destMtx[0][0] * ob0) + (destMtx[1][0] * ob1) + (destMtx[2][0] * ob2) + destMtx[3][0]; var_f6_2 = (arg2[0][2] * ob0) + (arg2[1][2] * ob1) + (arg2[2][2] * ob2) + arg2[3][2];
var_f6_2 = (destMtx[0][2] * ob0) + (destMtx[1][2] * ob1) + (destMtx[2][2] * ob2) + destMtx[3][2];
} else { } else {
var_f10 = ob0; var_f10 = ob0;
var_f6_2 = ob2; var_f6_2 = ob2;
} }
tc0 = (var_f30 * var_f10) + (sp40 * var_f6_2) + sp2C; tc0 = (var_f30 * var_f10) + (sp40 * var_f6_2) + sp2C;
tc1 = (var_f24 * var_f10) + (var_f26 * var_f6_2) + (var_f0 - var_f2); tc1 = (var_f24 * var_f10) + (var_f26 * var_f6_2) + var_f20;
if (tc0 < 0.0f) { if (tc0 < 0.0f) {
tc0 -= 0.5; tc0 -= 0.5;
} else if (tc0 > 0.0f) { } else if (tc0 > 0.0f) {
@ -5849,15 +5852,12 @@ void mdl_project_tex_coords(s32 modelID, Gfx* destGfx, f32 (*destMtx)[4], void*
baseVtx->v.tc[0] = tc0; baseVtx->v.tc[0] = tc0;
baseVtx->v.tc[1] = tc1; baseVtx->v.tc[1] = tc1;
baseVtx->v.cn[0] = cn0; baseVtx->v.cn[0] = cnR;
baseVtx->v.cn[1] = cn1; baseVtx->v.cn[1] = cnG;
baseVtx->v.cn[2] = cn2; baseVtx->v.cn[2] = cnB;
baseVtx++; baseVtx++;
} }
} }
#else
INCLUDE_ASM(s32, "a5dd0_len_114e0", mdl_project_tex_coords);
#endif
// Checks if the center of a model is visible. // Checks if the center of a model is visible.
// If `depthQueryID` is nonnegative, the depth buffer is checked to see if the model's center is occluded by geometry. // If `depthQueryID` is nonnegative, the depth buffer is checked to see if the model's center is occluded by geometry.

View File

@ -272,6 +272,12 @@ void create_shading_palette(Matrix4f mtx, s32 uls, s32 ult, s32 lrs, s32 lrt, s3
} }
} }
extern int ENVIRONMENT;
extern int SHADE;
extern int COMBINED;
extern int COMBINED_ALPHA;
extern int TEXEL0_ALPHA;
// float regalloc // float regalloc
#ifdef NON_MATCHING #ifdef NON_MATCHING
void appendGfx_shading_palette( void appendGfx_shading_palette(
@ -289,19 +295,17 @@ void appendGfx_shading_palette(
f32 temp_f2; f32 temp_f2;
f32 var_f26; f32 var_f26;
f32 temp_f28 = 0; f32 temp_f28 = 0;
f32 temp_f6;
f32 temp_f6_2; f32 temp_f6_2;
f32 var_f12; f32 var_f12;
f32 var_f12_2;
f32 var_f20; f32 var_f20;
f32 var_f30; f32 var_f30;
f32 abc; f32 var_f26_2;
f32 ex, ey, ez; f32 ex, ey, ez;
f32 s1, s2, s3; float new_var3;
f32 new_var; f32 a1, a2;
var_f12 = (shadowX * shadowX) + (shadowY * shadowY) + (shadowZ * shadowZ); var_f12 = SQ(shadowX) + SQ(shadowY) + SQ(shadowZ);
if (var_f12 < 1.0) { if (var_f12 < 1.0) {
ambientPower *= var_f12; ambientPower *= var_f12;
@ -329,33 +333,34 @@ void appendGfx_shading_palette(
ez = mtx[2][2]; ez = mtx[2][2];
} }
s1 = ex * shadowX; a1 = ((ex * shadowX) + (ey * shadowY)) + (ez * shadowZ);
new_var3 = a1;
temp_f2 = camera->perspectiveMatrix[2][2];
var_f12 = camera->perspectiveMatrix[0][2];
new_var = (s1 + (ey * shadowY)) + (ez * shadowZ); var_f26 = var_f12;
ex = camera->perspectiveMatrix[2][2]; a1 = shadowX * -temp_f2;
//temp_f6_2 = (shadowX * (-ex)) + (shadowZ * camera->perspectiveMatrix[0][2]); temp_f6_2 = a1 + (var_f26 * shadowZ) ;
temp_f2 = -ex; if (new_var3 > 0.0f) {
temp_f1 = shadowX;
temp_f6_2 = (temp_f1 * temp_f2) + (shadowZ * camera->perspectiveMatrix[0][2]);
if (new_var > 0.0f) {
var_f26 = ambientPower * temp_f6_2; var_f26 = ambientPower * temp_f6_2;
} else { } else {
var_f26 = ambientPower; temp_f2 = ambientPower;
var_f26 = var_f26 * temp_f6_2; var_f26 = temp_f2 * temp_f6_2;
} }
var_f20 = SQ(temp_f1) + SQ(shadowZ);
var_f20 = SQ(shadowX) + SQ(shadowZ);
if (var_f20 != 0.0f) { if (var_f20 != 0.0f) {
var_f20 = sqrtf(var_f20); var_f20 = sqrtf(var_f20);
} }
temp_f0 = -mtx[0][1]; temp_f0 = -mtx[0][1];
temp_f1 = mtx[1][1]; temp_f1 = mtx[1][1];
temp_f2 = mtx[2][1]; temp_f2 = mtx[2][1];
var_f12_2 = SQ(temp_f0) + SQ(temp_f2); var_f12 = SQ(temp_f0) + SQ(temp_f2);
if (var_f12_2 != 0.0f) { if (var_f12 != 0.0f) {
var_f12_2 = sqrtf(var_f12_2); var_f12 = sqrtf(var_f12);
} }
temp_f28 = -((var_f20 * var_f12_2) + (shadowY * temp_f1)) * ambientPower;
temp_f28 = -((var_f20 * var_f12) + (shadowY * temp_f1)) * ambientPower;
if (shadowR > 255) { if (shadowR > 255) {
shadowR = 255; shadowR = 255;
@ -421,14 +426,14 @@ void appendGfx_shading_palette(
COMBINED, 0, 0, 0, COMBINED); COMBINED, 0, 0, 0, COMBINED);
} }
abc = var_f26; var_f26_2 = var_f26;
abc *= var_f30; var_f26_2 *= var_f30;
gDPSetTileSize( gDPSetTileSize(
gMainGfxPos++, gMainGfxPos++,
0, 0,
((uls + 0x100) << 2) + (s32)abc, ((uls + 0x100) << 2) + (s32)var_f26_2,
((ult + 0x100) << 2) + (s32)temp_f28, ((ult + 0x100) << 2) + (s32)temp_f28,
((lrs + 0x100 - 1) << 2) + (s32)abc, ((lrs + 0x100 - 1) << 2) + (s32)var_f26_2,
((lrt + 0x100 - 1) << 2) + (s32)temp_f28 ((lrt + 0x100 - 1) << 2) + (s32)temp_f28
); );
} }

View File

@ -1,332 +0,0 @@
.set noat /* allow manual use of $at */
.set noreorder /* don't insert nops after branches */
/* Generated by spimdisasm 1.11.1 */
glabel mdl_project_tex_coords
/* B15EC 8011A70C 27BDFF68 */ addiu $sp, $sp, -0x98
/* B15F0 8011A710 AFB40058 */ sw $s4, 0x58($sp)
/* B15F4 8011A714 00A0A02D */ daddu $s4, $a1, $zero
/* B15F8 8011A718 AFB00048 */ sw $s0, 0x48($sp)
/* B15FC 8011A71C 00C0802D */ daddu $s0, $a2, $zero
/* B1600 8011A720 AFB5005C */ sw $s5, 0x5C($sp)
/* B1604 8011A724 00E0A82D */ daddu $s5, $a3, $zero
/* B1608 8011A728 AFBF0060 */ sw $ra, 0x60($sp)
/* B160C 8011A72C AFB30054 */ sw $s3, 0x54($sp)
/* B1610 8011A730 AFB20050 */ sw $s2, 0x50($sp)
/* B1614 8011A734 AFB1004C */ sw $s1, 0x4C($sp)
/* B1618 8011A738 F7BE0090 */ sdc1 $f30, 0x90($sp)
/* B161C 8011A73C F7BC0088 */ sdc1 $f28, 0x88($sp)
/* B1620 8011A740 F7BA0080 */ sdc1 $f26, 0x80($sp)
/* B1624 8011A744 F7B80078 */ sdc1 $f24, 0x78($sp)
/* B1628 8011A748 F7B60070 */ sdc1 $f22, 0x70($sp)
/* B162C 8011A74C F7B40068 */ sdc1 $f20, 0x68($sp)
/* B1630 8011A750 0C0464FC */ jal get_model_list_index_from_tree_index
/* B1634 8011A754 3084FFFF */ andi $a0, $a0, 0xFFFF
/* B1638 8011A758 0C046444 */ jal get_model_from_list_index
/* B163C 8011A75C 0040202D */ daddu $a0, $v0, $zero
/* B1640 8011A760 8C420008 */ lw $v0, 0x8($v0)
/* B1644 8011A764 240600DF */ addiu $a2, $zero, 0xDF
/* B1648 8011A768 8C420004 */ lw $v0, 0x4($v0)
/* B164C 8011A76C 24050001 */ addiu $a1, $zero, 0x1
/* B1650 8011A770 8C420000 */ lw $v0, 0x0($v0)
.LIQUE_8011A774:
/* B1654 8011A774 90430000 */ lbu $v1, 0x0($v0)
/* B1658 8011A778 10660004 */ beq $v1, $a2, .LIQUE_8011A78C
/* B165C 8011A77C 8C440004 */ lw $a0, 0x4($v0)
/* B1660 8011A780 1465FFFC */ bne $v1, $a1, .LIQUE_8011A774
/* B1664 8011A784 24420008 */ addiu $v0, $v0, 0x8
/* B1668 8011A788 AFA4001C */ sw $a0, 0x1C($sp)
.LIQUE_8011A78C:
/* B166C 8011A78C 8FA2001C */ lw $v0, 0x1C($sp)
/* B1670 8011A790 84430000 */ lh $v1, 0x0($v0)
/* B1674 8011A794 84440010 */ lh $a0, 0x10($v0)
/* B1678 8011A798 44838000 */ mtc1 $v1, $f16
/* B167C 8011A79C 00000000 */ nop
/* B1680 8011A7A0 46808420 */ cvt.s.w $f16, $f16
/* B1684 8011A7A4 44842000 */ mtc1 $a0, $f4
/* B1688 8011A7A8 00000000 */ nop
/* B168C 8011A7AC 46802120 */ cvt.s.w $f4, $f4
/* B1690 8011A7B0 46048032 */ c.eq.s $f16, $f4
/* B1694 8011A7B4 84430004 */ lh $v1, 0x4($v0)
/* B1698 8011A7B8 84440008 */ lh $a0, 0x8($v0)
/* B169C 8011A7BC 44839000 */ mtc1 $v1, $f18
/* B16A0 8011A7C0 00000000 */ nop
/* B16A4 8011A7C4 468094A0 */ cvt.s.w $f18, $f18
/* B16A8 8011A7C8 4484A000 */ mtc1 $a0, $f20
/* B16AC 8011A7CC 00000000 */ nop
/* B16B0 8011A7D0 4680A520 */ cvt.s.w $f20, $f20
/* B16B4 8011A7D4 8443000A */ lh $v1, 0xA($v0)
/* B16B8 8011A7D8 84440014 */ lh $a0, 0x14($v0)
/* B16BC 8011A7DC 4483B000 */ mtc1 $v1, $f22
/* B16C0 8011A7E0 00000000 */ nop
/* B16C4 8011A7E4 4680B5A0 */ cvt.s.w $f22, $f22
/* B16C8 8011A7E8 44845000 */ mtc1 $a0, $f10
/* B16CC 8011A7EC 00000000 */ nop
/* B16D0 8011A7F0 468052A0 */ cvt.s.w $f10, $f10
/* B16D4 8011A7F4 E7B60038 */ swc1 $f22, 0x38($sp)
/* B16D8 8011A7F8 84430018 */ lh $v1, 0x18($v0)
/* B16DC 8011A7FC 8444001A */ lh $a0, 0x1A($v0)
/* B16E0 8011A800 44830000 */ mtc1 $v1, $f0
/* B16E4 8011A804 00000000 */ nop
/* B16E8 8011A808 46800020 */ cvt.s.w $f0, $f0
/* B16EC 8011A80C 4484E000 */ mtc1 $a0, $f28
/* B16F0 8011A810 00000000 */ nop
/* B16F4 8011A814 4680E720 */ cvt.s.w $f28, $f28
/* B16F8 8011A818 E7BC0024 */ swc1 $f28, 0x24($sp)
/* B16FC 8011A81C 84430020 */ lh $v1, 0x20($v0)
/* B1700 8011A820 84440024 */ lh $a0, 0x24($v0)
/* B1704 8011A824 4483C000 */ mtc1 $v1, $f24
/* B1708 8011A828 00000000 */ nop
/* B170C 8011A82C 4680C620 */ cvt.s.w $f24, $f24
/* B1710 8011A830 44843000 */ mtc1 $a0, $f6
/* B1714 8011A834 00000000 */ nop
/* B1718 8011A838 468031A0 */ cvt.s.w $f6, $f6
/* B171C 8011A83C 84430028 */ lh $v1, 0x28($v0)
/* B1720 8011A840 8444002A */ lh $a0, 0x2A($v0)
/* B1724 8011A844 4483D000 */ mtc1 $v1, $f26
/* B1728 8011A848 00000000 */ nop
/* B172C 8011A84C 4680D6A0 */ cvt.s.w $f26, $f26
/* B1730 8011A850 4484B000 */ mtc1 $a0, $f22
/* B1734 8011A854 00000000 */ nop
/* B1738 8011A858 4680B5A0 */ cvt.s.w $f22, $f22
/* B173C 8011A85C E7B60028 */ swc1 $f22, 0x28($sp)
/* B1740 8011A860 9053000C */ lbu $s3, 0xC($v0)
/* B1744 8011A864 9052000D */ lbu $s2, 0xD($v0)
/* B1748 8011A868 9051000E */ lbu $s1, 0xE($v0)
/* B174C 8011A86C 4503002E */ bc1tl .LIQUE_8011A928
/* B1750 8011A870 46069081 */ sub.s $f2, $f18, $f6
/* B1754 8011A874 46188081 */ sub.s $f2, $f16, $f24
/* B1758 8011A878 46048381 */ sub.s $f14, $f16, $f4
/* B175C 8011A87C 4600A201 */ sub.s $f8, $f20, $f0
/* B1760 8011A880 460E1083 */ div.s $f2, $f2, $f14
/* B1764 8011A884 46081002 */ mul.s $f0, $f2, $f8
/* B1768 8011A888 00000000 */ nop
/* B176C 8011A88C 460A9301 */ sub.s $f12, $f18, $f10
/* B1770 8011A890 460C1282 */ mul.s $f10, $f2, $f12
/* B1774 8011A894 00000000 */ nop
/* B1778 8011A898 461AA101 */ sub.s $f4, $f20, $f26
/* B177C 8011A89C 46069181 */ sub.s $f6, $f18, $f6
/* B1780 8011A8A0 46040001 */ sub.s $f0, $f0, $f4
/* B1784 8011A8A4 46065281 */ sub.s $f10, $f10, $f6
/* B1788 8011A8A8 460A0003 */ div.s $f0, $f0, $f10
/* B178C 8011A8AC E7A00040 */ swc1 $f0, 0x40($sp)
/* B1790 8011A8B0 46006002 */ mul.s $f0, $f12, $f0
/* B1794 8011A8B4 00000000 */ nop
/* B1798 8011A8B8 C7B60038 */ lwc1 $f22, 0x38($sp)
/* B179C 8011A8BC 461CB101 */ sub.s $f4, $f22, $f28
/* B17A0 8011A8C0 46041082 */ mul.s $f2, $f2, $f4
/* B17A4 8011A8C4 00000000 */ nop
/* B17A8 8011A8C8 46004201 */ sub.s $f8, $f8, $f0
/* B17AC 8011A8CC 460E4783 */ div.s $f30, $f8, $f14
/* B17B0 8011A8D0 4610F182 */ mul.s $f6, $f30, $f16
/* B17B4 8011A8D4 00000000 */ nop
/* B17B8 8011A8D8 C7BC0028 */ lwc1 $f28, 0x28($sp)
/* B17BC 8011A8DC 461CB001 */ sub.s $f0, $f22, $f28
/* B17C0 8011A8E0 C7B60040 */ lwc1 $f22, 0x40($sp)
/* B17C4 8011A8E4 4612B202 */ mul.s $f8, $f22, $f18
/* B17C8 8011A8E8 00000000 */ nop
/* B17CC 8011A8EC 46001081 */ sub.s $f2, $f2, $f0
/* B17D0 8011A8F0 460A1683 */ div.s $f26, $f2, $f10
/* B17D4 8011A8F4 461A6302 */ mul.s $f12, $f12, $f26
/* B17D8 8011A8F8 00000000 */ nop
/* B17DC 8011A8FC 4612D082 */ mul.s $f2, $f26, $f18
/* B17E0 8011A900 00000000 */ nop
/* B17E4 8011A904 460C2101 */ sub.s $f4, $f4, $f12
/* B17E8 8011A908 460E2603 */ div.s $f24, $f4, $f14
/* B17EC 8011A90C 4610C002 */ mul.s $f0, $f24, $f16
/* B17F0 8011A910 00000000 */ nop
/* B17F4 8011A914 4606A181 */ sub.s $f6, $f20, $f6
/* B17F8 8011A918 46083181 */ sub.s $f6, $f6, $f8
/* B17FC 8011A91C C7BC0038 */ lwc1 $f28, 0x38($sp)
/* B1800 8011A920 08046A74 */ j .LIQUE_8011A9D0
/* B1804 8011A924 4600E001 */ sub.s $f0, $f28, $f0
.LIQUE_8011A928:
/* B1808 8011A928 460A9381 */ sub.s $f14, $f18, $f10
/* B180C 8011A92C 4600A201 */ sub.s $f8, $f20, $f0
/* B1810 8011A930 460E1083 */ div.s $f2, $f2, $f14
/* B1814 8011A934 46081002 */ mul.s $f0, $f2, $f8
/* B1818 8011A938 00000000 */ nop
/* B181C 8011A93C 46048301 */ sub.s $f12, $f16, $f4
/* B1820 8011A940 460C1282 */ mul.s $f10, $f2, $f12
/* B1824 8011A944 00000000 */ nop
/* B1828 8011A948 461AA101 */ sub.s $f4, $f20, $f26
/* B182C 8011A94C 46188181 */ sub.s $f6, $f16, $f24
/* B1830 8011A950 46040001 */ sub.s $f0, $f0, $f4
/* B1834 8011A954 46065281 */ sub.s $f10, $f10, $f6
/* B1838 8011A958 460A0783 */ div.s $f30, $f0, $f10
/* B183C 8011A95C 461E6002 */ mul.s $f0, $f12, $f30
/* B1840 8011A960 00000000 */ nop
/* B1844 8011A964 4610F182 */ mul.s $f6, $f30, $f16
/* B1848 8011A968 00000000 */ nop
/* B184C 8011A96C C7B60038 */ lwc1 $f22, 0x38($sp)
/* B1850 8011A970 C7BC0024 */ lwc1 $f28, 0x24($sp)
/* B1854 8011A974 461CB101 */ sub.s $f4, $f22, $f28
/* B1858 8011A978 46041082 */ mul.s $f2, $f2, $f4
/* B185C 8011A97C 00000000 */ nop
/* B1860 8011A980 46004201 */ sub.s $f8, $f8, $f0
/* B1864 8011A984 460E4203 */ div.s $f8, $f8, $f14
/* B1868 8011A988 E7A80040 */ swc1 $f8, 0x40($sp)
/* B186C 8011A98C 46124202 */ mul.s $f8, $f8, $f18
/* B1870 8011A990 00000000 */ nop
/* B1874 8011A994 C7BC0028 */ lwc1 $f28, 0x28($sp)
/* B1878 8011A998 461CB001 */ sub.s $f0, $f22, $f28
/* B187C 8011A99C 46001081 */ sub.s $f2, $f2, $f0
/* B1880 8011A9A0 460A1603 */ div.s $f24, $f2, $f10
/* B1884 8011A9A4 46186302 */ mul.s $f12, $f12, $f24
/* B1888 8011A9A8 00000000 */ nop
/* B188C 8011A9AC 4610C002 */ mul.s $f0, $f24, $f16
/* B1890 8011A9B0 00000000 */ nop
/* B1894 8011A9B4 460C2101 */ sub.s $f4, $f4, $f12
/* B1898 8011A9B8 460E2683 */ div.s $f26, $f4, $f14
/* B189C 8011A9BC 4612D082 */ mul.s $f2, $f26, $f18
/* B18A0 8011A9C0 00000000 */ nop
/* B18A4 8011A9C4 4606A181 */ sub.s $f6, $f20, $f6
/* B18A8 8011A9C8 46083181 */ sub.s $f6, $f6, $f8
/* B18AC 8011A9CC 4600B001 */ sub.s $f0, $f22, $f0
.LIQUE_8011A9D0:
/* B18B0 8011A9D0 E7A6002C */ swc1 $f6, 0x2C($sp)
/* B18B4 8011A9D4 46020501 */ sub.s $f20, $f0, $f2
/* B18B8 8011A9D8 0280202D */ daddu $a0, $s4, $zero
/* B18BC 8011A9DC 27A50018 */ addiu $a1, $sp, 0x18
/* B18C0 8011A9E0 27A6001C */ addiu $a2, $sp, 0x1C
/* B18C4 8011A9E4 27A70020 */ addiu $a3, $sp, 0x20
/* B18C8 8011A9E8 0C046902 */ jal mdl_get_vertex_count
/* B18CC 8011A9EC AFB50010 */ sw $s5, 0x10($sp)
/* B18D0 8011A9F0 8FA20018 */ lw $v0, 0x18($sp)
/* B18D4 8011A9F4 1840006E */ blez $v0, .LIQUE_8011ABB0
/* B18D8 8011A9F8 0000282D */ daddu $a1, $zero, $zero
/* B18DC 8011A9FC 44809000 */ mtc1 $zero, $f18
/* B18E0 8011AA00 3C013FE0 */ lui $at, (0x3FE00000 >> 16)
/* B18E4 8011AA04 44818800 */ mtc1 $at, $f17
/* B18E8 8011AA08 44808000 */ mtc1 $zero, $f16
.LIQUE_8011AA0C:
/* B18EC 8011AA0C 8FA3001C */ lw $v1, 0x1C($sp)
/* B18F0 8011AA10 84620000 */ lh $v0, 0x0($v1)
/* B18F4 8011AA14 44823000 */ mtc1 $v0, $f6
/* B18F8 8011AA18 00000000 */ nop
/* B18FC 8011AA1C 468031A0 */ cvt.s.w $f6, $f6
/* B1900 8011AA20 84620002 */ lh $v0, 0x2($v1)
/* B1904 8011AA24 84630004 */ lh $v1, 0x4($v1)
/* B1908 8011AA28 44827000 */ mtc1 $v0, $f14
/* B190C 8011AA2C 00000000 */ nop
/* B1910 8011AA30 468073A0 */ cvt.s.w $f14, $f14
/* B1914 8011AA34 44836000 */ mtc1 $v1, $f12
/* B1918 8011AA38 00000000 */ nop
/* B191C 8011AA3C 46806320 */ cvt.s.w $f12, $f12
/* B1920 8011AA40 1200001C */ beqz $s0, .LIQUE_8011AAB4
/* B1924 8011AA44 46003286 */ mov.s $f10, $f6
/* B1928 8011AA48 C6040000 */ lwc1 $f4, 0x0($s0)
/* B192C 8011AA4C 46062102 */ mul.s $f4, $f4, $f6
/* B1930 8011AA50 00000000 */ nop
/* B1934 8011AA54 C60A0010 */ lwc1 $f10, 0x10($s0)
/* B1938 8011AA58 460E5282 */ mul.s $f10, $f10, $f14
/* B193C 8011AA5C 00000000 */ nop
/* B1940 8011AA60 C6000020 */ lwc1 $f0, 0x20($s0)
/* B1944 8011AA64 460C0002 */ mul.s $f0, $f0, $f12
/* B1948 8011AA68 00000000 */ nop
/* B194C 8011AA6C C6020008 */ lwc1 $f2, 0x8($s0)
/* B1950 8011AA70 46061082 */ mul.s $f2, $f2, $f6
/* B1954 8011AA74 00000000 */ nop
/* B1958 8011AA78 C6080018 */ lwc1 $f8, 0x18($s0)
/* B195C 8011AA7C 460E4202 */ mul.s $f8, $f8, $f14
/* B1960 8011AA80 00000000 */ nop
/* B1964 8011AA84 C6060028 */ lwc1 $f6, 0x28($s0)
/* B1968 8011AA88 460C3182 */ mul.s $f6, $f6, $f12
/* B196C 8011AA8C 00000000 */ nop
/* B1970 8011AA90 460A2100 */ add.s $f4, $f4, $f10
/* B1974 8011AA94 46081080 */ add.s $f2, $f2, $f8
/* B1978 8011AA98 46002100 */ add.s $f4, $f4, $f0
/* B197C 8011AA9C 46061080 */ add.s $f2, $f2, $f6
/* B1980 8011AAA0 C6000030 */ lwc1 $f0, 0x30($s0)
/* B1984 8011AAA4 46002280 */ add.s $f10, $f4, $f0
/* B1988 8011AAA8 C6000038 */ lwc1 $f0, 0x38($s0)
/* B198C 8011AAAC 08046AAE */ j .LIQUE_8011AAB8
/* B1990 8011AAB0 46001180 */ add.s $f6, $f2, $f0
.LIQUE_8011AAB4:
/* B1994 8011AAB4 46006186 */ mov.s $f6, $f12
.LIQUE_8011AAB8:
/* B1998 8011AAB8 460AF002 */ mul.s $f0, $f30, $f10
/* B199C 8011AABC 00000000 */ nop
/* B19A0 8011AAC0 460AC082 */ mul.s $f2, $f24, $f10
/* B19A4 8011AAC4 00000000 */ nop
/* B19A8 8011AAC8 C7B60040 */ lwc1 $f22, 0x40($sp)
/* B19AC 8011AACC 4606B102 */ mul.s $f4, $f22, $f6
/* B19B0 8011AAD0 00000000 */ nop
/* B19B4 8011AAD4 4606D182 */ mul.s $f6, $f26, $f6
/* B19B8 8011AAD8 00000000 */ nop
/* B19BC 8011AADC 46040000 */ add.s $f0, $f0, $f4
/* B19C0 8011AAE0 46061080 */ add.s $f2, $f2, $f6
/* B19C4 8011AAE4 C7BC002C */ lwc1 $f28, 0x2C($sp)
/* B19C8 8011AAE8 461C0100 */ add.s $f4, $f0, $f28
/* B19CC 8011AAEC 4612203C */ c.lt.s $f4, $f18
/* B19D0 8011AAF0 00000000 */ nop
/* B19D4 8011AAF4 45000004 */ bc1f .LIQUE_8011AB08
/* B19D8 8011AAF8 46141080 */ add.s $f2, $f2, $f20
/* B19DC 8011AAFC 46002021 */ cvt.d.s $f0, $f4
/* B19E0 8011AB00 08046AC8 */ j .LIQUE_8011AB20
/* B19E4 8011AB04 46300001 */ sub.d $f0, $f0, $f16
.LIQUE_8011AB08:
/* B19E8 8011AB08 4604903C */ c.lt.s $f18, $f4
/* B19EC 8011AB0C 00000000 */ nop
/* B19F0 8011AB10 45000004 */ bc1f .LIQUE_8011AB24
/* B19F4 8011AB14 00000000 */ nop
/* B19F8 8011AB18 46002021 */ cvt.d.s $f0, $f4
/* B19FC 8011AB1C 46300000 */ add.d $f0, $f0, $f16
.LIQUE_8011AB20:
/* B1A00 8011AB20 46200120 */ cvt.s.d $f4, $f0
.LIQUE_8011AB24:
/* B1A04 8011AB24 4612103C */ c.lt.s $f2, $f18
/* B1A08 8011AB28 00000000 */ nop
/* B1A0C 8011AB2C 45000004 */ bc1f .LIQUE_8011AB40
/* B1A10 8011AB30 00000000 */ nop
/* B1A14 8011AB34 46001021 */ cvt.d.s $f0, $f2
/* B1A18 8011AB38 08046AD6 */ j .LIQUE_8011AB58
/* B1A1C 8011AB3C 46300001 */ sub.d $f0, $f0, $f16
.LIQUE_8011AB40:
/* B1A20 8011AB40 4602903C */ c.lt.s $f18, $f2
/* B1A24 8011AB44 00000000 */ nop
/* B1A28 8011AB48 45000004 */ bc1f .LIQUE_8011AB5C
/* B1A2C 8011AB4C 00000000 */ nop
/* B1A30 8011AB50 46001021 */ cvt.d.s $f0, $f2
/* B1A34 8011AB54 46300000 */ add.d $f0, $f0, $f16
.LIQUE_8011AB58:
/* B1A38 8011AB58 462000A0 */ cvt.s.d $f2, $f0
.LIQUE_8011AB5C:
/* B1A3C 8011AB5C 8FA3001C */ lw $v1, 0x1C($sp)
/* B1A40 8011AB60 4600258D */ trunc.w.s $f22, $f4
/* B1A44 8011AB64 4402B000 */ mfc1 $v0, $f22
/* B1A48 8011AB68 00000000 */ nop
/* B1A4C 8011AB6C A4620008 */ sh $v0, 0x8($v1)
/* B1A50 8011AB70 A073000C */ sb $s3, 0xC($v1)
/* B1A54 8011AB74 8FA4001C */ lw $a0, 0x1C($sp)
/* B1A58 8011AB78 4600158D */ trunc.w.s $f22, $f2
/* B1A5C 8011AB7C 4402B000 */ mfc1 $v0, $f22
/* B1A60 8011AB80 00000000 */ nop
/* B1A64 8011AB84 A462000A */ sh $v0, 0xA($v1)
/* B1A68 8011AB88 A092000D */ sb $s2, 0xD($a0)
/* B1A6C 8011AB8C 8FA2001C */ lw $v0, 0x1C($sp)
/* B1A70 8011AB90 24A50001 */ addiu $a1, $a1, 0x1
/* B1A74 8011AB94 A051000E */ sb $s1, 0xE($v0)
/* B1A78 8011AB98 8FA2001C */ lw $v0, 0x1C($sp)
/* B1A7C 8011AB9C 8FA30018 */ lw $v1, 0x18($sp)
/* B1A80 8011ABA0 24420010 */ addiu $v0, $v0, 0x10
/* B1A84 8011ABA4 00A3182A */ slt $v1, $a1, $v1
/* B1A88 8011ABA8 1460FF98 */ bnez $v1, .LIQUE_8011AA0C
/* B1A8C 8011ABAC AFA2001C */ sw $v0, 0x1C($sp)
.LIQUE_8011ABB0:
/* B1A90 8011ABB0 8FBF0060 */ lw $ra, 0x60($sp)
/* B1A94 8011ABB4 8FB5005C */ lw $s5, 0x5C($sp)
/* B1A98 8011ABB8 8FB40058 */ lw $s4, 0x58($sp)
/* B1A9C 8011ABBC 8FB30054 */ lw $s3, 0x54($sp)
/* B1AA0 8011ABC0 8FB20050 */ lw $s2, 0x50($sp)
/* B1AA4 8011ABC4 8FB1004C */ lw $s1, 0x4C($sp)
/* B1AA8 8011ABC8 8FB00048 */ lw $s0, 0x48($sp)
/* B1AAC 8011ABCC D7BE0090 */ ldc1 $f30, 0x90($sp)
/* B1AB0 8011ABD0 D7BC0088 */ ldc1 $f28, 0x88($sp)
/* B1AB4 8011ABD4 D7BA0080 */ ldc1 $f26, 0x80($sp)
/* B1AB8 8011ABD8 D7B80078 */ ldc1 $f24, 0x78($sp)
/* B1ABC 8011ABDC D7B60070 */ ldc1 $f22, 0x70($sp)
/* B1AC0 8011ABE0 D7B40068 */ ldc1 $f20, 0x68($sp)
/* B1AC4 8011ABE4 03E00008 */ jr $ra
/* B1AC8 8011ABE8 27BD0098 */ addiu $sp, $sp, 0x98

View File

@ -1,330 +0,0 @@
.set noat # allow manual use of $at
.set noreorder # don't insert nops after branches
glabel mdl_project_tex_coords
/* B2A2C 8011C32C 27BDFF68 */ addiu $sp, $sp, -0x98
/* B2A30 8011C330 AFB40058 */ sw $s4, 0x58($sp)
/* B2A34 8011C334 00A0A02D */ daddu $s4, $a1, $zero
/* B2A38 8011C338 AFB00048 */ sw $s0, 0x48($sp)
/* B2A3C 8011C33C 00C0802D */ daddu $s0, $a2, $zero
/* B2A40 8011C340 AFB5005C */ sw $s5, 0x5c($sp)
/* B2A44 8011C344 00E0A82D */ daddu $s5, $a3, $zero
/* B2A48 8011C348 AFBF0060 */ sw $ra, 0x60($sp)
/* B2A4C 8011C34C AFB30054 */ sw $s3, 0x54($sp)
/* B2A50 8011C350 AFB20050 */ sw $s2, 0x50($sp)
/* B2A54 8011C354 AFB1004C */ sw $s1, 0x4c($sp)
/* B2A58 8011C358 F7BE0090 */ sdc1 $f30, 0x90($sp)
/* B2A5C 8011C35C F7BC0088 */ sdc1 $f28, 0x88($sp)
/* B2A60 8011C360 F7BA0080 */ sdc1 $f26, 0x80($sp)
/* B2A64 8011C364 F7B80078 */ sdc1 $f24, 0x78($sp)
/* B2A68 8011C368 F7B60070 */ sdc1 $f22, 0x70($sp)
/* B2A6C 8011C36C F7B40068 */ sdc1 $f20, 0x68($sp)
/* B2A70 8011C370 0C046C04 */ jal get_model_list_index_from_tree_index
/* B2A74 8011C374 3084FFFF */ andi $a0, $a0, 0xffff
/* B2A78 8011C378 0C046B4C */ jal get_model_from_list_index
/* B2A7C 8011C37C 0040202D */ daddu $a0, $v0, $zero
/* B2A80 8011C380 8C420008 */ lw $v0, 8($v0)
/* B2A84 8011C384 240600DF */ addiu $a2, $zero, 0xdf
/* B2A88 8011C388 8C420004 */ lw $v0, 4($v0)
/* B2A8C 8011C38C 24050001 */ addiu $a1, $zero, 1
/* B2A90 8011C390 8C420000 */ lw $v0, ($v0)
.L8011C394:
/* B2A94 8011C394 90430000 */ lbu $v1, ($v0)
/* B2A98 8011C398 10660004 */ beq $v1, $a2, .L8011C3AC
/* B2A9C 8011C39C 8C440004 */ lw $a0, 4($v0)
/* B2AA0 8011C3A0 1465FFFC */ bne $v1, $a1, .L8011C394
/* B2AA4 8011C3A4 24420008 */ addiu $v0, $v0, 8
/* B2AA8 8011C3A8 AFA4001C */ sw $a0, 0x1c($sp)
.L8011C3AC:
/* B2AAC 8011C3AC 8FA2001C */ lw $v0, 0x1c($sp)
/* B2AB0 8011C3B0 84430000 */ lh $v1, ($v0)
/* B2AB4 8011C3B4 84440010 */ lh $a0, 0x10($v0)
/* B2AB8 8011C3B8 44838000 */ mtc1 $v1, $f16
/* B2ABC 8011C3BC 00000000 */ nop
/* B2AC0 8011C3C0 46808420 */ cvt.s.w $f16, $f16
/* B2AC4 8011C3C4 44842000 */ mtc1 $a0, $f4
/* B2AC8 8011C3C8 00000000 */ nop
/* B2ACC 8011C3CC 46802120 */ cvt.s.w $f4, $f4
/* B2AD0 8011C3D0 46048032 */ c.eq.s $f16, $f4
/* B2AD4 8011C3D4 84430004 */ lh $v1, 4($v0)
/* B2AD8 8011C3D8 84440008 */ lh $a0, 8($v0)
/* B2ADC 8011C3DC 44839000 */ mtc1 $v1, $f18
/* B2AE0 8011C3E0 00000000 */ nop
/* B2AE4 8011C3E4 468094A0 */ cvt.s.w $f18, $f18
/* B2AE8 8011C3E8 4484A000 */ mtc1 $a0, $f20
/* B2AEC 8011C3EC 00000000 */ nop
/* B2AF0 8011C3F0 4680A520 */ cvt.s.w $f20, $f20
/* B2AF4 8011C3F4 8443000A */ lh $v1, 0xa($v0)
/* B2AF8 8011C3F8 84440014 */ lh $a0, 0x14($v0)
/* B2AFC 8011C3FC 4483B000 */ mtc1 $v1, $f22
/* B2B00 8011C400 00000000 */ nop
/* B2B04 8011C404 4680B5A0 */ cvt.s.w $f22, $f22
/* B2B08 8011C408 44845000 */ mtc1 $a0, $f10
/* B2B0C 8011C40C 00000000 */ nop
/* B2B10 8011C410 468052A0 */ cvt.s.w $f10, $f10
/* B2B14 8011C414 E7B60038 */ swc1 $f22, 0x38($sp)
/* B2B18 8011C418 84430018 */ lh $v1, 0x18($v0)
/* B2B1C 8011C41C 8444001A */ lh $a0, 0x1a($v0)
/* B2B20 8011C420 44830000 */ mtc1 $v1, $f0
/* B2B24 8011C424 00000000 */ nop
/* B2B28 8011C428 46800020 */ cvt.s.w $f0, $f0
/* B2B2C 8011C42C 4484E000 */ mtc1 $a0, $f28
/* B2B30 8011C430 00000000 */ nop
/* B2B34 8011C434 4680E720 */ cvt.s.w $f28, $f28
/* B2B38 8011C438 E7BC0024 */ swc1 $f28, 0x24($sp)
/* B2B3C 8011C43C 84430020 */ lh $v1, 0x20($v0)
/* B2B40 8011C440 84440024 */ lh $a0, 0x24($v0)
/* B2B44 8011C444 4483C000 */ mtc1 $v1, $f24
/* B2B48 8011C448 00000000 */ nop
/* B2B4C 8011C44C 4680C620 */ cvt.s.w $f24, $f24
/* B2B50 8011C450 44843000 */ mtc1 $a0, $f6
/* B2B54 8011C454 00000000 */ nop
/* B2B58 8011C458 468031A0 */ cvt.s.w $f6, $f6
/* B2B5C 8011C45C 84430028 */ lh $v1, 0x28($v0)
/* B2B60 8011C460 8444002A */ lh $a0, 0x2a($v0)
/* B2B64 8011C464 4483D000 */ mtc1 $v1, $f26
/* B2B68 8011C468 00000000 */ nop
/* B2B6C 8011C46C 4680D6A0 */ cvt.s.w $f26, $f26
/* B2B70 8011C470 4484B000 */ mtc1 $a0, $f22
/* B2B74 8011C474 00000000 */ nop
/* B2B78 8011C478 4680B5A0 */ cvt.s.w $f22, $f22
/* B2B7C 8011C47C E7B60028 */ swc1 $f22, 0x28($sp)
/* B2B80 8011C480 9053000C */ lbu $s3, 0xc($v0)
/* B2B84 8011C484 9052000D */ lbu $s2, 0xd($v0)
/* B2B88 8011C488 9051000E */ lbu $s1, 0xe($v0)
/* B2B8C 8011C48C 4503002E */ bc1tl .L8011C548
/* B2B90 8011C490 46069081 */ sub.s $f2, $f18, $f6
/* B2B94 8011C494 46188081 */ sub.s $f2, $f16, $f24
/* B2B98 8011C498 46048381 */ sub.s $f14, $f16, $f4
/* B2B9C 8011C49C 4600A201 */ sub.s $f8, $f20, $f0
/* B2BA0 8011C4A0 460E1083 */ div.s $f2, $f2, $f14
/* B2BA4 8011C4A4 46081002 */ mul.s $f0, $f2, $f8
/* B2BA8 8011C4A8 00000000 */ nop
/* B2BAC 8011C4AC 460A9301 */ sub.s $f12, $f18, $f10
/* B2BB0 8011C4B0 460C1282 */ mul.s $f10, $f2, $f12
/* B2BB4 8011C4B4 00000000 */ nop
/* B2BB8 8011C4B8 461AA101 */ sub.s $f4, $f20, $f26
/* B2BBC 8011C4BC 46069181 */ sub.s $f6, $f18, $f6
/* B2BC0 8011C4C0 46040001 */ sub.s $f0, $f0, $f4
/* B2BC4 8011C4C4 46065281 */ sub.s $f10, $f10, $f6
/* B2BC8 8011C4C8 460A0003 */ div.s $f0, $f0, $f10
/* B2BCC 8011C4CC E7A00040 */ swc1 $f0, 0x40($sp)
/* B2BD0 8011C4D0 46006002 */ mul.s $f0, $f12, $f0
/* B2BD4 8011C4D4 00000000 */ nop
/* B2BD8 8011C4D8 C7B60038 */ lwc1 $f22, 0x38($sp)
/* B2BDC 8011C4DC 461CB101 */ sub.s $f4, $f22, $f28
/* B2BE0 8011C4E0 46041082 */ mul.s $f2, $f2, $f4
/* B2BE4 8011C4E4 00000000 */ nop
/* B2BE8 8011C4E8 46004201 */ sub.s $f8, $f8, $f0
/* B2BEC 8011C4EC 460E4783 */ div.s $f30, $f8, $f14
/* B2BF0 8011C4F0 4610F182 */ mul.s $f6, $f30, $f16
/* B2BF4 8011C4F4 00000000 */ nop
/* B2BF8 8011C4F8 C7BC0028 */ lwc1 $f28, 0x28($sp)
/* B2BFC 8011C4FC 461CB001 */ sub.s $f0, $f22, $f28
/* B2C00 8011C500 C7B60040 */ lwc1 $f22, 0x40($sp)
/* B2C04 8011C504 4612B202 */ mul.s $f8, $f22, $f18
/* B2C08 8011C508 00000000 */ nop
/* B2C0C 8011C50C 46001081 */ sub.s $f2, $f2, $f0
/* B2C10 8011C510 460A1683 */ div.s $f26, $f2, $f10
/* B2C14 8011C514 461A6302 */ mul.s $f12, $f12, $f26
/* B2C18 8011C518 00000000 */ nop
/* B2C1C 8011C51C 4612D082 */ mul.s $f2, $f26, $f18
/* B2C20 8011C520 00000000 */ nop
/* B2C24 8011C524 460C2101 */ sub.s $f4, $f4, $f12
/* B2C28 8011C528 460E2603 */ div.s $f24, $f4, $f14
/* B2C2C 8011C52C 4610C002 */ mul.s $f0, $f24, $f16
/* B2C30 8011C530 00000000 */ nop
/* B2C34 8011C534 4606A181 */ sub.s $f6, $f20, $f6
/* B2C38 8011C538 46083181 */ sub.s $f6, $f6, $f8
/* B2C3C 8011C53C C7BC0038 */ lwc1 $f28, 0x38($sp)
/* B2C40 8011C540 0804717C */ j .L8011C5F0
/* B2C44 8011C544 4600E001 */ sub.s $f0, $f28, $f0
.L8011C548:
/* B2C48 8011C548 460A9381 */ sub.s $f14, $f18, $f10
/* B2C4C 8011C54C 4600A201 */ sub.s $f8, $f20, $f0
/* B2C50 8011C550 460E1083 */ div.s $f2, $f2, $f14
/* B2C54 8011C554 46081002 */ mul.s $f0, $f2, $f8
/* B2C58 8011C558 00000000 */ nop
/* B2C5C 8011C55C 46048301 */ sub.s $f12, $f16, $f4
/* B2C60 8011C560 460C1282 */ mul.s $f10, $f2, $f12
/* B2C64 8011C564 00000000 */ nop
/* B2C68 8011C568 461AA101 */ sub.s $f4, $f20, $f26
/* B2C6C 8011C56C 46188181 */ sub.s $f6, $f16, $f24
/* B2C70 8011C570 46040001 */ sub.s $f0, $f0, $f4
/* B2C74 8011C574 46065281 */ sub.s $f10, $f10, $f6
/* B2C78 8011C578 460A0783 */ div.s $f30, $f0, $f10
/* B2C7C 8011C57C 461E6002 */ mul.s $f0, $f12, $f30
/* B2C80 8011C580 00000000 */ nop
/* B2C84 8011C584 4610F182 */ mul.s $f6, $f30, $f16
/* B2C88 8011C588 00000000 */ nop
/* B2C8C 8011C58C C7B60038 */ lwc1 $f22, 0x38($sp)
/* B2C90 8011C590 C7BC0024 */ lwc1 $f28, 0x24($sp)
/* B2C94 8011C594 461CB101 */ sub.s $f4, $f22, $f28
/* B2C98 8011C598 46041082 */ mul.s $f2, $f2, $f4
/* B2C9C 8011C59C 00000000 */ nop
/* B2CA0 8011C5A0 46004201 */ sub.s $f8, $f8, $f0
/* B2CA4 8011C5A4 460E4203 */ div.s $f8, $f8, $f14
/* B2CA8 8011C5A8 E7A80040 */ swc1 $f8, 0x40($sp)
/* B2CAC 8011C5AC 46124202 */ mul.s $f8, $f8, $f18
/* B2CB0 8011C5B0 00000000 */ nop
/* B2CB4 8011C5B4 C7BC0028 */ lwc1 $f28, 0x28($sp)
/* B2CB8 8011C5B8 461CB001 */ sub.s $f0, $f22, $f28
/* B2CBC 8011C5BC 46001081 */ sub.s $f2, $f2, $f0
/* B2CC0 8011C5C0 460A1603 */ div.s $f24, $f2, $f10
/* B2CC4 8011C5C4 46186302 */ mul.s $f12, $f12, $f24
/* B2CC8 8011C5C8 00000000 */ nop
/* B2CCC 8011C5CC 4610C002 */ mul.s $f0, $f24, $f16
/* B2CD0 8011C5D0 00000000 */ nop
/* B2CD4 8011C5D4 460C2101 */ sub.s $f4, $f4, $f12
/* B2CD8 8011C5D8 460E2683 */ div.s $f26, $f4, $f14
/* B2CDC 8011C5DC 4612D082 */ mul.s $f2, $f26, $f18
/* B2CE0 8011C5E0 00000000 */ nop
/* B2CE4 8011C5E4 4606A181 */ sub.s $f6, $f20, $f6
/* B2CE8 8011C5E8 46083181 */ sub.s $f6, $f6, $f8
/* B2CEC 8011C5EC 4600B001 */ sub.s $f0, $f22, $f0
.L8011C5F0:
/* B2CF0 8011C5F0 E7A6002C */ swc1 $f6, 0x2c($sp)
/* B2CF4 8011C5F4 46020501 */ sub.s $f20, $f0, $f2
/* B2CF8 8011C5F8 0280202D */ daddu $a0, $s4, $zero
/* B2CFC 8011C5FC 27A50018 */ addiu $a1, $sp, 0x18
/* B2D00 8011C600 27A6001C */ addiu $a2, $sp, 0x1c
/* B2D04 8011C604 27A70020 */ addiu $a3, $sp, 0x20
/* B2D08 8011C608 0C04700A */ jal mdl_get_vertex_count
/* B2D0C 8011C60C AFB50010 */ sw $s5, 0x10($sp)
/* B2D10 8011C610 8FA20018 */ lw $v0, 0x18($sp)
/* B2D14 8011C614 1840006E */ blez $v0, .L8011C7D0
/* B2D18 8011C618 0000282D */ daddu $a1, $zero, $zero
/* B2D1C 8011C61C 44809000 */ mtc1 $zero, $f18
/* B2D20 8011C620 3C013FE0 */ lui $at, 0x3fe0
/* B2D24 8011C624 44818800 */ mtc1 $at, $f17
/* B2D28 8011C628 44808000 */ mtc1 $zero, $f16
.L8011C62C:
/* B2D2C 8011C62C 8FA3001C */ lw $v1, 0x1c($sp)
/* B2D30 8011C630 84620000 */ lh $v0, ($v1)
/* B2D34 8011C634 44823000 */ mtc1 $v0, $f6
/* B2D38 8011C638 00000000 */ nop
/* B2D3C 8011C63C 468031A0 */ cvt.s.w $f6, $f6
/* B2D40 8011C640 84620002 */ lh $v0, 2($v1)
/* B2D44 8011C644 84630004 */ lh $v1, 4($v1)
/* B2D48 8011C648 44827000 */ mtc1 $v0, $f14
/* B2D4C 8011C64C 00000000 */ nop
/* B2D50 8011C650 468073A0 */ cvt.s.w $f14, $f14
/* B2D54 8011C654 44836000 */ mtc1 $v1, $f12
/* B2D58 8011C658 00000000 */ nop
/* B2D5C 8011C65C 46806320 */ cvt.s.w $f12, $f12
/* B2D60 8011C660 1200001C */ beqz $s0, .L8011C6D4
/* B2D64 8011C664 46003286 */ mov.s $f10, $f6
/* B2D68 8011C668 C6040000 */ lwc1 $f4, ($s0)
/* B2D6C 8011C66C 46062102 */ mul.s $f4, $f4, $f6
/* B2D70 8011C670 00000000 */ nop
/* B2D74 8011C674 C60A0010 */ lwc1 $f10, 0x10($s0)
/* B2D78 8011C678 460E5282 */ mul.s $f10, $f10, $f14
/* B2D7C 8011C67C 00000000 */ nop
/* B2D80 8011C680 C6000020 */ lwc1 $f0, 0x20($s0)
/* B2D84 8011C684 460C0002 */ mul.s $f0, $f0, $f12
/* B2D88 8011C688 00000000 */ nop
/* B2D8C 8011C68C C6020008 */ lwc1 $f2, 8($s0)
/* B2D90 8011C690 46061082 */ mul.s $f2, $f2, $f6
/* B2D94 8011C694 00000000 */ nop
/* B2D98 8011C698 C6080018 */ lwc1 $f8, 0x18($s0)
/* B2D9C 8011C69C 460E4202 */ mul.s $f8, $f8, $f14
/* B2DA0 8011C6A0 00000000 */ nop
/* B2DA4 8011C6A4 C6060028 */ lwc1 $f6, 0x28($s0)
/* B2DA8 8011C6A8 460C3182 */ mul.s $f6, $f6, $f12
/* B2DAC 8011C6AC 00000000 */ nop
/* B2DB0 8011C6B0 460A2100 */ add.s $f4, $f4, $f10
/* B2DB4 8011C6B4 46081080 */ add.s $f2, $f2, $f8
/* B2DB8 8011C6B8 46002100 */ add.s $f4, $f4, $f0
/* B2DBC 8011C6BC 46061080 */ add.s $f2, $f2, $f6
/* B2DC0 8011C6C0 C6000030 */ lwc1 $f0, 0x30($s0)
/* B2DC4 8011C6C4 46002280 */ add.s $f10, $f4, $f0
/* B2DC8 8011C6C8 C6000038 */ lwc1 $f0, 0x38($s0)
/* B2DCC 8011C6CC 080471B6 */ j .L8011C6D8
/* B2DD0 8011C6D0 46001180 */ add.s $f6, $f2, $f0
.L8011C6D4:
/* B2DD4 8011C6D4 46006186 */ mov.s $f6, $f12
.L8011C6D8:
/* B2DD8 8011C6D8 460AF002 */ mul.s $f0, $f30, $f10
/* B2DDC 8011C6DC 00000000 */ nop
/* B2DE0 8011C6E0 460AC082 */ mul.s $f2, $f24, $f10
/* B2DE4 8011C6E4 00000000 */ nop
/* B2DE8 8011C6E8 C7B60040 */ lwc1 $f22, 0x40($sp)
/* B2DEC 8011C6EC 4606B102 */ mul.s $f4, $f22, $f6
/* B2DF0 8011C6F0 00000000 */ nop
/* B2DF4 8011C6F4 4606D182 */ mul.s $f6, $f26, $f6
/* B2DF8 8011C6F8 00000000 */ nop
/* B2DFC 8011C6FC 46040000 */ add.s $f0, $f0, $f4
/* B2E00 8011C700 46061080 */ add.s $f2, $f2, $f6
/* B2E04 8011C704 C7BC002C */ lwc1 $f28, 0x2c($sp)
/* B2E08 8011C708 461C0100 */ add.s $f4, $f0, $f28
/* B2E0C 8011C70C 4612203C */ c.lt.s $f4, $f18
/* B2E10 8011C710 00000000 */ nop
/* B2E14 8011C714 45000004 */ bc1f .L8011C728
/* B2E18 8011C718 46141080 */ add.s $f2, $f2, $f20
/* B2E1C 8011C71C 46002021 */ cvt.d.s $f0, $f4
/* B2E20 8011C720 080471D0 */ j .L8011C740
/* B2E24 8011C724 46300001 */ sub.d $f0, $f0, $f16
.L8011C728:
/* B2E28 8011C728 4604903C */ c.lt.s $f18, $f4
/* B2E2C 8011C72C 00000000 */ nop
/* B2E30 8011C730 45000004 */ bc1f .L8011C744
/* B2E34 8011C734 00000000 */ nop
/* B2E38 8011C738 46002021 */ cvt.d.s $f0, $f4
/* B2E3C 8011C73C 46300000 */ add.d $f0, $f0, $f16
.L8011C740:
/* B2E40 8011C740 46200120 */ cvt.s.d $f4, $f0
.L8011C744:
/* B2E44 8011C744 4612103C */ c.lt.s $f2, $f18
/* B2E48 8011C748 00000000 */ nop
/* B2E4C 8011C74C 45000004 */ bc1f .L8011C760
/* B2E50 8011C750 00000000 */ nop
/* B2E54 8011C754 46001021 */ cvt.d.s $f0, $f2
/* B2E58 8011C758 080471DE */ j .L8011C778
/* B2E5C 8011C75C 46300001 */ sub.d $f0, $f0, $f16
.L8011C760:
/* B2E60 8011C760 4602903C */ c.lt.s $f18, $f2
/* B2E64 8011C764 00000000 */ nop
/* B2E68 8011C768 45000004 */ bc1f .L8011C77C
/* B2E6C 8011C76C 00000000 */ nop
/* B2E70 8011C770 46001021 */ cvt.d.s $f0, $f2
/* B2E74 8011C774 46300000 */ add.d $f0, $f0, $f16
.L8011C778:
/* B2E78 8011C778 462000A0 */ cvt.s.d $f2, $f0
.L8011C77C:
/* B2E7C 8011C77C 8FA3001C */ lw $v1, 0x1c($sp)
/* B2E80 8011C780 4600258D */ trunc.w.s $f22, $f4
/* B2E84 8011C784 4402B000 */ mfc1 $v0, $f22
/* B2E88 8011C788 00000000 */ nop
/* B2E8C 8011C78C A4620008 */ sh $v0, 8($v1)
/* B2E90 8011C790 A073000C */ sb $s3, 0xc($v1)
/* B2E94 8011C794 8FA4001C */ lw $a0, 0x1c($sp)
/* B2E98 8011C798 4600158D */ trunc.w.s $f22, $f2
/* B2E9C 8011C79C 4402B000 */ mfc1 $v0, $f22
/* B2EA0 8011C7A0 00000000 */ nop
/* B2EA4 8011C7A4 A462000A */ sh $v0, 0xa($v1)
/* B2EA8 8011C7A8 A092000D */ sb $s2, 0xd($a0)
/* B2EAC 8011C7AC 8FA2001C */ lw $v0, 0x1c($sp)
/* B2EB0 8011C7B0 24A50001 */ addiu $a1, $a1, 1
/* B2EB4 8011C7B4 A051000E */ sb $s1, 0xe($v0)
/* B2EB8 8011C7B8 8FA2001C */ lw $v0, 0x1c($sp)
/* B2EBC 8011C7BC 8FA30018 */ lw $v1, 0x18($sp)
/* B2EC0 8011C7C0 24420010 */ addiu $v0, $v0, 0x10
/* B2EC4 8011C7C4 00A3182A */ slt $v1, $a1, $v1
/* B2EC8 8011C7C8 1460FF98 */ bnez $v1, .L8011C62C
/* B2ECC 8011C7CC AFA2001C */ sw $v0, 0x1c($sp)
.L8011C7D0:
/* B2ED0 8011C7D0 8FBF0060 */ lw $ra, 0x60($sp)
/* B2ED4 8011C7D4 8FB5005C */ lw $s5, 0x5c($sp)
/* B2ED8 8011C7D8 8FB40058 */ lw $s4, 0x58($sp)
/* B2EDC 8011C7DC 8FB30054 */ lw $s3, 0x54($sp)
/* B2EE0 8011C7E0 8FB20050 */ lw $s2, 0x50($sp)
/* B2EE4 8011C7E4 8FB1004C */ lw $s1, 0x4c($sp)
/* B2EE8 8011C7E8 8FB00048 */ lw $s0, 0x48($sp)
/* B2EEC 8011C7EC D7BE0090 */ ldc1 $f30, 0x90($sp)
/* B2EF0 8011C7F0 D7BC0088 */ ldc1 $f28, 0x88($sp)
/* B2EF4 8011C7F4 D7BA0080 */ ldc1 $f26, 0x80($sp)
/* B2EF8 8011C7F8 D7B80078 */ ldc1 $f24, 0x78($sp)
/* B2EFC 8011C7FC D7B60070 */ ldc1 $f22, 0x70($sp)
/* B2F00 8011C800 D7B40068 */ ldc1 $f20, 0x68($sp)
/* B2F04 8011C804 03E00008 */ jr $ra
/* B2F08 8011C808 27BD0098 */ addiu $sp, $sp, 0x98