	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_hci_connect                    ## -- Begin function hci_connect
	.p2align	4, 0x90
_hci_connect:                           ## @hci_connect
	.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
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%r8, -56(%rbp)                  ## 8-byte Spill
	movq	%rcx, -48(%rbp)                 ## 8-byte Spill
	movq	%rdx, %r15
	movl	%esi, %r12d
	movq	%rdi, %r14
	movl	(%rdi), %ebx
	movq	%rdx, %rdi
	callq	_batostr
	leaq	L_.str(%rip), %rdi
	movl	%ebx, %esi
	movl	%eax, %edx
	callq	_BT_DBG
	movq	_ACL_LINK@GOTPCREL(%rip), %r13
	movl	(%r13), %esi
	movq	%r14, %rdi
	movq	%r15, %rdx
	callq	_hci_conn_hash_lookup_ba
	movq	%rax, %rbx
	testq	%rax, %rax
	jne	LBB0_3
## %bb.1:
	movl	(%r13), %esi
	movq	%r14, %rdi
	movq	%r15, %rdx
	callq	_hci_conn_add
	movq	%rax, %rbx
	testq	%rax, %rax
	je	LBB0_2
LBB0_3:
	movq	%rbx, %rdi
	callq	_hci_conn_hold
	movq	(%rbx), %rax
	movq	_BT_OPEN@GOTPCREL(%rip), %rdx
	movq	_BT_CLOSED@GOTPCREL(%rip), %rcx
	cmpq	(%rdx), %rax
	je	LBB0_5
## %bb.4:
	cmpq	(%rcx), %rax
	je	LBB0_5
## %bb.6:
	cmpl	%r12d, (%r13)
	jne	LBB0_8
LBB0_7:
	movq	%rbx, %r13
	jmp	LBB0_17
LBB0_5:
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movq	%rax, 32(%rbx)
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movq	%rax, 24(%rbx)
	movq	%rbx, %rdi
	callq	_hci_acl_connect
	cmpl	%r12d, (%r13)
	je	LBB0_7
LBB0_8:
	movq	%r14, %rdi
	movl	%r12d, %esi
	movq	%r15, %rdx
	callq	_hci_conn_hash_lookup_ba
	movq	%rax, %r13
	testq	%rax, %rax
	jne	LBB0_11
## %bb.9:
	movq	%r14, %rdi
	movl	%r12d, %esi
	movq	%r15, %rdx
	callq	_hci_conn_add
	movq	%rax, %r13
	testq	%rax, %rax
	je	LBB0_10
LBB0_11:
	movq	%r13, 16(%rbx)
	movq	%rbx, 16(%r13)
	movq	%r13, %rdi
	callq	_hci_conn_hold
	movq	(%rbx), %rax
	movq	_BT_CONNECTED@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_17
## %bb.12:
	movq	(%r13), %rax
	movq	_BT_OPEN@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_14
## %bb.13:
	movq	_BT_CLOSED@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_17
LBB0_14:
	movq	%r14, %rdi
	callq	_lmp_esco_capable
	movl	8(%rbx), %esi
	movq	%r13, %rdi
	testq	%rax, %rax
	je	LBB0_16
## %bb.15:
	callq	_hci_setup_sync
	jmp	LBB0_17
LBB0_2:
	xorl	%r13d, %r13d
	jmp	LBB0_17
LBB0_10:
	movq	%rbx, %rdi
	callq	_hci_conn_put
	xorl	%r13d, %r13d
	jmp	LBB0_17
LBB0_16:
	callq	_hci_add_sco
LBB0_17:
	movq	%r13, %rax
	addq	$24, %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 dst %s"

	.comm	_ACL_LINK,4,2                   ## @ACL_LINK
	.comm	_BT_OPEN,8,3                    ## @BT_OPEN
	.comm	_BT_CLOSED,8,3                  ## @BT_CLOSED
	.comm	_BT_CONNECTED,8,3               ## @BT_CONNECTED
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_hci_connect                    ; -- Begin function hci_connect
	.p2align	2
