	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function dma_reset_output
_dma_reset_output:                      ## @dma_reset_output
	.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	_audio_devs@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movslq	%edi, %rcx
	movq	(%rax,%rcx,8), %rbx
	movq	8(%rbx), %r13
	movq	_DMA_STARTED@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, (%r13)
	je	LBB0_9
## %bb.1:
	movl	%edi, %r14d
	leaq	16(%r13), %r15
	movq	%r15, %rdi
	callq	_spin_lock_irqsave
	movq	_DMA_SYNCING@GOTPCREL(%rip), %r12
	movl	(%r12), %eax
	movq	8(%rbx), %rcx
	orl	%eax, (%rcx)
	movq	$0, 8(%rcx)
	movq	_current@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_signal_pending
	testl	%eax, %eax
	je	LBB0_2
LBB0_5:
	movq	_DMA_ACTIVE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	orl	(%r12), %eax
	notl	%eax
	movq	8(%rbx), %rcx
	andl	%eax, (%rcx)
	movq	_DMA_DUPLEX@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	16(%rbx), %rax
	testl	%ecx, (%rbx)
	je	LBB0_7
## %bb.6:
	movq	(%rax), %rcx
	testq	%rcx, %rcx
	jne	LBB0_8
LBB0_7:
	movq	8(%rax), %rcx
LBB0_8:
	movl	%r14d, %edi
	callq	*%rcx
	movq	_DMA_STARTED@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	notl	%eax
	movq	8(%rbx), %rcx
	andl	%eax, (%rcx)
	xorl	%eax, %eax
	callq	_claim_dma_lock
	movq	%rax, %r12
	movl	64(%r13), %edi
	callq	_clear_dma_ff
	movl	64(%r13), %edi
	callq	_disable_dma
	movq	%r12, %rdi
	callq	_release_dma_lock
	movq	$0, 56(%r13)
	movq	8(%rbx), %rsi
	movl	%r14d, %edi
	xorl	%edx, %edx
	callq	_reorganize_buffers
	xorps	%xmm0, %xmm0
	movups	%xmm0, 24(%r13)
	movups	%xmm0, 40(%r13)
	movq	%r15, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_spin_unlock_irqrestore         ## TAILCALL
LBB0_9:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_2:
	movq	8(%rbx), %rax
	cmpq	$0, 48(%rax)
	je	LBB0_5
## %bb.3:
	cmpq	$0, 8(%rax)
	jne	LBB0_5
## %bb.4:
	movq	%r15, %rdi
	callq	_spin_unlock_irqrestore
	leaq	24(%rbx), %rax
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	movq	%r13, %rdi
	callq	_dmabuf_timeout
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	movl	%eax, %esi
	callq	_interruptible_sleep_on_timeout
	movq	%r15, %rdi
	callq	_spin_lock_irqsave
	jmp	LBB0_5
	.cfi_endproc
                                        ## -- End function
	.comm	_audio_devs,8,3                 ## @audio_devs
	.comm	_DMA_STARTED,4,2                ## @DMA_STARTED
	.comm	_DMA_SYNCING,4,2                ## @DMA_SYNCING
	.comm	_current,4,2                    ## @current
	.comm	_DMA_ACTIVE,4,2                 ## @DMA_ACTIVE
	.comm	_DMA_DUPLEX,4,2                 ## @DMA_DUPLEX
	.no_dead_strip	_dma_reset_output
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function dma_reset_output
_dma_reset_output:                      ; @dma_reset_output
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
Lloh0:
	adrp	x8, _audio_devs@GOTPAGE
