	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal16,16byte_literals
	.p2align	4                               ## -- Begin function tve200_modeset_init
LCPI0_0:
	.long	352                             ## 0x160
	.long	720                             ## 0x2d0
	.long	240                             ## 0xf0
	.long	576                             ## 0x240
	.section	__TEXT,__text,regular,pure_instructions
	.p2align	4, 0x90
_tve200_modeset_init:                   ## @tve200_modeset_init
	.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
	subq	$24, %rsp
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	movq	32(%rdi), %r15
	callq	_drm_mode_config_init
	movq	_mode_config_funcs@GOTPCREL(%rip), %rax
	movq	%rax, 24(%rbx)
	movaps	LCPI0_0(%rip), %xmm0            ## xmm0 = [352,720,240,576]
	movups	%xmm0, 8(%rbx)
	movq	(%rbx), %rax
	movl	(%rax), %edi
	leaq	-40(%rbp), %rcx
	leaq	-32(%rbp), %r8
	xorl	%esi, %esi
	xorl	%edx, %edx
	callq	_drm_of_find_panel_or_bridge
	movl	%eax, %r14d
	testl	%eax, %eax
	je	LBB0_2
## %bb.1:
	movq	_ENODEV@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	addl	%r14d, %eax
	jne	LBB0_17
LBB0_2:
	movq	-40(%rbp), %rdi
	testq	%rdi, %rdi
	je	LBB0_12
## %bb.3:
	movq	_DRM_MODE_CONNECTOR_Unknown@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_drm_panel_bridge_add
	movq	%rax, -32(%rbp)
	movq	%rax, %rdi
	callq	_IS_ERR
	testq	%rax, %rax
	je	LBB0_5
## %bb.4:
	movq	-32(%rbp), %rdi
	callq	_PTR_ERR
	movl	%eax, %r14d
	cmpq	$0, -40(%rbp)
	jne	LBB0_15
	jmp	LBB0_16
LBB0_12:
	movq	(%rbx), %rdi
	leaq	L_.str(%rip), %rsi
	jmp	LBB0_13
LBB0_5:
	movq	%rbx, %rdi
	callq	_tve200_display_init
	testl	%eax, %eax
	je	LBB0_7
## %bb.6:
	movl	%eax, %r14d
	movq	(%rbx), %rdi
	leaq	L_.str.1(%rip), %rsi
	jmp	LBB0_13
LBB0_7:
	leaq	24(%r15), %rdi
	movq	-32(%rbp), %rsi
	callq	_drm_simple_display_pipe_attach_bridge
	testl	%eax, %eax
	je	LBB0_9
## %bb.8:
	movl	%eax, %r14d
	movq	(%rbx), %rdi
	leaq	L_.str.2(%rip), %rsi
	jmp	LBB0_13
LBB0_9:
	movq	-40(%rbp), %rax
	movq	%rax, 16(%r15)
	movl	4(%rax), %eax
	movl	%eax, 8(%r15)
	movq	-32(%rbp), %rax
	movq	%rax, (%r15)
	movq	(%rbx), %r14
	movq	-40(%rbp), %rax
	movl	(%rax), %edi
	callq	_dev_name
	leaq	L_.str.3(%rip), %rsi
	movq	%r14, %rdi
	movl	%eax, %edx
	callq	_dev_info
	movq	%rbx, %rdi
	movl	$1, %esi
	callq	_drm_vblank_init
	testl	%eax, %eax
	je	LBB0_11
## %bb.10:
	movl	%eax, %r14d
	movq	(%rbx), %rdi
	leaq	L_.str.4(%rip), %rsi
LBB0_13:
	callq	_dev_err
	cmpq	$0, -40(%rbp)
	je	LBB0_16
LBB0_15:
	movq	-32(%rbp), %rdi
	callq	_drm_panel_bridge_remove
LBB0_16:
	movq	%rbx, %rdi
	callq	_drm_mode_config_cleanup
LBB0_17:
	movl	%r14d, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_11:
	movq	%rbx, %rdi
	callq	_drm_mode_config_reset
	movq	%rbx, %rdi
	callq	_drm_kms_helper_poll_init
	xorl	%r14d, %r14d
	jmp	LBB0_17
	.cfi_endproc
                                        ## -- End function
	.comm	_mode_config_funcs,4,2          ## @mode_config_funcs
	.comm	_ENODEV,4,2                     ## @ENODEV
	.comm	_DRM_MODE_CONNECTOR_Unknown,4,2 ## @DRM_MODE_CONNECTOR_Unknown
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"the bridge is not a panel\n"

L_.str.1:                               ## @.str.1
	.asciz	"failed to init display\n"

L_.str.2:                               ## @.str.2
	.asciz	"failed to attach bridge\n"

L_.str.3:                               ## @.str.3
	.asciz	"attached to panel %s\n"

L_.str.4:                               ## @.str.4
	.asciz	"failed to init vblank\n"

	.no_dead_strip	_tve200_modeset_init
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal16,16byte_literals
	.p2align	4                               ; -- Begin function tve200_modeset_init
lCPI0_0:
	.long	352                             ; 0x160
	.long	720                             ; 0x2d0
	.long	240                             ; 0xf0
	.long	576                             ; 0x240
	.section	__TEXT,__text,regular,pure_instructions
	.p2align	2
