### RAW ASSEMBLY INSTRUCTIONS:

dlabel func_8025D4C8
/* 18BDA8 8025D4C8 27BDFFD0 */  addiu     $sp, $sp, -0x30
/* 18BDAC 8025D4CC AFB1001C */  sw        $s1, 0x1C($sp)
/* 18BDB0 8025D4D0 0080882D */  daddu     $s1, $a0, $zero
/* 18BDB4 8025D4D4 AFBF0028 */  sw        $ra, 0x28($sp)
/* 18BDB8 8025D4D8 AFB30024 */  sw        $s3, 0x24($sp)
/* 18BDBC 8025D4DC AFB20020 */  sw        $s2, 0x20($sp)
/* 18BDC0 8025D4E0 AFB00018 */  sw        $s0, 0x18($sp)
/* 18BDC4 8025D4E4 8E3000C0 */  lw        $s0, 0xC0($s1)
/* 18BDC8 8025D4E8 00A0982D */  daddu     $s3, $a1, $zero
/* 18BDCC 8025D4EC 02139021 */  addu      $s2, $s0, $s3
/* 18BDD0 8025D4F0 824308BC */  lb        $v1, 0x8BC($s2)
/* 18BDD4 8025D4F4 10600005 */  beqz      $v1, .L8025D50C
/* 18BDD8 8025D4F8 24020001 */   addiu    $v0, $zero, 0x1
/* 18BDDC 8025D4FC 1062001E */  beq       $v1, $v0, .L8025D578
/* 18BDE0 8025D500 00131080 */   sll      $v0, $s3, 2
/* 18BDE4 8025D504 08097581 */  j         .L8025D604
/* 18BDE8 8025D508 00000000 */   nop
.L8025D50C:
/* 18BDEC 8025D50C 00131080 */  sll       $v0, $s3, 2
/* 18BDF0 8025D510 244208B0 */  addiu     $v0, $v0, 0x8B0
/* 18BDF4 8025D514 3C013ECC */  lui       $at, (0x3ECCCCCD >> 16)
/* 18BDF8 8025D518 3421CCCD */  ori       $at, $at, (0x3ECCCCCD & 0xFFFF)
/* 18BDFC 8025D51C 44810000 */  mtc1      $at, $f0
/* 18BE00 8025D520 02021021 */  addu      $v0, $s0, $v0
/* 18BE04 8025D524 AFA20014 */  sw        $v0, 0x14($sp)
/* 18BE08 8025D528 E7A00010 */  swc1      $f0, 0x10($sp)
/* 18BE0C 8025D52C 8E250058 */  lw        $a1, 0x58($s1)
/* 18BE10 8025D530 8E26005C */  lw        $a2, 0x5C($s1)
/* 18BE14 8025D534 8E270060 */  lw        $a3, 0x60($s1)
/* 18BE18 8025D538 0C01C3AC */  jal       fx_aura
/* 18BE1C 8025D53C 24040001 */   addiu    $a0, $zero, 0x1
/* 18BE20 8025D540 24020001 */  addiu     $v0, $zero, 0x1
/* 18BE24 8025D544 A24208BC */  sb        $v0, 0x8BC($s2)
/* 18BE28 8025D548 00131100 */  sll       $v0, $s3, 4
/* 18BE2C 8025D54C 02021021 */  addu      $v0, $s0, $v0
/* 18BE30 8025D550 24030028 */  addiu     $v1, $zero, 0x28
/* 18BE34 8025D554 A44308C6 */  sh        $v1, 0x8C6($v0)
/* 18BE38 8025D558 A44308C8 */  sh        $v1, 0x8C8($v0)
/* 18BE3C 8025D55C 240300FF */  addiu     $v1, $zero, 0xFF
/* 18BE40 8025D560 A44308CA */  sh        $v1, 0x8CA($v0)
/* 18BE44 8025D564 A44008CC */  sh        $zero, 0x8CC($v0)
/* 18BE48 8025D568 A44308CE */  sh        $v1, 0x8CE($v0)
/* 18BE4C 8025D56C A44008D0 */  sh        $zero, 0x8D0($v0)
/* 18BE50 8025D570 A44008D2 */  sh        $zero, 0x8D2($v0)
/* 18BE54 8025D574 00131080 */  sll       $v0, $s3, 2
.L8025D578:
/* 18BE58 8025D578 02021021 */  addu      $v0, $s0, $v0
/* 18BE5C 8025D57C 8C4508B0 */  lw        $a1, 0x8B0($v0)
/* 18BE60 8025D580 C6200058 */  lwc1      $f0, 0x58($s1)
/* 18BE64 8025D584 8CA3000C */  lw        $v1, 0xC($a1)
/* 18BE68 8025D588 00132100 */  sll       $a0, $s3, 4
/* 18BE6C 8025D58C E4600004 */  swc1      $f0, 0x4($v1)
/* 18BE70 8025D590 C620005C */  lwc1      $f0, 0x5C($s1)
/* 18BE74 8025D594 02042021 */  addu      $a0, $s0, $a0
/* 18BE78 8025D598 E4600008 */  swc1      $f0, 0x8($v1)
/* 18BE7C 8025D59C 848208CC */  lh        $v0, 0x8CC($a0)
/* 18BE80 8025D5A0 C6200060 */  lwc1      $f0, 0x60($s1)
/* 18BE84 8025D5A4 44821000 */  mtc1      $v0, $f2
/* 18BE88 8025D5A8 00000000 */  nop
/* 18BE8C 8025D5AC 468010A0 */  cvt.s.w   $f2, $f2
/* 18BE90 8025D5B0 46020000 */  add.s     $f0, $f0, $f2
/* 18BE94 8025D5B4 E460000C */  swc1      $f0, 0xC($v1)
/* 18BE98 8025D5B8 848208C6 */  lh        $v0, 0x8C6($a0)
/* 18BE9C 8025D5BC 3C0142C8 */  lui       $at, (0x42C80000 >> 16)
/* 18BEA0 8025D5C0 44810000 */  mtc1      $at, $f0
/* 18BEA4 8025D5C4 44821000 */  mtc1      $v0, $f2
/* 18BEA8 8025D5C8 00000000 */  nop
/* 18BEAC 8025D5CC 468010A0 */  cvt.s.w   $f2, $f2
/* 18BEB0 8025D5D0 8CA2000C */  lw        $v0, 0xC($a1)
/* 18BEB4 8025D5D4 46001083 */  div.s     $f2, $f2, $f0
/* 18BEB8 8025D5D8 E442001C */  swc1      $f2, 0x1C($v0)
/* 18BEBC 8025D5DC 848208C8 */  lh        $v0, 0x8C8($a0)
/* 18BEC0 8025D5E0 44821000 */  mtc1      $v0, $f2
/* 18BEC4 8025D5E4 00000000 */  nop
/* 18BEC8 8025D5E8 468010A0 */  cvt.s.w   $f2, $f2
/* 18BECC 8025D5EC 8CA2000C */  lw        $v0, 0xC($a1)
/* 18BED0 8025D5F0 46001083 */  div.s     $f2, $f2, $f0
/* 18BED4 8025D5F4 E4420020 */  swc1      $f2, 0x20($v0)
/* 18BED8 8025D5F8 8CA3000C */  lw        $v1, 0xC($a1)
/* 18BEDC 8025D5FC 848208CA */  lh        $v0, 0x8CA($a0)
/* 18BEE0 8025D600 AC620028 */  sw        $v0, 0x28($v1)
.L8025D604:
/* 18BEE4 8025D604 8FBF0028 */  lw        $ra, 0x28($sp)
/* 18BEE8 8025D608 8FB30024 */  lw        $s3, 0x24($sp)
/* 18BEEC 8025D60C 8FB20020 */  lw        $s2, 0x20($sp)
/* 18BEF0 8025D610 8FB1001C */  lw        $s1, 0x1C($sp)
/* 18BEF4 8025D614 8FB00018 */  lw        $s0, 0x18($sp)
/* 18BEF8 8025D618 03E00008 */  jr        $ra
/* 18BEFC 8025D61C 27BD0030 */   addiu    $sp, $sp, 0x30

