	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function __l2cap_sock_close
___l2cap_sock_close:                    ## @__l2cap_sock_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	%r15
	pushq	%r14
	pushq	%rbx
	subq	$40, %rsp
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, %r14d
	movq	%rdi, %rbx
	movl	(%rdi), %edx
	movl	12(%rdi), %ecx
	leaq	L_.str(%rip), %rdi
	movq	%rbx, %rsi
	callq	_BT_DBG
	movl	(%rbx), %eax
	addl	$-128, %eax
	cmpl	$5, %eax
	ja	LBB0_10
## %bb.1:
	leaq	LJTI0_0(%rip), %rcx
	movslq	(%rcx,%rax,4), %rax
	addq	%rcx, %rax
	jmpq	*%rax
LBB0_3:
	movl	4(%rbx), %eax
	movq	_SOCK_SEQPACKET@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jne	LBB0_4
## %bb.11:
	movq	%rbx, %rdi
	callq	_l2cap_pi
	movq	16(%rax), %r14
	movl	$129, (%rbx)
	movl	8(%rbx), %esi
	movq	%rbx, %rdi
	callq	_l2cap_sock_set_timer
	movq	%r14, %rdi
	movq	%rbx, %rsi
	addq	$40, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_l2cap_send_disconn_req         ## TAILCALL
LBB0_2:
	movq	%rbx, %rdi
	addq	$40, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_l2cap_sock_cleanup_listen      ## TAILCALL
LBB0_5:
	movl	4(%rbx), %eax
	movq	_SOCK_SEQPACKET@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jne	LBB0_4
## %bb.6:
	movq	%rbx, %rdi
	callq	_l2cap_pi
	movq	16(%rax), %r14
	movq	%rbx, %rdi
	callq	_bt_sk
	cmpl	$0, (%rax)
	jne	LBB0_7
## %bb.8:
	movq	_L2CAP_CR_BAD_PSM@GOTPCREL(%rip), %rax
	jmp	LBB0_9
LBB0_4:
	movq	%rbx, %rdi
	movl	%r14d, %esi
	addq	$40, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_l2cap_chan_del                 ## TAILCALL
LBB0_10:
	movq	_SOCK_ZAPPED@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	addq	$40, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_sock_set_flag                  ## TAILCALL
LBB0_7:
	movq	_L2CAP_CR_SEC_BLOCK@GOTPCREL(%rip), %rax
LBB0_9:
	movl	(%rax), %r15d
	movq	%rbx, %rdi
	callq	_l2cap_pi
	movl	8(%rax), %edi
	callq	_cpu_to_le16
	movq	%rax, -32(%rbp)
	movq	%rbx, %rdi
	callq	_l2cap_pi
	movl	4(%rax), %edi
	callq	_cpu_to_le16
	movq	%rax, -40(%rbp)
	movl	%r15d, %edi
	callq	_cpu_to_le16
	movq	%rax, -48(%rbp)
	movq	_L2CAP_CS_NO_INFO@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_cpu_to_le16
	movq	%rax, -56(%rbp)
	movq	%rbx, %rdi
	callq	_l2cap_pi
	movl	(%rax), %esi
	movq	_L2CAP_CONN_RSP@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	leaq	-56(%rbp), %r8
	movq	%r14, %rdi
	movl	$32, %ecx
	callq	_l2cap_send_cmd
	addq	$40, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
	.p2align	2, 0x90
	.data_region jt32
