	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_dma_release_channel            ## -- Begin function dma_release_channel
	.p2align	4, 0x90
_dma_release_channel:                   ## @dma_release_channel
	.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
	movq	_dma_list_mutex@GOTPCREL(%rip), %rdi
	callq	_mutex_lock
	movl	(%rbx), %edx
	xorl	%edi, %edi
	cmpl	$1, %edx
	setne	%dil
	leaq	L_.str(%rip), %rsi
	callq	_WARN_ONCE
	movq	%rbx, %rdi
	callq	_dma_chan_put
	movq	16(%rbx), %rax
	decq	(%rax)
	jne	LBB0_2
## %bb.1:
	movq	_DMA_PRIVATE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edi
	movl	8(%rax), %esi
	callq	_dma_cap_clear
LBB0_2:
	movq	$0, 8(%rbx)
	movq	_dma_list_mutex@GOTPCREL(%rip), %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	jmp	_mutex_unlock                   ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_dma_list_mutex,4,2             ## @dma_list_mutex
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"chan reference count %d != 1\n"

	.comm	_DMA_PRIVATE,4,2                ## @DMA_PRIVATE
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_dma_release_channel            ; -- Begin function dma_release_channel
	.p2align	2
_dma_release_channel:                   ; @dma_release_channel
	.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
Lloh0:
	adrp	x0, _dma_list_mutex@GOTPAGE
Lloh1:
	ldr	x0, [x0, _dma_list_mutex@GOTPAGEOFF]
	bl	_mutex_lock
	ldr	w2, [x19]
	cmp	w2, #1
	cset	w0, ne
Lloh2:
	adrp	x1, l_.str@PAGE
Lloh3:
	add	x1, x1, l_.str@PAGEOFF
	bl	_WARN_ONCE
	mov	x0, x19
	bl	_dma_chan_put
	ldr	x8, [x19, #16]
	ldr	x9, [x8]
	subs	x9, x9, #1
	str	x9, [x8]
	b.ne	LBB0_2
; %bb.1:
Lloh4:
	adrp	x9, _DMA_PRIVATE@GOTPAGE
Lloh5:
	ldr	x9, [x9, _DMA_PRIVATE@GOTPAGEOFF]
Lloh6:
	ldr	w0, [x9]
	ldr	w1, [x8, #8]
	bl	_dma_cap_clear
LBB0_2:
	str	xzr, [x19, #8]
Lloh7:
	adrp	x0, _dma_list_mutex@GOTPAGE
Lloh8:
	ldr	x0, [x0, _dma_list_mutex@GOTPAGEOFF]
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_mutex_unlock
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_dma_list_mutex,4,2             ; @dma_list_mutex
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"chan reference count %d != 1\n"

	.comm	_DMA_PRIVATE,4,2                ; @DMA_PRIVATE
.subsections_via_symbols
