	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function cherryview_enable_rps
_cherryview_enable_rps:                 ## @cherryview_enable_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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r14
	movq	_FORCEWAKE_ALL@GOTPCREL(%rip), %r15
	movl	(%r15), %esi
	callq	_intel_uncore_forcewake_get
	movq	_GEN6_RP_DOWN_TIMEOUT@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	$1000000, %esi                  ## imm = 0xF4240
	callq	_I915_WRITE
	movq	_GEN6_RP_UP_THRESHOLD@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	$59400, %esi                    ## imm = 0xE808
	callq	_I915_WRITE
	movq	_GEN6_RP_DOWN_THRESHOLD@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	$245000, %esi                   ## imm = 0x3BD08
	callq	_I915_WRITE
	movq	_GEN6_RP_UP_EI@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	$66000, %esi                    ## imm = 0x101D0
	callq	_I915_WRITE
	movq	_GEN6_RP_DOWN_EI@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	$350000, %esi                   ## imm = 0x55730
	callq	_I915_WRITE
	movq	_GEN6_RP_IDLE_HYSTERSIS@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	$10, %esi
	callq	_I915_WRITE
	movq	_GEN6_RP_MEDIA_HW_NORMAL_MODE@GOTPCREL(%rip), %rax
	movq	_GEN6_RP_MEDIA_IS_GFX@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	orl	(%rax), %esi
	movq	_GEN6_RP_ENABLE@GOTPCREL(%rip), %rax
	orl	(%rax), %esi
	movq	_GEN6_RP_CONTROL@GOTPCREL(%rip), %rax
	movq	_GEN6_RP_UP_BUSY_AVG@GOTPCREL(%rip), %rcx
	orl	(%rcx), %esi
	movl	(%rax), %edi
	movq	_GEN6_RP_DOWN_IDLE_AVG@GOTPCREL(%rip), %rax
	orl	(%rax), %esi
	callq	_I915_WRITE
	movq	%r14, %rdi
	callq	_vlv_punit_get
	movq	_VLV_OVERRIDE_EN@GOTPCREL(%rip), %rax
	movq	_VLV_SOC_TDP_EN@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	orl	(%rax), %edx
	movq	_CHV_BIAS_CPU_50_SOC_50@GOTPCREL(%rip), %rax
	orl	(%rax), %edx
	movq	_VLV_TURBO_SOC_OVERRIDE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	callq	_vlv_punit_write
	movq	_PUNIT_REG_GPU_FREQ_STS@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	callq	_vlv_punit_read
	movl	%eax, %ebx
	movq	%r14, %rdi
	callq	_vlv_punit_put
	movq	_GPLLENABLE@GOTPCREL(%rip), %r12
	xorl	%edi, %edi
	movl	(%r12), %eax
	andl	%ebx, %eax
	sete	%dil
	leaq	L_.str(%rip), %rsi
	callq	_WARN_ONCE
	movl	(%r12), %edi
	andl	%ebx, %edi
	callq	_yesno
	leaq	L_.str.1(%rip), %rdi
	movl	%eax, %esi
	callq	_DRM_DEBUG_DRIVER
	leaq	L_.str.2(%rip), %rdi
	movl	%ebx, %esi
	callq	_DRM_DEBUG_DRIVER
	movq	_valleyview_set_rps@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	callq	_reset_rps
	movl	(%r15), %esi
	movq	%r14, %rdi
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_intel_uncore_forcewake_put     ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_FORCEWAKE_ALL,4,2              ## @FORCEWAKE_ALL
	.comm	_GEN6_RP_DOWN_TIMEOUT,4,2       ## @GEN6_RP_DOWN_TIMEOUT
	.comm	_GEN6_RP_UP_THRESHOLD,4,2       ## @GEN6_RP_UP_THRESHOLD
	.comm	_GEN6_RP_DOWN_THRESHOLD,4,2     ## @GEN6_RP_DOWN_THRESHOLD
	.comm	_GEN6_RP_UP_EI,4,2              ## @GEN6_RP_UP_EI
	.comm	_GEN6_RP_DOWN_EI,4,2            ## @GEN6_RP_DOWN_EI
	.comm	_GEN6_RP_IDLE_HYSTERSIS,4,2     ## @GEN6_RP_IDLE_HYSTERSIS
	.comm	_GEN6_RP_CONTROL,4,2            ## @GEN6_RP_CONTROL
	.comm	_GEN6_RP_MEDIA_HW_NORMAL_MODE,4,2 ## @GEN6_RP_MEDIA_HW_NORMAL_MODE
	.comm	_GEN6_RP_MEDIA_IS_GFX,4,2       ## @GEN6_RP_MEDIA_IS_GFX
	.comm	_GEN6_RP_ENABLE,4,2             ## @GEN6_RP_ENABLE
	.comm	_GEN6_RP_UP_BUSY_AVG,4,2        ## @GEN6_RP_UP_BUSY_AVG
	.comm	_GEN6_RP_DOWN_IDLE_AVG,4,2      ## @GEN6_RP_DOWN_IDLE_AVG
	.comm	_VLV_OVERRIDE_EN,4,2            ## @VLV_OVERRIDE_EN
	.comm	_VLV_SOC_TDP_EN,4,2             ## @VLV_SOC_TDP_EN
	.comm	_CHV_BIAS_CPU_50_SOC_50,4,2     ## @CHV_BIAS_CPU_50_SOC_50
	.comm	_VLV_TURBO_SOC_OVERRIDE,4,2     ## @VLV_TURBO_SOC_OVERRIDE
	.comm	_PUNIT_REG_GPU_FREQ_STS,4,2     ## @PUNIT_REG_GPU_FREQ_STS
	.comm	_GPLLENABLE,4,2                 ## @GPLLENABLE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"GPLL not enabled\n"

