	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function pmap_pv_demote_pte1
_pmap_pv_demote_pte1:                   ## @pmap_pv_demote_pte1
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edx, %r15d
	movq	%rsi, %r12
	movl	%edi, %r14d
	movq	_RA_WLOCKED@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_pvh_global_lock@GOTPCREL(%rip), %rdi
	callq	_rw_assert
	movq	_PTE1_OFFSET@GOTPCREL(%rip), %rax
	xorl	%edi, %edi
	movl	(%rax), %eax
	andl	%r15d, %eax
	sete	%dil
	leaq	L_.str(%rip), %rsi
	callq	_KASSERT
	movl	%r15d, %edi
	callq	_pa_to_pvh
	movq	%rax, %rbx
	movq	%r12, %rdi
	callq	_pte1_trunc
	movq	%rax, %r12
	movq	%rbx, %rdi
	movl	%r14d, %r13d
	movl	%r14d, %esi
	movq	%rax, %rdx
	callq	_pmap_pvh_remove
	movq	%rax, %r14
	xorl	%edi, %edi
	testq	%rax, %rax
	setne	%dil
	leaq	L_.str.1(%rip), %rsi
	callq	_KASSERT
	movl	%r15d, %edi
	callq	_PHYS_TO_VM_PAGE
	movq	%rax, %rbx
	leaq	4(%rax), %rdi
	movq	_pv_next@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r14, %rsi
	callq	_TAILQ_INSERT_TAIL
	movq	_PTE1_SIZE@GOTPCREL(%rip), %rax
	movq	%r12, %r15
	addq	(%rax), %r15
	movq	_PAGE_SIZE@GOTPCREL(%rip), %rax
	subq	(%rax), %r15
	addq	$8, %rbx
	movq	_VPO_UNMANAGED@GOTPCREL(%rip), %r14
	.p2align	4, 0x90
LBB0_1:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%r14), %eax
	xorl	%edi, %edi
	andl	(%rbx), %eax
	sete	%dil
	movq	%rbx, %rsi
	callq	_KASSERT
	movq	_PAGE_SIZE@GOTPCREL(%rip), %rax
	addq	(%rax), %r12
	movl	%r13d, %edi
	movq	%r12, %rsi
	movq	%rbx, %rdx
	callq	_pmap_insert_entry
	addq	$8, %rbx
	cmpq	%r15, %r12
	jl	LBB0_1
## %bb.2:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_pvh_global_lock,4,2            ## @pvh_global_lock
	.comm	_RA_WLOCKED,4,2                 ## @RA_WLOCKED
	.comm	_PTE1_OFFSET,4,2                ## @PTE1_OFFSET
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"pmap_pv_demote_pte1: pa is not 1mpage aligned"

L_.str.1:                               ## @.str.1
	.asciz	"pmap_pv_demote_pte1: pv not found"

	.comm	_pv_next,4,2                    ## @pv_next
	.comm	_PTE1_SIZE,8,3                  ## @PTE1_SIZE
	.comm	_PAGE_SIZE,8,3                  ## @PAGE_SIZE
	.comm	_VPO_UNMANAGED,4,2              ## @VPO_UNMANAGED
	.no_dead_strip	_pmap_pv_demote_pte1
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function pmap_pv_demote_pte1
_pmap_pv_demote_pte1:                   ; @pmap_pv_demote_pte1
	.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	x21, x2
	mov	x20, x1
	mov	x19, x0
Lloh0:
	adrp	x8, _RA_WLOCKED@GOTPAGE
Lloh1:
	ldr	x8, [x8, _RA_WLOCKED@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
Lloh3:
	adrp	x0, _pvh_global_lock@GOTPAGE
Lloh4:
	ldr	x0, [x0, _pvh_global_lock@GOTPAGEOFF]
	bl	_rw_assert
Lloh5:
	adrp	x8, _PTE1_OFFSET@GOTPAGE
Lloh6:
	ldr	x8, [x8, _PTE1_OFFSET@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
	tst	w8, w21
	cset	w0, eq
Lloh8:
	adrp	x1, l_.str@PAGE
Lloh9:
	add	x1, x1, l_.str@PAGEOFF
	bl	_KASSERT
	mov	x0, x21
	bl	_pa_to_pvh
	mov	x22, x0
	mov	x0, x20
	bl	_pte1_trunc
	mov	x20, x0
	mov	x0, x22
	mov	x1, x19
	mov	x2, x20
	bl	_pmap_pvh_remove
	mov	x22, x0
	cmp	x0, #0
	cset	w0, ne
Lloh10:
	adrp	x1, l_.str.1@PAGE
Lloh11:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_KASSERT
	mov	x0, x21
	bl	_PHYS_TO_VM_PAGE
	mov	x21, x0
	add	x0, x0, #4
Lloh12:
	adrp	x8, _pv_next@GOTPAGE
Lloh13:
	ldr	x8, [x8, _pv_next@GOTPAGEOFF]
Lloh14:
	ldr	w2, [x8]
	mov	x1, x22
	bl	_TAILQ_INSERT_TAIL
Lloh15:
	adrp	x8, _PTE1_SIZE@GOTPAGE
Lloh16:
	ldr	x8, [x8, _PTE1_SIZE@GOTPAGEOFF]
Lloh17:
	ldr	x8, [x8]
Lloh18:
	adrp	x22, _PAGE_SIZE@GOTPAGE
Lloh19:
	ldr	x22, [x22, _PAGE_SIZE@GOTPAGEOFF]
	ldr	x9, [x22]
	add	x8, x8, x20
	sub	x23, x8, x9
	add	x21, x21, #8
Lloh20:
	adrp	x24, _VPO_UNMANAGED@GOTPAGE
Lloh21:
	ldr	x24, [x24, _VPO_UNMANAGED@GOTPAGEOFF]
	mov	x25, x21
LBB0_1:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w8, [x25], #8
	ldr	w9, [x24]
	tst	w9, w8
	cset	w0, eq
	mov	x1, x21
	bl	_KASSERT
	ldr	x8, [x22]
	add	x20, x8, x20
	mov	x0, x19
	mov	x1, x20
	mov	x2, x21
	bl	_pmap_insert_entry
	mov	x21, x25
	cmp	x20, x23
	b.lt	LBB0_1
; %bb.2:
	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	Lloh20, Lloh21
	.loh AdrpLdrGot	Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_pvh_global_lock,4,2            ; @pvh_global_lock
	.comm	_RA_WLOCKED,4,2                 ; @RA_WLOCKED
	.comm	_PTE1_OFFSET,4,2                ; @PTE1_OFFSET
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"pmap_pv_demote_pte1: pa is not 1mpage aligned"

l_.str.1:                               ; @.str.1
	.asciz	"pmap_pv_demote_pte1: pv not found"

	.comm	_pv_next,4,2                    ; @pv_next
	.comm	_PTE1_SIZE,8,3                  ; @PTE1_SIZE
	.comm	_PAGE_SIZE,8,3                  ; @PAGE_SIZE
	.comm	_VPO_UNMANAGED,4,2              ; @VPO_UNMANAGED
	.no_dead_strip	_pmap_pv_demote_pte1
.subsections_via_symbols
