	.file	"1263981.c"
	.intel_syntax noprefix
	.text
	.globl	processLevel
	.bss
	.align 4
	.type	processLevel, @object
	.size	processLevel, 4
processLevel:
	.zero	4
	.globl	childrenNum
	.align 4
	.type	childrenNum, @object
	.size	childrenNum, 4
childrenNum:
	.zero	4
	.text
	.globl	printTab
	.type	printTab, @function
printTab:
.LFB6:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 32
	mov	DWORD PTR -20[rbp], edi
	mov	DWORD PTR -4[rbp], 0
	jmp	.L2
.L3:
	mov	edi, 9
	call	putchar@PLT
	add	DWORD PTR -4[rbp], 1
.L2:
	mov	eax, DWORD PTR -4[rbp]
	cmp	eax, DWORD PTR -20[rbp]
	jl	.L3
	nop
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	printTab, .-printTab
	.section	.rodata
.LC0:
	.string	"Error on ftok"
	.text
	.globl	createQueue
	.type	createQueue, @function
createQueue:
.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 -24[rbp], rdi
	mov	DWORD PTR -28[rbp], esi
	mov	rax, QWORD PTR -24[rbp]
	mov	rdi, rax
	call	unlink@PLT
	mov	rax, QWORD PTR -24[rbp]
	mov	esi, 511
	mov	rdi, rax
	call	creat@PLT
	mov	edx, DWORD PTR -28[rbp]
	mov	rax, QWORD PTR -24[rbp]
	mov	esi, edx
	mov	rdi, rax
	call	ftok@PLT
	mov	DWORD PTR -8[rbp], eax
	cmp	DWORD PTR -8[rbp], -1
	jne	.L5
	lea	rdi, .LC0[rip]
	call	perror@PLT
	mov	edi, 1
	call	exit@PLT
.L5:
	mov	eax, DWORD PTR -8[rbp]
	mov	esi, 1023
	mov	edi, eax
	call	msgget@PLT
	mov	DWORD PTR -4[rbp], eax
	mov	eax, DWORD PTR -4[rbp]
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	createQueue, .-createQueue
	.globl	sendMsg
	.type	sendMsg, @function
