	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function cdns_dsi_attach
_cdns_dsi_attach:                       ## @cdns_dsi_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, %r14
	movq	%rdi, %r15
	callq	_to_cdns_dsi
	cmpq	$0, 32(%rax)
	je	LBB0_3
## %bb.1:
	movq	_EBUSY@GOTPCREL(%rip), %rax
	jmp	LBB0_2
LBB0_3:
	movq	%rax, %rbx
	movq	_MIPI_DSI_MODE_VIDEO_BURST@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, (%r14)
	je	LBB0_5
## %bb.4:
	movq	_ENOTSUPP@GOTPCREL(%rip), %rax
LBB0_2:
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_15:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_5:
	movq	(%rbx), %rax
	movl	(%rax), %edi
	movq	_DSI_OUTPUT_PORT@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	12(%r14), %edx
	callq	_of_graph_get_remote_node
	movq	%rax, %r12
	testq	%rax, %rax
	jne	LBB0_7
## %bb.6:
	movl	8(%r14), %edi
	callq	_of_node_get
	movq	%rax, %r12
LBB0_7:
	movq	%r12, %rdi
	callq	_of_drm_find_panel
	movq	%rax, %r13
	movq	%rax, %rdi
	callq	_IS_ERR
	testq	%rax, %rax
	movq	%r13, -48(%rbp)                 ## 8-byte Spill
	je	LBB0_8
## %bb.9:
	movl	8(%r14), %edi
	callq	_of_drm_find_bridge
	movq	%rax, %r13
	testq	%rax, %rax
	jne	LBB0_12
## %bb.10:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%edi, %edi
	subl	(%rax), %edi
	callq	_ERR_PTR
	jmp	LBB0_11
LBB0_8:
	movq	_DRM_MODE_CONNECTOR_DSI@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r13, %rdi
	callq	_drm_panel_bridge_add
LBB0_11:
	movq	%rax, %r13
LBB0_12:
	movq	%r12, %rdi
	callq	_of_node_put
	movq	%r13, %rdi
	callq	_IS_ERR
	testq	%rax, %rax
	je	LBB0_14
## %bb.13:
	movq	%r13, %rdi
	callq	_PTR_ERR
	movl	%eax, %ebx
	movl	(%r15), %edi
	movl	4(%r14), %edx
	leaq	L_.str(%rip), %rsi
	movl	%eax, %ecx
	callq	_dev_err
	jmp	LBB0_15
LBB0_14:
	movq	%r14, 32(%rbx)
	movq	%r13, 24(%rbx)
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movq	%rax, 16(%rbx)
	addq	$8, %rbx
	movq	%rbx, %rdi
	callq	_drm_bridge_add
	xorl	%ebx, %ebx
	jmp	LBB0_15
	.cfi_endproc
                                        ## -- End function
	.comm	_EBUSY,4,2                      ## @EBUSY
	.comm	_MIPI_DSI_MODE_VIDEO_BURST,4,2  ## @MIPI_DSI_MODE_VIDEO_BURST
	.comm	_ENOTSUPP,4,2                   ## @ENOTSUPP
	.comm	_DSI_OUTPUT_PORT,4,2            ## @DSI_OUTPUT_PORT
	.comm	_DRM_MODE_CONNECTOR_DSI,4,2     ## @DRM_MODE_CONNECTOR_DSI
	.comm	_EINVAL,4,2                     ## @EINVAL
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"failed to add DSI device %s (err = %d)"

	.no_dead_strip	_cdns_dsi_attach
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function cdns_dsi_attach
_cdns_dsi_attach:                       ; @cdns_dsi_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	x19, x1
	mov	x20, x0
	bl	_to_cdns_dsi
	ldr	x8, [x0, #32]
	cbz	x8, LBB0_2
; %bb.1:
Lloh0:
	adrp	x8, _EBUSY@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EBUSY@GOTPAGEOFF]
	b	LBB0_4
