	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function l2cap_conn_start
_l2cap_conn_start:                      ## @l2cap_conn_start
	.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	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r14
	leaq	L_.str(%rip), %rdi
	movq	%r14, %rsi
	callq	_BT_DBG
	movq	%r14, %rdi
	callq	_read_lock
	movq	8(%r14), %rbx
	testq	%rbx, %rbx
	je	LBB0_16
## %bb.1:
	movq	_SOCK_SEQPACKET@GOTPCREL(%rip), %r13
	movq	_BT_CONNECT@GOTPCREL(%rip), %r15
	jmp	LBB0_2
LBB0_11:                                ##   in Loop: Header=BB0_2 Depth=1
	movq	_L2CAP_CR_PEND@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_cpu_to_le16
	movq	%rax, -72(%rbp)
	movq	_L2CAP_CS_AUTHEN_PEND@GOTPCREL(%rip), %rax
LBB0_12:                                ##   in Loop: Header=BB0_2 Depth=1
	movl	(%rax), %edi
	callq	_cpu_to_le16
	movq	%rax, -80(%rbp)
LBB0_13:                                ##   in Loop: Header=BB0_2 Depth=1
	movq	%rbx, %rdi
	callq	_l2cap_pi
	movl	(%rax), %esi
	movq	_L2CAP_CONN_RSP@GOTPCREL(%rip), %rax
LBB0_14:                                ##   in Loop: Header=BB0_2 Depth=1
	movl	(%rax), %edx
	movq	%r14, %rdi
	movl	$40, %ecx
	leaq	-80(%rbp), %r8
	callq	_l2cap_send_cmd
LBB0_15:                                ##   in Loop: Header=BB0_2 Depth=1
	movq	%rbx, %rdi
	callq	_bh_unlock_sock
	movq	%rbx, %rdi
	callq	_l2cap_pi
	movq	16(%rax), %rbx
	testq	%rbx, %rbx
	je	LBB0_16
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movq	%rbx, %rdi
	callq	_bh_lock_sock
	movq	(%rbx), %rax
	cmpq	(%r13), %rax
	jne	LBB0_15
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	8(%rbx), %rax
	cmpq	(%r15), %rax
	jne	LBB0_6
## %bb.4:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	%rbx, %rdi
	callq	_l2cap_check_security
	testq	%rax, %rax
	je	LBB0_15
## %bb.5:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	%rbx, %rdi
	callq	_l2cap_pi
	movl	4(%rax), %edi
	callq	_cpu_to_le16
	movq	%rax, -56(%rbp)
	movq	%rbx, %rdi
	callq	_l2cap_pi
	movl	12(%rax), %eax
	movl	%eax, -48(%rbp)
	movq	%r14, %rdi
	callq	_l2cap_get_ident
	movl	%eax, %r12d
	movq	%rbx, %rdi
	callq	_l2cap_pi
	movl	%r12d, (%rax)
	movq	%rbx, %rdi
	callq	_l2cap_pi
	movl	(%rax), %esi
	movq	_L2CAP_CONN_REQ@GOTPCREL(%rip), %rax
	jmp	LBB0_14
	.p2align	4, 0x90
LBB0_6:                                 ##   in Loop: Header=BB0_2 Depth=1
	movq	_BT_CONNECT2@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_15
## %bb.7:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	%rbx, %rdi
	callq	_l2cap_pi
	movl	8(%rax), %edi
	callq	_cpu_to_le16
	movq	%rax, -56(%rbp)
	movq	%rbx, %rdi
	callq	_l2cap_pi
	movl	4(%rax), %edi
	callq	_cpu_to_le16
	movq	%rax, -64(%rbp)
	movq	%rbx, %rdi
	callq	_l2cap_check_security
	testq	%rax, %rax
	je	LBB0_11
## %bb.8:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	%rbx, %rdi
	callq	_bt_sk
	cmpq	$0, 8(%rax)
	je	LBB0_10
## %bb.9:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	%rbx, %rdi
	callq	_bt_sk
	movq	(%rax), %r12
	movq	_L2CAP_CR_PEND@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_cpu_to_le16
	movq	%rax, -72(%rbp)
	movq	_L2CAP_CS_AUTHOR_PEND@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_cpu_to_le16
	movq	%rax, -80(%rbp)
	movq	%r12, %rdi
	xorl	%esi, %esi
	callq	*16(%r12)
	jmp	LBB0_13
LBB0_10:                                ##   in Loop: Header=BB0_2 Depth=1
	movq	_BT_CONFIG@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, 8(%rbx)
	movq	_L2CAP_CR_SUCCESS@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_cpu_to_le16
	movq	%rax, -72(%rbp)
	movq	_L2CAP_CS_NO_INFO@GOTPCREL(%rip), %rax
	jmp	LBB0_12
