	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_l2cap_new                      ## -- Begin function l2cap_new
	.p2align	4, 0x90
_l2cap_new:                             ## @l2cap_new
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -24
	movq	_l2cap_pcbs@GOTPCREL(%rip), %rdi
	callq	_btmemb_alloc
	movq	%rax, %rbx
	testq	%rax, %rax
	je	LBB0_2
## %bb.1:
	movq	%rbx, %rdi
	xorl	%esi, %esi
	movl	$40, %edx
	callq	_memset
	movq	_L2CAP_CLOSED@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 32(%rbx)
	movq	_L2CAP_MTU@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 28(%rbx)
	movabsq	$281470681744032, %rax          ## imm = 0xFFFF000002A0
	movq	%rax, (%rbx)
	movl	$65535, 8(%rbx)                 ## imm = 0xFFFF
	movq	_L2CAP_CFG_TO@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 24(%rbx)
	movq	$0, 16(%rbx)
	jmp	LBB0_3
LBB0_2:
	leaq	L_.str(%rip), %rdi
	callq	_ERROR
LBB0_3:
	movq	%rbx, %rax
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_l2cap_pcbs,4,2                 ## @l2cap_pcbs
	.comm	_L2CAP_CLOSED,4,2               ## @L2CAP_CLOSED
	.comm	_L2CAP_MTU,4,2                  ## @L2CAP_MTU
	.comm	_L2CAP_CFG_TO,4,2               ## @L2CAP_CFG_TO
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"l2cap_new: Could not allocate memory for pcb\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal8,8byte_literals
	.p2align	3                               ; -- Begin function l2cap_new
lCPI0_0:
	.long	672                             ; 0x2a0
	.long	65535                           ; 0xffff
	.section	__TEXT,__text,regular,pure_instructions
	.globl	_l2cap_new
	.p2align	2
_l2cap_new:                             ; @l2cap_new
	.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	x0, _l2cap_pcbs@GOTPAGE
Lloh1:
	ldr	x0, [x0, _l2cap_pcbs@GOTPAGEOFF]
	bl	_btmemb_alloc
	mov	x19, x0
	cbz	x0, LBB0_2
; %bb.1:
	mov	x0, x19
	mov	w1, #0
	mov	w2, #40
	bl	_memset
Lloh2:
	adrp	x8, _L2CAP_CLOSED@GOTPAGE
Lloh3:
	ldr	x8, [x8, _L2CAP_CLOSED@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	str	w8, [x19, #32]
Lloh5:
	adrp	x8, _L2CAP_MTU@GOTPAGE
Lloh6:
	ldr	x8, [x8, _L2CAP_MTU@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
Lloh8:
	adrp	x9, lCPI0_0@PAGE
Lloh9:
	ldr	d0, [x9, lCPI0_0@PAGEOFF]
	str	d0, [x19]
	mov	w9, #65535
	str	w9, [x19, #8]
Lloh10:
	adrp	x9, _L2CAP_CFG_TO@GOTPAGE
Lloh11:
	ldr	x9, [x9, _L2CAP_CFG_TO@GOTPAGEOFF]
Lloh12:
	ldr	w9, [x9]
	stp	w9, w8, [x19, #24]
	str	xzr, [x19, #16]
	b	LBB0_3
LBB0_2:
Lloh13:
	adrp	x0, l_.str@PAGE
Lloh14:
	add	x0, x0, l_.str@PAGEOFF
	bl	_ERROR
LBB0_3:
	mov	x0, x19
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdr	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.comm	_l2cap_pcbs,4,2                 ; @l2cap_pcbs
	.comm	_L2CAP_CLOSED,4,2               ; @L2CAP_CLOSED
	.comm	_L2CAP_MTU,4,2                  ; @L2CAP_MTU
	.comm	_L2CAP_CFG_TO,4,2               ; @L2CAP_CFG_TO
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"l2cap_new: Could not allocate memory for pcb\n"

.subsections_via_symbols
