	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function sun6i_dma_start_desc
_sun6i_dma_start_desc:                  ## @sun6i_dma_start_desc
	.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
	movq	%rdi, %r12
	leaq	24(%rdi), %rbx
	movl	24(%rdi), %edi
	callq	_to_sun6i_dma_dev
	movq	%rax, %r14
	movq	%rbx, %rdi
	callq	_vchan_next_desc
	movq	16(%r12), %r15
	testq	%r15, %r15
	je	LBB0_1
## %bb.2:
	movq	%rax, %rbx
	testq	%rax, %rax
	je	LBB0_3
## %bb.4:
	movq	%rbx, %rdi
	addq	$4, %rdi
	callq	_list_del
	movq	%rbx, %rdi
	callq	_to_sun6i_desc
	movq	%rax, 16(%r15)
	movq	$0, 24(%r15)
	movl	4(%rax), %esi
	movq	%r12, %rdi
	callq	_sun6i_dma_dump_lli
	movl	(%r15), %eax
	movq	_DMA_IRQ_CHAN_NR@GOTPCREL(%rip), %rcx
	cltd
	idivl	(%rcx)
	movl	%eax, %edi
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	movl	%edx, %r13d
	cmpq	$0, 8(%r12)
	movq	_DMA_IRQ_PKG@GOTPCREL(%rip), %rax
	cmoveq	_DMA_IRQ_QUEUE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, (%r12)
	movq	(%r14), %rbx
	callq	_DMA_IRQ_EN
	addq	%rax, %rbx
	movq	%rbx, %rdi
	callq	_readl
	movq	_DMA_IRQ_HALF@GOTPCREL(%rip), %rcx
	movq	_DMA_IRQ_PKG@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	orl	(%rcx), %edx
	movq	_DMA_IRQ_QUEUE@GOTPCREL(%rip), %rcx
	orl	(%rcx), %edx
	movq	_DMA_IRQ_CHAN_WIDTH@GOTPCREL(%rip), %rcx
	imull	(%rcx), %r13d
	movl	%r13d, %ecx
	shll	%cl, %edx
	movl	(%r12), %ebx
	shll	%cl, %ebx
	notl	%edx
	andl	%eax, %edx
	orl	%edx, %ebx
	movq	(%r14), %r12
	movl	-44(%rbp), %edi                 ## 4-byte Reload
	callq	_DMA_IRQ_EN
	addq	%rax, %r12
	movl	%ebx, %edi
	movq	%r12, %rsi
	callq	_writel
	movq	16(%r15), %rax
	movl	(%rax), %edi
	movq	_DMA_CHAN_LLI_ADDR@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	addq	8(%r15), %rsi
	callq	_writel
	movq	_DMA_CHAN_ENABLE_START@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_DMA_CHAN_ENABLE@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	addq	8(%r15), %rsi
	callq	_writel
	movq	%r14, %rdi
	callq	_sun6i_dma_dump_com_regs
	movq	%r14, %rdi
	movq	%r15, %rsi
	callq	_sun6i_dma_dump_chan_regs
	xorl	%eax, %eax
	jmp	LBB0_5
LBB0_3:
	xorps	%xmm0, %xmm0
	movups	%xmm0, 16(%r15)
