### RAW ASSEMBLY INSTRUCTIONS:

glabel landing_dust_main
/* 328270 E000C160 27BDFF90 */  addiu     $sp, $sp, -0x70
/* 328274 E000C164 F7B40040 */  sdc1      $f20, 0x40($sp)
/* 328278 E000C168 4485A000 */  mtc1      $a1, $f20
/* 32827C E000C16C AFB20030 */  sw        $s2, 0x30($sp)
/* 328280 E000C170 0080902D */  daddu     $s2, $a0, $zero
/* 328284 E000C174 F7B60048 */  sdc1      $f22, 0x48($sp)
/* 328288 E000C178 4486B000 */  mtc1      $a2, $f22
/* 32828C E000C17C F7B80050 */  sdc1      $f24, 0x50($sp)
/* 328290 E000C180 4487C000 */  mtc1      $a3, $f24
/* 328294 E000C184 24020003 */  addiu     $v0, $zero, 0x3
/* 328298 E000C188 AFBF003C */  sw        $ra, 0x3C($sp)
/* 32829C E000C18C AFB40038 */  sw        $s4, 0x38($sp)
/* 3282A0 E000C190 AFB30034 */  sw        $s3, 0x34($sp)
/* 3282A4 E000C194 AFB1002C */  sw        $s1, 0x2C($sp)
/* 3282A8 E000C198 AFB00028 */  sw        $s0, 0x28($sp)
/* 3282AC E000C19C F7BE0068 */  sdc1      $f30, 0x68($sp)
/* 3282B0 E000C1A0 F7BC0060 */  sdc1      $f28, 0x60($sp)
/* 3282B4 E000C1A4 F7BA0058 */  sdc1      $f26, 0x58($sp)
/* 3282B8 E000C1A8 1242000F */  beq       $s2, $v0, .LE000C1E8
/* 3282BC E000C1AC 27A40010 */   addiu    $a0, $sp, 0x10
/* 3282C0 E000C1B0 2A420004 */  slti      $v0, $s2, 0x4
/* 3282C4 E000C1B4 10400005 */  beqz      $v0, .LE000C1CC
/* 3282C8 E000C1B8 24020002 */   addiu    $v0, $zero, 0x2
/* 3282CC E000C1BC 12420008 */  beq       $s2, $v0, .LE000C1E0
/* 3282D0 E000C1C0 24130003 */   addiu    $s3, $zero, 0x3
/* 3282D4 E000C1C4 0800307D */  j         .LE000C1F4
/* 3282D8 E000C1C8 00000000 */   nop
.LE000C1CC:
/* 3282DC E000C1CC 24020004 */  addiu     $v0, $zero, 0x4
/* 3282E0 E000C1D0 12420007 */  beq       $s2, $v0, .LE000C1F0
/* 3282E4 E000C1D4 24130003 */   addiu    $s3, $zero, 0x3
/* 3282E8 E000C1D8 0800307D */  j         .LE000C1F4
/* 3282EC E000C1DC 00000000 */   nop
.LE000C1E0:
/* 3282F0 E000C1E0 0800307D */  j         .LE000C1F4
/* 3282F4 E000C1E4 24130001 */   addiu    $s3, $zero, 0x1
.LE000C1E8:
/* 3282F8 E000C1E8 0800307D */  j         .LE000C1F4
/* 3282FC E000C1EC 24130004 */   addiu    $s3, $zero, 0x4
.LE000C1F0:
/* 328300 E000C1F0 24130009 */  addiu     $s3, $zero, 0x9
.LE000C1F4:
/* 328304 E000C1F4 3C02E001 */  lui       $v0, %hi(landing_dust_init)
/* 328308 E000C1F8 2442C64C */  addiu     $v0, $v0, %lo(landing_dust_init)
/* 32830C E000C1FC AC820008 */  sw        $v0, 0x8($a0)
/* 328310 E000C200 3C02E001 */  lui       $v0, %hi(landing_dust_update)
/* 328314 E000C204 2442C654 */  addiu     $v0, $v0, %lo(landing_dust_update)
/* 328318 E000C208 AC82000C */  sw        $v0, 0xC($a0)
/* 32831C E000C20C 3C02E001 */  lui       $v0, %hi(landing_dust_render)
/* 328320 E000C210 2442C754 */  addiu     $v0, $v0, %lo(landing_dust_render)
/* 328324 E000C214 AC820010 */  sw        $v0, 0x10($a0)
/* 328328 E000C218 24020006 */  addiu     $v0, $zero, 0x6
/* 32832C E000C21C AC800000 */  sw        $zero, 0x0($a0)
/* 328330 E000C220 AC800014 */  sw        $zero, 0x14($a0)
/* 328334 E000C224 0C080124 */  jal       shim_create_effect_instance
/* 328338 E000C228 AC820004 */   sw       $v0, 0x4($a0)
/* 32833C E000C22C 00132100 */  sll       $a0, $s3, 4
/* 328340 E000C230 00932021 */  addu      $a0, $a0, $s3
/* 328344 E000C234 00042080 */  sll       $a0, $a0, 2
/* 328348 E000C238 0040802D */  daddu     $s0, $v0, $zero
/* 32834C E000C23C 0C08012C */  jal       shim_general_heap_malloc
/* 328350 E000C240 AE130008 */   sw       $s3, 0x8($s0)
/* 328354 E000C244 0040882D */  daddu     $s1, $v0, $zero
/* 328358 E000C248 16200003 */  bnez      $s1, .LE000C258
/* 32835C E000C24C AE11000C */   sw       $s1, 0xC($s0)
.LE000C250:
/* 328360 E000C250 08003094 */  j         .LE000C250
/* 328364 E000C254 00000000 */   nop
.LE000C258:
/* 328368 E000C258 0220202D */  daddu     $a0, $s1, $zero
/* 32836C E000C25C 00132900 */  sll       $a1, $s3, 4
/* 328370 E000C260 00B32821 */  addu      $a1, $a1, $s3
/* 328374 E000C264 0C080130 */  jal       shim_mem_clear
/* 328378 E000C268 00052880 */   sll      $a1, $a1, 2
/* 32837C E000C26C 2E420005 */  sltiu     $v0, $s2, 0x5
/* 328380 E000C270 1040000C */  beqz      $v0, .LE000C2A4
/* 328384 E000C274 00121080 */   sll      $v0, $s2, 2
/* 328388 E000C278 3C01E001 */  lui       $at, (0xE0010000 >> 16)
/* 32838C E000C27C 00220821 */  addu      $at, $at, $v0
/* 328390 E000C280 8C22CD40 */  lw        $v0, -0x32C0($at)
/* 328394 E000C284 00400008 */  jr        $v0
/* 328398 E000C288 00000000 */   nop
/* 32839C E000C28C 080030A9 */  j         .LE000C2A4
/* 3283A0 E000C290 AE200038 */   sw       $zero, 0x38($s1)
/* 3283A4 E000C294 080030A8 */  j         .LE000C2A0
/* 3283A8 E000C298 24020002 */   addiu    $v0, $zero, 0x2
/* 3283AC E000C29C 24020003 */  addiu     $v0, $zero, 0x3
.LE000C2A0:
/* 3283B0 E000C2A0 AE220038 */  sw        $v0, 0x38($s1)
.LE000C2A4:
/* 3283B4 E000C2A4 AE20003C */  sw        $zero, 0x3C($s1)
/* 3283B8 E000C2A8 A6320000 */  sh        $s2, 0x0($s1)
/* 3283BC E000C2AC E6340004 */  swc1      $f20, 0x4($s1)
/* 3283C0 E000C2B0 E6360008 */  swc1      $f22, 0x8($s1)
/* 3283C4 E000C2B4 E638000C */  swc1      $f24, 0xC($s1)
/* 3283C8 E000C2B8 2E420005 */  sltiu     $v0, $s2, 0x5
/* 3283CC E000C2BC 104000D5 */  beqz      $v0, .LE000C614
/* 3283D0 E000C2C0 26310044 */   addiu    $s1, $s1, 0x44
/* 3283D4 E000C2C4 00121080 */  sll       $v0, $s2, 2
/* 3283D8 E000C2C8 3C01E001 */  lui       $at, (0xE0010000 >> 16)
/* 3283DC E000C2CC 00220821 */  addu      $at, $at, $v0
/* 3283E0 E000C2D0 8C22CD58 */  lw        $v0, -0x32A8($at)
/* 3283E4 E000C2D4 00400008 */  jr        $v0
/* 3283E8 E000C2D8 00000000 */   nop
/* 3283EC E000C2DC 24120001 */  addiu     $s2, $zero, 0x1
/* 3283F0 E000C2E0 0253102A */  slt       $v0, $s2, $s3
/* 3283F4 E000C2E4 104000CB */  beqz      $v0, .LE000C614
/* 3283F8 E000C2E8 26300034 */   addiu    $s0, $s1, 0x34
/* 3283FC E000C2EC 2411005A */  addiu     $s1, $zero, 0x5A
/* 328400 E000C2F0 3C01C040 */  lui       $at, (0xC0400000 >> 16)
/* 328404 E000C2F4 4481F000 */  mtc1      $at, $f30
/* 328408 E000C2F8 3C013E99 */  lui       $at, (0x3E999999 >> 16)
/* 32840C E000C2FC 34219999 */  ori       $at, $at, (0x3E999999 & 0xFFFF)
/* 328410 E000C300 4481E000 */  mtc1      $at, $f28
/* 328414 E000C304 3C013FE0 */  lui       $at, (0x3FE00000 >> 16)
/* 328418 E000C308 4481D000 */  mtc1      $at, $f26
/* 32841C E000C30C 3C01BE23 */  lui       $at, (0xBE23D70A >> 16)
/* 328420 E000C310 3421D70A */  ori       $at, $at, (0xBE23D70A & 0xFFFF)
/* 328424 E000C314 4481C000 */  mtc1      $at, $f24
/* 328428 E000C318 3C014080 */  lui       $at, (0x40800000 >> 16)
/* 32842C E000C31C 4481B000 */  mtc1      $at, $f22
.LE000C320:
/* 328430 E000C320 44916000 */  mtc1      $s1, $f12
/* 328434 E000C324 00000000 */  nop
/* 328438 E000C328 46806320 */  cvt.s.w   $f12, $f12
/* 32843C E000C32C E61EFFDC */  swc1      $f30, -0x24($s0)
/* 328440 E000C330 E61CFFE0 */  swc1      $f28, -0x20($s0)
/* 328444 E000C334 AE00FFE4 */  sw        $zero, -0x1C($s0)
/* 328448 E000C338 AE00FFE8 */  sw        $zero, -0x18($s0)
/* 32844C E000C33C E61AFFEC */  swc1      $f26, -0x14($s0)
/* 328450 E000C340 E618FFF0 */  swc1      $f24, -0x10($s0)
/* 328454 E000C344 AE00FFF4 */  sw        $zero, -0xC($s0)
/* 328458 E000C348 AE00FFF8 */  sw        $zero, -0x8($s0)
/* 32845C E000C34C AE00FFD0 */  sw        $zero, -0x30($s0)
/* 328460 E000C350 AE00FFD4 */  sw        $zero, -0x2C($s0)
/* 328464 E000C354 0C08013C */  jal       shim_clamp_angle
/* 328468 E000C358 E616FFD8 */   swc1     $f22, -0x28($s0)
/* 32846C E000C35C 46000506 */  mov.s     $f20, $f0
/* 328470 E000C360 0C080140 */  jal       shim_sin_deg
/* 328474 E000C364 4600A306 */   mov.s    $f12, $f20
/* 328478 E000C368 4600A306 */  mov.s     $f12, $f20
/* 32847C E000C36C 0C080144 */  jal       shim_cos_deg
/* 328480 E000C370 E600FFFC */   swc1     $f0, -0x4($s0)
/* 328484 E000C374 263100B4 */  addiu     $s1, $s1, 0xB4
/* 328488 E000C378 26520001 */  addiu     $s2, $s2, 0x1
/* 32848C E000C37C E6000000 */  swc1      $f0, 0x0($s0)
/* 328490 E000C380 0253102A */  slt       $v0, $s2, $s3
/* 328494 E000C384 1440FFE6 */  bnez      $v0, .LE000C320
/* 328498 E000C388 26100044 */   addiu    $s0, $s0, 0x44
/* 32849C E000C38C 08003185 */  j         .LE000C614
/* 3284A0 E000C390 00000000 */   nop
/* 3284A4 E000C394 24120001 */  addiu     $s2, $zero, 0x1
/* 3284A8 E000C398 0253102A */  slt       $v0, $s2, $s3
/* 3284AC E000C39C 1040009D */  beqz      $v0, .LE000C614
/* 3284B0 E000C3A0 26300034 */   addiu    $s0, $s1, 0x34
/* 3284B4 E000C3A4 3C0141C8 */  lui       $at, (0x41C80000 >> 16)
/* 3284B8 E000C3A8 4481B000 */  mtc1      $at, $f22
/* 3284BC E000C3AC 3C01BD23 */  lui       $at, (0xBD23D70A >> 16)
/* 3284C0 E000C3B0 3421D70A */  ori       $at, $at, (0xBD23D70A & 0xFFFF)
/* 3284C4 E000C3B4 4481D000 */  mtc1      $at, $f26
/* 3284C8 E000C3B8 3C013F70 */  lui       $at, (0x3F70A3D7 >> 16)
/* 3284CC E000C3BC 3421A3D7 */  ori       $at, $at, (0x3F70A3D7 & 0xFFFF)
/* 3284D0 E000C3C0 4481C000 */  mtc1      $at, $f24
.LE000C3C4:
/* 3284D4 E000C3C4 2643FFFF */  addiu     $v1, $s2, -0x1
/* 3284D8 E000C3C8 24020001 */  addiu     $v0, $zero, 0x1
/* 3284DC E000C3CC 1062001E */  beq       $v1, $v0, .LE000C448
/* 3284E0 E000C3D0 28620002 */   slti     $v0, $v1, 0x2
/* 3284E4 E000C3D4 10400005 */  beqz      $v0, .LE000C3EC
/* 3284E8 E000C3D8 24020002 */   addiu    $v0, $zero, 0x2
/* 3284EC E000C3DC 10600007 */  beqz      $v1, .LE000C3FC
/* 3284F0 E000C3E0 00000000 */   nop
/* 3284F4 E000C3E4 0800313E */  j         .LE000C4F8
/* 3284F8 E000C3E8 26520001 */   addiu    $s2, $s2, 0x1
.LE000C3EC:
/* 3284FC E000C3EC 1062002B */  beq       $v1, $v0, .LE000C49C
/* 328500 E000C3F0 00000000 */   nop
/* 328504 E000C3F4 0800313E */  j         .LE000C4F8
/* 328508 E000C3F8 26520001 */   addiu    $s2, $s2, 0x1
.LE000C3FC:
/* 32850C E000C3FC 3C014307 */  lui       $at, (0x43070000 >> 16)
/* 328510 E000C400 4481A000 */  mtc1      $at, $f20
/* 328514 E000C404 0C080140 */  jal       shim_sin_deg
/* 328518 E000C408 4600A306 */   mov.s    $f12, $f20
/* 32851C E000C40C 46000007 */  neg.s     $f0, $f0
/* 328520 E000C410 46160002 */  mul.s     $f0, $f0, $f22
/* 328524 E000C414 00000000 */  nop
/* 328528 E000C418 4600A306 */  mov.s     $f12, $f20
/* 32852C E000C41C AE00FFD4 */  sw        $zero, -0x2C($s0)
/* 328530 E000C420 0C080144 */  jal       shim_cos_deg
/* 328534 E000C424 E600FFD0 */   swc1     $f0, -0x30($s0)
/* 328538 E000C428 46000007 */  neg.s     $f0, $f0
/* 32853C E000C42C 46160002 */  mul.s     $f0, $f0, $f22
/* 328540 E000C430 00000000 */  nop
/* 328544 E000C434 3C013F73 */  lui       $at, (0x3F733333 >> 16)
/* 328548 E000C438 34213333 */  ori       $at, $at, (0x3F733333 & 0xFFFF)
/* 32854C E000C43C 44811000 */  mtc1      $at, $f2
/* 328550 E000C440 0800313A */  j         .LE000C4E8
/* 328554 E000C444 E61AFFF0 */   swc1     $f26, -0x10($s0)
.LE000C448:
/* 328558 E000C448 3C01C307 */  lui       $at, (0xC3070000 >> 16)
/* 32855C E000C44C 4481A000 */  mtc1      $at, $f20
/* 328560 E000C450 0C080140 */  jal       shim_sin_deg
/* 328564 E000C454 4600A306 */   mov.s    $f12, $f20
/* 328568 E000C458 46000007 */  neg.s     $f0, $f0
/* 32856C E000C45C 46160002 */  mul.s     $f0, $f0, $f22
/* 328570 E000C460 00000000 */  nop
/* 328574 E000C464 3C014080 */  lui       $at, (0x40800000 >> 16)
/* 328578 E000C468 44811000 */  mtc1      $at, $f2
/* 32857C E000C46C 4600A306 */  mov.s     $f12, $f20
/* 328580 E000C470 E602FFD4 */  swc1      $f2, -0x2C($s0)
/* 328584 E000C474 0C080144 */  jal       shim_cos_deg
/* 328588 E000C478 E600FFD0 */   swc1     $f0, -0x30($s0)
/* 32858C E000C47C 46000007 */  neg.s     $f0, $f0
/* 328590 E000C480 46160002 */  mul.s     $f0, $f0, $f22
/* 328594 E000C484 00000000 */  nop
/* 328598 E000C488 3C013F59 */  lui       $at, (0x3F599999 >> 16)
/* 32859C E000C48C 34219999 */  ori       $at, $at, (0x3F599999 & 0xFFFF)
/* 3285A0 E000C490 44811000 */  mtc1      $at, $f2
/* 3285A4 E000C494 0800313A */  j         .LE000C4E8
/* 3285A8 E000C498 E61AFFF0 */   swc1     $f26, -0x10($s0)
.LE000C49C:
/* 3285AC E000C49C 3C0141A0 */  lui       $at, (0x41A00000 >> 16)
/* 3285B0 E000C4A0 4481A000 */  mtc1      $at, $f20
/* 3285B4 E000C4A4 0C080140 */  jal       shim_sin_deg
/* 3285B8 E000C4A8 4600A306 */   mov.s    $f12, $f20
/* 3285BC E000C4AC 46000007 */  neg.s     $f0, $f0
/* 3285C0 E000C4B0 46160002 */  mul.s     $f0, $f0, $f22
/* 3285C4 E000C4B4 00000000 */  nop
/* 3285C8 E000C4B8 3C014120 */  lui       $at, (0x41200000 >> 16)
/* 3285CC E000C4BC 44811000 */  mtc1      $at, $f2
/* 3285D0 E000C4C0 4600A306 */  mov.s     $f12, $f20
/* 3285D4 E000C4C4 E602FFD4 */  swc1      $f2, -0x2C($s0)
/* 3285D8 E000C4C8 0C080144 */  jal       shim_cos_deg
/* 3285DC E000C4CC E600FFD0 */   swc1     $f0, -0x30($s0)
/* 3285E0 E000C4D0 46000007 */  neg.s     $f0, $f0
/* 3285E4 E000C4D4 46160002 */  mul.s     $f0, $f0, $f22
/* 3285E8 E000C4D8 00000000 */  nop
/* 3285EC E000C4DC 3C013F40 */  lui       $at, (0x3F400000 >> 16)
/* 3285F0 E000C4E0 44811000 */  mtc1      $at, $f2
/* 3285F4 E000C4E4 E61AFFF0 */  swc1      $f26, -0x10($s0)
.LE000C4E8:
/* 3285F8 E000C4E8 E618FFF4 */  swc1      $f24, -0xC($s0)
/* 3285FC E000C4EC E602FFEC */  swc1      $f2, -0x14($s0)
/* 328600 E000C4F0 E600FFD8 */  swc1      $f0, -0x28($s0)
/* 328604 E000C4F4 26520001 */  addiu     $s2, $s2, 0x1
.LE000C4F8:
/* 328608 E000C4F8 AE00FFFC */  sw        $zero, -0x4($s0)
/* 32860C E000C4FC AE000000 */  sw        $zero, 0x0($s0)
/* 328610 E000C500 0253102A */  slt       $v0, $s2, $s3
/* 328614 E000C504 1440FFAF */  bnez      $v0, .LE000C3C4
/* 328618 E000C508 26100044 */   addiu    $s0, $s0, 0x44
/* 32861C E000C50C 08003185 */  j         .LE000C614
/* 328620 E000C510 00000000 */   nop
/* 328624 E000C514 24120001 */  addiu     $s2, $zero, 0x1
/* 328628 E000C518 0253102A */  slt       $v0, $s2, $s3
/* 32862C E000C51C 1040003D */  beqz      $v0, .LE000C614
/* 328630 E000C520 2674FFFF */   addiu    $s4, $s3, -0x1
/* 328634 E000C524 26300034 */  addiu     $s0, $s1, 0x34
/* 328638 E000C528 0000882D */  daddu     $s1, $zero, $zero
/* 32863C E000C52C 3C01C040 */  lui       $at, (0xC0400000 >> 16)
/* 328640 E000C530 4481F000 */  mtc1      $at, $f30
/* 328644 E000C534 3C013F6E */  lui       $at, (0x3F6E147B >> 16)
/* 328648 E000C538 3421147B */  ori       $at, $at, (0x3F6E147B & 0xFFFF)
/* 32864C E000C53C 4481E000 */  mtc1      $at, $f28
/* 328650 E000C540 3C013DCC */  lui       $at, (0x3DCCCCCC >> 16)
/* 328654 E000C544 3421CCCC */  ori       $at, $at, (0x3DCCCCCC & 0xFFFF)
/* 328658 E000C548 4481D000 */  mtc1      $at, $f26
/* 32865C E000C54C 3C013F70 */  lui       $at, (0x3F70A3D7 >> 16)
/* 328660 E000C550 3421A3D7 */  ori       $at, $at, (0x3F70A3D7 & 0xFFFF)
/* 328664 E000C554 4481C000 */  mtc1      $at, $f24
/* 328668 E000C558 3C014120 */  lui       $at, (0x41200000 >> 16)
/* 32866C E000C55C 4481B000 */  mtc1      $at, $f22
.LE000C560:
/* 328670 E000C560 16800002 */  bnez      $s4, .LE000C56C
/* 328674 E000C564 0234001A */   div      $zero, $s1, $s4
/* 328678 E000C568 0007000D */  break     7
.LE000C56C:
/* 32867C E000C56C 2401FFFF */  addiu     $at, $zero, -0x1
/* 328680 E000C570 16810004 */  bne       $s4, $at, .LE000C584
/* 328684 E000C574 3C018000 */   lui      $at, (0x80000000 >> 16)
/* 328688 E000C578 16210002 */  bne       $s1, $at, .LE000C584
/* 32868C E000C57C 00000000 */   nop
/* 328690 E000C580 0006000D */  break     6
.LE000C584:
/* 328694 E000C584 00001812 */  mflo      $v1
/* 328698 E000C588 E61EFFDC */  swc1      $f30, -0x24($s0)
/* 32869C E000C58C E61CFFE0 */  swc1      $f28, -0x20($s0)
/* 3286A0 E000C590 AE00FFEC */  sw        $zero, -0x14($s0)
/* 3286A4 E000C594 E61AFFF0 */  swc1      $f26, -0x10($s0)
/* 3286A8 E000C598 C7A40080 */  lwc1      $f4, 0x80($sp)
/* 3286AC E000C59C 44830000 */  mtc1      $v1, $f0
/* 3286B0 E000C5A0 00000000 */  nop
/* 3286B4 E000C5A4 46800020 */  cvt.s.w   $f0, $f0
/* 3286B8 E000C5A8 46002500 */  add.s     $f20, $f4, $f0
/* 3286BC E000C5AC E618FFF4 */  swc1      $f24, -0xC($s0)
/* 3286C0 E000C5B0 E618FFF8 */  swc1      $f24, -0x8($s0)
/* 3286C4 E000C5B4 0C080140 */  jal       shim_sin_deg
/* 3286C8 E000C5B8 4600A306 */   mov.s    $f12, $f20
/* 3286CC E000C5BC 46000007 */  neg.s     $f0, $f0
/* 3286D0 E000C5C0 46160002 */  mul.s     $f0, $f0, $f22
/* 3286D4 E000C5C4 00000000 */  nop
/* 3286D8 E000C5C8 4600A306 */  mov.s     $f12, $f20
/* 3286DC E000C5CC AE00FFD4 */  sw        $zero, -0x2C($s0)
/* 3286E0 E000C5D0 0C080144 */  jal       shim_cos_deg
/* 3286E4 E000C5D4 E600FFD0 */   swc1     $f0, -0x30($s0)
/* 3286E8 E000C5D8 46000007 */  neg.s     $f0, $f0
/* 3286EC E000C5DC 46160002 */  mul.s     $f0, $f0, $f22
/* 3286F0 E000C5E0 00000000 */  nop
/* 3286F4 E000C5E4 26310168 */  addiu     $s1, $s1, 0x168
/* 3286F8 E000C5E8 26520001 */  addiu     $s2, $s2, 0x1
/* 3286FC E000C5EC 4600A306 */  mov.s     $f12, $f20
/* 328700 E000C5F0 0C080140 */  jal       shim_sin_deg
/* 328704 E000C5F4 E600FFD8 */   swc1     $f0, -0x28($s0)
/* 328708 E000C5F8 4600A306 */  mov.s     $f12, $f20
/* 32870C E000C5FC 0C080144 */  jal       shim_cos_deg
/* 328710 E000C600 E600FFFC */   swc1     $f0, -0x4($s0)
/* 328714 E000C604 E6000000 */  swc1      $f0, 0x0($s0)
/* 328718 E000C608 0253102A */  slt       $v0, $s2, $s3
/* 32871C E000C60C 1440FFD4 */  bnez      $v0, .LE000C560
/* 328720 E000C610 26100044 */   addiu    $s0, $s0, 0x44
.LE000C614:
/* 328724 E000C614 8FBF003C */  lw        $ra, 0x3C($sp)
/* 328728 E000C618 8FB40038 */  lw        $s4, 0x38($sp)
/* 32872C E000C61C 8FB30034 */  lw        $s3, 0x34($sp)
/* 328730 E000C620 8FB20030 */  lw        $s2, 0x30($sp)
/* 328734 E000C624 8FB1002C */  lw        $s1, 0x2C($sp)
/* 328738 E000C628 8FB00028 */  lw        $s0, 0x28($sp)
/* 32873C E000C62C D7BE0068 */  ldc1      $f30, 0x68($sp)
/* 328740 E000C630 D7BC0060 */  ldc1      $f28, 0x60($sp)
/* 328744 E000C634 D7BA0058 */  ldc1      $f26, 0x58($sp)
/* 328748 E000C638 D7B80050 */  ldc1      $f24, 0x50($sp)
/* 32874C E000C63C D7B60048 */  ldc1      $f22, 0x48($sp)
/* 328750 E000C640 D7B40040 */  ldc1      $f20, 0x40($sp)
/* 328754 E000C644 03E00008 */  jr        $ra
/* 328758 E000C648 27BD0070 */   addiu    $sp, $sp, 0x70

