	.file	"756494.c"
	.intel_syntax noprefix
	.text
	.globl	n_threads_consumidoras
	.bss
	.align 4
	.type	n_threads_consumidoras, @object
	.size	n_threads_consumidoras, 4
n_threads_consumidoras:
	.zero	4
	.globl	n_threads_produtoras
	.align 4
	.type	n_threads_produtoras, @object
	.size	n_threads_produtoras, 4
n_threads_produtoras:
	.zero	4
	.globl	n_threads
	.align 4
	.type	n_threads, @object
	.size	n_threads, 4
n_threads:
	.zero	4
	.globl	slot_cheio
	.align 32
	.type	slot_cheio, @object
	.size	slot_cheio, 32
slot_cheio:
	.zero	32
	.globl	vetor_vazio
	.align 32
	.type	vetor_vazio, @object
	.size	vetor_vazio, 32
vetor_vazio:
	.zero	32
	.globl	mutex
	.align 32
	.type	mutex, @object
	.size	mutex, 32
mutex:
	.zero	32
	.globl	vetor_int
	.align 8
	.type	vetor_int, @object
	.size	vetor_int, 8
vetor_int:
	.zero	8
	.globl	quant_leituras
	.align 4
	.type	quant_leituras, @object
	.size	quant_leituras, 4
quant_leituras:
	.zero	4
	.section	.rodata
	.align 8
.LC0:
	.string	"Thread consumidora %d consumiu vetor_int[%d] = %d\n"
	.text
	.globl	Retirar
	.type	Retirar, @function
Retirar:
.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, 32
	mov	QWORD PTR -24[rbp], rdi
	lea	rdi, slot_cheio[rip]
	call	sem_wait@PLT
	lea	rdi, mutex[rip]
	call	sem_wait@PLT
	mov	edi, 1
	call	sleep@PLT
	mov	rdx, QWORD PTR vetor_int[rip]
	mov	eax, DWORD PTR out.0[rip]
	cdqe
	sal	rax, 2
	add	rax, rdx
	mov	eax, DWORD PTR [rax]
	mov	DWORD PTR -4[rbp], eax
	mov	edx, DWORD PTR out.0[rip]
	mov	rax, QWORD PTR -24[rbp]
	mov	eax, DWORD PTR [rax]
	mov	ecx, DWORD PTR -4[rbp]
	mov	esi, eax
	lea	rdi, .LC0[rip]
	mov	eax, 0
	call	printf@PLT
	mov	rdx, QWORD PTR vetor_int[rip]
	mov	eax, DWORD PTR out.0[rip]
	cdqe
	sal	rax, 2
	add	rax, rdx
	mov	DWORD PTR [rax], 0
	mov	eax, DWORD PTR quant_leituras[rip]
	add	eax, 1
	mov	DWORD PTR quant_leituras[rip], eax
	mov	eax, DWORD PTR out.0[rip]
	lea	ecx, 1[rax]
	movsx	rax, ecx
	imul	rax, rax, 1717986919
	shr	rax, 32
	sar	eax, 2
	mov	esi, ecx
	sar	esi, 31
	sub	eax, esi
	mov	edx, eax
	mov	eax, edx
	sal	eax, 2
	add	eax, edx
	add	eax, eax
	sub	ecx, eax
	mov	edx, ecx
	mov	DWORD PTR out.0[rip], edx
	mov	eax, DWORD PTR quant_leituras[rip]
	cmp	eax, 10
	jne	.L2
	lea	rdi, vetor_vazio[rip]
	call	sem_post@PLT
	mov	DWORD PTR quant_leituras[rip], 0
.L2:
	lea	rdi, mutex[rip]
	call	sem_post@PLT
	mov	edi, 0
	call	sleep@PLT
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	Retirar, .-Retirar
	.section	.rodata
	.align 8
.LC1:
	.string	"Thread produtora %d escreveu o vetor: "
.LC2:
	.string	"%d/ "
	.text
	.globl	Inserir
	.type	Inserir, @function
Inserir:
.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	QWORD PTR -24[rbp], rdi
	lea	rdi, vetor_vazio[rip]
	call	sem_wait@PLT
	lea	rdi, mutex[rip]
	call	sem_wait@PLT
	mov	DWORD PTR -12[rbp], 0
	jmp	.L4
