### RAW ASSEMBLY INSTRUCTIONS:

glabel imgfx_mesh_make_strip
/* D2388 8013BC88 0080C02D */  daddu     $t8, $a0, $zero
/* D238C 8013BC8C 3C068015 */  lui       $a2, %hi(ImgFXCurrentTexturePtr)
/* D2390 8013BC90 24C6EE10 */  addiu     $a2, $a2, %lo(ImgFXCurrentTexturePtr)
/* D2394 8013BC94 8CC40000 */  lw        $a0, 0x0($a2)
/* D2398 8013BC98 94830008 */  lhu       $v1, 0x8($a0)
/* D239C 8013BC9C 24021000 */  addiu     $v0, $zero, 0x1000
/* D23A0 8013BCA0 14600002 */  bnez      $v1, .L8013BCAC
/* D23A4 8013BCA4 0043001A */   div      $zero, $v0, $v1
/* D23A8 8013BCA8 0007000D */  break     7
.L8013BCAC:
/* D23AC 8013BCAC 2401FFFF */  addiu     $at, $zero, -0x1
/* D23B0 8013BCB0 14610004 */  bne       $v1, $at, .L8013BCC4
/* D23B4 8013BCB4 3C018000 */   lui      $at, (0x80000000 >> 16)
/* D23B8 8013BCB8 14410002 */  bne       $v0, $at, .L8013BCC4
/* D23BC 8013BCBC 00000000 */   nop
/* D23C0 8013BCC0 0006000D */  break     6
.L8013BCC4:
/* D23C4 8013BCC4 00006812 */  mflo      $t5
/* D23C8 8013BCC8 9483000A */  lhu       $v1, 0xA($a0)
/* D23CC 8013BCCC 006D102A */  slt       $v0, $v1, $t5
/* D23D0 8013BCD0 54400001 */  bnel      $v0, $zero, .L8013BCD8
/* D23D4 8013BCD4 0060682D */   daddu    $t5, $v1, $zero
.L8013BCD8:
/* D23D8 8013BCD8 01A0502D */  daddu     $t2, $t5, $zero
/* D23DC 8013BCDC 00C0782D */  daddu     $t7, $a2, $zero
/* D23E0 8013BCE0 3C028015 */  lui       $v0, %hi(imgfx_vtxCount)
/* D23E4 8013BCE4 2442EE14 */  addiu     $v0, $v0, %lo(imgfx_vtxCount)
/* D23E8 8013BCE8 0040482D */  daddu     $t1, $v0, $zero
/* D23EC 8013BCEC 3C068015 */  lui       $a2, %hi(imgfx_vtxBuf)
/* D23F0 8013BCF0 24C66950 */  addiu     $a2, $a2, %lo(imgfx_vtxBuf)
/* D23F4 8013BCF4 24072000 */  addiu     $a3, $zero, 0x2000
/* D23F8 8013BCF8 00C0602D */  daddu     $t4, $a2, $zero
/* D23FC 8013BCFC 8488000E */  lh        $t0, 0xE($a0)
/* D2400 8013BD00 848E000C */  lh        $t6, 0xC($a0)
/* D2404 8013BD04 94430000 */  lhu       $v1, 0x0($v0)
/* D2408 8013BD08 00E0C82D */  daddu     $t9, $a3, $zero
/* D240C 8013BD0C A7030008 */  sh        $v1, 0x8($t8)
/* D2410 8013BD10 95220000 */  lhu       $v0, 0x0($t1)
/* D2414 8013BD14 8CC50000 */  lw        $a1, 0x0($a2)
/* D2418 8013BD18 95230000 */  lhu       $v1, 0x0($t1)
/* D241C 8013BD1C 00021100 */  sll       $v0, $v0, 4
/* D2420 8013BD20 00451021 */  addu      $v0, $v0, $a1
/* D2424 8013BD24 00031900 */  sll       $v1, $v1, 4
/* D2428 8013BD28 A44E0000 */  sh        $t6, 0x0($v0)
/* D242C 8013BD2C 95220000 */  lhu       $v0, 0x0($t1)
/* D2430 8013BD30 00651821 */  addu      $v1, $v1, $a1
/* D2434 8013BD34 A4680002 */  sh        $t0, 0x2($v1)
/* D2438 8013BD38 95230000 */  lhu       $v1, 0x0($t1)
/* D243C 8013BD3C 00021100 */  sll       $v0, $v0, 4
/* D2440 8013BD40 00451021 */  addu      $v0, $v0, $a1
/* D2444 8013BD44 00031900 */  sll       $v1, $v1, 4
/* D2448 8013BD48 00651821 */  addu      $v1, $v1, $a1
/* D244C 8013BD4C A4400004 */  sh        $zero, 0x4($v0)
/* D2450 8013BD50 95240000 */  lhu       $a0, 0x0($t1)
/* D2454 8013BD54 24022000 */  addiu     $v0, $zero, 0x2000
/* D2458 8013BD58 A4620008 */  sh        $v0, 0x8($v1)
/* D245C 8013BD5C 95220000 */  lhu       $v0, 0x0($t1)
/* D2460 8013BD60 00042100 */  sll       $a0, $a0, 4
/* D2464 8013BD64 00852021 */  addu      $a0, $a0, $a1
/* D2468 8013BD68 00021100 */  sll       $v0, $v0, 4
/* D246C 8013BD6C 00451021 */  addu      $v0, $v0, $a1
/* D2470 8013BD70 A487000A */  sh        $a3, 0xA($a0)
/* D2474 8013BD74 240400F0 */  addiu     $a0, $zero, 0xF0
/* D2478 8013BD78 A044000C */  sb        $a0, 0xC($v0)
/* D247C 8013BD7C 95220000 */  lhu       $v0, 0x0($t1)
/* D2480 8013BD80 8CC30000 */  lw        $v1, 0x0($a2)
/* D2484 8013BD84 00021100 */  sll       $v0, $v0, 4
/* D2488 8013BD88 00431021 */  addu      $v0, $v0, $v1
/* D248C 8013BD8C A044000D */  sb        $a0, 0xD($v0)
/* D2490 8013BD90 95220000 */  lhu       $v0, 0x0($t1)
/* D2494 8013BD94 8CC30000 */  lw        $v1, 0x0($a2)
/* D2498 8013BD98 00021100 */  sll       $v0, $v0, 4
/* D249C 8013BD9C 00431021 */  addu      $v0, $v0, $v1
/* D24A0 8013BDA0 A044000E */  sb        $a0, 0xE($v0)
/* D24A4 8013BDA4 95240000 */  lhu       $a0, 0x0($t1)
/* D24A8 8013BDA8 8D850000 */  lw        $a1, 0x0($t4)
/* D24AC 8013BDAC 8DE60000 */  lw        $a2, 0x0($t7)
/* D24B0 8013BDB0 95230000 */  lhu       $v1, 0x0($t1)
/* D24B4 8013BDB4 00042100 */  sll       $a0, $a0, 4
/* D24B8 8013BDB8 00852021 */  addu      $a0, $a0, $a1
/* D24BC 8013BDBC 00031900 */  sll       $v1, $v1, 4
/* D24C0 8013BDC0 94C20008 */  lhu       $v0, 0x8($a2)
/* D24C4 8013BDC4 00651821 */  addu      $v1, $v1, $a1
/* D24C8 8013BDC8 004E1021 */  addu      $v0, $v0, $t6
/* D24CC 8013BDCC A4820010 */  sh        $v0, 0x10($a0)
/* D24D0 8013BDD0 95220000 */  lhu       $v0, 0x0($t1)
/* D24D4 8013BDD4 24040078 */  addiu     $a0, $zero, 0x78
/* D24D8 8013BDD8 A4680012 */  sh        $t0, 0x12($v1)
/* D24DC 8013BDDC 95230000 */  lhu       $v1, 0x0($t1)
/* D24E0 8013BDE0 00021100 */  sll       $v0, $v0, 4
/* D24E4 8013BDE4 00451021 */  addu      $v0, $v0, $a1
/* D24E8 8013BDE8 00031900 */  sll       $v1, $v1, 4
/* D24EC 8013BDEC A4400014 */  sh        $zero, 0x14($v0)
/* D24F0 8013BDF0 94C20008 */  lhu       $v0, 0x8($a2)
/* D24F4 8013BDF4 00651821 */  addu      $v1, $v1, $a1
/* D24F8 8013BDF8 24420100 */  addiu     $v0, $v0, 0x100
/* D24FC 8013BDFC 00021140 */  sll       $v0, $v0, 5
/* D2500 8013BE00 A4620018 */  sh        $v0, 0x18($v1)
/* D2504 8013BE04 95220000 */  lhu       $v0, 0x0($t1)
/* D2508 8013BE08 95230000 */  lhu       $v1, 0x0($t1)
/* D250C 8013BE0C 00021100 */  sll       $v0, $v0, 4
/* D2510 8013BE10 00451021 */  addu      $v0, $v0, $a1
/* D2514 8013BE14 00031900 */  sll       $v1, $v1, 4
/* D2518 8013BE18 00651821 */  addu      $v1, $v1, $a1
/* D251C 8013BE1C A447001A */  sh        $a3, 0x1A($v0)
/* D2520 8013BE20 A064001C */  sb        $a0, 0x1C($v1)
/* D2524 8013BE24 95220000 */  lhu       $v0, 0x0($t1)
/* D2528 8013BE28 8D830000 */  lw        $v1, 0x0($t4)
/* D252C 8013BE2C 00021100 */  sll       $v0, $v0, 4
/* D2530 8013BE30 00431021 */  addu      $v0, $v0, $v1
/* D2534 8013BE34 A044001D */  sb        $a0, 0x1D($v0)
/* D2538 8013BE38 95220000 */  lhu       $v0, 0x0($t1)
/* D253C 8013BE3C 8D830000 */  lw        $v1, 0x0($t4)
/* D2540 8013BE40 00021100 */  sll       $v0, $v0, 4
/* D2544 8013BE44 00431021 */  addu      $v0, $v0, $v1
/* D2548 8013BE48 A044001E */  sb        $a0, 0x1E($v0)
.L8013BE4C:
/* D254C 8013BE4C 000A3100 */  sll       $a2, $t2, 4
/* D2550 8013BE50 8DE20000 */  lw        $v0, 0x0($t7)
/* D2554 8013BE54 00CA3023 */  subu      $a2, $a2, $t2
/* D2558 8013BE58 9442000A */  lhu       $v0, 0xA($v0)
/* D255C 8013BE5C 000630C0 */  sll       $a2, $a2, 3
/* D2560 8013BE60 14400002 */  bnez      $v0, .L8013BE6C
/* D2564 8013BE64 00C2001A */   div      $zero, $a2, $v0
/* D2568 8013BE68 0007000D */  break     7
.L8013BE6C:
/* D256C 8013BE6C 2401FFFF */  addiu     $at, $zero, -0x1
/* D2570 8013BE70 14410004 */  bne       $v0, $at, .L8013BE84
/* D2574 8013BE74 3C018000 */   lui      $at, (0x80000000 >> 16)
/* D2578 8013BE78 14C10002 */  bne       $a2, $at, .L8013BE84
/* D257C 8013BE7C 00000000 */   nop
/* D2580 8013BE80 0006000D */  break     6
.L8013BE84:
/* D2584 8013BE84 00003012 */  mflo      $a2
/* D2588 8013BE88 010D5823 */  subu      $t3, $t0, $t5
/* D258C 8013BE8C 25480100 */  addiu     $t0, $t2, 0x100
/* D2590 8013BE90 95220000 */  lhu       $v0, 0x0($t1)
/* D2594 8013BE94 00084140 */  sll       $t0, $t0, 5
/* D2598 8013BE98 24420002 */  addiu     $v0, $v0, 0x2
/* D259C 8013BE9C A5220000 */  sh        $v0, 0x0($t1)
/* D25A0 8013BEA0 3042FFFF */  andi      $v0, $v0, 0xFFFF
/* D25A4 8013BEA4 00021100 */  sll       $v0, $v0, 4
/* D25A8 8013BEA8 8D850000 */  lw        $a1, 0x0($t4)
/* D25AC 8013BEAC 95230000 */  lhu       $v1, 0x0($t1)
/* D25B0 8013BEB0 00451021 */  addu      $v0, $v0, $a1
/* D25B4 8013BEB4 00031900 */  sll       $v1, $v1, 4
/* D25B8 8013BEB8 A44E0000 */  sh        $t6, 0x0($v0)
/* D25BC 8013BEBC 95220000 */  lhu       $v0, 0x0($t1)
/* D25C0 8013BEC0 00651821 */  addu      $v1, $v1, $a1
/* D25C4 8013BEC4 A46B0002 */  sh        $t3, 0x2($v1)
/* D25C8 8013BEC8 95230000 */  lhu       $v1, 0x0($t1)
/* D25CC 8013BECC 00021100 */  sll       $v0, $v0, 4
/* D25D0 8013BED0 00451021 */  addu      $v0, $v0, $a1
/* D25D4 8013BED4 00031900 */  sll       $v1, $v1, 4
/* D25D8 8013BED8 A4400004 */  sh        $zero, 0x4($v0)
/* D25DC 8013BEDC 95220000 */  lhu       $v0, 0x0($t1)
/* D25E0 8013BEE0 00651821 */  addu      $v1, $v1, $a1
/* D25E4 8013BEE4 A4790008 */  sh        $t9, 0x8($v1)
/* D25E8 8013BEE8 00021100 */  sll       $v0, $v0, 4
/* D25EC 8013BEEC 00451021 */  addu      $v0, $v0, $a1
/* D25F0 8013BEF0 A448000A */  sh        $t0, 0xA($v0)
/* D25F4 8013BEF4 95220000 */  lhu       $v0, 0x0($t1)
/* D25F8 8013BEF8 00021100 */  sll       $v0, $v0, 4
/* D25FC 8013BEFC 00451021 */  addu      $v0, $v0, $a1
/* D2600 8013BF00 24C40078 */  addiu     $a0, $a2, 0x78
/* D2604 8013BF04 A044000C */  sb        $a0, 0xC($v0)
/* D2608 8013BF08 95220000 */  lhu       $v0, 0x0($t1)
/* D260C 8013BF0C 8D830000 */  lw        $v1, 0x0($t4)
/* D2610 8013BF10 00021100 */  sll       $v0, $v0, 4
/* D2614 8013BF14 00431021 */  addu      $v0, $v0, $v1
/* D2618 8013BF18 A044000D */  sb        $a0, 0xD($v0)
/* D261C 8013BF1C 95220000 */  lhu       $v0, 0x0($t1)
/* D2620 8013BF20 8D830000 */  lw        $v1, 0x0($t4)
/* D2624 8013BF24 00021100 */  sll       $v0, $v0, 4
/* D2628 8013BF28 00431021 */  addu      $v0, $v0, $v1
/* D262C 8013BF2C A044000E */  sb        $a0, 0xE($v0)
/* D2630 8013BF30 95240000 */  lhu       $a0, 0x0($t1)
/* D2634 8013BF34 8D850000 */  lw        $a1, 0x0($t4)
/* D2638 8013BF38 8DE70000 */  lw        $a3, 0x0($t7)
/* D263C 8013BF3C 95230000 */  lhu       $v1, 0x0($t1)
/* D2640 8013BF40 00042100 */  sll       $a0, $a0, 4
/* D2644 8013BF44 00852021 */  addu      $a0, $a0, $a1
/* D2648 8013BF48 94E20008 */  lhu       $v0, 0x8($a3)
/* D264C 8013BF4C 00031900 */  sll       $v1, $v1, 4
/* D2650 8013BF50 004E1021 */  addu      $v0, $v0, $t6
/* D2654 8013BF54 A4820010 */  sh        $v0, 0x10($a0)
/* D2658 8013BF58 95220000 */  lhu       $v0, 0x0($t1)
/* D265C 8013BF5C 00651821 */  addu      $v1, $v1, $a1
/* D2660 8013BF60 A46B0012 */  sh        $t3, 0x12($v1)
/* D2664 8013BF64 95230000 */  lhu       $v1, 0x0($t1)
/* D2668 8013BF68 00021100 */  sll       $v0, $v0, 4
/* D266C 8013BF6C 00451021 */  addu      $v0, $v0, $a1
/* D2670 8013BF70 00031900 */  sll       $v1, $v1, 4
/* D2674 8013BF74 A4400014 */  sh        $zero, 0x14($v0)
/* D2678 8013BF78 94E20008 */  lhu       $v0, 0x8($a3)
/* D267C 8013BF7C 00651821 */  addu      $v1, $v1, $a1
/* D2680 8013BF80 24420100 */  addiu     $v0, $v0, 0x100
/* D2684 8013BF84 00021140 */  sll       $v0, $v0, 5
/* D2688 8013BF88 A4620018 */  sh        $v0, 0x18($v1)
/* D268C 8013BF8C 95220000 */  lhu       $v0, 0x0($t1)
/* D2690 8013BF90 95230000 */  lhu       $v1, 0x0($t1)
/* D2694 8013BF94 00021100 */  sll       $v0, $v0, 4
/* D2698 8013BF98 00451021 */  addu      $v0, $v0, $a1
/* D269C 8013BF9C 00031900 */  sll       $v1, $v1, 4
/* D26A0 8013BFA0 00651821 */  addu      $v1, $v1, $a1
/* D26A4 8013BFA4 A448001A */  sh        $t0, 0x1A($v0)
/* D26A8 8013BFA8 A066001C */  sb        $a2, 0x1C($v1)
/* D26AC 8013BFAC 95220000 */  lhu       $v0, 0x0($t1)
/* D26B0 8013BFB0 8D830000 */  lw        $v1, 0x0($t4)
/* D26B4 8013BFB4 00021100 */  sll       $v0, $v0, 4
/* D26B8 8013BFB8 00431021 */  addu      $v0, $v0, $v1
/* D26BC 8013BFBC A046001D */  sb        $a2, 0x1D($v0)
/* D26C0 8013BFC0 95220000 */  lhu       $v0, 0x0($t1)
/* D26C4 8013BFC4 8D830000 */  lw        $v1, 0x0($t4)
/* D26C8 8013BFC8 00021100 */  sll       $v0, $v0, 4
/* D26CC 8013BFCC 00431021 */  addu      $v0, $v0, $v1
/* D26D0 8013BFD0 A046001E */  sb        $a2, 0x1E($v0)
/* D26D4 8013BFD4 8DE20000 */  lw        $v0, 0x0($t7)
/* D26D8 8013BFD8 9443000A */  lhu       $v1, 0xA($v0)
/* D26DC 8013BFDC 15430005 */  bne       $t2, $v1, .L8013BFF4
/* D26E0 8013BFE0 014D1021 */   addu     $v0, $t2, $t5
/* D26E4 8013BFE4 95220000 */  lhu       $v0, 0x0($t1)
/* D26E8 8013BFE8 24420002 */  addiu     $v0, $v0, 0x2
/* D26EC 8013BFEC 0804F003 */  j         .L8013C00C
/* D26F0 8013BFF0 A5220000 */   sh       $v0, 0x0($t1)
.L8013BFF4:
/* D26F4 8013BFF4 0062102A */  slt       $v0, $v1, $v0
/* D26F8 8013BFF8 10400002 */  beqz      $v0, .L8013C004
/* D26FC 8013BFFC 0160402D */   daddu    $t0, $t3, $zero
/* D2700 8013C000 006A6823 */  subu      $t5, $v1, $t2
.L8013C004:
/* D2704 8013C004 0804EF93 */  j         .L8013BE4C
/* D2708 8013C008 014D5021 */   addu     $t2, $t2, $t5
.L8013C00C:
/* D270C 8013C00C 3C028015 */  lui       $v0, %hi(imgfx_vtxCount)
/* D2710 8013C010 9442EE14 */  lhu       $v0, %lo(imgfx_vtxCount)($v0)
/* D2714 8013C014 97040008 */  lhu       $a0, 0x8($t8)
/* D2718 8013C018 24030001 */  addiu     $v1, $zero, 0x1
/* D271C 8013C01C A3030003 */  sb        $v1, 0x3($t8)
/* D2720 8013C020 2442FFFF */  addiu     $v0, $v0, -0x1
/* D2724 8013C024 A702000A */  sh        $v0, 0xA($t8)
/* D2728 8013C028 3042FFFF */  andi      $v0, $v0, 0xFFFF
/* D272C 8013C02C 00441023 */  subu      $v0, $v0, $a0
/* D2730 8013C030 2442FFFF */  addiu     $v0, $v0, -0x1
/* D2734 8013C034 00021FC2 */  srl       $v1, $v0, 31
/* D2738 8013C038 00431021 */  addu      $v0, $v0, $v1
/* D273C 8013C03C 00021043 */  sra       $v0, $v0, 1
/* D2740 8013C040 03E00008 */  jr        $ra
/* D2744 8013C044 A3020004 */   sb       $v0, 0x4($t8)

