	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function hci_remote_ext_features_evt
_hci_remote_ext_features_evt:           ## @hci_remote_ext_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	8(%rdi), %esi
	leaq	L_.str(%rip), %rdi
	callq	_BT_DBG
	movq	%r14, %rdi
	callq	_hci_dev_lock
	movl	20(%r15), %edi
	callq	___le16_to_cpu
	movq	%r14, %rdi
	movl	%eax, %esi
	callq	_hci_conn_hash_lookup_handle
	testq	%rax, %rax
	je	LBB0_14
## %bb.1:
	movq	%rax, %rbx
	cmpl	$0, 16(%r15)
	jne	LBB0_6
## %bb.2:
	cmpl	$1, (%r15)
	jne	LBB0_6
## %bb.3:
	movq	%rbx, %rsi
	addq	$32, %rsi
	movq	%r14, %rdi
	callq	_hci_inquiry_cache_lookup
	movq	8(%r15), %rcx
	testq	%rax, %rax
	je	LBB0_5
## %bb.4:
	movl	(%rcx), %edx
	andl	$1, %edx
	movl	%edx, (%rax)
LBB0_5:
	movl	(%rcx), %eax
	andl	$1, %eax
	movl	%eax, (%rbx)
LBB0_6:
	movq	8(%rbx), %rax
	movq	_BT_CONFIG@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_14
## %bb.7:
	movl	16(%r15), %esi
	testl	%esi, %esi
	je	LBB0_8
LBB0_13:
	movq	_BT_CONNECTED@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, 8(%rbx)
	movq	%rbx, %rdi
	callq	_hci_proto_connect_cfm
	movq	%rbx, %rdi
	callq	_hci_conn_put
LBB0_14:
	movq	%r14, %rdi
	callq	_hci_dev_unlock
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_8:
	cmpq	$0, (%r14)
	jle	LBB0_13
## %bb.9:
	cmpl	$0, (%rbx)
	jle	LBB0_13
## %bb.10:
	cmpq	$0, 24(%rbx)
	je	LBB0_13
## %bb.11:
	movq	16(%rbx), %rax
	movq	_BT_SECURITY_SDP@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_13
## %bb.12:
	movl	20(%r15), %eax
	movl	%eax, -32(%rbp)
	movq	_HCI_OP_AUTH_REQUESTED@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-32(%rbp), %rcx
	movq	%r14, %rdi
	movl	$4, %edx
	callq	_hci_send_cmd
	jmp	LBB0_14
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"%s"

	.comm	_BT_CONFIG,8,3                  ## @BT_CONFIG
	.comm	_BT_SECURITY_SDP,8,3            ## @BT_SECURITY_SDP
	.comm	_HCI_OP_AUTH_REQUESTED,4,2      ## @HCI_OP_AUTH_REQUESTED
	.comm	_BT_CONNECTED,8,3               ## @BT_CONNECTED
	.no_dead_strip	_hci_remote_ext_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_ext_features_evt
_hci_remote_ext_features_evt:           ; @hci_remote_ext_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, #8]
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, #20]
	bl	___le16_to_cpu
	mov	x1, x0
	mov	x0, x19
	bl	_hci_conn_hash_lookup_handle
	cbz	x0, LBB0_9
; %bb.1:
	mov	x20, x0
	ldr	w8, [x21, #16]
	cbnz	w8, LBB0_6
; %bb.2:
	ldr	w8, [x21]
	cmp	w8, #1
	b.ne	LBB0_6
; %bb.3:
	add	x1, x20, #32
	mov	x0, x19
	bl	_hci_inquiry_cache_lookup
	ldr	x8, [x21, #8]
	cbz	x0, LBB0_5
; %bb.4:
	ldr	w9, [x8]
	and	w9, w9, #0x1
	str	w9, [x0]
LBB0_5:
	ldr	w8, [x8]
	and	w8, w8, #0x1
	str	w8, [x20]
LBB0_6:
	ldr	x8, [x20, #8]
Lloh2:
	adrp	x9, _BT_CONFIG@GOTPAGE
Lloh3:
	ldr	x9, [x9, _BT_CONFIG@GOTPAGEOFF]
Lloh4:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_9
; %bb.7:
	ldr	w1, [x21, #16]
	cbz	w1, LBB0_10
LBB0_8:
Lloh5:
	adrp	x8, _BT_CONNECTED@GOTPAGE
Lloh6:
	ldr	x8, [x8, _BT_CONNECTED@GOTPAGEOFF]
Lloh7:
	ldr	x8, [x8]
	str	x8, [x20, #8]
	mov	x0, x20
	bl	_hci_proto_connect_cfm
	mov	x0, x20
	bl	_hci_conn_put
LBB0_9:
	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_10:
	ldr	x8, [x19]
	cmp	x8, #1
	b.lt	LBB0_8
; %bb.11:
	ldr	w8, [x20]
	cmp	w8, #1
	b.lt	LBB0_8
; %bb.12:
	ldr	x8, [x20, #24]
	cbz	x8, LBB0_8
; %bb.13:
	ldr	x8, [x20, #16]
Lloh8:
	adrp	x9, _BT_SECURITY_SDP@GOTPAGE
Lloh9:
	ldr	x9, [x9, _BT_SECURITY_SDP@GOTPAGEOFF]
Lloh10:
	ldr	x9, [x9]
	cmp	x8, x9
	b.eq	LBB0_8
; %bb.14:
	ldr	w8, [x21, #20]
	str	w8, [sp, #8]
Lloh11:
	adrp	x8, _HCI_OP_AUTH_REQUESTED@GOTPAGE
Lloh12:
	ldr	x8, [x8, _HCI_OP_AUTH_REQUESTED@GOTPAGEOFF]
Lloh13:
	ldr	w1, [x8]
	add	x3, sp, #8
	mov	x0, x19
	mov	w2, #4
	bl	_hci_send_cmd
	b	LBB0_9
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"%s"

	.comm	_BT_CONFIG,8,3                  ; @BT_CONFIG
	.comm	_BT_SECURITY_SDP,8,3            ; @BT_SECURITY_SDP
	.comm	_HCI_OP_AUTH_REQUESTED,4,2      ; @HCI_OP_AUTH_REQUESTED
	.comm	_BT_CONNECTED,8,3               ; @BT_CONNECTED
	.no_dead_strip	_hci_remote_ext_features_evt
.subsections_via_symbols
