	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_pmap_protect                   ## -- Begin function pmap_protect
	.p2align	4, 0x90
_pmap_protect:                          ## @pmap_protect
	.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	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%ecx, %ebx
	movl	%edx, %r12d
	movl	%esi, %r13d
	movl	%edi, %r15d
	movq	_VM_PROT_ALL@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	notl	%eax
	xorl	%edi, %edi
	testl	%ecx, %eax
	sete	%dil
	movslq	%ecx, %r14
	movq	%r14, %rsi
	callq	_KASSERT
	movq	_VM_PROT_NONE@GOTPCREL(%rip), %rax
	cmpl	%r14d, (%rax)
	jne	LBB0_1
## %bb.39:
	movl	%r15d, %edi
	movl	%r13d, %esi
	movl	%r12d, %edx
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_pmap_remove                    ## TAILCALL
LBB0_1:
	movq	_VM_PROT_WRITE@GOTPCREL(%rip), %rcx
	movq	_VM_PROT_EXECUTE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	orl	(%rcx), %eax
	movl	%ebx, %ecx
	notl	%ecx
	testl	%ecx, %eax
	jne	LBB0_2
## %bb.38:
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_2:
	movl	%r15d, %edi
	callq	_pmap_global_bit
	movl	%eax, -76(%rbp)                 ## 4-byte Spill
	movl	%r15d, %edi
	callq	_pmap_modified_bit
	movl	%eax, -52(%rbp)                 ## 4-byte Spill
	movl	%r15d, %edi
	callq	_pmap_valid_bit
	movl	%r12d, %r14d
	movl	%eax, %r12d
	movl	%r15d, %edi
	callq	_pmap_rw_bit
	movl	%eax, -60(%rbp)                 ## 4-byte Spill
	movq	_FALSE@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -72(%rbp)                 ## 8-byte Spill
	movl	%r15d, %edi
	callq	_PMAP_LOCK
	cmpl	%r14d, %r13d
	movl	%r15d, -56(%rbp)                ## 4-byte Spill
	jge	LBB0_35
## %bb.3:
	movl	%r14d, -44(%rbp)                ## 4-byte Spill
	movl	-60(%rbp), %esi                 ## 4-byte Reload
	orl	-52(%rbp), %esi                 ## 4-byte Folded Reload
	movl	%esi, %eax
	notl	%eax
	movl	%eax, -60(%rbp)                 ## 4-byte Spill
	jmp	LBB0_4
	.p2align	4, 0x90
LBB0_15:                                ##   in Loop: Header=BB0_4 Depth=1
	movl	-44(%rbp), %eax                 ## 4-byte Reload
	movl	%r13d, %esi
	movl	-48(%rbp), %ecx                 ## 4-byte Reload
LBB0_34:                                ##   in Loop: Header=BB0_4 Depth=1
	movl	%ecx, %r13d
	cmpl	%eax, %ecx
	jge	LBB0_35
LBB0_4:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_20 Depth 2
	movl	%r13d, %r15d
	movl	%esi, %r13d
	movl	-56(%rbp), %edi                 ## 4-byte Reload
	movl	%r15d, %esi
	callq	_pmap_pml4e
	testl	%r12d, (%rax)
	je	LBB0_5
## %bb.7:                               ##   in Loop: Header=BB0_4 Depth=1
	movq	%rax, %rdi
	movl	%r15d, %esi
	callq	_pmap_pml4e_to_pdpe
	testl	%r12d, (%rax)
	je	LBB0_8
## %bb.9:                               ##   in Loop: Header=BB0_4 Depth=1
	movq	_NBPDR@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	addl	%r15d, %ecx
	movq	_PDRMASK@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	notl	%edx
	andl	%ecx, %edx
	cmpl	%r15d, %edx
	cmovll	-44(%rbp), %edx                 ## 4-byte Folded Reload
	movl	%edx, -48(%rbp)                 ## 4-byte Spill
	movq	%rax, %rdi
	movl	%r15d, -52(%rbp)                ## 4-byte Spill
	movl	%r15d, %esi
	callq	_pmap_pdpe_to_pde
	movq	%rax, %r14
	movl	(%rax), %eax
	testl	%eax, %eax
	je	LBB0_15
