	.file	"23574767.c"
	.intel_syntax noprefix
	.text
	.section	.rodata
.LC0:
	.string	"/shmtest"
.LC1:
	.string	"Introduza algum nome "
.LC2:
	.string	"%s"
.LC3:
	.string	"Introduza algum n\303\272mero "
.LC4:
	.string	"%d"
	.text
	.globl	writer
	.type	writer, @function
writer:
.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 -16[rbp], 104
	lea	rdi, .LC0[rip]
	call	shm_unlink@PLT
	mov	edx, 384
	mov	esi, 194
	lea	rdi, .LC0[rip]
	call	shm_open@PLT
	mov	DWORD PTR -12[rbp], eax
	cmp	DWORD PTR -12[rbp], -1
	jne	.L2
	mov	eax, DWORD PTR -12[rbp]
	jmp	.L3
.L2:
	mov	eax, DWORD PTR -16[rbp]
	movsx	rdx, eax
	mov	eax, DWORD PTR -12[rbp]
	mov	rsi, rdx
	mov	edi, eax
	call	ftruncate@PLT
	mov	eax, DWORD PTR -16[rbp]
	cdqe
	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
	cmp	QWORD PTR -8[rbp], 0
	jne	.L4
	mov	eax, -1
	jmp	.L3
.L4:
	lea	rdi, .LC1[rip]
	call	puts@PLT
	mov	rax, QWORD PTR -8[rbp]
	add	rax, 4
	mov	rsi, rax
	lea	rdi, .LC2[rip]
	mov	eax, 0
	call	__isoc99_scanf@PLT
	lea	rdi, .LC3[rip]
	call	puts@PLT
	mov	rax, QWORD PTR -8[rbp]
	mov	rsi, rax
	lea	rdi, .LC4[rip]
	mov	eax, 0
	call	__isoc99_scanf@PLT
	mov	eax, 0
.L3:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	writer, .-writer
	.section	.rodata
	.align 8
.LC5:
	.string	"\n-Os dados introduzidos foram os seguintes (por ordem inversa):"
.LC6:
	.string	"%d \n"
.LC7:
	.string	"%s \n"
	.text
	.globl	reader
	.type	reader, @function
reader:
.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, 16
	mov	DWORD PTR -16[rbp], 104
	mov	edx, 384
	mov	esi, 2
	lea	rdi, .LC0[rip]
	call	shm_open@PLT
	mov	DWORD PTR -12[rbp], eax
	cmp	DWORD PTR -12[rbp], -1
	jne	.L6
	mov	eax, DWORD PTR -12[rbp]
	jmp	.L7
.L6:
	mov	eax, DWORD PTR -16[rbp]
	cdqe
	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
	cmp	QWORD PTR -8[rbp], 0
	jne	.L8
	mov	eax, -1
	jmp	.L7
.L8:
	lea	rdi, .LC5[rip]
	call	puts@PLT
	mov	rax, QWORD PTR -8[rbp]
	mov	eax, DWORD PTR [rax]
	mov	esi, eax
	lea	rdi, .LC6[rip]
	mov	eax, 0
	call	printf@PLT
	mov	rax, QWORD PTR -8[rbp]
	add	rax, 4
	mov	rsi, rax
	lea	rdi, .LC7[rip]
	mov	eax, 0
	call	printf@PLT
	mov	eax, 0
.L7:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	reader, .-reader
	.globl	main
	.type	main, @function
main:
.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, 16
	mov	eax, 0
	call	writer
	mov	DWORD PTR -8[rbp], eax
	cmp	DWORD PTR -8[rbp], -1
	jne	.L10
	mov	eax, DWORD PTR -8[rbp]
	jmp	.L11
.L10:
	mov	eax, 0
	call	reader
	mov	DWORD PTR -4[rbp], eax
	cmp	DWORD PTR -4[rbp], -1
	jne	.L12
	mov	eax, DWORD PTR -4[rbp]
	jmp	.L11
.L12:
	mov	eax, 0
.L11:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.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	"23574767.c"
	.text
	.section	.rodata
	.align	2
.LC0:
	.ascii	"/shmtest\000"
	.align	2
.LC1:
	.ascii	"Introduza algum nome \000"
	.align	2
.LC2:
	.ascii	"%s\000"
	.align	2
