#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 CLOCKS_PER_SEC;
double INFINITY;
int check_time_functions(int);
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ footer();
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, ...);
int get_experimental_use_factor(double, double);
double get_global_improvement(double, double);
double get_local_improvement(double, double);
int get_time_factor_of_use(double, double);
int /*<<< orphan*/ header();
int /*<<< orphan*/ printf(char *, int);
int /*<<< orphan*/ stdout;
int /*<<< orphan*/ usage();
int main(int argc, char *argv[]) {
  if (argc >= 2) {
    usage();
    exit(0);
  }
  header();
  fprintf(stdout, "\n\n------------------------------ TIMES "
                  "------------------------------\n\n");
  double original_function_time =
      check_time_functions(0) / CLOCKS_PER_SEC * 1000;
  printf("Original function time: %0.2f ms\n", original_function_time);
  double improved_function_time =
      check_time_functions(1) / CLOCKS_PER_SEC * 1000;
  printf("Improved function time: %0.2f ms\n", improved_function_time);
  double original_process_time =
      check_time_functions(2) / CLOCKS_PER_SEC * 1000;
  printf("Original process  time: %0.2f ms\n", original_process_time);
  double improved_process_time =
      check_time_functions(3) / CLOCKS_PER_SEC * 1000;
  printf("Improved process  time: %0.2f ms\n\n", improved_process_time);
  fprintf(stdout, "\n\n--------------------------------------------------------"
                  "------------\n\n");
  fprintf(stdout, "\n\n----------------------------- RESULTS "
                  "------------------------------\n\n");
  if (original_function_time == 0) {
    fprintf(stdout, "What do you want to improve? p.p");
    exit(0);
  }
  double global_improvement =
      get_global_improvement(original_process_time, improved_process_time);
  if (global_improvement == INFINITY)
    fprintf(stdout, "1) You have obtained an infinite improvement in global "
                    "process, congratz :D\n");
  else
    printf("1) The new process is %0.2f times faster than the old \n",
           global_improvement);
  double local_improvement =
      get_local_improvement(original_function_time, improved_function_time);
  if (local_improvement == INFINITY)
    fprintf(stdout, "2) You have obtained an infinite improvement in local "
                    "function, congratz :D\n");
  else
    printf("2) The new function is %0.2f times faster than the old \n",
           local_improvement);
  if (global_improvement == INFINITY || local_improvement == INFINITY ||
      global_improvement == local_improvement)
    fprintf(stdout, "3) Factor time can not be calculated due to an infinite "
                    "improvement or SL=SG :( \n");
  else
    printf("3) Use factor of local function is: %0.2f percent \n",
           get_time_factor_of_use(global_improvement, local_improvement) * 100);
  fprintf(stdout, "4) Experimental use factor is: %0.2f percent \n",
          get_experimental_use_factor(original_process_time,
                                      improved_process_time) *
              100);
  footer();
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpl   $0x2,-0x8(%rbp)
jl     11de <main+0x2e>
mov    $0x0,%al
call   10a0 <usage@plt>
xor    %edi,%edi
call   10d0 <exit@plt>
mov    $0x0,%al
call   1030 <header@plt>
mov    0x2de4(%rip),%rax
mov    (%rax),%edi
lea    0xe0b(%rip),%rsi
mov    $0x0,%al
call   1090 <fprintf@plt>
xor    %edi,%edi
call   10b0 <check_time_functions@plt>
mov    0x2dd6(%rip),%rcx
cltd
idivl  (%rcx)
imul   $0x3e8,%eax,%eax
cvtsi2sd %eax,%xmm0
movsd  %xmm0,-0x18(%rbp)
cvttsd2si -0x18(%rbp),%esi
lea    0xe20(%rip),%rdi
call   1060 <printf@plt>
mov    $0x1,%edi
call   10b0 <check_time_functions@plt>
mov    0x2da2(%rip),%rcx
cltd
idivl  (%rcx)
imul   $0x3e8,%eax,%eax
cvtsi2sd %eax,%xmm0
movsd  %xmm0,-0x20(%rbp)
cvttsd2si -0x20(%rbp),%esi
lea    0xe0e(%rip),%rdi
call   1060 <printf@plt>
mov    $0x2,%edi
call   10b0 <check_time_functions@plt>
mov    0x2d6e(%rip),%rcx
cltd
idivl  (%rcx)
imul   $0x3e8,%eax,%eax
cvtsi2sd %eax,%xmm0
movsd  %xmm0,-0x28(%rbp)
cvttsd2si -0x28(%rbp),%esi
lea    0xdfc(%rip),%rdi
call   1060 <printf@plt>
mov    $0x3,%edi
call   10b0 <check_time_functions@plt>
mov    0x2d3a(%rip),%rcx
cltd
idivl  (%rcx)
imul   $0x3e8,%eax,%eax
cvtsi2sd %eax,%xmm0
movsd  %xmm0,-0x30(%rbp)
cvttsd2si -0x30(%rbp),%esi
lea    0xdea(%rip),%rdi
call   1060 <printf@plt>
mov    0x2d00(%rip),%rax
mov    (%rax),%edi
lea    0xdf8(%rip),%rsi
mov    $0x0,%al
call   1090 <fprintf@plt>
mov    0x2ce9(%rip),%rax
mov    (%rax),%edi
lea    0xe2a(%rip),%rsi
mov    $0x0,%al
call   1090 <fprintf@plt>
movsd  -0x18(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jne    132d <main+0x17d>
jp     132d <main+0x17d>
mov    0x2cba(%rip),%rax
mov    (%rax),%edi
lea    0xe44(%rip),%rsi
mov    $0x0,%al
call   1090 <fprintf@plt>
xor    %edi,%edi
call   10d0 <exit@plt>
movsd  -0x28(%rbp),%xmm0
movsd  -0x30(%rbp),%xmm1
call   1080 <get_global_improvement@plt>
movsd  %xmm0,-0x38(%rbp)
movsd  -0x38(%rbp),%xmm0
mov    0x2c9b(%rip),%rax
ucomisd (%rax),%xmm0
jne    1379 <main+0x1c9>
jp     1379 <main+0x1c9>
mov    0x2c6c(%rip),%rax
mov    (%rax),%edi
lea    0xe17(%rip),%rsi
mov    $0x0,%al
call   1090 <fprintf@plt>
jmp    138a <main+0x1da>
cvttsd2si -0x38(%rbp),%esi
lea    0xe4c(%rip),%rdi
call   1060 <printf@plt>
movsd  -0x18(%rbp),%xmm0
movsd  -0x20(%rbp),%xmm1
call   1040 <get_local_improvement@plt>
movsd  %xmm0,-0x40(%rbp)
movsd  -0x40(%rbp),%xmm0
mov    0x2c3e(%rip),%rax
ucomisd (%rax),%xmm0
jne    13d6 <main+0x226>
jp     13d6 <main+0x226>
mov    0x2c0f(%rip),%rax
mov    (%rax),%edi
lea    0xe3f(%rip),%rsi
mov    $0x0,%al
call   1090 <fprintf@plt>
jmp    13e7 <main+0x237>
cvttsd2si -0x40(%rbp),%esi
lea    0xe74(%rip),%rdi
call   1060 <printf@plt>
movsd  -0x38(%rbp),%xmm0
mov    0x2bf5(%rip),%rax
ucomisd (%rax),%xmm0
jne    1408 <main+0x258>
jp     1408 <main+0x258>
jmp    143f <main+0x28f>
movsd  -0x40(%rbp),%xmm0
mov    0x2bd4(%rip),%rax
ucomisd (%rax),%xmm0
jne    1429 <main+0x279>
jp     1429 <main+0x279>
jmp    143f <main+0x28f>
movsd  -0x38(%rbp),%xmm0
ucomisd -0x40(%rbp),%xmm0
jne    145b <main+0x2ab>
jp     145b <main+0x2ab>
mov    0x2b8a(%rip),%rax
mov    (%rax),%edi
lea    0xe40(%rip),%rsi
mov    $0x0,%al
call   1090 <fprintf@plt>
jmp    1479 <main+0x2c9>
movsd  -0x38(%rbp),%xmm0
movsd  -0x40(%rbp),%xmm1
call   1070 <get_time_factor_of_use@plt>
imul   $0x64,%eax,%esi
lea    0xe6d(%rip),%rdi
call   1060 <printf@plt>
mov    0x2b50(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x44(%rbp)
movsd  -0x28(%rbp),%xmm0
movsd  -0x30(%rbp),%xmm1
call   1050 <get_experimental_use_factor@plt>
mov    -0x44(%rbp),%edi
imul   $0x64,%eax,%edx
lea    0xe74(%rip),%rsi
mov    $0x0,%al
call   1090 <fprintf@plt>
mov    $0x0,%al
call   10c0 <footer@plt>
xor    %eax,%eax
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x28,%rsp
xor    %eax,%eax
cmp    $0x2,%edi
jge    13e0 <main+0x230>
call   1030 <header@plt>
mov    0x2dfb(%rip),%r13
mov    0x0(%r13),%edi
lea    0xe20(%rip),%rsi
xor    %eax,%eax
call   1090 <fprintf@plt>
xor    %edi,%edi
call   10b0 <check_time_functions@plt>
mov    0x2deb(%rip),%rbx
cltd
idivl  (%rbx)
mov    %eax,%r15d
imul   $0x3e8,%eax,%r14d
lea    0xe3f(%rip),%rdi
mov    %r14d,%esi
call   1060 <printf@plt>
mov    $0x1,%edi
call   10b0 <check_time_functions@plt>
cltd
idivl  (%rbx)
imul   $0x3e8,%eax,%r12d
lea    0xe3e(%rip),%rdi
mov    %r12d,%esi
call   1060 <printf@plt>
mov    $0x2,%edi
call   10b0 <check_time_functions@plt>
cltd
idivl  (%rbx)
imul   $0x3e8,%eax,%ebp
lea    0xe3e(%rip),%rdi
mov    %ebp,%esi
call   1060 <printf@plt>
mov    $0x3,%edi
call   10b0 <check_time_functions@plt>
cltd
idivl  (%rbx)
imul   $0x3e8,%eax,%ebx
lea    0xe3f(%rip),%rdi
mov    %ebx,%esi
call   1060 <printf@plt>
mov    0x0(%r13),%edi
lea    0xe50(%rip),%rsi
xor    %eax,%eax
call   1090 <fprintf@plt>
mov    0x0(%r13),%edi
lea    0xe87(%rip),%rsi
xor    %eax,%eax
call   1090 <fprintf@plt>
test   %r15d,%r15d
je     13ec <main+0x23c>
cvtsi2sd %r14d,%xmm0
movsd  %xmm0,(%rsp)
xorps  %xmm0,%xmm0
cvtsi2sd %r12d,%xmm0
movsd  %xmm0,0x8(%rsp)
xorps  %xmm0,%xmm0
cvtsi2sd %ebp,%xmm0
cvtsi2sd %ebx,%xmm1
movsd  %xmm0,0x20(%rsp)
movsd  %xmm1,0x18(%rsp)
call   1080 <get_global_improvement@plt>
mov    0x2d0a(%rip),%rbx
ucomisd (%rbx),%xmm0
movsd  %xmm0,0x10(%rsp)
jne    1300 <main+0x150>
jp     1300 <main+0x150>
mov    0x0(%r13),%edi
lea    0xe8d(%rip),%rsi
xor    %eax,%eax
call   1090 <fprintf@plt>
jmp    1310 <main+0x160>
cvttsd2si %xmm0,%esi
lea    0xec6(%rip),%rdi
call   1060 <printf@plt>
movsd  (%rsp),%xmm0
movsd  0x8(%rsp),%xmm1
call   1040 <get_local_improvement@plt>
ucomisd (%rbx),%xmm0
movsd  %xmm0,(%rsp)
jne    1341 <main+0x191>
jp     1341 <main+0x191>
mov    0x0(%r13),%edi
lea    0xed1(%rip),%rsi
xor    %eax,%eax
call   1090 <fprintf@plt>
jmp    1351 <main+0x1a1>
cvttsd2si %xmm0,%esi
lea    0xf0a(%rip),%rdi
call   1060 <printf@plt>
movsd  (%rbx),%xmm2
movsd  0x10(%rsp),%xmm0
ucomisd %xmm2,%xmm0
movsd  (%rsp),%xmm1
jne    1368 <main+0x1b8>
jnp    138e <main+0x1de>
ucomisd %xmm2,%xmm1
jne    1370 <main+0x1c0>
jnp    138e <main+0x1de>
ucomisd %xmm1,%xmm0
jne    1378 <main+0x1c8>
jnp    138e <main+0x1de>
call   1070 <get_time_factor_of_use@plt>
imul   $0x64,%eax,%esi
lea    0xf5a(%rip),%rdi
call   1060 <printf@plt>
jmp    13a0 <main+0x1f0>
mov    0x0(%r13),%edi
lea    0xef6(%rip),%rsi
xor    %eax,%eax
call   1090 <fprintf@plt>
mov    0x0(%r13),%ebx
movsd  0x20(%rsp),%xmm0
movsd  0x18(%rsp),%xmm1
call   1050 <get_experimental_use_factor@plt>
imul   $0x64,%eax,%edx
lea    0xf56(%rip),%rsi
mov    %ebx,%edi
xor    %eax,%eax
call   1090 <fprintf@plt>
xor    %eax,%eax
call   10c0 <footer@plt>
xor    %eax,%eax
add    $0x28,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
call   10a0 <usage@plt>
xor    %edi,%edi
call   10d0 <exit@plt>
mov    0x0(%r13),%edi
lea    0xd6c(%rip),%rsi
xor    %eax,%eax
call   1090 <fprintf@plt>
xor    %edi,%edi
call   10d0 <exit@plt>

LLVM IR (-O0):
@stdout = global i32 0
@.str = [72 x i8] c"\0A\0A------------------------------ TIMES ------------------------------\0A\0A\00"
@CLOCKS_PER_SEC = global i32 0
@.str.1 = [34 x i8] c"Original function time: %0.2f ms\0A\00"
@.str.2 = [34 x i8] c"Improved function time: %0.2f ms\0A\00"
@.str.3 = [34 x i8] c"Original process time: %0.2f ms\0A\00"
@.str.4 = [35 x i8] c"Improved process time: %0.2f ms\0A\0A\00"
@.str.5 = [73 x i8] c"\0A\0A--------------------------------------------------------------------\0A\0A\00"
@.str.6 = [73 x i8] c"\0A\0A----------------------------- RESULTS ------------------------------\0A\0A\00"
@.str.7 = [33 x i8] c"What do you want to improve? p.p\00"
@INFINITY = global double 0.000000e+00
@.str.8 = [77 x i8] c"1) You have obtained an infinite improvement in global process, congratz :D\0A\00"
@.str.9 = [56 x i8] c"1) The new process is %0.2f times faster than the old \0A\00"
@.str.10 = [77 x i8] c"2) You have obtained an infinite improvement in local function, congratz :D\0A\00"
@.str.11 = [57 x i8] c"2) The new function is %0.2f times faster than the old \0A\00"
@.str.12 = [82 x i8] c"3) Factor time can not be calculated due to an infinite improvement or SL=SG :( \0A\00"
@.str.13 = [52 x i8] c"3) Use factor of local function is: %0.2f percent \0A\00"
@.str.14 = [47 x i8] c"4) Experimental use factor is: %0.2f percent \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 double
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%12 = load i32, i32* %4
%13 = icmp sge i32 %12, 2
br i1 %13, label %14, label %17
14: ; preds = %2
%15 = call i32 (...) @usage()
%16 = call i32 @exit(i32 0)
unreachable
17: ; preds = %2
%18 = call i32 (...) @header()
%19 = load i32, i32* @stdout
%20 = call i32 (i32, i8*, ...) @fprintf(i32 %19, i8* getelementptr inbounds ([72 x i8], [72 x i8]* @.str, i64 0, i64 0))
%21 = call i32 @check_time_functions(i32 0)
%22 = load i32, i32* @CLOCKS_PER_SEC
%23 = sdiv i32 %21, %22
%24 = mul nsw i32 %23, 1000
%25 = sitofp i32 %24 to double
store double %25, double* %6
%26 = load double, double* %6
%27 = fptosi double %26 to i32
%28 = call i32 @printf(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.1, i64 0, i64 0), i32 %27)
%29 = call i32 @check_time_functions(i32 1)
%30 = load i32, i32* @CLOCKS_PER_SEC
%31 = sdiv i32 %29, %30
%32 = mul nsw i32 %31, 1000
%33 = sitofp i32 %32 to double
store double %33, double* %7
%34 = load double, double* %7
%35 = fptosi double %34 to i32
%36 = call i32 @printf(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.2, i64 0, i64 0), i32 %35)
%37 = call i32 @check_time_functions(i32 2)
%38 = load i32, i32* @CLOCKS_PER_SEC
%39 = sdiv i32 %37, %38
%40 = mul nsw i32 %39, 1000
%41 = sitofp i32 %40 to double
store double %41, double* %8
%42 = load double, double* %8
%43 = fptosi double %42 to i32
%44 = call i32 @printf(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.3, i64 0, i64 0), i32 %43)
%45 = call i32 @check_time_functions(i32 3)
%46 = load i32, i32* @CLOCKS_PER_SEC
%47 = sdiv i32 %45, %46
%48 = mul nsw i32 %47, 1000
%49 = sitofp i32 %48 to double
store double %49, double* %9
%50 = load double, double* %9
%51 = fptosi double %50 to i32
%52 = call i32 @printf(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.4, i64 0, i64 0), i32 %51)
%53 = load i32, i32* @stdout
%54 = call i32 (i32, i8*, ...) @fprintf(i32 %53, i8* getelementptr inbounds ([73 x i8], [73 x i8]* @.str.5, i64 0, i64 0))
%55 = load i32, i32* @stdout
%56 = call i32 (i32, i8*, ...) @fprintf(i32 %55, i8* getelementptr inbounds ([73 x i8], [73 x i8]* @.str.6, i64 0, i64 0))
%57 = load double, double* %6
%58 = fcmp oeq double %57, 0.000000e+00
br i1 %58, label %59, label %63
59: ; preds = %17
%60 = load i32, i32* @stdout
%61 = call i32 (i32, i8*, ...) @fprintf(i32 %60, i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.7, i64 0, i64 0))
%62 = call i32 @exit(i32 0)
unreachable
63: ; preds = %17
%64 = load double, double* %8
%65 = load double, double* %9
%66 = call double @get_global_improvement(double %64, double %65)
store double %66, double* %10
%67 = load double, double* %10
%68 = load double, double* @INFINITY
%69 = fcmp oeq double %67, %68
br i1 %69, label %70, label %73
70: ; preds = %63
%71 = load i32, i32* @stdout
%72 = call i32 (i32, i8*, ...) @fprintf(i32 %71, i8* getelementptr inbounds ([77 x i8], [77 x i8]* @.str.8, i64 0, i64 0))
br label %77
73: ; preds = %63
%74 = load double, double* %10
%75 = fptosi double %74 to i32
%76 = call i32 @printf(i8* getelementptr inbounds ([56 x i8], [56 x i8]* @.str.9, i64 0, i64 0), i32 %75)
br label %77
77: ; preds = %73, %70
%78 = load double, double* %6
%79 = load double, double* %7
%80 = call double @get_local_improvement(double %78, double %79)
store double %80, double* %11
%81 = load double, double* %11
%82 = load double, double* @INFINITY
%83 = fcmp oeq double %81, %82
br i1 %83, label %84, label %87
84: ; preds = %77
%85 = load i32, i32* @stdout
%86 = call i32 (i32, i8*, ...) @fprintf(i32 %85, i8* getelementptr inbounds ([77 x i8], [77 x i8]* @.str.10, i64 0, i64 0))
br label %91
87: ; preds = %77
%88 = load double, double* %11
%89 = fptosi double %88 to i32
%90 = call i32 @printf(i8* getelementptr inbounds ([57 x i8], [57 x i8]* @.str.11, i64 0, i64 0), i32 %89)
br label %91
91: ; preds = %87, %84
%92 = load double, double* %10
%93 = load double, double* @INFINITY
%94 = fcmp oeq double %92, %93
br i1 %94, label %103, label %95
95: ; preds = %91
%96 = load double, double* %11
%97 = load double, double* @INFINITY
%98 = fcmp oeq double %96, %97
br i1 %98, label %103, label %99
99: ; preds = %95
%100 = load double, double* %10
%101 = load double, double* %11
%102 = fcmp oeq double %100, %101
br i1 %102, label %103, label %106
103: ; preds = %99, %95, %91
%104 = load i32, i32* @stdout
%105 = call i32 (i32, i8*, ...) @fprintf(i32 %104, i8* getelementptr inbounds ([82 x i8], [82 x i8]* @.str.12, i64 0, i64 0))
br label %112
106: ; preds = %99
%107 = load double, double* %10
%108 = load double, double* %11
%109 = call i32 @get_time_factor_of_use(double %107, double %108)
%110 = mul nsw i32 %109, 100
%111 = call i32 @printf(i8* getelementptr inbounds ([52 x i8], [52 x i8]* @.str.13, i64 0, i64 0), i32 %110)
br label %112
112: ; preds = %106, %103
%113 = load i32, i32* @stdout
%114 = load double, double* %8
%115 = load double, double* %9
%116 = call i32 @get_experimental_use_factor(double %114, double %115)
%117 = mul nsw i32 %116, 100
%118 = call i32 (i32, i8*, ...) @fprintf(i32 %113, i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str.14, i64 0, i64 0), i32 %117)
%119 = call i32 (...) @footer()
ret i32 0
}

