	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function dsi_vc_write_common
_dsi_vc_write_common:                   ## @dsi_vc_write_common
	.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
	movl	%r8d, %ebx
	movl	%ecx, %r12d
	movq	%rdx, %r15
	movl	%esi, %r13d
	movq	%rdi, %r14
	callq	_to_dsi_data
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	movq	%rax, %rdi
	movl	%r13d, %esi
	movq	%r15, %rdx
	movl	%r12d, %ecx
	movl	%ebx, %r8d
	callq	_dsi_vc_write_nosync_common
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_5
## %bb.1:
	movq	%r14, %rdi
	movl	%r13d, %esi
	callq	_dsi_vc_send_bta_sync
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_5
## %bb.2:
	movl	%r13d, %edi
	callq	_DSI_VC_CTRL
	movq	-48(%rbp), %r14                 ## 8-byte Reload
	movq	%r14, %rdi
	movl	%eax, %esi
	movl	$20, %edx
	movl	$20, %ecx
	callq	_REG_GET
	testq	%rax, %rax
	je	LBB0_3
## %bb.4:
	leaq	L_.str(%rip), %rdi
	xorl	%ebx, %ebx
	xorl	%eax, %eax
	callq	_DSSERR
	movq	%r14, %rdi
	movl	%r13d, %esi
	callq	_dsi_vc_flush_receive_data
	movq	_EIO@GOTPCREL(%rip), %rax
	subl	(%rax), %ebx
LBB0_5:
	movl	(%r15), %edx
	leaq	L_.str.1(%rip), %rdi
	movl	%r13d, %esi
	movl	%r12d, %ecx
	xorl	%eax, %eax
	callq	_DSSERR
LBB0_6:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_3:
	xorl	%ebx, %ebx
	jmp	LBB0_6
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"rx fifo not empty after write, dumping data:\n"

	.comm	_EIO,4,2                        ## @EIO
L_.str.1:                               ## @.str.1
	.asciz	"dsi_vc_write_common(ch %d, cmd 0x%02x, len %d) failed\n"

	.no_dead_strip	_dsi_vc_write_common
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function dsi_vc_write_common
_dsi_vc_write_common:                   ; @dsi_vc_write_common
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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	x23, x4
	mov	x20, x3
	mov	x21, x2
	mov	x19, x1
	mov	x24, x0
	bl	_to_dsi_data
	mov	x22, x0
	mov	x1, x19
	mov	x2, x21
	mov	x3, x20
	mov	x4, x23
	bl	_dsi_vc_write_nosync_common
	mov	x23, x0
	cbnz	w0, LBB0_4
; %bb.1:
	mov	x0, x24
	mov	x1, x19
	bl	_dsi_vc_send_bta_sync
	mov	x23, x0
	cbnz	w0, LBB0_4
; %bb.2:
	mov	x0, x19
	bl	_DSI_VC_CTRL
	mov	x1, x0
	mov	x0, x22
	mov	w2, #20
	mov	w3, #20
	bl	_REG_GET
	cbz	x0, LBB0_6
; %bb.3:
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	bl	_DSSERR
	mov	x0, x22
	mov	x1, x19
	bl	_dsi_vc_flush_receive_data
Lloh2:
	adrp	x8, _EIO@GOTPAGE
Lloh3:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	neg	w23, w8
LBB0_4:
	ldr	w8, [x21]
	stp	x8, x20, [sp, #8]
	str	x19, [sp]
Lloh5:
	adrp	x0, l_.str.1@PAGE
Lloh6:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_DSSERR
LBB0_5:
	mov	x0, x23
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #96
	ret
LBB0_6:
	mov	w23, #0
	b	LBB0_5
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh5, Lloh6
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"rx fifo not empty after write, dumping data:\n"

	.comm	_EIO,4,2                        ; @EIO
l_.str.1:                               ; @.str.1
	.asciz	"dsi_vc_write_common(ch %d, cmd 0x%02x, len %d) failed\n"

	.no_dead_strip	_dsi_vc_write_common
.subsections_via_symbols
