	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function __i915_update_gfx_val
___i915_update_gfx_val:                 ## @__i915_update_gfx_val
	.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
	subq	$16, %rsp
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rdi, %rbx
	movq	_mchdev_lock@GOTPCREL(%rip), %rdi
	callq	_assert_spin_locked
	leaq	-24(%rbp), %rdi
	callq	_getrawmonotonic
	movq	-24(%rbp), %rdi
	movq	12(%rbx), %rsi
	callq	_timespec_sub
	imull	$1000, %eax, %ecx               ## imm = 0x3E8
	sarq	$32, %rax
	imulq	$1125899907, %rax, %rax         ## imm = 0x431BDE83
	movq	%rax, %rdx
	shrq	$63, %rdx
	sarq	$50, %rax
	addl	%edx, %eax
	addl	%ecx, %eax
	je	LBB0_4
## %bb.1:
	movslq	%eax, %r14
	movq	_GFXEC@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_I915_READ
	movq	(%rbx), %rdx
	movq	%rax, %rcx
	subq	%rdx, %rcx
	jge	LBB0_3
## %bb.2:
	notl	%edx
	movslq	%edx, %rcx
	addq	%rax, %rcx
LBB0_3:
	movq	%rax, (%rbx)
	movq	-24(%rbp), %rax
	movq	%rax, 12(%rbx)
	imull	$1181, %ecx, %edi               ## imm = 0x49D
	addq	%r14, %r14
	leaq	(%r14,%r14,4), %rsi
	callq	_div_u64
	movl	%eax, 8(%rbx)
LBB0_4:
	addq	$16, %rsp
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_mchdev_lock,4,2                ## @mchdev_lock
	.comm	_GFXEC,4,2                      ## @GFXEC
	.no_dead_strip	___i915_update_gfx_val
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function __i915_update_gfx_val
___i915_update_gfx_val:                 ; @__i915_update_gfx_val
	.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
	mov	x19, x0
Lloh0:
	adrp	x0, _mchdev_lock@GOTPAGE
Lloh1:
	ldr	x0, [x0, _mchdev_lock@GOTPAGEOFF]
	bl	_assert_spin_locked
	add	x0, sp, #8
	bl	_getrawmonotonic
	ldr	x0, [sp, #8]
	ldur	x1, [x19, #12]
	bl	_timespec_sub
	mov	w8, #1000
	asr	x9, x0, #32
	mov	w10, #56963
	movk	w10, #17179, lsl #16
	mul	x9, x9, x10
	lsr	x10, x9, #32
	lsr	x9, x9, #63
	add	w9, w9, w10, asr #18
	madd	w8, w0, w8, w9
	cbz	w8, LBB0_2
; %bb.1:
	sxtw	x20, w8
Lloh2:
	adrp	x8, _GFXEC@GOTPAGE
Lloh3:
	ldr	x8, [x8, _GFXEC@GOTPAGEOFF]
Lloh4:
	ldr	w0, [x8]
	bl	_I915_READ
	ldr	x8, [x19]
	sub	x9, x0, x8
	mvn	w10, w8
	add	x10, x0, w10, sxtw
	cmp	x0, x8
	csel	x8, x9, x10, ge
	str	x0, [x19]
	ldr	x9, [sp, #8]
	stur	x9, [x19, #12]
	mov	w9, #1181
	mul	w0, w8, w9
	add	x8, x20, x20, lsl #2
	lsl	x1, x8, #1
	bl	_div_u64
	str	w0, [x19, #8]
LBB0_2:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.cfi_endproc
                                        ; -- End function
	.comm	_mchdev_lock,4,2                ; @mchdev_lock
	.comm	_GFXEC,4,2                      ; @GFXEC
	.no_dead_strip	___i915_update_gfx_val
.subsections_via_symbols
