#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*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ *fopen(char *, char *);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/ *, char *, float);
int fscanf(int /*<<< orphan*/ *, char *, float *);
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ sscanf(char *, char *, int *);
int main(int argc, char *argv[]) {
  FILE *rawfile, *rawccfile, *bcyfile, *bcmfile, *outfile;
  float sum1, sum2, sum3, sum4, data, bcmdata[52];
  float adjfrac;
  int i, j, k, year, nday, ppy;
  int dpm[12] = {31, 30, 31, 31, 28, 31, 30, 31, 30, 31, 31, 30};
  int dpsm[14] = {31, 15, 16, 30, 31, 30, 31, 31, 28, 31, 15, 15, 31, 30};
  int dpp[52], unitsw;
  if (argc != 7) {
    printf("Wrong command line arguments: enter <bcmfile> <bcyfile> <outfile> "
           "<startyear> <ppy> <unit switch>,\n");
    exit(0);
  }
  bcmfile = fopen(argv[1], "r");
  if (bcmfile == NULL)
    printf("cannot open input file %s\n", argv[1]);
  bcyfile = fopen(argv[2], "r");
  if (bcyfile == NULL)
    printf("cannot open input file %s\n", argv[2]);
  outfile = fopen(argv[3], "w");
  if (outfile == NULL)
    printf("cannot open output file %s\n", argv[3]);
  sscanf(argv[4], "%d", &year);
  sscanf(argv[5], "%d", &ppy);
  sscanf(argv[6], "%d", &unitsw);
  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];
  }
  nday = 0;
  sum1 = 0;
  sum2 = 0;
  sum3 = 0;
  sum4 = 0;
  while (fscanf(bcyfile, "%f", &sum1) == 1) {
    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 = 0; i < ppy; i++) {
      fscanf(bcmfile, "%f", &bcmdata[i]);
      if (unitsw == 0) {
        sum2 += bcmdata[i];
        nday += dpp[i];
      }
      if (unitsw == 1) {
        sum2 += dpp[i] * bcmdata[i];
        nday += dpp[i];
      }
    }
    if (sum1 == 0 || sum2 == 0)
      adjfrac = 0;
    else {
      if (unitsw == 0)
        adjfrac = (sum1) / sum2;
      if (unitsw == 1)
        adjfrac = (sum1 * nday) / sum2;
    }
    for (j = 0; j < ppy; j++) {
      fprintf(outfile, "%10.3f\n", adjfrac * bcmdata[j]);
    }
    nday = 0;
    year++;
    sum1 = 0;
    sum2 = 0;
    sum3 = 0;
    sum4 = 0;
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x290,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    -0x170(%rbp),%rdi
lea    0xe69(%rip),%rsi
mov    $0x30,%edx
call   1060 <memcpy@plt>
lea    -0x1b0(%rbp),%rdi
lea    0xe81(%rip),%rsi
mov    $0x38,%edx
call   1060 <memcpy@plt>
cmpl   $0x7,-0x8(%rbp)
je     11d8 <main+0x68>
lea    0xe9e(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
xor    %edi,%edi
call   1090 <exit@plt>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
lea    0xee5(%rip),%rsi
call   1080 <fopen@plt>
mov    %rax,-0x30(%rbp)
cmpq   $0x0,-0x30(%rbp)
jne    1211 <main+0xa1>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rsi
lea    0xec4(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x10(%rbp),%rax
mov    0x10(%rax),%rdi
lea    0xeac(%rip),%rsi
call   1080 <fopen@plt>
mov    %rax,-0x28(%rbp)
cmpq   $0x0,-0x28(%rbp)
jne    124a <main+0xda>
mov    -0x10(%rbp),%rax
mov    0x10(%rax),%rsi
lea    0xe8b(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x10(%rbp),%rax
mov    0x18(%rax),%rdi
lea    0xe90(%rip),%rsi
call   1080 <fopen@plt>
mov    %rax,-0x38(%rbp)
cmpq   $0x0,-0x38(%rbp)
jne    1283 <main+0x113>
mov    -0x10(%rbp),%rax
mov    0x18(%rax),%rsi
lea    0xe6f(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x10(%rbp),%rax
mov    0x20(%rax),%rdi
lea    0xe75(%rip),%rsi
lea    -0x134(%rbp),%rdx
call   1070 <sscanf@plt>
mov    -0x10(%rbp),%rax
mov    0x28(%rax),%rdi
lea    0xe5a(%rip),%rsi
lea    -0x13c(%rbp),%rdx
call   1070 <sscanf@plt>
mov    -0x10(%rbp),%rax
mov    0x30(%rax),%rdi
lea    0xe3f(%rip),%rsi
lea    -0x284(%rbp),%rdx
call   1070 <sscanf@plt>
cmpl   $0x34,-0x13c(%rbp)
jne    1328 <main+0x1b8>
movl   $0x0,-0x128(%rbp)
cmpl   $0x34,-0x128(%rbp)
jge    131e <main+0x1ae>
movslq -0x128(%rbp),%rax
movl   $0x7,-0x280(%rbp,%rax,4)
mov    -0x128(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x128(%rbp)
jmp    12eb <main+0x17b>
movl   $0x8,-0x1b4(%rbp)
cmpl   $0xe,-0x13c(%rbp)
jne    1381 <main+0x211>
movl   $0x0,-0x128(%rbp)
cmpl   $0xe,-0x128(%rbp)
jge    137c <main+0x20c>
movslq -0x128(%rbp),%rax
mov    -0x1b0(%rbp,%rax,4),%ecx
movslq -0x128(%rbp),%rax
mov    %ecx,-0x280(%rbp,%rax,4)
mov    -0x128(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x128(%rbp)
jmp    133f <main+0x1cf>
jmp    1381 <main+0x211>
cmpl   $0xc,-0x13c(%rbp)
jne    13da <main+0x26a>
movl   $0x0,-0x128(%rbp)
cmpl   $0xc,-0x128(%rbp)
jge    13d5 <main+0x265>
movslq -0x128(%rbp),%rax
mov    -0x170(%rbp,%rax,4),%ecx
movslq -0x128(%rbp),%rax
mov    %ecx,-0x280(%rbp,%rax,4)
mov    -0x128(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x128(%rbp)
jmp    1398 <main+0x228>
jmp    13da <main+0x26a>
movl   $0x0,-0x138(%rbp)
xorps  %xmm0,%xmm0
movss  %xmm0,-0x3c(%rbp)
xorps  %xmm0,%xmm0
movss  %xmm0,-0x40(%rbp)
xorps  %xmm0,%xmm0
movss  %xmm0,-0x44(%rbp)
xorps  %xmm0,%xmm0
movss  %xmm0,-0x48(%rbp)
mov    -0x28(%rbp),%rdi
lea    0xcfb(%rip),%rsi
lea    -0x3c(%rbp),%rdx
call   1040 <fscanf@plt>
cmp    $0x1,%eax
jne    1735 <main+0x5c5>
mov    -0x134(%rbp),%eax
mov    $0x4,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
jne    14cf <main+0x35f>
mov    -0x134(%rbp),%eax
mov    $0x64,%ecx
cltd
idiv   %ecx
xor    %eax,%eax
cmp    $0x0,%edx
mov    %al,-0x285(%rbp)
jne    1471 <main+0x301>
mov    -0x134(%rbp),%eax
mov    $0x190,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
setne  %al
mov    %al,-0x285(%rbp)
mov    -0x285(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
cmp    $0x0,%eax
jne    14cf <main+0x35f>
cmpl   $0xc,-0x13c(%rbp)
jne    149c <main+0x32c>
movl   $0x1d,-0x270(%rbp)
cmpl   $0xe,-0x13c(%rbp)
jne    14b3 <main+0x343>
movl   $0x1d,-0x260(%rbp)
cmpl   $0x34,-0x13c(%rbp)
jne    14ca <main+0x35a>
movl   $0x9,-0x1b4(%rbp)
jmp    1519 <main+0x3a9>
cmpl   $0xc,-0x13c(%rbp)
jne    14e6 <main+0x376>
movl   $0x1c,-0x270(%rbp)
cmpl   $0xe,-0x13c(%rbp)
jne    14fd <main+0x38d>
movl   $0x1c,-0x260(%rbp)
cmpl   $0x34,-0x13c(%rbp)
jne    1514 <main+0x3a4>
movl   $0x8,-0x1b4(%rbp)
jmp    1519 <main+0x3a9>
movl   $0x0,-0x128(%rbp)
mov    -0x128(%rbp),%eax
cmp    -0x13c(%rbp),%eax
jge    160d <main+0x49d>
mov    -0x30(%rbp),%rdi
movslq -0x128(%rbp),%rax
lea    -0x120(%rbp),%rdx
shl    $0x2,%rax
add    %rax,%rdx
lea    0xbb5(%rip),%rsi
call   1040 <fscanf@plt>
cmpl   $0x0,-0x284(%rbp)
jne    159b <main+0x42b>
movslq -0x128(%rbp),%rax
movss  -0x120(%rbp,%rax,4),%xmm0
ff ff
addss  -0x40(%rbp),%xmm0
movss  %xmm0,-0x40(%rbp)
movslq -0x128(%rbp),%rax
mov    -0x280(%rbp,%rax,4),%eax
add    -0x138(%rbp),%eax
mov    %eax,-0x138(%rbp)
cmpl   $0x1,-0x284(%rbp)
jne    15f4 <main+0x484>
movslq -0x128(%rbp),%rax
cvtsi2ssl -0x280(%rbp,%rax,4),%xmm0
ff ff
movslq -0x128(%rbp),%rax
movss  -0x120(%rbp,%rax,4),%xmm2
ff ff
movss  -0x40(%rbp),%xmm1
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
movss  %xmm0,-0x40(%rbp)
movslq -0x128(%rbp),%rax
mov    -0x280(%rbp,%rax,4),%eax
add    -0x138(%rbp),%eax
mov    %eax,-0x138(%rbp)
jmp    15f9 <main+0x489>
mov    -0x128(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x128(%rbp)
jmp    1523 <main+0x3b3>
movss  -0x3c(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomiss %xmm1,%xmm0
jne    1629 <main+0x4b9>
jp     1629 <main+0x4b9>
jmp    1640 <main+0x4d0>
movss  -0x40(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomiss %xmm1,%xmm0
jne    1650 <main+0x4e0>
jp     1650 <main+0x4e0>
xorps  %xmm0,%xmm0
movss  %xmm0,-0x124(%rbp)
ff
jmp    169f <main+0x52f>
cmpl   $0x0,-0x284(%rbp)
jne    166f <main+0x4ff>
movss  -0x3c(%rbp),%xmm0
divss  -0x40(%rbp),%xmm0
movss  %xmm0,-0x124(%rbp)
ff
cmpl   $0x1,-0x284(%rbp)
jne    169a <main+0x52a>
movss  -0x3c(%rbp),%xmm0
cvtsi2ssl -0x138(%rbp),%xmm1
ff
mulss  %xmm1,%xmm0
divss  -0x40(%rbp),%xmm0
movss  %xmm0,-0x124(%rbp)
ff
jmp    169f <main+0x52f>
movl   $0x0,-0x12c(%rbp)
mov    -0x12c(%rbp),%eax
cmp    -0x13c(%rbp),%eax
jge    16f7 <main+0x587>
mov    -0x38(%rbp),%rdi
movss  -0x124(%rbp),%xmm0
ff
movslq -0x12c(%rbp),%rax
mulss  -0x120(%rbp,%rax,4),%xmm0
ff ff
lea    0xa2f(%rip),%rsi
call   1050 <fprintf@plt>
mov    -0x12c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x12c(%rbp)
jmp    16a9 <main+0x539>
movl   $0x0,-0x138(%rbp)
mov    -0x134(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x134(%rbp)
xorps  %xmm0,%xmm0
movss  %xmm0,-0x3c(%rbp)
xorps  %xmm0,%xmm0
movss  %xmm0,-0x40(%rbp)
xorps  %xmm0,%xmm0
movss  %xmm0,-0x44(%rbp)
xorps  %xmm0,%xmm0
movss  %xmm0,-0x48(%rbp)
jmp    1404 <main+0x294>
mov    -0x4(%rbp),%eax
add    $0x290,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x1d8,%rsp
cmp    $0x7,%edi
jne    15d5 <main+0x465>
mov    %rsi,%rbp
mov    0x8(%rsi),%rdi
lea    0xef0(%rip),%rsi
call   1080 <fopen@plt>
mov    %rax,%r12
test   %rax,%rax
jne    11b7 <main+0x47>
mov    0x8(%rbp),%rsi
lea    0xeda(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x10(%rbp),%rdi
lea    0xec6(%rip),%rsi
call   1080 <fopen@plt>
mov    %rax,0x20(%rsp)
test   %rax,%rax
jne    11e3 <main+0x73>
mov    0x10(%rbp),%rsi
lea    0xeae(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x18(%rbp),%rdi
lea    0xeb7(%rip),%rsi
call   1080 <fopen@plt>
mov    %rax,%r14
test   %rax,%rax
jne    120d <main+0x9d>
mov    0x18(%rbp),%rsi
lea    0xea1(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x20(%rbp),%rdi
lea    0xeab(%rip),%rbx
lea    0x1c(%rsp),%rdx
mov    %rbx,%rsi
call   1070 <sscanf@plt>
mov    0x28(%rbp),%rdi
lea    0xc(%rsp),%rdx
mov    %rbx,%rsi
call   1070 <sscanf@plt>
mov    0x30(%rbp),%rdi
lea    0x18(%rsp),%rdx
mov    %rbx,%rsi
call   1070 <sscanf@plt>
mov    0xc(%rsp),%eax
cmp    $0xc,%eax
je     12cf <main+0x15f>
cmp    $0xe,%eax
je     12f0 <main+0x180>
cmp    $0x34,%eax
jne    1320 <main+0x1b0>
movaps 0xd97(%rip),%xmm0
movaps %xmm0,0x30(%rsp)
movaps %xmm0,0x40(%rsp)
movaps %xmm0,0x50(%rsp)
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)
movl   $0x8,0xfc(%rsp)
jmp    1320 <main+0x1b0>
movaps 0xd6a(%rip),%xmm0
movaps %xmm0,0x50(%rsp)
movaps 0xd4e(%rip),%xmm0
movaps %xmm0,0x40(%rsp)
movaps 0xd32(%rip),%xmm0
jmp    131b <main+0x1ab>
mov    0xd89(%rip),%rax
mov    %rax,0x60(%rsp)
movaps 0xd6d(%rip),%xmm0
movaps %xmm0,0x50(%rsp)
movaps 0xd51(%rip),%xmm0
movaps %xmm0,0x40(%rsp)
movaps 0xd35(%rip),%xmm0
movaps %xmm0,0x30(%rsp)
movl   $0x0,0x10(%rsp)
lea    0xd97(%rip),%rsi
lea    0x10(%rsp),%rdx
mov    0x20(%rsp),%rdi
call   1050 <fscanf@plt>
cmp    $0x1,%eax
jne    15c1 <main+0x451>
lea    0xd78(%rip),%rbx
mov    %r14,0x28(%rsp)
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
mov    0x1c(%rsp),%eax
test   $0x3,%al
jne    13a0 <main+0x230>
imul   $0xc28f5c29,%eax,%ecx
add    $0x51eb850,%ecx
ror    $0x2,%ecx
cmp    $0x28f5c28,%ecx
ja     13dd <main+0x26d>
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     13dd <main+0x26d>
mov    0xc(%rsp),%eax
cmp    $0x34,%eax
je     13d0 <main+0x260>
cmp    $0xe,%eax
je     13c0 <main+0x250>
cmp    $0xc,%eax
jne    1400 <main+0x290>
movl   $0x1c,0x40(%rsp)
jmp    1430 <main+0x2c0>
nopl   (%rax)
movl   $0x1c,0x50(%rsp)
jmp    1430 <main+0x2c0>
nopw   0x0(%rax,%rax,1)
movl   $0x8,0xfc(%rsp)
jmp    1430 <main+0x2c0>
mov    0xc(%rsp),%eax
cmp    $0x34,%eax
je     1412 <main+0x2a2>
cmp    $0xe,%eax
je     141f <main+0x2af>
cmp    $0xc,%eax
jne    1400 <main+0x290>
movl   $0x1d,0x40(%rsp)
jmp    1430 <main+0x2c0>
nopw   0x0(%rax,%rax,1)
test   %eax,%eax
jg     1430 <main+0x2c0>
xorps  %xmm0,%xmm0
movss  %xmm0,0x8(%rsp)
jmp    1593 <main+0x423>
movl   $0x9,0xfc(%rsp)
jmp    1430 <main+0x2c0>
movl   $0x1d,0x50(%rsp)
nopw   0x0(%rax,%rax,1)
movss  %xmm0,0x14(%rsp)
xorps  %xmm0,%xmm0
movss  %xmm0,0x8(%rsp)
xor    %r13d,%r13d
lea    0x100(%rsp),%rbp
lea    0x30(%rsp),%r15
xor    %r14d,%r14d
jmp    1498 <main+0x328>
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
mov    (%r15),%eax
xorps  %xmm0,%xmm0
cvtsi2ss %eax,%xmm0
mulss  0x0(%rbp),%xmm0
movss  0x8(%rsp),%xmm1
addss  %xmm0,%xmm1
movss  %xmm1,0x8(%rsp)
add    %eax,%r14d
add    $0x1,%r13
movslq 0xc(%rsp),%rax
add    $0x4,%r15
add    $0x4,%rbp
cmp    %rax,%r13
jge    14d0 <main+0x360>
mov    %r12,%rdi
mov    %rbx,%rsi
mov    %rbp,%rdx
call   1050 <fscanf@plt>
mov    0x18(%rsp),%eax
cmp    $0x1,%eax
je     1460 <main+0x2f0>
test   %eax,%eax
jne    1482 <main+0x312>
movss  0x8(%rsp),%xmm0
addss  0x0(%rbp),%xmm0
movss  %xmm0,0x8(%rsp)
add    (%r15),%r14d
jmp    1482 <main+0x312>
nopl   0x0(%rax)
movss  0x10(%rsp),%xmm0
xorps  %xmm2,%xmm2
ucomiss %xmm2,%xmm0
jne    14e0 <main+0x370>
jnp    1540 <main+0x3d0>
movss  0x8(%rsp),%xmm1
ucomiss 0xb23(%rip),%xmm1
lea    0xbd5(%rip),%r15
jne    14f8 <main+0x388>
jnp    1547 <main+0x3d7>
mov    0x18(%rsp),%ecx
test   %ecx,%ecx
jne    150f <main+0x39f>
movaps %xmm0,%xmm1
divss  0x8(%rsp),%xmm1
movss  %xmm1,0x14(%rsp)
movss  0x14(%rsp),%xmm2
cmp    $0x1,%ecx
jne    1547 <main+0x3d7>
xorps  %xmm1,%xmm1
cvtsi2ss %r14d,%xmm1
mulss  %xmm1,%xmm0
divss  0x8(%rsp),%xmm0
movaps %xmm0,%xmm2
jmp    1547 <main+0x3d7>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
lea    0xb82(%rip),%r15
test   %eax,%eax
movss  %xmm2,0x8(%rsp)
jle    158c <main+0x41c>
xor    %ebp,%ebp
mov    0x28(%rsp),%rbx
nopl   0x0(%rax,%rax,1)
movss  0x100(%rsp,%rbp,4),%xmm0
mulss  %xmm2,%xmm0
mov    %rbx,%rdi
mov    %r15,%rsi
call   1060 <fprintf@plt>
movss  0x8(%rsp),%xmm2
add    $0x1,%rbp
movslq 0xc(%rsp),%rax
cmp    %rax,%rbp
jl     1560 <main+0x3f0>
lea    0xb33(%rip),%rbx
addl   $0x1,0x1c(%rsp)
movl   $0x0,0x10(%rsp)
mov    0x20(%rsp),%rdi
mov    %rbx,%rsi
lea    0x10(%rsp),%rdx
call   1050 <fscanf@plt>
movss  0x8(%rsp),%xmm0
cmp    $0x1,%eax
je     1360 <main+0x1f0>
xor    %eax,%eax
add    $0x1d8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
lea    0xaf5(%rip),%rdi
call   1030 <puts@plt>
xor    %edi,%edi
call   1090 <exit@plt>

LLVM IR (-O0):
@__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]
@__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]
@.str = [100 x i8] c"Wrong command line arguments: enter <bcmfile> <bcyfile> <outfile> <startyear> <ppy> <unit switch>,\0A\00"
@.str.1 = [2 x i8] c"r\00"
@.str.2 = [27 x i8] c"cannot open input file %s\0A\00"
@.str.3 = [2 x i8] c"w\00"
@.str.4 = [28 x i8] c"cannot open output file %s\0A\00"
@.str.5 = [3 x i8] c"%d\00"
@.str.6 = [3 x i8] c"%f\00"
@.str.7 = [8 x i8] c"%10.3f\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 i32*
%9 = alloca i32*
%10 = alloca i32*
%11 = alloca float
%12 = alloca float
%13 = alloca float
%14 = alloca float
%15 = alloca float
%16 = alloca [52 x float]
%17 = alloca float
%18 = alloca i32
%19 = alloca i32
%20 = alloca i32
%21 = alloca i32
%22 = alloca i32
%23 = alloca i32
%24 = alloca [12 x i32]
%25 = alloca [14 x i32]
%26 = alloca [52 x i32]
%27 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%28 = bitcast [12 x i32]* %24 to i8*
%29 = bitcast [14 x i32]* %25 to i8*
%30 = load i32, i32* %4
%31 = icmp ne i32 %30, 7
br i1 %31, label %32, label %35
32: ; preds = %2
%33 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([100 x i8], [100 x i8]* @.str, i64 0, i64 0))
%34 = call i32 @exit(i32 0)
unreachable
35: ; preds = %2
%36 = load i8**, i8*** %5
%37 = getelementptr inbounds i8*, i8** %36, i64 1
%38 = load i8*, i8** %37
%39 = call i32* @fopen(i8* %38, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
store i32* %39, i32** %9
%40 = load i32*, i32** %9
%41 = icmp eq i32* %40, null
br i1 %41, label %42, label %47
42: ; preds = %35
%43 = load i8**, i8*** %5
%44 = getelementptr inbounds i8*, i8** %43, i64 1
%45 = load i8*, i8** %44
%46 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.2, i64 0, i64 0), i8* %45)
br label %47
47: ; preds = %42, %35
%48 = load i8**, i8*** %5
%49 = getelementptr inbounds i8*, i8** %48, i64 2
%50 = load i8*, i8** %49
%51 = call i32* @fopen(i8* %50, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
store i32* %51, i32** %8
%52 = load i32*, i32** %8
%53 = icmp eq i32* %52, null
br i1 %53, label %54, label %59
54: ; preds = %47
%55 = load i8**, i8*** %5
%56 = getelementptr inbounds i8*, i8** %55, i64 2
%57 = load i8*, i8** %56
%58 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.2, i64 0, i64 0), i8* %57)
br label %59
59: ; preds = %54, %47
%60 = load i8**, i8*** %5
%61 = getelementptr inbounds i8*, i8** %60, i64 3
%62 = load i8*, i8** %61
%63 = call i32* @fopen(i8* %62, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.3, i64 0, i64 0))
store i32* %63, i32** %10
%64 = load i32*, i32** %10
%65 = icmp eq i32* %64, null
br i1 %65, label %66, label %71
66: ; preds = %59
%67 = load i8**, i8*** %5
%68 = getelementptr inbounds i8*, i8** %67, i64 3
%69 = load i8*, i8** %68
%70 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.4, i64 0, i64 0), i8* %69)
br label %71
71: ; preds = %66, %59
%72 = load i8**, i8*** %5
%73 = getelementptr inbounds i8*, i8** %72, i64 4
%74 = load i8*, i8** %73
%75 = call i32 @sscanf(i8* %74, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.5, i64 0, i64 0), i32* %21)
%76 = load i8**, i8*** %5
%77 = getelementptr inbounds i8*, i8** %76, i64 5
%78 = load i8*, i8** %77
%79 = call i32 @sscanf(i8* %78, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.5, i64 0, i64 0), i32* %23)
%80 = load i8**, i8*** %5
%81 = getelementptr inbounds i8*, i8** %80, i64 6
%82 = load i8*, i8** %81
%83 = call i32 @sscanf(i8* %82, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.5, i64 0, i64 0), i32* %27)
%84 = load i32, i32* %23
%85 = icmp eq i32 %84, 52
br i1 %85, label %86, label %99
86: ; preds = %71
store i32 0, i32* %18
br label %87
87: ; preds = %94, %86
%88 = load i32, i32* %18
%89 = icmp slt i32 %88, 52
br i1 %89, label %90, label %97
90: ; preds = %87
%91 = load i32, i32* %18
%92 = sext i32 %91 to i64
%93 = getelementptr inbounds [52 x i32], [52 x i32]* %26, i64 0, i64 %92
store i32 7, i32* %93
br label %94
94: ; preds = %90
%95 = load i32, i32* %18
%96 = add nsw i32 %95, 1
store i32 %96, i32* %18
br label %87
97: ; preds = %87
%98 = getelementptr inbounds [52 x i32], [52 x i32]* %26, i64 0, i64 51
store i32 8, i32* %98
br label %99
99: ; preds = %97, %71
%100 = load i32, i32* %23
%101 = icmp eq i32 %100, 14
br i1 %101, label %102, label %118
102: ; preds = %99
store i32 0, i32* %18
br label %103
103: ; preds = %114, %102
%104 = load i32, i32* %18
%105 = icmp slt i32 %104, 14
br i1 %105, label %106, label %117
106: ; preds = %103
%107 = load i32, i32* %18
%108 = sext i32 %107 to i64
%109 = getelementptr inbounds [14 x i32], [14 x i32]* %25, i64 0, i64 %108
%110 = load i32, i32* %109
%111 = load i32, i32* %18
%112 = sext i32 %111 to i64
%113 = getelementptr inbounds [52 x i32], [52 x i32]* %26, i64 0, i64 %112
store i32 %110, i32* %113
br label %114
114: ; preds = %106
%115 = load i32, i32* %18
%116 = add nsw i32 %115, 1
store i32 %116, i32* %18
br label %103
117: ; preds = %103
br label %118
118: ; preds = %117, %99
%119 = load i32, i32* %23
%120 = icmp eq i32 %119, 12
br i1 %120, label %121, label %137
121: ; preds = %118
store i32 0, i32* %18
br label %122
122: ; preds = %133, %121
%123 = load i32, i32* %18
%124 = icmp slt i32 %123, 12
br i1 %124, label %125, label %136
125: ; preds = %122
%126 = load i32, i32* %18
%127 = sext i32 %126 to i64
%128 = getelementptr inbounds [12 x i32], [12 x i32]* %24, i64 0, i64 %127
%129 = load i32, i32* %128
%130 = load i32, i32* %18
%131 = sext i32 %130 to i64
%132 = getelementptr inbounds [52 x i32], [52 x i32]* %26, i64 0, i64 %131
store i32 %129, i32* %132
br label %133
133: ; preds = %125
%134 = load i32, i32* %18
%135 = add nsw i32 %134, 1
store i32 %135, i32* %18
br label %122
136: ; preds = %122
br label %137
137: ; preds = %136, %118
store i32 0, i32* %22
store float 0.000000e+00, float* %11
store float 0.000000e+00, float* %12
store float 0.000000e+00, float* %13
store float 0.000000e+00, float* %14
br label %138
138: ; preds = %283, %137
%139 = load i32*, i32** %8
%140 = call i32 @fscanf(i32* %139, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.6, i64 0, i64 0), float* %11)
%141 = icmp eq i32 %140, 1
br i1 %141, label %142, label %286
142: ; preds = %138
%143 = load i32, i32* %21
%144 = srem i32 %143, 4
%145 = icmp eq i32 %144, 0
br i1 %145, label %146, label %174
146: ; preds = %142
%147 = load i32, i32* %21
%148 = srem i32 %147, 100
%149 = icmp eq i32 %148, 0
br i1 %149, label %150, label %154
150: ; preds = %146
%151 = load i32, i32* %21
%152 = srem i32 %151, 400
%153 = icmp ne i32 %152, 0
br label %154
154: ; preds = %150, %146
%155 = phi i1 [ false, %146 ], [ %153, %150 ]
%156 = zext i1 %155 to i32
%157 = icmp eq i32 %156, 0
br i1 %157, label %158, label %174
158: ; preds = %154
%159 = load i32, i32* %23
%160 = icmp eq i32 %159, 12
br i1 %160, label %161, label %163
161: ; preds = %158
%162 = getelementptr inbounds [52 x i32], [52 x i32]* %26, i64 0, i64 4
store i32 29, i32* %162
br label %163
163: ; preds = %161, %158
%164 = load i32, i32* %23
%165 = icmp eq i32 %164, 14
br i1 %165, label %166, label %168
166: ; preds = %163
%167 = getelementptr inbounds [52 x i32], [52 x i32]* %26, i64 0, i64 8
store i32 29, i32* %167
br label %168
168: ; preds = %166, %163
%169 = load i32, i32* %23
%170 = icmp eq i32 %169, 52
br i1 %170, label %171, label %173
171: ; preds = %168
%172 = getelementptr inbounds [52 x i32], [52 x i32]* %26, i64 0, i64 51
store i32 9, i32* %172
br label %173
173: ; preds = %171, %168
br label %190
174: ; preds = %154, %142
%175 = load i32, i32* %23
%176 = icmp eq i32 %175, 12
br i1 %176, label %177, label %179
177: ; preds = %174
%178 = getelementptr inbounds [52 x i32], [52 x i32]* %26, i64 0, i64 4
store i32 28, i32* %178
br label %179
179: ; preds = %177, %174
%180 = load i32, i32* %23
%181 = icmp eq i32 %180, 14
br i1 %181, label %182, label %184
182: ; preds = %179
%183 = getelementptr inbounds [52 x i32], [52 x i32]* %26, i64 0, i64 8
store i32 28, i32* %183
br label %184
184: ; preds = %182, %179
%185 = load i32, i32* %23
%186 = icmp eq i32 %185, 52
br i1 %186, label %187, label %189
187: ; preds = %184
%188 = getelementptr inbounds [52 x i32], [52 x i32]* %26, i64 0, i64 51
store i32 8, i32* %188
br label %189
189: ; preds = %187, %184
br label %190
190: ; preds = %189, %173
store i32 0, i32* %18
br label %191
191: ; preds = %238, %190
%192 = load i32, i32* %18
%193 = load i32, i32* %23
%194 = icmp slt i32 %192, %193
br i1 %194, label %195, label %241
195: ; preds = %191
%196 = load i32*, i32** %9
%197 = load i32, i32* %18
%198 = sext i32 %197 to i64
%199 = getelementptr inbounds [52 x float], [52 x float]* %16, i64 0, i64 %198
%200 = call i32 @fscanf(i32* %196, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.6, i64 0, i64 0), float* %199)
%201 = load i32, i32* %27
%202 = icmp eq i32 %201, 0
br i1 %202, label %203, label %216
203: ; preds = %195
%204 = load i32, i32* %18
%205 = sext i32 %204 to i64
%206 = getelementptr inbounds [52 x float], [52 x float]* %16, i64 0, i64 %205
%207 = load float, float* %206
%208 = load float, float* %12
%209 = fadd float %208, %207
store float %209, float* %12
%210 = load i32, i32* %18
%211 = sext i32 %210 to i64
%212 = getelementptr inbounds [52 x i32], [52 x i32]* %26, i64 0, i64 %211
%213 = load i32, i32* %212
%214 = load i32, i32* %22
%215 = add nsw i32 %214, %213
store i32 %215, i32* %22
br label %216
216: ; preds = %203, %195
%217 = load i32, i32* %27
%218 = icmp eq i32 %217, 1
br i1 %218, label %219, label %237
219: ; preds = %216
%220 = load i32, i32* %18
%221 = sext i32 %220 to i64
%222 = getelementptr inbounds [52 x i32], [52 x i32]* %26, i64 0, i64 %221
%223 = load i32, i32* %222
%224 = sitofp i32 %223 to float
%225 = load i32, i32* %18
%226 = sext i32 %225 to i64
%227 = getelementptr inbounds [52 x float], [52 x float]* %16, i64 0, i64 %226
%228 = load float, float* %227
%229 = load float, float* %12
%230 = call float @llvm.fmuladd.f32(float %224, float %228, float %229)
store float %230, float* %12
%231 = load i32, i32* %18
%232 = sext i32 %231 to i64
%233 = getelementptr inbounds [52 x i32], [52 x i32]* %26, i64 0, i64 %232
%234 = load i32, i32* %233
%235 = load i32, i32* %22
%236 = add nsw i32 %235, %234
store i32 %236, i32* %22
br label %237
237: ; preds = %219, %216
br label %238
238: ; preds = %237
%239 = load i32, i32* %18
%240 = add nsw i32 %239, 1
store i32 %240, i32* %18
br label %191
241: ; preds = %191
%242 = load float, float* %11
%243 = fcmp oeq float %242, 0.000000e+00
br i1 %243, label %247, label %244
244: ; preds = %241
%245 = load float, float* %12
%246 = fcmp oeq float %245, 0.000000e+00
br i1 %246, label %247, label %248
247: ; preds = %244, %241
store float 0.000000e+00, float* %17
br label %266
248: ; preds = %244
%249 = load i32, i32* %27
%250 = icmp eq i32 %249, 0
br i1 %250, label %251, label %255
251: ; preds = %248
%252 = load float, float* %11
%253 = load float, float* %12
%254 = fdiv float %252, %253
store float %254, float* %17
br label %255
255: ; preds = %251, %248
%256 = load i32, i32* %27
%257 = icmp eq i32 %256, 1
br i1 %257, label %258, label %265
258: ; preds = %255
%259 = load float, float* %11
%260 = load i32, i32* %22
%261 = sitofp i32 %260 to float
%262 = fmul float %259, %261
%263 = load float, float* %12
%264 = fdiv float %262, %263
store float %264, float* %17
br label %265
265: ; preds = %258, %255
br label %266
266: ; preds = %265, %247
store i32 0, i32* %19
br label %267
267: ; preds = %280, %266
%268 = load i32, i32* %19
%269 = load i32, i32* %23
%270 = icmp slt i32 %268, %269
br i1 %270, label %271, label %283
271: ; preds = %267
%272 = load i32*, i32** %10
%273 = load float, float* %17
%274 = load i32, i32* %19
%275 = sext i32 %274 to i64
%276 = getelementptr inbounds [52 x float], [52 x float]* %16, i64 0, i64 %275
%277 = load float, float* %276
%278 = fmul float %273, %277
%279 = call i32 @fprintf(i32* %272, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.7, i64 0, i64 0), float %278)
br label %280
280: ; preds = %271
%281 = load i32, i32* %19
%282 = add nsw i32 %281, 1
store i32 %282, i32* %19
br label %267
283: ; preds = %267
store i32 0, i32* %22
%284 = load i32, i32* %21
%285 = add nsw i32 %284, 1
store i32 %285, i32* %21
store float 0.000000e+00, float* %11
store float 0.000000e+00, float* %12
store float 0.000000e+00, float* %13
store float 0.000000e+00, float* %14
br label %138
286: ; preds = %138
%287 = load i32, i32* %3
ret i32 %287
}