### DECOMPILED C INSTRUCTIONS:

void func_8025D4C8(ActorPart* part, s32 decorationIndex) {
    DecorationTable* decor = part->decorationTable;
    EffectInstance* effect;
    AuraFXData* data;
    f32 scale;

    switch (decor->state[decorationIndex]) {
        case 0:
            fx_aura(1, part->currentPos.x, part->currentPos.y, part->currentPos.z, 0.4f, &decor->effect[decorationIndex]);
            decor->state[decorationIndex] = 1;
            decor->unk_8C6[decorationIndex].unk00 = 40;
            decor->unk_8C6[decorationIndex].unk02 = 40;
            decor->unk_8C6[decorationIndex].unk04 = 255;
            decor->unk_8C6[decorationIndex].unk06 = 0;
            decor->unk_8C6[decorationIndex].unk08 = 255;
            decor->unk_8C6[decorationIndex].unk0A = 0;
            decor->unk_8C6[decorationIndex].unk0C = 0;
            // fallthrough
        case 1:
            effect = decor->effect[decorationIndex];
            data = effect->data.aura;
            data->posA.x = part->currentPos.x;
            data->posA.y = part->currentPos.y;
            data->posA.z = part->currentPos.z + decor->unk_8C6[decorationIndex].unk06;

            scale = decor->unk_8C6[decorationIndex].unk00;
            scale /= 100.0f;
            effect->data.aura->scale.x = scale;
            scale = decor->unk_8C6[decorationIndex].unk02;
            scale /= 100.0f;
            effect->data.aura->scale.y = scale;
            effect->data.aura->primA = decor->unk_8C6[decorationIndex].unk04;
            break;
    }
}


