	.file	"153356.c"
	.intel_syntax noprefix
	.text
	.globl	memSizeAddr
	.bss
	.align 8
	.type	memSizeAddr, @object
	.size	memSizeAddr, 8
memSizeAddr:
	.zero	8
	.globl	buff
	.align 8
	.type	buff, @object
	.size	buff, 8
buff:
	.zero	8
	.globl	readIndex
	.align 8
	.type	readIndex, @object
	.size	readIndex, 8
readIndex:
	.zero	8
	.globl	writeIndex
	.align 8
	.type	writeIndex, @object
	.size	writeIndex, 8
writeIndex:
	.zero	8
	.globl	full
	.align 4
	.type	full, @object
	.size	full, 4
full:
	.zero	4
	.globl	empty
	.align 4
	.type	empty, @object
	.size	empty, 4
empty:
	.zero	4
	.globl	mutex
	.align 4
	.type	mutex, @object
	.size	mutex, 4
mutex:
	.zero	4
	.globl	buffId
	.align 4
	.type	buffId, @object
	.size	buffId, 4
buffId:
	.zero	4
	.globl	readIndexId
	.align 4
	.type	readIndexId, @object
	.size	readIndexId, 4
readIndexId:
	.zero	4
	.globl	writeIndexId
	.align 4
	.type	writeIndexId, @object
	.size	writeIndexId, 4
writeIndexId:
	.zero	4
	.globl	value
	.align 4
	.type	value, @object
	.size	value, 4
value:
	.zero	4
	.text
	.globl	main
	.type	main, @function
main:
.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], 20
	mov	eax, 0
	call	InitIndices
	mov	eax, DWORD PTR -8[rbp]
	mov	edi, eax
	call	InitBuff
	mov	QWORD PTR buff[rip], rax
	mov	esi, 0
	mov	edi, 300
	call	CreateSem
	mov	DWORD PTR full[rip], eax
	mov	esi, 5
	mov	edi, 400
	call	CreateSem
	mov	DWORD PTR empty[rip], eax
	mov	esi, 1
	mov	edi, 500
	call	CreateSem
	mov	DWORD PTR mutex[rip], eax
	lea	rsi, SignalHandler[rip]
	mov	edi, 2
	call	signal@PLT
.L2:
	mov	eax, 0
	call	ProduceItem
	mov	DWORD PTR -4[rbp], eax
	mov	eax, DWORD PTR empty[rip]
	mov	edi, eax
	call	Down
	mov	eax, DWORD PTR mutex[rip]
	mov	edi, eax
	call	Down
	mov	eax, DWORD PTR -4[rbp]
	mov	edi, eax
	call	InsertItem
	mov	eax, DWORD PTR mutex[rip]
	mov	edi, eax
	call	Up
	mov	eax, DWORD PTR full[rip]
	mov	edi, eax
	call	Up
	mov	edi, 10
	call	sleep@PLT
	jmp	.L2
	.cfi_endproc
.LFE6:
	.size	main, .-main
	.section	.rodata
.LC0:
	.string	"\n\nProducer: Error in down()\n"
	.text
	.globl	Down
	.type	Down, @function
Down:
.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, 32
	mov	DWORD PTR -20[rbp], edi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	WORD PTR -14[rbp], 0
	mov	WORD PTR -12[rbp], -1
	mov	WORD PTR -10[rbp], 0
	lea	rcx, -14[rbp]
	mov	eax, DWORD PTR -20[rbp]
	mov	edx, 1
	mov	rsi, rcx
	mov	edi, eax
	call	semop@PLT
	cmp	eax, -1
	jne	.L6
	lea	rdi, .LC0[rip]
	call	perror@PLT
	mov	edi, -1
	call	exit@PLT
.L6:
	nop
	mov	rax, QWORD PTR -8[rbp]
	sub	rax, QWORD PTR fs:40
	je	.L5
	call	__stack_chk_fail@PLT
