	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	__qed_cxt_acquire_cid           ## -- Begin function _qed_cxt_acquire_cid
	.p2align	4, 0x90
__qed_cxt_acquire_cid:                  ## @_qed_cxt_acquire_cid
	.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	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, %ebx
	movq	%rdi, %r15
	movq	_MAX_CONN_TYPES@GOTPCREL(%rip), %rax
	cmpl	%esi, (%rax)
	jbe	LBB0_1
## %bb.4:
	movq	%rcx, %r14
	movq	%rdx, %r12
	movq	(%r15), %rax
	movq	_MAX_NUM_VFS@GOTPCREL(%rip), %rdx
	movq	_QED_CXT_PF_CID@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	cmpq	%r14, (%rdx)
	ja	LBB0_7
## %bb.5:
	cmpq	%r14, %rcx
	je	LBB0_7
## %bb.6:
	leaq	L_.str.1(%rip), %rsi
	movq	%r15, %rdi
	movl	%r14d, %edx
	jmp	LBB0_3
LBB0_7:
	cmpq	%r14, %rcx
	jne	LBB0_9
## %bb.8:
	movl	%ebx, %ecx
	leaq	(%rcx,%rcx,2), %r13
	shlq	$3, %r13
	addq	8(%rax), %r13
	jmp	LBB0_10
LBB0_9:
	movq	(%rax), %rax
	movl	%ebx, %ecx
	leaq	(%r14,%r14,2), %r13
	shlq	$3, %r13
	addq	(%rax,%rcx,8), %r13
LBB0_10:
	movl	16(%r13), %edi
	testl	%edi, %edi
	je	LBB0_1
## %bb.11:
	movq	(%r13), %rsi
	callq	_find_first_zero_bit
	cmpq	(%r13), %rax
	jge	LBB0_12
## %bb.13:
	movl	16(%r13), %esi
	movq	%rax, %rdi
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	callq	___set_bit
	movq	8(%r13), %rcx
	movq	-48(%rbp), %r8                  ## 8-byte Reload
	addq	%r8, %rcx
	movq	%rcx, (%r12)
	movq	_QED_MSG_CXT@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	%ebx, (%rsp)
	leaq	L_.str.3(%rip), %rdx
	movq	%r15, %rdi
	movq	%r14, %r9
	callq	_DP_VERBOSE
	xorl	%eax, %eax
	jmp	LBB0_14
LBB0_1:
	leaq	L_.str(%rip), %rsi
LBB0_2:
	movq	%r15, %rdi
	movl	%ebx, %edx
LBB0_3:
	callq	_DP_NOTICE
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_14:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_12:
	leaq	L_.str.2(%rip), %rsi
	jmp	LBB0_2
	.cfi_endproc
                                        ## -- End function
	.comm	_MAX_CONN_TYPES,4,2             ## @MAX_CONN_TYPES
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Invalid protocol type %d"

	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_MAX_NUM_VFS,8,3                ## @MAX_NUM_VFS
	.comm	_QED_CXT_PF_CID,8,3             ## @QED_CXT_PF_CID
L_.str.1:                               ## @.str.1
	.asciz	"VF [%02x] is out of range\n"

L_.str.2:                               ## @.str.2
	.asciz	"no CID available for protocol %d\n"

	.comm	_QED_MSG_CXT,4,2                ## @QED_MSG_CXT
L_.str.3:                               ## @.str.3
	.asciz	"Acquired cid 0x%08x [rel. %08x] vfid %02x type %d\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	__qed_cxt_acquire_cid           ; -- Begin function _qed_cxt_acquire_cid
	.p2align	2
__qed_cxt_acquire_cid:                  ; @_qed_cxt_acquire_cid
	.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
	mov	x19, x1
	mov	x21, x0
Lloh0:
	adrp	x8, _MAX_CONN_TYPES@GOTPAGE
