	.file	"extr_mtk_iommu_v1.c_mtk_iommu_iova_to_phys.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	mtk_iommu_iova_to_phys, @function
mtk_iommu_iova_to_phys:
.LFB0:
	.cfi_startproc
	endbr64
	push	r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	xor	r13d, r13d
	push	r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	push	rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	push	rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	mov	ebx, esi
	sub	rsp, 8
	.cfi_def_cfa_offset 48
	call	to_mtk_domain@PLT
	mov	rsi, r13
	lea	rbp, 8[rax]
	mov	r12, rax
	mov	rdi, rbp
	call	spin_lock_irqsave@PLT
	mov	rax, QWORD PTR [r12]
	mov	rsi, r13
	mov	rdi, rbp
	mov	ecx, DWORD PTR MT2701_IOMMU_PAGE_SHIFT[rip]
	mov	r12d, DWORD PTR MT2701_IOMMU_PAGE_SIZE[rip]
	sar	ebx, cl
	neg	r12d
	movsx	rbx, ebx
	and	r12d, DWORD PTR [rax+rbx*4]
	call	spin_unlock_irqrestore@PLT
	add	rsp, 8
	.cfi_def_cfa_offset 40
	mov	eax, r12d
	pop	rbx
	.cfi_def_cfa_offset 32
	pop	rbp
	.cfi_def_cfa_offset 24
	pop	r12
	.cfi_def_cfa_offset 16
	pop	r13
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE0:
	.size	mtk_iommu_iova_to_phys, .-mtk_iommu_iova_to_phys
	.comm	MT2701_IOMMU_PAGE_SIZE,4,4
	.comm	MT2701_IOMMU_PAGE_SHIFT,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	 1f - 0f
	.long	 4f - 1f
	.long	 5
0:
	.string	 "GNU"
1:
	.align 8
	.long	 0xc0000002
	.long	 3f - 2f
2:
	.long	 0x3
3:
	.align 8
4:

	.arch armv5t
	.eabi_attribute 20, 1
	.eabi_attribute 21, 1
	.eabi_attribute 23, 3
	.eabi_attribute 24, 1
	.eabi_attribute 25, 1
	.eabi_attribute 26, 2
	.eabi_attribute 30, 2
	.eabi_attribute 34, 0
	.eabi_attribute 18, 4
	.file	"extr_mtk_iommu_v1.c_mtk_iommu_iova_to_phys.c"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	mtk_iommu_iova_to_phys, %function
mtk_iommu_iova_to_phys:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, lr}
	mov	r4, r1
	bl	to_mtk_domain
	mov	r6, #0
	mov	r5, r0
	add	r7, r0, #4
	mov	r1, r6
	mov	r0, r7
	bl	spin_lock_irqsave
	ldr	r3, .L4
	ldr	r0, .L4+4
	ldr	r3, [r3]
	ldr	r2, [r5]
	asr	r3, r4, r3
	ldr	r4, [r0]
	ldr	r3, [r2, r3, lsl #2]
	rsb	r4, r4, #0
	and	r4, r4, r3
	mov	r0, r7
	mov	r1, r6
	bl	spin_unlock_irqrestore
	mov	r0, r4
	pop	{r4, r5, r6, r7, r8, pc}
.L5:
	.align	2
.L4:
	.word	MT2701_IOMMU_PAGE_SHIFT
	.word	MT2701_IOMMU_PAGE_SIZE
	.size	mtk_iommu_iova_to_phys, .-mtk_iommu_iova_to_phys
	.comm	MT2701_IOMMU_PAGE_SIZE,4,4
	.comm	MT2701_IOMMU_PAGE_SHIFT,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
