	.file	"120454.c"
	.intel_syntax noprefix
	.text
	.section	.rodata
	.align 4
	.type	MAX_ARGS, @object
	.size	MAX_ARGS, 4
MAX_ARGS:
	.long	5
	.align 4
	.type	MAX_PROGS_PIPED, @object
	.size	MAX_PROGS_PIPED, 4
MAX_PROGS_PIPED:
	.long	6
	.align 4
	.type	BUFFER_SIZE, @object
	.size	BUFFER_SIZE, 4
BUFFER_SIZE:
	.long	1024
	.text
	.globl	trim_whitespace
	.type	trim_whitespace, @function
trim_whitespace:
.LFB6:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	push	rbx
	sub	rsp, 56
	.cfi_offset 3, -24
	mov	QWORD PTR -56[rbp], rdi
	mov	rax, QWORD PTR -56[rbp]
	mov	rax, QWORD PTR [rax]
	movzx	eax, BYTE PTR [rax]
	test	al, al
	je	.L8
	mov	DWORD PTR -36[rbp], 0
	mov	rax, QWORD PTR -56[rbp]
	mov	rax, QWORD PTR [rax]
	mov	QWORD PTR -32[rbp], rax
	jmp	.L4
.L5:
	add	DWORD PTR -36[rbp], 1
	add	QWORD PTR -32[rbp], 1
.L4:
	call	__ctype_b_loc@PLT
	mov	rdx, QWORD PTR [rax]
	mov	rax, QWORD PTR -32[rbp]
	movzx	eax, BYTE PTR [rax]
	movzx	eax, al
	add	rax, rax
	add	rax, rdx
	movzx	eax, WORD PTR [rax]
	movzx	eax, ax
	and	eax, 8192
	test	eax, eax
	jne	.L5
	mov	rax, QWORD PTR -56[rbp]
	mov	rbx, QWORD PTR [rax]
	mov	rax, QWORD PTR -56[rbp]
	mov	rax, QWORD PTR [rax]
	mov	rdi, rax
	call	strlen@PLT
	sub	rax, 1
	add	rax, rbx
	mov	QWORD PTR -24[rbp], rax
	jmp	.L6
.L7:
	sub	QWORD PTR -24[rbp], 1
.L6:
	call	__ctype_b_loc@PLT
	mov	rdx, QWORD PTR [rax]
	mov	rax, QWORD PTR -24[rbp]
	movzx	eax, BYTE PTR [rax]
	movzx	eax, al
	add	rax, rax
	add	rax, rdx
	movzx	eax, WORD PTR [rax]
	movzx	eax, ax
	and	eax, 8192
	test	eax, eax
	jne	.L7
	mov	rax, QWORD PTR -24[rbp]
	add	rax, 1
	mov	BYTE PTR [rax], 0
	mov	rax, QWORD PTR -56[rbp]
	mov	rax, QWORD PTR [rax]
	mov	rdi, rax
	call	strlen@PLT
	mov	rdx, rax
	mov	rax, QWORD PTR -56[rbp]
	mov	rcx, QWORD PTR [rax]
	mov	eax, DWORD PTR -36[rbp]
	cdqe
	add	rcx, rax
	mov	rax, QWORD PTR -56[rbp]
	mov	rax, QWORD PTR [rax]
	mov	rsi, rcx
	mov	rdi, rax
	call	memmove@PLT
	jmp	.L1
.L8:
	nop
.L1:
	mov	rbx, QWORD PTR -8[rbp]
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	trim_whitespace, .-trim_whitespace
	.globl	tokenize
	.type	tokenize, @function
tokenize:
.LFB7:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	push	rbx
	sub	rsp, 56
	.cfi_offset 3, -24
	mov	QWORD PTR -56[rbp], rdi
	mov	eax, 5
	add	eax, 2
	mov	edx, 6
	imul	eax, edx
	cdqe
	mov	esi, 8
	mov	rdi, rax
	call	calloc@PLT
	mov	QWORD PTR -24[rbp], rax
	mov	QWORD PTR -40[rbp], 0
	mov	DWORD PTR -44[rbp], 0
	mov	WORD PTR -46[rbp], 0
	mov	QWORD PTR -32[rbp], 0
	jmp	.L10
.L15:
	mov	rdx, QWORD PTR -56[rbp]
	mov	rax, QWORD PTR -32[rbp]
	add	rax, rdx
	movzx	eax, BYTE PTR [rax]
	cmp	al, 34
	jne	.L11
	cmp	WORD PTR -46[rbp], 0
	je	.L12
	mov	eax, 1024
	cdqe
	mov	edx, DWORD PTR -44[rbp]
	movsx	rdx, edx
	lea	rcx, 0[0+rdx*8]
	mov	rdx, QWORD PTR -24[rbp]
	lea	rbx, [rcx+rdx]
	mov	esi, 1
	mov	rdi, rax
	call	calloc@PLT
	mov	QWORD PTR [rbx], rax
	mov	rax, QWORD PTR -32[rbp]
	sub	rax, QWORD PTR -40[rbp]
	mov	rdx, rax
	mov	rcx, QWORD PTR -56[rbp]
	mov	rax, QWORD PTR -40[rbp]
	add	rcx, rax
	mov	eax, DWORD PTR -44[rbp]
	lea	esi, 1[rax]
	mov	DWORD PTR -44[rbp], esi
	cdqe
	lea	rsi, 0[0+rax*8]
	mov	rax, QWORD PTR -24[rbp]
	add	rax, rsi
	mov	rax, QWORD PTR [rax]
	mov	rsi, rcx
	mov	rdi, rax
	call	strncpy@PLT
	mov	rax, QWORD PTR -32[rbp]
	sub	rax, QWORD PTR -40[rbp]
	mov	rdx, rax
	mov	rax, QWORD PTR -40[rbp]
	add	rax, rdx
	add	rax, 2
	mov	QWORD PTR -40[rbp], rax
	add	QWORD PTR -32[rbp], 1
	mov	WORD PTR -46[rbp], 0
	jmp	.L13
.L12:
	mov	WORD PTR -46[rbp], 1
	add	QWORD PTR -40[rbp], 1
	jmp	.L13
