	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function imx_ldb_encoder_disable
_imx_ldb_encoder_disable:               ## @imx_ldb_encoder_disable
	.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
	callq	_enc_to_imx_ldb_ch
	movq	%rax, %r14
	movq	8(%rax), %r15
	movl	(%rax), %edi
	callq	_drm_panel_disable
	movq	24(%r15), %rax
	cmpq	%rax, %r14
	je	LBB0_1
## %bb.2:
	addq	$16, %rax
	cmpq	%rax, %r14
	je	LBB0_4
## %bb.3:
	movl	(%r15), %edx
	jmp	LBB0_6
LBB0_1:
	movq	_LDB_CH0_MODE_EN_MASK@GOTPCREL(%rip), %rax
	jmp	LBB0_5
LBB0_4:
	movq	_LDB_CH1_MODE_EN_MASK@GOTPCREL(%rip), %rax
LBB0_5:
	movl	(%rax), %edx
	notl	%edx
	andl	(%r15), %edx
	movl	%edx, (%r15)
LBB0_6:
	movl	32(%r15), %edi
	movq	_IOMUXC_GPR2@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_regmap_write
	movq	_LDB_SPLIT_MODE_EN@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, (%r15)
	je	LBB0_8
## %bb.7:
	movq	48(%r15), %rax
	movl	(%rax), %edi
	callq	_clk_disable_unprepare
	movq	48(%r15), %rax
	movl	4(%rax), %edi
	callq	_clk_disable_unprepare
LBB0_8:
	movq	24(%r15), %rcx
	movq	40(%r15), %rax
	testq	%rax, %rax
	je	LBB0_10
## %bb.9:
	leaq	16(%rcx), %rdx
	leaq	12(%rax), %rsi
	xorl	%ebx, %ebx
	cmpq	%rdx, %r14
	cmoveq	%rsi, %rbx
	cmpq	%rcx, %r14
	cmoveq	%rax, %rbx
	movl	32(%r15), %edi
	movl	8(%rbx), %esi
	leaq	-28(%rbp), %rdx
	callq	_regmap_read
	movl	-28(%rbp), %eax
	andl	(%rbx), %eax
	movb	4(%rbx), %cl
	sarl	%cl, %eax
	jmp	LBB0_11
LBB0_10:
	xorl	%eax, %eax
	cmpq	%rcx, %r14
	setne	%al
LBB0_11:
	movl	%eax, -28(%rbp)
	movq	8(%r15), %rcx
	movq	16(%r15), %rdx
	cltq
	movl	(%rdx,%rax,4), %edi
	movl	(%rcx,%rax,4), %esi
	callq	_clk_set_parent
	testl	%eax, %eax
	je	LBB0_13
## %bb.12:
	movl	4(%r15), %edi
	movl	-28(%rbp), %edx
	leaq	L_.str(%rip), %rsi
	callq	_dev_err
LBB0_13:
	movl	(%r14), %edi
	callq	_drm_panel_unprepare
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_LDB_CH0_MODE_EN_MASK,4,2       ## @LDB_CH0_MODE_EN_MASK
	.comm	_LDB_CH1_MODE_EN_MASK,4,2       ## @LDB_CH1_MODE_EN_MASK
	.comm	_IOMUXC_GPR2,4,2                ## @IOMUXC_GPR2
	.comm	_LDB_SPLIT_MODE_EN,4,2          ## @LDB_SPLIT_MODE_EN
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"unable to set di%d parent clock to original parent\n"

	.no_dead_strip	_imx_ldb_encoder_disable
.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_disable
_imx_ldb_encoder_disable:               ; @imx_ldb_encoder_disable
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.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
	bl	_enc_to_imx_ldb_ch
	mov	x19, x0
	ldr	x20, [x0, #8]
	ldr	w0, [x0]
	bl	_drm_panel_disable
	ldr	x8, [x20, #24]
	cmp	x19, x8
	b.eq	LBB0_3
; %bb.1:
	add	x8, x8, #16
	cmp	x19, x8
	b.eq	LBB0_4
; %bb.2:
	ldr	w2, [x20]
	b	LBB0_6
LBB0_3:
Lloh0:
	adrp	x8, _LDB_CH0_MODE_EN_MASK@GOTPAGE
Lloh1:
	ldr	x8, [x8, _LDB_CH0_MODE_EN_MASK@GOTPAGEOFF]
	b	LBB0_5
LBB0_4:
Lloh2:
	adrp	x8, _LDB_CH1_MODE_EN_MASK@GOTPAGE
Lloh3:
	ldr	x8, [x8, _LDB_CH1_MODE_EN_MASK@GOTPAGEOFF]
LBB0_5:
	ldr	w8, [x8]
	ldr	w9, [x20]
	bic	w2, w9, w8
	str	w2, [x20]
LBB0_6:
	ldr	w0, [x20, #32]
Lloh4:
	adrp	x8, _IOMUXC_GPR2@GOTPAGE
Lloh5:
	ldr	x8, [x8, _IOMUXC_GPR2@GOTPAGEOFF]
Lloh6:
	ldr	w1, [x8]
	bl	_regmap_write
	ldr	w8, [x20]
Lloh7:
	adrp	x9, _LDB_SPLIT_MODE_EN@GOTPAGE
Lloh8:
	ldr	x9, [x9, _LDB_SPLIT_MODE_EN@GOTPAGEOFF]
Lloh9:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_8
; %bb.7:
	ldr	x8, [x20, #48]
	ldr	w0, [x8]
	bl	_clk_disable_unprepare
	ldr	x8, [x20, #48]
	ldr	w0, [x8, #4]
	bl	_clk_disable_unprepare
LBB0_8:
	ldr	x8, [x20, #40]
	ldr	x9, [x20, #24]
	cbz	x8, LBB0_10
; %bb.9:
	add	x10, x9, #16
	add	x11, x8, #12
	cmp	x19, x10
	csel	x10, x11, xzr, eq
	cmp	x19, x9
	csel	x21, x8, x10, eq
	ldr	w0, [x20, #32]
	ldr	w1, [x21, #8]
	add	x2, sp, #12
	bl	_regmap_read
	ldr	w8, [sp, #12]
	ldp	w9, w10, [x21]
	and	w8, w8, w9
	asr	w8, w8, w10
	b	LBB0_11
LBB0_10:
	cmp	x19, x9
	cset	w8, ne
LBB0_11:
	str	w8, [sp, #12]
	sbfiz	x8, x8, #2, #32
	ldp	x10, x9, [x20, #8]
	ldr	w0, [x9, x8]
	ldr	w1, [x10, x8]
	bl	_clk_set_parent
	cbz	w0, LBB0_13
; %bb.12:
	ldr	w0, [x20, #4]
	ldr	w2, [sp, #12]
Lloh10:
	adrp	x1, l_.str@PAGE
Lloh11:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_err
LBB0_13:
	ldr	w0, [x19]
	bl	_drm_panel_unprepare
	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
	add	sp, sp, #64
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpAdd	Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_LDB_CH0_MODE_EN_MASK,4,2       ; @LDB_CH0_MODE_EN_MASK
	.comm	_LDB_CH1_MODE_EN_MASK,4,2       ; @LDB_CH1_MODE_EN_MASK
	.comm	_IOMUXC_GPR2,4,2                ; @IOMUXC_GPR2
	.comm	_LDB_SPLIT_MODE_EN,4,2          ; @LDB_SPLIT_MODE_EN
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"unable to set di%d parent clock to original parent\n"

	.no_dead_strip	_imx_ldb_encoder_disable
.subsections_via_symbols
