	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function retire_submit
_retire_submit:                         ## @retire_submit
	.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
	movq	%rdx, %r13
	movq	%rdi, -64(%rbp)                 ## 8-byte Spill
	movl	(%rdx), %eax
	movq	_MSM_GPU_SUBMIT_STATS_COUNT@GOTPCREL(%rip), %rcx
	cltd
	idivl	(%rcx)
	movq	(%rsi), %rax
	movq	(%rax), %r14
	movslq	%edx, %rbx
	shlq	$4, %rbx
	leaq	(%r14,%rbx), %rax
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	movl	(%r14,%rbx), %eax
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	movl	4(%r14,%rbx), %r12d
	subl	%r12d, %eax
	imull	$10000, %eax, %r15d             ## imm = 0x2710
	movl	%r15d, %edi
	movl	$192, %esi
	callq	_do_div
	xorl	%edx, %edx
	leaq	(%r14,%rbx), %rax
	addq	$4, %rax
	cmpl	%r12d, -44(%rbp)                ## 4-byte Folded Reload
	je	LBB0_2
## %bb.1:
	movq	%rax, %r12
	movl	8(%r14,%rbx), %eax
	subl	12(%r14,%rbx), %eax
	imull	$1000, %eax, %ebx               ## imm = 0x3E8
	movl	%ebx, %edi
	movl	%r15d, %esi
	callq	_do_div
	movq	%r12, %rax
	movl	%ebx, %edx
LBB0_2:
	movl	(%rax), %ecx
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movl	(%rax), %r8d
	movq	%r13, %rdi
	movl	%r15d, %esi
	callq	_trace_msm_gpu_submit_retired
	cmpl	$0, 4(%r13)
	jle	LBB0_5
## %bb.3:
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	movq	16(%r13), %rax
	movq	(%rax,%rbx,8), %r15
	movq	%r15, %rdi
	callq	_msm_gem_move_to_inactive
	movl	8(%r13), %esi
	movq	%r15, %rdi
	callq	_msm_gem_unpin_iova
	movq	%r15, %rdi
	callq	_drm_gem_object_put
	incq	%rbx
	movslq	4(%r13), %rax
	cmpq	%rax, %rbx
	jl	LBB0_4
LBB0_5:
	movq	-64(%rbp), %rbx                 ## 8-byte Reload
	movq	(%rbx), %rdi
	callq	_pm_runtime_mark_last_busy
	movq	(%rbx), %rdi
	callq	_pm_runtime_put_autosuspend
	movq	%r13, %rdi
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_msm_gem_submit_free            ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_MSM_GPU_SUBMIT_STATS_COUNT,4,2 ## @MSM_GPU_SUBMIT_STATS_COUNT
	.no_dead_strip	_retire_submit
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function retire_submit
_retire_submit:                         ; @retire_submit
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x19, x2
	mov	x20, x0
	ldr	w8, [x2]
Lloh0:
	adrp	x9, _MSM_GPU_SUBMIT_STATS_COUNT@GOTPAGE
Lloh1:
	ldr	x9, [x9, _MSM_GPU_SUBMIT_STATS_COUNT@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	sdiv	w10, w8, w9
	msub	w22, w10, w9, w8
	ldr	x8, [x1]
	ldr	x25, [x8]
	add	x23, x25, w22, sxtw #4
	ldr	w26, [x23]
	mov	x24, x23
	ldr	w27, [x24, #4]!
	subs	w8, w26, w27
	mov	w9, #10000
	mul	w21, w8, w9
	mov	x0, x21
	mov	w1, #192
	bl	_do_div
	cmp	w26, w27
	b.ne	LBB0_2
; %bb.1:
	mov	w22, #0
	b	LBB0_3
LBB0_2:
	sxtw	x8, w22
	add	x8, x25, x8, lsl #4
	ldr	w9, [x8, #8]
	ldr	w8, [x8, #12]
	sub	w8, w9, w8
	mov	w9, #1000
	mul	w22, w8, w9
	mov	x0, x22
	mov	x1, x21
	bl	_do_div
LBB0_3:
	ldr	w3, [x24]
	ldr	w4, [x23]
	mov	x0, x19
	mov	x1, x21
	mov	x2, x22
	bl	_trace_msm_gpu_submit_retired
	ldr	w8, [x19, #4]
	cmp	w8, #1
	b.lt	LBB0_6
; %bb.4:
	mov	x22, #0
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x19, #16]
	ldr	x21, [x8, x22, lsl #3]
	mov	x0, x21
	bl	_msm_gem_move_to_inactive
	ldr	w1, [x19, #8]
	mov	x0, x21
	bl	_msm_gem_unpin_iova
	mov	x0, x21
	bl	_drm_gem_object_put
	add	x22, x22, #1
	ldrsw	x8, [x19, #4]
	cmp	x22, x8
	b.lt	LBB0_5
LBB0_6:
	ldr	x0, [x20]
	bl	_pm_runtime_mark_last_busy
	ldr	x0, [x20]
	bl	_pm_runtime_put_autosuspend
	mov	x0, x19
	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
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	b	_msm_gem_submit_free
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_MSM_GPU_SUBMIT_STATS_COUNT,4,2 ; @MSM_GPU_SUBMIT_STATS_COUNT
	.no_dead_strip	_retire_submit
.subsections_via_symbols