L_.str.1:                               ## @.str.1
	.asciz	"GPLL enabled? %s\n"

L_.str.2:                               ## @.str.2
	.asciz	"GPU status: 0x%08x\n"

	.comm	_valleyview_set_rps,4,2         ## @valleyview_set_rps
	.no_dead_strip	_cherryview_enable_rps
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function cherryview_enable_rps
_cherryview_enable_rps:                 ; @cherryview_enable_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	x19, x0
Lloh0:
	adrp	x21, _FORCEWAKE_ALL@GOTPAGE
Lloh1:
	ldr	x21, [x21, _FORCEWAKE_ALL@GOTPAGEOFF]
	ldr	w1, [x21]
	bl	_intel_uncore_forcewake_get
Lloh2:
	adrp	x8, _GEN6_RP_DOWN_TIMEOUT@GOTPAGE
Lloh3:
	ldr	x8, [x8, _GEN6_RP_DOWN_TIMEOUT@GOTPAGEOFF]
Lloh4:
	ldr	w0, [x8]
	mov	w1, #16960
	movk	w1, #15, lsl #16
	bl	_I915_WRITE
Lloh5:
	adrp	x8, _GEN6_RP_UP_THRESHOLD@GOTPAGE
Lloh6:
	ldr	x8, [x8, _GEN6_RP_UP_THRESHOLD@GOTPAGEOFF]
Lloh7:
	ldr	w0, [x8]
	mov	w1, #59400
	bl	_I915_WRITE
Lloh8:
	adrp	x8, _GEN6_RP_DOWN_THRESHOLD@GOTPAGE
Lloh9:
	ldr	x8, [x8, _GEN6_RP_DOWN_THRESHOLD@GOTPAGEOFF]
Lloh10:
	ldr	w0, [x8]
	mov	w1, #48392
	movk	w1, #3, lsl #16
	bl	_I915_WRITE
Lloh11:
	adrp	x8, _GEN6_RP_UP_EI@GOTPAGE
Lloh12:
	ldr	x8, [x8, _GEN6_RP_UP_EI@GOTPAGEOFF]
Lloh13:
	ldr	w0, [x8]
	mov	w1, #464
	movk	w1, #1, lsl #16
	bl	_I915_WRITE
Lloh14:
	adrp	x8, _GEN6_RP_DOWN_EI@GOTPAGE
Lloh15:
	ldr	x8, [x8, _GEN6_RP_DOWN_EI@GOTPAGEOFF]
Lloh16:
	ldr	w0, [x8]
	mov	w1, #22320
	movk	w1, #5, lsl #16
	bl	_I915_WRITE
Lloh17:
	adrp	x8, _GEN6_RP_IDLE_HYSTERSIS@GOTPAGE
Lloh18:
	ldr	x8, [x8, _GEN6_RP_IDLE_HYSTERSIS@GOTPAGEOFF]
