	.file	"extr_x86.c_kvm_emulate_hypercall.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.globl	kvm_emulate_hypercall
	.type	kvm_emulate_hypercall, @function
kvm_emulate_hypercall:
.LFB0:
	.cfi_startproc
	endbr64
	push	r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	push	r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	push	r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	push	r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	push	rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	mov	rbp, rdi
	push	rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	sub	rsp, 24
	.cfi_def_cfa_offset 80
	mov	edi, DWORD PTR 4[rdi]
	call	kvm_hv_hypercall_enabled@PLT
	mov	rdi, rbp
	test	rax, rax
	jne	.L14
	call	kvm_rax_read@PLT
	mov	rdi, rbp
	mov	rbx, rax
	call	kvm_rbx_read@PLT
	mov	rdi, rbp
	mov	r12, rax
	call	kvm_rcx_read@PLT
	mov	rdi, rbp
	mov	r13, rax
	call	kvm_rdx_read@PLT
	mov	rdi, rbp
	mov	r14, rax
	call	kvm_rsi_read@PLT
	mov	rcx, r14
	mov	rdx, r13
	mov	rsi, r12
	mov	r8, rax
	mov	rdi, rbx
	mov	r15, rax
	call	trace_kvm_hypercall@PLT
	mov	rdi, rbp
	call	is_64_bit_mode@PLT
	mov	r9d, eax
	test	eax, eax
	jne	.L3
	mov	ebx, ebx
	mov	r12d, r12d
	mov	r13d, r13d
	mov	r14d, r14d
	mov	r15d, r15d
.L3:
	mov	rax, QWORD PTR kvm_x86_ops[rip]
	mov	DWORD PTR 12[rsp], r9d
	mov	rdi, rbp
	call	[QWORD PTR [rax]]
	mov	rsi, QWORD PTR KVM_EPERM[rip]
	mov	r9d, DWORD PTR 12[rsp]
	neg	rsi
	test	rax, rax
	jne	.L5
	cmp	rbx, 130
	je	.L6
	ja	.L7
	xor	esi, esi
	cmp	rbx, 128
	je	.L5
	cmp	rbx, 129
	jne	.L9
	mov	edi, DWORD PTR 4[rbp]
	mov	rsi, r12
	mov	r8, r15
	mov	rcx, r14
	mov	rdx, r13
	call	kvm_pv_send_ipi@PLT
	mov	rsi, rax
.L5:
	mov	rdi, rbp
	call	kvm_rax_write@PLT
	add	DWORD PTR 0[rbp], 1
	add	rsp, 24
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	mov	rdi, rbp
	pop	rbx
	.cfi_def_cfa_offset 48
	pop	rbp
	.cfi_def_cfa_offset 40
	pop	r12
	.cfi_def_cfa_offset 32
	pop	r13
	.cfi_def_cfa_offset 24
	pop	r14
	.cfi_def_cfa_offset 16
	pop	r15
	.cfi_def_cfa_offset 8
	jmp	kvm_skip_emulated_instruction@PLT
	.p2align 4,,10
	.p2align 3
.L7:
	.cfi_restore_state
	cmp	rbx, 131
	jne	.L9
	mov	edi, DWORD PTR 4[rbp]
	mov	rdx, r13
	mov	rsi, r12
	call	kvm_pv_kick_cpu_op@PLT
	mov	edi, DWORD PTR 4[rbp]
	mov	rsi, r13
	call	kvm_sched_yield@PLT
	xor	esi, esi
	jmp	.L5
	.p2align 4,,10
	.p2align 3
.L14:
	add	rsp, 24
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	pop	rbx
	.cfi_def_cfa_offset 48
	pop	rbp
	.cfi_def_cfa_offset 40
	pop	r12
	.cfi_def_cfa_offset 32
	pop	r13
	.cfi_def_cfa_offset 24
	pop	r14
	.cfi_def_cfa_offset 16
	pop	r15
	.cfi_def_cfa_offset 8
	jmp	kvm_hv_hypercall@PLT
	.p2align 4,,10
	.p2align 3
.L6:
	.cfi_restore_state
	mov	edi, DWORD PTR 4[rbp]
	mov	rsi, r12
	call	kvm_sched_yield@PLT
	xor	esi, esi
	jmp	.L5
	.p2align 4,,10
	.p2align 3