_hci_connect:                           ; @hci_connect
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	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
	.cfi_offset w21, -40
	.cfi_offset w22, -48
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x23, x4
	mov	x24, x3
	mov	x21, x2
	mov	x22, x1
	mov	x19, x0
	ldr	w20, [x0]
	mov	x0, x2
	bl	_batostr
	mov	x2, x0
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x20
	bl	_BT_DBG
Lloh2:
	adrp	x27, _ACL_LINK@GOTPAGE
Lloh3:
	ldr	x27, [x27, _ACL_LINK@GOTPAGEOFF]
	ldr	w1, [x27]
	mov	x0, x19
	mov	x2, x21
	bl	_hci_conn_hash_lookup_ba
	mov	x20, x0
	cbnz	x0, LBB0_2
; %bb.1:
	ldr	w1, [x27]
	mov	x0, x19
	mov	x2, x21
	bl	_hci_conn_add
	mov	x20, x0
	cbz	x0, LBB0_12
LBB0_2:
	mov	x0, x20
	bl	_hci_conn_hold
	ldr	x8, [x20]
Lloh4:
	adrp	x25, _BT_OPEN@GOTPAGE
Lloh5:
	ldr	x25, [x25, _BT_OPEN@GOTPAGEOFF]
	ldr	x9, [x25]
Lloh6:
	adrp	x26, _BT_CLOSED@GOTPAGE
Lloh7:
	ldr	x26, [x26, _BT_CLOSED@GOTPAGEOFF]
	ldr	x10, [x26]
	cmp	x8, x9
	ccmp	x8, x10, #4, ne
	b.ne	LBB0_4
; %bb.3:
	stp	x23, x24, [x20, #24]
	mov	x0, x20
	bl	_hci_acl_connect
LBB0_4:
	ldr	w8, [x27]
	cmp	w8, w22
	b.ne	LBB0_6
; %bb.5:
	mov	x23, x20
	b	LBB0_15
LBB0_6:
	mov	x0, x19
	mov	x1, x22
	mov	x2, x21
	bl	_hci_conn_hash_lookup_ba
	mov	x23, x0
	cbnz	x0, LBB0_8
; %bb.7:
	mov	x0, x19
	mov	x1, x22
	mov	x2, x21
	bl	_hci_conn_add
	mov	x23, x0
	cbz	x0, LBB0_13
LBB0_8:
	str	x23, [x20, #16]
	str	x20, [x23, #16]
	mov	x0, x23
	bl	_hci_conn_hold
	ldr	x8, [x20]
Lloh8:
	adrp	x9, _BT_CONNECTED@GOTPAGE
Lloh9:
	ldr	x9, [x9, _BT_CONNECTED@GOTPAGEOFF]
Lloh10:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_15
; %bb.9:
	ldr	x8, [x23]
	ldr	x9, [x25]
	ldr	x10, [x26]
	cmp	x8, x9
	ccmp	x8, x10, #4, ne
	b.ne	LBB0_15
; %bb.10:
	mov	x0, x19
	bl	_lmp_esco_capable
	ldr	w1, [x20, #8]
	cbz	x0, LBB0_14
; %bb.11:
	mov	x0, x23
	bl	_hci_setup_sync
	b	LBB0_15
LBB0_12:
	mov	x23, #0
	b	LBB0_15
LBB0_13:
	mov	x0, x20
	bl	_hci_conn_put
	b	LBB0_15
LBB0_14:
	mov	x0, x23
	bl	_hci_add_sco
LBB0_15:
	mov	x0, x23
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"%s dst %s"

	.comm	_ACL_LINK,4,2                   ; @ACL_LINK
	.comm	_BT_OPEN,8,3                    ; @BT_OPEN
	.comm	_BT_CLOSED,8,3                  ; @BT_CLOSED
	.comm	_BT_CONNECTED,8,3               ; @BT_CONNECTED
.subsections_via_symbols
