	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function st_fdma_prep_dma_cyclic
_st_fdma_prep_dma_cyclic:               ## @st_fdma_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	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%r9, %r15
	movl	%r8d, %r12d
	movq	%rcx, %r13
	movq	%rdx, %rbx
	movq	%rsi, %r14
	movq	%rdx, %rsi
	movl	%r8d, %edx
	callq	_st_fdma_prep_common
	testq	%r13, %r13
	je	LBB0_5
## %bb.1:
	testq	%rax, %rax
	je	LBB0_5
## %bb.2:
	movq	%r15, -72(%rbp)                 ## 8-byte Spill
	movq	%rax, %rdi
	movl	%r12d, %esi
	movq	%rax, %r15
	callq	_config_reqctrl
	testq	%rax, %rax
	je	LBB0_6
## %bb.3:
	movq	8(%r15), %rax
	movl	(%rax), %edi
	leaq	L_.str(%rip), %rsi
	jmp	LBB0_4
LBB0_6:
	movq	%rbx, %rax
	orq	%r13, %rax
	shrq	$32, %rax
	je	LBB0_7
## %bb.8:
	movq	%rbx, %rax
	xorl	%edx, %edx
	divq	%r13
	jmp	LBB0_9
LBB0_7:
	movl	%ebx, %eax
	xorl	%edx, %edx
	divl	%r13d
                                        ## kill: def $edx killed $edx def $rdx
                                        ## kill: def $eax killed $eax def $rax
LBB0_9:
	testq	%rdx, %rdx
	movq	%r15, %rdi
	je	LBB0_11
## %bb.10:
	movq	8(%rdi), %rax
	movl	(%rax), %edi
	leaq	L_.str.1(%rip), %rsi
LBB0_4:
	callq	_dev_err
LBB0_5:
	xorl	%eax, %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_11:
	movq	%rax, %r15
	movl	%r15d, %esi
	movq	%rdi, -48(%rbp)                 ## 8-byte Spill
	callq	_st_fdma_alloc_desc
	testq	%rax, %rax
	je	LBB0_12
## %bb.13:
	movl	$1, (%rax)
	testl	%r15d, %r15d
	movq	-48(%rbp), %rdx                 ## 8-byte Reload
	jle	LBB0_16
## %bb.14:
	movl	%r12d, %ecx
	movl	%r15d, %esi
	movq	%rsi, -56(%rbp)                 ## 8-byte Spill
	movl	$8, %r15d
	movl	$1, %r12d
	movq	%rax, -64(%rbp)                 ## 8-byte Spill
	movq	%r13, -80(%rbp)                 ## 8-byte Spill
	.p2align	4, 0x90
LBB0_15:                                ## =>This Inner Loop Header: Depth=1
	movq	%r14, -48(%rbp)                 ## 8-byte Spill
	movq	-64(%rbp), %rax                 ## 8-byte Reload
	movq	8(%rax), %rax
	movq	(%rax,%r15), %rbx
	movq	-56(%rbp), %rsi                 ## 8-byte Reload
	cmpq	%rsi, %r12
	movl	%ecx, %r13d
	movq	%r12, %rcx
	movl	$0, %esi
	cmoveq	%rsi, %rcx
	shlq	$4, %rcx
	movl	(%rax,%rcx), %eax
	movl	%eax, 36(%rbx)
	movl	4(%rdx), %edi
	movq	%rdx, %r14
	callq	_FDMA_NODE_CTRL_REQ_MAP_DREQ
	movq	_FDMA_NODE_CTRL_INT_EON@GOTPCREL(%rip), %rcx
	orl	(%rcx), %eax
	movl	%eax, 32(%rbx)
	movq	%rbx, %rdi
	movq	%r14, %rsi
	movl	%r13d, %edx
	callq	_fill_hw_node
	movl	%r13d, %ecx
	movq	-80(%rbp), %r13                 ## 8-byte Reload
	movq	%r14, %rdx
	xorl	%eax, %eax
	movq	_DMA_MEM_TO_DEV@GOTPCREL(%rip), %rsi
	cmpl	%ecx, (%rsi)
	sete	%al
	movq	-48(%rbp), %rsi                 ## 8-byte Reload
	movq	%rsi, 16(%rbx,%rax,8)
	leaq	(%rsi,%r13), %r14
	addq	$16, %r15
	leaq	1(%r12), %rax
	movq	%r13, (%rbx)
	movq	%r13, 8(%rbx)
	cmpq	-56(%rbp), %r12                 ## 8-byte Folded Reload
	movq	%rax, %r12
	movq	-64(%rbp), %rax                 ## 8-byte Reload
	jne	LBB0_15