### DECOMPILED C INSTRUCTIONS:

void imgfx_mesh_make_strip(ImgFXState* state) {
    s32 offsetY;
    s32 offsetX;
    s32 stepY;
    s32 rightColor;
    s32 leftColor;
    s32 temp2;
    s32 nextY;

    stepY = (128 * 32) / ImgFXCurrentTexturePtr->tex.width;
    if (stepY > ImgFXCurrentTexturePtr->tex.height) {
        stepY = ImgFXCurrentTexturePtr->tex.height;
    }

    offsetX = ImgFXCurrentTexturePtr->tex.xOffset;
    offsetY = ImgFXCurrentTexturePtr->tex.yOffset;
    state->firstVtxIdx = imgfx_vtxCount;

    // create first pair of vertices to begin the strip
    // 'left' side
    imgfx_vtxBuf[imgfx_vtxCount].v.ob[0] = offsetX;
    imgfx_vtxBuf[imgfx_vtxCount].v.ob[1] = offsetY;
    imgfx_vtxBuf[imgfx_vtxCount].v.ob[2] = 0;
    imgfx_vtxBuf[imgfx_vtxCount].v.tc[0] = (0 + 256) * 32;
    imgfx_vtxBuf[imgfx_vtxCount].v.tc[1] = temp2 = (0 + 256) * 32; // required to match
    imgfx_vtxBuf[imgfx_vtxCount].v.cn[0] = 240;
    imgfx_vtxBuf[imgfx_vtxCount].v.cn[1] = 240;
    imgfx_vtxBuf[imgfx_vtxCount].v.cn[2] = 240;
    // 'right' side
    imgfx_vtxBuf[imgfx_vtxCount + 1].v.ob[0] = ImgFXCurrentTexturePtr->tex.width + offsetX;
    imgfx_vtxBuf[imgfx_vtxCount + 1].v.ob[1] = offsetY;
    imgfx_vtxBuf[imgfx_vtxCount + 1].v.ob[2] = 0;
    imgfx_vtxBuf[imgfx_vtxCount + 1].v.tc[0] = (ImgFXCurrentTexturePtr->tex.width + 256) * 32;
    imgfx_vtxBuf[imgfx_vtxCount + 1].v.tc[1] = temp2;
    imgfx_vtxBuf[imgfx_vtxCount + 1].v.cn[0] = 120;
    imgfx_vtxBuf[imgfx_vtxCount + 1].v.cn[1] = 120;
    imgfx_vtxBuf[imgfx_vtxCount + 1].v.cn[2] = 120;

    // create remaining pairs of vertices along the strip
    nextY = stepY;
    while (TRUE) {
        rightColor = (nextY * 120) / ImgFXCurrentTexturePtr->tex.height;
        leftColor = rightColor + 120;
        imgfx_vtxCount += 2;

        // 'left' side
        imgfx_vtxBuf[imgfx_vtxCount].v.ob[0] = offsetX;
        imgfx_vtxBuf[imgfx_vtxCount].v.ob[1] = offsetY - stepY;
        imgfx_vtxBuf[imgfx_vtxCount].v.ob[2] = 0;
        imgfx_vtxBuf[imgfx_vtxCount].v.tc[0] = (0 + 256) * 32;
        imgfx_vtxBuf[imgfx_vtxCount].v.tc[1] = (nextY + 256) * 32;
        imgfx_vtxBuf[imgfx_vtxCount].v.cn[0] = leftColor;
        imgfx_vtxBuf[imgfx_vtxCount].v.cn[1] = leftColor;
        imgfx_vtxBuf[imgfx_vtxCount].v.cn[2] = leftColor;

        // 'right' side
        imgfx_vtxBuf[imgfx_vtxCount + 1].v.ob[0] = ImgFXCurrentTexturePtr->tex.width + offsetX;
        imgfx_vtxBuf[imgfx_vtxCount + 1].v.ob[1] = offsetY - stepY;
        imgfx_vtxBuf[imgfx_vtxCount + 1].v.ob[2] = 0;
        imgfx_vtxBuf[imgfx_vtxCount + 1].v.tc[0] = (ImgFXCurrentTexturePtr->tex.width + 256) * 32;
        imgfx_vtxBuf[imgfx_vtxCount + 1].v.tc[1] = (nextY + 256) * 32;
        imgfx_vtxBuf[imgfx_vtxCount + 1].v.cn[0] = rightColor;
        imgfx_vtxBuf[imgfx_vtxCount + 1].v.cn[1] = rightColor;
        imgfx_vtxBuf[imgfx_vtxCount + 1].v.cn[2] = rightColor;

        if (nextY != ImgFXCurrentTexturePtr->tex.height) {
            offsetY -= stepY;
            if (ImgFXCurrentTexturePtr->tex.height < nextY + stepY) {
                stepY = ImgFXCurrentTexturePtr->tex.height - nextY;
            }
        } else {
            imgfx_vtxCount += 2;
            break;
        }
        nextY += stepY;
    }

    state->lastVtxIdx = imgfx_vtxCount - 1;
    state->subdivX = 1;
    state->subdivY = ((state->lastVtxIdx - state->firstVtxIdx) - 1) / 2;
}


### RAW ASSEMBLY INSTRUCTIONS:

glabel smoke_ring_appendGfx
/* 341D48 E002E368 27BDFEF8 */  addiu     $sp, $sp, -0x108
/* 341D4C E002E36C AFBE0100 */  sw        $fp, 0x100($sp)
/* 341D50 E002E370 0080F02D */  daddu     $fp, $a0, $zero
/* 341D54 E002E374 AFBF0104 */  sw        $ra, 0x104($sp)
/* 341D58 E002E378 AFB700FC */  sw        $s7, 0xFC($sp)
/* 341D5C E002E37C AFB600F8 */  sw        $s6, 0xF8($sp)
/* 341D60 E002E380 AFB500F4 */  sw        $s5, 0xF4($sp)
/* 341D64 E002E384 AFB400F0 */  sw        $s4, 0xF0($sp)
/* 341D68 E002E388 AFB300EC */  sw        $s3, 0xEC($sp)
/* 341D6C E002E38C AFB200E8 */  sw        $s2, 0xE8($sp)
/* 341D70 E002E390 AFB100E4 */  sw        $s1, 0xE4($sp)
/* 341D74 E002E394 AFB000E0 */  sw        $s0, 0xE0($sp)
/* 341D78 E002E398 8FD4000C */  lw        $s4, 0xC($fp)
/* 341D7C E002E39C 8E820040 */  lw        $v0, 0x40($s4)
/* 341D80 E002E3A0 3C170900 */  lui       $s7, %hi(D_09002B40_40FDD0)
/* 341D84 E002E3A4 26F72B40 */  addiu     $s7, $s7, %lo(D_09002B40_40FDD0)
/* 341D88 E002E3A8 30550007 */  andi      $s5, $v0, 0x7
/* 341D8C E002E3AC 30430038 */  andi      $v1, $v0, 0x38
/* 341D90 E002E3B0 0003B080 */  sll       $s6, $v1, 2
/* 341D94 E002E3B4 96830000 */  lhu       $v1, 0x0($s4)
/* 341D98 E002E3B8 30420040 */  andi      $v0, $v0, 0x40
/* 341D9C E002E3BC 10600003 */  beqz      $v1, .LE002E3CC
/* 341DA0 E002E3C0 AFA200D8 */   sw       $v0, 0xD8($sp)
/* 341DA4 E002E3C4 3C170900 */  lui       $s7, %hi(D_09002B60_40FDF0)
/* 341DA8 E002E3C8 26F72B60 */  addiu     $s7, $s7, %lo(D_09002B60_40FDF0)
.LE002E3CC:
/* 341DAC E002E3CC 3C06DB06 */  lui       $a2, (0xDB060024 >> 16)
/* 341DB0 E002E3D0 34C60024 */  ori       $a2, $a2, (0xDB060024 & 0xFFFF)
/* 341DB4 E002E3D4 27A40018 */  addiu     $a0, $sp, 0x18
/* 341DB8 E002E3D8 3C120001 */  lui       $s2, (0x11630 >> 16)
/* 341DBC E002E3DC 3C13800A */  lui       $s3, %hi(gMainGfxPos)
/* 341DC0 E002E3E0 2673A66C */  addiu     $s3, $s3, %lo(gMainGfxPos)
/* 341DC4 E002E3E4 36521630 */  ori       $s2, $s2, (0x11630 & 0xFFFF)
/* 341DC8 E002E3E8 8E630000 */  lw        $v1, 0x0($s3)
/* 341DCC E002E3EC 3C02E700 */  lui       $v0, (0xE7000000 >> 16)
/* 341DD0 E002E3F0 0060282D */  daddu     $a1, $v1, $zero
/* 341DD4 E002E3F4 24630008 */  addiu     $v1, $v1, 0x8
/* 341DD8 E002E3F8 AE630000 */  sw        $v1, 0x0($s3)
/* 341DDC E002E3FC ACA20000 */  sw        $v0, 0x0($a1)
/* 341DE0 E002E400 ACA00004 */  sw        $zero, 0x4($a1)
/* 341DE4 E002E404 AC660000 */  sw        $a2, 0x0($v1)
/* 341DE8 E002E408 8FC50010 */  lw        $a1, 0x10($fp)
/* 341DEC E002E40C 24620008 */  addiu     $v0, $v1, 0x8
/* 341DF0 E002E410 AE620000 */  sw        $v0, 0x0($s3)
/* 341DF4 E002E414 8CA5001C */  lw        $a1, 0x1C($a1)
/* 341DF8 E002E418 3C02DE00 */  lui       $v0, (0xDE000000 >> 16)
/* 341DFC E002E41C AC620008 */  sw        $v0, 0x8($v1)
/* 341E00 E002E420 3C020900 */  lui       $v0, %hi(D_09002950_40FBE0)
/* 341E04 E002E424 24422950 */  addiu     $v0, $v0, %lo(D_09002950_40FBE0)
/* 341E08 E002E428 AC62000C */  sw        $v0, 0xC($v1)
/* 341E0C E002E42C 3C028000 */  lui       $v0, (0x80000000 >> 16)
/* 341E10 E002E430 00A22821 */  addu      $a1, $a1, $v0
/* 341E14 E002E434 AC650004 */  sw        $a1, 0x4($v1)
/* 341E18 E002E438 8E850004 */  lw        $a1, 0x4($s4)
/* 341E1C E002E43C 8E860008 */  lw        $a2, 0x8($s4)
/* 341E20 E002E440 8E87000C */  lw        $a3, 0xC($s4)
/* 341E24 E002E444 24630010 */  addiu     $v1, $v1, 0x10
/* 341E28 E002E448 0C080108 */  jal       shim_guTranslateF
/* 341E2C E002E44C AE630000 */   sw       $v1, 0x0($s3)
/* 341E30 E002E450 27B00058 */  addiu     $s0, $sp, 0x58
/* 341E34 E002E454 3C038007 */  lui       $v1, %hi(gCurrentCameraID)
/* 341E38 E002E458 8C637410 */  lw        $v1, %lo(gCurrentCameraID)($v1)
/* 341E3C E002E45C 44800000 */  mtc1      $zero, $f0
/* 341E40 E002E460 00031080 */  sll       $v0, $v1, 2
/* 341E44 E002E464 00431021 */  addu      $v0, $v0, $v1
/* 341E48 E002E468 00021080 */  sll       $v0, $v0, 2
/* 341E4C E002E46C 00431023 */  subu      $v0, $v0, $v1
/* 341E50 E002E470 000218C0 */  sll       $v1, $v0, 3
/* 341E54 E002E474 00431021 */  addu      $v0, $v0, $v1
/* 341E58 E002E478 000210C0 */  sll       $v0, $v0, 3
/* 341E5C E002E47C 44060000 */  mfc1      $a2, $f0
/* 341E60 E002E480 3C01800B */  lui       $at, %hi(gCameras + 0x6C)
/* 341E64 E002E484 00220821 */  addu      $at, $at, $v0
/* 341E68 E002E488 C4201DEC */  lwc1      $f0, %lo(gCameras + 0x6C)($at)
/* 341E6C E002E48C 3C073F80 */  lui       $a3, (0x3F800000 >> 16)
/* 341E70 E002E490 46000007 */  neg.s     $f0, $f0
/* 341E74 E002E494 44050000 */  mfc1      $a1, $f0
/* 341E78 E002E498 0200202D */  daddu     $a0, $s0, $zero
/* 341E7C E002E49C 0C080104 */  jal       shim_guRotateF
/* 341E80 E002E4A0 AFA60010 */   sw       $a2, 0x10($sp)
/* 341E84 E002E4A4 0200202D */  daddu     $a0, $s0, $zero
/* 341E88 E002E4A8 27A50018 */  addiu     $a1, $sp, 0x18
/* 341E8C E002E4AC 27B00098 */  addiu     $s0, $sp, 0x98
/* 341E90 E002E4B0 0C080114 */  jal       shim_guMtxCatF
/* 341E94 E002E4B4 0200302D */   daddu    $a2, $s0, $zero
/* 341E98 E002E4B8 0200202D */  daddu     $a0, $s0, $zero
/* 341E9C E002E4BC 3C108007 */  lui       $s0, %hi(gMatrixListPos)
/* 341EA0 E002E4C0 261041F0 */  addiu     $s0, $s0, %lo(gMatrixListPos)
/* 341EA4 E002E4C4 3C11800A */  lui       $s1, %hi(gDisplayContext)
/* 341EA8 E002E4C8 2631A674 */  addiu     $s1, $s1, %lo(gDisplayContext)
/* 341EAC E002E4CC 96050000 */  lhu       $a1, 0x0($s0)
/* 341EB0 E002E4D0 8E220000 */  lw        $v0, 0x0($s1)
/* 341EB4 E002E4D4 00052980 */  sll       $a1, $a1, 6
/* 341EB8 E002E4D8 00B22821 */  addu      $a1, $a1, $s2
/* 341EBC E002E4DC 0C080118 */  jal       shim_guMtxF2L
/* 341EC0 E002E4E0 00452821 */   addu     $a1, $v0, $a1
/* 341EC4 E002E4E4 3C05EEDC */  lui       $a1, (0xEEDCD7A0 >> 16)
/* 341EC8 E002E4E8 8E660000 */  lw        $a2, 0x0($s3)
/* 341ECC E002E4EC 34A5D7A0 */  ori       $a1, $a1, (0xEEDCD7A0 & 0xFFFF)
/* 341ED0 E002E4F0 00C0202D */  daddu     $a0, $a2, $zero
/* 341ED4 E002E4F4 24C60008 */  addiu     $a2, $a2, 0x8
/* 341ED8 E002E4F8 AE660000 */  sw        $a2, 0x0($s3)
/* 341EDC E002E4FC 96020000 */  lhu       $v0, 0x0($s0)
/* 341EE0 E002E500 3C03DA38 */  lui       $v1, (0xDA380000 >> 16)
/* 341EE4 E002E504 AC830000 */  sw        $v1, 0x0($a0)
/* 341EE8 E002E508 24430001 */  addiu     $v1, $v0, 0x1
/* 341EEC E002E50C 3042FFFF */  andi      $v0, $v0, 0xFFFF
/* 341EF0 E002E510 00021180 */  sll       $v0, $v0, 6
/* 341EF4 E002E514 A6030000 */  sh        $v1, 0x0($s0)
/* 341EF8 E002E518 8E230000 */  lw        $v1, 0x0($s1)
/* 341EFC E002E51C 00521021 */  addu      $v0, $v0, $s2
/* 341F00 E002E520 00621821 */  addu      $v1, $v1, $v0
/* 341F04 E002E524 24C20008 */  addiu     $v0, $a2, 0x8
/* 341F08 E002E528 AC830004 */  sw        $v1, 0x4($a0)
/* 341F0C E002E52C AE620000 */  sw        $v0, 0x0($s3)
/* 341F10 E002E530 3C02FA00 */  lui       $v0, (0xFA000000 >> 16)
/* 341F14 E002E534 ACC20000 */  sw        $v0, 0x0($a2)
/* 341F18 E002E538 24C20010 */  addiu     $v0, $a2, 0x10
/* 341F1C E002E53C ACC50004 */  sw        $a1, 0x4($a2)
/* 341F20 E002E540 AE620000 */  sw        $v0, 0x0($s3)
/* 341F24 E002E544 3C02FB00 */  lui       $v0, (0xFB000000 >> 16)
/* 341F28 E002E548 ACC20008 */  sw        $v0, 0x8($a2)
/* 341F2C E002E54C 24C20018 */  addiu     $v0, $a2, 0x18
/* 341F30 E002E550 ACD6000C */  sw        $s6, 0xC($a2)
/* 341F34 E002E554 AE620000 */  sw        $v0, 0x0($s3)
/* 341F38 E002E558 001514C0 */  sll       $v0, $s5, 19
/* 341F3C E002E55C 3C04F200 */  lui       $a0, (0xF2000080 >> 16)
/* 341F40 E002E560 00441025 */  or        $v0, $v0, $a0
/* 341F44 E002E564 00152940 */  sll       $a1, $s5, 5
/* 341F48 E002E568 ACC20010 */  sw        $v0, 0x10($a2)
/* 341F4C E002E56C 24A2001F */  addiu     $v0, $a1, 0x1F
/* 341F50 E002E570 00021380 */  sll       $v0, $v0, 14
/* 341F54 E002E574 3442007C */  ori       $v0, $v0, 0x7C
/* 341F58 E002E578 ACC20014 */  sw        $v0, 0x14($a2)
/* 341F5C E002E57C 8FA800D8 */  lw        $t0, 0xD8($sp)
/* 341F60 E002E580 1100000E */  beqz      $t0, .LE002E5BC
/* 341F64 E002E584 24A70020 */   addiu    $a3, $a1, 0x20
/* 341F68 E002E588 0080182D */  daddu     $v1, $a0, $zero
/* 341F6C E002E58C 34630080 */  ori       $v1, $v1, (0xF2000080 & 0xFFFF)
/* 341F70 E002E590 3C040100 */  lui       $a0, (0x10000FC >> 16)
/* 341F74 E002E594 348400FC */  ori       $a0, $a0, (0x10000FC & 0xFFFF)
/* 341F78 E002E598 24C20020 */  addiu     $v0, $a2, 0x20
/* 341F7C E002E59C AE620000 */  sw        $v0, 0x0($s3)
/* 341F80 E002E5A0 00071380 */  sll       $v0, $a3, 14
/* 341F84 E002E5A4 00431025 */  or        $v0, $v0, $v1
/* 341F88 E002E5A8 ACC20018 */  sw        $v0, 0x18($a2)
/* 341F8C E002E5AC 24A2003F */  addiu     $v0, $a1, 0x3F
/* 341F90 E002E5B0 00021380 */  sll       $v0, $v0, 14
/* 341F94 E002E5B4 0800B979 */  j         .LE002E5E4
/* 341F98 E002E5B8 00441025 */   or       $v0, $v0, $a0
.LE002E5BC:
/* 341F9C E002E5BC 3C030100 */  lui       $v1, (0x100007C >> 16)
/* 341FA0 E002E5C0 3463007C */  ori       $v1, $v1, (0x100007C & 0xFFFF)
/* 341FA4 E002E5C4 24C20020 */  addiu     $v0, $a2, 0x20
/* 341FA8 E002E5C8 AE620000 */  sw        $v0, 0x0($s3)
/* 341FAC E002E5CC 00071380 */  sll       $v0, $a3, 14
/* 341FB0 E002E5D0 00441025 */  or        $v0, $v0, $a0
/* 341FB4 E002E5D4 ACC20018 */  sw        $v0, 0x18($a2)
/* 341FB8 E002E5D8 24A2003F */  addiu     $v0, $a1, 0x3F
/* 341FBC E002E5DC 00021380 */  sll       $v0, $v0, 14
/* 341FC0 E002E5E0 00431025 */  or        $v0, $v0, $v1
.LE002E5E4:
/* 341FC4 E002E5E4 ACC2001C */  sw        $v0, 0x1C($a2)
/* 341FC8 E002E5E8 8FC20008 */  lw        $v0, 0x8($fp)
/* 341FCC E002E5EC 24110001 */  addiu     $s1, $zero, 0x1
/* 341FD0 E002E5F0 0222102A */  slt       $v0, $s1, $v0
/* 341FD4 E002E5F4 10400036 */  beqz      $v0, .LE002E6D0
/* 341FD8 E002E5F8 26940044 */   addiu    $s4, $s4, 0x44
/* 341FDC E002E5FC 3C16800A */  lui       $s6, %hi(gDisplayContext)
/* 341FE0 E002E600 26D6A674 */  addiu     $s6, $s6, %lo(gDisplayContext)
/* 341FE4 E002E604 3C158007 */  lui       $s5, %hi(gMatrixListPos)
/* 341FE8 E002E608 26B541F0 */  addiu     $s5, $s5, %lo(gMatrixListPos)
/* 341FEC E002E60C 3C130001 */  lui       $s3, (0x11630 >> 16)
/* 341FF0 E002E610 36731630 */  ori       $s3, $s3, (0x11630 & 0xFFFF)
/* 341FF4 E002E614 3C12800A */  lui       $s2, %hi(gMainGfxPos)
/* 341FF8 E002E618 2652A66C */  addiu     $s2, $s2, %lo(gMainGfxPos)
/* 341FFC E002E61C 2690000C */  addiu     $s0, $s4, 0xC
.LE002E620:
/* 342000 E002E620 27A40018 */  addiu     $a0, $sp, 0x18
/* 342004 E002E624 26310001 */  addiu     $s1, $s1, 0x1
/* 342008 E002E628 8E05FFF8 */  lw        $a1, -0x8($s0)
/* 34200C E002E62C 8E06FFFC */  lw        $a2, -0x4($s0)
/* 342010 E002E630 8E070000 */  lw        $a3, 0x0($s0)
/* 342014 E002E634 0C080108 */  jal       shim_guTranslateF
/* 342018 E002E638 26100044 */   addiu    $s0, $s0, 0x44
/* 34201C E002E63C 27A40018 */  addiu     $a0, $sp, 0x18
/* 342020 E002E640 96A50000 */  lhu       $a1, 0x0($s5)
/* 342024 E002E644 8EC20000 */  lw        $v0, 0x0($s6)
/* 342028 E002E648 00052980 */  sll       $a1, $a1, 6
/* 34202C E002E64C 00B32821 */  addu      $a1, $a1, $s3
/* 342030 E002E650 0C080118 */  jal       shim_guMtxF2L
/* 342034 E002E654 00452821 */   addu     $a1, $v0, $a1
/* 342038 E002E658 3C06D838 */  lui       $a2, (0xD8380002 >> 16)
/* 34203C E002E65C 8E440000 */  lw        $a0, 0x0($s2)
/* 342040 E002E660 34C60002 */  ori       $a2, $a2, (0xD8380002 & 0xFFFF)
/* 342044 E002E664 0080282D */  daddu     $a1, $a0, $zero
/* 342048 E002E668 24840008 */  addiu     $a0, $a0, 0x8
/* 34204C E002E66C AE440000 */  sw        $a0, 0x0($s2)
/* 342050 E002E670 96A20000 */  lhu       $v0, 0x0($s5)
/* 342054 E002E674 3C03DA38 */  lui       $v1, (0xDA380000 >> 16)
/* 342058 E002E678 ACA30000 */  sw        $v1, 0x0($a1)
/* 34205C E002E67C 24430001 */  addiu     $v1, $v0, 0x1
/* 342060 E002E680 3042FFFF */  andi      $v0, $v0, 0xFFFF
/* 342064 E002E684 00021180 */  sll       $v0, $v0, 6
/* 342068 E002E688 A6A30000 */  sh        $v1, 0x0($s5)
/* 34206C E002E68C 8EC30000 */  lw        $v1, 0x0($s6)
/* 342070 E002E690 00531021 */  addu      $v0, $v0, $s3
/* 342074 E002E694 00621821 */  addu      $v1, $v1, $v0
/* 342078 E002E698 24820008 */  addiu     $v0, $a0, 0x8
/* 34207C E002E69C ACA30004 */  sw        $v1, 0x4($a1)
/* 342080 E002E6A0 AE420000 */  sw        $v0, 0x0($s2)
/* 342084 E002E6A4 3C02DE00 */  lui       $v0, (0xDE000000 >> 16)
/* 342088 E002E6A8 AC820000 */  sw        $v0, 0x0($a0)
/* 34208C E002E6AC 24020040 */  addiu     $v0, $zero, 0x40
/* 342090 E002E6B0 AC970004 */  sw        $s7, 0x4($a0)
/* 342094 E002E6B4 AC860008 */  sw        $a2, 0x8($a0)
/* 342098 E002E6B8 AC82000C */  sw        $v0, 0xC($a0)
/* 34209C E002E6BC 8FC20008 */  lw        $v0, 0x8($fp)
/* 3420A0 E002E6C0 24840010 */  addiu     $a0, $a0, 0x10
/* 3420A4 E002E6C4 0222102A */  slt       $v0, $s1, $v0
/* 3420A8 E002E6C8 1440FFD5 */  bnez      $v0, .LE002E620
/* 3420AC E002E6CC AE440000 */   sw       $a0, 0x0($s2)
.LE002E6D0:
/* 3420B0 E002E6D0 3C03D838 */  lui       $v1, (0xD8380002 >> 16)
/* 3420B4 E002E6D4 3C04800A */  lui       $a0, %hi(gMainGfxPos)
/* 3420B8 E002E6D8 2484A66C */  addiu     $a0, $a0, %lo(gMainGfxPos)
/* 3420BC E002E6DC 8C820000 */  lw        $v0, 0x0($a0)
/* 3420C0 E002E6E0 34630002 */  ori       $v1, $v1, (0xD8380002 & 0xFFFF)
/* 3420C4 E002E6E4 0040282D */  daddu     $a1, $v0, $zero
/* 3420C8 E002E6E8 24420008 */  addiu     $v0, $v0, 0x8
/* 3420CC E002E6EC AC820000 */  sw        $v0, 0x0($a0)
/* 3420D0 E002E6F0 ACA30000 */  sw        $v1, 0x0($a1)
/* 3420D4 E002E6F4 24030040 */  addiu     $v1, $zero, 0x40
/* 3420D8 E002E6F8 ACA30004 */  sw        $v1, 0x4($a1)
/* 3420DC E002E6FC 24430008 */  addiu     $v1, $v0, 0x8
/* 3420E0 E002E700 AC830000 */  sw        $v1, 0x0($a0)
/* 3420E4 E002E704 3C03E700 */  lui       $v1, (0xE7000000 >> 16)
/* 3420E8 E002E708 AC430000 */  sw        $v1, 0x0($v0)
/* 3420EC E002E70C AC400004 */  sw        $zero, 0x4($v0)
/* 3420F0 E002E710 8FBF0104 */  lw        $ra, 0x104($sp)
/* 3420F4 E002E714 8FBE0100 */  lw        $fp, 0x100($sp)
/* 3420F8 E002E718 8FB700FC */  lw        $s7, 0xFC($sp)
/* 3420FC E002E71C 8FB600F8 */  lw        $s6, 0xF8($sp)
/* 342100 E002E720 8FB500F4 */  lw        $s5, 0xF4($sp)
/* 342104 E002E724 8FB400F0 */  lw        $s4, 0xF0($sp)
/* 342108 E002E728 8FB300EC */  lw        $s3, 0xEC($sp)
/* 34210C E002E72C 8FB200E8 */  lw        $s2, 0xE8($sp)
/* 342110 E002E730 8FB100E4 */  lw        $s1, 0xE4($sp)
/* 342114 E002E734 8FB000E0 */  lw        $s0, 0xE0($sp)
/* 342118 E002E738 03E00008 */  jr        $ra
/* 34211C E002E73C 27BD0108 */   addiu    $sp, $sp, 0x108

