	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function handle_cr
_handle_cr:                             ## @handle_cr
	.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	%r13
	pushq	%r12
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r14
	movq	_EXIT_QUALIFICATION@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_vmcs_readl
	movq	%rax, %rbx
	movl	%ebx, %r15d
	andl	$15, %r15d
	movl	%ebx, %r13d
	shrl	$8, %r13d
	andl	$15, %r13d
	movq	%rax, %r12
	shrq	$4, %r12
	movl	%r12d, %eax
	andl	$3, %eax
	leaq	LJTI0_0(%rip), %rcx
	movslq	(%rcx,%rax,4), %rax
	addq	%rcx, %rax
	jmpq	*%rax
LBB0_1:
	movq	%r14, %rdi
	movl	%r13d, %esi
	callq	_kvm_register_read
	movq	%rax, %rbx
	movl	%r15d, %edi
	movl	%ebx, %esi
	callq	_trace_kvm_cr_write
	cmpl	$8, %r15d
	ja	LBB0_9
## %bb.2:
	movl	%r15d, %eax
	leaq	LJTI0_1(%rip), %rcx
	movslq	(%rcx,%rax,4), %rax
	addq	%rcx, %rax
	jmpq	*%rax
LBB0_3:
	movq	%r14, %rdi
	movq	%rbx, %rsi
	callq	_kvm_set_cr0
	jmp	LBB0_18
LBB0_4:
	cmpl	$8, %r15d
	je	LBB0_11
## %bb.5:
	cmpl	$3, %r15d
	jne	LBB0_9
## %bb.6:
	movq	8(%r14), %rdx
	movq	%r14, %rdi
	movl	%r13d, %esi
	callq	_kvm_register_write
	movq	8(%r14), %rsi
	movl	$3, %edi
	jmp	LBB0_12
LBB0_7:
	movq	_X86_CR0_TS@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	notl	%esi
	movq	%r14, %rdi
	callq	_kvm_read_cr0_bits
	movq	%r14, %rdi
	movl	%eax, %esi
	callq	_vmx_set_cr0
	movq	%r14, %rdi
	callq	_kvm_read_cr0
	xorl	%edi, %edi
	movl	%eax, %esi
	callq	_trace_kvm_cr_write
	jmp	LBB0_13
LBB0_8:
	movq	_LMSW_SOURCE_DATA_SHIFT@GOTPCREL(%rip), %rax
	movb	(%rax), %cl
	shrq	%cl, %rbx
	andl	$15, %ebx
	movq	%r14, %rdi
	callq	_kvm_read_cr0
                                        ## kill: def $eax killed $eax def $rax
	andl	$-16, %eax
	leal	(%rbx,%rax), %esi
	xorl	%edi, %edi
	callq	_trace_kvm_cr_write
	movq	%r14, %rdi
	movq	%rbx, %rsi
	callq	_kvm_lmsw
	jmp	LBB0_13
LBB0_9:
	movq	(%r14), %rax
	movq	$0, (%rax)
	andl	$3, %r12d
	leaq	L_.str(%rip), %rsi
	movq	%r14, %rdi
	movl	%r12d, %edx
	movl	%r15d, %ecx
	callq	_pr_unimpl
LBB0_10:
	xorl	%eax, %eax
	jmp	LBB0_15
LBB0_11:
	movq	%r14, %rdi
	callq	_kvm_get_cr8
	movq	%rax, %rbx
	movq	%r14, %rdi
	movl	%r13d, %esi
	movq	%rax, %rdx
	callq	_kvm_register_write
	movl	$8, %edi
	movq	%rbx, %rsi
LBB0_12:
	callq	_trace_kvm_cr_read
LBB0_13:
	movq	%r14, %rdi
	callq	_skip_emulated_instruction
LBB0_14:
	movl	$1, %eax
LBB0_15:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_16:
	movq	%r14, %rdi
	movq	%rbx, %rsi
	callq	_kvm_set_cr3
	jmp	LBB0_18
LBB0_17:
	movq	%r14, %rdi
	movq	%rbx, %rsi
	callq	_kvm_set_cr4
LBB0_18:
	movq	%r14, %rdi
	movl	%eax, %esi
	callq	_complete_insn_gp
	jmp	LBB0_14
LBB0_19:
	movq	%r14, %rdi
	callq	_kvm_get_cr8
	movq	%rax, %r15
	movq	%r14, %rdi
	movl	%r13d, %esi
	callq	_kvm_register_read
	movq	%rax, %rbx
	movq	%r14, %rdi
	movq	%rax, %rsi
	callq	_kvm_set_cr8
	movq	%r14, %rdi
	testl	%eax, %eax
	je	LBB0_21
