	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function i40e_alloc_vf_res
_i40e_alloc_vf_res:                     ## @i40e_alloc_vf_res
	.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	%rdi, %r14
	movq	(%rdi), %rax
	movq	56(%rdi), %r12
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	_I40E_DEFAULT_QUEUES_PER_VF@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movq	(%r12), %rdx
	addq	%rcx, %rdx
	cmpq	%rdx, %rax
	jg	LBB0_3
	jmp	LBB0_4
LBB0_1:
	movq	_I40E_DEFAULT_QUEUES_PER_VF@GOTPCREL(%rip), %rax
	movq	(%rax), %rcx
LBB0_3:
	movq	%rcx, %rax
LBB0_4:
	movq	%rax, 8(%r12)
	movq	%r14, %rdi
	xorl	%esi, %esi
	callq	_i40e_alloc_vsi_res
	movl	%eax, %r15d
	testl	%eax, %eax
	je	LBB0_5
LBB0_12:
	movq	%r14, %rdi
	callq	_i40e_free_vf_res
	jmp	LBB0_22
LBB0_5:
	movq	24(%r12), %rax
	movq	8(%r14), %rcx
	movq	(%rax,%rcx,8), %rax
	movq	(%rax), %r15
	cmpl	$0, 16(%r14)
	je	LBB0_15
## %bb.6:
	movq	_I40E_MAX_VF_QUEUES@GOTPCREL(%rip), %r13
	movq	(%r13), %rbx
	movq	_I40E_DEFAULT_QUEUES_PER_VF@GOTPCREL(%rip), %rax
	movq	%rbx, %rcx
	subq	(%rax), %rcx
	cmpq	%rcx, (%r12)
	jge	LBB0_7
## %bb.14:
	movq	16(%r12), %rdi
	movl	48(%r14), %edx
	leaq	L_.str(%rip), %rsi
	callq	_dev_info
	movl	$0, 16(%r14)
LBB0_15:
	movq	%r15, %rbx
LBB0_16:
	movslq	%ebx, %rcx
	movq	_I40E_DEFAULT_QUEUES_PER_VF@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	subq	%rcx, %rax
	jge	LBB0_18
## %bb.17:
	addq	%rax, (%r12)
LBB0_18:
	leaq	32(%r14), %rsi
	cmpq	$0, 40(%r14)
	movq	_I40E_VIRTCHNL_VF_CAP_PRIVILEGE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	je	LBB0_20
## %bb.19:
	callq	_set_bit
	jmp	LBB0_21
LBB0_20:
	callq	_clear_bit
LBB0_21:
	movl	%ebx, 24(%r14)
	movq	_I40E_VF_STATE_INIT@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	addq	$28, %r14
	movq	%r14, %rsi
	callq	_set_bit
	xorl	%r15d, %r15d
LBB0_22:
	movl	%r15d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_7:
	cmpl	$2, 20(%r14)
	jl	LBB0_16
## %bb.8:
	movl	$1, %ebx
	.p2align	4, 0x90
LBB0_10:                                ## =>This Inner Loop Header: Depth=1
	movq	%r14, %rdi
	movl	%ebx, %esi
	callq	_i40e_alloc_vsi_res
	testl	%eax, %eax
	jne	LBB0_11
## %bb.9:                               ##   in Loop: Header=BB0_10 Depth=1
	incl	%ebx
	cmpl	20(%r14), %ebx
	jl	LBB0_10
## %bb.13:
	movq	(%r13), %rbx
	jmp	LBB0_16