.L5:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	Down, .-Down
	.section	.rodata
.LC1:
	.string	"\n\nProducer: Error in up()\n"
	.text
	.globl	Up
	.type	Up, @function
Up:
.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 -20[rbp], edi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	WORD PTR -14[rbp], 0
	mov	WORD PTR -12[rbp], 1
	mov	WORD PTR -10[rbp], 0
	lea	rcx, -14[rbp]
	mov	eax, DWORD PTR -20[rbp]
	mov	edx, 1
	mov	rsi, rcx
	mov	edi, eax
	call	semop@PLT
	cmp	eax, -1
	jne	.L10
	lea	rdi, .LC1[rip]
	call	perror@PLT
	mov	edi, -1
	call	exit@PLT
.L10:
	nop
	mov	rax, QWORD PTR -8[rbp]
	sub	rax, QWORD PTR fs:40
	je	.L9
	call	__stack_chk_fail@PLT
.L9:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.size	Up, .-Up
	.section	.rodata
	.align 8
.LC2:
	.string	"\n\nProducer: Error in create the shared memory for indices\n"
	.align 8
.LC3:
	.string	"\n\nProducer: Error in attach the for indices shared memory\n"
	.text
	.globl	InitIndices
	.type	InitIndices, @function
InitIndices:
.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	edx, 420
	mov	esi, 4
	mov	edi, 5000
	call	shmget@PLT
	mov	DWORD PTR -8[rbp], eax
	mov	edx, 420
	mov	esi, 4
	mov	edi, 6000
	call	shmget@PLT
	mov	DWORD PTR -4[rbp], eax
	mov	edx, 932
	mov	esi, 4
	mov	edi, 5000
	call	shmget@PLT
	mov	DWORD PTR readIndexId[rip], eax
	mov	edx, 932
	mov	esi, 4
	mov	edi, 6000
	call	shmget@PLT
	mov	DWORD PTR writeIndexId[rip], eax
	mov	eax, DWORD PTR readIndexId[rip]
	cmp	eax, -1
	je	.L12
	mov	eax, DWORD PTR writeIndexId[rip]
	cmp	eax, -1
	jne	.L13
.L12:
	lea	rdi, .LC2[rip]
	call	perror@PLT
	mov	edi, -1
	call	exit@PLT
.L13:
	mov	eax, DWORD PTR readIndexId[rip]
	mov	edx, 0
	mov	esi, 0
	mov	edi, eax
	call	shmat@PLT
	mov	QWORD PTR readIndex[rip], rax
	mov	eax, DWORD PTR writeIndexId[rip]
	mov	edx, 0
	mov	esi, 0
	mov	edi, eax
	call	shmat@PLT
	mov	QWORD PTR writeIndex[rip], rax
	mov	rax, QWORD PTR readIndex[rip]
	cmp	rax, -1
	je	.L14
	mov	rax, QWORD PTR writeIndex[rip]
	cmp	rax, -1
	jne	.L15
.L14:
	lea	rdi, .LC3[rip]
	call	perror@PLT
	mov	edi, -1
	call	exit@PLT
.L15:
	cmp	DWORD PTR -8[rbp], -1
	jne	.L16
	mov	rax, QWORD PTR readIndex[rip]
	mov	DWORD PTR [rax], 0
.L16:
	cmp	DWORD PTR -4[rbp], -1
	jne	.L18
	mov	rax, QWORD PTR writeIndex[rip]
	mov	DWORD PTR [rax], 0
.L18:
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE9:
	.size	InitIndices, .-InitIndices
	.section	.rodata
	.align 8
.LC4:
	.string	"\n\nProducer: Error in create the shared memory for buffer size\n"
.LC5:
	.string	"\n\nProducer: Buffer id: %d\n"
	.align 8
.LC6:
	.string	"\n\nProducer: Error in attach the for buffer\n"
	.align 8
