	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function cdns_dsi_init_link
_cdns_dsi_init_link:                    ## @cdns_dsi_init_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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	cmpl	$0, (%rdi)
	jne	LBB0_13
## %bb.1:
	movq	%rdi, %r15
	movq	24(%rdi), %rax
	xorl	%r14d, %r14d
	cmpl	$2, (%rax)
	movl	$0, %r12d
	jl	LBB0_4
## %bb.2:
	xorl	%r12d, %r12d
	movl	$1, %ebx
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movl	%ebx, %edi
	callq	_DATA_LANE_EN
	orl	%eax, %r12d
	incl	%ebx
	movq	24(%r15), %rax
	cmpl	(%rax), %ebx
	jl	LBB0_3
LBB0_4:
	movq	_MIPI_DSI_CLOCK_NON_CONTINUOUS@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	andl	4(%rax), %ecx
	jne	LBB0_6
## %bb.5:
	movq	_CLK_CONTINUOUS@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
LBB0_6:
	orl	%r12d, %r14d
	movq	_MCTL_MAIN_PHY_CTL@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	addq	8(%r15), %rsi
	movl	%r14d, %edi
	callq	_writel
	movq	_NSEC_PER_SEC@GOTPCREL(%rip), %rax
	movq	(%rax), %rbx
	movl	16(%r15), %edi
	callq	_clk_get_rate
	movq	%rax, %rcx
	orq	%rbx, %rax
	shrq	$32, %rax
	je	LBB0_7
## %bb.8:
	movq	%rbx, %rax
	xorl	%edx, %edx
	divq	%rcx
	movq	%rax, %rsi
	jmp	LBB0_9
LBB0_7:
	movl	%ebx, %eax
	xorl	%edx, %edx
	divl	%ecx
	movl	%eax, %esi
LBB0_9:
	movq	_NSEC_PER_MSEC@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_DIV_ROUND_UP
	movq	%rax, %r14
	movq	%rax, %rdi
	callq	_CLK_LANE_ULPOUT_TIME
	movl	%eax, %ebx
	movq	%r14, %rdi
	callq	_DATA_LANE_ULPOUT_TIME
	orl	%eax, %ebx
	movq	_MCTL_ULPOUT_TIME@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	addq	8(%r15), %rsi
	movl	%ebx, %edi
	callq	_writel
	movq	_LINK_EN@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_MCTL_MAIN_DATA_CTL@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	addq	8(%r15), %rsi
	callq	_writel
	movq	_CLK_LANE_EN@GOTPCREL(%rip), %rax
	movq	_PLL_START@GOTPCREL(%rip), %rcx
	movl	(%rcx), %r14d
	orl	(%rax), %r14d
	movq	24(%r15), %rax
	cmpl	$0, (%rax)
	jle	LBB0_12
## %bb.10:
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_11:                                ## =>This Inner Loop Header: Depth=1
	movl	%ebx, %edi
	callq	_DATA_LANE_START
	orl	%eax, %r14d
	incl	%ebx
	movq	24(%r15), %rax
	cmpl	(%rax), %ebx
	jl	LBB0_11
LBB0_12:
	movq	_MCTL_MAIN_EN@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	addq	8(%r15), %rsi
	movl	%r14d, %edi
	callq	_writel
	movl	$1, (%r15)
LBB0_13:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_MIPI_DSI_CLOCK_NON_CONTINUOUS,4,2 ## @MIPI_DSI_CLOCK_NON_CONTINUOUS
	.comm	_CLK_CONTINUOUS,4,2             ## @CLK_CONTINUOUS
	.comm	_MCTL_MAIN_PHY_CTL,8,3          ## @MCTL_MAIN_PHY_CTL
	.comm	_NSEC_PER_SEC,8,3               ## @NSEC_PER_SEC
	.comm	_NSEC_PER_MSEC,4,2              ## @NSEC_PER_MSEC
	.comm	_MCTL_ULPOUT_TIME,8,3           ## @MCTL_ULPOUT_TIME
	.comm	_LINK_EN,4,2                    ## @LINK_EN
	.comm	_MCTL_MAIN_DATA_CTL,8,3         ## @MCTL_MAIN_DATA_CTL
	.comm	_CLK_LANE_EN,4,2                ## @CLK_LANE_EN
	.comm	_PLL_START,4,2                  ## @PLL_START
	.comm	_MCTL_MAIN_EN,8,3               ## @MCTL_MAIN_EN
	.no_dead_strip	_cdns_dsi_init_link
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function cdns_dsi_init_link
_cdns_dsi_init_link:                    ; @cdns_dsi_init_link
	.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
	ldr	w8, [x0]
	cbnz	w8, LBB0_9
