	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function pmap_pkru_assign
_pmap_pkru_assign:                      ## @pmap_pkru_assign
	.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	%r8d, %r12d
	movl	%ecx, %r13d
	movl	%edx, %r14d
	movl	%esi, %r15d
	movq	%rdi, %rbx
	movq	_MA_OWNED@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_PMAP_LOCK_ASSERT
	movq	(%rbx), %rax
	movq	_PT_X86@GOTPCREL(%rip), %rcx
	xorl	%edi, %edi
	cmpq	(%rcx), %rax
	sete	%dil
	callq	_MPASS
	movq	_cpu_stdext_feature2@GOTPCREL(%rip), %rax
	movq	_CPUID_STDEXT2_PKU@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	xorl	%edi, %edi
	andl	(%rax), %ecx
	setne	%dil
	callq	_MPASS
	movq	_AMD64_PKRU_EXCL@GOTPCREL(%rip), %rax
	testl	%r12d, (%rax)
	je	LBB0_3
## %bb.1:
	leaq	8(%rbx), %rdi
	movl	%r15d, %esi
	movl	%r14d, %edx
	callq	_rangeset_check_empty
	testl	%eax, %eax
	je	LBB0_2
LBB0_3:
	movl	%r14d, -44(%rbp)                ## 4-byte Spill
	movl	%r13d, %r14d
	movq	_pmap_pkru_ranges_zone@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_M_NOWAIT@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_uma_zalloc
	testq	%rax, %rax
	je	LBB0_4
## %bb.5:
	movq	%rax, %r13
	movl	%r14d, 4(%rax)
	movq	_AMD64_PKRU_PERSIST@GOTPCREL(%rip), %rax
	andl	(%rax), %r12d
	movl	%r12d, (%r13)
	addq	$8, %rbx
	movq	%rbx, %rdi
	movl	%r15d, %esi
	movl	-44(%rbp), %edx                 ## 4-byte Reload
	movq	%r13, %rcx
	callq	_rangeset_insert
	testl	%eax, %eax
	je	LBB0_6
## %bb.7:
	movl	%eax, %ebx
	movq	_pmap_pkru_ranges_zone@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	%r13, %rsi
	callq	_uma_zfree
	jmp	LBB0_8
LBB0_4:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	jmp	LBB0_8
LBB0_2:
	movq	_EBUSY@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	jmp	LBB0_8
LBB0_6:
	xorl	%ebx, %ebx
LBB0_8:
	movl	%ebx, %eax
	addq	$8, %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	_cpu_stdext_feature2,4,2        ## @cpu_stdext_feature2
	.comm	_CPUID_STDEXT2_PKU,4,2          ## @CPUID_STDEXT2_PKU
	.comm	_AMD64_PKRU_EXCL,4,2            ## @AMD64_PKRU_EXCL
	.comm	_EBUSY,4,2                      ## @EBUSY
	.comm	_pmap_pkru_ranges_zone,4,2      ## @pmap_pkru_ranges_zone
	.comm	_M_NOWAIT,4,2                   ## @M_NOWAIT
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_AMD64_PKRU_PERSIST,4,2         ## @AMD64_PKRU_PERSIST
	.no_dead_strip	_pmap_pkru_assign
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function pmap_pkru_assign
_pmap_pkru_assign:                      ; @pmap_pkru_assign
	.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	x22, x4
	mov	x23, x3
	mov	x19, x2
	mov	x20, 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, _cpu_stdext_feature2@GOTPAGE
Lloh7:
	ldr	x8, [x8, _cpu_stdext_feature2@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
Lloh9:
	adrp	x9, _CPUID_STDEXT2_PKU@GOTPAGE
Lloh10:
	ldr	x9, [x9, _CPUID_STDEXT2_PKU@GOTPAGEOFF]
Lloh11:
	ldr	w9, [x9]
	tst	w9, w8
	cset	w0, ne
	bl	_MPASS
Lloh12:
	adrp	x8, _AMD64_PKRU_EXCL@GOTPAGE
Lloh13:
	ldr	x8, [x8, _AMD64_PKRU_EXCL@GOTPAGEOFF]
Lloh14:
	ldr	w8, [x8]
	tst	w8, w22
	b.eq	LBB0_2
; %bb.1:
	add	x0, x21, #8
	mov	x1, x20
	mov	x2, x19
	bl	_rangeset_check_empty
	cbz	w0, LBB0_6
LBB0_2:
Lloh15:
	adrp	x25, _pmap_pkru_ranges_zone@GOTPAGE
Lloh16:
	ldr	x25, [x25, _pmap_pkru_ranges_zone@GOTPAGEOFF]
	ldr	w0, [x25]
Lloh17:
	adrp	x8, _M_NOWAIT@GOTPAGE
Lloh18:
	ldr	x8, [x8, _M_NOWAIT@GOTPAGEOFF]
Lloh19:
	ldr	w1, [x8]
	bl	_uma_zalloc
	cbz	x0, LBB0_5
; %bb.3:
	mov	x24, x0
Lloh20:
	adrp	x8, _AMD64_PKRU_PERSIST@GOTPAGE
Lloh21:
	ldr	x8, [x8, _AMD64_PKRU_PERSIST@GOTPAGEOFF]
Lloh22:
	ldr	w8, [x8]
	and	w8, w8, w22
	stp	w8, w23, [x0]
	add	x0, x21, #8
	mov	x1, x20
	mov	x2, x19
	mov	x3, x24
	bl	_rangeset_insert
	mov	x19, x0
	cbz	w0, LBB0_8
; %bb.4:
	ldr	w0, [x25]
	mov	x1, x24
	bl	_uma_zfree
	b	LBB0_8
LBB0_5:
Lloh23:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh24:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
	b	LBB0_7
LBB0_6:
Lloh25:
	adrp	x8, _EBUSY@GOTPAGE
Lloh26:
	ldr	x8, [x8, _EBUSY@GOTPAGEOFF]
LBB0_7:
	ldr	w19, [x8]
LBB0_8:
	mov	x0, x19
	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 AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGot	Lloh23, Lloh24
	.loh AdrpLdrGot	Lloh25, Lloh26
	.cfi_endproc
                                        ; -- End function
	.comm	_MA_OWNED,4,2                   ; @MA_OWNED
	.comm	_PT_X86,8,3                     ; @PT_X86
	.comm	_cpu_stdext_feature2,4,2        ; @cpu_stdext_feature2
	.comm	_CPUID_STDEXT2_PKU,4,2          ; @CPUID_STDEXT2_PKU
	.comm	_AMD64_PKRU_EXCL,4,2            ; @AMD64_PKRU_EXCL
	.comm	_EBUSY,4,2                      ; @EBUSY
	.comm	_pmap_pkru_ranges_zone,4,2      ; @pmap_pkru_ranges_zone
	.comm	_M_NOWAIT,4,2                   ; @M_NOWAIT
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_AMD64_PKRU_PERSIST,4,2         ; @AMD64_PKRU_PERSIST
	.no_dead_strip	_pmap_pkru_assign
.subsections_via_symbols
