	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function bxt_dsi_program_clocks
_bxt_dsi_program_clocks:                ## @bxt_dsi_program_clocks
	.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	%rdx, %r15
	movl	%esi, %r14d
	callq	_to_i915
	movq	_BXT_MIPI_CLOCK_CTL@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_I915_READ
	movl	%eax, %ebx
	movl	%r14d, %edi
	callq	_BXT_MIPI_TX_ESCLK_FIXDIV_MASK
	movl	%eax, %r13d
	movl	%r14d, %edi
	callq	_BXT_MIPI_RX_ESCLK_UPPER_FIXDIV_MASK
	orl	%eax, %r13d
	movl	%r14d, %edi
	callq	_BXT_MIPI_8X_BY3_DIVIDER_MASK
	movl	%eax, %r12d
	movl	%r14d, %edi
	callq	_BXT_MIPI_RX_ESCLK_LOWER_FIXDIV_MASK
	orl	%eax, %r12d
	orl	%r13d, %r12d
	movq	_BXT_DSI_PLL_RATIO_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	andl	(%r15), %eax
	notl	%r12d
	movq	_BXT_REF_CLOCK_KHZ@GOTPCREL(%rip), %rcx
	imull	(%rcx), %eax
	andl	%ebx, %r12d
	movl	%eax, %ebx
	shrl	$31, %ebx
	addl	%eax, %ebx
	sarl	%ebx
	movl	%ebx, %edi
	movl	$20000, %esi                    ## imm = 0x4E20
	callq	_DIV_ROUND_UP
                                        ## kill: def $eax killed $eax def $rax
	leal	-1(%rax), %r13d
	movl	%ebx, %edi
	movl	$150000, %esi                   ## imm = 0x249F0
	callq	_DIV_ROUND_UP
                                        ## kill: def $eax killed $eax def $rax
	leal	-1(%rax), %r15d
	movq	_RX_DIVIDER_BIT_1_2@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	andl	%r15d, %ebx
	movq	_RX_DIVIDER_BIT_3_4@GOTPCREL(%rip), %rax
	andl	(%rax), %r15d
	sarl	$2, %r15d
	movl	%r14d, %edi
	movl	$2, %esi
	callq	_BXT_MIPI_8X_BY3_DIVIDER
	orl	%eax, %r12d
	movl	%r14d, %edi
	movl	%r13d, %esi
	callq	_BXT_MIPI_TX_ESCLK_DIVIDER
	orl	%eax, %r12d
	movl	%r14d, %edi
	movl	%ebx, %esi
	callq	_BXT_MIPI_RX_ESCLK_LOWER_DIVIDER
	orl	%eax, %r12d
	movl	%r14d, %edi
	movl	%r15d, %esi
	callq	_BXT_MIPI_RX_ESCLK_UPPER_DIVIDER
	orl	%eax, %r12d
	movq	_BXT_MIPI_CLOCK_CTL@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	%r12d, %esi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_I915_WRITE                     ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_BXT_MIPI_CLOCK_CTL,4,2         ## @BXT_MIPI_CLOCK_CTL
	.comm	_BXT_DSI_PLL_RATIO_MASK,4,2     ## @BXT_DSI_PLL_RATIO_MASK
	.comm	_BXT_REF_CLOCK_KHZ,4,2          ## @BXT_REF_CLOCK_KHZ
	.comm	_RX_DIVIDER_BIT_1_2,4,2         ## @RX_DIVIDER_BIT_1_2
	.comm	_RX_DIVIDER_BIT_3_4,4,2         ## @RX_DIVIDER_BIT_3_4
	.no_dead_strip	_bxt_dsi_program_clocks
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function bxt_dsi_program_clocks
_bxt_dsi_program_clocks:                ; @bxt_dsi_program_clocks
	.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	x20, x2
	mov	x19, x1
	bl	_to_i915
Lloh0:
	adrp	x23, _BXT_MIPI_CLOCK_CTL@GOTPAGE
