	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function qed_iov_execute_vf_flr_cleanup
_qed_iov_execute_vf_flr_cleanup:        ## @qed_iov_execute_vf_flr_cleanup
	.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	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rcx, %r12
	movl	%edx, %ebx
	movq	%rsi, -72(%rbp)                 ## 8-byte Spill
	movq	%rdi, %r15
	xorl	%r13d, %r13d
	movl	%edx, %esi
	xorl	%edx, %edx
	callq	_qed_iov_get_vf_info
	testq	%rax, %rax
	je	LBB0_11
## %bb.1:
	movq	%rax, %r14
	movq	(%r15), %rax
	movq	(%rax), %rax
	leal	63(%rbx), %ecx
	testl	%ebx, %ebx
	cmovnsl	%ebx, %ecx
	movl	%ecx, %edx
	sarl	$6, %edx
	movslq	%edx, %rdx
	movq	(%rax,%rdx,8), %rax
	andl	$-64, %ecx
	subl	%ecx, %ebx
	movl	$1, %esi
	movl	%ebx, %ecx
	shlq	%cl, %rsi
	btq	%rbx, %rax
	jae	LBB0_11
## %bb.2:
	movq	%rsi, -48(%rbp)                 ## 8-byte Spill
	movq	%rdx, -56(%rbp)                 ## 8-byte Spill
	movq	%r12, -64(%rbp)                 ## 8-byte Spill
	movl	(%r14), %r12d
	movq	_QED_MSG_IOV@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str(%rip), %rdx
	movq	%r15, %rdi
	movl	%r12d, %ecx
	callq	_DP_VERBOSE
	movq	%r15, %rdi
	movq	%r14, %rsi
	callq	_qed_iov_vf_cleanup
	xorl	%r13d, %r13d
	cmpl	$0, 20(%r14)
	je	LBB0_8
## %bb.3:
	movq	%r15, %rdi
	movq	%r14, %rsi
	movq	-72(%rbp), %rbx                 ## 8-byte Reload
	movq	%rbx, %rdx
	callq	_qed_iov_vf_flr_poll
	movl	%eax, %r13d
	testl	%eax, %eax
	je	LBB0_4
LBB0_8:
	movq	8(%r14), %rax
	movq	_VF_RESET@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_10
## %bb.9:
	movq	_VF_STOPPED@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, 8(%r14)
LBB0_10:
	leal	31(%r12), %ebx
	testl	%r12d, %r12d
	cmovnsl	%r12d, %ebx
	movl	%ebx, %eax
	andl	$-32, %eax
	subl	%eax, %r12d
	movl	%r12d, %edi
	callq	_BIT
	sarl	$5, %ebx
	movslq	%ebx, %rcx
	movq	-64(%rbp), %rdx                 ## 8-byte Reload
	orl	%eax, (%rdx,%rcx,4)
	movq	-48(%rbp), %rdx                 ## 8-byte Reload
	notq	%rdx
	movq	(%r15), %rax
	movq	(%rax), %rax
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	andq	%rdx, (%rax,%rcx,8)
	movl	$0, 16(%r14)
LBB0_11:
	movl	%r13d, %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_4:
	movq	%r15, %rdi
	movq	%rbx, %rsi
	movl	%r12d, %edx
	movl	$1, %ecx
	callq	_qed_final_cleanup
	testl	%eax, %eax
	je	LBB0_6
## %bb.5:
	movl	%eax, %r13d
	leaq	L_.str.1(%rip), %rsi
	movq	%r15, %rdi
	movl	%r12d, %edx
	callq	_DP_ERR
	jmp	LBB0_11
LBB0_6:
	movq	_GTT_BAR0_MAP_REG_USDM_RAM@GOTPCREL(%rip), %rax
	movq	%rbx, %r13
	movq	(%rax), %rbx
	movl	%r12d, %edi
	callq	_USTORM_VF_PF_CHANNEL_READY_OFFSET
	addq	%rax, %rbx
	movq	%r15, %rdi
	movq	%rbx, %rsi
	movl	$1, %edx
	callq	_REG_WR
	movq	_VF_STOPPED@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, 8(%r14)
	movq	%r15, %rdi
	movq	%r13, %rsi
	movq	%r14, %rdx
	callq	_qed_iov_enable_vf_access
	movl	$0, %r13d
	testl	%eax, %eax
	je	LBB0_8
## %bb.7:
	movl	%eax, %ebx
	leaq	L_.str.2(%rip), %rsi
	movq	%r15, %rdi
	movl	%r12d, %edx
	callq	_DP_ERR
	movl	%ebx, %r13d
	jmp	LBB0_11
	.cfi_endproc
                                        ## -- End function
	.comm	_QED_MSG_IOV,4,2                ## @QED_MSG_IOV
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"VF[%d] - Handling FLR\n"

L_.str.1:                               ## @.str.1
	.asciz	"Failed handle FLR of VF[%d]\n"

	.comm	_GTT_BAR0_MAP_REG_USDM_RAM,8,3  ## @GTT_BAR0_MAP_REG_USDM_RAM
	.comm	_VF_STOPPED,8,3                 ## @VF_STOPPED
L_.str.2:                               ## @.str.2
	.asciz	"Failed to re-enable VF[%d] acces\n"

	.comm	_VF_RESET,8,3                   ## @VF_RESET
	.no_dead_strip	_qed_iov_execute_vf_flr_cleanup
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function qed_iov_execute_vf_flr_cleanup
_qed_iov_execute_vf_flr_cleanup:        ; @qed_iov_execute_vf_flr_cleanup
	.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
	mov	x20, x3
	mov	x22, x2
	mov	x23, x1
	mov	x19, x0
	mov	x1, x2
	mov	w2, #0
	bl	_qed_iov_get_vf_info
	cbz	x0, LBB0_6
