	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function hci_remote_features_evt
_hci_remote_features_evt:               ## @hci_remote_features_evt
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r14
	movq	(%rsi), %r15
	movl	12(%rdi), %esi
	movl	(%r15), %edx
	leaq	L_.str(%rip), %rdi
	callq	_BT_DBG
	movq	%r14, %rdi
	callq	_hci_dev_lock
	movl	4(%r15), %edi
	callq	___le16_to_cpu
	movq	%r14, %rdi
	movl	%eax, %esi
	callq	_hci_conn_hash_lookup_handle
	testq	%rax, %rax
	je	LBB0_9
## %bb.1:
	movq	%rax, %rbx
	cmpl	$0, (%r15)
	jne	LBB0_3
## %bb.2:
	movl	8(%rbx), %edi
	movl	8(%r15), %esi
	movl	$8, %edx
	callq	_memcpy
LBB0_3:
	movq	(%rbx), %rax
	movq	_BT_CONFIG@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_9
## %bb.4:
	cmpl	$0, (%r15)
	je	LBB0_5
LBB0_8:
	movq	_BT_CONNECTED@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, (%rbx)
	movl	(%r15), %esi
	movq	%rbx, %rdi
	callq	_hci_proto_connect_cfm
	movq	%rbx, %rdi
	callq	_hci_conn_put
LBB0_9:
	movq	%r14, %rdi
	callq	_hci_dev_unlock
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_5:
	movq	%r14, %rdi
	callq	_lmp_ssp_capable
	testq	%rax, %rax
	je	LBB0_8
## %bb.6:
	movq	%rbx, %rdi
	callq	_lmp_ssp_capable
	testq	%rax, %rax
	je	LBB0_8
## %bb.7:
	movl	4(%r15), %eax
	movl	%eax, -28(%rbp)
	movl	$1, -32(%rbp)
	movq	_HCI_OP_READ_REMOTE_EXT_FEATURES@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-32(%rbp), %rcx
	movq	%r14, %rdi
	movl	$8, %edx
	callq	_hci_send_cmd
	jmp	LBB0_9
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"%s status %d"

	.comm	_BT_CONFIG,8,3                  ## @BT_CONFIG
	.comm	_HCI_OP_READ_REMOTE_EXT_FEATURES,4,2 ## @HCI_OP_READ_REMOTE_EXT_FEATURES
	.comm	_BT_CONNECTED,8,3               ## @BT_CONNECTED
	.no_dead_strip	_hci_remote_features_evt
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function hci_remote_features_evt
_hci_remote_features_evt:               ; @hci_remote_features_evt
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.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
	mov	x19, x0
	ldr	x21, [x1]
	ldr	w1, [x0, #12]
	ldr	w2, [x21]
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	bl	_BT_DBG
	mov	x0, x19
	bl	_hci_dev_lock
	ldr	w0, [x21, #4]
	bl	___le16_to_cpu
	mov	x1, x0
	mov	x0, x19
	bl	_hci_conn_hash_lookup_handle
	cbz	x0, LBB0_6
; %bb.1:
	mov	x20, x0
	ldr	w8, [x21]
	cbnz	w8, LBB0_3
; %bb.2:
	ldr	w0, [x20, #8]
	ldr	w1, [x21, #8]
	mov	w2, #8
	bl	_memcpy
LBB0_3:
	ldr	x8, [x20]
Lloh2:
	adrp	x9, _BT_CONFIG@GOTPAGE
Lloh3:
	ldr	x9, [x9, _BT_CONFIG@GOTPAGEOFF]
Lloh4:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_6
; %bb.4:
	ldr	w8, [x21]
	cbz	w8, LBB0_7
LBB0_5:
Lloh5:
	adrp	x8, _BT_CONNECTED@GOTPAGE
Lloh6:
	ldr	x8, [x8, _BT_CONNECTED@GOTPAGEOFF]
Lloh7:
	ldr	x8, [x8]
	str	x8, [x20]
	ldr	w1, [x21]
	mov	x0, x20
	bl	_hci_proto_connect_cfm
	mov	x0, x20
	bl	_hci_conn_put
LBB0_6:
	mov	x0, x19
	bl	_hci_dev_unlock
	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
	add	sp, sp, #64
	ret
LBB0_7:
	mov	x0, x19
	bl	_lmp_ssp_capable
	cbz	x0, LBB0_5
; %bb.8:
	mov	x0, x20
	bl	_lmp_ssp_capable
	cbz	x0, LBB0_5
; %bb.9:
	ldr	w8, [x21, #4]
	mov	w9, #1
	stp	w9, w8, [sp, #8]
Lloh8:
	adrp	x8, _HCI_OP_READ_REMOTE_EXT_FEATURES@GOTPAGE
Lloh9:
	ldr	x8, [x8, _HCI_OP_READ_REMOTE_EXT_FEATURES@GOTPAGEOFF]
Lloh10:
	ldr	w1, [x8]
	add	x3, sp, #8
	mov	x0, x19
	mov	w2, #8
	bl	_hci_send_cmd
	b	LBB0_6
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"%s status %d"

	.comm	_BT_CONFIG,8,3                  ; @BT_CONFIG
	.comm	_HCI_OP_READ_REMOTE_EXT_FEATURES,4,2 ; @HCI_OP_READ_REMOTE_EXT_FEATURES
	.comm	_BT_CONNECTED,8,3               ; @BT_CONNECTED
	.no_dead_strip	_hci_remote_features_evt
.subsections_via_symbols
