	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mtk_ecc_irq
_mtk_ecc_irq:                           ## @mtk_ecc_irq
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %rbx
	movq	8(%rsi), %rax
	movq	(%rax), %rax
	movq	_ECC_DECIRQ_STA@GOTPCREL(%rip), %r14
	movq	(%r14), %rcx
	movq	(%rax,%rcx,8), %rdi
	addq	16(%rsi), %rdi
	callq	_readw
	movq	_ECC_IRQ_EN@GOTPCREL(%rip), %r15
	movq	8(%rbx), %rcx
	movq	16(%rbx), %rdi
	movq	(%rcx), %rcx
	testl	%eax, (%r15)
	je	LBB0_5
## %bb.1:
	movq	_ECC_DECDONE@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	addq	(%rcx,%rax,8), %rdi
	callq	_readw
	testl	%eax, (%rbx)
	je	LBB0_4
## %bb.2:
	movq	8(%rbx), %rax
	movq	(%rax), %rax
	movq	(%r14), %rcx
	movq	(%rax,%rcx,8), %rdi
	addq	16(%rbx), %rdi
	callq	_readw
	movl	$0, (%rbx)
	jmp	LBB0_3
LBB0_5:
	movq	_ECC_ENCIRQ_STA@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	addq	(%rcx,%rax,8), %rdi
	callq	_readl
	testl	%eax, (%r15)
	je	LBB0_6
LBB0_3:
	addq	$4, %rbx
	movq	%rbx, %rdi
	callq	_complete
LBB0_4:
	movq	_IRQ_HANDLED@GOTPCREL(%rip), %rax
LBB0_7:
	movl	(%rax), %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_6:
	movq	_IRQ_NONE@GOTPCREL(%rip), %rax
	jmp	LBB0_7
	.cfi_endproc
                                        ## -- End function
	.comm	_ECC_DECIRQ_STA,8,3             ## @ECC_DECIRQ_STA
	.comm	_ECC_IRQ_EN,4,2                 ## @ECC_IRQ_EN
	.comm	_ECC_DECDONE,8,3                ## @ECC_DECDONE
	.comm	_IRQ_HANDLED,4,2                ## @IRQ_HANDLED
	.comm	_ECC_ENCIRQ_STA,8,3             ## @ECC_ENCIRQ_STA
	.comm	_IRQ_NONE,4,2                   ## @IRQ_NONE
	.no_dead_strip	_mtk_ecc_irq
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mtk_ecc_irq
_mtk_ecc_irq:                           ; @mtk_ecc_irq
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	mov	x19, x1
	ldp	x9, x8, [x1, #8]
	ldr	x9, [x9]
Lloh0:
	adrp	x20, _ECC_DECIRQ_STA@GOTPAGE
Lloh1:
	ldr	x20, [x20, _ECC_DECIRQ_STA@GOTPAGEOFF]
	ldr	x10, [x20]
	ldr	x9, [x9, x10, lsl #3]
	add	x0, x9, x8
	bl	_readw
Lloh2:
	adrp	x21, _ECC_IRQ_EN@GOTPAGE
Lloh3:
	ldr	x21, [x21, _ECC_IRQ_EN@GOTPAGEOFF]
	ldr	w10, [x21]
	ldp	x9, x8, [x19, #8]
	ldr	x9, [x9]
	tst	w10, w0
	b.eq	LBB0_3
; %bb.1:
Lloh4:
	adrp	x10, _ECC_DECDONE@GOTPAGE
Lloh5:
	ldr	x10, [x10, _ECC_DECDONE@GOTPAGEOFF]
Lloh6:
	ldr	x10, [x10]
	ldr	x9, [x9, x10, lsl #3]
	add	x0, x9, x8
	bl	_readw
	ldr	w8, [x19]
	tst	w8, w0
	b.eq	LBB0_5
; %bb.2:
	ldp	x9, x8, [x19, #8]
	ldr	x9, [x9]
	ldr	x10, [x20]
	ldr	x9, [x9, x10, lsl #3]
	add	x0, x9, x8
	bl	_readw
	str	wzr, [x19]
	b	LBB0_4
LBB0_3:
Lloh7:
	adrp	x10, _ECC_ENCIRQ_STA@GOTPAGE
Lloh8:
	ldr	x10, [x10, _ECC_ENCIRQ_STA@GOTPAGEOFF]
Lloh9:
	ldr	x10, [x10]
	ldr	x9, [x9, x10, lsl #3]
	add	x0, x9, x8
	bl	_readl
	ldr	w8, [x21]
	tst	w8, w0
	b.eq	LBB0_7
LBB0_4:
	add	x0, x19, #4
	bl	_complete
LBB0_5:
Lloh10:
	adrp	x8, _IRQ_HANDLED@GOTPAGE
Lloh11:
	ldr	x8, [x8, _IRQ_HANDLED@GOTPAGEOFF]
LBB0_6:
	ldr	w0, [x8]
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
LBB0_7:
Lloh12:
	adrp	x8, _IRQ_NONE@GOTPAGE
Lloh13:
	ldr	x8, [x8, _IRQ_NONE@GOTPAGEOFF]
	b	LBB0_6
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh12, Lloh13
	.cfi_endproc
                                        ; -- End function
	.comm	_ECC_DECIRQ_STA,8,3             ; @ECC_DECIRQ_STA
	.comm	_ECC_IRQ_EN,4,2                 ; @ECC_IRQ_EN
	.comm	_ECC_DECDONE,8,3                ; @ECC_DECDONE
	.comm	_IRQ_HANDLED,4,2                ; @IRQ_HANDLED
	.comm	_ECC_ENCIRQ_STA,8,3             ; @ECC_ENCIRQ_STA
	.comm	_IRQ_NONE,4,2                   ; @IRQ_NONE
	.no_dead_strip	_mtk_ecc_irq
.subsections_via_symbols
