	.file	"50066.c"
	.intel_syntax noprefix
	.text
	.globl	process_group_id
	.bss
	.align 4
	.type	process_group_id, @object
	.size	process_group_id, 4
process_group_id:
	.zero	4
	.globl	close_down
	.align 4
	.type	close_down, @object
	.size	close_down, 4
close_down:
	.zero	4
	.globl	children
	.align 32
	.type	children, @object
	.size	children, 49152
children:
	.zero	49152
	.globl	num_children
	.align 4
	.type	num_children, @object
	.size	num_children, 4
num_children:
	.zero	4
	.globl	enabled_services
	.align 32
	.type	enabled_services, @object
	.size	enabled_services, 8192
enabled_services:
	.zero	8192
	.globl	num_enabled_services
	.align 4
	.type	num_enabled_services, @object
	.size	num_enabled_services, 4
num_enabled_services:
	.zero	4
	.globl	disabled_services
	.align 32
	.type	disabled_services, @object
	.size	disabled_services, 4096
disabled_services:
	.zero	4096
	.globl	num_disabled_services
	.align 4
	.type	num_disabled_services, @object
	.size	num_disabled_services, 4
num_disabled_services:
	.zero	4
	.section	.rodata
.LC0:
	.string	"Usage %s <directory>\n"
.LC1:
	.string	"Supervisor %d\n"
.LC2:
	.string	"Supervising directory <%s>\n"
.LC3:
	.string	"Could not scan directory.\n"
.LC4:
	.string	"Disabling service <%s> %d\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, 32
	mov	DWORD PTR -20[rbp], edi
	mov	QWORD PTR -32[rbp], rsi
	cmp	DWORD PTR -20[rbp], 2
	je	.L2
	mov	rax, QWORD PTR -32[rbp]
	mov	rax, QWORD PTR [rax]
	mov	rsi, rax
	lea	rdi, .LC0[rip]
	mov	eax, 0
	call	printf@PLT
	mov	eax, -1
	jmp	.L3
