	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function sun6i_dsi_encoder_enable
_sun6i_dsi_encoder_enable:              ## @sun6i_dsi_encoder_enable
	.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	(%rdi), %rax
	movq	(%rax), %r14
	callq	_encoder_to_sun6i_dsi
	movq	%rax, %rbx
	movq	16(%rax), %r13
	movl	$0, -48(%rbp)
	leaq	L_.str(%rip), %rdi
	callq	_DRM_DEBUG_DRIVER
	movl	12(%rbx), %edi
	callq	_pm_runtime_get_sync
	movq	%rbx, %rdi
	movq	%r14, %rsi
	callq	_sun6i_dsi_get_video_start_delay
	movl	8(%rbx), %r15d
	movq	_SUN6I_DSI_BASIC_CTL1_REG@GOTPCREL(%rip), %rcx
	movl	(%rcx), %r12d
	movl	%eax, %edi
	callq	_SUN6I_DSI_BASIC_CTL1_VIDEO_ST_DELAY
	movq	_SUN6I_DSI_BASIC_CTL1_VIDEO_FILL@GOTPCREL(%rip), %rcx
	orl	(%rcx), %eax
	movq	_SUN6I_DSI_BASIC_CTL1_VIDEO_PRECISION@GOTPCREL(%rip), %rcx
	orl	(%rcx), %eax
	movq	_SUN6I_DSI_BASIC_CTL1_VIDEO_MODE@GOTPCREL(%rip), %rcx
	orl	(%rcx), %eax
	movl	%r15d, %edi
	movl	%r12d, %esi
	movl	%eax, %edx
	callq	_regmap_write
	movq	%rbx, %rdi
	movq	%r14, %rsi
	callq	_sun6i_dsi_setup_burst
	movq	%rbx, %rdi
	movq	%r14, %rsi
	callq	_sun6i_dsi_setup_inst_loop
	movq	%rbx, %rdi
	movq	%r14, %rsi
	callq	_sun6i_dsi_setup_format
	movq	%rbx, %rdi
	movq	%r14, %rsi
	callq	_sun6i_dsi_setup_timings
	movl	4(%rbx), %edi
	callq	_phy_init
	imull	$1000, (%r14), %r14d            ## imm = 0x3E8
	movl	4(%r13), %edi
	callq	_mipi_dsi_pixel_format_to_bpp
	movl	(%r13), %edx
	leaq	-48(%rbp), %r15
	movl	%r14d, %edi
	movl	%eax, %esi
	movq	%r15, %rcx
	callq	_phy_mipi_dphy_get_default_config
	movl	4(%rbx), %edi
	movq	_PHY_MODE_MIPI_DPHY@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_phy_set_mode
	movl	4(%rbx), %edi
	movq	%r15, %rsi
	callq	_phy_configure
	movl	4(%rbx), %edi
	callq	_phy_power_on
	movl	(%rbx), %edi
	callq	_IS_ERR
	testl	%eax, %eax
	jne	LBB0_2
## %bb.1:
	movl	(%rbx), %edi
	callq	_drm_panel_prepare
LBB0_2:
	movl	(%rbx), %edi
	callq	_IS_ERR
	testl	%eax, %eax
	jne	LBB0_4
## %bb.3:
	movl	(%rbx), %edi
	callq	_drm_panel_enable
