	.file	"139094.c"
	.intel_syntax noprefix
	.text
	.section	.rodata
.LC0:
	.string	"unexpected error occurred"
	.text
	.globl	validate_return_value
	.type	validate_return_value, @function
validate_return_value:
.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	validate_return_value, .-validate_return_value
	.section	.rodata
.LC1:
	.string	"./osoba.c"
	.align 8
.LC2:
	.string	"Ubacio novcic... trenutno u kasici %d...\n"
	.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, 80
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	esi, 97
	lea	rdi, .LC1[rip]
	call	ftok@PLT
	mov	DWORD PTR -72[rbp], eax
	mov	eax, DWORD PTR -72[rbp]
	mov	edi, eax
	call	validate_return_value
	mov	DWORD PTR -68[rbp], 3
	mov	DWORD PTR -64[rbp], 1974
	mov	edx, DWORD PTR -64[rbp]
	mov	ecx, DWORD PTR -68[rbp]
	mov	eax, DWORD PTR -72[rbp]
	mov	esi, ecx
	mov	edi, eax
	call	semget@PLT
	mov	DWORD PTR -76[rbp], eax
	mov	DWORD PTR -60[rbp], 950
	mov	edx, DWORD PTR -60[rbp]
	mov	eax, DWORD PTR -72[rbp]
	mov	esi, 4
	mov	edi, eax
	call	shmget@PLT
	mov	DWORD PTR -56[rbp], eax
	mov	eax, DWORD PTR -56[rbp]
	mov	edi, eax
	call	validate_return_value
	mov	eax, DWORD PTR -56[rbp]
	mov	edx, 0
	mov	esi, 0
	mov	edi, eax
	call	shmat@PLT
	mov	QWORD PTR -16[rbp], rax
	cmp	DWORD PTR -76[rbp], -1
	jne	.L5
	call	__errno_location@PLT
	mov	eax, DWORD PTR [rax]
	cmp	eax, 17
	jne	.L6
	mov	ecx, DWORD PTR -68[rbp]
	mov	eax, DWORD PTR -72[rbp]
	mov	edx, 0
	mov	esi, ecx
	mov	edi, eax
	call	semget@PLT
	mov	DWORD PTR -76[rbp], eax
	jmp	.L7
.L6:
	mov	eax, DWORD PTR -76[rbp]
	mov	edi, eax
	call	validate_return_value
	jmp	.L7
.L5:
	mov	eax, DWORD PTR -68[rbp]
	cdqe
	add	rax, rax
	mov	rdi, rax
	call	malloc@PLT
	mov	QWORD PTR -24[rbp], rax
	mov	rax, QWORD PTR -24[rbp]
	mov	WORD PTR [rax], 1
	mov	rax, QWORD PTR -24[rbp]
	add	rax, 2
	mov	WORD PTR [rax], 0
	mov	rax, QWORD PTR -24[rbp]
	add	rax, 4
	mov	WORD PTR [rax], 0
	mov	rdx, QWORD PTR -24[rbp]
	mov	eax, DWORD PTR -76[rbp]
	mov	rcx, rdx
	mov	edx, 17
	mov	esi, 0
	mov	edi, eax
	mov	eax, 0
	call	semctl@PLT
	mov	DWORD PTR -52[rbp], eax
	mov	eax, DWORD PTR -52[rbp]
	mov	edi, eax
	call	validate_return_value
	mov	rax, QWORD PTR -16[rbp]
	mov	DWORD PTR [rax], 0
