	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function imx_ldb_register
_imx_ldb_register:                      ## @imx_ldb_register
	.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	%rsi, %r12
	movq	%rdi, %r15
	movq	40(%rsi), %r13
	leaq	32(%rsi), %r14
	movl	36(%rsi), %edx
	movq	%r14, %rsi
	callq	_imx_drm_encoder_parse_of
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_11
## %bb.1:
	movl	(%r12), %esi
	movq	%r13, %rdi
	callq	_imx_ldb_get_clk
	movl	%eax, %ebx
	testl	%eax, %eax
	je	LBB0_2
LBB0_11:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_2:
	movq	_LDB_SPLIT_MODE_EN@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, (%r13)
	je	LBB0_4
## %bb.3:
	movq	%r13, %rdi
	movl	$1, %esi
	callq	_imx_ldb_get_clk
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_11
LBB0_4:
	movq	_imx_ldb_encoder_helper_funcs@GOTPCREL(%rip), %rsi
	movq	%r14, %rdi
	callq	_drm_encoder_helper_add
	movq	_DRM_MODE_ENCODER_LVDS@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	_imx_ldb_encoder_funcs@GOTPCREL(%rip), %rdx
	movq	%r15, %rdi
	movq	%r14, %rsi
	xorl	%r8d, %r8d
	callq	_drm_encoder_init
	movq	24(%r12), %rsi
	testq	%rsi, %rsi
	je	LBB0_7
## %bb.5:
	movq	%r14, %rdi
	xorl	%edx, %edx
	callq	_drm_bridge_attach
	testl	%eax, %eax
	je	LBB0_8
## %bb.6:
	movl	%eax, %ebx
	leaq	L_.str(%rip), %rdi
	callq	_DRM_ERROR
	jmp	LBB0_11
LBB0_7:
	leaq	4(%r12), %rbx
	movq	_imx_ldb_connector_helper_funcs@GOTPCREL(%rip), %rsi
	movq	%rbx, %rdi
	callq	_drm_connector_helper_add
	movq	_DRM_MODE_CONNECTOR_LVDS@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movl	16(%r12), %r8d
	movq	_imx_ldb_connector_funcs@GOTPCREL(%rip), %rdx
	movq	%r15, %rdi
	movq	%rbx, %rsi
	callq	_drm_connector_init_with_ddc
	movq	%rbx, %rdi
	movq	%r14, %rsi
	callq	_drm_connector_attach_encoder
LBB0_8:
	movq	8(%r12), %rdi
	testq	%rdi, %rdi
	je	LBB0_10