.L5:
	call	rand@PLT
	mov	edx, eax
	movsx	rax, edx
	imul	rax, rax, 1717986919
	shr	rax, 32
	sar	eax, 2
	mov	esi, edx
	sar	esi, 31
	sub	eax, esi
	mov	ecx, eax
	mov	eax, ecx
	sal	eax, 2
	add	eax, ecx
	add	eax, eax
	mov	ecx, edx
	sub	ecx, eax
	mov	rdx, QWORD PTR vetor_int[rip]
	mov	eax, DWORD PTR -12[rbp]
	cdqe
	sal	rax, 2
	add	rax, rdx
	lea	edx, 1[rcx]
	mov	DWORD PTR [rax], edx
	add	DWORD PTR -12[rbp], 1
.L4:
	cmp	DWORD PTR -12[rbp], 9
	jle	.L5
	mov	edi, 0
	call	sleep@PLT
	mov	rax, QWORD PTR -24[rbp]
	mov	eax, DWORD PTR [rax]
	mov	esi, eax
	lea	rdi, .LC1[rip]
	mov	eax, 0
	call	printf@PLT
	mov	DWORD PTR -8[rbp], 0
	jmp	.L6
.L7:
	mov	rdx, QWORD PTR vetor_int[rip]
	mov	eax, DWORD PTR -8[rbp]
	cdqe
	sal	rax, 2
	add	rax, rdx
	mov	eax, DWORD PTR [rax]
	mov	esi, eax
	lea	rdi, .LC2[rip]
	mov	eax, 0
	call	printf@PLT
	add	DWORD PTR -8[rbp], 1
.L6:
	cmp	DWORD PTR -8[rbp], 9
	jle	.L7
	mov	edi, 10
	call	putchar@PLT
	lea	rdi, mutex[rip]
	call	sem_post@PLT
	mov	DWORD PTR -4[rbp], 0
	jmp	.L8
.L9:
	lea	rdi, slot_cheio[rip]
	call	sem_post@PLT
	add	DWORD PTR -4[rbp], 1
.L8:
	cmp	DWORD PTR -4[rbp], 9
	jle	.L9
	nop
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	Inserir, .-Inserir
	.globl	thread_produtora
	.type	thread_produtora, @function
thread_produtora:
.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	QWORD PTR -24[rbp], rdi
	mov	rax, QWORD PTR -24[rbp]
	mov	QWORD PTR -8[rbp], rax
.L11:
	mov	rax, QWORD PTR -8[rbp]
	mov	rdi, rax
	call	Inserir
	jmp	.L11
	.cfi_endproc
.LFE8:
	.size	thread_produtora, .-thread_produtora
	.globl	thread_consumidora
	.type	thread_consumidora, @function
thread_consumidora:
.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, 32
	mov	QWORD PTR -24[rbp], rdi
	mov	rax, QWORD PTR -24[rbp]
	mov	QWORD PTR -8[rbp], rax
.L13:
	mov	rax, QWORD PTR -8[rbp]
	mov	rdi, rax
	call	Retirar
	jmp	.L13
	.cfi_endproc
.LFE9:
	.size	thread_consumidora, .-thread_consumidora
	.section	.rodata
	.align 8
.LC3:
	.string	"Digite: %s <numero de threads consumidoras> <numero de threads produtoras>\n"
