#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 */
typedef scalar_t__ clock_t;
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
double CLOCKS_PER_SEC;
scalar_t__ clock();
int /*<<< orphan*/ fabs(double);
int /*<<< orphan*/ *fopen(char *, char *);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/ *, char *, ...);
int /*<<< orphan*/ fscanf(int /*<<< orphan*/ *, char *, int *, ...);
int isinf(double);
int /*<<< orphan*/ *popen(char *, char *);
double pow(double, double);
int /*<<< orphan*/ printf(char *, ...);
double sqrt(double);
int main() {
  int frequencies[256];
  clock_t start, end;
  int i;
  for (i = 0; i < 256; i++)
    frequencies[i] = 0;
  start = clock();
  FILE *data_file = fopen("/Users/sumitpatidar/Desktop/1.txt", "r");
  if (data_file == NULL)
    return 1;
  int column, row;
  fscanf(data_file, "%d %d", &column, &row);
  int total_pixels = column * row;
  for (int k = 0; k < total_pixels; k++) {
    int buffer;
    fscanf(data_file, "%d", &buffer);
    if (buffer >= 0 && buffer < 256)
      frequencies[buffer] += 1;
  }
  end = clock();
  double time_taken_for_reading = (double)(end - start) / CLOCKS_PER_SEC;
  printf("Data read in %lf ms\n", 1000 * time_taken_for_reading);
  start = clock();
  char *commandsForGnuplot[] = {"set terminal png", " set title\"th vs d'\"",
                                " set output 'a2.png'",
                                " plot \"result2.dat\" using 1:2 "};
  char *commandsForGnuplot2[] = {"set terminal png", " set title\"th vs n_p\"",
                                 " set output 'b2.png'",
                                 " plot \"result2.dat\" using 1:3 "};
  char *commandsForGnuplot3[] = {"set terminal png", " set title\"d' vs n_p\"",
                                 " set output 'c2.png'",
                                 " plot \"result2.dat\" using 2:3 "};
  FILE *result_ptr = fopen("/Users/sumitpatidar/Desktop/result2.dat", "w");
  fprintf(result_ptr, "%s\t%s\t%s\n", "#th", "d'", "n_p");
  int threshold;
  for (threshold = 0; threshold < 256; threshold++) {
    int clusterA_num = 0;
    int clusterB_num = 0;
    int clusterA_sum = 0;
    int clusterB_sum = 0;
    for (i = 0; i <= threshold; i++) {
      clusterA_num += frequencies[i];
      clusterA_sum += i * frequencies[i];
    }
    for (i = threshold + 1; i < 256; i++) {
      clusterB_num += frequencies[i];
      clusterB_sum += i * frequencies[i];
    }
    double points_ratio = (double)clusterA_num / (double)clusterB_num;
    if (isinf(points_ratio) == 1)
      points_ratio = 0;
    double clusterA_mean = 0;
    double clusterB_mean = 0;
    if (clusterA_num != 0)
      clusterA_mean = (double)clusterA_sum / (double)clusterA_num;
    if (clusterB_num != 0)
      clusterB_mean = (double)clusterB_sum / (double)clusterB_num;
    double standard_deviation_A = 0;
    double standard_deviation_B = 0;
    double sum_of_squares_A = 0;
    double sum_of_squares_B = 0;
    int k = 0;
    for (int i = 0; i <= threshold; i++) {
      if (frequencies[i] != 0)
        sum_of_squares_A += (pow((clusterA_mean - i), 2)) * frequencies[i];
    }
    for (int i = threshold + 1; i < 256; i++) {
      if (frequencies[i] != 0)
        sum_of_squares_B += (pow((clusterB_mean - i), 2)) * frequencies[i];
    }
    if (clusterA_num != 0)
      standard_deviation_A = sqrt((sum_of_squares_A) / (double)(clusterA_num));
    if (clusterB_num != 0)
      standard_deviation_B =
          pow(((sum_of_squares_B) / (double)(clusterB_num)), 0.5);
    double discriminative_index = 0.0;
    if (standard_deviation_A != 0 || standard_deviation_B != 0)
      discriminative_index =
          (clusterA_mean - clusterB_mean) /
          pow((pow(standard_deviation_A, 2) + pow(standard_deviation_B, 2)),
              0.5);
    fprintf(result_ptr, "%d\t%lf\t%lf\n", threshold, fabs(discriminative_index),
            points_ratio);
  }
  end = clock();
  double time_taken_for_thresholding = (double)(end - start) / CLOCKS_PER_SEC;
  printf("Thresholding done in %lf ms\n", time_taken_for_thresholding);
  FILE *gnuplotPipe = popen("gnuplot -persistent", "w");
  for (int ind = 0; ind < 4; ind++) {
    fprintf(gnuplotPipe, "%s \n", commandsForGnuplot[ind]);
  }
  for (int ind = 0; ind < 5; ind++) {
    fprintf(gnuplotPipe, "%s \n", commandsForGnuplot2[ind]);
  }
  for (int ind = 0; ind < 5; ind++) {
    fprintf(gnuplotPipe, "%s \n", commandsForGnuplot3[ind]);
  }
  FILE *time_taken = fopen("/Users/sumitpatidar/Desktop/res.txt", "a+");
  fprintf(time_taken, "%s\n", "\n\nTime data using histogram");
  fprintf(time_taken, "%s %lf %s \n%s %lf %s",
          "Time taken in Part A = ", time_taken_for_reading, "ms",
          "Time taken in Part B = ", time_taken_for_thresholding, "ms");
  printf("Result.dat generated at <Desktop>\n");
  printf("\nGraphs  genarated at <Desktop>\n");
  printf("\nFinal res.txt is generated at Desktop\n");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x570,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x424(%rbp)
cmpl   $0x100,-0x424(%rbp)
jge    11f2 <main+0x52>
movslq -0x424(%rbp),%rax
movl   $0x0,-0x410(%rbp,%rax,4)
mov    -0x424(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x424(%rbp)
jmp    11bc <main+0x1c>
mov    $0x0,%al
call   1030 <clock@plt>
mov    %rax,-0x418(%rbp)
lea    0xe11(%rip),%rdi
lea    0xe2c(%rip),%rsi
call   1090 <fopen@plt>
mov    %rax,-0x430(%rbp)
cmpq   $0x0,-0x430(%rbp)
jne    1234 <main+0x94>
movl   $0x1,-0x4(%rbp)
jmp    1ad7 <main+0x937>
mov    -0x430(%rbp),%rdi
lea    0xdfa(%rip),%rsi
lea    -0x434(%rbp),%rdx
lea    -0x438(%rbp),%rcx
mov    $0x0,%al
call   1050 <fscanf@plt>
mov    -0x434(%rbp),%eax
imul   -0x438(%rbp),%eax
mov    %eax,-0x43c(%rbp)
movl   $0x0,-0x440(%rbp)
mov    -0x440(%rbp),%eax
cmp    -0x43c(%rbp),%eax
jge    12f0 <main+0x150>
mov    -0x430(%rbp),%rdi
lea    0xdab(%rip),%rsi
lea    -0x444(%rbp),%rdx
mov    $0x0,%al
call   1050 <fscanf@plt>
cmpl   $0x0,-0x444(%rbp)
jl     12d7 <main+0x137>
cmpl   $0x100,-0x444(%rbp)
jge    12d7 <main+0x137>
movslq -0x444(%rbp),%rax
mov    -0x410(%rbp,%rax,4),%ecx
add    $0x1,%ecx
mov    %ecx,-0x410(%rbp,%rax,4)
jmp    12dc <main+0x13c>
mov    -0x440(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x440(%rbp)
jmp    1274 <main+0xd4>
mov    $0x0,%al
call   1030 <clock@plt>
mov    %rax,-0x420(%rbp)
mov    -0x420(%rbp),%rax
sub    -0x418(%rbp),%rax
cvtsi2sd %rax,%xmm0
mov    0x2cc8(%rip),%rax
divsd  (%rax),%xmm0
movsd  %xmm0,-0x450(%rbp)
ff
movsd  0xcd4(%rip),%xmm0
mulsd  -0x450(%rbp),%xmm0
ff
lea    0xd07(%rip),%rdi
mov    $0x1,%al
call   1040 <printf@plt>
mov    $0x0,%al
call   1030 <clock@plt>
mov    %rax,-0x418(%rbp)
mov    0x2a59(%rip),%rax
mov    %rax,-0x470(%rbp)
mov    0x2a53(%rip),%rax
mov    %rax,-0x468(%rbp)
mov    0x2a4d(%rip),%rax
mov    %rax,-0x460(%rbp)
mov    0x2a47(%rip),%rax
mov    %rax,-0x458(%rbp)
mov    0x2a41(%rip),%rax
mov    %rax,-0x490(%rbp)
mov    0x2a3b(%rip),%rax
mov    %rax,-0x488(%rbp)
mov    0x2a35(%rip),%rax
mov    %rax,-0x480(%rbp)
mov    0x2a2f(%rip),%rax
mov    %rax,-0x478(%rbp)
mov    0x2a29(%rip),%rax
mov    %rax,-0x4b0(%rbp)
mov    0x2a23(%rip),%rax
mov    %rax,-0x4a8(%rbp)
mov    0x2a1d(%rip),%rax
mov    %rax,-0x4a0(%rbp)
mov    0x2a17(%rip),%rax
mov    %rax,-0x498(%rbp)
lea    0xd46(%rip),%rdi
lea    0xd67(%rip),%rsi
call   1090 <fopen@plt>
mov    %rax,-0x4b8(%rbp)
mov    -0x4b8(%rbp),%rdi
lea    0xd4f(%rip),%rsi
lea    0xd52(%rip),%rdx
lea    0xd4f(%rip),%rcx
lea    0xd4b(%rip),%r8
mov    $0x0,%al
call   1070 <fprintf@plt>
movl   $0x0,-0x4bc(%rbp)
cmpl   $0x100,-0x4bc(%rbp)
jge    18e2 <main+0x742>
movl   $0x0,-0x4c0(%rbp)
movl   $0x0,-0x4c4(%rbp)
movl   $0x0,-0x4c8(%rbp)
movl   $0x0,-0x4cc(%rbp)
movl   $0x0,-0x424(%rbp)
mov    -0x424(%rbp),%eax
cmp    -0x4bc(%rbp),%eax
jg     14e9 <main+0x349>
movslq -0x424(%rbp),%rax
mov    -0x410(%rbp,%rax,4),%eax
add    -0x4c0(%rbp),%eax
mov    %eax,-0x4c0(%rbp)
mov    -0x424(%rbp),%eax
movslq -0x424(%rbp),%rcx
imul   -0x410(%rbp,%rcx,4),%eax
ff
add    -0x4c8(%rbp),%eax
mov    %eax,-0x4c8(%rbp)
mov    -0x424(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x424(%rbp)
jmp    1488 <main+0x2e8>
mov    -0x4bc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x424(%rbp)
cmpl   $0x100,-0x424(%rbp)
jge    1557 <main+0x3b7>
movslq -0x424(%rbp),%rax
mov    -0x410(%rbp,%rax,4),%eax
add    -0x4c4(%rbp),%eax
mov    %eax,-0x4c4(%rbp)
mov    -0x424(%rbp),%eax
movslq -0x424(%rbp),%rcx
imul   -0x410(%rbp,%rcx,4),%eax
ff
add    -0x4cc(%rbp),%eax
mov    %eax,-0x4cc(%rbp)
mov    -0x424(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x424(%rbp)
jmp    14f8 <main+0x358>
cvtsi2sdl -0x4c0(%rbp),%xmm0
ff
cvtsi2sdl -0x4c4(%rbp),%xmm1
ff
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x4d8(%rbp)
ff
movsd  -0x4d8(%rbp),%xmm0
ff
call   10c0 <isinf@plt>
cmp    $0x1,%eax
jne    1594 <main+0x3f4>
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x4d8(%rbp)
ff
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x4e0(%rbp)
ff
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x4e8(%rbp)
ff
cmpl   $0x0,-0x4c0(%rbp)
je     15d3 <main+0x433>
cvtsi2sdl -0x4c8(%rbp),%xmm0
ff
cvtsi2sdl -0x4c0(%rbp),%xmm1
ff
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x4e0(%rbp)
ff
cmpl   $0x0,-0x4c4(%rbp)
je     15fc <main+0x45c>
cvtsi2sdl -0x4cc(%rbp),%xmm0
ff
cvtsi2sdl -0x4c4(%rbp),%xmm1
ff
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x4e8(%rbp)
ff
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x4f0(%rbp)
ff
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x4f8(%rbp)
ff
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x500(%rbp)
ff
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x508(%rbp)
ff
movl   $0x0,-0x50c(%rbp)
movl   $0x0,-0x510(%rbp)
mov    -0x510(%rbp),%eax
cmp    -0x4bc(%rbp),%eax
jg     16c5 <main+0x525>
movslq -0x510(%rbp),%rax
cmpl   $0x0,-0x410(%rbp,%rax,4)
je     16ac <main+0x50c>
movsd  -0x4e0(%rbp),%xmm0
ff
cvtsi2sdl -0x510(%rbp),%xmm1
ff
subsd  %xmm1,%xmm0
movsd  0x991(%rip),%xmm1
call   10a0 <pow@plt>
movslq -0x510(%rbp),%rax
cvtsi2sdl -0x410(%rbp,%rax,4),%xmm2
ff ff
movsd  -0x500(%rbp),%xmm1
ff
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x500(%rbp)
ff
jmp    16b1 <main+0x511>
mov    -0x510(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x510(%rbp)
jmp    163c <main+0x49c>
mov    -0x4bc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x514(%rbp)
cmpl   $0x100,-0x514(%rbp)
jge    175b <main+0x5bb>
movslq -0x514(%rbp),%rax
cmpl   $0x0,-0x410(%rbp,%rax,4)
je     1742 <main+0x5a2>
movsd  -0x4e8(%rbp),%xmm0
cvtsi2sdl -0x514(%rbp),%xmm1
ff
subsd  %xmm1,%xmm0
movsd  0x8fb(%rip),%xmm1
call   10a0 <pow@plt>
movslq -0x514(%rbp),%rax
cvtsi2sdl -0x410(%rbp,%rax,4),%xmm2
ff ff
movsd  -0x508(%rbp),%xmm1
ff
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x508(%rbp)
ff
jmp    1747 <main+0x5a7>
mov    -0x514(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x514(%rbp)
jmp    16d4 <main+0x534>
cmpl   $0x0,-0x4c0(%rbp)
je     1789 <main+0x5e9>
movsd  -0x500(%rbp),%xmm0
ff
cvtsi2sdl -0x4c0(%rbp),%xmm1
ff
divsd  %xmm1,%xmm0
call   10b0 <sqrt@plt>
movsd  %xmm0,-0x4f0(%rbp)
ff
cmpl   $0x0,-0x4c4(%rbp)
je     17bf <main+0x61f>
movsd  -0x508(%rbp),%xmm0
ff
cvtsi2sdl -0x4c4(%rbp),%xmm1
ff
divsd  %xmm1,%xmm0
movsd  0x856(%rip),%xmm1
call   10a0 <pow@plt>
movsd  %xmm0,-0x4f8(%rbp)
ff
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x520(%rbp)
ff
movsd  -0x4f0(%rbp),%xmm0
ff
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jne    1805 <main+0x665>
jp     1805 <main+0x665>
movsd  -0x4f8(%rbp),%xmm0
ff
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jne    1805 <main+0x665>
jp     1805 <main+0x665>
jmp    1882 <main+0x6e2>
movsd  -0x4e0(%rbp),%xmm0
ff
subsd  -0x4e8(%rbp),%xmm0
ff
movsd  %xmm0,-0x550(%rbp)
ff
movsd  -0x4f0(%rbp),%xmm0
ff
movsd  0x7e3(%rip),%xmm1
call   10a0 <pow@plt>
movsd  %xmm0,-0x558(%rbp)
ff
movsd  -0x4f8(%rbp),%xmm0
ff
movsd  0x7c6(%rip),%xmm1
call   10a0 <pow@plt>
movaps %xmm0,%xmm1
movsd  -0x558(%rbp),%xmm0
ff
addsd  %xmm1,%xmm0
movsd  0x7a2(%rip),%xmm1
call   10a0 <pow@plt>
movaps %xmm0,%xmm1
movsd  -0x550(%rbp),%xmm0
ff
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x520(%rbp)
ff
mov    -0x4b8(%rbp),%rax
mov    %rax,-0x568(%rbp)
mov    -0x4bc(%rbp),%eax
mov    %eax,-0x55c(%rbp)
movsd  -0x520(%rbp),%xmm0
ff
call   1060 <fabs@plt>
mov    -0x568(%rbp),%rdi
mov    -0x55c(%rbp),%edx
mov    %eax,%ecx
movsd  -0x4d8(%rbp),%xmm0
ff
lea    0x8bd(%rip),%rsi
mov    $0x1,%al
call   1070 <fprintf@plt>
mov    -0x4bc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4bc(%rbp)
jmp    1446 <main+0x2a6>
mov    $0x0,%al
call   1030 <clock@plt>
mov    %rax,-0x420(%rbp)
mov    -0x420(%rbp),%rax
sub    -0x418(%rbp),%rax
cvtsi2sd %rax,%xmm0
mov    0x26d6(%rip),%rax
divsd  (%rax),%xmm0
movsd  %xmm0,-0x528(%rbp)
ff
movsd  -0x528(%rbp),%xmm0
ff
lea    0x86b(%rip),%rdi
mov    $0x1,%al
call   1040 <printf@plt>
lea    0x87a(%rip),%rdi
lea    0x833(%rip),%rsi
call   1080 <popen@plt>
mov    %rax,-0x530(%rbp)
movl   $0x0,-0x534(%rbp)
cmpl   $0x4,-0x534(%rbp)
jge    1995 <main+0x7f5>
mov    -0x530(%rbp),%rdi
movslq -0x534(%rbp),%rax
mov    -0x470(%rbp,%rax,8),%rdx
ff
lea    0x847(%rip),%rsi
mov    $0x0,%al
call   1070 <fprintf@plt>
mov    -0x534(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x534(%rbp)
jmp    1950 <main+0x7b0>
movl   $0x0,-0x538(%rbp)
cmpl   $0x5,-0x538(%rbp)
jge    19e4 <main+0x844>
mov    -0x530(%rbp),%rdi
movslq -0x538(%rbp),%rax
mov    -0x490(%rbp,%rax,8),%rdx
ff
lea    0x7f8(%rip),%rsi
mov    $0x0,%al
call   1070 <fprintf@plt>
mov    -0x538(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x538(%rbp)
jmp    199f <main+0x7ff>
movl   $0x0,-0x53c(%rbp)
cmpl   $0x5,-0x53c(%rbp)
jge    1a33 <main+0x893>
mov    -0x530(%rbp),%rdi
movslq -0x53c(%rbp),%rax
mov    -0x4b0(%rbp,%rax,8),%rdx
ff
lea    0x7a9(%rip),%rsi
mov    $0x0,%al
call   1070 <fprintf@plt>
mov    -0x53c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x53c(%rbp)
jmp    19ee <main+0x84e>
lea    0x78c(%rip),%rdi
lea    0x7a9(%rip),%rsi
call   1090 <fopen@plt>
mov    %rax,-0x548(%rbp)
mov    -0x548(%rbp),%rdi
lea    0x71a(%rip),%rsi
lea    0x78b(%rip),%rdx
mov    $0x0,%al
call   1070 <fprintf@plt>
mov    -0x548(%rbp),%rdi
movsd  -0x450(%rbp),%xmm0
ff
movsd  -0x528(%rbp),%xmm1
ff
lea    0x782(%rip),%rsi
lea    0x790(%rip),%rdx
lea    0x7a1(%rip),%r9
lea    0x79d(%rip),%r8
mov    %r9,%rcx
mov    $0x2,%al
call   1070 <fprintf@plt>
lea    0x7a4(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0x7b9(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0x7cc(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x570,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x468,%rsp
lea    0x60(%rsp),%rdi
mov    $0x400,%edx
xor    %esi,%esi
call   1060 <memset@plt>
xor    %eax,%eax
call   1040 <clock@plt>
mov    %rax,%r14
lea    0xe7d(%rip),%rdi
lea    0xe98(%rip),%rsi
call   10b0 <fopen@plt>
test   %rax,%rax
je     1cf3 <main+0xb33>
mov    %rax,%rbx
lea    0xe82(%rip),%rsi
lea    0x2c(%rsp),%rdx
lea    0x28(%rsp),%rcx
mov    %rax,%rdi
xor    %eax,%eax
call   1070 <fscanf@plt>
mov    0x28(%rsp),%ebp
imul   0x2c(%rsp),%ebp
test   %ebp,%ebp
jle    1278 <main+0xb8>
lea    0xe5d(%rip),%r15
lea    0x24(%rsp),%r12
jmp    1255 <main+0x95>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
add    $0xffffffff,%ebp
je     1278 <main+0xb8>
mov    %rbx,%rdi
mov    %r15,%rsi
mov    %r12,%rdx
xor    %eax,%eax
call   1070 <fscanf@plt>
mov    0x24(%rsp),%eax
cmp    $0xff,%rax
ja     1250 <main+0x90>
addl   $0x1,0x60(%rsp,%rax,4)
jmp    1250 <main+0x90>
xor    %ebp,%ebp
xor    %eax,%eax
call   1040 <clock@plt>
sub    %r14,%rax
cvtsi2sd %rax,%xmm1
mov    0x2d58(%rip),%rax
divsd  (%rax),%xmm1
movsd  0xd64(%rip),%xmm0
movsd  %xmm1,0x40(%rsp)
mulsd  %xmm1,%xmm0
lea    0xded(%rip),%rdi
mov    $0x1,%al
call   1050 <printf@plt>
xor    %eax,%eax
call   1040 <clock@plt>
mov    %rax,0x38(%rsp)
lea    0xed6(%rip),%rdi
lea    0xef7(%rip),%rsi
call   10b0 <fopen@plt>
lea    0xeed(%rip),%rsi
lea    0xef0(%rip),%rdx
lea    0xeed(%rip),%rcx
lea    0xee9(%rip),%r8
mov    %rax,0x48(%rsp)
mov    %rax,%rdi
xor    %eax,%eax
call   1090 <fprintf@plt>
lea    0x94(%rsp),%r13
mov    $0x1,%r14d
mov    $0xf7,%edi
movdqa 0xd16(%rip),%xmm12
movdqa 0xd1d(%rip),%xmm13
movdqa 0xd24(%rip),%xmm14
movdqa 0xd2b(%rip),%xmm15
jmp    13de <main+0x21e>
nopw   0x0(%rax,%rax,1)
movsd  0x8(%rsp),%xmm1
subsd  %xmm4,%xmm1
movsd  %xmm1,0x8(%rsp)
mulsd  %xmm6,%xmm6
mulsd  %xmm0,%xmm0
addsd  %xmm6,%xmm0
movsd  0xca4(%rip),%xmm1
call   10c0 <pow@plt>
movsd  0x8(%rsp),%xmm1
divsd  %xmm0,%xmm1
movapd %xmm1,%xmm0
call   1080 <fabs@plt>
mov    0x48(%rsp),%rdi
lea    0xe54(%rip),%rsi
mov    %r15d,%edx
mov    %eax,%ecx
movsd  0x50(%rsp),%xmm0
mov    $0x1,%al
call   1090 <fprintf@plt>
add    $0x1,%r14
add    $0x4,%r13
mov    0x58(%rsp),%rdi
add    $0xffffffffffffffff,%rdi
mov    %rbx,%rbp
cmp    $0x100,%ebx
movdqa 0xc73(%rip),%xmm12
movdqa 0xc7a(%rip),%xmm13
movdqa 0xc81(%rip),%xmm14
movdqa 0xc88(%rip),%xmm15
je     1b14 <main+0x954>
cmp    $0x8,%r14
mov    %rbp,(%rsp)
jae    1400 <main+0x240>
xor    %eax,%eax
xor    %r15d,%r15d
xor    %r12d,%r12d
jmp    1630 <main+0x470>
cs nopw 0x0(%rax,%rax,1)
nop
mov    %r14,%rax
movabs $0x7ffffffffffffff8,%rcx
ff ff 7f
and    %rcx,%rax
lea    -0x8(%rax),%rdx
mov    %rdx,%rcx
shr    $0x3,%rcx
add    $0x1,%rcx
test   %rdx,%rdx
je     1601 <main+0x441>
mov    %r14,%rsi
and    $0xfffffffffffffff8,%rsi
add    $0xfffffffffffffff8,%rsi
shr    $0x3,%rsi
add    $0x1,%rsi
and    $0xfffffffffffffffe,%rsi
xorpd  %xmm1,%xmm1
xor    %edx,%edx
pxor   %xmm3,%xmm3
pxor   %xmm8,%xmm8
pxor   %xmm9,%xmm9
movdqa 0xbc4(%rip),%xmm10
nopl   0x0(%rax)
movdqa %xmm10,%xmm4
paddd  %xmm12,%xmm4
movdqa 0x60(%rsp,%rdx,4),%xmm0
movdqa 0x70(%rsp,%rdx,4),%xmm2
movdqa 0x80(%rsp,%rdx,4),%xmm6
movdqa 0x90(%rsp,%rdx,4),%xmm5
paddd  %xmm0,%xmm8
paddd  %xmm2,%xmm9
pshufd $0xf5,%xmm0,%xmm11
pmuludq %xmm10,%xmm0
pshufd $0xe8,%xmm0,%xmm7
pshufd $0xf5,%xmm10,%xmm0
pmuludq %xmm11,%xmm0
pshufd $0xe8,%xmm0,%xmm0
punpckldq %xmm0,%xmm7
paddd  %xmm1,%xmm7
pshufd $0xf5,%xmm2,%xmm1
pmuludq %xmm4,%xmm2
pshufd $0xe8,%xmm2,%xmm0
pshufd $0xf5,%xmm4,%xmm2
pmuludq %xmm1,%xmm2
pshufd $0xe8,%xmm2,%xmm1
punpckldq %xmm1,%xmm0
paddd  %xmm3,%xmm0
movdqa %xmm10,%xmm2
paddd  %xmm13,%xmm2
movdqa %xmm10,%xmm4
paddd  %xmm14,%xmm4
paddd  %xmm6,%xmm8
paddd  %xmm5,%xmm9
pshufd $0xf5,%xmm6,%xmm3
pmuludq %xmm2,%xmm6
pshufd $0xe8,%xmm6,%xmm1
pshufd $0xf5,%xmm2,%xmm2
pmuludq %xmm3,%xmm2
pshufd $0xe8,%xmm2,%xmm2
punpckldq %xmm2,%xmm1
paddd  %xmm7,%xmm1
pshufd $0xf5,%xmm5,%xmm2
pmuludq %xmm4,%xmm5
pshufd $0xe8,%xmm5,%xmm3
pshufd $0xf5,%xmm4,%xmm4
pmuludq %xmm2,%xmm4
pshufd $0xe8,%xmm4,%xmm2
punpckldq %xmm2,%xmm3
paddd  %xmm0,%xmm3
add    $0x10,%rdx
paddd  %xmm15,%xmm10
add    $0xfffffffffffffffe,%rsi
jne    1460 <main+0x2a0>
test   $0x1,%cl
je     15c6 <main+0x406>
movdqa %xmm10,%xmm0
paddd  %xmm12,%xmm0
movdqa 0x60(%rsp,%rdx,4),%xmm2
movdqa 0x70(%rsp,%rdx,4),%xmm4
paddd  %xmm2,%xmm8
paddd  %xmm4,%xmm9
pshufd $0xf5,%xmm2,%xmm5
pmuludq %xmm10,%xmm2
pshufd $0xe8,%xmm2,%xmm2
pshufd $0xf5,%xmm10,%xmm6
pmuludq %xmm5,%xmm6
pshufd $0xe8,%xmm6,%xmm5
punpckldq %xmm5,%xmm2
paddd  %xmm2,%xmm1
pshufd $0xf5,%xmm4,%xmm2
pmuludq %xmm0,%xmm4
pshufd $0xe8,%xmm4,%xmm4
pshufd $0xf5,%xmm0,%xmm0
pmuludq %xmm2,%xmm0
pshufd $0xe8,%xmm0,%xmm0
punpckldq %xmm0,%xmm4
paddd  %xmm4,%xmm3
paddd  %xmm3,%xmm1
paddd  %xmm9,%xmm8
pshufd $0xee,%xmm8,%xmm0
paddd  %xmm8,%xmm0
pshufd $0x55,%xmm0,%xmm2
paddd  %xmm0,%xmm2
movd   %xmm2,%r12d
pshufd $0xee,%xmm1,%xmm0
paddd  %xmm1,%xmm0
pshufd $0x55,%xmm0,%xmm1
paddd  %xmm0,%xmm1
movd   %xmm1,%r15d
jmp    1643 <main+0x483>
xorpd  %xmm1,%xmm1
xor    %edx,%edx
pxor   %xmm3,%xmm3
pxor   %xmm8,%xmm8
pxor   %xmm9,%xmm9
movdqa 0xa02(%rip),%xmm10
test   $0x1,%cl
jne    155c <main+0x39c>
jmp    15c6 <main+0x406>
nopl   0x0(%rax)
mov    0x60(%rsp,%rax,4),%ecx
add    %ecx,%r12d
mov    %eax,%edx
imul   %ecx,%edx
add    %edx,%r15d
add    $0x1,%rax
cmp    %rax,%r14
jne    1630 <main+0x470>
xor    %ebp,%ebp
mov    $0x0,%ebx
cmpl   $0xfe,(%rsp)
ja     18ba <main+0x6fa>
mov    $0xff,%eax
sub    (%rsp),%rax
xor    %ebx,%ebx
mov    %r14,%rsi
mov    $0x0,%ebp
cmp    $0x8,%rax
jb     18a0 <main+0x6e0>
mov    $0xf7,%edx
sub    (%rsp),%rdx
mov    %rdx,%rcx
shr    $0x3,%rcx
add    $0x1,%rcx
movd   %r14d,%xmm0
pshufd $0x0,%xmm0,%xmm8
paddd  0x97f(%rip),%xmm8
cmp    $0x8,%rdx
jae    16c0 <main+0x500>
xorpd  %xmm1,%xmm1
xor    %edx,%edx
pxor   %xmm4,%xmm4
pxor   %xmm9,%xmm9
pxor   %xmm10,%xmm10
jmp    17e5 <main+0x625>
mov    %rdi,%rsi
shr    $0x3,%rsi
add    $0x1,%rsi
and    $0xfffffffffffffffe,%rsi
xorpd  %xmm1,%xmm1
xor    %edx,%edx
pxor   %xmm4,%xmm4
pxor   %xmm9,%xmm9
pxor   %xmm10,%xmm10
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
movdqa %xmm8,%xmm0
paddd  %xmm12,%xmm0
movdqu -0x30(%r13,%rdx,4),%xmm3
movdqu -0x20(%r13,%rdx,4),%xmm2
movdqu -0x10(%r13,%rdx,4),%xmm6
movdqu 0x0(%r13,%rdx,4),%xmm5
paddd  %xmm3,%xmm9
paddd  %xmm2,%xmm10
pshufd $0xf5,%xmm3,%xmm11
pmuludq %xmm8,%xmm3
pshufd $0xe8,%xmm3,%xmm7
pshufd $0xf5,%xmm8,%xmm3
pmuludq %xmm11,%xmm3
pshufd $0xe8,%xmm3,%xmm3
punpckldq %xmm3,%xmm7
paddd  %xmm1,%xmm7
pshufd $0xf5,%xmm2,%xmm1
pmuludq %xmm0,%xmm2
pshufd $0xe8,%xmm2,%xmm3
pshufd $0xf5,%xmm0,%xmm0
pmuludq %xmm1,%xmm0
pshufd $0xe8,%xmm0,%xmm0
punpckldq %xmm0,%xmm3
paddd  %xmm4,%xmm3
movdqa %xmm8,%xmm0
paddd  %xmm13,%xmm0
movdqa %xmm8,%xmm2
paddd  %xmm14,%xmm2
paddd  %xmm6,%xmm9
paddd  %xmm5,%xmm10
pshufd $0xf5,%xmm6,%xmm4
pmuludq %xmm0,%xmm6
pshufd $0xe8,%xmm6,%xmm1
pshufd $0xf5,%xmm0,%xmm0
pmuludq %xmm4,%xmm0
pshufd $0xe8,%xmm0,%xmm0
punpckldq %xmm0,%xmm1
paddd  %xmm7,%xmm1
pshufd $0xf5,%xmm5,%xmm0
pmuludq %xmm2,%xmm5
pshufd $0xe8,%xmm5,%xmm4
pshufd $0xf5,%xmm2,%xmm2
pmuludq %xmm0,%xmm2
pshufd $0xe8,%xmm2,%xmm0
punpckldq %xmm0,%xmm4
paddd  %xmm3,%xmm4
add    $0x10,%rdx
paddd  %xmm15,%xmm8
add    $0xfffffffffffffffe,%rsi
jne    16f0 <main+0x530>
mov    %rax,%rsi
and    $0xfffffffffffffff8,%rsi
test   $0x1,%cl
je     185e <main+0x69e>
add    %r14,%rdx
movdqa %xmm8,%xmm0
paddd  %xmm12,%xmm0
movdqu 0x60(%rsp,%rdx,4),%xmm2
movdqu 0x70(%rsp,%rdx,4),%xmm3
paddd  %xmm2,%xmm9
paddd  %xmm3,%xmm10
pshufd $0xf5,%xmm2,%xmm5
pmuludq %xmm8,%xmm2
pshufd $0xe8,%xmm2,%xmm2
pshufd $0xf5,%xmm8,%xmm6
pmuludq %xmm5,%xmm6
pshufd $0xe8,%xmm6,%xmm5
punpckldq %xmm5,%xmm2
paddd  %xmm2,%xmm1
pshufd $0xf5,%xmm3,%xmm2
pmuludq %xmm0,%xmm3
pshufd $0xe8,%xmm3,%xmm3
pshufd $0xf5,%xmm0,%xmm0
pmuludq %xmm2,%xmm0
pshufd $0xe8,%xmm0,%xmm0
punpckldq %xmm0,%xmm3
paddd  %xmm3,%xmm4
paddd  %xmm4,%xmm1
paddd  %xmm10,%xmm9
pshufd $0xee,%xmm9,%xmm0
paddd  %xmm9,%xmm0
pshufd $0x55,%xmm0,%xmm2
paddd  %xmm0,%xmm2
movd   %xmm2,%ebp
pshufd $0xee,%xmm1,%xmm0
paddd  %xmm1,%xmm0
pshufd $0x55,%xmm0,%xmm1
paddd  %xmm0,%xmm1
movd   %xmm1,%ebx
cmp    %rsi,%rax
je     18ba <main+0x6fa>
add    %r14,%rsi
nopl   (%rax)
mov    0x60(%rsp,%rsi,4),%eax
add    %eax,%ebp
mov    %esi,%ecx
imul   %eax,%ecx
add    %ecx,%ebx
add    $0x1,%rsi
cmp    $0x100,%rsi
jne    18a0 <main+0x6e0>
mov    %rdi,0x58(%rsp)
xorps  %xmm1,%xmm1
cvtsi2sd %r12d,%xmm1
xorps  %xmm0,%xmm0
cvtsi2sd %ebp,%xmm0
movsd  %xmm1,0x18(%rsp)
movsd  %xmm0,0x10(%rsp)
divsd  %xmm0,%xmm1
movsd  %xmm1,0x8(%rsp)
movapd %xmm1,%xmm0
call   10e0 <isinf@plt>
pxor   %xmm3,%xmm3
xorpd  %xmm0,%xmm0
cmp    $0x1,%eax
je     1900 <main+0x740>
movsd  0x8(%rsp),%xmm0
movsd  %xmm0,0x50(%rsp)
test   %r12d,%r12d
movsd  0x18(%rsp),%xmm5
je     191d <main+0x75d>
xorps  %xmm3,%xmm3
cvtsi2sd %r15d,%xmm3
divsd  %xmm5,%xmm3
xorpd  %xmm0,%xmm0
pxor   %xmm4,%xmm4
test   %ebp,%ebp
je     1936 <main+0x776>
xorps  %xmm4,%xmm4
cvtsi2sd %ebx,%xmm4
divsd  0x10(%rsp),%xmm4
mov    (%rsp),%r15
test   %r15,%r15
je     19d0 <main+0x810>
mov    %r14,%rcx
and    $0xfffffffffffffffe,%rcx
xorpd  %xmm0,%xmm0
xor    %eax,%eax
jmp    1969 <main+0x7a9>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
add    $0x2,%rax
cmp    %rax,%rcx
je     19d2 <main+0x812>
mov    0x60(%rsp,%rax,4),%edx
test   %edx,%edx
je     1993 <main+0x7d3>
xorps  %xmm1,%xmm1
cvtsi2sd %eax,%xmm1
movapd %xmm3,%xmm2
subsd  %xmm1,%xmm2
mulsd  %xmm2,%xmm2
xorps  %xmm1,%xmm1
cvtsi2sd %edx,%xmm1
mulsd  %xmm2,%xmm1
addsd  %xmm1,%xmm0
mov    0x64(%rsp,%rax,4),%edx
test   %edx,%edx
je     1960 <main+0x7a0>
lea    0x1(%rax),%esi
xorps  %xmm1,%xmm1
cvtsi2sd %esi,%xmm1
movapd %xmm3,%xmm2
subsd  %xmm1,%xmm2
mulsd  %xmm2,%xmm2
xorps  %xmm1,%xmm1
cvtsi2sd %edx,%xmm1
mulsd  %xmm2,%xmm1
addsd  %xmm1,%xmm0
jmp    1960 <main+0x7a0>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
xor    %eax,%eax
test   $0x1,%r14b
je     1a02 <main+0x842>
mov    0x60(%rsp,%rax,4),%ecx
test   %ecx,%ecx
je     1a02 <main+0x842>
xorps  %xmm1,%xmm1
cvtsi2sd %eax,%xmm1
movapd %xmm3,%xmm2
subsd  %xmm1,%xmm2
mulsd  %xmm2,%xmm2
xorps  %xmm1,%xmm1
cvtsi2sd %ecx,%xmm1
mulsd  %xmm2,%xmm1
addsd  %xmm1,%xmm0
pxor   %xmm6,%xmm6
pxor   %xmm7,%xmm7
cmp    $0xfe,%r15d
ja     1a60 <main+0x8a0>
pxor   %xmm7,%xmm7
mov    %r14,%rax
jmp    1a2c <main+0x86c>
nopl   0x0(%rax)
add    $0x1,%rax
cmp    $0x100,%rax
je     1a60 <main+0x8a0>
mov    0x60(%rsp,%rax,4),%ecx
test   %ecx,%ecx
je     1a20 <main+0x860>
xorps  %xmm1,%xmm1
cvtsi2sd %eax,%xmm1
movdqa %xmm4,%xmm2
subsd  %xmm1,%xmm2
mulsd  %xmm2,%xmm2
xorps  %xmm1,%xmm1
cvtsi2sd %ecx,%xmm1
mulsd  %xmm2,%xmm1
addsd  %xmm1,%xmm7
jmp    1a20 <main+0x860>
nopl   0x0(%rax,%rax,1)
movsd  %xmm3,0x8(%rsp)
test   %r12d,%r12d
movq   %xmm4,0x30(%rsp)
je     1aab <main+0x8eb>
divsd  %xmm5,%xmm0
ucomisd 0x593(%rip),%xmm0
jb     1a90 <main+0x8d0>
xorps  %xmm6,%xmm6
sqrtsd %xmm0,%xmm6
jmp    1aab <main+0x8eb>
nopl   0x0(%rax,%rax,1)
movq   %xmm7,0x18(%rsp)
call   10d0 <sqrt@plt>
movq   0x18(%rsp),%xmm7
movq   0x30(%rsp),%xmm4
movapd %xmm0,%xmm6
xorpd  %xmm1,%xmm1
xorpd  %xmm0,%xmm0
test   %ebp,%ebp
je     1ae4 <main+0x924>
divsd  0x10(%rsp),%xmm7
movapd %xmm7,%xmm0
movsd  0x53f(%rip),%xmm1
movq   %xmm6,0x10(%rsp)
call   10c0 <pow@plt>
xorpd  %xmm1,%xmm1
movq   0x10(%rsp),%xmm6
movq   0x30(%rsp),%xmm4
mov    %r15,%rbx
add    $0x1,%rbx
ucomisd %xmm1,%xmm6
jne    1340 <main+0x180>
jp     1340 <main+0x180>
ucomisd 0x50d(%rip),%xmm0
jne    1340 <main+0x180>
jnp    1373 <main+0x1b3>
jmp    1340 <main+0x180>
xor    %r15d,%r15d
xor    %eax,%eax
call   1040 <clock@plt>
sub    0x38(%rsp),%rax
xorps  %xmm0,%xmm0
cvtsi2sd %rax,%xmm0
mov    0x24b6(%rip),%rax
divsd  (%rax),%xmm0
movsd  %xmm0,(%rsp)
lea    0x6a6(%rip),%rdi
mov    $0x1,%al
call   1050 <printf@plt>
lea    0x6b5(%rip),%rdi
lea    0x66e(%rip),%rsi
call   10a0 <popen@plt>
mov    %rax,%rbx
lea    0x6b3(%rip),%rbp
lea    0x542(%rip),%r14
mov    %rax,%rdi
mov    %rbp,%rsi
mov    %r14,%rdx
xor    %eax,%eax
call   1090 <fprintf@plt>
lea    0x53c(%rip),%rdx
mov    %rbx,%rdi
mov    %rbp,%rsi
xor    %eax,%eax
call   1090 <fprintf@plt>
lea    0x53d(%rip),%rdx
mov    %rbx,%rdi
mov    %rbp,%rsi
xor    %eax,%eax
call   1090 <fprintf@plt>
lea    0x53e(%rip),%rdx
mov    %rbx,%rdi
mov    %rbp,%rsi
xor    %eax,%eax
call   1090 <fprintf@plt>
mov    %rbx,%rdi
mov    %rbp,%rsi
mov    %r14,%rdx
xor    %eax,%eax
call   1090 <fprintf@plt>
lea    0x539(%rip),%rdx
mov    %rbx,%rdi
mov    %rbp,%rsi
xor    %eax,%eax
call   1090 <fprintf@plt>
lea    0x53b(%rip),%rdx
mov    %rbx,%rdi
mov    %rbp,%rsi
xor    %eax,%eax
call   1090 <fprintf@plt>
lea    0x53c(%rip),%rdx
mov    %rbx,%rdi
mov    %rbp,%rsi
xor    %eax,%eax
call   1090 <fprintf@plt>
mov    %rbx,%rdi
mov    %rbp,%rsi
xor    %eax,%eax
call   1090 <fprintf@plt>
mov    %rbx,%rdi
mov    %rbp,%rsi
mov    %r14,%rdx
xor    %eax,%eax
call   1090 <fprintf@plt>
lea    0x52a(%rip),%rdx
mov    %rbx,%rdi
mov    %rbp,%rsi
xor    %eax,%eax
call   1090 <fprintf@plt>
lea    0x52c(%rip),%rdx
mov    %rbx,%rdi
mov    %rbp,%rsi
xor    %eax,%eax
call   1090 <fprintf@plt>
lea    0x52d(%rip),%rdx
mov    %rbx,%rdi
mov    %rbp,%rsi
xor    %eax,%eax
call   1090 <fprintf@plt>
mov    %rbx,%rdi
mov    %rbp,%rsi
xor    %eax,%eax
call   1090 <fprintf@plt>
lea    0x5ac(%rip),%rdi
lea    0x5c9(%rip),%rsi
call   10b0 <fopen@plt>
mov    %rax,%rbx
lea    0x545(%rip),%rsi
lea    0x5b6(%rip),%rdx
mov    %rax,%rdi
xor    %eax,%eax
call   1090 <fprintf@plt>
lea    0x5c1(%rip),%rsi
lea    0x5cf(%rip),%rdx
lea    0x5e3(%rip),%r8
lea    0x5d9(%rip),%rcx
mov    %rbx,%rdi
movsd  0x40(%rsp),%xmm0
movsd  (%rsp),%xmm1
mov    %rcx,%r9
mov    $0x2,%al
call   1090 <fprintf@plt>
lea    0x5d5(%rip),%rdi
call   1030 <puts@plt>
lea    0x5eb(%rip),%rdi
call   1030 <puts@plt>
lea    0x5ff(%rip),%rdi
call   1030 <puts@plt>
jmp    1cf9 <main+0xb39>
mov    $0x1,%r15d
mov    %r15d,%eax
add    $0x468,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [34 x i8] c"/Users/sumitpatidar/Desktop/1.txt\00"
@.str.1 = [2 x i8] c"r\00"
@.str.2 = [6 x i8] c"%d %d\00"
@.str.3 = [3 x i8] c"%d\00"
@CLOCKS_PER_SEC = global double 0.000000e+00
@.str.4 = [21 x i8] c"Data read in %lf ms\0A\00"
@.str.5 = [17 x i8] c"set terminal png\00"
@.str.6 = [21 x i8] c" set title\22th vs d'\22\00"
@.str.7 = [21 x i8] c" set output 'a2.png'\00"
@.str.8 = [31 x i8] c" plot \22result2.dat\22 using 1:2 \00"
@__const.main.commandsForGnuplot = [4 x i8*] [i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.5, i32 0, i32 0), i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.6, i32 0, i32 0), i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.7, i32 0, i32 0), i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.8, i32 0, i32 0)]
@.str.9 = [22 x i8] c" set title\22th vs n_p\22\00"
@.str.10 = [21 x i8] c" set output 'b2.png'\00"
@.str.11 = [31 x i8] c" plot \22result2.dat\22 using 1:3 \00"
@__const.main.commandsForGnuplot2 = [4 x i8*] [i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.5, i32 0, i32 0), i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.9, i32 0, i32 0), i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.10, i32 0, i32 0), i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.11, i32 0, i32 0)]
@.str.12 = [22 x i8] c" set title\22d' vs n_p\22\00"
@.str.13 = [21 x i8] c" set output 'c2.png'\00"
@.str.14 = [31 x i8] c" plot \22result2.dat\22 using 2:3 \00"
@__const.main.commandsForGnuplot3 = [4 x i8*] [i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.5, i32 0, i32 0), i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.12, i32 0, i32 0), i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.13, i32 0, i32 0), i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.14, i32 0, i32 0)]
@.str.15 = [40 x i8] c"/Users/sumitpatidar/Desktop/result2.dat\00"
@.str.16 = [2 x i8] c"w\00"
@.str.17 = [10 x i8] c"%s\09%s\09%s\0A\00"
@.str.18 = [4 x i8] c"#th\00"
@.str.19 = [3 x i8] c"d'\00"
@.str.20 = [4 x i8] c"n_p\00"
@.str.21 = [12 x i8] c"%d\09%lf\09%lf\0A\00"
@.str.22 = [29 x i8] c"Thresholding done in %lf ms\0A\00"
@.str.23 = [20 x i8] c"gnuplot -persistent\00"
@.str.24 = [5 x i8] c"%s \0A\00"
@.str.25 = [36 x i8] c"/Users/sumitpatidar/Desktop/res.txt\00"
@.str.26 = [3 x i8] c"a+\00"
@.str.27 = [4 x i8] c"%s\0A\00"
@.str.28 = [28 x i8] c"\0A\0ATime data using histogram\00"
@.str.29 = [21 x i8] c"%s %lf %s \0A%s %lf %s\00"
@.str.30 = [24 x i8] c"Time taken in Part A = \00"
@.str.31 = [3 x i8] c"ms\00"
@.str.32 = [24 x i8] c"Time taken in Part B = \00"
@.str.33 = [35 x i8] c"Result.dat generated at <Desktop>\0A\00"
@.str.34 = [33 x i8] c"\0AGraphs genarated at <Desktop>\0A\00"
@.str.35 = [40 x i8] c"\0AFinal res.txt is generated at Desktop\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [256 x i32]
%3 = alloca i64
%4 = alloca i64
%5 = alloca i32
%6 = alloca i32*
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
%11 = alloca i32
%12 = alloca double
%13 = alloca [4 x i8*]
%14 = alloca [4 x i8*]
%15 = alloca [4 x i8*]
%16 = alloca i32*
%17 = alloca i32
%18 = alloca i32
%19 = alloca i32
%20 = alloca i32
%21 = alloca i32
%22 = alloca double
%23 = alloca double
%24 = alloca double
%25 = alloca double
%26 = alloca double
%27 = alloca double
%28 = alloca double
%29 = alloca i32
%30 = alloca i32
%31 = alloca i32
%32 = alloca double
%33 = alloca double
%34 = alloca i32*
%35 = alloca i32
%36 = alloca i32
%37 = alloca i32
%38 = alloca i32*
store i32 0, i32* %1
store i32 0, i32* %5
br label %39
39: ; preds = %46, %0
%40 = load i32, i32* %5
%41 = icmp slt i32 %40, 256
br i1 %41, label %42, label %49
42: ; preds = %39
%43 = load i32, i32* %5
%44 = sext i32 %43 to i64
%45 = getelementptr inbounds [256 x i32], [256 x i32]* %2, i64 0, i64 %44
store i32 0, i32* %45
br label %46
46: ; preds = %42
%47 = load i32, i32* %5
%48 = add nsw i32 %47, 1
store i32 %48, i32* %5
br label %39
49: ; preds = %39
%50 = call i64 (...) @clock()
store i64 %50, i64* %3
%51 = call i32* @fopen(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
store i32* %51, i32** %6
%52 = load i32*, i32** %6
%53 = icmp eq i32* %52, null
br i1 %53, label %54, label %55
54: ; preds = %49
store i32 1, i32* %1
br label %344
55: ; preds = %49
%56 = load i32*, i32** %6
%57 = call i32 (i32*, i8*, i32*, ...) @fscanf(i32* %56, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i64 0, i64 0), i32* %7, i32* %8)
%58 = load i32, i32* %7
%59 = load i32, i32* %8
%60 = mul nsw i32 %58, %59
store i32 %60, i32* %9
store i32 0, i32* %10
br label %61
61: ; preds = %80, %55
%62 = load i32, i32* %10
%63 = load i32, i32* %9
%64 = icmp slt i32 %62, %63
br i1 %64, label %65, label %83
65: ; preds = %61
%66 = load i32*, i32** %6
%67 = call i32 (i32*, i8*, i32*, ...) @fscanf(i32* %66, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), i32* %11)
%68 = load i32, i32* %11
%69 = icmp sge i32 %68, 0
br i1 %69, label %70, label %79
70: ; preds = %65
%71 = load i32, i32* %11
%72 = icmp slt i32 %71, 256
br i1 %72, label %73, label %79
73: ; preds = %70
%74 = load i32, i32* %11
%75 = sext i32 %74 to i64
%76 = getelementptr inbounds [256 x i32], [256 x i32]* %2, i64 0, i64 %75
%77 = load i32, i32* %76
%78 = add nsw i32 %77, 1
store i32 %78, i32* %76
br label %79
79: ; preds = %73, %70, %65
br label %80
80: ; preds = %79
%81 = load i32, i32* %10
%82 = add nsw i32 %81, 1
store i32 %82, i32* %10
br label %61
83: ; preds = %61
%84 = call i64 (...) @clock()
store i64 %84, i64* %4
%85 = load i64, i64* %4
%86 = load i64, i64* %3
%87 = sub nsw i64 %85, %86
%88 = sitofp i64 %87 to double
%89 = load double, double* @CLOCKS_PER_SEC
%90 = fdiv double %88, %89
store double %90, double* %12
%91 = load double, double* %12
%92 = fmul double 1.000000e+03, %91
%93 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.4, i64 0, i64 0), double %92)
%94 = call i64 (...) @clock()
store i64 %94, i64* %3
%95 = bitcast [4 x i8*]* %13 to i8*
%96 = bitcast [4 x i8*]* %14 to i8*
%97 = bitcast [4 x i8*]* %15 to i8*
%98 = call i32* @fopen(i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.15, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.16, i64 0, i64 0))
store i32* %98, i32** %16
%99 = load i32*, i32** %16
%100 = call i32 (i32*, i8*, ...) @fprintf(i32* %99, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.17, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.18, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.19, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.20, i64 0, i64 0))
store i32 0, i32* %17
br label %101
101: ; preds = %278, %83
%102 = load i32, i32* %17
%103 = icmp slt i32 %102, 256
br i1 %103, label %104, label %281
104: ; preds = %101
store i32 0, i32* %18
store i32 0, i32* %19
store i32 0, i32* %20
store i32 0, i32* %21
store i32 0, i32* %5
br label %105
105: ; preds = %124, %104
%106 = load i32, i32* %5
%107 = load i32, i32* %17
%108 = icmp sle i32 %106, %107
br i1 %108, label %109, label %127
109: ; preds = %105
%110 = load i32, i32* %5
%111 = sext i32 %110 to i64
%112 = getelementptr inbounds [256 x i32], [256 x i32]* %2, i64 0, i64 %111
%113 = load i32, i32* %112
%114 = load i32, i32* %18
%115 = add nsw i32 %114, %113
store i32 %115, i32* %18
%116 = load i32, i32* %5
%117 = load i32, i32* %5
%118 = sext i32 %117 to i64
%119 = getelementptr inbounds [256 x i32], [256 x i32]* %2, i64 0, i64 %118
%120 = load i32, i32* %119
%121 = mul nsw i32 %116, %120
%122 = load i32, i32* %20
%123 = add nsw i32 %122, %121
store i32 %123, i32* %20
br label %124
124: ; preds = %109
%125 = load i32, i32* %5
%126 = add nsw i32 %125, 1
store i32 %126, i32* %5
br label %105
127: ; preds = %105
%128 = load i32, i32* %17
%129 = add nsw i32 %128, 1
store i32 %129, i32* %5
br label %130
130: ; preds = %148, %127
%131 = load i32, i32* %5
%132 = icmp slt i32 %131, 256
br i1 %132, label %133, label %151
133: ; preds = %130
%134 = load i32, i32* %5
%135 = sext i32 %134 to i64
%136 = getelementptr inbounds [256 x i32], [256 x i32]* %2, i64 0, i64 %135
%137 = load i32, i32* %136
%138 = load i32, i32* %19
%139 = add nsw i32 %138, %137
store i32 %139, i32* %19
%140 = load i32, i32* %5
%141 = load i32, i32* %5
%142 = sext i32 %141 to i64
%143 = getelementptr inbounds [256 x i32], [256 x i32]* %2, i64 0, i64 %142
%144 = load i32, i32* %143
%145 = mul nsw i32 %140, %144
%146 = load i32, i32* %21
%147 = add nsw i32 %146, %145
store i32 %147, i32* %21
br label %148
148: ; preds = %133
%149 = load i32, i32* %5
%150 = add nsw i32 %149, 1
store i32 %150, i32* %5
br label %130
151: ; preds = %130
%152 = load i32, i32* %18
%153 = sitofp i32 %152 to double
%154 = load i32, i32* %19
%155 = sitofp i32 %154 to double
%156 = fdiv double %153, %155
store double %156, double* %22
%157 = load double, double* %22
%158 = call i32 @isinf(double %157)
%159 = icmp eq i32 %158, 1
br i1 %159, label %160, label %161
160: ; preds = %151
store double 0.000000e+00, double* %22
br label %161
161: ; preds = %160, %151
store double 0.000000e+00, double* %23
store double 0.000000e+00, double* %24
%162 = load i32, i32* %18
%163 = icmp ne i32 %162, 0
br i1 %163, label %164, label %170
164: ; preds = %161
%165 = load i32, i32* %20
%166 = sitofp i32 %165 to double
%167 = load i32, i32* %18
%168 = sitofp i32 %167 to double
%169 = fdiv double %166, %168
store double %169, double* %23
br label %170
170: ; preds = %164, %161
%171 = load i32, i32* %19
%172 = icmp ne i32 %171, 0
br i1 %172, label %173, label %179
173: ; preds = %170
%174 = load i32, i32* %21
%175 = sitofp i32 %174 to double
%176 = load i32, i32* %19
%177 = sitofp i32 %176 to double
%178 = fdiv double %175, %177
store double %178, double* %24
br label %179
179: ; preds = %173, %170
store double 0.000000e+00, double* %25
store double 0.000000e+00, double* %26
store double 0.000000e+00, double* %27
store double 0.000000e+00, double* %28
store i32 0, i32* %29
store i32 0, i32* %30
br label %180
180: ; preds = %204, %179
%181 = load i32, i32* %30
%182 = load i32, i32* %17
%183 = icmp sle i32 %181, %182
br i1 %183, label %184, label %207
184: ; preds = %180
%185 = load i32, i32* %30
%186 = sext i32 %185 to i64
%187 = getelementptr inbounds [256 x i32], [256 x i32]* %2, i64 0, i64 %186
%188 = load i32, i32* %187
%189 = icmp ne i32 %188, 0
br i1 %189, label %190, label %203
190: ; preds = %184
%191 = load double, double* %23
%192 = load i32, i32* %30
%193 = sitofp i32 %192 to double
%194 = fsub double %191, %193
%195 = call double @pow(double %194, double 2.000000e+00)
%196 = load i32, i32* %30
%197 = sext i32 %196 to i64
%198 = getelementptr inbounds [256 x i32], [256 x i32]* %2, i64 0, i64 %197
%199 = load i32, i32* %198
%200 = sitofp i32 %199 to double
%201 = load double, double* %27
%202 = call double @llvm.fmuladd.f64(double %195, double %200, double %201)
store double %202, double* %27
br label %203
203: ; preds = %190, %184
br label %204
204: ; preds = %203
%205 = load i32, i32* %30
%206 = add nsw i32 %205, 1
store i32 %206, i32* %30
br label %180
207: ; preds = %180
%208 = load i32, i32* %17
%209 = add nsw i32 %208, 1
store i32 %209, i32* %31
br label %210
210: ; preds = %233, %207
%211 = load i32, i32* %31
%212 = icmp slt i32 %211, 256
br i1 %212, label %213, label %236
213: ; preds = %210
%214 = load i32, i32* %31
%215 = sext i32 %214 to i64
%216 = getelementptr inbounds [256 x i32], [256 x i32]* %2, i64 0, i64 %215
%217 = load i32, i32* %216
%218 = icmp ne i32 %217, 0
br i1 %218, label %219, label %232
219: ; preds = %213
%220 = load double, double* %24
%221 = load i32, i32* %31
%222 = sitofp i32 %221 to double
%223 = fsub double %220, %222
%224 = call double @pow(double %223, double 2.000000e+00)
%225 = load i32, i32* %31
%226 = sext i32 %225 to i64
%227 = getelementptr inbounds [256 x i32], [256 x i32]* %2, i64 0, i64 %226
%228 = load i32, i32* %227
%229 = sitofp i32 %228 to double
%230 = load double, double* %28
%231 = call double @llvm.fmuladd.f64(double %224, double %229, double %230)
store double %231, double* %28
br label %232
232: ; preds = %219, %213
br label %233
233: ; preds = %232
%234 = load i32, i32* %31
%235 = add nsw i32 %234, 1
store i32 %235, i32* %31
br label %210
236: ; preds = %210
%237 = load i32, i32* %18
%238 = icmp ne i32 %237, 0
br i1 %238, label %239, label %245
239: ; preds = %236
%240 = load double, double* %27
%241 = load i32, i32* %18
%242 = sitofp i32 %241 to double
%243 = fdiv double %240, %242
%244 = call double @sqrt(double %243)
store double %244, double* %25
br label %245
245: ; preds = %239, %236
%246 = load i32, i32* %19
%247 = icmp ne i32 %246, 0
br i1 %247, label %248, label %254
248: ; preds = %245
%249 = load double, double* %28
%250 = load i32, i32* %19
%251 = sitofp i32 %250 to double
%252 = fdiv double %249, %251
%253 = call double @pow(double %252, double 5.000000e-01)
store double %253, double* %26
br label %254
254: ; preds = %248, %245
store double 0.000000e+00, double* %32
%255 = load double, double* %25
%256 = fcmp une double %255, 0.000000e+00
br i1 %256, label %260, label %257
257: ; preds = %254
%258 = load double, double* %26
%259 = fcmp une double %258, 0.000000e+00
br i1 %259, label %260, label %271
260: ; preds = %257, %254
%261 = load double, double* %23
%262 = load double, double* %24
%263 = fsub double %261, %262
%264 = load double, double* %25
%265 = call double @pow(double %264, double 2.000000e+00)
%266 = load double, double* %26
%267 = call double @pow(double %266, double 2.000000e+00)
%268 = fadd double %265, %267
%269 = call double @pow(double %268, double 5.000000e-01)
%270 = fdiv double %263, %269
store double %270, double* %32
br label %271
271: ; preds = %260, %257
%272 = load i32*, i32** %16
%273 = load i32, i32* %17
%274 = load double, double* %32
%275 = call i32 @fabs(double %274)
%276 = load double, double* %22
%277 = call i32 (i32*, i8*, ...) @fprintf(i32* %272, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.21, i64 0, i64 0), i32 %273, i32 %275, double %276)
br label %278
278: ; preds = %271
%279 = load i32, i32* %17
%280 = add nsw i32 %279, 1
store i32 %280, i32* %17
br label %101
281: ; preds = %101
%282 = call i64 (...) @clock()
store i64 %282, i64* %4
%283 = load i64, i64* %4
%284 = load i64, i64* %3
%285 = sub nsw i64 %283, %284
%286 = sitofp i64 %285 to double
%287 = load double, double* @CLOCKS_PER_SEC
%288 = fdiv double %286, %287
store double %288, double* %33
%289 = load double, double* %33
%290 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.22, i64 0, i64 0), double %289)
%291 = call i32* @popen(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.23, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.16, i64 0, i64 0))
store i32* %291, i32** %34
store i32 0, i32* %35
br label %292
292: ; preds = %302, %281
%293 = load i32, i32* %35
%294 = icmp slt i32 %293, 4
br i1 %294, label %295, label %305
295: ; preds = %292
%296 = load i32*, i32** %34
%297 = load i32, i32* %35
%298 = sext i32 %297 to i64
%299 = getelementptr inbounds [4 x i8*], [4 x i8*]* %13, i64 0, i64 %298
%300 = load i8*, i8** %299
%301 = call i32 (i32*, i8*, ...) @fprintf(i32* %296, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.24, i64 0, i64 0), i8* %300)
br label %302
302: ; preds = %295
%303 = load i32, i32* %35
%304 = add nsw i32 %303, 1
store i32 %304, i32* %35
br label %292
305: ; preds = %292
store i32 0, i32* %36
br label %306
306: ; preds = %316, %305
%307 = load i32, i32* %36
%308 = icmp slt i32 %307, 5
br i1 %308, label %309, label %319
309: ; preds = %306
%310 = load i32*, i32** %34
%311 = load i32, i32* %36
%312 = sext i32 %311 to i64
%313 = getelementptr inbounds [4 x i8*], [4 x i8*]* %14, i64 0, i64 %312
%314 = load i8*, i8** %313
%315 = call i32 (i32*, i8*, ...) @fprintf(i32* %310, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.24, i64 0, i64 0), i8* %314)
br label %316
316: ; preds = %309
%317 = load i32, i32* %36
%318 = add nsw i32 %317, 1
store i32 %318, i32* %36
br label %306
319: ; preds = %306
store i32 0, i32* %37
br label %320
320: ; preds = %330, %319
%321 = load i32, i32* %37
%322 = icmp slt i32 %321, 5
br i1 %322, label %323, label %333
323: ; preds = %320
%324 = load i32*, i32** %34
%325 = load i32, i32* %37
%326 = sext i32 %325 to i64
%327 = getelementptr inbounds [4 x i8*], [4 x i8*]* %15, i64 0, i64 %326
%328 = load i8*, i8** %327
%329 = call i32 (i32*, i8*, ...) @fprintf(i32* %324, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.24, i64 0, i64 0), i8* %328)
br label %330
330: ; preds = %323
%331 = load i32, i32* %37
%332 = add nsw i32 %331, 1
store i32 %332, i32* %37
br label %320
333: ; preds = %320
%334 = call i32* @fopen(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.25, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.26, i64 0, i64 0))
store i32* %334, i32** %38
%335 = load i32*, i32** %38
%336 = call i32 (i32*, i8*, ...) @fprintf(i32* %335, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.27, i64 0, i64 0), i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.28, i64 0, i64 0))
%337 = load i32*, i32** %38
%338 = load double, double* %12
%339 = load double, double* %33
%340 = call i32 (i32*, i8*, ...) @fprintf(i32* %337, i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.29, i64 0, i64 0), i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.30, i64 0, i64 0), double %338, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.31, i64 0, i64 0), i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.32, i64 0, i64 0), double %339, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.31, i64 0, i64 0))
%341 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.33, i64 0, i64 0))
%342 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.34, i64 0, i64 0))
%343 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.35, i64 0, i64 0))
store i32 0, i32* %1
br label %344
344: ; preds = %333, %54
%345 = load i32, i32* %1
ret i32 %345
}

