	.file	"555925.c"
	.intel_syntax noprefix
	.text
	.globl	moleculeCounter
	.bss
	.align 4
	.type	moleculeCounter, @object
	.size	moleculeCounter, 4
moleculeCounter:
	.zero	4
	.globl	oxygenSpots
	.data
	.align 4
	.type	oxygenSpots, @object
	.size	oxygenSpots, 4
oxygenSpots:
	.long	1
	.globl	hydrogenSpots
	.align 4
	.type	hydrogenSpots, @object
	.size	hydrogenSpots, 4
hydrogenSpots:
	.long	2
	.globl	mutex
	.bss
	.align 32
	.type	mutex, @object
	.size	mutex, 40
mutex:
	.zero	40
	.globl	queuesFree
	.align 32
	.type	queuesFree, @object
	.size	queuesFree, 48
queuesFree:
	.zero	48
	.globl	queuesReady
	.align 32
	.type	queuesReady, @object
	.size	queuesReady, 48
queuesReady:
	.zero	48
	.section	.rodata
	.align 8
.LC0:
	.string	"Produtor esperando aviso de que as filas est\303\243o prontas para formar mol\303\251cula"
.LC1:
	.string	"Formando mol\303\251cula"
	.text
	.globl	moleculeProducer
	.type	moleculeProducer, @function
moleculeProducer:
.LFB0:
	.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	QWORD PTR -8[rbp], rdi
	jmp	.L2
.L5:
	lea	rdi, mutex[rip]
	call	pthread_mutex_lock@PLT
	jmp	.L3
.L4:
	lea	rdi, .LC0[rip]
	call	puts@PLT
	lea	rsi, mutex[rip]
	lea	rdi, queuesReady[rip]
	call	pthread_cond_wait@PLT
.L3:
	mov	eax, DWORD PTR oxygenSpots[rip]
	test	eax, eax
	jne	.L4
	mov	eax, DWORD PTR hydrogenSpots[rip]
	test	eax, eax
	jne	.L4
	lea	rdi, .LC1[rip]
	call	puts@PLT
	mov	eax, DWORD PTR moleculeCounter[rip]
	add	eax, 1
	mov	DWORD PTR moleculeCounter[rip], eax
	mov	DWORD PTR oxygenSpots[rip], 1
	mov	DWORD PTR hydrogenSpots[rip], 2
	lea	rdi, queuesFree[rip]
	call	pthread_cond_broadcast@PLT
	lea	rdi, mutex[rip]
	call	pthread_mutex_unlock@PLT
.L2:
	mov	eax, DWORD PTR moleculeCounter[rip]
	cmp	eax, 99
	jle	.L5
	mov	eax, 0
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	moleculeProducer, .-moleculeProducer
	.section	.rodata
.LC2:
	.string	"Sem vaga para o oxig\303\252nio"
	.align 8
.LC3:
	.string	"Espa\303\247o vazio para o oxig\303\252nio. Ocupando-o..."
	.text
	.globl	oxygen
	.type	oxygen, @function
oxygen:
.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, 16
	mov	QWORD PTR -8[rbp], rdi
	lea	rdi, mutex[rip]
	call	pthread_mutex_lock@PLT
	jmp	.L8
.L9:
	lea	rdi, .LC2[rip]
	call	puts@PLT
	lea	rsi, mutex[rip]
	lea	rdi, queuesFree[rip]
	call	pthread_cond_wait@PLT
.L8:
	mov	eax, DWORD PTR oxygenSpots[rip]
	test	eax, eax
	je	.L9
	lea	rdi, .LC3[rip]
	call	puts@PLT
	mov	DWORD PTR oxygenSpots[rip], 0
	mov	eax, DWORD PTR hydrogenSpots[rip]
	test	eax, eax
	jne	.L10
	lea	rdi, queuesReady[rip]
	call	pthread_cond_signal@PLT
.L10:
	lea	rdi, mutex[rip]
	call	pthread_mutex_unlock@PLT
	mov	eax, 0
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.size	oxygen, .-oxygen
	.section	.rodata
.LC4:
	.string	"Sem vaga para o hidrog\303\252nio"
	.align 8
.LC5:
	.string	"Espa\303\247o vazio para o hidrog\303\252nio. Ocupando-o..."
	.text
	.globl	hydrogen
	.type	hydrogen, @function
hydrogen:
.LFB2:
	.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	QWORD PTR -8[rbp], rdi
	lea	rdi, mutex[rip]
	call	pthread_mutex_lock@PLT
	jmp	.L13
.L14:
	lea	rdi, .LC4[rip]
	call	puts@PLT
	lea	rsi, mutex[rip]
	lea	rdi, queuesFree[rip]
	call	pthread_cond_wait@PLT
.L13:
	mov	eax, DWORD PTR hydrogenSpots[rip]
	test	eax, eax
	je	.L14
	lea	rdi, .LC5[rip]
	call	puts@PLT
	mov	eax, DWORD PTR hydrogenSpots[rip]
	sub	eax, 1
	mov	DWORD PTR hydrogenSpots[rip], eax
	mov	eax, DWORD PTR oxygenSpots[rip]
	test	eax, eax
	jne	.L15
	mov	eax, DWORD PTR hydrogenSpots[rip]
	test	eax, eax
	jne	.L15
	lea	rdi, queuesReady[rip]
	call	pthread_cond_signal@PLT
