	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function vmx_set_cr4
_vmx_set_cr4:                           ## @vmx_set_cr4
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	subq	$16, %rsp
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rsi, %r14
	movq	%rdi, %rbx
	callq	_to_vmx
	cmpq	$0, (%rax)
	jne	LBB0_1
## %bb.2:
	movq	_KVM_PMODE_VM_CR4_ALWAYS_ON@GOTPCREL(%rip), %rax
	jmp	LBB0_3
LBB0_1:
	movq	_KVM_RMODE_VM_CR4_ALWAYS_ON@GOTPCREL(%rip), %rax
LBB0_3:
	movq	(%rax), %rax
	orq	%r14, %rax
	movq	%rax, -24(%rbp)
	movq	%r14, (%rbx)
	movq	_enable_ept@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	je	LBB0_5
## %bb.4:
	leaq	-24(%rbp), %rdi
	movq	%rbx, %rsi
	callq	_ept_update_paging_mode_cr4
LBB0_5:
	movq	_CR4_READ_SHADOW@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	%r14, %rsi
	callq	_vmcs_writel
	movq	_GUEST_CR4@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	-24(%rbp), %rsi
	callq	_vmcs_writel
	addq	$16, %rsp
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_KVM_RMODE_VM_CR4_ALWAYS_ON,8,3 ## @KVM_RMODE_VM_CR4_ALWAYS_ON
	.comm	_KVM_PMODE_VM_CR4_ALWAYS_ON,8,3 ## @KVM_PMODE_VM_CR4_ALWAYS_ON
	.comm	_enable_ept,8,3                 ## @enable_ept
	.comm	_CR4_READ_SHADOW,4,2            ## @CR4_READ_SHADOW
	.comm	_GUEST_CR4,4,2                  ## @GUEST_CR4
	.no_dead_strip	_vmx_set_cr4
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function vmx_set_cr4
_vmx_set_cr4:                           ; @vmx_set_cr4
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #48
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x1
	mov	x20, x0
	bl	_to_vmx
Lloh0:
	adrp	x8, _KVM_RMODE_VM_CR4_ALWAYS_ON@GOTPAGE
Lloh1:
	ldr	x8, [x8, _KVM_RMODE_VM_CR4_ALWAYS_ON@GOTPAGEOFF]
	ldr	x9, [x0]
Lloh2:
	adrp	x10, _KVM_PMODE_VM_CR4_ALWAYS_ON@GOTPAGE
Lloh3:
	ldr	x10, [x10, _KVM_PMODE_VM_CR4_ALWAYS_ON@GOTPAGEOFF]
	cmp	x9, #0
	csel	x8, x10, x8, eq
	ldr	x8, [x8]
	orr	x8, x8, x19
	str	x8, [sp, #8]
	str	x19, [x20]
Lloh4:
	adrp	x8, _enable_ept@GOTPAGE
Lloh5:
	ldr	x8, [x8, _enable_ept@GOTPAGEOFF]
Lloh6:
	ldr	x8, [x8]
	cbz	x8, LBB0_2
; %bb.1:
	add	x0, sp, #8
	mov	x1, x20
	bl	_ept_update_paging_mode_cr4
LBB0_2:
Lloh7:
	adrp	x8, _CR4_READ_SHADOW@GOTPAGE
Lloh8:
	ldr	x8, [x8, _CR4_READ_SHADOW@GOTPAGEOFF]
Lloh9:
	ldr	w0, [x8]
	mov	x1, x19
	bl	_vmcs_writel
Lloh10:
	adrp	x8, _GUEST_CR4@GOTPAGE
Lloh11:
	ldr	x8, [x8, _GUEST_CR4@GOTPAGEOFF]
Lloh12:
	ldr	w0, [x8]
	ldr	x1, [sp, #8]
	bl	_vmcs_writel
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	ret
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.comm	_KVM_RMODE_VM_CR4_ALWAYS_ON,8,3 ; @KVM_RMODE_VM_CR4_ALWAYS_ON
	.comm	_KVM_PMODE_VM_CR4_ALWAYS_ON,8,3 ; @KVM_PMODE_VM_CR4_ALWAYS_ON
	.comm	_enable_ept,8,3                 ; @enable_ept
	.comm	_CR4_READ_SHADOW,4,2            ; @CR4_READ_SHADOW
	.comm	_GUEST_CR4,4,2                  ; @GUEST_CR4
	.no_dead_strip	_vmx_set_cr4
.subsections_via_symbols
