	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function hsw_ddi_calc_wrpll_link
_hsw_ddi_calc_wrpll_link:               ## @hsw_ddi_calc_wrpll_link
	.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, %r14
	movl	%esi, %edi
	callq	_I915_READ
	movl	%eax, %ebx
	movq	_WRPLL_REF_MASK@GOTPCREL(%rip), %rcx
	andl	(%rcx), %eax
	cmpl	$130, %eax
	je	LBB0_7
## %bb.1:
	movl	$13500, %r15d                   ## imm = 0x34BC
	cmpl	$129, %eax
	je	LBB0_8
## %bb.2:
	cmpl	$128, %eax
	jne	LBB0_6
## %bb.3:
	movq	%r14, %rdi
	callq	_IS_HASWELL
	testl	%eax, %eax
	je	LBB0_8
## %bb.4:
	movq	%r14, %rdi
	callq	_IS_HSW_ULT
	testl	%eax, %eax
	jne	LBB0_8
## %bb.5:
	movq	_FUSE_STRAP3@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_I915_READ
	movq	_HSW_REF_CLK_SELECT@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	movl	$13500, %eax                    ## imm = 0x34BC
	movl	$2400, %r15d                    ## imm = 0x960
	cmovel	%eax, %r15d
	jmp	LBB0_8
LBB0_7:
	movl	$270000, %r15d                  ## imm = 0x41EB0
LBB0_8:
	movq	_WRPLL_DIVIDER_REF_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	andl	%ebx, %edx
	movq	_WRPLL_DIVIDER_POST_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	andl	%ebx, %esi
	movq	_WRPLL_DIVIDER_POST_SHIFT@GOTPCREL(%rip), %rax
	movb	(%rax), %cl
	sarl	%cl, %esi
	movq	_WRPLL_DIVIDER_FB_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	andl	%ebx, %eax
	movq	_WRPLL_DIVIDER_FB_SHIFT@GOTPCREL(%rip), %rcx
	movb	(%rcx), %cl
	sarl	%cl, %eax
	imull	%edx, %esi
	imull	%r15d, %eax
	cltd
	idivl	%esi
	jmp	LBB0_9
LBB0_6:
	movl	%ebx, %edi
	callq	_MISSING_CASE
	xorl	%eax, %eax
LBB0_9:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_WRPLL_REF_MASK,4,2             ## @WRPLL_REF_MASK
	.comm	_FUSE_STRAP3,4,2                ## @FUSE_STRAP3
	.comm	_HSW_REF_CLK_SELECT,4,2         ## @HSW_REF_CLK_SELECT
	.comm	_WRPLL_DIVIDER_REF_MASK,4,2     ## @WRPLL_DIVIDER_REF_MASK
	.comm	_WRPLL_DIVIDER_POST_MASK,4,2    ## @WRPLL_DIVIDER_POST_MASK
	.comm	_WRPLL_DIVIDER_POST_SHIFT,4,2   ## @WRPLL_DIVIDER_POST_SHIFT
	.comm	_WRPLL_DIVIDER_FB_MASK,4,2      ## @WRPLL_DIVIDER_FB_MASK
	.comm	_WRPLL_DIVIDER_FB_SHIFT,4,2     ## @WRPLL_DIVIDER_FB_SHIFT
	.no_dead_strip	_hsw_ddi_calc_wrpll_link
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function hsw_ddi_calc_wrpll_link
_hsw_ddi_calc_wrpll_link:               ; @hsw_ddi_calc_wrpll_link
	.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	x20, x0
	mov	x0, x1
	bl	_I915_READ
	mov	x19, x0
Lloh0:
	adrp	x8, _WRPLL_REF_MASK@GOTPAGE
