	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function hci_conn_request_evt
_hci_conn_request_evt:                  ## @hci_conn_request_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	%r12
	pushq	%rbx
	subq	$64, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r14
	movq	(%rsi), %rbx
	movl	(%rdi), %r12d
	movl	8(%rdi), %r15d
	movq	%rbx, %rdi
	callq	_batostr
	movl	4(%rbx), %ecx
	leaq	L_.str(%rip), %rdi
	movl	%r15d, %esi
	movl	%eax, %edx
	callq	_BT_DBG
	movl	4(%rbx), %edx
	movq	%r14, %rdi
	movq	%rbx, %rsi
	callq	_hci_proto_connect_ind
	movl	%eax, %r15d
	orl	%r12d, %r15d
	movq	_HCI_LM_ACCEPT@GOTPCREL(%rip), %rax
	testl	%r15d, (%rax)
	je	LBB0_8
## %bb.1:
	movq	%r14, %rdi
	callq	_hci_dev_lock
	movq	%r14, %rdi
	movq	%rbx, %rsi
	callq	_hci_inquiry_cache_lookup
	testq	%rax, %rax
	je	LBB0_3
## %bb.2:
	movl	(%rax), %edi
	movl	8(%rbx), %esi
	movl	$3, %edx
	callq	_memcpy
LBB0_3:
	movl	4(%rbx), %esi
	movq	%r14, %rdi
	movq	%rbx, %rdx
	callq	_hci_conn_hash_lookup_ba
	movq	%rax, %r12
	testq	%rax, %rax
	jne	LBB0_5
## %bb.4:
	movl	4(%rbx), %esi
	movq	%r14, %rdi
	movq	%rbx, %rdx
	callq	_hci_conn_add
	movq	%rax, %r12
	testq	%rax, %rax
	je	LBB0_15
LBB0_5:
	movl	8(%r12), %edi
	movl	8(%rbx), %esi
	movl	$3, %edx
	callq	_memcpy
	movq	_BT_CONNECT@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 4(%r12)
	movq	%r14, %rdi
	callq	_hci_dev_unlock
	movl	4(%rbx), %eax
	movq	_ACL_LINK@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	je	LBB0_9
## %bb.6:
	movq	%r14, %rdi
	callq	_lmp_esco_capable
	testl	%eax, %eax
	je	LBB0_9
## %bb.7:
	leaq	-76(%rbp), %rdi
	movq	%rbx, %rsi
	callq	_bacpy
	movl	(%r12), %edi
	callq	_cpu_to_le16
	movq	%rax, -40(%rbp)
	movl	$8000, %edi                     ## imm = 0x1F40
	callq	_cpu_to_le32
	movq	%rax, -48(%rbp)
	movl	$8000, %edi                     ## imm = 0x1F40
	callq	_cpu_to_le32
	movq	%rax, -56(%rbp)
	movl	$65535, %edi                    ## imm = 0xFFFF
	callq	_cpu_to_le16
	movq	%rax, -64(%rbp)
	movl	4(%r14), %edi
	callq	_cpu_to_le16
	movq	%rax, -72(%rbp)
	movl	$255, -84(%rbp)
	movq	_HCI_OP_ACCEPT_SYNC_CONN_REQ@GOTPCREL(%rip), %rax
	jmp	LBB0_14
LBB0_8:
	leaq	-76(%rbp), %rdi
	movq	%rbx, %rsi
	callq	_bacpy
	movl	$15, -80(%rbp)
	movq	_HCI_OP_REJECT_CONN_REQ@GOTPCREL(%rip), %rax
	jmp	LBB0_14
LBB0_9:
	leaq	-76(%rbp), %rdi
	movq	%rbx, %rsi
	callq	_bacpy
	movq	%r14, %rdi
	callq	_lmp_rswitch_capable
	testq	%rax, %rax
	je	LBB0_12
## %bb.10:
	movq	_HCI_LM_MASTER@GOTPCREL(%rip), %rax
	testl	%r15d, (%rax)
	je	LBB0_12
