papermario/asm/nonmatchings/code_16c8e0/func_80244008.s
2020-08-12 22:37:16 -04:00

510 lines
23 KiB
ArmAsm

.set noat # allow manual use of $at
.set noreorder # don't insert nops after branches
glabel func_80244008
/* 1728E8 80244008 27BDFFB0 */ addiu $sp, $sp, -0x50
/* 1728EC 8024400C AFB30024 */ sw $s3, 0x24($sp)
/* 1728F0 80244010 3C13800E */ lui $s3, 0x800e
/* 1728F4 80244014 2673C070 */ addiu $s3, $s3, -0x3f90
/* 1728F8 80244018 AFB60030 */ sw $s6, 0x30($sp)
/* 1728FC 8024401C 3C16800B */ lui $s6, 0x800b
/* 172900 80244020 26D60F10 */ addiu $s6, $s6, 0xf10
/* 172904 80244024 AFB5002C */ sw $s5, 0x2c($sp)
/* 172908 80244028 3C158011 */ lui $s5, 0x8011
/* 17290C 8024402C 26B5F290 */ addiu $s5, $s5, -0xd70
/* 172910 80244030 AFB20020 */ sw $s2, 0x20($sp)
/* 172914 80244034 3C12800E */ lui $s2, 0x800e
/* 172918 80244038 2652C4DC */ addiu $s2, $s2, -0x3b24
/* 17291C 8024403C AFBF0034 */ sw $ra, 0x34($sp)
/* 172920 80244040 AFB40028 */ sw $s4, 0x28($sp)
/* 172924 80244044 AFB1001C */ sw $s1, 0x1c($sp)
/* 172928 80244048 AFB00018 */ sw $s0, 0x18($sp)
/* 17292C 8024404C F7B80048 */ sdc1 $f24, 0x48($sp)
/* 172930 80244050 F7B60040 */ sdc1 $f22, 0x40($sp)
/* 172934 80244054 F7B40038 */ sdc1 $f20, 0x38($sp)
/* 172938 80244058 8E7100D8 */ lw $s1, 0xd8($s3)
/* 17293C 8024405C 8E430000 */ lw $v1, ($s2)
/* 172940 80244060 8E7000DC */ lw $s0, 0xdc($s3)
/* 172944 80244064 10600005 */ beqz $v1, .L8024407C
/* 172948 80244068 24020001 */ addiu $v0, $zero, 1
/* 17294C 8024406C 10620024 */ beq $v1, $v0, .L80244100
/* 172950 80244070 24020005 */ addiu $v0, $zero, 5
/* 172954 80244074 0809104B */ j .L8024412C
/* 172958 80244078 00000000 */ nop
.L8024407C:
/* 17295C 8024407C 3C03F3FF */ lui $v1, 0xf3ff
/* 172960 80244080 8E220000 */ lw $v0, ($s1)
/* 172964 80244084 3463FFFF */ ori $v1, $v1, 0xffff
/* 172968 80244088 00431024 */ and $v0, $v0, $v1
/* 17296C 8024408C 12000004 */ beqz $s0, .L802440A0
/* 172970 80244090 AE220000 */ sw $v0, ($s1)
/* 172974 80244094 8E020000 */ lw $v0, ($s0)
/* 172978 80244098 00431024 */ and $v0, $v0, $v1
/* 17297C 8024409C AE020000 */ sw $v0, ($s0)
.L802440A0:
/* 172980 802440A0 8262009A */ lb $v0, 0x9a($s3)
/* 172984 802440A4 14400003 */ bnez $v0, .L802440B4
/* 172988 802440A8 A260008C */ sb $zero, 0x8c($s3)
/* 17298C 802440AC 08091046 */ j .L80244118
/* 172990 802440B0 24020005 */ addiu $v0, $zero, 5
.L802440B4:
/* 172994 802440B4 18400003 */ blez $v0, .L802440C4
/* 172998 802440B8 24020001 */ addiu $v0, $zero, 1
/* 17299C 802440BC 3C01802A */ lui $at, 0x802a
/* 1729A0 802440C0 AC22F254 */ sw $v0, -0xdac($at)
.L802440C4:
/* 1729A4 802440C4 2405000A */ addiu $a1, $zero, 0xa
/* 1729A8 802440C8 2402000C */ addiu $v0, $zero, 0xc
/* 1729AC 802440CC A26201A7 */ sb $v0, 0x1a7($s3)
/* 1729B0 802440D0 8E0401CC */ lw $a0, 0x1cc($s0)
/* 1729B4 802440D4 0C0B0CF8 */ jal start_script
/* 1729B8 802440D8 0000302D */ daddu $a2, $zero, $zero
/* 1729BC 802440DC 0040202D */ daddu $a0, $v0, $zero
/* 1729C0 802440E0 AE0401DC */ sw $a0, 0x1dc($s0)
/* 1729C4 802440E4 8C830144 */ lw $v1, 0x144($a0)
/* 1729C8 802440E8 24020001 */ addiu $v0, $zero, 1
/* 1729CC 802440EC AE420000 */ sw $v0, ($s2)
/* 1729D0 802440F0 24020100 */ addiu $v0, $zero, 0x100
/* 1729D4 802440F4 AE0301EC */ sw $v1, 0x1ec($s0)
/* 1729D8 802440F8 08091047 */ j .L8024411C
/* 1729DC 802440FC AC820148 */ sw $v0, 0x148($a0)
.L80244100:
/* 1729E0 80244100 8E0401EC */ lw $a0, 0x1ec($s0)
/* 1729E4 80244104 0C0B1059 */ jal does_script_exist
/* 1729E8 80244108 00000000 */ nop
/* 1729EC 8024410C 14400003 */ bnez $v0, .L8024411C
/* 1729F0 80244110 24020005 */ addiu $v0, $zero, 5
/* 1729F4 80244114 A260009A */ sb $zero, 0x9a($s3)
.L80244118:
/* 1729F8 80244118 AE420000 */ sw $v0, ($s2)
.L8024411C:
.L8024411C:
/* 1729FC 8024411C 3C12800E */ lui $s2, 0x800e
/* 172A00 80244120 2652C4DC */ addiu $s2, $s2, -0x3b24
/* 172A04 80244124 8E430000 */ lw $v1, ($s2)
/* 172A08 80244128 24020005 */ addiu $v0, $zero, 5
.L8024412C:
/* 172A0C 8024412C 10620005 */ beq $v1, $v0, .L80244144
/* 172A10 80244130 2402000A */ addiu $v0, $zero, 0xa
/* 172A14 80244134 10620040 */ beq $v1, $v0, .L80244238
/* 172A18 80244138 00000000 */ nop
/* 172A1C 8024413C 080910A3 */ j .L8024428C
/* 172A20 80244140 00000000 */ nop
.L80244144:
/* 172A24 80244144 3C03F3FF */ lui $v1, 0xf3ff
/* 172A28 80244148 8E220000 */ lw $v0, ($s1)
/* 172A2C 8024414C 3463FFFF */ ori $v1, $v1, 0xffff
/* 172A30 80244150 00431024 */ and $v0, $v0, $v1
/* 172A34 80244154 12000004 */ beqz $s0, .L80244168
/* 172A38 80244158 AE220000 */ sw $v0, ($s1)
/* 172A3C 8024415C 8E020000 */ lw $v0, ($s0)
/* 172A40 80244160 00431024 */ and $v0, $v0, $v1
/* 172A44 80244164 AE020000 */ sw $v0, ($s0)
.L80244168:
/* 172A48 80244168 2402000B */ addiu $v0, $zero, 0xb
/* 172A4C 8024416C 3C05800E */ lui $a1, 0x800e
/* 172A50 80244170 24A5C070 */ addiu $a1, $a1, -0x3f90
/* 172A54 80244174 2403FFFD */ addiu $v1, $zero, -3
/* 172A58 80244178 2406FFF7 */ addiu $a2, $zero, -9
/* 172A5C 8024417C AE420000 */ sw $v0, ($s2)
/* 172A60 80244180 8CA20004 */ lw $v0, 4($a1)
/* 172A64 80244184 2404FFEF */ addiu $a0, $zero, -0x11
/* 172A68 80244188 00431024 */ and $v0, $v0, $v1
/* 172A6C 8024418C 2403FFFB */ addiu $v1, $zero, -5
/* 172A70 80244190 00431024 */ and $v0, $v0, $v1
/* 172A74 80244194 00461024 */ and $v0, $v0, $a2
/* 172A78 80244198 8CA30000 */ lw $v1, ($a1)
/* 172A7C 8024419C 00441024 */ and $v0, $v0, $a0
/* 172A80 802441A0 ACA20004 */ sw $v0, 4($a1)
/* 172A84 802441A4 00661824 */ and $v1, $v1, $a2
/* 172A88 802441A8 ACA30000 */ sw $v1, ($a1)
/* 172A8C 802441AC 82220216 */ lb $v0, 0x216($s1)
/* 172A90 802441B0 2414000D */ addiu $s4, $zero, 0xd
/* 172A94 802441B4 14540005 */ bne $v0, $s4, .L802441CC
/* 172A98 802441B8 00000000 */ nop
/* 172A9C 802441BC 0C09C596 */ jal dispatch_event_player
/* 172AA0 802441C0 24040034 */ addiu $a0, $zero, 0x34
/* 172AA4 802441C4 2402000A */ addiu $v0, $zero, 0xa
/* 172AA8 802441C8 AE420000 */ sw $v0, ($s2)
.L802441CC:
/* 172AAC 802441CC 8E220440 */ lw $v0, 0x440($s1)
/* 172AB0 802441D0 A2200210 */ sb $zero, 0x210($s1)
/* 172AB4 802441D4 A2200212 */ sb $zero, 0x212($s1)
/* 172AB8 802441D8 A2200214 */ sb $zero, 0x214($s1)
/* 172ABC 802441DC A2200218 */ sb $zero, 0x218($s1)
/* 172AC0 802441E0 A2200216 */ sb $zero, 0x216($s1)
/* 172AC4 802441E4 A2200217 */ sb $zero, 0x217($s1)
/* 172AC8 802441E8 8C42000C */ lw $v0, 0xc($v0)
/* 172ACC 802441EC 12000027 */ beqz $s0, .L8024428C
/* 172AD0 802441F0 AC40003C */ sw $zero, 0x3c($v0)
/* 172AD4 802441F4 82020216 */ lb $v0, 0x216($s0)
/* 172AD8 802441F8 14540005 */ bne $v0, $s4, .L80244210
/* 172ADC 802441FC 00000000 */ nop
/* 172AE0 80244200 0C09F7A0 */ jal dispatch_event_partner
/* 172AE4 80244204 24040034 */ addiu $a0, $zero, 0x34
/* 172AE8 80244208 2402000A */ addiu $v0, $zero, 0xa
/* 172AEC 8024420C AE420000 */ sw $v0, ($s2)
.L80244210:
/* 172AF0 80244210 8E020440 */ lw $v0, 0x440($s0)
/* 172AF4 80244214 A2000210 */ sb $zero, 0x210($s0)
/* 172AF8 80244218 A2000212 */ sb $zero, 0x212($s0)
/* 172AFC 8024421C A2000214 */ sb $zero, 0x214($s0)
/* 172B00 80244220 A2000218 */ sb $zero, 0x218($s0)
/* 172B04 80244224 A2000216 */ sb $zero, 0x216($s0)
/* 172B08 80244228 A2000217 */ sb $zero, 0x217($s0)
/* 172B0C 8024422C 8C42000C */ lw $v0, 0xc($v0)
/* 172B10 80244230 080910A3 */ j .L8024428C
/* 172B14 80244234 AC40003C */ sw $zero, 0x3c($v0)
.L80244238:
/* 172B18 80244238 8E2201D8 */ lw $v0, 0x1d8($s1)
/* 172B1C 8024423C 10400005 */ beqz $v0, .L80244254
/* 172B20 80244240 00000000 */ nop
/* 172B24 80244244 0C0B1059 */ jal does_script_exist
/* 172B28 80244248 8E2401E8 */ lw $a0, 0x1e8($s1)
/* 172B2C 8024424C 1440000F */ bnez $v0, .L8024428C
/* 172B30 80244250 00000000 */ nop
.L80244254:
/* 172B34 80244254 1200000A */ beqz $s0, .L80244280
/* 172B38 80244258 AE2001D8 */ sw $zero, 0x1d8($s1)
/* 172B3C 8024425C 8E0201D8 */ lw $v0, 0x1d8($s0)
/* 172B40 80244260 50400007 */ beql $v0, $zero, .L80244280
/* 172B44 80244264 AE0001D8 */ sw $zero, 0x1d8($s0)
/* 172B48 80244268 8E0401E8 */ lw $a0, 0x1e8($s0)
/* 172B4C 8024426C 0C0B1059 */ jal does_script_exist
/* 172B50 80244270 00000000 */ nop
/* 172B54 80244274 14400005 */ bnez $v0, .L8024428C
/* 172B58 80244278 00000000 */ nop
/* 172B5C 8024427C AE0001D8 */ sw $zero, 0x1d8($s0)
.L80244280:
/* 172B60 80244280 2402000B */ addiu $v0, $zero, 0xb
/* 172B64 80244284 3C01800E */ lui $at, 0x800e
/* 172B68 80244288 AC22C4DC */ sw $v0, -0x3b24($at)
.L8024428C:
.L8024428C:
/* 172B6C 8024428C 3C04800E */ lui $a0, 0x800e
/* 172B70 80244290 2484C4DC */ addiu $a0, $a0, -0x3b24
/* 172B74 80244294 8C830000 */ lw $v1, ($a0)
/* 172B78 80244298 2402000B */ addiu $v0, $zero, 0xb
/* 172B7C 8024429C 14620017 */ bne $v1, $v0, .L802442FC
/* 172B80 802442A0 00000000 */ nop
/* 172B84 802442A4 12000006 */ beqz $s0, .L802442C0
/* 172B88 802442A8 3C030010 */ lui $v1, 0x10
/* 172B8C 802442AC 3C02800E */ lui $v0, 0x800e
/* 172B90 802442B0 8C42C070 */ lw $v0, -0x3f90($v0)
/* 172B94 802442B4 00431024 */ and $v0, $v0, $v1
/* 172B98 802442B8 14400004 */ bnez $v0, .L802442CC
/* 172B9C 802442BC 2402000C */ addiu $v0, $zero, 0xc
.L802442C0:
/* 172BA0 802442C0 24020002 */ addiu $v0, $zero, 2
/* 172BA4 802442C4 080910BF */ j .L802442FC
/* 172BA8 802442C8 AC820000 */ sw $v0, ($a0)
.L802442CC:
/* 172BAC 802442CC C6000144 */ lwc1 $f0, 0x144($s0)
/* 172BB0 802442D0 C602014C */ lwc1 $f2, 0x14c($s0)
/* 172BB4 802442D4 E600000C */ swc1 $f0, 0xc($s0)
/* 172BB8 802442D8 E6020014 */ swc1 $f2, 0x14($s0)
/* 172BBC 802442DC C6200144 */ lwc1 $f0, 0x144($s1)
/* 172BC0 802442E0 AC820000 */ sw $v0, ($a0)
/* 172BC4 802442E4 E6000018 */ swc1 $f0, 0x18($s0)
/* 172BC8 802442E8 C620014C */ lwc1 $f0, 0x14c($s1)
/* 172BCC 802442EC 24020004 */ addiu $v0, $zero, 4
/* 172BD0 802442F0 A6020070 */ sh $v0, 0x70($s0)
/* 172BD4 802442F4 AE000054 */ sw $zero, 0x54($s0)
/* 172BD8 802442F8 E6000020 */ swc1 $f0, 0x20($s0)
.L802442FC:
.L802442FC:
/* 172BDC 802442FC 3C12800E */ lui $s2, 0x800e
/* 172BE0 80244300 2652C4DC */ addiu $s2, $s2, -0x3b24
/* 172BE4 80244304 8E430000 */ lw $v1, ($s2)
/* 172BE8 80244308 2402000C */ addiu $v0, $zero, 0xc
/* 172BEC 8024430C 1462006D */ bne $v1, $v0, .L802444C4
/* 172BF0 80244310 00000000 */ nop
/* 172BF4 80244314 86020070 */ lh $v0, 0x70($s0)
/* 172BF8 80244318 10400022 */ beqz $v0, .L802443A4
/* 172BFC 8024431C 00000000 */ nop
/* 172C00 80244320 C6000018 */ lwc1 $f0, 0x18($s0)
/* 172C04 80244324 C6080144 */ lwc1 $f8, 0x144($s0)
/* 172C08 80244328 C6020020 */ lwc1 $f2, 0x20($s0)
/* 172C0C 8024432C 46080001 */ sub.s $f0, $f0, $f8
/* 172C10 80244330 C604014C */ lwc1 $f4, 0x14c($s0)
/* 172C14 80244334 46041081 */ sub.s $f2, $f2, $f4
/* 172C18 80244338 44823000 */ mtc1 $v0, $f6
/* 172C1C 8024433C 00000000 */ nop
/* 172C20 80244340 468031A0 */ cvt.s.w $f6, $f6
/* 172C24 80244344 46060003 */ div.s $f0, $f0, $f6
/* 172C28 80244348 46004200 */ add.s $f8, $f8, $f0
/* 172C2C 8024434C 46003006 */ mov.s $f0, $f6
/* 172C30 80244350 46061083 */ div.s $f2, $f2, $f6
/* 172C34 80244354 C600000C */ lwc1 $f0, 0xc($s0)
/* 172C38 80244358 46022100 */ add.s $f4, $f4, $f2
/* 172C3C 8024435C E6080144 */ swc1 $f8, 0x144($s0)
/* 172C40 80244360 E604014C */ swc1 $f4, 0x14c($s0)
/* 172C44 80244364 C6240144 */ lwc1 $f4, 0x144($s1)
/* 172C48 80244368 46040001 */ sub.s $f0, $f0, $f4
/* 172C4C 8024436C 46003086 */ mov.s $f2, $f6
/* 172C50 80244370 46060003 */ div.s $f0, $f0, $f6
/* 172C54 80244374 46002100 */ add.s $f4, $f4, $f0
/* 172C58 80244378 E6240144 */ swc1 $f4, 0x144($s1)
/* 172C5C 8024437C C6000014 */ lwc1 $f0, 0x14($s0)
/* 172C60 80244380 C624014C */ lwc1 $f4, 0x14c($s1)
/* 172C64 80244384 86020070 */ lh $v0, 0x70($s0)
/* 172C68 80244388 46040001 */ sub.s $f0, $f0, $f4
/* 172C6C 8024438C 44821000 */ mtc1 $v0, $f2
/* 172C70 80244390 00000000 */ nop
/* 172C74 80244394 468010A0 */ cvt.s.w $f2, $f2
/* 172C78 80244398 46020003 */ div.s $f0, $f0, $f2
/* 172C7C 8024439C 46002100 */ add.s $f4, $f4, $f0
/* 172C80 802443A0 E624014C */ swc1 $f4, 0x14c($s1)
.L802443A4:
/* 172C84 802443A4 C60C0054 */ lwc1 $f12, 0x54($s0)
/* 172C88 802443A8 3C0140C9 */ lui $at, 0x40c9
/* 172C8C 802443AC 34210FD0 */ ori $at, $at, 0xfd0
/* 172C90 802443B0 4481B000 */ mtc1 $at, $f22
/* 172C94 802443B4 00000000 */ nop
/* 172C98 802443B8 46166302 */ mul.s $f12, $f12, $f22
/* 172C9C 802443BC 00000000 */ nop
/* 172CA0 802443C0 3C0143B4 */ lui $at, 0x43b4
/* 172CA4 802443C4 4481C000 */ mtc1 $at, $f24
/* 172CA8 802443C8 3C014180 */ lui $at, 0x4180
/* 172CAC 802443CC 4481A000 */ mtc1 $at, $f20
/* 172CB0 802443D0 0C00A85B */ jal sin_rad
/* 172CB4 802443D4 46186303 */ div.s $f12, $f12, $f24
/* 172CB8 802443D8 46140002 */ mul.s $f0, $f0, $f20
/* 172CBC 802443DC 00000000 */ nop
/* 172CC0 802443E0 C602014C */ lwc1 $f2, 0x14c($s0)
/* 172CC4 802443E4 46001080 */ add.s $f2, $f2, $f0
/* 172CC8 802443E8 C60C0054 */ lwc1 $f12, 0x54($s0)
/* 172CCC 802443EC 46006307 */ neg.s $f12, $f12
/* 172CD0 802443F0 0C00A6C9 */ jal clamp_angle
/* 172CD4 802443F4 E602014C */ swc1 $f2, 0x14c($s0)
/* 172CD8 802443F8 C60C0054 */ lwc1 $f12, 0x54($s0)
/* 172CDC 802443FC 46166302 */ mul.s $f12, $f12, $f22
/* 172CE0 80244400 00000000 */ nop
/* 172CE4 80244404 E600018C */ swc1 $f0, 0x18c($s0)
/* 172CE8 80244408 0C00A85B */ jal sin_rad
/* 172CEC 8024440C 46186303 */ div.s $f12, $f12, $f24
/* 172CF0 80244410 46140002 */ mul.s $f0, $f0, $f20
/* 172CF4 80244414 00000000 */ nop
/* 172CF8 80244418 C622014C */ lwc1 $f2, 0x14c($s1)
/* 172CFC 8024441C 46001081 */ sub.s $f2, $f2, $f0
/* 172D00 80244420 E622014C */ swc1 $f2, 0x14c($s1)
/* 172D04 80244424 C60C0054 */ lwc1 $f12, 0x54($s0)
/* 172D08 80244428 0C00A6C9 */ jal clamp_angle
/* 172D0C 8024442C 46006307 */ neg.s $f12, $f12
/* 172D10 80244430 E620018C */ swc1 $f0, 0x18c($s1)
/* 172D14 80244434 C6000054 */ lwc1 $f0, 0x54($s0)
/* 172D18 80244438 3C0142B4 */ lui $at, 0x42b4
/* 172D1C 8024443C 44811000 */ mtc1 $at, $f2
/* 172D20 80244440 86020070 */ lh $v0, 0x70($s0)
/* 172D24 80244444 46020000 */ add.s $f0, $f0, $f2
/* 172D28 80244448 96030070 */ lhu $v1, 0x70($s0)
/* 172D2C 8024444C 10400004 */ beqz $v0, .L80244460
/* 172D30 80244450 E6000054 */ swc1 $f0, 0x54($s0)
/* 172D34 80244454 2462FFFF */ addiu $v0, $v1, -1
/* 172D38 80244458 08091131 */ j .L802444C4
/* 172D3C 8024445C A6020070 */ sh $v0, 0x70($s0)
.L80244460:
/* 172D40 80244460 C6000018 */ lwc1 $f0, 0x18($s0)
/* 172D44 80244464 C6020020 */ lwc1 $f2, 0x20($s0)
/* 172D48 80244468 C604000C */ lwc1 $f4, 0xc($s0)
/* 172D4C 8024446C E6000144 */ swc1 $f0, 0x144($s0)
/* 172D50 80244470 E602014C */ swc1 $f2, 0x14c($s0)
/* 172D54 80244474 E6240144 */ swc1 $f4, 0x144($s1)
/* 172D58 80244478 C6000014 */ lwc1 $f0, 0x14($s0)
/* 172D5C 8024447C 3C05FFEF */ lui $a1, 0xffef
/* 172D60 80244480 E620014C */ swc1 $f0, 0x14c($s1)
/* 172D64 80244484 C6000144 */ lwc1 $f0, 0x144($s0)
/* 172D68 80244488 C602014C */ lwc1 $f2, 0x14c($s0)
/* 172D6C 8024448C 34A5FFFF */ ori $a1, $a1, 0xffff
/* 172D70 80244490 E6000138 */ swc1 $f0, 0x138($s0)
/* 172D74 80244494 E6020140 */ swc1 $f2, 0x140($s0)
/* 172D78 80244498 C6200144 */ lwc1 $f0, 0x144($s1)
/* 172D7C 8024449C C622014C */ lwc1 $f2, 0x14c($s1)
/* 172D80 802444A0 3C04800E */ lui $a0, 0x800e
/* 172D84 802444A4 2484C070 */ addiu $a0, $a0, -0x3f90
/* 172D88 802444A8 E6200138 */ swc1 $f0, 0x138($s1)
/* 172D8C 802444AC E6220140 */ swc1 $f2, 0x140($s1)
/* 172D90 802444B0 8C820000 */ lw $v0, ($a0)
/* 172D94 802444B4 24030002 */ addiu $v1, $zero, 2
/* 172D98 802444B8 AE430000 */ sw $v1, ($s2)
/* 172D9C 802444BC 00451024 */ and $v0, $v0, $a1
/* 172DA0 802444C0 AC820000 */ sw $v0, ($a0)
.L802444C4:
.L802444C4:
/* 172DA4 802444C4 3C03800E */ lui $v1, 0x800e
/* 172DA8 802444C8 8C63C4DC */ lw $v1, -0x3b24($v1)
/* 172DAC 802444CC 24020002 */ addiu $v0, $zero, 2
/* 172DB0 802444D0 14620026 */ bne $v1, $v0, .L8024456C
/* 172DB4 802444D4 00000000 */ nop
/* 172DB8 802444D8 0C093903 */ jal func_8024E40C
/* 172DBC 802444DC 0040202D */ daddu $a0, $v0, $zero
/* 172DC0 802444E0 8263008A */ lb $v1, 0x8a($s3)
/* 172DC4 802444E4 24020003 */ addiu $v0, $zero, 3
/* 172DC8 802444E8 14620016 */ bne $v1, $v0, .L80244544
/* 172DCC 802444EC 00000000 */ nop
/* 172DD0 802444F0 82620078 */ lb $v0, 0x78($s3)
/* 172DD4 802444F4 14400007 */ bnez $v0, .L80244514
/* 172DD8 802444F8 2405000A */ addiu $a1, $zero, 0xa
/* 172DDC 802444FC 92A2028A */ lbu $v0, 0x28a($s5)
/* 172DE0 80244500 A260008A */ sb $zero, 0x8a($s3)
/* 172DE4 80244504 A6A0028C */ sh $zero, 0x28c($s5)
/* 172DE8 80244508 24420001 */ addiu $v0, $v0, 1
/* 172DEC 8024450C 08091150 */ j .L80244540
/* 172DF0 80244510 A2A2028A */ sb $v0, 0x28a($s5)
.L80244514:
/* 172DF4 80244514 3C048028 */ lui $a0, 0x8028
/* 172DF8 80244518 24844EBC */ addiu $a0, $a0, 0x4ebc
/* 172DFC 8024451C 0000302D */ daddu $a2, $zero, $zero
/* 172E00 80244520 24020016 */ addiu $v0, $zero, 0x16
/* 172E04 80244524 0C0B0CF8 */ jal start_script
/* 172E08 80244528 A26201A7 */ sb $v0, 0x1a7($s3)
/* 172E0C 8024452C 0040202D */ daddu $a0, $v0, $zero
/* 172E10 80244530 AE2401D4 */ sw $a0, 0x1d4($s1)
/* 172E14 80244534 8C820144 */ lw $v0, 0x144($a0)
/* 172E18 80244538 AE2201E4 */ sw $v0, 0x1e4($s1)
/* 172E1C 8024453C AC800148 */ sw $zero, 0x148($a0)
.L80244540:
/* 172E20 80244540 24020003 */ addiu $v0, $zero, 3
.L80244544:
/* 172E24 80244544 3C04800E */ lui $a0, 0x800e
/* 172E28 80244548 2484C070 */ addiu $a0, $a0, -0x3f90
/* 172E2C 8024454C 3C01800E */ lui $at, 0x800e
/* 172E30 80244550 AC22C4DC */ sw $v0, -0x3b24($at)
/* 172E34 80244554 8C820000 */ lw $v0, ($a0)
/* 172E38 80244558 2403FFFD */ addiu $v1, $zero, -3
/* 172E3C 8024455C 3C01802A */ lui $at, 0x802a
/* 172E40 80244560 AC20F248 */ sw $zero, -0xdb8($at)
/* 172E44 80244564 00431024 */ and $v0, $v0, $v1
/* 172E48 80244568 AC820000 */ sw $v0, ($a0)
.L8024456C:
/* 172E4C 8024456C 3C12800E */ lui $s2, 0x800e
/* 172E50 80244570 2652C4DC */ addiu $s2, $s2, -0x3b24
/* 172E54 80244574 8E500000 */ lw $s0, ($s2)
/* 172E58 80244578 24020003 */ addiu $v0, $zero, 3
/* 172E5C 8024457C 16020020 */ bne $s0, $v0, .L80244600
/* 172E60 80244580 00000000 */ nop
/* 172E64 80244584 3C03802A */ lui $v1, 0x802a
/* 172E68 80244588 2463F248 */ addiu $v1, $v1, -0xdb8
/* 172E6C 8024458C 8C620000 */ lw $v0, ($v1)
/* 172E70 80244590 10400003 */ beqz $v0, .L802445A0
/* 172E74 80244594 2442FFFF */ addiu $v0, $v0, -1
/* 172E78 80244598 08091180 */ j .L80244600
/* 172E7C 8024459C AC620000 */ sw $v0, ($v1)
.L802445A0:
/* 172E80 802445A0 8E2201D4 */ lw $v0, 0x1d4($s1)
/* 172E84 802445A4 50400007 */ beql $v0, $zero, .L802445C4
/* 172E88 802445A8 AE2001D4 */ sw $zero, 0x1d4($s1)
/* 172E8C 802445AC 8E2401E4 */ lw $a0, 0x1e4($s1)
/* 172E90 802445B0 0C0B1059 */ jal does_script_exist
/* 172E94 802445B4 00000000 */ nop
/* 172E98 802445B8 14400011 */ bnez $v0, .L80244600
/* 172E9C 802445BC 00000000 */ nop
/* 172EA0 802445C0 AE2001D4 */ sw $zero, 0x1d4($s1)
.L802445C4:
/* 172EA4 802445C4 8262008A */ lb $v0, 0x8a($s3)
/* 172EA8 802445C8 10500003 */ beq $v0, $s0, .L802445D8
/* 172EAC 802445CC 24020004 */ addiu $v0, $zero, 4
/* 172EB0 802445D0 08091180 */ j .L80244600
/* 172EB4 802445D4 AE420000 */ sw $v0, ($s2)
.L802445D8:
/* 172EB8 802445D8 92640078 */ lbu $a0, 0x78($s3)
/* 172EBC 802445DC 24020014 */ addiu $v0, $zero, 0x14
/* 172EC0 802445E0 A262007A */ sb $v0, 0x7a($s3)
/* 172EC4 802445E4 92620079 */ lbu $v0, 0x79($s3)
/* 172EC8 802445E8 24030004 */ addiu $v1, $zero, 4
/* 172ECC 802445EC A260008A */ sb $zero, 0x8a($s3)
/* 172ED0 802445F0 AE430000 */ sw $v1, ($s2)
/* 172ED4 802445F4 00822021 */ addu $a0, $a0, $v0
/* 172ED8 802445F8 00441021 */ addu $v0, $v0, $a0
/* 172EDC 802445FC A2620079 */ sb $v0, 0x79($s3)
.L80244600:
.L80244600:
/* 172EE0 80244600 3C03800E */ lui $v1, 0x800e
/* 172EE4 80244604 8C63C4DC */ lw $v1, -0x3b24($v1)
/* 172EE8 80244608 24020004 */ addiu $v0, $zero, 4
/* 172EEC 8024460C 14620031 */ bne $v1, $v0, .L802446D4
/* 172EF0 80244610 00000000 */ nop
/* 172EF4 80244614 82620079 */ lb $v0, 0x79($s3)
/* 172EF8 80244618 1C40002E */ bgtz $v0, .L802446D4
/* 172EFC 8024461C 3C020100 */ lui $v0, 0x100
/* 172F00 80244620 3C04800E */ lui $a0, 0x800e
/* 172F04 80244624 2484C070 */ addiu $a0, $a0, -0x3f90
/* 172F08 80244628 8C830000 */ lw $v1, ($a0)
/* 172F0C 8024462C 00621024 */ and $v0, $v1, $v0
/* 172F10 80244630 10400004 */ beqz $v0, .L80244644
/* 172F14 80244634 3C02FFFB */ lui $v0, 0xfffb
/* 172F18 80244638 3442FFFF */ ori $v0, $v0, 0xffff
/* 172F1C 8024463C 00621024 */ and $v0, $v1, $v0
/* 172F20 80244640 AC820000 */ sw $v0, ($a0)
.L80244644:
/* 172F24 80244644 96A302A4 */ lhu $v1, 0x2a4($s5)
/* 172F28 80244648 2C62270F */ sltiu $v0, $v1, 0x270f
/* 172F2C 8024464C 10400002 */ beqz $v0, .L80244658
/* 172F30 80244650 24620001 */ addiu $v0, $v1, 1
/* 172F34 80244654 A6A202A4 */ sh $v0, 0x2a4($s5)
.L80244658:
/* 172F38 80244658 8C820000 */ lw $v0, ($a0)
/* 172F3C 8024465C 3C030004 */ lui $v1, 4
/* 172F40 80244660 00431024 */ and $v0, $v0, $v1
/* 172F44 80244664 10400003 */ beqz $v0, .L80244674
/* 172F48 80244668 24020003 */ addiu $v0, $zero, 3
/* 172F4C 8024466C 0809119E */ j .L80244678
/* 172F50 80244670 A2C20009 */ sb $v0, 9($s6)
.L80244674:
/* 172F54 80244674 A2C00009 */ sb $zero, 9($s6)
.L80244678:
/* 172F58 80244678 3C04800E */ lui $a0, 0x800e
/* 172F5C 8024467C 2484C070 */ addiu $a0, $a0, -0x3f90
/* 172F60 80244680 8C820000 */ lw $v0, ($a0)
/* 172F64 80244684 3C030002 */ lui $v1, 2
/* 172F68 80244688 00431024 */ and $v0, $v0, $v1
/* 172F6C 8024468C 1040000E */ beqz $v0, .L802446C8
/* 172F70 80244690 3C030200 */ lui $v1, 0x200
/* 172F74 80244694 8C820004 */ lw $v0, 4($a0)
/* 172F78 80244698 00431024 */ and $v0, $v0, $v1
/* 172F7C 8024469C 5440000B */ bnezl $v0, .L802446CC
/* 172F80 802446A0 24040020 */ addiu $a0, $zero, 0x20
/* 172F84 802446A4 24020008 */ addiu $v0, $zero, 8
/* 172F88 802446A8 AFA20010 */ sw $v0, 0x10($sp)
/* 172F8C 802446AC 0000202D */ daddu $a0, $zero, $zero
/* 172F90 802446B0 2405FFFF */ addiu $a1, $zero, -1
/* 172F94 802446B4 0080302D */ daddu $a2, $a0, $zero
/* 172F98 802446B8 0C052A46 */ jal set_music_track
/* 172F9C 802446BC 240705DC */ addiu $a3, $zero, 0x5dc
/* 172FA0 802446C0 080911B3 */ j .L802446CC
/* 172FA4 802446C4 24040020 */ addiu $a0, $zero, 0x20
.L802446C8:
/* 172FA8 802446C8 24040021 */ addiu $a0, $zero, 0x21
.L802446CC:
.L802446CC:
/* 172FAC 802446CC 0C090464 */ jal func_80241190
/* 172FB0 802446D0 00000000 */ nop
.L802446D4:
/* 172FB4 802446D4 8FBF0034 */ lw $ra, 0x34($sp)
/* 172FB8 802446D8 8FB60030 */ lw $s6, 0x30($sp)
/* 172FBC 802446DC 8FB5002C */ lw $s5, 0x2c($sp)
/* 172FC0 802446E0 8FB40028 */ lw $s4, 0x28($sp)
/* 172FC4 802446E4 8FB30024 */ lw $s3, 0x24($sp)
/* 172FC8 802446E8 8FB20020 */ lw $s2, 0x20($sp)
/* 172FCC 802446EC 8FB1001C */ lw $s1, 0x1c($sp)
/* 172FD0 802446F0 8FB00018 */ lw $s0, 0x18($sp)
/* 172FD4 802446F4 D7B80048 */ ldc1 $f24, 0x48($sp)
/* 172FD8 802446F8 D7B60040 */ ldc1 $f22, 0x40($sp)
/* 172FDC 802446FC D7B40038 */ ldc1 $f20, 0x38($sp)
/* 172FE0 80244700 03E00008 */ jr $ra
/* 172FE4 80244704 27BD0050 */ addiu $sp, $sp, 0x50