### RAW ASSEMBLY INSTRUCTIONS:

glabel au_engine_init
/* 2E25C 80052E5C 27BDFFB8 */  addiu     $sp, $sp, -0x48
/* 2E260 80052E60 AFB60040 */  sw        $s6, 0x40($sp)
/* 2E264 80052E64 0080B02D */  daddu     $s6, $a0, $zero
/* 2E268 80052E68 24050001 */  addiu     $a1, $zero, 0x1
/* 2E26C 80052E6C 3C028008 */  lui       $v0, %hi(gSynDriverPtr)
/* 2E270 80052E70 8C428E54 */  lw        $v0, %lo(gSynDriverPtr)($v0)
/* 2E274 80052E74 240619E0 */  addiu     $a2, $zero, 0x19E0
/* 2E278 80052E78 AFBF0044 */  sw        $ra, 0x44($sp)
/* 2E27C 80052E7C AFB5003C */  sw        $s5, 0x3C($sp)
/* 2E280 80052E80 AFB40038 */  sw        $s4, 0x38($sp)
/* 2E284 80052E84 AFB30034 */  sw        $s3, 0x34($sp)
/* 2E288 80052E88 AFB20030 */  sw        $s2, 0x30($sp)
/* 2E28C 80052E8C AFB1002C */  sw        $s1, 0x2C($sp)
/* 2E290 80052E90 AFB00028 */  sw        $s0, 0x28($sp)
/* 2E294 80052E94 8C550018 */  lw        $s5, 0x18($v0)
/* 2E298 80052E98 0000982D */  daddu     $s3, $zero, $zero
/* 2E29C 80052E9C 0C015FE4 */  jal       alHeapAlloc
/* 2E2A0 80052EA0 02A0202D */   daddu    $a0, $s5, $zero
/* 2E2A4 80052EA4 02A0202D */  daddu     $a0, $s5, $zero
/* 2E2A8 80052EA8 24050001 */  addiu     $a1, $zero, 0x1
/* 2E2AC 80052EAC 24060A9C */  addiu     $a2, $zero, 0xA9C
/* 2E2B0 80052EB0 3C12800A */  lui       $s2, %hi(gSoundGlobals)
/* 2E2B4 80052EB4 2652A5C0 */  addiu     $s2, $s2, %lo(gSoundGlobals)
/* 2E2B8 80052EB8 0C015FE4 */  jal       alHeapAlloc
/* 2E2BC 80052EBC AE420000 */   sw       $v0, 0x0($s2)
/* 2E2C0 80052EC0 02A0202D */  daddu     $a0, $s5, $zero
/* 2E2C4 80052EC4 24050001 */  addiu     $a1, $zero, 0x1
/* 2E2C8 80052EC8 24060A9C */  addiu     $a2, $zero, 0xA9C
/* 2E2CC 80052ECC 3C11800A */  lui       $s1, %hi(gBGMPlayerA)
/* 2E2D0 80052ED0 2631A664 */  addiu     $s1, $s1, %lo(gBGMPlayerA)
/* 2E2D4 80052ED4 0C015FE4 */  jal       alHeapAlloc
/* 2E2D8 80052ED8 AE220000 */   sw       $v0, 0x0($s1)
/* 2E2DC 80052EDC 02A0202D */  daddu     $a0, $s5, $zero
/* 2E2E0 80052EE0 24050001 */  addiu     $a1, $zero, 0x1
/* 2E2E4 80052EE4 3C01800A */  lui       $at, %hi(gBGMPlayerB)
/* 2E2E8 80052EE8 AC22A5FC */  sw        $v0, %lo(gBGMPlayerB)($at)
/* 2E2EC 80052EEC 0C015FE4 */  jal       alHeapAlloc
/* 2E2F0 80052EF0 24060A9C */   addiu    $a2, $zero, 0xA9C
/* 2E2F4 80052EF4 02A0202D */  daddu     $a0, $s5, $zero
/* 2E2F8 80052EF8 24050001 */  addiu     $a1, $zero, 0x1
/* 2E2FC 80052EFC 3C01800A */  lui       $at, %hi(gBGMPlayerC)
/* 2E300 80052F00 AC22A5CC */  sw        $v0, %lo(gBGMPlayerC)($at)
/* 2E304 80052F04 0C015FE4 */  jal       alHeapAlloc
/* 2E308 80052F08 240606CC */   addiu    $a2, $zero, 0x6CC
/* 2E30C 80052F0C 02A0202D */  daddu     $a0, $s5, $zero
/* 2E310 80052F10 24050001 */  addiu     $a1, $zero, 0x1
/* 2E314 80052F14 24060834 */  addiu     $a2, $zero, 0x834
/* 2E318 80052F18 3C10800A */  lui       $s0, %hi(gSoundManager)
/* 2E31C 80052F1C 2610A640 */  addiu     $s0, $s0, %lo(gSoundManager)
/* 2E320 80052F20 0C015FE4 */  jal       alHeapAlloc
/* 2E324 80052F24 AE020000 */   sw       $v0, 0x0($s0)
/* 2E328 80052F28 02A0202D */  daddu     $a0, $s5, $zero
/* 2E32C 80052F2C 24050001 */  addiu     $a1, $zero, 0x1
/* 2E330 80052F30 8E280000 */  lw        $t0, 0x0($s1)
/* 2E334 80052F34 8E070000 */  lw        $a3, 0x0($s0)
/* 2E338 80052F38 8E430000 */  lw        $v1, 0x0($s2)
/* 2E33C 80052F3C 34068000 */  ori       $a2, $zero, 0x8000
/* 2E340 80052F40 3C01800A */  lui       $at, %hi(gAuAmbienceManager)
/* 2E344 80052F44 AC22A628 */  sw        $v0, %lo(gAuAmbienceManager)($at)
/* 2E348 80052F48 0060A02D */  daddu     $s4, $v1, $zero
/* 2E34C 80052F4C AD070004 */  sw        $a3, 0x4($t0)
/* 2E350 80052F50 0C015FE4 */  jal       alHeapAlloc
/* 2E354 80052F54 AC430000 */   sw       $v1, 0x0($v0)
/* 2E358 80052F58 0280802D */  daddu     $s0, $s4, $zero
/* 2E35C 80052F5C 24435000 */  addiu     $v1, $v0, 0x5000
/* 2E360 80052F60 AE82005C */  sw        $v0, 0x5C($s4)
/* 2E364 80052F64 24427000 */  addiu     $v0, $v0, 0x7000
/* 2E368 80052F68 AE830060 */  sw        $v1, 0x60($s4)
/* 2E36C 80052F6C AE820064 */  sw        $v0, 0x64($s4)
/* 2E370 80052F70 AE830068 */  sw        $v1, 0x68($s4)
.L80052F74:
/* 2E374 80052F74 02A0202D */  daddu     $a0, $s5, $zero
/* 2E378 80052F78 24050001 */  addiu     $a1, $zero, 0x1
/* 2E37C 80052F7C 0C015FE4 */  jal       alHeapAlloc
/* 2E380 80052F80 24060A9C */   addiu    $a2, $zero, 0xA9C
/* 2E384 80052F84 AE02006C */  sw        $v0, 0x6C($s0)
/* 2E388 80052F88 26730001 */  addiu     $s3, $s3, 0x1
/* 2E38C 80052F8C 1260FFF9 */  beqz      $s3, .L80052F74
/* 2E390 80052F90 26100008 */   addiu    $s0, $s0, 0x8
/* 2E394 80052F94 02A0202D */  daddu     $a0, $s5, $zero
/* 2E398 80052F98 24050001 */  addiu     $a1, $zero, 0x1
/* 2E39C 80052F9C 0C015FE4 */  jal       alHeapAlloc
/* 2E3A0 80052FA0 24065200 */   addiu    $a2, $zero, 0x5200
/* 2E3A4 80052FA4 02A0202D */  daddu     $a0, $s5, $zero
/* 2E3A8 80052FA8 24050001 */  addiu     $a1, $zero, 0x1
/* 2E3AC 80052FAC 24060030 */  addiu     $a2, $zero, 0x30
/* 2E3B0 80052FB0 0C015FE4 */  jal       alHeapAlloc
/* 2E3B4 80052FB4 AE8200A0 */   sw       $v0, 0xA0($s4)
/* 2E3B8 80052FB8 02A0202D */  daddu     $a0, $s5, $zero
/* 2E3BC 80052FBC 24050001 */  addiu     $a1, $zero, 0x1
/* 2E3C0 80052FC0 24060360 */  addiu     $a2, $zero, 0x360
/* 2E3C4 80052FC4 0C015FE4 */  jal       alHeapAlloc
/* 2E3C8 80052FC8 AE820004 */   sw       $v0, 0x4($s4)
/* 2E3CC 80052FCC 02A0202D */  daddu     $a0, $s5, $zero
/* 2E3D0 80052FD0 24050001 */  addiu     $a1, $zero, 0x1
/* 2E3D4 80052FD4 24060200 */  addiu     $a2, $zero, 0x200
/* 2E3D8 80052FD8 0C015FE4 */  jal       alHeapAlloc
/* 2E3DC 80052FDC AE820054 */   sw       $v0, 0x54($s4)
/* 2E3E0 80052FE0 02A0202D */  daddu     $a0, $s5, $zero
/* 2E3E4 80052FE4 24050001 */  addiu     $a1, $zero, 0x1
/* 2E3E8 80052FE8 24060040 */  addiu     $a2, $zero, 0x40
/* 2E3EC 80052FEC 0C015FE4 */  jal       alHeapAlloc
/* 2E3F0 80052FF0 AE820058 */   sw       $v0, 0x58($s4)
/* 2E3F4 80052FF4 0000982D */  daddu     $s3, $zero, $zero
/* 2E3F8 80052FF8 8E840004 */  lw        $a0, 0x4($s4)
/* 2E3FC 80052FFC 44960000 */  mtc1      $s6, $f0
/* 2E400 80053000 00000000 */  nop
/* 2E404 80053004 46800020 */  cvt.s.w   $f0, $f0
/* 2E408 80053008 AE820094 */  sw        $v0, 0x94($s4)
/* 2E40C 8005300C 0C014CBD */  jal       au_reset_instrument
/* 2E410 80053010 E6800000 */   swc1     $f0, 0x0($s4)
/* 2E414 80053014 0C014CDC */  jal       au_reset_drum_entry
/* 2E418 80053018 26840008 */   addiu    $a0, $s4, 0x8
/* 2E41C 8005301C 0C014CEA */  jal       au_reset_instrument_entry
/* 2E420 80053020 26840014 */   addiu    $a0, $s4, 0x14
/* 2E424 80053024 0C015843 */  jal       func_8005610C
/* 2E428 80053028 00000000 */   nop
/* 2E42C 8005302C 0280102D */  daddu     $v0, $s4, $zero
/* 2E430 80053030 AE8000A4 */  sw        $zero, 0xA4($s4)
/* 2E434 80053034 AE8000A8 */  sw        $zero, 0xA8($s4)
.L80053038:
/* 2E438 80053038 A0400070 */  sb        $zero, 0x70($v0)
/* 2E43C 8005303C A0400071 */  sb        $zero, 0x71($v0)
/* 2E440 80053040 26730001 */  addiu     $s3, $s3, 0x1
/* 2E444 80053044 1260FFFC */  beqz      $s3, .L80053038
/* 2E448 80053048 24420008 */   addiu    $v0, $v0, 0x8
/* 2E44C 8005304C 0000982D */  daddu     $s3, $zero, $zero
/* 2E450 80053050 0280182D */  daddu     $v1, $s4, $zero
.L80053054:
/* 2E454 80053054 A0600040 */  sb        $zero, 0x40($v1)
/* 2E458 80053058 A0600041 */  sb        $zero, 0x41($v1)
/* 2E45C 8005305C 26730001 */  addiu     $s3, $s3, 0x1
/* 2E460 80053060 2E620004 */  sltiu     $v0, $s3, 0x4
/* 2E464 80053064 1440FFFB */  bnez      $v0, .L80053054
/* 2E468 80053068 24630004 */   addiu    $v1, $v1, 0x4
/* 2E46C 8005306C 0000982D */  daddu     $s3, $zero, $zero
/* 2E470 80053070 2416FFFF */  addiu     $s6, $zero, -0x1
/* 2E474 80053074 241200FF */  addiu     $s2, $zero, 0xFF
/* 2E478 80053078 24111320 */  addiu     $s1, $zero, 0x1320
.L8005307C:
/* 2E47C 8005307C 327000FF */  andi      $s0, $s3, 0xFF
/* 2E480 80053080 0200202D */  daddu     $a0, $s0, $zero
/* 2E484 80053084 0C015BB0 */  jal       au_pvoice_set_bus
/* 2E488 80053088 0000282D */   daddu    $a1, $zero, $zero
/* 2E48C 8005308C 0200202D */  daddu     $a0, $s0, $zero
/* 2E490 80053090 8E850004 */  lw        $a1, 0x4($s4)
/* 2E494 80053094 0C015C89 */  jal       func_80057224
/* 2E498 80053098 26730001 */   addiu    $s3, $s3, 0x1
/* 2E49C 8005309C 02911021 */  addu      $v0, $s4, $s1
/* 2E4A0 800530A0 AC400000 */  sw        $zero, 0x0($v0)
/* 2E4A4 800530A4 AC400004 */  sw        $zero, 0x4($v0)
/* 2E4A8 800530A8 A456000C */  sh        $s6, 0xC($v0)
/* 2E4AC 800530AC A052000E */  sb        $s2, 0xE($v0)
/* 2E4B0 800530B0 A052000F */  sb        $s2, 0xF($v0)
/* 2E4B4 800530B4 A0400010 */  sb        $zero, 0x10($v0)
/* 2E4B8 800530B8 A0400042 */  sb        $zero, 0x42($v0)
/* 2E4BC 800530BC A0400043 */  sb        $zero, 0x43($v0)
/* 2E4C0 800530C0 A0400044 */  sb        $zero, 0x44($v0)
/* 2E4C4 800530C4 A0400045 */  sb        $zero, 0x45($v0)
/* 2E4C8 800530C8 2E620018 */  sltiu     $v0, $s3, 0x18
/* 2E4CC 800530CC 1440FFEB */  bnez      $v0, .L8005307C
/* 2E4D0 800530D0 26310048 */   addiu    $s1, $s1, 0x48
/* 2E4D4 800530D4 0280202D */  daddu     $a0, $s4, $zero
/* 2E4D8 800530D8 3C0500F0 */  lui       $a1, (0xF00000 >> 16)
/* 2E4DC 800530DC 0C0150AF */  jal       au_load_INIT
/* 2E4E0 800530E0 02A0302D */   daddu    $a2, $s5, $zero
/* 2E4E4 800530E4 0000982D */  daddu     $s3, $zero, $zero
/* 2E4E8 800530E8 0280802D */  daddu     $s0, $s4, $zero
.L800530EC:
/* 2E4EC 800530EC 02A0202D */  daddu     $a0, $s5, $zero
/* 2E4F0 800530F0 24050001 */  addiu     $a1, $zero, 0x1
/* 2E4F4 800530F4 0C015FE4 */  jal       alHeapAlloc
/* 2E4F8 800530F8 24060840 */   addiu    $a2, $zero, 0x840
/* 2E4FC 800530FC AE021310 */  sw        $v0, 0x1310($s0)
/* 2E500 80053100 26730001 */  addiu     $s3, $s3, 0x1
/* 2E504 80053104 2E620003 */  sltiu     $v0, $s3, 0x3
/* 2E508 80053108 1440FFF8 */  bnez      $v0, .L800530EC
/* 2E50C 8005310C 26100004 */   addiu    $s0, $s0, 0x4
/* 2E510 80053110 24050001 */  addiu     $a1, $zero, 0x1
/* 2E514 80053114 0000302D */  daddu     $a2, $zero, $zero
/* 2E518 80053118 3C10800A */  lui       $s0, %hi(gBGMPlayerA)
/* 2E51C 8005311C 2610A664 */  addiu     $s0, $s0, %lo(gBGMPlayerA)
/* 2E520 80053120 8E040000 */  lw        $a0, 0x0($s0)
/* 2E524 80053124 0C013856 */  jal       au_bgm_player_init
/* 2E528 80053128 0280382D */   daddu    $a3, $s4, $zero
/* 2E52C 8005312C 27B20020 */  addiu     $s2, $sp, 0x20
/* 2E530 80053130 0240282D */  daddu     $a1, $s2, $zero
/* 2E534 80053134 24020003 */  addiu     $v0, $zero, 0x3
/* 2E538 80053138 8E040000 */  lw        $a0, 0x0($s0)
/* 2E53C 8005313C 241000FF */  addiu     $s0, $zero, 0xFF
/* 2E540 80053140 A3A00020 */  sb        $zero, 0x20($sp)
/* 2E544 80053144 A3A20021 */  sb        $v0, 0x21($sp)
/* 2E548 80053148 A3B00022 */  sb        $s0, 0x22($sp)
/* 2E54C 8005314C 0C0138D1 */  jal       au_bgm_set_effect_indices
/* 2E550 80053150 A3B00023 */   sb       $s0, 0x23($sp)
/* 2E554 80053154 24050002 */  addiu     $a1, $zero, 0x2
/* 2E558 80053158 00A0302D */  daddu     $a2, $a1, $zero
/* 2E55C 8005315C 3C11800A */  lui       $s1, %hi(gBGMPlayerB)
/* 2E560 80053160 2631A5FC */  addiu     $s1, $s1, %lo(gBGMPlayerB)
/* 2E564 80053164 8E240000 */  lw        $a0, 0x0($s1)
/* 2E568 80053168 0C013856 */  jal       au_bgm_player_init
/* 2E56C 8005316C 0280382D */   daddu    $a3, $s4, $zero
/* 2E570 80053170 0240282D */  daddu     $a1, $s2, $zero
/* 2E574 80053174 8E240000 */  lw        $a0, 0x0($s1)
/* 2E578 80053178 24020002 */  addiu     $v0, $zero, 0x2
/* 2E57C 8005317C A3A20020 */  sb        $v0, 0x20($sp)
/* 2E580 80053180 A3B00021 */  sb        $s0, 0x21($sp)
/* 2E584 80053184 A3B00022 */  sb        $s0, 0x22($sp)
/* 2E588 80053188 0C0138D1 */  jal       au_bgm_set_effect_indices
/* 2E58C 8005318C A3B00023 */   sb       $s0, 0x23($sp)
/* 2E590 80053190 24050004 */  addiu     $a1, $zero, 0x4
/* 2E594 80053194 24060001 */  addiu     $a2, $zero, 0x1
/* 2E598 80053198 0280382D */  daddu     $a3, $s4, $zero
/* 2E59C 8005319C 3C10800A */  lui       $s0, %hi(gSoundManager)
/* 2E5A0 800531A0 2610A640 */  addiu     $s0, $s0, %lo(gSoundManager)
/* 2E5A4 800531A4 8E040000 */  lw        $a0, 0x0($s0)
/* 2E5A8 800531A8 24020010 */  addiu     $v0, $zero, 0x10
/* 2E5AC 800531AC 0C012D10 */  jal       au_sfx_init
/* 2E5B0 800531B0 AFA20010 */   sw       $v0, 0x10($sp)
/* 2E5B4 800531B4 24050006 */  addiu     $a1, $zero, 0x6
/* 2E5B8 800531B8 24060001 */  addiu     $a2, $zero, 0x1
/* 2E5BC 800531BC 3C04800A */  lui       $a0, %hi(gAuAmbienceManager)
/* 2E5C0 800531C0 8C84A628 */  lw        $a0, %lo(gAuAmbienceManager)($a0)
/* 2E5C4 800531C4 0C0142E4 */  jal       au_amb_manager_init
/* 2E5C8 800531C8 0280382D */   daddu    $a3, $s4, $zero
/* 2E5CC 800531CC 0C014985 */  jal       au_init_voices
/* 2E5D0 800531D0 0280202D */   daddu    $a0, $s4, $zero
/* 2E5D4 800531D4 0280202D */  daddu     $a0, $s4, $zero
/* 2E5D8 800531D8 0C0153F0 */  jal       au_load_BK_headers
/* 2E5DC 800531DC 02A0282D */   daddu    $a1, $s5, $zero
/* 2E5E0 800531E0 8E82003C */  lw        $v0, 0x3C($s4)
/* 2E5E4 800531E4 24050020 */  addiu     $a1, $zero, 0x20
/* 2E5E8 800531E8 94440000 */  lhu       $a0, 0x0($v0)
/* 2E5EC 800531EC 0C01511F */  jal       au_fetch_SBN_file
/* 2E5F0 800531F0 27A60018 */   addiu    $a2, $sp, 0x18
/* 2E5F4 800531F4 14400007 */  bnez      $v0, .L80053214
/* 2E5F8 800531F8 3C0200FF */   lui      $v0, (0xFFFFFF >> 16)
/* 2E5FC 800531FC 3442FFFF */  ori       $v0, $v0, (0xFFFFFF & 0xFFFF)
/* 2E600 80053200 8FA40018 */  lw        $a0, 0x18($sp)
/* 2E604 80053204 8FA6001C */  lw        $a2, 0x1C($sp)
/* 2E608 80053208 8E8500A0 */  lw        $a1, 0xA0($s4)
/* 2E60C 8005320C 0C015380 */  jal       au_read_rom
/* 2E610 80053210 00C23024 */   and      $a2, $a2, $v0
.L80053214:
/* 2E614 80053214 8E040000 */  lw        $a0, 0x0($s0)
/* 2E618 80053218 0C012D8B */  jal       au_sfx_load_groups_from_SEF
/* 2E61C 8005321C 00000000 */   nop
/* 2E620 80053220 8E82003C */  lw        $v0, 0x3C($s4)
/* 2E624 80053224 24050040 */  addiu     $a1, $zero, 0x40
/* 2E628 80053228 94440002 */  lhu       $a0, 0x2($v0)
/* 2E62C 8005322C 0C01511F */  jal       au_fetch_SBN_file
/* 2E630 80053230 27A60018 */   addiu    $a2, $sp, 0x18
/* 2E634 80053234 14400004 */  bnez      $v0, .L80053248
/* 2E638 80053238 00000000 */   nop
/* 2E63C 8005323C 8FA50018 */  lw        $a1, 0x18($sp)
/* 2E640 80053240 0C01513E */  jal       au_load_PER
/* 2E644 80053244 0280202D */   daddu    $a0, $s4, $zero
.L80053248:
/* 2E648 80053248 8E82003C */  lw        $v0, 0x3C($s4)
/* 2E64C 8005324C 24050040 */  addiu     $a1, $zero, 0x40
/* 2E650 80053250 94440004 */  lhu       $a0, 0x4($v0)
/* 2E654 80053254 0C01511F */  jal       au_fetch_SBN_file
/* 2E658 80053258 27A60018 */   addiu    $a2, $sp, 0x18
/* 2E65C 8005325C 54400005 */  bnel      $v0, $zero, .L80053274
/* 2E660 80053260 0000202D */   daddu    $a0, $zero, $zero
/* 2E664 80053264 8FA50018 */  lw        $a1, 0x18($sp)
/* 2E668 80053268 0C01516D */  jal       au_load_PRG
/* 2E66C 8005326C 0280202D */   daddu    $a0, $s4, $zero
/* 2E670 80053270 0000202D */  daddu     $a0, $zero, $zero
.L80053274:
/* 2E674 80053274 268304EC */  addiu     $v1, $s4, 0x4EC
/* 2E678 80053278 268205EC */  addiu     $v0, $s4, 0x5EC
/* 2E67C 8005327C AE8212F0 */  sw        $v0, 0x12F0($s4)
/* 2E680 80053280 268200AC */  addiu     $v0, $s4, 0xAC
/* 2E684 80053284 AE8212F4 */  sw        $v0, 0x12F4($s4)
/* 2E688 80053288 268200EC */  addiu     $v0, $s4, 0xEC
/* 2E68C 8005328C AE8212F8 */  sw        $v0, 0x12F8($s4)
/* 2E690 80053290 268209EC */  addiu     $v0, $s4, 0x9EC
/* 2E694 80053294 AE8212FC */  sw        $v0, 0x12FC($s4)
/* 2E698 80053298 26820DEC */  addiu     $v0, $s4, 0xDEC
/* 2E69C 8005329C AE821300 */  sw        $v0, 0x1300($s4)
/* 2E6A0 800532A0 268211EC */  addiu     $v0, $s4, 0x11EC
/* 2E6A4 800532A4 AE8312EC */  sw        $v1, 0x12EC($s4)
/* 2E6A8 800532A8 AE821304 */  sw        $v0, 0x1304($s4)
/* 2E6AC 800532AC AE831308 */  sw        $v1, 0x1308($s4)
/* 2E6B0 800532B0 A2800053 */  sb        $zero, 0x53($s4)
/* 2E6B4 800532B4 A2800052 */  sb        $zero, 0x52($s4)
/* 2E6B8 800532B8 A2800051 */  sb        $zero, 0x51($s4)
/* 2E6BC 800532BC 0C015FB4 */  jal       au_delay_channel
/* 2E6C0 800532C0 A2800050 */   sb       $zero, 0x50($s4)
/* 2E6C4 800532C4 0C015414 */  jal       func_80055050
/* 2E6C8 800532C8 02A0202D */   daddu    $a0, $s5, $zero
/* 2E6CC 800532CC 8FBF0044 */  lw        $ra, 0x44($sp)
/* 2E6D0 800532D0 8FB60040 */  lw        $s6, 0x40($sp)
/* 2E6D4 800532D4 8FB5003C */  lw        $s5, 0x3C($sp)
/* 2E6D8 800532D8 8FB40038 */  lw        $s4, 0x38($sp)
/* 2E6DC 800532DC 8FB30034 */  lw        $s3, 0x34($sp)
/* 2E6E0 800532E0 8FB20030 */  lw        $s2, 0x30($sp)
/* 2E6E4 800532E4 8FB1002C */  lw        $s1, 0x2C($sp)
/* 2E6E8 800532E8 8FB00028 */  lw        $s0, 0x28($sp)
/* 2E6EC 800532EC 03E00008 */  jr        $ra
/* 2E6F0 800532F0 27BD0048 */   addiu    $sp, $sp, 0x48

