	.file	"329509.c"
	.intel_syntax noprefix
	.text
	.globl	flagSTOP
	.bss
	.align 4
	.type	flagSTOP, @object
	.size	flagSTOP, 4
flagSTOP:
	.zero	4
	.globl	flagEND
	.align 4
	.type	flagEND, @object
	.size	flagEND, 4
flagEND:
	.zero	4
	.globl	flagMES
	.align 4
	.type	flagMES, @object
	.size	flagMES, 4
flagMES:
	.zero	4
	.globl	flagSEND
	.align 4
	.type	flagSEND, @object
	.size	flagSEND, 4
flagSEND:
	.zero	4
	.globl	key
	.align 4
	.type	key, @object
	.size	key, 4
key:
	.zero	4
	.globl	msgid
	.align 4
	.type	msgid, @object
	.size	msgid, 4
msgid:
	.zero	4
	.globl	pid
	.align 8
	.type	pid, @object
	.size	pid, 12
pid:
	.zero	12
	.globl	fd1
	.align 8
	.type	fd1, @object
	.size	fd1, 8
fd1:
	.zero	8
	.globl	fd2
	.align 8
	.type	fd2, @object
	.size	fd2, 8
fd2:
	.zero	8
	.globl	fd3
	.align 8
	.type	fd3, @object
	.size	fd3, 8
fd3:
	.zero	8
	.globl	msg
	.align 16
	.type	msg, @object
	.size	msg, 16
msg:
	.zero	16
	.section	.rodata
.LC0:
	.string	"%d%d"
	.text
	.globl	sendMSG
	.type	sendMSG, @function
sendMSG:
.LFB6:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	push	rbx
	sub	rsp, 24
	.cfi_offset 3, -24
	mov	DWORD PTR -20[rbp], 0
	jmp	.L2
.L4:
	mov	eax, DWORD PTR -20[rbp]
	cdqe
	lea	rdx, 0[0+rax*4]
	lea	rax, pid[rip]
	mov	ebx, DWORD PTR [rdx+rax]
	call	getpid@PLT
	cmp	ebx, eax
	je	.L3
	mov	eax, DWORD PTR -20[rbp]
	cdqe
	lea	rdx, 0[0+rax*4]
	lea	rax, pid[rip]
	mov	eax, DWORD PTR [rdx+rax]
	mov	esi, 10
	mov	edi, eax
	call	kill@PLT
	mov	eax, DWORD PTR -20[rbp]
	cdqe
	lea	rdx, 0[0+rax*4]
	lea	rax, pid[rip]
	mov	eax, DWORD PTR [rdx+rax]
	cdqe
	mov	QWORD PTR msg[rip], rax
	mov	edx, DWORD PTR flagEND[rip]
	mov	eax, DWORD PTR flagSTOP[rip]
	mov	ecx, edx
	mov	edx, eax
	lea	rsi, .LC0[rip]
	lea	rdi, msg[rip+8]
	mov	eax, 0
	call	sprintf@PLT
	mov	eax, DWORD PTR msgid[rip]
	mov	ecx, 0
	mov	edx, 16
	lea	rsi, msg[rip]
	mov	edi, eax
	call	msgsnd@PLT
.L3:
	add	DWORD PTR -20[rbp], 1
.L2:
	cmp	DWORD PTR -20[rbp], 2
	jle	.L4
	mov	DWORD PTR flagSEND[rip], 0
	nop
	mov	rbx, QWORD PTR -8[rbp]
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	sendMSG, .-sendMSG
	.globl	rcvMSG
	.type	rcvMSG, @function
rcvMSG:
.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, 16
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	call	getpid@PLT
	movsx	rdx, eax
	mov	eax, DWORD PTR msgid[rip]
	mov	r8d, 0
	mov	rcx, rdx
	mov	edx, 16
	lea	rsi, msg[rip]
	mov	edi, eax
	call	msgrcv@PLT
	movzx	eax, BYTE PTR msg[rip+8]
	mov	BYTE PTR -9[rbp], al
	lea	rax, -9[rbp]
	mov	rdi, rax
	call	atoi@PLT
	mov	DWORD PTR flagSTOP[rip], eax
	movzx	eax, BYTE PTR msg[rip+9]
	mov	BYTE PTR -9[rbp], al
	lea	rax, -9[rbp]
	mov	rdi, rax
	call	atoi@PLT
	mov	DWORD PTR flagEND[rip], eax
	mov	eax, DWORD PTR flagEND[rip]
	test	eax, eax
	je	.L8
	mov	edi, 12
	call	raise@PLT
.L8:
	nop
	mov	rax, QWORD PTR -8[rbp]
	sub	rax, QWORD PTR fs:40
	je	.L7
	call	__stack_chk_fail@PLT
.L7:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	rcvMSG, .-rcvMSG
	.section	.rodata
.LC1:
	.string	"Wstrzymanie pracy"
	.text
	.globl	handleSTOP
	.type	handleSTOP, @function
handleSTOP:
.LFB8:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	lea	rdi, .LC1[rip]
	call	puts@PLT
	mov	DWORD PTR flagSTOP[rip], 1
	mov	eax, 0
	call	sendMSG
	nop
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.size	handleSTOP, .-handleSTOP
	.section	.rodata
.LC2:
	.string	"Kontynuacja pracy"
	.text
	.globl	handleCONT
	.type	handleCONT, @function
handleCONT:
.LFB9:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	lea	rdi, .LC2[rip]
	call	puts@PLT
	mov	DWORD PTR flagSTOP[rip], 0
	mov	eax, 0
	call	sendMSG
	nop
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE9:
	.size	handleCONT, .-handleCONT
	.globl	handleMES
	.type	handleMES, @function
handleMES:
.LFB10:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	mov	eax, 0
	call	rcvMSG
	nop
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE10:
	.size	handleMES, .-handleMES
	.globl	handleEND
	.type	handleEND, @function
handleEND:
.LFB11:
	.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 flagEND[rip], 1
	mov	eax, 0
	call	sendMSG
	mov	eax, DWORD PTR fd1[rip]
	mov	edi, eax
	call	close@PLT
	mov	eax, DWORD PTR fd1[rip+4]
	mov	edi, eax
	call	close@PLT
	mov	eax, DWORD PTR fd2[rip]
	mov	edi, eax
	call	close@PLT
	mov	eax, DWORD PTR fd2[rip+4]
	mov	edi, eax
	call	close@PLT
	mov	eax, DWORD PTR fd3[rip]
	mov	edi, eax
	call	close@PLT
	mov	eax, DWORD PTR fd3[rip+4]
	mov	edi, eax
	call	close@PLT
	mov	edi, 0
	call	exit@PLT
	.cfi_endproc
