#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 EXIT_SUCCESS;
int /*<<< orphan*/ maximo_de_tres(int, int, int);
int /*<<< orphan*/ printf(char *, int, int, int, int /*<<< orphan*/);
int rand();
int /*<<< orphan*/ srand(int /*<<< orphan*/);
int /*<<< orphan*/ time(int /*<<< orphan*/ *);
int main() {
  int op1, op2, op3;
  srand(time(NULL));
  for (int i = 0; i < 100; i++) {
    op1 = rand() % 50;
    op2 = rand() % 50;
    op3 = rand() % 50;
    printf("El maximo de %i, %i y %i es %li.\n", op1, op2, op3,
           maximo_de_tres(op1, op2, op3));
  }
  return EXIT_SUCCESS;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
xor    %eax,%eax
mov    %eax,%edi
call   1050 <time@plt>
mov    %eax,%edi
call   1040 <srand@plt>
movl   $0x0,-0x14(%rbp)
cmpl   $0x64,-0x14(%rbp)
jge    11fc <main+0xac>
mov    $0x0,%al
call   1070 <rand@plt>
mov    $0x32,%ecx
cltd
idiv   %ecx
mov    %edx,-0x8(%rbp)
mov    $0x0,%al
call   1070 <rand@plt>
mov    $0x32,%ecx
cltd
idiv   %ecx
mov    %edx,-0xc(%rbp)
mov    $0x0,%al
call   1070 <rand@plt>
mov    $0x32,%ecx
cltd
idiv   %ecx
mov    %edx,-0x10(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,-0x20(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,-0x1c(%rbp)
mov    -0x10(%rbp),%eax
mov    %eax,-0x18(%rbp)
mov    -0x8(%rbp),%edi
mov    -0xc(%rbp),%esi
mov    -0x10(%rbp),%edx
call   1060 <maximo_de_tres@plt>
mov    -0x20(%rbp),%esi
mov    -0x1c(%rbp),%edx
mov    -0x18(%rbp),%ecx
mov    %eax,%r8d
lea    0xe17(%rip),%rdi
call   1030 <printf@plt>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1176 <main+0x26>
mov    0x2ddd(%rip),%rax
mov    (%rax),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r12
push   %rbx
xor    %edi,%edi
call   1050 <time@plt>
mov    %eax,%edi
call   1040 <srand@plt>
mov    $0x64,%ebp
lea    0xe8e(%rip),%r14
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
xor    %eax,%eax
call   1070 <rand@plt>
movslq %eax,%r15
imul   $0x51eb851f,%r15,%rax
mov    %rax,%rcx
shr    $0x3f,%rcx
sar    $0x24,%rax
add    %ecx,%eax
imul   $0x32,%eax,%eax
sub    %eax,%r15d
xor    %eax,%eax
call   1070 <rand@plt>
movslq %eax,%r12
imul   $0x51eb851f,%r12,%rax
mov    %rax,%rcx
shr    $0x3f,%rcx
sar    $0x24,%rax
add    %ecx,%eax
imul   $0x32,%eax,%eax
sub    %eax,%r12d
xor    %eax,%eax
call   1070 <rand@plt>
movslq %eax,%rbx
imul   $0x51eb851f,%rbx,%rax
mov    %rax,%rcx
shr    $0x3f,%rcx
sar    $0x24,%rax
add    %ecx,%eax
imul   $0x32,%eax,%eax
sub    %eax,%ebx
mov    %r15d,%edi
mov    %r12d,%esi
mov    %ebx,%edx
call   1060 <maximo_de_tres@plt>
mov    %r14,%rdi
mov    %r15d,%esi
mov    %r12d,%edx
mov    %ebx,%ecx
mov    %eax,%r8d
call   1030 <printf@plt>
add    $0xffffffff,%ebp
jne    1180 <main+0x30>
mov    0x2dc5(%rip),%rax
mov    (%rax),%eax
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [34 x i8] c"El maximo de %i, %i y %i es %li.\0A\00"
@EXIT_SUCCESS = global i32 0
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i32 0, i32* %1
%6 = call i32 @time(i32* null)
%7 = call i32 @srand(i32 %6)
store i32 0, i32* %5
br label %8
8: ; preds = %26, %0
%9 = load i32, i32* %5
%10 = icmp slt i32 %9, 100
br i1 %10, label %11, label %29
11: ; preds = %8
%12 = call i32 (...) @rand()
%13 = srem i32 %12, 50
store i32 %13, i32* %2
%14 = call i32 (...) @rand()
%15 = srem i32 %14, 50
store i32 %15, i32* %3
%16 = call i32 (...) @rand()
%17 = srem i32 %16, 50
store i32 %17, i32* %4
%18 = load i32, i32* %2
%19 = load i32, i32* %3
%20 = load i32, i32* %4
%21 = load i32, i32* %2
%22 = load i32, i32* %3
%23 = load i32, i32* %4
%24 = call i32 @maximo_de_tres(i32 %21, i32 %22, i32 %23)
%25 = call i32 @printf(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str, i64 0, i64 0), i32 %18, i32 %19, i32 %20, i32 %24)
br label %26
26: ; preds = %11
%27 = load i32, i32* %5
%28 = add nsw i32 %27, 1
store i32 %28, i32* %5
br label %8
29: ; preds = %8
%30 = load i32, i32* @EXIT_SUCCESS
ret i32 %30
}

LLVM IR (-O2):
@.str = [34 x i8] c"El maximo de %i, %i y %i es %li.\0A\00"
@EXIT_SUCCESS = global i32 0
define i32 @main() {
%1 = tail call i32 @time(i32* null)
%2 = tail call i32 @srand(i32 %1)
br label %5
3: ; preds = %5
%4 = load i32, i32* @EXIT_SUCCESS
ret i32 %4
5: ; preds = %0, %5
%6 = phi i32 [ 0, %0 ], [ %15, %5 ]
%7 = tail call i32 (...) @rand()
%8 = srem i32 %7, 50
%9 = tail call i32 (...) @rand()
%10 = srem i32 %9, 50
%11 = tail call i32 (...) @rand()
%12 = srem i32 %11, 50
%13 = tail call i32 @maximo_de_tres(i32 %8, i32 %10, i32 %12)
%14 = tail call i32 @printf(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str, i64 0, i64 0), i32 %8, i32 %10, i32 %12, i32 %13)
%15 = add nuw nsw i32 %6, 1
%16 = icmp eq i32 %15, 100
br i1 %16, label %3, label %5
}