	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function pmap_pkru_update_range
_pmap_pkru_update_range:                ## @pmap_pkru_update_range
	.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
	movq	%rcx, %r12
	movl	%edx, %ebx
	movl	%esi, %r14d
	movq	%rdi, %r15
	movq	_MA_OWNED@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_PMAP_LOCK_ASSERT
	movq	%r15, -56(%rbp)                 ## 8-byte Spill
	movq	(%r15), %rax
	movq	_PT_X86@GOTPCREL(%rip), %rcx
	xorl	%edi, %edi
	cmpq	(%rcx), %rax
	sete	%dil
	callq	_MPASS
	movq	_PMAP_MAX_PKRU_IDX@GOTPCREL(%rip), %rax
	xorl	%edi, %edi
	cmpq	%r12, (%rax)
	setge	%dil
	callq	_MPASS
	cmpl	%ebx, %r14d
	jge	LBB0_24
## %bb.1:
	movq	%r12, -80(%rbp)                 ## 8-byte Spill
	movl	$0, -60(%rbp)                   ## 4-byte Folded Spill
	movq	_X86_PG_V@GOTPCREL(%rip), %r13
	movl	%r14d, -64(%rbp)                ## 4-byte Spill
	movl	%r14d, %r15d
	movq	-56(%rbp), %r14                 ## 8-byte Reload
	movl	%ebx, -44(%rbp)                 ## 4-byte Spill
	jmp	LBB0_2
LBB0_15:                                ##   in Loop: Header=BB0_2 Depth=1
	movl	%r15d, %r12d
	.p2align	4, 0x90
LBB0_21:                                ##   in Loop: Header=BB0_2 Depth=1
	movl	-44(%rbp), %ebx                 ## 4-byte Reload
	movq	-56(%rbp), %r14                 ## 8-byte Reload
LBB0_22:                                ##   in Loop: Header=BB0_2 Depth=1
	movl	%r12d, %r15d
	cmpl	%ebx, %r12d
	jge	LBB0_23
LBB0_2:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_17 Depth 2
	movq	%r14, %rdi
	movl	%r15d, %esi
	callq	_pmap_pml4e
	movl	(%r13), %ecx
	testl	%ecx, (%rax)
	je	LBB0_3
## %bb.5:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	%rax, %rdi
	movl	%r15d, %esi
	callq	_pmap_pml4e_to_pdpe
	movl	(%r13), %ecx
	testl	%ecx, (%rax)
	je	LBB0_6
## %bb.7:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	_NBPDR@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	addl	%r15d, %ecx
	movq	_PDRMASK@GOTPCREL(%rip), %rdx
	movl	(%rdx), %r12d
	notl	%r12d
	andl	%ecx, %r12d
	cmpl	%r15d, %r12d
	cmovll	%ebx, %r12d
	movq	%rax, %rdi
	movl	%r15d, %esi
	callq	_pmap_pdpe_to_pde
	movl	(%rax), %ebx
	testl	%ebx, %ebx
	je	LBB0_21
## %bb.8:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	%rax, %r14
	xorl	%edi, %edi
	movl	(%r13), %eax
	andl	%ebx, %eax
	setne	%dil
	callq	_MPASS
	movq	_PG_PS@GOTPCREL(%rip), %rax
	testl	%ebx, (%rax)
	je	LBB0_14
## %bb.9:                               ##   in Loop: Header=BB0_2 Depth=1
	cmpl	-44(%rbp), %r12d                ## 4-byte Folded Reload
	jg	LBB0_13
## %bb.10:                              ##   in Loop: Header=BB0_2 Depth=1
	movq	_NBPDR@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	addl	%r15d, %eax
	cmpl	%r12d, %eax
	jne	LBB0_13
## %bb.11:                              ##   in Loop: Header=BB0_2 Depth=1
	movq	_X86_PG_PKU_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %r15d
	notl	%r15d
	andl	%ebx, %r15d
	movq	-80(%rbp), %rdi                 ## 8-byte Reload
	callq	_X86_PG_PKU
	orl	%r15d, %eax
	cmpl	%ebx, %eax
	je	LBB0_21
## %bb.12:                              ##   in Loop: Header=BB0_2 Depth=1
	movl	%eax, (%r14)
	movl	$1, -60(%rbp)                   ## 4-byte Folded Spill
	jmp	LBB0_21
	.p2align	4, 0x90
