	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_lp_connect_cfm                 ## -- Begin function lp_connect_cfm
	.p2align	4, 0x90
_lp_connect_cfm:                        ## @lp_connect_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	%r15
	pushq	%r14
	pushq	%r13
	pushq	%r12
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	_l2cap_active_pcbs@GOTPCREL(%rip), %rax
	movq	(%rax), %rbx
	testq	%rbx, %rbx
	je	LBB0_4
## %bb.1:
	movq	%rdx, %r12
	movl	%esi, %r15d
	movq	%rdi, %r13
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	leaq	4(%rbx), %r14
	movq	%r14, %rdi
	movq	%r13, %rsi
	callq	_bd_addr_cmp
	testq	%rax, %rax
	jne	LBB0_5
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	24(%rbx), %rbx
	testq	%rbx, %rbx
	jne	LBB0_2
LBB0_4:
	leaq	L_.str(%rip), %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_LOG                            ## TAILCALL
LBB0_5:
	movq	_ERR_OK@GOTPCREL(%rip), %r13
	cmpq	%r12, (%r13)
	jne	LBB0_12
## %bb.6:
	movl	%r15d, 16(%rbx)
	movq	_PBUF_RAW@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_L2CAP_CONN_REQ_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_PBUF_RAM@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	callq	_btpbuf_alloc
	testq	%rax, %rax
	je	LBB0_10
## %bb.7:
	movq	%rax, %r15
	movl	12(%rbx), %edi
	callq	_htole16
	movq	(%r15), %rcx
	movl	%eax, (%rcx)
	movl	8(%rbx), %edi
	callq	_htole16
	movq	(%r15), %rcx
	movl	%eax, 4(%rcx)
	movq	_L2CAP_CONN_REQ@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	xorl	%edx, %edx
	movq	%r14, %rcx
	movq	%r15, %r8
	callq	_l2cap_signal
	cmpq	(%r13), %rax
	jne	LBB0_8
## %bb.13:
	movq	_W4_L2CAP_CONNECT_RSP@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, (%rbx)
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_12:
	leaq	L_.str.2(%rip), %rdi
	jmp	LBB0_11
LBB0_10:
	leaq	L_.str.1(%rip), %rdi
LBB0_11:
	callq	_ERROR
	movq	_L2CAP_CONN_REF_RES@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	xorl	%edx, %edx
                                        ## implicit-def: $rcx
LBB0_9:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_L2CA_ACTION_CONN_CFM           ## TAILCALL
LBB0_8:
	movq	_L2CAP_CONN_REF_RES@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	movq	%rbx, %rdi
	xorl	%edx, %edx
	movq	%rax, %rcx
	jmp	LBB0_9
	.cfi_endproc
                                        ## -- End function
	.comm	_l2cap_active_pcbs,8,3          ## @l2cap_active_pcbs
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"lp_connect_cfm: Silently discard\n"

	.comm	_ERR_OK,8,3                     ## @ERR_OK
	.comm	_PBUF_RAW,4,2                   ## @PBUF_RAW
	.comm	_L2CAP_CONN_REQ_SIZE,4,2        ## @L2CAP_CONN_REQ_SIZE
	.comm	_PBUF_RAM,4,2                   ## @PBUF_RAM
	.comm	_L2CAP_CONN_REQ,4,2             ## @L2CAP_CONN_REQ
	.comm	_W4_L2CAP_CONNECT_RSP,4,2       ## @W4_L2CAP_CONNECT_RSP
	.comm	_L2CAP_CONN_REF_RES,4,2         ## @L2CAP_CONN_REF_RES
L_.str.1:                               ## @.str.1
	.asciz	"lp_connect_cfm: No resources available\n"

L_.str.2:                               ## @.str.2
	.asciz	"lp_connect_cfm: Connection falied\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_lp_connect_cfm                 ; -- Begin function lp_connect_cfm
	.p2align	2
_lp_connect_cfm:                        ; @lp_connect_cfm
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
Lloh0:
	adrp	x8, _l2cap_active_pcbs@GOTPAGE
Lloh1:
	ldr	x8, [x8, _l2cap_active_pcbs@GOTPAGEOFF]
Lloh2:
	ldr	x19, [x8]
	cbz	x19, LBB0_4