### DECOMPILED C INSTRUCTIONS:

void au_engine_init(s32 outputRate) {
    AuGlobals* globals;
    ALHeap* alHeap;
    SBNFileEntry fileEntry;
    s32* dummyTrackData;
    u8 effects[4];
    u32 i;

    alHeap = gSynDriverPtr->heap;
    gSoundGlobals = alHeapAlloc(alHeap, 1, sizeof(*gSoundGlobals));

    gBGMPlayerA = alHeapAlloc(alHeap, 1, sizeof(*gBGMPlayerA));
    gBGMPlayerB = alHeapAlloc(alHeap, 1, sizeof(*gBGMPlayerB));
    gBGMPlayerC = alHeapAlloc(alHeap, 1, sizeof(*gBGMPlayerC));
    gSoundManager = alHeapAlloc(alHeap, 1, sizeof(*gSoundManager));
    gAuAmbienceManager = alHeapAlloc(alHeap, 1, sizeof(*gAuAmbienceManager));
    gBGMPlayerA->soundManager = gSoundManager;
    gAuAmbienceManager->globals = gSoundGlobals;

    globals = gSoundGlobals;
    dummyTrackData = alHeapAlloc(alHeap, 1, 0x8000);
    globals->dataBGM[0] = (BGMHeader*) &dummyTrackData[0];
    globals->dataBGM[1] = (BGMHeader*) &dummyTrackData[0x1400];
    globals->dataMSEQ[0] = (MSEQHeader*) &dummyTrackData[0x1C00];
    globals->dataMSEQ[1] = (MSEQHeader*) &dummyTrackData[0x1400];

    for (i = 0; i < ARRAY_COUNT(globals->unk_globals_6C); i++) {
        globals->unk_globals_6C[i].bgmPlayer = alHeapAlloc(alHeap, 1, sizeof(BGMPlayer));
    }

    globals->dataSEF = alHeapAlloc(alHeap, 1, 0x5200);
    globals->defaultInstrument = alHeapAlloc(alHeap, 1, sizeof(Instrument));
    globals->dataPER = alHeapAlloc(alHeap, 1, 6 * sizeof(PEREntry));
    globals->dataPRG = alHeapAlloc(alHeap, 1, 64 * sizeof(BGMInstrumentInfo));
    globals->musicEventQueue = alHeapAlloc(alHeap, 1, 16 * sizeof(MusicEventTrigger));
    globals->outputRate = outputRate;
    au_reset_instrument(globals->defaultInstrument);
    au_reset_drum_entry(&globals->defaultDrumEntry);
    au_reset_instrument_entry(&globals->defaultPRGEntry);
    bgm_clear_music_events();

    globals->audioThreadCallbacks[0] = NULL;
    globals->audioThreadCallbacks[1] = NULL;

    for (i = 0; i < ARRAY_COUNT(globals->unk_globals_6C); i++) {
        globals->unk_globals_6C[i].unk_4 = 0;
        globals->unk_globals_6C[i].unk_5 = 0;
    }

    for (i = 0; i < 4; i++) {
        globals->effectChanges[i].type = AU_FX_NONE;
        globals->effectChanges[i].changed = FALSE;
    }

    for (i = 0; i < ARRAY_COUNT(globals->voices); i++) {
        AuVoice* voice;
        au_pvoice_set_bus(i, 0);
        au_syn_set_wavetable(i, globals->defaultInstrument);
        voice = &globals->voices[i];
        voice->instrument = NULL;
        voice->pitchRatio = 0;
        voice->p_volume = -1;
        voice->pan = 0xFF;
        voice->reverb = 0xFF;
        voice->busId = 0;
        voice->stopPending = FALSE;
        voice->syncFlags = 0;
        voice->clientPriority = AU_PRIORITY_FREE;
        voice->priority = AU_PRIORITY_FREE;
    }

    au_load_INIT(globals, SBN_ROM_OFFSET, alHeap);

    for (i = 0; i < ARRAY_COUNT(globals->banks); i++) {
        globals->banks[i] = alHeapAlloc(alHeap, 1, 0x840);
    }

    au_bgm_player_init(gBGMPlayerA, AU_PRIORITY_BGM_PLAYER_MAIN, FX_BUS_BGMA_MAIN, globals);
    effects[0] = FX_BUS_BGMA_MAIN;
    effects[1] = FX_BUS_BGMA_AUX;
    effects[2] = -1;
    effects[3] = -1;
    au_bgm_set_effect_indices(gBGMPlayerA, effects);

    au_bgm_player_init(gBGMPlayerB, AU_PRIORITY_BGM_PLAYER_AUX, FX_BUS_BGMB, globals);
    effects[0] = FX_BUS_BGMB;
    effects[1] = -1;
    effects[2] = -1;
    effects[3] = -1;
    au_bgm_set_effect_indices(gBGMPlayerB, effects);

    au_sfx_init(gSoundManager, AU_PRIORITY_SFX_MANAGER, FX_BUS_SOUND, globals, 16);
    au_amb_manager_init(gAuAmbienceManager, AU_PRIORITY_MSEQ_MANAGER, FX_BUS_SOUND, globals);
    au_init_voices(globals);
    au_load_BK_headers(globals, alHeap);
    if (au_fetch_SBN_file(globals->mseqFileList[0], AU_FMT_SEF, &fileEntry) == AU_RESULT_OK) {
        au_read_rom(fileEntry.offset, globals->dataSEF, fileEntry.data & 0xFFFFFF);
    }
    au_sfx_load_groups_from_SEF(gSoundManager);
    if (au_fetch_SBN_file(globals->mseqFileList[1], AU_FMT_PER, &fileEntry) == AU_RESULT_OK) {
        au_load_PER(globals, fileEntry.offset);
    }
    if (au_fetch_SBN_file(globals->mseqFileList[2], AU_FMT_PRG, &fileEntry) == AU_RESULT_OK) {
        au_load_PRG(globals, fileEntry.offset);
    }

    globals->instrumentGroups[0] = globals->instrumentGroup1;
    globals->instrumentGroups[1] = globals->instrumentGroup2;
    globals->instrumentGroups[2] = globals->instrumentGroupX;
    globals->instrumentGroups[3] = globals->instrumentGroup3;
    globals->instrumentGroups[4] = globals->instrumentGroup4;
    globals->instrumentGroups[5] = globals->instrumentGroup5;
    globals->instrumentGroups[6] = globals->instrumentGroup6;
    globals->instrumentGroups[7] = globals->instrumentGroup1;
    globals->channelDelaySide = 0;
    globals->channelDelayTime = 0;
    globals->channelDelayBusId = 0;
    globals->channelDelayPending = 0;

    au_delay_channel(0);
    func_80055050(alHeap);
}


