	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function sun6i_dma_interrupt
_sun6i_dma_interrupt:                   ## @sun6i_dma_interrupt
	.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	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	_IRQ_NONE@GOTPCREL(%rip), %rax
	movl	(%rax), %r12d
	movl	(%rsi), %eax
	movq	_DMA_IRQ_CHAN_NR@GOTPCREL(%rip), %rcx
	cltd
	idivl	(%rcx)
	testl	%eax, %eax
	jle	LBB0_17
## %bb.1:
	leaq	8(%rsi), %rax
	movq	%rax, -64(%rbp)                 ## 8-byte Spill
	leaq	4(%rsi), %rax
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	xorl	%ebx, %ebx
	movq	%rsi, -48(%rbp)                 ## 8-byte Spill
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_13:                                ##   in Loop: Header=BB0_2 Depth=1
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	callq	_atomic_read
	testl	%eax, %eax
	je	LBB0_14
LBB0_15:                                ##   in Loop: Header=BB0_2 Depth=1
	movq	_IRQ_HANDLED@GOTPCREL(%rip), %rax
	movl	(%rax), %r12d
	movq	-48(%rbp), %rsi                 ## 8-byte Reload
	movq	-72(%rbp), %rbx                 ## 8-byte Reload
LBB0_16:                                ##   in Loop: Header=BB0_2 Depth=1
	incl	%ebx
	movl	(%rsi), %eax
	cltd
	movq	_DMA_IRQ_CHAN_NR@GOTPCREL(%rip), %rcx
	idivl	(%rcx)
	cmpl	%eax, %ebx
	jge	LBB0_17
LBB0_2:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_5 Depth 2
	movq	24(%rsi), %r14
	movl	%ebx, %edi
	callq	_DMA_IRQ_STAT
	addq	%rax, %r14
	movq	%r14, %rdi
	callq	_readl
	movq	-48(%rbp), %rsi                 ## 8-byte Reload
	testl	%eax, %eax
	je	LBB0_16
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	movl	%eax, %r15d
	movl	32(%rsi), %edi
	testl	%ebx, %ebx
	leaq	L_.str.1(%rip), %rdx
	leaq	L_.str.2(%rip), %rax
	cmoveq	%rax, %rdx
	leaq	L_.str(%rip), %rsi
	movl	%r15d, %ecx
	callq	_dev_dbg
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movq	24(%rax), %r14
	movq	%rbx, -72(%rbp)                 ## 8-byte Spill
	movl	%ebx, %edi
	callq	_DMA_IRQ_STAT
	addq	%rax, %r14
	movl	%r15d, %edi
	movq	%r14, %rsi
	callq	_writel
	movq	-48(%rbp), %rdx                 ## 8-byte Reload
	movq	_DMA_IRQ_CHAN_NR@GOTPCREL(%rip), %rsi
	cmpl	$0, (%rsi)
	movq	_DMA_IRQ_CHAN_WIDTH@GOTPCREL(%rip), %rdi
	jle	LBB0_13
## %bb.4:                               ##   in Loop: Header=BB0_2 Depth=1
	movl	$1, %r13d
	xorl	%r12d, %r12d
	.p2align	4, 0x90
LBB0_5:                                 ##   Parent Loop BB0_2 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movq	16(%rdx), %r14
	movq	16(%r14,%r12), %rbx
	testq	%rbx, %rbx
	je	LBB0_11
## %bb.6:                               ##   in Loop: Header=BB0_5 Depth=2
	testl	%r15d, (%rbx)
	je	LBB0_11
## %bb.7:                               ##   in Loop: Header=BB0_5 Depth=2
	cmpq	$0, 8(%rbx)
	je	LBB0_9
## %bb.8:                               ##   in Loop: Header=BB0_5 Depth=2
	movq	(%r14,%r12), %rdi
	callq	_vchan_cyclic_callback
	jmp	LBB0_10