LBB0_2:
	ldr	w8, [x19]
Lloh2:
	adrp	x9, _MIPI_DSI_MODE_VIDEO_BURST@GOTPAGE
Lloh3:
	ldr	x9, [x9, _MIPI_DSI_MODE_VIDEO_BURST@GOTPAGEOFF]
Lloh4:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_6
; %bb.3:
Lloh5:
	adrp	x8, _ENOTSUPP@GOTPAGE
Lloh6:
	ldr	x8, [x8, _ENOTSUPP@GOTPAGEOFF]
LBB0_4:
	ldr	w8, [x8]
	neg	w21, w8
LBB0_5:
	mov	x0, x21
	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_6:
	mov	x21, x0
	ldr	x8, [x0]
	ldr	w0, [x8]
Lloh7:
	adrp	x8, _DSI_OUTPUT_PORT@GOTPAGE
Lloh8:
	ldr	x8, [x8, _DSI_OUTPUT_PORT@GOTPAGEOFF]
Lloh9:
	ldr	w1, [x8]
	ldr	w2, [x19, #12]
	bl	_of_graph_get_remote_node
	mov	x23, x0
	cbnz	x0, LBB0_8
; %bb.7:
	ldr	w0, [x19, #8]
	bl	_of_node_get
	mov	x23, x0
LBB0_8:
	mov	x0, x23
	bl	_of_drm_find_panel
	mov	x22, x0
	bl	_IS_ERR
	cbz	x0, LBB0_11
; %bb.9:
	ldr	w0, [x19, #8]
	bl	_of_drm_find_bridge
	mov	x24, x0
	cbnz	x0, LBB0_13
; %bb.10:
Lloh10:
	adrp	x8, _EINVAL@GOTPAGE
Lloh11:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh12:
	ldr	w8, [x8]
	neg	w0, w8
	bl	_ERR_PTR
	b	LBB0_12
LBB0_11:
Lloh13:
	adrp	x8, _DRM_MODE_CONNECTOR_DSI@GOTPAGE
Lloh14:
	ldr	x8, [x8, _DRM_MODE_CONNECTOR_DSI@GOTPAGEOFF]
Lloh15:
	ldr	w1, [x8]
	mov	x0, x22
	bl	_drm_panel_bridge_add
LBB0_12:
	mov	x24, x0
LBB0_13:
	mov	x0, x23
	bl	_of_node_put
	mov	x0, x24
	bl	_IS_ERR
	cbz	x0, LBB0_15
; %bb.14:
	mov	x0, x24
	bl	_PTR_ERR
	mov	x21, x0
	ldr	w0, [x20]
	ldr	w2, [x19, #4]
Lloh16:
	adrp	x1, l_.str@PAGE
Lloh17:
	add	x1, x1, l_.str@PAGEOFF
	mov	x3, x21
	bl	_dev_err
	b	LBB0_5
LBB0_15:
	stp	x24, x19, [x21, #24]
	add	x0, x21, #8
	str	x22, [x21, #16]
	bl	_drm_bridge_add
	mov	w21, #0
	b	LBB0_5
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpAdd	Lloh16, Lloh17
	.cfi_endproc
                                        ; -- End function
	.comm	_EBUSY,4,2                      ; @EBUSY
	.comm	_MIPI_DSI_MODE_VIDEO_BURST,4,2  ; @MIPI_DSI_MODE_VIDEO_BURST
	.comm	_ENOTSUPP,4,2                   ; @ENOTSUPP
	.comm	_DSI_OUTPUT_PORT,4,2            ; @DSI_OUTPUT_PORT
	.comm	_DRM_MODE_CONNECTOR_DSI,4,2     ; @DRM_MODE_CONNECTOR_DSI
	.comm	_EINVAL,4,2                     ; @EINVAL
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"failed to add DSI device %s (err = %d)"

	.no_dead_strip	_cdns_dsi_attach
.subsections_via_symbols