### DECOMPILED C INSTRUCTIONS:

void landing_dust_main(s32 type, f32 x, f32 y, f32 z, f32 arg4) {
    EffectBlueprint bp;
    EffectBlueprint* bpPtr = &bp;
    EffectInstance* effect;
    LandingDustFXData* data;
    f32 theta;
    f32 temp_f20_2;
    s32 numParts;
    s32 i;

    switch (type) {
        case 2:
            numParts = 1;
            break;
        case 3:
            numParts = 4;
            break;
        case 4:
            numParts = 9;
            break;
        default:
            numParts = 3;
            break;
    }

    bpPtr->init = landing_dust_init;
    bpPtr->update = landing_dust_update;
    bpPtr->renderWorld = landing_dust_render;
    bpPtr->unk_00 = 0;
    bpPtr->renderUI = NULL;
    bpPtr->effectID = EFFECT_LANDING_DUST;

    effect = shim_create_effect_instance(bpPtr);
    effect->numParts = numParts;

    data = shim_general_heap_malloc(numParts * sizeof(*data));
    effect->data.landingDust = data;
    ASSERT(effect->data.landingDust != NULL);

    shim_mem_clear(data, numParts * sizeof(*data));

    switch (type) {
        case 0:
        case 1:
            data->unk_38 = 0;
            break;
        case 3:
            data->unk_38 = 2;
            break;
        case 2:
        case 4:
            data->unk_38 = 3;
            break;
    }

    data->unk_3C = 0;
    data->type = type;
    data->x = x;
    data->y = y;
    data->z = z;

    data++;

    switch (type) {
        case 0:
        case 1:
            for (i = 1; i < numParts; i++, data++) {
                data->unk_10 = -3.0f;
                data->unk_14 = 0.29999998f;
                data->unk_18 = 0;
                data->unk_1C = 0;
                data->unk_20 = 1.75f;
                data->unk_24 = -0.16f;
                data->unk_28 = 0.0f;
                data->unk_2C = 0.0f;
                data->x = 0.0f;
                data->y = 0.0f;
                data->z = 4.0f;
                theta = shim_clamp_angle(90 + (180 * (i - 1)));
                data->unk_30 = shim_sin_deg(theta);
                data->unk_34 = shim_cos_deg(theta);
            }
            break;
        case 2:
            break;
        case 3:
            for (i = 1; i < numParts; i++, data++) {
                switch (i - 1) {
                    case 0:
                        theta = 135.0f;
                        data->x = -shim_sin_deg(theta) * 25.0f;
                        data->y = 0.0f;
                        data->z = -shim_cos_deg(theta) * 25.0f;
                        data->unk_24 = -0.04f;
                        data->unk_28 = 0.94f;
                        data->unk_20 = 0.95f;
                        break;
                    case 1:
                        theta = -135.0f;
                        data->x = -shim_sin_deg(theta) * 25.0f;
                        data->y = 4.0f;
                        data->z = -shim_cos_deg(theta) * 25.0f;
                        data->unk_24 = -0.04f;
                        data->unk_28 = 0.94f;
                        data->unk_20 = 0.84999996f;
                        break;
                    case 2:
                        theta = 20.0f;
                        data->x = -shim_sin_deg(theta) * 25.0f;
                        data->y = 10.0f;
                        data->z = -shim_cos_deg(theta) * 25.0f;
                        data->unk_24 = -0.04f;
                        data->unk_28 = 0.94f;
                        data->unk_20 = 0.75f;
                        break;

                }
                data->unk_30 = 0.0f;
                data->unk_34 = 0.0f;
            }
            break;
        case 4:
            for (i = 1; i < numParts; i++, data++) {
                data->unk_10 = -3.0f;
                data->unk_14 = 0.93f;
                data->unk_20 = 0.0f;
                data->unk_24 = 0.099999994f;
                data->unk_28 = 0.94f;
                data->unk_2C = 0.94f;
                theta = arg4 + ((i - 1) * 360 / (numParts - 1));
                data->x = -shim_sin_deg(theta) * 10.0f;
                data->y = 0.0f;
                data->z = -shim_cos_deg(theta) * 10.0f;
                data->unk_30 = shim_sin_deg(theta);
                data->unk_34 = shim_cos_deg(theta);
            }
            break;
    }
}


### RAW ASSEMBLY INSTRUCTIONS:

glabel cold_breath_appendGfx
/* 3D89C8 E00DE2A8 27BDFF38 */  addiu     $sp, $sp, -0xC8
/* 3D89CC E00DE2AC 0080302D */  daddu     $a2, $a0, $zero
/* 3D89D0 E00DE2B0 3C07DB06 */  lui       $a3, (0xDB060024 >> 16)
/* 3D89D4 E00DE2B4 34E70024 */  ori       $a3, $a3, (0xDB060024 & 0xFFFF)
/* 3D89D8 E00DE2B8 27A40020 */  addiu     $a0, $sp, 0x20
/* 3D89DC E00DE2BC AFB400B0 */  sw        $s4, 0xB0($sp)
/* 3D89E0 E00DE2C0 3C140001 */  lui       $s4, (0x11630 >> 16)
/* 3D89E4 E00DE2C4 AFB200A8 */  sw        $s2, 0xA8($sp)
/* 3D89E8 E00DE2C8 3C12800A */  lui       $s2, %hi(gMainGfxPos)
/* 3D89EC E00DE2CC 2652A66C */  addiu     $s2, $s2, %lo(gMainGfxPos)
/* 3D89F0 E00DE2D0 36941630 */  ori       $s4, $s4, (0x11630 & 0xFFFF)
/* 3D89F4 E00DE2D4 AFBF00C4 */  sw        $ra, 0xC4($sp)
/* 3D89F8 E00DE2D8 AFBE00C0 */  sw        $fp, 0xC0($sp)
/* 3D89FC E00DE2DC AFB700BC */  sw        $s7, 0xBC($sp)
/* 3D8A00 E00DE2E0 AFB600B8 */  sw        $s6, 0xB8($sp)
/* 3D8A04 E00DE2E4 AFB500B4 */  sw        $s5, 0xB4($sp)
/* 3D8A08 E00DE2E8 AFB300AC */  sw        $s3, 0xAC($sp)
/* 3D8A0C E00DE2EC AFB100A4 */  sw        $s1, 0xA4($sp)
/* 3D8A10 E00DE2F0 AFB000A0 */  sw        $s0, 0xA0($sp)
/* 3D8A14 E00DE2F4 8E430000 */  lw        $v1, 0x0($s2)
/* 3D8A18 E00DE2F8 8CD6000C */  lw        $s6, 0xC($a2)
/* 3D8A1C E00DE2FC 0060282D */  daddu     $a1, $v1, $zero
/* 3D8A20 E00DE300 24630008 */  addiu     $v1, $v1, 0x8
/* 3D8A24 E00DE304 AE430000 */  sw        $v1, 0x0($s2)
/* 3D8A28 E00DE308 8EDE0014 */  lw        $fp, 0x14($s6)
/* 3D8A2C E00DE30C 8ED50024 */  lw        $s5, 0x24($s6)
/* 3D8A30 E00DE310 8ED70000 */  lw        $s7, 0x0($s6)
/* 3D8A34 E00DE314 3C02E700 */  lui       $v0, (0xE7000000 >> 16)
/* 3D8A38 E00DE318 ACA20000 */  sw        $v0, 0x0($a1)
/* 3D8A3C E00DE31C ACA00004 */  sw        $zero, 0x4($a1)
/* 3D8A40 E00DE320 AC670000 */  sw        $a3, 0x0($v1)
/* 3D8A44 E00DE324 8CC50010 */  lw        $a1, 0x10($a2)
/* 3D8A48 E00DE328 24620008 */  addiu     $v0, $v1, 0x8
/* 3D8A4C E00DE32C AE420000 */  sw        $v0, 0x0($s2)
/* 3D8A50 E00DE330 8CA2001C */  lw        $v0, 0x1C($a1)
/* 3D8A54 E00DE334 3C0A8000 */  lui       $t2, (0x80000000 >> 16)
/* 3D8A58 E00DE338 004A1021 */  addu      $v0, $v0, $t2
/* 3D8A5C E00DE33C AC620004 */  sw        $v0, 0x4($v1)
/* 3D8A60 E00DE340 3C03800B */  lui       $v1, %hi(gCameras)
/* 3D8A64 E00DE344 24631D80 */  addiu     $v1, $v1, %lo(gCameras)
/* 3D8A68 E00DE348 8EC50004 */  lw        $a1, 0x4($s6)
/* 3D8A6C E00DE34C 8EC60008 */  lw        $a2, 0x8($s6)
/* 3D8A70 E00DE350 3C028007 */  lui       $v0, %hi(gCurrentCameraID)
/* 3D8A74 E00DE354 8C427410 */  lw        $v0, %lo(gCurrentCameraID)($v0)
/* 3D8A78 E00DE358 8EC7000C */  lw        $a3, 0xC($s6)
/* 3D8A7C E00DE35C 00028080 */  sll       $s0, $v0, 2
/* 3D8A80 E00DE360 02028021 */  addu      $s0, $s0, $v0
/* 3D8A84 E00DE364 00108080 */  sll       $s0, $s0, 2
/* 3D8A88 E00DE368 02028023 */  subu      $s0, $s0, $v0
/* 3D8A8C E00DE36C 001010C0 */  sll       $v0, $s0, 3
/* 3D8A90 E00DE370 02028021 */  addu      $s0, $s0, $v0
/* 3D8A94 E00DE374 001080C0 */  sll       $s0, $s0, 3
/* 3D8A98 E00DE378 0C080108 */  jal       shim_guTranslateF
/* 3D8A9C E00DE37C 02038021 */   addu     $s0, $s0, $v1
/* 3D8AA0 E00DE380 27B10060 */  addiu     $s1, $sp, 0x60
/* 3D8AA4 E00DE384 8EC50040 */  lw        $a1, 0x40($s6)
/* 3D8AA8 E00DE388 0220202D */  daddu     $a0, $s1, $zero
/* 3D8AAC E00DE38C 00A0302D */  daddu     $a2, $a1, $zero
/* 3D8AB0 E00DE390 0C080110 */  jal       shim_guScaleF
/* 3D8AB4 E00DE394 00A0382D */   daddu    $a3, $a1, $zero
/* 3D8AB8 E00DE398 0220202D */  daddu     $a0, $s1, $zero
/* 3D8ABC E00DE39C 27A50020 */  addiu     $a1, $sp, 0x20
/* 3D8AC0 E00DE3A0 0C080114 */  jal       shim_guMtxCatF
/* 3D8AC4 E00DE3A4 00A0302D */   daddu    $a2, $a1, $zero
/* 3D8AC8 E00DE3A8 27A40020 */  addiu     $a0, $sp, 0x20
/* 3D8ACC E00DE3AC 3C118007 */  lui       $s1, %hi(gMatrixListPos)
/* 3D8AD0 E00DE3B0 263141F0 */  addiu     $s1, $s1, %lo(gMatrixListPos)
/* 3D8AD4 E00DE3B4 3C13800A */  lui       $s3, %hi(gDisplayContext)
/* 3D8AD8 E00DE3B8 2673A674 */  addiu     $s3, $s3, %lo(gDisplayContext)
/* 3D8ADC E00DE3BC 96250000 */  lhu       $a1, 0x0($s1)
/* 3D8AE0 E00DE3C0 8E620000 */  lw        $v0, 0x0($s3)
/* 3D8AE4 E00DE3C4 00052980 */  sll       $a1, $a1, 6
/* 3D8AE8 E00DE3C8 00B42821 */  addu      $a1, $a1, $s4
/* 3D8AEC E00DE3CC 0C080118 */  jal       shim_guMtxF2L
/* 3D8AF0 E00DE3D0 00452821 */   addu     $a1, $v0, $a1
/* 3D8AF4 E00DE3D4 3C03DA38 */  lui       $v1, (0xDA380002 >> 16)
/* 3D8AF8 E00DE3D8 34630002 */  ori       $v1, $v1, (0xDA380002 & 0xFFFF)
/* 3D8AFC E00DE3DC 3C06DA38 */  lui       $a2, (0xDA380001 >> 16)
/* 3D8B00 E00DE3E0 34C60001 */  ori       $a2, $a2, (0xDA380001 & 0xFFFF)
/* 3D8B04 E00DE3E4 44950000 */  mtc1      $s5, $f0
/* 3D8B08 E00DE3E8 00000000 */  nop
/* 3D8B0C E00DE3EC 46800021 */  cvt.d.w   $f0, $f0
/* 3D8B10 E00DE3F0 8E440000 */  lw        $a0, 0x0($s2)
/* 3D8B14 E00DE3F4 96220000 */  lhu       $v0, 0x0($s1)
/* 3D8B18 E00DE3F8 3C013FE0 */  lui       $at, (0x3FE00000 >> 16)
/* 3D8B1C E00DE3FC 44811800 */  mtc1      $at, $f3
/* 3D8B20 E00DE400 44801000 */  mtc1      $zero, $f2
/* 3D8B24 E00DE404 0080282D */  daddu     $a1, $a0, $zero
/* 3D8B28 E00DE408 24840008 */  addiu     $a0, $a0, 0x8
/* 3D8B2C E00DE40C AE440000 */  sw        $a0, 0x0($s2)
/* 3D8B30 E00DE410 ACA30000 */  sw        $v1, 0x0($a1)
/* 3D8B34 E00DE414 24430001 */  addiu     $v1, $v0, 0x1
/* 3D8B38 E00DE418 3042FFFF */  andi      $v0, $v0, 0xFFFF
/* 3D8B3C E00DE41C 00021180 */  sll       $v0, $v0, 6
/* 3D8B40 E00DE420 00541021 */  addu      $v0, $v0, $s4
/* 3D8B44 E00DE424 2487000C */  addiu     $a3, $a0, 0xC
/* 3D8B48 E00DE428 46220002 */  mul.d     $f0, $f0, $f2
/* 3D8B4C E00DE42C 00000000 */  nop
/* 3D8B50 E00DE430 A6230000 */  sh        $v1, 0x0($s1)
/* 3D8B54 E00DE434 8E630000 */  lw        $v1, 0x0($s3)
/* 3D8B58 E00DE438 3C0141E0 */  lui       $at, (0x41E00000 >> 16)
/* 3D8B5C E00DE43C 44811800 */  mtc1      $at, $f3
/* 3D8B60 E00DE440 44801000 */  mtc1      $zero, $f2
/* 3D8B64 E00DE444 00621821 */  addu      $v1, $v1, $v0
/* 3D8B68 E00DE448 24820008 */  addiu     $v0, $a0, 0x8
/* 3D8B6C E00DE44C ACA30004 */  sw        $v1, 0x4($a1)
/* 3D8B70 E00DE450 AE420000 */  sw        $v0, 0x0($s2)
/* 3D8B74 E00DE454 24820010 */  addiu     $v0, $a0, 0x10
/* 3D8B78 E00DE458 AC860000 */  sw        $a2, 0x0($a0)
/* 3D8B7C E00DE45C AE420000 */  sw        $v0, 0x0($s2)
/* 3D8B80 E00DE460 8E030204 */  lw        $v1, 0x204($s0)
/* 3D8B84 E00DE464 3C02FA00 */  lui       $v0, (0xFA000000 >> 16)
/* 3D8B88 E00DE468 AC820008 */  sw        $v0, 0x8($a0)
/* 3D8B8C E00DE46C AC830004 */  sw        $v1, 0x4($a0)
/* 3D8B90 E00DE470 92C4001B */  lbu       $a0, 0x1B($s6)
/* 3D8B94 E00DE474 92C2001F */  lbu       $v0, 0x1F($s6)
/* 3D8B98 E00DE478 92C30023 */  lbu       $v1, 0x23($s6)
/* 3D8B9C E00DE47C 00042600 */  sll       $a0, $a0, 24
/* 3D8BA0 E00DE480 00021400 */  sll       $v0, $v0, 16
/* 3D8BA4 E00DE484 00822025 */  or        $a0, $a0, $v0
/* 3D8BA8 E00DE488 00031A00 */  sll       $v1, $v1, 8
/* 3D8BAC E00DE48C 4620103E */  c.le.d    $f2, $f0
/* 3D8BB0 E00DE490 00000000 */  nop
/* 3D8BB4 E00DE494 45010005 */  bc1t      .LE00DE4AC
/* 3D8BB8 E00DE498 00832025 */   or       $a0, $a0, $v1
/* 3D8BBC E00DE49C 4620010D */  trunc.w.d $f4, $f0
/* 3D8BC0 E00DE4A0 44022000 */  mfc1      $v0, $f4
/* 3D8BC4 E00DE4A4 08037931 */  j         .LE00DE4C4
/* 3D8BC8 E00DE4A8 3C05E300 */   lui      $a1, (0xE3001A01 >> 16)
.LE00DE4AC:
/* 3D8BCC E00DE4AC 46220001 */  sub.d     $f0, $f0, $f2
/* 3D8BD0 E00DE4B0 4620010D */  trunc.w.d $f4, $f0
/* 3D8BD4 E00DE4B4 44022000 */  mfc1      $v0, $f4
/* 3D8BD8 E00DE4B8 3C0A8000 */  lui       $t2, (0x80000000 >> 16)
/* 3D8BDC E00DE4BC 004A1025 */  or        $v0, $v0, $t2
/* 3D8BE0 E00DE4C0 3C05E300 */  lui       $a1, (0xE3001A01 >> 16)
.LE00DE4C4:
/* 3D8BE4 E00DE4C4 34A51A01 */  ori       $a1, $a1, (0xE3001A01 & 0xFFFF)
/* 3D8BE8 E00DE4C8 03C0302D */  daddu     $a2, $fp, $zero
/* 3D8BEC E00DE4CC 3C14800A */  lui       $s4, %hi(gMainGfxPos)
/* 3D8BF0 E00DE4D0 2694A66C */  addiu     $s4, $s4, %lo(gMainGfxPos)
/* 3D8BF4 E00DE4D4 304200FF */  andi      $v0, $v0, 0xFF
/* 3D8BF8 E00DE4D8 8E830000 */  lw        $v1, 0x0($s4)
/* 3D8BFC E00DE4DC 00821025 */  or        $v0, $a0, $v0
/* 3D8C00 E00DE4E0 ACE20000 */  sw        $v0, 0x0($a3)
/* 3D8C04 E00DE4E4 24020020 */  addiu     $v0, $zero, 0x20
/* 3D8C08 E00DE4E8 0060202D */  daddu     $a0, $v1, $zero
/* 3D8C0C E00DE4EC 24630008 */  addiu     $v1, $v1, 0x8
/* 3D8C10 E00DE4F0 AE830000 */  sw        $v1, 0x0($s4)
/* 3D8C14 E00DE4F4 AC820004 */  sw        $v0, 0x4($a0)
/* 3D8C18 E00DE4F8 3C02DE00 */  lui       $v0, (0xDE000000 >> 16)
/* 3D8C1C E00DE4FC AC850000 */  sw        $a1, 0x0($a0)
/* 3D8C20 E00DE500 AC620000 */  sw        $v0, 0x0($v1)
/* 3D8C24 E00DE504 00171080 */  sll       $v0, $s7, 2
/* 3D8C28 E00DE508 3C04E00E */  lui       $a0, (0xE00E0000 >> 16)
/* 3D8C2C E00DE50C 00822021 */  addu      $a0, $a0, $v0
/* 3D8C30 E00DE510 8C84E84C */  lw        $a0, -0x17B4($a0)
/* 3D8C34 E00DE514 24620008 */  addiu     $v0, $v1, 0x8
/* 3D8C38 E00DE518 AE820000 */  sw        $v0, 0x0($s4)
/* 3D8C3C E00DE51C 28C2001E */  slti      $v0, $a2, 0x1E
/* 3D8C40 E00DE520 14400002 */  bnez      $v0, .LE00DE52C
/* 3D8C44 E00DE524 AC640004 */   sw       $a0, 0x4($v1)
/* 3D8C48 E00DE528 2406001D */  addiu     $a2, $zero, 0x1D
.LE00DE52C:
/* 3D8C4C E00DE52C 27A40020 */  addiu     $a0, $sp, 0x20
/* 3D8C50 E00DE530 3C130001 */  lui       $s3, (0x11630 >> 16)
/* 3D8C54 E00DE534 00178100 */  sll       $s0, $s7, 4
/* 3D8C58 E00DE538 02178023 */  subu      $s0, $s0, $s7
/* 3D8C5C E00DE53C 00108040 */  sll       $s0, $s0, 1
/* 3D8C60 E00DE540 00D08021 */  addu      $s0, $a2, $s0
/* 3D8C64 E00DE544 36731630 */  ori       $s3, $s3, (0x11630 & 0xFFFF)
/* 3D8C68 E00DE548 3C02E00E */  lui       $v0, (0xE00E0000 >> 16)
/* 3D8C6C E00DE54C 00501021 */  addu      $v0, $v0, $s0
/* 3D8C70 E00DE550 9042E96C */  lbu       $v0, -0x1694($v0)
/* 3D8C74 E00DE554 44801000 */  mtc1      $zero, $f2
/* 3D8C78 E00DE558 44820000 */  mtc1      $v0, $f0
/* 3D8C7C E00DE55C 00000000 */  nop
/* 3D8C80 E00DE560 46800020 */  cvt.s.w   $f0, $f0
/* 3D8C84 E00DE564 46000007 */  neg.s     $f0, $f0
/* 3D8C88 E00DE568 44070000 */  mfc1      $a3, $f0
/* 3D8C8C E00DE56C 44051000 */  mfc1      $a1, $f2
/* 3D8C90 E00DE570 3C02E00E */  lui       $v0, (0xE00E0000 >> 16)
/* 3D8C94 E00DE574 00501021 */  addu      $v0, $v0, $s0
/* 3D8C98 E00DE578 9042E8B4 */  lbu       $v0, -0x174C($v0)
/* 3D8C9C E00DE57C 3C013C23 */  lui       $at, (0x3C23D70A >> 16)
/* 3D8CA0 E00DE580 3421D70A */  ori       $at, $at, (0x3C23D70A & 0xFFFF)
/* 3D8CA4 E00DE584 44810000 */  mtc1      $at, $f0
/* 3D8CA8 E00DE588 00A0302D */  daddu     $a2, $a1, $zero
/* 3D8CAC E00DE58C 44821000 */  mtc1      $v0, $f2
/* 3D8CB0 E00DE590 00000000 */  nop
/* 3D8CB4 E00DE594 468010A0 */  cvt.s.w   $f2, $f2
/* 3D8CB8 E00DE598 3C02E00E */  lui       $v0, (0xE00E0000 >> 16)
/* 3D8CBC E00DE59C 00501021 */  addu      $v0, $v0, $s0
/* 3D8CC0 E00DE5A0 8042E858 */  lb        $v0, -0x17A8($v0)
/* 3D8CC4 E00DE5A4 46001082 */  mul.s     $f2, $f2, $f0
/* 3D8CC8 E00DE5A8 00000000 */  nop
/* 3D8CCC E00DE5AC AFA50018 */  sw        $a1, 0x18($sp)
/* 3D8CD0 E00DE5B0 AFA5001C */  sw        $a1, 0x1C($sp)
/* 3D8CD4 E00DE5B4 44820000 */  mtc1      $v0, $f0
/* 3D8CD8 E00DE5B8 00000000 */  nop
/* 3D8CDC E00DE5BC 46800020 */  cvt.s.w   $f0, $f0
/* 3D8CE0 E00DE5C0 E7A00014 */  swc1      $f0, 0x14($sp)
/* 3D8CE4 E00DE5C4 0C080180 */  jal       shim_guPositionF
/* 3D8CE8 E00DE5C8 E7A20010 */   swc1     $f2, 0x10($sp)
/* 3D8CEC E00DE5CC 27A40020 */  addiu     $a0, $sp, 0x20
/* 3D8CF0 E00DE5D0 3C118007 */  lui       $s1, %hi(gMatrixListPos)
/* 3D8CF4 E00DE5D4 263141F0 */  addiu     $s1, $s1, %lo(gMatrixListPos)
/* 3D8CF8 E00DE5D8 3C12800A */  lui       $s2, %hi(gDisplayContext)
/* 3D8CFC E00DE5DC 2652A674 */  addiu     $s2, $s2, %lo(gDisplayContext)
/* 3D8D00 E00DE5E0 96250000 */  lhu       $a1, 0x0($s1)
/* 3D8D04 E00DE5E4 8E420000 */  lw        $v0, 0x0($s2)
/* 3D8D08 E00DE5E8 00052980 */  sll       $a1, $a1, 6
/* 3D8D0C E00DE5EC 00B32821 */  addu      $a1, $a1, $s3
/* 3D8D10 E00DE5F0 0C080118 */  jal       shim_guMtxF2L
/* 3D8D14 E00DE5F4 00452821 */   addu     $a1, $v0, $a1
/* 3D8D18 E00DE5F8 8E850000 */  lw        $a1, 0x0($s4)
/* 3D8D1C E00DE5FC 00A0202D */  daddu     $a0, $a1, $zero
/* 3D8D20 E00DE600 24A50008 */  addiu     $a1, $a1, 0x8
/* 3D8D24 E00DE604 AE850000 */  sw        $a1, 0x0($s4)
/* 3D8D28 E00DE608 96220000 */  lhu       $v0, 0x0($s1)
/* 3D8D2C E00DE60C 3C03DA38 */  lui       $v1, (0xDA380000 >> 16)
/* 3D8D30 E00DE610 AC830000 */  sw        $v1, 0x0($a0)
/* 3D8D34 E00DE614 24430001 */  addiu     $v1, $v0, 0x1
/* 3D8D38 E00DE618 3042FFFF */  andi      $v0, $v0, 0xFFFF
/* 3D8D3C E00DE61C 00021180 */  sll       $v0, $v0, 6
/* 3D8D40 E00DE620 A6230000 */  sh        $v1, 0x0($s1)
/* 3D8D44 E00DE624 8E430000 */  lw        $v1, 0x0($s2)
/* 3D8D48 E00DE628 00531021 */  addu      $v0, $v0, $s3
/* 3D8D4C E00DE62C 00621821 */  addu      $v1, $v1, $v0
/* 3D8D50 E00DE630 AC830004 */  sw        $v1, 0x4($a0)
/* 3D8D54 E00DE634 3C02E00E */  lui       $v0, (0xE00E0000 >> 16)
/* 3D8D58 E00DE638 00501021 */  addu      $v0, $v0, $s0
/* 3D8D5C E00DE63C 9042E910 */  lbu       $v0, -0x16F0($v0)
/* 3D8D60 E00DE640 3C0140A0 */  lui       $at, (0x40A00000 >> 16)
/* 3D8D64 E00DE644 44811000 */  mtc1      $at, $f2
/* 3D8D68 E00DE648 44820000 */  mtc1      $v0, $f0
/* 3D8D6C E00DE64C 00000000 */  nop
/* 3D8D70 E00DE650 46800020 */  cvt.s.w   $f0, $f0
/* 3D8D74 E00DE654 46020002 */  mul.s     $f0, $f0, $f2
/* 3D8D78 E00DE658 00000000 */  nop
/* 3D8D7C E00DE65C 3C013B80 */  lui       $at, (0x3B800000 >> 16)
/* 3D8D80 E00DE660 44811000 */  mtc1      $at, $f2
/* 3D8D84 E00DE664 00000000 */  nop
/* 3D8D88 E00DE668 46020002 */  mul.s     $f0, $f0, $f2
/* 3D8D8C E00DE66C 00000000 */  nop
/* 3D8D90 E00DE670 4600010D */  trunc.w.s $f4, $f0
/* 3D8D94 E00DE674 44082000 */  mfc1      $t0, $f4
/* 3D8D98 E00DE678 00000000 */  nop
/* 3D8D9C E00DE67C 44881000 */  mtc1      $t0, $f2
/* 3D8DA0 E00DE680 00000000 */  nop
/* 3D8DA4 E00DE684 468010A0 */  cvt.s.w   $f2, $f2
/* 3D8DA8 E00DE688 46020001 */  sub.s     $f0, $f0, $f2
/* 3D8DAC E00DE68C 3C014380 */  lui       $at, (0x43800000 >> 16)
/* 3D8DB0 E00DE690 44811000 */  mtc1      $at, $f2
/* 3D8DB4 E00DE694 00000000 */  nop
/* 3D8DB8 E00DE698 46020002 */  mul.s     $f0, $f0, $f2
/* 3D8DBC E00DE69C 00000000 */  nop
/* 3D8DC0 E00DE6A0 29020004 */  slti      $v0, $t0, 0x4
/* 3D8DC4 E00DE6A4 38430001 */  xori      $v1, $v0, 0x1
/* 3D8DC8 E00DE6A8 29020005 */  slti      $v0, $t0, 0x5
/* 3D8DCC E00DE6AC 4600010D */  trunc.w.s $f4, $f0
/* 3D8DD0 E00DE6B0 44092000 */  mfc1      $t1, $f4
/* 3D8DD4 E00DE6B4 1040002F */  beqz      $v0, .LE00DE774
/* 3D8DD8 E00DE6B8 3C06D838 */   lui      $a2, (0xD8380002 >> 16)
/* 3D8DDC E00DE6BC 10600006 */  beqz      $v1, .LE00DE6D8
/* 3D8DE0 E00DE6C0 24A20008 */   addiu    $v0, $a1, 0x8
/* 3D8DE4 E00DE6C4 AE820000 */  sw        $v0, 0x0($s4)
/* 3D8DE8 E00DE6C8 3C02F200 */  lui       $v0, (0xF2000000 >> 16)
/* 3D8DEC E00DE6CC ACA20000 */  sw        $v0, 0x0($a1)
/* 3D8DF0 E00DE6D0 080379BC */  j         .LE00DE6F0
/* 3D8DF4 E00DE6D4 3C020100 */   lui      $v0, (0x1000000 >> 16)
.LE00DE6D8:
/* 3D8DF8 E00DE6D8 3C020107 */  lui       $v0, (0x107C1FC >> 16)
/* 3D8DFC E00DE6DC 3442C1FC */  ori       $v0, $v0, (0x107C1FC & 0xFFFF)
/* 3D8E00 E00DE6E0 24A30008 */  addiu     $v1, $a1, 0x8
/* 3D8E04 E00DE6E4 AE830000 */  sw        $v1, 0x0($s4)
/* 3D8E08 E00DE6E8 3C03F200 */  lui       $v1, (0xF2000000 >> 16)
/* 3D8E0C E00DE6EC ACA30000 */  sw        $v1, 0x0($a1)
.LE00DE6F0:
/* 3D8E10 E00DE6F0 ACA20004 */  sw        $v0, 0x4($a1)
/* 3D8E14 E00DE6F4 3C06800A */  lui       $a2, %hi(gMainGfxPos)
/* 3D8E18 E00DE6F8 24C6A66C */  addiu     $a2, $a2, %lo(gMainGfxPos)
/* 3D8E1C E00DE6FC 8CC50000 */  lw        $a1, 0x0($a2)
/* 3D8E20 E00DE700 3C02FB00 */  lui       $v0, (0xFB000000 >> 16)
/* 3D8E24 E00DE704 00A0382D */  daddu     $a3, $a1, $zero
/* 3D8E28 E00DE708 24A50008 */  addiu     $a1, $a1, 0x8
/* 3D8E2C E00DE70C ACC50000 */  sw        $a1, 0x0($a2)
/* 3D8E30 E00DE710 ACE20000 */  sw        $v0, 0x0($a3)
/* 3D8E34 E00DE714 92C2002B */  lbu       $v0, 0x2B($s6)
/* 3D8E38 E00DE718 92C4002F */  lbu       $a0, 0x2F($s6)
/* 3D8E3C E00DE71C 92C30033 */  lbu       $v1, 0x33($s6)
/* 3D8E40 E00DE720 00021600 */  sll       $v0, $v0, 24
/* 3D8E44 E00DE724 00042400 */  sll       $a0, $a0, 16
/* 3D8E48 E00DE728 00441025 */  or        $v0, $v0, $a0
/* 3D8E4C E00DE72C 00031A00 */  sll       $v1, $v1, 8
/* 3D8E50 E00DE730 00431025 */  or        $v0, $v0, $v1
/* 3D8E54 E00DE734 312300FF */  andi      $v1, $t1, 0xFF
/* 3D8E58 E00DE738 00431025 */  or        $v0, $v0, $v1
/* 3D8E5C E00DE73C ACE20004 */  sw        $v0, 0x4($a3)
/* 3D8E60 E00DE740 3C02DE00 */  lui       $v0, (0xDE000000 >> 16)
/* 3D8E64 E00DE744 ACA20000 */  sw        $v0, 0x0($a1)
/* 3D8E68 E00DE748 00171080 */  sll       $v0, $s7, 2
/* 3D8E6C E00DE74C 00571021 */  addu      $v0, $v0, $s7
/* 3D8E70 E00DE750 00481021 */  addu      $v0, $v0, $t0
/* 3D8E74 E00DE754 00021080 */  sll       $v0, $v0, 2
/* 3D8E78 E00DE758 3C03E00E */  lui       $v1, (0xE00E0000 >> 16)
/* 3D8E7C E00DE75C 00621821 */  addu      $v1, $v1, $v0
/* 3D8E80 E00DE760 8C63E810 */  lw        $v1, -0x17F0($v1)
/* 3D8E84 E00DE764 24A20008 */  addiu     $v0, $a1, 0x8
/* 3D8E88 E00DE768 ACC20000 */  sw        $v0, 0x0($a2)
/* 3D8E8C E00DE76C ACA30004 */  sw        $v1, 0x4($a1)
/* 3D8E90 E00DE770 3C06D838 */  lui       $a2, (0xD8380002 >> 16)
.LE00DE774:
/* 3D8E94 E00DE774 34C60002 */  ori       $a2, $a2, (0xD8380002 & 0xFFFF)
/* 3D8E98 E00DE778 3C07E300 */  lui       $a3, (0xE3001A01 >> 16)
/* 3D8E9C E00DE77C 3C04800A */  lui       $a0, %hi(gMainGfxPos)
/* 3D8EA0 E00DE780 2484A66C */  addiu     $a0, $a0, %lo(gMainGfxPos)
/* 3D8EA4 E00DE784 34E71A01 */  ori       $a3, $a3, (0xE3001A01 & 0xFFFF)
/* 3D8EA8 E00DE788 8C820000 */  lw        $v0, 0x0($a0)
/* 3D8EAC E00DE78C 24050040 */  addiu     $a1, $zero, 0x40
/* 3D8EB0 E00DE790 0040182D */  daddu     $v1, $v0, $zero
/* 3D8EB4 E00DE794 24420008 */  addiu     $v0, $v0, 0x8
/* 3D8EB8 E00DE798 AC820000 */  sw        $v0, 0x0($a0)
/* 3D8EBC E00DE79C AC660000 */  sw        $a2, 0x0($v1)
/* 3D8EC0 E00DE7A0 AC650004 */  sw        $a1, 0x4($v1)
/* 3D8EC4 E00DE7A4 24430008 */  addiu     $v1, $v0, 0x8
/* 3D8EC8 E00DE7A8 AC830000 */  sw        $v1, 0x0($a0)
/* 3D8ECC E00DE7AC 24430010 */  addiu     $v1, $v0, 0x10
/* 3D8ED0 E00DE7B0 AC460000 */  sw        $a2, 0x0($v0)
/* 3D8ED4 E00DE7B4 AC450004 */  sw        $a1, 0x4($v0)
/* 3D8ED8 E00DE7B8 AC830000 */  sw        $v1, 0x0($a0)
/* 3D8EDC E00DE7BC 24030030 */  addiu     $v1, $zero, 0x30
/* 3D8EE0 E00DE7C0 AC43000C */  sw        $v1, 0xC($v0)
/* 3D8EE4 E00DE7C4 24430018 */  addiu     $v1, $v0, 0x18
/* 3D8EE8 E00DE7C8 AC470008 */  sw        $a3, 0x8($v0)
/* 3D8EEC E00DE7CC AC830000 */  sw        $v1, 0x0($a0)
/* 3D8EF0 E00DE7D0 3C03E700 */  lui       $v1, (0xE7000000 >> 16)
/* 3D8EF4 E00DE7D4 AC430010 */  sw        $v1, 0x10($v0)
/* 3D8EF8 E00DE7D8 AC400014 */  sw        $zero, 0x14($v0)
/* 3D8EFC E00DE7DC 8FBF00C4 */  lw        $ra, 0xC4($sp)
/* 3D8F00 E00DE7E0 8FBE00C0 */  lw        $fp, 0xC0($sp)
/* 3D8F04 E00DE7E4 8FB700BC */  lw        $s7, 0xBC($sp)
/* 3D8F08 E00DE7E8 8FB600B8 */  lw        $s6, 0xB8($sp)
/* 3D8F0C E00DE7EC 8FB500B4 */  lw        $s5, 0xB4($sp)
/* 3D8F10 E00DE7F0 8FB400B0 */  lw        $s4, 0xB0($sp)
/* 3D8F14 E00DE7F4 8FB300AC */  lw        $s3, 0xAC($sp)
/* 3D8F18 E00DE7F8 8FB200A8 */  lw        $s2, 0xA8($sp)
/* 3D8F1C E00DE7FC 8FB100A4 */  lw        $s1, 0xA4($sp)
/* 3D8F20 E00DE800 8FB000A0 */  lw        $s0, 0xA0($sp)
/* 3D8F24 E00DE804 03E00008 */  jr        $ra
/* 3D8F28 E00DE808 27BD00C8 */   addiu    $sp, $sp, 0xC8
/* 3D8F2C E00DE80C 00000000 */  nop

