	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mic_dma_prog_memcpy_desc
_mic_dma_prog_memcpy_desc:              ## @mic_dma_prog_memcpy_desc
	.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	%rcx, %r15
	movl	%edx, %r14d
	movl	%esi, %r12d
	movq	%rdi, %r13
	callq	_to_mic_dma_dev
	movq	(%rax), %rbx
	movq	%r15, %rax
	orq	%rbx, %rax
	shrq	$32, %rax
	je	LBB0_1
## %bb.2:
	movq	%r15, %rax
	xorl	%edx, %edx
	divq	%rbx
	jmp	LBB0_3
LBB0_1:
	movl	%r15d, %eax
	xorl	%edx, %edx
	divl	%ebx
                                        ## kill: def $edx killed $edx def $rdx
                                        ## kill: def $eax killed $eax def $rax
LBB0_3:
	cmpq	$1, %rdx
	sbbl	$0, %eax
	addl	$4, %eax
	movq	%r13, %rdi
	movl	%eax, %esi
	callq	_mic_dma_avail_desc_ring_space
	testl	%eax, %eax
	js	LBB0_7
## %bb.4:
	movq	%r13, -56(%rbp)                 ## 8-byte Spill
	movq	%rbx, -48(%rbp)                 ## 8-byte Spill
	.p2align	4, 0x90
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	movq	%r15, %rdi
	movq	%rbx, %rsi
	callq	_min
	movq	%rax, %r13
	movq	%r15, %rbx
	movl	%r14d, %r15d
	movq	-56(%rbp), %r14                 ## 8-byte Reload
	movq	(%r14), %rdi
	shlq	$2, %rdi
	addq	8(%r14), %rdi
	movl	%r12d, %esi
	movl	%r15d, %edx
	movq	%rax, %rcx
	callq	_mic_dma_memcpy_desc
	movq	%r14, %rdi
	movl	%r15d, %r14d
	movq	%rbx, %r15
	callq	_mic_dma_hw_ring_inc_head
	addl	%r13d, %r14d
	addl	%r13d, %r12d
	subq	%r13, %r15
	movq	-48(%rbp), %rbx                 ## 8-byte Reload
	jne	LBB0_5
## %bb.6:
	xorl	%eax, %eax
LBB0_7:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.no_dead_strip	_mic_dma_prog_memcpy_desc
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mic_dma_prog_memcpy_desc
_mic_dma_prog_memcpy_desc:              ; @mic_dma_prog_memcpy_desc
	.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, x3
	mov	x20, x2
	mov	x21, x1
	mov	x22, x0
	bl	_to_mic_dma_dev
	ldr	x23, [x0]
	udiv	x8, x19, x23
	msub	x9, x8, x23, x19
	cmp	x9, #0
	mov	w9, #3
	cinc	w9, w9, ne
	add	w1, w9, w8
	mov	x0, x22
	bl	_mic_dma_avail_desc_ring_space
	tbnz	w0, #31, LBB0_3
LBB0_1:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x19
	mov	x1, x23
	bl	_min
	mov	x24, x0
	ldp	x9, x8, [x22]
	add	x0, x8, x9, lsl #2
	mov	x1, x21
	mov	x2, x20
	mov	x3, x24
	bl	_mic_dma_memcpy_desc
	mov	x0, x22
	bl	_mic_dma_hw_ring_inc_head
	add	w20, w20, w24
	add	w21, w21, w24
	subs	x19, x19, x24
	b.ne	LBB0_1
; %bb.2:
	mov	w0, #0
LBB0_3:
	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
	.cfi_endproc
                                        ; -- End function
	.no_dead_strip	_mic_dma_prog_memcpy_desc
.subsections_via_symbols
