	.file	"356992.c"
	.intel_syntax noprefix
	.text
	.section	.rodata
.LC0:
	.string	"w"
.LC1:
	.string	"proj2.out"
	.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
	add	rsp, -128
	mov	DWORD PTR -116[rbp], edi
	mov	QWORD PTR -128[rbp], rsi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	DWORD PTR -104[rbp], 0
	mov	DWORD PTR -100[rbp], 0
	mov	DWORD PTR -96[rbp], 0
	mov	DWORD PTR -92[rbp], 0
	mov	DWORD PTR -88[rbp], 0
	lea	rsi, .LC0[rip]
	lea	rdi, .LC1[rip]
	call	fopen@PLT
	mov	QWORD PTR -72[rbp], rax
	cmp	QWORD PTR -72[rbp], 0
	jne	.L2
	mov	edi, 5
	call	print_err_msg
	mov	eax, 1
	jmp	.L13
.L2:
	mov	rax, QWORD PTR stdout[rip]
	mov	esi, 0
	mov	rdi, rax
	call	setbuf@PLT
	mov	rax, QWORD PTR stderr[rip]
	mov	esi, 0
	mov	rdi, rax
	call	setbuf@PLT
	mov	r8, QWORD PTR -128[rbp]
	mov	edi, DWORD PTR -116[rbp]
	lea	rcx, -88[rbp]
	lea	rdx, -92[rbp]
	lea	rsi, -96[rbp]
	lea	rax, -100[rbp]
	mov	r9, r8
	mov	r8d, edi
	mov	rdi, rax
	call	check_args
	mov	DWORD PTR -104[rbp], eax
	mov	eax, DWORD PTR -104[rbp]
	test	eax, eax
	jle	.L4
	mov	edi, 4
	call	print_err_msg
	mov	eax, 1
	jmp	.L13
.L4:
	lea	rax, -104[rbp]
	mov	rsi, rax
	mov	edi, 4242
	call	init_memory
	mov	QWORD PTR -64[rbp], rax
	mov	rax, QWORD PTR -64[rbp]
	add	rax, 8
	mov	edx, 1
	mov	esi, 1
	mov	rdi, rax
	call	sem_init@PLT
	mov	rax, QWORD PTR -64[rbp]
	mov	DWORD PTR [rax], 1
	mov	eax, DWORD PTR -104[rbp]
	test	eax, eax
	jle	.L5
	mov	eax, DWORD PTR -104[rbp]
	mov	rsi, QWORD PTR -64[rbp]
	push	0
	push	0
	mov	r9d, 0
	mov	r8d, 0
	mov	ecx, 0
	mov	edx, 0
	mov	edi, eax
	call	deinitialize_all
	add	rsp, 16
	mov	eax, 1
	jmp	.L13
.L5:
	lea	rax, -104[rbp]
	mov	rsi, rax
	mov	edi, 4243
	call	init_memory
	mov	QWORD PTR -56[rbp], rax
	mov	rax, QWORD PTR -56[rbp]
	add	rax, 8
	mov	edx, 0
	mov	esi, 1
	mov	rdi, rax
	call	sem_init@PLT
	mov	rax, QWORD PTR -56[rbp]
	mov	DWORD PTR [rax], 0
	mov	eax, DWORD PTR -104[rbp]
	test	eax, eax
	jle	.L6
	mov	eax, DWORD PTR -104[rbp]
	mov	rdx, QWORD PTR -56[rbp]
	mov	rsi, QWORD PTR -64[rbp]
	push	0
	push	0
	mov	r9d, 0
	mov	r8d, 0
	mov	ecx, 0
	mov	edi, eax
	call	deinitialize_all
	add	rsp, 16
	mov	eax, 1
	jmp	.L13
.L6:
	lea	rax, -104[rbp]
	mov	rsi, rax
	mov	edi, 4245
	call	init_memory
	mov	QWORD PTR -48[rbp], rax
	mov	rax, QWORD PTR -48[rbp]
	add	rax, 8
	mov	edx, 0
	mov	esi, 1
	mov	rdi, rax
	call	sem_init@PLT
	mov	rax, QWORD PTR -48[rbp]
	mov	DWORD PTR [rax], 0
	mov	eax, DWORD PTR -104[rbp]
	test	eax, eax
	jle	.L7
	mov	eax, DWORD PTR -104[rbp]
	mov	rcx, QWORD PTR -48[rbp]
	mov	rdx, QWORD PTR -56[rbp]
	mov	rsi, QWORD PTR -64[rbp]
	push	0
	push	0
	mov	r9d, 0
	mov	r8, rcx
	mov	ecx, 0
	mov	edi, eax
	call	deinitialize_all
	add	rsp, 16
	mov	eax, 1
	jmp	.L13
.L7:
	lea	rax, -104[rbp]
	mov	rsi, rax
	mov	edi, 4246
	call	init_memory
	mov	QWORD PTR -40[rbp], rax
	mov	rax, QWORD PTR -40[rbp]
	add	rax, 8
	mov	edx, 0
	mov	esi, 1
	mov	rdi, rax
	call	sem_init@PLT
	mov	rax, QWORD PTR -40[rbp]
	mov	DWORD PTR [rax], 0
	mov	eax, DWORD PTR -104[rbp]
	test	eax, eax
	jle	.L8
	mov	eax, DWORD PTR -104[rbp]
	mov	rcx, QWORD PTR -48[rbp]
	mov	rdx, QWORD PTR -56[rbp]
	mov	rsi, QWORD PTR -64[rbp]
	push	0
	push	0
	mov	r9d, 0
	mov	r8, rcx
	mov	ecx, 0
	mov	edi, eax
	call	deinitialize_all
	add	rsp, 16
	mov	eax, 1
	jmp	.L13
.L8:
	lea	rax, -104[rbp]
	mov	rsi, rax
	mov	edi, 4247
	call	init_memory
	mov	QWORD PTR -32[rbp], rax
	mov	rax, QWORD PTR -32[rbp]
	add	rax, 8
	mov	edx, 0
	mov	esi, 1
	mov	rdi, rax
	call	sem_init@PLT
	mov	rax, QWORD PTR -32[rbp]
	mov	DWORD PTR [rax], 0
	mov	eax, DWORD PTR -104[rbp]
	test	eax, eax
	jle	.L9
	mov	eax, DWORD PTR -104[rbp]
	mov	rdi, QWORD PTR -48[rbp]
	mov	rcx, QWORD PTR -32[rbp]
	mov	rdx, QWORD PTR -56[rbp]
	mov	rsi, QWORD PTR -64[rbp]
	push	0
	push	0
	mov	r9d, 0
	mov	r8, rdi
	mov	edi, eax
	call	deinitialize_all
	add	rsp, 16
	mov	eax, 1
	jmp	.L13
.L9:
	lea	rax, -104[rbp]
	mov	rsi, rax
	mov	edi, 4248
	call	init_memory
	mov	QWORD PTR -24[rbp], rax
	mov	rax, QWORD PTR -24[rbp]
	add	rax, 8
	mov	edx, 0
	mov	esi, 1
	mov	rdi, rax
	call	sem_init@PLT
	mov	rax, QWORD PTR -24[rbp]
	mov	DWORD PTR [rax], 0
	mov	eax, DWORD PTR -104[rbp]
	test	eax, eax
	jle	.L10
	mov	eax, DWORD PTR -104[rbp]
	mov	r8, QWORD PTR -40[rbp]
	mov	rdi, QWORD PTR -48[rbp]
	mov	rcx, QWORD PTR -32[rbp]
	mov	rdx, QWORD PTR -56[rbp]
	mov	rsi, QWORD PTR -64[rbp]
	push	0
	push	QWORD PTR -24[rbp]
	mov	r9, r8
	mov	r8, rdi
	mov	edi, eax
	call	deinitialize_all
	add	rsp, 16
	mov	eax, 1
	jmp	.L13
.L10:
	lea	rax, -104[rbp]
	mov	rsi, rax
	mov	edi, 4249
	call	init_memory
	mov	QWORD PTR -16[rbp], rax
	mov	rax, QWORD PTR -16[rbp]
	add	rax, 8
	mov	edx, 0
	mov	esi, 1
	mov	rdi, rax
	call	sem_init@PLT
	mov	eax, DWORD PTR -104[rbp]
	test	eax, eax
	jle	.L11
	mov	eax, DWORD PTR -104[rbp]
	mov	r8, QWORD PTR -40[rbp]
	mov	rdi, QWORD PTR -48[rbp]
	mov	rcx, QWORD PTR -32[rbp]
	mov	rdx, QWORD PTR -56[rbp]
	mov	rsi, QWORD PTR -64[rbp]
	push	QWORD PTR -16[rbp]
	push	QWORD PTR -24[rbp]
	mov	r9, r8
	mov	r8, rdi
	mov	edi, eax
	call	deinitialize_all
	add	rsp, 16
	mov	eax, 1
	jmp	.L13
