	.file	"9664.c"
	.intel_syntax noprefix
	.text
	.globl	processID
	.bss
	.align 4
	.type	processID, @object
	.size	processID, 4
processID:
	.zero	4
	.globl	logicClock
	.data
	.align 4
	.type	logicClock, @object
	.size	logicClock, 4
logicClock:
	.long	1
	.globl	pipelines
	.bss
	.align 32
	.type	pipelines, @object
	.size	pipelines, 72
pipelines:
	.zero	72
	.globl	response
	.align 8
	.type	response, @object
	.size	response, 12
response:
	.zero	12
	.globl	receiveBuffer
	.align 16
	.type	receiveBuffer, @object
	.size	receiveBuffer, 30
receiveBuffer:
	.zero	30
	.globl	sendBuffer
	.align 16
	.type	sendBuffer, @object
	.size	sendBuffer, 30
sendBuffer:
	.zero	30
	.text
	.globl	setupPipes
	.type	setupPipes, @function
setupPipes:
.LFB6:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 16
	mov	DWORD PTR -8[rbp], 0
	jmp	.L2
.L7:
	mov	DWORD PTR -4[rbp], 0
	jmp	.L3
.L6:
	mov	eax, DWORD PTR -8[rbp]
	cmp	eax, DWORD PTR -4[rbp]
	je	.L8
	mov	eax, DWORD PTR -4[rbp]
	movsx	rcx, eax
	mov	eax, DWORD PTR -8[rbp]
	movsx	rdx, eax
	mov	rax, rdx
	add	rax, rax
	add	rax, rdx
	add	rax, rcx
	lea	rdx, 0[0+rax*8]
	lea	rax, pipelines[rip]
	add	rax, rdx
	mov	rdi, rax
	call	pipe@PLT
	jmp	.L5
.L8:
	nop
.L5:
	add	DWORD PTR -4[rbp], 1
.L3:
	cmp	DWORD PTR -4[rbp], 2
	jle	.L6
	add	DWORD PTR -8[rbp], 1
.L2:
	cmp	DWORD PTR -8[rbp], 2
	jle	.L7
	nop
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	setupPipes, .-setupPipes
	.section	.rodata
.LC0:
	.string	"%s(%d, %02d)"
	.align 8
.LC1:
	.string	"Proces P%d salje procesu P%d poruku %s\n"
	.text
	.globl	sendMessage
	.type	sendMessage, @function
sendMessage:
.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	DWORD PTR -4[rbp], edi
	mov	DWORD PTR -8[rbp], esi
	mov	QWORD PTR -16[rbp], rdx
	mov	edx, DWORD PTR processID[rip]
	mov	ecx, DWORD PTR -8[rbp]
	mov	rax, QWORD PTR -16[rbp]
	mov	r8d, ecx
	mov	ecx, edx
	mov	rdx, rax
	lea	rsi, .LC0[rip]
	lea	rdi, sendBuffer[rip]
	mov	eax, 0
	call	sprintf@PLT
	mov	eax, DWORD PTR processID[rip]
	mov	edx, DWORD PTR -4[rbp]
	lea	rcx, sendBuffer[rip]
	mov	esi, eax
	lea	rdi, .LC1[rip]
	mov	eax, 0
	call	printf@PLT
	lea	rdi, sendBuffer[rip]
	call	strlen@PLT
	lea	rdx, 1[rax]
	mov	eax, DWORD PTR processID[rip]
	mov	ecx, DWORD PTR -4[rbp]
	movsx	rsi, ecx
	movsx	rcx, eax
	mov	rax, rcx
	add	rax, rax
	add	rax, rcx
	add	rax, rsi
	lea	rcx, 0[0+rax*8]
	lea	rax, pipelines[rip+4]
	mov	eax, DWORD PTR [rcx+rax]
	lea	rsi, sendBuffer[rip]
	mov	edi, eax
	call	write@PLT
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	sendMessage, .-sendMessage
	.section	.rodata
.LC2:
	.string	"%*7s(%d, %d)"
