	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mic_dma_do_dma
_mic_dma_do_dma:                        ## @mic_dma_do_dma
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, %r14d
	movq	%rdi, %r15
	testq	%r8, %r8
	je	LBB0_3
## %bb.1:
	movq	_ENOMEM@GOTPCREL(%rip), %r12
	movl	(%r12), %ebx
	movq	%r15, %rdi
	movl	%edx, %esi
	movl	%ecx, %edx
	movq	%r8, %rcx
	callq	_mic_dma_prog_memcpy_desc
	addl	%ebx, %eax
	jne	LBB0_3
## %bb.2:
	xorl	%ebx, %ebx
	subl	(%r12), %ebx
	jmp	LBB0_9
LBB0_3:
	movq	%r15, %rdi
	movl	$3, %esi
	callq	_mic_dma_avail_desc_ring_space
	testl	%eax, %eax
	js	LBB0_4
## %bb.5:
	movq	_DMA_PREP_FENCE@GOTPCREL(%rip), %rax
	testl	%r14d, (%rax)
	je	LBB0_7
## %bb.6:
	movq	(%r15), %rdi
	shlq	$2, %rdi
	addq	16(%r15), %rdi
	movl	8(%r15), %edx
	xorl	%esi, %esi
	xorl	%ecx, %ecx
	callq	_mic_dma_prep_status_desc
	movq	%r15, %rdi
	callq	_mic_dma_hw_ring_inc_head
LBB0_7:
	movq	_DMA_PREP_INTERRUPT@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	testl	%r14d, (%rax)
	je	LBB0_9
## %bb.8:
	movq	%r15, %rdi
	callq	_mic_dma_prog_intr
	jmp	LBB0_9
LBB0_4:
	movl	%eax, %ebx
LBB0_9:
	movl	%ebx, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_DMA_PREP_FENCE,4,2             ## @DMA_PREP_FENCE
	.comm	_DMA_PREP_INTERRUPT,4,2         ## @DMA_PREP_INTERRUPT
	.no_dead_strip	_mic_dma_do_dma
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mic_dma_do_dma
_mic_dma_do_dma:                        ; @mic_dma_do_dma
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	mov	x20, x1
	mov	x19, x0
	cbz	x4, LBB0_3
; %bb.1:
Lloh0:
	adrp	x21, _ENOMEM@GOTPAGE
Lloh1:
	ldr	x21, [x21, _ENOMEM@GOTPAGEOFF]
	ldr	w22, [x21]
	mov	x0, x19
	mov	x1, x2
	mov	x2, x3
	mov	x3, x4
	bl	_mic_dma_prog_memcpy_desc
	cmn	w0, w22
	b.ne	LBB0_3
; %bb.2:
	ldr	w8, [x21]
	neg	w0, w8
	b	LBB0_9
LBB0_3:
	mov	x0, x19
	mov	w1, #3
	bl	_mic_dma_avail_desc_ring_space
	tbnz	w0, #31, LBB0_9
; %bb.4:
Lloh2:
	adrp	x8, _DMA_PREP_FENCE@GOTPAGE
Lloh3:
	ldr	x8, [x8, _DMA_PREP_FENCE@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	tst	w8, w20
	b.eq	LBB0_6
; %bb.5:
	ldr	x8, [x19, #16]
	ldr	x9, [x19]
	add	x0, x8, x9, lsl #2
	ldr	w2, [x19, #8]
	mov	w1, #0
	mov	w3, #0
	bl	_mic_dma_prep_status_desc
	mov	x0, x19
	bl	_mic_dma_hw_ring_inc_head
LBB0_6:
Lloh5:
	adrp	x8, _DMA_PREP_INTERRUPT@GOTPAGE
Lloh6:
	ldr	x8, [x8, _DMA_PREP_INTERRUPT@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
	tst	w8, w20
	b.eq	LBB0_8
; %bb.7:
	mov	x0, x19
	bl	_mic_dma_prog_intr
LBB0_8:
	mov	w0, #0
LBB0_9:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_DMA_PREP_FENCE,4,2             ; @DMA_PREP_FENCE
	.comm	_DMA_PREP_INTERRUPT,4,2         ; @DMA_PREP_INTERRUPT
	.no_dead_strip	_mic_dma_do_dma
.subsections_via_symbols