### DECOMPILED C INSTRUCTIONS:

void cold_breath_appendGfx(void* effect) {
    ColdBreathFXData* data = ((EffectInstance*)effect)->data.coldBreath;
    Camera* camera = &gCameras[gCurrentCameraID];
    s32 unk14 = data->unk_14;
    s32 unk24 = data->unk_24;
    s32 unk00 = data->unk_00;
    Matrix4f sp20;
    Matrix4f sp60;
    s32 unkIndex;
    f32 temp1;
    f32 temp2;
    f32 temp3;
    f32 temp_f32;
    s32 temp_s32;
    s32 envAlpha;
    s32 cond;

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

    shim_guTranslateF(sp20, data->unk_04, data->unk_08, data->unk_0C);
    shim_guScaleF(sp60, data->unk_40, data->unk_40, data->unk_40);
    shim_guMtxCatF(sp60, sp20, sp20);
    shim_guMtxF2L(sp20, &gDisplayContext->matrixStack[gMatrixListPos]);

    gSPMatrix(gMainGfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++], G_MTX_PUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
    gSPMatrix(gMainGfxPos++, camera->unkMatrix, G_MTX_NOPUSH | G_MTX_MUL | G_MTX_MODELVIEW);
    gDPSetPrimColor(gMainGfxPos++, 0, 0, data->unk_18, data->unk_1C, data->unk_20, 0.5 * unk24);
    gDPSetAlphaDither(gMainGfxPos++, G_AD_NOISE);
    gSPDisplayList(gMainGfxPos++, D_E00DE84C[unk00]);

    unkIndex = (unk14 < 30 ? unk14 : 29) + unk00 * 30;
    temp1 = D_E00DE96C[unkIndex];
    temp2 = D_E00DE8B4[unkIndex];
    temp3 = D_E00DE858[unkIndex];

    shim_guPositionF(sp20, 0.0f, 0.0f, -temp1, temp2 * 0.01f, temp3, 0.0f, 0.0f);
    shim_guMtxF2L(sp20, &gDisplayContext->matrixStack[gMatrixListPos]);
    gSPMatrix(gMainGfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++], G_MTX_PUSH | G_MTX_MUL | G_MTX_MODELVIEW);

    temp_f32 = D_E00DE910[unkIndex] * 5.0f / 256.0f;
    temp_s32 = temp_f32;
    envAlpha = (temp_f32 - temp_s32) * 256.0f;

    cond = temp_s32 >= 4;
    if (temp_s32 < 5) {
        if (cond) {
            gDPSetTileSize(gMainGfxPos++, 1, 0, 0, 0, 0);
        } else {
            gDPSetTileSize(gMainGfxPos++, 1, 0, 0, 31 << 2, 127 << 2);
        }
        gDPSetEnvColor(gMainGfxPos++, data->unk_28, data->unk_2C, data->unk_30, envAlpha);
        gSPDisplayList(gMainGfxPos++, D_E00DE810[unk00][temp_s32]);
    }

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