_tve200_modeset_init:                   ; @tve200_modeset_init
	.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
	mov	x19, x0
	ldr	x21, [x0, #32]
	bl	_drm_mode_config_init
Lloh0:
	adrp	x8, _mode_config_funcs@GOTPAGE
Lloh1:
	ldr	x8, [x8, _mode_config_funcs@GOTPAGEOFF]
	str	x8, [x19, #24]
Lloh2:
	adrp	x8, lCPI0_0@PAGE
Lloh3:
	ldr	q0, [x8, lCPI0_0@PAGEOFF]
	stur	q0, [x19, #8]
	ldr	x8, [x19]
	ldr	w0, [x8]
	add	x3, sp, #8
	mov	x4, sp
	mov	w1, #0
	mov	w2, #0
	bl	_drm_of_find_panel_or_bridge
	mov	x20, x0
	cbz	w0, LBB0_2
; %bb.1:
Lloh4:
	adrp	x8, _ENODEV@GOTPAGE
Lloh5:
	ldr	x8, [x8, _ENODEV@GOTPAGEOFF]
Lloh6:
	ldr	w8, [x8]
	cmn	w20, w8
	b.ne	LBB0_15
LBB0_2:
	ldr	x0, [sp, #8]
	cbz	x0, LBB0_5
; %bb.3:
Lloh7:
	adrp	x8, _DRM_MODE_CONNECTOR_Unknown@GOTPAGE
Lloh8:
	ldr	x8, [x8, _DRM_MODE_CONNECTOR_Unknown@GOTPAGEOFF]
Lloh9:
	ldr	w1, [x8]
	bl	_drm_panel_bridge_add
	str	x0, [sp]
	bl	_IS_ERR
	cbz	x0, LBB0_6
; %bb.4:
	ldr	x0, [sp]
	bl	_PTR_ERR
	mov	x20, x0
	ldr	x8, [sp, #8]
	cbnz	x8, LBB0_13
	b	LBB0_14
LBB0_5:
	ldr	x0, [x19]
Lloh10:
	adrp	x1, l_.str@PAGE
Lloh11:
	add	x1, x1, l_.str@PAGEOFF
	b	LBB0_12
LBB0_6:
	mov	x0, x19
	bl	_tve200_display_init
	cbz	w0, LBB0_8
; %bb.7:
	mov	x20, x0
	ldr	x0, [x19]
Lloh12:
	adrp	x1, l_.str.1@PAGE
Lloh13:
	add	x1, x1, l_.str.1@PAGEOFF
	b	LBB0_12
LBB0_8:
	add	x0, x21, #24
	ldr	x1, [sp]
	bl	_drm_simple_display_pipe_attach_bridge
	cbz	w0, LBB0_10
; %bb.9:
	mov	x20, x0
	ldr	x0, [x19]
Lloh14:
	adrp	x1, l_.str.2@PAGE
Lloh15:
	add	x1, x1, l_.str.2@PAGEOFF
	b	LBB0_12
LBB0_10:
	ldr	x8, [sp, #8]
	str	x8, [x21, #16]
	ldr	w8, [x8, #4]
	str	w8, [x21, #8]
	ldr	x8, [sp]
	str	x8, [x21]
	ldr	x20, [x19]
	ldr	x8, [sp, #8]
	ldr	w0, [x8]
	bl	_dev_name
	mov	x2, x0
Lloh16:
	adrp	x1, l_.str.3@PAGE
Lloh17:
	add	x1, x1, l_.str.3@PAGEOFF
	mov	x0, x20
	bl	_dev_info
	mov	x0, x19
	mov	w1, #1
	bl	_drm_vblank_init
	mov	x20, x0
	cbz	w0, LBB0_16
; %bb.11:
	ldr	x0, [x19]
Lloh18:
	adrp	x1, l_.str.4@PAGE
Lloh19:
	add	x1, x1, l_.str.4@PAGEOFF
LBB0_12:
	bl	_dev_err
	ldr	x8, [sp, #8]
	cbz	x8, LBB0_14
LBB0_13:
	ldr	x0, [sp]
	bl	_drm_panel_bridge_remove
LBB0_14:
	mov	x0, x19
	bl	_drm_mode_config_cleanup
LBB0_15:
	mov	x0, x20
	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
LBB0_16:
	mov	x0, x19
	bl	_drm_mode_config_reset
	mov	x0, x19
	bl	_drm_kms_helper_poll_init
	b	LBB0_15
	.loh AdrpLdr	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpAdd	Lloh18, Lloh19
	.cfi_endproc
                                        ; -- End function
	.comm	_mode_config_funcs,4,2          ; @mode_config_funcs
	.comm	_ENODEV,4,2                     ; @ENODEV
	.comm	_DRM_MODE_CONNECTOR_Unknown,4,2 ; @DRM_MODE_CONNECTOR_Unknown
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"the bridge is not a panel\n"

l_.str.1:                               ; @.str.1
	.asciz	"failed to init display\n"

l_.str.2:                               ; @.str.2
	.asciz	"failed to attach bridge\n"

l_.str.3:                               ; @.str.3
	.asciz	"attached to panel %s\n"

l_.str.4:                               ; @.str.4
	.asciz	"failed to init vblank\n"

	.no_dead_strip	_tve200_modeset_init
.subsections_via_symbols
