	.file	"30194.c"
	.intel_syntax noprefix
	.text
	.section	.rodata
	.align 8
.LC0:
	.ascii	"\n\n########################################################"
	.ascii	"####\n\tEXECUTOR.\nEXECUTOR begin programs according to your"
	.ascii	" plan of execution.\n\n#####################################"
	.ascii	"#####"
	.string	"##################\nDescription.\n\texecuter [FILE\nFILE is a text file which contains info about programs to execute: \n\n#############################################################\nFORMAT:\n\t [SHIFT [PROG_NAME [ARG(1) ... [ARG(N)\n[SHIFT should be in seconds.\n"
	.text
	.globl	usage
	.type	usage, @function
usage:
.LFB6:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	lea	rdi, .LC0[rip]
	call	puts@PLT
	nop
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	usage, .-usage
	.section	.rodata
	.align 8
.LC1:
	.string	"Something went wrong with fork()\nReason: %s\n"
.LC2:
	.string	"tmp_sorted_programs.txt"
.LC3:
	.string	"-o"
.LC4:
	.string	"-n"
.LC5:
	.string	"sort"
	.align 8
.LC6:
	.string	"Something went wrong with execlp()\nReason: %s\n"
	.align 8
.LC7:
	.string	"Something went wrong with waitpid()\nReason: %s\n"
.LC8:
	.string	"sort ended with code %d\n"
	.text
	.globl	sort_programs
	.type	sort_programs, @function
sort_programs:
.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, 48
	mov	QWORD PTR -40[rbp], rdi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	DWORD PTR -24[rbp], 0
	call	fork@PLT
	mov	DWORD PTR -20[rbp], eax
	cmp	DWORD PTR -20[rbp], -1
	je	.L3
	cmp	DWORD PTR -20[rbp], 0
	je	.L4
	jmp	.L14
.L3:
	call	__errno_location@PLT
	mov	eax, DWORD PTR [rax]
	mov	edi, eax
	call	strerror@PLT
	mov	rsi, rax
	lea	rdi, .LC1[rip]
	mov	eax, 0
	call	printf@PLT
	mov	eax, -1
	jmp	.L12