.LC7:
	.string	"\n\nProducer: Buffer attached successfuly"
	.text
	.globl	InitBuff
	.type	InitBuff, @function
InitBuff:
.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, 32
	mov	DWORD PTR -20[rbp], edi
	mov	eax, DWORD PTR -20[rbp]
	cdqe
	mov	edx, 932
	mov	rsi, rax
	mov	edi, 4000
	call	shmget@PLT
	mov	DWORD PTR buffId[rip], eax
	mov	eax, DWORD PTR buffId[rip]
	cmp	eax, -1
	jne	.L20
	lea	rdi, .LC4[rip]
	call	perror@PLT
	mov	edi, -1
	call	exit@PLT
.L20:
	mov	eax, DWORD PTR buffId[rip]
	mov	esi, eax
	lea	rdi, .LC5[rip]
	mov	eax, 0
	call	printf@PLT
	mov	eax, DWORD PTR buffId[rip]
	mov	edx, 0
	mov	esi, 0
	mov	edi, eax
	call	shmat@PLT
	mov	QWORD PTR -8[rbp], rax
	cmp	QWORD PTR -8[rbp], -1
	jne	.L21
	lea	rdi, .LC6[rip]
	call	perror@PLT
	mov	edi, -1
	call	exit@PLT
.L21:
	lea	rdi, .LC7[rip]
	call	puts@PLT
	mov	rax, QWORD PTR -8[rbp]
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE10:
	.size	InitBuff, .-InitBuff
	.section	.rodata
	.align 8
.LC8:
	.string	"\n\nProducer: Error in create sem\n"
	.text
	.globl	CreateSem
	.type	CreateSem, @function
CreateSem:
.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	DWORD PTR -20[rbp], edi
	mov	DWORD PTR -24[rbp], esi
	mov	eax, DWORD PTR -20[rbp]
	mov	edx, 438
	mov	esi, 1
	mov	edi, eax
	call	semget@PLT
	mov	DWORD PTR -8[rbp], eax
	mov	eax, DWORD PTR -20[rbp]
	mov	edx, 950
	mov	esi, 1
	mov	edi, eax
	call	semget@PLT
	mov	DWORD PTR -4[rbp], eax
	cmp	DWORD PTR -4[rbp], -1
	jne	.L24
	lea	rdi, .LC8[rip]
	call	perror@PLT
	mov	edi, -1
	call	exit@PLT
.L24:
	cmp	DWORD PTR -8[rbp], -1
	jne	.L25
	mov	edx, DWORD PTR -24[rbp]
	mov	eax, DWORD PTR -4[rbp]
	mov	esi, edx
	mov	edi, eax
	call	InitSem
.L25:
	mov	eax, DWORD PTR -4[rbp]
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE11:
	.size	CreateSem, .-CreateSem
	.section	.rodata
	.align 8
.LC9:
	.string	"\n\nProducer: Error in destroy sem\n"
	.text
	.globl	DestroySem
	.type	DestroySem, @function
DestroySem:
.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], edi
	mov	eax, DWORD PTR -4[rbp]
	mov	edx, 0
	mov	esi, 0
	mov	edi, eax
	mov	eax, 0
	call	semctl@PLT
	cmp	eax, -1
	jne	.L29
	lea	rdi, .LC9[rip]
	call	perror@PLT
	mov	edi, -1
	call	exit@PLT
.L29:
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE12:
	.size	DestroySem, .-DestroySem
	.globl	FreeResources
	.type	FreeResources, @function
FreeResources:
.LFB13:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	mov	rax, QWORD PTR buff[rip]
	mov	rdi, rax
	call	shmdt@PLT
	mov	rax, QWORD PTR memSizeAddr[rip]
	mov	rdi, rax
	call	shmdt@PLT
	mov	rax, QWORD PTR readIndex[rip]
	mov	rdi, rax
	call	shmdt@PLT
	mov	rax, QWORD PTR writeIndex[rip]
	mov	rdi, rax
	call	shmdt@PLT
	nop
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE13:
	.size	FreeResources, .-FreeResources
	.section	.rodata
