donut-decomp/asm/vi/i2c.s

696 lines
33 KiB
ArmAsm
Raw Permalink Normal View History

2022-10-16 16:05:58 +00:00
.include "macros.inc"
.section .text, "ax" # 0x80006A00 - 0x80406260 ; 0x003FF860
2022-10-16 16:31:36 +00:00
.global WaitMicroTime
WaitMicroTime:
2022-10-16 16:05:58 +00:00
/* 8002E490 0002A2D0 94 21 FF E0 */ stwu r1, -0x20(r1)
/* 8002E494 0002A2D4 7C 08 02 A6 */ mflr r0
/* 8002E498 0002A2D8 90 01 00 24 */ stw r0, 0x24(r1)
/* 8002E49C 0002A2DC 93 E1 00 1C */ stw r31, 0x1c(r1)
/* 8002E4A0 0002A2E0 93 C1 00 18 */ stw r30, 0x18(r1)
/* 8002E4A4 0002A2E4 93 A1 00 14 */ stw r29, 0x14(r1)
/* 8002E4A8 0002A2E8 7C 7D 1B 78 */ mr r29, r3
2022-10-16 16:31:36 +00:00
/* 8002E4AC 0002A2EC 4B FF 76 C5 */ bl __OSGetSystemTime
2022-10-16 16:05:58 +00:00
/* 8002E4B0 0002A2F0 7C 9E 23 78 */ mr r30, r4
/* 8002E4B4 0002A2F4 7C 7F 1B 78 */ mr r31, r3
.global lbl_8002E4B8
lbl_8002E4B8:
2022-10-16 16:31:36 +00:00
/* 8002E4B8 0002A2F8 4B FF 76 B9 */ bl __OSGetSystemTime
2022-10-16 16:05:58 +00:00
/* 8002E4BC 0002A2FC 7C FE 20 10 */ subfc r7, r30, r4
/* 8002E4C0 0002A300 38 C0 01 E6 */ li r6, 0x1e6
/* 8002E4C4 0002A304 7C 1F 19 10 */ subfe r0, r31, r3
/* 8002E4C8 0002A308 38 A0 00 00 */ li r5, 0x0
/* 8002E4CC 0002A30C 54 03 18 38 */ slwi r3, r0, 3
/* 8002E4D0 0002A310 54 E4 18 38 */ slwi r4, r7, 3
/* 8002E4D4 0002A314 50 E3 1F 7E */ rlwimi r3, r7, 3, 29, 31
2022-10-16 16:31:36 +00:00
/* 8002E4D8 0002A318 4B FD 8F B5 */ bl __div2i
2022-10-16 16:05:58 +00:00
/* 8002E4DC 0002A31C 7F A5 FE 70 */ srawi r5, r29, 31
/* 8002E4E0 0002A320 6C 60 80 00 */ xoris r0, r3, 0x8000
/* 8002E4E4 0002A324 6C A5 80 00 */ xoris r5, r5, 0x8000
/* 8002E4E8 0002A328 7C 7D 20 10 */ subfc r3, r29, r4
/* 8002E4EC 0002A32C 7C A5 01 10 */ subfe r5, r5, r0
/* 8002E4F0 0002A330 7C A0 01 10 */ subfe r5, r0, r0
/* 8002E4F4 0002A334 7C A5 00 D1 */ neg. r5, r5
/* 8002E4F8 0002A338 40 82 FF C0 */ bne lbl_8002E4B8
/* 8002E4FC 0002A33C 80 01 00 24 */ lwz r0, 0x24(r1)
/* 8002E500 0002A340 83 E1 00 1C */ lwz r31, 0x1c(r1)
/* 8002E504 0002A344 83 C1 00 18 */ lwz r30, 0x18(r1)
/* 8002E508 0002A348 83 A1 00 14 */ lwz r29, 0x14(r1)
/* 8002E50C 0002A34C 7C 08 03 A6 */ mtlr r0
/* 8002E510 0002A350 38 21 00 20 */ addi r1, r1, 0x20
/* 8002E514 0002A354 4E 80 00 20 */ blr
/* 8002E518 0002A358 00 00 00 00 */ .4byte 0x00000000
/* 8002E51C 0002A35C 00 00 00 00 */ .4byte 0x00000000
2022-10-16 16:31:36 +00:00
.global sendSlaveAddr
sendSlaveAddr:
2022-10-16 16:05:58 +00:00
/* 8002E520 0002A360 94 21 FF D0 */ stwu r1, -0x30(r1)
/* 8002E524 0002A364 7C 08 02 A6 */ mflr r0
/* 8002E528 0002A368 90 01 00 34 */ stw r0, 0x34(r1)
/* 8002E52C 0002A36C 39 61 00 30 */ addi r11, r1, 0x30
/* 8002E530 0002A370 4B FD 8E 05 */ bl lbl_80007334
2022-10-16 16:31:36 +00:00
/* 8002E534 0002A374 80 0D 81 28 */ lwz r0, __i2c_ident_flag@sda21(r13)
2022-10-16 16:05:58 +00:00
/* 8002E538 0002A378 7C 7D 1B 78 */ mr r29, r3
/* 8002E53C 0002A37C 2C 00 00 00 */ cmpwi r0, 0x0
/* 8002E540 0002A380 40 82 00 1C */ bne lbl_8002E55C
/* 8002E544 0002A384 3C 60 CD 80 */ lis r3, 0xCD8000C0@ha
/* 8002E548 0002A388 80 03 00 C0 */ lwz r0, 0xCD8000C0@l(r3)
/* 8002E54C 0002A38C 54 00 04 5E */ rlwinm r0, r0, 0, 17, 15
/* 8002E550 0002A390 60 00 80 00 */ ori r0, r0, 0x8000
/* 8002E554 0002A394 90 03 00 C0 */ stw r0, 0xc0(r3)
/* 8002E558 0002A398 48 00 00 14 */ b lbl_8002E56C
.global lbl_8002E55C
lbl_8002E55C:
/* 8002E55C 0002A39C 3C 60 CD 80 */ lis r3, 0xCD8000C0@ha
/* 8002E560 0002A3A0 80 03 00 C0 */ lwz r0, 0xCD8000C0@l(r3)
/* 8002E564 0002A3A4 54 00 04 5E */ rlwinm r0, r0, 0, 17, 15
/* 8002E568 0002A3A8 90 03 00 C0 */ stw r0, 0xc0(r3)
.global lbl_8002E56C
lbl_8002E56C:
2022-10-16 16:31:36 +00:00
/* 8002E56C 0002A3AC 4B FF 76 05 */ bl __OSGetSystemTime
2022-10-16 16:05:58 +00:00
/* 8002E570 0002A3B0 7C 9C 23 78 */ mr r28, r4
/* 8002E574 0002A3B4 7C 7B 1B 78 */ mr r27, r3
/* 8002E578 0002A3B8 3B 40 00 02 */ li r26, 0x2
/* 8002E57C 0002A3BC 3B 20 00 00 */ li r25, 0x0
.global lbl_8002E580
lbl_8002E580:
2022-10-16 16:31:36 +00:00
/* 8002E580 0002A3C0 4B FF 75 F1 */ bl __OSGetSystemTime
2022-10-16 16:05:58 +00:00
/* 8002E584 0002A3C4 7C FC 20 10 */ subfc r7, r28, r4
/* 8002E588 0002A3C8 38 C0 01 E6 */ li r6, 0x1e6
/* 8002E58C 0002A3CC 7C 1B 19 10 */ subfe r0, r27, r3
/* 8002E590 0002A3D0 38 A0 00 00 */ li r5, 0x0
/* 8002E594 0002A3D4 54 03 18 38 */ slwi r3, r0, 3
/* 8002E598 0002A3D8 54 E4 18 38 */ slwi r4, r7, 3
/* 8002E59C 0002A3DC 50 E3 1F 7E */ rlwimi r3, r7, 3, 29, 31
2022-10-16 16:31:36 +00:00
/* 8002E5A0 0002A3E0 4B FD 8E ED */ bl __div2i
2022-10-16 16:05:58 +00:00
/* 8002E5A4 0002A3E4 6C 60 80 00 */ xoris r0, r3, 0x8000
/* 8002E5A8 0002A3E8 6F 25 80 00 */ xoris r5, r25, 0x8000
/* 8002E5AC 0002A3EC 7C 7A 20 10 */ subfc r3, r26, r4
/* 8002E5B0 0002A3F0 7C A5 01 10 */ subfe r5, r5, r0
/* 8002E5B4 0002A3F4 7C A0 01 10 */ subfe r5, r0, r0
/* 8002E5B8 0002A3F8 7C A5 00 D1 */ neg. r5, r5
/* 8002E5BC 0002A3FC 40 82 FF C4 */ bne lbl_8002E580
/* 8002E5C0 0002A400 3F E0 CD 80 */ lis r31, 0xCD8000C0@ha
/* 8002E5C4 0002A404 3B C0 00 00 */ li r30, 0x0
/* 8002E5C8 0002A408 80 1F 00 C0 */ lwz r0, 0xCD8000C0@l(r31)
/* 8002E5CC 0002A40C 3B 60 00 02 */ li r27, 0x2
/* 8002E5D0 0002A410 3B 80 00 00 */ li r28, 0x0
/* 8002E5D4 0002A414 54 00 04 A0 */ rlwinm r0, r0, 0, 18, 16
/* 8002E5D8 0002A418 90 1F 00 C0 */ stw r0, 0xc0(r31)
.global lbl_8002E5DC
lbl_8002E5DC:
/* 8002E5DC 0002A41C 57 A0 06 31 */ rlwinm. r0, r29, 0, 24, 24
/* 8002E5E0 0002A420 41 82 00 34 */ beq lbl_8002E614
2022-10-16 16:31:36 +00:00
/* 8002E5E4 0002A424 80 0D 81 28 */ lwz r0, __i2c_ident_flag@sda21(r13)
2022-10-16 16:05:58 +00:00
/* 8002E5E8 0002A428 2C 00 00 00 */ cmpwi r0, 0x0
/* 8002E5EC 0002A42C 40 82 00 14 */ bne lbl_8002E600
/* 8002E5F0 0002A430 80 1F 00 C0 */ lwz r0, 0xc0(r31)
/* 8002E5F4 0002A434 54 00 04 5E */ rlwinm r0, r0, 0, 17, 15
/* 8002E5F8 0002A438 90 1F 00 C0 */ stw r0, 0xc0(r31)
/* 8002E5FC 0002A43C 48 00 00 44 */ b lbl_8002E640
.global lbl_8002E600
lbl_8002E600:
/* 8002E600 0002A440 80 1F 00 C0 */ lwz r0, 0xc0(r31)
/* 8002E604 0002A444 54 00 04 5E */ rlwinm r0, r0, 0, 17, 15
/* 8002E608 0002A448 60 00 80 00 */ ori r0, r0, 0x8000
/* 8002E60C 0002A44C 90 1F 00 C0 */ stw r0, 0xc0(r31)
/* 8002E610 0002A450 48 00 00 30 */ b lbl_8002E640
.global lbl_8002E614
lbl_8002E614:
2022-10-16 16:31:36 +00:00
/* 8002E614 0002A454 80 0D 81 28 */ lwz r0, __i2c_ident_flag@sda21(r13)
2022-10-16 16:05:58 +00:00
/* 8002E618 0002A458 2C 00 00 00 */ cmpwi r0, 0x0
/* 8002E61C 0002A45C 40 82 00 18 */ bne lbl_8002E634
/* 8002E620 0002A460 80 1F 00 C0 */ lwz r0, 0xc0(r31)
/* 8002E624 0002A464 54 00 04 5E */ rlwinm r0, r0, 0, 17, 15
/* 8002E628 0002A468 60 00 80 00 */ ori r0, r0, 0x8000
/* 8002E62C 0002A46C 90 1F 00 C0 */ stw r0, 0xc0(r31)
/* 8002E630 0002A470 48 00 00 10 */ b lbl_8002E640
.global lbl_8002E634
lbl_8002E634:
/* 8002E634 0002A474 80 1F 00 C0 */ lwz r0, 0xc0(r31)
/* 8002E638 0002A478 54 00 04 5E */ rlwinm r0, r0, 0, 17, 15
/* 8002E63C 0002A47C 90 1F 00 C0 */ stw r0, 0xc0(r31)
.global lbl_8002E640
lbl_8002E640:
2022-10-16 16:31:36 +00:00
/* 8002E640 0002A480 4B FF 75 31 */ bl __OSGetSystemTime
2022-10-16 16:05:58 +00:00
/* 8002E644 0002A484 7C 9A 23 78 */ mr r26, r4
/* 8002E648 0002A488 7C 79 1B 78 */ mr r25, r3
.global lbl_8002E64C
lbl_8002E64C:
2022-10-16 16:31:36 +00:00
/* 8002E64C 0002A48C 4B FF 75 25 */ bl __OSGetSystemTime
2022-10-16 16:05:58 +00:00
/* 8002E650 0002A490 7C FA 20 10 */ subfc r7, r26, r4
/* 8002E654 0002A494 38 C0 01 E6 */ li r6, 0x1e6
/* 8002E658 0002A498 7C 19 19 10 */ subfe r0, r25, r3
/* 8002E65C 0002A49C 38 A0 00 00 */ li r5, 0x0
/* 8002E660 0002A4A0 54 03 18 38 */ slwi r3, r0, 3
/* 8002E664 0002A4A4 54 E4 18 38 */ slwi r4, r7, 3
/* 8002E668 0002A4A8 50 E3 1F 7E */ rlwimi r3, r7, 3, 29, 31
2022-10-16 16:31:36 +00:00
/* 8002E66C 0002A4AC 4B FD 8E 21 */ bl __div2i
2022-10-16 16:05:58 +00:00
/* 8002E670 0002A4B0 6C 60 80 00 */ xoris r0, r3, 0x8000
/* 8002E674 0002A4B4 6F 85 80 00 */ xoris r5, r28, 0x8000
/* 8002E678 0002A4B8 7C 7B 20 10 */ subfc r3, r27, r4
/* 8002E67C 0002A4BC 7C A5 01 10 */ subfe r5, r5, r0
/* 8002E680 0002A4C0 7C A0 01 10 */ subfe r5, r0, r0
/* 8002E684 0002A4C4 7C A5 00 D1 */ neg. r5, r5
/* 8002E688 0002A4C8 40 82 FF C4 */ bne lbl_8002E64C
/* 8002E68C 0002A4CC 80 1F 00 C0 */ lwz r0, 0xc0(r31)
/* 8002E690 0002A4D0 54 00 04 A0 */ rlwinm r0, r0, 0, 18, 16
/* 8002E694 0002A4D4 60 00 40 00 */ ori r0, r0, 0x4000
/* 8002E698 0002A4D8 90 1F 00 C0 */ stw r0, 0xc0(r31)
2022-10-16 16:31:36 +00:00
/* 8002E69C 0002A4DC 4B FF 74 D5 */ bl __OSGetSystemTime
2022-10-16 16:05:58 +00:00
/* 8002E6A0 0002A4E0 7C 99 23 78 */ mr r25, r4
/* 8002E6A4 0002A4E4 7C 7A 1B 78 */ mr r26, r3
.global lbl_8002E6A8
lbl_8002E6A8:
2022-10-16 16:31:36 +00:00
/* 8002E6A8 0002A4E8 4B FF 74 C9 */ bl __OSGetSystemTime
2022-10-16 16:05:58 +00:00
/* 8002E6AC 0002A4EC 7C F9 20 10 */ subfc r7, r25, r4
/* 8002E6B0 0002A4F0 38 C0 01 E6 */ li r6, 0x1e6
/* 8002E6B4 0002A4F4 7C 1A 19 10 */ subfe r0, r26, r3
/* 8002E6B8 0002A4F8 38 A0 00 00 */ li r5, 0x0
/* 8002E6BC 0002A4FC 54 03 18 38 */ slwi r3, r0, 3
/* 8002E6C0 0002A500 54 E4 18 38 */ slwi r4, r7, 3
/* 8002E6C4 0002A504 50 E3 1F 7E */ rlwimi r3, r7, 3, 29, 31
2022-10-16 16:31:36 +00:00
/* 8002E6C8 0002A508 4B FD 8D C5 */ bl __div2i
2022-10-16 16:05:58 +00:00
/* 8002E6CC 0002A50C 6C 60 80 00 */ xoris r0, r3, 0x8000
/* 8002E6D0 0002A510 6F 85 80 00 */ xoris r5, r28, 0x8000
/* 8002E6D4 0002A514 7C 7B 20 10 */ subfc r3, r27, r4
/* 8002E6D8 0002A518 7C A5 01 10 */ subfe r5, r5, r0
/* 8002E6DC 0002A51C 7C A0 01 10 */ subfe r5, r0, r0
/* 8002E6E0 0002A520 7C A5 00 D1 */ neg. r5, r5
/* 8002E6E4 0002A524 40 82 FF C4 */ bne lbl_8002E6A8
/* 8002E6E8 0002A528 80 1F 00 C0 */ lwz r0, 0xc0(r31)
/* 8002E6EC 0002A52C 3B DE 00 01 */ addi r30, r30, 0x1
/* 8002E6F0 0002A530 2C 1E 00 08 */ cmpwi r30, 0x8
/* 8002E6F4 0002A534 57 BD 0E 3C */ rlwinm r29, r29, 1, 24, 30
/* 8002E6F8 0002A538 54 00 04 A0 */ rlwinm r0, r0, 0, 18, 16
/* 8002E6FC 0002A53C 90 1F 00 C0 */ stw r0, 0xc0(r31)
/* 8002E700 0002A540 41 80 FE DC */ blt lbl_8002E5DC
/* 8002E704 0002A544 3C 60 CD 80 */ lis r3, 0xCD8000C4@ha
/* 8002E708 0002A548 80 03 00 C4 */ lwz r0, 0xCD8000C4@l(r3)
/* 8002E70C 0002A54C 54 00 04 5E */ rlwinm r0, r0, 0, 17, 15
/* 8002E710 0002A550 60 00 40 00 */ ori r0, r0, 0x4000
/* 8002E714 0002A554 90 03 00 C4 */ stw r0, 0xc4(r3)
2022-10-16 16:31:36 +00:00
/* 8002E718 0002A558 4B FF 74 59 */ bl __OSGetSystemTime
2022-10-16 16:05:58 +00:00
/* 8002E71C 0002A55C 7C 9F 23 78 */ mr r31, r4
/* 8002E720 0002A560 7C 7E 1B 78 */ mr r30, r3
/* 8002E724 0002A564 3B A0 00 02 */ li r29, 0x2
/* 8002E728 0002A568 3B 80 00 00 */ li r28, 0x0
.global lbl_8002E72C
lbl_8002E72C:
2022-10-16 16:31:36 +00:00
/* 8002E72C 0002A56C 4B FF 74 45 */ bl __OSGetSystemTime
2022-10-16 16:05:58 +00:00
/* 8002E730 0002A570 7C FF 20 10 */ subfc r7, r31, r4
/* 8002E734 0002A574 38 C0 01 E6 */ li r6, 0x1e6
/* 8002E738 0002A578 7C 1E 19 10 */ subfe r0, r30, r3
/* 8002E73C 0002A57C 38 A0 00 00 */ li r5, 0x0
/* 8002E740 0002A580 54 03 18 38 */ slwi r3, r0, 3
/* 8002E744 0002A584 54 E4 18 38 */ slwi r4, r7, 3
/* 8002E748 0002A588 50 E3 1F 7E */ rlwimi r3, r7, 3, 29, 31
2022-10-16 16:31:36 +00:00
/* 8002E74C 0002A58C 4B FD 8D 41 */ bl __div2i
2022-10-16 16:05:58 +00:00
/* 8002E750 0002A590 6C 60 80 00 */ xoris r0, r3, 0x8000
/* 8002E754 0002A594 6F 85 80 00 */ xoris r5, r28, 0x8000
/* 8002E758 0002A598 7C 7D 20 10 */ subfc r3, r29, r4
/* 8002E75C 0002A59C 7C A5 01 10 */ subfe r5, r5, r0
/* 8002E760 0002A5A0 7C A0 01 10 */ subfe r5, r0, r0
/* 8002E764 0002A5A4 7C A5 00 D1 */ neg. r5, r5
/* 8002E768 0002A5A8 40 82 FF C4 */ bne lbl_8002E72C
/* 8002E76C 0002A5AC 3C 60 CD 80 */ lis r3, 0xCD8000C0@ha
/* 8002E770 0002A5B0 80 03 00 C0 */ lwz r0, 0xCD8000C0@l(r3)
/* 8002E774 0002A5B4 54 00 04 A0 */ rlwinm r0, r0, 0, 18, 16
/* 8002E778 0002A5B8 60 00 40 00 */ ori r0, r0, 0x4000
/* 8002E77C 0002A5BC 90 03 00 C0 */ stw r0, 0xc0(r3)
2022-10-16 16:31:36 +00:00
/* 8002E780 0002A5C0 4B FF 73 F1 */ bl __OSGetSystemTime
2022-10-16 16:05:58 +00:00
/* 8002E784 0002A5C4 7C 9C 23 78 */ mr r28, r4
/* 8002E788 0002A5C8 7C 7F 1B 78 */ mr r31, r3
/* 8002E78C 0002A5CC 3B C0 00 02 */ li r30, 0x2
/* 8002E790 0002A5D0 3B A0 00 00 */ li r29, 0x0
.global lbl_8002E794
lbl_8002E794:
2022-10-16 16:31:36 +00:00
/* 8002E794 0002A5D4 4B FF 73 DD */ bl __OSGetSystemTime
2022-10-16 16:05:58 +00:00
/* 8002E798 0002A5D8 7C FC 20 10 */ subfc r7, r28, r4
/* 8002E79C 0002A5DC 38 C0 01 E6 */ li r6, 0x1e6
/* 8002E7A0 0002A5E0 7C 1F 19 10 */ subfe r0, r31, r3
/* 8002E7A4 0002A5E4 38 A0 00 00 */ li r5, 0x0
/* 8002E7A8 0002A5E8 54 03 18 38 */ slwi r3, r0, 3
/* 8002E7AC 0002A5EC 54 E4 18 38 */ slwi r4, r7, 3
/* 8002E7B0 0002A5F0 50 E3 1F 7E */ rlwimi r3, r7, 3, 29, 31
2022-10-16 16:31:36 +00:00
/* 8002E7B4 0002A5F4 4B FD 8C D9 */ bl __div2i
2022-10-16 16:05:58 +00:00
/* 8002E7B8 0002A5F8 6C 60 80 00 */ xoris r0, r3, 0x8000
/* 8002E7BC 0002A5FC 6F A5 80 00 */ xoris r5, r29, 0x8000
/* 8002E7C0 0002A600 7C 7E 20 10 */ subfc r3, r30, r4
/* 8002E7C4 0002A604 7C A5 01 10 */ subfe r5, r5, r0
/* 8002E7C8 0002A608 7C A0 01 10 */ subfe r5, r0, r0
/* 8002E7CC 0002A60C 7C A5 00 D1 */ neg. r5, r5
/* 8002E7D0 0002A610 40 82 FF C4 */ bne lbl_8002E794
2022-10-16 16:31:36 +00:00
/* 8002E7D4 0002A614 80 0D 81 28 */ lwz r0, __i2c_ident_flag@sda21(r13)
2022-10-16 16:05:58 +00:00
/* 8002E7D8 0002A618 28 00 00 01 */ cmplwi r0, 0x1
/* 8002E7DC 0002A61C 40 82 00 1C */ bne lbl_8002E7F8
/* 8002E7E0 0002A620 3C 60 CD 80 */ lis r3, 0xCD8000C8@ha
/* 8002E7E4 0002A624 80 03 00 C8 */ lwz r0, 0xCD8000C8@l(r3)
/* 8002E7E8 0002A628 54 00 8F FF */ extrwi. r0, r0, 1, 16
/* 8002E7EC 0002A62C 41 82 00 0C */ beq lbl_8002E7F8
/* 8002E7F0 0002A630 38 60 00 00 */ li r3, 0x0
/* 8002E7F4 0002A634 48 00 00 5C */ b lbl_8002E850
.global lbl_8002E7F8
lbl_8002E7F8:
2022-10-16 16:31:36 +00:00
/* 8002E7F8 0002A638 80 0D 81 28 */ lwz r0, __i2c_ident_flag@sda21(r13)
2022-10-16 16:05:58 +00:00
/* 8002E7FC 0002A63C 2C 00 00 00 */ cmpwi r0, 0x0
/* 8002E800 0002A640 40 82 00 1C */ bne lbl_8002E81C
/* 8002E804 0002A644 3C 60 CD 80 */ lis r3, 0xCD8000C0@ha
/* 8002E808 0002A648 80 03 00 C0 */ lwz r0, 0xCD8000C0@l(r3)
/* 8002E80C 0002A64C 54 00 04 5E */ rlwinm r0, r0, 0, 17, 15
/* 8002E810 0002A650 60 00 80 00 */ ori r0, r0, 0x8000
/* 8002E814 0002A654 90 03 00 C0 */ stw r0, 0xc0(r3)
/* 8002E818 0002A658 48 00 00 14 */ b lbl_8002E82C
.global lbl_8002E81C
lbl_8002E81C:
/* 8002E81C 0002A65C 3C 60 CD 80 */ lis r3, 0xCD8000C0@ha
/* 8002E820 0002A660 80 03 00 C0 */ lwz r0, 0xCD8000C0@l(r3)
/* 8002E824 0002A664 54 00 04 5E */ rlwinm r0, r0, 0, 17, 15
/* 8002E828 0002A668 90 03 00 C0 */ stw r0, 0xc0(r3)
.global lbl_8002E82C
lbl_8002E82C:
/* 8002E82C 0002A66C 3C 80 CD 80 */ lis r4, 0xCD8000C4@ha
/* 8002E830 0002A670 38 60 00 01 */ li r3, 0x1
/* 8002E834 0002A674 80 04 00 C4 */ lwz r0, 0xCD8000C4@l(r4)
/* 8002E838 0002A678 54 00 04 5E */ rlwinm r0, r0, 0, 17, 15
/* 8002E83C 0002A67C 60 00 C0 00 */ ori r0, r0, 0xc000
/* 8002E840 0002A680 90 04 00 C4 */ stw r0, 0xc4(r4)
/* 8002E844 0002A684 80 04 00 C0 */ lwz r0, 0xc0(r4)
/* 8002E848 0002A688 54 00 04 A0 */ rlwinm r0, r0, 0, 18, 16
/* 8002E84C 0002A68C 90 04 00 C0 */ stw r0, 0xc0(r4)
.global lbl_8002E850
lbl_8002E850:
/* 8002E850 0002A690 39 61 00 30 */ addi r11, r1, 0x30
/* 8002E854 0002A694 4B FD 8B 2D */ bl lbl_80007380
/* 8002E858 0002A698 80 01 00 34 */ lwz r0, 0x34(r1)
/* 8002E85C 0002A69C 7C 08 03 A6 */ mtlr r0
/* 8002E860 0002A6A0 38 21 00 30 */ addi r1, r1, 0x30
/* 8002E864 0002A6A4 4E 80 00 20 */ blr
/* 8002E868 0002A6A8 00 00 00 00 */ .4byte 0x00000000
/* 8002E86C 0002A6AC 00 00 00 00 */ .4byte 0x00000000
2022-10-16 16:31:36 +00:00
.global __VISendI2CData
__VISendI2CData:
2022-10-16 16:05:58 +00:00
/* 8002E870 0002A6B0 94 21 FF D0 */ stwu r1, -0x30(r1)
/* 8002E874 0002A6B4 7C 08 02 A6 */ mflr r0
/* 8002E878 0002A6B8 90 01 00 34 */ stw r0, 0x34(r1)
/* 8002E87C 0002A6BC 39 61 00 30 */ addi r11, r1, 0x30
/* 8002E880 0002A6C0 4B FD 8A A9 */ bl lbl_80007328
2022-10-16 16:31:36 +00:00
/* 8002E884 0002A6C4 80 0D E5 90 */ lwz r0, __i2c_ident_first@sda21(r13)
2022-10-16 16:05:58 +00:00
/* 8002E888 0002A6C8 7C 7D 1B 78 */ mr r29, r3
/* 8002E88C 0002A6CC 7C 9A 23 78 */ mr r26, r4
/* 8002E890 0002A6D0 7C BB 2B 78 */ mr r27, r5
/* 8002E894 0002A6D4 2C 00 00 00 */ cmpwi r0, 0x0
/* 8002E898 0002A6D8 40 82 00 10 */ bne lbl_8002E8A8
/* 8002E89C 0002A6DC 38 00 00 01 */ li r0, 0x1
2022-10-16 16:31:36 +00:00
/* 8002E8A0 0002A6E0 90 0D 81 28 */ stw r0, __i2c_ident_flag@sda21(r13)
/* 8002E8A4 0002A6E4 90 0D E5 90 */ stw r0, __i2c_ident_first@sda21(r13)
2022-10-16 16:05:58 +00:00
.global lbl_8002E8A8
lbl_8002E8A8:
2022-10-16 16:31:36 +00:00
/* 8002E8A8 0002A6E8 4B FF 2F 79 */ bl OSDisableInterrupts
2022-10-16 16:05:58 +00:00
/* 8002E8AC 0002A6EC 3C 80 CD 80 */ lis r4, 0xCD8000C4@ha
/* 8002E8B0 0002A6F0 7C 7C 1B 78 */ mr r28, r3
/* 8002E8B4 0002A6F4 80 04 00 C4 */ lwz r0, 0xCD8000C4@l(r4)
/* 8002E8B8 0002A6F8 54 00 04 5E */ rlwinm r0, r0, 0, 17, 15
/* 8002E8BC 0002A6FC 60 00 C0 00 */ ori r0, r0, 0xc000
/* 8002E8C0 0002A700 90 04 00 C4 */ stw r0, 0xc4(r4)
/* 8002E8C4 0002A704 80 04 00 C0 */ lwz r0, 0xc0(r4)
/* 8002E8C8 0002A708 54 00 04 A0 */ rlwinm r0, r0, 0, 18, 16
/* 8002E8CC 0002A70C 60 00 40 00 */ ori r0, r0, 0x4000
/* 8002E8D0 0002A710 90 04 00 C0 */ stw r0, 0xc0(r4)
2022-10-16 16:31:36 +00:00
/* 8002E8D4 0002A714 80 0D 81 28 */ lwz r0, __i2c_ident_flag@sda21(r13)
2022-10-16 16:05:58 +00:00
/* 8002E8D8 0002A718 2C 00 00 00 */ cmpwi r0, 0x0
/* 8002E8DC 0002A71C 40 82 00 14 */ bne lbl_8002E8F0
/* 8002E8E0 0002A720 80 04 00 C0 */ lwz r0, 0xc0(r4)
/* 8002E8E4 0002A724 54 00 04 5E */ rlwinm r0, r0, 0, 17, 15
/* 8002E8E8 0002A728 90 04 00 C0 */ stw r0, 0xc0(r4)
/* 8002E8EC 0002A72C 48 00 00 14 */ b lbl_8002E900
.global lbl_8002E8F0
lbl_8002E8F0:
/* 8002E8F0 0002A730 80 04 00 C0 */ lwz r0, 0xc0(r4)
/* 8002E8F4 0002A734 54 00 04 5E */ rlwinm r0, r0, 0, 17, 15
/* 8002E8F8 0002A738 60 00 80 00 */ ori r0, r0, 0x8000
/* 8002E8FC 0002A73C 90 04 00 C0 */ stw r0, 0xc0(r4)
.global lbl_8002E900
lbl_8002E900:
2022-10-16 16:31:36 +00:00
/* 8002E900 0002A740 4B FF 72 71 */ bl __OSGetSystemTime
2022-10-16 16:05:58 +00:00
/* 8002E904 0002A744 7C 99 23 78 */ mr r25, r4
/* 8002E908 0002A748 7C 78 1B 78 */ mr r24, r3
/* 8002E90C 0002A74C 3A E0 00 02 */ li r23, 0x2
/* 8002E910 0002A750 3A C0 00 00 */ li r22, 0x0
.global lbl_8002E914
lbl_8002E914:
2022-10-16 16:31:36 +00:00
/* 8002E914 0002A754 4B FF 72 5D */ bl __OSGetSystemTime
2022-10-16 16:05:58 +00:00
/* 8002E918 0002A758 7C F9 20 10 */ subfc r7, r25, r4
/* 8002E91C 0002A75C 38 C0 01 E6 */ li r6, 0x1e6
/* 8002E920 0002A760 7C 18 19 10 */ subfe r0, r24, r3
/* 8002E924 0002A764 38 A0 00 00 */ li r5, 0x0
/* 8002E928 0002A768 54 03 18 38 */ slwi r3, r0, 3
/* 8002E92C 0002A76C 54 E4 18 38 */ slwi r4, r7, 3
/* 8002E930 0002A770 50 E3 1F 7E */ rlwimi r3, r7, 3, 29, 31
2022-10-16 16:31:36 +00:00
/* 8002E934 0002A774 4B FD 8B 59 */ bl __div2i
2022-10-16 16:05:58 +00:00
/* 8002E938 0002A778 6C 60 80 00 */ xoris r0, r3, 0x8000
/* 8002E93C 0002A77C 6E C5 80 00 */ xoris r5, r22, 0x8000
/* 8002E940 0002A780 7C 77 20 10 */ subfc r3, r23, r4
/* 8002E944 0002A784 7C A5 01 10 */ subfe r5, r5, r0
/* 8002E948 0002A788 7C A0 01 10 */ subfe r5, r0, r0
/* 8002E94C 0002A78C 7C A5 00 D1 */ neg. r5, r5
/* 8002E950 0002A790 40 82 FF C4 */ bne lbl_8002E914
2022-10-16 16:31:36 +00:00
/* 8002E954 0002A794 4B FF 72 1D */ bl __OSGetSystemTime
2022-10-16 16:05:58 +00:00
/* 8002E958 0002A798 7C 99 23 78 */ mr r25, r4
/* 8002E95C 0002A79C 7C 78 1B 78 */ mr r24, r3
/* 8002E960 0002A7A0 3A E0 00 02 */ li r23, 0x2
/* 8002E964 0002A7A4 3A C0 00 00 */ li r22, 0x0
.global lbl_8002E968
lbl_8002E968:
2022-10-16 16:31:36 +00:00
/* 8002E968 0002A7A8 4B FF 72 09 */ bl __OSGetSystemTime
2022-10-16 16:05:58 +00:00
/* 8002E96C 0002A7AC 7C F9 20 10 */ subfc r7, r25, r4
/* 8002E970 0002A7B0 38 C0 01 E6 */ li r6, 0x1e6
/* 8002E974 0002A7B4 7C 18 19 10 */ subfe r0, r24, r3
/* 8002E978 0002A7B8 38 A0 00 00 */ li r5, 0x0
/* 8002E97C 0002A7BC 54 03 18 38 */ slwi r3, r0, 3
/* 8002E980 0002A7C0 54 E4 18 38 */ slwi r4, r7, 3
/* 8002E984 0002A7C4 50 E3 1F 7E */ rlwimi r3, r7, 3, 29, 31
2022-10-16 16:31:36 +00:00
/* 8002E988 0002A7C8 4B FD 8B 05 */ bl __div2i
2022-10-16 16:05:58 +00:00
/* 8002E98C 0002A7CC 6C 60 80 00 */ xoris r0, r3, 0x8000
/* 8002E990 0002A7D0 6E C5 80 00 */ xoris r5, r22, 0x8000
/* 8002E994 0002A7D4 7C 77 20 10 */ subfc r3, r23, r4
/* 8002E998 0002A7D8 7C A5 01 10 */ subfe r5, r5, r0
/* 8002E99C 0002A7DC 7C A0 01 10 */ subfe r5, r0, r0
/* 8002E9A0 0002A7E0 7C A5 00 D1 */ neg. r5, r5
/* 8002E9A4 0002A7E4 40 82 FF C4 */ bne lbl_8002E968
/* 8002E9A8 0002A7E8 7F A3 EB 78 */ mr r3, r29
2022-10-16 16:31:36 +00:00
/* 8002E9AC 0002A7EC 4B FF FB 75 */ bl sendSlaveAddr
2022-10-16 16:05:58 +00:00
/* 8002E9B0 0002A7F0 2C 03 00 00 */ cmpwi r3, 0x0
/* 8002E9B4 0002A7F4 40 82 00 14 */ bne lbl_8002E9C8
/* 8002E9B8 0002A7F8 7F 83 E3 78 */ mr r3, r28
2022-10-16 16:31:36 +00:00
/* 8002E9BC 0002A7FC 4B FF 2E A5 */ bl OSRestoreInterrupts
2022-10-16 16:05:58 +00:00
/* 8002E9C0 0002A800 38 60 00 00 */ li r3, 0x0
/* 8002E9C4 0002A804 48 00 03 C8 */ b lbl_8002ED8C
.global lbl_8002E9C8
lbl_8002E9C8:
/* 8002E9C8 0002A808 3F E0 CD 80 */ lis r31, 0xCD8000C4@ha
/* 8002E9CC 0002A80C 3B 00 00 02 */ li r24, 0x2
/* 8002E9D0 0002A810 80 1F 00 C4 */ lwz r0, 0xCD8000C4@l(r31)
/* 8002E9D4 0002A814 3B 20 00 00 */ li r25, 0x0
/* 8002E9D8 0002A818 54 00 04 5E */ rlwinm r0, r0, 0, 17, 15
/* 8002E9DC 0002A81C 60 00 C0 00 */ ori r0, r0, 0xc000
/* 8002E9E0 0002A820 90 1F 00 C4 */ stw r0, 0xc4(r31)
/* 8002E9E4 0002A824 48 00 02 64 */ b lbl_8002EC48
.global lbl_8002E9E8
lbl_8002E9E8:
/* 8002E9E8 0002A828 8B BA 00 00 */ lbz r29, 0x0(r26)
/* 8002E9EC 0002A82C 3B C0 00 00 */ li r30, 0x0
/* 8002E9F0 0002A830 3B 5A 00 01 */ addi r26, r26, 0x1
.global lbl_8002E9F4
lbl_8002E9F4:
/* 8002E9F4 0002A834 57 A0 06 31 */ rlwinm. r0, r29, 0, 24, 24
/* 8002E9F8 0002A838 41 82 00 34 */ beq lbl_8002EA2C
2022-10-16 16:31:36 +00:00
/* 8002E9FC 0002A83C 80 0D 81 28 */ lwz r0, __i2c_ident_flag@sda21(r13)
2022-10-16 16:05:58 +00:00
/* 8002EA00 0002A840 2C 00 00 00 */ cmpwi r0, 0x0
/* 8002EA04 0002A844 40 82 00 14 */ bne lbl_8002EA18
/* 8002EA08 0002A848 80 1F 00 C0 */ lwz r0, 0xc0(r31)
/* 8002EA0C 0002A84C 54 00 04 5E */ rlwinm r0, r0, 0, 17, 15
/* 8002EA10 0002A850 90 1F 00 C0 */ stw r0, 0xc0(r31)
/* 8002EA14 0002A854 48 00 00 44 */ b lbl_8002EA58
.global lbl_8002EA18
lbl_8002EA18:
/* 8002EA18 0002A858 80 1F 00 C0 */ lwz r0, 0xc0(r31)
/* 8002EA1C 0002A85C 54 00 04 5E */ rlwinm r0, r0, 0, 17, 15
/* 8002EA20 0002A860 60 00 80 00 */ ori r0, r0, 0x8000
/* 8002EA24 0002A864 90 1F 00 C0 */ stw r0, 0xc0(r31)
/* 8002EA28 0002A868 48 00 00 30 */ b lbl_8002EA58
.global lbl_8002EA2C
lbl_8002EA2C:
2022-10-16 16:31:36 +00:00
/* 8002EA2C 0002A86C 80 0D 81 28 */ lwz r0, __i2c_ident_flag@sda21(r13)
2022-10-16 16:05:58 +00:00
/* 8002EA30 0002A870 2C 00 00 00 */ cmpwi r0, 0x0
/* 8002EA34 0002A874 40 82 00 18 */ bne lbl_8002EA4C
/* 8002EA38 0002A878 80 1F 00 C0 */ lwz r0, 0xc0(r31)
/* 8002EA3C 0002A87C 54 00 04 5E */ rlwinm r0, r0, 0, 17, 15
/* 8002EA40 0002A880 60 00 80 00 */ ori r0, r0, 0x8000
/* 8002EA44 0002A884 90 1F 00 C0 */ stw r0, 0xc0(r31)
/* 8002EA48 0002A888 48 00 00 10 */ b lbl_8002EA58
.global lbl_8002EA4C
lbl_8002EA4C:
/* 8002EA4C 0002A88C 80 1F 00 C0 */ lwz r0, 0xc0(r31)
/* 8002EA50 0002A890 54 00 04 5E */ rlwinm r0, r0, 0, 17, 15
/* 8002EA54 0002A894 90 1F 00 C0 */ stw r0, 0xc0(r31)
.global lbl_8002EA58
lbl_8002EA58:
2022-10-16 16:31:36 +00:00
/* 8002EA58 0002A898 4B FF 71 19 */ bl __OSGetSystemTime
2022-10-16 16:05:58 +00:00
/* 8002EA5C 0002A89C 7C 97 23 78 */ mr r23, r4
/* 8002EA60 0002A8A0 7C 76 1B 78 */ mr r22, r3
.global lbl_8002EA64
lbl_8002EA64:
2022-10-16 16:31:36 +00:00
/* 8002EA64 0002A8A4 4B FF 71 0D */ bl __OSGetSystemTime
2022-10-16 16:05:58 +00:00
/* 8002EA68 0002A8A8 7C F7 20 10 */ subfc r7, r23, r4
/* 8002EA6C 0002A8AC 38 C0 01 E6 */ li r6, 0x1e6
/* 8002EA70 0002A8B0 7C 16 19 10 */ subfe r0, r22, r3
/* 8002EA74 0002A8B4 38 A0 00 00 */ li r5, 0x0
/* 8002EA78 0002A8B8 54 03 18 38 */ slwi r3, r0, 3
/* 8002EA7C 0002A8BC 54 E4 18 38 */ slwi r4, r7, 3
/* 8002EA80 0002A8C0 50 E3 1F 7E */ rlwimi r3, r7, 3, 29, 31
2022-10-16 16:31:36 +00:00
/* 8002EA84 0002A8C4 4B FD 8A 09 */ bl __div2i
2022-10-16 16:05:58 +00:00
/* 8002EA88 0002A8C8 6C 60 80 00 */ xoris r0, r3, 0x8000
/* 8002EA8C 0002A8CC 6F 25 80 00 */ xoris r5, r25, 0x8000
/* 8002EA90 0002A8D0 7C 78 20 10 */ subfc r3, r24, r4
/* 8002EA94 0002A8D4 7C A5 01 10 */ subfe r5, r5, r0
/* 8002EA98 0002A8D8 7C A0 01 10 */ subfe r5, r0, r0
/* 8002EA9C 0002A8DC 7C A5 00 D1 */ neg. r5, r5
/* 8002EAA0 0002A8E0 40 82 FF C4 */ bne lbl_8002EA64
/* 8002EAA4 0002A8E4 80 1F 00 C0 */ lwz r0, 0xc0(r31)
/* 8002EAA8 0002A8E8 54 00 04 A0 */ rlwinm r0, r0, 0, 18, 16
/* 8002EAAC 0002A8EC 60 00 40 00 */ ori r0, r0, 0x4000
/* 8002EAB0 0002A8F0 90 1F 00 C0 */ stw r0, 0xc0(r31)
2022-10-16 16:31:36 +00:00
/* 8002EAB4 0002A8F4 4B FF 70 BD */ bl __OSGetSystemTime
2022-10-16 16:05:58 +00:00
/* 8002EAB8 0002A8F8 7C 96 23 78 */ mr r22, r4
/* 8002EABC 0002A8FC 7C 77 1B 78 */ mr r23, r3
.global lbl_8002EAC0
lbl_8002EAC0:
2022-10-16 16:31:36 +00:00
/* 8002EAC0 0002A900 4B FF 70 B1 */ bl __OSGetSystemTime
2022-10-16 16:05:58 +00:00
/* 8002EAC4 0002A904 7C F6 20 10 */ subfc r7, r22, r4
/* 8002EAC8 0002A908 38 C0 01 E6 */ li r6, 0x1e6
/* 8002EACC 0002A90C 7C 17 19 10 */ subfe r0, r23, r3
/* 8002EAD0 0002A910 38 A0 00 00 */ li r5, 0x0
/* 8002EAD4 0002A914 54 03 18 38 */ slwi r3, r0, 3
/* 8002EAD8 0002A918 54 E4 18 38 */ slwi r4, r7, 3
/* 8002EADC 0002A91C 50 E3 1F 7E */ rlwimi r3, r7, 3, 29, 31
2022-10-16 16:31:36 +00:00
/* 8002EAE0 0002A920 4B FD 89 AD */ bl __div2i
2022-10-16 16:05:58 +00:00
/* 8002EAE4 0002A924 6C 60 80 00 */ xoris r0, r3, 0x8000
/* 8002EAE8 0002A928 6F 25 80 00 */ xoris r5, r25, 0x8000
/* 8002EAEC 0002A92C 7C 78 20 10 */ subfc r3, r24, r4
/* 8002EAF0 0002A930 7C A5 01 10 */ subfe r5, r5, r0
/* 8002EAF4 0002A934 7C A0 01 10 */ subfe r5, r0, r0
/* 8002EAF8 0002A938 7C A5 00 D1 */ neg. r5, r5
/* 8002EAFC 0002A93C 40 82 FF C4 */ bne lbl_8002EAC0
/* 8002EB00 0002A940 80 1F 00 C0 */ lwz r0, 0xc0(r31)
/* 8002EB04 0002A944 3B DE 00 01 */ addi r30, r30, 0x1
/* 8002EB08 0002A948 2C 1E 00 08 */ cmpwi r30, 0x8
/* 8002EB0C 0002A94C 57 BD 0E 3C */ rlwinm r29, r29, 1, 24, 30
/* 8002EB10 0002A950 54 00 04 A0 */ rlwinm r0, r0, 0, 18, 16
/* 8002EB14 0002A954 90 1F 00 C0 */ stw r0, 0xc0(r31)
/* 8002EB18 0002A958 41 80 FE DC */ blt lbl_8002E9F4
/* 8002EB1C 0002A95C 80 1F 00 C4 */ lwz r0, 0xc4(r31)
/* 8002EB20 0002A960 54 00 04 5E */ rlwinm r0, r0, 0, 17, 15
/* 8002EB24 0002A964 60 00 40 00 */ ori r0, r0, 0x4000
/* 8002EB28 0002A968 90 1F 00 C4 */ stw r0, 0xc4(r31)
2022-10-16 16:31:36 +00:00
/* 8002EB2C 0002A96C 4B FF 70 45 */ bl __OSGetSystemTime
2022-10-16 16:05:58 +00:00
/* 8002EB30 0002A970 7C 9E 23 78 */ mr r30, r4
/* 8002EB34 0002A974 7C 7D 1B 78 */ mr r29, r3
.global lbl_8002EB38
lbl_8002EB38:
2022-10-16 16:31:36 +00:00
/* 8002EB38 0002A978 4B FF 70 39 */ bl __OSGetSystemTime
2022-10-16 16:05:58 +00:00
/* 8002EB3C 0002A97C 7C FE 20 10 */ subfc r7, r30, r4
/* 8002EB40 0002A980 38 C0 01 E6 */ li r6, 0x1e6
/* 8002EB44 0002A984 7C 1D 19 10 */ subfe r0, r29, r3
/* 8002EB48 0002A988 38 A0 00 00 */ li r5, 0x0
/* 8002EB4C 0002A98C 54 03 18 38 */ slwi r3, r0, 3
/* 8002EB50 0002A990 54 E4 18 38 */ slwi r4, r7, 3
/* 8002EB54 0002A994 50 E3 1F 7E */ rlwimi r3, r7, 3, 29, 31
2022-10-16 16:31:36 +00:00
/* 8002EB58 0002A998 4B FD 89 35 */ bl __div2i
2022-10-16 16:05:58 +00:00
/* 8002EB5C 0002A99C 6C 60 80 00 */ xoris r0, r3, 0x8000
/* 8002EB60 0002A9A0 6F 25 80 00 */ xoris r5, r25, 0x8000
/* 8002EB64 0002A9A4 7C 78 20 10 */ subfc r3, r24, r4
/* 8002EB68 0002A9A8 7C A5 01 10 */ subfe r5, r5, r0
/* 8002EB6C 0002A9AC 7C A0 01 10 */ subfe r5, r0, r0
/* 8002EB70 0002A9B0 7C A5 00 D1 */ neg. r5, r5
/* 8002EB74 0002A9B4 40 82 FF C4 */ bne lbl_8002EB38
/* 8002EB78 0002A9B8 80 1F 00 C0 */ lwz r0, 0xc0(r31)
/* 8002EB7C 0002A9BC 54 00 04 A0 */ rlwinm r0, r0, 0, 18, 16
/* 8002EB80 0002A9C0 60 00 40 00 */ ori r0, r0, 0x4000
/* 8002EB84 0002A9C4 90 1F 00 C0 */ stw r0, 0xc0(r31)
2022-10-16 16:31:36 +00:00
/* 8002EB88 0002A9C8 4B FF 6F E9 */ bl __OSGetSystemTime
2022-10-16 16:05:58 +00:00
/* 8002EB8C 0002A9CC 7C 9E 23 78 */ mr r30, r4
/* 8002EB90 0002A9D0 7C 7D 1B 78 */ mr r29, r3
.global lbl_8002EB94
lbl_8002EB94:
2022-10-16 16:31:36 +00:00
/* 8002EB94 0002A9D4 4B FF 6F DD */ bl __OSGetSystemTime
2022-10-16 16:05:58 +00:00
/* 8002EB98 0002A9D8 7C FE 20 10 */ subfc r7, r30, r4
/* 8002EB9C 0002A9DC 38 C0 01 E6 */ li r6, 0x1e6
/* 8002EBA0 0002A9E0 7C 1D 19 10 */ subfe r0, r29, r3
/* 8002EBA4 0002A9E4 38 A0 00 00 */ li r5, 0x0
/* 8002EBA8 0002A9E8 54 03 18 38 */ slwi r3, r0, 3
/* 8002EBAC 0002A9EC 54 E4 18 38 */ slwi r4, r7, 3
/* 8002EBB0 0002A9F0 50 E3 1F 7E */ rlwimi r3, r7, 3, 29, 31
2022-10-16 16:31:36 +00:00
/* 8002EBB4 0002A9F4 4B FD 88 D9 */ bl __div2i
2022-10-16 16:05:58 +00:00
/* 8002EBB8 0002A9F8 6C 60 80 00 */ xoris r0, r3, 0x8000
/* 8002EBBC 0002A9FC 6F 25 80 00 */ xoris r5, r25, 0x8000
/* 8002EBC0 0002AA00 7C 78 20 10 */ subfc r3, r24, r4
/* 8002EBC4 0002AA04 7C A5 01 10 */ subfe r5, r5, r0
/* 8002EBC8 0002AA08 7C A0 01 10 */ subfe r5, r0, r0
/* 8002EBCC 0002AA0C 7C A5 00 D1 */ neg. r5, r5
/* 8002EBD0 0002AA10 40 82 FF C4 */ bne lbl_8002EB94
2022-10-16 16:31:36 +00:00
/* 8002EBD4 0002AA14 80 0D 81 28 */ lwz r0, __i2c_ident_flag@sda21(r13)
2022-10-16 16:05:58 +00:00
/* 8002EBD8 0002AA18 28 00 00 01 */ cmplwi r0, 0x1
/* 8002EBDC 0002AA1C 40 82 00 20 */ bne lbl_8002EBFC
/* 8002EBE0 0002AA20 80 1F 00 C8 */ lwz r0, 0xc8(r31)
/* 8002EBE4 0002AA24 54 00 8F FF */ extrwi. r0, r0, 1, 16
/* 8002EBE8 0002AA28 41 82 00 14 */ beq lbl_8002EBFC
/* 8002EBEC 0002AA2C 7F 83 E3 78 */ mr r3, r28
2022-10-16 16:31:36 +00:00
/* 8002EBF0 0002AA30 4B FF 2C 71 */ bl OSRestoreInterrupts
2022-10-16 16:05:58 +00:00
/* 8002EBF4 0002AA34 38 60 00 00 */ li r3, 0x0
/* 8002EBF8 0002AA38 48 00 01 94 */ b lbl_8002ED8C
.global lbl_8002EBFC
lbl_8002EBFC:
2022-10-16 16:31:36 +00:00
/* 8002EBFC 0002AA3C 80 0D 81 28 */ lwz r0, __i2c_ident_flag@sda21(r13)
2022-10-16 16:05:58 +00:00
/* 8002EC00 0002AA40 2C 00 00 00 */ cmpwi r0, 0x0
/* 8002EC04 0002AA44 40 82 00 18 */ bne lbl_8002EC1C
/* 8002EC08 0002AA48 80 1F 00 C0 */ lwz r0, 0xc0(r31)
/* 8002EC0C 0002AA4C 54 00 04 5E */ rlwinm r0, r0, 0, 17, 15
/* 8002EC10 0002AA50 60 00 80 00 */ ori r0, r0, 0x8000
/* 8002EC14 0002AA54 90 1F 00 C0 */ stw r0, 0xc0(r31)
/* 8002EC18 0002AA58 48 00 00 10 */ b lbl_8002EC28
.global lbl_8002EC1C
lbl_8002EC1C:
/* 8002EC1C 0002AA5C 80 1F 00 C0 */ lwz r0, 0xc0(r31)
/* 8002EC20 0002AA60 54 00 04 5E */ rlwinm r0, r0, 0, 17, 15
/* 8002EC24 0002AA64 90 1F 00 C0 */ stw r0, 0xc0(r31)
.global lbl_8002EC28
lbl_8002EC28:
/* 8002EC28 0002AA68 80 1F 00 C4 */ lwz r0, 0xc4(r31)
/* 8002EC2C 0002AA6C 3B 7B FF FF */ addi r27, r27, -0x1
/* 8002EC30 0002AA70 54 00 04 5E */ rlwinm r0, r0, 0, 17, 15
/* 8002EC34 0002AA74 60 00 C0 00 */ ori r0, r0, 0xc000
/* 8002EC38 0002AA78 90 1F 00 C4 */ stw r0, 0xc4(r31)
/* 8002EC3C 0002AA7C 80 1F 00 C0 */ lwz r0, 0xc0(r31)
/* 8002EC40 0002AA80 54 00 04 A0 */ rlwinm r0, r0, 0, 18, 16
/* 8002EC44 0002AA84 90 1F 00 C0 */ stw r0, 0xc0(r31)
.global lbl_8002EC48
lbl_8002EC48:
/* 8002EC48 0002AA88 2C 1B 00 00 */ cmpwi r27, 0x0
/* 8002EC4C 0002AA8C 40 82 FD 9C */ bne lbl_8002E9E8
/* 8002EC50 0002AA90 3C 60 CD 80 */ lis r3, 0xCD8000C4@ha
/* 8002EC54 0002AA94 80 03 00 C4 */ lwz r0, 0xCD8000C4@l(r3)
/* 8002EC58 0002AA98 54 00 04 5E */ rlwinm r0, r0, 0, 17, 15
/* 8002EC5C 0002AA9C 60 00 C0 00 */ ori r0, r0, 0xc000
/* 8002EC60 0002AAA0 90 03 00 C4 */ stw r0, 0xc4(r3)
2022-10-16 16:31:36 +00:00
/* 8002EC64 0002AAA4 80 0D 81 28 */ lwz r0, __i2c_ident_flag@sda21(r13)
2022-10-16 16:05:58 +00:00
/* 8002EC68 0002AAA8 2C 00 00 00 */ cmpwi r0, 0x0
/* 8002EC6C 0002AAAC 40 82 00 18 */ bne lbl_8002EC84
/* 8002EC70 0002AAB0 80 03 00 C0 */ lwz r0, 0xc0(r3)
/* 8002EC74 0002AAB4 54 00 04 5E */ rlwinm r0, r0, 0, 17, 15
/* 8002EC78 0002AAB8 60 00 80 00 */ ori r0, r0, 0x8000
/* 8002EC7C 0002AABC 90 03 00 C0 */ stw r0, 0xc0(r3)
/* 8002EC80 0002AAC0 48 00 00 10 */ b lbl_8002EC90
.global lbl_8002EC84
lbl_8002EC84:
/* 8002EC84 0002AAC4 80 03 00 C0 */ lwz r0, 0xc0(r3)
/* 8002EC88 0002AAC8 54 00 04 5E */ rlwinm r0, r0, 0, 17, 15
/* 8002EC8C 0002AACC 90 03 00 C0 */ stw r0, 0xc0(r3)
.global lbl_8002EC90
lbl_8002EC90:
2022-10-16 16:31:36 +00:00
/* 8002EC90 0002AAD0 4B FF 6E E1 */ bl __OSGetSystemTime
2022-10-16 16:05:58 +00:00
/* 8002EC94 0002AAD4 7C 9E 23 78 */ mr r30, r4
/* 8002EC98 0002AAD8 7C 7D 1B 78 */ mr r29, r3
/* 8002EC9C 0002AADC 3B 60 00 02 */ li r27, 0x2
/* 8002ECA0 0002AAE0 3B 40 00 00 */ li r26, 0x0
.global lbl_8002ECA4
lbl_8002ECA4:
2022-10-16 16:31:36 +00:00
/* 8002ECA4 0002AAE4 4B FF 6E CD */ bl __OSGetSystemTime
2022-10-16 16:05:58 +00:00
/* 8002ECA8 0002AAE8 7C FE 20 10 */ subfc r7, r30, r4
/* 8002ECAC 0002AAEC 38 C0 01 E6 */ li r6, 0x1e6
/* 8002ECB0 0002AAF0 7C 1D 19 10 */ subfe r0, r29, r3
/* 8002ECB4 0002AAF4 38 A0 00 00 */ li r5, 0x0
/* 8002ECB8 0002AAF8 54 03 18 38 */ slwi r3, r0, 3
/* 8002ECBC 0002AAFC 54 E4 18 38 */ slwi r4, r7, 3
/* 8002ECC0 0002AB00 50 E3 1F 7E */ rlwimi r3, r7, 3, 29, 31
2022-10-16 16:31:36 +00:00
/* 8002ECC4 0002AB04 4B FD 87 C9 */ bl __div2i
2022-10-16 16:05:58 +00:00
/* 8002ECC8 0002AB08 6C 60 80 00 */ xoris r0, r3, 0x8000
/* 8002ECCC 0002AB0C 6F 45 80 00 */ xoris r5, r26, 0x8000
/* 8002ECD0 0002AB10 7C 7B 20 10 */ subfc r3, r27, r4
/* 8002ECD4 0002AB14 7C A5 01 10 */ subfe r5, r5, r0
/* 8002ECD8 0002AB18 7C A0 01 10 */ subfe r5, r0, r0
/* 8002ECDC 0002AB1C 7C A5 00 D1 */ neg. r5, r5
/* 8002ECE0 0002AB20 40 82 FF C4 */ bne lbl_8002ECA4
/* 8002ECE4 0002AB24 3C 60 CD 80 */ lis r3, 0xCD8000C0@ha
/* 8002ECE8 0002AB28 80 03 00 C0 */ lwz r0, 0xCD8000C0@l(r3)
/* 8002ECEC 0002AB2C 54 00 04 A0 */ rlwinm r0, r0, 0, 18, 16
/* 8002ECF0 0002AB30 60 00 40 00 */ ori r0, r0, 0x4000
/* 8002ECF4 0002AB34 90 03 00 C0 */ stw r0, 0xc0(r3)
2022-10-16 16:31:36 +00:00
/* 8002ECF8 0002AB38 4B FF 6E 79 */ bl __OSGetSystemTime
2022-10-16 16:05:58 +00:00
/* 8002ECFC 0002AB3C 7C 9E 23 78 */ mr r30, r4
/* 8002ED00 0002AB40 7C 7D 1B 78 */ mr r29, r3
/* 8002ED04 0002AB44 3B 60 00 02 */ li r27, 0x2
/* 8002ED08 0002AB48 3B 40 00 00 */ li r26, 0x0
.global lbl_8002ED0C
lbl_8002ED0C:
2022-10-16 16:31:36 +00:00
/* 8002ED0C 0002AB4C 4B FF 6E 65 */ bl __OSGetSystemTime
2022-10-16 16:05:58 +00:00
/* 8002ED10 0002AB50 7C FE 20 10 */ subfc r7, r30, r4
/* 8002ED14 0002AB54 38 C0 01 E6 */ li r6, 0x1e6
/* 8002ED18 0002AB58 7C 1D 19 10 */ subfe r0, r29, r3
/* 8002ED1C 0002AB5C 38 A0 00 00 */ li r5, 0x0
/* 8002ED20 0002AB60 54 03 18 38 */ slwi r3, r0, 3
/* 8002ED24 0002AB64 54 E4 18 38 */ slwi r4, r7, 3
/* 8002ED28 0002AB68 50 E3 1F 7E */ rlwimi r3, r7, 3, 29, 31
2022-10-16 16:31:36 +00:00
/* 8002ED2C 0002AB6C 4B FD 87 61 */ bl __div2i
2022-10-16 16:05:58 +00:00
/* 8002ED30 0002AB70 6C 60 80 00 */ xoris r0, r3, 0x8000
/* 8002ED34 0002AB74 6F 45 80 00 */ xoris r5, r26, 0x8000
/* 8002ED38 0002AB78 7C 7B 20 10 */ subfc r3, r27, r4
/* 8002ED3C 0002AB7C 7C A5 01 10 */ subfe r5, r5, r0
/* 8002ED40 0002AB80 7C A0 01 10 */ subfe r5, r0, r0
/* 8002ED44 0002AB84 7C A5 00 D1 */ neg. r5, r5
/* 8002ED48 0002AB88 40 82 FF C4 */ bne lbl_8002ED0C
2022-10-16 16:31:36 +00:00
/* 8002ED4C 0002AB8C 80 0D 81 28 */ lwz r0, __i2c_ident_flag@sda21(r13)
2022-10-16 16:05:58 +00:00
/* 8002ED50 0002AB90 2C 00 00 00 */ cmpwi r0, 0x0
/* 8002ED54 0002AB94 40 82 00 18 */ bne lbl_8002ED6C
/* 8002ED58 0002AB98 3C 60 CD 80 */ lis r3, 0xCD8000C0@ha
/* 8002ED5C 0002AB9C 80 03 00 C0 */ lwz r0, 0xCD8000C0@l(r3)
/* 8002ED60 0002ABA0 54 00 04 5E */ rlwinm r0, r0, 0, 17, 15
/* 8002ED64 0002ABA4 90 03 00 C0 */ stw r0, 0xc0(r3)
/* 8002ED68 0002ABA8 48 00 00 18 */ b lbl_8002ED80
.global lbl_8002ED6C
lbl_8002ED6C:
/* 8002ED6C 0002ABAC 3C 60 CD 80 */ lis r3, 0xCD8000C0@ha
/* 8002ED70 0002ABB0 80 03 00 C0 */ lwz r0, 0xCD8000C0@l(r3)
/* 8002ED74 0002ABB4 54 00 04 5E */ rlwinm r0, r0, 0, 17, 15
/* 8002ED78 0002ABB8 60 00 80 00 */ ori r0, r0, 0x8000
/* 8002ED7C 0002ABBC 90 03 00 C0 */ stw r0, 0xc0(r3)
.global lbl_8002ED80
lbl_8002ED80:
/* 8002ED80 0002ABC0 7F 83 E3 78 */ mr r3, r28
2022-10-16 16:31:36 +00:00
/* 8002ED84 0002ABC4 4B FF 2A DD */ bl OSRestoreInterrupts
2022-10-16 16:05:58 +00:00
/* 8002ED88 0002ABC8 38 60 00 01 */ li r3, 0x1
.global lbl_8002ED8C
lbl_8002ED8C:
/* 8002ED8C 0002ABCC 39 61 00 30 */ addi r11, r1, 0x30
/* 8002ED90 0002ABD0 4B FD 85 E5 */ bl lbl_80007374
/* 8002ED94 0002ABD4 80 01 00 34 */ lwz r0, 0x34(r1)
/* 8002ED98 0002ABD8 7C 08 03 A6 */ mtlr r0
/* 8002ED9C 0002ABDC 38 21 00 30 */ addi r1, r1, 0x30
/* 8002EDA0 0002ABE0 4E 80 00 20 */ blr
/* 8002EDA4 0002ABE4 00 00 00 00 */ .4byte 0x00000000
/* 8002EDA8 0002ABE8 00 00 00 00 */ .4byte 0x00000000
/* 8002EDAC 0002ABEC 00 00 00 00 */ .4byte 0x00000000
2022-10-17 08:07:59 +00:00
.include "macros.inc"
.section .sdata, "wa" # 0x80556420 - 0x8055C6E0 ; 0x000062C0
.global __i2c_ident_flag
__i2c_ident_flag:
.4byte 0x00000001
.4byte 0
.include "macros.inc"
.section .sbss, "", @nobits # 0x8055C6E0 - 0x8055DF80 ; 0x000018A0
.global __i2c_ident_first
__i2c_ident_first:
.skip 0x8