	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function valleyview_init_gt_powersave
_valleyview_init_gt_powersave:          ## @valleyview_init_gt_powersave
	.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	%r13
	pushq	%r12
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r14
	callq	_valleyview_setup_pctx
	movq	_VLV_IOSF_SB_PUNIT@GOTPCREL(%rip), %r15
	movl	(%r15), %edi
	callq	_BIT
	movl	%eax, %ebx
	movq	_VLV_IOSF_SB_NC@GOTPCREL(%rip), %r12
	movl	(%r12), %edi
	callq	_BIT
	orl	%eax, %ebx
	movq	_VLV_IOSF_SB_CCK@GOTPCREL(%rip), %r13
	movl	(%r13), %edi
	callq	_BIT
	orl	%eax, %ebx
	movq	%r14, %rdi
	movl	%ebx, %esi
	callq	_vlv_iosf_sb_get
	movq	%r14, %rdi
	callq	_vlv_init_gpll_ref_freq
	movq	_PUNIT_REG_GPU_FREQ_STS@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	callq	_vlv_punit_read
                                        ## kill: def $eax killed $eax def $rax
	shrl	$6, %eax
	andl	$3, %eax
	leaq	L_switch.table.valleyview_init_gt_powersave(%rip), %rcx
	movl	(%rcx,%rax,4), %esi
	movl	%esi, (%r14)
	leaq	L_.str(%rip), %rdi
	xorl	%eax, %eax
	callq	_DRM_DEBUG_DRIVER
	movq	%r14, %rdi
	callq	_valleyview_rps_max_freq
	movl	%eax, 16(%r14)
	movl	%eax, 20(%r14)
	movq	%r14, %rdi
	movl	%eax, %esi
	callq	_intel_gpu_freq
	movl	16(%r14), %edx
	leaq	L_.str.1(%rip), %rdi
	movl	%eax, %esi
	xorl	%eax, %eax
	callq	_DRM_DEBUG_DRIVER
	movq	%r14, %rdi
	callq	_valleyview_rps_rpe_freq
	movl	%eax, 12(%r14)
	movq	%r14, %rdi
	movl	%eax, %esi
	callq	_intel_gpu_freq
	movl	12(%r14), %edx
	leaq	L_.str.2(%rip), %rdi
	movl	%eax, %esi
	xorl	%eax, %eax
	callq	_DRM_DEBUG_DRIVER
	movq	%r14, %rdi
	callq	_valleyview_rps_guar_freq
	movl	%eax, 8(%r14)
	movq	%r14, %rdi
	movl	%eax, %esi
	callq	_intel_gpu_freq
	movl	8(%r14), %edx
	leaq	L_.str.3(%rip), %rdi
	movl	%eax, %esi
	xorl	%eax, %eax
	callq	_DRM_DEBUG_DRIVER
	movq	%r14, %rdi
	callq	_valleyview_rps_min_freq
	movl	%eax, 4(%r14)
	movq	%r14, %rdi
	movl	%eax, %esi
	callq	_intel_gpu_freq
	movl	4(%r14), %edx
	leaq	L_.str.4(%rip), %rdi
	movl	%eax, %esi
	xorl	%eax, %eax
	callq	_DRM_DEBUG_DRIVER
	movl	(%r15), %edi
	callq	_BIT
	movl	%eax, %ebx
	movl	(%r12), %edi
	callq	_BIT
	orl	%eax, %ebx
	movl	(%r13), %edi
	callq	_BIT
	orl	%eax, %ebx
	movq	%r14, %rdi
	movl	%ebx, %esi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_vlv_iosf_sb_put                ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_VLV_IOSF_SB_PUNIT,4,2          ## @VLV_IOSF_SB_PUNIT
	.comm	_VLV_IOSF_SB_NC,4,2             ## @VLV_IOSF_SB_NC
	.comm	_VLV_IOSF_SB_CCK,4,2            ## @VLV_IOSF_SB_CCK
	.comm	_PUNIT_REG_GPU_FREQ_STS,4,2     ## @PUNIT_REG_GPU_FREQ_STS
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"DDR speed: %d MHz\n"

L_.str.1:                               ## @.str.1
	.asciz	"max GPU freq: %d MHz (%u)\n"

L_.str.2:                               ## @.str.2
	.asciz	"RPe GPU freq: %d MHz (%u)\n"

L_.str.3:                               ## @.str.3
	.asciz	"RP1(Guar Freq) GPU freq: %d MHz (%u)\n"

L_.str.4:                               ## @.str.4
	.asciz	"min GPU freq: %d MHz (%u)\n"

	.no_dead_strip	_valleyview_init_gt_powersave
	.section	__TEXT,__literal16,16byte_literals
	.p2align	2                               ## @switch.table.valleyview_init_gt_powersave
L_switch.table.valleyview_init_gt_powersave:
	.long	800                             ## 0x320
	.long	800                             ## 0x320
	.long	1066                            ## 0x42a
	.long	1333                            ## 0x535

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function valleyview_init_gt_powersave
_valleyview_init_gt_powersave:          ; @valleyview_init_gt_powersave
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x19, x0
	bl	_valleyview_setup_pctx
Lloh0:
	adrp	x21, _VLV_IOSF_SB_PUNIT@GOTPAGE
