	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function cr_interception
_cr_interception:                       ## @cr_interception
	.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	%rdi, %r15
	movq	_SVM_FEATURE_DECODE_ASSIST@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_svm_has
	testl	%eax, %eax
	je	LBB0_24
## %bb.1:
	movq	32(%r15), %rax
	movq	_CR_VALID@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	xorl	%edi, %edi
	andl	(%rax), %ecx
	sete	%dil
	callq	_unlikely
	testq	%rax, %rax
	je	LBB0_2
LBB0_24:
	movq	%r15, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_emulate_on_interception        ## TAILCALL
LBB0_2:
	movq	32(%r15), %rax
	movq	_SVM_EXITINFO_REG_MASK@GOTPCREL(%rip), %rcx
	movl	(%rcx), %r14d
	andl	(%rax), %r14d
	movl	4(%rax), %ebx
	movq	_SVM_EXIT_READ_CR0@GOTPCREL(%rip), %rax
	subl	(%rax), %ebx
	cmpl	$16, %ebx
	jl	LBB0_10
## %bb.3:
	movq	%r15, %rdi
	movl	%r14d, %esi
	callq	_kvm_register_read
	addl	$-16, %ebx
	cmpl	$8, %ebx
	ja	LBB0_8
## %bb.4:
	leaq	LJTI0_1(%rip), %rcx
	movslq	(%rcx,%rbx,4), %rdx
	addq	%rcx, %rdx
	jmpq	*%rdx
LBB0_20:
	movq	%r15, %rdi
	movq	%rax, %rsi
	callq	_kvm_set_cr0
	jmp	LBB0_21
LBB0_10:
	cmpl	$8, %ebx
	ja	LBB0_16
## %bb.11:
	movl	%ebx, %eax
	leaq	LJTI0_0(%rip), %rcx
	movslq	(%rcx,%rax,4), %rax
	addq	%rcx, %rax
	jmpq	*%rax
LBB0_17:
	movq	(%r15), %rdx
	jmp	LBB0_18
LBB0_8:
	leaq	L_.str(%rip), %rsi
	jmp	LBB0_9
LBB0_5:
	movq	%r15, %rdi
	movq	%rax, %rsi
	callq	_kvm_set_cr3
	jmp	LBB0_21
LBB0_6:
	movq	%r15, %rdi
	movq	%rax, %rsi
	callq	_kvm_set_cr4
	jmp	LBB0_21
LBB0_7:
	movq	%r15, %rdi
	movq	%rax, %rsi
	callq	_kvm_set_cr8
LBB0_21:
	testl	%eax, %eax
	je	LBB0_19
## %bb.22:
	movq	%r15, %rdi
	xorl	%esi, %esi
	callq	_kvm_inject_gp
	jmp	LBB0_23
LBB0_16:
	leaq	L_.str.1(%rip), %rsi
LBB0_9:
	movl	$1, %edi
	movl	%ebx, %edx
	callq	_WARN
	movq	_UD_VECTOR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	callq	_kvm_queue_exception
	jmp	LBB0_23
LBB0_12:
	movq	8(%r15), %rdx
	jmp	LBB0_18
LBB0_13:
	movq	16(%r15), %rdx
	jmp	LBB0_18
LBB0_14:
	movq	24(%r15), %rdx
	jmp	LBB0_18
LBB0_15:
	movq	%r15, %rdi
	callq	_kvm_get_cr8
	movq	%rax, %rdx
LBB0_18:
	movq	%r15, %rdi
	movl	%r14d, %esi
	callq	_kvm_register_write
LBB0_19:
	movq	%r15, %rdi
	callq	_skip_emulated_instruction
LBB0_23:
	movl	$1, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
	.p2align	2, 0x90
	.data_region jt32