## %bb.10:                              ##   in Loop: Header=BB0_4 Depth=1
	movq	_PG_PS@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	movl	-56(%rbp), %edi                 ## 4-byte Reload
	je	LBB0_17
## %bb.11:                              ##   in Loop: Header=BB0_4 Depth=1
	movl	-48(%rbp), %ecx                 ## 4-byte Reload
	cmpl	-44(%rbp), %ecx                 ## 4-byte Folded Reload
	movl	-52(%rbp), %edx                 ## 4-byte Reload
	jg	LBB0_16
## %bb.12:                              ##   in Loop: Header=BB0_4 Depth=1
	movq	_NBPDR@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	addl	%edx, %eax
	cmpl	%ecx, %eax
	jne	LBB0_16
## %bb.13:                              ##   in Loop: Header=BB0_4 Depth=1
	movq	%r14, %rsi
	movl	%ebx, %ecx
	callq	_pmap_protect_pde
	testq	%rax, %rax
	je	LBB0_15
## %bb.14:                              ##   in Loop: Header=BB0_4 Depth=1
	movq	_TRUE@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -72(%rbp)                 ## 8-byte Spill
	jmp	LBB0_15
	.p2align	4, 0x90
LBB0_5:                                 ##   in Loop: Header=BB0_4 Depth=1
	movq	_NBPML4@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	addl	%r15d, %eax
	movq	_PML4MASK@GOTPCREL(%rip), %rcx
	jmp	LBB0_6
	.p2align	4, 0x90
LBB0_8:                                 ##   in Loop: Header=BB0_4 Depth=1
	movq	_NBPDP@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	addl	%r15d, %eax
	movq	_PDPMASK@GOTPCREL(%rip), %rcx
LBB0_6:                                 ##   in Loop: Header=BB0_4 Depth=1
	movl	(%rcx), %ecx
	notl	%ecx
	andl	%eax, %ecx
	cmpl	%r15d, %ecx
	movl	-44(%rbp), %eax                 ## 4-byte Reload
	cmovll	%eax, %ecx
	movl	%r13d, %esi
	jmp	LBB0_34
LBB0_16:                                ##   in Loop: Header=BB0_4 Depth=1
	movq	%r14, %rsi
	callq	_pmap_demote_pde
	testl	%eax, %eax
	je	LBB0_15
LBB0_17:                                ##   in Loop: Header=BB0_4 Depth=1
	movl	-44(%rbp), %eax                 ## 4-byte Reload
	movl	-48(%rbp), %r15d                ## 4-byte Reload
	cmpl	%eax, %r15d
	cmovgel	%eax, %r15d
	movq	%r14, %rdi
	movl	-52(%rbp), %r14d                ## 4-byte Reload
	movl	%r14d, %esi
	callq	_pmap_pde_to_pte
	movl	%r15d, %ecx
	cmpl	%r15d, %r14d
	jne	LBB0_19
## %bb.18:                              ##   in Loop: Header=BB0_4 Depth=1
	movl	%r14d, %ecx
	movl	-44(%rbp), %eax                 ## 4-byte Reload
	movl	%r13d, %esi
	jmp	LBB0_34
LBB0_19:                                ##   in Loop: Header=BB0_4 Depth=1
	movq	%rax, %r15
	movl	%r13d, %esi
	movl	%ecx, -48(%rbp)                 ## 4-byte Spill
	jmp	LBB0_20
LBB0_31:                                ##   in Loop: Header=BB0_20 Depth=2
	movq	_TRUE@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -72(%rbp)                 ## 8-byte Spill
