	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function hsw_get_cdclk
_hsw_get_cdclk:                         ## @hsw_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	%r15
	pushq	%r14
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r15
	movq	%rdi, %r14
	movq	_LCPLL_CTL@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_I915_READ
	movl	%eax, %ebx
	movq	_LCPLL_CD_SOURCE_FCLK@GOTPCREL(%rip), %rax
	testl	%ebx, (%rax)
	je	LBB0_2
## %bb.1:
	movl	$800000, (%r15)                 ## imm = 0xC3500
	jmp	LBB0_9
LBB0_2:
	movq	_LCPLL_CLK_FREQ_MASK@GOTPCREL(%rip), %rax
	andl	(%rax), %ebx
	movq	_FUSE_STRAP@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_I915_READ
	movq	_HSW_CDCLK_LIMIT@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	jne	LBB0_3
## %bb.4:
	movq	_LCPLL_CLK_FREQ_450@GOTPCREL(%rip), %rax
	cmpl	(%rax), %ebx
	jne	LBB0_6
LBB0_3:
	movl	$450000, (%r15)                 ## imm = 0x6DDD0
LBB0_9:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_6:
	movq	%r14, %rdi
	callq	_IS_HSW_ULT
	testq	%rax, %rax
	je	LBB0_8
## %bb.7:
	movl	$337500, (%r15)                 ## imm = 0x5265C
	jmp	LBB0_9
LBB0_8:
	movl	$540000, (%r15)                 ## imm = 0x83D60
	jmp	LBB0_9
	.cfi_endproc
                                        ## -- End function
	.comm	_LCPLL_CTL,4,2                  ## @LCPLL_CTL
	.comm	_LCPLL_CLK_FREQ_MASK,4,2        ## @LCPLL_CLK_FREQ_MASK
	.comm	_LCPLL_CD_SOURCE_FCLK,4,2       ## @LCPLL_CD_SOURCE_FCLK
	.comm	_FUSE_STRAP,4,2                 ## @FUSE_STRAP
	.comm	_HSW_CDCLK_LIMIT,4,2            ## @HSW_CDCLK_LIMIT
	.comm	_LCPLL_CLK_FREQ_450,4,2         ## @LCPLL_CLK_FREQ_450
	.no_dead_strip	_hsw_get_cdclk
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function hsw_get_cdclk
_hsw_get_cdclk:                         ; @hsw_get_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, x1
	mov	x20, x0
Lloh0:
	adrp	x8, _LCPLL_CTL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _LCPLL_CTL@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
	bl	_I915_READ
Lloh3:
	adrp	x8, _LCPLL_CD_SOURCE_FCLK@GOTPAGE
Lloh4:
	ldr	x8, [x8, _LCPLL_CD_SOURCE_FCLK@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	tst	w8, w0
	b.eq	LBB0_2
; %bb.1:
	mov	w8, #13568
	movk	w8, #12, lsl #16
	b	LBB0_5
LBB0_2:
	mov	x21, x0
Lloh6:
	adrp	x8, _LCPLL_CLK_FREQ_MASK@GOTPAGE
Lloh7:
	ldr	x8, [x8, _LCPLL_CLK_FREQ_MASK@GOTPAGEOFF]
Lloh8:
	ldr	w22, [x8]
Lloh9:
	adrp	x8, _FUSE_STRAP@GOTPAGE
Lloh10:
	ldr	x8, [x8, _FUSE_STRAP@GOTPAGEOFF]
Lloh11:
	ldr	w0, [x8]
	bl	_I915_READ
Lloh12:
	adrp	x8, _HSW_CDCLK_LIMIT@GOTPAGE
Lloh13:
	ldr	x8, [x8, _HSW_CDCLK_LIMIT@GOTPAGEOFF]
Lloh14:
	ldr	w8, [x8]
	tst	w8, w0
	b.ne	LBB0_4
; %bb.3:
	and	w8, w22, w21
Lloh15:
	adrp	x9, _LCPLL_CLK_FREQ_450@GOTPAGE
Lloh16:
	ldr	x9, [x9, _LCPLL_CLK_FREQ_450@GOTPAGEOFF]
Lloh17:
	ldr	w9, [x9]
	cmp	w8, w9
	b.ne	LBB0_6
LBB0_4:
	mov	w8, #56784
	movk	w8, #6, lsl #16
LBB0_5:
	str	w8, [x19]
	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
LBB0_6:
	mov	x0, x20
	bl	_IS_HSW_ULT
	cbz	x0, LBB0_8
; %bb.7:
	mov	w8, #9820
	movk	w8, #5, lsl #16
	b	LBB0_5
LBB0_8:
	mov	w8, #15712
	movk	w8, #8, lsl #16
	b	LBB0_5
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.cfi_endproc
                                        ; -- End function
	.comm	_LCPLL_CTL,4,2                  ; @LCPLL_CTL
	.comm	_LCPLL_CLK_FREQ_MASK,4,2        ; @LCPLL_CLK_FREQ_MASK
	.comm	_LCPLL_CD_SOURCE_FCLK,4,2       ; @LCPLL_CD_SOURCE_FCLK
	.comm	_FUSE_STRAP,4,2                 ; @FUSE_STRAP
	.comm	_HSW_CDCLK_LIMIT,4,2            ; @HSW_CDCLK_LIMIT
	.comm	_LCPLL_CLK_FREQ_450,4,2         ; @LCPLL_CLK_FREQ_450
	.no_dead_strip	_hsw_get_cdclk
.subsections_via_symbols
