#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*/ fprintf(int /*<<< orphan*/, char *, ...);
int /*<<< orphan*/ fscanf(int /*<<< orphan*/, char *, int *, int *);
int /*<<< orphan*/ stdin;
int /*<<< orphan*/ stdout;
int suma(int, int);
int main() {
  int x, y;
  fprintf(stdout, "Escribe dos numeros: ");
  fscanf(stdin, "%d%d", &x, &y);
  fprintf(stdout, "La suma de los numeros es: %d\n", suma(x, y));
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    0x2e92(%rip),%rax
mov    (%rax),%edi
lea    0xeb1(%rip),%rsi
mov    $0x0,%al
call   1050 <fprintf@plt>
mov    0x2e8b(%rip),%rax
mov    (%rax),%edi
lea    0xeb0(%rip),%rsi
lea    -0x8(%rbp),%rdx
lea    -0xc(%rbp),%rcx
call   1040 <fscanf@plt>
mov    0x2e5e(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x10(%rbp)
mov    -0x8(%rbp),%edi
mov    -0xc(%rbp),%esi
call   1030 <suma@plt>
mov    -0x10(%rbp),%edi
mov    %eax,%edx
lea    0xe85(%rip),%rsi
mov    $0x0,%al
call   1050 <fprintf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x10,%rsp
mov    0x2e9c(%rip),%rbx
mov    (%rbx),%edi
lea    0xebb(%rip),%rsi
xor    %eax,%eax
call   1050 <fprintf@plt>
mov    0x2e95(%rip),%rax
mov    (%rax),%edi
lea    0xeba(%rip),%rsi
lea    0xc(%rsp),%rdx
lea    0x8(%rsp),%rcx
call   1040 <fscanf@plt>
mov    (%rbx),%ebx
mov    0xc(%rsp),%edi
mov    0x8(%rsp),%esi
call   1030 <suma@plt>
lea    0xe9a(%rip),%rsi
mov    %ebx,%edi
mov    %eax,%edx
xor    %eax,%eax
call   1050 <fprintf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@stdout = global i32 0
@.str = [22 x i8] c"Escribe dos numeros: \00"
@stdin = global i32 0
@.str.1 = [5 x i8] c"%d%d\00"
@.str.2 = [31 x i8] c"La suma de los numeros es: %d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
store i32 0, i32* %1
%4 = load i32, i32* @stdout
%5 = call i32 (i32, i8*, ...) @fprintf(i32 %4, i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0))
%6 = load i32, i32* @stdin
%7 = call i32 @fscanf(i32 %6, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i32* %2, i32* %3)
%8 = load i32, i32* @stdout
%9 = load i32, i32* %2
%10 = load i32, i32* %3
%11 = call i32 @suma(i32 %9, i32 %10)
%12 = call i32 (i32, i8*, ...) @fprintf(i32 %8, i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.2, i64 0, i64 0), i32 %11)
ret i32 0
}

LLVM IR (-O2):
@stdout = global i32 0
@.str = [22 x i8] c"Escribe dos numeros: \00"
@stdin = global i32 0
@.str.1 = [5 x i8] c"%d%d\00"
@.str.2 = [31 x i8] c"La suma de los numeros es: %d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = bitcast i32* %1 to i8*
%4 = bitcast i32* %2 to i8*
%5 = load i32, i32* @stdout
%6 = tail call i32 (i32, i8*, ...) @fprintf(i32 %5, i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0))
%7 = load i32, i32* @stdin
%8 = call i32 @fscanf(i32 %7, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i32* %1, i32* %2)
%9 = load i32, i32* @stdout
%10 = load i32, i32* %1
%11 = load i32, i32* %2
%12 = call i32 @suma(i32 %10, i32 %11)
%13 = call i32 (i32, i8*, ...) @fprintf(i32 %9, i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.2, i64 0, i64 0), i32 %12)
ret i32 0
}