; %bb.1:
	ldr	x8, [x19]
	ldr	x8, [x8]
	add	w9, w22, #63
	cmp	w22, #0
	csel	w26, w9, w22, lt
	asr	w9, w26, #6
	ldr	x8, [x8, w9, sxtw #3]
	and	w9, w26, #0xffffffc0
	sub	w9, w22, w9
	mov	w10, #1
	lsl	x25, x10, x9
	tst	x8, x25
	b.eq	LBB0_6
; %bb.2:
	mov	x21, x0
	ldr	w22, [x0]
Lloh0:
	adrp	x8, _QED_MSG_IOV@GOTPAGE
Lloh1:
	ldr	x8, [x8, _QED_MSG_IOV@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
Lloh3:
	adrp	x2, l_.str@PAGE
Lloh4:
	add	x2, x2, l_.str@PAGEOFF
	mov	x0, x19
	mov	x3, x22
	bl	_DP_VERBOSE
	mov	x0, x19
	mov	x1, x21
	bl	_qed_iov_vf_cleanup
	ldr	w8, [x21, #20]
	cbz	w8, LBB0_7
; %bb.3:
	mov	x0, x19
	mov	x1, x21
	mov	x2, x23
	bl	_qed_iov_vf_flr_poll
	mov	x24, x0
	cbnz	w0, LBB0_8
; %bb.4:
	mov	x0, x19
	mov	x1, x23
	mov	x2, x22
	mov	w3, #1
	bl	_qed_final_cleanup
	cbz	w0, LBB0_11
; %bb.5:
	mov	x24, x0
Lloh5:
	adrp	x1, l_.str.1@PAGE
Lloh6:
	add	x1, x1, l_.str.1@PAGEOFF
	b	LBB0_13
LBB0_6:
	mov	w24, #0
	b	LBB0_14
LBB0_7:
	mov	w24, #0
LBB0_8:
	sbfx	x23, x26, #6, #26
	ldr	x8, [x21, #8]
Lloh7:
	adrp	x9, _VF_RESET@GOTPAGE
Lloh8:
	ldr	x9, [x9, _VF_RESET@GOTPAGEOFF]
Lloh9:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_10
; %bb.9:
Lloh10:
	adrp	x8, _VF_STOPPED@GOTPAGE
Lloh11:
	ldr	x8, [x8, _VF_STOPPED@GOTPAGEOFF]
Lloh12:
	ldr	x8, [x8]
	str	x8, [x21, #8]
LBB0_10:
	add	w8, w22, #31
	cmp	w22, #0
	csel	w8, w8, w22, lt
	asr	w26, w8, #5
	and	w8, w8, #0xffffffe0
	sub	w0, w22, w8
	bl	_BIT
	sbfiz	x8, x26, #2, #32
	ldr	w9, [x20, x8]
	orr	w9, w9, w0
	str	w9, [x20, x8]
	ldr	x8, [x19]
	ldr	x8, [x8]
	lsl	x9, x23, #3
	ldr	x10, [x8, x9]
	bic	x10, x10, x25
	str	x10, [x8, x9]
	str	wzr, [x21, #16]
	b	LBB0_14
LBB0_11:
Lloh13:
	adrp	x8, _GTT_BAR0_MAP_REG_USDM_RAM@GOTPAGE
Lloh14:
	ldr	x8, [x8, _GTT_BAR0_MAP_REG_USDM_RAM@GOTPAGEOFF]
Lloh15:
	ldr	x24, [x8]
	mov	x0, x22
	bl	_USTORM_VF_PF_CHANNEL_READY_OFFSET
	add	x1, x0, x24
	mov	x0, x19
	mov	w2, #1
	bl	_REG_WR
Lloh16:
	adrp	x8, _VF_STOPPED@GOTPAGE
Lloh17:
	ldr	x8, [x8, _VF_STOPPED@GOTPAGEOFF]
Lloh18:
	ldr	x8, [x8]
	str	x8, [x21, #8]
	mov	x0, x19
	mov	x1, x23
	mov	x2, x21
	bl	_qed_iov_enable_vf_access
	mov	x24, x0
	cbz	w0, LBB0_8
; %bb.12:
Lloh19:
	adrp	x1, l_.str.2@PAGE
Lloh20:
	add	x1, x1, l_.str.2@PAGEOFF
LBB0_13:
	mov	x0, x19
	mov	x2, x22
	bl	_DP_ERR
LBB0_14:
	mov	x0, x24
	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
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpAdd	Lloh19, Lloh20
	.cfi_endproc
                                        ; -- End function
	.comm	_QED_MSG_IOV,4,2                ; @QED_MSG_IOV
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"VF[%d] - Handling FLR\n"

l_.str.1:                               ; @.str.1
	.asciz	"Failed handle FLR of VF[%d]\n"

	.comm	_GTT_BAR0_MAP_REG_USDM_RAM,8,3  ; @GTT_BAR0_MAP_REG_USDM_RAM
	.comm	_VF_STOPPED,8,3                 ; @VF_STOPPED
l_.str.2:                               ; @.str.2
	.asciz	"Failed to re-enable VF[%d] acces\n"

	.comm	_VF_RESET,8,3                   ; @VF_RESET
	.no_dead_strip	_qed_iov_execute_vf_flr_cleanup
.subsections_via_symbols