.L9:
	mov	rsi, QWORD PTR KVM_ENOSYS[rip]
	neg	rsi
	jmp	.L5
	.cfi_endproc
.LFE0:
	.size	kvm_emulate_hypercall, .-kvm_emulate_hypercall
	.comm	kvm_x86_ops,8,8
	.comm	KVM_EPERM,8,8
	.comm	KVM_ENOSYS,8,8
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	 1f - 0f
	.long	 4f - 1f
	.long	 5
0:
	.string	 "GNU"
1:
	.align 8
	.long	 0xc0000002
	.long	 3f - 2f
2:
	.long	 0x3
3:
	.align 8
4:

	.arch armv5t
	.eabi_attribute 20, 1
	.eabi_attribute 21, 1
	.eabi_attribute 23, 3
	.eabi_attribute 24, 1
	.eabi_attribute 25, 1
	.eabi_attribute 26, 2
	.eabi_attribute 30, 2
	.eabi_attribute 34, 0
	.eabi_attribute 18, 4
	.file	"extr_x86.c_kvm_emulate_hypercall.c"
	.text
	.align	2
	.global	kvm_emulate_hypercall
	.syntax unified
	.arm
	.fpu softvfp
	.type	kvm_emulate_hypercall, %function
kvm_emulate_hypercall:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, lr}
	mov	r4, r0
	sub	sp, sp, #8
	ldr	r0, [r0, #4]
	bl	kvm_hv_hypercall_enabled
	cmp	r0, #0
	mov	r0, r4
	bne	.L13
	bl	kvm_rax_read
	mov	r5, r0
	mov	r0, r4
	bl	kvm_rbx_read
	mov	r6, r0
	mov	r0, r4
	bl	kvm_rcx_read
	mov	r7, r0
	mov	r0, r4
	bl	kvm_rdx_read
	mov	r8, r0
	mov	r0, r4
	bl	kvm_rsi_read
	mov	r3, r8
	mov	r2, r7
	mov	r1, r6
	str	r0, [sp]
	mov	r9, r0
	mov	r0, r5
	bl	trace_kvm_hypercall
	mov	r0, r4
	bl	is_64_bit_mode
	ldr	r3, .L15
	mov	r10, r0
	ldr	r3, [r3]
	mov	r0, r4
	ldr	r3, [r3]
	blx	r3
	cmp	r0, #0
	bne	.L14
	sub	r3, r5, #128
	cmp	r3, #3
	ldrls	pc, [pc, r3, asl #2]
	b	.L5
.L7:
	.word	.L10
	.word	.L9
	.word	.L8
	.word	.L6
.L10:
	mov	r1, #0
.L4:
	mov	r0, r4
	bl	kvm_rax_write
	mov	r0, r4
	ldr	r3, [r4]
	add	r3, r3, #1
	str	r3, [r4]
	add	sp, sp, #8
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, lr}
	b	kvm_skip_emulated_instruction
.L14:
	ldr	r3, .L15+4
	ldr	r1, [r3]
	rsb	r1, r1, #0
	b	.L4
.L13:
	add	sp, sp, #8
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, lr}
	b	kvm_hv_hypercall
.L6:
	mov	r1, r6
	mov	r2, r7
	ldr	r0, [r4, #4]
	bl	kvm_pv_kick_cpu_op
	mov	r1, r7
	ldr	r0, [r4, #4]
	bl	kvm_sched_yield
	mov	r1, #0
	b	.L4
.L9:
	stm	sp, {r9, r10}
	mov	r1, r6
	mov	r3, r8
	mov	r2, r7
	ldr	r0, [r4, #4]
	bl	kvm_pv_send_ipi
	mov	r1, r0
	b	.L4
.L8:
	mov	r1, r6
	ldr	r0, [r4, #4]
	bl	kvm_sched_yield
	mov	r1, #0
	b	.L4
.L5:
	ldr	r3, .L15+8
	ldr	r1, [r3]
	rsb	r1, r1, #0
	b	.L4
.L16:
	.align	2
.L15:
	.word	kvm_x86_ops
	.word	KVM_EPERM
	.word	KVM_ENOSYS
	.size	kvm_emulate_hypercall, .-kvm_emulate_hypercall
	.comm	kvm_x86_ops,4,4
	.comm	KVM_EPERM,4,4
	.comm	KVM_ENOSYS,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