## %bb.20:
	xorl	%esi, %esi
	callq	_kvm_inject_gp
	jmp	LBB0_22
LBB0_21:
	callq	_skip_emulated_instruction
LBB0_22:
	movl	16(%r14), %edi
	callq	_irqchip_in_kernel
	movl	%eax, %ecx
	movl	$1, %eax
	testl	%ecx, %ecx
	jne	LBB0_15
## %bb.23:
	cmpq	%rbx, %r15
	jbe	LBB0_15
## %bb.24:
	movq	_KVM_EXIT_SET_TPR@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	(%r14), %rcx
	movq	%rax, (%rcx)
	jmp	LBB0_10
	.cfi_endproc
	.p2align	2, 0x90
	.data_region jt32
.set L0_0_set_1, LBB0_1-LJTI0_0
.set L0_0_set_4, LBB0_4-LJTI0_0
.set L0_0_set_7, LBB0_7-LJTI0_0
.set L0_0_set_8, LBB0_8-LJTI0_0
LJTI0_0:
	.long	L0_0_set_1
	.long	L0_0_set_4
	.long	L0_0_set_7
	.long	L0_0_set_8
.set L0_1_set_3, LBB0_3-LJTI0_1
.set L0_1_set_9, LBB0_9-LJTI0_1
.set L0_1_set_16, LBB0_16-LJTI0_1
.set L0_1_set_17, LBB0_17-LJTI0_1
.set L0_1_set_19, LBB0_19-LJTI0_1
LJTI0_1:
	.long	L0_1_set_3
	.long	L0_1_set_9
	.long	L0_1_set_9
	.long	L0_1_set_16
	.long	L0_1_set_17
	.long	L0_1_set_9
	.long	L0_1_set_9
	.long	L0_1_set_9
	.long	L0_1_set_19
	.end_data_region
                                        ## -- End function
	.comm	_EXIT_QUALIFICATION,4,2         ## @EXIT_QUALIFICATION
	.comm	_KVM_EXIT_SET_TPR,8,3           ## @KVM_EXIT_SET_TPR
	.comm	_X86_CR0_TS,4,2                 ## @X86_CR0_TS
	.comm	_LMSW_SOURCE_DATA_SHIFT,8,3     ## @LMSW_SOURCE_DATA_SHIFT
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"unhandled control register: op %d cr %d\n"

	.no_dead_strip	_handle_cr
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function handle_cr
_handle_cr:                             ; @handle_cr
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x19, x0
Lloh0:
	adrp	x8, _EXIT_QUALIFICATION@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EXIT_QUALIFICATION@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
	bl	_vmcs_readl
	mov	x21, x0
	and	w22, w21, #0xf
	ubfx	w20, w21, #8, #4
	ubfx	x8, x0, #4, #2
Lloh3:
	adrp	x9, lJTI0_0@PAGE
Lloh4:
	add	x9, x9, lJTI0_0@PAGEOFF
	adr	x10, LBB0_1
	ldrb	w11, [x9, x8]
	add	x10, x10, x11, lsl #2
	br	x10
LBB0_1:
	mov	x0, x19
	mov	x1, x20
	bl	_kvm_register_read
	mov	x23, x0
	mov	x0, x22
	mov	x1, x23
	bl	_trace_kvm_cr_write
	cmp	w22, #8
	b.hi	LBB0_9
; %bb.2:
Lloh5:
	adrp	x8, lJTI0_1@PAGE
Lloh6:
	add	x8, x8, lJTI0_1@PAGEOFF
	adr	x9, LBB0_3
	ldrb	w10, [x8, x22]
	add	x9, x9, x10, lsl #2
	br	x9
LBB0_3:
	mov	x0, x19
	mov	x1, x23
	bl	_kvm_set_cr0
	b	LBB0_17
LBB0_4:
	cmp	w22, #8
	b.eq	LBB0_10
; %bb.5:
	cmp	w22, #3
	b.ne	LBB0_9