.LFE11:
	.size	handleEND, .-handleEND
	.globl	firstProcess
	.type	firstProcess, @function
firstProcess:
.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, 112
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	lea	rax, -112[rbp]
	mov	edx, 100
	mov	esi, 0
	mov	rdi, rax
	call	memset@PLT
	mov	rdx, QWORD PTR stdin[rip]
	lea	rax, -112[rbp]
	mov	esi, 100
	mov	rdi, rax
	call	fgets@PLT
	lea	rax, -112[rbp]
	mov	rdi, rax
	call	strlen@PLT
	lea	rdx, 1[rax]
	mov	eax, DWORD PTR fd1[rip+4]
	lea	rcx, -112[rbp]
	mov	rsi, rcx
	mov	edi, eax
	call	write@PLT
	jmp	.L14
.L15:
	call	pause@PLT
.L14:
	mov	eax, DWORD PTR flagSTOP[rip]
	test	eax, eax
	jne	.L15
	nop
	mov	rax, QWORD PTR -8[rbp]
	sub	rax, QWORD PTR fs:40
	je	.L16
	call	__stack_chk_fail@PLT
.L16:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE12:
	.size	firstProcess, .-firstProcess
	.section	.rodata
.LC3:
	.string	"@"
	.text
	.globl	secondProcess
	.type	secondProcess, @function
secondProcess:
.LFB13:
	.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, 136
	.cfi_offset 3, -24
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -24[rbp], rax
	xor	eax, eax
	lea	rax, -128[rbp]
	mov	edx, 100
	mov	esi, 0
	mov	rdi, rax
	call	memset@PLT
	mov	eax, DWORD PTR fd1[rip]
	lea	rcx, -128[rbp]
	mov	edx, 100
	mov	rsi, rcx
	mov	edi, eax
	call	read@PLT
	jmp	.L18
.L19:
	call	pause@PLT
.L18:
	mov	eax, DWORD PTR flagSTOP[rip]
	test	eax, eax
	jne	.L19
	mov	DWORD PTR -136[rbp], 0
	mov	DWORD PTR -132[rbp], 1
	movzx	eax, BYTE PTR -128[rbp]
	cmp	al, 43
	je	.L20
	lea	rax, -128[rbp]
	mov	rdi, rax
	call	strlen@PLT
	sub	rax, 2
	movzx	eax, BYTE PTR -128[rbp+rax]
	cmp	al, 43
	jne	.L21
.L20:
	mov	DWORD PTR -132[rbp], 0
.L21:
	mov	DWORD PTR -136[rbp], 0
	jmp	.L22
.L26:
	mov	eax, DWORD PTR -136[rbp]
	cdqe
	movzx	eax, BYTE PTR -128[rbp+rax]
	cmp	al, 57
	jg	.L23
	mov	eax, DWORD PTR -136[rbp]
	cdqe
	movzx	eax, BYTE PTR -128[rbp+rax]
	cmp	al, 47
	jg	.L24
.L23:
	mov	eax, DWORD PTR -136[rbp]
	cdqe
	movzx	eax, BYTE PTR -128[rbp+rax]
	cmp	al, 43
	je	.L24
	mov	DWORD PTR -132[rbp], 0
.L24:
	add	DWORD PTR -136[rbp], 1
.L22:
	mov	eax, DWORD PTR -136[rbp]
	movsx	rbx, eax
	lea	rax, -128[rbp]
	mov	rdi, rax
	call	strlen@PLT
	sub	rax, 1
	cmp	rbx, rax
	jnb	.L25
	cmp	DWORD PTR -132[rbp], 0
	jne	.L26
.L25:
	cmp	DWORD PTR -132[rbp], 1
	jne	.L27
	lea	rax, -128[rbp]
	mov	rdi, rax
	call	strlen@PLT
	lea	rdx, 1[rax]
	mov	eax, DWORD PTR fd2[rip+4]
	lea	rcx, -128[rbp]
	mov	rsi, rcx
	mov	edi, eax
	call	write@PLT
	jmp	.L30
.L27:
	mov	eax, DWORD PTR fd2[rip+4]
	mov	edx, 2
	lea	rsi, .LC3[rip]
	mov	edi, eax
	call	write@PLT
.L30:
	nop
	mov	rax, QWORD PTR -24[rbp]
	sub	rax, QWORD PTR fs:40
	je	.L29
	call	__stack_chk_fail@PLT
.L29:
	mov	rbx, QWORD PTR -8[rbp]
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE13:
	.size	secondProcess, .-secondProcess
	.section	.rodata
.LC4:
	.string	"Wprowadzono bledne dane"
.LC5:
	.string	"= %d\n"
	.text
	.globl	thirdProcess
	.type	thirdProcess, @function
thirdProcess:
.LFB14:
	.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, 152
	.cfi_offset 3, -24
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -24[rbp], rax
	xor	eax, eax
	lea	rax, -128[rbp]
	mov	edx, 100
	mov	esi, 0
	mov	rdi, rax
	call	memset@PLT
	lea	rax, -137[rbp]
	mov	edx, 9
	mov	esi, 0
	mov	rdi, rax
	call	memset@PLT
	mov	DWORD PTR -152[rbp], 0
	mov	DWORD PTR -148[rbp], 0
	mov	DWORD PTR -144[rbp], 0
	mov	eax, DWORD PTR fd2[rip]
	lea	rcx, -128[rbp]
	mov	edx, 100
	mov	rsi, rcx
	mov	edi, eax
	call	read@PLT
	jmp	.L32
.L33:
	call	pause@PLT
.L32:
	mov	eax, DWORD PTR flagSTOP[rip]
	test	eax, eax
	jne	.L33
	mov	eax, DWORD PTR flagEND[rip]
	test	eax, eax
	jne	.L43
	movzx	eax, BYTE PTR -128[rbp]
	cmp	al, 64
	jne	.L36
	lea	rdi, .LC4[rip]
	call	puts@PLT
	mov	rax, QWORD PTR stdout[rip]
	mov	rdi, rax
	call	fflush@PLT
	jmp	.L31
.L36:
	mov	DWORD PTR -152[rbp], 0
	jmp	.L38
.L41:
	mov	eax, DWORD PTR -152[rbp]
	cdqe
	movzx	eax, BYTE PTR -128[rbp+rax]
	cmp	al, 47
	jle	.L39
	mov	eax, DWORD PTR -152[rbp]
	cdqe
	movzx	eax, BYTE PTR -128[rbp+rax]
	cmp	al, 57
	jg	.L39
	mov	eax, DWORD PTR -152[rbp]
	cdqe
	movzx	edx, BYTE PTR -128[rbp+rax]
	mov	eax, DWORD PTR -148[rbp]
	cdqe
	mov	BYTE PTR -137[rbp+rax], dl
	add	DWORD PTR -148[rbp], 1
	jmp	.L40
