	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function lpddr_writev
_lpddr_writev:                          ## @lpddr_writev
	.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	$72, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%r8, %r15
	movl	%ecx, %r8d
	movq	%rsi, -104(%rbp)
	movq	(%rdi), %rax
	movq	%rax, -88(%rbp)                 ## 8-byte Spill
	movq	(%rax), %rax
	movq	%rax, -64(%rbp)                 ## 8-byte Spill
	movq	16(%rax), %rax
	movb	(%rax), %cl
	movl	$1, %eax
	shll	%cl, %eax
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	testq	%rdx, %rdx
	je	LBB0_19
## %bb.1:
	cmpq	$4, %rdx
	jae	LBB0_3
## %bb.2:
	xorl	%r12d, %r12d
	xorl	%ecx, %ecx
	jmp	LBB0_11
LBB0_19:
	movq	$0, (%r15)
	xorl	%r14d, %r14d
	jmp	LBB0_18
LBB0_3:
	movq	%rdx, %rcx
	andq	$-4, %rcx
	leaq	-4(%rcx), %rbx
	movq	%rbx, %rdi
	shrq	$2, %rdi
	incq	%rdi
	movl	%edi, %eax
	andl	$3, %eax
	cmpq	$12, %rbx
	jae	LBB0_5
## %bb.4:
	pxor	%xmm0, %xmm0
	xorl	%ebx, %ebx
	pxor	%xmm1, %xmm1
	jmp	LBB0_7
LBB0_5:
	andq	$-4, %rdi
	pxor	%xmm0, %xmm0
	xorl	%ebx, %ebx
	pxor	%xmm1, %xmm1
	.p2align	4, 0x90
LBB0_6:                                 ## =>This Inner Loop Header: Depth=1
	movdqu	(%rsi,%rbx,8), %xmm2
	paddq	%xmm0, %xmm2
	movdqu	16(%rsi,%rbx,8), %xmm0
	paddq	%xmm1, %xmm0
	movdqu	32(%rsi,%rbx,8), %xmm1
	movdqu	48(%rsi,%rbx,8), %xmm3
	movdqu	64(%rsi,%rbx,8), %xmm4
	paddq	%xmm1, %xmm4
	paddq	%xmm2, %xmm4
	movdqu	80(%rsi,%rbx,8), %xmm2
	paddq	%xmm3, %xmm2
	paddq	%xmm0, %xmm2
	movdqu	96(%rsi,%rbx,8), %xmm0
	paddq	%xmm4, %xmm0
	movdqu	112(%rsi,%rbx,8), %xmm1
	paddq	%xmm2, %xmm1
	addq	$16, %rbx
	addq	$-4, %rdi
	jne	LBB0_6
LBB0_7:
	testq	%rax, %rax
	je	LBB0_10
## %bb.8:
	leaq	(%rsi,%rbx,8), %rdi
	addq	$16, %rdi
	shlq	$5, %rax
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_9:                                 ## =>This Inner Loop Header: Depth=1
	movdqu	-16(%rdi,%rbx), %xmm2
	paddq	%xmm2, %xmm0
	movdqu	(%rdi,%rbx), %xmm2
	paddq	%xmm2, %xmm1
	addq	$32, %rbx
	cmpq	%rbx, %rax
	jne	LBB0_9
LBB0_10:
	paddq	%xmm1, %xmm0
	pshufd	$238, %xmm0, %xmm1              ## xmm1 = xmm0[2,3,2,3]
	paddq	%xmm0, %xmm1
	movq	%xmm1, %r12
	cmpq	%rdx, %rcx
	je	LBB0_12
	.p2align	4, 0x90
LBB0_11:                                ## =>This Inner Loop Header: Depth=1
	addq	(%rsi,%rcx,8), %r12
	incq	%rcx
	cmpq	%rcx, %rdx
	jne	LBB0_11
LBB0_12:
	movq	$0, (%r15)
	testq	%r12, %r12
	je	LBB0_13
## %bb.14:
	movq	-64(%rbp), %rax                 ## 8-byte Reload
	movb	(%rax), %cl
	movslq	%r8d, %r13
	sarl	%cl, %r8d
	movq	$0, -96(%rbp)
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	decl	%eax
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	movslq	%r8d, %rax
	shlq	$2, %rax
	movq	%rax, -80(%rbp)                 ## 8-byte Spill
	movq	%r15, -72(%rbp)                 ## 8-byte Spill
	.p2align	4, 0x90
