	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function sirfsoc_dma_terminate_all
_sirfsoc_dma_terminate_all:             ## @sirfsoc_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	%r13
	pushq	%r12
	pushq	%rbx
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	callq	_dma_chan_to_sirfsoc_dma_chan
	movq	%rax, %r13
	leaq	16(%rax), %rdi
	callq	_dma_chan_to_sirfsoc_dma
	movq	%rax, %rbx
	movl	16(%r13), %r15d
	movq	%r13, %rdi
	callq	_spin_lock_irqsave
	movl	(%rbx), %eax
	cmpl	$128, %eax
	je	LBB0_4
## %bb.1:
	cmpl	$130, %eax
	je	LBB0_5
## %bb.2:
	cmpl	$129, %eax
	jne	LBB0_7
## %bb.3:
	movl	$1, %r14d
	movq	%r15, %r12
	movl	$1, %r15d
	movl	%r12d, %ecx
	shll	%cl, %r15d
	movq	%rbx, %rax
	addq	$8, %rax
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	movq	_SIRFSOC_DMA_INT_EN_CLR@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	addq	8(%rbx), %rsi
	movl	%r15d, %edi
	callq	_writel_relaxed
	movq	_SIRFSOC_DMA_CH_INT@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	addq	8(%rbx), %rsi
	movl	%r15d, -44(%rbp)                ## 4-byte Spill
	movl	%r15d, %edi
	callq	_writel_relaxed
	leal	16(%r12), %ecx
                                        ## kill: def $cl killed $cl killed $ecx
	shll	%cl, %r14d
	btsl	%r12d, %r14d
	movq	_SIRFSOC_DMA_CH_VALID@GOTPCREL(%rip), %r15
	movq	_SIRFSOC_DMA_CH_LOOP_CTRL_CLR_ATLAS7@GOTPCREL(%rip), %r12
	jmp	LBB0_6
LBB0_4:
	movq	%rbx, %rax
	addq	$8, %rax
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	movq	_SIRFSOC_DMA_INT_EN_ATLAS7@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	addq	8(%rbx), %rsi
	xorl	%r14d, %r14d
	xorl	%edi, %edi
	callq	_writel_relaxed
	movq	_SIRFSOC_DMA_INT_ALL_ATLAS7@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_SIRFSOC_DMA_INT_ATLAS7@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	addq	8(%rbx), %rsi
	callq	_writel_relaxed
	movq	_SIRFSOC_DMA_VALID_ATLAS7@GOTPCREL(%rip), %r15
	movq	_SIRFSOC_DMA_LOOP_CTRL_ATLAS7@GOTPCREL(%rip), %r12
	movl	$0, -44(%rbp)                   ## 4-byte Folded Spill
	jmp	LBB0_6
LBB0_5:
	movq	%rbx, %rax
	addq	$8, %rax
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	movq	_SIRFSOC_DMA_INT_EN@GOTPCREL(%rip), %r12
	movq	(%r12), %rdi
	addq	8(%rbx), %rdi
	callq	_readl_relaxed
	movl	$1, %r14d
	movl	$1, %edx
	movl	%r15d, %ecx
	shll	%cl, %edx
	movl	%edx, -44(%rbp)                 ## 4-byte Spill
	btrl	%r15d, %eax
	movq	(%r12), %rsi
	addq	8(%rbx), %rsi
	movl	%eax, %edi
	callq	_writel_relaxed
	movq	_SIRFSOC_DMA_CH_LOOP_CTRL@GOTPCREL(%rip), %r12
	movq	(%r12), %rdi
	addq	8(%rbx), %rdi
	callq	_readl_relaxed
	movl	%r15d, %ecx
	addb	$16, %cl
	shll	%cl, %r14d
	btsl	%r15d, %r14d
	notl	%r14d
	andl	%eax, %r14d
	movq	_SIRFSOC_DMA_CH_VALID@GOTPCREL(%rip), %r15
LBB0_6:
	movq	(%r12), %rsi
	movq	-56(%rbp), %rbx                 ## 8-byte Reload
	addq	(%rbx), %rsi
	movl	%r14d, %edi
	callq	_writel_relaxed
	movq	(%r15), %rsi
	addq	(%rbx), %rsi
	movl	-44(%rbp), %edi                 ## 4-byte Reload
	callq	_writel_relaxed
