	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_qed_final_cleanup              ## -- Begin function qed_final_cleanup
	.p2align	4, 0x90
_qed_final_cleanup:                     ## @qed_final_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	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%ecx, -48(%rbp)                 ## 4-byte Spill
	movl	%edx, %ebx
	movq	%rsi, -56(%rbp)                 ## 8-byte Spill
	movq	%rdi, %r15
	movq	_FINAL_CLEANUP_POLL_CNT@GOTPCREL(%rip), %rax
	movq	_EBUSY@GOTPCREL(%rip), %rcx
	xorl	%edx, %edx
	subl	(%rcx), %edx
	movl	%edx, -44(%rbp)                 ## 4-byte Spill
	movl	(%rax), %r12d
	movq	_GTT_BAR0_MAP_REG_USDM_RAM@GOTPCREL(%rip), %rax
	movl	(%rax), %r13d
	movl	(%rdi), %edi
	callq	_USTORM_FLR_FINAL_ACK_OFFSET
	movl	%eax, %r14d
	addl	%r13d, %r14d
	leal	16(%rbx), %eax
	cmpl	$0, -48(%rbp)                   ## 4-byte Folded Reload
	cmovel	%ebx, %eax
	movl	%eax, %ebx
	movq	_X_FINAL_CLEANUP_AGG_INT@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	_SDM_AGG_INT_COMP_PARAMS_AGG_INT_INDEX_SHIFT@GOTPCREL(%rip), %rcx
	movb	(%rcx), %cl
	shll	%cl, %eax
	movq	_SDM_AGG_INT_COMP_PARAMS_AGG_VECTOR_BIT_SHIFT@GOTPCREL(%rip), %rcx
	movb	(%rcx), %cl
	movl	%ebx, %edx
	shll	%cl, %edx
	movq	_SDM_AGG_INT_COMP_PARAMS_AGG_VECTOR_ENABLE_SHIFT@GOTPCREL(%rip), %rsi
	movq	_SDM_OP_GEN_COMP_TYPE_SHIFT@GOTPCREL(%rip), %rcx
	movb	(%rcx), %cl
	movq	_SDM_COMP_TYPE_AGG_INT@GOTPCREL(%rip), %rdi
	movl	(%rdi), %r13d
	shll	%cl, %r13d
	movb	(%rsi), %cl
	btsl	%ecx, %eax
	orl	%edx, %r13d
	orl	%eax, %r13d
	movq	%r15, %rdi
	movl	%r14d, %esi
	callq	_REG_RD
	testq	%rax, %rax
	je	LBB0_2
## %bb.1:
	leaq	L_.str(%rip), %rsi
	movq	%r15, %rdi
	callq	_DP_NOTICE
	movq	%r15, %rdi
	movl	%r14d, %esi
	xorl	%edx, %edx
	callq	_REG_WR
LBB0_2:
	movq	_QED_MSG_IOV@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str.1(%rip), %rdx
	movq	%r15, %rdi
	movl	%ebx, %ecx
	movl	%r13d, %r8d
	callq	_DP_VERBOSE
	movq	_XSDM_REG_OPERATION_GEN@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r15, %rdi
	movq	-56(%rbp), %rsi                 ## 8-byte Reload
	movl	%r13d, %ecx
	callq	_qed_wr
	movq	%r15, %rdi
	movl	%r14d, %esi
	callq	_REG_RD
	testq	%rax, %rax
	jne	LBB0_7
## %bb.3:
	testl	%r12d, %r12d
	je	LBB0_7
## %bb.4:
	decl	%r12d
	movq	_FINAL_CLEANUP_POLL_TIME@GOTPCREL(%rip), %rbx
	.p2align	4, 0x90
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%rbx), %edi
	callq	_msleep
	movq	%r15, %rdi
	movl	%r14d, %esi
	callq	_REG_RD
	subl	$1, %r12d
	setb	%cl
	testq	%rax, %rax
	jne	LBB0_7