.L7:
	mov	WORD PTR -36[rbp], 0
	mov	WORD PTR -34[rbp], -1
	mov	WORD PTR -32[rbp], 0
	mov	WORD PTR -42[rbp], 0
	mov	WORD PTR -40[rbp], 1
	mov	WORD PTR -38[rbp], 0
	mov	WORD PTR -30[rbp], 1
	mov	WORD PTR -28[rbp], 1
	mov	WORD PTR -26[rbp], 0
	mov	WORD PTR -24[rbp], 2
	mov	WORD PTR -22[rbp], -1
	mov	WORD PTR -20[rbp], 0
	lea	rcx, -36[rbp]
	mov	eax, DWORD PTR -76[rbp]
	mov	edx, 1
	mov	rsi, rcx
	mov	edi, eax
	call	semop@PLT
	mov	DWORD PTR -48[rbp], eax
	mov	eax, DWORD PTR -48[rbp]
	mov	edi, eax
	call	validate_return_value
	mov	rax, QWORD PTR -16[rbp]
	mov	eax, DWORD PTR [rax]
	lea	edx, 1[rax]
	mov	rax, QWORD PTR -16[rbp]
	mov	DWORD PTR [rax], edx
	mov	rax, QWORD PTR -16[rbp]
	mov	eax, DWORD PTR [rax]
	cmp	eax, 10
	jne	.L8
	lea	rcx, -30[rbp]
	mov	eax, DWORD PTR -76[rbp]
	mov	edx, 1
	mov	rsi, rcx
	mov	edi, eax
	call	semop@PLT
	mov	DWORD PTR -48[rbp], eax
	mov	eax, DWORD PTR -48[rbp]
	mov	edi, eax
	call	validate_return_value
	lea	rcx, -24[rbp]
	mov	eax, DWORD PTR -76[rbp]
	mov	edx, 1
	mov	rsi, rcx
	mov	edi, eax
	call	semop@PLT
	mov	DWORD PTR -48[rbp], eax
	mov	eax, DWORD PTR -48[rbp]
	mov	edi, eax
	call	validate_return_value
.L8:
	mov	rax, QWORD PTR -16[rbp]
	mov	eax, DWORD PTR [rax]
	mov	esi, eax
	lea	rdi, .LC2[rip]
	mov	eax, 0
	call	printf@PLT
	lea	rcx, -42[rbp]
	mov	eax, DWORD PTR -76[rbp]
	mov	edx, 1
	mov	rsi, rcx
	mov	edi, eax
	call	semop@PLT
	mov	DWORD PTR -48[rbp], eax
	mov	eax, DWORD PTR -48[rbp]
	mov	edi, eax
	call	validate_return_value
	mov	rax, QWORD PTR -16[rbp]
	mov	rdi, rax
	call	shmdt@PLT
	mov	DWORD PTR -48[rbp], eax
	mov	eax, DWORD PTR -48[rbp]
	mov	edi, eax
	call	validate_return_value
	mov	eax, 0
	mov	rsi, QWORD PTR -8[rbp]
	sub	rsi, QWORD PTR fs:40
	je	.L10
	call	__stack_chk_fail@PLT
.L10:
	leave
	.cfi_def_cfa 7, 8
	ret
	.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	"139094.c"
	.text
	.section	.rodata
	.align	2
.LC0:
	.ascii	"unexpected error occurred\000"
	.text
	.align	2
	.global	validate_return_value
	.syntax unified
	.arm
	.fpu softvfp
	.type	validate_return_value, %function
validate_return_value:
	@ 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	validate_return_value, .-validate_return_value
	.section	.rodata
	.align	2
.LC1:
	.ascii	"./osoba.c\000"
	.align	2