## %bb.11:
	movl	$0, -88(%rbp)
	jmp	LBB0_13
LBB0_12:
	movl	$1, -88(%rbp)
LBB0_13:
	movq	_HCI_OP_ACCEPT_CONN_REQ@GOTPCREL(%rip), %rax
LBB0_14:
	movl	(%rax), %esi
	leaq	-88(%rbp), %rcx
	movq	%r14, %rdi
	movl	$56, %edx
	callq	_hci_send_cmd
	addq	$64, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_15:
	leaq	L_.str.1(%rip), %rdi
	callq	_BT_ERR
	movq	%r14, %rdi
	addq	$64, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_hci_dev_unlock                 ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"%s bdaddr %s type 0x%x"

	.comm	_HCI_LM_ACCEPT,4,2              ## @HCI_LM_ACCEPT
L_.str.1:                               ## @.str.1
	.asciz	"No memmory for new connection"

	.comm	_BT_CONNECT,4,2                 ## @BT_CONNECT
	.comm	_ACL_LINK,4,2                   ## @ACL_LINK
	.comm	_HCI_LM_MASTER,4,2              ## @HCI_LM_MASTER
	.comm	_HCI_OP_ACCEPT_CONN_REQ,4,2     ## @HCI_OP_ACCEPT_CONN_REQ
	.comm	_HCI_OP_ACCEPT_SYNC_CONN_REQ,4,2 ## @HCI_OP_ACCEPT_SYNC_CONN_REQ
	.comm	_HCI_OP_REJECT_CONN_REQ,4,2     ## @HCI_OP_REJECT_CONN_REQ
	.no_dead_strip	_hci_conn_request_evt
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function hci_conn_request_evt
_hci_conn_request_evt:                  ; @hci_conn_request_evt
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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	x20, [x1]
	ldr	w22, [x0]
	ldr	w21, [x0, #8]
	mov	x0, x20
	bl	_batostr
	mov	x2, x0
	ldr	w3, [x20, #4]
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x21
	bl	_BT_DBG
	ldr	w2, [x20, #4]
	mov	x0, x19
	mov	x1, x20
	bl	_hci_proto_connect_ind
	orr	w22, w0, w22
Lloh2:
	adrp	x8, _HCI_LM_ACCEPT@GOTPAGE
Lloh3:
	ldr	x8, [x8, _HCI_LM_ACCEPT@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	tst	w22, w8
	b.eq	LBB0_8
; %bb.1:
	mov	x0, x19
	bl	_hci_dev_lock
	mov	x0, x19
	mov	x1, x20
	bl	_hci_inquiry_cache_lookup
	cbz	x0, LBB0_3
; %bb.2:
	ldr	w0, [x0]
	ldr	w1, [x20, #8]
	mov	w2, #3
	bl	_memcpy
LBB0_3:
	ldr	w1, [x20, #4]
	mov	x0, x19
	mov	x2, x20
	bl	_hci_conn_hash_lookup_ba
	mov	x21, x0
	cbnz	x0, LBB0_5
; %bb.4:
	ldr	w1, [x20, #4]
	mov	x0, x19
	mov	x2, x20
	bl	_hci_conn_add
	mov	x21, x0
	cbz	x0, LBB0_15
LBB0_5:
	ldr	w0, [x21, #8]
	ldr	w1, [x20, #8]
	mov	w2, #3
	bl	_memcpy
Lloh5:
	adrp	x8, _BT_CONNECT@GOTPAGE
Lloh6:
	ldr	x8, [x8, _BT_CONNECT@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
	str	w8, [x21, #4]
	mov	x0, x19
	bl	_hci_dev_unlock
	ldr	w8, [x20, #4]
Lloh8:
	adrp	x9, _ACL_LINK@GOTPAGE
Lloh9:
	ldr	x9, [x9, _ACL_LINK@GOTPAGEOFF]
Lloh10:
	ldr	w9, [x9]
	cmp	w8, w9
	b.eq	LBB0_9
; %bb.6:
	mov	x0, x19
	bl	_lmp_esco_capable
	cbz	w0, LBB0_9
; %bb.7:
	add	x8, sp, #8
	add	x0, x8, #12
	mov	x1, x20
	bl	_bacpy
	ldr	w0, [x21]
	bl	_cpu_to_le16
	str	x0, [sp, #56]
	mov	w0, #8000
	bl	_cpu_to_le32
	str	x0, [sp, #48]
	mov	w0, #8000
	bl	_cpu_to_le32
	str	x0, [sp, #40]
	mov	w0, #65535
	bl	_cpu_to_le16
	str	x0, [sp, #32]
	ldr	w0, [x19, #4]
	bl	_cpu_to_le16
	str	x0, [sp, #24]
	mov	w8, #255
	str	w8, [sp, #12]
Lloh11:
	adrp	x8, _HCI_OP_ACCEPT_SYNC_CONN_REQ@GOTPAGE
Lloh12:
	ldr	x8, [x8, _HCI_OP_ACCEPT_SYNC_CONN_REQ@GOTPAGEOFF]
	b	LBB0_14
LBB0_8:
	add	x8, sp, #8
	add	x0, x8, #12
	mov	x1, x20
	bl	_bacpy
	mov	w8, #15
	str	w8, [sp, #16]
Lloh13:
	adrp	x8, _HCI_OP_REJECT_CONN_REQ@GOTPAGE
Lloh14:
	ldr	x8, [x8, _HCI_OP_REJECT_CONN_REQ@GOTPAGEOFF]
	b	LBB0_14
LBB0_9:
	add	x8, sp, #8
	add	x0, x8, #12
	mov	x1, x20
	bl	_bacpy
	mov	x0, x19
	bl	_lmp_rswitch_capable
	cbz	x0, LBB0_12
; %bb.10:
Lloh15:
	adrp	x8, _HCI_LM_MASTER@GOTPAGE
Lloh16:
	ldr	x8, [x8, _HCI_LM_MASTER@GOTPAGEOFF]
Lloh17:
	ldr	w8, [x8]
	tst	w8, w22
	b.eq	LBB0_12
; %bb.11:
	str	wzr, [sp, #8]
	b	LBB0_13
LBB0_12:
	mov	w8, #1
	str	w8, [sp, #8]
LBB0_13:
Lloh18:
	adrp	x8, _HCI_OP_ACCEPT_CONN_REQ@GOTPAGE
Lloh19:
	ldr	x8, [x8, _HCI_OP_ACCEPT_CONN_REQ@GOTPAGEOFF]
LBB0_14:
	ldr	w1, [x8]
	add	x3, sp, #8
	mov	x0, x19
	mov	w2, #56
	bl	_hci_send_cmd
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
LBB0_15:
Lloh20:
	adrp	x0, l_.str.1@PAGE
Lloh21:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_BT_ERR
	mov	x0, x19
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	add	sp, sp, #112
	b	_hci_dev_unlock
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGot	Lloh18, Lloh19
	.loh AdrpAdd	Lloh20, Lloh21
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"%s bdaddr %s type 0x%x"

	.comm	_HCI_LM_ACCEPT,4,2              ; @HCI_LM_ACCEPT
l_.str.1:                               ; @.str.1
	.asciz	"No memmory for new connection"

	.comm	_BT_CONNECT,4,2                 ; @BT_CONNECT
	.comm	_ACL_LINK,4,2                   ; @ACL_LINK
	.comm	_HCI_LM_MASTER,4,2              ; @HCI_LM_MASTER
	.comm	_HCI_OP_ACCEPT_CONN_REQ,4,2     ; @HCI_OP_ACCEPT_CONN_REQ
	.comm	_HCI_OP_ACCEPT_SYNC_CONN_REQ,4,2 ; @HCI_OP_ACCEPT_SYNC_CONN_REQ
	.comm	_HCI_OP_REJECT_CONN_REQ,4,2     ; @HCI_OP_REJECT_CONN_REQ
	.no_dead_strip	_hci_conn_request_evt
.subsections_via_symbols
