	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ti_sn_bridge_attach
_ti_sn_bridge_attach:                   ## @ti_sn_bridge_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	%r12
	pushq	%rbx
	subq	$32, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	callq	_bridge_to_ti_sn_bridge
	movq	%rax, %r15
	movq	l___const.ti_sn_bridge_attach.info+16(%rip), %rax
	movq	%rax, -48(%rbp)
	movups	l___const.ti_sn_bridge_attach.info(%rip), %xmm0
	movaps	%xmm0, -64(%rbp)
	movl	4(%rbx), %edi
	movq	_DRM_MODE_CONNECTOR_eDP@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	_ti_sn_bridge_connector_funcs@GOTPCREL(%rip), %rdx
	movq	%r15, %rsi
	callq	_drm_connector_init
	testl	%eax, %eax
	je	LBB0_2
## %bb.1:
	movl	%eax, %r12d
	leaq	L_.str.1(%rip), %rdi
	callq	_DRM_ERROR
	jmp	LBB0_11
LBB0_2:
	movq	_ti_sn_bridge_connector_helper_funcs@GOTPCREL(%rip), %rsi
	movq	%r15, %rdi
	callq	_drm_connector_helper_add
	movl	(%rbx), %esi
	movq	%r15, %rdi
	callq	_drm_connector_attach_encoder
	movl	24(%r15), %edi
	callq	_of_find_mipi_dsi_host_by_node
	testq	%rax, %rax
	je	LBB0_3
## %bb.4:
	leaq	-64(%rbp), %rsi
	movq	%rax, %rdi
	callq	_mipi_dsi_device_register_full
	movq	%rax, %r14
	movq	%rax, %rdi
	callq	_IS_ERR
	testq	%rax, %rax
	je	LBB0_6
## %bb.5:
	leaq	L_.str.3(%rip), %rdi
	callq	_DRM_ERROR
	movq	%r14, %rdi
	callq	_PTR_ERR
	movl	%eax, %r12d
	jmp	LBB0_10
LBB0_3:
	leaq	L_.str.2(%rip), %rdi
	callq	_DRM_ERROR
	movq	_ENODEV@GOTPCREL(%rip), %rax
	xorl	%r12d, %r12d
	subl	(%rax), %r12d
	jmp	LBB0_10
LBB0_6:
	movl	$4, (%r14)
	movq	_MIPI_DSI_FMT_RGB888@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 8(%r14)
	movq	_MIPI_DSI_MODE_VIDEO@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 4(%r14)
	movl	16(%r15), %edi
	callq	_pm_runtime_get_sync
	movl	20(%r15), %edi
	movq	_SN_DPPLL_SRC_REG@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-36(%rbp), %rdx
	callq	_regmap_read
	movl	16(%r15), %edi
	callq	_pm_runtime_put
	movq	_DPPLL_CLK_SRC_DSICLK@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, -36(%rbp)
	jne	LBB0_8
## %bb.7:
	movq	_MIPI_DSI_CLOCK_NON_CONTINUOUS@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	orl	%eax, 4(%r14)
LBB0_8:
	movq	%r14, %rdi
	callq	_mipi_dsi_attach
	testl	%eax, %eax
	js	LBB0_9
## %bb.12:
	movq	%r14, 8(%r15)
	movl	4(%r15), %edi
	movq	%r15, %rsi
	callq	_drm_panel_attach
	xorl	%r12d, %r12d
	jmp	LBB0_11
LBB0_9:
	movl	%eax, %r12d
	leaq	L_.str.4(%rip), %rdi
	callq	_DRM_ERROR
	movq	%r14, %rdi
	callq	_mipi_dsi_device_unregister
LBB0_10:
	movq	%r15, %rdi
	callq	_drm_connector_cleanup
LBB0_11:
	movl	%r12d, %eax
	addq	$32, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"ti_sn_bridge"

	.section	__DATA,__const
	.p2align	3                               ## @__const.ti_sn_bridge_attach.info
l___const.ti_sn_bridge_attach.info:
	.quad	L_.str
	.quad	0
	.long	0                               ## 0x0
	.space	4

	.comm	_ti_sn_bridge_connector_funcs,4,2 ## @ti_sn_bridge_connector_funcs
	.comm	_DRM_MODE_CONNECTOR_eDP,4,2     ## @DRM_MODE_CONNECTOR_eDP
	.section	__TEXT,__cstring,cstring_literals
