	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function dw_edma_device_terminate_all
_dw_edma_device_terminate_all:          ## @dw_edma_device_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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	callq	_dchan2dw_edma_chan
	movq	%rax, %rbx
	movq	_head@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_LIST_HEAD
	xorl	%r14d, %r14d
	cmpl	$0, (%rbx)
	je	LBB0_10
## %bb.1:
	movq	8(%rbx), %rax
	movq	_EDMA_ST_PAUSE@GOTPCREL(%rip), %rdx
	movq	_EDMA_ST_IDLE@GOTPCREL(%rip), %r15
	movq	(%r15), %rcx
	cmpq	(%rdx), %rax
	jne	LBB0_3
## %bb.2:
	movq	%rcx, 8(%rbx)
	movl	$0, (%rbx)
	jmp	LBB0_10
LBB0_3:
	cmpq	%rcx, %rax
	jne	LBB0_5
## %bb.4:
	movl	$0, (%rbx)
	jmp	LBB0_10
LBB0_5:
	movq	%rbx, %rdi
	callq	_dw_edma_v0_core_ch_status
	movq	_DMA_COMPLETE@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_7
## %bb.6:
	movq	(%r15), %rax
	movq	%rax, 8(%rbx)
	movl	$0, (%rbx)
	jmp	LBB0_10
LBB0_7:
	movq	16(%rbx), %rax
	movq	_EDMA_REQ_PAUSE@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jle	LBB0_9
## %bb.8:
	movq	_EPERM@GOTPCREL(%rip), %rax
	xorl	%r14d, %r14d
	subl	(%rax), %r14d
	jmp	LBB0_10
LBB0_9:
	movq	_EDMA_REQ_STOP@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, 16(%rbx)
LBB0_10:
	movl	%r14d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_head,4,2                       ## @head
	.comm	_EDMA_ST_PAUSE,8,3              ## @EDMA_ST_PAUSE
	.comm	_EDMA_ST_IDLE,8,3               ## @EDMA_ST_IDLE
	.comm	_DMA_COMPLETE,8,3               ## @DMA_COMPLETE
	.comm	_EDMA_REQ_PAUSE,8,3             ## @EDMA_REQ_PAUSE
	.comm	_EPERM,4,2                      ## @EPERM
	.comm	_EDMA_REQ_STOP,8,3              ## @EDMA_REQ_STOP
	.no_dead_strip	_dw_edma_device_terminate_all
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function dw_edma_device_terminate_all
_dw_edma_device_terminate_all:          ; @dw_edma_device_terminate_all
	.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
	bl	_dchan2dw_edma_chan
	mov	x19, x0
Lloh0:
	adrp	x8, _head@GOTPAGE
Lloh1:
	ldr	x8, [x8, _head@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
	bl	_LIST_HEAD
	ldr	w8, [x19]
	cbz	w8, LBB0_3
; %bb.1:
Lloh3:
	adrp	x9, _EDMA_ST_PAUSE@GOTPAGE
Lloh4:
	ldr	x9, [x9, _EDMA_ST_PAUSE@GOTPAGEOFF]
	ldr	x8, [x19, #8]
Lloh5:
	ldr	x10, [x9]
Lloh6:
	adrp	x20, _EDMA_ST_IDLE@GOTPAGE
Lloh7:
	ldr	x20, [x20, _EDMA_ST_IDLE@GOTPAGEOFF]
	ldr	x9, [x20]
	cmp	x8, x10
	b.ne	LBB0_4
; %bb.2:
	mov	w0, #0
	str	x9, [x19, #8]
	str	wzr, [x19]
	b	LBB0_11
LBB0_3:
	mov	w0, #0
	b	LBB0_11
LBB0_4:
	cmp	x8, x9
	b.ne	LBB0_6
; %bb.5:
	mov	w0, #0
	str	wzr, [x19]
	b	LBB0_11
LBB0_6:
	mov	x0, x19
	bl	_dw_edma_v0_core_ch_status
Lloh8:
	adrp	x8, _DMA_COMPLETE@GOTPAGE
Lloh9:
	ldr	x8, [x8, _DMA_COMPLETE@GOTPAGEOFF]
Lloh10:
	ldr	x8, [x8]
	cmp	x0, x8
	b.ne	LBB0_8
; %bb.7:
	mov	w0, #0
	ldr	x8, [x20]
	str	x8, [x19, #8]
	str	wzr, [x19]
	b	LBB0_11
LBB0_8:
	ldr	x8, [x19, #16]
Lloh11:
	adrp	x9, _EDMA_REQ_PAUSE@GOTPAGE
Lloh12:
	ldr	x9, [x9, _EDMA_REQ_PAUSE@GOTPAGEOFF]
Lloh13:
	ldr	x9, [x9]
	cmp	x8, x9
	b.le	LBB0_10
; %bb.9:
Lloh14:
	adrp	x8, _EPERM@GOTPAGE
Lloh15:
	ldr	x8, [x8, _EPERM@GOTPAGEOFF]
Lloh16:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_11
LBB0_10:
	mov	w0, #0
Lloh17:
	adrp	x8, _EDMA_REQ_STOP@GOTPAGE
Lloh18:
	ldr	x8, [x8, _EDMA_REQ_STOP@GOTPAGEOFF]
Lloh19:
	ldr	x8, [x8]
	str	x8, [x19, #16]
LBB0_11:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.cfi_endproc
                                        ; -- End function
	.comm	_head,4,2                       ; @head
	.comm	_EDMA_ST_PAUSE,8,3              ; @EDMA_ST_PAUSE
	.comm	_EDMA_ST_IDLE,8,3               ; @EDMA_ST_IDLE
	.comm	_DMA_COMPLETE,8,3               ; @DMA_COMPLETE
	.comm	_EDMA_REQ_PAUSE,8,3             ; @EDMA_REQ_PAUSE
	.comm	_EPERM,4,2                      ; @EPERM
	.comm	_EDMA_REQ_STOP,8,3              ; @EDMA_REQ_STOP
	.no_dead_strip	_dw_edma_device_terminate_all
.subsections_via_symbols
