	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function cnl_cdclk_pll_enable
_cnl_cdclk_pll_enable:                  ## @cnl_cdclk_pll_enable
	.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
	movl	%esi, %r14d
	movq	%rdi, %r15
	movl	4(%rdi), %esi
	movl	%r14d, %edi
	callq	_DIV_ROUND_CLOSEST
	movl	%eax, %edi
	callq	_CNL_CDCLK_PLL_RATIO
	movl	%eax, %ebx
	movq	_BXT_DE_PLL_ENABLE@GOTPCREL(%rip), %r12
	movl	(%r12), %edi
	movl	%eax, %esi
	callq	_I915_WRITE
	movq	_BXT_DE_PLL_PLL_ENABLE@GOTPCREL(%rip), %rax
	orl	(%rax), %ebx
	movl	(%r12), %edi
	movl	%ebx, %esi
	callq	_I915_WRITE
	movl	(%r12), %edi
	callq	_I915_READ
	movq	_BXT_DE_PLL_LOCK@GOTPCREL(%rip), %rcx
	xorl	%edi, %edi
	andl	(%rcx), %eax
	setne	%dil
	movl	$1, %esi
	callq	_wait_for
	testq	%rax, %rax
	je	LBB0_2
## %bb.1:
	leaq	L_.str(%rip), %rdi
	callq	_DRM_ERROR
LBB0_2:
	movl	%r14d, (%r15)
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_BXT_DE_PLL_ENABLE,4,2          ## @BXT_DE_PLL_ENABLE
	.comm	_BXT_DE_PLL_PLL_ENABLE,4,2      ## @BXT_DE_PLL_PLL_ENABLE
	.comm	_BXT_DE_PLL_LOCK,4,2            ## @BXT_DE_PLL_LOCK
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"timeout waiting for CDCLK PLL lock\n"

	.no_dead_strip	_cnl_cdclk_pll_enable
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function cnl_cdclk_pll_enable
_cnl_cdclk_pll_enable:                  ; @cnl_cdclk_pll_enable
	.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, x1
	mov	x20, x0
	ldr	w1, [x0, #4]
	mov	x0, x19
	bl	_DIV_ROUND_CLOSEST
	bl	_CNL_CDCLK_PLL_RATIO
	mov	x21, x0
Lloh0:
	adrp	x22, _BXT_DE_PLL_ENABLE@GOTPAGE
Lloh1:
	ldr	x22, [x22, _BXT_DE_PLL_ENABLE@GOTPAGEOFF]
	ldr	w0, [x22]
	mov	x1, x21
	bl	_I915_WRITE
Lloh2:
	adrp	x8, _BXT_DE_PLL_PLL_ENABLE@GOTPAGE
Lloh3:
	ldr	x8, [x8, _BXT_DE_PLL_PLL_ENABLE@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	orr	w1, w8, w21
	ldr	w0, [x22]
	bl	_I915_WRITE
	ldr	w0, [x22]
	bl	_I915_READ
Lloh5:
	adrp	x8, _BXT_DE_PLL_LOCK@GOTPAGE
Lloh6:
	ldr	x8, [x8, _BXT_DE_PLL_LOCK@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
	tst	w8, w0
	cset	w0, ne
	mov	w1, #1
	bl	_wait_for
	cbz	x0, LBB0_2
; %bb.1:
Lloh8:
	adrp	x0, l_.str@PAGE
Lloh9:
	add	x0, x0, l_.str@PAGEOFF
	bl	_DRM_ERROR
LBB0_2:
	str	w19, [x20]
	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	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.comm	_BXT_DE_PLL_ENABLE,4,2          ; @BXT_DE_PLL_ENABLE
	.comm	_BXT_DE_PLL_PLL_ENABLE,4,2      ; @BXT_DE_PLL_PLL_ENABLE
	.comm	_BXT_DE_PLL_LOCK,4,2            ; @BXT_DE_PLL_LOCK
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"timeout waiting for CDCLK PLL lock\n"

	.no_dead_strip	_cnl_cdclk_pll_enable
.subsections_via_symbols