.LC3:
	.string	"Proces P%d prima poruku %s\n"
	.text
	.globl	getMessage
	.type	getMessage, @function
getMessage:
.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, 32
	mov	DWORD PTR -4[rbp], edi
	mov	QWORD PTR -16[rbp], rsi
	mov	QWORD PTR -24[rbp], rdx
	mov	eax, DWORD PTR processID[rip]
	movsx	rcx, eax
	mov	eax, DWORD PTR -4[rbp]
	movsx	rdx, eax
	mov	rax, rdx
	add	rax, rax
	add	rax, rdx
	add	rax, rcx
	lea	rdx, 0[0+rax*8]
	lea	rax, pipelines[rip]
	mov	eax, DWORD PTR [rdx+rax]
	mov	edx, 15
	lea	rsi, receiveBuffer[rip]
	mov	edi, eax
	call	read@PLT
	mov	rdx, QWORD PTR -24[rbp]
	mov	rax, QWORD PTR -16[rbp]
	mov	rcx, rdx
	mov	rdx, rax
	lea	rsi, .LC2[rip]
	lea	rdi, receiveBuffer[rip]
	mov	eax, 0
	call	__isoc99_sscanf@PLT
	mov	eax, DWORD PTR processID[rip]
	lea	rdx, receiveBuffer[rip]
	mov	esi, eax
	lea	rdi, .LC3[rip]
	mov	eax, 0
	call	printf@PLT
	mov	rax, QWORD PTR -24[rbp]
	mov	edx, DWORD PTR [rax]
	mov	eax, DWORD PTR logicClock[rip]
	cmp	edx, eax
	cmovge	eax, edx
	add	eax, 1
	mov	DWORD PTR logicClock[rip], eax
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.size	getMessage, .-getMessage
	.section	.rodata
.LC4:
	.string	"Proces: %d, poziv: %d\n"
	.text
	.globl	criticalSection
	.type	criticalSection, @function
criticalSection:
.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, 16
	mov	DWORD PTR -4[rbp], 1
	jmp	.L12
.L13:
	mov	eax, DWORD PTR processID[rip]
	mov	edx, DWORD PTR -4[rbp]
	mov	esi, eax
	lea	rdi, .LC4[rip]
	mov	eax, 0
	call	printf@PLT
	mov	eax, DWORD PTR logicClock[rip]
	add	eax, 1
	mov	DWORD PTR logicClock[rip], eax
	mov	edi, 1
	call	sleep@PLT
	add	DWORD PTR -4[rbp], 1
.L12:
	cmp	DWORD PTR -4[rbp], 5
	jle	.L13
	nop
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE9:
	.size	criticalSection, .-criticalSection
	.section	.rodata
.LC5:
	.string	"Zahtjev"
	.text
	.globl	sendRequests
	.type	sendRequests, @function
sendRequests:
.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, 16
	mov	DWORD PTR -4[rbp], 0
	jmp	.L15
.L18:
	mov	eax, DWORD PTR processID[rip]
	cmp	DWORD PTR -4[rbp], eax
	je	.L19
	mov	ecx, DWORD PTR logicClock[rip]
	mov	eax, DWORD PTR -4[rbp]
	lea	rdx, .LC5[rip]
	mov	esi, ecx
	mov	edi, eax
	call	sendMessage
	jmp	.L17
.L19:
	nop
.L17:
	add	DWORD PTR -4[rbp], 1
.L15:
	cmp	DWORD PTR -4[rbp], 2
	jle	.L18
	nop
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE10:
	.size	sendRequests, .-sendRequests
	.globl	receiveResposnes
	.type	receiveResposnes, @function
receiveResposnes:
.LFB11:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 32
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	DWORD PTR -12[rbp], 0
	jmp	.L21
.L24:
	mov	eax, DWORD PTR processID[rip]
	cmp	DWORD PTR -12[rbp], eax
	je	.L26
	lea	rdx, -16[rbp]
	lea	rcx, -20[rbp]
	mov	eax, DWORD PTR -12[rbp]
	mov	rsi, rcx
	mov	edi, eax
	call	getMessage
	jmp	.L23
