	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function sun6i_dsi_dcs_write_long
_sun6i_dsi_dcs_write_long:              ## @sun6i_dsi_dcs_write_long
	.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, %r15
	movq	%rdi, %r14
	movl	(%rdi), %r13d
	xorl	%r12d, %r12d
	xorl	%edi, %edi
	callq	_SUN6I_DSI_CMD_TX_REG
	movl	%eax, %ebx
	movq	%r14, %rdi
	movq	%r15, %rsi
	callq	_sun6i_dsi_dcs_build_pkt_hdr
	movl	%r13d, %edi
	movl	%ebx, %esi
	movl	%eax, %edx
	callq	_regmap_write
	movl	(%r15), %edi
	addl	$4, %edi
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_kzalloc
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	%rax, %rbx
	movq	8(%r15), %rsi
	movl	(%r15), %edx
	movq	%rax, %rdi
	callq	_memcpy
	movl	(%r15), %r12d
	movq	%rbx, %rdi
	movl	%r12d, %esi
	callq	_sun6i_dsi_crc_compute
	movl	%eax, -48(%rbp)
	movslq	(%r15), %rax
	leaq	(%rbx,%rax,4), %rdi
	leaq	-48(%rbp), %rsi
	movl	$4, %edx
	callq	_memcpy
	leal	4(%r12), %eax
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	movl	(%r14), %r13d
	movl	$1, %edi
	callq	_SUN6I_DSI_CMD_TX_REG
	movl	%r13d, %edi
	movl	%eax, %esi
	movq	%rbx, %rdx
	movl	-44(%rbp), %ecx                 ## 4-byte Reload
	callq	_regmap_bulk_write
	movl	(%r14), %edi
	movq	_SUN6I_DSI_CMD_CTL_REG@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	addl	$7, %r12d
	movl	%r12d, %edx
	callq	_regmap_write
	movq	%rbx, %rdi
	callq	_kfree
	movq	_DSI_START_LPTX@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	callq	_sun6i_dsi_start
	movq	%r14, %rdi
	callq	_sun6i_dsi_inst_wait_for_completion
	testl	%eax, %eax
	js	LBB0_3
## %bb.4:
	movl	(%r15), %r12d
	jmp	LBB0_5
LBB0_1:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	subl	(%rax), %r12d
	jmp	LBB0_5
LBB0_3:
	movl	%eax, %r12d
	movq	%r14, %rdi
	callq	_sun6i_dsi_inst_abort
LBB0_5:
	movl	%r12d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_SUN6I_DSI_CMD_CTL_REG,4,2      ## @SUN6I_DSI_CMD_CTL_REG
	.comm	_DSI_START_LPTX,4,2             ## @DSI_START_LPTX
	.no_dead_strip	_sun6i_dsi_dcs_write_long
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function sun6i_dsi_dcs_write_long
_sun6i_dsi_dcs_write_long:              ; @sun6i_dsi_dcs_write_long
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x20, x1
	mov	x19, x0
	ldr	w21, [x0]
	mov	w0, #0
	bl	_SUN6I_DSI_CMD_TX_REG
	mov	x22, x0
	mov	x0, x19
	mov	x1, x20
	bl	_sun6i_dsi_dcs_build_pkt_hdr
	mov	x2, x0
	mov	x0, x21
	mov	x1, x22
	bl	_regmap_write
	ldr	w8, [x20]
	add	w0, w8, #4
Lloh0:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	bl	_kzalloc
	cbz	x0, LBB0_3
; %bb.1:
	mov	x21, x0
	ldr	x1, [x20, #8]
	ldr	w2, [x20]
	bl	_memcpy
	ldr	w22, [x20]
	mov	x0, x21
	mov	x1, x22
	bl	_sun6i_dsi_crc_compute
	str	w0, [sp, #12]
	ldrsw	x8, [x20]
	add	x0, x21, x8, lsl #2
	add	x1, sp, #12
	mov	w2, #4
	bl	_memcpy
	add	w23, w22, #4
	ldr	w24, [x19]
	mov	w0, #1
	bl	_SUN6I_DSI_CMD_TX_REG
	mov	x1, x0
	mov	x0, x24
	mov	x2, x21
	mov	x3, x23
	bl	_regmap_bulk_write
	ldr	w0, [x19]
Lloh3:
	adrp	x8, _SUN6I_DSI_CMD_CTL_REG@GOTPAGE
Lloh4:
	ldr	x8, [x8, _SUN6I_DSI_CMD_CTL_REG@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	add	w2, w22, #7
	bl	_regmap_write
	mov	x0, x21
	bl	_kfree
Lloh6:
	adrp	x8, _DSI_START_LPTX@GOTPAGE
Lloh7:
	ldr	x8, [x8, _DSI_START_LPTX@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_sun6i_dsi_start
	mov	x0, x19
	bl	_sun6i_dsi_inst_wait_for_completion
	tbnz	w0, #31, LBB0_4
; %bb.2:
	ldr	w21, [x20]
	b	LBB0_5
LBB0_3:
Lloh9:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh10:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
	neg	w21, w8
	b	LBB0_5
LBB0_4:
	mov	x21, x0
	mov	x0, x19
	bl	_sun6i_dsi_inst_abort
LBB0_5:
	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
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_SUN6I_DSI_CMD_CTL_REG,4,2      ; @SUN6I_DSI_CMD_CTL_REG
	.comm	_DSI_START_LPTX,4,2             ; @DSI_START_LPTX
	.no_dead_strip	_sun6i_dsi_dcs_write_long
.subsections_via_symbols