.L15:
	lea	rdi, mutex[rip]
	call	pthread_mutex_unlock@PLT
	mov	eax, 0
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE2:
	.size	hydrogen, .-hydrogen
	.globl	main
	.type	main, @function
main:
.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, 2432
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	lea	rax, -2424[rbp]
	mov	ecx, 0
	lea	rdx, moleculeProducer[rip]
	mov	esi, 0
	mov	rdi, rax
	call	pthread_create@PLT
	mov	DWORD PTR -2428[rbp], 0
	jmp	.L18
.L20:
	lea	rdx, -1616[rbp]
	mov	eax, DWORD PTR -2428[rbp]
	cdqe
	sal	rax, 3
	add	rax, rdx
	mov	ecx, 0
	lea	rdx, hydrogen[rip]
	mov	esi, 0
	mov	rdi, rax
	call	pthread_create@PLT
	mov	eax, DWORD PTR -2428[rbp]
	and	eax, 1
	test	eax, eax
	jne	.L19
	mov	eax, DWORD PTR -2428[rbp]
	mov	edx, eax
	shr	edx, 31
	add	eax, edx
	sar	eax
	lea	rdx, -2416[rbp]
	cdqe
	sal	rax, 3
	add	rax, rdx
	mov	ecx, 0
	lea	rdx, oxygen[rip]
	mov	esi, 0
	mov	rdi, rax
	call	pthread_create@PLT
.L19:
	add	DWORD PTR -2428[rbp], 1
.L18:
	cmp	DWORD PTR -2428[rbp], 199
	jle	.L20
	mov	rax, QWORD PTR -2424[rbp]
	mov	esi, 0
	mov	rdi, rax
	call	pthread_join@PLT
	mov	eax, 0
	mov	rcx, QWORD PTR -8[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L22
	call	__stack_chk_fail@PLT
.L22:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE3:
	.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	"555925.c"
	.text
	.global	moleculeCounter
	.bss
	.align	2
	.type	moleculeCounter, %object
	.size	moleculeCounter, 4
moleculeCounter:
	.space	4
	.global	oxygenSpots
	.data
	.align	2
	.type	oxygenSpots, %object
	.size	oxygenSpots, 4
oxygenSpots:
	.word	1
	.global	hydrogenSpots
	.align	2
	.type	hydrogenSpots, %object
	.size	hydrogenSpots, 4
hydrogenSpots:
	.word	2
	.global	mutex
	.bss
	.align	2
	.type	mutex, %object
	.size	mutex, 24
mutex:
	.space	24
	.global	queuesFree
	.align	3
	.type	queuesFree, %object
	.size	queuesFree, 48
queuesFree:
	.space	48
	.global	queuesReady
	.align	3
	.type	queuesReady, %object
	.size	queuesReady, 48
queuesReady:
	.space	48
	.section	.rodata
	.align	2
.LC0:
	.ascii	"Produtor esperando aviso de que as filas est\303\243"
	.ascii	"o prontas para formar mol\303\251cula\000"
	.align	2
.LC1:
	.ascii	"Formando mol\303\251cula\000"
	.text
	.align	2
	.global	moleculeProducer
	.syntax unified
	.arm
	.fpu softvfp
	.type	moleculeProducer, %function
moleculeProducer:
	@ 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]
	b	.L2
.L5:
	ldr	r0, .L7
	bl	pthread_mutex_lock
	b	.L3
.L4:
	ldr	r0, .L7+4
	bl	puts
	ldr	r1, .L7
	ldr	r0, .L7+8
	bl	pthread_cond_wait
.L3:
	ldr	r3, .L7+12
	ldr	r3, [r3]
	cmp	r3, #0
	bne	.L4
	ldr	r3, .L7+16
	ldr	r3, [r3]
	cmp	r3, #0
	bne	.L4
	ldr	r0, .L7+20
	bl	puts
	ldr	r3, .L7+24
	ldr	r3, [r3]
	add	r3, r3, #1
	ldr	r2, .L7+24
	str	r3, [r2]
	ldr	r3, .L7+12
	mov	r2, #1
	str	r2, [r3]
	ldr	r3, .L7+16
	mov	r2, #2
	str	r2, [r3]
	ldr	r0, .L7+28
	bl	pthread_cond_broadcast
	ldr	r0, .L7
	bl	pthread_mutex_unlock
.L2:
	ldr	r3, .L7+24
	ldr	r3, [r3]
	cmp	r3, #99
	ble	.L5
	mov	r3, #0
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L8:
	.align	2
.L7:
	.word	mutex
	.word	.LC0
	.word	queuesReady
	.word	oxygenSpots
	.word	hydrogenSpots
	.word	.LC1
	.word	moleculeCounter
	.word	queuesFree
	.size	moleculeProducer, .-moleculeProducer
	.section	.rodata
	.align	2
