#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 */

/* Variables and functions */
scalar_t__ EOF;
scalar_t__ calloc(int, int);
int /*<<< orphan*/ error_print(char *);
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ free(double *);
int icount;
int ilong;
int /*<<< orphan*/ printf(char *, ...);
scalar_t__ realloc(double *, int);
scalar_t__ scanf(char *, double *);
scalar_t__ sqrt(double);
int /*<<< orphan*/ sscanf(char *, char *, double *);
int /*<<< orphan*/ stderr;
void main(int argc, char *argv[]) {
  double *x, dum, koeff, rad;
  int i, nn, j, ii, ii1, ii2, ubbf2(), ilong = 2, icount;
  long ik;
  if (argc < 2 || argc > 3) {
    error_print(argv[0]);
    exit(1);
  }
  sscanf(argv[1], "%le", &koeff);
  sscanf(argv[2], "%le", &rad);
  x = (double *)calloc(1, sizeof(double));
  ik = 0;
  while ((scanf("%le", &dum)) != EOF) {
    x = (double *)realloc(x, sizeof(double) * (ik + 1));
    if (x == NULL) {
      fprintf(stderr, "unfold: Allocation error while reading, exiting\n");
      exit(1);
    }
    x[ik] = dum;
    ik++;
  }
  nn = (int)sqrt((double)ik);
  for (i = 1; i <= nn - 1; i++) {
    for (j = 1; j <= nn - 1; j++) {
      int ii, ij;
      ii = i - nn / 2 + 1;
      ij = j - nn / 2 + 1;
      ii1 = (i - 1) * nn + j - 1;
      if (ii * ii + ij * ij > rad * rad * nn * nn / 4)
        x[ii1] = 0.;
    }
  }
  for (icount = 1; icount <= ilong; icount++) {
    for (i = nn / 2; i <= nn - 1; i++) {
      for (j = nn / 2; j <= nn - 1; j++) {
        ii1 = (i - 1) * nn + j - 1;
        ii2 = (i - 1) * nn + j - 1 + 1;
        ii = ubbf2(&x[ii1], &x[ii2]);
      }
    }
    for (i = nn / 2; i >= 2; i--) {
      for (j = nn / 2; j <= nn - 1; j++) {
        ii1 = (i - 1) * nn + j - 1;
        ii2 = (i - 1 - 1) * nn + j - 1;
        ii = ubbf2(&x[ii1], &x[ii2]);
      }
    }
    for (i = nn / 2; i <= nn - 1; i++) {
      for (j = nn / 2; j >= 2; j--) {
        ii1 = (i - 1) * nn + j - 1;
        ii2 = (i - 1 + 1) * nn + j - 1;
        ii = ubbf2(&x[ii1], &x[ii2]);
      }
    }
    for (i = nn / 2; i >= 2; i--) {
      for (j = nn / 2; j >= 2; j--) {
        ii1 = (i - 1) * nn + j - 1;
        ii2 = (i - 1) * nn + j - 1 - 1;
        ii = ubbf2(&x[ii1], &x[ii2]);
      }
    }
  }
  for (i = 1; i <= nn; i++) {
    for (j = 1; j <= nn; j++) {
      ik = (i - 1) * nn + j - 1;
      printf("%e\n", x[ik] * koeff);
    }
    printf("\n");
  }
  free(x);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x70,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x2,-0x4c(%rbp)
cmpl   $0x2,-0x4(%rbp)
jl     11da <main+0x2a>
cmpl   $0x3,-0x4(%rbp)
jle    11f0 <main+0x40>
mov    -0x10(%rbp),%rax
mov    (%rax),%rdi
call   1090 <error_print@plt>
mov    $0x1,%edi
call   10d0 <exit@plt>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
lea    0xe09(%rip),%rsi
lea    -0x28(%rbp),%rdx
call   1080 <sscanf@plt>
mov    -0x10(%rbp),%rax
mov    0x10(%rax),%rdi
lea    0xdf1(%rip),%rsi
lea    -0x30(%rbp),%rdx
call   1080 <sscanf@plt>
mov    $0x1,%edi
mov    $0x8,%esi
call   1060 <calloc@plt>
mov    %rax,-0x18(%rbp)
movq   $0x0,-0x58(%rbp)
lea    0xdc6(%rip),%rdi
lea    -0x20(%rbp),%rsi
call   10b0 <scanf@plt>
mov    0x2d96(%rip),%rcx
cmp    (%rcx),%rax
je     12c3 <main+0x113>
mov    -0x18(%rbp),%rdi
mov    -0x58(%rbp),%rax
add    $0x1,%rax
shl    $0x3,%rax
mov    %eax,%esi
call   10a0 <realloc@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
jne    12a0 <main+0xf0>
mov    0x2d50(%rip),%rax
mov    (%rax),%edi
lea    0xd7b(%rip),%rsi
call   1070 <fprintf@plt>
mov    $0x1,%edi
call   10d0 <exit@plt>
movsd  -0x20(%rbp),%xmm0
mov    -0x18(%rbp),%rax
mov    -0x58(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x58(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x58(%rbp)
jmp    123b <main+0x8b>
cvtsi2sdq -0x58(%rbp),%xmm0
call   10c0 <sqrt@plt>
mov    %eax,-0x38(%rbp)
movl   $0x1,-0x34(%rbp)
mov    -0x34(%rbp),%eax
mov    -0x38(%rbp),%ecx
sub    $0x1,%ecx
cmp    %ecx,%eax
jg     13cc <main+0x21c>
movl   $0x1,-0x3c(%rbp)
mov    -0x3c(%rbp),%eax
mov    -0x38(%rbp),%ecx
sub    $0x1,%ecx
cmp    %ecx,%eax
jg     13b9 <main+0x209>
mov    -0x34(%rbp),%eax
mov    %eax,-0x68(%rbp)
mov    -0x38(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    %eax,%ecx
mov    -0x68(%rbp),%eax
sub    %ecx,%eax
add    $0x1,%eax
mov    %eax,-0x5c(%rbp)
mov    -0x3c(%rbp),%eax
mov    %eax,-0x64(%rbp)
mov    -0x38(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    %eax,%ecx
mov    -0x64(%rbp),%eax
sub    %ecx,%eax
add    $0x1,%eax
mov    %eax,-0x60(%rbp)
mov    -0x34(%rbp),%eax
sub    $0x1,%eax
imul   -0x38(%rbp),%eax
add    -0x3c(%rbp),%eax
sub    $0x1,%eax
mov    %eax,-0x44(%rbp)
mov    -0x5c(%rbp),%eax
imul   -0x5c(%rbp),%eax
mov    -0x60(%rbp),%ecx
imul   -0x60(%rbp),%ecx
add    %ecx,%eax
cvtsi2sd %eax,%xmm0
movsd  -0x30(%rbp),%xmm1
mulsd  -0x30(%rbp),%xmm1
cvtsi2sdl -0x38(%rbp),%xmm2
mulsd  %xmm2,%xmm1
cvtsi2sdl -0x38(%rbp),%xmm2
mulsd  %xmm2,%xmm1
movsd  0xc78(%rip),%xmm2
divsd  %xmm2,%xmm1
ucomisd %xmm1,%xmm0
jbe    13a6 <main+0x1f6>
mov    -0x18(%rbp),%rax
movslq -0x44(%rbp),%rcx
xorps  %xmm0,%xmm0
movsd  %xmm0,(%rax,%rcx,8)
jmp    13ab <main+0x1fb>
mov    -0x3c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x3c(%rbp)
jmp    12f0 <main+0x140>
jmp    13be <main+0x20e>
mov    -0x34(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x34(%rbp)
jmp    12d8 <main+0x128>
movl   $0x1,-0x50(%rbp)
mov    -0x50(%rbp),%eax
cmp    -0x4c(%rbp),%eax
jg     1696 <main+0x4e6>
mov    -0x38(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    %eax,-0x34(%rbp)
mov    -0x34(%rbp),%eax
mov    -0x38(%rbp),%ecx
sub    $0x1,%ecx
cmp    %ecx,%eax
jg     148f <main+0x2df>
mov    -0x38(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    %eax,-0x3c(%rbp)
mov    -0x3c(%rbp),%eax
mov    -0x38(%rbp),%ecx
sub    $0x1,%ecx
cmp    %ecx,%eax
jg     147c <main+0x2cc>
mov    -0x34(%rbp),%eax
sub    $0x1,%eax
imul   -0x38(%rbp),%eax
add    -0x3c(%rbp),%eax
sub    $0x1,%eax
mov    %eax,-0x44(%rbp)
mov    -0x34(%rbp),%eax
sub    $0x1,%eax
imul   -0x38(%rbp),%eax
add    -0x3c(%rbp),%eax
sub    $0x1,%eax
add    $0x1,%eax
mov    %eax,-0x48(%rbp)
mov    -0x18(%rbp),%rdi
movslq -0x44(%rbp),%rax
shl    $0x3,%rax
add    %rax,%rdi
mov    -0x18(%rbp),%rsi
movslq -0x48(%rbp),%rax
shl    $0x3,%rax
add    %rax,%rsi
mov    $0x0,%al
call   1040 <ubbf2@plt>
mov    %eax,-0x40(%rbp)
mov    -0x3c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x3c(%rbp)
jmp    140c <main+0x25c>
jmp    1481 <main+0x2d1>
mov    -0x34(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x34(%rbp)
jmp    13ed <main+0x23d>
mov    -0x38(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    %eax,-0x34(%rbp)
cmpl   $0x2,-0x34(%rbp)
jl     1538 <main+0x388>
mov    -0x38(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    %eax,-0x3c(%rbp)
mov    -0x3c(%rbp),%eax
mov    -0x38(%rbp),%ecx
sub    $0x1,%ecx
cmp    %ecx,%eax
jg     1525 <main+0x375>
mov    -0x34(%rbp),%eax
sub    $0x1,%eax
imul   -0x38(%rbp),%eax
add    -0x3c(%rbp),%eax
sub    $0x1,%eax
mov    %eax,-0x44(%rbp)
mov    -0x34(%rbp),%eax
sub    $0x1,%eax
sub    $0x1,%eax
imul   -0x38(%rbp),%eax
add    -0x3c(%rbp),%eax
sub    $0x1,%eax
mov    %eax,-0x48(%rbp)
mov    -0x18(%rbp),%rdi
movslq -0x44(%rbp),%rax
shl    $0x3,%rax
add    %rax,%rdi
mov    -0x18(%rbp),%rsi
movslq -0x48(%rbp),%rax
shl    $0x3,%rax
add    %rax,%rsi
mov    $0x0,%al
call   1040 <ubbf2@plt>
mov    %eax,-0x40(%rbp)
mov    -0x3c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x3c(%rbp)
jmp    14b5 <main+0x305>
jmp    152a <main+0x37a>
mov    -0x34(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x34(%rbp)
jmp    149d <main+0x2ed>
mov    -0x38(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    %eax,-0x34(%rbp)
mov    -0x34(%rbp),%eax
mov    -0x38(%rbp),%ecx
sub    $0x1,%ecx
cmp    %ecx,%eax
jg     15e1 <main+0x431>
mov    -0x38(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    %eax,-0x3c(%rbp)
cmpl   $0x2,-0x3c(%rbp)
jl     15ce <main+0x41e>
mov    -0x34(%rbp),%eax
sub    $0x1,%eax
imul   -0x38(%rbp),%eax
add    -0x3c(%rbp),%eax
sub    $0x1,%eax
mov    %eax,-0x44(%rbp)
mov    -0x34(%rbp),%eax
sub    $0x1,%eax
add    $0x1,%eax
imul   -0x38(%rbp),%eax
add    -0x3c(%rbp),%eax
sub    $0x1,%eax
mov    %eax,-0x48(%rbp)
mov    -0x18(%rbp),%rdi
movslq -0x44(%rbp),%rax
shl    $0x3,%rax
add    %rax,%rdi
mov    -0x18(%rbp),%rsi
movslq -0x48(%rbp),%rax
shl    $0x3,%rax
add    %rax,%rsi
mov    $0x0,%al
call   1040 <ubbf2@plt>
mov    %eax,-0x40(%rbp)
mov    -0x3c(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x3c(%rbp)
jmp    1565 <main+0x3b5>
jmp    15d3 <main+0x423>
mov    -0x34(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x34(%rbp)
jmp    1546 <main+0x396>
mov    -0x38(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    %eax,-0x34(%rbp)
cmpl   $0x2,-0x34(%rbp)
jl     1683 <main+0x4d3>
mov    -0x38(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    %eax,-0x3c(%rbp)
cmpl   $0x2,-0x3c(%rbp)
jl     1670 <main+0x4c0>
mov    -0x34(%rbp),%eax
sub    $0x1,%eax
imul   -0x38(%rbp),%eax
add    -0x3c(%rbp),%eax
sub    $0x1,%eax
mov    %eax,-0x44(%rbp)
mov    -0x34(%rbp),%eax
sub    $0x1,%eax
imul   -0x38(%rbp),%eax
add    -0x3c(%rbp),%eax
sub    $0x1,%eax
sub    $0x1,%eax
mov    %eax,-0x48(%rbp)
mov    -0x18(%rbp),%rdi
movslq -0x44(%rbp),%rax
shl    $0x3,%rax
add    %rax,%rdi
mov    -0x18(%rbp),%rsi
movslq -0x48(%rbp),%rax
shl    $0x3,%rax
add    %rax,%rsi
mov    $0x0,%al
call   1040 <ubbf2@plt>
mov    %eax,-0x40(%rbp)
mov    -0x3c(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x3c(%rbp)
jmp    1607 <main+0x457>
jmp    1675 <main+0x4c5>
mov    -0x34(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x34(%rbp)
jmp    15ef <main+0x43f>
jmp    1688 <main+0x4d8>
mov    -0x50(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x50(%rbp)
jmp    13d3 <main+0x223>
movl   $0x1,-0x34(%rbp)
mov    -0x34(%rbp),%eax
cmp    -0x38(%rbp),%eax
jg     171c <main+0x56c>
movl   $0x1,-0x3c(%rbp)
mov    -0x3c(%rbp),%eax
cmp    -0x38(%rbp),%eax
jg     1700 <main+0x550>
mov    -0x34(%rbp),%eax
sub    $0x1,%eax
imul   -0x38(%rbp),%eax
add    -0x3c(%rbp),%eax
sub    $0x1,%eax
cltq
mov    %rax,-0x58(%rbp)
mov    -0x18(%rbp),%rax
mov    -0x58(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mulsd  -0x28(%rbp),%xmm0
lea    0x952(%rip),%rdi
mov    $0x1,%al
call   1050 <printf@plt>
mov    -0x3c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x3c(%rbp)
jmp    16b0 <main+0x500>
lea    0x938(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
mov    -0x34(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x34(%rbp)
jmp    169d <main+0x4ed>
mov    -0x18(%rbp),%rdi
call   1030 <free@plt>
add    $0x70,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x88,%rsp
mov    %rsi,%rbx
add    $0xfffffffc,%edi
cmp    $0xfffffffd,%edi
jbe    182d <main+0x66d>
mov    0x8(%rbx),%rdi
lea    0xe45(%rip),%r14
lea    0x80(%rsp),%rdx
mov    %r14,%rsi
call   1090 <sscanf@plt>
mov    0x10(%rbx),%rdi
lea    0x28(%rsp),%rdx
mov    %r14,%rsi
call   1090 <sscanf@plt>
mov    $0x8,%ebp
mov    $0x1,%edi
mov    $0x8,%esi
call   1070 <calloc@plt>
mov    %rax,%r15
lea    0x50(%rsp),%rsi
mov    %r14,%rdi
call   10c0 <scanf@plt>
mov    0x2db1(%rip),%r13
cmp    0x0(%r13),%rax
jne    1243 <main+0x83>
xorpd  %xmm0,%xmm0
jmp    12a1 <main+0xe1>
xor    %ebx,%ebx
lea    0xde4(%rip),%r14
lea    0x50(%rsp),%r12
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
mov    %r15,%rdi
mov    %ebp,%esi
call   10b0 <realloc@plt>
test   %rax,%rax
je     180e <main+0x64e>
mov    %rax,%r15
movsd  0x50(%rsp),%xmm0
movsd  %xmm0,(%rax,%rbx,8)
mov    %r14,%rdi
mov    %r12,%rsi
call   10c0 <scanf@plt>
add    $0x8,%ebp
add    $0x1,%rbx
cmp    0x0(%r13),%rax
jne    1260 <main+0xa0>
xorps  %xmm0,%xmm0
cvtsi2sd %rbx,%xmm0
call   10d0 <sqrt@plt>
mov    %rax,%r12
cmp    $0x1,%r12d
mov    %rax,0x10(%rsp)
mov    %r12d,%r9d
jle    14f7 <main+0x337>
xorps  %xmm0,%xmm0
cvtsi2sd %r12d,%xmm0
shr    %r9d
mov    %r12d,%r11d
lea    -0x2(%r11),%rdi
lea    -0x1(%r11),%r12
lea    (%r15,%r11,8),%rax
add    $0xfffffffffffffff8,%rax
mov    %rax,0x30(%rsp)
mov    %r12,%rax
and    $0xfffffffffffffffe,%rax
mov    %rax,0x20(%rsp)
mov    %r12,%rax
or     $0x1,%rax
mov    %rax,0x18(%rsp)
movd   %r9d,%xmm1
pshufd $0x50,%xmm1,%xmm1
mov    $0x1,%r13d
mov    $0x1,%eax
sub    %r9d,%eax
mov    %rax,0x8(%rsp)
xor    %r14d,%r14d
mov    $0xffffffff,%ecx
movsd  0xcdd(%rip),%xmm2
movdqa 0xce4(%rip),%xmm8
pcmpeqd %xmm9,%xmm9
movdqa 0xce6(%rip),%xmm10
mov    $0x1,%r8d
mov    %rdi,%r10
jmp    136e <main+0x1ae>
cs nopw 0x0(%rax,%rax,1)
nop
add    $0x1,%r8d
add    $0x1,%r14d
mov    0x10(%rsp),%rax
add    %eax,%r13d
add    %eax,%ecx
cmp    %eax,%r8d
mov    %r10,%rdi
je     1503 <main+0x343>
mov    %r8d,%eax
sub    %r9d,%eax
add    $0x1,%eax
imul   %eax,%eax
mov    $0x1,%ebx
cmp    $0x2,%r12
jb     1490 <main+0x2d0>
mov    %r14d,%edx
imul   0x10(%rsp),%edx
lea    (%rdx,%rdi,1),%esi
cmp    %edx,%esi
jl     1490 <main+0x2d0>
mov    %rdi,%rsi
shr    $0x20,%rsi
jne    1490 <main+0x2d0>
movslq %edx,%rdx
mov    0x30(%rsp),%rsi
lea    (%rsi,%rdx,8),%rsi
lea    0x28(%rsp),%rdi
cmp    %rsi,%rdi
jae    13d1 <main+0x211>
lea    (%r15,%rdx,8),%rdx
lea    0x30(%rsp),%rsi
cmp    %rsi,%rdx
jb     1490 <main+0x2d0>
mov    %r11,%rdi
mov    %r9d,%esi
movd   %eax,%xmm3
pshufd $0x50,%xmm3,%xmm6
movsd  0x28(%rsp),%xmm7
mulsd  %xmm7,%xmm7
mulsd  %xmm0,%xmm7
mulsd  %xmm0,%xmm7
mulsd  %xmm2,%xmm7
unpcklpd %xmm7,%xmm7
mov    0x20(%rsp),%r11
mov    %r13d,%r9d
movdqa %xmm8,%xmm3
jmp    141f <main+0x25f>
nopl   0x0(%rax)
paddd  %xmm10,%xmm3
add    $0x2,%r9d
add    $0xfffffffffffffffe,%r11
je     147a <main+0x2ba>
movdqa %xmm3,%xmm4
psubd  %xmm1,%xmm4
psubd  %xmm9,%xmm4
pshufd $0xf5,%xmm4,%xmm5
pmuludq %xmm4,%xmm4
pmuludq %xmm5,%xmm5
punpckldq %xmm5,%xmm4
paddd  %xmm6,%xmm4
cvtdq2pd %xmm4,%xmm4
ucomisd %xmm7,%xmm4
jbe    145a <main+0x29a>
lea    -0x1(%r9),%edx
movslq %edx,%rdx
movq   $0x0,(%r15,%rdx,8)
movapd %xmm7,%xmm5
cmpltpd %xmm4,%xmm5
pextrw $0x4,%xmm5,%edx
test   $0x1,%dl
je     1410 <main+0x250>
movslq %r9d,%rdx
movq   $0x0,(%r15,%rdx,8)
jmp    1410 <main+0x250>
mov    0x18(%rsp),%rbx
cmp    0x20(%rsp),%r12
mov    %esi,%r9d
mov    %rdi,%r11
je     1350 <main+0x190>
mov    0x8(%rsp),%rdx
lea    (%rdx,%rbx,1),%ebp
lea    (%rcx,%rbx,1),%esi
mov    %r11,%rdx
sub    %rbx,%rdx
jmp    14c0 <main+0x300>
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
add    $0x1,%ebp
add    $0x1,%esi
add    $0xffffffffffffffff,%rdx
je     1350 <main+0x190>
mov    %ebp,%edi
imul   %ebp,%edi
add    %eax,%edi
xorps  %xmm3,%xmm3
cvtsi2sd %edi,%xmm3
movsd  0x28(%rsp),%xmm4
mulsd  %xmm4,%xmm4
mulsd  %xmm0,%xmm4
mulsd  %xmm0,%xmm4
mulsd  %xmm2,%xmm4
ucomisd %xmm4,%xmm3
jbe    14b0 <main+0x2f0>
movslq %esi,%rdi
movq   $0x0,(%r15,%rdi,8)
jmp    14b0 <main+0x2f0>
shr    $0x1f,%r9d
add    %r12d,%r9d
sar    %r9d
jmp    1508 <main+0x348>
mov    0x10(%rsp),%r12
movslq %r9d,%rdx
movslq %r12d,%rsi
lea    -0x1(%rdx),%rax
imul   %rsi,%rax
add    %rdx,%rax
lea    (%r15,%rax,8),%rcx
mov    %rcx,0x68(%rsp)
shl    $0x3,%rsi
mov    %r12d,%ecx
sub    %edx,%ecx
mov    %ecx,0x20(%rsp)
lea    -0x1(%rdx),%ecx
imul   %r12d,%ecx
add    %edx,%ecx
add    $0xffffffff,%ecx
mov    %rcx,0x40(%rsp)
lea    -0x2(%rdx),%ecx
imul   %r12d,%ecx
add    %edx,%ecx
add    $0xffffffff,%ecx
mov    %ecx,0x38(%rsp)
mov    %rdx,0x48(%rsp)
lea    0x1(%rdx),%rcx
lea    0x1(%r12),%edx
imul   %r9d,%edx
add    $0xffffffff,%edx
mov    %rdx,0x60(%rsp)
lea    (%r15,%rax,8),%rax
add    $0xfffffffffffffff0,%rax
mov    %rax,0x58(%rsp)
mov    %rsi,0x78(%rsp)
neg    %rsi
mov    %rsi,0x70(%rsp)
mov    $0x1,%eax
mov    %r9d,0x18(%rsp)
mov    %rcx,0x8(%rsp)
jmp    15ba <main+0x3fa>
cs nopw 0x0(%rax,%rax,1)
nop
mov    0x3c(%rsp),%eax
add    $0x1,%eax
cmp    $0x3,%eax
mov    0x10(%rsp),%r12
mov    0x18(%rsp),%r9d
je     1774 <main+0x5b4>
mov    %eax,0x3c(%rsp)
mov    0x68(%rsp),%r13
mov    0x48(%rsp),%r14
cmp    %r12d,%r9d
jge    1605 <main+0x445>
nopl   (%rax)
mov    0x20(%rsp),%ebx
mov    %r13,%rbp
nopw   0x0(%rax,%rax,1)
lea    -0x8(%rbp),%rdi
mov    %rbp,%rsi
xor    %eax,%eax
call   1050 <ubbf2@plt>
add    $0x8,%rbp
add    $0xffffffff,%ebx
jne    15e0 <main+0x420>
add    $0x1,%r14
add    0x78(%rsp),%r13
cmp    %r12d,%r14d
jne    15d0 <main+0x410>
mov    0x38(%rsp),%ebp
mov    0x40(%rsp),%rax
mov    %eax,%r13d
mov    0x18(%rsp),%eax
mov    %eax,%ecx
cmp    $0x4,%r12d
jge    16d2 <main+0x512>
mov    0x40(%rsp),%r14
mov    0x60(%rsp),%rbx
mov    %eax,%r13d
cmp    %r12d,%eax
mov    0x8(%rsp),%rcx
jl     1733 <main+0x573>
mov    %r12,%rax
mov    0x58(%rsp),%r12
mov    0x48(%rsp),%r13
cmp    $0x4,%eax
jl     15a0 <main+0x3e0>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
lea    -0x1(%r13),%r14
mov    %r12,%rbp
mov    %rcx,%rbx
nopw   0x0(%rax,%rax,1)
lea    0x8(%rbp),%rdi
mov    %rbp,%rsi
xor    %eax,%eax
call   1050 <ubbf2@plt>
add    $0xffffffffffffffff,%rbx
add    $0xfffffffffffffff8,%rbp
cmp    $0x2,%rbx
jg     1670 <main+0x4b0>
add    0x70(%rsp),%r12
cmp    $0x2,%r13
mov    %r14,%r13
mov    0x8(%rsp),%rcx
jg     1660 <main+0x4a0>
jmp    15a0 <main+0x3e0>
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
mov    0x30(%rsp),%rcx
lea    -0x1(%rcx),%eax
mov    0x10(%rsp),%r12
sub    %r12d,%r13d
sub    %r12d,%ebp
cmp    $0x2,%ecx
mov    %eax,%ecx
mov    0x18(%rsp),%eax
jle    1621 <main+0x461>
mov    %rcx,0x30(%rsp)
cmp    %r12d,%eax
jge    16b0 <main+0x4f0>
mov    0x20(%rsp),%r14d
mov    %ebp,%ebx
mov    %r13d,%r12d
cs nopw 0x0(%rax,%rax,1)
movslq %r12d,%r12
lea    (%r15,%r12,8),%rdi
movslq %ebx,%rbx
lea    (%r15,%rbx,8),%rsi
xor    %eax,%eax
call   1050 <ubbf2@plt>
add    $0x1,%r12d
add    $0x1,%ebx
add    $0xffffffff,%r14d
jne    16f0 <main+0x530>
jmp    16b0 <main+0x4f0>
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
add    $0x1,%r13d
add    %r12,%rbx
add    %r12,%r14
cmp    %r12d,%r13d
je     163c <main+0x47c>
cmp    $0x4,%r12d
jl     1720 <main+0x560>
xor    %ebp,%ebp
nopl   0x0(%rax,%rax,1)
lea    (%r14,%rbp,1),%eax
lea    (%rbx,%rbp,1),%ecx
cltq
lea    (%r15,%rax,8),%rdi
movslq %ecx,%rax
lea    (%r15,%rax,8),%rsi
xor    %eax,%eax
call   1050 <ubbf2@plt>
mov    0x8(%rsp),%rcx
lea    (%rcx,%rbp,1),%rax
add    $0xffffffffffffffff,%rax
add    $0xffffffffffffffff,%rbp
cmp    $0x2,%rax
jg     1740 <main+0x580>
jmp    1720 <main+0x560>
test   %r12d,%r12d
jle    17f4 <main+0x634>
lea    0x1(%r12),%eax
add    $0xffffffffffffffff,%rax
mov    %rax,0x8(%rsp)
mov    $0x1,%r13d
xor    %r14d,%r14d
lea    0x8ce(%rip),%rbp
nopw   0x0(%rax,%rax,1)
mov    0x8(%rsp),%rbx
mov    %r14d,%r12d
nopl   0x0(%rax,%rax,1)
movslq %r12d,%r12
movsd  (%r15,%r12,8),%xmm0
mulsd  0x80(%rsp),%xmm0
mov    %rbp,%rdi
mov    $0x1,%al
call   1060 <printf@plt>
add    $0x1,%r12d
add    $0xffffffffffffffff,%rbx
jne    17b0 <main+0x5f0>
mov    $0xa,%edi
call   1040 <putchar@plt>
lea    0x1(%r13),%eax
mov    0x10(%rsp),%rcx
add    %ecx,%r14d
cmp    %ecx,%r13d
mov    %eax,%r13d
jne    17a0 <main+0x5e0>
mov    %r15,%rdi
call   1030 <free@plt>
add    $0x88,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
mov    0x27c3(%rip),%rax
mov    (%rax),%edi
lea    0x816(%rip),%rsi
call   1080 <fprintf@plt>
mov    $0x1,%edi
call   10e0 <exit@plt>
mov    (%rbx),%rdi
call   10a0 <error_print@plt>
mov    $0x1,%edi
call   10e0 <exit@plt>

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

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