	.file	"30946.c"
	.intel_syntax noprefix
	.text
	.section	.rodata
.LC0:
	.string	"GRESKA"
	.text
	.globl	proveri
	.type	proveri, @function
proveri:
.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 -4[rbp], edi
	cmp	DWORD PTR -4[rbp], -1
	jne	.L3
	lea	rdi, .LC0[rip]
	call	perror@PLT
	mov	edi, 1
	call	exit@PLT
.L3:
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	proveri, .-proveri
	.section	.rodata
.LC1:
	.string	"./vodonik.c"
.LC2:
	.string	"Napravljen je kisik"
	.text
	.globl	main
	.type	main, @function
main:
.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, 64
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	esi, 32
	lea	rdi, .LC1[rip]
	call	ftok@PLT
	mov	DWORD PTR -40[rbp], eax
	mov	eax, DWORD PTR -40[rbp]
	mov	edi, eax
	call	proveri
	mov	eax, DWORD PTR -40[rbp]
	mov	esi, 950
	mov	edi, eax
	call	msgget@PLT
	mov	DWORD PTR -36[rbp], eax
	mov	eax, DWORD PTR -40[rbp]
	mov	edx, 950
	mov	esi, 4
	mov	edi, eax
	call	semget@PLT
	mov	DWORD PTR -52[rbp], eax
	cmp	DWORD PTR -52[rbp], -1
	jne	.L5
	call	__errno_location@PLT
	mov	eax, DWORD PTR [rax]
	cmp	eax, 17
	jne	.L6
	mov	eax, DWORD PTR -40[rbp]
	mov	edx, 0
	mov	esi, 4
	mov	edi, eax
	call	semget@PLT
	mov	DWORD PTR -52[rbp], eax
	jmp	.L7
.L6:
	mov	eax, DWORD PTR -52[rbp]
	mov	edi, eax
	call	proveri
	jmp	.L7
.L5:
	mov	edi, 8
	call	malloc@PLT
	mov	QWORD PTR -16[rbp], rax
	mov	rax, QWORD PTR -16[rbp]
	mov	WORD PTR [rax], 2
	mov	rax, QWORD PTR -16[rbp]
	add	rax, 2
	mov	WORD PTR [rax], 0
	mov	rax, QWORD PTR -16[rbp]
	add	rax, 4
	mov	WORD PTR [rax], 0
	mov	rax, QWORD PTR -16[rbp]
	add	rax, 6
	mov	WORD PTR [rax], 0
	mov	rdx, QWORD PTR -16[rbp]
	mov	eax, DWORD PTR -52[rbp]
	mov	rcx, rdx
	mov	edx, 17
	mov	esi, 0
	mov	edi, eax
	mov	eax, 0
	call	semctl@PLT
	mov	DWORD PTR -32[rbp], eax
	mov	eax, DWORD PTR -32[rbp]
	mov	edi, eax
	call	proveri
.L7:
	mov	WORD PTR -28[rbp], 2
	mov	WORD PTR -26[rbp], -1
	mov	WORD PTR -24[rbp], 0
	mov	WORD PTR -22[rbp], 3
	mov	WORD PTR -20[rbp], 1
	mov	WORD PTR -18[rbp], 0
	mov	QWORD PTR -16[rbp], 3
.L12:
	mov	DWORD PTR -48[rbp], 0
	jmp	.L8
.L9:
	lea	rcx, -28[rbp]
	mov	eax, DWORD PTR -52[rbp]
	mov	edx, 1
	mov	rsi, rcx
	mov	edi, eax
	call	semop@PLT
	add	DWORD PTR -48[rbp], 1
.L8:
	cmp	DWORD PTR -48[rbp], 3
	jle	.L9
	mov	edi, 5
	call	sleep@PLT
	mov	DWORD PTR -44[rbp], 0
	jmp	.L10
.L11:
	lea	rsi, -16[rbp]
	mov	eax, DWORD PTR -36[rbp]
	mov	ecx, 0
	mov	edx, 8
	mov	edi, eax
	call	msgsnd@PLT
	add	DWORD PTR -44[rbp], 1
.L10:
	cmp	DWORD PTR -44[rbp], 3
	jle	.L11
	lea	rcx, -22[rbp]
	mov	eax, DWORD PTR -52[rbp]
	mov	edx, 1
	mov	rsi, rcx
	mov	edi, eax
	call	semop@PLT
	lea	rcx, -22[rbp]
	mov	eax, DWORD PTR -52[rbp]
	mov	edx, 1
	mov	rsi, rcx
	mov	edi, eax
	call	semop@PLT
	lea	rdi, .LC2[rip]
	call	puts@PLT
	jmp	.L12
	.cfi_endproc
