	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function dw_mipi_dsi_write
_dw_mipi_dsi_write:                     ## @dw_mipi_dsi_write
	.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
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r15
	movq	16(%rsi), %r13
	movq	%rsi, -56(%rbp)                 ## 8-byte Spill
	movl	(%rsi), %ebx
	movq	_CMD_PKT_STATUS_TIMEOUT_US@GOTPCREL(%rip), %r12
	jmp	LBB0_1
	.p2align	4, 0x90
LBB0_4:                                 ##   in Loop: Header=BB0_1 Depth=1
	leaq	-48(%rbp), %rdi
	movq	%r13, %rsi
	movl	$4, %edx
	callq	_memcpy
	movq	_DSI_GEN_PLD_DATA@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
	movq	-48(%rbp), %rdi
	callq	_le32_to_cpu
	movq	%r15, %rdi
	movl	%r14d, %esi
	movl	%eax, %edx
	callq	_dsi_write
	addq	$16, %r13
	addl	$-4, %ebx
LBB0_5:                                 ##   in Loop: Header=BB0_1 Depth=1
	movq	_DSI_CMD_PKT_STATUS@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	addq	8(%r15), %rdi
	movl	(%r12), %r8d
	movl	$1, %edx
	movl	$1000, %ecx                     ## imm = 0x3E8
	callq	_readl_poll_timeout
	testl	%eax, %eax
	jne	LBB0_6
LBB0_1:                                 ## =>This Inner Loop Header: Depth=1
	testl	%ebx, %ebx
	je	LBB0_7
## %bb.2:                               ##   in Loop: Header=BB0_1 Depth=1
	cmpl	$3, %ebx
	jg	LBB0_4
## %bb.3:                               ##   in Loop: Header=BB0_1 Depth=1
	movq	$0, -48(%rbp)
	leaq	-48(%rbp), %rdi
	movq	%r13, %rsi
	movl	%ebx, %edx
	callq	_memcpy
	movq	_DSI_GEN_PLD_DATA@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movq	-48(%rbp), %rdi
	callq	_le32_to_cpu
	movq	%r15, %rdi
	movl	%ebx, %esi
	movl	%eax, %edx
	callq	_dsi_write
	xorl	%ebx, %ebx
	jmp	LBB0_5
LBB0_6:
	movl	%eax, %r14d
	movl	(%r15), %edi
	leaq	L_.str(%rip), %rsi
	callq	_dev_err
	jmp	LBB0_8
LBB0_7:
	movq	$0, -48(%rbp)
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movq	8(%rax), %rsi
	leaq	-48(%rbp), %rdi
	movl	$8, %edx
	callq	_memcpy
	movq	-48(%rbp), %rdi
	callq	_le32_to_cpu
	movq	%r15, %rdi
	movl	%eax, %esi
	callq	_dw_mipi_dsi_gen_pkt_hdr_write
	movl	%eax, %r14d
LBB0_8:
	movl	%r14d, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_DSI_GEN_PLD_DATA,4,2           ## @DSI_GEN_PLD_DATA
	.comm	_DSI_CMD_PKT_STATUS,8,3         ## @DSI_CMD_PKT_STATUS
	.comm	_GEN_PLD_W_FULL,4,2             ## @GEN_PLD_W_FULL
	.comm	_CMD_PKT_STATUS_TIMEOUT_US,4,2  ## @CMD_PKT_STATUS_TIMEOUT_US
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"failed to get available write payload FIFO\n"

	.no_dead_strip	_dw_mipi_dsi_write
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function dw_mipi_dsi_write
_dw_mipi_dsi_write:                     ; @dw_mipi_dsi_write
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x20, x1
	mov	x19, x0
	ldr	x21, [x1, #16]
	ldr	w22, [x1]
Lloh0:
	adrp	x24, _DSI_GEN_PLD_DATA@GOTPAGE
Lloh1:
	ldr	x24, [x24, _DSI_GEN_PLD_DATA@GOTPAGEOFF]
Lloh2:
	adrp	x25, _DSI_CMD_PKT_STATUS@GOTPAGE
Lloh3:
	ldr	x25, [x25, _DSI_CMD_PKT_STATUS@GOTPAGEOFF]
Lloh4:
	adrp	x26, _CMD_PKT_STATUS_TIMEOUT_US@GOTPAGE
Lloh5:
	ldr	x26, [x26, _CMD_PKT_STATUS_TIMEOUT_US@GOTPAGEOFF]
	b	LBB0_3
LBB0_1:                                 ;   in Loop: Header=BB0_3 Depth=1
	add	x0, sp, #8
	mov	x1, x21
	mov	w2, #4
	bl	_memcpy
	ldr	w23, [x24]
	ldr	x0, [sp, #8]
	bl	_le32_to_cpu
	mov	x2, x0
	mov	x0, x19
	mov	x1, x23
	bl	_dsi_write
	add	x21, x21, #16
	sub	w22, w22, #4
LBB0_2:                                 ;   in Loop: Header=BB0_3 Depth=1
	ldr	x8, [x19, #8]
	ldr	x9, [x25]
	add	x0, x9, x8
	ldr	w4, [x26]
	mov	w2, #1
	mov	w3, #1000
	bl	_readl_poll_timeout
	cbnz	w0, LBB0_6
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	cbz	w22, LBB0_7
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	cmp	w22, #3
	b.gt	LBB0_1
; %bb.5:                                ;   in Loop: Header=BB0_3 Depth=1
	str	xzr, [sp, #8]
	add	x0, sp, #8
	mov	x1, x21
	mov	x2, x22
	bl	_memcpy
	ldr	w22, [x24]
	ldr	x0, [sp, #8]
	bl	_le32_to_cpu
	mov	x2, x0
	mov	x0, x19
	mov	x1, x22
	bl	_dsi_write
	mov	w22, #0
	b	LBB0_2
LBB0_6:
	mov	x23, x0
	ldr	w0, [x19]
Lloh6:
	adrp	x1, l_.str@PAGE
Lloh7:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_err
	b	LBB0_8
LBB0_7:
	str	xzr, [sp, #8]
	ldr	x1, [x20, #8]
	add	x0, sp, #8
	mov	w2, #8
	bl	_memcpy
	ldr	x0, [sp, #8]
	bl	_le32_to_cpu
	mov	x1, x0
	mov	x0, x19
	bl	_dw_mipi_dsi_gen_pkt_hdr_write
	mov	x23, x0
LBB0_8:
	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
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #96
	ret
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.comm	_DSI_GEN_PLD_DATA,4,2           ; @DSI_GEN_PLD_DATA
	.comm	_DSI_CMD_PKT_STATUS,8,3         ; @DSI_CMD_PKT_STATUS
	.comm	_GEN_PLD_W_FULL,4,2             ; @GEN_PLD_W_FULL
	.comm	_CMD_PKT_STATUS_TIMEOUT_US,4,2  ; @CMD_PKT_STATUS_TIMEOUT_US
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"failed to get available write payload FIFO\n"

	.no_dead_strip	_dw_mipi_dsi_write
.subsections_via_symbols
