	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function vidi_bind
_vidi_bind:                             ## @vidi_bind
	.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
	subq	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %r12
	movq	%rdi, -48(%rbp)                 ## 8-byte Spill
	callq	_dev_get_drvdata
	movq	%rax, %r15
	xorps	%xmm0, %xmm0
	movaps	%xmm0, -80(%rbp)
	movl	$0, -64(%rbp)
	movq	%r12, 16(%rax)
	movq	_formats@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	%edi, -68(%rbp)
	callq	_ARRAY_SIZE
	movl	%eax, -72(%rbp)
	movq	_WINDOWS_NR@GOTPCREL(%rip), %rax
	cmpl	$0, (%rax)
	je	LBB0_4
## %bb.1:
	xorl	%r13d, %r13d
	xorl	%r14d, %r14d
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movl	%r14d, -80(%rbp)
	movq	_vidi_win_types@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movl	(%rax,%r13), %eax
	movl	%eax, -76(%rbp)
	movq	8(%r15), %rsi
	addq	%r13, %rsi
	movq	%r12, %rdi
	movl	%r14d, %edx
	leaq	-80(%rbp), %rcx
	callq	_exynos_plane_init
	testl	%eax, %eax
	jne	LBB0_10
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	incq	%r14
	movq	_WINDOWS_NR@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	addq	$4, %r13
	cmpq	%rax, %r14
	jb	LBB0_2
LBB0_4:
	movq	_DEFAULT_WIN@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	shlq	$2, %rsi
	addq	8(%r15), %rsi
	movq	_EXYNOS_DISPLAY_TYPE_VIDI@GOTPCREL(%rip), %r14
	movl	(%r14), %edx
	movq	_vidi_crtc_ops@GOTPCREL(%rip), %rcx
	movq	%r12, %rdi
	movq	%r15, %r8
	callq	_exynos_drm_crtc_create
	movl	%eax, (%r15)
	movl	%eax, %edi
	callq	_IS_ERR
	testq	%rax, %rax
	je	LBB0_7
## %bb.5:
	leaq	L_.str(%rip), %rsi
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	xorl	%eax, %eax
	callq	_DRM_DEV_ERROR
	movl	(%r15), %edi
	callq	_PTR_ERR
LBB0_10:
	movl	%eax, %ebx
LBB0_11:
	movl	%ebx, %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_7:
	addq	$24, %r15
	movq	_DRM_MODE_ENCODER_TMDS@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	_exynos_vidi_encoder_funcs@GOTPCREL(%rip), %rdx
	xorl	%ebx, %ebx
	movq	%r12, %rdi
	movq	%r15, %rsi
	xorl	%r8d, %r8d
	callq	_drm_encoder_init
	movq	_exynos_vidi_encoder_helper_funcs@GOTPCREL(%rip), %rsi
	movq	%r15, %rdi
	callq	_drm_encoder_helper_add
	movl	(%r14), %esi
	movq	%r15, %rdi
	callq	_exynos_drm_set_possible_crtcs
	testl	%eax, %eax
	js	LBB0_10
## %bb.8:
	movq	%r15, %rdi
	callq	_vidi_create_connector
	testl	%eax, %eax
	je	LBB0_11
## %bb.9:
	movl	%eax, %r14d
	leaq	L_.str.1(%rip), %rsi
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	movl	%eax, %edx
	xorl	%eax, %eax
	callq	_DRM_DEV_ERROR
	movq	%r15, %rdi
	callq	_drm_encoder_cleanup
	movl	%r14d, %ebx
	jmp	LBB0_11
	.cfi_endproc
                                        ## -- End function
	.comm	_formats,4,2                    ## @formats
	.comm	_WINDOWS_NR,4,2                 ## @WINDOWS_NR
	.comm	_vidi_win_types,8,3             ## @vidi_win_types
	.comm	_DEFAULT_WIN,8,3                ## @DEFAULT_WIN
	.comm	_EXYNOS_DISPLAY_TYPE_VIDI,4,2   ## @EXYNOS_DISPLAY_TYPE_VIDI
	.comm	_vidi_crtc_ops,4,2              ## @vidi_crtc_ops
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"failed to create crtc.\n"

	.comm	_exynos_vidi_encoder_funcs,4,2  ## @exynos_vidi_encoder_funcs
	.comm	_DRM_MODE_ENCODER_TMDS,4,2      ## @DRM_MODE_ENCODER_TMDS
	.comm	_exynos_vidi_encoder_helper_funcs,4,2 ## @exynos_vidi_encoder_helper_funcs