### RAW ASSEMBLY INSTRUCTIONS:

glabel func_80116698
/* ACD98 80116698 27BDFF20 */  addiu     $sp, $sp, -0xE0
/* ACD9C 8011669C AFB200C0 */  sw        $s2, 0xC0($sp)
/* ACDA0 801166A0 0000902D */  daddu     $s2, $zero, $zero
/* ACDA4 801166A4 AFB300C4 */  sw        $s3, 0xC4($sp)
/* ACDA8 801166A8 3C138007 */  lui       $s3, %hi(gMatrixListPos)
/* ACDAC 801166AC 267341F0 */  addiu     $s3, $s3, %lo(gMatrixListPos)
/* ACDB0 801166B0 AFB400C8 */  sw        $s4, 0xC8($sp)
/* ACDB4 801166B4 3C140001 */  lui       $s4, (0x11630 >> 16)
/* ACDB8 801166B8 F7B400D8 */  sdc1      $f20, 0xD8($sp)
/* ACDBC 801166BC 3C013F00 */  lui       $at, (0x3F000000 >> 16)
/* ACDC0 801166C0 4481A000 */  mtc1      $at, $f20
/* ACDC4 801166C4 36941630 */  ori       $s4, $s4, (0x11630 & 0xFFFF)
/* ACDC8 801166C8 AFBF00D0 */  sw        $ra, 0xD0($sp)
/* ACDCC 801166CC AFB500CC */  sw        $s5, 0xCC($sp)
/* ACDD0 801166D0 AFB100BC */  sw        $s1, 0xBC($sp)
/* ACDD4 801166D4 AFB000B8 */  sw        $s0, 0xB8($sp)
.L801166D8:
/* ACDD8 801166D8 3C038015 */  lui       $v1, %hi(gCurrentModels)
/* ACDDC 801166DC 8C6312CC */  lw        $v1, %lo(gCurrentModels)($v1)
/* ACDE0 801166E0 00121080 */  sll       $v0, $s2, 2
/* ACDE4 801166E4 00431021 */  addu      $v0, $v0, $v1
/* ACDE8 801166E8 8C500000 */  lw        $s0, 0x0($v0)
/* ACDEC 801166EC 52000088 */  beql      $s0, $zero, .L80116910
/* ACDF0 801166F0 26520001 */   addiu    $s2, $s2, 0x1
/* ACDF4 801166F4 96030000 */  lhu       $v1, 0x0($s0)
/* ACDF8 801166F8 50600085 */  beql      $v1, $zero, .L80116910
/* ACDFC 801166FC 26520001 */   addiu    $s2, $s2, 0x1
/* ACE00 80116700 30620004 */  andi      $v0, $v1, 0x4
/* ACE04 80116704 54400082 */  bnel      $v0, $zero, .L80116910
/* ACE08 80116708 26520001 */   addiu    $s2, $s2, 0x1
/* ACE0C 8011670C 30621000 */  andi      $v0, $v1, 0x1000
/* ACE10 80116710 14400034 */  bnez      $v0, .L801167E4
/* ACE14 80116714 24020002 */   addiu    $v0, $zero, 0x2
/* ACE18 80116718 920200A7 */  lbu       $v0, 0xA7($s0)
/* ACE1C 8011671C 1040002E */  beqz      $v0, .L801167D8
/* ACE20 80116720 2442FFFF */   addiu    $v0, $v0, -0x1
/* ACE24 80116724 A20200A7 */  sb        $v0, 0xA7($s0)
/* ACE28 80116728 304200FF */  andi      $v0, $v0, 0xFF
/* ACE2C 8011672C 1440000F */  bnez      $v0, .L8011676C
/* ACE30 80116730 00000000 */   nop
/* ACE34 80116734 8E020010 */  lw        $v0, 0x10($s0)
/* ACE38 80116738 26030018 */  addiu     $v1, $s0, 0x18
/* ACE3C 8011673C 24440040 */  addiu     $a0, $v0, 0x40
.L80116740:
/* ACE40 80116740 8C480000 */  lw        $t0, 0x0($v0)
/* ACE44 80116744 8C490004 */  lw        $t1, 0x4($v0)
/* ACE48 80116748 8C4A0008 */  lw        $t2, 0x8($v0)
/* ACE4C 8011674C 8C4B000C */  lw        $t3, 0xC($v0)
/* ACE50 80116750 AC680000 */  sw        $t0, 0x0($v1)
/* ACE54 80116754 AC690004 */  sw        $t1, 0x4($v1)
/* ACE58 80116758 AC6A0008 */  sw        $t2, 0x8($v1)
/* ACE5C 8011675C AC6B000C */  sw        $t3, 0xC($v1)
/* ACE60 80116760 24420010 */  addiu     $v0, $v0, 0x10
/* ACE64 80116764 1444FFF6 */  bne       $v0, $a0, .L80116740
/* ACE68 80116768 24630010 */   addiu    $v1, $v1, 0x10
.L8011676C:
/* ACE6C 8011676C 96620000 */  lhu       $v0, 0x0($s3)
/* ACE70 80116770 8E110010 */  lw        $s1, 0x10($s0)
/* ACE74 80116774 3C04800A */  lui       $a0, %hi(gDisplayContext)
/* ACE78 80116778 8C84A674 */  lw        $a0, %lo(gDisplayContext)($a0)
/* ACE7C 8011677C 3043FFFF */  andi      $v1, $v0, 0xFFFF
/* ACE80 80116780 00031980 */  sll       $v1, $v1, 6
/* ACE84 80116784 00741821 */  addu      $v1, $v1, $s4
/* ACE88 80116788 00832021 */  addu      $a0, $a0, $v1
/* ACE8C 8011678C 0080182D */  daddu     $v1, $a0, $zero
/* ACE90 80116790 0220202D */  daddu     $a0, $s1, $zero
/* ACE94 80116794 24850040 */  addiu     $a1, $a0, 0x40
/* ACE98 80116798 24420001 */  addiu     $v0, $v0, 0x1
/* ACE9C 8011679C A6620000 */  sh        $v0, 0x0($s3)
/* ACEA0 801167A0 AE030010 */  sw        $v1, 0x10($s0)
.L801167A4:
/* ACEA4 801167A4 8C880000 */  lw        $t0, 0x0($a0)
/* ACEA8 801167A8 8C890004 */  lw        $t1, 0x4($a0)
/* ACEAC 801167AC 8C8A0008 */  lw        $t2, 0x8($a0)
/* ACEB0 801167B0 8C8B000C */  lw        $t3, 0xC($a0)
/* ACEB4 801167B4 AC680000 */  sw        $t0, 0x0($v1)
/* ACEB8 801167B8 AC690004 */  sw        $t1, 0x4($v1)
/* ACEBC 801167BC AC6A0008 */  sw        $t2, 0x8($v1)
/* ACEC0 801167C0 AC6B000C */  sw        $t3, 0xC($v1)
/* ACEC4 801167C4 24840010 */  addiu     $a0, $a0, 0x10
/* ACEC8 801167C8 1485FFF6 */  bne       $a0, $a1, .L801167A4
/* ACECC 801167CC 24630010 */   addiu    $v1, $v1, 0x10
/* ACED0 801167D0 08045A44 */  j         .L80116910
/* ACED4 801167D4 26520001 */   addiu    $s2, $s2, 0x1
.L801167D8:
/* ACED8 801167D8 26020018 */  addiu     $v0, $s0, 0x18
/* ACEDC 801167DC 08045A43 */  j         .L8011690C
/* ACEE0 801167E0 AE020010 */   sw       $v0, 0x10($s0)
.L801167E4:
/* ACEE4 801167E4 A20200A7 */  sb        $v0, 0xA7($s0)
/* ACEE8 801167E8 3062EFFF */  andi      $v0, $v1, 0xEFFF
/* ACEEC 801167EC 96640000 */  lhu       $a0, 0x0($s3)
/* ACEF0 801167F0 3C03800A */  lui       $v1, %hi(gDisplayContext)
/* ACEF4 801167F4 8C63A674 */  lw        $v1, %lo(gDisplayContext)($v1)
/* ACEF8 801167F8 8E050004 */  lw        $a1, 0x4($s0)
/* ACEFC 801167FC A6020000 */  sh        $v0, 0x0($s0)
/* ACF00 80116800 3082FFFF */  andi      $v0, $a0, 0xFFFF
/* ACF04 80116804 00021180 */  sll       $v0, $v0, 6
/* ACF08 80116808 00541021 */  addu      $v0, $v0, $s4
/* ACF0C 8011680C 00628821 */  addu      $s1, $v1, $v0
/* ACF10 80116810 24840001 */  addiu     $a0, $a0, 0x1
/* ACF14 80116814 10A00005 */  beqz      $a1, .L8011682C
/* ACF18 80116818 A6640000 */   sh       $a0, 0x0($s3)
/* ACF1C 8011681C 96020000 */  lhu       $v0, 0x0($s0)
/* ACF20 80116820 30420008 */  andi      $v0, $v0, 0x8
/* ACF24 80116824 10400003 */  beqz      $v0, .L80116834
/* ACF28 80116828 00000000 */   nop
.L8011682C:
/* ACF2C 8011682C 08045A14 */  j         .L80116850
/* ACF30 80116830 26040058 */   addiu    $a0, $s0, 0x58
.L80116834:
/* ACF34 80116834 0C019D60 */  jal       guMtxL2F
/* ACF38 80116838 27A40020 */   addiu    $a0, $sp, 0x20
/* ACF3C 8011683C 26040058 */  addiu     $a0, $s0, 0x58
/* ACF40 80116840 27A50020 */  addiu     $a1, $sp, 0x20
/* ACF44 80116844 0C019D80 */  jal       guMtxCatF
/* ACF48 80116848 00A0302D */   daddu    $a2, $a1, $zero
/* ACF4C 8011684C 27A40020 */  addiu     $a0, $sp, 0x20
.L80116850:
/* ACF50 80116850 0C019D40 */  jal       guMtxF2L
/* ACF54 80116854 0220282D */   daddu    $a1, $s1, $zero
/* ACF58 80116858 24050061 */  addiu     $a1, $zero, 0x61
/* ACF5C 8011685C 96020000 */  lhu       $v0, 0x0($s0)
/* ACF60 80116860 8E040008 */  lw        $a0, 0x8($s0)
/* ACF64 80116864 3042DFFF */  andi      $v0, $v0, 0xDFFF
/* ACF68 80116868 0C0456C3 */  jal       get_model_property
/* ACF6C 8011686C A6020000 */   sh       $v0, 0x0($s0)
/* ACF70 80116870 C4460008 */  lwc1      $f6, 0x8($v0)
/* ACF74 80116874 C440002C */  lwc1      $f0, 0x2C($v0)
/* ACF78 80116878 46003180 */  add.s     $f6, $f6, $f0
/* ACF7C 8011687C 46143182 */  mul.s     $f6, $f6, $f20
/* ACF80 80116880 00000000 */  nop
/* ACF84 80116884 C4440014 */  lwc1      $f4, 0x14($v0)
/* ACF88 80116888 C4400038 */  lwc1      $f0, 0x38($v0)
/* ACF8C 8011688C 46002100 */  add.s     $f4, $f4, $f0
/* ACF90 80116890 46142102 */  mul.s     $f4, $f4, $f20
/* ACF94 80116894 00000000 */  nop
/* ACF98 80116898 C4420020 */  lwc1      $f2, 0x20($v0)
/* ACF9C 8011689C C4400044 */  lwc1      $f0, 0x44($v0)
/* ACFA0 801168A0 46001080 */  add.s     $f2, $f2, $f0
/* ACFA4 801168A4 46141082 */  mul.s     $f2, $f2, $f20
/* ACFA8 801168A8 00000000 */  nop
/* ACFAC 801168AC 0220202D */  daddu     $a0, $s1, $zero
/* ACFB0 801168B0 44053000 */  mfc1      $a1, $f6
/* ACFB4 801168B4 44062000 */  mfc1      $a2, $f4
/* ACFB8 801168B8 44071000 */  mfc1      $a3, $f2
/* ACFBC 801168BC 27A200A0 */  addiu     $v0, $sp, 0xA0
/* ACFC0 801168C0 AFA500A0 */  sw        $a1, 0xA0($sp)
/* ACFC4 801168C4 AFA600A4 */  sw        $a2, 0xA4($sp)
/* ACFC8 801168C8 AFA700A8 */  sw        $a3, 0xA8($sp)
/* ACFCC 801168CC AFA20010 */  sw        $v0, 0x10($sp)
/* ACFD0 801168D0 27A200A4 */  addiu     $v0, $sp, 0xA4
/* ACFD4 801168D4 AFA20014 */  sw        $v0, 0x14($sp)
/* ACFD8 801168D8 27A200A8 */  addiu     $v0, $sp, 0xA8
/* ACFDC 801168DC 0C019E78 */  jal       guMtxXFML
/* ACFE0 801168E0 AFA20018 */   sw       $v0, 0x18($sp)
/* ACFE4 801168E4 C7A000A0 */  lwc1      $f0, 0xA0($sp)
/* ACFE8 801168E8 C7A200A4 */  lwc1      $f2, 0xA4($sp)
/* ACFEC 801168EC C7A400A8 */  lwc1      $f4, 0xA8($sp)
/* ACFF0 801168F0 96020000 */  lhu       $v0, 0x0($s0)
/* ACFF4 801168F4 AE110010 */  sw        $s1, 0x10($s0)
/* ACFF8 801168F8 3042FDFF */  andi      $v0, $v0, 0xFDFF
/* ACFFC 801168FC E6000098 */  swc1      $f0, 0x98($s0)
/* AD000 80116900 E602009C */  swc1      $f2, 0x9C($s0)
/* AD004 80116904 E60400A0 */  swc1      $f4, 0xA0($s0)
/* AD008 80116908 A6020000 */  sh        $v0, 0x0($s0)
.L8011690C:
/* AD00C 8011690C 26520001 */  addiu     $s2, $s2, 0x1
.L80116910:
/* AD010 80116910 2A420100 */  slti      $v0, $s2, 0x100
/* AD014 80116914 1440FF70 */  bnez      $v0, .L801166D8
/* AD018 80116918 3C150001 */   lui      $s5, (0x11630 >> 16)
/* AD01C 8011691C 0000902D */  daddu     $s2, $zero, $zero
/* AD020 80116920 3C148007 */  lui       $s4, %hi(gMatrixListPos)
/* AD024 80116924 269441F0 */  addiu     $s4, $s4, %lo(gMatrixListPos)
/* AD028 80116928 36B51630 */  ori       $s5, $s5, (0x11630 & 0xFFFF)
/* AD02C 8011692C 27B30060 */  addiu     $s3, $sp, 0x60
/* AD030 80116930 3C013F00 */  lui       $at, (0x3F000000 >> 16)
/* AD034 80116934 4481A000 */  mtc1      $at, $f20
.L80116938:
/* AD038 80116938 3C038015 */  lui       $v1, %hi(gCurrentTransformGroups)
/* AD03C 8011693C 8C6312E0 */  lw        $v1, %lo(gCurrentTransformGroups)($v1)
/* AD040 80116940 00121080 */  sll       $v0, $s2, 2
/* AD044 80116944 00431021 */  addu      $v0, $v0, $v1
/* AD048 80116948 8C500000 */  lw        $s0, 0x0($v0)
/* AD04C 8011694C 52000081 */  beql      $s0, $zero, .L80116B54
/* AD050 80116950 26520001 */   addiu    $s2, $s2, 0x1
/* AD054 80116954 96030000 */  lhu       $v1, 0x0($s0)
/* AD058 80116958 5060007E */  beql      $v1, $zero, .L80116B54
/* AD05C 8011695C 26520001 */   addiu    $s2, $s2, 0x1
/* AD060 80116960 30620004 */  andi      $v0, $v1, 0x4
/* AD064 80116964 5440007B */  bnel      $v0, $zero, .L80116B54
/* AD068 80116968 26520001 */   addiu    $s2, $s2, 0x1
/* AD06C 8011696C 30621000 */  andi      $v0, $v1, 0x1000
/* AD070 80116970 14400034 */  bnez      $v0, .L80116A44
/* AD074 80116974 24020002 */   addiu    $v0, $zero, 0x2
/* AD078 80116978 9202009F */  lbu       $v0, 0x9F($s0)
/* AD07C 8011697C 1040002E */  beqz      $v0, .L80116A38
/* AD080 80116980 2442FFFF */   addiu    $v0, $v0, -0x1
/* AD084 80116984 A202009F */  sb        $v0, 0x9F($s0)
/* AD088 80116988 304200FF */  andi      $v0, $v0, 0xFF
/* AD08C 8011698C 1440000F */  bnez      $v0, .L801169CC
/* AD090 80116990 00000000 */   nop
/* AD094 80116994 8E02000C */  lw        $v0, 0xC($s0)
/* AD098 80116998 26030010 */  addiu     $v1, $s0, 0x10
/* AD09C 8011699C 24440040 */  addiu     $a0, $v0, 0x40
.L801169A0:
/* AD0A0 801169A0 8C480000 */  lw        $t0, 0x0($v0)
/* AD0A4 801169A4 8C490004 */  lw        $t1, 0x4($v0)
/* AD0A8 801169A8 8C4A0008 */  lw        $t2, 0x8($v0)
/* AD0AC 801169AC 8C4B000C */  lw        $t3, 0xC($v0)
/* AD0B0 801169B0 AC680000 */  sw        $t0, 0x0($v1)
/* AD0B4 801169B4 AC690004 */  sw        $t1, 0x4($v1)
/* AD0B8 801169B8 AC6A0008 */  sw        $t2, 0x8($v1)
/* AD0BC 801169BC AC6B000C */  sw        $t3, 0xC($v1)
/* AD0C0 801169C0 24420010 */  addiu     $v0, $v0, 0x10
/* AD0C4 801169C4 1444FFF6 */  bne       $v0, $a0, .L801169A0
/* AD0C8 801169C8 24630010 */   addiu    $v1, $v1, 0x10
.L801169CC:
/* AD0CC 801169CC 96820000 */  lhu       $v0, 0x0($s4)
/* AD0D0 801169D0 8E11000C */  lw        $s1, 0xC($s0)
/* AD0D4 801169D4 3C04800A */  lui       $a0, %hi(gDisplayContext)
/* AD0D8 801169D8 8C84A674 */  lw        $a0, %lo(gDisplayContext)($a0)
/* AD0DC 801169DC 3043FFFF */  andi      $v1, $v0, 0xFFFF
/* AD0E0 801169E0 00031980 */  sll       $v1, $v1, 6
/* AD0E4 801169E4 00751821 */  addu      $v1, $v1, $s5
/* AD0E8 801169E8 00832021 */  addu      $a0, $a0, $v1
/* AD0EC 801169EC 0080182D */  daddu     $v1, $a0, $zero
/* AD0F0 801169F0 0220202D */  daddu     $a0, $s1, $zero
/* AD0F4 801169F4 24850040 */  addiu     $a1, $a0, 0x40
/* AD0F8 801169F8 24420001 */  addiu     $v0, $v0, 0x1
/* AD0FC 801169FC A6820000 */  sh        $v0, 0x0($s4)
/* AD100 80116A00 AE03000C */  sw        $v1, 0xC($s0)
.L80116A04:
/* AD104 80116A04 8C880000 */  lw        $t0, 0x0($a0)
/* AD108 80116A08 8C890004 */  lw        $t1, 0x4($a0)
/* AD10C 80116A0C 8C8A0008 */  lw        $t2, 0x8($a0)
/* AD110 80116A10 8C8B000C */  lw        $t3, 0xC($a0)
/* AD114 80116A14 AC680000 */  sw        $t0, 0x0($v1)
/* AD118 80116A18 AC690004 */  sw        $t1, 0x4($v1)
/* AD11C 80116A1C AC6A0008 */  sw        $t2, 0x8($v1)
/* AD120 80116A20 AC6B000C */  sw        $t3, 0xC($v1)
/* AD124 80116A24 24840010 */  addiu     $a0, $a0, 0x10
/* AD128 80116A28 1485FFF6 */  bne       $a0, $a1, .L80116A04
/* AD12C 80116A2C 24630010 */   addiu    $v1, $v1, 0x10
/* AD130 80116A30 08045AD5 */  j         .L80116B54
/* AD134 80116A34 26520001 */   addiu    $s2, $s2, 0x1
.L80116A38:
/* AD138 80116A38 26020010 */  addiu     $v0, $s0, 0x10
/* AD13C 80116A3C 08045AD4 */  j         .L80116B50
/* AD140 80116A40 AE02000C */   sw       $v0, 0xC($s0)
.L80116A44:
/* AD144 80116A44 A202009F */  sb        $v0, 0x9F($s0)
/* AD148 80116A48 3062EFFF */  andi      $v0, $v1, 0xEFFF
/* AD14C 80116A4C 96840000 */  lhu       $a0, 0x0($s4)
/* AD150 80116A50 3C03800A */  lui       $v1, %hi(gDisplayContext)
/* AD154 80116A54 8C63A674 */  lw        $v1, %lo(gDisplayContext)($v1)
/* AD158 80116A58 8E050004 */  lw        $a1, 0x4($s0)
/* AD15C 80116A5C A6020000 */  sh        $v0, 0x0($s0)
/* AD160 80116A60 3082FFFF */  andi      $v0, $a0, 0xFFFF
/* AD164 80116A64 00021180 */  sll       $v0, $v0, 6
/* AD168 80116A68 00551021 */  addu      $v0, $v0, $s5
/* AD16C 80116A6C 00628821 */  addu      $s1, $v1, $v0
/* AD170 80116A70 24840001 */  addiu     $a0, $a0, 0x1
/* AD174 80116A74 14A00003 */  bnez      $a1, .L80116A84
/* AD178 80116A78 A6840000 */   sh       $a0, 0x0($s4)
/* AD17C 80116A7C 08045AA8 */  j         .L80116AA0
/* AD180 80116A80 26040050 */   addiu    $a0, $s0, 0x50
.L80116A84:
/* AD184 80116A84 0C019D60 */  jal       guMtxL2F
/* AD188 80116A88 0260202D */   daddu    $a0, $s3, $zero
/* AD18C 80116A8C 26040050 */  addiu     $a0, $s0, 0x50
/* AD190 80116A90 0260282D */  daddu     $a1, $s3, $zero
/* AD194 80116A94 0C019D80 */  jal       guMtxCatF
/* AD198 80116A98 0260302D */   daddu    $a2, $s3, $zero
/* AD19C 80116A9C 0260202D */  daddu     $a0, $s3, $zero
.L80116AA0:
/* AD1A0 80116AA0 0C019D40 */  jal       guMtxF2L
/* AD1A4 80116AA4 0220282D */   daddu    $a1, $s1, $zero
/* AD1A8 80116AA8 24050061 */  addiu     $a1, $zero, 0x61
/* AD1AC 80116AAC 96020000 */  lhu       $v0, 0x0($s0)
/* AD1B0 80116AB0 8E040008 */  lw        $a0, 0x8($s0)
/* AD1B4 80116AB4 3042DFFF */  andi      $v0, $v0, 0xDFFF
/* AD1B8 80116AB8 0C0456C3 */  jal       get_model_property
/* AD1BC 80116ABC A6020000 */   sh       $v0, 0x0($s0)
/* AD1C0 80116AC0 C4460008 */  lwc1      $f6, 0x8($v0)
/* AD1C4 80116AC4 C440002C */  lwc1      $f0, 0x2C($v0)
/* AD1C8 80116AC8 46003180 */  add.s     $f6, $f6, $f0
/* AD1CC 80116ACC 46143182 */  mul.s     $f6, $f6, $f20
/* AD1D0 80116AD0 00000000 */  nop
/* AD1D4 80116AD4 C4440014 */  lwc1      $f4, 0x14($v0)
/* AD1D8 80116AD8 C4400038 */  lwc1      $f0, 0x38($v0)
/* AD1DC 80116ADC 46002100 */  add.s     $f4, $f4, $f0
/* AD1E0 80116AE0 46142102 */  mul.s     $f4, $f4, $f20
/* AD1E4 80116AE4 00000000 */  nop
/* AD1E8 80116AE8 C4420020 */  lwc1      $f2, 0x20($v0)
/* AD1EC 80116AEC C4400044 */  lwc1      $f0, 0x44($v0)
/* AD1F0 80116AF0 46001080 */  add.s     $f2, $f2, $f0
/* AD1F4 80116AF4 46141082 */  mul.s     $f2, $f2, $f20
/* AD1F8 80116AF8 00000000 */  nop
/* AD1FC 80116AFC 0220202D */  daddu     $a0, $s1, $zero
/* AD200 80116B00 44053000 */  mfc1      $a1, $f6
/* AD204 80116B04 44062000 */  mfc1      $a2, $f4
/* AD208 80116B08 44071000 */  mfc1      $a3, $f2
/* AD20C 80116B0C 27A200AC */  addiu     $v0, $sp, 0xAC
/* AD210 80116B10 AFA500AC */  sw        $a1, 0xAC($sp)
/* AD214 80116B14 AFA600B0 */  sw        $a2, 0xB0($sp)
/* AD218 80116B18 AFA700B4 */  sw        $a3, 0xB4($sp)
/* AD21C 80116B1C AFA20010 */  sw        $v0, 0x10($sp)
/* AD220 80116B20 27A200B0 */  addiu     $v0, $sp, 0xB0
/* AD224 80116B24 AFA20014 */  sw        $v0, 0x14($sp)
/* AD228 80116B28 27A200B4 */  addiu     $v0, $sp, 0xB4
/* AD22C 80116B2C 0C019E78 */  jal       guMtxXFML
/* AD230 80116B30 AFA20018 */   sw       $v0, 0x18($sp)
/* AD234 80116B34 C7A000AC */  lwc1      $f0, 0xAC($sp)
/* AD238 80116B38 C7A200B0 */  lwc1      $f2, 0xB0($sp)
/* AD23C 80116B3C C7A400B4 */  lwc1      $f4, 0xB4($sp)
/* AD240 80116B40 AE11000C */  sw        $s1, 0xC($s0)
/* AD244 80116B44 E6000090 */  swc1      $f0, 0x90($s0)
/* AD248 80116B48 E6020094 */  swc1      $f2, 0x94($s0)
/* AD24C 80116B4C E6040098 */  swc1      $f4, 0x98($s0)
.L80116B50:
/* AD250 80116B50 26520001 */  addiu     $s2, $s2, 0x1
.L80116B54:
/* AD254 80116B54 2A420004 */  slti      $v0, $s2, 0x4
/* AD258 80116B58 1440FF77 */  bnez      $v0, .L80116938
/* AD25C 80116B5C 00000000 */   nop
/* AD260 80116B60 0C046F3B */  jal       build_custom_gfx
/* AD264 80116B64 00000000 */   nop
/* AD268 80116B68 8FBF00D0 */  lw        $ra, 0xD0($sp)
/* AD26C 80116B6C 8FB500CC */  lw        $s5, 0xCC($sp)
/* AD270 80116B70 8FB400C8 */  lw        $s4, 0xC8($sp)
/* AD274 80116B74 8FB300C4 */  lw        $s3, 0xC4($sp)
/* AD278 80116B78 8FB200C0 */  lw        $s2, 0xC0($sp)
/* AD27C 80116B7C 8FB100BC */  lw        $s1, 0xBC($sp)
/* AD280 80116B80 8FB000B8 */  lw        $s0, 0xB8($sp)
/* AD284 80116B84 D7B400D8 */  ldc1      $f20, 0xD8($sp)
/* AD288 80116B88 03E00008 */  jr        $ra
/* AD28C 80116B8C 27BD00E0 */   addiu    $sp, $sp, 0xE0

