	.file	"909157.c"
	.intel_syntax noprefix
	.text
	.globl	ShmId
	.bss
	.align 4
	.type	ShmId, @object
	.size	ShmId, 4
ShmId:
	.zero	4
	.globl	A
	.align 8
	.type	A, @object
	.size	A, 8
A:
	.zero	8
	.globl	BROJ
	.align 8
	.type	BROJ, @object
	.size	BROJ, 8
BROJ:
	.zero	8
	.globl	TRAZIM
	.align 8
	.type	TRAZIM, @object
	.size	TRAZIM, 8
TRAZIM:
	.zero	8
	.globl	N
	.align 4
	.type	N, @object
	.size	N, 4
N:
	.zero	4
	.globl	M
	.align 4
	.type	M, @object
	.size	M, 4
M:
	.zero	4
	.text
	.globl	getMax
	.type	getMax, @function
getMax:
.LFB0:
	.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 -24[rbp], rdi
	mov	rax, QWORD PTR -24[rbp]
	mov	eax, DWORD PTR [rax]
	mov	DWORD PTR -4[rbp], eax
	mov	DWORD PTR -8[rbp], 1
	jmp	.L2
.L4:
	mov	eax, DWORD PTR -8[rbp]
	cdqe
	lea	rdx, 0[0+rax*4]
	mov	rax, QWORD PTR -24[rbp]
	add	rax, rdx
	mov	eax, DWORD PTR [rax]
	cmp	DWORD PTR -4[rbp], eax
	jge	.L3
	mov	eax, DWORD PTR -8[rbp]
	cdqe
	lea	rdx, 0[0+rax*4]
	mov	rax, QWORD PTR -24[rbp]
	add	rax, rdx
	mov	eax, DWORD PTR [rax]
	mov	DWORD PTR -4[rbp], eax
.L3:
	add	DWORD PTR -8[rbp], 1
.L2:
	mov	eax, DWORD PTR N[rip]
	cmp	DWORD PTR -8[rbp], eax
	jl	.L4
	mov	eax, DWORD PTR -4[rbp]
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	getMax, .-getMax
	.section	.rodata
	.align 8
.LC0:
	.string	"Trenutno je proces no.%d u KO i postavlja vrijednost A na %d\n"
	.text
	.globl	udji_u_ko
	.type	udji_u_ko, @function
udji_u_ko:
.LFB1:
	.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	rdx, QWORD PTR TRAZIM[rip]
	mov	eax, DWORD PTR -20[rbp]
	cdqe
	sal	rax, 2
	add	rax, rdx
	mov	DWORD PTR [rax], 1
	mov	rax, QWORD PTR BROJ[rip]
	mov	rdi, rax
	call	getMax
	mov	rcx, QWORD PTR BROJ[rip]
	mov	edx, DWORD PTR -20[rbp]
	movsx	rdx, edx
	sal	rdx, 2
	add	rdx, rcx
	add	eax, 1
	mov	DWORD PTR [rdx], eax
	mov	rdx, QWORD PTR TRAZIM[rip]
	mov	eax, DWORD PTR -20[rbp]
	cdqe
	sal	rax, 2
	add	rax, rdx
	mov	DWORD PTR [rax], 0
	mov	DWORD PTR -4[rbp], 0
	jmp	.L7
.L9:
	nop
.L8:
	mov	rdx, QWORD PTR TRAZIM[rip]
	mov	eax, DWORD PTR -4[rbp]
	cdqe
	sal	rax, 2
	add	rax, rdx
	mov	eax, DWORD PTR [rax]
	test	eax, eax
	jne	.L9
	jmp	.L10
.L12:
	nop
.L10:
	mov	rdx, QWORD PTR BROJ[rip]
	mov	eax, DWORD PTR -4[rbp]
	cdqe
	sal	rax, 2
	add	rax, rdx
	mov	eax, DWORD PTR [rax]
	test	eax, eax
	je	.L11
	mov	rdx, QWORD PTR BROJ[rip]
	mov	eax, DWORD PTR -4[rbp]
	cdqe
	sal	rax, 2
	add	rax, rdx
	mov	edx, DWORD PTR [rax]
	mov	rcx, QWORD PTR BROJ[rip]
	mov	eax, DWORD PTR -20[rbp]
	cdqe
	sal	rax, 2
	add	rax, rcx
	mov	eax, DWORD PTR [rax]
	cmp	edx, eax
	jl	.L12
	mov	rdx, QWORD PTR BROJ[rip]
	mov	eax, DWORD PTR -4[rbp]
	cdqe
	sal	rax, 2
	add	rax, rdx
	mov	edx, DWORD PTR [rax]
	mov	rcx, QWORD PTR BROJ[rip]
	mov	eax, DWORD PTR -20[rbp]
	cdqe
	sal	rax, 2
	add	rax, rcx
	mov	eax, DWORD PTR [rax]
	cmp	edx, eax
	jne	.L11
	mov	eax, DWORD PTR -4[rbp]
	cmp	eax, DWORD PTR -20[rbp]
	jl	.L12