; %bb.1:
	mov	x19, x0
	ldr	x8, [x0, #24]
	ldr	w9, [x8]
	cmp	w9, #1
	b.le	LBB0_4
; %bb.2:
	mov	w21, #0
	mov	w20, #1
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x20
	bl	_DATA_LANE_EN
	orr	w21, w0, w21
	add	w20, w20, #1
	ldr	x8, [x19, #24]
	ldr	w9, [x8]
	cmp	w20, w9
	b.lt	LBB0_3
	b	LBB0_5
LBB0_4:
	mov	w21, #0
LBB0_5:
	ldr	w8, [x8, #4]
Lloh0:
	adrp	x9, _MIPI_DSI_CLOCK_NON_CONTINUOUS@GOTPAGE
Lloh1:
	ldr	x9, [x9, _MIPI_DSI_CLOCK_NON_CONTINUOUS@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
Lloh3:
	adrp	x10, _CLK_CONTINUOUS@GOTPAGE
Lloh4:
	ldr	x10, [x10, _CLK_CONTINUOUS@GOTPAGEOFF]
Lloh5:
	ldr	w10, [x10]
	tst	w9, w8
	csel	w8, w10, wzr, eq
	orr	w0, w8, w21
	ldr	x8, [x19, #8]
Lloh6:
	adrp	x9, _MCTL_MAIN_PHY_CTL@GOTPAGE
Lloh7:
	ldr	x9, [x9, _MCTL_MAIN_PHY_CTL@GOTPAGEOFF]
Lloh8:
	ldr	x9, [x9]
	add	x1, x9, x8
	bl	_writel
Lloh9:
	adrp	x8, _NSEC_PER_SEC@GOTPAGE
Lloh10:
	ldr	x8, [x8, _NSEC_PER_SEC@GOTPAGEOFF]
Lloh11:
	ldr	x20, [x8]
	ldr	w0, [x19, #16]
	bl	_clk_get_rate
Lloh12:
	adrp	x8, _NSEC_PER_MSEC@GOTPAGE
Lloh13:
	ldr	x8, [x8, _NSEC_PER_MSEC@GOTPAGEOFF]
Lloh14:
	ldr	w8, [x8]
	udiv	x1, x20, x0
	mov	x0, x8
	bl	_DIV_ROUND_UP
	mov	x20, x0
	bl	_CLK_LANE_ULPOUT_TIME
	mov	x21, x0
	mov	x0, x20
	bl	_DATA_LANE_ULPOUT_TIME
	orr	w0, w0, w21
	ldr	x8, [x19, #8]
Lloh15:
	adrp	x9, _MCTL_ULPOUT_TIME@GOTPAGE
Lloh16:
	ldr	x9, [x9, _MCTL_ULPOUT_TIME@GOTPAGEOFF]
Lloh17:
	ldr	x9, [x9]
	add	x1, x9, x8
	bl	_writel
Lloh18:
	adrp	x8, _LINK_EN@GOTPAGE
Lloh19:
	ldr	x8, [x8, _LINK_EN@GOTPAGEOFF]
Lloh20:
	ldr	w0, [x8]
	ldr	x8, [x19, #8]
Lloh21:
	adrp	x9, _MCTL_MAIN_DATA_CTL@GOTPAGE
Lloh22:
	ldr	x9, [x9, _MCTL_MAIN_DATA_CTL@GOTPAGEOFF]
Lloh23:
	ldr	x9, [x9]
	add	x1, x9, x8
	bl	_writel
Lloh24:
	adrp	x8, _CLK_LANE_EN@GOTPAGE
Lloh25:
	ldr	x8, [x8, _CLK_LANE_EN@GOTPAGEOFF]
Lloh26:
	adrp	x9, _PLL_START@GOTPAGE
Lloh27:
	ldr	x9, [x9, _PLL_START@GOTPAGEOFF]
Lloh28:
	ldr	w8, [x8]
Lloh29:
	ldr	w9, [x9]
	orr	w20, w9, w8
	ldr	x8, [x19, #24]
	ldr	w8, [x8]
	cmp	w8, #1
	b.lt	LBB0_8
; %bb.6:
	mov	w21, #0
LBB0_7:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x21
	bl	_DATA_LANE_START
	orr	w20, w0, w20
	add	w21, w21, #1
	ldr	x8, [x19, #24]
	ldr	w8, [x8]
	cmp	w21, w8
	b.lt	LBB0_7
LBB0_8:
	ldr	x8, [x19, #8]
Lloh30:
	adrp	x9, _MCTL_MAIN_EN@GOTPAGE
Lloh31:
	ldr	x9, [x9, _MCTL_MAIN_EN@GOTPAGEOFF]
Lloh32:
	ldr	x9, [x9]
	add	x1, x9, x8
	mov	x0, x20
	bl	_writel
	mov	w8, #1
	str	w8, [x19]
LBB0_9:
	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 AdrpLdrGotLdr	Lloh26, Lloh27, Lloh29
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh28
	.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
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh30, Lloh31, Lloh32
	.cfi_endproc
                                        ; -- End function
	.comm	_MIPI_DSI_CLOCK_NON_CONTINUOUS,4,2 ; @MIPI_DSI_CLOCK_NON_CONTINUOUS
	.comm	_CLK_CONTINUOUS,4,2             ; @CLK_CONTINUOUS
	.comm	_MCTL_MAIN_PHY_CTL,8,3          ; @MCTL_MAIN_PHY_CTL
	.comm	_NSEC_PER_SEC,8,3               ; @NSEC_PER_SEC
	.comm	_NSEC_PER_MSEC,4,2              ; @NSEC_PER_MSEC
	.comm	_MCTL_ULPOUT_TIME,8,3           ; @MCTL_ULPOUT_TIME
	.comm	_LINK_EN,4,2                    ; @LINK_EN
	.comm	_MCTL_MAIN_DATA_CTL,8,3         ; @MCTL_MAIN_DATA_CTL
	.comm	_CLK_LANE_EN,4,2                ; @CLK_LANE_EN
	.comm	_PLL_START,4,2                  ; @PLL_START
	.comm	_MCTL_MAIN_EN,8,3               ; @MCTL_MAIN_EN
	.no_dead_strip	_cdns_dsi_init_link
.subsections_via_symbols