LBB0_16:
	movq	%r14, %rdi
	callq	_read_unlock
	addq	$40, %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	"conn %p"

	.comm	_SOCK_SEQPACKET,8,3             ## @SOCK_SEQPACKET
	.comm	_BT_CONNECT,8,3                 ## @BT_CONNECT
	.comm	_L2CAP_CONN_REQ,4,2             ## @L2CAP_CONN_REQ
	.comm	_BT_CONNECT2,8,3                ## @BT_CONNECT2
	.comm	_L2CAP_CR_PEND,4,2              ## @L2CAP_CR_PEND
	.comm	_L2CAP_CS_AUTHOR_PEND,4,2       ## @L2CAP_CS_AUTHOR_PEND
	.comm	_BT_CONFIG,8,3                  ## @BT_CONFIG
	.comm	_L2CAP_CR_SUCCESS,4,2           ## @L2CAP_CR_SUCCESS
	.comm	_L2CAP_CS_NO_INFO,4,2           ## @L2CAP_CS_NO_INFO
	.comm	_L2CAP_CS_AUTHEN_PEND,4,2       ## @L2CAP_CS_AUTHEN_PEND
	.comm	_L2CAP_CONN_RSP,4,2             ## @L2CAP_CONN_RSP
	.no_dead_strip	_l2cap_conn_start
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function l2cap_conn_start
_l2cap_conn_start:                      ; @l2cap_conn_start
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #144
	.cfi_def_cfa_offset 144
	stp	x28, x27, [sp, #48]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #64]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #80]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #96]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #112]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #128]            ; 16-byte Folded Spill
	add	x29, sp, #128
	.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	x19, x0
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x19
	bl	_BT_DBG
	mov	x0, x19
	bl	_read_lock
	ldr	x20, [x19, #8]
	cbz	x20, LBB0_16
; %bb.1:
Lloh2:
	adrp	x22, _SOCK_SEQPACKET@GOTPAGE
Lloh3:
	ldr	x22, [x22, _SOCK_SEQPACKET@GOTPAGEOFF]
Lloh4:
	adrp	x23, _BT_CONNECT@GOTPAGE
Lloh5:
	ldr	x23, [x23, _BT_CONNECT@GOTPAGEOFF]
Lloh6:
	adrp	x24, _L2CAP_CONN_REQ@GOTPAGE
Lloh7:
	ldr	x24, [x24, _L2CAP_CONN_REQ@GOTPAGEOFF]
Lloh8:
	adrp	x25, _BT_CONNECT2@GOTPAGE
Lloh9:
	ldr	x25, [x25, _BT_CONNECT2@GOTPAGEOFF]
Lloh10:
	adrp	x26, _L2CAP_CR_PEND@GOTPAGE
Lloh11:
	ldr	x26, [x26, _L2CAP_CR_PEND@GOTPAGEOFF]
Lloh12:
	adrp	x28, _L2CAP_CONN_RSP@GOTPAGE
Lloh13:
	ldr	x28, [x28, _L2CAP_CONN_RSP@GOTPAGEOFF]
Lloh14:
	adrp	x27, _L2CAP_CS_AUTHOR_PEND@GOTPAGE
Lloh15:
	ldr	x27, [x27, _L2CAP_CS_AUTHOR_PEND@GOTPAGEOFF]
	b	LBB0_7
LBB0_2:                                 ;   in Loop: Header=BB0_7 Depth=1
	ldr	w0, [x26]
	bl	_cpu_to_le16
	str	x0, [sp, #16]
Lloh16:
	adrp	x8, _L2CAP_CS_AUTHEN_PEND@GOTPAGE
Lloh17:
	ldr	x8, [x8, _L2CAP_CS_AUTHEN_PEND@GOTPAGEOFF]
LBB0_3:                                 ;   in Loop: Header=BB0_7 Depth=1
	ldr	w0, [x8]
	bl	_cpu_to_le16
	str	x0, [sp, #8]
LBB0_4:                                 ;   in Loop: Header=BB0_7 Depth=1
	mov	x0, x20
	bl	_l2cap_pi
	ldr	w1, [x0]
	ldr	w2, [x28]
LBB0_5:                                 ;   in Loop: Header=BB0_7 Depth=1
	add	x4, sp, #8
	mov	x0, x19
	mov	w3, #40
	bl	_l2cap_send_cmd
LBB0_6:                                 ;   in Loop: Header=BB0_7 Depth=1
	mov	x0, x20
	bl	_bh_unlock_sock
	mov	x0, x20
	bl	_l2cap_pi
	ldr	x20, [x0, #16]
	cbz	x20, LBB0_16
LBB0_7:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x20
	bl	_bh_lock_sock
	ldr	x8, [x20]
	ldr	x9, [x22]
	cmp	x8, x9
	b.ne	LBB0_6
; %bb.8:                                ;   in Loop: Header=BB0_7 Depth=1
	ldr	x8, [x20, #8]
	ldr	x9, [x23]
	cmp	x8, x9
	b.ne	LBB0_11
; %bb.9:                                ;   in Loop: Header=BB0_7 Depth=1
	mov	x0, x20
	bl	_l2cap_check_security
	cbz	x0, LBB0_6
; %bb.10:                               ;   in Loop: Header=BB0_7 Depth=1
	mov	x0, x20
	bl	_l2cap_pi
	ldr	w0, [x0, #4]
	bl	_cpu_to_le16
	str	x0, [sp, #32]
	mov	x0, x20
	bl	_l2cap_pi
	ldr	w8, [x0, #12]
	str	w8, [sp, #40]
	mov	x0, x19
	bl	_l2cap_get_ident
	mov	x21, x0
	mov	x0, x20
	bl	_l2cap_pi
	str	w21, [x0]
	mov	x0, x20
	bl	_l2cap_pi
	ldr	w1, [x0]
	ldr	w2, [x24]
	b	LBB0_5
LBB0_11:                                ;   in Loop: Header=BB0_7 Depth=1
	ldr	x9, [x25]
	cmp	x8, x9
	b.ne	LBB0_6
; %bb.12:                               ;   in Loop: Header=BB0_7 Depth=1
	mov	x0, x20
	bl	_l2cap_pi
	ldr	w0, [x0, #8]
	bl	_cpu_to_le16
	str	x0, [sp, #32]
	mov	x0, x20
	bl	_l2cap_pi
	ldr	w0, [x0, #4]
	bl	_cpu_to_le16
	str	x0, [sp, #24]
	mov	x0, x20
	bl	_l2cap_check_security
	cbz	x0, LBB0_2
; %bb.13:                               ;   in Loop: Header=BB0_7 Depth=1
	mov	x0, x20
	bl	_bt_sk
	ldr	x8, [x0, #8]
	cbz	x8, LBB0_15
; %bb.14:                               ;   in Loop: Header=BB0_7 Depth=1
	mov	x0, x20
	bl	_bt_sk
	ldr	x21, [x0]
	ldr	w0, [x26]
	bl	_cpu_to_le16
	str	x0, [sp, #16]
	ldr	w0, [x27]
	bl	_cpu_to_le16
	str	x0, [sp, #8]
	ldr	x8, [x21, #16]
	mov	x0, x21
	mov	w1, #0
	blr	x8
	b	LBB0_4
LBB0_15:                                ;   in Loop: Header=BB0_7 Depth=1
Lloh18:
	adrp	x8, _BT_CONFIG@GOTPAGE
Lloh19:
	ldr	x8, [x8, _BT_CONFIG@GOTPAGEOFF]
Lloh20:
	ldr	x8, [x8]
	str	x8, [x20, #8]
Lloh21:
	adrp	x8, _L2CAP_CR_SUCCESS@GOTPAGE
Lloh22:
	ldr	x8, [x8, _L2CAP_CR_SUCCESS@GOTPAGEOFF]
Lloh23:
	ldr	w0, [x8]
	bl	_cpu_to_le16
	str	x0, [sp, #16]
Lloh24:
	adrp	x8, _L2CAP_CS_NO_INFO@GOTPAGE
Lloh25:
	ldr	x8, [x8, _L2CAP_CS_NO_INFO@GOTPAGEOFF]
	b	LBB0_3
LBB0_16:
	mov	x0, x19
	bl	_read_unlock
	ldp	x29, x30, [sp, #128]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #112]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #96]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #80]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #64]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #48]             ; 16-byte Folded Reload
	add	sp, sp, #144
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh16, Lloh17
	.loh AdrpLdrGot	Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"conn %p"

	.comm	_SOCK_SEQPACKET,8,3             ; @SOCK_SEQPACKET
	.comm	_BT_CONNECT,8,3                 ; @BT_CONNECT
	.comm	_L2CAP_CONN_REQ,4,2             ; @L2CAP_CONN_REQ
	.comm	_BT_CONNECT2,8,3                ; @BT_CONNECT2
	.comm	_L2CAP_CR_PEND,4,2              ; @L2CAP_CR_PEND
	.comm	_L2CAP_CS_AUTHOR_PEND,4,2       ; @L2CAP_CS_AUTHOR_PEND
	.comm	_BT_CONFIG,8,3                  ; @BT_CONFIG
	.comm	_L2CAP_CR_SUCCESS,4,2           ; @L2CAP_CR_SUCCESS
	.comm	_L2CAP_CS_NO_INFO,4,2           ; @L2CAP_CS_NO_INFO
	.comm	_L2CAP_CS_AUTHEN_PEND,4,2       ; @L2CAP_CS_AUTHEN_PEND
	.comm	_L2CAP_CONN_RSP,4,2             ; @L2CAP_CONN_RSP
	.no_dead_strip	_l2cap_conn_start
.subsections_via_symbols