.set L0_0_set_17, LBB0_17-LJTI0_0
.set L0_0_set_16, LBB0_16-LJTI0_0
.set L0_0_set_12, LBB0_12-LJTI0_0
.set L0_0_set_13, LBB0_13-LJTI0_0
.set L0_0_set_14, LBB0_14-LJTI0_0
.set L0_0_set_15, LBB0_15-LJTI0_0
LJTI0_0:
	.long	L0_0_set_17
	.long	L0_0_set_16
	.long	L0_0_set_12
	.long	L0_0_set_13
	.long	L0_0_set_14
	.long	L0_0_set_16
	.long	L0_0_set_16
	.long	L0_0_set_16
	.long	L0_0_set_15
.set L0_1_set_20, LBB0_20-LJTI0_1
.set L0_1_set_8, LBB0_8-LJTI0_1
.set L0_1_set_5, LBB0_5-LJTI0_1
.set L0_1_set_6, LBB0_6-LJTI0_1
.set L0_1_set_7, LBB0_7-LJTI0_1
LJTI0_1:
	.long	L0_1_set_20
	.long	L0_1_set_8
	.long	L0_1_set_8
	.long	L0_1_set_5
	.long	L0_1_set_6
	.long	L0_1_set_8
	.long	L0_1_set_8
	.long	L0_1_set_8
	.long	L0_1_set_7
	.end_data_region
                                        ## -- End function
	.comm	_SVM_FEATURE_DECODE_ASSIST,4,2  ## @SVM_FEATURE_DECODE_ASSIST
	.comm	_CR_VALID,4,2                   ## @CR_VALID
	.comm	_SVM_EXITINFO_REG_MASK,4,2      ## @SVM_EXITINFO_REG_MASK
	.comm	_SVM_EXIT_READ_CR0,4,2          ## @SVM_EXIT_READ_CR0
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"unhandled write to CR%d"

	.comm	_UD_VECTOR,4,2                  ## @UD_VECTOR
L_.str.1:                               ## @.str.1
	.asciz	"unhandled read from CR%d"

	.no_dead_strip	_cr_interception
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function cr_interception
_cr_interception:                       ; @cr_interception
	.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	x19, x0
Lloh0:
	adrp	x8, _SVM_FEATURE_DECODE_ASSIST@GOTPAGE