### DECOMPILED C INSTRUCTIONS:

void smoke_ring_appendGfx(void* effect) {
    SmokeRingFXData* part = ((EffectInstance*)effect)->data.smokeRing;
    s32 temp_s5 = part->unk_40 & 7;
    s32 envAlpha = (part->unk_40 & 0x38) * 4;
    s32 spD8 = part->unk_40 & 0x40;
    s32 temp_a3;
    Gfx* dlist;
    Matrix4f sp18;
    Matrix4f sp58;
    Matrix4f sp98;
    s32 i;

    if (part->unk_00 != 0) {
        dlist = D_09002B60_32BA00;
    } else {
        dlist = D_09002B40_32B9E0;
    }

    gDPPipeSync(gMainGfxPos++);
    gSPSegment(gMainGfxPos++, 0x09, VIRTUAL_TO_PHYSICAL(((EffectInstance*)effect)->graphics->data));
    gSPDisplayList(gMainGfxPos++, D_09002950_32B7F0);

    shim_guTranslateF(sp18, part->unk_04, part->unk_08, part->unk_0C);
    shim_guRotateF(sp58, -gCameras[gCurrentCameraID].currentYaw, 0.0f, 1.0f, 0.0f);
    shim_guMtxCatF(sp58, sp18, sp98);
    shim_guMtxF2L(sp98, &gDisplayContext->matrixStack[gMatrixListPos]);

    gSPMatrix(gMainGfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++], G_MTX_PUSH | G_MTX_MUL | G_MTX_MODELVIEW);
    gDPSetPrimColor(gMainGfxPos++, 0, 0, 238, 220, 215, 160);
    gDPSetEnvColor(gMainGfxPos++, 0, 0, 0, envAlpha);
    gDPSetTileSize(gMainGfxPos++, G_TX_RENDERTILE,
        (temp_s5 * 32       ) * 4, 0,
        (temp_s5 * 32 + 0x1F) * 4, 31 * 4);

    temp_a3 = temp_s5 * 32 + 32;

    if (spD8 != 0) {
        gDPSetTileSize(gMainGfxPos++, 1,
            (temp_a3     ) * 4, 32 * 4,
            (temp_a3 + 31) * 4, 63 * 4);
    } else {
        gDPSetTileSize(gMainGfxPos++, 1,
            (temp_a3     ) * 4, 0,
            (temp_a3 + 31) * 4, 31 * 4);
    }

    part++;
    for (i = 1; i < ((EffectInstance*)effect)->numParts; i++, part++) {
        shim_guTranslateF(sp18, part->unk_04, part->unk_08, part->unk_0C);
        shim_guMtxF2L(sp18, &gDisplayContext->matrixStack[gMatrixListPos]);

        gSPMatrix(gMainGfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++], G_MTX_PUSH | G_MTX_MUL | G_MTX_MODELVIEW);
        gSPDisplayList(gMainGfxPos++, dlist);
        gSPPopMatrix(gMainGfxPos++, G_MTX_MODELVIEW);
    }

    gSPPopMatrix(gMainGfxPos++, G_MTX_MODELVIEW);
    gDPPipeSync(gMainGfxPos++);
}


### RAW ASSEMBLY INSTRUCTIONS:

glabel small_gold_sparkle_appendGfx
/* 391FD0 E00922A0 44800000 */  mtc1      $zero, $f0
/* 391FD4 E00922A4 27BDFEE8 */  addiu     $sp, $sp, -0x118
/* 391FD8 E00922A8 AFB000E0 */  sw        $s0, 0xE0($sp)
/* 391FDC E00922AC 27B00098 */  addiu     $s0, $sp, 0x98
/* 391FE0 E00922B0 AFA40118 */  sw        $a0, 0x118($sp)
/* 391FE4 E00922B4 8FA90118 */  lw        $t1, 0x118($sp)
/* 391FE8 E00922B8 0200202D */  daddu     $a0, $s0, $zero
/* 391FEC E00922BC AFB100E4 */  sw        $s1, 0xE4($sp)
/* 391FF0 E00922C0 3C110001 */  lui       $s1, (0x11630 >> 16)
/* 391FF4 E00922C4 F7B40108 */  sdc1      $f20, 0x108($sp)
/* 391FF8 E00922C8 3C013F80 */  lui       $at, (0x3F800000 >> 16)
/* 391FFC E00922CC 4481A000 */  mtc1      $at, $f20
/* 392000 E00922D0 3C038007 */  lui       $v1, %hi(gCurrentCameraID)
/* 392004 E00922D4 8C637410 */  lw        $v1, %lo(gCurrentCameraID)($v1)
/* 392008 E00922D8 36311630 */  ori       $s1, $s1, (0x11630 & 0xFFFF)
/* 39200C E00922DC AFBF0104 */  sw        $ra, 0x104($sp)
/* 392010 E00922E0 AFBE0100 */  sw        $fp, 0x100($sp)
/* 392014 E00922E4 AFB700FC */  sw        $s7, 0xFC($sp)
/* 392018 E00922E8 AFB600F8 */  sw        $s6, 0xF8($sp)
/* 39201C E00922EC AFB500F4 */  sw        $s5, 0xF4($sp)
/* 392020 E00922F0 AFB400F0 */  sw        $s4, 0xF0($sp)
/* 392024 E00922F4 AFB300EC */  sw        $s3, 0xEC($sp)
/* 392028 E00922F8 AFB200E8 */  sw        $s2, 0xE8($sp)
/* 39202C E00922FC F7B60110 */  sdc1      $f22, 0x110($sp)
/* 392030 E0092300 00031080 */  sll       $v0, $v1, 2
/* 392034 E0092304 00431021 */  addu      $v0, $v0, $v1
/* 392038 E0092308 00021080 */  sll       $v0, $v0, 2
/* 39203C E009230C 00431023 */  subu      $v0, $v0, $v1
/* 392040 E0092310 000218C0 */  sll       $v1, $v0, 3
/* 392044 E0092314 00431021 */  addu      $v0, $v0, $v1
/* 392048 E0092318 000210C0 */  sll       $v0, $v0, 3
/* 39204C E009231C 8D34000C */  lw        $s4, 0xC($t1)
/* 392050 E0092320 44060000 */  mfc1      $a2, $f0
/* 392054 E0092324 3C01800B */  lui       $at, %hi(gCameras + 0x6C)
/* 392058 E0092328 00220821 */  addu      $at, $at, $v0
/* 39205C E009232C C4201DEC */  lwc1      $f0, %lo(gCameras + 0x6C)($at)
/* 392060 E0092330 4407A000 */  mfc1      $a3, $f20
/* 392064 E0092334 46000007 */  neg.s     $f0, $f0
/* 392068 E0092338 44050000 */  mfc1      $a1, $f0
/* 39206C E009233C 24130001 */  addiu     $s3, $zero, 0x1
/* 392070 E0092340 0C080104 */  jal       shim_guRotateF
/* 392074 E0092344 AFA60010 */   sw       $a2, 0x10($sp)
/* 392078 E0092348 0200202D */  daddu     $a0, $s0, $zero
/* 39207C E009234C 3C128007 */  lui       $s2, %hi(gMatrixListPos)
/* 392080 E0092350 265241F0 */  addiu     $s2, $s2, %lo(gMatrixListPos)
/* 392084 E0092354 3C16800A */  lui       $s6, %hi(gDisplayContext)
/* 392088 E0092358 26D6A674 */  addiu     $s6, $s6, %lo(gDisplayContext)
/* 39208C E009235C 96450000 */  lhu       $a1, 0x0($s2)
/* 392090 E0092360 8EC20000 */  lw        $v0, 0x0($s6)
/* 392094 E0092364 00052980 */  sll       $a1, $a1, 6
/* 392098 E0092368 00B12821 */  addu      $a1, $a1, $s1
/* 39209C E009236C 0C080118 */  jal       shim_guMtxF2L
/* 3920A0 E0092370 00452821 */   addu     $a1, $v0, $a1
/* 3920A4 E0092374 3C06DB06 */  lui       $a2, (0xDB060024 >> 16)
/* 3920A8 E0092378 34C60024 */  ori       $a2, $a2, (0xDB060024 & 0xFFFF)
/* 3920AC E009237C 3C10800A */  lui       $s0, %hi(gMainGfxPos)
/* 3920B0 E0092380 2610A66C */  addiu     $s0, $s0, %lo(gMainGfxPos)
/* 3920B4 E0092384 27A40018 */  addiu     $a0, $sp, 0x18
/* 3920B8 E0092388 8E050000 */  lw        $a1, 0x0($s0)
/* 3920BC E009238C 96480000 */  lhu       $t0, 0x0($s2)
/* 3920C0 E0092390 00A0182D */  daddu     $v1, $a1, $zero
/* 3920C4 E0092394 24A50008 */  addiu     $a1, $a1, 0x8
/* 3920C8 E0092398 01131021 */  addu      $v0, $t0, $s3
/* 3920CC E009239C A6420000 */  sh        $v0, 0x0($s2)
/* 3920D0 E00923A0 3C02E700 */  lui       $v0, (0xE7000000 >> 16)
/* 3920D4 E00923A4 AE050000 */  sw        $a1, 0x0($s0)
/* 3920D8 E00923A8 AC620000 */  sw        $v0, 0x0($v1)
/* 3920DC E00923AC 24A20008 */  addiu     $v0, $a1, 0x8
/* 3920E0 E00923B0 3108FFFF */  andi      $t0, $t0, 0xFFFF
/* 3920E4 E00923B4 AC600004 */  sw        $zero, 0x4($v1)
/* 3920E8 E00923B8 ACA60000 */  sw        $a2, 0x0($a1)
/* 3920EC E00923BC 8FA90118 */  lw        $t1, 0x118($sp)
/* 3920F0 E00923C0 00084180 */  sll       $t0, $t0, 6
/* 3920F4 E00923C4 8D230010 */  lw        $v1, 0x10($t1)
/* 3920F8 E00923C8 01114021 */  addu      $t0, $t0, $s1
/* 3920FC E00923CC AE020000 */  sw        $v0, 0x0($s0)
/* 392100 E00923D0 8C62001C */  lw        $v0, 0x1C($v1)
/* 392104 E00923D4 3C038000 */  lui       $v1, (0x80000000 >> 16)
/* 392108 E00923D8 00431021 */  addu      $v0, $v0, $v1
/* 39210C E00923DC ACA20004 */  sw        $v0, 0x4($a1)
/* 392110 E00923E0 8E850008 */  lw        $a1, 0x8($s4)
/* 392114 E00923E4 8E86000C */  lw        $a2, 0xC($s4)
/* 392118 E00923E8 8EC20000 */  lw        $v0, 0x0($s6)
/* 39211C E00923EC 8E870010 */  lw        $a3, 0x10($s4)
/* 392120 E00923F0 00481021 */  addu      $v0, $v0, $t0
/* 392124 E00923F4 0C080108 */  jal       shim_guTranslateF
/* 392128 E00923F8 AFA200D8 */   sw       $v0, 0xD8($sp)
/* 39212C E00923FC 27A40018 */  addiu     $a0, $sp, 0x18
/* 392130 E0092400 96450000 */  lhu       $a1, 0x0($s2)
/* 392134 E0092404 8EC20000 */  lw        $v0, 0x0($s6)
/* 392138 E0092408 00052980 */  sll       $a1, $a1, 6
/* 39213C E009240C 00B12821 */  addu      $a1, $a1, $s1
/* 392140 E0092410 0C080118 */  jal       shim_guMtxF2L
/* 392144 E0092414 00452821 */   addu     $a1, $v0, $a1
/* 392148 E0092418 3C03DA38 */  lui       $v1, (0xDA380002 >> 16)
/* 39214C E009241C 34630002 */  ori       $v1, $v1, (0xDA380002 & 0xFFFF)
/* 392150 E0092420 3C06FFFF */  lui       $a2, (0xFFFF0FFF >> 16)
/* 392154 E0092424 34C60FFF */  ori       $a2, $a2, (0xFFFF0FFF & 0xFFFF)
/* 392158 E0092428 8E040000 */  lw        $a0, 0x0($s0)
/* 39215C E009242C 96420000 */  lhu       $v0, 0x0($s2)
/* 392160 E0092430 0080282D */  daddu     $a1, $a0, $zero
/* 392164 E0092434 24840008 */  addiu     $a0, $a0, 0x8
/* 392168 E0092438 AE040000 */  sw        $a0, 0x0($s0)
/* 39216C E009243C ACA30000 */  sw        $v1, 0x0($a1)
/* 392170 E0092440 00531821 */  addu      $v1, $v0, $s3
/* 392174 E0092444 3042FFFF */  andi      $v0, $v0, 0xFFFF
/* 392178 E0092448 00021180 */  sll       $v0, $v0, 6
/* 39217C E009244C A6430000 */  sh        $v1, 0x0($s2)
/* 392180 E0092450 8EC30000 */  lw        $v1, 0x0($s6)
/* 392184 E0092454 00511021 */  addu      $v0, $v0, $s1
/* 392188 E0092458 00621821 */  addu      $v1, $v1, $v0
/* 39218C E009245C 24820008 */  addiu     $v0, $a0, 0x8
/* 392190 E0092460 ACA30004 */  sw        $v1, 0x4($a1)
/* 392194 E0092464 AE020000 */  sw        $v0, 0x0($s0)
/* 392198 E0092468 3C02DE00 */  lui       $v0, (0xDE000000 >> 16)
/* 39219C E009246C AC820000 */  sw        $v0, 0x0($a0)
/* 3921A0 E0092470 3C020900 */  lui       $v0, %hi(D_090002C0_415320)
/* 3921A4 E0092474 244202C0 */  addiu     $v0, $v0, %lo(D_090002C0_415320)
/* 3921A8 E0092478 AC820004 */  sw        $v0, 0x4($a0)
/* 3921AC E009247C 3C02FA00 */  lui       $v0, (0xFA000000 >> 16)
/* 3921B0 E0092480 AC820008 */  sw        $v0, 0x8($a0)
/* 3921B4 E0092484 AC86000C */  sw        $a2, 0xC($a0)
/* 3921B8 E0092488 8FA90118 */  lw        $t1, 0x118($sp)
/* 3921BC E009248C 26940024 */  addiu     $s4, $s4, 0x24
/* 3921C0 E0092490 8D220008 */  lw        $v0, 0x8($t1)
/* 3921C4 E0092494 24840010 */  addiu     $a0, $a0, 0x10
/* 3921C8 E0092498 0262102A */  slt       $v0, $s3, $v0
/* 3921CC E009249C 1040005B */  beqz      $v0, .LE009260C
/* 3921D0 E00924A0 AE040000 */   sw       $a0, 0x0($s0)
/* 3921D4 E00924A4 4600A586 */  mov.s     $f22, $f20
/* 3921D8 E00924A8 27B50058 */  addiu     $s5, $sp, 0x58
/* 3921DC E00924AC 02C0F02D */  daddu     $fp, $s6, $zero
/* 3921E0 E00924B0 0240B02D */  daddu     $s6, $s2, $zero
/* 3921E4 E00924B4 3C120001 */  lui       $s2, (0x11630 >> 16)
/* 3921E8 E00924B8 36521630 */  ori       $s2, $s2, (0x11630 & 0xFFFF)
/* 3921EC E00924BC 0200882D */  daddu     $s1, $s0, $zero
/* 3921F0 E00924C0 3C17DE00 */  lui       $s7, (0xDE000000 >> 16)
/* 3921F4 E00924C4 26900004 */  addiu     $s0, $s4, 0x4
.LE00924C8:
/* 3921F8 E00924C8 8E02001C */  lw        $v0, 0x1C($s0)
/* 3921FC E00924CC 14400049 */  bnez      $v0, .LE00925F4
/* 392200 E00924D0 00000000 */   nop
/* 392204 E00924D4 8E050004 */  lw        $a1, 0x4($s0)
/* 392208 E00924D8 8E060008 */  lw        $a2, 0x8($s0)
/* 39220C E00924DC 8E07000C */  lw        $a3, 0xC($s0)
/* 392210 E00924E0 C6140018 */  lwc1      $f20, 0x18($s0)
/* 392214 E00924E4 0C080108 */  jal       shim_guTranslateF
/* 392218 E00924E8 27A40018 */   addiu    $a0, $sp, 0x18
/* 39221C E00924EC 4616A032 */  c.eq.s    $f20, $f22
/* 392220 E00924F0 00000000 */  nop
/* 392224 E00924F4 4501000B */  bc1t      .LE0092524
/* 392228 E00924F8 27A40018 */   addiu    $a0, $sp, 0x18
/* 39222C E00924FC 02A0202D */  daddu     $a0, $s5, $zero
/* 392230 E0092500 4405A000 */  mfc1      $a1, $f20
/* 392234 E0092504 4407B000 */  mfc1      $a3, $f22
/* 392238 E0092508 0C080110 */  jal       shim_guScaleF
/* 39223C E009250C 00A0302D */   daddu    $a2, $a1, $zero
/* 392240 E0092510 02A0202D */  daddu     $a0, $s5, $zero
/* 392244 E0092514 27A50018 */  addiu     $a1, $sp, 0x18
/* 392248 E0092518 0C080114 */  jal       shim_guMtxCatF
/* 39224C E009251C 00A0302D */   daddu    $a2, $a1, $zero
/* 392250 E0092520 27A40018 */  addiu     $a0, $sp, 0x18
.LE0092524:
/* 392254 E0092524 96C50000 */  lhu       $a1, 0x0($s6)
/* 392258 E0092528 8FC20000 */  lw        $v0, 0x0($fp)
/* 39225C E009252C 00052980 */  sll       $a1, $a1, 6
/* 392260 E0092530 00B22821 */  addu      $a1, $a1, $s2
/* 392264 E0092534 0C080118 */  jal       shim_guMtxF2L
/* 392268 E0092538 00452821 */   addu     $a1, $v0, $a1
/* 39226C E009253C 3C06DA38 */  lui       $a2, (0xDA380001 >> 16)
/* 392270 E0092540 34C60001 */  ori       $a2, $a2, (0xDA380001 & 0xFFFF)
/* 392274 E0092544 3C07D838 */  lui       $a3, (0xD8380002 >> 16)
/* 392278 E0092548 8E240000 */  lw        $a0, 0x0($s1)
/* 39227C E009254C 34E70002 */  ori       $a3, $a3, (0xD8380002 & 0xFFFF)
/* 392280 E0092550 0080282D */  daddu     $a1, $a0, $zero
/* 392284 E0092554 24840008 */  addiu     $a0, $a0, 0x8
/* 392288 E0092558 AE240000 */  sw        $a0, 0x0($s1)
/* 39228C E009255C 96C20000 */  lhu       $v0, 0x0($s6)
/* 392290 E0092560 3C03DA38 */  lui       $v1, (0xDA380000 >> 16)
/* 392294 E0092564 ACA30000 */  sw        $v1, 0x0($a1)
/* 392298 E0092568 24430001 */  addiu     $v1, $v0, 0x1
/* 39229C E009256C 3042FFFF */  andi      $v0, $v0, 0xFFFF
/* 3922A0 E0092570 00021180 */  sll       $v0, $v0, 6
/* 3922A4 E0092574 A6C30000 */  sh        $v1, 0x0($s6)
/* 3922A8 E0092578 8FC30000 */  lw        $v1, 0x0($fp)
/* 3922AC E009257C 00521021 */  addu      $v0, $v0, $s2
/* 3922B0 E0092580 00621821 */  addu      $v1, $v1, $v0
/* 3922B4 E0092584 24820008 */  addiu     $v0, $a0, 0x8
/* 3922B8 E0092588 ACA30004 */  sw        $v1, 0x4($a1)
/* 3922BC E009258C AE220000 */  sw        $v0, 0x0($s1)
/* 3922C0 E0092590 24820010 */  addiu     $v0, $a0, 0x10
/* 3922C4 E0092594 AC860000 */  sw        $a2, 0x0($a0)
/* 3922C8 E0092598 8FA900D8 */  lw        $t1, 0xD8($sp)
/* 3922CC E009259C 24830018 */  addiu     $v1, $a0, 0x18
/* 3922D0 E00925A0 AC890004 */  sw        $t1, 0x4($a0)
/* 3922D4 E00925A4 AE220000 */  sw        $v0, 0x0($s1)
/* 3922D8 E00925A8 AC970008 */  sw        $s7, 0x8($a0)
/* 3922DC E00925AC 8E020000 */  lw        $v0, 0x0($s0)
/* 3922E0 E00925B0 3C09E009 */  lui       $t1, %hi(D_E0092690)
/* 3922E4 E00925B4 25292690 */  addiu     $t1, $t1, %lo(D_E0092690)
/* 3922E8 E00925B8 AE230000 */  sw        $v1, 0x0($s1)
/* 3922EC E00925BC 00021043 */  sra       $v0, $v0, 1
/* 3922F0 E00925C0 00021080 */  sll       $v0, $v0, 2
/* 3922F4 E00925C4 00491021 */  addu      $v0, $v0, $t1
/* 3922F8 E00925C8 8C430000 */  lw        $v1, 0x0($v0)
/* 3922FC E00925CC 24820020 */  addiu     $v0, $a0, 0x20
/* 392300 E00925D0 AE220000 */  sw        $v0, 0x0($s1)
/* 392304 E00925D4 3C020900 */  lui       $v0, %hi(D_09000470_4154D0)
/* 392308 E00925D8 24420470 */  addiu     $v0, $v0, %lo(D_09000470_4154D0)
/* 39230C E00925DC AC820014 */  sw        $v0, 0x14($a0)
/* 392310 E00925E0 24020040 */  addiu     $v0, $zero, 0x40
/* 392314 E00925E4 AC970010 */  sw        $s7, 0x10($a0)
/* 392318 E00925E8 AC870018 */  sw        $a3, 0x18($a0)
/* 39231C E00925EC AC82001C */  sw        $v0, 0x1C($a0)
/* 392320 E00925F0 AC83000C */  sw        $v1, 0xC($a0)
.LE00925F4:
/* 392324 E00925F4 8FA90118 */  lw        $t1, 0x118($sp)
/* 392328 E00925F8 26730001 */  addiu     $s3, $s3, 0x1
/* 39232C E00925FC 8D220008 */  lw        $v0, 0x8($t1)
/* 392330 E0092600 0262102A */  slt       $v0, $s3, $v0
/* 392334 E0092604 1440FFB0 */  bnez      $v0, .LE00924C8
/* 392338 E0092608 26100024 */   addiu    $s0, $s0, 0x24
.LE009260C:
/* 39233C E009260C 3C03D838 */  lui       $v1, (0xD8380002 >> 16)
/* 392340 E0092610 3C04800A */  lui       $a0, %hi(gMainGfxPos)
/* 392344 E0092614 2484A66C */  addiu     $a0, $a0, %lo(gMainGfxPos)
/* 392348 E0092618 8C820000 */  lw        $v0, 0x0($a0)
/* 39234C E009261C 34630002 */  ori       $v1, $v1, (0xD8380002 & 0xFFFF)
/* 392350 E0092620 0040282D */  daddu     $a1, $v0, $zero
/* 392354 E0092624 24420008 */  addiu     $v0, $v0, 0x8
/* 392358 E0092628 AC820000 */  sw        $v0, 0x0($a0)
/* 39235C E009262C ACA30000 */  sw        $v1, 0x0($a1)
/* 392360 E0092630 24030040 */  addiu     $v1, $zero, 0x40
/* 392364 E0092634 ACA30004 */  sw        $v1, 0x4($a1)
/* 392368 E0092638 24430008 */  addiu     $v1, $v0, 0x8
/* 39236C E009263C AC830000 */  sw        $v1, 0x0($a0)
/* 392370 E0092640 3C03E700 */  lui       $v1, (0xE7000000 >> 16)
/* 392374 E0092644 AC430000 */  sw        $v1, 0x0($v0)
/* 392378 E0092648 AC400004 */  sw        $zero, 0x4($v0)
/* 39237C E009264C 8FBF0104 */  lw        $ra, 0x104($sp)
/* 392380 E0092650 8FBE0100 */  lw        $fp, 0x100($sp)
/* 392384 E0092654 8FB700FC */  lw        $s7, 0xFC($sp)
/* 392388 E0092658 8FB600F8 */  lw        $s6, 0xF8($sp)
/* 39238C E009265C 8FB500F4 */  lw        $s5, 0xF4($sp)
/* 392390 E0092660 8FB400F0 */  lw        $s4, 0xF0($sp)
/* 392394 E0092664 8FB300EC */  lw        $s3, 0xEC($sp)
/* 392398 E0092668 8FB200E8 */  lw        $s2, 0xE8($sp)
/* 39239C E009266C 8FB100E4 */  lw        $s1, 0xE4($sp)
/* 3923A0 E0092670 8FB000E0 */  lw        $s0, 0xE0($sp)
/* 3923A4 E0092674 D7B60110 */  ldc1      $f22, 0x110($sp)
/* 3923A8 E0092678 D7B40108 */  ldc1      $f20, 0x108($sp)
/* 3923AC E009267C 03E00008 */  jr        $ra
/* 3923B0 E0092680 27BD0118 */   addiu    $sp, $sp, 0x118
/* 3923B4 E0092684 00000000 */  nop
/* 3923B8 E0092688 00000000 */  nop
/* 3923BC E009268C 00000000 */  nop