### RAW ASSEMBLY INSTRUCTIONS:

glabel PollMusicEvents
/* FA4C0 802D5B10 27BDFFC0 */  addiu     $sp, $sp, -0x40
/* FA4C4 802D5B14 27A40010 */  addiu     $a0, $sp, 0x10
/* FA4C8 802D5B18 27A50014 */  addiu     $a1, $sp, 0x14
/* FA4CC 802D5B1C AFBF0038 */  sw        $ra, 0x38($sp)
/* FA4D0 802D5B20 AFB70034 */  sw        $s7, 0x34($sp)
/* FA4D4 802D5B24 AFB60030 */  sw        $s6, 0x30($sp)
/* FA4D8 802D5B28 AFB5002C */  sw        $s5, 0x2C($sp)
/* FA4DC 802D5B2C AFB40028 */  sw        $s4, 0x28($sp)
/* FA4E0 802D5B30 AFB30024 */  sw        $s3, 0x24($sp)
/* FA4E4 802D5B34 AFB20020 */  sw        $s2, 0x20($sp)
/* FA4E8 802D5B38 AFB1001C */  sw        $s1, 0x1C($sp)
/* FA4EC 802D5B3C 0C015823 */  jal       bgm_poll_music_events
/* FA4F0 802D5B40 AFB00018 */   sw       $s0, 0x18($sp)
/* FA4F4 802D5B44 8FA20014 */  lw        $v0, 0x14($sp)
/* FA4F8 802D5B48 10400036 */  beqz      $v0, .L802D5C24
/* FA4FC 802D5B4C 0000982D */   daddu    $s3, $zero, $zero
/* FA500 802D5B50 3C1700FF */  lui       $s7, (0xFF0000 >> 16)
/* FA504 802D5B54 2416FFFF */  addiu     $s6, $zero, -0x1
/* FA508 802D5B58 3C15802E */  lui       $s5, %hi(RunningMusicEvents)
/* FA50C 802D5B5C 26B5B7D8 */  addiu     $s5, $s5, %lo(RunningMusicEvents)
/* FA510 802D5B60 3C14802E */  lui       $s4, %hi(RunningMusicEventIDs)
/* FA514 802D5B64 2694B800 */  addiu     $s4, $s4, %lo(RunningMusicEventIDs)
.L802D5B68:
/* FA518 802D5B68 8FA20010 */  lw        $v0, 0x10($sp)
/* FA51C 802D5B6C 8C430000 */  lw        $v1, 0x0($v0)
/* FA520 802D5B70 3C04802E */  lui       $a0, %hi(MusicEventList)
/* FA524 802D5B74 8C84B7D0 */  lw        $a0, %lo(MusicEventList)($a0)
/* FA528 802D5B78 00771024 */  and       $v0, $v1, $s7
/* FA52C 802D5B7C 00022C02 */  srl       $a1, $v0, 16
/* FA530 802D5B80 8C820000 */  lw        $v0, 0x0($a0)
/* FA534 802D5B84 10560009 */  beq       $v0, $s6, .L802D5BAC
/* FA538 802D5B88 306300FF */   andi     $v1, $v1, 0xFF
/* FA53C 802D5B8C 2406FFFF */  addiu     $a2, $zero, -0x1
/* FA540 802D5B90 8C820000 */  lw        $v0, 0x0($a0)
.L802D5B94:
/* FA544 802D5B94 10450005 */  beq       $v0, $a1, .L802D5BAC
/* FA548 802D5B98 00000000 */   nop
/* FA54C 802D5B9C 24840014 */  addiu     $a0, $a0, 0x14
/* FA550 802D5BA0 8C820000 */  lw        $v0, 0x0($a0)
/* FA554 802D5BA4 1446FFFB */  bne       $v0, $a2, .L802D5B94
/* FA558 802D5BA8 00000000 */   nop
.L802D5BAC:
/* FA55C 802D5BAC 50800017 */  beql      $a0, $zero, .L802D5C0C
/* FA560 802D5BB0 26730001 */   addiu    $s3, $s3, 0x1
/* FA564 802D5BB4 00031080 */  sll       $v0, $v1, 2
/* FA568 802D5BB8 00821021 */  addu      $v0, $a0, $v0
/* FA56C 802D5BBC 00058880 */  sll       $s1, $a1, 2
/* FA570 802D5BC0 02359021 */  addu      $s2, $s1, $s5
/* FA574 802D5BC4 8E430000 */  lw        $v1, 0x0($s2)
/* FA578 802D5BC8 8C500004 */  lw        $s0, 0x4($v0)
/* FA57C 802D5BCC 10600004 */  beqz      $v1, .L802D5BE0
/* FA580 802D5BD0 02341021 */   addu     $v0, $s1, $s4
/* FA584 802D5BD4 8C440000 */  lw        $a0, 0x0($v0)
/* FA588 802D5BD8 0C0B102B */  jal       kill_script_by_ID
/* FA58C 802D5BDC 00000000 */   nop
.L802D5BE0:
/* FA590 802D5BE0 5200000A */  beql      $s0, $zero, .L802D5C0C
/* FA594 802D5BE4 26730001 */   addiu    $s3, $s3, 0x1
/* FA598 802D5BE8 0200202D */  daddu     $a0, $s0, $zero
/* FA59C 802D5BEC 24050001 */  addiu     $a1, $zero, 0x1
/* FA5A0 802D5BF0 0C0B0CF8 */  jal       start_script
/* FA5A4 802D5BF4 0000302D */   daddu    $a2, $zero, $zero
/* FA5A8 802D5BF8 AE420000 */  sw        $v0, 0x0($s2)
/* FA5AC 802D5BFC 8C430144 */  lw        $v1, 0x144($v0)
/* FA5B0 802D5C00 02341021 */  addu      $v0, $s1, $s4
/* FA5B4 802D5C04 AC430000 */  sw        $v1, 0x0($v0)
/* FA5B8 802D5C08 26730001 */  addiu     $s3, $s3, 0x1
.L802D5C0C:
/* FA5BC 802D5C0C 8FA20010 */  lw        $v0, 0x10($sp)
/* FA5C0 802D5C10 8FA30014 */  lw        $v1, 0x14($sp)
/* FA5C4 802D5C14 24420004 */  addiu     $v0, $v0, 0x4
/* FA5C8 802D5C18 0263182B */  sltu      $v1, $s3, $v1
/* FA5CC 802D5C1C 1460FFD2 */  bnez      $v1, .L802D5B68
/* FA5D0 802D5C20 AFA20010 */   sw       $v0, 0x10($sp)
.L802D5C24:
/* FA5D4 802D5C24 0C01582A */  jal       bgm_flush_music_events
/* FA5D8 802D5C28 00000000 */   nop
/* FA5DC 802D5C2C 3C04802E */  lui       $a0, %hi(D_802D9D30)
/* FA5E0 802D5C30 24849D30 */  addiu     $a0, $a0, %lo(D_802D9D30)
/* FA5E4 802D5C34 8C830000 */  lw        $v1, 0x0($a0)
/* FA5E8 802D5C38 24630001 */  addiu     $v1, $v1, 0x1
/* FA5EC 802D5C3C AC830000 */  sw        $v1, 0x0($a0)
/* FA5F0 802D5C40 8FBF0038 */  lw        $ra, 0x38($sp)
/* FA5F4 802D5C44 8FB70034 */  lw        $s7, 0x34($sp)
/* FA5F8 802D5C48 8FB60030 */  lw        $s6, 0x30($sp)
/* FA5FC 802D5C4C 8FB5002C */  lw        $s5, 0x2C($sp)
/* FA600 802D5C50 8FB40028 */  lw        $s4, 0x28($sp)
/* FA604 802D5C54 8FB30024 */  lw        $s3, 0x24($sp)
/* FA608 802D5C58 8FB20020 */  lw        $s2, 0x20($sp)
/* FA60C 802D5C5C 8FB1001C */  lw        $s1, 0x1C($sp)
/* FA610 802D5C60 8FB00018 */  lw        $s0, 0x18($sp)
/* FA614 802D5C64 0000102D */  daddu     $v0, $zero, $zero
/* FA618 802D5C68 03E00008 */  jr        $ra
/* FA61C 802D5C6C 27BD0040 */   addiu    $sp, $sp, 0x40