LBB0_32:                                ##   in Loop: Header=BB0_20 Depth=2
	addq	$4, %r15
	movl	-52(%rbp), %eax                 ## 4-byte Reload
	movq	_PAGE_SIZE@GOTPCREL(%rip), %rcx
	addl	(%rcx), %eax
	movl	%eax, -52(%rbp)                 ## 4-byte Spill
	movl	-48(%rbp), %ecx                 ## 4-byte Reload
	cmpl	%ecx, %eax
	je	LBB0_33
	.p2align	4, 0x90
LBB0_20:                                ##   Parent Loop BB0_4 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movl	(%r15), %r14d
	testl	%r12d, %r14d
	je	LBB0_32
## %bb.21:                              ##   in Loop: Header=BB0_20 Depth=2
	movl	%r14d, %eax
	movq	_VM_PROT_WRITE@GOTPCREL(%rip), %rcx
	testl	%ebx, (%rcx)
	jne	LBB0_25
## %bb.22:                              ##   in Loop: Header=BB0_20 Depth=2
	movq	_PG_MANAGED@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	orl	%esi, %eax
	movl	%r14d, %ecx
	notl	%ecx
	testl	%ecx, %eax
	jne	LBB0_24
## %bb.23:                              ##   in Loop: Header=BB0_20 Depth=2
	movq	_PG_FRAME@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	andl	%r14d, %edi
	callq	_PHYS_TO_VM_PAGE
	movl	%eax, %edi
	callq	_vm_page_dirty
	movl	%r13d, %esi
LBB0_24:                                ##   in Loop: Header=BB0_20 Depth=2
	movl	%r14d, %eax
	andl	-60(%rbp), %eax                 ## 4-byte Folded Reload
LBB0_25:                                ##   in Loop: Header=BB0_20 Depth=2
	xorl	%edx, %edx
	movq	_VM_PROT_EXECUTE@GOTPCREL(%rip), %rcx
	testl	%ebx, (%rcx)
	jne	LBB0_27
## %bb.26:                              ##   in Loop: Header=BB0_20 Depth=2
	movq	_pg_nx@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
LBB0_27:                                ##   in Loop: Header=BB0_20 Depth=2
	orl	%eax, %edx
	cmpl	%r14d, %edx
	je	LBB0_32
## %bb.28:                              ##   in Loop: Header=BB0_20 Depth=2
	movq	%r15, %rdi
	movl	%r14d, %esi
	callq	_atomic_cmpset_long
	movl	%r13d, %esi
	testl	%eax, %eax
	je	LBB0_20
## %bb.29:                              ##   in Loop: Header=BB0_20 Depth=2
	movl	-76(%rbp), %eax                 ## 4-byte Reload
	testl	%eax, %r14d
	je	LBB0_31
## %bb.30:                              ##   in Loop: Header=BB0_20 Depth=2
	movl	-56(%rbp), %edi                 ## 4-byte Reload
	movl	-52(%rbp), %esi                 ## 4-byte Reload
	callq	_pmap_invalidate_page
	movl	%r13d, %esi
	jmp	LBB0_32
LBB0_33:                                ##   in Loop: Header=BB0_4 Depth=1
	movl	-44(%rbp), %eax                 ## 4-byte Reload
	jmp	LBB0_34
LBB0_35:
	cmpq	$0, -72(%rbp)                   ## 8-byte Folded Reload
	movl	-56(%rbp), %ebx                 ## 4-byte Reload
	je	LBB0_37
## %bb.36:
	movl	%ebx, %edi
	callq	_pmap_invalidate_all
