	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function check_svm_features
_check_svm_features:                    ## @check_svm_features
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%rbx
	subq	$24, %rsp
	.cfi_offset %rbx, -24
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -16(%rbp)
	leaq	-32(%rbp), %rsi
	movl	$-2147483638, %edi              ## imm = 0x8000000A
	callq	_do_cpuid
	movl	-20(%rbp), %eax
	movq	_svm_feature@GOTPCREL(%rip), %rbx
	andl	%eax, (%rbx)
	movl	-28(%rbp), %ecx
	movq	_nasid@GOTPCREL(%rip), %rdx
	movl	(%rdx), %eax
	testl	%eax, %eax
	je	LBB0_2
## %bb.1:
	cmpl	%ecx, %eax
	jle	LBB0_3
LBB0_2:
	movl	%ecx, (%rdx)
	movl	%ecx, %eax
LBB0_3:
	xorl	%edi, %edi
	cmpl	$2, %eax
	setge	%dil
	movslq	%eax, %rsi
	callq	_KASSERT
	movl	(%rbx), %ecx
	movq	_AMD_CPUID_SVM_NP@GOTPCREL(%rip), %rax
	testl	%ecx, (%rax)
	je	LBB0_4
## %bb.5:
	movq	_AMD_CPUID_SVM_NRIP_SAVE@GOTPCREL(%rip), %rdx
	xorl	%eax, %eax
	testl	%ecx, (%rdx)
	jne	LBB0_8
## %bb.6:
	leaq	L_str.3(%rip), %rdi
	jmp	LBB0_7
LBB0_4:
	leaq	L_str(%rip), %rdi
LBB0_7:
	callq	_puts
	movq	_ENXIO@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
LBB0_8:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	cmpq	-16(%rbp), %rcx
	jne	LBB0_10
## %bb.9:
	addq	$24, %rsp
	popq	%rbx
	popq	%rbp
	retq
LBB0_10:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_svm_feature,4,2                ## @svm_feature
	.comm	_nasid,4,2                      ## @nasid
	.comm	_AMD_CPUID_SVM_NP,4,2           ## @AMD_CPUID_SVM_NP
	.comm	_ENXIO,4,2                      ## @ENXIO
	.comm	_AMD_CPUID_SVM_NRIP_SAVE,4,2    ## @AMD_CPUID_SVM_NRIP_SAVE
	.section	__TEXT,__cstring,cstring_literals
L_str:                                  ## @str
	.asciz	"SVM: Nested Paging feature not available."

L_str.3:                                ## @str.3
	.asciz	"SVM: NRIP Save feature not available."

	.no_dead_strip	_check_svm_features
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function check_svm_features
_check_svm_features:                    ; @check_svm_features
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.cfi_def_cfa_offset 64
	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
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	str	x8, [sp, #24]
	add	x1, sp, #8
	mov	w0, #10
	movk	w0, #32768, lsl #16
	bl	_do_cpuid
Lloh3:
	adrp	x19, _svm_feature@GOTPAGE
Lloh4:
	ldr	x19, [x19, _svm_feature@GOTPAGEOFF]
	ldr	w8, [x19]
	ldr	w10, [sp, #20]
	ldr	w9, [sp, #12]
	and	w8, w8, w10
	str	w8, [x19]
Lloh5:
	adrp	x10, _nasid@GOTPAGE
Lloh6:
	ldr	x10, [x10, _nasid@GOTPAGEOFF]
	ldr	w8, [x10]
	cmp	w8, #0
	ccmp	w8, w9, #0, ne
	b.le	LBB0_2
; %bb.1:
	str	w9, [x10]
	mov	x8, x9
LBB0_2:
	cmp	w8, #1
	cset	w0, gt
	sxtw	x1, w8
	bl	_KASSERT
	ldr	w8, [x19]
Lloh7:
	adrp	x9, _AMD_CPUID_SVM_NP@GOTPAGE
Lloh8:
	ldr	x9, [x9, _AMD_CPUID_SVM_NP@GOTPAGEOFF]
Lloh9:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_5
; %bb.3:
Lloh10:
	adrp	x9, _AMD_CPUID_SVM_NRIP_SAVE@GOTPAGE
Lloh11:
	ldr	x9, [x9, _AMD_CPUID_SVM_NRIP_SAVE@GOTPAGEOFF]
Lloh12:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_6
; %bb.4:
	mov	w0, #0
	b	LBB0_8
LBB0_5:
Lloh13:
	adrp	x0, l_str@PAGE
Lloh14:
	add	x0, x0, l_str@PAGEOFF
	b	LBB0_7
LBB0_6:
Lloh15:
	adrp	x0, l_str.3@PAGE
Lloh16:
	add	x0, x0, l_str.3@PAGEOFF
LBB0_7:
	bl	_puts
Lloh17:
	adrp	x8, _ENXIO@GOTPAGE
Lloh18:
	ldr	x8, [x8, _ENXIO@GOTPAGEOFF]
Lloh19:
	ldr	w0, [x8]
LBB0_8:
	ldr	x8, [sp, #24]
Lloh20:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh21:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh22:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_10
; %bb.9:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #64
	ret
LBB0_10:
	bl	___stack_chk_fail
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.cfi_endproc
                                        ; -- End function
	.comm	_svm_feature,4,2                ; @svm_feature
	.comm	_nasid,4,2                      ; @nasid
	.comm	_AMD_CPUID_SVM_NP,4,2           ; @AMD_CPUID_SVM_NP
	.comm	_ENXIO,4,2                      ; @ENXIO
	.comm	_AMD_CPUID_SVM_NRIP_SAVE,4,2    ; @AMD_CPUID_SVM_NRIP_SAVE
	.section	__TEXT,__cstring,cstring_literals
l_str:                                  ; @str
	.asciz	"SVM: Nested Paging feature not available."

l_str.3:                                ; @str.3
	.asciz	"SVM: NRIP Save feature not available."

	.no_dead_strip	_check_svm_features
.subsections_via_symbols