LBB0_1:
	movq	_EAGAIN@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_5:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EAGAIN,4,2                     ## @EAGAIN
	.comm	_DMA_IRQ_CHAN_NR,4,2            ## @DMA_IRQ_CHAN_NR
	.comm	_DMA_IRQ_PKG,4,2                ## @DMA_IRQ_PKG
	.comm	_DMA_IRQ_QUEUE,4,2              ## @DMA_IRQ_QUEUE
	.comm	_DMA_IRQ_HALF,4,2               ## @DMA_IRQ_HALF
	.comm	_DMA_IRQ_CHAN_WIDTH,4,2         ## @DMA_IRQ_CHAN_WIDTH
	.comm	_DMA_CHAN_LLI_ADDR,8,3          ## @DMA_CHAN_LLI_ADDR
	.comm	_DMA_CHAN_ENABLE_START,4,2      ## @DMA_CHAN_ENABLE_START
	.comm	_DMA_CHAN_ENABLE,8,3            ## @DMA_CHAN_ENABLE
	.no_dead_strip	_sun6i_dma_start_desc
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function sun6i_dma_start_desc
_sun6i_dma_start_desc:                  ; @sun6i_dma_start_desc
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x21, x0
	mov	x20, x0
	ldr	w0, [x20, #24]!
	bl	_to_sun6i_dma_dev
	mov	x19, x0
	mov	x0, x20
	bl	_vchan_next_desc
	ldur	x20, [x20, #-8]
	cbz	x20, LBB0_4
; %bb.1:
	mov	x22, x0
	cbz	x0, LBB0_3
; %bb.2:
	add	x0, x22, #4
	bl	_list_del
	mov	x0, x22
	bl	_to_sun6i_desc
	stp	x0, xzr, [x20, #16]
	ldr	w1, [x0, #4]
	mov	x0, x21
	bl	_sun6i_dma_dump_lli
	ldr	w8, [x20]
Lloh0:
	adrp	x9, _DMA_IRQ_CHAN_NR@GOTPAGE
Lloh1:
	ldr	x9, [x9, _DMA_IRQ_CHAN_NR@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	sdiv	w22, w8, w9
	msub	w23, w22, w9, w8
Lloh3:
	adrp	x24, _DMA_IRQ_PKG@GOTPAGE
Lloh4:
	ldr	x24, [x24, _DMA_IRQ_PKG@GOTPAGEOFF]
Lloh5:
	adrp	x25, _DMA_IRQ_QUEUE@GOTPAGE
Lloh6:
	ldr	x25, [x25, _DMA_IRQ_QUEUE@GOTPAGEOFF]
	ldr	x8, [x21, #8]
	cmp	x8, #0
	csel	x8, x25, x24, eq
	ldr	w8, [x8]
	str	w8, [x21]
	ldr	x26, [x19]
	mov	x0, x22
	bl	_DMA_IRQ_EN
	add	x0, x0, x26
	bl	_readl
Lloh7:
	adrp	x8, _DMA_IRQ_HALF@GOTPAGE
Lloh8:
	ldr	x8, [x8, _DMA_IRQ_HALF@GOTPAGEOFF]
Lloh9:
	ldr	w8, [x8]
	ldr	w9, [x24]
	orr	w8, w9, w8
	ldr	w9, [x25]
	orr	w8, w8, w9
Lloh10:
	adrp	x9, _DMA_IRQ_CHAN_WIDTH@GOTPAGE
Lloh11:
	ldr	x9, [x9, _DMA_IRQ_CHAN_WIDTH@GOTPAGEOFF]
Lloh12:
	ldr	w9, [x9]
	mul	w9, w9, w23
	lsl	w8, w8, w9
	bic	w8, w0, w8
	ldr	w10, [x21]
	lsl	w9, w10, w9
	orr	w21, w8, w9
	ldr	x23, [x19]
	mov	x0, x22
	bl	_DMA_IRQ_EN
	add	x1, x0, x23
	mov	x0, x21
	bl	_writel
	ldp	x9, x8, [x20, #8]
	ldr	w0, [x8]
Lloh13:
	adrp	x8, _DMA_CHAN_LLI_ADDR@GOTPAGE
Lloh14:
	ldr	x8, [x8, _DMA_CHAN_LLI_ADDR@GOTPAGEOFF]
Lloh15:
	ldr	x8, [x8]
	add	x1, x8, x9
	bl	_writel
Lloh16:
	adrp	x8, _DMA_CHAN_ENABLE_START@GOTPAGE
Lloh17:
	ldr	x8, [x8, _DMA_CHAN_ENABLE_START@GOTPAGEOFF]
Lloh18:
	ldr	w0, [x8]
	ldr	x8, [x20, #8]
Lloh19:
	adrp	x9, _DMA_CHAN_ENABLE@GOTPAGE
Lloh20:
	ldr	x9, [x9, _DMA_CHAN_ENABLE@GOTPAGEOFF]
Lloh21:
	ldr	x9, [x9]
	add	x1, x9, x8
	bl	_writel
	mov	x0, x19
	bl	_sun6i_dma_dump_com_regs
	mov	x0, x19
	mov	x1, x20
	bl	_sun6i_dma_dump_chan_regs
	mov	w0, #0
	b	LBB0_5
LBB0_3:
	stp	xzr, xzr, [x20, #16]
LBB0_4:
Lloh22:
	adrp	x8, _EAGAIN@GOTPAGE
Lloh23:
	ldr	x8, [x8, _EAGAIN@GOTPAGEOFF]
Lloh24:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_5:
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.cfi_endproc
                                        ; -- End function
	.comm	_EAGAIN,4,2                     ; @EAGAIN
	.comm	_DMA_IRQ_CHAN_NR,4,2            ; @DMA_IRQ_CHAN_NR
	.comm	_DMA_IRQ_PKG,4,2                ; @DMA_IRQ_PKG
	.comm	_DMA_IRQ_QUEUE,4,2              ; @DMA_IRQ_QUEUE
	.comm	_DMA_IRQ_HALF,4,2               ; @DMA_IRQ_HALF
	.comm	_DMA_IRQ_CHAN_WIDTH,4,2         ; @DMA_IRQ_CHAN_WIDTH
	.comm	_DMA_CHAN_LLI_ADDR,8,3          ; @DMA_CHAN_LLI_ADDR
	.comm	_DMA_CHAN_ENABLE_START,4,2      ; @DMA_CHAN_ENABLE_START
	.comm	_DMA_CHAN_ENABLE,8,3            ; @DMA_CHAN_ENABLE
	.no_dead_strip	_sun6i_dma_start_desc
.subsections_via_symbols
