	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_v3d_mmu_remove_ptes            ## -- Begin function v3d_mmu_remove_ptes
	.p2align	4, 0x90
_v3d_mmu_remove_ptes:                   ## @v3d_mmu_remove_ptes
	.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	%rdi, %rbx
	movl	16(%rdi), %edi
	callq	_to_v3d_dev
	movq	8(%rbx), %rdx
	movq	_V3D_MMU_PAGE_SHIFT@GOTPCREL(%rip), %rcx
	movb	(%rcx), %cl
	shrq	%cl, %rdx
	movq	%rax, %r14
	movq	(%rbx), %rax
	leaq	(%rax,%rdx), %rcx
	cmpq	%rcx, %rax
	jae	LBB0_3
## %bb.1:
	movq	8(%r14), %rcx
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movq	$0, (%rcx,%rax,8)
	incq	%rax
	movq	(%rbx), %rsi
	addq	%rdx, %rsi
	cmpq	%rsi, %rax
	jb	LBB0_2
LBB0_3:
	movq	%r14, %rdi
	callq	_v3d_mmu_flush_all
	testq	%rax, %rax
	je	LBB0_4
## %bb.5:
	movl	(%r14), %edi
	leaq	L_.str(%rip), %rsi
	popq	%rbx
	popq	%r14
	popq	%rbp
	jmp	_dev_err                        ## TAILCALL
LBB0_4:
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_V3D_MMU_PAGE_SHIFT,8,3         ## @V3D_MMU_PAGE_SHIFT
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"MMU flush timeout\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_v3d_mmu_remove_ptes            ; -- Begin function v3d_mmu_remove_ptes
	.p2align	2
_v3d_mmu_remove_ptes:                   ; @v3d_mmu_remove_ptes
	.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, x0
	ldr	w0, [x0, #16]
	bl	_to_v3d_dev
	mov	x19, x0
Lloh0:
	adrp	x8, _V3D_MMU_PAGE_SHIFT@GOTPAGE
Lloh1:
	ldr	x8, [x8, _V3D_MMU_PAGE_SHIFT@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x8]
	ldp	x8, x10, [x20]
	lsr	x9, x10, x9
	add	x10, x8, x9
	cmp	x8, x10
	b.hs	LBB0_3
; %bb.1:
	ldr	x10, [x19, #8]
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	str	xzr, [x10, x8, lsl #3]
	add	x8, x8, #1
	ldr	x11, [x20]
	add	x11, x11, x9
	cmp	x8, x11
	b.lo	LBB0_2
LBB0_3:
	mov	x0, x19
	bl	_v3d_mmu_flush_all
	cbz	x0, LBB0_5
; %bb.4:
	ldr	w0, [x19]
Lloh3:
	adrp	x1, l_.str@PAGE
Lloh4:
	add	x1, x1, l_.str@PAGEOFF
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_dev_err
LBB0_5:
	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 AdrpAdd	Lloh3, Lloh4
	.cfi_endproc
                                        ; -- End function
	.comm	_V3D_MMU_PAGE_SHIFT,8,3         ; @V3D_MMU_PAGE_SHIFT
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"MMU flush timeout\n"

.subsections_via_symbols
