	.file	"618120.c"
	.intel_syntax noprefix
	.text
	.globl	cria_filhos
	.type	cria_filhos, @function
cria_filhos:
.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, 32
	mov	DWORD PTR -20[rbp], edi
	mov	DWORD PTR -8[rbp], 0
	jmp	.L2
.L6:
	call	fork@PLT
	mov	DWORD PTR -4[rbp], eax
	cmp	DWORD PTR -4[rbp], 0
	jns	.L3
	mov	eax, -1
	jmp	.L4
.L3:
	cmp	DWORD PTR -4[rbp], 0
	jne	.L5
	mov	eax, DWORD PTR -8[rbp]
	add	eax, 1
	jmp	.L4
.L5:
	add	DWORD PTR -8[rbp], 1
.L2:
	mov	eax, DWORD PTR -8[rbp]
	cmp	eax, DWORD PTR -20[rbp]
	jl	.L6
	mov	eax, 0
.L4:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	cria_filhos, .-cria_filhos
	.section	.rodata
.LC0:
	.string	"Pipe failed!"
.LC1:
	.string	"Fork failed!"
.LC2:
	.string	"Pai: Insira um n\302\272: "
.LC3:
	.string	"%d"
.LC4:
	.string	"Pai: Insira uma palavra: "
.LC5:
	.string	"%s"
.LC6:
	.string	"Write failed!"
.LC7:
	.string	"Read failed!!"
	.align 8
.LC8:
	.string	"Filho: Retirei do pipe o numero %d\n"
	.align 8
.LC9:
	.string	"Filho: Retirei do pipe a palvra %s\n"
	.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, 240
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	lea	rax, -232[rbp]
	mov	rdi, rax
	call	pipe@PLT
	cmp	eax, -1
	jne	.L8
	lea	rdi, .LC0[rip]
	call	perror@PLT
	mov	edi, 1
	call	exit@PLT
.L8:
	mov	edi, 1
	call	cria_filhos
	mov	DWORD PTR -236[rbp], eax
	cmp	DWORD PTR -236[rbp], -1
	jne	.L9
	lea	rdi, .LC1[rip]
	call	perror@PLT
	mov	edi, 1
	call	exit@PLT
.L9:
	cmp	DWORD PTR -236[rbp], 0
	jne	.L10
	mov	eax, DWORD PTR -232[rbp]
	mov	edi, eax
	call	close@PLT
	lea	rdi, .LC2[rip]
	call	puts@PLT
	lea	rax, -240[rbp]
	mov	rsi, rax
	lea	rdi, .LC3[rip]
	mov	eax, 0
	call	__isoc99_scanf@PLT
	mov	edi, 1
	call	sleep@PLT
	lea	rdi, .LC4[rip]
	call	puts@PLT
	lea	rax, -112[rbp]
	mov	rsi, rax
	lea	rdi, .LC5[rip]
	mov	eax, 0
	call	__isoc99_scanf@PLT
	mov	edi, 1
	call	sleep@PLT
	mov	eax, DWORD PTR -240[rbp]
	mov	DWORD PTR -224[rbp], eax
	lea	rax, -112[rbp]
	lea	rdx, -224[rbp]
	add	rdx, 4
	mov	rsi, rax
	mov	rdi, rdx
	call	strcpy@PLT
	mov	eax, DWORD PTR -228[rbp]
	lea	rcx, -224[rbp]
	mov	edx, 104
	mov	rsi, rcx
	mov	edi, eax
	call	write@PLT
	cmp	rax, -1
	jne	.L11
	lea	rdi, .LC6[rip]
	call	perror@PLT
