papermario/ver/jp/asm/nonmatchings/main_8490/func_8002E1C8.s
Ethan Roseman 698cf99458
jp cod (Created the first segment's c files for jp) (#194)
* jp cod

* just have less code and it works

* oops

* removing splat cause subrepo is being dumb

* git subrepo clone https://github.com/ethteck/splat.git tools/splat

subrepo:
  subdir:   "tools/splat"
  merged:   "d7281bae6a"
upstream:
  origin:   "https://github.com/ethteck/splat.git"
  branch:   "master"
  commit:   "d7281bae6a"
git-subrepo:
  version:  "0.4.3"
  origin:   "https://github.com/ingydotnet/git-subrepo"
  commit:   "2f68596"

* move jp stuff + revert configure

* git subrepo pull tools/splat

subrepo:
  subdir:   "tools/splat"
  merged:   "c56195a9c5"
upstream:
  origin:   "https://github.com/ethteck/splat.git"
  branch:   "master"
  commit:   "c56195a9c5"
git-subrepo:
  version:  "0.4.3"
  origin:   "https://github.com/ingydotnet/git-subrepo"
  commit:   "2f68596"
2021-02-27 00:36:33 +09:00

144 lines
6.9 KiB
ArmAsm

.set noat # allow manual use of $at
.set noreorder # don't insert nops after branches
glabel func_8002E1C8
/* 95C8 8002E1C8 27BDFFB0 */ addiu $sp, $sp, -0x50
/* 95CC 8002E1CC AFB20040 */ sw $s2, 0x40($sp)
/* 95D0 8002E1D0 8FB20060 */ lw $s2, 0x60($sp)
/* 95D4 8002E1D4 AFB30044 */ sw $s3, 0x44($sp)
/* 95D8 8002E1D8 8FB30064 */ lw $s3, 0x64($sp)
/* 95DC 8002E1DC AFB1003C */ sw $s1, 0x3c($sp)
/* 95E0 8002E1E0 8FB10068 */ lw $s1, 0x68($sp)
/* 95E4 8002E1E4 27A20028 */ addiu $v0, $sp, 0x28
/* 95E8 8002E1E8 AFA20014 */ sw $v0, 0x14($sp)
/* 95EC 8002E1EC 27A2002C */ addiu $v0, $sp, 0x2c
/* 95F0 8002E1F0 AFA20018 */ sw $v0, 0x18($sp)
/* 95F4 8002E1F4 27A20030 */ addiu $v0, $sp, 0x30
/* 95F8 8002E1F8 AFA2001C */ sw $v0, 0x1c($sp)
/* 95FC 8002E1FC 27A20034 */ addiu $v0, $sp, 0x34
/* 9600 8002E200 3C08800B */ lui $t0, %hi(D_800B1D60)
/* 9604 8002E204 25081D60 */ addiu $t0, $t0, %lo(D_800B1D60)
/* 9608 8002E208 AFA20020 */ sw $v0, 0x20($sp)
/* 960C 8002E20C 00041080 */ sll $v0, $a0, 2
/* 9610 8002E210 00441021 */ addu $v0, $v0, $a0
/* 9614 8002E214 00021080 */ sll $v0, $v0, 2
/* 9618 8002E218 00441023 */ subu $v0, $v0, $a0
/* 961C 8002E21C 000218C0 */ sll $v1, $v0, 3
/* 9620 8002E220 00431021 */ addu $v0, $v0, $v1
/* 9624 8002E224 000210C0 */ sll $v0, $v0, 3
/* 9628 8002E228 AFB00038 */ sw $s0, 0x38($sp)
/* 962C 8002E22C 00488021 */ addu $s0, $v0, $t0
/* 9630 8002E230 3C013F80 */ lui $at, 0x3f80
/* 9634 8002E234 44810000 */ mtc1 $at, $f0
/* 9638 8002E238 260400D4 */ addiu $a0, $s0, 0xd4
/* 963C 8002E23C AFBF0048 */ sw $ra, 0x48($sp)
/* 9640 8002E240 0C00A578 */ jal func_800295E0
/* 9644 8002E244 E7A00010 */ swc1 $f0, 0x10($sp)
/* 9648 8002E248 C7A00030 */ lwc1 $f0, 0x30($sp)
/* 964C 8002E24C 3C01459C */ lui $at, 0x459c
/* 9650 8002E250 34214000 */ ori $at, $at, 0x4000
/* 9654 8002E254 44811000 */ mtc1 $at, $f2
/* 9658 8002E258 00000000 */ nop
/* 965C 8002E25C 46020000 */ add.s $f0, $f0, $f2
/* 9660 8002E260 4600020D */ trunc.w.s $f8, $f0
/* 9664 8002E264 44024000 */ mfc1 $v0, $f8
/* 9668 8002E268 00000000 */ nop
/* 966C 8002E26C 04410003 */ bgez $v0, .L8002E27C
/* 9670 8002E270 AE220000 */ sw $v0, ($s1)
/* 9674 8002E274 0800B8A3 */ j .L8002E28C
/* 9678 8002E278 AE200000 */ sw $zero, ($s1)
.L8002E27C:
/* 967C 8002E27C 28422711 */ slti $v0, $v0, 0x2711
/* 9680 8002E280 14400002 */ bnez $v0, .L8002E28C
/* 9684 8002E284 24022710 */ addiu $v0, $zero, 0x2710
/* 9688 8002E288 AE220000 */ sw $v0, ($s1)
.L8002E28C:
/* 968C 8002E28C C7A20034 */ lwc1 $f2, 0x34($sp)
/* 9690 8002E290 3C01800A */ lui $at, %hi(D_800981E0)
/* 9694 8002E294 D42081E0 */ ldc1 $f0, %lo(D_800981E0)($at)
/* 9698 8002E298 460010A1 */ cvt.d.s $f2, $f2
/* 969C 8002E29C 4620103C */ c.lt.d $f2, $f0
/* 96A0 8002E2A0 00000000 */ nop
/* 96A4 8002E2A4 4500000B */ bc1f .L8002E2D4
/* 96A8 8002E2A8 00000000 */ nop
/* 96AC 8002E2AC 3C01800A */ lui $at, %hi(D_800981E8)
/* 96B0 8002E2B0 D42081E8 */ ldc1 $f0, %lo(D_800981E8)($at)
/* 96B4 8002E2B4 4622003C */ c.lt.d $f0, $f2
/* 96B8 8002E2B8 00000000 */ nop
/* 96BC 8002E2BC 45000005 */ bc1f .L8002E2D4
/* 96C0 8002E2C0 00000000 */ nop
/* 96C4 8002E2C4 AE400000 */ sw $zero, ($s2)
/* 96C8 8002E2C8 AE600000 */ sw $zero, ($s3)
/* 96CC 8002E2CC 0800B8F2 */ j .L8002E3C8
/* 96D0 8002E2D0 AE200000 */ sw $zero, ($s1)
.L8002E2D4:
/* 96D4 8002E2D4 C7A00034 */ lwc1 $f0, 0x34($sp)
/* 96D8 8002E2D8 3C013F80 */ lui $at, 0x3f80
/* 96DC 8002E2DC 44812000 */ mtc1 $at, $f4
/* 96E0 8002E2E0 C7A20028 */ lwc1 $f2, 0x28($sp)
/* 96E4 8002E2E4 9603000A */ lhu $v1, 0xa($s0)
/* 96E8 8002E2E8 46002103 */ div.s $f4, $f4, $f0
/* 96EC 8002E2EC 46041082 */ mul.s $f2, $f2, $f4
/* 96F0 8002E2F0 00000000 */ nop
/* 96F4 8002E2F4 00031C00 */ sll $v1, $v1, 0x10
/* 96F8 8002E2F8 00031403 */ sra $v0, $v1, 0x10
/* 96FC 8002E2FC 44820000 */ mtc1 $v0, $f0
/* 9700 8002E300 00000000 */ nop
/* 9704 8002E304 46800020 */ cvt.s.w $f0, $f0
/* 9708 8002E308 46001082 */ mul.s $f2, $f2, $f0
/* 970C 8002E30C 00000000 */ nop
/* 9710 8002E310 3C013F00 */ lui $at, 0x3f00
/* 9714 8002E314 44813000 */ mtc1 $at, $f6
/* 9718 8002E318 00000000 */ nop
/* 971C 8002E31C 46061082 */ mul.s $f2, $f2, $f6
/* 9720 8002E320 00000000 */ nop
/* 9724 8002E324 00031FC2 */ srl $v1, $v1, 0x1f
/* 9728 8002E328 00431021 */ addu $v0, $v0, $v1
/* 972C 8002E32C 00021043 */ sra $v0, $v0, 1
/* 9730 8002E330 44820000 */ mtc1 $v0, $f0
/* 9734 8002E334 00000000 */ nop
/* 9738 8002E338 46800020 */ cvt.s.w $f0, $f0
/* 973C 8002E33C 46020000 */ add.s $f0, $f0, $f2
/* 9740 8002E340 E7A40034 */ swc1 $f4, 0x34($sp)
/* 9744 8002E344 8603000E */ lh $v1, 0xe($s0)
/* 9748 8002E348 4600020D */ trunc.w.s $f8, $f0
/* 974C 8002E34C 44024000 */ mfc1 $v0, $f8
/* 9750 8002E350 00000000 */ nop
/* 9754 8002E354 00431021 */ addu $v0, $v0, $v1
/* 9758 8002E358 AE420000 */ sw $v0, ($s2)
/* 975C 8002E35C C7A2002C */ lwc1 $f2, 0x2c($sp)
/* 9760 8002E360 C7A00034 */ lwc1 $f0, 0x34($sp)
/* 9764 8002E364 9603000C */ lhu $v1, 0xc($s0)
/* 9768 8002E368 46001082 */ mul.s $f2, $f2, $f0
/* 976C 8002E36C 00000000 */ nop
/* 9770 8002E370 00031C00 */ sll $v1, $v1, 0x10
/* 9774 8002E374 00031403 */ sra $v0, $v1, 0x10
/* 9778 8002E378 44820000 */ mtc1 $v0, $f0
/* 977C 8002E37C 00000000 */ nop
/* 9780 8002E380 46800020 */ cvt.s.w $f0, $f0
/* 9784 8002E384 46001082 */ mul.s $f2, $f2, $f0
/* 9788 8002E388 00000000 */ nop
/* 978C 8002E38C 46061082 */ mul.s $f2, $f2, $f6
/* 9790 8002E390 00000000 */ nop
/* 9794 8002E394 00031FC2 */ srl $v1, $v1, 0x1f
/* 9798 8002E398 00431021 */ addu $v0, $v0, $v1
/* 979C 8002E39C 00021043 */ sra $v0, $v0, 1
/* 97A0 8002E3A0 44820000 */ mtc1 $v0, $f0
/* 97A4 8002E3A4 00000000 */ nop
/* 97A8 8002E3A8 46800020 */ cvt.s.w $f0, $f0
/* 97AC 8002E3AC 46020001 */ sub.s $f0, $f0, $f2
/* 97B0 8002E3B0 86030010 */ lh $v1, 0x10($s0)
/* 97B4 8002E3B4 4600020D */ trunc.w.s $f8, $f0
/* 97B8 8002E3B8 44024000 */ mfc1 $v0, $f8
/* 97BC 8002E3BC 00000000 */ nop
/* 97C0 8002E3C0 00431021 */ addu $v0, $v0, $v1
/* 97C4 8002E3C4 AE620000 */ sw $v0, ($s3)
.L8002E3C8:
/* 97C8 8002E3C8 8FBF0048 */ lw $ra, 0x48($sp)
/* 97CC 8002E3CC 8FB30044 */ lw $s3, 0x44($sp)
/* 97D0 8002E3D0 8FB20040 */ lw $s2, 0x40($sp)
/* 97D4 8002E3D4 8FB1003C */ lw $s1, 0x3c($sp)
/* 97D8 8002E3D8 8FB00038 */ lw $s0, 0x38($sp)
/* 97DC 8002E3DC 03E00008 */ jr $ra
/* 97E0 8002E3E0 27BD0050 */ addiu $sp, $sp, 0x50