LLVM IR (-O2):
@__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]
@__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]
@.str.1 = [2 x i8] c"r\00"
@.str.2 = [27 x i8] c"cannot open input file %s\0A\00"
@.str.3 = [2 x i8] c"w\00"
@.str.4 = [28 x i8] c"cannot open output file %s\0A\00"
@.str.5 = [3 x i8] c"%d\00"
@.str.6 = [3 x i8] c"%f\00"
@.str.7 = [8 x i8] c"%10.3f\0A\00"
@str = [99 x i8] c"Wrong command line arguments: enter <bcmfile> <bcyfile> <outfile> <startyear> <ppy> <unit switch>,\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = alloca float
%4 = alloca [52 x float]
%5 = alloca i32
%6 = alloca i32
%7 = alloca [52 x i32]
%8 = bitcast [52 x i32]* %7 to i8*
%9 = alloca i32
%10 = bitcast float* %3 to i8*
%11 = bitcast [52 x float]* %4 to i8*
%12 = bitcast i32* %5 to i8*
%13 = bitcast i32* %6 to i8*
%14 = bitcast i32* %9 to i8*
%15 = icmp eq i32 %0, 7
br i1 %15, label %19, label %16
16: ; preds = %2
%17 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([99 x i8], [99 x i8]* @str, i64 0, i64 0))
%18 = tail call i32 @exit(i32 0)
unreachable
19: ; preds = %2
%20 = getelementptr inbounds i8*, i8** %1, i64 1
%21 = load i8*, i8** %20
%22 = tail call i32* @fopen(i8* %21, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%23 = icmp eq i32* %22, null
br i1 %23, label %24, label %27
24: ; preds = %19
%25 = load i8*, i8** %20
%26 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([27 x i8], [27 x i8]* @.str.2, i64 0, i64 0), i8* %25)
br label %27
27: ; preds = %24, %19
%28 = getelementptr inbounds i8*, i8** %1, i64 2
%29 = load i8*, i8** %28
%30 = tail call i32* @fopen(i8* %29, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%31 = icmp eq i32* %30, null
br i1 %31, label %32, label %35
32: ; preds = %27
%33 = load i8*, i8** %28
%34 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([27 x i8], [27 x i8]* @.str.2, i64 0, i64 0), i8* %33)
br label %35
35: ; preds = %32, %27
%36 = getelementptr inbounds i8*, i8** %1, i64 3
%37 = load i8*, i8** %36
%38 = tail call i32* @fopen(i8* %37, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.3, i64 0, i64 0))
%39 = icmp eq i32* %38, null
br i1 %39, label %40, label %43
40: ; preds = %35
%41 = load i8*, i8** %36
%42 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([28 x i8], [28 x i8]* @.str.4, i64 0, i64 0), i8* %41)
br label %43
43: ; preds = %40, %35
%44 = getelementptr inbounds i8*, i8** %1, i64 4
%45 = load i8*, i8** %44
%46 = call i32 @sscanf(i8* %45, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.5, i64 0, i64 0), i32* %5)
%47 = getelementptr inbounds i8*, i8** %1, i64 5
%48 = load i8*, i8** %47
%49 = call i32 @sscanf(i8* %48, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.5, i64 0, i64 0), i32* %6)
%50 = getelementptr inbounds i8*, i8** %1, i64 6
%51 = load i8*, i8** %50
%52 = call i32 @sscanf(i8* %51, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.5, i64 0, i64 0), i32* %9)
%53 = load i32, i32* %6
switch i32 %53, label %83 [
i32 52, label %54
i32 14, label %81
i32 12, label %82
]
54: ; preds = %43
%55 = bitcast [52 x i32]* %7 to <4 x i32>*
store <4 x i32> <i32 7, i32 7, i32 7, i32 7>, <4 x i32>* %55
%56 = getelementptr inbounds [52 x i32], [52 x i32]* %7, i64 0, i64 4
%57 = bitcast i32* %56 to <4 x i32>*
store <4 x i32> <i32 7, i32 7, i32 7, i32 7>, <4 x i32>* %57
%58 = getelementptr inbounds [52 x i32], [52 x i32]* %7, i64 0, i64 8
%59 = bitcast i32* %58 to <4 x i32>*
store <4 x i32> <i32 7, i32 7, i32 7, i32 7>, <4 x i32>* %59
%60 = getelementptr inbounds [52 x i32], [52 x i32]* %7, i64 0, i64 12
%61 = bitcast i32* %60 to <4 x i32>*
store <4 x i32> <i32 7, i32 7, i32 7, i32 7>, <4 x i32>* %61
%62 = getelementptr inbounds [52 x i32], [52 x i32]* %7, i64 0, i64 16
%63 = bitcast i32* %62 to <4 x i32>*
store <4 x i32> <i32 7, i32 7, i32 7, i32 7>, <4 x i32>* %63
%64 = getelementptr inbounds [52 x i32], [52 x i32]* %7, i64 0, i64 20
%65 = bitcast i32* %64 to <4 x i32>*
store <4 x i32> <i32 7, i32 7, i32 7, i32 7>, <4 x i32>* %65
%66 = getelementptr inbounds [52 x i32], [52 x i32]* %7, i64 0, i64 24
%67 = bitcast i32* %66 to <4 x i32>*
store <4 x i32> <i32 7, i32 7, i32 7, i32 7>, <4 x i32>* %67
%68 = getelementptr inbounds [52 x i32], [52 x i32]* %7, i64 0, i64 28
%69 = bitcast i32* %68 to <4 x i32>*
store <4 x i32> <i32 7, i32 7, i32 7, i32 7>, <4 x i32>* %69
%70 = getelementptr inbounds [52 x i32], [52 x i32]* %7, i64 0, i64 32
%71 = bitcast i32* %70 to <4 x i32>*
store <4 x i32> <i32 7, i32 7, i32 7, i32 7>, <4 x i32>* %71
%72 = getelementptr inbounds [52 x i32], [52 x i32]* %7, i64 0, i64 36
%73 = bitcast i32* %72 to <4 x i32>*
store <4 x i32> <i32 7, i32 7, i32 7, i32 7>, <4 x i32>* %73
%74 = getelementptr inbounds [52 x i32], [52 x i32]* %7, i64 0, i64 40
%75 = bitcast i32* %74 to <4 x i32>*
store <4 x i32> <i32 7, i32 7, i32 7, i32 7>, <4 x i32>* %75
%76 = getelementptr inbounds [52 x i32], [52 x i32]* %7, i64 0, i64 44
%77 = bitcast i32* %76 to <4 x i32>*
store <4 x i32> <i32 7, i32 7, i32 7, i32 7>, <4 x i32>* %77
%78 = getelementptr inbounds [52 x i32], [52 x i32]* %7, i64 0, i64 48
%79 = bitcast i32* %78 to <4 x i32>*
store <4 x i32> <i32 7, i32 7, i32 7, i32 7>, <4 x i32>* %79
%80 = getelementptr inbounds [52 x i32], [52 x i32]* %7, i64 0, i64 51
store i32 8, i32* %80
br label %83
81: ; preds = %43
br label %83
82: ; preds = %43
br label %83
83: ; preds = %81, %54, %82, %43
store float 0.000000e+00, float* %3
%84 = call i32 @fscanf(i32* %30, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.6, i64 0, i64 0), float* %3)
%85 = icmp eq i32 %84, 1
br i1 %85, label %86, label %176
86: ; preds = %83
%87 = getelementptr inbounds [52 x i32], [52 x i32]* %7, i64 0, i64 51
%88 = getelementptr inbounds [52 x i32], [52 x i32]* %7, i64 0, i64 8
%89 = getelementptr inbounds [52 x i32], [52 x i32]* %7, i64 0, i64 4
br label %90
90: ; preds = %86, %170
%91 = phi float [ undef, %86 ], [ %171, %170 ]
%92 = load i32, i32* %5
%93 = and i32 %92, 3
%94 = icmp eq i32 %93, 0
br i1 %94, label %95, label %106
95: ; preds = %90
%96 = srem i32 %92, 100
%97 = icmp eq i32 %96, 0
%98 = srem i32 %92, 400
%99 = icmp ne i32 %98, 0
%100 = and i1 %97, %99
br i1 %100, label %106, label %101
101: ; preds = %95
%102 = load i32, i32* %6
switch i32 %102, label %111 [
i32 12, label %103
i32 14, label %104
i32 52, label %105
]
103: ; preds = %101
store i32 29, i32* %89
br label %114
104: ; preds = %101
store i32 29, i32* %88
br label %114
105: ; preds = %101
store i32 9, i32* %87
br label %114
106: ; preds = %95, %90
%107 = load i32, i32* %6
switch i32 %107, label %111 [
i32 12, label %108
i32 14, label %109
i32 52, label %110
]
108: ; preds = %106
store i32 28, i32* %89
br label %114
109: ; preds = %106
store i32 28, i32* %88
br label %114
110: ; preds = %106
store i32 8, i32* %87
br label %114
111: ; preds = %106, %101
%112 = phi i32 [ %107, %106 ], [ %102, %101 ]
%113 = icmp sgt i32 %112, 0
br i1 %113, label %114, label %170
114: ; preds = %105, %110, %103, %104, %108, %109, %111
br label %115
115: ; preds = %114, %135
%116 = phi i64 [ %138, %135 ], [ 0, %114 ]
%117 = phi i32 [ %137, %135 ], [ 0, %114 ]
%118 = phi float [ %136, %135 ], [ 0.000000e+00, %114 ]
%119 = getelementptr inbounds [52 x float], [52 x float]* %4, i64 0, i64 %116
%120 = call i32 @fscanf(i32* %22, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.6, i64 0, i64 0), float* %119)
%121 = load i32, i32* %9
switch i32 %121, label %135 [
i32 0, label %122
i32 1, label %128
]
122: ; preds = %115
%123 = load float, float* %119
%124 = fadd float %118, %123
%125 = getelementptr inbounds [52 x i32], [52 x i32]* %7, i64 0, i64 %116
%126 = load i32, i32* %125
%127 = add nsw i32 %126, %117
br label %135
128: ; preds = %115
%129 = getelementptr inbounds [52 x i32], [52 x i32]* %7, i64 0, i64 %116
%130 = load i32, i32* %129
%131 = sitofp i32 %130 to float
%132 = load float, float* %119
%133 = call float @llvm.fmuladd.f32(float %131, float %132, float %118)
%134 = add nsw i32 %130, %117
br label %135
135: ; preds = %115, %122, %128
%136 = phi float [ %133, %128 ], [ %124, %122 ], [ %118, %115 ]
%137 = phi i32 [ %134, %128 ], [ %127, %122 ], [ %117, %115 ]
%138 = add nuw nsw i64 %116, 1
%139 = load i32, i32* %6
%140 = sext i32 %139 to i64
%141 = icmp slt i64 %138, %140
br i1 %141, label %115, label %142
142: ; preds = %135
%143 = load float, float* %3
%144 = fcmp oeq float %143, 0.000000e+00
%145 = fcmp oeq float %136, 0.000000e+00
%146 = select i1 %144, i1 true, i1 %145
br i1 %146, label %157, label %147
147: ; preds = %142
%148 = load i32, i32* %9
%149 = icmp eq i32 %148, 0
%150 = fdiv float %143, %136
%151 = select i1 %149, float %150, float %91
%152 = icmp eq i32 %148, 1
br i1 %152, label %153, label %157
153: ; preds = %147
%154 = sitofp i32 %137 to float
%155 = fmul float %143, %154
%156 = fdiv float %155, %136
br label %157
157: ; preds = %142, %147, %153
%158 = phi float [ %156, %153 ], [ %151, %147 ], [ 0.000000e+00, %142 ]
%159 = icmp sgt i32 %139, 0
br i1 %159, label %160, label %170
160: ; preds = %157, %160
%161 = phi i64 [ %166, %160 ], [ 0, %157 ]
%162 = getelementptr inbounds [52 x float], [52 x float]* %4, i64 0, i64 %161
%163 = load float, float* %162
%164 = fmul float %158, %163
%165 = call i32 @fprintf(i32* %38, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.7, i64 0, i64 0), float %164)
%166 = add nuw nsw i64 %161, 1
%167 = load i32, i32* %6
%168 = sext i32 %167 to i64
%169 = icmp slt i64 %166, %168
br i1 %169, label %160, label %170
170: ; preds = %160, %111, %157
%171 = phi float [ %158, %157 ], [ 0.000000e+00, %111 ], [ %158, %160 ]
%172 = load i32, i32* %5
%173 = add nsw i32 %172, 1
store i32 %173, i32* %5
store float 0.000000e+00, float* %3
%174 = call i32 @fscanf(i32* %30, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.6, i64 0, i64 0), float* %3)
%175 = icmp eq i32 %174, 1
br i1 %175, label %90, label %176
176: ; preds = %170, %83
ret i32 0
}