.L39:
	lea	rax, -137[rbp]
	mov	rdi, rax
	call	atoi@PLT
	add	DWORD PTR -144[rbp], eax
	mov	DWORD PTR -148[rbp], 0
	lea	rax, -137[rbp]
	mov	edx, 9
	mov	esi, 0
	mov	rdi, rax
	call	memset@PLT
.L40:
	add	DWORD PTR -152[rbp], 1
.L38:
	mov	eax, DWORD PTR -152[rbp]
	movsx	rbx, eax
	lea	rax, -128[rbp]
	mov	rdi, rax
	call	strlen@PLT
	cmp	rbx, rax
	jbe	.L41
	mov	eax, DWORD PTR -144[rbp]
	mov	esi, eax
	lea	rdi, .LC5[rip]
	mov	eax, 0
	call	printf@PLT
	mov	rax, QWORD PTR stdout[rip]
	mov	rdi, rax
	call	fflush@PLT
	jmp	.L31
.L43:
	nop
.L31:
	mov	rax, QWORD PTR -24[rbp]
	sub	rax, QWORD PTR fs:40
	je	.L42
	call	__stack_chk_fail@PLT
.L42:
	mov	rbx, QWORD PTR -8[rbp]
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE14:
	.size	thirdProcess, .-thirdProcess
	.section	.rodata
.LC6:
	.string	"%d"
	.text
	.globl	sendPID
	.type	sendPID, @function
sendPID:
.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, 32
	mov	DWORD PTR -20[rbp], edi
	mov	eax, DWORD PTR -20[rbp]
	cdqe
	mov	QWORD PTR msg[rip], rax
	mov	DWORD PTR -4[rbp], 0
	mov	DWORD PTR -4[rbp], 0
	jmp	.L45
.L46:
	mov	eax, DWORD PTR -4[rbp]
	cdqe
	lea	rdx, 0[0+rax*4]
	lea	rax, pid[rip]
	mov	eax, DWORD PTR [rdx+rax]
	mov	edx, eax
	lea	rsi, .LC6[rip]
	lea	rdi, msg[rip+8]
	mov	eax, 0
	call	sprintf@PLT
	mov	eax, DWORD PTR msgid[rip]
	mov	ecx, 0
	mov	edx, 16
	lea	rsi, msg[rip]
	mov	edi, eax
	call	msgsnd@PLT
	add	DWORD PTR -4[rbp], 1
.L45:
	cmp	DWORD PTR -4[rbp], 2
	jle	.L46
	nop
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE15:
	.size	sendPID, .-sendPID
	.globl	getPID
	.type	getPID, @function
getPID:
.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, 16
	mov	DWORD PTR -4[rbp], 0
	mov	DWORD PTR -4[rbp], 0
	jmp	.L48
.L49:
	call	getpid@PLT
	movsx	rdx, eax
	mov	eax, DWORD PTR msgid[rip]
	mov	r8d, 0
	mov	rcx, rdx
	mov	edx, 16
	lea	rsi, msg[rip]
	mov	edi, eax
	call	msgrcv@PLT
	lea	rdi, msg[rip+8]
	call	atoi@PLT
	mov	edx, DWORD PTR -4[rbp]
	movsx	rdx, edx
	lea	rcx, 0[0+rdx*4]
	lea	rdx, pid[rip]
	mov	DWORD PTR [rcx+rdx], eax
	add	DWORD PTR -4[rbp], 1
.L48:
	cmp	DWORD PTR -4[rbp], 2
	jle	.L49
	nop
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE16:
	.size	getPID, .-getPID
	.section	.rodata
.LC7:
	.string	"Sygnaly : "
.LC8:
	.string	"12 - koniec pracy"
.LC9:
	.string	"14 - wstrzymaj komunikacje"
.LC10:
	.string	"18 - kontynuacja komunikacji"
	.align 8
.LC11:
	.string	"10 - komunikacja miedzy procesowa"
.LC12:
	.string	"key"
.LC13:
	.string	"1 pipe error"
.LC14:
	.string	"2 pipe error"
.LC15:
	.string	"3 pipe error"
.LC16:
	.string	"1 fork error"
.LC17:
	.string	"2 fork error"
.LC18:
	.string	"3 fork error"
.LC19:
	.string	"pid1 : %d\n"
.LC20:
	.string	"pid2 : %d\n"
.LC21:
	.string	"pid3 : %d\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB17:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 32
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	lea	rsi, handleEND[rip]
	mov	edi, 12
	call	signal@PLT
	lea	rsi, handleSTOP[rip]
	mov	edi, 14
	call	signal@PLT
	lea	rsi, handleCONT[rip]
	mov	edi, 18
	call	signal@PLT
	lea	rsi, handleMES[rip]
	mov	edi, 10
	call	signal@PLT
	lea	rdi, .LC7[rip]
	call	puts@PLT
	lea	rdi, .LC8[rip]
	call	puts@PLT
	lea	rdi, .LC9[rip]
	call	puts@PLT
	lea	rdi, .LC10[rip]
	call	puts@PLT
	lea	rdi, .LC11[rip]
	call	puts@PLT
	mov	esi, 65
	lea	rdi, .LC12[rip]
	call	ftok@PLT
	mov	DWORD PTR key[rip], eax
	mov	eax, DWORD PTR key[rip]
	mov	esi, 950
	mov	edi, eax
	call	msgget@PLT
	mov	DWORD PTR msgid[rip], eax
	lea	rdi, fd1[rip]
	call	pipe@PLT
	cmp	eax, -1
	jne	.L51
	lea	rdi, .LC13[rip]
	mov	eax, 0
	call	printf@PLT
.L51:
	lea	rdi, fd2[rip]
	call	pipe@PLT
	cmp	eax, -1
	jne	.L52
	lea	rdi, .LC14[rip]
	mov	eax, 0
	call	printf@PLT
.L52:
	lea	rdi, fd3[rip]
	call	pipe@PLT
	cmp	eax, -1
	jne	.L53
	lea	rdi, .LC15[rip]
	mov	eax, 0
	call	printf@PLT
.L53:
	call	fork@PLT
	mov	DWORD PTR pid[rip], eax
	mov	eax, DWORD PTR pid[rip]
	test	eax, eax
	jne	.L54
	mov	eax, 0
	call	getPID
	mov	eax, DWORD PTR fd1[rip]
	mov	edi, eax
	call	close@PLT
	jmp	.L55
.L56:
	mov	eax, 0
	call	firstProcess