LBB0_37:
	movl	%ebx, %edi
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_PMAP_UNLOCK                    ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_VM_PROT_ALL,4,2                ## @VM_PROT_ALL
	.comm	_VM_PROT_NONE,4,2               ## @VM_PROT_NONE
	.comm	_VM_PROT_WRITE,4,2              ## @VM_PROT_WRITE
	.comm	_VM_PROT_EXECUTE,4,2            ## @VM_PROT_EXECUTE
	.comm	_FALSE,8,3                      ## @FALSE
	.comm	_NBPML4,4,2                     ## @NBPML4
	.comm	_PML4MASK,4,2                   ## @PML4MASK
	.comm	_NBPDP,4,2                      ## @NBPDP
	.comm	_PDPMASK,4,2                    ## @PDPMASK
	.comm	_NBPDR,4,2                      ## @NBPDR
	.comm	_PDRMASK,4,2                    ## @PDRMASK
	.comm	_PG_PS,4,2                      ## @PG_PS
	.comm	_TRUE,8,3                       ## @TRUE
	.comm	_PG_MANAGED,4,2                 ## @PG_MANAGED
	.comm	_PG_FRAME,4,2                   ## @PG_FRAME
	.comm	_pg_nx,4,2                      ## @pg_nx
	.comm	_PAGE_SIZE,8,3                  ## @PAGE_SIZE
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_pmap_protect                   ; -- Begin function pmap_protect
	.p2align	2