LBB0_9:                                 ##   in Loop: Header=BB0_5 Depth=2
	addq	$4, %rbx
	movq	%rbx, %rdi
	callq	_spin_lock
	movq	(%r14,%r12), %rdi
	callq	_vchan_cookie_complete
	movq	(%r14,%r12), %rax
	movq	%rax, 8(%r14,%r12)
	movq	%rbx, %rdi
	callq	_spin_unlock
LBB0_10:                                ##   in Loop: Header=BB0_5 Depth=2
	movq	-48(%rbp), %rdx                 ## 8-byte Reload
	movq	_DMA_IRQ_CHAN_NR@GOTPCREL(%rip), %rsi
	movq	_DMA_IRQ_CHAN_WIDTH@GOTPCREL(%rip), %rdi
LBB0_11:                                ##   in Loop: Header=BB0_5 Depth=2
	movzbl	(%rdi), %ecx
	sarl	%cl, %r15d
	movslq	(%rsi), %rax
	cmpq	%rax, %r13
	jge	LBB0_13
## %bb.12:                              ##   in Loop: Header=BB0_5 Depth=2
	addq	$24, %r12
	incq	%r13
	testl	%r15d, %r15d
	jne	LBB0_5
	jmp	LBB0_13
	.p2align	4, 0x90
LBB0_14:                                ##   in Loop: Header=BB0_2 Depth=1
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	callq	_tasklet_schedule
	jmp	LBB0_15
LBB0_17:
	movl	%r12d, %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_IRQ_NONE,4,2                   ## @IRQ_NONE
	.comm	_DMA_IRQ_CHAN_NR,4,2            ## @DMA_IRQ_CHAN_NR
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"DMA irq status %s: 0x%x\n"

L_.str.1:                               ## @.str.1
	.asciz	"high"

L_.str.2:                               ## @.str.2
	.asciz	"low"

	.comm	_DMA_IRQ_CHAN_WIDTH,4,2         ## @DMA_IRQ_CHAN_WIDTH
	.comm	_IRQ_HANDLED,4,2                ## @IRQ_HANDLED
	.no_dead_strip	_sun6i_dma_interrupt
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function sun6i_dma_interrupt
_sun6i_dma_interrupt:                   ; @sun6i_dma_interrupt
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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
	.cfi_offset w27, -88
	.cfi_offset w28, -96
Lloh0:
	adrp	x8, _IRQ_NONE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _IRQ_NONE@GOTPAGEOFF]
Lloh2:
	ldr	w25, [x8]
	ldr	w8, [x1]
Lloh3:
	adrp	x26, _DMA_IRQ_CHAN_NR@GOTPAGE
Lloh4:
	ldr	x26, [x26, _DMA_IRQ_CHAN_NR@GOTPAGEOFF]
	ldr	w9, [x26]
	sdiv	w8, w8, w9
	cmp	w8, #1
	b.lt	LBB0_15
