	.file	"23987.c"
	.intel_syntax noprefix
	.text
	.globl	fork_data
	.data
	.align 16
	.type	fork_data, @object
	.size	fork_data, 28
fork_data:
	.long	0
	.long	1
	.long	2
	.long	1
	.long	3
	.long	4
	.long	5
	.globl	exec_index
	.align 4
	.type	exec_index, @object
	.size	exec_index, 4
exec_index:
	.long	1
	.globl	parent_process_number
	.align 4
	.type	parent_process_number, @object
	.size	parent_process_number, 4
parent_process_number:
	.long	-1
	.globl	current_process_number
	.align 4
	.type	current_process_number, @object
	.size	current_process_number, 4
current_process_number:
	.long	1
	.section	.rodata
.LC0:
	.string	"%s"
	.text
	.globl	log_error
	.type	log_error, @function
log_error:
.LFB6:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 16
	mov	QWORD PTR -8[rbp], rdi
	mov	rax, QWORD PTR -8[rbp]
	mov	rsi, rax
	lea	rdi, .LC0[rip]
	mov	eax, 0
	call	printf@PLT
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	log_error, .-log_error
	.section	.rodata
	.align 8
.LC1:
	.string	"Process initialized. Info: \n  ppid: %d\n  pid: %d\n  ppn: %d\n  pn: %d\n\n"
	.text
	.globl	print_process_info
	.type	print_process_info, @function
print_process_info:
.LFB7:
	.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, 8
	.cfi_offset 13, -24
	.cfi_offset 12, -32
	.cfi_offset 3, -40
	mov	r13d, DWORD PTR current_process_number[rip]
	mov	ebx, DWORD PTR parent_process_number[rip]
	mov	eax, 0
	call	getpid@PLT
	mov	r12d, eax
	mov	eax, 0
	call	getppid@PLT
	mov	r8d, r13d
	mov	ecx, ebx
	mov	edx, r12d
	mov	esi, eax
	lea	rdi, .LC1[rip]
	mov	eax, 0
	call	printf@PLT
	nop
	add	rsp, 8
	pop	rbx
	pop	r12
	pop	r13
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	print_process_info, .-print_process_info
	.section	.rodata
	.align 8
.LC2:
	.string	"Proccess with id %d and number %d terminated\n\n"
	.text
	.globl	custom_exit
	.type	custom_exit, @function
custom_exit:
.LFB8:
	.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, 8
	.cfi_offset 3, -24
	mov	edx, DWORD PTR current_process_number[rip]
	mov	eax, DWORD PTR exec_index[rip]
	cmp	edx, eax
	jne	.L4
	mov	eax, 0
	call	custom_exec
.L4:
	mov	ebx, DWORD PTR current_process_number[rip]
	mov	eax, 0
	call	getpid@PLT
	mov	edx, ebx
	mov	esi, eax
	lea	rdi, .LC2[rip]
	mov	eax, 0
	call	printf@PLT
	mov	edi, 0
	call	_exit@PLT
	.cfi_endproc
.LFE8:
	.size	custom_exit, .-custom_exit
	.section	.rodata
	.align 8
.LC3:
	.string	"Calling custom exec from process number %d before termination:\n"
.LC4:
	.string	"./exec"
	.text
	.globl	custom_exec
	.type	custom_exec, @function