.L11:
	mov	esi, DWORD PTR -92[rbp]
	mov	eax, DWORD PTR -100[rbp]
	mov	r9, QWORD PTR -40[rbp]
	mov	r8, QWORD PTR -56[rbp]
	mov	rcx, QWORD PTR -64[rbp]
	mov	rdx, QWORD PTR -72[rbp]
	lea	rdi, -104[rbp]
	push	rdi
	push	QWORD PTR -48[rbp]
	mov	edi, eax
	call	processElfes
	add	rsp, 16
	mov	DWORD PTR -84[rbp], eax
	mov	esi, DWORD PTR -88[rbp]
	mov	eax, DWORD PTR -96[rbp]
	mov	r9, QWORD PTR -24[rbp]
	mov	r8, QWORD PTR -32[rbp]
	mov	rcx, QWORD PTR -64[rbp]
	mov	rdx, QWORD PTR -72[rbp]
	lea	rdi, -104[rbp]
	push	rdi
	push	QWORD PTR -16[rbp]
	mov	edi, eax
	call	processDeers
	add	rsp, 16
	mov	DWORD PTR -80[rbp], eax
	mov	esi, DWORD PTR -96[rbp]
	mov	eax, DWORD PTR -100[rbp]
	mov	r9, QWORD PTR -56[rbp]
	mov	r8, QWORD PTR -24[rbp]
	mov	rcx, QWORD PTR -64[rbp]
	mov	rdx, QWORD PTR -72[rbp]
	sub	rsp, 8
	lea	rdi, -104[rbp]
	push	rdi
	push	QWORD PTR -48[rbp]
	push	QWORD PTR -16[rbp]
	push	QWORD PTR -40[rbp]
	push	QWORD PTR -32[rbp]
	mov	edi, eax
	call	processSanta
	add	rsp, 48
	mov	DWORD PTR -76[rbp], eax
	mov	eax, DWORD PTR -104[rbp]
	test	eax, eax
	jle	.L12
	mov	eax, DWORD PTR -104[rbp]
	mov	r8, QWORD PTR -40[rbp]
	mov	rdi, QWORD PTR -48[rbp]
	mov	rcx, QWORD PTR -32[rbp]
	mov	rdx, QWORD PTR -56[rbp]
	mov	rsi, QWORD PTR -64[rbp]
	push	QWORD PTR -16[rbp]
	push	QWORD PTR -24[rbp]
	mov	r9, r8
	mov	r8, rdi
	mov	edi, eax
	call	deinitialize_all
	add	rsp, 16
	mov	eax, 1
	jmp	.L13
.L12:
	mov	eax, DWORD PTR -84[rbp]
	mov	edx, 0
	mov	esi, 0
	mov	edi, eax
	call	waitpid@PLT
	mov	eax, DWORD PTR -80[rbp]
	mov	edx, 0
	mov	esi, 0
	mov	edi, eax
	call	waitpid@PLT
	mov	eax, DWORD PTR -76[rbp]
	mov	edx, 0
	mov	esi, 0
	mov	edi, eax
	call	waitpid@PLT
	mov	rdi, QWORD PTR -40[rbp]
	mov	rsi, QWORD PTR -48[rbp]
	mov	rcx, QWORD PTR -32[rbp]
	mov	rdx, QWORD PTR -56[rbp]
	mov	rax, QWORD PTR -64[rbp]
	push	QWORD PTR -16[rbp]
	push	QWORD PTR -24[rbp]
	mov	r9, rdi
	mov	r8, rsi
	mov	rsi, rax
	mov	edi, 0
	call	deinitialize_all
	add	rsp, 16
	mov	rax, QWORD PTR -72[rbp]
	mov	rdi, rax
	call	fclose@PLT
	mov	eax, 0
