	.file	"926041.c"
	.intel_syntax noprefix
	.text
	.section	.rodata
.LC0:
	.string	"Child has exited"
	.text
	.globl	myexit
	.type	myexit, @function
myexit:
.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
	lea	rdi, .LC0[rip]
	mov	eax, 0
	call	printf@PLT
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	myexit, .-myexit
	.section	.rodata
.LC1:
	.string	">>"
.LC2:
	.string	"write"
.LC3:
	.string	"read"
.LC4:
	.string	" \n&"
.LC5:
	.string	"pipe"
.LC6:
	.string	"dup2"
.LC7:
	.string	"%s:"
.LC8:
	.string	"execvp"
.LC9:
	.string	"fork"
	.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, 4096
	or	QWORD PTR [rsp], 0
	sub	rsp, 144
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	DWORD PTR -4232[rbp], 0
	mov	DWORD PTR -4228[rbp], 1
	lea	rsi, myexit[rip]
	mov	edi, 17
	call	signal@PLT
.L22:
	lea	rax, -4112[rbp]
	mov	rsi, rax
	mov	eax, 0
	mov	edx, 256
	mov	rdi, rsi
	mov	rcx, rdx
	rep stosq
	mov	eax, DWORD PTR -4228[rbp]
	mov	edx, 2
	lea	rsi, .LC1[rip]
	mov	edi, eax
	call	write@PLT
	test	rax, rax
	jns	.L3
	lea	rdi, .LC2[rip]
	call	perror@PLT
	mov	edi, 1
	call	exit@PLT
.L3:
	lea	rcx, -4112[rbp]
	mov	eax, DWORD PTR -4232[rbp]
	mov	edx, 2047
	mov	rsi, rcx
	mov	edi, eax
	call	read@PLT
	test	rax, rax
	jns	.L4
	lea	rdi, .LC3[rip]
	call	perror@PLT
	mov	edi, 1
	call	exit@PLT
.L4:
	lea	rax, -4112[rbp]
	mov	rdi, rax
	call	strlen@PLT
	mov	DWORD PTR -4224[rbp], eax
	cmp	DWORD PTR -4224[rbp], 1
	jle	.L24
	lea	rax, -4112[rbp]
	mov	esi, 38
	mov	rdi, rax
	call	strrchr@PLT
	test	rax, rax
	je	.L7
	mov	DWORD PTR -4236[rbp], 1
	jmp	.L8
.L7:
	mov	DWORD PTR -4236[rbp], 0
.L8:
	lea	rax, -4112[rbp]
	lea	rsi, .LC4[rip]
	mov	rdi, rax
	call	strtok@PLT
	mov	QWORD PTR -4216[rbp], rax
	cmp	QWORD PTR -4216[rbp], 0
	je	.L25
	mov	rax, QWORD PTR -4216[rbp]
	mov	QWORD PTR -4192[rbp], rax
	mov	DWORD PTR -4240[rbp], 1
.L12:
	lea	rsi, .LC4[rip]
	mov	edi, 0
	call	strtok@PLT
	mov	QWORD PTR -4208[rbp], rax
	cmp	QWORD PTR -4208[rbp], 0
	je	.L10
	mov	eax, DWORD PTR -4240[rbp]
	lea	edx, 1[rax]
	mov	DWORD PTR -4240[rbp], edx
	cdqe
	mov	rdx, QWORD PTR -4208[rbp]
	mov	QWORD PTR -4192[rbp+rax*8], rdx
.L10:
	cmp	QWORD PTR -4208[rbp], 0
	je	.L11
	cmp	DWORD PTR -4240[rbp], 9
	jle	.L12
.L11:
	mov	eax, DWORD PTR -4240[rbp]
	cdqe
	mov	QWORD PTR -4192[rbp+rax*8], 0
	lea	rax, -4200[rbp]
	mov	rdi, rax
	call	pipe@PLT
	test	eax, eax
	je	.L13
	lea	rdi, .LC5[rip]
	call	perror@PLT
	mov	edi, 1
	call	exit@PLT
.L13:
	call	fork@PLT
	mov	DWORD PTR -4220[rbp], eax
	cmp	DWORD PTR -4220[rbp], -1
	je	.L14
	cmp	DWORD PTR -4220[rbp], 0
	jne	.L15
	mov	edi, 1
	call	close@PLT
	mov	eax, DWORD PTR -4196[rbp]
	mov	esi, 1
	mov	edi, eax
	call	dup2@PLT
	test	eax, eax
	jns	.L16
	lea	rdi, .LC6[rip]
	call	perror@PLT
	mov	edi, 1
	call	exit@PLT
