#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);
void *Filosofo(void *id) {
  int indice, i;
  indice = *(int *)id;
  for (i = 0; i < 10; i++) {
    Pensar(indice);
    CogerTenedores(indice);
    Comer(indice);
    SoltarTenedores(indice);
  }
}


x86 assembly (clang, -O0):
<Filosofo>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%eax
mov    %eax,-0x14(%rbp)
movl   $0x0,-0x18(%rbp)
cmpl   $0xa,-0x18(%rbp)
jge    1194 <Filosofo+0x54>
mov    -0x14(%rbp),%edi
call   1060 <Pensar@plt>
mov    -0x14(%rbp),%edi
call   1040 <CogerTenedores@plt>
mov    -0x14(%rbp),%edi
call   1030 <Comer@plt>
mov    -0x14(%rbp),%edi
call   1050 <SoltarTenedores@plt>
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
jmp    115c <Filosofo+0x1c>
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Filosofo>:
push   %rbx
mov    (%rdi),%ebx
mov    %ebx,%edi
call   1060 <Pensar@plt>
mov    %ebx,%edi
call   1040 <CogerTenedores@plt>
mov    %ebx,%edi
call   1030 <Comer@plt>
mov    %ebx,%edi
call   1050 <SoltarTenedores@plt>
mov    %ebx,%edi
call   1060 <Pensar@plt>
mov    %ebx,%edi
call   1040 <CogerTenedores@plt>
mov    %ebx,%edi
call   1030 <Comer@plt>
mov    %ebx,%edi
call   1050 <SoltarTenedores@plt>
mov    %ebx,%edi
call   1060 <Pensar@plt>
mov    %ebx,%edi
call   1040 <CogerTenedores@plt>
mov    %ebx,%edi
call   1030 <Comer@plt>
mov    %ebx,%edi
call   1050 <SoltarTenedores@plt>
mov    %ebx,%edi
call   1060 <Pensar@plt>
mov    %ebx,%edi
call   1040 <CogerTenedores@plt>
mov    %ebx,%edi
call   1030 <Comer@plt>
mov    %ebx,%edi
call   1050 <SoltarTenedores@plt>
mov    %ebx,%edi
call   1060 <Pensar@plt>
mov    %ebx,%edi
call   1040 <CogerTenedores@plt>
mov    %ebx,%edi
call   1030 <Comer@plt>
mov    %ebx,%edi
call   1050 <SoltarTenedores@plt>
mov    %ebx,%edi
call   1060 <Pensar@plt>
mov    %ebx,%edi
call   1040 <CogerTenedores@plt>
mov    %ebx,%edi
call   1030 <Comer@plt>
mov    %ebx,%edi
call   1050 <SoltarTenedores@plt>
mov    %ebx,%edi
call   1060 <Pensar@plt>
mov    %ebx,%edi
call   1040 <CogerTenedores@plt>
mov    %ebx,%edi
call   1030 <Comer@plt>
mov    %ebx,%edi
call   1050 <SoltarTenedores@plt>
mov    %ebx,%edi
call   1060 <Pensar@plt>
mov    %ebx,%edi
call   1040 <CogerTenedores@plt>
mov    %ebx,%edi
call   1030 <Comer@plt>
mov    %ebx,%edi
call   1050 <SoltarTenedores@plt>
mov    %ebx,%edi
call   1060 <Pensar@plt>
mov    %ebx,%edi
call   1040 <CogerTenedores@plt>
mov    %ebx,%edi
call   1030 <Comer@plt>
mov    %ebx,%edi
call   1050 <SoltarTenedores@plt>
mov    %ebx,%edi
call   1060 <Pensar@plt>
mov    %ebx,%edi
call   1040 <CogerTenedores@plt>
mov    %ebx,%edi
call   1030 <Comer@plt>
mov    %ebx,%edi
pop    %rbx
jmp    1050 <SoltarTenedores@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*
%8 = load i32, i32* %7
store i32 %8, i32* %4
store i32 0, i32* %5
br label %9
9: ; preds = %21, %1
%10 = load i32, i32* %5
%11 = icmp slt i32 %10, 10
br i1 %11, label %12, label %24
12: ; preds = %9
%13 = load i32, i32* %4
%14 = call i32 @Pensar(i32 %13)
%15 = load i32, i32* %4
%16 = call i32 @CogerTenedores(i32 %15)
%17 = load i32, i32* %4
%18 = call i32 @Comer(i32 %17)
%19 = load i32, i32* %4
%20 = call i32 @SoltarTenedores(i32 %19)
br label %21
21: ; preds = %12
%22 = load i32, i32* %5
%23 = add nsw i32 %22, 1
store i32 %23, i32* %5
br label %9
24: ; preds = %9
%25 = load i8*, i8** %2
ret i8* %25
}

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 = tail call i32 @CogerTenedores(i32 %3)
%6 = tail call i32 @Comer(i32 %3)
%7 = tail call i32 @SoltarTenedores(i32 %3)
%8 = tail call i32 @Pensar(i32 %3)
%9 = tail call i32 @CogerTenedores(i32 %3)
%10 = tail call i32 @Comer(i32 %3)
%11 = tail call i32 @SoltarTenedores(i32 %3)
%12 = tail call i32 @Pensar(i32 %3)
%13 = tail call i32 @CogerTenedores(i32 %3)
%14 = tail call i32 @Comer(i32 %3)
%15 = tail call i32 @SoltarTenedores(i32 %3)
%16 = tail call i32 @Pensar(i32 %3)
%17 = tail call i32 @CogerTenedores(i32 %3)
%18 = tail call i32 @Comer(i32 %3)
%19 = tail call i32 @SoltarTenedores(i32 %3)
%20 = tail call i32 @Pensar(i32 %3)
%21 = tail call i32 @CogerTenedores(i32 %3)
%22 = tail call i32 @Comer(i32 %3)
%23 = tail call i32 @SoltarTenedores(i32 %3)
%24 = tail call i32 @Pensar(i32 %3)
%25 = tail call i32 @CogerTenedores(i32 %3)
%26 = tail call i32 @Comer(i32 %3)
%27 = tail call i32 @SoltarTenedores(i32 %3)
%28 = tail call i32 @Pensar(i32 %3)
%29 = tail call i32 @CogerTenedores(i32 %3)
%30 = tail call i32 @Comer(i32 %3)
%31 = tail call i32 @SoltarTenedores(i32 %3)
%32 = tail call i32 @Pensar(i32 %3)
%33 = tail call i32 @CogerTenedores(i32 %3)
%34 = tail call i32 @Comer(i32 %3)
%35 = tail call i32 @SoltarTenedores(i32 %3)
%36 = tail call i32 @Pensar(i32 %3)
%37 = tail call i32 @CogerTenedores(i32 %3)
%38 = tail call i32 @Comer(i32 %3)
%39 = tail call i32 @SoltarTenedores(i32 %3)
%40 = tail call i32 @Pensar(i32 %3)
%41 = tail call i32 @CogerTenedores(i32 %3)
%42 = tail call i32 @Comer(i32 %3)
%43 = tail call i32 @SoltarTenedores(i32 %3)
ret i8* undef
}