	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_vlv_dsi_get_pclk               ## -- Begin function vlv_dsi_get_pclk
	.p2align	4, 0x90
_vlv_dsi_get_pclk:                      ## @vlv_dsi_get_pclk
	.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
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r12
	movq	%rdi, %rbx
	movl	(%rdi), %edi
	callq	_to_i915
	movq	%rax, %r14
	movq	%rbx, %rdi
	callq	_enc_to_intel_dsi
	movq	%rax, %rbx
	movl	4(%rax), %edi
	callq	_mipi_dsi_pixel_format_to_bpp
	movl	%eax, -48(%rbp)                 ## 4-byte Spill
	movq	%r14, %rdi
	callq	_IS_CHERRYVIEW
	testq	%rax, %rax
	movl	$25000, %eax                    ## imm = 0x61A8
	movl	$100000, %ecx                   ## imm = 0x186A0
	cmovel	%eax, %ecx
	movl	%ecx, -44(%rbp)                 ## 4-byte Spill
	leaq	L_.str(%rip), %rdi
	callq	_DRM_DEBUG_KMS
	movq	%r14, %rdi
	callq	_vlv_cck_get
	movq	_CCK_REG_DSI_PLL_CONTROL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	callq	_vlv_cck_read
	movl	%eax, %r15d
	movq	_CCK_REG_DSI_PLL_DIVIDER@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	callq	_vlv_cck_read
	movl	%eax, %r13d
	movq	%r14, %rdi
	callq	_vlv_cck_put
	movq	_DSI_PLL_LOCK@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	notl	%eax
	andl	%r15d, %eax
	movl	%eax, (%r12)
	movl	%r13d, 4(%r12)
	movq	_DSI_PLL_P1_POST_DIV_MASK@GOTPCREL(%rip), %rax
	andl	(%rax), %r15d
	movq	_DSI_PLL_P1_POST_DIV_SHIFT@GOTPCREL(%rip), %rax
	movb	(%rax), %cl
	addb	$-2, %cl
	sarl	%cl, %r15d
	movq	_DSI_PLL_N1_DIV_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %r12d
	andl	%r13d, %r12d
	movq	_DSI_PLL_N1_DIV_SHIFT@GOTPCREL(%rip), %rax
	movb	(%rax), %cl
	sarl	%cl, %r12d
	movq	_DSI_PLL_M1_DIV_MASK@GOTPCREL(%rip), %rax
	andl	(%rax), %r13d
	movq	_DSI_PLL_M1_DIV_SHIFT@GOTPCREL(%rip), %rax
	movb	(%rax), %cl
	sarl	%cl, %r13d
	testl	%r15d, %r15d
	movq	%rbx, -56(%rbp)                 ## 8-byte Spill
	je	LBB0_1
## %bb.2:
	movl	$1, %ebx
	movl	%r15d, %eax
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	sarl	%eax
	decl	%ebx
	cmpl	$1, %r15d
	movl	%eax, %r15d
	ja	LBB0_3
## %bb.4:
	testl	%ebx, %ebx
	je	LBB0_12
## %bb.5:
	negl	%ebx
	jmp	LBB0_6
LBB0_1:
	movl	$-1, %ebx
LBB0_6:
	movq	_lfsr_converts@GOTPCREL(%rip), %r15
	movq	(%r15), %rdi
	callq	_ARRAY_SIZE
	xorl	%r14d, %r14d
	testl	%eax, %eax
	jle	LBB0_9
	.p2align	4, 0x90
LBB0_7:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%r15), %rdi
	cmpl	%r13d, (%rdi,%r14,4)
	je	LBB0_9
## %bb.8:                               ##   in Loop: Header=BB0_7 Depth=1
	incq	%r14
	callq	_ARRAY_SIZE
	cltq
	cmpq	%rax, %r14
	jl	LBB0_7
LBB0_9:
	movq	(%r15), %rdi
	callq	_ARRAY_SIZE
	cmpl	%eax, %r14d
	jne	LBB0_11
## %bb.10:
	leaq	L_.str.2(%rip), %rdi
	jmp	LBB0_13
LBB0_11:
	addl	$62, %r14d
	imull	-44(%rbp), %r14d                ## 4-byte Folded Reload
	movl	%r12d, %ecx
	shll	%cl, %ebx
	movl	%r14d, %eax
	cltd
	idivl	%ebx
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	imull	(%rcx), %eax
	movl	%eax, %edi
	movl	-48(%rbp), %esi                 ## 4-byte Reload
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_DIV_ROUND_CLOSEST              ## TAILCALL
LBB0_12:
	leaq	L_.str.1(%rip), %rdi
