papermario/asm/nonmatchings/os/code_491c0_len_f80/func_8006E310.s
2020-08-12 22:37:16 -04:00

399 lines
18 KiB
ArmAsm

.set noat # allow manual use of $at
.set noreorder # don't insert nops after branches
glabel func_8006E310
/* 049710 8006E310 00E0482D */ daddu $t1, $a3, $zero
/* 049714 8006E314 00C0402D */ daddu $t0, $a2, $zero
/* 049718 8006E318 150000DF */ bnez $t0, .L8006E698
/* 04971C 8006E31C 00A0582D */ daddu $t3, $a1, $zero
/* 049720 8006E320 0089102B */ sltu $v0, $a0, $t1
/* 049724 8006E324 1040004E */ beqz $v0, .L8006E460
/* 049728 8006E328 3402FFFF */ ori $v0, $zero, 0xffff
/* 04972C 8006E32C 0049102B */ sltu $v0, $v0, $t1
/* 049730 8006E330 14400005 */ bnez $v0, .L8006E348
/* 049734 8006E334 00E0302D */ daddu $a2, $a3, $zero
/* 049738 8006E338 2D220100 */ sltiu $v0, $t1, 0x100
/* 04973C 8006E33C 38420001 */ xori $v0, $v0, 1
/* 049740 8006E340 0801B8D8 */ j .L8006E360
/* 049744 8006E344 000218C0 */ sll $v1, $v0, 3
.L8006E348:
/* 049748 8006E348 3C0200FF */ lui $v0, 0xff
/* 04974C 8006E34C 3442FFFF */ ori $v0, $v0, 0xffff
/* 049750 8006E350 0049102B */ sltu $v0, $v0, $t1
/* 049754 8006E354 14400002 */ bnez $v0, .L8006E360
/* 049758 8006E358 24030018 */ addiu $v1, $zero, 0x18
/* 04975C 8006E35C 24030010 */ addiu $v1, $zero, 0x10
.L8006E360:
/* 049760 8006E360 00661006 */ srlv $v0, $a2, $v1
/* 049764 8006E364 3C01800A */ lui $at, 0x800a
/* 049768 8006E368 00220821 */ addu $at, $at, $v0
/* 04976C 8006E36C 9022A040 */ lbu $v0, -0x5fc0($at)
/* 049770 8006E370 24050020 */ addiu $a1, $zero, 0x20
/* 049774 8006E374 00431021 */ addu $v0, $v0, $v1
/* 049778 8006E378 00A23023 */ subu $a2, $a1, $v0
/* 04977C 8006E37C 10C00006 */ beqz $a2, .L8006E398
/* 049780 8006E380 00C41804 */ sllv $v1, $a0, $a2
/* 049784 8006E384 00C94804 */ sllv $t1, $t1, $a2
/* 049788 8006E388 00A61023 */ subu $v0, $a1, $a2
/* 04978C 8006E38C 004B1006 */ srlv $v0, $t3, $v0
/* 049790 8006E390 00622025 */ or $a0, $v1, $v0
/* 049794 8006E394 00CB5804 */ sllv $t3, $t3, $a2
.L8006E398:
/* 049798 8006E398 00093402 */ srl $a2, $t1, 0x10
/* 04979C 8006E39C 14C00002 */ bnez $a2, .L8006E3A8
/* 0497A0 8006E3A0 0086001B */ divu $zero, $a0, $a2
/* 0497A4 8006E3A4 0007000D */ break 7
.L8006E3A8:
/* 0497A8 8006E3A8 00003812 */ mflo $a3
/* 0497AC 8006E3AC 00001810 */ mfhi $v1
/* 0497B0 8006E3B0 3128FFFF */ andi $t0, $t1, 0xffff
/* 0497B4 8006E3B4 00000000 */ nop
/* 0497B8 8006E3B8 00E80018 */ mult $a3, $t0
/* 0497BC 8006E3BC 000B1402 */ srl $v0, $t3, 0x10
/* 0497C0 8006E3C0 00031C00 */ sll $v1, $v1, 0x10
/* 0497C4 8006E3C4 00621825 */ or $v1, $v1, $v0
/* 0497C8 8006E3C8 00002812 */ mflo $a1
/* 0497CC 8006E3CC 0065102B */ sltu $v0, $v1, $a1
/* 0497D0 8006E3D0 5040000B */ beql $v0, $zero, .L8006E400
/* 0497D4 8006E3D4 00651823 */ subu $v1, $v1, $a1
/* 0497D8 8006E3D8 00691821 */ addu $v1, $v1, $t1
/* 0497DC 8006E3DC 0069102B */ sltu $v0, $v1, $t1
/* 0497E0 8006E3E0 14400006 */ bnez $v0, .L8006E3FC
/* 0497E4 8006E3E4 24E7FFFF */ addiu $a3, $a3, -1
/* 0497E8 8006E3E8 0065102B */ sltu $v0, $v1, $a1
/* 0497EC 8006E3EC 50400004 */ beql $v0, $zero, .L8006E400
/* 0497F0 8006E3F0 00651823 */ subu $v1, $v1, $a1
/* 0497F4 8006E3F4 24E7FFFF */ addiu $a3, $a3, -1
/* 0497F8 8006E3F8 00691821 */ addu $v1, $v1, $t1
.L8006E3FC:
/* 0497FC 8006E3FC 00651823 */ subu $v1, $v1, $a1
.L8006E400:
/* 049800 8006E400 14C00002 */ bnez $a2, .L8006E40C
/* 049804 8006E404 0066001B */ divu $zero, $v1, $a2
/* 049808 8006E408 0007000D */ break 7
.L8006E40C:
/* 04980C 8006E40C 00002012 */ mflo $a0
/* 049810 8006E410 00001810 */ mfhi $v1
/* 049814 8006E414 00000000 */ nop
/* 049818 8006E418 00000000 */ nop
/* 04981C 8006E41C 00880018 */ mult $a0, $t0
/* 049820 8006E420 3162FFFF */ andi $v0, $t3, 0xffff
/* 049824 8006E424 00031C00 */ sll $v1, $v1, 0x10
/* 049828 8006E428 00621825 */ or $v1, $v1, $v0
/* 04982C 8006E42C 00002812 */ mflo $a1
/* 049830 8006E430 0065102B */ sltu $v0, $v1, $a1
/* 049834 8006E434 10400007 */ beqz $v0, .L8006E454
/* 049838 8006E438 00691821 */ addu $v1, $v1, $t1
/* 04983C 8006E43C 0069102B */ sltu $v0, $v1, $t1
/* 049840 8006E440 14400004 */ bnez $v0, .L8006E454
/* 049844 8006E444 2484FFFF */ addiu $a0, $a0, -1
/* 049848 8006E448 0065102B */ sltu $v0, $v1, $a1
/* 04984C 8006E44C 54400001 */ bnel $v0, $zero, .L8006E454
/* 049850 8006E450 2484FFFF */ addiu $a0, $a0, -1
.L8006E454:
/* 049854 8006E454 00071400 */ sll $v0, $a3, 0x10
/* 049858 8006E458 0801BA13 */ j .L8006E84C
/* 04985C 8006E45C 00443025 */ or $a2, $v0, $a0
.L8006E460:
/* 049860 8006E460 15200008 */ bnez $t1, .L8006E484
/* 049864 8006E464 0049102B */ sltu $v0, $v0, $t1
/* 049868 8006E468 24020001 */ addiu $v0, $zero, 1
/* 04986C 8006E46C 15000002 */ bnez $t0, .L8006E478
/* 049870 8006E470 0048001B */ divu $zero, $v0, $t0
/* 049874 8006E474 0007000D */ break 7
.L8006E478:
/* 049878 8006E478 00004812 */ mflo $t1
/* 04987C 8006E47C 3402FFFF */ ori $v0, $zero, 0xffff
/* 049880 8006E480 0049102B */ sltu $v0, $v0, $t1
.L8006E484:
/* 049884 8006E484 14400005 */ bnez $v0, .L8006E49C
/* 049888 8006E488 0120282D */ daddu $a1, $t1, $zero
/* 04988C 8006E48C 2D220100 */ sltiu $v0, $t1, 0x100
/* 049890 8006E490 38420001 */ xori $v0, $v0, 1
/* 049894 8006E494 0801B92D */ j .L8006E4B4
/* 049898 8006E498 000218C0 */ sll $v1, $v0, 3
.L8006E49C:
/* 04989C 8006E49C 3C0200FF */ lui $v0, 0xff
/* 0498A0 8006E4A0 3442FFFF */ ori $v0, $v0, 0xffff
/* 0498A4 8006E4A4 0049102B */ sltu $v0, $v0, $t1
/* 0498A8 8006E4A8 14400002 */ bnez $v0, .L8006E4B4
/* 0498AC 8006E4AC 24030018 */ addiu $v1, $zero, 0x18
/* 0498B0 8006E4B0 24030010 */ addiu $v1, $zero, 0x10
.L8006E4B4:
/* 0498B4 8006E4B4 00651006 */ srlv $v0, $a1, $v1
/* 0498B8 8006E4B8 3C01800A */ lui $at, 0x800a
/* 0498BC 8006E4BC 00220821 */ addu $at, $at, $v0
/* 0498C0 8006E4C0 9022A040 */ lbu $v0, -0x5fc0($at)
/* 0498C4 8006E4C4 00431021 */ addu $v0, $v0, $v1
/* 0498C8 8006E4C8 24030020 */ addiu $v1, $zero, 0x20
/* 0498CC 8006E4CC 00623023 */ subu $a2, $v1, $v0
/* 0498D0 8006E4D0 14C00004 */ bnez $a2, .L8006E4E4
/* 0498D4 8006E4D4 00662823 */ subu $a1, $v1, $a2
/* 0498D8 8006E4D8 00892023 */ subu $a0, $a0, $t1
/* 0498DC 8006E4DC 0801B974 */ j .L8006E5D0
/* 0498E0 8006E4E0 240A0001 */ addiu $t2, $zero, 1
.L8006E4E4:
/* 0498E4 8006E4E4 00C94804 */ sllv $t1, $t1, $a2
/* 0498E8 8006E4E8 00A43806 */ srlv $a3, $a0, $a1
/* 0498EC 8006E4EC 00C41804 */ sllv $v1, $a0, $a2
/* 0498F0 8006E4F0 00AB1006 */ srlv $v0, $t3, $a1
/* 0498F4 8006E4F4 00622025 */ or $a0, $v1, $v0
/* 0498F8 8006E4F8 00CB5804 */ sllv $t3, $t3, $a2
/* 0498FC 8006E4FC 00093402 */ srl $a2, $t1, 0x10
/* 049900 8006E500 14C00002 */ bnez $a2, .L8006E50C
/* 049904 8006E504 00E6001B */ divu $zero, $a3, $a2
/* 049908 8006E508 0007000D */ break 7
.L8006E50C:
/* 04990C 8006E50C 00004012 */ mflo $t0
/* 049910 8006E510 00001810 */ mfhi $v1
/* 049914 8006E514 3125FFFF */ andi $a1, $t1, 0xffff
/* 049918 8006E518 00000000 */ nop
/* 04991C 8006E51C 01050018 */ mult $t0, $a1
/* 049920 8006E520 00041402 */ srl $v0, $a0, 0x10
/* 049924 8006E524 00031C00 */ sll $v1, $v1, 0x10
/* 049928 8006E528 00621825 */ or $v1, $v1, $v0
/* 04992C 8006E52C 00003812 */ mflo $a3
/* 049930 8006E530 0067102B */ sltu $v0, $v1, $a3
/* 049934 8006E534 5040000B */ beql $v0, $zero, .L8006E564
/* 049938 8006E538 00671823 */ subu $v1, $v1, $a3
/* 04993C 8006E53C 00691821 */ addu $v1, $v1, $t1
/* 049940 8006E540 0069102B */ sltu $v0, $v1, $t1
/* 049944 8006E544 14400006 */ bnez $v0, .L8006E560
/* 049948 8006E548 2508FFFF */ addiu $t0, $t0, -1
/* 04994C 8006E54C 0067102B */ sltu $v0, $v1, $a3
/* 049950 8006E550 50400004 */ beql $v0, $zero, .L8006E564
/* 049954 8006E554 00671823 */ subu $v1, $v1, $a3
/* 049958 8006E558 2508FFFF */ addiu $t0, $t0, -1
/* 04995C 8006E55C 00691821 */ addu $v1, $v1, $t1
.L8006E560:
/* 049960 8006E560 00671823 */ subu $v1, $v1, $a3
.L8006E564:
/* 049964 8006E564 14C00002 */ bnez $a2, .L8006E570
/* 049968 8006E568 0066001B */ divu $zero, $v1, $a2
/* 04996C 8006E56C 0007000D */ break 7
.L8006E570:
/* 049970 8006E570 00003012 */ mflo $a2
/* 049974 8006E574 00001810 */ mfhi $v1
/* 049978 8006E578 00000000 */ nop
/* 04997C 8006E57C 00000000 */ nop
/* 049980 8006E580 00C50018 */ mult $a2, $a1
/* 049984 8006E584 3082FFFF */ andi $v0, $a0, 0xffff
/* 049988 8006E588 00031C00 */ sll $v1, $v1, 0x10
/* 04998C 8006E58C 00621825 */ or $v1, $v1, $v0
/* 049990 8006E590 00003812 */ mflo $a3
/* 049994 8006E594 0067102B */ sltu $v0, $v1, $a3
/* 049998 8006E598 1040000B */ beqz $v0, .L8006E5C8
/* 04999C 8006E59C 00081400 */ sll $v0, $t0, 0x10
/* 0499A0 8006E5A0 00691821 */ addu $v1, $v1, $t1
/* 0499A4 8006E5A4 0069102B */ sltu $v0, $v1, $t1
/* 0499A8 8006E5A8 14400006 */ bnez $v0, .L8006E5C4
/* 0499AC 8006E5AC 24C6FFFF */ addiu $a2, $a2, -1
/* 0499B0 8006E5B0 0067102B */ sltu $v0, $v1, $a3
/* 0499B4 8006E5B4 10400004 */ beqz $v0, .L8006E5C8
/* 0499B8 8006E5B8 00081400 */ sll $v0, $t0, 0x10
/* 0499BC 8006E5BC 24C6FFFF */ addiu $a2, $a2, -1
/* 0499C0 8006E5C0 00691821 */ addu $v1, $v1, $t1
.L8006E5C4:
/* 0499C4 8006E5C4 00081400 */ sll $v0, $t0, 0x10
.L8006E5C8:
/* 0499C8 8006E5C8 00465025 */ or $t2, $v0, $a2
/* 0499CC 8006E5CC 00672023 */ subu $a0, $v1, $a3
.L8006E5D0:
/* 0499D0 8006E5D0 00093402 */ srl $a2, $t1, 0x10
/* 0499D4 8006E5D4 14C00002 */ bnez $a2, .L8006E5E0
/* 0499D8 8006E5D8 0086001B */ divu $zero, $a0, $a2
/* 0499DC 8006E5DC 0007000D */ break 7
.L8006E5E0:
/* 0499E0 8006E5E0 00003812 */ mflo $a3
/* 0499E4 8006E5E4 00001810 */ mfhi $v1
/* 0499E8 8006E5E8 3128FFFF */ andi $t0, $t1, 0xffff
/* 0499EC 8006E5EC 00000000 */ nop
/* 0499F0 8006E5F0 00E80018 */ mult $a3, $t0
/* 0499F4 8006E5F4 000B1402 */ srl $v0, $t3, 0x10
/* 0499F8 8006E5F8 00031C00 */ sll $v1, $v1, 0x10
/* 0499FC 8006E5FC 00621825 */ or $v1, $v1, $v0
/* 049A00 8006E600 00002812 */ mflo $a1
/* 049A04 8006E604 0065102B */ sltu $v0, $v1, $a1
/* 049A08 8006E608 5040000B */ beql $v0, $zero, .L8006E638
/* 049A0C 8006E60C 00651823 */ subu $v1, $v1, $a1
/* 049A10 8006E610 00691821 */ addu $v1, $v1, $t1
/* 049A14 8006E614 0069102B */ sltu $v0, $v1, $t1
/* 049A18 8006E618 14400006 */ bnez $v0, .L8006E634
/* 049A1C 8006E61C 24E7FFFF */ addiu $a3, $a3, -1
/* 049A20 8006E620 0065102B */ sltu $v0, $v1, $a1
/* 049A24 8006E624 50400004 */ beql $v0, $zero, .L8006E638
/* 049A28 8006E628 00651823 */ subu $v1, $v1, $a1
/* 049A2C 8006E62C 24E7FFFF */ addiu $a3, $a3, -1
/* 049A30 8006E630 00691821 */ addu $v1, $v1, $t1
.L8006E634:
/* 049A34 8006E634 00651823 */ subu $v1, $v1, $a1
.L8006E638:
/* 049A38 8006E638 14C00002 */ bnez $a2, .L8006E644
/* 049A3C 8006E63C 0066001B */ divu $zero, $v1, $a2
/* 049A40 8006E640 0007000D */ break 7
.L8006E644:
/* 049A44 8006E644 00002012 */ mflo $a0
/* 049A48 8006E648 00001810 */ mfhi $v1
/* 049A4C 8006E64C 00000000 */ nop
/* 049A50 8006E650 00000000 */ nop
/* 049A54 8006E654 00880018 */ mult $a0, $t0
/* 049A58 8006E658 3162FFFF */ andi $v0, $t3, 0xffff
/* 049A5C 8006E65C 00031C00 */ sll $v1, $v1, 0x10
/* 049A60 8006E660 00621825 */ or $v1, $v1, $v0
/* 049A64 8006E664 00002812 */ mflo $a1
/* 049A68 8006E668 0065102B */ sltu $v0, $v1, $a1
/* 049A6C 8006E66C 10400007 */ beqz $v0, .L8006E68C
/* 049A70 8006E670 00691821 */ addu $v1, $v1, $t1
/* 049A74 8006E674 0069102B */ sltu $v0, $v1, $t1
/* 049A78 8006E678 14400004 */ bnez $v0, .L8006E68C
/* 049A7C 8006E67C 2484FFFF */ addiu $a0, $a0, -1
/* 049A80 8006E680 0065102B */ sltu $v0, $v1, $a1
/* 049A84 8006E684 54400001 */ bnel $v0, $zero, .L8006E68C
/* 049A88 8006E688 2484FFFF */ addiu $a0, $a0, -1
.L8006E68C:
/* 049A8C 8006E68C 00071400 */ sll $v0, $a3, 0x10
/* 049A90 8006E690 0801BA14 */ j .L8006E850
/* 049A94 8006E694 00443025 */ or $a2, $v0, $a0
.L8006E698:
/* 049A98 8006E698 0088102B */ sltu $v0, $a0, $t0
/* 049A9C 8006E69C 10400003 */ beqz $v0, .L8006E6AC
/* 049AA0 8006E6A0 3402FFFF */ ori $v0, $zero, 0xffff
/* 049AA4 8006E6A4 0801BA13 */ j .L8006E84C
/* 049AA8 8006E6A8 0000302D */ daddu $a2, $zero, $zero
.L8006E6AC:
/* 049AAC 8006E6AC 0048102B */ sltu $v0, $v0, $t0
/* 049AB0 8006E6B0 14400005 */ bnez $v0, .L8006E6C8
/* 049AB4 8006E6B4 0100282D */ daddu $a1, $t0, $zero
/* 049AB8 8006E6B8 2D020100 */ sltiu $v0, $t0, 0x100
/* 049ABC 8006E6BC 38420001 */ xori $v0, $v0, 1
/* 049AC0 8006E6C0 0801B9B8 */ j .L8006E6E0
/* 049AC4 8006E6C4 000218C0 */ sll $v1, $v0, 3
.L8006E6C8:
/* 049AC8 8006E6C8 3C0200FF */ lui $v0, 0xff
/* 049ACC 8006E6CC 3442FFFF */ ori $v0, $v0, 0xffff
/* 049AD0 8006E6D0 0048102B */ sltu $v0, $v0, $t0
/* 049AD4 8006E6D4 14400002 */ bnez $v0, .L8006E6E0
/* 049AD8 8006E6D8 24030018 */ addiu $v1, $zero, 0x18
/* 049ADC 8006E6DC 24030010 */ addiu $v1, $zero, 0x10
.L8006E6E0:
/* 049AE0 8006E6E0 00651006 */ srlv $v0, $a1, $v1
/* 049AE4 8006E6E4 3C01800A */ lui $at, 0x800a
/* 049AE8 8006E6E8 00220821 */ addu $at, $at, $v0
/* 049AEC 8006E6EC 9022A040 */ lbu $v0, -0x5fc0($at)
/* 049AF0 8006E6F0 00431021 */ addu $v0, $v0, $v1
/* 049AF4 8006E6F4 24030020 */ addiu $v1, $zero, 0x20
/* 049AF8 8006E6F8 00623023 */ subu $a2, $v1, $v0
/* 049AFC 8006E6FC 54C00009 */ bnel $a2, $zero, .L8006E724
/* 049B00 8006E700 00662823 */ subu $a1, $v1, $a2
/* 049B04 8006E704 0104102B */ sltu $v0, $t0, $a0
/* 049B08 8006E708 14400050 */ bnez $v0, .L8006E84C
/* 049B0C 8006E70C 24060001 */ addiu $a2, $zero, 1
/* 049B10 8006E710 0169102B */ sltu $v0, $t3, $t1
/* 049B14 8006E714 1440004D */ bnez $v0, .L8006E84C
/* 049B18 8006E718 0000302D */ daddu $a2, $zero, $zero
/* 049B1C 8006E71C 0801BA13 */ j .L8006E84C
/* 049B20 8006E720 24060001 */ addiu $a2, $zero, 1
.L8006E724:
/* 049B24 8006E724 00C81804 */ sllv $v1, $t0, $a2
/* 049B28 8006E728 00A91006 */ srlv $v0, $t1, $a1
/* 049B2C 8006E72C 00624025 */ or $t0, $v1, $v0
/* 049B30 8006E730 00C94804 */ sllv $t1, $t1, $a2
/* 049B34 8006E734 00A43806 */ srlv $a3, $a0, $a1
/* 049B38 8006E738 00C41804 */ sllv $v1, $a0, $a2
/* 049B3C 8006E73C 00AB1006 */ srlv $v0, $t3, $a1
/* 049B40 8006E740 00622025 */ or $a0, $v1, $v0
/* 049B44 8006E744 00CB5804 */ sllv $t3, $t3, $a2
/* 049B48 8006E748 00083402 */ srl $a2, $t0, 0x10
/* 049B4C 8006E74C 14C00002 */ bnez $a2, .L8006E758
/* 049B50 8006E750 00E6001B */ divu $zero, $a3, $a2
/* 049B54 8006E754 0007000D */ break 7
.L8006E758:
/* 049B58 8006E758 00005012 */ mflo $t2
/* 049B5C 8006E75C 00001810 */ mfhi $v1
/* 049B60 8006E760 3105FFFF */ andi $a1, $t0, 0xffff
/* 049B64 8006E764 00000000 */ nop
/* 049B68 8006E768 01450018 */ mult $t2, $a1
/* 049B6C 8006E76C 00041402 */ srl $v0, $a0, 0x10
/* 049B70 8006E770 00031C00 */ sll $v1, $v1, 0x10
/* 049B74 8006E774 00621825 */ or $v1, $v1, $v0
/* 049B78 8006E778 00003812 */ mflo $a3
/* 049B7C 8006E77C 0067102B */ sltu $v0, $v1, $a3
/* 049B80 8006E780 5040000B */ beql $v0, $zero, .L8006E7B0
/* 049B84 8006E784 00671823 */ subu $v1, $v1, $a3
/* 049B88 8006E788 00681821 */ addu $v1, $v1, $t0
/* 049B8C 8006E78C 0068102B */ sltu $v0, $v1, $t0
/* 049B90 8006E790 14400006 */ bnez $v0, .L8006E7AC
/* 049B94 8006E794 254AFFFF */ addiu $t2, $t2, -1
/* 049B98 8006E798 0067102B */ sltu $v0, $v1, $a3
/* 049B9C 8006E79C 50400004 */ beql $v0, $zero, .L8006E7B0
/* 049BA0 8006E7A0 00671823 */ subu $v1, $v1, $a3
/* 049BA4 8006E7A4 254AFFFF */ addiu $t2, $t2, -1
/* 049BA8 8006E7A8 00681821 */ addu $v1, $v1, $t0
.L8006E7AC:
/* 049BAC 8006E7AC 00671823 */ subu $v1, $v1, $a3
.L8006E7B0:
/* 049BB0 8006E7B0 14C00002 */ bnez $a2, .L8006E7BC
/* 049BB4 8006E7B4 0066001B */ divu $zero, $v1, $a2
/* 049BB8 8006E7B8 0007000D */ break 7
.L8006E7BC:
/* 049BBC 8006E7BC 00003012 */ mflo $a2
/* 049BC0 8006E7C0 00001810 */ mfhi $v1
/* 049BC4 8006E7C4 00000000 */ nop
/* 049BC8 8006E7C8 00000000 */ nop
/* 049BCC 8006E7CC 00C50018 */ mult $a2, $a1
/* 049BD0 8006E7D0 3082FFFF */ andi $v0, $a0, 0xffff
/* 049BD4 8006E7D4 00031C00 */ sll $v1, $v1, 0x10
/* 049BD8 8006E7D8 00621825 */ or $v1, $v1, $v0
/* 049BDC 8006E7DC 00003812 */ mflo $a3
/* 049BE0 8006E7E0 0067102B */ sltu $v0, $v1, $a3
/* 049BE4 8006E7E4 1040000B */ beqz $v0, .L8006E814
/* 049BE8 8006E7E8 000A1400 */ sll $v0, $t2, 0x10
/* 049BEC 8006E7EC 00681821 */ addu $v1, $v1, $t0
/* 049BF0 8006E7F0 0068102B */ sltu $v0, $v1, $t0
/* 049BF4 8006E7F4 14400006 */ bnez $v0, .L8006E810
/* 049BF8 8006E7F8 24C6FFFF */ addiu $a2, $a2, -1
/* 049BFC 8006E7FC 0067102B */ sltu $v0, $v1, $a3
/* 049C00 8006E800 10400004 */ beqz $v0, .L8006E814
/* 049C04 8006E804 000A1400 */ sll $v0, $t2, 0x10
/* 049C08 8006E808 24C6FFFF */ addiu $a2, $a2, -1
/* 049C0C 8006E80C 00681821 */ addu $v1, $v1, $t0
.L8006E810:
/* 049C10 8006E810 000A1400 */ sll $v0, $t2, 0x10
.L8006E814:
/* 049C14 8006E814 00463025 */ or $a2, $v0, $a2
/* 049C18 8006E818 00672023 */ subu $a0, $v1, $a3
/* 049C1C 8006E81C 00C90019 */ multu $a2, $t1
/* 049C20 8006E820 00001810 */ mfhi $v1
/* 049C24 8006E824 0083102B */ sltu $v0, $a0, $v1
/* 049C28 8006E828 00004012 */ mflo $t0
/* 049C2C 8006E82C 54400007 */ bnel $v0, $zero, .L8006E84C
/* 049C30 8006E830 24C6FFFF */ addiu $a2, $a2, -1
/* 049C34 8006E834 14640006 */ bne $v1, $a0, .L8006E850
/* 049C38 8006E838 0000502D */ daddu $t2, $zero, $zero
/* 049C3C 8006E83C 0168102B */ sltu $v0, $t3, $t0
/* 049C40 8006E840 10400004 */ beqz $v0, .L8006E854
/* 049C44 8006E844 00C0682D */ daddu $t5, $a2, $zero
/* 049C48 8006E848 24C6FFFF */ addiu $a2, $a2, -1
.L8006E84C:
/* 049C4C 8006E84C 0000502D */ daddu $t2, $zero, $zero
.L8006E850:
/* 049C50 8006E850 00C0682D */ daddu $t5, $a2, $zero
.L8006E854:
/* 049C54 8006E854 0140602D */ daddu $t4, $t2, $zero
/* 049C58 8006E858 0180102D */ daddu $v0, $t4, $zero
/* 049C5C 8006E85C 03E00008 */ jr $ra
/* 049C60 8006E860 01A0182D */ daddu $v1, $t5, $zero
/* 049C64 8006E864 00000000 */ nop
/* 049C68 8006E868 00000000 */ nop
/* 049C6C 8006E86C 00000000 */ nop