	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal8,8byte_literals
	.p2align	3                               ## -- Begin function update_fps
LCPI0_0:
	.quad	0x408f400000000000              ## double 1000
	.section	__TEXT,__text,regular,pure_instructions
	.p2align	4, 0x90
_update_fps:                            ## @update_fps
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	subq	$16, %rsp
	incl	_update_fps.frame_count(%rip)
	leaq	-16(%rbp), %rdi
	xorl	%esi, %esi
	callq	_gettimeofday
	imulq	$1000, -16(%rbp), %rcx          ## imm = 0x3E8
	movslq	-8(%rbp), %rax
	imulq	$274877907, %rax, %rax          ## imm = 0x10624DD3
	movq	%rax, %rdx
	shrq	$63, %rdx
	sarq	$38, %rax
	addl	%edx, %eax
	cltq
	addq	%rcx, %rax
	movq	_update_fps.time_start(%rip), %rdx
	testq	%rdx, %rdx
	je	LBB0_1
## %bb.2:
	movq	%rax, %rcx
	subq	%rdx, %rcx
	cmpq	$5001, %rcx                     ## imm = 0x1389
	jl	LBB0_3
## %bb.4:
	cvtsi2ssl	_update_fps.frame_count(%rip), %xmm0
	cvtsi2sd	%rcx, %xmm1
	divsd	LCPI0_0(%rip), %xmm1
	cvtss2sd	%xmm0, %xmm0
	divsd	%xmm1, %xmm0
	cvtsd2ss	%xmm0, %xmm0
	movl	$0, _update_fps.frame_count(%rip)
	movq	%rax, _update_fps.time_start(%rip)
	leaq	L_.str(%rip), %rdi
	addq	$16, %rsp
	popq	%rbp
	jmp	_vcos_log_error                 ## TAILCALL
LBB0_1:
	movq	%rax, _update_fps.time_start(%rip)
LBB0_3:
	addq	$16, %rsp
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
.zerofill __DATA,__bss,_update_fps.frame_count,4,2 ## @update_fps.frame_count
.zerofill __DATA,__bss,_update_fps.time_start,8,3 ## @update_fps.time_start
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"%3.2f FPS"

	.no_dead_strip	_update_fps
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function update_fps
_update_fps:                            ; @update_fps
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #48
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	adrp	x19, _update_fps.frame_count@PAGE
	ldr	w8, [x19, _update_fps.frame_count@PAGEOFF]
	add	w8, w8, #1
	str	w8, [x19, _update_fps.frame_count@PAGEOFF]
	mov	x0, sp
	mov	x1, #0
	bl	_gettimeofday
	ldr	x8, [sp]
	mov	w9, #1000
	mul	x8, x8, x9
	ldrsw	x9, [sp, #8]
	mov	w10, #19923
	movk	w10, #4194, lsl #16
	mul	x9, x9, x10
	lsr	x10, x9, #63
	asr	x9, x9, #38
	add	w9, w9, w10
	add	x8, x8, w9, sxtw
	adrp	x9, _update_fps.time_start@PAGE
	ldr	x10, [x9, _update_fps.time_start@PAGEOFF]
	cbz	x10, LBB0_3
; %bb.1:
	mov	w11, #5001
	sub	x10, x8, x10
	cmp	x10, x11
	b.lt	LBB0_4
; %bb.2:
	ldr	s0, [x19, _update_fps.frame_count@PAGEOFF]
	scvtf	s0, s0
	scvtf	d1, x10
	fcvt	d0, s0
	mov	x10, #70368744177664
	movk	x10, #16527, lsl #48
	fmov	d2, x10
	fdiv	d1, d1, d2
	fdiv	d0, d0, d1
	fcvt	s0, d0
	str	wzr, [x19, _update_fps.frame_count@PAGEOFF]
	str	x8, [x9, _update_fps.time_start@PAGEOFF]
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	b	_vcos_log_error
LBB0_3:
	str	x8, [x9, _update_fps.time_start@PAGEOFF]
LBB0_4:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
.zerofill __DATA,__bss,_update_fps.frame_count,4,2 ; @update_fps.frame_count
.zerofill __DATA,__bss,_update_fps.time_start,8,3 ; @update_fps.time_start
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"%3.2f FPS"

	.no_dead_strip	_update_fps
.subsections_via_symbols