.L4:
	mov	rax, QWORD PTR -40[rbp]
	sub	rsp, 8
	push	0
	lea	r9, .LC2[rip]
	lea	r8, .LC3[rip]
	mov	rcx, rax
	lea	rdx, .LC4[rip]
	lea	rsi, .LC5[rip]
	lea	rdi, .LC5[rip]
	mov	eax, 0
	call	execlp@PLT
	add	rsp, 16
	mov	DWORD PTR -16[rbp], eax
	cmp	DWORD PTR -16[rbp], -1
	jne	.L15
	call	__errno_location@PLT
	mov	eax, DWORD PTR [rax]
	mov	edi, eax
	call	strerror@PLT
	mov	rdx, rax
	mov	rax, QWORD PTR stderr[rip]
	lea	rsi, .LC6[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	eax, -1
	jmp	.L12
.L14:
	lea	rcx, -28[rbp]
	mov	eax, DWORD PTR -20[rbp]
	mov	edx, 0
	mov	rsi, rcx
	mov	edi, eax
	mov	eax, 0
	call	waitpid@PLT
	mov	DWORD PTR -12[rbp], eax
	cmp	DWORD PTR -12[rbp], -1
	jne	.L16
	call	__errno_location@PLT
	mov	eax, DWORD PTR [rax]
	mov	edi, eax
	call	strerror@PLT
	mov	rdx, rax
	mov	rax, QWORD PTR stderr[rip]
	lea	rsi, .LC7[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	eax, -1
	jmp	.L12
.L15:
	nop
	jmp	.L8
.L16:
	nop
.L8:
	mov	eax, DWORD PTR -28[rbp]
	test	eax, eax
	je	.L10
	mov	eax, DWORD PTR -28[rbp]
	mov	esi, eax
	lea	rdi, .LC8[rip]
	mov	eax, 0
	call	printf@PLT
	mov	eax, -1
	jmp	.L12
.L10:
	mov	eax, DWORD PTR -28[rbp]
	and	eax, 127
	test	eax, eax
	jne	.L11
	mov	eax, 0
	jmp	.L12
.L11:
	mov	eax, -1
.L12:
	mov	rcx, QWORD PTR -8[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L13
	call	__stack_chk_fail@PLT
.L13:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	sort_programs, .-sort_programs
	.globl	free_memory
	.type	free_memory, @function
free_memory:
.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
	cmp	QWORD PTR -24[rbp], 0
	je	.L26
	mov	DWORD PTR -8[rbp], 0
	jmp	.L20
.L25:
	mov	eax, DWORD PTR -8[rbp]
	cdqe
	sal	rax, 5
	mov	rdx, rax
	mov	rax, QWORD PTR -24[rbp]
	add	rax, rdx
	mov	rax, QWORD PTR 8[rax]
	test	rax, rax
	je	.L21
	mov	eax, DWORD PTR -8[rbp]
	cdqe
	sal	rax, 5
	mov	rdx, rax
	mov	rax, QWORD PTR -24[rbp]
	add	rax, rdx
	mov	rax, QWORD PTR 8[rax]
	mov	rdi, rax
	call	free@PLT
	mov	eax, DWORD PTR -8[rbp]
	cdqe
	sal	rax, 5
	mov	rdx, rax
	mov	rax, QWORD PTR -24[rbp]
	add	rax, rdx
	mov	QWORD PTR 8[rax], 0
.L21:
	mov	DWORD PTR -4[rbp], 0
	jmp	.L22
.L24:
	mov	eax, DWORD PTR -8[rbp]
	cdqe
	sal	rax, 5
	mov	rdx, rax
	mov	rax, QWORD PTR -24[rbp]
	add	rax, rdx
	mov	rdx, QWORD PTR 16[rax]
	mov	eax, DWORD PTR -4[rbp]
	cdqe
	sal	rax, 3
	add	rax, rdx
	mov	rax, QWORD PTR [rax]
	test	rax, rax
	je	.L23
	mov	eax, DWORD PTR -8[rbp]
	cdqe
	sal	rax, 5
	mov	rdx, rax
	mov	rax, QWORD PTR -24[rbp]
	add	rax, rdx
	mov	rdx, QWORD PTR 16[rax]
	mov	eax, DWORD PTR -4[rbp]
	cdqe
	sal	rax, 3
	add	rax, rdx
	mov	rax, QWORD PTR [rax]
	mov	rdi, rax
	call	free@PLT
	mov	eax, DWORD PTR -8[rbp]
	cdqe
	sal	rax, 5
	mov	rdx, rax
	mov	rax, QWORD PTR -24[rbp]
	add	rax, rdx
	mov	rdx, QWORD PTR 16[rax]
	mov	eax, DWORD PTR -4[rbp]
	cdqe
	sal	rax, 3
	add	rax, rdx
	mov	QWORD PTR [rax], 0
.L23:
	add	DWORD PTR -4[rbp], 1
.L22:
	cmp	DWORD PTR -4[rbp], 15
	jle	.L24
	mov	eax, DWORD PTR -8[rbp]
	cdqe
	sal	rax, 5
	mov	rdx, rax
	mov	rax, QWORD PTR -24[rbp]
	add	rax, rdx
	mov	rax, QWORD PTR 16[rax]
	mov	rdi, rax
	call	free@PLT
	mov	eax, DWORD PTR -8[rbp]
	cdqe
	sal	rax, 5
	mov	rdx, rax
	mov	rax, QWORD PTR -24[rbp]
	add	rax, rdx
	mov	QWORD PTR 16[rax], 0
	add	DWORD PTR -8[rbp], 1
.L20:
	cmp	DWORD PTR -8[rbp], 127
	jle	.L25
	mov	rax, QWORD PTR -24[rbp]
	mov	rdi, rax
	call	free@PLT
	mov	QWORD PTR -24[rbp], 0
	jmp	.L17
.L26:
	nop
.L17:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.size	free_memory, .-free_memory
	.section	.rodata
	.align 8
.LC9:
	.string	"Can't allocate memory for array of programs\nReason: %s"
	.align 8
.LC10:
	.string	"Can't allocate memory for prog_name array\nReason: %s"
	.align 8
.LC11:
	.string	"Can't allocate memory for args array\nReason: %s"
	.align 8
.LC12:
	.string	"Can't allocate memory for args[%d] array\nReason: %s"
	.text
	.globl	allocate_memory
	.type	allocate_memory, @function
allocate_memory:
.LFB9:
	.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, 24
	.cfi_offset 3, -24
	mov	esi, 32
	mov	edi, 128
	call	calloc@PLT
	mov	QWORD PTR -24[rbp], rax
	cmp	QWORD PTR -24[rbp], 0
	jne	.L28
	call	__errno_location@PLT
	mov	eax, DWORD PTR [rax]
	mov	edi, eax
	call	strerror@PLT
	mov	rdx, rax
	mov	rax, QWORD PTR stderr[rip]
	lea	rsi, .LC9[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	eax, 0
	jmp	.L29
.L28:
	mov	DWORD PTR -32[rbp], 0
	jmp	.L30
.L37:
	mov	eax, DWORD PTR -32[rbp]
	cdqe
	sal	rax, 5
	mov	rdx, rax
	mov	rax, QWORD PTR -24[rbp]
	lea	rbx, [rdx+rax]
	mov	esi, 1
	mov	edi, 64
	call	calloc@PLT
	mov	QWORD PTR 8[rbx], rax
	mov	eax, DWORD PTR -32[rbp]
	cdqe
	sal	rax, 5
	mov	rdx, rax
	mov	rax, QWORD PTR -24[rbp]
	add	rax, rdx
	mov	rax, QWORD PTR 8[rax]
	test	rax, rax
	jne	.L31
	call	__errno_location@PLT
	mov	eax, DWORD PTR [rax]
	mov	edi, eax
	call	strerror@PLT
	mov	rdx, rax
	mov	rax, QWORD PTR stderr[rip]
	lea	rsi, .LC10[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	jmp	.L32
.L31:
	mov	eax, DWORD PTR -32[rbp]
	cdqe
	sal	rax, 5
	mov	rdx, rax
	mov	rax, QWORD PTR -24[rbp]
	lea	rbx, [rdx+rax]
	mov	esi, 8
	mov	edi, 16
	call	calloc@PLT
	mov	QWORD PTR 16[rbx], rax
	mov	eax, DWORD PTR -32[rbp]
	cdqe
	sal	rax, 5
	mov	rdx, rax
	mov	rax, QWORD PTR -24[rbp]
	add	rax, rdx
	mov	rax, QWORD PTR 16[rax]
	test	rax, rax
	jne	.L33
	call	__errno_location@PLT
	mov	eax, DWORD PTR [rax]
	mov	edi, eax
	call	strerror@PLT
	mov	rdx, rax
	mov	rax, QWORD PTR stderr[rip]
	lea	rsi, .LC11[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	jmp	.L32
.L33:
	mov	DWORD PTR -28[rbp], 0
	jmp	.L34
.L36:
	mov	eax, DWORD PTR -32[rbp]
	cdqe
	sal	rax, 5
	mov	rdx, rax
	mov	rax, QWORD PTR -24[rbp]
	add	rax, rdx
	mov	rdx, QWORD PTR 16[rax]
	mov	eax, DWORD PTR -28[rbp]
	cdqe
	sal	rax, 3
	lea	rbx, [rdx+rax]
	mov	esi, 1
	mov	edi, 64
	call	calloc@PLT
	mov	QWORD PTR [rbx], rax
	mov	eax, DWORD PTR -32[rbp]
	cdqe
	sal	rax, 5
	mov	rdx, rax
	mov	rax, QWORD PTR -24[rbp]
	add	rax, rdx
	mov	rdx, QWORD PTR 16[rax]
	mov	eax, DWORD PTR -28[rbp]
	cdqe
	sal	rax, 3
	add	rax, rdx
	mov	rax, QWORD PTR [rax]
	test	rax, rax
	jne	.L35
	call	__errno_location@PLT
	mov	eax, DWORD PTR [rax]
	mov	edi, eax
	call	strerror@PLT
	mov	rcx, rax
	mov	rax, QWORD PTR stderr[rip]
	mov	edx, DWORD PTR -28[rbp]
	lea	rsi, .LC12[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	jmp	.L32
.L35:
	add	DWORD PTR -28[rbp], 1
.L34:
	cmp	DWORD PTR -28[rbp], 15
	jle	.L36
	add	DWORD PTR -32[rbp], 1
.L30:
	cmp	DWORD PTR -32[rbp], 127
	jle	.L37
	mov	rax, QWORD PTR -24[rbp]
	jmp	.L29
.L32:
	mov	rax, QWORD PTR -24[rbp]
	mov	rdi, rax
	call	free_memory
	mov	eax, 0
.L29:
	mov	rbx, QWORD PTR -8[rbp]
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE9:
	.size	allocate_memory, .-allocate_memory
	.section	.rodata
.LC13:
	.string	"r"
	.align 8
.LC14:
	.string	"Can't open file \"tmp_sorted_programs.txt\"\n"
.LC15:
	.string	" \n"
	.align 8
.LC16:
	.string	"Something went wrong with time in line: %s\n"
	.align 8
.LC17:
	.string	"Incorrect time argument in program in line %s\n"
	.text
	.globl	read_programs
	.type	read_programs, @function
read_programs:
.LFB10:
	.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
	lea	rsi, .LC13[rip]
	lea	rdi, .LC2[rip]
	call	fopen@PLT
	mov	QWORD PTR -296[rbp], rax
	cmp	QWORD PTR -296[rbp], 0
	jne	.L39
	mov	rax, QWORD PTR stderr[rip]
	mov	rcx, rax
	mov	edx, 42
	mov	esi, 1
	lea	rdi, .LC14[rip]
	call	fwrite@PLT
	mov	eax, 0
	jmp	.L50
.L39:
	mov	eax, 0
	call	allocate_memory
	mov	QWORD PTR -288[rbp], rax
	cmp	QWORD PTR -288[rbp], 0
	jne	.L41
	mov	eax, 0
	jmp	.L50
.L41:
	lea	rax, .LC15[rip]
	mov	QWORD PTR -280[rbp], rax
	mov	DWORD PTR -320[rbp], 0
	jmp	.L42
.L49:
	lea	rdx, -272[rbp]
	lea	rax, -144[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	strcpy@PLT
	mov	QWORD PTR -312[rbp], 0
	mov	rdx, QWORD PTR -280[rbp]
	lea	rax, -272[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	strtok@PLT
	mov	QWORD PTR -304[rbp], rax
	cmp	QWORD PTR -304[rbp], 0
	jne	.L43
	mov	rax, QWORD PTR stderr[rip]
	lea	rdx, -144[rbp]
	lea	rsi, .LC16[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	eax, 0
	call	usage
	jmp	.L48
.L43:
	lea	rcx, -312[rbp]
	mov	rax, QWORD PTR -304[rbp]
	mov	edx, 10
	mov	rsi, rcx
	mov	rdi, rax
	call	strtol@PLT
	mov	edx, DWORD PTR -320[rbp]
	movsx	rdx, edx
	mov	rcx, rdx
	sal	rcx, 5
	mov	rdx, QWORD PTR -288[rbp]
	add	rdx, rcx
	mov	DWORD PTR [rdx], eax
	mov	rax, QWORD PTR -312[rbp]
	movzx	eax, BYTE PTR [rax]
	movzx	eax, al
	test	eax, eax
	je	.L45
	mov	rax, QWORD PTR stderr[rip]
	lea	rdx, -144[rbp]
	lea	rsi, .LC17[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	eax, 0
	call	usage
	jmp	.L48
.L45:
	mov	rax, QWORD PTR -280[rbp]
	mov	rsi, rax
	mov	edi, 0
	call	strtok@PLT
	mov	QWORD PTR -304[rbp], rax
	mov	DWORD PTR -316[rbp], 0
	jmp	.L46
.L47:
	mov	eax, DWORD PTR -320[rbp]
	cdqe
	sal	rax, 5
	mov	rdx, rax
	mov	rax, QWORD PTR -288[rbp]
	add	rax, rdx
	mov	rdx, QWORD PTR 16[rax]
	mov	eax, DWORD PTR -316[rbp]
	cdqe
	sal	rax, 3
	add	rax, rdx
	mov	rax, QWORD PTR [rax]
	mov	rdx, QWORD PTR -304[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	strcpy@PLT
	add	DWORD PTR -316[rbp], 1
	mov	rax, QWORD PTR -280[rbp]
	mov	rsi, rax
	mov	edi, 0
	call	strtok@PLT
	mov	QWORD PTR -304[rbp], rax
.L46:
	cmp	QWORD PTR -304[rbp], 0
	jne	.L47
	mov	eax, DWORD PTR -320[rbp]
	cdqe
	sal	rax, 5
	mov	rdx, rax
	mov	rax, QWORD PTR -288[rbp]
	add	rax, rdx
	mov	rdx, QWORD PTR 16[rax]
	mov	eax, DWORD PTR -316[rbp]
	cdqe
	sal	rax, 3
	add	rax, rdx
	mov	QWORD PTR [rax], 0
	mov	eax, DWORD PTR -320[rbp]
	cdqe
	sal	rax, 5
	mov	rdx, rax
	mov	rax, QWORD PTR -288[rbp]
	add	rdx, rax
	mov	eax, DWORD PTR -316[rbp]
	mov	DWORD PTR 4[rdx], eax
	add	DWORD PTR -320[rbp], 1
.L42:
	mov	rdx, QWORD PTR -296[rbp]
	lea	rax, -272[rbp]
	mov	esi, 123
	mov	rdi, rax
	call	fgets@PLT
	test	rax, rax
	jne	.L49
	mov	rax, QWORD PTR -296[rbp]
	mov	rdi, rax
	call	fclose@PLT
	mov	rax, QWORD PTR -288[rbp]
	jmp	.L50
.L48:
	mov	rax, QWORD PTR -296[rbp]
	mov	rdi, rax
	call	fclose@PLT
	mov	rax, QWORD PTR -288[rbp]
	mov	rdi, rax
	call	free_memory
	mov	eax, 0
.L50:
	mov	rcx, QWORD PTR -8[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L51
	call	__stack_chk_fail@PLT
.L51:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE10:
	.size	read_programs, .-read_programs
	.section	.rodata
.LC18:
	.string	"Error in fork()\n"
.LC19:
	.string	"execvp() error with %s: %s\n"
	.align 8
.LC20:
	.string	"process %s ended with code %d\n"
	.text
	.globl	run_programs
	.type	run_programs, @function
run_programs:
.LFB11:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 64
	mov	QWORD PTR -56[rbp], rdi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	DWORD PTR -32[rbp], 0
	mov	DWORD PTR -28[rbp], 0
	mov	DWORD PTR -20[rbp], 0
	mov	DWORD PTR -24[rbp], 0
	mov	DWORD PTR -40[rbp], 0
	jmp	.L53
.L62:
	mov	eax, DWORD PTR -40[rbp]
	cdqe
	sal	rax, 5
	mov	rdx, rax
	mov	rax, QWORD PTR -56[rbp]
	add	rax, rdx
	mov	rax, QWORD PTR 16[rax]
	mov	rax, QWORD PTR [rax]
	test	rax, rax
	je	.L54
	mov	eax, DWORD PTR -40[rbp]
	cdqe
	sal	rax, 5
	mov	rdx, rax
	mov	rax, QWORD PTR -56[rbp]
	add	rax, rdx
	mov	eax, DWORD PTR [rax]
	sub	eax, DWORD PTR -28[rbp]
	mov	DWORD PTR -32[rbp], eax
.L54:
	cmp	DWORD PTR -32[rbp], 0
	jle	.L55
	mov	eax, DWORD PTR -32[rbp]
	mov	edi, eax
	call	sleep@PLT
	mov	eax, DWORD PTR -32[rbp]
	add	DWORD PTR -28[rbp], eax
.L55:
	mov	eax, DWORD PTR -40[rbp]
	cdqe
	sal	rax, 5
	mov	rdx, rax
	mov	rax, QWORD PTR -56[rbp]
	add	rax, rdx
	mov	rax, QWORD PTR 16[rax]
	mov	rax, QWORD PTR [rax]
	test	rax, rax
	je	.L70
	mov	eax, DWORD PTR -40[rbp]
	cdqe
	sal	rax, 5
	mov	rdx, rax
	mov	rax, QWORD PTR -56[rbp]
	add	rax, rdx
	mov	rax, QWORD PTR 16[rax]
	mov	rax, QWORD PTR [rax]
	movzx	eax, BYTE PTR [rax]
	movzx	eax, al
	test	eax, eax
	je	.L70
	call	fork@PLT
	mov	DWORD PTR -12[rbp], eax
	cmp	DWORD PTR -12[rbp], -1
	je	.L57
	cmp	DWORD PTR -12[rbp], 0
	je	.L58
	jmp	.L69
.L57:
	mov	rax, QWORD PTR stderr[rip]
	mov	rcx, rax
	mov	edx, 16
	mov	esi, 1
	lea	rdi, .LC18[rip]
	call	fwrite@PLT
	mov	eax, -1
	jmp	.L60
.L58:
	mov	eax, DWORD PTR -40[rbp]
	cdqe
	sal	rax, 5
	mov	rdx, rax
	mov	rax, QWORD PTR -56[rbp]
	add	rax, rdx
	mov	rdx, QWORD PTR 16[rax]
	mov	eax, DWORD PTR -40[rbp]
	cdqe
	sal	rax, 5
	mov	rcx, rax
	mov	rax, QWORD PTR -56[rbp]
	add	rax, rcx
	mov	rax, QWORD PTR 16[rax]
	mov	rax, QWORD PTR [rax]
	mov	rsi, rdx
	mov	rdi, rax
	call	execvp@PLT
	cmp	eax, -1
	jne	.L71
	call	__errno_location@PLT
	mov	eax, DWORD PTR [rax]
	mov	edi, eax
	call	strerror@PLT
	mov	rcx, rax
	mov	eax, DWORD PTR -40[rbp]
	cdqe
	sal	rax, 5
	mov	rdx, rax
	mov	rax, QWORD PTR -56[rbp]
	add	rax, rdx
	mov	rax, QWORD PTR 16[rax]
	mov	rdx, QWORD PTR [rax]
	mov	rax, QWORD PTR stderr[rip]
	lea	rsi, .LC19[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	eax, -1
	jmp	.L60
.L69:
	mov	eax, DWORD PTR -40[rbp]
	cdqe
	sal	rax, 5
	mov	rdx, rax
	mov	rax, QWORD PTR -56[rbp]
	add	rdx, rax
	mov	eax, DWORD PTR -12[rbp]
	mov	DWORD PTR 24[rdx], eax
	add	DWORD PTR -24[rbp], 1
	jmp	.L56
.L70:
	nop
	jmp	.L56
.L71:
	nop
.L56:
	add	DWORD PTR -40[rbp], 1
.L53:
	cmp	DWORD PTR -40[rbp], 127
	jle	.L62
	jmp	.L63
.L67:
	lea	rax, -44[rbp]
	mov	edx, 0
	mov	rsi, rax
	mov	edi, -1
	mov	eax, 0
	call	waitpid@PLT
	mov	DWORD PTR -16[rbp], eax
	mov	DWORD PTR -36[rbp], 0
	jmp	.L64
.L66:
	mov	eax, DWORD PTR -36[rbp]
	cdqe
	sal	rax, 5
	mov	rdx, rax
	mov	rax, QWORD PTR -56[rbp]
	add	rax, rdx
	mov	eax, DWORD PTR 24[rax]
	cmp	DWORD PTR -16[rbp], eax
	jne	.L65
	mov	edx, DWORD PTR -44[rbp]
	mov	eax, DWORD PTR -36[rbp]
	cdqe
	sal	rax, 5
	mov	rcx, rax
	mov	rax, QWORD PTR -56[rbp]
	add	rax, rcx
	mov	rax, QWORD PTR 16[rax]
	mov	rax, QWORD PTR [rax]
	mov	rsi, rax
	lea	rdi, .LC20[rip]
	mov	eax, 0
	call	printf@PLT
	mov	eax, DWORD PTR -36[rbp]
	cdqe
	sal	rax, 5
	mov	rdx, rax
	mov	rax, QWORD PTR -56[rbp]
	add	rax, rdx
	mov	DWORD PTR 24[rax], -1
	sub	DWORD PTR -24[rbp], 1
.L65:
	add	DWORD PTR -36[rbp], 1
.L64:
	mov	eax, DWORD PTR -36[rbp]
	cmp	eax, DWORD PTR -40[rbp]
	jl	.L66
.L63:
	cmp	DWORD PTR -24[rbp], 0
	jg	.L67
	mov	eax, 0
.L60:
	mov	rsi, QWORD PTR -8[rbp]
	sub	rsi, QWORD PTR fs:40
	je	.L68
	call	__stack_chk_fail@PLT
.L68:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE11:
	.size	run_programs, .-run_programs
	.section	.rodata
.LC21:
	.string	"Error in sorting."
	.text
	.globl	main
	.type	main, @function
main:
.LFB12:
	.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	QWORD PTR -32[rbp], rsi
	cmp	DWORD PTR -20[rbp], 2
	je	.L73
	mov	eax, 0
	call	usage
	mov	edi, 1
	call	exit@PLT
.L73:
	mov	rax, QWORD PTR -32[rbp]
	add	rax, 8
	mov	rax, QWORD PTR [rax]
	mov	rdi, rax
	call	sort_programs
	mov	DWORD PTR -16[rbp], eax
	cmp	DWORD PTR -16[rbp], -1
	jne	.L74
	lea	rdi, .LC21[rip]
	call	puts@PLT
	mov	edi, 1
	call	exit@PLT
.L74:
	mov	eax, 0
	call	read_programs
	mov	QWORD PTR -8[rbp], rax
	cmp	QWORD PTR -8[rbp], 0
	je	.L80
	mov	rax, QWORD PTR -8[rbp]
	mov	rdi, rax
	call	run_programs
	mov	DWORD PTR -12[rbp], eax
	cmp	DWORD PTR -12[rbp], -1
	je	.L81
	mov	rax, QWORD PTR -8[rbp]
	mov	rdi, rax
	call	free_memory
	mov	eax, 0
	jmp	.L79
.L80:
	nop
	jmp	.L76
.L81:
	nop
.L76:
	mov	rax, QWORD PTR -8[rbp]
	mov	rdi, rax
	call	free_memory
	mov	edi, 1
	call	exit@PLT
.L79:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE12:
	.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	"30194.c"
	.text
	.section	.rodata
	.align	2
.LC0:
	.ascii	"\012\012###########################################"
	.ascii	"#################\012\011EXECUTOR.\012EXECUTOR begi"
	.ascii	"n programs according to your plan of execution.\012"
	.ascii	"\012###############################################"
	.ascii	"#############\012Description.\012\011executer [FILE"
	.ascii	"\012FILE is a text file which contains info about p"
	.ascii	"rograms to execute: \012\012#######################"
	.ascii	"######################################\012FORMAT:\012"
	.ascii	"\011 [SHIFT [PROG_NAME [ARG(1) ... [ARG(N)\012[SHIF"
	.ascii	"T should be in seconds.\012\000"
	.text
	.align	2
	.global	usage
	.syntax unified
	.arm
	.fpu softvfp
	.type	usage, %function
usage:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	ldr	r0, .L2
	bl	puts
	nop
	pop	{fp, pc}
.L3:
	.align	2
.L2:
	.word	.LC0
	.size	usage, .-usage
	.section	.rodata
	.align	2
.LC1:
	.ascii	"Something went wrong with fork()\012Reason: %s\012\000"
	.align	2
.LC2:
	.ascii	"-n\000"
	.align	2
.LC3:
	.ascii	"sort\000"
	.align	2
.LC4:
	.ascii	"tmp_sorted_programs.txt\000"
	.align	2
.LC5:
	.ascii	"-o\000"
	.align	2
.LC6:
	.ascii	"Something went wrong with execlp()\012Reason: %s\012"
	.ascii	"\000"
	.align	2
.LC7:
	.ascii	"Something went wrong with waitpid()\012Reason: %s\012"
	.ascii	"\000"
	.align	2
.LC8:
	.ascii	"sort ended with code %d\012\000"
	.align	2
.LC9:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	sort_programs
	.syntax unified
	.arm
	.fpu softvfp
	.type	sort_programs, %function
sort_programs:
	@ args = 0, pretend = 0, frame = 32
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, fp, lr}
	add	fp, sp, #8
	sub	sp, sp, #52
	str	r0, [fp, #-40]
	ldr	r3, .L19
	ldr	r3, [r3]
	str	r3, [fp, #-16]
	mov	r3,#0
	mov	r3, #0
	str	r3, [fp, #-32]
	bl	fork
	mov	r3, r0
	str	r3, [fp, #-28]
	ldr	r3, [fp, #-28]
	cmn	r3, #1
	beq	.L5
	ldr	r3, [fp, #-28]
	cmp	r3, #0
	beq	.L6
	b	.L16
.L5:
	bl	__errno_location
	mov	r3, r0
	ldr	r3, [r3]
	mov	r0, r3
	bl	strerror
	mov	r3, r0
	mov	r1, r3
	ldr	r0, .L19+4
	bl	printf
	mvn	r3, #0
	b	.L14
.L6:
	mov	r3, #0
	str	r3, [sp, #8]
	ldr	r3, .L19+8
	str	r3, [sp, #4]
	ldr	r3, .L19+12
	str	r3, [sp]
	ldr	r3, [fp, #-40]
	ldr	r2, .L19+16
	ldr	r1, .L19+20
	ldr	r0, .L19+20
	bl	execlp
	mov	r3, r0
	str	r3, [fp, #-24]
	ldr	r3, [fp, #-24]
	cmn	r3, #1
	bne	.L17
	ldr	r3, .L19+24
	ldr	r4, [r3]
	bl	__errno_location
	mov	r3, r0
	ldr	r3, [r3]
	mov	r0, r3
	bl	strerror
	mov	r3, r0
	mov	r2, r3
	ldr	r1, .L19+28
	mov	r0, r4
	bl	fprintf
	mvn	r3, #0
	b	.L14
.L16:
	sub	r3, fp, #36
	mov	r2, #0
	mov	r1, r3
	ldr	r0, [fp, #-28]
	bl	waitpid
	str	r0, [fp, #-20]
	ldr	r3, [fp, #-20]
	cmn	r3, #1
	bne	.L18
	ldr	r3, .L19+24
	ldr	r4, [r3]
	bl	__errno_location
	mov	r3, r0
	ldr	r3, [r3]
	mov	r0, r3
	bl	strerror
	mov	r3, r0
	mov	r2, r3
	ldr	r1, .L19+32
	mov	r0, r4
	bl	fprintf
	mvn	r3, #0
	b	.L14
.L17:
	nop
	b	.L10
.L18:
	nop
.L10:
	ldr	r3, [fp, #-36]
	cmp	r3, #0
	beq	.L12
	ldr	r3, [fp, #-36]
	mov	r1, r3
	ldr	r0, .L19+36
	bl	printf
	mvn	r3, #0
	b	.L14
.L12:
	ldr	r3, [fp, #-36]
	and	r3, r3, #127
	cmp	r3, #0
	bne	.L13
	mov	r3, #0
	b	.L14
.L13:
	mvn	r3, #0
.L14:
	ldr	r2, .L19
	ldr	r1, [r2]
	ldr	r2, [fp, #-16]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L15
	bl	__stack_chk_fail
.L15:
	mov	r0, r3
	sub	sp, fp, #8
	@ sp needed
	pop	{r4, fp, pc}
.L20:
	.align	2
.L19:
	.word	.LC9
	.word	.LC1
	.word	.LC4
	.word	.LC5
	.word	.LC2
	.word	.LC3
	.word	stderr
	.word	.LC6
	.word	.LC7
	.word	.LC8
	.size	sort_programs, .-sort_programs
	.align	2
	.global	free_memory
	.syntax unified
	.arm
	.fpu softvfp
	.type	free_memory, %function
free_memory:
	@ 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]
	ldr	r3, [fp, #-16]
	cmp	r3, #0
	beq	.L30
	mov	r3, #0
	str	r3, [fp, #-12]
	b	.L24
.L29:
	ldr	r2, [fp, #-12]
	mov	r3, r2
	lsl	r3, r3, #2
	add	r3, r3, r2
	lsl	r3, r3, #2
	mov	r2, r3
	ldr	r3, [fp, #-16]
	add	r3, r3, r2
	ldr	r3, [r3, #8]
	cmp	r3, #0
	beq	.L25
	ldr	r2, [fp, #-12]
	mov	r3, r2
	lsl	r3, r3, #2
	add	r3, r3, r2
	lsl	r3, r3, #2
	mov	r2, r3
	ldr	r3, [fp, #-16]
	add	r3, r3, r2
	ldr	r3, [r3, #8]
	mov	r0, r3
	bl	free
	ldr	r2, [fp, #-12]
	mov	r3, r2
	lsl	r3, r3, #2
	add	r3, r3, r2
	lsl	r3, r3, #2
	mov	r2, r3
	ldr	r3, [fp, #-16]
	add	r3, r3, r2
	mov	r2, #0
	str	r2, [r3, #8]
.L25:
	mov	r3, #0
	str	r3, [fp, #-8]
	b	.L26
.L28:
	ldr	r2, [fp, #-12]
	mov	r3, r2
	lsl	r3, r3, #2
	add	r3, r3, r2
	lsl	r3, r3, #2
	mov	r2, r3
	ldr	r3, [fp, #-16]
	add	r3, r3, r2
	ldr	r2, [r3, #12]
	ldr	r3, [fp, #-8]
	lsl	r3, r3, #2
	add	r3, r2, r3
	ldr	r3, [r3]
	cmp	r3, #0
	beq	.L27
	ldr	r2, [fp, #-12]
	mov	r3, r2
	lsl	r3, r3, #2
	add	r3, r3, r2
	lsl	r3, r3, #2
	mov	r2, r3
	ldr	r3, [fp, #-16]
	add	r3, r3, r2
	ldr	r2, [r3, #12]
	ldr	r3, [fp, #-8]
	lsl	r3, r3, #2
	add	r3, r2, r3
	ldr	r3, [r3]
	mov	r0, r3
	bl	free
	ldr	r2, [fp, #-12]
	mov	r3, r2
	lsl	r3, r3, #2
	add	r3, r3, r2
	lsl	r3, r3, #2
	mov	r2, r3
	ldr	r3, [fp, #-16]
	add	r3, r3, r2
	ldr	r2, [r3, #12]
	ldr	r3, [fp, #-8]
	lsl	r3, r3, #2
	add	r3, r2, r3
	mov	r2, #0
	str	r2, [r3]
.L27:
	ldr	r3, [fp, #-8]
	add	r3, r3, #1
	str	r3, [fp, #-8]
.L26:
	ldr	r3, [fp, #-8]
	cmp	r3, #15
	ble	.L28
	ldr	r2, [fp, #-12]
	mov	r3, r2
	lsl	r3, r3, #2
	add	r3, r3, r2
	lsl	r3, r3, #2
	mov	r2, r3
	ldr	r3, [fp, #-16]
	add	r3, r3, r2
	ldr	r3, [r3, #12]
	mov	r0, r3
	bl	free
	ldr	r2, [fp, #-12]
	mov	r3, r2
	lsl	r3, r3, #2
	add	r3, r3, r2
	lsl	r3, r3, #2
	mov	r2, r3
	ldr	r3, [fp, #-16]
	add	r3, r3, r2
	mov	r2, #0
	str	r2, [r3, #12]
	ldr	r3, [fp, #-12]
	add	r3, r3, #1
	str	r3, [fp, #-12]
.L24:
	ldr	r3, [fp, #-12]
	cmp	r3, #127
	ble	.L29
	ldr	r0, [fp, #-16]
	bl	free
	mov	r3, #0
	str	r3, [fp, #-16]
	b	.L21
.L30:
	nop
.L21:
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
	.size	free_memory, .-free_memory
	.section	.rodata
	.align	2
.LC10:
	.ascii	"Can't allocate memory for array of programs\012Reas"
	.ascii	"on: %s\000"
	.align	2
.LC11:
	.ascii	"Can't allocate memory for prog_name array\012Reason"
	.ascii	": %s\000"
	.align	2
.LC12:
	.ascii	"Can't allocate memory for args array\012Reason: %s\000"
	.align	2
.LC13:
	.ascii	"Can't allocate memory for args[%d] array\012Reason:"
	.ascii	" %s\000"
	.text
	.align	2
	.global	allocate_memory
	.syntax unified
	.arm
	.fpu softvfp
	.type	allocate_memory, %function
allocate_memory:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, fp, lr}
	add	fp, sp, #8
	sub	sp, sp, #20
	mov	r1, #20
	mov	r0, #128
	bl	calloc
	mov	r3, r0
	str	r3, [fp, #-16]
	ldr	r3, [fp, #-16]
	cmp	r3, #0
	bne	.L32
	ldr	r3, .L42
	ldr	r4, [r3]
	bl	__errno_location
	mov	r3, r0
	ldr	r3, [r3]
	mov	r0, r3
	bl	strerror
	mov	r3, r0
	mov	r2, r3
	ldr	r1, .L42+4
	mov	r0, r4
	bl	fprintf
	mov	r3, #0
	b	.L33
.L32:
	mov	r3, #0
	str	r3, [fp, #-24]
	b	.L34
.L41:
	ldr	r2, [fp, #-24]
	mov	r3, r2
	lsl	r3, r3, #2
	add	r3, r3, r2
	lsl	r3, r3, #2
	mov	r2, r3
	ldr	r3, [fp, #-16]
	add	r4, r3, r2
	mov	r1, #1
	mov	r0, #64
	bl	calloc
	mov	r3, r0
	str	r3, [r4, #8]
	ldr	r2, [fp, #-24]
	mov	r3, r2
	lsl	r3, r3, #2
	add	r3, r3, r2
	lsl	r3, r3, #2
	mov	r2, r3
	ldr	r3, [fp, #-16]
	add	r3, r3, r2
	ldr	r3, [r3, #8]
	cmp	r3, #0
	bne	.L35
	ldr	r3, .L42
	ldr	r4, [r3]
	bl	__errno_location
	mov	r3, r0
	ldr	r3, [r3]
	mov	r0, r3
	bl	strerror
	mov	r3, r0
	mov	r2, r3
	ldr	r1, .L42+8
	mov	r0, r4
	bl	fprintf
	b	.L36
.L35:
	ldr	r2, [fp, #-24]
	mov	r3, r2
	lsl	r3, r3, #2
	add	r3, r3, r2
	lsl	r3, r3, #2
	mov	r2, r3
	ldr	r3, [fp, #-16]
	add	r4, r3, r2
	mov	r1, #4
	mov	r0, #16
	bl	calloc
	mov	r3, r0
	str	r3, [r4, #12]
	ldr	r2, [fp, #-24]
	mov	r3, r2
	lsl	r3, r3, #2
	add	r3, r3, r2
	lsl	r3, r3, #2
	mov	r2, r3
	ldr	r3, [fp, #-16]
	add	r3, r3, r2
	ldr	r3, [r3, #12]
	cmp	r3, #0
	bne	.L37
	ldr	r3, .L42
	ldr	r4, [r3]
	bl	__errno_location
	mov	r3, r0
	ldr	r3, [r3]
	mov	r0, r3
	bl	strerror
	mov	r3, r0
	mov	r2, r3
	ldr	r1, .L42+12
	mov	r0, r4
	bl	fprintf
	b	.L36
.L37:
	mov	r3, #0
	str	r3, [fp, #-20]
	b	.L38
.L40:
	ldr	r2, [fp, #-24]
	mov	r3, r2
	lsl	r3, r3, #2
	add	r3, r3, r2
	lsl	r3, r3, #2
	mov	r2, r3
	ldr	r3, [fp, #-16]
	add	r3, r3, r2
	ldr	r2, [r3, #12]
	ldr	r3, [fp, #-20]
	lsl	r3, r3, #2
	add	r4, r2, r3
	mov	r1, #1
	mov	r0, #64
	bl	calloc
	mov	r3, r0
	str	r3, [r4]
	ldr	r2, [fp, #-24]
	mov	r3, r2
	lsl	r3, r3, #2
	add	r3, r3, r2
	lsl	r3, r3, #2
	mov	r2, r3
	ldr	r3, [fp, #-16]
	add	r3, r3, r2
	ldr	r2, [r3, #12]
	ldr	r3, [fp, #-20]
	lsl	r3, r3, #2
	add	r3, r2, r3
	ldr	r3, [r3]
	cmp	r3, #0
	bne	.L39
	ldr	r3, .L42
	ldr	r4, [r3]
	bl	__errno_location
	mov	r3, r0
	ldr	r3, [r3]
	mov	r0, r3
	bl	strerror
	mov	r3, r0
	ldr	r2, [fp, #-20]
	ldr	r1, .L42+16
	mov	r0, r4
	bl	fprintf
	b	.L36
.L39:
	ldr	r3, [fp, #-20]
	add	r3, r3, #1
	str	r3, [fp, #-20]
.L38:
	ldr	r3, [fp, #-20]
	cmp	r3, #15
	ble	.L40
	ldr	r3, [fp, #-24]
	add	r3, r3, #1
	str	r3, [fp, #-24]
.L34:
	ldr	r3, [fp, #-24]
	cmp	r3, #127
	ble	.L41
	ldr	r3, [fp, #-16]
	b	.L33
.L36:
	ldr	r0, [fp, #-16]
	bl	free_memory
	mov	r3, #0
.L33:
	mov	r0, r3
	sub	sp, fp, #8
	@ sp needed
	pop	{r4, fp, pc}
.L43:
	.align	2
.L42:
	.word	stderr
	.word	.LC10
	.word	.LC11
	.word	.LC12
	.word	.LC13
	.size	allocate_memory, .-allocate_memory
	.section	.rodata
	.align	2
.LC14:
	.ascii	"r\000"
	.align	2
.LC15:
	.ascii	"Can't open file \"tmp_sorted_programs.txt\"\012\000"
	.align	2
.LC16:
	.ascii	" \012\000"
	.align	2
.LC17:
	.ascii	"Something went wrong with time in line: %s\012\000"
	.align	2
.LC18:
	.ascii	"Incorrect time argument in program in line %s\012\000"
	.align	2
.LC19:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	read_programs
	.syntax unified
	.arm
	.fpu softvfp
	.type	read_programs, %function
read_programs:
	@ args = 0, pretend = 0, frame = 280
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, fp, lr}
	add	fp, sp, #8
	sub	sp, sp, #284
	ldr	r3, .L58
	ldr	r3, [r3]
	str	r3, [fp, #-16]
	mov	r3,#0
	ldr	r1, .L58+4
	ldr	r0, .L58+8
	bl	fopen
	str	r0, [fp, #-276]
	ldr	r3, [fp, #-276]
	cmp	r3, #0
	bne	.L45
	ldr	r3, .L58+12
	ldr	r3, [r3]
	mov	r2, #42
	mov	r1, #1
	ldr	r0, .L58+16
	bl	fwrite
	mov	r3, #0
	b	.L56
.L45:
	bl	allocate_memory
	str	r0, [fp, #-272]
	ldr	r3, [fp, #-272]
	cmp	r3, #0
	bne	.L47
	mov	r3, #0
	b	.L56
.L47:
	ldr	r3, .L58+20
	str	r3, [fp, #-268]
	mov	r3, #0
	str	r3, [fp, #-288]
	b	.L48
.L55:
	sub	r2, fp, #264
	sub	r3, fp, #140
	mov	r1, r2
	mov	r0, r3
	bl	strcpy
	mov	r3, #0
	str	r3, [fp, #-292]
	sub	r3, fp, #264
	ldr	r1, [fp, #-268]
	mov	r0, r3
	bl	strtok
	str	r0, [fp, #-284]
	ldr	r3, [fp, #-284]
	cmp	r3, #0
	bne	.L49
	ldr	r3, .L58+12
	ldr	r3, [r3]
	sub	r2, fp, #140
	ldr	r1, .L58+24
	mov	r0, r3
	bl	fprintf
	bl	usage
	b	.L54
.L49:
	ldr	r2, [fp, #-288]
	mov	r3, r2
	lsl	r3, r3, #2
	add	r3, r3, r2
	lsl	r3, r3, #2
	mov	r2, r3
	ldr	r3, [fp, #-272]
	add	r4, r3, r2
	sub	r3, fp, #292
	mov	r2, #10
	mov	r1, r3
	ldr	r0, [fp, #-284]
	bl	strtol
	mov	r3, r0
	str	r3, [r4]
	ldr	r3, [fp, #-292]
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #0
	beq	.L51
	ldr	r3, .L58+12
	ldr	r3, [r3]
	sub	r2, fp, #140
	ldr	r1, .L58+28
	mov	r0, r3
	bl	fprintf
	bl	usage
	b	.L54
.L51:
	ldr	r1, [fp, #-268]
	mov	r0, #0
	bl	strtok
	str	r0, [fp, #-284]
	mov	r3, #0
	str	r3, [fp, #-280]
	b	.L52
.L53:
	ldr	r2, [fp, #-288]
	mov	r3, r2
	lsl	r3, r3, #2
	add	r3, r3, r2
	lsl	r3, r3, #2
	mov	r2, r3
	ldr	r3, [fp, #-272]
	add	r3, r3, r2
	ldr	r2, [r3, #12]
	ldr	r3, [fp, #-280]
	lsl	r3, r3, #2
	add	r3, r2, r3
	ldr	r3, [r3]
	ldr	r1, [fp, #-284]
	mov	r0, r3
	bl	strcpy
	ldr	r3, [fp, #-280]
	add	r3, r3, #1
	str	r3, [fp, #-280]
	ldr	r1, [fp, #-268]
	mov	r0, #0
	bl	strtok
	str	r0, [fp, #-284]
.L52:
	ldr	r3, [fp, #-284]
	cmp	r3, #0
	bne	.L53
	ldr	r2, [fp, #-288]
	mov	r3, r2
	lsl	r3, r3, #2
	add	r3, r3, r2
	lsl	r3, r3, #2
	mov	r2, r3
	ldr	r3, [fp, #-272]
	add	r3, r3, r2
	ldr	r2, [r3, #12]
	ldr	r3, [fp, #-280]
	lsl	r3, r3, #2
	add	r3, r2, r3
	mov	r2, #0
	str	r2, [r3]
	ldr	r2, [fp, #-288]
	mov	r3, r2
	lsl	r3, r3, #2
	add	r3, r3, r2
	lsl	r3, r3, #2
	mov	r2, r3
	ldr	r3, [fp, #-272]
	add	r3, r3, r2
	ldr	r2, [fp, #-280]
	str	r2, [r3, #4]
	ldr	r3, [fp, #-288]
	add	r3, r3, #1
	str	r3, [fp, #-288]
.L48:
	sub	r3, fp, #264
	ldr	r2, [fp, #-276]
	mov	r1, #123
	mov	r0, r3
	bl	fgets
	mov	r3, r0
	cmp	r3, #0
	bne	.L55
	ldr	r0, [fp, #-276]
	bl	fclose
	ldr	r3, [fp, #-272]
	b	.L56
.L54:
	ldr	r0, [fp, #-276]
	bl	fclose
	ldr	r0, [fp, #-272]
	bl	free_memory
	mov	r3, #0
.L56:
	ldr	r2, .L58
	ldr	r1, [r2]
	ldr	r2, [fp, #-16]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L57
	bl	__stack_chk_fail
.L57:
	mov	r0, r3
	sub	sp, fp, #8
	@ sp needed
	pop	{r4, fp, pc}
.L59:
	.align	2
.L58:
	.word	.LC19
	.word	.LC14
	.word	.LC4
	.word	stderr
	.word	.LC15
	.word	.LC16
	.word	.LC17
	.word	.LC18
	.size	read_programs, .-read_programs
	.section	.rodata
	.align	2
.LC20:
	.ascii	"Error in fork()\012\000"
	.align	2
.LC21:
	.ascii	"execvp() error with %s: %s\012\000"
	.align	2
.LC22:
	.ascii	"process %s ended with code %d\012\000"
	.align	2
.LC23:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	run_programs
	.syntax unified
	.arm
	.fpu softvfp
	.type	run_programs, %function
run_programs:
	@ args = 0, pretend = 0, frame = 48
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, r5, fp, lr}
	add	fp, sp, #12
	sub	sp, sp, #48
	str	r0, [fp, #-56]
	ldr	r3, .L80
	ldr	r3, [r3]
	str	r3, [fp, #-16]
	mov	r3,#0
	mov	r3, #0
	str	r3, [fp, #-40]
	mov	r3, #0
	str	r3, [fp, #-36]
	mov	r3, #0
	str	r3, [fp, #-28]
	mov	r3, #0
	str	r3, [fp, #-32]
	mov	r3, #0
	str	r3, [fp, #-48]
	b	.L61
.L70:
	ldr	r2, [fp, #-48]
	mov	r3, r2
	lsl	r3, r3, #2
	add	r3, r3, r2
	lsl	r3, r3, #2
	mov	r2, r3
	ldr	r3, [fp, #-56]
	add	r3, r3, r2
	ldr	r3, [r3, #12]
	ldr	r3, [r3]
	cmp	r3, #0
	beq	.L62
	ldr	r2, [fp, #-48]
	mov	r3, r2
	lsl	r3, r3, #2
	add	r3, r3, r2
	lsl	r3, r3, #2
	mov	r2, r3
	ldr	r3, [fp, #-56]
	add	r3, r3, r2
	ldr	r2, [r3]
	ldr	r3, [fp, #-36]
	sub	r3, r2, r3
	str	r3, [fp, #-40]
.L62:
	ldr	r3, [fp, #-40]
	cmp	r3, #0
	ble	.L63
	ldr	r3, [fp, #-40]
	mov	r0, r3
	bl	sleep
	ldr	r2, [fp, #-36]
	ldr	r3, [fp, #-40]
	add	r3, r2, r3
	str	r3, [fp, #-36]
.L63:
	ldr	r2, [fp, #-48]
	mov	r3, r2
	lsl	r3, r3, #2
	add	r3, r3, r2
	lsl	r3, r3, #2
	mov	r2, r3
	ldr	r3, [fp, #-56]
	add	r3, r3, r2
	ldr	r3, [r3, #12]
	ldr	r3, [r3]
	cmp	r3, #0
	beq	.L78
	ldr	r2, [fp, #-48]
	mov	r3, r2
	lsl	r3, r3, #2
	add	r3, r3, r2
	lsl	r3, r3, #2
	mov	r2, r3
	ldr	r3, [fp, #-56]
	add	r3, r3, r2
	ldr	r3, [r3, #12]
	ldr	r3, [r3]
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #0
	beq	.L78
	bl	fork
	mov	r3, r0
	str	r3, [fp, #-20]
	ldr	r3, [fp, #-20]
	cmn	r3, #1
	beq	.L65
	ldr	r3, [fp, #-20]
	cmp	r3, #0
	beq	.L66
	b	.L77
.L65:
	ldr	r3, .L80+4
	ldr	r3, [r3]
	mov	r2, #16
	mov	r1, #1
	ldr	r0, .L80+8
	bl	fwrite
	mvn	r3, #0
	b	.L68
.L66:
	ldr	r2, [fp, #-48]
	mov	r3, r2
	lsl	r3, r3, #2
	add	r3, r3, r2
	lsl	r3, r3, #2
	mov	r2, r3
	ldr	r3, [fp, #-56]
	add	r3, r3, r2
	ldr	r3, [r3, #12]
	ldr	r0, [r3]
	ldr	r2, [fp, #-48]
	mov	r3, r2
	lsl	r3, r3, #2
	add	r3, r3, r2
	lsl	r3, r3, #2
	mov	r2, r3
	ldr	r3, [fp, #-56]
	add	r3, r3, r2
	ldr	r3, [r3, #12]
	mov	r1, r3
	bl	execvp
	mov	r3, r0
	cmn	r3, #1
	bne	.L79
	ldr	r3, .L80+4
	ldr	r4, [r3]
	ldr	r2, [fp, #-48]
	mov	r3, r2
	lsl	r3, r3, #2
	add	r3, r3, r2
	lsl	r3, r3, #2
	mov	r2, r3
	ldr	r3, [fp, #-56]
	add	r3, r3, r2
	ldr	r3, [r3, #12]
	ldr	r5, [r3]
	bl	__errno_location
	mov	r3, r0
	ldr	r3, [r3]
	mov	r0, r3
	bl	strerror
	mov	r3, r0
	mov	r2, r5
	ldr	r1, .L80+12
	mov	r0, r4
	bl	fprintf
	mvn	r3, #0
	b	.L68
.L77:
	ldr	r2, [fp, #-48]
	mov	r3, r2
	lsl	r3, r3, #2
	add	r3, r3, r2
	lsl	r3, r3, #2
	mov	r2, r3
	ldr	r3, [fp, #-56]
	add	r3, r3, r2
	ldr	r2, [fp, #-20]
	str	r2, [r3, #16]
	ldr	r3, [fp, #-32]
	add	r3, r3, #1
	str	r3, [fp, #-32]
	b	.L64
.L78:
	nop
	b	.L64
.L79:
	nop
.L64:
	ldr	r3, [fp, #-48]
	add	r3, r3, #1
	str	r3, [fp, #-48]
.L61:
	ldr	r3, [fp, #-48]
	cmp	r3, #127
	ble	.L70
	b	.L71
.L75:
	sub	r3, fp, #52
	mov	r2, #0
	mov	r1, r3
	mvn	r0, #0
	bl	waitpid
	str	r0, [fp, #-24]
	mov	r3, #0
	str	r3, [fp, #-44]
	b	.L72
.L74:
	ldr	r2, [fp, #-44]
	mov	r3, r2
	lsl	r3, r3, #2
	add	r3, r3, r2
	lsl	r3, r3, #2
	mov	r2, r3
	ldr	r3, [fp, #-56]
	add	r3, r3, r2
	ldr	r3, [r3, #16]
	ldr	r2, [fp, #-24]
	cmp	r2, r3
	bne	.L73
	ldr	r2, [fp, #-44]
	mov	r3, r2
	lsl	r3, r3, #2
	add	r3, r3, r2
	lsl	r3, r3, #2
	mov	r2, r3
	ldr	r3, [fp, #-56]
	add	r3, r3, r2
	ldr	r3, [r3, #12]
	ldr	r3, [r3]
	ldr	r2, [fp, #-52]
	mov	r1, r3
	ldr	r0, .L80+16
	bl	printf
	ldr	r2, [fp, #-44]
	mov	r3, r2
	lsl	r3, r3, #2
	add	r3, r3, r2
	lsl	r3, r3, #2
	mov	r2, r3
	ldr	r3, [fp, #-56]
	add	r3, r3, r2
	mvn	r2, #0
	str	r2, [r3, #16]
	ldr	r3, [fp, #-32]
	sub	r3, r3, #1
	str	r3, [fp, #-32]
.L73:
	ldr	r3, [fp, #-44]
	add	r3, r3, #1
	str	r3, [fp, #-44]
.L72:
	ldr	r2, [fp, #-44]
	ldr	r3, [fp, #-48]
	cmp	r2, r3
	blt	.L74
.L71:
	ldr	r3, [fp, #-32]
	cmp	r3, #0
	bgt	.L75
	mov	r3, #0
.L68:
	ldr	r2, .L80
	ldr	r1, [r2]
	ldr	r2, [fp, #-16]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L76
	bl	__stack_chk_fail
.L76:
	mov	r0, r3
	sub	sp, fp, #12
	@ sp needed
	pop	{r4, r5, fp, pc}
.L81:
	.align	2
.L80:
	.word	.LC23
	.word	stderr
	.word	.LC20
	.word	.LC21
	.word	.LC22
	.size	run_programs, .-run_programs
	.section	.rodata
	.align	2
.LC24:
	.ascii	"Error in sorting.\000"
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 24
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #24
	str	r0, [fp, #-24]
	str	r1, [fp, #-28]
	ldr	r3, [fp, #-24]
	cmp	r3, #2
	beq	.L83
	bl	usage
	mov	r0, #1
	bl	exit
.L83:
	ldr	r3, [fp, #-28]
	add	r3, r3, #4
	ldr	r3, [r3]
	mov	r0, r3
	bl	sort_programs
	str	r0, [fp, #-16]
	ldr	r3, [fp, #-16]
	cmn	r3, #1
	bne	.L84
	ldr	r0, .L92
	bl	puts
	mov	r0, #1
	bl	exit
.L84:
	bl	read_programs
	str	r0, [fp, #-12]
	ldr	r3, [fp, #-12]
	cmp	r3, #0
	beq	.L90
	ldr	r0, [fp, #-12]
	bl	run_programs
	str	r0, [fp, #-8]
	ldr	r3, [fp, #-8]
	cmn	r3, #1
	beq	.L91
	ldr	r0, [fp, #-12]
	bl	free_memory
	mov	r3, #0
	b	.L89
.L90:
	nop
	b	.L86
.L91:
	nop
.L86:
	ldr	r0, [fp, #-12]
	bl	free_memory
	mov	r0, #1
	bl	exit
.L89:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L93:
	.align	2
.L92:
	.word	.LC24
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