LBB0_11:
	movl	%eax, %r15d
	jmp	LBB0_12
	.cfi_endproc
                                        ## -- End function
	.comm	_I40E_DEFAULT_QUEUES_PER_VF,8,3 ## @I40E_DEFAULT_QUEUES_PER_VF
	.comm	_I40E_MAX_VF_QUEUES,8,3         ## @I40E_MAX_VF_QUEUES
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"VF %d: Not enough queues to allocate, disabling ADq\n"

	.comm	_I40E_VIRTCHNL_VF_CAP_PRIVILEGE,4,2 ## @I40E_VIRTCHNL_VF_CAP_PRIVILEGE
	.comm	_I40E_VF_STATE_INIT,4,2         ## @I40E_VF_STATE_INIT
	.no_dead_strip	_i40e_alloc_vf_res
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function i40e_alloc_vf_res
_i40e_alloc_vf_res:                     ; @i40e_alloc_vf_res
	.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, x0
	ldr	x22, [x0, #56]
	ldr	x8, [x0]
	cbz	x8, LBB0_2
; %bb.1:
	ldr	x10, [x22]
Lloh0:
	adrp	x9, _I40E_DEFAULT_QUEUES_PER_VF@GOTPAGE
Lloh1:
	ldr	x9, [x9, _I40E_DEFAULT_QUEUES_PER_VF@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	add	x10, x9, x10
	cmp	x8, x10
	b.gt	LBB0_3
	b	LBB0_4
LBB0_2:
Lloh3:
	adrp	x8, _I40E_DEFAULT_QUEUES_PER_VF@GOTPAGE
Lloh4:
	ldr	x8, [x8, _I40E_DEFAULT_QUEUES_PER_VF@GOTPAGEOFF]
Lloh5:
	ldr	x9, [x8]
LBB0_3:
	mov	x8, x9
LBB0_4:
	str	x8, [x22, #8]
	mov	x0, x19
	mov	w1, #0
	bl	_i40e_alloc_vsi_res
	mov	x20, x0
	cbz	w0, LBB0_6
LBB0_5:
	mov	x0, x19
	bl	_i40e_free_vf_res
	b	LBB0_20
LBB0_6:
	ldr	x8, [x22, #24]
	ldr	x9, [x19, #8]
	ldr	x8, [x8, x9, lsl #3]
	ldr	x20, [x8]
	ldr	w8, [x19, #16]
	cbz	w8, LBB0_14
; %bb.7:
	ldr	x9, [x22]
Lloh6:
	adrp	x23, _I40E_MAX_VF_QUEUES@GOTPAGE
Lloh7:
	ldr	x23, [x23, _I40E_MAX_VF_QUEUES@GOTPAGEOFF]
	ldr	x8, [x23]
Lloh8:
	adrp	x10, _I40E_DEFAULT_QUEUES_PER_VF@GOTPAGE
Lloh9:
	ldr	x10, [x10, _I40E_DEFAULT_QUEUES_PER_VF@GOTPAGEOFF]
Lloh10:
	ldr	x10, [x10]
	sub	x10, x8, x10
	cmp	x9, x10
	b.ge	LBB0_9
; %bb.8:
	ldr	x0, [x22, #16]
	ldr	w2, [x19, #48]
Lloh11:
	adrp	x1, l_.str@PAGE
Lloh12:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_info
	str	wzr, [x19, #16]
	b	LBB0_14
LBB0_9:
	ldr	w9, [x19, #20]
	mov	x20, x8
	cmp	w9, #2
	b.lt	LBB0_14
; %bb.10:
	mov	w21, #1
LBB0_11:                                ; =>This Inner Loop Header: Depth=1
	mov	x0, x19
	mov	x1, x21
	bl	_i40e_alloc_vsi_res
	cbnz	w0, LBB0_21
; %bb.12:                               ;   in Loop: Header=BB0_11 Depth=1
	add	w21, w21, #1
	ldr	w8, [x19, #20]
	cmp	w21, w8
	b.lt	LBB0_11
; %bb.13:
	ldr	x20, [x23]
LBB0_14:
	sxtw	x8, w20
Lloh13:
	adrp	x9, _I40E_DEFAULT_QUEUES_PER_VF@GOTPAGE
Lloh14:
	ldr	x9, [x9, _I40E_DEFAULT_QUEUES_PER_VF@GOTPAGEOFF]
Lloh15:
	ldr	x9, [x9]
	subs	x8, x9, x8
	b.ge	LBB0_16
; %bb.15:
	ldr	x9, [x22]
	add	x8, x8, x9
	str	x8, [x22]
LBB0_16:
	ldr	x8, [x19, #40]
Lloh16:
	adrp	x9, _I40E_VIRTCHNL_VF_CAP_PRIVILEGE@GOTPAGE
Lloh17:
	ldr	x9, [x9, _I40E_VIRTCHNL_VF_CAP_PRIVILEGE@GOTPAGEOFF]
Lloh18:
	ldr	w0, [x9]
	add	x1, x19, #32
	cbz	x8, LBB0_18
; %bb.17:
	bl	_set_bit
	b	LBB0_19
LBB0_18:
	bl	_clear_bit
LBB0_19:
	str	w20, [x19, #24]
Lloh19:
	adrp	x8, _I40E_VF_STATE_INIT@GOTPAGE
Lloh20:
	ldr	x8, [x8, _I40E_VF_STATE_INIT@GOTPAGEOFF]
Lloh21:
	ldr	w0, [x8]
	add	x1, x19, #28
	bl	_set_bit
	mov	w20, #0
LBB0_20:
	mov	x0, x20
	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_21:
	mov	x20, x0
	b	LBB0_5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.cfi_endproc
                                        ; -- End function
	.comm	_I40E_DEFAULT_QUEUES_PER_VF,8,3 ; @I40E_DEFAULT_QUEUES_PER_VF
	.comm	_I40E_MAX_VF_QUEUES,8,3         ; @I40E_MAX_VF_QUEUES
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"VF %d: Not enough queues to allocate, disabling ADq\n"

	.comm	_I40E_VIRTCHNL_VF_CAP_PRIVILEGE,4,2 ; @I40E_VIRTCHNL_VF_CAP_PRIVILEGE
	.comm	_I40E_VF_STATE_INIT,4,2         ; @I40E_VF_STATE_INIT
	.no_dead_strip	_i40e_alloc_vf_res
.subsections_via_symbols