.L26:
	nop
.L23:
	add	DWORD PTR -12[rbp], 1
.L21:
	cmp	DWORD PTR -12[rbp], 2
	jle	.L24
	nop
	mov	rax, QWORD PTR -8[rbp]
	sub	rax, QWORD PTR fs:40
	je	.L25
	call	__stack_chk_fail@PLT
.L25:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE11:
	.size	receiveResposnes, .-receiveResposnes
	.section	.rodata
.LC6:
	.string	"Odgovor"
	.text
	.globl	sendResponses
	.type	sendResponses, @function
sendResponses:
.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, 16
	mov	DWORD PTR -4[rbp], 0
	jmp	.L28
.L31:
	mov	eax, DWORD PTR processID[rip]
	cmp	DWORD PTR -4[rbp], eax
	je	.L32
	mov	eax, DWORD PTR -4[rbp]
	cdqe
	lea	rdx, 0[0+rax*4]
	lea	rax, response[rip]
	mov	eax, DWORD PTR [rdx+rax]
	test	eax, eax
	je	.L30
	mov	eax, DWORD PTR -4[rbp]
	cdqe
	lea	rdx, 0[0+rax*4]
	lea	rax, response[rip]
	mov	ecx, DWORD PTR [rdx+rax]
	mov	eax, DWORD PTR -4[rbp]
	lea	rdx, .LC6[rip]
	mov	esi, ecx
	mov	edi, eax
	call	sendMessage
	mov	eax, DWORD PTR -4[rbp]
	cdqe
	lea	rdx, 0[0+rax*4]
	lea	rax, response[rip]
	mov	DWORD PTR [rdx+rax], 0
	jmp	.L30
.L32:
	nop
.L30:
	add	DWORD PTR -4[rbp], 1
.L28:
	cmp	DWORD PTR -4[rbp], 2
	jle	.L31
	nop
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE12:
	.size	sendResponses, .-sendResponses
	.globl	receiveRequests
	.type	receiveRequests, @function
receiveRequests:
.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	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	eax, DWORD PTR logicClock[rip]
	mov	DWORD PTR -12[rbp], eax
	mov	DWORD PTR -16[rbp], 0
	jmp	.L34
.L39:
	mov	eax, DWORD PTR processID[rip]
	cmp	DWORD PTR -16[rbp], eax
	je	.L41
	lea	rdx, -20[rbp]
	lea	rcx, -24[rbp]
	mov	eax, DWORD PTR -16[rbp]
	mov	rsi, rcx
	mov	edi, eax
	call	getMessage
	mov	eax, DWORD PTR -20[rbp]
	cmp	DWORD PTR -12[rbp], eax
	jl	.L37
	mov	eax, DWORD PTR -20[rbp]
	cmp	DWORD PTR -12[rbp], eax
	jne	.L38
	mov	eax, DWORD PTR processID[rip]
	cmp	DWORD PTR -16[rbp], eax
	jle	.L38
.L37:
	mov	eax, DWORD PTR -20[rbp]
	mov	edx, DWORD PTR -16[rbp]
	movsx	rdx, edx
	lea	rcx, 0[0+rdx*4]
	lea	rdx, response[rip]
	mov	DWORD PTR [rcx+rdx], eax
	jmp	.L36
.L38:
	mov	ecx, DWORD PTR -20[rbp]
	mov	eax, DWORD PTR -16[rbp]
	lea	rdx, .LC6[rip]
	mov	esi, ecx
	mov	edi, eax
	call	sendMessage
	jmp	.L36
.L41:
	nop
.L36:
	add	DWORD PTR -16[rbp], 1
.L34:
	cmp	DWORD PTR -16[rbp], 2
	jle	.L39
	nop
	mov	rax, QWORD PTR -8[rbp]
	sub	rax, QWORD PTR fs:40
	je	.L40
	call	__stack_chk_fail@PLT
