	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_i40e_free_vfs                  ## -- Begin function i40e_free_vfs
	.p2align	4, 0x90
_i40e_free_vfs:                         ## @i40e_free_vfs
	.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
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	cmpq	$0, 16(%rdi)
	je	LBB0_27
## %bb.1:
	movq	%rdi, %r15
	movq	___I40E_VF_DISABLE@GOTPCREL(%rip), %rbx
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%rbx), %edi
	movl	4(%r15), %esi
	callq	_test_and_set_bit
	testq	%rax, %rax
	je	LBB0_4
## %bb.2:                               ##   in Loop: Header=BB0_3 Depth=1
	movl	$1000, %edi                     ## imm = 0x3E8
	movl	$2000, %esi                     ## imm = 0x7D0
	callq	_usleep_range
	jmp	LBB0_3
LBB0_4:
	movq	%r15, %rdi
	xorl	%esi, %esi
	callq	_i40e_notify_client_of_vf_enable
	cmpl	$0, (%r15)
	jle	LBB0_14
## %bb.5:
	movl	$8, %ebx
	xorl	%r12d, %r12d
	movq	_I40E_VF_STATE_INIT@GOTPCREL(%rip), %r14
	jmp	LBB0_6
	.p2align	4, 0x90
LBB0_8:                                 ##   in Loop: Header=BB0_6 Depth=1
	incq	%r12
	movslq	(%r15), %rax
	addq	$16, %rbx
	cmpq	%rax, %r12
	jge	LBB0_9
LBB0_6:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%r14), %edi
	movq	16(%r15), %rsi
	addq	%rbx, %rsi
	callq	_test_bit
	testq	%rax, %rax
	jne	LBB0_8
## %bb.7:                               ##   in Loop: Header=BB0_6 Depth=1
	movq	16(%r15), %rax
	movq	24(%r15), %rcx
	movq	-8(%rax,%rbx), %rax
	movl	(%rcx,%rax,4), %edi
	callq	_i40e_vsi_stop_rings_no_wait
	jmp	LBB0_8
LBB0_9:
	testl	%eax, %eax
	jle	LBB0_14
## %bb.10:
	movl	$8, %ebx
	xorl	%r12d, %r12d
	jmp	LBB0_11
	.p2align	4, 0x90
LBB0_13:                                ##   in Loop: Header=BB0_11 Depth=1
	incq	%r12
	movslq	(%r15), %rax
	addq	$16, %rbx
	cmpq	%rax, %r12
	jge	LBB0_14
LBB0_11:                                ## =>This Inner Loop Header: Depth=1
	movl	(%r14), %edi
	movq	16(%r15), %rsi
	addq	%rbx, %rsi
	callq	_test_bit
	testq	%rax, %rax
	jne	LBB0_13
## %bb.12:                              ##   in Loop: Header=BB0_11 Depth=1
	movq	16(%r15), %rax
	movq	24(%r15), %rcx
	movq	-8(%rax,%rbx), %rax
	movl	(%rcx,%rax,4), %edi
	callq	_i40e_vsi_wait_queues_disabled
	jmp	LBB0_13
LBB0_14:
	movq	8(%r15), %rdi
	callq	_pci_vfs_assigned
	movq	8(%r15), %rdi
	testl	%eax, %eax
	je	LBB0_15
## %bb.16:
	leaq	L_.str(%rip), %rsi
	callq	_dev_warn
	jmp	LBB0_17
LBB0_27:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_15:
	callq	_pci_disable_sriov
LBB0_17:
	movl	(%r15), %r13d
	movl	$0, (%r15)
	testl	%r13d, %r13d
	jle	LBB0_22
## %bb.18:
	movq	%r13, %r14
	shlq	$4, %r14
	xorl	%ebx, %ebx
	movq	_I40E_VF_STATE_INIT@GOTPCREL(%rip), %r12
	jmp	LBB0_19
	.p2align	4, 0x90
LBB0_21:                                ##   in Loop: Header=BB0_19 Depth=1
	movq	16(%r15), %rdi
	addq	%rbx, %rdi
	callq	_i40e_disable_vf_mappings
	addq	$16, %rbx
	cmpq	%rbx, %r14
	je	LBB0_22
