	.file	"extr_intel_pm.c___i915_update_gfx_val.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	__i915_update_gfx_val, @function
__i915_update_gfx_val:
.LFB0:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	push	rbx
	.cfi_def_cfa_offset 24
	.cfi_offset 3, -24
	mov	rbx, rdi
	lea	rdi, mchdev_lock[rip]
	sub	rsp, 24
	.cfi_def_cfa_offset 48
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 8[rsp], rax
	xor	eax, eax
	call	assert_spin_locked@PLT
	mov	rdi, rsp
	call	getrawmonotonic@PLT
	mov	rsi, QWORD PTR 12[rbx]
	mov	rdi, QWORD PTR [rsp]
	call	timespec_sub@PLT
	imul	ebp, eax, 1000
	mov	rdx, rax
	sar	rax, 32
	imul	rax, rax, 1125899907
	sar	rdx, 63
	sar	rax, 50
	sub	eax, edx
	add	eax, ebp
	movsx	rbp, eax
	test	rbp, rbp
	je	.L1
	mov	edi, DWORD PTR GFXEC[rip]
	call	I915_READ@PLT
	mov	rcx, QWORD PTR [rbx]
	lea	rsi, 0[rbp+rbp*4]
	mov	QWORD PTR [rbx], rax
	mov	edi, ecx
	not	edi
	lea	edx, [rdi+rax]
	mov	edi, eax
	sub	edi, ecx
	cmp	rcx, rax
	mov	rax, QWORD PTR [rsp]
	cmovg	edi, edx
	add	rsi, rsi
	mov	QWORD PTR 12[rbx], rax
	imul	edi, edi, 1181
	call	div_u64@PLT
	mov	DWORD PTR 8[rbx], eax
.L1:
	mov	rax, QWORD PTR 8[rsp]
	xor	rax, QWORD PTR fs:40
	jne	.L9
	add	rsp, 24
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	pop	rbx
	.cfi_def_cfa_offset 16
	pop	rbp
	.cfi_def_cfa_offset 8
	ret
.L9:
	.cfi_restore_state
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	__i915_update_gfx_val, .-__i915_update_gfx_val
	.comm	mchdev_lock,4,4
	.comm	GFXEC,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	 1f - 0f
	.long	 4f - 1f
	.long	 5
0:
	.string	 "GNU"
1:
	.align 8
	.long	 0xc0000002
	.long	 3f - 2f
2:
	.long	 0x3
3:
	.align 8
4:

	.arch armv5t
	.eabi_attribute 20, 1
	.eabi_attribute 21, 1
	.eabi_attribute 23, 3
	.eabi_attribute 24, 1
	.eabi_attribute 25, 1
	.eabi_attribute 26, 2
	.eabi_attribute 30, 2
	.eabi_attribute 34, 0
	.eabi_attribute 18, 4
	.file	"extr_intel_pm.c___i915_update_gfx_val.c"
	.text
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC0:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	__i915_update_gfx_val, %function
__i915_update_gfx_val:
	@ args = 0, pretend = 0, frame = 24
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, lr}
	mov	r5, r0
	sub	sp, sp, #32
	ldr	r3, .L10
	add	r6, sp, #12
	ldr	r0, .L10+4
	ldr	r3, [r3]
	str	r3, [sp, #28]
	mov	r3,#0
	bl	assert_spin_locked
	mov	r0, r6
	bl	getrawmonotonic
	ldm	r6, {r1, r2}
	ldr	r0, [r5, #12]
	ldr	r3, [r5, #8]
	str	r0, [sp]
	add	r0, sp, #20
	bl	timespec_sub
	ldr	r2, [sp, #24]
	ldr	r3, .L10+8
	ldr	r4, [sp, #20]
	smull	r1, r3, r2, r3
	asr	r2, r2, #31
	rsb	r1, r4, r4, lsl #5
	rsb	r3, r2, r3, asr #18
	add	r4, r4, r1, lsl #2
	adds	r4, r3, r4, lsl #3
	beq	.L1
	ldr	r3, .L10+12
	add	r4, r4, r4, lsl #2
	ldr	r0, [r3]
	bl	I915_READ
	ldr	r2, [r5]
	mov	ip, r0
	cmp	r2, r0
	mvngt	r2, r2
	mov	lr, r5
	addgt	r2, r0, r2
	suble	r2, r0, r2
	str	ip, [lr], #8
	rsb	ip, r2, r2, lsl #4
	rsb	ip, r2, ip, lsl #2
	add	ip, ip, ip, lsl #2
	ldm	r6, {r0, r1}
	stm	lr, {r0, r1}
	lsl	r1, r4, #1
	add	r0, r2, ip, lsl #2
	bl	div_u64
	str	r0, [r5, #4]
.L1:
	ldr	r3, .L10
	ldr	r2, [r3]
	ldr	r3, [sp, #28]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L9
	add	sp, sp, #32
	@ sp needed
	pop	{r4, r5, r6, pc}
.L9:
	bl	__stack_chk_fail
.L11:
	.align	2
.L10:
	.word	.LC0
	.word	mchdev_lock
	.word	1125899907
	.word	GFXEC
	.size	__i915_update_gfx_val, .-__i915_update_gfx_val
	.comm	mchdev_lock,4,4
	.comm	GFXEC,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
