	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_bxt_dsi_pll_compute            ## -- Begin function bxt_dsi_pll_compute
	.p2align	4, 0x90
_bxt_dsi_pll_compute:                   ## @bxt_dsi_pll_compute
	.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, %r14
	movq	%rdi, %rbx
	movl	(%rdi), %edi
	callq	_to_i915
	movq	%rax, %r15
	movq	%rbx, %rdi
	callq	_enc_to_intel_dsi
	movl	8(%rax), %edi
	movl	(%rax), %edx
	movl	4(%rax), %esi
	callq	_dsi_clk_from_pclk
                                        ## kill: def $eax killed $eax def $rax
	leal	(%rax,%rax), %edi
	movq	_BXT_REF_CLOCK_KHZ@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_DIV_ROUND_UP
	movl	%eax, %ebx
	movq	%r15, %rdi
	callq	_IS_BROXTON
	testq	%rax, %rax
	movq	_BXT_DSI_PLL_RATIO_MIN@GOTPCREL(%rip), %rcx
	cmoveq	_GLK_DSI_PLL_RATIO_MIN@GOTPCREL(%rip), %rcx
	movq	_BXT_DSI_PLL_RATIO_MAX@GOTPCREL(%rip), %rax
	cmoveq	_GLK_DSI_PLL_RATIO_MAX@GOTPCREL(%rip), %rax
	cmpl	(%rcx), %ebx
	jl	LBB0_2
## %bb.1:
	cmpl	(%rax), %ebx
	jg	LBB0_2
## %bb.3:
	leaq	L_.str.1(%rip), %rdi
	callq	_DRM_DEBUG_KMS
	movq	_BXT_DSIA_16X_BY2@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	orl	%ebx, %eax
	movq	_BXT_DSIC_16X_BY2@GOTPCREL(%rip), %rcx
	orl	(%rcx), %eax
	movl	%eax, (%r14)
	movq	%r15, %rdi
	callq	_IS_BROXTON
	movq	%rax, %rcx
	xorl	%eax, %eax
	testq	%rcx, %rcx
	je	LBB0_6
## %bb.4:
	cmpl	$50, %ebx
	jg	LBB0_6
## %bb.5:
	movq	_BXT_DSI_PLL_PVD_RATIO_1@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	orl	%ecx, (%r14)
	jmp	LBB0_6
LBB0_2:
	leaq	L_.str(%rip), %rdi
	callq	_DRM_ERROR
	movq	_ECHRNG@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_6:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_BXT_REF_CLOCK_KHZ,4,2          ## @BXT_REF_CLOCK_KHZ
	.comm	_BXT_DSI_PLL_RATIO_MIN,4,2      ## @BXT_DSI_PLL_RATIO_MIN
	.comm	_BXT_DSI_PLL_RATIO_MAX,4,2      ## @BXT_DSI_PLL_RATIO_MAX
	.comm	_GLK_DSI_PLL_RATIO_MIN,4,2      ## @GLK_DSI_PLL_RATIO_MIN
	.comm	_GLK_DSI_PLL_RATIO_MAX,4,2      ## @GLK_DSI_PLL_RATIO_MAX
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Cant get a suitable ratio from DSI PLL ratios\n"

	.comm	_ECHRNG,4,2                     ## @ECHRNG
L_.str.1:                               ## @.str.1
	.asciz	"DSI PLL calculation is Done!!\n"

	.comm	_BXT_DSIA_16X_BY2,4,2           ## @BXT_DSIA_16X_BY2
	.comm	_BXT_DSIC_16X_BY2,4,2           ## @BXT_DSIC_16X_BY2
	.comm	_BXT_DSI_PLL_PVD_RATIO_1,4,2    ## @BXT_DSI_PLL_PVD_RATIO_1
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_bxt_dsi_pll_compute            ; -- Begin function bxt_dsi_pll_compute
	.p2align	2