### DECOMPILED C INSTRUCTIONS:

ApiStatus PollMusicEvents(Evt* script, s32 isInitialCall) {
    MusicEventTrigger* list;
    s32 musicEventID, scriptSelector;
    u32 count;
    s32 i;

    bgm_poll_music_events(&list, &count);

    for (i = 0; i < count; i++, list++) {
        MusicEvent* cur = MusicEventList;
        musicEventID = (*list & 0xFF0000) >> 0x10;
        scriptSelector = *list & 0xFF;
        while (cur->musicEventID != -1) {
            if (cur->musicEventID == musicEventID) {
                break;
            }
            cur++;
        }
        // @bug? can cur ever be NULL here?
        // condition should probably be if (cur->musicEventID != -1)
        if (cur != NULL) {
            EvtScript* newSource = cur->scripts[scriptSelector];
            if (RunningMusicEvents[musicEventID] != NULL) {
                kill_script_by_ID(RunningMusicEventIDs[musicEventID]);
            }
            if (newSource != NULL) {
                Evt* newEvt = start_script(newSource, EVT_PRIORITY_1, 0);
                RunningMusicEvents[musicEventID] = newEvt;
                RunningMusicEventIDs[musicEventID] = newEvt->id;
            }
        }
    }
    bgm_flush_music_events();
    MusicEventPollCount++;
    return ApiStatus_BLOCK;
}