.L13:
	mov	rcx, QWORD PTR -8[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L14
	call	__stack_chk_fail@PLT
.L14:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	main, .-main
	.globl	deinitialize_all
	.type	deinitialize_all, @function
deinitialize_all:
.LFB7:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 48
	mov	DWORD PTR -4[rbp], edi
	mov	QWORD PTR -16[rbp], rsi
	mov	QWORD PTR -24[rbp], rdx
	mov	QWORD PTR -32[rbp], rcx
	mov	QWORD PTR -40[rbp], r8
	mov	QWORD PTR -48[rbp], r9
	mov	rdx, QWORD PTR -16[rbp]
	mov	eax, DWORD PTR -4[rbp]
	mov	rsi, rdx
	mov	edi, eax
	call	deinitialize
	mov	rdx, QWORD PTR -24[rbp]
	mov	eax, DWORD PTR -4[rbp]
	mov	rsi, rdx
	mov	edi, eax
	call	deinitialize
	mov	rdx, QWORD PTR -32[rbp]
	mov	eax, DWORD PTR -4[rbp]
	mov	rsi, rdx
	mov	edi, eax
	call	deinitialize
	mov	rdx, QWORD PTR -40[rbp]
	mov	eax, DWORD PTR -4[rbp]
	mov	rsi, rdx
	mov	edi, eax
	call	deinitialize
	mov	rdx, QWORD PTR -48[rbp]
	mov	eax, DWORD PTR -4[rbp]
	mov	rsi, rdx
	mov	edi, eax
	call	deinitialize
	mov	eax, DWORD PTR -4[rbp]
	mov	rsi, QWORD PTR 16[rbp]
	mov	edi, eax
	call	deinitialize
	mov	rdx, QWORD PTR 24[rbp]
	mov	eax, DWORD PTR -4[rbp]
	mov	rsi, rdx
	mov	edi, eax
	call	deinitialize
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	deinitialize_all, .-deinitialize_all
	.globl	check_args
	.type	check_args, @function
check_args:
.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, 48
	mov	QWORD PTR -8[rbp], rdi
	mov	QWORD PTR -16[rbp], rsi
	mov	QWORD PTR -24[rbp], rdx
	mov	QWORD PTR -32[rbp], rcx
	mov	DWORD PTR -36[rbp], r8d
	mov	QWORD PTR -48[rbp], r9
	cmp	DWORD PTR -36[rbp], 5
	je	.L17
	mov	eax, 4
	jmp	.L18
.L17:
	mov	rax, QWORD PTR -48[rbp]
	add	rax, 8
	mov	rax, QWORD PTR [rax]
	mov	rdi, rax
	call	atoi@PLT
	mov	rdx, QWORD PTR -8[rbp]
	mov	DWORD PTR [rdx], eax
	mov	rax, QWORD PTR -48[rbp]
	add	rax, 16
	mov	rax, QWORD PTR [rax]
	mov	rdi, rax
	call	atoi@PLT
	mov	rdx, QWORD PTR -16[rbp]
	mov	DWORD PTR [rdx], eax
	mov	rax, QWORD PTR -48[rbp]
	add	rax, 24
	mov	rax, QWORD PTR [rax]
	mov	rdi, rax
	call	atoi@PLT
	mov	rdx, QWORD PTR -24[rbp]
	mov	DWORD PTR [rdx], eax
	mov	rax, QWORD PTR -48[rbp]
	add	rax, 32
	mov	rax, QWORD PTR [rax]
	mov	rdi, rax
	call	atoi@PLT
	mov	rdx, QWORD PTR -32[rbp]
	mov	DWORD PTR [rdx], eax
	mov	rax, QWORD PTR -8[rbp]
	mov	eax, DWORD PTR [rax]
	test	eax, eax
	jle	.L19
	mov	rax, QWORD PTR -8[rbp]
	mov	eax, DWORD PTR [rax]
	cmp	eax, 999
	jg	.L19
	mov	rax, QWORD PTR -16[rbp]
	mov	eax, DWORD PTR [rax]
	test	eax, eax
	jle	.L19
	mov	rax, QWORD PTR -16[rbp]
	mov	eax, DWORD PTR [rax]
	cmp	eax, 19
	jg	.L19
	mov	rax, QWORD PTR -24[rbp]
	mov	eax, DWORD PTR [rax]
	test	eax, eax
	js	.L19
	mov	rax, QWORD PTR -24[rbp]
	mov	eax, DWORD PTR [rax]
	cmp	eax, 1000
	jg	.L19
	mov	rax, QWORD PTR -32[rbp]
	mov	eax, DWORD PTR [rax]
	test	eax, eax
	js	.L19
	mov	rax, QWORD PTR -32[rbp]
	mov	eax, DWORD PTR [rax]
	cmp	eax, 1000
	jle	.L20
.L19:
	mov	eax, 4
	jmp	.L18
.L20:
	mov	eax, 0
.L18:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.size	check_args, .-check_args
	.globl	init_memory
	.type	init_memory, @function
init_memory:
.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	DWORD PTR -20[rbp], edi
	mov	QWORD PTR -32[rbp], rsi
	mov	eax, DWORD PTR -20[rbp]
	mov	edx, 950
	mov	esi, 48
	mov	edi, eax
	call	shmget@PLT
	mov	DWORD PTR -12[rbp], eax
	cmp	DWORD PTR -12[rbp], 0
	jns	.L22
	mov	rax, QWORD PTR -32[rbp]
	mov	DWORD PTR [rax], 1
	mov	eax, 1
	jmp	.L23
.L22:
	mov	eax, DWORD PTR -12[rbp]
	mov	edx, 0
	mov	esi, 0
	mov	edi, eax
	call	shmat@PLT
	mov	QWORD PTR -8[rbp], rax
	cmp	QWORD PTR -8[rbp], -1
	jne	.L24
	mov	rax, QWORD PTR -32[rbp]
	mov	DWORD PTR [rax], 2
	mov	eax, 2
	jmp	.L23
.L24:
	mov	rax, QWORD PTR -8[rbp]
	mov	edx, DWORD PTR -12[rbp]
	mov	DWORD PTR 40[rax], edx
	mov	rax, QWORD PTR -8[rbp]
.L23:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE9:
	.size	init_memory, .-init_memory
	.globl	deinitialize
	.type	deinitialize, @function
deinitialize:
.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, 32
	mov	DWORD PTR -20[rbp], edi
	mov	QWORD PTR -32[rbp], rsi
	cmp	DWORD PTR -20[rbp], 0
	jle	.L26
	mov	eax, DWORD PTR -20[rbp]
	mov	edi, eax
	call	print_err_msg
.L26:
	cmp	QWORD PTR -32[rbp], 0
	je	.L29
	mov	rax, QWORD PTR -32[rbp]
	add	rax, 8
	mov	rdi, rax
	call	sem_destroy@PLT
	mov	rax, QWORD PTR -32[rbp]
	mov	eax, DWORD PTR 40[rax]
	mov	DWORD PTR -4[rbp], eax
	mov	rax, QWORD PTR -32[rbp]
	mov	rdi, rax
	call	shmdt@PLT
	mov	eax, DWORD PTR -4[rbp]
	mov	edx, 0
	mov	esi, 0
	mov	edi, eax
	call	shmctl@PLT
	nop
.L29:
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE10:
	.size	deinitialize, .-deinitialize
	.globl	processSanta
	.type	processSanta, @function
processSanta:
.LFB11:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 64
	mov	DWORD PTR -20[rbp], edi
	mov	DWORD PTR -24[rbp], esi
	mov	QWORD PTR -32[rbp], rdx
	mov	QWORD PTR -40[rbp], rcx
	mov	QWORD PTR -48[rbp], r8
	mov	QWORD PTR -56[rbp], r9
	call	fork@PLT
	mov	DWORD PTR -4[rbp], eax
	cmp	DWORD PTR -4[rbp], 0
	jne	.L31
	mov	rax, QWORD PTR -56[rbp]
	add	rax, 8
	mov	rdi, rax
	call	sem_post@PLT
	mov	rax, QWORD PTR 16[rbp]
	add	rax, 8
	mov	rdi, rax
	call	sem_post@PLT
	mov	rsi, QWORD PTR -40[rbp]
	mov	rax, QWORD PTR -32[rbp]
	mov	r8d, 0
	mov	ecx, 7
	mov	edx, 0
	mov	rdi, rax
	call	print_msg
.L37:
	mov	rax, QWORD PTR 16[rbp]
	mov	eax, DWORD PTR [rax]
	cmp	DWORD PTR -24[rbp], eax
	jne	.L32
	mov	rsi, QWORD PTR -40[rbp]
	mov	rax, QWORD PTR -32[rbp]
	mov	r8d, 0
	mov	ecx, 9
	mov	edx, 0
	mov	rdi, rax
	call	print_msg
	mov	rax, QWORD PTR -48[rbp]
	add	rax, 8
	mov	rdi, rax
	call	sem_post@PLT
	mov	rax, QWORD PTR -56[rbp]
	mov	DWORD PTR [rax], 1
	mov	DWORD PTR -8[rbp], 0
	jmp	.L33
.L34:
	mov	rax, QWORD PTR 24[rbp]
	add	rax, 8
	mov	rdi, rax
	call	sem_post@PLT
	add	DWORD PTR -8[rbp], 1
.L33:
	mov	eax, DWORD PTR -8[rbp]
	cmp	eax, DWORD PTR -20[rbp]
	jl	.L34
	jmp	.L40
.L32:
	mov	rax, QWORD PTR 24[rbp]
	mov	eax, DWORD PTR [rax]
	cmp	eax, 2
	jle	.L37
	mov	rsi, QWORD PTR -40[rbp]
	mov	rax, QWORD PTR -32[rbp]
	mov	r8d, 0
	mov	ecx, 8
	mov	edx, 0
	mov	rdi, rax
	call	print_msg
	mov	rax, QWORD PTR 24[rbp]
	mov	eax, DWORD PTR [rax]
	lea	edx, -3[rax]
	mov	rax, QWORD PTR 24[rbp]
	mov	DWORD PTR [rax], edx
	mov	rax, QWORD PTR 24[rbp]
	add	rax, 8
	mov	rdi, rax
	call	sem_post@PLT
	mov	rax, QWORD PTR 24[rbp]
	add	rax, 8
	mov	rdi, rax
	call	sem_post@PLT
	mov	rax, QWORD PTR 24[rbp]
	add	rax, 8
	mov	rdi, rax
	call	sem_post@PLT
	mov	rax, QWORD PTR 40[rbp]
	add	rax, 8
	mov	rdi, rax
	call	sem_wait@PLT
	mov	rax, QWORD PTR 40[rbp]
	add	rax, 8
	mov	rdi, rax
	call	sem_wait@PLT
	mov	rax, QWORD PTR 40[rbp]
	add	rax, 8
	mov	rdi, rax
	call	sem_wait@PLT
	mov	rsi, QWORD PTR -40[rbp]
	mov	rax, QWORD PTR -32[rbp]
	mov	r8d, 0
	mov	ecx, 7
	mov	edx, 0
	mov	rdi, rax
	call	print_msg
	jmp	.L37
.L40:
	mov	rax, QWORD PTR 32[rbp]
	add	rax, 8
	mov	rdi, rax
	call	sem_wait@PLT
	mov	rsi, QWORD PTR -40[rbp]
	mov	rax, QWORD PTR -32[rbp]
	mov	r8d, 0
	mov	ecx, 10
	mov	edx, 0
	mov	rdi, rax
	call	print_msg
	mov	rax, QWORD PTR 32[rbp]
	add	rax, 8
	mov	rdi, rax
	call	sem_post@PLT
	mov	edi, 0
	call	exit@PLT
.L31:
	cmp	DWORD PTR -4[rbp], 0
	jg	.L38
	mov	rax, QWORD PTR 48[rbp]
	mov	DWORD PTR [rax], 3
.L38:
	mov	eax, DWORD PTR -4[rbp]
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE11:
	.size	processSanta, .-processSanta
	.globl	processElfes
	.type	processElfes, @function
processElfes:
.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	DWORD PTR -20[rbp], edi
	mov	DWORD PTR -24[rbp], esi
	mov	QWORD PTR -32[rbp], rdx
	mov	QWORD PTR -40[rbp], rcx
	mov	QWORD PTR -48[rbp], r8
	mov	QWORD PTR -56[rbp], r9
	call	fork@PLT
	mov	DWORD PTR -4[rbp], eax
	cmp	DWORD PTR -4[rbp], 0
	jne	.L42
	mov	rax, QWORD PTR -48[rbp]
	add	rax, 8
	mov	rdi, rax
	call	sem_wait@PLT
	mov	DWORD PTR -12[rbp], 0
	jmp	.L43
.L48:
	call	fork@PLT
	test	eax, eax
	jne	.L44
	mov	eax, DWORD PTR -12[rbp]
	lea	edx, 1[rax]
	mov	rsi, QWORD PTR -40[rbp]
	mov	rax, QWORD PTR -32[rbp]
	mov	r8d, edx
	mov	ecx, 0
	mov	edx, 1
	mov	rdi, rax
	call	print_msg
.L47:
	mov	eax, DWORD PTR -24[rbp]
	mov	esi, eax
	mov	edi, 0
	call	random_time
	imul	eax, eax, 1000
	mov	edi, eax
	call	usleep@PLT
	mov	eax, DWORD PTR -12[rbp]
	lea	edx, 1[rax]
	mov	rsi, QWORD PTR -40[rbp]
	mov	rax, QWORD PTR -32[rbp]
	mov	r8d, edx
	mov	ecx, 1
	mov	edx, 1
	mov	rdi, rax
	call	print_msg
	mov	rax, QWORD PTR -56[rbp]
	mov	eax, DWORD PTR [rax]
	lea	edx, 1[rax]
	mov	rax, QWORD PTR -56[rbp]
	mov	DWORD PTR [rax], edx
	mov	rax, QWORD PTR -56[rbp]
	add	rax, 8
	mov	rdi, rax
	call	sem_wait@PLT
	mov	rax, QWORD PTR -48[rbp]
	mov	eax, DWORD PTR [rax]
	test	eax, eax
	je	.L45
	mov	eax, DWORD PTR -12[rbp]
	lea	edx, 1[rax]
	mov	rsi, QWORD PTR -40[rbp]
	mov	rax, QWORD PTR -32[rbp]
	mov	r8d, edx
	mov	ecx, 3
	mov	edx, 1
	mov	rdi, rax
	call	print_msg
	nop
	mov	edi, 0
	call	exit@PLT
.L45:
	mov	eax, DWORD PTR -12[rbp]
	lea	edx, 1[rax]
	mov	rsi, QWORD PTR -40[rbp]
	mov	rax, QWORD PTR -32[rbp]
	mov	r8d, edx
	mov	ecx, 2
	mov	edx, 1
	mov	rdi, rax
	call	print_msg
	mov	rax, QWORD PTR 16[rbp]
	add	rax, 8
	mov	rdi, rax
	call	sem_post@PLT
	jmp	.L47
.L44:
	add	DWORD PTR -12[rbp], 1
.L43:
	mov	eax, DWORD PTR -12[rbp]
	cmp	eax, DWORD PTR -20[rbp]
	jl	.L48
	mov	rax, QWORD PTR -48[rbp]
	add	rax, 8
	mov	rdi, rax
	call	sem_post@PLT
	mov	DWORD PTR -8[rbp], 0
	jmp	.L49
.L50:
	mov	edi, 0
	call	wait@PLT
	add	DWORD PTR -8[rbp], 1
.L49:
	mov	eax, DWORD PTR -8[rbp]
	cmp	eax, DWORD PTR -20[rbp]
	jl	.L50
	mov	edi, 0
	call	exit@PLT
.L42:
	cmp	DWORD PTR -4[rbp], 0
	jg	.L51
	mov	rax, QWORD PTR 24[rbp]
	mov	DWORD PTR [rax], 3
.L51:
	mov	eax, DWORD PTR -4[rbp]
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE12:
	.size	processElfes, .-processElfes
	.globl	processDeers
	.type	processDeers, @function
processDeers:
.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, 64
	mov	DWORD PTR -20[rbp], edi
	mov	DWORD PTR -24[rbp], esi
	mov	QWORD PTR -32[rbp], rdx
	mov	QWORD PTR -40[rbp], rcx
	mov	QWORD PTR -48[rbp], r8
	mov	QWORD PTR -56[rbp], r9
	call	fork@PLT
	mov	DWORD PTR -4[rbp], eax
	cmp	DWORD PTR -4[rbp], 0
	jne	.L54
	mov	rax, QWORD PTR -48[rbp]
	add	rax, 8
	mov	rdi, rax
	call	sem_wait@PLT
	mov	DWORD PTR -12[rbp], 0
	jmp	.L55
.L58:
	call	fork@PLT
	test	eax, eax
	jne	.L56
	mov	eax, DWORD PTR -12[rbp]
	lea	edx, 1[rax]
	mov	rsi, QWORD PTR -40[rbp]
	mov	rax, QWORD PTR -32[rbp]
	mov	r8d, edx
	mov	ecx, 4
	mov	edx, 2
	mov	rdi, rax
	call	print_msg
	mov	eax, DWORD PTR -24[rbp]
	mov	edx, eax
	shr	edx, 31
	add	eax, edx
	sar	eax
	mov	edx, eax
	mov	eax, DWORD PTR -24[rbp]
	mov	esi, eax
	mov	edi, edx
	call	random_time
	imul	eax, eax, 1000
	mov	edi, eax
	call	usleep@PLT
	mov	eax, DWORD PTR -12[rbp]
	lea	edx, 1[rax]
	mov	rsi, QWORD PTR -40[rbp]
	mov	rax, QWORD PTR -32[rbp]
	mov	r8d, edx
	mov	ecx, 5
	mov	edx, 2
	mov	rdi, rax
	call	print_msg
	mov	rax, QWORD PTR -48[rbp]
	mov	eax, DWORD PTR [rax]
	lea	edx, 1[rax]
	mov	rax, QWORD PTR -48[rbp]
	mov	DWORD PTR [rax], edx
	mov	rax, QWORD PTR -56[rbp]
	add	rax, 8
	mov	rdi, rax
	call	sem_wait@PLT
	mov	eax, DWORD PTR -12[rbp]
	lea	edx, 1[rax]
	mov	rsi, QWORD PTR -40[rbp]
	mov	rax, QWORD PTR -32[rbp]
	mov	r8d, edx
	mov	ecx, 6
	mov	edx, 2
	mov	rdi, rax
	call	print_msg
	mov	rax, QWORD PTR -56[rbp]
	mov	eax, DWORD PTR [rax]
	lea	edx, 1[rax]
	mov	rax, QWORD PTR -56[rbp]
	mov	DWORD PTR [rax], edx
	mov	rax, QWORD PTR -56[rbp]
	add	rax, 8
	mov	rdi, rax
	call	sem_post@PLT
	mov	rax, QWORD PTR -56[rbp]
	mov	eax, DWORD PTR [rax]
	cmp	DWORD PTR -20[rbp], eax
	jne	.L57
	mov	rax, QWORD PTR 16[rbp]
	add	rax, 8
	mov	rdi, rax
	call	sem_post@PLT
.L57:
	mov	edi, 0
	call	exit@PLT
.L56:
	add	DWORD PTR -12[rbp], 1
.L55:
	mov	eax, DWORD PTR -12[rbp]
	cmp	eax, DWORD PTR -20[rbp]
	jl	.L58
	mov	rax, QWORD PTR -48[rbp]
	add	rax, 8
	mov	rdi, rax
	call	sem_post@PLT
	mov	DWORD PTR -8[rbp], 0
	jmp	.L59
.L60:
	mov	edi, 0
	call	wait@PLT
	add	DWORD PTR -8[rbp], 1
.L59:
	mov	eax, DWORD PTR -8[rbp]
	cmp	eax, DWORD PTR -20[rbp]
	jl	.L60
	mov	edi, 0
	call	exit@PLT
.L54:
	cmp	DWORD PTR -4[rbp], 0
	jg	.L61
	mov	rax, QWORD PTR 24[rbp]
	mov	DWORD PTR [rax], 3
.L61:
	mov	eax, DWORD PTR -4[rbp]
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE13:
	.size	processDeers, .-processDeers
	.globl	random_time
	.type	random_time, @function
random_time:
.LFB14:
	.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
	call	getpid@PLT
	mov	edi, eax
	call	srand@PLT
	call	rand@PLT
	mov	edx, DWORD PTR -24[rbp]
	sub	edx, DWORD PTR -20[rbp]
	lea	ecx, 1[rdx]
	cdq
	idiv	ecx
	mov	eax, DWORD PTR -20[rbp]
	add	eax, edx
	mov	DWORD PTR -4[rbp], eax
	mov	eax, DWORD PTR -4[rbp]
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE14:
	.size	random_time, .-random_time
	.section	.rodata
.LC2:
	.string	"Santa"
.LC3:
	.string	"Elf"
.LC4:
	.string	"RD"
.LC5:
	.string	"started"
.LC6:
	.string	"need help"
.LC7:
	.string	"get help"
.LC8:
	.string	"taking holidays"
.LC9:
	.string	"rstarted"
.LC10:
	.string	"return home"
.LC11:
	.string	"get hitched"
.LC12:
	.string	"going to sleep"
.LC13:
	.string	"helping elves"
.LC14:
	.string	"closing workshop"
.LC15:
	.string	"Christmas started"
.LC16:
	.string	"%i: %s: %s\n"
.LC17:
	.string	"%i: %s %i: %s\n"
	.text
	.globl	print_msg
	.type	print_msg, @function
print_msg:
.LFB15:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 160
	mov	QWORD PTR -136[rbp], rdi
	mov	QWORD PTR -144[rbp], rsi
	mov	DWORD PTR -148[rbp], edx
	mov	DWORD PTR -152[rbp], ecx
	mov	DWORD PTR -156[rbp], r8d
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	lea	rax, .LC2[rip]
	mov	QWORD PTR -128[rbp], rax
	lea	rax, .LC3[rip]
	mov	QWORD PTR -120[rbp], rax
	lea	rax, .LC4[rip]
	mov	QWORD PTR -112[rbp], rax
	lea	rax, .LC5[rip]
	mov	QWORD PTR -96[rbp], rax
	lea	rax, .LC6[rip]
	mov	QWORD PTR -88[rbp], rax
	lea	rax, .LC7[rip]
	mov	QWORD PTR -80[rbp], rax
	lea	rax, .LC8[rip]
	mov	QWORD PTR -72[rbp], rax
	lea	rax, .LC9[rip]
	mov	QWORD PTR -64[rbp], rax
	lea	rax, .LC10[rip]
	mov	QWORD PTR -56[rbp], rax
	lea	rax, .LC11[rip]
	mov	QWORD PTR -48[rbp], rax
	lea	rax, .LC12[rip]
	mov	QWORD PTR -40[rbp], rax
	lea	rax, .LC13[rip]
	mov	QWORD PTR -32[rbp], rax
	lea	rax, .LC14[rip]
	mov	QWORD PTR -24[rbp], rax
	lea	rax, .LC15[rip]
	mov	QWORD PTR -16[rbp], rax
	mov	rax, QWORD PTR -144[rbp]
	add	rax, 8
	mov	rdi, rax
	call	sem_wait@PLT
	cmp	DWORD PTR -148[rbp], 0
	jne	.L66
	mov	eax, DWORD PTR -152[rbp]
	cdqe
	mov	r8, QWORD PTR -96[rbp+rax*8]
	mov	eax, DWORD PTR -148[rbp]
	cdqe
	mov	rdx, QWORD PTR -128[rbp+rax*8]
	mov	rax, QWORD PTR -144[rbp]
	mov	eax, DWORD PTR [rax]
	lea	esi, 1[rax]
	mov	rcx, QWORD PTR -144[rbp]
	mov	DWORD PTR [rcx], esi
	mov	rdi, QWORD PTR -136[rbp]
	mov	rcx, rdx
	mov	edx, eax
	lea	rsi, .LC16[rip]
	mov	eax, 0
	call	fprintf@PLT
	mov	rax, QWORD PTR -136[rbp]
	mov	rdi, rax
	call	fflush@PLT
	jmp	.L67
.L66:
	mov	eax, DWORD PTR -152[rbp]
	cdqe
	mov	r8, QWORD PTR -96[rbp+rax*8]
	mov	eax, DWORD PTR -148[rbp]
	cdqe
	mov	rdx, QWORD PTR -128[rbp+rax*8]
	mov	rax, QWORD PTR -144[rbp]
	mov	eax, DWORD PTR [rax]
	lea	esi, 1[rax]
	mov	rcx, QWORD PTR -144[rbp]
	mov	DWORD PTR [rcx], esi
	mov	ecx, DWORD PTR -156[rbp]
	mov	rdi, QWORD PTR -136[rbp]
	mov	r9, r8
	mov	r8d, ecx
	mov	rcx, rdx
	mov	edx, eax
	lea	rsi, .LC17[rip]
	mov	eax, 0
	call	fprintf@PLT
	mov	rax, QWORD PTR -136[rbp]
	mov	rdi, rax
	call	fflush@PLT
.L67:
	mov	rax, QWORD PTR -144[rbp]
	add	rax, 8
	mov	rdi, rax
	call	sem_post@PLT
	nop
	mov	rax, QWORD PTR -8[rbp]
	sub	rax, QWORD PTR fs:40
	je	.L69
	call	__stack_chk_fail@PLT
.L69:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE15:
	.size	print_msg, .-print_msg
	.section	.rodata
	.align 8
.LC18:
	.string	"can't create shared memory (shm_get error)"
	.align 8
.LC19:
	.string	"can't create shared memory (shm_mat error)"
.LC20:
	.string	"can't fork"
.LC21:
	.string	"wrong args"
.LC22:
	.string	"can't create file"
.LC23:
	.string	"proj2: %s\n"
	.text
	.globl	print_err_msg
	.type	print_err_msg, @function
print_err_msg:
.LFB16:
	.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	DWORD PTR -52[rbp], edi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	lea	rax, .LC18[rip]
	mov	QWORD PTR -48[rbp], rax
	lea	rax, .LC19[rip]
	mov	QWORD PTR -40[rbp], rax
	lea	rax, .LC20[rip]
	mov	QWORD PTR -32[rbp], rax
	lea	rax, .LC21[rip]
	mov	QWORD PTR -24[rbp], rax
	lea	rax, .LC22[rip]
	mov	QWORD PTR -16[rbp], rax
	mov	eax, DWORD PTR -52[rbp]
	sub	eax, 1
	cdqe
	mov	rdx, QWORD PTR -48[rbp+rax*8]
	mov	rax, QWORD PTR stderr[rip]
	lea	rsi, .LC23[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	nop
	mov	rax, QWORD PTR -8[rbp]
	sub	rax, QWORD PTR fs:40
	je	.L72
	call	__stack_chk_fail@PLT
.L72:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE16:
	.size	print_err_msg, .-print_err_msg
	.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	"356992.c"
	.section	.rodata
	.align	2
.LC0:
	.ascii	"Santa\000"
	.align	2
.LC1:
	.ascii	"Elf\000"
	.align	2
.LC2:
	.ascii	"RD\000"
	.align	2
.LC4:
	.ascii	"started\000"
	.align	2
.LC5:
	.ascii	"need help\000"
	.align	2
.LC6:
	.ascii	"get help\000"
	.align	2
.LC7:
	.ascii	"taking holidays\000"
	.align	2
.LC8:
	.ascii	"rstarted\000"
	.align	2
.LC9:
	.ascii	"return home\000"
	.align	2
.LC10:
	.ascii	"get hitched\000"
	.align	2
.LC11:
	.ascii	"going to sleep\000"
	.align	2
.LC12:
	.ascii	"helping elves\000"
	.align	2
.LC13:
	.ascii	"closing workshop\000"
	.align	2
.LC14:
	.ascii	"Christmas started\000"
	.align	2
.LC16:
	.ascii	"can't create shared memory (shm_get error)\000"
	.align	2
.LC17:
	.ascii	"can't create shared memory (shm_mat error)\000"
	.align	2
.LC18:
	.ascii	"can't fork\000"
	.align	2
.LC19:
	.ascii	"wrong args\000"
	.align	2
.LC20:
	.ascii	"can't create file\000"
	.text
	.section	.rodata
	.align	2
.LC22:
	.ascii	"w\000"
	.align	2
.LC23:
	.ascii	"proj2.out\000"
	.align	2
.LC24:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 80
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #112
	str	r0, [fp, #-80]
	str	r1, [fp, #-84]
	ldr	r3, .L15
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	mov	r3, #0
	str	r3, [fp, #-72]
	mov	r3, #0
	str	r3, [fp, #-68]
	mov	r3, #0
	str	r3, [fp, #-64]
	mov	r3, #0
	str	r3, [fp, #-60]
	mov	r3, #0
	str	r3, [fp, #-56]
	ldr	r1, .L15+4
	ldr	r0, .L15+8
	bl	fopen
	str	r0, [fp, #-52]
	ldr	r3, [fp, #-52]
	cmp	r3, #0
	bne	.L2
	mov	r0, #5
	bl	print_err_msg
	mov	r3, #1
	b	.L13
.L2:
	ldr	r3, .L15+12
	ldr	r3, [r3]
	mov	r1, #0
	mov	r0, r3
	bl	setbuf
	ldr	r3, .L15+16
	ldr	r3, [r3]
	mov	r1, #0
	mov	r0, r3
	bl	setbuf
	sub	ip, fp, #56
	sub	r2, fp, #60
	sub	r1, fp, #64
	sub	r0, fp, #68
	ldr	r3, [fp, #-84]
	str	r3, [sp, #4]
	ldr	r3, [fp, #-80]
	str	r3, [sp]
	mov	r3, ip
	bl	check_args
	mov	r3, r0
	str	r3, [fp, #-72]
	ldr	r3, [fp, #-72]
	cmp	r3, #0
	ble	.L4
	mov	r0, #4
	bl	print_err_msg
	mov	r3, #1
	b	.L13
.L4:
	sub	r3, fp, #72
	mov	r1, r3
	ldr	r0, .L15+20
	bl	init_memory
	str	r0, [fp, #-48]
	ldr	r3, [fp, #-48]
	add	r3, r3, #4
	mov	r2, #1
	mov	r1, #1
	mov	r0, r3
	bl	sem_init
	ldr	r3, [fp, #-48]
	mov	r2, #1
	str	r2, [r3]
	ldr	r3, [fp, #-72]
	cmp	r3, #0
	ble	.L5
	ldr	r0, [fp, #-72]
	mov	r3, #0
	str	r3, [sp, #12]
	mov	r3, #0
	str	r3, [sp, #8]
	mov	r3, #0
	str	r3, [sp, #4]
	mov	r3, #0
	str	r3, [sp]
	mov	r3, #0
	mov	r2, #0
	ldr	r1, [fp, #-48]
	bl	deinitialize_all
	mov	r3, #1
	b	.L13
.L5:
	sub	r3, fp, #72
	mov	r1, r3
	ldr	r0, .L15+24
	bl	init_memory
	str	r0, [fp, #-44]
	ldr	r3, [fp, #-44]
	add	r3, r3, #4
	mov	r2, #0
	mov	r1, #1
	mov	r0, r3
	bl	sem_init
	ldr	r3, [fp, #-44]
	mov	r2, #0
	str	r2, [r3]
	ldr	r3, [fp, #-72]
	cmp	r3, #0
	ble	.L6
	ldr	r0, [fp, #-72]
	mov	r3, #0
	str	r3, [sp, #12]
	mov	r3, #0
	str	r3, [sp, #8]
	mov	r3, #0
	str	r3, [sp, #4]
	mov	r3, #0
	str	r3, [sp]
	mov	r3, #0
	ldr	r2, [fp, #-44]
	ldr	r1, [fp, #-48]
	bl	deinitialize_all
	mov	r3, #1
	b	.L13
.L6:
	sub	r3, fp, #72
	mov	r1, r3
	ldr	r0, .L15+28
	bl	init_memory
	str	r0, [fp, #-40]
	ldr	r3, [fp, #-40]
	add	r3, r3, #4
	mov	r2, #0
	mov	r1, #1
	mov	r0, r3
	bl	sem_init
	ldr	r3, [fp, #-40]
	mov	r2, #0
	str	r2, [r3]
	ldr	r3, [fp, #-72]
	cmp	r3, #0
	ble	.L7
	ldr	r0, [fp, #-72]
	mov	r3, #0
	str	r3, [sp, #12]
	mov	r3, #0
	str	r3, [sp, #8]
	mov	r3, #0
	str	r3, [sp, #4]
	ldr	r3, [fp, #-40]
	str	r3, [sp]
	mov	r3, #0
	ldr	r2, [fp, #-44]
	ldr	r1, [fp, #-48]
	bl	deinitialize_all
	mov	r3, #1
	b	.L13
.L7:
	sub	r3, fp, #72
	mov	r1, r3
	ldr	r0, .L15+32
	bl	init_memory
	str	r0, [fp, #-36]
	ldr	r3, [fp, #-36]
	add	r3, r3, #4
	mov	r2, #0
	mov	r1, #1
	mov	r0, r3
	bl	sem_init
	ldr	r3, [fp, #-36]
	mov	r2, #0
	str	r2, [r3]
	ldr	r3, [fp, #-72]
	cmp	r3, #0
	ble	.L8
	ldr	r0, [fp, #-72]
	mov	r3, #0
	str	r3, [sp, #12]
	mov	r3, #0
	str	r3, [sp, #8]
	mov	r3, #0
	str	r3, [sp, #4]
	ldr	r3, [fp, #-40]
	str	r3, [sp]
	mov	r3, #0
	ldr	r2, [fp, #-44]
	ldr	r1, [fp, #-48]
	bl	deinitialize_all
	mov	r3, #1
	b	.L13
.L8:
	sub	r3, fp, #72
	mov	r1, r3
	ldr	r0, .L15+36
	bl	init_memory
	str	r0, [fp, #-32]
	ldr	r3, [fp, #-32]
	add	r3, r3, #4
	mov	r2, #0
	mov	r1, #1
	mov	r0, r3
	bl	sem_init
	ldr	r3, [fp, #-32]
	mov	r2, #0
	str	r2, [r3]
	ldr	r3, [fp, #-72]
	cmp	r3, #0
	ble	.L9
	ldr	r0, [fp, #-72]
	mov	r3, #0
	str	r3, [sp, #12]
	mov	r3, #0
	str	r3, [sp, #8]
	mov	r3, #0
	str	r3, [sp, #4]
	ldr	r3, [fp, #-40]
	str	r3, [sp]
	ldr	r3, [fp, #-32]
	ldr	r2, [fp, #-44]
	ldr	r1, [fp, #-48]
	bl	deinitialize_all
	mov	r3, #1
	b	.L13
.L9:
	sub	r3, fp, #72
	mov	r1, r3
	ldr	r0, .L15+40
	bl	init_memory
	str	r0, [fp, #-28]
	ldr	r3, [fp, #-28]
	add	r3, r3, #4
	mov	r2, #0
	mov	r1, #1
	mov	r0, r3
	bl	sem_init
	ldr	r3, [fp, #-28]
	mov	r2, #0
	str	r2, [r3]
	ldr	r3, [fp, #-72]
	cmp	r3, #0
	ble	.L10
	ldr	r0, [fp, #-72]
	mov	r3, #0
	str	r3, [sp, #12]
	ldr	r3, [fp, #-28]
	str	r3, [sp, #8]
	ldr	r3, [fp, #-36]
	str	r3, [sp, #4]
	ldr	r3, [fp, #-40]
	str	r3, [sp]
	ldr	r3, [fp, #-32]
	ldr	r2, [fp, #-44]
	ldr	r1, [fp, #-48]
	bl	deinitialize_all
	mov	r3, #1
	b	.L13
.L10:
	sub	r3, fp, #72
	mov	r1, r3
	ldr	r0, .L15+44
	bl	init_memory
	str	r0, [fp, #-24]
	ldr	r3, [fp, #-24]
	add	r3, r3, #4
	mov	r2, #0
	mov	r1, #1
	mov	r0, r3
	bl	sem_init
	ldr	r3, [fp, #-72]
	cmp	r3, #0
	ble	.L11
	ldr	r0, [fp, #-72]
	ldr	r3, [fp, #-24]
	str	r3, [sp, #12]
	ldr	r3, [fp, #-28]
	str	r3, [sp, #8]
	ldr	r3, [fp, #-36]
	str	r3, [sp, #4]
	ldr	r3, [fp, #-40]
	str	r3, [sp]
	ldr	r3, [fp, #-32]
	ldr	r2, [fp, #-44]
	ldr	r1, [fp, #-48]
	bl	deinitialize_all
	mov	r3, #1
	b	.L13
.L11:
	ldr	r0, [fp, #-68]
	ldr	r1, [fp, #-60]
	sub	r3, fp, #72
	str	r3, [sp, #12]
	ldr	r3, [fp, #-40]
	str	r3, [sp, #8]
	ldr	r3, [fp, #-36]
	str	r3, [sp, #4]
	ldr	r3, [fp, #-44]
	str	r3, [sp]
	ldr	r3, [fp, #-48]
	ldr	r2, [fp, #-52]
	bl	processElfes
	str	r0, [fp, #-20]
	ldr	r0, [fp, #-64]
	ldr	r1, [fp, #-56]
	sub	r3, fp, #72
	str	r3, [sp, #12]
	ldr	r3, [fp, #-24]
	str	r3, [sp, #8]
	ldr	r3, [fp, #-28]
	str	r3, [sp, #4]
	ldr	r3, [fp, #-32]
	str	r3, [sp]
	ldr	r3, [fp, #-48]
	ldr	r2, [fp, #-52]
	bl	processDeers
	str	r0, [fp, #-16]
	ldr	r0, [fp, #-68]
	ldr	r1, [fp, #-64]
	sub	r3, fp, #72
	str	r3, [sp, #24]
	ldr	r3, [fp, #-40]
	str	r3, [sp, #20]
	ldr	r3, [fp, #-24]
	str	r3, [sp, #16]
	ldr	r3, [fp, #-36]
	str	r3, [sp, #12]
	ldr	r3, [fp, #-32]
	str	r3, [sp, #8]
	ldr	r3, [fp, #-44]
	str	r3, [sp, #4]
	ldr	r3, [fp, #-28]
	str	r3, [sp]
	ldr	r3, [fp, #-48]
	ldr	r2, [fp, #-52]
	bl	processSanta
	str	r0, [fp, #-12]
	ldr	r3, [fp, #-72]
	cmp	r3, #0
	ble	.L12
	ldr	r0, [fp, #-72]
	ldr	r3, [fp, #-24]
	str	r3, [sp, #12]
	ldr	r3, [fp, #-28]
	str	r3, [sp, #8]
	ldr	r3, [fp, #-36]
	str	r3, [sp, #4]
	ldr	r3, [fp, #-40]
	str	r3, [sp]
	ldr	r3, [fp, #-32]
	ldr	r2, [fp, #-44]
	ldr	r1, [fp, #-48]
	bl	deinitialize_all
	mov	r3, #1
	b	.L13
.L12:
	mov	r2, #0
	mov	r1, #0
	ldr	r0, [fp, #-20]
	bl	waitpid
	mov	r2, #0
	mov	r1, #0
	ldr	r0, [fp, #-16]
	bl	waitpid
	mov	r2, #0
	mov	r1, #0
	ldr	r0, [fp, #-12]
	bl	waitpid
	ldr	r3, [fp, #-24]
	str	r3, [sp, #12]
	ldr	r3, [fp, #-28]
	str	r3, [sp, #8]
	ldr	r3, [fp, #-36]
	str	r3, [sp, #4]
	ldr	r3, [fp, #-40]
	str	r3, [sp]
	ldr	r3, [fp, #-32]
	ldr	r2, [fp, #-44]
	ldr	r1, [fp, #-48]
	mov	r0, #0
	bl	deinitialize_all
	ldr	r0, [fp, #-52]
	bl	fclose
	mov	r3, #0
.L13:
	ldr	r2, .L15
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L14
	bl	__stack_chk_fail
.L14:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L16:
	.align	2
.L15:
	.word	.LC24
	.word	.LC22
	.word	.LC23
	.word	stdout
	.word	stderr
	.word	4242
	.word	4243
	.word	4245
	.word	4246
	.word	4247
	.word	4248
	.word	4249
	.size	main, .-main
	.align	2
	.global	deinitialize_all
	.syntax unified
	.arm
	.fpu softvfp
	.type	deinitialize_all, %function
deinitialize_all:
	@ args = 16, 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, #-8]
	str	r1, [fp, #-12]
	str	r2, [fp, #-16]
	str	r3, [fp, #-20]
	ldr	r1, [fp, #-12]
	ldr	r0, [fp, #-8]
	bl	deinitialize
	ldr	r1, [fp, #-16]
	ldr	r0, [fp, #-8]
	bl	deinitialize
	ldr	r1, [fp, #-20]
	ldr	r0, [fp, #-8]
	bl	deinitialize
	ldr	r1, [fp, #4]
	ldr	r0, [fp, #-8]
	bl	deinitialize
	ldr	r1, [fp, #8]
	ldr	r0, [fp, #-8]
	bl	deinitialize
	ldr	r1, [fp, #12]
	ldr	r0, [fp, #-8]
	bl	deinitialize
	ldr	r1, [fp, #16]
	ldr	r0, [fp, #-8]
	bl	deinitialize
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
	.size	deinitialize_all, .-deinitialize_all
	.align	2
	.global	check_args
	.syntax unified
	.arm
	.fpu softvfp
	.type	check_args, %function
check_args:
	@ args = 8, 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, #-8]
	str	r1, [fp, #-12]
	str	r2, [fp, #-16]
	str	r3, [fp, #-20]
	ldr	r3, [fp, #4]
	cmp	r3, #5
	beq	.L19
	mov	r3, #4
	b	.L20
.L19:
	ldr	r3, [fp, #8]
	add	r3, r3, #4
	ldr	r3, [r3]
	mov	r0, r3
	bl	atoi
	mov	r2, r0
	ldr	r3, [fp, #-8]
	str	r2, [r3]
	ldr	r3, [fp, #8]
	add	r3, r3, #8
	ldr	r3, [r3]
	mov	r0, r3
	bl	atoi
	mov	r2, r0
	ldr	r3, [fp, #-12]
	str	r2, [r3]
	ldr	r3, [fp, #8]
	add	r3, r3, #12
	ldr	r3, [r3]
	mov	r0, r3
	bl	atoi
	mov	r2, r0
	ldr	r3, [fp, #-16]
	str	r2, [r3]
	ldr	r3, [fp, #8]
	add	r3, r3, #16
	ldr	r3, [r3]
	mov	r0, r3
	bl	atoi
	mov	r2, r0
	ldr	r3, [fp, #-20]
	str	r2, [r3]
	ldr	r3, [fp, #-8]
	ldr	r3, [r3]
	cmp	r3, #0
	ble	.L21
	ldr	r3, [fp, #-8]
	ldr	r3, [r3]
	cmp	r3, #1000
	bge	.L21
	ldr	r3, [fp, #-12]
	ldr	r3, [r3]
	cmp	r3, #0
	ble	.L21
	ldr	r3, [fp, #-12]
	ldr	r3, [r3]
	cmp	r3, #19
	bgt	.L21
	ldr	r3, [fp, #-16]
	ldr	r3, [r3]
	cmp	r3, #0
	blt	.L21
	ldr	r3, [fp, #-16]
	ldr	r3, [r3]
	cmp	r3, #1000
	bgt	.L21
	ldr	r3, [fp, #-20]
	ldr	r3, [r3]
	cmp	r3, #0
	blt	.L21
	ldr	r3, [fp, #-20]
	ldr	r3, [r3]
	cmp	r3, #1000
	ble	.L22
.L21:
	mov	r3, #4
	b	.L20
.L22:
	mov	r3, #0
.L20:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
	.size	check_args, .-check_args
	.align	2
	.global	init_memory
	.syntax unified
	.arm
	.fpu softvfp
	.type	init_memory, %function
init_memory:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #16
	str	r0, [fp, #-16]
	str	r1, [fp, #-20]
	ldr	r2, .L27
	mov	r1, #24
	ldr	r0, [fp, #-16]
	bl	shmget
	str	r0, [fp, #-12]
	ldr	r3, [fp, #-12]
	cmp	r3, #0
	bge	.L24
	ldr	r3, [fp, #-20]
	mov	r2, #1
	str	r2, [r3]
	mov	r3, #1
	b	.L25
.L24:
	mov	r2, #0
	mov	r1, #0
	ldr	r0, [fp, #-12]
	bl	shmat
	str	r0, [fp, #-8]
	ldr	r3, [fp, #-8]
	cmn	r3, #1
	bne	.L26
	ldr	r3, [fp, #-20]
	mov	r2, #2
	str	r2, [r3]
	mov	r3, #2
	b	.L25
.L26:
	ldr	r3, [fp, #-8]
	ldr	r2, [fp, #-12]
	str	r2, [r3, #20]
	ldr	r3, [fp, #-8]
.L25:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L28:
	.align	2
.L27:
	.word	950
	.size	init_memory, .-init_memory
	.align	2
	.global	deinitialize
	.syntax unified
	.arm
	.fpu softvfp
	.type	deinitialize, %function
deinitialize:
	@ 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]
	ldr	r3, [fp, #-16]
	cmp	r3, #0
	ble	.L30
	ldr	r0, [fp, #-16]
	bl	print_err_msg
.L30:
	ldr	r3, [fp, #-20]
	cmp	r3, #0
	beq	.L33
	ldr	r3, [fp, #-20]
	add	r3, r3, #4
	mov	r0, r3
	bl	sem_destroy
	ldr	r3, [fp, #-20]
	ldr	r3, [r3, #20]
	str	r3, [fp, #-8]
	ldr	r0, [fp, #-20]
	bl	shmdt
	mov	r2, #0
	mov	r1, #0
	ldr	r0, [fp, #-8]
	bl	shmctl
	nop
.L33:
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
	.size	deinitialize, .-deinitialize
	.align	2
	.global	processSanta
	.syntax unified
	.arm
	.fpu softvfp
	.type	processSanta, %function
processSanta:
	@ args = 28, pretend = 0, frame = 24
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #32
	str	r0, [fp, #-16]
	str	r1, [fp, #-20]
	str	r2, [fp, #-24]
	str	r3, [fp, #-28]
	bl	fork
	mov	r3, r0
	str	r3, [fp, #-8]
	ldr	r3, [fp, #-8]
	cmp	r3, #0
	bne	.L35
	ldr	r3, [fp, #8]
	add	r3, r3, #4
	mov	r0, r3
	bl	sem_post
	ldr	r3, [fp, #12]
	add	r3, r3, #4
	mov	r0, r3
	bl	sem_post
	mov	r3, #0
	str	r3, [sp]
	mov	r3, #7
	mov	r2, #0
	ldr	r1, [fp, #-28]
	ldr	r0, [fp, #-24]
	bl	print_msg
.L41:
	ldr	r3, [fp, #12]
	ldr	r3, [r3]
	ldr	r2, [fp, #-20]
	cmp	r2, r3
	bne	.L36
	mov	r3, #0
	str	r3, [sp]
	mov	r3, #9
	mov	r2, #0
	ldr	r1, [fp, #-28]
	ldr	r0, [fp, #-24]
	bl	print_msg
	ldr	r3, [fp, #4]
	add	r3, r3, #4
	mov	r0, r3
	bl	sem_post
	ldr	r3, [fp, #8]
	mov	r2, #1
	str	r2, [r3]
	mov	r3, #0
	str	r3, [fp, #-12]
	b	.L37
.L38:
	ldr	r3, [fp, #16]
	add	r3, r3, #4
	mov	r0, r3
	bl	sem_post
	ldr	r3, [fp, #-12]
	add	r3, r3, #1
	str	r3, [fp, #-12]
.L37:
	ldr	r2, [fp, #-12]
	ldr	r3, [fp, #-16]
	cmp	r2, r3
	blt	.L38
	b	.L44
.L36:
	ldr	r3, [fp, #16]
	ldr	r3, [r3]
	cmp	r3, #2
	ble	.L41
	mov	r3, #0
	str	r3, [sp]
	mov	r3, #8
	mov	r2, #0
	ldr	r1, [fp, #-28]
	ldr	r0, [fp, #-24]
	bl	print_msg
	ldr	r3, [fp, #16]
	ldr	r3, [r3]
	sub	r2, r3, #3
	ldr	r3, [fp, #16]
	str	r2, [r3]
	ldr	r3, [fp, #16]
	add	r3, r3, #4
	mov	r0, r3
	bl	sem_post
	ldr	r3, [fp, #16]
	add	r3, r3, #4
	mov	r0, r3
	bl	sem_post
	ldr	r3, [fp, #16]
	add	r3, r3, #4
	mov	r0, r3
	bl	sem_post
	ldr	r3, [fp, #24]
	add	r3, r3, #4
	mov	r0, r3
	bl	sem_wait
	ldr	r3, [fp, #24]
	add	r3, r3, #4
	mov	r0, r3
	bl	sem_wait
	ldr	r3, [fp, #24]
	add	r3, r3, #4
	mov	r0, r3
	bl	sem_wait
	mov	r3, #0
	str	r3, [sp]
	mov	r3, #7
	mov	r2, #0
	ldr	r1, [fp, #-28]
	ldr	r0, [fp, #-24]
	bl	print_msg
	b	.L41
.L44:
	ldr	r3, [fp, #20]
	add	r3, r3, #4
	mov	r0, r3
	bl	sem_wait
	mov	r3, #0
	str	r3, [sp]
	mov	r3, #10
	mov	r2, #0
	ldr	r1, [fp, #-28]
	ldr	r0, [fp, #-24]
	bl	print_msg
	ldr	r3, [fp, #20]
	add	r3, r3, #4
	mov	r0, r3
	bl	sem_post
	mov	r0, #0
	bl	exit
.L35:
	ldr	r3, [fp, #-8]
	cmp	r3, #0
	bgt	.L42
	ldr	r3, [fp, #28]
	mov	r2, #3
	str	r2, [r3]
.L42:
	ldr	r3, [fp, #-8]
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
	.size	processSanta, .-processSanta
	.align	2
	.global	processElfes
	.syntax unified
	.arm
	.fpu softvfp
	.type	processElfes, %function
processElfes:
	@ args = 16, pretend = 0, frame = 32
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #40
	str	r0, [fp, #-24]
	str	r1, [fp, #-28]
	str	r2, [fp, #-32]
	str	r3, [fp, #-36]
	bl	fork
	mov	r3, r0
	str	r3, [fp, #-8]
	ldr	r3, [fp, #-8]
	cmp	r3, #0
	bne	.L46
	ldr	r3, [fp, #4]
	add	r3, r3, #4
	mov	r0, r3
	bl	sem_wait
	mov	r3, #0
	str	r3, [fp, #-16]
	b	.L47
.L52:
	bl	fork
	mov	r3, r0
	cmp	r3, #0
	bne	.L48
	ldr	r3, [fp, #-16]
	add	r3, r3, #1
	str	r3, [sp]
	mov	r3, #0
	mov	r2, #1
	ldr	r1, [fp, #-36]
	ldr	r0, [fp, #-32]
	bl	print_msg
.L51:
	ldr	r1, [fp, #-28]
	mov	r0, #0
	bl	random_time
	mov	r2, r0
	mov	r3, r2
	lsl	r3, r3, #5
	sub	r3, r3, r2
	lsl	r3, r3, #2
	add	r3, r3, r2
	lsl	r3, r3, #3
	mov	r0, r3
	bl	usleep
	ldr	r3, [fp, #-16]
	add	r3, r3, #1
	str	r3, [sp]
	mov	r3, #1
	mov	r2, #1
	ldr	r1, [fp, #-36]
	ldr	r0, [fp, #-32]
	bl	print_msg
	ldr	r3, [fp, #8]
	ldr	r3, [r3]
	add	r2, r3, #1
	ldr	r3, [fp, #8]
	str	r2, [r3]
	ldr	r3, [fp, #8]
	add	r3, r3, #4
	mov	r0, r3
	bl	sem_wait
	ldr	r3, [fp, #4]
	ldr	r3, [r3]
	cmp	r3, #0
	beq	.L49
	ldr	r3, [fp, #-16]
	add	r3, r3, #1
	str	r3, [sp]
	mov	r3, #3
	mov	r2, #1
	ldr	r1, [fp, #-36]
	ldr	r0, [fp, #-32]
	bl	print_msg
	nop
	mov	r0, #0
	bl	exit
.L49:
	ldr	r3, [fp, #-16]
	add	r3, r3, #1
	str	r3, [sp]
	mov	r3, #2
	mov	r2, #1
	ldr	r1, [fp, #-36]
	ldr	r0, [fp, #-32]
	bl	print_msg
	ldr	r3, [fp, #12]
	add	r3, r3, #4
	mov	r0, r3
	bl	sem_post
	b	.L51
.L48:
	ldr	r3, [fp, #-16]
	add	r3, r3, #1
	str	r3, [fp, #-16]
.L47:
	ldr	r2, [fp, #-16]
	ldr	r3, [fp, #-24]
	cmp	r2, r3
	blt	.L52
	ldr	r3, [fp, #4]
	add	r3, r3, #4
	mov	r0, r3
	bl	sem_post
	mov	r3, #0
	str	r3, [fp, #-12]
	b	.L53
.L54:
	mov	r0, #0
	bl	wait
	ldr	r3, [fp, #-12]
	add	r3, r3, #1
	str	r3, [fp, #-12]
.L53:
	ldr	r2, [fp, #-12]
	ldr	r3, [fp, #-24]
	cmp	r2, r3
	blt	.L54
	mov	r0, #0
	bl	exit
.L46:
	ldr	r3, [fp, #-8]
	cmp	r3, #0
	bgt	.L55
	ldr	r3, [fp, #16]
	mov	r2, #3
	str	r2, [r3]
.L55:
	ldr	r3, [fp, #-8]
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
	.size	processElfes, .-processElfes
	.align	2
	.global	processDeers
	.syntax unified
	.arm
	.fpu softvfp
	.type	processDeers, %function
processDeers:
	@ args = 16, pretend = 0, frame = 32
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #40
	str	r0, [fp, #-24]
	str	r1, [fp, #-28]
	str	r2, [fp, #-32]
	str	r3, [fp, #-36]
	bl	fork
	mov	r3, r0
	str	r3, [fp, #-8]
	ldr	r3, [fp, #-8]
	cmp	r3, #0
	bne	.L58
	ldr	r3, [fp, #4]
	add	r3, r3, #4
	mov	r0, r3
	bl	sem_wait
	mov	r3, #0
	str	r3, [fp, #-16]
	b	.L59
.L62:
	bl	fork
	mov	r3, r0
	cmp	r3, #0
	bne	.L60
	ldr	r3, [fp, #-16]
	add	r3, r3, #1
	str	r3, [sp]
	mov	r3, #4
	mov	r2, #2
	ldr	r1, [fp, #-36]
	ldr	r0, [fp, #-32]
	bl	print_msg
	ldr	r3, [fp, #-28]
	lsr	r2, r3, #31
	add	r3, r2, r3
	asr	r3, r3, #1
	ldr	r1, [fp, #-28]
	mov	r0, r3
	bl	random_time
	mov	r2, r0
	mov	r3, r2
	lsl	r3, r3, #5
	sub	r3, r3, r2
	lsl	r3, r3, #2
	add	r3, r3, r2
	lsl	r3, r3, #3
	mov	r0, r3
	bl	usleep
	ldr	r3, [fp, #-16]
	add	r3, r3, #1
	str	r3, [sp]
	mov	r3, #5
	mov	r2, #2
	ldr	r1, [fp, #-36]
	ldr	r0, [fp, #-32]
	bl	print_msg
	ldr	r3, [fp, #4]
	ldr	r3, [r3]
	add	r2, r3, #1
	ldr	r3, [fp, #4]
	str	r2, [r3]
	ldr	r3, [fp, #8]
	add	r3, r3, #4
	mov	r0, r3
	bl	sem_wait
	ldr	r3, [fp, #-16]
	add	r3, r3, #1
	str	r3, [sp]
	mov	r3, #6
	mov	r2, #2
	ldr	r1, [fp, #-36]
	ldr	r0, [fp, #-32]
	bl	print_msg
	ldr	r3, [fp, #8]
	ldr	r3, [r3]
	add	r2, r3, #1
	ldr	r3, [fp, #8]
	str	r2, [r3]
	ldr	r3, [fp, #8]
	add	r3, r3, #4
	mov	r0, r3
	bl	sem_post
	ldr	r3, [fp, #8]
	ldr	r3, [r3]
	ldr	r2, [fp, #-24]
	cmp	r2, r3
	bne	.L61
	ldr	r3, [fp, #12]
	add	r3, r3, #4
	mov	r0, r3
	bl	sem_post
.L61:
	mov	r0, #0
	bl	exit
.L60:
	ldr	r3, [fp, #-16]
	add	r3, r3, #1
	str	r3, [fp, #-16]
.L59:
	ldr	r2, [fp, #-16]
	ldr	r3, [fp, #-24]
	cmp	r2, r3
	blt	.L62
	ldr	r3, [fp, #4]
	add	r3, r3, #4
	mov	r0, r3
	bl	sem_post
	mov	r3, #0
	str	r3, [fp, #-12]
	b	.L63
.L64:
	mov	r0, #0
	bl	wait
	ldr	r3, [fp, #-12]
	add	r3, r3, #1
	str	r3, [fp, #-12]
.L63:
	ldr	r2, [fp, #-12]
	ldr	r3, [fp, #-24]
	cmp	r2, r3
	blt	.L64
	mov	r0, #0
	bl	exit
.L58:
	ldr	r3, [fp, #-8]
	cmp	r3, #0
	bgt	.L65
	ldr	r3, [fp, #16]
	mov	r2, #3
	str	r2, [r3]
.L65:
	ldr	r3, [fp, #-8]
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
	.size	processDeers, .-processDeers
	.global	__aeabi_idivmod
	.align	2
	.global	random_time
	.syntax unified
	.arm
	.fpu softvfp
	.type	random_time, %function
random_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
	str	r0, [fp, #-16]
	str	r1, [fp, #-20]
	bl	getpid
	mov	r3, r0
	mov	r0, r3
	bl	srand
	bl	rand
	ldr	r2, [fp, #-20]
	ldr	r3, [fp, #-16]
	sub	r3, r2, r3
	add	r3, r3, #1
	mov	r1, r3
	bl	__aeabi_idivmod
	mov	r3, r1
	mov	r2, r3
	ldr	r3, [fp, #-16]
	add	r3, r3, r2
	str	r3, [fp, #-8]
	ldr	r3, [fp, #-8]
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
	.size	random_time, .-random_time
	.section	.rodata
	.align	2
.LC27:
	.ascii	"%i: %s: %s\012\000"
	.align	2
.LC28:
	.ascii	"%i: %s %i: %s\012\000"
	.align	2
.LC25:
	.word	.LC0
	.word	.LC1
	.word	.LC2
	.align	2
.LC26:
	.word	.LC4
	.word	.LC5
	.word	.LC6
	.word	.LC7
	.word	.LC8
	.word	.LC9
	.word	.LC10
	.word	.LC11
	.word	.LC12
	.word	.LC13
	.word	.LC14
	.align	2
.LC29:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	print_msg
	.syntax unified
	.arm
	.fpu softvfp
	.type	print_msg, %function
print_msg:
	@ args = 4, pretend = 0, frame = 80
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #88
	str	r0, [fp, #-72]
	str	r1, [fp, #-76]
	str	r2, [fp, #-80]
	str	r3, [fp, #-84]
	ldr	r3, .L74
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	ldr	r2, .L74+4
	sub	r3, fp, #64
	ldm	r2, {r0, r1, r2}
	stm	r3, {r0, r1, r2}
	ldr	r3, .L74+8
	sub	ip, fp, #52
	mov	lr, r3
	ldmia	lr!, {r0, r1, r2, r3}
	stmia	ip!, {r0, r1, r2, r3}
	ldmia	lr!, {r0, r1, r2, r3}
	stmia	ip!, {r0, r1, r2, r3}
	ldm	lr, {r0, r1, r2}
	stm	ip, {r0, r1, r2}
	ldr	r3, [fp, #-76]
	add	r3, r3, #4
	mov	r0, r3
	bl	sem_wait
	ldr	r3, [fp, #-80]
	cmp	r3, #0
	bne	.L70
	ldr	r3, [fp, #-76]
	ldr	r2, [r3]
	add	r1, r2, #1
	ldr	r3, [fp, #-76]
	str	r1, [r3]
	ldr	r3, [fp, #-80]
	lsl	r3, r3, #2
	sub	r1, fp, #4
	add	r3, r1, r3
	ldr	r1, [r3, #-60]
	ldr	r3, [fp, #-84]
	lsl	r3, r3, #2
	sub	r0, fp, #4
	add	r3, r0, r3
	ldr	r3, [r3, #-48]
	str	r3, [sp]
	mov	r3, r1
	ldr	r1, .L74+12
	ldr	r0, [fp, #-72]
	bl	fprintf
	ldr	r0, [fp, #-72]
	bl	fflush
	b	.L71
.L70:
	ldr	r3, [fp, #-76]
	ldr	r2, [r3]
	add	r1, r2, #1
	ldr	r3, [fp, #-76]
	str	r1, [r3]
	ldr	r3, [fp, #-80]
	lsl	r3, r3, #2
	sub	r1, fp, #4
	add	r3, r1, r3
	ldr	r1, [r3, #-60]
	ldr	r3, [fp, #-84]
	lsl	r3, r3, #2
	sub	r0, fp, #4
	add	r3, r0, r3
	ldr	r3, [r3, #-48]
	str	r3, [sp, #4]
	ldr	r3, [fp, #4]
	str	r3, [sp]
	mov	r3, r1
	ldr	r1, .L74+16
	ldr	r0, [fp, #-72]
	bl	fprintf
	ldr	r0, [fp, #-72]
	bl	fflush
.L71:
	ldr	r3, [fp, #-76]
	add	r3, r3, #4
	mov	r0, r3
	bl	sem_post
	nop
	ldr	r3, .L74
	ldr	r2, [r3]
	ldr	r3, [fp, #-8]
	eors	r2, r3, r2
	mov	r3, #0
	beq	.L73
	bl	__stack_chk_fail
.L73:
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L75:
	.align	2
.L74:
	.word	.LC29
	.word	.LC25
	.word	.LC26
	.word	.LC27
	.word	.LC28
	.size	print_msg, .-print_msg
	.section	.rodata
	.align	2
.LC31:
	.ascii	"proj2: %s\012\000"
	.align	2
.LC30:
	.word	.LC16
	.word	.LC17
	.word	.LC18
	.word	.LC19
	.word	.LC20
	.align	2
.LC32:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	print_err_msg
	.syntax unified
	.arm
	.fpu softvfp
	.type	print_err_msg, %function
print_err_msg:
	@ args = 0, pretend = 0, frame = 32
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #32
	str	r0, [fp, #-32]
	ldr	r3, .L79
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	ldr	r3, .L79+4
	sub	ip, fp, #28
	mov	lr, r3
	ldmia	lr!, {r0, r1, r2, r3}
	stmia	ip!, {r0, r1, r2, r3}
	ldr	r3, [lr]
	str	r3, [ip]
	ldr	r3, .L79+8
	ldr	r0, [r3]
	ldr	r3, [fp, #-32]
	sub	r3, r3, #1
	lsl	r3, r3, #2
	sub	r2, fp, #4
	add	r3, r2, r3
	ldr	r3, [r3, #-24]
	mov	r2, r3
	ldr	r1, .L79+12
	bl	fprintf
	nop
	ldr	r3, .L79
	ldr	r2, [r3]
	ldr	r3, [fp, #-8]
	eors	r2, r3, r2
	mov	r3, #0
	beq	.L78
	bl	__stack_chk_fail
.L78:
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L80:
	.align	2
.L79:
	.word	.LC32
	.word	.LC30
	.word	stderr
	.word	.LC31
	.size	print_err_msg, .-print_err_msg
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