LBB0_7:
	leaq	12(%r13), %rdi
	leaq	4(%r13), %rbx
	movq	%rbx, %rsi
	callq	_list_splice_tail_init
	movq	%r13, %rdi
	addq	$8, %rdi
	movq	%rbx, %rsi
	callq	_list_splice_tail_init
	movq	%r13, %rdi
	callq	_spin_unlock_irqrestore
	xorl	%eax, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_SIRFSOC_DMA_INT_EN_CLR,8,3     ## @SIRFSOC_DMA_INT_EN_CLR
	.comm	_SIRFSOC_DMA_CH_INT,8,3         ## @SIRFSOC_DMA_CH_INT
	.comm	_SIRFSOC_DMA_CH_LOOP_CTRL_CLR_ATLAS7,8,3 ## @SIRFSOC_DMA_CH_LOOP_CTRL_CLR_ATLAS7
	.comm	_SIRFSOC_DMA_CH_VALID,8,3       ## @SIRFSOC_DMA_CH_VALID
	.comm	_SIRFSOC_DMA_INT_EN_ATLAS7,8,3  ## @SIRFSOC_DMA_INT_EN_ATLAS7
	.comm	_SIRFSOC_DMA_INT_ALL_ATLAS7,4,2 ## @SIRFSOC_DMA_INT_ALL_ATLAS7
	.comm	_SIRFSOC_DMA_INT_ATLAS7,8,3     ## @SIRFSOC_DMA_INT_ATLAS7
	.comm	_SIRFSOC_DMA_LOOP_CTRL_ATLAS7,8,3 ## @SIRFSOC_DMA_LOOP_CTRL_ATLAS7
	.comm	_SIRFSOC_DMA_VALID_ATLAS7,8,3   ## @SIRFSOC_DMA_VALID_ATLAS7
	.comm	_SIRFSOC_DMA_INT_EN,8,3         ## @SIRFSOC_DMA_INT_EN
	.comm	_SIRFSOC_DMA_CH_LOOP_CTRL,8,3   ## @SIRFSOC_DMA_CH_LOOP_CTRL
	.no_dead_strip	_sirfsoc_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 sirfsoc_dma_terminate_all
