	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function vmexit_rdmsr
_vmexit_rdmsr:                          ## @vmexit_rdmsr
	.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	%rdx, %r15
	movq	%rsi, %rbx
	movq	%rdi, %r14
	movl	$0, -28(%rbp)
	movl	(%rdx), %esi
	movl	(%rbx), %edx
	leaq	-28(%rbp), %rcx
	callq	_emulate_rdmsr
	testl	%eax, %eax
	je	LBB0_3
## %bb.1:
	movq	_stderr@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	(%rbx), %edx
	movl	(%r15), %ecx
	leaq	L_.str(%rip), %rsi
	callq	_fprintf
	movq	_strictmsr@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	je	LBB0_3
## %bb.2:
	movl	(%r15), %esi
	movq	%r14, %rdi
	callq	_vm_inject_gp
	jmp	LBB0_4
LBB0_3:
	movl	-28(%rbp), %ecx
	movl	(%r15), %esi
	movq	_VM_REG_GUEST_RAX@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r14, %rdi
	callq	_vm_set_register
	xorl	%edi, %edi
	testl	%eax, %eax
	sete	%dil
	callq	_assert
	movl	(%r15), %esi
	movq	_VM_REG_GUEST_RDX@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r14, %rdi
	callq	_vm_set_register
	xorl	%edi, %edi
	testl	%eax, %eax
	sete	%dil
	callq	_assert
LBB0_4:
	movq	_VMEXIT_CONTINUE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_stderr,4,2                     ## @stderr
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"rdmsr to register %#x on vcpu %d\n"

	.comm	_strictmsr,8,3                  ## @strictmsr
	.comm	_VMEXIT_CONTINUE,4,2            ## @VMEXIT_CONTINUE
	.comm	_VM_REG_GUEST_RAX,4,2           ## @VM_REG_GUEST_RAX
	.comm	_VM_REG_GUEST_RDX,4,2           ## @VM_REG_GUEST_RDX
	.no_dead_strip	_vmexit_rdmsr
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function vmexit_rdmsr
_vmexit_rdmsr:                          ; @vmexit_rdmsr
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.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
	mov	x20, x2
	mov	x21, x1
	mov	x19, x0
	str	wzr, [sp, #12]
	ldr	w1, [x2]
	ldr	w2, [x21]
	add	x3, sp, #12
	bl	_emulate_rdmsr
	cbz	w0, LBB0_3
; %bb.1:
Lloh0:
	adrp	x8, _stderr@GOTPAGE
Lloh1:
	ldr	x8, [x8, _stderr@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
	ldr	w2, [x21]
	ldr	w3, [x20]
Lloh3:
	adrp	x1, l_.str@PAGE
Lloh4:
	add	x1, x1, l_.str@PAGEOFF
	bl	_fprintf
Lloh5:
	adrp	x8, _strictmsr@GOTPAGE
Lloh6:
	ldr	x8, [x8, _strictmsr@GOTPAGEOFF]
Lloh7:
	ldr	x8, [x8]
	cbz	x8, LBB0_3
; %bb.2:
	ldr	w1, [x20]
	mov	x0, x19
	bl	_vm_inject_gp
	b	LBB0_4
LBB0_3:
	ldr	w3, [sp, #12]
	ldr	w1, [x20]
Lloh8:
	adrp	x8, _VM_REG_GUEST_RAX@GOTPAGE
Lloh9:
	ldr	x8, [x8, _VM_REG_GUEST_RAX@GOTPAGEOFF]
Lloh10:
	ldr	w2, [x8]
	mov	x0, x19
	bl	_vm_set_register
	cmp	w0, #0
	cset	w0, eq
	bl	_assert
	ldr	w1, [x20]
Lloh11:
	adrp	x8, _VM_REG_GUEST_RDX@GOTPAGE
Lloh12:
	ldr	x8, [x8, _VM_REG_GUEST_RDX@GOTPAGEOFF]
Lloh13:
	ldr	w2, [x8]
	mov	x0, x19
	bl	_vm_set_register
	cmp	w0, #0
	cset	w0, eq
	bl	_assert
LBB0_4:
Lloh14:
	adrp	x8, _VMEXIT_CONTINUE@GOTPAGE
Lloh15:
	ldr	x8, [x8, _VMEXIT_CONTINUE@GOTPAGEOFF]
Lloh16:
	ldr	w0, [x8]
	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
	add	sp, sp, #64
	ret
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.cfi_endproc
                                        ; -- End function
	.comm	_stderr,4,2                     ; @stderr
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"rdmsr to register %#x on vcpu %d\n"

	.comm	_strictmsr,8,3                  ; @strictmsr
	.comm	_VMEXIT_CONTINUE,4,2            ; @VMEXIT_CONTINUE
	.comm	_VM_REG_GUEST_RAX,4,2           ; @VM_REG_GUEST_RAX
	.comm	_VM_REG_GUEST_RDX,4,2           ; @VM_REG_GUEST_RDX
	.no_dead_strip	_vmexit_rdmsr
.subsections_via_symbols