### RAW ASSEMBLY INSTRUCTIONS:

glabel execute_render_tasks
/* B40B8 8011D9B8 27BDFB88 */  addiu     $sp, $sp, -0x478
/* B40BC 8011D9BC 3C048015 */  lui       $a0, %hi(mdl_renderTaskCount)
/* B40C0 8011D9C0 248433B0 */  addiu     $a0, $a0, %lo(mdl_renderTaskCount)
/* B40C4 8011D9C4 AFBF0470 */  sw        $ra, 0x470($sp)
/* B40C8 8011D9C8 AFB7046C */  sw        $s7, 0x46C($sp)
/* B40CC 8011D9CC AFB60468 */  sw        $s6, 0x468($sp)
/* B40D0 8011D9D0 AFB50464 */  sw        $s5, 0x464($sp)
/* B40D4 8011D9D4 AFB40460 */  sw        $s4, 0x460($sp)
/* B40D8 8011D9D8 AFB3045C */  sw        $s3, 0x45C($sp)
/* B40DC 8011D9DC AFB20458 */  sw        $s2, 0x458($sp)
/* B40E0 8011D9E0 AFB10454 */  sw        $s1, 0x454($sp)
/* B40E4 8011D9E4 AFB00450 */  sw        $s0, 0x450($sp)
/* B40E8 8011D9E8 8C820000 */  lw        $v0, 0x0($a0)
/* B40EC 8011D9EC 10400118 */  beqz      $v0, .L8011DE50
/* B40F0 8011D9F0 0000982D */   daddu    $s3, $zero, $zero
/* B40F4 8011D9F4 18400009 */  blez      $v0, .L8011DA1C
/* B40F8 8011D9F8 0260A82D */   daddu    $s5, $s3, $zero
/* B40FC 8011D9FC 27A30010 */  addiu     $v1, $sp, 0x10
.L8011DA00:
/* B4100 8011DA00 AC730000 */  sw        $s3, 0x0($v1)
/* B4104 8011DA04 24630004 */  addiu     $v1, $v1, 0x4
/* B4108 8011DA08 8C820000 */  lw        $v0, 0x0($a0)
/* B410C 8011DA0C 26730001 */  addiu     $s3, $s3, 0x1
/* B4110 8011DA10 0262102A */  slt       $v0, $s3, $v0
/* B4114 8011DA14 1440FFFA */  bnez      $v0, .L8011DA00
/* B4118 8011DA18 26B50001 */   addiu    $s5, $s5, 0x1
.L8011DA1C:
/* B411C 8011DA1C 3C028015 */  lui       $v0, %hi(mdl_renderTaskQueueIdx)
/* B4120 8011DA20 8C4233AC */  lw        $v0, %lo(mdl_renderTaskQueueIdx)($v0)
/* B4124 8011DA24 00021080 */  sll       $v0, $v0, 2
/* B4128 8011DA28 3C148015 */  lui       $s4, %hi(mdl_renderTaskLists)
/* B412C 8011DA2C 0282A021 */  addu      $s4, $s4, $v0
/* B4130 8011DA30 8E9433A0 */  lw        $s4, %lo(mdl_renderTaskLists)($s4)
/* B4134 8011DA34 26A2FFFF */  addiu     $v0, $s5, -0x1
/* B4138 8011DA38 1840001F */  blez      $v0, .L8011DAB8
/* B413C 8011DA3C 0000982D */   daddu    $s3, $zero, $zero
/* B4140 8011DA40 0040602D */  daddu     $t4, $v0, $zero
/* B4144 8011DA44 27AB0010 */  addiu     $t3, $sp, 0x10
/* B4148 8011DA48 0160502D */  daddu     $t2, $t3, $zero
.L8011DA4C:
/* B414C 8011DA4C 26650001 */  addiu     $a1, $s3, 0x1
/* B4150 8011DA50 00B5102A */  slt       $v0, $a1, $s5
/* B4154 8011DA54 50400015 */  beql      $v0, $zero, .L8011DAAC
/* B4158 8011DA58 26730001 */   addiu    $s3, $s3, 0x1
/* B415C 8011DA5C 0140482D */  daddu     $t1, $t2, $zero
/* B4160 8011DA60 00051080 */  sll       $v0, $a1, 2
/* B4164 8011DA64 004B3821 */  addu      $a3, $v0, $t3
.L8011DA68:
/* B4168 8011DA68 8D280000 */  lw        $t0, 0x0($t1)
/* B416C 8011DA6C 8CE60000 */  lw        $a2, 0x0($a3)
/* B4170 8011DA70 00081100 */  sll       $v0, $t0, 4
/* B4174 8011DA74 02828021 */  addu      $s0, $s4, $v0
/* B4178 8011DA78 00061100 */  sll       $v0, $a2, 4
/* B417C 8011DA7C 02822021 */  addu      $a0, $s4, $v0
/* B4180 8011DA80 8E030004 */  lw        $v1, 0x4($s0)
/* B4184 8011DA84 8C820004 */  lw        $v0, 0x4($a0)
/* B4188 8011DA88 0043102A */  slt       $v0, $v0, $v1
/* B418C 8011DA8C 10400003 */  beqz      $v0, .L8011DA9C
/* B4190 8011DA90 24A50001 */   addiu    $a1, $a1, 0x1
/* B4194 8011DA94 AD260000 */  sw        $a2, 0x0($t1)
/* B4198 8011DA98 ACE80000 */  sw        $t0, 0x0($a3)
.L8011DA9C:
/* B419C 8011DA9C 00B5102A */  slt       $v0, $a1, $s5
/* B41A0 8011DAA0 1440FFF1 */  bnez      $v0, .L8011DA68
/* B41A4 8011DAA4 24E70004 */   addiu    $a3, $a3, 0x4
/* B41A8 8011DAA8 26730001 */  addiu     $s3, $s3, 0x1
.L8011DAAC:
/* B41AC 8011DAAC 026C102A */  slt       $v0, $s3, $t4
/* B41B0 8011DAB0 1440FFE6 */  bnez      $v0, .L8011DA4C
/* B41B4 8011DAB4 254A0004 */   addiu    $t2, $t2, 0x4
.L8011DAB8:
/* B41B8 8011DAB8 3C028015 */  lui       $v0, %hi(mdl_renderTaskQueueIdx)
/* B41BC 8011DABC 8C4233AC */  lw        $v0, %lo(mdl_renderTaskQueueIdx)($v0)
/* B41C0 8011DAC0 00021080 */  sll       $v0, $v0, 2
/* B41C4 8011DAC4 3C148015 */  lui       $s4, %hi(mdl_renderTaskLists)
/* B41C8 8011DAC8 0282A021 */  addu      $s4, $s4, $v0
/* B41CC 8011DACC 8E9433A0 */  lw        $s4, %lo(mdl_renderTaskLists)($s4)
/* B41D0 8011DAD0 26A2FFFF */  addiu     $v0, $s5, -0x1
/* B41D4 8011DAD4 18400027 */  blez      $v0, .L8011DB74
/* B41D8 8011DAD8 0000982D */   daddu    $s3, $zero, $zero
/* B41DC 8011DADC 3C0D002D */  lui       $t5, (0x2DC6BF >> 16)
/* B41E0 8011DAE0 35ADC6BF */  ori       $t5, $t5, (0x2DC6BF & 0xFFFF)
/* B41E4 8011DAE4 0040602D */  daddu     $t4, $v0, $zero
/* B41E8 8011DAE8 27AB0010 */  addiu     $t3, $sp, 0x10
/* B41EC 8011DAEC 0160502D */  daddu     $t2, $t3, $zero
.L8011DAF0:
/* B41F0 8011DAF0 8D420000 */  lw        $v0, 0x0($t2)
/* B41F4 8011DAF4 00021100 */  sll       $v0, $v0, 4
/* B41F8 8011DAF8 02828021 */  addu      $s0, $s4, $v0
/* B41FC 8011DAFC 8E020004 */  lw        $v0, 0x4($s0)
/* B4200 8011DB00 01A2102A */  slt       $v0, $t5, $v0
/* B4204 8011DB04 50400018 */  beql      $v0, $zero, .L8011DB68
/* B4208 8011DB08 26730001 */   addiu    $s3, $s3, 0x1
/* B420C 8011DB0C 26650001 */  addiu     $a1, $s3, 0x1
/* B4210 8011DB10 00B5102A */  slt       $v0, $a1, $s5
/* B4214 8011DB14 10400013 */  beqz      $v0, .L8011DB64
/* B4218 8011DB18 00051080 */   sll      $v0, $a1, 2
/* B421C 8011DB1C 0140482D */  daddu     $t1, $t2, $zero
/* B4220 8011DB20 004B3821 */  addu      $a3, $v0, $t3
.L8011DB24:
/* B4224 8011DB24 8D280000 */  lw        $t0, 0x0($t1)
/* B4228 8011DB28 8CE60000 */  lw        $a2, 0x0($a3)
/* B422C 8011DB2C 00081100 */  sll       $v0, $t0, 4
/* B4230 8011DB30 02828021 */  addu      $s0, $s4, $v0
/* B4234 8011DB34 00061100 */  sll       $v0, $a2, 4
/* B4238 8011DB38 02822021 */  addu      $a0, $s4, $v0
/* B423C 8011DB3C 8E020004 */  lw        $v0, 0x4($s0)
/* B4240 8011DB40 8C830004 */  lw        $v1, 0x4($a0)
/* B4244 8011DB44 0043102A */  slt       $v0, $v0, $v1
/* B4248 8011DB48 10400003 */  beqz      $v0, .L8011DB58
/* B424C 8011DB4C 24A50001 */   addiu    $a1, $a1, 0x1
/* B4250 8011DB50 AD260000 */  sw        $a2, 0x0($t1)
/* B4254 8011DB54 ACE80000 */  sw        $t0, 0x0($a3)
.L8011DB58:
/* B4258 8011DB58 00B5102A */  slt       $v0, $a1, $s5
/* B425C 8011DB5C 1440FFF1 */  bnez      $v0, .L8011DB24
/* B4260 8011DB60 24E70004 */   addiu    $a3, $a3, 0x4
.L8011DB64:
/* B4264 8011DB64 26730001 */  addiu     $s3, $s3, 0x1
.L8011DB68:
/* B4268 8011DB68 026C102A */  slt       $v0, $s3, $t4
/* B426C 8011DB6C 1440FFE0 */  bnez      $v0, .L8011DAF0
/* B4270 8011DB70 254A0004 */   addiu    $t2, $t2, 0x4
.L8011DB74:
/* B4274 8011DB74 3C028015 */  lui       $v0, %hi(mdl_renderTaskQueueIdx)
/* B4278 8011DB78 8C4233AC */  lw        $v0, %lo(mdl_renderTaskQueueIdx)($v0)
/* B427C 8011DB7C 00021080 */  sll       $v0, $v0, 2
/* B4280 8011DB80 3C148015 */  lui       $s4, %hi(mdl_renderTaskLists)
/* B4284 8011DB84 0282A021 */  addu      $s4, $s4, $v0
/* B4288 8011DB88 8E9433A0 */  lw        $s4, %lo(mdl_renderTaskLists)($s4)
/* B428C 8011DB8C 26A2FFFF */  addiu     $v0, $s5, -0x1
/* B4290 8011DB90 1840002A */  blez      $v0, .L8011DC3C
/* B4294 8011DB94 0000982D */   daddu    $s3, $zero, $zero
/* B4298 8011DB98 3C0B000C */  lui       $t3, (0xC3500 >> 16)
/* B429C 8011DB9C 356B3500 */  ori       $t3, $t3, (0xC3500 & 0xFFFF)
/* B42A0 8011DBA0 0040682D */  daddu     $t5, $v0, $zero
/* B42A4 8011DBA4 27AC0010 */  addiu     $t4, $sp, 0x10
/* B42A8 8011DBA8 0180502D */  daddu     $t2, $t4, $zero
.L8011DBAC:
/* B42AC 8011DBAC 8D420000 */  lw        $v0, 0x0($t2)
/* B42B0 8011DBB0 00021100 */  sll       $v0, $v0, 4
/* B42B4 8011DBB4 02828021 */  addu      $s0, $s4, $v0
/* B42B8 8011DBB8 8E020004 */  lw        $v0, 0x4($s0)
/* B42BC 8011DBBC 0162102A */  slt       $v0, $t3, $v0
/* B42C0 8011DBC0 1440001E */  bnez      $v0, .L8011DC3C
/* B42C4 8011DBC4 00000000 */   nop
/* B42C8 8011DBC8 26650001 */  addiu     $a1, $s3, 0x1
/* B42CC 8011DBCC 00B5102A */  slt       $v0, $a1, $s5
/* B42D0 8011DBD0 10400016 */  beqz      $v0, .L8011DC2C
/* B42D4 8011DBD4 00051080 */   sll      $v0, $a1, 2
/* B42D8 8011DBD8 0140482D */  daddu     $t1, $t2, $zero
/* B42DC 8011DBDC 004C3821 */  addu      $a3, $v0, $t4
.L8011DBE0:
/* B42E0 8011DBE0 8CE80000 */  lw        $t0, 0x0($a3)
/* B42E4 8011DBE4 8D260000 */  lw        $a2, 0x0($t1)
/* B42E8 8011DBE8 00081100 */  sll       $v0, $t0, 4
/* B42EC 8011DBEC 02822021 */  addu      $a0, $s4, $v0
/* B42F0 8011DBF0 00061100 */  sll       $v0, $a2, 4
/* B42F4 8011DBF4 8C830004 */  lw        $v1, 0x4($a0)
/* B42F8 8011DBF8 02828021 */  addu      $s0, $s4, $v0
/* B42FC 8011DBFC 0163102A */  slt       $v0, $t3, $v1
/* B4300 8011DC00 5440000B */  bnel      $v0, $zero, .L8011DC30
/* B4304 8011DC04 26730001 */   addiu    $s3, $s3, 0x1
/* B4308 8011DC08 8E020004 */  lw        $v0, 0x4($s0)
/* B430C 8011DC0C 0043102A */  slt       $v0, $v0, $v1
/* B4310 8011DC10 10400003 */  beqz      $v0, .L8011DC20
/* B4314 8011DC14 24A50001 */   addiu    $a1, $a1, 0x1
/* B4318 8011DC18 AD280000 */  sw        $t0, 0x0($t1)
/* B431C 8011DC1C ACE60000 */  sw        $a2, 0x0($a3)
.L8011DC20:
/* B4320 8011DC20 00B5102A */  slt       $v0, $a1, $s5
/* B4324 8011DC24 1440FFEE */  bnez      $v0, .L8011DBE0
/* B4328 8011DC28 24E70004 */   addiu    $a3, $a3, 0x4
.L8011DC2C:
/* B432C 8011DC2C 26730001 */  addiu     $s3, $s3, 0x1
.L8011DC30:
/* B4330 8011DC30 026D102A */  slt       $v0, $s3, $t5
/* B4334 8011DC34 1440FFDD */  bnez      $v0, .L8011DBAC
/* B4338 8011DC38 254A0004 */   addiu    $t2, $t2, 0x4
.L8011DC3C:
/* B433C 8011DC3C 3C038015 */  lui       $v1, %hi(mdl_renderTaskQueueIdx)
/* B4340 8011DC40 8C6333AC */  lw        $v1, %lo(mdl_renderTaskQueueIdx)($v1)
/* B4344 8011DC44 3C02800A */  lui       $v0, %hi(gOverrideFlags)
/* B4348 8011DC48 8C42A650 */  lw        $v0, %lo(gOverrideFlags)($v0)
/* B434C 8011DC4C 3C018015 */  lui       $at, %hi(gLastRenderTaskCount)
/* B4350 8011DC50 AC35B7F0 */  sw        $s5, %lo(gLastRenderTaskCount)($at)
/* B4354 8011DC54 00031880 */  sll       $v1, $v1, 2
/* B4358 8011DC58 30420080 */  andi      $v0, $v0, 0x80
/* B435C 8011DC5C 3C148015 */  lui       $s4, %hi(mdl_renderTaskLists)
/* B4360 8011DC60 0283A021 */  addu      $s4, $s4, $v1
/* B4364 8011DC64 8E9433A0 */  lw        $s4, %lo(mdl_renderTaskLists)($s4)
/* B4368 8011DC68 10400061 */  beqz      $v0, .L8011DDF0
/* B436C 8011DC6C 0000B02D */   daddu    $s6, $zero, $zero
/* B4370 8011DC70 27B00410 */  addiu     $s0, $sp, 0x410
/* B4374 8011DC74 0200202D */  daddu     $a0, $s0, $zero
/* B4378 8011DC78 3C120001 */  lui       $s2, (0x11630 >> 16)
/* B437C 8011DC7C 3C013F80 */  lui       $at, (0x3F800000 >> 16)
/* B4380 8011DC80 44810000 */  mtc1      $at, $f0
/* B4384 8011DC84 36521630 */  ori       $s2, $s2, (0x11630 & 0xFFFF)
/* B4388 8011DC88 44050000 */  mfc1      $a1, $f0
/* B438C 8011DC8C 3C06BF80 */  lui       $a2, (0xBF800000 >> 16)
/* B4390 8011DC90 0C019DF0 */  jal       guScaleF
/* B4394 8011DC94 00A0382D */   daddu    $a3, $a1, $zero
/* B4398 8011DC98 0200202D */  daddu     $a0, $s0, $zero
/* B439C 8011DC9C 3C108007 */  lui       $s0, %hi(gMatrixListPos)
/* B43A0 8011DCA0 261041F0 */  addiu     $s0, $s0, %lo(gMatrixListPos)
/* B43A4 8011DCA4 3C11800A */  lui       $s1, %hi(gDisplayContext)
/* B43A8 8011DCA8 2631A674 */  addiu     $s1, $s1, %lo(gDisplayContext)
/* B43AC 8011DCAC 96050000 */  lhu       $a1, 0x0($s0)
/* B43B0 8011DCB0 8E220000 */  lw        $v0, 0x0($s1)
/* B43B4 8011DCB4 00052980 */  sll       $a1, $a1, 6
/* B43B8 8011DCB8 00B22821 */  addu      $a1, $a1, $s2
/* B43BC 8011DCBC 0C019D40 */  jal       guMtxF2L
/* B43C0 8011DCC0 00452821 */   addu     $a1, $v0, $a1
/* B43C4 8011DCC4 96020000 */  lhu       $v0, 0x0($s0)
/* B43C8 8011DCC8 02C0982D */  daddu     $s3, $s6, $zero
/* B43CC 8011DCCC 24430001 */  addiu     $v1, $v0, 0x1
/* B43D0 8011DCD0 3042FFFF */  andi      $v0, $v0, 0xFFFF
/* B43D4 8011DCD4 00021180 */  sll       $v0, $v0, 6
/* B43D8 8011DCD8 A6030000 */  sh        $v1, 0x0($s0)
/* B43DC 8011DCDC 8E230000 */  lw        $v1, 0x0($s1)
/* B43E0 8011DCE0 00521021 */  addu      $v0, $v0, $s2
/* B43E4 8011DCE4 1AA00050 */  blez      $s5, .L8011DE28
/* B43E8 8011DCE8 0062B821 */   addu     $s7, $v1, $v0
/* B43EC 8011DCEC 3C11800A */  lui       $s1, %hi(gMainGfxPos)
/* B43F0 8011DCF0 2631A66C */  addiu     $s1, $s1, %lo(gMainGfxPos)
/* B43F4 8011DCF4 3C12DE00 */  lui       $s2, (0xDE000000 >> 16)
/* B43F8 8011DCF8 00131080 */  sll       $v0, $s3, 2
.L8011DCFC:
/* B43FC 8011DCFC 03A21021 */  addu      $v0, $sp, $v0
/* B4400 8011DD00 8C420010 */  lw        $v0, 0x10($v0)
/* B4404 8011DD04 00021100 */  sll       $v0, $v0, 4
/* B4408 8011DD08 02828021 */  addu      $s0, $s4, $v0
/* B440C 8011DD0C 8E020000 */  lw        $v0, 0x0($s0)
/* B4410 8011DD10 8E03000C */  lw        $v1, 0xC($s0)
/* B4414 8011DD14 30420002 */  andi      $v0, $v0, 0x2
/* B4418 8011DD18 10400004 */  beqz      $v0, .L8011DD2C
/* B441C 8011DD1C 00000000 */   nop
/* B4420 8011DD20 8E360000 */  lw        $s6, 0x0($s1)
/* B4424 8011DD24 26C20008 */  addiu     $v0, $s6, 0x8
/* B4428 8011DD28 AE220000 */  sw        $v0, 0x0($s1)
.L8011DD2C:
/* B442C 8011DD2C 0060F809 */  jalr      $v1
/* B4430 8011DD30 8E040008 */   lw       $a0, 0x8($s0)
/* B4434 8011DD34 8E020000 */  lw        $v0, 0x0($s0)
/* B4438 8011DD38 30420002 */  andi      $v0, $v0, 0x2
/* B443C 8011DD3C 10400027 */  beqz      $v0, .L8011DDDC
/* B4440 8011DD40 26730001 */   addiu    $s3, $s3, 0x1
/* B4444 8011DD44 3C05DA38 */  lui       $a1, (0xDA380005 >> 16)
/* B4448 8011DD48 34A50005 */  ori       $a1, $a1, (0xDA380005 & 0xFFFF)
/* B444C 8011DD4C 3C06DA38 */  lui       $a2, (0xDA380007 >> 16)
/* B4450 8011DD50 8E230000 */  lw        $v1, 0x0($s1)
/* B4454 8011DD54 3C02DF00 */  lui       $v0, (0xDF000000 >> 16)
/* B4458 8011DD58 0060202D */  daddu     $a0, $v1, $zero
/* B445C 8011DD5C 24630008 */  addiu     $v1, $v1, 0x8
/* B4460 8011DD60 AE230000 */  sw        $v1, 0x0($s1)
/* B4464 8011DD64 AC820000 */  sw        $v0, 0x0($a0)
/* B4468 8011DD68 3C02DE01 */  lui       $v0, (0xDE010000 >> 16)
/* B446C 8011DD6C AC800004 */  sw        $zero, 0x4($a0)
/* B4470 8011DD70 AEC20000 */  sw        $v0, 0x0($s6)
/* B4474 8011DD74 24620008 */  addiu     $v0, $v1, 0x8
/* B4478 8011DD78 26C40008 */  addiu     $a0, $s6, 0x8
/* B447C 8011DD7C AEC30004 */  sw        $v1, 0x4($s6)
/* B4480 8011DD80 AE220000 */  sw        $v0, 0x0($s1)
/* B4484 8011DD84 24620010 */  addiu     $v0, $v1, 0x10
/* B4488 8011DD88 AC720000 */  sw        $s2, 0x0($v1)
/* B448C 8011DD8C AC640004 */  sw        $a0, 0x4($v1)
/* B4490 8011DD90 AE220000 */  sw        $v0, 0x0($s1)
/* B4494 8011DD94 24620018 */  addiu     $v0, $v1, 0x18
/* B4498 8011DD98 AC650008 */  sw        $a1, 0x8($v1)
/* B449C 8011DD9C AC77000C */  sw        $s7, 0xC($v1)
/* B44A0 8011DDA0 AE220000 */  sw        $v0, 0x0($s1)
/* B44A4 8011DDA4 AC640014 */  sw        $a0, 0x14($v1)
/* B44A8 8011DDA8 3C04800A */  lui       $a0, %hi(gCurrentCamID)
/* B44AC 8011DDAC 8484A634 */  lh        $a0, %lo(gCurrentCamID)($a0)
/* B44B0 8011DDB0 24620020 */  addiu     $v0, $v1, 0x20
/* B44B4 8011DDB4 AC720010 */  sw        $s2, 0x10($v1)
/* B44B8 8011DDB8 AE220000 */  sw        $v0, 0x0($s1)
/* B44BC 8011DDBC 3C02800A */  lui       $v0, %hi(gDisplayContext)
/* B44C0 8011DDC0 8C42A674 */  lw        $v0, %lo(gDisplayContext)($v0)
/* B44C4 8011DDC4 34C60007 */  ori       $a2, $a2, (0xDA380007 & 0xFFFF)
/* B44C8 8011DDC8 AC660018 */  sw        $a2, 0x18($v1)
/* B44CC 8011DDCC 00042180 */  sll       $a0, $a0, 6
/* B44D0 8011DDD0 24840030 */  addiu     $a0, $a0, 0x30
/* B44D4 8011DDD4 00441021 */  addu      $v0, $v0, $a0
/* B44D8 8011DDD8 AC62001C */  sw        $v0, 0x1C($v1)
.L8011DDDC:
/* B44DC 8011DDDC 0275102A */  slt       $v0, $s3, $s5
/* B44E0 8011DDE0 1440FFC6 */  bnez      $v0, .L8011DCFC
/* B44E4 8011DDE4 00131080 */   sll      $v0, $s3, 2
/* B44E8 8011DDE8 0804778A */  j         .L8011DE28
/* B44EC 8011DDEC 00000000 */   nop
.L8011DDF0:
/* B44F0 8011DDF0 1AA0000D */  blez      $s5, .L8011DE28
/* B44F4 8011DDF4 0000982D */   daddu    $s3, $zero, $zero
/* B44F8 8011DDF8 27B10010 */  addiu     $s1, $sp, 0x10
.L8011DDFC:
/* B44FC 8011DDFC 8E220000 */  lw        $v0, 0x0($s1)
/* B4500 8011DE00 26310004 */  addiu     $s1, $s1, 0x4
/* B4504 8011DE04 00021100 */  sll       $v0, $v0, 4
/* B4508 8011DE08 02828021 */  addu      $s0, $s4, $v0
/* B450C 8011DE0C 8E03000C */  lw        $v1, 0xC($s0)
/* B4510 8011DE10 8E040008 */  lw        $a0, 0x8($s0)
/* B4514 8011DE14 0060F809 */  jalr      $v1
/* B4518 8011DE18 26730001 */   addiu    $s3, $s3, 0x1
/* B451C 8011DE1C 0275102A */  slt       $v0, $s3, $s5
/* B4520 8011DE20 1440FFF6 */  bnez      $v0, .L8011DDFC
/* B4524 8011DE24 00000000 */   nop
.L8011DE28:
/* B4528 8011DE28 3C038015 */  lui       $v1, %hi(mdl_renderTaskQueueIdx)
/* B452C 8011DE2C 246333AC */  addiu     $v1, $v1, %lo(mdl_renderTaskQueueIdx)
/* B4530 8011DE30 8C620000 */  lw        $v0, 0x0($v1)
/* B4534 8011DE34 24420001 */  addiu     $v0, $v0, 0x1
/* B4538 8011DE38 AC620000 */  sw        $v0, 0x0($v1)
/* B453C 8011DE3C 28420003 */  slti      $v0, $v0, 0x3
/* B4540 8011DE40 50400001 */  beql      $v0, $zero, .L8011DE48
/* B4544 8011DE44 AC600000 */   sw       $zero, 0x0($v1)
.L8011DE48:
/* B4548 8011DE48 3C018015 */  lui       $at, %hi(mdl_renderTaskCount)
/* B454C 8011DE4C AC2033B0 */  sw        $zero, %lo(mdl_renderTaskCount)($at)
.L8011DE50:
/* B4550 8011DE50 8FBF0470 */  lw        $ra, 0x470($sp)
/* B4554 8011DE54 8FB7046C */  lw        $s7, 0x46C($sp)
/* B4558 8011DE58 8FB60468 */  lw        $s6, 0x468($sp)
/* B455C 8011DE5C 8FB50464 */  lw        $s5, 0x464($sp)
/* B4560 8011DE60 8FB40460 */  lw        $s4, 0x460($sp)
/* B4564 8011DE64 8FB3045C */  lw        $s3, 0x45C($sp)
/* B4568 8011DE68 8FB20458 */  lw        $s2, 0x458($sp)
/* B456C 8011DE6C 8FB10454 */  lw        $s1, 0x454($sp)
/* B4570 8011DE70 8FB00450 */  lw        $s0, 0x450($sp)
/* B4574 8011DE74 03E00008 */  jr        $ra
/* B4578 8011DE78 27BD0478 */   addiu    $sp, $sp, 0x478
/* B457C 8011DE7C 00000000 */  nop

