	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mtk_iommu_unmap
_mtk_iommu_unmap:                       ## @mtk_iommu_unmap
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %r15
	movq	%rsi, %rbx
	movq	%rsi, -48(%rbp)                 ## 8-byte Spill
	callq	_to_mtk_domain
	movq	_MT2701_IOMMU_PAGE_SHIFT@GOTPCREL(%rip), %rcx
	movb	(%rcx), %cl
	shrq	%cl, %rbx
	movq	%rax, %r12
	shlq	$2, %rbx
	addq	8(%rax), %rbx
	movq	%r15, %r13
	shrq	%cl, %r13
	leaq	4(%rax), %r14
	movq	%r14, %rdi
	callq	_spin_lock_irqsave
	shll	$2, %r13d
	movq	%rbx, %rdi
	xorl	%esi, %esi
	movl	%r13d, %edx
	callq	_memset
	movq	%r14, %rdi
	callq	_spin_unlock_irqrestore
	movl	(%r12), %edi
	movq	-48(%rbp), %rsi                 ## 8-byte Reload
	movq	%r15, %rdx
	callq	_mtk_iommu_tlb_flush_range
	movq	%r15, %rax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_MT2701_IOMMU_PAGE_SHIFT,8,3    ## @MT2701_IOMMU_PAGE_SHIFT
	.no_dead_strip	_mtk_iommu_unmap
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mtk_iommu_unmap
_mtk_iommu_unmap:                       ; @mtk_iommu_unmap
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	mov	x19, x2
	mov	x20, x1
	bl	_to_mtk_domain
	mov	x21, x0
Lloh0:
	adrp	x8, _MT2701_IOMMU_PAGE_SHIFT@GOTPAGE
Lloh1:
	ldr	x8, [x8, _MT2701_IOMMU_PAGE_SHIFT@GOTPAGEOFF]
	ldr	x9, [x0, #8]
Lloh2:
	ldr	x8, [x8]
	lsr	x10, x20, x8
	add	x22, x9, x10, lsl #2
	lsr	x24, x19, x8
	add	x23, x0, #4
	mov	x0, x23
	bl	_spin_lock_irqsave
	lsl	w2, w24, #2
	mov	x0, x22
	mov	w1, #0
	bl	_memset
	mov	x0, x23
	bl	_spin_unlock_irqrestore
	ldr	w0, [x21]
	mov	x1, x20
	mov	x2, x19
	bl	_mtk_iommu_tlb_flush_range
	mov	x0, x19
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_MT2701_IOMMU_PAGE_SHIFT,8,3    ; @MT2701_IOMMU_PAGE_SHIFT
	.no_dead_strip	_mtk_iommu_unmap
.subsections_via_symbols
