	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_fsl_edma_prep_dma_cyclic       ## -- Begin function fsl_edma_prep_dma_cyclic
	.p2align	4, 0x90
_fsl_edma_prep_dma_cyclic:              ## @fsl_edma_prep_dma_cyclic
	.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	%r9, %r14
	movl	%r8d, %r13d
	movq	%rcx, %r15
	movq	%rdx, %r12
	movq	%rsi, -96(%rbp)                 ## 8-byte Spill
	callq	_to_fsl_edma_chan
	movq	%rax, %rbx
	movl	%r13d, %edi
	callq	_is_slave_direction
	testl	%eax, %eax
	je	LBB0_19
## %bb.1:
	movq	%rbx, %rdi
	movl	%r13d, %esi
	callq	_fsl_edma_prep_slave_dma
	testl	%eax, %eax
	je	LBB0_19
## %bb.2:
	movq	%rbx, -56(%rbp)                 ## 8-byte Spill
	movq	%r12, %rax
	orq	%r15, %rax
	shrq	$32, %rax
	je	LBB0_3
## %bb.4:
	movq	%r12, %rax
	xorl	%edx, %edx
	divq	%r15
	movq	%rax, %rsi
	jmp	LBB0_5
LBB0_3:
	movl	%r12d, %eax
	xorl	%edx, %edx
	divl	%r15d
	movl	%eax, %esi
LBB0_5:
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	movq	%rsi, -48(%rbp)                 ## 8-byte Spill
                                        ## kill: def $esi killed $esi killed $rsi
	callq	_fsl_edma_alloc_desc
	testq	%rax, %rax
	je	LBB0_19
## %bb.6:
	movl	$1, (%rax)
	movl	%r13d, 4(%rax)
	movq	_DMA_MEM_TO_DEV@GOTPCREL(%rip), %rcx
	cmpl	%r13d, (%rcx)
	movq	%r14, -104(%rbp)                ## 8-byte Spill
	movq	%rax, -88(%rbp)                 ## 8-byte Spill
	jne	LBB0_8
## %bb.7:
	movq	-56(%rbp), %rbx                 ## 8-byte Reload
	leaq	24(%rbx), %r14
	movq	24(%rbx), %rdi
	callq	_fsl_edma_get_tcd_attr
	leaq	32(%rbx), %rcx
	jmp	LBB0_9
LBB0_19:
	xorl	%eax, %eax
	addq	$72, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_8:
	movq	-56(%rbp), %rbx                 ## 8-byte Reload
	leaq	40(%rbx), %r14
	movq	40(%rbx), %rdi
	callq	_fsl_edma_get_tcd_attr
	leaq	48(%rbx), %rcx
LBB0_9:
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	movq	(%rcx), %rcx
	imulq	(%r14), %rcx
	movq	%rax, 16(%rbx)
	movq	%r15, %rax
	orq	%rcx, %rax
	shrq	$32, %rax
	movq	%rcx, -48(%rbp)                 ## 8-byte Spill
	movl	%r13d, -60(%rbp)                ## 4-byte Spill
	movq	%r15, -112(%rbp)                ## 8-byte Spill
	movq	%r12, -80(%rbp)                 ## 8-byte Spill
	je	LBB0_10
## %bb.11:
	movq	%r15, %rax
	xorl	%edx, %edx
	divq	%rcx
	jmp	LBB0_12
LBB0_10:
	movl	%r15d, %eax
	xorl	%edx, %edx
	divl	%ecx
                                        ## kill: def $eax killed $eax def $rax
LBB0_12:
	movq	%rax, -72(%rbp)                 ## 8-byte Spill
	testl	%edi, %edi
	movq	-88(%rbp), %rsi                 ## 8-byte Reload
	jle	LBB0_18