## %bb.9:
	addq	$4, %r12
	movq	%r12, %rsi
	callq	_drm_panel_attach
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_11
LBB0_10:
	xorl	%ebx, %ebx
	jmp	LBB0_11
	.cfi_endproc
                                        ## -- End function
	.comm	_LDB_SPLIT_MODE_EN,4,2          ## @LDB_SPLIT_MODE_EN
	.comm	_imx_ldb_encoder_helper_funcs,4,2 ## @imx_ldb_encoder_helper_funcs
	.comm	_imx_ldb_encoder_funcs,4,2      ## @imx_ldb_encoder_funcs
	.comm	_DRM_MODE_ENCODER_LVDS,4,2      ## @DRM_MODE_ENCODER_LVDS
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Failed to initialize bridge with drm\n"

	.comm	_imx_ldb_connector_helper_funcs,4,2 ## @imx_ldb_connector_helper_funcs
	.comm	_imx_ldb_connector_funcs,4,2    ## @imx_ldb_connector_funcs
	.comm	_DRM_MODE_CONNECTOR_LVDS,4,2    ## @DRM_MODE_CONNECTOR_LVDS
	.no_dead_strip	_imx_ldb_register
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function imx_ldb_register
_imx_ldb_register:                      ; @imx_ldb_register
	.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	x19, x1
	mov	x21, x0
	ldr	x22, [x1, #40]
	add	x20, x1, #32
	ldr	w2, [x1, #36]
	mov	x1, x20
	bl	_imx_drm_encoder_parse_of
	mov	x23, x0
	cbnz	w0, LBB0_2
; %bb.1:
	ldr	w1, [x19]
	mov	x0, x22
	bl	_imx_ldb_get_clk
	mov	x23, x0
	cbz	w0, LBB0_3
LBB0_2:
	mov	x0, x23
	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
	ret
LBB0_3:
	ldr	w8, [x22]
Lloh0:
	adrp	x9, _LDB_SPLIT_MODE_EN@GOTPAGE
Lloh1:
	ldr	x9, [x9, _LDB_SPLIT_MODE_EN@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_5
; %bb.4:
	mov	x0, x22
	mov	w1, #1
	bl	_imx_ldb_get_clk
	mov	x23, x0
	cbnz	w0, LBB0_2
LBB0_5:
Lloh3:
	adrp	x1, _imx_ldb_encoder_helper_funcs@GOTPAGE
Lloh4:
	ldr	x1, [x1, _imx_ldb_encoder_helper_funcs@GOTPAGEOFF]
	mov	x0, x20
	bl	_drm_encoder_helper_add
Lloh5:
	adrp	x8, _DRM_MODE_ENCODER_LVDS@GOTPAGE
Lloh6:
	ldr	x8, [x8, _DRM_MODE_ENCODER_LVDS@GOTPAGEOFF]
Lloh7:
	ldr	w3, [x8]
Lloh8:
	adrp	x2, _imx_ldb_encoder_funcs@GOTPAGE
Lloh9:
	ldr	x2, [x2, _imx_ldb_encoder_funcs@GOTPAGEOFF]
	mov	x0, x21
	mov	x1, x20
	mov	x4, #0
	bl	_drm_encoder_init
	ldr	x1, [x19, #24]
	cbz	x1, LBB0_8
; %bb.6:
	mov	x0, x20
	mov	x2, #0
	bl	_drm_bridge_attach
	cbz	w0, LBB0_9
; %bb.7:
	mov	x23, x0
Lloh10:
	adrp	x0, l_.str@PAGE
Lloh11:
	add	x0, x0, l_.str@PAGEOFF
	bl	_DRM_ERROR
	b	LBB0_2
LBB0_8:
	add	x22, x19, #4
Lloh12:
	adrp	x1, _imx_ldb_connector_helper_funcs@GOTPAGE
Lloh13:
	ldr	x1, [x1, _imx_ldb_connector_helper_funcs@GOTPAGEOFF]
	mov	x0, x22
	bl	_drm_connector_helper_add
Lloh14:
	adrp	x8, _DRM_MODE_CONNECTOR_LVDS@GOTPAGE
Lloh15:
	ldr	x8, [x8, _DRM_MODE_CONNECTOR_LVDS@GOTPAGEOFF]
Lloh16:
	ldr	w3, [x8]
	ldr	w4, [x19, #16]
Lloh17:
	adrp	x2, _imx_ldb_connector_funcs@GOTPAGE
Lloh18:
	ldr	x2, [x2, _imx_ldb_connector_funcs@GOTPAGEOFF]
	mov	x0, x21
	mov	x1, x22
	bl	_drm_connector_init_with_ddc
	mov	x0, x22
	mov	x1, x20
	bl	_drm_connector_attach_encoder
LBB0_9:
	ldr	x0, [x19, #8]
	cbz	x0, LBB0_11
; %bb.10:
	add	x1, x19, #4
	bl	_drm_panel_attach
	mov	x23, x0
	cbnz	w0, LBB0_2
LBB0_11:
	mov	w23, #0
	b	LBB0_2
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGot	Lloh12, Lloh13
	.cfi_endproc
                                        ; -- End function
	.comm	_LDB_SPLIT_MODE_EN,4,2          ; @LDB_SPLIT_MODE_EN
	.comm	_imx_ldb_encoder_helper_funcs,4,2 ; @imx_ldb_encoder_helper_funcs
	.comm	_imx_ldb_encoder_funcs,4,2      ; @imx_ldb_encoder_funcs
	.comm	_DRM_MODE_ENCODER_LVDS,4,2      ; @DRM_MODE_ENCODER_LVDS
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Failed to initialize bridge with drm\n"

	.comm	_imx_ldb_connector_helper_funcs,4,2 ; @imx_ldb_connector_helper_funcs
	.comm	_imx_ldb_connector_funcs,4,2    ; @imx_ldb_connector_funcs
	.comm	_DRM_MODE_CONNECTOR_LVDS,4,2    ; @DRM_MODE_CONNECTOR_LVDS
	.no_dead_strip	_imx_ldb_register
.subsections_via_symbols
