	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function vc4_dsi_host_attach
_vc4_dsi_host_attach:                   ## @vc4_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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -24
	movq	%rsi, %rbx
	callq	_host_to_dsi
	movq	%rax, %rcx
	movl	(%rbx), %esi
	movl	%esi, (%rax)
	movl	12(%rbx), %eax
	movl	%eax, 28(%rcx)
	movl	4(%rbx), %edi
	movl	%edi, 4(%rcx)
	movl	8(%rbx), %eax
	addl	$-128, %eax
	cmpl	$4, %eax
	jae	LBB0_1
## %bb.2:
	cltq
	leaq	l_switch.table.vc4_dsi_host_attach(%rip), %rdx
	movq	(%rdx,%rax,8), %rdx
	leaq	L_switch.table.vc4_dsi_host_attach.2(%rip), %rbx
	movl	(%rbx,%rax,4), %eax
	movl	(%rdx), %edx
	movl	%edx, 24(%rcx)
	cltd
	idivl	%esi
	movl	%eax, 8(%rcx)
	movq	_MIPI_DSI_MODE_VIDEO@GOTPCREL(%rip), %rax
	testl	%edi, (%rax)
	jne	LBB0_4
## %bb.3:
	movq	16(%rcx), %rdi
	leaq	L_.str.1(%rip), %rsi
	xorl	%eax, %eax
	callq	_dev_err
	jmp	LBB0_4
LBB0_1:
	movq	16(%rcx), %rdi
	movl	24(%rcx), %edx
	leaq	L_.str(%rip), %rsi
	xorl	%eax, %eax
	callq	_dev_err
LBB0_4:
	xorl	%eax, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_DSI_PFORMAT_RGB888,4,2         ## @DSI_PFORMAT_RGB888
	.comm	_DSI_PFORMAT_RGB666,4,2         ## @DSI_PFORMAT_RGB666
	.comm	_DSI_PFORMAT_RGB666_PACKED,4,2  ## @DSI_PFORMAT_RGB666_PACKED
	.comm	_DSI_PFORMAT_RGB565,4,2         ## @DSI_PFORMAT_RGB565
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Unknown DSI format: %d.\n"

	.comm	_MIPI_DSI_MODE_VIDEO,4,2        ## @MIPI_DSI_MODE_VIDEO
L_.str.1:                               ## @.str.1
	.asciz	"Only VIDEO mode panels supported currently.\n"

	.no_dead_strip	_vc4_dsi_host_attach
	.section	__DATA,__const
	.p2align	3                               ## @switch.table.vc4_dsi_host_attach
l_switch.table.vc4_dsi_host_attach:
	.quad	_DSI_PFORMAT_RGB888
	.quad	_DSI_PFORMAT_RGB666_PACKED
	.quad	_DSI_PFORMAT_RGB666
	.quad	_DSI_PFORMAT_RGB565

	.section	__TEXT,__literal16,16byte_literals
	.p2align	2                               ## @switch.table.vc4_dsi_host_attach.2
L_switch.table.vc4_dsi_host_attach.2:
	.long	24                              ## 0x18
	.long	18                              ## 0x12
	.long	24                              ## 0x18
	.long	16                              ## 0x10

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function vc4_dsi_host_attach
_vc4_dsi_host_attach:                   ; @vc4_dsi_host_attach
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #48
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x1
	bl	_host_to_dsi
	ldp	w10, w8, [x19, #8]
	str	w8, [x0, #28]
	ldp	w9, w8, [x19]
	stp	w9, w8, [x0]
	sub	w10, w10, #128
	cmp	w10, #4
	b.hs	LBB0_3
; %bb.1:
Lloh0:
	adrp	x11, l_switch.table.vc4_dsi_host_attach@PAGE
Lloh1:
	add	x11, x11, l_switch.table.vc4_dsi_host_attach@PAGEOFF
	ldr	x11, [x11, w10, sxtw #3]
Lloh2:
	adrp	x12, l_switch.table.vc4_dsi_host_attach.2@PAGE
Lloh3:
	add	x12, x12, l_switch.table.vc4_dsi_host_attach.2@PAGEOFF
	ldr	w10, [x12, w10, sxtw #2]
	ldr	w11, [x11]
	str	w11, [x0, #24]
	sdiv	w9, w10, w9
	str	w9, [x0, #8]
Lloh4:
	adrp	x9, _MIPI_DSI_MODE_VIDEO@GOTPAGE
Lloh5:
	ldr	x9, [x9, _MIPI_DSI_MODE_VIDEO@GOTPAGEOFF]
Lloh6:
	ldr	w9, [x9]
	tst	w9, w8
	b.ne	LBB0_5
; %bb.2:
	ldr	x0, [x0, #16]
Lloh7:
	adrp	x1, l_.str.1@PAGE
Lloh8:
	add	x1, x1, l_.str.1@PAGEOFF
	b	LBB0_4
LBB0_3:
	ldr	x8, [x0, #16]
	ldr	w9, [x0, #24]
	str	x9, [sp]
Lloh9:
	adrp	x1, l_.str@PAGE
Lloh10:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x8
LBB0_4:
	bl	_dev_err
LBB0_5:
	mov	w0, #0
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	ret
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpAdd	Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.comm	_DSI_PFORMAT_RGB888,4,2         ; @DSI_PFORMAT_RGB888
	.comm	_DSI_PFORMAT_RGB666,4,2         ; @DSI_PFORMAT_RGB666
	.comm	_DSI_PFORMAT_RGB666_PACKED,4,2  ; @DSI_PFORMAT_RGB666_PACKED
	.comm	_DSI_PFORMAT_RGB565,4,2         ; @DSI_PFORMAT_RGB565
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Unknown DSI format: %d.\n"

	.comm	_MIPI_DSI_MODE_VIDEO,4,2        ; @MIPI_DSI_MODE_VIDEO
l_.str.1:                               ; @.str.1
	.asciz	"Only VIDEO mode panels supported currently.\n"

	.no_dead_strip	_vc4_dsi_host_attach
	.section	__DATA,__const
	.p2align	3                               ; @switch.table.vc4_dsi_host_attach
l_switch.table.vc4_dsi_host_attach:
	.quad	_DSI_PFORMAT_RGB888
	.quad	_DSI_PFORMAT_RGB666_PACKED
	.quad	_DSI_PFORMAT_RGB666
	.quad	_DSI_PFORMAT_RGB565

	.section	__TEXT,__literal16,16byte_literals
	.p2align	2                               ; @switch.table.vc4_dsi_host_attach.2
l_switch.table.vc4_dsi_host_attach.2:
	.long	24                              ; 0x18
	.long	18                              ; 0x12
	.long	24                              ; 0x18
	.long	16                              ; 0x10

.subsections_via_symbols
