	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function sun6i_dsi_dcs_build_pkt_hdr
_sun6i_dsi_dcs_build_pkt_hdr:           ## @sun6i_dsi_dcs_build_pkt_hdr
	.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
	movslq	(%rsi), %rax
	movq	_MIPI_DSI_DCS_LONG_WRITE@GOTPCREL(%rip), %rcx
	cmpq	%rax, (%rcx)
	jne	LBB0_2
## %bb.1:
	movl	4(%rsi), %ebx
	shll	$8, %ebx
	addl	$256, %ebx                      ## imm = 0x100
	movl	%ebx, %ecx
	andl	$16776960, %ecx                 ## imm = 0xFFFF00
	orl	%eax, %ecx
	andl	$-65536, %ebx                   ## imm = 0xFFFF0000
	orl	%ecx, %ebx
	jmp	LBB0_4
LBB0_2:
	movq	8(%rsi), %rcx
	movl	(%rcx), %ebx
	shll	$8, %ebx
	orl	%eax, %ebx
	cmpl	$2, 4(%rsi)
	jl	LBB0_4
## %bb.3:
	movl	4(%rcx), %eax
	shll	$16, %eax
	orl	%eax, %ebx
LBB0_4:
	movl	%ebx, %edi
	callq	_sun6i_dsi_ecc_compute
	shll	$24, %eax
	orl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_MIPI_DSI_DCS_LONG_WRITE,8,3    ## @MIPI_DSI_DCS_LONG_WRITE
	.no_dead_strip	_sun6i_dsi_dcs_build_pkt_hdr
.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_build_pkt_hdr
_sun6i_dsi_dcs_build_pkt_hdr:           ; @sun6i_dsi_dcs_build_pkt_hdr
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	ldrsw	x8, [x1]
Lloh0:
	adrp	x9, _MIPI_DSI_DCS_LONG_WRITE@GOTPAGE
Lloh1:
	ldr	x9, [x9, _MIPI_DSI_DCS_LONG_WRITE@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_2
; %bb.1:
	ldr	w9, [x1, #4]
	lsl	w9, w9, #8
	add	w9, w9, #256
	and	w10, w9, #0xffff00
	orr	w8, w10, w8
	and	w9, w9, #0xffff0000
	orr	w19, w8, w9
	b	LBB0_4
LBB0_2:
	ldr	x9, [x1, #8]
	ldr	w10, [x9]
	orr	w19, w8, w10, lsl #8
	ldr	w8, [x1, #4]
	cmp	w8, #2
	b.lt	LBB0_4
; %bb.3:
	ldr	w8, [x9, #4]
	orr	w19, w19, w8, lsl #16
LBB0_4:
	mov	x0, x19
	bl	_sun6i_dsi_ecc_compute
	orr	w0, w19, w0, lsl #24
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_MIPI_DSI_DCS_LONG_WRITE,8,3    ; @MIPI_DSI_DCS_LONG_WRITE
	.no_dead_strip	_sun6i_dsi_dcs_build_pkt_hdr
.subsections_via_symbols
