	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function sprd_dma_start
_sprd_dma_start:                        ## @sprd_dma_start
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rdi, %r14
	addq	$20, %rdi
	callq	_vchan_next_desc
	testq	%rax, %rax
	je	LBB0_7
## %bb.1:
	movq	%rax, %rbx
	movq	%rax, %rdi
	callq	_list_del
	movq	%rbx, %rdi
	callq	_to_sprd_dma_desc
	movl	%eax, 16(%r14)
	cmpq	$0, (%r14)
	je	LBB0_4
## %bb.2:
	movq	%r14, %rdi
	callq	_sprd_dma_set_2stage_config
	testq	%rax, %rax
	jne	LBB0_7
## %bb.3:
	movl	16(%r14), %eax
LBB0_4:
	movq	%r14, %rdi
	movl	%eax, %esi
	callq	_sprd_dma_set_chn_config
	movq	%r14, %rdi
	callq	_sprd_dma_set_uid
	movq	%r14, %rdi
	callq	_sprd_dma_enable_chn
	movq	8(%r14), %rax
	movq	_SPRD_DMA_SOFTWARE_UID@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_7
## %bb.5:
	movq	(%r14), %rax
	movq	_SPRD_DMA_DST_CHN0@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_7
## %bb.6:
	movq	_SPRD_DMA_DST_CHN1@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_7
## %bb.8:
	movq	%r14, %rdi
	popq	%rbx
	popq	%r14
	popq	%rbp
	jmp	_sprd_dma_soft_request          ## TAILCALL
LBB0_7:
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_SPRD_DMA_SOFTWARE_UID,8,3      ## @SPRD_DMA_SOFTWARE_UID
	.comm	_SPRD_DMA_DST_CHN0,8,3          ## @SPRD_DMA_DST_CHN0
	.comm	_SPRD_DMA_DST_CHN1,8,3          ## @SPRD_DMA_DST_CHN1
	.no_dead_strip	_sprd_dma_start
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function sprd_dma_start
_sprd_dma_start:                        ; @sprd_dma_start
	.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
	mov	x19, x0
	add	x0, x0, #20
	bl	_vchan_next_desc
	cbz	x0, LBB0_7
; %bb.1:
	mov	x20, x0
	bl	_list_del
	mov	x0, x20
	bl	_to_sprd_dma_desc
	str	w0, [x19, #16]
	ldr	x8, [x19]
	cbz	x8, LBB0_4
; %bb.2:
	mov	x0, x19
	bl	_sprd_dma_set_2stage_config
	cbnz	x0, LBB0_7
; %bb.3:
	ldr	w1, [x19, #16]
	b	LBB0_5
LBB0_4:
	mov	x1, x0
LBB0_5:
	mov	x0, x19
	bl	_sprd_dma_set_chn_config
	mov	x0, x19
	bl	_sprd_dma_set_uid
	mov	x0, x19
	bl	_sprd_dma_enable_chn
	ldr	x8, [x19, #8]
Lloh0:
	adrp	x9, _SPRD_DMA_SOFTWARE_UID@GOTPAGE
Lloh1:
	ldr	x9, [x9, _SPRD_DMA_SOFTWARE_UID@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_7
; %bb.6:
	ldr	x8, [x19]
Lloh3:
	adrp	x9, _SPRD_DMA_DST_CHN0@GOTPAGE
Lloh4:
	ldr	x9, [x9, _SPRD_DMA_DST_CHN0@GOTPAGEOFF]
Lloh5:
	ldr	x9, [x9]
Lloh6:
	adrp	x10, _SPRD_DMA_DST_CHN1@GOTPAGE
Lloh7:
	ldr	x10, [x10, _SPRD_DMA_DST_CHN1@GOTPAGEOFF]
Lloh8:
	ldr	x10, [x10]
	cmp	x8, x9
	ccmp	x8, x10, #4, ne
	b.ne	LBB0_8
LBB0_7:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
LBB0_8:
	mov	x0, x19
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_sprd_dma_soft_request
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_SPRD_DMA_SOFTWARE_UID,8,3      ; @SPRD_DMA_SOFTWARE_UID
	.comm	_SPRD_DMA_DST_CHN0,8,3          ; @SPRD_DMA_DST_CHN0
	.comm	_SPRD_DMA_DST_CHN1,8,3          ; @SPRD_DMA_DST_CHN1
	.no_dead_strip	_sprd_dma_start
.subsections_via_symbols
