	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function hci_sync_conn_complete_evt
_hci_sync_conn_complete_evt:            ## @hci_sync_conn_complete_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
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r14
	movq	(%rsi), %r12
	movl	4(%rdi), %esi
	movl	(%r12), %edx
	leaq	L_.str(%rip), %rdi
	callq	_BT_DBG
	movq	%r14, %rdi
	callq	_hci_dev_lock
	movq	8(%r12), %rsi
	leaq	20(%r12), %r15
	movq	%r14, %rdi
	movq	%r15, %rdx
	callq	_hci_conn_hash_lookup_ba
	movq	%rax, %rbx
	testq	%rax, %rax
	je	LBB0_1
LBB0_4:
	movl	(%r12), %esi
	cmpl	$31, %esi
	je	LBB0_8
## %bb.5:
	cmpl	$28, %esi
	je	LBB0_8
## %bb.6:
	testl	%esi, %esi
	jne	LBB0_11
## %bb.7:
	movl	16(%r12), %edi
	callq	___le16_to_cpu
	movl	%eax, 28(%rbx)
	movq	_BT_CONNECTED@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 8(%rbx)
	movq	%rbx, %rdi
	callq	_hci_conn_hold_device
	movq	%rbx, %rdi
	callq	_hci_conn_add_sysfs
	movl	(%r12), %esi
	jmp	LBB0_12
LBB0_1:
	movq	_ESCO_LINK@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	cmpq	%rsi, 8(%r12)
	je	LBB0_14
## %bb.2:
	movq	%r14, %rdi
	movq	%r15, %rdx
	callq	_hci_conn_hash_lookup_ba
	testq	%rax, %rax
	je	LBB0_14
## %bb.3:
	movq	%rax, %rbx
	movq	_SCO_LINK@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 32(%rbx)
	jmp	LBB0_4
LBB0_8:
	cmpl	$0, 24(%rbx)
	je	LBB0_11
## %bb.9:
	cmpl	$1, (%rbx)
	jg	LBB0_11
## %bb.10:
	movq	_SCO_ESCO_MASK@GOTPCREL(%rip), %rax
	movq	_EDR_ESCO_MASK@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	orl	(%rax), %ecx
	andl	(%r14), %ecx
	movl	%ecx, 4(%rbx)
	movq	16(%rbx), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_hci_setup_sync
	jmp	LBB0_14
LBB0_11:
	movq	_BT_CLOSED@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 8(%rbx)
LBB0_12:
	movq	%rbx, %rdi
	callq	_hci_proto_connect_cfm
	cmpl	$0, (%r12)
	je	LBB0_14
## %bb.13:
	movq	%rbx, %rdi
	callq	_hci_conn_del
