	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function hclgevf_init_msi
_hclgevf_init_msi:                      ## @hclgevf_init_msi
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	movq	48(%rdi), %r14
	callq	_hnae3_dev_roce_supported
	testq	%rax, %rax
	je	LBB0_2
## %bb.1:
	movq	24(%rbx), %rsi
	incq	%rsi
	movl	(%rbx), %edx
	movq	_PCI_IRQ_MSIX@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	jmp	LBB0_3
LBB0_2:
	movq	_HNAE3_MIN_VECTOR_NUM@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	movl	(%rbx), %edx
	movq	_PCI_IRQ_MSI@GOTPCREL(%rip), %rax
	movq	_PCI_IRQ_MSIX@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	orl	(%rax), %ecx
LBB0_3:
	movq	%r14, %rdi
	callq	_pci_alloc_irq_vectors
	movl	%eax, %r15d
	testl	%eax, %eax
	js	LBB0_4
## %bb.5:
	movl	(%rbx), %edx
	cmpl	%edx, %r15d
	jge	LBB0_7
## %bb.6:
	movq	48(%rbx), %rdi
	leaq	L_.str.1(%rip), %rsi
	movl	%r15d, %ecx
	callq	_dev_warn
LBB0_7:
	movl	%r15d, (%rbx)
	movl	%r15d, 4(%rbx)
	movq	8(%r14), %rax
	movq	%rax, 40(%rbx)
	addq	24(%rbx), %rax
	movq	%rax, 32(%rbx)
	movq	_GFP_KERNEL@GOTPCREL(%rip), %r12
	movl	(%r12), %ecx
	movq	%r14, %rdi
	movl	%r15d, %esi
	movl	$4, %edx
	callq	_devm_kcalloc
	movq	%rax, 8(%rbx)
	testq	%rax, %rax
	je	LBB0_13
## %bb.8:
	movl	(%rbx), %esi
	testl	%esi, %esi
	jle	LBB0_11
## %bb.9:
	xorl	%ecx, %ecx
	movq	_HCLGEVF_INVALID_VPORT@GOTPCREL(%rip), %rdx
	.p2align	4, 0x90
LBB0_10:                                ## =>This Inner Loop Header: Depth=1
	movl	(%rdx), %esi
	movl	%esi, (%rax,%rcx,4)
	incq	%rcx
	movslq	(%rbx), %rsi
	cmpq	%rsi, %rcx
	jl	LBB0_10
LBB0_11:
	movl	(%r12), %ecx
	movq	%r14, %rdi
                                        ## kill: def $esi killed $esi killed $rsi
	movl	$4, %edx
	callq	_devm_kcalloc
	movq	%rax, 16(%rbx)
	xorl	%r15d, %r15d
	testq	%rax, %rax
	jne	LBB0_14
## %bb.12:
	movq	8(%rbx), %rsi
	movq	%r14, %rdi
	callq	_devm_kfree
LBB0_13:
	movq	%r14, %rdi
	callq	_pci_free_irq_vectors
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%r15d, %r15d
	subl	(%rax), %r15d
	jmp	LBB0_14
LBB0_4:
	leaq	L_.str(%rip), %rsi
	movq	%r14, %rdi
	movl	%r15d, %edx
	callq	_dev_err
LBB0_14:
	movl	%r15d, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_PCI_IRQ_MSIX,4,2               ## @PCI_IRQ_MSIX
	.comm	_HNAE3_MIN_VECTOR_NUM,8,3       ## @HNAE3_MIN_VECTOR_NUM
	.comm	_PCI_IRQ_MSI,4,2                ## @PCI_IRQ_MSI
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"failed(%d) to allocate MSI/MSI-X vectors\n"

