	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function fsl_dma_prep_memcpy
_fsl_dma_prep_memcpy:                   ## @fsl_dma_prep_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
	subq	$56, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, -72(%rbp)                 ## 8-byte Spill
	movq	%rsi, -64(%rbp)                 ## 8-byte Spill
	xorl	%r13d, %r13d
	testq	%rdi, %rdi
	je	LBB0_11
## %bb.1:
	movq	%rcx, %rbx
	testq	%rcx, %rcx
	je	LBB0_11
## %bb.2:
	movq	%r8, -80(%rbp)                  ## 8-byte Spill
	callq	_to_fsl_chan
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	xorl	%eax, %eax
	xorl	%r12d, %r12d
	jmp	LBB0_3
	.p2align	4, 0x90
LBB0_9:                                 ##   in Loop: Header=BB0_3 Depth=1
	leaq	8(%r15), %rdi
	movl	$0, 16(%r15)
	callq	_async_tx_ack
	addq	%r14, -72(%rbp)                 ## 8-byte Folded Spill
	addq	%r14, %rbx
	movq	%rbx, -64(%rbp)                 ## 8-byte Spill
	movq	%r15, %rdi
	addq	$24, %rdi
	movq	%r13, %rsi
	callq	_list_add_tail
	movq	%r13, %rax
	movq	%r15, %r12
	movq	-88(%rbp), %rbx                 ## 8-byte Reload
	subq	%r14, %rbx
	je	LBB0_10
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	callq	_fsl_dma_alloc_descriptor
	testq	%rax, %rax
	je	LBB0_4
## %bb.7:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	%rax, %r15
	movq	_FSL_DMA_BCR_MAX_CNT@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	movq	%rbx, -88(%rbp)                 ## 8-byte Spill
	movq	%rbx, %rdi
	callq	_min
	movq	%rax, %r14
	movq	-48(%rbp), %r13                 ## 8-byte Reload
	leaq	28(%r15), %rbx
	movq	%r13, %rdi
	movq	%rbx, %rsi
	movq	%rax, %rdx
	callq	_set_desc_cnt
	movq	%r13, %rdi
	movq	%rbx, %rsi
	movq	-72(%rbp), %rdx                 ## 8-byte Reload
	callq	_set_desc_src
	movq	%r13, %rdi
	movq	%rbx, %rsi
	movq	-64(%rbp), %rbx                 ## 8-byte Reload
	movq	%rbx, %rdx
	callq	_set_desc_dst
	movq	%r15, %r13
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	testq	%rax, %rax
	je	LBB0_9
## %bb.8:                               ##   in Loop: Header=BB0_3 Depth=1
	addq	$28, %r12
	movl	20(%r15), %edx
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	movq	%rax, %r13
	movq	%r12, %rsi
	callq	_set_desc_next
	jmp	LBB0_9
LBB0_10:
	movq	-80(%rbp), %rax                 ## 8-byte Reload
	movq	%rax, 8(%r15)
	movq	_EBUSY@GOTPCREL(%rip), %rax
	xorl	%ecx, %ecx
	subl	(%rax), %ecx
	movl	%ecx, 16(%r15)
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	movq	%r15, %rsi
	callq	_set_ld_eol
	addq	$8, %r13
	jmp	LBB0_11
LBB0_4:
	movq	_msg_ld_oom@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	leaq	L_.str(%rip), %rsi
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	callq	_chan_err
	movq	-56(%rbp), %rsi                 ## 8-byte Reload
	testq	%rsi, %rsi
	je	LBB0_6
## %bb.5:
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	callq	_fsldma_free_desc_list_reverse
LBB0_6:
	xorl	%r13d, %r13d