Lloh1:
	ldr	x23, [x23, _BXT_MIPI_CLOCK_CTL@GOTPAGEOFF]
	ldr	w0, [x23]
	bl	_I915_READ
	mov	x21, x0
	mov	x0, x19
	bl	_BXT_MIPI_TX_ESCLK_FIXDIV_MASK
	mov	x22, x0
	mov	x0, x19
	bl	_BXT_MIPI_RX_ESCLK_UPPER_FIXDIV_MASK
	orr	w22, w0, w22
	mov	x0, x19
	bl	_BXT_MIPI_8X_BY3_DIVIDER_MASK
	orr	w22, w22, w0
	mov	x0, x19
	bl	_BXT_MIPI_RX_ESCLK_LOWER_FIXDIV_MASK
	orr	w8, w22, w0
	bic	w24, w21, w8
	ldr	w8, [x20]
Lloh2:
	adrp	x9, _BXT_DSI_PLL_RATIO_MASK@GOTPAGE
Lloh3:
	ldr	x9, [x9, _BXT_DSI_PLL_RATIO_MASK@GOTPAGEOFF]
Lloh4:
	ldr	w9, [x9]
Lloh5:
	adrp	x10, _BXT_REF_CLOCK_KHZ@GOTPAGE
Lloh6:
	ldr	x10, [x10, _BXT_REF_CLOCK_KHZ@GOTPAGEOFF]
	and	w8, w9, w8
Lloh7:
	ldr	w9, [x10]
	mul	w8, w9, w8
	cmp	w8, #0
	cinc	w8, w8, lt
	asr	w20, w8, #1
	mov	x0, x20
	mov	w1, #20000
	bl	_DIV_ROUND_UP
	sub	w21, w0, #1
	mov	x0, x20
	mov	w1, #18928
	movk	w1, #2, lsl #16
	bl	_DIV_ROUND_UP
	sub	w8, w0, #1
Lloh8:
	adrp	x9, _RX_DIVIDER_BIT_1_2@GOTPAGE
Lloh9:
	ldr	x9, [x9, _RX_DIVIDER_BIT_1_2@GOTPAGEOFF]
Lloh10:
	ldr	w9, [x9]
	and	w20, w8, w9
Lloh11:
	adrp	x9, _RX_DIVIDER_BIT_3_4@GOTPAGE
Lloh12:
	ldr	x9, [x9, _RX_DIVIDER_BIT_3_4@GOTPAGEOFF]
Lloh13:
	ldr	w9, [x9]
	and	w8, w9, w8
	asr	w22, w8, #2
	mov	x0, x19
	mov	w1, #2
	bl	_BXT_MIPI_8X_BY3_DIVIDER
	orr	w24, w0, w24
	mov	x0, x19
	mov	x1, x21
	bl	_BXT_MIPI_TX_ESCLK_DIVIDER
	orr	w21, w24, w0
	mov	x0, x19
	mov	x1, x20
	bl	_BXT_MIPI_RX_ESCLK_LOWER_DIVIDER
	orr	w20, w21, w0
	mov	x0, x19
	mov	x1, x22
	bl	_BXT_MIPI_RX_ESCLK_UPPER_DIVIDER
	orr	w1, w20, w0
	ldr	w0, [x23]
	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
	b	_I915_WRITE
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.comm	_BXT_MIPI_CLOCK_CTL,4,2         ; @BXT_MIPI_CLOCK_CTL
	.comm	_BXT_DSI_PLL_RATIO_MASK,4,2     ; @BXT_DSI_PLL_RATIO_MASK
	.comm	_BXT_REF_CLOCK_KHZ,4,2          ; @BXT_REF_CLOCK_KHZ
	.comm	_RX_DIVIDER_BIT_1_2,4,2         ; @RX_DIVIDER_BIT_1_2
	.comm	_RX_DIVIDER_BIT_3_4,4,2         ; @RX_DIVIDER_BIT_3_4
	.no_dead_strip	_bxt_dsi_program_clocks
.subsections_via_symbols
