	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function msm_gpummu_unmap
_msm_gpummu_unmap:                      ## @msm_gpummu_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
	movl	%edx, %ebx
	movl	%esi, %r14d
	callq	_to_msm_gpummu
	movq	%rax, %r8
	movq	_GPUMMU_PAGE_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	cmpl	%ebx, %ecx
	ja	LBB0_17
## %bb.1:
	xorl	%edi, %edi
	movl	%ebx, %eax
	xorl	%edx, %edx
	divl	%ecx
	movl	%eax, %esi
	movq	_GPUMMU_VA_START@GOTPCREL(%rip), %rax
	subl	(%rax), %r14d
	movl	%r14d, %eax
	xorl	%edx, %edx
	divl	%ecx
                                        ## kill: def $eax killed $eax def $rax
	movq	8(%r8), %rdx
	cmpl	$2, %esi
	movl	$1, %r11d
	cmovael	%esi, %r11d
	cmpl	$4, %r11d
	jb	LBB0_11
## %bb.2:
	leal	-1(%r11), %ecx
	addl	%eax, %ecx
	jb	LBB0_11
## %bb.3:
	movl	%r11d, %edi
	andl	$-4, %edi
	leal	-4(%rdi), %esi
	movl	%esi, %r10d
	shrl	$2, %r10d
	incl	%r10d
	movl	%r10d, %r9d
	andl	$3, %r9d
	xorl	%ecx, %ecx
	cmpl	$12, %esi
	jb	LBB0_6
## %bb.4:
	andl	$-4, %r10d
	xorl	%ecx, %ecx
	xorps	%xmm0, %xmm0
	xorl	%esi, %esi
	.p2align	4, 0x90
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	leal	(%rax,%rcx), %ebx
	movups	%xmm0, (%rdx,%rbx,8)
	movups	%xmm0, 16(%rdx,%rbx,8)
	movl	%ecx, %ebx
	orl	$4, %ebx
	addl	%eax, %ebx
	movups	%xmm0, (%rdx,%rbx,8)
	movups	%xmm0, 16(%rdx,%rbx,8)
	movl	%ecx, %ebx
	orl	$8, %ebx
	addl	%eax, %ebx
	movups	%xmm0, (%rdx,%rbx,8)
	movups	%xmm0, 16(%rdx,%rbx,8)
	movl	%ecx, %ebx
	orl	$12, %ebx
	addl	%eax, %ebx
	movups	%xmm0, (%rdx,%rbx,8)
	movups	%xmm0, 16(%rdx,%rbx,8)
	addl	$16, %ecx
	addl	$4, %esi
	cmpl	%r10d, %esi
	jne	LBB0_5
LBB0_6:
	testl	%r9d, %r9d
	je	LBB0_9
## %bb.7:
	xorl	%esi, %esi
	xorps	%xmm0, %xmm0
	.p2align	4, 0x90
LBB0_8:                                 ## =>This Inner Loop Header: Depth=1
	leal	(%rax,%rcx), %ebx
	movups	%xmm0, (%rdx,%rbx,8)
	movups	%xmm0, 16(%rdx,%rbx,8)
	addl	$4, %ecx
	incl	%esi
	cmpl	%r9d, %esi
	jne	LBB0_8
LBB0_9:
	cmpl	%edi, %r11d
	je	LBB0_17
## %bb.10:
	addl	%edi, %eax
LBB0_11:
	movl	%edi, %r9d
	notl	%r9d
	addl	%r11d, %r9d
	movl	%r11d, %ecx
	andl	$3, %ecx
	je	LBB0_15
## %bb.12:
	xorl	%esi, %esi
	.p2align	4, 0x90
LBB0_13:                                ## =>This Inner Loop Header: Depth=1
	leal	(%rax,%rsi), %ebx
	movq	$0, (%rdx,%rbx,8)
	incl	%esi
	cmpl	%ecx, %esi
	jne	LBB0_13
## %bb.14:
	addl	%esi, %edi
	addl	%esi, %eax
LBB0_15:
	cmpl	$3, %r9d
	jb	LBB0_17
	.p2align	4, 0x90
LBB0_16:                                ## =>This Inner Loop Header: Depth=1
	movl	%eax, %ecx
	movq	$0, (%rdx,%rcx,8)
	leal	1(%rax), %ecx
	movq	$0, (%rdx,%rcx,8)
	leal	2(%rax), %ecx
	movq	$0, (%rdx,%rcx,8)
	leal	3(%rax), %ecx
	movq	$0, (%rdx,%rcx,8)
	addl	$4, %edi
	addl	$4, %eax
	cmpl	%r11d, %edi
	jne	LBB0_16
