	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_l2cap_close                    ## -- Begin function l2cap_close
	.p2align	4, 0x90
_l2cap_close:                           ## @l2cap_close
	.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
	movq	%rdi, %rbx
	movq	(%rdi), %rax
	movq	_L2CAP_LISTEN@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_2
## %bb.1:
	movq	_l2cap_listen_pcbs@GOTPCREL(%rip), %rdi
	movq	%rbx, %rsi
	callq	_L2CAP_RMV
	movq	_l2cap_listenpcbs@GOTPCREL(%rip), %rdi
	jmp	LBB0_6
LBB0_2:
	movq	_l2cap_active_pcbs@GOTPCREL(%rip), %rdi
	movq	%rbx, %rsi
	callq	_L2CAP_RMV
	movq	16(%rbx), %rsi
	testq	%rsi, %rsi
	je	LBB0_5
## %bb.3:
	movq	_l2cap_sigs@GOTPCREL(%rip), %r14
	.p2align	4, 0x90
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	movq	8(%rsi), %rax
	movq	%rax, 16(%rbx)
	movq	%r14, %rdi
	callq	_btmemb_free
	movq	16(%rbx), %rsi
	testq	%rsi, %rsi
	jne	LBB0_4
LBB0_5:
	movq	_l2cap_pcbs@GOTPCREL(%rip), %rdi
LBB0_6:
	movq	%rbx, %rsi
	callq	_btmemb_free
	movq	_ERR_OK@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_L2CAP_LISTEN,8,3               ## @L2CAP_LISTEN
	.comm	_l2cap_listen_pcbs,4,2          ## @l2cap_listen_pcbs
	.comm	_l2cap_listenpcbs,4,2           ## @l2cap_listenpcbs
	.comm	_l2cap_active_pcbs,8,3          ## @l2cap_active_pcbs
	.comm	_l2cap_sigs,4,2                 ## @l2cap_sigs
	.comm	_l2cap_pcbs,4,2                 ## @l2cap_pcbs
	.comm	_ERR_OK,4,2                     ## @ERR_OK
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_l2cap_close                    ; -- Begin function l2cap_close
	.p2align	2
_l2cap_close:                           ; @l2cap_close
	.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
	mov	x19, x0
	ldr	x8, [x0]
Lloh0:
	adrp	x9, _L2CAP_LISTEN@GOTPAGE
Lloh1:
	ldr	x9, [x9, _L2CAP_LISTEN@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_2
; %bb.1:
Lloh3:
	adrp	x0, _l2cap_listen_pcbs@GOTPAGE
Lloh4:
	ldr	x0, [x0, _l2cap_listen_pcbs@GOTPAGEOFF]
	mov	x1, x19
	bl	_L2CAP_RMV
Lloh5:
	adrp	x0, _l2cap_listenpcbs@GOTPAGE
Lloh6:
	ldr	x0, [x0, _l2cap_listenpcbs@GOTPAGEOFF]
	b	LBB0_6
LBB0_2:
Lloh7:
	adrp	x0, _l2cap_active_pcbs@GOTPAGE
Lloh8:
	ldr	x0, [x0, _l2cap_active_pcbs@GOTPAGEOFF]
	mov	x1, x19
	bl	_L2CAP_RMV
	ldr	x1, [x19, #16]
	cbz	x1, LBB0_5
; %bb.3:
Lloh9:
	adrp	x20, _l2cap_sigs@GOTPAGE
Lloh10:
	ldr	x20, [x20, _l2cap_sigs@GOTPAGEOFF]
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x1, #8]
	str	x8, [x19, #16]
	mov	x0, x20
	bl	_btmemb_free
	ldr	x1, [x19, #16]
	cbnz	x1, LBB0_4
LBB0_5:
Lloh11:
	adrp	x0, _l2cap_pcbs@GOTPAGE
Lloh12:
	ldr	x0, [x0, _l2cap_pcbs@GOTPAGEOFF]
LBB0_6:
	mov	x1, x19
	bl	_btmemb_free
Lloh13:
	adrp	x8, _ERR_OK@GOTPAGE
Lloh14:
	ldr	x8, [x8, _ERR_OK@GOTPAGEOFF]
Lloh15:
	ldr	w0, [x8]
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.cfi_endproc
                                        ; -- End function
	.comm	_L2CAP_LISTEN,8,3               ; @L2CAP_LISTEN
	.comm	_l2cap_listen_pcbs,4,2          ; @l2cap_listen_pcbs
	.comm	_l2cap_listenpcbs,4,2           ; @l2cap_listenpcbs
	.comm	_l2cap_active_pcbs,8,3          ; @l2cap_active_pcbs
	.comm	_l2cap_sigs,4,2                 ; @l2cap_sigs
	.comm	_l2cap_pcbs,4,2                 ; @l2cap_pcbs
	.comm	_ERR_OK,4,2                     ; @ERR_OK
.subsections_via_symbols
