	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_pmap_copy                      ## -- Begin function pmap_copy
	.p2align	4, 0x90
_pmap_copy:                             ## @pmap_copy
	.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	$88, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	cmpq	%r8, %rdx
	jne	LBB0_40
## %bb.1:
	movq	%rsi, %rbx
	movq	%rdi, %r15
	movq	(%rdi), %rax
	cmpq	(%rsi), %rax
	jne	LBB0_40
## %bb.2:
	movq	%rcx, %r13
	movq	%rdx, %r12
	movq	%r15, %rdi
	callq	_pmap_emulate_ad_bits
	testq	%rax, %rax
	jne	LBB0_40
## %bb.3:
	movq	$0, -88(%rbp)
	cmpq	%rbx, %r15
	movq	%rbx, %rdi
	cmovbq	%r15, %rdi
	movq	%r15, %r14
	movq	%rbx, -112(%rbp)                ## 8-byte Spill
	cmovbq	%rbx, %r14
	callq	_PMAP_LOCK
	movq	%r14, %rdi
	callq	_PMAP_LOCK
	movq	%r15, %rdi
	callq	_pmap_accessed_bit
	movl	%eax, %ebx
	movq	%r15, %rdi
	callq	_pmap_modified_bit
	movl	%eax, -60(%rbp)                 ## 4-byte Spill
	movq	%r15, %rdi
	callq	_pmap_valid_bit
	movl	%eax, -92(%rbp)                 ## 4-byte Spill
	movq	%r13, -48(%rbp)                 ## 8-byte Spill
	testq	%r13, %r13
	jle	LBB0_37
## %bb.4:
	addq	%r12, -48(%rbp)                 ## 8-byte Folded Spill
	orl	%ebx, -60(%rbp)                 ## 4-byte Folded Spill
	movq	%r15, -56(%rbp)                 ## 8-byte Spill
	jmp	LBB0_5
	.p2align	4, 0x90
LBB0_6:                                 ##   in Loop: Header=BB0_5 Depth=1
	movq	_NBPML4@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	addq	%r12, %rax
	movq	_PML4MASK@GOTPCREL(%rip), %rcx
	movq	(%rcx), %r14
	notq	%r14
	andq	%rax, %r14
	cmpq	%r12, %r14
	movq	-48(%rbp), %rbx                 ## 8-byte Reload
LBB0_9:                                 ##   in Loop: Header=BB0_5 Depth=1
	cmovlq	%rbx, %r14
LBB0_10:                                ##   in Loop: Header=BB0_5 Depth=1
	movq	%r14, %r12
	cmpq	%rbx, %r14
	jge	LBB0_37
LBB0_5:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_26 Depth 2
	xorl	%edi, %edi
	movq	_UPT_MIN_ADDRESS@GOTPCREL(%rip), %rax
	cmpq	(%rax), %r12
	setl	%dil
	leaq	L_.str(%rip), %rsi
	callq	_KASSERT
	movq	-112(%rbp), %rdi                ## 8-byte Reload
	movq	%r12, %rsi
	callq	_pmap_pml4e
	movl	-92(%rbp), %ebx                 ## 4-byte Reload
	testl	%ebx, (%rax)
	je	LBB0_6
## %bb.7:                               ##   in Loop: Header=BB0_5 Depth=1
	movq	%rax, %rdi
	movq	%r12, %rsi
	callq	_pmap_pml4e_to_pdpe
	testl	%ebx, (%rax)
	movq	-48(%rbp), %rbx                 ## 8-byte Reload
	je	LBB0_8
## %bb.11:                              ##   in Loop: Header=BB0_5 Depth=1
	movq	_NBPDR@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	addq	%r12, %rcx
	movq	_PDRMASK@GOTPCREL(%rip), %rdx
	movq	(%rdx), %r14
	notq	%r14
	andq	%rcx, %r14
	cmpq	%r12, %r14
	cmovlq	%rbx, %r14
	movq	%rax, %rdi
	movq	%r12, %rsi
	callq	_pmap_pdpe_to_pde
	movl	(%rax), %r13d
	testl	%r13d, %r13d
	je	LBB0_10