### DECOMPILED C INSTRUCTIONS:

void execute_render_tasks(void) {
    s32 i, j, taskCount;
    s32 sorted[ARRAY_COUNT(*mdl_clearRenderTasks)];
    RenderTask* taskList;
    RenderTask* task;
    RenderTask* task2;
    Matrix4f mtxFlipY;
    void (*appendGfx)(void*);

    if (mdl_renderTaskCount == 0) {
        return;
    }

    for (i = taskCount = 0; i < mdl_renderTaskCount; i++) {
        sorted[taskCount++] = i;
    }

    // sort in ascending order
    taskList = mdl_renderTaskLists[mdl_renderTaskQueueIdx];
    for (i = 0; i < taskCount - 1; i++) {
        for (j = i + 1; j < taskCount; j++) {
            s32 t1 = sorted[i];
            s32 t2 = sorted[j];
            task = &taskList[t1];
            task2 = &taskList[t2];
            if (task->distance > task2->distance) {
                sorted[i] = t2;
                sorted[j] = t1;
            }
        }
    }

    // tasks with dist >= 3M sort in descending order
    taskList = mdl_renderTaskLists[mdl_renderTaskQueueIdx];
    for (i = 0; i < taskCount - 1; i++) {
        task = &taskList[sorted[i]];
        if (task->distance >= 3000000) {
            for (j = i + 1; j < taskCount; j++) {
                s32 t1 = sorted[i];
                s32 t2 = sorted[j];
                task = &taskList[t1];
                task2 = &taskList[t2];
                if (task->distance < task2->distance) {
                    sorted[i] = t2;
                    sorted[j] = t1;
                }
            }
        }
    }

    // tasks with dist <= 800k sort in descending order
    taskList = mdl_renderTaskLists[mdl_renderTaskQueueIdx];
    for (i = 0; i < taskCount - 1; i++) {
        task = &taskList[sorted[i]];
        if (task->distance > 800000) {
            break;
        }
        for (j = i + 1; j < taskCount; j++) {
            s32 t1 = sorted[i];
            s32 t2 = sorted[j];
            task = &taskList[t1];
            task2 = &taskList[t2];
            if (task2->distance > 800000) {
                break;
            }
            if (task->distance < task2->distance) {
                sorted[i] = t2;
                sorted[j] = t1;
            }
        }
    }

    gLastRenderTaskCount = taskCount;
    taskList = mdl_renderTaskLists[mdl_renderTaskQueueIdx];
    if (gOverrideFlags & GLOBAL_OVERRIDES_ENABLE_FLOOR_REFLECTION) {
        Mtx* dispMtx;
        Gfx* savedGfxPos = NULL;

        guScaleF(mtxFlipY, 1.0f, -1.0f, 1.0f);
        guMtxF2L(mtxFlipY, &gDisplayContext->matrixStack[gMatrixListPos]);
        dispMtx = &gDisplayContext->matrixStack[gMatrixListPos++];
        for (i = 0; i < taskCount; i++) {
            task = &taskList[sorted[i]];
            appendGfx = task->appendGfx;

            if (task->renderMode & RENDER_TASK_FLAG_REFLECT_FLOOR) {
                savedGfxPos = gMainGfxPos++;
            }

            appendGfx(task->appendGfxArg);

            if (task->renderMode & RENDER_TASK_FLAG_REFLECT_FLOOR) {
                gSPEndDisplayList(gMainGfxPos++);
                gSPBranchList(savedGfxPos, gMainGfxPos);
                gSPDisplayList(gMainGfxPos++, savedGfxPos + 1);
                gSPMatrix(gMainGfxPos++, dispMtx, G_MTX_NOPUSH | G_MTX_MUL | G_MTX_PROJECTION);
                gSPDisplayList(gMainGfxPos++, savedGfxPos + 1);
                gSPMatrix(gMainGfxPos++, &gDisplayContext->camPerspMatrix[gCurrentCamID], G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_PROJECTION);
            }
        }
    } else {
        for (i = 0; i < taskCount; i++) {
            task = &taskList[sorted[i]];
            appendGfx = task->appendGfx;
            appendGfx(task->appendGfxArg);
        }
    }

    mdl_renderTaskQueueIdx++;
    if (mdl_renderTaskQueueIdx > ARRAY_COUNT(mdl_renderTaskLists) - 1) {
        mdl_renderTaskQueueIdx = 0;
    }
    mdl_renderTaskCount = 0;
}


