	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function hclgevf_query_vf_resource
_hclgevf_query_vf_resource:             ## @hclgevf_query_vf_resource
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	subq	$16, %rsp
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rdi, %r14
	movq	_HCLGEVF_OPC_QUERY_VF_RSRC@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-24(%rbp), %rbx
	movq	%rbx, %rdi
	movl	$1, %edx
	callq	_hclgevf_cmd_setup_basic_desc
	leaq	24(%r14), %rdi
	movq	%rbx, %rsi
	movl	$1, %edx
	callq	_hclgevf_cmd_send
	testl	%eax, %eax
	je	LBB0_2
## %bb.1:
	movl	%eax, %ebx
	movq	16(%r14), %rdi
	leaq	L_.str(%rip), %rsi
	movl	%eax, %edx
	callq	_dev_err
	jmp	LBB0_7
LBB0_2:
	movq	-24(%rbp), %rbx
	movq	%r14, %rdi
	callq	_hnae3_dev_roce_supported
	testq	%rax, %rax
	je	LBB0_4
## %bb.3:
	movl	4(%rbx), %edi
	callq	___le16_to_cpu
	movq	_HCLGEVF_MSIX_OFT_ROCEE_M@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	movq	_HCLGEVF_MSIX_OFT_ROCEE_S@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	movl	%eax, %edi
	callq	_hnae3_get_field
	movl	%eax, (%r14)
	movl	(%rbx), %edi
	callq	___le16_to_cpu
	movq	_HCLGEVF_VEC_NUM_M@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	movq	_HCLGEVF_VEC_NUM_S@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	movl	%eax, %edi
	callq	_hnae3_get_field
	movl	%eax, 4(%r14)
	movl	(%r14), %ecx
	addl	%eax, %ecx
	jmp	LBB0_5
LBB0_4:
	movl	(%rbx), %edi
	callq	___le16_to_cpu
	movq	_HCLGEVF_VEC_NUM_M@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	movq	_HCLGEVF_VEC_NUM_S@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	movl	%eax, %edi
	callq	_hnae3_get_field
	movq	%rax, %rcx
LBB0_5:
	movl	%ecx, 12(%r14)
	movl	%eax, 8(%r14)
	movq	_HNAE3_MIN_VECTOR_NUM@GOTPCREL(%rip), %rcx
	xorl	%ebx, %ebx
	cmpl	(%rcx), %eax
	jge	LBB0_7
## %bb.6:
	movq	16(%r14), %rdi
	leaq	L_.str.1(%rip), %rsi
	movl	%eax, %edx
	callq	_dev_err
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_7:
	movl	%ebx, %eax
	addq	$16, %rsp
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_HCLGEVF_OPC_QUERY_VF_RSRC,4,2  ## @HCLGEVF_OPC_QUERY_VF_RSRC
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"query vf resource failed, ret = %d.\n"

	.comm	_HCLGEVF_MSIX_OFT_ROCEE_M,4,2   ## @HCLGEVF_MSIX_OFT_ROCEE_M
	.comm	_HCLGEVF_MSIX_OFT_ROCEE_S,4,2   ## @HCLGEVF_MSIX_OFT_ROCEE_S
	.comm	_HCLGEVF_VEC_NUM_M,4,2          ## @HCLGEVF_VEC_NUM_M
	.comm	_HCLGEVF_VEC_NUM_S,4,2          ## @HCLGEVF_VEC_NUM_S
	.comm	_HNAE3_MIN_VECTOR_NUM,4,2       ## @HNAE3_MIN_VECTOR_NUM
L_.str.1:                               ## @.str.1
	.asciz	"Just %u msi resources, not enough for vf(min:2).\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
	.no_dead_strip	_hclgevf_query_vf_resource
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function hclgevf_query_vf_resource
_hclgevf_query_vf_resource:             ; @hclgevf_query_vf_resource
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #48
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x0
Lloh0:
	adrp	x8, _HCLGEVF_OPC_QUERY_VF_RSRC@GOTPAGE