Lloh1:
	ldr	x8, [x8, _SVM_FEATURE_DECODE_ASSIST@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
	bl	_svm_has
	cbz	w0, LBB0_2
; %bb.1:
	ldr	x8, [x19, #32]
	ldr	w8, [x8]
Lloh3:
	adrp	x9, _CR_VALID@GOTPAGE
Lloh4:
	ldr	x9, [x9, _CR_VALID@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	tst	w9, w8
	cset	w0, eq
	bl	_unlikely
	cbz	x0, LBB0_3
LBB0_2:
	mov	x0, x19
	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
	b	_emulate_on_interception
LBB0_3:
	ldr	x8, [x19, #32]
Lloh6:
	adrp	x9, _SVM_EXITINFO_REG_MASK@GOTPAGE
Lloh7:
	ldr	x9, [x9, _SVM_EXITINFO_REG_MASK@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x9]
	ldp	w10, w8, [x8]
	and	w20, w9, w10
Lloh9:
	adrp	x9, _SVM_EXIT_READ_CR0@GOTPAGE
Lloh10:
	ldr	x9, [x9, _SVM_EXIT_READ_CR0@GOTPAGEOFF]
Lloh11:
	ldr	w9, [x9]
	sub	w2, w8, w9
	subs	w21, w2, #16
	b.lt	LBB0_7
; %bb.4:
	mov	x0, x19
	mov	x1, x20
	bl	_kvm_register_read
	cmp	w21, #8
	b.hi	LBB0_10
; %bb.5:
	mov	x1, x0
Lloh12:
	adrp	x8, lJTI0_1@PAGE
Lloh13:
	add	x8, x8, lJTI0_1@PAGEOFF
	adr	x9, LBB0_6
	ldrb	w10, [x8, x21]
	add	x9, x9, x10, lsl #2
	br	x9
LBB0_6:
	mov	x0, x19
	bl	_kvm_set_cr0
	b	LBB0_14
LBB0_7:
	cmp	w2, #8
	b.hi	LBB0_16
; %bb.8:
Lloh14:
	adrp	x8, lJTI0_0@PAGE
Lloh15:
	add	x8, x8, lJTI0_0@PAGEOFF
	adr	x9, LBB0_9
	ldrb	w10, [x8, x2]
	add	x9, x9, x10, lsl #2
	br	x9
LBB0_9:
	ldr	x2, [x19]
	b	LBB0_22
LBB0_10:
Lloh16:
	adrp	x1, l_.str@PAGE
Lloh17:
	add	x1, x1, l_.str@PAGEOFF
	mov	w0, #1
	mov	x2, x21
	b	LBB0_17
LBB0_11:
	mov	x0, x19
	bl	_kvm_set_cr3
	b	LBB0_14
LBB0_12:
	mov	x0, x19
	bl	_kvm_set_cr4
	b	LBB0_14
LBB0_13:
	mov	x0, x19
	bl	_kvm_set_cr8
LBB0_14:
	cbz	w0, LBB0_23
; %bb.15:
	mov	x0, x19
	mov	w1, #0
	bl	_kvm_inject_gp
	b	LBB0_24
LBB0_16:
Lloh18:
	adrp	x1, l_.str.1@PAGE
Lloh19:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	w0, #1
                                        ; kill: def $w2 killed $w2 killed $x2
LBB0_17:
	bl	_WARN
Lloh20:
	adrp	x8, _UD_VECTOR@GOTPAGE
Lloh21:
	ldr	x8, [x8, _UD_VECTOR@GOTPAGEOFF]
Lloh22:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_kvm_queue_exception
	b	LBB0_24
LBB0_18:
	ldr	x2, [x19, #8]
	b	LBB0_22
LBB0_19:
	ldr	x2, [x19, #16]
	b	LBB0_22
LBB0_20:
	ldr	x2, [x19, #24]
	b	LBB0_22
LBB0_21:
	mov	x0, x19
	bl	_kvm_get_cr8
	mov	x2, x0
LBB0_22:
	mov	x0, x19
	mov	x1, x20
	bl	_kvm_register_write
LBB0_23:
	mov	x0, x19
	bl	_skip_emulated_instruction
LBB0_24:
	mov	w0, #1
	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	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpAdd	Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.cfi_endproc
	.section	__TEXT,__const
lJTI0_0:
	.byte	(LBB0_9-LBB0_9)>>2
	.byte	(LBB0_16-LBB0_9)>>2
	.byte	(LBB0_18-LBB0_9)>>2
	.byte	(LBB0_19-LBB0_9)>>2
	.byte	(LBB0_20-LBB0_9)>>2
	.byte	(LBB0_16-LBB0_9)>>2
	.byte	(LBB0_16-LBB0_9)>>2
	.byte	(LBB0_16-LBB0_9)>>2
	.byte	(LBB0_21-LBB0_9)>>2
lJTI0_1:
	.byte	(LBB0_6-LBB0_6)>>2
	.byte	(LBB0_10-LBB0_6)>>2
	.byte	(LBB0_10-LBB0_6)>>2
	.byte	(LBB0_11-LBB0_6)>>2
	.byte	(LBB0_12-LBB0_6)>>2
	.byte	(LBB0_10-LBB0_6)>>2
	.byte	(LBB0_10-LBB0_6)>>2
	.byte	(LBB0_10-LBB0_6)>>2
	.byte	(LBB0_13-LBB0_6)>>2
                                        ; -- End function
	.comm	_SVM_FEATURE_DECODE_ASSIST,4,2  ; @SVM_FEATURE_DECODE_ASSIST
	.comm	_CR_VALID,4,2                   ; @CR_VALID
	.comm	_SVM_EXITINFO_REG_MASK,4,2      ; @SVM_EXITINFO_REG_MASK
	.comm	_SVM_EXIT_READ_CR0,4,2          ; @SVM_EXIT_READ_CR0
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"unhandled write to CR%d"

	.comm	_UD_VECTOR,4,2                  ; @UD_VECTOR
l_.str.1:                               ; @.str.1
	.asciz	"unhandled read from CR%d"

	.no_dead_strip	_cr_interception
.subsections_via_symbols
