#define NULL ((void *)0)
typedef unsigned long size_t; // Customize by platform.
typedef long intptr_t;
typedef unsigned long uintptr_t;
typedef long scalar_t__; // Either arithmetic or pointer type.
/* By default, we understand bool (as a convenience). */
typedef int bool;
#define false 0
#define true 1

/* Forward declarations */

/* Type definitions */

/* Variables and functions */
int /*<<< orphan*/ CogerTenedores(int);
int /*<<< orphan*/ Comer(int);
int /*<<< orphan*/ Pensar(int);
int /*<<< orphan*/ SoltarTenedores(int);
int /*<<< orphan*/ pthread_exit(int /*<<< orphan*/ *);
void *Filosofo(void *p) {
  int i;
  int *I;
  I = (int *)p;
  for (i = 0; i < 5; i++) {
    Pensar(*I);
    CogerTenedores(*I);
    Comer(*I);
    SoltarTenedores(*I);
  }
  pthread_exit(NULL);
}


x86 assembly (clang, -O0):
<Filosofo>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x20(%rbp)
movl   $0x0,-0x14(%rbp)
cmpl   $0x5,-0x14(%rbp)
jge    11af <Filosofo+0x5f>
mov    -0x20(%rbp),%rax
mov    (%rax),%edi
call   1070 <Pensar@plt>
mov    -0x20(%rbp),%rax
mov    (%rax),%edi
call   1040 <CogerTenedores@plt>
mov    -0x20(%rbp),%rax
mov    (%rax),%edi
call   1030 <Comer@plt>
mov    -0x20(%rbp),%rax
mov    (%rax),%edi
call   1050 <SoltarTenedores@plt>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    116b <Filosofo+0x1b>
xor    %eax,%eax
mov    %eax,%edi
call   1060 <pthread_exit@plt>
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Filosofo>:
push   %rbx
mov    %rdi,%rbx
mov    (%rdi),%edi
call   1070 <Pensar@plt>
mov    (%rbx),%edi
call   1040 <CogerTenedores@plt>
mov    (%rbx),%edi
call   1030 <Comer@plt>
mov    (%rbx),%edi
call   1050 <SoltarTenedores@plt>
mov    (%rbx),%edi
call   1070 <Pensar@plt>
mov    (%rbx),%edi
call   1040 <CogerTenedores@plt>
mov    (%rbx),%edi
call   1030 <Comer@plt>
mov    (%rbx),%edi
call   1050 <SoltarTenedores@plt>
mov    (%rbx),%edi
call   1070 <Pensar@plt>
mov    (%rbx),%edi
call   1040 <CogerTenedores@plt>
mov    (%rbx),%edi
call   1030 <Comer@plt>
mov    (%rbx),%edi
call   1050 <SoltarTenedores@plt>
mov    (%rbx),%edi
call   1070 <Pensar@plt>
mov    (%rbx),%edi
call   1040 <CogerTenedores@plt>
mov    (%rbx),%edi
call   1030 <Comer@plt>
mov    (%rbx),%edi
call   1050 <SoltarTenedores@plt>
mov    (%rbx),%edi
call   1070 <Pensar@plt>
mov    (%rbx),%edi
call   1040 <CogerTenedores@plt>
mov    (%rbx),%edi
call   1030 <Comer@plt>
mov    (%rbx),%edi
call   1050 <SoltarTenedores@plt>
xor    %edi,%edi
pop    %rbx
jmp    1060 <pthread_exit@plt>

LLVM IR (-O0):
define i8* @Filosofo(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
%4 = alloca i32
%5 = alloca i32*
store i8* %0, i8** %3
%6 = load i8*, i8** %3
%7 = bitcast i8* %6 to i32*
store i32* %7, i32** %5
store i32 0, i32* %4
br label %8
8: ; preds = %24, %1
%9 = load i32, i32* %4
%10 = icmp slt i32 %9, 5
br i1 %10, label %11, label %27
11: ; preds = %8
%12 = load i32*, i32** %5
%13 = load i32, i32* %12
%14 = call i32 @Pensar(i32 %13)
%15 = load i32*, i32** %5
%16 = load i32, i32* %15
%17 = call i32 @CogerTenedores(i32 %16)
%18 = load i32*, i32** %5
%19 = load i32, i32* %18
%20 = call i32 @Comer(i32 %19)
%21 = load i32*, i32** %5
%22 = load i32, i32* %21
%23 = call i32 @SoltarTenedores(i32 %22)
br label %24
24: ; preds = %11
%25 = load i32, i32* %4
%26 = add nsw i32 %25, 1
store i32 %26, i32* %4
br label %8
27: ; preds = %8
%28 = call i32 @pthread_exit(i32* null)
%29 = load i8*, i8** %2
ret i8* %29
}

LLVM IR (-O2):
define noalias i8* @Filosofo(i8* nocapture %0) {
%2 = bitcast i8* %0 to i32*
%3 = load i32, i32* %2
%4 = tail call i32 @Pensar(i32 %3)
%5 = load i32, i32* %2
%6 = tail call i32 @CogerTenedores(i32 %5)
%7 = load i32, i32* %2
%8 = tail call i32 @Comer(i32 %7)
%9 = load i32, i32* %2
%10 = tail call i32 @SoltarTenedores(i32 %9)
%11 = load i32, i32* %2
%12 = tail call i32 @Pensar(i32 %11)
%13 = load i32, i32* %2
%14 = tail call i32 @CogerTenedores(i32 %13)
%15 = load i32, i32* %2
%16 = tail call i32 @Comer(i32 %15)
%17 = load i32, i32* %2
%18 = tail call i32 @SoltarTenedores(i32 %17)
%19 = load i32, i32* %2
%20 = tail call i32 @Pensar(i32 %19)
%21 = load i32, i32* %2
%22 = tail call i32 @CogerTenedores(i32 %21)
%23 = load i32, i32* %2
%24 = tail call i32 @Comer(i32 %23)
%25 = load i32, i32* %2
%26 = tail call i32 @SoltarTenedores(i32 %25)
%27 = load i32, i32* %2
%28 = tail call i32 @Pensar(i32 %27)
%29 = load i32, i32* %2
%30 = tail call i32 @CogerTenedores(i32 %29)
%31 = load i32, i32* %2
%32 = tail call i32 @Comer(i32 %31)
%33 = load i32, i32* %2
%34 = tail call i32 @SoltarTenedores(i32 %33)
%35 = load i32, i32* %2
%36 = tail call i32 @Pensar(i32 %35)
%37 = load i32, i32* %2
%38 = tail call i32 @CogerTenedores(i32 %37)
%39 = load i32, i32* %2
%40 = tail call i32 @Comer(i32 %39)
%41 = load i32, i32* %2
%42 = tail call i32 @SoltarTenedores(i32 %41)
%43 = tail call i32 @pthread_exit(i32* null)
ret i8* undef
}