Lloh1:
	ldr	x8, [x8, _HCLGEVF_OPC_QUERY_VF_RSRC@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	add	x0, sp, #8
	mov	w2, #1
	bl	_hclgevf_cmd_setup_basic_desc
	add	x0, x19, #24
	add	x1, sp, #8
	mov	w2, #1
	bl	_hclgevf_cmd_send
	cbz	w0, LBB0_2
; %bb.1:
	mov	x20, x0
	ldr	x0, [x19, #16]
Lloh3:
	adrp	x1, l_.str@PAGE
Lloh4:
	add	x1, x1, l_.str@PAGEOFF
	mov	x2, x20
	bl	_dev_err
	b	LBB0_8
LBB0_2:
	ldr	x20, [sp, #8]
	mov	x0, x19
	bl	_hnae3_dev_roce_supported
	cbz	x0, LBB0_4
; %bb.3:
	ldr	w0, [x20, #4]
	bl	___le16_to_cpu
Lloh5:
	adrp	x8, _HCLGEVF_MSIX_OFT_ROCEE_M@GOTPAGE
Lloh6:
	ldr	x8, [x8, _HCLGEVF_MSIX_OFT_ROCEE_M@GOTPAGEOFF]
Lloh7:
	ldr	w1, [x8]
Lloh8:
	adrp	x8, _HCLGEVF_MSIX_OFT_ROCEE_S@GOTPAGE
Lloh9:
	ldr	x8, [x8, _HCLGEVF_MSIX_OFT_ROCEE_S@GOTPAGEOFF]
Lloh10:
	ldr	w2, [x8]
	bl	_hnae3_get_field
	str	w0, [x19]
	ldr	w0, [x20]
	bl	___le16_to_cpu
Lloh11:
	adrp	x8, _HCLGEVF_VEC_NUM_M@GOTPAGE
Lloh12:
	ldr	x8, [x8, _HCLGEVF_VEC_NUM_M@GOTPAGEOFF]
Lloh13:
	ldr	w1, [x8]
Lloh14:
	adrp	x8, _HCLGEVF_VEC_NUM_S@GOTPAGE
Lloh15:
	ldr	x8, [x8, _HCLGEVF_VEC_NUM_S@GOTPAGEOFF]
Lloh16:
	ldr	w2, [x8]
	bl	_hnae3_get_field
	mov	x2, x0
	str	w2, [x19, #4]
	ldr	w8, [x19]
	add	w0, w8, w2
	b	LBB0_5
LBB0_4:
	ldr	w0, [x20]
	bl	___le16_to_cpu
Lloh17:
	adrp	x8, _HCLGEVF_VEC_NUM_M@GOTPAGE
Lloh18:
	ldr	x8, [x8, _HCLGEVF_VEC_NUM_M@GOTPAGEOFF]
Lloh19:
	ldr	w1, [x8]
Lloh20:
	adrp	x8, _HCLGEVF_VEC_NUM_S@GOTPAGE
Lloh21:
	ldr	x8, [x8, _HCLGEVF_VEC_NUM_S@GOTPAGEOFF]
Lloh22:
	ldr	w2, [x8]
	bl	_hnae3_get_field
	mov	x2, x0
LBB0_5:
	stp	w2, w0, [x19, #8]
Lloh23:
	adrp	x8, _HNAE3_MIN_VECTOR_NUM@GOTPAGE
Lloh24:
	ldr	x8, [x8, _HNAE3_MIN_VECTOR_NUM@GOTPAGEOFF]
Lloh25:
	ldr	w8, [x8]
	cmp	w2, w8
	b.ge	LBB0_7
; %bb.6:
	ldr	x0, [x19, #16]
Lloh26:
	adrp	x1, l_.str.1@PAGE
Lloh27:
	add	x1, x1, l_.str.1@PAGEOFF
                                        ; kill: def $w2 killed $w2 killed $x2
	bl	_dev_err
Lloh28:
	adrp	x8, _EINVAL@GOTPAGE
Lloh29:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh30:
	ldr	w8, [x8]
	neg	w20, w8
	b	LBB0_8
LBB0_7:
	mov	w20, #0
LBB0_8:
	mov	x0, x20
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.loh AdrpAdd	Lloh26, Lloh27
	.cfi_endproc
                                        ; -- End function
	.comm	_HCLGEVF_OPC_QUERY_VF_RSRC,4,2  ; @HCLGEVF_OPC_QUERY_VF_RSRC
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"query vf resource failed, ret = %d.\n"

	.comm	_HCLGEVF_MSIX_OFT_ROCEE_M,4,2   ; @HCLGEVF_MSIX_OFT_ROCEE_M
	.comm	_HCLGEVF_MSIX_OFT_ROCEE_S,4,2   ; @HCLGEVF_MSIX_OFT_ROCEE_S
	.comm	_HCLGEVF_VEC_NUM_M,4,2          ; @HCLGEVF_VEC_NUM_M
	.comm	_HCLGEVF_VEC_NUM_S,4,2          ; @HCLGEVF_VEC_NUM_S
	.comm	_HNAE3_MIN_VECTOR_NUM,4,2       ; @HNAE3_MIN_VECTOR_NUM
l_.str.1:                               ; @.str.1
	.asciz	"Just %u msi resources, not enough for vf(min:2).\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
	.no_dead_strip	_hclgevf_query_vf_resource
.subsections_via_symbols
