papermario/ver/jp/asm/nonmatchings/3D580/func_80062500.s
Ethan Roseman 3315d6010f
Splat refactor (#257)
* all non-world rodata migrated

* data disasm

* kinda working

* updated yaml

* bloop

* linker header

* configure 2.0

* bin

* mass rename to remove code_

* pause rename

* battle partner stuff

* whew

* more renames

* more renames

* more renaming

* it builds!

* updates

* remove main prefix

* one more thing

* crc, yay0

* .data, .rodata, .bss

* img

* dead_atan2

* it buildsgit add -A

* split battle/partner/6FAD10

* rm &s on sleepy_sheep syms

* sha1sum ninja rule description

* OK but commented out PaperMarioMapFS and PaperMarioNpcSprites

* uncomment

* fix mapfs

* match func_8003CFB4

* .

* clean up and name npc_iter_no_op

* npc.c

* enable cc warnings

* name npc_find_near

* use singular options.asset_path

* smores

* cc_dsl only when needed

* kinda fix configure for splat refactor2

* ok!

* new msg format

* remove old msg format docs

* slight bug fixes, splat adjustment

* git subrepo pull (merge) --force tools/splat

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

* git subrepo pull (merge) --force tools/splat

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

* Update symbol addrs

* git subrepo pull tools/splat

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

Co-authored-by: Alex Bates <hi@imalex.xyz>
2021-04-13 16:47:52 +09:00

236 lines
12 KiB
ArmAsm

.set noat # allow manual use of $at
.set noreorder # don't insert nops after branches
glabel func_80062500
/* 3D900 80062500 27BDFF48 */ addiu $sp, $sp, -0xb8
/* 3D904 80062504 AFB20068 */ sw $s2, 0x68($sp)
/* 3D908 80062508 8FB200D4 */ lw $s2, 0xd4($sp)
/* 3D90C 8006250C AFB10064 */ sw $s1, 0x64($sp)
/* 3D910 80062510 8FB100D8 */ lw $s1, 0xd8($sp)
/* 3D914 80062514 AFB00060 */ sw $s0, 0x60($sp)
/* 3D918 80062518 8FB000DC */ lw $s0, 0xdc($sp)
/* 3D91C 8006251C F7B40088 */ sdc1 $f20, 0x88($sp)
/* 3D920 80062520 C7B400C8 */ lwc1 $f20, 0xc8($sp)
/* 3D924 80062524 F7B60090 */ sdc1 $f22, 0x90($sp)
/* 3D928 80062528 C7B600CC */ lwc1 $f22, 0xcc($sp)
/* 3D92C 8006252C F7B80098 */ sdc1 $f24, 0x98($sp)
/* 3D930 80062530 C7B800D0 */ lwc1 $f24, 0xd0($sp)
/* 3D934 80062534 AFB3006C */ sw $s3, 0x6c($sp)
/* 3D938 80062538 00A09821 */ addu $s3, $a1, $zero
/* 3D93C 8006253C AFB40070 */ sw $s4, 0x70($sp)
/* 3D940 80062540 00C0A021 */ addu $s4, $a2, $zero
/* 3D944 80062544 AFB50074 */ sw $s5, 0x74($sp)
/* 3D948 80062548 00E0A821 */ addu $s5, $a3, $zero
/* 3D94C 8006254C AFBE0080 */ sw $fp, 0x80($sp)
/* 3D950 80062550 27BE0010 */ addiu $fp, $sp, 0x10
/* 3D954 80062554 AFA40054 */ sw $a0, 0x54($sp)
/* 3D958 80062558 AFBF0084 */ sw $ra, 0x84($sp)
/* 3D95C 8006255C AFB7007C */ sw $s7, 0x7c($sp)
/* 3D960 80062560 AFB60078 */ sw $s6, 0x78($sp)
/* 3D964 80062564 F7BE00B0 */ sdc1 $f30, 0xb0($sp)
/* 3D968 80062568 F7BC00A8 */ sdc1 $f28, 0xa8($sp)
/* 3D96C 8006256C F7BA00A0 */ sdc1 $f26, 0xa0($sp)
/* 3D970 80062570 0C019D20 */ jal func_80067480
/* 3D974 80062574 03C02021 */ addu $a0, $fp, $zero
/* 3D978 80062578 44937000 */ mtc1 $s3, $f14
/* 3D97C 8006257C 00000000 */ nop
/* 3D980 80062580 460EA681 */ sub.s $f26, $f20, $f14
/* 3D984 80062584 461AD002 */ mul.s $f0, $f26, $f26
/* 3D988 80062588 44949000 */ mtc1 $s4, $f18
/* 3D98C 8006258C 00000000 */ nop
/* 3D990 80062590 4612B701 */ sub.s $f28, $f22, $f18
/* 3D994 80062594 461CE102 */ mul.s $f4, $f28, $f28
/* 3D998 80062598 44957000 */ mtc1 $s5, $f14
/* 3D99C 8006259C 00000000 */ nop
/* 3D9A0 800625A0 460EC781 */ sub.s $f30, $f24, $f14
/* 3D9A4 800625A4 461EF082 */ mul.s $f2, $f30, $f30
/* 3D9A8 800625A8 46040000 */ add.s $f0, $f0, $f4
/* 3D9AC 800625AC 46020300 */ add.s $f12, $f0, $f2
/* 3D9B0 800625B0 46006084 */ sqrt.s $f2, $f12
/* 3D9B4 800625B4 46021032 */ c.eq.s $f2, $f2
/* 3D9B8 800625B8 00000000 */ nop
/* 3D9BC 800625BC 45010004 */ bc1t .L800625D0
/* 3D9C0 800625C0 00000000 */ nop
/* 3D9C4 800625C4 0C0187B0 */ jal func_80061EC0
/* 3D9C8 800625C8 00000000 */ nop
/* 3D9CC 800625CC 46000086 */ mov.s $f2, $f0
.L800625D0:
/* 3D9D0 800625D0 3C01800A */ lui $at, %hi(D_80099B40)
/* 3D9D4 800625D4 D4209B40 */ ldc1 $f0, %lo(D_80099B40)($at)
/* 3D9D8 800625D8 460010A1 */ cvt.d.s $f2, $f2
/* 3D9DC 800625DC 46220003 */ div.d $f0, $f0, $f2
/* 3D9E0 800625E0 46200420 */ cvt.s.d $f16, $f0
/* 3D9E4 800625E4 4610D682 */ mul.s $f26, $f26, $f16
/* 3D9E8 800625E8 00000000 */ nop
/* 3D9EC 800625EC 4610F782 */ mul.s $f30, $f30, $f16
/* 3D9F0 800625F0 00000000 */ nop
/* 3D9F4 800625F4 4610E702 */ mul.s $f28, $f28, $f16
/* 3D9F8 800625F8 44919000 */ mtc1 $s1, $f18
/* 3D9FC 800625FC 00000000 */ nop
/* 3DA00 80062600 461E9102 */ mul.s $f4, $f18, $f30
/* 3DA04 80062604 44907000 */ mtc1 $s0, $f14
/* 3DA08 80062608 00000000 */ nop
/* 3DA0C 8006260C 461C7002 */ mul.s $f0, $f14, $f28
/* 3DA10 80062610 00000000 */ nop
/* 3DA14 80062614 461A7202 */ mul.s $f8, $f14, $f26
/* 3DA18 80062618 44929000 */ mtc1 $s2, $f18
/* 3DA1C 8006261C 00000000 */ nop
/* 3DA20 80062620 461E9082 */ mul.s $f2, $f18, $f30
/* 3DA24 80062624 00000000 */ nop
/* 3DA28 80062628 461C9282 */ mul.s $f10, $f18, $f28
/* 3DA2C 8006262C 44917000 */ mtc1 $s1, $f14
/* 3DA30 80062630 00000000 */ nop
/* 3DA34 80062634 461A7182 */ mul.s $f6, $f14, $f26
/* 3DA38 80062638 46002601 */ sub.s $f24, $f4, $f0
/* 3DA3C 8006263C 4618C002 */ mul.s $f0, $f24, $f24
/* 3DA40 80062640 46024581 */ sub.s $f22, $f8, $f2
/* 3DA44 80062644 4616B102 */ mul.s $f4, $f22, $f22
/* 3DA48 80062648 46065501 */ sub.s $f20, $f10, $f6
/* 3DA4C 8006264C 4614A082 */ mul.s $f2, $f20, $f20
/* 3DA50 80062650 46040000 */ add.s $f0, $f0, $f4
/* 3DA54 80062654 46020300 */ add.s $f12, $f0, $f2
/* 3DA58 80062658 46006004 */ sqrt.s $f0, $f12
/* 3DA5C 8006265C 46000032 */ c.eq.s $f0, $f0
/* 3DA60 80062660 00000000 */ nop
/* 3DA64 80062664 45010003 */ bc1t .L80062674
/* 3DA68 80062668 00000000 */ nop
/* 3DA6C 8006266C 0C0187B0 */ jal func_80061EC0
/* 3DA70 80062670 00000000 */ nop
.L80062674:
/* 3DA74 80062674 3C01800A */ lui $at, %hi(D_80099B48)
/* 3DA78 80062678 8C369B48 */ lw $s6, %lo(D_80099B48)($at)
/* 3DA7C 8006267C 8C379B4C */ lw $s7, -0x64b4($at)
/* 3DA80 80062680 44979000 */ mtc1 $s7, $f18
/* 3DA84 80062684 44969800 */ mtc1 $s6, $f19
/* 3DA88 80062688 46000021 */ cvt.d.s $f0, $f0
/* 3DA8C 8006268C 46209003 */ div.d $f0, $f18, $f0
/* 3DA90 80062690 46200420 */ cvt.s.d $f16, $f0
/* 3DA94 80062694 4610C602 */ mul.s $f24, $f24, $f16
/* 3DA98 80062698 00000000 */ nop
/* 3DA9C 8006269C 4610A502 */ mul.s $f20, $f20, $f16
/* 3DAA0 800626A0 00000000 */ nop
/* 3DAA4 800626A4 4610B582 */ mul.s $f22, $f22, $f16
/* 3DAA8 800626A8 00000000 */ nop
/* 3DAAC 800626AC 4614E102 */ mul.s $f4, $f28, $f20
/* 3DAB0 800626B0 00000000 */ nop
/* 3DAB4 800626B4 4616F002 */ mul.s $f0, $f30, $f22
/* 3DAB8 800626B8 00000000 */ nop
/* 3DABC 800626BC 4618F202 */ mul.s $f8, $f30, $f24
/* 3DAC0 800626C0 00000000 */ nop
/* 3DAC4 800626C4 4614D082 */ mul.s $f2, $f26, $f20
/* 3DAC8 800626C8 00000000 */ nop
/* 3DACC 800626CC 4616D282 */ mul.s $f10, $f26, $f22
/* 3DAD0 800626D0 00000000 */ nop
/* 3DAD4 800626D4 4618E182 */ mul.s $f6, $f28, $f24
/* 3DAD8 800626D8 46002101 */ sub.s $f4, $f4, $f0
/* 3DADC 800626DC 46042002 */ mul.s $f0, $f4, $f4
/* 3DAE0 800626E0 46024201 */ sub.s $f8, $f8, $f2
/* 3DAE4 800626E4 44122000 */ mfc1 $s2, $f4
/* 3DAE8 800626E8 46084102 */ mul.s $f4, $f8, $f8
/* 3DAEC 800626EC 46065281 */ sub.s $f10, $f10, $f6
/* 3DAF0 800626F0 460A5082 */ mul.s $f2, $f10, $f10
/* 3DAF4 800626F4 46040000 */ add.s $f0, $f0, $f4
/* 3DAF8 800626F8 46020300 */ add.s $f12, $f0, $f2
/* 3DAFC 800626FC 46006004 */ sqrt.s $f0, $f12
/* 3DB00 80062700 46000032 */ c.eq.s $f0, $f0
/* 3DB04 80062704 44114000 */ mfc1 $s1, $f8
/* 3DB08 80062708 44105000 */ mfc1 $s0, $f10
/* 3DB0C 8006270C 45010003 */ bc1t .L8006271C
/* 3DB10 80062710 00000000 */ nop
/* 3DB14 80062714 0C0187B0 */ jal func_80061EC0
/* 3DB18 80062718 00000000 */ nop
.L8006271C:
/* 3DB1C 8006271C 44977000 */ mtc1 $s7, $f14
/* 3DB20 80062720 44967800 */ mtc1 $s6, $f15
/* 3DB24 80062724 46000021 */ cvt.d.s $f0, $f0
/* 3DB28 80062728 46207003 */ div.d $f0, $f14, $f0
/* 3DB2C 8006272C 44929000 */ mtc1 $s2, $f18
/* 3DB30 80062730 46200420 */ cvt.s.d $f16, $f0
/* 3DB34 80062734 46109482 */ mul.s $f18, $f18, $f16
/* 3DB38 80062738 44917000 */ mtc1 $s1, $f14
/* 3DB3C 8006273C 00000000 */ nop
/* 3DB40 80062740 46107382 */ mul.s $f14, $f14, $f16
/* 3DB44 80062744 44129000 */ mfc1 $s2, $f18
/* 3DB48 80062748 44939000 */ mtc1 $s3, $f18
/* 3DB4C 8006274C 00000000 */ nop
/* 3DB50 80062750 46189082 */ mul.s $f2, $f18, $f24
/* 3DB54 80062754 44117000 */ mfc1 $s1, $f14
/* 3DB58 80062758 44947000 */ mtc1 $s4, $f14
/* 3DB5C 8006275C 00000000 */ nop
/* 3DB60 80062760 46167182 */ mul.s $f6, $f14, $f22
/* 3DB64 80062764 44959000 */ mtc1 $s5, $f18
/* 3DB68 80062768 00000000 */ nop
/* 3DB6C 8006276C 46149202 */ mul.s $f8, $f18, $f20
/* 3DB70 80062770 44937000 */ mtc1 $s3, $f14
/* 3DB74 80062774 44929000 */ mtc1 $s2, $f18
/* 3DB78 80062778 00000000 */ nop
/* 3DB7C 8006277C 46127102 */ mul.s $f4, $f14, $f18
/* 3DB80 80062780 44947000 */ mtc1 $s4, $f14
/* 3DB84 80062784 44919000 */ mtc1 $s1, $f18
/* 3DB88 80062788 00000000 */ nop
/* 3DB8C 8006278C 46127282 */ mul.s $f10, $f14, $f18
/* 3DB90 80062790 44937000 */ mtc1 $s3, $f14
/* 3DB94 80062794 00000000 */ nop
/* 3DB98 80062798 461A7002 */ mul.s $f0, $f14, $f26
/* 3DB9C 8006279C 44949000 */ mtc1 $s4, $f18
/* 3DBA0 800627A0 00000000 */ nop
/* 3DBA4 800627A4 461C9302 */ mul.s $f12, $f18, $f28
/* 3DBA8 800627A8 44957000 */ mtc1 $s5, $f14
/* 3DBAC 800627AC 8FA50054 */ lw $a1, 0x54($sp)
/* 3DBB0 800627B0 461E7382 */ mul.s $f14, $f14, $f30
/* 3DBB4 800627B4 46061080 */ add.s $f2, $f2, $f6
/* 3DBB8 800627B8 3C013F80 */ lui $at, 0x3f80
/* 3DBBC 800627BC 44813000 */ mtc1 $at, $f6
/* 3DBC0 800627C0 03C02021 */ addu $a0, $fp, $zero
/* 3DBC4 800627C4 E7B80010 */ swc1 $f24, 0x10($sp)
/* 3DBC8 800627C8 44909000 */ mtc1 $s0, $f18
/* 3DBCC 800627CC 460C0000 */ add.s $f0, $f0, $f12
/* 3DBD0 800627D0 E7B60020 */ swc1 $f22, 0x20($sp)
/* 3DBD4 800627D4 46109482 */ mul.s $f18, $f18, $f16
/* 3DBD8 800627D8 E7B40030 */ swc1 $f20, 0x30($sp)
/* 3DBDC 800627DC 460E0000 */ add.s $f0, $f0, $f14
/* 3DBE0 800627E0 E7BA0018 */ swc1 $f26, 0x18($sp)
/* 3DBE4 800627E4 E7BC0028 */ swc1 $f28, 0x28($sp)
/* 3DBE8 800627E8 44957000 */ mtc1 $s5, $f14
/* 3DBEC 800627EC 46081080 */ add.s $f2, $f2, $f8
/* 3DBF0 800627F0 46127202 */ mul.s $f8, $f14, $f18
/* 3DBF4 800627F4 E7BE0038 */ swc1 $f30, 0x38($sp)
/* 3DBF8 800627F8 AFA0001C */ sw $zero, 0x1c($sp)
/* 3DBFC 800627FC 460A2100 */ add.s $f4, $f4, $f10
/* 3DC00 80062800 AFA0002C */ sw $zero, 0x2c($sp)
/* 3DC04 80062804 AFA0003C */ sw $zero, 0x3c($sp)
/* 3DC08 80062808 AFB20014 */ sw $s2, 0x14($sp)
/* 3DC0C 8006280C 46082100 */ add.s $f4, $f4, $f8
/* 3DC10 80062810 AFB10024 */ sw $s1, 0x24($sp)
/* 3DC14 80062814 E7A6004C */ swc1 $f6, 0x4c($sp)
/* 3DC18 80062818 44109000 */ mfc1 $s0, $f18
/* 3DC1C 8006281C 46001087 */ neg.s $f2, $f2
/* 3DC20 80062820 AFB00034 */ sw $s0, 0x34($sp)
/* 3DC24 80062824 46000007 */ neg.s $f0, $f0
/* 3DC28 80062828 E7A20040 */ swc1 $f2, 0x40($sp)
/* 3DC2C 8006282C 46002107 */ neg.s $f4, $f4
/* 3DC30 80062830 E7A00048 */ swc1 $f0, 0x48($sp)
/* 3DC34 80062834 0C019D38 */ jal func_800674E0
/* 3DC38 80062838 E7A40044 */ swc1 $f4, 0x44($sp)
/* 3DC3C 8006283C 8FBF0084 */ lw $ra, 0x84($sp)
/* 3DC40 80062840 8FBE0080 */ lw $fp, 0x80($sp)
/* 3DC44 80062844 8FB7007C */ lw $s7, 0x7c($sp)
/* 3DC48 80062848 8FB60078 */ lw $s6, 0x78($sp)
/* 3DC4C 8006284C 8FB50074 */ lw $s5, 0x74($sp)
/* 3DC50 80062850 8FB40070 */ lw $s4, 0x70($sp)
/* 3DC54 80062854 8FB3006C */ lw $s3, 0x6c($sp)
/* 3DC58 80062858 8FB20068 */ lw $s2, 0x68($sp)
/* 3DC5C 8006285C 8FB10064 */ lw $s1, 0x64($sp)
/* 3DC60 80062860 8FB00060 */ lw $s0, 0x60($sp)
/* 3DC64 80062864 D7BE00B0 */ ldc1 $f30, 0xb0($sp)
/* 3DC68 80062868 D7BC00A8 */ ldc1 $f28, 0xa8($sp)
/* 3DC6C 8006286C D7BA00A0 */ ldc1 $f26, 0xa0($sp)
/* 3DC70 80062870 D7B80098 */ ldc1 $f24, 0x98($sp)
/* 3DC74 80062874 D7B60090 */ ldc1 $f22, 0x90($sp)
/* 3DC78 80062878 D7B40088 */ ldc1 $f20, 0x88($sp)
/* 3DC7C 8006287C 03E00008 */ jr $ra
/* 3DC80 80062880 27BD00B8 */ addiu $sp, $sp, 0xb8
/* 3DC84 80062884 00000000 */ nop
/* 3DC88 80062888 00000000 */ nop
/* 3DC8C 8006288C 00000000 */ nop