.L11:
	mov	rdx, QWORD PTR -56[rbp]
	mov	rax, QWORD PTR -32[rbp]
	add	rax, rdx
	movzx	eax, BYTE PTR [rax]
	cmp	al, 32
	jne	.L14
	cmp	WORD PTR -46[rbp], 0
	jne	.L14
	mov	eax, 1024
	cdqe
	mov	edx, DWORD PTR -44[rbp]
	movsx	rdx, edx
	lea	rcx, 0[0+rdx*8]
	mov	rdx, QWORD PTR -24[rbp]
	lea	rbx, [rcx+rdx]
	mov	esi, 1
	mov	rdi, rax
	call	calloc@PLT
	mov	QWORD PTR [rbx], rax
	mov	rax, QWORD PTR -32[rbp]
	sub	rax, QWORD PTR -40[rbp]
	mov	rdx, rax
	mov	rcx, QWORD PTR -56[rbp]
	mov	rax, QWORD PTR -40[rbp]
	add	rcx, rax
	mov	eax, DWORD PTR -44[rbp]
	lea	esi, 1[rax]
	mov	DWORD PTR -44[rbp], esi
	cdqe
	lea	rsi, 0[0+rax*8]
	mov	rax, QWORD PTR -24[rbp]
	add	rax, rsi
	mov	rax, QWORD PTR [rax]
	mov	rsi, rcx
	mov	rdi, rax
	call	strncpy@PLT
	mov	rax, QWORD PTR -32[rbp]
	sub	rax, QWORD PTR -40[rbp]
	mov	rdx, rax
	mov	rax, QWORD PTR -40[rbp]
	add	rax, rdx
	add	rax, 1
	mov	QWORD PTR -40[rbp], rax
	jmp	.L13
.L14:
	mov	rax, QWORD PTR -56[rbp]
	mov	rdi, rax
	call	strlen@PLT
	sub	rax, 1
	cmp	QWORD PTR -32[rbp], rax
	jne	.L13
	mov	eax, 1024
	cdqe
	mov	edx, DWORD PTR -44[rbp]
	movsx	rdx, edx
	lea	rcx, 0[0+rdx*8]
	mov	rdx, QWORD PTR -24[rbp]
	lea	rbx, [rcx+rdx]
	mov	esi, 1
	mov	rdi, rax
	call	calloc@PLT
	mov	QWORD PTR [rbx], rax
	mov	rax, QWORD PTR -32[rbp]
	sub	rax, QWORD PTR -40[rbp]
	lea	rdx, 1[rax]
	mov	rcx, QWORD PTR -56[rbp]
	mov	rax, QWORD PTR -40[rbp]
	add	rcx, rax
	mov	eax, DWORD PTR -44[rbp]
	lea	esi, 1[rax]
	mov	DWORD PTR -44[rbp], esi
	cdqe
	lea	rsi, 0[0+rax*8]
	mov	rax, QWORD PTR -24[rbp]
	add	rax, rsi
	mov	rax, QWORD PTR [rax]
	mov	rsi, rcx
	mov	rdi, rax
	call	strncpy@PLT
.L13:
	add	QWORD PTR -32[rbp], 1
.L10:
	mov	rax, QWORD PTR -56[rbp]
	mov	rdi, rax
	call	strlen@PLT
	cmp	QWORD PTR -32[rbp], rax
	jb	.L15
	mov	rax, QWORD PTR -24[rbp]
	mov	rbx, QWORD PTR -8[rbp]
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	tokenize, .-tokenize
	.globl	free_dp
	.type	free_dp, @function
free_dp:
.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, 32
	mov	QWORD PTR -24[rbp], rdi
	mov	DWORD PTR -4[rbp], 0
	jmp	.L18
.L19:
	mov	eax, DWORD PTR -4[rbp]
	lea	edx, 1[rax]
	mov	DWORD PTR -4[rbp], edx
	cdqe
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -24[rbp]
	add	rax, rdx
	mov	rax, QWORD PTR [rax]
	mov	rdi, rax
	call	free@PLT
.L18:
	mov	eax, DWORD PTR -4[rbp]
	cdqe
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -24[rbp]
	add	rax, rdx
	mov	rax, QWORD PTR [rax]
	test	rax, rax
	jne	.L19
	mov	rax, QWORD PTR -24[rbp]
	mov	rdi, rax
	call	free@PLT
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.size	free_dp, .-free_dp
	.globl	free_pargs
	.type	free_pargs, @function
free_pargs:
.LFB9:
	.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	QWORD PTR -24[rbp], rdi
	mov	DWORD PTR -4[rbp], 0
	jmp	.L21
.L22:
	mov	eax, DWORD PTR -4[rbp]
	cdqe
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -24[rbp]
	add	rax, rdx
	mov	rax, QWORD PTR [rax]
	mov	rdi, rax
	call	free_dp
	add	DWORD PTR -4[rbp], 1
.L21:
	mov	eax, 6
	cmp	DWORD PTR -4[rbp], eax
	jle	.L22
	nop
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE9:
	.size	free_pargs, .-free_pargs
	.section	.rodata
	.align 8
.LC0:
	.string	"Usage: ./cmd_interpreter path/to/file.txt"
.LC1:
	.string	"r"
.LC2:
	.string	"Opening of file failed"
.LC3:
	.string	"|"
.LC4:
	.string	"Pipe creation failed"
	.align 8
.LC5:
	.string	"Execution of program %s from line %ld failed\n"
	.align 8
.LC6:
	.string	"dup2 failed when trying to redirect output of current program to STDOUT\n"
	.align 8
.LC7:
	.string	"dup2 failed when trying to redirect input of previous program to STDIN\n"
	.align 8
.LC8:
	.string	"%ld.%d. Executing '%s', PPID: %d, PID: %d\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB10:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	push	r15
	push	r14
	push	r13
	push	r12
	push	rbx
	sub	rsp, 216
	.cfi_offset 15, -24
	.cfi_offset 14, -32
	.cfi_offset 13, -40
	.cfi_offset 12, -48
	.cfi_offset 3, -56
	mov	DWORD PTR -196[rbp], edi
	mov	QWORD PTR -208[rbp], rsi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -56[rbp], rax
	xor	eax, eax
	cmp	DWORD PTR -196[rbp], 2
	je	.L24
	call	__errno_location@PLT
	mov	DWORD PTR [rax], 22
	lea	rdi, .LC0[rip]
	call	perror@PLT
	mov	eax, 1
	jmp	.L58
.L24:
	mov	rax, QWORD PTR -208[rbp]
	mov	rax, QWORD PTR 8[rax]
	mov	QWORD PTR -112[rbp], rax
	mov	rax, QWORD PTR -112[rbp]
	lea	rsi, .LC1[rip]
	mov	rdi, rax
	call	fopen@PLT
	mov	QWORD PTR -104[rbp], rax
	cmp	QWORD PTR -104[rbp], 0
	jne	.L26
	call	__errno_location@PLT
	mov	DWORD PTR [rax], 5
	lea	rdi, .LC2[rip]
	call	perror@PLT
	mov	eax, 2
	jmp	.L58
.L26:
	mov	QWORD PTR -144[rbp], 0
	mov	QWORD PTR -136[rbp], 0
	mov	QWORD PTR -120[rbp], 1
	jmp	.L27