.LC10:
	.string	"\n\nProducer: terminating..."
	.text
	.globl	SignalHandler
	.type	SignalHandler, @function
SignalHandler:
.LFB14:
	.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
	lea	rdi, .LC10[rip]
	call	puts@PLT
	mov	eax, 0
	call	FreeResources
	mov	edi, 0
	call	exit@PLT
	.cfi_endproc
.LFE14:
	.size	SignalHandler, .-SignalHandler
	.section	.rodata
	.align 8
.LC11:
	.string	"\n\nProducer: generating something to put in buffer..."
	.text
	.globl	ProduceItem
	.type	ProduceItem, @function
ProduceItem:
.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
	lea	rdi, .LC11[rip]
	call	puts@PLT
	mov	eax, DWORD PTR value[rip]
	mov	DWORD PTR -4[rbp], eax
	mov	eax, DWORD PTR value[rip]
	add	eax, 1
	mov	DWORD PTR value[rip], eax
	mov	eax, DWORD PTR -4[rbp]
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE15:
	.size	ProduceItem, .-ProduceItem
	.section	.rodata
	.align 8
.LC12:
	.string	"\n\nProducer: inserted %d in the buffer at location: %d\n"
	.text
	.globl	InsertItem
	.type	InsertItem, @function
InsertItem:
.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	DWORD PTR -4[rbp], edi
	mov	rdx, QWORD PTR buff[rip]
	mov	rax, QWORD PTR writeIndex[rip]
	mov	eax, DWORD PTR [rax]
	cdqe
	sal	rax, 2
	add	rdx, rax
	mov	eax, DWORD PTR -4[rbp]
	mov	DWORD PTR [rdx], eax
	mov	rax, QWORD PTR writeIndex[rip]
	mov	edx, DWORD PTR [rax]
	mov	eax, DWORD PTR -4[rbp]
	mov	esi, eax
	lea	rdi, .LC12[rip]
	mov	eax, 0
	call	printf@PLT
	mov	rax, QWORD PTR writeIndex[rip]
	mov	eax, DWORD PTR [rax]
	lea	edx, 1[rax]
	mov	rsi, QWORD PTR writeIndex[rip]
	movsx	rax, edx
	imul	rax, rax, 1717986919
	shr	rax, 32
	sar	eax
	mov	ecx, edx
	sar	ecx, 31
	sub	eax, ecx
	mov	ecx, eax
	sal	ecx, 2
	add	ecx, eax
	mov	eax, edx
	sub	eax, ecx
	mov	DWORD PTR [rsi], eax
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE16:
	.size	InsertItem, .-InsertItem
	.section	.rodata
	.align 8
.LC13:
	.string	"\n\nProducer: Error in initializing semaphore\n"
	.text
	.globl	InitSem
	.type	InitSem, @function
InitSem:
.LFB17:
	.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	DWORD PTR -24[rbp], esi
	mov	eax, DWORD PTR -24[rbp]
	mov	DWORD PTR -8[rbp], eax
	mov	rdx, QWORD PTR -8[rbp]
	mov	eax, DWORD PTR -20[rbp]
	mov	rcx, rdx
	mov	edx, 16
	mov	esi, 0
	mov	edi, eax
	mov	eax, 0
	call	semctl@PLT
	cmp	eax, -1
	jne	.L37
	lea	rdi, .LC13[rip]
	call	perror@PLT
	mov	edi, -1
	call	exit@PLT
