papermario/ver/jp/asm/nonmatchings/main_285C0/func_8004FFA0.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

174 lines
8.6 KiB
ArmAsm

.set noat # allow manual use of $at
.set noreorder # don't insert nops after branches
glabel func_8004FFA0
/* 2B3A0 8004FFA0 27BDFFD8 */ addiu $sp, $sp, -0x28
/* 2B3A4 8004FFA4 AFB20018 */ sw $s2, 0x18($sp)
/* 2B3A8 8004FFA8 0080902D */ daddu $s2, $a0, $zero
/* 2B3AC 8004FFAC AFBF0020 */ sw $ra, 0x20($sp)
/* 2B3B0 8004FFB0 AFB3001C */ sw $s3, 0x1c($sp)
/* 2B3B4 8004FFB4 AFB10014 */ sw $s1, 0x14($sp)
/* 2B3B8 8004FFB8 AFB00010 */ sw $s0, 0x10($sp)
/* 2B3BC 8004FFBC 924200D4 */ lbu $v0, 0xd4($s2)
/* 2B3C0 8004FFC0 924300D5 */ lbu $v1, 0xd5($s2)
/* 2B3C4 8004FFC4 924600D6 */ lbu $a2, 0xd6($s2)
/* 2B3C8 8004FFC8 2444FFFF */ addiu $a0, $v0, -1
/* 2B3CC 8004FFCC 2C820006 */ sltiu $v0, $a0, 6
/* 2B3D0 8004FFD0 10400088 */ beqz $v0, .L800501F4
/* 2B3D4 8004FFD4 00041080 */ sll $v0, $a0, 2
/* 2B3D8 8004FFD8 3C01800A */ lui $at, %hi(D_800988B8)
/* 2B3DC 8004FFDC 00220821 */ addu $at, $at, $v0
/* 2B3E0 8004FFE0 8C2288B8 */ lw $v0, %lo(D_800988B8)($at)
/* 2B3E4 8004FFE4 00400008 */ jr $v0
/* 2B3E8 8004FFE8 00000000 */ nop
/* 2B3EC 8004FFEC 2C620004 */ sltiu $v0, $v1, 4
/* 2B3F0 8004FFF0 10400080 */ beqz $v0, .L800501F4
/* 2B3F4 8004FFF4 02431021 */ addu $v0, $s2, $v1
/* 2B3F8 8004FFF8 8043004C */ lb $v1, 0x4c($v0)
/* 2B3FC 8004FFFC 0460007D */ bltz $v1, .L800501F4
/* 2B400 80050000 9044004C */ lbu $a0, 0x4c($v0)
/* 2B404 80050004 8E420000 */ lw $v0, ($s2)
/* 2B408 80050008 10C00010 */ beqz $a2, .L8005004C
/* 2B40C 8005000C A0440051 */ sb $a0, 0x51($v0)
/* 2B410 80050010 30C7000F */ andi $a3, $a2, 0xf
/* 2B414 80050014 00061102 */ srl $v0, $a2, 4
/* 2B418 80050018 30420001 */ andi $v0, $v0, 1
/* 2B41C 8005001C 8E430000 */ lw $v1, ($s2)
/* 2B420 80050020 24450001 */ addiu $a1, $v0, 1
/* 2B424 80050024 90620052 */ lbu $v0, 0x52($v1)
/* 2B428 80050028 14470004 */ bne $v0, $a3, .L8005003C
/* 2B42C 8005002C 00A0202D */ daddu $a0, $a1, $zero
/* 2B430 80050030 90620053 */ lbu $v0, 0x53($v1)
/* 2B434 80050034 1044006F */ beq $v0, $a0, .L800501F4
/* 2B438 80050038 00000000 */ nop
.L8005003C:
/* 2B43C 8005003C A0670052 */ sb $a3, 0x52($v1)
/* 2B440 80050040 8E420000 */ lw $v0, ($s2)
/* 2B444 80050044 08014018 */ j .L80050060
/* 2B448 80050048 A0450053 */ sb $a1, 0x53($v0)
.L8005004C:
/* 2B44C 8005004C 8E430000 */ lw $v1, ($s2)
/* 2B450 80050050 90620053 */ lbu $v0, 0x53($v1)
/* 2B454 80050054 10400067 */ beqz $v0, .L800501F4
/* 2B458 80050058 00000000 */ nop
/* 2B45C 8005005C A0600053 */ sb $zero, 0x53($v1)
.L80050060:
/* 2B460 80050060 8E430000 */ lw $v1, ($s2)
/* 2B464 80050064 24020001 */ addiu $v0, $zero, 1
/* 2B468 80050068 0801407D */ j .L800501F4
/* 2B46C 8005006C A0620050 */ sb $v0, 0x50($v1)
/* 2B470 80050070 2465FFFF */ addiu $a1, $v1, -1
/* 2B474 80050074 2CA20008 */ sltiu $v0, $a1, 8
/* 2B478 80050078 5040005E */ beql $v0, $zero, .L800501F4
/* 2B47C 8005007C A2400211 */ sb $zero, 0x211($s2)
/* 2B480 80050080 A2430211 */ sb $v1, 0x211($s2)
/* 2B484 80050084 0C01393D */ jal func_8004E4F4
/* 2B488 80050088 0240202D */ daddu $a0, $s2, $zero
/* 2B48C 8005008C 0801407D */ j .L800501F4
/* 2B490 80050090 00000000 */ nop
/* 2B494 80050094 92500211 */ lbu $s0, 0x211($s2)
/* 2B498 80050098 2604FFFF */ addiu $a0, $s0, -1
/* 2B49C 8005009C 2C820008 */ sltiu $v0, $a0, 8
/* 2B4A0 800500A0 10400054 */ beqz $v0, .L800501F4
/* 2B4A4 800500A4 0080802D */ daddu $s0, $a0, $zero
/* 2B4A8 800500A8 02501021 */ addu $v0, $s2, $s0
/* 2B4AC 800500AC 90440212 */ lbu $a0, 0x212($v0)
/* 2B4B0 800500B0 2C820008 */ sltiu $v0, $a0, 8
/* 2B4B4 800500B4 1040004F */ beqz $v0, .L800501F4
/* 2B4B8 800500B8 2C620028 */ sltiu $v0, $v1, 0x28
/* 2B4BC 800500BC 14400005 */ bnez $v0, .L800500D4
/* 2B4C0 800500C0 001010C0 */ sll $v0, $s0, 3
/* 2B4C4 800500C4 00501021 */ addu $v0, $v0, $s0
/* 2B4C8 800500C8 00441021 */ addu $v0, $v0, $a0
/* 2B4CC 800500CC 0801403B */ j .L800500EC
/* 2B4D0 800500D0 00021040 */ sll $v0, $v0, 1
.L800500D4:
/* 2B4D4 800500D4 00501021 */ addu $v0, $v0, $s0
/* 2B4D8 800500D8 00441021 */ addu $v0, $v0, $a0
/* 2B4DC 800500DC 00021040 */ sll $v0, $v0, 1
/* 2B4E0 800500E0 3C018008 */ lui $at, %hi(D_80078528)
/* 2B4E4 800500E4 00230821 */ addu $at, $at, $v1
/* 2B4E8 800500E8 90238528 */ lbu $v1, %lo(D_80078528)($at)
.L800500EC:
/* 2B4EC 800500EC 02421021 */ addu $v0, $s2, $v0
/* 2B4F0 800500F0 00031A00 */ sll $v1, $v1, 8
/* 2B4F4 800500F4 00661821 */ addu $v1, $v1, $a2
/* 2B4F8 800500F8 A4430174 */ sh $v1, 0x174($v0)
/* 2B4FC 800500FC 02501821 */ addu $v1, $s2, $s0
/* 2B500 80050100 24820001 */ addiu $v0, $a0, 1
/* 2B504 80050104 0801407D */ j .L800501F4
/* 2B508 80050108 A0620212 */ sb $v0, 0x212($v1)
/* 2B50C 8005010C 2C620009 */ sltiu $v0, $v1, 9
/* 2B510 80050110 50400038 */ beql $v0, $zero, .L800501F4
/* 2B514 80050114 A0A0004C */ sb $zero, 0x4c($a1)
/* 2B518 80050118 0801407D */ j .L800501F4
/* 2B51C 8005011C A0A3004C */ sb $v1, 0x4c($a1)
/* 2B520 80050120 8E420004 */ lw $v0, 4($s2)
/* 2B524 80050124 10400033 */ beqz $v0, .L800501F4
/* 2B528 80050128 0000802D */ daddu $s0, $zero, $zero
/* 2B52C 8005012C 0040282D */ daddu $a1, $v0, $zero
.L80050130:
/* 2B530 80050130 00A0202D */ daddu $a0, $a1, $zero
/* 2B534 80050134 90820090 */ lbu $v0, 0x90($a0)
/* 2B538 80050138 10400022 */ beqz $v0, .L800501C4
/* 2B53C 8005013C 00103080 */ sll $a2, $s0, 2
/* 2B540 80050140 26100001 */ addiu $s0, $s0, 1
/* 2B544 80050144 2E020004 */ sltiu $v0, $s0, 4
/* 2B548 80050148 1440FFF9 */ bnez $v0, .L80050130
/* 2B54C 8005014C 24850004 */ addiu $a1, $a0, 4
/* 2B550 80050150 0801407D */ j .L800501F4
/* 2B554 80050154 00000000 */ nop
/* 2B558 80050158 54600025 */ bnel $v1, $zero, .L800501F0
/* 2B55C 8005015C A0A3004F */ sb $v1, 0x4f($a1)
/* 2B560 80050160 90A2004E */ lbu $v0, 0x4e($a1)
/* 2B564 80050164 10400023 */ beqz $v0, .L800501F4
/* 2B568 80050168 0000802D */ daddu $s0, $zero, $zero
/* 2B56C 8005016C A0A0004E */ sb $zero, 0x4e($a1)
/* 2B570 80050170 2413007F */ addiu $s3, $zero, 0x7f
/* 2B574 80050174 2411025C */ addiu $s1, $zero, 0x25c
.L80050178:
/* 2B578 80050178 92420171 */ lbu $v0, 0x171($s2)
/* 2B57C 8005017C 14530004 */ bne $v0, $s3, .L80050190
/* 2B580 80050180 02512821 */ addu $a1, $s2, $s1
/* 2B584 80050184 90A2004F */ lbu $v0, 0x4f($a1)
/* 2B588 80050188 08014065 */ j .L80050194
/* 2B58C 8005018C 00000000 */ nop
.L80050190:
/* 2B590 80050190 90A20050 */ lbu $v0, 0x50($a1)
.L80050194:
/* 2B594 80050194 10400005 */ beqz $v0, .L800501AC
/* 2B598 80050198 0240202D */ daddu $a0, $s2, $zero
/* 2B59C 8005019C 0040302D */ daddu $a2, $v0, $zero
/* 2B5A0 800501A0 24070048 */ addiu $a3, $zero, 0x48
/* 2B5A4 800501A4 0C01414E */ jal func_80050538
/* 2B5A8 800501A8 A0A0004E */ sb $zero, 0x4e($a1)
.L800501AC:
/* 2B5AC 800501AC 26100001 */ addiu $s0, $s0, 1
/* 2B5B0 800501B0 2E020010 */ sltiu $v0, $s0, 0x10
/* 2B5B4 800501B4 1440FFF0 */ bnez $v0, .L80050178
/* 2B5B8 800501B8 26310060 */ addiu $s1, $s1, 0x60
/* 2B5BC 800501BC 0801407D */ j .L800501F4
/* 2B5C0 800501C0 00000000 */ nop
.L800501C4:
/* 2B5C4 800501C4 A0A30090 */ sb $v1, 0x90($a1)
/* 2B5C8 800501C8 9643002C */ lhu $v1, 0x2c($s2)
/* 2B5CC 800501CC 9642003C */ lhu $v0, 0x3c($s2)
/* 2B5D0 800501D0 00620018 */ mult $v1, $v0
/* 2B5D4 800501D4 8E430004 */ lw $v1, 4($s2)
/* 2B5D8 800501D8 00661821 */ addu $v1, $v1, $a2
/* 2B5DC 800501DC 00004012 */ mflo $t0
/* 2B5E0 800501E0 25027FFF */ addiu $v0, $t0, 0x7fff
/* 2B5E4 800501E4 000215C3 */ sra $v0, $v0, 0x17
/* 2B5E8 800501E8 0801407D */ j .L800501F4
/* 2B5EC 800501EC A0620093 */ sb $v0, 0x93($v1)
.L800501F0:
/* 2B5F0 800501F0 A0A60050 */ sb $a2, 0x50($a1)
.L800501F4:
/* 2B5F4 800501F4 8FBF0020 */ lw $ra, 0x20($sp)
/* 2B5F8 800501F8 8FB3001C */ lw $s3, 0x1c($sp)
/* 2B5FC 800501FC 8FB20018 */ lw $s2, 0x18($sp)
/* 2B600 80050200 8FB10014 */ lw $s1, 0x14($sp)
/* 2B604 80050204 8FB00010 */ lw $s0, 0x10($sp)
/* 2B608 80050208 03E00008 */ jr $ra
/* 2B60C 8005020C 27BD0028 */ addiu $sp, $sp, 0x28