	.file	"extr_mmu.c_kvm_set_spte_handler.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	kvm_set_spte_handler, @function
kvm_set_spte_handler:
.LFB0:
	.cfi_startproc
	endbr64
	push	r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	mov	edx, esi
	xor	esi, esi
	push	r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	push	rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	push	rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	mov	rbx, rcx
	sub	rsp, 8
	.cfi_def_cfa_offset 48
	mov	ecx, DWORD PTR PAGE_SHIFT[rip]
	mov	r12d, DWORD PTR [r8]
	sal	edx, cl
	call	kvm_mips_pte_for_gpa@PLT
	test	rax, rax
	je	.L7
	mov	r13d, DWORD PTR [rax]
	mov	rbp, rax
	mov	eax, DWORD PTR [rbx]
	test	DWORD PTR KVM_MEM_LOG_DIRTY_PAGES[rip], eax
	jne	.L30
.L4:
	test	DWORD PTR KVM_MEM_READONLY[rip], eax
	jne	.L31
.L6:
	mov	rdi, rbp
	mov	esi, r12d
	call	set_pte@PLT
	mov	edi, r13d
	call	pte_present@PLT
	test	eax, eax
	jne	.L32
.L7:
	xor	eax, eax
.L1:
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	pop	rbx
	.cfi_def_cfa_offset 32
	pop	rbp
	.cfi_def_cfa_offset 24
	pop	r12
	.cfi_def_cfa_offset 16
	pop	r13
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L32:
	.cfi_restore_state
	mov	edi, r13d
	call	pte_young@PLT
	test	eax, eax
	je	.L7
	mov	edi, r12d
	call	pte_present@PLT
	test	eax, eax
	jne	.L8
.L9:
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	mov	eax, 1
	pop	rbx
	.cfi_def_cfa_offset 32
	pop	rbp
	.cfi_def_cfa_offset 24
	pop	r12
	.cfi_def_cfa_offset 16
	pop	r13
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L31:
	.cfi_restore_state
	mov	edi, r12d
	call	pte_wrprotect@PLT
	mov	r12d, eax
	jmp	.L6
	.p2align 4,,10
	.p2align 3
.L30:
	mov	edi, r13d
	call	pte_dirty@PLT
	test	rax, rax
	je	.L5
	mov	eax, DWORD PTR [rbx]
	jmp	.L4
	.p2align 4,,10
	.p2align 3
.L5:
	mov	edi, r12d
	call	pte_mkclean@PLT
	mov	r12d, eax
	jmp	.L6
	.p2align 4,,10
	.p2align 3
.L8:
	mov	edi, r12d
	call	pte_young@PLT
	test	eax, eax
	je	.L9
	mov	edi, r13d
	call	pte_pfn@PLT
	mov	edi, r12d
	mov	rbx, rax
	call	pte_pfn@PLT
	cmp	rbx, rax
	jne	.L9
	mov	edi, r13d
	call	pte_dirty@PLT
	test	rax, rax
	je	.L7
	mov	edi, r12d
	call	pte_dirty@PLT
	test	rax, rax
	sete	al
	movzx	eax, al
	jmp	.L1
	.cfi_endproc
.LFE0:
	.size	kvm_set_spte_handler, .-kvm_set_spte_handler
	.comm	PAGE_SHIFT,4,4
	.comm	KVM_MEM_READONLY,4,4
	.comm	KVM_MEM_LOG_DIRTY_PAGES,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_mmu.c_kvm_set_spte_handler.c"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	kvm_set_spte_handler, %function
kvm_set_spte_handler:
	@ args = 4, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, lr}
	mov	lr, r1
	ldr	r2, .L33
	ldr	ip, [sp, #24]
	ldr	r2, [r2]
	mov	r1, #0
	lsl	r2, lr, r2
	mov	r5, r3
	ldr	r6, [ip]
	bl	kvm_mips_pte_for_gpa
	subs	r4, r0, #0
	beq	.L7
	ldr	r2, .L33+4
	ldr	r3, [r5]
	ldr	r2, [r2]
	ldr	r7, [r4]
	tst	r3, r2
	bne	.L30
.L4:
	ldr	r2, .L33+8
	ldr	r2, [r2]
	tst	r3, r2
	bne	.L31
.L6:
	mov	r1, r6
	mov	r0, r4
	bl	set_pte
	mov	r0, r7
	bl	pte_present
	cmp	r0, #0
	bne	.L32
.L7:
	mov	r0, #0
	pop	{r4, r5, r6, r7, r8, pc}
.L32:
	mov	r0, r7
	bl	pte_young
	cmp	r0, #0
	beq	.L7
	mov	r0, r6
	bl	pte_present
	cmp	r0, #0
	bne	.L8
.L9:
	mov	r0, #1
	pop	{r4, r5, r6, r7, r8, pc}
.L31:
	mov	r0, r6
	bl	pte_wrprotect
	mov	r6, r0
	b	.L6
.L30:
	mov	r0, r7
	bl	pte_dirty
	cmp	r0, #0
	ldrne	r3, [r5]
	bne	.L4
.L5:
	mov	r0, r6
	bl	pte_mkclean
	mov	r6, r0
	b	.L6
.L8:
	mov	r0, r6
	bl	pte_young
	cmp	r0, #0
	beq	.L9
	mov	r0, r7
	bl	pte_pfn
	mov	r4, r0
	mov	r0, r6
	bl	pte_pfn
	cmp	r4, r0
	bne	.L9
	mov	r0, r7
	bl	pte_dirty
	cmp	r0, #0
	beq	.L7
	mov	r0, r6
	bl	pte_dirty
	clz	r0, r0
	lsr	r0, r0, #5
	pop	{r4, r5, r6, r7, r8, pc}
.L34:
	.align	2
.L33:
	.word	PAGE_SHIFT
	.word	KVM_MEM_LOG_DIRTY_PAGES
	.word	KVM_MEM_READONLY
	.size	kvm_set_spte_handler, .-kvm_set_spte_handler
	.comm	PAGE_SHIFT,4,4
	.comm	KVM_MEM_READONLY,4,4
	.comm	KVM_MEM_LOG_DIRTY_PAGES,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
