donut-decomp/asm/dvd/dvdidutils.s
2022-10-17 09:13:49 +01:00

77 lines
3.4 KiB
ArmAsm

.include "macros.inc"
.section .text, "ax" # 0x80006A00 - 0x80406260 ; 0x003FF860
.global DVDCompareDiskID
DVDCompareDiskID:
/* 8003FCF0 0003BB30 94 21 FF F0 */ stwu r1, -0x10(r1)
/* 8003FCF4 0003BB34 7C 08 02 A6 */ mflr r0
/* 8003FCF8 0003BB38 90 01 00 14 */ stw r0, 0x14(r1)
/* 8003FCFC 0003BB3C 88 03 00 00 */ lbz r0, 0x0(r3)
/* 8003FD00 0003BB40 93 E1 00 0C */ stw r31, 0xc(r1)
/* 8003FD04 0003BB44 7C 9F 23 78 */ mr r31, r4
/* 8003FD08 0003BB48 7C 00 07 75 */ extsb. r0, r0
/* 8003FD0C 0003BB4C 93 C1 00 08 */ stw r30, 0x8(r1)
/* 8003FD10 0003BB50 7C 7E 1B 78 */ mr r30, r3
/* 8003FD14 0003BB54 41 82 00 28 */ beq lbl_8003FD3C
/* 8003FD18 0003BB58 88 04 00 00 */ lbz r0, 0x0(r4)
/* 8003FD1C 0003BB5C 7C 00 07 75 */ extsb. r0, r0
/* 8003FD20 0003BB60 41 82 00 1C */ beq lbl_8003FD3C
/* 8003FD24 0003BB64 38 A0 00 04 */ li r5, 0x4
/* 8003FD28 0003BB68 4B FC DF 31 */ bl strncmp
/* 8003FD2C 0003BB6C 2C 03 00 00 */ cmpwi r3, 0x0
/* 8003FD30 0003BB70 41 82 00 0C */ beq lbl_8003FD3C
/* 8003FD34 0003BB74 38 60 00 00 */ li r3, 0x0
/* 8003FD38 0003BB78 48 00 00 90 */ b lbl_8003FDC8
.global lbl_8003FD3C
lbl_8003FD3C:
/* 8003FD3C 0003BB7C 88 1E 00 04 */ lbz r0, 0x4(r30)
/* 8003FD40 0003BB80 7C 00 07 75 */ extsb. r0, r0
/* 8003FD44 0003BB84 41 82 00 28 */ beq lbl_8003FD6C
/* 8003FD48 0003BB88 88 1F 00 04 */ lbz r0, 0x4(r31)
/* 8003FD4C 0003BB8C 7C 00 07 75 */ extsb. r0, r0
/* 8003FD50 0003BB90 41 82 00 1C */ beq lbl_8003FD6C
/* 8003FD54 0003BB94 38 7E 00 04 */ addi r3, r30, 0x4
/* 8003FD58 0003BB98 38 9F 00 04 */ addi r4, r31, 0x4
/* 8003FD5C 0003BB9C 38 A0 00 02 */ li r5, 0x2
/* 8003FD60 0003BBA0 4B FC DE F9 */ bl strncmp
/* 8003FD64 0003BBA4 2C 03 00 00 */ cmpwi r3, 0x0
/* 8003FD68 0003BBA8 41 82 00 0C */ beq lbl_8003FD74
.global lbl_8003FD6C
lbl_8003FD6C:
/* 8003FD6C 0003BBAC 38 60 00 00 */ li r3, 0x0
/* 8003FD70 0003BBB0 48 00 00 58 */ b lbl_8003FDC8
.global lbl_8003FD74
lbl_8003FD74:
/* 8003FD74 0003BBB4 88 7E 00 06 */ lbz r3, 0x6(r30)
/* 8003FD78 0003BBB8 28 03 00 FF */ cmplwi r3, 0xff
/* 8003FD7C 0003BBBC 41 82 00 20 */ beq lbl_8003FD9C
/* 8003FD80 0003BBC0 88 1F 00 06 */ lbz r0, 0x6(r31)
/* 8003FD84 0003BBC4 28 00 00 FF */ cmplwi r0, 0xff
/* 8003FD88 0003BBC8 41 82 00 14 */ beq lbl_8003FD9C
/* 8003FD8C 0003BBCC 7C 03 00 40 */ cmplw r3, r0
/* 8003FD90 0003BBD0 41 82 00 0C */ beq lbl_8003FD9C
/* 8003FD94 0003BBD4 38 60 00 00 */ li r3, 0x0
/* 8003FD98 0003BBD8 48 00 00 30 */ b lbl_8003FDC8
.global lbl_8003FD9C
lbl_8003FD9C:
/* 8003FD9C 0003BBDC 88 7E 00 07 */ lbz r3, 0x7(r30)
/* 8003FDA0 0003BBE0 28 03 00 FF */ cmplwi r3, 0xff
/* 8003FDA4 0003BBE4 41 82 00 20 */ beq lbl_8003FDC4
/* 8003FDA8 0003BBE8 88 1F 00 07 */ lbz r0, 0x7(r31)
/* 8003FDAC 0003BBEC 28 00 00 FF */ cmplwi r0, 0xff
/* 8003FDB0 0003BBF0 41 82 00 14 */ beq lbl_8003FDC4
/* 8003FDB4 0003BBF4 7C 03 00 40 */ cmplw r3, r0
/* 8003FDB8 0003BBF8 41 82 00 0C */ beq lbl_8003FDC4
/* 8003FDBC 0003BBFC 38 60 00 00 */ li r3, 0x0
/* 8003FDC0 0003BC00 48 00 00 08 */ b lbl_8003FDC8
.global lbl_8003FDC4
lbl_8003FDC4:
/* 8003FDC4 0003BC04 38 60 00 01 */ li r3, 0x1
.global lbl_8003FDC8
lbl_8003FDC8:
/* 8003FDC8 0003BC08 80 01 00 14 */ lwz r0, 0x14(r1)
/* 8003FDCC 0003BC0C 83 E1 00 0C */ lwz r31, 0xc(r1)
/* 8003FDD0 0003BC10 83 C1 00 08 */ lwz r30, 0x8(r1)
/* 8003FDD4 0003BC14 7C 08 03 A6 */ mtlr r0
/* 8003FDD8 0003BC18 38 21 00 10 */ addi r1, r1, 0x10
/* 8003FDDC 0003BC1C 4E 80 00 20 */ blr