.set noat # allow manual use of $at .set noreorder # don't insert nops after branches glabel func_800397E8 /* 014BE8 800397E8 27BDFFC0 */ addiu $sp, $sp, -0x40 /* 014BEC 800397EC AFB00030 */ sw $s0, 0x30($sp) /* 014BF0 800397F0 0080802D */ daddu $s0, $a0, $zero /* 014BF4 800397F4 AFBF0034 */ sw $ra, 0x34($sp) /* 014BF8 800397F8 F7B40038 */ sdc1 $f20, 0x38($sp) /* 014BFC 800397FC 8E030000 */ lw $v1, ($s0) /* 014C00 80039800 44852000 */ mtc1 $a1, $f4 /* 014C04 80039804 30620208 */ andi $v0, $v1, 0x208 /* 014C08 80039808 14400044 */ bnez $v0, .L8003991C /* 014C0C 8003980C 0000102D */ daddu $v0, $zero, $zero /* 014C10 80039810 30620800 */ andi $v0, $v1, 0x800 /* 014C14 80039814 10400005 */ beqz $v0, .L8003982C /* 014C18 80039818 2402EFFF */ addiu $v0, $zero, -0x1001 /* 014C1C 8003981C 00621024 */ and $v0, $v1, $v0 /* 014C20 80039820 AE020000 */ sw $v0, ($s0) /* 014C24 80039824 0800E647 */ j .L8003991C /* 014C28 80039828 0000102D */ daddu $v0, $zero, $zero .L8003982C: /* 014C2C 8003982C C6000038 */ lwc1 $f0, 0x38($s0) /* 014C30 80039830 3C014180 */ lui $at, 0x4180 /* 014C34 80039834 44811000 */ mtc1 $at, $f2 /* 014C38 80039838 E7A00020 */ swc1 $f0, 0x20($sp) /* 014C3C 8003983C 46002005 */ abs.s $f0, $f4 /* 014C40 80039840 46020500 */ add.s $f20, $f0, $f2 /* 014C44 80039844 C600003C */ lwc1 $f0, 0x3c($s0) /* 014C48 80039848 3C014150 */ lui $at, 0x4150 /* 014C4C 8003984C 44811000 */ mtc1 $at, $f2 /* 014C50 80039850 C6040040 */ lwc1 $f4, 0x40($s0) /* 014C54 80039854 46020000 */ add.s $f0, $f0, $f2 /* 014C58 80039858 E7A40028 */ swc1 $f4, 0x28($sp) /* 014C5C 8003985C E7B4002C */ swc1 $f20, 0x2c($sp) /* 014C60 80039860 E7A00024 */ swc1 $f0, 0x24($sp) /* 014C64 80039864 8E020000 */ lw $v0, ($s0) /* 014C68 80039868 3C030400 */ lui $v1, 0x400 /* 014C6C 8003986C 00431024 */ and $v0, $v0, $v1 /* 014C70 80039870 14400009 */ bnez $v0, .L80039898 /* 014C74 80039874 27A2002C */ addiu $v0, $sp, 0x2c /* 014C78 80039878 27A50020 */ addiu $a1, $sp, 0x20 /* 014C7C 8003987C 27A60024 */ addiu $a2, $sp, 0x24 /* 014C80 80039880 AFA20010 */ sw $v0, 0x10($sp) /* 014C84 80039884 8E040080 */ lw $a0, 0x80($s0) /* 014C88 80039888 0C0372DF */ jal func_800DCB7C /* 014C8C 8003988C 27A70028 */ addiu $a3, $sp, 0x28 /* 014C90 80039890 0800E633 */ j .L800398CC /* 014C94 80039894 00000000 */ nop .L80039898: /* 014C98 80039898 AFA20010 */ sw $v0, 0x10($sp) /* 014C9C 8003989C C600000C */ lwc1 $f0, 0xc($s0) /* 014CA0 800398A0 27A50020 */ addiu $a1, $sp, 0x20 /* 014CA4 800398A4 E7A00014 */ swc1 $f0, 0x14($sp) /* 014CA8 800398A8 860200A6 */ lh $v0, 0xa6($s0) /* 014CAC 800398AC 27A60024 */ addiu $a2, $sp, 0x24 /* 014CB0 800398B0 44820000 */ mtc1 $v0, $f0 /* 014CB4 800398B4 00000000 */ nop /* 014CB8 800398B8 46800020 */ cvt.s.w $f0, $f0 /* 014CBC 800398BC E7A00018 */ swc1 $f0, 0x18($sp) /* 014CC0 800398C0 8E040080 */ lw $a0, 0x80($s0) /* 014CC4 800398C4 0C0371DE */ jal func_800DC778 /* 014CC8 800398C8 27A70028 */ addiu $a3, $sp, 0x28 .L800398CC: /* 014CCC 800398CC 1040000F */ beqz $v0, .L8003990C /* 014CD0 800398D0 0000102D */ daddu $v0, $zero, $zero /* 014CD4 800398D4 C7A0002C */ lwc1 $f0, 0x2c($sp) /* 014CD8 800398D8 4614003E */ c.le.s $f0, $f20 /* 014CDC 800398DC 00000000 */ nop /* 014CE0 800398E0 45000009 */ bc1f .L80039908 /* 014CE4 800398E4 24020001 */ addiu $v0, $zero, 1 /* 014CE8 800398E8 C7A00024 */ lwc1 $f0, 0x24($sp) /* 014CEC 800398EC 8E030000 */ lw $v1, ($s0) /* 014CF0 800398F0 3C048011 */ lui $a0, 0x8011 /* 014CF4 800398F4 9484C97A */ lhu $a0, -0x3686($a0) /* 014CF8 800398F8 34631000 */ ori $v1, $v1, 0x1000 /* 014CFC 800398FC E600003C */ swc1 $f0, 0x3c($s0) /* 014D00 80039900 0800E646 */ j .L80039918 /* 014D04 80039904 A6040084 */ sh $a0, 0x84($s0) .L80039908: /* 014D08 80039908 0000102D */ daddu $v0, $zero, $zero .L8003990C: /* 014D0C 8003990C 8E030000 */ lw $v1, ($s0) /* 014D10 80039910 2404EFFF */ addiu $a0, $zero, -0x1001 /* 014D14 80039914 00641824 */ and $v1, $v1, $a0 .L80039918: /* 014D18 80039918 AE030000 */ sw $v1, ($s0) .L8003991C: /* 014D1C 8003991C 8FBF0034 */ lw $ra, 0x34($sp) /* 014D20 80039920 8FB00030 */ lw $s0, 0x30($sp) /* 014D24 80039924 D7B40038 */ ldc1 $f20, 0x38($sp) /* 014D28 80039928 03E00008 */ jr $ra /* 014D2C 8003992C 27BD0040 */ addiu $sp, $sp, 0x40