#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 */
double dwalltime();
int /*<<< orphan*/ printf(char *, ...);
main(int argc, char *argv[]) {
  double x = 39916801, y = 719;
  double timetick, timeend;
  double resultado;
  long long int i;
  printf("Suma...\n");
  timetick = dwalltime();
  for (i = 0; i < 1000000000; i++) {
    resultado = x + y;
  }
  timeend = dwalltime();
  printf(" Tiempo total en segundos %.10lf \n", (timeend - timetick));
  printf(" Tiempo promedio en segundos %.10lf \n",
         (timeend - timetick) / 1000000000);
  printf("Resta...\n");
  timetick = dwalltime();
  for (i = 0; i < 1000000000; i++) {
    resultado = x - y;
  }
  timeend = dwalltime();
  printf(" Tiempo total en segundos %.10lf \n", (timeend - timetick));
  printf(" Tiempo promedio en segundos %.10lf \n",
         (timeend - timetick) / 1000000000);
  printf("Producto...\n");
  timetick = dwalltime();
  for (i = 0; i < 1000000000; i++) {
    resultado = x * y;
  }
  timeend = dwalltime();
  printf(" Tiempo total en segundos %.10lf \n", (timeend - timetick));
  printf(" Tiempo promedio en segundos %.10lf \n",
         (timeend - timetick) / 1000000000);
  printf("Division...\n");
  timetick = dwalltime();
  for (i = 0; i < 1000000000; i++) {
    resultado = x / y;
  }
  timeend = dwalltime();
  printf(" Tiempo total en segundos %.10lf \n", (timeend - timetick));
  printf(" Tiempo promedio en segundos %.10lf \n",
         (timeend - timetick) / 1000000000);
  return (0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movsd  0xeca(%rip),%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  0xeb5(%rip),%xmm0
movsd  %xmm0,-0x20(%rbp)
lea    0xec1(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    $0x0,%al
call   1040 <dwalltime@plt>
movsd  %xmm0,-0x28(%rbp)
movq   $0x0,-0x40(%rbp)
cmpq   $0x3b9aca00,-0x40(%rbp)
3b
jge    11a0 <main+0x80>
movsd  -0x18(%rbp),%xmm0
addsd  -0x20(%rbp),%xmm0
movsd  %xmm0,-0x38(%rbp)
mov    -0x40(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x40(%rbp)
jmp    1172 <main+0x52>
mov    $0x0,%al
call   1040 <dwalltime@plt>
movsd  %xmm0,-0x30(%rbp)
movsd  -0x30(%rbp),%xmm0
subsd  -0x28(%rbp),%xmm0
lea    0xe64(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
movsd  -0x30(%rbp),%xmm0
subsd  -0x28(%rbp),%xmm0
movsd  0xe3a(%rip),%xmm1
divsd  %xmm1,%xmm0
lea    0xe63(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
lea    0xe7b(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    $0x0,%al
call   1040 <dwalltime@plt>
movsd  %xmm0,-0x28(%rbp)
movq   $0x0,-0x40(%rbp)
cmpq   $0x3b9aca00,-0x40(%rbp)
3b
jge    1238 <main+0x118>
movsd  -0x18(%rbp),%xmm0
subsd  -0x20(%rbp),%xmm0
movsd  %xmm0,-0x38(%rbp)
mov    -0x40(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x40(%rbp)
jmp    120a <main+0xea>
mov    $0x0,%al
call   1040 <dwalltime@plt>
movsd  %xmm0,-0x30(%rbp)
movsd  -0x30(%rbp),%xmm0
subsd  -0x28(%rbp),%xmm0
lea    0xdcc(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
movsd  -0x30(%rbp),%xmm0
subsd  -0x28(%rbp),%xmm0
movsd  0xda2(%rip),%xmm1
divsd  %xmm1,%xmm0
lea    0xdcb(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
lea    0xded(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    $0x0,%al
call   1040 <dwalltime@plt>
movsd  %xmm0,-0x28(%rbp)
movq   $0x0,-0x40(%rbp)
cmpq   $0x3b9aca00,-0x40(%rbp)
3b
jge    12d0 <main+0x1b0>
movsd  -0x18(%rbp),%xmm0
mulsd  -0x20(%rbp),%xmm0
movsd  %xmm0,-0x38(%rbp)
mov    -0x40(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x40(%rbp)
jmp    12a2 <main+0x182>
mov    $0x0,%al
call   1040 <dwalltime@plt>
movsd  %xmm0,-0x30(%rbp)
movsd  -0x30(%rbp),%xmm0
subsd  -0x28(%rbp),%xmm0
lea    0xd34(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
movsd  -0x30(%rbp),%xmm0
subsd  -0x28(%rbp),%xmm0
movsd  0xd0a(%rip),%xmm1
divsd  %xmm1,%xmm0
lea    0xd33(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
lea    0xd62(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    $0x0,%al
call   1040 <dwalltime@plt>
movsd  %xmm0,-0x28(%rbp)
movq   $0x0,-0x40(%rbp)
cmpq   $0x3b9aca00,-0x40(%rbp)
3b
jge    1368 <main+0x248>
movsd  -0x18(%rbp),%xmm0
divsd  -0x20(%rbp),%xmm0
movsd  %xmm0,-0x38(%rbp)
mov    -0x40(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x40(%rbp)
jmp    133a <main+0x21a>
mov    $0x0,%al
call   1040 <dwalltime@plt>
movsd  %xmm0,-0x30(%rbp)
movsd  -0x30(%rbp),%xmm0
subsd  -0x28(%rbp),%xmm0
lea    0xc9c(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
movsd  -0x30(%rbp),%xmm0
subsd  -0x28(%rbp),%xmm0
movsd  0xc72(%rip),%xmm1
divsd  %xmm1,%xmm0
lea    0xc9b(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
push   %rax
lea    0xf16(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
call   1050 <dwalltime@plt>
movsd  %xmm0,(%rsp)
xor    %eax,%eax
call   1050 <dwalltime@plt>
subsd  (%rsp),%xmm0
movsd  %xmm0,(%rsp)
lea    0xea4(%rip),%r14
mov    %r14,%rdi
mov    $0x1,%al
call   1040 <printf@plt>
movsd  (%rsp),%xmm0
divsd  0xe85(%rip),%xmm0
lea    0xea9(%rip),%rbx
mov    %rbx,%rdi
mov    $0x1,%al
call   1040 <printf@plt>
lea    0xec6(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
call   1050 <dwalltime@plt>
movsd  %xmm0,(%rsp)
xor    %eax,%eax
call   1050 <dwalltime@plt>
subsd  (%rsp),%xmm0
movsd  %xmm0,(%rsp)
mov    %r14,%rdi
mov    $0x1,%al
call   1040 <printf@plt>
movsd  (%rsp),%xmm0
divsd  0xe34(%rip),%xmm0
mov    %rbx,%rdi
mov    $0x1,%al
call   1040 <printf@plt>
lea    0xe85(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
call   1050 <dwalltime@plt>
movsd  %xmm0,(%rsp)
xor    %eax,%eax
call   1050 <dwalltime@plt>
subsd  (%rsp),%xmm0
movsd  %xmm0,(%rsp)
mov    %r14,%rdi
mov    $0x1,%al
call   1040 <printf@plt>
movsd  (%rsp),%xmm0
divsd  0xdea(%rip),%xmm0
mov    %rbx,%rdi
mov    $0x1,%al
call   1040 <printf@plt>
lea    0xe47(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
call   1050 <dwalltime@plt>
movsd  %xmm0,(%rsp)
xor    %eax,%eax
call   1050 <dwalltime@plt>
subsd  (%rsp),%xmm0
movsd  %xmm0,(%rsp)
mov    %r14,%rdi
mov    $0x1,%al
call   1040 <printf@plt>
movsd  (%rsp),%xmm0
divsd  0xda0(%rip),%xmm0
mov    %rbx,%rdi
mov    $0x1,%al
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [9 x i8] c"Suma...\0A\00"
@.str.1 = [35 x i8] c" Tiempo total en segundos %.10lf \0A\00"
@.str.2 = [38 x i8] c" Tiempo promedio en segundos %.10lf \0A\00"
@.str.3 = [10 x i8] c"Resta...\0A\00"
@.str.4 = [13 x i8] c"Producto...\0A\00"
@.str.5 = [13 x i8] c"Division...\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca double
%7 = alloca double
%8 = alloca double
%9 = alloca double
%10 = alloca double
%11 = alloca i64
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store double 0x418308A808000000, double* %6
store double 7.190000e+02, double* %7
%12 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0))
%13 = call double (...) @dwalltime()
store double %13, double* %8
store i64 0, i64* %11
br label %14
14: ; preds = %21, %2
%15 = load i64, i64* %11
%16 = icmp slt i64 %15, 1000000000
br i1 %16, label %17, label %24
17: ; preds = %14
%18 = load double, double* %6
%19 = load double, double* %7
%20 = fadd double %18, %19
store double %20, double* %10
br label %21
21: ; preds = %17
%22 = load i64, i64* %11
%23 = add nsw i64 %22, 1
store i64 %23, i64* %11
br label %14
24: ; preds = %14
%25 = call double (...) @dwalltime()
store double %25, double* %9
%26 = load double, double* %9
%27 = load double, double* %8
%28 = fsub double %26, %27
%29 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.1, i64 0, i64 0), double %28)
%30 = load double, double* %9
%31 = load double, double* %8
%32 = fsub double %30, %31
%33 = fdiv double %32, 1.000000e+09
%34 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.2, i64 0, i64 0), double %33)
%35 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.3, i64 0, i64 0))
%36 = call double (...) @dwalltime()
store double %36, double* %8
store i64 0, i64* %11
br label %37
37: ; preds = %44, %24
%38 = load i64, i64* %11
%39 = icmp slt i64 %38, 1000000000
br i1 %39, label %40, label %47
40: ; preds = %37
%41 = load double, double* %6
%42 = load double, double* %7
%43 = fsub double %41, %42
store double %43, double* %10
br label %44
44: ; preds = %40
%45 = load i64, i64* %11
%46 = add nsw i64 %45, 1
store i64 %46, i64* %11
br label %37
47: ; preds = %37
%48 = call double (...) @dwalltime()
store double %48, double* %9
%49 = load double, double* %9
%50 = load double, double* %8
%51 = fsub double %49, %50
%52 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.1, i64 0, i64 0), double %51)
%53 = load double, double* %9
%54 = load double, double* %8
%55 = fsub double %53, %54
%56 = fdiv double %55, 1.000000e+09
%57 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.2, i64 0, i64 0), double %56)
%58 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.4, i64 0, i64 0))
%59 = call double (...) @dwalltime()
store double %59, double* %8
store i64 0, i64* %11
br label %60
60: ; preds = %67, %47
%61 = load i64, i64* %11
%62 = icmp slt i64 %61, 1000000000
br i1 %62, label %63, label %70
63: ; preds = %60
%64 = load double, double* %6
%65 = load double, double* %7
%66 = fmul double %64, %65
store double %66, double* %10
br label %67
67: ; preds = %63
%68 = load i64, i64* %11
%69 = add nsw i64 %68, 1
store i64 %69, i64* %11
br label %60
70: ; preds = %60
%71 = call double (...) @dwalltime()
store double %71, double* %9
%72 = load double, double* %9
%73 = load double, double* %8
%74 = fsub double %72, %73
%75 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.1, i64 0, i64 0), double %74)
%76 = load double, double* %9
%77 = load double, double* %8
%78 = fsub double %76, %77
%79 = fdiv double %78, 1.000000e+09
%80 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.2, i64 0, i64 0), double %79)
%81 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.5, i64 0, i64 0))
%82 = call double (...) @dwalltime()
store double %82, double* %8
store i64 0, i64* %11
br label %83
83: ; preds = %90, %70
%84 = load i64, i64* %11
%85 = icmp slt i64 %84, 1000000000
br i1 %85, label %86, label %93
86: ; preds = %83
%87 = load double, double* %6
%88 = load double, double* %7
%89 = fdiv double %87, %88
store double %89, double* %10
br label %90
90: ; preds = %86
%91 = load i64, i64* %11
%92 = add nsw i64 %91, 1
store i64 %92, i64* %11
br label %83
93: ; preds = %83
%94 = call double (...) @dwalltime()
store double %94, double* %9
%95 = load double, double* %9
%96 = load double, double* %8
%97 = fsub double %95, %96
%98 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.1, i64 0, i64 0), double %97)
%99 = load double, double* %9
%100 = load double, double* %8
%101 = fsub double %99, %100
%102 = fdiv double %101, 1.000000e+09
%103 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.2, i64 0, i64 0), double %102)
ret i32 0
}

