2020-09-24 05:16:13 +02:00
|
|
|
.set noat # allow manual use of $at
|
2020-08-04 08:49:11 +02:00
|
|
|
.set noreorder # don't insert nops after branches
|
|
|
|
|
|
|
|
glabel _heap_realloc
|
2020-09-24 05:16:13 +02:00
|
|
|
/* 46C4 800292C4 27BDFFD8 */ addiu $sp, $sp, -0x28
|
|
|
|
/* 46C8 800292C8 AFB3001C */ sw $s3, 0x1c($sp)
|
|
|
|
/* 46CC 800292CC 0080982D */ daddu $s3, $a0, $zero
|
|
|
|
/* 46D0 800292D0 AFB20018 */ sw $s2, 0x18($sp)
|
|
|
|
/* 46D4 800292D4 00A0902D */ daddu $s2, $a1, $zero
|
|
|
|
/* 46D8 800292D8 AFB10014 */ sw $s1, 0x14($sp)
|
|
|
|
/* 46DC 800292DC 2651FFF0 */ addiu $s1, $s2, -0x10
|
|
|
|
/* 46E0 800292E0 24C6000F */ addiu $a2, $a2, 0xf
|
|
|
|
/* 46E4 800292E4 2402FFF0 */ addiu $v0, $zero, -0x10
|
|
|
|
/* 46E8 800292E8 AFBF0020 */ sw $ra, 0x20($sp)
|
|
|
|
/* 46EC 800292EC AFB00010 */ sw $s0, 0x10($sp)
|
|
|
|
/* 46F0 800292F0 9643FFF8 */ lhu $v1, -8($s2)
|
|
|
|
/* 46F4 800292F4 10600016 */ beqz $v1, .L80029350
|
|
|
|
/* 46F8 800292F8 00C28024 */ and $s0, $a2, $v0
|
|
|
|
/* 46FC 800292FC 8E45FFF0 */ lw $a1, -0x10($s2)
|
|
|
|
/* 4700 80029300 8E44FFF4 */ lw $a0, -0xc($s2)
|
|
|
|
/* 4704 80029304 00A0182D */ daddu $v1, $a1, $zero
|
|
|
|
/* 4708 80029308 10600009 */ beqz $v1, .L80029330
|
|
|
|
/* 470C 8002930C 0090102B */ sltu $v0, $a0, $s0
|
|
|
|
/* 4710 80029310 94620008 */ lhu $v0, 8($v1)
|
|
|
|
/* 4714 80029314 14400006 */ bnez $v0, .L80029330
|
|
|
|
/* 4718 80029318 0090102B */ sltu $v0, $a0, $s0
|
|
|
|
/* 471C 8002931C 8C650000 */ lw $a1, ($v1)
|
|
|
|
/* 4720 80029320 8C630004 */ lw $v1, 4($v1)
|
|
|
|
/* 4724 80029324 24820010 */ addiu $v0, $a0, 0x10
|
|
|
|
/* 4728 80029328 00432021 */ addu $a0, $v0, $v1
|
|
|
|
/* 472C 8002932C 0090102B */ sltu $v0, $a0, $s0
|
2020-08-04 08:49:11 +02:00
|
|
|
.L80029330:
|
2020-09-24 05:16:13 +02:00
|
|
|
/* 4730 80029330 10400011 */ beqz $v0, .L80029378
|
|
|
|
/* 4734 80029334 0220182D */ daddu $v1, $s1, $zero
|
|
|
|
/* 4738 80029338 0260202D */ daddu $a0, $s3, $zero
|
|
|
|
/* 473C 8002933C 0C00A41B */ jal _heap_malloc
|
|
|
|
/* 4740 80029340 0200282D */ daddu $a1, $s0, $zero
|
|
|
|
/* 4744 80029344 0040882D */ daddu $s1, $v0, $zero
|
|
|
|
/* 4748 80029348 16200003 */ bnez $s1, .L80029358
|
|
|
|
/* 474C 8002934C 0220202D */ daddu $a0, $s1, $zero
|
2020-08-04 08:49:11 +02:00
|
|
|
.L80029350:
|
2020-09-24 05:16:13 +02:00
|
|
|
/* 4750 80029350 0800A4EE */ j .L800293B8
|
|
|
|
/* 4754 80029354 0000102D */ daddu $v0, $zero, $zero
|
2020-08-04 08:49:11 +02:00
|
|
|
.L80029358:
|
2020-09-24 05:16:13 +02:00
|
|
|
/* 4758 80029358 0240282D */ daddu $a1, $s2, $zero
|
|
|
|
/* 475C 8002935C 0C01929D */ jal memcpy
|
|
|
|
/* 4760 80029360 0200302D */ daddu $a2, $s0, $zero
|
|
|
|
/* 4764 80029364 0260202D */ daddu $a0, $s3, $zero
|
|
|
|
/* 4768 80029368 0C00A487 */ jal _heap_free
|
|
|
|
/* 476C 8002936C 0240282D */ daddu $a1, $s2, $zero
|
|
|
|
/* 4770 80029370 0800A4EE */ j .L800293B8
|
|
|
|
/* 4774 80029374 0220102D */ daddu $v0, $s1, $zero
|
2020-08-04 08:49:11 +02:00
|
|
|
.L80029378:
|
2020-09-24 05:16:13 +02:00
|
|
|
/* 4778 80029378 26020010 */ addiu $v0, $s0, 0x10
|
|
|
|
/* 477C 8002937C 0044102B */ sltu $v0, $v0, $a0
|
|
|
|
/* 4780 80029380 1040000A */ beqz $v0, .L800293AC
|
|
|
|
/* 4784 80029384 02501021 */ addu $v0, $s2, $s0
|
|
|
|
/* 4788 80029388 AC620000 */ sw $v0, ($v1)
|
|
|
|
/* 478C 8002938C AC700004 */ sw $s0, 4($v1)
|
|
|
|
/* 4790 80029390 0040182D */ daddu $v1, $v0, $zero
|
|
|
|
/* 4794 80029394 00901023 */ subu $v0, $a0, $s0
|
|
|
|
/* 4798 80029398 2442FFF0 */ addiu $v0, $v0, -0x10
|
|
|
|
/* 479C 8002939C AC650000 */ sw $a1, ($v1)
|
|
|
|
/* 47A0 800293A0 AC620004 */ sw $v0, 4($v1)
|
|
|
|
/* 47A4 800293A4 0800A4ED */ j .L800293B4
|
|
|
|
/* 47A8 800293A8 A4600008 */ sh $zero, 8($v1)
|
2020-08-04 08:49:11 +02:00
|
|
|
.L800293AC:
|
2020-09-24 05:16:13 +02:00
|
|
|
/* 47AC 800293AC AC650000 */ sw $a1, ($v1)
|
|
|
|
/* 47B0 800293B0 AC640004 */ sw $a0, 4($v1)
|
2020-08-04 08:49:11 +02:00
|
|
|
.L800293B4:
|
2020-09-24 05:16:13 +02:00
|
|
|
/* 47B4 800293B4 0240102D */ daddu $v0, $s2, $zero
|
2020-08-04 08:49:11 +02:00
|
|
|
.L800293B8:
|
2020-09-24 05:16:13 +02:00
|
|
|
/* 47B8 800293B8 8FBF0020 */ lw $ra, 0x20($sp)
|
|
|
|
/* 47BC 800293BC 8FB3001C */ lw $s3, 0x1c($sp)
|
|
|
|
/* 47C0 800293C0 8FB20018 */ lw $s2, 0x18($sp)
|
|
|
|
/* 47C4 800293C4 8FB10014 */ lw $s1, 0x14($sp)
|
|
|
|
/* 47C8 800293C8 8FB00010 */ lw $s0, 0x10($sp)
|
|
|
|
/* 47CC 800293CC 03E00008 */ jr $ra
|
|
|
|
/* 47D0 800293D0 27BD0028 */ addiu $sp, $sp, 0x28
|