	.file	"661029.c"
	.intel_syntax noprefix
	.text
	.section	.rodata
.LC0:
	.string	"create pipe failed"
.LC1:
	.string	"create process failed"
.LC2:
	.string	"parent process read: %s\n"
	.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	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	DWORD PTR -320[rbp], 0
	movabs	rax, 7521891465571362120
	movabs	rdx, 7865335676758420585
	mov	QWORD PTR -304[rbp], rax
	mov	QWORD PTR -296[rbp], rdx
	movabs	rax, 9399091019146016
	mov	QWORD PTR -288[rbp], rax
	mov	QWORD PTR -272[rbp], 0
	mov	QWORD PTR -264[rbp], 0
	lea	rdx, -256[rbp]
	mov	eax, 0
	mov	ecx, 29
	mov	rdi, rdx
	rep stosq
	mov	rdx, rdi
	mov	DWORD PTR [rdx], eax
	add	rdx, 4
	mov	WORD PTR [rdx], ax
	add	rdx, 2
	mov	BYTE PTR [rdx], al
	add	rdx, 1
	lea	rax, -312[rbp]
	mov	rdi, rax
	call	pipe@PLT
	test	eax, eax
	jns	.L2
	lea	rdi, .LC0[rip]
	call	perror@PLT
	mov	edi, 1
	call	exit@PLT
.L2:
	call	fork@PLT
	mov	DWORD PTR -316[rbp], eax
	cmp	DWORD PTR -316[rbp], 0
	jns	.L3
	lea	rdi, .LC1[rip]
	call	perror@PLT
	jmp	.L4
.L3:
	cmp	DWORD PTR -316[rbp], 0
	jle	.L5
	mov	eax, DWORD PTR -308[rbp]
	mov	edi, eax
	call	close@PLT
	lea	rax, -304[rbp]
	mov	rdi, rax
	call	strlen@PLT
	mov	rdx, rax
	mov	eax, DWORD PTR -312[rbp]
	lea	rcx, -272[rbp]
	mov	rsi, rcx
	mov	edi, eax
	call	read@PLT
	mov	eax, DWORD PTR -312[rbp]
	mov	edi, eax
	call	close@PLT
	lea	rax, -320[rbp]
	mov	rdi, rax
	call	wait@PLT
	lea	rax, -272[rbp]
	mov	rsi, rax
	lea	rdi, .LC2[rip]
	mov	eax, 0
	call	printf@PLT
	jmp	.L4
.L5:
	mov	eax, DWORD PTR -312[rbp]
	mov	edi, eax
	call	close@PLT
	lea	rax, -304[rbp]
	mov	rdi, rax
	call	strlen@PLT
	mov	rdx, rax
	mov	eax, DWORD PTR -308[rbp]
	lea	rcx, -304[rbp]
	mov	rsi, rcx
	mov	edi, eax
	call	write@PLT
	mov	eax, DWORD PTR -308[rbp]
	mov	edi, eax
	call	close@PLT
.L4:
	mov	eax, 0
	mov	rsi, QWORD PTR -8[rbp]
	sub	rsi, QWORD PTR fs:40
	je	.L7
	call	__stack_chk_fail@PLT
.L7:
	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	"661029.c"
	.text
	.section	.rodata
	.align	2
.LC1:
	.ascii	"create pipe failed\000"
	.align	2
.LC2:
	.ascii	"create process failed\000"
	.align	2
.LC3:
	.ascii	"parent process read: %s\012\000"
	.align	2
.LC0:
	.ascii	"Hello child, I'm child!\000"
	.align	2
.LC4:
	.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
	ldr	r3, .L8
	ldr	r3, [r3]
	str	r3, [fp, #-16]
	mov	r3,#0
	mov	r3, #0
	str	r3, [fp, #-312]
	ldr	r3, .L8+4
	sub	ip, fp, #296
	mov	lr, r3
	ldmia	lr!, {r0, r1, r2, r3}
	stmia	ip!, {r0, r1, r2, r3}
	ldm	lr, {r0, r1}
	stm	ip, {r0, r1}
	mov	r3, #0
	str	r3, [fp, #-272]
	sub	r3, fp, #268
	mov	r2, #251
	mov	r1, #0
	mov	r0, r3
	bl	memset
	sub	r3, fp, #304
	mov	r0, r3
	bl	pipe
	mov	r3, r0
	cmp	r3, #0
	bge	.L2
	ldr	r0, .L8+8
	bl	perror
	mov	r0, #1
	bl	exit
.L2:
	bl	fork
	mov	r3, r0
	str	r3, [fp, #-308]
	ldr	r3, [fp, #-308]
	cmp	r3, #0
	bge	.L3
	ldr	r0, .L8+12
	bl	perror
	b	.L4
.L3:
	ldr	r3, [fp, #-308]
	cmp	r3, #0
	ble	.L5
	ldr	r3, [fp, #-300]
	mov	r0, r3
	bl	close
	ldr	r4, [fp, #-304]
	sub	r3, fp, #296
	mov	r0, r3
	bl	strlen
	mov	r2, r0
	sub	r3, fp, #272
	mov	r1, r3
	mov	r0, r4
	bl	read
	ldr	r3, [fp, #-304]
	mov	r0, r3
	bl	close
	sub	r3, fp, #312
	mov	r0, r3
	bl	wait
	sub	r3, fp, #272
	mov	r1, r3
	ldr	r0, .L8+16
	bl	printf
	b	.L4
.L5:
	ldr	r3, [fp, #-304]
	mov	r0, r3
	bl	close
	ldr	r4, [fp, #-300]
	sub	r3, fp, #296
	mov	r0, r3
	bl	strlen
	mov	r2, r0
	sub	r3, fp, #296
	mov	r1, r3
	mov	r0, r4
	bl	write
	ldr	r3, [fp, #-300]
	mov	r0, r3
	bl	close
.L4:
	mov	r3, #0
	ldr	r2, .L8
	ldr	r1, [r2]
	ldr	r2, [fp, #-16]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L7
	bl	__stack_chk_fail
.L7:
	mov	r0, r3
	sub	sp, fp, #8
	@ sp needed
	pop	{r4, fp, pc}
.L9:
	.align	2
.L8:
	.word	.LC4
	.word	.LC0
	.word	.LC1
	.word	.LC2
	.word	.LC3
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
