donut-decomp/asm/MSL_C.PPCEABI.bare.H/MSL_Common/Src/mem.s

139 lines
5.5 KiB
ArmAsm

.include "macros.inc"
.section .text, "ax" # 0x80006A00 - 0x80406260 ; 0x003FF860
.global memmove
memmove:
/* 8000AD4C 00006B8C 94 21 FF F0 */ stwu r1, -0x10(r1)
/* 8000AD50 00006B90 7C 08 02 A6 */ mflr r0
/* 8000AD54 00006B94 7C 66 22 78 */ xor r6, r3, r4
/* 8000AD58 00006B98 28 05 00 20 */ cmplwi r5, 0x20
/* 8000AD5C 00006B9C 90 01 00 14 */ stw r0, 0x14(r1)
/* 8000AD60 00006BA0 7C C0 00 34 */ cntlzw r0, r6
/* 8000AD64 00006BA4 7C 60 00 30 */ slw r0, r3, r0
/* 8000AD68 00006BA8 93 E1 00 0C */ stw r31, 0xc(r1)
/* 8000AD6C 00006BAC 7C 7F 1B 78 */ mr r31, r3
/* 8000AD70 00006BB0 54 07 0F FE */ srwi r7, r0, 31
/* 8000AD74 00006BB4 41 80 00 40 */ blt lbl_8000ADB4
/* 8000AD78 00006BB8 54 C0 07 BF */ clrlwi. r0, r6, 30
/* 8000AD7C 00006BBC 41 82 00 1C */ beq lbl_8000AD98
/* 8000AD80 00006BC0 2C 07 00 00 */ cmpwi r7, 0x0
/* 8000AD84 00006BC4 40 82 00 0C */ bne lbl_8000AD90
/* 8000AD88 00006BC8 48 00 02 99 */ bl __copy_longs_unaligned
/* 8000AD8C 00006BCC 48 00 00 20 */ b lbl_8000ADAC
.global lbl_8000AD90
lbl_8000AD90:
/* 8000AD90 00006BD0 48 00 03 51 */ bl __copy_longs_rev_unaligned
/* 8000AD94 00006BD4 48 00 00 18 */ b lbl_8000ADAC
.global lbl_8000AD98
lbl_8000AD98:
/* 8000AD98 00006BD8 2C 07 00 00 */ cmpwi r7, 0x0
/* 8000AD9C 00006BDC 40 82 00 0C */ bne lbl_8000ADA8
/* 8000ADA0 00006BE0 48 00 01 1D */ bl __copy_longs_aligned
/* 8000ADA4 00006BE4 48 00 00 08 */ b lbl_8000ADAC
.global lbl_8000ADA8
lbl_8000ADA8:
/* 8000ADA8 00006BE8 48 00 01 D1 */ bl __copy_longs_rev_aligned
.global lbl_8000ADAC
lbl_8000ADAC:
/* 8000ADAC 00006BEC 7F E3 FB 78 */ mr r3, r31
/* 8000ADB0 00006BF0 48 00 00 54 */ b lbl_8000AE04
.global lbl_8000ADB4
lbl_8000ADB4:
/* 8000ADB4 00006BF4 2C 07 00 00 */ cmpwi r7, 0x0
/* 8000ADB8 00006BF8 40 82 00 28 */ bne lbl_8000ADE0
/* 8000ADBC 00006BFC 38 84 FF FF */ addi r4, r4, -0x1
/* 8000ADC0 00006C00 38 63 FF FF */ addi r3, r3, -0x1
/* 8000ADC4 00006C04 38 A5 00 01 */ addi r5, r5, 0x1
/* 8000ADC8 00006C08 48 00 00 0C */ b lbl_8000ADD4
.global lbl_8000ADCC
lbl_8000ADCC:
/* 8000ADCC 00006C0C 8C 04 00 01 */ lbzu r0, 0x1(r4)
/* 8000ADD0 00006C10 9C 03 00 01 */ stbu r0, 0x1(r3)
.global lbl_8000ADD4
lbl_8000ADD4:
/* 8000ADD4 00006C14 34 A5 FF FF */ addic. r5, r5, -0x1
/* 8000ADD8 00006C18 40 82 FF F4 */ bne lbl_8000ADCC
/* 8000ADDC 00006C1C 48 00 00 24 */ b lbl_8000AE00
.global lbl_8000ADE0
lbl_8000ADE0:
/* 8000ADE0 00006C20 7C 84 2A 14 */ add r4, r4, r5
/* 8000ADE4 00006C24 7C 63 2A 14 */ add r3, r3, r5
/* 8000ADE8 00006C28 38 A5 00 01 */ addi r5, r5, 0x1
/* 8000ADEC 00006C2C 48 00 00 0C */ b lbl_8000ADF8
.global lbl_8000ADF0
lbl_8000ADF0:
/* 8000ADF0 00006C30 8C 04 FF FF */ lbzu r0, -0x1(r4)
/* 8000ADF4 00006C34 9C 03 FF FF */ stbu r0, -0x1(r3)
.global lbl_8000ADF8
lbl_8000ADF8:
/* 8000ADF8 00006C38 34 A5 FF FF */ addic. r5, r5, -0x1
/* 8000ADFC 00006C3C 40 82 FF F4 */ bne lbl_8000ADF0
.global lbl_8000AE00
lbl_8000AE00:
/* 8000AE00 00006C40 7F E3 FB 78 */ mr r3, r31
.global lbl_8000AE04
lbl_8000AE04:
/* 8000AE04 00006C44 80 01 00 14 */ lwz r0, 0x14(r1)
/* 8000AE08 00006C48 83 E1 00 0C */ lwz r31, 0xc(r1)
/* 8000AE0C 00006C4C 7C 08 03 A6 */ mtlr r0
/* 8000AE10 00006C50 38 21 00 10 */ addi r1, r1, 0x10
/* 8000AE14 00006C54 4E 80 00 20 */ blr
.global memchr
memchr:
/* 8000AE18 00006C58 54 84 06 3E */ clrlwi r4, r4, 24
/* 8000AE1C 00006C5C 38 63 FF FF */ addi r3, r3, -0x1
/* 8000AE20 00006C60 38 A5 00 01 */ addi r5, r5, 0x1
/* 8000AE24 00006C64 48 00 00 10 */ b lbl_8000AE34
.global lbl_8000AE28
lbl_8000AE28:
/* 8000AE28 00006C68 8C 03 00 01 */ lbzu r0, 0x1(r3)
/* 8000AE2C 00006C6C 7C 00 20 40 */ cmplw r0, r4
/* 8000AE30 00006C70 4D 82 00 20 */ beqlr
.global lbl_8000AE34
lbl_8000AE34:
/* 8000AE34 00006C74 34 A5 FF FF */ addic. r5, r5, -0x1
/* 8000AE38 00006C78 40 82 FF F0 */ bne lbl_8000AE28
/* 8000AE3C 00006C7C 38 60 00 00 */ li r3, 0x0
/* 8000AE40 00006C80 4E 80 00 20 */ blr
.global __memrchr
__memrchr:
/* 8000AE44 00006C84 7C 63 2A 14 */ add r3, r3, r5
/* 8000AE48 00006C88 54 84 06 3E */ clrlwi r4, r4, 24
/* 8000AE4C 00006C8C 38 A5 00 01 */ addi r5, r5, 0x1
/* 8000AE50 00006C90 48 00 00 10 */ b lbl_8000AE60
.global lbl_8000AE54
lbl_8000AE54:
/* 8000AE54 00006C94 8C 03 FF FF */ lbzu r0, -0x1(r3)
/* 8000AE58 00006C98 7C 00 20 40 */ cmplw r0, r4
/* 8000AE5C 00006C9C 4D 82 00 20 */ beqlr
.global lbl_8000AE60
lbl_8000AE60:
/* 8000AE60 00006CA0 34 A5 FF FF */ addic. r5, r5, -0x1
/* 8000AE64 00006CA4 40 82 FF F0 */ bne lbl_8000AE54
/* 8000AE68 00006CA8 38 60 00 00 */ li r3, 0x0
/* 8000AE6C 00006CAC 4E 80 00 20 */ blr
.global memcmp
memcmp:
/* 8000AE70 00006CB0 38 E4 FF FF */ addi r7, r4, -0x1
/* 8000AE74 00006CB4 38 C3 FF FF */ addi r6, r3, -0x1
/* 8000AE78 00006CB8 38 85 00 01 */ addi r4, r5, 0x1
/* 8000AE7C 00006CBC 48 00 00 30 */ b lbl_8000AEAC
.global lbl_8000AE80
lbl_8000AE80:
/* 8000AE80 00006CC0 8C 66 00 01 */ lbzu r3, 0x1(r6)
/* 8000AE84 00006CC4 8C 07 00 01 */ lbzu r0, 0x1(r7)
/* 8000AE88 00006CC8 7C 03 00 40 */ cmplw r3, r0
/* 8000AE8C 00006CCC 41 82 00 20 */ beq lbl_8000AEAC
/* 8000AE90 00006CD0 88 86 00 00 */ lbz r4, 0x0(r6)
/* 8000AE94 00006CD4 38 60 00 01 */ li r3, 0x1
/* 8000AE98 00006CD8 88 07 00 00 */ lbz r0, 0x0(r7)
/* 8000AE9C 00006CDC 7C 04 00 40 */ cmplw r4, r0
/* 8000AEA0 00006CE0 4C 80 00 20 */ bgelr
/* 8000AEA4 00006CE4 38 60 FF FF */ li r3, -0x1
/* 8000AEA8 00006CE8 4E 80 00 20 */ blr
.global lbl_8000AEAC
lbl_8000AEAC:
/* 8000AEAC 00006CEC 34 84 FF FF */ addic. r4, r4, -0x1
/* 8000AEB0 00006CF0 40 82 FF D0 */ bne lbl_8000AE80
/* 8000AEB4 00006CF4 38 60 00 00 */ li r3, 0x0
/* 8000AEB8 00006CF8 4E 80 00 20 */ blr