	.file	"386815.c"
	.intel_syntax noprefix
	.text
	.globl	running
	.data
	.align 4
	.type	running, @object
	.size	running, 4
running:
	.long	1
	.globl	eat_count
	.bss
	.align 16
	.type	eat_count, @object
	.size	eat_count, 20
eat_count:
	.zero	20
	.globl	think_count
	.align 16
	.type	think_count, @object
	.size	think_count, 20
think_count:
	.zero	20
	.globl	phi
	.align 32
	.type	phi, @object
	.size	phi, 40
phi:
	.zero	40
	.globl	garfos
	.align 32
	.type	garfos, @object
	.size	garfos, 160
garfos:
	.zero	160
	.section	.rodata
.LC0:
	.string	"[%ld] - Comendo... (%d)\n"
	.text
	.globl	eat
	.type	eat, @function
eat:
.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	QWORD PTR -8[rbp], rdi
	mov	rax, QWORD PTR -8[rbp]
	lea	rdx, 0[0+rax*4]
	lea	rax, eat_count[rip]
	mov	eax, DWORD PTR [rdx+rax]
	lea	edx, 1[rax]
	mov	rcx, QWORD PTR -8[rbp]
	lea	rsi, 0[0+rcx*4]
	lea	rcx, eat_count[rip]
	mov	DWORD PTR [rsi+rcx], edx
	mov	rcx, QWORD PTR -8[rbp]
	mov	edx, eax
	mov	rsi, rcx
	lea	rdi, .LC0[rip]
	mov	eax, 0
	call	printf@PLT
	mov	rax, QWORD PTR -8[rbp]
	mov	edi, eax
	call	sleep@PLT
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	eat, .-eat
	.section	.rodata
.LC1:
	.string	"[%ld] - Pensando... (%d)\n"
	.text
	.globl	think
	.type	think, @function
think:
.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, 16
	mov	QWORD PTR -8[rbp], rdi
	mov	rax, QWORD PTR -8[rbp]
	lea	rdx, 0[0+rax*4]
	lea	rax, think_count[rip]
	mov	edx, DWORD PTR [rdx+rax]
	mov	rax, QWORD PTR -8[rbp]
	mov	rsi, rax
	lea	rdi, .LC1[rip]
	mov	eax, 0
	call	printf@PLT
	mov	rax, QWORD PTR -8[rbp]
	mov	edi, eax
	call	sleep@PLT
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	think, .-think
	.globl	filosofo
	.type	filosofo, @function
filosofo:
.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
	cmp	QWORD PTR -8[rbp], 4
	jne	.L8
	jmp	.L5
.L6:
	lea	rdi, garfos[rip]
	call	sem_wait@PLT
	lea	rdi, garfos[rip+128]
	call	sem_wait@PLT
	mov	rax, QWORD PTR -8[rbp]
	mov	rdi, rax
	call	eat
	lea	rdi, garfos[rip]
	call	sem_post@PLT
	lea	rdi, garfos[rip+128]
	call	sem_post@PLT
	mov	rax, QWORD PTR -8[rbp]
	mov	rdi, rax
	call	think
.L5:
	mov	eax, DWORD PTR running[rip]
	test	eax, eax
	jne	.L6
	jmp	.L7
.L9:
	mov	rax, QWORD PTR -8[rbp]
	sal	rax, 5
	mov	rdx, rax
	lea	rax, garfos[rip]
	add	rax, rdx
	mov	rdi, rax
	call	sem_wait@PLT
	lea	rdi, garfos[rip+128]
	call	sem_wait@PLT
	mov	rax, QWORD PTR -8[rbp]
	mov	rdi, rax
	call	eat
	mov	rax, QWORD PTR -8[rbp]
	sal	rax, 5
	mov	rdx, rax
	lea	rax, garfos[rip]
	add	rax, rdx
	mov	rdi, rax
	call	sem_post@PLT
	lea	rdi, garfos[rip+128]
	call	sem_post@PLT
	mov	rax, QWORD PTR -8[rbp]
	mov	rdi, rax
	call	think
.L8:
	mov	eax, DWORD PTR running[rip]
	test	eax, eax
	jne	.L9
.L7:
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.size	filosofo, .-filosofo
	.globl	main
	.type	main, @function
main:
.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	DWORD PTR -20[rbp], 0
	jmp	.L11
