	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function cnl_sanitize_cdclk
_cnl_sanitize_cdclk:                    ## @cnl_sanitize_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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	callq	_intel_update_cdclk
	leaq	L_.str(%rip), %rsi
	movq	%rbx, %rdi
	callq	_intel_dump_cdclk_state
	cmpl	$0, (%rbx)
	je	LBB0_3
## %bb.1:
	movq	8(%rbx), %rax
	cmpq	16(%rbx), %rax
	je	LBB0_3
## %bb.2:
	movq	_CDCLK_CTL@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_I915_READ
	movq	_BXT_CDCLK_CD2X_PIPE_NONE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %r14d
	notl	%r14d
	andl	%eax, %r14d
	movq	_BXT_CDCLK_CD2X_DIV_SEL_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %r15d
	andl	%r14d, %r15d
	movq	8(%rbx), %rdi
	callq	_skl_cdclk_decimal
	orl	%r15d, %eax
	cmpl	%eax, %r14d
	je	LBB0_4
LBB0_3:
	leaq	L_.str.1(%rip), %rdi
	callq	_DRM_DEBUG_KMS
	movq	$0, 8(%rbx)
	movl	$-1, (%rbx)
LBB0_4:
	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	"Current CDCLK"

	.comm	_CDCLK_CTL,4,2                  ## @CDCLK_CTL
	.comm	_BXT_CDCLK_CD2X_PIPE_NONE,4,2   ## @BXT_CDCLK_CD2X_PIPE_NONE
	.comm	_BXT_CDCLK_CD2X_DIV_SEL_MASK,4,2 ## @BXT_CDCLK_CD2X_DIV_SEL_MASK
L_.str.1:                               ## @.str.1
	.asciz	"Sanitizing cdclk programmed by pre-os\n"

	.no_dead_strip	_cnl_sanitize_cdclk
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function cnl_sanitize_cdclk
_cnl_sanitize_cdclk:                    ; @cnl_sanitize_cdclk
	.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
	bl	_intel_update_cdclk
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	bl	_intel_dump_cdclk_state
	ldr	w8, [x19]
	cbz	w8, LBB0_3
; %bb.1:
	ldp	x8, x9, [x19, #8]
	cmp	x8, x9
	b.eq	LBB0_3
; %bb.2:
Lloh2:
	adrp	x8, _CDCLK_CTL@GOTPAGE
Lloh3:
	ldr	x8, [x8, _CDCLK_CTL@GOTPAGEOFF]
Lloh4:
	ldr	w0, [x8]
	bl	_I915_READ
Lloh5:
	adrp	x8, _BXT_CDCLK_CD2X_PIPE_NONE@GOTPAGE
Lloh6:
	ldr	x8, [x8, _BXT_CDCLK_CD2X_PIPE_NONE@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
	bic	w20, w0, w8
Lloh8:
	adrp	x8, _BXT_CDCLK_CD2X_DIV_SEL_MASK@GOTPAGE
Lloh9:
	ldr	x8, [x8, _BXT_CDCLK_CD2X_DIV_SEL_MASK@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
	and	w21, w20, w8
	ldr	x0, [x19, #8]
	bl	_skl_cdclk_decimal
	orr	w8, w0, w21
	cmp	w20, w8
	b.eq	LBB0_4
LBB0_3:
Lloh11:
	adrp	x0, l_.str.1@PAGE
Lloh12:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_DRM_DEBUG_KMS
	str	xzr, [x19, #8]
	mov	w8, #-1
	str	w8, [x19]
LBB0_4:
	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 AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh11, Lloh12
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Current CDCLK"

	.comm	_CDCLK_CTL,4,2                  ; @CDCLK_CTL
	.comm	_BXT_CDCLK_CD2X_PIPE_NONE,4,2   ; @BXT_CDCLK_CD2X_PIPE_NONE
	.comm	_BXT_CDCLK_CD2X_DIV_SEL_MASK,4,2 ; @BXT_CDCLK_CD2X_DIV_SEL_MASK
l_.str.1:                               ; @.str.1
	.asciz	"Sanitizing cdclk programmed by pre-os\n"

	.no_dead_strip	_cnl_sanitize_cdclk
.subsections_via_symbols