.L11:
	add	DWORD PTR -4[rbp], 1
.L7:
	mov	eax, DWORD PTR N[rip]
	cmp	DWORD PTR -4[rbp], eax
	jl	.L8
	mov	rax, QWORD PTR A[rip]
	mov	edx, DWORD PTR [rax]
	add	edx, 1
	mov	DWORD PTR [rax], edx
	mov	rax, QWORD PTR A[rip]
	mov	eax, DWORD PTR [rax]
	mov	edx, DWORD PTR -20[rbp]
	lea	ecx, 1[rdx]
	mov	edx, eax
	mov	esi, ecx
	lea	rdi, .LC0[rip]
	mov	eax, 0
	call	printf@PLT
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.size	udji_u_ko, .-udji_u_ko
	.globl	izadji_iz_ko
	.type	izadji_iz_ko, @function
izadji_iz_ko:
.LFB2:
	.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 -4[rbp], edi
	mov	rdx, QWORD PTR BROJ[rip]
	mov	eax, DWORD PTR -4[rbp]
	cdqe
	sal	rax, 2
	add	rax, rdx
	mov	DWORD PTR [rax], 0
	nop
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE2:
	.size	izadji_iz_ko, .-izadji_iz_ko
	.section	.rodata
	.align 8
.LC1:
	.string	" Doslo je do greske kod otpustanja segmenta!"
	.align 8
.LC2:
	.string	" Doslo je do greske kod unistavanja segmenta!"
	.text
	.globl	obrisi
	.type	obrisi, @function
obrisi:
.LFB3:
	.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	rax, QWORD PTR A[rip]
	mov	rdi, rax
	call	shmdt@PLT
	cmp	eax, -1
	jne	.L16
	lea	rdi, .LC1[rip]
	call	puts@PLT
	mov	edi, 1
	call	exit@PLT
.L16:
	mov	eax, DWORD PTR ShmId[rip]
	mov	edx, 0
	mov	esi, 0
	mov	edi, eax
	call	shmctl@PLT
	cmp	eax, -1
	jne	.L17
	lea	rdi, .LC2[rip]
	call	puts@PLT
	mov	edi, 1
	call	exit@PLT
.L17:
	mov	edi, 0
	call	exit@PLT
	.cfi_endproc
.LFE3:
	.size	obrisi, .-obrisi
	.globl	procesi
	.type	procesi, @function
procesi:
.LFB4:
	.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
.L19:
	mov	eax, DWORD PTR -4[rbp]
	mov	edi, eax
	call	udji_u_ko
	mov	eax, DWORD PTR -4[rbp]
	mov	edi, eax
	call	izadji_iz_ko
	mov	eax, DWORD PTR M[rip]
	sub	eax, 1
	mov	DWORD PTR M[rip], eax
	mov	eax, DWORD PTR M[rip]
	test	eax, eax
	jg	.L19
	nop
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE4:
	.size	procesi, .-procesi
	.section	.rodata
	.align 8
.LC3:
	.string	"Nije unesen tocan broj argumenata preko komandne ljuske!"
	.align 8
.LC4:
	.string	"Doslo je do greske prilikom alociranja novog zajednickog segmenta!"
	.align 8
.LC5:
	.string	"Doslo je do greske prilikom vezanja segmenta na odredenu adresu!"
	.align 8
.LC6:
	.string	"Dogodila se greska kod kreiranja djete procesa!"
.LC7:
	.string	"A = %d\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB5:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 32
	mov	DWORD PTR -20[rbp], edi
	mov	QWORD PTR -32[rbp], rsi
	cmp	DWORD PTR -20[rbp], 3
	je	.L21
	lea	rdi, .LC3[rip]
	call	puts@PLT
	mov	edi, 1
	call	exit@PLT
