	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function icl_set_cdclk
_icl_set_cdclk:                         ## @icl_set_cdclk
	.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	%rsi, %r14
	movq	%rdi, %r13
	movl	(%rsi), %r15d
	movl	4(%rsi), %r12d
	movq	_SKL_PCODE_CDCLK_CONTROL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_SKL_CDCLK_PREPARE_FOR_CHANGE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	_SKL_CDCLK_READY_FOR_CHANGE@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movl	%ecx, %r8d
	movl	$3, %r9d
	callq	_skl_pcode_request
	testl	%eax, %eax
	je	LBB0_1
## %bb.7:
	leaq	L_.str(%rip), %rdi
	movl	%eax, %esi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_DRM_ERROR                      ## TAILCALL
LBB0_1:
	movl	(%r13), %eax
	testl	%eax, %eax
	je	LBB0_4
## %bb.2:
	cmpl	%r12d, %eax
	je	LBB0_4
## %bb.3:
	movq	%r13, %rdi
	callq	_cnl_cdclk_pll_disable
	movl	(%r13), %eax
LBB0_4:
	cmpl	%r12d, %eax
	je	LBB0_6
## %bb.5:
	movq	%r13, %rdi
	movl	%r12d, %esi
	callq	_cnl_cdclk_pll_enable
LBB0_6:
	movq	_CDCLK_CTL@GOTPCREL(%rip), %rax
	movl	(%rax), %r12d
	movq	_ICL_CDCLK_CD2X_PIPE_NONE@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movl	%r15d, %edi
	callq	_skl_cdclk_decimal
	orl	%eax, %ebx
	movl	%r12d, %edi
	movl	%ebx, %esi
	callq	_I915_WRITE
	movq	_SKL_PCODE_CDCLK_CONTROL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	8(%r14), %edx
	movq	%r13, %rdi
	callq	_sandybridge_pcode_write
	movq	%r13, %rdi
	callq	_intel_update_cdclk
	movl	8(%r14), %eax
	movl	%eax, 4(%r13)
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_SKL_PCODE_CDCLK_CONTROL,4,2    ## @SKL_PCODE_CDCLK_CONTROL
	.comm	_SKL_CDCLK_PREPARE_FOR_CHANGE,4,2 ## @SKL_CDCLK_PREPARE_FOR_CHANGE
	.comm	_SKL_CDCLK_READY_FOR_CHANGE,4,2 ## @SKL_CDCLK_READY_FOR_CHANGE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Failed to inform PCU about cdclk change (%d)\n"

	.comm	_CDCLK_CTL,4,2                  ## @CDCLK_CTL
	.comm	_ICL_CDCLK_CD2X_PIPE_NONE,4,2   ## @ICL_CDCLK_CD2X_PIPE_NONE
	.no_dead_strip	_icl_set_cdclk
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function icl_set_cdclk
_icl_set_cdclk:                         ; @icl_set_cdclk
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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	x20, x1
	mov	x19, x0
	ldp	w21, w22, [x1]
Lloh0:
	adrp	x23, _SKL_PCODE_CDCLK_CONTROL@GOTPAGE
Lloh1:
	ldr	x23, [x23, _SKL_PCODE_CDCLK_CONTROL@GOTPAGEOFF]
	ldr	w1, [x23]
Lloh2:
	adrp	x8, _SKL_CDCLK_PREPARE_FOR_CHANGE@GOTPAGE
Lloh3:
	ldr	x8, [x8, _SKL_CDCLK_PREPARE_FOR_CHANGE@GOTPAGEOFF]
Lloh4:
	ldr	w2, [x8]
Lloh5:
	adrp	x8, _SKL_CDCLK_READY_FOR_CHANGE@GOTPAGE
Lloh6:
	ldr	x8, [x8, _SKL_CDCLK_READY_FOR_CHANGE@GOTPAGEOFF]
Lloh7:
	ldr	w3, [x8]
	mov	x4, x3
	mov	w5, #3
	bl	_skl_pcode_request
	cbz	w0, LBB0_2
; %bb.1:
	mov	x1, x0
Lloh8:
	adrp	x0, l_.str@PAGE
Lloh9:
	add	x0, x0, l_.str@PAGEOFF
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	b	_DRM_ERROR
LBB0_2:
	ldr	w8, [x19]
	cbz	w8, LBB0_5
; %bb.3:
	cmp	w8, w22
	b.eq	LBB0_5
; %bb.4:
	mov	x0, x19
	bl	_cnl_cdclk_pll_disable
	ldr	w8, [x19]
LBB0_5:
	cmp	w8, w22
	b.eq	LBB0_7
; %bb.6:
	mov	x0, x19
	mov	x1, x22
	bl	_cnl_cdclk_pll_enable
LBB0_7:
Lloh10:
	adrp	x8, _CDCLK_CTL@GOTPAGE
Lloh11:
	ldr	x8, [x8, _CDCLK_CTL@GOTPAGEOFF]
Lloh12:
	ldr	w22, [x8]
Lloh13:
	adrp	x8, _ICL_CDCLK_CD2X_PIPE_NONE@GOTPAGE
Lloh14:
	ldr	x8, [x8, _ICL_CDCLK_CD2X_PIPE_NONE@GOTPAGEOFF]
Lloh15:
	ldr	w24, [x8]
	mov	x0, x21
	bl	_skl_cdclk_decimal
	orr	w1, w0, w24
	mov	x0, x22
	bl	_I915_WRITE
	ldr	w1, [x23]
	ldr	w2, [x20, #8]
	mov	x0, x19
	bl	_sandybridge_pcode_write
	mov	x0, x19
	bl	_intel_update_cdclk
	ldr	w8, [x20, #8]
	str	w8, [x19, #4]
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.cfi_endproc
                                        ; -- End function
	.comm	_SKL_PCODE_CDCLK_CONTROL,4,2    ; @SKL_PCODE_CDCLK_CONTROL
	.comm	_SKL_CDCLK_PREPARE_FOR_CHANGE,4,2 ; @SKL_CDCLK_PREPARE_FOR_CHANGE
	.comm	_SKL_CDCLK_READY_FOR_CHANGE,4,2 ; @SKL_CDCLK_READY_FOR_CHANGE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Failed to inform PCU about cdclk change (%d)\n"

	.comm	_CDCLK_CTL,4,2                  ; @CDCLK_CTL
	.comm	_ICL_CDCLK_CD2X_PIPE_NONE,4,2   ; @ICL_CDCLK_CD2X_PIPE_NONE
	.no_dead_strip	_icl_set_cdclk
.subsections_via_symbols
