	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_kvm_emulate_hypercall          ## -- Begin function kvm_emulate_hypercall
	.p2align	4, 0x90
_kvm_emulate_hypercall:                 ## @kvm_emulate_hypercall
	.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, %rbx
	movq	_VCPU_REGS_RAX@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_kvm_register_read
	movq	%rax, %r15
	movq	_VCPU_REGS_RBX@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_kvm_register_read
	movq	%rax, %r14
	movq	_VCPU_REGS_RCX@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_kvm_register_read
	movq	%rax, %r12
	movq	_VCPU_REGS_RDX@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_kvm_register_read
	movq	%rax, %r13
	movq	_VCPU_REGS_RSI@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_kvm_register_read
	movq	%r15, %rdi
	movq	%r14, %rsi
	movq	%r12, %rdx
	movq	%r13, %rcx
	movq	%rax, %r8
	callq	_trace_kvm_hypercall
	movq	%rbx, %rdi
	callq	_is_long_mode
	testl	%eax, %eax
	jne	LBB0_2
## %bb.1:
	movl	%r15d, %r15d
	movl	%r14d, %r14d
	movl	%r12d, %r12d
	movl	%r13d, %r13d
LBB0_2:
	movq	_kvm_x86_ops@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rbx, %rdi
	callq	*(%rax)
	testq	%rax, %rax
	je	LBB0_4
## %bb.3:
	movq	_KVM_EPERM@GOTPCREL(%rip), %rax
LBB0_9:
	xorl	%edx, %edx
	subq	(%rax), %rdx
	movq	%rdx, -48(%rbp)
	movl	$1, %r14d
LBB0_10:
	movq	_VCPU_REGS_RAX@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_kvm_register_write
	incl	(%rbx)
	movl	%r14d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_4:
	cmpq	$129, %r15
	je	LBB0_7
## %bb.5:
	cmpq	$128, %r15
	jne	LBB0_8
## %bb.6:
	movq	$0, -48(%rbp)
	movl	$1, %r14d
	xorl	%edx, %edx
	jmp	LBB0_10
LBB0_7:
	movq	%rbx, %rdi
	movq	%r12, %rsi
	movq	%r13, %rdx
	callq	_hc_gpa
	leaq	-48(%rbp), %rcx
	movq	%rbx, %rdi
	movq	%r14, %rsi
	movl	%eax, %edx
	callq	_kvm_pv_mmu_op
	movl	%eax, %r14d
	movq	-48(%rbp), %rdx
	jmp	LBB0_10
LBB0_8:
	movq	_KVM_ENOSYS@GOTPCREL(%rip), %rax
	jmp	LBB0_9
	.cfi_endproc
                                        ## -- End function
	.comm	_VCPU_REGS_RAX,4,2              ## @VCPU_REGS_RAX
	.comm	_VCPU_REGS_RBX,4,2              ## @VCPU_REGS_RBX
	.comm	_VCPU_REGS_RCX,4,2              ## @VCPU_REGS_RCX
	.comm	_VCPU_REGS_RDX,4,2              ## @VCPU_REGS_RDX
	.comm	_VCPU_REGS_RSI,4,2              ## @VCPU_REGS_RSI
	.comm	_kvm_x86_ops,8,3                ## @kvm_x86_ops
	.comm	_KVM_EPERM,8,3                  ## @KVM_EPERM
	.comm	_KVM_ENOSYS,8,3                 ## @KVM_ENOSYS
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_kvm_emulate_hypercall          ; -- Begin function kvm_emulate_hypercall
	.p2align	2
_kvm_emulate_hypercall:                 ; @kvm_emulate_hypercall
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x19, x0
Lloh0:
	adrp	x24, _VCPU_REGS_RAX@GOTPAGE
Lloh1:
	ldr	x24, [x24, _VCPU_REGS_RAX@GOTPAGEOFF]
	ldr	w1, [x24]
	bl	_kvm_register_read
	mov	x20, x0
Lloh2:
	adrp	x8, _VCPU_REGS_RBX@GOTPAGE
Lloh3:
	ldr	x8, [x8, _VCPU_REGS_RBX@GOTPAGEOFF]
