	.file	"31388070.c"
	.intel_syntax noprefix
	.text
	.globl	data
	.bss
	.align 8
	.type	data, @object
	.size	data, 8
data:
	.zero	8
	.globl	reader_pid
	.align 4
	.type	reader_pid, @object
	.size	reader_pid, 4
reader_pid:
	.zero	4
	.section	.rodata
.LC0:
	.string	"ERROR: %s\n"
	.text
	.globl	die
	.type	die, @function
die:
.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, 16
	mov	DWORD PTR -4[rbp], edi
	mov	QWORD PTR -16[rbp], rsi
	mov	rax, QWORD PTR -16[rbp]
	mov	rsi, rax
	lea	rdi, .LC0[rip]
	mov	eax, 0
	call	printf@PLT
	mov	eax, DWORD PTR -4[rbp]
	mov	edi, eax
	call	exit@PLT
	.cfi_endproc
.LFE6:
	.size	die, .-die
	.section	.rodata
.LC1:
	.string	"/shared_mem_test"
.LC2:
	.string	"Failed to open shared object"
	.align 8
.LC3:
	.string	"Failed to check shared object size"
	.align 8
.LC4:
	.string	"ftruncate failed with code %d\n"
.LC5:
	.string	"Shared object size: %lld\n"
.LC6:
	.string	"Failed to map shared object"
.LC7:
	.string	"q"
.LC8:
	.string	"munmap failed"
.LC9:
	.string	"shm_unlink failed"
	.text
	.globl	main
	.type	main, @function
main:
.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, 192
	mov	DWORD PTR -180[rbp], edi
	mov	QWORD PTR -192[rbp], rsi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	rdx, QWORD PTR -192[rbp]
	mov	eax, DWORD PTR -180[rbp]
	mov	rsi, rdx
	mov	edi, eax
	mov	eax, 0
	call	setup@PLT
	mov	edx, 511
	mov	esi, 66
	lea	rdi, .LC1[rip]
	call	shm_open@PLT
	mov	DWORD PTR -164[rbp], eax
	cmp	DWORD PTR -164[rbp], -1
	jne	.L3
	lea	rsi, .LC2[rip]
	mov	edi, 1
	call	die
.L3:
	lea	rdx, -160[rbp]
	mov	eax, DWORD PTR -164[rbp]
	mov	rsi, rdx
	mov	edi, eax
	call	fstat@PLT
	cmp	eax, -1
	jne	.L4
	lea	rsi, .LC3[rip]
	mov	edi, 2
	call	die
.L4:
	mov	rax, QWORD PTR -112[rbp]
	test	rax, rax
	jne	.L5
	mov	eax, DWORD PTR -164[rbp]
	mov	esi, 255
	mov	edi, eax
	call	ftruncate@PLT
	cmp	eax, -1
	jne	.L6
	call	__errno_location@PLT
	mov	eax, DWORD PTR [rax]
	mov	esi, eax
	lea	rdi, .LC4[rip]
	mov	eax, 0
	call	printf@PLT
.L6:
	lea	rdx, -160[rbp]
	mov	eax, DWORD PTR -164[rbp]
	mov	rsi, rdx
	mov	edi, eax
	call	fstat@PLT
	cmp	eax, -1
	jne	.L5
	lea	rsi, .LC3[rip]
	mov	edi, 2
	call	die
.L5:
	mov	rax, QWORD PTR -112[rbp]
	mov	rsi, rax
	lea	rdi, .LC5[rip]
	mov	eax, 0
	call	printf@PLT
	mov	eax, DWORD PTR -164[rbp]
	mov	r9d, 0
	mov	r8d, eax
	mov	ecx, 1
	mov	edx, 3
	mov	esi, 255
	mov	edi, 0
	call	mmap@PLT
	mov	QWORD PTR data[rip], rax
	mov	eax, DWORD PTR -164[rbp]
	mov	edi, eax
	call	close@PLT
	mov	rax, QWORD PTR data[rip]
	cmp	rax, -1
	jne	.L10
	lea	rsi, .LC6[rip]
	mov	edi, 3
	call	die
.L10:
	mov	edx, DWORD PTR reader_pid[rip]
	mov	rax, QWORD PTR data[rip]
	mov	esi, edx
	mov	rdi, rax
	mov	eax, 0
	call	do_job@PLT
	mov	rax, QWORD PTR data[rip]
	lea	rsi, .LC7[rip]
	mov	rdi, rax
	call	strcmp@PLT
	test	eax, eax
	je	.L16
	jmp	.L10
.L16:
	nop
	mov	rax, QWORD PTR data[rip]
	mov	esi, 255
	mov	rdi, rax
	call	munmap@PLT
	test	eax, eax
	je	.L11
	lea	rsi, .LC8[rip]
	mov	edi, 4
	call	die
.L11:
	lea	rdi, .LC1[rip]
	call	shm_unlink@PLT
	cmp	eax, -1
	jne	.L12
	call	__errno_location@PLT
	mov	eax, DWORD PTR [rax]
	cmp	eax, 2
	je	.L12
	lea	rsi, .LC9[rip]
	mov	edi, 5
	call	die