LBB0_17:
	movl	(%r8), %edi
	movq	_REG_A2XX_MH_MMU_INVALIDATE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_A2XX_MH_MMU_INVALIDATE_INVALIDATE_ALL@GOTPCREL(%rip), %rax
	movq	_A2XX_MH_MMU_INVALIDATE_INVALIDATE_TC@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	orl	(%rax), %edx
	callq	_gpu_write
	xorl	%eax, %eax
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_GPUMMU_VA_START,4,2            ## @GPUMMU_VA_START
	.comm	_GPUMMU_PAGE_SIZE,4,2           ## @GPUMMU_PAGE_SIZE
	.comm	_REG_A2XX_MH_MMU_INVALIDATE,4,2 ## @REG_A2XX_MH_MMU_INVALIDATE
	.comm	_A2XX_MH_MMU_INVALIDATE_INVALIDATE_ALL,4,2 ## @A2XX_MH_MMU_INVALIDATE_INVALIDATE_ALL
	.comm	_A2XX_MH_MMU_INVALIDATE_INVALIDATE_TC,4,2 ## @A2XX_MH_MMU_INVALIDATE_INVALIDATE_TC
	.no_dead_strip	_msm_gpummu_unmap
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function msm_gpummu_unmap
_msm_gpummu_unmap:                      ; @msm_gpummu_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	x20, x2
	mov	x19, x1
	bl	_to_msm_gpummu
Lloh0:
	adrp	x8, _GPUMMU_PAGE_SIZE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _GPUMMU_PAGE_SIZE@GOTPAGEOFF]
Lloh2:
	ldr	w10, [x8]
	cmp	w10, w20
	b.hi	LBB0_5
; %bb.1:
	udiv	w9, w20, w10
Lloh3:
	adrp	x8, _GPUMMU_VA_START@GOTPAGE
Lloh4:
	ldr	x8, [x8, _GPUMMU_VA_START@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	sub	w11, w19, w8
	ldr	x8, [x0, #8]
	cmp	w9, #1
	csinc	w9, w9, wzr, hi
	udiv	w12, w11, w10
	cmp	w9, #8
	b.lo	LBB0_3
; %bb.2:
	sub	w10, w9, #1
	cmn	w12, w10
	b.lo	LBB0_6
LBB0_3:
	mov	w10, #0
	mov	x11, x12
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	str	xzr, [x8, w11, uxtw #3]
	add	w10, w10, #1
	add	w11, w11, #1
	cmp	w10, w9
	b.ne	LBB0_4
LBB0_5:
	ldr	w0, [x0]
Lloh6:
	adrp	x8, _REG_A2XX_MH_MMU_INVALIDATE@GOTPAGE
Lloh7:
	ldr	x8, [x8, _REG_A2XX_MH_MMU_INVALIDATE@GOTPAGEOFF]
Lloh8:
	adrp	x9, _A2XX_MH_MMU_INVALIDATE_INVALIDATE_ALL@GOTPAGE
Lloh9:
	ldr	x9, [x9, _A2XX_MH_MMU_INVALIDATE_INVALIDATE_ALL@GOTPAGEOFF]
Lloh10:
	ldr	w1, [x8]
Lloh11:
	ldr	w8, [x9]
Lloh12:
	adrp	x9, _A2XX_MH_MMU_INVALIDATE_INVALIDATE_TC@GOTPAGE
Lloh13:
	ldr	x9, [x9, _A2XX_MH_MMU_INVALIDATE_INVALIDATE_TC@GOTPAGEOFF]
Lloh14:
	ldr	w9, [x9]
	orr	w2, w9, w8
	bl	_gpu_write
	mov	w0, #0
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
LBB0_6:
	mov	w13, #0
	and	w10, w9, #0xfffffff8
	add	w11, w12, w10
	movi.2d	v0, #0000000000000000
LBB0_7:                                 ; =>This Inner Loop Header: Depth=1
	add	w14, w12, w13
	add	x14, x8, w14, uxtw #3
	stp	q0, q0, [x14]
	stp	q0, q0, [x14, #32]
	add	w13, w13, #8
	cmp	w13, w10
	b.ne	LBB0_7
; %bb.8:
	cmp	w9, w10
	b.ne	LBB0_4
	b	LBB0_5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh10
	.cfi_endproc
                                        ; -- End function
	.comm	_GPUMMU_VA_START,4,2            ; @GPUMMU_VA_START
	.comm	_GPUMMU_PAGE_SIZE,4,2           ; @GPUMMU_PAGE_SIZE
	.comm	_REG_A2XX_MH_MMU_INVALIDATE,4,2 ; @REG_A2XX_MH_MMU_INVALIDATE
	.comm	_A2XX_MH_MMU_INVALIDATE_INVALIDATE_ALL,4,2 ; @A2XX_MH_MMU_INVALIDATE_INVALIDATE_ALL
	.comm	_A2XX_MH_MMU_INVALIDATE_INVALIDATE_TC,4,2 ; @A2XX_MH_MMU_INVALIDATE_INVALIDATE_TC
	.no_dead_strip	_msm_gpummu_unmap
.subsections_via_symbols
