	.file	"695467.c"
	.intel_syntax noprefix
	.text
	.globl	CHILDS_COUNT
	.section	.rodata
	.align 8
	.type	CHILDS_COUNT, @object
	.size	CHILDS_COUNT, 9
CHILDS_COUNT:
	.string	"\001\003\002"
	.string	""
	.string	""
	.string	"\001\001"
	.globl	CHILDS_IDS
	.align 16
	.type	CHILDS_IDS, @object
	.size	CHILDS_IDS, 27
CHILDS_IDS:
	.string	"\001"
	.zero	1
	.ascii	"\002\003\004"
	.string	"\005\006"
	.string	""
	.string	""
	.zero	1
	.string	""
	.string	""
	.zero	1
	.string	""
	.string	""
	.zero	1
	.string	"\007"
	.zero	1
	.string	"\b"
	.zero	1
	.string	""
	.string	""
	.zero	1
	.globl	GROUP_TYPE
	.align 8
	.type	GROUP_TYPE, @object
	.size	GROUP_TYPE, 9
GROUP_TYPE:
	.string	""
	.string	"\001"
	.string	"\002"
	.string	""
	.string	""
	.ascii	"\001\001"
	.globl	SEND_TO
	.align 8
	.type	SEND_TO, @object
	.size	SEND_TO, 9
SEND_TO:
	.string	""
	.string	"\372\001"
	.string	"\376"
	.ascii	"\004\004\004"
	.globl	SEND_SIGNALS
	.align 32
	.type	SEND_SIGNALS, @object
	.size	SEND_SIGNALS, 36
SEND_SIGNALS:
	.long	0
	.long	10
	.long	12
	.long	0
	.long	10
	.long	0
	.long	10
	.long	12
	.long	10
	.globl	RECV_SIGNALS_COUNT
	.align 16
	.type	RECV_SIGNALS_COUNT, @object
	.size	RECV_SIGNALS_COUNT, 18
RECV_SIGNALS_COUNT:
	.string	""
	.string	""
	.string	"\001\001\002"
	.ascii	"\001\001\001"
	.string	""
	.string	"\001"
	.string	""
	.string	"\001"
	.string	""
	.string	""
	.string	""
	.globl	exec_name
	.bss
	.align 8
	.type	exec_name, @object
	.size	exec_name, 8
exec_name:
	.zero	8
	.globl	proc_id
	.align 4
	.type	proc_id, @object
	.size	proc_id, 4
proc_id:
	.zero	4
	.globl	pids_list
	.align 8
	.type	pids_list, @object
	.size	pids_list, 8
pids_list:
	.zero	8
	.globl	tmp_file_name
	.section	.rodata
.LC0:
	.string	"/tmp/pids.log"
	.section	.data.rel.local,"aw"
	.align 8
	.type	tmp_file_name, @object
	.size	tmp_file_name, 8
tmp_file_name:
	.quad	.LC0
	.section	.rodata
	.align 8
.LC1:
	.string	"Error: not all processes forked or initialized.\nHalting."
.LC2:
	.string	"wt"
.LC3:
	.string	"Can't create temp file"
.LC4:
	.string	"%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
	push	rbx
	sub	rsp, 40
	.cfi_offset 3, -24
	mov	DWORD PTR -36[rbp], edi
	mov	QWORD PTR -48[rbp], rsi
	mov	rax, QWORD PTR -48[rbp]
	mov	rax, QWORD PTR [rax]
	mov	rdi, rax
	call	__xpg_basename@PLT
	mov	QWORD PTR exec_name[rip], rax
	mov	rax, QWORD PTR pids_list[rip]
	mov	r9d, 0
	mov	r8d, -1
	mov	ecx, 33
	mov	edx, 3
	mov	esi, 72
	mov	rdi, rax
	call	mmap@PLT
	mov	QWORD PTR pids_list[rip], rax
	mov	DWORD PTR -28[rbp], 0
	mov	DWORD PTR -28[rbp], 0
	jmp	.L2
.L3:
	mov	rdx, QWORD PTR pids_list[rip]
	mov	eax, DWORD PTR -28[rbp]
	cdqe
	sal	rax, 2
	add	rax, rdx
	mov	DWORD PTR [rax], 0
	add	DWORD PTR -28[rbp], 1
.L2:
	cmp	DWORD PTR -28[rbp], 17
	jle	.L3
	mov	eax, 1
	movzx	eax, al
	mov	esi, eax
	mov	edi, 0
	call	forker
	mov	edx, 0
	mov	esi, 15
	lea	rdi, kill_wait_for_children[rip]
	call	set_sig_handler
	mov	eax, DWORD PTR proc_id[rip]
	test	eax, eax
	jne	.L4
	mov	eax, 0
	call	wait_for_children
	mov	rax, QWORD PTR pids_list[rip]
	mov	esi, 72
	mov	rdi, rax
	call	munmap@PLT
	mov	eax, 0
	jmp	.L24
.L4:
	mov	esi, 0
	lea	rdi, wait_for_children[rip]
	call	on_exit@PLT
	mov	rdx, QWORD PTR pids_list[rip]
	mov	eax, DWORD PTR proc_id[rip]
	cdqe
	sal	rax, 2
	lea	rbx, [rdx+rax]
	call	getpid@PLT
	mov	DWORD PTR [rbx], eax
	mov	eax, DWORD PTR proc_id[rip]
	cmp	eax, 1
	jne	.L6
.L11:
	mov	DWORD PTR -28[rbp], 1
	jmp	.L7
.L10:
	mov	rdx, QWORD PTR pids_list[rip]
	mov	eax, DWORD PTR -28[rbp]
	cdqe
	sal	rax, 2
	add	rax, rdx
	mov	eax, DWORD PTR [rax]
	cmp	eax, -1
	jne	.L8
	mov	rax, QWORD PTR exec_name[rip]
	mov	edx, 0
	lea	rsi, .LC1[rip]
	mov	rdi, rax
	call	print_error_exit
	mov	edi, 1
	call	exit@PLT
.L8:
	add	DWORD PTR -28[rbp], 1
.L7:
	cmp	DWORD PTR -28[rbp], 9
	jg	.L9
	mov	rdx, QWORD PTR pids_list[rip]
	mov	eax, DWORD PTR -28[rbp]
	cdqe
	sal	rax, 2
	add	rax, rdx
	mov	eax, DWORD PTR [rax]
	test	eax, eax
	jne	.L10
.L9:
	cmp	DWORD PTR -28[rbp], 8
	jle	.L11
	mov	rax, QWORD PTR tmp_file_name[rip]
	lea	rsi, .LC2[rip]
	mov	rdi, rax
	call	fopen@PLT
	mov	QWORD PTR -24[rbp], rax
	cmp	QWORD PTR -24[rbp], 0
	jne	.L12
	mov	rax, QWORD PTR exec_name[rip]
	mov	edx, 0
	lea	rsi, .LC3[rip]
	mov	rdi, rax
	call	print_error_exit
.L12:
	mov	DWORD PTR -28[rbp], 1
	jmp	.L13
