	.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	%r15
	pushq	%r14
	pushq	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r14
	movq	_mchdev_lock@GOTPCREL(%rip), %rdi
	callq	_lockdep_assert_held
	xorl	%eax, %eax
	callq	_ktime_get_raw_ns
	movl	%eax, %r15d
	movq	_NSEC_PER_MSEC@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	(%r14), %ebx
	movl	%r15d, %edi
	subl	%ebx, %edi
	callq	_do_div
	movl	%r15d, %r12d
	subl	%ebx, %r12d
	je	LBB0_4
## %bb.1:
	movq	_GFXEC@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_I915_READ
	movq	8(%r14), %rdx
	movq	%rax, %rcx
	subq	%rdx, %rcx
	jge	LBB0_3
## %bb.2:
	notl	%edx
	movslq	%edx, %rcx
	addq	%rax, %rcx
LBB0_3:
	movq	%rax, 8(%r14)
	movl	%r15d, (%r14)
	imull	$1181, %ecx, %edi               ## imm = 0x49D
	addl	%r12d, %r12d
	leal	(%r12,%r12,4), %esi
	callq	_div_u64
	movl	%eax, 16(%r14)
LBB0_4:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_mchdev_lock,4,2                ## @mchdev_lock
	.comm	_NSEC_PER_MSEC,4,2              ## @NSEC_PER_MSEC
	.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:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w21, -40
	.cfi_offset w22, -48
	mov	x19, x0
Lloh0:
	adrp	x0, _mchdev_lock@GOTPAGE
Lloh1:
	ldr	x0, [x0, _mchdev_lock@GOTPAGEOFF]
	bl	_lockdep_assert_held
	bl	_ktime_get_raw_ns
	mov	x20, x0
	ldr	w21, [x19]
	subs	w0, w0, w21
Lloh2:
	adrp	x8, _NSEC_PER_MSEC@GOTPAGE
Lloh3:
	ldr	x8, [x8, _NSEC_PER_MSEC@GOTPAGEOFF]
Lloh4:
	ldr	w1, [x8]
	bl	_do_div
	subs	w21, w20, w21
	b.eq	LBB0_2
; %bb.1:
Lloh5:
	adrp	x8, _GFXEC@GOTPAGE
Lloh6:
	ldr	x8, [x8, _GFXEC@GOTPAGEOFF]
Lloh7:
	ldr	w0, [x8]
	bl	_I915_READ
	ldr	x8, [x19, #8]
	sub	x9, x0, x8
	mvn	w10, w8
	add	x10, x0, w10, sxtw
	cmp	x0, x8
	csel	x8, x9, x10, ge
	str	x0, [x19, #8]
	str	w20, [x19]
	mov	w9, #1181
	mul	w0, w8, w9
	add	w8, w21, w21, lsl #2
	lsl	w1, w8, #1
	bl	_div_u64
	str	w0, [x19, #16]
LBB0_2:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.comm	_mchdev_lock,4,2                ; @mchdev_lock
	.comm	_NSEC_PER_MSEC,4,2              ; @NSEC_PER_MSEC
	.comm	_GFXEC,4,2                      ; @GFXEC
	.no_dead_strip	___i915_update_gfx_val
.subsections_via_symbols
