	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function exynos_dsi_host_attach
_exynos_dsi_host_attach:                ## @exynos_dsi_host_attach
	.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, %r15
	callq	_host_to_dsi
	movq	%rax, %r14
	leaq	40(%rax), %r12
	movq	48(%rax), %rax
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	leaq	12(%r15), %r13
	movl	12(%r15), %edi
	callq	_of_drm_find_bridge
	testq	%rax, %rax
	je	LBB0_2
## %bb.1:
	movq	%rax, %rbx
	movq	%r12, %rdi
	movq	%rax, %rsi
	xorl	%edx, %edx
	callq	_drm_bridge_attach
	movq	%rbx, 32(%r14)
	movq	$0, 40(%r14)
LBB0_7:
	movq	_MIPI_DSI_MODE_VIDEO@GOTPCREL(%rip), %r12
	movl	(%r12), %eax
	testl	%eax, (%r15)
	je	LBB0_8
LBB0_9:
	movq	-48(%rbp), %rbx                 ## 8-byte Reload
	leaq	8(%rbx), %r13
	movq	%r13, %rdi
	callq	_mutex_lock
	movl	8(%r15), %eax
	movl	%eax, 8(%r14)
	movl	4(%r15), %eax
	movl	%eax, 4(%r14)
	movl	(%r15), %eax
	movl	%eax, (%r14)
	movq	%rbx, %r14
	xorl	%ebx, %ebx
	andl	(%r12), %eax
	sete	%bl
	movq	_EXYNOS_DISPLAY_TYPE_LCD@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	callq	_exynos_drm_crtc_get_by_type
	movl	%ebx, (%rax)
	movq	%r13, %rdi
	callq	_mutex_unlock
	xorl	%r13d, %r13d
	cmpq	$0, (%r14)
	je	LBB0_11
## %bb.10:
	movq	%r14, %rdi
	callq	_drm_kms_helper_hotplug_event
	jmp	LBB0_11
LBB0_2:
	movq	%r13, %rbx
	movq	%r12, %rdi
	callq	_exynos_dsi_create_connector
	testl	%eax, %eax
	je	LBB0_3
## %bb.5:
	movl	%eax, %r13d
	movl	24(%r14), %edi
	leaq	L_.str(%rip), %rsi
	movl	%eax, %edx
	callq	_DRM_DEV_ERROR
	movq	%r12, %rdi
	callq	_drm_encoder_cleanup
	jmp	LBB0_11
LBB0_8:
	movq	%r14, %rdi
	movq	%r13, %rsi
	callq	_exynos_dsi_register_te_irq
	movl	%eax, %r13d
	testl	%eax, %eax
	je	LBB0_9
LBB0_11:
	movl	%r13d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_3:
	movq	%rbx, %r13
	movl	(%rbx), %edi
	callq	_of_drm_find_panel
	movq	%rax, 16(%r14)
	movq	%rax, %rdi
	callq	_IS_ERR
	testq	%rax, %rax
	je	LBB0_6
## %bb.4:
	movq	$0, 16(%r14)
	jmp	LBB0_7
LBB0_6:
	movq	16(%r14), %rdi
	movq	%r14, %rsi
	addq	$12, %rsi
	callq	_drm_panel_attach
	movq	_connector_status_connected@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 12(%r14)
	jmp	LBB0_7
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"failed to create connector ret = %d\n"

	.comm	_connector_status_connected,4,2 ## @connector_status_connected
	.comm	_MIPI_DSI_MODE_VIDEO,4,2        ## @MIPI_DSI_MODE_VIDEO
	.comm	_EXYNOS_DISPLAY_TYPE_LCD,4,2    ## @EXYNOS_DISPLAY_TYPE_LCD
	.no_dead_strip	_exynos_dsi_host_attach
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function exynos_dsi_host_attach
_exynos_dsi_host_attach:                ; @exynos_dsi_host_attach
	.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	x20, x1
	bl	_host_to_dsi
	mov	x21, x0
	add	x23, x0, #40
	ldr	x19, [x0, #48]
	mov	x22, x20
	ldr	w0, [x22, #12]!
	bl	_of_drm_find_bridge
	cbz	x0, LBB0_6
; %bb.1:
	mov	x24, x0
	mov	x0, x23
	mov	x1, x24
	mov	x2, #0
	bl	_drm_bridge_attach
	stp	x24, xzr, [x21, #32]
LBB0_2:
	ldr	w8, [x20]
Lloh0:
	adrp	x23, _MIPI_DSI_MODE_VIDEO@GOTPAGE
Lloh1:
	ldr	x23, [x23, _MIPI_DSI_MODE_VIDEO@GOTPAGEOFF]
	ldr	w9, [x23]
	tst	w9, w8
	b.eq	LBB0_8
LBB0_3:
	add	x22, x19, #8
	mov	x0, x22
	bl	_mutex_lock
	ldr	w8, [x20, #8]
	str	w8, [x21, #8]
	ldr	d0, [x20]
	str	d0, [x21]
	ldr	w8, [x23]
	fmov	w9, s0
	tst	w8, w9
	cset	w20, eq
Lloh2:
	adrp	x8, _EXYNOS_DISPLAY_TYPE_LCD@GOTPAGE
Lloh3:
	ldr	x8, [x8, _EXYNOS_DISPLAY_TYPE_LCD@GOTPAGEOFF]
Lloh4:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_exynos_drm_crtc_get_by_type
	str	w20, [x0]
	mov	x0, x22
	bl	_mutex_unlock
	ldr	x8, [x19]
	cbz	x8, LBB0_5
; %bb.4:
	mov	x0, x19
	bl	_drm_kms_helper_hotplug_event
LBB0_5:
	mov	w24, #0
	b	LBB0_9
LBB0_6:
	mov	x0, x23
	bl	_exynos_dsi_create_connector
	cbz	w0, LBB0_10
; %bb.7:
	mov	x24, x0
	ldr	w0, [x21, #24]
Lloh5:
	adrp	x1, l_.str@PAGE
Lloh6:
	add	x1, x1, l_.str@PAGEOFF
	mov	x2, x24
	bl	_DRM_DEV_ERROR
	mov	x0, x23
	bl	_drm_encoder_cleanup
	b	LBB0_9
LBB0_8:
	mov	x0, x21
	mov	x1, x22
	bl	_exynos_dsi_register_te_irq
	mov	x24, x0
	cbz	w0, LBB0_3
LBB0_9:
	mov	x0, x24
	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_10:
	ldr	w0, [x22]
	bl	_of_drm_find_panel
	str	x0, [x21, #16]
	bl	_IS_ERR
	cbz	x0, LBB0_12
; %bb.11:
	str	xzr, [x21, #16]
	b	LBB0_2
LBB0_12:
	ldr	x0, [x21, #16]
	add	x1, x21, #12
	bl	_drm_panel_attach
Lloh7:
	adrp	x8, _connector_status_connected@GOTPAGE
Lloh8:
	ldr	x8, [x8, _connector_status_connected@GOTPAGEOFF]
Lloh9:
	ldr	w8, [x8]
	str	w8, [x21, #12]
	b	LBB0_2
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"failed to create connector ret = %d\n"

	.comm	_connector_status_connected,4,2 ; @connector_status_connected
	.comm	_MIPI_DSI_MODE_VIDEO,4,2        ; @MIPI_DSI_MODE_VIDEO
	.comm	_EXYNOS_DISPLAY_TYPE_LCD,4,2    ; @EXYNOS_DISPLAY_TYPE_LCD
	.no_dead_strip	_exynos_dsi_host_attach
.subsections_via_symbols
