	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ept_update_paging_mode_cr0
_ept_update_paging_mode_cr0:            ## @ept_update_paging_mode_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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %rbx
	movq	%rsi, %r15
	movq	%rdi, %r14
	movq	_X86_CR0_PG@GOTPCREL(%rip), %rax
	testq	%rsi, (%rax)
	je	LBB0_1
## %bb.2:
	movq	%rbx, %rdi
	callq	_is_paging
	testl	%eax, %eax
	jne	LBB0_5
## %bb.3:
	movq	_CPU_BASED_VM_EXEC_CONTROL@GOTPCREL(%rip), %rax
	movl	(%rax), %r12d
	movl	%r12d, %edi
	callq	_vmcs_read32
	movq	_CPU_BASED_CR3_LOAD_EXITING@GOTPCREL(%rip), %rcx
	movq	_CPU_BASED_CR3_STORE_EXITING@GOTPCREL(%rip), %rdx
	movl	(%rdx), %esi
	orl	(%rcx), %esi
	notl	%esi
	andl	%eax, %esi
	movl	%r12d, %edi
	jmp	LBB0_4
LBB0_1:
	movq	_CPU_BASED_VM_EXEC_CONTROL@GOTPCREL(%rip), %rax
	movl	(%rax), %r12d
	movl	%r12d, %edi
	callq	_vmcs_read32
	movq	_CPU_BASED_CR3_LOAD_EXITING@GOTPCREL(%rip), %rcx
	movq	_CPU_BASED_CR3_STORE_EXITING@GOTPCREL(%rip), %rdx
	orl	(%rcx), %eax
	orl	(%rdx), %eax
	movl	%r12d, %edi
	movl	%eax, %esi
LBB0_4:
	callq	_vmcs_write32
	movq	%r15, (%rbx)
	movq	%rbx, %rdi
	callq	_kvm_read_cr4
	movq	%rbx, %rdi
	movl	%eax, %esi
	callq	_vmx_set_cr4
LBB0_5:
	movq	_X86_CR0_WP@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	testq	%r15, %rax
	jne	LBB0_7
## %bb.6:
	notq	%rax
	andq	%rax, (%r14)
LBB0_7:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_X86_CR0_PG,8,3                 ## @X86_CR0_PG
	.comm	_CPU_BASED_VM_EXEC_CONTROL,4,2  ## @CPU_BASED_VM_EXEC_CONTROL
	.comm	_CPU_BASED_CR3_LOAD_EXITING,4,2 ## @CPU_BASED_CR3_LOAD_EXITING
	.comm	_CPU_BASED_CR3_STORE_EXITING,4,2 ## @CPU_BASED_CR3_STORE_EXITING
	.comm	_X86_CR0_WP,8,3                 ## @X86_CR0_WP
	.no_dead_strip	_ept_update_paging_mode_cr0
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ept_update_paging_mode_cr0
_ept_update_paging_mode_cr0:            ; @ept_update_paging_mode_cr0
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w21, -40
	.cfi_offset w22, -48
	mov	x21, x2
	mov	x20, x1
	mov	x19, x0
Lloh0:
	adrp	x8, _X86_CR0_PG@GOTPAGE
Lloh1:
	ldr	x8, [x8, _X86_CR0_PG@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	tst	x8, x1
	b.eq	LBB0_3
; %bb.1:
	mov	x0, x21
	bl	_is_paging
	cbnz	w0, LBB0_5
; %bb.2:
Lloh3:
	adrp	x8, _CPU_BASED_VM_EXEC_CONTROL@GOTPAGE
Lloh4:
	ldr	x8, [x8, _CPU_BASED_VM_EXEC_CONTROL@GOTPAGEOFF]
Lloh5:
	ldr	w22, [x8]
	mov	x0, x22
	bl	_vmcs_read32
Lloh6:
	adrp	x8, _CPU_BASED_CR3_LOAD_EXITING@GOTPAGE
Lloh7:
	ldr	x8, [x8, _CPU_BASED_CR3_LOAD_EXITING@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
Lloh9:
	adrp	x9, _CPU_BASED_CR3_STORE_EXITING@GOTPAGE
Lloh10:
	ldr	x9, [x9, _CPU_BASED_CR3_STORE_EXITING@GOTPAGEOFF]
Lloh11:
	ldr	w9, [x9]
	orr	w8, w9, w8
	bic	w1, w0, w8
	b	LBB0_4
LBB0_3:
Lloh12:
	adrp	x8, _CPU_BASED_VM_EXEC_CONTROL@GOTPAGE
Lloh13:
	ldr	x8, [x8, _CPU_BASED_VM_EXEC_CONTROL@GOTPAGEOFF]
Lloh14:
	ldr	w22, [x8]
	mov	x0, x22
	bl	_vmcs_read32
Lloh15:
	adrp	x8, _CPU_BASED_CR3_LOAD_EXITING@GOTPAGE
Lloh16:
	ldr	x8, [x8, _CPU_BASED_CR3_LOAD_EXITING@GOTPAGEOFF]
Lloh17:
	ldr	w8, [x8]
Lloh18:
	adrp	x9, _CPU_BASED_CR3_STORE_EXITING@GOTPAGE
Lloh19:
	ldr	x9, [x9, _CPU_BASED_CR3_STORE_EXITING@GOTPAGEOFF]
Lloh20:
	ldr	w9, [x9]
	orr	w8, w8, w0
	orr	w1, w8, w9
LBB0_4:
	mov	x0, x22
	bl	_vmcs_write32
	str	x20, [x21]
	mov	x0, x21
	bl	_kvm_read_cr4
	mov	x1, x0
	mov	x0, x21
	bl	_vmx_set_cr4
LBB0_5:
Lloh21:
	adrp	x8, _X86_CR0_WP@GOTPAGE
Lloh22:
	ldr	x8, [x8, _X86_CR0_WP@GOTPAGEOFF]
Lloh23:
	ldr	x8, [x8]
	tst	x8, x20
	b.ne	LBB0_7
; %bb.6:
	ldr	x9, [x19]
	bic	x8, x9, x8
	str	x8, [x19]
LBB0_7:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.cfi_endproc
                                        ; -- End function
	.comm	_X86_CR0_PG,8,3                 ; @X86_CR0_PG
	.comm	_CPU_BASED_VM_EXEC_CONTROL,4,2  ; @CPU_BASED_VM_EXEC_CONTROL
	.comm	_CPU_BASED_CR3_LOAD_EXITING,4,2 ; @CPU_BASED_CR3_LOAD_EXITING
	.comm	_CPU_BASED_CR3_STORE_EXITING,4,2 ; @CPU_BASED_CR3_STORE_EXITING
	.comm	_X86_CR0_WP,8,3                 ; @X86_CR0_WP
	.no_dead_strip	_ept_update_paging_mode_cr0
.subsections_via_symbols
