	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function hci_cc_role_discovery
_hci_cc_role_discovery:                 ## @hci_cc_role_discovery
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rdi, %r14
	movq	(%rsi), %rbx
	movl	(%rdi), %esi
	movq	16(%rbx), %rdx
	leaq	L_.str(%rip), %rdi
	callq	_BT_DBG
	cmpq	$0, 16(%rbx)
	je	LBB0_1
## %bb.6:
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
LBB0_1:
	movq	%r14, %rdi
	callq	_hci_dev_lock
	movl	8(%rbx), %edi
	callq	___le16_to_cpu
	movq	%r14, %rdi
	movl	%eax, %esi
	callq	_hci_conn_hash_lookup_handle
	testq	%rax, %rax
	je	LBB0_5
## %bb.2:
	cmpq	$0, (%rbx)
	movq	_HCI_LM_MASTER@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	je	LBB0_4
## %bb.3:
	notl	%ecx
	andl	%ecx, (%rax)
	jmp	LBB0_5
LBB0_4:
	orl	%ecx, (%rax)
LBB0_5:
	movq	%r14, %rdi
	popq	%rbx
	popq	%r14
	popq	%rbp
	jmp	_hci_dev_unlock                 ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"%s status 0x%x"

	.comm	_HCI_LM_MASTER,4,2              ## @HCI_LM_MASTER
	.no_dead_strip	_hci_cc_role_discovery
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function hci_cc_role_discovery
_hci_cc_role_discovery:                 ; @hci_cc_role_discovery
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x0
	ldr	x20, [x1]
	ldr	w1, [x0]
	ldr	x2, [x20, #16]
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	bl	_BT_DBG
	ldr	x8, [x20, #16]
	cbz	x8, LBB0_2
; %bb.1:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
LBB0_2:
	mov	x0, x19
	bl	_hci_dev_lock
	ldr	w0, [x20, #8]
	bl	___le16_to_cpu
	mov	x1, x0
	mov	x0, x19
	bl	_hci_conn_hash_lookup_handle
	cbz	x0, LBB0_7
; %bb.3:
	ldr	x9, [x20]
Lloh2:
	adrp	x8, _HCI_LM_MASTER@GOTPAGE
Lloh3:
	ldr	x8, [x8, _HCI_LM_MASTER@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	cbz	x9, LBB0_5
; %bb.4:
	ldr	w9, [x0]
	bic	w8, w9, w8
	b	LBB0_6
LBB0_5:
	ldr	w9, [x0]
	orr	w8, w9, w8
LBB0_6:
	str	w8, [x0]
LBB0_7:
	mov	x0, x19
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_hci_dev_unlock
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"%s status 0x%x"

	.comm	_HCI_LM_MASTER,4,2              ; @HCI_LM_MASTER
	.no_dead_strip	_hci_cc_role_discovery
.subsections_via_symbols