### DECOMPILED C INSTRUCTIONS:

void func_80116698(void) {
    Matrix4f sp20;
    Matrix4f sp60;
    f32 mX, mY, mZ;
    f32 mtgX, mtgY, mtgZ;
    Model* model;
    Mtx* mtx;
    ModelBoundingBox* bb;
    ModelTransformGroup* mtg;
    s32 i;

    for (i = 0; i < ARRAY_COUNT(*gCurrentModels); i++) {
        model = (*gCurrentModels)[i];
        if (model != NULL && (model->flags != 0) && !(model->flags & MODEL_FLAG_FLAG_4)) {
            if (!(model->flags & MODEL_FLAG_USES_TRANSFORM_MATRIX)) {
                if (model->matrixMode != 0) {
                    model->matrixMode--;
                    if (model->matrixMode <= 0) {
                        model->specialMatrix = *model->currentSpecialMatrix;
                    }
                    mtx = model->currentSpecialMatrix;
                    model->currentSpecialMatrix = &gDisplayContext->matrixStack[gMatrixListPos++];
                    *model->currentSpecialMatrix = *mtx;
                } else {
                    model->currentSpecialMatrix = &model->specialMatrix;
                }
            } else {
                model->flags &= ~MODEL_FLAG_USES_TRANSFORM_MATRIX;
                model->matrixMode = 2;
                mtx = &gDisplayContext->matrixStack[gMatrixListPos++];
                if (model->currentMatrix == NULL || (model->flags & MODEL_FLAG_TRANSFORM_GROUP_MEMBER)) {
                    guMtxF2L(model->transformMatrix, mtx);
                } else {
                    guMtxL2F(sp20, model->currentMatrix);
                    guMtxCatF(model->transformMatrix, sp20, sp20);
                    guMtxF2L(sp20, mtx);
                }
                model->flags &= ~MODEL_FLAG_FLAG_2000;
                bb = (ModelBoundingBox*) get_model_property(model->modelNode, MODEL_PROP_KEY_BOUNDING_BOX);
                mX = (bb->minX + bb->maxX) * 0.5f;
                mY = (bb->minY + bb->maxY) * 0.5f;
                mZ = (bb->minZ + bb->maxZ) * 0.5f;
                guMtxXFML(mtx, mX, mY, mZ, &mX, &mY, &mZ);
                model->currentSpecialMatrix = mtx;
                model->center.x = mX;
                model->center.y = mY;
                model->center.z = mZ;
                model->flags &= ~MODEL_FLAG_FLAG_200;
            }
        }
    }

    for (i = 0; i < ARRAY_COUNT((*gCurrentTransformGroups)); i++) {
        mtg = (*gCurrentTransformGroups)[i];
        if (mtg != NULL && mtg->flags != 0 && !(mtg->flags & MODEL_TRANSFORM_GROUP_FLAG_4)) {
            if (!(mtg->flags & MODEL_TRANSFORM_GROUP_FLAG_1000)) {
                if (mtg->matrixMode != 0) {
                    mtg->matrixMode--;
                    if (mtg->matrixMode == 0) {
                        mtg->matrixA = *mtg->transformMtx;
                    }
                    // store transformMtx on stack
                    mtx = mtg->transformMtx;
                    mtg->transformMtx = &gDisplayContext->matrixStack[gMatrixListPos++];
                    *mtg->transformMtx = *mtx;
                } else {
                    mtg->transformMtx = &mtg->matrixA;
                }
            } else {
                mtg->flags &= ~MODEL_TRANSFORM_GROUP_FLAG_1000;
                mtg->matrixMode = 2;
                mtx = &gDisplayContext->matrixStack[gMatrixListPos++];
                if (mtg->matrixRDP_N == NULL) {
                    guMtxF2L(mtg->matrixB, mtx);
                } else {
                    guMtxL2F(sp60, mtg->matrixRDP_N);
                    guMtxCatF(mtg->matrixB, sp60, sp60);
                    guMtxF2L(sp60, mtx);
                }
                mtg->flags &= ~MODEL_TRANSFORM_GROUP_FLAG_2000;
                bb = (ModelBoundingBox*) get_model_property(mtg->modelNode, MODEL_PROP_KEY_BOUNDING_BOX);
                mtgX = (bb->minX + bb->maxX) * 0.5f;
                mtgY = (bb->minY + bb->maxY) * 0.5f;
                mtgZ = (bb->minZ + bb->maxZ) * 0.5f;
                guMtxXFML(mtx, mtgX, mtgY, mtgZ, &mtgX, &mtgY, &mtgZ);
                mtg->transformMtx = mtx;
                mtg->center.x = mtgX;
                mtg->center.y = mtgY;
                mtg->center.z = mtgZ;
            }
        }
    }
    build_custom_gfx();
}