LBB0_3:                                 ##   in Loop: Header=BB0_2 Depth=1
	movq	_NBPML4@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	addl	%r15d, %eax
	movq	_PML4MASK@GOTPCREL(%rip), %rcx
	jmp	LBB0_4
	.p2align	4, 0x90
LBB0_6:                                 ##   in Loop: Header=BB0_2 Depth=1
	movq	_NBPDP@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	addl	%r15d, %eax
	movq	_PDPMASK@GOTPCREL(%rip), %rcx
LBB0_4:                                 ##   in Loop: Header=BB0_2 Depth=1
	movl	(%rcx), %r12d
	notl	%r12d
	andl	%eax, %r12d
	cmpl	%r15d, %r12d
	cmovll	%ebx, %r12d
	jmp	LBB0_22
LBB0_13:                                ##   in Loop: Header=BB0_2 Depth=1
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	movq	%r14, %rsi
	movl	%r15d, %edx
	callq	_pmap_demote_pde
	testl	%eax, %eax
	je	LBB0_21
LBB0_14:                                ##   in Loop: Header=BB0_2 Depth=1
	movl	-44(%rbp), %eax                 ## 4-byte Reload
	cmpl	%eax, %r12d
	cmovgel	%eax, %r12d
	movq	%r14, %rdi
	movl	%r15d, %esi
	callq	_pmap_pde_to_pte
	cmpl	%r12d, %r15d
	je	LBB0_15
## %bb.16:                              ##   in Loop: Header=BB0_2 Depth=1
	movq	%rax, %rbx
	movl	%r12d, -68(%rbp)                ## 4-byte Spill
	jmp	LBB0_17
	.p2align	4, 0x90
LBB0_20:                                ##   in Loop: Header=BB0_17 Depth=2
	addq	$4, %rbx
	movq	_PAGE_SIZE@GOTPCREL(%rip), %rax
	addl	(%rax), %r15d
	cmpl	%r12d, %r15d
	je	LBB0_21
LBB0_17:                                ##   Parent Loop BB0_2 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movl	(%rbx), %r14d
	testl	%r14d, (%r13)
	je	LBB0_20
## %bb.18:                              ##   in Loop: Header=BB0_17 Depth=2
	movq	%r13, %r12
	movq	_X86_PG_PKU_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %r13d
	notl	%r13d
	andl	%r14d, %r13d
	movq	-80(%rbp), %rdi                 ## 8-byte Reload
	callq	_X86_PG_PKU
	orl	%r13d, %eax
	movq	%r12, %r13
	movl	-68(%rbp), %r12d                ## 4-byte Reload
	cmpl	%r14d, %eax
	je	LBB0_20
## %bb.19:                              ##   in Loop: Header=BB0_17 Depth=2
	movl	%eax, (%rbx)
	movl	$1, -60(%rbp)                   ## 4-byte Folded Spill
	jmp	LBB0_20
LBB0_23:
	cmpl	$0, -60(%rbp)                   ## 4-byte Folded Reload
	movl	-64(%rbp), %esi                 ## 4-byte Reload
	je	LBB0_24
## %bb.25:
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	movl	%ebx, %edx
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_pmap_invalidate_range          ## TAILCALL
LBB0_24:
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_MA_OWNED,4,2                   ## @MA_OWNED
	.comm	_PT_X86,8,3                     ## @PT_X86
	.comm	_PMAP_MAX_PKRU_IDX,8,3          ## @PMAP_MAX_PKRU_IDX
	.comm	_X86_PG_V,4,2                   ## @X86_PG_V
	.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	_X86_PG_PKU_MASK,4,2            ## @X86_PG_PKU_MASK
	.comm	_PAGE_SIZE,8,3                  ## @PAGE_SIZE
	.no_dead_strip	_pmap_pkru_update_range
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function pmap_pkru_update_range
_pmap_pkru_update_range:                ; @pmap_pkru_update_range
	.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	x22, x3
	mov	x19, x2
	mov	x23, x1
	mov	x21, x0
Lloh0:
	adrp	x8, _MA_OWNED@GOTPAGE