custom_exec:
.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
	mov	eax, DWORD PTR current_process_number[rip]
	mov	esi, eax
	lea	rdi, .LC3[rip]
	mov	eax, 0
	call	printf@PLT
	lea	rax, .LC4[rip]
	mov	QWORD PTR -32[rbp], rax
	mov	QWORD PTR -24[rbp], 0
	mov	rax, QWORD PTR -32[rbp]
	lea	rdx, -32[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	execvp@PLT
	nop
	mov	rax, QWORD PTR -8[rbp]
	sub	rax, QWORD PTR fs:40
	je	.L6
	call	__stack_chk_fail@PLT
.L6:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE9:
	.size	custom_exec, .-custom_exec
	.globl	get_child_count
	.type	get_child_count, @function
get_child_count:
.LFB10:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	mov	DWORD PTR -20[rbp], edi
	mov	DWORD PTR -8[rbp], 0
	mov	DWORD PTR -4[rbp], 0
	jmp	.L8
.L9:
	mov	eax, DWORD PTR -4[rbp]
	cdqe
	lea	rdx, 0[0+rax*4]
	lea	rax, fork_data[rip]
	mov	eax, DWORD PTR [rdx+rax]
	cmp	DWORD PTR -20[rbp], eax
	sete	al
	movzx	eax, al
	add	DWORD PTR -8[rbp], eax
	add	DWORD PTR -4[rbp], 1
.L8:
	cmp	DWORD PTR -4[rbp], 6
	jle	.L9
	mov	eax, DWORD PTR -8[rbp]
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE10:
	.size	get_child_count, .-get_child_count
	.globl	get_child_numbers
	.type	get_child_numbers, @function
get_child_numbers:
.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	DWORD PTR -20[rbp], edi
	mov	DWORD PTR -24[rbp], esi
	mov	eax, DWORD PTR -20[rbp]
	cdqe
	sal	rax, 2
	mov	rdi, rax
	call	malloc@PLT
	mov	QWORD PTR -8[rbp], rax
	mov	DWORD PTR -16[rbp], 0
	mov	DWORD PTR -12[rbp], 0
	jmp	.L12
.L14:
	mov	eax, DWORD PTR -16[rbp]
	cdqe
	lea	rdx, 0[0+rax*4]
	lea	rax, fork_data[rip]
	mov	eax, DWORD PTR [rdx+rax]
	cmp	DWORD PTR -24[rbp], eax
	jne	.L13
	mov	eax, DWORD PTR -12[rbp]
	lea	edx, 1[rax]
	mov	DWORD PTR -12[rbp], edx
	cdqe
	lea	rdx, 0[0+rax*4]
	mov	rax, QWORD PTR -8[rbp]
	add	rax, rdx
	mov	edx, DWORD PTR -16[rbp]
	add	edx, 1
	mov	DWORD PTR [rax], edx
.L13:
	add	DWORD PTR -16[rbp], 1
.L12:
	cmp	DWORD PTR -16[rbp], 6
	jle	.L14
	mov	rax, QWORD PTR -8[rbp]
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE11:
	.size	get_child_numbers, .-get_child_numbers
	.section	.rodata
.LC5:
	.string	"Fork process failed"
	.text
	.globl	create_child_processes
	.type	create_child_processes, @function
create_child_processes:
.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, 64
	mov	QWORD PTR -56[rbp], rdi
	mov	DWORD PTR -60[rbp], esi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	eax, DWORD PTR -60[rbp]
	cdqe
	sal	rax, 2
	mov	rdi, rax
	call	malloc@PLT
	mov	QWORD PTR -16[rbp], rax
	mov	DWORD PTR -32[rbp], 0
	jmp	.L17
.L21:
	call	fork@PLT
	mov	DWORD PTR -24[rbp], eax
	cmp	DWORD PTR -24[rbp], -1
	jne	.L18
	lea	rdi, .LC5[rip]
	call	log_error
	jmp	.L19
.L18:
	cmp	DWORD PTR -24[rbp], 0
	jne	.L19
	mov	eax, DWORD PTR current_process_number[rip]
	mov	DWORD PTR parent_process_number[rip], eax
	mov	eax, DWORD PTR -32[rbp]
	cdqe
	lea	rdx, 0[0+rax*4]
	mov	rax, QWORD PTR -56[rbp]
	add	rax, rdx
	mov	eax, DWORD PTR [rax]
	mov	DWORD PTR current_process_number[rip], eax
	mov	eax, 0
	call	print_process_info
	mov	eax, DWORD PTR current_process_number[rip]
	mov	edi, eax
	call	get_child_count
	mov	DWORD PTR -20[rbp], eax
	cmp	DWORD PTR -20[rbp], 0
	je	.L20
	mov	edx, DWORD PTR current_process_number[rip]
	mov	eax, DWORD PTR -20[rbp]
	mov	esi, edx
	mov	edi, eax
	call	get_child_numbers
	mov	rdx, rax
	mov	eax, DWORD PTR -20[rbp]
	mov	esi, eax
	mov	rdi, rdx
	call	create_child_processes
.L20:
	mov	eax, 0
	call	custom_exit
.L19:
	mov	eax, DWORD PTR -32[rbp]
	cdqe
	lea	rdx, 0[0+rax*4]
	mov	rax, QWORD PTR -16[rbp]
	add	rdx, rax
	mov	eax, DWORD PTR -24[rbp]
	mov	DWORD PTR [rdx], eax
	add	DWORD PTR -32[rbp], 1
.L17:
	mov	eax, DWORD PTR -32[rbp]
	cmp	eax, DWORD PTR -60[rbp]
	jl	.L21
	mov	DWORD PTR -28[rbp], 0
	jmp	.L22
.L26:
	mov	eax, DWORD PTR -28[rbp]
	cdqe
	lea	rdx, 0[0+rax*4]
	mov	rax, QWORD PTR -16[rbp]
	add	rax, rdx
	mov	eax, DWORD PTR [rax]
	test	eax, eax
	je	.L28
	mov	eax, DWORD PTR -28[rbp]
	cdqe
	lea	rdx, 0[0+rax*4]
	mov	rax, QWORD PTR -16[rbp]
	add	rax, rdx
	mov	eax, DWORD PTR [rax]
	cmp	eax, -1
	je	.L28
	mov	eax, DWORD PTR -28[rbp]
	cdqe
	lea	rdx, 0[0+rax*4]
	mov	rax, QWORD PTR -16[rbp]
	add	rax, rdx
	mov	eax, DWORD PTR [rax]
	lea	rcx, -36[rbp]
	mov	edx, 0
	mov	rsi, rcx
	mov	edi, eax
	call	waitpid@PLT
	jmp	.L25
.L28:
	nop
.L25:
	add	DWORD PTR -28[rbp], 1
.L22:
	mov	eax, DWORD PTR -28[rbp]
	cmp	eax, DWORD PTR -60[rbp]
	jl	.L26
	mov	rax, QWORD PTR -16[rbp]
	mov	rdi, rax
	call	free@PLT
	nop
	mov	rax, QWORD PTR -8[rbp]
	sub	rax, QWORD PTR fs:40
	je	.L27
	call	__stack_chk_fail@PLT
.L27:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE12:
	.size	create_child_processes, .-create_child_processes
	.globl	main
	.type	main, @function
main:
.LFB13:
	.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, 0
	call	print_process_info
	mov	eax, DWORD PTR current_process_number[rip]
	mov	edi, eax
	call	get_child_count
	mov	DWORD PTR -4[rbp], eax
	mov	edx, DWORD PTR current_process_number[rip]
	mov	eax, DWORD PTR -4[rbp]
	mov	esi, edx
	mov	edi, eax
	call	get_child_numbers
	mov	rdx, rax
	mov	eax, DWORD PTR -4[rbp]
	mov	esi, eax
	mov	rdi, rdx
	call	create_child_processes
	mov	eax, 0
	call	custom_exit
	mov	eax, 0
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE13:
	.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	"23987.c"
	.text
	.global	fork_data
	.data
	.align	2
	.type	fork_data, %object
	.size	fork_data, 28
fork_data:
	.word	0
	.word	1
	.word	2
	.word	1
	.word	3
	.word	4
	.word	5
	.global	exec_index
	.align	2
	.type	exec_index, %object
	.size	exec_index, 4
exec_index:
	.word	1
	.global	parent_process_number
	.align	2
	.type	parent_process_number, %object
	.size	parent_process_number, 4
parent_process_number:
	.word	-1
	.global	current_process_number
	.align	2
	.type	current_process_number, %object
	.size	current_process_number, 4
current_process_number:
	.word	1
	.section	.rodata
	.align	2
.LC0:
	.ascii	"%s\000"
	.text
	.align	2
	.global	log_error
	.syntax unified
	.arm
	.fpu softvfp
	.type	log_error, %function
log_error:
	@ 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, [fp, #-8]
	ldr	r0, .L2
	bl	printf
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L3:
	.align	2
.L2:
	.word	.LC0
	.size	log_error, .-log_error
	.section	.rodata
	.align	2
.LC1:
	.ascii	"Process initialized. Info: \012  ppid: %d\012  pid:"
	.ascii	" %d\012  ppn: %d\012  pn: %d\012\012\000"
	.text
	.align	2
	.global	print_process_info
	.syntax unified
	.arm
	.fpu softvfp
	.type	print_process_info, %function
print_process_info:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, fp, lr}
	add	fp, sp, #8
	sub	sp, sp, #12
	bl	getppid
	mov	r4, r0
	bl	getpid
	mov	r1, r0
	ldr	r3, .L5
	ldr	r2, [r3]
	ldr	r3, .L5+4
	ldr	r3, [r3]
	str	r3, [sp]
	mov	r3, r2
	mov	r2, r1
	mov	r1, r4
	ldr	r0, .L5+8
	bl	printf
	nop
	sub	sp, fp, #8
	@ sp needed
	pop	{r4, fp, pc}
.L6:
	.align	2
.L5:
	.word	parent_process_number
	.word	current_process_number
	.word	.LC1
	.size	print_process_info, .-print_process_info
	.section	.rodata
	.align	2
.LC2:
	.ascii	"Proccess with id %d and number %d terminated\012\012"
	.ascii	"\000"
	.text
	.align	2
	.global	custom_exit
	.syntax unified
	.arm
	.fpu softvfp
	.type	custom_exit, %function
custom_exit:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	ldr	r3, .L9
	ldr	r2, [r3]
	ldr	r3, .L9+4
	ldr	r3, [r3]
	cmp	r2, r3
	bne	.L8
	bl	custom_exec
.L8:
	bl	getpid
	mov	r1, r0
	ldr	r3, .L9
	ldr	r3, [r3]
	mov	r2, r3
	ldr	r0, .L9+8
	bl	printf
	mov	r0, #0
	bl	_exit
.L10:
	.align	2
.L9:
	.word	current_process_number
	.word	exec_index
	.word	.LC2
	.size	custom_exit, .-custom_exit
	.section	.rodata
	.align	2
.LC3:
	.ascii	"Calling custom exec from process number %d before t"
	.ascii	"ermination:\012\000"
	.align	2
.LC4:
	.ascii	"./exec\000"
	.align	2
.LC5:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	custom_exec
	.syntax unified
	.arm
	.fpu softvfp
	.type	custom_exec, %function
custom_exec:
	@ 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, .L13
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	ldr	r3, .L13+4
	ldr	r3, [r3]
	mov	r1, r3
	ldr	r0, .L13+8
	bl	printf
	ldr	r3, .L13+12
	str	r3, [fp, #-16]
	mov	r3, #0
	str	r3, [fp, #-12]
	ldr	r3, [fp, #-16]
	sub	r2, fp, #16
	mov	r1, r2
	mov	r0, r3
	bl	execvp
	nop
	ldr	r3, .L13
	ldr	r2, [r3]
	ldr	r3, [fp, #-8]
	eors	r2, r3, r2
	mov	r3, #0
	beq	.L12
	bl	__stack_chk_fail
.L12:
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L14:
	.align	2
.L13:
	.word	.LC5
	.word	current_process_number
	.word	.LC3
	.word	.LC4
	.size	custom_exec, .-custom_exec
	.align	2
	.global	get_child_count
	.syntax unified
	.arm
	.fpu softvfp
	.type	get_child_count, %function
get_child_count:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 1, uses_anonymous_args = 0
	@ link register save eliminated.
	str	fp, [sp, #-4]!
	add	fp, sp, #0
	sub	sp, sp, #20
	str	r0, [fp, #-16]
	mov	r3, #0
	str	r3, [fp, #-12]
	mov	r3, #0
	str	r3, [fp, #-8]
	b	.L16
.L17:
	ldr	r2, .L19
	ldr	r3, [fp, #-8]
	ldr	r3, [r2, r3, lsl #2]
	ldr	r2, [fp, #-16]
	cmp	r2, r3
	moveq	r3, #1
	movne	r3, #0
	and	r3, r3, #255
	mov	r2, r3
	ldr	r3, [fp, #-12]
	add	r3, r3, r2
	str	r3, [fp, #-12]
	ldr	r3, [fp, #-8]
	add	r3, r3, #1
	str	r3, [fp, #-8]
.L16:
	ldr	r3, [fp, #-8]
	cmp	r3, #6
	ble	.L17
	ldr	r3, [fp, #-12]
	mov	r0, r3
	add	sp, fp, #0
	@ sp needed
	ldr	fp, [sp], #4
	bx	lr
.L20:
	.align	2
.L19:
	.word	fork_data
	.size	get_child_count, .-get_child_count
	.align	2
	.global	get_child_numbers
	.syntax unified
	.arm
	.fpu softvfp
	.type	get_child_numbers, %function
get_child_numbers:
	@ 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]
	lsl	r3, r3, #2
	mov	r0, r3
	bl	malloc
	mov	r3, r0
	str	r3, [fp, #-8]
	mov	r3, #0
	str	r3, [fp, #-16]
	mov	r3, #0
	str	r3, [fp, #-12]
	b	.L22
.L24:
	ldr	r2, .L26
	ldr	r3, [fp, #-16]
	ldr	r3, [r2, r3, lsl #2]
	ldr	r2, [fp, #-28]
	cmp	r2, r3
	bne	.L23
	ldr	r3, [fp, #-12]
	add	r2, r3, #1
	str	r2, [fp, #-12]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-8]
	add	r3, r2, r3
	ldr	r2, [fp, #-16]
	add	r2, r2, #1
	str	r2, [r3]
.L23:
	ldr	r3, [fp, #-16]
	add	r3, r3, #1
	str	r3, [fp, #-16]
.L22:
	ldr	r3, [fp, #-16]
	cmp	r3, #6
	ble	.L24
	ldr	r3, [fp, #-8]
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L27:
	.align	2
.L26:
	.word	fork_data
	.size	get_child_numbers, .-get_child_numbers
	.section	.rodata
	.align	2
.LC6:
	.ascii	"Fork process failed\000"
	.align	2
.LC7:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	create_child_processes
	.syntax unified
	.arm
	.fpu softvfp
	.type	create_child_processes, %function
create_child_processes:
	@ args = 0, pretend = 0, frame = 40
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #40
	str	r0, [fp, #-40]
	str	r1, [fp, #-44]
	ldr	r3, .L41
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	ldr	r3, [fp, #-44]
	lsl	r3, r3, #2
	mov	r0, r3
	bl	malloc
	mov	r3, r0
	str	r3, [fp, #-20]
	mov	r3, #0
	str	r3, [fp, #-28]
	b	.L29
.L33:
	bl	fork
	mov	r3, r0
	str	r3, [fp, #-16]
	ldr	r3, [fp, #-16]
	cmn	r3, #1
	bne	.L30
	ldr	r0, .L41+4
	bl	log_error
	b	.L31
.L30:
	ldr	r3, [fp, #-16]
	cmp	r3, #0
	bne	.L31
	ldr	r3, .L41+8
	ldr	r3, [r3]
	ldr	r2, .L41+12
	str	r3, [r2]
	ldr	r3, [fp, #-28]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-40]
	add	r3, r2, r3
	ldr	r3, [r3]
	ldr	r2, .L41+8
	str	r3, [r2]
	bl	print_process_info
	ldr	r3, .L41+8
	ldr	r3, [r3]
	mov	r0, r3
	bl	get_child_count
	str	r0, [fp, #-12]
	ldr	r3, [fp, #-12]
	cmp	r3, #0
	beq	.L32
	ldr	r3, .L41+8
	ldr	r3, [r3]
	mov	r1, r3
	ldr	r0, [fp, #-12]
	bl	get_child_numbers
	mov	r3, r0
	ldr	r1, [fp, #-12]
	mov	r0, r3
	bl	create_child_processes
.L32:
	bl	custom_exit
.L31:
	ldr	r3, [fp, #-28]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-20]
	add	r3, r2, r3
	ldr	r2, [fp, #-16]
	str	r2, [r3]
	ldr	r3, [fp, #-28]
	add	r3, r3, #1
	str	r3, [fp, #-28]
.L29:
	ldr	r2, [fp, #-28]
	ldr	r3, [fp, #-44]
	cmp	r2, r3
	blt	.L33
	mov	r3, #0
	str	r3, [fp, #-24]
	b	.L34
.L38:
	ldr	r3, [fp, #-24]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-20]
	add	r3, r2, r3
	ldr	r3, [r3]
	cmp	r3, #0
	beq	.L40
	ldr	r3, [fp, #-24]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-20]
	add	r3, r2, r3
	ldr	r3, [r3]
	cmn	r3, #1
	beq	.L40
	ldr	r3, [fp, #-24]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-20]
	add	r3, r2, r3
	ldr	r3, [r3]
	sub	r1, fp, #32
	mov	r2, #0
	mov	r0, r3
	bl	waitpid
	b	.L37
.L40:
	nop
.L37:
	ldr	r3, [fp, #-24]
	add	r3, r3, #1
	str	r3, [fp, #-24]
.L34:
	ldr	r2, [fp, #-24]
	ldr	r3, [fp, #-44]
	cmp	r2, r3
	blt	.L38
	ldr	r0, [fp, #-20]
	bl	free
	nop
	ldr	r3, .L41
	ldr	r2, [r3]
	ldr	r3, [fp, #-8]
	eors	r2, r3, r2
	mov	r3, #0
	beq	.L39
	bl	__stack_chk_fail
.L39:
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L42:
	.align	2
.L41:
	.word	.LC7
	.word	.LC6
	.word	current_process_number
	.word	parent_process_number
	.size	create_child_processes, .-create_child_processes
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #8
	bl	print_process_info
	ldr	r3, .L45
	ldr	r3, [r3]
	mov	r0, r3
	bl	get_child_count
	str	r0, [fp, #-8]
	ldr	r3, .L45
	ldr	r3, [r3]
	mov	r1, r3
	ldr	r0, [fp, #-8]
	bl	get_child_numbers
	mov	r3, r0
	ldr	r1, [fp, #-8]
	mov	r0, r3
	bl	create_child_processes
	bl	custom_exit
	mov	r3, #0
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L46:
	.align	2
.L45:
	.word	current_process_number
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