LBB0_19:                                ## =>This Inner Loop Header: Depth=1
	movl	(%r12), %edi
	movq	16(%r15), %rax
	leaq	(%rax,%rbx), %rsi
	addq	$8, %rsi
	callq	_test_bit
	testq	%rax, %rax
	je	LBB0_21
## %bb.20:                              ##   in Loop: Header=BB0_19 Depth=1
	movq	16(%r15), %rdi
	addq	%rbx, %rdi
	callq	_i40e_free_vf_res
	jmp	LBB0_21
LBB0_22:
	movq	16(%r15), %rdi
	callq	_kfree
	movq	$0, 16(%r15)
	movq	%r15, -48(%rbp)                 ## 8-byte Spill
	movq	8(%r15), %rdi
	callq	_pci_vfs_assigned
	testl	%eax, %eax
	jne	LBB0_26
## %bb.23:
	movq	%r13, %r14
	testl	%r14d, %r14d
	jle	LBB0_26
## %bb.24:
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	addq	$32, %rax
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	xorl	%r13d, %r13d
	movq	-56(%rbp), %r15                 ## 8-byte Reload
	.p2align	4, 0x90
LBB0_25:                                ## =>This Inner Loop Header: Depth=1
	movl	(%r15), %eax
	movl	%r13d, %ebx
	addl	%eax, %ebx
	leal	31(%r13,%rax), %edi
	cmovnsl	%ebx, %edi
	movl	%edi, %eax
	andl	$-32, %eax
	subl	%eax, %ebx
	sarl	$5, %edi
	callq	_I40E_GLGEN_VFLRSTAT
	movl	%eax, %r12d
	movl	%ebx, %edi
	callq	_BIT
	movq	%r15, %rdi
	movl	%r12d, %esi
	movl	%eax, %edx
	callq	_wr32
	incl	%r13d
	cmpl	%r13d, %r14d
	jne	LBB0_25
LBB0_26:
	movq	___I40E_VF_DISABLE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movl	4(%rax), %esi
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_clear_bit                      ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	___I40E_VF_DISABLE,4,2          ## @__I40E_VF_DISABLE
	.comm	_I40E_VF_STATE_INIT,4,2         ## @I40E_VF_STATE_INIT
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"VFs are assigned - not disabling SR-IOV\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_i40e_free_vfs                  ; -- Begin function i40e_free_vfs
	.p2align	2