.LC4:
	.string	"ERRO--malloc\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB10:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	push	r15
	push	r14
	push	r13
	push	r12
	push	rbx
	sub	rsp, 104
	.cfi_offset 15, -24
	.cfi_offset 14, -32
	.cfi_offset 13, -40
	.cfi_offset 12, -48
	.cfi_offset 3, -56
	mov	DWORD PTR -100[rbp], edi
	mov	QWORD PTR -112[rbp], rsi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -56[rbp], rax
	xor	eax, eax
	mov	rax, rsp
	mov	rbx, rax
	mov	edi, 0
	call	time@PLT
	mov	edi, eax
	call	srand@PLT
	cmp	DWORD PTR -100[rbp], 2
	jg	.L15
	mov	rax, QWORD PTR -112[rbp]
	mov	rdx, QWORD PTR [rax]
	mov	rax, QWORD PTR stderr[rip]
	lea	rsi, .LC3[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	eax, 1
	jmp	.L16
.L15:
	mov	rax, QWORD PTR -112[rbp]
	add	rax, 8
	mov	rax, QWORD PTR [rax]
	mov	rdi, rax
	call	atoi@PLT
	mov	DWORD PTR n_threads_consumidoras[rip], eax
	mov	rax, QWORD PTR -112[rbp]
	add	rax, 16
	mov	rax, QWORD PTR [rax]
	mov	rdi, rax
	call	atoi@PLT
	mov	DWORD PTR n_threads_produtoras[rip], eax
	mov	edx, DWORD PTR n_threads_consumidoras[rip]
	mov	eax, DWORD PTR n_threads_produtoras[rip]
	add	eax, edx
	mov	DWORD PTR n_threads[rip], eax
	mov	edi, 40
	call	malloc@PLT
	mov	QWORD PTR vetor_int[rip], rax
	mov	rax, QWORD PTR vetor_int[rip]
	test	rax, rax
	jne	.L17
	mov	rax, QWORD PTR stderr[rip]
	mov	rcx, rax
	mov	edx, 13
	mov	esi, 1
	lea	rdi, .LC4[rip]
	call	fwrite@PLT
	mov	eax, 2
	jmp	.L16
.L17:
	mov	eax, DWORD PTR n_threads[rip]
	movsx	rdx, eax
	sub	rdx, 1
	mov	QWORD PTR -88[rbp], rdx
	movsx	rdx, eax
	mov	QWORD PTR -128[rbp], rdx
	mov	QWORD PTR -120[rbp], 0
	movsx	rdx, eax
	mov	QWORD PTR -144[rbp], rdx
	mov	QWORD PTR -136[rbp], 0
	cdqe
	lea	rdx, 0[0+rax*8]
	mov	eax, 16
	sub	rax, 1
	add	rax, rdx
	mov	ebx, 16
	mov	edx, 0
	div	rbx
	imul	rax, rax, 16
	mov	rcx, rax
	and	rcx, -4096
	mov	rdx, rsp
	sub	rdx, rcx
.L18:
	cmp	rsp, rdx
	je	.L19
	sub	rsp, 4096
	or	QWORD PTR 4088[rsp], 0
	jmp	.L18
.L19:
	mov	rdx, rax
	and	edx, 4095
	sub	rsp, rdx
	mov	rdx, rax
	and	edx, 4095
	test	rdx, rdx
	je	.L20
	and	eax, 4095
	sub	rax, 8
	add	rax, rsp
	or	QWORD PTR [rax], 0
.L20:
	mov	rax, rsp
	add	rax, 7
	shr	rax, 3
	sal	rax, 3
	mov	QWORD PTR -80[rbp], rax
	mov	eax, DWORD PTR n_threads[rip]
	movsx	rdx, eax
	sub	rdx, 1
	mov	QWORD PTR -72[rbp], rdx
	movsx	rdx, eax
	mov	r14, rdx
	mov	r15d, 0
	movsx	rdx, eax
	mov	r12, rdx
	mov	r13d, 0
	cdqe
	lea	rdx, 0[0+rax*4]
	mov	eax, 16
	sub	rax, 1
	add	rax, rdx
	mov	ebx, 16
	mov	edx, 0
	div	rbx
	imul	rax, rax, 16
	mov	rcx, rax
	and	rcx, -4096
	mov	rdx, rsp
	sub	rdx, rcx
.L21:
	cmp	rsp, rdx
	je	.L22
	sub	rsp, 4096
	or	QWORD PTR 4088[rsp], 0
	jmp	.L21
.L22:
	mov	rdx, rax
	and	edx, 4095
	sub	rsp, rdx
	mov	rdx, rax
	and	edx, 4095
	test	rdx, rdx
	je	.L23
	and	eax, 4095
	sub	rax, 8
	add	rax, rsp
	or	QWORD PTR [rax], 0
.L23:
	mov	rax, rsp
	add	rax, 3
	shr	rax, 2
	sal	rax, 2
	mov	QWORD PTR -64[rbp], rax
	mov	edx, 0
	mov	esi, 0
	lea	rdi, slot_cheio[rip]
	call	sem_init@PLT
	mov	edx, 1
	mov	esi, 0
	lea	rdi, vetor_vazio[rip]
	call	sem_init@PLT
	mov	edx, 1
	mov	esi, 0
	lea	rdi, mutex[rip]
	call	sem_init@PLT
	mov	DWORD PTR -92[rbp], 0
	jmp	.L24
.L26:
	mov	eax, DWORD PTR -92[rbp]
	lea	ecx, 1[rax]
	mov	rax, QWORD PTR -64[rbp]
	mov	edx, DWORD PTR -92[rbp]
	movsx	rdx, edx
	mov	DWORD PTR [rax+rdx*4], ecx
	mov	eax, DWORD PTR -92[rbp]
	cdqe
	lea	rdx, 0[0+rax*4]
	mov	rax, QWORD PTR -64[rbp]
	add	rdx, rax
	mov	eax, DWORD PTR -92[rbp]
	cdqe
	lea	rcx, 0[0+rax*8]
	mov	rax, QWORD PTR -80[rbp]
	add	rax, rcx
	mov	rcx, rdx
	lea	rdx, thread_consumidora[rip]
	mov	esi, 0
	mov	rdi, rax
	call	pthread_create@PLT
	test	eax, eax
	je	.L25
	mov	edi, -1
	call	exit@PLT
.L25:
	add	DWORD PTR -92[rbp], 1
.L24:
	mov	eax, DWORD PTR n_threads_consumidoras[rip]
	cmp	DWORD PTR -92[rbp], eax
	jl	.L26
	mov	DWORD PTR -96[rbp], 0
	jmp	.L27
.L29:
	mov	edx, DWORD PTR n_threads_consumidoras[rip]
	mov	eax, DWORD PTR -96[rbp]
	add	edx, eax
	mov	eax, DWORD PTR -96[rbp]
	lea	ecx, 1[rax]
	mov	rax, QWORD PTR -64[rbp]
	movsx	rdx, edx
	mov	DWORD PTR [rax+rdx*4], ecx
	mov	edx, DWORD PTR n_threads_consumidoras[rip]
	mov	eax, DWORD PTR -96[rbp]
	add	eax, edx
	cdqe
	lea	rdx, 0[0+rax*4]
	mov	rax, QWORD PTR -64[rbp]
	add	rdx, rax
	mov	ecx, DWORD PTR n_threads_consumidoras[rip]
	mov	eax, DWORD PTR -96[rbp]
	add	eax, ecx
	cdqe
	lea	rcx, 0[0+rax*8]
	mov	rax, QWORD PTR -80[rbp]
	add	rax, rcx
	mov	rcx, rdx
	lea	rdx, thread_produtora[rip]
	mov	esi, 0
	mov	rdi, rax
	call	pthread_create@PLT
	test	eax, eax
	je	.L28
	mov	edi, -1
	call	exit@PLT
.L28:
	add	DWORD PTR -96[rbp], 1
.L27:
	mov	eax, DWORD PTR n_threads_produtoras[rip]
	cmp	DWORD PTR -96[rbp], eax
	jl	.L29
	mov	edi, 0
	call	pthread_exit@PLT
.L16:
	mov	rsp, rbx
	mov	rbx, QWORD PTR -56[rbp]
	sub	rbx, QWORD PTR fs:40
	je	.L31
	call	__stack_chk_fail@PLT
.L31:
	lea	rsp, -40[rbp]
	pop	rbx
	pop	r12
	pop	r13
	pop	r14
	pop	r15
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE10:
	.size	main, .-main
	.local	out.0
	.comm	out.0,4,4
	.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	"756494.c"
	.text
	.comm	n_threads_consumidoras,4,4
	.comm	n_threads_produtoras,4,4
	.comm	n_threads,4,4
	.comm	slot_cheio,16,4
	.comm	vetor_vazio,16,4
	.comm	mutex,16,4
	.comm	vetor_int,4,4
	.global	quant_leituras
	.bss
	.align	2
	.type	quant_leituras, %object
	.size	quant_leituras, 4
quant_leituras:
	.space	4
	.section	.rodata
	.align	2
.LC0:
	.ascii	"Thread consumidora %d consumiu vetor_int[%d] = %d\012"
	.ascii	"\000"
	.text
	.align	2
	.global	Retirar
	.syntax unified
	.arm
	.fpu softvfp
	.type	Retirar, %function
Retirar:
	@ 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	r0, .L3
	bl	sem_wait
	ldr	r0, .L3+4
	bl	sem_wait
	mov	r0, #1
	bl	sleep
	ldr	r3, .L3+8
	ldr	r2, [r3]
	ldr	r3, .L3+12
	ldr	r3, [r3]
	lsl	r3, r3, #2
	add	r3, r2, r3
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	ldr	r3, [fp, #-16]
	ldr	r1, [r3]
	ldr	r3, .L3+12
	ldr	r2, [r3]
	ldr	r3, [fp, #-8]
	ldr	r0, .L3+16
	bl	printf
	ldr	r3, .L3+8
	ldr	r2, [r3]
	ldr	r3, .L3+12
	ldr	r3, [r3]
	lsl	r3, r3, #2
	add	r3, r2, r3
	mov	r2, #0
	str	r2, [r3]
	ldr	r3, .L3+20
	ldr	r3, [r3]
	add	r3, r3, #1
	ldr	r2, .L3+20
	str	r3, [r2]
	ldr	r3, .L3+12
	ldr	r3, [r3]
	add	r1, r3, #1
	ldr	r3, .L3+24
	smull	r2, r3, r1, r3
	asr	r2, r3, #2
	asr	r3, r1, #31
	sub	r2, r2, r3
	mov	r3, r2
	lsl	r3, r3, #2
	add	r3, r3, r2
	lsl	r3, r3, #1
	sub	r2, r1, r3
	ldr	r3, .L3+12
	str	r2, [r3]
	ldr	r3, .L3+20
	ldr	r3, [r3]
	cmp	r3, #10
	bne	.L2
	ldr	r0, .L3+28
	bl	sem_post
	ldr	r3, .L3+20
	mov	r2, #0
	str	r2, [r3]
.L2:
	ldr	r0, .L3+4
	bl	sem_post
	mov	r0, #0
	bl	sleep
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L4:
	.align	2
.L3:
	.word	slot_cheio
	.word	mutex
	.word	vetor_int
	.word	out.6264
	.word	.LC0
	.word	quant_leituras
	.word	1717986919
	.word	vetor_vazio
	.size	Retirar, .-Retirar
	.section	.rodata
	.align	2
.LC1:
	.ascii	"Thread produtora %d escreveu o vetor: \000"
	.align	2
.LC2:
	.ascii	"%d/ \000"
	.text
	.align	2
	.global	Inserir
	.syntax unified
	.arm
	.fpu softvfp
	.type	Inserir, %function
Inserir:
	@ 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	r0, .L12
	bl	sem_wait
	ldr	r0, .L12+4
	bl	sem_wait
	mov	r3, #0
	str	r3, [fp, #-16]
	b	.L6
.L7:
	bl	rand
	mov	r1, r0
	ldr	r3, .L12+8
	smull	r2, r3, r1, r3
	asr	r2, r3, #2
	asr	r3, r1, #31
	sub	r2, r2, r3
	mov	r3, r2
	lsl	r3, r3, #2
	add	r3, r3, r2
	lsl	r3, r3, #1
	sub	r2, r1, r3
	ldr	r3, .L12+12
	ldr	r1, [r3]
	ldr	r3, [fp, #-16]
	lsl	r3, r3, #2
	add	r3, r1, r3
	add	r2, r2, #1
	str	r2, [r3]
	ldr	r3, [fp, #-16]
	add	r3, r3, #1
	str	r3, [fp, #-16]
.L6:
	ldr	r3, [fp, #-16]
	cmp	r3, #9
	ble	.L7
	mov	r0, #0
	bl	sleep
	ldr	r3, [fp, #-24]
	ldr	r3, [r3]
	mov	r1, r3
	ldr	r0, .L12+16
	bl	printf
	mov	r3, #0
	str	r3, [fp, #-12]
	b	.L8
.L9:
	ldr	r3, .L12+12
	ldr	r2, [r3]
	ldr	r3, [fp, #-12]
	lsl	r3, r3, #2
	add	r3, r2, r3
	ldr	r3, [r3]
	mov	r1, r3
	ldr	r0, .L12+20
	bl	printf
	ldr	r3, [fp, #-12]
	add	r3, r3, #1
	str	r3, [fp, #-12]
.L8:
	ldr	r3, [fp, #-12]
	cmp	r3, #9
	ble	.L9
	mov	r0, #10
	bl	putchar
	ldr	r0, .L12+4
	bl	sem_post
	mov	r3, #0
	str	r3, [fp, #-8]
	b	.L10
.L11:
	ldr	r0, .L12+24
	bl	sem_post
	ldr	r3, [fp, #-8]
	add	r3, r3, #1
	str	r3, [fp, #-8]
.L10:
	ldr	r3, [fp, #-8]
	cmp	r3, #9
	ble	.L11
	nop
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L13:
	.align	2
.L12:
	.word	vetor_vazio
	.word	mutex
	.word	1717986919
	.word	vetor_int
	.word	.LC1
	.word	.LC2
	.word	slot_cheio
	.size	Inserir, .-Inserir
	.align	2
	.global	thread_produtora
	.syntax unified
	.arm
	.fpu softvfp
	.type	thread_produtora, %function
thread_produtora:
	@ 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]
	str	r3, [fp, #-8]
.L15:
	ldr	r0, [fp, #-8]
	bl	Inserir
	b	.L15
	.size	thread_produtora, .-thread_produtora
	.align	2
	.global	thread_consumidora
	.syntax unified
	.arm
	.fpu softvfp
	.type	thread_consumidora, %function
thread_consumidora:
	@ 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]
	str	r3, [fp, #-8]
.L17:
	ldr	r0, [fp, #-8]
	bl	Retirar
	b	.L17
	.size	thread_consumidora, .-thread_consumidora
	.section	.rodata
	.align	2
.LC3:
	.ascii	"Digite: %s <numero de threads consumidoras> <numero"
	.ascii	" de threads produtoras>\012\000"
	.align	2
.LC4:
	.ascii	"ERRO--malloc\012\000"
	.align	2
.LC5:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 40
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, fp, lr}
	add	fp, sp, #8
	sub	sp, sp, #44
	str	r0, [fp, #-48]
	str	r1, [fp, #-52]
	ldr	r3, .L30
	ldr	r3, [r3]
	str	r3, [fp, #-16]
	mov	r3,#0
	mov	r3, sp
	mov	r4, r3
	mov	r0, #0
	bl	time
	mov	r3, r0
	mov	r0, r3
	bl	srand
	ldr	r3, [fp, #-48]
	cmp	r3, #2
	bgt	.L19
	ldr	r3, .L30+4
	ldr	r0, [r3]
	ldr	r3, [fp, #-52]
	ldr	r3, [r3]
	mov	r2, r3
	ldr	r1, .L30+8
	bl	fprintf
	mov	r3, #1
	b	.L20
.L19:
	ldr	r3, [fp, #-52]
	add	r3, r3, #4
	ldr	r3, [r3]
	mov	r0, r3
	bl	atoi
	mov	r3, r0
	ldr	r2, .L30+12
	str	r3, [r2]
	ldr	r3, [fp, #-52]
	add	r3, r3, #8
	ldr	r3, [r3]
	mov	r0, r3
	bl	atoi
	mov	r3, r0
	ldr	r2, .L30+16
	str	r3, [r2]
	ldr	r3, .L30+12
	ldr	r2, [r3]
	ldr	r3, .L30+16
	ldr	r3, [r3]
	add	r3, r2, r3
	ldr	r2, .L30+20
	str	r3, [r2]
	mov	r0, #40
	bl	malloc
	mov	r3, r0
	mov	r2, r3
	ldr	r3, .L30+24
	str	r2, [r3]
	ldr	r3, .L30+24
	ldr	r3, [r3]
	cmp	r3, #0
	bne	.L21
	ldr	r3, .L30+4
	ldr	r3, [r3]
	mov	r2, #13
	mov	r1, #1
	ldr	r0, .L30+28
	bl	fwrite
	mov	r3, #2
	b	.L20
.L21:
	ldr	r3, .L30+20
	ldr	ip, [r3]
	sub	r3, ip, #1
	str	r3, [fp, #-32]
	mov	r3, ip
	mov	r0, r3
	mov	r1, #0
	mov	r2, #0
	mov	r3, #0
	lsl	r3, r1, #5
	orr	r3, r3, r0, lsr #27
	lsl	r2, r0, #5
	mov	r3, ip
	mov	r0, r3
	mov	r1, #0
	mov	r2, #0
	mov	r3, #0
	lsl	r3, r1, #5
	orr	r3, r3, r0, lsr #27
	lsl	r2, r0, #5
	mov	r3, ip
	lsl	r3, r3, #2
	add	r3, r3, #7
	lsr	r3, r3, #3
	lsl	r3, r3, #3
	sub	sp, sp, r3
	mov	r3, sp
	add	r3, r3, #3
	lsr	r3, r3, #2
	lsl	r3, r3, #2
	str	r3, [fp, #-28]
	ldr	r3, .L30+20
	ldr	ip, [r3]
	sub	r3, ip, #1
	str	r3, [fp, #-24]
	mov	r3, ip
	mov	r0, r3
	mov	r1, #0
	mov	r2, #0
	mov	r3, #0
	lsl	r3, r1, #5
	orr	r3, r3, r0, lsr #27
	lsl	r2, r0, #5
	mov	r3, ip
	mov	r0, r3
	mov	r1, #0
	mov	r2, #0
	mov	r3, #0
	lsl	r3, r1, #5
	orr	r3, r3, r0, lsr #27
	lsl	r2, r0, #5
	mov	r3, ip
	lsl	r3, r3, #2
	add	r3, r3, #7
	lsr	r3, r3, #3
	lsl	r3, r3, #3
	sub	sp, sp, r3
	mov	r3, sp
	add	r3, r3, #3
	lsr	r3, r3, #2
	lsl	r3, r3, #2
	str	r3, [fp, #-20]
	mov	r2, #0
	mov	r1, #0
	ldr	r0, .L30+32
	bl	sem_init
	mov	r2, #1
	mov	r1, #0
	ldr	r0, .L30+36
	bl	sem_init
	mov	r2, #1
	mov	r1, #0
	ldr	r0, .L30+40
	bl	sem_init
	mov	r3, #0
	str	r3, [fp, #-36]
	b	.L22
.L24:
	ldr	r3, [fp, #-36]
	add	r1, r3, #1
	ldr	r3, [fp, #-20]
	ldr	r2, [fp, #-36]
	str	r1, [r3, r2, lsl #2]
	ldr	r3, [fp, #-36]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-28]
	add	r0, r2, r3
	ldr	r3, [fp, #-36]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-20]
	add	r3, r2, r3
	ldr	r2, .L30+44
	mov	r1, #0
	bl	pthread_create
	mov	r3, r0
	cmp	r3, #0
	beq	.L23
	mvn	r0, #0
	bl	exit
.L23:
	ldr	r3, [fp, #-36]
	add	r3, r3, #1
	str	r3, [fp, #-36]
.L22:
	ldr	r3, .L30+12
	ldr	r3, [r3]
	ldr	r2, [fp, #-36]
	cmp	r2, r3
	blt	.L24
	mov	r3, #0
	str	r3, [fp, #-40]
	b	.L25
.L27:
	ldr	r3, .L30+12
	ldr	r2, [r3]
	ldr	r3, [fp, #-40]
	add	r2, r2, r3
	ldr	r3, [fp, #-40]
	add	r1, r3, #1
	ldr	r3, [fp, #-20]
	str	r1, [r3, r2, lsl #2]
	ldr	r3, .L30+12
	ldr	r2, [r3]
	ldr	r3, [fp, #-40]
	add	r3, r2, r3
	lsl	r3, r3, #2
	ldr	r2, [fp, #-28]
	add	r0, r2, r3
	ldr	r3, .L30+12
	ldr	r2, [r3]
	ldr	r3, [fp, #-40]
	add	r3, r2, r3
	lsl	r3, r3, #2
	ldr	r2, [fp, #-20]
	add	r3, r2, r3
	ldr	r2, .L30+48
	mov	r1, #0
	bl	pthread_create
	mov	r3, r0
	cmp	r3, #0
	beq	.L26
	mvn	r0, #0
	bl	exit
.L26:
	ldr	r3, [fp, #-40]
	add	r3, r3, #1
	str	r3, [fp, #-40]
.L25:
	ldr	r3, .L30+16
	ldr	r3, [r3]
	ldr	r2, [fp, #-40]
	cmp	r2, r3
	blt	.L27
	mov	r0, #0
	bl	pthread_exit
.L20:
	mov	sp, r4
	ldr	r2, .L30
	ldr	r1, [r2]
	ldr	r2, [fp, #-16]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L29
	bl	__stack_chk_fail
.L29:
	mov	r0, r3
	sub	sp, fp, #8
	@ sp needed
	pop	{r4, fp, pc}
.L31:
	.align	2
.L30:
	.word	.LC5
	.word	stderr
	.word	.LC3
	.word	n_threads_consumidoras
	.word	n_threads_produtoras
	.word	n_threads
	.word	vetor_int
	.word	.LC4
	.word	slot_cheio
	.word	vetor_vazio
	.word	mutex
	.word	thread_consumidora
	.word	thread_produtora
	.size	main, .-main
	.local	out.6264
	.comm	out.6264,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