.L21:
	lea	rsi, obrisi[rip]
	mov	edi, 2
	call	sigset@PLT
	mov	rax, QWORD PTR -32[rbp]
	add	rax, 8
	mov	rax, QWORD PTR [rax]
	mov	rdi, rax
	call	atoi@PLT
	mov	DWORD PTR N[rip], eax
	mov	rax, QWORD PTR -32[rbp]
	add	rax, 16
	mov	rax, QWORD PTR [rax]
	mov	rdi, rax
	call	atoi@PLT
	mov	DWORD PTR M[rip], eax
	mov	eax, DWORD PTR N[rip]
	add	eax, eax
	add	eax, 1
	cdqe
	sal	rax, 2
	mov	edx, 384
	mov	rsi, rax
	mov	edi, 0
	call	shmget@PLT
	mov	DWORD PTR ShmId[rip], eax
	mov	eax, DWORD PTR ShmId[rip]
	cmp	eax, -1
	jne	.L22
	lea	rdi, .LC4[rip]
	call	puts@PLT
	mov	edi, 1
	call	exit@PLT
.L22:
	mov	eax, DWORD PTR ShmId[rip]
	mov	edx, 0
	mov	esi, 0
	mov	edi, eax
	call	shmat@PLT
	mov	QWORD PTR A[rip], rax
	mov	rax, QWORD PTR A[rip]
	mov	eax, DWORD PTR [rax]
	cmp	eax, -1
	jne	.L23
	lea	rdi, .LC5[rip]
	call	puts@PLT
	mov	edi, 1
	call	exit@PLT
.L23:
	mov	rdx, QWORD PTR A[rip]
	mov	eax, DWORD PTR N[rip]
	cdqe
	sal	rax, 2
	add	rax, rdx
	mov	QWORD PTR BROJ[rip], rax
	mov	rdx, QWORD PTR BROJ[rip]
	mov	eax, DWORD PTR N[rip]
	cdqe
	sal	rax, 2
	add	rax, rdx
	mov	QWORD PTR TRAZIM[rip], rax
	mov	rax, QWORD PTR A[rip]
	mov	DWORD PTR [rax], 0
	mov	DWORD PTR -4[rbp], 0
	jmp	.L24
.L25:
	mov	rdx, QWORD PTR BROJ[rip]
	mov	eax, DWORD PTR -4[rbp]
	cdqe
	sal	rax, 2
	add	rax, rdx
	mov	DWORD PTR [rax], 0
	add	DWORD PTR -4[rbp], 1
.L24:
	mov	eax, DWORD PTR N[rip]
	cmp	DWORD PTR -4[rbp], eax
	jl	.L25
	mov	DWORD PTR -4[rbp], 0
	jmp	.L26
.L29:
	call	fork@PLT
	cmp	eax, -1
	je	.L27
	test	eax, eax
	jne	.L34
	mov	eax, DWORD PTR -4[rbp]
	mov	edi, eax
	call	procesi
	mov	edi, 0
	call	exit@PLT
.L27:
	lea	rdi, .LC6[rip]
	call	puts@PLT
	mov	edi, 1
	call	exit@PLT
.L34:
	nop
	add	DWORD PTR -4[rbp], 1
.L26:
	mov	eax, DWORD PTR N[rip]
	cmp	DWORD PTR -4[rbp], eax
	jl	.L29
	jmp	.L30
.L31:
	mov	edi, 0
	call	wait@PLT
.L30:
	mov	eax, DWORD PTR -4[rbp]
	lea	edx, -1[rax]
	mov	DWORD PTR -4[rbp], edx
	test	eax, eax
	jne	.L31
	mov	rax, QWORD PTR A[rip]
	mov	eax, DWORD PTR [rax]
	mov	esi, eax
	lea	rdi, .LC7[rip]
	mov	eax, 0
	call	printf@PLT
	mov	edi, 0
	call	obrisi
	mov	eax, 0
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE5:
	.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	"909157.c"
	.text
	.comm	ShmId,4,4
	.comm	A,4,4
	.comm	BROJ,4,4
	.comm	TRAZIM,4,4
	.comm	N,4,4
	.comm	M,4,4
	.align	2
	.global	getMax
	.syntax unified
	.arm
	.fpu softvfp
	.type	getMax, %function