.L14:
	mov	rdx, QWORD PTR pids_list[rip]
	mov	eax, DWORD PTR -28[rbp]
	cdqe
	sal	rax, 2
	add	rax, rdx
	mov	edx, DWORD PTR [rax]
	mov	rax, QWORD PTR -24[rbp]
	lea	rsi, .LC4[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	add	DWORD PTR -28[rbp], 1
.L13:
	cmp	DWORD PTR -28[rbp], 8
	jle	.L14
	mov	rax, QWORD PTR -24[rbp]
	mov	rdi, rax
	call	fclose@PLT
	mov	rax, QWORD PTR pids_list[rip]
	mov	DWORD PTR [rax], 1
	mov	edx, 0
	mov	esi, 0
	lea	rdi, sig_handler[rip]
	call	set_sig_handler
.L19:
	mov	DWORD PTR -28[rbp], 10
	jmp	.L15
.L18:
	mov	rdx, QWORD PTR pids_list[rip]
	mov	eax, DWORD PTR -28[rbp]
	cdqe
	sal	rax, 2
	add	rax, rdx
	mov	eax, DWORD PTR [rax]
	cmp	eax, -1
	jne	.L16
	mov	rax, QWORD PTR exec_name[rip]
	mov	edx, 0
	lea	rsi, .LC1[rip]
	mov	rdi, rax
	call	print_error_exit
	mov	edi, 1
	call	exit@PLT
.L16:
	add	DWORD PTR -28[rbp], 1
.L15:
	cmp	DWORD PTR -28[rbp], 17
	jg	.L17
	mov	rdx, QWORD PTR pids_list[rip]
	mov	eax, DWORD PTR -28[rbp]
	cdqe
	sal	rax, 2
	add	rax, rdx
	mov	eax, DWORD PTR [rax]
	test	eax, eax
	jne	.L18
.L17:
	cmp	DWORD PTR -28[rbp], 17
	jle	.L19
	mov	DWORD PTR -28[rbp], 10
	jmp	.L20
.L21:
	mov	rdx, QWORD PTR pids_list[rip]
	mov	eax, DWORD PTR -28[rbp]
	cdqe
	sal	rax, 2
	add	rax, rdx
	mov	DWORD PTR [rax], 0
	add	DWORD PTR -28[rbp], 1
.L20:
	cmp	DWORD PTR -28[rbp], 17
	jle	.L21
	mov	edi, 0
	call	sig_handler
	jmp	.L23
.L6:
	mov	rax, QWORD PTR pids_list[rip]
	mov	eax, DWORD PTR [rax]
	test	eax, eax
	je	.L6
	mov	edx, 0
	mov	esi, 0
	lea	rdi, sig_handler[rip]
	call	set_sig_handler
.L23:
	call	pause@PLT
	jmp	.L23
.L24:
	mov	rbx, QWORD PTR -8[rbp]
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	main, .-main
	.section	.rodata
.LC5:
	.string	"%s: %s %d\n"
	.text
	.globl	print_error_exit
	.type	print_error_exit, @function
print_error_exit:
.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, 32
	mov	QWORD PTR -8[rbp], rdi
	mov	QWORD PTR -16[rbp], rsi
	mov	DWORD PTR -20[rbp], edx
	mov	rax, QWORD PTR stderr[rip]
	mov	esi, DWORD PTR -20[rbp]
	mov	rcx, QWORD PTR -16[rbp]
	mov	rdx, QWORD PTR -8[rbp]
	mov	r8d, esi
	lea	rsi, .LC5[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	rax, QWORD PTR stderr[rip]
	mov	rdi, rax
	call	fflush@PLT
	mov	rdx, QWORD PTR pids_list[rip]
	mov	eax, DWORD PTR -20[rbp]
	cdqe
	sal	rax, 2
	add	rax, rdx
	mov	DWORD PTR [rax], -1
	mov	edi, 1
	call	exit@PLT
	.cfi_endproc
.LFE7:
	.size	print_error_exit, .-print_error_exit
	.globl	wait_for_children
	.type	wait_for_children, @function
wait_for_children:
.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, 16
	mov	eax, DWORD PTR proc_id[rip]
	cdqe
	lea	rdx, CHILDS_COUNT[rip]
	movzx	eax, BYTE PTR [rax+rdx]
	movzx	eax, al
	mov	DWORD PTR -4[rbp], eax
	jmp	.L27
.L28:
	mov	edi, 0
	call	wait@PLT
	sub	DWORD PTR -4[rbp], 1
.L27:
	cmp	DWORD PTR -4[rbp], 0
	jg	.L28
	nop
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.size	wait_for_children, .-wait_for_children
	.globl	current_time
	.type	current_time, @function
current_time:
.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	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	lea	rax, -32[rbp]
	mov	esi, 0
	mov	rdi, rax
	call	gettimeofday@PLT
	mov	rax, QWORD PTR -24[rbp]
	mov	rdx, QWORD PTR -8[rbp]
	sub	rdx, QWORD PTR fs:40
	je	.L31
	call	__stack_chk_fail@PLT
.L31:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE9:
	.size	current_time, .-current_time
	.globl	usr_recv
	.bss
	.align 8
	.type	usr_recv, @object
	.size	usr_recv, 8
usr_recv:
	.zero	8
	.globl	usr_amount
	.align 16
	.type	usr_amount, @object
	.size	usr_amount, 16
usr_amount:
	.zero	16
	.section	.rodata
	.align 8
.LC6:
	.string	"%d %d \320\267\320\260\320\262\320\265\321\200\321\210\320\270\320\273 \321\200\320\260\320\261\320\276\321\202\321\203 \320\277\320\276\321\201\320\273\320\265 %d SIGUSR1 \320\270 %d SIGUSR2\n"
	.text
	.globl	kill_wait_for_children
	.type	kill_wait_for_children, @function
kill_wait_for_children:
.LFB10:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	push	r13
	push	r12
	push	rbx
	sub	rsp, 24
	.cfi_offset 13, -24
	.cfi_offset 12, -32
	.cfi_offset 3, -40
	mov	DWORD PTR -36[rbp], 0
	mov	DWORD PTR -36[rbp], 0
	jmp	.L33
.L34:
	mov	rcx, QWORD PTR pids_list[rip]
	mov	eax, DWORD PTR proc_id[rip]
	mov	edx, DWORD PTR -36[rbp]
	movsx	rsi, edx
	movsx	rdx, eax
	mov	rax, rdx
	add	rax, rax
	add	rax, rdx
	lea	rdx, [rax+rsi]
	lea	rax, CHILDS_IDS[rip]
	add	rax, rdx
	movzx	eax, BYTE PTR [rax]
	movzx	eax, al
	sal	rax, 2
	add	rax, rcx
	mov	eax, DWORD PTR [rax]
	mov	esi, 15
	mov	edi, eax
	call	kill@PLT
	add	DWORD PTR -36[rbp], 1
.L33:
	mov	eax, DWORD PTR proc_id[rip]
	cdqe
	lea	rdx, CHILDS_COUNT[rip]
	movzx	eax, BYTE PTR [rax+rdx]
	movzx	eax, al
	cmp	DWORD PTR -36[rbp], eax
	jl	.L34
	mov	eax, 0
	call	wait_for_children
	mov	eax, DWORD PTR proc_id[rip]
	test	eax, eax
	je	.L35
	mov	r13d, DWORD PTR usr_amount[rip+12]
	mov	ebx, DWORD PTR usr_amount[rip+4]
	call	getppid@PLT
	mov	r12d, eax
	call	getpid@PLT
	mov	r8d, r13d
	mov	ecx, ebx
	mov	edx, r12d
	mov	esi, eax
	lea	rdi, .LC6[rip]
	mov	eax, 0
	call	printf@PLT
.L35:
	mov	rax, QWORD PTR stdout[rip]
	mov	rdi, rax
	call	fflush@PLT
	mov	edi, 0
	call	exit@PLT
	.cfi_endproc
.LFE10:
	.size	kill_wait_for_children, .-kill_wait_for_children
	.section	.rodata
.LC7:
	.string	"USR"
	.align 8
.LC8:
	.string	"%d %d %d \320\277\320\276\320\273\321\203\321\207\320\270\320\273 %s%d %lld\n"
	.align 8
.LC9:
	.string	"%d %d %d \320\277\320\276\321\201\320\273\320\260\320\273 %s%d %lld\n"
	.text
	.globl	sig_handler
	.type	sig_handler, @function
sig_handler:
.LFB11:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	push	r13
	push	r12
	push	rbx
	sub	rsp, 40
	.cfi_offset 13, -24
	.cfi_offset 12, -32
	.cfi_offset 3, -40
	mov	DWORD PTR -52[rbp], edi
	cmp	DWORD PTR -52[rbp], 10
	jne	.L37
	mov	DWORD PTR -52[rbp], 0
	jmp	.L38
.L37:
	cmp	DWORD PTR -52[rbp], 12
	jne	.L39
	mov	DWORD PTR -52[rbp], 1
	jmp	.L38
.L39:
	mov	DWORD PTR -52[rbp], -1
.L38:
	cmp	DWORD PTR -52[rbp], -1
	je	.L40
	mov	eax, DWORD PTR -52[rbp]
	cdqe
	lea	rdx, 0[0+rax*8]
	lea	rax, usr_amount[rip]
	mov	eax, DWORD PTR [rdx+rax]
	lea	ecx, 1[rax]
	mov	eax, DWORD PTR -52[rbp]
	cdqe
	lea	rdx, 0[0+rax*8]
	lea	rax, usr_amount[rip]
	mov	DWORD PTR [rdx+rax], ecx
	mov	eax, DWORD PTR -52[rbp]
	cdqe
	lea	rdx, 0[0+rax*4]
	lea	rax, usr_recv[rip]
	mov	eax, DWORD PTR [rdx+rax]
	lea	ecx, 1[rax]
	mov	eax, DWORD PTR -52[rbp]
	cdqe
	lea	rdx, 0[0+rax*4]
	lea	rax, usr_recv[rip]
	mov	DWORD PTR [rdx+rax], ecx
	mov	eax, 0
	call	current_time
	mov	rbx, rax
	mov	eax, DWORD PTR -52[rbp]
	lea	r13d, 1[rax]
	call	getppid@PLT
	mov	r12d, eax
	call	getpid@PLT
	mov	edx, eax
	mov	eax, DWORD PTR proc_id[rip]
	sub	rsp, 8
	push	rbx
	mov	r9d, r13d
	lea	r8, .LC7[rip]
	mov	ecx, r12d
	mov	esi, eax
	lea	rdi, .LC8[rip]
	mov	eax, 0
	call	printf@PLT
	add	rsp, 16
	mov	rax, QWORD PTR stdout[rip]
	mov	rdi, rax
	call	fflush@PLT
	mov	eax, DWORD PTR proc_id[rip]
	cmp	eax, 1
	jne	.L41
	mov	edx, DWORD PTR usr_amount[rip]
	mov	eax, DWORD PTR usr_amount[rip+8]
	add	eax, edx
	cmp	eax, 101
	jne	.L42
	mov	eax, 0
	call	kill_wait_for_children
.L42:
	mov	rax, QWORD PTR pids_list[rip]
	add	rax, 52
	mov	DWORD PTR [rax], 0
	mov	rdx, QWORD PTR pids_list[rip]
	add	rdx, 60
	mov	eax, DWORD PTR [rax]
	mov	DWORD PTR [rdx], eax
.L41:
	mov	eax, DWORD PTR proc_id[rip]
	cmp	eax, 8
	jne	.L43
.L44:
	mov	rax, QWORD PTR pids_list[rip]
	add	rax, 60
	mov	edx, DWORD PTR [rax]
	mov	rax, QWORD PTR pids_list[rip]
	add	rax, 52
	mov	eax, DWORD PTR [rax]
	add	eax, edx
	cmp	eax, 2
	jne	.L44
.L43:
	mov	edx, DWORD PTR usr_recv[rip]
	mov	eax, DWORD PTR proc_id[rip]
	cdqe
	lea	rcx, RECV_SIGNALS_COUNT[rip]
	movzx	eax, BYTE PTR [rax+rcx]
	movsx	eax, al
	cmp	edx, eax
	jne	.L45
	mov	edx, DWORD PTR usr_recv[rip+4]
	mov	eax, DWORD PTR proc_id[rip]
	cdqe
	lea	rcx, RECV_SIGNALS_COUNT[rip+9]
	movzx	eax, BYTE PTR [rax+rcx]
	movsx	eax, al
	cmp	edx, eax
	je	.L46
.L45:
	mov	eax, DWORD PTR proc_id[rip]
	cmp	eax, 4
	jne	.L55
	cmp	DWORD PTR -52[rbp], 0
	jne	.L55
	mov	rax, QWORD PTR pids_list[rip]
	add	rax, 52
	mov	DWORD PTR [rax], 1
	jmp	.L55
.L46:
	mov	eax, 0
	mov	DWORD PTR usr_recv[rip+4], eax
	mov	DWORD PTR usr_recv[rip], eax
.L40:
	mov	eax, DWORD PTR proc_id[rip]
	cdqe
	lea	rdx, SEND_TO[rip]
	movzx	eax, BYTE PTR [rax+rdx]
	mov	BYTE PTR -33[rbp], al
	cmp	BYTE PTR -33[rbp], 0
	je	.L49
	mov	eax, DWORD PTR proc_id[rip]
	cdqe
	lea	rdx, 0[0+rax*4]
	lea	rax, SEND_SIGNALS[rip]
	mov	eax, DWORD PTR [rdx+rax]
	cmp	eax, 10
	jne	.L50
	mov	eax, 1
	jmp	.L51
.L50:
	mov	eax, 2
.L51:
	mov	DWORD PTR -52[rbp], eax
	mov	eax, DWORD PTR -52[rbp]
	sub	eax, 1
	movsx	rdx, eax
	lea	rcx, 0[0+rdx*8]
	lea	rdx, usr_amount[rip+4]
	mov	edx, DWORD PTR [rcx+rdx]
	lea	ecx, 1[rdx]
	cdqe
	lea	rdx, 0[0+rax*8]
	lea	rax, usr_amount[rip+4]
	mov	DWORD PTR [rdx+rax], ecx
.L49:
	mov	eax, 0
	call	current_time
	mov	rbx, rax
	call	getppid@PLT
	mov	r12d, eax
	call	getpid@PLT
	mov	edx, eax
	mov	eax, DWORD PTR proc_id[rip]
	mov	ecx, DWORD PTR -52[rbp]
	sub	rsp, 8
	push	rbx
	mov	r9d, ecx
	lea	r8, .LC7[rip]
	mov	ecx, r12d
	mov	esi, eax
	lea	rdi, .LC9[rip]
	mov	eax, 0
	call	printf@PLT
	add	rsp, 16
	mov	rax, QWORD PTR stdout[rip]
	mov	rdi, rax
	call	fflush@PLT
	cmp	BYTE PTR -33[rbp], 0
	jle	.L52
	mov	eax, DWORD PTR proc_id[rip]
	cdqe
	lea	rdx, 0[0+rax*4]
	lea	rax, SEND_SIGNALS[rip]
	mov	edx, DWORD PTR [rdx+rax]
	mov	rcx, QWORD PTR pids_list[rip]
	movsx	rax, BYTE PTR -33[rbp]
	sal	rax, 2
	add	rax, rcx
	mov	eax, DWORD PTR [rax]
	mov	esi, edx
	mov	edi, eax
	call	kill@PLT
	jmp	.L53
.L52:
	cmp	BYTE PTR -33[rbp], 0
	jns	.L56
	mov	eax, DWORD PTR proc_id[rip]
	cdqe
	lea	rdx, 0[0+rax*4]
	lea	rax, SEND_SIGNALS[rip]
	mov	ebx, DWORD PTR [rdx+rax]
	mov	rdx, QWORD PTR pids_list[rip]
	movsx	eax, BYTE PTR -33[rbp]
	neg	eax
	cdqe
	sal	rax, 2
	add	rax, rdx
	mov	eax, DWORD PTR [rax]
	mov	edi, eax
	call	getpgid@PLT
	neg	eax
	mov	esi, ebx
	mov	edi, eax
	call	kill@PLT
.L53:
	mov	eax, DWORD PTR proc_id[rip]
	cmp	eax, 6
	jne	.L36
	mov	rax, QWORD PTR pids_list[rip]
	add	rax, 60
	mov	DWORD PTR [rax], 1
	jmp	.L36
.L55:
	nop
	jmp	.L36
.L56:
	nop
.L36:
	lea	rsp, -24[rbp]
	pop	rbx
	pop	r12
	pop	r13
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE11:
	.size	sig_handler, .-sig_handler
	.section	.rodata
.LC10:
	.string	"Can't set sighandler!"
	.text
	.globl	set_sig_handler
	.type	set_sig_handler, @function
set_sig_handler:
.LFB12:
	.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, 488
	.cfi_offset 3, -24
	mov	QWORD PTR -488[rbp], rdi
	mov	DWORD PTR -492[rbp], esi
	mov	DWORD PTR -496[rbp], edx
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -24[rbp], rax
	xor	eax, eax
	lea	rax, -464[rbp]
	mov	rdi, rax
	call	sigemptyset@PLT
	lea	rax, -464[rbp]
	mov	esi, 10
	mov	rdi, rax
	call	sigaddset@PLT
	lea	rax, -464[rbp]
	mov	esi, 12
	mov	rdi, rax
	call	sigaddset@PLT
	mov	rax, QWORD PTR -464[rbp]
	mov	rdx, QWORD PTR -456[rbp]
	mov	QWORD PTR -328[rbp], rax
	mov	QWORD PTR -320[rbp], rdx
	mov	rax, QWORD PTR -448[rbp]
	mov	rdx, QWORD PTR -440[rbp]
	mov	QWORD PTR -312[rbp], rax
	mov	QWORD PTR -304[rbp], rdx
	mov	rax, QWORD PTR -432[rbp]
	mov	rdx, QWORD PTR -424[rbp]
	mov	QWORD PTR -296[rbp], rax
	mov	QWORD PTR -288[rbp], rdx
	mov	rax, QWORD PTR -416[rbp]
	mov	rdx, QWORD PTR -408[rbp]
	mov	QWORD PTR -280[rbp], rax
	mov	QWORD PTR -272[rbp], rdx
	mov	rax, QWORD PTR -400[rbp]
	mov	rdx, QWORD PTR -392[rbp]
	mov	QWORD PTR -264[rbp], rax
	mov	QWORD PTR -256[rbp], rdx
	mov	rax, QWORD PTR -384[rbp]
	mov	rdx, QWORD PTR -376[rbp]
	mov	QWORD PTR -248[rbp], rax
	mov	QWORD PTR -240[rbp], rdx
	mov	rax, QWORD PTR -368[rbp]
	mov	rdx, QWORD PTR -360[rbp]
	mov	QWORD PTR -232[rbp], rax
	mov	QWORD PTR -224[rbp], rdx
	mov	rax, QWORD PTR -352[rbp]
	mov	rdx, QWORD PTR -344[rbp]
	mov	QWORD PTR -216[rbp], rax
	mov	QWORD PTR -208[rbp], rdx
	mov	eax, DWORD PTR -496[rbp]
	mov	DWORD PTR -200[rbp], eax
	mov	rax, QWORD PTR -488[rbp]
	mov	QWORD PTR -336[rbp], rax
	cmp	DWORD PTR -492[rbp], 0
	je	.L58
	lea	rdx, -176[rbp]
	lea	rcx, -336[rbp]
	mov	eax, DWORD PTR -492[rbp]
	mov	rsi, rcx
	mov	edi, eax
	call	sigaction@PLT
	jmp	.L57
.L58:
	mov	DWORD PTR -468[rbp], 0
	mov	DWORD PTR -468[rbp], 0
	jmp	.L60
.L64:
	mov	eax, DWORD PTR -468[rbp]
	cdqe
	lea	rdx, SEND_TO[rip]
	movzx	eax, BYTE PTR [rax+rdx]
	mov	BYTE PTR -469[rbp], al
	cmp	BYTE PTR -469[rbp], 0
	jle	.L61
	movsx	edx, BYTE PTR -469[rbp]
	mov	eax, DWORD PTR proc_id[rip]
	cmp	edx, eax
	je	.L62
.L61:
	cmp	BYTE PTR -469[rbp], 0
	jns	.L63
	mov	rdx, QWORD PTR pids_list[rip]
	movsx	eax, BYTE PTR -469[rbp]
	neg	eax
	cdqe
	sal	rax, 2
	add	rax, rdx
	mov	eax, DWORD PTR [rax]
	mov	edi, eax
	call	getpgid@PLT
	mov	ebx, eax
	mov	edi, 0
	call	getpgid@PLT
	cmp	ebx, eax
	jne	.L63
.L62:
	mov	eax, DWORD PTR -468[rbp]
	cdqe
	lea	rdx, 0[0+rax*4]
	lea	rax, SEND_SIGNALS[rip]
	mov	eax, DWORD PTR [rdx+rax]
	test	eax, eax
	je	.L63
	mov	eax, DWORD PTR -468[rbp]
	cdqe
	lea	rdx, 0[0+rax*4]
	lea	rax, SEND_SIGNALS[rip]
	mov	eax, DWORD PTR [rdx+rax]
	lea	rdx, -176[rbp]
	lea	rcx, -336[rbp]
	mov	rsi, rcx
	mov	edi, eax
	call	sigaction@PLT
	cmp	eax, -1
	jne	.L63
	mov	edx, DWORD PTR proc_id[rip]
	mov	rax, QWORD PTR exec_name[rip]
	lea	rsi, .LC10[rip]
	mov	rdi, rax
	call	print_error_exit
.L63:
	add	DWORD PTR -468[rbp], 1
.L60:
	cmp	DWORD PTR -468[rbp], 8
	jle	.L64
	mov	rdx, QWORD PTR pids_list[rip]
	mov	eax, DWORD PTR proc_id[rip]
	cdqe
	add	rax, 9
	sal	rax, 2
	add	rax, rdx
	mov	DWORD PTR [rax], 1
.L57:
	mov	rax, QWORD PTR -24[rbp]
	sub	rax, QWORD PTR fs:40
	je	.L65
	call	__stack_chk_fail@PLT
.L65:
	mov	rbx, QWORD PTR -8[rbp]
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE12:
	.size	set_sig_handler, .-set_sig_handler
	.section	.rodata
.LC11:
	.string	"Can't fork!"
	.align 8
.LC12:
	.string	"%d) %d %d : %d process created\n"
.LC13:
	.string	"Can't set group"
	.text
	.globl	forker
	.type	forker, @function
forker:
.LFB13:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	push	r12
	push	rbx
	sub	rsp, 32
	.cfi_offset 12, -24
	.cfi_offset 3, -32
	mov	DWORD PTR -36[rbp], edi
	mov	DWORD PTR -40[rbp], esi
	mov	DWORD PTR -28[rbp], 0
	mov	DWORD PTR -32[rbp], 0
	mov	DWORD PTR -32[rbp], 0
	jmp	.L67
.L76:
	mov	eax, DWORD PTR -32[rbp]
	movsx	rcx, eax
	mov	eax, DWORD PTR -36[rbp]
	movsx	rdx, eax
	mov	rax, rdx
	add	rax, rax
	add	rax, rdx
	lea	rdx, [rax+rcx]
	lea	rax, CHILDS_IDS[rip]
	add	rax, rdx
	movzx	eax, BYTE PTR [rax]
	movzx	eax, al
	mov	DWORD PTR -24[rbp], eax
	call	fork@PLT
	mov	DWORD PTR -28[rbp], eax
	cmp	DWORD PTR -28[rbp], -1
	jne	.L68
	mov	rax, QWORD PTR exec_name[rip]
	mov	edx, DWORD PTR -24[rbp]
	lea	rsi, .LC11[rip]
	mov	rdi, rax
	call	print_error_exit
	jmp	.L69
.L68:
	cmp	DWORD PTR -28[rbp], 0
	jne	.L70
	mov	eax, DWORD PTR -24[rbp]
	mov	DWORD PTR proc_id[rip], eax
	call	getpgrp@PLT
	mov	r12d, eax
	call	getppid@PLT
	mov	ebx, eax
	call	getpid@PLT
	mov	edx, eax
	mov	eax, DWORD PTR proc_id[rip]
	mov	r8d, r12d
	mov	ecx, ebx
	mov	esi, eax
	lea	rdi, .LC12[rip]
	mov	eax, 0
	call	printf@PLT
	mov	eax, DWORD PTR proc_id[rip]
	cdqe
	lea	rdx, CHILDS_COUNT[rip]
	movzx	eax, BYTE PTR [rax+rdx]
	test	al, al
	je	.L77
	mov	eax, DWORD PTR proc_id[rip]
	cdqe
	lea	rdx, CHILDS_COUNT[rip]
	movzx	eax, BYTE PTR [rax+rdx]
	movzx	edx, al
	mov	eax, DWORD PTR proc_id[rip]
	mov	esi, edx
	mov	edi, eax
	call	forker
	jmp	.L77
.L70:
	mov	eax, DWORD PTR -24[rbp]
	cdqe
	lea	rdx, GROUP_TYPE[rip]
	movzx	eax, BYTE PTR [rax+rdx]
	movzx	eax, al
	mov	DWORD PTR -20[rbp], eax
	cmp	DWORD PTR -20[rbp], 0
	jne	.L73
	mov	edx, DWORD PTR -28[rbp]
	mov	eax, DWORD PTR -28[rbp]
	mov	esi, edx
	mov	edi, eax
	call	setpgid@PLT
	cmp	eax, -1
	jne	.L74
	mov	rax, QWORD PTR exec_name[rip]
	mov	edx, DWORD PTR -24[rbp]
	lea	rsi, .LC13[rip]
	mov	rdi, rax
	call	print_error_exit
	jmp	.L69
.L74:
	mov	eax, DWORD PTR -28[rbp]
	mov	DWORD PTR prev_chld_grp.0[rip], eax
	jmp	.L69
.L73:
	cmp	DWORD PTR -20[rbp], 1
	jne	.L75
	mov	edi, 0
	call	getpgid@PLT
	mov	edx, eax
	mov	eax, DWORD PTR -28[rbp]
	mov	esi, edx
	mov	edi, eax
	call	setpgid@PLT
	cmp	eax, -1
	jne	.L69
	mov	rax, QWORD PTR exec_name[rip]
	mov	edx, DWORD PTR -24[rbp]
	lea	rsi, .LC13[rip]
	mov	rdi, rax
	call	print_error_exit
	jmp	.L69
.L75:
	cmp	DWORD PTR -20[rbp], 2
	jne	.L69
	mov	edx, DWORD PTR prev_chld_grp.0[rip]
	mov	eax, DWORD PTR -28[rbp]
	mov	esi, edx
	mov	edi, eax
	call	setpgid@PLT
	cmp	eax, -1
	jne	.L69
	mov	rax, QWORD PTR exec_name[rip]
	mov	edx, DWORD PTR -24[rbp]
	lea	rsi, .LC13[rip]
	mov	rdi, rax
	call	print_error_exit
.L69:
	add	DWORD PTR -32[rbp], 1
.L67:
	mov	eax, DWORD PTR -32[rbp]
	cmp	eax, DWORD PTR -40[rbp]
	jl	.L76
	jmp	.L78
.L77:
	nop
.L78:
	nop
	add	rsp, 32
	pop	rbx
	pop	r12
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE13:
	.size	forker, .-forker
	.local	prev_chld_grp.0
	.comm	prev_chld_grp.0,4,4
	.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	"695467.c"
	.text
	.global	CHILDS_COUNT
	.section	.rodata
	.align	2
	.type	CHILDS_COUNT, %object
	.size	CHILDS_COUNT, 9
CHILDS_COUNT:
	.ascii	"\001\003\002\000\000\000\001\001\000"
	.global	CHILDS_IDS
	.align	2
	.type	CHILDS_IDS, %object
	.size	CHILDS_IDS, 27
CHILDS_IDS:
	.ascii	"\001\000"
	.space	1
	.ascii	"\002\003\004"
	.ascii	"\005\006\000"
	.ascii	"\000\000"
	.space	1
	.ascii	"\000\000"
	.space	1
	.ascii	"\000\000"
	.space	1
	.ascii	"\007\000"
	.space	1
	.ascii	"\010\000"
	.space	1
	.ascii	"\000\000"
	.space	1
	.global	GROUP_TYPE
	.align	2
	.type	GROUP_TYPE, %object
	.size	GROUP_TYPE, 9
GROUP_TYPE:
	.ascii	"\000\001\000\002\000\000\000\001\001"
	.global	SEND_TO
	.align	2
	.type	SEND_TO, %object
	.size	SEND_TO, 9
SEND_TO:
	.ascii	"\000\372\001\000\376\000\004\004\004"
	.global	SEND_SIGNALS
	.align	2
	.type	SEND_SIGNALS, %object
	.size	SEND_SIGNALS, 36
SEND_SIGNALS:
	.word	0
	.word	10
	.word	12
	.word	0
	.word	10
	.word	0
	.word	10
	.word	12
	.word	10
	.global	RECV_SIGNALS_COUNT
	.align	2
	.type	RECV_SIGNALS_COUNT, %object
	.size	RECV_SIGNALS_COUNT, 18
RECV_SIGNALS_COUNT:
	.ascii	"\000\000\001\001\002\000\001\001\001"
	.ascii	"\000\001\000\000\001\000\000\000\000"
	.global	exec_name
	.bss
	.align	2
	.type	exec_name, %object
	.size	exec_name, 4
exec_name:
	.space	4
	.global	proc_id
	.align	2
	.type	proc_id, %object
	.size	proc_id, 4
proc_id:
	.space	4
	.global	pids_list
	.align	2
	.type	pids_list, %object
	.size	pids_list, 4
pids_list:
	.space	4
	.global	tmp_file_name
	.section	.rodata
	.align	2
.LC0:
	.ascii	"/tmp/pids.log\000"
	.data
	.align	2
	.type	tmp_file_name, %object
	.size	tmp_file_name, 4
tmp_file_name:
	.word	.LC0
	.section	.rodata
	.align	2
.LC1:
	.ascii	"Error: not all processes forked or initialized.\012"
	.ascii	"Halting.\000"
	.align	2
.LC2:
	.ascii	"wt\000"
	.align	2
.LC3:
	.ascii	"Can't create temp file\000"
	.align	2
.LC4:
	.ascii	"%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, #28
	str	r0, [fp, #-24]
	str	r1, [fp, #-28]
	ldr	r3, [fp, #-28]
	ldr	r3, [r3]
	mov	r0, r3
	bl	__xpg_basename
	mov	r3, r0
	ldr	r2, .L25
	str	r3, [r2]
	ldr	r3, .L25+4
	ldr	r0, [r3]
	mov	r3, #0
	str	r3, [sp, #4]
	mvn	r3, #0
	str	r3, [sp]
	mov	r3, #33
	mov	r2, #3
	mov	r1, #72
	bl	mmap
	mov	r3, r0
	ldr	r2, .L25+4
	str	r3, [r2]
	mov	r3, #0
	str	r3, [fp, #-20]
	mov	r3, #0
	str	r3, [fp, #-20]
	b	.L2
.L3:
	ldr	r3, .L25+4
	ldr	r2, [r3]
	ldr	r3, [fp, #-20]
	lsl	r3, r3, #2
	add	r3, r2, r3
	mov	r2, #0
	str	r2, [r3]
	ldr	r3, [fp, #-20]
	add	r3, r3, #1
	str	r3, [fp, #-20]
.L2:
	ldr	r3, [fp, #-20]
	cmp	r3, #17
	ble	.L3
	mov	r3, #1
	mov	r1, r3
	mov	r0, #0
	bl	forker
	mov	r2, #0
	mov	r1, #15
	ldr	r0, .L25+8
	bl	set_sig_handler
	ldr	r3, .L25+12
	ldr	r3, [r3]
	cmp	r3, #0
	bne	.L4
	bl	wait_for_children
	ldr	r3, .L25+4
	ldr	r3, [r3]
	mov	r1, #72
	mov	r0, r3
	bl	munmap
	mov	r3, #0
	b	.L24
.L4:
	mov	r1, #0
	ldr	r0, .L25+16
	bl	on_exit
	ldr	r3, .L25+4
	ldr	r2, [r3]
	ldr	r3, .L25+12
	ldr	r3, [r3]
	lsl	r3, r3, #2
	add	r4, r2, r3
	bl	getpid
	mov	r3, r0
	str	r3, [r4]
	ldr	r3, .L25+12
	ldr	r3, [r3]
	cmp	r3, #1
	bne	.L6
.L11:
	mov	r3, #1
	str	r3, [fp, #-20]
	b	.L7
.L10:
	ldr	r3, .L25+4
	ldr	r2, [r3]
	ldr	r3, [fp, #-20]
	lsl	r3, r3, #2
	add	r3, r2, r3
	ldr	r3, [r3]
	cmn	r3, #1
	bne	.L8
	ldr	r3, .L25
	ldr	r3, [r3]
	mov	r2, #0
	ldr	r1, .L25+20
	mov	r0, r3
	bl	print_error_exit
	mov	r0, #1
	bl	exit
.L8:
	ldr	r3, [fp, #-20]
	add	r3, r3, #1
	str	r3, [fp, #-20]
.L7:
	ldr	r3, [fp, #-20]
	cmp	r3, #9
	bgt	.L9
	ldr	r3, .L25+4
	ldr	r2, [r3]
	ldr	r3, [fp, #-20]
	lsl	r3, r3, #2
	add	r3, r2, r3
	ldr	r3, [r3]
	cmp	r3, #0
	bne	.L10
.L9:
	ldr	r3, [fp, #-20]
	cmp	r3, #8
	ble	.L11
	ldr	r3, .L25+24
	ldr	r3, [r3]
	ldr	r1, .L25+28
	mov	r0, r3
	bl	fopen
	str	r0, [fp, #-16]
	ldr	r3, [fp, #-16]
	cmp	r3, #0
	bne	.L12
	ldr	r3, .L25
	ldr	r3, [r3]
	mov	r2, #0
	ldr	r1, .L25+32
	mov	r0, r3
	bl	print_error_exit
.L12:
	mov	r3, #1
	str	r3, [fp, #-20]
	b	.L13
.L14:
	ldr	r3, .L25+4
	ldr	r2, [r3]
	ldr	r3, [fp, #-20]
	lsl	r3, r3, #2
	add	r3, r2, r3
	ldr	r3, [r3]
	mov	r2, r3
	ldr	r1, .L25+36
	ldr	r0, [fp, #-16]
	bl	fprintf
	ldr	r3, [fp, #-20]
	add	r3, r3, #1
	str	r3, [fp, #-20]
.L13:
	ldr	r3, [fp, #-20]
	cmp	r3, #8
	ble	.L14
	ldr	r0, [fp, #-16]
	bl	fclose
	ldr	r3, .L25+4
	ldr	r3, [r3]
	mov	r2, #1
	str	r2, [r3]
	mov	r2, #0
	mov	r1, #0
	ldr	r0, .L25+40
	bl	set_sig_handler
.L19:
	mov	r3, #10
	str	r3, [fp, #-20]
	b	.L15
.L18:
	ldr	r3, .L25+4
	ldr	r2, [r3]
	ldr	r3, [fp, #-20]
	lsl	r3, r3, #2
	add	r3, r2, r3
	ldr	r3, [r3]
	cmn	r3, #1
	bne	.L16
	ldr	r3, .L25
	ldr	r3, [r3]
	mov	r2, #0
	ldr	r1, .L25+20
	mov	r0, r3
	bl	print_error_exit
	mov	r0, #1
	bl	exit
.L16:
	ldr	r3, [fp, #-20]
	add	r3, r3, #1
	str	r3, [fp, #-20]
.L15:
	ldr	r3, [fp, #-20]
	cmp	r3, #17
	bgt	.L17
	ldr	r3, .L25+4
	ldr	r2, [r3]
	ldr	r3, [fp, #-20]
	lsl	r3, r3, #2
	add	r3, r2, r3
	ldr	r3, [r3]
	cmp	r3, #0
	bne	.L18
.L17:
	ldr	r3, [fp, #-20]
	cmp	r3, #17
	ble	.L19
	mov	r3, #10
	str	r3, [fp, #-20]
	b	.L20
.L21:
	ldr	r3, .L25+4
	ldr	r2, [r3]
	ldr	r3, [fp, #-20]
	lsl	r3, r3, #2
	add	r3, r2, r3
	mov	r2, #0
	str	r2, [r3]
	ldr	r3, [fp, #-20]
	add	r3, r3, #1
	str	r3, [fp, #-20]
.L20:
	ldr	r3, [fp, #-20]
	cmp	r3, #17
	ble	.L21
	mov	r0, #0
	bl	sig_handler
	b	.L23
.L6:
	ldr	r3, .L25+4
	ldr	r3, [r3]
	ldr	r3, [r3]
	cmp	r3, #0
	beq	.L6
	mov	r2, #0
	mov	r1, #0
	ldr	r0, .L25+40
	bl	set_sig_handler
.L23:
	bl	pause
	b	.L23
.L24:
	mov	r0, r3
	sub	sp, fp, #8
	@ sp needed
	pop	{r4, fp, pc}
.L26:
	.align	2
.L25:
	.word	exec_name
	.word	pids_list
	.word	kill_wait_for_children
	.word	proc_id
	.word	wait_for_children
	.word	.LC1
	.word	tmp_file_name
	.word	.LC2
	.word	.LC3
	.word	.LC4
	.word	sig_handler
	.size	main, .-main
	.section	.rodata
	.align	2
.LC5:
	.ascii	"%s: %s %d\012\000"
	.text
	.align	2
	.global	print_error_exit
	.syntax unified
	.arm
	.fpu softvfp
	.type	print_error_exit, %function
print_error_exit:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #24
	str	r0, [fp, #-8]
	str	r1, [fp, #-12]
	str	r2, [fp, #-16]
	ldr	r3, .L28
	ldr	r0, [r3]
	ldr	r3, [fp, #-16]
	str	r3, [sp]
	ldr	r3, [fp, #-12]
	ldr	r2, [fp, #-8]
	ldr	r1, .L28+4
	bl	fprintf
	ldr	r3, .L28
	ldr	r3, [r3]
	mov	r0, r3
	bl	fflush
	ldr	r3, .L28+8
	ldr	r2, [r3]
	ldr	r3, [fp, #-16]
	lsl	r3, r3, #2
	add	r3, r2, r3
	mvn	r2, #0
	str	r2, [r3]
	mov	r0, #1
	bl	exit
.L29:
	.align	2
.L28:
	.word	stderr
	.word	.LC5
	.word	pids_list
	.size	print_error_exit, .-print_error_exit
	.align	2
	.global	wait_for_children
	.syntax unified
	.arm
	.fpu softvfp
	.type	wait_for_children, %function
wait_for_children:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #8
	ldr	r3, .L33
	ldr	r3, [r3]
	ldr	r2, .L33+4
	ldrb	r3, [r2, r3]	@ zero_extendqisi2
	str	r3, [fp, #-8]
	b	.L31
.L32:
	mov	r0, #0
	bl	wait
	ldr	r3, [fp, #-8]
	sub	r3, r3, #1
	str	r3, [fp, #-8]
.L31:
	ldr	r3, [fp, #-8]
	cmp	r3, #0
	bgt	.L32
	nop
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L34:
	.align	2
.L33:
	.word	proc_id
	.word	CHILDS_COUNT
	.size	wait_for_children, .-wait_for_children
	.section	.rodata
	.align	2
.LC6:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	current_time
	.syntax unified
	.arm
	.fpu softvfp
	.type	current_time, %function
current_time:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #16
	ldr	r3, .L38
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	sub	r3, fp, #16
	mov	r1, #0
	mov	r0, r3
	bl	gettimeofday
	ldr	r3, [fp, #-12]
	mov	r2, r3
	asr	r3, r2, #31
	ldr	r1, .L38
	ldr	r0, [r1]
	ldr	r1, [fp, #-8]
	eors	r0, r1, r0
	mov	r1, #0
	beq	.L37
	bl	__stack_chk_fail
.L37:
	mov	r0, r2
	mov	r1, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L39:
	.align	2
.L38:
	.word	.LC6
	.size	current_time, .-current_time
	.global	usr_recv
	.bss
	.align	2
	.type	usr_recv, %object
	.size	usr_recv, 8
usr_recv:
	.space	8
	.global	usr_amount
	.align	2
	.type	usr_amount, %object
	.size	usr_amount, 16
usr_amount:
	.space	16
	.section	.rodata
	.align	2
.LC7:
	.ascii	"%d %d \320\267\320\260\320\262\320\265\321\200\321\210"
	.ascii	"\320\270\320\273 \321\200\320\260\320\261\320\276\321"
	.ascii	"\202\321\203 \320\277\320\276\321\201\320\273\320\265"
	.ascii	" %d SIGUSR1 \320\270 %d SIGUSR2\012\000"
	.text
	.align	2
	.global	kill_wait_for_children
	.syntax unified
	.arm
	.fpu softvfp
	.type	kill_wait_for_children, %function
kill_wait_for_children:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, fp, lr}
	add	fp, sp, #8
	sub	sp, sp, #20
	mov	r3, #0
	str	r3, [fp, #-16]
	mov	r3, #0
	str	r3, [fp, #-16]
	b	.L41
.L42:
	ldr	r3, .L44
	ldr	r1, [r3]
	ldr	r3, .L44+4
	ldr	r2, [r3]
	ldr	r0, .L44+8
	mov	r3, r2
	lsl	r3, r3, #1
	add	r3, r3, r2
	add	r2, r0, r3
	ldr	r3, [fp, #-16]
	add	r3, r2, r3
	ldrb	r3, [r3]	@ zero_extendqisi2
	lsl	r3, r3, #2
	add	r3, r1, r3
	ldr	r3, [r3]
	mov	r1, #15
	mov	r0, r3
	bl	kill
	ldr	r3, [fp, #-16]
	add	r3, r3, #1
	str	r3, [fp, #-16]
.L41:
	ldr	r3, .L44+4
	ldr	r3, [r3]
	ldr	r2, .L44+12
	ldrb	r3, [r2, r3]	@ zero_extendqisi2
	mov	r2, r3
	ldr	r3, [fp, #-16]
	cmp	r3, r2
	blt	.L42
	bl	wait_for_children
	ldr	r3, .L44+4
	ldr	r3, [r3]
	cmp	r3, #0
	beq	.L43
	bl	getpid
	mov	r4, r0
	bl	getppid
	mov	r1, r0
	ldr	r3, .L44+16
	ldr	r2, [r3, #4]
	ldr	r3, .L44+16
	ldr	r3, [r3, #12]
	str	r3, [sp]
	mov	r3, r2
	mov	r2, r1
	mov	r1, r4
	ldr	r0, .L44+20
	bl	printf
.L43:
	ldr	r3, .L44+24
	ldr	r3, [r3]
	mov	r0, r3
	bl	fflush
	mov	r0, #0
	bl	exit
.L45:
	.align	2
.L44:
	.word	pids_list
	.word	proc_id
	.word	CHILDS_IDS
	.word	CHILDS_COUNT
	.word	usr_amount
	.word	.LC7
	.word	stdout
	.size	kill_wait_for_children, .-kill_wait_for_children
	.section	.rodata
	.align	2
.LC8:
	.ascii	"%d %d %d \320\277\320\276\320\273\321\203\321\207\320"
	.ascii	"\270\320\273 %s%d %lld\012\000"
	.align	2
.LC9:
	.ascii	"USR\000"
	.align	2
.LC10:
	.ascii	"%d %d %d \320\277\320\276\321\201\320\273\320\260\320"
	.ascii	"\273 %s%d %lld\012\000"
	.text
	.align	2
	.global	sig_handler
	.syntax unified
	.arm
	.fpu softvfp
	.type	sig_handler, %function
sig_handler:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, fp, lr}
	add	fp, sp, #20
	sub	sp, sp, #32
	str	r0, [fp, #-32]
	ldr	r3, [fp, #-32]
	cmp	r3, #10
	bne	.L47
	mov	r3, #0
	str	r3, [fp, #-32]
	b	.L48
.L47:
	ldr	r3, [fp, #-32]
	cmp	r3, #12
	bne	.L49
	mov	r3, #1
	str	r3, [fp, #-32]
	b	.L48
.L49:
	mvn	r3, #0
	str	r3, [fp, #-32]
.L48:
	ldr	r3, [fp, #-32]
	cmn	r3, #1
	beq	.L50
	ldr	r2, .L66
	ldr	r3, [fp, #-32]
	ldr	r3, [r2, r3, lsl #3]
	add	r2, r3, #1
	ldr	r1, .L66
	ldr	r3, [fp, #-32]
	str	r2, [r1, r3, lsl #3]
	ldr	r2, .L66+4
	ldr	r3, [fp, #-32]
	ldr	r3, [r2, r3, lsl #2]
	add	r2, r3, #1
	ldr	r1, .L66+4
	ldr	r3, [fp, #-32]
	str	r2, [r1, r3, lsl #2]
	ldr	r3, .L66+8
	ldr	r5, [r3]
	bl	getpid
	mov	r6, r0
	bl	getppid
	mov	r7, r0
	ldr	r3, [fp, #-32]
	add	r4, r3, #1
	bl	current_time
	mov	r2, r0
	mov	r3, r1
	str	r2, [sp, #8]
	str	r3, [sp, #12]
	str	r4, [sp, #4]
	ldr	r3, .L66+12
	str	r3, [sp]
	mov	r3, r7
	mov	r2, r6
	mov	r1, r5
	ldr	r0, .L66+16
	bl	printf
	ldr	r3, .L66+20
	ldr	r3, [r3]
	mov	r0, r3
	bl	fflush
	ldr	r3, .L66+8
	ldr	r3, [r3]
	cmp	r3, #1
	bne	.L51
	ldr	r3, .L66
	ldr	r2, [r3]
	ldr	r3, .L66
	ldr	r3, [r3, #8]
	add	r3, r2, r3
	cmp	r3, #101
	bne	.L52
	bl	kill_wait_for_children
.L52:
	ldr	r3, .L66+24
	ldr	r3, [r3]
	add	r3, r3, #52
	mov	r2, #0
	str	r2, [r3]
	ldr	r2, .L66+24
	ldr	r2, [r2]
	add	r2, r2, #60
	ldr	r3, [r3]
	str	r3, [r2]
.L51:
	ldr	r3, .L66+8
	ldr	r3, [r3]
	cmp	r3, #8
	bne	.L53
.L54:
	ldr	r3, .L66+24
	ldr	r3, [r3]
	add	r3, r3, #60
	ldr	r2, [r3]
	ldr	r3, .L66+24
	ldr	r3, [r3]
	add	r3, r3, #52
	ldr	r3, [r3]
	add	r3, r2, r3
	cmp	r3, #2
	bne	.L54
.L53:
	ldr	r3, .L66+4
	ldr	r3, [r3]
	ldr	r2, .L66+8
	ldr	r2, [r2]
	ldr	r1, .L66+28
	ldrb	r2, [r1, r2]	@ zero_extendqisi2
	cmp	r3, r2
	bne	.L55
	ldr	r3, .L66+4
	ldr	r3, [r3, #4]
	ldr	r2, .L66+8
	ldr	r2, [r2]
	ldr	r1, .L66+28
	add	r2, r1, r2
	ldrb	r2, [r2, #9]	@ zero_extendqisi2
	cmp	r3, r2
	beq	.L56
.L55:
	ldr	r3, .L66+8
	ldr	r3, [r3]
	cmp	r3, #4
	bne	.L64
	ldr	r3, [fp, #-32]
	cmp	r3, #0
	bne	.L64
	ldr	r3, .L66+24
	ldr	r3, [r3]
	add	r3, r3, #52
	mov	r2, #1
	str	r2, [r3]
	b	.L64
.L56:
	mov	r3, #0
	ldr	r2, .L66+4
	str	r3, [r2, #4]
	ldr	r2, .L66+4
	str	r3, [r2]
.L50:
	ldr	r3, .L66+8
	ldr	r3, [r3]
	ldr	r2, .L66+32
	ldrb	r3, [r2, r3]
	strb	r3, [fp, #-21]
	ldrb	r3, [fp, #-21]	@ zero_extendqisi2
	cmp	r3, #0
	beq	.L59
	ldr	r3, .L66+8
	ldr	r3, [r3]
	ldr	r2, .L66+36
	ldr	r3, [r2, r3, lsl #2]
	cmp	r3, #10
	bne	.L60
	mov	r3, #1
	b	.L61
.L60:
	mov	r3, #2
.L61:
	str	r3, [fp, #-32]
	ldr	r3, [fp, #-32]
	sub	r2, r3, #1
	ldr	r1, .L66
	lsl	r3, r2, #3
	add	r3, r1, r3
	ldr	r3, [r3, #4]
	add	r1, r3, #1
	ldr	r0, .L66
	lsl	r3, r2, #3
	add	r3, r0, r3
	str	r1, [r3, #4]
.L59:
	ldr	r3, .L66+8
	ldr	r4, [r3]
	bl	getpid
	mov	r5, r0
	bl	getppid
	mov	r6, r0
	bl	current_time
	mov	r2, r0
	mov	r3, r1
	str	r2, [sp, #8]
	str	r3, [sp, #12]
	ldr	r3, [fp, #-32]
	str	r3, [sp, #4]
	ldr	r3, .L66+12
	str	r3, [sp]
	mov	r3, r6
	mov	r2, r5
	mov	r1, r4
	ldr	r0, .L66+40
	bl	printf
	ldr	r3, .L66+20
	ldr	r3, [r3]
	mov	r0, r3
	bl	fflush
	ldrb	r3, [fp, #-21]	@ zero_extendqisi2
	cmp	r3, #0
	beq	.L65
	ldr	r3, .L66+24
	ldr	r2, [r3]
	ldrb	r3, [fp, #-21]	@ zero_extendqisi2
	lsl	r3, r3, #2
	add	r3, r2, r3
	ldr	r2, [r3]
	ldr	r3, .L66+8
	ldr	r3, [r3]
	ldr	r1, .L66+36
	ldr	r3, [r1, r3, lsl #2]
	mov	r1, r3
	mov	r0, r2
	bl	kill
	ldr	r3, .L66+8
	ldr	r3, [r3]
	cmp	r3, #6
	bne	.L46
	ldr	r3, .L66+24
	ldr	r3, [r3]
	add	r3, r3, #60
	mov	r2, #1
	str	r2, [r3]
	b	.L46
.L64:
	nop
	b	.L46
.L65:
	nop
.L46:
	sub	sp, fp, #20
	@ sp needed
	pop	{r4, r5, r6, r7, fp, pc}
.L67:
	.align	2
.L66:
	.word	usr_amount
	.word	usr_recv
	.word	proc_id
	.word	.LC9
	.word	.LC8
	.word	stdout
	.word	pids_list
	.word	RECV_SIGNALS_COUNT
	.word	SEND_TO
	.word	SEND_SIGNALS
	.word	.LC10
	.size	sig_handler, .-sig_handler
	.section	.rodata
	.align	2
.LC11:
	.ascii	"Can't set sighandler!\000"
	.align	2
.LC12:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	set_sig_handler
	.syntax unified
	.arm
	.fpu softvfp
	.type	set_sig_handler, %function
set_sig_handler:
	@ args = 0, pretend = 0, frame = 440
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #440
	str	r0, [fp, #-432]
	str	r1, [fp, #-436]
	str	r2, [fp, #-440]
	ldr	r3, .L75
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	sub	r3, fp, #416
	mov	r0, r3
	bl	sigemptyset
	sub	r3, fp, #416
	mov	r1, #10
	mov	r0, r3
	bl	sigaddset
	sub	r3, fp, #416
	mov	r1, #12
	mov	r0, r3
	bl	sigaddset
	sub	r3, fp, #284
	sub	r1, fp, #416
	mov	r2, #128
	mov	r0, r3
	bl	memcpy
	ldr	r3, [fp, #-440]
	str	r3, [fp, #-156]
	ldr	r3, [fp, #-432]
	str	r3, [fp, #-288]
	ldr	r3, [fp, #-436]
	cmp	r3, #0
	beq	.L69
	sub	r2, fp, #148
	sub	r3, fp, #288
	mov	r1, r3
	ldr	r0, [fp, #-436]
	bl	sigaction
	b	.L68
.L69:
	mov	r3, #0
	str	r3, [fp, #-420]
	mov	r3, #0
	str	r3, [fp, #-420]
	b	.L71
.L73:
	ldr	r2, .L75+4
	ldr	r3, [fp, #-420]
	add	r3, r2, r3
	ldrb	r3, [r3]
	strb	r3, [fp, #-421]
	ldrb	r3, [fp, #-421]	@ zero_extendqisi2
	cmp	r3, #0
	beq	.L72
	ldrb	r2, [fp, #-421]	@ zero_extendqisi2
	ldr	r3, .L75+8
	ldr	r3, [r3]
	cmp	r2, r3
	bne	.L72
	ldr	r2, .L75+12
	ldr	r3, [fp, #-420]
	ldr	r3, [r2, r3, lsl #2]
	cmp	r3, #0
	beq	.L72
	ldr	r2, .L75+12
	ldr	r3, [fp, #-420]
	ldr	r3, [r2, r3, lsl #2]
	sub	r2, fp, #148
	sub	r1, fp, #288
	mov	r0, r3
	bl	sigaction
	mov	r3, r0
	cmn	r3, #1
	bne	.L72
	ldr	r3, .L75+16
	ldr	r3, [r3]
	ldr	r2, .L75+8
	ldr	r2, [r2]
	ldr	r1, .L75+20
	mov	r0, r3
	bl	print_error_exit
.L72:
	ldr	r3, [fp, #-420]
	add	r3, r3, #1
	str	r3, [fp, #-420]
.L71:
	ldr	r3, [fp, #-420]
	cmp	r3, #8
	ble	.L73
	ldr	r3, .L75+24
	ldr	r2, [r3]
	ldr	r3, .L75+8
	ldr	r3, [r3]
	add	r3, r3, #9
	lsl	r3, r3, #2
	add	r3, r2, r3
	mov	r2, #1
	str	r2, [r3]
.L68:
	ldr	r3, .L75
	ldr	r2, [r3]
	ldr	r3, [fp, #-8]
	eors	r2, r3, r2
	mov	r3, #0
	beq	.L74
	bl	__stack_chk_fail
.L74:
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L76:
	.align	2
.L75:
	.word	.LC12
	.word	SEND_TO
	.word	proc_id
	.word	SEND_SIGNALS
	.word	exec_name
	.word	.LC11
	.word	pids_list
	.size	set_sig_handler, .-set_sig_handler
	.section	.rodata
	.align	2
.LC13:
	.ascii	"Can't fork!\000"
	.align	2
.LC14:
	.ascii	"%d) %d %d : %d process created\012\000"
	.align	2
.LC15:
	.ascii	"Can't set group\000"
	.text
	.align	2
	.global	forker
	.syntax unified
	.arm
	.fpu softvfp
	.type	forker, %function
forker:
	@ args = 0, pretend = 0, frame = 24
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, r5, r6, fp, lr}
	add	fp, sp, #16
	sub	sp, sp, #36
	str	r0, [fp, #-40]
	str	r1, [fp, #-44]
	mov	r3, #0
	str	r3, [fp, #-32]
	mov	r3, #0
	str	r3, [fp, #-36]
	mov	r3, #0
	str	r3, [fp, #-36]
	b	.L78
.L87:
	ldr	r1, .L90
	ldr	r2, [fp, #-40]
	mov	r3, r2
	lsl	r3, r3, #1
	add	r3, r3, r2
	add	r2, r1, r3
	ldr	r3, [fp, #-36]
	add	r3, r2, r3
	ldrb	r3, [r3]	@ zero_extendqisi2
	str	r3, [fp, #-28]
	bl	fork
	mov	r3, r0
	str	r3, [fp, #-32]
	ldr	r3, [fp, #-32]
	cmn	r3, #1
	bne	.L79
	ldr	r3, .L90+4
	ldr	r3, [r3]
	ldr	r2, [fp, #-28]
	ldr	r1, .L90+8
	mov	r0, r3
	bl	print_error_exit
	b	.L80
.L79:
	ldr	r3, [fp, #-32]
	cmp	r3, #0
	bne	.L81
	ldr	r2, .L90+12
	ldr	r3, [fp, #-28]
	str	r3, [r2]
	ldr	r3, .L90+12
	ldr	r4, [r3]
	bl	getpid
	mov	r5, r0
	bl	getppid
	mov	r6, r0
	bl	getpgrp
	mov	r3, r0
	str	r3, [sp]
	mov	r3, r6
	mov	r2, r5
	mov	r1, r4
	ldr	r0, .L90+16
	bl	printf
	ldr	r3, .L90+12
	ldr	r3, [r3]
	ldr	r2, .L90+20
	ldrb	r3, [r2, r3]	@ zero_extendqisi2
	cmp	r3, #0
	beq	.L88
	ldr	r3, .L90+12
	ldr	r2, [r3]
	ldr	r3, .L90+12
	ldr	r3, [r3]
	ldr	r1, .L90+20
	ldrb	r3, [r1, r3]	@ zero_extendqisi2
	mov	r1, r3
	mov	r0, r2
	bl	forker
	b	.L88
.L81:
	ldr	r2, .L90+24
	ldr	r3, [fp, #-28]
	add	r3, r2, r3
	ldrb	r3, [r3]	@ zero_extendqisi2
	str	r3, [fp, #-24]
	ldr	r3, [fp, #-24]
	cmp	r3, #0
	bne	.L84
	ldr	r1, [fp, #-32]
	ldr	r0, [fp, #-32]
	bl	setpgid
	mov	r3, r0
	cmn	r3, #1
	bne	.L85
	ldr	r3, .L90+4
	ldr	r3, [r3]
	ldr	r2, [fp, #-28]
	ldr	r1, .L90+28
	mov	r0, r3
	bl	print_error_exit
	b	.L80
.L85:
	ldr	r2, .L90+32
	ldr	r3, [fp, #-32]
	str	r3, [r2]
	b	.L80
.L84:
	ldr	r3, [fp, #-24]
	cmp	r3, #1
	bne	.L86
	mov	r0, #0
	bl	getpgid
	mov	r3, r0
	mov	r1, r3
	ldr	r0, [fp, #-32]
	bl	setpgid
	mov	r3, r0
	cmn	r3, #1
	bne	.L80
	ldr	r3, .L90+4
	ldr	r3, [r3]
	ldr	r2, [fp, #-28]
	ldr	r1, .L90+28
	mov	r0, r3
	bl	print_error_exit
	b	.L80
.L86:
	ldr	r3, [fp, #-24]
	cmp	r3, #2
	bne	.L80
	ldr	r3, .L90+32
	ldr	r3, [r3]
	mov	r1, r3
	ldr	r0, [fp, #-32]
	bl	setpgid
	mov	r3, r0
	cmn	r3, #1
	bne	.L80
	ldr	r3, .L90+4
	ldr	r3, [r3]
	ldr	r2, [fp, #-28]
	ldr	r1, .L90+28
	mov	r0, r3
	bl	print_error_exit
.L80:
	ldr	r3, [fp, #-36]
	add	r3, r3, #1
	str	r3, [fp, #-36]
.L78:
	ldr	r2, [fp, #-36]
	ldr	r3, [fp, #-44]
	cmp	r2, r3
	blt	.L87
	b	.L89
.L88:
	nop
.L89:
	nop
	sub	sp, fp, #16
	@ sp needed
	pop	{r4, r5, r6, fp, pc}
.L91:
	.align	2
.L90:
	.word	CHILDS_IDS
	.word	exec_name
	.word	.LC13
	.word	proc_id
	.word	.LC14
	.word	CHILDS_COUNT
	.word	GROUP_TYPE
	.word	.LC15
	.word	prev_chld_grp.6593
	.size	forker, .-forker
	.local	prev_chld_grp.6593
	.comm	prev_chld_grp.6593,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
