	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function hci_cc_write_scan_enable
_hci_cc_write_scan_enable:              ## @hci_cc_write_scan_enable
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r15
	pushq	%r14
	pushq	%r13
	pushq	%r12
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	movq	(%rsi), %rax
	movl	(%rax), %r14d
	movl	4(%rdi), %esi
	leaq	L_.str(%rip), %rdi
	movl	%r14d, %edx
	callq	_BT_DBG
	movq	_HCI_OP_WRITE_SCAN_ENABLE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_hci_sent_cmd_data
	testq	%rax, %rax
	je	LBB0_7
## %bb.1:
	testl	%r14d, %r14d
	jne	LBB0_6
## %bb.2:
	movl	(%rax), %r12d
	movq	_HCI_PSCAN@GOTPCREL(%rip), %r15
	movl	(%r15), %edi
	movq	%rbx, %rsi
	callq	_clear_bit
	movq	_HCI_ISCAN@GOTPCREL(%rip), %r13
	movl	(%r13), %edi
	movq	%rbx, %rsi
	callq	_clear_bit
	movq	_SCAN_INQUIRY@GOTPCREL(%rip), %rax
	testl	%r12d, (%rax)
	je	LBB0_4
## %bb.3:
	movl	(%r13), %edi
	movq	%rbx, %rsi
	callq	_set_bit
LBB0_4:
	movq	_SCAN_PAGE@GOTPCREL(%rip), %rax
	testl	%r12d, (%rax)
	je	LBB0_6
## %bb.5:
	movl	(%r15), %edi
	movq	%rbx, %rsi
	callq	_set_bit
LBB0_6:
	movq	%rbx, %rdi
	movl	%r14d, %esi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_hci_req_complete               ## TAILCALL
LBB0_7:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"%s status 0x%x"

	.comm	_HCI_OP_WRITE_SCAN_ENABLE,4,2   ## @HCI_OP_WRITE_SCAN_ENABLE
	.comm	_HCI_PSCAN,4,2                  ## @HCI_PSCAN
	.comm	_HCI_ISCAN,4,2                  ## @HCI_ISCAN
	.comm	_SCAN_INQUIRY,4,2               ## @SCAN_INQUIRY
	.comm	_SCAN_PAGE,4,2                  ## @SCAN_PAGE
	.no_dead_strip	_hci_cc_write_scan_enable
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function hci_cc_write_scan_enable
_hci_cc_write_scan_enable:              ; @hci_cc_write_scan_enable
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	.cfi_offset w21, -40
	.cfi_offset w22, -48
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x19, x0
	ldr	x8, [x1]
	ldr	w20, [x8]
	ldr	w1, [x0, #4]
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	mov	x2, x20
	bl	_BT_DBG
Lloh2:
	adrp	x8, _HCI_OP_WRITE_SCAN_ENABLE@GOTPAGE
Lloh3:
	ldr	x8, [x8, _HCI_OP_WRITE_SCAN_ENABLE@GOTPAGEOFF]
Lloh4:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_hci_sent_cmd_data
	cbz	x0, LBB0_7
; %bb.1:
	cbnz	w20, LBB0_6
; %bb.2:
	ldr	w22, [x0]
Lloh5:
	adrp	x21, _HCI_PSCAN@GOTPAGE
Lloh6:
	ldr	x21, [x21, _HCI_PSCAN@GOTPAGEOFF]
	ldr	w0, [x21]
	mov	x1, x19
	bl	_clear_bit
Lloh7:
	adrp	x23, _HCI_ISCAN@GOTPAGE
Lloh8:
	ldr	x23, [x23, _HCI_ISCAN@GOTPAGEOFF]
	ldr	w0, [x23]
	mov	x1, x19
	bl	_clear_bit
Lloh9:
	adrp	x8, _SCAN_INQUIRY@GOTPAGE
Lloh10:
	ldr	x8, [x8, _SCAN_INQUIRY@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
	tst	w8, w22
	b.eq	LBB0_4
; %bb.3:
	ldr	w0, [x23]
	mov	x1, x19
	bl	_set_bit
LBB0_4:
Lloh12:
	adrp	x8, _SCAN_PAGE@GOTPAGE
Lloh13:
	ldr	x8, [x8, _SCAN_PAGE@GOTPAGEOFF]
Lloh14:
	ldr	w8, [x8]
	tst	w8, w22
	b.eq	LBB0_6
; %bb.5:
	ldr	w0, [x21]
	mov	x1, x19
	bl	_set_bit
LBB0_6:
	mov	x0, x19
	mov	x1, x20
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	b	_hci_req_complete
LBB0_7:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"%s status 0x%x"

	.comm	_HCI_OP_WRITE_SCAN_ENABLE,4,2   ; @HCI_OP_WRITE_SCAN_ENABLE
	.comm	_HCI_PSCAN,4,2                  ; @HCI_PSCAN
	.comm	_HCI_ISCAN,4,2                  ; @HCI_ISCAN
	.comm	_SCAN_INQUIRY,4,2               ; @SCAN_INQUIRY
	.comm	_SCAN_PAGE,4,2                  ; @SCAN_PAGE
	.no_dead_strip	_hci_cc_write_scan_enable
.subsections_via_symbols