.L12:
	mov	eax, DWORD PTR -20[rbp]
	cdqe
	sal	rax, 5
	mov	rdx, rax
	lea	rax, garfos[rip]
	add	rax, rdx
	mov	edx, 1
	mov	esi, 0
	mov	rdi, rax
	call	sem_init@PLT
	mov	eax, DWORD PTR -20[rbp]
	cdqe
	lea	rdx, 0[0+rax*4]
	lea	rax, eat_count[rip]
	mov	DWORD PTR [rdx+rax], 0
	mov	eax, DWORD PTR -20[rbp]
	cdqe
	lea	rdx, 0[0+rax*4]
	lea	rax, think_count[rip]
	mov	DWORD PTR [rdx+rax], 0
	add	DWORD PTR -20[rbp], 1
.L11:
	cmp	DWORD PTR -20[rbp], 4
	jle	.L12
	mov	QWORD PTR -8[rbp], 0
	jmp	.L13
.L14:
	mov	rax, QWORD PTR -8[rbp]
	mov	rdx, QWORD PTR -8[rbp]
	lea	rcx, 0[0+rdx*8]
	lea	rdx, phi[rip]
	lea	rdi, [rcx+rdx]
	mov	rcx, rax
	lea	rdx, filosofo[rip]
	mov	esi, 0
	call	pthread_create@PLT
	add	QWORD PTR -8[rbp], 1
.L13:
	cmp	QWORD PTR -8[rbp], 4
	jle	.L14
	mov	edi, 30
	call	sleep@PLT
	mov	DWORD PTR running[rip], 0
	mov	DWORD PTR -16[rbp], 0
	jmp	.L15
.L16:
	mov	eax, DWORD PTR -16[rbp]
	cdqe
	lea	rdx, 0[0+rax*8]
	lea	rax, phi[rip]
	mov	rax, QWORD PTR [rdx+rax]
	mov	esi, 0
	mov	rdi, rax
	call	pthread_join@PLT
	add	DWORD PTR -16[rbp], 1
.L15:
	cmp	DWORD PTR -16[rbp], 4
	jle	.L16
	mov	DWORD PTR -12[rbp], 0
	jmp	.L17
.L18:
	mov	eax, DWORD PTR -12[rbp]
	cdqe
	sal	rax, 5
	mov	rdx, rax
	lea	rax, garfos[rip]
	add	rax, rdx
	mov	rdi, rax
	call	sem_destroy@PLT
	add	DWORD PTR -12[rbp], 1
.L17:
	cmp	DWORD PTR -12[rbp], 4
	jle	.L18
	mov	eax, 0
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE9:
	.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	"386815.c"
	.text
	.global	running
	.data
	.align	2
	.type	running, %object
	.size	running, 4
running:
	.word	1
	.comm	eat_count,20,4
	.comm	think_count,20,4
	.comm	phi,20,4
	.comm	garfos,80,4
	.section	.rodata
	.align	2
.LC0:
	.ascii	"[%ld] - Comendo... (%d)\012\000"
	.text
	.align	2
	.global	eat
	.syntax unified
	.arm
	.fpu softvfp
	.type	eat, %function