LBB0_11:
	movq	%r13, %rax
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"%s\n"

	.comm	_msg_ld_oom,4,2                 ## @msg_ld_oom
	.comm	_FSL_DMA_BCR_MAX_CNT,8,3        ## @FSL_DMA_BCR_MAX_CNT
	.comm	_EBUSY,4,2                      ## @EBUSY
	.no_dead_strip	_fsl_dma_prep_memcpy
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function fsl_dma_prep_memcpy
_fsl_dma_prep_memcpy:                   ; @fsl_dma_prep_memcpy
	.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	x8, x0
	mov	x0, #0
	cbz	x8, LBB0_11
; %bb.1:
	mov	x21, x3
	cbz	x3, LBB0_11
; %bb.2:
	mov	x22, x2
	mov	x23, x1
	str	x4, [sp, #8]                    ; 8-byte Folded Spill
	mov	x0, x8
	bl	_to_fsl_chan
	mov	x19, x0
	mov	x24, #0
	mov	x20, #0
Lloh0:
	adrp	x28, _FSL_DMA_BCR_MAX_CNT@GOTPAGE
Lloh1:
	ldr	x28, [x28, _FSL_DMA_BCR_MAX_CNT@GOTPAGEOFF]
	b	LBB0_4
LBB0_3:                                 ;   in Loop: Header=BB0_4 Depth=1
	add	x0, x25, #8
	str	wzr, [x25, #16]
	bl	_async_tx_ack
	sub	x21, x21, x26
	add	x22, x26, x22
	add	x23, x26, x23
	add	x0, x25, #24
	mov	x1, x27
	bl	_list_add_tail
	mov	x24, x27
	mov	x20, x25
	cbz	x21, LBB0_7
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x19
	bl	_fsl_dma_alloc_descriptor
	cbz	x0, LBB0_8
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	mov	x25, x0
	ldr	x1, [x28]
	mov	x0, x21
	bl	_min
	mov	x26, x0
	add	x27, x25, #28
	mov	x0, x19
	mov	x1, x27
	mov	x2, x26
	bl	_set_desc_cnt
	mov	x0, x19
	mov	x1, x27
	mov	x2, x22
	bl	_set_desc_src
	mov	x0, x19
	mov	x1, x27
	mov	x2, x23
	bl	_set_desc_dst
	mov	x27, x25
	cbz	x24, LBB0_3
; %bb.6:                                ;   in Loop: Header=BB0_4 Depth=1
	add	x1, x20, #28
	ldr	w2, [x25, #20]
	mov	x0, x19
	bl	_set_desc_next
	mov	x27, x24
	b	LBB0_3
LBB0_7:
	ldr	x8, [sp, #8]                    ; 8-byte Folded Reload
	str	x8, [x25, #8]
Lloh2:
	adrp	x8, _EBUSY@GOTPAGE
Lloh3:
	ldr	x8, [x8, _EBUSY@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	neg	w8, w8
	str	w8, [x25, #16]
	mov	x0, x19
	mov	x1, x25
	bl	_set_ld_eol
	add	x0, x27, #8
	b	LBB0_11
LBB0_8:
Lloh5:
	adrp	x8, _msg_ld_oom@GOTPAGE
Lloh6:
	ldr	x8, [x8, _msg_ld_oom@GOTPAGEOFF]
Lloh7:
	ldr	w2, [x8]
Lloh8:
	adrp	x1, l_.str@PAGE
Lloh9:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	bl	_chan_err
	cbz	x24, LBB0_10
; %bb.9:
	mov	x0, x19
	mov	x1, x24
	bl	_fsldma_free_desc_list_reverse
LBB0_10:
	mov	x0, #0
LBB0_11:
	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
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"%s\n"

	.comm	_msg_ld_oom,4,2                 ; @msg_ld_oom
	.comm	_FSL_DMA_BCR_MAX_CNT,8,3        ; @FSL_DMA_BCR_MAX_CNT
	.comm	_EBUSY,4,2                      ; @EBUSY
	.no_dead_strip	_fsl_dma_prep_memcpy
.subsections_via_symbols