_bxt_dsi_pll_compute:                   ; @bxt_dsi_pll_compute
	.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	x21, x0
	ldr	w0, [x0]
	bl	_to_i915
	mov	x20, x0
	mov	x0, x21
	bl	_enc_to_intel_dsi
	ldp	w1, w8, [x0, #4]
	ldr	w2, [x0]
	mov	x0, x8
	bl	_dsi_clk_from_pclk
	lsl	w0, w0, #1
Lloh0:
	adrp	x8, _BXT_REF_CLOCK_KHZ@GOTPAGE
Lloh1:
	ldr	x8, [x8, _BXT_REF_CLOCK_KHZ@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	bl	_DIV_ROUND_UP
	mov	x21, x0
	mov	x0, x20
	bl	_IS_BROXTON
Lloh3:
	adrp	x8, _GLK_DSI_PLL_RATIO_MIN@GOTPAGE
Lloh4:
	ldr	x8, [x8, _GLK_DSI_PLL_RATIO_MIN@GOTPAGEOFF]
Lloh5:
	adrp	x9, _BXT_DSI_PLL_RATIO_MIN@GOTPAGE
Lloh6:
	ldr	x9, [x9, _BXT_DSI_PLL_RATIO_MIN@GOTPAGEOFF]
	cmp	x0, #0
	csel	x8, x8, x9, eq
	ldr	w8, [x8]
Lloh7:
	adrp	x9, _GLK_DSI_PLL_RATIO_MAX@GOTPAGE
Lloh8:
	ldr	x9, [x9, _GLK_DSI_PLL_RATIO_MAX@GOTPAGEOFF]
Lloh9:
	adrp	x10, _BXT_DSI_PLL_RATIO_MAX@GOTPAGE
Lloh10:
	ldr	x10, [x10, _BXT_DSI_PLL_RATIO_MAX@GOTPAGEOFF]
	csel	x9, x9, x10, eq
	ldr	w9, [x9]
	cmp	w21, w8
	ccmp	w21, w9, #0, ge
	b.le	LBB0_2
; %bb.1:
Lloh11:
	adrp	x0, l_.str@PAGE
Lloh12:
	add	x0, x0, l_.str@PAGEOFF
	bl	_DRM_ERROR
Lloh13:
	adrp	x8, _ECHRNG@GOTPAGE
Lloh14:
	ldr	x8, [x8, _ECHRNG@GOTPAGEOFF]
Lloh15:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_5
LBB0_2:
Lloh16:
	adrp	x0, l_.str.1@PAGE
Lloh17:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_DRM_DEBUG_KMS
Lloh18:
	adrp	x8, _BXT_DSIA_16X_BY2@GOTPAGE
Lloh19:
	ldr	x8, [x8, _BXT_DSIA_16X_BY2@GOTPAGEOFF]
Lloh20:
	ldr	w8, [x8]
	orr	w8, w8, w21
Lloh21:
	adrp	x9, _BXT_DSIC_16X_BY2@GOTPAGE
Lloh22:
	ldr	x9, [x9, _BXT_DSIC_16X_BY2@GOTPAGEOFF]
Lloh23:
	ldr	w9, [x9]
	orr	w8, w8, w9
	str	w8, [x19]
	mov	x0, x20
	bl	_IS_BROXTON
	mov	x8, x0
	mov	w0, #0
	cbz	x8, LBB0_5
; %bb.3:
	cmp	w21, #50
	b.gt	LBB0_5
; %bb.4:
	mov	w0, #0
Lloh24:
	adrp	x8, _BXT_DSI_PLL_PVD_RATIO_1@GOTPAGE
Lloh25:
	ldr	x8, [x8, _BXT_DSI_PLL_PVD_RATIO_1@GOTPAGEOFF]
Lloh26:
	ldr	w8, [x8]
	ldr	w9, [x19]
	orr	w8, w9, w8
	str	w8, [x19]
LBB0_5:
	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
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.cfi_endproc
                                        ; -- End function
	.comm	_BXT_REF_CLOCK_KHZ,4,2          ; @BXT_REF_CLOCK_KHZ
	.comm	_BXT_DSI_PLL_RATIO_MIN,4,2      ; @BXT_DSI_PLL_RATIO_MIN
	.comm	_BXT_DSI_PLL_RATIO_MAX,4,2      ; @BXT_DSI_PLL_RATIO_MAX
	.comm	_GLK_DSI_PLL_RATIO_MIN,4,2      ; @GLK_DSI_PLL_RATIO_MIN
	.comm	_GLK_DSI_PLL_RATIO_MAX,4,2      ; @GLK_DSI_PLL_RATIO_MAX
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Cant get a suitable ratio from DSI PLL ratios\n"

	.comm	_ECHRNG,4,2                     ; @ECHRNG
l_.str.1:                               ; @.str.1
	.asciz	"DSI PLL calculation is Done!!\n"

	.comm	_BXT_DSIA_16X_BY2,4,2           ; @BXT_DSIA_16X_BY2
	.comm	_BXT_DSIC_16X_BY2,4,2           ; @BXT_DSIC_16X_BY2
	.comm	_BXT_DSI_PLL_PVD_RATIO_1,4,2    ; @BXT_DSI_PLL_PVD_RATIO_1
.subsections_via_symbols