.L57:
	mov	rax, rsp
	mov	r12, rax
	lea	rax, -144[rbp]
	mov	rdi, rax
	call	trim_whitespace
	mov	rax, QWORD PTR -144[rbp]
	mov	rdi, rax
	call	tokenize
	mov	QWORD PTR -96[rbp], rax
	mov	eax, 6
	add	eax, 1
	cdqe
	sub	rax, 1
	mov	QWORD PTR -88[rbp], rax
	mov	eax, 6
	add	eax, 1
	cdqe
	mov	r14, rax
	mov	r15d, 0
	mov	eax, 6
	add	eax, 1
	cdqe
	mov	QWORD PTR -224[rbp], rax
	mov	QWORD PTR -216[rbp], 0
	mov	eax, 6
	add	eax, 1
	cdqe
	lea	rdx, 0[0+rax*8]
	mov	eax, 16
	sub	rax, 1
	add	rax, rdx
	mov	ebx, 16
	mov	edx, 0
	div	rbx
	imul	rax, rax, 16
	mov	rcx, rax
	and	rcx, -4096
	mov	rdx, rsp
	sub	rdx, rcx
.L28:
	cmp	rsp, rdx
	je	.L29
	sub	rsp, 4096
	or	QWORD PTR 4088[rsp], 0
	jmp	.L28
.L29:
	mov	rdx, rax
	and	edx, 4095
	sub	rsp, rdx
	mov	rdx, rax
	and	edx, 4095
	test	rdx, rdx
	je	.L30
	and	eax, 4095
	sub	rax, 8
	add	rax, rsp
	or	QWORD PTR [rax], 0
.L30:
	mov	rax, rsp
	add	rax, 7
	shr	rax, 3
	sal	rax, 3
	mov	QWORD PTR -80[rbp], rax
	mov	DWORD PTR -168[rbp], 0
	jmp	.L31
.L32:
	mov	eax, 5
	add	eax, 2
	cdqe
	mov	esi, 8
	mov	rdi, rax
	call	calloc@PLT
	mov	rcx, rax
	mov	rax, QWORD PTR -80[rbp]
	mov	edx, DWORD PTR -168[rbp]
	movsx	rdx, edx
	mov	QWORD PTR [rax+rdx*8], rcx
	add	DWORD PTR -168[rbp], 1
.L31:
	mov	eax, 6
	cmp	DWORD PTR -168[rbp], eax
	jle	.L32
	mov	DWORD PTR -172[rbp], 0
	mov	DWORD PTR -176[rbp], 0
	mov	rax, QWORD PTR -96[rbp]
	mov	QWORD PTR -128[rbp], rax
	jmp	.L33
.L36:
	mov	rax, QWORD PTR -128[rbp]
	mov	rax, QWORD PTR [rax]
	lea	rsi, .LC3[rip]
	mov	rdi, rax
	call	strcmp@PLT
	test	eax, eax
	je	.L34
	mov	eax, 1024
	cdqe
	mov	rdx, QWORD PTR -80[rbp]
	mov	ecx, DWORD PTR -172[rbp]
	movsx	rcx, ecx
	mov	rcx, QWORD PTR [rdx+rcx*8]
	mov	edx, DWORD PTR -176[rbp]
	movsx	rdx, edx
	sal	rdx, 3
	lea	rbx, [rcx+rdx]
	mov	esi, 1
	mov	rdi, rax
	call	calloc@PLT
	mov	QWORD PTR [rbx], rax
	mov	rax, QWORD PTR -128[rbp]
	mov	rax, QWORD PTR [rax]
	mov	rdi, rax
	call	strlen@PLT
	mov	rsi, rax
	mov	rax, QWORD PTR -128[rbp]
	mov	rcx, QWORD PTR [rax]
	mov	rax, QWORD PTR -80[rbp]
	mov	edx, DWORD PTR -172[rbp]
	movsx	rdx, edx
	mov	rdi, QWORD PTR [rax+rdx*8]
	mov	eax, DWORD PTR -176[rbp]
	lea	edx, 1[rax]
	mov	DWORD PTR -176[rbp], edx
	cdqe
	sal	rax, 3
	add	rax, rdi
	mov	rax, QWORD PTR [rax]
	mov	rdx, rsi
	mov	rsi, rcx
	mov	rdi, rax
	call	memcpy@PLT
	jmp	.L35
.L34:
	mov	DWORD PTR -176[rbp], 0
	add	DWORD PTR -172[rbp], 1
.L35:
	add	QWORD PTR -128[rbp], 8
.L33:
	mov	rax, QWORD PTR -128[rbp]
	mov	rax, QWORD PTR [rax]
	test	rax, rax
	jne	.L36
	mov	rax, QWORD PTR -96[rbp]
	mov	rdi, rax
	call	free_dp
	mov	eax, DWORD PTR -172[rbp]
	add	eax, 1
	mov	DWORD PTR -156[rbp], eax
	mov	eax, DWORD PTR -156[rbp]
	add	eax, eax
	mov	rdx, rsp
	mov	r13, rdx
	movsx	rdx, eax
	sub	rdx, 1
	mov	QWORD PTR -72[rbp], rdx
	movsx	rdx, eax
	mov	QWORD PTR -240[rbp], rdx
	mov	QWORD PTR -232[rbp], 0
	movsx	rdx, eax
	mov	QWORD PTR -256[rbp], rdx
	mov	QWORD PTR -248[rbp], 0
	cdqe
	lea	rdx, 0[0+rax*4]
	mov	eax, 16
	sub	rax, 1
	add	rax, rdx
	mov	ebx, 16
	mov	edx, 0
	div	rbx
	imul	rax, rax, 16
	mov	rcx, rax
	and	rcx, -4096
	mov	rdx, rsp
	sub	rdx, rcx
.L37:
	cmp	rsp, rdx
	je	.L38
	sub	rsp, 4096
	or	QWORD PTR 4088[rsp], 0
	jmp	.L37
.L38:
	mov	rdx, rax
	and	edx, 4095
	sub	rsp, rdx
	mov	rdx, rax
	and	edx, 4095
	test	rdx, rdx
	je	.L39
	and	eax, 4095
	sub	rax, 8
	add	rax, rsp
	or	QWORD PTR [rax], 0
.L39:
	mov	rax, rsp
	add	rax, 3
	shr	rax, 2
	sal	rax, 2
	mov	QWORD PTR -64[rbp], rax
	mov	DWORD PTR -180[rbp], 0
	jmp	.L40
.L43:
	mov	eax, DWORD PTR -180[rbp]
	add	eax, eax
	cdqe
	lea	rdx, 0[0+rax*4]
	mov	rax, QWORD PTR -64[rbp]
	add	rax, rdx
	mov	rdi, rax
	call	pipe@PLT
	test	eax, eax
	je	.L41
	lea	rdi, .LC4[rip]
	call	perror@PLT
	mov	rax, QWORD PTR -144[rbp]
	mov	rdi, rax
	call	free@PLT
	mov	rax, QWORD PTR -104[rbp]
	mov	rdi, rax
	call	fclose@PLT
	mov	rax, QWORD PTR -80[rbp]
	mov	rdi, rax
	call	free_pargs
	mov	eax, 3
	jmp	.L42