LBB0_15:                                ## =>This Inner Loop Header: Depth=1
	movl	-44(%rbp), %eax                 ## 4-byte Reload
	andl	%r13d, %eax
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
                                        ## kill: def $ecx killed $ecx killed $rcx
	subl	%eax, %ecx
	movslq	%ecx, %r15
	cmpq	%r15, %r12
	cmovbl	%r12d, %r15d
	movq	-64(%rbp), %rax                 ## 8-byte Reload
	movq	8(%rax), %rsi
	addq	-80(%rbp), %rsi                 ## 8-byte Folded Reload
	movq	-88(%rbp), %rdi                 ## 8-byte Reload
	movq	%r13, %rdx
	leaq	-104(%rbp), %rcx
	leaq	-96(%rbp), %r8
	movl	%r15d, %r9d
	callq	_do_write_buffer
	testl	%eax, %eax
	jne	LBB0_16
## %bb.17:                              ##   in Loop: Header=BB0_15 Depth=1
	movslq	%r15d, %rbx
	addq	%rbx, %r13
	movq	-72(%rbp), %r15                 ## 8-byte Reload
	addq	%rbx, (%r15)
	xorl	%r14d, %r14d
	xorl	%eax, %eax
	callq	_cond_resched
	subq	%rbx, %r12
	jne	LBB0_15
	jmp	LBB0_18
LBB0_13:
	xorl	%r14d, %r14d
	jmp	LBB0_18
LBB0_16:
	movl	%eax, %r14d
LBB0_18:
	movl	%r14d, %eax
	addq	$72, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.no_dead_strip	_lpddr_writev
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function lpddr_writev
_lpddr_writev:                          ; @lpddr_writev
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x19, x4
                                        ; kill: def $w3 killed $w3 def $x3
	str	x1, [sp, #8]
	cbz	x2, LBB0_3
; %bb.1:
	ldr	x20, [x0]
	ldr	x23, [x20]
	ldr	x8, [x23, #16]
	cmp	x2, #8
	b.hs	LBB0_4
; %bb.2:
	mov	x24, #0
	mov	x9, #0
	b	LBB0_7
LBB0_3:
	mov	w0, #0
	str	xzr, [x19]
	b	LBB0_14
LBB0_4:
	and	x9, x2, #0xfffffffffffffff8
	add	x10, x1, #32
	movi.2d	v0, #0000000000000000
	mov	x11, x9
	movi.2d	v1, #0000000000000000
	movi.2d	v2, #0000000000000000
	movi.2d	v3, #0000000000000000
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	ldp	q4, q5, [x10, #-32]
	ldp	q6, q7, [x10], #64
	add.2d	v0, v4, v0
	add.2d	v1, v5, v1
	add.2d	v2, v6, v2
	add.2d	v3, v7, v3
	subs	x11, x11, #8
	b.ne	LBB0_5
; %bb.6:
	add.2d	v0, v1, v0
	add.2d	v0, v2, v0
	add.2d	v0, v3, v0
	addp.2d	d0, v0
	fmov	x24, d0
	cmp	x9, x2
	b.eq	LBB0_9
LBB0_7:
	sub	x10, x2, x9
	add	x9, x1, x9, lsl #3
LBB0_8:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x11, [x9], #8
	add	x24, x11, x24
	subs	x10, x10, #1
	b.ne	LBB0_8
LBB0_9:
	ldr	w8, [x8]
	str	xzr, [x19]
	cbz	x24, LBB0_13
; %bb.10:
	mov	w9, #1
	lsl	w25, w9, w8
	ldr	w8, [x23]
	asr	w8, w3, w8
	sxtw	x21, w3
	str	xzr, [sp]
	sub	w26, w25, #1
	sxtw	x27, w8
LBB0_11:                                ; =>This Inner Loop Header: Depth=1
	and	w8, w26, w21
	sub	w8, w25, w8
	cmp	x24, w8, sxtw
	csel	w22, w24, w8, lo
	ldr	x8, [x23, #8]
	add	x1, x8, x27, lsl #2
	add	x3, sp, #8
	mov	x4, sp
	mov	x0, x20
	mov	x2, x21
	mov	x5, x22
	bl	_do_write_buffer
	cbnz	w0, LBB0_14
; %bb.12:                               ;   in Loop: Header=BB0_11 Depth=1
	sxtw	x8, w22
	add	x21, x21, x8
	ldr	x9, [x19]
	add	x9, x9, x8
	str	x9, [x19]
	sub	x24, x24, x8
	bl	_cond_resched
	cbnz	x24, LBB0_11
LBB0_13:
	mov	w0, #0
LBB0_14:
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
	.cfi_endproc
                                        ; -- End function
	.no_dead_strip	_lpddr_writev
.subsections_via_symbols