### DECOMPILED C INSTRUCTIONS:

void small_gold_sparkle_appendGfx(void* effect) {
    SmallGoldSparkleFXData* part = ((EffectInstance*)effect)->data.smallGoldSparkle;
    Matrix4f sp18;
    Matrix4f sp58;
    Matrix4f sp98;
    Mtx* spD8;
    s32 i;

    shim_guRotateF(sp98, -gCameras[gCurrentCameraID].currentYaw, 0.0f, 1.0f, 0.0f);
    shim_guMtxF2L(sp98, &gDisplayContext->matrixStack[gMatrixListPos]);
    spD8 = &gDisplayContext->matrixStack[gMatrixListPos++];
    gDPPipeSync(gMainGfxPos++);
    gSPSegment(gMainGfxPos++, 0x09, VIRTUAL_TO_PHYSICAL(((EffectInstance*)effect)->graphics->data));
    shim_guTranslateF(sp18, part->unk_08, part->unk_0C, part->unk_10);
    shim_guMtxF2L(sp18, &gDisplayContext->matrixStack[gMatrixListPos]);

    gSPMatrix(gMainGfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++], G_MTX_PUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
    gSPDisplayList(gMainGfxPos++, D_090002C0_392700);
    gDPSetPrimColor(gMainGfxPos++, 0, 0, 255, 255, 15, 255);

    part++;
    for (i = 1; i < ((EffectInstance*)effect)->numParts; i++, part++) {
        if (part->unk_20 == 0) {
            f32 temp_f20 = part->unk_1C;

            shim_guTranslateF(sp18, part->unk_08, part->unk_0C, part->unk_10);
            if (temp_f20 != 1.0f) {
                shim_guScaleF(sp58, temp_f20, temp_f20, 1.0f);
                shim_guMtxCatF(sp58, sp18, sp18);
            }
            shim_guMtxF2L(sp18, &gDisplayContext->matrixStack[gMatrixListPos]);
            gSPMatrix(gMainGfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++],
                      G_MTX_PUSH | G_MTX_MUL | G_MTX_MODELVIEW);
            gSPMatrix(gMainGfxPos++, spD8, G_MTX_NOPUSH | G_MTX_MUL | G_MTX_MODELVIEW);
            gSPDisplayList(gMainGfxPos++, sDlists[part->unk_04 >> 1]);
            gSPDisplayList(gMainGfxPos++, D_09000470_3928B0);
            gSPPopMatrix(gMainGfxPos++, G_MTX_MODELVIEW);
        }
    }

    gSPPopMatrix(gMainGfxPos++, G_MTX_MODELVIEW);
    gDPPipeSync(gMainGfxPos++);
}


### RAW ASSEMBLY INSTRUCTIONS:

glabel MakeShop
/* 7E26E0 80281860 27BDFF98 */  addiu     $sp, $sp, -0x68
/* 7E26E4 80281864 AFB10044 */  sw        $s1, 0x44($sp)
/* 7E26E8 80281868 0080882D */  daddu     $s1, $a0, $zero
/* 7E26EC 8028186C AFBF0064 */  sw        $ra, 0x64($sp)
/* 7E26F0 80281870 AFBE0060 */  sw        $fp, 0x60($sp)
/* 7E26F4 80281874 AFB7005C */  sw        $s7, 0x5C($sp)
/* 7E26F8 80281878 AFB60058 */  sw        $s6, 0x58($sp)
/* 7E26FC 8028187C AFB50054 */  sw        $s5, 0x54($sp)
/* 7E2700 80281880 AFB40050 */  sw        $s4, 0x50($sp)
/* 7E2704 80281884 AFB3004C */  sw        $s3, 0x4C($sp)
/* 7E2708 80281888 AFB20048 */  sw        $s2, 0x48($sp)
/* 7E270C 8028188C AFB00040 */  sw        $s0, 0x40($sp)
/* 7E2710 80281890 8E30000C */  lw        $s0, 0xC($s1)
/* 7E2714 80281894 8E050000 */  lw        $a1, 0x0($s0)
/* 7E2718 80281898 0C0B1EAF */  jal       evt_get_variable
/* 7E271C 8028189C 26100004 */   addiu    $s0, $s0, 0x4
/* 7E2720 802818A0 8E050000 */  lw        $a1, 0x0($s0)
/* 7E2724 802818A4 26100004 */  addiu     $s0, $s0, 0x4
/* 7E2728 802818A8 0220202D */  daddu     $a0, $s1, $zero
/* 7E272C 802818AC 0C0B1EAF */  jal       evt_get_variable
/* 7E2730 802818B0 0040A82D */   daddu    $s5, $v0, $zero
/* 7E2734 802818B4 8E050000 */  lw        $a1, 0x0($s0)
/* 7E2738 802818B8 26100004 */  addiu     $s0, $s0, 0x4
/* 7E273C 802818BC 0220202D */  daddu     $a0, $s1, $zero
/* 7E2740 802818C0 0C0B1EAF */  jal       evt_get_variable
/* 7E2744 802818C4 0040982D */   daddu    $s3, $v0, $zero
/* 7E2748 802818C8 0220202D */  daddu     $a0, $s1, $zero
/* 7E274C 802818CC 8E050000 */  lw        $a1, 0x0($s0)
/* 7E2750 802818D0 0C0B1EAF */  jal       evt_get_variable
/* 7E2754 802818D4 0040882D */   daddu    $s1, $v0, $zero
/* 7E2758 802818D8 2404035C */  addiu     $a0, $zero, 0x35C
/* 7E275C 802818DC 0C00AB39 */  jal       heap_malloc
/* 7E2760 802818E0 0040802D */   daddu    $s0, $v0, $zero
/* 7E2764 802818E4 3C038007 */  lui       $v1, %hi(gGameStatusPtr)
/* 7E2768 802818E8 8C63419C */  lw        $v1, %lo(gGameStatusPtr)($v1)
/* 7E276C 802818EC 0040A02D */  daddu     $s4, $v0, $zero
/* 7E2770 802818F0 AC740144 */  sw        $s4, 0x144($v1)
/* 7E2774 802818F4 AE950014 */  sw        $s5, 0x14($s4)
/* 7E2778 802818F8 AE930018 */  sw        $s3, 0x18($s4)
/* 7E277C 802818FC AE91001C */  sw        $s1, 0x1C($s4)
/* 7E2780 80281900 AE900024 */  sw        $s0, 0x24($s4)
/* 7E2784 80281904 8E620000 */  lw        $v0, 0x0($s3)
/* 7E2788 80281908 10400005 */  beqz      $v0, .L80281920
/* 7E278C 8028190C 0000902D */   daddu    $s2, $zero, $zero
.L80281910:
/* 7E2790 80281910 2673000C */  addiu     $s3, $s3, 0xC
/* 7E2794 80281914 8E620000 */  lw        $v0, 0x0($s3)
/* 7E2798 80281918 1440FFFD */  bnez      $v0, .L80281910
/* 7E279C 8028191C 26520001 */   addiu    $s2, $s2, 0x1
.L80281920:
/* 7E27A0 80281920 A6920002 */  sh        $s2, 0x2($s4)
/* 7E27A4 80281924 12200008 */  beqz      $s1, .L80281948
/* 7E27A8 80281928 0000902D */   daddu    $s2, $zero, $zero
/* 7E27AC 8028192C 8E220000 */  lw        $v0, 0x0($s1)
/* 7E27B0 80281930 10400005 */  beqz      $v0, .L80281948
/* 7E27B4 80281934 00000000 */   nop
.L80281938:
/* 7E27B8 80281938 2631000C */  addiu     $s1, $s1, 0xC
/* 7E27BC 8028193C 8E220000 */  lw        $v0, 0x0($s1)
/* 7E27C0 80281940 1440FFFD */  bnez      $v0, .L80281938
/* 7E27C4 80281944 26520001 */   addiu    $s2, $s2, 0x1
.L80281948:
/* 7E27C8 80281948 86840002 */  lh        $a0, 0x2($s4)
/* 7E27CC 8028194C 18800006 */  blez      $a0, .L80281968
/* 7E27D0 80281950 A6920004 */   sh       $s2, 0x4($s4)
/* 7E27D4 80281954 0C00AB39 */  jal       heap_malloc
/* 7E27D8 80281958 00042100 */   sll      $a0, $a0, 4
/* 7E27DC 8028195C 3C038007 */  lui       $v1, %hi(gGameStatusPtr)
/* 7E27E0 80281960 8C63419C */  lw        $v1, %lo(gGameStatusPtr)($v1)
/* 7E27E4 80281964 AC620140 */  sw        $v0, 0x140($v1)
.L80281968:
/* 7E27E8 80281968 8E930018 */  lw        $s3, 0x18($s4)
/* 7E27EC 8028196C 8E620000 */  lw        $v0, 0x0($s3)
/* 7E27F0 80281970 8E950014 */  lw        $s5, 0x14($s4)
/* 7E27F4 80281974 10400055 */  beqz      $v0, .L80281ACC
/* 7E27F8 80281978 0000902D */   daddu    $s2, $zero, $zero
/* 7E27FC 8028197C 3C1E8007 */  lui       $fp, %hi(gGameStatusPtr)
/* 7E2800 80281980 27DE419C */  addiu     $fp, $fp, %lo(gGameStatusPtr)
/* 7E2804 80281984 3C178028 */  lui       $s7, %hi(D_80283F58_7E4DD8)
/* 7E2808 80281988 26F73F58 */  addiu     $s7, $s7, %lo(D_80283F58_7E4DD8)
/* 7E280C 8028198C 24160003 */  addiu     $s6, $zero, 0x3
/* 7E2810 80281990 26B10002 */  addiu     $s1, $s5, 0x2
.L80281994:
/* 7E2814 80281994 27A50028 */  addiu     $a1, $sp, 0x28
/* 7E2818 80281998 27A6002C */  addiu     $a2, $sp, 0x2C
/* 7E281C 8028199C 27A70030 */  addiu     $a3, $sp, 0x30
/* 7E2820 802819A0 96A40000 */  lhu       $a0, 0x0($s5)
/* 7E2824 802819A4 27A20034 */  addiu     $v0, $sp, 0x34
/* 7E2828 802819A8 AFA20010 */  sw        $v0, 0x10($sp)
/* 7E282C 802819AC 27A20038 */  addiu     $v0, $sp, 0x38
/* 7E2830 802819B0 AFA20014 */  sw        $v0, 0x14($sp)
/* 7E2834 802819B4 27A2003C */  addiu     $v0, $sp, 0x3C
/* 7E2838 802819B8 0C046C3B */  jal       get_model_center_and_size
/* 7E283C 802819BC AFA20018 */   sw       $v0, 0x18($sp)
/* 7E2840 802819C0 00128100 */  sll       $s0, $s2, 4
/* 7E2844 802819C4 C7A2002C */  lwc1      $f2, 0x2C($sp)
/* 7E2848 802819C8 8FC30000 */  lw        $v1, 0x0($fp)
/* 7E284C 802819CC 3C0140C0 */  lui       $at, (0x40C00000 >> 16)
/* 7E2850 802819D0 44812000 */  mtc1      $at, $f4
/* 7E2854 802819D4 C7A00028 */  lwc1      $f0, 0x28($sp)
/* 7E2858 802819D8 8C620140 */  lw        $v0, 0x140($v1)
/* 7E285C 802819DC 46041080 */  add.s     $f2, $f2, $f4
/* 7E2860 802819E0 02021021 */  addu      $v0, $s0, $v0
/* 7E2864 802819E4 E4400004 */  swc1      $f0, 0x4($v0)
/* 7E2868 802819E8 8C620140 */  lw        $v0, 0x140($v1)
/* 7E286C 802819EC 02021021 */  addu      $v0, $s0, $v0
/* 7E2870 802819F0 E4420008 */  swc1      $f2, 0x8($v0)
/* 7E2874 802819F4 8C620140 */  lw        $v0, 0x140($v1)
/* 7E2878 802819F8 C7A00030 */  lwc1      $f0, 0x30($sp)
/* 7E287C 802819FC 02021021 */  addu      $v0, $s0, $v0
/* 7E2880 80281A00 E440000C */  swc1      $f0, 0xC($v0)
/* 7E2884 80281A04 96A40000 */  lhu       $a0, 0x0($s5)
/* 7E2888 80281A08 0C046C04 */  jal       get_model_list_index_from_tree_index
/* 7E288C 80281A0C E7A2002C */   swc1     $f2, 0x2C($sp)
/* 7E2890 80281A10 0C046B4C */  jal       get_model_from_list_index
/* 7E2894 80281A14 0040202D */   daddu    $a0, $v0, $zero
/* 7E2898 80281A18 C7A00028 */  lwc1      $f0, 0x28($sp)
/* 7E289C 80281A1C C7A2002C */  lwc1      $f2, 0x2C($sp)
/* 7E28A0 80281A20 94430000 */  lhu       $v1, 0x0($v0)
/* 7E28A4 80281A24 44050000 */  mfc1      $a1, $f0
/* 7E28A8 80281A28 44061000 */  mfc1      $a2, $f2
/* 7E28AC 80281A2C C7A00030 */  lwc1      $f0, 0x30($sp)
/* 7E28B0 80281A30 34630004 */  ori       $v1, $v1, 0x4
/* 7E28B4 80281A34 A4430000 */  sh        $v1, 0x0($v0)
/* 7E28B8 80281A38 8E630000 */  lw        $v1, 0x0($s3)
/* 7E28BC 80281A3C 8E840024 */  lw        $a0, 0x24($s4)
/* 7E28C0 80281A40 24020001 */  addiu     $v0, $zero, 0x1
/* 7E28C4 80281A44 AFA20010 */  sw        $v0, 0x10($sp)
/* 7E28C8 80281A48 AFA00014 */  sw        $zero, 0x14($sp)
/* 7E28CC 80281A4C 44070000 */  mfc1      $a3, $f0
/* 7E28D0 80281A50 0C04C6A5 */  jal       make_item_entity_nodelay
/* 7E28D4 80281A54 00642025 */   or       $a0, $v1, $a0
/* 7E28D8 80281A58 8FC40000 */  lw        $a0, 0x0($fp)
/* 7E28DC 80281A5C 8C830140 */  lw        $v1, 0x140($a0)
/* 7E28E0 80281A60 26B50004 */  addiu     $s5, $s5, 0x4
/* 7E28E4 80281A64 02031821 */  addu      $v1, $s0, $v1
/* 7E28E8 80281A68 AC620000 */  sw        $v0, 0x0($v1)
/* 7E28EC 80281A6C 8C820140 */  lw        $v0, 0x140($a0)
/* 7E28F0 80281A70 2673000C */  addiu     $s3, $s3, 0xC
/* 7E28F4 80281A74 02028021 */  addu      $s0, $s0, $v0
/* 7E28F8 80281A78 8E040000 */  lw        $a0, 0x0($s0)
/* 7E28FC 80281A7C 0C04D052 */  jal       set_item_entity_flags
/* 7E2900 80281A80 24054000 */   addiu    $a1, $zero, 0x4000
/* 7E2904 80281A84 02E0202D */  daddu     $a0, $s7, $zero
/* 7E2908 80281A88 24050080 */  addiu     $a1, $zero, 0x80
/* 7E290C 80281A8C 96260000 */  lhu       $a2, 0x0($s1)
/* 7E2910 80281A90 0240382D */  daddu     $a3, $s2, $zero
/* 7E2914 80281A94 AFA00010 */  sw        $zero, 0x10($sp)
/* 7E2918 80281A98 0C0B10AA */  jal       bind_trigger_1
/* 7E291C 80281A9C AFB60014 */   sw       $s6, 0x14($sp)
/* 7E2920 80281AA0 02E0202D */  daddu     $a0, $s7, $zero
/* 7E2924 80281AA4 24050800 */  addiu     $a1, $zero, 0x800
/* 7E2928 80281AA8 0240382D */  daddu     $a3, $s2, $zero
/* 7E292C 80281AAC 96260000 */  lhu       $a2, 0x0($s1)
/* 7E2930 80281AB0 26310004 */  addiu     $s1, $s1, 0x4
/* 7E2934 80281AB4 AFA00010 */  sw        $zero, 0x10($sp)
/* 7E2938 80281AB8 0C0B10AA */  jal       bind_trigger_1
/* 7E293C 80281ABC AFB60014 */   sw       $s6, 0x14($sp)
/* 7E2940 80281AC0 8E620000 */  lw        $v0, 0x0($s3)
/* 7E2944 80281AC4 1440FFB3 */  bnez      $v0, .L80281994
/* 7E2948 80281AC8 26520001 */   addiu    $s2, $s2, 0x1
.L80281ACC:
/* 7E294C 80281ACC 3C048008 */  lui       $a0, %hi(HES_Item_Coin)
/* 7E2950 80281AD0 24840868 */  addiu     $a0, $a0, %lo(HES_Item_Coin)
/* 7E2954 80281AD4 0C050529 */  jal       hud_element_create
/* 7E2958 80281AD8 2410FFFF */   addiu    $s0, $zero, -0x1
/* 7E295C 80281ADC 0040202D */  daddu     $a0, $v0, $zero
/* 7E2960 80281AE0 24050080 */  addiu     $a1, $zero, 0x80
/* 7E2964 80281AE4 0C051280 */  jal       hud_element_set_flags
/* 7E2968 80281AE8 AE840020 */   sw       $a0, 0x20($s4)
/* 7E296C 80281AEC 8E840020 */  lw        $a0, 0x20($s4)
/* 7E2970 80281AF0 0C05128B */  jal       hud_element_clear_flags
/* 7E2974 80281AF4 34058000 */   ori      $a1, $zero, 0x8000
/* 7E2978 80281AF8 3C058028 */  lui       $a1, %hi(draw_shop_items)
/* 7E297C 80281AFC 24A51524 */  addiu     $a1, $a1, %lo(draw_shop_items)
/* 7E2980 80281B00 0C048C8F */  jal       create_worker_frontUI
/* 7E2984 80281B04 0000202D */   daddu    $a0, $zero, $zero
/* 7E2988 80281B08 0C048D8F */  jal       get_worker
/* 7E298C 80281B0C 0040202D */   daddu    $a0, $v0, $zero
/* 7E2990 80281B10 2404000A */  addiu     $a0, $zero, 0xA
/* 7E2994 80281B14 24050064 */  addiu     $a1, $zero, 0x64
/* 7E2998 80281B18 24060042 */  addiu     $a2, $zero, 0x42
/* 7E299C 80281B1C 24070078 */  addiu     $a3, $zero, 0x78
/* 7E29A0 80281B20 2402001C */  addiu     $v0, $zero, 0x1C
/* 7E29A4 80281B24 AFA20010 */  sw        $v0, 0x10($sp)
/* 7E29A8 80281B28 3C028028 */  lui       $v0, %hi(shop_draw_item_name)
/* 7E29AC 80281B2C 24421434 */  addiu     $v0, $v0, %lo(shop_draw_item_name)
/* 7E29B0 80281B30 AFA00014 */  sw        $zero, 0x14($sp)
/* 7E29B4 80281B34 AFA20018 */  sw        $v0, 0x18($sp)
/* 7E29B8 80281B38 AFA0001C */  sw        $zero, 0x1C($sp)
/* 7E29BC 80281B3C 0C051F32 */  jal       set_window_properties
/* 7E29C0 80281B40 AFB00020 */   sw       $s0, 0x20($sp)
/* 7E29C4 80281B44 2404000B */  addiu     $a0, $zero, 0xB
/* 7E29C8 80281B48 24050020 */  addiu     $a1, $zero, 0x20
/* 7E29CC 80281B4C 240600B8 */  addiu     $a2, $zero, 0xB8
/* 7E29D0 80281B50 24070100 */  addiu     $a3, $zero, 0x100
/* 7E29D4 80281B54 00A0102D */  daddu     $v0, $a1, $zero
/* 7E29D8 80281B58 AFA20010 */  sw        $v0, 0x10($sp)
/* 7E29DC 80281B5C 24020001 */  addiu     $v0, $zero, 0x1
/* 7E29E0 80281B60 AFA20014 */  sw        $v0, 0x14($sp)
/* 7E29E4 80281B64 3C028028 */  lui       $v0, %hi(shop_draw_item_desc)
/* 7E29E8 80281B68 244214D0 */  addiu     $v0, $v0, %lo(shop_draw_item_desc)
/* 7E29EC 80281B6C AFA20018 */  sw        $v0, 0x18($sp)
/* 7E29F0 80281B70 AFA0001C */  sw        $zero, 0x1C($sp)
/* 7E29F4 80281B74 0C051F32 */  jal       set_window_properties
/* 7E29F8 80281B78 AFB00020 */   sw       $s0, 0x20($sp)
/* 7E29FC 80281B7C 3C048015 */  lui       $a0, %hi(gWindowStyles)
/* 7E2A00 80281B80 2484F150 */  addiu     $a0, $a0, %lo(gWindowStyles)
/* 7E2A04 80281B84 24030009 */  addiu     $v1, $zero, 0x9
/* 7E2A08 80281B88 AC830028 */  sw        $v1, 0x28($a0)
/* 7E2A0C 80281B8C 24030003 */  addiu     $v1, $zero, 0x3
/* 7E2A10 80281B90 AC83002C */  sw        $v1, 0x2C($a0)
/* 7E2A14 80281B94 AE800008 */  sw        $zero, 0x8($s4)
/* 7E2A18 80281B98 AE80000C */  sw        $zero, 0xC($s4)
/* 7E2A1C 80281B9C A6800000 */  sh        $zero, 0x0($s4)
/* 7E2A20 80281BA0 AE800010 */  sw        $zero, 0x10($s4)
/* 7E2A24 80281BA4 8FBF0064 */  lw        $ra, 0x64($sp)
/* 7E2A28 80281BA8 8FBE0060 */  lw        $fp, 0x60($sp)
/* 7E2A2C 80281BAC 8FB7005C */  lw        $s7, 0x5C($sp)
/* 7E2A30 80281BB0 8FB60058 */  lw        $s6, 0x58($sp)
/* 7E2A34 80281BB4 8FB50054 */  lw        $s5, 0x54($sp)
/* 7E2A38 80281BB8 8FB40050 */  lw        $s4, 0x50($sp)
/* 7E2A3C 80281BBC 8FB3004C */  lw        $s3, 0x4C($sp)
/* 7E2A40 80281BC0 8FB20048 */  lw        $s2, 0x48($sp)
/* 7E2A44 80281BC4 8FB10044 */  lw        $s1, 0x44($sp)
/* 7E2A48 80281BC8 8FB00040 */  lw        $s0, 0x40($sp)
/* 7E2A4C 80281BCC 24020002 */  addiu     $v0, $zero, 0x2
/* 7E2A50 80281BD0 03E00008 */  jr        $ra
/* 7E2A54 80281BD4 27BD0068 */   addiu    $sp, $sp, 0x68