.L41:
	add	DWORD PTR -180[rbp], 1
.L40:
	mov	eax, DWORD PTR -180[rbp]
	cmp	eax, DWORD PTR -156[rbp]
	jl	.L43
	mov	DWORD PTR -184[rbp], 0
	jmp	.L44
.L51:
	call	fork@PLT
	mov	DWORD PTR -152[rbp], eax
	cmp	DWORD PTR -152[rbp], 0
	jns	.L45
	mov	rax, QWORD PTR -80[rbp]
	mov	edx, DWORD PTR -184[rbp]
	movsx	rdx, edx
	mov	rax, QWORD PTR [rax+rdx*8]
	mov	rdx, QWORD PTR [rax]
	mov	rax, QWORD PTR stderr[rip]
	mov	rcx, QWORD PTR -120[rbp]
	lea	rsi, .LC5[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	rax, QWORD PTR -144[rbp]
	mov	rdi, rax
	call	free@PLT
	mov	rax, QWORD PTR -104[rbp]
	mov	rdi, rax
	call	fclose@PLT
	mov	rax, QWORD PTR -80[rbp]
	mov	rdi, rax
	call	free_pargs
	mov	eax, 4
	jmp	.L42
.L45:
	cmp	DWORD PTR -152[rbp], 0
	jne	.L46
	mov	eax, DWORD PTR -184[rbp]
	lea	edx, 1[rax]
	mov	rax, QWORD PTR -80[rbp]
	movsx	rdx, edx
	mov	rax, QWORD PTR [rax+rdx*8]
	mov	rax, QWORD PTR [rax]
	test	rax, rax
	je	.L47
	mov	eax, DWORD PTR -184[rbp]
	add	eax, eax
	lea	edx, 1[rax]
	mov	rax, QWORD PTR -64[rbp]
	movsx	rdx, edx
	mov	eax, DWORD PTR [rax+rdx*4]
	mov	esi, 1
	mov	edi, eax
	call	dup2@PLT
	test	eax, eax
	jns	.L47
	mov	rax, QWORD PTR stderr[rip]
	mov	rcx, rax
	mov	edx, 72
	mov	esi, 1
	lea	rdi, .LC6[rip]
	call	fwrite@PLT
	mov	rax, QWORD PTR -144[rbp]
	mov	rdi, rax
	call	free@PLT
	mov	rax, QWORD PTR -104[rbp]
	mov	rdi, rax
	call	fclose@PLT
	mov	rax, QWORD PTR -80[rbp]
	mov	rdi, rax
	call	free_pargs
	mov	eax, 5
	jmp	.L42
.L47:
	cmp	DWORD PTR -184[rbp], 0
	jle	.L48
	mov	eax, DWORD PTR -184[rbp]
	sub	eax, 1
	lea	edx, [rax+rax]
	mov	rax, QWORD PTR -64[rbp]
	movsx	rdx, edx
	mov	eax, DWORD PTR [rax+rdx*4]
	mov	esi, 0
	mov	edi, eax
	call	dup2@PLT
	test	eax, eax
	jns	.L48
	mov	rax, QWORD PTR stderr[rip]
	mov	rcx, rax
	mov	edx, 71
	mov	esi, 1
	lea	rdi, .LC7[rip]
	call	fwrite@PLT
	mov	rax, QWORD PTR -144[rbp]
	mov	rdi, rax
	call	free@PLT
	mov	rax, QWORD PTR -104[rbp]
	mov	rdi, rax
	call	fclose@PLT
	mov	rax, QWORD PTR -80[rbp]
	mov	rdi, rax
	call	free_pargs
	mov	eax, 6
	jmp	.L42
.L48:
	mov	DWORD PTR -188[rbp], 0
	jmp	.L49
.L50:
	mov	rax, QWORD PTR -64[rbp]
	mov	edx, DWORD PTR -188[rbp]
	movsx	rdx, edx
	mov	eax, DWORD PTR [rax+rdx*4]
	mov	edi, eax
	call	close@PLT
	add	DWORD PTR -188[rbp], 1
.L49:
	mov	eax, DWORD PTR -156[rbp]
	add	eax, eax
	cmp	DWORD PTR -188[rbp], eax
	jl	.L50
	call	getpid@PLT
	mov	ebx, eax
	call	getppid@PLT
	mov	rdx, QWORD PTR -144[rbp]
	mov	esi, DWORD PTR -184[rbp]
	mov	rdi, QWORD PTR -120[rbp]
	mov	r9d, ebx
	mov	r8d, eax
	mov	rcx, rdx
	mov	edx, esi
	mov	rsi, rdi
	lea	rdi, .LC8[rip]
	mov	eax, 0
	call	printf@PLT
	mov	rax, QWORD PTR -80[rbp]
	mov	edx, DWORD PTR -184[rbp]
	movsx	rdx, edx
	mov	rdx, QWORD PTR [rax+rdx*8]
	mov	rax, QWORD PTR -80[rbp]
	mov	ecx, DWORD PTR -184[rbp]
	movsx	rcx, ecx
	mov	rax, QWORD PTR [rax+rcx*8]
	mov	rax, QWORD PTR [rax]
	mov	rsi, rdx
	mov	rdi, rax
	call	execvp@PLT
	mov	DWORD PTR -148[rbp], eax
	cmp	DWORD PTR -148[rbp], 0
	jns	.L46
	mov	rax, QWORD PTR -80[rbp]
	mov	edx, DWORD PTR -184[rbp]
	movsx	rdx, edx
	mov	rax, QWORD PTR [rax+rdx*8]
	mov	rax, QWORD PTR [rax]
	mov	rdi, rax
	call	perror@PLT
	mov	rax, QWORD PTR -144[rbp]
	mov	rdi, rax
	call	free@PLT
	mov	rax, QWORD PTR -104[rbp]
	mov	rdi, rax
	call	fclose@PLT
	mov	rax, QWORD PTR -80[rbp]
	mov	rdi, rax
	call	free_pargs
	mov	eax, 7
	jmp	.L42
.L46:
	add	DWORD PTR -184[rbp], 1
.L44:
	mov	rax, QWORD PTR -80[rbp]
	mov	edx, DWORD PTR -184[rbp]
	movsx	rdx, edx
	mov	rax, QWORD PTR [rax+rdx*8]
	mov	rax, QWORD PTR [rax]
	test	rax, rax
	jne	.L51
	mov	DWORD PTR -164[rbp], 0
	jmp	.L52
.L53:
	mov	rax, QWORD PTR -64[rbp]
	mov	edx, DWORD PTR -164[rbp]
	movsx	rdx, edx
	mov	eax, DWORD PTR [rax+rdx*4]
	mov	edi, eax
	call	close@PLT
	add	DWORD PTR -164[rbp], 1
.L52:
	mov	eax, DWORD PTR -156[rbp]
	add	eax, eax
	cmp	DWORD PTR -164[rbp], eax
	jl	.L53
	mov	DWORD PTR -160[rbp], 0
	jmp	.L54
.L55:
	mov	edi, 0
	call	wait@PLT
	add	DWORD PTR -160[rbp], 1
.L54:
	mov	eax, DWORD PTR -160[rbp]
	cmp	eax, DWORD PTR -156[rbp]
	jl	.L55
	add	QWORD PTR -120[rbp], 1
	mov	rax, QWORD PTR -80[rbp]
	mov	rdi, rax
	call	free_pargs
	mov	rsp, r13
	jmp	.L60
.L42:
	mov	rsp, r13
	mov	rsp, r12
	jmp	.L58
.L60:
	mov	rsp, r12
.L27:
	mov	rdx, QWORD PTR -104[rbp]
	lea	rcx, -136[rbp]
	lea	rax, -144[rbp]
	mov	rsi, rcx
	mov	rdi, rax
	call	getline@PLT
	cmp	rax, -1
	jne	.L57
	mov	rax, QWORD PTR -144[rbp]
	mov	rdi, rax
	call	free@PLT
	mov	rax, QWORD PTR -104[rbp]
	mov	rdi, rax
	call	fclose@PLT
	mov	eax, 0
.L58:
	mov	rbx, QWORD PTR -56[rbp]
	sub	rbx, QWORD PTR fs:40
	je	.L59
	call	__stack_chk_fail@PLT
.L59:
	lea	rsp, -40[rbp]
	pop	rbx
	pop	r12
	pop	r13
	pop	r14
	pop	r15
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE10:
	.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	"120454.c"
	.text
	.section	.rodata
	.align	2
	.type	MAX_ARGS, %object
	.size	MAX_ARGS, 4
MAX_ARGS:
	.word	5
	.align	2
	.type	MAX_PROGS_PIPED, %object
	.size	MAX_PROGS_PIPED, 4
MAX_PROGS_PIPED:
	.word	6
	.align	2
	.type	BUFFER_SIZE, %object
	.size	BUFFER_SIZE, 4
BUFFER_SIZE:
	.word	1024
	.text
	.align	2
	.global	trim_whitespace
	.syntax unified
	.arm
	.fpu softvfp
	.type	trim_whitespace, %function
trim_whitespace:
	@ args = 0, pretend = 0, frame = 24
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, r5, fp, lr}
	add	fp, sp, #12
	sub	sp, sp, #24
	str	r0, [fp, #-32]
	ldr	r3, [fp, #-32]
	ldr	r3, [r3]
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #0
	beq	.L8
	mov	r3, #0
	str	r3, [fp, #-24]
	ldr	r3, [fp, #-32]
	ldr	r3, [r3]
	str	r3, [fp, #-20]
	b	.L4
.L5:
	ldr	r3, [fp, #-24]
	add	r3, r3, #1
	str	r3, [fp, #-24]
	ldr	r3, [fp, #-20]
	add	r3, r3, #1
	str	r3, [fp, #-20]
.L4:
	bl	__ctype_b_loc
	mov	r3, r0
	ldr	r2, [r3]
	ldr	r3, [fp, #-20]
	ldrb	r3, [r3]	@ zero_extendqisi2
	lsl	r3, r3, #1
	add	r3, r2, r3
	ldrh	r3, [r3]
	and	r3, r3, #8192
	cmp	r3, #0
	bne	.L5
	ldr	r3, [fp, #-32]
	ldr	r4, [r3]
	ldr	r3, [fp, #-32]
	ldr	r3, [r3]
	mov	r0, r3
	bl	strlen
	mov	r3, r0
	sub	r3, r3, #1
	add	r3, r4, r3
	str	r3, [fp, #-16]
	b	.L6
.L7:
	ldr	r3, [fp, #-16]
	sub	r3, r3, #1
	str	r3, [fp, #-16]
.L6:
	bl	__ctype_b_loc
	mov	r3, r0
	ldr	r2, [r3]
	ldr	r3, [fp, #-16]
	ldrb	r3, [r3]	@ zero_extendqisi2
	lsl	r3, r3, #1
	add	r3, r2, r3
	ldrh	r3, [r3]
	and	r3, r3, #8192
	cmp	r3, #0
	bne	.L7
	ldr	r3, [fp, #-16]
	add	r3, r3, #1
	mov	r2, #0
	strb	r2, [r3]
	ldr	r3, [fp, #-32]
	ldr	r4, [r3]
	ldr	r3, [fp, #-32]
	ldr	r2, [r3]
	ldr	r3, [fp, #-24]
	add	r5, r2, r3
	ldr	r3, [fp, #-32]
	ldr	r3, [r3]
	mov	r0, r3
	bl	strlen
	mov	r3, r0
	mov	r2, r3
	mov	r1, r5
	mov	r0, r4
	bl	memmove
	b	.L1
.L8:
	nop
.L1:
	sub	sp, fp, #12
	@ sp needed
	pop	{r4, r5, fp, pc}
	.size	trim_whitespace, .-trim_whitespace
	.align	2
	.global	tokenize
	.syntax unified
	.arm
	.fpu softvfp
	.type	tokenize, %function
tokenize:
	@ args = 0, pretend = 0, frame = 32
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, fp, lr}
	add	fp, sp, #8
	sub	sp, sp, #36
	str	r0, [fp, #-40]
	mov	r3, #5
	add	r3, r3, #2
	mov	r2, #6
	mul	r3, r2, r3
	mov	r1, #4
	mov	r0, r3
	bl	calloc
	mov	r3, r0
	str	r3, [fp, #-16]
	mov	r3, #0
	str	r3, [fp, #-28]
	mov	r3, #0
	str	r3, [fp, #-24]
	mov	r3, #0
	strh	r3, [fp, #-30]	@ movhi
	mov	r3, #0
	str	r3, [fp, #-20]
	b	.L10
.L15:
	ldr	r2, [fp, #-40]
	ldr	r3, [fp, #-20]
	add	r3, r2, r3
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #34
	bne	.L11
	ldrsh	r3, [fp, #-30]
	cmp	r3, #0
	beq	.L12
	mov	r3, #1024
	mov	r0, r3
	ldr	r3, [fp, #-24]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-16]
	add	r4, r2, r3
	mov	r1, #1
	bl	calloc
	mov	r3, r0
	str	r3, [r4]
	ldr	r3, [fp, #-24]
	add	r2, r3, #1
	str	r2, [fp, #-24]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-16]
	add	r3, r2, r3
	ldr	r0, [r3]
	ldr	r2, [fp, #-40]
	ldr	r3, [fp, #-28]
	add	r1, r2, r3
	ldr	r2, [fp, #-20]
	ldr	r3, [fp, #-28]
	sub	r3, r2, r3
	mov	r2, r3
	bl	strncpy
	ldr	r2, [fp, #-20]
	ldr	r3, [fp, #-28]
	sub	r2, r2, r3
	ldr	r3, [fp, #-28]
	add	r3, r2, r3
	add	r3, r3, #2
	str	r3, [fp, #-28]
	ldr	r3, [fp, #-20]
	add	r3, r3, #1
	str	r3, [fp, #-20]
	mov	r3, #0
	strh	r3, [fp, #-30]	@ movhi
	b	.L13
.L12:
	mov	r3, #1
	strh	r3, [fp, #-30]	@ movhi
	ldr	r3, [fp, #-28]
	add	r3, r3, #1
	str	r3, [fp, #-28]
	b	.L13
.L11:
	ldr	r2, [fp, #-40]
	ldr	r3, [fp, #-20]
	add	r3, r2, r3
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #32
	bne	.L14
	ldrsh	r3, [fp, #-30]
	cmp	r3, #0
	bne	.L14
	mov	r3, #1024
	mov	r0, r3
	ldr	r3, [fp, #-24]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-16]
	add	r4, r2, r3
	mov	r1, #1
	bl	calloc
	mov	r3, r0
	str	r3, [r4]
	ldr	r3, [fp, #-24]
	add	r2, r3, #1
	str	r2, [fp, #-24]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-16]
	add	r3, r2, r3
	ldr	r0, [r3]
	ldr	r2, [fp, #-40]
	ldr	r3, [fp, #-28]
	add	r1, r2, r3
	ldr	r2, [fp, #-20]
	ldr	r3, [fp, #-28]
	sub	r3, r2, r3
	mov	r2, r3
	bl	strncpy
	ldr	r2, [fp, #-20]
	ldr	r3, [fp, #-28]
	sub	r2, r2, r3
	ldr	r3, [fp, #-28]
	add	r3, r2, r3
	add	r3, r3, #1
	str	r3, [fp, #-28]
	b	.L13
.L14:
	ldr	r0, [fp, #-40]
	bl	strlen
	mov	r3, r0
	sub	r3, r3, #1
	ldr	r2, [fp, #-20]
	cmp	r2, r3
	bne	.L13
	mov	r3, #1024
	mov	r0, r3
	ldr	r3, [fp, #-24]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-16]
	add	r4, r2, r3
	mov	r1, #1
	bl	calloc
	mov	r3, r0
	str	r3, [r4]
	ldr	r3, [fp, #-24]
	add	r2, r3, #1
	str	r2, [fp, #-24]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-16]
	add	r3, r2, r3
	ldr	r0, [r3]
	ldr	r2, [fp, #-40]
	ldr	r3, [fp, #-28]
	add	r1, r2, r3
	ldr	r2, [fp, #-20]
	ldr	r3, [fp, #-28]
	sub	r3, r2, r3
	add	r3, r3, #1
	mov	r2, r3
	bl	strncpy
.L13:
	ldr	r3, [fp, #-20]
	add	r3, r3, #1
	str	r3, [fp, #-20]
.L10:
	ldr	r0, [fp, #-40]
	bl	strlen
	mov	r2, r0
	ldr	r3, [fp, #-20]
	cmp	r3, r2
	bcc	.L15
	ldr	r3, [fp, #-16]
	mov	r0, r3
	sub	sp, fp, #8
	@ sp needed
	pop	{r4, fp, pc}
	.size	tokenize, .-tokenize
	.align	2
	.global	free_dp
	.syntax unified
	.arm
	.fpu softvfp
	.type	free_dp, %function
free_dp:
	@ 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, #-8]
	b	.L18
.L19:
	ldr	r3, [fp, #-8]
	add	r2, r3, #1
	str	r2, [fp, #-8]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-16]
	add	r3, r2, r3
	ldr	r3, [r3]
	mov	r0, r3
	bl	free
.L18:
	ldr	r3, [fp, #-8]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-16]
	add	r3, r2, r3
	ldr	r3, [r3]
	cmp	r3, #0
	bne	.L19
	ldr	r0, [fp, #-16]
	bl	free
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
	.size	free_dp, .-free_dp
	.align	2
	.global	free_pargs
	.syntax unified
	.arm
	.fpu softvfp
	.type	free_pargs, %function
free_pargs:
	@ 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, #-8]
	b	.L21
.L22:
	ldr	r3, [fp, #-8]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-16]
	add	r3, r2, r3
	ldr	r3, [r3]
	mov	r0, r3
	bl	free_dp
	ldr	r3, [fp, #-8]
	add	r3, r3, #1
	str	r3, [fp, #-8]
.L21:
	mov	r2, #6
	ldr	r3, [fp, #-8]
	cmp	r3, r2
	ble	.L22
	nop
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
	.size	free_pargs, .-free_pargs
	.section	.rodata
	.align	2
.LC0:
	.ascii	"Usage: ./cmd_interpreter path/to/file.txt\000"
	.align	2
.LC1:
	.ascii	"r\000"
	.align	2
.LC2:
	.ascii	"Opening of file failed\000"
	.align	2
.LC3:
	.ascii	"|\000"
	.align	2
.LC4:
	.ascii	"Pipe creation failed\000"
	.align	2
.LC5:
	.ascii	"Execution of program %s from line %ld failed\012\000"
	.align	2
.LC6:
	.ascii	"dup2 failed when trying to redirect output of curre"
	.ascii	"nt program to STDOUT\012\000"
	.align	2
.LC7:
	.ascii	"dup2 failed when trying to redirect input of previo"
	.ascii	"us program to STDIN\012\000"
	.align	2
.LC8:
	.ascii	"%ld.%d. Executing '%s', PPID: %d, PID: %d\012\000"
	.align	2
.LC9:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 104
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, fp, lr}
	add	fp, sp, #20
	sub	sp, sp, #112
	str	r0, [fp, #-120]
	str	r1, [fp, #-124]
	ldr	r3, .L55
	ldr	r3, [r3]
	str	r3, [fp, #-24]
	mov	r3,#0
	ldr	r3, [fp, #-120]
	cmp	r3, #2
	beq	.L24
	bl	__errno_location
	mov	r3, r0
	mov	r2, #22
	str	r2, [r3]
	ldr	r0, .L55+4
	bl	perror
	mov	r3, #1
	b	.L52
.L24:
	ldr	r3, [fp, #-124]
	ldr	r3, [r3, #4]
	str	r3, [fp, #-64]
	ldr	r1, .L55+8
	ldr	r0, [fp, #-64]
	bl	fopen
	str	r0, [fp, #-60]
	ldr	r3, [fp, #-60]
	cmp	r3, #0
	bne	.L26
	bl	__errno_location
	mov	r3, r0
	mov	r2, #5
	str	r2, [r3]
	ldr	r0, .L55+12
	bl	perror
	mov	r3, #2
	b	.L52
.L26:
	mov	r3, #0
	str	r3, [fp, #-112]
	mov	r3, #0
	str	r3, [fp, #-108]
	mov	r3, #1
	str	r3, [fp, #-76]
	b	.L27
.L51:
	mov	r3, sp
	mov	r6, r3
	sub	r3, fp, #112
	mov	r0, r3
	bl	trim_whitespace
	ldr	r3, [fp, #-112]
	mov	r0, r3
	bl	tokenize
	str	r0, [fp, #-56]
	mov	r3, #6
	str	r3, [fp, #-52]
	mov	r3, #6
	add	r3, r3, #1
	mov	r0, r3
	mov	r1, #0
	mov	r2, #0
	mov	r3, #0
	lsl	r3, r1, #5
	orr	r3, r3, r0, lsr #27
	lsl	r2, r0, #5
	mov	r3, #6
	add	r3, r3, #1
	mov	r0, r3
	mov	r1, #0
	mov	r2, #0
	mov	r3, #0
	lsl	r3, r1, #5
	orr	r3, r3, r0, lsr #27
	lsl	r2, r0, #5
	mov	r3, #6
	add	r3, r3, #1
	lsl	r3, r3, #2
	add	r3, r3, #7
	lsr	r3, r3, #3
	lsl	r3, r3, #3
	sub	sp, sp, r3
	add	r3, sp, #8
	add	r3, r3, #3
	lsr	r3, r3, #2
	lsl	r3, r3, #2
	str	r3, [fp, #-48]
	mov	r3, #0
	str	r3, [fp, #-80]
	b	.L28
.L29:
	mov	r3, #5
	add	r3, r3, #2
	mov	r1, #4
	mov	r0, r3
	bl	calloc
	mov	r3, r0
	mov	r1, r3
	ldr	r3, [fp, #-48]
	ldr	r2, [fp, #-80]
	str	r1, [r3, r2, lsl #2]
	ldr	r3, [fp, #-80]
	add	r3, r3, #1
	str	r3, [fp, #-80]
.L28:
	mov	r2, #6
	ldr	r3, [fp, #-80]
	cmp	r3, r2
	ble	.L29
	mov	r3, #0
	str	r3, [fp, #-84]
	mov	r3, #0
	str	r3, [fp, #-88]
	ldr	r3, [fp, #-56]
	str	r3, [fp, #-92]
	b	.L30
.L33:
	ldr	r3, [fp, #-92]
	ldr	r3, [r3]
	ldr	r1, .L55+16
	mov	r0, r3
	bl	strcmp
	mov	r3, r0
	cmp	r3, #0
	beq	.L31
	mov	r3, #1024
	mov	r0, r3
	ldr	r3, [fp, #-48]
	ldr	r2, [fp, #-84]
	ldr	r2, [r3, r2, lsl #2]
	ldr	r3, [fp, #-88]
	lsl	r3, r3, #2
	add	r4, r2, r3
	mov	r1, #1
	bl	calloc
	mov	r3, r0
	str	r3, [r4]
	ldr	r3, [fp, #-48]
	ldr	r2, [fp, #-84]
	ldr	r2, [r3, r2, lsl #2]
	ldr	r3, [fp, #-88]
	add	r1, r3, #1
	str	r1, [fp, #-88]
	lsl	r3, r3, #2
	add	r3, r2, r3
	ldr	r4, [r3]
	ldr	r3, [fp, #-92]
	ldr	r5, [r3]
	ldr	r3, [fp, #-92]
	ldr	r3, [r3]
	mov	r0, r3
	bl	strlen
	mov	r3, r0
	mov	r2, r3
	mov	r1, r5
	mov	r0, r4
	bl	memcpy
	b	.L32
.L31:
	mov	r3, #0
	str	r3, [fp, #-88]
	ldr	r3, [fp, #-84]
	add	r3, r3, #1
	str	r3, [fp, #-84]
.L32:
	ldr	r3, [fp, #-92]
	add	r3, r3, #4
	str	r3, [fp, #-92]
.L30:
	ldr	r3, [fp, #-92]
	ldr	r3, [r3]
	cmp	r3, #0
	bne	.L33
	ldr	r0, [fp, #-56]
	bl	free_dp
	ldr	r3, [fp, #-84]
	add	r3, r3, #1
	str	r3, [fp, #-44]
	ldr	r3, [fp, #-44]
	lsl	ip, r3, #1
	mov	r3, sp
	mov	r7, r3
	sub	r3, ip, #1
	str	r3, [fp, #-40]
	mov	r3, ip
	mov	r0, r3
	mov	r1, #0
	mov	r2, #0
	mov	r3, #0
	lsl	r3, r1, #5
	orr	r3, r3, r0, lsr #27
	lsl	r2, r0, #5
	mov	r3, ip
	mov	r0, r3
	mov	r1, #0
	mov	r2, #0
	mov	r3, #0
	lsl	r3, r1, #5
	orr	r3, r3, r0, lsr #27
	lsl	r2, r0, #5
	mov	r3, ip
	lsl	r3, r3, #2
	add	r3, r3, #7
	lsr	r3, r3, #3
	lsl	r3, r3, #3
	sub	sp, sp, r3
	add	r3, sp, #8
	add	r3, r3, #3
	lsr	r3, r3, #2
	lsl	r3, r3, #2
	str	r3, [fp, #-36]
	mov	r3, #0
	str	r3, [fp, #-96]
	b	.L34
.L37:
	ldr	r3, [fp, #-96]
	lsl	r3, r3, #3
	ldr	r2, [fp, #-36]
	add	r3, r2, r3
	mov	r0, r3
	bl	pipe
	mov	r3, r0
	cmp	r3, #0
	beq	.L35
	ldr	r0, .L55+20
	bl	perror
	ldr	r3, [fp, #-112]
	mov	r0, r3
	bl	free
	ldr	r0, [fp, #-60]
	bl	fclose
	ldr	r0, [fp, #-48]
	bl	free_pargs
	mov	r3, #3
	b	.L36
.L35:
	ldr	r3, [fp, #-96]
	add	r3, r3, #1
	str	r3, [fp, #-96]
.L34:
	ldr	r2, [fp, #-96]
	ldr	r3, [fp, #-44]
	cmp	r2, r3
	blt	.L37
	mov	r3, #0
	str	r3, [fp, #-100]
	b	.L38
.L45:
	bl	fork
	mov	r3, r0
	str	r3, [fp, #-32]
	ldr	r3, [fp, #-32]
	cmp	r3, #0
	bge	.L39
	ldr	r3, .L55+24
	ldr	r0, [r3]
	ldr	r3, [fp, #-48]
	ldr	r2, [fp, #-100]
	ldr	r3, [r3, r2, lsl #2]
	ldr	r2, [r3]
	ldr	r3, [fp, #-76]
	ldr	r1, .L55+28
	bl	fprintf
	ldr	r3, [fp, #-112]
	mov	r0, r3
	bl	free
	ldr	r0, [fp, #-60]
	bl	fclose
	ldr	r0, [fp, #-48]
	bl	free_pargs
	mov	r3, #4
	b	.L36
.L39:
	ldr	r3, [fp, #-32]
	cmp	r3, #0
	bne	.L40
	ldr	r3, [fp, #-100]
	add	r2, r3, #1
	ldr	r3, [fp, #-48]
	ldr	r3, [r3, r2, lsl #2]
	ldr	r3, [r3]
	cmp	r3, #0
	beq	.L41
	ldr	r3, [fp, #-100]
	lsl	r3, r3, #1
	add	r2, r3, #1
	ldr	r3, [fp, #-36]
	ldr	r3, [r3, r2, lsl #2]
	mov	r1, #1
	mov	r0, r3
	bl	dup2
	mov	r3, r0
	cmp	r3, #0
	bge	.L41
	ldr	r3, .L55+24
	ldr	r3, [r3]
	mov	r2, #72
	mov	r1, #1
	ldr	r0, .L55+32
	bl	fwrite
	ldr	r3, [fp, #-112]
	mov	r0, r3
	bl	free
	ldr	r0, [fp, #-60]
	bl	fclose
	ldr	r0, [fp, #-48]
	bl	free_pargs
	mov	r3, #5
	b	.L36
.L41:
	ldr	r3, [fp, #-100]
	cmp	r3, #0
	ble	.L42
	ldr	r3, [fp, #-100]
	sub	r3, r3, #1
	lsl	r2, r3, #1
	ldr	r3, [fp, #-36]
	ldr	r3, [r3, r2, lsl #2]
	mov	r1, #0
	mov	r0, r3
	bl	dup2
	mov	r3, r0
	cmp	r3, #0
	bge	.L42
	ldr	r3, .L55+24
	ldr	r3, [r3]
	mov	r2, #71
	mov	r1, #1
	ldr	r0, .L55+36
	bl	fwrite
	ldr	r3, [fp, #-112]
	mov	r0, r3
	bl	free
	ldr	r0, [fp, #-60]
	bl	fclose
	ldr	r0, [fp, #-48]
	bl	free_pargs
	mov	r3, #6
	b	.L36
.L42:
	mov	r3, #0
	str	r3, [fp, #-104]
	b	.L43
.L44:
	ldr	r3, [fp, #-36]
	ldr	r2, [fp, #-104]
	ldr	r3, [r3, r2, lsl #2]
	mov	r0, r3
	bl	close
	ldr	r3, [fp, #-104]
	add	r3, r3, #1
	str	r3, [fp, #-104]
.L43:
	ldr	r3, [fp, #-44]
	lsl	r3, r3, #1
	ldr	r2, [fp, #-104]
	cmp	r2, r3
	blt	.L44
	ldr	r4, [fp, #-112]
	bl	getppid
	mov	r5, r0
	bl	getpid
	mov	r3, r0
	str	r3, [sp, #4]
	str	r5, [sp]
	mov	r3, r4
	ldr	r2, [fp, #-100]
	ldr	r1, [fp, #-76]
	ldr	r0, .L55+40
	bl	printf
	ldr	r3, [fp, #-48]
	ldr	r2, [fp, #-100]
	ldr	r3, [r3, r2, lsl #2]
	ldr	r0, [r3]
	ldr	r3, [fp, #-48]
	ldr	r2, [fp, #-100]
	ldr	r3, [r3, r2, lsl #2]
	mov	r1, r3
	bl	execvp
	mov	r3, r0
	str	r3, [fp, #-28]
	ldr	r3, [fp, #-28]
	cmp	r3, #0
	bge	.L40
	ldr	r3, [fp, #-48]
	ldr	r2, [fp, #-100]
	ldr	r3, [r3, r2, lsl #2]
	ldr	r3, [r3]
	mov	r0, r3
	bl	perror
	ldr	r3, [fp, #-112]
	mov	r0, r3
	bl	free
	ldr	r0, [fp, #-60]
	bl	fclose
	ldr	r0, [fp, #-48]
	bl	free_pargs
	mov	r3, #7
	b	.L36
.L40:
	ldr	r3, [fp, #-100]
	add	r3, r3, #1
	str	r3, [fp, #-100]
.L38:
	ldr	r3, [fp, #-48]
	ldr	r2, [fp, #-100]
	ldr	r3, [r3, r2, lsl #2]
	ldr	r3, [r3]
	cmp	r3, #0
	bne	.L45
	mov	r3, #0
	str	r3, [fp, #-72]
	b	.L46
.L47:
	ldr	r3, [fp, #-36]
	ldr	r2, [fp, #-72]
	ldr	r3, [r3, r2, lsl #2]
	mov	r0, r3
	bl	close
	ldr	r3, [fp, #-72]
	add	r3, r3, #1
	str	r3, [fp, #-72]
.L46:
	ldr	r3, [fp, #-44]
	lsl	r3, r3, #1
	ldr	r2, [fp, #-72]
	cmp	r2, r3
	blt	.L47
	mov	r3, #0
	str	r3, [fp, #-68]
	b	.L48
.L49:
	mov	r0, #0
	bl	wait
	ldr	r3, [fp, #-68]
	add	r3, r3, #1
	str	r3, [fp, #-68]
.L48:
	ldr	r2, [fp, #-68]
	ldr	r3, [fp, #-44]
	cmp	r2, r3
	blt	.L49
	ldr	r3, [fp, #-76]
	add	r3, r3, #1
	str	r3, [fp, #-76]
	ldr	r0, [fp, #-48]
	bl	free_pargs
	mov	sp, r7
	b	.L54
.L36:
	mov	sp, r7
	mov	sp, r6
	b	.L52
.L54:
	mov	sp, r6
.L27:
	sub	r1, fp, #108
	sub	r3, fp, #112
	ldr	r2, [fp, #-60]
	mov	r0, r3
	bl	getline
	mov	r3, r0
	cmn	r3, #1
	bne	.L51
	ldr	r3, [fp, #-112]
	mov	r0, r3
	bl	free
	ldr	r0, [fp, #-60]
	bl	fclose
	mov	r3, #0
.L52:
	ldr	r2, .L55
	ldr	r1, [r2]
	ldr	r2, [fp, #-24]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L53
	bl	__stack_chk_fail
.L53:
	mov	r0, r3
	sub	sp, fp, #20
	@ sp needed
	pop	{r4, r5, r6, r7, fp, pc}
.L56:
	.align	2
.L55:
	.word	.LC9
	.word	.LC0
	.word	.LC1
	.word	.LC2
	.word	.LC3
	.word	.LC4
	.word	stderr
	.word	.LC5
	.word	.LC6
	.word	.LC7
	.word	.LC8
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
