	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function imx_ldb_encoder_enable
_imx_ldb_encoder_enable:                ## @imx_ldb_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, %rbx
	callq	_enc_to_imx_ldb_ch
	movq	%rax, %r15
	movq	16(%rax), %r12
	movq	_LDB_SPLIT_MODE_EN@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
	movl	12(%r15), %edi
	movl	(%r12), %r13d
	movq	%rbx, %rsi
	callq	_drm_of_encoder_active_port_id
	movl	%eax, %ebx
	movl	8(%r15), %edi
	callq	_drm_panel_prepare
	movq	24(%r12), %rax
	movq	32(%r12), %rcx
	movl	%ebx, -44(%rbp)                 ## 4-byte Spill
	movslq	%ebx, %rbx
	movl	(%rcx,%rbx,4), %edi
	andl	%r14d, %r13d
	je	LBB0_2
## %bb.1:
	movl	(%rax), %esi
	callq	_clk_set_parent
	movq	24(%r12), %rax
	movq	32(%r12), %rcx
	movl	(%rcx,%rbx,4), %edi
	movl	4(%rax), %esi
	callq	_clk_set_parent
	movq	24(%r12), %rax
	movl	(%rax), %edi
	callq	_clk_prepare_enable
	movq	24(%r12), %rax
	movl	4(%rax), %edi
	callq	_clk_prepare_enable
	movq	16(%r12), %rcx
	cmpq	%rcx, %r15
	sete	%al
LBB0_4:
	movl	-44(%rbp), %ebx                 ## 4-byte Reload
	movq	_LDB_CH0_MODE_EN_MASK@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	notl	%edx
	andl	(%r12), %edx
	movl	%edx, (%r12)
	movq	_LDB_CH0_MODE_EN_TO_DI0@GOTPCREL(%rip), %rsi
	testl	%ebx, %ebx
	je	LBB0_8
## %bb.5:
	cmpq	$0, 8(%r12)
	jne	LBB0_8
## %bb.6:
	cmpl	$1, %ebx
	jne	LBB0_9
## %bb.7:
	movq	_LDB_CH0_MODE_EN_TO_DI1@GOTPCREL(%rip), %rsi
LBB0_8:
	orl	(%rsi), %edx
	movl	%edx, (%r12)
	jmp	LBB0_9
LBB0_2:
	movq	(%r15), %rcx
	movl	(%rax,%rcx,4), %esi
	callq	_clk_set_parent
	movq	16(%r12), %rcx
	cmpq	%rcx, %r15
	je	LBB0_3
## %bb.21:
	xorl	%eax, %eax
	movl	-44(%rbp), %ebx                 ## 4-byte Reload
LBB0_9:
	addq	$24, %rcx
	cmpq	%rcx, %r15
	je	LBB0_11
## %bb.10:
	testl	%r13d, %r13d
	je	LBB0_16
LBB0_11:
	movq	_LDB_CH1_MODE_EN_MASK@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	notl	%ecx
	andl	(%r12), %ecx
	movl	%ecx, (%r12)
	movq	_LDB_CH1_MODE_EN_TO_DI1@GOTPCREL(%rip), %rdx
	cmpl	$1, %ebx
	je	LBB0_15
## %bb.12:
	cmpq	$0, 8(%r12)
	je	LBB0_13
LBB0_15:
	orl	(%rdx), %ecx
	movl	%ecx, (%r12)
LBB0_16:
	movq	8(%r12), %rcx
	testq	%rcx, %rcx
	je	LBB0_20
## %bb.17:
	testb	%al, %al
	jne	LBB0_19
## %bb.18:
	addq	$12, %rcx
LBB0_19:
	movl	4(%r12), %edi
	movl	8(%rcx), %esi
	movl	4(%rcx), %edx
	movb	(%rcx), %cl
	shll	%cl, %ebx
	movl	%ebx, %ecx
	callq	_regmap_update_bits
LBB0_20:
	movl	(%r12), %edx
	movl	4(%r12), %edi
	movq	_IOMUXC_GPR2@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_regmap_write
	movl	8(%r15), %edi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_drm_panel_enable               ## TAILCALL