### RAW ASSEMBLY INSTRUCTIONS:

glabel load_map_by_IDs
/* 35AF4 8005A6F4 27BDFFB0 */  addiu     $sp, $sp, -0x50
/* 35AF8 8005A6F8 AFB00038 */  sw        $s0, 0x38($sp)
/* 35AFC 8005A6FC 00C0802D */  daddu     $s0, $a2, $zero
/* 35B00 8005A700 AFB1003C */  sw        $s1, 0x3C($sp)
/* 35B04 8005A704 0080882D */  daddu     $s1, $a0, $zero
/* 35B08 8005A708 AFB30044 */  sw        $s3, 0x44($sp)
/* 35B0C 8005A70C 00A0982D */  daddu     $s3, $a1, $zero
/* 35B10 8005A710 AFB40048 */  sw        $s4, 0x48($sp)
/* 35B14 8005A714 0000A02D */  daddu     $s4, $zero, $zero
/* 35B18 8005A718 AFBF004C */  sw        $ra, 0x4C($sp)
/* 35B1C 8005A71C 0C05260E */  jal       sfx_stop_env_sounds
/* 35B20 8005A720 AFB20040 */   sw       $s2, 0x40($sp)
/* 35B24 8005A724 3C05800A */  lui       $a1, %hi(gOverrideFlags)
/* 35B28 8005A728 24A5A650 */  addiu     $a1, $a1, %lo(gOverrideFlags)
/* 35B2C 8005A72C 2402FFBF */  addiu     $v0, $zero, -0x41
/* 35B30 8005A730 3C128007 */  lui       $s2, %hi(gGameStatusPtr)
/* 35B34 8005A734 2652419C */  addiu     $s2, $s2, %lo(gGameStatusPtr)
/* 35B38 8005A738 8CA30000 */  lw        $v1, 0x0($a1)
/* 35B3C 8005A73C 8E440000 */  lw        $a0, 0x0($s2)
/* 35B40 8005A740 00621824 */  and       $v1, $v1, $v0
/* 35B44 8005A744 2402FF7F */  addiu     $v0, $zero, -0x81
/* 35B48 8005A748 00621824 */  and       $v1, $v1, $v0
/* 35B4C 8005A74C ACA30000 */  sw        $v1, 0x0($a1)
/* 35B50 8005A750 0C00B458 */  jal       load_obfuscation_shims
/* 35B54 8005A754 A0800084 */   sb       $zero, 0x84($a0)
/* 35B58 8005A758 0C0AC81E */  jal       shim_general_heap_create_obfuscated
/* 35B5C 8005A75C 00108400 */   sll      $s0, $s0, 16
/* 35B60 8005A760 0C047624 */  jal       clear_render_tasks
/* 35B64 8005A764 00108403 */   sra      $s0, $s0, 16
/* 35B68 8005A768 0C048C2E */  jal       clear_worker_list
/* 35B6C 8005A76C 00000000 */   nop
/* 35B70 8005A770 0C0B0C77 */  jal       clear_script_list
/* 35B74 8005A774 00000000 */   nop
/* 35B78 8005A778 12000005 */  beqz      $s0, .L8005A790
/* 35B7C 8005A77C 24020001 */   addiu    $v0, $zero, 0x1
/* 35B80 8005A780 12020008 */  beq       $s0, $v0, .L8005A7A4
/* 35B84 8005A784 00000000 */   nop
/* 35B88 8005A788 080169F0 */  j         .L8005A7C0
/* 35B8C 8005A78C 00000000 */   nop
.L8005A790:
/* 35B90 8005A790 0C0514E4 */  jal       clear_area_flags
/* 35B94 8005A794 00000000 */   nop
/* 35B98 8005A798 8E420000 */  lw        $v0, 0x0($s2)
/* 35B9C 8005A79C 080169F0 */  j         .L8005A7C0
/* 35BA0 8005A7A0 A0400167 */   sb       $zero, 0x167($v0)
.L8005A7A4:
/* 35BA4 8005A7A4 0C00AD24 */  jal       fio_deserialize_state
/* 35BA8 8005A7A8 00000000 */   nop
/* 35BAC 8005A7AC 8E420000 */  lw        $v0, 0x0($s2)
/* 35BB0 8005A7B0 94510086 */  lhu       $s1, 0x86($v0)
/* 35BB4 8005A7B4 9453008C */  lhu       $s3, 0x8C($v0)
/* 35BB8 8005A7B8 A0500167 */  sb        $s0, 0x167($v0)
/* 35BBC 8005A7BC A4510088 */  sh        $s1, 0x88($v0)
.L8005A7C0:
/* 35BC0 8005A7C0 3C04800E */  lui       $a0, %hi(wMapShapeName)
/* 35BC4 8005A7C4 24849230 */  addiu     $a0, $a0, %lo(wMapShapeName)
/* 35BC8 8005A7C8 3C028007 */  lui       $v0, %hi(gGameStatusPtr)
/* 35BCC 8005A7CC 8C42419C */  lw        $v0, %lo(gGameStatusPtr)($v0)
/* 35BD0 8005A7D0 00131C00 */  sll       $v1, $s3, 16
/* 35BD4 8005A7D4 AC400144 */  sw        $zero, 0x144($v0)
/* 35BD8 8005A7D8 00111400 */  sll       $v0, $s1, 16
/* 35BDC 8005A7DC 00021303 */  sra       $v0, $v0, 12
/* 35BE0 8005A7E0 3C018009 */  lui       $at, %hi(gAreas + 0x4)
/* 35BE4 8005A7E4 00220821 */  addu      $at, $at, $v0
/* 35BE8 8005A7E8 8C2234F4 */  lw        $v0, %lo(gAreas + 0x4)($at)
/* 35BEC 8005A7EC 00031AC3 */  sra       $v1, $v1, 11
/* 35BF0 8005A7F0 00439021 */  addu      $s2, $v0, $v1
/* 35BF4 8005A7F4 8E460000 */  lw        $a2, 0x0($s2)
/* 35BF8 8005A7F8 3C05800A */  lui       $a1, %hi(D_80098A10)
/* 35BFC 8005A7FC 0C01953C */  jal       sprintf
/* 35C00 8005A800 24A58A10 */   addiu    $a1, $a1, %lo(D_80098A10)
/* 35C04 8005A804 3C04800E */  lui       $a0, %hi(wMapHitName)
/* 35C08 8005A808 248491E0 */  addiu     $a0, $a0, %lo(wMapHitName)
/* 35C0C 8005A80C 8E460000 */  lw        $a2, 0x0($s2)
/* 35C10 8005A810 3C05800A */  lui       $a1, %hi(D_80098A1C)
/* 35C14 8005A814 0C01953C */  jal       sprintf
/* 35C18 8005A818 24A58A1C */   addiu    $a1, $a1, %lo(D_80098A1C)
/* 35C1C 8005A81C 8E450000 */  lw        $a1, 0x0($s2)
/* 35C20 8005A820 0C01BB50 */  jal       strcpy
/* 35C24 8005A824 27A40018 */   addiu    $a0, $sp, 0x18
/* 35C28 8005A828 3C04800B */  lui       $a0, %hi(wMapTexName)
/* 35C2C 8005A82C 24840CF0 */  addiu     $a0, $a0, %lo(wMapTexName)
/* 35C30 8005A830 3C05800A */  lui       $a1, %hi(D_80098A24)
/* 35C34 8005A834 24A58A24 */  addiu     $a1, $a1, %lo(D_80098A24)
/* 35C38 8005A838 27A60018 */  addiu     $a2, $sp, 0x18
/* 35C3C 8005A83C 0C01953C */  jal       sprintf
/* 35C40 8005A840 A3A0001B */   sb       $zero, 0x1B($sp)
/* 35C44 8005A844 8E450014 */  lw        $a1, 0x14($s2)
/* 35C48 8005A848 3C01800A */  lui       $at, %hi(gMap)
/* 35C4C 8005A84C AC3241E0 */  sw        $s2, %lo(gMap)($at)
/* 35C50 8005A850 10A00005 */  beqz      $a1, .L8005A868
/* 35C54 8005A854 00000000 */   nop
/* 35C58 8005A858 3C04800E */  lui       $a0, %hi(wMapBgName)
/* 35C5C 8005A85C 24849668 */  addiu     $a0, $a0, %lo(wMapBgName)
/* 35C60 8005A860 0C01BB50 */  jal       strcpy
/* 35C64 8005A864 00000000 */   nop
.L8005A868:
/* 35C68 8005A868 0C0169B0 */  jal       load_map_script_lib
/* 35C6C 8005A86C 00000000 */   nop
/* 35C70 8005A870 8E440008 */  lw        $a0, 0x8($s2)
/* 35C74 8005A874 10800004 */  beqz      $a0, .L8005A888
/* 35C78 8005A878 00000000 */   nop
/* 35C7C 8005A87C 8E45000C */  lw        $a1, 0xC($s2)
/* 35C80 8005A880 0C00A5CF */  jal       dma_copy
/* 35C84 8005A884 8E460010 */   lw       $a2, 0x10($s2)
.L8005A888:
/* 35C88 8005A888 8E420004 */  lw        $v0, 0x4($s2)
/* 35C8C 8005A88C 3C03800A */  lui       $v1, %hi(gMapSettings)
/* 35C90 8005A890 246341E8 */  addiu     $v1, $v1, %lo(gMapSettings)
/* 35C94 8005A894 24440040 */  addiu     $a0, $v0, 0x40
.L8005A898:
/* 35C98 8005A898 8C480000 */  lw        $t0, 0x0($v0)
/* 35C9C 8005A89C 8C490004 */  lw        $t1, 0x4($v0)
/* 35CA0 8005A8A0 8C4A0008 */  lw        $t2, 0x8($v0)
/* 35CA4 8005A8A4 8C4B000C */  lw        $t3, 0xC($v0)
/* 35CA8 8005A8A8 AC680000 */  sw        $t0, 0x0($v1)
/* 35CAC 8005A8AC AC690004 */  sw        $t1, 0x4($v1)
/* 35CB0 8005A8B0 AC6A0008 */  sw        $t2, 0x8($v1)
/* 35CB4 8005A8B4 AC6B000C */  sw        $t3, 0xC($v1)
/* 35CB8 8005A8B8 24420010 */  addiu     $v0, $v0, 0x10
/* 35CBC 8005A8BC 1444FFF6 */  bne       $v0, $a0, .L8005A898
/* 35CC0 8005A8C0 24630010 */   addiu    $v1, $v1, 0x10
/* 35CC4 8005A8C4 8E420018 */  lw        $v0, 0x18($s2)
/* 35CC8 8005A8C8 3C13800A */  lui       $s3, %hi(gMapSettings)
/* 35CCC 8005A8CC 267341E8 */  addiu     $s3, $s3, %lo(gMapSettings)
/* 35CD0 8005A8D0 10400004 */  beqz      $v0, .L8005A8E4
/* 35CD4 8005A8D4 00000000 */   nop
/* 35CD8 8005A8D8 0040F809 */  jalr      $v0
/* 35CDC 8005A8DC 00000000 */   nop
/* 35CE0 8005A8E0 0040A02D */  daddu     $s4, $v0, $zero
.L8005A8E4:
/* 35CE4 8005A8E4 16800015 */  bnez      $s4, .L8005A93C
/* 35CE8 8005A8E8 00000000 */   nop
/* 35CEC 8005A8EC 3C04800E */  lui       $a0, %hi(wMapShapeName)
/* 35CF0 8005A8F0 24849230 */  addiu     $a0, $a0, %lo(wMapShapeName)
/* 35CF4 8005A8F4 0C016B3A */  jal       load_asset_by_name
/* 35CF8 8005A8F8 27A50030 */   addiu    $a1, $sp, 0x30
/* 35CFC 8005A8FC 0040882D */  daddu     $s1, $v0, $zero
/* 35D00 8005A900 0220202D */  daddu     $a0, $s1, $zero
/* 35D04 8005A904 3C108021 */  lui       $s0, %hi(gMapShapeData)
/* 35D08 8005A908 26100000 */  addiu     $s0, $s0, %lo(gMapShapeData)
/* 35D0C 8005A90C 0C01BB7C */  jal       decode_yay0
/* 35D10 8005A910 0200282D */   daddu    $a1, $s0, $zero
/* 35D14 8005A914 0C00AB1E */  jal       general_heap_free
/* 35D18 8005A918 0220202D */   daddu    $a0, $s1, $zero
/* 35D1C 8005A91C 8E020000 */  lw        $v0, 0x0($s0)
/* 35D20 8005A920 8E030008 */  lw        $v1, 0x8($s0)
/* 35D24 8005A924 8E04000C */  lw        $a0, 0xC($s0)
/* 35D28 8005A928 8E050010 */  lw        $a1, 0x10($s0)
/* 35D2C 8005A92C AE620000 */  sw        $v0, 0x0($s3)
/* 35D30 8005A930 AE630028 */  sw        $v1, 0x28($s3)
/* 35D34 8005A934 AE64002C */  sw        $a0, 0x2C($s3)
/* 35D38 8005A938 AE650030 */  sw        $a1, 0x30($s3)
.L8005A93C:
/* 35D3C 8005A93C 8E420014 */  lw        $v0, 0x14($s2)
/* 35D40 8005A940 10400005 */  beqz      $v0, .L8005A958
/* 35D44 8005A944 00000000 */   nop
/* 35D48 8005A948 3C04800E */  lui       $a0, %hi(wMapBgName)
/* 35D4C 8005A94C 24849668 */  addiu     $a0, $a0, %lo(wMapBgName)
/* 35D50 8005A950 0C05175C */  jal       load_map_bg
/* 35D54 8005A954 00000000 */   nop
.L8005A958:
/* 35D58 8005A958 0C00B458 */  jal       load_obfuscation_shims
/* 35D5C 8005A95C 00000000 */   nop
/* 35D60 8005A960 0C0AC81E */  jal       shim_general_heap_create_obfuscated
/* 35D64 8005A964 00000000 */   nop
/* 35D68 8005A968 0C05259C */  jal       sfx_clear_env_sounds
/* 35D6C 8005A96C 0000202D */   daddu    $a0, $zero, $zero
/* 35D70 8005A970 0C048C2E */  jal       clear_worker_list
/* 35D74 8005A974 00000000 */   nop
/* 35D78 8005A978 0C0B0C77 */  jal       clear_script_list
/* 35D7C 8005A97C 00000000 */   nop
/* 35D80 8005A980 0C00B7BD */  jal       create_cameras_a
/* 35D84 8005A984 00000000 */   nop
/* 35D88 8005A988 3C108007 */  lui       $s0, %hi(gGameStatusPtr)
/* 35D8C 8005A98C 2610419C */  addiu     $s0, $s0, %lo(gGameStatusPtr)
/* 35D90 8005A990 8E020000 */  lw        $v0, 0x0($s0)
/* 35D94 8005A994 0C0B763E */  jal       spr_init_sprites
/* 35D98 8005A998 80440084 */   lb       $a0, 0x84($v0)
/* 35D9C 8005A99C 0C047889 */  jal       clear_animator_list
/* 35DA0 8005A9A0 00000000 */   nop
/* 35DA4 8005A9A4 0C0482EC */  jal       clear_entity_models
/* 35DA8 8005A9A8 00000000 */   nop
/* 35DAC 8005A9AC 0C00E12F */  jal       clear_npcs
/* 35DB0 8005A9B0 00000000 */   nop
/* 35DB4 8005A9B4 0C050440 */  jal       hud_element_clear_cache
/* 35DB8 8005A9B8 00000000 */   nop
/* 35DBC 8005A9BC 0C0515A0 */  jal       clear_trigger_data
/* 35DC0 8005A9C0 00000000 */   nop
/* 35DC4 8005A9C4 0C045751 */  jal       clear_model_data
/* 35DC8 8005A9C8 00000000 */   nop
/* 35DCC 8005A9CC 0C052010 */  jal       clear_sprite_shading_data
/* 35DD0 8005A9D0 00000000 */   nop
/* 35DD4 8005A9D4 0C05177E */  jal       reset_background_settings
/* 35DD8 8005A9D8 00000000 */   nop
/* 35DDC 8005A9DC 8E020000 */  lw        $v0, 0x0($s0)
/* 35DE0 8005A9E0 804300A8 */  lb        $v1, 0xA8($v0)
/* 35DE4 8005A9E4 2402FFFF */  addiu     $v0, $zero, -0x1
/* 35DE8 8005A9E8 14620003 */  bne       $v1, $v0, .L8005A9F8
/* 35DEC 8005A9EC 00000000 */   nop
/* 35DF0 8005A9F0 0C04E062 */  jal       func_80138188
/* 35DF4 8005A9F4 00000000 */   nop
.L8005A9F8:
/* 35DF8 8005A9F8 16800005 */  bnez      $s4, .L8005AA10
/* 35DFC 8005A9FC 00000000 */   nop
/* 35E00 8005AA00 0C016BE5 */  jal       initialize_collision
/* 35E04 8005AA04 00000000 */   nop
/* 35E08 8005AA08 0C016BF0 */  jal       load_map_hit_asset
/* 35E0C 8005AA0C 00000000 */   nop
.L8005AA10:
/* 35E10 8005AA10 0C01CACC */  jal       reset_battle_status
/* 35E14 8005AA14 00000000 */   nop
/* 35E18 8005AA18 0C00F900 */  jal       clear_encounter_status
/* 35E1C 8005AA1C 00000000 */   nop
/* 35E20 8005AA20 0C04432E */  jal       clear_entity_data
/* 35E24 8005AA24 24040001 */   addiu    $a0, $zero, 0x1
/* 35E28 8005AA28 0C016727 */  jal       clear_effect_data
/* 35E2C 8005AA2C 00000000 */   nop
/* 35E30 8005AA30 0C037F14 */  jal       clear_player_status
/* 35E34 8005AA34 00000000 */   nop
/* 35E38 8005AA38 0C037F1D */  jal       player_reset_data
/* 35E3C 8005AA3C 00000000 */   nop
/* 35E40 8005AA40 0C03AD1D */  jal       partner_reset_data
/* 35E44 8005AA44 00000000 */   nop
/* 35E48 8005AA48 0C048D9D */  jal       clear_printers
/* 35E4C 8005AA4C 00000000 */   nop
/* 35E50 8005AA50 0C04C3FC */  jal       clear_item_entity_data
/* 35E54 8005AA54 00000000 */   nop
/* 35E58 8005AA58 3C028011 */  lui       $v0, %hi(gPlayerStatus)
/* 35E5C 8005AA5C 2442EFC8 */  addiu     $v0, $v0, %lo(gPlayerStatus)
/* 35E60 8005AA60 C4400084 */  lwc1      $f0, 0x84($v0)
/* 35E64 8005AA64 E4400080 */  swc1      $f0, 0x80($v0)
/* 35E68 8005AA68 8E42001C */  lw        $v0, 0x1C($s2)
/* 35E6C 8005AA6C 30420003 */  andi      $v0, $v0, 0x3
/* 35E70 8005AA70 00021080 */  sll       $v0, $v0, 2
/* 35E74 8005AA74 3C048009 */  lui       $a0, %hi(WorldReverbModeMapping)
/* 35E78 8005AA78 00822021 */  addu      $a0, $a0, $v0
/* 35E7C 8005AA7C 0C0525FF */  jal       sfx_set_reverb_mode
/* 35E80 8005AA80 8C84FF60 */   lw       $a0, %lo(WorldReverbModeMapping)($a0)
/* 35E84 8005AA84 0C052580 */  jal       sfx_reset_door_sounds
/* 35E88 8005AA88 00000000 */   nop
/* 35E8C 8005AA8C 1680000B */  bnez      $s4, .L8005AABC
/* 35E90 8005AA90 00000000 */   nop
/* 35E94 8005AA94 3C04800B */  lui       $a0, %hi(wMapTexName)
/* 35E98 8005AA98 24840CF0 */  addiu     $a0, $a0, %lo(wMapTexName)
/* 35E9C 8005AA9C 0C016B74 */  jal       get_asset_offset
/* 35EA0 8005AAA0 27A50030 */   addiu    $a1, $sp, 0x30
/* 35EA4 8005AAA4 8E640000 */  lw        $a0, 0x0($s3)
/* 35EA8 8005AAA8 10800004 */  beqz      $a0, .L8005AABC
/* 35EAC 8005AAAC 00000000 */   nop
/* 35EB0 8005AAB0 8FA60030 */  lw        $a2, 0x30($sp)
/* 35EB4 8005AAB4 0C046B52 */  jal       load_data_for_models
/* 35EB8 8005AAB8 0040282D */   daddu    $a1, $v0, $zero
.L8005AABC:
/* 35EBC 8005AABC 8E640038 */  lw        $a0, 0x38($s3)
/* 35EC0 8005AAC0 50800005 */  beql      $a0, $zero, .L8005AAD8
/* 35EC4 8005AAC4 24040128 */   addiu    $a0, $zero, 0x128
/* 35EC8 8005AAC8 0C05178A */  jal       read_background_size
/* 35ECC 8005AACC 00000000 */   nop
/* 35ED0 8005AAD0 08016ABA */  j         .L8005AAE8
/* 35ED4 8005AAD4 00000000 */   nop
.L8005AAD8:
/* 35ED8 8005AAD8 240500C8 */  addiu     $a1, $zero, 0xC8
/* 35EDC 8005AADC 2406000C */  addiu     $a2, $zero, 0xC
/* 35EE0 8005AAE0 0C05179C */  jal       set_background_size
/* 35EE4 8005AAE4 24070014 */   addiu    $a3, $zero, 0x14
.L8005AAE8:
/* 35EE8 8005AAE8 3C04800B */  lui       $a0, %hi(gCameras)
/* 35EEC 8005AAEC 24841D80 */  addiu     $a0, $a0, %lo(gCameras)
/* 35EF0 8005AAF0 94820000 */  lhu       $v0, 0x0($a0)
/* 35EF4 8005AAF4 94830AB0 */  lhu       $v1, 0xAB0($a0)
/* 35EF8 8005AAF8 3C018007 */  lui       $at, %hi(gCurrentCameraID)
/* 35EFC 8005AAFC AC207410 */  sw        $zero, %lo(gCurrentCameraID)($at)
/* 35F00 8005AB00 34420002 */  ori       $v0, $v0, 0x2
/* 35F04 8005AB04 A4820000 */  sh        $v0, 0x0($a0)
/* 35F08 8005AB08 94820558 */  lhu       $v0, 0x558($a0)
/* 35F0C 8005AB0C 34630002 */  ori       $v1, $v1, 0x2
/* 35F10 8005AB10 A4830AB0 */  sh        $v1, 0xAB0($a0)
/* 35F14 8005AB14 34420002 */  ori       $v0, $v0, 0x2
/* 35F18 8005AB18 A4820558 */  sh        $v0, 0x558($a0)
/* 35F1C 8005AB1C 94821008 */  lhu       $v0, 0x1008($a0)
/* 35F20 8005AB20 3C038007 */  lui       $v1, %hi(gGameStatusPtr)
/* 35F24 8005AB24 8C63419C */  lw        $v1, %lo(gGameStatusPtr)($v1)
/* 35F28 8005AB28 34420002 */  ori       $v0, $v0, 0x2
/* 35F2C 8005AB2C A4821008 */  sh        $v0, 0x1008($a0)
/* 35F30 8005AB30 806300A8 */  lb        $v1, 0xA8($v1)
/* 35F34 8005AB34 2402FFFF */  addiu     $v0, $zero, -0x1
/* 35F38 8005AB38 14620008 */  bne       $v1, $v0, .L8005AB5C
/* 35F3C 8005AB3C 240200A2 */   addiu    $v0, $zero, 0xA2
/* 35F40 8005AB40 240200C8 */  addiu     $v0, $zero, 0xC8
/* 35F44 8005AB44 AFA20010 */  sw        $v0, 0x10($sp)
/* 35F48 8005AB48 0000202D */  daddu     $a0, $zero, $zero
/* 35F4C 8005AB4C 2405000C */  addiu     $a1, $zero, 0xC
/* 35F50 8005AB50 24060014 */  addiu     $a2, $zero, 0x14
/* 35F54 8005AB54 08016ADC */  j         .L8005AB70
/* 35F58 8005AB58 24070128 */   addiu    $a3, $zero, 0x128
.L8005AB5C:
/* 35F5C 8005AB5C AFA20010 */  sw        $v0, 0x10($sp)
/* 35F60 8005AB60 0000202D */  daddu     $a0, $zero, $zero
/* 35F64 8005AB64 2405001D */  addiu     $a1, $zero, 0x1D
/* 35F68 8005AB68 2406001C */  addiu     $a2, $zero, 0x1C
/* 35F6C 8005AB6C 24070106 */  addiu     $a3, $zero, 0x106
.L8005AB70:
/* 35F70 8005AB70 0C00B8C5 */  jal       set_cam_viewport
/* 35F74 8005AB74 00000000 */   nop
/* 35F78 8005AB78 0C039E4D */  jal       initialize_status_bar
/* 35F7C 8005AB7C 00000000 */   nop
/* 35F80 8005AB80 0000282D */  daddu     $a1, $zero, $zero
/* 35F84 8005AB84 00A0302D */  daddu     $a2, $a1, $zero
/* 35F88 8005AB88 3C108007 */  lui       $s0, %hi(gGameStatusPtr)
/* 35F8C 8005AB8C 2610419C */  addiu     $s0, $s0, %lo(gGameStatusPtr)
/* 35F90 8005AB90 8E030000 */  lw        $v1, 0x0($s0)
/* 35F94 8005AB94 240203E8 */  addiu     $v0, $zero, 0x3E8
/* 35F98 8005AB98 A4620090 */  sh        $v0, 0x90($v1)
/* 35F9C 8005AB9C A4620092 */  sh        $v0, 0x92($v1)
/* 35FA0 8005ABA0 8E640010 */  lw        $a0, 0x10($s3)
/* 35FA4 8005ABA4 0C0B0D74 */  jal       start_script_in_group
/* 35FA8 8005ABA8 00A0382D */   daddu    $a3, $a1, $zero
/* 35FAC 8005ABAC 8E030000 */  lw        $v1, 0x0($s0)
/* 35FB0 8005ABB0 8C420144 */  lw        $v0, 0x144($v0)
/* 35FB4 8005ABB4 AC62006C */  sw        $v0, 0x6C($v1)
/* 35FB8 8005ABB8 8FBF004C */  lw        $ra, 0x4C($sp)
/* 35FBC 8005ABBC 8FB40048 */  lw        $s4, 0x48($sp)
/* 35FC0 8005ABC0 8FB30044 */  lw        $s3, 0x44($sp)
/* 35FC4 8005ABC4 8FB20040 */  lw        $s2, 0x40($sp)
/* 35FC8 8005ABC8 8FB1003C */  lw        $s1, 0x3C($sp)
/* 35FCC 8005ABCC 8FB00038 */  lw        $s0, 0x38($sp)
/* 35FD0 8005ABD0 03E00008 */  jr        $ra
/* 35FD4 8005ABD4 27BD0050 */   addiu    $sp, $sp, 0x50

