	.file	"extr_x86.c_kvm_vcpu_ioctl_x86_set_vcpu_events.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	kvm_vcpu_ioctl_x86_set_vcpu_events, @function
kvm_vcpu_ioctl_x86_set_vcpu_events:
.LFB0:
	.cfi_startproc
	endbr64
	mov	ecx, DWORD PTR KVM_VCPUEVENT_VALID_PAYLOAD[rip]
	mov	eax, DWORD PTR KVM_VCPUEVENT_VALID_NMI_PENDING[rip]
	push	r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	push	rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	or	eax, DWORD PTR KVM_VCPUEVENT_VALID_SIPI_VECTOR[rip]
	push	rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	mov	rbx, rsi
	mov	edx, DWORD PTR [rsi]
	mov	esi, DWORD PTR KVM_VCPUEVENT_VALID_SMM[rip]
	or	eax, DWORD PTR KVM_VCPUEVENT_VALID_SHADOW[rip]
	or	eax, esi
	or	eax, ecx
	not	eax
	and	eax, edx
	jne	.L47
	mov	rbp, rdi
	mov	r12d, eax
	test	edx, ecx
	jne	.L49
	mov	QWORD PTR 104[rbx], 0
.L46:
	cmp	QWORD PTR 112[rbx], 0
	mov	QWORD PTR 80[rbx], 0
	je	.L10
.L7:
	mov	eax, DWORD PTR 88[rbx]
	cmp	eax, 31
	jg	.L47
	cmp	eax, DWORD PTR NMI_VECTOR[rip]
	je	.L47
.L10:
	test	edx, esi
	je	.L11
	mov	eax, DWORD PTR 8[rbx]
	test	eax, eax
	je	.L50
.L12:
	mov	rax, QWORD PTR KVM_MP_STATE_INIT_RECEIVED[rip]
	cmp	QWORD PTR 0[rbp], rax
	je	.L47
.L11:
	mov	rdi, rbp
	call	process_nmi@PLT
	mov	rax, QWORD PTR 112[rbx]
	mov	QWORD PTR 88[rbp], rax
	mov	rax, QWORD PTR 104[rbx]
	mov	QWORD PTR 80[rbp], rax
	mov	eax, DWORD PTR 88[rbx]
	mov	DWORD PTR 56[rbp], eax
	mov	eax, DWORD PTR 96[rbx]
	mov	DWORD PTR 76[rbp], eax
	mov	eax, DWORD PTR 92[rbx]
	mov	DWORD PTR 72[rbp], eax
	mov	rax, QWORD PTR 80[rbx]
	mov	QWORD PTR 64[rbp], rax
	mov	eax, DWORD PTR 72[rbx]
	mov	DWORD PTR 60[rbp], eax
	mov	eax, DWORD PTR 68[rbx]
	mov	DWORD PTR 48[rbp], eax
	mov	eax, DWORD PTR 64[rbx]
	mov	DWORD PTR 44[rbp], eax
	mov	eax, DWORD PTR 60[rbx]
	mov	DWORD PTR 40[rbp], eax
	mov	eax, DWORD PTR [rbx]
	test	DWORD PTR KVM_VCPUEVENT_VALID_SHADOW[rip], eax
	je	.L13
	mov	rax, QWORD PTR kvm_x86_ops[rip]
	mov	esi, DWORD PTR 56[rbx]
	mov	rdi, rbp
	call	[QWORD PTR 8[rax]]
	mov	eax, DWORD PTR [rbx]
.L13:
	mov	edx, DWORD PTR 52[rbx]
	mov	DWORD PTR 36[rbp], edx
	test	DWORD PTR KVM_VCPUEVENT_VALID_NMI_PENDING[rip], eax
	jne	.L51
.L14:
	mov	rax, QWORD PTR kvm_x86_ops[rip]
	mov	esi, DWORD PTR 44[rbx]
	mov	rdi, rbp
	call	[QWORD PTR [rax]]
	mov	eax, DWORD PTR [rbx]
	test	DWORD PTR KVM_VCPUEVENT_VALID_SIPI_VECTOR[rip], eax
	jne	.L52
