	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function vmx_set_cr0
_vmx_set_cr0:                           ## @vmx_set_cr0
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r15
	movq	%rdi, %r14
	callq	_to_vmx
	movq	_enable_unrestricted_guest@GOTPCREL(%rip), %rcx
	cmpq	$0, (%rcx)
	movq	_KVM_GUEST_CR0_MASK_UNRESTRICTED_GUEST@GOTPCREL(%rip), %rcx
	cmoveq	_KVM_GUEST_CR0_MASK@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movq	_KVM_VM_CR0_ALWAYS_ON_UNRESTRICTED_GUEST@GOTPCREL(%rip), %rdx
	cmoveq	_KVM_VM_CR0_ALWAYS_ON@GOTPCREL(%rip), %rdx
	notq	%rcx
	andq	%r15, %rcx
	orq	(%rdx), %rcx
	movq	%rcx, -32(%rbp)
	cmpq	$0, (%rax)
	je	LBB0_3
## %bb.1:
	movq	%rax, %rbx
	movq	_X86_CR0_PE@GOTPCREL(%rip), %rax
	testq	%r15, (%rax)
	je	LBB0_5
## %bb.2:
	movq	%r14, %rdi
	callq	_enter_pmode
	cmpq	$0, (%rbx)
	jne	LBB0_5
LBB0_3:
	movq	_X86_CR0_PE@GOTPCREL(%rip), %rax
	testq	%r15, (%rax)
	jne	LBB0_5
## %bb.4:
	movq	%r14, %rdi
	callq	_enter_rmode
LBB0_5:
	movq	_enable_ept@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	je	LBB0_7
## %bb.6:
	leaq	-32(%rbp), %rdi
	movq	%r15, %rsi
	movq	%r14, %rdx
	callq	_ept_update_paging_mode_cr0
LBB0_7:
	cmpl	$0, 16(%r14)
	jne	LBB0_9
## %bb.8:
	movq	_X86_CR0_TS@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	orq	%rax, -32(%rbp)
LBB0_9:
	movq	_CR0_READ_SHADOW@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	%r15, %rsi
	callq	_vmcs_writel
	movq	_GUEST_CR0@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	-32(%rbp), %rsi
	callq	_vmcs_writel
	movq	%r15, 8(%r14)
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_enable_unrestricted_guest,8,3  ## @enable_unrestricted_guest
	.comm	_KVM_GUEST_CR0_MASK_UNRESTRICTED_GUEST,8,3 ## @KVM_GUEST_CR0_MASK_UNRESTRICTED_GUEST
	.comm	_KVM_VM_CR0_ALWAYS_ON_UNRESTRICTED_GUEST,8,3 ## @KVM_VM_CR0_ALWAYS_ON_UNRESTRICTED_GUEST
	.comm	_KVM_GUEST_CR0_MASK,8,3         ## @KVM_GUEST_CR0_MASK
	.comm	_KVM_VM_CR0_ALWAYS_ON,8,3       ## @KVM_VM_CR0_ALWAYS_ON
	.comm	_X86_CR0_PE,8,3                 ## @X86_CR0_PE
	.comm	_enable_ept,8,3                 ## @enable_ept
	.comm	_X86_CR0_TS,8,3                 ## @X86_CR0_TS
	.comm	_CR0_READ_SHADOW,4,2            ## @CR0_READ_SHADOW
	.comm	_GUEST_CR0,4,2                  ## @GUEST_CR0
	.comm	_EFER_LME,4,2                   ## @EFER_LME
	.comm	_X86_CR0_PG,8,3                 ## @X86_CR0_PG
	.no_dead_strip	_vmx_set_cr0
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function vmx_set_cr0
_vmx_set_cr0:                           ; @vmx_set_cr0
	.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	x19, x1
	mov	x20, x0
	bl	_to_vmx
Lloh0:
	adrp	x8, _enable_unrestricted_guest@GOTPAGE
Lloh1:
	ldr	x8, [x8, _enable_unrestricted_guest@GOTPAGEOFF]
Lloh2:
	adrp	x9, _KVM_GUEST_CR0_MASK@GOTPAGE
Lloh3:
	ldr	x9, [x9, _KVM_GUEST_CR0_MASK@GOTPAGEOFF]
Lloh4:
	ldr	x8, [x8]
Lloh5:
	adrp	x10, _KVM_GUEST_CR0_MASK_UNRESTRICTED_GUEST@GOTPAGE
Lloh6:
	ldr	x10, [x10, _KVM_GUEST_CR0_MASK_UNRESTRICTED_GUEST@GOTPAGEOFF]
	cmp	x8, #0
	csel	x8, x9, x10, eq
	ldr	x8, [x8]
	bic	x8, x19, x8