Lloh1:
	ldr	x8, [x8, _audio_devs@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	ldr	x23, [x8, w0, sxtw #3]
	ldr	x19, [x23, #8]
	ldr	w8, [x19]
Lloh3:
	adrp	x24, _DMA_STARTED@GOTPAGE
Lloh4:
	ldr	x24, [x24, _DMA_STARTED@GOTPAGEOFF]
	ldr	w9, [x24]
	tst	w9, w8
	b.eq	LBB0_6
; %bb.1:
	mov	x20, x0
	add	x21, x19, #16
	mov	x0, x21
	bl	_spin_lock_irqsave
Lloh5:
	adrp	x25, _DMA_SYNCING@GOTPAGE
Lloh6:
	ldr	x25, [x25, _DMA_SYNCING@GOTPAGEOFF]
	ldr	w8, [x25]
	ldr	x9, [x23, #8]
	ldr	w10, [x9]
	orr	w8, w10, w8
	str	w8, [x9]
	str	xzr, [x9, #8]
Lloh7:
	adrp	x8, _current@GOTPAGE
Lloh8:
	ldr	x8, [x8, _current@GOTPAGEOFF]
Lloh9:
	ldr	w0, [x8]
	bl	_signal_pending
	cbz	w0, LBB0_7
LBB0_2:
	ldr	w8, [x25]
Lloh10:
	adrp	x9, _DMA_ACTIVE@GOTPAGE
Lloh11:
	ldr	x9, [x9, _DMA_ACTIVE@GOTPAGEOFF]
Lloh12:
	ldr	w9, [x9]
	orr	w9, w9, w8
	ldp	x10, x8, [x23, #8]
	ldr	w11, [x10]
	bic	w9, w11, w9
	str	w9, [x10]
	ldr	w9, [x23]
Lloh13:
	adrp	x10, _DMA_DUPLEX@GOTPAGE
Lloh14:
	ldr	x10, [x10, _DMA_DUPLEX@GOTPAGEOFF]
Lloh15:
	ldr	w10, [x10]
	tst	w10, w9
	b.eq	LBB0_4
; %bb.3:
	ldr	x9, [x8]
	cbnz	x9, LBB0_5
LBB0_4:
	ldr	x9, [x8, #8]
LBB0_5:
	mov	x0, x20
	blr	x9
	ldr	w8, [x24]
	ldr	x9, [x23, #8]
	ldr	w10, [x9]
	bic	w8, w10, w8
	str	w8, [x9]
	bl	_claim_dma_lock
	mov	x22, x0
	ldr	w0, [x19, #64]
	bl	_clear_dma_ff
	ldr	w0, [x19, #64]
	bl	_disable_dma
	mov	x0, x22
	bl	_release_dma_lock
	str	xzr, [x19, #56]
	ldr	x1, [x23, #8]
	mov	x0, x20
	mov	w2, #0
	bl	_reorganize_buffers
	movi.2d	v0, #0000000000000000
	stur	q0, [x19, #24]
	stur	q0, [x19, #40]
	mov	x0, x21
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	b	_spin_unlock_irqrestore
LBB0_6:
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
LBB0_7:
	ldr	x8, [x23, #8]
	ldr	x9, [x8, #48]
	cbz	x9, LBB0_2
; %bb.8:
	ldr	x8, [x8, #8]
	cbnz	x8, LBB0_2
; %bb.9:
	mov	x0, x21
	bl	_spin_unlock_irqrestore
	add	x22, x23, #24
	mov	x0, x19
	bl	_dmabuf_timeout
	mov	x1, x0
	mov	x0, x22
	bl	_interruptible_sleep_on_timeout
	mov	x0, x21
	bl	_spin_lock_irqsave
	b	LBB0_2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.cfi_endproc
                                        ; -- End function
	.comm	_audio_devs,8,3                 ; @audio_devs
	.comm	_DMA_STARTED,4,2                ; @DMA_STARTED
	.comm	_DMA_SYNCING,4,2                ; @DMA_SYNCING
	.comm	_current,4,2                    ; @current
	.comm	_DMA_ACTIVE,4,2                 ; @DMA_ACTIVE
	.comm	_DMA_DUPLEX,4,2                 ; @DMA_DUPLEX
	.no_dead_strip	_dma_reset_output
.subsections_via_symbols