## %bb.12:                              ##   in Loop: Header=BB0_5 Depth=1
	movq	_PG_PS@GOTPCREL(%rip), %rax
	testl	%r13d, (%rax)
	je	LBB0_24
## %bb.13:                              ##   in Loop: Header=BB0_5 Depth=1
	movq	_PDRMASK@GOTPCREL(%rip), %rax
	testq	%r12, (%rax)
	jne	LBB0_10
## %bb.14:                              ##   in Loop: Header=BB0_5 Depth=1
	movq	_NBPDR@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	addq	%r12, %rax
	cmpq	%rbx, %rax
	jg	LBB0_10
## %bb.15:                              ##   in Loop: Header=BB0_5 Depth=1
	movq	%r15, %rdi
	movq	%r12, %rsi
	xorl	%edx, %edx
	callq	_pmap_allocpde
	testq	%rax, %rax
	je	LBB0_37
## %bb.16:                              ##   in Loop: Header=BB0_5 Depth=1
	movq	%rax, %rbx
	movq	%rax, %rdi
	callq	_VM_PAGE_TO_PHYS
	movl	%eax, %edi
	callq	_PHYS_TO_DMAP
	movq	%rax, %r15
	movq	%r12, %rdi
	callq	_pmap_pde_index
	movq	%r15, -72(%rbp)                 ## 8-byte Spill
	cmpl	$0, (%r15,%rax,4)
	je	LBB0_17
LBB0_23:                                ##   in Loop: Header=BB0_5 Depth=1
	decq	(%rbx)
	movq	-56(%rbp), %r15                 ## 8-byte Reload
	movq	-48(%rbp), %rbx                 ## 8-byte Reload
	jmp	LBB0_10
	.p2align	4, 0x90
LBB0_8:                                 ##   in Loop: Header=BB0_5 Depth=1
	movq	_NBPDP@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	addq	%r12, %rax
	movq	_PDPMASK@GOTPCREL(%rip), %rcx
	movq	(%rcx), %r14
	notq	%r14
	andq	%rax, %r14
	cmpq	%r12, %r14
	jmp	LBB0_9
LBB0_24:                                ##   in Loop: Header=BB0_5 Depth=1
	movq	_PG_FRAME@GOTPCREL(%rip), %rax
	andl	(%rax), %r13d
	movl	%r13d, %edi
	callq	_PHYS_TO_VM_PAGE
	xorl	%edi, %edi
	movq	%rax, -120(%rbp)                ## 8-byte Spill
	cmpq	$0, (%rax)
	setg	%dil
	leaq	L_.str.1(%rip), %rsi
	callq	_KASSERT
	cmpq	%rbx, %r14
	cmovgeq	%rbx, %r14
	movl	%r13d, %edi
	callq	_PHYS_TO_DMAP
	movq	%rax, %r13
	movq	%r12, %rdi
	callq	_pmap_pte_index
	cmpq	%r14, %r12
	jge	LBB0_10
## %bb.25:                              ##   in Loop: Header=BB0_5 Depth=1
	leaq	(,%rax,4), %rbx
	addq	%r13, %rbx
	xorl	%edx, %edx
	jmp	LBB0_26
	.p2align	4, 0x90
LBB0_33:                                ##   in Loop: Header=BB0_26 Depth=2
	movq	_PAGE_SIZE@GOTPCREL(%rip), %rax
	addq	(%rax), %r12
	addq	$4, %rbx
	cmpq	%r14, %r12
	jge	LBB0_34
LBB0_26:                                ##   Parent Loop BB0_5 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movl	(%rbx), %esi
	movq	_PG_MANAGED@GOTPCREL(%rip), %rax
	testl	%esi, (%rax)
	je	LBB0_33
## %bb.27:                              ##   in Loop: Header=BB0_26 Depth=2
	movl	%esi, -72(%rbp)                 ## 4-byte Spill
	testq	%rdx, %rdx
	je	LBB0_29