.LC2:
	.ascii	"Sem vaga para o oxig\303\252nio\000"
	.align	2
.LC3:
	.ascii	"Espa\303\247o vazio para o oxig\303\252nio. Ocupand"
	.ascii	"o-o...\000"
	.text
	.align	2
	.global	oxygen
	.syntax unified
	.arm
	.fpu softvfp
	.type	oxygen, %function
oxygen:
	@ 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, .L14
	bl	pthread_mutex_lock
	b	.L10
.L11:
	ldr	r0, .L14+4
	bl	puts
	ldr	r1, .L14
	ldr	r0, .L14+8
	bl	pthread_cond_wait
.L10:
	ldr	r3, .L14+12
	ldr	r3, [r3]
	cmp	r3, #0
	beq	.L11
	ldr	r0, .L14+16
	bl	puts
	ldr	r3, .L14+12
	mov	r2, #0
	str	r2, [r3]
	ldr	r3, .L14+20
	ldr	r3, [r3]
	cmp	r3, #0
	bne	.L12
	ldr	r0, .L14+24
	bl	pthread_cond_signal
.L12:
	ldr	r0, .L14
	bl	pthread_mutex_unlock
	mov	r3, #0
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L15:
	.align	2
.L14:
	.word	mutex
	.word	.LC2
	.word	queuesFree
	.word	oxygenSpots
	.word	.LC3
	.word	hydrogenSpots
	.word	queuesReady
	.size	oxygen, .-oxygen
	.section	.rodata
	.align	2
.LC4:
	.ascii	"Sem vaga para o hidrog\303\252nio\000"
	.align	2
.LC5:
	.ascii	"Espa\303\247o vazio para o hidrog\303\252nio. Ocupa"
	.ascii	"ndo-o...\000"
	.text
	.align	2
	.global	hydrogen
	.syntax unified
	.arm
	.fpu softvfp
	.type	hydrogen, %function
hydrogen:
	@ 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, .L21
	bl	pthread_mutex_lock
	b	.L17
.L18:
	ldr	r0, .L21+4
	bl	puts
	ldr	r1, .L21
	ldr	r0, .L21+8
	bl	pthread_cond_wait
.L17:
	ldr	r3, .L21+12
	ldr	r3, [r3]
	cmp	r3, #0
	beq	.L18
	ldr	r0, .L21+16
	bl	puts
	ldr	r3, .L21+12
	ldr	r3, [r3]
	sub	r3, r3, #1
	ldr	r2, .L21+12
	str	r3, [r2]
	ldr	r3, .L21+20
	ldr	r3, [r3]
	cmp	r3, #0
	bne	.L19
	ldr	r3, .L21+12
	ldr	r3, [r3]
	cmp	r3, #0
	bne	.L19
	ldr	r0, .L21+24
	bl	pthread_cond_signal
.L19:
	ldr	r0, .L21
	bl	pthread_mutex_unlock
	mov	r3, #0
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L22:
	.align	2
.L21:
	.word	mutex
	.word	.LC4
	.word	queuesFree
	.word	hydrogenSpots
	.word	.LC5
	.word	oxygenSpots
	.word	queuesReady
	.size	hydrogen, .-hydrogen
	.section	.rodata
	.align	2
.LC6:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 1216
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #1216
	ldr	r3, .L29
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	sub	r0, fp, #1200
	sub	r0, r0, #4
	sub	r0, r0, #12
	mov	r3, #0
	ldr	r2, .L29+4
	mov	r1, #0
	bl	pthread_create
	mov	r3, #0
	str	r3, [fp, #-1212]
	b	.L24
.L26:
	sub	r2, fp, #808
	ldr	r3, [fp, #-1212]
	lsl	r3, r3, #2
	add	r0, r2, r3
	mov	r3, #0
	ldr	r2, .L29+8
	mov	r1, #0
	bl	pthread_create
	ldr	r3, [fp, #-1212]
	and	r3, r3, #1
	cmp	r3, #0
	bne	.L25
	ldr	r3, [fp, #-1212]
	lsr	r2, r3, #31
	add	r3, r2, r3
	asr	r3, r3, #1
	mov	r2, r3
	sub	r3, fp, #1200
	sub	r3, r3, #4
	sub	r3, r3, #4
	lsl	r2, r2, #2
	add	r0, r3, r2
	mov	r3, #0
	ldr	r2, .L29+12
	mov	r1, #0
	bl	pthread_create
.L25:
	ldr	r3, [fp, #-1212]
	add	r3, r3, #1
	str	r3, [fp, #-1212]
.L24:
	ldr	r3, [fp, #-1212]
	cmp	r3, #199
	ble	.L26
	ldr	r3, [fp, #-1216]
	mov	r1, #0
	mov	r0, r3
	bl	pthread_join
	mov	r3, #0
	ldr	r2, .L29
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L28
	bl	__stack_chk_fail
.L28:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L30:
	.align	2
.L29:
	.word	.LC6
	.word	moleculeProducer
	.word	hydrogen
	.word	oxygen
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
