#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 EOF;
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ fclose(int /*<<< orphan*/ *);
int /*<<< orphan*/ *fopen(char *, char *);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/ *, char *, float);
int fscanf(int /*<<< orphan*/ *, char *, ...);
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ sscanf(char *, char *, int *);
int /*<<< orphan*/ strcat(char *, char *);
int /*<<< orphan*/ strcpy(char *, char *);
int main(int argc, char *argv[]) {
  FILE *configfile, *rawdownfile, *rawupfile[5], *bcdownfile, *bcupfile[5],
      *outfile[5];
  float sum[10], tempdata, testdata, data[5][52];
  float adjfrac;
  int i, j, k, numstat;
  char outdirstr[100], indirstr[100];
  char name[10][100], outdir[100], temp[200];
  int dpsm[14] = {31, 15, 16, 30, 31, 30, 31, 31, 28, 31, 15, 15, 31, 30};
  int dpm[12] = {31, 30, 31, 31, 28, 31, 30, 31, 30, 31, 31, 30};
  int dpp[52], ppy, unitsw;
  int year;
  if (argc != 7) {
    printf("Wrong command line arguments: enter <config_file> <out_dir_path> "
           "<start year> <ppy> <unit switch> <file str> ,\n");
    exit(0);
  }
  strcpy(outdirstr, argv[2]);
  strcpy(indirstr, "./in/");
  sscanf(argv[3], "%d", &year);
  sscanf(argv[4], "%d", &ppy);
  sscanf(argv[5], "%d", &unitsw);
  configfile = fopen(argv[1], "r");
  if (ppy == 52) {
    for (i = 0; i < 52; i++)
      dpp[i] = 7;
    dpp[51] = 8;
  }
  if (ppy == 14) {
    for (i = 0; i < 14; i++)
      dpp[i] = dpsm[i];
  }
  if (ppy == 12) {
    for (i = 0; i < 12; i++)
      dpp[i] = dpm[i];
  }
  while (fscanf(configfile, "%d", &numstat) != EOF) {
    for (i = 0; i < numstat; i++) {
      fscanf(configfile, "%s", &name[i]);
      printf("%s\n", name[i]);
    }
    for (i = 0; i < numstat; i++) {
      strcpy(temp, outdirstr);
      strcat(temp, name[i]);
      strcat(temp, argv[6]);
      if (i == 0)
        strcat(temp, "bc.ff");
      if (i > 0)
        strcat(temp, "bc.f");
      printf("Opening bias-corrected file %s for input. \n", temp);
      if (i == 0) {
        bcdownfile = fopen(temp, "r");
        if (bcdownfile == NULL) {
          printf("ERROR opening file named %s\n", temp);
          exit(0);
        }
      } else {
        bcupfile[i - 1] = fopen(temp, "r");
        if (bcupfile[i - 1] == NULL) {
          printf("ERROR opening file named %s\n", temp);
          exit(0);
        }
      }
    }
    for (i = 0; i < (numstat - 1); i++) {
      strcpy(temp, outdirstr);
      strcat(temp, name[i + 1]);
      strcat(temp, argv[6]);
      strcat(temp, "bc.ff");
      printf("Opening output file %s for writing. \n", temp);
      outfile[i] = fopen(temp, "w");
      if (outfile[i] == NULL) {
        printf("ERROR opening file named %s\n", temp);
        exit(0);
      }
    }
    sum[0] = 0;
    sum[1] = 0;
    sum[2] = 0;
    sum[3] = 0;
    while (fscanf(bcdownfile, "%f", &sum[0]) == 1) {
      if (unitsw == 1)
        sum[0] *= dpp[0];
      if ((year % 4 == 0) && (((year % 100 == 0) && (year % 400 != 0)) == 0)) {
        if (ppy == 12)
          dpp[4] = 29;
        if (ppy == 14)
          dpp[8] = 29;
        if (ppy == 52)
          dpp[51] = 9;
      } else {
        if (ppy == 12)
          dpp[4] = 28;
        if (ppy == 14)
          dpp[8] = 28;
        if (ppy == 52)
          dpp[51] = 8;
      }
      for (i = 1; i < ppy; i++) {
        fscanf(bcdownfile, "%f", &tempdata);
        if (unitsw == 0)
          sum[0] += tempdata;
        if (unitsw == 1)
          sum[0] += tempdata * dpp[i];
      }
      for (i = 0; i < (numstat - 1); i++) {
        for (j = 0; j < ppy; j++) {
          if (fscanf(bcupfile[i], "%f", &tempdata) != 1)
            printf("error reading upfile\n");
          data[i][j] = tempdata;
          if (unitsw == 0)
            sum[1] += tempdata;
          if (unitsw == 1)
            sum[1] += tempdata * dpp[j];
        }
      }
      if (sum[0] == 0 || sum[1] == 0)
        adjfrac = 0;
      else
        adjfrac = (sum[0] / sum[1]);
      for (i = 0; i < (numstat - 1); i++) {
        for (j = 0; j < ppy; j++) {
          fprintf(outfile[i], "%10.0f\n", adjfrac * data[i][j]);
        }
      }
      year++;
      sum[0] = 0;
      sum[1] = 0;
      sum[2] = 0;
      sum[3] = 0;
    }
    fclose(bcdownfile);
    for (i = 0; i < (numstat - 1); i++) {
      fclose(bcupfile[i]);
      fclose(outfile[i]);
    }
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0xc70,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    -0xb60(%rbp),%rdi
lea    0xe39(%rip),%rsi
mov    $0x38,%edx
call   1080 <memcpy@plt>
lea    -0xb90(%rbp),%rdi
lea    0xe61(%rip),%rsi
mov    $0x30,%edx
call   1080 <memcpy@plt>
cmpl   $0x7,-0x8(%rbp)
je     1208 <main+0x68>
lea    0xe76(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
xor    %edi,%edi
call   10c0 <exit@plt>
lea    -0x580(%rbp),%rdi
mov    -0x10(%rbp),%rax
mov    0x10(%rax),%rsi
call   1030 <strcpy@plt>
lea    -0x5f0(%rbp),%rdi
lea    0xeb6(%rip),%rsi
call   1030 <strcpy@plt>
mov    -0x10(%rbp),%rax
mov    0x18(%rax),%rdi
lea    0xea8(%rip),%rsi
lea    -0xc6c(%rbp),%rdx
call   1090 <sscanf@plt>
mov    -0x10(%rbp),%rax
mov    0x20(%rax),%rdi
lea    0xe8d(%rip),%rsi
lea    -0xc64(%rbp),%rdx
call   1090 <sscanf@plt>
mov    -0x10(%rbp),%rax
mov    0x28(%rax),%rdi
lea    0xe72(%rip),%rsi
lea    -0xc68(%rbp),%rdx
call   1090 <sscanf@plt>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
lea    0xe5a(%rip),%rsi
call   10a0 <fopen@plt>
mov    %rax,-0x18(%rbp)
cmpl   $0x34,-0xc64(%rbp)
jne    12ec <main+0x14c>
movl   $0x0,-0x508(%rbp)
cmpl   $0x34,-0x508(%rbp)
jge    12e2 <main+0x142>
movslq -0x508(%rbp),%rax
movl   $0x7,-0xc60(%rbp,%rax,4)
mov    -0x508(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x508(%rbp)
jmp    12af <main+0x10f>
movl   $0x8,-0xb94(%rbp)
cmpl   $0xe,-0xc64(%rbp)
jne    1345 <main+0x1a5>
movl   $0x0,-0x508(%rbp)
cmpl   $0xe,-0x508(%rbp)
jge    1340 <main+0x1a0>
movslq -0x508(%rbp),%rax
mov    -0xb60(%rbp,%rax,4),%ecx
movslq -0x508(%rbp),%rax
mov    %ecx,-0xc60(%rbp,%rax,4)
mov    -0x508(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x508(%rbp)
jmp    1303 <main+0x163>
jmp    1345 <main+0x1a5>
cmpl   $0xc,-0xc64(%rbp)
jne    139e <main+0x1fe>
movl   $0x0,-0x508(%rbp)
cmpl   $0xc,-0x508(%rbp)
jge    1399 <main+0x1f9>
movslq -0x508(%rbp),%rax
mov    -0xb90(%rbp,%rax,4),%ecx
movslq -0x508(%rbp),%rax
mov    %ecx,-0xc60(%rbp,%rax,4)
mov    -0x508(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x508(%rbp)
jmp    135c <main+0x1bc>
jmp    139e <main+0x1fe>
jmp    13a3 <main+0x203>
mov    -0x18(%rbp),%rdi
lea    0xd38(%rip),%rsi
lea    -0x514(%rbp),%rdx
mov    $0x0,%al
call   1060 <fscanf@plt>
mov    0x2c25(%rip),%rcx
cmp    (%rcx),%eax
je     1bd4 <main+0xa34>
movl   $0x0,-0x508(%rbp)
mov    -0x508(%rbp),%eax
cmp    -0x514(%rbp),%eax
jge    1445 <main+0x2a5>
mov    -0x18(%rbp),%rdi
movslq -0x508(%rbp),%rax
lea    -0x9e0(%rbp),%rdx
imul   $0x64,%rax,%rax
add    %rax,%rdx
lea    0xce4(%rip),%rsi
mov    $0x0,%al
call   1060 <fscanf@plt>
movslq -0x508(%rbp),%rax
lea    -0x9e0(%rbp),%rsi
imul   $0x64,%rax,%rax
add    %rax,%rsi
lea    0xd14(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
mov    -0x508(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x508(%rbp)
jmp    13d5 <main+0x235>
movl   $0x0,-0x508(%rbp)
mov    -0x508(%rbp),%eax
cmp    -0x514(%rbp),%eax
jge    15c5 <main+0x425>
lea    -0xb20(%rbp),%rdi
lea    -0x580(%rbp),%rsi
call   1030 <strcpy@plt>
lea    -0xb20(%rbp),%rdi
movslq -0x508(%rbp),%rax
lea    -0x9e0(%rbp),%rsi
imul   $0x64,%rax,%rax
add    %rax,%rsi
call   10b0 <strcat@plt>
lea    -0xb20(%rbp),%rdi
mov    -0x10(%rbp),%rax
mov    0x30(%rax),%rsi
call   10b0 <strcat@plt>
cmpl   $0x0,-0x508(%rbp)
jne    14c9 <main+0x329>
lea    -0xb20(%rbp),%rdi
lea    0xc2a(%rip),%rsi
call   10b0 <strcat@plt>
cmpl   $0x0,-0x508(%rbp)
jle    14e9 <main+0x349>
lea    -0xb20(%rbp),%rdi
lea    0xc10(%rip),%rsi
call   10b0 <strcat@plt>
lea    -0xb20(%rbp),%rsi
lea    0xc02(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
cmpl   $0x0,-0x508(%rbp)
jne    154e <main+0x3ae>
lea    -0xb20(%rbp),%rdi
lea    0xbd0(%rip),%rsi
call   10a0 <fopen@plt>
mov    %rax,-0x58(%rbp)
cmpq   $0x0,-0x58(%rbp)
jne    1549 <main+0x3a9>
lea    -0xb20(%rbp),%rsi
lea    0xbea(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
xor    %edi,%edi
call   10c0 <exit@plt>
jmp    15ac <main+0x40c>
lea    -0xb20(%rbp),%rdi
lea    0xb8d(%rip),%rsi
call   10a0 <fopen@plt>
mov    %rax,%rcx
mov    -0x508(%rbp),%eax
sub    $0x1,%eax
cltq
mov    %rcx,-0x80(%rbp,%rax,8)
mov    -0x508(%rbp),%eax
sub    $0x1,%eax
cltq
cmpq   $0x0,-0x80(%rbp,%rax,8)
jne    15a7 <main+0x407>
lea    -0xb20(%rbp),%rsi
lea    0xb8c(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
xor    %edi,%edi
call   10c0 <exit@plt>
jmp    15ac <main+0x40c>
jmp    15b1 <main+0x411>
mov    -0x508(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x508(%rbp)
jmp    144f <main+0x2af>
movl   $0x0,-0x508(%rbp)
mov    -0x508(%rbp),%eax
mov    -0x514(%rbp),%ecx
sub    $0x1,%ecx
cmp    %ecx,%eax
jge    16ca <main+0x52a>
lea    -0xb20(%rbp),%rdi
lea    -0x580(%rbp),%rsi
call   1030 <strcpy@plt>
lea    -0xb20(%rbp),%rdi
mov    -0x508(%rbp),%eax
add    $0x1,%eax
cltq
lea    -0x9e0(%rbp),%rsi
imul   $0x64,%rax,%rax
add    %rax,%rsi
call   10b0 <strcat@plt>
lea    -0xb20(%rbp),%rdi
mov    -0x10(%rbp),%rax
mov    0x30(%rax),%rsi
call   10b0 <strcat@plt>
lea    -0xb20(%rbp),%rdi
lea    0xaae(%rip),%rsi
call   10b0 <strcat@plt>
lea    -0xb20(%rbp),%rsi
lea    0xaef(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
lea    -0xb20(%rbp),%rdi
lea    0xb00(%rip),%rsi
call   10a0 <fopen@plt>
mov    %rax,%rcx
movslq -0x508(%rbp),%rax
mov    %rcx,-0xb0(%rbp,%rax,8)
ff
movslq -0x508(%rbp),%rax
cmpq   $0x0,-0xb0(%rbp,%rax,8)
jne    16b1 <main+0x511>
lea    -0xb20(%rbp),%rsi
lea    0xa82(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
xor    %edi,%edi
call   10c0 <exit@plt>
jmp    16b6 <main+0x516>
mov    -0x508(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x508(%rbp)
jmp    15cf <main+0x42f>
xorps  %xmm0,%xmm0
movss  %xmm0,-0xe0(%rbp)
ff
xorps  %xmm0,%xmm0
movss  %xmm0,-0xdc(%rbp)
ff
xorps  %xmm0,%xmm0
movss  %xmm0,-0xd8(%rbp)
ff
xorps  %xmm0,%xmm0
movss  %xmm0,-0xd4(%rbp)
ff
mov    -0x58(%rbp),%rdi
lea    -0xe0(%rbp),%rdx
lea    0xa62(%rip),%rsi
mov    $0x0,%al
call   1060 <fscanf@plt>
cmp    $0x1,%eax
jne    1b6c <main+0x9cc>
cmpl   $0x1,-0xc68(%rbp)
jne    173d <main+0x59d>
cvtsi2ssl -0xc60(%rbp),%xmm0
ff
mulss  -0xe0(%rbp),%xmm0
ff
movss  %xmm0,-0xe0(%rbp)
ff
mov    -0xc6c(%rbp),%eax
mov    $0x4,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
jne    17eb <main+0x64b>
mov    -0xc6c(%rbp),%eax
mov    $0x64,%ecx
cltd
idiv   %ecx
xor    %eax,%eax
cmp    $0x0,%edx
mov    %al,-0xc6d(%rbp)
jne    178d <main+0x5ed>
mov    -0xc6c(%rbp),%eax
mov    $0x190,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
setne  %al
mov    %al,-0xc6d(%rbp)
mov    -0xc6d(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
cmp    $0x0,%eax
jne    17eb <main+0x64b>
cmpl   $0xc,-0xc64(%rbp)
jne    17b8 <main+0x618>
movl   $0x1d,-0xc50(%rbp)
cmpl   $0xe,-0xc64(%rbp)
jne    17cf <main+0x62f>
movl   $0x1d,-0xc40(%rbp)
cmpl   $0x34,-0xc64(%rbp)
jne    17e6 <main+0x646>
movl   $0x9,-0xb94(%rbp)
jmp    1835 <main+0x695>
cmpl   $0xc,-0xc64(%rbp)
jne    1802 <main+0x662>
movl   $0x1c,-0xc50(%rbp)
cmpl   $0xe,-0xc64(%rbp)
jne    1819 <main+0x679>
movl   $0x1c,-0xc40(%rbp)
cmpl   $0x34,-0xc64(%rbp)
jne    1830 <main+0x690>
movl   $0x8,-0xb94(%rbp)
jmp    1835 <main+0x695>
movl   $0x1,-0x508(%rbp)
mov    -0x508(%rbp),%eax
cmp    -0xc64(%rbp),%eax
jge    18e5 <main+0x745>
mov    -0x58(%rbp),%rdi
lea    0x90e(%rip),%rsi
lea    -0xe4(%rbp),%rdx
mov    $0x0,%al
call   1060 <fscanf@plt>
cmpl   $0x0,-0xc68(%rbp)
jne    188f <main+0x6ef>
movss  -0xe4(%rbp),%xmm0
ff
addss  -0xe0(%rbp),%xmm0
ff
movss  %xmm0,-0xe0(%rbp)
ff
cmpl   $0x1,-0xc68(%rbp)
jne    18cc <main+0x72c>
movss  -0xe4(%rbp),%xmm0
ff
movslq -0x508(%rbp),%rax
cvtsi2ssl -0xc60(%rbp,%rax,4),%xmm2
ff ff
movss  -0xe0(%rbp),%xmm1
ff
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
movss  %xmm0,-0xe0(%rbp)
ff
jmp    18d1 <main+0x731>
mov    -0x508(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x508(%rbp)
jmp    183f <main+0x69f>
movl   $0x0,-0x508(%rbp)
mov    -0x508(%rbp),%eax
mov    -0x514(%rbp),%ecx
sub    $0x1,%ecx
cmp    %ecx,%eax
jge    1a1a <main+0x87a>
movl   $0x0,-0x50c(%rbp)
mov    -0x50c(%rbp),%eax
cmp    -0xc64(%rbp),%eax
jge    1a01 <main+0x861>
movslq -0x508(%rbp),%rax
mov    -0x80(%rbp,%rax,8),%rdi
lea    0x835(%rip),%rsi
lea    -0xe4(%rbp),%rdx
mov    $0x0,%al
call   1060 <fscanf@plt>
cmp    $0x1,%eax
je     195a <main+0x7ba>
lea    0x81a(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
movss  -0xe4(%rbp),%xmm0
ff
movslq -0x508(%rbp),%rcx
lea    -0x500(%rbp),%rax
imul   $0xd0,%rcx,%rcx
add    %rcx,%rax
movslq -0x50c(%rbp),%rcx
movss  %xmm0,(%rax,%rcx,4)
cmpl   $0x0,-0xc68(%rbp)
jne    19ab <main+0x80b>
movss  -0xe4(%rbp),%xmm0
ff
addss  -0xdc(%rbp),%xmm0
ff
movss  %xmm0,-0xdc(%rbp)
ff
cmpl   $0x1,-0xc68(%rbp)
jne    19e8 <main+0x848>
movss  -0xe4(%rbp),%xmm0
ff
movslq -0x50c(%rbp),%rax
cvtsi2ssl -0xc60(%rbp,%rax,4),%xmm2
ff ff
movss  -0xdc(%rbp),%xmm1
ff
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
movss  %xmm0,-0xdc(%rbp)
ff
jmp    19ed <main+0x84d>
mov    -0x50c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x50c(%rbp)
jmp    1910 <main+0x770>
jmp    1a06 <main+0x866>
mov    -0x508(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x508(%rbp)
jmp    18ef <main+0x74f>
movss  -0xe0(%rbp),%xmm0
ff
xorps  %xmm1,%xmm1
ucomiss %xmm1,%xmm0
jne    1a39 <main+0x899>
jp     1a39 <main+0x899>
jmp    1a53 <main+0x8b3>
movss  -0xdc(%rbp),%xmm0
ff
xorps  %xmm1,%xmm1
ucomiss %xmm1,%xmm0
jne    1a63 <main+0x8c3>
jp     1a63 <main+0x8c3>
xorps  %xmm0,%xmm0
movss  %xmm0,-0x504(%rbp)
ff
jmp    1a7b <main+0x8db>
movss  -0xe0(%rbp),%xmm0
ff
divss  -0xdc(%rbp),%xmm0
ff
movss  %xmm0,-0x504(%rbp)
ff
movl   $0x0,-0x508(%rbp)
mov    -0x508(%rbp),%eax
mov    -0x514(%rbp),%ecx
sub    $0x1,%ecx
cmp    %ecx,%eax
jge    1b2c <main+0x98c>
movl   $0x0,-0x50c(%rbp)
mov    -0x50c(%rbp),%eax
cmp    -0xc64(%rbp),%eax
jge    1b13 <main+0x973>
movslq -0x508(%rbp),%rax
mov    -0xb0(%rbp,%rax,8),%rdi
ff
movss  -0x504(%rbp),%xmm0
ff
movslq -0x508(%rbp),%rcx
lea    -0x500(%rbp),%rax
imul   $0xd0,%rcx,%rcx
add    %rcx,%rax
movslq -0x50c(%rbp),%rcx
mulss  (%rax,%rcx,4),%xmm0
lea    0x689(%rip),%rsi
call   1070 <fprintf@plt>
mov    -0x50c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x50c(%rbp)
jmp    1aa6 <main+0x906>
jmp    1b18 <main+0x978>
mov    -0x508(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x508(%rbp)
jmp    1a85 <main+0x8e5>
mov    -0xc6c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc6c(%rbp)
xorps  %xmm0,%xmm0
movss  %xmm0,-0xe0(%rbp)
ff
xorps  %xmm0,%xmm0
movss  %xmm0,-0xdc(%rbp)
ff
xorps  %xmm0,%xmm0
movss  %xmm0,-0xd8(%rbp)
ff
xorps  %xmm0,%xmm0
movss  %xmm0,-0xd4(%rbp)
ff
jmp    16f6 <main+0x556>
mov    -0x58(%rbp),%rdi
call   1040 <fclose@plt>
movl   $0x0,-0x508(%rbp)
mov    -0x508(%rbp),%eax
mov    -0x514(%rbp),%ecx
sub    $0x1,%ecx
cmp    %ecx,%eax
jge    1bcf <main+0xa2f>
movslq -0x508(%rbp),%rax
mov    -0x80(%rbp,%rax,8),%rdi
call   1040 <fclose@plt>
movslq -0x508(%rbp),%rax
mov    -0xb0(%rbp,%rax,8),%rdi
ff
call   1040 <fclose@plt>
mov    -0x508(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x508(%rbp)
jmp    1b7f <main+0x9df>
jmp    13a3 <main+0x203>
mov    -0x4(%rbp),%eax
add    $0xc70,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0xb58,%rsp
cmp    $0x7,%edi
jne    197f <main+0x7df>
mov    %rsi,%rbp
mov    0x10(%rsi),%rsi
lea    0x1a0(%rsp),%rdi
call   1030 <strcpy@plt>
lea    0xebb(%rip),%rsi
lea    0x2e0(%rsp),%rdi
call   1030 <strcpy@plt>
mov    0x18(%rbp),%rdi
lea    0xea9(%rip),%rbx
lea    0x14(%rsp),%rdx
mov    %rbx,%rsi
call   1090 <sscanf@plt>
mov    0x20(%rbp),%rdi
lea    0x8(%rsp),%rdx
mov    %rbx,%rsi
call   1090 <sscanf@plt>
mov    0x28(%rbp),%rdi
lea    0x10(%rsp),%rdx
mov    %rbx,%rsi
call   1090 <sscanf@plt>
mov    0x8(%rbp),%rdi
lea    0xe72(%rip),%rsi
call   10a0 <fopen@plt>
mov    %rax,%r13
mov    0x8(%rsp),%eax
cmp    $0xc,%eax
mov    %rbp,0x18(%rsp)
je     12c9 <main+0x129>
cmp    $0xe,%eax
je     12ed <main+0x14d>
cmp    $0x34,%eax
jne    1323 <main+0x183>
movaps 0xda6(%rip),%xmm0
movaps %xmm0,0x60(%rsp)
movaps %xmm0,0x70(%rsp)
movaps %xmm0,0x80(%rsp)
movaps %xmm0,0x90(%rsp)
movaps %xmm0,0xa0(%rsp)
movaps %xmm0,0xb0(%rsp)
movaps %xmm0,0xc0(%rsp)
movaps %xmm0,0xd0(%rsp)
movaps %xmm0,0xe0(%rsp)
movaps %xmm0,0xf0(%rsp)
movaps %xmm0,0x100(%rsp)
movaps %xmm0,0x110(%rsp)
movaps %xmm0,0x120(%rsp)
movl   $0x8,0x12c(%rsp)
jmp    1323 <main+0x183>
movaps 0xdb0(%rip),%xmm0
movaps %xmm0,0x80(%rsp)
movaps 0xd91(%rip),%xmm0
movaps %xmm0,0x70(%rsp)
movaps 0xd75(%rip),%xmm0
jmp    131e <main+0x17e>
mov    0xd5c(%rip),%rax
mov    %rax,0x90(%rsp)
movaps 0xd3d(%rip),%xmm0
movaps %xmm0,0x80(%rsp)
movaps 0xd1e(%rip),%xmm0
movaps %xmm0,0x70(%rsp)
movaps 0xd02(%rip),%xmm0
movaps %xmm0,0x60(%rsp)
lea    0xd6c(%rip),%rsi
lea    0x4(%rsp),%rdx
mov    %r13,%rdi
xor    %eax,%eax
call   1070 <fscanf@plt>
mov    0x2ca8(%rip),%rcx
cmp    (%rcx),%eax
jne    1358 <main+0x1b8>
xor    %eax,%eax
add    $0xb58,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
lea    0xd3c(%rip),%r14
lea    0xdb4(%rip),%r15
lea    0xc(%rsp),%r12
mov    %r13,0x58(%rsp)
jmp    13a8 <main+0x208>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
mov    %r13,%rdi
lea    0xd0c(%rip),%rsi
lea    0x4(%rsp),%rdx
xor    %eax,%eax
call   1070 <fscanf@plt>
mov    0x2c4b(%rip),%rcx
cmp    (%rcx),%eax
lea    0xcf5(%rip),%r14
je     1344 <main+0x1a4>
mov    0x4(%rsp),%ecx
test   %ecx,%ecx
jle    1520 <main+0x380>
lea    0x350(%rsp),%rbx
xor    %ebp,%ebp
xchg   %ax,%ax
mov    %r13,%rdi
mov    %r14,%rsi
mov    %rbx,%rdx
xor    %eax,%eax
call   1070 <fscanf@plt>
mov    %rbx,%rdi
call   1040 <puts@plt>
add    $0x1,%rbp
movslq 0x4(%rsp),%rcx
add    $0x64,%rbx
cmp    %rcx,%rbp
jl     13c0 <main+0x220>
test   %ecx,%ecx
jle    1520 <main+0x380>
lea    0x210(%rsp),%rbx
mov    %rbx,%rdi
lea    0x1a0(%rsp),%rsi
call   1030 <strcpy@plt>
mov    %rbx,%rdi
lea    0x350(%rsp),%rsi
call   10b0 <strcat@plt>
mov    0x18(%rsp),%rax
mov    0x30(%rax),%rsi
mov    %rbx,%rdi
call   10b0 <strcat@plt>
mov    %rbx,%rdi
lea    0xc69(%rip),%rsi
call   10b0 <strcat@plt>
lea    0xc68(%rip),%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1060 <printf@plt>
mov    %rbx,%rdi
lea    0xc44(%rip),%rsi
call   10a0 <fopen@plt>
test   %rax,%rax
je     1962 <main+0x7c2>
mov    0x4(%rsp),%ecx
cmp    $0x2,%ecx
mov    %rax,0x50(%rsp)
jl     1520 <main+0x380>
mov    $0x1,%ebp
lea    0x3b4(%rsp),%rbx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
lea    0x210(%rsp),%r14
mov    %r14,%rdi
lea    0x1a0(%rsp),%rsi
call   1030 <strcpy@plt>
mov    %r14,%rdi
mov    %rbx,%rsi
call   10b0 <strcat@plt>
mov    0x18(%rsp),%rax
mov    0x30(%rax),%rsi
mov    %r14,%rdi
call   10b0 <strcat@plt>
mov    %r14,%rdi
lea    0xbd6(%rip),%rsi
call   10b0 <strcat@plt>
lea    0xbcf(%rip),%rdi
mov    %r14,%rsi
xor    %eax,%eax
call   1060 <printf@plt>
mov    %r14,%rdi
lea    0xbab(%rip),%rsi
call   10a0 <fopen@plt>
mov    %rax,0x168(%rsp,%rbp,8)
test   %rax,%rax
je     1962 <main+0x7c2>
movslq 0x4(%rsp),%rcx
add    $0x1,%rbp
add    $0x64,%rbx
cmp    %rcx,%rbp
jl     1490 <main+0x2f0>
nopw   0x0(%rax,%rax,1)
cmp    $0x2,%ecx
jl     15ce <main+0x42e>
lea    0x3b4(%rsp),%rbx
xor    %ebp,%ebp
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
lea    0x210(%rsp),%r14
mov    %r14,%rdi
lea    0x1a0(%rsp),%rsi
call   1030 <strcpy@plt>
mov    %r14,%rdi
mov    %rbx,%rsi
call   10b0 <strcat@plt>
mov    0x18(%rsp),%rax
mov    0x30(%rax),%rsi
mov    %r14,%rdi
call   10b0 <strcat@plt>
mov    %r14,%rdi
lea    0xb20(%rip),%rsi
call   10b0 <strcat@plt>
lea    0xb68(%rip),%rdi
mov    %r14,%rsi
xor    %eax,%eax
call   1060 <printf@plt>
mov    %r14,%rdi
lea    0xb7a(%rip),%rsi
call   10a0 <fopen@plt>
mov    %rax,0x140(%rsp,%rbp,8)
test   %rax,%rax
je     1962 <main+0x7c2>
add    $0x1,%rbp
movslq 0x4(%rsp),%rax
add    $0xffffffffffffffff,%rax
add    $0x64,%rbx
cmp    %rax,%rbp
jl     1540 <main+0x3a0>
xorps  %xmm0,%xmm0
movaps %xmm0,0x20(%rsp)
mov    0x50(%rsp),%rbp
mov    %rbp,%rdi
mov    %r15,%rsi
lea    0x20(%rsp),%rdx
xor    %eax,%eax
call   1070 <fscanf@plt>
cmp    $0x1,%eax
je     1687 <main+0x4e7>
mov    %rbp,%rdi
call   1050 <fclose@plt>
cmpl   $0x2,0x4(%rsp)
jl     1380 <main+0x1e0>
xor    %ebx,%ebx
nopl   0x0(%rax,%rax,1)
mov    0x170(%rsp,%rbx,8),%rdi
call   1050 <fclose@plt>
mov    0x140(%rsp,%rbx,8),%rdi
call   1050 <fclose@plt>
add    $0x1,%rbx
movslq 0x4(%rsp),%rax
add    $0xffffffffffffffff,%rax
cmp    %rax,%rbx
jl     1610 <main+0x470>
jmp    1380 <main+0x1e0>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
addl   $0x1,0x14(%rsp)
xorps  %xmm0,%xmm0
movaps %xmm0,0x20(%rsp)
mov    0x50(%rsp),%rbp
mov    %rbp,%rdi
mov    %r15,%rsi
lea    0x20(%rsp),%rdx
xor    %eax,%eax
call   1070 <fscanf@plt>
cmp    $0x1,%eax
mov    0x58(%rsp),%r13
lea    0xc(%rsp),%r12
jne    15f6 <main+0x456>
cmpl   $0x1,0x10(%rsp)
jne    16a3 <main+0x503>
xorps  %xmm0,%xmm0
cvtsi2ssl 0x60(%rsp),%xmm0
mulss  0x20(%rsp),%xmm0
movss  %xmm0,0x20(%rsp)
mov    0x14(%rsp),%eax
test   $0x3,%al
jne    16e3 <main+0x543>
imul   $0xc28f5c29,%eax,%ecx
add    $0x51eb850,%ecx
ror    $0x2,%ecx
cmp    $0x28f5c28,%ecx
ja     1730 <main+0x590>
movslq %eax,%rcx
imul   $0x51eb851f,%rcx,%rcx
mov    %rcx,%rdx
shr    $0x3f,%rdx
sar    $0x27,%rcx
add    %edx,%ecx
imul   $0x190,%ecx,%ecx
sub    %ecx,%eax
je     1730 <main+0x590>
mov    0x8(%rsp),%eax
cmp    $0x34,%eax
je     1710 <main+0x570>
cmp    $0xe,%eax
je     1720 <main+0x580>
cmp    $0xc,%eax
jne    1760 <main+0x5c0>
movl   $0x1c,0x70(%rsp)
jmp    1900 <main+0x760>
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
movl   $0x8,0x12c(%rsp)
jmp    1900 <main+0x760>
movl   $0x1c,0x80(%rsp)
jmp    1900 <main+0x760>
mov    0x8(%rsp),%eax
cmp    $0x34,%eax
je     18e1 <main+0x741>
cmp    $0xe,%eax
je     18ee <main+0x74e>
cmp    $0xc,%eax
jne    1760 <main+0x5c0>
movl   $0x1d,0x70(%rsp)
jmp    1900 <main+0x760>
nopl   0x0(%rax,%rax,1)
cmp    $0x2,%eax
jge    1900 <main+0x760>
nopl   0x0(%rax)
mov    0x4(%rsp),%ecx
cmp    $0x2,%ecx
jl     1830 <main+0x690>
lea    0x740(%rsp),%r13
xor    %ebp,%ebp
jmp    17ae <main+0x60e>
nopl   0x0(%rax)
mov    0x4(%rsp),%ecx
add    $0x1,%rbp
lea    -0x1(%rcx),%edx
movslq %edx,%rdx
add    $0xd0,%r13
cmp    %rdx,%rbp
jge    1830 <main+0x690>
test   %eax,%eax
jle    1794 <main+0x5f4>
mov    0x170(%rsp,%rbp,8),%rbx
xor    %r14d,%r14d
jmp    17e8 <main+0x648>
nop
xorps  %xmm1,%xmm1
cvtsi2ssl 0x60(%rsp,%r14,4),%xmm1
mulss  %xmm1,%xmm0
addss  0x24(%rsp),%xmm0
movss  %xmm0,0x24(%rsp)
add    $0x1,%r14
movslq 0x8(%rsp),%rax
cmp    %rax,%r14
jge    1790 <main+0x5f0>
mov    %rbx,%rdi
mov    %r15,%rsi
mov    %r12,%rdx
xor    %eax,%eax
call   1070 <fscanf@plt>
cmp    $0x1,%eax
je     1809 <main+0x669>
lea    0x921(%rip),%rdi
call   1040 <puts@plt>
movss  0xc(%rsp),%xmm0
movss  %xmm0,0x0(%r13,%r14,4)
mov    0x10(%rsp),%eax
cmp    $0x1,%eax
je     17c0 <main+0x620>
test   %eax,%eax
je     17ce <main+0x62e>
jmp    17da <main+0x63a>
cs nopw 0x0(%rax,%rax,1)
nop
cmp    $0x2,%ecx
lea    0x8e3(%rip),%r12
jl     1650 <main+0x4b0>
movss  0x20(%rsp),%xmm3
movss  0x24(%rsp),%xmm0
movaps %xmm3,%xmm1
divss  %xmm0,%xmm1
xorps  %xmm2,%xmm2
cmpeqss %xmm2,%xmm3
cmpeqss %xmm2,%xmm0
andnps %xmm1,%xmm0
andnps %xmm0,%xmm3
lea    0x740(%rsp),%r14
xor    %r13d,%r13d
movaps %xmm3,0x130(%rsp)
jmp    189a <main+0x6fa>
nopl   0x0(%rax,%rax,1)
add    $0x1,%r13
lea    -0x1(%rcx),%edx
movslq %edx,%rdx
add    $0xd0,%r14
cmp    %rdx,%r13
jge    1650 <main+0x4b0>
test   %eax,%eax
jle    1880 <main+0x6e0>
mov    0x140(%rsp,%r13,8),%rbx
xor    %ebp,%ebp
nopl   0x0(%rax,%rax,1)
movss  (%r14,%rbp,4),%xmm0
mulss  %xmm3,%xmm0
mov    %rbx,%rdi
mov    %r12,%rsi
call   1080 <fprintf@plt>
movaps 0x130(%rsp),%xmm3
add    $0x1,%rbp
movslq 0x8(%rsp),%rax
cmp    %rax,%rbp
jl     18b0 <main+0x710>
mov    0x4(%rsp),%ecx
jmp    1880 <main+0x6e0>
movl   $0x9,0x12c(%rsp)
jmp    1900 <main+0x760>
movl   $0x1d,0x80(%rsp)
nopl   0x0(%rax)
mov    $0x1,%ebx
jmp    193d <main+0x79d>
nopw   0x0(%rax,%rax,1)
xorps  %xmm0,%xmm0
cvtsi2ssl 0x60(%rsp,%rbx,4),%xmm0
mulss  0xc(%rsp),%xmm0
addss  0x20(%rsp),%xmm0
movss  %xmm0,0x20(%rsp)
add    $0x1,%rbx
movslq 0x8(%rsp),%rax
cmp    %rax,%rbx
jge    1770 <main+0x5d0>
mov    %rbp,%rdi
mov    %r15,%rsi
mov    %r12,%rdx
xor    %eax,%eax
call   1070 <fscanf@plt>
mov    0x10(%rsp),%eax
cmp    $0x1,%eax
je     1910 <main+0x770>
test   %eax,%eax
jne    192b <main+0x78b>
movss  0xc(%rsp),%xmm0
jmp    191f <main+0x77f>
lea    0x76c(%rip),%rdi
lea    0x210(%rsp),%rsi
xor    %eax,%eax
call   1060 <printf@plt>
xor    %edi,%edi
call   10c0 <exit@plt>
lea    0x7b4(%rip),%rdi
call   1040 <puts@plt>
xor    %edi,%edi
call   10c0 <exit@plt>

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

LLVM IR (-O2):
@__const.main.dpsm = [14 x i32] [i32 31, i32 15, i32 16, i32 30, i32 31, i32 30, i32 31, i32 31, i32 28, i32 31, i32 15, i32 15, i32 31, i32 30]
@__const.main.dpm = [12 x i32] [i32 31, i32 30, i32 31, i32 31, i32 28, i32 31, i32 30, i32 31, i32 30, i32 31, i32 31, i32 30]
@.str.1 = [6 x i8] c"./in/\00"
@.str.2 = [3 x i8] c"%d\00"
@.str.3 = [2 x i8] c"r\00"
@EOF = global i32 0
@.str.4 = [3 x i8] c"%s\00"
@.str.6 = [6 x i8] c"bc.ff\00"
@.str.7 = [5 x i8] c"bc.f\00"
@.str.8 = [44 x i8] c"Opening bias-corrected file %s for input. \0A\00"
@.str.9 = [29 x i8] c"ERROR opening file named %s\0A\00"
@.str.10 = [38 x i8] c"Opening output file %s for writing. \0A\00"
@.str.11 = [2 x i8] c"w\00"
@.str.12 = [3 x i8] c"%f\00"
@.str.14 = [8 x i8] c"%10.0f\0A\00"
@str = [21 x i8] c"error reading upfile\00"
@str.15 = [111 x i8] c"Wrong command line arguments: enter <config_file> <out_dir_path> <start year> <ppy> <unit switch> <file str> ,\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = alloca [5 x i32*]
%4 = alloca [5 x i32*]
%5 = alloca [10 x float]
%6 = alloca float
%7 = alloca [5 x [52 x float]]
%8 = alloca i32
%9 = alloca [100 x i8]
%10 = alloca [100 x i8]
%11 = alloca [10 x [100 x i8]]
%12 = alloca [200 x i8]
%13 = alloca [52 x i32]
%14 = bitcast [52 x i32]* %13 to i8*
%15 = alloca i32
%16 = alloca i32
%17 = alloca i32
%18 = bitcast [5 x i32*]* %3 to i8*
%19 = bitcast [5 x i32*]* %4 to i8*
%20 = bitcast [10 x float]* %5 to i8*
%21 = bitcast float* %6 to i8*
%22 = bitcast [5 x [52 x float]]* %7 to i8*
%23 = bitcast i32* %8 to i8*
%24 = getelementptr inbounds [100 x i8], [100 x i8]* %9, i64 0, i64 0
%25 = getelementptr inbounds [100 x i8], [100 x i8]* %10, i64 0, i64 0
%26 = getelementptr inbounds [10 x [100 x i8]], [10 x [100 x i8]]* %11, i64 0, i64 0, i64 0
%27 = getelementptr inbounds [200 x i8], [200 x i8]* %12, i64 0, i64 0
%28 = bitcast i32* %15 to i8*
%29 = bitcast i32* %16 to i8*
%30 = bitcast i32* %17 to i8*
%31 = icmp eq i32 %0, 7
br i1 %31, label %35, label %32
32: ; preds = %2
%33 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([111 x i8], [111 x i8]* @str.15, i64 0, i64 0))
%34 = tail call i32 @exit(i32 0)
unreachable
35: ; preds = %2
%36 = getelementptr inbounds i8*, i8** %1, i64 2
%37 = load i8*, i8** %36
%38 = call i32 @strcpy(i8* %24, i8* %37)
%39 = call i32 @strcpy(i8* %25, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0))
%40 = getelementptr inbounds i8*, i8** %1, i64 3
%41 = load i8*, i8** %40
%42 = call i32 @sscanf(i8* %41, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i32* %17)
%43 = getelementptr inbounds i8*, i8** %1, i64 4
%44 = load i8*, i8** %43
%45 = call i32 @sscanf(i8* %44, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i32* %15)
%46 = getelementptr inbounds i8*, i8** %1, i64 5
%47 = load i8*, i8** %46
%48 = call i32 @sscanf(i8* %47, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i32* %16)
%49 = getelementptr inbounds i8*, i8** %1, i64 1
%50 = load i8*, i8** %49
%51 = call i32* @fopen(i8* %50, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.3, i64 0, i64 0))
%52 = load i32, i32* %15
switch i32 %52, label %82 [
i32 52, label %53
i32 14, label %80
i32 12, label %81
]
53: ; preds = %35
%54 = bitcast [52 x i32]* %13 to <4 x i32>*
store <4 x i32> <i32 7, i32 7, i32 7, i32 7>, <4 x i32>* %54
%55 = getelementptr inbounds [52 x i32], [52 x i32]* %13, i64 0, i64 4
%56 = bitcast i32* %55 to <4 x i32>*
store <4 x i32> <i32 7, i32 7, i32 7, i32 7>, <4 x i32>* %56
%57 = getelementptr inbounds [52 x i32], [52 x i32]* %13, i64 0, i64 8
%58 = bitcast i32* %57 to <4 x i32>*
store <4 x i32> <i32 7, i32 7, i32 7, i32 7>, <4 x i32>* %58
%59 = getelementptr inbounds [52 x i32], [52 x i32]* %13, i64 0, i64 12
%60 = bitcast i32* %59 to <4 x i32>*
store <4 x i32> <i32 7, i32 7, i32 7, i32 7>, <4 x i32>* %60
%61 = getelementptr inbounds [52 x i32], [52 x i32]* %13, i64 0, i64 16
%62 = bitcast i32* %61 to <4 x i32>*
store <4 x i32> <i32 7, i32 7, i32 7, i32 7>, <4 x i32>* %62
%63 = getelementptr inbounds [52 x i32], [52 x i32]* %13, i64 0, i64 20
%64 = bitcast i32* %63 to <4 x i32>*
store <4 x i32> <i32 7, i32 7, i32 7, i32 7>, <4 x i32>* %64
%65 = getelementptr inbounds [52 x i32], [52 x i32]* %13, i64 0, i64 24
%66 = bitcast i32* %65 to <4 x i32>*
store <4 x i32> <i32 7, i32 7, i32 7, i32 7>, <4 x i32>* %66
%67 = getelementptr inbounds [52 x i32], [52 x i32]* %13, i64 0, i64 28
%68 = bitcast i32* %67 to <4 x i32>*
store <4 x i32> <i32 7, i32 7, i32 7, i32 7>, <4 x i32>* %68
%69 = getelementptr inbounds [52 x i32], [52 x i32]* %13, i64 0, i64 32
%70 = bitcast i32* %69 to <4 x i32>*
store <4 x i32> <i32 7, i32 7, i32 7, i32 7>, <4 x i32>* %70
%71 = getelementptr inbounds [52 x i32], [52 x i32]* %13, i64 0, i64 36
%72 = bitcast i32* %71 to <4 x i32>*
store <4 x i32> <i32 7, i32 7, i32 7, i32 7>, <4 x i32>* %72
%73 = getelementptr inbounds [52 x i32], [52 x i32]* %13, i64 0, i64 40
%74 = bitcast i32* %73 to <4 x i32>*
store <4 x i32> <i32 7, i32 7, i32 7, i32 7>, <4 x i32>* %74
%75 = getelementptr inbounds [52 x i32], [52 x i32]* %13, i64 0, i64 44
%76 = bitcast i32* %75 to <4 x i32>*
store <4 x i32> <i32 7, i32 7, i32 7, i32 7>, <4 x i32>* %76
%77 = getelementptr inbounds [52 x i32], [52 x i32]* %13, i64 0, i64 48
%78 = bitcast i32* %77 to <4 x i32>*
store <4 x i32> <i32 7, i32 7, i32 7, i32 7>, <4 x i32>* %78
%79 = getelementptr inbounds [52 x i32], [52 x i32]* %13, i64 0, i64 51
store i32 8, i32* %79
br label %82
80: ; preds = %35
br label %82
81: ; preds = %35
br label %82
82: ; preds = %80, %53, %81, %35
%83 = call i32 (i32*, i8*, ...) @fscanf(i32* %51, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i32* %8)
%84 = load i32, i32* @EOF
%85 = icmp eq i32 %83, %84
br i1 %85, label %339, label %86
86: ; preds = %82
%87 = getelementptr inbounds i8*, i8** %1, i64 6
%88 = getelementptr inbounds [10 x float], [10 x float]* %5, i64 0, i64 0
%89 = getelementptr inbounds [10 x float], [10 x float]* %5, i64 0, i64 1
%90 = getelementptr inbounds [52 x i32], [52 x i32]* %13, i64 0, i64 0
%91 = getelementptr inbounds [52 x i32], [52 x i32]* %13, i64 0, i64 51
%92 = getelementptr inbounds [52 x i32], [52 x i32]* %13, i64 0, i64 8
%93 = getelementptr inbounds [52 x i32], [52 x i32]* %13, i64 0, i64 4
%94 = bitcast [10 x float]* %5 to i8*
%95 = bitcast [10 x float]* %5 to i8*
br label %100
96: ; preds = %326, %322
%97 = call i32 (i32*, i8*, ...) @fscanf(i32* %51, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i32* %8)
%98 = load i32, i32* @EOF
%99 = icmp eq i32 %97, %98
br i1 %99, label %339, label %100
100: ; preds = %86, %96
%101 = phi i32* [ undef, %86 ], [ %130, %96 ]
%102 = load i32, i32* %8
%103 = icmp sgt i32 %102, 0
br i1 %103, label %118, label %128
104: ; preds = %118
%105 = icmp sgt i32 %125, 0
br i1 %105, label %106, label %128
106: ; preds = %104
%107 = call i32 @strcpy(i8* %27, i8* %24)
%108 = call i32 @strcat(i8* %27, i8* %26)
%109 = load i8*, i8** %87
%110 = call i32 @strcat(i8* %27, i8* %109)
%111 = call i32 @strcat(i8* %27, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.6, i64 0, i64 0))
%112 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([44 x i8], [44 x i8]* @.str.8, i64 0, i64 0), i8* %27)
%113 = call i32* @fopen(i8* %27, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.3, i64 0, i64 0))
%114 = icmp eq i32* %113, null
br i1 %114, label %132, label %115
115: ; preds = %106
%116 = load i32, i32* %8
%117 = icmp sgt i32 %116, 1
br i1 %117, label %135, label %128
118: ; preds = %100, %118
%119 = phi i64 [ %124, %118 ], [ 0, %100 ]
%120 = getelementptr inbounds [10 x [100 x i8]], [10 x [100 x i8]]* %11, i64 0, i64 %119
%121 = call i32 (i32*, i8*, ...) @fscanf(i32* %51, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.4, i64 0, i64 0), [100 x i8]* %120)
%122 = getelementptr inbounds [100 x i8], [100 x i8]* %120, i64 0, i64 0
%123 = call i32 @puts(i8* %122)
%124 = add nuw nsw i64 %119, 1
%125 = load i32, i32* %8
%126 = sext i32 %125 to i64
%127 = icmp slt i64 %124, %126
br i1 %127, label %118, label %104
128: ; preds = %151, %100, %115, %104
%129 = phi i32 [ %125, %104 ], [ %116, %115 ], [ %102, %100 ], [ %152, %151 ]
%130 = phi i32* [ %101, %104 ], [ %113, %115 ], [ %101, %100 ], [ %113, %151 ]
%131 = icmp sgt i32 %129, 1
br i1 %131, label %156, label %177
132: ; preds = %106
%133 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([29 x i8], [29 x i8]* @.str.9, i64 0, i64 0), i8* %27)
%134 = call i32 @exit(i32 0)
unreachable
135: ; preds = %115, %151
%136 = phi i64 [ %153, %151 ], [ 1, %115 ]
%137 = call i32 @strcpy(i8* %27, i8* %24)
%138 = getelementptr inbounds [10 x [100 x i8]], [10 x [100 x i8]]* %11, i64 0, i64 %136, i64 0
%139 = call i32 @strcat(i8* %27, i8* %138)
%140 = load i8*, i8** %87
%141 = call i32 @strcat(i8* %27, i8* %140)
%142 = call i32 @strcat(i8* %27, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.7, i64 0, i64 0))
%143 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([44 x i8], [44 x i8]* @.str.8, i64 0, i64 0), i8* %27)
%144 = call i32* @fopen(i8* %27, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.3, i64 0, i64 0))
%145 = add nsw i64 %136, -1
%146 = getelementptr inbounds [5 x i32*], [5 x i32*]* %3, i64 0, i64 %145
store i32* %144, i32** %146
%147 = icmp eq i32* %144, null
br i1 %147, label %148, label %151
148: ; preds = %135
%149 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([29 x i8], [29 x i8]* @.str.9, i64 0, i64 0), i8* %27)
%150 = call i32 @exit(i32 0)
unreachable
151: ; preds = %135
%152 = load i32, i32* %8
%153 = add nuw nsw i64 %136, 1
%154 = sext i32 %152 to i64
%155 = icmp slt i64 %153, %154
br i1 %155, label %135, label %128
156: ; preds = %128, %169
%157 = phi i64 [ %159, %169 ], [ 0, %128 ]
%158 = call i32 @strcpy(i8* %27, i8* %24)
%159 = add nuw nsw i64 %157, 1
%160 = getelementptr inbounds [10 x [100 x i8]], [10 x [100 x i8]]* %11, i64 0, i64 %159, i64 0
%161 = call i32 @strcat(i8* %27, i8* %160)
%162 = load i8*, i8** %87
%163 = call i32 @strcat(i8* %27, i8* %162)
%164 = call i32 @strcat(i8* %27, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.6, i64 0, i64 0))
%165 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([38 x i8], [38 x i8]* @.str.10, i64 0, i64 0), i8* %27)
%166 = call i32* @fopen(i8* %27, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.11, i64 0, i64 0))
%167 = getelementptr inbounds [5 x i32*], [5 x i32*]* %4, i64 0, i64 %157
store i32* %166, i32** %167
%168 = icmp eq i32* %166, null
br i1 %168, label %174, label %169
169: ; preds = %156
%170 = load i32, i32* %8
%171 = add nsw i32 %170, -1
%172 = sext i32 %171 to i64
%173 = icmp slt i64 %159, %172
br i1 %173, label %156, label %177
174: ; preds = %156
%175 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([29 x i8], [29 x i8]* @.str.9, i64 0, i64 0), i8* %27)
%176 = call i32 @exit(i32 0)
unreachable
177: ; preds = %169, %128
%178 = call i32 (i32*, i8*, ...) @fscanf(i32* %130, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.12, i64 0, i64 0), float* %88)
%179 = icmp eq i32 %178, 1
br i1 %179, label %180, label %322
180: ; preds = %177, %317
%181 = load i32, i32* %16
%182 = icmp eq i32 %181, 1
br i1 %182, label %183, label %188
183: ; preds = %180
%184 = load i32, i32* %90
%185 = sitofp i32 %184 to float
%186 = load float, float* %88
%187 = fmul float %186, %185
store float %187, float* %88
br label %188
188: ; preds = %183, %180
%189 = load i32, i32* %17
%190 = and i32 %189, 3
%191 = icmp eq i32 %190, 0
br i1 %191, label %192, label %203
192: ; preds = %188
%193 = srem i32 %189, 100
%194 = icmp eq i32 %193, 0
%195 = srem i32 %189, 400
%196 = icmp ne i32 %195, 0
%197 = and i1 %194, %196
br i1 %197, label %203, label %198
198: ; preds = %192
%199 = load i32, i32* %15
switch i32 %199, label %208 [
i32 12, label %200
i32 14, label %201
i32 52, label %202
]
200: ; preds = %198
store i32 29, i32* %93
br label %211
201: ; preds = %198
store i32 29, i32* %92
br label %211
202: ; preds = %198
store i32 9, i32* %91
br label %211
203: ; preds = %192, %188
%204 = load i32, i32* %15
switch i32 %204, label %208 [
i32 12, label %205
i32 14, label %206
i32 52, label %207
]
205: ; preds = %203
store i32 28, i32* %93
br label %211
206: ; preds = %203
store i32 28, i32* %92
br label %211
207: ; preds = %203
store i32 8, i32* %91
br label %211
208: ; preds = %203, %198
%209 = phi i32 [ %204, %203 ], [ %199, %198 ]
%210 = icmp sgt i32 %209, 1
br i1 %210, label %211, label %212
211: ; preds = %202, %207, %200, %201, %205, %206, %208
br label %216
212: ; preds = %231, %208
%213 = phi i32 [ %209, %208 ], [ %233, %231 ]
%214 = load i32, i32* %8
%215 = icmp sgt i32 %214, 1
br i1 %215, label %236, label %279
216: ; preds = %211, %231
%217 = phi i64 [ %232, %231 ], [ 1, %211 ]
%218 = call i32 (i32*, i8*, ...) @fscanf(i32* %130, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.12, i64 0, i64 0), float* %6)
%219 = load i32, i32* %16
switch i32 %219, label %231 [
i32 0, label %220
i32 1, label %224
]
220: ; preds = %216
%221 = load float, float* %6
%222 = load float, float* %88
%223 = fadd float %221, %222
store float %223, float* %88
br label %231
224: ; preds = %216
%225 = load float, float* %6
%226 = getelementptr inbounds [52 x i32], [52 x i32]* %13, i64 0, i64 %217
%227 = load i32, i32* %226
%228 = sitofp i32 %227 to float
%229 = load float, float* %88
%230 = call float @llvm.fmuladd.f32(float %225, float %228, float %229)
store float %230, float* %88
br label %231
231: ; preds = %216, %220, %224
%232 = add nuw nsw i64 %217, 1
%233 = load i32, i32* %15
%234 = sext i32 %233 to i64
%235 = icmp slt i64 %232, %234
br i1 %235, label %216, label %212
236: ; preds = %212, %272
%237 = phi i32 [ %273, %272 ], [ %214, %212 ]
%238 = phi i32 [ %274, %272 ], [ %213, %212 ]
%239 = phi i64 [ %275, %272 ], [ 0, %212 ]
%240 = icmp sgt i32 %238, 0
br i1 %240, label %241, label %272
241: ; preds = %236
%242 = getelementptr inbounds [5 x i32*], [5 x i32*]* %3, i64 0, i64 %239
%243 = load i32*, i32** %242
br label %244
244: ; preds = %241, %265
%245 = phi i64 [ 0, %241 ], [ %266, %265 ]
%246 = call i32 (i32*, i8*, ...) @fscanf(i32* %243, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.12, i64 0, i64 0), float* %6)
%247 = icmp eq i32 %246, 1
br i1 %247, label %250, label %248
248: ; preds = %244
%249 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([21 x i8], [21 x i8]* @str, i64 0, i64 0))
br label %250
250: ; preds = %248, %244
%251 = load float, float* %6
%252 = getelementptr inbounds [5 x [52 x float]], [5 x [52 x float]]* %7, i64 0, i64 %239, i64 %245
store float %251, float* %252
%253 = load i32, i32* %16
switch i32 %253, label %265 [
i32 0, label %254
i32 1, label %257
]
254: ; preds = %250
%255 = load float, float* %89
%256 = fadd float %251, %255
br label %263
257: ; preds = %250
%258 = getelementptr inbounds [52 x i32], [52 x i32]* %13, i64 0, i64 %245
%259 = load i32, i32* %258
%260 = sitofp i32 %259 to float
%261 = load float, float* %89
%262 = call float @llvm.fmuladd.f32(float %251, float %260, float %261)
br label %263
263: ; preds = %257, %254
%264 = phi float [ %256, %254 ], [ %262, %257 ]
store float %264, float* %89
br label %265
265: ; preds = %263, %250
%266 = add nuw nsw i64 %245, 1
%267 = load i32, i32* %15
%268 = sext i32 %267 to i64
%269 = icmp slt i64 %266, %268
br i1 %269, label %244, label %270
270: ; preds = %265
%271 = load i32, i32* %8
br label %272
272: ; preds = %270, %236
%273 = phi i32 [ %271, %270 ], [ %237, %236 ]
%274 = phi i32 [ %267, %270 ], [ %238, %236 ]
%275 = add nuw nsw i64 %239, 1
%276 = add nsw i32 %273, -1
%277 = sext i32 %276 to i64
%278 = icmp slt i64 %275, %277
br i1 %278, label %236, label %279
279: ; preds = %272, %212
%280 = phi i32 [ %213, %212 ], [ %274, %272 ]
%281 = phi i32 [ %214, %212 ], [ %273, %272 ]
%282 = load float, float* %88
%283 = fcmp oeq float %282, 0.000000e+00
%284 = load float, float* %89
%285 = fcmp oeq float %284, 0.000000e+00
%286 = select i1 %283, i1 true, i1 %285
%287 = fdiv float %282, %284
%288 = select i1 %286, float 0.000000e+00, float %287
%289 = icmp sgt i32 %281, 1
br i1 %289, label %290, label %317
290: ; preds = %279, %310
%291 = phi i32 [ %311, %310 ], [ %281, %279 ]
%292 = phi i32 [ %312, %310 ], [ %280, %279 ]
%293 = phi i64 [ %313, %310 ], [ 0, %279 ]
%294 = icmp sgt i32 %292, 0
br i1 %294, label %295, label %310
295: ; preds = %290
%296 = getelementptr inbounds [5 x i32*], [5 x i32*]* %4, i64 0, i64 %293
%297 = load i32*, i32** %296
br label %298
298: ; preds = %295, %298
%299 = phi i64 [ 0, %295 ], [ %304, %298 ]
%300 = getelementptr inbounds [5 x [52 x float]], [5 x [52 x float]]* %7, i64 0, i64 %293, i64 %299
%301 = load float, float* %300
%302 = fmul float %288, %301
%303 = call i32 @fprintf(i32* %297, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.14, i64 0, i64 0), float %302)
%304 = add nuw nsw i64 %299, 1
%305 = load i32, i32* %15
%306 = sext i32 %305 to i64
%307 = icmp slt i64 %304, %306
br i1 %307, label %298, label %308
308: ; preds = %298
%309 = load i32, i32* %8
br label %310
310: ; preds = %308, %290
%311 = phi i32 [ %309, %308 ], [ %291, %290 ]
%312 = phi i32 [ %305, %308 ], [ %292, %290 ]
%313 = add nuw nsw i64 %293, 1
%314 = add nsw i32 %311, -1
%315 = sext i32 %314 to i64
%316 = icmp slt i64 %313, %315
br i1 %316, label %290, label %317
317: ; preds = %310, %279
%318 = load i32, i32* %17
%319 = add nsw i32 %318, 1
store i32 %319, i32* %17
%320 = call i32 (i32*, i8*, ...) @fscanf(i32* %130, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.12, i64 0, i64 0), float* %88)
%321 = icmp eq i32 %320, 1
br i1 %321, label %180, label %322
322: ; preds = %317, %177
%323 = call i32 @fclose(i32* %130)
%324 = load i32, i32* %8
%325 = icmp sgt i32 %324, 1
br i1 %325, label %326, label %96
326: ; preds = %322, %326
%327 = phi i64 [ %334, %326 ], [ 0, %322 ]
%328 = getelementptr inbounds [5 x i32*], [5 x i32*]* %3, i64 0, i64 %327
%329 = load i32*, i32** %328
%330 = call i32 @fclose(i32* %329)
%331 = getelementptr inbounds [5 x i32*], [5 x i32*]* %4, i64 0, i64 %327
%332 = load i32*, i32** %331
%333 = call i32 @fclose(i32* %332)
%334 = add nuw nsw i64 %327, 1
%335 = load i32, i32* %8
%336 = add nsw i32 %335, -1
%337 = sext i32 %336 to i64
%338 = icmp slt i64 %334, %337
br i1 %338, label %326, label %96
339: ; preds = %96, %82
ret i32 0
}