.L11:
	mov	eax, DWORD PTR -228[rbp]
	mov	edi, eax
	call	close@PLT
	mov	eax, 0
	mov	rcx, QWORD PTR -8[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L15
	jmp	.L16
.L10:
	mov	eax, DWORD PTR -228[rbp]
	mov	edi, eax
	call	close@PLT
	mov	eax, DWORD PTR -232[rbp]
	lea	rcx, -224[rbp]
	mov	edx, 100
	mov	rsi, rcx
	mov	edi, eax
	call	read@PLT
	cmp	rax, -1
	jne	.L13
	lea	rdi, .LC7[rip]
	call	perror@PLT
	mov	edi, 1
	call	exit@PLT
.L13:
	mov	eax, DWORD PTR -232[rbp]
	mov	edi, eax
	call	close@PLT
	mov	eax, DWORD PTR -224[rbp]
	mov	esi, eax
	lea	rdi, .LC8[rip]
	mov	eax, 0
	call	printf@PLT
	lea	rax, -224[rbp]
	add	rax, 4
	mov	rsi, rax
	lea	rdi, .LC9[rip]
	mov	eax, 0
	call	printf@PLT
	mov	edi, 0
	call	exit@PLT
.L16:
	call	__stack_chk_fail@PLT
.L15:
	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	"618120.c"
	.text
	.align	2
	.global	cria_filhos
	.syntax unified
	.arm
	.fpu softvfp
	.type	cria_filhos, %function
cria_filhos:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #16
	str	r0, [fp, #-16]
	mov	r3, #0
	str	r3, [fp, #-12]
	b	.L2
.L6:
	bl	fork
	mov	r3, r0
	str	r3, [fp, #-8]
	ldr	r3, [fp, #-8]
	cmp	r3, #0
	bge	.L3
	mvn	r3, #0
	b	.L4
.L3:
	ldr	r3, [fp, #-8]
	cmp	r3, #0
	bne	.L5
	ldr	r3, [fp, #-12]
	add	r3, r3, #1
	b	.L4
.L5:
	ldr	r3, [fp, #-12]
	add	r3, r3, #1
	str	r3, [fp, #-12]
.L2:
	ldr	r2, [fp, #-12]
	ldr	r3, [fp, #-16]
	cmp	r2, r3
	blt	.L6
	mov	r3, #0
.L4:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
	.size	cria_filhos, .-cria_filhos
	.section	.rodata
	.align	2
.LC0:
	.ascii	"Pipe failed!\000"
	.align	2
.LC1:
	.ascii	"Fork failed!\000"
	.align	2
.LC2:
	.ascii	"Pai: Insira um n\302\272: \000"
	.align	2
.LC3:
	.ascii	"%d\000"
	.align	2
.LC4:
	.ascii	"Pai: Insira uma palavra: \000"
	.align	2
.LC5:
	.ascii	"%s\000"
	.align	2
.LC6:
	.ascii	"Write failed!\000"
	.align	2
.LC7:
	.ascii	"Read failed!!\000"
	.align	2
.LC8:
	.ascii	"Filho: Retirei do pipe o numero %d\012\000"
	.align	2
.LC9:
	.ascii	"Filho: Retirei do pipe a palvra %s\012\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 = 224
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #224
	ldr	r3, .L17
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	sub	r3, fp, #220
	mov	r0, r3
	bl	pipe
	mov	r3, r0
	cmn	r3, #1
	bne	.L8
	ldr	r0, .L17+4
	bl	perror
	mov	r0, #1
	bl	exit
.L8:
	mov	r0, #1
	bl	cria_filhos
	str	r0, [fp, #-224]
	ldr	r3, [fp, #-224]
	cmn	r3, #1
	bne	.L9
	ldr	r0, .L17+8
	bl	perror
	mov	r0, #1
	bl	exit
.L9:
	ldr	r3, [fp, #-224]
	cmp	r3, #0
	bne	.L10
	ldr	r3, [fp, #-220]
	mov	r0, r3
	bl	close
	ldr	r0, .L17+12
	bl	puts
	sub	r3, fp, #228
	mov	r1, r3
	ldr	r0, .L17+16
	bl	__isoc99_scanf
	mov	r0, #1
	bl	sleep
	ldr	r0, .L17+20
	bl	puts
	sub	r3, fp, #108
	mov	r1, r3
	ldr	r0, .L17+24
	bl	__isoc99_scanf
	mov	r0, #1
	bl	sleep
	ldr	r3, [fp, #-228]
	str	r3, [fp, #-212]
	sub	r2, fp, #108
	sub	r3, fp, #212
	add	r3, r3, #4
	mov	r1, r2
	mov	r0, r3
	bl	strcpy
	ldr	r3, [fp, #-216]
	sub	r1, fp, #212
	mov	r2, #104
	mov	r0, r3
	bl	write
	mov	r3, r0
	cmn	r3, #1
	bne	.L11
	ldr	r0, .L17+28
	bl	perror
.L11:
	ldr	r3, [fp, #-216]
	mov	r0, r3
	bl	close
	mov	r3, #0
	ldr	r2, .L17
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L15
	b	.L16
.L10:
	ldr	r3, [fp, #-216]
	mov	r0, r3
	bl	close
	ldr	r3, [fp, #-220]
	sub	r1, fp, #212
	mov	r2, #100
	mov	r0, r3
	bl	read
	mov	r3, r0
	cmn	r3, #1
	bne	.L13
	ldr	r0, .L17+32
	bl	perror
	mov	r0, #1
	bl	exit
.L13:
	ldr	r3, [fp, #-220]
	mov	r0, r3
	bl	close
	ldr	r3, [fp, #-212]
	mov	r1, r3
	ldr	r0, .L17+36
	bl	printf
	sub	r3, fp, #212
	add	r3, r3, #4
	mov	r1, r3
	ldr	r0, .L17+40
	bl	printf
	mov	r0, #0
	bl	exit
.L16:
	bl	__stack_chk_fail
.L15:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L18:
	.align	2
.L17:
	.word	.LC10
	.word	.LC0
	.word	.LC1
	.word	.LC2
	.word	.LC3
	.word	.LC4
	.word	.LC5
	.word	.LC6
	.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
