	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function imx_ldb_connector_get_modes
_imx_ldb_connector_get_modes:           ## @imx_ldb_connector_get_modes
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r14
	callq	_con_to_imx_ldb_ch
	movq	%rax, %r15
	movl	32(%rax), %edi
	callq	_drm_panel_get_modes
	movl	%eax, %ebx
	testl	%eax, %eax
	jle	LBB0_1
LBB0_9:
	movl	%ebx, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_1:
	movq	16(%r15), %rsi
	testq	%rsi, %rsi
	je	LBB0_2
LBB0_4:
	movq	%r14, %rdi
	callq	_drm_connector_update_edid_property
	movq	16(%r15), %rsi
	movq	%r14, %rdi
	callq	_drm_add_edid_modes
	movl	%eax, %ebx
LBB0_5:
	cmpq	$0, 8(%r15)
	je	LBB0_9
## %bb.6:
	movl	(%r14), %edi
	callq	_drm_mode_create
	testq	%rax, %rax
	je	LBB0_7
## %bb.8:
	movq	%rax, %r12
	movq	%rax, %rdi
	movq	%r15, %rsi
	callq	_drm_mode_copy
	movq	_DRM_MODE_TYPE_DRIVER@GOTPCREL(%rip), %rax
	movq	_DRM_MODE_TYPE_PREFERRED@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	orl	(%rax), %ecx
	orl	%ecx, (%r12)
	movq	%r14, %rdi
	movq	%r12, %rsi
	callq	_drm_mode_probed_add
	incl	%ebx
	jmp	LBB0_9
LBB0_2:
	movq	24(%r15), %rsi
	testq	%rsi, %rsi
	je	LBB0_5
## %bb.3:
	movq	%r14, %rdi
	callq	_drm_get_edid
	movq	%rax, %rsi
	movq	%rax, 16(%r15)
	testq	%rax, %rax
	jne	LBB0_4
	jmp	LBB0_5
LBB0_7:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_9
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_DRM_MODE_TYPE_DRIVER,4,2       ## @DRM_MODE_TYPE_DRIVER
	.comm	_DRM_MODE_TYPE_PREFERRED,4,2    ## @DRM_MODE_TYPE_PREFERRED
	.no_dead_strip	_imx_ldb_connector_get_modes
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function imx_ldb_connector_get_modes
_imx_ldb_connector_get_modes:           ; @imx_ldb_connector_get_modes
	.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
	bl	_con_to_imx_ldb_ch
	mov	x21, x0
	ldr	w0, [x0, #32]
	bl	_drm_panel_get_modes
	mov	x20, x0
	cmp	w0, #0
	b.le	LBB0_2
LBB0_1:
	mov	x0, x20
	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_2:
	ldr	x1, [x21, #16]
	cbz	x1, LBB0_7
LBB0_3:
	mov	x0, x19
	bl	_drm_connector_update_edid_property
	ldr	x1, [x21, #16]
	mov	x0, x19
	bl	_drm_add_edid_modes
	mov	x20, x0
LBB0_4:
	ldr	x8, [x21, #8]
	cbz	x8, LBB0_1
; %bb.5:
	ldr	w0, [x19]
	bl	_drm_mode_create
	cbz	x0, LBB0_9
; %bb.6:
	mov	x22, x0
	mov	x1, x21
	bl	_drm_mode_copy
Lloh0:
	adrp	x8, _DRM_MODE_TYPE_DRIVER@GOTPAGE
Lloh1:
	ldr	x8, [x8, _DRM_MODE_TYPE_DRIVER@GOTPAGEOFF]
Lloh2:
	adrp	x9, _DRM_MODE_TYPE_PREFERRED@GOTPAGE
Lloh3:
	ldr	x9, [x9, _DRM_MODE_TYPE_PREFERRED@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
Lloh5:
	ldr	w9, [x9]
	orr	w8, w9, w8
	ldr	w9, [x22]
	orr	w8, w8, w9
	str	w8, [x22]
	mov	x0, x19
	mov	x1, x22
	bl	_drm_mode_probed_add
	add	w20, w20, #1
	b	LBB0_1
LBB0_7:
	ldr	x1, [x21, #24]
	cbz	x1, LBB0_4
; %bb.8:
	mov	x0, x19
	bl	_drm_get_edid
	mov	x1, x0
	str	x0, [x21, #16]
	cbnz	x0, LBB0_3
	b	LBB0_4
LBB0_9:
Lloh6:
	adrp	x8, _EINVAL@GOTPAGE
Lloh7:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	neg	w20, w8
	b	LBB0_1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh4
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_DRM_MODE_TYPE_DRIVER,4,2       ; @DRM_MODE_TYPE_DRIVER
	.comm	_DRM_MODE_TYPE_PREFERRED,4,2    ; @DRM_MODE_TYPE_PREFERRED
	.no_dead_strip	_imx_ldb_connector_get_modes
.subsections_via_symbols