Lloh1:
	ldr	x8, [x8, _MA_OWNED@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	bl	_PMAP_LOCK_ASSERT
	ldr	x8, [x21]
Lloh3:
	adrp	x9, _PT_X86@GOTPAGE
Lloh4:
	ldr	x9, [x9, _PT_X86@GOTPAGEOFF]
Lloh5:
	ldr	x9, [x9]
	cmp	x8, x9
	cset	w0, eq
	bl	_MPASS
Lloh6:
	adrp	x8, _PMAP_MAX_PKRU_IDX@GOTPAGE
Lloh7:
	ldr	x8, [x8, _PMAP_MAX_PKRU_IDX@GOTPAGEOFF]
Lloh8:
	ldr	x8, [x8]
	cmp	x8, x22
	cset	w0, ge
	bl	_MPASS
	cmp	w23, w19
	b.ge	LBB0_23
; %bb.1:
	str	wzr, [sp, #12]                  ; 4-byte Folded Spill
Lloh9:
	adrp	x25, _X86_PG_V@GOTPAGE
Lloh10:
	ldr	x25, [x25, _X86_PG_V@GOTPAGEOFF]
Lloh11:
	adrp	x27, _PAGE_SIZE@GOTPAGE
Lloh12:
	ldr	x27, [x27, _PAGE_SIZE@GOTPAGEOFF]
	str	w23, [sp, #8]                   ; 4-byte Folded Spill
	b	LBB0_5
LBB0_2:                                 ;   in Loop: Header=BB0_5 Depth=1
Lloh13:
	adrp	x8, _NBPML4@GOTPAGE
Lloh14:
	ldr	x8, [x8, _NBPML4@GOTPAGEOFF]
Lloh15:
	ldr	w8, [x8]
Lloh16:
	adrp	x9, _PML4MASK@GOTPAGE
Lloh17:
	ldr	x9, [x9, _PML4MASK@GOTPAGEOFF]
LBB0_3:                                 ;   in Loop: Header=BB0_5 Depth=1
	ldr	w9, [x9]
	add	w8, w8, w23
	bic	w8, w8, w9
	cmp	w8, w23
	csel	w20, w19, w8, lt
LBB0_4:                                 ;   in Loop: Header=BB0_5 Depth=1
	mov	x23, x20
	cmp	w20, w19
	b.ge	LBB0_21
LBB0_5:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_18 Depth 2
	mov	x0, x21
	mov	x1, x23
	bl	_pmap_pml4e
	ldr	w8, [x0]
	ldr	w9, [x25]
	tst	w9, w8
	b.eq	LBB0_2
; %bb.6:                                ;   in Loop: Header=BB0_5 Depth=1
	mov	x1, x23
	bl	_pmap_pml4e_to_pdpe
	ldr	w8, [x0]
	ldr	w9, [x25]
	tst	w9, w8
	b.eq	LBB0_13
; %bb.7:                                ;   in Loop: Header=BB0_5 Depth=1
Lloh18:
	adrp	x8, _NBPDR@GOTPAGE
Lloh19:
	ldr	x8, [x8, _NBPDR@GOTPAGEOFF]
Lloh20:
	ldr	w8, [x8]
Lloh21:
	adrp	x9, _PDRMASK@GOTPAGE
Lloh22:
	ldr	x9, [x9, _PDRMASK@GOTPAGEOFF]
Lloh23:
	ldr	w9, [x9]
	add	w8, w8, w23
	bic	w8, w8, w9
	cmp	w8, w23
	csel	w20, w19, w8, lt
	mov	x1, x23
	bl	_pmap_pdpe_to_pde
	ldr	w26, [x0]
	cbz	w26, LBB0_4
; %bb.8:                                ;   in Loop: Header=BB0_5 Depth=1
	mov	x24, x0
	ldr	w8, [x25]
	tst	w8, w26
	cset	w0, ne
	bl	_MPASS
Lloh24:
	adrp	x8, _PG_PS@GOTPAGE
Lloh25:
	ldr	x8, [x8, _PG_PS@GOTPAGEOFF]
Lloh26:
	ldr	w8, [x8]
	tst	w8, w26
	b.eq	LBB0_11
; %bb.9:                                ;   in Loop: Header=BB0_5 Depth=1
Lloh27:
	adrp	x8, _NBPDR@GOTPAGE
Lloh28:
	ldr	x8, [x8, _NBPDR@GOTPAGEOFF]
Lloh29:
	ldr	w8, [x8]
	add	w8, w8, w23
	cmp	w20, w19
	ccmp	w8, w20, #0, le
	b.eq	LBB0_14
; %bb.10:                               ;   in Loop: Header=BB0_5 Depth=1
	mov	x0, x21
	mov	x1, x24
	mov	x2, x23
	bl	_pmap_demote_pde
	cbz	w0, LBB0_4
LBB0_11:                                ;   in Loop: Header=BB0_5 Depth=1
	cmp	w20, w19
	csel	w20, w20, w19, lt
	mov	x0, x24
	mov	x1, x23
	bl	_pmap_pde_to_pte
	cmp	w23, w20
	b.ne	LBB0_16
; %bb.12:                               ;   in Loop: Header=BB0_5 Depth=1
	mov	x20, x23
	b	LBB0_4
LBB0_13:                                ;   in Loop: Header=BB0_5 Depth=1
Lloh30:
	adrp	x8, _NBPDP@GOTPAGE
Lloh31:
	ldr	x8, [x8, _NBPDP@GOTPAGEOFF]
Lloh32:
	ldr	w8, [x8]
Lloh33:
	adrp	x9, _PDPMASK@GOTPAGE
Lloh34:
	ldr	x9, [x9, _PDPMASK@GOTPAGEOFF]
	b	LBB0_3
LBB0_14:                                ;   in Loop: Header=BB0_5 Depth=1
Lloh35:
	adrp	x8, _X86_PG_PKU_MASK@GOTPAGE
Lloh36:
	ldr	x8, [x8, _X86_PG_PKU_MASK@GOTPAGEOFF]
Lloh37:
	ldr	w8, [x8]
	bic	w23, w26, w8
	mov	x0, x22
	bl	_X86_PG_PKU
	orr	w8, w23, w0
	cmp	w8, w26
	b.eq	LBB0_4
; %bb.15:                               ;   in Loop: Header=BB0_5 Depth=1
	str	w8, [x24]
	mov	w8, #1
	str	w8, [sp, #12]                   ; 4-byte Folded Spill
	b	LBB0_4
LBB0_16:                                ;   in Loop: Header=BB0_5 Depth=1
	mov	x24, x0
	b	LBB0_18
LBB0_17:                                ;   in Loop: Header=BB0_18 Depth=2
	add	x24, x24, #4
	ldr	w8, [x27]
	add	w23, w23, w8
	cmp	w23, w20
	b.eq	LBB0_4
LBB0_18:                                ;   Parent Loop BB0_5 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldr	w26, [x24]
	ldr	w8, [x25]
	tst	w8, w26
	b.eq	LBB0_17
; %bb.19:                               ;   in Loop: Header=BB0_18 Depth=2
Lloh38:
	adrp	x8, _X86_PG_PKU_MASK@GOTPAGE
Lloh39:
	ldr	x8, [x8, _X86_PG_PKU_MASK@GOTPAGEOFF]
Lloh40:
	ldr	w8, [x8]
	bic	w28, w26, w8
	mov	x0, x22
	bl	_X86_PG_PKU
	orr	w8, w28, w0
	cmp	w8, w26
	b.eq	LBB0_17
; %bb.20:                               ;   in Loop: Header=BB0_18 Depth=2
	str	w8, [x24]
	mov	w8, #1
	str	w8, [sp, #12]                   ; 4-byte Folded Spill
	b	LBB0_17
LBB0_21:
	ldp	w1, w8, [sp, #8]                ; 8-byte Folded Reload
	cbz	w8, LBB0_23
; %bb.22:
	mov	x0, x21
	mov	x2, x19
	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
	b	_pmap_invalidate_range
LBB0_23:
	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	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.loh AdrpLdrGot	Lloh33, Lloh34
	.loh AdrpLdrGotLdr	Lloh30, Lloh31, Lloh32
	.loh AdrpLdrGotLdr	Lloh35, Lloh36, Lloh37
	.loh AdrpLdrGotLdr	Lloh38, Lloh39, Lloh40
	.cfi_endproc
                                        ; -- End function
	.comm	_MA_OWNED,4,2                   ; @MA_OWNED
	.comm	_PT_X86,8,3                     ; @PT_X86
	.comm	_PMAP_MAX_PKRU_IDX,8,3          ; @PMAP_MAX_PKRU_IDX
	.comm	_X86_PG_V,4,2                   ; @X86_PG_V
	.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	_X86_PG_PKU_MASK,4,2            ; @X86_PG_PKU_MASK
	.comm	_PAGE_SIZE,8,3                  ; @PAGE_SIZE
	.no_dead_strip	_pmap_pkru_update_range
.subsections_via_symbols
