papermario/ver/jp/asm/nonmatchings/13530/func_80038CCC.s

191 lines
9.4 KiB
ArmAsm
Raw Normal View History

.set noat # allow manual use of $at
.set noreorder # don't insert nops after branches
glabel func_80038CCC
/* 140CC 80038CCC 27BDFFA0 */ addiu $sp, $sp, -0x60
/* 140D0 80038CD0 AFB1001C */ sw $s1, 0x1c($sp)
/* 140D4 80038CD4 0080882D */ daddu $s1, $a0, $zero
/* 140D8 80038CD8 AFBF0028 */ sw $ra, 0x28($sp)
/* 140DC 80038CDC AFB30024 */ sw $s3, 0x24($sp)
/* 140E0 80038CE0 AFB20020 */ sw $s2, 0x20($sp)
/* 140E4 80038CE4 AFB00018 */ sw $s0, 0x18($sp)
/* 140E8 80038CE8 F7BE0058 */ sdc1 $f30, 0x58($sp)
/* 140EC 80038CEC F7BC0050 */ sdc1 $f28, 0x50($sp)
/* 140F0 80038CF0 F7BA0048 */ sdc1 $f26, 0x48($sp)
/* 140F4 80038CF4 F7B80040 */ sdc1 $f24, 0x40($sp)
/* 140F8 80038CF8 F7B60038 */ sdc1 $f22, 0x38($sp)
/* 140FC 80038CFC F7B40030 */ sdc1 $f20, 0x30($sp)
/* 14100 80038D00 8E230000 */ lw $v1, ($s1)
/* 14104 80038D04 30620100 */ andi $v0, $v1, 0x100
/* 14108 80038D08 14400096 */ bnez $v0, .L80038F64
/* 1410C 80038D0C 3C02FDFF */ lui $v0, 0xfdff
/* 14110 80038D10 3442FFFF */ ori $v0, $v0, 0xffff
/* 14114 80038D14 0000902D */ daddu $s2, $zero, $zero
/* 14118 80038D18 3C130400 */ lui $s3, 0x400
/* 1411C 80038D1C C63E0038 */ lwc1 $f30, 0x38($s1)
/* 14120 80038D20 C626003C */ lwc1 $f6, 0x3c($s1)
/* 14124 80038D24 3C013F00 */ lui $at, 0x3f00
/* 14128 80038D28 44811000 */ mtc1 $at, $f2
/* 1412C 80038D2C 00621024 */ and $v0, $v1, $v0
/* 14130 80038D30 E7A60010 */ swc1 $f6, 0x10($sp)
/* 14134 80038D34 AE220000 */ sw $v0, ($s1)
/* 14138 80038D38 862200A6 */ lh $v0, 0xa6($s1)
/* 1413C 80038D3C C63C0040 */ lwc1 $f28, 0x40($s1)
/* 14140 80038D40 44820000 */ mtc1 $v0, $f0
/* 14144 80038D44 00000000 */ nop
/* 14148 80038D48 46800020 */ cvt.s.w $f0, $f0
/* 1414C 80038D4C 46020002 */ mul.s $f0, $f0, $f2
/* 14150 80038D50 00000000 */ nop
/* 14154 80038D54 E7A00014 */ swc1 $f0, 0x14($sp)
.L80038D58:
/* 14158 80038D58 0C00E1E7 */ jal func_8003879C
/* 1415C 80038D5C 0240202D */ daddu $a0, $s2, $zero
/* 14160 80038D60 0040802D */ daddu $s0, $v0, $zero
/* 14164 80038D64 5200007A */ beql $s0, $zero, .L80038F50
/* 14168 80038D68 26520001 */ addiu $s2, $s2, 1
/* 1416C 80038D6C 52300078 */ beql $s1, $s0, .L80038F50
/* 14170 80038D70 26520001 */ addiu $s2, $s2, 1
/* 14174 80038D74 8E030000 */ lw $v1, ($s0)
/* 14178 80038D78 50600075 */ beql $v1, $zero, .L80038F50
/* 1417C 80038D7C 26520001 */ addiu $s2, $s2, 1
/* 14180 80038D80 3C028000 */ lui $v0, 0x8000
/* 14184 80038D84 34420100 */ ori $v0, $v0, 0x100
/* 14188 80038D88 00621024 */ and $v0, $v1, $v0
/* 1418C 80038D8C 54400070 */ bnel $v0, $zero, .L80038F50
/* 14190 80038D90 26520001 */ addiu $s2, $s2, 1
/* 14194 80038D94 860200A8 */ lh $v0, 0xa8($s0)
/* 14198 80038D98 C602003C */ lwc1 $f2, 0x3c($s0)
/* 1419C 80038D9C 44820000 */ mtc1 $v0, $f0
/* 141A0 80038DA0 00000000 */ nop
/* 141A4 80038DA4 46800020 */ cvt.s.w $f0, $f0
/* 141A8 80038DA8 46001000 */ add.s $f0, $f2, $f0
/* 141AC 80038DAC C7A60010 */ lwc1 $f6, 0x10($sp)
/* 141B0 80038DB0 4606003C */ c.lt.s $f0, $f6
/* 141B4 80038DB4 00000000 */ nop
/* 141B8 80038DB8 45030065 */ bc1tl .L80038F50
/* 141BC 80038DBC 26520001 */ addiu $s2, $s2, 1
/* 141C0 80038DC0 862200A8 */ lh $v0, 0xa8($s1)
/* 141C4 80038DC4 44820000 */ mtc1 $v0, $f0
/* 141C8 80038DC8 00000000 */ nop
/* 141CC 80038DCC 46800020 */ cvt.s.w $f0, $f0
/* 141D0 80038DD0 46003000 */ add.s $f0, $f6, $f0
/* 141D4 80038DD4 4602003C */ c.lt.s $f0, $f2
/* 141D8 80038DD8 00000000 */ nop
/* 141DC 80038DDC 4503005C */ bc1tl .L80038F50
/* 141E0 80038DE0 26520001 */ addiu $s2, $s2, 1
/* 141E4 80038DE4 C6140038 */ lwc1 $f20, 0x38($s0)
/* 141E8 80038DE8 461EA581 */ sub.s $f22, $f20, $f30
/* 141EC 80038DEC 4616B082 */ mul.s $f2, $f22, $f22
/* 141F0 80038DF0 00000000 */ nop
/* 141F4 80038DF4 C61A0040 */ lwc1 $f26, 0x40($s0)
/* 141F8 80038DF8 461CD101 */ sub.s $f4, $f26, $f28
/* 141FC 80038DFC 46042002 */ mul.s $f0, $f4, $f4
/* 14200 80038E00 00000000 */ nop
/* 14204 80038E04 860200A6 */ lh $v0, 0xa6($s0)
/* 14208 80038E08 46001300 */ add.s $f12, $f2, $f0
/* 1420C 80038E0C 3C013F00 */ lui $at, 0x3f00
/* 14210 80038E10 44811000 */ mtc1 $at, $f2
/* 14214 80038E14 44820000 */ mtc1 $v0, $f0
/* 14218 80038E18 00000000 */ nop
/* 1421C 80038E1C 46800020 */ cvt.s.w $f0, $f0
/* 14220 80038E20 46020582 */ mul.s $f22, $f0, $f2
/* 14224 80038E24 00000000 */ nop
/* 14228 80038E28 46006104 */ sqrt.s $f4, $f12
/* 1422C 80038E2C 46042032 */ c.eq.s $f4, $f4
/* 14230 80038E30 00000000 */ nop
/* 14234 80038E34 45010004 */ bc1t .L80038E48
/* 14238 80038E38 00000000 */ nop
/* 1423C 80038E3C 0C0187B0 */ jal func_80061EC0
/* 14240 80038E40 00000000 */ nop
/* 14244 80038E44 46000106 */ mov.s $f4, $f0
.L80038E48:
/* 14248 80038E48 C7A60014 */ lwc1 $f6, 0x14($sp)
/* 1424C 80038E4C 46163000 */ add.s $f0, $f6, $f22
/* 14250 80038E50 46002606 */ mov.s $f24, $f4
/* 14254 80038E54 4618003E */ c.le.s $f0, $f24
/* 14258 80038E58 00000000 */ nop
/* 1425C 80038E5C 4503003C */ bc1tl .L80038F50
/* 14260 80038E60 26520001 */ addiu $s2, $s2, 1
/* 14264 80038E64 8E220000 */ lw $v0, ($s1)
/* 14268 80038E68 00531024 */ and $v0, $v0, $s3
/* 1426C 80038E6C 10400005 */ beqz $v0, .L80038E84
/* 14270 80038E70 0000182D */ daddu $v1, $zero, $zero
/* 14274 80038E74 3C028011 */ lui $v0, %hi(D_8010ED70)
/* 14278 80038E78 8042ED70 */ lb $v0, %lo(D_8010ED70)($v0)
/* 1427C 80038E7C 0800E3A9 */ j .L80038EA4
/* 14280 80038E80 2C430001 */ sltiu $v1, $v0, 1
.L80038E84:
/* 14284 80038E84 8E020000 */ lw $v0, ($s0)
/* 14288 80038E88 00531024 */ and $v0, $v0, $s3
/* 1428C 80038E8C 50400005 */ beql $v0, $zero, .L80038EA4
/* 14290 80038E90 24030001 */ addiu $v1, $zero, 1
/* 14294 80038E94 3C028011 */ lui $v0, %hi(D_8010ED70)
/* 14298 80038E98 8042ED70 */ lb $v0, %lo(D_8010ED70)($v0)
/* 1429C 80038E9C 50400001 */ beql $v0, $zero, .L80038EA4
/* 142A0 80038EA0 24030001 */ addiu $v1, $zero, 1
.L80038EA4:
/* 142A4 80038EA4 10600025 */ beqz $v1, .L80038F3C
/* 142A8 80038EA8 00000000 */ nop
/* 142AC 80038EAC 4600A306 */ mov.s $f12, $f20
/* 142B0 80038EB0 4406F000 */ mfc1 $a2, $f30
/* 142B4 80038EB4 4407E000 */ mfc1 $a3, $f28
/* 142B8 80038EB8 0C00A710 */ jal func_80029C40
/* 142BC 80038EBC 4600D386 */ mov.s $f14, $f26
/* 142C0 80038EC0 3C0140C9 */ lui $at, 0x40c9
/* 142C4 80038EC4 34210FD0 */ ori $at, $at, 0xfd0
/* 142C8 80038EC8 44811000 */ mtc1 $at, $f2
/* 142CC 80038ECC 00000000 */ nop
/* 142D0 80038ED0 46020502 */ mul.s $f20, $f0, $f2
/* 142D4 80038ED4 00000000 */ nop
/* 142D8 80038ED8 C7A60014 */ lwc1 $f6, 0x14($sp)
/* 142DC 80038EDC 46163000 */ add.s $f0, $f6, $f22
/* 142E0 80038EE0 3C0143B4 */ lui $at, 0x43b4
/* 142E4 80038EE4 44811000 */ mtc1 $at, $f2
/* 142E8 80038EE8 46180601 */ sub.s $f24, $f0, $f24
/* 142EC 80038EEC 4602A503 */ div.s $f20, $f20, $f2
/* 142F0 80038EF0 0C00A84B */ jal func_8002A12C
/* 142F4 80038EF4 4600A306 */ mov.s $f12, $f20
/* 142F8 80038EF8 4600C582 */ mul.s $f22, $f24, $f0
/* 142FC 80038EFC 00000000 */ nop
/* 14300 80038F00 0C00A864 */ jal func_8002A190
/* 14304 80038F04 4600A306 */ mov.s $f12, $f20
/* 14308 80038F08 4600C087 */ neg.s $f2, $f24
/* 1430C 80038F0C 46001102 */ mul.s $f4, $f2, $f0
/* 14310 80038F10 00000000 */ nop
/* 14314 80038F14 3C013DCC */ lui $at, 0x3dcc
/* 14318 80038F18 3421CCCD */ ori $at, $at, 0xcccd
/* 1431C 80038F1C 44813000 */ mtc1 $at, $f6
/* 14320 80038F20 00000000 */ nop
/* 14324 80038F24 4606B002 */ mul.s $f0, $f22, $f6
/* 14328 80038F28 00000000 */ nop
/* 1432C 80038F2C 46062082 */ mul.s $f2, $f4, $f6
/* 14330 80038F30 00000000 */ nop
/* 14334 80038F34 4600F780 */ add.s $f30, $f30, $f0
/* 14338 80038F38 4602E700 */ add.s $f28, $f28, $f2
.L80038F3C:
/* 1433C 80038F3C 8E220000 */ lw $v0, ($s1)
/* 14340 80038F40 3C030200 */ lui $v1, 0x200
/* 14344 80038F44 00431025 */ or $v0, $v0, $v1
/* 14348 80038F48 AE220000 */ sw $v0, ($s1)
/* 1434C 80038F4C 26520001 */ addiu $s2, $s2, 1
.L80038F50:
/* 14350 80038F50 2A420040 */ slti $v0, $s2, 0x40
/* 14354 80038F54 1440FF80 */ bnez $v0, .L80038D58
/* 14358 80038F58 00000000 */ nop
/* 1435C 80038F5C E63E0038 */ swc1 $f30, 0x38($s1)
/* 14360 80038F60 E63C0040 */ swc1 $f28, 0x40($s1)
.L80038F64:
/* 14364 80038F64 8FBF0028 */ lw $ra, 0x28($sp)
/* 14368 80038F68 8FB30024 */ lw $s3, 0x24($sp)
/* 1436C 80038F6C 8FB20020 */ lw $s2, 0x20($sp)
/* 14370 80038F70 8FB1001C */ lw $s1, 0x1c($sp)
/* 14374 80038F74 8FB00018 */ lw $s0, 0x18($sp)
/* 14378 80038F78 D7BE0058 */ ldc1 $f30, 0x58($sp)
/* 1437C 80038F7C D7BC0050 */ ldc1 $f28, 0x50($sp)
/* 14380 80038F80 D7BA0048 */ ldc1 $f26, 0x48($sp)
/* 14384 80038F84 D7B80040 */ ldc1 $f24, 0x40($sp)
/* 14388 80038F88 D7B60038 */ ldc1 $f22, 0x38($sp)
/* 1438C 80038F8C D7B40030 */ ldc1 $f20, 0x30($sp)
/* 14390 80038F90 03E00008 */ jr $ra
/* 14394 80038F94 27BD0060 */ addiu $sp, $sp, 0x60