## %bb.13:
	movq	-96(%rbp), %r14                 ## 8-byte Reload
	addq	%r14, -80(%rbp)                 ## 8-byte Folded Spill
	movl	%edi, %edx
	movl	$8, %r13d
	movl	$1, %r12d
	jmp	LBB0_14
	.p2align	4, 0x90
LBB0_16:                                ##   in Loop: Header=BB0_14 Depth=1
	movq	40(%rbx), %rax
	movq	%rdx, %rsi
	movq	%r14, %rdx
	xorl	%r8d, %r8d
LBB0_17:                                ##   in Loop: Header=BB0_14 Depth=1
	movq	-48(%rbp), %r9                  ## 8-byte Reload
	movl	(%rcx,%r13), %edi
	movq	16(%rbx), %rcx
	pushq	$1
	pushq	$0
	pushq	$1
	pushq	%r10
	pushq	%rax
	movq	-72(%rbp), %rax                 ## 8-byte Reload
	pushq	%rax
	pushq	%rax
	pushq	$0
	callq	_fsl_edma_fill_tcd
	movq	-56(%rbp), %rbx                 ## 8-byte Reload
	addq	$64, %rsp
	addq	-112(%rbp), %r14                ## 8-byte Folded Reload
	addq	$16, %r13
	leaq	1(%r12), %rax
	movq	%r15, %rdx
	cmpq	%r15, %r12
	movq	%rax, %r12
	movq	-88(%rbp), %rsi                 ## 8-byte Reload
	je	LBB0_18
LBB0_14:                                ## =>This Inner Loop Header: Depth=1
	cmpq	-80(%rbp), %r14                 ## 8-byte Folded Reload
	cmovaeq	-96(%rbp), %r14                 ## 8-byte Folded Reload
	movq	16(%rsi), %rcx
	movq	%rdx, %r15
	cmpq	%rdx, %r12
	movq	%r12, %rax
	movl	$0, %edx
	cmoveq	%rdx, %rax
	shlq	$4, %rax
	movq	(%rcx,%rax), %r10
	movq	(%rbx), %rdx
	movl	-60(%rbp), %esi                 ## 4-byte Reload
	movq	_DMA_MEM_TO_DEV@GOTPCREL(%rip), %rax
	cmpl	%esi, (%rax)
	jne	LBB0_16
## %bb.15:                              ##   in Loop: Header=BB0_14 Depth=1
	movq	24(%rbx), %r8
	movq	%r14, %rsi
	xorl	%eax, %eax
	jmp	LBB0_17
LBB0_18:
	addq	$8, %rbx
	addq	$8, %rsi
	movq	%rbx, %rdi
	movq	-104(%rbp), %rdx                ## 8-byte Reload
	addq	$72, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_vchan_tx_prep                  ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_DMA_MEM_TO_DEV,4,2             ## @DMA_MEM_TO_DEV
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_fsl_edma_prep_dma_cyclic       ; -- Begin function fsl_edma_prep_dma_cyclic
	.p2align	2