_sirfsoc_dma_terminate_all:             ; @sirfsoc_dma_terminate_all
	.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
	bl	_dma_chan_to_sirfsoc_dma_chan
	mov	x19, x0
	add	x0, x0, #16
	bl	_dma_chan_to_sirfsoc_dma
	mov	x20, x0
	ldr	w22, [x19, #16]
	mov	x0, x19
	bl	_spin_lock_irqsave
	ldr	w8, [x20]
	cmp	w8, #128
	b.eq	LBB0_4
; %bb.1:
	cmp	w8, #130
	b.eq	LBB0_5
; %bb.2:
	cmp	w8, #129
	b.ne	LBB0_7
; %bb.3:
	mov	w23, #1
	lsl	w21, w23, w22
	ldr	x8, [x20, #8]!
Lloh0:
	adrp	x9, _SIRFSOC_DMA_INT_EN_CLR@GOTPAGE
Lloh1:
	ldr	x9, [x9, _SIRFSOC_DMA_INT_EN_CLR@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	add	x1, x9, x8
	mov	x0, x21
	bl	_writel_relaxed
	ldr	x8, [x20]
Lloh3:
	adrp	x9, _SIRFSOC_DMA_CH_INT@GOTPAGE
Lloh4:
	ldr	x9, [x9, _SIRFSOC_DMA_CH_INT@GOTPAGEOFF]
Lloh5:
	ldr	x9, [x9]
	add	x1, x9, x8
	mov	x0, x21
	bl	_writel_relaxed
	add	w8, w22, #16
	lsl	w8, w23, w8
	orr	w0, w8, w21
Lloh6:
	adrp	x22, _SIRFSOC_DMA_CH_VALID@GOTPAGE
Lloh7:
	ldr	x22, [x22, _SIRFSOC_DMA_CH_VALID@GOTPAGEOFF]
Lloh8:
	adrp	x23, _SIRFSOC_DMA_CH_LOOP_CTRL_CLR_ATLAS7@GOTPAGE
Lloh9:
	ldr	x23, [x23, _SIRFSOC_DMA_CH_LOOP_CTRL_CLR_ATLAS7@GOTPAGEOFF]
	b	LBB0_6
LBB0_4:
	ldr	x8, [x20, #8]!
Lloh10:
	adrp	x9, _SIRFSOC_DMA_INT_EN_ATLAS7@GOTPAGE
Lloh11:
	ldr	x9, [x9, _SIRFSOC_DMA_INT_EN_ATLAS7@GOTPAGEOFF]
Lloh12:
	ldr	x9, [x9]
	add	x1, x9, x8
	mov	w0, #0
	bl	_writel_relaxed
Lloh13:
	adrp	x8, _SIRFSOC_DMA_INT_ALL_ATLAS7@GOTPAGE
Lloh14:
	ldr	x8, [x8, _SIRFSOC_DMA_INT_ALL_ATLAS7@GOTPAGEOFF]
Lloh15:
	ldr	w0, [x8]
	ldr	x8, [x20]
Lloh16:
	adrp	x9, _SIRFSOC_DMA_INT_ATLAS7@GOTPAGE
Lloh17:
	ldr	x9, [x9, _SIRFSOC_DMA_INT_ATLAS7@GOTPAGEOFF]
Lloh18:
	ldr	x9, [x9]
	add	x1, x9, x8
	bl	_writel_relaxed
	mov	w0, #0
	mov	w21, #0
Lloh19:
	adrp	x22, _SIRFSOC_DMA_VALID_ATLAS7@GOTPAGE
Lloh20:
	ldr	x22, [x22, _SIRFSOC_DMA_VALID_ATLAS7@GOTPAGEOFF]
Lloh21:
	adrp	x23, _SIRFSOC_DMA_LOOP_CTRL_ATLAS7@GOTPAGE
Lloh22:
	ldr	x23, [x23, _SIRFSOC_DMA_LOOP_CTRL_ATLAS7@GOTPAGEOFF]
	b	LBB0_6
LBB0_5:
	ldr	x8, [x20, #8]!
Lloh23:
	adrp	x23, _SIRFSOC_DMA_INT_EN@GOTPAGE
Lloh24:
	ldr	x23, [x23, _SIRFSOC_DMA_INT_EN@GOTPAGEOFF]
	ldr	x9, [x23]
	add	x0, x9, x8
	bl	_readl_relaxed
	mov	w24, #1
	lsl	w21, w24, w22
	bic	w0, w0, w21
	ldr	x8, [x20]
	ldr	x9, [x23]
	add	x1, x9, x8
	bl	_writel_relaxed
	ldr	x8, [x20]
Lloh25:
	adrp	x23, _SIRFSOC_DMA_CH_LOOP_CTRL@GOTPAGE
Lloh26:
	ldr	x23, [x23, _SIRFSOC_DMA_CH_LOOP_CTRL@GOTPAGEOFF]
	ldr	x9, [x23]
	add	x0, x9, x8
	bl	_readl_relaxed
	add	w8, w22, #16
	lsl	w8, w24, w8
	orr	w8, w8, w21
	bic	w0, w0, w8
Lloh27:
	adrp	x22, _SIRFSOC_DMA_CH_VALID@GOTPAGE
Lloh28:
	ldr	x22, [x22, _SIRFSOC_DMA_CH_VALID@GOTPAGEOFF]
LBB0_6:
	ldr	x8, [x20]
	ldr	x9, [x23]
	add	x1, x9, x8
	bl	_writel_relaxed
	ldr	x8, [x20]
	ldr	x9, [x22]
	add	x1, x9, x8
	mov	x0, x21
	bl	_writel_relaxed
LBB0_7:
	add	x0, x19, #12
	add	x20, x19, #4
	mov	x1, x20
	bl	_list_splice_tail_init
	add	x0, x19, #8
	mov	x1, x20
	bl	_list_splice_tail_init
	mov	x0, x19
	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	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh21, Lloh22
	.loh AdrpLdrGot	Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh27, Lloh28
	.loh AdrpLdrGot	Lloh25, Lloh26
	.loh AdrpLdrGot	Lloh23, Lloh24
	.cfi_endproc
                                        ; -- End function
	.comm	_SIRFSOC_DMA_INT_EN_CLR,8,3     ; @SIRFSOC_DMA_INT_EN_CLR
	.comm	_SIRFSOC_DMA_CH_INT,8,3         ; @SIRFSOC_DMA_CH_INT
	.comm	_SIRFSOC_DMA_CH_LOOP_CTRL_CLR_ATLAS7,8,3 ; @SIRFSOC_DMA_CH_LOOP_CTRL_CLR_ATLAS7
	.comm	_SIRFSOC_DMA_CH_VALID,8,3       ; @SIRFSOC_DMA_CH_VALID
	.comm	_SIRFSOC_DMA_INT_EN_ATLAS7,8,3  ; @SIRFSOC_DMA_INT_EN_ATLAS7
	.comm	_SIRFSOC_DMA_INT_ALL_ATLAS7,4,2 ; @SIRFSOC_DMA_INT_ALL_ATLAS7
	.comm	_SIRFSOC_DMA_INT_ATLAS7,8,3     ; @SIRFSOC_DMA_INT_ATLAS7
	.comm	_SIRFSOC_DMA_LOOP_CTRL_ATLAS7,8,3 ; @SIRFSOC_DMA_LOOP_CTRL_ATLAS7
	.comm	_SIRFSOC_DMA_VALID_ATLAS7,8,3   ; @SIRFSOC_DMA_VALID_ATLAS7
	.comm	_SIRFSOC_DMA_INT_EN,8,3         ; @SIRFSOC_DMA_INT_EN
	.comm	_SIRFSOC_DMA_CH_LOOP_CTRL,8,3   ; @SIRFSOC_DMA_CH_LOOP_CTRL
	.no_dead_strip	_sirfsoc_dma_terminate_all
.subsections_via_symbols