sendMsg:
.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, 304
	mov	DWORD PTR -276[rbp], edi
	mov	DWORD PTR -280[rbp], esi
	mov	QWORD PTR -288[rbp], rdx
	mov	DWORD PTR -292[rbp], ecx
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	eax, DWORD PTR -280[rbp]
	cdqe
	mov	QWORD PTR -272[rbp], rax
	mov	rax, QWORD PTR -288[rbp]
	lea	rdx, -272[rbp]
	add	rdx, 8
	mov	rsi, rax
	mov	rdi, rdx
	call	strcpy@PLT
	mov	eax, DWORD PTR -292[rbp]
	movsx	rdx, eax
	lea	rsi, -272[rbp]
	mov	eax, DWORD PTR -276[rbp]
	mov	ecx, 0
	mov	edi, eax
	call	msgsnd@PLT
	mov	rcx, QWORD PTR -8[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L9
	call	__stack_chk_fail@PLT
.L9:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.size	sendMsg, .-sendMsg
	.globl	sendMultipleMsg
	.type	sendMultipleMsg, @function
sendMultipleMsg:
.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, 48
	mov	DWORD PTR -20[rbp], edi
	mov	DWORD PTR -24[rbp], esi
	mov	QWORD PTR -32[rbp], rdx
	mov	DWORD PTR -36[rbp], ecx
	mov	DWORD PTR -40[rbp], r8d
	mov	DWORD PTR -4[rbp], 0
	jmp	.L11
.L14:
	mov	ecx, DWORD PTR -36[rbp]
	mov	rdx, QWORD PTR -32[rbp]
	mov	esi, DWORD PTR -24[rbp]
	mov	eax, DWORD PTR -20[rbp]
	mov	edi, eax
	call	sendMsg
	cmp	eax, -1
	jne	.L12
	mov	eax, -1
	jmp	.L13
.L12:
	add	DWORD PTR -4[rbp], 1
.L11:
	mov	eax, DWORD PTR -4[rbp]
	cmp	eax, DWORD PTR -40[rbp]
	jl	.L14
	mov	eax, 1
.L13:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE9:
	.size	sendMultipleMsg, .-sendMultipleMsg
	.globl	recvMsg
	.type	recvMsg, @function
recvMsg:
.LFB10:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 320
	mov	DWORD PTR -292[rbp], edi
	mov	DWORD PTR -296[rbp], esi
	mov	QWORD PTR -304[rbp], rdx
	mov	DWORD PTR -308[rbp], ecx
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	eax, DWORD PTR -308[rbp]
	cdqe
	lea	rdx, -272[rbp]
	lea	rcx, 8[rdx]
	mov	rdx, rax
	mov	esi, 0
	mov	rdi, rcx
	call	memset@PLT
	mov	eax, DWORD PTR -296[rbp]
	movsx	rcx, eax
	mov	eax, DWORD PTR -308[rbp]
	movsx	rdx, eax
	lea	rsi, -272[rbp]
	mov	eax, DWORD PTR -292[rbp]
	mov	r8d, 0
	mov	edi, eax
	call	msgrcv@PLT
	mov	DWORD PTR -276[rbp], eax
	lea	rax, -272[rbp]
	lea	rdx, 8[rax]
	mov	rax, QWORD PTR -304[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	strcpy@PLT
	mov	eax, DWORD PTR -276[rbp]
	mov	rdi, QWORD PTR -8[rbp]
	sub	rdi, QWORD PTR fs:40
	je	.L17
	call	__stack_chk_fail@PLT
.L17:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE10:
	.size	recvMsg, .-recvMsg
	.globl	updateChildrenAtLevel
	.type	updateChildrenAtLevel, @function
updateChildrenAtLevel:
.LFB11:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	mov	QWORD PTR -8[rbp], rdi
	mov	DWORD PTR -12[rbp], esi
	cmp	DWORD PTR -12[rbp], 0
	jne	.L19
	mov	eax, DWORD PTR -12[rbp]
	cdqe
	lea	rdx, 0[0+rax*4]
	mov	rax, QWORD PTR -8[rbp]
	add	rax, rdx
	mov	edx, DWORD PTR [rax]
	mov	eax, DWORD PTR -12[rbp]
	cdqe
	lea	rcx, 0[0+rax*4]
	mov	rax, QWORD PTR -8[rbp]
	add	rax, rcx
	add	edx, 1
	mov	DWORD PTR [rax], edx
	jmp	.L21
.L19:
	mov	eax, DWORD PTR -12[rbp]
	cdqe
	sal	rax, 2
	lea	rdx, -4[rax]
	mov	rax, QWORD PTR -8[rbp]
	add	rax, rdx
	mov	eax, DWORD PTR [rax]
	test	eax, eax
	je	.L21
	mov	eax, DWORD PTR -12[rbp]
	cdqe
	lea	rdx, 0[0+rax*4]
	mov	rax, QWORD PTR -8[rbp]
	add	rax, rdx
	mov	ecx, DWORD PTR [rax]
	mov	eax, DWORD PTR -12[rbp]
	cdqe
	sal	rax, 2
	lea	rdx, -4[rax]
	mov	rax, QWORD PTR -8[rbp]
	add	rax, rdx
	mov	edx, DWORD PTR [rax]
	mov	eax, DWORD PTR -12[rbp]
	cdqe
	lea	rsi, 0[0+rax*4]
	mov	rax, QWORD PTR -8[rbp]
	add	rax, rsi
	add	edx, ecx
	mov	DWORD PTR [rax], edx
.L21:
	nop
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE11:
	.size	updateChildrenAtLevel, .-updateChildrenAtLevel
	.section	.rodata
	.align 8
.LC1:
	.string	"[CHILD] Created at depth %d with type %d\n"
.LC2:
	.string	"[CHILD] Error on recv"
.LC3:
	.string	"[CHILD %d at depth %d]\n"
	.text
	.globl	childProcessRoutine
	.type	childProcessRoutine, @function
childProcessRoutine:
.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, 304
	mov	DWORD PTR -292[rbp], edi
	mov	DWORD PTR -296[rbp], esi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	eax, DWORD PTR -292[rbp]
	mov	DWORD PTR processLevel[rip], eax
	mov	QWORD PTR -272[rbp], 0
	mov	QWORD PTR -264[rbp], 0
	mov	QWORD PTR -256[rbp], 0
	mov	QWORD PTR -248[rbp], 0
	mov	QWORD PTR -240[rbp], 0
	mov	QWORD PTR -232[rbp], 0
	mov	QWORD PTR -224[rbp], 0
	mov	QWORD PTR -216[rbp], 0
	mov	QWORD PTR -208[rbp], 0
	mov	QWORD PTR -200[rbp], 0
	mov	QWORD PTR -192[rbp], 0
	mov	QWORD PTR -184[rbp], 0
	mov	QWORD PTR -176[rbp], 0
	mov	QWORD PTR -168[rbp], 0
	mov	QWORD PTR -160[rbp], 0
	mov	QWORD PTR -152[rbp], 0
	mov	QWORD PTR -144[rbp], 0
	mov	QWORD PTR -136[rbp], 0
	mov	QWORD PTR -128[rbp], 0
	mov	QWORD PTR -120[rbp], 0
	mov	QWORD PTR -112[rbp], 0
	mov	QWORD PTR -104[rbp], 0
	mov	QWORD PTR -96[rbp], 0
	mov	QWORD PTR -88[rbp], 0
	mov	QWORD PTR -80[rbp], 0
	mov	QWORD PTR -72[rbp], 0
	mov	QWORD PTR -64[rbp], 0
	mov	QWORD PTR -56[rbp], 0
	mov	QWORD PTR -48[rbp], 0
	mov	QWORD PTR -40[rbp], 0
	mov	QWORD PTR -32[rbp], 0
	mov	QWORD PTR -24[rbp], 0
	mov	eax, DWORD PTR -292[rbp]
	add	eax, 1
	mov	DWORD PTR -276[rbp], eax
	mov	DWORD PTR -280[rbp], 0
	mov	edx, DWORD PTR -276[rbp]
	mov	eax, DWORD PTR -292[rbp]
	mov	esi, eax
	lea	rdi, .LC1[rip]
	mov	eax, 0
	call	printf@PLT
	jmp	.L23
.L29:
	lea	rax, -272[rbp]
	mov	edx, 256
	mov	esi, 0
	mov	rdi, rax
	call	memset@PLT
	lea	rdx, -272[rbp]
	mov	esi, DWORD PTR -276[rbp]
	mov	eax, DWORD PTR -296[rbp]
	mov	ecx, 256
	mov	edi, eax
	call	recvMsg
	cmp	eax, -1
	jne	.L24
	lea	rdi, .LC2[rip]
	call	perror@PLT
	jmp	.L23
.L24:
	movzx	eax, BYTE PTR -272[rbp]
	movsx	eax, al
	cmp	eax, 113
	je	.L25
	cmp	eax, 113
	jg	.L23
	cmp	eax, 112
	je	.L26
	cmp	eax, 112
	jg	.L23
	cmp	eax, 99
	je	.L27
	cmp	eax, 107
	je	.L28
	jmp	.L23
.L27:
	mov	eax, DWORD PTR -292[rbp]
	lea	edx, 1[rax]
	mov	eax, DWORD PTR -296[rbp]
	mov	esi, eax
	mov	edi, edx
	call	createChild
	jmp	.L23
.L28:
	mov	DWORD PTR -280[rbp], 1
	jmp	.L23
.L26:
	mov	eax, DWORD PTR -292[rbp]
	mov	edi, eax
	call	printTab
	call	getpid@PLT
	mov	ecx, eax
	mov	eax, DWORD PTR -292[rbp]
	mov	edx, eax
	mov	esi, ecx
	lea	rdi, .LC3[rip]
	mov	eax, 0
	call	printf@PLT
	jmp	.L23
.L25:
	mov	DWORD PTR -280[rbp], 1
	nop
.L23:
	cmp	DWORD PTR -280[rbp], 0
	je	.L29
	mov	edi, 0
	call	exit@PLT
	.cfi_endproc
.LFE12:
	.size	childProcessRoutine, .-childProcessRoutine
	.globl	createChild
	.type	createChild, @function
createChild:
.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, 32
	mov	DWORD PTR -20[rbp], edi
	mov	DWORD PTR -24[rbp], esi
	call	fork@PLT
	mov	DWORD PTR -4[rbp], eax
	cmp	DWORD PTR -4[rbp], 0
	jne	.L32
	mov	edx, DWORD PTR -24[rbp]
	mov	eax, DWORD PTR -20[rbp]
	mov	esi, edx
	mov	edi, eax
	call	childProcessRoutine
	mov	edi, 0
	call	exit@PLT
.L32:
	mov	eax, DWORD PTR -4[rbp]
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE13:
	.size	createChild, .-createChild
	.section	.rodata
	.align 8
.LC4:
	.string	"[MASTER] Created at depth %d with type %d\n"
.LC5:
	.string	"[MASTER] Error on recv"
.LC6:
	.string	"c"
.LC7:
	.string	"[MASTER] Error on sendMsg"
.LC8:
	.string	"k"
.LC9:
	.string	"p"
.LC10:
	.string	"q"
	.text
	.globl	masterProcessRoutine
	.type	masterProcessRoutine, @function
masterProcessRoutine:
.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, 304
	mov	DWORD PTR -292[rbp], edi
	mov	DWORD PTR -296[rbp], esi
	mov	DWORD PTR -300[rbp], edx
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	eax, DWORD PTR -292[rbp]
	mov	DWORD PTR processLevel[rip], eax
	mov	QWORD PTR -272[rbp], 0
	mov	QWORD PTR -264[rbp], 0
	mov	QWORD PTR -256[rbp], 0
	mov	QWORD PTR -248[rbp], 0
	mov	QWORD PTR -240[rbp], 0
	mov	QWORD PTR -232[rbp], 0
	mov	QWORD PTR -224[rbp], 0
	mov	QWORD PTR -216[rbp], 0
	mov	QWORD PTR -208[rbp], 0
	mov	QWORD PTR -200[rbp], 0
	mov	QWORD PTR -192[rbp], 0
	mov	QWORD PTR -184[rbp], 0
	mov	QWORD PTR -176[rbp], 0
	mov	QWORD PTR -168[rbp], 0
	mov	QWORD PTR -160[rbp], 0
	mov	QWORD PTR -152[rbp], 0
	mov	QWORD PTR -144[rbp], 0
	mov	QWORD PTR -136[rbp], 0
	mov	QWORD PTR -128[rbp], 0
	mov	QWORD PTR -120[rbp], 0
	mov	QWORD PTR -112[rbp], 0
	mov	QWORD PTR -104[rbp], 0
	mov	QWORD PTR -96[rbp], 0
	mov	QWORD PTR -88[rbp], 0
	mov	QWORD PTR -80[rbp], 0
	mov	QWORD PTR -72[rbp], 0
	mov	QWORD PTR -64[rbp], 0
	mov	QWORD PTR -56[rbp], 0
	mov	QWORD PTR -48[rbp], 0
	mov	QWORD PTR -40[rbp], 0
	mov	QWORD PTR -32[rbp], 0
	mov	QWORD PTR -24[rbp], 0
	mov	eax, DWORD PTR -292[rbp]
	add	eax, 1
	mov	DWORD PTR -276[rbp], eax
	mov	edx, DWORD PTR -276[rbp]
	mov	eax, DWORD PTR -292[rbp]
	mov	esi, eax
	lea	rdi, .LC4[rip]
	mov	eax, 0
	call	printf@PLT
.L49:
	lea	rax, -272[rbp]
	mov	edx, 256
	mov	esi, 0
	mov	rdi, rax
	call	memset@PLT
	lea	rdx, -272[rbp]
	mov	esi, DWORD PTR -276[rbp]
	mov	eax, DWORD PTR -296[rbp]
	mov	ecx, 256
	mov	edi, eax
	call	recvMsg
	cmp	eax, -1
	jne	.L35
	lea	rdi, .LC5[rip]
	call	perror@PLT
	jmp	.L36
.L35:
	movzx	eax, BYTE PTR -272[rbp]
	movsx	eax, al
	sub	eax, 99
	cmp	eax, 14
	ja	.L37
	mov	eax, eax
	lea	rdx, 0[0+rax*4]
	lea	rax, .L39[rip]
	mov	eax, DWORD PTR [rdx+rax]
	cdqe
	lea	rdx, .L39[rip]
	add	rax, rdx
	notrack jmp	rax
	.section	.rodata
	.align 4
	.align 4
.L39:
	.long	.L43-.L39
	.long	.L37-.L39
	.long	.L37-.L39
	.long	.L37-.L39
	.long	.L37-.L39
	.long	.L37-.L39
	.long	.L37-.L39
	.long	.L37-.L39
	.long	.L42-.L39
	.long	.L37-.L39
	.long	.L37-.L39
	.long	.L41-.L39
	.long	.L37-.L39
	.long	.L40-.L39
	.long	.L38-.L39
	.text
.L43:
	cmp	DWORD PTR -276[rbp], 1
	jne	.L51
	mov	edx, DWORD PTR -300[rbp]
	mov	eax, DWORD PTR -292[rbp]
	mov	esi, edx
	mov	edi, eax
	call	createChild
	jmp	.L51
.L41:
	mov	esi, DWORD PTR -276[rbp]
	mov	eax, DWORD PTR -300[rbp]
	mov	ecx, 1
	lea	rdx, .LC6[rip]
	mov	edi, eax
	call	sendMsg
	cmp	eax, -1
	jne	.L52
	lea	rdi, .LC7[rip]
	call	perror@PLT
	jmp	.L36
.L42:
	mov	esi, DWORD PTR -276[rbp]
	mov	eax, DWORD PTR -300[rbp]
	mov	ecx, 1
	lea	rdx, .LC8[rip]
	mov	edi, eax
	call	sendMsg
	cmp	eax, -1
	jne	.L53
	lea	rdi, .LC7[rip]
	call	perror@PLT
	jmp	.L36
.L40:
	mov	esi, DWORD PTR -276[rbp]
	mov	eax, DWORD PTR -300[rbp]
	mov	ecx, 1
	lea	rdx, .LC9[rip]
	mov	edi, eax
	call	sendMsg
	cmp	eax, -1
	jne	.L54
	lea	rdi, .LC7[rip]
	call	perror@PLT
	jmp	.L36
.L38:
	mov	esi, DWORD PTR -276[rbp]
	mov	eax, DWORD PTR -300[rbp]
	mov	ecx, 1
	lea	rdx, .LC10[rip]
	mov	edi, eax
	call	sendMsg
	cmp	eax, -1
	jne	.L55
	lea	rdi, .LC7[rip]
	call	perror@PLT
	jmp	.L36
.L51:
	nop
	jmp	.L37
.L52:
	nop
	jmp	.L37
.L53:
	nop
	jmp	.L37
.L54:
	nop
	jmp	.L37
.L55:
	nop
.L37:
	mov	rax, QWORD PTR stdout[rip]
	mov	rdi, rax
	call	fflush@PLT
.L36:
	jmp	.L49
	.cfi_endproc
.LFE14:
	.size	masterProcessRoutine, .-masterProcessRoutine
	.section	.rodata
.LC11:
	.string	"/tmp/masterQueue"
.LC12:
	.string	"/tmp/childrenQueue"
.LC13:
	.string	"Master %d | Children %d\n"
.LC14:
	.string	"> "
.LC15:
	.string	"Error on read"
.LC16:
	.string	"Error on c command"
.LC17:
	.string	"n"
.LC18:
	.string	"Error on k command"
	.text
	.globl	main
	.type	main, @function
main:
.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, 400
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	lea	rax, .LC11[rip]
	mov	QWORD PTR -352[rbp], rax
	lea	rax, .LC12[rip]
	mov	QWORD PTR -344[rbp], rax
	mov	rax, QWORD PTR -352[rbp]
	mov	esi, 0
	mov	rdi, rax
	call	createQueue
	mov	DWORD PTR -376[rbp], eax
	mov	rax, QWORD PTR -344[rbp]
	mov	esi, 0
	mov	rdi, rax
	call	createQueue
	mov	DWORD PTR -372[rbp], eax
	mov	edx, DWORD PTR -372[rbp]
	mov	eax, DWORD PTR -376[rbp]
	mov	esi, eax
	lea	rdi, .LC13[rip]
	mov	eax, 0
	call	printf@PLT
	mov	QWORD PTR -336[rbp], 0
	mov	QWORD PTR -328[rbp], 0
	mov	DWORD PTR -320[rbp], 0
	mov	DWORD PTR -396[rbp], 0
	jmp	.L57
.L60:
	call	fork@PLT
	mov	DWORD PTR -356[rbp], eax
	cmp	DWORD PTR -356[rbp], 0
	jne	.L58
	mov	edx, DWORD PTR -372[rbp]
	mov	ecx, DWORD PTR -376[rbp]
	mov	eax, DWORD PTR -396[rbp]
	mov	esi, ecx
	mov	edi, eax
	call	masterProcessRoutine
	jmp	.L59
.L58:
	mov	eax, DWORD PTR -396[rbp]
	cdqe
	mov	edx, DWORD PTR -356[rbp]
	mov	DWORD PTR -336[rbp+rax*4], edx
.L59:
	add	DWORD PTR -396[rbp], 1
.L57:
	cmp	DWORD PTR -396[rbp], 4
	jle	.L60
	mov	edi, 1
	call	sleep@PLT
	mov	DWORD PTR -392[rbp], 1
	mov	QWORD PTR -272[rbp], 0
	mov	QWORD PTR -264[rbp], 0
	mov	QWORD PTR -256[rbp], 0
	mov	QWORD PTR -248[rbp], 0
	mov	QWORD PTR -240[rbp], 0
	mov	QWORD PTR -232[rbp], 0
	mov	QWORD PTR -224[rbp], 0
	mov	QWORD PTR -216[rbp], 0
	mov	QWORD PTR -208[rbp], 0
	mov	QWORD PTR -200[rbp], 0
	mov	QWORD PTR -192[rbp], 0
	mov	QWORD PTR -184[rbp], 0
	mov	QWORD PTR -176[rbp], 0
	mov	QWORD PTR -168[rbp], 0
	mov	QWORD PTR -160[rbp], 0
	mov	QWORD PTR -152[rbp], 0
	mov	QWORD PTR -144[rbp], 0
	mov	QWORD PTR -136[rbp], 0
	mov	QWORD PTR -128[rbp], 0
	mov	QWORD PTR -120[rbp], 0
	mov	QWORD PTR -112[rbp], 0
	mov	QWORD PTR -104[rbp], 0
	mov	QWORD PTR -96[rbp], 0
	mov	QWORD PTR -88[rbp], 0
	mov	QWORD PTR -80[rbp], 0
	mov	QWORD PTR -72[rbp], 0
	mov	QWORD PTR -64[rbp], 0
	mov	QWORD PTR -56[rbp], 0
	mov	QWORD PTR -48[rbp], 0
	mov	QWORD PTR -40[rbp], 0
	mov	QWORD PTR -32[rbp], 0
	mov	QWORD PTR -24[rbp], 0
	mov	QWORD PTR -304[rbp], 0
	mov	QWORD PTR -296[rbp], 0
	mov	DWORD PTR -288[rbp], 0
	jmp	.L61
.L78:
	lea	rax, -272[rbp]
	mov	edx, 256
	mov	esi, 0
	mov	rdi, rax
	call	memset@PLT
	lea	rdi, .LC14[rip]
	mov	eax, 0
	call	printf@PLT
	mov	rax, QWORD PTR stdout[rip]
	mov	rdi, rax
	call	fflush@PLT
	lea	rax, -272[rbp]
	mov	edx, 256
	mov	rsi, rax
	mov	edi, 0
	call	read@PLT
	mov	DWORD PTR -368[rbp], eax
	cmp	DWORD PTR -368[rbp], -1
	jne	.L62
	lea	rdi, .LC15[rip]
	call	perror@PLT
	jmp	.L61
.L62:
	cmp	DWORD PTR -368[rbp], 0
	jne	.L63
	jmp	.L61
.L63:
	lea	rax, -272[rbp]
	add	rax, 1
	mov	rdi, rax
	call	atoi@PLT
	mov	DWORD PTR -364[rbp], eax
	mov	eax, DWORD PTR -364[rbp]
	add	eax, 1
	mov	DWORD PTR -360[rbp], eax
	movzx	eax, BYTE PTR -272[rbp]
	movsx	eax, al
	cmp	eax, 113
	je	.L64
	cmp	eax, 113
	jg	.L65
	cmp	eax, 112
	je	.L66
	cmp	eax, 112
	jg	.L65
	cmp	eax, 99
	je	.L67
	cmp	eax, 107
	je	.L68
	jmp	.L65
.L67:
	cmp	DWORD PTR -360[rbp], 1
	jne	.L69
	mov	esi, DWORD PTR -360[rbp]
	mov	eax, DWORD PTR -376[rbp]
	mov	ecx, 1
	lea	rdx, .LC6[rip]
	mov	edi, eax
	call	sendMsg
	cmp	eax, -1
	jne	.L69
	lea	rdi, .LC16[rip]
	call	perror@PLT
	jmp	.L61
.L69:
	cmp	DWORD PTR -360[rbp], 1
	jle	.L70
	mov	eax, DWORD PTR -364[rbp]
	sub	eax, 1
	cdqe
	mov	edx, DWORD PTR -304[rbp+rax*4]
	mov	eax, DWORD PTR -360[rbp]
	lea	esi, -1[rax]
	mov	eax, DWORD PTR -376[rbp]
	mov	r8d, edx
	mov	ecx, 1
	lea	rdx, .LC17[rip]
	mov	edi, eax
	call	sendMultipleMsg
	cmp	eax, -1
	jne	.L70
	lea	rdi, .LC16[rip]
	call	perror@PLT
	jmp	.L61
.L70:
	mov	edx, DWORD PTR -364[rbp]
	lea	rax, -304[rbp]
	mov	esi, edx
	mov	rdi, rax
	call	updateChildrenAtLevel
	jmp	.L65
.L68:
	mov	eax, DWORD PTR -364[rbp]
	cdqe
	mov	edx, DWORD PTR -304[rbp+rax*4]
	mov	esi, DWORD PTR -360[rbp]
	mov	eax, DWORD PTR -376[rbp]
	mov	r8d, edx
	mov	ecx, 1
	lea	rdx, .LC8[rip]
	mov	edi, eax
	call	sendMultipleMsg
	cmp	eax, -1
	jne	.L71
	lea	rdi, .LC18[rip]
	call	perror@PLT
	jmp	.L61
.L71:
	mov	eax, DWORD PTR -364[rbp]
	cdqe
	mov	DWORD PTR -304[rbp+rax*4], 0
	jmp	.L65
.L66:
	mov	DWORD PTR -388[rbp], 1
	jmp	.L72
.L74:
	mov	eax, DWORD PTR -388[rbp]
	sub	eax, 1
	cdqe
	mov	edx, DWORD PTR -304[rbp+rax*4]
	mov	esi, DWORD PTR -388[rbp]
	mov	eax, DWORD PTR -376[rbp]
	mov	r8d, edx
	mov	ecx, 1
	lea	rdx, .LC9[rip]
	mov	edi, eax
	call	sendMultipleMsg
	cmp	eax, -1
	jne	.L73
	lea	rdi, .LC16[rip]
	call	perror@PLT
.L73:
	add	DWORD PTR -388[rbp], 1
.L72:
	cmp	DWORD PTR -388[rbp], 5
	jle	.L74
	jmp	.L65
.L64:
	mov	DWORD PTR -384[rbp], 1
	jmp	.L75
.L77:
	mov	eax, DWORD PTR -384[rbp]
	sub	eax, 1
	cdqe
	mov	edx, DWORD PTR -304[rbp+rax*4]
	mov	esi, DWORD PTR -384[rbp]
	mov	eax, DWORD PTR -376[rbp]
	mov	r8d, edx
	mov	ecx, 1
	lea	rdx, .LC10[rip]
	mov	edi, eax
	call	sendMultipleMsg
	cmp	eax, -1
	jne	.L76
	lea	rdi, .LC16[rip]
	call	perror@PLT
.L76:
	add	DWORD PTR -384[rbp], 1
.L75:
	cmp	DWORD PTR -384[rbp], 5
	jle	.L77
	mov	DWORD PTR -392[rbp], 0
	nop
.L65:
	mov	edi, 1
	call	sleep@PLT
.L61:
	cmp	DWORD PTR -392[rbp], 0
	jne	.L78
	mov	DWORD PTR -380[rbp], 0
	jmp	.L79
.L80:
	mov	eax, DWORD PTR -380[rbp]
	cdqe
	mov	eax, DWORD PTR -336[rbp+rax*4]
	mov	esi, 15
	mov	edi, eax
	call	kill@PLT
	add	DWORD PTR -380[rbp], 1
.L79:
	cmp	DWORD PTR -380[rbp], 4
	jle	.L80
	nop
.L81:
	mov	edi, 0
	call	wait@PLT
	test	eax, eax
	jg	.L81
	mov	eax, 0
	mov	rcx, QWORD PTR -8[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L83
	call	__stack_chk_fail@PLT
.L83:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE15:
	.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	"1263981.c"
	.text
	.global	processLevel
	.bss
	.align	2
	.type	processLevel, %object
	.size	processLevel, 4
processLevel:
	.space	4
	.global	childrenNum
	.align	2
	.type	childrenNum, %object
	.size	childrenNum, 4
childrenNum:
	.space	4
	.text
	.align	2
	.global	printTab
	.syntax unified
	.arm
	.fpu softvfp
	.type	printTab, %function
printTab:
	@ 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]
	mov	r3, #0
	str	r3, [fp, #-8]
	b	.L2
.L3:
	mov	r0, #9
	bl	putchar
	ldr	r3, [fp, #-8]
	add	r3, r3, #1
	str	r3, [fp, #-8]
.L2:
	ldr	r2, [fp, #-8]
	ldr	r3, [fp, #-16]
	cmp	r2, r3
	blt	.L3
	nop
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
	.size	printTab, .-printTab
	.section	.rodata
	.align	2
.LC0:
	.ascii	"Error on ftok\000"
	.text
	.align	2
	.global	createQueue
	.syntax unified
	.arm
	.fpu softvfp
	.type	createQueue, %function
createQueue:
	@ 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	r0, [fp, #-16]
	bl	unlink
	ldr	r1, .L7
	ldr	r0, [fp, #-16]
	bl	creat
	ldr	r1, [fp, #-20]
	ldr	r0, [fp, #-16]
	bl	ftok
	str	r0, [fp, #-12]
	ldr	r3, [fp, #-12]
	cmn	r3, #1
	bne	.L5
	ldr	r0, .L7+4
	bl	perror
	mov	r0, #1
	bl	exit
.L5:
	ldr	r1, .L7+8
	ldr	r0, [fp, #-12]
	bl	msgget
	str	r0, [fp, #-8]
	ldr	r3, [fp, #-8]
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L8:
	.align	2
.L7:
	.word	511
	.word	.LC0
	.word	1023
	.size	createQueue, .-createQueue
	.section	.rodata
	.align	2
.LC1:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	sendMsg
	.syntax unified
	.arm
	.fpu softvfp
	.type	sendMsg, %function
sendMsg:
	@ args = 0, pretend = 0, frame = 280
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #280
	str	r0, [fp, #-272]
	str	r1, [fp, #-276]
	str	r2, [fp, #-280]
	str	r3, [fp, #-284]
	ldr	r3, .L12
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	ldr	r3, [fp, #-276]
	str	r3, [fp, #-268]
	sub	r3, fp, #268
	add	r3, r3, #4
	ldr	r1, [fp, #-280]
	mov	r0, r3
	bl	strcpy
	ldr	r2, [fp, #-284]
	sub	r1, fp, #268
	mov	r3, #0
	ldr	r0, [fp, #-272]
	bl	msgsnd
	mov	r3, r0
	ldr	r2, .L12
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L11
	bl	__stack_chk_fail
.L11:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L13:
	.align	2
.L12:
	.word	.LC1
	.size	sendMsg, .-sendMsg
	.align	2
	.global	sendMultipleMsg
	.syntax unified
	.arm
	.fpu softvfp
	.type	sendMultipleMsg, %function
sendMultipleMsg:
	@ args = 4, 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, #-16]
	str	r1, [fp, #-20]
	str	r2, [fp, #-24]
	str	r3, [fp, #-28]
	mov	r3, #0
	str	r3, [fp, #-8]
	b	.L15
.L18:
	ldr	r3, [fp, #-28]
	ldr	r2, [fp, #-24]
	ldr	r1, [fp, #-20]
	ldr	r0, [fp, #-16]
	bl	sendMsg
	mov	r3, r0
	cmn	r3, #1
	bne	.L16
	mvn	r3, #0
	b	.L17
.L16:
	ldr	r3, [fp, #-8]
	add	r3, r3, #1
	str	r3, [fp, #-8]
.L15:
	ldr	r2, [fp, #-8]
	ldr	r3, [fp, #4]
	cmp	r2, r3
	blt	.L18
	mov	r3, #1
.L17:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
	.size	sendMultipleMsg, .-sendMultipleMsg
	.section	.rodata
	.align	2
.LC2:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	recvMsg
	.syntax unified
	.arm
	.fpu softvfp
	.type	recvMsg, %function
recvMsg:
	@ args = 0, pretend = 0, frame = 288
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #296
	str	r0, [fp, #-280]
	str	r1, [fp, #-284]
	str	r2, [fp, #-288]
	str	r3, [fp, #-292]
	ldr	r3, .L22
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	ldr	r2, [fp, #-292]
	sub	r3, fp, #268
	add	r3, r3, #4
	mov	r1, #0
	mov	r0, r3
	bl	memset
	ldr	r2, [fp, #-292]
	sub	r1, fp, #268
	mov	r3, #0
	str	r3, [sp]
	ldr	r3, [fp, #-284]
	ldr	r0, [fp, #-280]
	bl	msgrcv
	str	r0, [fp, #-272]
	sub	r3, fp, #268
	add	r3, r3, #4
	mov	r1, r3
	ldr	r0, [fp, #-288]
	bl	strcpy
	ldr	r3, [fp, #-272]
	ldr	r2, .L22
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L21
	bl	__stack_chk_fail
.L21:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L23:
	.align	2
.L22:
	.word	.LC2
	.size	recvMsg, .-recvMsg
	.align	2
	.global	updateChildrenAtLevel
	.syntax unified
	.arm
	.fpu softvfp
	.type	updateChildrenAtLevel, %function
updateChildrenAtLevel:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 1, uses_anonymous_args = 0
	@ link register save eliminated.
	str	fp, [sp, #-4]!
	add	fp, sp, #0
	sub	sp, sp, #12
	str	r0, [fp, #-8]
	str	r1, [fp, #-12]
	ldr	r3, [fp, #-12]
	cmp	r3, #0
	bne	.L25
	ldr	r3, [fp, #-12]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-8]
	add	r3, r2, r3
	ldr	r2, [r3]
	ldr	r3, [fp, #-12]
	lsl	r3, r3, #2
	ldr	r1, [fp, #-8]
	add	r3, r1, r3
	add	r2, r2, #1
	str	r2, [r3]
	b	.L27
.L25:
	ldr	r3, [fp, #-12]
	sub	r3, r3, #-1073741823
	lsl	r3, r3, #2
	ldr	r2, [fp, #-8]
	add	r3, r2, r3
	ldr	r3, [r3]
	cmp	r3, #0
	beq	.L27
	ldr	r3, [fp, #-12]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-8]
	add	r3, r2, r3
	ldr	r1, [r3]
	ldr	r3, [fp, #-12]
	sub	r3, r3, #-1073741823
	lsl	r3, r3, #2
	ldr	r2, [fp, #-8]
	add	r3, r2, r3
	ldr	r2, [r3]
	ldr	r3, [fp, #-12]
	lsl	r3, r3, #2
	ldr	r0, [fp, #-8]
	add	r3, r0, r3
	add	r2, r1, r2
	str	r2, [r3]
.L27:
	nop
	add	sp, fp, #0
	@ sp needed
	ldr	fp, [sp], #4
	bx	lr
	.size	updateChildrenAtLevel, .-updateChildrenAtLevel
	.section	.rodata
	.align	2
.LC3:
	.ascii	"[CHILD] Created at depth %d with type %d\012\000"
	.align	2
.LC4:
	.ascii	"[CHILD] Error on recv\000"
	.align	2
.LC5:
	.ascii	"[CHILD %d at depth %d]\012\000"
	.align	2
.LC6:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	childProcessRoutine
	.syntax unified
	.arm
	.fpu softvfp
	.type	childProcessRoutine, %function
childProcessRoutine:
	@ args = 0, pretend = 0, frame = 280
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #280
	str	r0, [fp, #-280]
	str	r1, [fp, #-284]
	ldr	r3, .L38
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	ldr	r2, .L38+4
	ldr	r3, [fp, #-280]
	str	r3, [r2]
	mov	r3, #0
	str	r3, [fp, #-264]
	sub	r3, fp, #260
	mov	r2, #252
	mov	r1, #0
	mov	r0, r3
	bl	memset
	ldr	r3, [fp, #-280]
	add	r3, r3, #1
	str	r3, [fp, #-268]
	mov	r3, #0
	str	r3, [fp, #-272]
	ldr	r2, [fp, #-268]
	ldr	r1, [fp, #-280]
	ldr	r0, .L38+8
	bl	printf
	b	.L29
.L36:
	sub	r3, fp, #264
	mov	r2, #256
	mov	r1, #0
	mov	r0, r3
	bl	memset
	sub	r2, fp, #264
	mov	r3, #256
	ldr	r1, [fp, #-268]
	ldr	r0, [fp, #-284]
	bl	recvMsg
	mov	r3, r0
	cmn	r3, #1
	bne	.L30
	ldr	r0, .L38+12
	bl	perror
	b	.L29
.L30:
	ldrb	r3, [fp, #-264]	@ zero_extendqisi2
	sub	r3, r3, #99
	cmp	r3, #14
	ldrls	pc, [pc, r3, asl #2]
	b	.L29
.L32:
	.word	.L35
	.word	.L29
	.word	.L29
	.word	.L29
	.word	.L29
	.word	.L29
	.word	.L29
	.word	.L29
	.word	.L34
	.word	.L29
	.word	.L29
	.word	.L29
	.word	.L29
	.word	.L33
	.word	.L31
.L35:
	ldr	r3, [fp, #-280]
	add	r3, r3, #1
	ldr	r1, [fp, #-284]
	mov	r0, r3
	bl	createChild
	b	.L29
.L34:
	mov	r3, #1
	str	r3, [fp, #-272]
	b	.L29
.L33:
	ldr	r0, [fp, #-280]
	bl	printTab
	bl	getpid
	mov	r3, r0
	ldr	r2, [fp, #-280]
	mov	r1, r3
	ldr	r0, .L38+16
	bl	printf
	b	.L29
.L31:
	mov	r3, #1
	str	r3, [fp, #-272]
	nop
.L29:
	ldr	r3, [fp, #-272]
	cmp	r3, #0
	beq	.L36
	mov	r0, #0
	bl	exit
.L39:
	.align	2
.L38:
	.word	.LC6
	.word	processLevel
	.word	.LC3
	.word	.LC4
	.word	.LC5
	.size	childProcessRoutine, .-childProcessRoutine
	.align	2
	.global	createChild
	.syntax unified
	.arm
	.fpu softvfp
	.type	createChild, %function
createChild:
	@ 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	fork
	mov	r3, r0
	str	r3, [fp, #-8]
	ldr	r3, [fp, #-8]
	cmp	r3, #0
	bne	.L41
	ldr	r1, [fp, #-20]
	ldr	r0, [fp, #-16]
	bl	childProcessRoutine
	mov	r0, #0
	bl	exit
.L41:
	ldr	r3, [fp, #-8]
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
	.size	createChild, .-createChild
	.section	.rodata
	.align	2
.LC7:
	.ascii	"[MASTER] Created at depth %d with type %d\012\000"
	.align	2
.LC8:
	.ascii	"[MASTER] Error on recv\000"
	.align	2
.LC9:
	.ascii	"c\000"
	.align	2
.LC10:
	.ascii	"[MASTER] Error on sendMsg\000"
	.align	2
.LC11:
	.ascii	"k\000"
	.align	2
.LC12:
	.ascii	"p\000"
	.align	2
.LC13:
	.ascii	"q\000"
	.align	2
.LC14:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	masterProcessRoutine
	.syntax unified
	.arm
	.fpu softvfp
	.type	masterProcessRoutine, %function
masterProcessRoutine:
	@ args = 0, pretend = 0, frame = 280
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #280
	str	r0, [fp, #-272]
	str	r1, [fp, #-276]
	str	r2, [fp, #-280]
	ldr	r3, .L65
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	ldr	r2, .L65+4
	ldr	r3, [fp, #-272]
	str	r3, [r2]
	mov	r3, #0
	str	r3, [fp, #-264]
	sub	r3, fp, #260
	mov	r2, #252
	mov	r1, #0
	mov	r0, r3
	bl	memset
	ldr	r3, [fp, #-272]
	add	r3, r3, #1
	str	r3, [fp, #-268]
	ldr	r2, [fp, #-268]
	ldr	r1, [fp, #-272]
	ldr	r0, .L65+8
	bl	printf
.L58:
	sub	r3, fp, #264
	mov	r2, #256
	mov	r1, #0
	mov	r0, r3
	bl	memset
	sub	r2, fp, #264
	mov	r3, #256
	ldr	r1, [fp, #-268]
	ldr	r0, [fp, #-276]
	bl	recvMsg
	mov	r3, r0
	cmn	r3, #1
	bne	.L44
	ldr	r0, .L65+12
	bl	perror
	b	.L45
.L44:
	ldrb	r3, [fp, #-264]	@ zero_extendqisi2
	sub	r3, r3, #99
	cmp	r3, #14
	ldrls	pc, [pc, r3, asl #2]
	b	.L46
.L48:
	.word	.L52
	.word	.L46
	.word	.L46
	.word	.L46
	.word	.L46
	.word	.L46
	.word	.L46
	.word	.L46
	.word	.L51
	.word	.L46
	.word	.L46
	.word	.L50
	.word	.L46
	.word	.L49
	.word	.L47
.L52:
	ldr	r3, [fp, #-268]
	cmp	r3, #1
	bne	.L60
	ldr	r1, [fp, #-280]
	ldr	r0, [fp, #-272]
	bl	createChild
	b	.L60
.L50:
	mov	r3, #1
	ldr	r2, .L65+16
	ldr	r1, [fp, #-268]
	ldr	r0, [fp, #-280]
	bl	sendMsg
	mov	r3, r0
	cmn	r3, #1
	bne	.L61
	ldr	r0, .L65+20
	bl	perror
	b	.L45
.L51:
	mov	r3, #1
	ldr	r2, .L65+24
	ldr	r1, [fp, #-268]
	ldr	r0, [fp, #-280]
	bl	sendMsg
	mov	r3, r0
	cmn	r3, #1
	bne	.L62
	ldr	r0, .L65+20
	bl	perror
	b	.L45
.L49:
	mov	r3, #1
	ldr	r2, .L65+28
	ldr	r1, [fp, #-268]
	ldr	r0, [fp, #-280]
	bl	sendMsg
	mov	r3, r0
	cmn	r3, #1
	bne	.L63
	ldr	r0, .L65+20
	bl	perror
	b	.L45
.L47:
	mov	r3, #1
	ldr	r2, .L65+32
	ldr	r1, [fp, #-268]
	ldr	r0, [fp, #-280]
	bl	sendMsg
	mov	r3, r0
	cmn	r3, #1
	bne	.L64
	ldr	r0, .L65+20
	bl	perror
	b	.L45
.L60:
	nop
	b	.L46
.L61:
	nop
	b	.L46
.L62:
	nop
	b	.L46
.L63:
	nop
	b	.L46
.L64:
	nop
.L46:
	ldr	r3, .L65+36
	ldr	r3, [r3]
	mov	r0, r3
	bl	fflush
.L45:
	b	.L58
.L66:
	.align	2
.L65:
	.word	.LC14
	.word	processLevel
	.word	.LC7
	.word	.LC8
	.word	.LC9
	.word	.LC10
	.word	.LC11
	.word	.LC12
	.word	.LC13
	.word	stdout
	.size	masterProcessRoutine, .-masterProcessRoutine
	.section	.rodata
	.align	2
.LC15:
	.ascii	"/tmp/masterQueue\000"
	.align	2
.LC16:
	.ascii	"/tmp/childrenQueue\000"
	.align	2
.LC17:
	.ascii	"Master %d | Children %d\012\000"
	.align	2
.LC18:
	.ascii	"> \000"
	.align	2
.LC19:
	.ascii	"Error on read\000"
	.align	2
.LC20:
	.ascii	"Error on c command\000"
	.align	2
.LC21:
	.ascii	"n\000"
	.align	2
.LC22:
	.ascii	"Error on k command\000"
	.align	2
.LC23:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 352
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #360
	ldr	r3, .L96
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	ldr	r3, .L96+4
	str	r3, [fp, #-336]
	ldr	r3, .L96+8
	str	r3, [fp, #-332]
	mov	r1, #0
	ldr	r0, [fp, #-336]
	bl	createQueue
	str	r0, [fp, #-328]
	mov	r1, #0
	ldr	r0, [fp, #-332]
	bl	createQueue
	str	r0, [fp, #-324]
	ldr	r2, [fp, #-324]
	ldr	r1, [fp, #-328]
	ldr	r0, .L96+12
	bl	printf
	sub	r3, fp, #304
	mov	r2, #0
	str	r2, [r3]
	str	r2, [r3, #4]
	str	r2, [r3, #8]
	str	r2, [r3, #12]
	str	r2, [r3, #16]
	mov	r3, #0
	str	r3, [fp, #-356]
	b	.L68
.L71:
	bl	fork
	mov	r3, r0
	str	r3, [fp, #-308]
	ldr	r3, [fp, #-308]
	cmp	r3, #0
	bne	.L69
	ldr	r2, [fp, #-324]
	ldr	r1, [fp, #-328]
	ldr	r0, [fp, #-356]
	bl	masterProcessRoutine
	b	.L70
.L69:
	ldr	r3, [fp, #-356]
	lsl	r3, r3, #2
	sub	r2, fp, #4
	add	r3, r2, r3
	ldr	r2, [fp, #-308]
	str	r2, [r3, #-300]
.L70:
	ldr	r3, [fp, #-356]
	add	r3, r3, #1
	str	r3, [fp, #-356]
.L68:
	ldr	r3, [fp, #-356]
	cmp	r3, #4
	ble	.L71
	mov	r0, #1
	bl	sleep
	mov	r3, #1
	str	r3, [fp, #-352]
	mov	r3, #0
	str	r3, [fp, #-264]
	sub	r3, fp, #260
	mov	r2, #252
	mov	r1, #0
	mov	r0, r3
	bl	memset
	sub	r3, fp, #284
	mov	r2, #0
	str	r2, [r3]
	str	r2, [r3, #4]
	str	r2, [r3, #8]
	str	r2, [r3, #12]
	str	r2, [r3, #16]
	b	.L72
.L90:
	sub	r3, fp, #264
	mov	r2, #256
	mov	r1, #0
	mov	r0, r3
	bl	memset
	ldr	r0, .L96+16
	bl	printf
	ldr	r3, .L96+20
	ldr	r3, [r3]
	mov	r0, r3
	bl	fflush
	sub	r3, fp, #264
	mov	r2, #256
	mov	r1, r3
	mov	r0, #0
	bl	read
	str	r0, [fp, #-320]
	ldr	r3, [fp, #-320]
	cmn	r3, #1
	bne	.L73
	ldr	r0, .L96+24
	bl	perror
	b	.L72
.L73:
	ldr	r3, [fp, #-320]
	cmp	r3, #0
	bne	.L74
	b	.L72
.L74:
	sub	r3, fp, #264
	add	r3, r3, #1
	mov	r0, r3
	bl	atoi
	str	r0, [fp, #-316]
	ldr	r3, [fp, #-316]
	add	r3, r3, #1
	str	r3, [fp, #-312]
	ldrb	r3, [fp, #-264]	@ zero_extendqisi2
	sub	r3, r3, #99
	cmp	r3, #14
	ldrls	pc, [pc, r3, asl #2]
	b	.L75
.L77:
	.word	.L80
	.word	.L75
	.word	.L75
	.word	.L75
	.word	.L75
	.word	.L75
	.word	.L75
	.word	.L75
	.word	.L79
	.word	.L75
	.word	.L75
	.word	.L75
	.word	.L75
	.word	.L78
	.word	.L76
.L80:
	ldr	r3, [fp, #-312]
	cmp	r3, #1
	bne	.L81
	mov	r3, #1
	ldr	r2, .L96+28
	ldr	r1, [fp, #-312]
	ldr	r0, [fp, #-328]
	bl	sendMsg
	mov	r3, r0
	cmn	r3, #1
	bne	.L81
	ldr	r0, .L96+32
	bl	perror
	b	.L72
.L81:
	ldr	r3, [fp, #-312]
	cmp	r3, #1
	ble	.L82
	ldr	r3, [fp, #-312]
	sub	r1, r3, #1
	ldr	r3, [fp, #-316]
	sub	r3, r3, #1
	lsl	r3, r3, #2
	sub	r2, fp, #4
	add	r3, r2, r3
	ldr	r3, [r3, #-280]
	str	r3, [sp]
	mov	r3, #1
	ldr	r2, .L96+36
	ldr	r0, [fp, #-328]
	bl	sendMultipleMsg
	mov	r3, r0
	cmn	r3, #1
	bne	.L82
	ldr	r0, .L96+32
	bl	perror
	b	.L72
.L82:
	sub	r3, fp, #284
	ldr	r1, [fp, #-316]
	mov	r0, r3
	bl	updateChildrenAtLevel
	b	.L75
.L79:
	ldr	r3, [fp, #-316]
	lsl	r3, r3, #2
	sub	r2, fp, #4
	add	r3, r2, r3
	ldr	r3, [r3, #-280]
	str	r3, [sp]
	mov	r3, #1
	ldr	r2, .L96+40
	ldr	r1, [fp, #-312]
	ldr	r0, [fp, #-328]
	bl	sendMultipleMsg
	mov	r3, r0
	cmn	r3, #1
	bne	.L83
	ldr	r0, .L96+44
	bl	perror
	b	.L72
.L83:
	ldr	r3, [fp, #-316]
	lsl	r3, r3, #2
	sub	r2, fp, #4
	add	r3, r2, r3
	mov	r2, #0
	str	r2, [r3, #-280]
	b	.L75
.L78:
	mov	r3, #1
	str	r3, [fp, #-348]
	b	.L84
.L86:
	ldr	r3, [fp, #-348]
	sub	r3, r3, #1
	lsl	r3, r3, #2
	sub	r2, fp, #4
	add	r3, r2, r3
	ldr	r3, [r3, #-280]
	str	r3, [sp]
	mov	r3, #1
	ldr	r2, .L96+48
	ldr	r1, [fp, #-348]
	ldr	r0, [fp, #-328]
	bl	sendMultipleMsg
	mov	r3, r0
	cmn	r3, #1
	bne	.L85
	ldr	r0, .L96+32
	bl	perror
.L85:
	ldr	r3, [fp, #-348]
	add	r3, r3, #1
	str	r3, [fp, #-348]
.L84:
	ldr	r3, [fp, #-348]
	cmp	r3, #5
	ble	.L86
	b	.L75
.L76:
	mov	r3, #1
	str	r3, [fp, #-344]
	b	.L87
.L89:
	ldr	r3, [fp, #-344]
	sub	r3, r3, #1
	lsl	r3, r3, #2
	sub	r2, fp, #4
	add	r3, r2, r3
	ldr	r3, [r3, #-280]
	str	r3, [sp]
	mov	r3, #1
	ldr	r2, .L96+52
	ldr	r1, [fp, #-344]
	ldr	r0, [fp, #-328]
	bl	sendMultipleMsg
	mov	r3, r0
	cmn	r3, #1
	bne	.L88
	ldr	r0, .L96+32
	bl	perror
.L88:
	ldr	r3, [fp, #-344]
	add	r3, r3, #1
	str	r3, [fp, #-344]
.L87:
	ldr	r3, [fp, #-344]
	cmp	r3, #5
	ble	.L89
	mov	r3, #0
	str	r3, [fp, #-352]
	nop
.L75:
	mov	r0, #1
	bl	sleep
.L72:
	ldr	r3, [fp, #-352]
	cmp	r3, #0
	bne	.L90
	mov	r3, #0
	str	r3, [fp, #-340]
	b	.L91
.L92:
	ldr	r3, [fp, #-340]
	lsl	r3, r3, #2
	sub	r2, fp, #4
	add	r3, r2, r3
	ldr	r3, [r3, #-300]
	mov	r1, #15
	mov	r0, r3
	bl	kill
	ldr	r3, [fp, #-340]
	add	r3, r3, #1
	str	r3, [fp, #-340]
.L91:
	ldr	r3, [fp, #-340]
	cmp	r3, #4
	ble	.L92
	nop
.L93:
	mov	r0, #0
	bl	wait
	mov	r3, r0
	cmp	r3, #0
	bgt	.L93
	mov	r3, #0
	ldr	r2, .L96
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L95
	bl	__stack_chk_fail
.L95:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L97:
	.align	2
.L96:
	.word	.LC23
	.word	.LC15
	.word	.LC16
	.word	.LC17
	.word	.LC18
	.word	stdout
	.word	.LC19
	.word	.LC9
	.word	.LC20
	.word	.LC21
	.word	.LC11
	.word	.LC22
	.word	.LC12
	.word	.LC13
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
