	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_hci_conn_enter_sniff_mode      ## -- Begin function hci_conn_enter_sniff_mode
	.p2align	4, 0x90
_hci_conn_enter_sniff_mode:             ## @hci_conn_enter_sniff_mode
	.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
	subq	$64, %rsp
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rdi, %rbx
	movq	(%rdi), %rdx
	movq	32(%rdi), %r14
	leaq	L_.str(%rip), %rdi
	movq	%rbx, %rsi
	callq	_BT_DBG
	movq	_HCI_RAW@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	28(%r14), %rsi
	callq	_test_bit
	testq	%rax, %rax
	je	LBB0_1
LBB0_10:
	addq	$64, %rsp
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
LBB0_1:
	movq	%r14, %rdi
	callq	_lmp_sniff_capable
	testl	%eax, %eax
	je	LBB0_10
## %bb.2:
	movq	%rbx, %rdi
	callq	_lmp_sniff_capable
	testl	%eax, %eax
	je	LBB0_10
## %bb.3:
	movq	(%rbx), %rax
	movq	_HCI_CM_ACTIVE@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_10
## %bb.4:
	movq	_HCI_LP_SNIFF@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, 8(%rbx)
	je	LBB0_10
## %bb.5:
	movq	%r14, %rdi
	callq	_lmp_sniffsubr_capable
	testq	%rax, %rax
	je	LBB0_8
## %bb.6:
	movq	%rbx, %rdi
	callq	_lmp_sniffsubr_capable
	testq	%rax, %rax
	je	LBB0_8
## %bb.7:
	movl	12(%rbx), %edi
	callq	_cpu_to_le16
	movq	%rax, -48(%rbp)
	xorl	%edi, %edi
	callq	_cpu_to_le16
	movq	%rax, -24(%rbp)
	xorl	%edi, %edi
	callq	_cpu_to_le16
	movq	%rax, -32(%rbp)
	xorl	%edi, %edi
	callq	_cpu_to_le16
	movq	%rax, -40(%rbp)
	movq	_HCI_OP_SNIFF_SUBRATE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-80(%rbp), %rcx
	movq	%r14, %rdi
	movl	$64, %edx
	callq	_hci_send_cmd
LBB0_8:
	movq	_HCI_CONN_MODE_CHANGE_PEND@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	24(%rbx), %rsi
	callq	_test_and_set_bit
	testl	%eax, %eax
	jne	LBB0_10
## %bb.9:
	movl	12(%rbx), %edi
	callq	_cpu_to_le16
	movq	%rax, -48(%rbp)
	movl	16(%r14), %edi
	callq	_cpu_to_le16
	movq	%rax, -56(%rbp)
	movl	20(%r14), %edi
	callq	_cpu_to_le16
	movq	%rax, -64(%rbp)
	movl	$4, %edi
	callq	_cpu_to_le16
	movq	%rax, -72(%rbp)
	movl	$1, %edi
	callq	_cpu_to_le16
	movq	%rax, -80(%rbp)
	movq	_HCI_OP_SNIFF_MODE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-80(%rbp), %rcx
	movq	%r14, %rdi
	movl	$64, %edx
	callq	_hci_send_cmd
	jmp	LBB0_10
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"conn %p mode %d"

	.comm	_HCI_RAW,4,2                    ## @HCI_RAW
	.comm	_HCI_CM_ACTIVE,8,3              ## @HCI_CM_ACTIVE
	.comm	_HCI_LP_SNIFF,4,2               ## @HCI_LP_SNIFF
	.comm	_HCI_OP_SNIFF_SUBRATE,4,2       ## @HCI_OP_SNIFF_SUBRATE
	.comm	_HCI_CONN_MODE_CHANGE_PEND,4,2  ## @HCI_CONN_MODE_CHANGE_PEND
	.comm	_HCI_OP_SNIFF_MODE,4,2          ## @HCI_OP_SNIFF_MODE
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_hci_conn_enter_sniff_mode      ; -- Begin function hci_conn_enter_sniff_mode
	.p2align	2