### RAW ASSEMBLY INSTRUCTIONS:

glabel _Printf
/* 3FEA0 80064AA0 27BDFF50 */  addiu     $sp, $sp, -0xB0
/* 3FEA4 80064AA4 AFB400A0 */  sw        $s4, 0xA0($sp)
/* 3FEA8 80064AA8 0080A021 */  addu      $s4, $a0, $zero
/* 3FEAC 80064AAC AFB3009C */  sw        $s3, 0x9C($sp)
/* 3FEB0 80064AB0 00A09821 */  addu      $s3, $a1, $zero
/* 3FEB4 80064AB4 00C02821 */  addu      $a1, $a2, $zero
/* 3FEB8 80064AB8 AFB500A4 */  sw        $s5, 0xA4($sp)
/* 3FEBC 80064ABC 3C15800A */  lui       $s5, %hi(D_80099BF0)
/* 3FEC0 80064AC0 26B59BF0 */  addiu     $s5, $s5, %lo(D_80099BF0)
/* 3FEC4 80064AC4 AFBF00A8 */  sw        $ra, 0xA8($sp)
/* 3FEC8 80064AC8 AFB20098 */  sw        $s2, 0x98($sp)
/* 3FECC 80064ACC AFB10094 */  sw        $s1, 0x94($sp)
/* 3FED0 80064AD0 AFB00090 */  sw        $s0, 0x90($sp)
/* 3FED4 80064AD4 AFA700BC */  sw        $a3, 0xBC($sp)
/* 3FED8 80064AD8 AFA0003C */  sw        $zero, 0x3C($sp)
.L80064ADC:
/* 3FEDC 80064ADC 80A20000 */  lb        $v0, 0x0($a1)
/* 3FEE0 80064AE0 90B10000 */  lbu       $s1, 0x0($a1)
/* 3FEE4 80064AE4 080192BD */  j         .L80064AF4
/* 3FEE8 80064AE8 00A09021 */   addu     $s2, $a1, $zero
.L80064AEC:
/* 3FEEC 80064AEC 82420000 */  lb        $v0, 0x0($s2)
/* 3FEF0 80064AF0 92510000 */  lbu       $s1, 0x0($s2)
.L80064AF4:
/* 3FEF4 80064AF4 0002182B */  sltu      $v1, $zero, $v0
/* 3FEF8 80064AF8 38420025 */  xori      $v0, $v0, 0x25
/* 3FEFC 80064AFC 0002102B */  sltu      $v0, $zero, $v0
/* 3FF00 80064B00 00621824 */  and       $v1, $v1, $v0
/* 3FF04 80064B04 5460FFF9 */  bnel      $v1, $zero, .L80064AEC
/* 3FF08 80064B08 26520001 */   addiu    $s2, $s2, 0x1
/* 3FF0C 80064B0C 02458023 */  subu      $s0, $s2, $a1
/* 3FF10 80064B10 1A000009 */  blez      $s0, .L80064B38
/* 3FF14 80064B14 02602021 */   addu     $a0, $s3, $zero
/* 3FF18 80064B18 0280F809 */  jalr      $s4
/* 3FF1C 80064B1C 02003021 */   addu     $a2, $s0, $zero
/* 3FF20 80064B20 00409821 */  addu      $s3, $v0, $zero
/* 3FF24 80064B24 12600134 */  beqz      $s3, .L80064FF8
/* 3FF28 80064B28 00000000 */   nop
/* 3FF2C 80064B2C 8FA2003C */  lw        $v0, 0x3C($sp)
/* 3FF30 80064B30 00501021 */  addu      $v0, $v0, $s0
/* 3FF34 80064B34 AFA2003C */  sw        $v0, 0x3C($sp)
.L80064B38:
/* 3FF38 80064B38 1220012F */  beqz      $s1, .L80064FF8
/* 3FF3C 80064B3C 26520001 */   addiu    $s2, $s2, 0x1
/* 3FF40 80064B40 AFA00040 */  sw        $zero, 0x40($sp)
/* 3FF44 80064B44 3C10800A */  lui       $s0, %hi(D_80099BF8)
/* 3FF48 80064B48 26109BF8 */  addiu     $s0, $s0, %lo(D_80099BF8)
.L80064B4C:
/* 3FF4C 80064B4C 82450000 */  lb        $a1, 0x0($s2)
/* 3FF50 80064B50 0C019284 */  jal       strchr
/* 3FF54 80064B54 02A02021 */   addu     $a0, $s5, $zero
/* 3FF58 80064B58 10400009 */  beqz      $v0, .L80064B80
/* 3FF5C 80064B5C 00551023 */   subu     $v0, $v0, $s5
/* 3FF60 80064B60 00021080 */  sll       $v0, $v0, 2
/* 3FF64 80064B64 00501021 */  addu      $v0, $v0, $s0
/* 3FF68 80064B68 8FA30040 */  lw        $v1, 0x40($sp)
/* 3FF6C 80064B6C 8C420000 */  lw        $v0, 0x0($v0)
/* 3FF70 80064B70 26520001 */  addiu     $s2, $s2, 0x1
/* 3FF74 80064B74 00621825 */  or        $v1, $v1, $v0
/* 3FF78 80064B78 080192D3 */  j         .L80064B4C
/* 3FF7C 80064B7C AFA30040 */   sw       $v1, 0x40($sp)
.L80064B80:
/* 3FF80 80064B80 82430000 */  lb        $v1, 0x0($s2)
/* 3FF84 80064B84 2402002A */  addiu     $v0, $zero, 0x2A
/* 3FF88 80064B88 14620011 */  bne       $v1, $v0, .L80064BD0
/* 3FF8C 80064B8C 00602021 */   addu     $a0, $v1, $zero
/* 3FF90 80064B90 8FA200BC */  lw        $v0, 0xBC($sp)
/* 3FF94 80064B94 2403FFFC */  addiu     $v1, $zero, -0x4
/* 3FF98 80064B98 24420003 */  addiu     $v0, $v0, 0x3
/* 3FF9C 80064B9C 00431024 */  and       $v0, $v0, $v1
/* 3FFA0 80064BA0 24430004 */  addiu     $v1, $v0, 0x4
/* 3FFA4 80064BA4 AFA300BC */  sw        $v1, 0xBC($sp)
/* 3FFA8 80064BA8 8C420000 */  lw        $v0, 0x0($v0)
/* 3FFAC 80064BAC 04410006 */  bgez      $v0, .L80064BC8
/* 3FFB0 80064BB0 AFA20038 */   sw       $v0, 0x38($sp)
/* 3FFB4 80064BB4 8FA30040 */  lw        $v1, 0x40($sp)
/* 3FFB8 80064BB8 00021023 */  negu      $v0, $v0
/* 3FFBC 80064BBC AFA20038 */  sw        $v0, 0x38($sp)
/* 3FFC0 80064BC0 34630004 */  ori       $v1, $v1, 0x4
/* 3FFC4 80064BC4 AFA30040 */  sw        $v1, 0x40($sp)
.L80064BC8:
/* 3FFC8 80064BC8 0801930A */  j         .L80064C28
/* 3FFCC 80064BCC 26520001 */   addiu    $s2, $s2, 0x1
.L80064BD0:
/* 3FFD0 80064BD0 2482FFD0 */  addiu     $v0, $a0, -0x30
/* 3FFD4 80064BD4 304200FF */  andi      $v0, $v0, 0xFF
/* 3FFD8 80064BD8 2C42000A */  sltiu     $v0, $v0, 0xA
/* 3FFDC 80064BDC 10400012 */  beqz      $v0, .L80064C28
/* 3FFE0 80064BE0 AFA00038 */   sw       $zero, 0x38($sp)
.L80064BE4:
/* 3FFE4 80064BE4 8FA40038 */  lw        $a0, 0x38($sp)
/* 3FFE8 80064BE8 288203E7 */  slti      $v0, $a0, 0x3E7
/* 3FFEC 80064BEC 50400009 */  beql      $v0, $zero, .L80064C14
/* 3FFF0 80064BF0 26520001 */   addiu    $s2, $s2, 0x1
/* 3FFF4 80064BF4 00041080 */  sll       $v0, $a0, 2
/* 3FFF8 80064BF8 82430000 */  lb        $v1, 0x0($s2)
/* 3FFFC 80064BFC 00441021 */  addu      $v0, $v0, $a0
/* 40000 80064C00 00021040 */  sll       $v0, $v0, 1
/* 40004 80064C04 00431021 */  addu      $v0, $v0, $v1
/* 40008 80064C08 2442FFD0 */  addiu     $v0, $v0, -0x30
/* 4000C 80064C0C AFA20038 */  sw        $v0, 0x38($sp)
/* 40010 80064C10 26520001 */  addiu     $s2, $s2, 0x1
.L80064C14:
/* 40014 80064C14 92420000 */  lbu       $v0, 0x0($s2)
/* 40018 80064C18 2442FFD0 */  addiu     $v0, $v0, -0x30
/* 4001C 80064C1C 2C42000A */  sltiu     $v0, $v0, 0xA
/* 40020 80064C20 1440FFF0 */  bnez      $v0, .L80064BE4
/* 40024 80064C24 00000000 */   nop
.L80064C28:
/* 40028 80064C28 82430000 */  lb        $v1, 0x0($s2)
/* 4002C 80064C2C 2402002E */  addiu     $v0, $zero, 0x2E
/* 40030 80064C30 10620003 */  beq       $v1, $v0, .L80064C40
/* 40034 80064C34 2402FFFF */   addiu    $v0, $zero, -0x1
/* 40038 80064C38 08019335 */  j         .L80064CD4
/* 4003C 80064C3C AFA20034 */   sw       $v0, 0x34($sp)
.L80064C40:
/* 40040 80064C40 26520001 */  addiu     $s2, $s2, 0x1
/* 40044 80064C44 82430000 */  lb        $v1, 0x0($s2)
/* 40048 80064C48 2402002A */  addiu     $v0, $zero, 0x2A
/* 4004C 80064C4C 1462000B */  bne       $v1, $v0, .L80064C7C
/* 40050 80064C50 00602021 */   addu     $a0, $v1, $zero
/* 40054 80064C54 8FA300BC */  lw        $v1, 0xBC($sp)
/* 40058 80064C58 2402FFFC */  addiu     $v0, $zero, -0x4
/* 4005C 80064C5C 24630003 */  addiu     $v1, $v1, 0x3
/* 40060 80064C60 00621824 */  and       $v1, $v1, $v0
/* 40064 80064C64 24620004 */  addiu     $v0, $v1, 0x4
/* 40068 80064C68 AFA200BC */  sw        $v0, 0xBC($sp)
/* 4006C 80064C6C 8C620000 */  lw        $v0, 0x0($v1)
/* 40070 80064C70 26520001 */  addiu     $s2, $s2, 0x1
/* 40074 80064C74 08019335 */  j         .L80064CD4
/* 40078 80064C78 AFA20034 */   sw       $v0, 0x34($sp)
.L80064C7C:
/* 4007C 80064C7C 2482FFD0 */  addiu     $v0, $a0, -0x30
/* 40080 80064C80 304200FF */  andi      $v0, $v0, 0xFF
/* 40084 80064C84 2C42000A */  sltiu     $v0, $v0, 0xA
/* 40088 80064C88 10400012 */  beqz      $v0, .L80064CD4
/* 4008C 80064C8C AFA00034 */   sw       $zero, 0x34($sp)
.L80064C90:
/* 40090 80064C90 8FA40034 */  lw        $a0, 0x34($sp)
/* 40094 80064C94 288203E7 */  slti      $v0, $a0, 0x3E7
/* 40098 80064C98 50400009 */  beql      $v0, $zero, .L80064CC0
/* 4009C 80064C9C 26520001 */   addiu    $s2, $s2, 0x1
/* 400A0 80064CA0 00041080 */  sll       $v0, $a0, 2
/* 400A4 80064CA4 82430000 */  lb        $v1, 0x0($s2)
/* 400A8 80064CA8 00441021 */  addu      $v0, $v0, $a0
/* 400AC 80064CAC 00021040 */  sll       $v0, $v0, 1
/* 400B0 80064CB0 00431021 */  addu      $v0, $v0, $v1
/* 400B4 80064CB4 2442FFD0 */  addiu     $v0, $v0, -0x30
/* 400B8 80064CB8 AFA20034 */  sw        $v0, 0x34($sp)
/* 400BC 80064CBC 26520001 */  addiu     $s2, $s2, 0x1
.L80064CC0:
/* 400C0 80064CC0 92420000 */  lbu       $v0, 0x0($s2)
/* 400C4 80064CC4 2442FFD0 */  addiu     $v0, $v0, -0x30
/* 400C8 80064CC8 2C42000A */  sltiu     $v0, $v0, 0xA
/* 400CC 80064CCC 1440FFF0 */  bnez      $v0, .L80064C90
/* 400D0 80064CD0 00000000 */   nop
.L80064CD4:
/* 400D4 80064CD4 82450000 */  lb        $a1, 0x0($s2)
/* 400D8 80064CD8 3C04800A */  lui       $a0, %hi(D_80099C10)
/* 400DC 80064CDC 24849C10 */  addiu     $a0, $a0, %lo(D_80099C10)
/* 400E0 80064CE0 0C019284 */  jal       strchr
/* 400E4 80064CE4 00A08021 */   addu     $s0, $a1, $zero
/* 400E8 80064CE8 10400003 */  beqz      $v0, .L80064CF8
/* 400EC 80064CEC 02001021 */   addu     $v0, $s0, $zero
/* 400F0 80064CF0 0801933F */  j         .L80064CFC
/* 400F4 80064CF4 26520001 */   addiu    $s2, $s2, 0x1
.L80064CF8:
/* 400F8 80064CF8 00001021 */  addu      $v0, $zero, $zero
.L80064CFC:
/* 400FC 80064CFC A3A20044 */  sb        $v0, 0x44($sp)
/* 40100 80064D00 00021600 */  sll       $v0, $v0, 24
/* 40104 80064D04 00021E03 */  sra       $v1, $v0, 24
/* 40108 80064D08 2402006C */  addiu     $v0, $zero, 0x6C
/* 4010C 80064D0C 14620007 */  bne       $v1, $v0, .L80064D2C
/* 40110 80064D10 27A40010 */   addiu    $a0, $sp, 0x10
/* 40114 80064D14 82420000 */  lb        $v0, 0x0($s2)
/* 40118 80064D18 14430004 */  bne       $v0, $v1, .L80064D2C
/* 4011C 80064D1C 2402004C */   addiu    $v0, $zero, 0x4C
/* 40120 80064D20 A3A20044 */  sb        $v0, 0x44($sp)
/* 40124 80064D24 26520001 */  addiu     $s2, $s2, 0x1
/* 40128 80064D28 27A40010 */  addiu     $a0, $sp, 0x10
.L80064D2C:
/* 4012C 80064D2C 82460000 */  lb        $a2, 0x0($s2)
/* 40130 80064D30 27A500BC */  addiu     $a1, $sp, 0xBC
/* 40134 80064D34 0C019408 */  jal       _Putfld
/* 40138 80064D38 27A70048 */   addiu    $a3, $sp, 0x48
/* 4013C 80064D3C 8FA3001C */  lw        $v1, 0x1C($sp)
/* 40140 80064D40 8FA20020 */  lw        $v0, 0x20($sp)
/* 40144 80064D44 00621821 */  addu      $v1, $v1, $v0
/* 40148 80064D48 8FA20024 */  lw        $v0, 0x24($sp)
/* 4014C 80064D4C 8FA40028 */  lw        $a0, 0x28($sp)
/* 40150 80064D50 8FA5002C */  lw        $a1, 0x2C($sp)
/* 40154 80064D54 00621821 */  addu      $v1, $v1, $v0
/* 40158 80064D58 00641821 */  addu      $v1, $v1, $a0
/* 4015C 80064D5C 00651821 */  addu      $v1, $v1, $a1
/* 40160 80064D60 8FA40030 */  lw        $a0, 0x30($sp)
/* 40164 80064D64 8FA50038 */  lw        $a1, 0x38($sp)
/* 40168 80064D68 8FA20040 */  lw        $v0, 0x40($sp)
/* 4016C 80064D6C 00641821 */  addu      $v1, $v1, $a0
/* 40170 80064D70 00A32823 */  subu      $a1, $a1, $v1
/* 40174 80064D74 30420004 */  andi      $v0, $v0, 0x4
/* 40178 80064D78 14400017 */  bnez      $v0, .L80064DD8
/* 4017C 80064D7C AFA50038 */   sw       $a1, 0x38($sp)
/* 40180 80064D80 18A00015 */  blez      $a1, .L80064DD8
/* 40184 80064D84 00000000 */   nop
/* 40188 80064D88 00A08821 */  addu      $s1, $a1, $zero
/* 4018C 80064D8C 2E220021 */  sltiu     $v0, $s1, 0x21
.L80064D90:
/* 40190 80064D90 10400002 */  beqz      $v0, .L80064D9C
/* 40194 80064D94 24100020 */   addiu    $s0, $zero, 0x20
/* 40198 80064D98 02208021 */  addu      $s0, $s1, $zero
.L80064D9C:
/* 4019C 80064D9C 5A00000C */  blezl     $s0, .L80064DD0
/* 401A0 80064DA0 02308823 */   subu     $s1, $s1, $s0
/* 401A4 80064DA4 02602021 */  addu      $a0, $s3, $zero
/* 401A8 80064DA8 3C058009 */  lui       $a1, %hi(spaces)
/* 401AC 80064DAC 24A545E0 */  addiu     $a1, $a1, %lo(spaces)
/* 401B0 80064DB0 0280F809 */  jalr      $s4
/* 401B4 80064DB4 02003021 */   addu     $a2, $s0, $zero
/* 401B8 80064DB8 00409821 */  addu      $s3, $v0, $zero
/* 401BC 80064DBC 1260008E */  beqz      $s3, .L80064FF8
/* 401C0 80064DC0 02308823 */   subu     $s1, $s1, $s0
/* 401C4 80064DC4 8FA2003C */  lw        $v0, 0x3C($sp)
/* 401C8 80064DC8 00501021 */  addu      $v0, $v0, $s0
/* 401CC 80064DCC AFA2003C */  sw        $v0, 0x3C($sp)
.L80064DD0:
/* 401D0 80064DD0 1E20FFEF */  bgtz      $s1, .L80064D90
/* 401D4 80064DD4 2E220021 */   sltiu    $v0, $s1, 0x21
.L80064DD8:
/* 401D8 80064DD8 8FA6001C */  lw        $a2, 0x1C($sp)
/* 401DC 80064DDC 18C0000A */  blez      $a2, .L80064E08
/* 401E0 80064DE0 02602021 */   addu     $a0, $s3, $zero
/* 401E4 80064DE4 0280F809 */  jalr      $s4
/* 401E8 80064DE8 27A50048 */   addiu    $a1, $sp, 0x48
/* 401EC 80064DEC 00409821 */  addu      $s3, $v0, $zero
/* 401F0 80064DF0 12600081 */  beqz      $s3, .L80064FF8
/* 401F4 80064DF4 00000000 */   nop
/* 401F8 80064DF8 8FA2003C */  lw        $v0, 0x3C($sp)
/* 401FC 80064DFC 8FA3001C */  lw        $v1, 0x1C($sp)
/* 40200 80064E00 00431021 */  addu      $v0, $v0, $v1
/* 40204 80064E04 AFA2003C */  sw        $v0, 0x3C($sp)
.L80064E08:
/* 40208 80064E08 8FA20020 */  lw        $v0, 0x20($sp)
/* 4020C 80064E0C 18400015 */  blez      $v0, .L80064E64
/* 40210 80064E10 00000000 */   nop
/* 40214 80064E14 00408821 */  addu      $s1, $v0, $zero
/* 40218 80064E18 2E220021 */  sltiu     $v0, $s1, 0x21
.L80064E1C:
/* 4021C 80064E1C 10400002 */  beqz      $v0, .L80064E28
/* 40220 80064E20 24100020 */   addiu    $s0, $zero, 0x20
/* 40224 80064E24 02208021 */  addu      $s0, $s1, $zero
.L80064E28:
/* 40228 80064E28 5A00000C */  blezl     $s0, .L80064E5C
/* 4022C 80064E2C 02308823 */   subu     $s1, $s1, $s0
/* 40230 80064E30 02602021 */  addu      $a0, $s3, $zero
/* 40234 80064E34 3C058009 */  lui       $a1, %hi(zeroes)
/* 40238 80064E38 24A54604 */  addiu     $a1, $a1, %lo(zeroes)
/* 4023C 80064E3C 0280F809 */  jalr      $s4
/* 40240 80064E40 02003021 */   addu     $a2, $s0, $zero
/* 40244 80064E44 00409821 */  addu      $s3, $v0, $zero
/* 40248 80064E48 1260006B */  beqz      $s3, .L80064FF8
/* 4024C 80064E4C 02308823 */   subu     $s1, $s1, $s0
/* 40250 80064E50 8FA2003C */  lw        $v0, 0x3C($sp)
/* 40254 80064E54 00501021 */  addu      $v0, $v0, $s0
/* 40258 80064E58 AFA2003C */  sw        $v0, 0x3C($sp)
.L80064E5C:
/* 4025C 80064E5C 1E20FFEF */  bgtz      $s1, .L80064E1C
/* 40260 80064E60 2E220021 */   sltiu    $v0, $s1, 0x21
.L80064E64:
/* 40264 80064E64 8FA60024 */  lw        $a2, 0x24($sp)
/* 40268 80064E68 18C0000B */  blez      $a2, .L80064E98
/* 4026C 80064E6C 00000000 */   nop
/* 40270 80064E70 8FA50018 */  lw        $a1, 0x18($sp)
/* 40274 80064E74 0280F809 */  jalr      $s4
/* 40278 80064E78 02602021 */   addu     $a0, $s3, $zero
/* 4027C 80064E7C 00409821 */  addu      $s3, $v0, $zero
/* 40280 80064E80 1260005D */  beqz      $s3, .L80064FF8
/* 40284 80064E84 00000000 */   nop
/* 40288 80064E88 8FA2003C */  lw        $v0, 0x3C($sp)
/* 4028C 80064E8C 8FA30024 */  lw        $v1, 0x24($sp)
/* 40290 80064E90 00431021 */  addu      $v0, $v0, $v1
/* 40294 80064E94 AFA2003C */  sw        $v0, 0x3C($sp)
.L80064E98:
/* 40298 80064E98 8FA20028 */  lw        $v0, 0x28($sp)
/* 4029C 80064E9C 18400015 */  blez      $v0, .L80064EF4
/* 402A0 80064EA0 00000000 */   nop
/* 402A4 80064EA4 00408821 */  addu      $s1, $v0, $zero
/* 402A8 80064EA8 2E220021 */  sltiu     $v0, $s1, 0x21
.L80064EAC:
/* 402AC 80064EAC 10400002 */  beqz      $v0, .L80064EB8
/* 402B0 80064EB0 24100020 */   addiu    $s0, $zero, 0x20
/* 402B4 80064EB4 02208021 */  addu      $s0, $s1, $zero
.L80064EB8:
/* 402B8 80064EB8 5A00000C */  blezl     $s0, .L80064EEC
/* 402BC 80064EBC 02308823 */   subu     $s1, $s1, $s0
/* 402C0 80064EC0 02602021 */  addu      $a0, $s3, $zero
/* 402C4 80064EC4 3C058009 */  lui       $a1, %hi(zeroes)
/* 402C8 80064EC8 24A54604 */  addiu     $a1, $a1, %lo(zeroes)
/* 402CC 80064ECC 0280F809 */  jalr      $s4
/* 402D0 80064ED0 02003021 */   addu     $a2, $s0, $zero
/* 402D4 80064ED4 00409821 */  addu      $s3, $v0, $zero
/* 402D8 80064ED8 12600047 */  beqz      $s3, .L80064FF8
/* 402DC 80064EDC 02308823 */   subu     $s1, $s1, $s0
/* 402E0 80064EE0 8FA2003C */  lw        $v0, 0x3C($sp)
/* 402E4 80064EE4 00501021 */  addu      $v0, $v0, $s0
/* 402E8 80064EE8 AFA2003C */  sw        $v0, 0x3C($sp)
.L80064EEC:
/* 402EC 80064EEC 1E20FFEF */  bgtz      $s1, .L80064EAC
/* 402F0 80064EF0 2E220021 */   sltiu    $v0, $s1, 0x21
.L80064EF4:
/* 402F4 80064EF4 8FA6002C */  lw        $a2, 0x2C($sp)
/* 402F8 80064EF8 18C0000C */  blez      $a2, .L80064F2C
/* 402FC 80064EFC 02602021 */   addu     $a0, $s3, $zero
/* 40300 80064F00 8FA20018 */  lw        $v0, 0x18($sp)
/* 40304 80064F04 8FA50024 */  lw        $a1, 0x24($sp)
/* 40308 80064F08 0280F809 */  jalr      $s4
/* 4030C 80064F0C 00452821 */   addu     $a1, $v0, $a1
/* 40310 80064F10 00409821 */  addu      $s3, $v0, $zero
/* 40314 80064F14 12600038 */  beqz      $s3, .L80064FF8
/* 40318 80064F18 00000000 */   nop
/* 4031C 80064F1C 8FA2003C */  lw        $v0, 0x3C($sp)
/* 40320 80064F20 8FA3002C */  lw        $v1, 0x2C($sp)
/* 40324 80064F24 00431021 */  addu      $v0, $v0, $v1
/* 40328 80064F28 AFA2003C */  sw        $v0, 0x3C($sp)
.L80064F2C:
/* 4032C 80064F2C 8FA20030 */  lw        $v0, 0x30($sp)
/* 40330 80064F30 18400015 */  blez      $v0, .L80064F88
/* 40334 80064F34 00000000 */   nop
/* 40338 80064F38 00408821 */  addu      $s1, $v0, $zero
/* 4033C 80064F3C 2E220021 */  sltiu     $v0, $s1, 0x21
.L80064F40:
/* 40340 80064F40 10400002 */  beqz      $v0, .L80064F4C
/* 40344 80064F44 24100020 */   addiu    $s0, $zero, 0x20
/* 40348 80064F48 02208021 */  addu      $s0, $s1, $zero
.L80064F4C:
/* 4034C 80064F4C 5A00000C */  blezl     $s0, .L80064F80
/* 40350 80064F50 02308823 */   subu     $s1, $s1, $s0
/* 40354 80064F54 02602021 */  addu      $a0, $s3, $zero
/* 40358 80064F58 3C058009 */  lui       $a1, %hi(zeroes)
/* 4035C 80064F5C 24A54604 */  addiu     $a1, $a1, %lo(zeroes)
/* 40360 80064F60 0280F809 */  jalr      $s4
/* 40364 80064F64 02003021 */   addu     $a2, $s0, $zero
/* 40368 80064F68 00409821 */  addu      $s3, $v0, $zero
/* 4036C 80064F6C 12600022 */  beqz      $s3, .L80064FF8
/* 40370 80064F70 02308823 */   subu     $s1, $s1, $s0
/* 40374 80064F74 8FA2003C */  lw        $v0, 0x3C($sp)
/* 40378 80064F78 00501021 */  addu      $v0, $v0, $s0
/* 4037C 80064F7C AFA2003C */  sw        $v0, 0x3C($sp)
.L80064F80:
/* 40380 80064F80 1E20FFEF */  bgtz      $s1, .L80064F40
/* 40384 80064F84 2E220021 */   sltiu    $v0, $s1, 0x21
.L80064F88:
/* 40388 80064F88 8FA20040 */  lw        $v0, 0x40($sp)
/* 4038C 80064F8C 30420004 */  andi      $v0, $v0, 0x4
/* 40390 80064F90 1040FED2 */  beqz      $v0, .L80064ADC
/* 40394 80064F94 26450001 */   addiu    $a1, $s2, 0x1
/* 40398 80064F98 8FA20038 */  lw        $v0, 0x38($sp)
/* 4039C 80064F9C 1840FECF */  blez      $v0, .L80064ADC
/* 403A0 80064FA0 00408821 */   addu     $s1, $v0, $zero
/* 403A4 80064FA4 2E220021 */  sltiu     $v0, $s1, 0x21
.L80064FA8:
/* 403A8 80064FA8 10400002 */  beqz      $v0, .L80064FB4
/* 403AC 80064FAC 24100020 */   addiu    $s0, $zero, 0x20
/* 403B0 80064FB0 02208021 */  addu      $s0, $s1, $zero
.L80064FB4:
/* 403B4 80064FB4 5A00000C */  blezl     $s0, .L80064FE8
/* 403B8 80064FB8 02308823 */   subu     $s1, $s1, $s0
/* 403BC 80064FBC 02602021 */  addu      $a0, $s3, $zero
/* 403C0 80064FC0 3C058009 */  lui       $a1, %hi(spaces)
/* 403C4 80064FC4 24A545E0 */  addiu     $a1, $a1, %lo(spaces)
/* 403C8 80064FC8 0280F809 */  jalr      $s4
/* 403CC 80064FCC 02003021 */   addu     $a2, $s0, $zero
/* 403D0 80064FD0 00409821 */  addu      $s3, $v0, $zero
/* 403D4 80064FD4 12600008 */  beqz      $s3, .L80064FF8
/* 403D8 80064FD8 02308823 */   subu     $s1, $s1, $s0
/* 403DC 80064FDC 8FA2003C */  lw        $v0, 0x3C($sp)
/* 403E0 80064FE0 00501021 */  addu      $v0, $v0, $s0
/* 403E4 80064FE4 AFA2003C */  sw        $v0, 0x3C($sp)
.L80064FE8:
/* 403E8 80064FE8 1E20FFEF */  bgtz      $s1, .L80064FA8
/* 403EC 80064FEC 2E220021 */   sltiu    $v0, $s1, 0x21
/* 403F0 80064FF0 080192B7 */  j         .L80064ADC
/* 403F4 80064FF4 26450001 */   addiu    $a1, $s2, 0x1
.L80064FF8:
/* 403F8 80064FF8 8FA2003C */  lw        $v0, 0x3C($sp)
/* 403FC 80064FFC 8FBF00A8 */  lw        $ra, 0xA8($sp)
/* 40400 80065000 8FB500A4 */  lw        $s5, 0xA4($sp)
/* 40404 80065004 8FB400A0 */  lw        $s4, 0xA0($sp)
/* 40408 80065008 8FB3009C */  lw        $s3, 0x9C($sp)
/* 4040C 8006500C 8FB20098 */  lw        $s2, 0x98($sp)
/* 40410 80065010 8FB10094 */  lw        $s1, 0x94($sp)
/* 40414 80065014 8FB00090 */  lw        $s0, 0x90($sp)
/* 40418 80065018 03E00008 */  jr        $ra
/* 4041C 8006501C 27BD00B0 */   addiu    $sp, $sp, 0xB0