; %bb.6:
	ldr	x2, [x19, #8]
	mov	x0, x19
	mov	x1, x20
	bl	_kvm_register_write
	ldr	x1, [x19, #8]
	mov	w0, #3
	b	LBB0_11
LBB0_7:
Lloh7:
	adrp	x8, _X86_CR0_TS@GOTPAGE
Lloh8:
	ldr	x8, [x8, _X86_CR0_TS@GOTPAGEOFF]
Lloh9:
	ldr	w8, [x8]
	mvn	w1, w8
	mov	x0, x19
	bl	_kvm_read_cr0_bits
	mov	x1, x0
	mov	x0, x19
	bl	_vmx_set_cr0
	mov	x0, x19
	bl	_kvm_read_cr0
	mov	x1, x0
	mov	w0, #0
	bl	_trace_kvm_cr_write
	b	LBB0_12
LBB0_8:
Lloh10:
	adrp	x8, _LMSW_SOURCE_DATA_SHIFT@GOTPAGE
Lloh11:
	ldr	x8, [x8, _LMSW_SOURCE_DATA_SHIFT@GOTPAGEOFF]
Lloh12:
	ldr	x8, [x8]
	lsr	x8, x21, x8
	and	x20, x8, #0xf
	mov	x0, x19
	bl	_kvm_read_cr0
	and	w8, w0, #0xfffffff0
	orr	w1, w8, w20
	mov	w0, #0
	bl	_trace_kvm_cr_write
	mov	x0, x19
	mov	x1, x20
	bl	_kvm_lmsw
	b	LBB0_12
LBB0_9:
	ldr	x8, [x19]
	str	xzr, [x8]
	ubfx	w2, w21, #4, #2
Lloh13:
	adrp	x1, l_.str@PAGE
Lloh14:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	mov	x3, x22
	bl	_pr_unimpl
	mov	w0, #0
	b	LBB0_14
LBB0_10:
	mov	x0, x19
	bl	_kvm_get_cr8
	mov	x21, x0
	mov	x0, x19
	mov	x1, x20
	mov	x2, x21
	bl	_kvm_register_write
	mov	w0, #8
	mov	x1, x21
LBB0_11:
	bl	_trace_kvm_cr_read
LBB0_12:
	mov	x0, x19
	bl	_skip_emulated_instruction
LBB0_13:
	mov	w0, #1
LBB0_14:
	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
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
LBB0_15:
	mov	x0, x19
	mov	x1, x23
	bl	_kvm_set_cr3
	b	LBB0_17
LBB0_16:
	mov	x0, x19
	mov	x1, x23
	bl	_kvm_set_cr4
LBB0_17:
	mov	x1, x0
	mov	x0, x19
	bl	_complete_insn_gp
	b	LBB0_13
LBB0_18:
	mov	x0, x19
	bl	_kvm_get_cr8
	mov	x21, x0
	mov	x0, x19
	mov	x1, x20
	bl	_kvm_register_read
	mov	x20, x0
	mov	x0, x19
	mov	x1, x20
	bl	_kvm_set_cr8
	cbz	w0, LBB0_20
; %bb.19:
	mov	x0, x19
	mov	w1, #0
	bl	_kvm_inject_gp
	b	LBB0_21
LBB0_20:
	mov	x0, x19
	bl	_skip_emulated_instruction
LBB0_21:
	ldr	w0, [x19, #16]
	bl	_irqchip_in_kernel
	mov	x8, x0
	mov	w0, #1
	cbnz	w8, LBB0_14
; %bb.22:
	cmp	x21, x20
	b.ls	LBB0_14
; %bb.23:
	mov	w0, #0
Lloh15:
	adrp	x8, _KVM_EXIT_SET_TPR@GOTPAGE
Lloh16:
	ldr	x8, [x8, _KVM_EXIT_SET_TPR@GOTPAGEOFF]
Lloh17:
	ldr	x8, [x8]
	ldr	x9, [x19]
	str	x8, [x9]
	b	LBB0_14
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.cfi_endproc
	.section	__TEXT,__const
lJTI0_0:
	.byte	(LBB0_1-LBB0_1)>>2
	.byte	(LBB0_4-LBB0_1)>>2
	.byte	(LBB0_7-LBB0_1)>>2
	.byte	(LBB0_8-LBB0_1)>>2
lJTI0_1:
	.byte	(LBB0_3-LBB0_3)>>2
	.byte	(LBB0_9-LBB0_3)>>2
	.byte	(LBB0_9-LBB0_3)>>2
	.byte	(LBB0_15-LBB0_3)>>2
	.byte	(LBB0_16-LBB0_3)>>2
	.byte	(LBB0_9-LBB0_3)>>2
	.byte	(LBB0_9-LBB0_3)>>2
	.byte	(LBB0_9-LBB0_3)>>2
	.byte	(LBB0_18-LBB0_3)>>2
                                        ; -- End function
	.comm	_EXIT_QUALIFICATION,4,2         ; @EXIT_QUALIFICATION
	.comm	_KVM_EXIT_SET_TPR,8,3           ; @KVM_EXIT_SET_TPR
	.comm	_X86_CR0_TS,4,2                 ; @X86_CR0_TS
	.comm	_LMSW_SOURCE_DATA_SHIFT,8,3     ; @LMSW_SOURCE_DATA_SHIFT
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"unhandled control register: op %d cr %d\n"

	.no_dead_strip	_handle_cr
.subsections_via_symbols
