	.file	"345517.c"
	.intel_syntax noprefix
	.text
	.globl	page_size
	.bss
	.align 4
	.type	page_size, @object
	.size	page_size, 4
page_size:
	.zero	4
	.globl	mem_fd
	.data
	.align 4
	.type	mem_fd, @object
	.size	mem_fd, 4
mem_fd:
	.long	-1
	.text
	.globl	e_read
	.type	e_read, @function
e_read:
.LFB6:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 48
	mov	DWORD PTR -36[rbp], edi
	mov	QWORD PTR -48[rbp], rsi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	lea	rdx, -24[rbp]
	lea	rcx, -16[rbp]
	mov	eax, DWORD PTR -36[rbp]
	mov	rsi, rcx
	mov	edi, eax
	call	e_map
	mov	DWORD PTR -20[rbp], eax
	mov	rax, QWORD PTR -16[rbp]
	mov	edx, DWORD PTR -24[rbp]
	mov	edx, edx
	add	rax, rdx
	mov	edx, DWORD PTR [rax]
	mov	rax, QWORD PTR -48[rbp]
	mov	DWORD PTR [rax], edx
	mov	rax, QWORD PTR -16[rbp]
	mov	rdi, rax
	call	e_unmap
	mov	eax, 0
	mov	rcx, QWORD PTR -8[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L3
	call	__stack_chk_fail@PLT
.L3:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	e_read, .-e_read
	.globl	e_write
	.type	e_write, @function
e_write:
.LFB7:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 48
	mov	DWORD PTR -36[rbp], edi
	mov	DWORD PTR -40[rbp], esi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	lea	rdx, -24[rbp]
	lea	rcx, -16[rbp]
	mov	eax, DWORD PTR -36[rbp]
	mov	rsi, rcx
	mov	edi, eax
	call	e_map
	mov	DWORD PTR -20[rbp], eax
	mov	rax, QWORD PTR -16[rbp]
	mov	edx, DWORD PTR -24[rbp]
	mov	edx, edx
	add	rdx, rax
	mov	eax, DWORD PTR -40[rbp]
	mov	DWORD PTR [rdx], eax
	mov	rax, QWORD PTR -16[rbp]
	mov	rdi, rax
	call	e_unmap
	mov	eax, 0
	mov	rcx, QWORD PTR -8[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L6
	call	__stack_chk_fail@PLT
.L6:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	e_write, .-e_write
	.section	.rodata
.LC0:
	.string	"/dev/epiphany"
.LC1:
	.string	"f_map"
	.text
	.globl	e_map
	.type	e_map, @function
e_map:
.LFB8:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 48
	mov	DWORD PTR -20[rbp], edi
	mov	QWORD PTR -32[rbp], rsi
	mov	QWORD PTR -40[rbp], rdx
	mov	eax, DWORD PTR page_size[rip]
	test	eax, eax
	jne	.L8
	mov	edi, 30
	call	sysconf@PLT
	mov	DWORD PTR page_size[rip], eax
.L8:
	mov	eax, DWORD PTR mem_fd[rip]
	test	eax, eax
	jg	.L9
	mov	esi, 2
	lea	rdi, .LC0[rip]
	mov	eax, 0
	call	open@PLT
	mov	DWORD PTR mem_fd[rip], eax
	mov	eax, DWORD PTR mem_fd[rip]
	test	eax, eax
	jg	.L9
	lea	rdi, .LC1[rip]
	call	perror@PLT
	mov	eax, -1
	jmp	.L10
.L9:
	mov	eax, DWORD PTR page_size[rip]
	neg	eax
	and	eax, DWORD PTR -20[rbp]
	mov	DWORD PTR -4[rbp], eax
	cmp	QWORD PTR -40[rbp], 0
	je	.L11
	mov	eax, DWORD PTR -20[rbp]
	sub	eax, DWORD PTR -4[rbp]
	mov	edx, eax
	mov	rax, QWORD PTR -40[rbp]
	mov	DWORD PTR [rax], edx
.L11:
	mov	edx, DWORD PTR -4[rbp]
	mov	eax, DWORD PTR mem_fd[rip]
	mov	ecx, DWORD PTR page_size[rip]
	mov	esi, ecx
	mov	r9, rdx
	mov	r8d, eax
	mov	ecx, 1
	mov	edx, 3
	mov	edi, 0
	call	mmap@PLT
	mov	rdx, QWORD PTR -32[rbp]
	mov	QWORD PTR [rdx], rax
	mov	rax, QWORD PTR -32[rbp]
	mov	rax, QWORD PTR [rax]
	cmp	rax, -1
	je	.L12
	mov	rax, QWORD PTR -32[rbp]
	mov	rax, QWORD PTR [rax]
	test	rax, rax
	jne	.L13
.L12:
	mov	eax, -2
	jmp	.L10
.L13:
	mov	eax, 0
.L10:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.size	e_map, .-e_map
	.globl	e_unmap
	.type	e_unmap, @function
e_unmap:
.LFB9:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 16
	mov	QWORD PTR -8[rbp], rdi
	cmp	QWORD PTR -8[rbp], 0
	je	.L16
	mov	eax, DWORD PTR page_size[rip]
	test	eax, eax
	je	.L16
	mov	eax, DWORD PTR page_size[rip]
	mov	edx, eax
	mov	rax, QWORD PTR -8[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	munmap@PLT
.L16:
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE9:
	.size	e_unmap, .-e_unmap
	.ident	"GCC: (Ubuntu 10.5.0-1ubuntu1~20.04) 10.5.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, 6
	.eabi_attribute 34, 0
	.eabi_attribute 18, 4
	.file	"345517.c"
	.text
	.global	page_size
	.bss
	.align	2
	.type	page_size, %object
	.size	page_size, 4
page_size:
	.space	4
	.global	mem_fd
	.data
	.align	2
	.type	mem_fd, %object
	.size	mem_fd, 4
mem_fd:
	.word	-1
	.section	.rodata
	.align	2
.LC0:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	e_read
	.syntax unified
	.arm
	.fpu softvfp
	.type	e_read, %function
e_read:
	@ args = 0, pretend = 0, frame = 24
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #24
	str	r0, [fp, #-24]
	str	r1, [fp, #-28]
	ldr	r3, .L4
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	sub	r2, fp, #20
	sub	r3, fp, #16
	mov	r1, r3
	ldr	r0, [fp, #-24]
	bl	e_map
	str	r0, [fp, #-12]
	ldr	r2, [fp, #-16]
	ldr	r3, [fp, #-20]
	add	r3, r2, r3
	ldr	r2, [r3]
	ldr	r3, [fp, #-28]
	str	r2, [r3]
	ldr	r3, [fp, #-16]
	mov	r0, r3
	bl	e_unmap
	mov	r3, #0
	ldr	r2, .L4
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L3
	bl	__stack_chk_fail
.L3:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L5:
	.align	2
.L4:
	.word	.LC0
	.size	e_read, .-e_read
	.section	.rodata
	.align	2
.LC1:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	e_write
	.syntax unified
	.arm
	.fpu softvfp
	.type	e_write, %function
e_write:
	@ args = 0, pretend = 0, frame = 24
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #24
	str	r0, [fp, #-24]
	str	r1, [fp, #-28]
	ldr	r3, .L9
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	sub	r2, fp, #20
	sub	r3, fp, #16
	mov	r1, r3
	ldr	r0, [fp, #-24]
	bl	e_map
	str	r0, [fp, #-12]
	ldr	r2, [fp, #-16]
	ldr	r3, [fp, #-20]
	add	r3, r2, r3
	ldr	r2, [fp, #-28]
	str	r2, [r3]
	ldr	r3, [fp, #-16]
	mov	r0, r3
	bl	e_unmap
	mov	r3, #0
	ldr	r2, .L9
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L8
	bl	__stack_chk_fail
.L8:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L10:
	.align	2
.L9:
	.word	.LC1
	.size	e_write, .-e_write
	.section	.rodata
	.align	2
.LC2:
	.ascii	"/dev/epiphany\000"
	.align	2
.LC3:
	.ascii	"f_map\000"
	.text
	.align	2
	.global	e_map
	.syntax unified
	.arm
	.fpu softvfp
	.type	e_map, %function
e_map:
	@ args = 0, pretend = 0, frame = 24
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #32
	str	r0, [fp, #-16]
	str	r1, [fp, #-20]
	str	r2, [fp, #-24]
	ldr	r3, .L18
	ldr	r3, [r3]
	cmp	r3, #0
	bne	.L12
	mov	r0, #30
	bl	sysconf
	mov	r3, r0
	mov	r2, r3
	ldr	r3, .L18
	str	r2, [r3]
.L12:
	ldr	r3, .L18+4
	ldr	r3, [r3]
	cmp	r3, #0
	bgt	.L13
	mov	r1, #2
	ldr	r0, .L18+8
	bl	open
	mov	r3, r0
	ldr	r2, .L18+4
	str	r3, [r2]
	ldr	r3, .L18+4
	ldr	r3, [r3]
	cmp	r3, #0
	bgt	.L13
	ldr	r0, .L18+12
	bl	perror
	mvn	r3, #0
	b	.L14
.L13:
	ldr	r3, .L18
	ldr	r3, [r3]
	rsb	r3, r3, #0
	ldr	r2, [fp, #-16]
	and	r3, r3, r2
	str	r3, [fp, #-8]
	ldr	r3, [fp, #-24]
	cmp	r3, #0
	beq	.L15
	ldr	r2, [fp, #-16]
	ldr	r3, [fp, #-8]
	sub	r2, r2, r3
	ldr	r3, [fp, #-24]
	str	r2, [r3]
.L15:
	ldr	r3, .L18
	ldr	r1, [r3]
	ldr	r3, .L18+4
	ldr	r3, [r3]
	ldr	r2, [fp, #-8]
	str	r2, [sp, #4]
	str	r3, [sp]
	mov	r3, #1
	mov	r2, #3
	mov	r0, #0
	bl	mmap
	mov	r2, r0
	ldr	r3, [fp, #-20]
	str	r2, [r3]
	ldr	r3, [fp, #-20]
	ldr	r3, [r3]
	cmn	r3, #1
	beq	.L16
	ldr	r3, [fp, #-20]
	ldr	r3, [r3]
	cmp	r3, #0
	bne	.L17
.L16:
	mvn	r3, #1
	b	.L14
.L17:
	mov	r3, #0
.L14:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L19:
	.align	2
.L18:
	.word	page_size
	.word	mem_fd
	.word	.LC2
	.word	.LC3
	.size	e_map, .-e_map
	.align	2
	.global	e_unmap
	.syntax unified
	.arm
	.fpu softvfp
	.type	e_unmap, %function
e_unmap:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #8
	str	r0, [fp, #-8]
	ldr	r3, [fp, #-8]
	cmp	r3, #0
	beq	.L22
	ldr	r3, .L23
	ldr	r3, [r3]
	cmp	r3, #0
	beq	.L22
	ldr	r3, .L23
	ldr	r3, [r3]
	mov	r1, r3
	ldr	r0, [fp, #-8]
	bl	munmap
.L22:
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L24:
	.align	2
.L23:
	.word	page_size
	.size	e_unmap, .-e_unmap
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
