papermario/asm/nonmatchings/code_42e0_len_1f60/dma_copy.s
2020-08-12 21:56:23 -04:00

88 lines
4.0 KiB
ArmAsm

.set noat # allow manual use of $at
.set noreorder # don't insert nops after branches
.include "include/macro.inc"
glabel dma_copy
/* 004B3C 8002973C 27BDFFD8 */ addiu $sp, $sp, -0x28
/* 004B40 80029740 AFB20018 */ sw $s2, 0x18($sp)
/* 004B44 80029744 0080902D */ daddu $s2, $a0, $zero
/* 004B48 80029748 AFB3001C */ sw $s3, 0x1c($sp)
/* 004B4C 8002974C 00C0982D */ daddu $s3, $a2, $zero
/* 004B50 80029750 0260202D */ daddu $a0, $s3, $zero
/* 004B54 80029754 AFB10014 */ sw $s1, 0x14($sp)
/* 004B58 80029758 00B28823 */ subu $s1, $a1, $s2
/* 004B5C 8002975C 0220282D */ daddu $a1, $s1, $zero
/* 004B60 80029760 AFBF0020 */ sw $ra, 0x20($sp)
/* 004B64 80029764 0C0185F4 */ jal osInvalICache
/* 004B68 80029768 AFB00010 */ sw $s0, 0x10($sp)
/* 004B6C 8002976C 24022000 */ addiu $v0, $zero, 0x2000
/* 004B70 80029770 0051102B */ sltu $v0, $v0, $s1
/* 004B74 80029774 1040000A */ beqz $v0, .L800297A0
/* 004B78 80029778 0000802D */ daddu $s0, $zero, $zero
/* 004B7C 8002977C 02502021 */ addu $a0, $s2, $s0
.L80029780:
/* 004B80 80029780 02702821 */ addu $a1, $s3, $s0
/* 004B84 80029784 0C017D24 */ jal nuPiReadRom
/* 004B88 80029788 24062000 */ addiu $a2, $zero, 0x2000
/* 004B8C 8002978C 26102000 */ addiu $s0, $s0, 0x2000
/* 004B90 80029790 26022000 */ addiu $v0, $s0, 0x2000
/* 004B94 80029794 0051102B */ sltu $v0, $v0, $s1
/* 004B98 80029798 1440FFF9 */ bnez $v0, .L80029780
/* 004B9C 8002979C 02502021 */ addu $a0, $s2, $s0
.L800297A0:
/* 004BA0 800297A0 12110004 */ beq $s0, $s1, .L800297B4
/* 004BA4 800297A4 02502021 */ addu $a0, $s2, $s0
/* 004BA8 800297A8 02702821 */ addu $a1, $s3, $s0
/* 004BAC 800297AC 0C017D24 */ jal nuPiReadRom
/* 004BB0 800297B0 02303023 */ subu $a2, $s1, $s0
.L800297B4:
/* 004BB4 800297B4 0220102D */ daddu $v0, $s1, $zero
/* 004BB8 800297B8 8FBF0020 */ lw $ra, 0x20($sp)
/* 004BBC 800297BC 8FB3001C */ lw $s3, 0x1c($sp)
/* 004BC0 800297C0 8FB20018 */ lw $s2, 0x18($sp)
/* 004BC4 800297C4 8FB10014 */ lw $s1, 0x14($sp)
/* 004BC8 800297C8 8FB00010 */ lw $s0, 0x10($sp)
/* 004BCC 800297CC 03E00008 */ jr $ra
/* 004BD0 800297D0 27BD0028 */ addiu $sp, $sp, 0x28
/* 004BD4 800297D4 27BDFFD8 */ addiu $sp, $sp, -0x28
/* 004BD8 800297D8 AFB20018 */ sw $s2, 0x18($sp)
/* 004BDC 800297DC 0080902D */ daddu $s2, $a0, $zero
/* 004BE0 800297E0 AFB00010 */ sw $s0, 0x10($sp)
/* 004BE4 800297E4 0000802D */ daddu $s0, $zero, $zero
/* 004BE8 800297E8 AFB3001C */ sw $s3, 0x1c($sp)
/* 004BEC 800297EC 00C0982D */ daddu $s3, $a2, $zero
/* 004BF0 800297F0 AFB10014 */ sw $s1, 0x14($sp)
/* 004BF4 800297F4 00B28823 */ subu $s1, $a1, $s2
/* 004BF8 800297F8 24022000 */ addiu $v0, $zero, 0x2000
/* 004BFC 800297FC 0051102B */ sltu $v0, $v0, $s1
/* 004C00 80029800 1040000A */ beqz $v0, .L8002982C
/* 004C04 80029804 AFBF0020 */ sw $ra, 0x20($sp)
/* 004C08 80029808 02502021 */ addu $a0, $s2, $s0
.L8002980C:
/* 004C0C 8002980C 02702821 */ addu $a1, $s3, $s0
/* 004C10 80029810 0C00A618 */ jal func_80029860
/* 004C14 80029814 24062000 */ addiu $a2, $zero, 0x2000
/* 004C18 80029818 26102000 */ addiu $s0, $s0, 0x2000
/* 004C1C 8002981C 26022000 */ addiu $v0, $s0, 0x2000
/* 004C20 80029820 0051102B */ sltu $v0, $v0, $s1
/* 004C24 80029824 1440FFF9 */ bnez $v0, .L8002980C
/* 004C28 80029828 02502021 */ addu $a0, $s2, $s0
.L8002982C:
/* 004C2C 8002982C 12110004 */ beq $s0, $s1, .L80029840
/* 004C30 80029830 02502021 */ addu $a0, $s2, $s0
/* 004C34 80029834 02702821 */ addu $a1, $s3, $s0
/* 004C38 80029838 0C00A618 */ jal func_80029860
/* 004C3C 8002983C 02303023 */ subu $a2, $s1, $s0
.L80029840:
/* 004C40 80029840 0220102D */ daddu $v0, $s1, $zero
/* 004C44 80029844 8FBF0020 */ lw $ra, 0x20($sp)
/* 004C48 80029848 8FB3001C */ lw $s3, 0x1c($sp)
/* 004C4C 8002984C 8FB20018 */ lw $s2, 0x18($sp)
/* 004C50 80029850 8FB10014 */ lw $s1, 0x14($sp)
/* 004C54 80029854 8FB00010 */ lw $s0, 0x10($sp)
/* 004C58 80029858 03E00008 */ jr $ra
/* 004C5C 8002985C 27BD0028 */ addiu $sp, $sp, 0x28