## %bb.28:                              ##   in Loop: Header=BB0_26 Depth=2
	movq	8(%rdx), %r13
	movq	%rdx, %r15
	movq	%r12, %rdi
	callq	_pmap_pde_pindex
	xorl	%edi, %edi
	cmpq	%rax, %r13
	sete	%dil
	leaq	L_.str.2(%rip), %rsi
	callq	_KASSERT
	movq	%r15, %rax
	incq	(%r15)
	jmp	LBB0_30
LBB0_29:                                ##   in Loop: Header=BB0_26 Depth=2
	movq	%r15, %rdi
	movq	%r12, %rsi
	xorl	%edx, %edx
	callq	_pmap_allocpte
	testq	%rax, %rax
	je	LBB0_37
LBB0_30:                                ##   in Loop: Header=BB0_26 Depth=2
	movq	%rbx, -128(%rbp)                ## 8-byte Spill
	movq	%rax, -104(%rbp)                ## 8-byte Spill
	movq	%rax, %rdi
	callq	_VM_PAGE_TO_PHYS
	movl	%eax, %edi
	callq	_PHYS_TO_DMAP
	movq	%rax, %rbx
	movq	%r12, %rdi
	callq	_pmap_pte_index
	cmpl	$0, (%rbx,%rax,4)
	movl	-72(%rbp), %r13d                ## 4-byte Reload
	jne	LBB0_35
## %bb.31:                              ##   in Loop: Header=BB0_26 Depth=2
	movq	%rax, %r15
	movq	_PG_FRAME@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	andl	%r13d, %edi
	callq	_PHYS_TO_VM_PAGE
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	movq	%r12, %rsi
	movq	%rax, %rdx
	leaq	-88(%rbp), %rcx
	callq	_pmap_try_insert_pv_entry
	testq	%rax, %rax
	je	LBB0_35
## %bb.32:                              ##   in Loop: Header=BB0_26 Depth=2
	movq	_PG_W@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	orl	-60(%rbp), %eax                 ## 4-byte Folded Reload
	notl	%eax
	andl	%eax, %r13d
	movl	%r13d, (%rbx,%r15,4)
	movq	-56(%rbp), %r15                 ## 8-byte Reload
	movq	%r15, %rdi
	movl	$1, %esi
	callq	_pmap_resident_count_inc
	movq	-104(%rbp), %rdx                ## 8-byte Reload
	movq	(%rdx), %rax
	movq	-120(%rbp), %rcx                ## 8-byte Reload
	cmpq	(%rcx), %rax
	movq	-128(%rbp), %rbx                ## 8-byte Reload
	jl	LBB0_33
LBB0_34:                                ##   in Loop: Header=BB0_5 Depth=1
	movq	-48(%rbp), %rbx                 ## 8-byte Reload
	jmp	LBB0_10
LBB0_17:                                ##   in Loop: Header=BB0_5 Depth=1
	movq	%rax, %rcx
	movq	_PG_MANAGED@GOTPCREL(%rip), %rax
	testl	%r13d, (%rax)
	je	LBB0_19
## %bb.18:                              ##   in Loop: Header=BB0_5 Depth=1
	movq	_PMAP_ENTER_NORECLAIM@GOTPCREL(%rip), %rax
	movq	%rcx, %r15
	movl	(%rax), %ecx
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	movq	%r12, %rsi
	movl	%r13d, %edx
	leaq	-88(%rbp), %r8
	callq	_pmap_pv_insert_pde
	movq	%r15, %rcx
	testq	%rax, %rax
	je	LBB0_23
LBB0_19:                                ##   in Loop: Header=BB0_5 Depth=1
	movq	_PG_W@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	notl	%eax
	andl	%eax, %r13d
	movq	-72(%rbp), %rax                 ## 8-byte Reload
	movl	%r13d, (%rax,%rcx,4)
	movq	_NBPDR@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	_PAGE_SIZE@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movq	%rax, %rdx
	orq	%rcx, %rdx
	shrq	$32, %rdx
	je	LBB0_20
