	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function au1550_release
_au1550_release:                        ## @au1550_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
	movq	%rsi, %r14
	movq	8(%rsi), %rbx
	xorl	%eax, %eax
	callq	_lock_kernel
	movq	_FMODE_WRITE@GOTPCREL(%rip), %r12
	movl	(%r12), %eax
	testl	%eax, (%r14)
	je	LBB0_2
## %bb.1:
	xorl	%eax, %eax
	callq	_unlock_kernel
	movq	_O_NONBLOCK@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	andl	4(%r14), %esi
	movq	%rbx, %rdi
	callq	_drain_dac
	xorl	%eax, %eax
	callq	_lock_kernel
LBB0_2:
	leaq	8(%rbx), %r15
	movq	%r15, %rdi
	callq	_mutex_lock
	movl	(%r14), %eax
	testl	%eax, (%r12)
	je	LBB0_4
## %bb.3:
	movq	%rbx, %rdi
	callq	_stop_dac
	movq	24(%rbx), %rdi
	callq	_kfree
	movq	$0, 24(%rbx)
	movl	(%r14), %eax
LBB0_4:
	movq	_FMODE_READ@GOTPCREL(%rip), %r13
	movl	(%r13), %ecx
	testl	%eax, %ecx
	je	LBB0_6
## %bb.5:
	movq	%rbx, %rdi
	callq	_stop_adc
	movq	16(%rbx), %rdi
	callq	_kfree
	movq	$0, 16(%rbx)
	movl	(%r14), %eax
	movl	(%r13), %ecx
LBB0_6:
	notl	%eax
	orl	(%r12), %ecx
	andl	%eax, %ecx
	andl	%ecx, (%rbx)
	movq	%r15, %rdi
	callq	_mutex_unlock
	addq	$4, %rbx
	movq	%rbx, %rdi
	callq	_wake_up
	xorl	%eax, %eax
	callq	_unlock_kernel
	xorl	%eax, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_FMODE_WRITE,4,2                ## @FMODE_WRITE
	.comm	_O_NONBLOCK,4,2                 ## @O_NONBLOCK
	.comm	_FMODE_READ,4,2                 ## @FMODE_READ
	.no_dead_strip	_au1550_release
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function au1550_release
_au1550_release:                        ; @au1550_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, x1
	ldr	x19, [x1, #8]
	bl	_lock_kernel
	ldr	w8, [x20]
Lloh0:
	adrp	x22, _FMODE_WRITE@GOTPAGE
Lloh1:
	ldr	x22, [x22, _FMODE_WRITE@GOTPAGEOFF]
	ldr	w9, [x22]
	tst	w9, w8
	b.eq	LBB0_2
; %bb.1:
	bl	_unlock_kernel
	ldr	w8, [x20, #4]
Lloh2:
	adrp	x9, _O_NONBLOCK@GOTPAGE
Lloh3:
	ldr	x9, [x9, _O_NONBLOCK@GOTPAGEOFF]
Lloh4:
	ldr	w9, [x9]
	and	w1, w9, w8
	mov	x0, x19
	bl	_drain_dac
	bl	_lock_kernel
LBB0_2:
	add	x21, x19, #8
	mov	x0, x21
	bl	_mutex_lock
	ldr	w8, [x20]
	ldr	w9, [x22]
	tst	w9, w8
	b.eq	LBB0_4
; %bb.3:
	mov	x0, x19
	bl	_stop_dac
	ldr	x0, [x19, #24]
	bl	_kfree
	str	xzr, [x19, #24]
	ldr	w8, [x20]
LBB0_4:
Lloh5:
	adrp	x23, _FMODE_READ@GOTPAGE
Lloh6:
	ldr	x23, [x23, _FMODE_READ@GOTPAGEOFF]
	ldr	w9, [x23]
	tst	w9, w8
	b.eq	LBB0_6
; %bb.5:
	mov	x0, x19
	bl	_stop_adc
	ldr	x0, [x19, #16]
	bl	_kfree
	str	xzr, [x19, #16]
	ldr	w8, [x20]
	ldr	w9, [x23]
LBB0_6:
	ldr	w10, [x22]
	orr	w9, w10, w9
	bic	w8, w9, w8
	ldr	w9, [x19]
	and	w8, w8, w9
	str	w8, [x19], #4
	mov	x0, x21
	bl	_mutex_unlock
	mov	x0, x19
	bl	_wake_up
	bl	_unlock_kernel
	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	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh5, Lloh6
	.cfi_endproc
                                        ; -- End function
	.comm	_FMODE_WRITE,4,2                ; @FMODE_WRITE
	.comm	_O_NONBLOCK,4,2                 ; @O_NONBLOCK
	.comm	_FMODE_READ,4,2                 ; @FMODE_READ
	.no_dead_strip	_au1550_release
.subsections_via_symbols