.L2:
	call	getpid@PLT
	mov	edx, eax
	mov	rax, QWORD PTR stdout[rip]
	lea	rsi, .LC1[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	rax, QWORD PTR -32[rbp]
	add	rax, 8
	mov	rdx, QWORD PTR [rax]
	mov	rax, QWORD PTR stdout[rip]
	lea	rsi, .LC2[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	call	getpgrp@PLT
	mov	DWORD PTR process_group_id[rip], eax
	mov	DWORD PTR close_down[rip], 0
	mov	rax, QWORD PTR -32[rbp]
	add	rax, 8
	mov	rax, QWORD PTR [rax]
	mov	rdi, rax
	call	scan_directory
	test	eax, eax
	je	.L4
	mov	rax, QWORD PTR stdout[rip]
	mov	rcx, rax
	mov	edx, 26
	mov	esi, 1
	lea	rdi, .LC3[rip]
	call	fwrite@PLT
	mov	eax, -1
	jmp	.L3
.L4:
	mov	eax, DWORD PTR close_down[rip]
	test	eax, eax
	je	.L5
	mov	DWORD PTR -8[rbp], 0
	jmp	.L6
.L8:
	mov	eax, DWORD PTR -8[rbp]
	movsx	rdx, eax
	mov	rax, rdx
	add	rax, rax
	add	rax, rdx
	sal	rax, 4
	mov	rdx, rax
	lea	rax, children[rip]
	mov	eax, DWORD PTR [rdx+rax]
	test	eax, eax
	jne	.L7
	mov	eax, DWORD PTR -8[rbp]
	movsx	rdx, eax
	mov	rax, rdx
	add	rax, rax
	add	rax, rdx
	sal	rax, 4
	mov	rdx, rax
	lea	rax, children[rip+40]
	mov	ecx, DWORD PTR [rdx+rax]
	mov	eax, DWORD PTR -8[rbp]
	movsx	rdx, eax
	mov	rax, rdx
	add	rax, rax
	add	rax, rdx
	sal	rax, 4
	mov	rdx, rax
	lea	rax, children[rip+8]
	mov	rdx, QWORD PTR [rdx+rax]
	mov	rax, QWORD PTR stdout[rip]
	lea	rsi, .LC4[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	eax, DWORD PTR -8[rbp]
	mov	edi, eax
	call	disable_process
.L7:
	add	DWORD PTR -8[rbp], 1
.L6:
	mov	eax, DWORD PTR num_children[rip]
	cmp	DWORD PTR -8[rbp], eax
	jl	.L8
	mov	eax, 0
	jmp	.L3
.L5:
	mov	DWORD PTR -4[rbp], 0
	jmp	.L9
.L11:
	mov	eax, DWORD PTR -4[rbp]
	movsx	rdx, eax
	mov	rax, rdx
	add	rax, rax
	add	rax, rdx
	sal	rax, 4
	mov	rdx, rax
	lea	rax, children[rip]
	mov	eax, DWORD PTR [rdx+rax]
	test	eax, eax
	jne	.L10
	mov	eax, DWORD PTR -4[rbp]
	movsx	rdx, eax
	mov	rax, rdx
	add	rax, rax
	add	rax, rdx
	sal	rax, 4
	lea	rdx, children[rip]
	add	rax, rdx
	mov	rdi, rax
	call	check_on_process
.L10:
	add	DWORD PTR -4[rbp], 1
.L9:
	mov	eax, DWORD PTR num_children[rip]
	cmp	DWORD PTR -4[rbp], eax
	jl	.L11
	mov	edi, 1
	call	sleep@PLT
	mov	rax, QWORD PTR -32[rbp]
	add	rax, 8
	mov	rax, QWORD PTR [rax]
	mov	rdi, rax
	call	scan_directory
	jmp	.L4
.L3:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	main, .-main
	.section	.rodata
.LC5:
	.string	"Error reading directory <%s>\n"
.LC6:
	.string	"."
.LC7:
	.string	".."
.LC8:
	.string	"Disabling service <%s>\n"
.LC9:
	.string	"Enabling service <%s>\n"
	.text
	.globl	scan_directory
	.type	scan_directory, @function
scan_directory:
.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, 64
	mov	QWORD PTR -56[rbp], rdi
	mov	DWORD PTR num_enabled_services[rip], 0
	mov	eax, DWORD PTR num_children[rip]
	mov	DWORD PTR num_disabled_services[rip], eax
	mov	DWORD PTR -36[rbp], 0
	jmp	.L13
.L16:
	mov	eax, DWORD PTR -36[rbp]
	movsx	rdx, eax
	mov	rax, rdx
	add	rax, rax
	add	rax, rdx
	sal	rax, 4
	mov	rdx, rax
	lea	rax, children[rip]
	mov	eax, DWORD PTR [rdx+rax]
	test	eax, eax
	jne	.L14
	mov	eax, DWORD PTR -36[rbp]
	cdqe
	lea	rcx, 0[0+rax*4]
	lea	rdx, disabled_services[rip]
	mov	eax, DWORD PTR -36[rbp]
	mov	DWORD PTR [rcx+rdx], eax
	jmp	.L15
.L14:
	mov	eax, DWORD PTR -36[rbp]
	cdqe
	lea	rdx, 0[0+rax*4]
	lea	rax, disabled_services[rip]
	mov	DWORD PTR [rdx+rax], -1
.L15:
	add	DWORD PTR -36[rbp], 1
.L13:
	mov	eax, DWORD PTR num_children[rip]
	cmp	DWORD PTR -36[rbp], eax
	jl	.L16
	mov	rax, QWORD PTR -56[rbp]
	mov	rdi, rax
	call	opendir@PLT
	mov	QWORD PTR -16[rbp], rax
	cmp	QWORD PTR -16[rbp], 0
	jne	.L17
	mov	eax, 1
	jmp	.L18
.L17:
	call	__errno_location@PLT
	mov	DWORD PTR [rax], 0
	mov	rax, QWORD PTR -16[rbp]
	mov	rdi, rax
	call	readdir@PLT
	mov	QWORD PTR -8[rbp], rax
	cmp	QWORD PTR -8[rbp], 0
	jne	.L19
	call	__errno_location@PLT
	mov	eax, DWORD PTR [rax]
	test	eax, eax
	je	.L35
	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, .LC5[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	jmp	.L35
.L19:
	mov	rax, QWORD PTR -8[rbp]
	movzx	eax, BYTE PTR 18[rax]
	cmp	al, 4
	jne	.L17
	mov	rax, QWORD PTR -8[rbp]
	add	rax, 19
	lea	rsi, .LC6[rip]
	mov	rdi, rax
	call	strcmp@PLT
	test	eax, eax
	je	.L36
	mov	rax, QWORD PTR -8[rbp]
	add	rax, 19
	lea	rsi, .LC7[rip]
	mov	rdi, rax
	call	strcmp@PLT
	test	eax, eax
	je	.L36
	mov	DWORD PTR -32[rbp], 0
	mov	DWORD PTR -28[rbp], 0
	jmp	.L25
.L29:
	mov	eax, DWORD PTR -28[rbp]
	movsx	rdx, eax
	mov	rax, rdx
	add	rax, rax
	add	rax, rdx
	sal	rax, 4
	mov	rdx, rax
	lea	rax, children[rip]
	mov	eax, DWORD PTR [rdx+rax]
	test	eax, eax
	jne	.L37
	mov	rax, QWORD PTR -8[rbp]
	lea	rcx, 19[rax]
	mov	eax, DWORD PTR -28[rbp]
	movsx	rdx, eax
	mov	rax, rdx
	add	rax, rax
	add	rax, rdx
	sal	rax, 4
	mov	rdx, rax
	lea	rax, children[rip+8]
	mov	rax, QWORD PTR [rdx+rax]
	mov	edx, 1024
	mov	rsi, rcx
	mov	rdi, rax
	call	strncmp@PLT
	test	eax, eax
	jne	.L27
	mov	eax, DWORD PTR -28[rbp]
	cdqe
	lea	rdx, 0[0+rax*4]
	lea	rax, disabled_services[rip]
	mov	DWORD PTR [rdx+rax], -1
	mov	DWORD PTR -32[rbp], 1
	jmp	.L28
.L37:
	nop
.L27:
	add	DWORD PTR -28[rbp], 1
.L25:
	mov	eax, DWORD PTR num_children[rip]
	cmp	DWORD PTR -28[rbp], eax
	jl	.L29
.L28:
	cmp	DWORD PTR -32[rbp], 0
	jne	.L17
	mov	eax, DWORD PTR num_enabled_services[rip]
	mov	rdx, QWORD PTR -8[rbp]
	lea	rcx, 19[rdx]
	cdqe
	lea	rdx, 0[0+rax*8]
	lea	rax, enabled_services[rip]
	mov	QWORD PTR [rdx+rax], rcx
	mov	eax, DWORD PTR num_enabled_services[rip]
	add	eax, 1
	mov	DWORD PTR num_enabled_services[rip], eax
	jmp	.L17
.L36:
	nop
	jmp	.L17
.L35:
	nop
	mov	DWORD PTR -24[rbp], 0
	jmp	.L30
.L32:
	mov	eax, DWORD PTR -24[rbp]
	cdqe
	lea	rdx, 0[0+rax*4]
	lea	rax, disabled_services[rip]
	mov	eax, DWORD PTR [rdx+rax]
	cmp	eax, -1
	je	.L31
	mov	eax, DWORD PTR -24[rbp]
	movsx	rdx, eax
	mov	rax, rdx
	add	rax, rax
	add	rax, rdx
	sal	rax, 4
	mov	rdx, rax
	lea	rax, children[rip+8]
	mov	rdx, QWORD PTR [rdx+rax]
	mov	rax, QWORD PTR stdout[rip]
	lea	rsi, .LC8[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	eax, DWORD PTR -24[rbp]
	mov	edi, eax
	call	disable_process
.L31:
	add	DWORD PTR -24[rbp], 1
.L30:
	mov	eax, DWORD PTR num_disabled_services[rip]
	cmp	DWORD PTR -24[rbp], eax
	jl	.L32
	mov	DWORD PTR -20[rbp], 0
	jmp	.L33
.L34:
	mov	eax, DWORD PTR -20[rbp]
	cdqe
	lea	rdx, 0[0+rax*8]
	lea	rax, enabled_services[rip]
	mov	rdx, QWORD PTR [rdx+rax]
	mov	rax, QWORD PTR stdout[rip]
	lea	rsi, .LC9[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	eax, DWORD PTR -20[rbp]
	cdqe
	lea	rdx, 0[0+rax*8]
	lea	rax, enabled_services[rip]
	mov	rdx, QWORD PTR [rdx+rax]
	mov	rax, QWORD PTR -56[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	mark_for_supervision
	add	DWORD PTR -20[rbp], 1
.L33:
	mov	eax, DWORD PTR num_enabled_services[rip]
	cmp	DWORD PTR -20[rbp], eax
	jl	.L34
	mov	rax, QWORD PTR -16[rbp]
	mov	rdi, rax
	call	closedir@PLT
	mov	eax, 0
.L18:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	scan_directory, .-scan_directory
	.section	.rodata
.LC10:
	.string	"%s/%s/%s"
.LC11:
	.string	"%s/%s/stdout.log"
.LC12:
	.string	"%s/%s/stderr.log"
	.text
	.globl	mark_for_supervision_at_index
	.type	mark_for_supervision_at_index, @function
mark_for_supervision_at_index:
.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, 3120
	mov	QWORD PTR -3096[rbp], rdi
	mov	QWORD PTR -3104[rbp], rsi
	mov	DWORD PTR -3108[rbp], edx
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	rsi, QWORD PTR -3104[rbp]
	mov	rcx, QWORD PTR -3104[rbp]
	mov	rdx, QWORD PTR -3096[rbp]
	lea	rax, -3088[rbp]
	mov	r9, rsi
	mov	r8, rcx
	mov	rcx, rdx
	lea	rdx, .LC10[rip]
	mov	esi, 1024
	mov	rdi, rax
	mov	eax, 0
	call	snprintf@PLT
	mov	rcx, QWORD PTR -3104[rbp]
	mov	rdx, QWORD PTR -3096[rbp]
	lea	rax, -2064[rbp]
	mov	r8, rcx
	mov	rcx, rdx
	lea	rdx, .LC11[rip]
	mov	esi, 1024
	mov	rdi, rax
	mov	eax, 0
	call	snprintf@PLT
	mov	rcx, QWORD PTR -3104[rbp]
	mov	rdx, QWORD PTR -3096[rbp]
	lea	rax, -1040[rbp]
	mov	r8, rcx
	mov	rcx, rdx
	lea	rdx, .LC12[rip]
	mov	esi, 1024
	mov	rdi, rax
	mov	eax, 0
	call	snprintf@PLT
	mov	eax, DWORD PTR -3108[rbp]
	movsx	rdx, eax
	mov	rax, rdx
	add	rax, rax
	add	rax, rdx
	sal	rax, 4
	mov	rdx, rax
	lea	rax, children[rip]
	mov	DWORD PTR [rdx+rax], 0
	mov	rax, QWORD PTR -3104[rbp]
	mov	rdi, rax
	call	strdup@PLT
	mov	rcx, rax
	mov	eax, DWORD PTR -3108[rbp]
	movsx	rdx, eax
	mov	rax, rdx
	add	rax, rax
	add	rax, rdx
	sal	rax, 4
	mov	rdx, rax
	lea	rax, children[rip+8]
	mov	QWORD PTR [rdx+rax], rcx
	lea	rax, -3088[rbp]
	mov	rdi, rax
	call	strdup@PLT
	mov	rcx, rax
	mov	eax, DWORD PTR -3108[rbp]
	movsx	rdx, eax
	mov	rax, rdx
	add	rax, rax
	add	rax, rdx
	sal	rax, 4
	mov	rdx, rax
	lea	rax, children[rip+16]
	mov	QWORD PTR [rdx+rax], rcx
	lea	rax, -2064[rbp]
	mov	rdi, rax
	call	strdup@PLT
	mov	rcx, rax
	mov	eax, DWORD PTR -3108[rbp]
	movsx	rdx, eax
	mov	rax, rdx
	add	rax, rax
	add	rax, rdx
	sal	rax, 4
	mov	rdx, rax
	lea	rax, children[rip+24]
	mov	QWORD PTR [rdx+rax], rcx
	lea	rax, -1040[rbp]
	mov	rdi, rax
	call	strdup@PLT
	mov	rcx, rax
	mov	eax, DWORD PTR -3108[rbp]
	movsx	rdx, eax
	mov	rax, rdx
	add	rax, rax
	add	rax, rdx
	sal	rax, 4
	mov	rdx, rax
	lea	rax, children[rip+32]
	mov	QWORD PTR [rdx+rax], rcx
	mov	eax, DWORD PTR -3108[rbp]
	movsx	rdx, eax
	mov	rax, rdx
	add	rax, rax
	add	rax, rdx
	sal	rax, 4
	mov	rdx, rax
	lea	rax, children[rip+40]
	mov	DWORD PTR [rdx+rax], 0
	nop
	mov	rax, QWORD PTR -8[rbp]
	sub	rax, QWORD PTR fs:40
	je	.L39
	call	__stack_chk_fail@PLT
.L39:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.size	mark_for_supervision_at_index, .-mark_for_supervision_at_index
	.globl	mark_for_supervision
	.type	mark_for_supervision, @function
mark_for_supervision:
.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	QWORD PTR -32[rbp], rsi
	mov	DWORD PTR -4[rbp], 0
	jmp	.L41
.L44:
	mov	eax, DWORD PTR -4[rbp]
	movsx	rdx, eax
	mov	rax, rdx
	add	rax, rax
	add	rax, rdx
	sal	rax, 4
	mov	rdx, rax
	lea	rax, children[rip]
	mov	eax, DWORD PTR [rdx+rax]
	test	eax, eax
	je	.L42
	mov	edx, DWORD PTR -4[rbp]
	mov	rcx, QWORD PTR -32[rbp]
	mov	rax, QWORD PTR -24[rbp]
	mov	rsi, rcx
	mov	rdi, rax
	call	mark_for_supervision_at_index
	jmp	.L40
.L42:
	add	DWORD PTR -4[rbp], 1
.L41:
	mov	eax, DWORD PTR num_children[rip]
	cmp	DWORD PTR -4[rbp], eax
	jl	.L44
	mov	edx, DWORD PTR num_children[rip]
	mov	rcx, QWORD PTR -32[rbp]
	mov	rax, QWORD PTR -24[rbp]
	mov	rsi, rcx
	mov	rdi, rax
	call	mark_for_supervision_at_index
	mov	eax, DWORD PTR num_children[rip]
	add	eax, 1
	mov	DWORD PTR num_children[rip], eax
.L40:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE9:
	.size	mark_for_supervision, .-mark_for_supervision
	.section	.rodata
.LC13:
	.string	"!"
	.text
	.globl	disable_process
	.type	disable_process, @function
disable_process:
.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, 16
	mov	DWORD PTR -4[rbp], edi
	mov	eax, DWORD PTR -4[rbp]
	movsx	rdx, eax
	mov	rax, rdx
	add	rax, rax
	add	rax, rdx
	sal	rax, 4
	mov	rdx, rax
	lea	rax, children[rip]
	mov	DWORD PTR [rdx+rax], 1
	mov	eax, DWORD PTR -4[rbp]
	movsx	rdx, eax
	mov	rax, rdx
	add	rax, rax
	add	rax, rdx
	sal	rax, 4
	mov	rdx, rax
	lea	rax, children[rip+8]
	mov	rax, QWORD PTR [rdx+rax]
	mov	rdi, rax
	call	free@PLT
	mov	eax, DWORD PTR -4[rbp]
	movsx	rdx, eax
	mov	rax, rdx
	add	rax, rax
	add	rax, rdx
	sal	rax, 4
	mov	rdx, rax
	lea	rax, children[rip+16]
	mov	rax, QWORD PTR [rdx+rax]
	mov	rdi, rax
	call	free@PLT
	mov	eax, DWORD PTR -4[rbp]
	movsx	rdx, eax
	mov	rax, rdx
	add	rax, rax
	add	rax, rdx
	sal	rax, 4
	mov	rdx, rax
	lea	rax, children[rip+24]
	mov	rax, QWORD PTR [rdx+rax]
	mov	rdi, rax
	call	free@PLT
	mov	eax, DWORD PTR -4[rbp]
	movsx	rdx, eax
	mov	rax, rdx
	add	rax, rax
	add	rax, rdx
	sal	rax, 4
	mov	rdx, rax
	lea	rax, children[rip+32]
	mov	rax, QWORD PTR [rdx+rax]
	mov	rdi, rax
	call	free@PLT
	mov	eax, DWORD PTR -4[rbp]
	movsx	rdx, eax
	mov	rax, rdx
	add	rax, rax
	add	rax, rdx
	sal	rax, 4
	mov	rdx, rax
	lea	rax, children[rip+8]
	mov	QWORD PTR [rdx+rax], 0
	mov	eax, DWORD PTR -4[rbp]
	movsx	rdx, eax
	mov	rax, rdx
	add	rax, rax
	add	rax, rdx
	sal	rax, 4
	mov	rdx, rax
	lea	rax, children[rip+16]
	mov	QWORD PTR [rdx+rax], 0
	mov	eax, DWORD PTR -4[rbp]
	movsx	rdx, eax
	mov	rax, rdx
	add	rax, rax
	add	rax, rdx
	sal	rax, 4
	mov	rdx, rax
	lea	rax, children[rip+24]
	mov	QWORD PTR [rdx+rax], 0
	mov	eax, DWORD PTR -4[rbp]
	movsx	rdx, eax
	mov	rax, rdx
	add	rax, rax
	add	rax, rdx
	sal	rax, 4
	mov	rdx, rax
	lea	rax, children[rip+32]
	mov	QWORD PTR [rdx+rax], 0
	mov	eax, DWORD PTR -4[rbp]
	movsx	rdx, eax
	mov	rax, rdx
	add	rax, rax
	add	rax, rdx
	sal	rax, 4
	mov	rdx, rax
	lea	rax, children[rip+40]
	mov	eax, DWORD PTR [rdx+rax]
	mov	esi, 2
	mov	edi, eax
	call	kill@PLT
	mov	eax, DWORD PTR -4[rbp]
	movsx	rdx, eax
	mov	rax, rdx
	add	rax, rax
	add	rax, rdx
	sal	rax, 4
	mov	rdx, rax
	lea	rax, children[rip+40]
	mov	eax, DWORD PTR [rdx+rax]
	mov	esi, 15
	mov	edi, eax
	call	kill@PLT
	mov	eax, DWORD PTR -4[rbp]
	movsx	rdx, eax
	mov	rax, rdx
	add	rax, rax
	add	rax, rdx
	sal	rax, 4
	mov	rdx, rax
	lea	rax, children[rip+40]
	mov	eax, DWORD PTR [rdx+rax]
	mov	edx, 0
	mov	esi, 0
	mov	edi, eax
	call	waitpid@PLT
	mov	eax, DWORD PTR -4[rbp]
	movsx	rdx, eax
	mov	rax, rdx
	add	rax, rax
	add	rax, rdx
	sal	rax, 4
	mov	rdx, rax
	lea	rax, children[rip+40]
	mov	DWORD PTR [rdx+rax], 0
	lea	rdi, .LC13[rip]
	call	puts@PLT
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE10:
	.size	disable_process, .-disable_process
	.section	.rodata
.LC14:
	.string	"<%s> exited with status %d\n"
.LC15:
	.string	"<%s> died!\n"
	.text
	.globl	check_on_process
	.type	check_on_process, @function
check_on_process:
.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, 32
	mov	QWORD PTR -24[rbp], rdi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	rax, QWORD PTR -24[rbp]
	mov	eax, DWORD PTR 40[rax]
	test	eax, eax
	jne	.L47
	mov	rax, QWORD PTR -24[rbp]
	mov	rdi, rax
	call	launch_process
	jmp	.L46
.L47:
	mov	rax, QWORD PTR -24[rbp]
	mov	eax, DWORD PTR 40[rax]
	lea	rcx, -16[rbp]
	mov	edx, 1
	mov	rsi, rcx
	mov	edi, eax
	call	waitpid@PLT
	mov	DWORD PTR -12[rbp], eax
	mov	rax, QWORD PTR -24[rbp]
	mov	eax, DWORD PTR 40[rax]
	cmp	DWORD PTR -12[rbp], eax
	jne	.L49
	mov	eax, DWORD PTR -16[rbp]
	and	eax, 127
	test	eax, eax
	jne	.L54
	mov	eax, DWORD PTR -16[rbp]
	sar	eax, 8
	movzx	ecx, al
	mov	rax, QWORD PTR -24[rbp]
	mov	rdx, QWORD PTR 8[rax]
	mov	rax, QWORD PTR stdout[rip]
	lea	rsi, .LC14[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	rax, QWORD PTR -24[rbp]
	mov	rdi, rax
	call	launch_process
	jmp	.L54
.L49:
	mov	rax, QWORD PTR -24[rbp]
	mov	eax, DWORD PTR 40[rax]
	mov	esi, 0
	mov	edi, eax
	call	kill@PLT
	test	eax, eax
	je	.L46
	mov	rax, QWORD PTR -24[rbp]
	mov	rdx, QWORD PTR 8[rax]
	mov	rax, QWORD PTR stdout[rip]
	lea	rsi, .LC15[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	rax, QWORD PTR -24[rbp]
	mov	rdi, rax
	call	launch_process
	jmp	.L46
.L54:
	nop
.L46:
	mov	rax, QWORD PTR -8[rbp]
	sub	rax, QWORD PTR fs:40
	je	.L53
	call	__stack_chk_fail@PLT
.L53:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE11:
	.size	check_on_process, .-check_on_process
	.section	.rodata
.LC16:
	.string	"launching process <%s>\n"
	.align 8
.LC17:
	.string	"Critical Error: Unable to stdout log for program <%s>.\n"
	.align 8
.LC18:
	.string	"Critical Error: Unable to stderr log for program <%s>.\n"
	.align 8
.LC19:
	.string	"Critical Error: Unable to fork.\n"
.LC20:
	.string	"<%s> started with pid %d.\n"
	.text
	.globl	launch_process
	.type	launch_process, @function
launch_process:
.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	QWORD PTR -24[rbp], rdi
	mov	rax, QWORD PTR -24[rbp]
	mov	rdx, QWORD PTR 8[rax]
	mov	rax, QWORD PTR stdout[rip]
	lea	rsi, .LC16[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	rax, QWORD PTR -24[rbp]
	mov	rax, QWORD PTR 24[rax]
	mov	edx, 384
	mov	esi, 1090
	mov	rdi, rax
	mov	eax, 0
	call	open@PLT
	mov	DWORD PTR -12[rbp], eax
	cmp	DWORD PTR -12[rbp], -1
	jne	.L56
	mov	rax, QWORD PTR -24[rbp]
	mov	rdx, QWORD PTR 8[rax]
	mov	rax, QWORD PTR stdout[rip]
	lea	rsi, .LC17[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	jmp	.L55
.L56:
	mov	rax, QWORD PTR -24[rbp]
	mov	rax, QWORD PTR 32[rax]
	mov	edx, 384
	mov	esi, 1090
	mov	rdi, rax
	mov	eax, 0
	call	open@PLT
	mov	DWORD PTR -8[rbp], eax
	cmp	DWORD PTR -8[rbp], -1
	jne	.L58
	mov	eax, DWORD PTR -12[rbp]
	mov	edi, eax
	call	close@PLT
	mov	rax, QWORD PTR -24[rbp]
	mov	rdx, QWORD PTR 8[rax]
	mov	rax, QWORD PTR stdout[rip]
	lea	rsi, .LC18[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	jmp	.L55
.L58:
	call	fork@PLT
	mov	DWORD PTR -4[rbp], eax
	cmp	DWORD PTR -4[rbp], -1
	jne	.L59
	mov	rax, QWORD PTR stdout[rip]
	mov	rcx, rax
	mov	edx, 32
	mov	esi, 1
	lea	rdi, .LC19[rip]
	call	fwrite@PLT
	mov	eax, DWORD PTR -12[rbp]
	mov	edi, eax
	call	close@PLT
	mov	eax, DWORD PTR -8[rbp]
	mov	edi, eax
	call	close@PLT
	jmp	.L55
.L59:
	cmp	DWORD PTR -4[rbp], 0
	je	.L60
	mov	rax, QWORD PTR -24[rbp]
	mov	edx, DWORD PTR -4[rbp]
	mov	DWORD PTR 40[rax], edx
	mov	rax, QWORD PTR -24[rbp]
	mov	rdx, QWORD PTR 8[rax]
	mov	rax, QWORD PTR stdout[rip]
	mov	ecx, DWORD PTR -4[rbp]
	lea	rsi, .LC20[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	edx, DWORD PTR process_group_id[rip]
	mov	eax, DWORD PTR -4[rbp]
	mov	esi, edx
	mov	edi, eax
	call	setpgid@PLT
	mov	eax, DWORD PTR -12[rbp]
	mov	edi, eax
	call	close@PLT
	mov	eax, DWORD PTR -8[rbp]
	mov	edi, eax
	call	close@PLT
	jmp	.L55
.L60:
	mov	eax, DWORD PTR process_group_id[rip]
	mov	esi, eax
	mov	edi, 0
	call	setpgid@PLT
	mov	eax, DWORD PTR -12[rbp]
	mov	esi, 1
	mov	edi, eax
	call	dup2@PLT
	mov	eax, DWORD PTR -8[rbp]
	mov	esi, 2
	mov	edi, eax
	call	dup2@PLT
	mov	eax, DWORD PTR -12[rbp]
	mov	edi, eax
	call	close@PLT
	mov	eax, DWORD PTR -8[rbp]
	mov	edi, eax
	call	close@PLT
	mov	rax, QWORD PTR -24[rbp]
	mov	rcx, QWORD PTR 16[rax]
	mov	rax, QWORD PTR -24[rbp]
	mov	rax, QWORD PTR 16[rax]
	mov	edx, 0
	mov	rsi, rcx
	mov	rdi, rax
	mov	eax, 0
	call	execl@PLT
	mov	edi, 0
	call	exit@PLT
.L55:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE12:
	.size	launch_process, .-launch_process
	.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	"50066.c"
	.text
	.comm	process_group_id,4,4
	.comm	close_down,4,4
	.comm	children,24576,4
	.global	num_children
	.bss
	.align	2
	.type	num_children, %object
	.size	num_children, 4
num_children:
	.space	4
	.comm	enabled_services,4096,4
	.comm	num_enabled_services,4,4
	.comm	disabled_services,4096,4
	.comm	num_disabled_services,4,4
	.section	.rodata
	.align	2
.LC0:
	.ascii	"Usage %s <directory>\012\000"
	.align	2
.LC1:
	.ascii	"Supervisor %d\012\000"
	.align	2
.LC2:
	.ascii	"Supervising directory <%s>\012\000"
	.align	2
.LC3:
	.ascii	"Could not scan directory.\012\000"
	.align	2
.LC4:
	.ascii	"Disabling service <%s> %d\012\000"
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ 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
	str	r0, [fp, #-24]
	str	r1, [fp, #-28]
	ldr	r3, [fp, #-24]
	cmp	r3, #2
	beq	.L2
	ldr	r3, [fp, #-28]
	ldr	r3, [r3]
	mov	r1, r3
	ldr	r0, .L12
	bl	printf
	mvn	r3, #0
	b	.L3
.L2:
	ldr	r3, .L12+4
	ldr	r4, [r3]
	bl	getpid
	mov	r3, r0
	mov	r2, r3
	ldr	r1, .L12+8
	mov	r0, r4
	bl	fprintf
	ldr	r3, .L12+4
	ldr	r0, [r3]
	ldr	r3, [fp, #-28]
	add	r3, r3, #4
	ldr	r3, [r3]
	mov	r2, r3
	ldr	r1, .L12+12
	bl	fprintf
	bl	getpgrp
	mov	r3, r0
	ldr	r2, .L12+16
	str	r3, [r2]
	ldr	r3, .L12+20
	mov	r2, #0
	str	r2, [r3]
	ldr	r3, [fp, #-28]
	add	r3, r3, #4
	ldr	r3, [r3]
	mov	r0, r3
	bl	scan_directory
	mov	r3, r0
	cmp	r3, #0
	beq	.L4
	ldr	r3, .L12+4
	ldr	r3, [r3]
	mov	r2, #26
	mov	r1, #1
	ldr	r0, .L12+24
	bl	fwrite
	mvn	r3, #0
	b	.L3
.L4:
	ldr	r3, .L12+20
	ldr	r3, [r3]
	cmp	r3, #0
	beq	.L5
	mov	r3, #0
	str	r3, [fp, #-20]
	b	.L6
.L8:
	ldr	r1, .L12+28
	ldr	r2, [fp, #-20]
	mov	r3, r2
	lsl	r3, r3, #1
	add	r3, r3, r2
	lsl	r3, r3, #3
	add	r3, r1, r3
	ldr	r3, [r3]
	cmp	r3, #0
	bne	.L7
	ldr	r3, .L12+4
	ldr	r0, [r3]
	ldr	r1, .L12+28
	ldr	r2, [fp, #-20]
	mov	r3, r2
	lsl	r3, r3, #1
	add	r3, r3, r2
	lsl	r3, r3, #3
	add	r3, r1, r3
	add	r3, r3, #4
	ldr	r1, [r3]
	ldr	ip, .L12+28
	ldr	r2, [fp, #-20]
	mov	r3, r2
	lsl	r3, r3, #1
	add	r3, r3, r2
	lsl	r3, r3, #3
	add	r3, ip, r3
	add	r3, r3, #20
	ldr	r3, [r3]
	mov	r2, r1
	ldr	r1, .L12+32
	bl	fprintf
	ldr	r0, [fp, #-20]
	bl	disable_process
.L7:
	ldr	r3, [fp, #-20]
	add	r3, r3, #1
	str	r3, [fp, #-20]
.L6:
	ldr	r3, .L12+36
	ldr	r3, [r3]
	ldr	r2, [fp, #-20]
	cmp	r2, r3
	blt	.L8
	mov	r3, #0
	b	.L3
.L5:
	mov	r3, #0
	str	r3, [fp, #-16]
	b	.L9
.L11:
	ldr	r1, .L12+28
	ldr	r2, [fp, #-16]
	mov	r3, r2
	lsl	r3, r3, #1
	add	r3, r3, r2
	lsl	r3, r3, #3
	add	r3, r1, r3
	ldr	r3, [r3]
	cmp	r3, #0
	bne	.L10
	ldr	r2, [fp, #-16]
	mov	r3, r2
	lsl	r3, r3, #1
	add	r3, r3, r2
	lsl	r3, r3, #3
	ldr	r2, .L12+28
	add	r3, r3, r2
	mov	r0, r3
	bl	check_on_process
.L10:
	ldr	r3, [fp, #-16]
	add	r3, r3, #1
	str	r3, [fp, #-16]
.L9:
	ldr	r3, .L12+36
	ldr	r3, [r3]
	ldr	r2, [fp, #-16]
	cmp	r2, r3
	blt	.L11
	mov	r0, #1
	bl	sleep
	ldr	r3, [fp, #-28]
	add	r3, r3, #4
	ldr	r3, [r3]
	mov	r0, r3
	bl	scan_directory
	b	.L4
.L3:
	mov	r0, r3
	sub	sp, fp, #8
	@ sp needed
	pop	{r4, fp, pc}
.L13:
	.align	2
.L12:
	.word	.LC0
	.word	stdout
	.word	.LC1
	.word	.LC2
	.word	process_group_id
	.word	close_down
	.word	.LC3
	.word	children
	.word	.LC4
	.word	num_children
	.size	main, .-main
	.section	.rodata
	.align	2
.LC5:
	.ascii	"Error reading directory <%s>\012\000"
	.align	2
.LC6:
	.ascii	".\000"
	.align	2
.LC7:
	.ascii	"..\000"
	.align	2
.LC8:
	.ascii	"Disabling service <%s>\012\000"
	.align	2
.LC9:
	.ascii	"Enabling service <%s>\012\000"
	.text
	.align	2
	.global	scan_directory
	.syntax unified
	.arm
	.fpu softvfp
	.type	scan_directory, %function
scan_directory:
	@ args = 0, pretend = 0, frame = 40
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, fp, lr}
	add	fp, sp, #8
	sub	sp, sp, #44
	str	r0, [fp, #-48]
	ldr	r3, .L40
	mov	r2, #0
	str	r2, [r3]
	ldr	r3, .L40+4
	ldr	r3, [r3]
	ldr	r2, .L40+8
	str	r3, [r2]
	mov	r3, #0
	str	r3, [fp, #-40]
	b	.L15
.L18:
	ldr	r1, .L40+12
	ldr	r2, [fp, #-40]
	mov	r3, r2
	lsl	r3, r3, #1
	add	r3, r3, r2
	lsl	r3, r3, #3
	add	r3, r1, r3
	ldr	r3, [r3]
	cmp	r3, #0
	bne	.L16
	ldr	r1, .L40+16
	ldr	r3, [fp, #-40]
	ldr	r2, [fp, #-40]
	str	r2, [r1, r3, lsl #2]
	b	.L17
.L16:
	ldr	r2, .L40+16
	ldr	r3, [fp, #-40]
	mvn	r1, #0
	str	r1, [r2, r3, lsl #2]
.L17:
	ldr	r3, [fp, #-40]
	add	r3, r3, #1
	str	r3, [fp, #-40]
.L15:
	ldr	r3, .L40+4
	ldr	r3, [r3]
	ldr	r2, [fp, #-40]
	cmp	r2, r3
	blt	.L18
	ldr	r0, [fp, #-48]
	bl	opendir
	str	r0, [fp, #-20]
	ldr	r3, [fp, #-20]
	cmp	r3, #0
	bne	.L19
	mov	r3, #1
	b	.L20
.L19:
	bl	__errno_location
	mov	r3, r0
	mov	r2, #0
	str	r2, [r3]
	ldr	r0, [fp, #-20]
	bl	readdir
	str	r0, [fp, #-16]
	ldr	r3, [fp, #-16]
	cmp	r3, #0
	bne	.L21
	bl	__errno_location
	mov	r3, r0
	ldr	r3, [r3]
	cmp	r3, #0
	beq	.L37
	ldr	r3, .L40+20
	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, .L40+24
	mov	r0, r4
	bl	fprintf
	b	.L37
.L21:
	ldr	r3, [fp, #-16]
	ldrb	r3, [r3, #10]	@ zero_extendqisi2
	cmp	r3, #4
	bne	.L19
	ldr	r3, [fp, #-16]
	add	r3, r3, #11
	ldr	r1, .L40+28
	mov	r0, r3
	bl	strcmp
	mov	r3, r0
	cmp	r3, #0
	beq	.L38
	ldr	r3, [fp, #-16]
	add	r3, r3, #11
	ldr	r1, .L40+32
	mov	r0, r3
	bl	strcmp
	mov	r3, r0
	cmp	r3, #0
	beq	.L38
	mov	r3, #0
	str	r3, [fp, #-36]
	mov	r3, #0
	str	r3, [fp, #-32]
	b	.L27
.L31:
	ldr	r1, .L40+12
	ldr	r2, [fp, #-32]
	mov	r3, r2
	lsl	r3, r3, #1
	add	r3, r3, r2
	lsl	r3, r3, #3
	add	r3, r1, r3
	ldr	r3, [r3]
	cmp	r3, #0
	bne	.L39
	ldr	r1, .L40+12
	ldr	r2, [fp, #-32]
	mov	r3, r2
	lsl	r3, r3, #1
	add	r3, r3, r2
	lsl	r3, r3, #3
	add	r3, r1, r3
	add	r3, r3, #4
	ldr	r0, [r3]
	ldr	r3, [fp, #-16]
	add	r3, r3, #11
	mov	r2, #1024
	mov	r1, r3
	bl	strncmp
	mov	r3, r0
	cmp	r3, #0
	bne	.L29
	ldr	r2, .L40+16
	ldr	r3, [fp, #-32]
	mvn	r1, #0
	str	r1, [r2, r3, lsl #2]
	mov	r3, #1
	str	r3, [fp, #-36]
	b	.L30
.L39:
	nop
.L29:
	ldr	r3, [fp, #-32]
	add	r3, r3, #1
	str	r3, [fp, #-32]
.L27:
	ldr	r3, .L40+4
	ldr	r3, [r3]
	ldr	r2, [fp, #-32]
	cmp	r2, r3
	blt	.L31
.L30:
	ldr	r3, [fp, #-36]
	cmp	r3, #0
	bne	.L19
	ldr	r3, .L40
	ldr	r3, [r3]
	ldr	r2, [fp, #-16]
	add	r2, r2, #11
	ldr	r1, .L40+36
	str	r2, [r1, r3, lsl #2]
	ldr	r3, .L40
	ldr	r3, [r3]
	add	r3, r3, #1
	ldr	r2, .L40
	str	r3, [r2]
	b	.L19
.L38:
	nop
	b	.L19
.L37:
	nop
	mov	r3, #0
	str	r3, [fp, #-28]
	b	.L32
.L34:
	ldr	r2, .L40+16
	ldr	r3, [fp, #-28]
	ldr	r3, [r2, r3, lsl #2]
	cmn	r3, #1
	beq	.L33
	ldr	r3, .L40+40
	ldr	r0, [r3]
	ldr	r1, .L40+12
	ldr	r2, [fp, #-28]
	mov	r3, r2
	lsl	r3, r3, #1
	add	r3, r3, r2
	lsl	r3, r3, #3
	add	r3, r1, r3
	add	r3, r3, #4
	ldr	r3, [r3]
	mov	r2, r3
	ldr	r1, .L40+44
	bl	fprintf
	ldr	r0, [fp, #-28]
	bl	disable_process
.L33:
	ldr	r3, [fp, #-28]
	add	r3, r3, #1
	str	r3, [fp, #-28]
.L32:
	ldr	r3, .L40+8
	ldr	r3, [r3]
	ldr	r2, [fp, #-28]
	cmp	r2, r3
	blt	.L34
	mov	r3, #0
	str	r3, [fp, #-24]
	b	.L35
.L36:
	ldr	r3, .L40+40
	ldr	r0, [r3]
	ldr	r2, .L40+36
	ldr	r3, [fp, #-24]
	ldr	r3, [r2, r3, lsl #2]
	mov	r2, r3
	ldr	r1, .L40+48
	bl	fprintf
	ldr	r2, .L40+36
	ldr	r3, [fp, #-24]
	ldr	r3, [r2, r3, lsl #2]
	mov	r1, r3
	ldr	r0, [fp, #-48]
	bl	mark_for_supervision
	ldr	r3, [fp, #-24]
	add	r3, r3, #1
	str	r3, [fp, #-24]
.L35:
	ldr	r3, .L40
	ldr	r3, [r3]
	ldr	r2, [fp, #-24]
	cmp	r2, r3
	blt	.L36
	ldr	r0, [fp, #-20]
	bl	closedir
	mov	r3, #0
.L20:
	mov	r0, r3
	sub	sp, fp, #8
	@ sp needed
	pop	{r4, fp, pc}
.L41:
	.align	2
.L40:
	.word	num_enabled_services
	.word	num_children
	.word	num_disabled_services
	.word	children
	.word	disabled_services
	.word	stderr
	.word	.LC5
	.word	.LC6
	.word	.LC7
	.word	enabled_services
	.word	stdout
	.word	.LC8
	.word	.LC9
	.size	scan_directory, .-scan_directory
	.section	.rodata
	.align	2
.LC10:
	.ascii	"%s/%s/%s\000"
	.align	2
.LC11:
	.ascii	"%s/%s/stdout.log\000"
	.align	2
.LC12:
	.ascii	"%s/%s/stderr.log\000"
	.align	2
.LC13:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	mark_for_supervision_at_index
	.syntax unified
	.arm
	.fpu softvfp
	.type	mark_for_supervision_at_index, %function
mark_for_supervision_at_index:
	@ args = 0, pretend = 0, frame = 3096
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #3104
	str	r0, [fp, #-3088]
	str	r1, [fp, #-3092]
	str	r2, [fp, #-3096]
	ldr	r3, .L44
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	sub	r0, fp, #3072
	sub	r0, r0, #4
	sub	r0, r0, #4
	ldr	r3, [fp, #-3092]
	str	r3, [sp, #4]
	ldr	r3, [fp, #-3092]
	str	r3, [sp]
	ldr	r3, [fp, #-3088]
	ldr	r2, .L44+4
	mov	r1, #1024
	bl	snprintf
	sub	r0, fp, #2048
	sub	r0, r0, #4
	sub	r0, r0, #4
	ldr	r3, [fp, #-3092]
	str	r3, [sp]
	ldr	r3, [fp, #-3088]
	ldr	r2, .L44+8
	mov	r1, #1024
	bl	snprintf
	sub	r0, fp, #1024
	sub	r0, r0, #4
	sub	r0, r0, #4
	ldr	r3, [fp, #-3092]
	str	r3, [sp]
	ldr	r3, [fp, #-3088]
	ldr	r2, .L44+12
	mov	r1, #1024
	bl	snprintf
	ldr	r1, .L44+16
	ldr	r2, [fp, #-3096]
	mov	r3, r2
	lsl	r3, r3, #1
	add	r3, r3, r2
	lsl	r3, r3, #3
	add	r3, r1, r3
	mov	r2, #0
	str	r2, [r3]
	ldr	r0, [fp, #-3092]
	bl	strdup
	mov	r3, r0
	mov	r0, r3
	ldr	r1, .L44+16
	ldr	r2, [fp, #-3096]
	mov	r3, r2
	lsl	r3, r3, #1
	add	r3, r3, r2
	lsl	r3, r3, #3
	add	r3, r1, r3
	add	r3, r3, #4
	str	r0, [r3]
	sub	r3, fp, #3072
	sub	r3, r3, #4
	sub	r3, r3, #4
	mov	r0, r3
	bl	strdup
	mov	r3, r0
	mov	r0, r3
	ldr	r1, .L44+16
	ldr	r2, [fp, #-3096]
	mov	r3, r2
	lsl	r3, r3, #1
	add	r3, r3, r2
	lsl	r3, r3, #3
	add	r3, r1, r3
	add	r3, r3, #8
	str	r0, [r3]
	sub	r3, fp, #2048
	sub	r3, r3, #4
	sub	r3, r3, #4
	mov	r0, r3
	bl	strdup
	mov	r3, r0
	mov	r0, r3
	ldr	r1, .L44+16
	ldr	r2, [fp, #-3096]
	mov	r3, r2
	lsl	r3, r3, #1
	add	r3, r3, r2
	lsl	r3, r3, #3
	add	r3, r1, r3
	add	r3, r3, #12
	str	r0, [r3]
	sub	r3, fp, #1024
	sub	r3, r3, #4
	sub	r3, r3, #4
	mov	r0, r3
	bl	strdup
	mov	r3, r0
	mov	r0, r3
	ldr	r1, .L44+16
	ldr	r2, [fp, #-3096]
	mov	r3, r2
	lsl	r3, r3, #1
	add	r3, r3, r2
	lsl	r3, r3, #3
	add	r3, r1, r3
	add	r3, r3, #16
	str	r0, [r3]
	ldr	r1, .L44+16
	ldr	r2, [fp, #-3096]
	mov	r3, r2
	lsl	r3, r3, #1
	add	r3, r3, r2
	lsl	r3, r3, #3
	add	r3, r1, r3
	add	r3, r3, #20
	mov	r2, #0
	str	r2, [r3]
	nop
	ldr	r3, .L44
	ldr	r2, [r3]
	ldr	r3, [fp, #-8]
	eors	r2, r3, r2
	mov	r3, #0
	beq	.L43
	bl	__stack_chk_fail
.L43:
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L45:
	.align	2
.L44:
	.word	.LC13
	.word	.LC10
	.word	.LC11
	.word	.LC12
	.word	children
	.size	mark_for_supervision_at_index, .-mark_for_supervision_at_index
	.align	2
	.global	mark_for_supervision
	.syntax unified
	.arm
	.fpu softvfp
	.type	mark_for_supervision, %function
mark_for_supervision:
	@ 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]
	str	r1, [fp, #-20]
	mov	r3, #0
	str	r3, [fp, #-8]
	b	.L47
.L50:
	ldr	r1, .L51
	ldr	r2, [fp, #-8]
	mov	r3, r2
	lsl	r3, r3, #1
	add	r3, r3, r2
	lsl	r3, r3, #3
	add	r3, r1, r3
	ldr	r3, [r3]
	cmp	r3, #0
	beq	.L48
	ldr	r2, [fp, #-8]
	ldr	r1, [fp, #-20]
	ldr	r0, [fp, #-16]
	bl	mark_for_supervision_at_index
	b	.L46
.L48:
	ldr	r3, [fp, #-8]
	add	r3, r3, #1
	str	r3, [fp, #-8]
.L47:
	ldr	r3, .L51+4
	ldr	r3, [r3]
	ldr	r2, [fp, #-8]
	cmp	r2, r3
	blt	.L50
	ldr	r3, .L51+4
	ldr	r3, [r3]
	mov	r2, r3
	ldr	r1, [fp, #-20]
	ldr	r0, [fp, #-16]
	bl	mark_for_supervision_at_index
	ldr	r3, .L51+4
	ldr	r3, [r3]
	add	r3, r3, #1
	ldr	r2, .L51+4
	str	r3, [r2]
.L46:
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L52:
	.align	2
.L51:
	.word	children
	.word	num_children
	.size	mark_for_supervision, .-mark_for_supervision
	.section	.rodata
	.align	2
.LC14:
	.ascii	"!\000"
	.text
	.align	2
	.global	disable_process
	.syntax unified
	.arm
	.fpu softvfp
	.type	disable_process, %function
disable_process:
	@ 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	r1, .L54
	ldr	r2, [fp, #-8]
	mov	r3, r2
	lsl	r3, r3, #1
	add	r3, r3, r2
	lsl	r3, r3, #3
	add	r3, r1, r3
	mov	r2, #1
	str	r2, [r3]
	ldr	r1, .L54
	ldr	r2, [fp, #-8]
	mov	r3, r2
	lsl	r3, r3, #1
	add	r3, r3, r2
	lsl	r3, r3, #3
	add	r3, r1, r3
	add	r3, r3, #4
	ldr	r3, [r3]
	mov	r0, r3
	bl	free
	ldr	r1, .L54
	ldr	r2, [fp, #-8]
	mov	r3, r2
	lsl	r3, r3, #1
	add	r3, r3, r2
	lsl	r3, r3, #3
	add	r3, r1, r3
	add	r3, r3, #8
	ldr	r3, [r3]
	mov	r0, r3
	bl	free
	ldr	r1, .L54
	ldr	r2, [fp, #-8]
	mov	r3, r2
	lsl	r3, r3, #1
	add	r3, r3, r2
	lsl	r3, r3, #3
	add	r3, r1, r3
	add	r3, r3, #12
	ldr	r3, [r3]
	mov	r0, r3
	bl	free
	ldr	r1, .L54
	ldr	r2, [fp, #-8]
	mov	r3, r2
	lsl	r3, r3, #1
	add	r3, r3, r2
	lsl	r3, r3, #3
	add	r3, r1, r3
	add	r3, r3, #16
	ldr	r3, [r3]
	mov	r0, r3
	bl	free
	ldr	r1, .L54
	ldr	r2, [fp, #-8]
	mov	r3, r2
	lsl	r3, r3, #1
	add	r3, r3, r2
	lsl	r3, r3, #3
	add	r3, r1, r3
	add	r3, r3, #4
	mov	r2, #0
	str	r2, [r3]
	ldr	r1, .L54
	ldr	r2, [fp, #-8]
	mov	r3, r2
	lsl	r3, r3, #1
	add	r3, r3, r2
	lsl	r3, r3, #3
	add	r3, r1, r3
	add	r3, r3, #8
	mov	r2, #0
	str	r2, [r3]
	ldr	r1, .L54
	ldr	r2, [fp, #-8]
	mov	r3, r2
	lsl	r3, r3, #1
	add	r3, r3, r2
	lsl	r3, r3, #3
	add	r3, r1, r3
	add	r3, r3, #12
	mov	r2, #0
	str	r2, [r3]
	ldr	r1, .L54
	ldr	r2, [fp, #-8]
	mov	r3, r2
	lsl	r3, r3, #1
	add	r3, r3, r2
	lsl	r3, r3, #3
	add	r3, r1, r3
	add	r3, r3, #16
	mov	r2, #0
	str	r2, [r3]
	ldr	r1, .L54
	ldr	r2, [fp, #-8]
	mov	r3, r2
	lsl	r3, r3, #1
	add	r3, r3, r2
	lsl	r3, r3, #3
	add	r3, r1, r3
	add	r3, r3, #20
	ldr	r3, [r3]
	mov	r1, #2
	mov	r0, r3
	bl	kill
	ldr	r1, .L54
	ldr	r2, [fp, #-8]
	mov	r3, r2
	lsl	r3, r3, #1
	add	r3, r3, r2
	lsl	r3, r3, #3
	add	r3, r1, r3
	add	r3, r3, #20
	ldr	r3, [r3]
	mov	r1, #15
	mov	r0, r3
	bl	kill
	ldr	r1, .L54
	ldr	r2, [fp, #-8]
	mov	r3, r2
	lsl	r3, r3, #1
	add	r3, r3, r2
	lsl	r3, r3, #3
	add	r3, r1, r3
	add	r3, r3, #20
	ldr	r3, [r3]
	mov	r2, #0
	mov	r1, #0
	mov	r0, r3
	bl	waitpid
	ldr	r1, .L54
	ldr	r2, [fp, #-8]
	mov	r3, r2
	lsl	r3, r3, #1
	add	r3, r3, r2
	lsl	r3, r3, #3
	add	r3, r1, r3
	add	r3, r3, #20
	mov	r2, #0
	str	r2, [r3]
	ldr	r0, .L54+4
	bl	puts
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L55:
	.align	2
.L54:
	.word	children
	.word	.LC14
	.size	disable_process, .-disable_process
	.section	.rodata
	.align	2
.LC15:
	.ascii	"<%s> exited with status %d\012\000"
	.align	2
.LC16:
	.ascii	"<%s> died!\012\000"
	.align	2
.LC17:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	check_on_process
	.syntax unified
	.arm
	.fpu softvfp
	.type	check_on_process, %function
check_on_process:
	@ 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]
	ldr	r3, .L65
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	ldr	r3, [fp, #-24]
	ldr	r3, [r3, #20]
	cmp	r3, #0
	bne	.L57
	ldr	r0, [fp, #-24]
	bl	launch_process
	b	.L56
.L57:
	ldr	r3, [fp, #-24]
	ldr	r3, [r3, #20]
	sub	r1, fp, #16
	mov	r2, #1
	mov	r0, r3
	bl	waitpid
	str	r0, [fp, #-12]
	ldr	r3, [fp, #-24]
	ldr	r3, [r3, #20]
	ldr	r2, [fp, #-12]
	cmp	r2, r3
	bne	.L59
	ldr	r3, [fp, #-16]
	and	r3, r3, #127
	cmp	r3, #0
	bne	.L64
	ldr	r3, .L65+4
	ldr	r0, [r3]
	ldr	r3, [fp, #-24]
	ldr	r2, [r3, #4]
	ldr	r3, [fp, #-16]
	asr	r3, r3, #8
	and	r3, r3, #255
	ldr	r1, .L65+8
	bl	fprintf
	ldr	r0, [fp, #-24]
	bl	launch_process
	b	.L64
.L59:
	ldr	r3, [fp, #-24]
	ldr	r3, [r3, #20]
	mov	r1, #0
	mov	r0, r3
	bl	kill
	mov	r3, r0
	cmp	r3, #0
	beq	.L56
	ldr	r3, .L65+4
	ldr	r0, [r3]
	ldr	r3, [fp, #-24]
	ldr	r3, [r3, #4]
	mov	r2, r3
	ldr	r1, .L65+12
	bl	fprintf
	ldr	r0, [fp, #-24]
	bl	launch_process
	b	.L56
.L64:
	nop
.L56:
	ldr	r3, .L65
	ldr	r2, [r3]
	ldr	r3, [fp, #-8]
	eors	r2, r3, r2
	mov	r3, #0
	beq	.L63
	bl	__stack_chk_fail
.L63:
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L66:
	.align	2
.L65:
	.word	.LC17
	.word	stdout
	.word	.LC15
	.word	.LC16
	.size	check_on_process, .-check_on_process
	.section	.rodata
	.align	2
.LC18:
	.ascii	"launching process <%s>\012\000"
	.align	2
.LC19:
	.ascii	"Critical Error: Unable to stdout log for program <%"
	.ascii	"s>.\012\000"
	.align	2
.LC20:
	.ascii	"Critical Error: Unable to stderr log for program <%"
	.ascii	"s>.\012\000"
	.align	2
.LC21:
	.ascii	"Critical Error: Unable to fork.\012\000"
	.align	2
.LC22:
	.ascii	"<%s> started with pid %d.\012\000"
	.text
	.align	2
	.global	launch_process
	.syntax unified
	.arm
	.fpu softvfp
	.type	launch_process, %function
launch_process:
	@ 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]
	ldr	r3, .L73
	ldr	r0, [r3]
	ldr	r3, [fp, #-24]
	ldr	r3, [r3, #4]
	mov	r2, r3
	ldr	r1, .L73+4
	bl	fprintf
	ldr	r3, [fp, #-24]
	ldr	r3, [r3, #12]
	mov	r2, #384
	ldr	r1, .L73+8
	mov	r0, r3
	bl	open
	str	r0, [fp, #-16]
	ldr	r3, [fp, #-16]
	cmn	r3, #1
	bne	.L68
	ldr	r3, .L73
	ldr	r0, [r3]
	ldr	r3, [fp, #-24]
	ldr	r3, [r3, #4]
	mov	r2, r3
	ldr	r1, .L73+12
	bl	fprintf
	b	.L67
.L68:
	ldr	r3, [fp, #-24]
	ldr	r3, [r3, #16]
	mov	r2, #384
	ldr	r1, .L73+8
	mov	r0, r3
	bl	open
	str	r0, [fp, #-12]
	ldr	r3, [fp, #-12]
	cmn	r3, #1
	bne	.L70
	ldr	r0, [fp, #-16]
	bl	close
	ldr	r3, .L73
	ldr	r0, [r3]
	ldr	r3, [fp, #-24]
	ldr	r3, [r3, #4]
	mov	r2, r3
	ldr	r1, .L73+16
	bl	fprintf
	b	.L67
.L70:
	bl	fork
	mov	r3, r0
	str	r3, [fp, #-8]
	ldr	r3, [fp, #-8]
	cmn	r3, #1
	bne	.L71
	ldr	r3, .L73
	ldr	r3, [r3]
	mov	r2, #32
	mov	r1, #1
	ldr	r0, .L73+20
	bl	fwrite
	ldr	r0, [fp, #-16]
	bl	close
	ldr	r0, [fp, #-12]
	bl	close
	b	.L67
.L71:
	ldr	r3, [fp, #-8]
	cmp	r3, #0
	beq	.L72
	ldr	r3, [fp, #-24]
	ldr	r2, [fp, #-8]
	str	r2, [r3, #20]
	ldr	r3, .L73
	ldr	r0, [r3]
	ldr	r3, [fp, #-24]
	ldr	r2, [r3, #4]
	ldr	r3, [fp, #-8]
	ldr	r1, .L73+24
	bl	fprintf
	ldr	r3, .L73+28
	ldr	r3, [r3]
	mov	r1, r3
	ldr	r0, [fp, #-8]
	bl	setpgid
	ldr	r0, [fp, #-16]
	bl	close
	ldr	r0, [fp, #-12]
	bl	close
	b	.L67
.L72:
	ldr	r3, .L73+28
	ldr	r3, [r3]
	mov	r1, r3
	mov	r0, #0
	bl	setpgid
	mov	r1, #1
	ldr	r0, [fp, #-16]
	bl	dup2
	mov	r1, #2
	ldr	r0, [fp, #-12]
	bl	dup2
	ldr	r0, [fp, #-16]
	bl	close
	ldr	r0, [fp, #-12]
	bl	close
	ldr	r3, [fp, #-24]
	ldr	r0, [r3, #8]
	ldr	r3, [fp, #-24]
	ldr	r3, [r3, #8]
	mov	r2, #0
	mov	r1, r3
	bl	execl
	mov	r0, #0
	bl	exit
.L67:
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L74:
	.align	2
.L73:
	.word	stdout
	.word	.LC18
	.word	1090
	.word	.LC19
	.word	.LC20
	.word	.LC21
	.word	.LC22
	.word	process_group_id
	.size	launch_process, .-launch_process
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