L_.str.1:                               ## @.str.1
	.asciz	"Failed to initialize connector with drm\n"

	.comm	_ti_sn_bridge_connector_helper_funcs,4,2 ## @ti_sn_bridge_connector_helper_funcs
L_.str.2:                               ## @.str.2
	.asciz	"failed to find dsi host\n"

	.comm	_ENODEV,4,2                     ## @ENODEV
L_.str.3:                               ## @.str.3
	.asciz	"failed to create dsi device\n"

	.comm	_MIPI_DSI_FMT_RGB888,4,2        ## @MIPI_DSI_FMT_RGB888
	.comm	_MIPI_DSI_MODE_VIDEO,4,2        ## @MIPI_DSI_MODE_VIDEO
	.comm	_SN_DPPLL_SRC_REG,4,2           ## @SN_DPPLL_SRC_REG
	.comm	_DPPLL_CLK_SRC_DSICLK,4,2       ## @DPPLL_CLK_SRC_DSICLK
	.comm	_MIPI_DSI_CLOCK_NON_CONTINUOUS,4,2 ## @MIPI_DSI_CLOCK_NON_CONTINUOUS
L_.str.4:                               ## @.str.4
	.asciz	"failed to attach dsi to host\n"

	.no_dead_strip	_ti_sn_bridge_attach
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ti_sn_bridge_attach
_ti_sn_bridge_attach:                   ; @ti_sn_bridge_attach
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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	x20, x0
	bl	_bridge_to_ti_sn_bridge
	mov	x19, x0
Lloh0:
	adrp	x8, l___const.ti_sn_bridge_attach.info@PAGE