.L55:
	mov	eax, DWORD PTR flagEND[rip]
	test	eax, eax
	je	.L56
	mov	eax, DWORD PTR fd1[rip+4]
	mov	edi, eax
	call	close@PLT
	mov	eax, 0
	jmp	.L69
.L54:
	mov	eax, DWORD PTR pid[rip]
	test	eax, eax
	jns	.L58
	lea	rdi, .LC16[rip]
	mov	eax, 0
	call	printf@PLT
.L58:
	call	fork@PLT
	mov	DWORD PTR pid[rip+4], eax
	mov	eax, DWORD PTR pid[rip+4]
	test	eax, eax
	jne	.L59
	mov	eax, 0
	call	getPID
	mov	eax, DWORD PTR fd1[rip+4]
	mov	edi, eax
	call	close@PLT
	mov	eax, DWORD PTR fd2[rip]
	mov	edi, eax
	call	close@PLT
	jmp	.L60
.L61:
	mov	eax, 0
	call	secondProcess
.L60:
	mov	eax, DWORD PTR flagEND[rip]
	test	eax, eax
	je	.L61
	mov	eax, DWORD PTR fd1[rip]
	mov	edi, eax
	call	close@PLT
	mov	eax, DWORD PTR fd2[rip+4]
	mov	edi, eax
	call	close@PLT
	mov	eax, 0
	jmp	.L69
.L59:
	mov	eax, DWORD PTR pid[rip+4]
	test	eax, eax
	jns	.L62
	lea	rdi, .LC17[rip]
	mov	eax, 0
	call	printf@PLT
.L62:
	call	fork@PLT
	mov	DWORD PTR pid[rip+8], eax
	mov	eax, DWORD PTR pid[rip+8]
	test	eax, eax
	jne	.L63
	call	getpid@PLT
	mov	DWORD PTR pid[rip+8], eax
	mov	eax, DWORD PTR pid[rip]
	mov	edi, eax
	call	sendPID
	mov	eax, DWORD PTR pid[rip+4]
	mov	edi, eax
	call	sendPID
	mov	eax, DWORD PTR fd2[rip+4]
	mov	edi, eax
	call	close@PLT
	jmp	.L64
.L65:
	mov	eax, 0
	call	thirdProcess
.L64:
	mov	eax, DWORD PTR flagEND[rip]
	test	eax, eax
	je	.L65
	mov	eax, 0
	jmp	.L69
.L63:
	mov	eax, DWORD PTR pid[rip+8]
	test	eax, eax
	jns	.L66
	lea	rdi, .LC18[rip]
	mov	eax, 0
	call	printf@PLT
.L66:
	mov	eax, DWORD PTR pid[rip]
	mov	esi, eax
	lea	rdi, .LC19[rip]
	mov	eax, 0
	call	printf@PLT
	mov	eax, DWORD PTR pid[rip+4]
	mov	esi, eax
	lea	rdi, .LC20[rip]
	mov	eax, 0
	call	printf@PLT
	mov	eax, DWORD PTR pid[rip+8]
	mov	esi, eax
	lea	rdi, .LC21[rip]
	mov	eax, 0
	call	printf@PLT
	jmp	.L67
.L68:
	mov	edi, 1
	call	sleep@PLT
.L67:
	mov	eax, DWORD PTR pid[rip]
	lea	rcx, -20[rbp]
	mov	edx, 1
	mov	rsi, rcx
	mov	edi, eax
	call	waitpid@PLT
	test	eax, eax
	je	.L68
	mov	eax, DWORD PTR pid[rip+4]
	lea	rdx, -20[rbp]
	lea	rcx, 4[rdx]
	mov	edx, 1
	mov	rsi, rcx
	mov	edi, eax
	call	waitpid@PLT
	test	eax, eax
	je	.L68
	mov	eax, DWORD PTR pid[rip+8]
	lea	rdx, -20[rbp]
	lea	rcx, 8[rdx]
	mov	edx, 1
	mov	rsi, rcx
	mov	edi, eax
	call	waitpid@PLT
	test	eax, eax
	je	.L68
	mov	eax, DWORD PTR msgid[rip]
	mov	edx, 0
	mov	esi, 0
	mov	edi, eax
	call	msgctl@PLT
	mov	eax, DWORD PTR fd1[rip]
	mov	edi, eax
	call	close@PLT
	mov	eax, DWORD PTR fd1[rip+4]
	mov	edi, eax
	call	close@PLT
	mov	eax, DWORD PTR fd2[rip]
	mov	edi, eax
	call	close@PLT
	mov	eax, DWORD PTR fd2[rip+4]
	mov	edi, eax
	call	close@PLT
	mov	eax, DWORD PTR fd3[rip]
	mov	edi, eax
	call	close@PLT
	mov	eax, DWORD PTR fd3[rip+4]
	mov	edi, eax
	call	close@PLT
	mov	eax, 0
