	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ept_init                       ## -- Begin function ept_init
	.p2align	4, 0x90
_ept_init:                              ## @ept_init
	.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	%r12
	pushq	%rbx
	subq	$16, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edi, %r14d
	movq	_MSR_VMX_EPT_VPID_CAP@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_rdmsr
	movl	%eax, %r15d
	movl	%eax, %edi
	callq	_EPT_PWL4
	testl	%eax, %eax
	je	LBB0_6
## %bb.1:
	movl	%r15d, %edi
	callq	_EPT_MEMORY_TYPE_WB
	testl	%eax, %eax
	je	LBB0_6
## %bb.2:
	movl	%r15d, %edi
	callq	_INVVPID_SUPPORTED
	testl	%eax, %eax
	je	LBB0_6
## %bb.3:
	movl	%r15d, %edi
	callq	_INVVPID_ALL_TYPES_SUPPORTED
	testl	%eax, %eax
	je	LBB0_6
## %bb.4:
	movl	%r15d, %edi
	callq	_INVEPT_SUPPORTED
	testl	%eax, %eax
	je	LBB0_6
## %bb.5:
	movl	%r15d, %edi
	callq	_INVEPT_ALL_TYPES_SUPPORTED
	testl	%eax, %eax
	je	LBB0_6
## %bb.7:
	movq	_PMAP_NESTED_IPIMASK@GOTPCREL(%rip), %rax
	andl	(%rax), %r14d
	movq	_ept_pmap_flags@GOTPCREL(%rip), %r12
	movl	%r14d, (%r12)
	movl	$1, -40(%rbp)
	leaq	L_.str(%rip), %rdi
	leaq	-40(%rbp), %rsi
	callq	_TUNABLE_INT_FETCH
	cmpl	$0, -40(%rbp)
	je	LBB0_10
## %bb.8:
	movl	%r15d, %edi
	callq	_EPT_PDE_SUPERPAGE
	testq	%rax, %rax
	je	LBB0_10
## %bb.9:
	movq	_PMAP_PDE_SUPERPAGE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	orl	%eax, (%r12)
LBB0_10:
	movl	$1, -44(%rbp)
	leaq	L_.str.1(%rip), %rdi
	leaq	-44(%rbp), %rsi
	callq	_TUNABLE_INT_FETCH
	cmpl	$0, -44(%rbp)
	je	LBB0_13
## %bb.11:
	movl	%r15d, %edi
	callq	_AD_BITS_SUPPORTED
	testq	%rax, %rax
	je	LBB0_13
## %bb.12:
	movq	_ept_enable_ad_bits@GOTPCREL(%rip), %rax
	movl	$1, (%rax)
	jmp	LBB0_14
LBB0_6:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
LBB0_17:
	movl	%ebx, %eax
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_13:
	movq	_PMAP_EMULATE_AD_BITS@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	orl	%eax, (%r12)
LBB0_14:
	movl	$1, -36(%rbp)
	leaq	L_.str.2(%rip), %rdi
	leaq	-36(%rbp), %rsi
	callq	_TUNABLE_INT_FETCH
	xorl	%ebx, %ebx
	cmpl	$0, -36(%rbp)
	je	LBB0_17
## %bb.15:
	movl	%r15d, %edi
	callq	_EPT_SUPPORTS_EXEC_ONLY
	testq	%rax, %rax
	je	LBB0_17
## %bb.16:
	movq	_PMAP_SUPPORTS_EXEC_ONLY@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	orl	%eax, (%r12)
	jmp	LBB0_17
	.cfi_endproc
                                        ## -- End function
	.comm	_MSR_VMX_EPT_VPID_CAP,4,2       ## @MSR_VMX_EPT_VPID_CAP
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_PMAP_NESTED_IPIMASK,4,2        ## @PMAP_NESTED_IPIMASK
	.comm	_ept_pmap_flags,4,2             ## @ept_pmap_flags
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"hw.vmm.ept.use_superpages"

	.comm	_PMAP_PDE_SUPERPAGE,4,2         ## @PMAP_PDE_SUPERPAGE
L_.str.1:                               ## @.str.1
	.asciz	"hw.vmm.ept.use_hw_ad_bits"

	.comm	_ept_enable_ad_bits,4,2         ## @ept_enable_ad_bits
	.comm	_PMAP_EMULATE_AD_BITS,4,2       ## @PMAP_EMULATE_AD_BITS
L_.str.2:                               ## @.str.2
	.asciz	"hw.vmm.ept.use_exec_only"

	.comm	_PMAP_SUPPORTS_EXEC_ONLY,4,2    ## @PMAP_SUPPORTS_EXEC_ONLY
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ept_init                       ; -- Begin function ept_init
	.p2align	2
_ept_init:                              ; @ept_init
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	mov	x20, x0
Lloh0:
	adrp	x8, _MSR_VMX_EPT_VPID_CAP@GOTPAGE
