	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function dsi_display_init_dsi
_dsi_display_init_dsi:                  ## @dsi_display_init_dsi
	.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	%rdi, %r15
	leaq	12(%rdi), %r14
	movq	%r14, %rdi
	callq	_dss_pll_enable
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_15
## %bb.1:
	movq	%r15, %rdi
	callq	_dsi_configure_dsi_clocks
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_14
## %bb.2:
	movl	16(%r15), %edi
	movq	(%r15), %rsi
	testq	%rsi, %rsi
	jne	LBB0_3
## %bb.4:
	movq	_DSS_CLK_SRC_PLL1_2@GOTPCREL(%rip), %rax
	jmp	LBB0_5
LBB0_3:
	movq	_DSS_CLK_SRC_PLL2_2@GOTPCREL(%rip), %rax
LBB0_5:
	movl	(%rax), %edx
	callq	_dss_select_dsi_clk_source
	leaq	L_.str(%rip), %rdi
	callq	_DSSDBG
	cmpl	$0, 8(%r15)
	je	LBB0_6
LBB0_8:
	movq	%r15, %rdi
	callq	_dsi_cio_init
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_12
## %bb.9:
	movq	%r15, %rdi
	callq	__dsi_print_reset_status
	movq	%r15, %rdi
	callq	_dsi_proto_timings
	movq	%r15, %rdi
	callq	_dsi_set_lp_clk_divisor
	movq	%r15, %rdi
	callq	__dsi_print_reset_status
	movq	%r15, %rdi
	callq	_dsi_proto_config
	testl	%eax, %eax
	je	LBB0_10
## %bb.11:
	movl	%eax, %ebx
	movq	%r15, %rdi
	callq	_dsi_cio_uninit
LBB0_12:
	movl	20(%r15), %edi
	callq	_regulator_disable
	movl	$0, 8(%r15)
	jmp	LBB0_13
LBB0_6:
	movl	20(%r15), %edi
	callq	_regulator_enable
	movl	%eax, %ebx
	testl	%eax, %eax
	je	LBB0_7
LBB0_13:
	movl	16(%r15), %edi
	movq	(%r15), %rsi
	movq	_DSS_CLK_SRC_FCK@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	callq	_dss_select_dsi_clk_source
LBB0_14:
	movq	%r14, %rdi
	callq	_dss_pll_disable
LBB0_15:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_7:
	movl	$1, 8(%r15)
	jmp	LBB0_8
LBB0_10:
	xorl	%ebx, %ebx
	movq	%r15, %rdi
	xorl	%esi, %esi
	movl	$1, %edx
	callq	_dsi_vc_enable
	movq	%r15, %rdi
	movl	$1, %esi
	movl	$1, %edx
	callq	_dsi_vc_enable
	movq	%r15, %rdi
	movl	$2, %esi
	movl	$1, %edx
	callq	_dsi_vc_enable
	movq	%r15, %rdi
	movl	$3, %esi
	movl	$1, %edx
	callq	_dsi_vc_enable
	movq	%r15, %rdi
	movl	$1, %esi
	callq	_dsi_if_enable
	movq	%r15, %rdi
	callq	_dsi_force_tx_stop_mode_io
	jmp	LBB0_15
	.cfi_endproc
                                        ## -- End function
	.comm	_DSS_CLK_SRC_PLL1_2,4,2         ## @DSS_CLK_SRC_PLL1_2
	.comm	_DSS_CLK_SRC_PLL2_2,4,2         ## @DSS_CLK_SRC_PLL2_2
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"PLL OK\n"

	.comm	_DSS_CLK_SRC_FCK,4,2            ## @DSS_CLK_SRC_FCK
	.no_dead_strip	_dsi_display_init_dsi
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function dsi_display_init_dsi
_dsi_display_init_dsi:                  ; @dsi_display_init_dsi
	.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, x0
	add	x20, x0, #12
	mov	x0, x20
	bl	_dss_pll_enable
	mov	x21, x0
	cbnz	w0, LBB0_10
