	.file	"416841.c"
	.intel_syntax noprefix
	.text
	.section	.rodata
.LC0:
	.string	"pipe"
.LC1:
	.string	"fork"
.LC2:
	.string	"Mensaje recibido: %s\n"
.LC3:
	.string	"Q"
.LC4:
	.string	"L"
.LC5:
	.string	"? "
.LC6:
	.string	"%s"
	.text
	.globl	main
	.type	main, @function
main:
.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, 320
	mov	DWORD PTR -308[rbp], edi
	mov	QWORD PTR -320[rbp], rsi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	DWORD PTR -304[rbp], 0
	mov	DWORD PTR -300[rbp], 0
	lea	rax, -288[rbp]
	mov	rdi, rax
	call	pipe@PLT
	cmp	eax, -1
	jne	.L2
	lea	rdi, .LC0[rip]
	call	perror@PLT
	mov	eax, -1
	jmp	.L13
.L2:
	lea	rax, -280[rbp]
	mov	rdi, rax
	call	pipe@PLT
	cmp	eax, -1
	jne	.L4
	lea	rdi, .LC0[rip]
	call	perror@PLT
	mov	eax, -1
	jmp	.L13
.L4:
	call	fork@PLT
	mov	DWORD PTR -296[rbp], eax
	cmp	DWORD PTR -296[rbp], -1
	je	.L5
	cmp	DWORD PTR -296[rbp], 0
	je	.L6
	jmp	.L15
.L5:
	lea	rdi, .LC1[rip]
	call	perror@PLT
	mov	eax, -1
	jmp	.L13
.L6:
	mov	eax, DWORD PTR -284[rbp]
	mov	edi, eax
	call	close@PLT
	mov	eax, DWORD PTR -280[rbp]
	mov	edi, eax
	call	close@PLT
	jmp	.L8
.L10:
	mov	eax, DWORD PTR -288[rbp]
	lea	rcx, -272[rbp]
	mov	edx, 256
	mov	rsi, rcx
	mov	edi, eax
	call	read@PLT
	mov	DWORD PTR -292[rbp], eax
	mov	eax, DWORD PTR -292[rbp]
	cdqe
	mov	BYTE PTR -272[rbp+rax], 0
	lea	rax, -272[rbp]
	mov	rsi, rax
	lea	rdi, .LC2[rip]
	mov	eax, 0
	call	printf@PLT
	mov	edi, 1
	call	sleep@PLT
	add	DWORD PTR -300[rbp], 1
	cmp	DWORD PTR -300[rbp], 10
	jne	.L9
	mov	eax, DWORD PTR -276[rbp]
	mov	edx, 1
	lea	rsi, .LC3[rip]
	mov	edi, eax
	call	write@PLT
	mov	DWORD PTR -304[rbp], 1
	jmp	.L8
.L9:
	mov	eax, DWORD PTR -276[rbp]
	mov	edx, 1
	lea	rsi, .LC4[rip]
	mov	edi, eax
	call	write@PLT
.L8:
	cmp	DWORD PTR -304[rbp], 0
	je	.L10
	mov	eax, DWORD PTR -288[rbp]
	mov	edi, eax
	call	close@PLT
	mov	eax, DWORD PTR -276[rbp]
	mov	edi, eax
	call	close@PLT
	mov	eax, 0
	jmp	.L13
.L15:
	mov	eax, DWORD PTR -288[rbp]
	mov	edi, eax
	call	close@PLT
	mov	eax, DWORD PTR -276[rbp]
	mov	edi, eax
	call	close@PLT
	jmp	.L11
.L12:
	lea	rdi, .LC5[rip]
	mov	eax, 0
	call	printf@PLT
	lea	rax, -272[rbp]
	mov	rsi, rax
	lea	rdi, .LC6[rip]
	mov	eax, 0
	call	__isoc99_scanf@PLT
	lea	rax, -272[rbp]
	mov	rdi, rax
	call	strlen@PLT
	lea	rdx, 1[rax]
	mov	eax, DWORD PTR -284[rbp]
	lea	rcx, -272[rbp]
	mov	rsi, rcx
	mov	edi, eax
	call	write@PLT
	mov	eax, DWORD PTR -280[rbp]
	lea	rcx, -272[rbp]
	mov	edx, 1
	mov	rsi, rcx
	mov	edi, eax
	call	read@PLT
	movzx	eax, BYTE PTR -272[rbp]
	cmp	al, 81
	jne	.L11
	mov	DWORD PTR -304[rbp], 1
.L11:
	cmp	DWORD PTR -304[rbp], 0
	je	.L12
	mov	eax, DWORD PTR -284[rbp]
	mov	edi, eax
	call	close@PLT
	mov	eax, DWORD PTR -280[rbp]
	mov	edi, eax
	call	close@PLT
	mov	eax, 0
.L13:
	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
.LFE6:
	.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	"416841.c"
	.text
	.section	.rodata
	.align	2
.LC0:
	.ascii	"pipe\000"
	.align	2
.LC1:
	.ascii	"fork\000"
	.align	2