L_.str.1:                               ## @.str.1
	.asciz	"failed to create connector ret = %d\n"

	.no_dead_strip	_vidi_bind
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function vidi_bind
_vidi_bind:                             ; @vidi_bind
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x20, x2
	mov	x19, x0
	bl	_dev_get_drvdata
	mov	x21, x0
	stp	xzr, xzr, [sp, #8]
Lloh0:
	adrp	x8, _formats@GOTPAGE
Lloh1:
	ldr	x8, [x8, _formats@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
	stp	w0, wzr, [sp, #20]
	str	x20, [x21, #16]
	bl	_ARRAY_SIZE
	str	w0, [sp, #16]
Lloh3:
	adrp	x24, _WINDOWS_NR@GOTPAGE
Lloh4:
	ldr	x24, [x24, _WINDOWS_NR@GOTPAGEOFF]
	ldr	w8, [x24]
	cbz	w8, LBB0_4
; %bb.1:
	mov	x25, #0
	mov	x22, #0
Lloh5:
	adrp	x26, _vidi_win_types@GOTPAGE
Lloh6:
	ldr	x26, [x26, _vidi_win_types@GOTPAGEOFF]
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	str	w22, [sp, #8]
	ldr	x8, [x26]
	ldr	w8, [x8, x25]
	str	w8, [sp, #12]
	ldr	x8, [x21, #8]
	add	x1, x8, x25
	add	x3, sp, #8
	mov	x0, x20
	mov	x2, x22
	bl	_exynos_plane_init
	cbnz	w0, LBB0_6
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	add	x22, x22, #1
	ldr	w8, [x24]
	add	x25, x25, #4
	cmp	x22, x8
	b.lo	LBB0_2
LBB0_4:
Lloh7:
	adrp	x8, _DEFAULT_WIN@GOTPAGE
Lloh8:
	ldr	x8, [x8, _DEFAULT_WIN@GOTPAGEOFF]
	ldr	x9, [x21, #8]
Lloh9:
	ldr	x8, [x8]
	add	x1, x9, x8, lsl #2
Lloh10:
	adrp	x22, _EXYNOS_DISPLAY_TYPE_VIDI@GOTPAGE
Lloh11:
	ldr	x22, [x22, _EXYNOS_DISPLAY_TYPE_VIDI@GOTPAGEOFF]
	ldr	w2, [x22]
Lloh12:
	adrp	x3, _vidi_crtc_ops@GOTPAGE
Lloh13:
	ldr	x3, [x3, _vidi_crtc_ops@GOTPAGEOFF]
	mov	x0, x20
	mov	x4, x21
	bl	_exynos_drm_crtc_create
	str	w0, [x21]
	bl	_IS_ERR
	cbz	x0, LBB0_8
; %bb.5:
Lloh14:
	adrp	x1, l_.str@PAGE
Lloh15:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	bl	_DRM_DEV_ERROR
	ldr	w0, [x21]
	bl	_PTR_ERR
LBB0_6:
	mov	x23, x0
LBB0_7:
	mov	x0, x23
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
LBB0_8:
	add	x21, x21, #24
Lloh16:
	adrp	x8, _DRM_MODE_ENCODER_TMDS@GOTPAGE
Lloh17:
	ldr	x8, [x8, _DRM_MODE_ENCODER_TMDS@GOTPAGEOFF]
Lloh18:
	ldr	w3, [x8]
Lloh19:
	adrp	x2, _exynos_vidi_encoder_funcs@GOTPAGE
Lloh20:
	ldr	x2, [x2, _exynos_vidi_encoder_funcs@GOTPAGEOFF]
	mov	x0, x20
	mov	x1, x21
	mov	x4, #0
	bl	_drm_encoder_init
Lloh21:
	adrp	x1, _exynos_vidi_encoder_helper_funcs@GOTPAGE
Lloh22:
	ldr	x1, [x1, _exynos_vidi_encoder_helper_funcs@GOTPAGEOFF]
	mov	x0, x21
	bl	_drm_encoder_helper_add
	ldr	w1, [x22]
	mov	x0, x21
	bl	_exynos_drm_set_possible_crtcs
	tbnz	w0, #31, LBB0_6
; %bb.9:
	mov	x0, x21
	bl	_vidi_create_connector
	mov	x23, x0
	cbz	w0, LBB0_7
; %bb.10:
	str	x23, [sp]
Lloh23:
	adrp	x1, l_.str.1@PAGE
Lloh24:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x19
	bl	_DRM_DEV_ERROR
	mov	x0, x21
	bl	_drm_encoder_cleanup
	b	LBB0_7
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh21, Lloh22
	.loh AdrpLdrGot	Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpAdd	Lloh23, Lloh24
	.cfi_endproc
                                        ; -- End function
	.comm	_formats,4,2                    ; @formats
	.comm	_WINDOWS_NR,4,2                 ; @WINDOWS_NR
	.comm	_vidi_win_types,8,3             ; @vidi_win_types
	.comm	_DEFAULT_WIN,8,3                ; @DEFAULT_WIN
	.comm	_EXYNOS_DISPLAY_TYPE_VIDI,4,2   ; @EXYNOS_DISPLAY_TYPE_VIDI
	.comm	_vidi_crtc_ops,4,2              ; @vidi_crtc_ops
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"failed to create crtc.\n"

	.comm	_exynos_vidi_encoder_funcs,4,2  ; @exynos_vidi_encoder_funcs
	.comm	_DRM_MODE_ENCODER_TMDS,4,2      ; @DRM_MODE_ENCODER_TMDS
	.comm	_exynos_vidi_encoder_helper_funcs,4,2 ; @exynos_vidi_encoder_helper_funcs
l_.str.1:                               ; @.str.1
	.asciz	"failed to create connector ret = %d\n"

	.no_dead_strip	_vidi_bind
.subsections_via_symbols
