	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function sprd_dma_pause_resume
_sprd_dma_pause_resume:                 ## @sprd_dma_pause_resume
	.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
	movl	%esi, %r15d
	movq	%rdi, %r12
	addq	$8, %rdi
	callq	_to_sprd_dma_dev
	testl	%r15d, %r15d
	je	LBB0_7
## %bb.1:
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	movq	_SPRD_DMA_PAUSE_CNT@GOTPCREL(%rip), %rax
	movq	(%rax), %rbx
	movq	_SPRD_DMA_CHN_PAUSE@GOTPCREL(%rip), %r15
	movq	(%r15), %rsi
	movq	_SPRD_DMA_PAUSE_EN@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	%r12, %rdi
	movl	%ecx, %edx
	callq	_sprd_dma_chn_update
	testq	%rbx, %rbx
	movl	$1, %r13d
	cmovleq	%rbx, %r13
	decq	%r13
	movq	_SPRD_DMA_PAUSE_STS@GOTPCREL(%rip), %r14
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%r15), %rdi
	addq	(%r12), %rdi
	callq	_readl
	testq	%rax, (%r14)
	jne	LBB0_5
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	xorl	%eax, %eax
	callq	_cpu_relax
	leaq	-1(%rbx), %rax
	cmpq	$1, %rbx
	movq	%rax, %rbx
	jg	LBB0_2
## %bb.4:
	movq	%r13, %rbx
LBB0_5:
	testq	%rbx, %rbx
	je	LBB0_6
## %bb.8:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_7:
	movq	_SPRD_DMA_CHN_PAUSE@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	movq	_SPRD_DMA_PAUSE_EN@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r12, %rdi
	xorl	%ecx, %ecx
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_sprd_dma_chn_update            ## TAILCALL
LBB0_6:
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movl	(%rax), %edi
	leaq	L_.str(%rip), %rsi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_dev_warn                       ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_SPRD_DMA_PAUSE_CNT,8,3         ## @SPRD_DMA_PAUSE_CNT
	.comm	_SPRD_DMA_CHN_PAUSE,8,3         ## @SPRD_DMA_CHN_PAUSE
	.comm	_SPRD_DMA_PAUSE_EN,4,2          ## @SPRD_DMA_PAUSE_EN
	.comm	_SPRD_DMA_PAUSE_STS,8,3         ## @SPRD_DMA_PAUSE_STS
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"pause dma controller timeout\n"

	.no_dead_strip	_sprd_dma_pause_resume
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function sprd_dma_pause_resume
_sprd_dma_pause_resume:                 ; @sprd_dma_pause_resume
	.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	x21, x1
	mov	x19, x0
	add	x0, x0, #8
	bl	_to_sprd_dma_dev
	cbz	w21, LBB0_7
; %bb.1:
	mov	x20, x0
Lloh0:
	adrp	x8, _SPRD_DMA_PAUSE_CNT@GOTPAGE
Lloh1:
	ldr	x8, [x8, _SPRD_DMA_PAUSE_CNT@GOTPAGEOFF]
Lloh2:
	ldr	x21, [x8]
Lloh3:
	adrp	x22, _SPRD_DMA_CHN_PAUSE@GOTPAGE
Lloh4:
	ldr	x22, [x22, _SPRD_DMA_CHN_PAUSE@GOTPAGEOFF]
	ldr	x1, [x22]
Lloh5:
	adrp	x8, _SPRD_DMA_PAUSE_EN@GOTPAGE
Lloh6:
	ldr	x8, [x8, _SPRD_DMA_PAUSE_EN@GOTPAGEOFF]
Lloh7:
	ldr	w2, [x8]
	mov	x0, x19
	mov	x3, x2
	bl	_sprd_dma_chn_update
	cmp	x21, #1
	csinc	x8, x21, xzr, lt
	sub	x23, x8, #1
Lloh8:
	adrp	x24, _SPRD_DMA_PAUSE_STS@GOTPAGE
Lloh9:
	ldr	x24, [x24, _SPRD_DMA_PAUSE_STS@GOTPAGEOFF]
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x19]
	ldr	x9, [x22]
	add	x0, x9, x8
	bl	_readl
	ldr	x8, [x24]
	tst	x8, x0
	b.ne	LBB0_5
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	bl	_cpu_relax
	subs	x21, x21, #1
	b.gt	LBB0_2
; %bb.4:
	mov	x21, x23
LBB0_5:
	cbz	x21, LBB0_8
; %bb.6:
	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
LBB0_7:
Lloh10:
	adrp	x8, _SPRD_DMA_CHN_PAUSE@GOTPAGE
Lloh11:
	ldr	x8, [x8, _SPRD_DMA_CHN_PAUSE@GOTPAGEOFF]
Lloh12:
	adrp	x9, _SPRD_DMA_PAUSE_EN@GOTPAGE
Lloh13:
	ldr	x9, [x9, _SPRD_DMA_PAUSE_EN@GOTPAGEOFF]
Lloh14:
	ldr	x1, [x8]
Lloh15:
	ldr	w2, [x9]
	mov	x0, x19
	mov	w3, #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
	b	_sprd_dma_chn_update
LBB0_8:
	ldr	w0, [x20]
Lloh16:
	adrp	x1, l_.str@PAGE
Lloh17:
	add	x1, x1, l_.str@PAGEOFF
	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
	b	_dev_warn
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh15
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh14
	.loh AdrpAdd	Lloh16, Lloh17
	.cfi_endproc
                                        ; -- End function
	.comm	_SPRD_DMA_PAUSE_CNT,8,3         ; @SPRD_DMA_PAUSE_CNT
	.comm	_SPRD_DMA_CHN_PAUSE,8,3         ; @SPRD_DMA_CHN_PAUSE
	.comm	_SPRD_DMA_PAUSE_EN,4,2          ; @SPRD_DMA_PAUSE_EN
	.comm	_SPRD_DMA_PAUSE_STS,8,3         ; @SPRD_DMA_PAUSE_STS
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"pause dma controller timeout\n"

	.no_dead_strip	_sprd_dma_pause_resume
.subsections_via_symbols