Lloh19:
	ldr	w0, [x8]
	mov	w1, #10
	bl	_I915_WRITE
Lloh20:
	adrp	x8, _GEN6_RP_CONTROL@GOTPAGE
Lloh21:
	ldr	x8, [x8, _GEN6_RP_CONTROL@GOTPAGEOFF]
Lloh22:
	adrp	x9, _GEN6_RP_MEDIA_HW_NORMAL_MODE@GOTPAGE
Lloh23:
	ldr	x9, [x9, _GEN6_RP_MEDIA_HW_NORMAL_MODE@GOTPAGEOFF]
Lloh24:
	ldr	w0, [x8]
Lloh25:
	ldr	w8, [x9]
Lloh26:
	adrp	x9, _GEN6_RP_MEDIA_IS_GFX@GOTPAGE
Lloh27:
	ldr	x9, [x9, _GEN6_RP_MEDIA_IS_GFX@GOTPAGEOFF]
Lloh28:
	ldr	w9, [x9]
	orr	w8, w9, w8
Lloh29:
	adrp	x9, _GEN6_RP_ENABLE@GOTPAGE
Lloh30:
	ldr	x9, [x9, _GEN6_RP_ENABLE@GOTPAGEOFF]
Lloh31:
	ldr	w9, [x9]
	orr	w8, w8, w9
Lloh32:
	adrp	x9, _GEN6_RP_UP_BUSY_AVG@GOTPAGE
Lloh33:
	ldr	x9, [x9, _GEN6_RP_UP_BUSY_AVG@GOTPAGEOFF]
Lloh34:
	ldr	w9, [x9]
	orr	w8, w8, w9
Lloh35:
	adrp	x9, _GEN6_RP_DOWN_IDLE_AVG@GOTPAGE
Lloh36:
	ldr	x9, [x9, _GEN6_RP_DOWN_IDLE_AVG@GOTPAGEOFF]
Lloh37:
	ldr	w9, [x9]
	orr	w1, w8, w9
	bl	_I915_WRITE
	mov	x0, x19
	bl	_vlv_punit_get
Lloh38:
	adrp	x8, _VLV_OVERRIDE_EN@GOTPAGE
Lloh39:
	ldr	x8, [x8, _VLV_OVERRIDE_EN@GOTPAGEOFF]
Lloh40:
	ldr	w8, [x8]
Lloh41:
	adrp	x9, _VLV_SOC_TDP_EN@GOTPAGE
Lloh42:
	ldr	x9, [x9, _VLV_SOC_TDP_EN@GOTPAGEOFF]
Lloh43:
	ldr	w9, [x9]
Lloh44:
	adrp	x10, _CHV_BIAS_CPU_50_SOC_50@GOTPAGE
Lloh45:
	ldr	x10, [x10, _CHV_BIAS_CPU_50_SOC_50@GOTPAGEOFF]
	orr	w8, w9, w8
Lloh46:
	ldr	w9, [x10]
	orr	w2, w8, w9
Lloh47:
	adrp	x8, _VLV_TURBO_SOC_OVERRIDE@GOTPAGE
Lloh48:
	ldr	x8, [x8, _VLV_TURBO_SOC_OVERRIDE@GOTPAGEOFF]
Lloh49:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_vlv_punit_write
Lloh50:
	adrp	x8, _PUNIT_REG_GPU_FREQ_STS@GOTPAGE
Lloh51:
	ldr	x8, [x8, _PUNIT_REG_GPU_FREQ_STS@GOTPAGEOFF]
Lloh52:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_vlv_punit_read
	mov	x20, x0
	mov	x0, x19
	bl	_vlv_punit_put
Lloh53:
	adrp	x22, _GPLLENABLE@GOTPAGE
Lloh54:
	ldr	x22, [x22, _GPLLENABLE@GOTPAGEOFF]
	ldr	w8, [x22]
	tst	w8, w20
	cset	w0, eq
Lloh55:
	adrp	x1, l_.str@PAGE
Lloh56:
	add	x1, x1, l_.str@PAGEOFF
	bl	_WARN_ONCE
	ldr	w8, [x22]
	and	w0, w8, w20
	bl	_yesno
	mov	x1, x0
Lloh57:
	adrp	x0, l_.str.1@PAGE