## %bb.6:                               ##   in Loop: Header=BB0_5 Depth=1
	testb	%cl, %cl
	je	LBB0_5
LBB0_7:
	movq	%r15, %rdi
	movl	%r14d, %esi
	callq	_REG_RD
	xorl	%ebx, %ebx
	testq	%rax, %rax
	jne	LBB0_9
## %bb.8:
	leaq	L_.str.2(%rip), %rsi
	movq	%r15, %rdi
	callq	_DP_NOTICE
	movl	-44(%rbp), %ebx                 ## 4-byte Reload
LBB0_9:
	movq	%r15, %rdi
	movl	%r14d, %esi
	xorl	%edx, %edx
	callq	_REG_WR
	movl	%ebx, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_FINAL_CLEANUP_POLL_CNT,4,2     ## @FINAL_CLEANUP_POLL_CNT
	.comm	_EBUSY,4,2                      ## @EBUSY
	.comm	_GTT_BAR0_MAP_REG_USDM_RAM,4,2  ## @GTT_BAR0_MAP_REG_USDM_RAM
	.comm	_X_FINAL_CLEANUP_AGG_INT,4,2    ## @X_FINAL_CLEANUP_AGG_INT
	.comm	_SDM_AGG_INT_COMP_PARAMS_AGG_INT_INDEX_SHIFT,4,2 ## @SDM_AGG_INT_COMP_PARAMS_AGG_INT_INDEX_SHIFT
	.comm	_SDM_AGG_INT_COMP_PARAMS_AGG_VECTOR_ENABLE_SHIFT,4,2 ## @SDM_AGG_INT_COMP_PARAMS_AGG_VECTOR_ENABLE_SHIFT
	.comm	_SDM_AGG_INT_COMP_PARAMS_AGG_VECTOR_BIT_SHIFT,4,2 ## @SDM_AGG_INT_COMP_PARAMS_AGG_VECTOR_BIT_SHIFT
	.comm	_SDM_COMP_TYPE_AGG_INT,4,2      ## @SDM_COMP_TYPE_AGG_INT
	.comm	_SDM_OP_GEN_COMP_TYPE_SHIFT,4,2 ## @SDM_OP_GEN_COMP_TYPE_SHIFT
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Unexpected; Found final cleanup notification before initiating final cleanup\n"

	.comm	_QED_MSG_IOV,4,2                ## @QED_MSG_IOV
L_.str.1:                               ## @.str.1
	.asciz	"Sending final cleanup for PFVF[%d] [Command %08x]\n"

	.comm	_XSDM_REG_OPERATION_GEN,4,2     ## @XSDM_REG_OPERATION_GEN
	.comm	_FINAL_CLEANUP_POLL_TIME,4,2    ## @FINAL_CLEANUP_POLL_TIME
L_.str.2:                               ## @.str.2
	.asciz	"Failed to receive FW final cleanup notification\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_qed_final_cleanup              ; -- Begin function qed_final_cleanup
	.p2align	2
_qed_final_cleanup:                     ; @qed_final_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	x22, x3
	mov	x23, x2
	mov	x21, x1
	mov	x19, x0
Lloh0:
	adrp	x8, _FINAL_CLEANUP_POLL_CNT@GOTPAGE
Lloh1:
	ldr	x8, [x8, _FINAL_CLEANUP_POLL_CNT@GOTPAGEOFF]
Lloh2:
	adrp	x9, _EBUSY@GOTPAGE
Lloh3:
	ldr	x9, [x9, _EBUSY@GOTPAGEOFF]
Lloh4:
	ldr	w25, [x8]
Lloh5:
	ldr	w24, [x9]
Lloh6:
	adrp	x8, _GTT_BAR0_MAP_REG_USDM_RAM@GOTPAGE
Lloh7:
	ldr	x8, [x8, _GTT_BAR0_MAP_REG_USDM_RAM@GOTPAGEOFF]
