	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function cnl_get_cdclk
_cnl_get_cdclk:                         ## @cnl_get_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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -24
	movq	%rsi, %rbx
	callq	_cnl_cdclk_pll_update
	movl	16(%rbx), %edi
	movl	%edi, 20(%rbx)
	movl	%edi, 8(%rbx)
	cmpq	$0, (%rbx)
	je	LBB0_6
## %bb.1:
	movq	_CDCLK_CTL@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_I915_READ
	movq	_BXT_CDCLK_CD2X_DIV_SEL_MASK@GOTPCREL(%rip), %rcx
	andl	(%rcx), %eax
	cmpl	$129, %eax
	je	LBB0_2
## %bb.3:
	cmpl	$128, %eax
	jne	LBB0_7
## %bb.4:
	movl	$4, %esi
	jmp	LBB0_5
LBB0_2:
	movl	$2, %esi
LBB0_5:
	movq	(%rbx), %rdi
	callq	_DIV_ROUND_CLOSEST
	movl	%eax, %edi
	movl	%eax, 8(%rbx)
LBB0_6:
	callq	_cnl_calc_voltage_level
	movl	%eax, 12(%rbx)
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	retq
LBB0_7:
	movl	%eax, %edi
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	jmp	_MISSING_CASE                   ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_CDCLK_CTL,4,2                  ## @CDCLK_CTL
	.comm	_BXT_CDCLK_CD2X_DIV_SEL_MASK,4,2 ## @BXT_CDCLK_CD2X_DIV_SEL_MASK
	.no_dead_strip	_cnl_get_cdclk
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function cnl_get_cdclk
_cnl_get_cdclk:                         ; @cnl_get_cdclk
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x1
	bl	_cnl_cdclk_pll_update
	ldr	w0, [x19, #16]
	str	w0, [x19, #20]
	str	w0, [x19, #8]
	ldr	x8, [x19]
	cbz	x8, LBB0_6
; %bb.1:
Lloh0:
	adrp	x8, _CDCLK_CTL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _CDCLK_CTL@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
	bl	_I915_READ
Lloh3:
	adrp	x8, _BXT_CDCLK_CD2X_DIV_SEL_MASK@GOTPAGE
Lloh4:
	ldr	x8, [x8, _BXT_CDCLK_CD2X_DIV_SEL_MASK@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	and	w0, w8, w0
	cmp	w0, #129
	b.eq	LBB0_4
; %bb.2:
	cmp	w0, #128
	b.ne	LBB0_7
; %bb.3:
	mov	w1, #4
	b	LBB0_5
LBB0_4:
	mov	w1, #2
LBB0_5:
	ldr	x0, [x19]
	bl	_DIV_ROUND_CLOSEST
	str	w0, [x19, #8]
LBB0_6:
	bl	_cnl_calc_voltage_level
	str	w0, [x19, #12]
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
LBB0_7:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_MISSING_CASE
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_CDCLK_CTL,4,2                  ; @CDCLK_CTL
	.comm	_BXT_CDCLK_CD2X_DIV_SEL_MASK,4,2 ; @BXT_CDCLK_CD2X_DIV_SEL_MASK
	.no_dead_strip	_cnl_get_cdclk
.subsections_via_symbols
