	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function apply_fixed_refresh
_apply_fixed_refresh:                   ## @apply_fixed_refresh
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rcx, %rbx
	movl	%edx, %ecx
	movq	%rsi, %r14
	movl	(%rbx), %esi
	movl	$1000000000, %eax               ## imm = 0x3B9ACA00
	xorl	%edx, %edx
	divl	%esi
	movq	_FIXED_REFRESH_EXIT_MARGIN_IN_HZ@GOTPCREL(%rip), %rdx
	imull	$1000, (%rdx), %edi             ## imm = 0x3E8
	addl	%eax, %edi
	movl	$1000000000, %eax               ## imm = 0x3B9ACA00
	xorl	%edx, %edx
	divl	%edi
	cmpl	%ecx, %eax
	jbe	LBB0_4
## %bb.1:
	cmpl	$0, 40(%rbx)
	je	LBB0_9
## %bb.2:
	movq	48(%rbx), %rax
	leaq	1(%rax), %rcx
	movq	%rcx, 48(%rbx)
	movq	_FIXED_REFRESH_EXIT_FRAME_COUNT@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jl	LBB0_9
## %bb.3:
	leaq	48(%rbx), %rax
	movl	$0, 40(%rbx)
	xorps	%xmm0, %xmm0
	movups	%xmm0, (%rax)
	movq	32(%rbx), %rsi
	movq	%r14, %rdi
	callq	_calc_v_total_from_refresh
	movq	%rax, 24(%rbx)
	movq	8(%rbx), %rsi
	movq	%r14, %rdi
	callq	_calc_v_total_from_refresh
	jmp	LBB0_8
LBB0_4:
	cmpl	%ecx, %esi
	jae	LBB0_9
## %bb.5:
	cmpl	$0, 40(%rbx)
	jne	LBB0_9
## %bb.6:
	movq	48(%rbx), %rax
	leaq	1(%rax), %rcx
	movq	%rcx, 48(%rbx)
	movq	_FIXED_REFRESH_ENTER_FRAME_COUNT@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jl	LBB0_9
## %bb.7:
	movq	$0, 48(%rbx)
	movl	$1, 40(%rbx)
	movq	32(%rbx), %rsi
	movq	%rsi, 56(%rbx)
	movq	%r14, %rdi
	callq	_calc_v_total_from_refresh
	movq	%rax, 24(%rbx)
LBB0_8:
	movq	%rax, 16(%rbx)
LBB0_9:
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_FIXED_REFRESH_EXIT_MARGIN_IN_HZ,4,2 ## @FIXED_REFRESH_EXIT_MARGIN_IN_HZ
	.comm	_FIXED_REFRESH_EXIT_FRAME_COUNT,8,3 ## @FIXED_REFRESH_EXIT_FRAME_COUNT
	.comm	_FIXED_REFRESH_ENTER_FRAME_COUNT,8,3 ## @FIXED_REFRESH_ENTER_FRAME_COUNT
	.no_dead_strip	_apply_fixed_refresh
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function apply_fixed_refresh
_apply_fixed_refresh:                   ; @apply_fixed_refresh
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x3
	mov	x20, x1
	ldr	w8, [x3]
	mov	w9, #51712
	movk	w9, #15258, lsl #16
Lloh0:
	adrp	x10, _FIXED_REFRESH_EXIT_MARGIN_IN_HZ@GOTPAGE
Lloh1:
	ldr	x10, [x10, _FIXED_REFRESH_EXIT_MARGIN_IN_HZ@GOTPAGEOFF]
	udiv	w11, w9, w8
Lloh2:
	ldr	w10, [x10]
	mov	w12, #1000
	madd	w10, w10, w12, w11
	udiv	w9, w9, w10
	cmp	w9, w2
	b.ls	LBB0_4
; %bb.1:
	ldr	w8, [x19, #40]
	cbz	w8, LBB0_9
; %bb.2:
	mov	x8, x19
	ldr	x9, [x8, #48]!
	add	x10, x9, #1
	str	x10, [x8]
Lloh3:
	adrp	x10, _FIXED_REFRESH_EXIT_FRAME_COUNT@GOTPAGE
Lloh4:
	ldr	x10, [x10, _FIXED_REFRESH_EXIT_FRAME_COUNT@GOTPAGEOFF]
Lloh5:
	ldr	x10, [x10]
	cmp	x9, x10
	b.lt	LBB0_9
; %bb.3:
	str	wzr, [x19, #40]
	stp	xzr, xzr, [x8]
	ldr	x1, [x19, #32]
	mov	x0, x20
	bl	_calc_v_total_from_refresh
	str	x0, [x19, #24]
	ldr	x1, [x19, #8]
	mov	x0, x20
	bl	_calc_v_total_from_refresh
	b	LBB0_8
LBB0_4:
	cmp	w8, w2
	b.hs	LBB0_9
; %bb.5:
	ldr	w8, [x19, #40]
	cbnz	w8, LBB0_9
; %bb.6:
	ldr	x8, [x19, #48]
	add	x9, x8, #1
	str	x9, [x19, #48]
Lloh6:
	adrp	x9, _FIXED_REFRESH_ENTER_FRAME_COUNT@GOTPAGE
Lloh7:
	ldr	x9, [x9, _FIXED_REFRESH_ENTER_FRAME_COUNT@GOTPAGEOFF]
Lloh8:
	ldr	x9, [x9]
	cmp	x8, x9
	b.lt	LBB0_9
; %bb.7:
	mov	w8, #1
	str	w8, [x19, #40]
	ldr	x1, [x19, #32]
	stp	xzr, x1, [x19, #48]
	mov	x0, x20
	bl	_calc_v_total_from_refresh
	str	x0, [x19, #24]
LBB0_8:
	str	x0, [x19, #16]
LBB0_9:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_FIXED_REFRESH_EXIT_MARGIN_IN_HZ,4,2 ; @FIXED_REFRESH_EXIT_MARGIN_IN_HZ
	.comm	_FIXED_REFRESH_EXIT_FRAME_COUNT,8,3 ; @FIXED_REFRESH_EXIT_FRAME_COUNT
	.comm	_FIXED_REFRESH_ENTER_FRAME_COUNT,8,3 ; @FIXED_REFRESH_ENTER_FRAME_COUNT
	.no_dead_strip	_apply_fixed_refresh
.subsections_via_symbols