### RAW ASSEMBLY INSTRUCTIONS:

glabel general_heap_create_obfuscated
/* 316D90 802AE000 27BDFFC0 */  addiu     $sp, $sp, -0x40
/* 316D94 802AE004 AFB40028 */  sw        $s4, 0x28($sp)
/* 316D98 802AE008 3C1433F5 */  lui       $s4, (0x33F50000 >> 16)
/* 316D9C 802AE00C AFB30024 */  sw        $s3, 0x24($sp)
/* 316DA0 802AE010 3C137013 */  lui       $s3, %hi(D_7012ACA1)
/* 316DA4 802AE014 2673ACA1 */  addiu     $s3, $s3, %lo(D_7012ACA1)
/* 316DA8 802AE018 AFB00018 */  sw        $s0, 0x18($sp)
/* 316DAC 802AE01C 0000802D */  daddu     $s0, $zero, $zero
/* 316DB0 802AE020 3C05B000 */  lui       $a1, (0xB0000800 >> 16)
/* 316DB4 802AE024 34A50800 */  ori       $a1, $a1, (0xB0000800 & 0xFFFF)
/* 316DB8 802AE028 3C04800A */  lui       $a0, %hi(nuPiCartHandle)
/* 316DBC 802AE02C 8C84A638 */  lw        $a0, %lo(nuPiCartHandle)($a0)
/* 316DC0 802AE030 27A60010 */  addiu     $a2, $sp, 0x10
/* 316DC4 802AE034 AFB20020 */  sw        $s2, 0x20($sp)
/* 316DC8 802AE038 0200902D */  daddu     $s2, $s0, $zero
/* 316DCC 802AE03C AFB5002C */  sw        $s5, 0x2C($sp)
/* 316DD0 802AE040 3C158006 */  lui       $s5, %hi(osEPiReadIo)
/* 316DD4 802AE044 26B50DC0 */  addiu     $s5, $s5, %lo(osEPiReadIo)
/* 316DD8 802AE048 AFBF003C */  sw        $ra, 0x3C($sp)
/* 316DDC 802AE04C AFBE0038 */  sw        $fp, 0x38($sp)
/* 316DE0 802AE050 AFB70034 */  sw        $s7, 0x34($sp)
/* 316DE4 802AE054 AFB60030 */  sw        $s6, 0x30($sp)
/* 316DE8 802AE058 02A0F809 */  jalr      $s5
/* 316DEC 802AE05C AFB1001C */   sw       $s1, 0x1C($sp)
/* 316DF0 802AE060 3C110031 */  lui       $s1, %hi(D_316C00)
/* 316DF4 802AE064 26316C00 */  addiu     $s1, $s1, %lo(D_316C00)
/* 316DF8 802AE068 8FA20010 */  lw        $v0, 0x10($sp)
/* 316DFC 802AE06C 3C030031 */  lui       $v1, %hi(D_316D90)
/* 316E00 802AE070 24636D90 */  addiu     $v1, $v1, %lo(D_316D90)
/* 316E04 802AE074 0282A023 */  subu      $s4, $s4, $v0
/* 316E08 802AE078 0223102B */  sltu      $v0, $s1, $v1
/* 316E0C 802AE07C 1040002B */  beqz      $v0, .L802AE12C
/* 316E10 802AE080 241E0023 */   addiu    $fp, $zero, 0x23
/* 316E14 802AE084 24170003 */  addiu     $s7, $zero, 0x3
/* 316E18 802AE088 0060B02D */  daddu     $s6, $v1, $zero
.L802AE08C:
/* 316E1C 802AE08C 0220282D */  daddu     $a1, $s1, $zero
.L802AE090:
/* 316E20 802AE090 3C04800A */  lui       $a0, %hi(nuPiCartHandle)
/* 316E24 802AE094 8C84A638 */  lw        $a0, %lo(nuPiCartHandle)($a0)
/* 316E28 802AE098 02A0F809 */  jalr      $s5
/* 316E2C 802AE09C 27A60010 */   addiu    $a2, $sp, 0x10
/* 316E30 802AE0A0 8FA30010 */  lw        $v1, 0x10($sp)
/* 316E34 802AE0A4 2407000F */  addiu     $a3, $zero, 0xF
/* 316E38 802AE0A8 3065FFFF */  andi      $a1, $v1, 0xFFFF
/* 316E3C 802AE0AC 00032402 */  srl       $a0, $v1, 16
/* 316E40 802AE0B0 00A41021 */  addu      $v0, $a1, $a0
/* 316E44 802AE0B4 02028021 */  addu      $s0, $s0, $v0
/* 316E48 802AE0B8 00121682 */  srl       $v0, $s2, 26
/* 316E4C 802AE0BC 1447000F */  bne       $v0, $a3, .L802AE0FC
/* 316E50 802AE0C0 00031682 */   srl      $v0, $v1, 26
/* 316E54 802AE0C4 24070009 */  addiu     $a3, $zero, 0x9
/* 316E58 802AE0C8 50470003 */  beql      $v0, $a3, .L802AE0D8
/* 316E5C 802AE0CC 00031542 */   srl      $v0, $v1, 21
/* 316E60 802AE0D0 145E000A */  bne       $v0, $fp, .L802AE0FC
/* 316E64 802AE0D4 00031542 */   srl      $v0, $v1, 21
.L802AE0D8:
/* 316E68 802AE0D8 3043001F */  andi      $v1, $v0, 0x1F
.L802AE0DC:
/* 316E6C 802AE0DC 00121402 */  srl       $v0, $s2, 16
/* 316E70 802AE0E0 3042001F */  andi      $v0, $v0, 0x1F
/* 316E74 802AE0E4 14620005 */  bne       $v1, $v0, .L802AE0FC
/* 316E78 802AE0E8 3082001F */   andi     $v0, $a0, 0x1F
/* 316E7C 802AE0EC 14620003 */  bne       $v1, $v0, .L802AE0FC
/* 316E80 802AE0F0 3242FFFF */   andi     $v0, $s2, 0xFFFF
/* 316E84 802AE0F4 02058023 */  subu      $s0, $s0, $a1
/* 316E88 802AE0F8 02028023 */  subu      $s0, $s0, $v0
.L802AE0FC:
/* 316E8C 802AE0FC 8FA40010 */  lw        $a0, 0x10($sp)
.L802AE100:
/* 316E90 802AE100 00041682 */  srl       $v0, $a0, 26
/* 316E94 802AE104 14570006 */  bne       $v0, $s7, .L802AE120
/* 316E98 802AE108 26310004 */   addiu    $s1, $s1, 0x4
/* 316E9C 802AE10C 3083FFFF */  andi      $v1, $a0, 0xFFFF
/* 316EA0 802AE110 00041402 */  srl       $v0, $a0, 16
/* 316EA4 802AE114 3042FC00 */  andi      $v0, $v0, 0xFC00
/* 316EA8 802AE118 00621821 */  addu      $v1, $v1, $v0
/* 316EAC 802AE11C 02038023 */  subu      $s0, $s0, $v1
.L802AE120:
/* 316EB0 802AE120 0236102B */  sltu      $v0, $s1, $s6
.L802AE124:
/* 316EB4 802AE124 1440FFD9 */  bnez      $v0, .L802AE08C
/* 316EB8 802AE128 0080902D */   daddu    $s2, $a0, $zero
.L802AE12C:
/* 316EBC 802AE12C 3C02FFD6 */  lui       $v0, (0xFFD6E66D >> 16)
.L802AE130:
/* 316EC0 802AE130 3442E66D */  ori       $v0, $v0, (0xFFD6E66D & 0xFFFF)
/* 316EC4 802AE134 02021021 */  addu      $v0, $s0, $v0
/* 316EC8 802AE138 02821023 */  subu      $v0, $s4, $v0
/* 316ECC 802AE13C 02629821 */  addu      $s3, $s3, $v0
/* 316ED0 802AE140 00131F02 */  srl       $v1, $s3, 28
/* 316ED4 802AE144 24020008 */  addiu     $v0, $zero, 0x8
/* 316ED8 802AE148 14620005 */  bne       $v1, $v0, .L802AE160
/* 316EDC 802AE14C 00000000 */   nop
/* 316EE0 802AE150 0260F809 */  jalr      $s3
/* 316EE4 802AE154 00000000 */   nop
/* 316EE8 802AE158 080AB85C */  j         .L802AE170
.L802AE15C:
/* 316EEC 802AE15C 00000000 */   nop
.L802AE160:
/* 316EF0 802AE160 3C04803E */  lui       $a0, %hi(gFrameBuf2)
/* 316EF4 802AE164 2484A800 */  addiu     $a0, $a0, %lo(gFrameBuf2)
/* 316EF8 802AE168 0C00A40C */  jal       _heap_create
/* 316EFC 802AE16C 3C050001 */   lui      $a1, (0x10000 >> 16)
.L802AE170:
/* 316F00 802AE170 8FBF003C */  lw        $ra, 0x3C($sp)
/* 316F04 802AE174 8FBE0038 */  lw        $fp, 0x38($sp)
/* 316F08 802AE178 8FB70034 */  lw        $s7, 0x34($sp)
/* 316F0C 802AE17C 8FB60030 */  lw        $s6, 0x30($sp)
/* 316F10 802AE180 8FB5002C */  lw        $s5, 0x2C($sp)
/* 316F14 802AE184 8FB40028 */  lw        $s4, 0x28($sp)
/* 316F18 802AE188 8FB30024 */  lw        $s3, 0x24($sp)
/* 316F1C 802AE18C 8FB20020 */  lw        $s2, 0x20($sp)
/* 316F20 802AE190 8FB1001C */  lw        $s1, 0x1C($sp)
/* 316F24 802AE194 8FB00018 */  lw        $s0, 0x18($sp)
/* 316F28 802AE198 03E00008 */  jr        $ra
/* 316F2C 802AE19C 27BD0040 */   addiu    $sp, $sp, 0x40

### DECOMPILED C INSTRUCTIONS:

void battle_heap_create_obfuscated(void) {
    battle_heap_create();
}