.LC3:
	.ascii	"Introduza algum n\303\272mero \000"
	.align	2
.LC4:
	.ascii	"%d\000"
	.text
	.align	2
	.global	writer
	.syntax unified
	.arm
	.fpu softvfp
	.type	writer, %function
writer:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #24
	mov	r3, #104
	str	r3, [fp, #-16]
	ldr	r0, .L5
	bl	shm_unlink
	mov	r2, #384
	mov	r1, #194
	ldr	r0, .L5
	bl	shm_open
	str	r0, [fp, #-12]
	ldr	r3, [fp, #-12]
	cmn	r3, #1
	bne	.L2
	ldr	r3, [fp, #-12]
	b	.L3
.L2:
	ldr	r1, [fp, #-16]
	ldr	r0, [fp, #-12]
	bl	ftruncate
	ldr	r1, [fp, #-16]
	mov	r3, #0
	str	r3, [sp, #4]
	ldr	r3, [fp, #-12]
	str	r3, [sp]
	mov	r3, #1
	mov	r2, #3
	mov	r0, #0
	bl	mmap
	str	r0, [fp, #-8]
	ldr	r3, [fp, #-8]
	cmp	r3, #0
	bne	.L4
	mvn	r3, #0
	b	.L3
.L4:
	ldr	r0, .L5+4
	bl	puts
	ldr	r3, [fp, #-8]
	add	r3, r3, #4
	mov	r1, r3
	ldr	r0, .L5+8
	bl	__isoc99_scanf
	ldr	r0, .L5+12
	bl	puts
	ldr	r3, [fp, #-8]
	mov	r1, r3
	ldr	r0, .L5+16
	bl	__isoc99_scanf
	mov	r3, #0
.L3:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L6:
	.align	2
.L5:
	.word	.LC0
	.word	.LC1
	.word	.LC2
	.word	.LC3
	.word	.LC4
	.size	writer, .-writer
	.section	.rodata
	.align	2
.LC5:
	.ascii	"\012-Os dados introduzidos foram os seguintes (por "
	.ascii	"ordem inversa):\000"
	.align	2
.LC6:
	.ascii	"%d \012\000"
	.align	2
.LC7:
	.ascii	"%s \012\000"
	.text
	.align	2
	.global	reader
	.syntax unified
	.arm
	.fpu softvfp
	.type	reader, %function
reader:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #24
	mov	r3, #104
	str	r3, [fp, #-16]
	mov	r2, #384
	mov	r1, #2
	ldr	r0, .L11
	bl	shm_open
	str	r0, [fp, #-12]
	ldr	r3, [fp, #-12]
	cmn	r3, #1
	bne	.L8
	ldr	r3, [fp, #-12]
	b	.L9
.L8:
	ldr	r1, [fp, #-16]
	mov	r3, #0
	str	r3, [sp, #4]
	ldr	r3, [fp, #-12]
	str	r3, [sp]
	mov	r3, #1
	mov	r2, #3
	mov	r0, #0
	bl	mmap
	str	r0, [fp, #-8]
	ldr	r3, [fp, #-8]
	cmp	r3, #0
	bne	.L10
	mvn	r3, #0
	b	.L9
.L10:
	ldr	r0, .L11+4
	bl	puts
	ldr	r3, [fp, #-8]
	ldr	r3, [r3]
	mov	r1, r3
	ldr	r0, .L11+8
	bl	printf
	ldr	r3, [fp, #-8]
	add	r3, r3, #4
	mov	r1, r3
	ldr	r0, .L11+12
	bl	printf
	mov	r3, #0
.L9:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L12:
	.align	2
.L11:
	.word	.LC0
	.word	.LC5
	.word	.LC6
	.word	.LC7
	.size	reader, .-reader
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #8
	bl	writer
	str	r0, [fp, #-12]
	ldr	r3, [fp, #-12]
	cmn	r3, #1
	bne	.L14
	ldr	r3, [fp, #-12]
	b	.L15
.L14:
	bl	reader
	str	r0, [fp, #-8]
	ldr	r3, [fp, #-8]
	cmn	r3, #1
	bne	.L16
	ldr	r3, [fp, #-8]
	b	.L15
.L16:
	mov	r3, #0
.L15:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
