	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function pmap_pti_add_kva_locked
_pmap_pti_add_kva_locked:               ## @pmap_pti_add_kva_locked
	.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, -44(%rbp)                 ## 4-byte Spill
	movl	%esi, %r15d
	movl	%edi, %ebx
	movq	_pti_obj@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_VM_OBJECT_ASSERT_WLOCKED
	movl	%ebx, %edi
	callq	_trunc_page
	movl	%eax, %r14d
	movq	_VM_MAXUSER_ADDRESS@GOTPCREL(%rip), %rax
	xorl	%edi, %edi
	cmpl	(%rax), %r14d
	setg	%dil
	callq	_MPASS
	movl	%r15d, %edi
	callq	_round_page
	movl	%eax, %r15d
	xorl	%edi, %edi
	cmpl	%eax, %r14d
	setl	%dil
	callq	_MPASS
	jmp	LBB0_1
	.p2align	4, 0x90
LBB0_9:                                 ##   in Loop: Header=BB0_1 Depth=1
	movq	_PAGE_SIZE@GOTPCREL(%rip), %rax
	addl	(%rax), %r14d
LBB0_1:                                 ## =>This Inner Loop Header: Depth=1
	cmpl	%r15d, %r14d
	jge	LBB0_10
## %bb.2:                               ##   in Loop: Header=BB0_1 Depth=1
	movl	%r14d, %edi
	leaq	-48(%rbp), %rsi
	callq	_pmap_pti_pte
	movq	%rax, %r13
	movl	%r14d, %edi
	callq	_pmap_kextract
	movl	%eax, %r12d
	movq	_X86_PG_RW@GOTPCREL(%rip), %rax
	orl	(%rax), %r12d
	movq	_X86_PG_V@GOTPCREL(%rip), %rax
	orl	(%rax), %r12d
	movq	_X86_PG_A@GOTPCREL(%rip), %rax
	orl	(%rax), %r12d
	movq	_X86_PG_G@GOTPCREL(%rip), %rax
	orl	(%rax), %r12d
	xorl	%ebx, %ebx
	cmpl	$0, -44(%rbp)                   ## 4-byte Folded Reload
	jne	LBB0_4
## %bb.3:                               ##   in Loop: Header=BB0_1 Depth=1
	movq	_pg_nx@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
LBB0_4:                                 ##   in Loop: Header=BB0_1 Depth=1
	movq	_kernel_pmap@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_VM_MEMATTR_DEFAULT@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_FALSE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	callq	_pmap_cache_bits
	orl	%ebx, %eax
	orl	%eax, %r12d
	cmpl	$0, (%r13)
	je	LBB0_5
## %bb.6:                               ##   in Loop: Header=BB0_1 Depth=1
	xorl	%edi, %edi
	movq	_pti_finalized@GOTPCREL(%rip), %rax
	cmpl	$0, (%rax)
	sete	%dil
	movslq	%r12d, %rbx
	movq	%rbx, %rsi
	callq	_KASSERT
	xorl	%edi, %edi
	cmpl	%ebx, (%r13)
	sete	%dil
	movq	%rbx, %rsi
	callq	_KASSERT
	cmpl	$0, -48(%rbp)
	jne	LBB0_8
	jmp	LBB0_9
	.p2align	4, 0x90
LBB0_5:                                 ##   in Loop: Header=BB0_1 Depth=1
	movq	%r13, %rdi
	movl	%r12d, %esi
	callq	_pte_store
	movq	%r13, %rdi
	callq	_pmap_pti_wire_pte
	cmpl	$0, -48(%rbp)
	je	LBB0_9
LBB0_8:                                 ##   in Loop: Header=BB0_1 Depth=1
	movl	%r14d, %edi
	callq	_pmap_pti_pde
	movq	%rax, %rdi
	movl	$1, %esi
	callq	_pmap_pti_unwire_pde
	jmp	LBB0_9
LBB0_10:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_pti_obj,4,2                    ## @pti_obj
	.comm	_VM_MAXUSER_ADDRESS,4,2         ## @VM_MAXUSER_ADDRESS
	.comm	_X86_PG_RW,4,2                  ## @X86_PG_RW
	.comm	_X86_PG_V,4,2                   ## @X86_PG_V
	.comm	_X86_PG_A,4,2                   ## @X86_PG_A
	.comm	_X86_PG_G,4,2                   ## @X86_PG_G
	.comm	_pg_nx,4,2                      ## @pg_nx
	.comm	_kernel_pmap,4,2                ## @kernel_pmap
	.comm	_VM_MEMATTR_DEFAULT,4,2         ## @VM_MEMATTR_DEFAULT
	.comm	_FALSE,4,2                      ## @FALSE
	.comm	_pti_finalized,4,2              ## @pti_finalized
	.comm	_PAGE_SIZE,8,3                  ## @PAGE_SIZE
	.no_dead_strip	_pmap_pti_add_kva_locked
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function pmap_pti_add_kva_locked
_pmap_pti_add_kva_locked:               ; @pmap_pti_add_kva_locked
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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	x19, x2
	mov	x21, x1
	mov	x20, x0
Lloh0:
	adrp	x8, _pti_obj@GOTPAGE
