#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*/ imprimir();
double multiplicacion(double, double);
int /*<<< orphan*/ printf(char *, double);
double suma(double, double);
int main(void) {
  double a = 2.5, b = 3, resultado;
  imprimir();
  resultado = suma(a, b);
  printf("%g\n", resultado);
  resultado = multiplicacion(a, b);
  printf("%f\n", resultado);
  imprimir();
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
movsd  0xeb1(%rip),%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  0xe9c(%rip),%xmm0
movsd  %xmm0,-0x18(%rbp)
mov    $0x0,%al
call   1050 <imprimir@plt>
movsd  -0x10(%rbp),%xmm0
movsd  -0x18(%rbp),%xmm1
call   1040 <suma@plt>
movsd  %xmm0,-0x20(%rbp)
movsd  -0x20(%rbp),%xmm0
lea    0xe80(%rip),%rdi
call   1030 <printf@plt>
movsd  -0x10(%rbp),%xmm0
movsd  -0x18(%rbp),%xmm1
call   1060 <multiplicacion@plt>
movsd  %xmm0,-0x20(%rbp)
movsd  -0x20(%rbp),%xmm0
lea    0xe5f(%rip),%rdi
call   1030 <printf@plt>
mov    $0x0,%al
call   1050 <imprimir@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1050 <imprimir@plt>
movsd  0xeb0(%rip),%xmm0
movsd  0xeb0(%rip),%xmm1
call   1040 <suma@plt>
lea    0xeac(%rip),%rdi
call   1030 <printf@plt>
movsd  0xe8f(%rip),%xmm0
movsd  0xe8f(%rip),%xmm1
call   1060 <multiplicacion@plt>
lea    0xe8f(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
call   1050 <imprimir@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [4 x i8] c"%g\0A\00"
@.str.1 = [4 x i8] c"%f\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca double
%3 = alloca double
%4 = alloca double
store i32 0, i32* %1
store double 2.500000e+00, double* %2
store double 3.000000e+00, double* %3
%5 = call i32 (...) @imprimir()
%6 = load double, double* %2
%7 = load double, double* %3
%8 = call double @suma(double %6, double %7)
store double %8, double* %4
%9 = load double, double* %4
%10 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), double %9)
%11 = load double, double* %2
%12 = load double, double* %3
%13 = call double @multiplicacion(double %11, double %12)
store double %13, double* %4
%14 = load double, double* %4
%15 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), double %14)
%16 = call i32 (...) @imprimir()
ret i32 0
}

LLVM IR (-O2):
@.str = [4 x i8] c"%g\0A\00"
@.str.1 = [4 x i8] c"%f\0A\00"
define i32 @main() {
%1 = tail call i32 (...) @imprimir()
%2 = tail call double @suma(double 2.500000e+00, double 3.000000e+00)
%3 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), double %2)
%4 = tail call double @multiplicacion(double 2.500000e+00, double 3.000000e+00)
%5 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), double %4)
%6 = tail call i32 (...) @imprimir()
ret i32 0
}