	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_l2cap_disconnect_cfm           ## -- Begin function l2cap_disconnect_cfm
	.p2align	4, 0x90
_l2cap_disconnect_cfm:                  ## @l2cap_disconnect_cfm
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	testq	%rdi, %rdi
	je	LBB0_12
## %bb.1:
	movq	%rdi, %rbx
	movq	%rsi, %rdi
	callq	_l2cap_psm
	cmpl	$128, %eax
	je	LBB0_4
## %bb.2:
	cmpl	$129, %eax
	jne	LBB0_7
## %bb.3:
	movq	32(%rbx), %rdi
	callq	_l2cap_close
	movq	$0, 32(%rbx)
	movq	40(%rbx), %rdi
	testq	%rdi, %rdi
	jne	LBB0_6
	jmp	LBB0_7
LBB0_4:
	movq	40(%rbx), %rdi
	callq	_l2cap_close
	movq	$0, 40(%rbx)
	movq	32(%rbx), %rdi
	testq	%rdi, %rdi
	je	LBB0_7
LBB0_6:
	leaq	_l2cap_disconnect_cfm(%rip), %rsi
	callq	_l2ca_disconnect_req
LBB0_7:
	cmpq	$0, 40(%rbx)
	jne	LBB0_12
## %bb.8:
	cmpq	$0, 32(%rbx)
	jne	LBB0_12
## %bb.9:
	movq	_ERR_OK@GOTPCREL(%rip), %r14
	movl	(%r14), %eax
	movl	%eax, 24(%rbx)
	movq	_STATE_DISCONNECTED@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, 16(%rbx)
	movq	%rbx, %rdi
	callq	___bte_close_ctrl_queue
	movq	8(%rbx), %rax
	testq	%rax, %rax
	je	LBB0_11
## %bb.10:
	movl	4(%rbx), %edi
	movl	(%r14), %edx
	movq	%rbx, %rsi
	callq	*%rax
LBB0_11:
	xorl	%edi, %edi
	callq	_hci_cmd_complete
	movq	_HCI_OTHER_END_TERMINATED_CONN_USER_ENDED@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_hci_disconnect
LBB0_12:
	movq	_ERR_OK@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ERR_OK,4,2                     ## @ERR_OK
	.comm	_STATE_DISCONNECTED,8,3         ## @STATE_DISCONNECTED
	.comm	_HCI_OTHER_END_TERMINATED_CONN_USER_ENDED,4,2 ## @HCI_OTHER_END_TERMINATED_CONN_USER_ENDED
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_l2cap_disconnect_cfm           ; -- Begin function l2cap_disconnect_cfm
	.p2align	2
_l2cap_disconnect_cfm:                  ; @l2cap_disconnect_cfm
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
Lloh0:
	adrp	x20, _ERR_OK@GOTPAGE
Lloh1:
	ldr	x20, [x20, _ERR_OK@GOTPAGEOFF]
	cbz	x0, LBB0_11
; %bb.1:
	mov	x19, x0
	mov	x0, x1
	bl	_l2cap_psm
	cmp	w0, #128
	b.eq	LBB0_4
; %bb.2:
	cmp	w0, #129
	b.ne	LBB0_6
; %bb.3:
	ldr	x0, [x19, #32]
	bl	_l2cap_close
	str	xzr, [x19, #32]
	ldr	x0, [x19, #40]
	cbnz	x0, LBB0_5
	b	LBB0_6
LBB0_4:
	ldr	x0, [x19, #40]
	bl	_l2cap_close
	str	xzr, [x19, #40]
	ldr	x0, [x19, #32]
	cbz	x0, LBB0_6
LBB0_5:
Lloh2:
	adrp	x1, _l2cap_disconnect_cfm@PAGE
Lloh3:
	add	x1, x1, _l2cap_disconnect_cfm@PAGEOFF
	bl	_l2ca_disconnect_req
LBB0_6:
	ldr	x8, [x19, #40]
	cbnz	x8, LBB0_11
; %bb.7:
	ldr	x8, [x19, #32]
	cbnz	x8, LBB0_11
; %bb.8:
	ldr	w8, [x20]
	str	w8, [x19, #24]
Lloh4:
	adrp	x8, _STATE_DISCONNECTED@GOTPAGE
Lloh5:
	ldr	x8, [x8, _STATE_DISCONNECTED@GOTPAGEOFF]
Lloh6:
	ldr	x8, [x8]
	str	x8, [x19, #16]
	mov	x0, x19
	bl	___bte_close_ctrl_queue
	ldr	x8, [x19, #8]
	cbz	x8, LBB0_10
; %bb.9:
	ldr	w0, [x19, #4]
	ldr	w2, [x20]
	mov	x1, x19
	blr	x8
LBB0_10:
	mov	x0, #0
	bl	_hci_cmd_complete
Lloh7:
	adrp	x8, _HCI_OTHER_END_TERMINATED_CONN_USER_ENDED@GOTPAGE
Lloh8:
	ldr	x8, [x8, _HCI_OTHER_END_TERMINATED_CONN_USER_ENDED@GOTPAGEOFF]
Lloh9:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_hci_disconnect
LBB0_11:
	ldr	w0, [x20]
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.comm	_ERR_OK,4,2                     ; @ERR_OK
	.comm	_STATE_DISCONNECTED,8,3         ; @STATE_DISCONNECTED
	.comm	_HCI_OTHER_END_TERMINATED_CONN_USER_ENDED,4,2 ; @HCI_OTHER_END_TERMINATED_CONN_USER_ENDED
.subsections_via_symbols