Lloh4:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_kvm_register_read
	mov	x21, x0
Lloh5:
	adrp	x8, _VCPU_REGS_RCX@GOTPAGE
Lloh6:
	ldr	x8, [x8, _VCPU_REGS_RCX@GOTPAGEOFF]
Lloh7:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_kvm_register_read
	mov	x22, x0
Lloh8:
	adrp	x8, _VCPU_REGS_RDX@GOTPAGE
Lloh9:
	ldr	x8, [x8, _VCPU_REGS_RDX@GOTPAGEOFF]
Lloh10:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_kvm_register_read
	mov	x23, x0
Lloh11:
	adrp	x8, _VCPU_REGS_RSI@GOTPAGE
Lloh12:
	ldr	x8, [x8, _VCPU_REGS_RSI@GOTPAGEOFF]
Lloh13:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_kvm_register_read
	mov	x4, x0
	mov	x0, x20
	mov	x1, x21
	mov	x2, x22
	mov	x3, x23
	bl	_trace_kvm_hypercall
	mov	x0, x19
	bl	_is_long_mode
	and	x8, x20, #0xffffffff
	and	x9, x21, #0xffffffff
	and	x10, x22, #0xffffffff
	and	x11, x23, #0xffffffff
	cmp	w0, #0
	csel	x25, x20, x8, ne
	csel	x20, x21, x9, ne
	csel	x21, x22, x10, ne
	csel	x22, x23, x11, ne
Lloh14:
	adrp	x8, _kvm_x86_ops@GOTPAGE
Lloh15:
	ldr	x8, [x8, _kvm_x86_ops@GOTPAGEOFF]
Lloh16:
	ldr	x8, [x8]
	ldr	x8, [x8]
	mov	x0, x19
	blr	x8
	cbz	x0, LBB0_5
; %bb.1:
Lloh17:
	adrp	x8, _KVM_EPERM@GOTPAGE
Lloh18:
	ldr	x8, [x8, _KVM_EPERM@GOTPAGEOFF]
LBB0_2:
	ldr	x8, [x8]
	neg	x2, x8
	str	x2, [sp, #8]
LBB0_3:
	mov	w20, #1
LBB0_4:
	ldr	w1, [x24]
	mov	x0, x19
	bl	_kvm_register_write
	ldr	w8, [x19]
	add	w8, w8, #1
	str	w8, [x19]
	mov	x0, x20
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #96
	ret
LBB0_5:
	cmp	x25, #129
	b.eq	LBB0_8
; %bb.6:
	cmp	x25, #128
	b.ne	LBB0_9
; %bb.7:
	mov	x2, #0
	str	xzr, [sp, #8]
	b	LBB0_3
LBB0_8:
	mov	x0, x19
	mov	x1, x21
	mov	x2, x22
	bl	_hc_gpa
	mov	x2, x0
	add	x3, sp, #8
	mov	x0, x19
	mov	x1, x20
	bl	_kvm_pv_mmu_op
	mov	x20, x0
	ldr	x2, [sp, #8]
	b	LBB0_4
LBB0_9:
Lloh19:
	adrp	x8, _KVM_ENOSYS@GOTPAGE
Lloh20:
	ldr	x8, [x8, _KVM_ENOSYS@GOTPAGEOFF]
	b	LBB0_2
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh17, Lloh18
	.loh AdrpLdrGot	Lloh19, Lloh20
	.cfi_endproc
                                        ; -- End function
	.comm	_VCPU_REGS_RAX,4,2              ; @VCPU_REGS_RAX
	.comm	_VCPU_REGS_RBX,4,2              ; @VCPU_REGS_RBX
	.comm	_VCPU_REGS_RCX,4,2              ; @VCPU_REGS_RCX
	.comm	_VCPU_REGS_RDX,4,2              ; @VCPU_REGS_RDX
	.comm	_VCPU_REGS_RSI,4,2              ; @VCPU_REGS_RSI
	.comm	_kvm_x86_ops,8,3                ; @kvm_x86_ops
	.comm	_KVM_EPERM,8,3                  ; @KVM_EPERM
	.comm	_KVM_ENOSYS,8,3                 ; @KVM_ENOSYS
.subsections_via_symbols
