	.file	"extr_x86.c_emulator_read_write.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	emulator_read_write, @function
emulator_read_write:
.LFB0:
	.cfi_startproc
	endbr64
	push	r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	mov	r15, r8
	push	r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	mov	r14, rdx
	push	r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	mov	r13d, ecx
	push	r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	mov	r12, rsi
	push	rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	push	rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	mov	rbx, r9
	sub	rsp, 24
	.cfi_def_cfa_offset 80
	call	emul_to_vcpu@PLT
	mov	rbp, rax
	mov	rax, QWORD PTR 16[rbx]
	test	rax, rax
	je	.L2
	mov	edx, r13d
	mov	rsi, r14
	mov	rdi, rbp
	call	rax
	test	rax, rax
	jne	.L16
.L2:
	mov	eax, r13d
	mov	rdx, QWORD PTR PAGE_MASK[rip]
	mov	QWORD PTR 40[rbp], 0
	lea	rax, -1[r12+rax]
	xor	rax, r12
	test	rax, rdx
	je	.L4
	mov	eax, r12d
	not	edx
	mov	r9, rbx
	mov	r8, rbp
	neg	eax
	mov	rcx, r15
	mov	rsi, r14
	mov	rdi, r12
	and	edx, eax
	mov	DWORD PTR 12[rsp], edx
	call	emulator_read_write_onepage@PLT
	cmp	DWORD PTR X86EMUL_CONTINUE[rip], eax
	je	.L17
.L1:
	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
	ret
	.p2align 4,,10
	.p2align 3
.L17:
	.cfi_restore_state
	movsx	rax, DWORD PTR 12[rsp]
	add	r12, rax
	add	r14, rax
	sub	r13d, eax
.L4:
	mov	r9, rbx
	mov	r8, rbp
	mov	rcx, r15
	mov	edx, r13d
	mov	rsi, r14
	mov	rdi, r12
	call	emulator_read_write_onepage@PLT
	cmp	DWORD PTR X86EMUL_CONTINUE[rip], eax
	jne	.L1
	cmp	QWORD PTR 40[rbp], 0
	je	.L1
	mov	rax, QWORD PTR 24[rbp]
	mov	r15, QWORD PTR 8[rbp]
	mov	edi, 8
	mov	r12d, DWORD PTR 4[rax]
	mov	esi, DWORD PTR [rax]
	mov	DWORD PTR 0[rbp], 1
	mov	QWORD PTR 32[rbp], 0
	call	min@PLT
	mov	edx, DWORD PTR 8[rbx]
	mov	ecx, r13d
	mov	esi, r12d
	mov	DWORD PTR 8[r15], eax
	mov	rax, QWORD PTR 8[rbp]
	mov	rdi, rbp
	mov	DWORD PTR 16[rbp], edx
	mov	DWORD PTR 4[rax], edx
	mov	edx, DWORD PTR KVM_EXIT_MMIO[rip]
	mov	DWORD PTR [rax], r12d
	mov	DWORD PTR 12[rax], edx
	mov	rax, QWORD PTR [rbx]
	add	rsp, 24
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	mov	rdx, r14
	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	rax
	.p2align 4,,10
	.p2align 3
.L16:
	.cfi_restore_state
	mov	eax, DWORD PTR X86EMUL_CONTINUE[rip]
	add	rsp, 24
	.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
	ret
	.cfi_endproc
.LFE0:
	.size	emulator_read_write, .-emulator_read_write
	.comm	X86EMUL_MODE_PROT64,8,8
	.comm	X86EMUL_CONTINUE,4,4
	.comm	PAGE_MASK,8,8
	.comm	KVM_EXIT_MMIO,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_emulator_read_write.c"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	emulator_read_write, %function
emulator_read_write:
	@ args = 8, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	sub	sp, sp, #12
	mov	r6, r3
	ldr	r8, [sp, #52]
	mov	r4, r1
	mov	r7, r2
	ldr	r10, [sp, #48]
	bl	emul_to_vcpu
	ldr	r3, [r8, #8]
	mov	r5, r0
	cmp	r3, #0
	beq	.L2
	mov	r2, r6
	mov	r1, r7
	blx	r3
	cmp	r0, #0
	bne	.L19
.L2:
	mov	r1, #0
	ldr	r2, .L20
	sub	r3, r4, #1
	ldr	r2, [r2]
	add	r3, r3, r6
	eor	r3, r3, r4
	tst	r3, r2
	str	r1, [r5, #20]
	bne	.L16
	ldr	r9, .L20+4
.L4:
	mov	r3, r10
	mov	r0, r4
	mov	r2, r6
	mov	r1, r7
	stm	sp, {r5, r8}
	bl	emulator_read_write_onepage
	ldr	r3, [r9]
	cmp	r3, r0
	bne	.L1
	ldr	r3, [r5, #20]
	cmp	r3, #0
	beq	.L1
	mov	ip, #1
	mov	r2, #0
	ldr	r3, [r5, #12]
	mov	r0, #8
	ldm	r3, {r1, r4}
	str	ip, [r5]
	str	r2, [r5, #16]
	ldr	r9, [r5, #4]
	bl	min
	ldr	r3, .L20+8
	ldr	ip, [r8, #4]
	ldr	r1, [r3]
	str	r0, [r9, #8]
	ldr	lr, [r8]
	ldr	r0, [r5, #4]
	str	ip, [r5, #8]
	mov	r3, r6
	str	r1, [r0, #12]
	str	ip, [r0, #4]
	str	r4, [r0]
	mov	r2, r7
	mov	r1, r4
	mov	r0, r5
	mov	ip, lr
	add	sp, sp, #12
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	bx	ip
.L16:
	rsb	fp, r4, #0
	bic	fp, fp, r2
	mov	r3, r10
	mov	r2, fp
	mov	r1, r7
	mov	r0, r4
	stm	sp, {r5, r8}
	bl	emulator_read_write_onepage
	ldr	r9, .L20+4
	ldr	r3, [r9]
	cmp	r3, r0
	bne	.L1
	add	r4, r4, fp
	add	r7, r7, fp
	sub	r6, r6, fp
	b	.L4
.L19:
	ldr	r3, .L20+4
	ldr	r0, [r3]
.L1:
	add	sp, sp, #12
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L21:
	.align	2
.L20:
	.word	PAGE_MASK
	.word	X86EMUL_CONTINUE
	.word	KVM_EXIT_MMIO
	.size	emulator_read_write, .-emulator_read_write
	.comm	X86EMUL_MODE_PROT64,4,4
	.comm	X86EMUL_CONTINUE,4,4
	.comm	PAGE_MASK,4,4
	.comm	KVM_EXIT_MMIO,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
