	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_psb_mmu_remove_pfn_sequence    ## -- Begin function psb_mmu_remove_pfn_sequence
	.p2align	4, 0x90
_psb_mmu_remove_pfn_sequence:           ## @psb_mmu_remove_pfn_sequence
	.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
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %r13
	movq	%rsi, %rbx
	movq	%rdi, -48(%rbp)                 ## 8-byte Spill
	movq	8(%rdi), %rdi
	callq	_down_read
	movq	_PAGE_SHIFT@GOTPCREL(%rip), %rax
	movb	(%rax), %cl
	movq	%r13, -64(%rbp)                 ## 8-byte Spill
	shlq	%cl, %r13
	addq	%rbx, %r13
	movq	_PAGE_SIZE@GOTPCREL(%rip), %r12
	movq	%rbx, -56(%rbp)                 ## 8-byte Spill
	.p2align	4, 0x90
LBB0_1:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_3 Depth 2
	movq	%rbx, %rdi
	movq	%r13, %rsi
	callq	_psb_pd_addr_end
	movq	%rax, %r14
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	movq	%rbx, %rsi
	callq	_psb_mmu_pt_alloc_map_lock
	testq	%rax, %rax
	je	LBB0_5
## %bb.2:                               ##   in Loop: Header=BB0_1 Depth=1
	movq	%rax, %r15
	.p2align	4, 0x90
LBB0_3:                                 ##   Parent Loop BB0_1 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movq	%r15, %rdi
	movq	%rbx, %rsi
	callq	_psb_mmu_invalidate_pte
	decl	(%r15)
	movslq	(%r12), %rax
	addq	%rax, %rbx
	cmpq	%r14, %rbx
	jb	LBB0_3
## %bb.4:                               ##   in Loop: Header=BB0_1 Depth=1
	movq	%r15, %rdi
	callq	_psb_mmu_pt_unmap_unlock
	movq	%r14, %rbx
	cmpq	%r13, %r14
	jne	LBB0_1
LBB0_5:
	movq	-48(%rbp), %rbx                 ## 8-byte Reload
	cmpl	$-1, (%rbx)
	je	LBB0_7
## %bb.6:
	movq	%rbx, %rdi
	movq	-56(%rbp), %rsi                 ## 8-byte Reload
	movq	-64(%rbp), %rdx                 ## 8-byte Reload
	movl	$1, %ecx
	movl	$1, %r8d
	callq	_psb_mmu_flush_ptes
LBB0_7:
	movq	8(%rbx), %rdi
	callq	_up_read
	cmpl	$-1, (%rbx)
	je	LBB0_8
## %bb.9:
	movq	8(%rbx), %rdi
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_psb_mmu_flush                  ## TAILCALL
LBB0_8:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_PAGE_SHIFT,8,3                 ## @PAGE_SHIFT
	.comm	_PAGE_SIZE,4,2                  ## @PAGE_SIZE
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_psb_mmu_remove_pfn_sequence    ; -- Begin function psb_mmu_remove_pfn_sequence
	.p2align	2
_psb_mmu_remove_pfn_sequence:           ; @psb_mmu_remove_pfn_sequence
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x20, x2
	mov	x21, x1
	mov	x19, x0
	ldr	x0, [x0, #8]
	bl	_down_read
Lloh0:
	adrp	x8, _PAGE_SHIFT@GOTPAGE
Lloh1:
	ldr	x8, [x8, _PAGE_SHIFT@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	lsl	x8, x20, x8
	add	x22, x8, x21
Lloh3:
	adrp	x26, _PAGE_SIZE@GOTPAGE
Lloh4:
	ldr	x26, [x26, _PAGE_SIZE@GOTPAGEOFF]
	mov	x23, x21
LBB0_1:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_3 Depth 2
	mov	x0, x23
	mov	x1, x22
	bl	_psb_pd_addr_end
	mov	x24, x0
	mov	x0, x19
	mov	x1, x23
	bl	_psb_mmu_pt_alloc_map_lock
	cbz	x0, LBB0_5
; %bb.2:                                ;   in Loop: Header=BB0_1 Depth=1
	mov	x25, x0
LBB0_3:                                 ;   Parent Loop BB0_1 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	mov	x0, x25
	mov	x1, x23
	bl	_psb_mmu_invalidate_pte
	ldr	w8, [x25]
	sub	w8, w8, #1
	str	w8, [x25]
	ldrsw	x8, [x26]
	add	x23, x23, x8
	cmp	x23, x24
	b.lo	LBB0_3
; %bb.4:                                ;   in Loop: Header=BB0_1 Depth=1
	mov	x0, x25
	bl	_psb_mmu_pt_unmap_unlock
	mov	x23, x24
	cmp	x24, x22
	b.ne	LBB0_1
LBB0_5:
	ldr	w8, [x19]
	cmn	w8, #1
	b.eq	LBB0_7
; %bb.6:
	mov	x0, x19
	mov	x1, x21
	mov	x2, x20
	mov	w3, #1
	mov	w4, #1
	bl	_psb_mmu_flush_ptes
LBB0_7:
	ldr	x0, [x19, #8]
	bl	_up_read
	ldr	w8, [x19]
	cmn	w8, #1
	b.eq	LBB0_9
; %bb.8:
	ldr	x0, [x19, #8]
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	b	_psb_mmu_flush
LBB0_9:
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_PAGE_SHIFT,8,3                 ; @PAGE_SHIFT
	.comm	_PAGE_SIZE,4,2                  ; @PAGE_SIZE
.subsections_via_symbols
