	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_snd_gf1_dma_done               ## -- Begin function snd_gf1_dma_done
	.p2align	4, 0x90
_snd_gf1_dma_done:                      ## @snd_gf1_dma_done
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -24
	movq	%rdi, %rbx
	callq	_mutex_lock
	decl	44(%rbx)
	jne	LBB0_7
## %bb.1:
	movl	40(%rbx), %edi
	callq	_snd_dma_disable
	movq	_SNDRV_GF1_HANDLER_DMA_WRITE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_snd_gf1_set_default_handlers
	movq	%rbx, %rdi
	callq	_snd_gf1_dma_ack
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movq	32(%rbx), %rdi
	testq	%rdi, %rdi
	je	LBB0_5
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	(%rdi), %rax
	movq	%rax, 32(%rbx)
	callq	_kfree
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_4:                                 ##   in Loop: Header=BB0_5 Depth=1
	movq	(%rdi), %rax
	movq	%rax, 24(%rbx)
	callq	_kfree
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	movq	24(%rbx), %rdi
	testq	%rdi, %rdi
	jne	LBB0_4
## %bb.6:
	movq	$0, 8(%rbx)
	movl	$0, 16(%rbx)
LBB0_7:
	movq	%rbx, %rdi
	callq	_mutex_unlock
	xorl	%eax, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_SNDRV_GF1_HANDLER_DMA_WRITE,4,2 ## @SNDRV_GF1_HANDLER_DMA_WRITE
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_snd_gf1_dma_done               ; -- Begin function snd_gf1_dma_done
	.p2align	2
_snd_gf1_dma_done:                      ; @snd_gf1_dma_done
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x0
	bl	_mutex_lock
	ldr	w8, [x19, #44]
	subs	w8, w8, #1
	str	w8, [x19, #44]
	b.ne	LBB0_6
; %bb.1:
	ldr	w0, [x19, #40]
	bl	_snd_dma_disable
Lloh0:
	adrp	x8, _SNDRV_GF1_HANDLER_DMA_WRITE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _SNDRV_GF1_HANDLER_DMA_WRITE@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_snd_gf1_set_default_handlers
	mov	x0, x19
	bl	_snd_gf1_dma_ack
	ldr	x0, [x19, #32]
	cbz	x0, LBB0_4
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x0]
	str	x8, [x19, #32]
	bl	_kfree
	ldr	x0, [x19, #32]
	cbnz	x0, LBB0_2
	b	LBB0_4
LBB0_3:                                 ;   in Loop: Header=BB0_4 Depth=1
	ldr	x8, [x0]
	str	x8, [x19, #24]
	bl	_kfree
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x0, [x19, #24]
	cbnz	x0, LBB0_3
; %bb.5:
	str	xzr, [x19, #8]
	str	wzr, [x19, #16]
LBB0_6:
	mov	x0, x19
	bl	_mutex_unlock
	mov	w0, #0
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_SNDRV_GF1_HANDLER_DMA_WRITE,4,2 ; @SNDRV_GF1_HANDLER_DMA_WRITE
.subsections_via_symbols
