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

/* Variables and functions */
int /*<<< orphan*/ fclose(int /*<<< orphan*/ *);
int /*<<< orphan*/ *fgets(char *, int, int /*<<< orphan*/ *);
int /*<<< orphan*/ *fopen(char *, char *);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/ *, char *, ...);
float log(int);
int /*<<< orphan*/ perror(char *);
int /*<<< orphan*/ printf(char *, char *);
int /*<<< orphan*/ strcat(char *, char *);
int /*<<< orphan*/ strcpy(char *, char *);
int strlen(char *);
int main(int argc, char *argv[]) {
  int arg_len = 1000;
  char species[arg_len];
  strcpy(species, argv[1]);
  char analysis[arg_len];
  strcpy(analysis, argv[2]);
  char base_dir[arg_len];
  strcpy(base_dir, argv[3]);
  char threshold[arg_len];
  strcpy(threshold, argv[4]);
  char threshold_folder[arg_len];
  if (threshold[0] == '9' && threshold[1] == '5') {
    strcpy(threshold_folder, "");
  } else {
    strcpy(threshold_folder, "/threshold_");
    strcat(threshold_folder, threshold);
  }
  char log_file_name[arg_len];
  strcpy(log_file_name, base_dir);
  strcat(log_file_name, "/Analysis/log.txt");
  FILE *log_file = fopen(log_file_name, "a");
  char output_file_name[arg_len];
  strcpy(output_file_name, base_dir);
  strcat(output_file_name, "/Analysis/");
  strcat(output_file_name, analysis);
  strcat(output_file_name, "/");
  strcat(output_file_name, species);
  strcat(output_file_name, "_");
  strcat(output_file_name, analysis);
  strcat(output_file_name, threshold_folder);
  strcat(output_file_name, "/");
  strcat(output_file_name, species);
  strcat(output_file_name, "_di.csv");
  FILE *output = fopen(output_file_name, "w");
  fprintf(output, "Isolate_1,Isolate_2,SNPs,Sites,Divergence\n");
  char isolates_file_name[arg_len];
  strcpy(isolates_file_name, base_dir);
  strcat(isolates_file_name, "/Analysis/Core_genome_alignment/");
  strcat(isolates_file_name, species);
  strcat(isolates_file_name, "_Core_genome_alignment");
  strcat(isolates_file_name, "/");
  strcat(isolates_file_name, species);
  strcat(isolates_file_name, "_isolates.txt");
  char isolate_name[arg_len];
  int isolate_count;
  isolate_count = 0;
  FILE *isolates_file = fopen(isolates_file_name, "r");
  if (isolates_file != NULL) {
    while (fgets(isolate_name, sizeof isolate_name, isolates_file) != NULL) {
      isolate_count++;
    }
    fclose(isolates_file);
  } else {
    perror(isolates_file_name);
  }
  char isolate_name_array[isolate_count][arg_len];
  char isolate_file_name_array[isolate_count][arg_len];
  isolate_count = 0;
  FILE *isolates_file_2 = fopen(isolates_file_name, "r");
  if (isolates_file_2 != NULL) {
    while (fgets(isolate_name, sizeof isolate_name, isolates_file_2) != NULL) {
      int isolate_name_len;
      isolate_name_len = strlen(isolate_name);
      if (isolate_name[(isolate_name_len - 1)] == '\n') {
        isolate_name[(isolate_name_len - 1)] = '\0';
      }
      strcpy(isolate_name_array[isolate_count], isolate_name);
      strcpy(isolate_file_name_array[isolate_count], base_dir);
      strcat(isolate_file_name_array[isolate_count], "/Analysis/");
      strcat(isolate_file_name_array[isolate_count], analysis);
      strcat(isolate_file_name_array[isolate_count], "/");
      strcat(isolate_file_name_array[isolate_count], species);
      strcat(isolate_file_name_array[isolate_count], "_");
      strcat(isolate_file_name_array[isolate_count], analysis);
      strcat(isolate_file_name_array[isolate_count], threshold_folder);
      strcat(isolate_file_name_array[isolate_count], "/Intergenic_files/");
      strcat(isolate_file_name_array[isolate_count], isolate_name);
      strcat(isolate_file_name_array[isolate_count], ".fasta");
      isolate_count++;
    }
    fclose(isolates_file_2);
  } else {
    perror(isolates_file_name);
  }
  int a;
  int b;
  int i;
  int genome_max = 1000000;
  char genome1[genome_max];
  char genome2[genome_max];
  int count;
  count = 0;
  for (a = 0; a < isolate_count; a++) {
    FILE *file1 = fopen(isolate_file_name_array[a], "r");
    if (file1 != NULL) {
      char line1[genome_max];
      while (fgets(line1, sizeof line1, file1) != NULL) {
        if (line1[0] != '>') {
          int line1_len = strlen(line1);
          line1_len = (line1_len - 1);
          if (line1[line1_len] == '\n') {
            line1[line1_len] = '\0';
          }
          strcpy(genome1, line1);
          fclose(file1);
        }
      }
    } else {
      perror(isolate_file_name_array[a]);
    }
    for (b = 0; b < isolate_count; b++) {
      if (a > b) {
        FILE *file2 = fopen(isolate_file_name_array[b], "r");
        if (file2 != NULL) {
          char line2[genome_max];
          while (fgets(line2, sizeof line2, file2) != NULL) {
            if (line2[0] != '>') {
              int line2_len = strlen(line2);
              line2_len = (line2_len - 1);
              if (line2[line2_len] == '\n') {
                line2[line2_len] = '\0';
              }
              strcpy(genome2, line2);
              fclose(file2);
            }
          }
        } else {
          perror(isolate_file_name_array[b]);
        }
        int genome_len;
        genome_len = strlen(genome1);
        int snp;
        snp = 0;
        int n;
        n = 0;
        for (i = 0; i < genome_len; i++) {
          if (genome1[i] == 'N' || genome2[i] == 'N') {
            n++;
          } else {
            if (genome1[i] != genome2[i]) {
              snp++;
            }
          }
        }
        int sites;
        sites = (genome_len - n);
        float div;
        div = ((float)snp / sites);
        float JC_div;
        JC_div = (((float)-3 / 4) * (log(1 - (((float)4 / 3) * div))));
        fprintf(output, "%s,%s,%i,%i,%0.6f\n", isolate_name_array[a],
                isolate_name_array[b], snp, sites, JC_div);
        count++;
      }
    }
  }
  printf("%s di calculated.\n", species);
  fprintf(log_file, "%s di calculated.\n", species);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x1e0,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x3e8,-0x14(%rbp)
mov    -0x14(%rbp),%eax
mov    %rsp,%rcx
mov    %rcx,-0x20(%rbp)
mov    %rax,%rcx
add    $0xf,%rcx
and    $0xfffffffffffffff0,%rcx
mov    %rsp,%rdi
sub    %rcx,%rdi
mov    %rdi,-0x160(%rbp)
mov    %rdi,%rsp
mov    %rax,-0x28(%rbp)
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rsi
call   1030 <strcpy@plt>
mov    -0x14(%rbp),%eax
mov    %rax,%rcx
add    $0xf,%rcx
and    $0xfffffffffffffff0,%rcx
mov    %rsp,%rdi
sub    %rcx,%rdi
mov    %rdi,-0x158(%rbp)
mov    %rdi,%rsp
mov    %rax,-0x30(%rbp)
mov    -0x10(%rbp),%rax
mov    0x10(%rax),%rsi
call   1030 <strcpy@plt>
mov    -0x14(%rbp),%eax
mov    %rax,%rcx
add    $0xf,%rcx
and    $0xfffffffffffffff0,%rcx
mov    %rsp,%rdi
sub    %rcx,%rdi
mov    %rdi,-0x150(%rbp)
mov    %rdi,%rsp
mov    %rax,-0x38(%rbp)
mov    -0x10(%rbp),%rax
mov    0x18(%rax),%rsi
call   1030 <strcpy@plt>
mov    -0x14(%rbp),%eax
mov    %rax,%rcx
add    $0xf,%rcx
and    $0xfffffffffffffff0,%rcx
mov    %rsp,%rdi
sub    %rcx,%rdi
mov    %rdi,-0x148(%rbp)
mov    %rdi,%rsp
mov    %rax,-0x40(%rbp)
mov    -0x10(%rbp),%rax
mov    0x20(%rax),%rsi
call   1030 <strcpy@plt>
mov    -0x148(%rbp),%rax
mov    -0x14(%rbp),%ecx
mov    %rcx,%rsi
add    $0xf,%rsi
and    $0xfffffffffffffff0,%rsi
mov    %rsp,%rdx
sub    %rsi,%rdx
mov    %rdx,-0x140(%rbp)
mov    %rdx,%rsp
mov    %rcx,-0x48(%rbp)
movsbl (%rax),%eax
cmp    $0x39,%eax
jne    12e4 <main+0x144>
mov    -0x148(%rbp),%rax
movsbl 0x1(%rax),%eax
cmp    $0x35,%eax
jne    12e4 <main+0x144>
mov    -0x140(%rbp),%rdi
lea    0xe17(%rip),%rsi
call   1030 <strcpy@plt>
jmp    130a <main+0x16a>
mov    -0x140(%rbp),%rdi
lea    0xd1a(%rip),%rsi
call   1030 <strcpy@plt>
mov    -0x140(%rbp),%rdi
mov    -0x148(%rbp),%rsi
call   10c0 <strcat@plt>
mov    -0x150(%rbp),%rsi
mov    -0x14(%rbp),%eax
mov    %rax,%rcx
add    $0xf,%rcx
and    $0xfffffffffffffff0,%rcx
mov    %rsp,%rdi
sub    %rcx,%rdi
mov    %rdi,-0x190(%rbp)
mov    %rdi,%rsp
mov    %rax,-0x50(%rbp)
call   1030 <strcpy@plt>
mov    -0x190(%rbp),%rdi
lea    0xcd2(%rip),%rsi
call   10c0 <strcat@plt>
mov    -0x190(%rbp),%rdi
lea    0xd71(%rip),%rsi
call   10a0 <fopen@plt>
mov    -0x150(%rbp),%rsi
mov    %rax,-0x58(%rbp)
mov    -0x14(%rbp),%eax
mov    %rax,%rcx
add    $0xf,%rcx
and    $0xfffffffffffffff0,%rcx
mov    %rsp,%rdi
sub    %rcx,%rdi
mov    %rdi,-0x188(%rbp)
mov    %rdi,%rsp
mov    %rax,-0x60(%rbp)
call   1030 <strcpy@plt>
mov    -0x188(%rbp),%rdi
lea    0xc8c(%rip),%rsi
call   10c0 <strcat@plt>
mov    -0x158(%rbp),%rsi
mov    -0x188(%rbp),%rdi
call   10c0 <strcat@plt>
mov    -0x188(%rbp),%rdi
lea    0xcff(%rip),%rsi
mov    %rsi,-0x180(%rbp)
call   10c0 <strcat@plt>
mov    -0x188(%rbp),%rdi
mov    -0x160(%rbp),%rsi
call   10c0 <strcat@plt>
mov    -0x188(%rbp),%rdi
lea    0xc25(%rip),%rsi
call   10c0 <strcat@plt>
mov    -0x158(%rbp),%rsi
mov    -0x188(%rbp),%rdi
call   10c0 <strcat@plt>
mov    -0x140(%rbp),%rsi
mov    -0x188(%rbp),%rdi
call   10c0 <strcat@plt>
mov    -0x188(%rbp),%rdi
mov    -0x180(%rbp),%rsi
call   10c0 <strcat@plt>
mov    -0x188(%rbp),%rdi
mov    -0x160(%rbp),%rsi
call   10c0 <strcat@plt>
mov    -0x188(%rbp),%rdi
lea    0xbe5(%rip),%rsi
call   10c0 <strcat@plt>
mov    -0x188(%rbp),%rdi
lea    0xbda(%rip),%rsi
call   10a0 <fopen@plt>
mov    %rax,-0x68(%rbp)
mov    -0x68(%rbp),%rdi
lea    0xbc8(%rip),%rsi
xor    %eax,%eax
call   1080 <fprintf@plt>
mov    -0x150(%rbp),%rsi
mov    -0x14(%rbp),%eax
mov    %rax,%rcx
add    $0xf,%rcx
and    $0xfffffffffffffff0,%rcx
mov    %rsp,%rdi
sub    %rcx,%rdi
mov    %rdi,-0x178(%rbp)
mov    %rdi,%rsp
mov    %rax,-0x70(%rbp)
call   1030 <strcpy@plt>
mov    -0x178(%rbp),%rdi
lea    0xbb0(%rip),%rsi
call   10c0 <strcat@plt>
mov    -0x160(%rbp),%rsi
mov    -0x178(%rbp),%rdi
call   10c0 <strcat@plt>
mov    -0x178(%rbp),%rdi
lea    0xbab(%rip),%rsi
call   10c0 <strcat@plt>
mov    -0x180(%rbp),%rsi
mov    -0x178(%rbp),%rdi
call   10c0 <strcat@plt>
mov    -0x160(%rbp),%rsi
mov    -0x178(%rbp),%rdi
call   10c0 <strcat@plt>
mov    -0x178(%rbp),%rdi
lea    0xb89(%rip),%rsi
call   10c0 <strcat@plt>
mov    -0x178(%rbp),%rdi
mov    -0x14(%rbp),%eax
mov    %rax,-0x170(%rbp)
mov    %rax,%rdx
add    $0xf,%rdx
and    $0xfffffffffffffff0,%rdx
mov    %rsp,%rcx
sub    %rdx,%rcx
mov    %rcx,-0x168(%rbp)
mov    %rcx,%rsp
mov    %rax,-0x78(%rbp)
movl   $0x0,-0x7c(%rbp)
lea    0xb54(%rip),%rsi
call   10a0 <fopen@plt>
mov    %rax,-0x88(%rbp)
cmpq   $0x0,-0x88(%rbp)
je     15c0 <main+0x420>
jmp    157b <main+0x3db>
mov    -0x168(%rbp),%rdi
mov    -0x170(%rbp),%rax
mov    %eax,%esi
mov    -0x88(%rbp),%rdx
call   1070 <fgets@plt>
cmp    $0x0,%rax
je     15af <main+0x40f>
mov    -0x7c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x7c(%rbp)
jmp    157b <main+0x3db>
mov    -0x88(%rbp),%rdi
call   1040 <fclose@plt>
jmp    15cc <main+0x42c>
mov    -0x178(%rbp),%rdi
call   10b0 <perror@plt>
mov    -0x178(%rbp),%rdi
mov    -0x7c(%rbp),%eax
mov    %eax,%ecx
mov    -0x14(%rbp),%eax
mov    %rax,-0x1b0(%rbp)
mov    %rcx,%rsi
imul   %rax,%rsi
add    $0xf,%rsi
and    $0xfffffffffffffff0,%rsi
mov    %rsp,%rdx
sub    %rsi,%rdx
mov    %rdx,-0x1a8(%rbp)
mov    %rdx,%rsp
mov    %rcx,-0x90(%rbp)
mov    %rax,-0x98(%rbp)
mov    -0x7c(%rbp),%eax
mov    %eax,%ecx
mov    -0x14(%rbp),%eax
mov    %rax,-0x1a0(%rbp)
mov    %rcx,%rsi
imul   %rax,%rsi
add    $0xf,%rsi
and    $0xfffffffffffffff0,%rsi
mov    %rsp,%rdx
sub    %rsi,%rdx
mov    %rdx,-0x198(%rbp)
mov    %rdx,%rsp
mov    %rcx,-0xa0(%rbp)
mov    %rax,-0xa8(%rbp)
movl   $0x0,-0x7c(%rbp)
lea    0xa57(%rip),%rsi
call   10a0 <fopen@plt>
mov    %rax,-0xb0(%rbp)
cmpq   $0x0,-0xb0(%rbp)
je     18c4 <main+0x724>
jmp    1678 <main+0x4d8>
mov    -0x168(%rbp),%rdi
mov    -0x170(%rbp),%rax
mov    %eax,%esi
mov    -0xb0(%rbp),%rdx
call   1070 <fgets@plt>
cmp    $0x0,%rax
je     18b3 <main+0x713>
mov    -0x168(%rbp),%rdi
call   1050 <strlen@plt>
mov    %eax,%ecx
mov    -0x168(%rbp),%rax
mov    %ecx,-0xb4(%rbp)
mov    -0xb4(%rbp),%ecx
sub    $0x1,%ecx
movslq %ecx,%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0xa,%eax
jne    16e9 <main+0x549>
mov    -0x168(%rbp),%rax
mov    -0xb4(%rbp),%ecx
sub    $0x1,%ecx
movslq %ecx,%rcx
movb   $0x0,(%rax,%rcx,1)
mov    -0x168(%rbp),%rsi
mov    -0x1a8(%rbp),%rdi
mov    -0x1b0(%rbp),%rcx
movslq -0x7c(%rbp),%rax
imul   %rcx,%rax
add    %rax,%rdi
call   1030 <strcpy@plt>
mov    -0x150(%rbp),%rsi
mov    -0x1a0(%rbp),%rcx
mov    -0x198(%rbp),%rdi
movslq -0x7c(%rbp),%rax
imul   %rcx,%rax
add    %rax,%rdi
call   1030 <strcpy@plt>
mov    -0x1a0(%rbp),%rcx
mov    -0x198(%rbp),%rdi
movslq -0x7c(%rbp),%rax
imul   %rcx,%rax
add    %rax,%rdi
lea    0x8d7(%rip),%rsi
call   10c0 <strcat@plt>
mov    -0x158(%rbp),%rsi
mov    -0x1a0(%rbp),%rcx
mov    -0x198(%rbp),%rdi
movslq -0x7c(%rbp),%rax
imul   %rcx,%rax
add    %rax,%rdi
call   10c0 <strcat@plt>
mov    -0x1a0(%rbp),%rcx
mov    -0x198(%rbp),%rdi
movslq -0x7c(%rbp),%rax
imul   %rcx,%rax
add    %rax,%rdi
lea    0x926(%rip),%rsi
call   10c0 <strcat@plt>
mov    -0x160(%rbp),%rsi
mov    -0x1a0(%rbp),%rcx
mov    -0x198(%rbp),%rdi
movslq -0x7c(%rbp),%rax
imul   %rcx,%rax
add    %rax,%rdi
call   10c0 <strcat@plt>
mov    -0x1a0(%rbp),%rcx
mov    -0x198(%rbp),%rdi
movslq -0x7c(%rbp),%rax
imul   %rcx,%rax
add    %rax,%rdi
lea    0x82f(%rip),%rsi
call   10c0 <strcat@plt>
mov    -0x158(%rbp),%rsi
mov    -0x1a0(%rbp),%rcx
mov    -0x198(%rbp),%rdi
movslq -0x7c(%rbp),%rax
imul   %rcx,%rax
add    %rax,%rdi
call   10c0 <strcat@plt>
mov    -0x140(%rbp),%rsi
mov    -0x1a0(%rbp),%rcx
mov    -0x198(%rbp),%rdi
movslq -0x7c(%rbp),%rax
imul   %rcx,%rax
add    %rax,%rdi
call   10c0 <strcat@plt>
mov    -0x1a0(%rbp),%rcx
mov    -0x198(%rbp),%rdi
movslq -0x7c(%rbp),%rax
imul   %rcx,%rax
add    %rax,%rdi
lea    0x85c(%rip),%rsi
call   10c0 <strcat@plt>
mov    -0x168(%rbp),%rsi
mov    -0x1a0(%rbp),%rcx
mov    -0x198(%rbp),%rdi
movslq -0x7c(%rbp),%rax
imul   %rcx,%rax
add    %rax,%rdi
call   10c0 <strcat@plt>
mov    -0x1a0(%rbp),%rcx
mov    -0x198(%rbp),%rdi
movslq -0x7c(%rbp),%rax
imul   %rcx,%rax
add    %rax,%rdi
lea    0x825(%rip),%rsi
call   10c0 <strcat@plt>
mov    -0x7c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x7c(%rbp)
jmp    1678 <main+0x4d8>
mov    -0xb0(%rbp),%rdi
call   1040 <fclose@plt>
jmp    18d0 <main+0x730>
mov    -0x178(%rbp),%rdi
call   10b0 <perror@plt>
movl   $0xf4240,-0xc4(%rbp)
mov    -0xc4(%rbp),%eax
mov    %rax,%rdx
add    $0xf,%rdx
and    $0xfffffffffffffff0,%rdx
mov    %rsp,%rcx
sub    %rdx,%rcx
mov    %rcx,-0x1c0(%rbp)
mov    %rcx,%rsp
mov    %rax,-0xd0(%rbp)
mov    -0xc4(%rbp),%eax
mov    %rax,%rdx
add    $0xf,%rdx
and    $0xfffffffffffffff0,%rdx
mov    %rsp,%rcx
sub    %rdx,%rcx
mov    %rcx,-0x1b8(%rbp)
mov    %rcx,%rsp
mov    %rax,-0xd8(%rbp)
movl   $0x0,-0xdc(%rbp)
movl   $0x0,-0xb8(%rbp)
mov    -0xb8(%rbp),%eax
cmp    -0x7c(%rbp),%eax
jge    1e0b <main+0xc6b>
mov    -0x198(%rbp),%rdi
mov    -0x1a0(%rbp),%rcx
movslq -0xb8(%rbp),%rax
imul   %rcx,%rax
add    %rax,%rdi
lea    0x740(%rip),%rsi
call   10a0 <fopen@plt>
mov    %rax,-0xe8(%rbp)
cmpq   $0x0,-0xe8(%rbp)
je     1a7f <main+0x8df>
mov    -0xc4(%rbp),%eax
mov    %rax,-0x1d0(%rbp)
mov    %rsp,%rcx
mov    %rcx,-0xf0(%rbp)
mov    %rax,%rdx
add    $0xf,%rdx
and    $0xfffffffffffffff0,%rdx
mov    %rsp,%rcx
sub    %rdx,%rcx
mov    %rcx,-0x1c8(%rbp)
mov    %rcx,%rsp
mov    %rax,-0xf8(%rbp)
mov    -0x1c8(%rbp),%rdi
mov    -0x1d0(%rbp),%rax
mov    %eax,%esi
mov    -0xe8(%rbp),%rdx
call   1070 <fgets@plt>
cmp    $0x0,%rax
je     1a70 <main+0x8d0>
mov    -0x1c8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x3e,%eax
je     1a6b <main+0x8cb>
mov    -0x1c8(%rbp),%rdi
call   1050 <strlen@plt>
mov    %eax,%ecx
mov    -0x1c8(%rbp),%rax
mov    %ecx,-0xfc(%rbp)
mov    -0xfc(%rbp),%ecx
sub    $0x1,%ecx
mov    %ecx,-0xfc(%rbp)
movslq -0xfc(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0xa,%eax
jne    1a4c <main+0x8ac>
mov    -0x1c8(%rbp),%rax
movslq -0xfc(%rbp),%rcx
movb   $0x0,(%rax,%rcx,1)
mov    -0x1c8(%rbp),%rsi
mov    -0x1c0(%rbp),%rdi
call   1030 <strcpy@plt>
mov    -0xe8(%rbp),%rdi
call   1040 <fclose@plt>
jmp    19c3 <main+0x823>
mov    -0xf0(%rbp),%rax
mov    %rax,%rsp
jmp    1aa0 <main+0x900>
mov    -0x198(%rbp),%rdi
mov    -0x1a0(%rbp),%rcx
movslq -0xb8(%rbp),%rax
imul   %rcx,%rax
add    %rax,%rdi
call   10b0 <perror@plt>
movl   $0x0,-0xbc(%rbp)
mov    -0xbc(%rbp),%eax
cmp    -0x7c(%rbp),%eax
jge    1df2 <main+0xc52>
mov    -0xb8(%rbp),%eax
cmp    -0xbc(%rbp),%eax
jle    1dd9 <main+0xc39>
mov    -0x198(%rbp),%rdi
mov    -0x1a0(%rbp),%rcx
movslq -0xbc(%rbp),%rax
imul   %rcx,%rax
add    %rax,%rdi
lea    0x5c2(%rip),%rsi
call   10a0 <fopen@plt>
mov    %rax,-0x108(%rbp)
cmpq   $0x0,-0x108(%rbp)
je     1bfd <main+0xa5d>
mov    -0xc4(%rbp),%eax
mov    %rax,-0x1e0(%rbp)
mov    %rsp,%rcx
mov    %rcx,-0x110(%rbp)
mov    %rax,%rdx
add    $0xf,%rdx
and    $0xfffffffffffffff0,%rdx
mov    %rsp,%rcx
sub    %rdx,%rcx
mov    %rcx,-0x1d8(%rbp)
mov    %rcx,%rsp
mov    %rax,-0x118(%rbp)
mov    -0x1d8(%rbp),%rdi
mov    -0x1e0(%rbp),%rax
mov    %eax,%esi
mov    -0x108(%rbp),%rdx
call   1070 <fgets@plt>
cmp    $0x0,%rax
je     1bee <main+0xa4e>
mov    -0x1d8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x3e,%eax
je     1be9 <main+0xa49>
mov    -0x1d8(%rbp),%rdi
call   1050 <strlen@plt>
mov    %eax,%ecx
mov    -0x1d8(%rbp),%rax
mov    %ecx,-0x11c(%rbp)
mov    -0x11c(%rbp),%ecx
sub    $0x1,%ecx
mov    %ecx,-0x11c(%rbp)
movslq -0x11c(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0xa,%eax
jne    1bca <main+0xa2a>
mov    -0x1d8(%rbp),%rax
movslq -0x11c(%rbp),%rcx
movb   $0x0,(%rax,%rcx,1)
mov    -0x1d8(%rbp),%rsi
mov    -0x1b8(%rbp),%rdi
call   1030 <strcpy@plt>
mov    -0x108(%rbp),%rdi
call   1040 <fclose@plt>
jmp    1b41 <main+0x9a1>
mov    -0x110(%rbp),%rax
mov    %rax,%rsp
jmp    1c1e <main+0xa7e>
mov    -0x198(%rbp),%rdi
mov    -0x1a0(%rbp),%rcx
movslq -0xbc(%rbp),%rax
imul   %rcx,%rax
add    %rax,%rdi
call   10b0 <perror@plt>
mov    -0x1c0(%rbp),%rdi
call   1050 <strlen@plt>
mov    %eax,-0x120(%rbp)
movl   $0x0,-0x124(%rbp)
movl   $0x0,-0x128(%rbp)
movl   $0x0,-0xc0(%rbp)
mov    -0xc0(%rbp),%eax
cmp    -0x120(%rbp),%eax
jge    1d03 <main+0xb63>
mov    -0x1c0(%rbp),%rax
movslq -0xc0(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0x4e,%eax
je     1c96 <main+0xaf6>
mov    -0x1b8(%rbp),%rax
movslq -0xc0(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0x4e,%eax
jne    1caa <main+0xb0a>
mov    -0x128(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x128(%rbp)
jmp    1cea <main+0xb4a>
mov    -0x1b8(%rbp),%rcx
mov    -0x1c0(%rbp),%rax
movslq -0xc0(%rbp),%rdx
movsbl (%rax,%rdx,1),%eax
movslq -0xc0(%rbp),%rdx
movsbl (%rcx,%rdx,1),%ecx
cmp    %ecx,%eax
je     1ce5 <main+0xb45>
mov    -0x124(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x124(%rbp)
jmp    1cea <main+0xb4a>
jmp    1cef <main+0xb4f>
mov    -0xc0(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc0(%rbp)
jmp    1c4e <main+0xaae>
mov    -0x120(%rbp),%eax
sub    -0x128(%rbp),%eax
mov    %eax,-0x12c(%rbp)
cvtsi2ssl -0x124(%rbp),%xmm0
ff
cvtsi2ssl -0x12c(%rbp),%xmm1
ff
divss  %xmm1,%xmm0
movss  %xmm0,-0x130(%rbp)
ff
movss  -0x130(%rbp),%xmm0
ff
movss  0x2c3(%rip),%xmm1
mulss  %xmm1,%xmm0
movss  0x2bb(%rip),%xmm1
addss  %xmm1,%xmm0
cvttss2si %xmm0,%edi
call   1090 <log@plt>
mov    -0x1b0(%rbp),%rsi
mov    -0x1a8(%rbp),%rcx
movaps %xmm0,%xmm1
movss  0x28d(%rip),%xmm0
mulss  %xmm1,%xmm0
movss  %xmm0,-0x134(%rbp)
ff
mov    -0x68(%rbp),%rdi
movslq -0xb8(%rbp),%rax
imul   %rsi,%rax
mov    %rcx,%rdx
add    %rax,%rdx
movslq -0xbc(%rbp),%rax
imul   %rsi,%rax
add    %rax,%rcx
mov    -0x124(%rbp),%r8d
mov    -0x12c(%rbp),%r9d
movss  -0x134(%rbp),%xmm0
ff
cvtss2sd %xmm0,%xmm0
lea    0x309(%rip),%rsi
mov    $0x1,%al
call   1080 <fprintf@plt>
mov    -0xdc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xdc(%rbp)
jmp    1dde <main+0xc3e>
mov    -0xbc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xbc(%rbp)
jmp    1aaa <main+0x90a>
jmp    1df7 <main+0xc57>
mov    -0xb8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xb8(%rbp)
jmp    193e <main+0x79e>
mov    -0x160(%rbp),%rsi
lea    0x2c6(%rip),%rdi
call   1060 <printf@plt>
mov    -0x160(%rbp),%rdx
mov    -0x58(%rbp),%rdi
lea    0x2af(%rip),%rsi
mov    $0x0,%al
call   1080 <fprintf@plt>
movl   $0x0,-0x4(%rbp)
mov    -0x20(%rbp),%rax
mov    %rax,%rsp
mov    -0x4(%rbp),%eax
mov    %rbp,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
mov    %rsp,%rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x13f8,%rsp
mov    %rsi,%rbx
mov    0x8(%rsi),%rsi
lea    -0xc40(%rbp),%rdi
call   1030 <strcpy@plt>
mov    0x10(%rbx),%rsi
lea    -0x1420(%rbp),%rdi
call   1030 <strcpy@plt>
mov    0x18(%rbx),%rsi
lea    -0x1030(%rbp),%rdi
call   1030 <strcpy@plt>
mov    0x20(%rbx),%rsi
lea    -0x850(%rbp),%rdi
call   1030 <strcpy@plt>
cmpb   $0x39,-0x850(%rbp)
jne    122e <main+0x7e>
cmpb   $0x35,-0x84f(%rbp)
jne    122e <main+0x7e>
lea    0xed1(%rip),%rsi
lea    -0x460(%rbp),%rdi
call   1030 <strcpy@plt>
jmp    1253 <main+0xa3>
lea    0xdd7(%rip),%rsi
lea    -0x460(%rbp),%rbx
mov    %rbx,%rdi
call   1030 <strcpy@plt>
lea    -0x850(%rbp),%rsi
mov    %rbx,%rdi
call   10c0 <strcat@plt>
lea    -0x3f0(%rsp),%rbx
ff
mov    %rbx,%rsp
lea    -0x1030(%rbp),%r14
mov    %rbx,%rdi
mov    %r14,%rsi
call   1030 <strcpy@plt>
lea    0xda1(%rip),%rsi
mov    %rbx,%rdi
call   10c0 <strcat@plt>
lea    0xe44(%rip),%rsi
mov    %rbx,%rdi
call   10a0 <fopen@plt>
mov    %rax,-0x58(%rbp)
lea    -0x3f0(%rsp),%rbx
ff
mov    %rbx,%rsp
mov    %rbx,%rdi
mov    %r14,%rsi
call   1030 <strcpy@plt>
lea    0xd7b(%rip),%rsi
mov    %rbx,%rdi
call   10c0 <strcat@plt>
lea    -0x1420(%rbp),%r15
mov    %rbx,%rdi
mov    %r15,%rsi
call   10c0 <strcat@plt>
lea    0xdf3(%rip),%r12
mov    %rbx,%rdi
mov    %r12,%rsi
call   10c0 <strcat@plt>
lea    -0xc40(%rbp),%r13
mov    %rbx,%rdi
mov    %r13,%rsi
call   10c0 <strcat@plt>
lea    0xd22(%rip),%rsi
mov    %rbx,%rdi
call   10c0 <strcat@plt>
mov    %rbx,%rdi
mov    %r15,%rsi
call   10c0 <strcat@plt>
lea    -0x460(%rbp),%rsi
mov    %rbx,%rdi
call   10c0 <strcat@plt>
mov    %rbx,%rdi
mov    %r12,%rsi
call   10c0 <strcat@plt>
mov    %rbx,%rdi
mov    %r13,%rsi
call   10c0 <strcat@plt>
lea    0xd02(%rip),%rsi
mov    %rbx,%rdi
call   10c0 <strcat@plt>
lea    0xcfb(%rip),%rsi
mov    %rbx,%rdi
call   10a0 <fopen@plt>
lea    0xcee(%rip),%rdi
mov    $0x2a,%esi
mov    $0x1,%edx
mov    %rax,-0x60(%rbp)
mov    %rax,%rcx
call   10d0 <fwrite@plt>
mov    %rsp,%r15
add    $0xfffffffffffffc10,%r15
mov    %r15,%rsp
mov    %r15,%rdi
mov    %r14,%rsi
call   1030 <strcpy@plt>
lea    0xce4(%rip),%rsi
mov    %r15,%rdi
call   10c0 <strcat@plt>
mov    %r15,%rdi
mov    %r13,%rsi
call   10c0 <strcat@plt>
lea    0xceb(%rip),%rsi
mov    %r15,%rdi
call   10c0 <strcat@plt>
mov    %r15,%rdi
mov    %r12,%rsi
call   10c0 <strcat@plt>
mov    %r15,%rdi
mov    %r13,%rsi
call   10c0 <strcat@plt>
lea    0xcdd(%rip),%rsi
mov    %r15,%rdi
call   10c0 <strcat@plt>
mov    %rsp,%r14
add    $0xfffffffffffffc10,%r14
mov    %r14,%rsp
lea    0xccf(%rip),%rsi
mov    %r15,%rdi
call   10a0 <fopen@plt>
test   %rax,%rax
je     1898 <main+0x6e8>
mov    %rax,%r12
mov    $0xffffffff,%ebx
nopw   0x0(%rax,%rax,1)
mov    %r14,%rdi
mov    $0x3e8,%esi
mov    %r12,%rdx
call   1070 <fgets@plt>
add    $0x1,%ebx
test   %rax,%rax
jne    1400 <main+0x250>
mov    %r12,%rdi
call   1040 <fclose@plt>
mov    %ebx,%eax
imul   $0x3e8,%rax,%rax
mov    %rsp,%rcx
add    $0xf,%rax
and    $0xfffffffffffffff0,%rax
sub    %rax,%rcx
mov    %rcx,-0x40(%rbp)
mov    %rcx,%rsp
mov    %rsp,%rcx
sub    %rax,%rcx
mov    %rcx,-0x38(%rbp)
mov    %rcx,%rsp
lea    0xc5e(%rip),%rsi
mov    %r15,%rdi
call   10a0 <fopen@plt>
test   %rax,%rax
je     18a7 <main+0x6f7>
mov    %r14,%rdi
mov    $0x3e8,%esi
mov    %rax,-0x30(%rbp)
mov    %rax,%rdx
call   1070 <fgets@plt>
xor    %ebx,%ebx
test   %rax,%rax
je     158c <main+0x3dc>
lea    -0x1420(%rbp),%r13
mov    -0x40(%rbp),%r15
mov    -0x38(%rbp),%r12
jmp    156b <main+0x3bb>
cs nopw 0x0(%rax,%rax,1)
mov    %r15,%rdi
mov    %r14,%rsi
call   1030 <strcpy@plt>
mov    %r12,%rdi
lea    -0x1030(%rbp),%rsi
call   1030 <strcpy@plt>
mov    %r12,%rdi
lea    0xb66(%rip),%rsi
call   10c0 <strcat@plt>
mov    %r12,%rdi
mov    %r13,%rsi
call   10c0 <strcat@plt>
mov    %r12,%rdi
lea    0xbe5(%rip),%rsi
call   10c0 <strcat@plt>
mov    %r12,%rdi
lea    -0xc40(%rbp),%rsi
call   10c0 <strcat@plt>
mov    %r12,%rdi
lea    0xb1a(%rip),%rsi
call   10c0 <strcat@plt>
mov    %r12,%rdi
mov    %r13,%rsi
call   10c0 <strcat@plt>
mov    %r12,%rdi
lea    -0x460(%rbp),%rsi
call   10c0 <strcat@plt>
mov    %r12,%rdi
lea    0xb8d(%rip),%rsi
call   10c0 <strcat@plt>
mov    %r12,%rdi
mov    %r14,%rsi
call   10c0 <strcat@plt>
mov    %r12,%rdi
lea    0xb86(%rip),%rsi
call   10c0 <strcat@plt>
mov    %r14,%rdi
mov    $0x3e8,%esi
mov    -0x30(%rbp),%rdx
call   1070 <fgets@plt>
add    $0x3e8,%r12
add    $0x3e8,%r15
add    $0x1,%ebx
test   %rax,%rax
je     158c <main+0x3dc>
mov    %r14,%rdi
call   1050 <strlen@plt>
cltq
cmpb   $0xa,-0x1(%rax,%r14,1)
jne    14a0 <main+0x2f0>
movb   $0x0,-0x1(%r14,%rax,1)
jmp    14a0 <main+0x2f0>
mov    -0x30(%rbp),%rdi
call   1040 <fclose@plt>
mov    %rsp,%r13
add    $0xfffffffffff0bdc0,%r13
mov    %r13,%rsp
mov    %rsp,%r12
add    $0xfffffffffff0bdc0,%r12
mov    %r12,%rsp
test   %ebx,%ebx
je     18af <main+0x6ff>
mov    %ebx,%eax
mov    %rax,-0x30(%rbp)
xor    %eax,%eax
jmp    15de <main+0x42e>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
add    $0x1,%rax
cmp    -0x30(%rbp),%rax
je     18af <main+0x6ff>
mov    %rax,-0x48(%rbp)
imul   $0x3e8,%rax,%rcx
mov    -0x38(%rbp),%rax
mov    %rcx,-0x50(%rbp)
lea    (%rax,%rcx,1),%rbx
mov    %rbx,%rdi
lea    0xab1(%rip),%rsi
call   10a0 <fopen@plt>
test   %rax,%rax
je     188b <main+0x6db>
mov    %rax,%r14
mov    %rsp,%r15
mov    %rsp,%rbx
add    $0xfffffffffff0bdc0,%rbx
mov    %rbx,%rsp
jmp    1643 <main+0x493>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
mov    %r13,%rdi
mov    %rbx,%rsi
call   1030 <strcpy@plt>
mov    %r14,%rdi
call   1040 <fclose@plt>
mov    %rbx,%rdi
mov    $0xf4240,%esi
mov    %r14,%rdx
call   1070 <fgets@plt>
test   %rax,%rax
je     1680 <main+0x4d0>
cmpb   $0x3e,(%rbx)
je     1643 <main+0x493>
mov    %rbx,%rdi
call   1050 <strlen@plt>
cltq
cmpb   $0xa,-0x1(%rax,%rbx,1)
jne    1630 <main+0x480>
movb   $0x0,-0x1(%rbx,%rax,1)
jmp    1630 <main+0x480>
cs nopw 0x0(%rax,%rax,1)
nop
mov    %r15,%rsp
mov    -0x48(%rbp),%rax
mov    -0x50(%rbp),%rcx
add    -0x40(%rbp),%rcx
mov    %rcx,-0x50(%rbp)
xor    %r15d,%r15d
jmp    170f <main+0x55f>
xor    %r14d,%r14d
xor    %esi,%esi
sub    %esi,%eax
xorps  %xmm0,%xmm0
cvtsi2ss %r14d,%xmm0
xorps  %xmm1,%xmm1
cvtsi2ss %eax,%xmm1
divss  %xmm1,%xmm0
mulss  0x946(%rip),%xmm0
addss  0x942(%rip),%xmm0
cvttss2si %xmm0,%edi
mov    %eax,%ebx
call   1090 <log@plt>
mulss  0x933(%rip),%xmm0
mov    -0x70(%rbp),%rcx
add    -0x40(%rbp),%rcx
cvtss2sd %xmm0,%xmm0
mov    -0x60(%rbp),%rdi
lea    0x9e0(%rip),%rsi
mov    -0x50(%rbp),%rdx
mov    %r14d,%r8d
mov    %ebx,%r9d
mov    $0x1,%al
call   1080 <fprintf@plt>
mov    -0x48(%rbp),%rax
add    $0x1,%r15
cmp    -0x30(%rbp),%r15
je     15d0 <main+0x420>
cmp    %r15,%rax
jbe    1701 <main+0x551>
imul   $0x3e8,%r15,%rcx
mov    -0x38(%rbp),%rax
mov    %rcx,-0x70(%rbp)
lea    (%rax,%rcx,1),%rbx
mov    %rbx,%rdi
lea    0x97f(%rip),%rsi
call   10a0 <fopen@plt>
test   %rax,%rax
je     187e <main+0x6ce>
mov    %rax,%r14
mov    %rsp,-0x68(%rbp)
mov    %rsp,%rbx
add    $0xfffffffffff0bdc0,%rbx
mov    %rbx,%rsp
jmp    1773 <main+0x5c3>
cs nopw 0x0(%rax,%rax,1)
nop
mov    %r12,%rdi
mov    %rbx,%rsi
call   1030 <strcpy@plt>
mov    %r14,%rdi
call   1040 <fclose@plt>
mov    %rbx,%rdi
mov    $0xf4240,%esi
mov    %r14,%rdx
call   1070 <fgets@plt>
test   %rax,%rax
je     17b0 <main+0x600>
cmpb   $0x3e,(%rbx)
je     1773 <main+0x5c3>
mov    %rbx,%rdi
call   1050 <strlen@plt>
cltq
cmpb   $0xa,-0x1(%rax,%rbx,1)
jne    1760 <main+0x5b0>
movb   $0x0,-0x1(%rbx,%rax,1)
jmp    1760 <main+0x5b0>
cs nopw 0x0(%rax,%rax,1)
nop
mov    -0x68(%rbp),%rsp
mov    %r13,%rdi
call   1050 <strlen@plt>
test   %eax,%eax
jle    1698 <main+0x4e8>
mov    %eax,%r8d
cmp    $0x1,%eax
jne    17f8 <main+0x648>
xor    %ecx,%ecx
xor    %esi,%esi
xor    %r14d,%r14d
test   $0x1,%r8b
je     169d <main+0x4ed>
mov    0x0(%r13,%rcx,1),%dl
cmp    $0x4e,%dl
je     17f0 <main+0x640>
mov    (%r12,%rcx,1),%cl
cmp    $0x4e,%cl
jne    186e <main+0x6be>
add    $0x1,%esi
jmp    169d <main+0x4ed>
mov    %r8d,%r9d
and    $0xfffffffe,%r9d
xor    %ecx,%ecx
xor    %esi,%esi
xor    %r14d,%r14d
jmp    181c <main+0x66c>
nopl   0x0(%rax,%rax,1)
add    $0x1,%esi
add    $0x2,%rcx
cmp    %rcx,%r9
je     17d3 <main+0x623>
movzbl 0x0(%r13,%rcx,1),%edx
cmp    $0x4e,%dl
je     1831 <main+0x681>
movzbl (%r12,%rcx,1),%ebx
cmp    $0x4e,%bl
jne    1840 <main+0x690>
add    $0x1,%esi
jmp    184b <main+0x69b>
cs nopw 0x0(%rax,%rax,1)
xor    %edi,%edi
cmp    %bl,%dl
setne  %dil
add    %edi,%r14d
movzbl 0x1(%r13,%rcx,1),%edx
cmp    $0x4e,%dl
je     1810 <main+0x660>
movzbl 0x1(%r12,%rcx,1),%ebx
cmp    $0x4e,%bl
je     1810 <main+0x660>
xor    %edi,%edi
cmp    %bl,%dl
setne  %dil
add    %edi,%r14d
jmp    1813 <main+0x663>
xor    %edi,%edi
cmp    %cl,%dl
setne  %dil
add    %edi,%r14d
jmp    169d <main+0x4ed>
mov    %rbx,%rdi
call   10b0 <perror@plt>
jmp    17b4 <main+0x604>
mov    %rbx,%rdi
call   10b0 <perror@plt>
jmp    1683 <main+0x4d3>
mov    %r15,%rdi
call   10b0 <perror@plt>
xor    %ebx,%ebx
jmp    1420 <main+0x270>
mov    %r15,%rdi
call   10b0 <perror@plt>
lea    0x829(%rip),%rbx
lea    -0xc40(%rbp),%r14
mov    %rbx,%rdi
mov    %r14,%rsi
call   1060 <printf@plt>
mov    -0x58(%rbp),%rdi
mov    %rbx,%rsi
mov    %r14,%rdx
xor    %eax,%eax
call   1080 <fprintf@plt>
xor    %eax,%eax
lea    -0x28(%rbp),%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [1 x i8] zeroinitializer
@.str.1 = [12 x i8] c"/threshold_\00"
@.str.2 = [18 x i8] c"/Analysis/log.txt\00"
@.str.3 = [2 x i8] c"a\00"
@.str.4 = [11 x i8] c"/Analysis/\00"
@.str.5 = [2 x i8] c"/\00"
@.str.6 = [2 x i8] c"_\00"
@.str.7 = [8 x i8] c"_di.csv\00"
@.str.8 = [2 x i8] c"w\00"
@.str.9 = [43 x i8] c"Isolate_1,Isolate_2,SNPs,Sites,Divergence\0A\00"
@.str.10 = [33 x i8] c"/Analysis/Core_genome_alignment/\00"
@.str.11 = [23 x i8] c"_Core_genome_alignment\00"
@.str.12 = [14 x i8] c"_isolates.txt\00"
@.str.13 = [2 x i8] c"r\00"
@.str.14 = [19 x i8] c"/Intergenic_files/\00"
@.str.15 = [7 x i8] c".fasta\00"
@.str.16 = [19 x i8] c"%s,%s,%i,%i,%0.6f\0A\00"
@.str.17 = [19 x i8] c"%s di calculated.\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
%7 = alloca i8*
%8 = alloca i64
%9 = alloca i64
%10 = alloca i64
%11 = alloca i64
%12 = alloca i64
%13 = alloca i64
%14 = alloca i32*
%15 = alloca i64
%16 = alloca i32*
%17 = alloca i64
%18 = alloca i64
%19 = alloca i32
%20 = alloca i32*
%21 = alloca i64
%22 = alloca i64
%23 = alloca i64
%24 = alloca i64
%25 = alloca i32*
%26 = alloca i32
%27 = alloca i32
%28 = alloca i32
%29 = alloca i32
%30 = alloca i32
%31 = alloca i64
%32 = alloca i64
%33 = alloca i32
%34 = alloca i32*
%35 = alloca i8*
%36 = alloca i64
%37 = alloca i32
%38 = alloca i32*
%39 = alloca i8*
%40 = alloca i64
%41 = alloca i32
%42 = alloca i32
%43 = alloca i32
%44 = alloca i32
%45 = alloca i32
%46 = alloca float
%47 = alloca float
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i32 1000, i32* %6
%48 = load i32, i32* %6
%49 = zext i32 %48 to i64
%50 = call i8* @llvm.stacksave()
store i8* %50, i8** %7
%51 = alloca i8, i64 %49
store i64 %49, i64* %8
%52 = load i8**, i8*** %5
%53 = getelementptr inbounds i8*, i8** %52, i64 1
%54 = load i8*, i8** %53
%55 = call i32 @strcpy(i8* %51, i8* %54)
%56 = load i32, i32* %6
%57 = zext i32 %56 to i64
%58 = alloca i8, i64 %57
store i64 %57, i64* %9
%59 = load i8**, i8*** %5
%60 = getelementptr inbounds i8*, i8** %59, i64 2
%61 = load i8*, i8** %60
%62 = call i32 @strcpy(i8* %58, i8* %61)
%63 = load i32, i32* %6
%64 = zext i32 %63 to i64
%65 = alloca i8, i64 %64
store i64 %64, i64* %10
%66 = load i8**, i8*** %5
%67 = getelementptr inbounds i8*, i8** %66, i64 3
%68 = load i8*, i8** %67
%69 = call i32 @strcpy(i8* %65, i8* %68)
%70 = load i32, i32* %6
%71 = zext i32 %70 to i64
%72 = alloca i8, i64 %71
store i64 %71, i64* %11
%73 = load i8**, i8*** %5
%74 = getelementptr inbounds i8*, i8** %73, i64 4
%75 = load i8*, i8** %74
%76 = call i32 @strcpy(i8* %72, i8* %75)
%77 = load i32, i32* %6
%78 = zext i32 %77 to i64
%79 = alloca i8, i64 %78
store i64 %78, i64* %12
%80 = getelementptr inbounds i8, i8* %72, i64 0
%81 = load i8, i8* %80
%82 = sext i8 %81 to i32
%83 = icmp eq i32 %82, 57
br i1 %83, label %84, label %91
84: ; preds = %2
%85 = getelementptr inbounds i8, i8* %72, i64 1
%86 = load i8, i8* %85
%87 = sext i8 %86 to i32
%88 = icmp eq i32 %87, 53
br i1 %88, label %89, label %91
89: ; preds = %84
%90 = call i32 @strcpy(i8* %79, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0))
br label %94
91: ; preds = %84, %2
%92 = call i32 @strcpy(i8* %79, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.1, i64 0, i64 0))
%93 = call i32 @strcat(i8* %79, i8* %72)
br label %94
94: ; preds = %91, %89
%95 = load i32, i32* %6
%96 = zext i32 %95 to i64
%97 = alloca i8, i64 %96
store i64 %96, i64* %13
%98 = call i32 @strcpy(i8* %97, i8* %65)
%99 = call i32 @strcat(i8* %97, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.2, i64 0, i64 0))
%100 = call i32* @fopen(i8* %97, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.3, i64 0, i64 0))
store i32* %100, i32** %14
%101 = load i32, i32* %6
%102 = zext i32 %101 to i64
%103 = alloca i8, i64 %102
store i64 %102, i64* %15
%104 = call i32 @strcpy(i8* %103, i8* %65)
%105 = call i32 @strcat(i8* %103, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.4, i64 0, i64 0))
%106 = call i32 @strcat(i8* %103, i8* %58)
%107 = call i32 @strcat(i8* %103, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.5, i64 0, i64 0))
%108 = call i32 @strcat(i8* %103, i8* %51)
%109 = call i32 @strcat(i8* %103, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.6, i64 0, i64 0))
%110 = call i32 @strcat(i8* %103, i8* %58)
%111 = call i32 @strcat(i8* %103, i8* %79)
%112 = call i32 @strcat(i8* %103, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.5, i64 0, i64 0))
%113 = call i32 @strcat(i8* %103, i8* %51)
%114 = call i32 @strcat(i8* %103, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.7, i64 0, i64 0))
%115 = call i32* @fopen(i8* %103, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.8, i64 0, i64 0))
store i32* %115, i32** %16
%116 = load i32*, i32** %16
%117 = call i32 (i32*, i8*, ...) @fprintf(i32* %116, i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str.9, i64 0, i64 0))
%118 = load i32, i32* %6
%119 = zext i32 %118 to i64
%120 = alloca i8, i64 %119
store i64 %119, i64* %17
%121 = call i32 @strcpy(i8* %120, i8* %65)
%122 = call i32 @strcat(i8* %120, i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.10, i64 0, i64 0))
%123 = call i32 @strcat(i8* %120, i8* %51)
%124 = call i32 @strcat(i8* %120, i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.11, i64 0, i64 0))
%125 = call i32 @strcat(i8* %120, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.5, i64 0, i64 0))
%126 = call i32 @strcat(i8* %120, i8* %51)
%127 = call i32 @strcat(i8* %120, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.12, i64 0, i64 0))
%128 = load i32, i32* %6
%129 = zext i32 %128 to i64
%130 = alloca i8, i64 %129
store i64 %129, i64* %18
store i32 0, i32* %19
%131 = call i32* @fopen(i8* %120, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.13, i64 0, i64 0))
store i32* %131, i32** %20
%132 = load i32*, i32** %20
%133 = icmp ne i32* %132, null
br i1 %133, label %134, label %146
134: ; preds = %94
br label %135
135: ; preds = %140, %134
%136 = trunc i64 %129 to i32
%137 = load i32*, i32** %20
%138 = call i32* @fgets(i8* %130, i32 %136, i32* %137)
%139 = icmp ne i32* %138, null
br i1 %139, label %140, label %143
140: ; preds = %135
%141 = load i32, i32* %19
%142 = add nsw i32 %141, 1
store i32 %142, i32* %19
br label %135
143: ; preds = %135
%144 = load i32*, i32** %20
%145 = call i32 @fclose(i32* %144)
br label %148
146: ; preds = %94
%147 = call i32 @perror(i8* %120)
br label %148
148: ; preds = %146, %143
%149 = load i32, i32* %19
%150 = zext i32 %149 to i64
%151 = load i32, i32* %6
%152 = zext i32 %151 to i64
%153 = mul nuw i64 %150, %152
%154 = alloca i8, i64 %153
store i64 %150, i64* %21
store i64 %152, i64* %22
%155 = load i32, i32* %19
%156 = zext i32 %155 to i64
%157 = load i32, i32* %6
%158 = zext i32 %157 to i64
%159 = mul nuw i64 %156, %158
%160 = alloca i8, i64 %159
store i64 %156, i64* %23
store i64 %158, i64* %24
store i32 0, i32* %19
%161 = call i32* @fopen(i8* %120, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.13, i64 0, i64 0))
store i32* %161, i32** %25
%162 = load i32*, i32** %25
%163 = icmp ne i32* %162, null
br i1 %163, label %164, label %250
164: ; preds = %148
br label %165
165: ; preds = %184, %164
%166 = trunc i64 %129 to i32
%167 = load i32*, i32** %25
%168 = call i32* @fgets(i8* %130, i32 %166, i32* %167)
%169 = icmp ne i32* %168, null
br i1 %169, label %170, label %247
170: ; preds = %165
%171 = call i32 @strlen(i8* %130)
store i32 %171, i32* %26
%172 = load i32, i32* %26
%173 = sub nsw i32 %172, 1
%174 = sext i32 %173 to i64
%175 = getelementptr inbounds i8, i8* %130, i64 %174
%176 = load i8, i8* %175
%177 = sext i8 %176 to i32
%178 = icmp eq i32 %177, 10
br i1 %178, label %179, label %184
179: ; preds = %170
%180 = load i32, i32* %26
%181 = sub nsw i32 %180, 1
%182 = sext i32 %181 to i64
%183 = getelementptr inbounds i8, i8* %130, i64 %182
store i8 0, i8* %183
br label %184
184: ; preds = %179, %170
%185 = load i32, i32* %19
%186 = sext i32 %185 to i64
%187 = mul nsw i64 %186, %152
%188 = getelementptr inbounds i8, i8* %154, i64 %187
%189 = call i32 @strcpy(i8* %188, i8* %130)
%190 = load i32, i32* %19
%191 = sext i32 %190 to i64
%192 = mul nsw i64 %191, %158
%193 = getelementptr inbounds i8, i8* %160, i64 %192
%194 = call i32 @strcpy(i8* %193, i8* %65)
%195 = load i32, i32* %19
%196 = sext i32 %195 to i64
%197 = mul nsw i64 %196, %158
%198 = getelementptr inbounds i8, i8* %160, i64 %197
%199 = call i32 @strcat(i8* %198, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.4, i64 0, i64 0))
%200 = load i32, i32* %19
%201 = sext i32 %200 to i64
%202 = mul nsw i64 %201, %158
%203 = getelementptr inbounds i8, i8* %160, i64 %202
%204 = call i32 @strcat(i8* %203, i8* %58)
%205 = load i32, i32* %19
%206 = sext i32 %205 to i64
%207 = mul nsw i64 %206, %158
%208 = getelementptr inbounds i8, i8* %160, i64 %207
%209 = call i32 @strcat(i8* %208, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.5, i64 0, i64 0))
%210 = load i32, i32* %19
%211 = sext i32 %210 to i64
%212 = mul nsw i64 %211, %158
%213 = getelementptr inbounds i8, i8* %160, i64 %212
%214 = call i32 @strcat(i8* %213, i8* %51)
%215 = load i32, i32* %19
%216 = sext i32 %215 to i64
%217 = mul nsw i64 %216, %158
%218 = getelementptr inbounds i8, i8* %160, i64 %217
%219 = call i32 @strcat(i8* %218, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.6, i64 0, i64 0))
%220 = load i32, i32* %19
%221 = sext i32 %220 to i64
%222 = mul nsw i64 %221, %158
%223 = getelementptr inbounds i8, i8* %160, i64 %222
%224 = call i32 @strcat(i8* %223, i8* %58)
%225 = load i32, i32* %19
%226 = sext i32 %225 to i64
%227 = mul nsw i64 %226, %158
%228 = getelementptr inbounds i8, i8* %160, i64 %227
%229 = call i32 @strcat(i8* %228, i8* %79)
%230 = load i32, i32* %19
%231 = sext i32 %230 to i64
%232 = mul nsw i64 %231, %158
%233 = getelementptr inbounds i8, i8* %160, i64 %232
%234 = call i32 @strcat(i8* %233, i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.14, i64 0, i64 0))
%235 = load i32, i32* %19
%236 = sext i32 %235 to i64
%237 = mul nsw i64 %236, %158
%238 = getelementptr inbounds i8, i8* %160, i64 %237
%239 = call i32 @strcat(i8* %238, i8* %130)
%240 = load i32, i32* %19
%241 = sext i32 %240 to i64
%242 = mul nsw i64 %241, %158
%243 = getelementptr inbounds i8, i8* %160, i64 %242
%244 = call i32 @strcat(i8* %243, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.15, i64 0, i64 0))
%245 = load i32, i32* %19
%246 = add nsw i32 %245, 1
store i32 %246, i32* %19
br label %165
247: ; preds = %165
%248 = load i32*, i32** %25
%249 = call i32 @fclose(i32* %248)
br label %252
250: ; preds = %148
%251 = call i32 @perror(i8* %120)
br label %252
252: ; preds = %250, %247
store i32 1000000, i32* %30
%253 = load i32, i32* %30
%254 = zext i32 %253 to i64
%255 = alloca i8, i64 %254
store i64 %254, i64* %31
%256 = load i32, i32* %30
%257 = zext i32 %256 to i64
%258 = alloca i8, i64 %257
store i64 %257, i64* %32
store i32 0, i32* %33
store i32 0, i32* %27
br label %259
259: ; preds = %450, %252
%260 = load i32, i32* %27
%261 = load i32, i32* %19
%262 = icmp slt i32 %260, %261
br i1 %262, label %263, label %453
263: ; preds = %259
%264 = load i32, i32* %27
%265 = sext i32 %264 to i64
%266 = mul nsw i64 %265, %158
%267 = getelementptr inbounds i8, i8* %160, i64 %266
%268 = call i32* @fopen(i8* %267, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.13, i64 0, i64 0))
store i32* %268, i32** %34
%269 = load i32*, i32** %34
%270 = icmp ne i32* %269, null
br i1 %270, label %271, label %307
271: ; preds = %263
%272 = load i32, i32* %30
%273 = zext i32 %272 to i64
%274 = call i8* @llvm.stacksave()
store i8* %274, i8** %35
%275 = alloca i8, i64 %273
store i64 %273, i64* %36
br label %276
276: ; preds = %304, %271
%277 = trunc i64 %273 to i32
%278 = load i32*, i32** %34
%279 = call i32* @fgets(i8* %275, i32 %277, i32* %278)
%280 = icmp ne i32* %279, null
br i1 %280, label %281, label %305
281: ; preds = %276
%282 = getelementptr inbounds i8, i8* %275, i64 0
%283 = load i8, i8* %282
%284 = sext i8 %283 to i32
%285 = icmp ne i32 %284, 62
br i1 %285, label %286, label %304
286: ; preds = %281
%287 = call i32 @strlen(i8* %275)
store i32 %287, i32* %37
%288 = load i32, i32* %37
%289 = sub nsw i32 %288, 1
store i32 %289, i32* %37
%290 = load i32, i32* %37
%291 = sext i32 %290 to i64
%292 = getelementptr inbounds i8, i8* %275, i64 %291
%293 = load i8, i8* %292
%294 = sext i8 %293 to i32
%295 = icmp eq i32 %294, 10
br i1 %295, label %296, label %300
296: ; preds = %286
%297 = load i32, i32* %37
%298 = sext i32 %297 to i64
%299 = getelementptr inbounds i8, i8* %275, i64 %298
store i8 0, i8* %299
br label %300
300: ; preds = %296, %286
%301 = call i32 @strcpy(i8* %255, i8* %275)
%302 = load i32*, i32** %34
%303 = call i32 @fclose(i32* %302)
br label %304
304: ; preds = %300, %281
br label %276
305: ; preds = %276
%306 = load i8*, i8** %35
br label %313
307: ; preds = %263
%308 = load i32, i32* %27
%309 = sext i32 %308 to i64
%310 = mul nsw i64 %309, %158
%311 = getelementptr inbounds i8, i8* %160, i64 %310
%312 = call i32 @perror(i8* %311)
br label %313
313: ; preds = %307, %305
store i32 0, i32* %28
br label %314
314: ; preds = %446, %313
%315 = load i32, i32* %28
%316 = load i32, i32* %19
%317 = icmp slt i32 %315, %316
br i1 %317, label %318, label %449
318: ; preds = %314
%319 = load i32, i32* %27
%320 = load i32, i32* %28
%321 = icmp sgt i32 %319, %320
br i1 %321, label %322, label %445
322: ; preds = %318
%323 = load i32, i32* %28
%324 = sext i32 %323 to i64
%325 = mul nsw i64 %324, %158
%326 = getelementptr inbounds i8, i8* %160, i64 %325
%327 = call i32* @fopen(i8* %326, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.13, i64 0, i64 0))
store i32* %327, i32** %38
%328 = load i32*, i32** %38
%329 = icmp ne i32* %328, null
br i1 %329, label %330, label %366
330: ; preds = %322
%331 = load i32, i32* %30
%332 = zext i32 %331 to i64
%333 = call i8* @llvm.stacksave()
store i8* %333, i8** %39
%334 = alloca i8, i64 %332
store i64 %332, i64* %40
br label %335
335: ; preds = %363, %330
%336 = trunc i64 %332 to i32
%337 = load i32*, i32** %38
%338 = call i32* @fgets(i8* %334, i32 %336, i32* %337)
%339 = icmp ne i32* %338, null
br i1 %339, label %340, label %364
340: ; preds = %335
%341 = getelementptr inbounds i8, i8* %334, i64 0
%342 = load i8, i8* %341
%343 = sext i8 %342 to i32
%344 = icmp ne i32 %343, 62
br i1 %344, label %345, label %363
345: ; preds = %340
%346 = call i32 @strlen(i8* %334)
store i32 %346, i32* %41
%347 = load i32, i32* %41
%348 = sub nsw i32 %347, 1
store i32 %348, i32* %41
%349 = load i32, i32* %41
%350 = sext i32 %349 to i64
%351 = getelementptr inbounds i8, i8* %334, i64 %350
%352 = load i8, i8* %351
%353 = sext i8 %352 to i32
%354 = icmp eq i32 %353, 10
br i1 %354, label %355, label %359
355: ; preds = %345
%356 = load i32, i32* %41
%357 = sext i32 %356 to i64
%358 = getelementptr inbounds i8, i8* %334, i64 %357
store i8 0, i8* %358
br label %359
359: ; preds = %355, %345
%360 = call i32 @strcpy(i8* %258, i8* %334)
%361 = load i32*, i32** %38
%362 = call i32 @fclose(i32* %361)
br label %363
363: ; preds = %359, %340
br label %335
364: ; preds = %335
%365 = load i8*, i8** %39
br label %372
366: ; preds = %322
%367 = load i32, i32* %28
%368 = sext i32 %367 to i64
%369 = mul nsw i64 %368, %158
%370 = getelementptr inbounds i8, i8* %160, i64 %369
%371 = call i32 @perror(i8* %370)
br label %372
372: ; preds = %366, %364
%373 = call i32 @strlen(i8* %255)
store i32 %373, i32* %42
store i32 0, i32* %43
store i32 0, i32* %44
store i32 0, i32* %29
br label %374
374: ; preds = %412, %372
%375 = load i32, i32* %29
%376 = load i32, i32* %42
%377 = icmp slt i32 %375, %376
br i1 %377, label %378, label %415
378: ; preds = %374
%379 = load i32, i32* %29
%380 = sext i32 %379 to i64
%381 = getelementptr inbounds i8, i8* %255, i64 %380
%382 = load i8, i8* %381
%383 = sext i8 %382 to i32
%384 = icmp eq i32 %383, 78
br i1 %384, label %392, label %385
385: ; preds = %378
%386 = load i32, i32* %29
%387 = sext i32 %386 to i64
%388 = getelementptr inbounds i8, i8* %258, i64 %387
%389 = load i8, i8* %388
%390 = sext i8 %389 to i32
%391 = icmp eq i32 %390, 78
br i1 %391, label %392, label %395
392: ; preds = %385, %378
%393 = load i32, i32* %44
%394 = add nsw i32 %393, 1
store i32 %394, i32* %44
br label %411
395: ; preds = %385
%396 = load i32, i32* %29
%397 = sext i32 %396 to i64
%398 = getelementptr inbounds i8, i8* %255, i64 %397
%399 = load i8, i8* %398
%400 = sext i8 %399 to i32
%401 = load i32, i32* %29
%402 = sext i32 %401 to i64
%403 = getelementptr inbounds i8, i8* %258, i64 %402
%404 = load i8, i8* %403
%405 = sext i8 %404 to i32
%406 = icmp ne i32 %400, %405
br i1 %406, label %407, label %410
407: ; preds = %395
%408 = load i32, i32* %43
%409 = add nsw i32 %408, 1
store i32 %409, i32* %43
br label %410
410: ; preds = %407, %395
br label %411
411: ; preds = %410, %392
br label %412
412: ; preds = %411
%413 = load i32, i32* %29
%414 = add nsw i32 %413, 1
store i32 %414, i32* %29
br label %374
415: ; preds = %374
%416 = load i32, i32* %42
%417 = load i32, i32* %44
%418 = sub nsw i32 %416, %417
store i32 %418, i32* %45
%419 = load i32, i32* %43
%420 = sitofp i32 %419 to float
%421 = load i32, i32* %45
%422 = sitofp i32 %421 to float
%423 = fdiv float %420, %422
store float %423, float* %46
%424 = load float, float* %46
%425 = call float @llvm.fmuladd.f32(float 0xBFF5555560000000, float %424, float 1.000000e+00)
%426 = fptosi float %425 to i32
%427 = call float @log(i32 %426)
%428 = fmul float -7.500000e-01, %427
store float %428, float* %47
%429 = load i32*, i32** %16
%430 = load i32, i32* %27
%431 = sext i32 %430 to i64
%432 = mul nsw i64 %431, %152
%433 = getelementptr inbounds i8, i8* %154, i64 %432
%434 = load i32, i32* %28
%435 = sext i32 %434 to i64
%436 = mul nsw i64 %435, %152
%437 = getelementptr inbounds i8, i8* %154, i64 %436
%438 = load i32, i32* %43
%439 = load i32, i32* %45
%440 = load float, float* %47
%441 = fpext float %440 to double
%442 = call i32 (i32*, i8*, ...) @fprintf(i32* %429, i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.16, i64 0, i64 0), i8* %433, i8* %437, i32 %438, i32 %439, double %441)
%443 = load i32, i32* %33
%444 = add nsw i32 %443, 1
store i32 %444, i32* %33
br label %445
445: ; preds = %415, %318
br label %446
446: ; preds = %445
%447 = load i32, i32* %28
%448 = add nsw i32 %447, 1
store i32 %448, i32* %28
br label %314
449: ; preds = %314
br label %450
450: ; preds = %449
%451 = load i32, i32* %27
%452 = add nsw i32 %451, 1
store i32 %452, i32* %27
br label %259
453: ; preds = %259
%454 = call i32 @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.17, i64 0, i64 0), i8* %51)
%455 = load i32*, i32** %14
%456 = call i32 (i32*, i8*, ...) @fprintf(i32* %455, i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.17, i64 0, i64 0), i8* %51)
store i32 0, i32* %3
%457 = load i8*, i8** %7
%458 = load i32, i32* %3
ret i32 %458
}

