	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function skl_calc_wrpll_link
_skl_calc_wrpll_link:                   ## @skl_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	%r13
	pushq	%r12
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r13
	movl	(%rdi), %ebx
	movq	_DPLL_CFGCR2_PDIV_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %r15d
	andl	%ebx, %r15d
	movq	_DPLL_CFGCR2_KDIV_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %r12d
	andl	%ebx, %r12d
	movl	$1, %r14d
	movl	$1, %edi
	callq	_DPLL_CFGCR2_QDIV_MODE
	testl	%ebx, %eax
	je	LBB0_2
## %bb.1:
	movq	_DPLL_CFGCR2_QDIV_RATIO_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
	andl	(%r13), %r14d
	sarl	$8, %r14d
LBB0_2:
	leal	-128(%r15), %eax
	cmpl	$3, %eax
	ja	LBB0_4
## %bb.3:
	cltq
	leaq	L_switch.table.skl_calc_wrpll_link(%rip), %rcx
	movl	(%rcx,%rax,4), %r15d
LBB0_4:
	leal	-132(%r12), %eax
	cmpl	$3, %eax
	ja	LBB0_6
## %bb.5:
	cltq
	leaq	L_switch.table.skl_calc_wrpll_link.1(%rip), %rcx
	movl	(%rcx,%rax,4), %r12d
LBB0_6:
	movl	4(%r13), %eax
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	movq	_DPLL_CFGCR1_DCO_INTEGER_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movq	_DPLL_CFGCR1_DCO_FRACTION_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %r13d
	testl	%r15d, %r15d
	sete	%al
	testl	%r14d, %r14d
	sete	%cl
	orb	%al, %cl
	testl	%r12d, %r12d
	sete	%al
	orb	%cl, %al
	movzbl	%al, %edi
	callq	_WARN_ON
	movq	%rax, %rcx
	xorl	%eax, %eax
	testq	%rcx, %rcx
	jne	LBB0_8
## %bb.7:
	movl	-44(%rbp), %eax                 ## 4-byte Reload
	andl	%eax, %ebx
	imull	$24000, %ebx, %ecx              ## imm = 0x5DC0
	andl	%eax, %r13d
	sarl	$9, %r13d
	imull	$24000, %r13d, %edx             ## imm = 0x5DC0
	leal	32767(%rdx), %eax
	testl	%edx, %edx
	cmovnsl	%edx, %eax
	sarl	$15, %eax
	addl	%ecx, %eax
	imull	%r15d, %r14d
	imull	%r12d, %r14d
	leal	(%r14,%r14,4), %ecx
	cltd
	idivl	%ecx
LBB0_8:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_DPLL_CFGCR2_PDIV_MASK,4,2      ## @DPLL_CFGCR2_PDIV_MASK
	.comm	_DPLL_CFGCR2_KDIV_MASK,4,2      ## @DPLL_CFGCR2_KDIV_MASK
	.comm	_DPLL_CFGCR2_QDIV_RATIO_MASK,4,2 ## @DPLL_CFGCR2_QDIV_RATIO_MASK
	.comm	_DPLL_CFGCR1_DCO_INTEGER_MASK,4,2 ## @DPLL_CFGCR1_DCO_INTEGER_MASK
	.comm	_DPLL_CFGCR1_DCO_FRACTION_MASK,4,2 ## @DPLL_CFGCR1_DCO_FRACTION_MASK
	.no_dead_strip	_skl_calc_wrpll_link
	.section	__TEXT,__literal16,16byte_literals
	.p2align	2                               ## @switch.table.skl_calc_wrpll_link
L_switch.table.skl_calc_wrpll_link:
	.long	7                               ## 0x7
	.long	3                               ## 0x3
	.long	2                               ## 0x2
	.long	1                               ## 0x1

	.p2align	2                               ## @switch.table.skl_calc_wrpll_link.1
L_switch.table.skl_calc_wrpll_link.1:
	.long	5                               ## 0x5
	.long	3                               ## 0x3
	.long	2                               ## 0x2
	.long	1                               ## 0x1

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function skl_calc_wrpll_link
_skl_calc_wrpll_link:                   ; @skl_calc_wrpll_link
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x19, x0
Lloh0:
	adrp	x8, _DPLL_CFGCR2_PDIV_MASK@GOTPAGE
Lloh1:
	ldr	x8, [x8, _DPLL_CFGCR2_PDIV_MASK@GOTPAGEOFF]
	ldr	w22, [x0]
Lloh2:
	ldr	w8, [x8]
	and	w20, w8, w22
Lloh3:
	adrp	x8, _DPLL_CFGCR2_KDIV_MASK@GOTPAGE