Lloh1:
	ldr	x8, [x8, _MSR_VMX_EPT_VPID_CAP@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
	bl	_rdmsr
	mov	x19, x0
	bl	_EPT_PWL4
	cbz	w0, LBB0_12
; %bb.1:
	mov	x0, x19
	bl	_EPT_MEMORY_TYPE_WB
	cbz	w0, LBB0_12
; %bb.2:
	mov	x0, x19
	bl	_INVVPID_SUPPORTED
	cbz	w0, LBB0_12
; %bb.3:
	mov	x0, x19
	bl	_INVVPID_ALL_TYPES_SUPPORTED
	cbz	w0, LBB0_12
; %bb.4:
	mov	x0, x19
	bl	_INVEPT_SUPPORTED
	cbz	w0, LBB0_12
; %bb.5:
	mov	x0, x19
	bl	_INVEPT_ALL_TYPES_SUPPORTED
	cbz	w0, LBB0_12
; %bb.6:
Lloh3:
	adrp	x8, _PMAP_NESTED_IPIMASK@GOTPAGE
Lloh4:
	ldr	x8, [x8, _PMAP_NESTED_IPIMASK@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	and	w8, w8, w20
Lloh6:
	adrp	x20, _ept_pmap_flags@GOTPAGE
Lloh7:
	ldr	x20, [x20, _ept_pmap_flags@GOTPAGEOFF]
	str	w8, [x20]
	mov	w21, #1
	str	w21, [sp, #8]
Lloh8:
	adrp	x0, l_.str@PAGE
Lloh9:
	add	x0, x0, l_.str@PAGEOFF
	add	x1, sp, #8
	bl	_TUNABLE_INT_FETCH
	ldr	w8, [sp, #8]
	cbz	w8, LBB0_9
; %bb.7:
	mov	x0, x19
	bl	_EPT_PDE_SUPERPAGE
	cbz	x0, LBB0_9
; %bb.8:
Lloh10:
	adrp	x8, _PMAP_PDE_SUPERPAGE@GOTPAGE
Lloh11:
	ldr	x8, [x8, _PMAP_PDE_SUPERPAGE@GOTPAGEOFF]
Lloh12:
	ldr	w8, [x8]
	ldr	w9, [x20]
	orr	w8, w9, w8
	str	w8, [x20]
LBB0_9:
	str	w21, [sp, #12]
Lloh13:
	adrp	x0, l_.str.1@PAGE
Lloh14:
	add	x0, x0, l_.str.1@PAGEOFF
	add	x1, sp, #12
	bl	_TUNABLE_INT_FETCH
	ldr	w8, [sp, #12]
	cbz	w8, LBB0_14
; %bb.10:
	mov	x0, x19
	bl	_AD_BITS_SUPPORTED
	cbz	x0, LBB0_14
; %bb.11:
Lloh15:
	adrp	x8, _ept_enable_ad_bits@GOTPAGE
Lloh16:
	ldr	x8, [x8, _ept_enable_ad_bits@GOTPAGEOFF]
	mov	w9, #1
Lloh17:
	str	w9, [x8]
	b	LBB0_15
LBB0_12:
Lloh18:
	adrp	x8, _EINVAL@GOTPAGE
Lloh19:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh20:
	ldr	w0, [x8]
LBB0_13:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #64
	ret
LBB0_14:
Lloh21:
	adrp	x8, _PMAP_EMULATE_AD_BITS@GOTPAGE
Lloh22:
	ldr	x8, [x8, _PMAP_EMULATE_AD_BITS@GOTPAGEOFF]
Lloh23:
	ldr	w8, [x8]
	ldr	w9, [x20]
	orr	w8, w9, w8
	str	w8, [x20]
LBB0_15:
	mov	w8, #1
	str	w8, [sp, #4]
Lloh24:
	adrp	x0, l_.str.2@PAGE
Lloh25:
	add	x0, x0, l_.str.2@PAGEOFF
	add	x1, sp, #4
	bl	_TUNABLE_INT_FETCH
	ldr	w8, [sp, #4]
	cbz	w8, LBB0_18
; %bb.16:
	mov	x0, x19
	bl	_EPT_SUPPORTS_EXEC_ONLY
	cbz	x0, LBB0_13
; %bb.17:
	mov	w0, #0
Lloh26:
	adrp	x8, _PMAP_SUPPORTS_EXEC_ONLY@GOTPAGE
Lloh27:
	ldr	x8, [x8, _PMAP_SUPPORTS_EXEC_ONLY@GOTPAGEOFF]
Lloh28:
	ldr	w8, [x8]
	ldr	w9, [x20]
	orr	w8, w9, w8
	str	w8, [x20]
	b	LBB0_13
LBB0_18:
	mov	w0, #0
	b	LBB0_13
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpLdrGotStr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpAdd	Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.cfi_endproc
                                        ; -- End function
	.comm	_MSR_VMX_EPT_VPID_CAP,4,2       ; @MSR_VMX_EPT_VPID_CAP
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_PMAP_NESTED_IPIMASK,4,2        ; @PMAP_NESTED_IPIMASK
	.comm	_ept_pmap_flags,4,2             ; @ept_pmap_flags
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"hw.vmm.ept.use_superpages"

	.comm	_PMAP_PDE_SUPERPAGE,4,2         ; @PMAP_PDE_SUPERPAGE
l_.str.1:                               ; @.str.1
	.asciz	"hw.vmm.ept.use_hw_ad_bits"

	.comm	_ept_enable_ad_bits,4,2         ; @ept_enable_ad_bits
	.comm	_PMAP_EMULATE_AD_BITS,4,2       ; @PMAP_EMULATE_AD_BITS
l_.str.2:                               ; @.str.2
	.asciz	"hw.vmm.ept.use_exec_only"

	.comm	_PMAP_SUPPORTS_EXEC_ONLY,4,2    ; @PMAP_SUPPORTS_EXEC_ONLY
.subsections_via_symbols