LBB0_13:
	callq	_DRM_ERROR
	xorl	%eax, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"\n"

	.comm	_CCK_REG_DSI_PLL_CONTROL,4,2    ## @CCK_REG_DSI_PLL_CONTROL
	.comm	_CCK_REG_DSI_PLL_DIVIDER,4,2    ## @CCK_REG_DSI_PLL_DIVIDER
	.comm	_DSI_PLL_LOCK,4,2               ## @DSI_PLL_LOCK
	.comm	_DSI_PLL_P1_POST_DIV_MASK,4,2   ## @DSI_PLL_P1_POST_DIV_MASK
	.comm	_DSI_PLL_P1_POST_DIV_SHIFT,4,2  ## @DSI_PLL_P1_POST_DIV_SHIFT
	.comm	_DSI_PLL_N1_DIV_MASK,4,2        ## @DSI_PLL_N1_DIV_MASK
	.comm	_DSI_PLL_N1_DIV_SHIFT,4,2       ## @DSI_PLL_N1_DIV_SHIFT
	.comm	_DSI_PLL_M1_DIV_MASK,4,2        ## @DSI_PLL_M1_DIV_MASK
	.comm	_DSI_PLL_M1_DIV_SHIFT,4,2       ## @DSI_PLL_M1_DIV_SHIFT
L_.str.1:                               ## @.str.1
	.asciz	"wrong P1 divisor\n"

	.comm	_lfsr_converts,8,3              ## @lfsr_converts
L_.str.2:                               ## @.str.2
	.asciz	"wrong m_seed programmed\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_vlv_dsi_get_pclk               ; -- Begin function vlv_dsi_get_pclk
	.p2align	2