Lloh1:
	ldr	x21, [x21, _VLV_IOSF_SB_PUNIT@GOTPAGEOFF]
	ldr	w0, [x21]
	bl	_BIT
	mov	x20, x0
Lloh2:
	adrp	x22, _VLV_IOSF_SB_NC@GOTPAGE
Lloh3:
	ldr	x22, [x22, _VLV_IOSF_SB_NC@GOTPAGEOFF]
	ldr	w0, [x22]
	bl	_BIT
	orr	w20, w0, w20
Lloh4:
	adrp	x23, _VLV_IOSF_SB_CCK@GOTPAGE
Lloh5:
	ldr	x23, [x23, _VLV_IOSF_SB_CCK@GOTPAGEOFF]
	ldr	w0, [x23]
	bl	_BIT
	orr	w1, w20, w0
	mov	x0, x19
	bl	_vlv_iosf_sb_get
	mov	x0, x19
	bl	_vlv_init_gpll_ref_freq
Lloh6:
	adrp	x8, _PUNIT_REG_GPU_FREQ_STS@GOTPAGE
Lloh7:
	ldr	x8, [x8, _PUNIT_REG_GPU_FREQ_STS@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_vlv_punit_read
	ubfx	w8, w0, #6, #2
Lloh9:
	adrp	x9, l_switch.table.valleyview_init_gt_powersave@PAGE
Lloh10:
	add	x9, x9, l_switch.table.valleyview_init_gt_powersave@PAGEOFF
	ldr	w1, [x9, w8, uxtw #2]
	str	w1, [x19]
Lloh11:
	adrp	x0, l_.str@PAGE
Lloh12:
	add	x0, x0, l_.str@PAGEOFF
	bl	_DRM_DEBUG_DRIVER
	mov	x0, x19
	bl	_valleyview_rps_max_freq
	mov	x1, x0
	stp	w0, w0, [x19, #16]
	mov	x0, x19
	bl	_intel_gpu_freq
	mov	x1, x0
	ldr	w8, [x19, #16]
	str	x8, [sp]
Lloh13:
	adrp	x0, l_.str.1@PAGE
Lloh14:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_DRM_DEBUG_DRIVER
	mov	x0, x19
	bl	_valleyview_rps_rpe_freq
	mov	x1, x0
	str	w0, [x19, #12]
	mov	x0, x19
	bl	_intel_gpu_freq
	mov	x1, x0
	ldr	w8, [x19, #12]
	str	x8, [sp]
Lloh15:
	adrp	x0, l_.str.2@PAGE
Lloh16:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_DRM_DEBUG_DRIVER
	mov	x0, x19
	bl	_valleyview_rps_guar_freq
	mov	x1, x0
	str	w0, [x19, #8]
	mov	x0, x19
	bl	_intel_gpu_freq
	mov	x1, x0
	ldr	w8, [x19, #8]
	str	x8, [sp]
Lloh17:
	adrp	x0, l_.str.3@PAGE
Lloh18:
	add	x0, x0, l_.str.3@PAGEOFF
	bl	_DRM_DEBUG_DRIVER
	mov	x0, x19
	bl	_valleyview_rps_min_freq
	mov	x1, x0
	str	w0, [x19, #4]
	mov	x0, x19
	bl	_intel_gpu_freq
	mov	x1, x0
	ldr	w8, [x19, #4]
	str	x8, [sp]
Lloh19:
	adrp	x0, l_.str.4@PAGE
Lloh20:
	add	x0, x0, l_.str.4@PAGEOFF
	bl	_DRM_DEBUG_DRIVER
	ldr	w0, [x21]
	bl	_BIT
	mov	x20, x0
	ldr	w0, [x22]
	bl	_BIT
	orr	w20, w0, w20
	ldr	w0, [x23]
	bl	_BIT
	orr	w1, w20, w0
	mov	x0, x19
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #80
	b	_vlv_iosf_sb_put
	.loh AdrpAdd	Lloh19, Lloh20
	.loh AdrpAdd	Lloh17, Lloh18
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.comm	_VLV_IOSF_SB_PUNIT,4,2          ; @VLV_IOSF_SB_PUNIT
	.comm	_VLV_IOSF_SB_NC,4,2             ; @VLV_IOSF_SB_NC
	.comm	_VLV_IOSF_SB_CCK,4,2            ; @VLV_IOSF_SB_CCK
	.comm	_PUNIT_REG_GPU_FREQ_STS,4,2     ; @PUNIT_REG_GPU_FREQ_STS
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"DDR speed: %d MHz\n"

l_.str.1:                               ; @.str.1
	.asciz	"max GPU freq: %d MHz (%u)\n"

l_.str.2:                               ; @.str.2
	.asciz	"RPe GPU freq: %d MHz (%u)\n"

l_.str.3:                               ; @.str.3
	.asciz	"RP1(Guar Freq) GPU freq: %d MHz (%u)\n"

l_.str.4:                               ; @.str.4
	.asciz	"min GPU freq: %d MHz (%u)\n"

	.no_dead_strip	_valleyview_init_gt_powersave
	.section	__TEXT,__literal16,16byte_literals
	.p2align	2                               ; @switch.table.valleyview_init_gt_powersave
l_switch.table.valleyview_init_gt_powersave:
	.long	800                             ; 0x320
	.long	800                             ; 0x320
	.long	1066                            ; 0x42a
	.long	1333                            ; 0x535

.subsections_via_symbols
