donut-decomp/asm/bte/sdp_discovery.s
2022-10-17 09:41:13 +01:00

1548 lines
67 KiB
ArmAsm

.include "macros.inc"
.section .text, "ax" # 0x80006A00 - 0x80406260 ; 0x003FF860
.global sdpu_build_uuid_seq
sdpu_build_uuid_seq:
/* 8009E2C4 0009A104 38 00 00 35 */ li r0, 0x35
/* 8009E2C8 0009A108 39 63 00 01 */ addi r11, r3, 0x1
/* 8009E2CC 0009A10C 7D 6A 5B 78 */ mr r10, r11
/* 8009E2D0 0009A110 98 03 00 00 */ stb r0, 0x0(r3)
/* 8009E2D4 0009A114 39 20 00 00 */ li r9, 0x0
/* 8009E2D8 0009A118 38 C0 00 1C */ li r6, 0x1c
/* 8009E2DC 0009A11C 38 E0 00 1A */ li r7, 0x1a
/* 8009E2E0 0009A120 39 00 00 19 */ li r8, 0x19
/* 8009E2E4 0009A124 7C 89 03 A6 */ mtctr r4
/* 8009E2E8 0009A128 28 04 00 00 */ cmplwi r4, 0x0
/* 8009E2EC 0009A12C 39 6B 00 01 */ addi r11, r11, 0x1
/* 8009E2F0 0009A130 40 81 00 AC */ ble lbl_8009E39C
.global lbl_8009E2F4
lbl_8009E2F4:
/* 8009E2F4 0009A134 A0 05 00 00 */ lhz r0, 0x0(r5)
/* 8009E2F8 0009A138 28 00 00 02 */ cmplwi r0, 0x2
/* 8009E2FC 0009A13C 40 82 00 24 */ bne lbl_8009E320
/* 8009E300 0009A140 99 0B 00 00 */ stb r8, 0x0(r11)
/* 8009E304 0009A144 A0 05 00 04 */ lhz r0, 0x4(r5)
/* 8009E308 0009A148 7C 00 46 70 */ srawi r0, r0, 8
/* 8009E30C 0009A14C 98 0B 00 01 */ stb r0, 0x1(r11)
/* 8009E310 0009A150 A0 05 00 04 */ lhz r0, 0x4(r5)
/* 8009E314 0009A154 98 0B 00 02 */ stb r0, 0x2(r11)
/* 8009E318 0009A158 39 6B 00 03 */ addi r11, r11, 0x3
/* 8009E31C 0009A15C 48 00 00 74 */ b lbl_8009E390
.global lbl_8009E320
lbl_8009E320:
/* 8009E320 0009A160 28 00 00 04 */ cmplwi r0, 0x4
/* 8009E324 0009A164 40 82 00 3C */ bne lbl_8009E360
/* 8009E328 0009A168 98 EB 00 00 */ stb r7, 0x0(r11)
/* 8009E32C 0009A16C 80 05 00 04 */ lwz r0, 0x4(r5)
/* 8009E330 0009A170 54 00 46 3E */ srwi r0, r0, 24
/* 8009E334 0009A174 98 0B 00 01 */ stb r0, 0x1(r11)
/* 8009E338 0009A178 80 05 00 04 */ lwz r0, 0x4(r5)
/* 8009E33C 0009A17C 54 00 86 3E */ extrwi r0, r0, 8, 8
/* 8009E340 0009A180 98 0B 00 02 */ stb r0, 0x2(r11)
/* 8009E344 0009A184 80 05 00 04 */ lwz r0, 0x4(r5)
/* 8009E348 0009A188 54 00 C6 3E */ extrwi r0, r0, 8, 16
/* 8009E34C 0009A18C 98 0B 00 03 */ stb r0, 0x3(r11)
/* 8009E350 0009A190 80 05 00 04 */ lwz r0, 0x4(r5)
/* 8009E354 0009A194 98 0B 00 04 */ stb r0, 0x4(r11)
/* 8009E358 0009A198 39 6B 00 05 */ addi r11, r11, 0x5
/* 8009E35C 0009A19C 48 00 00 34 */ b lbl_8009E390
.global lbl_8009E360
lbl_8009E360:
/* 8009E360 0009A1A0 98 CB 00 00 */ stb r6, 0x0(r11)
/* 8009E364 0009A1A4 38 80 00 00 */ li r4, 0x0
/* 8009E368 0009A1A8 39 6B 00 01 */ addi r11, r11, 0x1
/* 8009E36C 0009A1AC 48 00 00 18 */ b lbl_8009E384
.global lbl_8009E370
lbl_8009E370:
/* 8009E370 0009A1B0 7C 65 22 14 */ add r3, r5, r4
/* 8009E374 0009A1B4 38 84 00 01 */ addi r4, r4, 0x1
/* 8009E378 0009A1B8 88 03 00 04 */ lbz r0, 0x4(r3)
/* 8009E37C 0009A1BC 98 0B 00 00 */ stb r0, 0x0(r11)
/* 8009E380 0009A1C0 39 6B 00 01 */ addi r11, r11, 0x1
.global lbl_8009E384
lbl_8009E384:
/* 8009E384 0009A1C4 A0 05 00 00 */ lhz r0, 0x0(r5)
/* 8009E388 0009A1C8 7C 04 00 00 */ cmpw r4, r0
/* 8009E38C 0009A1CC 41 80 FF E4 */ blt lbl_8009E370
.global lbl_8009E390
lbl_8009E390:
/* 8009E390 0009A1D0 39 29 00 01 */ addi r9, r9, 0x1
/* 8009E394 0009A1D4 38 A5 00 14 */ addi r5, r5, 0x14
/* 8009E398 0009A1D8 42 00 FF 5C */ bdnz lbl_8009E2F4
.global lbl_8009E39C
lbl_8009E39C:
/* 8009E39C 0009A1DC 7C 8A 58 50 */ subf r4, r10, r11
/* 8009E3A0 0009A1E0 7D 63 5B 78 */ mr r3, r11
/* 8009E3A4 0009A1E4 38 04 FF FF */ addi r0, r4, -0x1
/* 8009E3A8 0009A1E8 98 0A 00 00 */ stb r0, 0x0(r10)
/* 8009E3AC 0009A1EC 4E 80 00 20 */ blr
.global sdp_snd_service_search_req
sdp_snd_service_search_req:
/* 8009E3B0 0009A1F0 94 21 FF D0 */ stwu r1, -0x30(r1)
/* 8009E3B4 0009A1F4 7C 08 02 A6 */ mflr r0
/* 8009E3B8 0009A1F8 90 01 00 34 */ stw r0, 0x34(r1)
/* 8009E3BC 0009A1FC 39 61 00 30 */ addi r11, r1, 0x30
/* 8009E3C0 0009A200 4B F6 8F 75 */ bl lbl_80007334
/* 8009E3C4 0009A204 7C 7A 1B 78 */ mr r26, r3
/* 8009E3C8 0009A208 7C 9B 23 78 */ mr r27, r4
/* 8009E3CC 0009A20C 7C BC 2B 78 */ mr r28, r5
/* 8009E3D0 0009A210 38 60 00 02 */ li r3, 0x2
/* 8009E3D4 0009A214 4B FD 6A 4D */ bl GKI_getpoolbuf
/* 8009E3D8 0009A218 2C 03 00 00 */ cmpwi r3, 0x0
/* 8009E3DC 0009A21C 7C 7D 1B 78 */ mr r29, r3
/* 8009E3E0 0009A220 40 82 00 14 */ bne lbl_8009E3F4
/* 8009E3E4 0009A224 7F 43 D3 78 */ mr r3, r26
/* 8009E3E8 0009A228 38 80 00 06 */ li r4, 0x6
/* 8009E3EC 0009A22C 48 00 1A DD */ bl sdp_disconnect
/* 8009E3F0 0009A230 48 00 00 D8 */ b lbl_8009E4C8
.global lbl_8009E3F4
lbl_8009E3F4:
/* 8009E3F4 0009A234 38 00 00 09 */ li r0, 0x9
/* 8009E3F8 0009A238 3B C3 00 11 */ addi r30, r3, 0x11
/* 8009E3FC 0009A23C B0 03 00 04 */ sth r0, 0x4(r3)
/* 8009E400 0009A240 38 00 00 02 */ li r0, 0x2
/* 8009E404 0009A244 3B FE 00 03 */ addi r31, r30, 0x3
/* 8009E408 0009A248 98 03 00 11 */ stb r0, 0x11(r3)
/* 8009E40C 0009A24C 38 7F 00 02 */ addi r3, r31, 0x2
/* 8009E410 0009A250 A0 1A 04 70 */ lhz r0, 0x470(r26)
/* 8009E414 0009A254 7C 00 46 70 */ srawi r0, r0, 8
/* 8009E418 0009A258 98 1E 00 01 */ stb r0, 0x1(r30)
/* 8009E41C 0009A25C A0 1A 04 70 */ lhz r0, 0x470(r26)
/* 8009E420 0009A260 98 1E 00 02 */ stb r0, 0x2(r30)
/* 8009E424 0009A264 A0 9A 04 70 */ lhz r4, 0x470(r26)
/* 8009E428 0009A268 80 DA 04 10 */ lwz r6, 0x410(r26)
/* 8009E42C 0009A26C 38 04 00 01 */ addi r0, r4, 0x1
/* 8009E430 0009A270 B0 1A 04 70 */ sth r0, 0x470(r26)
/* 8009E434 0009A274 38 A6 00 10 */ addi r5, r6, 0x10
/* 8009E438 0009A278 A0 86 00 0C */ lhz r4, 0xc(r6)
/* 8009E43C 0009A27C 4B FF FE 89 */ bl sdpu_build_uuid_seq
/* 8009E440 0009A280 3C 80 80 50 */ lis r4, sdp_cb@ha
/* 8009E444 0009A284 2C 1B 00 00 */ cmpwi r27, 0x0
/* 8009E448 0009A288 38 84 9C 20 */ addi r4, r4, sdp_cb@l
/* 8009E44C 0009A28C 3B 23 00 03 */ addi r25, r3, 0x3
/* 8009E450 0009A290 A0 04 46 2E */ lhz r0, 0x462e(r4)
/* 8009E454 0009A294 7C 00 46 70 */ srawi r0, r0, 8
/* 8009E458 0009A298 98 03 00 00 */ stb r0, 0x0(r3)
/* 8009E45C 0009A29C A0 04 46 2E */ lhz r0, 0x462e(r4)
/* 8009E460 0009A2A0 98 03 00 01 */ stb r0, 0x1(r3)
/* 8009E464 0009A2A4 9B 63 00 02 */ stb r27, 0x2(r3)
/* 8009E468 0009A2A8 41 82 00 20 */ beq lbl_8009E488
/* 8009E46C 0009A2AC 2C 1C 00 00 */ cmpwi r28, 0x0
/* 8009E470 0009A2B0 41 82 00 18 */ beq lbl_8009E488
/* 8009E474 0009A2B4 7F 23 CB 78 */ mr r3, r25
/* 8009E478 0009A2B8 7F 84 E3 78 */ mr r4, r28
/* 8009E47C 0009A2BC 7F 65 DB 78 */ mr r5, r27
/* 8009E480 0009A2C0 4B F6 5B 81 */ bl memcpy
/* 8009E484 0009A2C4 7F 39 DA 14 */ add r25, r25, r27
.global lbl_8009E488
lbl_8009E488:
/* 8009E488 0009A2C8 7C 9F C8 50 */ subf r4, r31, r25
/* 8009E48C 0009A2CC 38 60 00 01 */ li r3, 0x1
/* 8009E490 0009A2D0 38 C4 FF FE */ addi r6, r4, -0x2
/* 8009E494 0009A2D4 7C 1E C8 50 */ subf r0, r30, r25
/* 8009E498 0009A2D8 54 C5 C6 3E */ extrwi r5, r6, 8, 16
/* 8009E49C 0009A2DC 7F A4 EB 78 */ mr r4, r29
/* 8009E4A0 0009A2E0 98 BF 00 00 */ stb r5, 0x0(r31)
/* 8009E4A4 0009A2E4 98 DF 00 01 */ stb r6, 0x1(r31)
/* 8009E4A8 0009A2E8 98 7A 04 74 */ stb r3, 0x474(r26)
/* 8009E4AC 0009A2EC B0 1D 00 02 */ sth r0, 0x2(r29)
/* 8009E4B0 0009A2F0 A0 7A 00 22 */ lhz r3, 0x22(r26)
/* 8009E4B4 0009A2F4 4B FF 25 ED */ bl L2CA_DataWrite
/* 8009E4B8 0009A2F8 38 7A 00 08 */ addi r3, r26, 0x8
/* 8009E4BC 0009A2FC 38 80 00 05 */ li r4, 0x5
/* 8009E4C0 0009A300 38 A0 00 1E */ li r5, 0x1e
/* 8009E4C4 0009A304 4B FD 99 ED */ bl btu_start_timer
.global lbl_8009E4C8
lbl_8009E4C8:
/* 8009E4C8 0009A308 39 61 00 30 */ addi r11, r1, 0x30
/* 8009E4CC 0009A30C 4B F6 8E B5 */ bl lbl_80007380
/* 8009E4D0 0009A310 80 01 00 34 */ lwz r0, 0x34(r1)
/* 8009E4D4 0009A314 7C 08 03 A6 */ mtlr r0
/* 8009E4D8 0009A318 38 21 00 30 */ addi r1, r1, 0x30
/* 8009E4DC 0009A31C 4E 80 00 20 */ blr
.global sdp_disc_connected
sdp_disc_connected:
/* 8009E4E0 0009A320 88 03 04 75 */ lbz r0, 0x475(r3)
/* 8009E4E4 0009A324 2C 00 00 00 */ cmpwi r0, 0x0
/* 8009E4E8 0009A328 41 82 00 18 */ beq lbl_8009E500
/* 8009E4EC 0009A32C 38 00 00 03 */ li r0, 0x3
/* 8009E4F0 0009A330 38 80 00 00 */ li r4, 0x0
/* 8009E4F4 0009A334 98 03 04 74 */ stb r0, 0x474(r3)
/* 8009E4F8 0009A338 38 A0 00 00 */ li r5, 0x0
/* 8009E4FC 0009A33C 48 00 05 48 */ b process_service_search_attr_rsp
.global lbl_8009E500
lbl_8009E500:
/* 8009E500 0009A340 38 00 00 00 */ li r0, 0x0
/* 8009E504 0009A344 38 80 00 00 */ li r4, 0x0
/* 8009E508 0009A348 B0 03 04 6C */ sth r0, 0x46c(r3)
/* 8009E50C 0009A34C 38 A0 00 00 */ li r5, 0x0
/* 8009E510 0009A350 4B FF FE A0 */ b sdp_snd_service_search_req
.global sdp_disc_server_rsp
sdp_disc_server_rsp:
/* 8009E514 0009A354 94 21 FF E0 */ stwu r1, -0x20(r1)
/* 8009E518 0009A358 7C 08 02 A6 */ mflr r0
/* 8009E51C 0009A35C 90 01 00 24 */ stw r0, 0x24(r1)
/* 8009E520 0009A360 93 E1 00 1C */ stw r31, 0x1c(r1)
/* 8009E524 0009A364 93 C1 00 18 */ stw r30, 0x18(r1)
/* 8009E528 0009A368 3B C0 00 01 */ li r30, 0x1
/* 8009E52C 0009A36C 93 A1 00 14 */ stw r29, 0x14(r1)
/* 8009E530 0009A370 7C 9D 23 78 */ mr r29, r4
/* 8009E534 0009A374 93 81 00 10 */ stw r28, 0x10(r1)
/* 8009E538 0009A378 7C 7C 1B 78 */ mr r28, r3
/* 8009E53C 0009A37C 38 63 00 08 */ addi r3, r3, 0x8
/* 8009E540 0009A380 4B FD 99 E1 */ bl btu_stop_timer
/* 8009E544 0009A384 A0 1D 00 04 */ lhz r0, 0x4(r29)
/* 8009E548 0009A388 A0 7D 00 02 */ lhz r3, 0x2(r29)
/* 8009E54C 0009A38C 7C 9D 02 14 */ add r4, r29, r0
/* 8009E550 0009A390 8B E4 00 08 */ lbz r31, 0x8(r4)
/* 8009E554 0009A394 38 A3 FF FF */ addi r5, r3, -0x1
/* 8009E558 0009A398 2C 1F 00 05 */ cmpwi r31, 0x5
/* 8009E55C 0009A39C B0 BD 00 02 */ sth r5, 0x2(r29)
/* 8009E560 0009A3A0 41 82 00 44 */ beq lbl_8009E5A4
/* 8009E564 0009A3A4 40 80 00 10 */ bge lbl_8009E574
/* 8009E568 0009A3A8 2C 1F 00 03 */ cmpwi r31, 0x3
/* 8009E56C 0009A3AC 41 82 00 14 */ beq lbl_8009E580
/* 8009E570 0009A3B0 48 00 00 78 */ b lbl_8009E5E8
.global lbl_8009E574
lbl_8009E574:
/* 8009E574 0009A3B4 2C 1F 00 07 */ cmpwi r31, 0x7
/* 8009E578 0009A3B8 41 82 00 50 */ beq lbl_8009E5C8
/* 8009E57C 0009A3BC 48 00 00 6C */ b lbl_8009E5E8
.global lbl_8009E580
lbl_8009E580:
/* 8009E580 0009A3C0 88 1C 04 74 */ lbz r0, 0x474(r28)
/* 8009E584 0009A3C4 28 00 00 01 */ cmplwi r0, 0x1
/* 8009E588 0009A3C8 40 82 00 60 */ bne lbl_8009E5E8
/* 8009E58C 0009A3CC 7F 83 E3 78 */ mr r3, r28
/* 8009E590 0009A3D0 38 84 00 09 */ addi r4, r4, 0x9
/* 8009E594 0009A3D4 54 A5 04 3E */ clrlwi r5, r5, 16
/* 8009E598 0009A3D8 48 00 00 BD */ bl process_service_search_rsp
/* 8009E59C 0009A3DC 3B C0 00 00 */ li r30, 0x0
/* 8009E5A0 0009A3E0 48 00 00 48 */ b lbl_8009E5E8
.global lbl_8009E5A4
lbl_8009E5A4:
/* 8009E5A4 0009A3E4 88 1C 04 74 */ lbz r0, 0x474(r28)
/* 8009E5A8 0009A3E8 28 00 00 02 */ cmplwi r0, 0x2
/* 8009E5AC 0009A3EC 40 82 00 3C */ bne lbl_8009E5E8
/* 8009E5B0 0009A3F0 7F 83 E3 78 */ mr r3, r28
/* 8009E5B4 0009A3F4 38 84 00 09 */ addi r4, r4, 0x9
/* 8009E5B8 0009A3F8 54 A5 04 3E */ clrlwi r5, r5, 16
/* 8009E5BC 0009A3FC 48 00 01 E1 */ bl process_service_attr_rsp
/* 8009E5C0 0009A400 3B C0 00 00 */ li r30, 0x0
/* 8009E5C4 0009A404 48 00 00 24 */ b lbl_8009E5E8
.global lbl_8009E5C8
lbl_8009E5C8:
/* 8009E5C8 0009A408 88 1C 04 74 */ lbz r0, 0x474(r28)
/* 8009E5CC 0009A40C 28 00 00 03 */ cmplwi r0, 0x3
/* 8009E5D0 0009A410 40 82 00 18 */ bne lbl_8009E5E8
/* 8009E5D4 0009A414 7F 83 E3 78 */ mr r3, r28
/* 8009E5D8 0009A418 38 84 00 09 */ addi r4, r4, 0x9
/* 8009E5DC 0009A41C 54 A5 04 3E */ clrlwi r5, r5, 16
/* 8009E5E0 0009A420 48 00 04 65 */ bl process_service_search_attr_rsp
/* 8009E5E4 0009A424 3B C0 00 00 */ li r30, 0x0
.global lbl_8009E5E8
lbl_8009E5E8:
/* 8009E5E8 0009A428 2C 1E 00 00 */ cmpwi r30, 0x0
/* 8009E5EC 0009A42C 41 82 00 48 */ beq lbl_8009E634
/* 8009E5F0 0009A430 3C 60 80 50 */ lis r3, sdp_cb@ha
/* 8009E5F4 0009A434 38 63 9C 20 */ addi r3, r3, sdp_cb@l
/* 8009E5F8 0009A438 88 03 46 30 */ lbz r0, 0x4630(r3)
/* 8009E5FC 0009A43C 28 00 00 02 */ cmplwi r0, 0x2
/* 8009E600 0009A440 41 80 00 20 */ blt lbl_8009E620
/* 8009E604 0009A444 3C 60 00 0A */ lis r3, 0xa
/* 8009E608 0009A448 3C 80 80 44 */ lis r4, "@1493"@ha
/* 8009E60C 0009A44C 88 DC 04 74 */ lbz r6, 0x474(r28)
/* 8009E610 0009A450 7F E5 FB 78 */ mr r5, r31
/* 8009E614 0009A454 38 63 00 01 */ addi r3, r3, 0x1
/* 8009E618 0009A458 38 84 FA 38 */ addi r4, r4, "@1493"@l
/* 8009E61C 0009A45C 4B FD 93 45 */ bl LogMsg_0
.global lbl_8009E620
lbl_8009E620:
/* 8009E620 0009A460 3C 80 00 01 */ lis r4, 0x1
/* 8009E624 0009A464 7F 83 E3 78 */ mr r3, r28
/* 8009E628 0009A468 38 04 FF F3 */ addi r0, r4, -0xd
/* 8009E62C 0009A46C 54 04 04 3E */ clrlwi r4, r0, 16
/* 8009E630 0009A470 48 00 18 99 */ bl sdp_disconnect
.global lbl_8009E634
lbl_8009E634:
/* 8009E634 0009A474 80 01 00 24 */ lwz r0, 0x24(r1)
/* 8009E638 0009A478 83 E1 00 1C */ lwz r31, 0x1c(r1)
/* 8009E63C 0009A47C 83 C1 00 18 */ lwz r30, 0x18(r1)
/* 8009E640 0009A480 83 A1 00 14 */ lwz r29, 0x14(r1)
/* 8009E644 0009A484 83 81 00 10 */ lwz r28, 0x10(r1)
/* 8009E648 0009A488 7C 08 03 A6 */ mtlr r0
/* 8009E64C 0009A48C 38 21 00 20 */ addi r1, r1, 0x20
/* 8009E650 0009A490 4E 80 00 20 */ blr
.global process_service_search_rsp
process_service_search_rsp:
/* 8009E654 0009A494 94 21 FF F0 */ stwu r1, -0x10(r1)
/* 8009E658 0009A498 7C 08 02 A6 */ mflr r0
/* 8009E65C 0009A49C 38 A4 00 08 */ addi r5, r4, 0x8
/* 8009E660 0009A4A0 90 01 00 14 */ stw r0, 0x14(r1)
/* 8009E664 0009A4A4 93 E1 00 0C */ stw r31, 0xc(r1)
/* 8009E668 0009A4A8 7C 7F 1B 78 */ mr r31, r3
/* 8009E66C 0009A4AC 88 C4 00 06 */ lbz r6, 0x6(r4)
/* 8009E670 0009A4B0 88 04 00 07 */ lbz r0, 0x7(r4)
/* 8009E674 0009A4B4 54 C4 40 2E */ slwi r4, r6, 8
/* 8009E678 0009A4B8 A1 23 04 6C */ lhz r9, 0x46c(r3)
/* 8009E67C 0009A4BC 7C 04 02 14 */ add r0, r4, r0
/* 8009E680 0009A4C0 54 00 04 3E */ clrlwi r0, r0, 16
/* 8009E684 0009A4C4 7C 09 02 14 */ add r0, r9, r0
/* 8009E688 0009A4C8 54 06 04 3F */ clrlwi. r6, r0, 16
/* 8009E68C 0009A4CC B0 03 04 6C */ sth r0, 0x46c(r3)
/* 8009E690 0009A4D0 40 82 00 44 */ bne lbl_8009E6D4
/* 8009E694 0009A4D4 3C 60 80 50 */ lis r3, sdp_cb@ha
/* 8009E698 0009A4D8 38 63 9C 20 */ addi r3, r3, sdp_cb@l
/* 8009E69C 0009A4DC 88 03 46 30 */ lbz r0, 0x4630(r3)
/* 8009E6A0 0009A4E0 28 00 00 02 */ cmplwi r0, 0x2
/* 8009E6A4 0009A4E4 41 80 00 18 */ blt lbl_8009E6BC
/* 8009E6A8 0009A4E8 3C 60 00 0A */ lis r3, 0xa
/* 8009E6AC 0009A4EC 3C 80 80 44 */ lis r4, "@1510"@ha
/* 8009E6B0 0009A4F0 38 63 00 01 */ addi r3, r3, 0x1
/* 8009E6B4 0009A4F4 38 84 FA 60 */ addi r4, r4, "@1510"@l
/* 8009E6B8 0009A4F8 4B FD 92 A9 */ bl LogMsg_0
.global lbl_8009E6BC
lbl_8009E6BC:
/* 8009E6BC 0009A4FC 3C 80 00 01 */ lis r4, 0x1
/* 8009E6C0 0009A500 7F E3 FB 78 */ mr r3, r31
/* 8009E6C4 0009A504 38 04 FF F0 */ addi r0, r4, -0x10
/* 8009E6C8 0009A508 54 04 04 3E */ clrlwi r4, r0, 16
/* 8009E6CC 0009A50C 48 00 17 FD */ bl sdp_disconnect
/* 8009E6D0 0009A510 48 00 00 B8 */ b lbl_8009E788
.global lbl_8009E6D4
lbl_8009E6D4:
/* 8009E6D4 0009A514 3C 80 80 50 */ lis r4, sdp_cb@ha
/* 8009E6D8 0009A518 38 84 9C 20 */ addi r4, r4, sdp_cb@l
/* 8009E6DC 0009A51C A0 04 46 2E */ lhz r0, 0x462e(r4)
/* 8009E6E0 0009A520 7C 06 00 40 */ cmplw r6, r0
/* 8009E6E4 0009A524 40 81 00 48 */ ble lbl_8009E72C
/* 8009E6E8 0009A528 B0 03 04 6C */ sth r0, 0x46c(r3)
/* 8009E6EC 0009A52C 48 00 00 40 */ b lbl_8009E72C
.global lbl_8009E6F0
lbl_8009E6F0:
/* 8009E6F0 0009A530 55 20 13 BA */ rlwinm r0, r9, 2, 14, 29
/* 8009E6F4 0009A534 88 E5 00 00 */ lbz r7, 0x0(r5)
/* 8009E6F8 0009A538 88 C5 00 01 */ lbz r6, 0x1(r5)
/* 8009E6FC 0009A53C 7C 83 02 14 */ add r4, r3, r0
/* 8009E700 0009A540 88 05 00 02 */ lbz r0, 0x2(r5)
/* 8009E704 0009A544 54 E8 C0 0E */ slwi r8, r7, 24
/* 8009E708 0009A548 88 E5 00 03 */ lbz r7, 0x3(r5)
/* 8009E70C 0009A54C 54 C6 80 1E */ slwi r6, r6, 16
/* 8009E710 0009A550 54 00 40 2E */ slwi r0, r0, 8
/* 8009E714 0009A554 38 A5 00 04 */ addi r5, r5, 0x4
/* 8009E718 0009A558 7C C8 32 14 */ add r6, r8, r6
/* 8009E71C 0009A55C 39 29 00 01 */ addi r9, r9, 0x1
/* 8009E720 0009A560 7C 07 02 14 */ add r0, r7, r0
/* 8009E724 0009A564 7C 06 02 14 */ add r0, r6, r0
/* 8009E728 0009A568 90 04 04 18 */ stw r0, 0x418(r4)
.global lbl_8009E72C
lbl_8009E72C:
/* 8009E72C 0009A56C A0 03 04 6C */ lhz r0, 0x46c(r3)
/* 8009E730 0009A570 55 24 04 3E */ clrlwi r4, r9, 16
/* 8009E734 0009A574 7C 04 00 40 */ cmplw r4, r0
/* 8009E738 0009A578 41 80 FF B8 */ blt lbl_8009E6F0
/* 8009E73C 0009A57C 88 85 00 00 */ lbz r4, 0x0(r5)
/* 8009E740 0009A580 2C 04 00 00 */ cmpwi r4, 0x0
/* 8009E744 0009A584 41 82 00 2C */ beq lbl_8009E770
/* 8009E748 0009A588 28 04 00 10 */ cmplwi r4, 0x10
/* 8009E74C 0009A58C 40 81 00 14 */ ble lbl_8009E760
/* 8009E750 0009A590 7F E3 FB 78 */ mr r3, r31
/* 8009E754 0009A594 38 80 00 05 */ li r4, 0x5
/* 8009E758 0009A598 48 00 17 71 */ bl sdp_disconnect
/* 8009E75C 0009A59C 48 00 00 2C */ b lbl_8009E788
.global lbl_8009E760
lbl_8009E760:
/* 8009E760 0009A5A0 7F E3 FB 78 */ mr r3, r31
/* 8009E764 0009A5A4 38 A5 00 01 */ addi r5, r5, 0x1
/* 8009E768 0009A5A8 4B FF FC 49 */ bl sdp_snd_service_search_req
/* 8009E76C 0009A5AC 48 00 00 1C */ b lbl_8009E788
.global lbl_8009E770
lbl_8009E770:
/* 8009E770 0009A5B0 38 00 00 02 */ li r0, 0x2
/* 8009E774 0009A5B4 38 80 00 00 */ li r4, 0x0
/* 8009E778 0009A5B8 98 03 04 74 */ stb r0, 0x474(r3)
/* 8009E77C 0009A5BC 7F E3 FB 78 */ mr r3, r31
/* 8009E780 0009A5C0 38 A0 00 00 */ li r5, 0x0
/* 8009E784 0009A5C4 48 00 00 19 */ bl process_service_attr_rsp
.global lbl_8009E788
lbl_8009E788:
/* 8009E788 0009A5C8 80 01 00 14 */ lwz r0, 0x14(r1)
/* 8009E78C 0009A5CC 83 E1 00 0C */ lwz r31, 0xc(r1)
/* 8009E790 0009A5D0 7C 08 03 A6 */ mtlr r0
/* 8009E794 0009A5D4 38 21 00 10 */ addi r1, r1, 0x10
/* 8009E798 0009A5D8 4E 80 00 20 */ blr
.global process_service_attr_rsp
process_service_attr_rsp:
/* 8009E79C 0009A5DC 94 21 FF D0 */ stwu r1, -0x30(r1)
/* 8009E7A0 0009A5E0 7C 08 02 A6 */ mflr r0
/* 8009E7A4 0009A5E4 90 01 00 34 */ stw r0, 0x34(r1)
/* 8009E7A8 0009A5E8 39 61 00 30 */ addi r11, r1, 0x30
/* 8009E7AC 0009A5EC 4B F6 8B 89 */ bl lbl_80007334
/* 8009E7B0 0009A5F0 2C 04 00 00 */ cmpwi r4, 0x0
/* 8009E7B4 0009A5F4 7C 7A 1B 78 */ mr r26, r3
/* 8009E7B8 0009A5F8 7C 9B 23 78 */ mr r27, r4
/* 8009E7BC 0009A5FC 3B A0 00 00 */ li r29, 0x0
/* 8009E7C0 0009A600 41 82 00 D0 */ beq lbl_8009E890
/* 8009E7C4 0009A604 88 A4 00 04 */ lbz r5, 0x4(r4)
/* 8009E7C8 0009A608 3B 64 00 06 */ addi r27, r4, 0x6
/* 8009E7CC 0009A60C 88 04 00 05 */ lbz r0, 0x5(r4)
/* 8009E7D0 0009A610 54 A4 40 2E */ slwi r4, r5, 8
/* 8009E7D4 0009A614 A0 A3 00 24 */ lhz r5, 0x24(r3)
/* 8009E7D8 0009A618 7C 04 02 14 */ add r0, r4, r0
/* 8009E7DC 0009A61C 54 19 04 3E */ clrlwi r25, r0, 16
/* 8009E7E0 0009A620 7C 05 CA 14 */ add r0, r5, r25
/* 8009E7E4 0009A624 2C 00 03 E8 */ cmpwi r0, 0x3e8
/* 8009E7E8 0009A628 40 81 00 10 */ ble lbl_8009E7F8
/* 8009E7EC 0009A62C 38 80 00 04 */ li r4, 0x4
/* 8009E7F0 0009A630 48 00 16 D9 */ bl sdp_disconnect
/* 8009E7F4 0009A634 48 00 02 38 */ b lbl_8009EA2C
.global lbl_8009E7F8
lbl_8009E7F8:
/* 8009E7F8 0009A638 7C 63 2A 14 */ add r3, r3, r5
/* 8009E7FC 0009A63C 7F 64 DB 78 */ mr r4, r27
/* 8009E800 0009A640 7F 25 CB 78 */ mr r5, r25
/* 8009E804 0009A644 38 63 00 26 */ addi r3, r3, 0x26
/* 8009E808 0009A648 4B F6 57 F9 */ bl memcpy
/* 8009E80C 0009A64C A0 1A 00 24 */ lhz r0, 0x24(r26)
/* 8009E810 0009A650 7C 00 CA 14 */ add r0, r0, r25
/* 8009E814 0009A654 B0 1A 00 24 */ sth r0, 0x24(r26)
/* 8009E818 0009A658 7C 7B C8 EE */ lbzux r3, r27, r25
/* 8009E81C 0009A65C 2C 03 00 00 */ cmpwi r3, 0x0
/* 8009E820 0009A660 41 82 00 24 */ beq lbl_8009E844
/* 8009E824 0009A664 28 03 00 10 */ cmplwi r3, 0x10
/* 8009E828 0009A668 40 81 00 14 */ ble lbl_8009E83C
/* 8009E82C 0009A66C 7F 43 D3 78 */ mr r3, r26
/* 8009E830 0009A670 38 80 00 05 */ li r4, 0x5
/* 8009E834 0009A674 48 00 16 95 */ bl sdp_disconnect
/* 8009E838 0009A678 48 00 01 F4 */ b lbl_8009EA2C
.global lbl_8009E83C
lbl_8009E83C:
/* 8009E83C 0009A67C 3B A0 00 01 */ li r29, 0x1
/* 8009E840 0009A680 48 00 00 50 */ b lbl_8009E890
.global lbl_8009E844
lbl_8009E844:
/* 8009E844 0009A684 54 00 04 3E */ clrlwi r0, r0, 16
/* 8009E848 0009A688 7F 43 D3 78 */ mr r3, r26
/* 8009E84C 0009A68C 7C BA 02 14 */ add r5, r26, r0
/* 8009E850 0009A690 38 9A 00 26 */ addi r4, r26, 0x26
/* 8009E854 0009A694 38 A5 00 26 */ addi r5, r5, 0x26
/* 8009E858 0009A698 48 00 04 C1 */ bl save_attr_seq
/* 8009E85C 0009A69C 2C 03 00 00 */ cmpwi r3, 0x0
/* 8009E860 0009A6A0 40 82 00 1C */ bne lbl_8009E87C
/* 8009E864 0009A6A4 3C 80 00 01 */ lis r4, 0x1
/* 8009E868 0009A6A8 7F 43 D3 78 */ mr r3, r26
/* 8009E86C 0009A6AC 38 04 FF F4 */ addi r0, r4, -0xc
/* 8009E870 0009A6B0 54 04 04 3E */ clrlwi r4, r0, 16
/* 8009E874 0009A6B4 48 00 16 55 */ bl sdp_disconnect
/* 8009E878 0009A6B8 48 00 01 B4 */ b lbl_8009EA2C
.global lbl_8009E87C
lbl_8009E87C:
/* 8009E87C 0009A6BC A0 7A 04 6E */ lhz r3, 0x46e(r26)
/* 8009E880 0009A6C0 38 00 00 00 */ li r0, 0x0
/* 8009E884 0009A6C4 B0 1A 00 24 */ sth r0, 0x24(r26)
/* 8009E888 0009A6C8 38 03 00 01 */ addi r0, r3, 0x1
/* 8009E88C 0009A6CC B0 1A 04 6E */ sth r0, 0x46e(r26)
.global lbl_8009E890
lbl_8009E890:
/* 8009E890 0009A6D0 A0 7A 04 6E */ lhz r3, 0x46e(r26)
/* 8009E894 0009A6D4 A0 1A 04 6C */ lhz r0, 0x46c(r26)
/* 8009E898 0009A6D8 7C 03 00 40 */ cmplw r3, r0
/* 8009E89C 0009A6DC 40 80 01 84 */ bge lbl_8009EA20
/* 8009E8A0 0009A6E0 38 60 00 02 */ li r3, 0x2
/* 8009E8A4 0009A6E4 4B FD 65 7D */ bl GKI_getpoolbuf
/* 8009E8A8 0009A6E8 2C 03 00 00 */ cmpwi r3, 0x0
/* 8009E8AC 0009A6EC 7C 7C 1B 78 */ mr r28, r3
/* 8009E8B0 0009A6F0 40 82 00 14 */ bne lbl_8009E8C4
/* 8009E8B4 0009A6F4 7F 43 D3 78 */ mr r3, r26
/* 8009E8B8 0009A6F8 38 80 00 06 */ li r4, 0x6
/* 8009E8BC 0009A6FC 48 00 16 0D */ bl sdp_disconnect
/* 8009E8C0 0009A700 48 00 01 6C */ b lbl_8009EA2C
.global lbl_8009E8C4
lbl_8009E8C4:
/* 8009E8C4 0009A704 38 00 00 09 */ li r0, 0x9
/* 8009E8C8 0009A708 3C 80 80 50 */ lis r4, sdp_cb@ha
/* 8009E8CC 0009A70C B0 03 00 04 */ sth r0, 0x4(r3)
/* 8009E8D0 0009A710 3B E3 00 11 */ addi r31, r3, 0x11
/* 8009E8D4 0009A714 38 00 00 04 */ li r0, 0x4
/* 8009E8D8 0009A718 38 84 9C 20 */ addi r4, r4, sdp_cb@l
/* 8009E8DC 0009A71C 98 1F 00 00 */ stb r0, 0x0(r31)
/* 8009E8E0 0009A720 38 7F 00 03 */ addi r3, r31, 0x3
/* 8009E8E4 0009A724 7C 7E 1B 78 */ mr r30, r3
/* 8009E8E8 0009A728 A0 1A 04 70 */ lhz r0, 0x470(r26)
/* 8009E8EC 0009A72C 38 63 00 08 */ addi r3, r3, 0x8
/* 8009E8F0 0009A730 7C 00 46 70 */ srawi r0, r0, 8
/* 8009E8F4 0009A734 98 1F 00 01 */ stb r0, 0x1(r31)
/* 8009E8F8 0009A738 A0 1A 04 70 */ lhz r0, 0x470(r26)
/* 8009E8FC 0009A73C 98 1F 00 02 */ stb r0, 0x2(r31)
/* 8009E900 0009A740 A0 BA 04 70 */ lhz r5, 0x470(r26)
/* 8009E904 0009A744 A0 1A 04 6E */ lhz r0, 0x46e(r26)
/* 8009E908 0009A748 38 A5 00 01 */ addi r5, r5, 0x1
/* 8009E90C 0009A74C 54 00 10 3A */ slwi r0, r0, 2
/* 8009E910 0009A750 B0 BA 04 70 */ sth r5, 0x470(r26)
/* 8009E914 0009A754 7C BA 02 14 */ add r5, r26, r0
/* 8009E918 0009A758 80 05 04 18 */ lwz r0, 0x418(r5)
/* 8009E91C 0009A75C 54 00 46 3E */ srwi r0, r0, 24
/* 8009E920 0009A760 98 1F 00 05 */ stb r0, 0x5(r31)
/* 8009E924 0009A764 A0 1A 04 6E */ lhz r0, 0x46e(r26)
/* 8009E928 0009A768 54 00 10 3A */ slwi r0, r0, 2
/* 8009E92C 0009A76C 7C BA 02 14 */ add r5, r26, r0
/* 8009E930 0009A770 80 05 04 18 */ lwz r0, 0x418(r5)
/* 8009E934 0009A774 54 00 86 3E */ extrwi r0, r0, 8, 8
/* 8009E938 0009A778 98 1F 00 06 */ stb r0, 0x6(r31)
/* 8009E93C 0009A77C A0 1A 04 6E */ lhz r0, 0x46e(r26)
/* 8009E940 0009A780 54 00 10 3A */ slwi r0, r0, 2
/* 8009E944 0009A784 7C BA 02 14 */ add r5, r26, r0
/* 8009E948 0009A788 80 05 04 18 */ lwz r0, 0x418(r5)
/* 8009E94C 0009A78C 54 00 C6 3E */ extrwi r0, r0, 8, 16
/* 8009E950 0009A790 98 1F 00 07 */ stb r0, 0x7(r31)
/* 8009E954 0009A794 A0 1A 04 6E */ lhz r0, 0x46e(r26)
/* 8009E958 0009A798 54 00 10 3A */ slwi r0, r0, 2
/* 8009E95C 0009A79C 7C BA 02 14 */ add r5, r26, r0
/* 8009E960 0009A7A0 80 05 04 18 */ lwz r0, 0x418(r5)
/* 8009E964 0009A7A4 98 1F 00 08 */ stb r0, 0x8(r31)
/* 8009E968 0009A7A8 A0 04 46 2C */ lhz r0, 0x462c(r4)
/* 8009E96C 0009A7AC 7C 00 46 70 */ srawi r0, r0, 8
/* 8009E970 0009A7B0 98 1F 00 09 */ stb r0, 0x9(r31)
/* 8009E974 0009A7B4 A0 04 46 2C */ lhz r0, 0x462c(r4)
/* 8009E978 0009A7B8 98 1F 00 0A */ stb r0, 0xa(r31)
/* 8009E97C 0009A7BC 80 9A 04 10 */ lwz r4, 0x410(r26)
/* 8009E980 0009A7C0 A0 A4 00 4C */ lhz r5, 0x4c(r4)
/* 8009E984 0009A7C4 2C 05 00 00 */ cmpwi r5, 0x0
/* 8009E988 0009A7C8 41 82 00 14 */ beq lbl_8009E99C
/* 8009E98C 0009A7CC 38 84 00 4E */ addi r4, r4, 0x4e
/* 8009E990 0009A7D0 48 00 25 65 */ bl sdpu_build_attrib_seq
/* 8009E994 0009A7D4 7C 79 1B 78 */ mr r25, r3
/* 8009E998 0009A7D8 48 00 00 14 */ b lbl_8009E9AC
.global lbl_8009E99C
lbl_8009E99C:
/* 8009E99C 0009A7DC 38 80 00 00 */ li r4, 0x0
/* 8009E9A0 0009A7E0 38 A0 00 00 */ li r5, 0x0
/* 8009E9A4 0009A7E4 48 00 25 51 */ bl sdpu_build_attrib_seq
/* 8009E9A8 0009A7E8 7C 79 1B 78 */ mr r25, r3
.global lbl_8009E9AC
lbl_8009E9AC:
/* 8009E9AC 0009A7EC 2C 1D 00 00 */ cmpwi r29, 0x0
/* 8009E9B0 0009A7F0 41 82 00 28 */ beq lbl_8009E9D8
/* 8009E9B4 0009A7F4 88 BB 00 00 */ lbz r5, 0x0(r27)
/* 8009E9B8 0009A7F8 7F 23 CB 78 */ mr r3, r25
/* 8009E9BC 0009A7FC 7F 64 DB 78 */ mr r4, r27
/* 8009E9C0 0009A800 38 A5 00 01 */ addi r5, r5, 0x1
/* 8009E9C4 0009A804 4B F6 56 3D */ bl memcpy
/* 8009E9C8 0009A808 88 1B 00 00 */ lbz r0, 0x0(r27)
/* 8009E9CC 0009A80C 7C 60 CA 14 */ add r3, r0, r25
/* 8009E9D0 0009A810 38 83 00 01 */ addi r4, r3, 0x1
/* 8009E9D4 0009A814 48 00 00 10 */ b lbl_8009E9E4
.global lbl_8009E9D8
lbl_8009E9D8:
/* 8009E9D8 0009A818 38 00 00 00 */ li r0, 0x0
/* 8009E9DC 0009A81C 38 99 00 01 */ addi r4, r25, 0x1
/* 8009E9E0 0009A820 98 19 00 00 */ stb r0, 0x0(r25)
.global lbl_8009E9E4
lbl_8009E9E4:
/* 8009E9E4 0009A824 7C 7E 20 50 */ subf r3, r30, r4
/* 8009E9E8 0009A828 7C 1F 20 50 */ subf r0, r31, r4
/* 8009E9EC 0009A82C 38 A3 FF FE */ addi r5, r3, -0x2
/* 8009E9F0 0009A830 7F 84 E3 78 */ mr r4, r28
/* 8009E9F4 0009A834 54 A3 C6 3E */ extrwi r3, r5, 8, 16
/* 8009E9F8 0009A838 98 7E 00 00 */ stb r3, 0x0(r30)
/* 8009E9FC 0009A83C 98 BE 00 01 */ stb r5, 0x1(r30)
/* 8009EA00 0009A840 B0 1C 00 02 */ sth r0, 0x2(r28)
/* 8009EA04 0009A844 A0 7A 00 22 */ lhz r3, 0x22(r26)
/* 8009EA08 0009A848 4B FF 20 99 */ bl L2CA_DataWrite
/* 8009EA0C 0009A84C 38 7A 00 08 */ addi r3, r26, 0x8
/* 8009EA10 0009A850 38 80 00 05 */ li r4, 0x5
/* 8009EA14 0009A854 38 A0 00 1E */ li r5, 0x1e
/* 8009EA18 0009A858 4B FD 94 99 */ bl btu_start_timer
/* 8009EA1C 0009A85C 48 00 00 10 */ b lbl_8009EA2C
.global lbl_8009EA20
lbl_8009EA20:
/* 8009EA20 0009A860 7F 43 D3 78 */ mr r3, r26
/* 8009EA24 0009A864 38 80 00 00 */ li r4, 0x0
/* 8009EA28 0009A868 48 00 14 A1 */ bl sdp_disconnect
.global lbl_8009EA2C
lbl_8009EA2C:
/* 8009EA2C 0009A86C 39 61 00 30 */ addi r11, r1, 0x30
/* 8009EA30 0009A870 4B F6 89 51 */ bl lbl_80007380
/* 8009EA34 0009A874 80 01 00 34 */ lwz r0, 0x34(r1)
/* 8009EA38 0009A878 7C 08 03 A6 */ mtlr r0
/* 8009EA3C 0009A87C 38 21 00 30 */ addi r1, r1, 0x30
/* 8009EA40 0009A880 4E 80 00 20 */ blr
.global process_service_search_attr_rsp
process_service_search_attr_rsp:
/* 8009EA44 0009A884 94 21 FF D0 */ stwu r1, -0x30(r1)
/* 8009EA48 0009A888 7C 08 02 A6 */ mflr r0
/* 8009EA4C 0009A88C 90 01 00 34 */ stw r0, 0x34(r1)
/* 8009EA50 0009A890 39 61 00 30 */ addi r11, r1, 0x30
/* 8009EA54 0009A894 4B F6 88 E5 */ bl lbl_80007338
/* 8009EA58 0009A898 2C 04 00 00 */ cmpwi r4, 0x0
/* 8009EA5C 0009A89C 7C 7B 1B 78 */ mr r27, r3
/* 8009EA60 0009A8A0 7C 9C 23 78 */ mr r28, r4
/* 8009EA64 0009A8A4 3B A0 00 00 */ li r29, 0x0
/* 8009EA68 0009A8A8 41 82 00 80 */ beq lbl_8009EAE8
/* 8009EA6C 0009A8AC 88 A4 00 04 */ lbz r5, 0x4(r4)
/* 8009EA70 0009A8B0 3B 84 00 06 */ addi r28, r4, 0x6
/* 8009EA74 0009A8B4 88 04 00 05 */ lbz r0, 0x5(r4)
/* 8009EA78 0009A8B8 54 A4 40 2E */ slwi r4, r5, 8
/* 8009EA7C 0009A8BC A0 A3 00 24 */ lhz r5, 0x24(r3)
/* 8009EA80 0009A8C0 7C 04 02 14 */ add r0, r4, r0
/* 8009EA84 0009A8C4 54 1A 04 3E */ clrlwi r26, r0, 16
/* 8009EA88 0009A8C8 7C 05 D2 14 */ add r0, r5, r26
/* 8009EA8C 0009A8CC 2C 00 03 E8 */ cmpwi r0, 0x3e8
/* 8009EA90 0009A8D0 40 81 00 10 */ ble lbl_8009EAA0
/* 8009EA94 0009A8D4 38 80 00 04 */ li r4, 0x4
/* 8009EA98 0009A8D8 48 00 14 31 */ bl sdp_disconnect
/* 8009EA9C 0009A8DC 48 00 02 64 */ b lbl_8009ED00
.global lbl_8009EAA0
lbl_8009EAA0:
/* 8009EAA0 0009A8E0 7C 63 2A 14 */ add r3, r3, r5
/* 8009EAA4 0009A8E4 7F 84 E3 78 */ mr r4, r28
/* 8009EAA8 0009A8E8 7F 45 D3 78 */ mr r5, r26
/* 8009EAAC 0009A8EC 38 63 00 26 */ addi r3, r3, 0x26
/* 8009EAB0 0009A8F0 4B F6 55 51 */ bl memcpy
/* 8009EAB4 0009A8F4 A0 1B 00 24 */ lhz r0, 0x24(r27)
/* 8009EAB8 0009A8F8 7C 00 D2 14 */ add r0, r0, r26
/* 8009EABC 0009A8FC B0 1B 00 24 */ sth r0, 0x24(r27)
/* 8009EAC0 0009A900 7C 1C D0 EE */ lbzux r0, r28, r26
/* 8009EAC4 0009A904 2C 00 00 00 */ cmpwi r0, 0x0
/* 8009EAC8 0009A908 41 82 00 20 */ beq lbl_8009EAE8
/* 8009EACC 0009A90C 28 00 00 10 */ cmplwi r0, 0x10
/* 8009EAD0 0009A910 40 81 00 14 */ ble lbl_8009EAE4
/* 8009EAD4 0009A914 7F 63 DB 78 */ mr r3, r27
/* 8009EAD8 0009A918 38 80 00 05 */ li r4, 0x5
/* 8009EADC 0009A91C 48 00 13 ED */ bl sdp_disconnect
/* 8009EAE0 0009A920 48 00 02 20 */ b lbl_8009ED00
.global lbl_8009EAE4
lbl_8009EAE4:
/* 8009EAE4 0009A924 3B A0 00 01 */ li r29, 0x1
.global lbl_8009EAE8
lbl_8009EAE8:
/* 8009EAE8 0009A928 2C 1D 00 00 */ cmpwi r29, 0x0
/* 8009EAEC 0009A92C 40 82 00 0C */ bne lbl_8009EAF8
/* 8009EAF0 0009A930 2C 1C 00 00 */ cmpwi r28, 0x0
/* 8009EAF4 0009A934 40 82 01 40 */ bne lbl_8009EC34
.global lbl_8009EAF8
lbl_8009EAF8:
/* 8009EAF8 0009A938 38 60 00 02 */ li r3, 0x2
/* 8009EAFC 0009A93C 4B FD 63 25 */ bl GKI_getpoolbuf
/* 8009EB00 0009A940 2C 03 00 00 */ cmpwi r3, 0x0
/* 8009EB04 0009A944 7C 7E 1B 78 */ mr r30, r3
/* 8009EB08 0009A948 40 82 00 14 */ bne lbl_8009EB1C
/* 8009EB0C 0009A94C 7F 63 DB 78 */ mr r3, r27
/* 8009EB10 0009A950 38 80 00 06 */ li r4, 0x6
/* 8009EB14 0009A954 48 00 13 B5 */ bl sdp_disconnect
/* 8009EB18 0009A958 48 00 01 E8 */ b lbl_8009ED00
.global lbl_8009EB1C
lbl_8009EB1C:
/* 8009EB1C 0009A95C 38 00 00 09 */ li r0, 0x9
/* 8009EB20 0009A960 3B E3 00 11 */ addi r31, r3, 0x11
/* 8009EB24 0009A964 B0 03 00 04 */ sth r0, 0x4(r3)
/* 8009EB28 0009A968 38 00 00 06 */ li r0, 0x6
/* 8009EB2C 0009A96C 3B BF 00 03 */ addi r29, r31, 0x3
/* 8009EB30 0009A970 98 03 00 11 */ stb r0, 0x11(r3)
/* 8009EB34 0009A974 38 7D 00 02 */ addi r3, r29, 0x2
/* 8009EB38 0009A978 A0 1B 04 70 */ lhz r0, 0x470(r27)
/* 8009EB3C 0009A97C 7C 00 46 70 */ srawi r0, r0, 8
/* 8009EB40 0009A980 98 1F 00 01 */ stb r0, 0x1(r31)
/* 8009EB44 0009A984 A0 1B 04 70 */ lhz r0, 0x470(r27)
/* 8009EB48 0009A988 98 1F 00 02 */ stb r0, 0x2(r31)
/* 8009EB4C 0009A98C A0 9B 04 70 */ lhz r4, 0x470(r27)
/* 8009EB50 0009A990 80 DB 04 10 */ lwz r6, 0x410(r27)
/* 8009EB54 0009A994 38 04 00 01 */ addi r0, r4, 0x1
/* 8009EB58 0009A998 B0 1B 04 70 */ sth r0, 0x470(r27)
/* 8009EB5C 0009A99C 38 A6 00 10 */ addi r5, r6, 0x10
/* 8009EB60 0009A9A0 A0 86 00 0C */ lhz r4, 0xc(r6)
/* 8009EB64 0009A9A4 4B FF F7 61 */ bl sdpu_build_uuid_seq
/* 8009EB68 0009A9A8 3C 80 80 50 */ lis r4, sdp_cb@ha
/* 8009EB6C 0009A9AC 38 C3 00 02 */ addi r6, r3, 0x2
/* 8009EB70 0009A9B0 38 84 9C 20 */ addi r4, r4, sdp_cb@l
/* 8009EB74 0009A9B4 A0 04 46 2C */ lhz r0, 0x462c(r4)
/* 8009EB78 0009A9B8 7C 00 46 70 */ srawi r0, r0, 8
/* 8009EB7C 0009A9BC 98 03 00 00 */ stb r0, 0x0(r3)
/* 8009EB80 0009A9C0 A0 04 46 2C */ lhz r0, 0x462c(r4)
/* 8009EB84 0009A9C4 98 03 00 01 */ stb r0, 0x1(r3)
/* 8009EB88 0009A9C8 80 9B 04 10 */ lwz r4, 0x410(r27)
/* 8009EB8C 0009A9CC A0 A4 00 4C */ lhz r5, 0x4c(r4)
/* 8009EB90 0009A9D0 2C 05 00 00 */ cmpwi r5, 0x0
/* 8009EB94 0009A9D4 41 82 00 18 */ beq lbl_8009EBAC
/* 8009EB98 0009A9D8 7C C3 33 78 */ mr r3, r6
/* 8009EB9C 0009A9DC 38 84 00 4E */ addi r4, r4, 0x4e
/* 8009EBA0 0009A9E0 48 00 23 55 */ bl sdpu_build_attrib_seq
/* 8009EBA4 0009A9E4 7C 7A 1B 78 */ mr r26, r3
/* 8009EBA8 0009A9E8 48 00 00 18 */ b lbl_8009EBC0
.global lbl_8009EBAC
lbl_8009EBAC:
/* 8009EBAC 0009A9EC 7C C3 33 78 */ mr r3, r6
/* 8009EBB0 0009A9F0 38 80 00 00 */ li r4, 0x0
/* 8009EBB4 0009A9F4 38 A0 00 00 */ li r5, 0x0
/* 8009EBB8 0009A9F8 48 00 23 3D */ bl sdpu_build_attrib_seq
/* 8009EBBC 0009A9FC 7C 7A 1B 78 */ mr r26, r3
.global lbl_8009EBC0
lbl_8009EBC0:
/* 8009EBC0 0009AA00 2C 1C 00 00 */ cmpwi r28, 0x0
/* 8009EBC4 0009AA04 41 82 00 28 */ beq lbl_8009EBEC
/* 8009EBC8 0009AA08 88 BC 00 00 */ lbz r5, 0x0(r28)
/* 8009EBCC 0009AA0C 7F 43 D3 78 */ mr r3, r26
/* 8009EBD0 0009AA10 7F 84 E3 78 */ mr r4, r28
/* 8009EBD4 0009AA14 38 A5 00 01 */ addi r5, r5, 0x1
/* 8009EBD8 0009AA18 4B F6 54 29 */ bl memcpy
/* 8009EBDC 0009AA1C 88 1C 00 00 */ lbz r0, 0x0(r28)
/* 8009EBE0 0009AA20 7C 60 D2 14 */ add r3, r0, r26
/* 8009EBE4 0009AA24 38 83 00 01 */ addi r4, r3, 0x1
/* 8009EBE8 0009AA28 48 00 00 10 */ b lbl_8009EBF8
.global lbl_8009EBEC
lbl_8009EBEC:
/* 8009EBEC 0009AA2C 38 00 00 00 */ li r0, 0x0
/* 8009EBF0 0009AA30 38 9A 00 01 */ addi r4, r26, 0x1
/* 8009EBF4 0009AA34 98 1A 00 00 */ stb r0, 0x0(r26)
.global lbl_8009EBF8
lbl_8009EBF8:
/* 8009EBF8 0009AA38 7C 7D 20 50 */ subf r3, r29, r4
/* 8009EBFC 0009AA3C 7C 1F 20 50 */ subf r0, r31, r4
/* 8009EC00 0009AA40 38 A3 FF FE */ addi r5, r3, -0x2
/* 8009EC04 0009AA44 7F C4 F3 78 */ mr r4, r30
/* 8009EC08 0009AA48 54 A3 C6 3E */ extrwi r3, r5, 8, 16
/* 8009EC0C 0009AA4C 98 7D 00 00 */ stb r3, 0x0(r29)
/* 8009EC10 0009AA50 98 BD 00 01 */ stb r5, 0x1(r29)
/* 8009EC14 0009AA54 B0 1E 00 02 */ sth r0, 0x2(r30)
/* 8009EC18 0009AA58 A0 7B 00 22 */ lhz r3, 0x22(r27)
/* 8009EC1C 0009AA5C 4B FF 1E 85 */ bl L2CA_DataWrite
/* 8009EC20 0009AA60 38 7B 00 08 */ addi r3, r27, 0x8
/* 8009EC24 0009AA64 38 80 00 05 */ li r4, 0x5
/* 8009EC28 0009AA68 38 A0 00 1E */ li r5, 0x1e
/* 8009EC2C 0009AA6C 4B FD 92 85 */ bl btu_start_timer
/* 8009EC30 0009AA70 48 00 00 D0 */ b lbl_8009ED00
.global lbl_8009EC34
lbl_8009EC34:
/* 8009EC34 0009AA74 88 BB 00 26 */ lbz r5, 0x26(r27)
/* 8009EC38 0009AA78 38 7B 00 27 */ addi r3, r27, 0x27
/* 8009EC3C 0009AA7C 7C A0 1E 70 */ srawi r0, r5, 3
/* 8009EC40 0009AA80 2C 00 00 06 */ cmpwi r0, 0x6
/* 8009EC44 0009AA84 41 82 00 30 */ beq lbl_8009EC74
/* 8009EC48 0009AA88 3C 60 80 50 */ lis r3, sdp_cb@ha
/* 8009EC4C 0009AA8C 38 63 9C 20 */ addi r3, r3, sdp_cb@l
/* 8009EC50 0009AA90 88 03 46 30 */ lbz r0, 0x4630(r3)
/* 8009EC54 0009AA94 28 00 00 02 */ cmplwi r0, 0x2
/* 8009EC58 0009AA98 41 80 00 A8 */ blt lbl_8009ED00
/* 8009EC5C 0009AA9C 3C 60 00 0A */ lis r3, 0xa
/* 8009EC60 0009AAA0 3C 80 80 44 */ lis r4, "@1585"@ha
/* 8009EC64 0009AAA4 38 63 00 01 */ addi r3, r3, 0x1
/* 8009EC68 0009AAA8 38 84 FA 88 */ addi r4, r4, "@1585"@l
/* 8009EC6C 0009AAAC 4B FD 8C F5 */ bl LogMsg_0
/* 8009EC70 0009AAB0 48 00 00 90 */ b lbl_8009ED00
.global lbl_8009EC74
lbl_8009EC74:
/* 8009EC74 0009AAB4 7C A4 2B 78 */ mr r4, r5
/* 8009EC78 0009AAB8 38 A1 00 08 */ addi r5, r1, 0x8
/* 8009EC7C 0009AABC 48 00 2C 79 */ bl sdpu_get_len_from_type
/* 8009EC80 0009AAC0 A0 BB 00 24 */ lhz r5, 0x24(r27)
/* 8009EC84 0009AAC4 7C 64 1B 78 */ mr r4, r3
/* 8009EC88 0009AAC8 80 01 00 08 */ lwz r0, 0x8(r1)
/* 8009EC8C 0009AACC 7C BB 2A 14 */ add r5, r27, r5
/* 8009EC90 0009AAD0 3B 45 00 26 */ addi r26, r5, 0x26
/* 8009EC94 0009AAD4 7C 03 02 14 */ add r0, r3, r0
/* 8009EC98 0009AAD8 7C 00 D0 40 */ cmplw r0, r26
/* 8009EC9C 0009AADC 41 82 00 50 */ beq lbl_8009ECEC
/* 8009ECA0 0009AAE0 7F 63 DB 78 */ mr r3, r27
/* 8009ECA4 0009AAE4 38 80 00 05 */ li r4, 0x5
/* 8009ECA8 0009AAE8 48 00 12 21 */ bl sdp_disconnect
/* 8009ECAC 0009AAEC 48 00 00 54 */ b lbl_8009ED00
/* 8009ECB0 0009AAF0 48 00 00 3C */ b lbl_8009ECEC
.global lbl_8009ECB4
lbl_8009ECB4:
/* 8009ECB4 0009AAF4 A0 1B 00 24 */ lhz r0, 0x24(r27)
/* 8009ECB8 0009AAF8 7F 63 DB 78 */ mr r3, r27
/* 8009ECBC 0009AAFC 7C BB 02 14 */ add r5, r27, r0
/* 8009ECC0 0009AB00 38 A5 00 26 */ addi r5, r5, 0x26
/* 8009ECC4 0009AB04 48 00 00 55 */ bl save_attr_seq
/* 8009ECC8 0009AB08 2C 03 00 00 */ cmpwi r3, 0x0
/* 8009ECCC 0009AB0C 7C 64 1B 78 */ mr r4, r3
/* 8009ECD0 0009AB10 40 82 00 1C */ bne lbl_8009ECEC
/* 8009ECD4 0009AB14 3C 80 00 01 */ lis r4, 0x1
/* 8009ECD8 0009AB18 7F 63 DB 78 */ mr r3, r27
/* 8009ECDC 0009AB1C 38 04 FF F4 */ addi r0, r4, -0xc
/* 8009ECE0 0009AB20 54 04 04 3E */ clrlwi r4, r0, 16
/* 8009ECE4 0009AB24 48 00 11 E5 */ bl sdp_disconnect
/* 8009ECE8 0009AB28 48 00 00 18 */ b lbl_8009ED00
.global lbl_8009ECEC
lbl_8009ECEC:
/* 8009ECEC 0009AB2C 7C 04 D0 40 */ cmplw r4, r26
/* 8009ECF0 0009AB30 41 80 FF C4 */ blt lbl_8009ECB4
/* 8009ECF4 0009AB34 7F 63 DB 78 */ mr r3, r27
/* 8009ECF8 0009AB38 38 80 00 00 */ li r4, 0x0
/* 8009ECFC 0009AB3C 48 00 11 CD */ bl sdp_disconnect
.global lbl_8009ED00
lbl_8009ED00:
/* 8009ED00 0009AB40 39 61 00 30 */ addi r11, r1, 0x30
/* 8009ED04 0009AB44 4B F6 86 81 */ bl lbl_80007384
/* 8009ED08 0009AB48 80 01 00 34 */ lwz r0, 0x34(r1)
/* 8009ED0C 0009AB4C 7C 08 03 A6 */ mtlr r0
/* 8009ED10 0009AB50 38 21 00 30 */ addi r1, r1, 0x30
/* 8009ED14 0009AB54 4E 80 00 20 */ blr
.global save_attr_seq
save_attr_seq:
/* 8009ED18 0009AB58 94 21 FF D0 */ stwu r1, -0x30(r1)
/* 8009ED1C 0009AB5C 7C 08 02 A6 */ mflr r0
/* 8009ED20 0009AB60 90 01 00 34 */ stw r0, 0x34(r1)
/* 8009ED24 0009AB64 39 61 00 30 */ addi r11, r1, 0x30
/* 8009ED28 0009AB68 4B F6 86 11 */ bl lbl_80007338
/* 8009ED2C 0009AB6C 88 C4 00 00 */ lbz r6, 0x0(r4)
/* 8009ED30 0009AB70 3F E0 80 44 */ lis r31, "@1493"@ha
/* 8009ED34 0009AB74 7C 7A 1B 78 */ mr r26, r3
/* 8009ED38 0009AB78 7C BB 2B 78 */ mr r27, r5
/* 8009ED3C 0009AB7C 7C C0 1E 70 */ srawi r0, r6, 3
/* 8009ED40 0009AB80 3B FF FA 38 */ addi r31, r31, "@1493"@l
/* 8009ED44 0009AB84 2C 00 00 06 */ cmpwi r0, 0x6
/* 8009ED48 0009AB88 38 64 00 01 */ addi r3, r4, 0x1
/* 8009ED4C 0009AB8C 41 82 00 34 */ beq lbl_8009ED80
/* 8009ED50 0009AB90 3C 60 80 50 */ lis r3, sdp_cb@ha
/* 8009ED54 0009AB94 38 63 9C 20 */ addi r3, r3, sdp_cb@l
/* 8009ED58 0009AB98 88 03 46 30 */ lbz r0, 0x4630(r3)
/* 8009ED5C 0009AB9C 28 00 00 02 */ cmplwi r0, 0x2
/* 8009ED60 0009ABA0 41 80 00 18 */ blt lbl_8009ED78
/* 8009ED64 0009ABA4 3C 60 00 0A */ lis r3, 0xa
/* 8009ED68 0009ABA8 7C C5 33 78 */ mr r5, r6
/* 8009ED6C 0009ABAC 38 63 00 01 */ addi r3, r3, 0x1
/* 8009ED70 0009ABB0 38 9F 00 50 */ addi r4, r31, 0x50
/* 8009ED74 0009ABB4 4B FD 8B ED */ bl LogMsg_0
.global lbl_8009ED78
lbl_8009ED78:
/* 8009ED78 0009ABB8 38 60 00 00 */ li r3, 0x0
/* 8009ED7C 0009ABBC 48 00 01 70 */ b lbl_8009EEEC
.global lbl_8009ED80
lbl_8009ED80:
/* 8009ED80 0009ABC0 7C C4 33 78 */ mr r4, r6
/* 8009ED84 0009ABC4 38 A1 00 0C */ addi r5, r1, 0xc
/* 8009ED88 0009ABC8 48 00 2B 6D */ bl sdpu_get_len_from_type
/* 8009ED8C 0009ABCC 80 A1 00 0C */ lwz r5, 0xc(r1)
/* 8009ED90 0009ABD0 7C 7E 1B 78 */ mr r30, r3
/* 8009ED94 0009ABD4 7C 03 2A 14 */ add r0, r3, r5
/* 8009ED98 0009ABD8 7C 00 D8 40 */ cmplw r0, r27
/* 8009ED9C 0009ABDC 40 81 00 30 */ ble lbl_8009EDCC
/* 8009EDA0 0009ABE0 3C 60 80 50 */ lis r3, sdp_cb@ha
/* 8009EDA4 0009ABE4 38 63 9C 20 */ addi r3, r3, sdp_cb@l
/* 8009EDA8 0009ABE8 88 03 46 30 */ lbz r0, 0x4630(r3)
/* 8009EDAC 0009ABEC 28 00 00 02 */ cmplwi r0, 0x2
/* 8009EDB0 0009ABF0 41 80 00 14 */ blt lbl_8009EDC4
/* 8009EDB4 0009ABF4 3C 60 00 0A */ lis r3, 0xa
/* 8009EDB8 0009ABF8 38 9F 00 78 */ addi r4, r31, 0x78
/* 8009EDBC 0009ABFC 38 63 00 01 */ addi r3, r3, 0x1
/* 8009EDC0 0009AC00 4B FD 8B A1 */ bl LogMsg_0
.global lbl_8009EDC4
lbl_8009EDC4:
/* 8009EDC4 0009AC04 38 60 00 00 */ li r3, 0x0
/* 8009EDC8 0009AC08 48 00 01 24 */ b lbl_8009EEEC
.global lbl_8009EDCC
lbl_8009EDCC:
/* 8009EDCC 0009AC0C 80 7A 04 10 */ lwz r3, 0x410(r26)
/* 8009EDD0 0009AC10 38 9A 00 02 */ addi r4, r26, 0x2
/* 8009EDD4 0009AC14 48 00 01 31 */ bl add_record
/* 8009EDD8 0009AC18 2C 03 00 00 */ cmpwi r3, 0x0
/* 8009EDDC 0009AC1C 7C 7B 1B 78 */ mr r27, r3
/* 8009EDE0 0009AC20 40 82 00 30 */ bne lbl_8009EE10
/* 8009EDE4 0009AC24 3C 60 80 50 */ lis r3, sdp_cb@ha
/* 8009EDE8 0009AC28 38 63 9C 20 */ addi r3, r3, sdp_cb@l
/* 8009EDEC 0009AC2C 88 03 46 30 */ lbz r0, 0x4630(r3)
/* 8009EDF0 0009AC30 28 00 00 02 */ cmplwi r0, 0x2
/* 8009EDF4 0009AC34 41 80 00 14 */ blt lbl_8009EE08
/* 8009EDF8 0009AC38 3C 60 00 0A */ lis r3, 0xa
/* 8009EDFC 0009AC3C 38 9F 00 98 */ addi r4, r31, 0x98
/* 8009EE00 0009AC40 38 63 00 01 */ addi r3, r3, 0x1
/* 8009EE04 0009AC44 4B FD 8B 5D */ bl LogMsg_0
.global lbl_8009EE08
lbl_8009EE08:
/* 8009EE08 0009AC48 38 60 00 00 */ li r3, 0x0
/* 8009EE0C 0009AC4C 48 00 00 E0 */ b lbl_8009EEEC
.global lbl_8009EE10
lbl_8009EE10:
/* 8009EE10 0009AC50 80 01 00 0C */ lwz r0, 0xc(r1)
/* 8009EE14 0009AC54 7F 9E 02 14 */ add r28, r30, r0
/* 8009EE18 0009AC58 48 00 00 C8 */ b lbl_8009EEE0
.global lbl_8009EE1C
lbl_8009EE1C:
/* 8009EE1C 0009AC5C 8B BE 00 00 */ lbz r29, 0x0(r30)
/* 8009EE20 0009AC60 38 7E 00 01 */ addi r3, r30, 0x1
/* 8009EE24 0009AC64 38 A1 00 08 */ addi r5, r1, 0x8
/* 8009EE28 0009AC68 7F A4 EB 78 */ mr r4, r29
/* 8009EE2C 0009AC6C 48 00 2A C9 */ bl sdpu_get_len_from_type
/* 8009EE30 0009AC70 57 A0 EE FE */ extrwi r0, r29, 5, 24
/* 8009EE34 0009AC74 2C 00 00 01 */ cmpwi r0, 0x1
/* 8009EE38 0009AC78 40 82 00 10 */ bne lbl_8009EE48
/* 8009EE3C 0009AC7C 80 01 00 08 */ lwz r0, 0x8(r1)
/* 8009EE40 0009AC80 28 00 00 02 */ cmplwi r0, 0x2
/* 8009EE44 0009AC84 41 82 00 38 */ beq lbl_8009EE7C
.global lbl_8009EE48
lbl_8009EE48:
/* 8009EE48 0009AC88 3C 60 80 50 */ lis r3, sdp_cb@ha
/* 8009EE4C 0009AC8C 38 63 9C 20 */ addi r3, r3, sdp_cb@l
/* 8009EE50 0009AC90 88 03 46 30 */ lbz r0, 0x4630(r3)
/* 8009EE54 0009AC94 28 00 00 02 */ cmplwi r0, 0x2
/* 8009EE58 0009AC98 41 80 00 1C */ blt lbl_8009EE74
/* 8009EE5C 0009AC9C 3C 60 00 0A */ lis r3, 0xa
/* 8009EE60 0009ACA0 80 C1 00 08 */ lwz r6, 0x8(r1)
/* 8009EE64 0009ACA4 7F A5 EB 78 */ mr r5, r29
/* 8009EE68 0009ACA8 38 9F 00 A8 */ addi r4, r31, 0xa8
/* 8009EE6C 0009ACAC 38 63 00 01 */ addi r3, r3, 0x1
/* 8009EE70 0009ACB0 4B FD 8A F1 */ bl LogMsg_0
.global lbl_8009EE74
lbl_8009EE74:
/* 8009EE74 0009ACB4 38 60 00 00 */ li r3, 0x0
/* 8009EE78 0009ACB8 48 00 00 74 */ b lbl_8009EEEC
.global lbl_8009EE7C
lbl_8009EE7C:
/* 8009EE7C 0009ACBC 88 83 00 00 */ lbz r4, 0x0(r3)
/* 8009EE80 0009ACC0 7F 65 DB 78 */ mr r5, r27
/* 8009EE84 0009ACC4 88 03 00 01 */ lbz r0, 0x1(r3)
/* 8009EE88 0009ACC8 38 E0 00 00 */ li r7, 0x0
/* 8009EE8C 0009ACCC 54 86 40 2E */ slwi r6, r4, 8
/* 8009EE90 0009ACD0 80 9A 04 10 */ lwz r4, 0x410(r26)
/* 8009EE94 0009ACD4 7C 06 02 14 */ add r0, r6, r0
/* 8009EE98 0009ACD8 39 00 00 00 */ li r8, 0x0
/* 8009EE9C 0009ACDC 54 06 04 3E */ clrlwi r6, r0, 16
/* 8009EEA0 0009ACE0 38 63 00 02 */ addi r3, r3, 0x2
/* 8009EEA4 0009ACE4 48 00 01 01 */ bl add_attr
/* 8009EEA8 0009ACE8 2C 03 00 00 */ cmpwi r3, 0x0
/* 8009EEAC 0009ACEC 7C 7E 1B 78 */ mr r30, r3
/* 8009EEB0 0009ACF0 40 82 00 30 */ bne lbl_8009EEE0
/* 8009EEB4 0009ACF4 3C 60 80 50 */ lis r3, sdp_cb@ha
/* 8009EEB8 0009ACF8 38 63 9C 20 */ addi r3, r3, sdp_cb@l
/* 8009EEBC 0009ACFC 88 03 46 30 */ lbz r0, 0x4630(r3)
/* 8009EEC0 0009AD00 28 00 00 02 */ cmplwi r0, 0x2
/* 8009EEC4 0009AD04 41 80 00 14 */ blt lbl_8009EED8
/* 8009EEC8 0009AD08 3C 60 00 0A */ lis r3, 0xa
/* 8009EECC 0009AD0C 38 9F 00 98 */ addi r4, r31, 0x98
/* 8009EED0 0009AD10 38 63 00 01 */ addi r3, r3, 0x1
/* 8009EED4 0009AD14 4B FD 8A 8D */ bl LogMsg_0
.global lbl_8009EED8
lbl_8009EED8:
/* 8009EED8 0009AD18 38 60 00 00 */ li r3, 0x0
/* 8009EEDC 0009AD1C 48 00 00 10 */ b lbl_8009EEEC
.global lbl_8009EEE0
lbl_8009EEE0:
/* 8009EEE0 0009AD20 7C 1E E0 40 */ cmplw r30, r28
/* 8009EEE4 0009AD24 41 80 FF 38 */ blt lbl_8009EE1C
/* 8009EEE8 0009AD28 7F C3 F3 78 */ mr r3, r30
.global lbl_8009EEEC
lbl_8009EEEC:
/* 8009EEEC 0009AD2C 39 61 00 30 */ addi r11, r1, 0x30
/* 8009EEF0 0009AD30 4B F6 84 95 */ bl lbl_80007384
/* 8009EEF4 0009AD34 80 01 00 34 */ lwz r0, 0x34(r1)
/* 8009EEF8 0009AD38 7C 08 03 A6 */ mtlr r0
/* 8009EEFC 0009AD3C 38 21 00 30 */ addi r1, r1, 0x30
/* 8009EF00 0009AD40 4E 80 00 20 */ blr
.global add_record
add_record:
/* 8009EF04 0009AD44 94 21 FF F0 */ stwu r1, -0x10(r1)
/* 8009EF08 0009AD48 7C 08 02 A6 */ mflr r0
/* 8009EF0C 0009AD4C 90 01 00 14 */ stw r0, 0x14(r1)
/* 8009EF10 0009AD50 93 E1 00 0C */ stw r31, 0xc(r1)
/* 8009EF14 0009AD54 93 C1 00 08 */ stw r30, 0x8(r1)
/* 8009EF18 0009AD58 7C 7E 1B 78 */ mr r30, r3
/* 8009EF1C 0009AD5C 80 A3 00 04 */ lwz r5, 0x4(r3)
/* 8009EF20 0009AD60 28 05 00 14 */ cmplwi r5, 0x14
/* 8009EF24 0009AD64 40 80 00 0C */ bge lbl_8009EF30
/* 8009EF28 0009AD68 38 60 00 00 */ li r3, 0x0
/* 8009EF2C 0009AD6C 48 00 00 60 */ b lbl_8009EF8C
.global lbl_8009EF30
lbl_8009EF30:
/* 8009EF30 0009AD70 83 E3 00 68 */ lwz r31, 0x68(r3)
/* 8009EF34 0009AD74 38 05 FF EC */ addi r0, r5, -0x14
/* 8009EF38 0009AD78 90 03 00 04 */ stw r0, 0x4(r3)
/* 8009EF3C 0009AD7C 38 00 00 00 */ li r0, 0x0
/* 8009EF40 0009AD80 38 DF 00 14 */ addi r6, r31, 0x14
/* 8009EF44 0009AD84 38 A0 00 06 */ li r5, 0x6
/* 8009EF48 0009AD88 90 C3 00 68 */ stw r6, 0x68(r3)
/* 8009EF4C 0009AD8C 38 7F 00 0C */ addi r3, r31, 0xc
/* 8009EF50 0009AD90 90 1F 00 00 */ stw r0, 0x0(r31)
/* 8009EF54 0009AD94 90 1F 00 04 */ stw r0, 0x4(r31)
/* 8009EF58 0009AD98 4B F6 50 A9 */ bl memcpy
/* 8009EF5C 0009AD9C 80 7E 00 08 */ lwz r3, 0x8(r30)
/* 8009EF60 0009ADA0 2C 03 00 00 */ cmpwi r3, 0x0
/* 8009EF64 0009ADA4 40 82 00 14 */ bne lbl_8009EF78
/* 8009EF68 0009ADA8 93 FE 00 08 */ stw r31, 0x8(r30)
/* 8009EF6C 0009ADAC 48 00 00 1C */ b lbl_8009EF88
/* 8009EF70 0009ADB0 48 00 00 08 */ b lbl_8009EF78
.global lbl_8009EF74
lbl_8009EF74:
/* 8009EF74 0009ADB4 7C 03 03 78 */ mr r3, r0
.global lbl_8009EF78
lbl_8009EF78:
/* 8009EF78 0009ADB8 80 03 00 04 */ lwz r0, 0x4(r3)
/* 8009EF7C 0009ADBC 2C 00 00 00 */ cmpwi r0, 0x0
/* 8009EF80 0009ADC0 40 82 FF F4 */ bne lbl_8009EF74
/* 8009EF84 0009ADC4 93 E3 00 04 */ stw r31, 0x4(r3)
.global lbl_8009EF88
lbl_8009EF88:
/* 8009EF88 0009ADC8 7F E3 FB 78 */ mr r3, r31
.global lbl_8009EF8C
lbl_8009EF8C:
/* 8009EF8C 0009ADCC 80 01 00 14 */ lwz r0, 0x14(r1)
/* 8009EF90 0009ADD0 83 E1 00 0C */ lwz r31, 0xc(r1)
/* 8009EF94 0009ADD4 83 C1 00 08 */ lwz r30, 0x8(r1)
/* 8009EF98 0009ADD8 7C 08 03 A6 */ mtlr r0
/* 8009EF9C 0009ADDC 38 21 00 10 */ addi r1, r1, 0x10
/* 8009EFA0 0009ADE0 4E 80 00 20 */ blr
.global add_attr
add_attr:
/* 8009EFA4 0009ADE4 94 21 FF C0 */ stwu r1, -0x40(r1)
/* 8009EFA8 0009ADE8 7C 08 02 A6 */ mflr r0
/* 8009EFAC 0009ADEC 90 01 00 44 */ stw r0, 0x44(r1)
/* 8009EFB0 0009ADF0 39 61 00 40 */ addi r11, r1, 0x40
/* 8009EFB4 0009ADF4 4B F6 83 71 */ bl lbl_80007324
/* 8009EFB8 0009ADF8 8A A3 00 00 */ lbz r21, 0x0(r3)
/* 8009EFBC 0009ADFC 3F E0 80 44 */ lis r31, "@1493"@ha
/* 8009EFC0 0009AE00 7C 97 23 78 */ mr r23, r4
/* 8009EFC4 0009AE04 7C B8 2B 78 */ mr r24, r5
/* 8009EFC8 0009AE08 7C D9 33 78 */ mr r25, r6
/* 8009EFCC 0009AE0C 7C FA 3B 78 */ mr r26, r7
/* 8009EFD0 0009AE10 7E A4 AB 78 */ mr r4, r21
/* 8009EFD4 0009AE14 3B FF FA 38 */ addi r31, r31, "@1493"@l
/* 8009EFD8 0009AE18 55 1C 06 30 */ rlwinm r28, r8, 0, 24, 24
/* 8009EFDC 0009AE1C 55 1B 06 7E */ clrlwi r27, r8, 25
/* 8009EFE0 0009AE20 38 A1 00 08 */ addi r5, r1, 0x8
/* 8009EFE4 0009AE24 38 63 00 01 */ addi r3, r3, 0x1
/* 8009EFE8 0009AE28 48 00 29 0D */ bl sdpu_get_len_from_type
/* 8009EFEC 0009AE2C 80 01 00 08 */ lwz r0, 0x8(r1)
/* 8009EFF0 0009AE30 7C 76 1B 78 */ mr r22, r3
/* 8009EFF4 0009AE34 56 A6 EF 3E */ extrwi r6, r21, 4, 25
/* 8009EFF8 0009AE38 38 80 00 0C */ li r4, 0xc
/* 8009EFFC 0009AE3C 54 05 05 3E */ clrlwi r5, r0, 20
/* 8009F000 0009AE40 28 05 00 04 */ cmplwi r5, 0x4
/* 8009F004 0009AE44 90 A1 00 08 */ stw r5, 0x8(r1)
/* 8009F008 0009AE48 40 81 00 08 */ ble lbl_8009F010
/* 8009F00C 0009AE4C 38 85 00 08 */ addi r4, r5, 0x8
.global lbl_8009F010
lbl_8009F010:
/* 8009F010 0009AE50 38 84 00 03 */ addi r4, r4, 0x3
/* 8009F014 0009AE54 80 17 00 04 */ lwz r0, 0x4(r23)
/* 8009F018 0009AE58 54 9E 00 3A */ clrrwi r30, r4, 2
/* 8009F01C 0009AE5C 7C 00 F0 40 */ cmplw r0, r30
/* 8009F020 0009AE60 40 80 00 0C */ bge lbl_8009F02C
/* 8009F024 0009AE64 38 60 00 00 */ li r3, 0x0
/* 8009F028 0009AE68 48 00 04 FC */ b lbl_8009F524
.global lbl_8009F02C
lbl_8009F02C:
/* 8009F02C 0009AE6C 83 B7 00 68 */ lwz r29, 0x68(r23)
/* 8009F030 0009AE70 54 C0 61 26 */ rlwinm r0, r6, 12, 4, 19
/* 8009F034 0009AE74 28 06 00 08 */ cmplwi r6, 0x8
/* 8009F038 0009AE78 38 80 00 00 */ li r4, 0x0
/* 8009F03C 0009AE7C B3 3D 00 04 */ sth r25, 0x4(r29)
/* 8009F040 0009AE80 80 A1 00 08 */ lwz r5, 0x8(r1)
/* 8009F044 0009AE84 54 A5 04 3E */ clrlwi r5, r5, 16
/* 8009F048 0009AE88 7C A5 03 78 */ or r5, r5, r0
/* 8009F04C 0009AE8C B0 BD 00 06 */ sth r5, 0x6(r29)
/* 8009F050 0009AE90 90 9D 00 00 */ stw r4, 0x0(r29)
/* 8009F054 0009AE94 41 81 04 50 */ bgt lbl_8009F4A4
/* 8009F058 0009AE98 3C A0 80 44 */ lis r5, "@1723"@ha
/* 8009F05C 0009AE9C 54 C4 10 3A */ slwi r4, r6, 2
/* 8009F060 0009AEA0 38 A5 FB 70 */ addi r5, r5, "@1723"@l
/* 8009F064 0009AEA4 7C A5 20 2E */ lwzx r5, r5, r4
/* 8009F068 0009AEA8 7C A9 03 A6 */ mtctr r5
/* 8009F06C 0009AEAC 4E 80 04 20 */ bctr
.global lbl_8009F070
lbl_8009F070:
/* 8009F070 0009AEB0 2C 1C 00 00 */ cmpwi r28, 0x0
/* 8009F074 0009AEB4 41 82 00 AC */ beq lbl_8009F120
/* 8009F078 0009AEB8 80 01 00 08 */ lwz r0, 0x8(r1)
/* 8009F07C 0009AEBC 28 00 00 02 */ cmplwi r0, 0x2
/* 8009F080 0009AEC0 40 82 00 A0 */ bne lbl_8009F120
/* 8009F084 0009AEC4 88 83 00 00 */ lbz r4, 0x0(r3)
/* 8009F088 0009AEC8 88 03 00 01 */ lbz r0, 0x1(r3)
/* 8009F08C 0009AECC 54 84 40 2E */ slwi r4, r4, 8
/* 8009F090 0009AED0 7C 04 02 14 */ add r0, r4, r0
/* 8009F094 0009AED4 54 00 04 3E */ clrlwi r0, r0, 16
/* 8009F098 0009AED8 28 00 00 04 */ cmplwi r0, 0x4
/* 8009F09C 0009AEDC 40 82 00 84 */ bne lbl_8009F120
/* 8009F0A0 0009AEE0 80 B7 00 68 */ lwz r5, 0x68(r23)
/* 8009F0A4 0009AEE4 28 1B 00 05 */ cmplwi r27, 0x5
/* 8009F0A8 0009AEE8 80 97 00 04 */ lwz r4, 0x4(r23)
/* 8009F0AC 0009AEEC 3B C0 00 00 */ li r30, 0x0
/* 8009F0B0 0009AEF0 38 A5 00 0C */ addi r5, r5, 0xc
/* 8009F0B4 0009AEF4 38 04 FF F4 */ addi r0, r4, -0xc
/* 8009F0B8 0009AEF8 90 B7 00 68 */ stw r5, 0x68(r23)
/* 8009F0BC 0009AEFC 90 17 00 04 */ stw r0, 0x4(r23)
/* 8009F0C0 0009AF00 80 01 00 08 */ lwz r0, 0x8(r1)
/* 8009F0C4 0009AF04 7C 83 02 14 */ add r4, r3, r0
/* 8009F0C8 0009AF08 3A A4 00 02 */ addi r21, r4, 0x2
/* 8009F0CC 0009AF0C 41 80 00 2C */ blt lbl_8009F0F8
/* 8009F0D0 0009AF10 3C 60 80 50 */ lis r3, sdp_cb@ha
/* 8009F0D4 0009AF14 38 63 9C 20 */ addi r3, r3, sdp_cb@l
/* 8009F0D8 0009AF18 88 03 46 30 */ lbz r0, 0x4630(r3)
/* 8009F0DC 0009AF1C 28 00 00 01 */ cmplwi r0, 0x1
/* 8009F0E0 0009AF20 41 80 00 10 */ blt lbl_8009F0F0
/* 8009F0E4 0009AF24 38 9F 00 D8 */ addi r4, r31, 0xd8
/* 8009F0E8 0009AF28 3C 60 00 0A */ lis r3, 0xa
/* 8009F0EC 0009AF2C 4B FD 88 75 */ bl LogMsg_0
.global lbl_8009F0F0
lbl_8009F0F0:
/* 8009F0F0 0009AF30 7E A3 AB 78 */ mr r3, r21
/* 8009F0F4 0009AF34 48 00 04 30 */ b lbl_8009F524
.global lbl_8009F0F8
lbl_8009F0F8:
/* 8009F0F8 0009AF38 38 1B 00 01 */ addi r0, r27, 0x1
/* 8009F0FC 0009AF3C 7E E4 BB 78 */ mr r4, r23
/* 8009F100 0009AF40 7F 05 C3 78 */ mr r5, r24
/* 8009F104 0009AF44 7F A7 EB 78 */ mr r7, r29
/* 8009F108 0009AF48 54 08 06 3E */ clrlwi r8, r0, 24
/* 8009F10C 0009AF4C 38 C0 00 04 */ li r6, 0x4
/* 8009F110 0009AF50 38 63 00 02 */ addi r3, r3, 0x2
/* 8009F114 0009AF54 4B FF FE 91 */ bl add_attr
/* 8009F118 0009AF58 7C 76 1B 78 */ mr r22, r3
/* 8009F11C 0009AF5C 48 00 03 88 */ b lbl_8009F4A4
.global lbl_8009F120
lbl_8009F120:
/* 8009F120 0009AF60 80 01 00 08 */ lwz r0, 0x8(r1)
/* 8009F124 0009AF64 2C 00 00 03 */ cmpwi r0, 0x3
/* 8009F128 0009AF68 41 82 00 84 */ beq lbl_8009F1AC
/* 8009F12C 0009AF6C 40 80 00 14 */ bge lbl_8009F140
/* 8009F130 0009AF70 2C 00 00 01 */ cmpwi r0, 0x1
/* 8009F134 0009AF74 41 82 00 18 */ beq lbl_8009F14C
/* 8009F138 0009AF78 40 80 00 24 */ bge lbl_8009F15C
/* 8009F13C 0009AF7C 48 00 00 70 */ b lbl_8009F1AC
.global lbl_8009F140
lbl_8009F140:
/* 8009F140 0009AF80 2C 00 00 05 */ cmpwi r0, 0x5
/* 8009F144 0009AF84 40 80 00 68 */ bge lbl_8009F1AC
/* 8009F148 0009AF88 48 00 00 30 */ b lbl_8009F178
.global lbl_8009F14C
lbl_8009F14C:
/* 8009F14C 0009AF8C 88 03 00 00 */ lbz r0, 0x0(r3)
/* 8009F150 0009AF90 3A C3 00 01 */ addi r22, r3, 0x1
/* 8009F154 0009AF94 98 1D 00 08 */ stb r0, 0x8(r29)
/* 8009F158 0009AF98 48 00 03 4C */ b lbl_8009F4A4
.global lbl_8009F15C
lbl_8009F15C:
/* 8009F15C 0009AF9C 88 83 00 00 */ lbz r4, 0x0(r3)
/* 8009F160 0009AFA0 3A C3 00 02 */ addi r22, r3, 0x2
/* 8009F164 0009AFA4 88 03 00 01 */ lbz r0, 0x1(r3)
/* 8009F168 0009AFA8 54 83 40 2E */ slwi r3, r4, 8
/* 8009F16C 0009AFAC 7C 03 02 14 */ add r0, r3, r0
/* 8009F170 0009AFB0 B0 1D 00 08 */ sth r0, 0x8(r29)
/* 8009F174 0009AFB4 48 00 03 30 */ b lbl_8009F4A4
.global lbl_8009F178
lbl_8009F178:
/* 8009F178 0009AFB8 88 A3 00 00 */ lbz r5, 0x0(r3)
/* 8009F17C 0009AFBC 3A C3 00 04 */ addi r22, r3, 0x4
/* 8009F180 0009AFC0 88 03 00 02 */ lbz r0, 0x2(r3)
/* 8009F184 0009AFC4 88 83 00 01 */ lbz r4, 0x1(r3)
/* 8009F188 0009AFC8 54 A6 C0 0E */ slwi r6, r5, 24
/* 8009F18C 0009AFCC 54 00 40 2E */ slwi r0, r0, 8
/* 8009F190 0009AFD0 54 85 80 1E */ slwi r5, r4, 16
/* 8009F194 0009AFD4 88 83 00 03 */ lbz r4, 0x3(r3)
/* 8009F198 0009AFD8 7C 66 2A 14 */ add r3, r6, r5
/* 8009F19C 0009AFDC 7C 04 02 14 */ add r0, r4, r0
/* 8009F1A0 0009AFE0 7C 03 02 14 */ add r0, r3, r0
/* 8009F1A4 0009AFE4 90 1D 00 08 */ stw r0, 0x8(r29)
/* 8009F1A8 0009AFE8 48 00 02 FC */ b lbl_8009F4A4
.global lbl_8009F1AC
lbl_8009F1AC:
/* 8009F1AC 0009AFEC 38 7D 00 08 */ addi r3, r29, 0x8
/* 8009F1B0 0009AFF0 38 80 00 00 */ li r4, 0x0
/* 8009F1B4 0009AFF4 48 00 00 18 */ b lbl_8009F1CC
.global lbl_8009F1B8
lbl_8009F1B8:
/* 8009F1B8 0009AFF8 88 16 00 00 */ lbz r0, 0x0(r22)
/* 8009F1BC 0009AFFC 38 84 00 01 */ addi r4, r4, 0x1
/* 8009F1C0 0009B000 3A D6 00 01 */ addi r22, r22, 0x1
/* 8009F1C4 0009B004 98 03 00 00 */ stb r0, 0x0(r3)
/* 8009F1C8 0009B008 38 63 00 01 */ addi r3, r3, 0x1
.global lbl_8009F1CC
lbl_8009F1CC:
/* 8009F1CC 0009B00C 80 01 00 08 */ lwz r0, 0x8(r1)
/* 8009F1D0 0009B010 7C 04 00 00 */ cmpw r4, r0
/* 8009F1D4 0009B014 41 80 FF E4 */ blt lbl_8009F1B8
/* 8009F1D8 0009B018 48 00 02 CC */ b lbl_8009F4A4
.global lbl_8009F1DC
lbl_8009F1DC:
/* 8009F1DC 0009B01C 80 A1 00 08 */ lwz r5, 0x8(r1)
/* 8009F1E0 0009B020 2C 05 00 04 */ cmpwi r5, 0x4
/* 8009F1E4 0009B024 41 82 00 3C */ beq lbl_8009F220
/* 8009F1E8 0009B028 40 80 00 10 */ bge lbl_8009F1F8
/* 8009F1EC 0009B02C 2C 05 00 02 */ cmpwi r5, 0x2
/* 8009F1F0 0009B030 41 82 00 14 */ beq lbl_8009F204
/* 8009F1F4 0009B034 48 00 01 4C */ b lbl_8009F340
.global lbl_8009F1F8
lbl_8009F1F8:
/* 8009F1F8 0009B038 2C 05 00 10 */ cmpwi r5, 0x10
/* 8009F1FC 0009B03C 41 82 00 7C */ beq lbl_8009F278
/* 8009F200 0009B040 48 00 01 40 */ b lbl_8009F340
.global lbl_8009F204
lbl_8009F204:
/* 8009F204 0009B044 88 83 00 00 */ lbz r4, 0x0(r3)
/* 8009F208 0009B048 3A C3 00 02 */ addi r22, r3, 0x2
/* 8009F20C 0009B04C 88 03 00 01 */ lbz r0, 0x1(r3)
/* 8009F210 0009B050 54 83 40 2E */ slwi r3, r4, 8
/* 8009F214 0009B054 7C 03 02 14 */ add r0, r3, r0
/* 8009F218 0009B058 B0 1D 00 08 */ sth r0, 0x8(r29)
/* 8009F21C 0009B05C 48 00 02 88 */ b lbl_8009F4A4
.global lbl_8009F220
lbl_8009F220:
/* 8009F220 0009B060 88 E3 00 00 */ lbz r7, 0x0(r3)
/* 8009F224 0009B064 3A C3 00 04 */ addi r22, r3, 0x4
/* 8009F228 0009B068 88 C3 00 01 */ lbz r6, 0x1(r3)
/* 8009F22C 0009B06C 3C 80 00 01 */ lis r4, 0x1
/* 8009F230 0009B070 54 E8 C0 0E */ slwi r8, r7, 24
/* 8009F234 0009B074 88 A3 00 02 */ lbz r5, 0x2(r3)
/* 8009F238 0009B078 54 C7 80 1E */ slwi r7, r6, 16
/* 8009F23C 0009B07C 88 C3 00 03 */ lbz r6, 0x3(r3)
/* 8009F240 0009B080 54 A3 40 2E */ slwi r3, r5, 8
/* 8009F244 0009B084 7C A8 3A 14 */ add r5, r8, r7
/* 8009F248 0009B088 7C 66 1A 14 */ add r3, r6, r3
/* 8009F24C 0009B08C 7C 65 1A 14 */ add r3, r5, r3
/* 8009F250 0009B090 7C 03 20 40 */ cmplw r3, r4
/* 8009F254 0009B094 90 7D 00 08 */ stw r3, 0x8(r29)
/* 8009F258 0009B098 40 80 02 4C */ bge lbl_8009F4A4
/* 8009F25C 0009B09C 38 60 00 02 */ li r3, 0x2
/* 8009F260 0009B0A0 60 00 00 02 */ ori r0, r0, 0x2
/* 8009F264 0009B0A4 90 61 00 08 */ stw r3, 0x8(r1)
/* 8009F268 0009B0A8 B0 1D 00 06 */ sth r0, 0x6(r29)
/* 8009F26C 0009B0AC 80 1D 00 08 */ lwz r0, 0x8(r29)
/* 8009F270 0009B0B0 B0 1D 00 08 */ sth r0, 0x8(r29)
/* 8009F274 0009B0B4 48 00 02 30 */ b lbl_8009F4A4
.global lbl_8009F278
lbl_8009F278:
/* 8009F278 0009B0B8 7E C3 B3 78 */ mr r3, r22
/* 8009F27C 0009B0BC 48 00 27 49 */ bl sdpu_is_base_uuid
/* 8009F280 0009B0C0 54 60 06 3F */ clrlwi. r0, r3, 24
/* 8009F284 0009B0C4 41 82 00 8C */ beq lbl_8009F310
/* 8009F288 0009B0C8 88 16 00 00 */ lbz r0, 0x0(r22)
/* 8009F28C 0009B0CC 2C 00 00 00 */ cmpwi r0, 0x0
/* 8009F290 0009B0D0 40 82 00 3C */ bne lbl_8009F2CC
/* 8009F294 0009B0D4 88 16 00 01 */ lbz r0, 0x1(r22)
/* 8009F298 0009B0D8 2C 00 00 00 */ cmpwi r0, 0x0
/* 8009F29C 0009B0DC 40 82 00 30 */ bne lbl_8009F2CC
/* 8009F2A0 0009B0E0 A0 1D 00 06 */ lhz r0, 0x6(r29)
/* 8009F2A4 0009B0E4 54 00 00 26 */ clrrwi r0, r0, 12
/* 8009F2A8 0009B0E8 60 00 00 02 */ ori r0, r0, 0x2
/* 8009F2AC 0009B0EC B0 1D 00 06 */ sth r0, 0x6(r29)
/* 8009F2B0 0009B0F0 88 76 00 02 */ lbz r3, 0x2(r22)
/* 8009F2B4 0009B0F4 88 16 00 03 */ lbz r0, 0x3(r22)
/* 8009F2B8 0009B0F8 3A D6 00 10 */ addi r22, r22, 0x10
/* 8009F2BC 0009B0FC 54 63 40 2E */ slwi r3, r3, 8
/* 8009F2C0 0009B100 7C 03 02 14 */ add r0, r3, r0
/* 8009F2C4 0009B104 B0 1D 00 08 */ sth r0, 0x8(r29)
/* 8009F2C8 0009B108 48 00 01 DC */ b lbl_8009F4A4
.global lbl_8009F2CC
lbl_8009F2CC:
/* 8009F2CC 0009B10C A0 1D 00 06 */ lhz r0, 0x6(r29)
/* 8009F2D0 0009B110 54 00 00 26 */ clrrwi r0, r0, 12
/* 8009F2D4 0009B114 60 00 00 04 */ ori r0, r0, 0x4
/* 8009F2D8 0009B118 B0 1D 00 06 */ sth r0, 0x6(r29)
/* 8009F2DC 0009B11C 88 96 00 00 */ lbz r4, 0x0(r22)
/* 8009F2E0 0009B120 88 76 00 01 */ lbz r3, 0x1(r22)
/* 8009F2E4 0009B124 88 16 00 02 */ lbz r0, 0x2(r22)
/* 8009F2E8 0009B128 54 85 C0 0E */ slwi r5, r4, 24
/* 8009F2EC 0009B12C 88 96 00 03 */ lbz r4, 0x3(r22)
/* 8009F2F0 0009B130 54 63 80 1E */ slwi r3, r3, 16
/* 8009F2F4 0009B134 54 00 40 2E */ slwi r0, r0, 8
/* 8009F2F8 0009B138 3A D6 00 10 */ addi r22, r22, 0x10
/* 8009F2FC 0009B13C 7C 65 1A 14 */ add r3, r5, r3
/* 8009F300 0009B140 7C 04 02 14 */ add r0, r4, r0
/* 8009F304 0009B144 7C 03 02 14 */ add r0, r3, r0
/* 8009F308 0009B148 90 1D 00 08 */ stw r0, 0x8(r29)
/* 8009F30C 0009B14C 48 00 01 98 */ b lbl_8009F4A4
.global lbl_8009F310
lbl_8009F310:
/* 8009F310 0009B150 38 7D 00 08 */ addi r3, r29, 0x8
/* 8009F314 0009B154 38 80 00 00 */ li r4, 0x0
/* 8009F318 0009B158 48 00 00 18 */ b lbl_8009F330
.global lbl_8009F31C
lbl_8009F31C:
/* 8009F31C 0009B15C 88 16 00 00 */ lbz r0, 0x0(r22)
/* 8009F320 0009B160 38 84 00 01 */ addi r4, r4, 0x1
/* 8009F324 0009B164 3A D6 00 01 */ addi r22, r22, 0x1
/* 8009F328 0009B168 98 03 00 00 */ stb r0, 0x0(r3)
/* 8009F32C 0009B16C 38 63 00 01 */ addi r3, r3, 0x1
.global lbl_8009F330
lbl_8009F330:
/* 8009F330 0009B170 80 01 00 08 */ lwz r0, 0x8(r1)
/* 8009F334 0009B174 7C 04 00 00 */ cmpw r4, r0
/* 8009F338 0009B178 41 80 FF E4 */ blt lbl_8009F31C
/* 8009F33C 0009B17C 48 00 01 68 */ b lbl_8009F4A4
.global lbl_8009F340
lbl_8009F340:
/* 8009F340 0009B180 3C 60 80 50 */ lis r3, sdp_cb@ha
/* 8009F344 0009B184 38 63 9C 20 */ addi r3, r3, sdp_cb@l
/* 8009F348 0009B188 88 03 46 30 */ lbz r0, 0x4630(r3)
/* 8009F34C 0009B18C 28 00 00 02 */ cmplwi r0, 0x2
/* 8009F350 0009B190 41 80 00 14 */ blt lbl_8009F364
/* 8009F354 0009B194 3C 60 00 0A */ lis r3, 0xa
/* 8009F358 0009B198 38 9F 00 F4 */ addi r4, r31, 0xf4
/* 8009F35C 0009B19C 38 63 00 01 */ addi r3, r3, 0x1
/* 8009F360 0009B1A0 4B FD 86 01 */ bl LogMsg_0
.global lbl_8009F364
lbl_8009F364:
/* 8009F364 0009B1A4 80 01 00 08 */ lwz r0, 0x8(r1)
/* 8009F368 0009B1A8 7C 76 02 14 */ add r3, r22, r0
/* 8009F36C 0009B1AC 48 00 01 B8 */ b lbl_8009F524
.global lbl_8009F370
lbl_8009F370:
/* 8009F370 0009B1B0 80 B7 00 68 */ lwz r5, 0x68(r23)
/* 8009F374 0009B1B4 28 1B 00 05 */ cmplwi r27, 0x5
/* 8009F378 0009B1B8 80 97 00 04 */ lwz r4, 0x4(r23)
/* 8009F37C 0009B1BC 3B C0 00 00 */ li r30, 0x0
/* 8009F380 0009B1C0 38 A5 00 0C */ addi r5, r5, 0xc
/* 8009F384 0009B1C4 38 04 FF F4 */ addi r0, r4, -0xc
/* 8009F388 0009B1C8 90 B7 00 68 */ stw r5, 0x68(r23)
/* 8009F38C 0009B1CC 90 17 00 04 */ stw r0, 0x4(r23)
/* 8009F390 0009B1D0 80 01 00 08 */ lwz r0, 0x8(r1)
/* 8009F394 0009B1D4 7E A3 02 14 */ add r21, r3, r0
/* 8009F398 0009B1D8 41 80 00 2C */ blt lbl_8009F3C4
/* 8009F39C 0009B1DC 3C 60 80 50 */ lis r3, sdp_cb@ha
/* 8009F3A0 0009B1E0 38 63 9C 20 */ addi r3, r3, sdp_cb@l
/* 8009F3A4 0009B1E4 88 03 46 30 */ lbz r0, 0x4630(r3)
/* 8009F3A8 0009B1E8 28 00 00 01 */ cmplwi r0, 0x1
/* 8009F3AC 0009B1EC 41 80 00 10 */ blt lbl_8009F3BC
/* 8009F3B0 0009B1F0 38 9F 00 D8 */ addi r4, r31, 0xd8
/* 8009F3B4 0009B1F4 3C 60 00 0A */ lis r3, 0xa
/* 8009F3B8 0009B1F8 4B FD 85 A9 */ bl LogMsg_0
.global lbl_8009F3BC
lbl_8009F3BC:
/* 8009F3BC 0009B1FC 7E A3 AB 78 */ mr r3, r21
/* 8009F3C0 0009B200 48 00 01 64 */ b lbl_8009F524
.global lbl_8009F3C4
lbl_8009F3C4:
/* 8009F3C4 0009B204 2C 1C 00 00 */ cmpwi r28, 0x0
/* 8009F3C8 0009B208 40 82 00 0C */ bne lbl_8009F3D4
/* 8009F3CC 0009B20C 28 19 00 0D */ cmplwi r25, 0xd
/* 8009F3D0 0009B210 40 82 00 0C */ bne lbl_8009F3DC
.global lbl_8009F3D4
lbl_8009F3D4:
/* 8009F3D4 0009B214 63 60 00 80 */ ori r0, r27, 0x80
/* 8009F3D8 0009B218 54 1B 06 3E */ clrlwi r27, r0, 24
.global lbl_8009F3DC
lbl_8009F3DC:
/* 8009F3DC 0009B21C 57 63 06 3E */ clrlwi r3, r27, 24
/* 8009F3E0 0009B220 3B 23 00 01 */ addi r25, r3, 0x1
/* 8009F3E4 0009B224 48 00 00 34 */ b lbl_8009F418
.global lbl_8009F3E8
lbl_8009F3E8:
/* 8009F3E8 0009B228 7E C3 B3 78 */ mr r3, r22
/* 8009F3EC 0009B22C 7E E4 BB 78 */ mr r4, r23
/* 8009F3F0 0009B230 7F 05 C3 78 */ mr r5, r24
/* 8009F3F4 0009B234 7F A7 EB 78 */ mr r7, r29
/* 8009F3F8 0009B238 57 28 06 3E */ clrlwi r8, r25, 24
/* 8009F3FC 0009B23C 38 C0 00 00 */ li r6, 0x0
/* 8009F400 0009B240 4B FF FB A5 */ bl add_attr
/* 8009F404 0009B244 2C 03 00 00 */ cmpwi r3, 0x0
/* 8009F408 0009B248 7C 76 1B 78 */ mr r22, r3
/* 8009F40C 0009B24C 40 82 00 0C */ bne lbl_8009F418
/* 8009F410 0009B250 38 60 00 00 */ li r3, 0x0
/* 8009F414 0009B254 48 00 01 10 */ b lbl_8009F524
.global lbl_8009F418
lbl_8009F418:
/* 8009F418 0009B258 7C 16 A8 40 */ cmplw r22, r21
/* 8009F41C 0009B25C 41 80 FF CC */ blt lbl_8009F3E8
/* 8009F420 0009B260 48 00 00 84 */ b lbl_8009F4A4
.global lbl_8009F424
lbl_8009F424:
/* 8009F424 0009B264 38 7D 00 08 */ addi r3, r29, 0x8
/* 8009F428 0009B268 38 80 00 00 */ li r4, 0x0
/* 8009F42C 0009B26C 48 00 00 18 */ b lbl_8009F444
.global lbl_8009F430
lbl_8009F430:
/* 8009F430 0009B270 88 16 00 00 */ lbz r0, 0x0(r22)
/* 8009F434 0009B274 38 84 00 01 */ addi r4, r4, 0x1
/* 8009F438 0009B278 3A D6 00 01 */ addi r22, r22, 0x1
/* 8009F43C 0009B27C 98 03 00 00 */ stb r0, 0x0(r3)
/* 8009F440 0009B280 38 63 00 01 */ addi r3, r3, 0x1
.global lbl_8009F444
lbl_8009F444:
/* 8009F444 0009B284 80 01 00 08 */ lwz r0, 0x8(r1)
/* 8009F448 0009B288 7C 04 00 00 */ cmpw r4, r0
/* 8009F44C 0009B28C 41 80 FF E4 */ blt lbl_8009F430
/* 8009F450 0009B290 48 00 00 54 */ b lbl_8009F4A4
.global lbl_8009F454
lbl_8009F454:
/* 8009F454 0009B294 80 A1 00 08 */ lwz r5, 0x8(r1)
/* 8009F458 0009B298 2C 05 00 01 */ cmpwi r5, 0x1
/* 8009F45C 0009B29C 41 82 00 08 */ beq lbl_8009F464
/* 8009F460 0009B2A0 48 00 00 14 */ b lbl_8009F474
.global lbl_8009F464
lbl_8009F464:
/* 8009F464 0009B2A4 88 03 00 00 */ lbz r0, 0x0(r3)
/* 8009F468 0009B2A8 3A C3 00 01 */ addi r22, r3, 0x1
/* 8009F46C 0009B2AC 98 1D 00 08 */ stb r0, 0x8(r29)
/* 8009F470 0009B2B0 48 00 00 34 */ b lbl_8009F4A4
.global lbl_8009F474
lbl_8009F474:
/* 8009F474 0009B2B4 3C 60 80 50 */ lis r3, sdp_cb@ha
/* 8009F478 0009B2B8 38 63 9C 20 */ addi r3, r3, sdp_cb@l
/* 8009F47C 0009B2BC 88 03 46 30 */ lbz r0, 0x4630(r3)
/* 8009F480 0009B2C0 28 00 00 02 */ cmplwi r0, 0x2
/* 8009F484 0009B2C4 41 80 00 14 */ blt lbl_8009F498
/* 8009F488 0009B2C8 3C 60 00 0A */ lis r3, 0xa
/* 8009F48C 0009B2CC 38 9F 01 14 */ addi r4, r31, 0x114
/* 8009F490 0009B2D0 38 63 00 01 */ addi r3, r3, 0x1
/* 8009F494 0009B2D4 4B FD 84 CD */ bl LogMsg_0
.global lbl_8009F498
lbl_8009F498:
/* 8009F498 0009B2D8 80 01 00 08 */ lwz r0, 0x8(r1)
/* 8009F49C 0009B2DC 7C 76 02 14 */ add r3, r22, r0
/* 8009F4A0 0009B2E0 48 00 00 84 */ b lbl_8009F524
.global lbl_8009F4A4
lbl_8009F4A4:
/* 8009F4A4 0009B2E4 80 77 00 68 */ lwz r3, 0x68(r23)
/* 8009F4A8 0009B2E8 2C 1A 00 00 */ cmpwi r26, 0x0
/* 8009F4AC 0009B2EC 80 17 00 04 */ lwz r0, 0x4(r23)
/* 8009F4B0 0009B2F0 7C 63 F2 14 */ add r3, r3, r30
/* 8009F4B4 0009B2F4 7C 1E 00 50 */ subf r0, r30, r0
/* 8009F4B8 0009B2F8 90 77 00 68 */ stw r3, 0x68(r23)
/* 8009F4BC 0009B2FC 90 17 00 04 */ stw r0, 0x4(r23)
/* 8009F4C0 0009B300 40 82 00 34 */ bne lbl_8009F4F4
/* 8009F4C4 0009B304 80 78 00 00 */ lwz r3, 0x0(r24)
/* 8009F4C8 0009B308 2C 03 00 00 */ cmpwi r3, 0x0
/* 8009F4CC 0009B30C 40 82 00 14 */ bne lbl_8009F4E0
/* 8009F4D0 0009B310 93 B8 00 00 */ stw r29, 0x0(r24)
/* 8009F4D4 0009B314 48 00 00 4C */ b lbl_8009F520
/* 8009F4D8 0009B318 48 00 00 08 */ b lbl_8009F4E0
.global lbl_8009F4DC
lbl_8009F4DC:
/* 8009F4DC 0009B31C 7C 03 03 78 */ mr r3, r0
.global lbl_8009F4E0
lbl_8009F4E0:
/* 8009F4E0 0009B320 80 03 00 00 */ lwz r0, 0x0(r3)
/* 8009F4E4 0009B324 2C 00 00 00 */ cmpwi r0, 0x0
/* 8009F4E8 0009B328 40 82 FF F4 */ bne lbl_8009F4DC
/* 8009F4EC 0009B32C 93 A3 00 00 */ stw r29, 0x0(r3)
/* 8009F4F0 0009B330 48 00 00 30 */ b lbl_8009F520
.global lbl_8009F4F4
lbl_8009F4F4:
/* 8009F4F4 0009B334 80 7A 00 08 */ lwz r3, 0x8(r26)
/* 8009F4F8 0009B338 2C 03 00 00 */ cmpwi r3, 0x0
/* 8009F4FC 0009B33C 40 82 00 14 */ bne lbl_8009F510
/* 8009F500 0009B340 93 BA 00 08 */ stw r29, 0x8(r26)
/* 8009F504 0009B344 48 00 00 1C */ b lbl_8009F520
/* 8009F508 0009B348 48 00 00 08 */ b lbl_8009F510
.global lbl_8009F50C
lbl_8009F50C:
/* 8009F50C 0009B34C 7C 03 03 78 */ mr r3, r0
.global lbl_8009F510
lbl_8009F510:
/* 8009F510 0009B350 80 03 00 00 */ lwz r0, 0x0(r3)
/* 8009F514 0009B354 2C 00 00 00 */ cmpwi r0, 0x0
/* 8009F518 0009B358 40 82 FF F4 */ bne lbl_8009F50C
/* 8009F51C 0009B35C 93 A3 00 00 */ stw r29, 0x0(r3)
.global lbl_8009F520
lbl_8009F520:
/* 8009F520 0009B360 7E C3 B3 78 */ mr r3, r22
.global lbl_8009F524
lbl_8009F524:
/* 8009F524 0009B364 39 61 00 40 */ addi r11, r1, 0x40
/* 8009F528 0009B368 4B F6 7E 49 */ bl lbl_80007370
/* 8009F52C 0009B36C 80 01 00 44 */ lwz r0, 0x44(r1)
/* 8009F530 0009B370 7C 08 03 A6 */ mtlr r0
/* 8009F534 0009B374 38 21 00 40 */ addi r1, r1, 0x40
/* 8009F538 0009B378 4E 80 00 20 */ blr
.include "macros.inc"
.section .data, "wa" # 0x80421040 - 0x80496700 ; 0x000756C0
.global "@1493"
"@1493":
.4byte 0x53445020
.4byte 0x2D20556E
.4byte 0x6578702E
.4byte 0x20504455
.4byte 0x3A202564
.4byte 0x20696E20
.4byte 0x73746174
.4byte 0x653A2025
.4byte 0x64000000
.4byte 0
.global "@1510"
"@1510":
.4byte 0x53445020
.4byte 0x2D205263
.4byte 0x76642053
.4byte 0x65727669
.4byte 0x63655365
.4byte 0x61726368
.4byte 0x5273702C
.4byte 0x206E6F20
.4byte 0x6D617463
.4byte 0x68657300
.global "@1585"
"@1585":
.4byte 0x53445020
.4byte 0x2D205772
.4byte 0x6F6E6720
.4byte 0x74797065
.4byte 0x3A203078
.4byte 0x25303278
.4byte 0x20696E20
.4byte 0x61747472
.4byte 0x5F727370
.4byte 0
.4byte 0x53445020
.4byte 0x2D204261
.4byte 0x64206C65
.4byte 0x6E20696E
.4byte 0x20617474
.4byte 0x725F7273
.4byte 0x70202564
.4byte 0
.4byte 0x53445020
.4byte 0x2D204442
.4byte 0x2066756C
.4byte 0x6C000000
.4byte 0x53445020
.4byte 0x2D204261
.4byte 0x64207479
.4byte 0x70653A20
.4byte 0x30782530
.4byte 0x3278206F
.4byte 0x72206C65
.4byte 0x6E3A2025
.4byte 0x6420696E
.4byte 0x20617474
.4byte 0x725F7273
.4byte 0x70000000
.4byte 0x53445020
.4byte 0x2D206174
.4byte 0x7472206E
.4byte 0x65737469
.4byte 0x6E672074
.4byte 0x6F6F2064
.4byte 0x65657000
.4byte 0x53445020
.4byte 0x2D206261
.4byte 0x64206C65
.4byte 0x6E20696E
.4byte 0x20555549
.4byte 0x44206174
.4byte 0x74723A20
.4byte 0x25640000
.4byte 0x53445020
.4byte 0x2D206261
.4byte 0x64206C65
.4byte 0x6E20696E
.4byte 0x20626F6F
.4byte 0x6C65616E
.4byte 0x20617474
.4byte 0x723A2025
.4byte 0x64000000
.global "@1723"
"@1723":
.4byte lbl_8009F4A4
.4byte lbl_8009F070
.4byte lbl_8009F120
.4byte lbl_8009F1DC
.4byte lbl_8009F424
.4byte lbl_8009F454
.4byte lbl_8009F370
.4byte lbl_8009F370
.4byte lbl_8009F424
.4byte 0