	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_kvm_set_cr3                    ## -- Begin function kvm_set_cr3
	.p2align	4, 0x90
_kvm_set_cr3:                           ## @kvm_set_cr3
	.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, %r14
	movq	%rdi, %rbx
	cmpq	%rsi, (%rdi)
	jne	LBB0_3
## %bb.1:
	movq	%rbx, %rdi
	callq	_pdptrs_changed
	testl	%eax, %eax
	je	LBB0_2
LBB0_3:
	movq	%rbx, %rdi
	callq	_is_long_mode
	testq	%rax, %rax
	je	LBB0_8
## %bb.4:
	movq	_X86_CR4_PCIDE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_kvm_read_cr4_bits
	testq	%rax, %rax
	je	LBB0_7
## %bb.5:
	movq	_CR3_PCID_ENABLED_RESERVED_BITS@GOTPCREL(%rip), %rax
	jmp	LBB0_6
LBB0_8:
	movq	%rbx, %rdi
	callq	_is_pae
	testq	%rax, %rax
	je	LBB0_12
## %bb.9:
	movq	_CR3_PAE_RESERVED_BITS@GOTPCREL(%rip), %rax
	movl	$1, %r15d
	testq	%r14, (%rax)
	jne	LBB0_15
## %bb.10:
	movq	%rbx, %rdi
	callq	_is_paging
	testq	%rax, %rax
	je	LBB0_12
## %bb.11:
	movq	%rbx, %rdi
	movq	%r14, %rsi
	callq	_load_pdptrs
	testl	%eax, %eax
	jne	LBB0_12
	jmp	LBB0_15
LBB0_7:
	movq	_CR3_L_MODE_RESERVED_BITS@GOTPCREL(%rip), %rax
LBB0_6:
	movl	$1, %r15d
	testq	%r14, (%rax)
	jne	LBB0_15
LBB0_12:
	movl	16(%rbx), %edi
	movq	_PAGE_SHIFT@GOTPCREL(%rip), %rax
	movb	(%rax), %cl
	movq	%r14, %rsi
	shrq	%cl, %rsi
	callq	_gfn_to_memslot
	xorl	%edi, %edi
	testl	%eax, %eax
	sete	%dil
	callq	_unlikely
	movl	$1, %r15d
	testq	%rax, %rax
	jne	LBB0_15
## %bb.13:
	movq	%r14, (%rbx)
	movq	%rbx, %rdi
	callq	*8(%rbx)
	jmp	LBB0_14
LBB0_2:
	movq	%rbx, %rdi
	callq	_kvm_mmu_sync_roots
	movq	%rbx, %rdi
	callq	_kvm_mmu_flush_tlb
LBB0_14:
	xorl	%r15d, %r15d
LBB0_15:
	movl	%r15d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_X86_CR4_PCIDE,4,2              ## @X86_CR4_PCIDE
	.comm	_CR3_PCID_ENABLED_RESERVED_BITS,8,3 ## @CR3_PCID_ENABLED_RESERVED_BITS
	.comm	_CR3_L_MODE_RESERVED_BITS,8,3   ## @CR3_L_MODE_RESERVED_BITS
	.comm	_CR3_PAE_RESERVED_BITS,8,3      ## @CR3_PAE_RESERVED_BITS
	.comm	_PAGE_SHIFT,8,3                 ## @PAGE_SHIFT
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_kvm_set_cr3                    ; -- Begin function kvm_set_cr3
	.p2align	2
_kvm_set_cr3:                           ; @kvm_set_cr3
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x20, x1
	mov	x19, x0
	ldr	x8, [x0]
	cmp	x8, x1
	b.ne	LBB0_2
; %bb.1:
	mov	x0, x19
	bl	_pdptrs_changed
	cbz	w0, LBB0_13
LBB0_2:
	mov	x0, x19
	bl	_is_long_mode
	cbz	x0, LBB0_5
; %bb.3:
Lloh0:
	adrp	x8, _X86_CR4_PCIDE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _X86_CR4_PCIDE@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_kvm_read_cr4_bits
	cbz	x0, LBB0_9
; %bb.4:
Lloh3:
	adrp	x8, _CR3_PCID_ENABLED_RESERVED_BITS@GOTPAGE
Lloh4:
	ldr	x8, [x8, _CR3_PCID_ENABLED_RESERVED_BITS@GOTPAGEOFF]
	b	LBB0_10
LBB0_5:
	mov	x0, x19
	bl	_is_pae
	cbz	x0, LBB0_11
; %bb.6:
Lloh5:
	adrp	x8, _CR3_PAE_RESERVED_BITS@GOTPAGE
Lloh6:
	ldr	x8, [x8, _CR3_PAE_RESERVED_BITS@GOTPAGEOFF]
Lloh7:
	ldr	x8, [x8]
	tst	x8, x20
	b.ne	LBB0_12
; %bb.7:
	mov	x0, x19
	bl	_is_paging
	cbz	x0, LBB0_11
; %bb.8:
	mov	x0, x19
	mov	x1, x20
	bl	_load_pdptrs
	cbnz	w0, LBB0_11
	b	LBB0_12
LBB0_9:
Lloh8:
	adrp	x8, _CR3_L_MODE_RESERVED_BITS@GOTPAGE
Lloh9:
	ldr	x8, [x8, _CR3_L_MODE_RESERVED_BITS@GOTPAGEOFF]
LBB0_10:
	ldr	x8, [x8]
	tst	x8, x20
	b.ne	LBB0_12
LBB0_11:
	ldr	w0, [x19, #16]
Lloh10:
	adrp	x8, _PAGE_SHIFT@GOTPAGE
Lloh11:
	ldr	x8, [x8, _PAGE_SHIFT@GOTPAGEOFF]
Lloh12:
	ldr	x8, [x8]
	lsr	x1, x20, x8
	bl	_gfn_to_memslot
	cmp	w0, #0
	cset	w0, eq
	bl	_unlikely
	cbz	x0, LBB0_14
LBB0_12:
	mov	w0, #1
	b	LBB0_16
LBB0_13:
	mov	x0, x19
	bl	_kvm_mmu_sync_roots
	mov	x0, x19
	bl	_kvm_mmu_flush_tlb
	b	LBB0_15
LBB0_14:
	str	x20, [x19]
	ldr	x8, [x19, #8]
	mov	x0, x19
	blr	x8
LBB0_15:
	mov	w0, #0
LBB0_16:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.cfi_endproc
                                        ; -- End function
	.comm	_X86_CR4_PCIDE,4,2              ; @X86_CR4_PCIDE
	.comm	_CR3_PCID_ENABLED_RESERVED_BITS,8,3 ; @CR3_PCID_ENABLED_RESERVED_BITS
	.comm	_CR3_L_MODE_RESERVED_BITS,8,3   ; @CR3_L_MODE_RESERVED_BITS
	.comm	_CR3_PAE_RESERVED_BITS,8,3      ; @CR3_PAE_RESERVED_BITS
	.comm	_PAGE_SHIFT,8,3                 ; @PAGE_SHIFT
.subsections_via_symbols