_pmap_protect:                          ; @pmap_protect
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #128
	.cfi_def_cfa_offset 128
	stp	x28, x27, [sp, #32]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #48]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #64]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #80]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #96]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #112]            ; 16-byte Folded Spill
	add	x29, sp, #112
	.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
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x21, x3
	mov	x20, x2
	mov	x23, x1
	mov	x19, x0
Lloh0:
	adrp	x8, _VM_PROT_ALL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _VM_PROT_ALL@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	bics	wzr, w3, w8
	cset	w0, eq
	sxtw	x1, w21
	bl	_KASSERT
Lloh3:
	adrp	x8, _VM_PROT_NONE@GOTPAGE
Lloh4:
	ldr	x8, [x8, _VM_PROT_NONE@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	cmp	w8, w21
	b.ne	LBB0_2
; %bb.1:
	mov	x0, x19
	mov	x1, x23
	mov	x2, x20
	ldp	x29, x30, [sp, #112]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #96]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #80]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #64]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #48]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #128
	b	_pmap_remove
LBB0_2:
	str	w20, [sp, #24]                  ; 4-byte Folded Spill
Lloh6:
	adrp	x27, _VM_PROT_WRITE@GOTPAGE
Lloh7:
	ldr	x27, [x27, _VM_PROT_WRITE@GOTPAGEOFF]
	ldr	w8, [x27]
Lloh8:
	adrp	x28, _VM_PROT_EXECUTE@GOTPAGE
Lloh9:
	ldr	x28, [x28, _VM_PROT_EXECUTE@GOTPAGEOFF]
	ldr	w9, [x28]
	orr	w8, w9, w8
	bics	wzr, w8, w21
	b.ne	LBB0_4
; %bb.3:
	ldp	x29, x30, [sp, #112]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #96]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #80]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #64]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #48]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #128
	ret
LBB0_4:
	mov	x0, x19
	bl	_pmap_global_bit
	mov	x20, x0
	mov	x0, x19
	bl	_pmap_modified_bit
	mov	x25, x0
	mov	x0, x19
	bl	_pmap_valid_bit
	mov	x24, x0
	mov	x0, x19
	bl	_pmap_rw_bit
	mov	x26, x0
Lloh10:
	adrp	x8, _FALSE@GOTPAGE
Lloh11:
	ldr	x8, [x8, _FALSE@GOTPAGEOFF]
Lloh12:
	ldr	x22, [x8]
	str	w19, [sp, #20]                  ; 4-byte Folded Spill
	mov	x0, x19
	bl	_PMAP_LOCK
	ldr	w8, [sp, #24]                   ; 4-byte Folded Reload
	cmp	w23, w8
	str	x22, [sp, #8]                   ; 8-byte Folded Spill
	b.ge	LBB0_33
; %bb.5:
	str	w20, [sp, #16]                  ; 4-byte Folded Spill
	orr	w8, w26, w25
	mov	x19, x8
	mvn	w8, w8
	str	w8, [sp, #28]                   ; 4-byte Folded Spill
Lloh13:
	adrp	x20, _pg_nx@GOTPAGE
Lloh14:
	ldr	x20, [x20, _pg_nx@GOTPAGEOFF]
	ldr	w25, [sp, #20]                  ; 4-byte Folded Reload
	b	LBB0_9
LBB0_6:                                 ;   in Loop: Header=BB0_9 Depth=1
Lloh15:
	adrp	x8, _NBPML4@GOTPAGE
Lloh16:
	ldr	x8, [x8, _NBPML4@GOTPAGEOFF]
Lloh17:
	ldr	w8, [x8]
Lloh18:
	adrp	x9, _PML4MASK@GOTPAGE
Lloh19:
	ldr	x9, [x9, _PML4MASK@GOTPAGEOFF]
LBB0_7:                                 ;   in Loop: Header=BB0_9 Depth=1
	ldr	w9, [x9]
	add	w8, w8, w23
	bic	w8, w8, w9
	cmp	w8, w23
	ldr	w9, [sp, #24]                   ; 4-byte Folded Reload
	csel	w22, w9, w8, lt
	mov	x8, x9
LBB0_8:                                 ;   in Loop: Header=BB0_9 Depth=1
	mov	x23, x22
	cmp	w22, w8
	b.ge	LBB0_34
LBB0_9:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_24 Depth 2
	mov	x0, x25
	mov	x1, x23
	bl	_pmap_pml4e
	ldr	w8, [x0]
	tst	w8, w24
	b.eq	LBB0_6
; %bb.10:                               ;   in Loop: Header=BB0_9 Depth=1
	mov	x1, x23
	bl	_pmap_pml4e_to_pdpe
	ldr	w8, [x0]
	tst	w8, w24
	b.eq	LBB0_19
; %bb.11:                               ;   in Loop: Header=BB0_9 Depth=1
Lloh20:
	adrp	x8, _NBPDR@GOTPAGE
Lloh21:
	ldr	x8, [x8, _NBPDR@GOTPAGEOFF]
Lloh22:
	ldr	w8, [x8]
Lloh23:
	adrp	x9, _PDRMASK@GOTPAGE
Lloh24:
	ldr	x9, [x9, _PDRMASK@GOTPAGEOFF]
Lloh25:
	ldr	w9, [x9]
	add	w8, w8, w23
	bic	w8, w8, w9
	cmp	w8, w23
	ldr	w9, [sp, #24]                   ; 4-byte Folded Reload
	csel	w22, w9, w8, lt
	mov	x1, x23
	bl	_pmap_pdpe_to_pde
	ldr	w8, [x0]
	cbz	w8, LBB0_17
; %bb.12:                               ;   in Loop: Header=BB0_9 Depth=1
	mov	x25, x0
Lloh26:
	adrp	x9, _PG_PS@GOTPAGE
Lloh27:
	ldr	x9, [x9, _PG_PS@GOTPAGEOFF]
Lloh28:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_15
; %bb.13:                               ;   in Loop: Header=BB0_9 Depth=1
Lloh29:
	adrp	x8, _NBPDR@GOTPAGE
Lloh30:
	ldr	x8, [x8, _NBPDR@GOTPAGEOFF]
Lloh31:
	ldr	w8, [x8]
	add	w8, w8, w23
	ldr	w9, [sp, #24]                   ; 4-byte Folded Reload
	cmp	w22, w9
	ccmp	w8, w22, #0, le
	b.eq	LBB0_20
; %bb.14:                               ;   in Loop: Header=BB0_9 Depth=1
	ldr	w0, [sp, #20]                   ; 4-byte Folded Reload
	mov	x1, x25
	mov	x2, x23
	bl	_pmap_demote_pde
	cbz	w0, LBB0_17
LBB0_15:                                ;   in Loop: Header=BB0_9 Depth=1
	ldr	w8, [sp, #24]                   ; 4-byte Folded Reload
	cmp	w22, w8
	csel	w22, w22, w8, lt
	mov	x0, x25
	mov	x1, x23
	bl	_pmap_pde_to_pte
	cmp	w23, w22
	b.ne	LBB0_21
; %bb.16:                               ;   in Loop: Header=BB0_9 Depth=1
	mov	x22, x23
LBB0_17:                                ;   in Loop: Header=BB0_9 Depth=1
	ldr	w25, [sp, #20]                  ; 4-byte Folded Reload
LBB0_18:                                ;   in Loop: Header=BB0_9 Depth=1
	ldr	w8, [sp, #24]                   ; 4-byte Folded Reload
	b	LBB0_8
LBB0_19:                                ;   in Loop: Header=BB0_9 Depth=1
Lloh32:
	adrp	x8, _NBPDP@GOTPAGE
Lloh33:
	ldr	x8, [x8, _NBPDP@GOTPAGEOFF]
Lloh34:
	ldr	w8, [x8]
Lloh35:
	adrp	x9, _PDPMASK@GOTPAGE
Lloh36:
	ldr	x9, [x9, _PDPMASK@GOTPAGEOFF]
	b	LBB0_7
LBB0_20:                                ;   in Loop: Header=BB0_9 Depth=1
	ldr	w0, [sp, #20]                   ; 4-byte Folded Reload
	mov	x1, x25
	mov	x25, x0
	mov	x2, x23
	mov	x3, x21
	bl	_pmap_protect_pde
Lloh37:
	adrp	x8, _TRUE@GOTPAGE
Lloh38:
	ldr	x8, [x8, _TRUE@GOTPAGEOFF]
Lloh39:
	ldr	x8, [x8]
	cmp	x0, #0
	ldr	x9, [sp, #8]                    ; 8-byte Folded Reload
	csel	x9, x9, x8, eq
	str	x9, [sp, #8]                    ; 8-byte Folded Spill
	b	LBB0_18
LBB0_21:                                ;   in Loop: Header=BB0_9 Depth=1
	mov	x25, x0
	b	LBB0_24
LBB0_22:                                ;   in Loop: Header=BB0_24 Depth=2
Lloh40:
	adrp	x8, _TRUE@GOTPAGE
Lloh41:
	ldr	x8, [x8, _TRUE@GOTPAGEOFF]
Lloh42:
	ldr	x8, [x8]
	str	x8, [sp, #8]                    ; 8-byte Folded Spill
LBB0_23:                                ;   in Loop: Header=BB0_24 Depth=2
	add	x25, x25, #4
Lloh43:
	adrp	x8, _PAGE_SIZE@GOTPAGE
Lloh44:
	ldr	x8, [x8, _PAGE_SIZE@GOTPAGEOFF]
Lloh45:
	ldr	w8, [x8]
	add	w23, w23, w8
	cmp	w23, w22
	b.eq	LBB0_17
LBB0_24:                                ;   Parent Loop BB0_9 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldr	w26, [x25]
	tst	w26, w24
	b.eq	LBB0_23
; %bb.25:                               ;   in Loop: Header=BB0_24 Depth=2
	ldr	w9, [x27]
	mov	x8, x26
	tst	w9, w21
	b.ne	LBB0_29
; %bb.26:                               ;   in Loop: Header=BB0_24 Depth=2
Lloh46:
	adrp	x8, _PG_MANAGED@GOTPAGE
Lloh47:
	ldr	x8, [x8, _PG_MANAGED@GOTPAGEOFF]
Lloh48:
	ldr	w8, [x8]
	orr	w8, w19, w8
	bics	wzr, w8, w26
	b.ne	LBB0_28
; %bb.27:                               ;   in Loop: Header=BB0_24 Depth=2
Lloh49:
	adrp	x8, _PG_FRAME@GOTPAGE
Lloh50:
	ldr	x8, [x8, _PG_FRAME@GOTPAGEOFF]
Lloh51:
	ldr	w8, [x8]
	and	w0, w8, w26
	bl	_PHYS_TO_VM_PAGE
	bl	_vm_page_dirty
LBB0_28:                                ;   in Loop: Header=BB0_24 Depth=2
	ldr	w8, [sp, #28]                   ; 4-byte Folded Reload
	and	w8, w26, w8
LBB0_29:                                ;   in Loop: Header=BB0_24 Depth=2
	ldr	w9, [x28]
	ldr	w10, [x20]
	tst	w9, w21
	csel	w9, w10, wzr, eq
	orr	w2, w9, w8
	cmp	w2, w26
	b.eq	LBB0_23
; %bb.30:                               ;   in Loop: Header=BB0_24 Depth=2
	mov	x0, x25
	mov	x1, x26
	bl	_atomic_cmpset_long
	cbz	w0, LBB0_24
; %bb.31:                               ;   in Loop: Header=BB0_24 Depth=2
	ldr	w8, [sp, #16]                   ; 4-byte Folded Reload
	tst	w26, w8
	b.eq	LBB0_22
; %bb.32:                               ;   in Loop: Header=BB0_24 Depth=2
	ldr	w0, [sp, #20]                   ; 4-byte Folded Reload
	mov	x1, x23
	bl	_pmap_invalidate_page
	b	LBB0_23
LBB0_33:
	ldr	w25, [sp, #20]                  ; 4-byte Folded Reload
LBB0_34:
	ldr	x8, [sp, #8]                    ; 8-byte Folded Reload
	cbz	x8, LBB0_36
; %bb.35:
	mov	x0, x25
	bl	_pmap_invalidate_all
LBB0_36:
	mov	x0, x25
	ldp	x29, x30, [sp, #112]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #96]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #80]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #64]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #48]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #128
	b	_PMAP_UNLOCK
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh31
	.loh AdrpLdrGot	Lloh35, Lloh36
	.loh AdrpLdrGotLdr	Lloh32, Lloh33, Lloh34
	.loh AdrpLdrGotLdr	Lloh37, Lloh38, Lloh39
	.loh AdrpLdrGotLdr	Lloh40, Lloh41, Lloh42
	.loh AdrpLdrGotLdr	Lloh43, Lloh44, Lloh45
	.loh AdrpLdrGotLdr	Lloh46, Lloh47, Lloh48
	.loh AdrpLdrGotLdr	Lloh49, Lloh50, Lloh51
	.cfi_endproc
                                        ; -- End function
	.comm	_VM_PROT_ALL,4,2                ; @VM_PROT_ALL
	.comm	_VM_PROT_NONE,4,2               ; @VM_PROT_NONE
	.comm	_VM_PROT_WRITE,4,2              ; @VM_PROT_WRITE
	.comm	_VM_PROT_EXECUTE,4,2            ; @VM_PROT_EXECUTE
	.comm	_FALSE,8,3                      ; @FALSE
	.comm	_NBPML4,4,2                     ; @NBPML4
	.comm	_PML4MASK,4,2                   ; @PML4MASK
	.comm	_NBPDP,4,2                      ; @NBPDP
	.comm	_PDPMASK,4,2                    ; @PDPMASK
	.comm	_NBPDR,4,2                      ; @NBPDR
	.comm	_PDRMASK,4,2                    ; @PDRMASK
	.comm	_PG_PS,4,2                      ; @PG_PS
	.comm	_TRUE,8,3                       ; @TRUE
	.comm	_PG_MANAGED,4,2                 ; @PG_MANAGED
	.comm	_PG_FRAME,4,2                   ; @PG_FRAME
	.comm	_pg_nx,4,2                      ; @pg_nx
	.comm	_PAGE_SIZE,8,3                  ; @PAGE_SIZE
.subsections_via_symbols