Lloh4:
	ldr	x8, [x8, _DPLL_CFGCR2_KDIV_MASK@GOTPAGEOFF]
Lloh5:
	ldr	w23, [x8]
	mov	w21, #1
	mov	w0, #1
	bl	_DPLL_CFGCR2_QDIV_MODE
	tst	w0, w22
	b.eq	LBB0_2
; %bb.1:
	ldr	w8, [x19]
Lloh6:
	adrp	x9, _DPLL_CFGCR2_QDIV_RATIO_MASK@GOTPAGE
Lloh7:
	ldr	x9, [x9, _DPLL_CFGCR2_QDIV_RATIO_MASK@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x9]
	and	w8, w9, w8
	asr	w21, w8, #8
LBB0_2:
	and	w22, w23, w22
	sub	w8, w20, #128
	cmp	w8, #3
	b.hi	LBB0_4
; %bb.3:
Lloh9:
	adrp	x9, l_switch.table.skl_calc_wrpll_link@PAGE
Lloh10:
	add	x9, x9, l_switch.table.skl_calc_wrpll_link@PAGEOFF
	ldr	w20, [x9, w8, sxtw #2]
LBB0_4:
	sub	w8, w22, #132
	cmp	w8, #3
	b.hi	LBB0_6
; %bb.5:
Lloh11:
	adrp	x9, l_switch.table.skl_calc_wrpll_link.1@PAGE
Lloh12:
	add	x9, x9, l_switch.table.skl_calc_wrpll_link.1@PAGEOFF
	ldr	w22, [x9, w8, sxtw #2]
LBB0_6:
	ldr	w19, [x19, #4]
Lloh13:
	adrp	x8, _DPLL_CFGCR1_DCO_INTEGER_MASK@GOTPAGE
Lloh14:
	ldr	x8, [x8, _DPLL_CFGCR1_DCO_INTEGER_MASK@GOTPAGEOFF]
Lloh15:
	adrp	x9, _DPLL_CFGCR1_DCO_FRACTION_MASK@GOTPAGE
Lloh16:
	ldr	x9, [x9, _DPLL_CFGCR1_DCO_FRACTION_MASK@GOTPAGEOFF]
Lloh17:
	ldr	w24, [x8]
Lloh18:
	ldr	w23, [x9]
	cmp	w20, #0
	ccmp	w21, #0, #4, ne
	ccmp	w22, #0, #4, ne
	cset	w0, eq
	bl	_WARN_ON
	cbz	x0, LBB0_8
; %bb.7:
	mov	w0, #0
	b	LBB0_9
LBB0_8:
	and	w8, w24, w19
	mov	w9, #24000
	mul	w8, w8, w9
	and	w10, w23, w19
	asr	w10, w10, #9
	mul	w9, w10, w9
	mov	w10, #32767
	add	w10, w9, w10
	cmp	w9, #0
	csel	w9, w10, w9, lt
	add	w8, w8, w9, asr #15
	mul	w9, w21, w20
	mul	w9, w9, w22
	add	w9, w9, w9, lsl #2
	sdiv	w0, w8, w9
LBB0_9:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh18
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh17
	.cfi_endproc
                                        ; -- End function
	.comm	_DPLL_CFGCR2_PDIV_MASK,4,2      ; @DPLL_CFGCR2_PDIV_MASK
	.comm	_DPLL_CFGCR2_KDIV_MASK,4,2      ; @DPLL_CFGCR2_KDIV_MASK
	.comm	_DPLL_CFGCR2_QDIV_RATIO_MASK,4,2 ; @DPLL_CFGCR2_QDIV_RATIO_MASK
	.comm	_DPLL_CFGCR1_DCO_INTEGER_MASK,4,2 ; @DPLL_CFGCR1_DCO_INTEGER_MASK
	.comm	_DPLL_CFGCR1_DCO_FRACTION_MASK,4,2 ; @DPLL_CFGCR1_DCO_FRACTION_MASK
	.no_dead_strip	_skl_calc_wrpll_link
	.section	__TEXT,__literal16,16byte_literals
	.p2align	2                               ; @switch.table.skl_calc_wrpll_link
l_switch.table.skl_calc_wrpll_link:
	.long	7                               ; 0x7
	.long	3                               ; 0x3
	.long	2                               ; 0x2
	.long	1                               ; 0x1

	.p2align	2                               ; @switch.table.skl_calc_wrpll_link.1
l_switch.table.skl_calc_wrpll_link.1:
	.long	5                               ; 0x5
	.long	3                               ; 0x3
	.long	2                               ; 0x2
	.long	1                               ; 0x1

.subsections_via_symbols
