#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 */
scalar_t__ EOF;
scalar_t__ calloc(int, int);
int /*<<< orphan*/ error_print(char *);
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fclose(int /*<<< orphan*/ *);
int /*<<< orphan*/ *fopen(char *, char *);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/ *, char *, ...);
int /*<<< orphan*/ free(double *);
scalar_t__ fscanf(int /*<<< orphan*/ *, char *, double *);
scalar_t__ realloc(double *, int);
scalar_t__ sqrt(double);
int /*<<< orphan*/ stderr;
void main(int argc, char *argv[]) {
  double *x, dum, xmax = -1e23, xmin = 1e23;
  int i, nn, j;
  long ik, n_vert, n_pol, ikk;
  FILE *fr, *f_out;
  if (argc < 2 || argc > 3) {
    error_print(argv[0]);
    exit(1);
  }
  fr = fopen(argv[1], "r");
  x = (double *)calloc(1, sizeof(double));
  ik = 0;
  while ((fscanf(fr, "%le", &dum)) != EOF) {
    x = (double *)realloc(x, sizeof(double) * (ik + 1));
    if (x == NULL) {
      fprintf(stderr, "f_xplot: Allocation error while reading, exiting\n");
      exit(1);
    }
    x[ik] = dum;
    ik++;
  }
  nn = (int)sqrt((double)ik);
  n_vert = nn * nn;
  n_pol = 0;
  fclose(fr);
  ik = 0;
  for (i = 1; i <= nn; i++) {
    for (j = 1; j <= nn; j++) {
      if (xmin > x[ik])
        xmin = x[ik];
      if (xmax < x[ik])
        xmax = x[ik];
      ik++;
    }
  }
  xmax -= xmin;
  f_out = fopen(argv[2], "w");
  ik = 0;
  ikk = 0;
  for (i = 1; i <= nn - 1; i++) {
    for (j = 1; j <= nn - 1; j++) {
      double v1, v2, v3, v4;
      v1 = x[ik];
      v2 = x[ik + 1];
      v3 = x[ik + nn];
      v4 = x[ik + nn + 1];
      if (v1 != 0 && v2 != 0 && v3 != 0 && v4 != 0) {
        ikk++;
      }
      ik++;
    }
  }
  fprintf(f_out, "%ld %ld ", ik, ikk);
  ik = 0;
  for (i = 1; i <= nn; i++) {
    for (j = 1; j <= nn; j++) {
      fprintf(f_out, "%g %g %g \n", (double)i, (double)j, x[ik] * nn / xmax);
      ik++;
    }
  }
  n_vert = ik;
  ik = 0;
  ikk = 0;
  for (i = 1; i <= nn - 1; i++) {
    for (j = 1; j <= nn - 1; j++) {
      double v1, v2, v3, v4;
      v1 = x[ik];
      v2 = x[ik + 1];
      v3 = x[ik + nn];
      v4 = x[ik + nn + 1];
      if (v1 != 0 && v2 != 0 && v3 != 0 && v4 != 0) {
        fprintf(f_out, "4 \t %ld %ld %ld %ld \n", ik, ik + 1, ik + 1 + nn,
                ik + nn);
        ikk++;
      }
      ik++;
    }
  }
  fclose(f_out);
  free(x);
  fclose(fr);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0xb0,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
movsd  0xe4e(%rip),%xmm0
movsd  %xmm0,-0x28(%rbp)
movsd  0xe39(%rip),%xmm0
movsd  %xmm0,-0x30(%rbp)
cmpl   $0x2,-0x4(%rbp)
jl     11e0 <main+0x40>
cmpl   $0x3,-0x4(%rbp)
jle    11f6 <main+0x56>
mov    -0x10(%rbp),%rax
mov    (%rax),%rdi
call   1080 <error_print@plt>
mov    $0x1,%edi
call   10c0 <exit@plt>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
lea    0xe0b(%rip),%rsi
call   10a0 <fopen@plt>
mov    %rax,-0x68(%rbp)
mov    $0x1,%edi
mov    $0x8,%esi
call   1060 <calloc@plt>
mov    %rax,-0x18(%rbp)
movq   $0x0,-0x48(%rbp)
mov    -0x68(%rbp),%rdi
lea    0xdde(%rip),%rsi
lea    -0x20(%rbp),%rdx
call   1050 <fscanf@plt>
mov    0x2da4(%rip),%rcx
cmp    (%rcx),%rax
je     12b8 <main+0x118>
mov    -0x18(%rbp),%rdi
mov    -0x48(%rbp),%rax
add    $0x1,%rax
shl    $0x3,%rax
mov    %eax,%esi
call   1090 <realloc@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
jne    1295 <main+0xf5>
mov    0x2d5e(%rip),%rax
movslq (%rax),%rdi
lea    0xd92(%rip),%rsi
mov    $0x0,%al
call   1070 <fprintf@plt>
mov    $0x1,%edi
call   10c0 <exit@plt>
movsd  -0x20(%rbp),%xmm0
mov    -0x18(%rbp),%rax
mov    -0x48(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x48(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x48(%rbp)
jmp    1229 <main+0x89>
cvtsi2sdq -0x48(%rbp),%xmm0
call   10b0 <sqrt@plt>
mov    %eax,-0x38(%rbp)
mov    -0x38(%rbp),%eax
imul   -0x38(%rbp),%eax
cltq
mov    %rax,-0x50(%rbp)
movq   $0x0,-0x58(%rbp)
mov    -0x68(%rbp),%rdi
call   1040 <fclose@plt>
movq   $0x0,-0x48(%rbp)
movl   $0x1,-0x34(%rbp)
mov    -0x34(%rbp),%eax
cmp    -0x38(%rbp),%eax
jg     1397 <main+0x1f7>
movl   $0x1,-0x3c(%rbp)
mov    -0x3c(%rbp),%eax
cmp    -0x38(%rbp),%eax
jg     1384 <main+0x1e4>
movsd  -0x30(%rbp),%xmm0
mov    -0x18(%rbp),%rax
mov    -0x48(%rbp),%rcx
ucomisd (%rax,%rcx,8),%xmm0
jbe    133c <main+0x19c>
mov    -0x18(%rbp),%rax
mov    -0x48(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0x30(%rbp)
movsd  -0x28(%rbp),%xmm1
mov    -0x18(%rbp),%rax
mov    -0x48(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
ucomisd %xmm1,%xmm0
jbe    136a <main+0x1ca>
mov    -0x18(%rbp),%rax
mov    -0x48(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0x28(%rbp)
mov    -0x48(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x48(%rbp)
mov    -0x3c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x3c(%rbp)
jmp    1306 <main+0x166>
jmp    1389 <main+0x1e9>
mov    -0x34(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x34(%rbp)
jmp    12f3 <main+0x153>
movsd  -0x30(%rbp),%xmm1
movsd  -0x28(%rbp),%xmm0
subsd  %xmm1,%xmm0
movsd  %xmm0,-0x28(%rbp)
mov    -0x10(%rbp),%rax
mov    0x10(%rax),%rdi
lea    0xc8f(%rip),%rsi
call   10a0 <fopen@plt>
mov    %rax,-0x70(%rbp)
movq   $0x0,-0x48(%rbp)
movq   $0x0,-0x60(%rbp)
movl   $0x1,-0x34(%rbp)
mov    -0x34(%rbp),%eax
mov    -0x38(%rbp),%ecx
sub    $0x1,%ecx
cmp    %ecx,%eax
jg     1513 <main+0x373>
movl   $0x1,-0x3c(%rbp)
mov    -0x3c(%rbp),%eax
mov    -0x38(%rbp),%ecx
sub    $0x1,%ecx
cmp    %ecx,%eax
jg     1500 <main+0x360>
mov    -0x18(%rbp),%rax
mov    -0x48(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0x78(%rbp)
mov    -0x18(%rbp),%rax
mov    -0x48(%rbp),%rcx
movsd  0x8(%rax,%rcx,8),%xmm0
movsd  %xmm0,-0x80(%rbp)
mov    -0x18(%rbp),%rax
mov    -0x48(%rbp),%rcx
movslq -0x38(%rbp),%rdx
add    %rdx,%rcx
movsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0x88(%rbp)
ff
mov    -0x18(%rbp),%rax
mov    -0x48(%rbp),%rcx
movslq -0x38(%rbp),%rdx
add    %rdx,%rcx
movsd  0x8(%rax,%rcx,8),%xmm0
movsd  %xmm0,-0x90(%rbp)
ff
movsd  -0x78(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jne    147d <main+0x2dd>
jp     147d <main+0x2dd>
jmp    14e6 <main+0x346>
movsd  -0x80(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jne    149a <main+0x2fa>
jp     149a <main+0x2fa>
jmp    14e6 <main+0x346>
movsd  -0x88(%rbp),%xmm0
ff
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jne    14ba <main+0x31a>
jp     14ba <main+0x31a>
jmp    14e6 <main+0x346>
movsd  -0x90(%rbp),%xmm0
ff
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jne    14da <main+0x33a>
jp     14da <main+0x33a>
jmp    14e6 <main+0x346>
mov    -0x60(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x60(%rbp)
mov    -0x48(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x48(%rbp)
mov    -0x3c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x3c(%rbp)
jmp    13f1 <main+0x251>
jmp    1505 <main+0x365>
mov    -0x34(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x34(%rbp)
jmp    13d9 <main+0x239>
mov    -0x70(%rbp),%rdi
mov    -0x48(%rbp),%rdx
mov    -0x60(%rbp),%rcx
lea    0xb24(%rip),%rsi
mov    $0x0,%al
call   1070 <fprintf@plt>
movq   $0x0,-0x48(%rbp)
movl   $0x1,-0x34(%rbp)
mov    -0x34(%rbp),%eax
cmp    -0x38(%rbp),%eax
jg     15bf <main+0x41f>
movl   $0x1,-0x3c(%rbp)
mov    -0x3c(%rbp),%eax
cmp    -0x38(%rbp),%eax
jg     15ac <main+0x40c>
mov    -0x70(%rbp),%rdi
cvtsi2sdl -0x34(%rbp),%xmm0
cvtsi2sdl -0x3c(%rbp),%xmm1
mov    -0x18(%rbp),%rax
mov    -0x48(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm2
cvtsi2sdl -0x38(%rbp),%xmm3
mulsd  %xmm3,%xmm2
divsd  -0x28(%rbp),%xmm2
lea    0xac8(%rip),%rsi
mov    $0x3,%al
call   1070 <fprintf@plt>
mov    -0x48(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x48(%rbp)
mov    -0x3c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x3c(%rbp)
jmp    154f <main+0x3af>
jmp    15b1 <main+0x411>
mov    -0x34(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x34(%rbp)
jmp    153c <main+0x39c>
mov    -0x48(%rbp),%rax
mov    %rax,-0x50(%rbp)
movq   $0x0,-0x48(%rbp)
movq   $0x0,-0x60(%rbp)
movl   $0x1,-0x34(%rbp)
mov    -0x34(%rbp),%eax
mov    -0x38(%rbp),%ecx
sub    $0x1,%ecx
cmp    %ecx,%eax
jg     175c <main+0x5bc>
movl   $0x1,-0x3c(%rbp)
mov    -0x3c(%rbp),%eax
mov    -0x38(%rbp),%ecx
sub    $0x1,%ecx
cmp    %ecx,%eax
jg     1749 <main+0x5a9>
mov    -0x18(%rbp),%rax
mov    -0x48(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0x98(%rbp)
ff
mov    -0x18(%rbp),%rax
mov    -0x48(%rbp),%rcx
movsd  0x8(%rax,%rcx,8),%xmm0
movsd  %xmm0,-0xa0(%rbp)
ff
mov    -0x18(%rbp),%rax
mov    -0x48(%rbp),%rcx
movslq -0x38(%rbp),%rdx
add    %rdx,%rcx
movsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0xa8(%rbp)
ff
mov    -0x18(%rbp),%rax
mov    -0x48(%rbp),%rcx
movslq -0x38(%rbp),%rdx
add    %rdx,%rcx
movsd  0x8(%rax,%rcx,8),%xmm0
movsd  %xmm0,-0xb0(%rbp)
ff
movsd  -0x98(%rbp),%xmm0
ff
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jne    168b <main+0x4eb>
jp     168b <main+0x4eb>
jmp    172f <main+0x58f>
movsd  -0xa0(%rbp),%xmm0
ff
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jne    16ab <main+0x50b>
jp     16ab <main+0x50b>
jmp    172f <main+0x58f>
movsd  -0xa8(%rbp),%xmm0
ff
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jne    16cb <main+0x52b>
jp     16cb <main+0x52b>
jmp    172f <main+0x58f>
movsd  -0xb0(%rbp),%xmm0
ff
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jne    16eb <main+0x54b>
jp     16eb <main+0x54b>
jmp    172f <main+0x58f>
mov    -0x70(%rbp),%rdi
mov    -0x48(%rbp),%rdx
mov    -0x48(%rbp),%rcx
add    $0x1,%rcx
mov    -0x48(%rbp),%r8
add    $0x1,%r8
movslq -0x38(%rbp),%rax
add    %rax,%r8
mov    -0x48(%rbp),%r9
movslq -0x38(%rbp),%rax
add    %rax,%r9
lea    0x942(%rip),%rsi
mov    $0x0,%al
call   1070 <fprintf@plt>
mov    -0x60(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x60(%rbp)
mov    -0x48(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x48(%rbp)
mov    -0x3c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x3c(%rbp)
jmp    15f6 <main+0x456>
jmp    174e <main+0x5ae>
mov    -0x34(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x34(%rbp)
jmp    15de <main+0x43e>
mov    -0x70(%rbp),%rdi
call   1040 <fclose@plt>
mov    -0x18(%rbp),%rdi
call   1030 <free@plt>
mov    -0x68(%rbp),%rdi
call   1040 <fclose@plt>
add    $0xb0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x78,%rsp
mov    %rsi,%r15
add    $0xfffffffc,%edi
cmp    $0xfffffffd,%edi
jbe    1813 <main+0x663>
mov    0x8(%r15),%rdi
lea    0xe40(%rip),%rsi
call   10a0 <fopen@plt>
mov    %rax,%rbx
mov    $0x8,%ebp
mov    $0x1,%edi
mov    $0x8,%esi
call   1060 <calloc@plt>
mov    %rax,%r13
lea    0xe1c(%rip),%rsi
lea    0x50(%rsp),%rdx
mov    %rbx,0x28(%rsp)
mov    %rbx,%rdi
call   1050 <fscanf@plt>
mov    0x2dd1(%rip),%r14
cmp    (%r14),%rax
jne    1222 <main+0x72>
xorpd  %xmm0,%xmm0
jmp    1289 <main+0xd9>
mov    %r15,(%rsp)
xor    %ebx,%ebx
lea    0xdeb(%rip),%r15
lea    0x50(%rsp),%r12
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
mov    %r13,%rdi
mov    %ebp,%esi
call   1090 <realloc@plt>
test   %rax,%rax
je     17e9 <main+0x639>
mov    %rax,%r13
movsd  0x50(%rsp),%xmm0
movsd  %xmm0,(%rax,%rbx,8)
mov    0x28(%rsp),%rdi
mov    %r15,%rsi
mov    %r12,%rdx
call   1050 <fscanf@plt>
add    $0x8,%ebp
add    $0x1,%rbx
cmp    (%r14),%rax
jne    1240 <main+0x90>
xorps  %xmm0,%xmm0
cvtsi2sd %rbx,%xmm0
mov    (%rsp),%r15
call   10b0 <sqrt@plt>
mov    %rax,%r12
mov    0x28(%rsp),%rdi
call   1040 <fclose@plt>
test   %r12d,%r12d
jle    15cc <main+0x41c>
lea    -0x1(%r12),%eax
lea    0x1(%rax),%r8
lea    0x8(%r13),%rdx
lea    0x8(,%rax,8),%r9
not    %rax
mov    %r12d,%edi
and    $0xfffffffe,%edi
mov    $0x1,%ebx
movsd  0xd31(%rip),%xmm2
movsd  0xd31(%rip),%xmm3
xor    %ebp,%ebp
xor    %esi,%esi
jmp    12f7 <main+0x147>
nopl   (%rax)
add    %r8,%rsi
lea    0x1(%rbx),%ecx
add    %rax,%rbp
add    %r9,%rdx
cmp    %r12d,%ebx
mov    %ecx,%ebx
je     1374 <main+0x1c4>
cmp    $0x1,%r12d
jne    1310 <main+0x160>
movapd %xmm3,%xmm0
movapd %xmm2,%xmm1
mov    %rsi,%rcx
test   $0x1,%r12b
je     12e0 <main+0x130>
jmp    135c <main+0x1ac>
xor    %ecx,%ecx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
movsd  -0x8(%rdx,%rcx,8),%xmm0
movapd %xmm0,%xmm1
minsd  %xmm2,%xmm1
movsd  (%rdx,%rcx,8),%xmm2
maxsd  %xmm3,%xmm0
movapd %xmm2,%xmm3
minsd  %xmm1,%xmm2
maxsd  %xmm0,%xmm3
add    $0x2,%rcx
cmp    %ecx,%edi
jne    1320 <main+0x170>
sub    %rbp,%rcx
movapd %xmm3,%xmm0
movapd %xmm2,%xmm1
test   $0x1,%r12b
je     12e0 <main+0x130>
movsd  0x0(%r13,%rcx,8),%xmm3
movapd %xmm3,%xmm2
minsd  %xmm1,%xmm2
maxsd  %xmm0,%xmm3
jmp    12e0 <main+0x130>
movsd  %xmm2,0x60(%rsp)
movsd  %xmm3,0x38(%rsp)
mov    0x10(%r15),%rdi
lea    0xcc5(%rip),%rsi
call   10a0 <fopen@plt>
cmp    $0x2,%r12d
setge  %cl
mov    %r13,0x30(%rsp)
mov    %r12,0x8(%rsp)
mov    %rax,0x10(%rsp)
jl     15f9 <main+0x449>
mov    %rcx,0x48(%rsp)
movslq %r12d,%rdx
mov    $0xfffffffe,%eax
add    %edx,%eax
lea    0x1(%rax),%rsi
lea    0x2(%rax),%rcx
imul   %rax,%rcx
mov    %rcx,0x58(%rsp)
mov    %rsi,(%rsp)
and    $0xfffffffffffffffc,%rsi
mov    %rsi,%rcx
mov    %rsi,0x20(%rsp)
lea    0x1(%rsi),%ecx
mov    %ecx,0x44(%rsp)
mov    %rax,0x18(%rsp)
lea    0x8(,%rax,8),%r14
mov    %r13,%rax
mov    %r14,%r13
and    $0xffffffffffffffe0,%r13
lea    0x8(%rax),%r10
lea    (%rax,%rdx,8),%rdi
add    $0x18,%rdi
shl    $0x3,%rdx
mov    %rdx,0x70(%rsp)
mov    $0x1,%r8d
xor    %r12d,%r12d
xorpd  %xmm8,%xmm8
xorpd  %xmm9,%xmm9
mov    %r10,0x68(%rsp)
xor    %ecx,%ecx
jmp    1449 <main+0x299>
nopl   0x0(%rax,%rax,1)
add    (%rsp),%r12
add    $0x1,%r8d
add    %r14,%r10
add    %r14,%rdi
cmp    0x8(%rsp),%r8d
je     1606 <main+0x456>
mov    0x30(%rsp),%rax
movsd  (%rax,%r12,8),%xmm2
cmpl   $0x3,0x18(%rsp)
jae    1470 <main+0x2c0>
mov    $0x1,%ebx
mov    %r12,%rax
jmp    1550 <main+0x3a0>
nopl   0x0(%rax,%rax,1)
mov    0x20(%rsp),%rax
add    %r12,%rax
unpcklpd %xmm2,%xmm2
movq   %rcx,%xmm4
pxor   %xmm10,%xmm10
xor    %ecx,%ecx
nopl   0x0(%rax,%rax,1)
movupd (%r10,%rcx,1),%xmm5
shufpd $0x1,%xmm5,%xmm2
movapd %xmm5,%xmm6
movupd -0x18(%rdi,%rcx,1),%xmm7
cmpneqpd %xmm9,%xmm2
cmpneqpd %xmm9,%xmm5
cmpneqpd %xmm9,%xmm7
andpd  %xmm5,%xmm7
andpd  %xmm2,%xmm7
movupd 0x10(%r10,%rcx,1),%xmm2
shufpd $0x1,%xmm2,%xmm6
movupd -0x10(%rdi,%rcx,1),%xmm5
movupd -0x8(%rdi,%rcx,1),%xmm0
movupd (%rdi,%rcx,1),%xmm1
cmpneqpd %xmm9,%xmm6
movapd %xmm2,%xmm3
cmpneqpd %xmm9,%xmm3
cmpneqpd %xmm9,%xmm0
andpd  %xmm3,%xmm0
andpd  %xmm6,%xmm0
cmpneqpd %xmm9,%xmm5
andpd  %xmm7,%xmm5
psubq  %xmm5,%xmm4
cmpneqpd %xmm9,%xmm1
andpd  %xmm0,%xmm1
psubq  %xmm1,%xmm10
add    $0x20,%rcx
cmp    %rcx,%r13
jne    1490 <main+0x2e0>
paddq  %xmm4,%xmm10
pshufd $0xee,%xmm10,%xmm0
paddq  %xmm10,%xmm0
movq   %xmm0,%rcx
mov    0x20(%rsp),%rdx
cmp    %rdx,(%rsp)
je     1430 <main+0x280>
unpckhpd %xmm2,%xmm2
mov    0x44(%rsp),%ebx
mov    0x8(%rsp),%rsi
sub    %ebx,%esi
mov    0x68(%rsp),%rdx
lea    (%rdx,%rax,8),%rbp
mov    0x70(%rsp),%rax
lea    (%rax,%rbp,1),%r15
xor    %r9d,%r9d
nopl   0x0(%rax)
ucomisd %xmm8,%xmm2
movsd  0x0(%rbp,%r9,8),%xmm2
setp   %dl
setne  %al
or     %dl,%al
ucomisd %xmm2,%xmm8
setp   %dl
setne  %r11b
or     %dl,%r11b
and    %al,%r11b
ucomisd -0x8(%r15,%r9,8),%xmm8
setp   %al
setne  %dl
or     %al,%dl
and    %r11b,%dl
ucomisd (%r15,%r9,8),%xmm8
setp   %al
setne  %bl
or     %al,%bl
and    %dl,%bl
movzbl %bl,%eax
add    %rax,%rcx
add    $0x1,%r9
cmp    %r9d,%esi
jne    1570 <main+0x3c0>
jmp    1430 <main+0x280>
mov    0x10(%r15),%rdi
lea    0xa79(%rip),%rsi
call   10a0 <fopen@plt>
mov    %rax,%rbx
lea    0xa6c(%rip),%rsi
mov    %rax,%rdi
xor    %edx,%edx
xor    %ecx,%ecx
xor    %eax,%eax
call   1070 <fprintf@plt>
jmp    17c0 <main+0x610>
xor    %ecx,%ecx
mov    %rcx,0x48(%rsp)
xor    %ecx,%ecx
xor    %edx,%edx
jmp    161e <main+0x46e>
mov    0x58(%rsp),%rdx
add    $0x1,%rdx
mov    0x30(%rsp),%r13
mov    0x8(%rsp),%r12
mov    0x10(%rsp),%rax
lea    0xa2d(%rip),%rsi
mov    %rax,%rdi
xor    %eax,%eax
call   1070 <fprintf@plt>
test   %r12d,%r12d
movsd  0x38(%rsp),%xmm0
jle    16ee <main+0x53e>
subsd  0x60(%rsp),%xmm0
xorps  %xmm4,%xmm4
cvtsi2sd %r12d,%xmm4
mov    $0x1,%r14d
xor    %ebx,%ebx
movsd  0x9b4(%rip),%xmm2
lea    0x9f8(%rip),%r15
movsd  %xmm0,0x38(%rsp)
movsd  %xmm4,0x20(%rsp)
nop
xorps  %xmm3,%xmm3
cvtsi2sd %r14d,%xmm3
movsd  %xmm3,0x18(%rsp)
mov    %r12d,%ebp
movapd %xmm2,%xmm1
mov    0x10(%rsp),%r12
nopw   0x0(%rax,%rax,1)
movsd  %xmm1,(%rsp)
movsd  0x0(%r13,%rbx,8),%xmm2
mulsd  %xmm4,%xmm2
divsd  %xmm0,%xmm2
mov    %r12,%rdi
mov    %r15,%rsi
movsd  0x18(%rsp),%xmm0
mov    $0x3,%al
call   1070 <fprintf@plt>
movsd  (%rsp),%xmm1
movsd  0x94c(%rip),%xmm2
movsd  0x20(%rsp),%xmm4
movsd  0x38(%rsp),%xmm0
add    $0x1,%rbx
addsd  %xmm2,%xmm1
add    $0xffffffff,%ebp
jne    1690 <main+0x4e0>
lea    0x1(%r14),%eax
mov    0x8(%rsp),%r12
cmp    %r12d,%r14d
mov    %eax,%r14d
jne    1670 <main+0x4c0>
cmpb   $0x0,0x48(%rsp)
je     17bb <main+0x60b>
movslq %r12d,%rax
mov    %rax,0x18(%rsp)
lea    -0x1(%r12),%ebp
mov    $0x1,%eax
xorpd  %xmm2,%xmm2
xor    %r15d,%r15d
jmp    1738 <main+0x588>
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
mov    (%rsp),%eax
add    $0x1,%eax
add    %rbx,%r15
cmp    0x8(%rsp),%eax
mov    0x30(%rsp),%r13
je     17bb <main+0x60b>
mov    %eax,(%rsp)
lea    0x0(,%r15,8),%r14
add    %r13,%r14
mov    0x18(%rsp),%rax
lea    (%rax,%r15,1),%r12
lea    0x0(%r13,%r12,8),%r13
xor    %ebx,%ebx
jmp    1768 <main+0x5b8>
nopl   0x0(%rax,%rax,1)
add    $0x1,%rbx
cmp    %ebx,%ebp
je     1720 <main+0x570>
movupd (%r14,%rbx,8),%xmm0
movupd 0x0(%r13,%rbx,8),%xmm1
cmpeqpd %xmm2,%xmm1
cmpeqpd %xmm2,%xmm0
packssdw %xmm1,%xmm0
movmskps %xmm0,%eax
test   %eax,%eax
jne    1760 <main+0x5b0>
lea    (%r15,%rbx,1),%rdx
lea    (%r15,%rbx,1),%rcx
add    $0x1,%rcx
lea    (%r12,%rbx,1),%r9
lea    (%r12,%rbx,1),%r8
add    $0x1,%r8
mov    0x10(%rsp),%rdi
lea    0x8b8(%rip),%rsi
xor    %eax,%eax
call   1070 <fprintf@plt>
xorpd  %xmm2,%xmm2
jmp    1760 <main+0x5b0>
mov    0x10(%rsp),%rbx
mov    %rbx,%rdi
call   1040 <fclose@plt>
mov    %r13,%rdi
call   1030 <free@plt>
mov    0x28(%rsp),%rdi
call   1040 <fclose@plt>
add    $0x78,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
mov    0x27e8(%rip),%rax
movslq (%rax),%rcx
lea    0x824(%rip),%rdi
mov    $0x31,%esi
mov    $0x1,%edx
call   10d0 <fwrite@plt>
mov    $0x1,%edi
call   10c0 <exit@plt>
mov    (%r15),%rdi
call   1080 <error_print@plt>
mov    $0x1,%edi
call   10c0 <exit@plt>

LLVM IR (-O0):
@.str = [2 x i8] c"r\00"
@.str.1 = [4 x i8] c"%le\00"
@EOF = global i64 0
@stderr = global i32 0
@.str.2 = [50 x i8] c"f_xplot: Allocation error while reading, exiting\0A\00"
@.str.3 = [2 x i8] c"w\00"
@.str.4 = [9 x i8] c"%ld %ld \00"
@.str.5 = [11 x i8] c"%g %g %g \0A\00"
@.str.6 = [22 x i8] c"4 \09 %ld %ld %ld %ld \0A\00"
define void @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i8**
%5 = alloca double*
%6 = alloca double
%7 = alloca double
%8 = alloca double
%9 = alloca i32
%10 = alloca i32
%11 = alloca i32
%12 = alloca i64
%13 = alloca i64
%14 = alloca i64
%15 = alloca i64
%16 = alloca i32*
%17 = alloca i32*
%18 = alloca double
%19 = alloca double
%20 = alloca double
%21 = alloca double
%22 = alloca double
%23 = alloca double
%24 = alloca double
%25 = alloca double
store i32 %0, i32* %3
store i8** %1, i8*** %4
store double 0xC4B52D02C7E14AF6, double* %7
store double 0x44B52D02C7E14AF6, double* %8
%26 = load i32, i32* %3
%27 = icmp slt i32 %26, 2
br i1 %27, label %31, label %28
28: ; preds = %2
%29 = load i32, i32* %3
%30 = icmp sgt i32 %29, 3
br i1 %30, label %31, label %37
31: ; preds = %28, %2
%32 = load i8**, i8*** %4
%33 = getelementptr inbounds i8*, i8** %32, i64 0
%34 = load i8*, i8** %33
%35 = call i32 @error_print(i8* %34)
%36 = call i32 @exit(i32 1)
unreachable
37: ; preds = %28
%38 = load i8**, i8*** %4
%39 = getelementptr inbounds i8*, i8** %38, i64 1
%40 = load i8*, i8** %39
%41 = call i32* @fopen(i8* %40, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
store i32* %41, i32** %16
%42 = call i64 @calloc(i32 1, i32 8)
%43 = inttoptr i64 %42 to double*
store double* %43, double** %5
store i64 0, i64* %12
br label %44
44: ; preds = %65, %37
%45 = load i32*, i32** %16
%46 = call i64 @fscanf(i32* %45, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), double* %6)
%47 = load i64, i64* @EOF
%48 = icmp ne i64 %46, %47
br i1 %48, label %49, label %72
49: ; preds = %44
%50 = load double*, double** %5
%51 = load i64, i64* %12
%52 = add nsw i64 %51, 1
%53 = mul i64 8, %52
%54 = trunc i64 %53 to i32
%55 = call i64 @realloc(double* %50, i32 %54)
%56 = inttoptr i64 %55 to double*
store double* %56, double** %5
%57 = load double*, double** %5
%58 = icmp eq double* %57, null
br i1 %58, label %59, label %65
59: ; preds = %49
%60 = load i32, i32* @stderr
%61 = sext i32 %60 to i64
%62 = inttoptr i64 %61 to i32*
%63 = call i32 (i32*, i8*, ...) @fprintf(i32* %62, i8* getelementptr inbounds ([50 x i8], [50 x i8]* @.str.2, i64 0, i64 0))
%64 = call i32 @exit(i32 1)
unreachable
65: ; preds = %49
%66 = load double, double* %6
%67 = load double*, double** %5
%68 = load i64, i64* %12
%69 = getelementptr inbounds double, double* %67, i64 %68
store double %66, double* %69
%70 = load i64, i64* %12
%71 = add nsw i64 %70, 1
store i64 %71, i64* %12
br label %44
72: ; preds = %44
%73 = load i64, i64* %12
%74 = sitofp i64 %73 to double
%75 = call i64 @sqrt(double %74)
%76 = trunc i64 %75 to i32
store i32 %76, i32* %10
%77 = load i32, i32* %10
%78 = load i32, i32* %10
%79 = mul nsw i32 %77, %78
%80 = sext i32 %79 to i64
store i64 %80, i64* %13
store i64 0, i64* %14
%81 = load i32*, i32** %16
%82 = call i32 @fclose(i32* %81)
store i64 0, i64* %12
store i32 1, i32* %9
br label %83
83: ; preds = %123, %72
%84 = load i32, i32* %9
%85 = load i32, i32* %10
%86 = icmp sle i32 %84, %85
br i1 %86, label %87, label %126
87: ; preds = %83
store i32 1, i32* %11
br label %88
88: ; preds = %119, %87
%89 = load i32, i32* %11
%90 = load i32, i32* %10
%91 = icmp sle i32 %89, %90
br i1 %91, label %92, label %122
92: ; preds = %88
%93 = load double, double* %8
%94 = load double*, double** %5
%95 = load i64, i64* %12
%96 = getelementptr inbounds double, double* %94, i64 %95
%97 = load double, double* %96
%98 = fcmp ogt double %93, %97
br i1 %98, label %99, label %104
99: ; preds = %92
%100 = load double*, double** %5
%101 = load i64, i64* %12
%102 = getelementptr inbounds double, double* %100, i64 %101
%103 = load double, double* %102
store double %103, double* %8
br label %104
104: ; preds = %99, %92
%105 = load double, double* %7
%106 = load double*, double** %5
%107 = load i64, i64* %12
%108 = getelementptr inbounds double, double* %106, i64 %107
%109 = load double, double* %108
%110 = fcmp olt double %105, %109
br i1 %110, label %111, label %116
111: ; preds = %104
%112 = load double*, double** %5
%113 = load i64, i64* %12
%114 = getelementptr inbounds double, double* %112, i64 %113
%115 = load double, double* %114
store double %115, double* %7
br label %116
116: ; preds = %111, %104
%117 = load i64, i64* %12
%118 = add nsw i64 %117, 1
store i64 %118, i64* %12
br label %119
119: ; preds = %116
%120 = load i32, i32* %11
%121 = add nsw i32 %120, 1
store i32 %121, i32* %11
br label %88
122: ; preds = %88
br label %123
123: ; preds = %122
%124 = load i32, i32* %9
%125 = add nsw i32 %124, 1
store i32 %125, i32* %9
br label %83
126: ; preds = %83
%127 = load double, double* %8
%128 = load double, double* %7
%129 = fsub double %128, %127
store double %129, double* %7
%130 = load i8**, i8*** %4
%131 = getelementptr inbounds i8*, i8** %130, i64 2
%132 = load i8*, i8** %131
%133 = call i32* @fopen(i8* %132, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.3, i64 0, i64 0))
store i32* %133, i32** %17
store i64 0, i64* %12
store i64 0, i64* %15
store i32 1, i32* %9
br label %134
134: ; preds = %191, %126
%135 = load i32, i32* %9
%136 = load i32, i32* %10
%137 = sub nsw i32 %136, 1
%138 = icmp sle i32 %135, %137
br i1 %138, label %139, label %194
139: ; preds = %134
store i32 1, i32* %11
br label %140
140: ; preds = %187, %139
%141 = load i32, i32* %11
%142 = load i32, i32* %10
%143 = sub nsw i32 %142, 1
%144 = icmp sle i32 %141, %143
br i1 %144, label %145, label %190
145: ; preds = %140
%146 = load double*, double** %5
%147 = load i64, i64* %12
%148 = getelementptr inbounds double, double* %146, i64 %147
%149 = load double, double* %148
store double %149, double* %18
%150 = load double*, double** %5
%151 = load i64, i64* %12
%152 = add nsw i64 %151, 1
%153 = getelementptr inbounds double, double* %150, i64 %152
%154 = load double, double* %153
store double %154, double* %19
%155 = load double*, double** %5
%156 = load i64, i64* %12
%157 = load i32, i32* %10
%158 = sext i32 %157 to i64
%159 = add nsw i64 %156, %158
%160 = getelementptr inbounds double, double* %155, i64 %159
%161 = load double, double* %160
store double %161, double* %20
%162 = load double*, double** %5
%163 = load i64, i64* %12
%164 = load i32, i32* %10
%165 = sext i32 %164 to i64
%166 = add nsw i64 %163, %165
%167 = add nsw i64 %166, 1
%168 = getelementptr inbounds double, double* %162, i64 %167
%169 = load double, double* %168
store double %169, double* %21
%170 = load double, double* %18
%171 = fcmp une double %170, 0.000000e+00
br i1 %171, label %172, label %184
172: ; preds = %145
%173 = load double, double* %19
%174 = fcmp une double %173, 0.000000e+00
br i1 %174, label %175, label %184
175: ; preds = %172
%176 = load double, double* %20
%177 = fcmp une double %176, 0.000000e+00
br i1 %177, label %178, label %184
178: ; preds = %175
%179 = load double, double* %21
%180 = fcmp une double %179, 0.000000e+00
br i1 %180, label %181, label %184
181: ; preds = %178
%182 = load i64, i64* %15
%183 = add nsw i64 %182, 1
store i64 %183, i64* %15
br label %184
184: ; preds = %181, %178, %175, %172, %145
%185 = load i64, i64* %12
%186 = add nsw i64 %185, 1
store i64 %186, i64* %12
br label %187
187: ; preds = %184
%188 = load i32, i32* %11
%189 = add nsw i32 %188, 1
store i32 %189, i32* %11
br label %140
190: ; preds = %140
br label %191
191: ; preds = %190
%192 = load i32, i32* %9
%193 = add nsw i32 %192, 1
store i32 %193, i32* %9
br label %134
194: ; preds = %134
%195 = load i32*, i32** %17
%196 = load i64, i64* %12
%197 = load i64, i64* %15
%198 = call i32 (i32*, i8*, ...) @fprintf(i32* %195, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.4, i64 0, i64 0), i64 %196, i64 %197)
store i64 0, i64* %12
store i32 1, i32* %9
br label %199
199: ; preds = %230, %194
%200 = load i32, i32* %9
%201 = load i32, i32* %10
%202 = icmp sle i32 %200, %201
br i1 %202, label %203, label %233
203: ; preds = %199
store i32 1, i32* %11
br label %204
204: ; preds = %226, %203
%205 = load i32, i32* %11
%206 = load i32, i32* %10
%207 = icmp sle i32 %205, %206
br i1 %207, label %208, label %229
208: ; preds = %204
%209 = load i32*, i32** %17
%210 = load i32, i32* %9
%211 = sitofp i32 %210 to double
%212 = load i32, i32* %11
%213 = sitofp i32 %212 to double
%214 = load double*, double** %5
%215 = load i64, i64* %12
%216 = getelementptr inbounds double, double* %214, i64 %215
%217 = load double, double* %216
%218 = load i32, i32* %10
%219 = sitofp i32 %218 to double
%220 = fmul double %217, %219
%221 = load double, double* %7
%222 = fdiv double %220, %221
%223 = call i32 (i32*, i8*, ...) @fprintf(i32* %209, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.5, i64 0, i64 0), double %211, double %213, double %222)
%224 = load i64, i64* %12
%225 = add nsw i64 %224, 1
store i64 %225, i64* %12
br label %226
226: ; preds = %208
%227 = load i32, i32* %11
%228 = add nsw i32 %227, 1
store i32 %228, i32* %11
br label %204
229: ; preds = %204
br label %230
230: ; preds = %229
%231 = load i32, i32* %9
%232 = add nsw i32 %231, 1
store i32 %232, i32* %9
br label %199
233: ; preds = %199
%234 = load i64, i64* %12
store i64 %234, i64* %13
store i64 0, i64* %12
store i64 0, i64* %15
store i32 1, i32* %9
br label %235
235: ; preds = %306, %233
%236 = load i32, i32* %9
%237 = load i32, i32* %10
%238 = sub nsw i32 %237, 1
%239 = icmp sle i32 %236, %238
br i1 %239, label %240, label %309
240: ; preds = %235
store i32 1, i32* %11
br label %241
241: ; preds = %302, %240
%242 = load i32, i32* %11
%243 = load i32, i32* %10
%244 = sub nsw i32 %243, 1
%245 = icmp sle i32 %242, %244
br i1 %245, label %246, label %305
246: ; preds = %241
%247 = load double*, double** %5
%248 = load i64, i64* %12
%249 = getelementptr inbounds double, double* %247, i64 %248
%250 = load double, double* %249
store double %250, double* %22
%251 = load double*, double** %5
%252 = load i64, i64* %12
%253 = add nsw i64 %252, 1
%254 = getelementptr inbounds double, double* %251, i64 %253
%255 = load double, double* %254
store double %255, double* %23
%256 = load double*, double** %5
%257 = load i64, i64* %12
%258 = load i32, i32* %10
%259 = sext i32 %258 to i64
%260 = add nsw i64 %257, %259
%261 = getelementptr inbounds double, double* %256, i64 %260
%262 = load double, double* %261
store double %262, double* %24
%263 = load double*, double** %5
%264 = load i64, i64* %12
%265 = load i32, i32* %10
%266 = sext i32 %265 to i64
%267 = add nsw i64 %264, %266
%268 = add nsw i64 %267, 1
%269 = getelementptr inbounds double, double* %263, i64 %268
%270 = load double, double* %269
store double %270, double* %25
%271 = load double, double* %22
%272 = fcmp une double %271, 0.000000e+00
br i1 %272, label %273, label %299
273: ; preds = %246
%274 = load double, double* %23
%275 = fcmp une double %274, 0.000000e+00
br i1 %275, label %276, label %299
276: ; preds = %273
%277 = load double, double* %24
%278 = fcmp une double %277, 0.000000e+00
br i1 %278, label %279, label %299
279: ; preds = %276
%280 = load double, double* %25
%281 = fcmp une double %280, 0.000000e+00
br i1 %281, label %282, label %299
282: ; preds = %279
%283 = load i32*, i32** %17
%284 = load i64, i64* %12
%285 = load i64, i64* %12
%286 = add nsw i64 %285, 1
%287 = load i64, i64* %12
%288 = add nsw i64 %287, 1
%289 = load i32, i32* %10
%290 = sext i32 %289 to i64
%291 = add nsw i64 %288, %290
%292 = load i64, i64* %12
%293 = load i32, i32* %10
%294 = sext i32 %293 to i64
%295 = add nsw i64 %292, %294
%296 = call i32 (i32*, i8*, ...) @fprintf(i32* %283, i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.6, i64 0, i64 0), i64 %284, i64 %286, i64 %291, i64 %295)
%297 = load i64, i64* %15
%298 = add nsw i64 %297, 1
store i64 %298, i64* %15
br label %299
299: ; preds = %282, %279, %276, %273, %246
%300 = load i64, i64* %12
%301 = add nsw i64 %300, 1
store i64 %301, i64* %12
br label %302
302: ; preds = %299
%303 = load i32, i32* %11
%304 = add nsw i32 %303, 1
store i32 %304, i32* %11
br label %241
305: ; preds = %241
br label %306
306: ; preds = %305
%307 = load i32, i32* %9
%308 = add nsw i32 %307, 1
store i32 %308, i32* %9
br label %235
309: ; preds = %235
%310 = load i32*, i32** %17
%311 = call i32 @fclose(i32* %310)
%312 = load double*, double** %5
%313 = call i32 @free(double* %312)
%314 = load i32*, i32** %16
%315 = call i32 @fclose(i32* %314)
ret void
}

LLVM IR (-O2):
@.str = [2 x i8] c"r\00"
@.str.1 = [4 x i8] c"%le\00"
@EOF = global i64 0
@stderr = global i32 0
@.str.2 = [50 x i8] c"f_xplot: Allocation error while reading, exiting\0A\00"
@.str.3 = [2 x i8] c"w\00"
@.str.4 = [9 x i8] c"%ld %ld \00"
@.str.5 = [11 x i8] c"%g %g %g \0A\00"
@.str.6 = [22 x i8] c"4 \09 %ld %ld %ld %ld \0A\00"
define void @main(i32 %0, i8** nocapture %1) {
%3 = alloca double
%4 = bitcast double* %3 to i8*
%5 = add i32 %0, -4
%6 = icmp ult i32 %5, -2
br i1 %6, label %7, label %11
7: ; preds = %2
%8 = load i8*, i8** %1
%9 = tail call i32 @error_print(i8* %8)
%10 = tail call i32 @exit(i32 1)
unreachable
11: ; preds = %2
%12 = getelementptr inbounds i8*, i8** %1, i64 1
%13 = load i8*, i8** %12
%14 = tail call i32* @fopen(i8* %13, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%15 = tail call i64 @calloc(i32 1, i32 8)
%16 = inttoptr i64 %15 to double*
%17 = call i64 @fscanf(i32* %14, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), double* %3)
%18 = load i64, i64* @EOF
%19 = icmp eq i64 %17, %18
br i1 %19, label %44, label %20
20: ; preds = %11, %35
%21 = phi double* [ %27, %35 ], [ %16, %11 ]
%22 = phi i64 [ %23, %35 ], [ 0, %11 ]
%23 = add nuw nsw i64 %22, 1
%24 = trunc i64 %23 to i32
%25 = shl i32 %24, 3
%26 = call i64 @realloc(double* %21, i32 %25)
%27 = inttoptr i64 %26 to double*
%28 = icmp eq i64 %26, 0
br i1 %28, label %29, label %35
29: ; preds = %20
%30 = load i32, i32* @stderr
%31 = sext i32 %30 to i64
%32 = inttoptr i64 %31 to i32*
%33 = call i64 @fwrite(i8* getelementptr inbounds ([50 x i8], [50 x i8]* @.str.2, i64 0, i64 0), i64 49, i64 1, i32* %32)
%34 = call i32 @exit(i32 1)
unreachable
35: ; preds = %20
%36 = load double, double* %3
%37 = getelementptr inbounds double, double* %27, i64 %22
store double %36, double* %37
%38 = call i64 @fscanf(i32* %14, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), double* %3)
%39 = load i64, i64* @EOF
%40 = icmp eq i64 %38, %39
br i1 %40, label %41, label %20
41: ; preds = %35
%42 = inttoptr i64 %26 to double*
%43 = sitofp i64 %23 to double
br label %44
44: ; preds = %41, %11
%45 = phi double [ %43, %41 ], [ 0.000000e+00, %11 ]
%46 = phi double* [ %42, %41 ], [ %16, %11 ]
%47 = call i64 @sqrt(double %45)
%48 = trunc i64 %47 to i32
%49 = call i32 @fclose(i32* %14)
%50 = icmp slt i32 %48, 1
br i1 %50, label %51, label %56
51: ; preds = %44
%52 = getelementptr inbounds i8*, i8** %1, i64 2
%53 = load i8*, i8** %52
%54 = call i32* @fopen(i8* %53, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.3, i64 0, i64 0))
%55 = call i32 (i32*, i8*, ...) @fprintf(i32* %54, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.4, i64 0, i64 0), i64 0, i64 0)
br label %291
56: ; preds = %44
%57 = add i64 %47, 4294967295
%58 = and i64 %57, 4294967295
%59 = add nuw nsw i64 %58, 1
%60 = and i32 %48, 1
%61 = icmp eq i32 %48, 1
%62 = and i32 %48, -2
%63 = icmp eq i32 %60, 0
br label %64
64: ; preds = %103, %56
%65 = phi double [ 0xC4B52D02C7E14AF6, %56 ], [ %105, %103 ]
%66 = phi double [ 0x44B52D02C7E14AF6, %56 ], [ %104, %103 ]
%67 = phi i32 [ 1, %56 ], [ %107, %103 ]
%68 = phi i64 [ 0, %56 ], [ %106, %103 ]
br i1 %61, label %90, label %69
69: ; preds = %64, %69
%70 = phi double [ %86, %69 ], [ %65, %64 ]
%71 = phi double [ %84, %69 ], [ %66, %64 ]
%72 = phi i64 [ %87, %69 ], [ %68, %64 ]
%73 = phi i32 [ %88, %69 ], [ 0, %64 ]
%74 = getelementptr inbounds double, double* %46, i64 %72
%75 = load double, double* %74
%76 = fcmp ogt double %71, %75
%77 = select i1 %76, double %75, double %71
%78 = fcmp olt double %70, %75
%79 = select i1 %78, double %75, double %70
%80 = add nuw nsw i64 %72, 1
%81 = getelementptr inbounds double, double* %46, i64 %80
%82 = load double, double* %81
%83 = fcmp ogt double %77, %82
%84 = select i1 %83, double %82, double %77
%85 = fcmp olt double %79, %82
%86 = select i1 %85, double %82, double %79
%87 = add nuw nsw i64 %72, 2
%88 = add i32 %73, 2
%89 = icmp eq i32 %88, %62
br i1 %89, label %90, label %69
90: ; preds = %69, %64
%91 = phi double [ undef, %64 ], [ %84, %69 ]
%92 = phi double [ undef, %64 ], [ %86, %69 ]
%93 = phi double [ %65, %64 ], [ %86, %69 ]
%94 = phi double [ %66, %64 ], [ %84, %69 ]
%95 = phi i64 [ %68, %64 ], [ %87, %69 ]
br i1 %63, label %103, label %96
96: ; preds = %90
%97 = getelementptr inbounds double, double* %46, i64 %95
%98 = load double, double* %97
%99 = fcmp ogt double %94, %98
%100 = select i1 %99, double %98, double %94
%101 = fcmp olt double %93, %98
%102 = select i1 %101, double %98, double %93
br label %103
103: ; preds = %90, %96
%104 = phi double [ %91, %90 ], [ %100, %96 ]
%105 = phi double [ %92, %90 ], [ %102, %96 ]
%106 = add nuw nsw i64 %59, %68
%107 = add nuw i32 %67, 1
%108 = icmp eq i32 %67, %48
br i1 %108, label %109, label %64
109: ; preds = %103
%110 = fsub double %105, %104
%111 = getelementptr inbounds i8*, i8** %1, i64 2
%112 = load i8*, i8** %111
%113 = call i32* @fopen(i8* %112, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.3, i64 0, i64 0))
%114 = icmp sgt i32 %48, 1
br i1 %114, label %115, label %228
115: ; preds = %109
%116 = shl i64 %47, 32
%117 = ashr exact i64 %116, 32
%118 = add i64 %47, 4294967294
%119 = and i64 %118, 4294967295
%120 = add nuw nsw i64 %119, 1
%121 = add nuw nsw i64 %119, 2
%122 = mul nuw i64 %121, %119
%123 = icmp ult i64 %119, 3
%124 = and i64 %120, 8589934588
%125 = trunc i64 %124 to i32
%126 = or i32 %125, 1
%127 = icmp eq i64 %120, %124
br label %128
128: ; preds = %221, %115
%129 = phi i32 [ 1, %115 ], [ %224, %221 ]
%130 = phi i64 [ 0, %115 ], [ %223, %221 ]
%131 = phi i64 [ 0, %115 ], [ %222, %221 ]
%132 = getelementptr inbounds double, double* %46, i64 %130
%133 = load double, double* %132
br i1 %123, label %191, label %134
134: ; preds = %128
%135 = add nuw i64 %130, %124
%136 = insertelement <2 x double> poison, double %133, i64 1
%137 = insertelement <2 x i64> <i64 poison, i64 0>, i64 %131, i64 0
br label %138
138: ; preds = %138, %134
%139 = phi i64 [ 0, %134 ], [ %185, %138 ]
%140 = phi <2 x double> [ %136, %134 ], [ %150, %138 ]
%141 = phi <2 x i64> [ %137, %134 ], [ %183, %138 ]
%142 = phi <2 x i64> [ zeroinitializer, %134 ], [ %184, %138 ]
%143 = add i64 %130, %139
%144 = add nuw nsw i64 %143, 1
%145 = getelementptr inbounds double, double* %46, i64 %144
%146 = bitcast double* %145 to <2 x double>*
%147 = load <2 x double>, <2 x double>* %146
%148 = getelementptr inbounds double, double* %145, i64 2
%149 = bitcast double* %148 to <2 x double>*
%150 = load <2 x double>, <2 x double>* %149
%151 = shufflevector <2 x double> %140, <2 x double> %147, <2 x i32> <i32 1, i32 2>
%152 = shufflevector <2 x double> %147, <2 x double> %150, <2 x i32> <i32 1, i32 2>
%153 = add nsw i64 %143, %117
%154 = getelementptr inbounds double, double* %46, i64 %153
%155 = bitcast double* %154 to <2 x double>*
%156 = load <2 x double>, <2 x double>* %155
%157 = getelementptr inbounds double, double* %154, i64 2
%158 = bitcast double* %157 to <2 x double>*
%159 = load <2 x double>, <2 x double>* %158
%160 = add nsw i64 %153, 1
%161 = getelementptr inbounds double, double* %46, i64 %160
%162 = bitcast double* %161 to <2 x double>*
%163 = load <2 x double>, <2 x double>* %162
%164 = getelementptr inbounds double, double* %161, i64 2
%165 = bitcast double* %164 to <2 x double>*
%166 = load <2 x double>, <2 x double>* %165
%167 = fcmp une <2 x double> %151, zeroinitializer
%168 = fcmp une <2 x double> %152, zeroinitializer
%169 = fcmp une <2 x double> %147, zeroinitializer
%170 = fcmp une <2 x double> %150, zeroinitializer
%171 = select <2 x i1> %167, <2 x i1> %169, <2 x i1> zeroinitializer
%172 = select <2 x i1> %168, <2 x i1> %170, <2 x i1> zeroinitializer
%173 = fcmp une <2 x double> %156, zeroinitializer
%174 = fcmp une <2 x double> %159, zeroinitializer
%175 = select <2 x i1> %171, <2 x i1> %173, <2 x i1> zeroinitializer
%176 = select <2 x i1> %172, <2 x i1> %174, <2 x i1> zeroinitializer
%177 = fcmp une <2 x double> %163, zeroinitializer
%178 = fcmp une <2 x double> %166, zeroinitializer
%179 = select <2 x i1> %175, <2 x i1> %177, <2 x i1> zeroinitializer
%180 = select <2 x i1> %176, <2 x i1> %178, <2 x i1> zeroinitializer
%181 = zext <2 x i1> %179 to <2 x i64>
%182 = zext <2 x i1> %180 to <2 x i64>
%183 = add <2 x i64> %141, %181
%184 = add <2 x i64> %142, %182
%185 = add nuw i64 %139, 4
%186 = icmp eq i64 %185, %124
br i1 %186, label %187, label %138
187: ; preds = %138
%188 = add <2 x i64> %184, %183
%189 = call i64 @llvm.vector.reduce.add.v2i64(<2 x i64> %188)
%190 = extractelement <2 x double> %150, i64 1
br i1 %127, label %221, label %191
191: ; preds = %128, %187
%192 = phi double [ %190, %187 ], [ %133, %128 ]
%193 = phi i32 [ %126, %187 ], [ 1, %128 ]
%194 = phi i64 [ %135, %187 ], [ %130, %128 ]
%195 = phi i64 [ %189, %187 ], [ %131, %128 ]
br label %196
196: ; preds = %191, %196
%197 = phi double [ %203, %196 ], [ %192, %191 ]
%198 = phi i32 [ %219, %196 ], [ %193, %191 ]
%199 = phi i64 [ %201, %196 ], [ %194, %191 ]
%200 = phi i64 [ %218, %196 ], [ %195, %191 ]
%201 = add nuw nsw i64 %199, 1
%202 = getelementptr inbounds double, double* %46, i64 %201
%203 = load double, double* %202
%204 = add nsw i64 %199, %117
%205 = getelementptr inbounds double, double* %46, i64 %204
%206 = load double, double* %205
%207 = add nsw i64 %204, 1
%208 = getelementptr inbounds double, double* %46, i64 %207
%209 = load double, double* %208
%210 = fcmp une double %197, 0.000000e+00
%211 = fcmp une double %203, 0.000000e+00
%212 = select i1 %210, i1 %211, i1 false
%213 = fcmp une double %206, 0.000000e+00
%214 = select i1 %212, i1 %213, i1 false
%215 = fcmp une double %209, 0.000000e+00
%216 = select i1 %214, i1 %215, i1 false
%217 = zext i1 %216 to i64
%218 = add nsw i64 %200, %217
%219 = add nuw nsw i32 %198, 1
%220 = icmp eq i32 %219, %48
br i1 %220, label %221, label %196
221: ; preds = %196, %187
%222 = phi i64 [ %189, %187 ], [ %218, %196 ]
%223 = add nuw nsw i64 %120, %130
%224 = add nuw nsw i32 %129, 1
%225 = icmp eq i32 %224, %48
br i1 %225, label %226, label %128
226: ; preds = %221
%227 = add i64 %122, 1
br label %228
228: ; preds = %226, %109
%229 = phi i1 [ false, %109 ], [ %114, %226 ]
%230 = phi i64 [ 0, %109 ], [ %222, %226 ]
%231 = phi i64 [ 0, %109 ], [ %227, %226 ]
%232 = call i32 (i32*, i8*, ...) @fprintf(i32* %113, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.4, i64 0, i64 0), i64 %231, i64 %230)
br i1 %50, label %241, label %233
233: ; preds = %228
%234 = sitofp i32 %48 to double
br label %235
235: ; preds = %259, %233
%236 = phi i32 [ 1, %233 ], [ %260, %259 ]
%237 = phi i64 [ 0, %233 ], [ %255, %259 ]
%238 = sitofp i32 %236 to double
%239 = trunc i64 %237 to i32
%240 = add i32 %48, %239
br label %246
241: ; preds = %259, %228
br i1 %229, label %242, label %291
242: ; preds = %241
%243 = shl i64 %47, 32
%244 = ashr exact i64 %243, 32
%245 = add i32 %48, -1
br label %262
246: ; preds = %235, %246
%247 = phi i32 [ 1, %235 ], [ %256, %246 ]
%248 = phi i64 [ %237, %235 ], [ %255, %246 ]
%249 = sitofp i32 %247 to double
%250 = getelementptr inbounds double, double* %46, i64 %248
%251 = load double, double* %250
%252 = fmul double %251, %234
%253 = fdiv double %252, %110
%254 = call i32 (i32*, i8*, ...) @fprintf(i32* %113, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.5, i64 0, i64 0), double %238, double %249, double %253)
%255 = add i64 %248, 1
%256 = add nuw nsw i32 %247, 1
%257 = trunc i64 %255 to i32
%258 = icmp eq i32 %240, %257
br i1 %258, label %259, label %246
259: ; preds = %246
%260 = add nuw i32 %236, 1
%261 = icmp eq i32 %236, %48
br i1 %261, label %241, label %235
262: ; preds = %288, %242
%263 = phi i32 [ 1, %242 ], [ %289, %288 ]
%264 = phi i64 [ 0, %242 ], [ %270, %288 ]
%265 = trunc i64 %264 to i32
%266 = add i32 %245, %265
br label %267
267: ; preds = %262, %285
%268 = phi i64 [ %270, %285 ], [ %264, %262 ]
%269 = getelementptr inbounds double, double* %46, i64 %268
%270 = add nsw i64 %268, 1
%271 = bitcast double* %269 to <2 x double>*
%272 = load <2 x double>, <2 x double>* %271
%273 = add nsw i64 %268, %244
%274 = getelementptr inbounds double, double* %46, i64 %273
%275 = bitcast double* %274 to <2 x double>*
%276 = load <2 x double>, <2 x double>* %275
%277 = shufflevector <2 x double> %272, <2 x double> %276, <4 x i32> <i32 0, i32 1, i32 2, i32 3>
%278 = freeze <4 x double> %277
%279 = fcmp oeq <4 x double> %278, zeroinitializer
%280 = bitcast <4 x i1> %279 to i4
%281 = icmp eq i4 %280, 0
br i1 %281, label %282, label %285
282: ; preds = %267
%283 = add nsw i64 %270, %244
%284 = call i32 (i32*, i8*, ...) @fprintf(i32* %113, i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.6, i64 0, i64 0), i64 %268, i64 %270, i64 %283, i64 %273)
br label %285
285: ; preds = %282, %267
%286 = trunc i64 %270 to i32
%287 = icmp eq i32 %266, %286
br i1 %287, label %288, label %267
288: ; preds = %285
%289 = add nuw nsw i32 %263, 1
%290 = icmp eq i32 %289, %48
br i1 %290, label %291, label %262
291: ; preds = %288, %51, %241
%292 = phi i32* [ %54, %51 ], [ %113, %241 ], [ %113, %288 ]
%293 = call i32 @fclose(i32* %292)
%294 = call i32 @free(double* %46)
%295 = call i32 @fclose(i32* %14)
ret void
}