eat:
	@ 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	r2, .L2
	ldr	r3, [fp, #-8]
	ldr	r3, [r2, r3, lsl #2]
	add	r1, r3, #1
	ldr	r0, .L2
	ldr	r2, [fp, #-8]
	str	r1, [r0, r2, lsl #2]
	mov	r2, r3
	ldr	r1, [fp, #-8]
	ldr	r0, .L2+4
	bl	printf
	ldr	r3, [fp, #-8]
	mov	r0, r3
	bl	sleep
	nop
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L3:
	.align	2
.L2:
	.word	eat_count
	.word	.LC0
	.size	eat, .-eat
	.section	.rodata
	.align	2
.LC1:
	.ascii	"[%ld] - Pensando... (%d)\012\000"
	.text
	.align	2
	.global	think
	.syntax unified
	.arm
	.fpu softvfp
	.type	think, %function
think:
	@ 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	r2, .L5
	ldr	r3, [fp, #-8]
	ldr	r3, [r2, r3, lsl #2]
	mov	r2, r3
	ldr	r1, [fp, #-8]
	ldr	r0, .L5+4
	bl	printf
	ldr	r3, [fp, #-8]
	mov	r0, r3
	bl	sleep
	nop
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L6:
	.align	2
.L5:
	.word	think_count
	.word	.LC1
	.size	think, .-think
	.align	2
	.global	filosofo
	.syntax unified
	.arm
	.fpu softvfp
	.type	filosofo, %function
filosofo:
	@ 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]
	ldr	r3, [fp, #-8]
	cmp	r3, #4
	bne	.L12
	b	.L9
.L10:
	ldr	r0, .L14
	bl	sem_wait
	ldr	r0, .L14+4
	bl	sem_wait
	ldr	r0, [fp, #-8]
	bl	eat
	ldr	r0, .L14
	bl	sem_post
	ldr	r0, .L14+4
	bl	sem_post
	ldr	r0, [fp, #-8]
	bl	think
.L9:
	ldr	r3, .L14+8
	ldr	r3, [r3]
	cmp	r3, #0
	bne	.L10
	b	.L11
.L13:
	ldr	r3, [fp, #-8]
	lsl	r3, r3, #4
	ldr	r2, .L14
	add	r3, r3, r2
	mov	r0, r3
	bl	sem_wait
	ldr	r0, .L14+4
	bl	sem_wait
	ldr	r0, [fp, #-8]
	bl	eat
	ldr	r3, [fp, #-8]
	lsl	r3, r3, #4
	ldr	r2, .L14
	add	r3, r3, r2
	mov	r0, r3
	bl	sem_post
	ldr	r0, .L14+4
	bl	sem_post
	ldr	r0, [fp, #-8]
	bl	think
.L12:
	ldr	r3, .L14+8
	ldr	r3, [r3]
	cmp	r3, #0
	bne	.L13
.L11:
	nop
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L15:
	.align	2
.L14:
	.word	garfos
	.word	garfos+64
	.word	running
	.size	filosofo, .-filosofo
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #16
	mov	r3, #0
	str	r3, [fp, #-20]
	b	.L17
.L18:
	ldr	r3, [fp, #-20]
	lsl	r3, r3, #4
	ldr	r2, .L26
	add	r3, r3, r2
	mov	r2, #1
	mov	r1, #0
	mov	r0, r3
	bl	sem_init
	ldr	r2, .L26+4
	ldr	r3, [fp, #-20]
	mov	r1, #0
	str	r1, [r2, r3, lsl #2]
	ldr	r2, .L26+8
	ldr	r3, [fp, #-20]
	mov	r1, #0
	str	r1, [r2, r3, lsl #2]
	ldr	r3, [fp, #-20]
	add	r3, r3, #1
	str	r3, [fp, #-20]
.L17:
	ldr	r3, [fp, #-20]
	cmp	r3, #4
	ble	.L18
	mov	r3, #0
	str	r3, [fp, #-16]
	b	.L19
.L20:
	ldr	r3, [fp, #-16]
	lsl	r3, r3, #2
	ldr	r2, .L26+12
	add	r0, r3, r2
	ldr	r3, [fp, #-16]
	ldr	r2, .L26+16
	mov	r1, #0
	bl	pthread_create
	ldr	r3, [fp, #-16]
	add	r3, r3, #1
	str	r3, [fp, #-16]
.L19:
	ldr	r3, [fp, #-16]
	cmp	r3, #4
	ble	.L20
	mov	r0, #30
	bl	sleep
	ldr	r3, .L26+20
	mov	r2, #0
	str	r2, [r3]
	mov	r3, #0
	str	r3, [fp, #-12]
	b	.L21
.L22:
	ldr	r2, .L26+12
	ldr	r3, [fp, #-12]
	ldr	r3, [r2, r3, lsl #2]
	mov	r1, #0
	mov	r0, r3
	bl	pthread_join
	ldr	r3, [fp, #-12]
	add	r3, r3, #1
	str	r3, [fp, #-12]
.L21:
	ldr	r3, [fp, #-12]
	cmp	r3, #4
	ble	.L22
	mov	r3, #0
	str	r3, [fp, #-8]
	b	.L23
.L24:
	ldr	r3, [fp, #-8]
	lsl	r3, r3, #4
	ldr	r2, .L26
	add	r3, r3, r2
	mov	r0, r3
	bl	sem_destroy
	ldr	r3, [fp, #-8]
	add	r3, r3, #1
	str	r3, [fp, #-8]
.L23:
	ldr	r3, [fp, #-8]
	cmp	r3, #4
	ble	.L24
	mov	r3, #0
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L27:
	.align	2
.L26:
	.word	garfos
	.word	eat_count
	.word	think_count
	.word	phi
	.word	filosofo
	.word	running
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
