	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mic_dma_cleanup
_mic_dma_cleanup:                       ## @mic_dma_cleanup
	.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	%rdi, %rbx
	addq	$8, %rdi
	movq	%rdi, -56(%rbp)                 ## 8-byte Spill
	callq	_spin_lock
	movq	%rbx, %rdi
	callq	_mic_dma_read_cmp_cnt
	movq	%rax, %r14
	xorl	%eax, %eax
	callq	_smp_rmb
	movq	%rbx, -48(%rbp)                 ## 8-byte Spill
	movq	(%rbx), %r15
	movq	%r14, %r12
	cmpq	%r15, %r14
	jne	LBB0_1
LBB0_4:
	xorl	%eax, %eax
	callq	_smp_mb
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movq	%r12, (%rax)
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_spin_unlock                    ## TAILCALL
	.p2align	4, 0x90
LBB0_3:                                 ##   in Loop: Header=BB0_1 Depth=1
	movq	%r15, %rdi
	callq	_mic_dma_hw_ring_inc
	movq	%rax, %r15
	cmpq	%rax, %r12
	je	LBB0_4
LBB0_1:                                 ## =>This Inner Loop Header: Depth=1
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movq	16(%rax), %r14
	movq	%r15, %rbx
	shlq	$4, %rbx
	cmpq	$0, 8(%r14,%rbx)
	je	LBB0_3
## %bb.2:                               ##   in Loop: Header=BB0_1 Depth=1
	leaq	(%r14,%rbx), %r13
	movq	%r13, %rdi
	callq	_dma_cookie_complete
	movq	%r13, %rdi
	xorl	%esi, %esi
	callq	_dmaengine_desc_get_callback_invoke
	movq	$0, (%r14,%rbx)
	jmp	LBB0_3
	.cfi_endproc
                                        ## -- End function
	.no_dead_strip	_mic_dma_cleanup
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mic_dma_cleanup
_mic_dma_cleanup:                       ; @mic_dma_cleanup
	.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	x20, x0
	add	x19, x0, #8
	mov	x0, x19
	bl	_spin_lock
	mov	x0, x20
	bl	_mic_dma_read_cmp_cnt
	mov	x21, x0
	bl	_smp_rmb
	ldr	x22, [x20]
	cmp	x21, x22
	b.ne	LBB0_3
LBB0_1:
	bl	_smp_mb
	str	x21, [x20]
	mov	x0, x19
	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
	b	_spin_unlock
LBB0_2:                                 ;   in Loop: Header=BB0_3 Depth=1
	mov	x0, x22
	bl	_mic_dma_hw_ring_inc
	mov	x22, x0
	cmp	x21, x0
	b.eq	LBB0_1
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x20, #16]
	add	x23, x8, x22, lsl #4
	ldr	x8, [x23, #8]
	cbz	x8, LBB0_2
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	mov	x0, x23
	bl	_dma_cookie_complete
	mov	x0, x23
	mov	x1, #0
	bl	_dmaengine_desc_get_callback_invoke
	str	xzr, [x23]
	b	LBB0_2
	.cfi_endproc
                                        ; -- End function
	.no_dead_strip	_mic_dma_cleanup
.subsections_via_symbols
