	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function zx_dma_terminate_all
_zx_dma_terminate_all:                  ## @zx_dma_terminate_all
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r14
	callq	_to_zx_chan
	movq	%rax, %rbx
	movl	(%r14), %edi
	callq	_to_zx_dma
	movq	%rax, %r15
	movq	8(%rbx), %r14
	movq	_head@GOTPCREL(%rip), %r12
	movl	(%r12), %edi
	callq	_LIST_HEAD
	movl	4(%r15), %edi
	leaq	L_.str(%rip), %rsi
	movq	%rbx, %rdx
	callq	_dev_dbg
	movq	%r15, %rdi
	callq	_spin_lock
	leaq	16(%rbx), %rdi
	callq	_list_del_init
	movq	%r15, %rdi
	callq	_spin_unlock
	movq	%rbx, %rdi
	callq	_spin_lock_irqsave
	movq	%rbx, %rdi
	movq	%r12, %rsi
	callq	_vchan_get_all_descriptors
	testq	%r14, %r14
	je	LBB0_2
## %bb.1:
	movq	%r14, %rdi
	movq	%r15, %rsi
	callq	_zx_dma_terminate_chan
	movq	$0, 8(%rbx)
	xorps	%xmm0, %xmm0
	movups	%xmm0, (%r14)
	movq	$0, 16(%r14)
LBB0_2:
	movq	%rbx, %rdi
	callq	_spin_unlock_irqrestore
	movq	_head@GOTPCREL(%rip), %rsi
	movq	%rbx, %rdi
	callq	_vchan_dma_desc_free_list
	xorl	%eax, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_head,4,2                       ## @head
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"vchan %p: terminate all\n"

	.no_dead_strip	_zx_dma_terminate_all
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function zx_dma_terminate_all
_zx_dma_terminate_all:                  ; @zx_dma_terminate_all
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	mov	x20, x0
	bl	_to_zx_chan
	mov	x19, x0
	ldr	w0, [x20]
	bl	_to_zx_dma
	mov	x21, x0
	ldr	x20, [x19, #8]
Lloh0:
	adrp	x22, _head@GOTPAGE
Lloh1:
	ldr	x22, [x22, _head@GOTPAGEOFF]
	ldr	w0, [x22]
	bl	_LIST_HEAD
	ldr	w0, [x21, #4]
Lloh2:
	adrp	x1, l_.str@PAGE
Lloh3:
	add	x1, x1, l_.str@PAGEOFF
	mov	x2, x19
	bl	_dev_dbg
	mov	x0, x21
	bl	_spin_lock
	add	x0, x19, #16
	bl	_list_del_init
	mov	x0, x21
	bl	_spin_unlock
	mov	x0, x19
	bl	_spin_lock_irqsave
	mov	x0, x19
	mov	x1, x22
	bl	_vchan_get_all_descriptors
	cbz	x20, LBB0_2
; %bb.1:
	mov	x0, x20
	mov	x1, x21
	bl	_zx_dma_terminate_chan
	str	xzr, [x19, #8]
	stp	xzr, xzr, [x20, #8]
	str	xzr, [x20]
LBB0_2:
	mov	x0, x19
	bl	_spin_unlock_irqrestore
Lloh4:
	adrp	x1, _head@GOTPAGE
Lloh5:
	ldr	x1, [x1, _head@GOTPAGEOFF]
	mov	x0, x19
	bl	_vchan_dma_desc_free_list
	mov	w0, #0
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_head,4,2                       ; @head
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"vchan %p: terminate all\n"

	.no_dead_strip	_zx_dma_terminate_all
.subsections_via_symbols