Lloh1:
	ldr	x8, [x8, _MAX_CONN_TYPES@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	cmp	w8, w1
	b.ls	LBB0_8
; %bb.1:
	mov	x20, x3
Lloh3:
	adrp	x8, _MAX_NUM_VFS@GOTPAGE
Lloh4:
	ldr	x8, [x8, _MAX_NUM_VFS@GOTPAGEOFF]
Lloh5:
	ldr	x9, [x8]
Lloh6:
	adrp	x8, _QED_CXT_PF_CID@GOTPAGE
Lloh7:
	ldr	x8, [x8, _QED_CXT_PF_CID@GOTPAGEOFF]
Lloh8:
	ldr	x8, [x8]
	cmp	x9, x3
	ccmp	x8, x3, #4, ls
	b.ne	LBB0_6
; %bb.2:
	mov	x22, x2
	ldr	x9, [x21]
	cmp	x8, x20
	b.ne	LBB0_7
; %bb.3:
	ldr	x8, [x9, #8]
	mov	w9, #24
	umaddl	x24, w19, w9, x8
	ldr	w0, [x24, #16]
	cbz	w0, LBB0_8
LBB0_4:
	ldr	x1, [x24]
	bl	_find_first_zero_bit
	ldr	x8, [x24]
	cmp	x0, x8
	b.ge	LBB0_12
; %bb.5:
	mov	x23, x0
	ldr	w1, [x24, #16]
	bl	___set_bit
	ldr	x8, [x24, #8]
	add	x3, x8, x23
	str	x3, [x22]
Lloh9:
	adrp	x8, _QED_MSG_CXT@GOTPAGE
Lloh10:
	ldr	x8, [x8, _QED_MSG_CXT@GOTPAGEOFF]
Lloh11:
	ldr	w1, [x8]
Lloh12:
	adrp	x2, l_.str.3@PAGE
Lloh13:
	add	x2, x2, l_.str.3@PAGEOFF
	mov	x0, x21
	mov	x4, x23
	mov	x5, x20
	mov	x6, x19
	bl	_DP_VERBOSE
	mov	w0, #0
	b	LBB0_11
LBB0_6:
Lloh14:
	adrp	x1, l_.str.1@PAGE
Lloh15:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x21
	mov	x2, x20
	b	LBB0_10
LBB0_7:
	ldr	x8, [x9]
	ldr	x8, [x8, w19, uxtw #3]
	mov	w9, #24
	madd	x24, x20, x9, x8
	ldr	w0, [x24, #16]
	cbnz	w0, LBB0_4
LBB0_8:
Lloh16:
	adrp	x1, l_.str@PAGE
Lloh17:
	add	x1, x1, l_.str@PAGEOFF
LBB0_9:
	mov	x0, x21
	mov	x2, x19
LBB0_10:
	bl	_DP_NOTICE
Lloh18:
	adrp	x8, _EINVAL@GOTPAGE
Lloh19:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh20:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_11:
	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_12:
Lloh21:
	adrp	x1, l_.str.2@PAGE
Lloh22:
	add	x1, x1, l_.str.2@PAGEOFF
	b	LBB0_9
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpAdd	Lloh21, Lloh22
	.cfi_endproc
                                        ; -- End function
	.comm	_MAX_CONN_TYPES,4,2             ; @MAX_CONN_TYPES
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Invalid protocol type %d"

	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_MAX_NUM_VFS,8,3                ; @MAX_NUM_VFS
	.comm	_QED_CXT_PF_CID,8,3             ; @QED_CXT_PF_CID
l_.str.1:                               ; @.str.1
	.asciz	"VF [%02x] is out of range\n"

l_.str.2:                               ; @.str.2
	.asciz	"no CID available for protocol %d\n"

	.comm	_QED_MSG_CXT,4,2                ; @QED_MSG_CXT
l_.str.3:                               ; @.str.3
	.asciz	"Acquired cid 0x%08x [rel. %08x] vfid %02x type %d\n"

.subsections_via_symbols
