	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function axi_dmac_prep_dma_cyclic
_axi_dmac_prep_dma_cyclic:              ## @axi_dmac_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	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%r9, -56(%rbp)                  ## 8-byte Spill
	movl	%r8d, %r12d
	movq	%rcx, %r15
	movq	%rdx, %r14
	movl	%esi, %r13d
	callq	_to_axi_dmac_chan
	cmpl	%r12d, (%rax)
	jne	LBB0_9
## %bb.1:
	movq	%rax, %rbx
	movq	%rax, %rdi
	movq	%r14, %rsi
	callq	_axi_dmac_check_len
	testl	%eax, %eax
	je	LBB0_9
## %bb.2:
	movq	%rbx, %rdi
	movl	%r13d, %esi
	callq	_axi_dmac_check_addr
	testq	%r15, %r15
	je	LBB0_9
## %bb.3:
	testl	%eax, %eax
	je	LBB0_9
## %bb.4:
	movq	%r14, %rax
	orq	%r15, %rax
	shrq	$32, %rax
	je	LBB0_5
## %bb.6:
	movq	%r14, %rax
	xorl	%edx, %edx
	divq	%r15
	testq	%rdx, %rdx
	jne	LBB0_9
	jmp	LBB0_8
LBB0_5:
	movl	%r14d, %eax
	xorl	%edx, %edx
	divl	%r15d
                                        ## kill: def $edx killed $edx def $rdx
                                        ## kill: def $eax killed $eax def $rax
	testq	%rdx, %rdx
	jne	LBB0_9
LBB0_8:
	movl	8(%rbx), %esi
	movq	%r15, %rdi
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	callq	_DIV_ROUND_UP
	imull	-48(%rbp), %eax                 ## 4-byte Folded Reload
	movl	%eax, %edi
	callq	_axi_dmac_alloc_desc
	movq	-48(%rbp), %rcx                 ## 8-byte Reload
	testq	%rax, %rax
	je	LBB0_9
## %bb.10:
	movq	%rax, %r14
	movl	8(%rax), %r9d
	movq	%rbx, %rdi
	movl	%r12d, %esi
	movl	%r13d, %edx
                                        ## kill: def $ecx killed $ecx killed $rcx
	movq	%r15, %r8
	callq	_axi_dmac_fill_linear_sg
	movl	$1, (%r14)
	addq	$4, %rbx
	addq	$4, %r14
	movq	%rbx, %rdi
	movq	%r14, %rsi
	movq	-56(%rbp), %rdx                 ## 8-byte Reload
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_vchan_tx_prep                  ## TAILCALL
LBB0_9:
	xorl	%eax, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.no_dead_strip	_axi_dmac_prep_dma_cyclic
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function axi_dmac_prep_dma_cyclic
_axi_dmac_prep_dma_cyclic:              ; @axi_dmac_prep_dma_cyclic
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x19, x5
	mov	x22, x4
	mov	x20, x3
	mov	x24, x2
	mov	x23, x1
	bl	_to_axi_dmac_chan
	ldr	w8, [x0]
	cmp	w8, w22
	b.ne	LBB0_5
; %bb.1:
	mov	x21, x0
	mov	x1, x24
	bl	_axi_dmac_check_len
	cbz	w0, LBB0_5
; %bb.2:
	mov	x0, x21
	mov	x1, x23
	bl	_axi_dmac_check_addr
	cbz	x20, LBB0_5
; %bb.3:
	cbz	w0, LBB0_5
; %bb.4:
	udiv	x25, x24, x20
	msub	x8, x25, x20, x24
	cbz	x8, LBB0_6
LBB0_5:
	mov	x0, #0
	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
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
LBB0_6:
	ldr	w1, [x21, #8]
	mov	x0, x20
	bl	_DIV_ROUND_UP
	mul	w0, w0, w25
	bl	_axi_dmac_alloc_desc
	cbz	x0, LBB0_5
; %bb.7:
	mov	x24, x0
	ldr	w5, [x0, #8]
	mov	x0, x21
	mov	x1, x22
	mov	x2, x23
	mov	x3, x25
	mov	x4, x20
	bl	_axi_dmac_fill_linear_sg
	mov	w8, #1
	str	w8, [x24]
	add	x0, x21, #4
	add	x1, x24, #4
	mov	x2, x19
	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
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	b	_vchan_tx_prep
	.cfi_endproc
                                        ; -- End function
	.no_dead_strip	_axi_dmac_prep_dma_cyclic
.subsections_via_symbols