.L12:
	mov	eax, 0
	mov	rcx, QWORD PTR -8[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L14
	call	__stack_chk_fail@PLT
.L14:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	main, .-main
	.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	"31388070.c"
	.text
	.comm	data,4,4
	.comm	reader_pid,4,4
	.section	.rodata
	.align	2
.LC0:
	.ascii	"ERROR: %s\012\000"
	.text
	.align	2
	.global	die
	.syntax unified
	.arm
	.fpu softvfp
	.type	die, %function
die:
	@ 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]
	str	r1, [fp, #-12]
	ldr	r1, [fp, #-12]
	ldr	r0, .L2
	bl	printf
	ldr	r0, [fp, #-8]
	bl	exit
.L3:
	.align	2
.L2:
	.word	.LC0
	.size	die, .-die
	.section	.rodata
	.align	2
.LC1:
	.ascii	"/shared_mem_test\000"
	.align	2
.LC2:
	.ascii	"Failed to open shared object\000"
	.align	2
.LC3:
	.ascii	"Failed to check shared object size\000"
	.align	2
.LC4:
	.ascii	"ftruncate failed with code %d\012\000"
	.align	2
.LC5:
	.ascii	"Shared object size: %lld\012\000"
	.align	2
.LC6:
	.ascii	"Failed to map shared object\000"
	.align	2
.LC7:
	.ascii	"q\000"
	.align	2
.LC8:
	.ascii	"munmap failed\000"
	.align	2
.LC9:
	.ascii	"shm_unlink failed\000"
	.align	2
.LC10:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 112
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #120
	str	r0, [fp, #-112]
	str	r1, [fp, #-116]
	ldr	r3, .L19
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	ldr	r1, [fp, #-116]
	ldr	r0, [fp, #-112]
	bl	setup
	ldr	r2, .L19+4
	mov	r1, #66
	ldr	r0, .L19+8
	bl	shm_open
	str	r0, [fp, #-104]
	ldr	r3, [fp, #-104]
	cmn	r3, #1
	bne	.L5
	ldr	r1, .L19+12
	mov	r0, #1
	bl	die
.L5:
	sub	r3, fp, #100
	mov	r1, r3
	ldr	r0, [fp, #-104]
	bl	fstat
	mov	r3, r0
	cmn	r3, #1
	bne	.L6
	ldr	r1, .L19+16
	mov	r0, #2
	bl	die
.L6:
	ldr	r3, [fp, #-56]
	cmp	r3, #0
	bne	.L7
	mov	r1, #255
	ldr	r0, [fp, #-104]
	bl	ftruncate
	mov	r3, r0
	cmn	r3, #1
	bne	.L8
	bl	__errno_location
	mov	r3, r0
	ldr	r3, [r3]
	mov	r1, r3
	ldr	r0, .L19+20
	bl	printf
.L8:
	sub	r3, fp, #100
	mov	r1, r3
	ldr	r0, [fp, #-104]
	bl	fstat
	mov	r3, r0
	cmn	r3, #1
	bne	.L7
	ldr	r1, .L19+16
	mov	r0, #2
	bl	die
.L7:
	ldr	r3, [fp, #-56]
	mov	r1, r3
	ldr	r0, .L19+24
	bl	printf
	mov	r3, #0
	str	r3, [sp, #4]
	ldr	r3, [fp, #-104]
	str	r3, [sp]
	mov	r3, #1
	mov	r2, #3
	mov	r1, #255
	mov	r0, #0
	bl	mmap
	mov	r3, r0
	ldr	r2, .L19+28
	str	r3, [r2]
	ldr	r0, [fp, #-104]
	bl	close
	ldr	r3, .L19+28
	ldr	r3, [r3]
	cmn	r3, #1
	bne	.L12
	ldr	r1, .L19+32
	mov	r0, #3
	bl	die
.L12:
	ldr	r3, .L19+28
	ldr	r3, [r3]
	ldr	r2, .L19+36
	ldr	r2, [r2]
	mov	r1, r2
	mov	r0, r3
	bl	do_job
	ldr	r3, .L19+28
	ldr	r3, [r3]
	ldr	r1, .L19+40
	mov	r0, r3
	bl	strcmp
	mov	r3, r0
	cmp	r3, #0
	beq	.L18
	b	.L12
.L18:
	nop
	ldr	r3, .L19+28
	ldr	r3, [r3]
	mov	r1, #255
	mov	r0, r3
	bl	munmap
	mov	r3, r0
	cmp	r3, #0
	beq	.L13
	ldr	r1, .L19+44
	mov	r0, #4
	bl	die
.L13:
	ldr	r0, .L19+8
	bl	shm_unlink
	mov	r3, r0
	cmn	r3, #1
	bne	.L14
	bl	__errno_location
	mov	r3, r0
	ldr	r3, [r3]
	cmp	r3, #2
	beq	.L14
	ldr	r1, .L19+48
	mov	r0, #5
	bl	die
.L14:
	mov	r3, #0
	ldr	r2, .L19
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L16
	bl	__stack_chk_fail
.L16:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L20:
	.align	2
.L19:
	.word	.LC10
	.word	511
	.word	.LC1
	.word	.LC2
	.word	.LC3
	.word	.LC4
	.word	.LC5
	.word	data
	.word	.LC6
	.word	reader_pid
	.word	.LC7
	.word	.LC8
	.word	.LC9
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
