#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 divicion();
int /*<<< orphan*/ multiplicacion();
int /*<<< orphan*/ printf(char *, ...);
int resta(int, int);
int /*<<< orphan*/ scanf(char *, int *, int *);
int /*<<< orphan*/ suma(int, int);
void main() {
  int a, b;
  printf(" Dos numeros para sumar\n");
  scanf("%d %d", &a, &b);
  suma(a, b);
  printf(" Dos numeros para restar\n");
  scanf("%d %d", &a, &b);
  printf("resta : %d\n", resta(a, b));
  multiplicacion();
  printf("divicion : %d\n", divicion());
  return;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xe91(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xe9c(%rip),%rdi
lea    -0x4(%rbp),%rsi
lea    -0x8(%rbp),%rdx
call   1070 <scanf@plt>
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
call   1040 <suma@plt>
lea    0xe83(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xe6f(%rip),%rdi
lea    -0x4(%rbp),%rsi
lea    -0x8(%rbp),%rdx
call   1070 <scanf@plt>
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
call   1080 <resta@plt>
mov    %eax,%esi
lea    0xe6e(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    $0x0,%al
call   1060 <multiplicacion@plt>
mov    $0x0,%al
call   1050 <divicion@plt>
mov    %eax,%esi
lea    0xe5c(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %rbx
sub    $0x10,%rsp
lea    0xea1(%rip),%rdi
call   1030 <puts@plt>
lea    0xe74(%rip),%rbx
lea    0xc(%rsp),%r14
lea    0x8(%rsp),%r15
mov    %rbx,%rdi
mov    %r14,%rsi
mov    %r15,%rdx
call   1080 <scanf@plt>
mov    0xc(%rsp),%edi
mov    0x8(%rsp),%esi
call   1050 <suma@plt>
lea    0xe81(%rip),%rdi
call   1030 <puts@plt>
mov    %rbx,%rdi
mov    %r14,%rsi
mov    %r15,%rdx
call   1080 <scanf@plt>
mov    0xc(%rsp),%edi
mov    0x8(%rsp),%esi
call   1090 <resta@plt>
lea    0xe27(%rip),%rdi
mov    %eax,%esi
xor    %eax,%eax
call   1040 <printf@plt>
xor    %eax,%eax
call   1070 <multiplicacion@plt>
xor    %eax,%eax
call   1060 <divicion@plt>
lea    0xe15(%rip),%rdi
mov    %eax,%esi
xor    %eax,%eax
call   1040 <printf@plt>
add    $0x10,%rsp
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@.str = [25 x i8] c" Dos numeros para sumar\0A\00"
@.str.1 = [6 x i8] c"%d %d\00"
@.str.2 = [26 x i8] c" Dos numeros para restar\0A\00"
@.str.3 = [12 x i8] c"resta : %d\0A\00"
@.str.4 = [15 x i8] c"divicion : %d\0A\00"
define void @main() {
%1 = alloca i32
%2 = alloca i32
%3 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0))
%4 = call i32 @scanf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i32* %1, i32* %2)
%5 = load i32, i32* %1
%6 = load i32, i32* %2
%7 = call i32 @suma(i32 %5, i32 %6)
%8 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.2, i64 0, i64 0))
%9 = call i32 @scanf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i32* %1, i32* %2)
%10 = load i32, i32* %1
%11 = load i32, i32* %2
%12 = call i32 @resta(i32 %10, i32 %11)
%13 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.3, i64 0, i64 0), i32 %12)
%14 = call i32 (...) @multiplicacion()
%15 = call i32 (...) @divicion()
%16 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.4, i64 0, i64 0), i32 %15)
ret void
}

LLVM IR (-O2):
@.str.1 = [6 x i8] c"%d %d\00"
@.str.3 = [12 x i8] c"resta : %d\0A\00"
@.str.4 = [15 x i8] c"divicion : %d\0A\00"
@str = [24 x i8] c" Dos numeros para sumar\00"
@str.5 = [25 x i8] c" Dos numeros para restar\00"
define void @main() {
%1 = alloca i32
%2 = alloca i32
%3 = bitcast i32* %1 to i8*
%4 = bitcast i32* %2 to i8*
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([24 x i8], [24 x i8]* @str, i64 0, i64 0))
%6 = call i32 @scanf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i32* %1, i32* %2)
%7 = load i32, i32* %1
%8 = load i32, i32* %2
%9 = call i32 @suma(i32 %7, i32 %8)
%10 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([25 x i8], [25 x i8]* @str.5, i64 0, i64 0))
%11 = call i32 @scanf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i32* %1, i32* %2)
%12 = load i32, i32* %1
%13 = load i32, i32* %2
%14 = call i32 @resta(i32 %12, i32 %13)
%15 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @.str.3, i64 0, i64 0), i32 %14)
%16 = call i32 (...) @multiplicacion()
%17 = call i32 (...) @divicion()
%18 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @.str.4, i64 0, i64 0), i32 %17)
ret void
}