.L69:
	mov	rcx, QWORD PTR -8[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L70
	call	__stack_chk_fail@PLT
.L70:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE17:
	.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	"329509.c"
	.text
	.global	flagSTOP
	.bss
	.align	2
	.type	flagSTOP, %object
	.size	flagSTOP, 4
flagSTOP:
	.space	4
	.global	flagEND
	.align	2
	.type	flagEND, %object
	.size	flagEND, 4
flagEND:
	.space	4
	.global	flagMES
	.align	2
	.type	flagMES, %object
	.size	flagMES, 4
flagMES:
	.space	4
	.global	flagSEND
	.align	2
	.type	flagSEND, %object
	.size	flagSEND, 4
flagSEND:
	.space	4
	.comm	key,4,4
	.comm	msgid,4,4
	.comm	pid,12,4
	.comm	fd1,8,4
	.comm	fd2,8,4
	.comm	fd3,8,4
	.comm	msg,8,4
	.section	.rodata
	.align	2
.LC0:
	.ascii	"%d%d\000"
	.text
	.align	2
	.global	sendMSG
	.syntax unified
	.arm
	.fpu softvfp
	.type	sendMSG, %function
sendMSG:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, fp, lr}
	add	fp, sp, #8
	sub	sp, sp, #12
	mov	r3, #0
	str	r3, [fp, #-16]
	b	.L2
.L4:
	ldr	r2, .L5
	ldr	r3, [fp, #-16]
	ldr	r4, [r2, r3, lsl #2]
	bl	getpid
	mov	r3, r0
	cmp	r4, r3
	beq	.L3
	ldr	r2, .L5
	ldr	r3, [fp, #-16]
	ldr	r3, [r2, r3, lsl #2]
	mov	r1, #10
	mov	r0, r3
	bl	kill
	ldr	r2, .L5
	ldr	r3, [fp, #-16]
	ldr	r3, [r2, r3, lsl #2]
	ldr	r2, .L5+4
	str	r3, [r2]
	ldr	r3, .L5+8
	ldr	r2, [r3]
	ldr	r3, .L5+12
	ldr	r3, [r3]
	ldr	r1, .L5+16
	ldr	r0, .L5+20
	bl	sprintf
	ldr	r3, .L5+24
	ldr	r0, [r3]
	mov	r3, #0
	mov	r2, #8
	ldr	r1, .L5+4
	bl	msgsnd
.L3:
	ldr	r3, [fp, #-16]
	add	r3, r3, #1
	str	r3, [fp, #-16]
.L2:
	ldr	r3, [fp, #-16]
	cmp	r3, #2
	ble	.L4
	ldr	r3, .L5+28
	mov	r2, #0
	str	r2, [r3]
	nop
	sub	sp, fp, #8
	@ sp needed
	pop	{r4, fp, pc}
.L6:
	.align	2
.L5:
	.word	pid
	.word	msg
	.word	flagSTOP
	.word	flagEND
	.word	.LC0
	.word	msg+4
	.word	msgid
	.word	flagSEND
	.size	sendMSG, .-sendMSG
	.section	.rodata
	.align	2
.LC1:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	rcvMSG
	.syntax unified
	.arm
	.fpu softvfp
	.type	rcvMSG, %function
rcvMSG:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, fp, lr}
	add	fp, sp, #8
	sub	sp, sp, #20
	ldr	r3, .L11
	ldr	r3, [r3]
	str	r3, [fp, #-16]
	mov	r3,#0
	ldr	r3, .L11+4
	ldr	r4, [r3]
	bl	getpid
	mov	r3, r0
	mov	r2, #0
	str	r2, [sp]
	mov	r2, #8
	ldr	r1, .L11+8
	mov	r0, r4
	bl	msgrcv
	ldr	r3, .L11+8
	ldrb	r3, [r3, #4]	@ zero_extendqisi2
	strb	r3, [fp, #-20]
	sub	r3, fp, #20
	mov	r0, r3
	bl	atoi
	mov	r3, r0
	ldr	r2, .L11+12
	str	r3, [r2]
	ldr	r3, .L11+8
	ldrb	r3, [r3, #5]	@ zero_extendqisi2
	strb	r3, [fp, #-20]
	sub	r3, fp, #20
	mov	r0, r3
	bl	atoi
	mov	r3, r0
	ldr	r2, .L11+16
	str	r3, [r2]
	ldr	r3, .L11+16
	ldr	r3, [r3]
	cmp	r3, #0
	beq	.L10
	mov	r0, #12
	bl	raise
.L10:
	nop
	ldr	r3, .L11
	ldr	r2, [r3]
	ldr	r3, [fp, #-16]
	eors	r2, r3, r2
	mov	r3, #0
	beq	.L9
	bl	__stack_chk_fail
.L9:
	sub	sp, fp, #8
	@ sp needed
	pop	{r4, fp, pc}
.L12:
	.align	2
.L11:
	.word	.LC1
	.word	msgid
	.word	msg
	.word	flagSTOP
	.word	flagEND
	.size	rcvMSG, .-rcvMSG
	.section	.rodata
	.align	2
.LC2:
	.ascii	"Wstrzymanie pracy\000"
	.text
	.align	2
	.global	handleSTOP
	.syntax unified
	.arm
	.fpu softvfp
	.type	handleSTOP, %function
handleSTOP:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	ldr	r0, .L14
	bl	puts
	ldr	r3, .L14+4
	mov	r2, #1
	str	r2, [r3]
	bl	sendMSG
	nop
	pop	{fp, pc}
.L15:
	.align	2
.L14:
	.word	.LC2
	.word	flagSTOP
	.size	handleSTOP, .-handleSTOP
	.section	.rodata
	.align	2
.LC3:
	.ascii	"Kontynuacja pracy\000"
	.text
	.align	2
	.global	handleCONT
	.syntax unified
	.arm
	.fpu softvfp
	.type	handleCONT, %function
handleCONT:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	ldr	r0, .L17
	bl	puts
	ldr	r3, .L17+4
	mov	r2, #0
	str	r2, [r3]
	bl	sendMSG
	nop
	pop	{fp, pc}
.L18:
	.align	2
.L17:
	.word	.LC3
	.word	flagSTOP
	.size	handleCONT, .-handleCONT
	.align	2
	.global	handleMES
	.syntax unified
	.arm
	.fpu softvfp
	.type	handleMES, %function
handleMES:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	bl	rcvMSG
	nop
	pop	{fp, pc}
	.size	handleMES, .-handleMES
	.align	2
	.global	handleEND
	.syntax unified
	.arm
	.fpu softvfp
	.type	handleEND, %function
handleEND:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	ldr	r3, .L21
	mov	r2, #1
	str	r2, [r3]
	bl	sendMSG
	ldr	r3, .L21+4
	ldr	r3, [r3]
	mov	r0, r3
	bl	close
	ldr	r3, .L21+4
	ldr	r3, [r3, #4]
	mov	r0, r3
	bl	close
	ldr	r3, .L21+8
	ldr	r3, [r3]
	mov	r0, r3
	bl	close
	ldr	r3, .L21+8
	ldr	r3, [r3, #4]
	mov	r0, r3
	bl	close
	ldr	r3, .L21+12
	ldr	r3, [r3]
	mov	r0, r3
	bl	close
	ldr	r3, .L21+12
	ldr	r3, [r3, #4]
	mov	r0, r3
	bl	close
	mov	r0, #0
	bl	exit
.L22:
	.align	2
.L21:
	.word	flagEND
	.word	fd1
	.word	fd2
	.word	fd3
	.size	handleEND, .-handleEND
	.section	.rodata
	.align	2
.LC4:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	firstProcess
	.syntax unified
	.arm
	.fpu softvfp
	.type	firstProcess, %function
firstProcess:
	@ args = 0, pretend = 0, frame = 104
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, fp, lr}
	add	fp, sp, #8
	sub	sp, sp, #108
	ldr	r3, .L27
	ldr	r3, [r3]
	str	r3, [fp, #-16]
	mov	r3,#0
	sub	r3, fp, #116
	mov	r2, #100
	mov	r1, #0
	mov	r0, r3
	bl	memset
	ldr	r3, .L27+4
	ldr	r2, [r3]
	sub	r3, fp, #116
	mov	r1, #100
	mov	r0, r3
	bl	fgets
	ldr	r3, .L27+8
	ldr	r4, [r3, #4]
	sub	r3, fp, #116
	mov	r0, r3
	bl	strlen
	mov	r3, r0
	add	r2, r3, #1
	sub	r3, fp, #116
	mov	r1, r3
	mov	r0, r4
	bl	write
	b	.L24
.L25:
	bl	pause
.L24:
	ldr	r3, .L27+12
	ldr	r3, [r3]
	cmp	r3, #0
	bne	.L25
	nop
	ldr	r3, .L27
	ldr	r2, [r3]
	ldr	r3, [fp, #-16]
	eors	r2, r3, r2
	mov	r3, #0
	beq	.L26
	bl	__stack_chk_fail
.L26:
	sub	sp, fp, #8
	@ sp needed
	pop	{r4, fp, pc}
.L28:
	.align	2
.L27:
	.word	.LC4
	.word	stdin
	.word	fd1
	.word	flagSTOP
	.size	firstProcess, .-firstProcess
	.section	.rodata
	.align	2
.LC5:
	.ascii	"@\000"
	.align	2
.LC6:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	secondProcess
	.syntax unified
	.arm
	.fpu softvfp
	.type	secondProcess, %function
secondProcess:
	@ args = 0, pretend = 0, frame = 112
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, fp, lr}
	add	fp, sp, #8
	sub	sp, sp, #116
	ldr	r3, .L43
	ldr	r3, [r3]
	str	r3, [fp, #-16]
	mov	r3,#0
	sub	r3, fp, #116
	mov	r2, #100
	mov	r1, #0
	mov	r0, r3
	bl	memset
	ldr	r3, .L43+4
	ldr	r3, [r3]
	sub	r1, fp, #116
	mov	r2, #100
	mov	r0, r3
	bl	read
	b	.L30
.L31:
	bl	pause
.L30:
	ldr	r3, .L43+8
	ldr	r3, [r3]
	cmp	r3, #0
	bne	.L31
	mov	r3, #0
	str	r3, [fp, #-124]
	mov	r3, #1
	str	r3, [fp, #-120]
	ldrb	r3, [fp, #-116]	@ zero_extendqisi2
	cmp	r3, #43
	beq	.L32
	sub	r3, fp, #116
	mov	r0, r3
	bl	strlen
	mov	r3, r0
	sub	r3, r3, #2
	sub	r2, fp, #12
	add	r3, r2, r3
	ldrb	r3, [r3, #-104]	@ zero_extendqisi2
	cmp	r3, #43
	bne	.L33
.L32:
	mov	r3, #0
	str	r3, [fp, #-120]
.L33:
	mov	r3, #0
	str	r3, [fp, #-124]
	b	.L34
.L38:
	sub	r2, fp, #116
	ldr	r3, [fp, #-124]
	add	r3, r2, r3
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #57
	bhi	.L35
	sub	r2, fp, #116
	ldr	r3, [fp, #-124]
	add	r3, r2, r3
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #47
	bhi	.L36
.L35:
	sub	r2, fp, #116
	ldr	r3, [fp, #-124]
	add	r3, r2, r3
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #43
	beq	.L36
	mov	r3, #0
	str	r3, [fp, #-120]
.L36:
	ldr	r3, [fp, #-124]
	add	r3, r3, #1
	str	r3, [fp, #-124]
.L34:
	sub	r3, fp, #116
	mov	r0, r3
	bl	strlen
	mov	r3, r0
	sub	r2, r3, #1
	ldr	r3, [fp, #-124]
	cmp	r2, r3
	bls	.L37
	ldr	r3, [fp, #-120]
	cmp	r3, #0
	bne	.L38
.L37:
	ldr	r3, [fp, #-120]
	cmp	r3, #1
	bne	.L39
	ldr	r3, .L43+12
	ldr	r4, [r3, #4]
	sub	r3, fp, #116
	mov	r0, r3
	bl	strlen
	mov	r3, r0
	add	r2, r3, #1
	sub	r3, fp, #116
	mov	r1, r3
	mov	r0, r4
	bl	write
	b	.L42
.L39:
	ldr	r3, .L43+12
	ldr	r3, [r3, #4]
	mov	r2, #2
	ldr	r1, .L43+16
	mov	r0, r3
	bl	write
.L42:
	nop
	ldr	r3, .L43
	ldr	r2, [r3]
	ldr	r3, [fp, #-16]
	eors	r2, r3, r2
	mov	r3, #0
	beq	.L41
	bl	__stack_chk_fail
.L41:
	sub	sp, fp, #8
	@ sp needed
	pop	{r4, fp, pc}
.L44:
	.align	2
.L43:
	.word	.LC6
	.word	fd1
	.word	flagSTOP
	.word	fd2
	.word	.LC5
	.size	secondProcess, .-secondProcess
	.section	.rodata
	.align	2
.LC7:
	.ascii	"Wprowadzono bledne dane\000"
	.align	2
.LC8:
	.ascii	"= %d\012\000"
	.align	2
.LC9:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	thirdProcess
	.syntax unified
	.arm
	.fpu softvfp
	.type	thirdProcess, %function
thirdProcess:
	@ args = 0, pretend = 0, frame = 128
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #128
	ldr	r3, .L58
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	sub	r3, fp, #108
	mov	r2, #100
	mov	r1, #0
	mov	r0, r3
	bl	memset
	sub	r3, fp, #120
	mov	r2, #9
	mov	r1, #0
	mov	r0, r3
	bl	memset
	mov	r3, #0
	str	r3, [fp, #-132]
	mov	r3, #0
	str	r3, [fp, #-128]
	mov	r3, #0
	str	r3, [fp, #-124]
	ldr	r3, .L58+4
	ldr	r3, [r3]
	sub	r1, fp, #108
	mov	r2, #100
	mov	r0, r3
	bl	read
	b	.L46
.L47:
	bl	pause
.L46:
	ldr	r3, .L58+8
	ldr	r3, [r3]
	cmp	r3, #0
	bne	.L47
	ldr	r3, .L58+12
	ldr	r3, [r3]
	cmp	r3, #0
	bne	.L57
	ldrb	r3, [fp, #-108]	@ zero_extendqisi2
	cmp	r3, #64
	bne	.L50
	ldr	r0, .L58+16
	bl	puts
	ldr	r3, .L58+20
	ldr	r3, [r3]
	mov	r0, r3
	bl	fflush
	b	.L45
.L50:
	mov	r3, #0
	str	r3, [fp, #-132]
	b	.L52
.L55:
	sub	r2, fp, #108
	ldr	r3, [fp, #-132]
	add	r3, r2, r3
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #47
	bls	.L53
	sub	r2, fp, #108
	ldr	r3, [fp, #-132]
	add	r3, r2, r3
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #57
	bhi	.L53
	sub	r2, fp, #108
	ldr	r3, [fp, #-132]
	add	r3, r2, r3
	ldrb	r1, [r3]	@ zero_extendqisi2
	sub	r2, fp, #120
	ldr	r3, [fp, #-128]
	add	r3, r2, r3
	mov	r2, r1
	strb	r2, [r3]
	ldr	r3, [fp, #-128]
	add	r3, r3, #1
	str	r3, [fp, #-128]
	b	.L54
.L53:
	sub	r3, fp, #120
	mov	r0, r3
	bl	atoi
	mov	r2, r0
	ldr	r3, [fp, #-124]
	add	r3, r3, r2
	str	r3, [fp, #-124]
	mov	r3, #0
	str	r3, [fp, #-128]
	sub	r3, fp, #120
	mov	r2, #9
	mov	r1, #0
	mov	r0, r3
	bl	memset
.L54:
	ldr	r3, [fp, #-132]
	add	r3, r3, #1
	str	r3, [fp, #-132]
.L52:
	sub	r3, fp, #108
	mov	r0, r3
	bl	strlen
	mov	r2, r0
	ldr	r3, [fp, #-132]
	cmp	r2, r3
	bcs	.L55
	ldr	r1, [fp, #-124]
	ldr	r0, .L58+24
	bl	printf
	ldr	r3, .L58+20
	ldr	r3, [r3]
	mov	r0, r3
	bl	fflush
	b	.L45
.L57:
	nop
.L45:
	ldr	r3, .L58
	ldr	r2, [r3]
	ldr	r3, [fp, #-8]
	eors	r2, r3, r2
	mov	r3, #0
	beq	.L56
	bl	__stack_chk_fail
.L56:
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L59:
	.align	2
.L58:
	.word	.LC9
	.word	fd2
	.word	flagSTOP
	.word	flagEND
	.word	.LC7
	.word	stdout
	.word	.LC8
	.size	thirdProcess, .-thirdProcess
	.section	.rodata
	.align	2
.LC10:
	.ascii	"%d\000"
	.text
	.align	2
	.global	sendPID
	.syntax unified
	.arm
	.fpu softvfp
	.type	sendPID, %function
sendPID:
	@ 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]
	ldr	r2, .L63
	ldr	r3, [fp, #-16]
	str	r3, [r2]
	mov	r3, #0
	str	r3, [fp, #-8]
	mov	r3, #0
	str	r3, [fp, #-8]
	b	.L61
.L62:
	ldr	r2, .L63+4
	ldr	r3, [fp, #-8]
	ldr	r3, [r2, r3, lsl #2]
	mov	r2, r3
	ldr	r1, .L63+8
	ldr	r0, .L63+12
	bl	sprintf
	ldr	r3, .L63+16
	ldr	r0, [r3]
	mov	r3, #0
	mov	r2, #8
	ldr	r1, .L63
	bl	msgsnd
	ldr	r3, [fp, #-8]
	add	r3, r3, #1
	str	r3, [fp, #-8]
.L61:
	ldr	r3, [fp, #-8]
	cmp	r3, #2
	ble	.L62
	nop
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L64:
	.align	2
.L63:
	.word	msg
	.word	pid
	.word	.LC10
	.word	msg+4
	.word	msgid
	.size	sendPID, .-sendPID
	.align	2
	.global	getPID
	.syntax unified
	.arm
	.fpu softvfp
	.type	getPID, %function
getPID:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, fp, lr}
	add	fp, sp, #8
	sub	sp, sp, #20
	mov	r3, #0
	str	r3, [fp, #-16]
	mov	r3, #0
	str	r3, [fp, #-16]
	b	.L66
.L67:
	ldr	r3, .L68
	ldr	r4, [r3]
	bl	getpid
	mov	r3, r0
	mov	r2, #0
	str	r2, [sp]
	mov	r2, #8
	ldr	r1, .L68+4
	mov	r0, r4
	bl	msgrcv
	ldr	r0, .L68+8
	bl	atoi
	mov	r2, r0
	ldr	r1, .L68+12
	ldr	r3, [fp, #-16]
	str	r2, [r1, r3, lsl #2]
	ldr	r3, [fp, #-16]
	add	r3, r3, #1
	str	r3, [fp, #-16]
.L66:
	ldr	r3, [fp, #-16]
	cmp	r3, #2
	ble	.L67
	nop
	nop
	sub	sp, fp, #8
	@ sp needed
	pop	{r4, fp, pc}
.L69:
	.align	2
.L68:
	.word	msgid
	.word	msg
	.word	msg+4
	.word	pid
	.size	getPID, .-getPID
	.section	.rodata
	.align	2
.LC11:
	.ascii	"Sygnaly : \000"
	.align	2
.LC12:
	.ascii	"12 - koniec pracy\000"
	.align	2
.LC13:
	.ascii	"14 - wstrzymaj komunikacje\000"
	.align	2
.LC14:
	.ascii	"18 - kontynuacja komunikacji\000"
	.align	2
.LC15:
	.ascii	"10 - komunikacja miedzy procesowa\000"
	.align	2
.LC16:
	.ascii	"key\000"
	.align	2
.LC17:
	.ascii	"1 pipe error\000"
	.align	2
.LC18:
	.ascii	"2 pipe error\000"
	.align	2
.LC19:
	.ascii	"3 pipe error\000"
	.align	2
.LC20:
	.ascii	"1 fork error\000"
	.align	2
.LC21:
	.ascii	"2 fork error\000"
	.align	2
.LC22:
	.ascii	"3 fork error\000"
	.align	2
.LC23:
	.ascii	"pid1 : %d\012\000"
	.align	2
.LC24:
	.ascii	"pid2 : %d\012\000"
	.align	2
.LC25:
	.ascii	"pid3 : %d\012\000"
	.align	2
.LC26:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #16
	ldr	r3, .L91
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	ldr	r1, .L91+4
	mov	r0, #12
	bl	signal
	ldr	r1, .L91+8
	mov	r0, #14
	bl	signal
	ldr	r1, .L91+12
	mov	r0, #18
	bl	signal
	ldr	r1, .L91+16
	mov	r0, #10
	bl	signal
	ldr	r0, .L91+20
	bl	puts
	ldr	r0, .L91+24
	bl	puts
	ldr	r0, .L91+28
	bl	puts
	ldr	r0, .L91+32
	bl	puts
	ldr	r0, .L91+36
	bl	puts
	mov	r1, #65
	ldr	r0, .L91+40
	bl	ftok
	mov	r3, r0
	ldr	r2, .L91+44
	str	r3, [r2]
	ldr	r3, .L91+44
	ldr	r3, [r3]
	ldr	r1, .L91+48
	mov	r0, r3
	bl	msgget
	mov	r3, r0
	ldr	r2, .L91+52
	str	r3, [r2]
	ldr	r0, .L91+56
	bl	pipe
	mov	r3, r0
	cmn	r3, #1
	bne	.L71
	ldr	r0, .L91+60
	bl	printf
.L71:
	ldr	r0, .L91+64
	bl	pipe
	mov	r3, r0
	cmn	r3, #1
	bne	.L72
	ldr	r0, .L91+68
	bl	printf
.L72:
	ldr	r0, .L91+72
	bl	pipe
	mov	r3, r0
	cmn	r3, #1
	bne	.L73
	ldr	r0, .L91+76
	bl	printf
.L73:
	bl	fork
	mov	r3, r0
	mov	r2, r3
	ldr	r3, .L91+80
	str	r2, [r3]
	ldr	r3, .L91+80
	ldr	r3, [r3]
	cmp	r3, #0
	bne	.L74
	bl	getPID
	ldr	r3, .L91+56
	ldr	r3, [r3]
	mov	r0, r3
	bl	close
	b	.L75
.L76:
	bl	firstProcess
.L75:
	ldr	r3, .L91+84
	ldr	r3, [r3]
	cmp	r3, #0
	beq	.L76
	ldr	r3, .L91+56
	ldr	r3, [r3, #4]
	mov	r0, r3
	bl	close
	mov	r3, #0
	b	.L89
.L74:
	ldr	r3, .L91+80
	ldr	r3, [r3]
	cmp	r3, #0
	bge	.L78
	ldr	r0, .L91+88
	bl	printf
.L78:
	bl	fork
	mov	r3, r0
	mov	r2, r3
	ldr	r3, .L91+80
	str	r2, [r3, #4]
	ldr	r3, .L91+80
	ldr	r3, [r3, #4]
	cmp	r3, #0
	bne	.L79
	bl	getPID
	ldr	r3, .L91+56
	ldr	r3, [r3, #4]
	mov	r0, r3
	bl	close
	ldr	r3, .L91+64
	ldr	r3, [r3]
	mov	r0, r3
	bl	close
	b	.L80
.L81:
	bl	secondProcess
.L80:
	ldr	r3, .L91+84
	ldr	r3, [r3]
	cmp	r3, #0
	beq	.L81
	ldr	r3, .L91+56
	ldr	r3, [r3]
	mov	r0, r3
	bl	close
	ldr	r3, .L91+64
	ldr	r3, [r3, #4]
	mov	r0, r3
	bl	close
	mov	r3, #0
	b	.L89
.L79:
	ldr	r3, .L91+80
	ldr	r3, [r3, #4]
	cmp	r3, #0
	bge	.L82
	ldr	r0, .L91+92
	bl	printf
.L82:
	bl	fork
	mov	r3, r0
	mov	r2, r3
	ldr	r3, .L91+80
	str	r2, [r3, #8]
	ldr	r3, .L91+80
	ldr	r3, [r3, #8]
	cmp	r3, #0
	bne	.L83
	bl	getpid
	mov	r3, r0
	ldr	r2, .L91+80
	str	r3, [r2, #8]
	ldr	r3, .L91+80
	ldr	r3, [r3]
	mov	r0, r3
	bl	sendPID
	ldr	r3, .L91+80
	ldr	r3, [r3, #4]
	mov	r0, r3
	bl	sendPID
	ldr	r3, .L91+64
	ldr	r3, [r3, #4]
	mov	r0, r3
	bl	close
	b	.L84
.L85:
	bl	thirdProcess
.L84:
	ldr	r3, .L91+84
	ldr	r3, [r3]
	cmp	r3, #0
	beq	.L85
	mov	r3, #0
	b	.L89
.L83:
	ldr	r3, .L91+80
	ldr	r3, [r3, #8]
	cmp	r3, #0
	bge	.L86
	ldr	r0, .L91+96
	bl	printf
.L86:
	ldr	r3, .L91+80
	ldr	r3, [r3]
	mov	r1, r3
	ldr	r0, .L91+100
	bl	printf
	ldr	r3, .L91+80
	ldr	r3, [r3, #4]
	mov	r1, r3
	ldr	r0, .L91+104
	bl	printf
	ldr	r3, .L91+80
	ldr	r3, [r3, #8]
	mov	r1, r3
	ldr	r0, .L91+108
	bl	printf
	b	.L87
.L88:
	mov	r0, #1
	bl	sleep
.L87:
	ldr	r3, .L91+80
	ldr	r3, [r3]
	sub	r1, fp, #20
	mov	r2, #1
	mov	r0, r3
	bl	waitpid
	mov	r3, r0
	cmp	r3, #0
	beq	.L88
	ldr	r3, .L91+80
	ldr	r0, [r3, #4]
	sub	r3, fp, #20
	add	r3, r3, #4
	mov	r2, #1
	mov	r1, r3
	bl	waitpid
	mov	r3, r0
	cmp	r3, #0
	beq	.L88
	ldr	r3, .L91+80
	ldr	r0, [r3, #8]
	sub	r3, fp, #20
	add	r3, r3, #8
	mov	r2, #1
	mov	r1, r3
	bl	waitpid
	mov	r3, r0
	cmp	r3, #0
	beq	.L88
	ldr	r3, .L91+52
	ldr	r3, [r3]
	mov	r2, #0
	mov	r1, #0
	mov	r0, r3
	bl	msgctl
	ldr	r3, .L91+56
	ldr	r3, [r3]
	mov	r0, r3
	bl	close
	ldr	r3, .L91+56
	ldr	r3, [r3, #4]
	mov	r0, r3
	bl	close
	ldr	r3, .L91+64
	ldr	r3, [r3]
	mov	r0, r3
	bl	close
	ldr	r3, .L91+64
	ldr	r3, [r3, #4]
	mov	r0, r3
	bl	close
	ldr	r3, .L91+72
	ldr	r3, [r3]
	mov	r0, r3
	bl	close
	ldr	r3, .L91+72
	ldr	r3, [r3, #4]
	mov	r0, r3
	bl	close
	mov	r3, #0
.L89:
	ldr	r2, .L91
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L90
	bl	__stack_chk_fail
.L90:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L92:
	.align	2
.L91:
	.word	.LC26
	.word	handleEND
	.word	handleSTOP
	.word	handleCONT
	.word	handleMES
	.word	.LC11
	.word	.LC12
	.word	.LC13
	.word	.LC14
	.word	.LC15
	.word	.LC16
	.word	key
	.word	950
	.word	msgid
	.word	fd1
	.word	.LC17
	.word	fd2
	.word	.LC18
	.word	fd3
	.word	.LC19
	.word	pid
	.word	flagEND
	.word	.LC20
	.word	.LC21
	.word	.LC22
	.word	.LC23
	.word	.LC24
	.word	.LC25
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
