	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function pl330_prep_dma_memcpy
_pl330_prep_dma_memcpy:                 ## @pl330_prep_dma_memcpy
	.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	%r8, %r14
	movq	%rcx, %r15
	movq	%rdx, %rbx
	movq	%rsi, %r13
	callq	_to_pchan
	movq	%rax, %r12
	testq	%rax, %rax
	sete	%al
	testq	%r15, %r15
	sete	%cl
	orb	%al, %cl
	movzbl	%cl, %edi
	callq	_unlikely
	testq	%rax, %rax
	je	LBB0_2
LBB0_1:
	xorl	%eax, %eax
	jmp	LBB0_13
LBB0_2:
	movq	%r14, -48(%rbp)                 ## 8-byte Spill
	movq	(%r12), %r14
	movq	%r12, %rdi
	movq	%r13, %rsi
	movq	%rbx, %rdx
	movq	%r15, %rcx
	callq	___pl330_prep_dma_memcpy
	testq	%rax, %rax
	je	LBB0_1
## %bb.3:
	movq	%rax, %r12
	movabsq	$4294967297, %rax               ## imm = 0x100000001
	movq	%rax, 16(%r12)
	movq	_DMA_MEM_TO_MEM@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 32(%r12)
	movl	(%r14), %eax
	leal	7(%rax), %ecx
	testl	%eax, %eax
	cmovnsl	%eax, %ecx
	sarl	$3, %ecx
	orq	%r13, %rbx
	orq	%r15, %rbx
	leal	-1(%rcx), %edx
	movslq	%edx, %rdx
	testq	%rdx, %rbx
	je	LBB0_7
## %bb.4:
	movq	-48(%rbp), %r14                 ## 8-byte Reload
	.p2align	4, 0x90
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	movl	%ecx, %edx
	shrl	$31, %edx
	addl	%ecx, %edx
	sarl	%edx
	leal	-1(%rdx), %ecx
	movslq	%ecx, %rsi
	movl	%edx, %ecx
	testq	%rsi, %rbx
	jne	LBB0_5
	jmp	LBB0_8
LBB0_7:
	movl	%ecx, %edx
	movq	-48(%rbp), %r14                 ## 8-byte Reload
LBB0_8:
	movl	$-1, %ecx
	movl	$-8, %esi
	.p2align	4, 0x90
LBB0_9:                                 ## =>This Inner Loop Header: Depth=1
	incl	%ecx
	movl	$1, %edi
	shll	%cl, %edi
	addl	$8, %esi
	cmpl	%edi, %edx
	jne	LBB0_9
## %bb.10:
	movl	%ecx, 24(%r12)
	cmpl	%eax, %esi
	jge	LBB0_12
## %bb.11:
	movl	$1, 28(%r12)
LBB0_12:
	movq	%r12, %rdi
	movq	%r15, %rsi
	callq	_get_burst_len
	movl	%eax, 28(%r12)
	movq	%r15, (%r12)
	movq	%r12, %rax
	addq	$8, %rax
	movq	%r14, 8(%r12)
LBB0_13:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_DMA_MEM_TO_MEM,4,2             ## @DMA_MEM_TO_MEM
	.no_dead_strip	_pl330_prep_dma_memcpy
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function pl330_prep_dma_memcpy
_pl330_prep_dma_memcpy:                 ; @pl330_prep_dma_memcpy
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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	x19, x4
	mov	x20, x3
	mov	x22, x2
	mov	x23, x1
	bl	_to_pchan
	mov	x21, x0
	cmp	x20, #0
	ccmp	x0, #0, #4, ne
	cset	w0, eq
	bl	_unlikely
	cbz	x0, LBB0_2
; %bb.1:
	mov	x21, #0
	b	LBB0_11
LBB0_2:
	ldr	x24, [x21]
	mov	x0, x21
	mov	x1, x23
	mov	x2, x22
	mov	x3, x20
	bl	___pl330_prep_dma_memcpy
	mov	x21, x0
	cbz	x0, LBB0_11
; %bb.3:
	movi.2s	v0, #1
	str	d0, [x21, #16]
Lloh0:
	adrp	x8, _DMA_MEM_TO_MEM@GOTPAGE
Lloh1:
	ldr	x8, [x8, _DMA_MEM_TO_MEM@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	str	w8, [x21, #32]
	ldr	w8, [x24]
	add	w9, w8, #7
	cmp	w8, #0
	csel	w9, w9, w8, lt
	asr	w9, w9, #3
	orr	x10, x22, x23
	orr	x10, x10, x20
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	sub	w11, w9, #1
	sxtw	x11, w11
	tst	x10, x11
	b.eq	LBB0_6
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	cmp	w9, #0
	cinc	w9, w9, lt
	asr	w9, w9, #1
	b	LBB0_4
LBB0_6:
	mov	w10, #-1
	mov	w11, #-8
	mov	w12, #1
LBB0_7:                                 ; =>This Inner Loop Header: Depth=1
	add	w10, w10, #1
	lsl	w13, w12, w10
	add	w11, w11, #8
	cmp	w9, w13
	b.ne	LBB0_7
; %bb.8:
	str	w10, [x21, #24]
	cmp	w11, w8
	b.ge	LBB0_10
; %bb.9:
	mov	w8, #1
	str	w8, [x21, #28]
LBB0_10:
	mov	x0, x21
	mov	x1, x20
	bl	_get_burst_len
	str	w0, [x21, #28]
	str	x20, [x21]
	str	x19, [x21, #8]!
LBB0_11:
	mov	x0, x21
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_DMA_MEM_TO_MEM,4,2             ; @DMA_MEM_TO_MEM
	.no_dead_strip	_pl330_prep_dma_memcpy
.subsections_via_symbols