Lloh8:
	ldr	w20, [x8]
	ldr	w0, [x0]
	bl	_USTORM_FLR_FINAL_ACK_OFFSET
	add	w20, w0, w20
	add	w8, w23, #16
	cmp	w22, #0
	csel	w22, w23, w8, eq
Lloh9:
	adrp	x8, _X_FINAL_CLEANUP_AGG_INT@GOTPAGE
Lloh10:
	ldr	x8, [x8, _X_FINAL_CLEANUP_AGG_INT@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
Lloh12:
	adrp	x9, _SDM_AGG_INT_COMP_PARAMS_AGG_INT_INDEX_SHIFT@GOTPAGE
Lloh13:
	ldr	x9, [x9, _SDM_AGG_INT_COMP_PARAMS_AGG_INT_INDEX_SHIFT@GOTPAGEOFF]
Lloh14:
	ldr	w9, [x9]
Lloh15:
	adrp	x10, _SDM_AGG_INT_COMP_PARAMS_AGG_VECTOR_ENABLE_SHIFT@GOTPAGE
Lloh16:
	ldr	x10, [x10, _SDM_AGG_INT_COMP_PARAMS_AGG_VECTOR_ENABLE_SHIFT@GOTPAGEOFF]
	lsl	w8, w8, w9
Lloh17:
	ldr	w9, [x10]
	mov	w10, #1
	lsl	w9, w10, w9
Lloh18:
	adrp	x10, _SDM_AGG_INT_COMP_PARAMS_AGG_VECTOR_BIT_SHIFT@GOTPAGE
Lloh19:
	ldr	x10, [x10, _SDM_AGG_INT_COMP_PARAMS_AGG_VECTOR_BIT_SHIFT@GOTPAGEOFF]
	orr	w8, w9, w8
Lloh20:
	ldr	w9, [x10]
	lsl	w9, w22, w9
	orr	w8, w8, w9
Lloh21:
	adrp	x9, _SDM_COMP_TYPE_AGG_INT@GOTPAGE
Lloh22:
	ldr	x9, [x9, _SDM_COMP_TYPE_AGG_INT@GOTPAGEOFF]
Lloh23:
	ldr	w9, [x9]
Lloh24:
	adrp	x10, _SDM_OP_GEN_COMP_TYPE_SHIFT@GOTPAGE
Lloh25:
	ldr	x10, [x10, _SDM_OP_GEN_COMP_TYPE_SHIFT@GOTPAGEOFF]
Lloh26:
	ldr	w10, [x10]
	lsl	w9, w9, w10
	orr	w23, w8, w9
	mov	x0, x19
	mov	x1, x20
	bl	_REG_RD
	cbz	x0, LBB0_2
; %bb.1:
Lloh27:
	adrp	x1, l_.str@PAGE
Lloh28:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	bl	_DP_NOTICE
	mov	x0, x19
	mov	x1, x20
	mov	w2, #0
	bl	_REG_WR
LBB0_2:
Lloh29:
	adrp	x8, _QED_MSG_IOV@GOTPAGE
Lloh30:
	ldr	x8, [x8, _QED_MSG_IOV@GOTPAGEOFF]
Lloh31:
	ldr	w1, [x8]
Lloh32:
	adrp	x2, l_.str.1@PAGE
Lloh33:
	add	x2, x2, l_.str.1@PAGEOFF
	mov	x0, x19
	mov	x3, x22
	mov	x4, x23
	bl	_DP_VERBOSE
Lloh34:
	adrp	x8, _XSDM_REG_OPERATION_GEN@GOTPAGE
Lloh35:
	ldr	x8, [x8, _XSDM_REG_OPERATION_GEN@GOTPAGEOFF]
Lloh36:
	ldr	w2, [x8]
	mov	x0, x19
	mov	x1, x21
	mov	x3, x23
	bl	_qed_wr
	mov	x0, x19
	mov	x1, x20
	bl	_REG_RD
	cbnz	x0, LBB0_7
; %bb.3:
	cbz	w25, LBB0_7
; %bb.4:
	sub	w8, w25, #1
Lloh37:
	adrp	x21, _FINAL_CLEANUP_POLL_TIME@GOTPAGE
Lloh38:
	ldr	x21, [x21, _FINAL_CLEANUP_POLL_TIME@GOTPAGEOFF]
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	mov	x22, x8
	ldr	w0, [x21]
	bl	_msleep
	mov	x0, x19
	mov	x1, x20
	bl	_REG_RD
	cbnz	x0, LBB0_7
; %bb.6:                                ;   in Loop: Header=BB0_5 Depth=1
	sub	w8, w22, #1
	cbnz	w22, LBB0_5
LBB0_7:
	mov	x0, x19
	mov	x1, x20
	bl	_REG_RD
	cbz	x0, LBB0_9
; %bb.8:
	mov	w21, #0
	b	LBB0_10
LBB0_9:
	neg	w21, w24
Lloh39:
	adrp	x1, l_.str.2@PAGE
Lloh40:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x0, x19
	bl	_DP_NOTICE
LBB0_10:
	mov	x0, x19
	mov	x1, x20
	mov	w2, #0
	bl	_REG_WR
	mov	x0, x21
	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 AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh4
	.loh AdrpAdd	Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh34, Lloh35, Lloh36
	.loh AdrpAdd	Lloh32, Lloh33
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh31
	.loh AdrpLdrGot	Lloh37, Lloh38
	.loh AdrpAdd	Lloh39, Lloh40
	.cfi_endproc
                                        ; -- End function
	.comm	_FINAL_CLEANUP_POLL_CNT,4,2     ; @FINAL_CLEANUP_POLL_CNT
	.comm	_EBUSY,4,2                      ; @EBUSY
	.comm	_GTT_BAR0_MAP_REG_USDM_RAM,4,2  ; @GTT_BAR0_MAP_REG_USDM_RAM
	.comm	_X_FINAL_CLEANUP_AGG_INT,4,2    ; @X_FINAL_CLEANUP_AGG_INT
	.comm	_SDM_AGG_INT_COMP_PARAMS_AGG_INT_INDEX_SHIFT,4,2 ; @SDM_AGG_INT_COMP_PARAMS_AGG_INT_INDEX_SHIFT
	.comm	_SDM_AGG_INT_COMP_PARAMS_AGG_VECTOR_ENABLE_SHIFT,4,2 ; @SDM_AGG_INT_COMP_PARAMS_AGG_VECTOR_ENABLE_SHIFT
	.comm	_SDM_AGG_INT_COMP_PARAMS_AGG_VECTOR_BIT_SHIFT,4,2 ; @SDM_AGG_INT_COMP_PARAMS_AGG_VECTOR_BIT_SHIFT
	.comm	_SDM_COMP_TYPE_AGG_INT,4,2      ; @SDM_COMP_TYPE_AGG_INT
	.comm	_SDM_OP_GEN_COMP_TYPE_SHIFT,4,2 ; @SDM_OP_GEN_COMP_TYPE_SHIFT
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Unexpected; Found final cleanup notification before initiating final cleanup\n"

	.comm	_QED_MSG_IOV,4,2                ; @QED_MSG_IOV
l_.str.1:                               ; @.str.1
	.asciz	"Sending final cleanup for PFVF[%d] [Command %08x]\n"

	.comm	_XSDM_REG_OPERATION_GEN,4,2     ; @XSDM_REG_OPERATION_GEN
	.comm	_FINAL_CLEANUP_POLL_TIME,4,2    ; @FINAL_CLEANUP_POLL_TIME
l_.str.2:                               ; @.str.2
	.asciz	"Failed to receive FW final cleanup notification\n"

.subsections_via_symbols