.L15:
	test	DWORD PTR KVM_VCPUEVENT_VALID_SMM[rip], eax
	je	.L18
	mov	ecx, DWORD PTR 8[rbp]
	mov	eax, DWORD PTR HF_SMM_MASK[rip]
	xor	esi, esi
	mov	edx, DWORD PTR 8[rbx]
	test	ecx, eax
	setne	sil
	cmp	esi, edx
	je	.L19
	mov	esi, ecx
	mov	rdi, rbp
	or	esi, eax
	not	eax
	and	eax, ecx
	test	edx, edx
	cmovne	eax, esi
	mov	DWORD PTR 8[rbp], eax
	call	kvm_smm_changed@PLT
	mov	edx, DWORD PTR 8[rbx]
.L19:
	mov	rax, QWORD PTR 32[rbx]
	mov	QWORD PTR 24[rbp], rax
	test	edx, edx
	je	.L18
	cmp	QWORD PTR 24[rbx], 0
	mov	eax, DWORD PTR 8[rbp]
	mov	edx, DWORD PTR HF_SMM_INSIDE_NMI_MASK[rip]
	jne	.L53
	not	edx
	and	eax, edx
.L24:
	mov	DWORD PTR 8[rbp], eax
	mov	rdi, rbp
	call	lapic_in_kernel@PLT
	test	rax, rax
	je	.L18
	cmp	QWORD PTR 16[rbx], 0
	mov	rsi, QWORD PTR 16[rbp]
	mov	edi, DWORD PTR KVM_APIC_INIT[rip]
	je	.L25
	call	set_bit@PLT
.L18:
	mov	edi, DWORD PTR KVM_REQ_EVENT[rip]
	mov	rsi, rbp
	call	kvm_make_request@PLT
	mov	eax, r12d
	pop	rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	pop	rbp
	.cfi_def_cfa_offset 16
	pop	r12
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L47:
	.cfi_restore_state
	mov	r12d, DWORD PTR EINVAL[rip]
	pop	rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	pop	rbp
	.cfi_def_cfa_offset 16
	neg	r12d
	mov	eax, r12d
	pop	r12
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L49:
	.cfi_restore_state
	mov	rax, QWORD PTR 96[rdi]
	mov	ecx, DWORD PTR [rax]
	test	ecx, ecx
	je	.L47
	cmp	QWORD PTR 104[rbx], 0
	je	.L46
	mov	QWORD PTR 112[rbx], 0
	jmp	.L7
	.p2align 4,,10
	.p2align 3
.L51:
	mov	eax, DWORD PTR 48[rbx]
	mov	DWORD PTR 32[rbp], eax
	jmp	.L14
	.p2align 4,,10
	.p2align 3
.L50:
	cmp	QWORD PTR 32[rbx], 0
	je	.L11
	jmp	.L12
	.p2align 4,,10
	.p2align 3
.L52:
	mov	rdi, rbp
	call	lapic_in_kernel@PLT
	test	rax, rax
	je	.L45
	mov	rax, QWORD PTR 16[rbp]
	mov	edx, DWORD PTR 40[rbx]
	mov	DWORD PTR 4[rax], edx
.L45:
	mov	eax, DWORD PTR [rbx]
	jmp	.L15
	.p2align 4,,10
	.p2align 3
.L53:
	or	eax, edx
	jmp	.L24
	.p2align 4,,10
	.p2align 3
.L25:
	call	clear_bit@PLT
	jmp	.L18
	.cfi_endproc