.LC2:
	.ascii	"Ubacio novcic... trenutno u kasici %d...\012\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 = 72
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #72
	ldr	r3, .L13
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	mov	r1, #97
	ldr	r0, .L13+4
	bl	ftok
	str	r0, [fp, #-72]
	ldr	r0, [fp, #-72]
	bl	validate_return_value
	mov	r3, #3
	str	r3, [fp, #-68]
	ldr	r3, .L13+8
	str	r3, [fp, #-64]
	ldr	r2, [fp, #-64]
	ldr	r1, [fp, #-68]
	ldr	r0, [fp, #-72]
	bl	semget
	str	r0, [fp, #-76]
	ldr	r3, .L13+12
	str	r3, [fp, #-60]
	ldr	r2, [fp, #-60]
	mov	r1, #4
	ldr	r0, [fp, #-72]
	bl	shmget
	str	r0, [fp, #-56]
	ldr	r0, [fp, #-56]
	bl	validate_return_value
	mov	r2, #0
	mov	r1, #0
	ldr	r0, [fp, #-56]
	bl	shmat
	str	r0, [fp, #-52]
	ldr	r3, [fp, #-76]
	cmn	r3, #1
	bne	.L7
	bl	__errno_location
	mov	r3, r0
	ldr	r3, [r3]
	cmp	r3, #17
	bne	.L8
	mov	r2, #0
	ldr	r1, [fp, #-68]
	ldr	r0, [fp, #-72]
	bl	semget
	str	r0, [fp, #-76]
	b	.L9
.L8:
	ldr	r0, [fp, #-76]
	bl	validate_return_value
	b	.L9
.L7:
	ldr	r3, [fp, #-68]
	lsl	r3, r3, #1
	mov	r0, r3
	bl	malloc
	mov	r3, r0
	str	r3, [fp, #-16]
	ldr	r3, [fp, #-16]
	mov	r2, #1
	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]
	mov	r2, #17
	mov	r1, #0
	ldr	r0, [fp, #-76]
	bl	semctl
	str	r0, [fp, #-48]
	ldr	r0, [fp, #-48]
	bl	validate_return_value
	ldr	r3, [fp, #-52]
	mov	r2, #0
	str	r2, [r3]
.L9:
	mov	r3, #0
	strh	r3, [fp, #-32]	@ movhi
	mvn	r3, #0
	strh	r3, [fp, #-30]	@ movhi
	mov	r3, #0
	strh	r3, [fp, #-28]	@ movhi
	mov	r3, #0
	strh	r3, [fp, #-40]	@ movhi
	mov	r3, #1
	strh	r3, [fp, #-38]	@ movhi
	mov	r3, #0
	strh	r3, [fp, #-36]	@ movhi
	mov	r3, #1
	strh	r3, [fp, #-24]	@ movhi
	mov	r3, #1
	strh	r3, [fp, #-22]	@ movhi
	mov	r3, #0
	strh	r3, [fp, #-20]	@ movhi
	mov	r3, #2
	strh	r3, [fp, #-16]	@ movhi
	mvn	r3, #0
	strh	r3, [fp, #-14]	@ movhi
	mov	r3, #0
	strh	r3, [fp, #-12]	@ movhi
	sub	r3, fp, #32
	mov	r2, #1
	mov	r1, r3
	ldr	r0, [fp, #-76]
	bl	semop
	str	r0, [fp, #-44]
	ldr	r0, [fp, #-44]
	bl	validate_return_value
	ldr	r3, [fp, #-52]
	ldr	r3, [r3]
	add	r2, r3, #1
	ldr	r3, [fp, #-52]
	str	r2, [r3]
	ldr	r3, [fp, #-52]
	ldr	r3, [r3]
	cmp	r3, #10
	bne	.L10
	sub	r3, fp, #24
	mov	r2, #1
	mov	r1, r3
	ldr	r0, [fp, #-76]
	bl	semop
	str	r0, [fp, #-44]
	ldr	r0, [fp, #-44]
	bl	validate_return_value
	sub	r3, fp, #16
	mov	r2, #1
	mov	r1, r3
	ldr	r0, [fp, #-76]
	bl	semop
	str	r0, [fp, #-44]
	ldr	r0, [fp, #-44]
	bl	validate_return_value
.L10:
	ldr	r3, [fp, #-52]
	ldr	r3, [r3]
	mov	r1, r3
	ldr	r0, .L13+16
	bl	printf
	sub	r3, fp, #40
	mov	r2, #1
	mov	r1, r3
	ldr	r0, [fp, #-76]
	bl	semop
	str	r0, [fp, #-44]
	ldr	r0, [fp, #-44]
	bl	validate_return_value
	ldr	r0, [fp, #-52]
	bl	shmdt
	str	r0, [fp, #-44]
	ldr	r0, [fp, #-44]
	bl	validate_return_value
	mov	r3, #0
	ldr	r2, .L13
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L12
	bl	__stack_chk_fail
.L12:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L14:
	.align	2
.L13:
	.word	.LC3
	.word	.LC1
	.word	1974
	.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