getMax:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 1, uses_anonymous_args = 0
	@ link register save eliminated.
	str	fp, [sp, #-4]!
	add	fp, sp, #0
	sub	sp, sp, #20
	str	r0, [fp, #-16]
	ldr	r3, [fp, #-16]
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3, #1
	str	r3, [fp, #-12]
	b	.L2
.L4:
	ldr	r3, [fp, #-12]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-16]
	add	r3, r2, r3
	ldr	r3, [r3]
	ldr	r2, [fp, #-8]
	cmp	r2, r3
	bge	.L3
	ldr	r3, [fp, #-12]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-16]
	add	r3, r2, r3
	ldr	r3, [r3]
	str	r3, [fp, #-8]
.L3:
	ldr	r3, [fp, #-12]
	add	r3, r3, #1
	str	r3, [fp, #-12]
.L2:
	ldr	r3, .L6
	ldr	r3, [r3]
	ldr	r2, [fp, #-12]
	cmp	r2, r3
	blt	.L4
	ldr	r3, [fp, #-8]
	mov	r0, r3
	add	sp, fp, #0
	@ sp needed
	ldr	fp, [sp], #4
	bx	lr
.L7:
	.align	2
.L6:
	.word	N
	.size	getMax, .-getMax
	.section	.rodata
	.align	2
.LC0:
	.ascii	"Trenutno je proces no.%d u KO i postavlja vrijednos"
	.ascii	"t A na %d\012\000"
	.text
	.align	2
	.global	udji_u_ko
	.syntax unified
	.arm
	.fpu softvfp
	.type	udji_u_ko, %function
udji_u_ko:
	@ 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	r3, .L16
	ldr	r2, [r3]
	ldr	r3, [fp, #-16]
	lsl	r3, r3, #2
	add	r3, r2, r3
	mov	r2, #1
	str	r2, [r3]
	ldr	r3, .L16+4
	ldr	r3, [r3]
	mov	r0, r3
	bl	getMax
	mov	r1, r0
	ldr	r3, .L16+4
	ldr	r2, [r3]
	ldr	r3, [fp, #-16]
	lsl	r3, r3, #2
	add	r3, r2, r3
	add	r2, r1, #1
	str	r2, [r3]
	ldr	r3, .L16
	ldr	r2, [r3]
	ldr	r3, [fp, #-16]
	lsl	r3, r3, #2
	add	r3, r2, r3
	mov	r2, #0
	str	r2, [r3]
	mov	r3, #0
	str	r3, [fp, #-8]
	b	.L9
.L11:
	nop
.L10:
	ldr	r3, .L16
	ldr	r2, [r3]
	ldr	r3, [fp, #-8]
	lsl	r3, r3, #2
	add	r3, r2, r3
	ldr	r3, [r3]
	cmp	r3, #0
	bne	.L11
	b	.L12
.L14:
	nop
.L12:
	ldr	r3, .L16+4
	ldr	r2, [r3]
	ldr	r3, [fp, #-8]
	lsl	r3, r3, #2
	add	r3, r2, r3
	ldr	r3, [r3]
	cmp	r3, #0
	beq	.L13
	ldr	r3, .L16+4
	ldr	r2, [r3]
	ldr	r3, [fp, #-8]
	lsl	r3, r3, #2
	add	r3, r2, r3
	ldr	r2, [r3]
	ldr	r3, .L16+4
	ldr	r1, [r3]
	ldr	r3, [fp, #-16]
	lsl	r3, r3, #2
	add	r3, r1, r3
	ldr	r3, [r3]
	cmp	r2, r3
	blt	.L14
	ldr	r3, .L16+4
	ldr	r2, [r3]
	ldr	r3, [fp, #-8]
	lsl	r3, r3, #2
	add	r3, r2, r3
	ldr	r2, [r3]
	ldr	r3, .L16+4
	ldr	r1, [r3]
	ldr	r3, [fp, #-16]
	lsl	r3, r3, #2
	add	r3, r1, r3
	ldr	r3, [r3]
	cmp	r2, r3
	bne	.L13
	ldr	r2, [fp, #-8]
	ldr	r3, [fp, #-16]
	cmp	r2, r3
	blt	.L14
.L13:
	ldr	r3, [fp, #-8]
	add	r3, r3, #1
	str	r3, [fp, #-8]
.L9:
	ldr	r3, .L16+8
	ldr	r3, [r3]
	ldr	r2, [fp, #-8]
	cmp	r2, r3
	blt	.L10
	ldr	r3, .L16+12
	ldr	r3, [r3]
	ldr	r2, [r3]
	add	r2, r2, #1
	str	r2, [r3]
	ldr	r3, [fp, #-16]
	add	r1, r3, #1
	ldr	r3, .L16+12
	ldr	r3, [r3]
	ldr	r3, [r3]
	mov	r2, r3
	ldr	r0, .L16+16
	bl	printf
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L17:
	.align	2
.L16:
	.word	TRAZIM
	.word	BROJ
	.word	N
	.word	A
	.word	.LC0
	.size	udji_u_ko, .-udji_u_ko
	.align	2
	.global	izadji_iz_ko
	.syntax unified
	.arm
	.fpu softvfp
	.type	izadji_iz_ko, %function
izadji_iz_ko:
	@ 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]
	ldr	r3, .L19
	ldr	r2, [r3]
	ldr	r3, [fp, #-8]
	lsl	r3, r3, #2
	add	r3, r2, r3
	mov	r2, #0
	str	r2, [r3]
	nop
	add	sp, fp, #0
	@ sp needed
	ldr	fp, [sp], #4
	bx	lr
.L20:
	.align	2
.L19:
	.word	BROJ
	.size	izadji_iz_ko, .-izadji_iz_ko
	.section	.rodata
	.align	2
.LC1:
	.ascii	" Doslo je do greske kod otpustanja segmenta!\000"
	.align	2
.LC2:
	.ascii	" Doslo je do greske kod unistavanja segmenta!\000"
	.text
	.align	2
	.global	obrisi
	.syntax unified
	.arm
	.fpu softvfp
	.type	obrisi, %function
obrisi:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #8
	str	r0, [fp, #-8]
	ldr	r3, .L24
	ldr	r3, [r3]
	mov	r0, r3
	bl	shmdt
	mov	r3, r0
	cmn	r3, #1
	bne	.L22
	ldr	r0, .L24+4
	bl	puts
	mov	r0, #1
	bl	exit
.L22:
	ldr	r3, .L24+8
	ldr	r3, [r3]
	mov	r2, #0
	mov	r1, #0
	mov	r0, r3
	bl	shmctl
	mov	r3, r0
	cmn	r3, #1
	bne	.L23
	ldr	r0, .L24+12
	bl	puts
	mov	r0, #1
	bl	exit
.L23:
	mov	r0, #0
	bl	exit
.L25:
	.align	2
.L24:
	.word	A
	.word	.LC1
	.word	ShmId
	.word	.LC2
	.size	obrisi, .-obrisi
	.align	2
	.global	procesi
	.syntax unified
	.arm
	.fpu softvfp
	.type	procesi, %function
procesi:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #8
	str	r0, [fp, #-8]
.L27:
	ldr	r0, [fp, #-8]
	bl	udji_u_ko
	ldr	r0, [fp, #-8]
	bl	izadji_iz_ko
	ldr	r3, .L28
	ldr	r3, [r3]
	sub	r3, r3, #1
	ldr	r2, .L28
	str	r3, [r2]
	ldr	r3, .L28
	ldr	r3, [r3]
	cmp	r3, #0
	bgt	.L27
	nop
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L29:
	.align	2
.L28:
	.word	M
	.size	procesi, .-procesi
	.section	.rodata
	.align	2
.LC3:
	.ascii	"Nije unesen tocan broj argumenata preko komandne lj"
	.ascii	"uske!\000"
	.align	2
.LC4:
	.ascii	"Doslo je do greske prilikom alociranja novog zajedn"
	.ascii	"ickog segmenta!\000"
	.align	2
.LC5:
	.ascii	"Doslo je do greske prilikom vezanja segmenta na odr"
	.ascii	"edenu adresu!\000"
	.align	2
.LC6:
	.ascii	"Dogodila se greska kod kreiranja djete procesa!\000"
	.align	2
.LC7:
	.ascii	"A = %d\012\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
	str	r0, [fp, #-16]
	str	r1, [fp, #-20]
	ldr	r3, [fp, #-16]
	cmp	r3, #3
	beq	.L31
	ldr	r0, .L45
	bl	puts
	mov	r0, #1
	bl	exit
.L31:
	ldr	r1, .L45+4
	mov	r0, #2
	bl	sigset
	ldr	r3, [fp, #-20]
	add	r3, r3, #4
	ldr	r3, [r3]
	mov	r0, r3
	bl	atoi
	mov	r3, r0
	ldr	r2, .L45+8
	str	r3, [r2]
	ldr	r3, [fp, #-20]
	add	r3, r3, #8
	ldr	r3, [r3]
	mov	r0, r3
	bl	atoi
	mov	r3, r0
	ldr	r2, .L45+12
	str	r3, [r2]
	ldr	r3, .L45+8
	ldr	r3, [r3]
	lsl	r3, r3, #1
	add	r3, r3, #1
	lsl	r3, r3, #2
	mov	r2, #384
	mov	r1, r3
	mov	r0, #0
	bl	shmget
	mov	r3, r0
	ldr	r2, .L45+16
	str	r3, [r2]
	ldr	r3, .L45+16
	ldr	r3, [r3]
	cmn	r3, #1
	bne	.L32
	ldr	r0, .L45+20
	bl	puts
	mov	r0, #1
	bl	exit
.L32:
	ldr	r3, .L45+16
	ldr	r3, [r3]
	mov	r2, #0
	mov	r1, #0
	mov	r0, r3
	bl	shmat
	mov	r3, r0
	ldr	r2, .L45+24
	str	r3, [r2]
	ldr	r3, .L45+24
	ldr	r3, [r3]
	ldr	r3, [r3]
	cmn	r3, #1
	bne	.L33
	ldr	r0, .L45+28
	bl	puts
	mov	r0, #1
	bl	exit
.L33:
	ldr	r3, .L45+24
	ldr	r2, [r3]
	ldr	r3, .L45+8
	ldr	r3, [r3]
	lsl	r3, r3, #2
	add	r3, r2, r3
	ldr	r2, .L45+32
	str	r3, [r2]
	ldr	r3, .L45+32
	ldr	r2, [r3]
	ldr	r3, .L45+8
	ldr	r3, [r3]
	lsl	r3, r3, #2
	add	r3, r2, r3
	ldr	r2, .L45+36
	str	r3, [r2]
	ldr	r3, .L45+24
	ldr	r3, [r3]
	mov	r2, #0
	str	r2, [r3]
	mov	r3, #0
	str	r3, [fp, #-8]
	b	.L34
.L35:
	ldr	r3, .L45+32
	ldr	r2, [r3]
	ldr	r3, [fp, #-8]
	lsl	r3, r3, #2
	add	r3, r2, r3
	mov	r2, #0
	str	r2, [r3]
	ldr	r3, [fp, #-8]
	add	r3, r3, #1
	str	r3, [fp, #-8]
.L34:
	ldr	r3, .L45+8
	ldr	r3, [r3]
	ldr	r2, [fp, #-8]
	cmp	r2, r3
	blt	.L35
	mov	r3, #0
	str	r3, [fp, #-8]
	b	.L36
.L39:
	bl	fork
	mov	r3, r0
	cmn	r3, #1
	beq	.L37
	cmp	r3, #0
	bne	.L44
	ldr	r0, [fp, #-8]
	bl	procesi
	mov	r0, #0
	bl	exit
.L37:
	ldr	r0, .L45+40
	bl	puts
	mov	r0, #1
	bl	exit
.L44:
	nop
	ldr	r3, [fp, #-8]
	add	r3, r3, #1
	str	r3, [fp, #-8]
.L36:
	ldr	r3, .L45+8
	ldr	r3, [r3]
	ldr	r2, [fp, #-8]
	cmp	r2, r3
	blt	.L39
	b	.L40
.L41:
	mov	r0, #0
	bl	wait
.L40:
	ldr	r3, [fp, #-8]
	sub	r2, r3, #1
	str	r2, [fp, #-8]
	cmp	r3, #0
	bne	.L41
	ldr	r3, .L45+24
	ldr	r3, [r3]
	ldr	r3, [r3]
	mov	r1, r3
	ldr	r0, .L45+44
	bl	printf
	mov	r0, #0
	bl	obrisi
	mov	r3, #0
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L46:
	.align	2
.L45:
	.word	.LC3
	.word	obrisi
	.word	N
	.word	M
	.word	ShmId
	.word	.LC4
	.word	A
	.word	.LC5
	.word	BROJ
	.word	TRAZIM
	.word	.LC6
	.word	.LC7
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
