	.file	"239717.c"
	.intel_syntax noprefix
	.text
	.section	.rodata
	.align 8
.LC0:
	.string	"failure on shm_open on shm_fd, errcode = %d\n"
	.align 8
.LC1:
	.string	"Error on ftruncate to allocate size of shared memory region"
	.text
	.globl	create_and_write_shared_memory
	.type	create_and_write_shared_memory, @function
create_and_write_shared_memory:
.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	QWORD PTR -24[rbp], rdi
	mov	QWORD PTR -32[rbp], rsi
	mov	DWORD PTR -36[rbp], edx
	mov	rax, QWORD PTR -24[rbp]
	mov	edx, 432
	mov	esi, 578
	mov	rdi, rax
	call	shm_open@PLT
	mov	DWORD PTR -12[rbp], eax
	cmp	DWORD PTR -12[rbp], 0
	jns	.L2
	call	__errno_location@PLT
	mov	eax, DWORD PTR [rax]
	mov	esi, eax
	lea	rdi, .LC0[rip]
	mov	eax, 0
	call	printf@PLT
	mov	eax, -1
	jmp	.L3
.L2:
	mov	edx, DWORD PTR -36[rbp]
	mov	eax, DWORD PTR -12[rbp]
	mov	rsi, rdx
	mov	edi, eax
	call	ftruncate@PLT
	cmp	eax, -1
	jne	.L4
	lea	rdi, .LC1[rip]
	call	puts@PLT
	mov	eax, -1
	jmp	.L3