LBB0_3:
	movb	$1, %al
	movq	%r15, %rcx
	jmp	LBB0_4
LBB0_13:
	testl	%ebx, %ebx
	jne	LBB0_16
## %bb.14:
	movq	_LDB_CH1_MODE_EN_TO_DI0@GOTPCREL(%rip), %rdx
	jmp	LBB0_15
	.cfi_endproc
                                        ## -- End function
	.comm	_LDB_SPLIT_MODE_EN,4,2          ## @LDB_SPLIT_MODE_EN
	.comm	_LDB_CH0_MODE_EN_MASK,4,2       ## @LDB_CH0_MODE_EN_MASK
	.comm	_LDB_CH0_MODE_EN_TO_DI0,4,2     ## @LDB_CH0_MODE_EN_TO_DI0
	.comm	_LDB_CH0_MODE_EN_TO_DI1,4,2     ## @LDB_CH0_MODE_EN_TO_DI1
	.comm	_LDB_CH1_MODE_EN_MASK,4,2       ## @LDB_CH1_MODE_EN_MASK
	.comm	_LDB_CH1_MODE_EN_TO_DI1,4,2     ## @LDB_CH1_MODE_EN_TO_DI1
	.comm	_LDB_CH1_MODE_EN_TO_DI0,4,2     ## @LDB_CH1_MODE_EN_TO_DI0
	.comm	_IOMUXC_GPR2,4,2                ## @IOMUXC_GPR2
	.no_dead_strip	_imx_ldb_encoder_enable
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function imx_ldb_encoder_enable
_imx_ldb_encoder_enable:                ; @imx_ldb_encoder_enable
	.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, x0
	bl	_enc_to_imx_ldb_ch
	mov	x19, x0
	ldr	x21, [x0, #16]
	ldr	w8, [x21]
Lloh0:
	adrp	x9, _LDB_SPLIT_MODE_EN@GOTPAGE
Lloh1:
	ldr	x9, [x9, _LDB_SPLIT_MODE_EN@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	and	w23, w9, w8
	ldr	w0, [x0, #12]
	mov	x1, x20
	bl	_drm_of_encoder_active_port_id
	mov	x20, x0
	ldr	w0, [x19, #8]
	bl	_drm_panel_prepare
	sxtw	x22, w20
	ldp	x8, x9, [x21, #24]
	ldr	w0, [x9, w20, sxtw #2]
	cbz	w23, LBB0_6
; %bb.1:
	ldr	w1, [x8]
	bl	_clk_set_parent
	ldp	x9, x8, [x21, #24]
	ldr	w0, [x8, x22, lsl #2]
	ldr	w1, [x9, #4]
	bl	_clk_set_parent
	ldr	x8, [x21, #24]
	ldr	w0, [x8]
	bl	_clk_prepare_enable
	ldr	x8, [x21, #24]
	ldr	w0, [x8, #4]
	bl	_clk_prepare_enable
	ldr	x9, [x21, #16]
	cmp	x19, x9
	cset	w8, eq
LBB0_2:
Lloh3:
	adrp	x10, _LDB_CH0_MODE_EN_MASK@GOTPAGE
Lloh4:
	ldr	x10, [x10, _LDB_CH0_MODE_EN_MASK@GOTPAGEOFF]
Lloh5:
	ldr	w10, [x10]
	ldr	w11, [x21]
	bic	w10, w11, w10
	str	w10, [x21]
	cbz	w22, LBB0_4
; %bb.3:
	ldr	x11, [x21, #8]
	cbz	x11, LBB0_8
LBB0_4:
Lloh6:
	adrp	x11, _LDB_CH0_MODE_EN_TO_DI0@GOTPAGE
Lloh7:
	ldr	x11, [x11, _LDB_CH0_MODE_EN_TO_DI0@GOTPAGEOFF]
LBB0_5:
	ldr	w11, [x11]
	orr	w10, w11, w10
	str	w10, [x21]
	b	LBB0_10
LBB0_6:
	ldr	x9, [x19]
	ldr	w1, [x8, x9, lsl #2]
	bl	_clk_set_parent
	ldr	x9, [x21, #16]
	cmp	x19, x9
	b.eq	LBB0_18
; %bb.7:
	mov	w8, #0
	b	LBB0_10
LBB0_8:
	cmp	w22, #1
	b.ne	LBB0_10
; %bb.9:
Lloh8:
	adrp	x11, _LDB_CH0_MODE_EN_TO_DI1@GOTPAGE
Lloh9:
	ldr	x11, [x11, _LDB_CH0_MODE_EN_TO_DI1@GOTPAGEOFF]
	b	LBB0_5
LBB0_10:
	add	x9, x9, #24
	cmp	x19, x9
	ccmp	w23, #0, #0, ne
	b.eq	LBB0_15
; %bb.11:
Lloh10:
	adrp	x9, _LDB_CH1_MODE_EN_MASK@GOTPAGE
Lloh11:
	ldr	x9, [x9, _LDB_CH1_MODE_EN_MASK@GOTPAGEOFF]
Lloh12:
	ldr	w9, [x9]
	ldr	w10, [x21]
	bic	w9, w10, w9
	str	w9, [x21]
	cmp	w22, #1
	b.eq	LBB0_13
; %bb.12:
	ldr	x10, [x21, #8]
	cbz	x10, LBB0_19
LBB0_13:
Lloh13:
	adrp	x10, _LDB_CH1_MODE_EN_TO_DI1@GOTPAGE
Lloh14:
	ldr	x10, [x10, _LDB_CH1_MODE_EN_TO_DI1@GOTPAGEOFF]
LBB0_14:
	ldr	w10, [x10]
	orr	w9, w10, w9
	str	w9, [x21]
LBB0_15:
	ldr	x9, [x21, #8]
	cbz	x9, LBB0_17
; %bb.16:
	add	x10, x9, #12
	tst	w8, #0x1
	csel	x8, x9, x10, ne
	ldr	w0, [x21, #4]
	ldp	w2, w1, [x8, #4]
	ldr	w8, [x8]
	lsl	w3, w22, w8
	bl	_regmap_update_bits
LBB0_17:
Lloh15:
	adrp	x8, _IOMUXC_GPR2@GOTPAGE
Lloh16:
	ldr	x8, [x8, _IOMUXC_GPR2@GOTPAGEOFF]
Lloh17:
	ldr	w1, [x8]
	ldp	w2, w0, [x21]
	bl	_regmap_write
	ldr	w0, [x19, #8]
	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	_drm_panel_enable
LBB0_18:
	mov	w8, #1
	mov	x9, x19
	b	LBB0_2
LBB0_19:
	cbnz	w22, LBB0_15
; %bb.20:
Lloh18:
	adrp	x10, _LDB_CH1_MODE_EN_TO_DI0@GOTPAGE
Lloh19:
	ldr	x10, [x10, _LDB_CH1_MODE_EN_TO_DI0@GOTPAGEOFF]
	b	LBB0_14
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGot	Lloh18, Lloh19
	.cfi_endproc
                                        ; -- End function
	.comm	_LDB_SPLIT_MODE_EN,4,2          ; @LDB_SPLIT_MODE_EN
	.comm	_LDB_CH0_MODE_EN_MASK,4,2       ; @LDB_CH0_MODE_EN_MASK
	.comm	_LDB_CH0_MODE_EN_TO_DI0,4,2     ; @LDB_CH0_MODE_EN_TO_DI0
	.comm	_LDB_CH0_MODE_EN_TO_DI1,4,2     ; @LDB_CH0_MODE_EN_TO_DI1
	.comm	_LDB_CH1_MODE_EN_MASK,4,2       ; @LDB_CH1_MODE_EN_MASK
	.comm	_LDB_CH1_MODE_EN_TO_DI1,4,2     ; @LDB_CH1_MODE_EN_TO_DI1
	.comm	_LDB_CH1_MODE_EN_TO_DI0,4,2     ; @LDB_CH1_MODE_EN_TO_DI0
	.comm	_IOMUXC_GPR2,4,2                ; @IOMUXC_GPR2
	.no_dead_strip	_imx_ldb_encoder_enable
.subsections_via_symbols