### DECOMPILED C INSTRUCTIONS:

int _Printf(outfun prout, char *arg, const char *fmt, va_list args) {
    _Pft x;
    const char *s;
    char c;
    const char *t;
    static const char fchar[] = {' ', '+', '-', '#', '0', '\0'};
    static const int fbit[] = {FLAGS_SPACE, FLAGS_PLUS, FLAGS_MINUS, FLAGS_HASH, FLAGS_ZERO, 0};
    char ac[32];

    x.nchar = 0;

    for (;;) {
        s = fmt;

        for (c = *s; c != 0 && c != '%';) {
            c = *++s;
        }

        PUT(fmt, s - fmt);

        if (c == 0) {
            return x.nchar;
        }

        fmt = ++s;

        for (x.flags = 0; (t = strchr(fchar, *s)) != NULL; s++) {
            x.flags |= fbit[t - fchar];
        }

        if (*s == '*') {
            x.width = va_arg(args, int);

            if (x.width < 0) {
                x.width = -x.width;
                x.flags |= FLAGS_MINUS;
            }
            s++;
        } else {
            ATOI(x.width, s);
        }

        if (*s != '.') {
            x.prec = -1;
        } else if (*++s == '*') {
            x.prec = va_arg(args, int);
            ++s;
        } else {
            ATOI(x.prec, s);
        }

        x.qual = strchr("hlL", *s) ? *s++ : '\0';

        if (x.qual == 'l' && *s == 'l') {
            x.qual = 'L';
            ++s;
        }

        _Putfld(&x, &args, *s, ac);
        x.width -= x.n0 + x.nz0 + x.n1 + x.nz1 + x.n2 + x.nz2;

        if (!(x.flags & FLAGS_MINUS)) {
            PAD(spaces, x.width);
        }

        PUT(ac, x.n0);
        PAD(zeroes, x.nz0);
        PUT(x.s, x.n1);
        PAD(zeroes, x.nz1);
        PUT(x.s + x.n1, x.n2);
        PAD(zeroes, x.nz2);

        if (x.flags & FLAGS_MINUS) {
            PAD(spaces, x.width);
        }

        fmt = s + 1;
    }
    return 0;
}