LLVM IR (-O2):
@.str = [1 x i8] zeroinitializer
@.str.1 = [12 x i8] c"/threshold_\00"
@.str.2 = [18 x i8] c"/Analysis/log.txt\00"
@.str.3 = [2 x i8] c"a\00"
@.str.4 = [11 x i8] c"/Analysis/\00"
@.str.5 = [2 x i8] c"/\00"
@.str.6 = [2 x i8] c"_\00"
@.str.7 = [8 x i8] c"_di.csv\00"
@.str.8 = [2 x i8] c"w\00"
@.str.9 = [43 x i8] c"Isolate_1,Isolate_2,SNPs,Sites,Divergence\0A\00"
@.str.10 = [33 x i8] c"/Analysis/Core_genome_alignment/\00"
@.str.11 = [23 x i8] c"_Core_genome_alignment\00"
@.str.12 = [14 x i8] c"_isolates.txt\00"
@.str.13 = [2 x i8] c"r\00"
@.str.14 = [19 x i8] c"/Intergenic_files/\00"
@.str.15 = [7 x i8] c".fasta\00"
@.str.16 = [19 x i8] c"%s,%s,%i,%i,%0.6f\0A\00"
@.str.17 = [19 x i8] c"%s di calculated.\0A\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = alloca [1000 x i8]
%4 = getelementptr inbounds [1000 x i8], [1000 x i8]* %3, i64 0, i64 0
%5 = getelementptr inbounds i8*, i8** %1, i64 1
%6 = load i8*, i8** %5
%7 = call i32 @strcpy(i8* %4, i8* %6)
%8 = alloca [1000 x i8]
%9 = getelementptr inbounds [1000 x i8], [1000 x i8]* %8, i64 0, i64 0
%10 = getelementptr inbounds i8*, i8** %1, i64 2
%11 = load i8*, i8** %10
%12 = call i32 @strcpy(i8* %9, i8* %11)
%13 = alloca [1000 x i8]
%14 = getelementptr inbounds [1000 x i8], [1000 x i8]* %13, i64 0, i64 0
%15 = getelementptr inbounds i8*, i8** %1, i64 3
%16 = load i8*, i8** %15
%17 = call i32 @strcpy(i8* %14, i8* %16)
%18 = alloca [1000 x i8]
%19 = getelementptr inbounds [1000 x i8], [1000 x i8]* %18, i64 0, i64 0
%20 = getelementptr inbounds i8*, i8** %1, i64 4
%21 = load i8*, i8** %20
%22 = call i32 @strcpy(i8* %19, i8* %21)
%23 = alloca [1000 x i8]
%24 = getelementptr inbounds [1000 x i8], [1000 x i8]* %23, i64 0, i64 0
%25 = load i8, i8* %19
%26 = icmp eq i8 %25, 57
%27 = getelementptr inbounds [1000 x i8], [1000 x i8]* %18, i64 0, i64 1
%28 = load i8, i8* %27
%29 = icmp eq i8 %28, 53
%30 = select i1 %26, i1 %29, i1 false
br i1 %30, label %31, label %33
31: ; preds = %2
%32 = call i32 @strcpy(i8* %24, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0))
br label %36
33: ; preds = %2
%34 = call i32 @strcpy(i8* %24, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.1, i64 0, i64 0))
%35 = call i32 @strcat(i8* %24, i8* %19)
br label %36
36: ; preds = %33, %31
%37 = alloca [1000 x i8]
%38 = getelementptr inbounds [1000 x i8], [1000 x i8]* %37, i64 0, i64 0
%39 = call i32 @strcpy(i8* %38, i8* %14)
%40 = call i32 @strcat(i8* %38, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.2, i64 0, i64 0))
%41 = call i32* @fopen(i8* %38, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.3, i64 0, i64 0))
%42 = alloca [1000 x i8]
%43 = getelementptr inbounds [1000 x i8], [1000 x i8]* %42, i64 0, i64 0
%44 = call i32 @strcpy(i8* %43, i8* %14)
%45 = call i32 @strcat(i8* %43, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.4, i64 0, i64 0))
%46 = call i32 @strcat(i8* %43, i8* %9)
%47 = call i32 @strcat(i8* %43, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.5, i64 0, i64 0))
%48 = call i32 @strcat(i8* %43, i8* %4)
%49 = call i32 @strcat(i8* %43, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.6, i64 0, i64 0))
%50 = call i32 @strcat(i8* %43, i8* %9)
%51 = call i32 @strcat(i8* %43, i8* %24)
%52 = call i32 @strcat(i8* %43, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.5, i64 0, i64 0))
%53 = call i32 @strcat(i8* %43, i8* %4)
%54 = call i32 @strcat(i8* %43, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.7, i64 0, i64 0))
%55 = call i32* @fopen(i8* %43, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.8, i64 0, i64 0))
%56 = call i64 @fwrite(i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str.9, i64 0, i64 0), i64 42, i64 1, i32* %55)
%57 = alloca [1000 x i8]
%58 = getelementptr inbounds [1000 x i8], [1000 x i8]* %57, i64 0, i64 0
%59 = call i32 @strcpy(i8* %58, i8* %14)
%60 = call i32 @strcat(i8* %58, i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.10, i64 0, i64 0))
%61 = call i32 @strcat(i8* %58, i8* %4)
%62 = call i32 @strcat(i8* %58, i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.11, i64 0, i64 0))
%63 = call i32 @strcat(i8* %58, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.5, i64 0, i64 0))
%64 = call i32 @strcat(i8* %58, i8* %4)
%65 = call i32 @strcat(i8* %58, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.12, i64 0, i64 0))
%66 = alloca [1000 x i8]
%67 = getelementptr inbounds [1000 x i8], [1000 x i8]* %66, i64 0, i64 0
%68 = call i32* @fopen(i8* %58, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.13, i64 0, i64 0))
%69 = icmp eq i32* %68, null
br i1 %69, label %77, label %70
70: ; preds = %36, %70
%71 = phi i32 [ %74, %70 ], [ 0, %36 ]
%72 = call i32* @fgets(i8* %67, i32 1000, i32* %68)
%73 = icmp eq i32* %72, null
%74 = add nuw nsw i32 %71, 1
br i1 %73, label %75, label %70
75: ; preds = %70
%76 = call i32 @fclose(i32* %68)
br label %79
77: ; preds = %36
%78 = call i32 @perror(i8* %58)
br label %79
79: ; preds = %77, %75
%80 = phi i32 [ %71, %75 ], [ 0, %77 ]
%81 = zext i32 %80 to i64
%82 = mul nuw nsw i64 %81, 1000
%83 = alloca i8, i64 %82
%84 = alloca i8, i64 %82
%85 = call i32* @fopen(i8* %58, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.13, i64 0, i64 0))
%86 = icmp eq i32* %85, null
br i1 %86, label %120, label %87
87: ; preds = %79
%88 = call i32* @fgets(i8* %67, i32 1000, i32* %85)
%89 = icmp eq i32* %88, null
br i1 %89, label %122, label %90
90: ; preds = %87, %99
%91 = phi i64 [ %115, %99 ], [ 0, %87 ]
%92 = call i32 @strlen(i8* %67)
%93 = add nsw i32 %92, -1
%94 = sext i32 %93 to i64
%95 = getelementptr inbounds [1000 x i8], [1000 x i8]* %66, i64 0, i64 %94
%96 = load i8, i8* %95
%97 = icmp eq i8 %96, 10
br i1 %97, label %98, label %99
98: ; preds = %90
store i8 0, i8* %95
br label %99
99: ; preds = %98, %90
%100 = mul nuw nsw i64 %91, 1000
%101 = getelementptr inbounds i8, i8* %83, i64 %100
%102 = call i32 @strcpy(i8* %101, i8* %67)
%103 = getelementptr inbounds i8, i8* %84, i64 %100
%104 = call i32 @strcpy(i8* %103, i8* %14)
%105 = call i32 @strcat(i8* %103, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.4, i64 0, i64 0))
%106 = call i32 @strcat(i8* %103, i8* %9)
%107 = call i32 @strcat(i8* %103, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.5, i64 0, i64 0))
%108 = call i32 @strcat(i8* %103, i8* %4)
%109 = call i32 @strcat(i8* %103, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.6, i64 0, i64 0))
%110 = call i32 @strcat(i8* %103, i8* %9)
%111 = call i32 @strcat(i8* %103, i8* %24)
%112 = call i32 @strcat(i8* %103, i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.14, i64 0, i64 0))
%113 = call i32 @strcat(i8* %103, i8* %67)
%114 = call i32 @strcat(i8* %103, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.15, i64 0, i64 0))
%115 = add nuw i64 %91, 1
%116 = call i32* @fgets(i8* %67, i32 1000, i32* %85)
%117 = icmp eq i32* %116, null
br i1 %117, label %118, label %90
118: ; preds = %99
%119 = trunc i64 %115 to i32
br label %122
120: ; preds = %79
%121 = call i32 @perror(i8* %58)
br label %291
122: ; preds = %87, %118
%123 = phi i32 [ 0, %87 ], [ %119, %118 ]
%124 = call i32 @fclose(i32* %85)
%125 = alloca [1000000 x i8]
%126 = alloca [1000000 x i8]
%127 = getelementptr inbounds [1000000 x i8], [1000000 x i8]* %126, i64 0, i64 0
%128 = getelementptr inbounds [1000000 x i8], [1000000 x i8]* %125, i64 0, i64 0
%129 = icmp eq i32 %123, 0
br i1 %129, label %291, label %130
130: ; preds = %122
%131 = zext i32 %123 to i64
br label %132
132: ; preds = %130, %288
%133 = phi i64 [ 0, %130 ], [ %289, %288 ]
%134 = mul nuw nsw i64 %133, 1000
%135 = getelementptr inbounds i8, i8* %84, i64 %134
%136 = call i32* @fopen(i8* %135, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.13, i64 0, i64 0))
%137 = icmp eq i32* %136, null
br i1 %137, label %162, label %138
138: ; preds = %132
%139 = call i8* @llvm.stacksave()
%140 = alloca [1000000 x i8]
%141 = getelementptr inbounds [1000000 x i8], [1000000 x i8]* %140, i64 0, i64 0
%142 = call i32* @fgets(i8* %141, i32 1000000, i32* %136)
%143 = icmp eq i32* %142, null
br i1 %143, label %161, label %144
144: ; preds = %138, %158
%145 = load i8, i8* %141
%146 = icmp eq i8 %145, 62
br i1 %146, label %158, label %147
147: ; preds = %144
%148 = call i32 @strlen(i8* %141)
%149 = add nsw i32 %148, -1
%150 = sext i32 %149 to i64
%151 = getelementptr inbounds [1000000 x i8], [1000000 x i8]* %140, i64 0, i64 %150
%152 = load i8, i8* %151
%153 = icmp eq i8 %152, 10
br i1 %153, label %154, label %155
154: ; preds = %147
store i8 0, i8* %151
br label %155
155: ; preds = %154, %147
%156 = call i32 @strcpy(i8* %128, i8* %141)
%157 = call i32 @fclose(i32* %136)
br label %158
158: ; preds = %155, %144
%159 = call i32* @fgets(i8* %141, i32 1000000, i32* %136)
%160 = icmp eq i32* %159, null
br i1 %160, label %161, label %144
161: ; preds = %158, %138
br label %164
162: ; preds = %132
%163 = call i32 @perror(i8* %135)
br label %164
164: ; preds = %162, %161
%165 = getelementptr inbounds i8, i8* %83, i64 %134
br label %166
166: ; preds = %164, %285
%167 = phi i64 [ 0, %164 ], [ %286, %285 ]
%168 = icmp ugt i64 %133, %167
br i1 %168, label %169, label %285
169: ; preds = %166
%170 = mul nuw nsw i64 %167, 1000
%171 = getelementptr inbounds i8, i8* %84, i64 %170
%172 = call i32* @fopen(i8* %171, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.13, i64 0, i64 0))
%173 = icmp eq i32* %172, null
br i1 %173, label %198, label %174
174: ; preds = %169
%175 = call i8* @llvm.stacksave()
%176 = alloca [1000000 x i8]
%177 = getelementptr inbounds [1000000 x i8], [1000000 x i8]* %176, i64 0, i64 0
%178 = call i32* @fgets(i8* %177, i32 1000000, i32* %172)
%179 = icmp eq i32* %178, null
br i1 %179, label %197, label %180
180: ; preds = %174, %194
%181 = load i8, i8* %177
%182 = icmp eq i8 %181, 62
br i1 %182, label %194, label %183
183: ; preds = %180
%184 = call i32 @strlen(i8* %177)
%185 = add nsw i32 %184, -1
%186 = sext i32 %185 to i64
%187 = getelementptr inbounds [1000000 x i8], [1000000 x i8]* %176, i64 0, i64 %186
%188 = load i8, i8* %187
%189 = icmp eq i8 %188, 10
br i1 %189, label %190, label %191
190: ; preds = %183
store i8 0, i8* %187
br label %191
191: ; preds = %190, %183
%192 = call i32 @strcpy(i8* %127, i8* %177)
%193 = call i32 @fclose(i32* %172)
br label %194
194: ; preds = %191, %180
%195 = call i32* @fgets(i8* %177, i32 1000000, i32* %172)
%196 = icmp eq i32* %195, null
br i1 %196, label %197, label %180
197: ; preds = %194, %174
br label %200
198: ; preds = %169
%199 = call i32 @perror(i8* %171)
br label %200
200: ; preds = %198, %197
%201 = call i32 @strlen(i8* %128)
%202 = icmp sgt i32 %201, 0
br i1 %202, label %203, label %271
203: ; preds = %200
%204 = zext i32 %201 to i64
%205 = and i64 %204, 1
%206 = icmp eq i32 %201, 1
br i1 %206, label %250, label %207
207: ; preds = %203
%208 = and i64 %204, 4294967294
br label %209
209: ; preds = %244, %207
%210 = phi i64 [ 0, %207 ], [ %247, %244 ]
%211 = phi i32 [ 0, %207 ], [ %246, %244 ]
%212 = phi i32 [ 0, %207 ], [ %245, %244 ]
%213 = phi i64 [ 0, %207 ], [ %248, %244 ]
%214 = getelementptr inbounds [1000000 x i8], [1000000 x i8]* %125, i64 0, i64 %210
%215 = load i8, i8* %214
%216 = icmp eq i8 %215, 78
br i1 %216, label %221, label %217
217: ; preds = %209
%218 = getelementptr inbounds [1000000 x i8], [1000000 x i8]* %126, i64 0, i64 %210
%219 = load i8, i8* %218
%220 = icmp eq i8 %219, 78
br i1 %220, label %221, label %223
221: ; preds = %217, %209
%222 = add nsw i32 %211, 1
br label %227
223: ; preds = %217
%224 = icmp ne i8 %215, %219
%225 = zext i1 %224 to i32
%226 = add nsw i32 %212, %225
br label %227
227: ; preds = %223, %221
%228 = phi i32 [ %212, %221 ], [ %226, %223 ]
%229 = phi i32 [ %222, %221 ], [ %211, %223 ]
%230 = or i64 %210, 1
%231 = getelementptr inbounds [1000000 x i8], [1000000 x i8]* %125, i64 0, i64 %230
%232 = load i8, i8* %231
%233 = icmp eq i8 %232, 78
br i1 %233, label %242, label %234
234: ; preds = %227
%235 = getelementptr inbounds [1000000 x i8], [1000000 x i8]* %126, i64 0, i64 %230
%236 = load i8, i8* %235
%237 = icmp eq i8 %236, 78
br i1 %237, label %242, label %238
238: ; preds = %234
%239 = icmp ne i8 %232, %236
%240 = zext i1 %239 to i32
%241 = add nsw i32 %228, %240
br label %244
242: ; preds = %234, %227
%243 = add nsw i32 %229, 1
br label %244
244: ; preds = %242, %238
%245 = phi i32 [ %228, %242 ], [ %241, %238 ]
%246 = phi i32 [ %243, %242 ], [ %229, %238 ]
%247 = add nuw nsw i64 %210, 2
%248 = add i64 %213, 2
%249 = icmp eq i64 %248, %208
br i1 %249, label %250, label %209
250: ; preds = %244, %203
%251 = phi i32 [ undef, %203 ], [ %245, %244 ]
%252 = phi i32 [ undef, %203 ], [ %246, %244 ]
%253 = phi i64 [ 0, %203 ], [ %247, %244 ]
%254 = phi i32 [ 0, %203 ], [ %246, %244 ]
%255 = phi i32 [ 0, %203 ], [ %245, %244 ]
%256 = icmp eq i64 %205, 0
br i1 %256, label %271, label %257
257: ; preds = %250
%258 = getelementptr inbounds [1000000 x i8], [1000000 x i8]* %125, i64 0, i64 %253
%259 = load i8, i8* %258
%260 = icmp eq i8 %259, 78
br i1 %260, label %269, label %261
261: ; preds = %257
%262 = getelementptr inbounds [1000000 x i8], [1000000 x i8]* %126, i64 0, i64 %253
%263 = load i8, i8* %262
%264 = icmp eq i8 %263, 78
br i1 %264, label %269, label %265
265: ; preds = %261
%266 = icmp ne i8 %259, %263
%267 = zext i1 %266 to i32
%268 = add nsw i32 %255, %267
br label %271
269: ; preds = %261, %257
%270 = add nsw i32 %254, 1
br label %271
271: ; preds = %250, %269, %265, %200
%272 = phi i32 [ 0, %200 ], [ %251, %250 ], [ %255, %269 ], [ %268, %265 ]
%273 = phi i32 [ 0, %200 ], [ %252, %250 ], [ %270, %269 ], [ %254, %265 ]
%274 = sub nsw i32 %201, %273
%275 = sitofp i32 %272 to float
%276 = sitofp i32 %274 to float
%277 = fdiv float %275, %276
%278 = call float @llvm.fmuladd.f32(float %277, float 0xBFF5555560000000, float 1.000000e+00)
%279 = fptosi float %278 to i32
%280 = call float @log(i32 %279)
%281 = fmul float %280, -7.500000e-01
%282 = getelementptr inbounds i8, i8* %83, i64 %170
%283 = fpext float %281 to double
%284 = call i32 (i32*, i8*, ...) @fprintf(i32* %55, i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.16, i64 0, i64 0), i8* %165, i8* %282, i32 %272, i32 %274, double %283)
br label %285
285: ; preds = %166, %271
%286 = add nuw nsw i64 %167, 1
%287 = icmp eq i64 %286, %131
br i1 %287, label %288, label %166
288: ; preds = %285
%289 = add nuw nsw i64 %133, 1
%290 = icmp eq i64 %289, %131
br i1 %290, label %291, label %132
291: ; preds = %288, %120, %122
%292 = call i32 @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.17, i64 0, i64 0), i8* %4)
%293 = call i32 (i32*, i8*, ...) @fprintf(i32* %41, i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.17, i64 0, i64 0), i8* %4)
ret i32 0
}