.L37:
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE17:
	.size	InitSem, .-InitSem
	.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	"153356.c"
	.text
	.comm	memSizeAddr,4,4
	.comm	buff,4,4
	.comm	readIndex,4,4
	.comm	writeIndex,4,4
	.comm	full,4,4
	.comm	empty,4,4
	.comm	mutex,4,4
	.comm	buffId,4,4
	.comm	readIndexId,4,4
	.comm	writeIndexId,4,4
	.comm	value,4,4
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ 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, #20
	str	r3, [fp, #-12]
	bl	InitIndices
	ldr	r0, [fp, #-12]
	bl	InitBuff
	mov	r3, r0
	ldr	r2, .L3
	str	r3, [r2]
	mov	r1, #0
	mov	r0, #300
	bl	CreateSem
	mov	r3, r0
	ldr	r2, .L3+4
	str	r3, [r2]
	mov	r1, #5
	mov	r0, #400
	bl	CreateSem
	mov	r3, r0
	ldr	r2, .L3+8
	str	r3, [r2]
	mov	r1, #1
	mov	r0, #500
	bl	CreateSem
	mov	r3, r0
	ldr	r2, .L3+12
	str	r3, [r2]
	ldr	r1, .L3+16
	mov	r0, #2
	bl	signal
.L2:
	bl	ProduceItem
	str	r0, [fp, #-8]
	ldr	r3, .L3+8
	ldr	r3, [r3]
	mov	r0, r3
	bl	Down
	ldr	r3, .L3+12
	ldr	r3, [r3]
	mov	r0, r3
	bl	Down
	ldr	r0, [fp, #-8]
	bl	InsertItem
	ldr	r3, .L3+12
	ldr	r3, [r3]
	mov	r0, r3
	bl	Up
	ldr	r3, .L3+4
	ldr	r3, [r3]
	mov	r0, r3
	bl	Up
	mov	r0, #10
	bl	sleep
	b	.L2
.L4:
	.align	2
.L3:
	.word	buff
	.word	full
	.word	empty
	.word	mutex
	.word	SignalHandler
	.size	main, .-main
	.section	.rodata
	.align	2
.LC0:
	.ascii	"\012\012Producer: Error in down()\012\000"
	.align	2
.LC1:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	Down
	.syntax unified
	.arm
	.fpu softvfp
	.type	Down, %function
Down:
	@ args = 0, pretend = 0, frame = 24
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #24
	str	r0, [fp, #-24]
	ldr	r3, .L9
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	mov	r3, #0
	strh	r3, [fp, #-16]	@ movhi
	mvn	r3, #0
	strh	r3, [fp, #-14]	@ movhi
	mov	r3, #0
	strh	r3, [fp, #-12]	@ movhi
	sub	r3, fp, #16
	mov	r2, #1
	mov	r1, r3
	ldr	r0, [fp, #-24]
	bl	semop
	mov	r3, r0
	cmn	r3, #1
	bne	.L8
	ldr	r0, .L9+4
	bl	perror
	mvn	r0, #0
	bl	exit
.L8:
	nop
	ldr	r3, .L9
	ldr	r2, [r3]
	ldr	r3, [fp, #-8]
	eors	r2, r3, r2
	mov	r3, #0
	beq	.L7
	bl	__stack_chk_fail
.L7:
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L10:
	.align	2
.L9:
	.word	.LC1
	.word	.LC0
	.size	Down, .-Down
	.section	.rodata
	.align	2
.LC2:
	.ascii	"\012\012Producer: Error in up()\012\000"
	.align	2
.LC3:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	Up
	.syntax unified
	.arm
	.fpu softvfp
	.type	Up, %function
Up:
	@ args = 0, pretend = 0, frame = 24
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #24
	str	r0, [fp, #-24]
	ldr	r3, .L15
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	mov	r3, #0
	strh	r3, [fp, #-16]	@ movhi
	mov	r3, #1
	strh	r3, [fp, #-14]	@ movhi
	mov	r3, #0
	strh	r3, [fp, #-12]	@ movhi
	sub	r3, fp, #16
	mov	r2, #1
	mov	r1, r3
	ldr	r0, [fp, #-24]
	bl	semop
	mov	r3, r0
	cmn	r3, #1
	bne	.L14
	ldr	r0, .L15+4
	bl	perror
	mvn	r0, #0
	bl	exit
.L14:
	nop
	ldr	r3, .L15
	ldr	r2, [r3]
	ldr	r3, [fp, #-8]
	eors	r2, r3, r2
	mov	r3, #0
	beq	.L13
	bl	__stack_chk_fail
.L13:
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L16:
	.align	2
.L15:
	.word	.LC3
	.word	.LC2
	.size	Up, .-Up
	.section	.rodata
	.align	2
.LC4:
	.ascii	"\012\012Producer: Error in create the shared memory"
	.ascii	" for indices\012\000"
	.align	2
.LC5:
	.ascii	"\012\012Producer: Error in attach the for indices s"
	.ascii	"hared memory\012\000"
	.text
	.align	2
	.global	InitIndices
	.syntax unified
	.arm
	.fpu softvfp
	.type	InitIndices, %function
InitIndices:
	@ 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	r2, #420
	mov	r1, #4
	ldr	r0, .L25
	bl	shmget
	str	r0, [fp, #-12]
	mov	r2, #420
	mov	r1, #4
	ldr	r0, .L25+4
	bl	shmget
	str	r0, [fp, #-8]
	mov	r2, #932
	mov	r1, #4
	ldr	r0, .L25
	bl	shmget
	mov	r3, r0
	ldr	r2, .L25+8
	str	r3, [r2]
	mov	r2, #932
	mov	r1, #4
	ldr	r0, .L25+4
	bl	shmget
	mov	r3, r0
	ldr	r2, .L25+12
	str	r3, [r2]
	ldr	r3, .L25+8
	ldr	r3, [r3]
	cmn	r3, #1
	beq	.L18
	ldr	r3, .L25+12
	ldr	r3, [r3]
	cmn	r3, #1
	bne	.L19
.L18:
	ldr	r0, .L25+16
	bl	perror
	mvn	r0, #0
	bl	exit
.L19:
	ldr	r3, .L25+8
	ldr	r3, [r3]
	mov	r2, #0
	mov	r1, #0
	mov	r0, r3
	bl	shmat
	mov	r3, r0
	ldr	r2, .L25+20
	str	r3, [r2]
	ldr	r3, .L25+12
	ldr	r3, [r3]
	mov	r2, #0
	mov	r1, #0
	mov	r0, r3
	bl	shmat
	mov	r3, r0
	ldr	r2, .L25+24
	str	r3, [r2]
	ldr	r3, .L25+20
	ldr	r3, [r3]
	cmn	r3, #1
	beq	.L20
	ldr	r3, .L25+24
	ldr	r3, [r3]
	cmn	r3, #1
	bne	.L21
.L20:
	ldr	r0, .L25+28
	bl	perror
	mvn	r0, #0
	bl	exit
.L21:
	ldr	r3, [fp, #-12]
	cmn	r3, #1
	bne	.L22
	ldr	r3, .L25+20
	ldr	r3, [r3]
	mov	r2, #0
	str	r2, [r3]
.L22:
	ldr	r3, [fp, #-8]
	cmn	r3, #1
	bne	.L24
	ldr	r3, .L25+24
	ldr	r3, [r3]
	mov	r2, #0
	str	r2, [r3]
.L24:
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L26:
	.align	2
.L25:
	.word	5000
	.word	6000
	.word	readIndexId
	.word	writeIndexId
	.word	.LC4
	.word	readIndex
	.word	writeIndex
	.word	.LC5
	.size	InitIndices, .-InitIndices
	.section	.rodata
	.align	2
.LC6:
	.ascii	"\012\012Producer: Error in create the shared memory"
	.ascii	" for buffer size\012\000"
	.align	2
.LC7:
	.ascii	"\012\012Producer: Buffer id: %d\012\000"
	.align	2
.LC8:
	.ascii	"\012\012Producer: Error in attach the for buffer\012"
	.ascii	"\000"
	.align	2
.LC9:
	.ascii	"\012\012Producer: Buffer attached successfuly\000"
	.text
	.align	2
	.global	InitBuff
	.syntax unified
	.arm
	.fpu softvfp
	.type	InitBuff, %function
InitBuff:
	@ 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, [fp, #-16]
	mov	r2, #932
	mov	r1, r3
	mov	r0, #4000
	bl	shmget
	mov	r3, r0
	ldr	r2, .L31
	str	r3, [r2]
	ldr	r3, .L31
	ldr	r3, [r3]
	cmn	r3, #1
	bne	.L28
	ldr	r0, .L31+4
	bl	perror
	mvn	r0, #0
	bl	exit
.L28:
	ldr	r3, .L31
	ldr	r3, [r3]
	mov	r1, r3
	ldr	r0, .L31+8
	bl	printf
	ldr	r3, .L31
	ldr	r3, [r3]
	mov	r2, #0
	mov	r1, #0
	mov	r0, r3
	bl	shmat
	str	r0, [fp, #-8]
	ldr	r3, [fp, #-8]
	cmn	r3, #1
	bne	.L29
	ldr	r0, .L31+12
	bl	perror
	mvn	r0, #0
	bl	exit
.L29:
	ldr	r0, .L31+16
	bl	puts
	ldr	r3, [fp, #-8]
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L32:
	.align	2
.L31:
	.word	buffId
	.word	.LC6
	.word	.LC7
	.word	.LC8
	.word	.LC9
	.size	InitBuff, .-InitBuff
	.section	.rodata
	.align	2
.LC10:
	.ascii	"\012\012Producer: Error in create sem\012\000"
	.text
	.align	2
	.global	CreateSem
	.syntax unified
	.arm
	.fpu softvfp
	.type	CreateSem, %function
CreateSem:
	@ 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	r2, .L37
	mov	r1, #1
	ldr	r0, [fp, #-16]
	bl	semget
	str	r0, [fp, #-12]
	ldr	r2, .L37+4
	mov	r1, #1
	ldr	r0, [fp, #-16]
	bl	semget
	str	r0, [fp, #-8]
	ldr	r3, [fp, #-8]
	cmn	r3, #1
	bne	.L34
	ldr	r0, .L37+8
	bl	perror
	mvn	r0, #0
	bl	exit
.L34:
	ldr	r3, [fp, #-12]
	cmn	r3, #1
	bne	.L35
	ldr	r1, [fp, #-20]
	ldr	r0, [fp, #-8]
	bl	InitSem
.L35:
	ldr	r3, [fp, #-8]
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L38:
	.align	2
.L37:
	.word	438
	.word	950
	.word	.LC10
	.size	CreateSem, .-CreateSem
	.section	.rodata
	.align	2
.LC11:
	.ascii	"\012\012Producer: Error in destroy sem\012\000"
	.text
	.align	2
	.global	DestroySem
	.syntax unified
	.arm
	.fpu softvfp
	.type	DestroySem, %function
DestroySem:
	@ 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]
	mov	r2, #0
	mov	r1, #0
	ldr	r0, [fp, #-8]
	bl	semctl
	mov	r3, r0
	cmn	r3, #1
	bne	.L41
	ldr	r0, .L42
	bl	perror
	mvn	r0, #0
	bl	exit
.L41:
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L43:
	.align	2
.L42:
	.word	.LC11
	.size	DestroySem, .-DestroySem
	.align	2
	.global	FreeResources
	.syntax unified
	.arm
	.fpu softvfp
	.type	FreeResources, %function
FreeResources:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	ldr	r3, .L45
	ldr	r3, [r3]
	mov	r0, r3
	bl	shmdt
	ldr	r3, .L45+4
	ldr	r3, [r3]
	mov	r0, r3
	bl	shmdt
	ldr	r3, .L45+8
	ldr	r3, [r3]
	mov	r0, r3
	bl	shmdt
	ldr	r3, .L45+12
	ldr	r3, [r3]
	mov	r0, r3
	bl	shmdt
	nop
	pop	{fp, pc}
.L46:
	.align	2
.L45:
	.word	buff
	.word	memSizeAddr
	.word	readIndex
	.word	writeIndex
	.size	FreeResources, .-FreeResources
	.section	.rodata
	.align	2
.LC12:
	.ascii	"\012\012Producer: terminating...\000"
	.text
	.align	2
	.global	SignalHandler
	.syntax unified
	.arm
	.fpu softvfp
	.type	SignalHandler, %function
SignalHandler:
	@ 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	r0, .L48
	bl	puts
	bl	FreeResources
	mov	r0, #0
	bl	exit
.L49:
	.align	2
.L48:
	.word	.LC12
	.size	SignalHandler, .-SignalHandler
	.section	.rodata
	.align	2
.LC13:
	.ascii	"\012\012Producer: generating something to put in bu"
	.ascii	"ffer...\000"
	.text
	.align	2
	.global	ProduceItem
	.syntax unified
	.arm
	.fpu softvfp
	.type	ProduceItem, %function
ProduceItem:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #8
	ldr	r0, .L52
	bl	puts
	ldr	r3, .L52+4
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	ldr	r3, .L52+4
	ldr	r3, [r3]
	add	r3, r3, #1
	ldr	r2, .L52+4
	str	r3, [r2]
	ldr	r3, [fp, #-8]
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L53:
	.align	2
.L52:
	.word	.LC13
	.word	value
	.size	ProduceItem, .-ProduceItem
	.section	.rodata
	.align	2
.LC14:
	.ascii	"\012\012Producer: inserted %d in the buffer at loca"
	.ascii	"tion: %d\012\000"
	.text
	.align	2
	.global	InsertItem
	.syntax unified
	.arm
	.fpu softvfp
	.type	InsertItem, %function
InsertItem:
	@ 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, .L55
	ldr	r2, [r3]
	ldr	r3, .L55+4
	ldr	r3, [r3]
	ldr	r3, [r3]
	lsl	r3, r3, #2
	add	r3, r2, r3
	ldr	r2, [fp, #-8]
	str	r2, [r3]
	ldr	r3, .L55+4
	ldr	r3, [r3]
	ldr	r3, [r3]
	mov	r2, r3
	ldr	r1, [fp, #-8]
	ldr	r0, .L55+8
	bl	printf
	ldr	r3, .L55+4
	ldr	r3, [r3]
	ldr	r3, [r3]
	add	r1, r3, #1
	ldr	r3, .L55+4
	ldr	r0, [r3]
	ldr	r3, .L55+12
	smull	r2, r3, r1, r3
	asr	r2, r3, #1
	asr	r3, r1, #31
	sub	r2, r2, r3
	mov	r3, r2
	lsl	r3, r3, #2
	add	r3, r3, r2
	sub	r2, r1, r3
	str	r2, [r0]
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L56:
	.align	2
.L55:
	.word	buff
	.word	writeIndex
	.word	.LC14
	.word	1717986919
	.size	InsertItem, .-InsertItem
	.section	.rodata
	.align	2
.LC15:
	.ascii	"\012\012Producer: Error in initializing semaphore\012"
	.ascii	"\000"
	.text
	.align	2
	.global	InitSem
	.syntax unified
	.arm
	.fpu softvfp
	.type	InitSem, %function
InitSem:
	@ 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, #-20]
	str	r3, [fp, #-8]
	ldr	r3, [fp, #-8]
	mov	r2, #16
	mov	r1, #0
	ldr	r0, [fp, #-16]
	bl	semctl
	mov	r3, r0
	cmn	r3, #1
	bne	.L59
	ldr	r0, .L60
	bl	perror
	mvn	r0, #0
	bl	exit
.L59:
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L61:
	.align	2
.L60:
	.word	.LC15
	.size	InitSem, .-InitSem
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