## %bb.21:                              ##   in Loop: Header=BB0_5 Depth=1
	cqto
	idivq	%rcx
	jmp	LBB0_22
LBB0_20:                                ##   in Loop: Header=BB0_5 Depth=1
                                        ## kill: def $eax killed $eax killed $rax
	xorl	%edx, %edx
	divl	%ecx
                                        ## kill: def $eax killed $eax def $rax
LBB0_22:                                ##   in Loop: Header=BB0_5 Depth=1
	movq	-56(%rbp), %r15                 ## 8-byte Reload
	movq	-48(%rbp), %rbx                 ## 8-byte Reload
	movq	%r15, %rdi
	movl	%eax, %esi
	callq	_pmap_resident_count_inc
	movq	_pmap_pde_mappings@GOTPCREL(%rip), %rdi
	movl	$1, %esi
	callq	_atomic_add_long
	jmp	LBB0_10
LBB0_35:
	leaq	-80(%rbp), %rbx
	movq	%rbx, %rdi
	callq	_SLIST_INIT
	movq	-56(%rbp), %r15                 ## 8-byte Reload
	movq	%r15, %rdi
	movq	%r12, %rsi
	movq	-104(%rbp), %rdx                ## 8-byte Reload
	movq	%rbx, %rcx
	callq	_pmap_unwire_ptp
	testq	%rax, %rax
	je	LBB0_37
## %bb.36:
	movq	%r15, %rdi
	movq	%r12, %rsi
	callq	_pmap_invalidate_page
	leaq	-80(%rbp), %rdi
	movl	$1, %esi
	callq	_vm_page_free_pages_toq
LBB0_37:
	movq	-88(%rbp), %rdi
	testq	%rdi, %rdi
	je	LBB0_39
## %bb.38:
	callq	_rw_wunlock
LBB0_39:
	movq	-112(%rbp), %rdi                ## 8-byte Reload
	callq	_PMAP_UNLOCK
	movq	%r15, %rdi
	callq	_PMAP_UNLOCK
LBB0_40:
	addq	$88, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_UPT_MIN_ADDRESS,8,3            ## @UPT_MIN_ADDRESS
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"pmap_copy: invalid to pmap_copy page tables"

	.comm	_NBPML4,8,3                     ## @NBPML4
	.comm	_PML4MASK,8,3                   ## @PML4MASK
	.comm	_NBPDP,8,3                      ## @NBPDP
	.comm	_PDPMASK,8,3                    ## @PDPMASK
	.comm	_NBPDR,8,3                      ## @NBPDR
	.comm	_PDRMASK,8,3                    ## @PDRMASK
	.comm	_PG_PS,4,2                      ## @PG_PS
	.comm	_PG_MANAGED,4,2                 ## @PG_MANAGED
	.comm	_PMAP_ENTER_NORECLAIM,4,2       ## @PMAP_ENTER_NORECLAIM
	.comm	_PG_W,4,2                       ## @PG_W
	.comm	_PAGE_SIZE,8,3                  ## @PAGE_SIZE
	.comm	_pmap_pde_mappings,4,2          ## @pmap_pde_mappings
	.comm	_PG_FRAME,4,2                   ## @PG_FRAME
L_.str.1:                               ## @.str.1
	.asciz	"pmap_copy: source page table page is unused"

L_.str.2:                               ## @.str.2
	.asciz	"dstmpte pindex/addr mismatch"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_pmap_copy                      ; -- Begin function pmap_copy
	.p2align	2
_pmap_copy:                             ; @pmap_copy
	.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
	cmp	x2, x4
	b.ne	LBB0_37
; %bb.1:
	mov	x20, x1
	mov	x19, x0
	ldr	x8, [x0]
	ldr	x9, [x1]
	cmp	x8, x9
	b.ne	LBB0_37
; %bb.2:
	mov	x23, x3
	mov	x21, x2
	mov	x0, x19
	bl	_pmap_emulate_ad_bits
	cbnz	x0, LBB0_37
