.include "macros.inc" .section .text, "ax" # 0x80006A00 - 0x80406260 ; 0x003FF860 .global __read_console __read_console: /* 800186F8 00014538 94 21 FF E0 */ stwu r1, -0x20(r1) /* 800186FC 0001453C 7C 08 02 A6 */ mflr r0 /* 80018700 00014540 90 01 00 24 */ stw r0, 0x24(r1) /* 80018704 00014544 93 E1 00 1C */ stw r31, 0x1c(r1) /* 80018708 00014548 7C DF 33 78 */ mr r31, r6 /* 8001870C 0001454C 93 C1 00 18 */ stw r30, 0x18(r1) /* 80018710 00014550 7C BE 2B 78 */ mr r30, r5 /* 80018714 00014554 93 A1 00 14 */ stw r29, 0x14(r1) /* 80018718 00014558 7C 9D 23 78 */ mr r29, r4 /* 8001871C 0001455C 48 00 19 85 */ bl GetUseSerialIO /* 80018720 00014560 54 60 06 3F */ clrlwi. r0, r3, 24 /* 80018724 00014564 40 82 00 0C */ bne lbl_80018730 /* 80018728 00014568 38 60 00 01 */ li r3, 0x1 /* 8001872C 0001456C 48 00 00 18 */ b lbl_80018744 .global lbl_80018730 lbl_80018730: /* 80018730 00014570 7F A4 EB 78 */ mr r4, r29 /* 80018734 00014574 7F C5 F3 78 */ mr r5, r30 /* 80018738 00014578 7F E6 FB 78 */ mr r6, r31 /* 8001873C 0001457C 38 60 00 00 */ li r3, 0x0 /* 80018740 00014580 48 00 00 89 */ bl __read_file .global lbl_80018744 lbl_80018744: /* 80018744 00014584 80 01 00 24 */ lwz r0, 0x24(r1) /* 80018748 00014588 83 E1 00 1C */ lwz r31, 0x1c(r1) /* 8001874C 0001458C 83 C1 00 18 */ lwz r30, 0x18(r1) /* 80018750 00014590 83 A1 00 14 */ lwz r29, 0x14(r1) /* 80018754 00014594 7C 08 03 A6 */ mtlr r0 /* 80018758 00014598 38 21 00 20 */ addi r1, r1, 0x20 /* 8001875C 0001459C 4E 80 00 20 */ blr .global __TRK_write_console __TRK_write_console: /* 80018760 000145A0 94 21 FF E0 */ stwu r1, -0x20(r1) /* 80018764 000145A4 7C 08 02 A6 */ mflr r0 /* 80018768 000145A8 90 01 00 24 */ stw r0, 0x24(r1) /* 8001876C 000145AC 93 E1 00 1C */ stw r31, 0x1c(r1) /* 80018770 000145B0 7C DF 33 78 */ mr r31, r6 /* 80018774 000145B4 93 C1 00 18 */ stw r30, 0x18(r1) /* 80018778 000145B8 7C BE 2B 78 */ mr r30, r5 /* 8001877C 000145BC 93 A1 00 14 */ stw r29, 0x14(r1) /* 80018780 000145C0 7C 9D 23 78 */ mr r29, r4 /* 80018784 000145C4 48 00 19 1D */ bl GetUseSerialIO /* 80018788 000145C8 54 60 06 3F */ clrlwi. r0, r3, 24 /* 8001878C 000145CC 40 82 00 0C */ bne lbl_80018798 /* 80018790 000145D0 38 60 00 01 */ li r3, 0x1 /* 80018794 000145D4 48 00 00 18 */ b lbl_800187AC .global lbl_80018798 lbl_80018798: /* 80018798 000145D8 7F A4 EB 78 */ mr r4, r29 /* 8001879C 000145DC 7F C5 F3 78 */ mr r5, r30 /* 800187A0 000145E0 7F E6 FB 78 */ mr r6, r31 /* 800187A4 000145E4 38 60 00 01 */ li r3, 0x1 /* 800187A8 000145E8 48 00 00 29 */ bl __write_file .global lbl_800187AC lbl_800187AC: /* 800187AC 000145EC 80 01 00 24 */ lwz r0, 0x24(r1) /* 800187B0 000145F0 83 E1 00 1C */ lwz r31, 0x1c(r1) /* 800187B4 000145F4 83 C1 00 18 */ lwz r30, 0x18(r1) /* 800187B8 000145F8 83 A1 00 14 */ lwz r29, 0x14(r1) /* 800187BC 000145FC 7C 08 03 A6 */ mtlr r0 /* 800187C0 00014600 38 21 00 20 */ addi r1, r1, 0x20 /* 800187C4 00014604 4E 80 00 20 */ blr .global __read_file __read_file: /* 800187C8 00014608 38 E0 00 D1 */ li r7, 0xd1 /* 800187CC 0001460C 48 00 00 0C */ b __access_file .global __write_file __write_file: /* 800187D0 00014610 38 E0 00 D0 */ li r7, 0xd0 /* 800187D4 00014614 48 00 00 04 */ b __access_file .global __access_file __access_file: /* 800187D8 00014618 94 21 FF E0 */ stwu r1, -0x20(r1) /* 800187DC 0001461C 7C 08 02 A6 */ mflr r0 /* 800187E0 00014620 90 01 00 24 */ stw r0, 0x24(r1) /* 800187E4 00014624 93 E1 00 1C */ stw r31, 0x1c(r1) /* 800187E8 00014628 7C FF 3B 78 */ mr r31, r7 /* 800187EC 0001462C 93 C1 00 18 */ stw r30, 0x18(r1) /* 800187F0 00014630 7C BE 2B 78 */ mr r30, r5 /* 800187F4 00014634 93 A1 00 14 */ stw r29, 0x14(r1) /* 800187F8 00014638 7C 9D 23 78 */ mr r29, r4 /* 800187FC 0001463C 93 81 00 10 */ stw r28, 0x10(r1) /* 80018800 00014640 7C 7C 1B 78 */ mr r28, r3 /* 80018804 00014644 4B FF EF 71 */ bl GetTRKConnected /* 80018808 00014648 2C 03 00 00 */ cmpwi r3, 0x0 /* 8001880C 0001464C 40 82 00 0C */ bne lbl_80018818 /* 80018810 00014650 38 60 00 01 */ li r3, 0x1 /* 80018814 00014654 48 00 00 50 */ b lbl_80018864 .global lbl_80018818 lbl_80018818: /* 80018818 00014658 80 1E 00 00 */ lwz r0, 0x0(r30) /* 8001881C 0001465C 7F E3 FB 78 */ mr r3, r31 /* 80018820 00014660 90 01 00 08 */ stw r0, 0x8(r1) /* 80018824 00014664 7F 84 E3 78 */ mr r4, r28 /* 80018828 00014668 7F A6 EB 78 */ mr r6, r29 /* 8001882C 0001466C 38 A1 00 08 */ addi r5, r1, 0x8 /* 80018830 00014670 4B FF C8 05 */ bl lbl_80015034 /* 80018834 00014674 54 60 06 3F */ clrlwi. r0, r3, 24 /* 80018838 00014678 80 61 00 08 */ lwz r3, 0x8(r1) /* 8001883C 0001467C 90 7E 00 00 */ stw r3, 0x0(r30) /* 80018840 00014680 41 82 00 10 */ beq lbl_80018850 /* 80018844 00014684 2C 00 00 02 */ cmpwi r0, 0x2 /* 80018848 00014688 41 82 00 10 */ beq lbl_80018858 /* 8001884C 0001468C 48 00 00 14 */ b lbl_80018860 .global lbl_80018850 lbl_80018850: /* 80018850 00014690 38 60 00 00 */ li r3, 0x0 /* 80018854 00014694 48 00 00 10 */ b lbl_80018864 .global lbl_80018858 lbl_80018858: /* 80018858 00014698 38 60 00 02 */ li r3, 0x2 /* 8001885C 0001469C 48 00 00 08 */ b lbl_80018864 .global lbl_80018860 lbl_80018860: /* 80018860 000146A0 38 60 00 01 */ li r3, 0x1 .global lbl_80018864 lbl_80018864: /* 80018864 000146A4 80 01 00 24 */ lwz r0, 0x24(r1) /* 80018868 000146A8 83 E1 00 1C */ lwz r31, 0x1c(r1) /* 8001886C 000146AC 83 C1 00 18 */ lwz r30, 0x18(r1) /* 80018870 000146B0 83 A1 00 14 */ lwz r29, 0x14(r1) /* 80018874 000146B4 83 81 00 10 */ lwz r28, 0x10(r1) /* 80018878 000146B8 7C 08 03 A6 */ mtlr r0 /* 8001887C 000146BC 38 21 00 20 */ addi r1, r1, 0x20 /* 80018880 000146C0 4E 80 00 20 */ blr