LLVM IR (-O2):
@.str = [34 x i8] c"/Users/sumitpatidar/Desktop/1.txt\00"
@.str.1 = [2 x i8] c"r\00"
@.str.2 = [6 x i8] c"%d %d\00"
@.str.3 = [3 x i8] c"%d\00"
@CLOCKS_PER_SEC = global double 0.000000e+00
@.str.4 = [21 x i8] c"Data read in %lf ms\0A\00"
@.str.5 = [17 x i8] c"set terminal png\00"
@.str.6 = [21 x i8] c" set title\22th vs d'\22\00"
@.str.7 = [21 x i8] c" set output 'a2.png'\00"
@.str.8 = [31 x i8] c" plot \22result2.dat\22 using 1:2 \00"
@.str.9 = [22 x i8] c" set title\22th vs n_p\22\00"
@.str.10 = [21 x i8] c" set output 'b2.png'\00"
@.str.11 = [31 x i8] c" plot \22result2.dat\22 using 1:3 \00"
@.str.12 = [22 x i8] c" set title\22d' vs n_p\22\00"
@.str.13 = [21 x i8] c" set output 'c2.png'\00"
@.str.14 = [31 x i8] c" plot \22result2.dat\22 using 2:3 \00"
@.str.15 = [40 x i8] c"/Users/sumitpatidar/Desktop/result2.dat\00"
@.str.16 = [2 x i8] c"w\00"
@.str.17 = [10 x i8] c"%s\09%s\09%s\0A\00"
@.str.18 = [4 x i8] c"#th\00"
@.str.19 = [3 x i8] c"d'\00"
@.str.20 = [4 x i8] c"n_p\00"
@.str.21 = [12 x i8] c"%d\09%lf\09%lf\0A\00"
@.str.22 = [29 x i8] c"Thresholding done in %lf ms\0A\00"
@.str.23 = [20 x i8] c"gnuplot -persistent\00"
@.str.24 = [5 x i8] c"%s \0A\00"
@.str.25 = [36 x i8] c"/Users/sumitpatidar/Desktop/res.txt\00"
@.str.26 = [3 x i8] c"a+\00"
@.str.27 = [4 x i8] c"%s\0A\00"
@.str.28 = [28 x i8] c"\0A\0ATime data using histogram\00"
@.str.29 = [21 x i8] c"%s %lf %s \0A%s %lf %s\00"
@.str.30 = [24 x i8] c"Time taken in Part A = \00"
@.str.31 = [3 x i8] c"ms\00"
@.str.32 = [24 x i8] c"Time taken in Part B = \00"
@str = [34 x i8] c"Result.dat generated at <Desktop>\00"
@str.36 = [32 x i8] c"\0AGraphs genarated at <Desktop>\00"
@str.37 = [39 x i8] c"\0AFinal res.txt is generated at Desktop\00"
define i32 @main() {
%1 = alloca [256 x i32]
%2 = bitcast [256 x i32]* %1 to i8*
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = tail call i64 (...) @clock()
%7 = tail call i32* @fopen(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%8 = icmp eq i32* %7, null
br i1 %8, label %416, label %9
9: ; preds = %0
%10 = bitcast i32* %3 to i8*
%11 = bitcast i32* %4 to i8*
%12 = call i32 (i32*, i8*, i32*, ...) @fscanf(i32* %7, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i64 0, i64 0), i32* %3, i32* %4)
%13 = load i32, i32* %3
%14 = load i32, i32* %4
%15 = mul i32 %14, %13
%16 = icmp sgt i32 %15, 0
br i1 %16, label %17, label %19
17: ; preds = %9
%18 = bitcast i32* %5 to i8*
br label %30
19: ; preds = %40, %9
%20 = call i64 (...) @clock()
%21 = sub nsw i64 %20, %6
%22 = sitofp i64 %21 to double
%23 = load double, double* @CLOCKS_PER_SEC
%24 = fdiv double %22, %23
%25 = fmul double %24, 1.000000e+03
%26 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([21 x i8], [21 x i8]* @.str.4, i64 0, i64 0), double %25)
%27 = call i64 (...) @clock()
%28 = call i32* @fopen(i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.15, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.16, i64 0, i64 0))
%29 = call i32 (i32*, i8*, ...) @fprintf(i32* %28, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.17, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.18, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.19, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.20, i64 0, i64 0))
br label %43
30: ; preds = %17, %40
%31 = phi i32 [ 0, %17 ], [ %41, %40 ]
%32 = call i32 (i32*, i8*, i32*, ...) @fscanf(i32* %7, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), i32* %5)
%33 = load i32, i32* %5
%34 = icmp ult i32 %33, 256
br i1 %34, label %35, label %40
35: ; preds = %30
%36 = zext i32 %33 to i64
%37 = getelementptr inbounds [256 x i32], [256 x i32]* %1, i64 0, i64 %36
%38 = load i32, i32* %37
%39 = add nsw i32 %38, 1
store i32 %39, i32* %37
br label %40
40: ; preds = %35, %30
%41 = add nuw nsw i32 %31, 1
%42 = icmp eq i32 %41, %15
br i1 %42, label %19, label %30
43: ; preds = %19, %381
%44 = phi i64 [ 0, %19 ], [ %387, %381 ]
%45 = phi i64 [ 1, %19 ], [ %385, %381 ]
%46 = phi i32 [ 0, %19 ], [ %157, %381 ]
%47 = sub i64 247, %44
%48 = lshr i64 %47, 3
%49 = add nuw nsw i64 %48, 1
%50 = and i64 %45, 9223372036854775800
%51 = add nsw i64 %50, -8
%52 = lshr exact i64 %51, 3
%53 = add nuw nsw i64 %52, 1
%54 = sub i64 255, %44
%55 = icmp ult i64 %45, 8
br i1 %55, label %138, label %56
56: ; preds = %43
%57 = and i64 %45, 9223372036854775800
%58 = and i64 %53, 1
%59 = icmp eq i64 %51, 0
br i1 %59, label %102, label %60
60: ; preds = %56
%61 = and i64 %53, 4611686018427387902
br label %62
62: ; preds = %62, %60
%63 = phi i64 [ 0, %60 ], [ %98, %62 ]
%64 = phi <4 x i32> [ zeroinitializer, %60 ], [ %96, %62 ]
%65 = phi <4 x i32> [ zeroinitializer, %60 ], [ %97, %62 ]
%66 = phi <4 x i32> [ zeroinitializer, %60 ], [ %92, %62 ]
%67 = phi <4 x i32> [ zeroinitializer, %60 ], [ %93, %62 ]
%68 = phi <4 x i32> [ <i32 0, i32 1, i32 2, i32 3>, %60 ], [ %99, %62 ]
%69 = phi i64 [ 0, %60 ], [ %100, %62 ]
%70 = add <4 x i32> %68, <i32 4, i32 4, i32 4, i32 4>
%71 = getelementptr inbounds [256 x i32], [256 x i32]* %1, i64 0, i64 %63
%72 = bitcast i32* %71 to <4 x i32>*
%73 = load <4 x i32>, <4 x i32>* %72
%74 = getelementptr inbounds i32, i32* %71, i64 4
%75 = bitcast i32* %74 to <4 x i32>*
%76 = load <4 x i32>, <4 x i32>* %75
%77 = add <4 x i32> %73, %66
%78 = add <4 x i32> %76, %67
%79 = mul nsw <4 x i32> %73, %68
%80 = mul nsw <4 x i32> %76, %70
%81 = add <4 x i32> %79, %64
%82 = add <4 x i32> %80, %65
%83 = or i64 %63, 8
%84 = add <4 x i32> %68, <i32 8, i32 8, i32 8, i32 8>
%85 = add <4 x i32> %68, <i32 12, i32 12, i32 12, i32 12>
%86 = getelementptr inbounds [256 x i32], [256 x i32]* %1, i64 0, i64 %83
%87 = bitcast i32* %86 to <4 x i32>*
%88 = load <4 x i32>, <4 x i32>* %87
%89 = getelementptr inbounds i32, i32* %86, i64 4
%90 = bitcast i32* %89 to <4 x i32>*
%91 = load <4 x i32>, <4 x i32>* %90
%92 = add <4 x i32> %88, %77
%93 = add <4 x i32> %91, %78
%94 = mul nsw <4 x i32> %88, %84
%95 = mul nsw <4 x i32> %91, %85
%96 = add <4 x i32> %94, %81
%97 = add <4 x i32> %95, %82
%98 = add nuw i64 %63, 16
%99 = add <4 x i32> %68, <i32 16, i32 16, i32 16, i32 16>
%100 = add i64 %69, 2
%101 = icmp eq i64 %100, %61
br i1 %101, label %102, label %62
102: ; preds = %62, %56
%103 = phi <4 x i32> [ undef, %56 ], [ %92, %62 ]
%104 = phi <4 x i32> [ undef, %56 ], [ %93, %62 ]
%105 = phi <4 x i32> [ undef, %56 ], [ %96, %62 ]
%106 = phi <4 x i32> [ undef, %56 ], [ %97, %62 ]
%107 = phi i64 [ 0, %56 ], [ %98, %62 ]
%108 = phi <4 x i32> [ zeroinitializer, %56 ], [ %96, %62 ]
%109 = phi <4 x i32> [ zeroinitializer, %56 ], [ %97, %62 ]
%110 = phi <4 x i32> [ zeroinitializer, %56 ], [ %92, %62 ]
%111 = phi <4 x i32> [ zeroinitializer, %56 ], [ %93, %62 ]
%112 = phi <4 x i32> [ <i32 0, i32 1, i32 2, i32 3>, %56 ], [ %99, %62 ]
%113 = icmp eq i64 %58, 0
br i1 %113, label %128, label %114
114: ; preds = %102
%115 = add <4 x i32> %112, <i32 4, i32 4, i32 4, i32 4>
%116 = getelementptr inbounds [256 x i32], [256 x i32]* %1, i64 0, i64 %107
%117 = bitcast i32* %116 to <4 x i32>*
%118 = load <4 x i32>, <4 x i32>* %117
%119 = getelementptr inbounds i32, i32* %116, i64 4
%120 = bitcast i32* %119 to <4 x i32>*
%121 = load <4 x i32>, <4 x i32>* %120
%122 = add <4 x i32> %118, %110
%123 = add <4 x i32> %121, %111
%124 = mul nsw <4 x i32> %118, %112
%125 = mul nsw <4 x i32> %121, %115
%126 = add <4 x i32> %124, %108
%127 = add <4 x i32> %125, %109
br label %128
128: ; preds = %102, %114
%129 = phi <4 x i32> [ %103, %102 ], [ %122, %114 ]
%130 = phi <4 x i32> [ %104, %102 ], [ %123, %114 ]
%131 = phi <4 x i32> [ %105, %102 ], [ %126, %114 ]
%132 = phi <4 x i32> [ %106, %102 ], [ %127, %114 ]
%133 = add <4 x i32> %130, %129
%134 = call i32 @llvm.vector.reduce.add.v4i32(<4 x i32> %133)
%135 = add <4 x i32> %132, %131
%136 = call i32 @llvm.vector.reduce.add.v4i32(<4 x i32> %135)
%137 = icmp eq i64 %45, %57
br i1 %137, label %154, label %138
138: ; preds = %43, %128
%139 = phi i64 [ 0, %43 ], [ %57, %128 ]
%140 = phi i32 [ 0, %43 ], [ %136, %128 ]
%141 = phi i32 [ 0, %43 ], [ %134, %128 ]
br label %142
142: ; preds = %138, %142
%143 = phi i64 [ %152, %142 ], [ %139, %138 ]
%144 = phi i32 [ %151, %142 ], [ %140, %138 ]
%145 = phi i32 [ %148, %142 ], [ %141, %138 ]
%146 = getelementptr inbounds [256 x i32], [256 x i32]* %1, i64 0, i64 %143
%147 = load i32, i32* %146
%148 = add nsw i32 %147, %145
%149 = trunc i64 %143 to i32
%150 = mul nsw i32 %147, %149
%151 = add nsw i32 %150, %144
%152 = add nuw nsw i64 %143, 1
%153 = icmp eq i64 %152, %45
br i1 %153, label %154, label %142
154: ; preds = %142, %128
%155 = phi i32 [ %134, %128 ], [ %148, %142 ]
%156 = phi i32 [ %136, %128 ], [ %151, %142 ]
%157 = add nuw nsw i32 %46, 1
%158 = icmp ult i32 %46, 255
br i1 %158, label %159, label %267
159: ; preds = %154
%160 = icmp ult i64 %54, 8
br i1 %160, label %251, label %161
161: ; preds = %159
%162 = and i64 %54, -8
%163 = add i64 %45, %162
%164 = trunc i64 %45 to i32
%165 = insertelement <4 x i32> poison, i32 %164, i64 0
%166 = shufflevector <4 x i32> %165, <4 x i32> poison, <4 x i32> zeroinitializer
%167 = add <4 x i32> %166, <i32 0, i32 1, i32 2, i32 3>
%168 = and i64 %49, 1
%169 = icmp ult i64 %47, 8
br i1 %169, label %214, label %170
170: ; preds = %161
%171 = and i64 %49, 4611686018427387902
br label %172
172: ; preds = %172, %170
%173 = phi i64 [ 0, %170 ], [ %210, %172 ]
%174 = phi <4 x i32> [ zeroinitializer, %170 ], [ %208, %172 ]
%175 = phi <4 x i32> [ zeroinitializer, %170 ], [ %209, %172 ]
%176 = phi <4 x i32> [ zeroinitializer, %170 ], [ %204, %172 ]
%177 = phi <4 x i32> [ zeroinitializer, %170 ], [ %205, %172 ]
%178 = phi <4 x i32> [ %167, %170 ], [ %211, %172 ]
%179 = phi i64 [ 0, %170 ], [ %212, %172 ]
%180 = add i64 %45, %173
%181 = add <4 x i32> %178, <i32 4, i32 4, i32 4, i32 4>
%182 = getelementptr inbounds [256 x i32], [256 x i32]* %1, i64 0, i64 %180
%183 = bitcast i32* %182 to <4 x i32>*
%184 = load <4 x i32>, <4 x i32>* %183
%185 = getelementptr inbounds i32, i32* %182, i64 4
%186 = bitcast i32* %185 to <4 x i32>*
%187 = load <4 x i32>, <4 x i32>* %186
%188 = add <4 x i32> %184, %176
%189 = add <4 x i32> %187, %177
%190 = mul nsw <4 x i32> %184, %178
%191 = mul nsw <4 x i32> %187, %181
%192 = add <4 x i32> %190, %174
%193 = add <4 x i32> %191, %175
%194 = or i64 %173, 8
%195 = add <4 x i32> %178, <i32 8, i32 8, i32 8, i32 8>
%196 = add i64 %45, %194
%197 = add <4 x i32> %178, <i32 12, i32 12, i32 12, i32 12>
%198 = getelementptr inbounds [256 x i32], [256 x i32]* %1, i64 0, i64 %196
%199 = bitcast i32* %198 to <4 x i32>*
%200 = load <4 x i32>, <4 x i32>* %199
%201 = getelementptr inbounds i32, i32* %198, i64 4
%202 = bitcast i32* %201 to <4 x i32>*
%203 = load <4 x i32>, <4 x i32>* %202
%204 = add <4 x i32> %200, %188
%205 = add <4 x i32> %203, %189
%206 = mul nsw <4 x i32> %200, %195
%207 = mul nsw <4 x i32> %203, %197
%208 = add <4 x i32> %206, %192
%209 = add <4 x i32> %207, %193
%210 = add nuw i64 %173, 16
%211 = add <4 x i32> %178, <i32 16, i32 16, i32 16, i32 16>
%212 = add i64 %179, 2
%213 = icmp eq i64 %212, %171
br i1 %213, label %214, label %172
214: ; preds = %172, %161
%215 = phi <4 x i32> [ undef, %161 ], [ %204, %172 ]
%216 = phi <4 x i32> [ undef, %161 ], [ %205, %172 ]
%217 = phi <4 x i32> [ undef, %161 ], [ %208, %172 ]
%218 = phi <4 x i32> [ undef, %161 ], [ %209, %172 ]
%219 = phi i64 [ 0, %161 ], [ %210, %172 ]
%220 = phi <4 x i32> [ zeroinitializer, %161 ], [ %208, %172 ]
%221 = phi <4 x i32> [ zeroinitializer, %161 ], [ %209, %172 ]
%222 = phi <4 x i32> [ zeroinitializer, %161 ], [ %204, %172 ]
%223 = phi <4 x i32> [ zeroinitializer, %161 ], [ %205, %172 ]
%224 = phi <4 x i32> [ %167, %161 ], [ %211, %172 ]
%225 = icmp eq i64 %168, 0
br i1 %225, label %241, label %226
226: ; preds = %214
%227 = add i64 %45, %219
%228 = add <4 x i32> %224, <i32 4, i32 4, i32 4, i32 4>
%229 = getelementptr inbounds [256 x i32], [256 x i32]* %1, i64 0, i64 %227
%230 = bitcast i32* %229 to <4 x i32>*
%231 = load <4 x i32>, <4 x i32>* %230
%232 = getelementptr inbounds i32, i32* %229, i64 4
%233 = bitcast i32* %232 to <4 x i32>*
%234 = load <4 x i32>, <4 x i32>* %233
%235 = add <4 x i32> %231, %222
%236 = add <4 x i32> %234, %223
%237 = mul nsw <4 x i32> %231, %224
%238 = mul nsw <4 x i32> %234, %228
%239 = add <4 x i32> %237, %220
%240 = add <4 x i32> %238, %221
br label %241
241: ; preds = %214, %226
%242 = phi <4 x i32> [ %215, %214 ], [ %235, %226 ]
%243 = phi <4 x i32> [ %216, %214 ], [ %236, %226 ]
%244 = phi <4 x i32> [ %217, %214 ], [ %239, %226 ]
%245 = phi <4 x i32> [ %218, %214 ], [ %240, %226 ]
%246 = add <4 x i32> %243, %242
%247 = call i32 @llvm.vector.reduce.add.v4i32(<4 x i32> %246)
%248 = add <4 x i32> %245, %244
%249 = call i32 @llvm.vector.reduce.add.v4i32(<4 x i32> %248)
%250 = icmp eq i64 %54, %162
br i1 %250, label %267, label %251
251: ; preds = %159, %241
%252 = phi i64 [ %45, %159 ], [ %163, %241 ]
%253 = phi i32 [ 0, %159 ], [ %249, %241 ]
%254 = phi i32 [ 0, %159 ], [ %247, %241 ]
br label %255
255: ; preds = %251, %255
%256 = phi i64 [ %265, %255 ], [ %252, %251 ]
%257 = phi i32 [ %264, %255 ], [ %253, %251 ]
%258 = phi i32 [ %261, %255 ], [ %254, %251 ]
%259 = getelementptr inbounds [256 x i32], [256 x i32]* %1, i64 0, i64 %256
%260 = load i32, i32* %259
%261 = add nsw i32 %260, %258
%262 = trunc i64 %256 to i32
%263 = mul nsw i32 %260, %262
%264 = add nsw i32 %263, %257
%265 = add nuw nsw i64 %256, 1
%266 = icmp eq i64 %265, 256
br i1 %266, label %267, label %255
267: ; preds = %255, %241, %154
%268 = phi i32 [ 0, %154 ], [ %247, %241 ], [ %261, %255 ]
%269 = phi i32 [ 0, %154 ], [ %249, %241 ], [ %264, %255 ]
%270 = sitofp i32 %155 to double
%271 = sitofp i32 %268 to double
%272 = fdiv double %270, %271
%273 = call i32 @isinf(double %272)
%274 = icmp eq i32 %273, 1
%275 = select i1 %274, double 0.000000e+00, double %272
%276 = icmp eq i32 %155, 0
br i1 %276, label %280, label %277
277: ; preds = %267
%278 = sitofp i32 %156 to double
%279 = fdiv double %278, %270
br label %280
280: ; preds = %277, %267
%281 = phi double [ %279, %277 ], [ 0.000000e+00, %267 ]
%282 = icmp eq i32 %268, 0
br i1 %282, label %286, label %283
283: ; preds = %280
%284 = sitofp i32 %269 to double
%285 = fdiv double %284, %271
br label %286
286: ; preds = %283, %280
%287 = phi double [ %285, %283 ], [ 0.000000e+00, %280 ]
%288 = and i64 %45, 1
%289 = icmp eq i64 %44, 0
br i1 %289, label %292, label %290
290: ; preds = %286
%291 = and i64 %45, 9223372036854775806
br label %310
292: ; preds = %337, %286
%293 = phi double [ undef, %286 ], [ %338, %337 ]
%294 = phi i64 [ 0, %286 ], [ %339, %337 ]
%295 = phi double [ 0.000000e+00, %286 ], [ %338, %337 ]
%296 = icmp eq i64 %288, 0
br i1 %296, label %308, label %297
297: ; preds = %292
%298 = getelementptr inbounds [256 x i32], [256 x i32]* %1, i64 0, i64 %294
%299 = load i32, i32* %298
%300 = icmp eq i32 %299, 0
br i1 %300, label %308, label %301
301: ; preds = %297
%302 = trunc i64 %294 to i32
%303 = sitofp i32 %302 to double
%304 = fsub double %281, %303
%305 = fmul double %304, %304
%306 = sitofp i32 %299 to double
%307 = call double @llvm.fmuladd.f64(double %305, double %306, double %295)
br label %308
308: ; preds = %297, %301, %292
%309 = phi double [ %293, %292 ], [ %307, %301 ], [ %295, %297 ]
br i1 %158, label %344, label %342
310: ; preds = %337, %290
%311 = phi i64 [ 0, %290 ], [ %339, %337 ]
%312 = phi double [ 0.000000e+00, %290 ], [ %338, %337 ]
%313 = phi i64 [ 0, %290 ], [ %340, %337 ]
%314 = getelementptr inbounds [256 x i32], [256 x i32]* %1, i64 0, i64 %311
%315 = load i32, i32* %314
%316 = icmp eq i32 %315, 0
br i1 %316, label %324, label %317
317: ; preds = %310
%318 = trunc i64 %311 to i32
%319 = sitofp i32 %318 to double
%320 = fsub double %281, %319
%321 = fmul double %320, %320
%322 = sitofp i32 %315 to double
%323 = call double @llvm.fmuladd.f64(double %321, double %322, double %312)
br label %324
324: ; preds = %310, %317
%325 = phi double [ %323, %317 ], [ %312, %310 ]
%326 = or i64 %311, 1
%327 = getelementptr inbounds [256 x i32], [256 x i32]* %1, i64 0, i64 %326
%328 = load i32, i32* %327
%329 = icmp eq i32 %328, 0
br i1 %329, label %337, label %330
330: ; preds = %324
%331 = trunc i64 %326 to i32
%332 = sitofp i32 %331 to double
%333 = fsub double %281, %332
%334 = fmul double %333, %333
%335 = sitofp i32 %328 to double
%336 = call double @llvm.fmuladd.f64(double %334, double %335, double %325)
br label %337
337: ; preds = %330, %324
%338 = phi double [ %336, %330 ], [ %325, %324 ]
%339 = add nuw nsw i64 %311, 2
%340 = add i64 %313, 2
%341 = icmp eq i64 %340, %291
br i1 %341, label %292, label %310
342: ; preds = %357, %308
%343 = phi double [ 0.000000e+00, %308 ], [ %358, %357 ]
br i1 %276, label %364, label %361
344: ; preds = %308, %357
%345 = phi i64 [ %359, %357 ], [ %45, %308 ]
%346 = phi double [ %358, %357 ], [ 0.000000e+00, %308 ]
%347 = getelementptr inbounds [256 x i32], [256 x i32]* %1, i64 0, i64 %345
%348 = load i32, i32* %347
%349 = icmp eq i32 %348, 0
br i1 %349, label %357, label %350
350: ; preds = %344
%351 = trunc i64 %345 to i32
%352 = sitofp i32 %351 to double
%353 = fsub double %287, %352
%354 = fmul double %353, %353
%355 = sitofp i32 %348 to double
%356 = call double @llvm.fmuladd.f64(double %354, double %355, double %346)
br label %357
357: ; preds = %344, %350
%358 = phi double [ %356, %350 ], [ %346, %344 ]
%359 = add nuw nsw i64 %345, 1
%360 = icmp eq i64 %359, 256
br i1 %360, label %342, label %344
361: ; preds = %342
%362 = fdiv double %309, %270
%363 = call double @sqrt(double %362)
br label %364
364: ; preds = %361, %342
%365 = phi double [ %363, %361 ], [ 0.000000e+00, %342 ]
br i1 %282, label %369, label %366
366: ; preds = %364
%367 = fdiv double %343, %271
%368 = call double @pow(double %367, double 5.000000e-01)
br label %369
369: ; preds = %366, %364
%370 = phi double [ %368, %366 ], [ 0.000000e+00, %364 ]
%371 = fcmp une double %365, 0.000000e+00
%372 = fcmp une double %370, 0.000000e+00
%373 = select i1 %371, i1 true, i1 %372
br i1 %373, label %374, label %381
374: ; preds = %369
%375 = fsub double %281, %287
%376 = fmul double %365, %365
%377 = fmul double %370, %370
%378 = fadd double %376, %377
%379 = call double @pow(double %378, double 5.000000e-01)
%380 = fdiv double %375, %379
br label %381
381: ; preds = %369, %374
%382 = phi double [ %380, %374 ], [ 0.000000e+00, %369 ]
%383 = call i32 @fabs(double %382)
%384 = call i32 (i32*, i8*, ...) @fprintf(i32* %28, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.21, i64 0, i64 0), i32 %46, i32 %383, double %275)
%385 = add nuw nsw i64 %45, 1
%386 = icmp eq i32 %157, 256
%387 = add i64 %44, 1
br i1 %386, label %388, label %43
388: ; preds = %381
%389 = call i64 (...) @clock()
%390 = sub nsw i64 %389, %27
%391 = sitofp i64 %390 to double
%392 = load double, double* @CLOCKS_PER_SEC
%393 = fdiv double %391, %392
%394 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([29 x i8], [29 x i8]* @.str.22, i64 0, i64 0), double %393)
%395 = call i32* @popen(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.23, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.16, i64 0, i64 0))
%396 = call i32 (i32*, i8*, ...) @fprintf(i32* %395, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.24, i64 0, i64 0), i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.5, i64 0, i64 0))
%397 = call i32 (i32*, i8*, ...) @fprintf(i32* %395, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.24, i64 0, i64 0), i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.6, i64 0, i64 0))
%398 = call i32 (i32*, i8*, ...) @fprintf(i32* %395, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.24, i64 0, i64 0), i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.7, i64 0, i64 0))
%399 = call i32 (i32*, i8*, ...) @fprintf(i32* %395, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.24, i64 0, i64 0), i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.8, i64 0, i64 0))
%400 = call i32 (i32*, i8*, ...) @fprintf(i32* %395, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.24, i64 0, i64 0), i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.5, i64 0, i64 0))
%401 = call i32 (i32*, i8*, ...) @fprintf(i32* %395, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.24, i64 0, i64 0), i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.9, i64 0, i64 0))
%402 = call i32 (i32*, i8*, ...) @fprintf(i32* %395, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.24, i64 0, i64 0), i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.10, i64 0, i64 0))
%403 = call i32 (i32*, i8*, ...) @fprintf(i32* %395, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.24, i64 0, i64 0), i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.11, i64 0, i64 0))
%404 = call i32 (i32*, i8*, ...) @fprintf(i32* %395, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.24, i64 0, i64 0), i8* undef)
%405 = call i32 (i32*, i8*, ...) @fprintf(i32* %395, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.24, i64 0, i64 0), i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.5, i64 0, i64 0))
%406 = call i32 (i32*, i8*, ...) @fprintf(i32* %395, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.24, i64 0, i64 0), i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.12, i64 0, i64 0))
%407 = call i32 (i32*, i8*, ...) @fprintf(i32* %395, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.24, i64 0, i64 0), i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.13, i64 0, i64 0))
%408 = call i32 (i32*, i8*, ...) @fprintf(i32* %395, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.24, i64 0, i64 0), i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.14, i64 0, i64 0))
%409 = call i32 (i32*, i8*, ...) @fprintf(i32* %395, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.24, i64 0, i64 0), i8* undef)
%410 = call i32* @fopen(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.25, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.26, i64 0, i64 0))
%411 = call i32 (i32*, i8*, ...) @fprintf(i32* %410, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.27, i64 0, i64 0), i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.28, i64 0, i64 0))
%412 = call i32 (i32*, i8*, ...) @fprintf(i32* %410, i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.29, i64 0, i64 0), i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.30, i64 0, i64 0), double %24, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.31, i64 0, i64 0), i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.32, i64 0, i64 0), double %393, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.31, i64 0, i64 0))
%413 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([34 x i8], [34 x i8]* @str, i64 0, i64 0))
%414 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([32 x i8], [32 x i8]* @str.36, i64 0, i64 0))
%415 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([39 x i8], [39 x i8]* @str.37, i64 0, i64 0))
br label %416
416: ; preds = %0, %388
%417 = phi i32 [ 0, %388 ], [ 1, %0 ]
ret i32 %417
}