LBB0_16:
	addq	$4, %rax
	movq	%rdx, %rdi
	movq	%rax, %rsi
	movq	-72(%rbp), %rdx                 ## 8-byte Reload
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_vchan_tx_prep                  ## TAILCALL
LBB0_12:
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movq	8(%rax), %rax
	movl	(%rax), %edi
	leaq	L_.str.2(%rip), %rsi
	jmp	LBB0_4
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"bad width or direction\n"

L_.str.1:                               ## @.str.1
	.asciz	"len is not multiple of period\n"

L_.str.2:                               ## @.str.2
	.asciz	"no memory for desc\n"

	.comm	_FDMA_NODE_CTRL_INT_EON,4,2     ## @FDMA_NODE_CTRL_INT_EON
	.comm	_DMA_MEM_TO_DEV,4,2             ## @DMA_MEM_TO_DEV
	.no_dead_strip	_st_fdma_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 st_fdma_prep_dma_cyclic
_st_fdma_prep_dma_cyclic:               ; @st_fdma_prep_dma_cyclic
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	mov	x21, x3
	mov	x24, x2
	mov	x22, x1
	mov	x1, x2
	mov	x2, x4
	bl	_st_fdma_prep_common
	cbz	x21, LBB0_7
; %bb.1:
	mov	x23, x0
	cbz	x0, LBB0_7
; %bb.2:
	mov	x0, x23
	mov	x1, x20
	bl	_config_reqctrl
	cbz	x0, LBB0_4
; %bb.3:
	ldr	x8, [x23, #8]
	ldr	w0, [x8]
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	b	LBB0_6
LBB0_4:
	udiv	x25, x24, x21
	msub	x8, x25, x21, x24
	cbz	x8, LBB0_8
; %bb.5:
	ldr	x8, [x23, #8]
	ldr	w0, [x8]
Lloh2:
	adrp	x1, l_.str.1@PAGE
Lloh3:
	add	x1, x1, l_.str.1@PAGEOFF
LBB0_6:
	bl	_dev_err
LBB0_7:
	mov	x0, #0
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
LBB0_8:
	mov	x0, x23
	mov	x1, x25
	bl	_st_fdma_alloc_desc
	cbz	x0, LBB0_13
; %bb.9:
	mov	x24, x0
	mov	w8, #1
	str	w8, [x0]
	cmp	w25, #1
	b.lt	LBB0_12
; %bb.10:
	and	x26, x25, #0xffffffff
	mov	w27, #8
	mov	w28, #1
LBB0_11:                                ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x24, #8]
	ldr	x25, [x8, x27]
	cmp	x28, x26
	csel	x9, xzr, x28, eq
	lsl	x9, x9, #4
	ldr	w8, [x8, x9]
	str	w8, [x25, #36]
	ldr	w0, [x23, #4]
	bl	_FDMA_NODE_CTRL_REQ_MAP_DREQ
Lloh4:
	adrp	x8, _FDMA_NODE_CTRL_INT_EON@GOTPAGE
Lloh5:
	ldr	x8, [x8, _FDMA_NODE_CTRL_INT_EON@GOTPAGEOFF]
Lloh6:
	ldr	w8, [x8]
	orr	w8, w8, w0
	str	w8, [x25, #32]
	mov	x0, x25
	mov	x1, x23
	mov	x2, x20
	bl	_fill_hw_node
Lloh7:
	adrp	x8, _DMA_MEM_TO_DEV@GOTPAGE
Lloh8:
	ldr	x8, [x8, _DMA_MEM_TO_DEV@GOTPAGEOFF]
Lloh9:
	ldr	w8, [x8]
	cmp	w8, w20
	mov	w8, #16
	mov	w9, #24
	csel	x8, x9, x8, eq
	str	x22, [x25, x8]
	stp	x21, x21, [x25]
	add	x22, x22, x21
	add	x27, x27, #16
	cmp	x28, x26
	add	x28, x28, #1
	b.ne	LBB0_11
LBB0_12:
	add	x1, x24, #4
	mov	x0, x23
	mov	x2, x19
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	b	_vchan_tx_prep
LBB0_13:
	ldr	x8, [x23, #8]
	ldr	w0, [x8]
Lloh10:
	adrp	x1, l_.str.2@PAGE
Lloh11:
	add	x1, x1, l_.str.2@PAGEOFF
	b	LBB0_6
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpAdd	Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"bad width or direction\n"

l_.str.1:                               ; @.str.1
	.asciz	"len is not multiple of period\n"

l_.str.2:                               ; @.str.2
	.asciz	"no memory for desc\n"

	.comm	_FDMA_NODE_CTRL_INT_EON,4,2     ; @FDMA_NODE_CTRL_INT_EON
	.comm	_DMA_MEM_TO_DEV,4,2             ; @DMA_MEM_TO_DEV
	.no_dead_strip	_st_fdma_prep_dma_cyclic
.subsections_via_symbols