_i40e_free_vfs:                         ; @i40e_free_vfs
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	ldr	x8, [x0, #16]
	cbz	x8, LBB0_16
; %bb.1:
	mov	x19, x0
Lloh0:
	adrp	x23, ___I40E_VF_DISABLE@GOTPAGE
Lloh1:
	ldr	x23, [x23, ___I40E_VF_DISABLE@GOTPAGEOFF]
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w0, [x23]
	ldr	w1, [x19, #4]
	bl	_test_and_set_bit
	cbz	x0, LBB0_4
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	mov	w0, #1000
	mov	w1, #2000
	bl	_usleep_range
	b	LBB0_2
LBB0_4:
	mov	x0, x19
	mov	w1, #0
	bl	_i40e_notify_client_of_vf_enable
	ldr	w8, [x19]
Lloh2:
	adrp	x20, _I40E_VF_STATE_INIT@GOTPAGE
Lloh3:
	ldr	x20, [x20, _I40E_VF_STATE_INIT@GOTPAGEOFF]
	cmp	w8, #1
	b.lt	LBB0_14
; %bb.5:
	mov	x21, #0
	mov	x22, #0
	b	LBB0_7
LBB0_6:                                 ;   in Loop: Header=BB0_7 Depth=1
	add	x22, x22, #1
	ldrsw	x8, [x19]
	add	x21, x21, #16
	cmp	x22, x8
	b.ge	LBB0_9
LBB0_7:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w0, [x20]
	ldr	x8, [x19, #16]
	add	x8, x8, x21
	add	x1, x8, #8
	bl	_test_bit
	cbnz	x0, LBB0_6
; %bb.8:                                ;   in Loop: Header=BB0_7 Depth=1
	ldp	x9, x8, [x19, #16]
	ldr	x9, [x9, x21]
	ldr	w0, [x8, x9, lsl #2]
	bl	_i40e_vsi_stop_rings_no_wait
	b	LBB0_6
LBB0_9:
	cmp	w8, #1
	b.lt	LBB0_14
; %bb.10:
	mov	x21, #0
	mov	x22, #0
	b	LBB0_12
LBB0_11:                                ;   in Loop: Header=BB0_12 Depth=1
	add	x22, x22, #1
	ldrsw	x8, [x19]
	add	x21, x21, #16
	cmp	x22, x8
	b.ge	LBB0_14
LBB0_12:                                ; =>This Inner Loop Header: Depth=1
	ldr	w0, [x20]
	ldr	x8, [x19, #16]
	add	x8, x8, x21
	add	x1, x8, #8
	bl	_test_bit
	cbnz	x0, LBB0_11
; %bb.13:                               ;   in Loop: Header=BB0_12 Depth=1
	ldp	x9, x8, [x19, #16]
	ldr	x9, [x9, x21]
	ldr	w0, [x8, x9, lsl #2]
	bl	_i40e_vsi_wait_queues_disabled
	b	LBB0_11
LBB0_14:
	ldr	x0, [x19, #8]
	bl	_pci_vfs_assigned
	mov	x8, x0
	ldr	x0, [x19, #8]
	cbz	w8, LBB0_17
; %bb.15:
Lloh4:
	adrp	x1, l_.str@PAGE
Lloh5:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_warn
	b	LBB0_18
LBB0_16:
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
LBB0_17:
	bl	_pci_disable_sriov
LBB0_18:
	ldr	w24, [x19]
	str	wzr, [x19]
	cmp	w24, #1
	b.lt	LBB0_23
; %bb.19:
	mov	x21, #0
	lsl	x22, x24, #4
	b	LBB0_21
LBB0_20:                                ;   in Loop: Header=BB0_21 Depth=1
	ldr	x8, [x19, #16]
	add	x0, x8, x21
	bl	_i40e_disable_vf_mappings
	add	x21, x21, #16
	cmp	x22, x21
	b.eq	LBB0_23
LBB0_21:                                ; =>This Inner Loop Header: Depth=1
	ldr	w0, [x20]
	ldr	x8, [x19, #16]
	add	x8, x8, x21
	add	x1, x8, #8
	bl	_test_bit
	cbz	x0, LBB0_20
; %bb.22:                               ;   in Loop: Header=BB0_21 Depth=1
	ldr	x8, [x19, #16]
	add	x0, x8, x21
	bl	_i40e_free_vf_res
	b	LBB0_20
LBB0_23:
	ldr	x0, [x19, #16]
	bl	_kfree
	str	xzr, [x19, #16]
	ldr	x0, [x19, #8]
	bl	_pci_vfs_assigned
	cbnz	w0, LBB0_27
; %bb.24:
	cmp	w24, #1
	b.lt	LBB0_27
; %bb.25:
	mov	w25, #0
	add	x20, x19, #32
LBB0_26:                                ; =>This Inner Loop Header: Depth=1
	ldr	w8, [x20]
	add	w8, w25, w8
	add	w9, w8, #31
	cmp	w8, #0
	csel	w9, w9, w8, lt
	asr	w0, w9, #5
	and	w9, w9, #0xffffffe0
	sub	w21, w8, w9
	bl	_I40E_GLGEN_VFLRSTAT
	mov	x22, x0
	mov	x0, x21
	bl	_BIT
	mov	x2, x0
	mov	x0, x20
	mov	x1, x22
	bl	_wr32
	add	w25, w25, #1
	cmp	w24, w25
	b.ne	LBB0_26
LBB0_27:
	ldr	w0, [x23]
	ldr	w1, [x19, #4]
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	b	_clear_bit
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpAdd	Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	___I40E_VF_DISABLE,4,2          ; @__I40E_VF_DISABLE
	.comm	_I40E_VF_STATE_INIT,4,2         ; @I40E_VF_STATE_INIT
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"VFs are assigned - not disabling SR-IOV\n"

.subsections_via_symbols
