	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mtk_iommu_isr
_mtk_iommu_isr:                         ## @mtk_iommu_isr
	.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	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r12
	movq	16(%rsi), %rax
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	movq	_REG_MMU_FAULT_ST@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	addq	(%rsi), %rdi
	callq	_readl_relaxed
	movl	%eax, -48(%rbp)                 ## 4-byte Spill
	movq	_REG_MMU_FAULT_VA@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	addq	(%r12), %rdi
	callq	_readl_relaxed
	movl	%eax, %r15d
	movq	_F_MMU_FAULT_VA_MSK@GOTPCREL(%rip), %rax
	andl	(%rax), %r15d
	movq	_REG_MMU_INVLD_PA@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	addq	(%r12), %rdi
	callq	_readl_relaxed
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	movq	_REG_MMU_INT_ID@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	addq	(%r12), %rdi
	callq	_readl_relaxed
	movl	%eax, %ebx
	movl	%eax, %edi
	callq	_MT2701_M4U_TF_LARB
	movl	%eax, %r14d
	movl	%ebx, %edi
	callq	_MT2701_M4U_TF_PORT
	movl	%eax, %r13d
	movl	8(%r12), %esi
	movq	_IOMMU_FAULT_READ@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	movl	%r15d, %edx
	callq	_report_iommu_fault
	testq	%rax, %rax
	je	LBB0_2
## %bb.1:
	movl	8(%r12), %edi
	movl	%r13d, (%rsp)
	leaq	L_.str(%rip), %rsi
	movl	-48(%rbp), %edx                 ## 4-byte Reload
	movl	%r15d, %ecx
	movl	-44(%rbp), %r8d                 ## 4-byte Reload
	movl	%r14d, %r9d
	callq	_dev_err_ratelimited
