#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;
double atof(char *);
int atoi(char *);
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ fclose(int /*<<< orphan*/ *);
int fgetc(int /*<<< orphan*/ *);
int /*<<< orphan*/ *fgets(char *, int, int /*<<< orphan*/ *);
int /*<<< orphan*/ *fopen(char *, char *);
int fscanf(int /*<<< orphan*/ *, char *, ...);
scalar_t__ malloc(int);
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ rewind(int /*<<< orphan*/ *);
scalar_t__ strcmp(char *, char *);
int main(int argc, char *argv[]) {
  int i, j, q, po_c, po_k, po_e, n, po, ret;
  int po_l, po_u, l_i, u_i;
  int c_i, k_i, e_i, nline, nelement, tnelement;
  int column_index;
  int kmesh, emesh;
  double dk, de, hk, he, tmp, eu, el;
  double *momentum, *energy, *weight;
  double kmin, kmax, emin, emax;
  double kv, ev, sum, se, sk;
  char *buf, *token;
  FILE *fp1, *fp2;
  po_c = 0;
  po_k = 0;
  po_e = 0;
  po_l = 0;
  po_u = 0;
  for (i = 1; i < argc; i++) {
    if (strcmp(argv[i], "-c") == 0) {
      po_c = 1;
      c_i = i;
    }
    if (strcmp(argv[i], "-k") == 0) {
      po_k = 1;
      k_i = i;
    }
    if (strcmp(argv[i], "-e") == 0) {
      po_e = 1;
      e_i = i;
    }
    if (strcmp(argv[i], "-l") == 0) {
      po_l = 1;
      l_i = i;
    }
    if (strcmp(argv[i], "-u") == 0) {
      po_u = 1;
      u_i = i;
    }
  }
  if (po_c == 0 || po_k == 0 || po_e == 0 || po_l == 0 || po_u == 0 ||
      argc != 12) {
    printf("Invalid argument\n");
    exit(0);
  }
  column_index = atoi(argv[c_i + 1]);
  hk = atof(argv[k_i + 1]);
  he = atof(argv[e_i + 1]);
  el = atof(argv[l_i + 1]);
  eu = atof(argv[u_i + 1]);
  if ((fp1 = fopen(argv[1], "r")) != NULL) {
    po = 0;
    n = 0;
    do {
      if ((q = fgetc(fp1)) == '\n')
        po = 1;
      n++;
    } while (po == 0);
    buf = (char *)malloc(sizeof(char) * (n + 100));
    rewind(fp1);
    nline = 0;
    while (fgets(buf, n + 30, fp1) != NULL) {
      nline++;
    }
    momentum = (double *)malloc(sizeof(double) * nline);
    energy = (double *)malloc(sizeof(double) * nline);
    weight = (double *)malloc(sizeof(double) * nline);
    rewind(fp1);
    tnelement = 0;
    while ((ret = fscanf(fp1, "%lf", buf)) != EOF) {
      tnelement++;
    }
    nelement = tnelement / nline;
    rewind(fp1);
    for (i = 0; i < nline; i++) {
      for (j = 0; j < nelement; j++) {
        fscanf(fp1, "%lf", &tmp);
        if (j == 0)
          momentum[i] = tmp;
        else if (j == 1)
          energy[i] = tmp;
        else if (j == (column_index - 1))
          weight[i] = tmp;
      }
    }
    fclose(fp1);
  } else {
    printf("could not find %s\n", argv[1]);
  }
  kmin = 100000.0;
  kmax = -100000.0;
  emin = 100000.0;
  emax = -100000.0;
  for (i = 0; i < nline; i++) {
    if (momentum[i] < kmin)
      kmin = momentum[i];
    if (kmax < momentum[i])
      kmax = momentum[i];
    if (energy[i] < emin)
      emin = energy[i];
    if (emax < energy[i])
      emax = energy[i];
  }
  kmesh = 200;
  emesh = 200;
  dk = (kmax - kmin) / kmesh;
  de = (eu - el) / emesh;
  for (i = 0; i <= kmesh; i++) {
    kv = kmin + dk * (double)i;
    for (j = 0; j <= emesh; j++) {
      ev = el + de * (double)j;
      sum = 0.0;
      for (q = 0; q < nline; q++) {
        se = (ev - energy[q]) / hk;
        sk = (kv - momentum[q]) / he;
        sum += weight[q] / (se * se + sk * sk + 1);
      }
      printf("%15.12f %15.12f %15.12f\n", kv, ev, sum);
    }
    printf("\n");
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x120,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x20(%rbp)
movl   $0x0,-0x24(%rbp)
movl   $0x0,-0x28(%rbp)
movl   $0x0,-0x38(%rbp)
movl   $0x0,-0x3c(%rbp)
movl   $0x1,-0x14(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    130d <main+0x14d>
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
lea    0xdf6(%rip),%rsi
call   10a0 <strcmp@plt>
cmp    $0x0,%rax
jne    123e <main+0x7e>
movl   $0x1,-0x20(%rbp)
mov    -0x14(%rbp),%eax
mov    %eax,-0x48(%rbp)
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
lea    0xdca(%rip),%rsi
call   10a0 <strcmp@plt>
cmp    $0x0,%rax
jne    126d <main+0xad>
movl   $0x1,-0x24(%rbp)
mov    -0x14(%rbp),%eax
mov    %eax,-0x4c(%rbp)
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
lea    0xd9e(%rip),%rsi
call   10a0 <strcmp@plt>
cmp    $0x0,%rax
jne    129c <main+0xdc>
movl   $0x1,-0x28(%rbp)
mov    -0x14(%rbp),%eax
mov    %eax,-0x50(%rbp)
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
lea    0xd72(%rip),%rsi
call   10a0 <strcmp@plt>
cmp    $0x0,%rax
jne    12cb <main+0x10b>
movl   $0x1,-0x38(%rbp)
mov    -0x14(%rbp),%eax
mov    %eax,-0x40(%rbp)
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
lea    0xd46(%rip),%rsi
call   10a0 <strcmp@plt>
cmp    $0x0,%rax
jne    12fa <main+0x13a>
movl   $0x1,-0x3c(%rbp)
mov    -0x14(%rbp),%eax
mov    %eax,-0x44(%rbp)
jmp    12ff <main+0x13f>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1203 <main+0x43>
cmpl   $0x0,-0x20(%rbp)
je     1349 <main+0x189>
cmpl   $0x0,-0x24(%rbp)
je     1349 <main+0x189>
cmpl   $0x0,-0x28(%rbp)
je     1349 <main+0x189>
cmpl   $0x0,-0x38(%rbp)
je     1349 <main+0x189>
cmpl   $0x0,-0x3c(%rbp)
je     1349 <main+0x189>
cmpl   $0xc,-0x8(%rbp)
je     135e <main+0x19e>
lea    0xcd7(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
xor    %edi,%edi
call   10e0 <exit@plt>
mov    -0x10(%rbp),%rax
mov    -0x48(%rbp),%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
mov    (%rax,%rcx,8),%rdi
call   10d0 <atoi@plt>
mov    %eax,-0x60(%rbp)
mov    -0x10(%rbp),%rax
mov    -0x4c(%rbp),%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
mov    (%rax,%rcx,8),%rdi
call   1030 <atof@plt>
movsd  %xmm0,-0x80(%rbp)
mov    -0x10(%rbp),%rax
mov    -0x50(%rbp),%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
mov    (%rax,%rcx,8),%rdi
call   1030 <atof@plt>
movsd  %xmm0,-0x88(%rbp)
ff
mov    -0x10(%rbp),%rax
mov    -0x40(%rbp),%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
mov    (%rax,%rcx,8),%rdi
call   1030 <atof@plt>
movsd  %xmm0,-0xa0(%rbp)
ff
mov    -0x10(%rbp),%rax
mov    -0x44(%rbp),%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
mov    (%rax,%rcx,8),%rdi
call   1030 <atof@plt>
movsd  %xmm0,-0x98(%rbp)
ff
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
lea    0xc3e(%rip),%rsi
call   10c0 <fopen@plt>
mov    %rax,-0x118(%rbp)
cmp    $0x0,%rax
je     1650 <main+0x490>
movl   $0x0,-0x30(%rbp)
movl   $0x0,-0x2c(%rbp)
mov    -0x118(%rbp),%rdi
call   1080 <fgetc@plt>
mov    %eax,-0x1c(%rbp)
cmp    $0xa,%eax
jne    143e <main+0x27e>
movl   $0x1,-0x30(%rbp)
mov    -0x2c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x2c(%rbp)
cmpl   $0x0,-0x30(%rbp)
je     141f <main+0x25f>
mov    -0x2c(%rbp),%eax
add    $0x64,%eax
cltq
shl    $0x0,%rax
mov    %eax,%edi
call   10b0 <malloc@plt>
mov    %rax,-0x108(%rbp)
mov    -0x118(%rbp),%rdi
call   1060 <rewind@plt>
movl   $0x0,-0x54(%rbp)
mov    -0x108(%rbp),%rdi
mov    -0x2c(%rbp),%esi
add    $0x1e,%esi
mov    -0x118(%rbp),%rdx
call   1090 <fgets@plt>
cmp    $0x0,%rax
je     14af <main+0x2ef>
mov    -0x54(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x54(%rbp)
jmp    147e <main+0x2be>
movslq -0x54(%rbp),%rax
shl    $0x3,%rax
mov    %eax,%edi
call   10b0 <malloc@plt>
mov    %rax,-0xa8(%rbp)
movslq -0x54(%rbp),%rax
shl    $0x3,%rax
mov    %eax,%edi
call   10b0 <malloc@plt>
mov    %rax,-0xb0(%rbp)
movslq -0x54(%rbp),%rax
shl    $0x3,%rax
mov    %eax,%edi
call   10b0 <malloc@plt>
mov    %rax,-0xb8(%rbp)
mov    -0x118(%rbp),%rdi
call   1060 <rewind@plt>
movl   $0x0,-0x5c(%rbp)
mov    -0x118(%rbp),%rdi
mov    -0x108(%rbp),%rdx
lea    0xb22(%rip),%rsi
mov    $0x0,%al
call   1070 <fscanf@plt>
mov    %eax,-0x34(%rbp)
mov    0x2abe(%rip),%rcx
cmp    (%rcx),%eax
je     1540 <main+0x380>
mov    -0x5c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x5c(%rbp)
jmp    1504 <main+0x344>
mov    -0x5c(%rbp),%eax
cltd
idivl  -0x54(%rbp)
mov    %eax,-0x58(%rbp)
mov    -0x118(%rbp),%rdi
call   1060 <rewind@plt>
movl   $0x0,-0x14(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0x54(%rbp),%eax
jge    163f <main+0x47f>
movl   $0x0,-0x18(%rbp)
mov    -0x18(%rbp),%eax
cmp    -0x58(%rbp),%eax
jge    162c <main+0x46c>
mov    -0x118(%rbp),%rdi
lea    0xab1(%rip),%rsi
lea    -0x90(%rbp),%rdx
mov    $0x0,%al
call   1070 <fscanf@plt>
cmpl   $0x0,-0x18(%rbp)
jne    15bf <main+0x3ff>
movsd  -0x90(%rbp),%xmm0
ff
mov    -0xa8(%rbp),%rax
movslq -0x14(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
jmp    1619 <main+0x459>
cmpl   $0x1,-0x18(%rbp)
jne    15e6 <main+0x426>
movsd  -0x90(%rbp),%xmm0
ff
mov    -0xb0(%rbp),%rax
movslq -0x14(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
jmp    1614 <main+0x454>
mov    -0x18(%rbp),%eax
mov    -0x60(%rbp),%ecx
sub    $0x1,%ecx
cmp    %ecx,%eax
jne    160f <main+0x44f>
movsd  -0x90(%rbp),%xmm0
ff
mov    -0xb8(%rbp),%rax
movslq -0x14(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
jmp    1614 <main+0x454>
jmp    1619 <main+0x459>
jmp    161e <main+0x45e>
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
jmp    1570 <main+0x3b0>
jmp    1631 <main+0x471>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    155d <main+0x39d>
mov    -0x118(%rbp),%rdi
call   1040 <fclose@plt>
jmp    1666 <main+0x4a6>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rsi
lea    0x9e0(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
movsd  0x99a(%rip),%xmm0
movsd  %xmm0,-0xc0(%rbp)
ff
movsd  0x982(%rip),%xmm0
movsd  %xmm0,-0xc8(%rbp)
ff
movsd  0x97a(%rip),%xmm0
movsd  %xmm0,-0xd0(%rbp)
ff
movsd  0x962(%rip),%xmm0
movsd  %xmm0,-0xd8(%rbp)
ff
movl   $0x0,-0x14(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0x54(%rbp),%eax
jge    17b4 <main+0x5f4>
mov    -0xa8(%rbp),%rax
movslq -0x14(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm1
movsd  -0xc0(%rbp),%xmm0
ff
ucomisd %xmm1,%xmm0
jbe    16f3 <main+0x533>
mov    -0xa8(%rbp),%rax
movslq -0x14(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0xc0(%rbp)
ff
movsd  -0xc8(%rbp),%xmm1
ff
mov    -0xa8(%rbp),%rax
movslq -0x14(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
ucomisd %xmm1,%xmm0
jbe    172d <main+0x56d>
mov    -0xa8(%rbp),%rax
movslq -0x14(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0xc8(%rbp)
ff
mov    -0xb0(%rbp),%rax
movslq -0x14(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm1
movsd  -0xd0(%rbp),%xmm0
ff
ucomisd %xmm1,%xmm0
jbe    1767 <main+0x5a7>
mov    -0xb0(%rbp),%rax
movslq -0x14(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0xd0(%rbp)
ff
movsd  -0xd8(%rbp),%xmm1
ff
mov    -0xb0(%rbp),%rax
movslq -0x14(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
ucomisd %xmm1,%xmm0
jbe    17a1 <main+0x5e1>
mov    -0xb0(%rbp),%rax
movslq -0x14(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0xd8(%rbp)
ff
jmp    17a6 <main+0x5e6>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    16ad <main+0x4ed>
movl   $0xc8,-0x64(%rbp)
movl   $0xc8,-0x68(%rbp)
movsd  -0xc8(%rbp),%xmm0
ff
subsd  -0xc0(%rbp),%xmm0
ff
cvtsi2sdl -0x64(%rbp),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x70(%rbp)
movsd  -0x98(%rbp),%xmm0
ff
subsd  -0xa0(%rbp),%xmm0
ff
cvtsi2sdl -0x68(%rbp),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x78(%rbp)
movl   $0x0,-0x14(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0x64(%rbp),%eax
jg     1989 <main+0x7c9>
movsd  -0xc0(%rbp),%xmm1
ff
movsd  -0x70(%rbp),%xmm0
cvtsi2sdl -0x14(%rbp),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0xe0(%rbp)
ff
movl   $0x0,-0x18(%rbp)
mov    -0x18(%rbp),%eax
cmp    -0x68(%rbp),%eax
jg     196d <main+0x7ad>
movsd  -0xa0(%rbp),%xmm1
ff
movsd  -0x78(%rbp),%xmm0
cvtsi2sdl -0x18(%rbp),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0xe8(%rbp)
ff
xorps  %xmm0,%xmm0
movsd  %xmm0,-0xf0(%rbp)
ff
movl   $0x0,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
cmp    -0x54(%rbp),%eax
jge    1939 <main+0x779>
movsd  -0xe8(%rbp),%xmm0
ff
mov    -0xb0(%rbp),%rax
movslq -0x1c(%rbp),%rcx
subsd  (%rax,%rcx,8),%xmm0
divsd  -0x80(%rbp),%xmm0
movsd  %xmm0,-0xf8(%rbp)
ff
movsd  -0xe0(%rbp),%xmm0
ff
mov    -0xa8(%rbp),%rax
movslq -0x1c(%rbp),%rcx
subsd  (%rax,%rcx,8),%xmm0
divsd  -0x88(%rbp),%xmm0
ff
movsd  %xmm0,-0x100(%rbp)
ff
mov    -0xb8(%rbp),%rax
movslq -0x1c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
movsd  -0xf8(%rbp),%xmm1
ff
movsd  -0xf8(%rbp),%xmm3
ff
movsd  -0x100(%rbp),%xmm2
ff
mulsd  -0x100(%rbp),%xmm2
ff
mulsd  %xmm3,%xmm1
addsd  %xmm2,%xmm1
movsd  0x6fd(%rip),%xmm2
addsd  %xmm2,%xmm1
divsd  %xmm1,%xmm0
addsd  -0xf0(%rbp),%xmm0
ff
movsd  %xmm0,-0xf0(%rbp)
ff
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    187a <main+0x6ba>
movsd  -0xe0(%rbp),%xmm0
ff
movsd  -0xe8(%rbp),%xmm1
ff
movsd  -0xf0(%rbp),%xmm2
ff
lea    0x6fa(%rip),%rdi
mov    $0x3,%al
call   1050 <printf@plt>
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
jmp    183a <main+0x67a>
lea    0x6f5(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1805 <main+0x645>
mov    -0x4(%rbp),%eax
add    $0x120,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x58,%rsp
mov    %rsi,0x10(%rsp)
cmp    $0x2,%edi
jl     1819 <main+0x639>
mov    %edi,%eax
mov    %rax,0x18(%rsp)
movl   $0x0,(%rsp)
mov    $0x1,%ebp
movl   $0x0,0x8(%rsp)
movl   $0x0,0x20(%rsp)
movl   $0x0,0x28(%rsp)
xor    %esi,%esi
mov    0x10(%rsp),%r13
xchg   %ax,%ax
mov    %esi,0x30(%rsp)
mov    %edx,0x38(%rsp)
mov    0x0(%r13,%rbp,8),%rdi
lea    0xddc(%rip),%rsi
call   10c0 <strcmp@plt>
test   %rax,%rax
cmove  %ebp,%r14d
mov    (%rsp),%eax
mov    $0x1,%ecx
cmove  %ecx,%eax
mov    %eax,(%rsp)
mov    0x0(%r13,%rbp,8),%rdi
lea    0xdb9(%rip),%rsi
call   10c0 <strcmp@plt>
test   %rax,%rax
cmove  %ebp,%r15d
mov    0x8(%rsp),%eax
mov    $0x1,%ecx
cmove  %ecx,%eax
mov    %eax,0x8(%rsp)
mov    0x0(%r13,%rbp,8),%rdi
lea    0xd94(%rip),%rsi
call   10c0 <strcmp@plt>
test   %rax,%rax
cmove  %ebp,%r12d
mov    0x20(%rsp),%eax
mov    $0x1,%ecx
cmove  %ecx,%eax
mov    %eax,0x20(%rsp)
mov    0x0(%r13,%rbp,8),%rdi
lea    0xd6f(%rip),%rsi
call   10c0 <strcmp@plt>
test   %rax,%rax
cmove  %ebp,%ebx
mov    0x28(%rsp),%eax
mov    $0x1,%ecx
cmove  %ecx,%eax
mov    %eax,0x28(%rsp)
mov    0x0(%r13,%rbp,8),%rdi
lea    0xd4b(%rip),%rsi
call   10c0 <strcmp@plt>
mov    0x30(%rsp),%esi
mov    0x38(%rsp),%edx
test   %rax,%rax
cmove  %ebp,%edx
mov    $0x1,%eax
cmove  %eax,%esi
add    $0x1,%rbp
cmp    %rbp,0x18(%rsp)
jne    1230 <main+0x50>
mov    0x8(%rsp),%eax
mov    0x20(%rsp),%ebp
mov    0x28(%rsp),%edi
mov    (%rsp),%r13d
cmpl   $0xc,0x18(%rsp)
jne    1819 <main+0x639>
test   %r13d,%r13d
je     1819 <main+0x639>
test   %eax,%eax
je     1819 <main+0x639>
test   %ebp,%ebp
je     1819 <main+0x639>
test   %edi,%edi
je     1819 <main+0x639>
test   %esi,%esi
je     1819 <main+0x639>
mov    %r15d,%ecx
mov    %r14d,%r8d
add    $0x1,%edx
movslq %edx,%r14
add    $0x1,%ebx
movslq %ebx,%r15
add    $0x1,%r12d
movslq %r12d,%r12
add    $0x1,%ecx
movslq %ecx,%rbp
mov    %r8d,%eax
add    $0x1,%eax
cltq
mov    0x10(%rsp),%rbx
mov    (%rbx,%rax,8),%rdi
call   10f0 <atoi@plt>
mov    %eax,0x18(%rsp)
mov    (%rbx,%rbp,8),%rdi
call   1050 <atof@plt>
movsd  %xmm0,0x38(%rsp)
mov    (%rbx,%r12,8),%rdi
call   1050 <atof@plt>
movsd  %xmm0,0x30(%rsp)
mov    (%rbx,%r15,8),%rdi
call   1050 <atof@plt>
movsd  %xmm0,0x28(%rsp)
mov    (%rbx,%r14,8),%rdi
call   1050 <atof@plt>
movsd  %xmm0,0x20(%rsp)
mov    0x8(%rbx),%rdi
lea    0xc60(%rip),%rsi
call   10e0 <fopen@plt>
test   %rax,%rax
je     1596 <main+0x3b6>
mov    %rax,%r12
mov    $0x64,%r14d
cs nopw 0x0(%rax,%rax,1)
mov    %r12,%rdi
call   10a0 <fgetc@plt>
add    $0x1,%r14d
cmp    $0xa,%eax
jne    13f0 <main+0x210>
mov    %r14d,%edi
call   10d0 <malloc@plt>
mov    %rax,%r13
mov    %r12,%rdi
call   1080 <rewind@plt>
add    $0xffffffba,%r14d
mov    $0xffffffffffffffff,%rbx
mov    $0xfffffff8,%ebp
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
mov    %r13,%rdi
mov    %r14d,%esi
mov    %r12,%rdx
call   10b0 <fgets@plt>
add    $0x1,%rbx
add    $0x8,%ebp
test   %rax,%rax
jne    1430 <main+0x250>
mov    %rbx,0x10(%rsp)
mov    %ebp,%edi
call   10d0 <malloc@plt>
mov    %rax,%r14
mov    %ebp,%edi
call   10d0 <malloc@plt>
mov    %rax,%r15
mov    %ebp,%edi
call   10d0 <malloc@plt>
mov    %rax,%rbx
mov    %r12,%rdi
call   1080 <rewind@plt>
mov    $0xffffffff,%ebp
nopw   0x0(%rax,%rax,1)
mov    %r12,%rdi
lea    0xba7(%rip),%rsi
mov    %r13,%rdx
xor    %eax,%eax
call   1090 <fscanf@plt>
add    $0x1,%ebp
mov    0x2b4a(%rip),%rcx
cmp    (%rcx),%eax
jne    1480 <main+0x2a0>
mov    %ebp,(%rsp)
mov    %r12,%rdi
call   1080 <rewind@plt>
mov    0x10(%rsp),%rcx
test   %ecx,%ecx
je     15c0 <main+0x3e0>
mov    %r12,0x8(%rsp)
mov    (%rsp),%esi
mov    %esi,%eax
xor    %edx,%edx
div    %ecx
addl   $0xffffffff,0x18(%rsp)
cmp    $0x2,%eax
mov    $0x1,%ebp
cmovae %eax,%ebp
mov    %rcx,%r13
xor    %r12d,%r12d
jmp    14ee <main+0x30e>
add    $0x1,%r12
mov    0x10(%rsp),%r13
cmp    %r12,%r13
je     1568 <main+0x388>
cmp    %esi,%r13d
ja     14e0 <main+0x300>
xor    %r13d,%r13d
jmp    1518 <main+0x338>
nopl   0x0(%rax,%rax,1)
movsd  0x40(%rsp),%xmm0
movsd  %xmm0,(%r15,%r12,8)
mov    (%rsp),%esi
add    $0x1,%r13d
cmp    %ebp,%r13d
je     14e0 <main+0x300>
mov    0x8(%rsp),%rdi
lea    0xb0d(%rip),%rsi
lea    0x40(%rsp),%rdx
xor    %eax,%eax
call   1090 <fscanf@plt>
cmp    $0x1,%r13d
je     1500 <main+0x320>
test   %r13d,%r13d
jne    1550 <main+0x370>
movsd  0x40(%rsp),%xmm0
movsd  %xmm0,(%r14,%r12,8)
jmp    150c <main+0x32c>
nopl   0x0(%rax)
cmp    %r13d,0x18(%rsp)
mov    (%rsp),%esi
jne    150f <main+0x32f>
movsd  0x40(%rsp),%xmm0
movsd  %xmm0,(%rbx,%r12,8)
jmp    150f <main+0x32f>
mov    0x8(%rsp),%rdi
call   1060 <fclose@plt>
lea    -0x1(%r13),%rax
cmp    $0x3,%rax
mov    %r13,%rsi
jae    15e2 <main+0x402>
movsd  0xa79(%rip),%xmm4
movsd  0xa79(%rip),%xmm3
xor    %eax,%eax
jmp    1654 <main+0x474>
mov    0x8(%rbx),%rsi
lea    0xa94(%rip),%rdi
xor    %r13d,%r13d
xor    %eax,%eax
call   1070 <printf@plt>
movsd  0xa55(%rip),%xmm3
movsd  0xa45(%rip),%xmm4
jmp    1695 <main+0x4b5>
mov    %r12,%rdi
call   1060 <fclose@plt>
movsd  0xa38(%rip),%xmm3
movsd  0xa28(%rip),%xmm4
xor    %r13d,%r13d
xor    %esi,%esi
jmp    1695 <main+0x4b5>
mov    %esi,%ecx
and    $0x7ffffffc,%ecx
movsd  0xa0e(%rip),%xmm4
movsd  0xa0e(%rip),%xmm3
xor    %eax,%eax
nopl   0x0(%rax)
movsd  (%r14,%rax,8),%xmm0
movsd  0x8(%r14,%rax,8),%xmm1
movapd %xmm0,%xmm2
minsd  %xmm4,%xmm2
maxsd  %xmm3,%xmm0
movapd %xmm1,%xmm3
minsd  %xmm2,%xmm3
maxsd  %xmm0,%xmm1
movsd  0x10(%r14,%rax,8),%xmm0
movapd %xmm0,%xmm2
minsd  %xmm3,%xmm2
maxsd  %xmm1,%xmm0
movsd  0x18(%r14,%rax,8),%xmm3
movapd %xmm3,%xmm4
minsd  %xmm2,%xmm4
maxsd  %xmm0,%xmm3
add    $0x4,%rax
cmp    %rax,%rcx
jne    1600 <main+0x420>
test   $0x3,%sil
je     1692 <main+0x4b2>
lea    (%r14,%rax,8),%rax
mov    %esi,%ecx
and    $0x3,%ecx
xor    %edx,%edx
cs nopw 0x0(%rax,%rax,1)
nop
movapd %xmm4,%xmm0
movapd %xmm3,%xmm1
movsd  (%rax,%rdx,8),%xmm3
movapd %xmm3,%xmm4
minsd  %xmm0,%xmm4
maxsd  %xmm1,%xmm3
add    $0x1,%rdx
cmp    %rdx,%rcx
jne    1670 <main+0x490>
mov    $0x1,%r13b
subsd  %xmm4,%xmm3
movsd  0x96f(%rip),%xmm0
divsd  %xmm0,%xmm3
movsd  0x20(%rsp),%xmm1
subsd  0x28(%rsp),%xmm1
divsd  %xmm0,%xmm1
movsd  %xmm1,0x20(%rsp)
mov    %esi,%ebp
xor    %eax,%eax
xorpd  %xmm1,%xmm1
movsd  0x94c(%rip),%xmm8
movsd  %xmm3,0x50(%rsp)
movsd  %xmm4,0x48(%rsp)
jmp    171d <main+0x53d>
nopw   0x0(%rax,%rax,1)
mov    $0xa,%edi
call   1030 <putchar@plt>
movsd  0x925(%rip),%xmm8
movsd  0x10(%rsp),%xmm1
addsd  %xmm8,%xmm1
mov    0x18(%rsp),%rax
add    $0x1,%eax
cmp    $0xc9,%eax
movsd  0x50(%rsp),%xmm3
movsd  0x48(%rsp),%xmm4
je     1808 <main+0x628>
mov    %rax,0x18(%rsp)
movapd %xmm3,%xmm0
movsd  %xmm1,0x10(%rsp)
mulsd  %xmm1,%xmm0
addsd  %xmm4,%xmm0
xorpd  %xmm2,%xmm2
xor    %r12d,%r12d
movsd  %xmm0,0x8(%rsp)
jmp    1788 <main+0x5a8>
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
lea    0x8f1(%rip),%rdi
mov    $0x3,%al
call   1070 <printf@plt>
movsd  0x8(%rsp),%xmm0
movsd  0x8ab(%rip),%xmm8
movsd  (%rsp),%xmm2
addsd  %xmm8,%xmm2
add    $0x1,%r12d
cmp    $0xc9,%r12d
je     16e0 <main+0x500>
movsd  0x20(%rsp),%xmm1
movsd  %xmm2,(%rsp)
mulsd  %xmm2,%xmm1
addsd  0x28(%rsp),%xmm1
xorpd  %xmm2,%xmm2
test   %r13b,%r13b
movsd  0x38(%rsp),%xmm5
movsd  0x30(%rsp),%xmm6
je     1750 <main+0x570>
xorpd  %xmm2,%xmm2
xor    %eax,%eax
nopl   0x0(%rax,%rax,1)
movapd %xmm1,%xmm7
subsd  (%r15,%rax,8),%xmm7
movapd %xmm0,%xmm3
divsd  %xmm5,%xmm7
subsd  (%r14,%rax,8),%xmm3
divsd  %xmm6,%xmm3
movsd  (%rbx,%rax,8),%xmm4
mulsd  %xmm3,%xmm3
mulsd  %xmm7,%xmm7
addsd  %xmm3,%xmm7
addsd  %xmm8,%xmm7
divsd  %xmm7,%xmm4
addsd  %xmm4,%xmm2
add    $0x1,%rax
cmp    %rax,%rbp
jne    17c0 <main+0x5e0>
jmp    1750 <main+0x570>
xor    %eax,%eax
add    $0x58,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
lea    0x841(%rip),%rdi
call   1040 <puts@plt>
xor    %edi,%edi
call   1100 <exit@plt>

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

LLVM IR (-O2):
@.str = [3 x i8] c"-c\00"
@.str.1 = [3 x i8] c"-k\00"
@.str.2 = [3 x i8] c"-e\00"
@.str.3 = [3 x i8] c"-l\00"
@.str.4 = [3 x i8] c"-u\00"
@.str.6 = [2 x i8] c"r\00"
@.str.7 = [4 x i8] c"%lf\00"
@EOF = global i32 0
@.str.8 = [19 x i8] c"could not find %s\0A\00"
@.str.9 = [25 x i8] c"%15.12f %15.12f %15.12f\0A\00"
@str = [17 x i8] c"Invalid argument\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = alloca double
%4 = bitcast double* %3 to i8*
%5 = icmp sgt i32 %0, 1
br i1 %5, label %6, label %61
6: ; preds = %2
%7 = zext i32 %0 to i64
br label %8
8: ; preds = %6, %8
%9 = phi i64 [ 1, %6 ], [ %47, %8 ]
%10 = phi i32 [ 0, %6 ], [ %26, %8 ]
%11 = phi i32 [ 0, %6 ], [ %31, %8 ]
%12 = phi i32 [ 0, %6 ], [ %36, %8 ]
%13 = phi i32 [ 0, %6 ], [ %41, %8 ]
%14 = phi i32 [ 0, %6 ], [ %46, %8 ]
%15 = phi i32 [ undef, %6 ], [ %40, %8 ]
%16 = phi i32 [ undef, %6 ], [ %45, %8 ]
%17 = phi i32 [ undef, %6 ], [ %25, %8 ]
%18 = phi i32 [ undef, %6 ], [ %30, %8 ]
%19 = phi i32 [ undef, %6 ], [ %35, %8 ]
%20 = getelementptr inbounds i8*, i8** %1, i64 %9
%21 = load i8*, i8** %20
%22 = tail call i64 @strcmp(i8* %21, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
%23 = icmp eq i64 %22, 0
%24 = trunc i64 %9 to i32
%25 = select i1 %23, i32 %24, i32 %17
%26 = select i1 %23, i32 1, i32 %10
%27 = load i8*, i8** %20
%28 = tail call i64 @strcmp(i8* %27, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
%29 = icmp eq i64 %28, 0
%30 = select i1 %29, i32 %24, i32 %18
%31 = select i1 %29, i32 1, i32 %11
%32 = load i8*, i8** %20
%33 = tail call i64 @strcmp(i8* %32, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0))
%34 = icmp eq i64 %33, 0
%35 = select i1 %34, i32 %24, i32 %19
%36 = select i1 %34, i32 1, i32 %12
%37 = load i8*, i8** %20
%38 = tail call i64 @strcmp(i8* %37, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0))
%39 = icmp eq i64 %38, 0
%40 = select i1 %39, i32 %24, i32 %15
%41 = select i1 %39, i32 1, i32 %13
%42 = load i8*, i8** %20
%43 = tail call i64 @strcmp(i8* %42, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.4, i64 0, i64 0))
%44 = icmp eq i64 %43, 0
%45 = select i1 %44, i32 %24, i32 %16
%46 = select i1 %44, i32 1, i32 %14
%47 = add nuw nsw i64 %9, 1
%48 = icmp eq i64 %47, %7
br i1 %48, label %49, label %8
49: ; preds = %8
%50 = icmp eq i32 %26, 0
%51 = icmp eq i32 %31, 0
%52 = select i1 %50, i1 true, i1 %51
%53 = icmp eq i32 %36, 0
%54 = select i1 %52, i1 true, i1 %53
%55 = icmp eq i32 %41, 0
%56 = select i1 %54, i1 true, i1 %55
%57 = icmp eq i32 %46, 0
%58 = select i1 %56, i1 true, i1 %57
%59 = icmp ne i32 %0, 12
%60 = or i1 %59, %58
br i1 %60, label %61, label %64
61: ; preds = %2, %49
%62 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @str, i64 0, i64 0))
%63 = tail call i32 @exit(i32 0)
unreachable
64: ; preds = %49
%65 = add i32 %45, 1
%66 = sext i32 %65 to i64
%67 = add i32 %40, 1
%68 = sext i32 %67 to i64
%69 = add i32 %35, 1
%70 = sext i32 %69 to i64
%71 = add i32 %30, 1
%72 = sext i32 %71 to i64
%73 = add i32 %25, 1
%74 = sext i32 %73 to i64
%75 = getelementptr inbounds i8*, i8** %1, i64 %74
%76 = load i8*, i8** %75
%77 = tail call i32 @atoi(i8* %76)
%78 = getelementptr inbounds i8*, i8** %1, i64 %72
%79 = load i8*, i8** %78
%80 = tail call double @atof(i8* %79)
%81 = getelementptr inbounds i8*, i8** %1, i64 %70
%82 = load i8*, i8** %81
%83 = tail call double @atof(i8* %82)
%84 = getelementptr inbounds i8*, i8** %1, i64 %68
%85 = load i8*, i8** %84
%86 = tail call double @atof(i8* %85)
%87 = getelementptr inbounds i8*, i8** %1, i64 %66
%88 = load i8*, i8** %87
%89 = tail call double @atof(i8* %88)
%90 = getelementptr inbounds i8*, i8** %1, i64 1
%91 = load i8*, i8** %90
%92 = tail call i32* @fopen(i8* %91, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.6, i64 0, i64 0))
%93 = icmp eq i32* %92, null
br i1 %93, label %159, label %94
94: ; preds = %64, %94
%95 = phi i32 [ %98, %94 ], [ 0, %64 ]
%96 = tail call i32 @fgetc(i32* %92)
%97 = icmp eq i32 %96, 10
%98 = add nuw nsw i32 %95, 1
br i1 %97, label %99, label %94
99: ; preds = %94
%100 = add nuw nsw i32 %95, 101
%101 = tail call i64 @malloc(i32 %100)
%102 = inttoptr i64 %101 to i8*
%103 = tail call i32 @rewind(i32* %92)
%104 = add nuw nsw i32 %95, 31
br label %105
105: ; preds = %105, %99
%106 = phi i32 [ 0, %99 ], [ %109, %105 ]
%107 = tail call i32* @fgets(i8* %102, i32 %104, i32* %92)
%108 = icmp eq i32* %107, null
%109 = add nuw nsw i32 %106, 1
br i1 %108, label %110, label %105
110: ; preds = %105
%111 = shl i32 %106, 3
%112 = tail call i64 @malloc(i32 %111)
%113 = tail call i64 @malloc(i32 %111)
%114 = tail call i64 @malloc(i32 %111)
%115 = tail call i32 @rewind(i32* %92)
br label %116
116: ; preds = %116, %110
%117 = phi i32 [ 0, %110 ], [ %121, %116 ]
%118 = tail call i32 (i32*, i8*, ...) @fscanf(i32* %92, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.7, i64 0, i64 0), i8* %102)
%119 = load i32, i32* @EOF
%120 = icmp eq i32 %118, %119
%121 = add nuw nsw i32 %117, 1
br i1 %120, label %122, label %116
122: ; preds = %116
%123 = inttoptr i64 %112 to double*
%124 = inttoptr i64 %113 to double*
%125 = inttoptr i64 %114 to double*
%126 = tail call i32 @rewind(i32* %92)
%127 = icmp eq i32 %106, 0
br i1 %127, label %128, label %130
128: ; preds = %122
%129 = call i32 @fclose(i32* %92)
br label %225
130: ; preds = %122
%131 = udiv i32 %117, %106
%132 = icmp ugt i32 %106, %117
%133 = add nsw i32 %77, -1
%134 = zext i32 %106 to i64
%135 = call i32 @llvm.umax.i32(i32 %131, i32 1)
br label %136
136: ; preds = %130, %156
%137 = phi i64 [ 0, %130 ], [ %157, %156 ]
br i1 %132, label %156, label %138
138: ; preds = %136
%139 = getelementptr inbounds double, double* %124, i64 %137
%140 = getelementptr inbounds double, double* %123, i64 %137
%141 = getelementptr inbounds double, double* %125, i64 %137
br label %142
142: ; preds = %138, %153
%143 = phi i32 [ 0, %138 ], [ %154, %153 ]
%144 = call i32 (i32*, i8*, ...) @fscanf(i32* %92, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.7, i64 0, i64 0), double* %3)
switch i32 %143, label %149 [
i32 0, label %145
i32 1, label %147
]
145: ; preds = %142
%146 = load double, double* %3
store double %146, double* %140
br label %153
147: ; preds = %142
%148 = load double, double* %3
store double %148, double* %139
br label %153
149: ; preds = %142
%150 = icmp eq i32 %143, %133
br i1 %150, label %151, label %153
151: ; preds = %149
%152 = load double, double* %3
store double %152, double* %141
br label %153
153: ; preds = %145, %149, %151, %147
%154 = add nuw nsw i32 %143, 1
%155 = icmp eq i32 %154, %135
br i1 %155, label %156, label %142
156: ; preds = %153, %136
%157 = add nuw nsw i64 %137, 1
%158 = icmp eq i64 %157, %134
br i1 %158, label %162, label %136
159: ; preds = %64
%160 = load i8*, i8** %90
%161 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @.str.8, i64 0, i64 0), i8* %160)
br label %225
162: ; preds = %156
%163 = call i32 @fclose(i32* %92)
%164 = add nsw i64 %134, -1
%165 = and i64 %134, 3
%166 = icmp ult i64 %164, 3
br i1 %166, label %204, label %167
167: ; preds = %162
%168 = and i64 %134, 2147483644
br label %169
169: ; preds = %169, %167
%170 = phi i64 [ 0, %167 ], [ %201, %169 ]
%171 = phi double [ -1.000000e+05, %167 ], [ %200, %169 ]
%172 = phi double [ 1.000000e+05, %167 ], [ %198, %169 ]
%173 = phi i64 [ 0, %167 ], [ %202, %169 ]
%174 = getelementptr inbounds double, double* %123, i64 %170
%175 = load double, double* %174
%176 = fcmp olt double %175, %172
%177 = select i1 %176, double %175, double %172
%178 = fcmp olt double %171, %175
%179 = select i1 %178, double %175, double %171
%180 = or i64 %170, 1
%181 = getelementptr inbounds double, double* %123, i64 %180
%182 = load double, double* %181
%183 = fcmp olt double %182, %177
%184 = select i1 %183, double %182, double %177
%185 = fcmp olt double %179, %182
%186 = select i1 %185, double %182, double %179
%187 = or i64 %170, 2
%188 = getelementptr inbounds double, double* %123, i64 %187
%189 = load double, double* %188
%190 = fcmp olt double %189, %184
%191 = select i1 %190, double %189, double %184
%192 = fcmp olt double %186, %189
%193 = select i1 %192, double %189, double %186
%194 = or i64 %170, 3
%195 = getelementptr inbounds double, double* %123, i64 %194
%196 = load double, double* %195
%197 = fcmp olt double %196, %191
%198 = select i1 %197, double %196, double %191
%199 = fcmp olt double %193, %196
%200 = select i1 %199, double %196, double %193
%201 = add nuw nsw i64 %170, 4
%202 = add i64 %173, 4
%203 = icmp eq i64 %202, %168
br i1 %203, label %204, label %169
204: ; preds = %169, %162
%205 = phi double [ undef, %162 ], [ %198, %169 ]
%206 = phi double [ undef, %162 ], [ %200, %169 ]
%207 = phi i64 [ 0, %162 ], [ %201, %169 ]
%208 = phi double [ -1.000000e+05, %162 ], [ %200, %169 ]
%209 = phi double [ 1.000000e+05, %162 ], [ %198, %169 ]
%210 = icmp eq i64 %165, 0
br i1 %210, label %225, label %211
211: ; preds = %204, %211
%212 = phi i64 [ %222, %211 ], [ %207, %204 ]
%213 = phi double [ %221, %211 ], [ %208, %204 ]
%214 = phi double [ %219, %211 ], [ %209, %204 ]
%215 = phi i64 [ %223, %211 ], [ 0, %204 ]
%216 = getelementptr inbounds double, double* %123, i64 %212
%217 = load double, double* %216
%218 = fcmp olt double %217, %214
%219 = select i1 %218, double %217, double %214
%220 = fcmp olt double %213, %217
%221 = select i1 %220, double %217, double %213
%222 = add nuw nsw i64 %212, 1
%223 = add i64 %215, 1
%224 = icmp eq i64 %223, %165
br i1 %224, label %225, label %211
225: ; preds = %204, %211, %128, %159
%226 = phi i1 [ false, %159 ], [ false, %128 ], [ true, %211 ], [ true, %204 ]
%227 = phi double* [ undef, %159 ], [ %125, %128 ], [ %125, %211 ], [ %125, %204 ]
%228 = phi double* [ undef, %159 ], [ %124, %128 ], [ %124, %211 ], [ %124, %204 ]
%229 = phi double* [ undef, %159 ], [ %123, %128 ], [ %123, %211 ], [ %123, %204 ]
%230 = phi i32 [ undef, %159 ], [ 0, %128 ], [ %106, %211 ], [ %106, %204 ]
%231 = phi double [ 1.000000e+05, %159 ], [ 1.000000e+05, %128 ], [ %205, %204 ], [ %219, %211 ]
%232 = phi double [ -1.000000e+05, %159 ], [ -1.000000e+05, %128 ], [ %206, %204 ], [ %221, %211 ]
%233 = fsub double %232, %231
%234 = fdiv double %233, 2.000000e+02
%235 = fsub double %89, %86
%236 = fdiv double %235, 2.000000e+02
%237 = zext i32 %230 to i64
br label %238
238: ; preds = %225, %271
%239 = phi i32 [ 0, %225 ], [ %273, %271 ]
%240 = sitofp i32 %239 to double
%241 = call double @llvm.fmuladd.f64(double %234, double %240, double %231)
br label %242
242: ; preds = %238, %266
%243 = phi i32 [ 0, %238 ], [ %269, %266 ]
%244 = sitofp i32 %243 to double
%245 = call double @llvm.fmuladd.f64(double %236, double %244, double %86)
br i1 %226, label %246, label %266
246: ; preds = %242, %246
%247 = phi i64 [ %264, %246 ], [ 0, %242 ]
%248 = phi double [ %263, %246 ], [ 0.000000e+00, %242 ]
%249 = getelementptr inbounds double, double* %228, i64 %247
%250 = load double, double* %249
%251 = fsub double %245, %250
%252 = fdiv double %251, %80
%253 = getelementptr inbounds double, double* %229, i64 %247
%254 = load double, double* %253
%255 = fsub double %241, %254
%256 = fdiv double %255, %83
%257 = getelementptr inbounds double, double* %227, i64 %247
%258 = load double, double* %257
%259 = fmul double %256, %256
%260 = call double @llvm.fmuladd.f64(double %252, double %252, double %259)
%261 = fadd double %260, 1.000000e+00
%262 = fdiv double %258, %261
%263 = fadd double %248, %262
%264 = add nuw nsw i64 %247, 1
%265 = icmp eq i64 %264, %237
br i1 %265, label %266, label %246
266: ; preds = %246, %242
%267 = phi double [ 0.000000e+00, %242 ], [ %263, %246 ]
%268 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([25 x i8], [25 x i8]* @.str.9, i64 0, i64 0), double %241, double %245, double %267)
%269 = add nuw nsw i32 %243, 1
%270 = icmp eq i32 %269, 201
br i1 %270, label %271, label %242
271: ; preds = %266
%272 = call i32 @putchar(i32 10)
%273 = add nuw nsw i32 %239, 1
%274 = icmp eq i32 %273, 201
br i1 %274, label %275, label %238
275: ; preds = %271
ret i32 0
}