	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ice_reset_all_vfs              ## -- Begin function ice_reset_all_vfs
	.p2align	4, 0x90
_ice_reset_all_vfs:                     ## @ice_reset_all_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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	xorl	%r15d, %r15d
	cmpl	$0, (%rdi)
	je	LBB0_27
## %bb.1:
	movl	%esi, %r12d
	movq	%rdi, %r14
	movq	___ICE_VF_DIS@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	32(%r14), %esi
	callq	_test_and_set_bit
	testq	%rax, %rax
	jne	LBB0_27
## %bb.2:
	movl	(%r14), %eax
	testl	%eax, %eax
	jle	LBB0_10
## %bb.3:
	xorl	%r15d, %r15d
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	movq	16(%r14), %rdi
	addq	%r15, %rdi
	movl	%r12d, %esi
	movl	$1, %edx
	callq	_ice_trigger_vf_reset
	incq	%rbx
	movslq	(%r14), %rax
	addq	$24, %r15
	cmpq	%rax, %rbx
	jl	LBB0_4
## %bb.5:
	testl	%eax, %eax
	jle	LBB0_10
## %bb.6:
	xorl	%ebx, %ebx
	xorl	%r13d, %r13d
	jmp	LBB0_7
	.p2align	4, 0x90
LBB0_9:                                 ##   in Loop: Header=BB0_7 Depth=1
	movl	(%r12), %esi
	movl	4(%r12), %edi
	movq	_ICE_VF_RESET@GOTPCREL(%rip), %rax
	movl	(%rax), %r10d
	movl	16(%r15,%rbx), %eax
	xorl	%edx, %edx
	xorl	%ecx, %ecx
	xorl	%r8d, %r8d
	xorl	%r9d, %r9d
	pushq	$0
	pushq	%rax
	pushq	%r10
	pushq	$0
	callq	_ice_dis_vsi_txq
	addq	$32, %rsp
	incq	%r13
	movslq	(%r14), %rax
	addq	$24, %rbx
	cmpq	%rax, %r13
	jge	LBB0_10
LBB0_7:                                 ## =>This Inner Loop Header: Depth=1
	movq	16(%r14), %r15
	movq	24(%r14), %rax
	movq	(%r15,%rbx), %rcx
	movq	(%rax,%rcx,8), %r12
	movq	_ICE_VF_STATE_QS_ENA@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	20(%r15,%rbx), %esi
	callq	_test_bit
	testq	%rax, %rax
	je	LBB0_9
## %bb.8:                               ##   in Loop: Header=BB0_7 Depth=1
	leaq	(%r15,%rbx), %rdi
	callq	_ice_dis_vf_qs
	jmp	LBB0_9
LBB0_10:
	testl	%eax, %eax
	jle	LBB0_11
## %bb.12:
	leaq	36(%r14), %r15
	xorl	%ebx, %ebx
	movq	_VPGEN_VFRSTAT_VFRD_M@GOTPCREL(%rip), %r12
	xorl	%ecx, %ecx
	.p2align	4, 0x90
LBB0_13:                                ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_14 Depth 2
	movl	%ecx, -44(%rbp)                 ## 4-byte Spill
	movslq	%ebx, %rbx
	leaq	(%rbx,%rbx,2), %rax
	leaq	16(,%rax,8), %r13
	.p2align	4, 0x90
LBB0_14:                                ##   Parent Loop BB0_13 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movq	16(%r14), %rax
	movl	(%rax,%r13), %edi
	callq	_VPGEN_VFRSTAT
	movq	%r15, %rdi
	movl	%eax, %esi
	callq	_rd32
	testl	%eax, (%r12)
	je	LBB0_15
## %bb.16:                              ##   in Loop: Header=BB0_14 Depth=2
	incq	%rbx
	movslq	(%r14), %rax
	addq	$24, %r13
	cmpq	%rax, %rbx
	jl	LBB0_14
	jmp	LBB0_17
	.p2align	4, 0x90
LBB0_15:                                ##   in Loop: Header=BB0_13 Depth=1
	movl	$10, %edi
	movl	$20, %esi
	callq	_usleep_range
LBB0_17:                                ##   in Loop: Header=BB0_13 Depth=1
	movl	-44(%rbp), %ecx                 ## 4-byte Reload
	incl	%ecx
	movl	(%r14), %eax
	cmpl	$10, %ecx
	je	LBB0_19
## %bb.18:                              ##   in Loop: Header=BB0_13 Depth=1
	cmpl	%ebx, %eax
	jg	LBB0_13
