	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_DMAbuf_release                 ## -- Begin function DMAbuf_release
	.p2align	4, 0x90
_DMAbuf_release:                        ## @DMAbuf_release
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edi, %r15d
	movq	_audio_devs@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movslq	%edi, %rcx
	movq	(%rax,%rcx,8), %rbx
	movq	16(%rbx), %rax
	movl	(%rbx), %ecx
	movq	_OPEN_WRITE@GOTPCREL(%rip), %r12
	testl	%ecx, (%r12)
	je	LBB0_2
## %bb.1:
	movl	$1, (%rax)
LBB0_2:
	movq	_OPEN_READ@GOTPCREL(%rip), %r13
	movq	%rax, %r14
	testl	%ecx, (%r13)
	je	LBB0_4
## %bb.3:
	movq	8(%rbx), %r14
	movl	$1, (%r14)
LBB0_4:
	testl	%ecx, (%r12)
	je	LBB0_9
## %bb.5:
	movq	_DMA_MAP_MAPPED@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	testl	%ecx, 4(%rax)
	jne	LBB0_9
## %bb.6:
	movq	_current@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_signal_pending
	testl	%eax, %eax
	jne	LBB0_9
## %bb.7:
	movq	16(%rbx), %rax
	movq	8(%rax), %rax
	movq	_DMODE_OUTPUT@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_9
## %bb.8:
	movl	%r15d, %edi
	callq	_DMAbuf_sync
LBB0_9:
	movq	16(%rbx), %rax
	movq	8(%rax), %rcx
	movq	_DMODE_OUTPUT@GOTPCREL(%rip), %rdx
	cmpq	(%rdx), %rcx
	jne	LBB0_11
## %bb.10:
	movl	28(%rax), %edi
	movl	20(%rax), %edx
	movl	24(%rax), %esi
	callq	_memset
LBB0_11:
	movl	%r15d, %edi
	callq	_DMAbuf_reset
	addq	$16, %r14
	movq	%r14, %rdi
	callq	_spin_lock_irqsave
	movq	24(%rbx), %rax
	movl	%r15d, %edi
	callq	*(%rax)
	movl	(%rbx), %eax
	testl	%eax, (%r12)
	je	LBB0_13
## %bb.12:
	movq	16(%rbx), %rsi
	movq	%rbx, %rdi
	callq	_close_dmap
	movl	(%rbx), %eax
LBB0_13:
	cmpl	(%r13), %eax
	je	LBB0_16
## %bb.14:
	cmpl	(%r12), %eax
	je	LBB0_17
## %bb.15:
	movq	_DMA_DUPLEX@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, 4(%rbx)
	je	LBB0_17
LBB0_16:
	movq	8(%rbx), %rsi
	movq	%rbx, %rdi
	callq	_close_dmap
LBB0_17:
	movl	$0, (%rbx)
	movq	%r14, %rdi
	callq	_spin_unlock_irqrestore
	xorl	%eax, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_audio_devs,8,3                 ## @audio_devs
	.comm	_OPEN_WRITE,4,2                 ## @OPEN_WRITE
	.comm	_OPEN_READ,4,2                  ## @OPEN_READ
	.comm	_DMA_MAP_MAPPED,4,2             ## @DMA_MAP_MAPPED
	.comm	_current,4,2                    ## @current
	.comm	_DMODE_OUTPUT,8,3               ## @DMODE_OUTPUT
	.comm	_DMA_DUPLEX,4,2                 ## @DMA_DUPLEX
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_DMAbuf_release                 ; -- Begin function DMAbuf_release
	.p2align	2
_DMAbuf_release:                        ; @DMAbuf_release
	.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
Lloh0:
	adrp	x8, _audio_devs@GOTPAGE