LBB0_2:
	movq	_REG_MMU_INT_CONTROL@GOTPCREL(%rip), %rbx
	movq	(%rbx), %rdi
	addq	(%r12), %rdi
	callq	_readl_relaxed
	movq	_F_INT_CLR_BIT@GOTPCREL(%rip), %rcx
	orl	(%rcx), %eax
	movq	(%rbx), %rsi
	addq	(%r12), %rsi
	movl	%eax, %edi
	callq	_writel_relaxed
	movq	%r12, %rdi
	callq	_mtk_iommu_tlb_flush_all
	movq	_IRQ_HANDLED@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_REG_MMU_FAULT_ST,8,3           ## @REG_MMU_FAULT_ST
	.comm	_REG_MMU_FAULT_VA,8,3           ## @REG_MMU_FAULT_VA
	.comm	_F_MMU_FAULT_VA_MSK,4,2         ## @F_MMU_FAULT_VA_MSK
	.comm	_REG_MMU_INVLD_PA,8,3           ## @REG_MMU_INVLD_PA
	.comm	_REG_MMU_INT_ID,8,3             ## @REG_MMU_INT_ID
	.comm	_IOMMU_FAULT_READ,4,2           ## @IOMMU_FAULT_READ
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"fault type=0x%x iova=0x%x pa=0x%x larb=%d port=%d\n"

	.comm	_REG_MMU_INT_CONTROL,8,3        ## @REG_MMU_INT_CONTROL
	.comm	_F_INT_CLR_BIT,4,2              ## @F_INT_CLR_BIT
	.comm	_IRQ_HANDLED,4,2                ## @IRQ_HANDLED
	.no_dead_strip	_mtk_iommu_isr
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mtk_iommu_isr
_mtk_iommu_isr:                         ; @mtk_iommu_isr
	.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	x19, x1
	ldr	x25, [x1, #16]
	ldr	x8, [x1]
Lloh0:
	adrp	x9, _REG_MMU_FAULT_ST@GOTPAGE
Lloh1:
	ldr	x9, [x9, _REG_MMU_FAULT_ST@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	add	x0, x9, x8
	bl	_readl_relaxed
	mov	x20, x0
	ldr	x8, [x19]
Lloh3:
	adrp	x9, _REG_MMU_FAULT_VA@GOTPAGE
Lloh4:
	ldr	x9, [x9, _REG_MMU_FAULT_VA@GOTPAGEOFF]
Lloh5:
	ldr	x9, [x9]
	add	x0, x9, x8
	bl	_readl_relaxed
Lloh6:
	adrp	x8, _F_MMU_FAULT_VA_MSK@GOTPAGE
Lloh7:
	ldr	x8, [x8, _F_MMU_FAULT_VA_MSK@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	and	w21, w8, w0
	ldr	x8, [x19]
Lloh9:
	adrp	x9, _REG_MMU_INVLD_PA@GOTPAGE
Lloh10:
	ldr	x9, [x9, _REG_MMU_INVLD_PA@GOTPAGEOFF]
Lloh11:
	ldr	x9, [x9]
	add	x0, x9, x8
	bl	_readl_relaxed
	mov	x22, x0
	ldr	x8, [x19]
Lloh12:
	adrp	x9, _REG_MMU_INT_ID@GOTPAGE
Lloh13:
	ldr	x9, [x9, _REG_MMU_INT_ID@GOTPAGEOFF]
Lloh14:
	ldr	x9, [x9]
	add	x0, x9, x8
	bl	_readl_relaxed
	mov	x24, x0
	bl	_MT2701_M4U_TF_LARB
	mov	x23, x0
	mov	x0, x24
	bl	_MT2701_M4U_TF_PORT
	mov	x24, x0
	ldr	w1, [x19, #8]
Lloh15:
	adrp	x8, _IOMMU_FAULT_READ@GOTPAGE
Lloh16:
	ldr	x8, [x8, _IOMMU_FAULT_READ@GOTPAGEOFF]
Lloh17:
	ldr	w3, [x8]
	mov	x0, x25
	mov	x2, x21
	bl	_report_iommu_fault
	cbz	x0, LBB0_2
; %bb.1:
	ldr	w0, [x19, #8]
Lloh18:
	adrp	x1, l_.str@PAGE
Lloh19:
	add	x1, x1, l_.str@PAGEOFF
	mov	x2, x20
	mov	x3, x21
	mov	x4, x22
	mov	x5, x23
	mov	x6, x24
	bl	_dev_err_ratelimited
LBB0_2:
	ldr	x8, [x19]
Lloh20:
	adrp	x20, _REG_MMU_INT_CONTROL@GOTPAGE
Lloh21:
	ldr	x20, [x20, _REG_MMU_INT_CONTROL@GOTPAGEOFF]
	ldr	x9, [x20]
	add	x0, x9, x8
	bl	_readl_relaxed
Lloh22:
	adrp	x8, _F_INT_CLR_BIT@GOTPAGE
Lloh23:
	ldr	x8, [x8, _F_INT_CLR_BIT@GOTPAGEOFF]
Lloh24:
	ldr	w8, [x8]
	orr	w0, w8, w0
	ldr	x8, [x19]
	ldr	x9, [x20]
	add	x1, x9, x8
	bl	_writel_relaxed
	mov	x0, x19
	bl	_mtk_iommu_tlb_flush_all
Lloh25:
	adrp	x8, _IRQ_HANDLED@GOTPAGE
Lloh26:
	ldr	x8, [x8, _IRQ_HANDLED@GOTPAGEOFF]
Lloh27:
	ldr	w0, [x8]
	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	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGot	Lloh20, Lloh21
	.cfi_endproc
                                        ; -- End function
	.comm	_REG_MMU_FAULT_ST,8,3           ; @REG_MMU_FAULT_ST
	.comm	_REG_MMU_FAULT_VA,8,3           ; @REG_MMU_FAULT_VA
	.comm	_F_MMU_FAULT_VA_MSK,4,2         ; @F_MMU_FAULT_VA_MSK
	.comm	_REG_MMU_INVLD_PA,8,3           ; @REG_MMU_INVLD_PA
	.comm	_REG_MMU_INT_ID,8,3             ; @REG_MMU_INT_ID
	.comm	_IOMMU_FAULT_READ,4,2           ; @IOMMU_FAULT_READ
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"fault type=0x%x iova=0x%x pa=0x%x larb=%d port=%d\n"

	.comm	_REG_MMU_INT_CONTROL,8,3        ; @REG_MMU_INT_CONTROL
	.comm	_F_INT_CLR_BIT,4,2              ; @F_INT_CLR_BIT
	.comm	_IRQ_HANDLED,4,2                ; @IRQ_HANDLED
	.no_dead_strip	_mtk_iommu_isr
.subsections_via_symbols