LBB0_19:
	cmpl	%eax, %ebx
	jge	LBB0_21
LBB0_20:
	movq	8(%r14), %rdi
	leaq	L_.str(%rip), %rsi
	callq	_dev_warn
	movl	(%r14), %eax
LBB0_21:
	testl	%eax, %eax
	jle	LBB0_24
## %bb.22:
	xorl	%ebx, %ebx
	xorl	%r15d, %r15d
	.p2align	4, 0x90
LBB0_23:                                ## =>This Inner Loop Header: Depth=1
	movq	16(%r14), %r12
	leaq	(%r12,%rbx), %rdi
	callq	_ice_free_vf_res
	movq	$0, 8(%r12,%rbx)
	incq	%r15
	movslq	(%r14), %rax
	addq	$24, %rbx
	cmpq	%rax, %r15
	jl	LBB0_23
LBB0_24:
	movq	%r14, %rdi
	callq	_ice_sriov_free_msix_res
	testq	%rax, %rax
	je	LBB0_26
## %bb.25:
	movq	8(%r14), %rdi
	leaq	L_.str.1(%rip), %rsi
	callq	_dev_err
LBB0_26:
	movq	%r14, %rdi
	callq	_ice_config_res_vfs
	xorl	%r15d, %r15d
	testl	%eax, %eax
	setne	%r15b
LBB0_27:
	movl	%r15d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_11:
	xorl	%ebx, %ebx
	cmpl	%eax, %ebx
	jl	LBB0_20
	jmp	LBB0_21
	.cfi_endproc
                                        ## -- End function
	.comm	___ICE_VF_DIS,4,2               ## @__ICE_VF_DIS
	.comm	_ICE_VF_STATE_QS_ENA,4,2        ## @ICE_VF_STATE_QS_ENA
	.comm	_ICE_VF_RESET,4,2               ## @ICE_VF_RESET
	.comm	_VPGEN_VFRSTAT_VFRD_M,4,2       ## @VPGEN_VFRSTAT_VFRD_M
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"VF reset check timeout\n"

L_.str.1:                               ## @.str.1
	.asciz	"Failed to free MSIX resources used by SR-IOV\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ice_reset_all_vfs              ; -- Begin function ice_reset_all_vfs
	.p2align	2
_ice_reset_all_vfs:                     ; @ice_reset_all_vfs
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	mov	x20, x0
	ldr	w8, [x20], #36
	cbz	w8, LBB0_2
; %bb.1:
	mov	x21, x1
	mov	x19, x0