L_.str.1:                               ## @.str.1
	.asciz	"requested %d MSI/MSI-X, but allocated %d MSI/MSI-X\n"

	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_HCLGEVF_INVALID_VPORT,4,2      ## @HCLGEVF_INVALID_VPORT
	.no_dead_strip	_hclgevf_init_msi
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function hclgevf_init_msi
_hclgevf_init_msi:                      ; @hclgevf_init_msi
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w21, -40
	.cfi_offset w22, -48
	mov	x20, x0
	ldr	x19, [x0, #48]
	bl	_hnae3_dev_roce_supported
	cbz	x0, LBB0_2
; %bb.1:
	ldr	x8, [x20, #24]
	add	x1, x8, #1
	ldr	w2, [x20]
Lloh0:
	adrp	x8, _PCI_IRQ_MSIX@GOTPAGE
Lloh1:
	ldr	x8, [x8, _PCI_IRQ_MSIX@GOTPAGEOFF]
Lloh2:
	ldr	w3, [x8]
	b	LBB0_3
LBB0_2:
Lloh3:
	adrp	x8, _HNAE3_MIN_VECTOR_NUM@GOTPAGE
Lloh4:
	ldr	x8, [x8, _HNAE3_MIN_VECTOR_NUM@GOTPAGEOFF]
Lloh5:
	ldr	x1, [x8]
Lloh6:
	adrp	x8, _PCI_IRQ_MSI@GOTPAGE
Lloh7:
	ldr	x8, [x8, _PCI_IRQ_MSI@GOTPAGEOFF]
	ldr	w2, [x20]
Lloh8:
	ldr	w8, [x8]
Lloh9:
	adrp	x9, _PCI_IRQ_MSIX@GOTPAGE
Lloh10:
	ldr	x9, [x9, _PCI_IRQ_MSIX@GOTPAGEOFF]
Lloh11:
	ldr	w9, [x9]
	orr	w3, w9, w8
LBB0_3:
	mov	x0, x19
	bl	_pci_alloc_irq_vectors
	mov	x21, x0
	tbnz	w0, #31, LBB0_12
; %bb.4:
	ldr	w2, [x20]
	cmp	w21, w2
	b.ge	LBB0_6
; %bb.5:
	ldr	x0, [x20, #48]
Lloh12:
	adrp	x1, l_.str.1@PAGE
Lloh13:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x3, x21
	bl	_dev_warn
LBB0_6:
	stp	w21, w21, [x20]
	ldr	x8, [x19, #8]
	ldr	x9, [x20, #24]
	add	x9, x9, x8
	stp	x9, x8, [x20, #32]
Lloh14:
	adrp	x22, _GFP_KERNEL@GOTPAGE
Lloh15:
	ldr	x22, [x22, _GFP_KERNEL@GOTPAGEOFF]
	ldr	w3, [x22]
	mov	x0, x19
	mov	x1, x21
	mov	w2, #4
	bl	_devm_kcalloc
	str	x0, [x20, #8]
	cbz	x0, LBB0_14
; %bb.7:
	ldr	w1, [x20]
	cmp	w1, #1
	b.lt	LBB0_10
; %bb.8:
	mov	x8, #0
Lloh16:
	adrp	x9, _HCLGEVF_INVALID_VPORT@GOTPAGE
Lloh17:
	ldr	x9, [x9, _HCLGEVF_INVALID_VPORT@GOTPAGEOFF]
LBB0_9:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w10, [x9]
	str	w10, [x0, x8, lsl #2]
	add	x8, x8, #1
	ldrsw	x1, [x20]
	cmp	x8, x1
	b.lt	LBB0_9
LBB0_10:
	ldr	w3, [x22]
	mov	x0, x19
                                        ; kill: def $w1 killed $w1 killed $x1
	mov	w2, #4
	bl	_devm_kcalloc
	str	x0, [x20, #16]
	cbz	x0, LBB0_13
; %bb.11:
	mov	w21, #0
	b	LBB0_15
LBB0_12:
Lloh18:
	adrp	x1, l_.str@PAGE
Lloh19:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	mov	x2, x21
	bl	_dev_err
	b	LBB0_15
LBB0_13:
	ldr	x1, [x20, #8]
	mov	x0, x19
	bl	_devm_kfree
LBB0_14:
	mov	x0, x19
	bl	_pci_free_irq_vectors
Lloh20:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh21:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh22:
	ldr	w8, [x8]
	neg	w21, w8
LBB0_15:
	mov	x0, x21
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh16, Lloh17
	.loh AdrpAdd	Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.cfi_endproc
                                        ; -- End function
	.comm	_PCI_IRQ_MSIX,4,2               ; @PCI_IRQ_MSIX
	.comm	_HNAE3_MIN_VECTOR_NUM,8,3       ; @HNAE3_MIN_VECTOR_NUM
	.comm	_PCI_IRQ_MSI,4,2                ; @PCI_IRQ_MSI
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"failed(%d) to allocate MSI/MSI-X vectors\n"

l_.str.1:                               ; @.str.1
	.asciz	"requested %d MSI/MSI-X, but allocated %d MSI/MSI-X\n"

	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_HCLGEVF_INVALID_VPORT,4,2      ; @HCLGEVF_INVALID_VPORT
	.no_dead_strip	_hclgevf_init_msi
.subsections_via_symbols