Lloh1:
	ldr	x8, [x8, _WRPLL_REF_MASK@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	and	w8, w8, w0
	cmp	w8, #130
	b.eq	LBB0_7
; %bb.1:
	cmp	w8, #129
	b.eq	LBB0_6
; %bb.2:
	cmp	w8, #128
	b.ne	LBB0_9
; %bb.3:
	mov	x0, x20
	bl	_IS_HASWELL
	cbz	w0, LBB0_6
; %bb.4:
	mov	x0, x20
	bl	_IS_HSW_ULT
	mov	w20, #13500
	cbnz	w0, LBB0_8
; %bb.5:
Lloh3:
	adrp	x8, _FUSE_STRAP3@GOTPAGE
Lloh4:
	ldr	x8, [x8, _FUSE_STRAP3@GOTPAGEOFF]
Lloh5:
	ldr	w0, [x8]
	bl	_I915_READ
Lloh6:
	adrp	x8, _HSW_REF_CLK_SELECT@GOTPAGE
Lloh7:
	ldr	x8, [x8, _HSW_REF_CLK_SELECT@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	tst	w8, w0
	mov	w8, #2400
	csel	w20, w20, w8, eq
	b	LBB0_8
LBB0_6:
	mov	w20, #13500
	b	LBB0_8
LBB0_7:
	mov	w20, #7856
	movk	w20, #4, lsl #16
LBB0_8:
Lloh9:
	adrp	x8, _WRPLL_DIVIDER_REF_MASK@GOTPAGE
Lloh10:
	ldr	x8, [x8, _WRPLL_DIVIDER_REF_MASK@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
Lloh12:
	adrp	x9, _WRPLL_DIVIDER_POST_MASK@GOTPAGE
Lloh13:
	ldr	x9, [x9, _WRPLL_DIVIDER_POST_MASK@GOTPAGEOFF]
	and	w8, w8, w19
Lloh14:
	ldr	w9, [x9]
	and	w9, w9, w19
Lloh15:
	adrp	x10, _WRPLL_DIVIDER_POST_SHIFT@GOTPAGE
Lloh16:
	ldr	x10, [x10, _WRPLL_DIVIDER_POST_SHIFT@GOTPAGEOFF]
Lloh17:
	ldr	w10, [x10]
	asr	w9, w9, w10
Lloh18:
	adrp	x10, _WRPLL_DIVIDER_FB_MASK@GOTPAGE
Lloh19:
	ldr	x10, [x10, _WRPLL_DIVIDER_FB_MASK@GOTPAGEOFF]
Lloh20:
	ldr	w10, [x10]
Lloh21:
	adrp	x11, _WRPLL_DIVIDER_FB_SHIFT@GOTPAGE
Lloh22:
	ldr	x11, [x11, _WRPLL_DIVIDER_FB_SHIFT@GOTPAGEOFF]
	and	w10, w10, w19
Lloh23:
	ldr	w11, [x11]
	asr	w10, w10, w11
	mul	w10, w20, w10
	mul	w8, w9, w8
	sdiv	w0, w10, w8
	b	LBB0_10
LBB0_9:
	mov	x0, x19
	bl	_MISSING_CASE
	mov	w0, #0
LBB0_10:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_WRPLL_REF_MASK,4,2             ; @WRPLL_REF_MASK
	.comm	_FUSE_STRAP3,4,2                ; @FUSE_STRAP3
	.comm	_HSW_REF_CLK_SELECT,4,2         ; @HSW_REF_CLK_SELECT
	.comm	_WRPLL_DIVIDER_REF_MASK,4,2     ; @WRPLL_DIVIDER_REF_MASK
	.comm	_WRPLL_DIVIDER_POST_MASK,4,2    ; @WRPLL_DIVIDER_POST_MASK
	.comm	_WRPLL_DIVIDER_POST_SHIFT,4,2   ; @WRPLL_DIVIDER_POST_SHIFT
	.comm	_WRPLL_DIVIDER_FB_MASK,4,2      ; @WRPLL_DIVIDER_FB_MASK
	.comm	_WRPLL_DIVIDER_FB_SHIFT,4,2     ; @WRPLL_DIVIDER_FB_SHIFT
	.no_dead_strip	_hsw_ddi_calc_wrpll_link
.subsections_via_symbols