.LFE7:
	.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	"30946.c"
	.text
	.section	.rodata
	.align	2
.LC0:
	.ascii	"GRESKA\000"
	.text
	.align	2
	.global	proveri
	.syntax unified
	.arm
	.fpu softvfp
	.type	proveri, %function
proveri:
	@ 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, [fp, #-8]
	cmn	r3, #1
	bne	.L3
	ldr	r0, .L4
	bl	perror
	mov	r0, #1
	bl	exit
.L3:
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L5:
	.align	2
.L4:
	.word	.LC0
	.size	proveri, .-proveri
	.section	.rodata
	.align	2
.LC1:
	.ascii	"./vodonik.c\000"
	.align	2
.LC2:
	.ascii	"Napravljen je kisik\000"
	.align	2
.LC3:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 48
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #48
	ldr	r3, .L16
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	mov	r1, #32
	ldr	r0, .L16+4
	bl	ftok
	str	r0, [fp, #-36]
	ldr	r0, [fp, #-36]
	bl	proveri
	ldr	r1, .L16+8
	ldr	r0, [fp, #-36]
	bl	msgget
	str	r0, [fp, #-32]
	ldr	r2, .L16+8
	mov	r1, #4
	ldr	r0, [fp, #-36]
	bl	semget
	str	r0, [fp, #-48]
	ldr	r3, [fp, #-48]
	cmn	r3, #1
	bne	.L7
	bl	__errno_location
	mov	r3, r0
	ldr	r3, [r3]
	cmp	r3, #17
	bne	.L8
	mov	r2, #0
	mov	r1, #4
	ldr	r0, [fp, #-36]
	bl	semget
	str	r0, [fp, #-48]
	b	.L9
.L8:
	ldr	r0, [fp, #-48]
	bl	proveri
	b	.L9
.L7:
	mov	r0, #8
	bl	malloc
	mov	r3, r0
	str	r3, [fp, #-16]
	ldr	r3, [fp, #-16]
	mov	r2, #2
	strh	r2, [r3]	@ movhi
	ldr	r3, [fp, #-16]
	add	r3, r3, #2
	mov	r2, #0
	strh	r2, [r3]	@ movhi
	ldr	r3, [fp, #-16]
	add	r3, r3, #4
	mov	r2, #0
	strh	r2, [r3]	@ movhi
	ldr	r3, [fp, #-16]
	add	r3, r3, #6
	mov	r2, #0
	strh	r2, [r3]	@ movhi
	ldr	r3, [fp, #-16]
	mov	r2, #17
	mov	r1, #0
	ldr	r0, [fp, #-48]
	bl	semctl
	str	r0, [fp, #-28]
	ldr	r0, [fp, #-28]
	bl	proveri
.L9:
	mov	r3, #2
	strh	r3, [fp, #-24]	@ movhi
	mvn	r3, #0
	strh	r3, [fp, #-22]	@ movhi
	mov	r3, #0
	strh	r3, [fp, #-20]	@ movhi
	mov	r3, #3
	strh	r3, [fp, #-16]	@ movhi
	mov	r3, #1
	strh	r3, [fp, #-14]	@ movhi
	mov	r3, #0
	strh	r3, [fp, #-12]	@ movhi
	mov	r3, #3
	str	r3, [fp, #-52]
.L14:
	mov	r3, #0
	str	r3, [fp, #-44]
	b	.L10
.L11:
	sub	r3, fp, #24
	mov	r2, #1
	mov	r1, r3
	ldr	r0, [fp, #-48]
	bl	semop
	ldr	r3, [fp, #-44]
	add	r3, r3, #1
	str	r3, [fp, #-44]
.L10:
	ldr	r3, [fp, #-44]
	cmp	r3, #3
	ble	.L11
	mov	r0, #5
	bl	sleep
	mov	r3, #0
	str	r3, [fp, #-40]
	b	.L12
.L13:
	sub	r1, fp, #52
	mov	r3, #0
	mov	r2, #4
	ldr	r0, [fp, #-32]
	bl	msgsnd
	ldr	r3, [fp, #-40]
	add	r3, r3, #1
	str	r3, [fp, #-40]
.L12:
	ldr	r3, [fp, #-40]
	cmp	r3, #3
	ble	.L13
	sub	r3, fp, #16
	mov	r2, #1
	mov	r1, r3
	ldr	r0, [fp, #-48]
	bl	semop
	sub	r3, fp, #16
	mov	r2, #1
	mov	r1, r3
	ldr	r0, [fp, #-48]
	bl	semop
	ldr	r0, .L16+12
	bl	puts
	b	.L14
.L17:
	.align	2
.L16:
	.word	.LC3
	.word	.LC1
	.word	950
	.word	.LC2
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