; %bb.1:
	mov	x19, x1
	mov	w20, #0
	add	x21, x1, #8
	add	x8, x1, #4
	str	x8, [sp, #8]                    ; 8-byte Folded Spill
Lloh5:
	adrp	x22, _DMA_IRQ_CHAN_WIDTH@GOTPAGE
Lloh6:
	ldr	x22, [x22, _DMA_IRQ_CHAN_WIDTH@GOTPAGEOFF]
	b	LBB0_5
LBB0_2:                                 ;   in Loop: Header=BB0_5 Depth=1
	mov	x0, x21
	bl	_atomic_read
	cbz	w0, LBB0_14
LBB0_3:                                 ;   in Loop: Header=BB0_5 Depth=1
Lloh7:
	adrp	x8, _IRQ_HANDLED@GOTPAGE
Lloh8:
	ldr	x8, [x8, _IRQ_HANDLED@GOTPAGEOFF]
Lloh9:
	ldr	w25, [x8]
LBB0_4:                                 ;   in Loop: Header=BB0_5 Depth=1
	add	w20, w20, #1
	ldr	w8, [x19]
	ldr	w9, [x26]
	sdiv	w8, w8, w9
	cmp	w20, w8
	b.ge	LBB0_15
LBB0_5:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_10 Depth 2
	ldr	x23, [x19, #24]
	mov	x0, x20
	bl	_DMA_IRQ_STAT
	add	x0, x0, x23
	bl	_readl
	cbz	w0, LBB0_4
; %bb.6:                                ;   in Loop: Header=BB0_5 Depth=1
	mov	x24, x0
	ldr	w0, [x19, #32]
	cmp	w20, #0
Lloh10:
	adrp	x8, l_.str.1@PAGE
Lloh11:
	add	x8, x8, l_.str.1@PAGEOFF
Lloh12:
	adrp	x9, l_.str.2@PAGE
Lloh13:
	add	x9, x9, l_.str.2@PAGEOFF
	csel	x2, x9, x8, eq
Lloh14:
	adrp	x1, l_.str@PAGE
Lloh15:
	add	x1, x1, l_.str@PAGEOFF
	mov	x3, x24
	bl	_dev_dbg
	ldr	x23, [x19, #24]
	mov	x0, x20
	bl	_DMA_IRQ_STAT
	add	x1, x0, x23
	mov	x0, x24
	bl	_writel
	ldr	w8, [x26]
	cmp	w8, #1
	b.lt	LBB0_2
; %bb.7:                                ;   in Loop: Header=BB0_5 Depth=1
	mov	x28, #0
	mov	w27, #1
	b	LBB0_10
LBB0_8:                                 ;   in Loop: Header=BB0_10 Depth=2
	ldr	x0, [x23, x28]
	bl	_vchan_cyclic_callback
LBB0_9:                                 ;   in Loop: Header=BB0_10 Depth=2
	ldr	w8, [x22]
	asr	w24, w24, w8
	ldrsw	x8, [x26]
	add	x28, x28, #24
	cmp	x27, x8
	add	x27, x27, #1
	ccmp	w24, #0, #4, lt
	b.eq	LBB0_2
LBB0_10:                                ;   Parent Loop BB0_5 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldr	x23, [x19, #16]
	add	x8, x23, x28
	ldr	x8, [x8, #16]
	cbz	x8, LBB0_9
; %bb.11:                               ;   in Loop: Header=BB0_10 Depth=2
	ldr	w9, [x8]
	tst	w9, w24
	b.eq	LBB0_9
; %bb.12:                               ;   in Loop: Header=BB0_10 Depth=2
	ldr	x9, [x8, #8]
	cbnz	x9, LBB0_8
; %bb.13:                               ;   in Loop: Header=BB0_10 Depth=2
	add	x25, x8, #4
	mov	x0, x25
	bl	_spin_lock
	add	x23, x23, x28
	ldr	x0, [x23]
	bl	_vchan_cookie_complete
	ldr	x8, [x23]
	str	x8, [x23, #8]
	mov	x0, x25
	bl	_spin_unlock
	b	LBB0_9
LBB0_14:                                ;   in Loop: Header=BB0_5 Depth=1
	ldr	x0, [sp, #8]                    ; 8-byte Folded Reload
	bl	_tasklet_schedule
	b	LBB0_3
LBB0_15:
	mov	x0, x25
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpAdd	Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_IRQ_NONE,4,2                   ; @IRQ_NONE
	.comm	_DMA_IRQ_CHAN_NR,4,2            ; @DMA_IRQ_CHAN_NR
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"DMA irq status %s: 0x%x\n"

l_.str.1:                               ; @.str.1
	.asciz	"high"

l_.str.2:                               ; @.str.2
	.asciz	"low"

	.comm	_DMA_IRQ_CHAN_WIDTH,4,2         ; @DMA_IRQ_CHAN_WIDTH
	.comm	_IRQ_HANDLED,4,2                ; @IRQ_HANDLED
	.no_dead_strip	_sun6i_dma_interrupt
.subsections_via_symbols