.LC2:
	.ascii	"Mensaje recibido: %s\012\000"
	.align	2
.LC3:
	.ascii	"Q\000"
	.align	2
.LC4:
	.ascii	"L\000"
	.align	2
.LC5:
	.ascii	"? \000"
	.align	2
.LC6:
	.ascii	"%s\000"
	.align	2
.LC7:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 304
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, fp, lr}
	add	fp, sp, #8
	sub	sp, sp, #308
	str	r0, [fp, #-312]
	str	r1, [fp, #-316]
	ldr	r3, .L16
	ldr	r3, [r3]
	str	r3, [fp, #-16]
	mov	r3,#0
	mov	r3, #0
	str	r3, [fp, #-304]
	mov	r3, #0
	str	r3, [fp, #-300]
	sub	r3, fp, #288
	mov	r0, r3
	bl	pipe
	mov	r3, r0
	cmn	r3, #1
	bne	.L2
	ldr	r0, .L16+4
	bl	perror
	mvn	r3, #0
	b	.L13
.L2:
	sub	r3, fp, #280
	mov	r0, r3
	bl	pipe
	mov	r3, r0
	cmn	r3, #1
	bne	.L4
	ldr	r0, .L16+4
	bl	perror
	mvn	r3, #0
	b	.L13
.L4:
	bl	fork
	mov	r3, r0
	str	r3, [fp, #-296]
	ldr	r3, [fp, #-296]
	cmn	r3, #1
	beq	.L5
	ldr	r3, [fp, #-296]
	cmp	r3, #0
	beq	.L6
	b	.L15
.L5:
	ldr	r0, .L16+8
	bl	perror
	mvn	r3, #0
	b	.L13
.L6:
	ldr	r3, [fp, #-284]
	mov	r0, r3
	bl	close
	ldr	r3, [fp, #-280]
	mov	r0, r3
	bl	close
	b	.L8
.L10:
	ldr	r3, [fp, #-288]
	sub	r1, fp, #272
	mov	r2, #256
	mov	r0, r3
	bl	read
	str	r0, [fp, #-292]
	sub	r2, fp, #272
	ldr	r3, [fp, #-292]
	add	r3, r2, r3
	mov	r2, #0
	strb	r2, [r3]
	sub	r3, fp, #272
	mov	r1, r3
	ldr	r0, .L16+12
	bl	printf
	mov	r0, #1
	bl	sleep
	ldr	r3, [fp, #-300]
	add	r3, r3, #1
	str	r3, [fp, #-300]
	ldr	r3, [fp, #-300]
	cmp	r3, #10
	bne	.L9
	ldr	r3, [fp, #-276]
	mov	r2, #1
	ldr	r1, .L16+16
	mov	r0, r3
	bl	write
	mov	r3, #1
	str	r3, [fp, #-304]
	b	.L8
.L9:
	ldr	r3, [fp, #-276]
	mov	r2, #1
	ldr	r1, .L16+20
	mov	r0, r3
	bl	write
.L8:
	ldr	r3, [fp, #-304]
	cmp	r3, #0
	beq	.L10
	ldr	r3, [fp, #-288]
	mov	r0, r3
	bl	close
	ldr	r3, [fp, #-276]
	mov	r0, r3
	bl	close
	mov	r3, #0
	b	.L13
.L15:
	ldr	r3, [fp, #-288]
	mov	r0, r3
	bl	close
	ldr	r3, [fp, #-276]
	mov	r0, r3
	bl	close
	b	.L11
.L12:
	ldr	r0, .L16+24
	bl	printf
	sub	r3, fp, #272
	mov	r1, r3
	ldr	r0, .L16+28
	bl	__isoc99_scanf
	ldr	r4, [fp, #-284]
	sub	r3, fp, #272
	mov	r0, r3
	bl	strlen
	mov	r3, r0
	add	r2, r3, #1
	sub	r3, fp, #272
	mov	r1, r3
	mov	r0, r4
	bl	write
	ldr	r3, [fp, #-280]
	sub	r1, fp, #272
	mov	r2, #1
	mov	r0, r3
	bl	read
	ldrb	r3, [fp, #-272]	@ zero_extendqisi2
	cmp	r3, #81
	bne	.L11
	mov	r3, #1
	str	r3, [fp, #-304]
.L11:
	ldr	r3, [fp, #-304]
	cmp	r3, #0
	beq	.L12
	ldr	r3, [fp, #-284]
	mov	r0, r3
	bl	close
	ldr	r3, [fp, #-280]
	mov	r0, r3
	bl	close
	mov	r3, #0
.L13:
	ldr	r2, .L16
	ldr	r1, [r2]
	ldr	r2, [fp, #-16]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L14
	bl	__stack_chk_fail
.L14:
	mov	r0, r3
	sub	sp, fp, #8
	@ sp needed
	pop	{r4, fp, pc}
.L17:
	.align	2
.L16:
	.word	.LC7
	.word	.LC0
	.word	.LC1
	.word	.LC2
	.word	.LC3
	.word	.LC4
	.word	.LC5
	.word	.LC6
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
