	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function nic_sriov_init
_nic_sriov_init:                        ## @nic_sriov_init
	.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	%rsi, %r14
	movq	%rdi, %r12
	movq	_PCI_EXT_CAP_ID_SRIOV@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_pci_find_ext_capability
	testl	%eax, %eax
	je	LBB0_1
## %bb.2:
	movslq	%eax, %rsi
	movq	_PCI_SRIOV_TOTAL_VF@GOTPCREL(%rip), %rax
	addq	(%rax), %rsi
	leaq	-44(%rbp), %rdx
	movq	%r12, %rdi
	callq	_pci_read_config_word
	movl	-44(%rbp), %eax
	movl	(%r14), %ebx
	cmpl	%ebx, %eax
	jge	LBB0_4
## %bb.3:
	movl	%eax, (%r14)
	movl	%eax, %ebx
LBB0_4:
	xorl	%r15d, %r15d
	testl	%eax, %eax
	je	LBB0_8
## %bb.5:
	movq	%r14, %rdi
	movl	%ebx, %esi
	callq	_nic_num_sqs_en
	movq	%rax, %r13
	movq	%rax, 8(%r14)
	addl	%ebx, %r13d
	movq	%r12, %rdi
	movl	%r13d, %esi
	callq	_pci_enable_sriov
	testl	%eax, %eax
	je	LBB0_7
## %bb.6:
	movl	%eax, %ebx
	leaq	L_.str.1(%rip), %rsi
	movq	%r12, %rdi
	movl	%r13d, %edx
	xorl	%eax, %eax
	callq	_dev_err
	movl	$0, (%r14)
	movl	%ebx, %r15d
	jmp	LBB0_8
LBB0_1:
	leaq	L_.str(%rip), %rsi
	xorl	%r15d, %r15d
	movq	%r12, %rdi
	xorl	%eax, %eax
	callq	_dev_err
	movq	_ENODEV@GOTPCREL(%rip), %rax
	subl	(%rax), %r15d
	jmp	LBB0_8
LBB0_7:
	leaq	L_.str.2(%rip), %rsi
	movq	%r12, %rdi
	movl	%r13d, %edx
	callq	_dev_info
	movq	_NIC_SRIOV_ENABLED@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	orl	%eax, 4(%r14)
LBB0_8:
	movl	%r15d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_PCI_EXT_CAP_ID_SRIOV,4,2       ## @PCI_EXT_CAP_ID_SRIOV
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"SRIOV capability is not found in PCIe config space\n"

	.comm	_ENODEV,4,2                     ## @ENODEV
	.comm	_PCI_SRIOV_TOTAL_VF,8,3         ## @PCI_SRIOV_TOTAL_VF
L_.str.1:                               ## @.str.1
	.asciz	"SRIOV enable failed, num VF is %d\n"

L_.str.2:                               ## @.str.2
	.asciz	"SRIOV enabled, number of VF available %d\n"

	.comm	_NIC_SRIOV_ENABLED,4,2          ## @NIC_SRIOV_ENABLED
	.no_dead_strip	_nic_sriov_init
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function nic_sriov_init
_nic_sriov_init:                        ; @nic_sriov_init
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.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
	mov	x19, x1
	mov	x20, x0
Lloh0:
	adrp	x8, _PCI_EXT_CAP_ID_SRIOV@GOTPAGE
Lloh1:
	ldr	x8, [x8, _PCI_EXT_CAP_ID_SRIOV@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	bl	_pci_find_ext_capability
	cbz	w0, LBB0_6
; %bb.1:
Lloh3:
	adrp	x8, _PCI_SRIOV_TOTAL_VF@GOTPAGE
Lloh4:
	ldr	x8, [x8, _PCI_SRIOV_TOTAL_VF@GOTPAGEOFF]
Lloh5:
	ldr	x8, [x8]
	add	x1, x8, w0, sxtw
	add	x2, sp, #12
	mov	x0, x20
	bl	_pci_read_config_word
	ldr	w8, [sp, #12]
	ldr	w21, [x19]
	cmp	w8, w21
	b.ge	LBB0_3
; %bb.2:
	str	w8, [x19]
	mov	x21, x8
LBB0_3:
	cbz	w8, LBB0_7
; %bb.4:
	mov	x0, x19
	mov	x1, x21
	bl	_nic_num_sqs_en
	str	x0, [x19, #8]
	add	w22, w21, w0
	mov	x0, x20
	mov	x1, x22
	bl	_pci_enable_sriov
	mov	x21, x0
	cbz	w0, LBB0_8
; %bb.5:
	str	x22, [sp]
Lloh6:
	adrp	x1, l_.str.1@PAGE
Lloh7:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x20
	bl	_dev_err
	str	wzr, [x19]
	b	LBB0_9
LBB0_6:
Lloh8:
	adrp	x1, l_.str@PAGE
Lloh9:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x20
	bl	_dev_err
Lloh10:
	adrp	x8, _ENODEV@GOTPAGE
Lloh11:
	ldr	x8, [x8, _ENODEV@GOTPAGEOFF]
Lloh12:
	ldr	w8, [x8]
	neg	w21, w8
	b	LBB0_9
LBB0_7:
	mov	w21, #0
	b	LBB0_9
LBB0_8:
Lloh13:
	adrp	x1, l_.str.2@PAGE
Lloh14:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x0, x20
	mov	x2, x22
	bl	_dev_info
Lloh15:
	adrp	x8, _NIC_SRIOV_ENABLED@GOTPAGE
Lloh16:
	ldr	x8, [x8, _NIC_SRIOV_ENABLED@GOTPAGEOFF]
Lloh17:
	ldr	w8, [x8]
	ldr	w9, [x19, #4]
	orr	w8, w9, w8
	str	w8, [x19, #4]
LBB0_9:
	mov	x0, x21
	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
	add	sp, sp, #64
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpAdd	Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.comm	_PCI_EXT_CAP_ID_SRIOV,4,2       ; @PCI_EXT_CAP_ID_SRIOV
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"SRIOV capability is not found in PCIe config space\n"

	.comm	_ENODEV,4,2                     ; @ENODEV
	.comm	_PCI_SRIOV_TOTAL_VF,8,3         ; @PCI_SRIOV_TOTAL_VF
l_.str.1:                               ; @.str.1
	.asciz	"SRIOV enable failed, num VF is %d\n"

l_.str.2:                               ; @.str.2
	.asciz	"SRIOV enabled, number of VF available %d\n"

	.comm	_NIC_SRIOV_ENABLED,4,2          ; @NIC_SRIOV_ENABLED
	.no_dead_strip	_nic_sriov_init
.subsections_via_symbols
