	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function l2cap_cid_alloc
_l2cap_cid_alloc:                       ## @l2cap_cid_alloc
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	movq	_L2CAP_MIN_CID@GOTPCREL(%rip), %rax
	movq	(%rax), %r8
	movq	_L2CAP_MAX_CID@GOTPCREL(%rip), %rax
	movq	(%rax), %rdx
	cmpq	%rdx, %r8
	jge	LBB0_1
## %bb.2:
	movq	_l2cap_active_pcbs@GOTPCREL(%rip), %rax
	movq	(%rax), %rcx
	xorl	%eax, %eax
	movq	%r8, %rdi
LBB0_3:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_7 Depth 2
	movq	%rcx, %rsi
	testq	%rcx, %rcx
	je	LBB0_4
	.p2align	4, 0x90
LBB0_7:                                 ##   Parent Loop BB0_3 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	cmpq	%rdi, (%rsi)
	je	LBB0_8
## %bb.5:                               ##   in Loop: Header=BB0_7 Depth=2
	movq	8(%rsi), %rsi
	testq	%rsi, %rsi
	jne	LBB0_7
	jmp	LBB0_6
	.p2align	4, 0x90
LBB0_8:                                 ##   in Loop: Header=BB0_3 Depth=1
	incq	%rdi
	cmpq	%rdx, %rdi
	jne	LBB0_3
## %bb.9:
	popq	%rbp
	retq
LBB0_1:
	xorl	%eax, %eax
	popq	%rbp
	retq
LBB0_6:
	movq	%rdi, %rax
	popq	%rbp
	retq
LBB0_4:
	movq	%r8, %rax
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_L2CAP_MIN_CID,8,3              ## @L2CAP_MIN_CID
	.comm	_L2CAP_MAX_CID,8,3              ## @L2CAP_MAX_CID
	.comm	_l2cap_active_pcbs,8,3          ## @l2cap_active_pcbs
	.no_dead_strip	_l2cap_cid_alloc
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function l2cap_cid_alloc
_l2cap_cid_alloc:                       ; @l2cap_cid_alloc
	.cfi_startproc
; %bb.0:
Lloh0:
	adrp	x8, _L2CAP_MIN_CID@GOTPAGE
Lloh1:
	ldr	x8, [x8, _L2CAP_MIN_CID@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
Lloh3:
	adrp	x9, _L2CAP_MAX_CID@GOTPAGE
Lloh4:
	ldr	x9, [x9, _L2CAP_MAX_CID@GOTPAGEOFF]
Lloh5:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ge	LBB0_7
; %bb.1:
Lloh6:
	adrp	x10, _l2cap_active_pcbs@GOTPAGE
Lloh7:
	ldr	x10, [x10, _l2cap_active_pcbs@GOTPAGEOFF]
Lloh8:
	ldr	x10, [x10]
	mov	x11, x8
LBB0_2:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_3 Depth 2
	mov	x12, x10
	cbz	x10, LBB0_9
LBB0_3:                                 ;   Parent Loop BB0_2 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldr	x13, [x12]
	cmp	x13, x11
	b.eq	LBB0_5
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=2
	ldr	x12, [x12, #8]
	cbnz	x12, LBB0_3
	b	LBB0_8
LBB0_5:                                 ;   in Loop: Header=BB0_2 Depth=1
	mov	x0, #0
	add	x11, x11, #1
	cmp	x11, x9
	b.ne	LBB0_2
; %bb.6:
	ret
LBB0_7:
	mov	x0, #0
	ret
LBB0_8:
	mov	x0, x11
	ret
LBB0_9:
	mov	x0, x8
	ret
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_L2CAP_MIN_CID,8,3              ; @L2CAP_MIN_CID
	.comm	_L2CAP_MAX_CID,8,3              ; @L2CAP_MAX_CID
	.comm	_l2cap_active_pcbs,8,3          ; @l2cap_active_pcbs
	.no_dead_strip	_l2cap_cid_alloc
.subsections_via_symbols