### RAW ASSEMBLY INSTRUCTIONS:

glabel radial_shimmer_main
/* 366030 E0066000 27BDFFB0 */  addiu     $sp, $sp, -0x50
/* 366034 E0066004 F7B40038 */  sdc1      $f20, 0x38($sp)
/* 366038 E0066008 4485A000 */  mtc1      $a1, $f20
/* 36603C E006600C F7B60040 */  sdc1      $f22, 0x40($sp)
/* 366040 E0066010 4486B000 */  mtc1      $a2, $f22
/* 366044 E0066014 AFB1002C */  sw        $s1, 0x2C($sp)
/* 366048 E0066018 0080882D */  daddu     $s1, $a0, $zero
/* 36604C E006601C F7B80048 */  sdc1      $f24, 0x48($sp)
/* 366050 E0066020 4487C000 */  mtc1      $a3, $f24
/* 366054 E0066024 27A40010 */  addiu     $a0, $sp, 0x10
/* 366058 E0066028 AFB00028 */  sw        $s0, 0x28($sp)
/* 36605C E006602C 8FB00064 */  lw        $s0, 0x64($sp)
/* 366060 E0066030 3C02E006 */  lui       $v0, %hi(radial_shimmer_init)
/* 366064 E0066034 24426490 */  addiu     $v0, $v0, %lo(radial_shimmer_init)
/* 366068 E0066038 AFA20018 */  sw        $v0, 0x18($sp)
/* 36606C E006603C 3C02E006 */  lui       $v0, %hi(radial_shimmer_update)
/* 366070 E0066040 24426498 */  addiu     $v0, $v0, %lo(radial_shimmer_update)
/* 366074 E0066044 AFA2001C */  sw        $v0, 0x1C($sp)
/* 366078 E0066048 3C02E006 */  lui       $v0, %hi(radial_shimmer_render)
/* 36607C E006604C 2442672C */  addiu     $v0, $v0, %lo(radial_shimmer_render)
/* 366080 E0066050 AFA20020 */  sw        $v0, 0x20($sp)
/* 366084 E0066054 24020033 */  addiu     $v0, $zero, 0x33
/* 366088 E0066058 AFBF0034 */  sw        $ra, 0x34($sp)
/* 36608C E006605C AFB20030 */  sw        $s2, 0x30($sp)
/* 366090 E0066060 AFA00010 */  sw        $zero, 0x10($sp)
/* 366094 E0066064 AFA00024 */  sw        $zero, 0x24($sp)
/* 366098 E0066068 0C080124 */  jal       shim_create_effect_instance
/* 36609C E006606C AFA20014 */   sw       $v0, 0x14($sp)
/* 3660A0 E0066070 24040070 */  addiu     $a0, $zero, 0x70
/* 3660A4 E0066074 24030001 */  addiu     $v1, $zero, 0x1
/* 3660A8 E0066078 0040902D */  daddu     $s2, $v0, $zero
/* 3660AC E006607C 0C08012C */  jal       shim_general_heap_malloc
/* 3660B0 E0066080 AE430008 */   sw       $v1, 0x8($s2)
/* 3660B4 E0066084 0040202D */  daddu     $a0, $v0, $zero
/* 3660B8 E0066088 14800003 */  bnez      $a0, .LE0066098
/* 3660BC E006608C AE42000C */   sw       $v0, 0xC($s2)
.LE0066090:
/* 3660C0 E0066090 08019824 */  j         .LE0066090
/* 3660C4 E0066094 00000000 */   nop
.LE0066098:
/* 3660C8 E0066098 AC910000 */  sw        $s1, 0x0($a0)
/* 3660CC E006609C AC900028 */  sw        $s0, 0x28($a0)
/* 3660D0 E00660A0 AC80002C */  sw        $zero, 0x2C($a0)
/* 3660D4 E00660A4 AC800024 */  sw        $zero, 0x24($a0)
/* 3660D8 E00660A8 E4940010 */  swc1      $f20, 0x10($a0)
/* 3660DC E00660AC E4960014 */  swc1      $f22, 0x14($a0)
/* 3660E0 E00660B0 E4980018 */  swc1      $f24, 0x18($a0)
/* 3660E4 E00660B4 E4940004 */  swc1      $f20, 0x4($a0)
/* 3660E8 E00660B8 E4960008 */  swc1      $f22, 0x8($a0)
/* 3660EC E00660BC E498000C */  swc1      $f24, 0xC($a0)
/* 3660F0 E00660C0 C7A00060 */  lwc1      $f0, 0x60($sp)
/* 3660F4 E00660C4 3C014080 */  lui       $at, (0x40800000 >> 16)
/* 3660F8 E00660C8 44811000 */  mtc1      $at, $f2
/* 3660FC E00660CC 3C014120 */  lui       $at, (0x41200000 >> 16)
/* 366100 E00660D0 44812000 */  mtc1      $at, $f4
/* 366104 E00660D4 3C014248 */  lui       $at, (0x42480000 >> 16)
/* 366108 E00660D8 44813000 */  mtc1      $at, $f6
/* 36610C E00660DC 240200FF */  addiu     $v0, $zero, 0xFF
/* 366110 E00660E0 A0820068 */  sb        $v0, 0x68($a0)
/* 366114 E00660E4 A0820069 */  sb        $v0, 0x69($a0)
/* 366118 E00660E8 A082006B */  sb        $v0, 0x6B($a0)
/* 36611C E00660EC A082006C */  sb        $v0, 0x6C($a0)
/* 366120 E00660F0 A082006D */  sb        $v0, 0x6D($a0)
/* 366124 E00660F4 E4800020 */  swc1      $f0, 0x20($a0)
/* 366128 E00660F8 44800000 */  mtc1      $zero, $f0
/* 36612C E00660FC 2E22000F */  sltiu     $v0, $s1, 0xF
/* 366130 E0066100 A080006A */  sb        $zero, 0x6A($a0)
/* 366134 E0066104 E482005C */  swc1      $f2, 0x5C($a0)
/* 366138 E0066108 E484001C */  swc1      $f4, 0x1C($a0)
/* 36613C E006610C E4860060 */  swc1      $f6, 0x60($a0)
/* 366140 E0066110 E4800044 */  swc1      $f0, 0x44($a0)
/* 366144 E0066114 E4800040 */  swc1      $f0, 0x40($a0)
/* 366148 E0066118 E480004C */  swc1      $f0, 0x4C($a0)
/* 36614C E006611C E4800048 */  swc1      $f0, 0x48($a0)
/* 366150 E0066120 E4800034 */  swc1      $f0, 0x34($a0)
/* 366154 E0066124 E4800030 */  swc1      $f0, 0x30($a0)
/* 366158 E0066128 E480003C */  swc1      $f0, 0x3C($a0)
/* 36615C E006612C E4800038 */  swc1      $f0, 0x38($a0)
/* 366160 E0066130 E4800058 */  swc1      $f0, 0x58($a0)
/* 366164 E0066134 E4800050 */  swc1      $f0, 0x50($a0)
/* 366168 E0066138 E4800054 */  swc1      $f0, 0x54($a0)
/* 36616C E006613C 104000BB */  beqz      $v0, .LE006642C
/* 366170 E0066140 E4800064 */   swc1     $f0, 0x64($a0)
/* 366174 E0066144 00111080 */  sll       $v0, $s1, 2
/* 366178 E0066148 3C01E006 */  lui       $at, (0xE0066CE0 >> 16)
/* 36617C E006614C 00220821 */  addu      $at, $at, $v0
/* 366180 E0066150 8C226CE0 */  lw        $v0, (0xE0066CE0 & 0xFFFF)($at)
/* 366184 E0066154 00400008 */  jr        $v0
/* 366188 E0066158 00000000 */   nop
/* 36618C E006615C 3C014300 */  lui       $at, (0x43000000 >> 16)
/* 366190 E0066160 44810000 */  mtc1      $at, $f0
/* 366194 E0066164 3C01428C */  lui       $at, (0x428C0000 >> 16)
/* 366198 E0066168 44812000 */  mtc1      $at, $f4
/* 36619C E006616C 3C01C2C8 */  lui       $at, (0xC2C80000 >> 16)
/* 3661A0 E0066170 44813000 */  mtc1      $at, $f6
/* 3661A4 E0066174 44901000 */  mtc1      $s0, $f2
/* 3661A8 E0066178 00000000 */  nop
/* 3661AC E006617C 468010A0 */  cvt.s.w   $f2, $f2
/* 3661B0 E0066180 E4800040 */  swc1      $f0, 0x40($a0)
/* 3661B4 E0066184 46020003 */  div.s     $f0, $f0, $f2
/* 3661B8 E0066188 E4800044 */  swc1      $f0, 0x44($a0)
/* 3661BC E006618C E4840060 */  swc1      $f4, 0x60($a0)
/* 3661C0 E0066190 0801991A */  j         .LE0066468
/* 3661C4 E0066194 E4860064 */   swc1     $f6, 0x64($a0)
/* 3661C8 E0066198 3C0140E0 */  lui       $at, (0x40E00000 >> 16)
/* 3661CC E006619C 44810000 */  mtc1      $at, $f0
/* 3661D0 E00661A0 3C01C040 */  lui       $at, (0xC0400000 >> 16)
/* 3661D4 E00661A4 44811000 */  mtc1      $at, $f2
/* 3661D8 E00661A8 3C014040 */  lui       $at, (0x40400000 >> 16)
/* 3661DC E00661AC 44812000 */  mtc1      $at, $f4
/* 3661E0 E00661B0 3C01C0E0 */  lui       $at, (0xC0E00000 >> 16)
/* 3661E4 E00661B4 44813000 */  mtc1      $at, $f6
/* 3661E8 E00661B8 08019907 */  j         .LE006641C
/* 3661EC E00661BC E4800034 */   swc1     $f0, 0x34($a0)
/* 3661F0 E00661C0 3C014380 */  lui       $at, (0x43800000 >> 16)
/* 3661F4 E00661C4 44810000 */  mtc1      $at, $f0
/* 3661F8 E00661C8 3C0140E0 */  lui       $at, (0x40E00000 >> 16)
/* 3661FC E00661CC 44812000 */  mtc1      $at, $f4
/* 366200 E00661D0 3C01C040 */  lui       $at, (0xC0400000 >> 16)
/* 366204 E00661D4 44811000 */  mtc1      $at, $f2
/* 366208 E00661D8 3C01C080 */  lui       $at, (0xC0800000 >> 16)
/* 36620C E00661DC 44813000 */  mtc1      $at, $f6
/* 366210 E00661E0 240200EB */  addiu     $v0, $zero, 0xEB
/* 366214 E00661E4 A0820068 */  sb        $v0, 0x68($a0)
/* 366218 E00661E8 A0820069 */  sb        $v0, 0x69($a0)
/* 36621C E00661EC A082006A */  sb        $v0, 0x6A($a0)
/* 366220 E00661F0 E4800040 */  swc1      $f0, 0x40($a0)
/* 366224 E00661F4 E4800048 */  swc1      $f0, 0x48($a0)
/* 366228 E00661F8 E4840034 */  swc1      $f4, 0x34($a0)
/* 36622C E00661FC E4820044 */  swc1      $f2, 0x44($a0)
/* 366230 E0066200 E482003C */  swc1      $f2, 0x3C($a0)
/* 366234 E0066204 0801991A */  j         .LE0066468
/* 366238 E0066208 E486004C */   swc1     $f6, 0x4C($a0)
/* 36623C E006620C 3C0140E0 */  lui       $at, (0x40E00000 >> 16)
/* 366240 E0066210 44811000 */  mtc1      $at, $f2
/* 366244 E0066214 3C01C040 */  lui       $at, (0xC0400000 >> 16)
/* 366248 E0066218 44810000 */  mtc1      $at, $f0
/* 36624C E006621C 3C01C0A0 */  lui       $at, (0xC0A00000 >> 16)
/* 366250 E0066220 44812000 */  mtc1      $at, $f4
/* 366254 E0066224 24020014 */  addiu     $v0, $zero, 0x14
/* 366258 E0066228 A0820068 */  sb        $v0, 0x68($a0)
/* 36625C E006622C 240200C8 */  addiu     $v0, $zero, 0xC8
/* 366260 E0066230 A0820069 */  sb        $v0, 0x69($a0)
/* 366264 E0066234 24020020 */  addiu     $v0, $zero, 0x20
/* 366268 E0066238 080198E6 */  j         .LE0066398
/* 36626C E006623C A082006A */   sb       $v0, 0x6A($a0)
/* 366270 E0066240 3C0140E0 */  lui       $at, (0x40E00000 >> 16)
/* 366274 E0066244 44810000 */  mtc1      $at, $f0
/* 366278 E0066248 3C014040 */  lui       $at, (0x40400000 >> 16)
/* 36627C E006624C 44811000 */  mtc1      $at, $f2
/* 366280 E0066250 3C0140A0 */  lui       $at, (0x40A00000 >> 16)
/* 366284 E0066254 44812000 */  mtc1      $at, $f4
/* 366288 E0066258 E4800034 */  swc1      $f0, 0x34($a0)
/* 36628C E006625C E4820044 */  swc1      $f2, 0x44($a0)
/* 366290 E0066260 E482003C */  swc1      $f2, 0x3C($a0)
/* 366294 E0066264 0801991A */  j         .LE0066468
/* 366298 E0066268 E484004C */   swc1     $f4, 0x4C($a0)
/* 36629C E006626C 3C0140E0 */  lui       $at, (0x40E00000 >> 16)
/* 3662A0 E0066270 44810000 */  mtc1      $at, $f0
/* 3662A4 E0066274 3C014040 */  lui       $at, (0x40400000 >> 16)
/* 3662A8 E0066278 44811000 */  mtc1      $at, $f2
/* 3662AC E006627C 3C01C040 */  lui       $at, (0xC0400000 >> 16)
/* 3662B0 E0066280 44812000 */  mtc1      $at, $f4
/* 3662B4 E0066284 3C014080 */  lui       $at, (0x40800000 >> 16)
/* 3662B8 E0066288 44813000 */  mtc1      $at, $f6
/* 3662BC E006628C 240200EB */  addiu     $v0, $zero, 0xEB
/* 3662C0 E0066290 A0820068 */  sb        $v0, 0x68($a0)
/* 3662C4 E0066294 A0820069 */  sb        $v0, 0x69($a0)
/* 3662C8 E0066298 08019906 */  j         .LE0066418
/* 3662CC E006629C A082006A */   sb       $v0, 0x6A($a0)
/* 3662D0 E00662A0 3C0140E0 */  lui       $at, (0x40E00000 >> 16)
/* 3662D4 E00662A4 44810000 */  mtc1      $at, $f0
/* 3662D8 E00662A8 3C014040 */  lui       $at, (0x40400000 >> 16)
/* 3662DC E00662AC 44811000 */  mtc1      $at, $f2
/* 3662E0 E00662B0 3C01C040 */  lui       $at, (0xC0400000 >> 16)
/* 3662E4 E00662B4 44812000 */  mtc1      $at, $f4
/* 3662E8 E00662B8 3C0140A0 */  lui       $at, (0x40A00000 >> 16)
/* 3662EC E00662BC 44813000 */  mtc1      $at, $f6
/* 3662F0 E00662C0 240200FF */  addiu     $v0, $zero, 0xFF
/* 3662F4 E00662C4 A0820068 */  sb        $v0, 0x68($a0)
/* 3662F8 E00662C8 24020064 */  addiu     $v0, $zero, 0x64
/* 3662FC E00662CC A0820069 */  sb        $v0, 0x69($a0)
/* 366300 E00662D0 24020020 */  addiu     $v0, $zero, 0x20
/* 366304 E00662D4 08019906 */  j         .LE0066418
/* 366308 E00662D8 A082006A */   sb       $v0, 0x6A($a0)
/* 36630C E00662DC 240300D7 */  addiu     $v1, $zero, 0xD7
/* 366310 E00662E0 3C0140E0 */  lui       $at, (0x40E00000 >> 16)
/* 366314 E00662E4 44811000 */  mtc1      $at, $f2
/* 366318 E00662E8 3C01C040 */  lui       $at, (0xC0400000 >> 16)
/* 36631C E00662EC 44810000 */  mtc1      $at, $f0
/* 366320 E00662F0 3C01C000 */  lui       $at, (0xC0000000 >> 16)
/* 366324 E00662F4 44812000 */  mtc1      $at, $f4
/* 366328 E00662F8 240200D0 */  addiu     $v0, $zero, 0xD0
/* 36632C E00662FC A0820069 */  sb        $v0, 0x69($a0)
/* 366330 E0066300 240200FF */  addiu     $v0, $zero, 0xFF
/* 366334 E0066304 A0830068 */  sb        $v1, 0x68($a0)
/* 366338 E0066308 A080006A */  sb        $zero, 0x6A($a0)
/* 36633C E006630C A083006B */  sb        $v1, 0x6B($a0)
/* 366340 E0066310 080198E5 */  j         .LE0066394
/* 366344 E0066314 A082006C */   sb       $v0, 0x6C($a0)
/* 366348 E0066318 3C014300 */  lui       $at, (0x43000000 >> 16)
/* 36634C E006631C 44810000 */  mtc1      $at, $f0
/* 366350 E0066320 3C01C2C8 */  lui       $at, (0xC2C80000 >> 16)
/* 366354 E0066324 44812000 */  mtc1      $at, $f4
/* 366358 E0066328 44901000 */  mtc1      $s0, $f2
/* 36635C E006632C 00000000 */  nop
/* 366360 E0066330 468010A0 */  cvt.s.w   $f2, $f2
/* 366364 E0066334 E4800040 */  swc1      $f0, 0x40($a0)
/* 366368 E0066338 46020003 */  div.s     $f0, $f0, $f2
/* 36636C E006633C E4800044 */  swc1      $f0, 0x44($a0)
/* 366370 E0066340 0801991A */  j         .LE0066468
/* 366374 E0066344 E4840064 */   swc1     $f4, 0x64($a0)
/* 366378 E0066348 24020020 */  addiu     $v0, $zero, 0x20
/* 36637C E006634C 3C0140E0 */  lui       $at, (0x40E00000 >> 16)
/* 366380 E0066350 44811000 */  mtc1      $at, $f2
/* 366384 E0066354 3C01C040 */  lui       $at, (0xC0400000 >> 16)
/* 366388 E0066358 44810000 */  mtc1      $at, $f0
/* 36638C E006635C 3C01C000 */  lui       $at, (0xC0000000 >> 16)
/* 366390 E0066360 44812000 */  mtc1      $at, $f4
/* 366394 E0066364 240300FF */  addiu     $v1, $zero, 0xFF
/* 366398 E0066368 A0820069 */  sb        $v0, 0x69($a0)
/* 36639C E006636C 24020007 */  addiu     $v0, $zero, 0x7
/* 3663A0 E0066370 A0800068 */  sb        $zero, 0x68($a0)
/* 3663A4 E0066374 A0820068 */  sb        $v0, 0x68($a0)
/* 3663A8 E0066378 240200D8 */  addiu     $v0, $zero, 0xD8
/* 3663AC E006637C A083006A */  sb        $v1, 0x6A($a0)
/* 3663B0 E0066380 A082006A */  sb        $v0, 0x6A($a0)
/* 3663B4 E0066384 240200E4 */  addiu     $v0, $zero, 0xE4
/* 3663B8 E0066388 A0800069 */  sb        $zero, 0x69($a0)
/* 3663BC E006638C A082006B */  sb        $v0, 0x6B($a0)
/* 3663C0 E0066390 A083006C */  sb        $v1, 0x6C($a0)
.LE0066394:
/* 3663C4 E0066394 A080006D */  sb        $zero, 0x6D($a0)
.LE0066398:
/* 3663C8 E0066398 E4820034 */  swc1      $f2, 0x34($a0)
/* 3663CC E006639C E4800044 */  swc1      $f0, 0x44($a0)
/* 3663D0 E00663A0 E480003C */  swc1      $f0, 0x3C($a0)
/* 3663D4 E00663A4 0801991A */  j         .LE0066468
/* 3663D8 E00663A8 E484004C */   swc1     $f4, 0x4C($a0)
/* 3663DC E00663AC 3C0140E0 */  lui       $at, (0x40E00000 >> 16)
/* 3663E0 E00663B0 44810000 */  mtc1      $at, $f0
/* 3663E4 E00663B4 3C014100 */  lui       $at, (0x41000000 >> 16)
/* 3663E8 E00663B8 44811000 */  mtc1      $at, $f2
/* 3663EC E00663BC 3C01C040 */  lui       $at, (0xC0400000 >> 16)
/* 3663F0 E00663C0 44812000 */  mtc1      $at, $f4
/* 3663F4 E00663C4 3C0140C0 */  lui       $at, (0x40C00000 >> 16)
/* 3663F8 E00663C8 44813000 */  mtc1      $at, $f6
/* 3663FC E00663CC 24020007 */  addiu     $v0, $zero, 0x7
/* 366400 E00663D0 A0820068 */  sb        $v0, 0x68($a0)
/* 366404 E00663D4 240200D8 */  addiu     $v0, $zero, 0xD8
/* 366408 E00663D8 A082006A */  sb        $v0, 0x6A($a0)
/* 36640C E00663DC 240200E4 */  addiu     $v0, $zero, 0xE4
/* 366410 E00663E0 A082006B */  sb        $v0, 0x6B($a0)
/* 366414 E00663E4 240200FF */  addiu     $v0, $zero, 0xFF
/* 366418 E00663E8 A0800069 */  sb        $zero, 0x69($a0)
/* 36641C E00663EC A082006C */  sb        $v0, 0x6C($a0)
/* 366420 E00663F0 08019906 */  j         .LE0066418
/* 366424 E00663F4 A080006D */   sb       $zero, 0x6D($a0)
/* 366428 E00663F8 3C0140E0 */  lui       $at, (0x40E00000 >> 16)
/* 36642C E00663FC 44810000 */  mtc1      $at, $f0
/* 366430 E0066400 3C01C040 */  lui       $at, (0xC0400000 >> 16)
/* 366434 E0066404 44811000 */  mtc1      $at, $f2
/* 366438 E0066408 3C01C0A0 */  lui       $at, (0xC0A00000 >> 16)
/* 36643C E006640C 44812000 */  mtc1      $at, $f4
/* 366440 E0066410 3C01C080 */  lui       $at, (0xC0800000 >> 16)
/* 366444 E0066414 44813000 */  mtc1      $at, $f6
.LE0066418:
/* 366448 E0066418 E4800034 */  swc1      $f0, 0x34($a0)
.LE006641C:
/* 36644C E006641C E4820044 */  swc1      $f2, 0x44($a0)
/* 366450 E0066420 E484003C */  swc1      $f4, 0x3C($a0)
/* 366454 E0066424 0801991A */  j         .LE0066468
/* 366458 E0066428 E486004C */   swc1     $f6, 0x4C($a0)
.LE006642C:
/* 36645C E006642C 3C014080 */  lui       $at, (0x40800000 >> 16)
/* 366460 E0066430 44810000 */  mtc1      $at, $f0
/* 366464 E0066434 3C0140E0 */  lui       $at, (0x40E00000 >> 16)
/* 366468 E0066438 44811000 */  mtc1      $at, $f2
/* 36646C E006643C 3C014060 */  lui       $at, (0x40600000 >> 16)
/* 366470 E0066440 44812000 */  mtc1      $at, $f4
/* 366474 E0066444 3C0141A0 */  lui       $at, (0x41A00000 >> 16)
/* 366478 E0066448 44813000 */  mtc1      $at, $f6
/* 36647C E006644C 3C01C2D4 */  lui       $at, (0xC2D40000 >> 16)
/* 366480 E0066450 44814000 */  mtc1      $at, $f8
/* 366484 E0066454 E4800040 */  swc1      $f0, 0x40($a0)
/* 366488 E0066458 E4820034 */  swc1      $f2, 0x34($a0)
/* 36648C E006645C E484004C */  swc1      $f4, 0x4C($a0)
/* 366490 E0066460 E4860060 */  swc1      $f6, 0x60($a0)
/* 366494 E0066464 E4880064 */  swc1      $f8, 0x64($a0)
.LE0066468:
/* 366498 E0066468 0240102D */  daddu     $v0, $s2, $zero
/* 36649C E006646C 8FBF0034 */  lw        $ra, 0x34($sp)
/* 3664A0 E0066470 8FB20030 */  lw        $s2, 0x30($sp)
/* 3664A4 E0066474 8FB1002C */  lw        $s1, 0x2C($sp)
/* 3664A8 E0066478 8FB00028 */  lw        $s0, 0x28($sp)
/* 3664AC E006647C D7B80048 */  ldc1      $f24, 0x48($sp)
/* 3664B0 E0066480 D7B60040 */  ldc1      $f22, 0x40($sp)
/* 3664B4 E0066484 D7B40038 */  ldc1      $f20, 0x38($sp)
/* 3664B8 E0066488 03E00008 */  jr        $ra
/* 3664BC E006648C 27BD0050 */   addiu    $sp, $sp, 0x50