.LFE0:
	.size	kvm_vcpu_ioctl_x86_set_vcpu_events, .-kvm_vcpu_ioctl_x86_set_vcpu_events
	.comm	kvm_x86_ops,8,8
	.comm	NMI_VECTOR,4,4
	.comm	KVM_VCPUEVENT_VALID_SMM,4,4
	.comm	KVM_VCPUEVENT_VALID_SIPI_VECTOR,4,4
	.comm	KVM_VCPUEVENT_VALID_SHADOW,4,4
	.comm	KVM_VCPUEVENT_VALID_PAYLOAD,4,4
	.comm	KVM_VCPUEVENT_VALID_NMI_PENDING,4,4
	.comm	KVM_REQ_EVENT,4,4
	.comm	KVM_MP_STATE_INIT_RECEIVED,8,8
	.comm	KVM_APIC_INIT,4,4
	.comm	HF_SMM_MASK,4,4
	.comm	HF_SMM_INSIDE_NMI_MASK,4,4
	.comm	EINVAL,4,4
	.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_vcpu_ioctl_x86_set_vcpu_events.c"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	kvm_vcpu_ioctl_x86_set_vcpu_events, %function
kvm_vcpu_ioctl_x86_set_vcpu_events:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, lr}
	mov	r5, r1
	ldr	r7, .L57
	ldr	r8, .L57+4
	ldr	r9, .L57+8
	ldr	r2, [r8]
	ldr	r4, [r7]
	ldr	r6, .L57+12
	ldr	r1, [r9]
	ldr	r3, .L57+16
	orr	r4, r4, r2
	ldr	r2, [r6]
	orr	r4, r4, r1
	ldr	r1, [r3]
	orr	r4, r4, r2
	ldr	r3, [r5]
	orr	r4, r4, r1
	bics	r4, r3, r4
	bne	.L52
	tst	r3, r1
	mov	r10, r0
	bne	.L54
	str	r4, [r5, #72]
.L51:
	ldr	r1, [r5, #76]
	str	r4, [r5, #56]
	cmp	r1, #0
	beq	.L10
.L7:
	ldr	r1, [r5, #60]
	cmp	r1, #31
	bgt	.L52
	ldr	r0, .L57+20
	ldr	r0, [r0]
	cmp	r1, r0
	beq	.L52
.L10:
	tst	r3, r2
	beq	.L11
	ldr	r3, [r5, #4]
	cmp	r3, #0
	beq	.L55
.L12:
	ldr	r3, .L57+24
	ldr	r2, [r10]
	ldr	r3, [r3]
	cmp	r2, r3
	beq	.L52
.L11:
	mov	r0, r10
	bl	process_nmi
	ldr	r3, [r5]
	ldr	r2, [r9]
	ldr	r1, [r5, #76]
	tst	r3, r2
	ldr	r2, [r5, #72]
	str	r1, [r10, #60]
	ldr	r1, [r5, #60]
	str	r2, [r10, #56]
	ldr	r2, [r5, #68]
	str	r1, [r10, #36]
	ldr	r1, [r5, #64]
	str	r2, [r10, #52]
	ldr	r2, [r5, #56]
	str	r1, [r10, #48]
	ldr	r1, [r5, #52]
	str	r2, [r10, #44]
	ldr	r2, [r5, #48]
	str	r1, [r10, #40]
	ldr	r1, [r5, #44]
	str	r2, [r10, #32]
	ldr	r2, [r5, #40]
	ldr	r9, .L57+28
	str	r1, [r10, #28]
	str	r2, [r10, #24]
	bne	.L49
.L13:
	ldr	r1, [r7]
	ldr	r2, [r5, #32]
	tst	r3, r1
	ldrne	r3, [r5, #28]
	str	r2, [r10, #20]
	strne	r3, [r10, #16]
	ldr	r3, [r9]
	mov	r0, r10
	ldr	r3, [r3]
	ldr	r1, [r5, #24]
	blx	r3
	ldr	r2, [r8]
	ldr	r3, [r5]
	tst	r3, r2
	bne	.L56
.L15:
	ldr	r2, [r6]
	tst	r3, r2
	beq	.L18
	ldr	r3, .L57+32
	ldr	r2, [r10, #4]
	ldr	r1, [r3]
	ldr	r3, [r5, #4]
	tst	r2, r1
	movne	r0, #1
	moveq	r0, #0
	cmp	r0, r3
	beq	.L19
	cmp	r3, #0
	orrne	r2, r2, r1
	biceq	r2, r2, r1
	mov	r0, r10
	str	r2, [r10, #4]
	bl	kvm_smm_changed
	ldr	r3, [r5, #4]
.L19:
	ldr	r2, [r5, #16]
	cmp	r3, #0
	str	r2, [r10, #12]
	beq	.L18
	ldr	r2, [r5, #12]
	ldr	r3, .L57+36
	cmp	r2, #0
	ldr	r2, [r3]
	ldr	r3, [r10, #4]
	mov	r0, r10
	orrne	r3, r3, r2
	biceq	r3, r3, r2
	str	r3, [r10, #4]
	bl	lapic_in_kernel
	cmp	r0, #0
	beq	.L18
	ldr	r2, [r5, #8]
	ldr	r3, .L57+40
	cmp	r2, #0
	ldr	r0, [r3]
	ldr	r1, [r10, #8]
	beq	.L25
	bl	set_bit
.L18:
	ldr	r3, .L57+44
	mov	r1, r10
	ldr	r0, [r3]
	bl	kvm_make_request
	mov	r0, r4
	pop	{r4, r5, r6, r7, r8, r9, r10, pc}
.L52:
	ldr	r3, .L57+48
	ldr	r4, [r3]
	rsb	r4, r4, #0
	mov	r0, r4
	pop	{r4, r5, r6, r7, r8, r9, r10, pc}
.L54:
	ldr	r1, [r0, #64]
	ldr	r1, [r1]
	cmp	r1, #0
	beq	.L52
	ldr	r1, [r5, #72]
	cmp	r1, #0
	strne	r4, [r5, #76]
	bne	.L7
	b	.L51
.L49:
	ldr	r3, [r9]
	mov	r0, r10
	ldr	r3, [r3, #4]
	ldr	r1, [r5, #36]
	blx	r3
	ldr	r3, [r5]
	b	.L13
.L55:
	ldr	r3, [r5, #16]
	cmp	r3, #0
	beq	.L11
	b	.L12
.L56:
	mov	r0, r10
	bl	lapic_in_kernel
	cmp	r0, #0
	ldrne	r2, [r10, #8]
	ldrne	r1, [r5, #20]
	ldrne	r3, [r5]
	ldreq	r3, [r5]
	strne	r1, [r2, #4]
	b	.L15
.L25:
	bl	clear_bit
	b	.L18
.L58:
	.align	2
.L57:
	.word	KVM_VCPUEVENT_VALID_NMI_PENDING
	.word	KVM_VCPUEVENT_VALID_SIPI_VECTOR
	.word	KVM_VCPUEVENT_VALID_SHADOW
	.word	KVM_VCPUEVENT_VALID_SMM
	.word	KVM_VCPUEVENT_VALID_PAYLOAD
	.word	NMI_VECTOR
	.word	KVM_MP_STATE_INIT_RECEIVED
	.word	kvm_x86_ops
	.word	HF_SMM_MASK
	.word	HF_SMM_INSIDE_NMI_MASK
	.word	KVM_APIC_INIT
	.word	KVM_REQ_EVENT
	.word	EINVAL
	.size	kvm_vcpu_ioctl_x86_set_vcpu_events, .-kvm_vcpu_ioctl_x86_set_vcpu_events
	.comm	kvm_x86_ops,4,4
	.comm	NMI_VECTOR,4,4
	.comm	KVM_VCPUEVENT_VALID_SMM,4,4
	.comm	KVM_VCPUEVENT_VALID_SIPI_VECTOR,4,4
	.comm	KVM_VCPUEVENT_VALID_SHADOW,4,4
	.comm	KVM_VCPUEVENT_VALID_PAYLOAD,4,4
	.comm	KVM_VCPUEVENT_VALID_NMI_PENDING,4,4
	.comm	KVM_REQ_EVENT,4,4
	.comm	KVM_MP_STATE_INIT_RECEIVED,4,4
	.comm	KVM_APIC_INIT,4,4
	.comm	HF_SMM_MASK,4,4
	.comm	HF_SMM_INSIDE_NMI_MASK,4,4
	.comm	EINVAL,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