.set L0_0_set_2, LBB0_2-LJTI0_0
.set L0_0_set_4, LBB0_4-LJTI0_0
.set L0_0_set_3, LBB0_3-LJTI0_0
.set L0_0_set_5, LBB0_5-LJTI0_0
LJTI0_0:
	.long	L0_0_set_2
	.long	L0_0_set_4
	.long	L0_0_set_3
	.long	L0_0_set_5
	.long	L0_0_set_4
	.long	L0_0_set_3
	.end_data_region
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"sk %p state %d socket %p"

	.comm	_SOCK_SEQPACKET,4,2             ## @SOCK_SEQPACKET
	.comm	_L2CAP_CR_SEC_BLOCK,4,2         ## @L2CAP_CR_SEC_BLOCK
	.comm	_L2CAP_CR_BAD_PSM,4,2           ## @L2CAP_CR_BAD_PSM
	.comm	_L2CAP_CS_NO_INFO,4,2           ## @L2CAP_CS_NO_INFO
	.comm	_L2CAP_CONN_RSP,4,2             ## @L2CAP_CONN_RSP
	.comm	_SOCK_ZAPPED,4,2                ## @SOCK_ZAPPED
	.no_dead_strip	___l2cap_sock_close
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function __l2cap_sock_close
___l2cap_sock_close:                    ; @__l2cap_sock_close
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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	x20, x1
	mov	x19, x0
	ldr	w2, [x0]
	ldr	w3, [x0, #12]
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x19
	bl	_BT_DBG
	ldr	w8, [x19]
	sub	w8, w8, #128
	cmp	w8, #5
	b.hi	LBB0_8
; %bb.1:
Lloh2:
	adrp	x9, lJTI0_0@PAGE
Lloh3:
	add	x9, x9, lJTI0_0@PAGEOFF
	adr	x10, LBB0_2
	ldrb	w11, [x9, x8]
	add	x10, x10, x11, lsl #2
	br	x10
LBB0_2:
	ldr	w8, [x19, #4]
Lloh4:
	adrp	x9, _SOCK_SEQPACKET@GOTPAGE
Lloh5:
	ldr	x9, [x9, _SOCK_SEQPACKET@GOTPAGEOFF]
Lloh6:
	ldr	w9, [x9]
	cmp	w8, w9
	b.ne	LBB0_7
; %bb.3:
	mov	x0, x19
	bl	_l2cap_pi
	ldr	x20, [x0, #16]
	mov	w8, #129
	str	w8, [x19]
	ldr	w1, [x19, #8]
	mov	x0, x19
	bl	_l2cap_sock_set_timer
	mov	x0, x20
	mov	x1, x19
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #80
	b	_l2cap_send_disconn_req
LBB0_4:
	mov	x0, x19
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #80
	b	_l2cap_sock_cleanup_listen
LBB0_5:
	ldr	w8, [x19, #4]
Lloh7:
	adrp	x9, _SOCK_SEQPACKET@GOTPAGE
Lloh8:
	ldr	x9, [x9, _SOCK_SEQPACKET@GOTPAGEOFF]
Lloh9:
	ldr	w9, [x9]
	cmp	w8, w9
	b.ne	LBB0_7
; %bb.6:
	mov	x0, x19
	bl	_l2cap_pi
	ldr	x20, [x0, #16]
	mov	x0, x19
	bl	_bt_sk
Lloh10:
	adrp	x8, _L2CAP_CR_BAD_PSM@GOTPAGE
Lloh11:
	ldr	x8, [x8, _L2CAP_CR_BAD_PSM@GOTPAGEOFF]
	ldr	w9, [x0]
Lloh12:
	adrp	x10, _L2CAP_CR_SEC_BLOCK@GOTPAGE
Lloh13:
	ldr	x10, [x10, _L2CAP_CR_SEC_BLOCK@GOTPAGEOFF]
	cmp	w9, #0
	csel	x8, x8, x10, eq
	ldr	w21, [x8]
	mov	x0, x19
	bl	_l2cap_pi
	ldr	w0, [x0, #8]
	bl	_cpu_to_le16
	str	x0, [sp, #24]
	mov	x0, x19
	bl	_l2cap_pi
	ldr	w0, [x0, #4]
	bl	_cpu_to_le16
	str	x0, [sp, #16]
	mov	x0, x21
	bl	_cpu_to_le16
	str	x0, [sp, #8]
Lloh14:
	adrp	x8, _L2CAP_CS_NO_INFO@GOTPAGE
Lloh15:
	ldr	x8, [x8, _L2CAP_CS_NO_INFO@GOTPAGEOFF]
Lloh16:
	ldr	w0, [x8]
	bl	_cpu_to_le16
	str	x0, [sp]
	mov	x0, x19
	bl	_l2cap_pi
	ldr	w1, [x0]
Lloh17:
	adrp	x8, _L2CAP_CONN_RSP@GOTPAGE
Lloh18:
	ldr	x8, [x8, _L2CAP_CONN_RSP@GOTPAGEOFF]
Lloh19:
	ldr	w2, [x8]
	mov	x4, sp
	mov	x0, x20
	mov	w3, #32
	bl	_l2cap_send_cmd
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
LBB0_7:
	mov	x0, x19
	mov	x1, x20
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #80
	b	_l2cap_chan_del
LBB0_8:
Lloh20:
	adrp	x8, _SOCK_ZAPPED@GOTPAGE
Lloh21:
	ldr	x8, [x8, _SOCK_ZAPPED@GOTPAGEOFF]
Lloh22:
	ldr	w1, [x8]
	mov	x0, x19
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #80
	b	_sock_set_flag
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.cfi_endproc
	.section	__TEXT,__const
lJTI0_0:
	.byte	(LBB0_4-LBB0_2)>>2
	.byte	(LBB0_7-LBB0_2)>>2
	.byte	(LBB0_2-LBB0_2)>>2
	.byte	(LBB0_5-LBB0_2)>>2
	.byte	(LBB0_7-LBB0_2)>>2
	.byte	(LBB0_2-LBB0_2)>>2
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"sk %p state %d socket %p"

	.comm	_SOCK_SEQPACKET,4,2             ; @SOCK_SEQPACKET
	.comm	_L2CAP_CR_SEC_BLOCK,4,2         ; @L2CAP_CR_SEC_BLOCK
	.comm	_L2CAP_CR_BAD_PSM,4,2           ; @L2CAP_CR_BAD_PSM
	.comm	_L2CAP_CS_NO_INFO,4,2           ; @L2CAP_CS_NO_INFO
	.comm	_L2CAP_CONN_RSP,4,2             ; @L2CAP_CONN_RSP
	.comm	_SOCK_ZAPPED,4,2                ; @SOCK_ZAPPED
	.no_dead_strip	___l2cap_sock_close
.subsections_via_symbols
