	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function etnaviv_iommuv2_unmap
_etnaviv_iommuv2_unmap:                 ## @etnaviv_iommuv2_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	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rdx, %r14
	movq	%rsi, %rbx
	callq	_to_v2_context
	movq	_SZ_4K@GOTPCREL(%rip), %rcx
	cmpq	%r14, (%rcx)
	jne	LBB0_1
## %bb.2:
	movq	_MMUv2_MTLB_MASK@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rdx
	andq	%rbx, %rdx
	movq	_MMUv2_MTLB_SHIFT@GOTPCREL(%rip), %rcx
	movb	(%rcx), %cl
	shrq	%cl, %rdx
	movq	_MMUv2_STLB_MASK@GOTPCREL(%rip), %rcx
	andq	(%rcx), %rbx
	movq	_MMUv2_STLB_SHIFT@GOTPCREL(%rip), %rcx
	movb	(%rcx), %cl
	shrq	%cl, %rbx
	movq	_MMUv2_PTE_EXCEPTION@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movq	(%rax), %rax
	movslq	%edx, %rdx
	movq	(%rax,%rdx,8), %rax
	movslq	%ebx, %rdx
	movl	%ecx, (%rax,%rdx,4)
	jmp	LBB0_3
LBB0_1:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%r14d, %r14d
	subq	(%rax), %r14
LBB0_3:
	movq	%r14, %rax
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_SZ_4K,8,3                      ## @SZ_4K
	.comm	_EINVAL,8,3                     ## @EINVAL
	.comm	_MMUv2_MTLB_MASK,8,3            ## @MMUv2_MTLB_MASK
	.comm	_MMUv2_MTLB_SHIFT,8,3           ## @MMUv2_MTLB_SHIFT
	.comm	_MMUv2_STLB_MASK,8,3            ## @MMUv2_STLB_MASK
	.comm	_MMUv2_STLB_SHIFT,8,3           ## @MMUv2_STLB_SHIFT
	.comm	_MMUv2_PTE_EXCEPTION,4,2        ## @MMUv2_PTE_EXCEPTION
	.no_dead_strip	_etnaviv_iommuv2_unmap
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function etnaviv_iommuv2_unmap
_etnaviv_iommuv2_unmap:                 ; @etnaviv_iommuv2_unmap
	.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, x2
	mov	x20, x1
	bl	_to_v2_context
Lloh0:
	adrp	x8, _SZ_4K@GOTPAGE
Lloh1:
	ldr	x8, [x8, _SZ_4K@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	cmp	x8, x19
	b.ne	LBB0_2
; %bb.1:
Lloh3:
	adrp	x8, _MMUv2_MTLB_MASK@GOTPAGE
Lloh4:
	ldr	x8, [x8, _MMUv2_MTLB_MASK@GOTPAGEOFF]
Lloh5:
	ldr	x8, [x8]
	and	x8, x8, x20
Lloh6:
	adrp	x9, _MMUv2_MTLB_SHIFT@GOTPAGE
Lloh7:
	ldr	x9, [x9, _MMUv2_MTLB_SHIFT@GOTPAGEOFF]
Lloh8:
	ldr	x9, [x9]
	lsr	x8, x8, x9
Lloh9:
	adrp	x9, _MMUv2_STLB_MASK@GOTPAGE
Lloh10:
	ldr	x9, [x9, _MMUv2_STLB_MASK@GOTPAGEOFF]
Lloh11:
	ldr	x9, [x9]
	and	x9, x9, x20
Lloh12:
	adrp	x10, _MMUv2_STLB_SHIFT@GOTPAGE
Lloh13:
	ldr	x10, [x10, _MMUv2_STLB_SHIFT@GOTPAGEOFF]
Lloh14:
	ldr	x10, [x10]
	lsr	x9, x9, x10
Lloh15:
	adrp	x10, _MMUv2_PTE_EXCEPTION@GOTPAGE
Lloh16:
	ldr	x10, [x10, _MMUv2_PTE_EXCEPTION@GOTPAGEOFF]
Lloh17:
	ldr	w10, [x10]
	ldr	x11, [x0]
	sbfiz	x8, x8, #3, #32
	ldr	x8, [x11, x8]
	sbfiz	x9, x9, #2, #32
	str	w10, [x8, x9]
	b	LBB0_3
LBB0_2:
Lloh18:
	adrp	x8, _EINVAL@GOTPAGE
Lloh19:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh20:
	ldr	x8, [x8]
	neg	x19, x8
LBB0_3:
	mov	x0, x19
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.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	Lloh18, Lloh19, Lloh20
	.cfi_endproc
                                        ; -- End function
	.comm	_SZ_4K,8,3                      ; @SZ_4K
	.comm	_EINVAL,8,3                     ; @EINVAL
	.comm	_MMUv2_MTLB_MASK,8,3            ; @MMUv2_MTLB_MASK
	.comm	_MMUv2_MTLB_SHIFT,8,3           ; @MMUv2_MTLB_SHIFT
	.comm	_MMUv2_STLB_MASK,8,3            ; @MMUv2_STLB_MASK
	.comm	_MMUv2_STLB_SHIFT,8,3           ; @MMUv2_STLB_SHIFT
	.comm	_MMUv2_PTE_EXCEPTION,4,2        ; @MMUv2_PTE_EXCEPTION
	.no_dead_strip	_etnaviv_iommuv2_unmap
.subsections_via_symbols
