#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 calcAdd();
int calcDiv();
int calcDoubleAdd();
int calcDoubleDiv();
int calcDoubleMul();
int calcDoubleSub();
int calcFloatAdd();
int calcFloatDiv();
int calcFloatMul();
int calcFloatSub();
int calcFuncCall();
int calcMul();
int calcShift();
int calcSub();
int /*<<< orphan*/ printf(char *, int);
int main() {
  char szStr[256];
  int ctime;
  ctime = 0;
  ctime = ctime + calcFuncCall();
  ctime = ctime + calcAdd();
  ctime = ctime + calcSub();
  ctime = ctime + calcMul();
  ctime = ctime + calcDiv();
  ctime = ctime + calcShift();
  ctime = ctime + calcFloatAdd();
  ctime = ctime + calcFloatSub();
  ctime = ctime + calcFloatMul();
  ctime = ctime + calcFloatDiv();
  ctime = ctime + calcDoubleAdd();
  ctime = ctime + calcDoubleSub();
  ctime = ctime + calcDoubleMul();
  ctime = ctime + calcDoubleDiv();
  printf("Spec Time=,%d", ctime);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x150,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x114(%rbp)
mov    -0x114(%rbp),%eax
mov    %eax,-0x14c(%rbp)
mov    $0x0,%al
call   10c0 <calcFuncCall@plt>
mov    %eax,%ecx
mov    -0x14c(%rbp),%eax
add    %ecx,%eax
mov    %eax,-0x114(%rbp)
mov    -0x114(%rbp),%eax
mov    %eax,-0x148(%rbp)
mov    $0x0,%al
call   1110 <calcAdd@plt>
mov    %eax,%ecx
mov    -0x148(%rbp),%eax
add    %ecx,%eax
mov    %eax,-0x114(%rbp)
mov    -0x114(%rbp),%eax
mov    %eax,-0x144(%rbp)
mov    $0x0,%al
call   1070 <calcSub@plt>
mov    %eax,%ecx
mov    -0x144(%rbp),%eax
add    %ecx,%eax
mov    %eax,-0x114(%rbp)
mov    -0x114(%rbp),%eax
mov    %eax,-0x140(%rbp)
mov    $0x0,%al
call   1030 <calcMul@plt>
mov    %eax,%ecx
mov    -0x140(%rbp),%eax
add    %ecx,%eax
mov    %eax,-0x114(%rbp)
mov    -0x114(%rbp),%eax
mov    %eax,-0x13c(%rbp)
mov    $0x0,%al
call   1040 <calcDiv@plt>
mov    %eax,%ecx
mov    -0x13c(%rbp),%eax
add    %ecx,%eax
mov    %eax,-0x114(%rbp)
mov    -0x114(%rbp),%eax
mov    %eax,-0x138(%rbp)
mov    $0x0,%al
call   10a0 <calcShift@plt>
mov    %eax,%ecx
mov    -0x138(%rbp),%eax
add    %ecx,%eax
mov    %eax,-0x114(%rbp)
mov    -0x114(%rbp),%eax
mov    %eax,-0x134(%rbp)
mov    $0x0,%al
call   1060 <calcFloatAdd@plt>
mov    %eax,%ecx
mov    -0x134(%rbp),%eax
add    %ecx,%eax
mov    %eax,-0x114(%rbp)
mov    -0x114(%rbp),%eax
mov    %eax,-0x130(%rbp)
mov    $0x0,%al
call   10d0 <calcFloatSub@plt>
mov    %eax,%ecx
mov    -0x130(%rbp),%eax
add    %ecx,%eax
mov    %eax,-0x114(%rbp)
mov    -0x114(%rbp),%eax
mov    %eax,-0x12c(%rbp)
mov    $0x0,%al
call   10f0 <calcFloatMul@plt>
mov    %eax,%ecx
mov    -0x12c(%rbp),%eax
add    %ecx,%eax
mov    %eax,-0x114(%rbp)
mov    -0x114(%rbp),%eax
mov    %eax,-0x128(%rbp)
mov    $0x0,%al
call   1090 <calcFloatDiv@plt>
mov    %eax,%ecx
mov    -0x128(%rbp),%eax
add    %ecx,%eax
mov    %eax,-0x114(%rbp)
mov    -0x114(%rbp),%eax
mov    %eax,-0x124(%rbp)
mov    $0x0,%al
call   10e0 <calcDoubleAdd@plt>
mov    %eax,%ecx
mov    -0x124(%rbp),%eax
add    %ecx,%eax
mov    %eax,-0x114(%rbp)
mov    -0x114(%rbp),%eax
mov    %eax,-0x120(%rbp)
mov    $0x0,%al
call   10b0 <calcDoubleSub@plt>
mov    %eax,%ecx
mov    -0x120(%rbp),%eax
add    %ecx,%eax
mov    %eax,-0x114(%rbp)
mov    -0x114(%rbp),%eax
mov    %eax,-0x11c(%rbp)
mov    $0x0,%al
call   1100 <calcDoubleMul@plt>
mov    %eax,%ecx
mov    -0x11c(%rbp),%eax
add    %ecx,%eax
mov    %eax,-0x114(%rbp)
mov    -0x114(%rbp),%eax
mov    %eax,-0x118(%rbp)
mov    $0x0,%al
call   1080 <calcDoubleDiv@plt>
mov    %eax,%ecx
mov    -0x118(%rbp),%eax
add    %ecx,%eax
mov    %eax,-0x114(%rbp)
mov    -0x114(%rbp),%esi
lea    0xbfd(%rip),%rdi
call   1050 <printf@plt>
xor    %eax,%eax
add    $0x150,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
xor    %eax,%eax
call   10c0 <calcFuncCall@plt>
mov    %eax,%ebx
xor    %eax,%eax
call   1110 <calcAdd@plt>
add    %eax,%ebx
xor    %eax,%eax
call   1070 <calcSub@plt>
add    %eax,%ebx
xor    %eax,%eax
call   1030 <calcMul@plt>
add    %eax,%ebx
xor    %eax,%eax
call   1040 <calcDiv@plt>
add    %eax,%ebx
xor    %eax,%eax
call   10a0 <calcShift@plt>
add    %eax,%ebx
xor    %eax,%eax
call   1060 <calcFloatAdd@plt>
add    %eax,%ebx
xor    %eax,%eax
call   10d0 <calcFloatSub@plt>
add    %eax,%ebx
xor    %eax,%eax
call   10f0 <calcFloatMul@plt>
add    %eax,%ebx
xor    %eax,%eax
call   1090 <calcFloatDiv@plt>
add    %eax,%ebx
xor    %eax,%eax
call   10e0 <calcDoubleAdd@plt>
add    %eax,%ebx
xor    %eax,%eax
call   10b0 <calcDoubleSub@plt>
add    %eax,%ebx
xor    %eax,%eax
call   1100 <calcDoubleMul@plt>
add    %eax,%ebx
xor    %eax,%eax
call   1080 <calcDoubleDiv@plt>
add    %eax,%ebx
lea    0xd8a(%rip),%rdi
mov    %ebx,%esi
call   1050 <printf@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [14 x i8] c"Spec Time=,%d\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [256 x i8]
%3 = alloca i32
store i32 0, i32* %1
store i32 0, i32* %3
%4 = load i32, i32* %3
%5 = call i32 (...) @calcFuncCall()
%6 = add nsw i32 %4, %5
store i32 %6, i32* %3
%7 = load i32, i32* %3
%8 = call i32 (...) @calcAdd()
%9 = add nsw i32 %7, %8
store i32 %9, i32* %3
%10 = load i32, i32* %3
%11 = call i32 (...) @calcSub()
%12 = add nsw i32 %10, %11
store i32 %12, i32* %3
%13 = load i32, i32* %3
%14 = call i32 (...) @calcMul()
%15 = add nsw i32 %13, %14
store i32 %15, i32* %3
%16 = load i32, i32* %3
%17 = call i32 (...) @calcDiv()
%18 = add nsw i32 %16, %17
store i32 %18, i32* %3
%19 = load i32, i32* %3
%20 = call i32 (...) @calcShift()
%21 = add nsw i32 %19, %20
store i32 %21, i32* %3
%22 = load i32, i32* %3
%23 = call i32 (...) @calcFloatAdd()
%24 = add nsw i32 %22, %23
store i32 %24, i32* %3
%25 = load i32, i32* %3
%26 = call i32 (...) @calcFloatSub()
%27 = add nsw i32 %25, %26
store i32 %27, i32* %3
%28 = load i32, i32* %3
%29 = call i32 (...) @calcFloatMul()
%30 = add nsw i32 %28, %29
store i32 %30, i32* %3
%31 = load i32, i32* %3
%32 = call i32 (...) @calcFloatDiv()
%33 = add nsw i32 %31, %32
store i32 %33, i32* %3
%34 = load i32, i32* %3
%35 = call i32 (...) @calcDoubleAdd()
%36 = add nsw i32 %34, %35
store i32 %36, i32* %3
%37 = load i32, i32* %3
%38 = call i32 (...) @calcDoubleSub()
%39 = add nsw i32 %37, %38
store i32 %39, i32* %3
%40 = load i32, i32* %3
%41 = call i32 (...) @calcDoubleMul()
%42 = add nsw i32 %40, %41
store i32 %42, i32* %3
%43 = load i32, i32* %3
%44 = call i32 (...) @calcDoubleDiv()
%45 = add nsw i32 %43, %44
store i32 %45, i32* %3
%46 = load i32, i32* %3
%47 = call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i32 %46)
ret i32 0
}