Lloh7:
	adrp	x9, _KVM_VM_CR0_ALWAYS_ON@GOTPAGE
Lloh8:
	ldr	x9, [x9, _KVM_VM_CR0_ALWAYS_ON@GOTPAGEOFF]
Lloh9:
	adrp	x10, _KVM_VM_CR0_ALWAYS_ON_UNRESTRICTED_GUEST@GOTPAGE
Lloh10:
	ldr	x10, [x10, _KVM_VM_CR0_ALWAYS_ON_UNRESTRICTED_GUEST@GOTPAGEOFF]
	csel	x9, x9, x10, eq
	ldr	x9, [x9]
	orr	x8, x8, x9
	str	x8, [sp, #8]
	ldr	x8, [x0]
Lloh11:
	adrp	x22, _X86_CR0_PE@GOTPAGE
Lloh12:
	ldr	x22, [x22, _X86_CR0_PE@GOTPAGEOFF]
	cbz	x8, LBB0_3
; %bb.1:
	ldr	x8, [x22]
	tst	x8, x19
	b.eq	LBB0_5
; %bb.2:
	mov	x21, x0
	mov	x0, x20
	bl	_enter_pmode
	ldr	x8, [x21]
	cbnz	x8, LBB0_5
LBB0_3:
	ldr	x8, [x22]
	tst	x8, x19
	b.ne	LBB0_5
; %bb.4:
	mov	x0, x20
	bl	_enter_rmode
LBB0_5:
Lloh13:
	adrp	x8, _enable_ept@GOTPAGE
Lloh14:
	ldr	x8, [x8, _enable_ept@GOTPAGEOFF]
Lloh15:
	ldr	x8, [x8]
	cbz	x8, LBB0_7
; %bb.6:
	add	x0, sp, #8
	mov	x1, x19
	mov	x2, x20
	bl	_ept_update_paging_mode_cr0
LBB0_7:
	ldr	w8, [x20, #16]
	cbnz	w8, LBB0_9
; %bb.8:
Lloh16:
	adrp	x8, _X86_CR0_TS@GOTPAGE
Lloh17:
	ldr	x8, [x8, _X86_CR0_TS@GOTPAGEOFF]
Lloh18:
	ldr	x8, [x8]
	ldr	x9, [sp, #8]
	orr	x8, x9, x8
	str	x8, [sp, #8]
LBB0_9:
Lloh19:
	adrp	x8, _CR0_READ_SHADOW@GOTPAGE
Lloh20:
	ldr	x8, [x8, _CR0_READ_SHADOW@GOTPAGEOFF]
Lloh21:
	ldr	w0, [x8]
	mov	x1, x19
	bl	_vmcs_writel
Lloh22:
	adrp	x8, _GUEST_CR0@GOTPAGE
Lloh23:
	ldr	x8, [x8, _GUEST_CR0@GOTPAGEOFF]
Lloh24:
	ldr	w0, [x8]
	ldr	x1, [sp, #8]
	bl	_vmcs_writel
	str	x19, [x20, #8]
	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
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh4
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.cfi_endproc
                                        ; -- End function
	.comm	_enable_unrestricted_guest,8,3  ; @enable_unrestricted_guest
	.comm	_KVM_GUEST_CR0_MASK_UNRESTRICTED_GUEST,8,3 ; @KVM_GUEST_CR0_MASK_UNRESTRICTED_GUEST
	.comm	_KVM_VM_CR0_ALWAYS_ON_UNRESTRICTED_GUEST,8,3 ; @KVM_VM_CR0_ALWAYS_ON_UNRESTRICTED_GUEST
	.comm	_KVM_GUEST_CR0_MASK,8,3         ; @KVM_GUEST_CR0_MASK
	.comm	_KVM_VM_CR0_ALWAYS_ON,8,3       ; @KVM_VM_CR0_ALWAYS_ON
	.comm	_X86_CR0_PE,8,3                 ; @X86_CR0_PE
	.comm	_enable_ept,8,3                 ; @enable_ept
	.comm	_X86_CR0_TS,8,3                 ; @X86_CR0_TS
	.comm	_CR0_READ_SHADOW,4,2            ; @CR0_READ_SHADOW
	.comm	_GUEST_CR0,4,2                  ; @GUEST_CR0
	.comm	_EFER_LME,4,2                   ; @EFER_LME
	.comm	_X86_CR0_PG,8,3                 ; @X86_CR0_PG
	.no_dead_strip	_vmx_set_cr0
.subsections_via_symbols
