	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function hns3_pci_sriov_configure
_hns3_pci_sriov_configure:              ## @hns3_pci_sriov_configure
	.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
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movl	%esi, %ebx
	movq	%rdi, %r14
	callq	_hns3_is_phys_func
	testq	%rax, %rax
	je	LBB0_2
## %bb.1:
	movq	_CONFIG_PCI_IOV@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_IS_ENABLED
	testq	%rax, %rax
	je	LBB0_2
## %bb.3:
	movq	%r14, %rdi
	testl	%ebx, %ebx
	je	LBB0_6
## %bb.4:
	movl	%ebx, %esi
	callq	_pci_enable_sriov
	testl	%eax, %eax
	je	LBB0_10
## %bb.5:
	leaq	L_.str.1(%rip), %rsi
	movq	%r14, %rdi
	movl	%eax, %edx
	callq	_dev_err
	jmp	LBB0_9
LBB0_2:
	leaq	L_.str(%rip), %rsi
	movq	%r14, %rdi
	callq	_dev_warn
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_10
LBB0_6:
	callq	_pci_vfs_assigned
	testl	%eax, %eax
	je	LBB0_7
## %bb.8:
	leaq	L_.str.2(%rip), %rsi
	movq	%r14, %rdi
	callq	_dev_warn
	jmp	LBB0_9
LBB0_7:
	movq	%r14, %rdi
	callq	_pci_disable_sriov
LBB0_9:
	xorl	%ebx, %ebx
LBB0_10:
	movl	%ebx, %eax
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_CONFIG_PCI_IOV,4,2             ## @CONFIG_PCI_IOV
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Can not config SRIOV\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
L_.str.1:                               ## @.str.1
	.asciz	"SRIOV enable failed %d\n"

L_.str.2:                               ## @.str.2
	.asciz	"Unable to free VFs because some are assigned to VMs.\n"

	.no_dead_strip	_hns3_pci_sriov_configure
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function hns3_pci_sriov_configure
_hns3_pci_sriov_configure:              ; @hns3_pci_sriov_configure
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x20, x1
	mov	x19, x0
	bl	_hns3_is_phys_func
	cbz	x0, LBB0_5
; %bb.1:
Lloh0:
	adrp	x8, _CONFIG_PCI_IOV@GOTPAGE
Lloh1:
	ldr	x8, [x8, _CONFIG_PCI_IOV@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
	bl	_IS_ENABLED
	cbz	x0, LBB0_5
; %bb.2:
	mov	x0, x19
	cbz	w20, LBB0_6
; %bb.3:
	mov	x1, x20
	bl	_pci_enable_sriov
	cbz	w0, LBB0_10
; %bb.4:
	mov	x2, x0
Lloh3:
	adrp	x1, l_.str.1@PAGE
Lloh4:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x19
	bl	_dev_err
	b	LBB0_9
LBB0_5:
Lloh5:
	adrp	x1, l_.str@PAGE
Lloh6:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	bl	_dev_warn
Lloh7:
	adrp	x8, _EINVAL@GOTPAGE
Lloh8:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh9:
	ldr	w8, [x8]
	neg	w20, w8
	b	LBB0_10
LBB0_6:
	bl	_pci_vfs_assigned
	cbz	w0, LBB0_8
; %bb.7:
Lloh10:
	adrp	x1, l_.str.2@PAGE
Lloh11:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x0, x19
	bl	_dev_warn
	b	LBB0_9
LBB0_8:
	mov	x0, x19
	bl	_pci_disable_sriov
LBB0_9:
	mov	w20, #0
LBB0_10:
	mov	x0, x20
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpAdd	Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_CONFIG_PCI_IOV,4,2             ; @CONFIG_PCI_IOV
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Can not config SRIOV\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
l_.str.1:                               ; @.str.1
	.asciz	"SRIOV enable failed %d\n"

l_.str.2:                               ; @.str.2
	.asciz	"Unable to free VFs because some are assigned to VMs.\n"

	.no_dead_strip	_hns3_pci_sriov_configure
.subsections_via_symbols