LBB0_14:
	movq	%r14, %rdi
	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 status %d"

	.comm	_ESCO_LINK,8,3                  ## @ESCO_LINK
	.comm	_SCO_LINK,4,2                   ## @SCO_LINK
	.comm	_BT_CONNECTED,4,2               ## @BT_CONNECTED
	.comm	_SCO_ESCO_MASK,4,2              ## @SCO_ESCO_MASK
	.comm	_EDR_ESCO_MASK,4,2              ## @EDR_ESCO_MASK
	.comm	_BT_CLOSED,4,2                  ## @BT_CLOSED
	.no_dead_strip	_hci_sync_conn_complete_evt
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function hci_sync_conn_complete_evt
_hci_sync_conn_complete_evt:            ; @hci_sync_conn_complete_evt
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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	x22, [x1]
	ldr	w1, [x0, #4]
	ldr	w2, [x22]
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	bl	_BT_DBG
	mov	x0, x19
	bl	_hci_dev_lock
	ldr	x1, [x22, #8]
	add	x21, x22, #20
	mov	x0, x19
	mov	x2, x21
	bl	_hci_conn_hash_lookup_ba
	mov	x20, x0
	cbz	x0, LBB0_5
LBB0_1:
	ldr	w1, [x22]
	cmp	w1, #31
	ccmp	w1, #28, #4, ne
	b.ne	LBB0_8
; %bb.2:
	ldr	w8, [x20, #24]
	cbz	w8, LBB0_10
; %bb.3:
	ldr	w8, [x20]
	cmp	w8, #1
	b.gt	LBB0_10
; %bb.4:
	ldr	w8, [x19]
Lloh2:
	adrp	x9, _SCO_ESCO_MASK@GOTPAGE
Lloh3:
	ldr	x9, [x9, _SCO_ESCO_MASK@GOTPAGEOFF]
Lloh4:
	ldr	w9, [x9]
Lloh5:
	adrp	x10, _EDR_ESCO_MASK@GOTPAGE
Lloh6:
	ldr	x10, [x10, _EDR_ESCO_MASK@GOTPAGEOFF]
Lloh7:
	ldr	w10, [x10]
	orr	w9, w10, w9
	and	w8, w9, w8
	str	w8, [x20, #4]
	ldr	x8, [x20, #16]
	ldr	w1, [x8]
	mov	x0, x20
	bl	_hci_setup_sync
	b	LBB0_13
LBB0_5:
	ldr	x8, [x22, #8]
Lloh8:
	adrp	x9, _ESCO_LINK@GOTPAGE
Lloh9:
	ldr	x9, [x9, _ESCO_LINK@GOTPAGEOFF]
Lloh10:
	ldr	x1, [x9]
	cmp	x8, x1
	b.eq	LBB0_13
; %bb.6:
	mov	x0, x19
	mov	x2, x21
	bl	_hci_conn_hash_lookup_ba
	cbz	x0, LBB0_13
; %bb.7:
	mov	x20, x0
Lloh11:
	adrp	x8, _SCO_LINK@GOTPAGE
Lloh12:
	ldr	x8, [x8, _SCO_LINK@GOTPAGEOFF]
Lloh13:
	ldr	w8, [x8]
	str	w8, [x0, #32]
	b	LBB0_1
LBB0_8:
	cbnz	w1, LBB0_10
; %bb.9:
	ldr	w0, [x22, #16]
	bl	___le16_to_cpu
	str	w0, [x20, #28]
Lloh14:
	adrp	x8, _BT_CONNECTED@GOTPAGE
Lloh15:
	ldr	x8, [x8, _BT_CONNECTED@GOTPAGEOFF]
Lloh16:
	ldr	w8, [x8]
	str	w8, [x20, #8]
	mov	x0, x20
	bl	_hci_conn_hold_device
	mov	x0, x20
	bl	_hci_conn_add_sysfs
	ldr	w1, [x22]
	b	LBB0_11
LBB0_10:
Lloh17:
	adrp	x8, _BT_CLOSED@GOTPAGE
Lloh18:
	ldr	x8, [x8, _BT_CLOSED@GOTPAGEOFF]
Lloh19:
	ldr	w8, [x8]
	str	w8, [x20, #8]
LBB0_11:
	mov	x0, x20
	bl	_hci_proto_connect_cfm
	ldr	w8, [x22]
	cbz	w8, LBB0_13
; %bb.12:
	mov	x0, x20
	bl	_hci_conn_del
LBB0_13:
	mov	x0, x19
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	b	_hci_dev_unlock
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.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	"%s status %d"

	.comm	_ESCO_LINK,8,3                  ; @ESCO_LINK
	.comm	_SCO_LINK,4,2                   ; @SCO_LINK
	.comm	_BT_CONNECTED,4,2               ; @BT_CONNECTED
	.comm	_SCO_ESCO_MASK,4,2              ; @SCO_ESCO_MASK
	.comm	_EDR_ESCO_MASK,4,2              ; @EDR_ESCO_MASK
	.comm	_BT_CLOSED,4,2                  ; @BT_CLOSED
	.no_dead_strip	_hci_sync_conn_complete_evt
.subsections_via_symbols
