	.file	"22014107.c"
	.intel_syntax noprefix
	.text
	.globl	flag
	.data
	.align 4
	.type	flag, @object
	.size	flag, 4
flag:
	.long	1
	.globl	br_partija
	.bss
	.align 4
	.type	br_partija, @object
	.size	br_partija, 4
br_partija:
	.zero	4
	.globl	red_kom_id
	.align 4
	.type	red_kom_id, @object
	.size	red_kom_id, 4
red_kom_id:
	.zero	4
	.globl	red_info_id
	.align 4
	.type	red_info_id, @object
	.size	red_info_id, 4
red_info_id:
	.zero	4
	.globl	pid_niz
	.align 32
	.type	pid_niz, @object
	.size	pid_niz, 80
pid_niz:
	.zero	80
	.section	.rodata
	.align 8
.LC0:
	.string	"Partija igraca %d i %d je gotova\n"
.LC1:
	.string	"\n%s\n"
	.text
	.globl	proveri_rec
	.type	proveri_rec, @function
proveri_rec:
.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, 1248
	mov	DWORD PTR -1236[rbp], edi
	mov	DWORD PTR -1240[rbp], esi
	mov	DWORD PTR -1244[rbp], edx
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	lea	rsi, -1184[rbp]
	mov	eax, DWORD PTR -1244[rbp]
	mov	r8d, 0
	mov	ecx, 43
	mov	edx, 40
	mov	edi, eax
	call	msgrcv@PLT
	lea	rax, -1184[rbp]
	lea	rdx, 8[rax]
	lea	rax, -112[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	strcpy@PLT
	lea	rax, -112[rbp]
	mov	rdi, rax
	call	strlen@PLT
	mov	DWORD PTR -1220[rbp], eax
	mov	eax, DWORD PTR -1220[rbp]
	sub	eax, 2
	cdqe
	movzx	eax, BYTE PTR -112[rbp+rax]
	cmp	al, 110
	jne	.L2
	mov	eax, DWORD PTR -1220[rbp]
	sub	eax, 1
	cdqe
	movzx	eax, BYTE PTR -112[rbp+rax]
	cmp	al, 116
	jne	.L2
	mov	edx, DWORD PTR -1240[rbp]
	mov	eax, DWORD PTR -1236[rbp]
	mov	esi, eax
	lea	rdi, .LC0[rip]
	mov	eax, 0
	call	printf@PLT
	lea	rax, -1216[rbp]
	add	rax, 8
	mov	DWORD PTR [rax], 1634889584
	mov	WORD PTR 4[rax], 122
	mov	eax, DWORD PTR flag[rip]
	test	eax, eax
	je	.L3
	mov	eax, DWORD PTR -1240[rbp]
	cdqe
	mov	QWORD PTR -1216[rbp], rax
	jmp	.L4
.L3:
	mov	eax, DWORD PTR -1236[rbp]
	cdqe
	mov	QWORD PTR -1216[rbp], rax
.L4:
	lea	rsi, -1216[rbp]
	mov	eax, DWORD PTR -1244[rbp]
	mov	ecx, 0
	mov	edx, 32
	mov	edi, eax
	call	msgsnd@PLT
	lea	rax, -1216[rbp]
	add	rax, 8
	mov	DWORD PTR [rax], 1700949872
	mov	WORD PTR 4[rax], 24932
	mov	BYTE PTR 6[rax], 0
	mov	eax, DWORD PTR flag[rip]
	test	eax, eax
	je	.L5
	mov	eax, DWORD PTR -1236[rbp]
	cdqe
	mov	QWORD PTR -1216[rbp], rax
	mov	rax, QWORD PTR -1216[rbp]
	mov	DWORD PTR -128[rbp], eax
	jmp	.L6
.L5:
	mov	eax, DWORD PTR -1240[rbp]
	cdqe
	mov	QWORD PTR -1216[rbp], rax
	mov	rax, QWORD PTR -1216[rbp]
	mov	DWORD PTR -128[rbp], eax
.L6:
	lea	rsi, -1216[rbp]
	mov	eax, DWORD PTR -1244[rbp]
	mov	ecx, 0
	mov	edx, 32
	mov	edi, eax
	call	msgsnd@PLT
	mov	QWORD PTR -1136[rbp], 1
	mov	eax, DWORD PTR red_info_id[rip]
	lea	rsi, -1136[rbp]
	mov	ecx, 0
	mov	edx, 1016
	mov	edi, eax
	call	msgsnd@PLT
	mov	eax, 1
	jmp	.L10
.L2:
	mov	eax, DWORD PTR flag[rip]
	test	eax, eax
	je	.L8
	mov	eax, DWORD PTR -1240[rbp]
	cdqe
	mov	QWORD PTR -1216[rbp], rax
	mov	DWORD PTR flag[rip], 0
	jmp	.L9
.L8:
	mov	eax, DWORD PTR -1236[rbp]
	cdqe
	mov	QWORD PTR -1216[rbp], rax
	mov	DWORD PTR flag[rip], 1
.L9:
	lea	rax, -112[rbp]
	lea	rdx, -1216[rbp]
	add	rdx, 8
	mov	rsi, rax
	mov	rdi, rdx
	call	strcpy@PLT
	lea	rax, -1216[rbp]
	add	rax, 8
	mov	rsi, rax
	lea	rdi, .LC1[rip]
	mov	eax, 0
	call	printf@PLT
	lea	rsi, -1216[rbp]
	mov	eax, DWORD PTR -1244[rbp]
	mov	ecx, 0
	mov	edx, 32
	mov	edi, eax
	call	msgsnd@PLT
	mov	eax, 0
.L10:
	mov	rcx, QWORD PTR -8[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L11
	call	__stack_chk_fail@PLT
.L11:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	proveri_rec, .-proveri_rec
	.section	.rodata
.LC2:
	.string	"Turnir je zavrsen"
	.align 8
.LC3:
	.string	"Neparna/parna pozicija - %d/%d\n"
	.text
	.globl	sighandler
	.type	sighandler, @function
sighandler:
.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, 1056
	mov	DWORD PTR -1044[rbp], edi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	DWORD PTR -1032[rbp], 0
	mov	DWORD PTR -1028[rbp], 0
	mov	DWORD PTR -1036[rbp], 0
	jmp	.L13
.L14:
	mov	eax, DWORD PTR -1036[rbp]
	cdqe
	lea	rdx, 0[0+rax*4]
	lea	rax, pid_niz[rip]
	mov	eax, DWORD PTR [rdx+rax]
	mov	edx, 0
	mov	esi, 0
	mov	edi, eax
	call	waitpid@PLT
	add	DWORD PTR -1036[rbp], 1
.L13:
	mov	eax, DWORD PTR br_partija[rip]
	add	eax, eax
	cmp	DWORD PTR -1036[rbp], eax
	jl	.L14
	mov	DWORD PTR -1036[rbp], 0
	jmp	.L15
.L18:
	mov	eax, DWORD PTR red_info_id[rip]
	lea	rsi, -1024[rbp]
	mov	r8d, 0
	mov	ecx, 1
	mov	edx, 1016
	mov	edi, eax
	call	msgrcv@PLT
	mov	eax, DWORD PTR -16[rbp]
	and	eax, 1
	test	eax, eax
	jne	.L16
	add	DWORD PTR -1032[rbp], 1
	jmp	.L17
.L16:
	add	DWORD PTR -1028[rbp], 1
.L17:
	add	DWORD PTR -1036[rbp], 1
.L15:
	mov	eax, DWORD PTR br_partija[rip]
	cmp	DWORD PTR -1036[rbp], eax
	jl	.L18
	lea	rdi, .LC2[rip]
	call	puts@PLT
	mov	edx, DWORD PTR -1032[rbp]
	mov	eax, DWORD PTR -1028[rbp]
	mov	esi, eax
	lea	rdi, .LC3[rip]
	mov	eax, 0
	call	printf@PLT
	mov	eax, DWORD PTR red_kom_id[rip]
	mov	edx, 0
	mov	esi, 0
	mov	edi, eax
	call	msgctl@PLT
	mov	eax, DWORD PTR red_info_id[rip]
	mov	edx, 0
	mov	esi, 0
	mov	edi, eax
	call	msgctl@PLT
	mov	edi, 0
	call	exit@PLT
	.cfi_endproc
.LFE7:
	.size	sighandler, .-sighandler
	.section	.rodata
.LC4:
	.string	"pid servera: %d\n"
.LC5:
	.string	"./kostur-server.c"
.LC6:
	.string	"key_red_kom = %d\n"
.LC7:
	.string	"key_red_info = %d\n"
.LC8:
	.string	"red_kom_id = %d\n"
.LC9:
	.string	"red_info_id = %d\n"
.LC10:
	.string	"prijavi me"
	.align 8
.LC11:
	.string	"Doslo je do greske u forkovanju!"
	.text
	.globl	main
	.type	main, @function
main:
.LFB8:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	push	rbx
	sub	rsp, 1128
	.cfi_offset 3, -24
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -24[rbp], rax
	xor	eax, eax
	mov	DWORD PTR -1124[rbp], 1
	mov	DWORD PTR -1112[rbp], 0
	mov	DWORD PTR -1108[rbp], 1
	call	getpid@PLT
	mov	DWORD PTR -1104[rbp], eax
	mov	eax, DWORD PTR -1104[rbp]
	mov	esi, eax
	lea	rdi, .LC4[rip]
	mov	eax, 0
	call	printf@PLT
	lea	rsi, sighandler[rip]
	mov	edi, 2
	call	signal@PLT
	mov	esi, 70
	lea	rdi, .LC5[rip]
	call	ftok@PLT
	mov	DWORD PTR -1100[rbp], eax
	mov	eax, DWORD PTR -1100[rbp]
	mov	esi, eax
	lea	rdi, .LC6[rip]
	mov	eax, 0
	call	printf@PLT
	mov	esi, 71
	lea	rdi, .LC5[rip]
	call	ftok@PLT
	mov	DWORD PTR -1096[rbp], eax
	mov	eax, DWORD PTR -1096[rbp]
	mov	esi, eax
	lea	rdi, .LC7[rip]
	mov	eax, 0
	call	printf@PLT
	mov	eax, DWORD PTR -1100[rbp]
	mov	esi, 950
	mov	edi, eax
	call	msgget@PLT
	mov	DWORD PTR red_kom_id[rip], eax
	mov	eax, DWORD PTR red_kom_id[rip]
	mov	esi, eax
	lea	rdi, .LC8[rip]
	mov	eax, 0
	call	printf@PLT
	mov	eax, DWORD PTR -1096[rbp]
	mov	esi, 950
	mov	edi, eax
	call	msgget@PLT
	mov	DWORD PTR red_info_id[rip], eax
	mov	eax, DWORD PTR red_info_id[rip]
	mov	esi, eax
	lea	rdi, .LC9[rip]
	mov	eax, 0
	call	printf@PLT
.L30:
	mov	eax, DWORD PTR red_kom_id[rip]
	lea	rsi, -1088[rbp]
	mov	r8d, 0
	mov	ecx, 41
	mov	edx, 40
	mov	edi, eax
	call	msgrcv@PLT
	lea	rax, -1088[rbp]
	add	rax, 8
	lea	rsi, .LC10[rip]
	mov	rdi, rax
	call	strcmp@PLT
	test	eax, eax
	jne	.L21
	mov	eax, DWORD PTR -1124[rbp]
	lea	edx, 1[rax]
	mov	DWORD PTR -1124[rbp], edx
	mov	DWORD PTR -1056[rbp], eax
	mov	eax, DWORD PTR -1056[rbp]
	mov	DWORD PTR -1120[rbp], eax
	mov	QWORD PTR -1088[rbp], 42
	lea	rax, -1088[rbp]
	add	rax, 8
	movabs	rbx, 7668634426274312816
	mov	QWORD PTR [rax], rbx
	mov	DWORD PTR 8[rax], 1931505253
	mov	WORD PTR 12[rax], 105
	mov	eax, DWORD PTR red_kom_id[rip]
	lea	rsi, -1088[rbp]
	mov	ecx, 0
	mov	edx, 40
	mov	edi, eax
	call	msgsnd@PLT
.L21:
	mov	eax, DWORD PTR red_kom_id[rip]
	lea	rsi, -1040[rbp]
	mov	r8d, 0
	mov	ecx, 41
	mov	edx, 40
	mov	edi, eax
	call	msgrcv@PLT
	lea	rax, -1040[rbp]
	add	rax, 8
	lea	rsi, .LC10[rip]
	mov	rdi, rax
	call	strcmp@PLT
	test	eax, eax
	jne	.L22
	mov	eax, DWORD PTR -1124[rbp]
	lea	edx, 1[rax]
	mov	DWORD PTR -1124[rbp], edx
	mov	DWORD PTR -1008[rbp], eax
	mov	eax, DWORD PTR -1008[rbp]
	mov	DWORD PTR -1116[rbp], eax
	mov	QWORD PTR -1040[rbp], 42
	lea	rax, -1040[rbp]
	add	rax, 8
	movabs	rbx, 7668634426274312816
	mov	QWORD PTR [rax], rbx
	mov	DWORD PTR 8[rax], 1931505253
	mov	WORD PTR 12[rax], 105
	mov	eax, DWORD PTR red_kom_id[rip]
	lea	rsi, -1040[rbp]
	mov	ecx, 0
	mov	edx, 40
	mov	edi, eax
	call	msgsnd@PLT
.L22:
	call	fork@PLT
	mov	DWORD PTR -1092[rbp], eax
	cmp	DWORD PTR -1092[rbp], -1
	je	.L23
	cmp	DWORD PTR -1092[rbp], 0
	je	.L24
	jmp	.L32
.L23:
	lea	rdi, .LC11[rip]
	call	puts@PLT
	mov	edi, 1
	call	exit@PLT
.L24:
	mov	ebx, DWORD PTR br_partija[rip]
	call	getpid@PLT
	movsx	rdx, ebx
	lea	rcx, 0[0+rdx*4]
	lea	rdx, pid_niz[rip]
	mov	DWORD PTR [rcx+rdx], eax
.L28:
	mov	edx, DWORD PTR red_kom_id[rip]
	mov	ecx, DWORD PTR -1116[rbp]
	mov	eax, DWORD PTR -1120[rbp]
	mov	esi, ecx
	mov	edi, eax
	call	proveri_rec
	test	eax, eax
	jne	.L35
	jmp	.L28
.L35:
	nop
	mov	eax, 0
	mov	rbx, QWORD PTR -24[rbp]
	sub	rbx, QWORD PTR fs:40
	je	.L31
	jmp	.L34
.L32:
	mov	eax, DWORD PTR br_partija[rip]
	add	eax, 1
	mov	DWORD PTR br_partija[rip], eax
	nop
	jmp	.L30
.L34:
	call	__stack_chk_fail@PLT
.L31:
	mov	rbx, QWORD PTR -8[rbp]
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.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	"22014107.c"
	.text
	.global	flag
	.data
	.align	2
	.type	flag, %object
	.size	flag, 4
flag:
	.word	1
	.global	br_partija
	.bss
	.align	2
	.type	br_partija, %object
	.size	br_partija, 4
br_partija:
	.space	4
	.comm	red_kom_id,4,4
	.comm	red_info_id,4,4
	.comm	pid_niz,80,4
	.section	.rodata
	.align	2
.LC0:
	.ascii	"Partija igraca %d i %d je gotova\012\000"
	.align	2
.LC1:
	.ascii	"poraz\000"
	.align	2
.LC2:
	.ascii	"pobeda\000"
	.align	2
.LC3:
	.ascii	"\012%s\012\000"
	.align	2
.LC4:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	proveri_rec
	.syntax unified
	.arm
	.fpu softvfp
	.type	proveri_rec, %function
proveri_rec:
	@ args = 0, pretend = 0, frame = 1192
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #1200
	str	r0, [fp, #-1184]
	str	r1, [fp, #-1188]
	str	r2, [fp, #-1192]
	ldr	r3, .L12
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	sub	r1, fp, #1136
	sub	r1, r1, #4
	sub	r1, r1, #8
	mov	r3, #0
	str	r3, [sp]
	mov	r3, #43
	mov	r2, #32
	ldr	r0, [fp, #-1192]
	bl	msgrcv
	sub	r3, fp, #1136
	sub	r3, r3, #4
	sub	r3, r3, #8
	add	r2, r3, #4
	sub	r3, fp, #108
	mov	r1, r2
	mov	r0, r3
	bl	strcpy
	sub	r3, fp, #108
	mov	r0, r3
	bl	strlen
	mov	r3, r0
	str	r3, [fp, #-1180]
	ldr	r3, [fp, #-1180]
	sub	r3, r3, #2
	sub	r2, fp, #4
	add	r3, r2, r3
	ldrb	r3, [r3, #-104]	@ zero_extendqisi2
	cmp	r3, #110
	bne	.L2
	ldr	r3, [fp, #-1180]
	sub	r3, r3, #1
	sub	r2, fp, #4
	add	r3, r2, r3
	ldrb	r3, [r3, #-104]	@ zero_extendqisi2
	cmp	r3, #116
	bne	.L2
	ldr	r2, [fp, #-1188]
	ldr	r1, [fp, #-1184]
	ldr	r0, .L12+4
	bl	printf
	sub	r3, fp, #1168
	sub	r3, r3, #4
	sub	r3, r3, #4
	add	r3, r3, #4
	ldr	r2, .L12+8
	ldm	r2, {r0, r1}
	str	r0, [r3]
	add	r3, r3, #4
	strh	r1, [r3]	@ movhi
	ldr	r3, .L12+12
	ldr	r3, [r3]
	cmp	r3, #0
	beq	.L3
	ldr	r3, [fp, #-1188]
	str	r3, [fp, #-1176]
	b	.L4
.L3:
	ldr	r3, [fp, #-1184]
	str	r3, [fp, #-1176]
.L4:
	sub	r1, fp, #1168
	sub	r1, r1, #4
	sub	r1, r1, #4
	mov	r3, #0
	mov	r2, #28
	ldr	r0, [fp, #-1192]
	bl	msgsnd
	sub	r3, fp, #1168
	sub	r3, r3, #4
	sub	r3, r3, #4
	add	r3, r3, #4
	ldr	r2, .L12+16
	ldm	r2, {r0, r1}
	str	r0, [r3]
	add	r3, r3, #4
	strh	r1, [r3]	@ movhi
	add	r3, r3, #2
	lsr	r2, r1, #16
	strb	r2, [r3]
	ldr	r3, .L12+12
	ldr	r3, [r3]
	cmp	r3, #0
	beq	.L5
	ldr	r3, [fp, #-1184]
	str	r3, [fp, #-1176]
	ldr	r3, [fp, #-1176]
	str	r3, [fp, #-112]
	b	.L6
.L5:
	ldr	r3, [fp, #-1188]
	str	r3, [fp, #-1176]
	ldr	r3, [fp, #-1176]
	str	r3, [fp, #-112]
.L6:
	sub	r1, fp, #1168
	sub	r1, r1, #4
	sub	r1, r1, #4
	mov	r3, #0
	mov	r2, #28
	ldr	r0, [fp, #-1192]
	bl	msgsnd
	mov	r3, #1
	str	r3, [fp, #-1116]
	ldr	r3, .L12+20
	ldr	r0, [r3]
	sub	r1, fp, #1104
	sub	r1, r1, #4
	sub	r1, r1, #8
	mov	r3, #0
	mov	r2, #1008
	bl	msgsnd
	mov	r3, #1
	b	.L10
.L2:
	ldr	r3, .L12+12
	ldr	r3, [r3]
	cmp	r3, #0
	beq	.L8
	ldr	r3, [fp, #-1188]
	str	r3, [fp, #-1176]
	ldr	r3, .L12+12
	mov	r2, #0
	str	r2, [r3]
	b	.L9
.L8:
	ldr	r3, [fp, #-1184]
	str	r3, [fp, #-1176]
	ldr	r3, .L12+12
	mov	r2, #1
	str	r2, [r3]
.L9:
	sub	r2, fp, #108
	sub	r3, fp, #1168
	sub	r3, r3, #4
	sub	r3, r3, #4
	add	r3, r3, #4
	mov	r1, r2
	mov	r0, r3
	bl	strcpy
	sub	r3, fp, #1168
	sub	r3, r3, #4
	sub	r3, r3, #4
	add	r3, r3, #4
	mov	r1, r3
	ldr	r0, .L12+24
	bl	printf
	sub	r1, fp, #1168
	sub	r1, r1, #4
	sub	r1, r1, #4
	mov	r3, #0
	mov	r2, #28
	ldr	r0, [fp, #-1192]
	bl	msgsnd
	mov	r3, #0
.L10:
	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	.LC4
	.word	.LC0
	.word	.LC1
	.word	flag
	.word	.LC2
	.word	red_info_id
	.word	.LC3
	.size	proveri_rec, .-proveri_rec
	.section	.rodata
	.align	2
.LC5:
	.ascii	"Turnir je zavrsen\000"
	.align	2
.LC6:
	.ascii	"Neparna/parna pozicija - %d/%d\012\000"
	.align	2
.LC7:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	sighandler
	.syntax unified
	.arm
	.fpu softvfp
	.type	sighandler, %function
sighandler:
	@ args = 0, pretend = 0, frame = 1032
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #1040
	str	r0, [fp, #-1032]
	ldr	r3, .L22
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	mov	r3, #0
	str	r3, [fp, #-1024]
	mov	r3, #0
	str	r3, [fp, #-1020]
	mov	r3, #0
	str	r3, [fp, #-1028]
	b	.L15
.L16:
	ldr	r2, .L22+4
	ldr	r3, [fp, #-1028]
	ldr	r3, [r2, r3, lsl #2]
	mov	r2, #0
	mov	r1, #0
	mov	r0, r3
	bl	waitpid
	ldr	r3, [fp, #-1028]
	add	r3, r3, #1
	str	r3, [fp, #-1028]
.L15:
	ldr	r3, .L22+8
	ldr	r3, [r3]
	lsl	r3, r3, #1
	ldr	r2, [fp, #-1028]
	cmp	r2, r3
	blt	.L16
	mov	r3, #0
	str	r3, [fp, #-1028]
	b	.L17
.L20:
	ldr	r3, .L22+12
	ldr	r0, [r3]
	sub	r1, fp, #1016
	mov	r3, #0
	str	r3, [sp]
	mov	r3, #1
	mov	r2, #1008
	bl	msgrcv
	ldr	r3, [fp, #-12]
	and	r3, r3, #1
	cmp	r3, #0
	bne	.L18
	ldr	r3, [fp, #-1024]
	add	r3, r3, #1
	str	r3, [fp, #-1024]
	b	.L19
.L18:
	ldr	r3, [fp, #-1020]
	add	r3, r3, #1
	str	r3, [fp, #-1020]
.L19:
	ldr	r3, [fp, #-1028]
	add	r3, r3, #1
	str	r3, [fp, #-1028]
.L17:
	ldr	r3, .L22+8
	ldr	r3, [r3]
	ldr	r2, [fp, #-1028]
	cmp	r2, r3
	blt	.L20
	ldr	r0, .L22+16
	bl	puts
	ldr	r2, [fp, #-1024]
	ldr	r1, [fp, #-1020]
	ldr	r0, .L22+20
	bl	printf
	ldr	r3, .L22+24
	ldr	r3, [r3]
	mov	r2, #0
	mov	r1, #0
	mov	r0, r3
	bl	msgctl
	ldr	r3, .L22+12
	ldr	r3, [r3]
	mov	r2, #0
	mov	r1, #0
	mov	r0, r3
	bl	msgctl
	mov	r0, #0
	bl	exit
.L23:
	.align	2
.L22:
	.word	.LC7
	.word	pid_niz
	.word	br_partija
	.word	red_info_id
	.word	.LC5
	.word	.LC6
	.word	red_kom_id
	.size	sighandler, .-sighandler
	.section	.rodata
	.align	2
.LC8:
	.ascii	"pid servera: %d\012\000"
	.align	2
.LC9:
	.ascii	"./kostur-server.c\000"
	.align	2
.LC10:
	.ascii	"key_red_kom = %d\012\000"
	.align	2
.LC11:
	.ascii	"key_red_info = %d\012\000"
	.align	2
.LC12:
	.ascii	"red_kom_id = %d\012\000"
	.align	2
.LC13:
	.ascii	"red_info_id = %d\012\000"
	.align	2
.LC14:
	.ascii	"prijavi me\000"
	.align	2
.LC15:
	.ascii	"prijavljen si\000"
	.align	2
.LC16:
	.ascii	"Doslo je do greske u forkovanju!\000"
	.align	2
.LC17:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 1080
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, fp, lr}
	add	fp, sp, #8
	sub	sp, sp, #1088
	sub	sp, sp, #4
	ldr	r3, .L40
	ldr	r3, [r3]
	str	r3, [fp, #-16]
	mov	r3,#0
	mov	r3, #1
	str	r3, [fp, #-1092]
	mov	r3, #0
	str	r3, [fp, #-1080]
	mov	r3, #1
	str	r3, [fp, #-1076]
	bl	getpid
	str	r0, [fp, #-1072]
	ldr	r1, [fp, #-1072]
	ldr	r0, .L40+4
	bl	printf
	ldr	r1, .L40+8
	mov	r0, #2
	bl	signal
	mov	r1, #70
	ldr	r0, .L40+12
	bl	ftok
	str	r0, [fp, #-1068]
	ldr	r1, [fp, #-1068]
	ldr	r0, .L40+16
	bl	printf
	mov	r1, #71
	ldr	r0, .L40+12
	bl	ftok
	str	r0, [fp, #-1064]
	ldr	r1, [fp, #-1064]
	ldr	r0, .L40+20
	bl	printf
	ldr	r1, .L40+24
	ldr	r0, [fp, #-1068]
	bl	msgget
	mov	r3, r0
	ldr	r2, .L40+28
	str	r3, [r2]
	ldr	r3, .L40+28
	ldr	r3, [r3]
	mov	r1, r3
	ldr	r0, .L40+32
	bl	printf
	ldr	r1, .L40+24
	ldr	r0, [fp, #-1064]
	bl	msgget
	mov	r3, r0
	ldr	r2, .L40+36
	str	r3, [r2]
	ldr	r3, .L40+36
	ldr	r3, [r3]
	mov	r1, r3
	ldr	r0, .L40+40
	bl	printf
.L34:
	ldr	r3, .L40+28
	ldr	r0, [r3]
	sub	r1, fp, #1040
	sub	r1, r1, #12
	sub	r1, r1, #4
	mov	r3, #0
	str	r3, [sp]
	mov	r3, #41
	mov	r2, #32
	bl	msgrcv
	sub	r3, fp, #1040
	sub	r3, r3, #12
	sub	r3, r3, #4
	add	r3, r3, #4
	ldr	r1, .L40+44
	mov	r0, r3
	bl	strcmp
	mov	r3, r0
	cmp	r3, #0
	bne	.L25
	ldr	r3, [fp, #-1092]
	add	r2, r3, #1
	str	r2, [fp, #-1092]
	str	r3, [fp, #-1028]
	ldr	r3, [fp, #-1028]
	str	r3, [fp, #-1088]
	mov	r3, #42
	str	r3, [fp, #-1056]
	sub	r3, fp, #1040
	sub	r3, r3, #12
	sub	r3, r3, #4
	add	r3, r3, #4
	ldr	r2, .L40+48
	mov	ip, r3
	mov	r3, r2
	ldm	r3, {r0, r1, r2, r3}
	stmia	ip!, {r0, r1, r2}
	strh	r3, [ip]	@ movhi
	ldr	r3, .L40+28
	ldr	r0, [r3]
	sub	r1, fp, #1040
	sub	r1, r1, #12
	sub	r1, r1, #4
	mov	r3, #0
	mov	r2, #32
	bl	msgsnd
.L25:
	ldr	r3, .L40+28
	ldr	r0, [r3]
	sub	r1, fp, #1024
	mov	r3, #0
	str	r3, [sp]
	mov	r3, #41
	mov	r2, #32
	bl	msgrcv
	sub	r3, fp, #1024
	add	r3, r3, #4
	ldr	r1, .L40+44
	mov	r0, r3
	bl	strcmp
	mov	r3, r0
	cmp	r3, #0
	bne	.L26
	ldr	r3, [fp, #-1092]
	add	r2, r3, #1
	str	r2, [fp, #-1092]
	str	r3, [fp, #-996]
	ldr	r3, [fp, #-996]
	str	r3, [fp, #-1084]
	mov	r3, #42
	str	r3, [fp, #-1024]
	sub	r3, fp, #1024
	add	r3, r3, #4
	ldr	r2, .L40+48
	mov	ip, r3
	mov	r3, r2
	ldm	r3, {r0, r1, r2, r3}
	stmia	ip!, {r0, r1, r2}
	strh	r3, [ip]	@ movhi
	ldr	r3, .L40+28
	ldr	r0, [r3]
	sub	r1, fp, #1024
	mov	r3, #0
	mov	r2, #32
	bl	msgsnd
.L26:
	bl	fork
	mov	r3, r0
	str	r3, [fp, #-1060]
	ldr	r3, [fp, #-1060]
	cmn	r3, #1
	beq	.L27
	ldr	r3, [fp, #-1060]
	cmp	r3, #0
	beq	.L28
	b	.L36
.L27:
	ldr	r0, .L40+52
	bl	puts
	mov	r0, #1
	bl	exit
.L28:
	ldr	r3, .L40+56
	ldr	r4, [r3]
	bl	getpid
	mov	r3, r0
	ldr	r2, .L40+60
	str	r3, [r2, r4, lsl #2]
.L32:
	ldr	r3, .L40+28
	ldr	r3, [r3]
	mov	r2, r3
	ldr	r1, [fp, #-1084]
	ldr	r0, [fp, #-1088]
	bl	proveri_rec
	mov	r3, r0
	cmp	r3, #0
	bne	.L39
	b	.L32
.L39:
	nop
	mov	r3, #0
	ldr	r2, .L40
	ldr	r1, [r2]
	ldr	r2, [fp, #-16]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L35
	b	.L38
.L36:
	ldr	r3, .L40+56
	ldr	r3, [r3]
	add	r3, r3, #1
	ldr	r2, .L40+56
	str	r3, [r2]
	nop
	b	.L34
.L38:
	bl	__stack_chk_fail
.L35:
	mov	r0, r3
	sub	sp, fp, #8
	@ sp needed
	pop	{r4, fp, pc}
.L41:
	.align	2
.L40:
	.word	.LC17
	.word	.LC8
	.word	sighandler
	.word	.LC9
	.word	.LC10
	.word	.LC11
	.word	950
	.word	red_kom_id
	.word	.LC12
	.word	red_info_id
	.word	.LC13
	.word	.LC14
	.word	.LC15
	.word	.LC16
	.word	br_partija
	.word	pid_niz
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