.L4:
	mov	eax, DWORD PTR -36[rbp]
	mov	edx, DWORD PTR -12[rbp]
	mov	r9d, 0
	mov	r8d, edx
	mov	ecx, 1
	mov	edx, 3
	mov	rsi, rax
	mov	edi, 0
	call	mmap@PLT
	mov	QWORD PTR -8[rbp], rax
	mov	edx, DWORD PTR -36[rbp]
	mov	rax, QWORD PTR -8[rbp]
	mov	esi, 0
	mov	rdi, rax
	call	memset@PLT
	mov	edx, DWORD PTR -36[rbp]
	mov	rcx, QWORD PTR -32[rbp]
	mov	rax, QWORD PTR -8[rbp]
	mov	rsi, rcx
	mov	rdi, rax
	call	memcpy@PLT
	mov	edx, DWORD PTR -36[rbp]
	mov	rax, QWORD PTR -8[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	munmap@PLT
	mov	eax, DWORD PTR -12[rbp]
	mov	edi, eax
	call	close@PLT
	mov	eax, DWORD PTR -36[rbp]
.L3:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	create_and_write_shared_memory, .-create_and_write_shared_memory
	.section	.rodata
	.align 8
.LC2:
	.string	"failure on shm_open on shm_fd, error code = %d"
.LC3:
	.string	"Error on mapping"
.LC4:
	.string	"munmap failed"
	.text
	.globl	read_from_shared_memory
	.type	read_from_shared_memory, @function
read_from_shared_memory:
.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	QWORD PTR -24[rbp], rdi
	mov	QWORD PTR -32[rbp], rsi
	mov	DWORD PTR -36[rbp], edx
	mov	DWORD PTR -40[rbp], ecx
	mov	DWORD PTR -16[rbp], 0
	mov	DWORD PTR -12[rbp], 0
	mov	rax, QWORD PTR -24[rbp]
	mov	edx, 432
	mov	esi, 64
	mov	rdi, rax
	call	shm_open@PLT
	mov	DWORD PTR -16[rbp], eax
	cmp	DWORD PTR -16[rbp], 0
	jns	.L6
	call	__errno_location@PLT
	mov	eax, DWORD PTR [rax]
	mov	esi, eax
	lea	rdi, .LC2[rip]
	mov	eax, 0
	call	printf@PLT
	mov	eax, -1
	jmp	.L7
.L6:
	mov	eax, DWORD PTR -40[rbp]
	mov	edx, DWORD PTR -16[rbp]
	mov	r9d, 0
	mov	r8d, edx
	mov	ecx, 1
	mov	edx, 1
	mov	rsi, rax
	mov	edi, 0
	call	mmap@PLT
	mov	QWORD PTR -8[rbp], rax
	cmp	QWORD PTR -8[rbp], -1
	jne	.L8
	lea	rdi, .LC3[rip]
	call	puts@PLT
	mov	eax, -1
	jmp	.L7
.L8:
	mov	edx, DWORD PTR -40[rbp]
	mov	rcx, QWORD PTR -8[rbp]
	mov	rax, QWORD PTR -32[rbp]
	mov	rsi, rcx
	mov	rdi, rax
	call	memcpy@PLT
	mov	edx, DWORD PTR -40[rbp]
	mov	rax, QWORD PTR -8[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	munmap@PLT
	mov	DWORD PTR -12[rbp], eax
	cmp	DWORD PTR -12[rbp], 0
	jns	.L9
	lea	rdi, .LC4[rip]
	call	puts@PLT
	mov	eax, -1
	jmp	.L7
.L9:
	mov	eax, DWORD PTR -16[rbp]
	mov	edi, eax
	call	close@PLT
	mov	eax, DWORD PTR -40[rbp]
.L7:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	read_from_shared_memory, .-read_from_shared_memory
	.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	"239717.c"
	.text
	.section	.rodata
	.align	2
.LC0:
	.ascii	"failure on shm_open on shm_fd, errcode = %d\012\000"
	.align	2
.LC1:
	.ascii	"Error on ftruncate to allocate size of shared memor"
	.ascii	"y region\000"
	.text
	.align	2
	.global	create_and_write_shared_memory
	.syntax unified
	.arm
	.fpu softvfp
	.type	create_and_write_shared_memory, %function
create_and_write_shared_memory:
	@ 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]
	mov	r2, #432
	ldr	r1, .L5
	ldr	r0, [fp, #-16]
	bl	shm_open
	str	r0, [fp, #-12]
	ldr	r3, [fp, #-12]
	cmp	r3, #0
	bge	.L2
	bl	__errno_location
	mov	r3, r0
	ldr	r3, [r3]
	mov	r1, r3
	ldr	r0, .L5+4
	bl	printf
	mvn	r3, #0
	b	.L3
.L2:
	ldr	r3, [fp, #-24]
	mov	r1, r3
	ldr	r0, [fp, #-12]
	bl	ftruncate
	mov	r3, r0
	cmn	r3, #1
	bne	.L4
	ldr	r0, .L5+8
	bl	puts
	mvn	r3, #0
	b	.L3
.L4:
	mov	r3, #0
	str	r3, [sp, #4]
	ldr	r3, [fp, #-12]
	str	r3, [sp]
	mov	r3, #1
	mov	r2, #3
	ldr	r1, [fp, #-24]
	mov	r0, #0
	bl	mmap
	str	r0, [fp, #-8]
	ldr	r2, [fp, #-24]
	mov	r1, #0
	ldr	r0, [fp, #-8]
	bl	memset
	ldr	r2, [fp, #-24]
	ldr	r1, [fp, #-20]
	ldr	r0, [fp, #-8]
	bl	memcpy
	ldr	r1, [fp, #-24]
	ldr	r0, [fp, #-8]
	bl	munmap
	ldr	r0, [fp, #-12]
	bl	close
	ldr	r3, [fp, #-24]
.L3:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L6:
	.align	2
.L5:
	.word	578
	.word	.LC0
	.word	.LC1
	.size	create_and_write_shared_memory, .-create_and_write_shared_memory
	.section	.rodata
	.align	2
.LC2:
	.ascii	"failure on shm_open on shm_fd, error code = %d\000"
	.align	2
.LC3:
	.ascii	"Error on mapping\000"
	.align	2
.LC4:
	.ascii	"munmap failed\000"
	.text
	.align	2
	.global	read_from_shared_memory
	.syntax unified
	.arm
	.fpu softvfp
	.type	read_from_shared_memory, %function
read_from_shared_memory:
	@ args = 0, pretend = 0, frame = 32
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #40
	str	r0, [fp, #-24]
	str	r1, [fp, #-28]
	str	r2, [fp, #-32]
	str	r3, [fp, #-36]
	mov	r3, #0
	str	r3, [fp, #-16]
	mov	r3, #0
	str	r3, [fp, #-12]
	mov	r2, #432
	mov	r1, #64
	ldr	r0, [fp, #-24]
	bl	shm_open
	str	r0, [fp, #-16]
	ldr	r3, [fp, #-16]
	cmp	r3, #0
	bge	.L8
	bl	__errno_location
	mov	r3, r0
	ldr	r3, [r3]
	mov	r1, r3
	ldr	r0, .L12
	bl	printf
	mvn	r3, #0
	b	.L9
.L8:
	mov	r3, #0
	str	r3, [sp, #4]
	ldr	r3, [fp, #-16]
	str	r3, [sp]
	mov	r3, #1
	mov	r2, #1
	ldr	r1, [fp, #-36]
	mov	r0, #0
	bl	mmap
	str	r0, [fp, #-8]
	ldr	r3, [fp, #-8]
	cmn	r3, #1
	bne	.L10
	ldr	r0, .L12+4
	bl	puts
	mvn	r3, #0
	b	.L9
.L10:
	ldr	r2, [fp, #-36]
	ldr	r1, [fp, #-8]
	ldr	r0, [fp, #-28]
	bl	memcpy
	ldr	r1, [fp, #-36]
	ldr	r0, [fp, #-8]
	bl	munmap
	str	r0, [fp, #-12]
	ldr	r3, [fp, #-12]
	cmp	r3, #0
	bge	.L11
	ldr	r0, .L12+8
	bl	puts
	mvn	r3, #0
	b	.L9
.L11:
	ldr	r0, [fp, #-16]
	bl	close
	ldr	r3, [fp, #-36]
.L9:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L13:
	.align	2
.L12:
	.word	.LC2
	.word	.LC3
	.word	.LC4
	.size	read_from_shared_memory, .-read_from_shared_memory
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
