donut-decomp/asm/TRK_Hollywood_Revolution/mainloop.s

86 lines
3.6 KiB
ArmAsm

.include "macros.inc"
.section .text, "ax" # 0x80006A00 - 0x80406260 ; 0x003FF860
.global TRK_NubMainLoop
TRK_NubMainLoop:
/* 800155A4 000113E4 94 21 FF E0 */ stwu r1, -0x20(r1)
/* 800155A8 000113E8 7C 08 02 A6 */ mflr r0
/* 800155AC 000113EC 90 01 00 24 */ stw r0, 0x24(r1)
/* 800155B0 000113F0 93 E1 00 1C */ stw r31, 0x1c(r1)
/* 800155B4 000113F4 3B E0 00 00 */ li r31, 0x0
/* 800155B8 000113F8 93 C1 00 18 */ stw r30, 0x18(r1)
/* 800155BC 000113FC 3B C0 00 00 */ li r30, 0x0
/* 800155C0 00011400 48 00 00 B0 */ b lbl_80015670
.global lbl_800155C4
lbl_800155C4:
/* 800155C4 00011404 38 61 00 08 */ addi r3, r1, 0x8
/* 800155C8 00011408 48 00 0B BD */ bl TRKGetNextEvent
/* 800155CC 0001140C 2C 03 00 00 */ cmpwi r3, 0x0
/* 800155D0 00011410 41 82 00 68 */ beq lbl_80015638
/* 800155D4 00011414 80 61 00 08 */ lwz r3, 0x8(r1)
/* 800155D8 00011418 3B C0 00 00 */ li r30, 0x0
/* 800155DC 0001141C 38 03 FF FD */ addi r0, r3, -0x3
/* 800155E0 00011420 28 00 00 01 */ cmplwi r0, 0x1
/* 800155E4 00011424 40 81 00 38 */ ble lbl_8001561C
/* 800155E8 00011428 2C 03 00 02 */ cmpwi r3, 0x2
/* 800155EC 0001142C 41 82 00 18 */ beq lbl_80015604
/* 800155F0 00011430 2C 03 00 01 */ cmpwi r3, 0x1
/* 800155F4 00011434 41 82 00 20 */ beq lbl_80015614
/* 800155F8 00011438 2C 03 00 05 */ cmpwi r3, 0x5
/* 800155FC 0001143C 41 82 00 2C */ beq lbl_80015628
/* 80015600 00011440 48 00 00 2C */ b lbl_8001562C
.global lbl_80015604
lbl_80015604:
/* 80015604 00011444 80 61 00 10 */ lwz r3, 0x10(r1)
/* 80015608 00011448 48 00 1A 1D */ bl TRKGetBuffer
/* 8001560C 0001144C 48 00 02 E9 */ bl TRK_DispatchMessage
/* 80015610 00011450 48 00 00 1C */ b lbl_8001562C
.global lbl_80015614
lbl_80015614:
/* 80015614 00011454 3B E0 00 01 */ li r31, 0x1
/* 80015618 00011458 48 00 00 14 */ b lbl_8001562C
.global lbl_8001561C
lbl_8001561C:
/* 8001561C 0001145C 38 61 00 08 */ addi r3, r1, 0x8
/* 80015620 00011460 48 00 3E 81 */ bl TRKTargetInterrupt
/* 80015624 00011464 48 00 00 08 */ b lbl_8001562C
.global lbl_80015628
lbl_80015628:
/* 80015628 00011468 48 00 43 A1 */ bl TRKTargetSupportRequest
.global lbl_8001562C
lbl_8001562C:
/* 8001562C 0001146C 38 61 00 08 */ addi r3, r1, 0x8
/* 80015630 00011470 48 00 0C C5 */ bl TRKDestructEvent
/* 80015634 00011474 48 00 00 3C */ b lbl_80015670
.global lbl_80015638
lbl_80015638:
/* 80015638 00011478 2C 1E 00 00 */ cmpwi r30, 0x0
/* 8001563C 0001147C 41 82 00 14 */ beq lbl_80015650
/* 80015640 00011480 80 6D E3 30 */ lwz r3, gTRKInputPendingPtr@sda21(r13)
/* 80015644 00011484 88 03 00 00 */ lbz r0, 0x0(r3)
/* 80015648 00011488 2C 00 00 00 */ cmpwi r0, 0x0
/* 8001564C 0001148C 41 82 00 10 */ beq lbl_8001565C
.global lbl_80015650
lbl_80015650:
/* 80015650 00011490 3B C0 00 01 */ li r30, 0x1
/* 80015654 00011494 48 00 0E C5 */ bl TRKGetInput
/* 80015658 00011498 48 00 00 18 */ b lbl_80015670
.global lbl_8001565C
lbl_8001565C:
/* 8001565C 0001149C 48 00 45 61 */ bl TRKTargetStopped
/* 80015660 000114A0 2C 03 00 00 */ cmpwi r3, 0x0
/* 80015664 000114A4 40 82 00 08 */ bne lbl_8001566C
/* 80015668 000114A8 48 00 15 41 */ bl TRKTargetContinue
.global lbl_8001566C
lbl_8001566C:
/* 8001566C 000114AC 3B C0 00 00 */ li r30, 0x0
.global lbl_80015670
lbl_80015670:
/* 80015670 000114B0 2C 1F 00 00 */ cmpwi r31, 0x0
/* 80015674 000114B4 41 82 FF 50 */ beq lbl_800155C4
/* 80015678 000114B8 80 01 00 24 */ lwz r0, 0x24(r1)
/* 8001567C 000114BC 83 E1 00 1C */ lwz r31, 0x1c(r1)
/* 80015680 000114C0 83 C1 00 18 */ lwz r30, 0x18(r1)
/* 80015684 000114C4 7C 08 03 A6 */ mtlr r0
/* 80015688 000114C8 38 21 00 20 */ addi r1, r1, 0x20
/* 8001568C 000114CC 4E 80 00 20 */ blr