LLVM IR (-O2):
@.str = [14 x i8] c"Spec Time=,%d\00"
define i32 @main() {
%1 = tail call i32 (...) @calcFuncCall()
%2 = tail call i32 (...) @calcAdd()
%3 = add nsw i32 %2, %1
%4 = tail call i32 (...) @calcSub()
%5 = add nsw i32 %3, %4
%6 = tail call i32 (...) @calcMul()
%7 = add nsw i32 %5, %6
%8 = tail call i32 (...) @calcDiv()
%9 = add nsw i32 %7, %8
%10 = tail call i32 (...) @calcShift()
%11 = add nsw i32 %9, %10
%12 = tail call i32 (...) @calcFloatAdd()
%13 = add nsw i32 %11, %12
%14 = tail call i32 (...) @calcFloatSub()
%15 = add nsw i32 %13, %14
%16 = tail call i32 (...) @calcFloatMul()
%17 = add nsw i32 %15, %16
%18 = tail call i32 (...) @calcFloatDiv()
%19 = add nsw i32 %17, %18
%20 = tail call i32 (...) @calcDoubleAdd()
%21 = add nsw i32 %19, %20
%22 = tail call i32 (...) @calcDoubleSub()
%23 = add nsw i32 %21, %22
%24 = tail call i32 (...) @calcDoubleMul()
%25 = add nsw i32 %23, %24
%26 = tail call i32 (...) @calcDoubleDiv()
%27 = add nsw i32 %25, %26
%28 = tail call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i32 %27)
ret i32 0
}