	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function uniphier_mdmac_interrupt
_uniphier_mdmac_interrupt:              ## @uniphier_mdmac_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	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rsi, %rbx
	movq	_IRQ_HANDLED@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
	movq	%rsi, %rdi
	callq	_spin_lock
	movq	_UNIPHIER_MDMAC_CH_IRQ_DET@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	addq	16(%rbx), %rdi
	callq	_readl
	testl	%eax, %eax
	je	LBB0_1
## %bb.2:
	movq	_UNIPHIER_MDMAC_CH_IRQ_REQ@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rsi
	addq	16(%rbx), %rsi
	movl	%eax, %edi
	callq	_writel
	movq	8(%rbx), %rsi
	testq	%rsi, %rsi
	je	LBB0_6
## %bb.3:
	movq	(%rsi), %rax
	incq	%rax
	movq	%rax, (%rsi)
	cmpq	8(%rsi), %rax
	jl	LBB0_5
## %bb.4:
	addq	$16, %rsi
	movq	%rsi, %rdi
	callq	_vchan_cookie_complete
	movq	%rbx, %rdi
	callq	_uniphier_mdmac_next_desc
	movq	%rax, %rsi
	testq	%rax, %rax
	je	LBB0_6
LBB0_5:
	movq	%rbx, %rdi
	callq	_uniphier_mdmac_handle
	jmp	LBB0_6
LBB0_1:
	movq	_IRQ_NONE@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
LBB0_6:
	movq	%rbx, %rdi
	callq	_spin_unlock
	movl	%r14d, %eax
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_IRQ_HANDLED,4,2                ## @IRQ_HANDLED
	.comm	_UNIPHIER_MDMAC_CH_IRQ_DET,8,3  ## @UNIPHIER_MDMAC_CH_IRQ_DET
	.comm	_IRQ_NONE,4,2                   ## @IRQ_NONE
	.comm	_UNIPHIER_MDMAC_CH_IRQ_REQ,8,3  ## @UNIPHIER_MDMAC_CH_IRQ_REQ
	.no_dead_strip	_uniphier_mdmac_interrupt
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function uniphier_mdmac_interrupt
_uniphier_mdmac_interrupt:              ; @uniphier_mdmac_interrupt
	.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, x1
Lloh0:
	adrp	x8, _IRQ_HANDLED@GOTPAGE
Lloh1:
	ldr	x8, [x8, _IRQ_HANDLED@GOTPAGEOFF]
Lloh2:
	ldr	w20, [x8]
	mov	x0, x1
	bl	_spin_lock
	ldr	x8, [x19, #16]
Lloh3:
	adrp	x9, _UNIPHIER_MDMAC_CH_IRQ_DET@GOTPAGE
Lloh4:
	ldr	x9, [x9, _UNIPHIER_MDMAC_CH_IRQ_DET@GOTPAGEOFF]
Lloh5:
	ldr	x9, [x9]
	add	x0, x9, x8
	bl	_readl
	cbz	w0, LBB0_5
; %bb.1:
	ldr	x8, [x19, #16]
Lloh6:
	adrp	x9, _UNIPHIER_MDMAC_CH_IRQ_REQ@GOTPAGE
Lloh7:
	ldr	x9, [x9, _UNIPHIER_MDMAC_CH_IRQ_REQ@GOTPAGEOFF]
Lloh8:
	ldr	x9, [x9]
	add	x1, x9, x8
	bl	_writel
	ldr	x1, [x19, #8]
	cbz	x1, LBB0_6
; %bb.2:
	ldp	x8, x9, [x1]
	add	x8, x8, #1
	str	x8, [x1]
	cmp	x8, x9
	b.lt	LBB0_4
; %bb.3:
	add	x0, x1, #16
	bl	_vchan_cookie_complete
	mov	x0, x19
	bl	_uniphier_mdmac_next_desc
	mov	x1, x0
	cbz	x0, LBB0_6
LBB0_4:
	mov	x0, x19
	bl	_uniphier_mdmac_handle
	b	LBB0_6
LBB0_5:
Lloh9:
	adrp	x8, _IRQ_NONE@GOTPAGE
Lloh10:
	ldr	x8, [x8, _IRQ_NONE@GOTPAGEOFF]
Lloh11:
	ldr	w20, [x8]
LBB0_6:
	mov	x0, x19
	bl	_spin_unlock
	mov	x0, x20
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_IRQ_HANDLED,4,2                ; @IRQ_HANDLED
	.comm	_UNIPHIER_MDMAC_CH_IRQ_DET,8,3  ; @UNIPHIER_MDMAC_CH_IRQ_DET
	.comm	_IRQ_NONE,4,2                   ; @IRQ_NONE
	.comm	_UNIPHIER_MDMAC_CH_IRQ_REQ,8,3  ; @UNIPHIER_MDMAC_CH_IRQ_REQ
	.no_dead_strip	_uniphier_mdmac_interrupt
.subsections_via_symbols