LLVM IR (-O2):
@.str.1 = [35 x i8] c" Tiempo total en segundos %.10lf \0A\00"
@.str.2 = [38 x i8] c" Tiempo promedio en segundos %.10lf \0A\00"
@str = [8 x i8] c"Suma...\00"
@str.6 = [9 x i8] c"Resta...\00"
@str.7 = [12 x i8] c"Producto...\00"
@str.8 = [12 x i8] c"Division...\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @str, i64 0, i64 0))
%4 = tail call double (...) @dwalltime()
%5 = tail call double (...) @dwalltime()
%6 = fsub double %5, %4
%7 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([35 x i8], [35 x i8]* @.str.1, i64 0, i64 0), double %6)
%8 = fdiv double %6, 1.000000e+09
%9 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([38 x i8], [38 x i8]* @.str.2, i64 0, i64 0), double %8)
%10 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @str.6, i64 0, i64 0))
%11 = tail call double (...) @dwalltime()
%12 = tail call double (...) @dwalltime()
%13 = fsub double %12, %11
%14 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([35 x i8], [35 x i8]* @.str.1, i64 0, i64 0), double %13)
%15 = fdiv double %13, 1.000000e+09
%16 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([38 x i8], [38 x i8]* @.str.2, i64 0, i64 0), double %15)
%17 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @str.7, i64 0, i64 0))
%18 = tail call double (...) @dwalltime()
%19 = tail call double (...) @dwalltime()
%20 = fsub double %19, %18
%21 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([35 x i8], [35 x i8]* @.str.1, i64 0, i64 0), double %20)
%22 = fdiv double %20, 1.000000e+09
%23 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([38 x i8], [38 x i8]* @.str.2, i64 0, i64 0), double %22)
%24 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @str.8, i64 0, i64 0))
%25 = tail call double (...) @dwalltime()
%26 = tail call double (...) @dwalltime()
%27 = fsub double %26, %25
%28 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([35 x i8], [35 x i8]* @.str.1, i64 0, i64 0), double %27)
%29 = fdiv double %27, 1.000000e+09
%30 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([38 x i8], [38 x i8]* @.str.2, i64 0, i64 0), double %29)
ret i32 0
}