	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function valleyview_set_rps
_valleyview_set_rps:                    ## @valleyview_set_rps
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, %r15d
	movq	%rdi, %r14
	callq	_IS_CHERRYVIEW
	testq	%rax, %rax
	setne	%al
	andb	%r15b, %al
	movzbl	%al, %edi
	leaq	L_.str(%rip), %rsi
	callq	_WARN_ONCE
	movl	%r15d, %ebx
	andl	$-2, %ebx
	testq	%rax, %rax
	cmovel	%r15d, %ebx
	movq	_GEN6_PMINTRMSK@GOTPCREL(%rip), %rax
	movl	(%rax), %r15d
	movq	%r14, %rdi
	movl	%ebx, %esi
	callq	_gen6_rps_pm_mask
	movl	%r15d, %edi
	movl	%eax, %esi
	callq	_I915_WRITE
	cmpl	(%r14), %ebx
	je	LBB0_3
## %bb.1:
	movq	%r14, %rdi
	callq	_vlv_punit_get
	movq	_PUNIT_REG_GPU_FREQ_REQ@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	movl	%ebx, %edx
	callq	_vlv_punit_write
	movl	%eax, %r15d
	movq	%r14, %rdi
	callq	_vlv_punit_put
	testl	%r15d, %r15d
	jne	LBB0_4
## %bb.2:
	movq	%r14, %rdi
	movl	%ebx, %esi
	callq	_gen6_set_rps_thresholds
LBB0_3:
	movl	%ebx, (%r14)
	movq	%r14, %rdi
	movl	%ebx, %esi
	callq	_intel_gpu_freq
	movl	%eax, %edi
	callq	_trace_intel_gpu_freq_change
	xorl	%r15d, %r15d
LBB0_4:
	movl	%r15d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Odd GPU freq value\n"

	.comm	_GEN6_PMINTRMSK,4,2             ## @GEN6_PMINTRMSK
	.comm	_PUNIT_REG_GPU_FREQ_REQ,4,2     ## @PUNIT_REG_GPU_FREQ_REQ
	.no_dead_strip	_valleyview_set_rps
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function valleyview_set_rps
_valleyview_set_rps:                    ; @valleyview_set_rps
	.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	x20, x1
	mov	x19, x0
	bl	_IS_CHERRYVIEW
	cmp	x0, #0
	cset	w8, ne
	and	w0, w20, w8
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	bl	_WARN_ONCE
	and	w8, w20, #0xfffffffe
	cmp	x0, #0
	csel	w20, w20, w8, eq
Lloh2:
	adrp	x8, _GEN6_PMINTRMSK@GOTPAGE
Lloh3:
	ldr	x8, [x8, _GEN6_PMINTRMSK@GOTPAGEOFF]
Lloh4:
	ldr	w21, [x8]
	mov	x0, x19
	mov	x1, x20
	bl	_gen6_rps_pm_mask
	mov	x1, x0
	mov	x0, x21
	bl	_I915_WRITE
	ldr	w8, [x19]
	cmp	w20, w8
	b.eq	LBB0_3
; %bb.1:
	mov	x0, x19
	bl	_vlv_punit_get
Lloh5:
	adrp	x8, _PUNIT_REG_GPU_FREQ_REQ@GOTPAGE
Lloh6:
	ldr	x8, [x8, _PUNIT_REG_GPU_FREQ_REQ@GOTPAGEOFF]
Lloh7:
	ldr	w1, [x8]
	mov	x0, x19
	mov	x2, x20
	bl	_vlv_punit_write
	mov	x21, x0
	mov	x0, x19
	bl	_vlv_punit_put
	cbnz	w21, LBB0_4
; %bb.2:
	mov	x0, x19
	mov	x1, x20
	bl	_gen6_set_rps_thresholds
LBB0_3:
	str	w20, [x19]
	mov	x0, x19
	mov	x1, x20
	bl	_intel_gpu_freq
	bl	_trace_intel_gpu_freq_change
	mov	w21, #0
LBB0_4:
	mov	x0, x21
	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 AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Odd GPU freq value\n"

	.comm	_GEN6_PMINTRMSK,4,2             ; @GEN6_PMINTRMSK
	.comm	_PUNIT_REG_GPU_FREQ_REQ,4,2     ; @PUNIT_REG_GPU_FREQ_REQ
	.no_dead_strip	_valleyview_set_rps
.subsections_via_symbols