Lloh1:
	ldr	x8, [x8, _pti_obj@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
	bl	_VM_OBJECT_ASSERT_WLOCKED
	mov	x0, x20
	bl	_trunc_page
	mov	x20, x0
Lloh3:
	adrp	x8, _VM_MAXUSER_ADDRESS@GOTPAGE
Lloh4:
	ldr	x8, [x8, _VM_MAXUSER_ADDRESS@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	cmp	w0, w8
	cset	w0, gt
	bl	_MPASS
	mov	x0, x21
	bl	_round_page
	mov	x21, x0
	cmp	w20, w0
	cset	w0, lt
	bl	_MPASS
	cmp	w20, w21
	b.ge	LBB0_7
; %bb.1:
Lloh6:
	adrp	x26, _kernel_pmap@GOTPAGE
Lloh7:
	ldr	x26, [x26, _kernel_pmap@GOTPAGEOFF]
Lloh8:
	adrp	x27, _VM_MEMATTR_DEFAULT@GOTPAGE
Lloh9:
	ldr	x27, [x27, _VM_MEMATTR_DEFAULT@GOTPAGEOFF]
Lloh10:
	adrp	x28, _FALSE@GOTPAGE
Lloh11:
	ldr	x28, [x28, _FALSE@GOTPAGEOFF]
Lloh12:
	adrp	x25, _PAGE_SIZE@GOTPAGE
Lloh13:
	ldr	x25, [x25, _PAGE_SIZE@GOTPAGEOFF]
	b	LBB0_3
LBB0_2:                                 ;   in Loop: Header=BB0_3 Depth=1
	ldr	w8, [x25]
	add	w20, w20, w8
	cmp	w20, w21
	b.ge	LBB0_7
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	add	x1, sp, #12
	mov	x0, x20
	bl	_pmap_pti_pte
	mov	x22, x0
	mov	x0, x20
	bl	_pmap_kextract
Lloh14:
	adrp	x8, _X86_PG_RW@GOTPAGE
Lloh15:
	ldr	x8, [x8, _X86_PG_RW@GOTPAGEOFF]
Lloh16:
	ldr	w8, [x8]
	orr	w8, w8, w0
Lloh17:
	adrp	x9, _X86_PG_V@GOTPAGE
Lloh18:
	ldr	x9, [x9, _X86_PG_V@GOTPAGEOFF]
Lloh19:
	ldr	w9, [x9]
	orr	w8, w8, w9
Lloh20:
	adrp	x9, _X86_PG_A@GOTPAGE
Lloh21:
	ldr	x9, [x9, _X86_PG_A@GOTPAGEOFF]
Lloh22:
	ldr	w9, [x9]
	orr	w8, w8, w9
Lloh23:
	adrp	x9, _X86_PG_G@GOTPAGE
Lloh24:
	ldr	x9, [x9, _X86_PG_G@GOTPAGEOFF]
Lloh25:
	ldr	w9, [x9]
	orr	w8, w8, w9
Lloh26:
	adrp	x9, _pg_nx@GOTPAGE
Lloh27:
	ldr	x9, [x9, _pg_nx@GOTPAGEOFF]
Lloh28:
	ldr	w9, [x9]
	cmp	w19, #0
	csel	w9, w9, wzr, eq
	orr	w23, w8, w9
	ldr	w0, [x26]
	ldr	w1, [x27]
	ldr	w2, [x28]
	bl	_pmap_cache_bits
	orr	w23, w23, w0
	ldr	w8, [x22]
	cbz	w8, LBB0_5
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
Lloh29:
	adrp	x8, _pti_finalized@GOTPAGE
Lloh30:
	ldr	x8, [x8, _pti_finalized@GOTPAGEOFF]
Lloh31:
	ldr	w8, [x8]
	cmp	w8, #0
	cset	w0, eq
	sxtw	x24, w23
	mov	x1, x24
	bl	_KASSERT
	ldr	w8, [x22]
	cmp	w8, w23
	cset	w0, eq
	mov	x1, x24
	bl	_KASSERT
	ldr	w8, [sp, #12]
	cbnz	w8, LBB0_6
	b	LBB0_2
LBB0_5:                                 ;   in Loop: Header=BB0_3 Depth=1
	mov	x0, x22
	mov	x1, x23
	bl	_pte_store
	mov	x0, x22
	bl	_pmap_pti_wire_pte
	ldr	w8, [sp, #12]
	cbz	w8, LBB0_2
LBB0_6:                                 ;   in Loop: Header=BB0_3 Depth=1
	mov	x0, x20
	bl	_pmap_pti_pde
	mov	w1, #1
	bl	_pmap_pti_unwire_pde
	b	LBB0_2
LBB0_7:
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh31
	.cfi_endproc
                                        ; -- End function
	.comm	_pti_obj,4,2                    ; @pti_obj
	.comm	_VM_MAXUSER_ADDRESS,4,2         ; @VM_MAXUSER_ADDRESS
	.comm	_X86_PG_RW,4,2                  ; @X86_PG_RW
	.comm	_X86_PG_V,4,2                   ; @X86_PG_V
	.comm	_X86_PG_A,4,2                   ; @X86_PG_A
	.comm	_X86_PG_G,4,2                   ; @X86_PG_G
	.comm	_pg_nx,4,2                      ; @pg_nx
	.comm	_kernel_pmap,4,2                ; @kernel_pmap
	.comm	_VM_MEMATTR_DEFAULT,4,2         ; @VM_MEMATTR_DEFAULT
	.comm	_FALSE,4,2                      ; @FALSE
	.comm	_pti_finalized,4,2              ; @pti_finalized
	.comm	_PAGE_SIZE,8,3                  ; @PAGE_SIZE
	.no_dead_strip	_pmap_pti_add_kva_locked
.subsections_via_symbols