### DECOMPILED C INSTRUCTIONS:

void load_map_by_IDs(s16 areaID, s16 mapID, s16 loadType) {
    s32 skipLoadingAssets = 0;
    MapConfig* mapConfig;
    MapSettings* mapSettings;
    char texStr[17];
    s32 decompressedSize;

    sfx_stop_env_sounds();
    gOverrideFlags &= ~GLOBAL_OVERRIDES_40;
    gOverrideFlags &= ~GLOBAL_OVERRIDES_ENABLE_FLOOR_REFLECTION;

    gGameStatusPtr->playerSpriteSet = PLAYER_SPRITES_MARIO_WORLD;

#if VERSION_IQUE
    general_heap_create();
#else
    load_obfuscation_shims();
    shim_general_heap_create_obfuscated();
#endif

#if VERSION_JP
    reset_max_rumble_duration();
#endif
    clear_render_tasks();
    clear_worker_list();
    clear_script_list();

    switch (loadType) {
        case LOAD_FROM_MAP:
            clear_area_flags();
            gGameStatusPtr->loadType = LOAD_FROM_MAP;
            break;
        case LOAD_FROM_FILE_SELECT:
            fio_deserialize_state();
            areaID = gGameStatusPtr->areaID;
            mapID = gGameStatusPtr->mapID;
            gGameStatusPtr->prevArea = areaID;
            gGameStatusPtr->loadType = LOAD_FROM_FILE_SELECT;
            break;
    }

    gGameStatusPtr->mapShop = NULL;

    mapConfig = &gAreas[areaID].maps[mapID];

    sprintf(wMapShapeName, "%s_shape", mapConfig->id);
    sprintf(wMapHitName, "%s_hit", mapConfig->id);
    strcpy(texStr, mapConfig->id);
    texStr[3] = '\0';
    sprintf(wMapTexName, "%s_tex", texStr);

    gMapConfig = mapConfig;
    if (mapConfig->bgName != NULL) {
        strcpy(wMapBgName, mapConfig->bgName);
    }
    load_map_script_lib();

    if (mapConfig->dmaStart != NULL) {
        dma_copy(mapConfig->dmaStart, mapConfig->dmaEnd, mapConfig->dmaDest);
    }

    gMapSettings = *mapConfig->settings;

    mapSettings = &gMapSettings;
    if (mapConfig->init != NULL) {
        skipLoadingAssets = mapConfig->init();
    }

    if (!skipLoadingAssets) {
        ShapeFile* shapeFile = &gMapShapeData;
        void* yay0Asset = load_asset_by_name(wMapShapeName, &decompressedSize);

        decode_yay0(yay0Asset, shapeFile);
        general_heap_free(yay0Asset);

        mapSettings->modelTreeRoot = shapeFile->header.root;
        mapSettings->modelNameList = shapeFile->header.modelNames;
        mapSettings->colliderNameList = shapeFile->header.colliderNames;
        mapSettings->zoneNameList = shapeFile->header.zoneNames;
    }

    if (mapConfig->bgName != NULL) {
        load_map_bg(wMapBgName);
    }

#if VERSION_IQUE
    general_heap_create();
#else
    load_obfuscation_shims();
    shim_general_heap_create_obfuscated();
#endif

    sfx_clear_env_sounds(0);
    clear_worker_list();
    clear_script_list();
    create_cameras_a();
    spr_init_sprites(gGameStatusPtr->playerSpriteSet);
    clear_animator_list();
    clear_entity_models();
    clear_npcs();
    hud_element_clear_cache();
    clear_trigger_data();
    clear_model_data();
    clear_sprite_shading_data();
    reset_background_settings();

    if (gGameStatusPtr->creditsViewportMode == -1) {
        func_80138188();
    }

    if (!skipLoadingAssets) {
        initialize_collision();
        load_map_hit_asset();
    }

    reset_battle_status();
    clear_encounter_status();
    clear_entity_data(1);
    clear_effect_data();
    clear_player_status();
    player_reset_data();
    partner_reset_data();
    clear_printers();
    clear_item_entity_data();

    gPlayerStatus.targetYaw = gPlayerStatus.currentYaw;

    sfx_set_reverb_mode(WorldReverbModeMapping[*(s32*)mapConfig->unk_1C & 0x3]);
    sfx_reset_door_sounds();

    if (!skipLoadingAssets) {
        s32 thing = get_asset_offset(wMapTexName, &decompressedSize);

        if (mapSettings->modelTreeRoot != NULL) {
            load_data_for_models(mapSettings->modelTreeRoot, thing, decompressedSize);
        }
    }

    if (mapSettings->background != NULL) {
        read_background_size(mapSettings->background);
    } else {
        set_background_size(296, 200, 12, 20);
    }

    gCurrentCameraID = CAM_DEFAULT;
    gCameras[CAM_DEFAULT].flags |= CAMERA_FLAG_DISABLED;
    gCameras[CAM_BATTLE].flags |= CAMERA_FLAG_DISABLED;
    gCameras[CAM_TATTLE].flags |= CAMERA_FLAG_DISABLED;
    gCameras[CAM_3].flags |= CAMERA_FLAG_DISABLED;

    if (gGameStatusPtr->creditsViewportMode == -1) {
        set_cam_viewport(0, 12, 20, 296, 200);
    } else {
        set_cam_viewport(0, 29, 28, 262, 162);
    }

    initialize_status_bar();
    gGameStatusPtr->unk_90 = 1000;
    gGameStatusPtr->unk_92 = 1000;
    gGameStatusPtr->mainScriptID = start_script_in_group(mapSettings->main, EVT_PRIORITY_0, 0, 0)->id;
}