; %bb.1:
	mov	x22, x2
	mov	x21, x1
	mov	x23, x0
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	add	x20, x19, #4
	mov	x0, x20
	mov	x1, x23
	bl	_bd_addr_cmp
	cbnz	x0, LBB0_5
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	ldr	x19, [x19, #24]
	cbnz	x19, LBB0_2
LBB0_4:
Lloh3:
	adrp	x0, l_.str@PAGE
Lloh4:
	add	x0, x0, l_.str@PAGEOFF
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	b	_LOG
LBB0_5:
Lloh5:
	adrp	x23, _ERR_OK@GOTPAGE
Lloh6:
	ldr	x23, [x23, _ERR_OK@GOTPAGEOFF]
	ldr	x8, [x23]
	cmp	x8, x22
	b.ne	LBB0_9
; %bb.6:
	str	w21, [x19, #16]
Lloh7:
	adrp	x8, _PBUF_RAW@GOTPAGE
Lloh8:
	ldr	x8, [x8, _PBUF_RAW@GOTPAGEOFF]
Lloh9:
	ldr	w0, [x8]
Lloh10:
	adrp	x8, _L2CAP_CONN_REQ_SIZE@GOTPAGE
Lloh11:
	ldr	x8, [x8, _L2CAP_CONN_REQ_SIZE@GOTPAGEOFF]
Lloh12:
	ldr	w1, [x8]
Lloh13:
	adrp	x8, _PBUF_RAM@GOTPAGE
Lloh14:
	ldr	x8, [x8, _PBUF_RAM@GOTPAGEOFF]
Lloh15:
	ldr	w2, [x8]
	bl	_btpbuf_alloc
	cbz	x0, LBB0_10
; %bb.7:
	mov	x21, x0
	ldr	w0, [x19, #12]
	bl	_htole16
	ldr	x8, [x21]
	str	w0, [x8]
	ldr	w0, [x19, #8]
	bl	_htole16
	ldr	x8, [x21]
	str	w0, [x8, #4]
Lloh16:
	adrp	x8, _L2CAP_CONN_REQ@GOTPAGE
Lloh17:
	ldr	x8, [x8, _L2CAP_CONN_REQ@GOTPAGEOFF]
Lloh18:
	ldr	w1, [x8]
	mov	x0, x19
	mov	w2, #0
	mov	x3, x20
	mov	x4, x21
	bl	_l2cap_signal
	ldr	x8, [x23]
	cmp	x0, x8
	b.ne	LBB0_12
; %bb.8:
Lloh19:
	adrp	x8, _W4_L2CAP_CONNECT_RSP@GOTPAGE
Lloh20:
	ldr	x8, [x8, _W4_L2CAP_CONNECT_RSP@GOTPAGEOFF]
Lloh21:
	ldr	w8, [x8]
	str	w8, [x19]
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
LBB0_9:
Lloh22:
	adrp	x0, l_.str.2@PAGE
Lloh23:
	add	x0, x0, l_.str.2@PAGEOFF
	b	LBB0_11
LBB0_10:
Lloh24:
	adrp	x0, l_.str.1@PAGE
Lloh25:
	add	x0, x0, l_.str.1@PAGEOFF
LBB0_11:
	bl	_ERROR
                                        ; implicit-def: $x3
	b	LBB0_13
LBB0_12:
	mov	x3, x0
LBB0_13:
Lloh26:
	adrp	x8, _L2CAP_CONN_REF_RES@GOTPAGE
Lloh27:
	ldr	x8, [x8, _L2CAP_CONN_REF_RES@GOTPAGEOFF]
Lloh28:
	ldr	w1, [x8]
	mov	x0, x19
	mov	w2, #0
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	b	_L2CA_ACTION_CONN_CFM
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpAdd	Lloh22, Lloh23
	.loh AdrpAdd	Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.cfi_endproc
                                        ; -- End function
	.comm	_l2cap_active_pcbs,8,3          ; @l2cap_active_pcbs
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"lp_connect_cfm: Silently discard\n"

	.comm	_ERR_OK,8,3                     ; @ERR_OK
	.comm	_PBUF_RAW,4,2                   ; @PBUF_RAW
	.comm	_L2CAP_CONN_REQ_SIZE,4,2        ; @L2CAP_CONN_REQ_SIZE
	.comm	_PBUF_RAM,4,2                   ; @PBUF_RAM
	.comm	_L2CAP_CONN_REQ,4,2             ; @L2CAP_CONN_REQ
	.comm	_W4_L2CAP_CONNECT_RSP,4,2       ; @W4_L2CAP_CONNECT_RSP
	.comm	_L2CAP_CONN_REF_RES,4,2         ; @L2CAP_CONN_REF_RES
l_.str.1:                               ; @.str.1
	.asciz	"lp_connect_cfm: No resources available\n"

l_.str.2:                               ; @.str.2
	.asciz	"lp_connect_cfm: Connection falied\n"

.subsections_via_symbols