.L40:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE13:
	.size	receiveRequests, .-receiveRequests
	.globl	work
	.type	work, @function
work:
.LFB14:
	.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	sendRequests
	mov	eax, 0
	call	receiveRequests
	mov	eax, 0
	call	receiveResposnes
	mov	eax, 0
	call	criticalSection
	mov	eax, 0
	call	sendResponses
	nop
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE14:
	.size	work, .-work
	.globl	process
	.type	process, @function
process:
.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, 16
	mov	DWORD PTR -8[rbp], 0
	jmp	.L44
.L47:
	mov	eax, DWORD PTR processID[rip]
	cmp	DWORD PTR -8[rbp], eax
	je	.L50
	mov	eax, DWORD PTR processID[rip]
	mov	edx, DWORD PTR -8[rbp]
	movsx	rcx, edx
	movsx	rdx, eax
	mov	rax, rdx
	add	rax, rax
	add	rax, rdx
	add	rax, rcx
	lea	rdx, 0[0+rax*8]
	lea	rax, pipelines[rip]
	mov	eax, DWORD PTR [rdx+rax]
	mov	edi, eax
	call	close@PLT
	mov	eax, DWORD PTR processID[rip]
	movsx	rcx, eax
	mov	eax, DWORD PTR -8[rbp]
	movsx	rdx, eax
	mov	rax, rdx
	add	rax, rax
	add	rax, rdx
	add	rax, rcx
	lea	rdx, 0[0+rax*8]
	lea	rax, pipelines[rip+4]
	mov	eax, DWORD PTR [rdx+rax]
	mov	edi, eax
	call	close@PLT
	jmp	.L46
.L50:
	nop
.L46:
	add	DWORD PTR -8[rbp], 1
.L44:
	cmp	DWORD PTR -8[rbp], 2
	jle	.L47
	mov	DWORD PTR -4[rbp], 0
	jmp	.L48
.L49:
	mov	eax, 0
	call	work
	add	DWORD PTR -4[rbp], 1
.L48:
	cmp	DWORD PTR -4[rbp], 1
	jle	.L49
	nop
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE15:
	.size	process, .-process
	.section	.rodata
.LC7:
	.string	"Error while forking"
	.text
	.globl	main
	.type	main, @function
main:
.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	eax, 0
	call	setupPipes
	mov	DWORD PTR -12[rbp], 0
	jmp	.L52
.L55:
	call	fork@PLT
	mov	DWORD PTR -4[rbp], eax
	cmp	DWORD PTR -4[rbp], -1
	jne	.L53
	lea	rdi, .LC7[rip]
	mov	eax, 0
	call	printf@PLT
	mov	edi, 0
	call	exit@PLT
.L53:
	cmp	DWORD PTR -4[rbp], 0
	jne	.L54
	mov	eax, DWORD PTR -12[rbp]
	mov	DWORD PTR processID[rip], eax
	mov	eax, 0
	call	process
	mov	edi, 0
	call	exit@PLT
.L54:
	add	DWORD PTR -12[rbp], 1
.L52:
	cmp	DWORD PTR -12[rbp], 2
	jle	.L55
	mov	DWORD PTR -8[rbp], 0
	jmp	.L56
.L57:
	mov	edi, 0
	call	wait@PLT
	test	eax, eax
	jle	.L56
	add	DWORD PTR -8[rbp], 1
.L56:
	cmp	DWORD PTR -8[rbp], 2
	jle	.L57
	mov	edi, 0
	call	exit@PLT
	.cfi_endproc
.LFE16:
	.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	"9664.c"
	.text
	.comm	processID,4,4
	.global	logicClock
	.data
	.align	2
	.type	logicClock, %object
	.size	logicClock, 4
logicClock:
	.word	1
	.comm	pipelines,72,4
	.comm	response,12,4
	.comm	receiveBuffer,30,4
	.comm	sendBuffer,30,4
	.text
	.align	2
	.global	setupPipes
	.syntax unified
	.arm
	.fpu softvfp
	.type	setupPipes, %function
