3 more gfx functions (#827)

* matched draw_tiled_image

* render_item_entities

* draw_adjustable_tiled_image

* draw_image_with_clipping unfinished

* cleaning up

* keep MSG_* and WINDOW_ID_*
This commit is contained in:
Unnunu 2022-10-16 20:02:11 +03:00 committed by GitHub
parent 46decfa258
commit 64763ae586
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 589 additions and 2125 deletions

View File

@ -9,6 +9,13 @@
#define MAX_ITEM_ENTITIES 256
typedef struct Rect {
/* 0x00 */ s32 ulx;
/* 0x04 */ s32 uly;
/* 0x08 */ s32 lrx;
/* 0x0C */ s32 lry;
} Rect; // size = 0x10
extern SparkleScript SparkleScript_Coin;
extern Gfx D_8014B870[];
@ -144,9 +151,269 @@ s32 draw_ci_image_with_clipping(IMG_PTR raster, s32 width, s32 height, s32 fmt,
return ret;
}
INCLUDE_ASM(s32, "C50A0", draw_image_with_clipping);
#ifdef NON_EQUIVALENT
typedef struct Rect2b {
/* 0x00 */ s16 ulx;
/* 0x02 */ s16 uly;
/* 0x04 */ s16 lrx;
/* 0x06 */ s16 lry;
} Rect2b; // size = 0x08
INCLUDE_ASM(s32, "C50A0", draw_tiled_image);
s32 draw_image_with_clipping(u8* img, u32 width, u32 height, s32 fmt, s32 bitDepth,
s16 posX, s16 posY,
u16 clipX, u16 clipY, u16 clipWidth, u16 clipHeight) {
Rect2b texRect;
Rect2b drawRect;
Rect ry;
Rect rx;
u16 texOffsetX, texOffsetY;
u8 stopDrawing;
u8 stopDrawingLine;
if (posX >= clipX + clipWidth || posY >= clipY + clipHeight) {
return 0;
}
if (clipX >= (s16)(posX + width)) {
return 0;
}
if (clipY >= (s16)(posY + height)) {
return 0;
}
stopDrawing = 0;
texRect.uly = 0;
drawRect.uly = posY;
while (TRUE) {
texRect.lry = texRect.uly + 31;
drawRect.lry = drawRect.uly + 32;
texOffsetY = 0;
if (drawRect.lry <= clipY) {
do {
texRect.uly += 32;
drawRect.uly = drawRect.lry;
drawRect.lry += 32;
} while (drawRect.lry < clipY);
texRect.lry = texRect.uly + 31;
}
if (drawRect.uly < clipY) {
drawRect.uly = clipY;
texOffsetY = abs(posY - clipY);
}
if (drawRect.lry >= clipY + clipHeight) {
stopDrawing = TRUE;
drawRect.lry = clipY + clipHeight;
texRect.lry = clipY + clipHeight - posY - 1;
}
if ((u32)(texRect.lry + 1) >= height) {
stopDrawing = TRUE;
texRect.lry = height - 1;
drawRect.lry = height + posY;
}
stopDrawingLine = 0;
texRect.ulx = 0;
drawRect.ulx = posX;
while (TRUE) {
texRect.lrx = texRect.ulx + 63;
drawRect.lrx = drawRect.ulx + 64;
texOffsetX = 0;
if (drawRect.lrx <= clipX) {
do {
texRect.ulx += 64;
drawRect.ulx = drawRect.lrx;
drawRect.lrx += 64;
} while (drawRect.lrx < clipX);
texRect.lrx = texRect.ulx + 63;
}
if (drawRect.ulx < clipX) {
drawRect.ulx = clipX;
texOffsetX = abs(posX - clipX);
}
if (drawRect.lrx >= clipX + clipWidth) {
stopDrawingLine = TRUE;
drawRect.lrx = clipX + clipWidth;
texRect.lrx = clipX + clipWidth - posX - 1;
}
if ((u32)(texRect.lrx + 1) >= width) {
stopDrawingLine = TRUE;
texRect.lrx = width - 1;
drawRect.lrx = width + posX;
}
if (bitDepth == G_IM_SIZ_4b) {
gDPLoadTextureTile_4b(gMasterGfxPos++, img, fmt, width, height,
texRect.ulx, texRect.uly, texRect.lrx, texRect.lry, 0,
G_TX_WRAP, G_TX_WRAP, 6, 5, G_TX_NOLOD, G_TX_NOLOD);
} else if (bitDepth == G_IM_SIZ_16b) {
gDPLoadTextureTile(gMasterGfxPos++, img, fmt, G_IM_SIZ_16b, width, height,
texRect.ulx, texRect.uly, texRect.lrx, texRect.lry, 0,
G_TX_WRAP, G_TX_WRAP, 6, 5, G_TX_NOLOD, G_TX_NOLOD);
} else if (bitDepth == G_IM_SIZ_8b) {
gDPLoadTextureTile(gMasterGfxPos++, img, fmt, G_IM_SIZ_8b, width, height,
texRect.ulx, texRect.uly, texRect.lrx, texRect.lry, 0,
G_TX_WRAP, G_TX_WRAP, 6, 5, G_TX_NOLOD, G_TX_NOLOD);
}
gSPTextureRectangle(gMasterGfxPos++, drawRect.ulx * 4, drawRect.uly * 4, drawRect.lrx * 4, drawRect.lry * 4,
0, texOffsetX * 32, texOffsetY * 32, 1024, 1024);
if (stopDrawingLine) {
break;
}
texRect.ulx += 64;
drawRect.ulx = drawRect.lrx;
}
if (stopDrawing) {
break;
}
texRect.uly += 32;
drawRect.uly = drawRect.lry;
}
return 1;
}
#else
INCLUDE_ASM(s32, "C50A0", draw_image_with_clipping);
#endif
s32 draw_tiled_image(IMG_PTR raster, u32 width, u32 height, u8 fmt, u8 bitDepth,
s16 posX, s16 posY,
u16 clipX, u16 clipY, u16 clipWidth, u16 clipHeight,
f32 scaleX, f32 scaleY) {
Rect texRect;
Rect drawRect;
s32 dsdx, dtdy;
s32 texOffsetX, texOffsetY;
u8 stopDrawing;
u8 stopDrawingLine;
if (scaleX < 0.01 || scaleY < 0.01) {
return 0;
}
if (posX >= clipX + clipWidth || posY >= clipY + clipHeight) {
return 0;
}
if (clipX >= (s16)(posX + width * scaleX)) {
return 0;
}
if (clipY >= (s16)(posY + height * scaleY)) {
return 0;
}
stopDrawing = 0;
texRect.uly = 0;
drawRect.uly = posY;
dsdx = 1.0f / scaleX * 1024.0f;
dtdy = 1.0f / scaleY * 1024.0f;
while (TRUE) {
texRect.lry = texRect.uly + 31;
drawRect.lry = drawRect.uly + (scaleY * 32.0 + 0.5);
texOffsetY = 0;
if (drawRect.lry <= clipY) {
do {
texRect.uly += 32;
drawRect.uly = drawRect.lry;
drawRect.lry += scaleY * 32.0f;
} while (drawRect.lry < clipY);
texRect.lry = texRect.uly + 31;
}
if (drawRect.uly < clipY) {
drawRect.uly = clipY;
texOffsetY = abs(posY - clipY) / scaleY * 32.0f;
}
if ((u32)(texRect.lry + 1) >= height) {
texRect.lry = height - 1;
stopDrawing = 1;
drawRect.lry = posY + (s16)(texRect.lry * scaleY);
drawRect.lry += scaleY;
}
if (drawRect.lry > clipY + clipHeight) {
drawRect.lry = clipY + clipHeight;
if (!stopDrawing) {
drawRect.lry = clipY + clipHeight;
stopDrawing = 1;
}
}
stopDrawingLine = 0;
texRect.ulx = 0;
drawRect.ulx = posX;
while (TRUE) {
texRect.lrx = texRect.ulx + 63;
drawRect.lrx = drawRect.ulx + (scaleX * 64.0 + 0.3);
texOffsetX = 0;
if (drawRect.lrx <= clipX) {
do {
texRect.ulx += 64;
drawRect.ulx = drawRect.lrx;
drawRect.lrx += scaleX * 64.0f;
} while (drawRect.lrx < clipX);
texRect.lrx = texRect.ulx + 63;
}
if (drawRect.ulx < clipX) {
drawRect.ulx = clipX;
texOffsetX = abs(posX - clipX) / scaleX * 32.0f;
}
if ((u32)(texRect.lrx + 1) >= width) {
texRect.lrx = width - 1;
stopDrawingLine = TRUE;
drawRect.lrx = posX + (s16)(texRect.lrx * scaleX);
drawRect.lrx = drawRect.lrx + scaleX + 0.3;
}
if (drawRect.lrx > clipX + clipWidth) {
drawRect.lrx = clipX + clipWidth;
stopDrawingLine = TRUE;
}
if (bitDepth == G_IM_SIZ_16b) {
gDPLoadTextureTile(gMasterGfxPos++, raster, fmt, G_IM_SIZ_16b, width, height,
texRect.ulx, texRect.uly, texRect.lrx, texRect.lry, 0,
G_TX_WRAP, G_TX_WRAP, 6, 5, G_TX_NOLOD, G_TX_NOLOD);
} else if (bitDepth == G_IM_SIZ_4b) {
gDPLoadTextureTile_4b(gMasterGfxPos++, raster, fmt, width, height,
texRect.ulx, texRect.uly, texRect.lrx, texRect.lry, 0,
G_TX_WRAP, G_TX_WRAP, 6, 5, G_TX_NOLOD, G_TX_NOLOD);
}
gSPTextureRectangle(gMasterGfxPos++, drawRect.ulx * 4, drawRect.uly * 4, (drawRect.lrx - stopDrawingLine) * 4, drawRect.lry * 4,
0, texOffsetX, texOffsetY, dsdx, dtdy);
if (stopDrawingLine) {
break;
}
texRect.ulx += 64;
drawRect.ulx = drawRect.lrx;
};
if (stopDrawing) {
break;
}
texRect.uly += 32;
drawRect.uly = drawRect.lry;
};
return 1;
}
s32 integer_log(s32 number, u32 base) {
f32 fNumber = number;
@ -162,7 +429,181 @@ s32 integer_log(s32 number, u32 base) {
}
}
INCLUDE_ASM(s32, "C50A0", draw_adjustable_tiled_image);
s32 draw_adjustable_tiled_image(IMG_PTR raster, u32 width, u32 height, u8 fmt, u8 bitDepth,
s16 posX, s16 posY,
u16 clipX, u16 clipY, u16 clipWidth, u16 clipHeight,
f32 scaleX, f32 scaleY) {
Rect texRect;
Rect drawRect;
u16 overlap;
s32 dsdx, dtdy;
s32 texOffsetX, texOffsetY;
u8 stopDrawing;
u16 masks, maskt;
u16 texelNum;
u16 lineHeight;
f32 temp;
if (scaleX < 0.01 || scaleY < 0.01) {
return 0;
}
if (posX >= clipX + clipWidth || posY >= clipY + clipHeight) {
return 0;
}
if (clipX >= (s16)(posX + width * scaleX)) {
return 0;
}
if (clipY >= (s16)(posY + height * scaleY)) {
return 0;
}
if (bitDepth == G_IM_SIZ_4b) {
if (fmt == G_IM_FMT_IA || fmt == G_IM_FMT_I) {
texelNum = 0x2000;
} else if (fmt == G_IM_FMT_CI) {
texelNum = 0x1000;
} else {
return 0;
}
} else if (bitDepth == G_IM_SIZ_8b) {
if (fmt == G_IM_FMT_IA || fmt == G_IM_FMT_I) {
texelNum = 0x1000;
} else if (fmt == G_IM_FMT_CI) {
texelNum = 0x800;
} else {
return 0;
}
} else if (bitDepth == G_IM_SIZ_16b) {
if (fmt == G_IM_FMT_RGBA) {
texelNum = 0x800;
} else if (fmt == G_IM_FMT_IA) {
texelNum = 0x800;
} else {
return 0;
}
} else if (bitDepth == G_IM_SIZ_32b) {
if (fmt == G_IM_FMT_RGBA) {
texelNum = 0x400;
} else {
return 0;
}
} else {
return 0;
}
dsdx = 1.0f / scaleX * 1024.0f;
dtdy = 1.0f / scaleY * 1024.0f;
lineHeight = texelNum / width;
if (lineHeight > height) {
lineHeight = height;
} else if (lineHeight <= 1) {
return 0;
}
if (scaleY <= 1.0) {
overlap = 0;
} else {
overlap = scaleY;
}
masks = integer_log(width, 2);
maskt = integer_log(height, 2);
stopDrawing = 0;
texRect.ulx = 0;
texRect.uly = 0;
drawRect.ulx = posX;
drawRect.uly = posY;
while (TRUE) {
texRect.lrx = width - 1;
texRect.lry = texRect.uly + lineHeight - 1;
drawRect.lry = drawRect.uly + lineHeight * scaleY;
drawRect.lrx = (s16)(drawRect.ulx + width * scaleX);
texOffsetX = texOffsetY = 0;
if (drawRect.lry <= clipY) {
do {
texRect.uly += lineHeight;
drawRect.uly = drawRect.lry;
drawRect.lry += lineHeight * scaleY;
} while (drawRect.lry < clipY);
texRect.lry = texRect.uly + lineHeight - 1;
}
if (drawRect.uly < clipY) {
drawRect.uly = clipY;
temp = abs(posY - clipY);
temp /= scaleY;
texOffsetY = temp * 32.0f;
}
if (texRect.lry + 1 == height){
stopDrawing = 1;
} else if (height < texRect.lry + 1) {
s32 temp;
texRect.lry = height - 1;
temp = height * scaleY;
stopDrawing = 1;
drawRect.lry = drawRect.uly + temp;
}
if (drawRect.lry >= clipY + clipHeight) {
if (!stopDrawing) {
drawRect.lry = clipY + clipHeight;
stopDrawing = 1;
} else if (drawRect.lry > clipY + clipHeight) {
drawRect.lry = clipY + clipHeight;
}
}
if (drawRect.ulx < clipX) {
drawRect.ulx = clipX;
temp = abs(posX - clipX);
temp /= scaleX;
texOffsetX = temp * 32.0f;
}
if (drawRect.lrx >= clipX + clipWidth) {
drawRect.lrx = clipX + clipWidth;
}
if (bitDepth == G_IM_SIZ_4b) {
gDPLoadTextureTile_4b(gMasterGfxPos++, raster, fmt, width, height,
texRect.ulx, texRect.uly, texRect.lrx, texRect.lry, 0,
G_TX_WRAP, G_TX_WRAP, masks, maskt, G_TX_NOLOD, G_TX_NOLOD);
} else if (bitDepth == G_IM_SIZ_8b) {
gDPLoadTextureTile(gMasterGfxPos++, raster, fmt, G_IM_SIZ_8b, width, height,
texRect.ulx, texRect.uly, texRect.lrx, texRect.lry, 0,
G_TX_WRAP, G_TX_WRAP, masks, maskt, G_TX_NOLOD, G_TX_NOLOD);
} else if (bitDepth == G_IM_SIZ_16b) {
gDPLoadTextureTile(gMasterGfxPos++, raster, fmt, G_IM_SIZ_16b, width, height,
texRect.ulx, texRect.uly, texRect.lrx, texRect.lry, 0,
G_TX_WRAP, G_TX_WRAP, masks, maskt, G_TX_NOLOD, G_TX_NOLOD);
} else if (bitDepth == G_IM_SIZ_32b) {
gDPLoadTextureTile(gMasterGfxPos++, raster, fmt, G_IM_SIZ_32b, width, height,
texRect.ulx, texRect.uly, texRect.lrx, texRect.lry, 0,
G_TX_WRAP, G_TX_WRAP, masks, maskt, G_TX_NOLOD, G_TX_NOLOD);
}
gSPTextureRectangle(gMasterGfxPos++, drawRect.ulx * 4, drawRect.uly * 4, drawRect.lrx * 4, drawRect.lry * 4,
0, texOffsetX, texOffsetY, dsdx, dtdy);
if (stopDrawing) {
break;
}
texRect.uly += lineHeight - overlap;
drawRect.uly = drawRect.lry - overlap * scaleY;
};
return 1;
}
static const f32 rodata_padding[] = { 0.0f };
void sparkle_script_init(ItemEntity* itemEntity, SparkleScript* script) {
itemEntity->sparkleReadPos = (s32*)script;
@ -1022,7 +1463,143 @@ void draw_item_entities_UI(void) {
}
}
INCLUDE_ASM(s32, "C50A0", render_item_entities);
void render_item_entities(void) {
s32 i;
s32 offsetY;
f32 rotX;
Mtx sp18;
Matrix4f sp58;
Matrix4f sp98;
Matrix4f spD8;
u8 r1, g1, b1, a1;
s32 alpha;
// needed to move 'i++' to the bottom
for (i = 0; i < MAX_ITEM_ENTITIES;) {
ItemEntity* item = gCurrentItemEntities[i];
if (item != NULL) {
if ((item->flags != 0)) {
if (!(item->flags & ITEM_ENTITY_FLAGS_40)) {
if ((item->flags & ITEM_ENTITY_FLAGS_100000)) {
if (!(item->flags & ITEM_ENTITY_FLAGS_40000)) {
offsetY = -4;
} else {
offsetY = 0;
}
if (item->itemID == ITEM_COIN || item->itemID == ITEM_STAR_POINT || item->itemID == ITEM_HEART) {
offsetY = 0;
item->scale = 1.0f;
}
rotX = clamp_angle(180.0f - gCameras[gCurrentCamID].currentYaw);
guTranslateF(sp58, item->position.x, -item->position.y - offsetY, item->position.z);
guRotateF(sp98, rotX, 0.0f, 1.0f, 0.0f);
if (item->flags & ITEM_ENTITY_FLAGS_TINY) {
guScaleF(spD8, item->scale, item->scale, item->scale);
guMtxCatF(sp98, spD8, sp98);
}
guMtxCatF(sp98, sp58, sp58);
guMtxF2L(sp58, &sp18);
gDisplayContext->matrixStack[gMatrixListPos] = sp18;
gSPMatrix(gMasterGfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++], G_MTX_PUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
if (D_80151328->flags != 0) {
gSPDisplayList(gMasterGfxPos++, D_8014BBD8);
} else {
gSPDisplayList(gMasterGfxPos++, D_8014B870);
}
gSPClearGeometryMode(gMasterGfxPos++, G_LIGHTING);
gSPDisplayList(gMasterGfxPos++, D_8014C620);
alpha = 255;
if (item->flags & (ITEM_ENTITY_FLAGS_TRANSPARENT | ITEM_ENTITY_FLAGS_8000000)) {
if (item->flags & ITEM_ENTITY_FLAGS_TRANSPARENT) {
alpha = item->alpha * alpha / 255;
}
if (item->flags & ITEM_ENTITY_FLAGS_8000000) {
get_background_color_blend(&r1, &g1, &b1, &a1);
alpha = alpha * (255 - a1) / 255;
}
if (item->flags & (ITEM_ENTITY_FLAGS_TRANSPARENT | ITEM_ENTITY_FLAGS_8000000)) {
if (D_80151328->flags) {
gDPSetRenderMode(gMasterGfxPos++, AA_EN | IM_RD | CVG_DST_SAVE | ZMODE_OPA | FORCE_BL | G_RM_PASS,
AA_EN | IM_RD | CVG_DST_SAVE | ZMODE_OPA | FORCE_BL | GBL_c2(G_BL_CLR_IN, G_BL_A_IN, G_BL_CLR_MEM, G_BL_1MA));
} else {
gDPSetRenderMode(gMasterGfxPos++, AA_EN | IM_RD | CVG_DST_SAVE | ZMODE_OPA | FORCE_BL | GBL_c1(G_BL_CLR_IN, G_BL_A_IN, G_BL_CLR_MEM, G_BL_1MA),
AA_EN | IM_RD | CVG_DST_SAVE | ZMODE_OPA | FORCE_BL | GBL_c2(G_BL_CLR_IN, G_BL_A_IN, G_BL_CLR_MEM, G_BL_1MA));
gDPSetCombineLERP(gMasterGfxPos++, PRIMITIVE, 0, TEXEL0, 0, PRIMITIVE, 0, TEXEL0, 0, PRIMITIVE, 0, TEXEL0, 0, TEXEL0, 0, PRIMITIVE, 0);
gDPSetPrimColor(gMasterGfxPos++, 0, 0, 255, 255, 255, alpha);
}
}
}
if (!(item->flags & ITEM_ENTITY_FLAGS_40000)) {
gDPLoadTLUT_pal16(gMasterGfxPos++, 0, gHudElementCacheTablePalette[item->lookupPaletteIndex].data);
if (D_80151328->flags) {
gDPSetTextureImage(gMasterGfxPos++, G_IM_FMT_CI, G_IM_SIZ_8b, 12, gHudElementCacheTableRaster[item->lookupRasterIndex].data);
gDPSetTile(gMasterGfxPos++, G_IM_FMT_CI, G_IM_SIZ_8b, 2, 0x0000, G_TX_LOADTILE, 0, G_TX_NOMIRROR | G_TX_CLAMP, 8, G_TX_NOLOD, G_TX_NOMIRROR | G_TX_CLAMP, 8, G_TX_NOLOD);
gDPLoadSync(gMasterGfxPos++);
gDPLoadTile(gMasterGfxPos++, G_TX_LOADTILE, 0, 0, 0x002E, 0x005C);
gDPPipeSync(gMasterGfxPos++);
gDPSetTile(gMasterGfxPos++, G_IM_FMT_CI, G_IM_SIZ_4b, 2, 0x0000, 1, 0, G_TX_NOMIRROR | G_TX_CLAMP, 8, G_TX_NOLOD, G_TX_NOMIRROR | G_TX_CLAMP, 8, G_TX_NOLOD);
gDPSetTileSize(gMasterGfxPos++, 1, 0x0400, 0x0400, 0x045C, 0x045C);
gDPSetTile(gMasterGfxPos++, G_IM_FMT_CI, G_IM_SIZ_4b, 2, 0x0000, G_TX_RENDERTILE, 1, G_TX_NOMIRROR | G_TX_CLAMP, 8, G_TX_NOLOD, G_TX_NOMIRROR | G_TX_CLAMP, 8, G_TX_NOLOD);
gDPSetTile(gMasterGfxPos++, G_IM_FMT_RGBA, G_IM_SIZ_16b, 4, 0x0100, 2, 0, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOLOD);
gDPSetTileSize(gMasterGfxPos++, 2, 0, 0, 0x00FC, 0);
if (item->flags & (ITEM_ENTITY_FLAGS_TRANSPARENT | ITEM_ENTITY_FLAGS_8000000)) {
func_801491E4(sp58, 0, 0, 24, 24, alpha);
} else {
func_801491E4(sp58, 0, 0, 24, 24, 255);
}
} else {
gDPSetTextureImage(gMasterGfxPos++, G_IM_FMT_CI, G_IM_SIZ_8b, 12, gHudElementCacheTableRaster[item->lookupRasterIndex].data);
gDPSetTile(gMasterGfxPos++, G_IM_FMT_CI, G_IM_SIZ_8b, 2, 0x0000, G_TX_LOADTILE, 0, G_TX_NOMIRROR | G_TX_CLAMP, 8, G_TX_NOLOD, G_TX_NOMIRROR | G_TX_CLAMP, 8, G_TX_NOLOD);
gDPLoadSync(gMasterGfxPos++);
gDPLoadTile(gMasterGfxPos++, G_TX_LOADTILE, 0, 0, 0x002E, 0x005C);
gDPPipeSync(gMasterGfxPos++);
gDPSetTile(gMasterGfxPos++, G_IM_FMT_CI, G_IM_SIZ_4b, 2, 0x0000, G_TX_RENDERTILE, 0, G_TX_NOMIRROR | G_TX_CLAMP, 8, G_TX_NOLOD, G_TX_NOMIRROR | G_TX_CLAMP, 8, G_TX_NOLOD);
gDPSetTileSize(gMasterGfxPos++, G_TX_RENDERTILE, 0x0400, 0x0400, 0x045C, 0x045C);
}
gSPDisplayList(gMasterGfxPos++, D_8014C678);
} else {
gDPLoadTLUT_pal16(gMasterGfxPos++, 0, gHudElementCacheTablePalette[item->lookupPaletteIndex].data);
if (D_80151328->flags) {
gDPSetTextureImage(gMasterGfxPos++, G_IM_FMT_CI, G_IM_SIZ_8b, 16, gHudElementCacheTableRaster[item->lookupRasterIndex].data);
gDPSetTile(gMasterGfxPos++, G_IM_FMT_CI, G_IM_SIZ_8b, 2, 0x0000, G_TX_LOADTILE, 0, G_TX_NOMIRROR | G_TX_CLAMP, 8, G_TX_NOLOD, G_TX_NOMIRROR | G_TX_CLAMP, 8, G_TX_NOLOD);
gDPLoadSync(gMasterGfxPos++);
gDPLoadTile(gMasterGfxPos++, G_TX_LOADTILE, 0, 0, 0x003E, 0x007C);
gDPPipeSync(gMasterGfxPos++);
gDPSetTile(gMasterGfxPos++, G_IM_FMT_CI, G_IM_SIZ_4b, 2, 0x0000, 1, 0, G_TX_NOMIRROR | G_TX_CLAMP, 8, G_TX_NOLOD, G_TX_NOMIRROR | G_TX_CLAMP, 8, G_TX_NOLOD);
gDPSetTileSize(gMasterGfxPos++, 1, 0x0400, 0x0400, 0x047C, 0x047C);
gDPSetTile(gMasterGfxPos++, G_IM_FMT_CI, G_IM_SIZ_4b, 2, 0x0000, G_TX_RENDERTILE, 1, G_TX_NOMIRROR | G_TX_CLAMP, 8, G_TX_NOLOD, G_TX_NOMIRROR | G_TX_CLAMP, 8, G_TX_NOLOD);
gDPSetTile(gMasterGfxPos++, G_IM_FMT_RGBA, G_IM_SIZ_16b, 4, 0x0100, 2, 0, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOLOD);
gDPSetTileSize(gMasterGfxPos++, 2, 0, 0, 0x00FC, 0);
if (item->flags & (ITEM_ENTITY_FLAGS_TRANSPARENT | ITEM_ENTITY_FLAGS_8000000)) {
func_801491E4(sp58, 0, 0, 32, 32, alpha);
} else {
func_801491E4(sp58, 0, 0, 32, 32, 255);
}
} else {
gDPSetTextureImage(gMasterGfxPos++, G_IM_FMT_CI, G_IM_SIZ_8b, 16, gHudElementCacheTableRaster[item->lookupRasterIndex].data);
gDPSetTile(gMasterGfxPos++, G_IM_FMT_CI, G_IM_SIZ_8b, 2, 0x0000, G_TX_LOADTILE, 0, G_TX_NOMIRROR | G_TX_CLAMP, 8, G_TX_NOLOD, G_TX_NOMIRROR | G_TX_CLAMP, 8, G_TX_NOLOD);
gDPLoadSync(gMasterGfxPos++);
gDPLoadTile(gMasterGfxPos++, G_TX_LOADTILE, 0, 0, 0x003E, 0x007C);
gDPPipeSync(gMasterGfxPos++);
gDPSetTile(gMasterGfxPos++, G_IM_FMT_CI, G_IM_SIZ_4b, 2, 0x0000, G_TX_RENDERTILE, 0, G_TX_NOMIRROR | G_TX_CLAMP, 8, G_TX_NOLOD, G_TX_NOMIRROR | G_TX_CLAMP, 8, G_TX_NOLOD);
gDPSetTileSize(gMasterGfxPos++, G_TX_RENDERTILE, 0x0400, 0x0400, 0x047C, 0x047C);
}
gSPDisplayList(gMasterGfxPos++, D_8014C6A0);
}
gSPPopMatrix(gMasterGfxPos++, G_MTX_MODELVIEW);
gDPPipeSync(gMasterGfxPos++);
}
}
}
}
i++;
}
}
void remove_item_entity_by_reference(ItemEntity* entity) {
s32 index;
@ -2277,7 +2854,12 @@ void func_801363A0(ItemEntity* itemEntity) {
} else {
temp = 0;
}
if (gItemTable[itemEntity->itemID].typeFlags) {
// needed to match
if (gItemTable[itemEntity->itemID].typeFlags & 2) {
set_window_properties(WINDOW_ID_12, s1, s3 - 0x18 + temp, offsetY,
temp2, 0, func_8013673C, itemEntity, -1);
} else if (gItemTable[itemEntity->itemID].typeFlags & 1){
set_window_properties(WINDOW_ID_12, s1, s3 - 0x18 + temp, offsetY,
temp2, 0, func_8013673C, itemEntity, -1);
} else {
@ -2289,12 +2871,14 @@ void func_801363A0(ItemEntity* itemEntity) {
}
if (itemEntity->state != 2) {
offsetY = get_msg_width(MSG_Menus_0060, 0) + 0x18;
s1 = 160 - offsetY / 2;
set_window_properties(WINDOW_ID_17, 160 - offsetY / 2, 0x24, offsetY, 40, NULL, func_801369D0, itemEntity, -1);
}
break;
case 12:
set_message_msg(itemData->nameMsg, 0);
offsetY = get_msg_width(MSG_Menus_005F, 0) + 0x36;
s1 = 160 - offsetY / 2;
set_window_properties(WINDOW_ID_12, 160 - offsetY / 2, 0x4C, offsetY, 40, NULL, func_8013673C, itemEntity, -1);
break;
}

View File

@ -1,782 +0,0 @@
.set noat # allow manual use of $at
.set noreorder # don't insert nops after branches
.section .rodata
dlabel D_80150A50
.double 0.01, 0.0
.section .text
glabel draw_adjustable_tiled_image
/* C6578 8012FE78 27BDFF68 */ addiu $sp, $sp, -0x98
/* C657C 8012FE7C F7B60090 */ sdc1 $f22, 0x90($sp)
/* C6580 8012FE80 C7B600C4 */ lwc1 $f22, 0xc4($sp)
/* C6584 8012FE84 3C018015 */ lui $at, %hi(D_80150A50)
/* C6588 8012FE88 D4220A50 */ ldc1 $f2, %lo(D_80150A50)($at)
/* C658C 8012FE8C 8FA200AC */ lw $v0, 0xac($sp)
/* C6590 8012FE90 AFA40098 */ sw $a0, 0x98($sp)
/* C6594 8012FE94 8FA400B0 */ lw $a0, 0xb0($sp)
/* C6598 8012FE98 F7B40088 */ sdc1 $f20, 0x88($sp)
/* C659C 8012FE9C C7B400C8 */ lwc1 $f20, 0xc8($sp)
/* C65A0 8012FEA0 AFB7007C */ sw $s7, 0x7c($sp)
/* C65A4 8012FEA4 93B700AB */ lbu $s7, 0xab($sp)
/* C65A8 8012FEA8 AFBE0080 */ sw $fp, 0x80($sp)
/* C65AC 8012FEAC 97BE00B6 */ lhu $fp, 0xb6($sp)
/* C65B0 8012FEB0 AFB60078 */ sw $s6, 0x78($sp)
/* C65B4 8012FEB4 97B600BA */ lhu $s6, 0xba($sp)
/* C65B8 8012FEB8 AFB50074 */ sw $s5, 0x74($sp)
/* C65BC 8012FEBC 97B500C2 */ lhu $s5, 0xc2($sp)
/* C65C0 8012FEC0 AFB40070 */ sw $s4, 0x70($sp)
/* C65C4 8012FEC4 00A0A02D */ daddu $s4, $a1, $zero
/* C65C8 8012FEC8 AFB3006C */ sw $s3, 0x6c($sp)
/* C65CC 8012FECC 00C0982D */ daddu $s3, $a2, $zero
/* C65D0 8012FED0 AFB20068 */ sw $s2, 0x68($sp)
/* C65D4 8012FED4 00E0902D */ daddu $s2, $a3, $zero
/* C65D8 8012FED8 AFBF0084 */ sw $ra, 0x84($sp)
/* C65DC 8012FEDC AFB10064 */ sw $s1, 0x64($sp)
/* C65E0 8012FEE0 AFB00060 */ sw $s0, 0x60($sp)
/* C65E4 8012FEE4 4600B021 */ cvt.d.s $f0, $f22
/* C65E8 8012FEE8 A3B70030 */ sb $s7, 0x30($sp)
/* C65EC 8012FEEC 97B700BE */ lhu $s7, 0xbe($sp)
/* C65F0 8012FEF0 4622003C */ c.lt.d $f0, $f2
/* C65F4 8012FEF4 A7A2003E */ sh $v0, 0x3e($sp)
/* C65F8 8012FEF8 A7A40046 */ sh $a0, 0x46($sp)
/* C65FC 8012FEFC 4501008B */ bc1t .L8013012C
/* C6600 8012FF00 A7B7005E */ sh $s7, 0x5e($sp)
/* C6604 8012FF04 4600A021 */ cvt.d.s $f0, $f20
/* C6608 8012FF08 4622003C */ c.lt.d $f0, $f2
/* C660C 8012FF0C 00000000 */ nop
/* C6610 8012FF10 450302A9 */ bc1tl .L801309B8
/* C6614 8012FF14 0000102D */ daddu $v0, $zero, $zero
/* C6618 8012FF18 00021400 */ sll $v0, $v0, 0x10
/* C661C 8012FF1C 00021C03 */ sra $v1, $v0, 0x10
/* C6620 8012FF20 97B7005E */ lhu $s7, 0x5e($sp)
/* C6624 8012FF24 33C5FFFF */ andi $a1, $fp, 0xffff
/* C6628 8012FF28 02E51021 */ addu $v0, $s7, $a1
/* C662C 8012FF2C 0062102A */ slt $v0, $v1, $v0
/* C6630 8012FF30 1040007E */ beqz $v0, .L8013012C
/* C6634 8012FF34 00041400 */ sll $v0, $a0, 0x10
/* C6638 8012FF38 00022403 */ sra $a0, $v0, 0x10
/* C663C 8012FF3C 32C6FFFF */ andi $a2, $s6, 0xffff
/* C6640 8012FF40 02A61021 */ addu $v0, $s5, $a2
/* C6644 8012FF44 0082102A */ slt $v0, $a0, $v0
/* C6648 8012FF48 1040029B */ beqz $v0, .L801309B8
/* C664C 8012FF4C 0000102D */ daddu $v0, $zero, $zero
/* C6650 8012FF50 44941000 */ mtc1 $s4, $f2
/* C6654 8012FF54 00000000 */ nop
/* C6658 8012FF58 468010A1 */ cvt.d.w $f2, $f2
/* C665C 8012FF5C 44832000 */ mtc1 $v1, $f4
/* C6660 8012FF60 00000000 */ nop
/* C6664 8012FF64 46802120 */ cvt.s.w $f4, $f4
/* C6668 8012FF68 06830007 */ bgezl $s4, .L8012FF88
/* C666C 8012FF6C 46201020 */ cvt.s.d $f0, $f2
/* C6670 8012FF70 3C0141F0 */ lui $at, 0x41f0
/* C6674 8012FF74 44810800 */ mtc1 $at, $f1
/* C6678 8012FF78 44800000 */ mtc1 $zero, $f0
/* C667C 8012FF7C 00000000 */ nop
/* C6680 8012FF80 46201080 */ add.d $f2, $f2, $f0
/* C6684 8012FF84 46201020 */ cvt.s.d $f0, $f2
.L8012FF88:
/* C6688 8012FF88 46160002 */ mul.s $f0, $f0, $f22
/* C668C 8012FF8C 00000000 */ nop
/* C6690 8012FF90 46002000 */ add.s $f0, $f4, $f0
/* C6694 8012FF94 4600020D */ trunc.w.s $f8, $f0
/* C6698 8012FF98 44024000 */ mfc1 $v0, $f8
/* C669C 8012FF9C 00000000 */ nop
/* C66A0 8012FFA0 00021400 */ sll $v0, $v0, 0x10
/* C66A4 8012FFA4 00021403 */ sra $v0, $v0, 0x10
/* C66A8 8012FFA8 00A2102A */ slt $v0, $a1, $v0
/* C66AC 8012FFAC 10400282 */ beqz $v0, .L801309B8
/* C66B0 8012FFB0 0000102D */ daddu $v0, $zero, $zero
/* C66B4 8012FFB4 44931000 */ mtc1 $s3, $f2
/* C66B8 8012FFB8 00000000 */ nop
/* C66BC 8012FFBC 468010A1 */ cvt.d.w $f2, $f2
/* C66C0 8012FFC0 44842000 */ mtc1 $a0, $f4
/* C66C4 8012FFC4 00000000 */ nop
/* C66C8 8012FFC8 46802120 */ cvt.s.w $f4, $f4
/* C66CC 8012FFCC 06630007 */ bgezl $s3, .L8012FFEC
/* C66D0 8012FFD0 46201020 */ cvt.s.d $f0, $f2
/* C66D4 8012FFD4 3C0141F0 */ lui $at, 0x41f0
/* C66D8 8012FFD8 44810800 */ mtc1 $at, $f1
/* C66DC 8012FFDC 44800000 */ mtc1 $zero, $f0
/* C66E0 8012FFE0 00000000 */ nop
/* C66E4 8012FFE4 46201080 */ add.d $f2, $f2, $f0
/* C66E8 8012FFE8 46201020 */ cvt.s.d $f0, $f2
.L8012FFEC:
/* C66EC 8012FFEC 46140002 */ mul.s $f0, $f0, $f20
/* C66F0 8012FFF0 00000000 */ nop
/* C66F4 8012FFF4 46002000 */ add.s $f0, $f4, $f0
/* C66F8 8012FFF8 4600020D */ trunc.w.s $f8, $f0
/* C66FC 8012FFFC 44024000 */ mfc1 $v0, $f8
/* C6700 80130000 00000000 */ nop
/* C6704 80130004 00021400 */ sll $v0, $v0, 0x10
/* C6708 80130008 00021403 */ sra $v0, $v0, 0x10
/* C670C 8013000C 00C2102A */ slt $v0, $a2, $v0
/* C6710 80130010 10400269 */ beqz $v0, .L801309B8
/* C6714 80130014 0000102D */ daddu $v0, $zero, $zero
/* C6718 80130018 93A30030 */ lbu $v1, 0x30($sp)
/* C671C 8013001C 1460000C */ bnez $v1, .L80130050
/* C6720 80130020 24020001 */ addiu $v0, $zero, 1
/* C6724 80130024 24E2FFFD */ addiu $v0, $a3, -3
/* C6728 80130028 304200FF */ andi $v0, $v0, 0xff
/* C672C 8013002C 2C420002 */ sltiu $v0, $v0, 2
/* C6730 80130030 14400024 */ bnez $v0, .L801300C4
/* C6734 80130034 24022000 */ addiu $v0, $zero, 0x2000
/* C6738 80130038 324300FF */ andi $v1, $s2, 0xff
/* C673C 8013003C 24020002 */ addiu $v0, $zero, 2
/* C6740 80130040 1062000A */ beq $v1, $v0, .L8013006C
/* C6744 80130044 0000102D */ daddu $v0, $zero, $zero
/* C6748 80130048 0804C26E */ j .L801309B8
/* C674C 8013004C 00000000 */ nop
.L80130050:
/* C6750 80130050 1462000D */ bne $v1, $v0, .L80130088
/* C6754 80130054 24020002 */ addiu $v0, $zero, 2
/* C6758 80130058 24E2FFFD */ addiu $v0, $a3, -3
/* C675C 8013005C 304200FF */ andi $v0, $v0, 0xff
/* C6760 80130060 2C420002 */ sltiu $v0, $v0, 2
/* C6764 80130064 10400003 */ beqz $v0, .L80130074
/* C6768 80130068 324300FF */ andi $v1, $s2, 0xff
.L8013006C:
/* C676C 8013006C 0804C031 */ j .L801300C4
/* C6770 80130070 24021000 */ addiu $v0, $zero, 0x1000
.L80130074:
/* C6774 80130074 24020002 */ addiu $v0, $zero, 2
/* C6778 80130078 1062000A */ beq $v1, $v0, .L801300A4
/* C677C 8013007C 0000102D */ daddu $v0, $zero, $zero
/* C6780 80130080 0804C26E */ j .L801309B8
/* C6784 80130084 00000000 */ nop
.L80130088:
/* C6788 80130088 14620008 */ bne $v1, $v0, .L801300AC
/* C678C 8013008C 24020003 */ addiu $v0, $zero, 3
/* C6790 80130090 324300FF */ andi $v1, $s2, 0xff
/* C6794 80130094 5060000B */ beql $v1, $zero, .L801300C4
/* C6798 80130098 24020800 */ addiu $v0, $zero, 0x800
/* C679C 8013009C 14620246 */ bne $v1, $v0, .L801309B8
/* C67A0 801300A0 0000102D */ daddu $v0, $zero, $zero
.L801300A4:
/* C67A4 801300A4 0804C031 */ j .L801300C4
/* C67A8 801300A8 24020800 */ addiu $v0, $zero, 0x800
.L801300AC:
/* C67AC 801300AC 14620242 */ bne $v1, $v0, .L801309B8
/* C67B0 801300B0 0000102D */ daddu $v0, $zero, $zero
/* C67B4 801300B4 324200FF */ andi $v0, $s2, 0xff
/* C67B8 801300B8 1440023F */ bnez $v0, .L801309B8
/* C67BC 801300BC 0000102D */ daddu $v0, $zero, $zero
/* C67C0 801300C0 24020400 */ addiu $v0, $zero, 0x400
.L801300C4:
/* C67C4 801300C4 16800002 */ bnez $s4, .L801300D0
/* C67C8 801300C8 0054001B */ divu $zero, $v0, $s4
/* C67CC 801300CC 0007000D */ break 7
.L801300D0:
/* C67D0 801300D0 00001012 */ mflo $v0
/* C67D4 801300D4 3C013F80 */ lui $at, 0x3f80
/* C67D8 801300D8 44810000 */ mtc1 $at, $f0
/* C67DC 801300DC 3C014480 */ lui $at, 0x4480
/* C67E0 801300E0 44812000 */ mtc1 $at, $f4
/* C67E4 801300E4 46160083 */ div.s $f2, $f0, $f22
/* C67E8 801300E8 46041082 */ mul.s $f2, $f2, $f4
/* C67EC 801300EC 00000000 */ nop
/* C67F0 801300F0 46140003 */ div.s $f0, $f0, $f20
/* C67F4 801300F4 46040002 */ mul.s $f0, $f0, $f4
/* C67F8 801300F8 00000000 */ nop
/* C67FC 801300FC 4600120D */ trunc.w.s $f8, $f2
/* C6800 80130100 E7A8004C */ swc1 $f8, 0x4c($sp)
/* C6804 80130104 4600020D */ trunc.w.s $f8, $f0
/* C6808 80130108 E7A80050 */ swc1 $f8, 0x50($sp)
/* C680C 8013010C 0040882D */ daddu $s1, $v0, $zero
/* C6810 80130110 3223FFFF */ andi $v1, $s1, 0xffff
/* C6814 80130114 0263102B */ sltu $v0, $s3, $v1
/* C6818 80130118 54400006 */ bnel $v0, $zero, .L80130134
/* C681C 8013011C 0260882D */ daddu $s1, $s3, $zero
/* C6820 80130120 2C620002 */ sltiu $v0, $v1, 2
/* C6824 80130124 10400003 */ beqz $v0, .L80130134
/* C6828 80130128 00000000 */ nop
.L8013012C:
/* C682C 8013012C 0804C26E */ j .L801309B8
/* C6830 80130130 0000102D */ daddu $v0, $zero, $zero
.L80130134:
/* C6834 80130134 3C013FF0 */ lui $at, 0x3ff0
/* C6838 80130138 44811800 */ mtc1 $at, $f3
/* C683C 8013013C 44801000 */ mtc1 $zero, $f2
/* C6840 80130140 4600A021 */ cvt.d.s $f0, $f20
/* C6844 80130144 4622003E */ c.le.d $f0, $f2
/* C6848 80130148 00000000 */ nop
/* C684C 8013014C 45000003 */ bc1f .L8013015C
/* C6850 80130150 00000000 */ nop
/* C6854 80130154 0804C068 */ j .L801301A0
/* C6858 80130158 A7A00048 */ sh $zero, 0x48($sp)
.L8013015C:
/* C685C 8013015C 3C014F00 */ lui $at, 0x4f00
/* C6860 80130160 44810000 */ mtc1 $at, $f0
/* C6864 80130164 00000000 */ nop
/* C6868 80130168 4614003E */ c.le.s $f0, $f20
/* C686C 8013016C 00000000 */ nop
/* C6870 80130170 45030005 */ bc1tl .L80130188
/* C6874 80130174 4600A001 */ sub.s $f0, $f20, $f0
/* C6878 80130178 4600A20D */ trunc.w.s $f8, $f20
/* C687C 8013017C 44034000 */ mfc1 $v1, $f8
/* C6880 80130180 0804C068 */ j .L801301A0
/* C6884 80130184 A7A30048 */ sh $v1, 0x48($sp)
.L80130188:
/* C6888 80130188 3C028000 */ lui $v0, 0x8000
/* C688C 8013018C 4600020D */ trunc.w.s $f8, $f0
/* C6890 80130190 44034000 */ mfc1 $v1, $f8
/* C6894 80130194 00000000 */ nop
/* C6898 80130198 00621825 */ or $v1, $v1, $v0
/* C689C 8013019C A7A30048 */ sh $v1, 0x48($sp)
.L801301A0:
/* C68A0 801301A0 0280202D */ daddu $a0, $s4, $zero
/* C68A4 801301A4 0C04BF84 */ jal integer_log
/* C68A8 801301A8 24050002 */ addiu $a1, $zero, 2
/* C68AC 801301AC 0260202D */ daddu $a0, $s3, $zero
/* C68B0 801301B0 24050002 */ addiu $a1, $zero, 2
/* C68B4 801301B4 0C04BF84 */ jal integer_log
/* C68B8 801301B8 0040802D */ daddu $s0, $v0, $zero
/* C68BC 801301BC 0000582D */ daddu $t3, $zero, $zero
/* C68C0 801301C0 32CAFFFF */ andi $t2, $s6, 0xffff
/* C68C4 801301C4 32A3FFFF */ andi $v1, $s5, 0xffff
/* C68C8 801301C8 01437821 */ addu $t7, $t2, $v1
/* C68CC 801301CC 33D8FFFF */ andi $t8, $fp, 0xffff
/* C68D0 801301D0 3C07800A */ lui $a3, %hi(gMasterGfxPos)
/* C68D4 801301D4 24E7A66C */ addiu $a3, $a3, %lo(gMasterGfxPos)
/* C68D8 801301D8 3C1EF508 */ lui $fp, 0xf508
/* C68DC 801301DC 3042000F */ andi $v0, $v0, 0xf
/* C68E0 801301E0 00021380 */ sll $v0, $v0, 0xe
/* C68E4 801301E4 3210000F */ andi $s0, $s0, 0xf
/* C68E8 801301E8 00108100 */ sll $s0, $s0, 4
/* C68EC 801301EC 3C190700 */ lui $t9, 0x700
/* C68F0 801301F0 3C15E600 */ lui $s5, 0xe600
/* C68F4 801301F4 00506025 */ or $t4, $v0, $s0
/* C68F8 801301F8 2697FFFF */ addiu $s7, $s4, -1
/* C68FC 801301FC 3229FFFF */ andi $t1, $s1, 0xffff
/* C6900 80130200 44890000 */ mtc1 $t1, $f0
/* C6904 80130204 00000000 */ nop
/* C6908 80130208 46800020 */ cvt.s.w $f0, $f0
/* C690C 8013020C 97A3005E */ lhu $v1, 0x5e($sp)
/* C6910 80130210 93AE0030 */ lbu $t6, 0x30($sp)
/* C6914 80130214 46140182 */ mul.s $f6, $f0, $f20
/* C6918 80130218 00000000 */ nop
/* C691C 8013021C AFB7005C */ sw $s7, 0x5c($sp)
/* C6920 80130220 AFA00010 */ sw $zero, 0x10($sp)
/* C6924 80130224 AFA00014 */ sw $zero, 0x14($sp)
/* C6928 80130228 0303B021 */ addu $s6, $t8, $v1
/* C692C 8013022C 02191825 */ or $v1, $s0, $t9
/* C6930 80130230 00436825 */ or $t5, $v0, $v1
/* C6934 80130234 32420007 */ andi $v0, $s2, 7
/* C6938 80130238 00024540 */ sll $t0, $v0, 0x15
/* C693C 8013023C 32F20FFF */ andi $s2, $s7, 0xfff
/* C6940 80130240 3C17FD08 */ lui $s7, 0xfd08
/* C6944 80130244 02571025 */ or $v0, $s2, $s7
/* C6948 80130248 97B7003E */ lhu $s7, 0x3e($sp)
/* C694C 8013024C 01021025 */ or $v0, $t0, $v0
/* C6950 80130250 AFA20054 */ sw $v0, 0x54($sp)
/* C6954 80130254 00171400 */ sll $v0, $s7, 0x10
/* C6958 80130258 97B70046 */ lhu $s7, 0x46($sp)
/* C695C 8013025C 00021403 */ sra $v0, $v0, 0x10
/* C6960 80130260 AFA20020 */ sw $v0, 0x20($sp)
/* C6964 80130264 00171400 */ sll $v0, $s7, 0x10
/* C6968 80130268 00021403 */ sra $v0, $v0, 0x10
/* C696C 8013026C AFA20024 */ sw $v0, 0x24($sp)
.L80130270:
/* C6970 80130270 44941000 */ mtc1 $s4, $f2
/* C6974 80130274 00000000 */ nop
/* C6978 80130278 468010A1 */ cvt.d.w $f2, $f2
/* C697C 8013027C C7A00024 */ lwc1 $f0, 0x24($sp)
/* C6980 80130280 46800020 */ cvt.s.w $f0, $f0
/* C6984 80130284 C7A40020 */ lwc1 $f4, 0x20($sp)
/* C6988 80130288 46802120 */ cvt.s.w $f4, $f4
/* C698C 8013028C 46060000 */ add.s $f0, $f0, $f6
/* C6990 80130290 8FA20014 */ lw $v0, 0x14($sp)
/* C6994 80130294 8FB7005C */ lw $s7, 0x5c($sp)
/* C6998 80130298 00491021 */ addu $v0, $v0, $t1
/* C699C 8013029C 2442FFFF */ addiu $v0, $v0, -1
/* C69A0 801302A0 AFB70018 */ sw $s7, 0x18($sp)
/* C69A4 801302A4 AFA2001C */ sw $v0, 0x1c($sp)
/* C69A8 801302A8 4600020D */ trunc.w.s $f8, $f0
/* C69AC 801302AC 44034000 */ mfc1 $v1, $f8
/* C69B0 801302B0 06810006 */ bgez $s4, .L801302CC
/* C69B4 801302B4 AFA3002C */ sw $v1, 0x2c($sp)
/* C69B8 801302B8 3C0141F0 */ lui $at, 0x41f0
/* C69BC 801302BC 44810800 */ mtc1 $at, $f1
/* C69C0 801302C0 44800000 */ mtc1 $zero, $f0
/* C69C4 801302C4 00000000 */ nop
/* C69C8 801302C8 46201080 */ add.d $f2, $f2, $f0
.L801302CC:
/* C69CC 801302CC 46201020 */ cvt.s.d $f0, $f2
/* C69D0 801302D0 46160002 */ mul.s $f0, $f0, $f22
/* C69D4 801302D4 00000000 */ nop
/* C69D8 801302D8 46002000 */ add.s $f0, $f4, $f0
/* C69DC 801302DC 0000882D */ daddu $s1, $zero, $zero
/* C69E0 801302E0 4600020D */ trunc.w.s $f8, $f0
/* C69E4 801302E4 44024000 */ mfc1 $v0, $f8
/* C69E8 801302E8 00000000 */ nop
/* C69EC 801302EC 00021400 */ sll $v0, $v0, 0x10
/* C69F0 801302F0 00021403 */ sra $v0, $v0, 0x10
/* C69F4 801302F4 AFA20028 */ sw $v0, 0x28($sp)
/* C69F8 801302F8 0143102A */ slt $v0, $t2, $v1
/* C69FC 801302FC 14400018 */ bnez $v0, .L80130360
/* C6A00 80130300 0220802D */ daddu $s0, $s1, $zero
/* C6A04 80130304 44890000 */ mtc1 $t1, $f0
/* C6A08 80130308 00000000 */ nop
/* C6A0C 8013030C 46800020 */ cvt.s.w $f0, $f0
/* C6A10 80130310 46140082 */ mul.s $f2, $f0, $f20
/* C6A14 80130314 00000000 */ nop
.L80130318:
/* C6A18 80130318 8FA20014 */ lw $v0, 0x14($sp)
/* C6A1C 8013031C 8FA3002C */ lw $v1, 0x2c($sp)
/* C6A20 80130320 00492021 */ addu $a0, $v0, $t1
/* C6A24 80130324 44830000 */ mtc1 $v1, $f0
/* C6A28 80130328 00000000 */ nop
/* C6A2C 8013032C 46800020 */ cvt.s.w $f0, $f0
/* C6A30 80130330 46020000 */ add.s $f0, $f0, $f2
/* C6A34 80130334 AFA40014 */ sw $a0, 0x14($sp)
/* C6A38 80130338 AFA30024 */ sw $v1, 0x24($sp)
/* C6A3C 8013033C 4600020D */ trunc.w.s $f8, $f0
/* C6A40 80130340 44024000 */ mfc1 $v0, $f8
/* C6A44 80130344 00000000 */ nop
/* C6A48 80130348 AFA2002C */ sw $v0, 0x2c($sp)
/* C6A4C 8013034C 004A102A */ slt $v0, $v0, $t2
/* C6A50 80130350 1440FFF1 */ bnez $v0, .L80130318
/* C6A54 80130354 00891021 */ addu $v0, $a0, $t1
/* C6A58 80130358 2442FFFF */ addiu $v0, $v0, -1
/* C6A5C 8013035C AFA2001C */ sw $v0, 0x1c($sp)
.L80130360:
/* C6A60 80130360 8FA20024 */ lw $v0, 0x24($sp)
/* C6A64 80130364 004A102A */ slt $v0, $v0, $t2
/* C6A68 80130368 10400012 */ beqz $v0, .L801303B4
/* C6A6C 8013036C 00000000 */ nop
/* C6A70 80130370 97B70046 */ lhu $s7, 0x46($sp)
/* C6A74 80130374 00171400 */ sll $v0, $s7, 0x10
/* C6A78 80130378 00021403 */ sra $v0, $v0, 0x10
/* C6A7C 8013037C 004A1023 */ subu $v0, $v0, $t2
/* C6A80 80130380 04420001 */ bltzl $v0, .L80130388
/* C6A84 80130384 00021023 */ negu $v0, $v0
.L80130388:
/* C6A88 80130388 44821000 */ mtc1 $v0, $f2
/* C6A8C 8013038C 00000000 */ nop
/* C6A90 80130390 468010A0 */ cvt.s.w $f2, $f2
/* C6A94 80130394 3C014200 */ lui $at, 0x4200
/* C6A98 80130398 44810000 */ mtc1 $at, $f0
/* C6A9C 8013039C 46141083 */ div.s $f2, $f2, $f20
/* C6AA0 801303A0 46001002 */ mul.s $f0, $f2, $f0
/* C6AA4 801303A4 00000000 */ nop
/* C6AA8 801303A8 AFAA0024 */ sw $t2, 0x24($sp)
/* C6AAC 801303AC 4600020D */ trunc.w.s $f8, $f0
/* C6AB0 801303B0 44114000 */ mfc1 $s1, $f8
.L801303B4:
/* C6AB4 801303B4 8FA2001C */ lw $v0, 0x1c($sp)
/* C6AB8 801303B8 24420001 */ addiu $v0, $v0, 1
/* C6ABC 801303BC 14530003 */ bne $v0, $s3, .L801303CC
/* C6AC0 801303C0 0262102B */ sltu $v0, $s3, $v0
/* C6AC4 801303C4 0804C109 */ j .L80130424
/* C6AC8 801303C8 240B0001 */ addiu $t3, $zero, 1
.L801303CC:
/* C6ACC 801303CC 10400015 */ beqz $v0, .L80130424
/* C6AD0 801303D0 2662FFFF */ addiu $v0, $s3, -1
/* C6AD4 801303D4 44931000 */ mtc1 $s3, $f2
/* C6AD8 801303D8 00000000 */ nop
/* C6ADC 801303DC 468010A1 */ cvt.d.w $f2, $f2
/* C6AE0 801303E0 06610006 */ bgez $s3, .L801303FC
/* C6AE4 801303E4 AFA2001C */ sw $v0, 0x1c($sp)
/* C6AE8 801303E8 3C0141F0 */ lui $at, 0x41f0
/* C6AEC 801303EC 44810800 */ mtc1 $at, $f1
/* C6AF0 801303F0 44800000 */ mtc1 $zero, $f0
/* C6AF4 801303F4 00000000 */ nop
/* C6AF8 801303F8 46201080 */ add.d $f2, $f2, $f0
.L801303FC:
/* C6AFC 801303FC 46201020 */ cvt.s.d $f0, $f2
/* C6B00 80130400 46140002 */ mul.s $f0, $f0, $f20
/* C6B04 80130404 00000000 */ nop
/* C6B08 80130408 240B0001 */ addiu $t3, $zero, 1
/* C6B0C 8013040C 8FA20024 */ lw $v0, 0x24($sp)
/* C6B10 80130410 4600020D */ trunc.w.s $f8, $f0
/* C6B14 80130414 44034000 */ mfc1 $v1, $f8
/* C6B18 80130418 00000000 */ nop
/* C6B1C 8013041C 00431021 */ addu $v0, $v0, $v1
/* C6B20 80130420 AFA2002C */ sw $v0, 0x2c($sp)
.L80130424:
/* C6B24 80130424 8FA3002C */ lw $v1, 0x2c($sp)
/* C6B28 80130428 006F102A */ slt $v0, $v1, $t7
/* C6B2C 8013042C 14400008 */ bnez $v0, .L80130450
/* C6B30 80130430 316200FF */ andi $v0, $t3, 0xff
/* C6B34 80130434 14400004 */ bnez $v0, .L80130448
/* C6B38 80130438 01E3102A */ slt $v0, $t7, $v1
/* C6B3C 8013043C AFAF002C */ sw $t7, 0x2c($sp)
/* C6B40 80130440 0804C114 */ j .L80130450
/* C6B44 80130444 240B0001 */ addiu $t3, $zero, 1
.L80130448:
/* C6B48 80130448 54400001 */ bnel $v0, $zero, .L80130450
/* C6B4C 8013044C AFAF002C */ sw $t7, 0x2c($sp)
.L80130450:
/* C6B50 80130450 8FA20020 */ lw $v0, 0x20($sp)
/* C6B54 80130454 0058102A */ slt $v0, $v0, $t8
/* C6B58 80130458 10400012 */ beqz $v0, .L801304A4
/* C6B5C 8013045C 00000000 */ nop
/* C6B60 80130460 97B7003E */ lhu $s7, 0x3e($sp)
/* C6B64 80130464 00171400 */ sll $v0, $s7, 0x10
/* C6B68 80130468 00021403 */ sra $v0, $v0, 0x10
/* C6B6C 8013046C 00581023 */ subu $v0, $v0, $t8
/* C6B70 80130470 04420001 */ bltzl $v0, .L80130478
/* C6B74 80130474 00021023 */ negu $v0, $v0
.L80130478:
/* C6B78 80130478 44821000 */ mtc1 $v0, $f2
/* C6B7C 8013047C 00000000 */ nop
/* C6B80 80130480 468010A0 */ cvt.s.w $f2, $f2
/* C6B84 80130484 3C014200 */ lui $at, 0x4200
/* C6B88 80130488 44810000 */ mtc1 $at, $f0
/* C6B8C 8013048C 46161083 */ div.s $f2, $f2, $f22
/* C6B90 80130490 46001002 */ mul.s $f0, $f2, $f0
/* C6B94 80130494 00000000 */ nop
/* C6B98 80130498 AFB80020 */ sw $t8, 0x20($sp)
/* C6B9C 8013049C 4600020D */ trunc.w.s $f8, $f0
/* C6BA0 801304A0 44104000 */ mfc1 $s0, $f8
.L801304A4:
/* C6BA4 801304A4 8FA20028 */ lw $v0, 0x28($sp)
/* C6BA8 801304A8 0056102A */ slt $v0, $v0, $s6
/* C6BAC 801304AC 50400001 */ beql $v0, $zero, .L801304B4
/* C6BB0 801304B0 AFB60028 */ sw $s6, 0x28($sp)
.L801304B4:
/* C6BB4 801304B4 15C0004F */ bnez $t6, .L801305F4
/* C6BB8 801304B8 24020001 */ addiu $v0, $zero, 1
/* C6BBC 801304BC 00141042 */ srl $v0, $s4, 1
/* C6BC0 801304C0 2442FFFF */ addiu $v0, $v0, -1
/* C6BC4 801304C4 30420FFF */ andi $v0, $v0, 0xfff
/* C6BC8 801304C8 3C17FD08 */ lui $s7, 0xfd08
/* C6BCC 801304CC 00571025 */ or $v0, $v0, $s7
/* C6BD0 801304D0 8CE50000 */ lw $a1, ($a3)
/* C6BD4 801304D4 01021025 */ or $v0, $t0, $v0
/* C6BD8 801304D8 00A0182D */ daddu $v1, $a1, $zero
/* C6BDC 801304DC 24A50008 */ addiu $a1, $a1, 8
/* C6BE0 801304E0 ACE50000 */ sw $a1, ($a3)
/* C6BE4 801304E4 AC620000 */ sw $v0, ($v1)
/* C6BE8 801304E8 8FB70098 */ lw $s7, 0x98($sp)
/* C6BEC 801304EC AC770004 */ sw $s7, 4($v1)
/* C6BF0 801304F0 8FA20018 */ lw $v0, 0x18($sp)
/* C6BF4 801304F4 8FA40010 */ lw $a0, 0x10($sp)
/* C6BF8 801304F8 24A30008 */ addiu $v1, $a1, 8
/* C6BFC 801304FC ACE30000 */ sw $v1, ($a3)
/* C6C00 80130500 24A30010 */ addiu $v1, $a1, 0x10
/* C6C04 80130504 ACAD0004 */ sw $t5, 4($a1)
/* C6C08 80130508 ACE30000 */ sw $v1, ($a3)
/* C6C0C 8013050C 3C03F400 */ lui $v1, 0xf400
/* C6C10 80130510 ACB50008 */ sw $s5, 8($a1)
/* C6C14 80130514 ACA0000C */ sw $zero, 0xc($a1)
/* C6C18 80130518 00441023 */ subu $v0, $v0, $a0
/* C6C1C 8013051C 24420001 */ addiu $v0, $v0, 1
/* C6C20 80130520 00021043 */ sra $v0, $v0, 1
/* C6C24 80130524 24420007 */ addiu $v0, $v0, 7
/* C6C28 80130528 000210C3 */ sra $v0, $v0, 3
/* C6C2C 8013052C 304201FF */ andi $v0, $v0, 0x1ff
/* C6C30 80130530 00021240 */ sll $v0, $v0, 9
/* C6C34 80130534 005E1025 */ or $v0, $v0, $fp
/* C6C38 80130538 01021025 */ or $v0, $t0, $v0
/* C6C3C 8013053C ACA20000 */ sw $v0, ($a1)
/* C6C40 80130540 8FA40010 */ lw $a0, 0x10($sp)
/* C6C44 80130544 24A20018 */ addiu $v0, $a1, 0x18
/* C6C48 80130548 ACE20000 */ sw $v0, ($a3)
/* C6C4C 8013054C 8FA20014 */ lw $v0, 0x14($sp)
/* C6C50 80130550 00042040 */ sll $a0, $a0, 1
/* C6C54 80130554 30840FFF */ andi $a0, $a0, 0xfff
/* C6C58 80130558 00042300 */ sll $a0, $a0, 0xc
/* C6C5C 8013055C 00021080 */ sll $v0, $v0, 2
/* C6C60 80130560 30420FFF */ andi $v0, $v0, 0xfff
/* C6C64 80130564 00431025 */ or $v0, $v0, $v1
/* C6C68 80130568 00822025 */ or $a0, $a0, $v0
/* C6C6C 8013056C ACA40010 */ sw $a0, 0x10($a1)
/* C6C70 80130570 8FA30018 */ lw $v1, 0x18($sp)
/* C6C74 80130574 8FA4001C */ lw $a0, 0x1c($sp)
/* C6C78 80130578 3C02E700 */ lui $v0, 0xe700
/* C6C7C 8013057C ACA20018 */ sw $v0, 0x18($a1)
/* C6C80 80130580 ACA0001C */ sw $zero, 0x1c($a1)
/* C6C84 80130584 00031840 */ sll $v1, $v1, 1
/* C6C88 80130588 30630FFF */ andi $v1, $v1, 0xfff
/* C6C8C 8013058C 00031B00 */ sll $v1, $v1, 0xc
/* C6C90 80130590 00042080 */ sll $a0, $a0, 2
/* C6C94 80130594 30840FFF */ andi $a0, $a0, 0xfff
/* C6C98 80130598 00992025 */ or $a0, $a0, $t9
/* C6C9C 8013059C 00641825 */ or $v1, $v1, $a0
/* C6CA0 801305A0 ACA30014 */ sw $v1, 0x14($a1)
/* C6CA4 801305A4 8FA20018 */ lw $v0, 0x18($sp)
/* C6CA8 801305A8 8FA40010 */ lw $a0, 0x10($sp)
/* C6CAC 801305AC 24A30020 */ addiu $v1, $a1, 0x20
/* C6CB0 801305B0 ACE30000 */ sw $v1, ($a3)
/* C6CB4 801305B4 3C03F500 */ lui $v1, 0xf500
/* C6CB8 801305B8 ACAC0024 */ sw $t4, 0x24($a1)
/* C6CBC 801305BC 00441023 */ subu $v0, $v0, $a0
/* C6CC0 801305C0 24420001 */ addiu $v0, $v0, 1
/* C6CC4 801305C4 00021043 */ sra $v0, $v0, 1
/* C6CC8 801305C8 24420007 */ addiu $v0, $v0, 7
/* C6CCC 801305CC 000210C3 */ sra $v0, $v0, 3
/* C6CD0 801305D0 304201FF */ andi $v0, $v0, 0x1ff
/* C6CD4 801305D4 00021240 */ sll $v0, $v0, 9
/* C6CD8 801305D8 00431025 */ or $v0, $v0, $v1
/* C6CDC 801305DC 01021025 */ or $v0, $t0, $v0
/* C6CE0 801305E0 ACA20020 */ sw $v0, 0x20($a1)
/* C6CE4 801305E4 24A20028 */ addiu $v0, $a1, 0x28
/* C6CE8 801305E8 8FA40010 */ lw $a0, 0x10($sp)
/* C6CEC 801305EC 0804C21C */ j .L80130870
/* C6CF0 801305F0 3C03F200 */ lui $v1, 0xf200
.L801305F4:
/* C6CF4 801305F4 55C20041 */ bnel $t6, $v0, .L801306FC
/* C6CF8 801305F8 24020002 */ addiu $v0, $zero, 2
/* C6CFC 801305FC 8CE50000 */ lw $a1, ($a3)
/* C6D00 80130600 00A0102D */ daddu $v0, $a1, $zero
/* C6D04 80130604 24A50008 */ addiu $a1, $a1, 8
/* C6D08 80130608 ACE50000 */ sw $a1, ($a3)
/* C6D0C 8013060C 8FB70054 */ lw $s7, 0x54($sp)
/* C6D10 80130610 AC570000 */ sw $s7, ($v0)
/* C6D14 80130614 8FB70098 */ lw $s7, 0x98($sp)
/* C6D18 80130618 AC570004 */ sw $s7, 4($v0)
/* C6D1C 8013061C 8FA20018 */ lw $v0, 0x18($sp)
/* C6D20 80130620 8FA40010 */ lw $a0, 0x10($sp)
/* C6D24 80130624 24A30008 */ addiu $v1, $a1, 8
/* C6D28 80130628 ACE30000 */ sw $v1, ($a3)
/* C6D2C 8013062C 24A30010 */ addiu $v1, $a1, 0x10
/* C6D30 80130630 ACAD0004 */ sw $t5, 4($a1)
/* C6D34 80130634 ACE30000 */ sw $v1, ($a3)
/* C6D38 80130638 3C03F400 */ lui $v1, 0xf400
/* C6D3C 8013063C ACB50008 */ sw $s5, 8($a1)
/* C6D40 80130640 ACA0000C */ sw $zero, 0xc($a1)
/* C6D44 80130644 00441023 */ subu $v0, $v0, $a0
/* C6D48 80130648 24420008 */ addiu $v0, $v0, 8
/* C6D4C 8013064C 000210C3 */ sra $v0, $v0, 3
/* C6D50 80130650 304201FF */ andi $v0, $v0, 0x1ff
/* C6D54 80130654 00021240 */ sll $v0, $v0, 9
/* C6D58 80130658 005E1025 */ or $v0, $v0, $fp
/* C6D5C 8013065C 01021025 */ or $v0, $t0, $v0
/* C6D60 80130660 ACA20000 */ sw $v0, ($a1)
/* C6D64 80130664 8FA40010 */ lw $a0, 0x10($sp)
/* C6D68 80130668 24A20018 */ addiu $v0, $a1, 0x18
/* C6D6C 8013066C ACE20000 */ sw $v0, ($a3)
/* C6D70 80130670 8FA20014 */ lw $v0, 0x14($sp)
/* C6D74 80130674 00042080 */ sll $a0, $a0, 2
/* C6D78 80130678 30840FFF */ andi $a0, $a0, 0xfff
/* C6D7C 8013067C 00042300 */ sll $a0, $a0, 0xc
/* C6D80 80130680 00021080 */ sll $v0, $v0, 2
/* C6D84 80130684 30420FFF */ andi $v0, $v0, 0xfff
/* C6D88 80130688 00431025 */ or $v0, $v0, $v1
/* C6D8C 8013068C 00822025 */ or $a0, $a0, $v0
/* C6D90 80130690 ACA40010 */ sw $a0, 0x10($a1)
/* C6D94 80130694 8FA30018 */ lw $v1, 0x18($sp)
/* C6D98 80130698 8FA4001C */ lw $a0, 0x1c($sp)
/* C6D9C 8013069C 3C02E700 */ lui $v0, 0xe700
/* C6DA0 801306A0 ACA20018 */ sw $v0, 0x18($a1)
/* C6DA4 801306A4 ACA0001C */ sw $zero, 0x1c($a1)
/* C6DA8 801306A8 00031880 */ sll $v1, $v1, 2
/* C6DAC 801306AC 30630FFF */ andi $v1, $v1, 0xfff
/* C6DB0 801306B0 00031B00 */ sll $v1, $v1, 0xc
/* C6DB4 801306B4 00042080 */ sll $a0, $a0, 2
/* C6DB8 801306B8 30840FFF */ andi $a0, $a0, 0xfff
/* C6DBC 801306BC 00992025 */ or $a0, $a0, $t9
/* C6DC0 801306C0 00641825 */ or $v1, $v1, $a0
/* C6DC4 801306C4 ACA30014 */ sw $v1, 0x14($a1)
/* C6DC8 801306C8 8FA20018 */ lw $v0, 0x18($sp)
/* C6DCC 801306CC 8FA40010 */ lw $a0, 0x10($sp)
/* C6DD0 801306D0 24A30020 */ addiu $v1, $a1, 0x20
/* C6DD4 801306D4 ACE30000 */ sw $v1, ($a3)
/* C6DD8 801306D8 3C03F200 */ lui $v1, 0xf200
/* C6DDC 801306DC ACAC0024 */ sw $t4, 0x24($a1)
/* C6DE0 801306E0 00441023 */ subu $v0, $v0, $a0
/* C6DE4 801306E4 24420008 */ addiu $v0, $v0, 8
/* C6DE8 801306E8 000210C3 */ sra $v0, $v0, 3
/* C6DEC 801306EC 304201FF */ andi $v0, $v0, 0x1ff
/* C6DF0 801306F0 00021240 */ sll $v0, $v0, 9
/* C6DF4 801306F4 0804C218 */ j .L80130860
/* C6DF8 801306F8 005E1025 */ or $v0, $v0, $fp
.L801306FC:
/* C6DFC 801306FC 15C20012 */ bne $t6, $v0, .L80130748
/* C6E00 80130700 24020003 */ addiu $v0, $zero, 3
/* C6E04 80130704 3C02FD10 */ lui $v0, 0xfd10
/* C6E08 80130708 02421025 */ or $v0, $s2, $v0
/* C6E0C 8013070C 8CE50000 */ lw $a1, ($a3)
/* C6E10 80130710 01021025 */ or $v0, $t0, $v0
/* C6E14 80130714 00A0182D */ daddu $v1, $a1, $zero
/* C6E18 80130718 24A50008 */ addiu $a1, $a1, 8
/* C6E1C 8013071C ACE50000 */ sw $a1, ($a3)
/* C6E20 80130720 AC620000 */ sw $v0, ($v1)
/* C6E24 80130724 8FB70098 */ lw $s7, 0x98($sp)
/* C6E28 80130728 AC770004 */ sw $s7, 4($v1)
/* C6E2C 8013072C 8FA20018 */ lw $v0, 0x18($sp)
/* C6E30 80130730 8FA40010 */ lw $a0, 0x10($sp)
/* C6E34 80130734 24A30008 */ addiu $v1, $a1, 8
/* C6E38 80130738 ACE30000 */ sw $v1, ($a3)
/* C6E3C 8013073C 24A30010 */ addiu $v1, $a1, 0x10
/* C6E40 80130740 0804C1E4 */ j .L80130790
/* C6E44 80130744 3C17F510 */ lui $s7, 0xf510
.L80130748:
/* C6E48 80130748 15C2005F */ bne $t6, $v0, .L801308C8
/* C6E4C 8013074C 3C03E400 */ lui $v1, 0xe400
/* C6E50 80130750 3C02FD18 */ lui $v0, 0xfd18
/* C6E54 80130754 02421025 */ or $v0, $s2, $v0
/* C6E58 80130758 8CE50000 */ lw $a1, ($a3)
/* C6E5C 8013075C 01021025 */ or $v0, $t0, $v0
/* C6E60 80130760 00A0182D */ daddu $v1, $a1, $zero
/* C6E64 80130764 24A50008 */ addiu $a1, $a1, 8
/* C6E68 80130768 ACE50000 */ sw $a1, ($a3)
/* C6E6C 8013076C AC620000 */ sw $v0, ($v1)
/* C6E70 80130770 8FB70098 */ lw $s7, 0x98($sp)
/* C6E74 80130774 AC770004 */ sw $s7, 4($v1)
/* C6E78 80130778 8FA20018 */ lw $v0, 0x18($sp)
/* C6E7C 8013077C 8FA40010 */ lw $a0, 0x10($sp)
/* C6E80 80130780 24A30008 */ addiu $v1, $a1, 8
/* C6E84 80130784 ACE30000 */ sw $v1, ($a3)
/* C6E88 80130788 24A30010 */ addiu $v1, $a1, 0x10
/* C6E8C 8013078C 3C17F518 */ lui $s7, 0xf518
.L80130790:
/* C6E90 80130790 ACAD0004 */ sw $t5, 4($a1)
/* C6E94 80130794 ACE30000 */ sw $v1, ($a3)
/* C6E98 80130798 3C03F400 */ lui $v1, 0xf400
/* C6E9C 8013079C ACB50008 */ sw $s5, 8($a1)
/* C6EA0 801307A0 ACA0000C */ sw $zero, 0xc($a1)
/* C6EA4 801307A4 00441023 */ subu $v0, $v0, $a0
/* C6EA8 801307A8 00021040 */ sll $v0, $v0, 1
/* C6EAC 801307AC 24420009 */ addiu $v0, $v0, 9
/* C6EB0 801307B0 000210C3 */ sra $v0, $v0, 3
/* C6EB4 801307B4 304201FF */ andi $v0, $v0, 0x1ff
/* C6EB8 801307B8 00021240 */ sll $v0, $v0, 9
/* C6EBC 801307BC 00571025 */ or $v0, $v0, $s7
/* C6EC0 801307C0 01021025 */ or $v0, $t0, $v0
/* C6EC4 801307C4 ACA20000 */ sw $v0, ($a1)
/* C6EC8 801307C8 8FA40010 */ lw $a0, 0x10($sp)
/* C6ECC 801307CC 24A20018 */ addiu $v0, $a1, 0x18
/* C6ED0 801307D0 ACE20000 */ sw $v0, ($a3)
/* C6ED4 801307D4 8FA20014 */ lw $v0, 0x14($sp)
/* C6ED8 801307D8 00042080 */ sll $a0, $a0, 2
/* C6EDC 801307DC 30840FFF */ andi $a0, $a0, 0xfff
/* C6EE0 801307E0 00042300 */ sll $a0, $a0, 0xc
/* C6EE4 801307E4 00021080 */ sll $v0, $v0, 2
/* C6EE8 801307E8 30420FFF */ andi $v0, $v0, 0xfff
/* C6EEC 801307EC 00431025 */ or $v0, $v0, $v1
/* C6EF0 801307F0 00822025 */ or $a0, $a0, $v0
/* C6EF4 801307F4 ACA40010 */ sw $a0, 0x10($a1)
/* C6EF8 801307F8 8FA30018 */ lw $v1, 0x18($sp)
/* C6EFC 801307FC 8FA4001C */ lw $a0, 0x1c($sp)
/* C6F00 80130800 3C02E700 */ lui $v0, 0xe700
/* C6F04 80130804 ACA20018 */ sw $v0, 0x18($a1)
/* C6F08 80130808 ACA0001C */ sw $zero, 0x1c($a1)
/* C6F0C 8013080C 00031880 */ sll $v1, $v1, 2
/* C6F10 80130810 30630FFF */ andi $v1, $v1, 0xfff
/* C6F14 80130814 00031B00 */ sll $v1, $v1, 0xc
/* C6F18 80130818 00042080 */ sll $a0, $a0, 2
/* C6F1C 8013081C 30840FFF */ andi $a0, $a0, 0xfff
/* C6F20 80130820 00992025 */ or $a0, $a0, $t9
/* C6F24 80130824 00641825 */ or $v1, $v1, $a0
/* C6F28 80130828 ACA30014 */ sw $v1, 0x14($a1)
/* C6F2C 8013082C 8FA20018 */ lw $v0, 0x18($sp)
/* C6F30 80130830 8FA40010 */ lw $a0, 0x10($sp)
/* C6F34 80130834 24A30020 */ addiu $v1, $a1, 0x20
/* C6F38 80130838 ACE30000 */ sw $v1, ($a3)
/* C6F3C 8013083C 3C03F200 */ lui $v1, 0xf200
/* C6F40 80130840 ACAC0024 */ sw $t4, 0x24($a1)
/* C6F44 80130844 00441023 */ subu $v0, $v0, $a0
/* C6F48 80130848 00021040 */ sll $v0, $v0, 1
/* C6F4C 8013084C 24420009 */ addiu $v0, $v0, 9
/* C6F50 80130850 000210C3 */ sra $v0, $v0, 3
/* C6F54 80130854 304201FF */ andi $v0, $v0, 0x1ff
/* C6F58 80130858 00021240 */ sll $v0, $v0, 9
/* C6F5C 8013085C 00571025 */ or $v0, $v0, $s7
.L80130860:
/* C6F60 80130860 01021025 */ or $v0, $t0, $v0
/* C6F64 80130864 ACA20020 */ sw $v0, 0x20($a1)
/* C6F68 80130868 8FA40010 */ lw $a0, 0x10($sp)
/* C6F6C 8013086C 24A20028 */ addiu $v0, $a1, 0x28
.L80130870:
/* C6F70 80130870 ACE20000 */ sw $v0, ($a3)
/* C6F74 80130874 8FA20014 */ lw $v0, 0x14($sp)
/* C6F78 80130878 00042080 */ sll $a0, $a0, 2
/* C6F7C 8013087C 30840FFF */ andi $a0, $a0, 0xfff
/* C6F80 80130880 00042300 */ sll $a0, $a0, 0xc
/* C6F84 80130884 00021080 */ sll $v0, $v0, 2
/* C6F88 80130888 30420FFF */ andi $v0, $v0, 0xfff
/* C6F8C 8013088C 00431025 */ or $v0, $v0, $v1
/* C6F90 80130890 00822025 */ or $a0, $a0, $v0
/* C6F94 80130894 ACA40028 */ sw $a0, 0x28($a1)
/* C6F98 80130898 8FA30018 */ lw $v1, 0x18($sp)
/* C6F9C 8013089C 24A20030 */ addiu $v0, $a1, 0x30
/* C6FA0 801308A0 ACE20000 */ sw $v0, ($a3)
/* C6FA4 801308A4 8FA2001C */ lw $v0, 0x1c($sp)
/* C6FA8 801308A8 00031880 */ sll $v1, $v1, 2
/* C6FAC 801308AC 30630FFF */ andi $v1, $v1, 0xfff
/* C6FB0 801308B0 00031B00 */ sll $v1, $v1, 0xc
/* C6FB4 801308B4 00021080 */ sll $v0, $v0, 2
/* C6FB8 801308B8 30420FFF */ andi $v0, $v0, 0xfff
/* C6FBC 801308BC 00621825 */ or $v1, $v1, $v0
/* C6FC0 801308C0 ACA3002C */ sw $v1, 0x2c($a1)
/* C6FC4 801308C4 3C03E400 */ lui $v1, 0xe400
.L801308C8:
/* C6FC8 801308C8 8CE50000 */ lw $a1, ($a3)
/* C6FCC 801308CC 8FA40028 */ lw $a0, 0x28($sp)
/* C6FD0 801308D0 00A0302D */ daddu $a2, $a1, $zero
/* C6FD4 801308D4 24A50008 */ addiu $a1, $a1, 8
/* C6FD8 801308D8 00042080 */ sll $a0, $a0, 2
/* C6FDC 801308DC 30840FFF */ andi $a0, $a0, 0xfff
/* C6FE0 801308E0 ACE50000 */ sw $a1, ($a3)
/* C6FE4 801308E4 8FA2002C */ lw $v0, 0x2c($sp)
/* C6FE8 801308E8 00042300 */ sll $a0, $a0, 0xc
/* C6FEC 801308EC 00021080 */ sll $v0, $v0, 2
/* C6FF0 801308F0 30420FFF */ andi $v0, $v0, 0xfff
/* C6FF4 801308F4 00431025 */ or $v0, $v0, $v1
/* C6FF8 801308F8 00822025 */ or $a0, $a0, $v0
/* C6FFC 801308FC 24A20008 */ addiu $v0, $a1, 8
/* C7000 80130900 ACC40000 */ sw $a0, ($a2)
/* C7004 80130904 ACE20000 */ sw $v0, ($a3)
/* C7008 80130908 8FA30020 */ lw $v1, 0x20($sp)
/* C700C 8013090C 24A20010 */ addiu $v0, $a1, 0x10
/* C7010 80130910 ACE20000 */ sw $v0, ($a3)
/* C7014 80130914 8FA20024 */ lw $v0, 0x24($sp)
/* C7018 80130918 00031880 */ sll $v1, $v1, 2
/* C701C 8013091C 30630FFF */ andi $v1, $v1, 0xfff
/* C7020 80130920 00031B00 */ sll $v1, $v1, 0xc
/* C7024 80130924 00021080 */ sll $v0, $v0, 2
/* C7028 80130928 30420FFF */ andi $v0, $v0, 0xfff
/* C702C 8013092C 00621825 */ or $v1, $v1, $v0
/* C7030 80130930 3C02E100 */ lui $v0, 0xe100
/* C7034 80130934 ACC30004 */ sw $v1, 4($a2)
/* C7038 80130938 ACA20000 */ sw $v0, ($a1)
/* C703C 8013093C 00101400 */ sll $v0, $s0, 0x10
/* C7040 80130940 3223FFFF */ andi $v1, $s1, 0xffff
/* C7044 80130944 00431025 */ or $v0, $v0, $v1
/* C7048 80130948 ACA20004 */ sw $v0, 4($a1)
/* C704C 8013094C 3C02F100 */ lui $v0, 0xf100
/* C7050 80130950 ACA20008 */ sw $v0, 8($a1)
/* C7054 80130954 8FB7004C */ lw $s7, 0x4c($sp)
/* C7058 80130958 00171400 */ sll $v0, $s7, 0x10
/* C705C 8013095C 8FB70050 */ lw $s7, 0x50($sp)
/* C7060 80130960 32E3FFFF */ andi $v1, $s7, 0xffff
/* C7064 80130964 00431025 */ or $v0, $v0, $v1
/* C7068 80130968 ACA2000C */ sw $v0, 0xc($a1)
/* C706C 8013096C 316200FF */ andi $v0, $t3, 0xff
/* C7070 80130970 14400011 */ bnez $v0, .L801309B8
/* C7074 80130974 24020001 */ addiu $v0, $zero, 1
/* C7078 80130978 97A30048 */ lhu $v1, 0x48($sp)
/* C707C 8013097C 44830000 */ mtc1 $v1, $f0
/* C7080 80130980 00000000 */ nop
/* C7084 80130984 46800020 */ cvt.s.w $f0, $f0
/* C7088 80130988 46140002 */ mul.s $f0, $f0, $f20
/* C708C 8013098C 00000000 */ nop
/* C7090 80130990 C7A2002C */ lwc1 $f2, 0x2c($sp)
/* C7094 80130994 468010A0 */ cvt.s.w $f2, $f2
/* C7098 80130998 8FA20014 */ lw $v0, 0x14($sp)
/* C709C 8013099C 01231823 */ subu $v1, $t1, $v1
/* C70A0 801309A0 46001081 */ sub.s $f2, $f2, $f0
/* C70A4 801309A4 00431021 */ addu $v0, $v0, $v1
/* C70A8 801309A8 AFA20014 */ sw $v0, 0x14($sp)
/* C70AC 801309AC 4600120D */ trunc.w.s $f8, $f2
/* C70B0 801309B0 0804C09C */ j .L80130270
/* C70B4 801309B4 E7A80024 */ swc1 $f8, 0x24($sp)
.L801309B8:
/* C70B8 801309B8 8FBF0084 */ lw $ra, 0x84($sp)
/* C70BC 801309BC 8FBE0080 */ lw $fp, 0x80($sp)
/* C70C0 801309C0 8FB7007C */ lw $s7, 0x7c($sp)
/* C70C4 801309C4 8FB60078 */ lw $s6, 0x78($sp)
/* C70C8 801309C8 8FB50074 */ lw $s5, 0x74($sp)
/* C70CC 801309CC 8FB40070 */ lw $s4, 0x70($sp)
/* C70D0 801309D0 8FB3006C */ lw $s3, 0x6c($sp)
/* C70D4 801309D4 8FB20068 */ lw $s2, 0x68($sp)
/* C70D8 801309D8 8FB10064 */ lw $s1, 0x64($sp)
/* C70DC 801309DC 8FB00060 */ lw $s0, 0x60($sp)
/* C70E0 801309E0 D7B60090 */ ldc1 $f22, 0x90($sp)
/* C70E4 801309E4 D7B40088 */ ldc1 $f20, 0x88($sp)
/* C70E8 801309E8 03E00008 */ jr $ra
/* C70EC 801309EC 27BD0098 */ addiu $sp, $sp, 0x98

View File

@ -1,617 +0,0 @@
.set noat # allow manual use of $at
.set noreorder # don't insert nops after branches
.section .rodata
dlabel D_80150A40
.double 0.01
dlabel D_80150A48
.double 0.3
.section .text
glabel draw_tiled_image
/* C5C00 8012F500 27BDFF88 */ addiu $sp, $sp, -0x78
/* C5C04 8012F504 C7A800A4 */ lwc1 $f8, 0xa4($sp)
/* C5C08 8012F508 3C018015 */ lui $at, %hi(D_80150A40)
/* C5C0C 8012F50C D4220A40 */ ldc1 $f2, %lo(D_80150A40)($at)
/* C5C10 8012F510 8FA2008C */ lw $v0, 0x8c($sp)
/* C5C14 8012F514 AFA40078 */ sw $a0, 0x78($sp)
/* C5C18 8012F518 8FA40090 */ lw $a0, 0x90($sp)
/* C5C1C 8012F51C C7AA00A8 */ lwc1 $f10, 0xa8($sp)
/* C5C20 8012F520 AFB5005C */ sw $s5, 0x5c($sp)
/* C5C24 8012F524 93B5008B */ lbu $s5, 0x8b($sp)
/* C5C28 8012F528 97A30096 */ lhu $v1, 0x96($sp)
/* C5C2C 8012F52C 97A8009A */ lhu $t0, 0x9a($sp)
/* C5C30 8012F530 A3A70027 */ sb $a3, 0x27($sp)
/* C5C34 8012F534 97A700A2 */ lhu $a3, 0xa2($sp)
/* C5C38 8012F538 AFB30054 */ sw $s3, 0x54($sp)
/* C5C3C 8012F53C 00A0982D */ daddu $s3, $a1, $zero
/* C5C40 8012F540 AFBE0068 */ sw $fp, 0x68($sp)
/* C5C44 8012F544 AFB70064 */ sw $s7, 0x64($sp)
/* C5C48 8012F548 AFB60060 */ sw $s6, 0x60($sp)
/* C5C4C 8012F54C AFB40058 */ sw $s4, 0x58($sp)
/* C5C50 8012F550 AFB20050 */ sw $s2, 0x50($sp)
/* C5C54 8012F554 AFB1004C */ sw $s1, 0x4c($sp)
/* C5C58 8012F558 AFB00048 */ sw $s0, 0x48($sp)
/* C5C5C 8012F55C F7B40070 */ sdc1 $f20, 0x70($sp)
/* C5C60 8012F560 AFA60080 */ sw $a2, 0x80($sp)
/* C5C64 8012F564 46004021 */ cvt.d.s $f0, $f8
/* C5C68 8012F568 A3B50028 */ sb $s5, 0x28($sp)
/* C5C6C 8012F56C 97B5009E */ lhu $s5, 0x9e($sp)
/* C5C70 8012F570 4622003C */ c.lt.d $f0, $f2
/* C5C74 8012F574 00000000 */ nop
/* C5C78 8012F578 45010046 */ bc1t .L8012F694
/* C5C7C 8012F57C A7B50036 */ sh $s5, 0x36($sp)
/* C5C80 8012F580 460051A1 */ cvt.d.s $f6, $f10
/* C5C84 8012F584 4622303C */ c.lt.d $f6, $f2
/* C5C88 8012F588 00000000 */ nop
/* C5C8C 8012F58C 45030214 */ bc1tl .L8012FDE0
/* C5C90 8012F590 0000102D */ daddu $v0, $zero, $zero
/* C5C94 8012F594 00021400 */ sll $v0, $v0, 0x10
/* C5C98 8012F598 00022C03 */ sra $a1, $v0, 0x10
/* C5C9C 8012F59C 97B50036 */ lhu $s5, 0x36($sp)
/* C5CA0 8012F5A0 3066FFFF */ andi $a2, $v1, 0xffff
/* C5CA4 8012F5A4 02A61021 */ addu $v0, $s5, $a2
/* C5CA8 8012F5A8 00A2102A */ slt $v0, $a1, $v0
/* C5CAC 8012F5AC 10400039 */ beqz $v0, .L8012F694
/* C5CB0 8012F5B0 00041400 */ sll $v0, $a0, 0x10
/* C5CB4 8012F5B4 00022403 */ sra $a0, $v0, 0x10
/* C5CB8 8012F5B8 3103FFFF */ andi $v1, $t0, 0xffff
/* C5CBC 8012F5BC 00E33821 */ addu $a3, $a3, $v1
/* C5CC0 8012F5C0 0087102A */ slt $v0, $a0, $a3
/* C5CC4 8012F5C4 10400206 */ beqz $v0, .L8012FDE0
/* C5CC8 8012F5C8 0000102D */ daddu $v0, $zero, $zero
/* C5CCC 8012F5CC 44931000 */ mtc1 $s3, $f2
/* C5CD0 8012F5D0 00000000 */ nop
/* C5CD4 8012F5D4 468010A1 */ cvt.d.w $f2, $f2
/* C5CD8 8012F5D8 44852000 */ mtc1 $a1, $f4
/* C5CDC 8012F5DC 00000000 */ nop
/* C5CE0 8012F5E0 46802120 */ cvt.s.w $f4, $f4
/* C5CE4 8012F5E4 06630007 */ bgezl $s3, .L8012F604
/* C5CE8 8012F5E8 46201020 */ cvt.s.d $f0, $f2
/* C5CEC 8012F5EC 3C0141F0 */ lui $at, 0x41f0
/* C5CF0 8012F5F0 44810800 */ mtc1 $at, $f1
/* C5CF4 8012F5F4 44800000 */ mtc1 $zero, $f0
/* C5CF8 8012F5F8 00000000 */ nop
/* C5CFC 8012F5FC 46201080 */ add.d $f2, $f2, $f0
/* C5D00 8012F600 46201020 */ cvt.s.d $f0, $f2
.L8012F604:
/* C5D04 8012F604 46080002 */ mul.s $f0, $f0, $f8
/* C5D08 8012F608 00000000 */ nop
/* C5D0C 8012F60C 46002000 */ add.s $f0, $f4, $f0
/* C5D10 8012F610 4600050D */ trunc.w.s $f20, $f0
/* C5D14 8012F614 4402A000 */ mfc1 $v0, $f20
/* C5D18 8012F618 00000000 */ nop
/* C5D1C 8012F61C 00021400 */ sll $v0, $v0, 0x10
/* C5D20 8012F620 00021403 */ sra $v0, $v0, 0x10
/* C5D24 8012F624 00C2102A */ slt $v0, $a2, $v0
/* C5D28 8012F628 104001ED */ beqz $v0, .L8012FDE0
/* C5D2C 8012F62C 0000102D */ daddu $v0, $zero, $zero
/* C5D30 8012F630 C7A20080 */ lwc1 $f2, 0x80($sp)
/* C5D34 8012F634 468010A1 */ cvt.d.w $f2, $f2
/* C5D38 8012F638 8FB50080 */ lw $s5, 0x80($sp)
/* C5D3C 8012F63C 44842000 */ mtc1 $a0, $f4
/* C5D40 8012F640 00000000 */ nop
/* C5D44 8012F644 46802120 */ cvt.s.w $f4, $f4
/* C5D48 8012F648 06A30007 */ bgezl $s5, .L8012F668
/* C5D4C 8012F64C 46201020 */ cvt.s.d $f0, $f2
/* C5D50 8012F650 3C0141F0 */ lui $at, 0x41f0
/* C5D54 8012F654 44810800 */ mtc1 $at, $f1
/* C5D58 8012F658 44800000 */ mtc1 $zero, $f0
/* C5D5C 8012F65C 00000000 */ nop
/* C5D60 8012F660 46201080 */ add.d $f2, $f2, $f0
/* C5D64 8012F664 46201020 */ cvt.s.d $f0, $f2
.L8012F668:
/* C5D68 8012F668 460A0002 */ mul.s $f0, $f0, $f10
/* C5D6C 8012F66C 00000000 */ nop
/* C5D70 8012F670 46002000 */ add.s $f0, $f4, $f0
/* C5D74 8012F674 4600050D */ trunc.w.s $f20, $f0
/* C5D78 8012F678 4402A000 */ mfc1 $v0, $f20
/* C5D7C 8012F67C 00000000 */ nop
/* C5D80 8012F680 00021400 */ sll $v0, $v0, 0x10
/* C5D84 8012F684 00021403 */ sra $v0, $v0, 0x10
/* C5D88 8012F688 0062102A */ slt $v0, $v1, $v0
/* C5D8C 8012F68C 14400003 */ bnez $v0, .L8012F69C
/* C5D90 8012F690 0000C82D */ daddu $t9, $zero, $zero
.L8012F694:
/* C5D94 8012F694 0804BF78 */ j .L8012FDE0
/* C5D98 8012F698 0000102D */ daddu $v0, $zero, $zero
.L8012F69C:
/* C5D9C 8012F69C 0060702D */ daddu $t6, $v1, $zero
/* C5DA0 8012F6A0 0080B82D */ daddu $s7, $a0, $zero
/* C5DA4 8012F6A4 02EE1023 */ subu $v0, $s7, $t6
/* C5DA8 8012F6A8 04420001 */ bltzl $v0, .L8012F6B0
/* C5DAC 8012F6AC 00021023 */ negu $v0, $v0
.L8012F6B0:
/* C5DB0 8012F6B0 3C014040 */ lui $at, 0x4040
/* C5DB4 8012F6B4 44812800 */ mtc1 $at, $f5
/* C5DB8 8012F6B8 44802000 */ mtc1 $zero, $f4
/* C5DBC 8012F6BC 00E0A02D */ daddu $s4, $a3, $zero
/* C5DC0 8012F6C0 46243102 */ mul.d $f4, $f6, $f4
/* C5DC4 8012F6C4 00000000 */ nop
/* C5DC8 8012F6C8 00A0802D */ daddu $s0, $a1, $zero
/* C5DCC 8012F6CC 3C014200 */ lui $at, 0x4200
/* C5DD0 8012F6D0 44817000 */ mtc1 $at, $f14
/* C5DD4 8012F6D4 3C013F80 */ lui $at, 0x3f80
/* C5DD8 8012F6D8 44811000 */ mtc1 $at, $f2
/* C5DDC 8012F6DC 3C014050 */ lui $at, 0x4050
/* C5DE0 8012F6E0 44819800 */ mtc1 $at, $f19
/* C5DE4 8012F6E4 44809000 */ mtc1 $zero, $f18
/* C5DE8 8012F6E8 3C018015 */ lui $at, %hi(D_80150A48)
/* C5DEC 8012F6EC D42C0A48 */ ldc1 $f12, %lo(D_80150A48)($at)
/* C5DF0 8012F6F0 3C014480 */ lui $at, 0x4480
/* C5DF4 8012F6F4 44813000 */ mtc1 $at, $f6
/* C5DF8 8012F6F8 46081003 */ div.s $f0, $f2, $f8
/* C5DFC 8012F6FC 46060002 */ mul.s $f0, $f0, $f6
/* C5E00 8012F700 00000000 */ nop
/* C5E04 8012F704 3C014280 */ lui $at, 0x4280
/* C5E08 8012F708 44818000 */ mtc1 $at, $f16
/* C5E0C 8012F70C 00C0502D */ daddu $t2, $a2, $zero
/* C5E10 8012F710 AFA2003C */ sw $v0, 0x3c($sp)
/* C5E14 8012F714 460A1083 */ div.s $f2, $f2, $f10
/* C5E18 8012F718 46061082 */ mul.s $f2, $f2, $f6
/* C5E1C 8012F71C 00000000 */ nop
/* C5E20 8012F720 AFA00004 */ sw $zero, 4($sp)
/* C5E24 8012F724 AFB70014 */ sw $s7, 0x14($sp)
/* C5E28 8012F728 4600050D */ trunc.w.s $f20, $f0
/* C5E2C 8012F72C E7B40038 */ swc1 $f20, 0x38($sp)
/* C5E30 8012F730 3C013FE0 */ lui $at, 0x3fe0
/* C5E34 8012F734 44810800 */ mtc1 $at, $f1
/* C5E38 8012F738 44800000 */ mtc1 $zero, $f0
/* C5E3C 8012F73C 4600150D */ trunc.w.s $f20, $f2
/* C5E40 8012F740 441EA000 */ mfc1 $fp, $f20
/* C5E44 8012F744 46202100 */ add.d $f4, $f4, $f0
.L8012F748:
/* C5E48 8012F748 C7A00014 */ lwc1 $f0, 0x14($sp)
/* C5E4C 8012F74C 46800021 */ cvt.d.w $f0, $f0
/* C5E50 8012F750 8FA20004 */ lw $v0, 4($sp)
/* C5E54 8012F754 46240000 */ add.d $f0, $f0, $f4
/* C5E58 8012F758 2442001F */ addiu $v0, $v0, 0x1f
/* C5E5C 8012F75C AFA2000C */ sw $v0, 0xc($sp)
/* C5E60 8012F760 4620050D */ trunc.w.d $f20, $f0
/* C5E64 8012F764 4402A000 */ mfc1 $v0, $f20
/* C5E68 8012F768 00000000 */ nop
/* C5E6C 8012F76C AFA2001C */ sw $v0, 0x1c($sp)
/* C5E70 8012F770 01C2102A */ slt $v0, $t6, $v0
/* C5E74 8012F774 14400014 */ bnez $v0, .L8012F7C8
/* C5E78 8012F778 0000902D */ daddu $s2, $zero, $zero
/* C5E7C 8012F77C 460E5082 */ mul.s $f2, $f10, $f14
/* C5E80 8012F780 00000000 */ nop
.L8012F784:
/* C5E84 8012F784 8FA40004 */ lw $a0, 4($sp)
/* C5E88 8012F788 8FA2001C */ lw $v0, 0x1c($sp)
/* C5E8C 8012F78C 24830020 */ addiu $v1, $a0, 0x20
/* C5E90 8012F790 44820000 */ mtc1 $v0, $f0
/* C5E94 8012F794 00000000 */ nop
/* C5E98 8012F798 46800020 */ cvt.s.w $f0, $f0
/* C5E9C 8012F79C 46020000 */ add.s $f0, $f0, $f2
/* C5EA0 8012F7A0 AFA30004 */ sw $v1, 4($sp)
/* C5EA4 8012F7A4 AFA20014 */ sw $v0, 0x14($sp)
/* C5EA8 8012F7A8 4600050D */ trunc.w.s $f20, $f0
/* C5EAC 8012F7AC 4402A000 */ mfc1 $v0, $f20
/* C5EB0 8012F7B0 00000000 */ nop
/* C5EB4 8012F7B4 AFA2001C */ sw $v0, 0x1c($sp)
/* C5EB8 8012F7B8 004E102A */ slt $v0, $v0, $t6
/* C5EBC 8012F7BC 1440FFF1 */ bnez $v0, .L8012F784
/* C5EC0 8012F7C0 2482003F */ addiu $v0, $a0, 0x3f
/* C5EC4 8012F7C4 AFA2000C */ sw $v0, 0xc($sp)
.L8012F7C8:
/* C5EC8 8012F7C8 8FA20014 */ lw $v0, 0x14($sp)
/* C5ECC 8012F7CC 004E102A */ slt $v0, $v0, $t6
/* C5ED0 8012F7D0 10400009 */ beqz $v0, .L8012F7F8
/* C5ED4 8012F7D4 00000000 */ nop
/* C5ED8 8012F7D8 C7A0003C */ lwc1 $f0, 0x3c($sp)
/* C5EDC 8012F7DC 46800020 */ cvt.s.w $f0, $f0
/* C5EE0 8012F7E0 460A0003 */ div.s $f0, $f0, $f10
/* C5EE4 8012F7E4 460E0002 */ mul.s $f0, $f0, $f14
/* C5EE8 8012F7E8 00000000 */ nop
/* C5EEC 8012F7EC AFAE0014 */ sw $t6, 0x14($sp)
/* C5EF0 8012F7F0 4600050D */ trunc.w.s $f20, $f0
/* C5EF4 8012F7F4 4412A000 */ mfc1 $s2, $f20
.L8012F7F8:
/* C5EF8 8012F7F8 8FA2000C */ lw $v0, 0xc($sp)
/* C5EFC 8012F7FC 8FB50080 */ lw $s5, 0x80($sp)
/* C5F00 8012F800 24420001 */ addiu $v0, $v0, 1
/* C5F04 8012F804 0055102B */ sltu $v0, $v0, $s5
/* C5F08 8012F808 14400014 */ bnez $v0, .L8012F85C
/* C5F0C 8012F80C 26A3FFFF */ addiu $v1, $s5, -1
/* C5F10 8012F810 44830000 */ mtc1 $v1, $f0
/* C5F14 8012F814 00000000 */ nop
/* C5F18 8012F818 46800020 */ cvt.s.w $f0, $f0
/* C5F1C 8012F81C 460A0002 */ mul.s $f0, $f0, $f10
/* C5F20 8012F820 00000000 */ nop
/* C5F24 8012F824 4600050D */ trunc.w.s $f20, $f0
/* C5F28 8012F828 4402A000 */ mfc1 $v0, $f20
/* C5F2C 8012F82C 00000000 */ nop
/* C5F30 8012F830 00021400 */ sll $v0, $v0, 0x10
/* C5F34 8012F834 00021403 */ sra $v0, $v0, 0x10
/* C5F38 8012F838 02E21021 */ addu $v0, $s7, $v0
/* C5F3C 8012F83C 44820000 */ mtc1 $v0, $f0
/* C5F40 8012F840 00000000 */ nop
/* C5F44 8012F844 46800020 */ cvt.s.w $f0, $f0
/* C5F48 8012F848 460A0000 */ add.s $f0, $f0, $f10
/* C5F4C 8012F84C AFA3000C */ sw $v1, 0xc($sp)
/* C5F50 8012F850 24190001 */ addiu $t9, $zero, 1
/* C5F54 8012F854 4600050D */ trunc.w.s $f20, $f0
/* C5F58 8012F858 E7B4001C */ swc1 $f20, 0x1c($sp)
.L8012F85C:
/* C5F5C 8012F85C 8FA2001C */ lw $v0, 0x1c($sp)
/* C5F60 8012F860 0282102A */ slt $v0, $s4, $v0
/* C5F64 8012F864 10400004 */ beqz $v0, .L8012F878
/* C5F68 8012F868 332200FF */ andi $v0, $t9, 0xff
/* C5F6C 8012F86C 14400002 */ bnez $v0, .L8012F878
/* C5F70 8012F870 AFB4001C */ sw $s4, 0x1c($sp)
/* C5F74 8012F874 24190001 */ addiu $t9, $zero, 1
.L8012F878:
/* C5F78 8012F878 0000582D */ daddu $t3, $zero, $zero
/* C5F7C 8012F87C 020A1023 */ subu $v0, $s0, $t2
/* C5F80 8012F880 04410002 */ bgez $v0, .L8012F88C
/* C5F84 8012F884 0040B02D */ daddu $s6, $v0, $zero
/* C5F88 8012F888 0016B023 */ negu $s6, $s6
.L8012F88C:
/* C5F8C 8012F88C 3C08800A */ lui $t0, %hi(gMasterGfxPos)
/* C5F90 8012F890 2508A66C */ addiu $t0, $t0, %lo(gMasterGfxPos)
/* C5F94 8012F894 46004021 */ cvt.d.s $f0, $f8
/* C5F98 8012F898 266CFFFF */ addiu $t4, $s3, -1
/* C5F9C 8012F89C 3C11F510 */ lui $s1, 0xf510
/* C5FA0 8012F8A0 97A20036 */ lhu $v0, 0x36($sp)
/* C5FA4 8012F8A4 93AF0028 */ lbu $t7, 0x28($sp)
/* C5FA8 8012F8A8 93B50027 */ lbu $s5, 0x27($sp)
/* C5FAC 8012F8AC 46320002 */ mul.d $f0, $f0, $f18
/* C5FB0 8012F8B0 00000000 */ nop
/* C5FB4 8012F8B4 AFA00000 */ sw $zero, ($sp)
/* C5FB8 8012F8B8 AFB00010 */ sw $s0, 0x10($sp)
/* C5FBC 8012F8BC 0142C021 */ addu $t8, $t2, $v0
/* C5FC0 8012F8C0 32A20007 */ andi $v0, $s5, 7
/* C5FC4 8012F8C4 00024D40 */ sll $t1, $v0, 0x15
/* C5FC8 8012F8C8 31950FFF */ andi $s5, $t4, 0xfff
/* C5FCC 8012F8CC AFB50040 */ sw $s5, 0x40($sp)
/* C5FD0 8012F8D0 462C0180 */ add.d $f6, $f0, $f12
.L8012F8D4:
/* C5FD4 8012F8D4 C7A00010 */ lwc1 $f0, 0x10($sp)
/* C5FD8 8012F8D8 46800021 */ cvt.d.w $f0, $f0
/* C5FDC 8012F8DC 8FA20000 */ lw $v0, ($sp)
/* C5FE0 8012F8E0 46260000 */ add.d $f0, $f0, $f6
/* C5FE4 8012F8E4 2442003F */ addiu $v0, $v0, 0x3f
/* C5FE8 8012F8E8 AFA20008 */ sw $v0, 8($sp)
/* C5FEC 8012F8EC 4620050D */ trunc.w.d $f20, $f0
/* C5FF0 8012F8F0 4402A000 */ mfc1 $v0, $f20
/* C5FF4 8012F8F4 00000000 */ nop
/* C5FF8 8012F8F8 AFA20018 */ sw $v0, 0x18($sp)
/* C5FFC 8012F8FC 0142102A */ slt $v0, $t2, $v0
/* C6000 8012F900 14400014 */ bnez $v0, .L8012F954
/* C6004 8012F904 0000682D */ daddu $t5, $zero, $zero
/* C6008 8012F908 46104082 */ mul.s $f2, $f8, $f16
/* C600C 8012F90C 00000000 */ nop
.L8012F910:
/* C6010 8012F910 8FA40000 */ lw $a0, ($sp)
/* C6014 8012F914 8FA30018 */ lw $v1, 0x18($sp)
/* C6018 8012F918 24820040 */ addiu $v0, $a0, 0x40
/* C601C 8012F91C 44830000 */ mtc1 $v1, $f0
/* C6020 8012F920 00000000 */ nop
/* C6024 8012F924 46800020 */ cvt.s.w $f0, $f0
/* C6028 8012F928 46020000 */ add.s $f0, $f0, $f2
/* C602C 8012F92C AFA20000 */ sw $v0, ($sp)
/* C6030 8012F930 AFA30010 */ sw $v1, 0x10($sp)
/* C6034 8012F934 4600050D */ trunc.w.s $f20, $f0
/* C6038 8012F938 4402A000 */ mfc1 $v0, $f20
/* C603C 8012F93C 00000000 */ nop
/* C6040 8012F940 AFA20018 */ sw $v0, 0x18($sp)
/* C6044 8012F944 004A102A */ slt $v0, $v0, $t2
/* C6048 8012F948 1440FFF1 */ bnez $v0, .L8012F910
/* C604C 8012F94C 2482007F */ addiu $v0, $a0, 0x7f
/* C6050 8012F950 AFA20008 */ sw $v0, 8($sp)
.L8012F954:
/* C6054 8012F954 8FA20010 */ lw $v0, 0x10($sp)
/* C6058 8012F958 004A102A */ slt $v0, $v0, $t2
/* C605C 8012F95C 1040000A */ beqz $v0, .L8012F988
/* C6060 8012F960 00000000 */ nop
/* C6064 8012F964 44960000 */ mtc1 $s6, $f0
/* C6068 8012F968 00000000 */ nop
/* C606C 8012F96C 46800020 */ cvt.s.w $f0, $f0
/* C6070 8012F970 46080003 */ div.s $f0, $f0, $f8
/* C6074 8012F974 460E0002 */ mul.s $f0, $f0, $f14
/* C6078 8012F978 00000000 */ nop
/* C607C 8012F97C AFAA0010 */ sw $t2, 0x10($sp)
/* C6080 8012F980 4600050D */ trunc.w.s $f20, $f0
/* C6084 8012F984 440DA000 */ mfc1 $t5, $f20
.L8012F988:
/* C6088 8012F988 8FA20008 */ lw $v0, 8($sp)
/* C608C 8012F98C 24420001 */ addiu $v0, $v0, 1
/* C6090 8012F990 0053102B */ sltu $v0, $v0, $s3
/* C6094 8012F994 14400016 */ bnez $v0, .L8012F9F0
/* C6098 8012F998 00000000 */ nop
/* C609C 8012F99C 448C0000 */ mtc1 $t4, $f0
/* C60A0 8012F9A0 00000000 */ nop
/* C60A4 8012F9A4 46800020 */ cvt.s.w $f0, $f0
/* C60A8 8012F9A8 46080002 */ mul.s $f0, $f0, $f8
/* C60AC 8012F9AC 00000000 */ nop
/* C60B0 8012F9B0 4600050D */ trunc.w.s $f20, $f0
/* C60B4 8012F9B4 4402A000 */ mfc1 $v0, $f20
/* C60B8 8012F9B8 00000000 */ nop
/* C60BC 8012F9BC 00021400 */ sll $v0, $v0, 0x10
/* C60C0 8012F9C0 00021403 */ sra $v0, $v0, 0x10
/* C60C4 8012F9C4 02021021 */ addu $v0, $s0, $v0
/* C60C8 8012F9C8 44820000 */ mtc1 $v0, $f0
/* C60CC 8012F9CC 00000000 */ nop
/* C60D0 8012F9D0 46800020 */ cvt.s.w $f0, $f0
/* C60D4 8012F9D4 46080000 */ add.s $f0, $f0, $f8
/* C60D8 8012F9D8 46000021 */ cvt.d.s $f0, $f0
/* C60DC 8012F9DC 462C0000 */ add.d $f0, $f0, $f12
/* C60E0 8012F9E0 AFAC0008 */ sw $t4, 8($sp)
/* C60E4 8012F9E4 240B0001 */ addiu $t3, $zero, 1
/* C60E8 8012F9E8 4620050D */ trunc.w.d $f20, $f0
/* C60EC 8012F9EC E7B40018 */ swc1 $f20, 0x18($sp)
.L8012F9F0:
/* C60F0 8012F9F0 8FA20018 */ lw $v0, 0x18($sp)
/* C60F4 8012F9F4 0302102A */ slt $v0, $t8, $v0
/* C60F8 8012F9F8 10400003 */ beqz $v0, .L8012FA08
/* C60FC 8012F9FC 24020002 */ addiu $v0, $zero, 2
/* C6100 8012FA00 AFB80018 */ sw $t8, 0x18($sp)
/* C6104 8012FA04 240B0001 */ addiu $t3, $zero, 1
.L8012FA08:
/* C6108 8012FA08 15E2004F */ bne $t7, $v0, .L8012FB48
/* C610C 8012FA0C 3C060701 */ lui $a2, 0x701
/* C6110 8012FA10 34C64060 */ ori $a2, $a2, 0x4060
/* C6114 8012FA14 8D050000 */ lw $a1, ($t0)
/* C6118 8012FA18 3C070001 */ lui $a3, 1
/* C611C 8012FA1C 00A0182D */ daddu $v1, $a1, $zero
/* C6120 8012FA20 24A50008 */ addiu $a1, $a1, 8
/* C6124 8012FA24 AD050000 */ sw $a1, ($t0)
/* C6128 8012FA28 8FB50040 */ lw $s5, 0x40($sp)
/* C612C 8012FA2C 3C02FD10 */ lui $v0, 0xfd10
/* C6130 8012FA30 02A21025 */ or $v0, $s5, $v0
/* C6134 8012FA34 01221025 */ or $v0, $t1, $v0
/* C6138 8012FA38 AC620000 */ sw $v0, ($v1)
/* C613C 8012FA3C 8FB50078 */ lw $s5, 0x78($sp)
/* C6140 8012FA40 34E74060 */ ori $a3, $a3, 0x4060
/* C6144 8012FA44 AC750004 */ sw $s5, 4($v1)
/* C6148 8012FA48 8FA20008 */ lw $v0, 8($sp)
/* C614C 8012FA4C 8FA40000 */ lw $a0, ($sp)
/* C6150 8012FA50 24A30008 */ addiu $v1, $a1, 8
/* C6154 8012FA54 AD030000 */ sw $v1, ($t0)
/* C6158 8012FA58 24A30010 */ addiu $v1, $a1, 0x10
/* C615C 8012FA5C ACA60004 */ sw $a2, 4($a1)
/* C6160 8012FA60 AD030000 */ sw $v1, ($t0)
/* C6164 8012FA64 3C03E600 */ lui $v1, 0xe600
/* C6168 8012FA68 ACA30008 */ sw $v1, 8($a1)
/* C616C 8012FA6C 3C03F400 */ lui $v1, 0xf400
/* C6170 8012FA70 ACA0000C */ sw $zero, 0xc($a1)
/* C6174 8012FA74 00441023 */ subu $v0, $v0, $a0
/* C6178 8012FA78 00021040 */ sll $v0, $v0, 1
/* C617C 8012FA7C 24420009 */ addiu $v0, $v0, 9
/* C6180 8012FA80 000210C3 */ sra $v0, $v0, 3
/* C6184 8012FA84 304201FF */ andi $v0, $v0, 0x1ff
/* C6188 8012FA88 00021240 */ sll $v0, $v0, 9
/* C618C 8012FA8C 00511025 */ or $v0, $v0, $s1
/* C6190 8012FA90 01221025 */ or $v0, $t1, $v0
/* C6194 8012FA94 ACA20000 */ sw $v0, ($a1)
/* C6198 8012FA98 8FA40000 */ lw $a0, ($sp)
/* C619C 8012FA9C 24A20018 */ addiu $v0, $a1, 0x18
/* C61A0 8012FAA0 AD020000 */ sw $v0, ($t0)
/* C61A4 8012FAA4 8FA20004 */ lw $v0, 4($sp)
/* C61A8 8012FAA8 00042080 */ sll $a0, $a0, 2
/* C61AC 8012FAAC 30840FFF */ andi $a0, $a0, 0xfff
/* C61B0 8012FAB0 00042300 */ sll $a0, $a0, 0xc
/* C61B4 8012FAB4 00021080 */ sll $v0, $v0, 2
/* C61B8 8012FAB8 30420FFF */ andi $v0, $v0, 0xfff
/* C61BC 8012FABC 00431025 */ or $v0, $v0, $v1
/* C61C0 8012FAC0 00822025 */ or $a0, $a0, $v0
/* C61C4 8012FAC4 ACA40010 */ sw $a0, 0x10($a1)
/* C61C8 8012FAC8 8FA30008 */ lw $v1, 8($sp)
/* C61CC 8012FACC 8FA4000C */ lw $a0, 0xc($sp)
/* C61D0 8012FAD0 3C02E700 */ lui $v0, 0xe700
/* C61D4 8012FAD4 ACA20018 */ sw $v0, 0x18($a1)
/* C61D8 8012FAD8 3C020700 */ lui $v0, 0x700
/* C61DC 8012FADC ACA0001C */ sw $zero, 0x1c($a1)
/* C61E0 8012FAE0 00031880 */ sll $v1, $v1, 2
/* C61E4 8012FAE4 30630FFF */ andi $v1, $v1, 0xfff
/* C61E8 8012FAE8 00031B00 */ sll $v1, $v1, 0xc
/* C61EC 8012FAEC 00042080 */ sll $a0, $a0, 2
/* C61F0 8012FAF0 30840FFF */ andi $a0, $a0, 0xfff
/* C61F4 8012FAF4 00822025 */ or $a0, $a0, $v0
/* C61F8 8012FAF8 00641825 */ or $v1, $v1, $a0
/* C61FC 8012FAFC ACA30014 */ sw $v1, 0x14($a1)
/* C6200 8012FB00 8FA20008 */ lw $v0, 8($sp)
/* C6204 8012FB04 8FA40000 */ lw $a0, ($sp)
/* C6208 8012FB08 24A30020 */ addiu $v1, $a1, 0x20
/* C620C 8012FB0C AD030000 */ sw $v1, ($t0)
/* C6210 8012FB10 3C03F200 */ lui $v1, 0xf200
/* C6214 8012FB14 ACA70024 */ sw $a3, 0x24($a1)
/* C6218 8012FB18 00441023 */ subu $v0, $v0, $a0
/* C621C 8012FB1C 00021040 */ sll $v0, $v0, 1
/* C6220 8012FB20 24420009 */ addiu $v0, $v0, 9
/* C6224 8012FB24 000210C3 */ sra $v0, $v0, 3
/* C6228 8012FB28 304201FF */ andi $v0, $v0, 0x1ff
/* C622C 8012FB2C 00021240 */ sll $v0, $v0, 9
/* C6230 8012FB30 00511025 */ or $v0, $v0, $s1
/* C6234 8012FB34 01221025 */ or $v0, $t1, $v0
/* C6238 8012FB38 ACA20020 */ sw $v0, 0x20($a1)
/* C623C 8012FB3C 8FA40000 */ lw $a0, ($sp)
/* C6240 8012FB40 0804BF28 */ j .L8012FCA0
/* C6244 8012FB44 24A20028 */ addiu $v0, $a1, 0x28
.L8012FB48:
/* C6248 8012FB48 15E0006B */ bnez $t7, .L8012FCF8
/* C624C 8012FB4C 316700FF */ andi $a3, $t3, 0xff
/* C6250 8012FB50 3C060701 */ lui $a2, 0x701
/* C6254 8012FB54 34C64060 */ ori $a2, $a2, 0x4060
/* C6258 8012FB58 3C070001 */ lui $a3, 1
/* C625C 8012FB5C 00131042 */ srl $v0, $s3, 1
/* C6260 8012FB60 2442FFFF */ addiu $v0, $v0, -1
/* C6264 8012FB64 30420FFF */ andi $v0, $v0, 0xfff
/* C6268 8012FB68 3C03FD08 */ lui $v1, 0xfd08
/* C626C 8012FB6C 00431025 */ or $v0, $v0, $v1
/* C6270 8012FB70 8D050000 */ lw $a1, ($t0)
/* C6274 8012FB74 01221025 */ or $v0, $t1, $v0
/* C6278 8012FB78 00A0202D */ daddu $a0, $a1, $zero
/* C627C 8012FB7C 24A50008 */ addiu $a1, $a1, 8
/* C6280 8012FB80 AD050000 */ sw $a1, ($t0)
/* C6284 8012FB84 AC820000 */ sw $v0, ($a0)
/* C6288 8012FB88 8FB50078 */ lw $s5, 0x78($sp)
/* C628C 8012FB8C 34E74060 */ ori $a3, $a3, 0x4060
/* C6290 8012FB90 AC950004 */ sw $s5, 4($a0)
/* C6294 8012FB94 8FA20008 */ lw $v0, 8($sp)
/* C6298 8012FB98 8FA40000 */ lw $a0, ($sp)
/* C629C 8012FB9C 24A30008 */ addiu $v1, $a1, 8
/* C62A0 8012FBA0 AD030000 */ sw $v1, ($t0)
/* C62A4 8012FBA4 24A30010 */ addiu $v1, $a1, 0x10
/* C62A8 8012FBA8 ACA60004 */ sw $a2, 4($a1)
/* C62AC 8012FBAC AD030000 */ sw $v1, ($t0)
/* C62B0 8012FBB0 3C03E600 */ lui $v1, 0xe600
/* C62B4 8012FBB4 ACA30008 */ sw $v1, 8($a1)
/* C62B8 8012FBB8 3C03F508 */ lui $v1, 0xf508
/* C62BC 8012FBBC ACA0000C */ sw $zero, 0xc($a1)
/* C62C0 8012FBC0 00441023 */ subu $v0, $v0, $a0
/* C62C4 8012FBC4 24420001 */ addiu $v0, $v0, 1
/* C62C8 8012FBC8 00021043 */ sra $v0, $v0, 1
/* C62CC 8012FBCC 24420007 */ addiu $v0, $v0, 7
/* C62D0 8012FBD0 000210C3 */ sra $v0, $v0, 3
/* C62D4 8012FBD4 304201FF */ andi $v0, $v0, 0x1ff
/* C62D8 8012FBD8 00021240 */ sll $v0, $v0, 9
/* C62DC 8012FBDC 00431025 */ or $v0, $v0, $v1
/* C62E0 8012FBE0 01221025 */ or $v0, $t1, $v0
/* C62E4 8012FBE4 ACA20000 */ sw $v0, ($a1)
/* C62E8 8012FBE8 24A20018 */ addiu $v0, $a1, 0x18
/* C62EC 8012FBEC 8FA40000 */ lw $a0, ($sp)
/* C62F0 8012FBF0 3C03F400 */ lui $v1, 0xf400
/* C62F4 8012FBF4 AD020000 */ sw $v0, ($t0)
/* C62F8 8012FBF8 8FA20004 */ lw $v0, 4($sp)
/* C62FC 8012FBFC 00042040 */ sll $a0, $a0, 1
/* C6300 8012FC00 30840FFF */ andi $a0, $a0, 0xfff
/* C6304 8012FC04 00042300 */ sll $a0, $a0, 0xc
/* C6308 8012FC08 00021080 */ sll $v0, $v0, 2
/* C630C 8012FC0C 30420FFF */ andi $v0, $v0, 0xfff
/* C6310 8012FC10 00431025 */ or $v0, $v0, $v1
/* C6314 8012FC14 00822025 */ or $a0, $a0, $v0
/* C6318 8012FC18 ACA40010 */ sw $a0, 0x10($a1)
/* C631C 8012FC1C 8FA30008 */ lw $v1, 8($sp)
/* C6320 8012FC20 8FA4000C */ lw $a0, 0xc($sp)
/* C6324 8012FC24 3C02E700 */ lui $v0, 0xe700
/* C6328 8012FC28 ACA20018 */ sw $v0, 0x18($a1)
/* C632C 8012FC2C 3C020700 */ lui $v0, 0x700
/* C6330 8012FC30 ACA0001C */ sw $zero, 0x1c($a1)
/* C6334 8012FC34 00031840 */ sll $v1, $v1, 1
/* C6338 8012FC38 30630FFF */ andi $v1, $v1, 0xfff
/* C633C 8012FC3C 00031B00 */ sll $v1, $v1, 0xc
/* C6340 8012FC40 00042080 */ sll $a0, $a0, 2
/* C6344 8012FC44 30840FFF */ andi $a0, $a0, 0xfff
/* C6348 8012FC48 00822025 */ or $a0, $a0, $v0
/* C634C 8012FC4C 00641825 */ or $v1, $v1, $a0
/* C6350 8012FC50 ACA30014 */ sw $v1, 0x14($a1)
/* C6354 8012FC54 8FA20008 */ lw $v0, 8($sp)
/* C6358 8012FC58 8FA40000 */ lw $a0, ($sp)
/* C635C 8012FC5C 24A30020 */ addiu $v1, $a1, 0x20
/* C6360 8012FC60 AD030000 */ sw $v1, ($t0)
/* C6364 8012FC64 3C03F500 */ lui $v1, 0xf500
/* C6368 8012FC68 ACA70024 */ sw $a3, 0x24($a1)
/* C636C 8012FC6C 00441023 */ subu $v0, $v0, $a0
/* C6370 8012FC70 24420001 */ addiu $v0, $v0, 1
/* C6374 8012FC74 00021043 */ sra $v0, $v0, 1
/* C6378 8012FC78 24420007 */ addiu $v0, $v0, 7
/* C637C 8012FC7C 000210C3 */ sra $v0, $v0, 3
/* C6380 8012FC80 304201FF */ andi $v0, $v0, 0x1ff
/* C6384 8012FC84 00021240 */ sll $v0, $v0, 9
/* C6388 8012FC88 00431025 */ or $v0, $v0, $v1
/* C638C 8012FC8C 01221025 */ or $v0, $t1, $v0
/* C6390 8012FC90 ACA20020 */ sw $v0, 0x20($a1)
/* C6394 8012FC94 24A20028 */ addiu $v0, $a1, 0x28
/* C6398 8012FC98 8FA40000 */ lw $a0, ($sp)
/* C639C 8012FC9C 3C03F200 */ lui $v1, 0xf200
.L8012FCA0:
/* C63A0 8012FCA0 AD020000 */ sw $v0, ($t0)
/* C63A4 8012FCA4 8FA20004 */ lw $v0, 4($sp)
/* C63A8 8012FCA8 00042080 */ sll $a0, $a0, 2
/* C63AC 8012FCAC 30840FFF */ andi $a0, $a0, 0xfff
/* C63B0 8012FCB0 00042300 */ sll $a0, $a0, 0xc
/* C63B4 8012FCB4 00021080 */ sll $v0, $v0, 2
/* C63B8 8012FCB8 30420FFF */ andi $v0, $v0, 0xfff
/* C63BC 8012FCBC 00431025 */ or $v0, $v0, $v1
/* C63C0 8012FCC0 00822025 */ or $a0, $a0, $v0
/* C63C4 8012FCC4 ACA40028 */ sw $a0, 0x28($a1)
/* C63C8 8012FCC8 8FA30008 */ lw $v1, 8($sp)
/* C63CC 8012FCCC 24A20030 */ addiu $v0, $a1, 0x30
/* C63D0 8012FCD0 AD020000 */ sw $v0, ($t0)
/* C63D4 8012FCD4 8FA2000C */ lw $v0, 0xc($sp)
/* C63D8 8012FCD8 00031880 */ sll $v1, $v1, 2
/* C63DC 8012FCDC 30630FFF */ andi $v1, $v1, 0xfff
/* C63E0 8012FCE0 00031B00 */ sll $v1, $v1, 0xc
/* C63E4 8012FCE4 00021080 */ sll $v0, $v0, 2
/* C63E8 8012FCE8 30420FFF */ andi $v0, $v0, 0xfff
/* C63EC 8012FCEC 00621825 */ or $v1, $v1, $v0
/* C63F0 8012FCF0 ACA3002C */ sw $v1, 0x2c($a1)
/* C63F4 8012FCF4 316700FF */ andi $a3, $t3, 0xff
.L8012FCF8:
/* C63F8 8012FCF8 8D050000 */ lw $a1, ($t0)
/* C63FC 8012FCFC 3C04E400 */ lui $a0, 0xe400
/* C6400 8012FD00 00A0302D */ daddu $a2, $a1, $zero
/* C6404 8012FD04 24A50008 */ addiu $a1, $a1, 8
/* C6408 8012FD08 AD050000 */ sw $a1, ($t0)
/* C640C 8012FD0C 8FA30018 */ lw $v1, 0x18($sp)
/* C6410 8012FD10 8FA2001C */ lw $v0, 0x1c($sp)
/* C6414 8012FD14 00671823 */ subu $v1, $v1, $a3
/* C6418 8012FD18 00031880 */ sll $v1, $v1, 2
/* C641C 8012FD1C 30630FFF */ andi $v1, $v1, 0xfff
/* C6420 8012FD20 00031B00 */ sll $v1, $v1, 0xc
/* C6424 8012FD24 00021080 */ sll $v0, $v0, 2
/* C6428 8012FD28 30420FFF */ andi $v0, $v0, 0xfff
/* C642C 8012FD2C 00441025 */ or $v0, $v0, $a0
/* C6430 8012FD30 00621825 */ or $v1, $v1, $v0
/* C6434 8012FD34 24A20008 */ addiu $v0, $a1, 8
/* C6438 8012FD38 ACC30000 */ sw $v1, ($a2)
/* C643C 8012FD3C AD020000 */ sw $v0, ($t0)
/* C6440 8012FD40 8FA30010 */ lw $v1, 0x10($sp)
/* C6444 8012FD44 24A20010 */ addiu $v0, $a1, 0x10
/* C6448 8012FD48 AD020000 */ sw $v0, ($t0)
/* C644C 8012FD4C 8FA20014 */ lw $v0, 0x14($sp)
/* C6450 8012FD50 00031880 */ sll $v1, $v1, 2
/* C6454 8012FD54 30630FFF */ andi $v1, $v1, 0xfff
/* C6458 8012FD58 00031B00 */ sll $v1, $v1, 0xc
/* C645C 8012FD5C 00021080 */ sll $v0, $v0, 2
/* C6460 8012FD60 30420FFF */ andi $v0, $v0, 0xfff
/* C6464 8012FD64 00621825 */ or $v1, $v1, $v0
/* C6468 8012FD68 3C02E100 */ lui $v0, 0xe100
/* C646C 8012FD6C ACC30004 */ sw $v1, 4($a2)
/* C6470 8012FD70 ACA20000 */ sw $v0, ($a1)
/* C6474 8012FD74 000D1400 */ sll $v0, $t5, 0x10
/* C6478 8012FD78 3243FFFF */ andi $v1, $s2, 0xffff
/* C647C 8012FD7C 00431025 */ or $v0, $v0, $v1
/* C6480 8012FD80 ACA20004 */ sw $v0, 4($a1)
/* C6484 8012FD84 3C02F100 */ lui $v0, 0xf100
/* C6488 8012FD88 ACA20008 */ sw $v0, 8($a1)
/* C648C 8012FD8C 8FB50038 */ lw $s5, 0x38($sp)
/* C6490 8012FD90 33C3FFFF */ andi $v1, $fp, 0xffff
/* C6494 8012FD94 00151400 */ sll $v0, $s5, 0x10
/* C6498 8012FD98 00431025 */ or $v0, $v0, $v1
/* C649C 8012FD9C 14E00007 */ bnez $a3, .L8012FDBC
/* C64A0 8012FDA0 ACA2000C */ sw $v0, 0xc($a1)
/* C64A4 8012FDA4 8FA20000 */ lw $v0, ($sp)
/* C64A8 8012FDA8 8FA30018 */ lw $v1, 0x18($sp)
/* C64AC 8012FDAC 24420040 */ addiu $v0, $v0, 0x40
/* C64B0 8012FDB0 AFA20000 */ sw $v0, ($sp)
/* C64B4 8012FDB4 0804BE35 */ j .L8012F8D4
/* C64B8 8012FDB8 AFA30010 */ sw $v1, 0x10($sp)
.L8012FDBC:
/* C64BC 8012FDBC 332200FF */ andi $v0, $t9, 0xff
/* C64C0 8012FDC0 14400007 */ bnez $v0, .L8012FDE0
/* C64C4 8012FDC4 24020001 */ addiu $v0, $zero, 1
/* C64C8 8012FDC8 8FA20004 */ lw $v0, 4($sp)
/* C64CC 8012FDCC 8FA3001C */ lw $v1, 0x1c($sp)
/* C64D0 8012FDD0 24420020 */ addiu $v0, $v0, 0x20
/* C64D4 8012FDD4 AFA20004 */ sw $v0, 4($sp)
/* C64D8 8012FDD8 0804BDD2 */ j .L8012F748
/* C64DC 8012FDDC AFA30014 */ sw $v1, 0x14($sp)
.L8012FDE0:
/* C64E0 8012FDE0 8FBE0068 */ lw $fp, 0x68($sp)
/* C64E4 8012FDE4 8FB70064 */ lw $s7, 0x64($sp)
/* C64E8 8012FDE8 8FB60060 */ lw $s6, 0x60($sp)
/* C64EC 8012FDEC 8FB5005C */ lw $s5, 0x5c($sp)
/* C64F0 8012FDF0 8FB40058 */ lw $s4, 0x58($sp)
/* C64F4 8012FDF4 8FB30054 */ lw $s3, 0x54($sp)
/* C64F8 8012FDF8 8FB20050 */ lw $s2, 0x50($sp)
/* C64FC 8012FDFC 8FB1004C */ lw $s1, 0x4c($sp)
/* C6500 8012FE00 8FB00048 */ lw $s0, 0x48($sp)
/* C6504 8012FE04 D7B40070 */ ldc1 $f20, 0x70($sp)
/* C6508 8012FE08 03E00008 */ jr $ra
/* C650C 8012FE0C 27BD0078 */ addiu $sp, $sp, 0x78

View File

@ -1,721 +0,0 @@
.set noat # allow manual use of $at
.set noreorder # don't insert nops after branches
glabel render_item_entities
/* C9554 80132E54 27BDFEB0 */ addiu $sp, $sp, -0x150
/* C9558 80132E58 AFB60138 */ sw $s6, 0x138($sp)
/* C955C 80132E5C 0000B02D */ daddu $s6, $zero, $zero
/* C9560 80132E60 AFB40130 */ sw $s4, 0x130($sp)
/* C9564 80132E64 27B40058 */ addiu $s4, $sp, 0x58
/* C9568 80132E68 AFB50134 */ sw $s5, 0x134($sp)
/* C956C 80132E6C 27B50098 */ addiu $s5, $sp, 0x98
/* C9570 80132E70 AFB10124 */ sw $s1, 0x124($sp)
/* C9574 80132E74 3C11800A */ lui $s1, %hi(gMasterGfxPos)
/* C9578 80132E78 2631A66C */ addiu $s1, $s1, %lo(gMasterGfxPos)
/* C957C 80132E7C AFBE0140 */ sw $fp, 0x140($sp)
/* C9580 80132E80 3C1EE600 */ lui $fp, 0xe600
/* C9584 80132E84 AFB7013C */ sw $s7, 0x13c($sp)
/* C9588 80132E88 3C17E700 */ lui $s7, 0xe700
/* C958C 80132E8C AFB3012C */ sw $s3, 0x12c($sp)
/* C9590 80132E90 3C13F540 */ lui $s3, 0xf540
/* C9594 80132E94 36730400 */ ori $s3, $s3, 0x400
/* C9598 80132E98 AFBF0144 */ sw $ra, 0x144($sp)
/* C959C 80132E9C AFB20128 */ sw $s2, 0x128($sp)
/* C95A0 80132EA0 AFB00120 */ sw $s0, 0x120($sp)
/* C95A4 80132EA4 F7B40148 */ sdc1 $f20, 0x148($sp)
.L80132EA8:
/* C95A8 80132EA8 3C038015 */ lui $v1, %hi(gCurrentItemEntities)
/* C95AC 80132EAC 8C6365A0 */ lw $v1, %lo(gCurrentItemEntities)($v1)
/* C95B0 80132EB0 00161080 */ sll $v0, $s6, 2
/* C95B4 80132EB4 00431021 */ addu $v0, $v0, $v1
/* C95B8 80132EB8 8C520000 */ lw $s2, ($v0)
/* C95BC 80132EBC 5240028C */ beql $s2, $zero, .L801338F0
/* C95C0 80132EC0 26D60001 */ addiu $s6, $s6, 1
/* C95C4 80132EC4 8E430000 */ lw $v1, ($s2)
/* C95C8 80132EC8 10600288 */ beqz $v1, .L801338EC
/* C95CC 80132ECC 30620040 */ andi $v0, $v1, 0x40
/* C95D0 80132ED0 54400287 */ bnel $v0, $zero, .L801338F0
/* C95D4 80132ED4 26D60001 */ addiu $s6, $s6, 1
/* C95D8 80132ED8 3C020010 */ lui $v0, 0x10
/* C95DC 80132EDC 00621024 */ and $v0, $v1, $v0
/* C95E0 80132EE0 10400282 */ beqz $v0, .L801338EC
/* C95E4 80132EE4 3C020004 */ lui $v0, 4
/* C95E8 80132EE8 00621024 */ and $v0, $v1, $v0
/* C95EC 80132EEC 14400002 */ bnez $v0, .L80132EF8
/* C95F0 80132EF0 0000802D */ daddu $s0, $zero, $zero
/* C95F4 80132EF4 2410FFFC */ addiu $s0, $zero, -4
.L80132EF8:
/* C95F8 80132EF8 86430018 */ lh $v1, 0x18($s2)
/* C95FC 80132EFC 24020157 */ addiu $v0, $zero, 0x157
/* C9600 80132F00 10620005 */ beq $v1, $v0, .L80132F18
/* C9604 80132F04 24020159 */ addiu $v0, $zero, 0x159
/* C9608 80132F08 10620003 */ beq $v1, $v0, .L80132F18
/* C960C 80132F0C 24020156 */ addiu $v0, $zero, 0x156
/* C9610 80132F10 14620005 */ bne $v1, $v0, .L80132F28
/* C9614 80132F14 00000000 */ nop
.L80132F18:
/* C9618 80132F18 3C013F80 */ lui $at, 0x3f80
/* C961C 80132F1C 44810000 */ mtc1 $at, $f0
/* C9620 80132F20 0000802D */ daddu $s0, $zero, $zero
/* C9624 80132F24 E6400030 */ swc1 $f0, 0x30($s2)
.L80132F28:
/* C9628 80132F28 3C0E800B */ lui $t6, %hi(gCameras)
/* C962C 80132F2C 25CE1D80 */ addiu $t6, $t6, %lo(gCameras)
/* C9630 80132F30 3C03800A */ lui $v1, %hi(gCurrentCamID)
/* C9634 80132F34 8463A634 */ lh $v1, %lo(gCurrentCamID)($v1)
/* C9638 80132F38 3C014334 */ lui $at, 0x4334
/* C963C 80132F3C 44816000 */ mtc1 $at, $f12
/* C9640 80132F40 00031080 */ sll $v0, $v1, 2
/* C9644 80132F44 00431021 */ addu $v0, $v0, $v1
/* C9648 80132F48 00021080 */ sll $v0, $v0, 2
/* C964C 80132F4C 00431023 */ subu $v0, $v0, $v1
/* C9650 80132F50 000218C0 */ sll $v1, $v0, 3
/* C9654 80132F54 00431021 */ addu $v0, $v0, $v1
/* C9658 80132F58 000210C0 */ sll $v0, $v0, 3
/* C965C 80132F5C 004E1021 */ addu $v0, $v0, $t6
/* C9660 80132F60 C440006C */ lwc1 $f0, 0x6c($v0)
/* C9664 80132F64 0C00A6C9 */ jal clamp_angle
/* C9668 80132F68 46006301 */ sub.s $f12, $f12, $f0
/* C966C 80132F6C 0280202D */ daddu $a0, $s4, $zero
/* C9670 80132F70 C642000C */ lwc1 $f2, 0xc($s2)
/* C9674 80132F74 44902000 */ mtc1 $s0, $f4
/* C9678 80132F78 00000000 */ nop
/* C967C 80132F7C 46802120 */ cvt.s.w $f4, $f4
/* C9680 80132F80 46001087 */ neg.s $f2, $f2
/* C9684 80132F84 46041081 */ sub.s $f2, $f2, $f4
/* C9688 80132F88 8E450008 */ lw $a1, 8($s2)
/* C968C 80132F8C 8E470010 */ lw $a3, 0x10($s2)
/* C9690 80132F90 44061000 */ mfc1 $a2, $f2
/* C9694 80132F94 0C019E40 */ jal guTranslateF
/* C9698 80132F98 46000506 */ mov.s $f20, $f0
/* C969C 80132F9C 4405A000 */ mfc1 $a1, $f20
/* C96A0 80132FA0 44800000 */ mtc1 $zero, $f0
/* C96A4 80132FA4 3C073F80 */ lui $a3, 0x3f80
/* C96A8 80132FA8 44060000 */ mfc1 $a2, $f0
/* C96AC 80132FAC 02A0202D */ daddu $a0, $s5, $zero
/* C96B0 80132FB0 0C019EC8 */ jal guRotateF
/* C96B4 80132FB4 AFA60010 */ sw $a2, 0x10($sp)
/* C96B8 80132FB8 8E420000 */ lw $v0, ($s2)
/* C96BC 80132FBC 30424000 */ andi $v0, $v0, 0x4000
/* C96C0 80132FC0 1040000A */ beqz $v0, .L80132FEC
/* C96C4 80132FC4 27B000D8 */ addiu $s0, $sp, 0xd8
/* C96C8 80132FC8 8E450030 */ lw $a1, 0x30($s2)
/* C96CC 80132FCC 0200202D */ daddu $a0, $s0, $zero
/* C96D0 80132FD0 00A0302D */ daddu $a2, $a1, $zero
/* C96D4 80132FD4 0C019DF0 */ jal guScaleF
/* C96D8 80132FD8 00A0382D */ daddu $a3, $a1, $zero
/* C96DC 80132FDC 02A0202D */ daddu $a0, $s5, $zero
/* C96E0 80132FE0 0200282D */ daddu $a1, $s0, $zero
/* C96E4 80132FE4 0C019D80 */ jal guMtxCatF
/* C96E8 80132FE8 02A0302D */ daddu $a2, $s5, $zero
.L80132FEC:
/* C96EC 80132FEC 02A0202D */ daddu $a0, $s5, $zero
/* C96F0 80132FF0 0280282D */ daddu $a1, $s4, $zero
/* C96F4 80132FF4 0C019D80 */ jal guMtxCatF
/* C96F8 80132FF8 0280302D */ daddu $a2, $s4, $zero
/* C96FC 80132FFC 0280202D */ daddu $a0, $s4, $zero
/* C9700 80133000 0C019D40 */ jal guMtxF2L
/* C9704 80133004 27A50018 */ addiu $a1, $sp, 0x18
/* C9708 80133008 3C020001 */ lui $v0, 1
/* C970C 8013300C 34421630 */ ori $v0, $v0, 0x1630
/* C9710 80133010 27A50018 */ addiu $a1, $sp, 0x18
/* C9714 80133014 3C038007 */ lui $v1, %hi(gMatrixListPos)
/* C9718 80133018 946341F0 */ lhu $v1, %lo(gMatrixListPos)($v1)
/* C971C 8013301C 3C04800A */ lui $a0, %hi(gDisplayContext)
/* C9720 80133020 8C84A674 */ lw $a0, %lo(gDisplayContext)($a0)
/* C9724 80133024 00031980 */ sll $v1, $v1, 6
/* C9728 80133028 00832021 */ addu $a0, $a0, $v1
/* C972C 8013302C 00822021 */ addu $a0, $a0, $v0
.L80133030:
/* C9730 80133030 8CAF0000 */ lw $t7, ($a1)
/* C9734 80133034 8CB80004 */ lw $t8, 4($a1)
/* C9738 80133038 8CB90008 */ lw $t9, 8($a1)
/* C973C 8013303C 8CAE000C */ lw $t6, 0xc($a1)
/* C9740 80133040 AC8F0000 */ sw $t7, ($a0)
/* C9744 80133044 AC980004 */ sw $t8, 4($a0)
/* C9748 80133048 AC990008 */ sw $t9, 8($a0)
/* C974C 8013304C AC8E000C */ sw $t6, 0xc($a0)
/* C9750 80133050 24A50010 */ addiu $a1, $a1, 0x10
/* C9754 80133054 14B4FFF6 */ bne $a1, $s4, .L80133030
/* C9758 80133058 24840010 */ addiu $a0, $a0, 0x10
/* C975C 8013305C 3C02DA38 */ lui $v0, 0xda38
/* C9760 80133060 34420002 */ ori $v0, $v0, 2
/* C9764 80133064 3C040001 */ lui $a0, 1
/* C9768 80133068 34841630 */ ori $a0, $a0, 0x1630
/* C976C 8013306C 3C078007 */ lui $a3, %hi(gMatrixListPos)
/* C9770 80133070 24E741F0 */ addiu $a3, $a3, %lo(gMatrixListPos)
/* C9774 80133074 8E280000 */ lw $t0, ($s1)
/* C9778 80133078 94E50000 */ lhu $a1, ($a3)
/* C977C 8013307C 0100302D */ daddu $a2, $t0, $zero
/* C9780 80133080 25080008 */ addiu $t0, $t0, 8
/* C9784 80133084 30A3FFFF */ andi $v1, $a1, 0xffff
/* C9788 80133088 00031980 */ sll $v1, $v1, 6
/* C978C 8013308C 00641821 */ addu $v1, $v1, $a0
/* C9790 80133090 AE280000 */ sw $t0, ($s1)
/* C9794 80133094 ACC20000 */ sw $v0, ($a2)
/* C9798 80133098 3C02800A */ lui $v0, %hi(gDisplayContext)
/* C979C 8013309C 8C42A674 */ lw $v0, %lo(gDisplayContext)($v0)
/* C97A0 801330A0 3C048015 */ lui $a0, %hi(D_80151328)
/* C97A4 801330A4 8C841328 */ lw $a0, %lo(D_80151328)($a0)
/* C97A8 801330A8 00431021 */ addu $v0, $v0, $v1
/* C97AC 801330AC ACC20004 */ sw $v0, 4($a2)
/* C97B0 801330B0 94820000 */ lhu $v0, ($a0)
/* C97B4 801330B4 24A50001 */ addiu $a1, $a1, 1
/* C97B8 801330B8 10400008 */ beqz $v0, .L801330DC
/* C97BC 801330BC A4E50000 */ sh $a1, ($a3)
/* C97C0 801330C0 25020008 */ addiu $v0, $t0, 8
/* C97C4 801330C4 3C0FDE00 */ lui $t7, 0xde00
/* C97C8 801330C8 AE220000 */ sw $v0, ($s1)
/* C97CC 801330CC 3C028015 */ lui $v0, %hi(D_8014BBD8)
/* C97D0 801330D0 2442BBD8 */ addiu $v0, $v0, %lo(D_8014BBD8)
/* C97D4 801330D4 0804CC3D */ j .L801330F4
/* C97D8 801330D8 AD0F0000 */ sw $t7, ($t0)
.L801330DC:
/* C97DC 801330DC 25020008 */ addiu $v0, $t0, 8
/* C97E0 801330E0 3C18DE00 */ lui $t8, 0xde00
/* C97E4 801330E4 AE220000 */ sw $v0, ($s1)
/* C97E8 801330E8 3C028015 */ lui $v0, %hi(D_8014B870)
/* C97EC 801330EC 2442B870 */ addiu $v0, $v0, %lo(D_8014B870)
/* C97F0 801330F0 AD180000 */ sw $t8, ($t0)
.L801330F4:
/* C97F4 801330F4 AD020004 */ sw $v0, 4($t0)
/* C97F8 801330F8 3C04D9FD */ lui $a0, 0xd9fd
/* C97FC 801330FC 3484FFFF */ ori $a0, $a0, 0xffff
/* C9800 80133100 241000FF */ addiu $s0, $zero, 0xff
/* C9804 80133104 8E230000 */ lw $v1, ($s1)
/* C9808 80133108 3C0E0808 */ lui $t6, 0x808
/* C980C 8013310C 0060102D */ daddu $v0, $v1, $zero
/* C9810 80133110 24630008 */ addiu $v1, $v1, 8
/* C9814 80133114 AE230000 */ sw $v1, ($s1)
/* C9818 80133118 AC440000 */ sw $a0, ($v0)
/* C981C 8013311C AC400004 */ sw $zero, 4($v0)
/* C9820 80133120 3C19DE00 */ lui $t9, 0xde00
/* C9824 80133124 3C028015 */ lui $v0, %hi(D_8014C620)
/* C9828 80133128 2442C620 */ addiu $v0, $v0, %lo(D_8014C620)
/* C982C 8013312C AC790000 */ sw $t9, ($v1)
/* C9830 80133130 AC620004 */ sw $v0, 4($v1)
/* C9834 80133134 8E440000 */ lw $a0, ($s2)
/* C9838 80133138 24630008 */ addiu $v1, $v1, 8
/* C983C 8013313C 008E1024 */ and $v0, $a0, $t6
/* C9840 80133140 10400052 */ beqz $v0, .L8013328C
/* C9844 80133144 AE230000 */ sw $v1, ($s1)
/* C9848 80133148 3C020008 */ lui $v0, 8
/* C984C 8013314C 00821024 */ and $v0, $a0, $v0
/* C9850 80133150 1040000C */ beqz $v0, .L80133184
/* C9854 80133154 3C038080 */ lui $v1, 0x8080
/* C9858 80133158 9242002F */ lbu $v0, 0x2f($s2)
/* C985C 8013315C 00500018 */ mult $v0, $s0
/* C9860 80133160 00001012 */ mflo $v0
/* C9864 80133164 34638081 */ ori $v1, $v1, 0x8081
/* C9868 80133168 00000000 */ nop
/* C986C 8013316C 00430018 */ mult $v0, $v1
/* C9870 80133170 00001810 */ mfhi $v1
/* C9874 80133174 00621821 */ addu $v1, $v1, $v0
/* C9878 80133178 000319C3 */ sra $v1, $v1, 7
/* C987C 8013317C 000217C3 */ sra $v0, $v0, 0x1f
/* C9880 80133180 00628023 */ subu $s0, $v1, $v0
.L80133184:
/* C9884 80133184 3C020800 */ lui $v0, 0x800
/* C9888 80133188 00821024 */ and $v0, $a0, $v0
/* C988C 8013318C 10400012 */ beqz $v0, .L801331D8
/* C9890 80133190 27A40118 */ addiu $a0, $sp, 0x118
/* C9894 80133194 27A50119 */ addiu $a1, $sp, 0x119
/* C9898 80133198 27A6011A */ addiu $a2, $sp, 0x11a
/* C989C 8013319C 0C046FA0 */ jal get_background_color_blend
/* C98A0 801331A0 27A7011B */ addiu $a3, $sp, 0x11b
/* C98A4 801331A4 93A3011B */ lbu $v1, 0x11b($sp)
/* C98A8 801331A8 240200FF */ addiu $v0, $zero, 0xff
/* C98AC 801331AC 00431023 */ subu $v0, $v0, $v1
/* C98B0 801331B0 02020018 */ mult $s0, $v0
/* C98B4 801331B4 00001012 */ mflo $v0
/* C98B8 801331B8 3C038080 */ lui $v1, 0x8080
/* C98BC 801331BC 34638081 */ ori $v1, $v1, 0x8081
/* C98C0 801331C0 00430018 */ mult $v0, $v1
/* C98C4 801331C4 00001810 */ mfhi $v1
/* C98C8 801331C8 00621821 */ addu $v1, $v1, $v0
/* C98CC 801331CC 000319C3 */ sra $v1, $v1, 7
/* C98D0 801331D0 000217C3 */ sra $v0, $v0, 0x1f
/* C98D4 801331D4 00628023 */ subu $s0, $v1, $v0
.L801331D8:
/* C98D8 801331D8 8E420000 */ lw $v0, ($s2)
/* C98DC 801331DC 3C0E0808 */ lui $t6, 0x808
/* C98E0 801331E0 004E1024 */ and $v0, $v0, $t6
/* C98E4 801331E4 10400029 */ beqz $v0, .L8013328C
/* C98E8 801331E8 00000000 */ nop
/* C98EC 801331EC 3C028015 */ lui $v0, %hi(D_80151328)
/* C98F0 801331F0 8C421328 */ lw $v0, %lo(D_80151328)($v0)
/* C98F4 801331F4 94420000 */ lhu $v0, ($v0)
/* C98F8 801331F8 1040000B */ beqz $v0, .L80133228
/* C98FC 801331FC 3C05E200 */ lui $a1, 0xe200
/* C9900 80133200 34A5001C */ ori $a1, $a1, 0x1c
/* C9904 80133204 3C040C18 */ lui $a0, 0xc18
/* C9908 80133208 8E220000 */ lw $v0, ($s1)
/* C990C 8013320C 34844348 */ ori $a0, $a0, 0x4348
/* C9910 80133210 0040182D */ daddu $v1, $v0, $zero
/* C9914 80133214 24420008 */ addiu $v0, $v0, 8
/* C9918 80133218 AE220000 */ sw $v0, ($s1)
/* C991C 8013321C AC650000 */ sw $a1, ($v1)
/* C9920 80133220 0804CCA3 */ j .L8013328C
/* C9924 80133224 AC640004 */ sw $a0, 4($v1)
.L80133228:
/* C9928 80133228 3C06E200 */ lui $a2, 0xe200
/* C992C 8013322C 34C6001C */ ori $a2, $a2, 0x1c
/* C9930 80133230 3C040050 */ lui $a0, 0x50
/* C9934 80133234 34844348 */ ori $a0, $a0, 0x4348
/* C9938 80133238 3C07FC30 */ lui $a3, 0xfc30
/* C993C 8013323C 34E7B261 */ ori $a3, $a3, 0xb261
/* C9940 80133240 3C05FF2F */ lui $a1, 0xff2f
/* C9944 80133244 8E230000 */ lw $v1, ($s1)
/* C9948 80133248 34A5FFFF */ ori $a1, $a1, 0xffff
/* C994C 8013324C 0060102D */ daddu $v0, $v1, $zero
/* C9950 80133250 24630008 */ addiu $v1, $v1, 8
/* C9954 80133254 AE230000 */ sw $v1, ($s1)
/* C9958 80133258 AC460000 */ sw $a2, ($v0)
/* C995C 8013325C AC440004 */ sw $a0, 4($v0)
/* C9960 80133260 24620008 */ addiu $v0, $v1, 8
/* C9964 80133264 AE220000 */ sw $v0, ($s1)
/* C9968 80133268 24620010 */ addiu $v0, $v1, 0x10
/* C996C 8013326C AC670000 */ sw $a3, ($v1)
/* C9970 80133270 AC650004 */ sw $a1, 4($v1)
/* C9974 80133274 AE220000 */ sw $v0, ($s1)
/* C9978 80133278 3C02FA00 */ lui $v0, 0xfa00
/* C997C 8013327C AC620008 */ sw $v0, 8($v1)
/* C9980 80133280 2402FF00 */ addiu $v0, $zero, -0x100
/* C9984 80133284 02021025 */ or $v0, $s0, $v0
/* C9988 80133288 AC62000C */ sw $v0, 0xc($v1)
.L8013328C:
/* C998C 8013328C 8E420000 */ lw $v0, ($s2)
/* C9990 80133290 3C030004 */ lui $v1, 4
/* C9994 80133294 00431024 */ and $v0, $v0, $v1
/* C9998 80133298 144000C4 */ bnez $v0, .L801335AC
/* C999C 8013329C 3C05F500 */ lui $a1, 0xf500
/* C99A0 801332A0 34A50100 */ ori $a1, $a1, 0x100
/* C99A4 801332A4 3C060703 */ lui $a2, 0x703
/* C99A8 801332A8 34C6C000 */ ori $a2, $a2, 0xc000
/* C99AC 801332AC 8E2D0000 */ lw $t5, ($s1)
/* C99B0 801332B0 3C02FD10 */ lui $v0, 0xfd10
/* C99B4 801332B4 01A0202D */ daddu $a0, $t5, $zero
/* C99B8 801332B8 25AD0008 */ addiu $t5, $t5, 8
/* C99BC 801332BC AE2D0000 */ sw $t5, ($s1)
/* C99C0 801332C0 AC820000 */ sw $v0, ($a0)
/* C99C4 801332C4 9243002D */ lbu $v1, 0x2d($s2)
/* C99C8 801332C8 25A20008 */ addiu $v0, $t5, 8
/* C99CC 801332CC AE220000 */ sw $v0, ($s1)
/* C99D0 801332D0 25A20010 */ addiu $v0, $t5, 0x10
/* C99D4 801332D4 AE220000 */ sw $v0, ($s1)
/* C99D8 801332D8 25A20018 */ addiu $v0, $t5, 0x18
/* C99DC 801332DC AE220000 */ sw $v0, ($s1)
/* C99E0 801332E0 3C028015 */ lui $v0, %hi(gHudElementCacheTablePalette)
/* C99E4 801332E4 8C4212D0 */ lw $v0, %lo(gHudElementCacheTablePalette)($v0)
/* C99E8 801332E8 000318C0 */ sll $v1, $v1, 3
/* C99EC 801332EC 00621821 */ addu $v1, $v1, $v0
/* C99F0 801332F0 8C630004 */ lw $v1, 4($v1)
/* C99F4 801332F4 25A20020 */ addiu $v0, $t5, 0x20
/* C99F8 801332F8 AE220000 */ sw $v0, ($s1)
/* C99FC 801332FC AC830004 */ sw $v1, 4($a0)
/* C9A00 80133300 3C038015 */ lui $v1, %hi(D_80151328)
/* C9A04 80133304 8C631328 */ lw $v1, %lo(D_80151328)($v1)
/* C9A08 80133308 3C02E800 */ lui $v0, 0xe800
/* C9A0C 8013330C ADA20000 */ sw $v0, ($t5)
/* C9A10 80133310 3C020700 */ lui $v0, 0x700
/* C9A14 80133314 ADA2000C */ sw $v0, 0xc($t5)
/* C9A18 80133318 3C02F000 */ lui $v0, 0xf000
/* C9A1C 8013331C ADA00004 */ sw $zero, 4($t5)
/* C9A20 80133320 ADA50008 */ sw $a1, 8($t5)
/* C9A24 80133324 ADBE0010 */ sw $fp, 0x10($t5)
/* C9A28 80133328 ADA00014 */ sw $zero, 0x14($t5)
/* C9A2C 8013332C ADA20018 */ sw $v0, 0x18($t5)
/* C9A30 80133330 ADA6001C */ sw $a2, 0x1c($t5)
/* C9A34 80133334 ADB70020 */ sw $s7, 0x20($t5)
/* C9A38 80133338 ADA00024 */ sw $zero, 0x24($t5)
/* C9A3C 8013333C 94630000 */ lhu $v1, ($v1)
/* C9A40 80133340 25A20028 */ addiu $v0, $t5, 0x28
/* C9A44 80133344 1060005F */ beqz $v1, .L801334C4
/* C9A48 80133348 AE220000 */ sw $v0, ($s1)
/* C9A4C 8013334C 3C03FD48 */ lui $v1, 0xfd48
/* C9A50 80133350 3463000B */ ori $v1, $v1, 0xb
/* C9A54 80133354 3C05F548 */ lui $a1, 0xf548
/* C9A58 80133358 34A50400 */ ori $a1, $a1, 0x400
/* C9A5C 8013335C 3C04070A */ lui $a0, 0x70a
/* C9A60 80133360 34840280 */ ori $a0, $a0, 0x280
/* C9A64 80133364 3C070702 */ lui $a3, 0x702
/* C9A68 80133368 34E7E05C */ ori $a3, $a3, 0xe05c
/* C9A6C 8013336C 3C0B010A */ lui $t3, 0x10a
/* C9A70 80133370 356B0280 */ ori $t3, $t3, 0x280
/* C9A74 80133374 3C0AF240 */ lui $t2, 0xf240
/* C9A78 80133378 354A0400 */ ori $t2, $t2, 0x400
/* C9A7C 8013337C 3C080145 */ lui $t0, 0x145
/* C9A80 80133380 3508C45C */ ori $t0, $t0, 0xc45c
/* C9A84 80133384 3C09001A */ lui $t1, 0x1a
/* C9A88 80133388 35290280 */ ori $t1, $t1, 0x280
/* C9A8C 8013338C 3C06F510 */ lui $a2, 0xf510
/* C9A90 80133390 34C60900 */ ori $a2, $a2, 0x900
/* C9A94 80133394 3C0C020F */ lui $t4, 0x20f
/* C9A98 80133398 358CC000 */ ori $t4, $t4, 0xc000
/* C9A9C 8013339C 25A20030 */ addiu $v0, $t5, 0x30
/* C9AA0 801333A0 AE220000 */ sw $v0, ($s1)
/* C9AA4 801333A4 ADA30028 */ sw $v1, 0x28($t5)
/* C9AA8 801333A8 9243002C */ lbu $v1, 0x2c($s2)
/* C9AAC 801333AC 25A20038 */ addiu $v0, $t5, 0x38
/* C9AB0 801333B0 AE220000 */ sw $v0, ($s1)
/* C9AB4 801333B4 25A20040 */ addiu $v0, $t5, 0x40
/* C9AB8 801333B8 AE220000 */ sw $v0, ($s1)
/* C9ABC 801333BC 25A20048 */ addiu $v0, $t5, 0x48
/* C9AC0 801333C0 AE220000 */ sw $v0, ($s1)
/* C9AC4 801333C4 25A20050 */ addiu $v0, $t5, 0x50
/* C9AC8 801333C8 AE220000 */ sw $v0, ($s1)
/* C9ACC 801333CC 25A20058 */ addiu $v0, $t5, 0x58
/* C9AD0 801333D0 AE220000 */ sw $v0, ($s1)
/* C9AD4 801333D4 25A20060 */ addiu $v0, $t5, 0x60
/* C9AD8 801333D8 AE220000 */ sw $v0, ($s1)
/* C9ADC 801333DC 25A20068 */ addiu $v0, $t5, 0x68
/* C9AE0 801333E0 3C0F0808 */ lui $t7, 0x808
/* C9AE4 801333E4 AE220000 */ sw $v0, ($s1)
/* C9AE8 801333E8 3C028015 */ lui $v0, %hi(gHudElementCacheTableRaster)
/* C9AEC 801333EC 8C4212C8 */ lw $v0, %lo(gHudElementCacheTableRaster)($v0)
/* C9AF0 801333F0 000318C0 */ sll $v1, $v1, 3
/* C9AF4 801333F4 00621821 */ addu $v1, $v1, $v0
/* C9AF8 801333F8 8C630004 */ lw $v1, 4($v1)
/* C9AFC 801333FC 25A20070 */ addiu $v0, $t5, 0x70
/* C9B00 80133400 AE220000 */ sw $v0, ($s1)
/* C9B04 80133404 3C02F400 */ lui $v0, 0xf400
/* C9B08 80133408 ADA20040 */ sw $v0, 0x40($t5)
/* C9B0C 8013340C 3C020200 */ lui $v0, 0x200
/* C9B10 80133410 ADA2006C */ sw $v0, 0x6c($t5)
/* C9B14 80133414 3C02F200 */ lui $v0, 0xf200
/* C9B18 80133418 ADA50030 */ sw $a1, 0x30($t5)
/* C9B1C 8013341C ADA40034 */ sw $a0, 0x34($t5)
/* C9B20 80133420 ADBE0038 */ sw $fp, 0x38($t5)
/* C9B24 80133424 ADA0003C */ sw $zero, 0x3c($t5)
/* C9B28 80133428 ADA70044 */ sw $a3, 0x44($t5)
/* C9B2C 8013342C ADB70048 */ sw $s7, 0x48($t5)
/* C9B30 80133430 ADA0004C */ sw $zero, 0x4c($t5)
/* C9B34 80133434 ADB30050 */ sw $s3, 0x50($t5)
/* C9B38 80133438 ADAB0054 */ sw $t3, 0x54($t5)
/* C9B3C 8013343C ADAA0058 */ sw $t2, 0x58($t5)
/* C9B40 80133440 ADA8005C */ sw $t0, 0x5c($t5)
/* C9B44 80133444 ADB30060 */ sw $s3, 0x60($t5)
/* C9B48 80133448 ADA90064 */ sw $t1, 0x64($t5)
/* C9B4C 8013344C ADA60068 */ sw $a2, 0x68($t5)
/* C9B50 80133450 ADA20070 */ sw $v0, 0x70($t5)
/* C9B54 80133454 ADAC0074 */ sw $t4, 0x74($t5)
/* C9B58 80133458 ADA3002C */ sw $v1, 0x2c($t5)
/* C9B5C 8013345C 8E430000 */ lw $v1, ($s2)
/* C9B60 80133460 25A20078 */ addiu $v0, $t5, 0x78
/* C9B64 80133464 006F1824 */ and $v1, $v1, $t7
/* C9B68 80133468 1060000B */ beqz $v1, .L80133498
/* C9B6C 8013346C AE220000 */ sw $v0, ($s1)
/* C9B70 80133470 27A40058 */ addiu $a0, $sp, 0x58
/* C9B74 80133474 0000282D */ daddu $a1, $zero, $zero
/* C9B78 80133478 00A0302D */ daddu $a2, $a1, $zero
/* C9B7C 8013347C 24070018 */ addiu $a3, $zero, 0x18
/* C9B80 80133480 00E0102D */ daddu $v0, $a3, $zero
/* C9B84 80133484 AFA20010 */ sw $v0, 0x10($sp)
/* C9B88 80133488 0C052479 */ jal func_801491E4
/* C9B8C 8013348C AFB00014 */ sw $s0, 0x14($sp)
/* C9B90 80133490 0804CD62 */ j .L80133588
/* C9B94 80133494 00000000 */ nop
.L80133498:
/* C9B98 80133498 27A40058 */ addiu $a0, $sp, 0x58
/* C9B9C 8013349C 0000282D */ daddu $a1, $zero, $zero
/* C9BA0 801334A0 00A0302D */ daddu $a2, $a1, $zero
/* C9BA4 801334A4 24070018 */ addiu $a3, $zero, 0x18
/* C9BA8 801334A8 00E0102D */ daddu $v0, $a3, $zero
/* C9BAC 801334AC AFA20010 */ sw $v0, 0x10($sp)
/* C9BB0 801334B0 240200FF */ addiu $v0, $zero, 0xff
/* C9BB4 801334B4 0C052479 */ jal func_801491E4
/* C9BB8 801334B8 AFA20014 */ sw $v0, 0x14($sp)
/* C9BBC 801334BC 0804CD62 */ j .L80133588
/* C9BC0 801334C0 00000000 */ nop
.L801334C4:
/* C9BC4 801334C4 3C03FD48 */ lui $v1, 0xfd48
/* C9BC8 801334C8 3463000B */ ori $v1, $v1, 0xb
/* C9BCC 801334CC 3C05F548 */ lui $a1, 0xf548
/* C9BD0 801334D0 34A50400 */ ori $a1, $a1, 0x400
/* C9BD4 801334D4 3C04070A */ lui $a0, 0x70a
/* C9BD8 801334D8 34840280 */ ori $a0, $a0, 0x280
/* C9BDC 801334DC 3C060702 */ lui $a2, 0x702
/* C9BE0 801334E0 34C6E05C */ ori $a2, $a2, 0xe05c
/* C9BE4 801334E4 3C09000A */ lui $t1, 0xa
/* C9BE8 801334E8 35290280 */ ori $t1, $t1, 0x280
/* C9BEC 801334EC 3C08F240 */ lui $t0, 0xf240
/* C9BF0 801334F0 35080400 */ ori $t0, $t0, 0x400
/* C9BF4 801334F4 3C070045 */ lui $a3, 0x45
/* C9BF8 801334F8 34E7C45C */ ori $a3, $a3, 0xc45c
/* C9BFC 801334FC 25A20030 */ addiu $v0, $t5, 0x30
/* C9C00 80133500 AE220000 */ sw $v0, ($s1)
/* C9C04 80133504 ADA30028 */ sw $v1, 0x28($t5)
/* C9C08 80133508 9243002C */ lbu $v1, 0x2c($s2)
/* C9C0C 8013350C 25A20038 */ addiu $v0, $t5, 0x38
/* C9C10 80133510 AE220000 */ sw $v0, ($s1)
/* C9C14 80133514 25A20040 */ addiu $v0, $t5, 0x40
/* C9C18 80133518 AE220000 */ sw $v0, ($s1)
/* C9C1C 8013351C 25A20048 */ addiu $v0, $t5, 0x48
/* C9C20 80133520 AE220000 */ sw $v0, ($s1)
/* C9C24 80133524 25A20050 */ addiu $v0, $t5, 0x50
/* C9C28 80133528 AE220000 */ sw $v0, ($s1)
/* C9C2C 8013352C 25A20058 */ addiu $v0, $t5, 0x58
/* C9C30 80133530 AE220000 */ sw $v0, ($s1)
/* C9C34 80133534 3C028015 */ lui $v0, %hi(gHudElementCacheTableRaster)
/* C9C38 80133538 8C4212C8 */ lw $v0, %lo(gHudElementCacheTableRaster)($v0)
/* C9C3C 8013353C 000318C0 */ sll $v1, $v1, 3
/* C9C40 80133540 00621821 */ addu $v1, $v1, $v0
/* C9C44 80133544 8C630004 */ lw $v1, 4($v1)
/* C9C48 80133548 25A20060 */ addiu $v0, $t5, 0x60
/* C9C4C 8013354C AE220000 */ sw $v0, ($s1)
/* C9C50 80133550 3C02F400 */ lui $v0, 0xf400
/* C9C54 80133554 ADA50030 */ sw $a1, 0x30($t5)
/* C9C58 80133558 ADA40034 */ sw $a0, 0x34($t5)
/* C9C5C 8013355C ADBE0038 */ sw $fp, 0x38($t5)
/* C9C60 80133560 ADA0003C */ sw $zero, 0x3c($t5)
/* C9C64 80133564 ADA20040 */ sw $v0, 0x40($t5)
/* C9C68 80133568 ADA60044 */ sw $a2, 0x44($t5)
/* C9C6C 8013356C ADB70048 */ sw $s7, 0x48($t5)
/* C9C70 80133570 ADA0004C */ sw $zero, 0x4c($t5)
/* C9C74 80133574 ADB30050 */ sw $s3, 0x50($t5)
/* C9C78 80133578 ADA90054 */ sw $t1, 0x54($t5)
/* C9C7C 8013357C ADA80058 */ sw $t0, 0x58($t5)
/* C9C80 80133580 ADA7005C */ sw $a3, 0x5c($t5)
/* C9C84 80133584 ADA3002C */ sw $v1, 0x2c($t5)
.L80133588:
/* C9C88 80133588 8E220000 */ lw $v0, ($s1)
/* C9C8C 8013358C 0040182D */ daddu $v1, $v0, $zero
/* C9C90 80133590 24420008 */ addiu $v0, $v0, 8
/* C9C94 80133594 3C18DE00 */ lui $t8, 0xde00
/* C9C98 80133598 AE220000 */ sw $v0, ($s1)
/* C9C9C 8013359C 3C028015 */ lui $v0, %hi(D_8014C678)
/* C9CA0 801335A0 2442C678 */ addiu $v0, $v0, %lo(D_8014C678)
/* C9CA4 801335A4 0804CE2D */ j .L801338B4
/* C9CA8 801335A8 AC780000 */ sw $t8, ($v1)
.L801335AC:
/* C9CAC 801335AC 34A50100 */ ori $a1, $a1, 0x100
/* C9CB0 801335B0 3C060703 */ lui $a2, 0x703
/* C9CB4 801335B4 34C6C000 */ ori $a2, $a2, 0xc000
/* C9CB8 801335B8 8E2D0000 */ lw $t5, ($s1)
/* C9CBC 801335BC 3C02FD10 */ lui $v0, 0xfd10
/* C9CC0 801335C0 01A0202D */ daddu $a0, $t5, $zero
/* C9CC4 801335C4 25AD0008 */ addiu $t5, $t5, 8
/* C9CC8 801335C8 AE2D0000 */ sw $t5, ($s1)
/* C9CCC 801335CC AC820000 */ sw $v0, ($a0)
/* C9CD0 801335D0 9243002D */ lbu $v1, 0x2d($s2)
/* C9CD4 801335D4 25A20008 */ addiu $v0, $t5, 8
/* C9CD8 801335D8 AE220000 */ sw $v0, ($s1)
/* C9CDC 801335DC 25A20010 */ addiu $v0, $t5, 0x10
/* C9CE0 801335E0 AE220000 */ sw $v0, ($s1)
/* C9CE4 801335E4 25A20018 */ addiu $v0, $t5, 0x18
/* C9CE8 801335E8 AE220000 */ sw $v0, ($s1)
/* C9CEC 801335EC 3C028015 */ lui $v0, %hi(gHudElementCacheTablePalette)
/* C9CF0 801335F0 8C4212D0 */ lw $v0, %lo(gHudElementCacheTablePalette)($v0)
/* C9CF4 801335F4 000318C0 */ sll $v1, $v1, 3
/* C9CF8 801335F8 00621821 */ addu $v1, $v1, $v0
/* C9CFC 801335FC 8C630004 */ lw $v1, 4($v1)
/* C9D00 80133600 25A20020 */ addiu $v0, $t5, 0x20
/* C9D04 80133604 AE220000 */ sw $v0, ($s1)
/* C9D08 80133608 AC830004 */ sw $v1, 4($a0)
/* C9D0C 8013360C 3C038015 */ lui $v1, %hi(D_80151328)
/* C9D10 80133610 8C631328 */ lw $v1, %lo(D_80151328)($v1)
/* C9D14 80133614 3C02E800 */ lui $v0, 0xe800
/* C9D18 80133618 ADA20000 */ sw $v0, ($t5)
/* C9D1C 8013361C 3C020700 */ lui $v0, 0x700
/* C9D20 80133620 ADA2000C */ sw $v0, 0xc($t5)
/* C9D24 80133624 3C02F000 */ lui $v0, 0xf000
/* C9D28 80133628 ADA00004 */ sw $zero, 4($t5)
/* C9D2C 8013362C ADA50008 */ sw $a1, 8($t5)
/* C9D30 80133630 ADBE0010 */ sw $fp, 0x10($t5)
/* C9D34 80133634 ADA00014 */ sw $zero, 0x14($t5)
/* C9D38 80133638 ADA20018 */ sw $v0, 0x18($t5)
/* C9D3C 8013363C ADA6001C */ sw $a2, 0x1c($t5)
/* C9D40 80133640 ADB70020 */ sw $s7, 0x20($t5)
/* C9D44 80133644 ADA00024 */ sw $zero, 0x24($t5)
/* C9D48 80133648 94630000 */ lhu $v1, ($v1)
/* C9D4C 8013364C 25A20028 */ addiu $v0, $t5, 0x28
/* C9D50 80133650 1060005F */ beqz $v1, .L801337D0
/* C9D54 80133654 AE220000 */ sw $v0, ($s1)
/* C9D58 80133658 3C03FD48 */ lui $v1, 0xfd48
/* C9D5C 8013365C 3463000F */ ori $v1, $v1, 0xf
/* C9D60 80133660 3C05F548 */ lui $a1, 0xf548
/* C9D64 80133664 34A50400 */ ori $a1, $a1, 0x400
/* C9D68 80133668 3C04070A */ lui $a0, 0x70a
/* C9D6C 8013366C 34840280 */ ori $a0, $a0, 0x280
/* C9D70 80133670 3C070703 */ lui $a3, 0x703
/* C9D74 80133674 34E7E07C */ ori $a3, $a3, 0xe07c
/* C9D78 80133678 3C0B010A */ lui $t3, 0x10a
/* C9D7C 8013367C 356B0280 */ ori $t3, $t3, 0x280
/* C9D80 80133680 3C0AF240 */ lui $t2, 0xf240
/* C9D84 80133684 354A0400 */ ori $t2, $t2, 0x400
/* C9D88 80133688 3C080147 */ lui $t0, 0x147
/* C9D8C 8013368C 3508C47C */ ori $t0, $t0, 0xc47c
/* C9D90 80133690 3C09001A */ lui $t1, 0x1a
/* C9D94 80133694 35290280 */ ori $t1, $t1, 0x280
/* C9D98 80133698 3C06F510 */ lui $a2, 0xf510
/* C9D9C 8013369C 34C60900 */ ori $a2, $a2, 0x900
/* C9DA0 801336A0 3C0C020F */ lui $t4, 0x20f
/* C9DA4 801336A4 358CC000 */ ori $t4, $t4, 0xc000
/* C9DA8 801336A8 25A20030 */ addiu $v0, $t5, 0x30
/* C9DAC 801336AC AE220000 */ sw $v0, ($s1)
/* C9DB0 801336B0 ADA30028 */ sw $v1, 0x28($t5)
/* C9DB4 801336B4 9243002C */ lbu $v1, 0x2c($s2)
/* C9DB8 801336B8 25A20038 */ addiu $v0, $t5, 0x38
/* C9DBC 801336BC AE220000 */ sw $v0, ($s1)
/* C9DC0 801336C0 25A20040 */ addiu $v0, $t5, 0x40
/* C9DC4 801336C4 AE220000 */ sw $v0, ($s1)
/* C9DC8 801336C8 25A20048 */ addiu $v0, $t5, 0x48
/* C9DCC 801336CC AE220000 */ sw $v0, ($s1)
/* C9DD0 801336D0 25A20050 */ addiu $v0, $t5, 0x50
/* C9DD4 801336D4 AE220000 */ sw $v0, ($s1)
/* C9DD8 801336D8 25A20058 */ addiu $v0, $t5, 0x58
/* C9DDC 801336DC AE220000 */ sw $v0, ($s1)
/* C9DE0 801336E0 25A20060 */ addiu $v0, $t5, 0x60
/* C9DE4 801336E4 AE220000 */ sw $v0, ($s1)
/* C9DE8 801336E8 25A20068 */ addiu $v0, $t5, 0x68
/* C9DEC 801336EC 3C190808 */ lui $t9, 0x808
/* C9DF0 801336F0 AE220000 */ sw $v0, ($s1)
/* C9DF4 801336F4 3C028015 */ lui $v0, %hi(gHudElementCacheTableRaster)
/* C9DF8 801336F8 8C4212C8 */ lw $v0, %lo(gHudElementCacheTableRaster)($v0)
/* C9DFC 801336FC 000318C0 */ sll $v1, $v1, 3
/* C9E00 80133700 00621821 */ addu $v1, $v1, $v0
/* C9E04 80133704 8C630004 */ lw $v1, 4($v1)
/* C9E08 80133708 25A20070 */ addiu $v0, $t5, 0x70
/* C9E0C 8013370C AE220000 */ sw $v0, ($s1)
/* C9E10 80133710 3C02F400 */ lui $v0, 0xf400
/* C9E14 80133714 ADA20040 */ sw $v0, 0x40($t5)
/* C9E18 80133718 3C020200 */ lui $v0, 0x200
/* C9E1C 8013371C ADA2006C */ sw $v0, 0x6c($t5)
/* C9E20 80133720 3C02F200 */ lui $v0, 0xf200
/* C9E24 80133724 ADA50030 */ sw $a1, 0x30($t5)
/* C9E28 80133728 ADA40034 */ sw $a0, 0x34($t5)
/* C9E2C 8013372C ADBE0038 */ sw $fp, 0x38($t5)
/* C9E30 80133730 ADA0003C */ sw $zero, 0x3c($t5)
/* C9E34 80133734 ADA70044 */ sw $a3, 0x44($t5)
/* C9E38 80133738 ADB70048 */ sw $s7, 0x48($t5)
/* C9E3C 8013373C ADA0004C */ sw $zero, 0x4c($t5)
/* C9E40 80133740 ADB30050 */ sw $s3, 0x50($t5)
/* C9E44 80133744 ADAB0054 */ sw $t3, 0x54($t5)
/* C9E48 80133748 ADAA0058 */ sw $t2, 0x58($t5)
/* C9E4C 8013374C ADA8005C */ sw $t0, 0x5c($t5)
/* C9E50 80133750 ADB30060 */ sw $s3, 0x60($t5)
/* C9E54 80133754 ADA90064 */ sw $t1, 0x64($t5)
/* C9E58 80133758 ADA60068 */ sw $a2, 0x68($t5)
/* C9E5C 8013375C ADA20070 */ sw $v0, 0x70($t5)
/* C9E60 80133760 ADAC0074 */ sw $t4, 0x74($t5)
/* C9E64 80133764 ADA3002C */ sw $v1, 0x2c($t5)
/* C9E68 80133768 8E430000 */ lw $v1, ($s2)
/* C9E6C 8013376C 25A20078 */ addiu $v0, $t5, 0x78
/* C9E70 80133770 00791824 */ and $v1, $v1, $t9
/* C9E74 80133774 1060000B */ beqz $v1, .L801337A4
/* C9E78 80133778 AE220000 */ sw $v0, ($s1)
/* C9E7C 8013377C 27A40058 */ addiu $a0, $sp, 0x58
/* C9E80 80133780 0000282D */ daddu $a1, $zero, $zero
/* C9E84 80133784 00A0302D */ daddu $a2, $a1, $zero
/* C9E88 80133788 24070020 */ addiu $a3, $zero, 0x20
/* C9E8C 8013378C 00E0102D */ daddu $v0, $a3, $zero
/* C9E90 80133790 AFA20010 */ sw $v0, 0x10($sp)
/* C9E94 80133794 0C052479 */ jal func_801491E4
/* C9E98 80133798 AFB00014 */ sw $s0, 0x14($sp)
/* C9E9C 8013379C 0804CE25 */ j .L80133894
/* C9EA0 801337A0 00000000 */ nop
.L801337A4:
/* C9EA4 801337A4 27A40058 */ addiu $a0, $sp, 0x58
/* C9EA8 801337A8 0000282D */ daddu $a1, $zero, $zero
/* C9EAC 801337AC 00A0302D */ daddu $a2, $a1, $zero
/* C9EB0 801337B0 24070020 */ addiu $a3, $zero, 0x20
/* C9EB4 801337B4 00E0102D */ daddu $v0, $a3, $zero
/* C9EB8 801337B8 AFA20010 */ sw $v0, 0x10($sp)
/* C9EBC 801337BC 240200FF */ addiu $v0, $zero, 0xff
/* C9EC0 801337C0 0C052479 */ jal func_801491E4
/* C9EC4 801337C4 AFA20014 */ sw $v0, 0x14($sp)
/* C9EC8 801337C8 0804CE25 */ j .L80133894
/* C9ECC 801337CC 00000000 */ nop
.L801337D0:
/* C9ED0 801337D0 3C03FD48 */ lui $v1, 0xfd48
/* C9ED4 801337D4 3463000F */ ori $v1, $v1, 0xf
/* C9ED8 801337D8 3C05F548 */ lui $a1, 0xf548
/* C9EDC 801337DC 34A50400 */ ori $a1, $a1, 0x400
/* C9EE0 801337E0 3C04070A */ lui $a0, 0x70a
/* C9EE4 801337E4 34840280 */ ori $a0, $a0, 0x280
/* C9EE8 801337E8 3C060703 */ lui $a2, 0x703
/* C9EEC 801337EC 34C6E07C */ ori $a2, $a2, 0xe07c
/* C9EF0 801337F0 3C09000A */ lui $t1, 0xa
/* C9EF4 801337F4 35290280 */ ori $t1, $t1, 0x280
/* C9EF8 801337F8 3C08F240 */ lui $t0, 0xf240
/* C9EFC 801337FC 35080400 */ ori $t0, $t0, 0x400
/* C9F00 80133800 3C070047 */ lui $a3, 0x47
/* C9F04 80133804 34E7C47C */ ori $a3, $a3, 0xc47c
/* C9F08 80133808 25A20030 */ addiu $v0, $t5, 0x30
/* C9F0C 8013380C AE220000 */ sw $v0, ($s1)
/* C9F10 80133810 ADA30028 */ sw $v1, 0x28($t5)
/* C9F14 80133814 9243002C */ lbu $v1, 0x2c($s2)
/* C9F18 80133818 25A20038 */ addiu $v0, $t5, 0x38
/* C9F1C 8013381C AE220000 */ sw $v0, ($s1)
/* C9F20 80133820 25A20040 */ addiu $v0, $t5, 0x40
/* C9F24 80133824 AE220000 */ sw $v0, ($s1)
/* C9F28 80133828 25A20048 */ addiu $v0, $t5, 0x48
/* C9F2C 8013382C AE220000 */ sw $v0, ($s1)
/* C9F30 80133830 25A20050 */ addiu $v0, $t5, 0x50
/* C9F34 80133834 AE220000 */ sw $v0, ($s1)
/* C9F38 80133838 25A20058 */ addiu $v0, $t5, 0x58
/* C9F3C 8013383C AE220000 */ sw $v0, ($s1)
/* C9F40 80133840 3C028015 */ lui $v0, %hi(gHudElementCacheTableRaster)
/* C9F44 80133844 8C4212C8 */ lw $v0, %lo(gHudElementCacheTableRaster)($v0)
/* C9F48 80133848 000318C0 */ sll $v1, $v1, 3
/* C9F4C 8013384C 00621821 */ addu $v1, $v1, $v0
/* C9F50 80133850 8C630004 */ lw $v1, 4($v1)
/* C9F54 80133854 25A20060 */ addiu $v0, $t5, 0x60
/* C9F58 80133858 AE220000 */ sw $v0, ($s1)
/* C9F5C 8013385C 3C02F400 */ lui $v0, 0xf400
/* C9F60 80133860 ADA50030 */ sw $a1, 0x30($t5)
/* C9F64 80133864 ADA40034 */ sw $a0, 0x34($t5)
/* C9F68 80133868 ADBE0038 */ sw $fp, 0x38($t5)
/* C9F6C 8013386C ADA0003C */ sw $zero, 0x3c($t5)
/* C9F70 80133870 ADA20040 */ sw $v0, 0x40($t5)
/* C9F74 80133874 ADA60044 */ sw $a2, 0x44($t5)
/* C9F78 80133878 ADB70048 */ sw $s7, 0x48($t5)
/* C9F7C 8013387C ADA0004C */ sw $zero, 0x4c($t5)
/* C9F80 80133880 ADB30050 */ sw $s3, 0x50($t5)
/* C9F84 80133884 ADA90054 */ sw $t1, 0x54($t5)
/* C9F88 80133888 ADA80058 */ sw $t0, 0x58($t5)
/* C9F8C 8013388C ADA7005C */ sw $a3, 0x5c($t5)
/* C9F90 80133890 ADA3002C */ sw $v1, 0x2c($t5)
.L80133894:
/* C9F94 80133894 8E220000 */ lw $v0, ($s1)
/* C9F98 80133898 0040182D */ daddu $v1, $v0, $zero
/* C9F9C 8013389C 24420008 */ addiu $v0, $v0, 8
/* C9FA0 801338A0 3C0EDE00 */ lui $t6, 0xde00
/* C9FA4 801338A4 AE220000 */ sw $v0, ($s1)
/* C9FA8 801338A8 3C028015 */ lui $v0, %hi(D_8014C6A0)
/* C9FAC 801338AC 2442C6A0 */ addiu $v0, $v0, %lo(D_8014C6A0)
/* C9FB0 801338B0 AC6E0000 */ sw $t6, ($v1)
.L801338B4:
/* C9FB4 801338B4 AC620004 */ sw $v0, 4($v1)
/* C9FB8 801338B8 3C02D838 */ lui $v0, 0xd838
/* C9FBC 801338BC 8E230000 */ lw $v1, ($s1)
/* C9FC0 801338C0 34420002 */ ori $v0, $v0, 2
/* C9FC4 801338C4 0060202D */ daddu $a0, $v1, $zero
/* C9FC8 801338C8 24630008 */ addiu $v1, $v1, 8
/* C9FCC 801338CC AE230000 */ sw $v1, ($s1)
/* C9FD0 801338D0 AC820000 */ sw $v0, ($a0)
/* C9FD4 801338D4 24020040 */ addiu $v0, $zero, 0x40
/* C9FD8 801338D8 AC820004 */ sw $v0, 4($a0)
/* C9FDC 801338DC 24620008 */ addiu $v0, $v1, 8
/* C9FE0 801338E0 AE220000 */ sw $v0, ($s1)
/* C9FE4 801338E4 AC770000 */ sw $s7, ($v1)
/* C9FE8 801338E8 AC600004 */ sw $zero, 4($v1)
.L801338EC:
/* C9FEC 801338EC 26D60001 */ addiu $s6, $s6, 1
.L801338F0:
/* C9FF0 801338F0 2AC20100 */ slti $v0, $s6, 0x100
/* C9FF4 801338F4 1440FD6C */ bnez $v0, .L80132EA8
/* C9FF8 801338F8 00000000 */ nop
/* C9FFC 801338FC 8FBF0144 */ lw $ra, 0x144($sp)
/* CA000 80133900 8FBE0140 */ lw $fp, 0x140($sp)
/* CA004 80133904 8FB7013C */ lw $s7, 0x13c($sp)
/* CA008 80133908 8FB60138 */ lw $s6, 0x138($sp)
/* CA00C 8013390C 8FB50134 */ lw $s5, 0x134($sp)
/* CA010 80133910 8FB40130 */ lw $s4, 0x130($sp)
/* CA014 80133914 8FB3012C */ lw $s3, 0x12c($sp)
/* CA018 80133918 8FB20128 */ lw $s2, 0x128($sp)
/* CA01C 8013391C 8FB10124 */ lw $s1, 0x124($sp)
/* CA020 80133920 8FB00120 */ lw $s0, 0x120($sp)
/* CA024 80133924 D7B40148 */ ldc1 $f20, 0x148($sp)
/* CA028 80133928 03E00008 */ jr $ra
/* CA02C 8013392C 27BD0150 */ addiu $sp, $sp, 0x150