_vlv_dsi_get_pclk:                      ; @vlv_dsi_get_pclk
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x22, x1
	mov	x19, x0
	ldr	w0, [x0]
	bl	_to_i915
	mov	x23, x0
	mov	x0, x19
	bl	_enc_to_intel_dsi
	mov	x19, x0
	ldr	w0, [x0, #4]
	bl	_mipi_dsi_pixel_format_to_bpp
	mov	x26, x0
	mov	x0, x23
	bl	_IS_CHERRYVIEW
	cmp	x0, #0
	mov	w8, #34464
	movk	w8, #1, lsl #16
	mov	w9, #25000
	csel	w25, w9, w8, eq
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	bl	_DRM_DEBUG_KMS
	mov	x0, x23
	bl	_vlv_cck_get
Lloh2:
	adrp	x8, _CCK_REG_DSI_PLL_CONTROL@GOTPAGE
Lloh3:
	ldr	x8, [x8, _CCK_REG_DSI_PLL_CONTROL@GOTPAGEOFF]
Lloh4:
	ldr	w1, [x8]
	mov	x0, x23
	bl	_vlv_cck_read
	mov	x24, x0
Lloh5:
	adrp	x8, _CCK_REG_DSI_PLL_DIVIDER@GOTPAGE
Lloh6:
	ldr	x8, [x8, _CCK_REG_DSI_PLL_DIVIDER@GOTPAGEOFF]
Lloh7:
	ldr	w1, [x8]
	mov	x0, x23
	bl	_vlv_cck_read
	mov	x21, x0
	mov	x0, x23
	bl	_vlv_cck_put
Lloh8:
	adrp	x8, _DSI_PLL_LOCK@GOTPAGE
Lloh9:
	ldr	x8, [x8, _DSI_PLL_LOCK@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
	bic	w8, w24, w8
	stp	w8, w21, [x22]
Lloh11:
	adrp	x8, _DSI_PLL_P1_POST_DIV_MASK@GOTPAGE
Lloh12:
	ldr	x8, [x8, _DSI_PLL_P1_POST_DIV_MASK@GOTPAGEOFF]
Lloh13:
	ldr	w8, [x8]
	and	w8, w8, w24
Lloh14:
	adrp	x9, _DSI_PLL_P1_POST_DIV_SHIFT@GOTPAGE
Lloh15:
	ldr	x9, [x9, _DSI_PLL_P1_POST_DIV_SHIFT@GOTPAGEOFF]
Lloh16:
	ldr	w9, [x9]
	sub	w9, w9, #2
	asr	w8, w8, w9
Lloh17:
	adrp	x9, _DSI_PLL_N1_DIV_MASK@GOTPAGE
Lloh18:
	ldr	x9, [x9, _DSI_PLL_N1_DIV_MASK@GOTPAGEOFF]
Lloh19:
	ldr	w23, [x9]
Lloh20:
	adrp	x9, _DSI_PLL_N1_DIV_SHIFT@GOTPAGE
Lloh21:
	ldr	x9, [x9, _DSI_PLL_N1_DIV_SHIFT@GOTPAGEOFF]
Lloh22:
	ldr	w24, [x9]
Lloh23:
	adrp	x9, _DSI_PLL_M1_DIV_MASK@GOTPAGE
Lloh24:
	ldr	x9, [x9, _DSI_PLL_M1_DIV_MASK@GOTPAGEOFF]
Lloh25:
	ldr	w20, [x9]
Lloh26:
	adrp	x9, _DSI_PLL_M1_DIV_SHIFT@GOTPAGE
Lloh27:
	ldr	x9, [x9, _DSI_PLL_M1_DIV_SHIFT@GOTPAGEOFF]
Lloh28:
	ldr	w28, [x9]
	cbz	w8, LBB0_5
; %bb.1:
	mov	w9, #1
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	asr	w10, w8, #1
	sub	w9, w9, #1
	cmp	w8, #1
	mov	x8, x10
	b.hi	LBB0_2
; %bb.3:
	cbz	w9, LBB0_14
; %bb.4:
	neg	w8, w9
	b	LBB0_6
LBB0_5:
	mov	w8, #-1
LBB0_6:
	str	w8, [sp, #12]                   ; 4-byte Folded Spill
Lloh29:
	adrp	x27, _lfsr_converts@GOTPAGE
Lloh30:
	ldr	x27, [x27, _lfsr_converts@GOTPAGEOFF]
	ldr	x0, [x27]
	bl	_ARRAY_SIZE
	mov	x22, x26
	cmp	w0, #1
	b.lt	LBB0_10
; %bb.7:
	mov	x26, #0
	and	w8, w20, w21
	asr	w20, w8, w28
LBB0_8:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x0, [x27]
	ldr	w8, [x0, x26, lsl #2]
	cmp	w8, w20
	b.eq	LBB0_11
; %bb.9:                                ;   in Loop: Header=BB0_8 Depth=1
	add	x26, x26, #1
	bl	_ARRAY_SIZE
	cmp	x26, w0, sxtw
	b.lt	LBB0_8
	b	LBB0_11
LBB0_10:
	mov	w26, #0
LBB0_11:
	ldr	x0, [x27]
	bl	_ARRAY_SIZE
	cmp	w26, w0
	b.ne	LBB0_13
; %bb.12:
Lloh31:
	adrp	x0, l_.str.2@PAGE
Lloh32:
	add	x0, x0, l_.str.2@PAGEOFF
	b	LBB0_15
LBB0_13:
	and	w8, w23, w21
	asr	w8, w8, w24
	add	w9, w26, #62
	mul	w9, w9, w25
	ldr	w10, [sp, #12]                  ; 4-byte Folded Reload
	lsl	w8, w10, w8
	sdiv	w8, w9, w8
	ldr	w9, [x19]
	mul	w0, w9, w8
	mov	x1, x22
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	b	_DIV_ROUND_CLOSEST
LBB0_14:
Lloh33:
	adrp	x0, l_.str.1@PAGE
Lloh34:
	add	x0, x0, l_.str.1@PAGEOFF
LBB0_15:
	bl	_DRM_ERROR
	mov	w0, #0
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh29, Lloh30
	.loh AdrpAdd	Lloh31, Lloh32
	.loh AdrpAdd	Lloh33, Lloh34
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"\n"

	.comm	_CCK_REG_DSI_PLL_CONTROL,4,2    ; @CCK_REG_DSI_PLL_CONTROL
	.comm	_CCK_REG_DSI_PLL_DIVIDER,4,2    ; @CCK_REG_DSI_PLL_DIVIDER
	.comm	_DSI_PLL_LOCK,4,2               ; @DSI_PLL_LOCK
	.comm	_DSI_PLL_P1_POST_DIV_MASK,4,2   ; @DSI_PLL_P1_POST_DIV_MASK
	.comm	_DSI_PLL_P1_POST_DIV_SHIFT,4,2  ; @DSI_PLL_P1_POST_DIV_SHIFT
	.comm	_DSI_PLL_N1_DIV_MASK,4,2        ; @DSI_PLL_N1_DIV_MASK
	.comm	_DSI_PLL_N1_DIV_SHIFT,4,2       ; @DSI_PLL_N1_DIV_SHIFT
	.comm	_DSI_PLL_M1_DIV_MASK,4,2        ; @DSI_PLL_M1_DIV_MASK
	.comm	_DSI_PLL_M1_DIV_SHIFT,4,2       ; @DSI_PLL_M1_DIV_SHIFT
l_.str.1:                               ; @.str.1
	.asciz	"wrong P1 divisor\n"

	.comm	_lfsr_converts,8,3              ; @lfsr_converts
l_.str.2:                               ; @.str.2
	.asciz	"wrong m_seed programmed\n"

.subsections_via_symbols