; %bb.1:
	mov	x0, x19
	bl	_dsi_configure_dsi_clocks
	mov	x21, x0
	cbnz	w0, LBB0_9
; %bb.2:
	ldr	w0, [x19, #16]
Lloh0:
	adrp	x8, _DSS_CLK_SRC_PLL1_2@GOTPAGE
Lloh1:
	ldr	x8, [x8, _DSS_CLK_SRC_PLL1_2@GOTPAGEOFF]
	ldr	x1, [x19]
Lloh2:
	adrp	x9, _DSS_CLK_SRC_PLL2_2@GOTPAGE
Lloh3:
	ldr	x9, [x9, _DSS_CLK_SRC_PLL2_2@GOTPAGEOFF]
	cmp	x1, #0
	csel	x8, x8, x9, eq
	ldr	w2, [x8]
	bl	_dss_select_dsi_clk_source
Lloh4:
	adrp	x0, l_.str@PAGE
Lloh5:
	add	x0, x0, l_.str@PAGEOFF
	bl	_DSSDBG
	ldr	w8, [x19, #8]
	cbz	w8, LBB0_7
LBB0_3:
	mov	x0, x19
	bl	_dsi_cio_init
	mov	x21, x0
	cbnz	w0, LBB0_6
; %bb.4:
	mov	x0, x19
	bl	__dsi_print_reset_status
	mov	x0, x19
	bl	_dsi_proto_timings
	mov	x0, x19
	bl	_dsi_set_lp_clk_divisor
	mov	x0, x19
	bl	__dsi_print_reset_status
	mov	x0, x19
	bl	_dsi_proto_config
	mov	x21, x0
	cbz	w0, LBB0_12
; %bb.5:
	mov	x0, x19
	bl	_dsi_cio_uninit
LBB0_6:
	ldr	w0, [x19, #20]
	bl	_regulator_disable
	str	wzr, [x19, #8]
	b	LBB0_8
LBB0_7:
	ldr	w0, [x19, #20]
	bl	_regulator_enable
	mov	x21, x0
	cbz	w0, LBB0_11
LBB0_8:
	ldr	w0, [x19, #16]
	ldr	x1, [x19]
Lloh6:
	adrp	x8, _DSS_CLK_SRC_FCK@GOTPAGE
Lloh7:
	ldr	x8, [x8, _DSS_CLK_SRC_FCK@GOTPAGEOFF]
Lloh8:
	ldr	w2, [x8]
	bl	_dss_select_dsi_clk_source
LBB0_9:
	mov	x0, x20
	bl	_dss_pll_disable
LBB0_10:
	mov	x0, x21
	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
LBB0_11:
	mov	w8, #1
	str	w8, [x19, #8]
	b	LBB0_3
LBB0_12:
	mov	x0, x19
	mov	w1, #0
	mov	w2, #1
	bl	_dsi_vc_enable
	mov	x0, x19
	mov	w1, #1
	mov	w2, #1
	bl	_dsi_vc_enable
	mov	x0, x19
	mov	w1, #2
	mov	w2, #1
	bl	_dsi_vc_enable
	mov	x0, x19
	mov	w1, #3
	mov	w2, #1
	bl	_dsi_vc_enable
	mov	x0, x19
	mov	w1, #1
	bl	_dsi_if_enable
	mov	x0, x19
	bl	_dsi_force_tx_stop_mode_io
	b	LBB0_10
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_DSS_CLK_SRC_PLL1_2,4,2         ; @DSS_CLK_SRC_PLL1_2
	.comm	_DSS_CLK_SRC_PLL2_2,4,2         ; @DSS_CLK_SRC_PLL2_2
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"PLL OK\n"

	.comm	_DSS_CLK_SRC_FCK,4,2            ; @DSS_CLK_SRC_FCK
	.no_dead_strip	_dsi_display_init_dsi
.subsections_via_symbols