LLVM IR (-O2):
@stdout = global i32 0
@.str = [72 x i8] c"\0A\0A------------------------------ TIMES ------------------------------\0A\0A\00"
@CLOCKS_PER_SEC = global i32 0
@.str.1 = [34 x i8] c"Original function time: %0.2f ms\0A\00"
@.str.2 = [34 x i8] c"Improved function time: %0.2f ms\0A\00"
@.str.3 = [34 x i8] c"Original process time: %0.2f ms\0A\00"
@.str.4 = [35 x i8] c"Improved process time: %0.2f ms\0A\0A\00"
@.str.5 = [73 x i8] c"\0A\0A--------------------------------------------------------------------\0A\0A\00"
@.str.6 = [73 x i8] c"\0A\0A----------------------------- RESULTS ------------------------------\0A\0A\00"
@.str.7 = [33 x i8] c"What do you want to improve? p.p\00"
@INFINITY = global double 0.000000e+00
@.str.8 = [77 x i8] c"1) You have obtained an infinite improvement in global process, congratz :D\0A\00"
@.str.9 = [56 x i8] c"1) The new process is %0.2f times faster than the old \0A\00"
@.str.10 = [77 x i8] c"2) You have obtained an infinite improvement in local function, congratz :D\0A\00"
@.str.11 = [57 x i8] c"2) The new function is %0.2f times faster than the old \0A\00"
@.str.12 = [82 x i8] c"3) Factor time can not be calculated due to an infinite improvement or SL=SG :( \0A\00"
@.str.13 = [52 x i8] c"3) Use factor of local function is: %0.2f percent \0A\00"
@.str.14 = [47 x i8] c"4) Experimental use factor is: %0.2f percent \0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = icmp sgt i32 %0, 1
br i1 %3, label %4, label %7
4: ; preds = %2
%5 = tail call i32 (...) @usage()
%6 = tail call i32 @exit(i32 0)
unreachable
7: ; preds = %2
%8 = tail call i32 (...) @header()
%9 = load i32, i32* @stdout
%10 = tail call i32 (i32, i8*, ...) @fprintf(i32 %9, i8* getelementptr inbounds ([72 x i8], [72 x i8]* @.str, i64 0, i64 0))
%11 = tail call i32 @check_time_functions(i32 0)
%12 = load i32, i32* @CLOCKS_PER_SEC
%13 = sdiv i32 %11, %12
%14 = mul nsw i32 %13, 1000
%15 = sitofp i32 %14 to double
%16 = tail call i32 @printf(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.1, i64 0, i64 0), i32 %14)
%17 = tail call i32 @check_time_functions(i32 1)
%18 = load i32, i32* @CLOCKS_PER_SEC
%19 = sdiv i32 %17, %18
%20 = mul nsw i32 %19, 1000
%21 = sitofp i32 %20 to double
%22 = tail call i32 @printf(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.2, i64 0, i64 0), i32 %20)
%23 = tail call i32 @check_time_functions(i32 2)
%24 = load i32, i32* @CLOCKS_PER_SEC
%25 = sdiv i32 %23, %24
%26 = mul nsw i32 %25, 1000
%27 = sitofp i32 %26 to double
%28 = tail call i32 @printf(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.3, i64 0, i64 0), i32 %26)
%29 = tail call i32 @check_time_functions(i32 3)
%30 = load i32, i32* @CLOCKS_PER_SEC
%31 = sdiv i32 %29, %30
%32 = mul nsw i32 %31, 1000
%33 = sitofp i32 %32 to double
%34 = tail call i32 @printf(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.4, i64 0, i64 0), i32 %32)
%35 = load i32, i32* @stdout
%36 = tail call i32 (i32, i8*, ...) @fprintf(i32 %35, i8* getelementptr inbounds ([73 x i8], [73 x i8]* @.str.5, i64 0, i64 0))
%37 = load i32, i32* @stdout
%38 = tail call i32 (i32, i8*, ...) @fprintf(i32 %37, i8* getelementptr inbounds ([73 x i8], [73 x i8]* @.str.6, i64 0, i64 0))
%39 = icmp eq i32 %13, 0
br i1 %39, label %40, label %44
40: ; preds = %7
%41 = load i32, i32* @stdout
%42 = tail call i32 (i32, i8*, ...) @fprintf(i32 %41, i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.7, i64 0, i64 0))
%43 = tail call i32 @exit(i32 0)
unreachable
44: ; preds = %7
%45 = tail call double @get_global_improvement(double %27, double %33)
%46 = load double, double* @INFINITY
%47 = fcmp oeq double %45, %46
br i1 %47, label %48, label %51
48: ; preds = %44
%49 = load i32, i32* @stdout
%50 = tail call i32 (i32, i8*, ...) @fprintf(i32 %49, i8* getelementptr inbounds ([77 x i8], [77 x i8]* @.str.8, i64 0, i64 0))
br label %54
51: ; preds = %44
%52 = fptosi double %45 to i32
%53 = tail call i32 @printf(i8* getelementptr inbounds ([56 x i8], [56 x i8]* @.str.9, i64 0, i64 0), i32 %52)
br label %54
54: ; preds = %51, %48
%55 = tail call double @get_local_improvement(double %15, double %21)
%56 = load double, double* @INFINITY
%57 = fcmp oeq double %55, %56
br i1 %57, label %58, label %61
58: ; preds = %54
%59 = load i32, i32* @stdout
%60 = tail call i32 (i32, i8*, ...) @fprintf(i32 %59, i8* getelementptr inbounds ([77 x i8], [77 x i8]* @.str.10, i64 0, i64 0))
br label %64
61: ; preds = %54
%62 = fptosi double %55 to i32
%63 = tail call i32 @printf(i8* getelementptr inbounds ([57 x i8], [57 x i8]* @.str.11, i64 0, i64 0), i32 %62)
br label %64
64: ; preds = %61, %58
%65 = load double, double* @INFINITY
%66 = fcmp oeq double %45, %65
%67 = fcmp oeq double %55, %65
%68 = select i1 %66, i1 true, i1 %67
%69 = fcmp oeq double %45, %55
%70 = select i1 %68, i1 true, i1 %69
br i1 %70, label %71, label %74
71: ; preds = %64
%72 = load i32, i32* @stdout
%73 = tail call i32 (i32, i8*, ...) @fprintf(i32 %72, i8* getelementptr inbounds ([82 x i8], [82 x i8]* @.str.12, i64 0, i64 0))
br label %78
74: ; preds = %64
%75 = tail call i32 @get_time_factor_of_use(double %45, double %55)
%76 = mul nsw i32 %75, 100
%77 = tail call i32 @printf(i8* getelementptr inbounds ([52 x i8], [52 x i8]* @.str.13, i64 0, i64 0), i32 %76)
br label %78
78: ; preds = %74, %71
%79 = load i32, i32* @stdout
%80 = tail call i32 @get_experimental_use_factor(double %27, double %33)
%81 = mul nsw i32 %80, 100
%82 = tail call i32 (i32, i8*, ...) @fprintf(i32 %79, i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str.14, i64 0, i64 0), i32 %81)
%83 = tail call i32 (...) @footer()
ret i32 0
}