Lloh0:
	adrp	x8, ___ICE_VF_DIS@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___ICE_VF_DIS@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
	ldr	w1, [x19, #32]
	bl	_test_and_set_bit
	cbz	x0, LBB0_3
LBB0_2:
	mov	w0, #0
	b	LBB0_28
LBB0_3:
	ldr	w8, [x19]
	cmp	w8, #1
	b.lt	LBB0_12
; %bb.4:
	mov	x22, #0
	mov	x23, #0
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x19, #16]
	add	x0, x8, x22
	mov	x1, x21
	mov	w2, #1
	bl	_ice_trigger_vf_reset
	add	x23, x23, #1
	ldrsw	x8, [x19]
	add	x22, x22, #24
	cmp	x23, x8
	b.lt	LBB0_5
; %bb.6:
	cmp	w8, #1
	b.lt	LBB0_12
; %bb.7:
	mov	x22, #0
	mov	x23, #0
Lloh3:
	adrp	x24, _ICE_VF_STATE_QS_ENA@GOTPAGE
Lloh4:
	ldr	x24, [x24, _ICE_VF_STATE_QS_ENA@GOTPAGEOFF]
Lloh5:
	adrp	x25, _ICE_VF_RESET@GOTPAGE
Lloh6:
	ldr	x25, [x25, _ICE_VF_RESET@GOTPAGEOFF]
	b	LBB0_9
LBB0_8:                                 ;   in Loop: Header=BB0_9 Depth=1
	ldp	w1, w0, [x26]
	ldr	w7, [x25]
	ldr	w8, [x21, #16]
	str	xzr, [sp, #8]
	str	w8, [sp]
	mov	w2, #0
	mov	w3, #0
	mov	x4, #0
	mov	x5, #0
	mov	x6, #0
	bl	_ice_dis_vsi_txq
	add	x23, x23, #1
	ldrsw	x8, [x19]
	add	x22, x22, #24
	cmp	x23, x8
	b.ge	LBB0_11
LBB0_9:                                 ; =>This Inner Loop Header: Depth=1
	ldp	x8, x9, [x19, #16]
	add	x21, x8, x22
	ldr	x8, [x21]
	ldr	x26, [x9, x8, lsl #3]
	ldr	w0, [x24]
	ldr	w1, [x21, #20]
	bl	_test_bit
	cbz	x0, LBB0_8
; %bb.10:                               ;   in Loop: Header=BB0_9 Depth=1
	mov	x0, x21
	bl	_ice_dis_vf_qs
	b	LBB0_8
LBB0_11:
                                        ; kill: def $w8 killed $w8 killed $x8 def $x8
LBB0_12:
	cmp	w8, #1
	b.lt	LBB0_29
; %bb.13:
	mov	x21, #0
	mov	w22, #0
	mov	w23, #24
Lloh7:
	adrp	x24, _VPGEN_VFRSTAT_VFRD_M@GOTPAGE
Lloh8:
	ldr	x24, [x24, _VPGEN_VFRSTAT_VFRD_M@GOTPAGEOFF]
LBB0_14:                                ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_15 Depth 2
	sxtw	x21, w21
	smull	x8, w21, w23
	add	x25, x8, #16
LBB0_15:                                ;   Parent Loop BB0_14 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldr	x8, [x19, #16]
	ldr	w0, [x8, x25]
	bl	_VPGEN_VFRSTAT
	mov	x1, x0
	mov	x0, x20
	bl	_rd32
	ldr	w8, [x24]
	tst	w8, w0
	b.eq	LBB0_17
; %bb.16:                               ;   in Loop: Header=BB0_15 Depth=2
	add	x21, x21, #1
	ldrsw	x8, [x19]
	add	x25, x25, #24
	cmp	x21, x8
	b.lt	LBB0_15
	b	LBB0_18
LBB0_17:                                ;   in Loop: Header=BB0_14 Depth=1
	mov	w0, #10
	mov	w1, #20
	bl	_usleep_range
LBB0_18:                                ;   in Loop: Header=BB0_14 Depth=1
	add	w22, w22, #1
	ldr	w8, [x19]
	cmp	w22, #10
	b.eq	LBB0_20
; %bb.19:                               ;   in Loop: Header=BB0_14 Depth=1
	cmp	w8, w21
	b.gt	LBB0_14
LBB0_20:
	cmp	w21, w8
	b.ge	LBB0_22
LBB0_21:
	ldr	x0, [x19, #8]
Lloh9:
	adrp	x1, l_.str@PAGE
Lloh10:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_warn
	ldr	w8, [x19]
LBB0_22:
	cmp	w8, #1
	b.lt	LBB0_25
; %bb.23:
	mov	x21, #0
	mov	x22, #0
LBB0_24:                                ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x19, #16]
	add	x20, x8, x21
	mov	x0, x20
	bl	_ice_free_vf_res
	str	xzr, [x20, #8]
	add	x22, x22, #1
	ldrsw	x8, [x19]
	add	x21, x21, #24
	cmp	x22, x8
	b.lt	LBB0_24
LBB0_25:
	mov	x0, x19
	bl	_ice_sriov_free_msix_res
	cbz	x0, LBB0_27
; %bb.26:
	ldr	x0, [x19, #8]
Lloh11:
	adrp	x1, l_.str.1@PAGE
Lloh12:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_dev_err
LBB0_27:
	mov	x0, x19
	bl	_ice_config_res_vfs
	cmp	w0, #0
	cset	w0, ne
LBB0_28:
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #96
	ret
LBB0_29:
	mov	w21, #0
	cmp	w21, w8
	b.lt	LBB0_21
	b	LBB0_22
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpAdd	Lloh11, Lloh12
	.cfi_endproc
                                        ; -- End function
	.comm	___ICE_VF_DIS,4,2               ; @__ICE_VF_DIS
	.comm	_ICE_VF_STATE_QS_ENA,4,2        ; @ICE_VF_STATE_QS_ENA
	.comm	_ICE_VF_RESET,4,2               ; @ICE_VF_RESET
	.comm	_VPGEN_VFRSTAT_VFRD_M,4,2       ; @VPGEN_VFRSTAT_VFRD_M
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"VF reset check timeout\n"

l_.str.1:                               ; @.str.1
	.asciz	"Failed to free MSIX resources used by SR-IOV\n"

.subsections_via_symbols