_hci_conn_enter_sniff_mode:             ; @hci_conn_enter_sniff_mode
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x20, x0
	ldr	x19, [x0, #32]
	ldr	x2, [x0]
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x20
	bl	_BT_DBG
Lloh2:
	adrp	x8, _HCI_RAW@GOTPAGE
Lloh3:
	ldr	x8, [x8, _HCI_RAW@GOTPAGEOFF]
Lloh4:
	ldr	w0, [x8]
	add	x1, x19, #28
	bl	_test_bit
	cbz	x0, LBB0_2
LBB0_1:
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	add	sp, sp, #96
	ret
LBB0_2:
	mov	x0, x19
	bl	_lmp_sniff_capable
	cbz	w0, LBB0_1
; %bb.3:
	mov	x0, x20
	bl	_lmp_sniff_capable
	cbz	w0, LBB0_1
; %bb.4:
	ldr	x8, [x20]
Lloh5:
	adrp	x9, _HCI_CM_ACTIVE@GOTPAGE
Lloh6:
	ldr	x9, [x9, _HCI_CM_ACTIVE@GOTPAGEOFF]
Lloh7:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_1
; %bb.5:
	ldr	w8, [x20, #8]
Lloh8:
	adrp	x9, _HCI_LP_SNIFF@GOTPAGE
Lloh9:
	ldr	x9, [x9, _HCI_LP_SNIFF@GOTPAGEOFF]
Lloh10:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_1
; %bb.6:
	mov	x0, x19
	bl	_lmp_sniffsubr_capable
	cbz	x0, LBB0_9
; %bb.7:
	mov	x0, x20
	bl	_lmp_sniffsubr_capable
	cbz	x0, LBB0_9
; %bb.8:
	ldr	w0, [x20, #12]
	bl	_cpu_to_le16
	str	x0, [sp, #32]
	mov	w0, #0
	bl	_cpu_to_le16
	str	x0, [sp, #56]
	mov	w0, #0
	bl	_cpu_to_le16
	str	x0, [sp, #48]
	mov	w0, #0
	bl	_cpu_to_le16
	str	x0, [sp, #40]
Lloh11:
	adrp	x8, _HCI_OP_SNIFF_SUBRATE@GOTPAGE
Lloh12:
	ldr	x8, [x8, _HCI_OP_SNIFF_SUBRATE@GOTPAGEOFF]
Lloh13:
	ldr	w1, [x8]
	mov	x3, sp
	mov	x0, x19
	mov	w2, #64
	bl	_hci_send_cmd
LBB0_9:
Lloh14:
	adrp	x8, _HCI_CONN_MODE_CHANGE_PEND@GOTPAGE
Lloh15:
	ldr	x8, [x8, _HCI_CONN_MODE_CHANGE_PEND@GOTPAGEOFF]
Lloh16:
	ldr	w0, [x8]
	add	x1, x20, #24
	bl	_test_and_set_bit
	cbnz	w0, LBB0_1
; %bb.10:
	ldr	w0, [x20, #12]
	bl	_cpu_to_le16
	str	x0, [sp, #32]
	ldr	w0, [x19, #16]
	bl	_cpu_to_le16
	str	x0, [sp, #24]
	ldr	w0, [x19, #20]
	bl	_cpu_to_le16
	str	x0, [sp, #16]
	mov	w0, #4
	bl	_cpu_to_le16
	str	x0, [sp, #8]
	mov	w0, #1
	bl	_cpu_to_le16
	str	x0, [sp]
Lloh17:
	adrp	x8, _HCI_OP_SNIFF_MODE@GOTPAGE
Lloh18:
	ldr	x8, [x8, _HCI_OP_SNIFF_MODE@GOTPAGEOFF]
Lloh19:
	ldr	w1, [x8]
	mov	x3, sp
	mov	x0, x19
	mov	w2, #64
	bl	_hci_send_cmd
	b	LBB0_1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"conn %p mode %d"

	.comm	_HCI_RAW,4,2                    ; @HCI_RAW
	.comm	_HCI_CM_ACTIVE,8,3              ; @HCI_CM_ACTIVE
	.comm	_HCI_LP_SNIFF,4,2               ; @HCI_LP_SNIFF
	.comm	_HCI_OP_SNIFF_SUBRATE,4,2       ; @HCI_OP_SNIFF_SUBRATE
	.comm	_HCI_CONN_MODE_CHANGE_PEND,4,2  ; @HCI_CONN_MODE_CHANGE_PEND
	.comm	_HCI_OP_SNIFF_MODE,4,2          ; @HCI_OP_SNIFF_MODE
.subsections_via_symbols