Lloh1:
	ldr	x8, [x8, _audio_devs@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	ldr	x19, [x8, w0, sxtw #3]
	ldr	x8, [x19, #16]
	ldr	w9, [x19]
Lloh3:
	adrp	x22, _OPEN_WRITE@GOTPAGE
Lloh4:
	ldr	x22, [x22, _OPEN_WRITE@GOTPAGEOFF]
	ldr	w10, [x22]
	tst	w10, w9
	b.eq	LBB0_2
; %bb.1:
	mov	w10, #1
	str	w10, [x8]
LBB0_2:
Lloh5:
	adrp	x23, _OPEN_READ@GOTPAGE
Lloh6:
	ldr	x23, [x23, _OPEN_READ@GOTPAGEOFF]
	ldr	w10, [x23]
	mov	x21, x8
	tst	w10, w9
	b.eq	LBB0_4
; %bb.3:
	ldr	x21, [x19, #8]
	mov	w10, #1
	str	w10, [x21]
LBB0_4:
	ldr	w10, [x22]
Lloh7:
	adrp	x24, _DMODE_OUTPUT@GOTPAGE
Lloh8:
	ldr	x24, [x24, _DMODE_OUTPUT@GOTPAGEOFF]
	tst	w10, w9
	b.eq	LBB0_9
; %bb.5:
	ldr	w8, [x8, #4]
Lloh9:
	adrp	x9, _DMA_MAP_MAPPED@GOTPAGE
Lloh10:
	ldr	x9, [x9, _DMA_MAP_MAPPED@GOTPAGEOFF]
Lloh11:
	ldr	w9, [x9]
	tst	w9, w8
	b.ne	LBB0_9
; %bb.6:
Lloh12:
	adrp	x8, _current@GOTPAGE
Lloh13:
	ldr	x8, [x8, _current@GOTPAGEOFF]
Lloh14:
	ldr	w0, [x8]
	bl	_signal_pending
	cbnz	w0, LBB0_9
; %bb.7:
	ldr	x8, [x19, #16]
	ldr	x8, [x8, #8]
	ldr	x9, [x24]
	cmp	x8, x9
	b.ne	LBB0_9
; %bb.8:
	mov	x0, x20
	bl	_DMAbuf_sync
LBB0_9:
	ldr	x8, [x19, #16]
	ldr	x9, [x8, #8]
	ldr	x10, [x24]
	cmp	x9, x10
	b.ne	LBB0_11
; %bb.10:
	ldp	w1, w0, [x8, #24]
	ldr	w2, [x8, #20]
	bl	_memset
LBB0_11:
	mov	x0, x20
	bl	_DMAbuf_reset
	add	x21, x21, #16
	mov	x0, x21
	bl	_spin_lock_irqsave
	ldr	x8, [x19, #24]
	ldr	x8, [x8]
	mov	x0, x20
	blr	x8
	ldr	w8, [x19]
	ldr	w9, [x22]
	tst	w9, w8
	b.eq	LBB0_13
; %bb.12:
	ldr	x1, [x19, #16]
	mov	x0, x19
	bl	_close_dmap
	ldr	w8, [x19]
LBB0_13:
	ldr	w9, [x23]
	cmp	w8, w9
	b.eq	LBB0_16
; %bb.14:
	ldr	w9, [x22]
	cmp	w8, w9
	b.eq	LBB0_17
; %bb.15:
	ldr	w8, [x19, #4]
Lloh15:
	adrp	x9, _DMA_DUPLEX@GOTPAGE
Lloh16:
	ldr	x9, [x9, _DMA_DUPLEX@GOTPAGEOFF]
Lloh17:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_17
LBB0_16:
	ldr	x1, [x19, #8]
	mov	x0, x19
	bl	_close_dmap
LBB0_17:
	str	wzr, [x19]
	mov	x0, x21
	bl	_spin_unlock_irqrestore
	mov	w0, #0
	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
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.cfi_endproc
                                        ; -- End function
	.comm	_audio_devs,8,3                 ; @audio_devs
	.comm	_OPEN_WRITE,4,2                 ; @OPEN_WRITE
	.comm	_OPEN_READ,4,2                  ; @OPEN_READ
	.comm	_DMA_MAP_MAPPED,4,2             ; @DMA_MAP_MAPPED
	.comm	_current,4,2                    ; @current
	.comm	_DMODE_OUTPUT,8,3               ; @DMODE_OUTPUT
	.comm	_DMA_DUPLEX,4,2                 ; @DMA_DUPLEX
.subsections_via_symbols