Lloh1:
	add	x8, x8, l___const.ti_sn_bridge_attach.info@PAGEOFF
	ldr	q0, [x8]
	str	q0, [sp]
	ldr	x8, [x8, #16]
	str	x8, [sp, #16]
	ldr	w0, [x20, #4]
Lloh2:
	adrp	x8, _DRM_MODE_CONNECTOR_eDP@GOTPAGE
Lloh3:
	ldr	x8, [x8, _DRM_MODE_CONNECTOR_eDP@GOTPAGEOFF]
Lloh4:
	ldr	w3, [x8]
Lloh5:
	adrp	x2, _ti_sn_bridge_connector_funcs@GOTPAGE
Lloh6:
	ldr	x2, [x2, _ti_sn_bridge_connector_funcs@GOTPAGEOFF]
	mov	x1, x19
	bl	_drm_connector_init
	cbz	w0, LBB0_2
; %bb.1:
	mov	x21, x0
Lloh7:
	adrp	x0, l_.str.1@PAGE
Lloh8:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_DRM_ERROR
	b	LBB0_12
LBB0_2:
Lloh9:
	adrp	x1, _ti_sn_bridge_connector_helper_funcs@GOTPAGE
Lloh10:
	ldr	x1, [x1, _ti_sn_bridge_connector_helper_funcs@GOTPAGEOFF]
	mov	x0, x19
	bl	_drm_connector_helper_add
	ldr	w1, [x20]
	mov	x0, x19
	bl	_drm_connector_attach_encoder
	ldr	w0, [x19, #24]
	bl	_of_find_mipi_dsi_host_by_node
	cbz	x0, LBB0_5
; %bb.3:
	mov	x1, sp
	bl	_mipi_dsi_device_register_full
	mov	x20, x0
	bl	_IS_ERR
	cbz	x0, LBB0_6
; %bb.4:
Lloh11:
	adrp	x0, l_.str.3@PAGE
Lloh12:
	add	x0, x0, l_.str.3@PAGEOFF
	bl	_DRM_ERROR
	mov	x0, x20
	bl	_PTR_ERR
	mov	x21, x0
	b	LBB0_11
LBB0_5:
Lloh13:
	adrp	x0, l_.str.2@PAGE
Lloh14:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_DRM_ERROR
Lloh15:
	adrp	x8, _ENODEV@GOTPAGE
Lloh16:
	ldr	x8, [x8, _ENODEV@GOTPAGEOFF]
Lloh17:
	ldr	w8, [x8]
	neg	w21, w8
	b	LBB0_11
LBB0_6:
	mov	w8, #4
	str	w8, [x20]
Lloh18:
	adrp	x8, _MIPI_DSI_FMT_RGB888@GOTPAGE
Lloh19:
	ldr	x8, [x8, _MIPI_DSI_FMT_RGB888@GOTPAGEOFF]
Lloh20:
	ldr	w8, [x8]
Lloh21:
	adrp	x9, _MIPI_DSI_MODE_VIDEO@GOTPAGE
Lloh22:
	ldr	x9, [x9, _MIPI_DSI_MODE_VIDEO@GOTPAGEOFF]
Lloh23:
	ldr	w9, [x9]
	stp	w9, w8, [x20, #4]
	ldr	w0, [x19, #16]
	bl	_pm_runtime_get_sync
	ldr	w0, [x19, #20]
Lloh24:
	adrp	x8, _SN_DPPLL_SRC_REG@GOTPAGE
Lloh25:
	ldr	x8, [x8, _SN_DPPLL_SRC_REG@GOTPAGEOFF]
Lloh26:
	ldr	w1, [x8]
	add	x2, sp, #28
	bl	_regmap_read
	ldr	w0, [x19, #16]
	bl	_pm_runtime_put
	ldr	w8, [sp, #28]
Lloh27:
	adrp	x9, _DPPLL_CLK_SRC_DSICLK@GOTPAGE
Lloh28:
	ldr	x9, [x9, _DPPLL_CLK_SRC_DSICLK@GOTPAGEOFF]
Lloh29:
	ldr	w9, [x9]
	tst	w9, w8
	b.ne	LBB0_8
; %bb.7:
Lloh30:
	adrp	x8, _MIPI_DSI_CLOCK_NON_CONTINUOUS@GOTPAGE
Lloh31:
	ldr	x8, [x8, _MIPI_DSI_CLOCK_NON_CONTINUOUS@GOTPAGEOFF]
Lloh32:
	ldr	w8, [x8]
	ldr	w9, [x20, #4]
	orr	w8, w9, w8
	str	w8, [x20, #4]
LBB0_8:
	mov	x0, x20
	bl	_mipi_dsi_attach
	tbnz	w0, #31, LBB0_10
; %bb.9:
	str	x20, [x19, #8]
	ldr	w0, [x19, #4]
	mov	x1, x19
	bl	_drm_panel_attach
	mov	w21, #0
	b	LBB0_12
LBB0_10:
	mov	x21, x0
Lloh33:
	adrp	x0, l_.str.4@PAGE
Lloh34:
	add	x0, x0, l_.str.4@PAGEOFF
	bl	_DRM_ERROR
	mov	x0, x20
	bl	_mipi_dsi_device_unregister
LBB0_11:
	mov	x0, x19
	bl	_drm_connector_cleanup
LBB0_12:
	mov	x0, x21
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh30, Lloh31, Lloh32
	.loh AdrpAdd	Lloh33, Lloh34
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"ti_sn_bridge"

	.section	__DATA,__const
	.p2align	3                               ; @__const.ti_sn_bridge_attach.info
l___const.ti_sn_bridge_attach.info:
	.quad	l_.str
	.quad	0
	.long	0                               ; 0x0
	.space	4

	.comm	_ti_sn_bridge_connector_funcs,4,2 ; @ti_sn_bridge_connector_funcs
	.comm	_DRM_MODE_CONNECTOR_eDP,4,2     ; @DRM_MODE_CONNECTOR_eDP
	.section	__TEXT,__cstring,cstring_literals
l_.str.1:                               ; @.str.1
	.asciz	"Failed to initialize connector with drm\n"

	.comm	_ti_sn_bridge_connector_helper_funcs,4,2 ; @ti_sn_bridge_connector_helper_funcs
l_.str.2:                               ; @.str.2
	.asciz	"failed to find dsi host\n"

	.comm	_ENODEV,4,2                     ; @ENODEV
l_.str.3:                               ; @.str.3
	.asciz	"failed to create dsi device\n"

	.comm	_MIPI_DSI_FMT_RGB888,4,2        ; @MIPI_DSI_FMT_RGB888
	.comm	_MIPI_DSI_MODE_VIDEO,4,2        ; @MIPI_DSI_MODE_VIDEO
	.comm	_SN_DPPLL_SRC_REG,4,2           ; @SN_DPPLL_SRC_REG
	.comm	_DPPLL_CLK_SRC_DSICLK,4,2       ; @DPPLL_CLK_SRC_DSICLK
	.comm	_MIPI_DSI_CLOCK_NON_CONTINUOUS,4,2 ; @MIPI_DSI_CLOCK_NON_CONTINUOUS
l_.str.4:                               ; @.str.4
	.asciz	"failed to attach dsi to host\n"

	.no_dead_strip	_ti_sn_bridge_attach
.subsections_via_symbols