_fsl_edma_prep_dma_cyclic:              ; @fsl_edma_prep_dma_cyclic
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #176
	.cfi_def_cfa_offset 176
	stp	x28, x27, [sp, #80]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #96]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #112]            ; 16-byte Folded Spill
	stp	x22, x21, [sp, #128]            ; 16-byte Folded Spill
	stp	x20, x19, [sp, #144]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #160]            ; 16-byte Folded Spill
	add	x29, sp, #160
	.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, x5
	mov	x20, x4
	stp	x1, x3, [sp, #64]               ; 16-byte Folded Spill
	mov	x25, x2
	bl	_to_fsl_edma_chan
	mov	x23, x0
	mov	x0, x20
	bl	_is_slave_direction
	cbz	w0, LBB0_5
; %bb.1:
	mov	x0, x23
	mov	x1, x20
	bl	_fsl_edma_prep_slave_dma
	cbz	w0, LBB0_5
; %bb.2:
	ldr	x8, [sp, #72]                   ; 8-byte Folded Reload
	udiv	x27, x25, x8
	mov	x0, x23
	mov	x1, x27
	bl	_fsl_edma_alloc_desc
	cbz	x0, LBB0_5
; %bb.3:
	stp	x19, x0, [sp, #48]              ; 16-byte Folded Spill
	mov	w8, #1
	stp	w8, w20, [x0]
Lloh0:
	adrp	x8, _DMA_MEM_TO_DEV@GOTPAGE
Lloh1:
	ldr	x8, [x8, _DMA_MEM_TO_DEV@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	mov	x19, x23
	cmp	w8, w20
	b.ne	LBB0_6
; %bb.4:
	ldr	x0, [x19, #24]!
	b	LBB0_7
LBB0_5:
	mov	x0, #0
	ldp	x29, x30, [sp, #160]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #144]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #128]            ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #112]            ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #96]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #80]             ; 16-byte Folded Reload
	add	sp, sp, #176
	ret
LBB0_6:
	ldr	x0, [x19, #40]!
LBB0_7:
	bl	_fsl_edma_get_tcd_attr
	add	x8, x19, #8
	ldr	x9, [x19]
	ldr	x8, [x8]
	str	x0, [x23, #16]
	cmp	w27, #1
	b.lt	LBB0_13
; %bb.8:
	mul	x26, x8, x9
	ldp	x8, x9, [sp, #64]               ; 16-byte Folded Reload
	add	x19, x25, x8
	and	x27, x27, #0xffffffff
	mov	w28, #8
	mov	w22, #1
	mov	w21, #1
	udiv	x25, x9, x26
	b	LBB0_11
LBB0_9:                                 ;   in Loop: Header=BB0_11 Depth=1
	mov	x4, #0
	ldr	x8, [x23, #40]
	mov	x1, x2
	mov	x2, x24
LBB0_10:                                ;   in Loop: Header=BB0_11 Depth=1
	ldr	x10, [sp, #56]                  ; 8-byte Folded Reload
	ldr	x10, [x10, #16]
	lsl	x9, x9, #4
	ldr	x9, [x10, x9]
	ldr	w0, [x10, x28]
	ldr	x3, [x23, #16]
	str	w22, [sp, #32]
	stp	x9, x22, [sp, #16]
	stp	x25, x8, [sp]
	mov	x5, x26
	mov	w6, #0
	mov	x7, x25
	bl	_fsl_edma_fill_tcd
	ldr	x8, [sp, #72]                   ; 8-byte Folded Reload
	add	x8, x24, x8
	add	x28, x28, #16
	add	x9, x21, #1
	cmp	x21, x27
	mov	x21, x9
	b.eq	LBB0_13
LBB0_11:                                ; =>This Inner Loop Header: Depth=1
	cmp	x8, x19
	ldr	x9, [sp, #64]                   ; 8-byte Folded Reload
	csel	x24, x8, x9, lo
	cmp	x21, x27
	csel	x9, xzr, x21, eq
Lloh3:
	adrp	x8, _DMA_MEM_TO_DEV@GOTPAGE
Lloh4:
	ldr	x8, [x8, _DMA_MEM_TO_DEV@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	ldr	x2, [x23]
	cmp	w8, w20
	b.ne	LBB0_9
; %bb.12:                               ;   in Loop: Header=BB0_11 Depth=1
	mov	x8, #0
	ldr	x4, [x23, #24]
	mov	x1, x24
	b	LBB0_10
LBB0_13:
	add	x0, x23, #8
	ldp	x2, x8, [sp, #48]               ; 16-byte Folded Reload
	add	x1, x8, #8
	ldp	x29, x30, [sp, #160]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #144]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #128]            ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #112]            ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #96]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #80]             ; 16-byte Folded Reload
	add	sp, sp, #176
	b	_vchan_tx_prep
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_DMA_MEM_TO_DEV,4,2             ; @DMA_MEM_TO_DEV
.subsections_via_symbols