### DECOMPILED C INSTRUCTIONS:

API_CALLABLE(MakeShop) {
    Bytecode* args = script->ptrReadPos;
    ShopItemLocation* itemDataPositions;
    ShopItemData* inventory;
    ShopSellPriceData* prices;
    s32 inventoryItemFlags;
    Shop* shop;
    Model* model;
    s32 numShopItems;
    f32 centerX;
    f32 centerY;
    f32 centerZ;
    s32 var1;
    s32 var2;
    s32 var3;
    s32 var4;
    f32 sizeX;
    f32 sizeY;
    f32 sizeZ;

    var1 = evt_get_variable(script, *args++);
    var2 = evt_get_variable(script, *args++);
    var3 = evt_get_variable(script, *args++);
    var4 = evt_get_variable(script, *args++);

    itemDataPositions = (ShopItemLocation*) var1;
    inventory = (ShopItemData*) var2;
    prices = (ShopSellPriceData*) var3;
    inventoryItemFlags = var4;

    shop = heap_malloc(sizeof(*shop));

    gGameStatusPtr->mapShop = shop;
    shop->itemDataPositions = itemDataPositions;
    shop->staticInventory = inventory;
    shop->staticPriceList = prices;
    shop->inventoryItemFlags = inventoryItemFlags;

    numShopItems = 0;
    while (inventory->itemID != ITEM_NONE) {
        numShopItems++;
        inventory++;
    }
    shop->numItems = numShopItems;

    numShopItems = 0;
    if (prices != NULL) {
        while (prices->itemID != ITEM_NONE) {
            numShopItems++;
            prices++;
        }
    }
    shop->numSpecialPrices = numShopItems;

    if (shop->numItems > 0) {
        gGameStatusPtr->shopItemEntities = heap_malloc(sizeof(ShopItemEntity) * shop->numItems);
    }

    inventory = shop->staticInventory;
    itemDataPositions = shop->itemDataPositions;
    numShopItems = 0;
    while (inventory->itemID != 0) {
        get_model_center_and_size(itemDataPositions->posModelID, &centerX, &centerY, &centerZ, &sizeX, &sizeY, &sizeZ);
        centerY += 6;
        gGameStatusPtr->shopItemEntities[numShopItems].pos.x = centerX;
        gGameStatusPtr->shopItemEntities[numShopItems].pos.y = centerY;
        gGameStatusPtr->shopItemEntities[numShopItems].pos.z = centerZ;
        model = get_model_from_list_index(get_model_list_index_from_tree_index(itemDataPositions->posModelID));
        model->flags |= MODEL_FLAG_FLAG_4;
        gGameStatusPtr->shopItemEntities[numShopItems].index =
            make_item_entity_nodelay(inventory->itemID | shop->inventoryItemFlags, centerX, centerY, centerZ, 1, 0);
        set_item_entity_flags(gGameStatusPtr->shopItemEntities[numShopItems].index, ITEM_ENTITY_RESIZABLE);
        bind_trigger_1(&D_80283F58_7E4DD8, TRIGGER_FLOOR_TOUCH, itemDataPositions->triggerColliderID, numShopItems, 0, 3);
        bind_trigger_1(&D_80283F58_7E4DD8, TRIGGER_FLOOR_PRESS_A, itemDataPositions->triggerColliderID, numShopItems, 0, 3);
        itemDataPositions++;
        inventory++;
        numShopItems++;
    }

    shop->costIconID = hud_element_create(&HES_Item_Coin);
    hud_element_set_flags(shop->costIconID, HUD_ELEMENT_FLAG_80);
    hud_element_clear_flags(shop->costIconID, HUD_ELEMENT_FLAG_FILTER_TEX);
    get_worker(create_worker_frontUI(NULL, draw_shop_items));
    set_window_properties(WINDOW_ID_ITEM_INFO_NAME, 100, 66, 120, 28, WINDOW_PRIORITY_0, shop_draw_item_name, NULL, -1);
    set_window_properties(WINDOW_ID_ITEM_INFO_DESC, 32, 184, 256, 32, WINDOW_PRIORITY_1, shop_draw_item_desc, NULL, -1);
    gWindowStyles[10].defaultStyleID = WINDOW_STYLE_9;
    gWindowStyles[11].defaultStyleID = WINDOW_STYLE_3;
    shop->currentItemSlot = 0;
    shop->selectedStoreItemSlot = 0;
    shop->flags = SHOP_FLAG_0;
    shop->owner = NULL;

    return ApiStatus_DONE2;
}


### RAW ASSEMBLY INSTRUCTIONS:

glabel entity_HeartBlockContent__setupGfx
/* 105FB0 802E4730 27BDFF78 */  addiu     $sp, $sp, -0x88
/* 105FB4 802E4734 AFB00060 */  sw        $s0, 0x60($sp)
/* 105FB8 802E4738 00A0802D */  daddu     $s0, $a1, $zero
/* 105FBC 802E473C AFBF0084 */  sw        $ra, 0x84($sp)
/* 105FC0 802E4740 AFBE0080 */  sw        $fp, 0x80($sp)
/* 105FC4 802E4744 AFB7007C */  sw        $s7, 0x7C($sp)
/* 105FC8 802E4748 AFB60078 */  sw        $s6, 0x78($sp)
/* 105FCC 802E474C AFB50074 */  sw        $s5, 0x74($sp)
/* 105FD0 802E4750 AFB40070 */  sw        $s4, 0x70($sp)
/* 105FD4 802E4754 AFB3006C */  sw        $s3, 0x6C($sp)
/* 105FD8 802E4758 AFB20068 */  sw        $s2, 0x68($sp)
/* 105FDC 802E475C 0C04417A */  jal       get_entity_by_index
/* 105FE0 802E4760 AFB10064 */   sw       $s1, 0x64($sp)
/* 105FE4 802E4764 3C04FCFF */  lui       $a0, (0xFCFFB3FF >> 16)
/* 105FE8 802E4768 3484B3FF */  ori       $a0, $a0, (0xFCFFB3FF & 0xFFFF)
/* 105FEC 802E476C 3C03FF2C */  lui       $v1, (0xFF2CFE7F >> 16)
/* 105FF0 802E4770 3463FE7F */  ori       $v1, $v1, (0xFF2CFE7F & 0xFFFF)
/* 105FF4 802E4774 2415005C */  addiu     $s5, $zero, 0x5C
/* 105FF8 802E4778 0040882D */  daddu     $s1, $v0, $zero
/* 105FFC 802E477C 3210FFFF */  andi      $s0, $s0, 0xFFFF
/* 106000 802E4780 3C12800A */  lui       $s2, %hi(gMainGfxPos)
/* 106004 802E4784 8E52A66C */  lw        $s2, %lo(gMainGfxPos)($s2)
/* 106008 802E4788 8E330040 */  lw        $s3, 0x40($s1)
/* 10600C 802E478C 8E250044 */  lw        $a1, 0x44($s1)
/* 106010 802E4790 0240102D */  daddu     $v0, $s2, $zero
/* 106014 802E4794 26520008 */  addiu     $s2, $s2, 0x8
/* 106018 802E4798 AC430004 */  sw        $v1, 0x4($v0)
/* 10601C 802E479C 0240182D */  daddu     $v1, $s2, $zero
/* 106020 802E47A0 AC440000 */  sw        $a0, 0x0($v0)
/* 106024 802E47A4 3C02FA00 */  lui       $v0, (0xFA000000 >> 16)
/* 106028 802E47A8 AC620000 */  sw        $v0, 0x0($v1)
/* 10602C 802E47AC 9222000B */  lbu       $v0, 0xB($s1)
/* 106030 802E47B0 26520008 */  addiu     $s2, $s2, 0x8
/* 106034 802E47B4 AC620004 */  sw        $v0, 0x4($v1)
/* 106038 802E47B8 9223000B */  lbu       $v1, 0xB($s1)
/* 10603C 802E47BC 0075102A */  slt       $v0, $v1, $s5
/* 106040 802E47C0 10400002 */  beqz      $v0, .L802E47CC
/* 106044 802E47C4 00B0F021 */   addu     $fp, $a1, $s0
/* 106048 802E47C8 0060A82D */  daddu     $s5, $v1, $zero
.L802E47CC:
/* 10604C 802E47CC 0260202D */  daddu     $a0, $s3, $zero
/* 106050 802E47D0 0C0B91C4 */  jal       entity_HeartBlockContent_get_previous_yaw
/* 106054 802E47D4 24050002 */   addiu    $a1, $zero, 0x2
/* 106058 802E47D8 44050000 */  mfc1      $a1, $f0
/* 10605C 802E47DC 44800000 */  mtc1      $zero, $f0
/* 106060 802E47E0 3C073F80 */  lui       $a3, (0x3F800000 >> 16)
/* 106064 802E47E4 44060000 */  mfc1      $a2, $f0
/* 106068 802E47E8 27A40018 */  addiu     $a0, $sp, 0x18
/* 10606C 802E47EC 0C019EC8 */  jal       guRotateF
/* 106070 802E47F0 AFA60010 */   sw       $a2, 0x10($sp)
/* 106074 802E47F4 27A40018 */  addiu     $a0, $sp, 0x18
/* 106078 802E47F8 26700058 */  addiu     $s0, $s3, 0x58
/* 10607C 802E47FC 0C019D40 */  jal       guMtxF2L
/* 106080 802E4800 0200282D */   daddu    $a1, $s0, $zero
/* 106084 802E4804 3C040001 */  lui       $a0, (0x11630 >> 16)
/* 106088 802E4808 34841630 */  ori       $a0, $a0, (0x11630 & 0xFFFF)
/* 10608C 802E480C 26650098 */  addiu     $a1, $s3, 0x98
/* 106090 802E4810 3C028007 */  lui       $v0, %hi(gMatrixListPos)
/* 106094 802E4814 944241F0 */  lhu       $v0, %lo(gMatrixListPos)($v0)
/* 106098 802E4818 3C03800A */  lui       $v1, %hi(gDisplayContext)
/* 10609C 802E481C 8C63A674 */  lw        $v1, %lo(gDisplayContext)($v1)
/* 1060A0 802E4820 00021180 */  sll       $v0, $v0, 6
/* 1060A4 802E4824 00621821 */  addu      $v1, $v1, $v0
/* 1060A8 802E4828 00641821 */  addu      $v1, $v1, $a0
.L802E482C:
/* 1060AC 802E482C 8E160000 */  lw        $s6, 0x0($s0)
/* 1060B0 802E4830 8E170004 */  lw        $s7, 0x4($s0)
/* 1060B4 802E4834 8E180008 */  lw        $t8, 0x8($s0)
/* 1060B8 802E4838 8E19000C */  lw        $t9, 0xC($s0)
/* 1060BC 802E483C AC760000 */  sw        $s6, 0x0($v1)
/* 1060C0 802E4840 AC770004 */  sw        $s7, 0x4($v1)
/* 1060C4 802E4844 AC780008 */  sw        $t8, 0x8($v1)
/* 1060C8 802E4848 AC79000C */  sw        $t9, 0xC($v1)
/* 1060CC 802E484C 26100010 */  addiu     $s0, $s0, 0x10
/* 1060D0 802E4850 1605FFF6 */  bne       $s0, $a1, .L802E482C
/* 1060D4 802E4854 24630010 */   addiu    $v1, $v1, 0x10
/* 1060D8 802E4858 0240502D */  daddu     $t2, $s2, $zero
/* 1060DC 802E485C 26520008 */  addiu     $s2, $s2, 0x8
/* 1060E0 802E4860 3C160001 */  lui       $s6, (0x11630 >> 16)
/* 1060E4 802E4864 36D61630 */  ori       $s6, $s6, (0x11630 & 0xFFFF)
/* 1060E8 802E4868 0240482D */  daddu     $t1, $s2, $zero
/* 1060EC 802E486C 26520008 */  addiu     $s2, $s2, 0x8
/* 1060F0 802E4870 3C0FE200 */  lui       $t7, (0xE200001C >> 16)
/* 1060F4 802E4874 35EF001C */  ori       $t7, $t7, (0xE200001C & 0xFFFF)
/* 1060F8 802E4878 3C0E0050 */  lui       $t6, (0x504358 >> 16)
/* 1060FC 802E487C 35CE4358 */  ori       $t6, $t6, (0x504358 & 0xFFFF)
/* 106100 802E4880 0240302D */  daddu     $a2, $s2, $zero
/* 106104 802E4884 26520008 */  addiu     $s2, $s2, 0x8
/* 106108 802E4888 0240382D */  daddu     $a3, $s2, $zero
/* 10610C 802E488C 26520008 */  addiu     $s2, $s2, 0x8
/* 106110 802E4890 0240402D */  daddu     $t0, $s2, $zero
/* 106114 802E4894 26520008 */  addiu     $s2, $s2, 0x8
/* 106118 802E4898 3C0DFCFF */  lui       $t5, (0xFCFFB3FF >> 16)
/* 10611C 802E489C 35ADB3FF */  ori       $t5, $t5, (0xFCFFB3FF & 0xFFFF)
/* 106120 802E48A0 3C0CFF2C */  lui       $t4, (0xFF2CFE7F >> 16)
/* 106124 802E48A4 358CFE7F */  ori       $t4, $t4, (0xFF2CFE7F & 0xFFFF)
/* 106128 802E48A8 0240202D */  daddu     $a0, $s2, $zero
/* 10612C 802E48AC 26520008 */  addiu     $s2, $s2, 0x8
/* 106130 802E48B0 0240282D */  daddu     $a1, $s2, $zero
/* 106134 802E48B4 3C0BD838 */  lui       $t3, (0xD8380002 >> 16)
/* 106138 802E48B8 356B0002 */  ori       $t3, $t3, (0xD8380002 & 0xFFFF)
/* 10613C 802E48BC 3C148007 */  lui       $s4, %hi(gMatrixListPos)
/* 106140 802E48C0 269441F0 */  addiu     $s4, $s4, %lo(gMatrixListPos)
/* 106144 802E48C4 AFB60058 */  sw        $s6, 0x58($sp)
/* 106148 802E48C8 96820000 */  lhu       $v0, 0x0($s4)
/* 10614C 802E48CC 3C03DA38 */  lui       $v1, (0xDA380000 >> 16)
/* 106150 802E48D0 AD430000 */  sw        $v1, 0x0($t2)
/* 106154 802E48D4 24430001 */  addiu     $v1, $v0, 0x1
/* 106158 802E48D8 3042FFFF */  andi      $v0, $v0, 0xFFFF
/* 10615C 802E48DC 00021180 */  sll       $v0, $v0, 6
/* 106160 802E48E0 A6830000 */  sh        $v1, 0x0($s4)
/* 106164 802E48E4 3C03800A */  lui       $v1, %hi(gDisplayContext)
/* 106168 802E48E8 8C63A674 */  lw        $v1, %lo(gDisplayContext)($v1)
/* 10616C 802E48EC 00561021 */  addu      $v0, $v0, $s6
/* 106170 802E48F0 00621821 */  addu      $v1, $v1, $v0
/* 106174 802E48F4 3C02DE00 */  lui       $v0, (0xDE000000 >> 16)
/* 106178 802E48F8 AD430004 */  sw        $v1, 0x4($t2)
/* 10617C 802E48FC AD2F0000 */  sw        $t7, 0x0($t1)
/* 106180 802E4900 AD2E0004 */  sw        $t6, 0x4($t1)
/* 106184 802E4904 ACC20000 */  sw        $v0, 0x0($a2)
/* 106188 802E4908 3C02E700 */  lui       $v0, (0xE7000000 >> 16)
/* 10618C 802E490C ACDE0004 */  sw        $fp, 0x4($a2)
/* 106190 802E4910 ACE20000 */  sw        $v0, 0x0($a3)
/* 106194 802E4914 3C02FA00 */  lui       $v0, (0xFA000000 >> 16)
/* 106198 802E4918 ACE00004 */  sw        $zero, 0x4($a3)
/* 10619C 802E491C AD0D0000 */  sw        $t5, 0x0($t0)
/* 1061A0 802E4920 AD0C0004 */  sw        $t4, 0x4($t0)
/* 1061A4 802E4924 AC820000 */  sw        $v0, 0x0($a0)
/* 1061A8 802E4928 24020040 */  addiu     $v0, $zero, 0x40
/* 1061AC 802E492C AC950004 */  sw        $s5, 0x4($a0)
/* 1061B0 802E4930 ACAB0000 */  sw        $t3, 0x0($a1)
/* 1061B4 802E4934 ACA20004 */  sw        $v0, 0x4($a1)
/* 1061B8 802E4938 9223000B */  lbu       $v1, 0xB($s1)
/* 1061BC 802E493C 24150048 */  addiu     $s5, $zero, 0x48
/* 1061C0 802E4940 0075102A */  slt       $v0, $v1, $s5
/* 1061C4 802E4944 10400002 */  beqz      $v0, .L802E4950
/* 1061C8 802E4948 26520008 */   addiu    $s2, $s2, 0x8
/* 1061CC 802E494C 0060A82D */  daddu     $s5, $v1, $zero
.L802E4950:
/* 1061D0 802E4950 0260202D */  daddu     $a0, $s3, $zero
/* 1061D4 802E4954 0C0B91C4 */  jal       entity_HeartBlockContent_get_previous_yaw
/* 1061D8 802E4958 24050003 */   addiu    $a1, $zero, 0x3
/* 1061DC 802E495C 44050000 */  mfc1      $a1, $f0
/* 1061E0 802E4960 44800000 */  mtc1      $zero, $f0
/* 1061E4 802E4964 3C073F80 */  lui       $a3, (0x3F800000 >> 16)
/* 1061E8 802E4968 44060000 */  mfc1      $a2, $f0
/* 1061EC 802E496C 27A40018 */  addiu     $a0, $sp, 0x18
/* 1061F0 802E4970 0C019EC8 */  jal       guRotateF
/* 1061F4 802E4974 AFA60010 */   sw       $a2, 0x10($sp)
/* 1061F8 802E4978 27A40018 */  addiu     $a0, $sp, 0x18
/* 1061FC 802E497C 26700098 */  addiu     $s0, $s3, 0x98
/* 106200 802E4980 0C019D40 */  jal       guMtxF2L
/* 106204 802E4984 0200282D */   daddu    $a1, $s0, $zero
/* 106208 802E4988 266400D8 */  addiu     $a0, $s3, 0xD8
/* 10620C 802E498C 96820000 */  lhu       $v0, 0x0($s4)
/* 106210 802E4990 3C03800A */  lui       $v1, %hi(gDisplayContext)
/* 106214 802E4994 8C63A674 */  lw        $v1, %lo(gDisplayContext)($v1)
/* 106218 802E4998 8FB70058 */  lw        $s7, 0x58($sp)
/* 10621C 802E499C 00021180 */  sll       $v0, $v0, 6
/* 106220 802E49A0 00621821 */  addu      $v1, $v1, $v0
/* 106224 802E49A4 00771821 */  addu      $v1, $v1, $s7
.L802E49A8:
/* 106228 802E49A8 8E180000 */  lw        $t8, 0x0($s0)
/* 10622C 802E49AC 8E190004 */  lw        $t9, 0x4($s0)
/* 106230 802E49B0 8E160008 */  lw        $s6, 0x8($s0)
/* 106234 802E49B4 8E17000C */  lw        $s7, 0xC($s0)
/* 106238 802E49B8 AC780000 */  sw        $t8, 0x0($v1)
/* 10623C 802E49BC AC790004 */  sw        $t9, 0x4($v1)
/* 106240 802E49C0 AC760008 */  sw        $s6, 0x8($v1)
/* 106244 802E49C4 AC77000C */  sw        $s7, 0xC($v1)
/* 106248 802E49C8 26100010 */  addiu     $s0, $s0, 0x10
/* 10624C 802E49CC 1604FFF6 */  bne       $s0, $a0, .L802E49A8
/* 106250 802E49D0 24630010 */   addiu    $v1, $v1, 0x10
/* 106254 802E49D4 0240582D */  daddu     $t3, $s2, $zero
/* 106258 802E49D8 26520008 */  addiu     $s2, $s2, 0x8
/* 10625C 802E49DC 3C110001 */  lui       $s1, (0x11630 >> 16)
/* 106260 802E49E0 36311630 */  ori       $s1, $s1, (0x11630 & 0xFFFF)
/* 106264 802E49E4 0240502D */  daddu     $t2, $s2, $zero
/* 106268 802E49E8 26520008 */  addiu     $s2, $s2, 0x8
/* 10626C 802E49EC 3C10E200 */  lui       $s0, (0xE200001C >> 16)
/* 106270 802E49F0 3610001C */  ori       $s0, $s0, (0xE200001C & 0xFFFF)
/* 106274 802E49F4 3C0F0050 */  lui       $t7, (0x504358 >> 16)
/* 106278 802E49F8 35EF4358 */  ori       $t7, $t7, (0x504358 & 0xFFFF)
/* 10627C 802E49FC 0240382D */  daddu     $a3, $s2, $zero
/* 106280 802E4A00 26520008 */  addiu     $s2, $s2, 0x8
/* 106284 802E4A04 0240402D */  daddu     $t0, $s2, $zero
/* 106288 802E4A08 26520008 */  addiu     $s2, $s2, 0x8
/* 10628C 802E4A0C 0240482D */  daddu     $t1, $s2, $zero
/* 106290 802E4A10 26520008 */  addiu     $s2, $s2, 0x8
/* 106294 802E4A14 3C0EFCFF */  lui       $t6, (0xFCFFB3FF >> 16)
/* 106298 802E4A18 35CEB3FF */  ori       $t6, $t6, (0xFCFFB3FF & 0xFFFF)
/* 10629C 802E4A1C 3C0DFF2C */  lui       $t5, (0xFF2CFE7F >> 16)
/* 1062A0 802E4A20 35ADFE7F */  ori       $t5, $t5, (0xFF2CFE7F & 0xFFFF)
/* 1062A4 802E4A24 0240282D */  daddu     $a1, $s2, $zero
/* 1062A8 802E4A28 26520008 */  addiu     $s2, $s2, 0x8
/* 1062AC 802E4A2C 0240302D */  daddu     $a2, $s2, $zero
/* 1062B0 802E4A30 26520008 */  addiu     $s2, $s2, 0x8
/* 1062B4 802E4A34 3C0CD838 */  lui       $t4, (0xD8380002 >> 16)
/* 1062B8 802E4A38 358C0002 */  ori       $t4, $t4, (0xD8380002 & 0xFFFF)
/* 1062BC 802E4A3C 3C048007 */  lui       $a0, %hi(gMatrixListPos)
/* 1062C0 802E4A40 248441F0 */  addiu     $a0, $a0, %lo(gMatrixListPos)
/* 1062C4 802E4A44 94820000 */  lhu       $v0, 0x0($a0)
/* 1062C8 802E4A48 3C03DA38 */  lui       $v1, (0xDA380000 >> 16)
/* 1062CC 802E4A4C AD630000 */  sw        $v1, 0x0($t3)
/* 1062D0 802E4A50 3C01800A */  lui       $at, %hi(gMainGfxPos)
/* 1062D4 802E4A54 AC32A66C */  sw        $s2, %lo(gMainGfxPos)($at)
/* 1062D8 802E4A58 24430001 */  addiu     $v1, $v0, 0x1
/* 1062DC 802E4A5C 3042FFFF */  andi      $v0, $v0, 0xFFFF
/* 1062E0 802E4A60 00021180 */  sll       $v0, $v0, 6
/* 1062E4 802E4A64 A4830000 */  sh        $v1, 0x0($a0)
/* 1062E8 802E4A68 3C03800A */  lui       $v1, %hi(gDisplayContext)
/* 1062EC 802E4A6C 8C63A674 */  lw        $v1, %lo(gDisplayContext)($v1)
/* 1062F0 802E4A70 00511021 */  addu      $v0, $v0, $s1
/* 1062F4 802E4A74 00621821 */  addu      $v1, $v1, $v0
/* 1062F8 802E4A78 3C02DE00 */  lui       $v0, (0xDE000000 >> 16)
/* 1062FC 802E4A7C AD630004 */  sw        $v1, 0x4($t3)
/* 106300 802E4A80 AD500000 */  sw        $s0, 0x0($t2)
/* 106304 802E4A84 AD4F0004 */  sw        $t7, 0x4($t2)
/* 106308 802E4A88 ACE20000 */  sw        $v0, 0x0($a3)
/* 10630C 802E4A8C 3C02E700 */  lui       $v0, (0xE7000000 >> 16)
/* 106310 802E4A90 ACFE0004 */  sw        $fp, 0x4($a3)
/* 106314 802E4A94 AD020000 */  sw        $v0, 0x0($t0)
/* 106318 802E4A98 3C02FA00 */  lui       $v0, (0xFA000000 >> 16)
/* 10631C 802E4A9C AD000004 */  sw        $zero, 0x4($t0)
/* 106320 802E4AA0 AD2E0000 */  sw        $t6, 0x0($t1)
/* 106324 802E4AA4 AD2D0004 */  sw        $t5, 0x4($t1)
/* 106328 802E4AA8 ACA20000 */  sw        $v0, 0x0($a1)
/* 10632C 802E4AAC 24020040 */  addiu     $v0, $zero, 0x40
/* 106330 802E4AB0 ACB50004 */  sw        $s5, 0x4($a1)
/* 106334 802E4AB4 ACCC0000 */  sw        $t4, 0x0($a2)
/* 106338 802E4AB8 ACC20004 */  sw        $v0, 0x4($a2)
/* 10633C 802E4ABC 8FBF0084 */  lw        $ra, 0x84($sp)
/* 106340 802E4AC0 8FBE0080 */  lw        $fp, 0x80($sp)
/* 106344 802E4AC4 8FB7007C */  lw        $s7, 0x7C($sp)
/* 106348 802E4AC8 8FB60078 */  lw        $s6, 0x78($sp)
/* 10634C 802E4ACC 8FB50074 */  lw        $s5, 0x74($sp)
/* 106350 802E4AD0 8FB40070 */  lw        $s4, 0x70($sp)
/* 106354 802E4AD4 8FB3006C */  lw        $s3, 0x6C($sp)
/* 106358 802E4AD8 8FB20068 */  lw        $s2, 0x68($sp)
/* 10635C 802E4ADC 8FB10064 */  lw        $s1, 0x64($sp)
/* 106360 802E4AE0 8FB00060 */  lw        $s0, 0x60($sp)
/* 106364 802E4AE4 03E00008 */  jr        $ra
/* 106368 802E4AE8 27BD0088 */   addiu    $sp, $sp, 0x88

### DECOMPILED C INSTRUCTIONS:

void entity_HeartBlockContent__setupGfx(s32 entityIndex, Gfx* arg1) {
    Entity* entity = get_entity_by_index(entityIndex);
    HeartBlockContentData* data = entity->dataBuf.heartBlockContent;
    Gfx* gfxPos = gMainGfxPos;
    s32 alpha;
    Matrix4f sp18;
    Gfx* dlist;

    dlist = ENTITY_ADDR(entity, Gfx*, arg1);

    gDPSetCombineMode(gfxPos++, PM_CC_01, PM_CC_02);
    gDPSetPrimColor(gfxPos++, 0, 0, 0, 0, 0, entity->alpha);

    alpha = 92;
    if (entity->alpha < alpha) {
        alpha = entity->alpha;
    }

    guRotateF(sp18, entity_HeartBlockContent_get_previous_yaw(data, 2), 0.0f, 1.0f, 0.0f);
    guMtxF2L(sp18, &data->unk_58);
    gDisplayContext->matrixStack[gMatrixListPos] = data->unk_58;
    gSPMatrix(gfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++], G_MTX_PUSH | G_MTX_MUL | G_MTX_MODELVIEW);
    gDPSetRenderMode(gfxPos++, AA_EN | Z_CMP | 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 | Z_CMP | 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));
    gSPDisplayList(gfxPos++, dlist);
    gDPPipeSync(gfxPos++);
    gDPSetCombineMode(gfxPos++, PM_CC_01, PM_CC_02);
    gDPSetPrimColor(gfxPos++, 0, 0, 0, 0, 0, alpha);
    gSPPopMatrix(gfxPos++, G_MTX_MODELVIEW);

    alpha = 72;
    if (entity->alpha < alpha) {
        alpha = entity->alpha;
    }

    guRotateF(sp18, entity_HeartBlockContent_get_previous_yaw(data, 3), 0.0f, 1.0f, 0.0f);
    guMtxF2L(sp18, &data->unk_98);
    gDisplayContext->matrixStack[gMatrixListPos] = data->unk_98;
    gSPMatrix(gfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++], G_MTX_PUSH | G_MTX_MUL | G_MTX_MODELVIEW);
    gDPSetRenderMode(gfxPos++, AA_EN | Z_CMP | 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 | Z_CMP | 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));
    gSPDisplayList(gfxPos++, dlist);
    gDPPipeSync(gfxPos++);
    gDPSetCombineMode(gfxPos++, PM_CC_01, PM_CC_02);
    gDPSetPrimColor(gfxPos++, 0, 0, 0, 0, 0, alpha);
    gSPPopMatrix(gfxPos++, G_MTX_MODELVIEW);

    gMainGfxPos = gfxPos;
}