Lloh58:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_DRM_DEBUG_DRIVER
Lloh59:
	adrp	x0, l_.str.2@PAGE
Lloh60:
	add	x0, x0, l_.str.2@PAGEOFF
	mov	x1, x20
	bl	_DRM_DEBUG_DRIVER
Lloh61:
	adrp	x8, _valleyview_set_rps@GOTPAGE
Lloh62:
	ldr	x8, [x8, _valleyview_set_rps@GOTPAGEOFF]
Lloh63:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_reset_rps
	ldr	w1, [x21]
	mov	x0, x19
	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
	b	_intel_uncore_forcewake_put
	.loh AdrpLdrGotLdr	Lloh61, Lloh62, Lloh63
	.loh AdrpAdd	Lloh59, Lloh60
	.loh AdrpAdd	Lloh57, Lloh58
	.loh AdrpAdd	Lloh55, Lloh56
	.loh AdrpLdrGot	Lloh53, Lloh54
	.loh AdrpLdrGotLdr	Lloh50, Lloh51, Lloh52
	.loh AdrpLdrGotLdr	Lloh47, Lloh48, Lloh49
	.loh AdrpLdrGotLdr	Lloh44, Lloh45, Lloh46
	.loh AdrpLdrGotLdr	Lloh41, Lloh42, Lloh43
	.loh AdrpLdrGotLdr	Lloh38, Lloh39, Lloh40
	.loh AdrpLdrGotLdr	Lloh35, Lloh36, Lloh37
	.loh AdrpLdrGotLdr	Lloh32, Lloh33, Lloh34
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh31
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh25
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh24
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.comm	_FORCEWAKE_ALL,4,2              ; @FORCEWAKE_ALL
	.comm	_GEN6_RP_DOWN_TIMEOUT,4,2       ; @GEN6_RP_DOWN_TIMEOUT
	.comm	_GEN6_RP_UP_THRESHOLD,4,2       ; @GEN6_RP_UP_THRESHOLD
	.comm	_GEN6_RP_DOWN_THRESHOLD,4,2     ; @GEN6_RP_DOWN_THRESHOLD
	.comm	_GEN6_RP_UP_EI,4,2              ; @GEN6_RP_UP_EI
	.comm	_GEN6_RP_DOWN_EI,4,2            ; @GEN6_RP_DOWN_EI
	.comm	_GEN6_RP_IDLE_HYSTERSIS,4,2     ; @GEN6_RP_IDLE_HYSTERSIS
	.comm	_GEN6_RP_CONTROL,4,2            ; @GEN6_RP_CONTROL
	.comm	_GEN6_RP_MEDIA_HW_NORMAL_MODE,4,2 ; @GEN6_RP_MEDIA_HW_NORMAL_MODE
	.comm	_GEN6_RP_MEDIA_IS_GFX,4,2       ; @GEN6_RP_MEDIA_IS_GFX
	.comm	_GEN6_RP_ENABLE,4,2             ; @GEN6_RP_ENABLE
	.comm	_GEN6_RP_UP_BUSY_AVG,4,2        ; @GEN6_RP_UP_BUSY_AVG
	.comm	_GEN6_RP_DOWN_IDLE_AVG,4,2      ; @GEN6_RP_DOWN_IDLE_AVG
	.comm	_VLV_OVERRIDE_EN,4,2            ; @VLV_OVERRIDE_EN
	.comm	_VLV_SOC_TDP_EN,4,2             ; @VLV_SOC_TDP_EN
	.comm	_CHV_BIAS_CPU_50_SOC_50,4,2     ; @CHV_BIAS_CPU_50_SOC_50
	.comm	_VLV_TURBO_SOC_OVERRIDE,4,2     ; @VLV_TURBO_SOC_OVERRIDE
	.comm	_PUNIT_REG_GPU_FREQ_STS,4,2     ; @PUNIT_REG_GPU_FREQ_STS
	.comm	_GPLLENABLE,4,2                 ; @GPLLENABLE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"GPLL not enabled\n"

l_.str.1:                               ; @.str.1
	.asciz	"GPLL enabled? %s\n"

l_.str.2:                               ; @.str.2
	.asciz	"GPU status: 0x%08x\n"

	.comm	_valleyview_set_rps,4,2         ; @valleyview_set_rps
	.no_dead_strip	_cherryview_enable_rps
.subsections_via_symbols