LBB0_4:
	movq	_DSI_START_HSC@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_sun6i_dsi_start
	movl	$1000, %edi                     ## imm = 0x3E8
	callq	_udelay
	movq	_DSI_START_HSD@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_sun6i_dsi_start
	addq	$8, %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	"Enabling DSI output\n"

	.comm	_SUN6I_DSI_BASIC_CTL1_REG,4,2   ## @SUN6I_DSI_BASIC_CTL1_REG
	.comm	_SUN6I_DSI_BASIC_CTL1_VIDEO_FILL,4,2 ## @SUN6I_DSI_BASIC_CTL1_VIDEO_FILL
	.comm	_SUN6I_DSI_BASIC_CTL1_VIDEO_PRECISION,4,2 ## @SUN6I_DSI_BASIC_CTL1_VIDEO_PRECISION
	.comm	_SUN6I_DSI_BASIC_CTL1_VIDEO_MODE,4,2 ## @SUN6I_DSI_BASIC_CTL1_VIDEO_MODE
	.comm	_PHY_MODE_MIPI_DPHY,4,2         ## @PHY_MODE_MIPI_DPHY
	.comm	_DSI_START_HSC,4,2              ## @DSI_START_HSC
	.comm	_DSI_START_HSD,4,2              ## @DSI_START_HSD
	.no_dead_strip	_sun6i_dsi_encoder_enable
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function sun6i_dsi_encoder_enable
_sun6i_dsi_encoder_enable:              ; @sun6i_dsi_encoder_enable
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	ldr	x8, [x0]
	ldr	x20, [x8]
	bl	_encoder_to_sun6i_dsi
	mov	x19, x0
	ldr	x23, [x0, #16]
	str	wzr, [sp, #8]
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	bl	_DRM_DEBUG_DRIVER
	ldr	w0, [x19, #12]
	bl	_pm_runtime_get_sync
	mov	x0, x19
	mov	x1, x20
	bl	_sun6i_dsi_get_video_start_delay
	ldr	w21, [x19, #8]
Lloh2:
	adrp	x8, _SUN6I_DSI_BASIC_CTL1_REG@GOTPAGE
Lloh3:
	ldr	x8, [x8, _SUN6I_DSI_BASIC_CTL1_REG@GOTPAGEOFF]
Lloh4:
	ldr	w22, [x8]
	bl	_SUN6I_DSI_BASIC_CTL1_VIDEO_ST_DELAY
Lloh5:
	adrp	x8, _SUN6I_DSI_BASIC_CTL1_VIDEO_FILL@GOTPAGE
Lloh6:
	ldr	x8, [x8, _SUN6I_DSI_BASIC_CTL1_VIDEO_FILL@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
	orr	w8, w8, w0
Lloh8:
	adrp	x9, _SUN6I_DSI_BASIC_CTL1_VIDEO_PRECISION@GOTPAGE
Lloh9:
	ldr	x9, [x9, _SUN6I_DSI_BASIC_CTL1_VIDEO_PRECISION@GOTPAGEOFF]
Lloh10:
	ldr	w9, [x9]
	orr	w8, w8, w9
Lloh11:
	adrp	x9, _SUN6I_DSI_BASIC_CTL1_VIDEO_MODE@GOTPAGE
Lloh12:
	ldr	x9, [x9, _SUN6I_DSI_BASIC_CTL1_VIDEO_MODE@GOTPAGEOFF]
Lloh13:
	ldr	w9, [x9]
	orr	w2, w8, w9
	mov	x0, x21
	mov	x1, x22
	bl	_regmap_write
	mov	x0, x19
	mov	x1, x20
	bl	_sun6i_dsi_setup_burst
	mov	x0, x19
	mov	x1, x20
	bl	_sun6i_dsi_setup_inst_loop
	mov	x0, x19
	mov	x1, x20
	bl	_sun6i_dsi_setup_format
	mov	x0, x19
	mov	x1, x20
	bl	_sun6i_dsi_setup_timings
	ldr	w0, [x19, #4]
	bl	_phy_init
	ldr	w8, [x20]
	mov	w9, #1000
	mul	w20, w8, w9
	ldr	w0, [x23, #4]
	bl	_mipi_dsi_pixel_format_to_bpp
	mov	x1, x0
	ldr	w2, [x23]
	add	x3, sp, #8
	mov	x0, x20
	bl	_phy_mipi_dphy_get_default_config
	ldr	w0, [x19, #4]
Lloh14:
	adrp	x8, _PHY_MODE_MIPI_DPHY@GOTPAGE
Lloh15:
	ldr	x8, [x8, _PHY_MODE_MIPI_DPHY@GOTPAGEOFF]
Lloh16:
	ldr	w1, [x8]
	bl	_phy_set_mode
	ldr	w0, [x19, #4]
	add	x1, sp, #8
	bl	_phy_configure
	ldr	w0, [x19, #4]
	bl	_phy_power_on
	ldr	w0, [x19]
	bl	_IS_ERR
	cbnz	w0, LBB0_2
; %bb.1:
	ldr	w0, [x19]
	bl	_drm_panel_prepare
LBB0_2:
	ldr	w0, [x19]
	bl	_IS_ERR
	cbnz	w0, LBB0_4
; %bb.3:
	ldr	w0, [x19]
	bl	_drm_panel_enable
LBB0_4:
Lloh17:
	adrp	x8, _DSI_START_HSC@GOTPAGE
Lloh18:
	ldr	x8, [x8, _DSI_START_HSC@GOTPAGEOFF]
Lloh19:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_sun6i_dsi_start
	mov	w0, #1000
	bl	_udelay
Lloh20:
	adrp	x8, _DSI_START_HSD@GOTPAGE
Lloh21:
	ldr	x8, [x8, _DSI_START_HSD@GOTPAGEOFF]
Lloh22:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_sun6i_dsi_start
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
	.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 AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Enabling DSI output\n"

	.comm	_SUN6I_DSI_BASIC_CTL1_REG,4,2   ; @SUN6I_DSI_BASIC_CTL1_REG
	.comm	_SUN6I_DSI_BASIC_CTL1_VIDEO_FILL,4,2 ; @SUN6I_DSI_BASIC_CTL1_VIDEO_FILL
	.comm	_SUN6I_DSI_BASIC_CTL1_VIDEO_PRECISION,4,2 ; @SUN6I_DSI_BASIC_CTL1_VIDEO_PRECISION
	.comm	_SUN6I_DSI_BASIC_CTL1_VIDEO_MODE,4,2 ; @SUN6I_DSI_BASIC_CTL1_VIDEO_MODE
	.comm	_PHY_MODE_MIPI_DPHY,4,2         ; @PHY_MODE_MIPI_DPHY
	.comm	_DSI_START_HSC,4,2              ; @DSI_START_HSC
	.comm	_DSI_START_HSD,4,2              ; @DSI_START_HSD
	.no_dead_strip	_sun6i_dsi_encoder_enable
.subsections_via_symbols