; %bb.3:
	str	xzr, [sp, #24]
	cmp	x19, x20
	csel	x0, x19, x20, lo
	csel	x22, x20, x19, lo
	bl	_PMAP_LOCK
	mov	x0, x22
	bl	_PMAP_LOCK
	mov	x0, x19
	bl	_pmap_accessed_bit
	mov	x24, x0
	mov	x0, x19
	bl	_pmap_modified_bit
	mov	x25, x0
	mov	x0, x19
	bl	_pmap_valid_bit
	cmp	x23, #1
	b.lt	LBB0_34
; %bb.4:
	mov	x26, x0
	add	x23, x21, x23
	orr	w8, w25, w24
	stp	w8, w0, [sp]                    ; 8-byte Folded Spill
	b	LBB0_8
LBB0_5:                                 ;   in Loop: Header=BB0_8 Depth=1
Lloh0:
	adrp	x8, _NBPML4@GOTPAGE
Lloh1:
	ldr	x8, [x8, _NBPML4@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
Lloh3:
	adrp	x9, _PML4MASK@GOTPAGE
Lloh4:
	ldr	x9, [x9, _PML4MASK@GOTPAGEOFF]
LBB0_6:                                 ;   in Loop: Header=BB0_8 Depth=1
	ldr	x9, [x9]
	add	x8, x8, x21
	bic	x8, x8, x9
	cmp	x8, x21
	csel	x25, x23, x8, lt
LBB0_7:                                 ;   in Loop: Header=BB0_8 Depth=1
	mov	x21, x25
	cmp	x25, x23
	b.ge	LBB0_34
LBB0_8:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_21 Depth 2
Lloh5:
	adrp	x8, _UPT_MIN_ADDRESS@GOTPAGE
Lloh6:
	ldr	x8, [x8, _UPT_MIN_ADDRESS@GOTPAGEOFF]
Lloh7:
	ldr	x8, [x8]
	cmp	x21, x8
	cset	w0, lt
Lloh8:
	adrp	x1, l_.str@PAGE
Lloh9:
	add	x1, x1, l_.str@PAGEOFF
	bl	_KASSERT
	mov	x0, x20
	mov	x1, x21
	bl	_pmap_pml4e
	ldr	w8, [x0]
	tst	w8, w26
	b.eq	LBB0_5
; %bb.9:                                ;   in Loop: Header=BB0_8 Depth=1
	mov	x1, x21
	bl	_pmap_pml4e_to_pdpe
	ldr	w8, [x0]
	tst	w8, w26
	b.eq	LBB0_17
; %bb.10:                               ;   in Loop: Header=BB0_8 Depth=1
Lloh10:
	adrp	x8, _NBPDR@GOTPAGE
Lloh11:
	ldr	x8, [x8, _NBPDR@GOTPAGEOFF]
Lloh12:
	ldr	x8, [x8]
Lloh13:
	adrp	x9, _PDRMASK@GOTPAGE
Lloh14:
	ldr	x9, [x9, _PDRMASK@GOTPAGEOFF]
Lloh15:
	ldr	x9, [x9]
	add	x8, x8, x21
	bic	x8, x8, x9
	cmp	x8, x21
	csel	x25, x23, x8, lt
	mov	x1, x21
	bl	_pmap_pdpe_to_pde
	ldr	w27, [x0]
	cbz	w27, LBB0_7
; %bb.11:                               ;   in Loop: Header=BB0_8 Depth=1
Lloh16:
	adrp	x8, _PG_PS@GOTPAGE
Lloh17:
	ldr	x8, [x8, _PG_PS@GOTPAGEOFF]
Lloh18:
	ldr	w8, [x8]
	tst	w8, w27
	b.eq	LBB0_18
; %bb.12:                               ;   in Loop: Header=BB0_8 Depth=1
Lloh19:
	adrp	x8, _PDRMASK@GOTPAGE
Lloh20:
	ldr	x8, [x8, _PDRMASK@GOTPAGEOFF]
Lloh21:
	ldr	x8, [x8]
	tst	x8, x21
	b.ne	LBB0_7
; %bb.13:                               ;   in Loop: Header=BB0_8 Depth=1
Lloh22:
	adrp	x8, _NBPDR@GOTPAGE
Lloh23:
	ldr	x8, [x8, _NBPDR@GOTPAGEOFF]
Lloh24:
	ldr	x8, [x8]
	add	x8, x8, x21
	cmp	x8, x23
	b.gt	LBB0_7
; %bb.14:                               ;   in Loop: Header=BB0_8 Depth=1
	mov	x0, x19
	mov	x1, x21
	mov	x2, #0
	bl	_pmap_allocpde
	cbz	x0, LBB0_34
; %bb.15:                               ;   in Loop: Header=BB0_8 Depth=1
	mov	x28, x0
	bl	_VM_PAGE_TO_PHYS
	bl	_PHYS_TO_DMAP
	mov	x26, x0
	mov	x0, x21
	bl	_pmap_pde_index
	ldr	w8, [x26, x0, lsl #2]
	cbz	w8, LBB0_28
LBB0_16:                                ;   in Loop: Header=BB0_8 Depth=1
	ldr	x8, [x28]
	sub	x8, x8, #1
	str	x8, [x28]
	b	LBB0_31
LBB0_17:                                ;   in Loop: Header=BB0_8 Depth=1
Lloh25:
	adrp	x8, _NBPDP@GOTPAGE
Lloh26:
	ldr	x8, [x8, _NBPDP@GOTPAGEOFF]
Lloh27:
	ldr	x8, [x8]
Lloh28:
	adrp	x9, _PDPMASK@GOTPAGE
Lloh29:
	ldr	x9, [x9, _PDPMASK@GOTPAGEOFF]
	b	LBB0_6
LBB0_18:                                ;   in Loop: Header=BB0_8 Depth=1
Lloh30:
	adrp	x8, _PG_FRAME@GOTPAGE
Lloh31:
	ldr	x8, [x8, _PG_FRAME@GOTPAGEOFF]
Lloh32:
	ldr	w8, [x8]
	and	w24, w8, w27
	mov	x0, x24
	bl	_PHYS_TO_VM_PAGE
	str	x0, [sp, #8]                    ; 8-byte Folded Spill
	ldr	x8, [x0]
	cmp	x8, #0
	cset	w0, gt
Lloh33:
	adrp	x1, l_.str.1@PAGE
Lloh34:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_KASSERT
	cmp	x25, x23
	csel	x25, x25, x23, lt
	mov	x0, x24
	bl	_PHYS_TO_DMAP
	mov	x24, x0
	mov	x0, x21
	bl	_pmap_pte_index
	cmp	x21, x25
	b.ge	LBB0_7
; %bb.19:                               ;   in Loop: Header=BB0_8 Depth=1
	mov	x28, #0
	add	x27, x24, x0, lsl #2
	b	LBB0_21
LBB0_20:                                ;   in Loop: Header=BB0_21 Depth=2
Lloh35:
	adrp	x8, _PAGE_SIZE@GOTPAGE
Lloh36:
	ldr	x8, [x8, _PAGE_SIZE@GOTPAGEOFF]
Lloh37:
	ldr	x8, [x8]
	add	x27, x27, #4
	add	x21, x8, x21
	cmp	x21, x25
	b.ge	LBB0_7
LBB0_21:                                ;   Parent Loop BB0_8 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldr	w22, [x27]
Lloh38:
	adrp	x8, _PG_MANAGED@GOTPAGE
Lloh39:
	ldr	x8, [x8, _PG_MANAGED@GOTPAGEOFF]
Lloh40:
	ldr	w8, [x8]
	tst	w8, w22
	b.eq	LBB0_20
; %bb.22:                               ;   in Loop: Header=BB0_21 Depth=2
	cbz	x28, LBB0_24
; %bb.23:                               ;   in Loop: Header=BB0_21 Depth=2
	ldr	x24, [x28, #8]
	mov	x0, x21
	bl	_pmap_pde_pindex
	cmp	x24, x0
	cset	w0, eq
Lloh41:
	adrp	x1, l_.str.2@PAGE
Lloh42:
	add	x1, x1, l_.str.2@PAGEOFF
	bl	_KASSERT
	ldr	x8, [x28]
	add	x8, x8, #1
	str	x8, [x28]
	b	LBB0_25
LBB0_24:                                ;   in Loop: Header=BB0_21 Depth=2
	mov	x0, x19
	mov	x1, x21
	mov	x2, #0
	bl	_pmap_allocpte
	mov	x28, x0
	cbz	x0, LBB0_34
LBB0_25:                                ;   in Loop: Header=BB0_21 Depth=2
	mov	x0, x28
	bl	_VM_PAGE_TO_PHYS
	bl	_PHYS_TO_DMAP
	mov	x26, x0
	mov	x0, x21
	bl	_pmap_pte_index
	ldr	w8, [x26, x0, lsl #2]
	cbnz	w8, LBB0_32
; %bb.26:                               ;   in Loop: Header=BB0_21 Depth=2
	mov	x24, x0
Lloh43:
	adrp	x8, _PG_FRAME@GOTPAGE
Lloh44:
	ldr	x8, [x8, _PG_FRAME@GOTPAGEOFF]
Lloh45:
	ldr	w8, [x8]
	and	w0, w8, w22
	bl	_PHYS_TO_VM_PAGE
	mov	x2, x0
	add	x3, sp, #24
	mov	x0, x19
	mov	x1, x21
	bl	_pmap_try_insert_pv_entry
	cbz	x0, LBB0_32
; %bb.27:                               ;   in Loop: Header=BB0_21 Depth=2
Lloh46:
	adrp	x8, _PG_W@GOTPAGE
Lloh47:
	ldr	x8, [x8, _PG_W@GOTPAGEOFF]
Lloh48:
	ldr	w8, [x8]
	ldr	w9, [sp]                        ; 4-byte Folded Reload
	orr	w8, w9, w8
	bic	w8, w22, w8
	str	w8, [x26, x24, lsl #2]
	mov	x0, x19
	mov	w1, #1
	bl	_pmap_resident_count_inc
	ldr	x8, [x28]
	ldr	x9, [sp, #8]                    ; 8-byte Folded Reload
	ldr	x9, [x9]
	cmp	x8, x9
	ldr	w26, [sp, #4]                   ; 4-byte Folded Reload
	b.lt	LBB0_20
	b	LBB0_7
LBB0_28:                                ;   in Loop: Header=BB0_8 Depth=1
	mov	x24, x0
Lloh49:
	adrp	x8, _PG_MANAGED@GOTPAGE
Lloh50:
	ldr	x8, [x8, _PG_MANAGED@GOTPAGEOFF]
Lloh51:
	ldr	w8, [x8]
	tst	w8, w27
	b.eq	LBB0_30
; %bb.29:                               ;   in Loop: Header=BB0_8 Depth=1
Lloh52:
	adrp	x8, _PMAP_ENTER_NORECLAIM@GOTPAGE
Lloh53:
	ldr	x8, [x8, _PMAP_ENTER_NORECLAIM@GOTPAGEOFF]
Lloh54:
	ldr	w3, [x8]
	add	x4, sp, #24
	mov	x0, x19
	mov	x1, x21
	mov	x2, x27
	bl	_pmap_pv_insert_pde
	cbz	x0, LBB0_16
LBB0_30:                                ;   in Loop: Header=BB0_8 Depth=1
Lloh55:
	adrp	x8, _PG_W@GOTPAGE
Lloh56:
	ldr	x8, [x8, _PG_W@GOTPAGEOFF]
Lloh57:
	ldr	w8, [x8]
	bic	w8, w27, w8
	str	w8, [x26, x24, lsl #2]
Lloh58:
	adrp	x8, _NBPDR@GOTPAGE
Lloh59:
	ldr	x8, [x8, _NBPDR@GOTPAGEOFF]
Lloh60:
	ldr	x8, [x8]
Lloh61:
	adrp	x9, _PAGE_SIZE@GOTPAGE
Lloh62:
	ldr	x9, [x9, _PAGE_SIZE@GOTPAGEOFF]
Lloh63:
	ldr	x9, [x9]
	sdiv	x1, x8, x9
	mov	x0, x19
                                        ; kill: def $w1 killed $w1 killed $x1
	bl	_pmap_resident_count_inc
Lloh64:
	adrp	x0, _pmap_pde_mappings@GOTPAGE
Lloh65:
	ldr	x0, [x0, _pmap_pde_mappings@GOTPAGEOFF]
	mov	w1, #1
	bl	_atomic_add_long
LBB0_31:                                ;   in Loop: Header=BB0_8 Depth=1
	ldr	w26, [sp, #4]                   ; 4-byte Folded Reload
	b	LBB0_7
LBB0_32:
	add	x0, sp, #16
	bl	_SLIST_INIT
	add	x3, sp, #16
	mov	x0, x19
	mov	x1, x21
	mov	x2, x28
	bl	_pmap_unwire_ptp
	cbz	x0, LBB0_34
; %bb.33:
	mov	x0, x19
	mov	x1, x21
	bl	_pmap_invalidate_page
	add	x0, sp, #16
	mov	w1, #1
	bl	_vm_page_free_pages_toq
LBB0_34:
	ldr	x0, [sp, #24]
	cbz	x0, LBB0_36
; %bb.35:
	bl	_rw_wunlock
LBB0_36:
	mov	x0, x20
	bl	_PMAP_UNLOCK
	mov	x0, x19
	bl	_PMAP_UNLOCK
LBB0_37:
	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
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGot	Lloh28, Lloh29
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpAdd	Lloh33, Lloh34
	.loh AdrpLdrGotLdr	Lloh30, Lloh31, Lloh32
	.loh AdrpLdrGotLdr	Lloh35, Lloh36, Lloh37
	.loh AdrpLdrGotLdr	Lloh38, Lloh39, Lloh40
	.loh AdrpAdd	Lloh41, Lloh42
	.loh AdrpLdrGotLdr	Lloh43, Lloh44, Lloh45
	.loh AdrpLdrGotLdr	Lloh46, Lloh47, Lloh48
	.loh AdrpLdrGotLdr	Lloh49, Lloh50, Lloh51
	.loh AdrpLdrGotLdr	Lloh52, Lloh53, Lloh54
	.loh AdrpLdrGot	Lloh64, Lloh65
	.loh AdrpLdrGotLdr	Lloh61, Lloh62, Lloh63
	.loh AdrpLdrGotLdr	Lloh58, Lloh59, Lloh60
	.loh AdrpLdrGotLdr	Lloh55, Lloh56, Lloh57
	.cfi_endproc
                                        ; -- End function
	.comm	_UPT_MIN_ADDRESS,8,3            ; @UPT_MIN_ADDRESS
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"pmap_copy: invalid to pmap_copy page tables"

	.comm	_NBPML4,8,3                     ; @NBPML4
	.comm	_PML4MASK,8,3                   ; @PML4MASK
	.comm	_NBPDP,8,3                      ; @NBPDP
	.comm	_PDPMASK,8,3                    ; @PDPMASK
	.comm	_NBPDR,8,3                      ; @NBPDR
	.comm	_PDRMASK,8,3                    ; @PDRMASK
	.comm	_PG_PS,4,2                      ; @PG_PS
	.comm	_PG_MANAGED,4,2                 ; @PG_MANAGED
	.comm	_PMAP_ENTER_NORECLAIM,4,2       ; @PMAP_ENTER_NORECLAIM
	.comm	_PG_W,4,2                       ; @PG_W
	.comm	_PAGE_SIZE,8,3                  ; @PAGE_SIZE
	.comm	_pmap_pde_mappings,4,2          ; @pmap_pde_mappings
	.comm	_PG_FRAME,4,2                   ; @PG_FRAME
l_.str.1:                               ; @.str.1
	.asciz	"pmap_copy: source page table page is unused"

l_.str.2:                               ; @.str.2
	.asciz	"dstmpte pindex/addr mismatch"

.subsections_via_symbols