.L16:
	lea	rdx, -4192[rbp]
	mov	rax, QWORD PTR -4216[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	execvp@PLT
	mov	rax, QWORD PTR stderr[rip]
	mov	rdx, QWORD PTR -4216[rbp]
	lea	rsi, .LC7[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	lea	rdi, .LC8[rip]
	call	perror@PLT
	mov	edi, 1
	call	exit@PLT
.L14:
	lea	rdi, .LC9[rip]
	call	perror@PLT
	mov	edi, 1
	call	exit@PLT
.L15:
	mov	eax, DWORD PTR -4196[rbp]
	mov	edi, eax
	call	close@PLT
	call	fork@PLT
	mov	DWORD PTR -4220[rbp], eax
	cmp	DWORD PTR -4220[rbp], 0
	jne	.L17
	mov	eax, DWORD PTR -4200[rbp]
	lea	rcx, -2064[rbp]
	mov	edx, 2046
	mov	rsi, rcx
	mov	edi, eax
	call	read@PLT
	mov	DWORD PTR -4240[rbp], eax
	cmp	DWORD PTR -4240[rbp], 0
	jns	.L18
	lea	rdi, .LC3[rip]
	call	perror@PLT
	jmp	.L19
.L18:
	mov	eax, DWORD PTR -4240[rbp]
	cdqe
	mov	BYTE PTR -2064[rbp+rax], 10
	mov	eax, DWORD PTR -4240[rbp]
	add	eax, 1
	cdqe
	mov	BYTE PTR -2064[rbp+rax], 0
	mov	eax, DWORD PTR -4240[rbp]
	add	eax, 1
	movsx	rdx, eax
	lea	rax, -2064[rbp]
	mov	rsi, rax
	mov	edi, 1
	call	write@PLT
.L19:
	mov	edi, 0
	call	exit@PLT
.L17:
	mov	eax, DWORD PTR -4200[rbp]
	mov	edi, eax
	call	close@PLT
	cmp	DWORD PTR -4236[rbp], 0
	jne	.L26
	mov	eax, DWORD PTR -4220[rbp]
	mov	edx, 0
	mov	esi, 0
	mov	edi, eax
	call	waitpid@PLT
.L26:
	nop
.L21:
	mov	edx, 1
	mov	esi, 0
	mov	edi, -1
	call	waitpid@PLT
	test	eax, eax
	jg	.L21
	jmp	.L6
.L24:
	nop
	jmp	.L22
.L25:
	nop
.L6:
	jmp	.L22
	.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	"926041.c"
	.text
	.section	.rodata
	.align	2
.LC0:
	.ascii	"Child has exited\000"
	.text
	.align	2
	.global	myexit
	.syntax unified
	.arm
	.fpu softvfp
	.type	myexit, %function
myexit:
	@ 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]
	ldr	r0, .L2
	bl	printf
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L3:
	.align	2
.L2:
	.word	.LC0
	.size	myexit, .-myexit
	.section	.rodata
	.align	2
.LC1:
	.ascii	">>\000"
	.align	2
.LC2:
	.ascii	"write\000"
	.align	2
.LC3:
	.ascii	"read\000"
	.align	2
.LC4:
	.ascii	" \012&\000"
	.align	2
.LC5:
	.ascii	"pipe\000"
	.align	2
.LC6:
	.ascii	"dup2\000"
	.align	2
.LC7:
	.ascii	"%s:\000"
	.align	2
.LC8:
	.ascii	"execvp\000"
	.align	2
.LC9:
	.ascii	"fork\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 = 4184
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, fp, lr}
	add	fp, sp, #8
	sub	sp, sp, #4160
	sub	sp, sp, #28
	ldr	r3, .L29
	ldr	r3, [r3]
	str	r3, [fp, #-16]
	mov	r3,#0
	sub	r3, fp, #4096
	sub	r3, r3, #12
	mov	r2, r3
	mov	r3, #0
	str	r3, [r2, #-76]
	sub	r3, fp, #4096
	sub	r3, r3, #12
	mov	r2, r3
	mov	r3, #1
	str	r3, [r2, #-72]
	ldr	r1, .L29+4
	mov	r0, #17
	bl	signal
.L24:
	sub	r3, fp, #4096
	sub	r3, r3, #12
	sub	r3, r3, #4
	mov	r0, r3
	mov	r3, #2048
	mov	r2, r3
	mov	r1, #0
	bl	memset
	sub	r3, fp, #4096
	sub	r3, r3, #12
	mov	r2, #2
	ldr	r1, .L29+8
	ldr	r0, [r3, #-72]
	bl	write
	mov	r3, r0
	cmp	r3, #0
	bge	.L5
	ldr	r0, .L29+12
	bl	perror
	mov	r0, #1
	bl	exit
.L5:
	sub	r3, fp, #4096
	sub	r3, r3, #12
	sub	r3, r3, #4
	sub	r2, fp, #4096
	sub	r2, r2, #12
	mov	r0, r2
	ldr	r2, .L29+16
	mov	r1, r3
	ldr	r0, [r0, #-76]
	bl	read
	mov	r3, r0
	cmp	r3, #0
	bge	.L6
	ldr	r0, .L29+20
	bl	perror
	mov	r0, #1
	bl	exit
.L6:
	sub	r3, fp, #4096
	sub	r3, r3, #12
	sub	r3, r3, #4
	mov	r0, r3
	bl	strlen
	mov	r3, r0
	sub	r2, fp, #4096
	sub	r2, r2, #12
	str	r3, [r2, #-68]
	sub	r3, fp, #4096
	sub	r3, r3, #12
	ldr	r3, [r3, #-68]
	cmp	r3, #1
	ble	.L26
	sub	r3, fp, #4096
	sub	r3, r3, #12
	sub	r3, r3, #4
	mov	r1, #38
	mov	r0, r3
	bl	strrchr
	mov	r3, r0
	cmp	r3, #0
	beq	.L9
	sub	r3, fp, #4096
	sub	r3, r3, #12
	mov	r2, r3
	mov	r3, #1
	str	r3, [r2, #-80]
	b	.L10
.L9:
	sub	r3, fp, #4096
	sub	r3, r3, #12
	mov	r2, r3
	mov	r3, #0
	str	r3, [r2, #-80]
.L10:
	sub	r3, fp, #4096
	sub	r3, r3, #12
	mov	r4, r3
	sub	r3, fp, #4096
	sub	r3, r3, #12
	sub	r3, r3, #4
	ldr	r1, .L29+24
	mov	r0, r3
	bl	strtok
	str	r0, [r4, #-64]
	sub	r3, fp, #4096
	sub	r3, r3, #12
	ldr	r3, [r3, #-64]
	cmp	r3, #0
	beq	.L27
	sub	r3, fp, #4096
	sub	r3, r3, #12
	mov	r2, r3
	sub	r3, fp, #4096
	sub	r3, r3, #12
	ldr	r3, [r3, #-64]
	str	r3, [r2, #-44]
	sub	r3, fp, #4096
	sub	r3, r3, #12
	mov	r2, r3
	mov	r3, #1
	str	r3, [r2, #-84]
.L14:
	sub	r3, fp, #4096
	sub	r3, r3, #12
	mov	r4, r3
	ldr	r1, .L29+24
	mov	r0, #0
	bl	strtok
	str	r0, [r4, #-60]
	sub	r3, fp, #4096
	sub	r3, r3, #12
	ldr	r3, [r3, #-60]
	cmp	r3, #0
	beq	.L12
	sub	r3, fp, #4096
	sub	r3, r3, #12
	ldr	r3, [r3, #-84]
	sub	r2, fp, #4096
	sub	r2, r2, #12
	mov	r1, r2
	add	r2, r3, #1
	str	r2, [r1, #-84]
	sub	r2, fp, #4096
	sub	r2, r2, #12
	lsl	r3, r3, #2
	add	r3, r2, r3
	sub	r2, fp, #4096
	sub	r2, r2, #12
	ldr	r2, [r2, #-60]
	str	r2, [r3, #-44]
.L12:
	sub	r3, fp, #4096
	sub	r3, r3, #12
	ldr	r3, [r3, #-60]
	cmp	r3, #0
	beq	.L13
	sub	r3, fp, #4096
	sub	r3, r3, #12
	ldr	r3, [r3, #-84]
	cmp	r3, #9
	ble	.L14
.L13:
	sub	r3, fp, #4096
	sub	r3, r3, #12
	mov	r2, r3
	sub	r3, fp, #4096
	sub	r3, r3, #12
	ldr	r3, [r3, #-84]
	lsl	r3, r3, #2
	add	r3, r2, r3
	mov	r2, #0
	str	r2, [r3, #-44]
	sub	r3, fp, #4096
	sub	r3, r3, #12
	sub	r3, r3, #52
	mov	r0, r3
	bl	pipe
	mov	r3, r0
	cmp	r3, #0
	beq	.L15
	ldr	r0, .L29+28
	bl	perror
	mov	r0, #1
	bl	exit
.L15:
	sub	r3, fp, #4096
	sub	r3, r3, #12
	mov	r4, r3
	bl	fork
	mov	r3, r0
	str	r3, [r4, #-56]
	sub	r3, fp, #4096
	sub	r3, r3, #12
	ldr	r3, [r3, #-56]
	cmn	r3, #1
	beq	.L16
	sub	r3, fp, #4096
	sub	r3, r3, #12
	ldr	r3, [r3, #-56]
	cmp	r3, #0
	bne	.L17
	mov	r0, #1
	bl	close
	sub	r3, fp, #4096
	sub	r3, r3, #12
	ldr	r3, [r3, #-48]
	mov	r1, #1
	mov	r0, r3
	bl	dup2
	mov	r3, r0
	cmp	r3, #0
	bge	.L18
	ldr	r0, .L29+32
	bl	perror
	mov	r0, #1
	bl	exit
.L18:
	sub	r3, fp, #4096
	sub	r3, r3, #12
	sub	r3, r3, #44
	sub	r2, fp, #4096
	sub	r2, r2, #12
	mov	r1, r3
	ldr	r0, [r2, #-64]
	bl	execvp
	ldr	r3, .L29+36
	ldr	r3, [r3]
	sub	r2, fp, #4096
	sub	r2, r2, #12
	ldr	r2, [r2, #-64]
	ldr	r1, .L29+40
	mov	r0, r3
	bl	fprintf
	ldr	r0, .L29+44
	bl	perror
	mov	r0, #1
	bl	exit
.L16:
	ldr	r0, .L29+48
	bl	perror
	mov	r0, #1
	bl	exit
.L17:
	sub	r3, fp, #4096
	sub	r3, r3, #12
	ldr	r3, [r3, #-48]
	mov	r0, r3
	bl	close
	sub	r3, fp, #4096
	sub	r3, r3, #12
	mov	r4, r3
	bl	fork
	mov	r3, r0
	str	r3, [r4, #-56]
	sub	r3, fp, #4096
	sub	r3, r3, #12
	ldr	r3, [r3, #-56]
	cmp	r3, #0
	bne	.L19
	sub	r3, fp, #4096
	sub	r3, r3, #12
	ldr	r0, [r3, #-52]
	sub	r3, fp, #4096
	sub	r3, r3, #12
	mov	r4, r3
	sub	r3, fp, #2048
	sub	r3, r3, #12
	sub	r3, r3, #4
	ldr	r2, .L29+52
	mov	r1, r3
	bl	read
	str	r0, [r4, #-84]
	sub	r3, fp, #4096
	sub	r3, r3, #12
	ldr	r3, [r3, #-84]
	cmp	r3, #0
	bge	.L20
	ldr	r0, .L29+20
	bl	perror
	b	.L21
.L20:
	sub	r3, fp, #2048
	sub	r3, r3, #12
	sub	r3, r3, #4
	sub	r2, fp, #4096
	sub	r2, r2, #12
	ldr	r2, [r2, #-84]
	add	r3, r3, r2
	mov	r2, #10
	strb	r2, [r3]
	sub	r3, fp, #4096
	sub	r3, r3, #12
	ldr	r3, [r3, #-84]
	add	r3, r3, #1
	sub	r2, fp, #12
	add	r3, r2, r3
	mov	r2, #0
	strb	r2, [r3, #-2052]
	sub	r3, fp, #4096
	sub	r3, r3, #12
	ldr	r3, [r3, #-84]
	add	r3, r3, #1
	mov	r2, r3
	sub	r3, fp, #2048
	sub	r3, r3, #12
	sub	r3, r3, #4
	mov	r1, r3
	mov	r0, #1
	bl	write
.L21:
	mov	r0, #0
	bl	exit
.L19:
	sub	r3, fp, #4096
	sub	r3, r3, #12
	ldr	r3, [r3, #-52]
	mov	r0, r3
	bl	close
	sub	r3, fp, #4096
	sub	r3, r3, #12
	ldr	r3, [r3, #-80]
	cmp	r3, #0
	bne	.L28
	sub	r3, fp, #4096
	sub	r3, r3, #12
	mov	r2, #0
	mov	r1, #0
	ldr	r0, [r3, #-56]
	bl	waitpid
.L28:
	nop
.L23:
	mov	r2, #1
	mov	r1, #0
	mvn	r0, #0
	bl	waitpid
	mov	r3, r0
	cmp	r3, #0
	bgt	.L23
	b	.L8
.L26:
	nop
	b	.L24
.L27:
	nop
.L8:
	b	.L24
.L30:
	.align	2
.L29:
	.word	.LC10
	.word	myexit
	.word	.LC1
	.word	.LC2
	.word	2047
	.word	.LC3
	.word	.LC4
	.word	.LC5
	.word	.LC6
	.word	stderr
	.word	.LC7
	.word	.LC8
	.word	.LC9
	.word	2046
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
