#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*/ asignar(int);
int /*<<< orphan*/ imprimir(char *, int);
int max(int, int);
int /*<<< orphan*/ puts(char *);
int main() {
  int a = max(4, 5);
  imprimir("a", a);
  int b = max(a, 7);
  imprimir("b", b);
  puts("-----------------------");
  asignar(a);
  imprimir("a", a);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x4,%edi
mov    $0x5,%esi
call   1040 <max@plt>
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%esi
lea    0xe95(%rip),%rdi
call   1050 <imprimir@plt>
mov    -0x8(%rbp),%edi
mov    $0x7,%esi
call   1040 <max@plt>
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%esi
lea    0xe78(%rip),%rdi
call   1050 <imprimir@plt>
lea    0xe6e(%rip),%rdi
call   1030 <puts@plt>
mov    -0x8(%rbp),%edi
call   1060 <asignar@plt>
mov    -0x8(%rbp),%esi
lea    0xe53(%rip),%rdi
call   1050 <imprimir@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
push   %rax
mov    $0x4,%edi
mov    $0x5,%esi
call   1040 <max@plt>
mov    %eax,%ebx
lea    0xea4(%rip),%r14
mov    %r14,%rdi
mov    %eax,%esi
call   1050 <imprimir@plt>
mov    %ebx,%edi
mov    $0x7,%esi
call   1040 <max@plt>
lea    0xe89(%rip),%rdi
mov    %eax,%esi
call   1050 <imprimir@plt>
lea    0xe7d(%rip),%rdi
call   1030 <puts@plt>
mov    %ebx,%edi
call   1060 <asignar@plt>
mov    %r14,%rdi
mov    %ebx,%esi
call   1050 <imprimir@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [2 x i8] c"a\00"
@.str.1 = [2 x i8] c"b\00"
@.str.2 = [24 x i8] c"-----------------------\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
store i32 0, i32* %1
%4 = call i32 @max(i32 4, i32 5)
store i32 %4, i32* %2
%5 = load i32, i32* %2
%6 = call i32 @imprimir(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0), i32 %5)
%7 = load i32, i32* %2
%8 = call i32 @max(i32 %7, i32 7)
store i32 %8, i32* %3
%9 = load i32, i32* %3
%10 = call i32 @imprimir(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0), i32 %9)
%11 = call i32 @puts(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.2, i64 0, i64 0))
%12 = load i32, i32* %2
%13 = call i32 @asignar(i32 %12)
%14 = load i32, i32* %2
%15 = call i32 @imprimir(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0), i32 %14)
ret i32 0
}

LLVM IR (-O2):
@.str = [2 x i8] c"a\00"
@.str.1 = [2 x i8] c"b\00"
@.str.2 = [24 x i8] c"-----------------------\00"
define i32 @main() {
%1 = tail call i32 @max(i32 4, i32 5)
%2 = tail call i32 @imprimir(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0), i32 %1)
%3 = tail call i32 @max(i32 %1, i32 7)
%4 = tail call i32 @imprimir(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0), i32 %3)
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([24 x i8], [24 x i8]* @.str.2, i64 0, i64 0))
%6 = tail call i32 @asignar(i32 %1)
%7 = tail call i32 @imprimir(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0), i32 %1)
ret i32 0
}