setupPipes:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #8
	mov	r3, #0
	str	r3, [fp, #-12]
	b	.L2
.L7:
	mov	r3, #0
	str	r3, [fp, #-8]
	b	.L3
.L6:
	ldr	r2, [fp, #-12]
	ldr	r3, [fp, #-8]
	cmp	r2, r3
	beq	.L8
	ldr	r2, [fp, #-12]
	mov	r3, r2
	lsl	r3, r3, #1
	add	r3, r3, r2
	ldr	r2, [fp, #-8]
	add	r3, r3, r2
	lsl	r3, r3, #3
	ldr	r2, .L9
	add	r3, r3, r2
	mov	r0, r3
	bl	pipe
	b	.L5
.L8:
	nop
.L5:
	ldr	r3, [fp, #-8]
	add	r3, r3, #1
	str	r3, [fp, #-8]
.L3:
	ldr	r3, [fp, #-8]
	cmp	r3, #2
	ble	.L6
	ldr	r3, [fp, #-12]
	add	r3, r3, #1
	str	r3, [fp, #-12]
.L2:
	ldr	r3, [fp, #-12]
	cmp	r3, #2
	ble	.L7
	nop
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L10:
	.align	2
.L9:
	.word	pipelines
	.size	setupPipes, .-setupPipes
	.section	.rodata
	.align	2
.LC0:
	.ascii	"%s(%d, %02d)\000"
	.align	2
.LC1:
	.ascii	"Proces P%d salje procesu P%d poruku %s\012\000"
	.text
	.align	2
	.global	sendMessage
	.syntax unified
	.arm
	.fpu softvfp
	.type	sendMessage, %function
sendMessage:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, fp, lr}
	add	fp, sp, #8
	sub	sp, sp, #28
	str	r0, [fp, #-16]
	str	r1, [fp, #-20]
	str	r2, [fp, #-24]
	ldr	r3, .L12
	ldr	r2, [r3]
	ldr	r3, [fp, #-20]
	str	r3, [sp]
	mov	r3, r2
	ldr	r2, [fp, #-24]
	ldr	r1, .L12+4
	ldr	r0, .L12+8
	bl	sprintf
	ldr	r3, .L12
	ldr	r1, [r3]
	ldr	r3, .L12+8
	ldr	r2, [fp, #-16]
	ldr	r0, .L12+12
	bl	printf
	ldr	r3, .L12
	ldr	r2, [r3]
	ldr	r1, .L12+16
	mov	r3, r2
	lsl	r3, r3, #1
	add	r3, r3, r2
	ldr	r2, [fp, #-16]
	add	r3, r3, r2
	lsl	r3, r3, #3
	add	r3, r1, r3
	ldr	r4, [r3, #4]
	ldr	r0, .L12+8
	bl	strlen
	mov	r3, r0
	add	r3, r3, #1
	mov	r2, r3
	ldr	r1, .L12+8
	mov	r0, r4
	bl	write
	nop
	sub	sp, fp, #8
	@ sp needed
	pop	{r4, fp, pc}
.L13:
	.align	2
.L12:
	.word	processID
	.word	.LC0
	.word	sendBuffer
	.word	.LC1
	.word	pipelines
	.size	sendMessage, .-sendMessage
	.section	.rodata
	.align	2
.LC2:
	.ascii	"%*7s(%d, %d)\000"
	.align	2
.LC3:
	.ascii	"Proces P%d prima poruku %s\012\000"
	.text
	.align	2
	.global	getMessage
	.syntax unified
	.arm
	.fpu softvfp
	.type	getMessage, %function
getMessage:
	@ 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, #-8]
	str	r1, [fp, #-12]
	str	r2, [fp, #-16]
	ldr	r3, .L15
	ldr	r1, [r3]
	ldr	r0, .L15+4
	ldr	r2, [fp, #-8]
	mov	r3, r2
	lsl	r3, r3, #1
	add	r3, r3, r2
	add	r3, r3, r1
	ldr	r3, [r0, r3, lsl #3]
	mov	r2, #15
	ldr	r1, .L15+8
	mov	r0, r3
	bl	read
	ldr	r3, [fp, #-16]
	ldr	r2, [fp, #-12]
	ldr	r1, .L15+12
	ldr	r0, .L15+8
	bl	__isoc99_sscanf
	ldr	r3, .L15
	ldr	r3, [r3]
	ldr	r2, .L15+8
	mov	r1, r3
	ldr	r0, .L15+16
	bl	printf
	ldr	r3, [fp, #-16]
	ldr	r2, [r3]
	ldr	r3, .L15+20
	ldr	r3, [r3]
	cmp	r2, r3
	movge	r3, r2
	movlt	r3, r3
	add	r3, r3, #1
	ldr	r2, .L15+20
	str	r3, [r2]
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L16:
	.align	2
.L15:
	.word	processID
	.word	pipelines
	.word	receiveBuffer
	.word	.LC2
	.word	.LC3
	.word	logicClock
	.size	getMessage, .-getMessage
	.section	.rodata
	.align	2
.LC4:
	.ascii	"Proces: %d, poziv: %d\012\000"
	.text
	.align	2
	.global	criticalSection
	.syntax unified
	.arm
	.fpu softvfp
	.type	criticalSection, %function
criticalSection:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #8
	mov	r3, #1
	str	r3, [fp, #-8]
	b	.L18
.L19:
	ldr	r3, .L20
	ldr	r3, [r3]
	ldr	r2, [fp, #-8]
	mov	r1, r3
	ldr	r0, .L20+4
	bl	printf
	ldr	r3, .L20+8
	ldr	r3, [r3]
	add	r3, r3, #1
	ldr	r2, .L20+8
	str	r3, [r2]
	mov	r0, #1
	bl	sleep
	ldr	r3, [fp, #-8]
	add	r3, r3, #1
	str	r3, [fp, #-8]
.L18:
	ldr	r3, [fp, #-8]
	cmp	r3, #5
	ble	.L19
	nop
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L21:
	.align	2
.L20:
	.word	processID
	.word	.LC4
	.word	logicClock
	.size	criticalSection, .-criticalSection
	.section	.rodata
	.align	2
.LC5:
	.ascii	"Zahtjev\000"
	.text
	.align	2
	.global	sendRequests
	.syntax unified
	.arm
	.fpu softvfp
	.type	sendRequests, %function
sendRequests:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #8
	mov	r3, #0
	str	r3, [fp, #-8]
	b	.L23
.L26:
	ldr	r3, .L28
	ldr	r3, [r3]
	ldr	r2, [fp, #-8]
	cmp	r2, r3
	beq	.L27
	ldr	r3, .L28+4
	ldr	r3, [r3]
	ldr	r2, .L28+8
	mov	r1, r3
	ldr	r0, [fp, #-8]
	bl	sendMessage
	b	.L25
.L27:
	nop
.L25:
	ldr	r3, [fp, #-8]
	add	r3, r3, #1
	str	r3, [fp, #-8]
.L23:
	ldr	r3, [fp, #-8]
	cmp	r3, #2
	ble	.L26
	nop
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L29:
	.align	2
.L28:
	.word	processID
	.word	logicClock
	.word	.LC5
	.size	sendRequests, .-sendRequests
	.section	.rodata
	.align	2
.LC6:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	receiveResposnes
	.syntax unified
	.arm
	.fpu softvfp
	.type	receiveResposnes, %function
receiveResposnes:
	@ 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, .L37
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	mov	r3, #0
	str	r3, [fp, #-12]
	b	.L31
.L34:
	ldr	r3, .L37+4
	ldr	r3, [r3]
	ldr	r2, [fp, #-12]
	cmp	r2, r3
	beq	.L36
	sub	r2, fp, #16
	sub	r3, fp, #20
	mov	r1, r3
	ldr	r0, [fp, #-12]
	bl	getMessage
	b	.L33
.L36:
	nop
.L33:
	ldr	r3, [fp, #-12]
	add	r3, r3, #1
	str	r3, [fp, #-12]
.L31:
	ldr	r3, [fp, #-12]
	cmp	r3, #2
	ble	.L34
	nop
	ldr	r3, .L37
	ldr	r2, [r3]
	ldr	r3, [fp, #-8]
	eors	r2, r3, r2
	mov	r3, #0
	beq	.L35
	bl	__stack_chk_fail
.L35:
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L38:
	.align	2
.L37:
	.word	.LC6
	.word	processID
	.size	receiveResposnes, .-receiveResposnes
	.section	.rodata
	.align	2
.LC7:
	.ascii	"Odgovor\000"
	.text
	.align	2
	.global	sendResponses
	.syntax unified
	.arm
	.fpu softvfp
	.type	sendResponses, %function
sendResponses:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #8
	mov	r3, #0
	str	r3, [fp, #-8]
	b	.L40
.L43:
	ldr	r3, .L45
	ldr	r3, [r3]
	ldr	r2, [fp, #-8]
	cmp	r2, r3
	beq	.L44
	ldr	r2, .L45+4
	ldr	r3, [fp, #-8]
	ldr	r3, [r2, r3, lsl #2]
	cmp	r3, #0
	beq	.L42
	ldr	r2, .L45+4
	ldr	r3, [fp, #-8]
	ldr	r3, [r2, r3, lsl #2]
	ldr	r2, .L45+8
	mov	r1, r3
	ldr	r0, [fp, #-8]
	bl	sendMessage
	ldr	r2, .L45+4
	ldr	r3, [fp, #-8]
	mov	r1, #0
	str	r1, [r2, r3, lsl #2]
	b	.L42
.L44:
	nop
.L42:
	ldr	r3, [fp, #-8]
	add	r3, r3, #1
	str	r3, [fp, #-8]
.L40:
	ldr	r3, [fp, #-8]
	cmp	r3, #2
	ble	.L43
	nop
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L46:
	.align	2
.L45:
	.word	processID
	.word	response
	.word	.LC7
	.size	sendResponses, .-sendResponses
	.section	.rodata
	.align	2
.LC8:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	receiveRequests
	.syntax unified
	.arm
	.fpu softvfp
	.type	receiveRequests, %function
receiveRequests:
	@ args = 0, pretend = 0, frame = 24
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #24
	ldr	r3, .L56
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	ldr	r3, .L56+4
	ldr	r3, [r3]
	str	r3, [fp, #-12]
	mov	r3, #0
	str	r3, [fp, #-16]
	b	.L48
.L53:
	ldr	r3, .L56+8
	ldr	r3, [r3]
	ldr	r2, [fp, #-16]
	cmp	r2, r3
	beq	.L55
	sub	r2, fp, #20
	sub	r3, fp, #24
	mov	r1, r3
	ldr	r0, [fp, #-16]
	bl	getMessage
	ldr	r3, [fp, #-20]
	ldr	r2, [fp, #-12]
	cmp	r2, r3
	blt	.L51
	ldr	r3, [fp, #-20]
	ldr	r2, [fp, #-12]
	cmp	r2, r3
	bne	.L52
	ldr	r3, .L56+8
	ldr	r3, [r3]
	ldr	r2, [fp, #-16]
	cmp	r2, r3
	ble	.L52
.L51:
	ldr	r2, [fp, #-20]
	ldr	r1, .L56+12
	ldr	r3, [fp, #-16]
	str	r2, [r1, r3, lsl #2]
	b	.L50
.L52:
	ldr	r3, [fp, #-20]
	ldr	r2, .L56+16
	mov	r1, r3
	ldr	r0, [fp, #-16]
	bl	sendMessage
	b	.L50
.L55:
	nop
.L50:
	ldr	r3, [fp, #-16]
	add	r3, r3, #1
	str	r3, [fp, #-16]
.L48:
	ldr	r3, [fp, #-16]
	cmp	r3, #2
	ble	.L53
	nop
	ldr	r3, .L56
	ldr	r2, [r3]
	ldr	r3, [fp, #-8]
	eors	r2, r3, r2
	mov	r3, #0
	beq	.L54
	bl	__stack_chk_fail
.L54:
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L57:
	.align	2
.L56:
	.word	.LC8
	.word	logicClock
	.word	processID
	.word	response
	.word	.LC7
	.size	receiveRequests, .-receiveRequests
	.align	2
	.global	work
	.syntax unified
	.arm
	.fpu softvfp
	.type	work, %function
work:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	bl	sendRequests
	bl	receiveRequests
	bl	receiveResposnes
	bl	criticalSection
	bl	sendResponses
	nop
	pop	{fp, pc}
	.size	work, .-work
	.align	2
	.global	process
	.syntax unified
	.arm
	.fpu softvfp
	.type	process, %function
process:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #8
	mov	r3, #0
	str	r3, [fp, #-12]
	b	.L60
.L63:
	ldr	r3, .L67
	ldr	r3, [r3]
	ldr	r2, [fp, #-12]
	cmp	r2, r3
	beq	.L66
	ldr	r3, .L67
	ldr	r2, [r3]
	ldr	r1, .L67+4
	mov	r3, r2
	lsl	r3, r3, #1
	add	r3, r3, r2
	ldr	r2, [fp, #-12]
	add	r3, r3, r2
	ldr	r3, [r1, r3, lsl #3]
	mov	r0, r3
	bl	close
	ldr	r3, .L67
	ldr	r1, [r3]
	ldr	r0, .L67+4
	ldr	r2, [fp, #-12]
	mov	r3, r2
	lsl	r3, r3, #1
	add	r3, r3, r2
	add	r3, r3, r1
	lsl	r3, r3, #3
	add	r3, r0, r3
	ldr	r3, [r3, #4]
	mov	r0, r3
	bl	close
	b	.L62
.L66:
	nop
.L62:
	ldr	r3, [fp, #-12]
	add	r3, r3, #1
	str	r3, [fp, #-12]
.L60:
	ldr	r3, [fp, #-12]
	cmp	r3, #2
	ble	.L63
	mov	r3, #0
	str	r3, [fp, #-8]
	b	.L64
.L65:
	bl	work
	ldr	r3, [fp, #-8]
	add	r3, r3, #1
	str	r3, [fp, #-8]
.L64:
	ldr	r3, [fp, #-8]
	cmp	r3, #1
	ble	.L65
	nop
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L68:
	.align	2
.L67:
	.word	processID
	.word	pipelines
	.size	process, .-process
	.section	.rodata
	.align	2
.LC9:
	.ascii	"Error while forking\000"
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #16
	bl	setupPipes
	mov	r3, #0
	str	r3, [fp, #-16]
	b	.L70
.L73:
	bl	fork
	mov	r3, r0
	str	r3, [fp, #-8]
	ldr	r3, [fp, #-8]
	cmn	r3, #1
	bne	.L71
	ldr	r0, .L76
	bl	printf
	mov	r0, #0
	bl	exit
.L71:
	ldr	r3, [fp, #-8]
	cmp	r3, #0
	bne	.L72
	ldr	r2, .L76+4
	ldr	r3, [fp, #-16]
	str	r3, [r2]
	bl	process
	mov	r0, #0
	bl	exit
.L72:
	ldr	r3, [fp, #-16]
	add	r3, r3, #1
	str	r3, [fp, #-16]
.L70:
	ldr	r3, [fp, #-16]
	cmp	r3, #2
	ble	.L73
	mov	r3, #0
	str	r3, [fp, #-12]
	b	.L74
.L75:
	mov	r0, #0
	bl	wait
	mov	r3, r0
	cmp	r3, #0
	ble	.L74
	ldr	r3, [fp, #-12]
	add	r3, r3, #1
	str	r3, [fp, #-12]
.L74:
	ldr	r3, [fp, #-12]
	cmp	r3, #2
	ble	.L75
	mov	r0, #0
	bl	exit
.L77:
	.align	2
.L76:
	.word	.LC9
	.word	processID
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
