	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function VIDDCVdp2DrawEnd
_VIDDCVdp2DrawEnd:                      ## @VIDDCVdp2DrawEnd
	.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	%r12
	pushq	%rbx
	subq	$16, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	_dmadone@GOTPCREL(%rip), %rbx
	movq	%rbx, %rdi
	callq	_sem_wait
	movq	%rbx, %rdi
	callq	_sem_signal
	xorl	%eax, %eax
	callq	_pvr_scene_finish
	movq	_framecount@GOTPCREL(%rip), %r12
	incl	(%r12)
	movq	_lastup@GOTPCREL(%rip), %r15
	movq	(%r15), %rbx
	addq	$10, %rbx
	xorl	%edi, %edi
	callq	_time
	cmpq	%rax, %rbx
	jg	LBB0_2
## %bb.1:
	movl	(%r12), %r14d
	xorl	%edi, %edi
	callq	_time
	movq	%rax, %rbx
	subq	(%r15), %rbx
	cvtsi2ssl	(%r12), %xmm0
	movss	%xmm0, -36(%rbp)                ## 4-byte Spill
	xorl	%edi, %edi
	callq	_time
	subq	(%r15), %rax
	cvtsi2ss	%rax, %xmm1
	movss	-36(%rbp), %xmm0                ## 4-byte Reload
                                        ## xmm0 = mem[0],zero,zero,zero
	divss	%xmm1, %xmm0
	leaq	L_.str(%rip), %rdi
	movl	%r14d, %esi
	movq	%rbx, %rdx
	callq	_printf
	movl	$0, (%r12)
	xorl	%edi, %edi
	callq	_time
	movq	%rax, (%r15)
LBB0_2:
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_dmadone,4,2                    ## @dmadone
	.comm	_framecount,4,2                 ## @framecount
	.comm	_lastup,8,3                     ## @lastup
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"%d frames in %d seconds FPS: %f\n"

	.no_dead_strip	_VIDDCVdp2DrawEnd
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function VIDDCVdp2DrawEnd
_VIDDCVdp2DrawEnd:                      ; @VIDDCVdp2DrawEnd
	.cfi_startproc
; %bb.0:
	stp	d9, d8, [sp, #-64]!             ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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 b8, -56
	.cfi_offset b9, -64
Lloh0:
	adrp	x19, _dmadone@GOTPAGE
Lloh1:
	ldr	x19, [x19, _dmadone@GOTPAGEOFF]
	mov	x0, x19
	bl	_sem_wait
	mov	x0, x19
	bl	_sem_signal
	bl	_pvr_scene_finish
Lloh2:
	adrp	x22, _framecount@GOTPAGE
Lloh3:
	ldr	x22, [x22, _framecount@GOTPAGEOFF]
	ldr	w8, [x22]
	add	w8, w8, #1
	str	w8, [x22]
Lloh4:
	adrp	x21, _lastup@GOTPAGE
Lloh5:
	ldr	x21, [x21, _lastup@GOTPAGEOFF]
	ldr	x8, [x21]
	add	x19, x8, #10
	mov	x0, #0
	bl	_time
	cmp	x19, x0
	b.gt	LBB0_2
; %bb.1:
	ldr	w19, [x22]
	mov	x0, #0
	bl	_time
	ldr	x8, [x21]
	sub	x20, x0, x8
	ldr	s0, [x22]
	scvtf	s8, s0
	mov	x0, #0
	bl	_time
	ldr	x8, [x21]
	sub	x8, x0, x8
	scvtf	s0, x8
	fdiv	s0, s8, s0
Lloh6:
	adrp	x0, l_.str@PAGE
Lloh7:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x19
	mov	x2, x20
	bl	_printf
	str	wzr, [x22]
	mov	x0, #0
	bl	_time
	str	x0, [x21]
LBB0_2:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	d9, d8, [sp], #64               ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.comm	_dmadone,4,2                    ; @dmadone
	.comm	_framecount,4,2                 ; @framecount
	.comm	_lastup,8,3                     ; @lastup
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"%d frames in %d seconds FPS: %f\n"

	.no_dead_strip	_VIDDCVdp2DrawEnd
.subsections_via_symbols