### DECOMPILED C INSTRUCTIONS:

EffectInstance* radial_shimmer_main(s32 arg0, f32 arg1, f32 arg2, f32 arg3, f32 arg4, s32 arg5) {
    EffectBlueprint bp;
    EffectInstance* effect;
    RadialShimmerFXData* data;
    s32 numParts = 1;
    s32 arg5_2 = arg5;

    bp.init = radial_shimmer_init;
    bp.update = radial_shimmer_update;
    bp.renderWorld = radial_shimmer_render;
    bp.unk_00 = 0;
    bp.renderUI = NULL;
    bp.effectID = EFFECT_RADIAL_SHIMMER;

    effect = shim_create_effect_instance(&bp);
    effect->numParts = numParts;
    data = effect->data.radialShimmer = shim_general_heap_malloc(numParts * sizeof(*data));
    ASSERT(effect->data.radialShimmer != NULL);

    data->unk_00 = arg0;
    data->timeLeft = arg5_2;
    data->unk_24 = data->lifeTime = 0;
    data->unk_10 = arg1;
    data->unk_14 = arg2;
    data->unk_18 = arg3;
    data->unk_04 = arg1;
    data->unk_08 = arg2;
    data->unk_0C = arg3;
    data->unk_20 = arg4;
    data->unk_68 = 255;
    data->unk_69 = 255;
    data->unk_6A = 0;
    data->unk_6B = 255;
    data->unk_6C = 255;
    data->unk_6D = 255;
    data->unk_5C = 4.0f;
    data->unk_1C = 10.0f;
    data->unk_60 = 50.0f;
    data->unk_40 = data->unk_44 = 0.0f;
    data->unk_48 = data->unk_4C = 0.0f;
    data->unk_30 = data->unk_34 = 0.0f;
    data->unk_38 = data->unk_3C = 0.0f;
    data->unk_50 = data->unk_58 = 0.0f;
    data->unk_54 = 0.0f;
    data->unk_64 = 0.0f;

    switch (arg0) {
        case 0:
        case 1:
            data->unk_40 = 128.0f;
            data->unk_44 = 128.0f / arg5_2;
            data->unk_60 = 70.0f;
            data->unk_64 = -100.0f;
            break;
        case 2:
            data->unk_34 = 7.0f;
            data->unk_44 = -3.0f;
            data->unk_3C = 3.0f;
            data->unk_4C = -7.0f;
            break;
        case 3:
            data->unk_68 = 235;
            data->unk_69 = 235;
            data->unk_6A = 235;
            data->unk_40 = 256.0f;
            data->unk_48 = 256.0f;
            data->unk_34 = 7.0f;
            data->unk_44 = -3.0f;
            data->unk_3C = -3.0f;
            data->unk_4C = -4.0f;
            break;
        case 4:
            data->unk_68 = 20;
            data->unk_69 = 200;
            data->unk_6A = 32;
            data->unk_34 = 7.0f;
            data->unk_44 = -3.0f;
            data->unk_3C = -3.0f;
            data->unk_4C = -5.0f;
            break;
        case 5:
            data->unk_34 = 7.0f;
            data->unk_44 = 3.0f;
            data->unk_3C = 3.0f;
            data->unk_4C = 5.0f;
            break;
        case 6:
            data->unk_68 = 235;
            data->unk_69 = 235;
            data->unk_6A = 235;
            data->unk_34 = 7.0f;
            data->unk_44 = 3.0f;
            data->unk_3C = -3.0f;
            data->unk_4C = 4.0f;
            break;
        case 7:
            data->unk_68 = 255;
            data->unk_69 = 100;
            data->unk_6A = 32;
            data->unk_34 = 7.0f;
            data->unk_44 = 3.0f;
            data->unk_3C = -3.0f;
            data->unk_4C = 5.0f;
            break;
        case 8:
            data->unk_68 = 215;
            data->unk_69 = 208;
            data->unk_6A = 0;
            data->unk_6B = 215;
            data->unk_6C = 255;
            data->unk_6D = 0;
            data->unk_34 = 7.0f;
            data->unk_44 = -3.0f;
            data->unk_3C = -3.0f;
            data->unk_4C = -2.0f;
            break;
        case 9:
            data->unk_40 = 128.0f;
            data->unk_44 = 128.0f / arg5_2;
            data->unk_64 = -100.0f;
            break;
        case 10:
            data->unk_68 = 0;
            data->unk_69 = 32;
            data->unk_6A = 255;
            data->unk_68 = 7;
            data->unk_69 = 0;
            data->unk_6A = 216;
            data->unk_6B = 228;
            data->unk_6C = 255;
            data->unk_6D = 0;
            data->unk_34 = 7.0f;
            data->unk_44 = -3.0f;
            data->unk_3C = -3.0f;
            data->unk_4C = -2.0f;
            break;
        case 11:
            data->unk_68 = 7;
            data->unk_69 = 0;
            data->unk_6A = 216;
            data->unk_6B = 228;
            data->unk_6C = 255;
            data->unk_6D = 0;
            data->unk_34 = 7.0f;
            data->unk_44 = 8.0f;
            data->unk_3C = -3.0f;
            data->unk_4C = 6.0f;
            break;
        case 12:
        case 13:
            data->unk_34 = 7.0f;
            data->unk_44 = -3.0f;
            data->unk_3C = -5.0f;
            data->unk_4C = -4.0f;
            break;
        case 14:
        default:
            data->unk_40 = 4.0f;
            data->unk_34 = 7.0f;
            data->unk_4C = 3.5f;
            data->unk_60 = 20.0f;
            data->unk_64 = -106.0f;
            break;
    }

    return effect;
}